@loxia-labs/loxia-autopilot-one 1.2.1 → 1.2.2

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 (123) 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/SparrowAnalyzer.js +1 -1
  16. package/src/analyzers/TypeScriptAnalyzer.js +1 -1
  17. package/src/analyzers/codeCloneDetector/analyzer.js +1 -1
  18. package/src/analyzers/codeCloneDetector/detector.js +1 -1
  19. package/src/analyzers/codeCloneDetector/index.js +1 -1
  20. package/src/analyzers/codeCloneDetector/parser.js +1 -1
  21. package/src/analyzers/codeCloneDetector/reporter.js +1 -1
  22. package/src/analyzers/codeCloneDetector/scanner.js +1 -1
  23. package/src/core/agentPool.js +1 -1
  24. package/src/core/agentScheduler.js +1 -1
  25. package/src/core/contextManager.js +1 -1
  26. package/src/core/messageProcessor.js +1 -1
  27. package/src/core/orchestrator.js +1 -1
  28. package/src/core/stateManager.js +1 -1
  29. package/src/index.js +1 -1
  30. package/src/interfaces/cli.js +1 -1
  31. package/src/interfaces/terminal/__tests__/smoke/advancedFeatures.test.js +1 -1
  32. package/src/interfaces/terminal/__tests__/smoke/agentControl.test.js +1 -1
  33. package/src/interfaces/terminal/__tests__/smoke/agents.test.js +1 -1
  34. package/src/interfaces/terminal/__tests__/smoke/components.test.js +1 -1
  35. package/src/interfaces/terminal/__tests__/smoke/connection.test.js +1 -1
  36. package/src/interfaces/terminal/__tests__/smoke/enhancements.test.js +1 -1
  37. package/src/interfaces/terminal/__tests__/smoke/imports.test.js +1 -1
  38. package/src/interfaces/terminal/__tests__/smoke/messages.test.js +1 -1
  39. package/src/interfaces/terminal/__tests__/smoke/tools.test.js +1 -1
  40. package/src/interfaces/terminal/api/apiClient.js +1 -1
  41. package/src/interfaces/terminal/api/messageRouter.js +1 -1
  42. package/src/interfaces/terminal/api/session.js +1 -1
  43. package/src/interfaces/terminal/api/websocket.js +1 -1
  44. package/src/interfaces/terminal/components/AgentCreator.js +1 -1
  45. package/src/interfaces/terminal/components/AgentEditor.js +1 -1
  46. package/src/interfaces/terminal/components/AgentSwitcher.js +1 -1
  47. package/src/interfaces/terminal/components/ErrorBoundary.js +1 -1
  48. package/src/interfaces/terminal/components/ErrorPanel.js +1 -1
  49. package/src/interfaces/terminal/components/Header.js +1 -1
  50. package/src/interfaces/terminal/components/HelpPanel.js +1 -1
  51. package/src/interfaces/terminal/components/InputBox.js +1 -1
  52. package/src/interfaces/terminal/components/Layout.js +1 -1
  53. package/src/interfaces/terminal/components/LoadingSpinner.js +1 -1
  54. package/src/interfaces/terminal/components/MessageList.js +1 -1
  55. package/src/interfaces/terminal/components/MultilineTextInput.js +1 -1
  56. package/src/interfaces/terminal/components/SearchPanel.js +1 -1
  57. package/src/interfaces/terminal/components/SettingsPanel.js +1 -1
  58. package/src/interfaces/terminal/components/StatusBar.js +1 -1
  59. package/src/interfaces/terminal/components/TextInput.js +1 -1
  60. package/src/interfaces/terminal/config/agentEditorConstants.js +1 -1
  61. package/src/interfaces/terminal/config/constants.js +1 -1
  62. package/src/interfaces/terminal/index.js +1 -1
  63. package/src/interfaces/terminal/state/useAgentControl.js +1 -1
  64. package/src/interfaces/terminal/state/useAgents.js +1 -1
  65. package/src/interfaces/terminal/state/useConnection.js +1 -1
  66. package/src/interfaces/terminal/state/useMessages.js +1 -1
  67. package/src/interfaces/terminal/state/useTools.js +1 -1
  68. package/src/interfaces/terminal/utils/debugLogger.js +1 -1
  69. package/src/interfaces/terminal/utils/settingsStorage.js +1 -1
  70. package/src/interfaces/terminal/utils/theme.js +1 -1
  71. package/src/interfaces/webServer.js +1 -1
  72. package/src/modules/fileExplorer/controller.js +1 -1
  73. package/src/modules/fileExplorer/index.js +1 -1
  74. package/src/modules/fileExplorer/middleware.js +1 -1
  75. package/src/modules/fileExplorer/routes.js +1 -1
  76. package/src/services/agentActivityService.js +1 -1
  77. package/src/services/aiService.js +1 -1
  78. package/src/services/apiKeyManager.js +1 -1
  79. package/src/services/benchmarkService.js +1 -1
  80. package/src/services/budgetService.js +1 -1
  81. package/src/services/contextInjectionService.js +1 -1
  82. package/src/services/conversationCompactionService.js +1 -1
  83. package/src/services/errorHandler.js +1 -1
  84. package/src/services/fileAttachmentService.js +1 -1
  85. package/src/services/modelRouterService.js +1 -1
  86. package/src/services/modelsService.js +1 -1
  87. package/src/services/qualityInspector.js +1 -1
  88. package/src/services/tokenCountingService.js +1 -1
  89. package/src/tools/agentCommunicationTool.js +1 -1
  90. package/src/tools/agentDelayTool.js +1 -1
  91. package/src/tools/asyncToolManager.js +1 -1
  92. package/src/tools/baseTool.js +1 -1
  93. package/src/tools/browserTool.js +1 -1
  94. package/src/tools/cloneDetectionTool.js +1 -1
  95. package/src/tools/dependencyResolverTool.js +1 -1
  96. package/src/tools/fileContentReplaceTool.js +1 -1
  97. package/src/tools/fileSystemTool.js +1 -1
  98. package/src/tools/fileTreeTool.js +1 -1
  99. package/src/tools/imageTool.js +1 -1
  100. package/src/tools/importAnalyzerTool.js +1 -1
  101. package/src/tools/jobDoneTool.js +1 -1
  102. package/src/tools/seekTool.js +1 -1
  103. package/src/tools/staticAnalysisTool.js +1 -1
  104. package/src/tools/taskManagerTool.js +1 -1
  105. package/src/tools/terminalTool.js +1 -1
  106. package/src/tools/webTool.js +1 -1
  107. package/src/types/agent.js +1 -1
  108. package/src/types/contextReference.js +1 -1
  109. package/src/types/conversation.js +1 -1
  110. package/src/types/toolCommand.js +1 -1
  111. package/src/utilities/attachmentValidator.js +1 -1
  112. package/src/utilities/configManager.js +1 -1
  113. package/src/utilities/constants.js +1 -1
  114. package/src/utilities/directoryAccessManager.js +1 -1
  115. package/src/utilities/fileProcessor.js +1 -1
  116. package/src/utilities/logger.js +1 -1
  117. package/src/utilities/platformUtils.js +1 -1
  118. package/src/utilities/platformUtils.test.js +1 -1
  119. package/src/utilities/tagParser.js +1 -1
  120. package/src/utilities/toolConstants.js +1 -1
  121. package/src/utilities/userDataDir.js +1 -1
  122. package/web-ui/build/index.html +1 -1
  123. package/web-ui/build/static/{index-BTou4PJP.js → index-zjK91IDI.js} +1 -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.2.1
102
+ # Should display: Loxia Autopilot One v1.2.2
103
103
  ```
104
104
 
105
105
  ### 4. Create an API Key
@@ -371,7 +371,7 @@ Loxia automatically compacts long conversations to stay within token limits:
371
371
 
372
372
  ## 🛣️ Roadmap
373
373
 
374
- ### Current Version (1.2.1)
374
+ ### Current Version (1.2.2)
375
375
 
376
376
  - ✅ Multi-agent orchestration
377
377
  - ✅ 18+ specialized tools
package/bin/cli.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x3b0e8a=a0_0x33de;(function(_0x316c45,_0x423ae6){const _0x4d7ee9=a0_0x33de,_0x2771e7=_0x316c45();while(!![]){try{const _0x59ed36=parseInt(_0x4d7ee9(0x20c))/0x1*(-parseInt(_0x4d7ee9(0x20a))/0x2)+-parseInt(_0x4d7ee9(0x1f7))/0x3+-parseInt(_0x4d7ee9(0x201))/0x4*(parseInt(_0x4d7ee9(0x1fb))/0x5)+-parseInt(_0x4d7ee9(0x1ed))/0x6+-parseInt(_0x4d7ee9(0x225))/0x7+-parseInt(_0x4d7ee9(0x204))/0x8+parseInt(_0x4d7ee9(0x1f1))/0x9*(parseInt(_0x4d7ee9(0x224))/0xa);if(_0x59ed36===_0x423ae6)break;else _0x2771e7['push'](_0x2771e7['shift']());}catch(_0x1a9698){_0x2771e7['push'](_0x2771e7['shift']());}}}(a0_0x47b8,0xec874));import{fileURLToPath}from'url';function a0_0x47b8(){const _0x10adac=['Starting\x20Terminal\x20UI...\x0a','Starting\x20Loxia\x20server\x20in\x20background...','3262872DeWTxm','toString','\x0aPlease\x20start\x20the\x20server\x20first:',')\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','Checking\x20if\x20server\x20is\x20running...','utf8','1305214qeGjZx','xdg-open','1cGQQKw','\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.','inherit','localhost','host','\x20manually.','kill','--version','error','pid','SIGINT','unref','LOXIA_HOST','open','Error:','Server\x20is\x20running\x20at\x20','src','node','startsWith','platform','SIGTERM','Please\x20open\x20manually:\x20','/api/health','get','7343890shzddF','10593513DITsRK','loxia-terminal.js','Unknown\x20command:\x20','version','\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a','Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.','ignore','port','env','web','help','http://','--host',')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20','catch','\x0aOpening\x20Web\x20UI\x20at\x20','includes','10720494ULXkro','start','log','Server\x20running\x20at\x20','99HrTOfi','cmd','exit','ceil','\x0aServer\x20is\x20not\x20running\x20at\x20','Loxia\x20Autopilot\x20One\x20v','4334601zBCBhW','\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI','Starting\x20Loxia\x20server...\x0a','\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','2570BSkQMp','package.json','length','--help','argv','\x0aLoxia\x20Autopilot\x20One\x20v','10148vWZUBQ'];a0_0x47b8=function(){return _0x10adac;};return a0_0x47b8();}import{dirname,join}from'path';import{spawn}from'child_process';import{readFileSync}from'fs';import a0_0x1125fd from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x3b0e8a(0x20f),SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process[a0_0x3b0e8a(0x1ff)]['slice'](0x2),command=args[0x0]&&!args[0x0][a0_0x3b0e8a(0x21e)]('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args[a0_0x3b0e8a(0x1ec)](a0_0x3b0e8a(0x1fe))||args['includes']('-h'),'version':args[a0_0x3b0e8a(0x1ec)](a0_0x3b0e8a(0x213))||args['includes']('-v')};for(let i=0x0;i<args[a0_0x3b0e8a(0x1fd)];i++){args[i]==='--port'&&args[i+0x1]&&(flags[a0_0x3b0e8a(0x22c)]=parseInt(args[i+0x1],0xa)),args[i]===a0_0x3b0e8a(0x231)&&args[i+0x1]&&(flags[a0_0x3b0e8a(0x210)]=args[i+0x1]);}const port=flags['port']||DEFAULT_PORT,host=flags['host']||DEFAULT_HOST,serverUrl=a0_0x3b0e8a(0x230)+host+':'+port;if(flags[a0_0x3b0e8a(0x228)]){const pkgPath=join(__dirname,'..',a0_0x3b0e8a(0x1fc)),pkg=JSON['parse'](readFileSync(pkgPath,a0_0x3b0e8a(0x209)));console[a0_0x3b0e8a(0x1ef)](a0_0x3b0e8a(0x1f6)+pkg[a0_0x3b0e8a(0x228)]),process[a0_0x3b0e8a(0x1f3)](0x0);}if(flags[a0_0x3b0e8a(0x22f)]||!command){const pkgPath=join(__dirname,'..',a0_0x3b0e8a(0x1fc)),pkg=JSON['parse'](readFileSync(pkgPath,a0_0x3b0e8a(0x209)));console['log'](a0_0x3b0e8a(0x200)+pkg[a0_0x3b0e8a(0x228)]+a0_0x3b0e8a(0x1fa)+DEFAULT_PORT+a0_0x3b0e8a(0x232)+DEFAULT_HOST+a0_0x3b0e8a(0x207)),process[a0_0x3b0e8a(0x1f3)](0x0);}async function checkServerRunning(_0x51db66,_0xe6ec1a,_0x2a1963=0x1){for(let _0x45a6ba=0x0;_0x45a6ba<_0x2a1963;_0x45a6ba++){const _0x247fe3=await new Promise(_0x79b771=>{const _0x4b786f=a0_0x33de,_0x572566=a0_0x1125fd[_0x4b786f(0x223)](_0x4b786f(0x230)+_0x51db66+':'+_0xe6ec1a+_0x4b786f(0x222),_0x28108f=>{_0x79b771(_0x28108f['statusCode']===0xc8);});_0x572566['on']('error',()=>_0x79b771(![])),_0x572566['setTimeout'](0x7d0,()=>{_0x572566['destroy'](),_0x79b771(![]);});});if(_0x247fe3)return!![];_0x45a6ba<_0x2a1963-0x1&&await new Promise(_0x324d9a=>setTimeout(_0x324d9a,SERVER_CHECK_INTERVAL));}return![];}function a0_0x33de(_0x19decd,_0x79b131){_0x19decd=_0x19decd-0x1ec;const _0x47b89c=a0_0x47b8();let _0x33de01=_0x47b89c[_0x19decd];return _0x33de01;}async function waitForServer(_0x192958,_0x4cf94b,_0x1258e3=SERVER_STARTUP_TIMEOUT){const _0xafdd05=a0_0x3b0e8a,_0x5bf00e=Math[_0xafdd05(0x1f4)](_0x1258e3/SERVER_CHECK_INTERVAL);return checkServerRunning(_0x192958,_0x4cf94b,_0x5bf00e);}function openBrowser(_0x2e55af){const _0x4517fb=a0_0x3b0e8a;let _0x18065a,_0x8b313;if(process[_0x4517fb(0x21f)]==='darwin')_0x18065a=_0x4517fb(0x219),_0x8b313=[_0x2e55af];else process[_0x4517fb(0x21f)]==='win32'?(_0x18065a=_0x4517fb(0x1f2),_0x8b313=['/c',_0x4517fb(0x1ee),'\x22\x22',_0x2e55af]):(_0x18065a=_0x4517fb(0x20b),_0x8b313=[_0x2e55af]);const _0x89e8b5=spawn(_0x18065a,_0x8b313,{'detached':!![],'stdio':_0x4517fb(0x22b)});_0x89e8b5[_0x4517fb(0x217)](),_0x89e8b5['on'](_0x4517fb(0x214),()=>{const _0x4ea048=_0x4517fb;console[_0x4ea048(0x1ef)]('Could\x20not\x20open\x20browser\x20automatically.'),console[_0x4ea048(0x1ef)](_0x4ea048(0x221)+_0x2e55af);});}function startServer(_0x55ad46=![]){const _0x7002a2=a0_0x3b0e8a,_0x3005ba={...process[_0x7002a2(0x22d)],'LOXIA_PORT':port[_0x7002a2(0x205)](),'PORT':port[_0x7002a2(0x205)]()};flags['host']&&(_0x3005ba[_0x7002a2(0x218)]=flags[_0x7002a2(0x210)]);const _0x47407d=join(__dirname,'..',_0x7002a2(0x21c),'index.js'),_0x43ceb3=spawn(_0x7002a2(0x21d),[_0x47407d],{'cwd':join(__dirname,'..'),'env':_0x3005ba,'stdio':_0x55ad46?[_0x7002a2(0x22b),_0x7002a2(0x22b),_0x7002a2(0x22b)]:_0x7002a2(0x20e),'detached':_0x55ad46});return _0x55ad46&&_0x43ceb3['unref'](),_0x43ceb3;}function startTerminalUI(){const _0xdc8355=a0_0x3b0e8a,_0x327750=join(__dirname,_0xdc8355(0x226)),_0x11a7bd={...process[_0xdc8355(0x22d)],'LOXIA_PORT':port[_0xdc8355(0x205)](),'LOXIA_HOST':host},_0x39ca3b=spawn('node',[_0x327750],{'cwd':join(__dirname,'..'),'env':_0x11a7bd,'stdio':_0xdc8355(0x20e)});return _0x39ca3b;}const commands={'web':async()=>{const _0x5f01e2=a0_0x3b0e8a;console[_0x5f01e2(0x1ef)](_0x5f01e2(0x1f9));const _0x455f46=startServer(![]);console[_0x5f01e2(0x1ef)]('Waiting\x20for\x20server\x20to\x20start...');const _0x1515df=await waitForServer(host,port);_0x1515df?(console['log'](_0x5f01e2(0x234)+serverUrl),openBrowser(serverUrl)):console[_0x5f01e2(0x1ef)]('\x0aServer\x20may\x20still\x20be\x20starting.\x20Open\x20'+serverUrl+_0x5f01e2(0x211)),process['on'](_0x5f01e2(0x216),()=>_0x455f46['kill'](_0x5f01e2(0x216))),process['on'](_0x5f01e2(0x220),()=>_0x455f46['kill'](_0x5f01e2(0x220))),_0x455f46['on'](_0x5f01e2(0x1f3),_0x20d41b=>process[_0x5f01e2(0x1f3)](_0x20d41b||0x0));},'plus-web':async()=>{const _0x1a7305=a0_0x3b0e8a;await commands[_0x1a7305(0x22e)]();},'terminal':async()=>{const _0xc8f3d4=a0_0x3b0e8a;console['log'](_0xc8f3d4(0x208));const _0x2d437f=await checkServerRunning(host,port);!_0x2d437f&&(console['error'](_0xc8f3d4(0x1f5)+serverUrl),console[_0xc8f3d4(0x214)](_0xc8f3d4(0x206)),console[_0xc8f3d4(0x214)](_0xc8f3d4(0x1f8)),console[_0xc8f3d4(0x214)](_0xc8f3d4(0x229)),process['exit'](0x1));console['log'](_0xc8f3d4(0x21b)+serverUrl),console[_0xc8f3d4(0x1ef)](_0xc8f3d4(0x202));const _0x5c0e46=startTerminalUI();process['on'](_0xc8f3d4(0x216),()=>_0x5c0e46[_0xc8f3d4(0x212)](_0xc8f3d4(0x216))),process['on']('SIGTERM',()=>_0x5c0e46[_0xc8f3d4(0x212)]('SIGTERM')),_0x5c0e46['on'](_0xc8f3d4(0x1f3),_0x8c5ce7=>process[_0xc8f3d4(0x1f3)](_0x8c5ce7||0x0));},'plus-terminal':async()=>{const _0x2a9bec=a0_0x3b0e8a;console[_0x2a9bec(0x1ef)](_0x2a9bec(0x203));const _0x2a40c8=startServer(!![]),_0x13f5dd=await waitForServer(host,port);!_0x13f5dd&&(console['error'](_0x2a9bec(0x20d)),process[_0x2a9bec(0x1f3)](0x1));console[_0x2a9bec(0x1ef)](_0x2a9bec(0x1f0)+serverUrl),console[_0x2a9bec(0x1ef)]('Starting\x20Terminal\x20UI...\x0a');const _0x40ab42=startTerminalUI();_0x40ab42['on']('exit',_0x4d1e5d=>{const _0x5d79df=_0x2a9bec;console['log']('\x0aShutting\x20down\x20server...');try{process[_0x5d79df(0x212)](_0x2a40c8[_0x5d79df(0x215)],_0x5d79df(0x220));}catch(_0x17780e){}process[_0x5d79df(0x1f3)](_0x4d1e5d||0x0);}),process['on']('SIGINT',()=>{const _0x2cb1dc=_0x2a9bec;_0x40ab42[_0x2cb1dc(0x212)]('SIGINT');}),process['on'](_0x2a9bec(0x220),()=>{const _0x332304=_0x2a9bec;_0x40ab42[_0x332304(0x212)]('SIGTERM');});}};commands[command]?commands[command]()[a0_0x3b0e8a(0x233)](_0x3b96f6=>{const _0x501b9d=a0_0x3b0e8a;console[_0x501b9d(0x214)](_0x501b9d(0x21a),_0x3b96f6['message']),process[_0x501b9d(0x1f3)](0x1);}):(console[a0_0x3b0e8a(0x214)](a0_0x3b0e8a(0x227)+command),console[a0_0x3b0e8a(0x214)](a0_0x3b0e8a(0x22a)),process[a0_0x3b0e8a(0x1f3)](0x1));
3
+ const a0_0x210c35=a0_0x40cb;(function(_0x3cc8a6,_0x25aab9){const _0x3aa1fb=a0_0x40cb,_0x13a935=_0x3cc8a6();while(!![]){try{const _0x9b283b=-parseInt(_0x3aa1fb(0x18d))/0x1*(parseInt(_0x3aa1fb(0x186))/0x2)+-parseInt(_0x3aa1fb(0x182))/0x3*(parseInt(_0x3aa1fb(0x18f))/0x4)+parseInt(_0x3aa1fb(0x1a3))/0x5*(parseInt(_0x3aa1fb(0x17e))/0x6)+parseInt(_0x3aa1fb(0x1ad))/0x7*(-parseInt(_0x3aa1fb(0x187))/0x8)+parseInt(_0x3aa1fb(0x17f))/0x9+-parseInt(_0x3aa1fb(0x192))/0xa+-parseInt(_0x3aa1fb(0x179))/0xb*(-parseInt(_0x3aa1fb(0x19a))/0xc);if(_0x9b283b===_0x25aab9)break;else _0x13a935['push'](_0x13a935['shift']());}catch(_0x3d723f){_0x13a935['push'](_0x13a935['shift']());}}}(a0_0x57ec,0x88856));import{fileURLToPath}from'url';import{dirname,join}from'path';import{spawn}from'child_process';import{readFileSync}from'fs';function a0_0x57ec(){const _0x267065=['http://','ignore','startsWith','pid','SIGINT','help','parse','35GaDaGY','env','statusCode','\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI','port','\x0aServer\x20is\x20not\x20running\x20at\x20','\x0aPlease\x20start\x20the\x20server\x20first:','toString','win32','setTimeout','3124231TNtecX','version','includes','\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a','\x0aShutting\x20down\x20server...','1596aujplf','3157326SsgGDA','Starting\x20Loxia\x20server...\x0a','\x20manually.','12pRgruV','xdg-open','utf8','src','10YvLNid','887584UXOrTd','darwin','\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','node','Starting\x20Loxia\x20server\x20in\x20background...','\x0aOpening\x20Web\x20UI\x20at\x20','96226mfvIeV','kill','990352ASRznl','host','exit','6983810xNGqGw','index.js','unref','Server\x20is\x20running\x20at\x20','web','error','log','\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.','84mGBHVm','SIGTERM','package.json','Loxia\x20Autopilot\x20One\x20v','\x0aLoxia\x20Autopilot\x20One\x20v','--help','catch','slice','Please\x20open\x20manually:\x20','17760MbXUEC','Starting\x20Terminal\x20UI...\x0a','--version'];a0_0x57ec=function(){return _0x267065;};return a0_0x57ec();}import a0_0x302ac4 from'http';function a0_0x40cb(_0x465f7f,_0x2870bb){_0x465f7f=_0x465f7f-0x171;const _0x57ec74=a0_0x57ec();let _0x40cb65=_0x57ec74[_0x465f7f];return _0x40cb65;}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST='localhost',SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process['argv'][a0_0x210c35(0x1a1)](0x2),command=args[0x0]&&!args[0x0][a0_0x210c35(0x1a8)]('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args[a0_0x210c35(0x17b)](a0_0x210c35(0x19f))||args[a0_0x210c35(0x17b)]('-h'),'version':args['includes'](a0_0x210c35(0x1a5))||args[a0_0x210c35(0x17b)]('-v')};for(let i=0x0;i<args['length'];i++){args[i]==='--port'&&args[i+0x1]&&(flags[a0_0x210c35(0x173)]=parseInt(args[i+0x1],0xa)),args[i]==='--host'&&args[i+0x1]&&(flags[a0_0x210c35(0x190)]=args[i+0x1]);}const port=flags['port']||DEFAULT_PORT,host=flags[a0_0x210c35(0x190)]||DEFAULT_HOST,serverUrl='http://'+host+':'+port;if(flags[a0_0x210c35(0x17a)]){const pkgPath=join(__dirname,'..','package.json'),pkg=JSON[a0_0x210c35(0x1ac)](readFileSync(pkgPath,a0_0x210c35(0x184)));console['log'](a0_0x210c35(0x19d)+pkg[a0_0x210c35(0x17a)]),process[a0_0x210c35(0x191)](0x0);}if(flags[a0_0x210c35(0x1ab)]||!command){const pkgPath=join(__dirname,'..',a0_0x210c35(0x19c)),pkg=JSON['parse'](readFileSync(pkgPath,a0_0x210c35(0x184)));console[a0_0x210c35(0x198)](a0_0x210c35(0x19e)+pkg['version']+a0_0x210c35(0x189)+DEFAULT_PORT+')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20'+DEFAULT_HOST+')\x0a\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x20message\x0a\x20\x20-v,\x20--version\x20\x20\x20\x20\x20Show\x20version\x20number\x0a\x0aExamples:\x0a\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20open\x20browser\x0a\x20\x20loxia\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_0x210c35(0x191)](0x0);}async function checkServerRunning(_0x48ffcb,_0x8105e7,_0x2163a6=0x1){for(let _0x2d0ffc=0x0;_0x2d0ffc<_0x2163a6;_0x2d0ffc++){const _0x398f5f=await new Promise(_0x42295f=>{const _0x30ed84=a0_0x40cb,_0x1d4497=a0_0x302ac4['get'](_0x30ed84(0x1a6)+_0x48ffcb+':'+_0x8105e7+'/api/health',_0x577a4b=>{const _0x5b3590=_0x30ed84;_0x42295f(_0x577a4b[_0x5b3590(0x171)]===0xc8);});_0x1d4497['on'](_0x30ed84(0x197),()=>_0x42295f(![])),_0x1d4497[_0x30ed84(0x178)](0x7d0,()=>{_0x1d4497['destroy'](),_0x42295f(![]);});});if(_0x398f5f)return!![];_0x2d0ffc<_0x2163a6-0x1&&await new Promise(_0x1e8958=>setTimeout(_0x1e8958,SERVER_CHECK_INTERVAL));}return![];}async function waitForServer(_0x4bab3e,_0x5847ef,_0x234e9a=SERVER_STARTUP_TIMEOUT){const _0x990d9b=Math['ceil'](_0x234e9a/SERVER_CHECK_INTERVAL);return checkServerRunning(_0x4bab3e,_0x5847ef,_0x990d9b);}function openBrowser(_0x4f6f23){const _0x3b1989=a0_0x210c35;let _0xa2d0c6,_0x36130c;if(process['platform']===_0x3b1989(0x188))_0xa2d0c6='open',_0x36130c=[_0x4f6f23];else process['platform']===_0x3b1989(0x177)?(_0xa2d0c6='cmd',_0x36130c=['/c','start','\x22\x22',_0x4f6f23]):(_0xa2d0c6=_0x3b1989(0x183),_0x36130c=[_0x4f6f23]);const _0x3f9f65=spawn(_0xa2d0c6,_0x36130c,{'detached':!![],'stdio':_0x3b1989(0x1a7)});_0x3f9f65[_0x3b1989(0x194)](),_0x3f9f65['on'](_0x3b1989(0x197),()=>{const _0x132af3=_0x3b1989;console[_0x132af3(0x198)]('Could\x20not\x20open\x20browser\x20automatically.'),console[_0x132af3(0x198)](_0x132af3(0x1a2)+_0x4f6f23);});}function startServer(_0x2becb8=![]){const _0x5bc8dd=a0_0x210c35,_0x14c652={...process[_0x5bc8dd(0x1ae)],'LOXIA_PORT':port[_0x5bc8dd(0x176)](),'PORT':port['toString']()};flags[_0x5bc8dd(0x190)]&&(_0x14c652['LOXIA_HOST']=flags[_0x5bc8dd(0x190)]);const _0x1b80b4=join(__dirname,'..',_0x5bc8dd(0x185),_0x5bc8dd(0x193)),_0x22aed2=spawn(_0x5bc8dd(0x18a),[_0x1b80b4],{'cwd':join(__dirname,'..'),'env':_0x14c652,'stdio':_0x2becb8?[_0x5bc8dd(0x1a7),_0x5bc8dd(0x1a7),_0x5bc8dd(0x1a7)]:'inherit','detached':_0x2becb8});return _0x2becb8&&_0x22aed2[_0x5bc8dd(0x194)](),_0x22aed2;}function startTerminalUI(){const _0x184959=a0_0x210c35,_0x277ec9=join(__dirname,'loxia-terminal.js'),_0x28e4cc={...process['env'],'LOXIA_PORT':port[_0x184959(0x176)](),'LOXIA_HOST':host},_0xb4fe4b=spawn('node',[_0x277ec9],{'cwd':join(__dirname,'..'),'env':_0x28e4cc,'stdio':'inherit'});return _0xb4fe4b;}const commands={'web':async()=>{const _0x5a41b6=a0_0x210c35;console['log'](_0x5a41b6(0x180));const _0x2563cf=startServer(![]);console[_0x5a41b6(0x198)]('Waiting\x20for\x20server\x20to\x20start...');const _0x14f455=await waitForServer(host,port);_0x14f455?(console[_0x5a41b6(0x198)](_0x5a41b6(0x18c)+serverUrl),openBrowser(serverUrl)):console['log']('\x0aServer\x20may\x20still\x20be\x20starting.\x20Open\x20'+serverUrl+_0x5a41b6(0x181)),process['on']('SIGINT',()=>_0x2563cf[_0x5a41b6(0x18e)]('SIGINT')),process['on'](_0x5a41b6(0x19b),()=>_0x2563cf['kill']('SIGTERM')),_0x2563cf['on'](_0x5a41b6(0x191),_0x3b2dba=>process[_0x5a41b6(0x191)](_0x3b2dba||0x0));},'plus-web':async()=>{const _0x2af484=a0_0x210c35;await commands[_0x2af484(0x196)]();},'terminal':async()=>{const _0x5280f1=a0_0x210c35;console['log']('Checking\x20if\x20server\x20is\x20running...');const _0x2ac358=await checkServerRunning(host,port);!_0x2ac358&&(console['error'](_0x5280f1(0x174)+serverUrl),console[_0x5280f1(0x197)](_0x5280f1(0x175)),console[_0x5280f1(0x197)](_0x5280f1(0x172)),console[_0x5280f1(0x197)](_0x5280f1(0x17c)),process[_0x5280f1(0x191)](0x1));console[_0x5280f1(0x198)](_0x5280f1(0x195)+serverUrl),console[_0x5280f1(0x198)](_0x5280f1(0x1a4));const _0x53c88a=startTerminalUI();process['on'](_0x5280f1(0x1aa),()=>_0x53c88a['kill']('SIGINT')),process['on'](_0x5280f1(0x19b),()=>_0x53c88a[_0x5280f1(0x18e)](_0x5280f1(0x19b))),_0x53c88a['on']('exit',_0x263339=>process[_0x5280f1(0x191)](_0x263339||0x0));},'plus-terminal':async()=>{const _0x26f1c0=a0_0x210c35;console['log'](_0x26f1c0(0x18b));const _0x1ef33c=startServer(!![]),_0x57fae0=await waitForServer(host,port);!_0x57fae0&&(console[_0x26f1c0(0x197)](_0x26f1c0(0x199)),process[_0x26f1c0(0x191)](0x1));console[_0x26f1c0(0x198)]('Server\x20running\x20at\x20'+serverUrl),console['log']('Starting\x20Terminal\x20UI...\x0a');const _0x4778d0=startTerminalUI();_0x4778d0['on'](_0x26f1c0(0x191),_0x8ad77f=>{const _0x5b07f0=_0x26f1c0;console[_0x5b07f0(0x198)](_0x5b07f0(0x17d));try{process[_0x5b07f0(0x18e)](_0x1ef33c[_0x5b07f0(0x1a9)],_0x5b07f0(0x19b));}catch(_0x5c264f){}process[_0x5b07f0(0x191)](_0x8ad77f||0x0);}),process['on'](_0x26f1c0(0x1aa),()=>{const _0x268d88=_0x26f1c0;_0x4778d0[_0x268d88(0x18e)](_0x268d88(0x1aa));}),process['on'](_0x26f1c0(0x19b),()=>{const _0x960493=_0x26f1c0;_0x4778d0['kill'](_0x960493(0x19b));});}};commands[command]?commands[command]()[a0_0x210c35(0x1a0)](_0x460ddc=>{const _0x544ac2=a0_0x210c35;console[_0x544ac2(0x197)]('Error:',_0x460ddc['message']),process[_0x544ac2(0x191)](0x1);}):(console[a0_0x210c35(0x197)]('Unknown\x20command:\x20'+command),console[a0_0x210c35(0x197)]('Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.'),process[a0_0x210c35(0x191)](0x1));
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x39f7b2=a0_0x5559;(function(_0x4557b3,_0x57e601){const _0xd444cc=a0_0x5559,_0x24343b=_0x4557b3();while(!![]){try{const _0x4ef59d=parseInt(_0xd444cc(0xa8))/0x1*(parseInt(_0xd444cc(0xbc))/0x2)+-parseInt(_0xd444cc(0xd3))/0x3*(parseInt(_0xd444cc(0xbf))/0x4)+parseInt(_0xd444cc(0xcd))/0x5*(parseInt(_0xd444cc(0xce))/0x6)+parseInt(_0xd444cc(0xc7))/0x7+parseInt(_0xd444cc(0xb9))/0x8*(-parseInt(_0xd444cc(0xb5))/0x9)+parseInt(_0xd444cc(0xb6))/0xa+-parseInt(_0xd444cc(0xb7))/0xb*(parseInt(_0xd444cc(0xd5))/0xc);if(_0x4ef59d===_0x57e601)break;else _0x24343b['push'](_0x24343b['shift']());}catch(_0x19d2bd){_0x24343b['push'](_0x24343b['shift']());}}}(a0_0x5508,0x9a69f));import{spawn}from'child_process';function a0_0x5559(_0x24d3ac,_0x3a7356){_0x24d3ac=_0x24d3ac-0xa5;const _0x5508e8=a0_0x5508();let _0x555998=_0x5508e8[_0x24d3ac];return _0x555998;}import a0_0x3776f8 from'net';import a0_0x1ff9b3 from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=a0_0x1ff9b3['dirname'](__filename),projectRoot=a0_0x1ff9b3[a0_0x39f7b2(0xc6)](__dirname),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x39f7b2(0xc2),SERVER_STARTUP_TIMEOUT=0x2710;async function isServerRunning(_0x45420a,_0x49f348){return new Promise(_0x1b6007=>{const _0x4d5df9=a0_0x5559,_0x2ab6f6=new a0_0x3776f8[(_0x4d5df9(0xb0))]();_0x2ab6f6[_0x4d5df9(0xcf)](0x7d0),_0x2ab6f6['on']('connect',()=>{const _0x2e8ff8=_0x4d5df9;_0x2ab6f6[_0x2e8ff8(0xbd)](),_0x1b6007(!![]);}),_0x2ab6f6['on']('timeout',()=>{const _0x444512=_0x4d5df9;_0x2ab6f6[_0x444512(0xbd)](),_0x1b6007(![]);}),_0x2ab6f6['on'](_0x4d5df9(0xba),()=>{const _0x5a78f0=_0x4d5df9;_0x2ab6f6[_0x5a78f0(0xbd)](),_0x1b6007(![]);}),_0x2ab6f6[_0x4d5df9(0xb4)](_0x49f348,_0x45420a);});}function a0_0x5508(){const _0x132d1b=['exit','connect','1467fTNCgy','6733130ihHMkX','18388205XqKylX','bin/cli.js','45296vnOBUU','error','stdout','12902ipWjFd','destroy','LOXIA_HOST','8poBloB','❌\x20Failed\x20to\x20start\x20Terminal\x20UI:','✗\x20Server\x20is\x20not\x20running','localhost','💡\x20Troubleshooting:','🚀\x20Starting\x20Loxia\x20server...','--ui','dirname','5148892uGPQba','\x20\x20\x203.\x20Check\x20logs\x20for\x20more\x20details','data','argv','length','kill','50ILGKtr','461178LwEfpn','setTimeout','...','--host','Server\x20startup\x20timeout','119076uWOySf','\x20\x20Loxia\x20Autopilot\x20One\x20-\x20Terminal\x20UI','12wdBRQT','stderr','🔍\x20Checking\x20if\x20server\x20is\x20running\x20at\x20','🎨\x20Launching\x20Ink-based\x20Terminal\x20UI...','175qHnpYg','message','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','now','log','env','ignore','../src/interfaces/terminal/index.js','Socket','pipe','--port'];a0_0x5508=function(){return _0x132d1b;};return a0_0x5508();}async function startServer(_0x114d9d,_0x30a17c){const _0x19223e=a0_0x39f7b2;return console[_0x19223e(0xac)](_0x19223e(0xc4)),new Promise((_0x3a86bd,_0x386cd1)=>{const _0x37d018=_0x19223e,_0x26faca=spawn('node',[a0_0x1ff9b3['join'](projectRoot,_0x37d018(0xb8)),_0x37d018(0xc5),'web',_0x37d018(0xd1),_0x114d9d,'--port',_0x30a17c['toString']()],{'detached':![],'stdio':[_0x37d018(0xae),_0x37d018(0xb1),_0x37d018(0xb1)]});_0x26faca[_0x37d018(0xbb)]['on'](_0x37d018(0xc9),()=>{}),_0x26faca[_0x37d018(0xa5)]['on'](_0x37d018(0xc9),()=>{}),_0x26faca['on'](_0x37d018(0xba),_0x1013d2=>{const _0x5080d3=_0x37d018;console[_0x5080d3(0xba)]('Failed\x20to\x20start\x20server:',_0x1013d2[_0x5080d3(0xa9)]),_0x386cd1(_0x1013d2);});const _0x15cb48=Date[_0x37d018(0xab)](),_0xdc0118=setInterval(async()=>{const _0x236bfd=_0x37d018,_0x3d5ef4=await isServerRunning(_0x114d9d,_0x30a17c);if(_0x3d5ef4)clearInterval(_0xdc0118),console[_0x236bfd(0xac)]('✓\x20Server\x20started\x20at\x20'+_0x114d9d+':'+_0x30a17c),_0x3a86bd();else Date[_0x236bfd(0xab)]()-_0x15cb48>SERVER_STARTUP_TIMEOUT&&(clearInterval(_0xdc0118),_0x26faca[_0x236bfd(0xcc)](),_0x386cd1(new Error(_0x236bfd(0xd2))));},0x1f4);});}async function main(){const _0x35f2f3=a0_0x39f7b2;try{console[_0x35f2f3(0xac)](_0x35f2f3(0xaa)),console[_0x35f2f3(0xac)](_0x35f2f3(0xd4)),console[_0x35f2f3(0xac)]('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'),console[_0x35f2f3(0xac)]('');const _0x35acea=process[_0x35f2f3(0xca)]['slice'](0x2);let _0x4cb01e=DEFAULT_HOST,_0x4c7d12=DEFAULT_PORT;for(let _0x2e09c8=0x0;_0x2e09c8<_0x35acea[_0x35f2f3(0xcb)];_0x2e09c8++){if(_0x35acea[_0x2e09c8]===_0x35f2f3(0xd1)&&_0x35acea[_0x2e09c8+0x1])_0x4cb01e=_0x35acea[_0x2e09c8+0x1],_0x2e09c8++;else _0x35acea[_0x2e09c8]===_0x35f2f3(0xb2)&&_0x35acea[_0x2e09c8+0x1]&&(_0x4c7d12=parseInt(_0x35acea[_0x2e09c8+0x1],0xa),_0x2e09c8++);}console[_0x35f2f3(0xac)](_0x35f2f3(0xa6)+_0x4cb01e+':'+_0x4c7d12+_0x35f2f3(0xd0));const _0x3b7c82=await isServerRunning(_0x4cb01e,_0x4c7d12);!_0x3b7c82?(console[_0x35f2f3(0xac)](_0x35f2f3(0xc1)),await startServer(_0x4cb01e,_0x4c7d12)):console[_0x35f2f3(0xac)]('✓\x20Server\x20is\x20already\x20running\x20at\x20'+_0x4cb01e+':'+_0x4c7d12),console['log'](''),console['log'](_0x35f2f3(0xa7)),console[_0x35f2f3(0xac)](''),await new Promise(_0x20349e=>setTimeout(_0x20349e,0x1f4)),process[_0x35f2f3(0xad)][_0x35f2f3(0xbe)]=_0x4cb01e,process['env']['LOXIA_PORT']=_0x4c7d12['toString'](),await import(_0x35f2f3(0xaf));}catch(_0x2e1bfe){console[_0x35f2f3(0xba)](''),console['error'](_0x35f2f3(0xc0)),console[_0x35f2f3(0xba)]('\x20\x20',_0x2e1bfe['message']),console[_0x35f2f3(0xba)](''),console['error'](_0x35f2f3(0xc3)),console[_0x35f2f3(0xba)]('\x20\x20\x201.\x20Make\x20sure\x20no\x20other\x20process\x20is\x20using\x20port\x208080'),console['error']('\x20\x20\x202.\x20Try\x20running\x20the\x20server\x20manually:\x20node\x20bin/cli.js'),console[_0x35f2f3(0xba)](_0x35f2f3(0xc8)),console[_0x35f2f3(0xba)](''),process[_0x35f2f3(0xb3)](0x1);}}main();
3
+ const a0_0x28a5e2=a0_0x1f66;(function(_0x28e867,_0x1db0f3){const _0x42113d=a0_0x1f66,_0x4fc113=_0x28e867();while(!![]){try{const _0x25cf00=-parseInt(_0x42113d(0x78))/0x1*(parseInt(_0x42113d(0x6d))/0x2)+-parseInt(_0x42113d(0x8e))/0x3*(-parseInt(_0x42113d(0x95))/0x4)+parseInt(_0x42113d(0x87))/0x5*(parseInt(_0x42113d(0x6c))/0x6)+-parseInt(_0x42113d(0x70))/0x7*(-parseInt(_0x42113d(0x81))/0x8)+parseInt(_0x42113d(0x85))/0x9+parseInt(_0x42113d(0x76))/0xa*(parseInt(_0x42113d(0x6f))/0xb)+-parseInt(_0x42113d(0x6a))/0xc;if(_0x25cf00===_0x1db0f3)break;else _0x4fc113['push'](_0x4fc113['shift']());}catch(_0x38dee0){_0x4fc113['push'](_0x4fc113['shift']());}}}(a0_0x3b23,0xa658a));import{spawn}from'child_process';function a0_0x1f66(_0x2f7cbc,_0x1de8f4){_0x2f7cbc=_0x2f7cbc-0x65;const _0x3b23b1=a0_0x3b23();let _0x1f662d=_0x3b23b1[_0x2f7cbc];return _0x1f662d;}import a0_0x31b17c from'net';import a0_0x52e10b from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=a0_0x52e10b[a0_0x28a5e2(0x7c)](__filename),projectRoot=a0_0x52e10b['dirname'](__dirname),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x28a5e2(0x77),SERVER_STARTUP_TIMEOUT=0x2710;async function isServerRunning(_0x503fc8,_0x47a5a7){return new Promise(_0x147030=>{const _0x514ff1=a0_0x1f66,_0xd3de87=new a0_0x31b17c[(_0x514ff1(0x82))]();_0xd3de87[_0x514ff1(0x96)](0x7d0),_0xd3de87['on'](_0x514ff1(0x93),()=>{_0xd3de87['destroy'](),_0x147030(!![]);}),_0xd3de87['on'](_0x514ff1(0x8d),()=>{const _0x279e67=_0x514ff1;_0xd3de87[_0x279e67(0x7d)](),_0x147030(![]);}),_0xd3de87['on'](_0x514ff1(0x8f),()=>{const _0xba4119=_0x514ff1;_0xd3de87[_0xba4119(0x7d)](),_0x147030(![]);}),_0xd3de87[_0x514ff1(0x93)](_0x47a5a7,_0x503fc8);});}function a0_0x3b23(){const _0x11dafc=['🎨\x20Launching\x20Ink-based\x20Terminal\x20UI...','--ui','data','message','\x20\x20\x201.\x20Make\x20sure\x20no\x20other\x20process\x20is\x20using\x20port\x208080','kill','✓\x20Server\x20is\x20already\x20running\x20at\x20','21468684qpzFQR','toString','17814DJvLQa','22rcidlj','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','2794OpMWUV','7LhvKKN','💡\x20Troubleshooting:','...','❌\x20Failed\x20to\x20start\x20Terminal\x20UI:','✗\x20Server\x20is\x20not\x20running','now','48560cGiySR','localhost','61908ZyFXHN','exit','join','✓\x20Server\x20started\x20at\x20','dirname','destroy','--port','🚀\x20Starting\x20Loxia\x20server...','argv','3665152vYwogd','Socket','Failed\x20to\x20start\x20server:','../src/interfaces/terminal/index.js','1496457Vvmxkt','env','20swYssR','ignore','🔍\x20Checking\x20if\x20server\x20is\x20running\x20at\x20','log','\x20\x20Loxia\x20Autopilot\x20One\x20-\x20Terminal\x20UI','stderr','timeout','6KkTHGo','error','pipe','\x20\x20\x203.\x20Check\x20logs\x20for\x20more\x20details','stdout','connect','LOXIA_HOST','2563364yPpByb','setTimeout','--host'];a0_0x3b23=function(){return _0x11dafc;};return a0_0x3b23();}async function startServer(_0x15b407,_0x510a84){const _0x57088b=a0_0x28a5e2;return console['log'](_0x57088b(0x7f)),new Promise((_0x342984,_0xeaaa6a)=>{const _0x231cfe=_0x57088b,_0x366788=spawn('node',[a0_0x52e10b[_0x231cfe(0x7a)](projectRoot,'bin/cli.js'),_0x231cfe(0x99),'web',_0x231cfe(0x97),_0x15b407,_0x231cfe(0x7e),_0x510a84[_0x231cfe(0x6b)]()],{'detached':![],'stdio':[_0x231cfe(0x88),'pipe',_0x231cfe(0x90)]});_0x366788[_0x231cfe(0x92)]['on'](_0x231cfe(0x65),()=>{}),_0x366788[_0x231cfe(0x8c)]['on'](_0x231cfe(0x65),()=>{}),_0x366788['on'](_0x231cfe(0x8f),_0x3e17df=>{const _0x20acb3=_0x231cfe;console['error'](_0x20acb3(0x83),_0x3e17df['message']),_0xeaaa6a(_0x3e17df);});const _0x1d5466=Date[_0x231cfe(0x75)](),_0x19eacf=setInterval(async()=>{const _0xf11808=_0x231cfe,_0x24a474=await isServerRunning(_0x15b407,_0x510a84);if(_0x24a474)clearInterval(_0x19eacf),console[_0xf11808(0x8a)](_0xf11808(0x7b)+_0x15b407+':'+_0x510a84),_0x342984();else Date[_0xf11808(0x75)]()-_0x1d5466>SERVER_STARTUP_TIMEOUT&&(clearInterval(_0x19eacf),_0x366788[_0xf11808(0x68)](),_0xeaaa6a(new Error('Server\x20startup\x20timeout')));},0x1f4);});}async function main(){const _0x2297fd=a0_0x28a5e2;try{console[_0x2297fd(0x8a)](_0x2297fd(0x6e)),console[_0x2297fd(0x8a)](_0x2297fd(0x8b)),console[_0x2297fd(0x8a)]('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'),console[_0x2297fd(0x8a)]('');const _0x58db81=process[_0x2297fd(0x80)]['slice'](0x2);let _0x348c8d=DEFAULT_HOST,_0x55566b=DEFAULT_PORT;for(let _0x203a4c=0x0;_0x203a4c<_0x58db81['length'];_0x203a4c++){if(_0x58db81[_0x203a4c]===_0x2297fd(0x97)&&_0x58db81[_0x203a4c+0x1])_0x348c8d=_0x58db81[_0x203a4c+0x1],_0x203a4c++;else _0x58db81[_0x203a4c]===_0x2297fd(0x7e)&&_0x58db81[_0x203a4c+0x1]&&(_0x55566b=parseInt(_0x58db81[_0x203a4c+0x1],0xa),_0x203a4c++);}console[_0x2297fd(0x8a)](_0x2297fd(0x89)+_0x348c8d+':'+_0x55566b+_0x2297fd(0x72));const _0x453d5d=await isServerRunning(_0x348c8d,_0x55566b);!_0x453d5d?(console[_0x2297fd(0x8a)](_0x2297fd(0x74)),await startServer(_0x348c8d,_0x55566b)):console['log'](_0x2297fd(0x69)+_0x348c8d+':'+_0x55566b),console[_0x2297fd(0x8a)](''),console[_0x2297fd(0x8a)](_0x2297fd(0x98)),console[_0x2297fd(0x8a)](''),await new Promise(_0x584f40=>setTimeout(_0x584f40,0x1f4)),process[_0x2297fd(0x86)][_0x2297fd(0x94)]=_0x348c8d,process[_0x2297fd(0x86)]['LOXIA_PORT']=_0x55566b['toString'](),await import(_0x2297fd(0x84));}catch(_0x34b0a6){console[_0x2297fd(0x8f)](''),console['error'](_0x2297fd(0x73)),console['error']('\x20\x20',_0x34b0a6[_0x2297fd(0x66)]),console['error'](''),console[_0x2297fd(0x8f)](_0x2297fd(0x71)),console[_0x2297fd(0x8f)](_0x2297fd(0x67)),console['error']('\x20\x20\x202.\x20Try\x20running\x20the\x20server\x20manually:\x20node\x20bin/cli.js'),console['error'](_0x2297fd(0x91)),console['error'](''),process[_0x2297fd(0x79)](0x1);}}main();
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x20b6cb=a0_0x3bd3;function a0_0x3bd3(_0x4979b7,_0x43bc31){_0x4979b7=_0x4979b7-0x119;const _0x55a8f6=a0_0x55a8();let _0x3bd346=_0x55a8f6[_0x4979b7];return _0x3bd346;}(function(_0x594d20,_0x3b4fd7){const _0x47aff9=a0_0x3bd3,_0x43f8b8=_0x594d20();while(!![]){try{const _0x503a38=-parseInt(_0x47aff9(0x12f))/0x1+parseInt(_0x47aff9(0x133))/0x2*(-parseInt(_0x47aff9(0x126))/0x3)+parseInt(_0x47aff9(0x137))/0x4+-parseInt(_0x47aff9(0x13c))/0x5+-parseInt(_0x47aff9(0x136))/0x6*(-parseInt(_0x47aff9(0x138))/0x7)+parseInt(_0x47aff9(0x125))/0x8+-parseInt(_0x47aff9(0x139))/0x9;if(_0x503a38===_0x3b4fd7)break;else _0x43f8b8['push'](_0x43f8b8['shift']());}catch(_0x13b8c0){_0x43f8b8['push'](_0x43f8b8['shift']());}}}(a0_0x55a8,0xc9250));function a0_0x55a8(){const _0x51ce21=['\x20\x20-\x20Background\x20processes\x20(e.g.,\x20&\x20at\x20the\x20end)','env','\x0aTerminal\x20UI\x20error:','146sXVatF','then','\x20\x20-\x20Redirected\x20output\x20(e.g.,\x20>\x20file.txt,\x202>&1\x20|\x20...)','9869658LlBrsK','4961412nudHzr','7YZindu','10657611zHVIOZ','LOXIA_HOST','\x20\x20-\x20Piped\x20environments\x20(e.g.,\x20|\x20head,\x20|\x20grep)','5975395ORlOvV','error','--port','slice','\x20\x20-\x20Some\x20CI/CD\x20environments','\x20\x20npm\x20start','log','Or\x20use\x20the\x20web\x20UI\x20instead:','Starting\x20Loxia\x20Terminal\x20UI...','argv','port','--host','catch','\x20\x20npm\x20run\x20terminal-ui','7205616SHXbIm','8274AFktWV','ERROR:\x20Terminal\x20UI\x20requires\x20an\x20interactive\x20terminal\x20(TTY).','Connecting\x20to:\x20','\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','Press\x20Ctrl+C\x20to\x20exit\x0a','LOXIA_PORT','Please\x20run\x20this\x20command\x20in\x20a\x20real\x20terminal\x20without\x20pipes\x20or\x20redirection:','exit','host','381518HWzleZ'];a0_0x55a8=function(){return _0x51ce21;};return a0_0x55a8();}import{startTerminalUI}from'../src/interfaces/terminal/index.js';const args=process[a0_0x20b6cb(0x120)][a0_0x20b6cb(0x11a)](0x2),options={'host':'localhost','port':0x1f90};for(let i=0x0;i<args['length'];i++){const arg=args[i];if(arg===a0_0x20b6cb(0x122)||arg==='-h')options['host']=args[++i];else{if(arg===a0_0x20b6cb(0x119)||arg==='-p')options[a0_0x20b6cb(0x121)]=parseInt(args[++i],0xa);else arg==='--help'&&(console['log'](a0_0x20b6cb(0x129)),process[a0_0x20b6cb(0x12d)](0x0));}}process['env'][a0_0x20b6cb(0x13a)]&&(options[a0_0x20b6cb(0x12e)]=process[a0_0x20b6cb(0x131)]['LOXIA_HOST']);process['env'][a0_0x20b6cb(0x12b)]&&(options[a0_0x20b6cb(0x121)]=parseInt(process[a0_0x20b6cb(0x131)][a0_0x20b6cb(0x12b)],0xa));!process['stdin']['isTTY']&&(console['error'](a0_0x20b6cb(0x127)),console[a0_0x20b6cb(0x13d)](''),console[a0_0x20b6cb(0x13d)]('The\x20terminal\x20UI\x20cannot\x20run\x20in:'),console[a0_0x20b6cb(0x13d)](a0_0x20b6cb(0x13b)),console[a0_0x20b6cb(0x13d)](a0_0x20b6cb(0x135)),console['error'](a0_0x20b6cb(0x130)),console[a0_0x20b6cb(0x13d)](a0_0x20b6cb(0x11b)),console[a0_0x20b6cb(0x13d)](''),console['error'](a0_0x20b6cb(0x12c)),console[a0_0x20b6cb(0x13d)](a0_0x20b6cb(0x124)),console[a0_0x20b6cb(0x13d)](''),console[a0_0x20b6cb(0x13d)](a0_0x20b6cb(0x11e)),console[a0_0x20b6cb(0x13d)](a0_0x20b6cb(0x11c)),process[a0_0x20b6cb(0x12d)](0x1));console[a0_0x20b6cb(0x11d)](a0_0x20b6cb(0x11f)),console['log'](a0_0x20b6cb(0x128)+options[a0_0x20b6cb(0x12e)]+':'+options[a0_0x20b6cb(0x121)]),console['log'](a0_0x20b6cb(0x12a));const instance=startTerminalUI(options);instance['waitUntilExit']()[a0_0x20b6cb(0x134)](()=>{const _0x559d28=a0_0x20b6cb;console[_0x559d28(0x11d)]('\x0aTerminal\x20UI\x20exited'),process[_0x559d28(0x12d)](0x0);})[a0_0x20b6cb(0x123)](_0x597131=>{const _0x311b82=a0_0x20b6cb;console[_0x311b82(0x13d)](_0x311b82(0x132),_0x597131),process[_0x311b82(0x12d)](0x1);});
3
+ const a0_0xbbffa0=a0_0x5795;(function(_0x1922b7,_0x1f7ee7){const _0x5430b6=a0_0x5795,_0x365a9b=_0x1922b7();while(!![]){try{const _0x1a1e8a=-parseInt(_0x5430b6(0x138))/0x1*(parseInt(_0x5430b6(0x13c))/0x2)+parseInt(_0x5430b6(0x124))/0x3+-parseInt(_0x5430b6(0x12b))/0x4*(-parseInt(_0x5430b6(0x137))/0x5)+-parseInt(_0x5430b6(0x122))/0x6+parseInt(_0x5430b6(0x134))/0x7+parseInt(_0x5430b6(0x11a))/0x8*(-parseInt(_0x5430b6(0x128))/0x9)+parseInt(_0x5430b6(0x11f))/0xa;if(_0x1a1e8a===_0x1f7ee7)break;else _0x365a9b['push'](_0x365a9b['shift']());}catch(_0x11a23b){_0x365a9b['push'](_0x365a9b['shift']());}}}(a0_0x522f,0x3dedf));function a0_0x5795(_0x19ef93,_0x2403aa){_0x19ef93=_0x19ef93-0x117;const _0x522f33=a0_0x522f();let _0x5795df=_0x522f33[_0x19ef93];return _0x5795df;}import{startTerminalUI}from'../src/interfaces/terminal/index.js';const args=process[a0_0xbbffa0(0x12c)][a0_0xbbffa0(0x129)](0x2),options={'host':'localhost','port':0x1f90};for(let i=0x0;i<args[a0_0xbbffa0(0x13e)];i++){const arg=args[i];if(arg===a0_0xbbffa0(0x118)||arg==='-h')options[a0_0xbbffa0(0x136)]=args[++i];else{if(arg===a0_0xbbffa0(0x11b)||arg==='-p')options[a0_0xbbffa0(0x11c)]=parseInt(args[++i],0xa);else arg===a0_0xbbffa0(0x132)&&(console[a0_0xbbffa0(0x133)](a0_0xbbffa0(0x13d)),process[a0_0xbbffa0(0x119)](0x0));}}process[a0_0xbbffa0(0x13f)]['LOXIA_HOST']&&(options[a0_0xbbffa0(0x136)]=process[a0_0xbbffa0(0x13f)]['LOXIA_HOST']);process['env'][a0_0xbbffa0(0x120)]&&(options['port']=parseInt(process[a0_0xbbffa0(0x13f)][a0_0xbbffa0(0x120)],0xa));!process['stdin'][a0_0xbbffa0(0x123)]&&(console[a0_0xbbffa0(0x13a)](a0_0xbbffa0(0x12d)),console[a0_0xbbffa0(0x13a)](''),console[a0_0xbbffa0(0x13a)](a0_0xbbffa0(0x12a)),console[a0_0xbbffa0(0x13a)]('\x20\x20-\x20Piped\x20environments\x20(e.g.,\x20|\x20head,\x20|\x20grep)'),console[a0_0xbbffa0(0x13a)](a0_0xbbffa0(0x12f)),console[a0_0xbbffa0(0x13a)](a0_0xbbffa0(0x125)),console[a0_0xbbffa0(0x13a)](a0_0xbbffa0(0x126)),console['error'](''),console['error'](a0_0xbbffa0(0x121)),console['error'](a0_0xbbffa0(0x135)),console[a0_0xbbffa0(0x13a)](''),console[a0_0xbbffa0(0x13a)](a0_0xbbffa0(0x13b)),console[a0_0xbbffa0(0x13a)](a0_0xbbffa0(0x127)),process['exit'](0x1));console['log'](a0_0xbbffa0(0x117)),console[a0_0xbbffa0(0x133)](a0_0xbbffa0(0x12e)+options['host']+':'+options['port']),console[a0_0xbbffa0(0x133)](a0_0xbbffa0(0x139));function a0_0x522f(){const _0x41ac2b=['ERROR:\x20Terminal\x20UI\x20requires\x20an\x20interactive\x20terminal\x20(TTY).','Connecting\x20to:\x20','\x20\x20-\x20Redirected\x20output\x20(e.g.,\x20>\x20file.txt,\x202>&1\x20|\x20...)','\x0aTerminal\x20UI\x20error:','catch','--help','log','1362613wGAktV','\x20\x20npm\x20run\x20terminal-ui','host','160jVvaDM','95181ZoGYiq','Press\x20Ctrl+C\x20to\x20exit\x0a','error','Or\x20use\x20the\x20web\x20UI\x20instead:','2ROyHpX','\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','length','env','Starting\x20Loxia\x20Terminal\x20UI...','--host','exit','591112PWIodx','--port','port','waitUntilExit','then','701660fMbFBV','LOXIA_PORT','Please\x20run\x20this\x20command\x20in\x20a\x20real\x20terminal\x20without\x20pipes\x20or\x20redirection:','2869596WwaSMV','isTTY','1149834deJzVd','\x20\x20-\x20Background\x20processes\x20(e.g.,\x20&\x20at\x20the\x20end)','\x20\x20-\x20Some\x20CI/CD\x20environments','\x20\x20npm\x20start','9ExHjlt','slice','The\x20terminal\x20UI\x20cannot\x20run\x20in:','31612mIUygT','argv'];a0_0x522f=function(){return _0x41ac2b;};return a0_0x522f();}const instance=startTerminalUI(options);instance[a0_0xbbffa0(0x11d)]()[a0_0xbbffa0(0x11e)](()=>{const _0x13a9b4=a0_0xbbffa0;console['log']('\x0aTerminal\x20UI\x20exited'),process[_0x13a9b4(0x119)](0x0);})[a0_0xbbffa0(0x131)](_0x120b10=>{const _0x13ebd4=a0_0xbbffa0;console[_0x13ebd4(0x13a)](_0x13ebd4(0x130),_0x120b10),process[_0x13ebd4(0x119)](0x1);});
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x24367c=a0_0x52c6;(function(_0x57d037,_0x22e301){const _0x532eb3=a0_0x52c6,_0x442519=_0x57d037();while(!![]){try{const _0x538d4d=-parseInt(_0x532eb3(0x200))/0x1+parseInt(_0x532eb3(0x20b))/0x2+-parseInt(_0x532eb3(0x20f))/0x3*(-parseInt(_0x532eb3(0x1ec))/0x4)+-parseInt(_0x532eb3(0x1fc))/0x5*(-parseInt(_0x532eb3(0x202))/0x6)+parseInt(_0x532eb3(0x212))/0x7+parseInt(_0x532eb3(0x20d))/0x8*(-parseInt(_0x532eb3(0x1e3))/0x9)+parseInt(_0x532eb3(0x210))/0xa*(-parseInt(_0x532eb3(0x201))/0xb);if(_0x538d4d===_0x22e301)break;else _0x442519['push'](_0x442519['shift']());}catch(_0x47d4e2){_0x442519['push'](_0x442519['shift']());}}}(a0_0xc4bb,0x1e396));import{spawn}from'child_process';import{fileURLToPath}from'url';function a0_0xc4bb(){const _0x1d4438=['bin','176771GwCUGA','message','╔════════════════════════════════════════════════╗','\x0a👋\x20Terminal\x20UI\x20closed.','27TUhhIv','env','SIGKILL','\x0a⚠️\x20\x20Received\x20SIGINT,\x20shutting\x20down...','SIGINT','killed','http://localhost:','🖥️\x20\x20Starting\x20Terminal\x20UI...','Timeout','870424jAyirP','data','exit','includes','toString','node','Failed\x20to\x20start\x20server:','kill','setTimeout','trim','SIGTERM','ignore','index.js','🛑\x20Stopping\x20server...','log','\x0a⚠️\x20\x20Received\x20SIGTERM,\x20shutting\x20down...','785QXlTbg','destroy','🚀\x20Starting\x20Loxia\x20server...','Server\x20exited\x20with\x20code\x20','14272GSUkue','11TSfENg','1746QOzCLH','╚════════════════════════════════════════════════╝','statusCode','Server\x20returned\x20','inherit','Failed\x20to\x20start\x20Terminal\x20UI:','loxia-terminal.js','pipe','error','101792ECTrGK','[SERVER]\x20','151480PtkQWy','PORT','3WkfrsK','1445670yhPTgJ'];a0_0xc4bb=function(){return _0x1d4438;};return a0_0xc4bb();}import{dirname,join}from'path';import a0_0x1de044 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),rootDir=join(__dirname,'..'),SERVER_PORT=process[a0_0x24367c(0x1e4)][a0_0x24367c(0x20e)]||0x1f90,STARTUP_WAIT=0x7d0;let serverProcess=null;async function checkServerReady(_0x8cc923=0xa,_0x747745=0x1f4){const _0x53ccd1=a0_0x24367c;for(let _0x46a1c7=0x0;_0x46a1c7<_0x8cc923;_0x46a1c7++){try{return await new Promise((_0x41b717,_0x35dab7)=>{const _0xecee5d=a0_0x52c6,_0xc3acc5=a0_0x1de044['get'](_0xecee5d(0x1e9)+SERVER_PORT+'/health',_0x55c7a1=>{const _0x5ba837=_0xecee5d;_0x55c7a1['statusCode']===0xc8?_0x41b717():_0x35dab7(new Error(_0x5ba837(0x205)+_0x55c7a1[_0x5ba837(0x204)]));});_0xc3acc5['on']('error',_0x35dab7),_0xc3acc5[_0xecee5d(0x1f4)](0x3e8,()=>{const _0x13cab2=_0xecee5d;_0xc3acc5[_0x13cab2(0x1fd)](),_0x35dab7(new Error(_0x13cab2(0x1eb)));});}),console[_0x53ccd1(0x1fa)]('✅\x20Server\x20is\x20ready!'),!![];}catch(_0x199949){_0x46a1c7<_0x8cc923-0x1&&await new Promise(_0x22f7b1=>setTimeout(_0x22f7b1,_0x747745));}}return console['log']('⚠️\x20\x20Server\x20may\x20not\x20be\x20fully\x20ready,\x20but\x20continuing\x20anyway...'),![];}async function startServer(){return new Promise(_0x3b368f=>{const _0x193f26=a0_0x52c6;console[_0x193f26(0x1fa)](_0x193f26(0x1fe));const _0x10b7e2=join(rootDir,'src',_0x193f26(0x1f8));serverProcess=spawn('node',[_0x10b7e2],{'cwd':rootDir,'env':{...process['env']},'stdio':[_0x193f26(0x1f7),_0x193f26(0x209),_0x193f26(0x209)],'detached':![]}),serverProcess['stdout']['on'](_0x193f26(0x1ed),_0x32eb0e=>{const _0x4bde7b=_0x193f26,_0x2e4830=_0x32eb0e[_0x4bde7b(0x1f0)]()[_0x4bde7b(0x1f5)]();_0x2e4830&&console[_0x4bde7b(0x1fa)](_0x4bde7b(0x20c)+_0x2e4830);}),serverProcess['stderr']['on'](_0x193f26(0x1ed),_0xbb5f49=>{const _0x3ce48f=_0x193f26,_0x264e96=_0xbb5f49[_0x3ce48f(0x1f0)]()[_0x3ce48f(0x1f5)]();_0x264e96&&!_0x264e96[_0x3ce48f(0x1ef)]('ExperimentalWarning')&&console[_0x3ce48f(0x20a)]('[SERVER\x20ERROR]\x20'+_0x264e96);}),serverProcess['on'](_0x193f26(0x20a),_0x44ed38=>{const _0x250702=_0x193f26;console[_0x250702(0x20a)](_0x250702(0x1f2),_0x44ed38[_0x250702(0x213)]),process[_0x250702(0x1ee)](0x1);}),serverProcess['on'](_0x193f26(0x1ee),(_0x454273,_0x38cfcb)=>{const _0x5efb90=_0x193f26;_0x454273!==null&&_0x454273!==0x0&&(console[_0x5efb90(0x20a)](_0x5efb90(0x1ff)+_0x454273),process[_0x5efb90(0x1ee)](_0x454273));}),setTimeout(_0x3b368f,STARTUP_WAIT);});}function a0_0x52c6(_0x321a2e,_0x3d368c){_0x321a2e=_0x321a2e-0x1e2;const _0xc4bbed=a0_0xc4bb();let _0x52c6d8=_0xc4bbed[_0x321a2e];return _0x52c6d8;}async function startTerminalUI(){const _0x4aab42=a0_0x24367c;console[_0x4aab42(0x1fa)](_0x4aab42(0x1ea)),console[_0x4aab42(0x1fa)]('');const _0x4d8d56=join(rootDir,_0x4aab42(0x211),_0x4aab42(0x208)),_0x3f38dd=spawn(_0x4aab42(0x1f1),[_0x4d8d56],{'cwd':rootDir,'env':{...process[_0x4aab42(0x1e4)]},'stdio':_0x4aab42(0x206)});return _0x3f38dd['on'](_0x4aab42(0x20a),_0x2a41f4=>{const _0x11475e=_0x4aab42;console[_0x11475e(0x20a)](_0x11475e(0x207),_0x2a41f4[_0x11475e(0x213)]),cleanup(),process[_0x11475e(0x1ee)](0x1);}),_0x3f38dd['on'](_0x4aab42(0x1ee),_0x4ed810=>{const _0x476559=_0x4aab42;console[_0x476559(0x1fa)](_0x476559(0x1e2)),cleanup(),process[_0x476559(0x1ee)](_0x4ed810||0x0);}),_0x3f38dd;}function cleanup(){const _0x556234=a0_0x24367c;serverProcess&&!serverProcess[_0x556234(0x1e8)]&&(console[_0x556234(0x1fa)](_0x556234(0x1f9)),serverProcess[_0x556234(0x1f3)](_0x556234(0x1f6)),setTimeout(()=>{const _0x402298=_0x556234;!serverProcess['killed']&&serverProcess[_0x402298(0x1f3)](_0x402298(0x1e5));},0x1388));}process['on'](a0_0x24367c(0x1e7),()=>{const _0x5ecb03=a0_0x24367c;console[_0x5ecb03(0x1fa)](_0x5ecb03(0x1e6)),cleanup(),process[_0x5ecb03(0x1ee)](0x0);}),process['on']('SIGTERM',()=>{const _0x42ec5d=a0_0x24367c;console[_0x42ec5d(0x1fa)](_0x42ec5d(0x1fb)),cleanup(),process[_0x42ec5d(0x1ee)](0x0);}),process['on'](a0_0x24367c(0x1ee),()=>{cleanup();});async function main(){const _0x4dbf8a=a0_0x24367c;console[_0x4dbf8a(0x1fa)](_0x4dbf8a(0x214)),console['log']('║\x20\x20\x20Loxia\x20AI\x20Agents\x20-\x20Server\x20+\x20Terminal\x20UI\x20\x20\x20\x20\x20\x20║'),console[_0x4dbf8a(0x1fa)](_0x4dbf8a(0x203)),console[_0x4dbf8a(0x1fa)]('');try{await startServer(),await checkServerReady(),await startTerminalUI(),await new Promise(()=>{});}catch(_0x518735){console[_0x4dbf8a(0x20a)]('Error\x20during\x20startup:',_0x518735[_0x4dbf8a(0x213)]),cleanup(),process[_0x4dbf8a(0x1ee)](0x1);}}main();
3
+ const a0_0x41060c=a0_0xb534;(function(_0xed1c74,_0x3f49e5){const _0xfab5da=a0_0xb534,_0xa8d97b=_0xed1c74();while(!![]){try{const _0x30efed=parseInt(_0xfab5da(0x1be))/0x1*(-parseInt(_0xfab5da(0x1d7))/0x2)+-parseInt(_0xfab5da(0x1c0))/0x3+parseInt(_0xfab5da(0x1da))/0x4+-parseInt(_0xfab5da(0x1d0))/0x5*(parseInt(_0xfab5da(0x1bc))/0x6)+parseInt(_0xfab5da(0x1c1))/0x7+parseInt(_0xfab5da(0x1dc))/0x8*(-parseInt(_0xfab5da(0x1cd))/0x9)+-parseInt(_0xfab5da(0x1d3))/0xa*(-parseInt(_0xfab5da(0x1bd))/0xb);if(_0x30efed===_0x3f49e5)break;else _0xa8d97b['push'](_0xa8d97b['shift']());}catch(_0xa16f79){_0xa8d97b['push'](_0xa8d97b['shift']());}}}(a0_0x27bb,0xc8335));import{spawn}from'child_process';import{fileURLToPath}from'url';import{dirname,join}from'path';function a0_0xb534(_0x4f40a5,_0x5d646e){_0x4f40a5=_0x4f40a5-0x1a7;const _0x27bb12=a0_0x27bb();let _0xb53484=_0x27bb12[_0x4f40a5];return _0xb53484;}import a0_0x49cc4a from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),rootDir=join(__dirname,'..'),SERVER_PORT=process[a0_0x41060c(0x1d6)][a0_0x41060c(0x1c7)]||0x1f90,STARTUP_WAIT=0x7d0;let serverProcess=null;async function checkServerReady(_0x55fff5=0xa,_0xed8a59=0x1f4){const _0x31eea3=a0_0x41060c;for(let _0x3366bd=0x0;_0x3366bd<_0x55fff5;_0x3366bd++){try{return await new Promise((_0xe75ecd,_0x2f20f9)=>{const _0x1295a6=a0_0xb534,_0x36938b=a0_0x49cc4a['get'](_0x1295a6(0x1b8)+SERVER_PORT+_0x1295a6(0x1c6),_0x1bcc3e=>{const _0x275d8f=_0x1295a6;_0x1bcc3e['statusCode']===0xc8?_0xe75ecd():_0x2f20f9(new Error(_0x275d8f(0x1c3)+_0x1bcc3e[_0x275d8f(0x1d4)]));});_0x36938b['on'](_0x1295a6(0x1b3),_0x2f20f9),_0x36938b['setTimeout'](0x3e8,()=>{const _0xf10414=_0x1295a6;_0x36938b[_0xf10414(0x1aa)](),_0x2f20f9(new Error(_0xf10414(0x1b4)));});}),console[_0x31eea3(0x1b5)](_0x31eea3(0x1ac)),!![];}catch(_0x332a83){_0x3366bd<_0x55fff5-0x1&&await new Promise(_0x4423a1=>setTimeout(_0x4423a1,_0xed8a59));}}return console[_0x31eea3(0x1b5)](_0x31eea3(0x1db)),![];}async function startServer(){return new Promise(_0x12bb6e=>{const _0x18651d=a0_0xb534;console[_0x18651d(0x1b5)](_0x18651d(0x1c9));const _0x560427=join(rootDir,_0x18651d(0x1c8),_0x18651d(0x1c2));serverProcess=spawn(_0x18651d(0x1ad),[_0x560427],{'cwd':rootDir,'env':{...process[_0x18651d(0x1d6)]},'stdio':['ignore',_0x18651d(0x1b6),'pipe'],'detached':![]}),serverProcess[_0x18651d(0x1d5)]['on'](_0x18651d(0x1b0),_0x1ae246=>{const _0x376a61=_0x18651d,_0x2e255a=_0x1ae246[_0x376a61(0x1ba)]()[_0x376a61(0x1bb)]();_0x2e255a&&console[_0x376a61(0x1b5)](_0x376a61(0x1a9)+_0x2e255a);}),serverProcess['stderr']['on'](_0x18651d(0x1b0),_0x4befb7=>{const _0x2332c2=_0x18651d,_0x1d14e4=_0x4befb7[_0x2332c2(0x1ba)]()[_0x2332c2(0x1bb)]();_0x1d14e4&&!_0x1d14e4[_0x2332c2(0x1cf)]('ExperimentalWarning')&&console[_0x2332c2(0x1b3)](_0x2332c2(0x1b2)+_0x1d14e4);}),serverProcess['on'](_0x18651d(0x1b3),_0x28a63a=>{const _0x3e8f2e=_0x18651d;console['error'](_0x3e8f2e(0x1a7),_0x28a63a['message']),process['exit'](0x1);}),serverProcess['on'](_0x18651d(0x1d9),(_0x827a9a,_0x1fada1)=>{const _0x2aa1a3=_0x18651d;_0x827a9a!==null&&_0x827a9a!==0x0&&(console[_0x2aa1a3(0x1b3)](_0x2aa1a3(0x1ab)+_0x827a9a),process['exit'](_0x827a9a));}),setTimeout(_0x12bb6e,STARTUP_WAIT);});}async function startTerminalUI(){const _0x13ffcd=a0_0x41060c;console['log'](_0x13ffcd(0x1c4)),console['log']('');const _0x15cdee=join(rootDir,_0x13ffcd(0x1cb),_0x13ffcd(0x1d2)),_0x460978=spawn('node',[_0x15cdee],{'cwd':rootDir,'env':{...process[_0x13ffcd(0x1d6)]},'stdio':_0x13ffcd(0x1b1)});return _0x460978['on'](_0x13ffcd(0x1b3),_0x28e8ad=>{const _0x524a67=_0x13ffcd;console[_0x524a67(0x1b3)]('Failed\x20to\x20start\x20Terminal\x20UI:',_0x28e8ad[_0x524a67(0x1a8)]),cleanup(),process[_0x524a67(0x1d9)](0x1);}),_0x460978['on'](_0x13ffcd(0x1d9),_0x1ab516=>{const _0x4bc698=_0x13ffcd;console[_0x4bc698(0x1b5)](_0x4bc698(0x1d8)),cleanup(),process[_0x4bc698(0x1d9)](_0x1ab516||0x0);}),_0x460978;}function cleanup(){const _0x3467e3=a0_0x41060c;serverProcess&&!serverProcess[_0x3467e3(0x1ae)]&&(console['log'](_0x3467e3(0x1d1)),serverProcess[_0x3467e3(0x1ca)](_0x3467e3(0x1bf)),setTimeout(()=>{const _0x1b7744=_0x3467e3;!serverProcess[_0x1b7744(0x1ae)]&&serverProcess[_0x1b7744(0x1ca)](_0x1b7744(0x1b7));},0x1388));}function a0_0x27bb(){const _0xf652a7=['PORT','src','🚀\x20Starting\x20Loxia\x20server...','kill','bin','Error\x20during\x20startup:','193743ihpwxE','╚════════════════════════════════════════════════╝','includes','430IeHyVT','🛑\x20Stopping\x20server...','loxia-terminal.js','11630sdjrSJ','statusCode','stdout','env','2666758kucERm','\x0a👋\x20Terminal\x20UI\x20closed.','exit','4596956RIVGRr','⚠️\x20\x20Server\x20may\x20not\x20be\x20fully\x20ready,\x20but\x20continuing\x20anyway...','96vvTLGp','Failed\x20to\x20start\x20server:','message','[SERVER]\x20','destroy','Server\x20exited\x20with\x20code\x20','✅\x20Server\x20is\x20ready!','node','killed','SIGINT','data','inherit','[SERVER\x20ERROR]\x20','error','Timeout','log','pipe','SIGKILL','http://localhost:','╔════════════════════════════════════════════════╗','toString','trim','58494IgAZeM','18799wikXYe','1MGQKUj','SIGTERM','1028964uqdiCk','3194240xflAgb','index.js','Server\x20returned\x20','🖥️\x20\x20Starting\x20Terminal\x20UI...','\x0a⚠️\x20\x20Received\x20SIGINT,\x20shutting\x20down...','/health'];a0_0x27bb=function(){return _0xf652a7;};return a0_0x27bb();}process['on'](a0_0x41060c(0x1af),()=>{const _0x458303=a0_0x41060c;console['log'](_0x458303(0x1c5)),cleanup(),process[_0x458303(0x1d9)](0x0);}),process['on'](a0_0x41060c(0x1bf),()=>{const _0x526cfd=a0_0x41060c;console[_0x526cfd(0x1b5)]('\x0a⚠️\x20\x20Received\x20SIGTERM,\x20shutting\x20down...'),cleanup(),process[_0x526cfd(0x1d9)](0x0);}),process['on']('exit',()=>{cleanup();});async function main(){const _0x2c3292=a0_0x41060c;console[_0x2c3292(0x1b5)](_0x2c3292(0x1b9)),console[_0x2c3292(0x1b5)]('║\x20\x20\x20Loxia\x20AI\x20Agents\x20-\x20Server\x20+\x20Terminal\x20UI\x20\x20\x20\x20\x20\x20║'),console[_0x2c3292(0x1b5)](_0x2c3292(0x1ce)),console['log']('');try{await startServer(),await checkServerReady(),await startTerminalUI(),await new Promise(()=>{});}catch(_0x4a497c){console[_0x2c3292(0x1b3)](_0x2c3292(0x1cc),_0x4a497c['message']),cleanup(),process['exit'](0x1);}}main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loxia-labs/loxia-autopilot-one",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Loxia AI Agents System - No-code/vibe-code/companion-coder platform",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a0_0x51970d=a0_0x2027;(function(_0x127360,_0x920097){const _0x39359=a0_0x2027,_0x4da633=_0x127360();while(!![]){try{const _0x2b63eb=parseInt(_0x39359(0x136))/0x1*(parseInt(_0x39359(0x132))/0x2)+parseInt(_0x39359(0x131))/0x3*(-parseInt(_0x39359(0x12d))/0x4)+-parseInt(_0x39359(0x13f))/0x5+parseInt(_0x39359(0x114))/0x6+-parseInt(_0x39359(0x149))/0x7*(-parseInt(_0x39359(0xfe))/0x8)+parseInt(_0x39359(0x106))/0x9*(-parseInt(_0x39359(0x119))/0xa)+parseInt(_0x39359(0x135))/0xb;if(_0x2b63eb===_0x920097)break;else _0x4da633['push'](_0x4da633['shift']());}catch(_0x691d26){_0x4da633['push'](_0x4da633['shift']());}}}(a0_0x5e04,0x6f2c8));import{exec}from'child_process';import{promisify}from'util';import a0_0x5c59a7 from'https';import a0_0x2fe621 from'http';function a0_0x2027(_0x1a1c36,_0x319d52){_0x1a1c36=_0x1a1c36-0xfc;const _0x5e041d=a0_0x5e04();let _0x202786=_0x5e041d[_0x1a1c36];return _0x202786;}import a0_0x4ceaa8 from'fs';import a0_0x506d3b 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_0x506d3b[a0_0x51970d(0x109)](__filename),SCANNER_DIR=a0_0x506d3b[a0_0x51970d(0x12b)](__dirname,'..',a0_0x51970d(0x13b),a0_0x51970d(0x120)),SEMGREP_VERSION=a0_0x51970d(0x102);console['log'](a0_0x51970d(0x10f)),console['log'](a0_0x51970d(0x137)),console[a0_0x51970d(0x126)](a0_0x51970d(0x133)+process[a0_0x51970d(0x129)]+'\x20('+process[a0_0x51970d(0x117)]+')'),console[a0_0x51970d(0x126)](a0_0x51970d(0x143));function a0_0x5e04(){const _0x486bb5=['python','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20','\x20\x20\x20Note:\x20To\x20use\x20system-wide,\x20add\x20to\x20PATH\x20or\x20install\x20globally:','node_modules','\x20\x20\x20⚠️\x20\x20eslint-plugin-security\x20not\x20found','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20semgrep\x0a','\x20\x20\x20✅\x20','2680350Wksatg','error','url','semgrep','═══════════════════════════════════════════════════════════\x0a','\x20\x20\x20✅\x20Semgrep\x20already\x20installed:\x20','\x20\x20\x20✅\x20Python\x20found:\x20','trim','\x20-m\x20pip\x20install\x20','finish','5865531sszwli','--user','/opt/homebrew','pipe','\x0a═══════════════════════════════════════════════════════════','8WLtNYG','...','Failed\x20to\x20download:\x20HTTP\x20','exit','v1.55.0','then','\x20installed\x20successfully','\x20already\x20installed','261roEkEC','catch','statusCode','dirname','close','\x20\x20\x20Installing\x20','eslint-plugin-security','\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit','\x20\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit\x20checkov\x20yamllint\x0a','═══════════════════════════════════════════════════════════','unlink','https','semgrep\x20--version','\x20\x20\x20✅\x20eslint-plugin-security\x20is\x20installed\x0a','719592PqALZy','\x20\x20npm\x20install\x20--save-dev\x20eslint-plugin-security','headers','arch','\x20\x20\x20⚠️\x20\x20No\x20Semgrep\x20binary\x20available\x20for\x20','207770rVvwmL','\x20\x20\x20Location:\x20','bandit','\x20\x20\x20Using\x20system-installed\x20Semgrep\x0a','checkov','🐍\x20Checking\x20Python\x20scanners...','includes','.scanners','replace','\x20\x20\x20Downloading\x20from\x20','promises','location','\x20\x20Installation\x20Complete','log','mkdir','\x20\x20\x20Please\x20install\x20manually:\x20https://semgrep.dev/docs/getting-started/\x0a','platform','startsWith','join','/usr/local/Cellar','24108wKHDSm','python\x20--version','❌\x20Installation\x20failed:','\x20\x20\x20⚠️\x20\x20Python\x20not\x20found\x20-\x20skipping\x20Python\x20scanners','243RGKdby','38894qGWZsQ','\x20\x20Platform:\x20','message','11939389OAkqad','2IcaWLO','\x20\x20Installing\x20Security\x20Scanners'];a0_0x5e04=function(){return _0x486bb5;};return a0_0x5e04();}async function installScanners(){const _0xa5db6=a0_0x51970d;await a0_0x4ceaa8[_0xa5db6(0x123)][_0xa5db6(0x127)](SCANNER_DIR,{'recursive':!![]}),await checkESLintSecurity(),await installSemgrep(),await installPythonScanners(),console[_0xa5db6(0x126)](_0xa5db6(0xfd)),console[_0xa5db6(0x126)](_0xa5db6(0x125)),console[_0xa5db6(0x126)](_0xa5db6(0x143));}async function checkESLintSecurity(){const _0x9a88a6=a0_0x51970d;console[_0x9a88a6(0x126)]('📦\x20Checking\x20ESLint\x20Security\x20Plugin...');try{await import(_0x9a88a6(0x10c)),console['log'](_0x9a88a6(0x113));}catch(_0x13d70c){console[_0x9a88a6(0x126)](_0x9a88a6(0x13c)),console[_0x9a88a6(0x126)]('\x20\x20\x20Run:\x20npm\x20install\x20--save-dev\x20eslint-plugin-security\x0a');}}async function installSemgrep(){const _0x4b3ac1=a0_0x51970d;console[_0x4b3ac1(0x126)]('🔍\x20Installing\x20Semgrep...');const _0x5386fc=process[_0x4b3ac1(0x129)],_0x84936a=process[_0x4b3ac1(0x117)];try{const _0x272168=await execAsync(_0x4b3ac1(0x112),{'timeout':0x1388});console['log'](_0x4b3ac1(0x144)+_0x272168['stdout'][_0x4b3ac1(0x146)]()),console['log'](_0x4b3ac1(0x11c));return;}catch(_0x3cbaee){console[_0x4b3ac1(0x126)]('\x20\x20\x20Semgrep\x20not\x20found\x20in\x20PATH,\x20installing\x20standalone\x20binary...');}const _0x114e47=getSemgrepBinaryInfo(_0x5386fc,_0x84936a);if(!_0x114e47){console['log'](_0x4b3ac1(0x118)+_0x5386fc+'-'+_0x84936a),console[_0x4b3ac1(0x126)](_0x4b3ac1(0x128));return;}try{const _0x410a4f=a0_0x506d3b[_0x4b3ac1(0x12b)](SCANNER_DIR,_0x4b3ac1(0x142));console[_0x4b3ac1(0x126)](_0x4b3ac1(0x122)+_0x114e47['url']+'...'),await downloadFile(_0x114e47[_0x4b3ac1(0x141)],_0x410a4f),await a0_0x4ceaa8[_0x4b3ac1(0x123)]['chmod'](_0x410a4f,0x1ed),console['log']('\x20\x20\x20✅\x20Semgrep\x20installed\x20successfully'),console['log'](_0x4b3ac1(0x11a)+_0x410a4f+'\x0a'),console['log'](_0x4b3ac1(0x13a)),console[_0x4b3ac1(0x126)]('\x20\x20\x20pip\x20install\x20semgrep\x0a');}catch(_0x2ba489){console[_0x4b3ac1(0x126)]('\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20Semgrep:\x20'+_0x2ba489[_0x4b3ac1(0x134)]),console['log'](_0x4b3ac1(0x13d));}}function getSemgrepBinaryInfo(_0xa004df,_0x2320bd){return null;}async function installPythonScanners(){const _0x712331=a0_0x51970d;console[_0x712331(0x126)](_0x712331(0x11e));let _0x1be2b0=null;try{await execAsync('python3\x20--version',{'timeout':0x1388}),_0x1be2b0='python3';}catch(_0x2f5c21){try{await execAsync(_0x712331(0x12e),{'timeout':0x1388}),_0x1be2b0=_0x712331(0x138);}catch(_0x4ce745){console[_0x712331(0x126)](_0x712331(0x130)),console[_0x712331(0x126)]('\x20\x20\x20To\x20enable\x20Python\x20scanning,\x20install\x20Python\x20and\x20run:'),console[_0x712331(0x126)](_0x712331(0x10e));return;}}console[_0x712331(0x126)](_0x712331(0x145)+_0x1be2b0),await installViaPip(_0x712331(0x142),_0x1be2b0),await installViaPip(_0x712331(0x11b),_0x1be2b0),await installViaPip('pip-audit',_0x1be2b0),await installViaPip(_0x712331(0x11d),_0x1be2b0),await installViaPip('yamllint',_0x1be2b0),console[_0x712331(0x126)]('');}async function isHomebrewPython(_0x37838f){const _0x201a7c=a0_0x51970d;try{const {stdout:_0x2b5d95}=await execAsync(_0x37838f+'\x20-c\x20\x22import\x20sys;\x20print(sys.prefix)\x22',{'timeout':0x1388});return _0x2b5d95[_0x201a7c(0x11f)](_0x201a7c(0x14b))||_0x2b5d95['includes'](_0x201a7c(0x12c));}catch{return![];}}async function installViaPip(_0x2a5f0a,_0x1801d0){const _0x3804ef=a0_0x51970d;try{const _0x4d29b9=await execAsync(_0x1801d0+'\x20-m\x20pip\x20show\x20'+_0x2a5f0a,{'timeout':0x1388});return console[_0x3804ef(0x126)](_0x3804ef(0x13e)+_0x2a5f0a+_0x3804ef(0x105)),!![];}catch(_0x4a647a){console[_0x3804ef(0x126)](_0x3804ef(0x10b)+_0x2a5f0a+_0x3804ef(0xff));try{const _0x5d079c=await isHomebrewPython(_0x1801d0),_0x189378=_0x5d079c?'':_0x3804ef(0x14a),_0x33105b=(_0x1801d0+_0x3804ef(0x147)+_0x189378+'\x20'+_0x2a5f0a)[_0x3804ef(0x121)](/\s+/g,'\x20')['trim']();return await execAsync(_0x33105b,{'timeout':0xea60}),console[_0x3804ef(0x126)]('\x20\x20\x20✅\x20'+_0x2a5f0a+_0x3804ef(0x104)),!![];}catch(_0x3a9e4e){return console[_0x3804ef(0x126)]('\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20'+_0x2a5f0a+':\x20'+_0x3a9e4e[_0x3804ef(0x134)]),console[_0x3804ef(0x126)](_0x3804ef(0x139)+_0x2a5f0a),![];}}}async function downloadFile(_0x58c5da,_0x1df6d0){return new Promise((_0x56be5c,_0x55df54)=>{const _0x31fd80=a0_0x2027,_0x48ea3e=_0x58c5da[_0x31fd80(0x12a)](_0x31fd80(0x111))?a0_0x5c59a7:a0_0x2fe621;_0x48ea3e['get'](_0x58c5da,_0x561307=>{const _0x21e646=_0x31fd80;if(_0x561307[_0x21e646(0x108)]===0x12e||_0x561307[_0x21e646(0x108)]===0x12d){downloadFile(_0x561307[_0x21e646(0x116)][_0x21e646(0x124)],_0x1df6d0)[_0x21e646(0x103)](_0x56be5c)['catch'](_0x55df54);return;}if(_0x561307[_0x21e646(0x108)]!==0xc8){_0x55df54(new Error(_0x21e646(0x100)+_0x561307[_0x21e646(0x108)]));return;}const _0x2ff56e=createWriteStream(_0x1df6d0);_0x561307[_0x21e646(0xfc)](_0x2ff56e),_0x2ff56e['on'](_0x21e646(0x148),()=>{const _0x522eb0=_0x21e646;_0x2ff56e[_0x522eb0(0x10a)](),_0x56be5c();}),_0x2ff56e['on']('error',_0x5d0573=>{const _0xeb0d1f=_0x21e646;a0_0x4ceaa8[_0xeb0d1f(0x110)](_0x1df6d0,()=>{}),_0x55df54(_0x5d0573);});})['on']('error',_0x55df54);});}installScanners()[a0_0x51970d(0x107)](_0x453052=>{const _0x47a4d8=a0_0x51970d;console[_0x47a4d8(0x140)](_0x47a4d8(0x12f),_0x453052[_0x47a4d8(0x134)]),console[_0x47a4d8(0x140)]('\x0aYou\x20can\x20manually\x20install\x20scanners:'),console[_0x47a4d8(0x140)](_0x47a4d8(0x115)),console[_0x47a4d8(0x140)](_0x47a4d8(0x10d)),process[_0x47a4d8(0x101)](0x0);});
2
+ const a0_0x261516=a0_0x3178;(function(_0x4ea890,_0x5b36eb){const _0x443c03=a0_0x3178,_0x37f442=_0x4ea890();while(!![]){try{const _0x7a5ba2=parseInt(_0x443c03(0x17d))/0x1+parseInt(_0x443c03(0x1b0))/0x2+-parseInt(_0x443c03(0x1b4))/0x3+parseInt(_0x443c03(0x1a5))/0x4*(-parseInt(_0x443c03(0x1a4))/0x5)+parseInt(_0x443c03(0x17f))/0x6*(-parseInt(_0x443c03(0x18f))/0x7)+-parseInt(_0x443c03(0x180))/0x8*(parseInt(_0x443c03(0x19f))/0x9)+parseInt(_0x443c03(0x19b))/0xa;if(_0x7a5ba2===_0x5b36eb)break;else _0x37f442['push'](_0x37f442['shift']());}catch(_0x368759){_0x37f442['push'](_0x37f442['shift']());}}}(a0_0x399e,0x9eab4));import{exec}from'child_process';import{promisify}from'util';import a0_0x197fb2 from'https';import a0_0x5d02bf from'http';import a0_0x2b314f from'fs';import a0_0xa57889 from'path';import{fileURLToPath}from'url';import{createWriteStream}from'fs';import{pipeline}from'stream/promises';function a0_0x3178(_0x58b692,_0x504320){_0x58b692=_0x58b692-0x179;const _0x399eeb=a0_0x399e();let _0x31786a=_0x399eeb[_0x58b692];return _0x31786a;}const execAsync=promisify(exec),__filename=fileURLToPath(import.meta.url),__dirname=a0_0xa57889[a0_0x261516(0x191)](__filename),SCANNER_DIR=a0_0xa57889[a0_0x261516(0x185)](__dirname,'..','node_modules',a0_0x261516(0x1ac)),SEMGREP_VERSION=a0_0x261516(0x1b5);console[a0_0x261516(0x1a7)]('═══════════════════════════════════════════════════════════'),console[a0_0x261516(0x1a7)](a0_0x261516(0x1c5)),console[a0_0x261516(0x1a7)]('\x20\x20Platform:\x20'+process['platform']+'\x20('+process[a0_0x261516(0x18b)]+')'),console[a0_0x261516(0x1a7)](a0_0x261516(0x18e));async function installScanners(){const _0x3ede37=a0_0x261516;await a0_0x2b314f[_0x3ede37(0x1b6)][_0x3ede37(0x1a1)](SCANNER_DIR,{'recursive':!![]}),await checkESLintSecurity(),await installSemgrep(),await installPythonScanners(),console[_0x3ede37(0x1a7)]('\x0a═══════════════════════════════════════════════════════════'),console[_0x3ede37(0x1a7)](_0x3ede37(0x195)),console[_0x3ede37(0x1a7)](_0x3ede37(0x18e));}async function checkESLintSecurity(){const _0x96d659=a0_0x261516;console[_0x96d659(0x1a7)](_0x96d659(0x182));try{await import(_0x96d659(0x17c)),console['log'](_0x96d659(0x1ad));}catch(_0x37cba5){console[_0x96d659(0x1a7)](_0x96d659(0x1b7)),console[_0x96d659(0x1a7)](_0x96d659(0x1bd));}}async function installSemgrep(){const _0x5e9ed7=a0_0x261516;console[_0x5e9ed7(0x1a7)]('🔍\x20Installing\x20Semgrep...');const _0x51c31f=process[_0x5e9ed7(0x194)],_0x23ef2d=process[_0x5e9ed7(0x18b)];try{const _0x58f280=await execAsync(_0x5e9ed7(0x18c),{'timeout':0x1388});console[_0x5e9ed7(0x1a7)](_0x5e9ed7(0x188)+_0x58f280[_0x5e9ed7(0x197)][_0x5e9ed7(0x1b2)]()),console[_0x5e9ed7(0x1a7)](_0x5e9ed7(0x1a8));return;}catch(_0x43abf7){console[_0x5e9ed7(0x1a7)]('\x20\x20\x20Semgrep\x20not\x20found\x20in\x20PATH,\x20installing\x20standalone\x20binary...');}const _0x24087b=getSemgrepBinaryInfo(_0x51c31f,_0x23ef2d);if(!_0x24087b){console[_0x5e9ed7(0x1a7)](_0x5e9ed7(0x19c)+_0x51c31f+'-'+_0x23ef2d),console[_0x5e9ed7(0x1a7)]('\x20\x20\x20Please\x20install\x20manually:\x20https://semgrep.dev/docs/getting-started/\x0a');return;}try{const _0x2bbfb7=a0_0xa57889[_0x5e9ed7(0x185)](SCANNER_DIR,_0x5e9ed7(0x19d));console[_0x5e9ed7(0x1a7)]('\x20\x20\x20Downloading\x20from\x20'+_0x24087b[_0x5e9ed7(0x1b9)]+'...'),await downloadFile(_0x24087b[_0x5e9ed7(0x1b9)],_0x2bbfb7),await a0_0x2b314f[_0x5e9ed7(0x1b6)]['chmod'](_0x2bbfb7,0x1ed),console[_0x5e9ed7(0x1a7)](_0x5e9ed7(0x1a6)),console[_0x5e9ed7(0x1a7)]('\x20\x20\x20Location:\x20'+_0x2bbfb7+'\x0a'),console[_0x5e9ed7(0x1a7)]('\x20\x20\x20Note:\x20To\x20use\x20system-wide,\x20add\x20to\x20PATH\x20or\x20install\x20globally:'),console[_0x5e9ed7(0x1a7)]('\x20\x20\x20pip\x20install\x20semgrep\x0a');}catch(_0x3526e6){console[_0x5e9ed7(0x1a7)](_0x5e9ed7(0x1bf)+_0x3526e6[_0x5e9ed7(0x183)]),console['log']('\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20semgrep\x0a');}}function getSemgrepBinaryInfo(_0x5882bd,_0x47608b){return null;}async function installPythonScanners(){const _0x3a2d07=a0_0x261516;console['log'](_0x3a2d07(0x1aa));let _0x54d74b=null;try{await execAsync(_0x3a2d07(0x179),{'timeout':0x1388}),_0x54d74b=_0x3a2d07(0x1a9);}catch(_0x1a4b76){try{await execAsync(_0x3a2d07(0x18a),{'timeout':0x1388}),_0x54d74b=_0x3a2d07(0x19e);}catch(_0x19107d){console[_0x3a2d07(0x1a7)](_0x3a2d07(0x1c0)),console['log']('\x20\x20\x20To\x20enable\x20Python\x20scanning,\x20install\x20Python\x20and\x20run:'),console[_0x3a2d07(0x1a7)](_0x3a2d07(0x187));return;}}console['log'](_0x3a2d07(0x193)+_0x54d74b),await installViaPip(_0x3a2d07(0x19d),_0x54d74b),await installViaPip(_0x3a2d07(0x1a3),_0x54d74b),await installViaPip('pip-audit',_0x54d74b),await installViaPip(_0x3a2d07(0x189),_0x54d74b),await installViaPip(_0x3a2d07(0x1c3),_0x54d74b),console[_0x3a2d07(0x1a7)]('');}function a0_0x399e(){const _0xe2542f=['\x20\x20npm\x20install\x20--save-dev\x20eslint-plugin-security','includes','yamllint','\x20\x20\x20Installing\x20','\x20\x20Installing\x20Security\x20Scanners','python3\x20--version','statusCode','catch','eslint-plugin-security','272504PYtsET','startsWith','947262RTzygJ','45976FnchFR','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20','📦\x20Checking\x20ESLint\x20Security\x20Plugin...','message','get','join','\x20\x20\x20✅\x20','\x20\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit\x20checkov\x20yamllint\x0a','\x20\x20\x20✅\x20Semgrep\x20already\x20installed:\x20','checkov','python\x20--version','arch','semgrep\x20--version','...','═══════════════════════════════════════════════════════════\x0a','28TipNqB','pipe','dirname','\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit','\x20\x20\x20✅\x20Python\x20found:\x20','platform','\x20\x20Installation\x20Complete','exit','stdout','unlink','\x0aYou\x20can\x20manually\x20install\x20scanners:','--user','14958920uMxagZ','\x20\x20\x20⚠️\x20\x20No\x20Semgrep\x20binary\x20available\x20for\x20','semgrep','python','9DSwiPY','then','mkdir','\x20-c\x20\x22import\x20sys;\x20print(sys.prefix)\x22','bandit','31040tyCcyt','292xzlPGT','\x20\x20\x20✅\x20Semgrep\x20installed\x20successfully','log','\x20\x20\x20Using\x20system-installed\x20Semgrep\x0a','python3','🐍\x20Checking\x20Python\x20scanners...','Failed\x20to\x20download:\x20HTTP\x20','.scanners','\x20\x20\x20✅\x20eslint-plugin-security\x20is\x20installed\x0a','headers','\x20-m\x20pip\x20show\x20','1115900LgEXUm','❌\x20Installation\x20failed:','trim','finish','1757997yjLCfi','v1.55.0','promises','\x20\x20\x20⚠️\x20\x20eslint-plugin-security\x20not\x20found','https','url','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20','error','/usr/local/Cellar','\x20\x20\x20Run:\x20npm\x20install\x20--save-dev\x20eslint-plugin-security\x0a','\x20-m\x20pip\x20install\x20','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20Semgrep:\x20','\x20\x20\x20⚠️\x20\x20Python\x20not\x20found\x20-\x20skipping\x20Python\x20scanners'];a0_0x399e=function(){return _0xe2542f;};return a0_0x399e();}async function isHomebrewPython(_0x776192){const _0x38db71=a0_0x261516;try{const {stdout:_0x4294d6}=await execAsync(_0x776192+_0x38db71(0x1a2),{'timeout':0x1388});return _0x4294d6[_0x38db71(0x1c2)]('/opt/homebrew')||_0x4294d6['includes'](_0x38db71(0x1bc));}catch{return![];}}async function installViaPip(_0x42b83c,_0x273984){const _0x57c5b9=a0_0x261516;try{const _0x5e0085=await execAsync(_0x273984+_0x57c5b9(0x1af)+_0x42b83c,{'timeout':0x1388});return console[_0x57c5b9(0x1a7)](_0x57c5b9(0x186)+_0x42b83c+'\x20already\x20installed'),!![];}catch(_0x581812){console[_0x57c5b9(0x1a7)](_0x57c5b9(0x1c4)+_0x42b83c+_0x57c5b9(0x18d));try{const _0x580132=await isHomebrewPython(_0x273984),_0x2aaaf0=_0x580132?'':_0x57c5b9(0x19a),_0x2b8933=(_0x273984+_0x57c5b9(0x1be)+_0x2aaaf0+'\x20'+_0x42b83c)['replace'](/\s+/g,'\x20')[_0x57c5b9(0x1b2)]();return await execAsync(_0x2b8933,{'timeout':0xea60}),console[_0x57c5b9(0x1a7)]('\x20\x20\x20✅\x20'+_0x42b83c+'\x20installed\x20successfully'),!![];}catch(_0x1e6e96){return console[_0x57c5b9(0x1a7)](_0x57c5b9(0x1ba)+_0x42b83c+':\x20'+_0x1e6e96['message']),console[_0x57c5b9(0x1a7)](_0x57c5b9(0x181)+_0x42b83c),![];}}}async function downloadFile(_0x576eb3,_0x696b8f){return new Promise((_0x4e25ad,_0x5d90f5)=>{const _0x2fed10=a0_0x3178,_0x42cf8e=_0x576eb3[_0x2fed10(0x17e)](_0x2fed10(0x1b8))?a0_0x197fb2:a0_0x5d02bf;_0x42cf8e[_0x2fed10(0x184)](_0x576eb3,_0xbafcb8=>{const _0x2ca015=_0x2fed10;if(_0xbafcb8[_0x2ca015(0x17a)]===0x12e||_0xbafcb8[_0x2ca015(0x17a)]===0x12d){downloadFile(_0xbafcb8[_0x2ca015(0x1ae)]['location'],_0x696b8f)[_0x2ca015(0x1a0)](_0x4e25ad)['catch'](_0x5d90f5);return;}if(_0xbafcb8[_0x2ca015(0x17a)]!==0xc8){_0x5d90f5(new Error(_0x2ca015(0x1ab)+_0xbafcb8[_0x2ca015(0x17a)]));return;}const _0x52ae2b=createWriteStream(_0x696b8f);_0xbafcb8[_0x2ca015(0x190)](_0x52ae2b),_0x52ae2b['on'](_0x2ca015(0x1b3),()=>{_0x52ae2b['close'](),_0x4e25ad();}),_0x52ae2b['on']('error',_0x575228=>{const _0x3cdf60=_0x2ca015;a0_0x2b314f[_0x3cdf60(0x198)](_0x696b8f,()=>{}),_0x5d90f5(_0x575228);});})['on']('error',_0x5d90f5);});}installScanners()[a0_0x261516(0x17b)](_0x5c2fff=>{const _0x27b4df=a0_0x261516;console[_0x27b4df(0x1bb)](_0x27b4df(0x1b1),_0x5c2fff['message']),console['error'](_0x27b4df(0x199)),console[_0x27b4df(0x1bb)](_0x27b4df(0x1c1)),console[_0x27b4df(0x1bb)](_0x27b4df(0x192)),process[_0x27b4df(0x196)](0x0);});
@@ -1 +1 @@
1
- const a0_0x1d3b78=a0_0x4c78;(function(_0x2da597,_0x50062d){const _0x56aa43=a0_0x4c78,_0x426aba=_0x2da597();while(!![]){try{const _0x297361=parseInt(_0x56aa43(0x1c0))/0x1*(-parseInt(_0x56aa43(0x1c4))/0x2)+-parseInt(_0x56aa43(0x193))/0x3+parseInt(_0x56aa43(0x1a9))/0x4*(-parseInt(_0x56aa43(0x19a))/0x5)+parseInt(_0x56aa43(0x1a2))/0x6*(-parseInt(_0x56aa43(0x1af))/0x7)+parseInt(_0x56aa43(0x1bc))/0x8+parseInt(_0x56aa43(0x1a4))/0x9+-parseInt(_0x56aa43(0x1ae))/0xa*(-parseInt(_0x56aa43(0x191))/0xb);if(_0x297361===_0x50062d)break;else _0x426aba['push'](_0x426aba['shift']());}catch(_0x514c00){_0x426aba['push'](_0x426aba['shift']());}}}(a0_0x54f0,0x9fb39));function a0_0x54f0(){const _0x5c33e7=['qKvtvf9quKfdveLdrq','zxjYB3i','D2HPBgu','mZy2mtKXCfzpyMrT','ChvZAa','C3r5BgvSAw50lwnVBMzPzY1ZDgfUzgfYza','Dg9mB3DLCKnHC2u','nLPJD3Dyzq','rvjst1i','Dw5RBM93BG','B3b0Aw1PEMu','y2f0zwDVCML6zvn0EwXLBgLUDfj1Bgu','CMv0DxjU','u1rzteu','zgvMyxvSDa','CgX1z2LU','y29SDw1U','q1ntigfUywX5C2LZignVBxbSzxrLza','yw5HBhL6zq','BwvZC2fNzq','uevsrK9stufoq0u','C2v2zxjPDhK','Cg9ZDgnZCW','u0vwrvjjvfK','yMvZDc1WCMfJDgLJzq','mtK4otGWmJfYvenrv1m','C291CMnL','mZeYnJiZn0PLuKvUyG','q0furuDpuLK','BgLUDfn0EwXLCW','Cg9ZDgnZCY1SzxnZ','BM8Tzw1WDhK','zwXZzq','D2fYBG','ndveA2Xhwgi','BgvZCW','Bg9Nz2vY','CMvZDwX0CW','zw5KC1DPDgG','zgv0zwn0tgfUz3vHz2u','BMfTzq','BgvUz3rO','ndK0mZuWmLzVwwDZvG','lNnHC3m','mJC0mdy4ovzeu3z2vW','Cg9ZDgnZC0XLC3m','lMXLC3m','C3r5BgvSAw50','Cg9ZDgnZC1nJC3m','mtu0mZu2Bu5qwxrY','C2nZCW','Aw5JBhvKzxm','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','u1Lovefy','mJbkEKLlwMe','n2P1ALH1ra','DxnL','Dgv4Da','zxH0zw5K','Bg93zxi','zM9Y','ug9ZDentuYbZEw50yxGGy2HLy2SGCgfZC2vK','zM9YBwf0ug9ZDentu0vYCM9Y','zMLSDgvY','C3LUDgf4','BMCTzgvLCa','q1ntigfUywX5C2LZigzHAwXLza','Cg9ZDgnZCY1Zy3nZ','mZq5mZeYv1nAt1jq'];a0_0x54f0=function(){return _0x5c33e7;};return a0_0x54f0();}function a0_0x4c78(_0x591fa9,_0x6fde86){_0x591fa9=_0x591fa9-0x187;const _0x54f0bc=a0_0x54f0();let _0x4c78ee=_0x54f0bc[_0x591fa9];if(a0_0x4c78['QBzKrH']===undefined){var _0x4892c1=function(_0x527eb1){const _0x5d5508='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x371c9a='',_0x491759='';for(let _0x2416e6=0x0,_0x5d4146,_0x2e3fb3,_0x556dcc=0x0;_0x2e3fb3=_0x527eb1['charAt'](_0x556dcc++);~_0x2e3fb3&&(_0x5d4146=_0x2416e6%0x4?_0x5d4146*0x40+_0x2e3fb3:_0x2e3fb3,_0x2416e6++%0x4)?_0x371c9a+=String['fromCharCode'](0xff&_0x5d4146>>(-0x2*_0x2416e6&0x6)):0x0){_0x2e3fb3=_0x5d5508['indexOf'](_0x2e3fb3);}for(let _0x387289=0x0,_0x2d1633=_0x371c9a['length'];_0x387289<_0x2d1633;_0x387289++){_0x491759+='%'+('00'+_0x371c9a['charCodeAt'](_0x387289)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x491759);};a0_0x4c78['QMiSTe']=_0x4892c1,a0_0x4c78['mXbhhf']={},a0_0x4c78['QBzKrH']=!![];}const _0x28c043=_0x54f0bc[0x0],_0x588156=_0x591fa9+_0x28c043,_0x1f6bc3=a0_0x4c78['mXbhhf'][_0x588156];return!_0x1f6bc3?(_0x4c78ee=a0_0x4c78['QMiSTe'](_0x4c78ee),a0_0x4c78['mXbhhf'][_0x588156]=_0x4c78ee):_0x4c78ee=_0x1f6bc3,_0x4c78ee;}import{STATIC_ANALYSIS}from'../utilities/constants.js';class CSSAnalyzer{constructor(_0x371c9a=null){const _0x3e59d6=a0_0x4c78;this['logger']=_0x371c9a,this['stylelint']=null,this[_0x3e59d6(0x18e)]=null,this['postcssScss']=null,this['postcssLess']=null;}async[a0_0x1d3b78(0x18a)](_0x491759,_0x2416e6,_0x5d4146={}){const _0x39f29b=a0_0x1d3b78;try{const _0x2e3fb3=[],_0x556dcc=this[_0x39f29b(0x19f)](_0x491759),_0x387289=await this['checkSyntax'](_0x491759,_0x2416e6,_0x556dcc);_0x2e3fb3['push'](..._0x387289);if(_0x387289['length']===0x0){const _0x2d1633=await this[_0x39f29b(0x195)](_0x491759,_0x2416e6,_0x556dcc);_0x2e3fb3['push'](..._0x2d1633);}return this['logger']?.['debug'](_0x39f29b(0x189),{'file':_0x491759,'language':_0x556dcc,'totalDiagnostics':_0x2e3fb3[_0x39f29b(0x1a1)],'errors':_0x2e3fb3['filter'](_0x25aa5d=>_0x25aa5d[_0x39f29b(0x18d)]===STATIC_ANALYSIS['SEVERITY'][_0x39f29b(0x1c5)])[_0x39f29b(0x1a1)],'warnings':_0x2e3fb3[_0x39f29b(0x1b7)](_0x209edf=>_0x209edf[_0x39f29b(0x18d)]===STATIC_ANALYSIS[_0x39f29b(0x18f)]['WARNING'])['length']}),_0x2e3fb3;}catch(_0x390b61){return this[_0x39f29b(0x19c)]?.[_0x39f29b(0x1be)](_0x39f29b(0x1ba),{'file':_0x491759,'error':_0x390b61['message']}),[];}}async['checkSyntax'](_0x8bab59,_0x333cc6,_0x4c87f4){const _0x128898=a0_0x1d3b78,_0x536326=[];try{if(!this['postcss']){const _0x1128b2=await import(_0x128898(0x18e));this['postcss']=_0x1128b2['default'];}let _0xe5834=null;if(_0x4c87f4===_0x128898(0x1aa)){if(!this['postcssScss']){const _0x52c43f=await import('postcss-scss');this[_0x128898(0x1a8)]=_0x52c43f[_0x128898(0x1cb)];}_0xe5834=this['postcssScss'];}else{if(_0x4c87f4===_0x128898(0x19b)){if(!this[_0x128898(0x1a5)]){const _0x22b9a2=await import(_0x128898(0x196));this['postcssLess']=_0x22b9a2['default'];}_0xe5834=this['postcssLess'];}}const _0x7232bd=this['postcss']()['process'](_0x333cc6,{'from':_0x8bab59,'syntax':_0xe5834}),_0x4e7fff=_0x7232bd['root'];this[_0x128898(0x19c)]?.['debug'](_0x128898(0x1b5),{'file':_0x8bab59});}catch(_0x384d96){const _0x40791f=this[_0x128898(0x1b6)](_0x384d96,_0x8bab59);_0x40791f&&_0x536326['push'](_0x40791f);}return _0x536326;}async['lintStyles'](_0x1cbe74,_0x4b3ecd,_0x112350){const _0x5a02a9=a0_0x1d3b78,_0x272645=[];try{if(!this['stylelint']){const _0x1970e9=await import(_0x5a02a9(0x1a7));this[_0x5a02a9(0x1a7)]=_0x1970e9['default'];}const _0x81b32c={'extends':[_0x5a02a9(0x1c2)],'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-/',_0x5a02a9(0x1b9)]}],'media-feature-name-no-unknown':!![],'at-rule-no-unknown':_0x112350===_0x5a02a9(0x1aa)?[!![],{'ignoreAtRules':['mixin','include',_0x5a02a9(0x1b2),'if',_0x5a02a9(0x198),_0x5a02a9(0x1b4),'each',_0x5a02a9(0x1bf),'function',_0x5a02a9(0x1c9),'content',_0x5a02a9(0x1b0),'forward']}]:_0x112350==='less'?[!![],{'ignoreAtRules':[_0x5a02a9(0x187)]}]:!![],'comment-no-empty':!![],'no-duplicate-selectors':!![],'no-empty-source':null,'block-no-empty':!![],'declaration-block-no-shorthand-property-overrides':!![],'font-family-no-missing-generic-family-keyword':!![],'function-linear-gradient-no-nonstandard-direction':!![],'no-descending-specificity':null,'no-duplicate-at-import-rules':!![],'no-extra-semicolons':!![],'no-invalid-double-slash-comments':!![],'selector-pseudo-element-colon-notation':'double','selector-type-case':_0x5a02a9(0x1b3)},'customSyntax':_0x112350==='scss'?_0x5a02a9(0x1bb):_0x112350===_0x5a02a9(0x19b)?'postcss-less':undefined},_0x51ed1f=await this['stylelint']['lint']({'code':_0x4b3ecd,'codeFilename':_0x1cbe74,'config':_0x81b32c});if(_0x51ed1f[_0x5a02a9(0x19d)]&&_0x51ed1f[_0x5a02a9(0x19d)]['length']>0x0){const _0x316dce=_0x51ed1f['results'][0x0];if(_0x316dce['warnings'])for(const _0x46abbf of _0x316dce['warnings']){_0x272645[_0x5a02a9(0x1c1)]({'file':_0x1cbe74,'line':_0x46abbf['line']||0x1,'column':_0x46abbf[_0x5a02a9(0x188)]||0x1,'severity':_0x46abbf[_0x5a02a9(0x18d)]==='error'?STATIC_ANALYSIS['SEVERITY']['ERROR']:STATIC_ANALYSIS[_0x5a02a9(0x18f)]['WARNING'],'rule':_0x46abbf['rule']||_0x5a02a9(0x1c6),'message':_0x46abbf[_0x5a02a9(0x1b1)],'category':this[_0x5a02a9(0x1c8)](_0x46abbf['rule']),'fixable':![],'source':_0x5a02a9(0x1a7)});}}}catch(_0x3625ba){this[_0x5a02a9(0x19c)]?.[_0x5a02a9(0x199)]('Stylelint\x20analysis\x20failed',{'file':_0x1cbe74,'error':_0x3625ba[_0x5a02a9(0x18b)]});}return _0x272645;}['formatPostCSSError'](_0x5d2119,_0x21ae3a){const _0x647b8c=a0_0x1d3b78;return{'file':_0x21ae3a,'line':_0x5d2119['line']||0x1,'column':_0x5d2119['column']||0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x647b8c(0x1c5)],'rule':_0x5d2119[_0x647b8c(0x1a0)]||'CssSyntaxError','message':_0x5d2119['reason']||_0x5d2119[_0x647b8c(0x18b)],'category':STATIC_ANALYSIS['CATEGORY'][_0x647b8c(0x1ad)],'fixable':![],'source':_0x647b8c(0x18e),'code':_0x5d2119[_0x647b8c(0x192)]||undefined};}[a0_0x1d3b78(0x1c8)](_0x277890){const _0x5627d6=a0_0x1d3b78;if(!_0x277890)return STATIC_ANALYSIS[_0x5627d6(0x194)]['STYLE'];const _0x57ce9b=_0x277890[_0x5627d6(0x1c3)]();if(_0x57ce9b[_0x5627d6(0x1ab)]('no-invalid')||_0x57ce9b['includes']('no-unknown')||_0x57ce9b[_0x5627d6(0x1ab)](_0x5627d6(0x197))||_0x57ce9b[_0x5627d6(0x1ab)](_0x5627d6(0x1b8)))return STATIC_ANALYSIS[_0x5627d6(0x194)][_0x5627d6(0x1ad)];if(_0x57ce9b[_0x5627d6(0x1ab)]('performance')||_0x57ce9b[_0x5627d6(0x1ab)](_0x5627d6(0x1c7)))return STATIC_ANALYSIS['CATEGORY'][_0x5627d6(0x18c)];if(_0x57ce9b['includes'](_0x5627d6(0x190))||_0x57ce9b['includes']('recommended'))return STATIC_ANALYSIS[_0x5627d6(0x194)][_0x5627d6(0x1bd)];return STATIC_ANALYSIS[_0x5627d6(0x194)][_0x5627d6(0x1ca)];}[a0_0x1d3b78(0x19f)](_0x311cc4){const _0x57bcc3=a0_0x1d3b78,_0x45c8f6=_0x311cc4[_0x57bcc3(0x1c3)]();if(_0x45c8f6['endsWith']('.scss')||_0x45c8f6['endsWith'](_0x57bcc3(0x1a3)))return'scss';if(_0x45c8f6[_0x57bcc3(0x19e)](_0x57bcc3(0x1a6)))return _0x57bcc3(0x19b);return'css';}[a0_0x1d3b78(0x1ac)](){return['.css','.scss','.sass','.less'];}['supportsAutoFix'](){return![];}}export default CSSAnalyzer;
1
+ function a0_0x1b76(_0x45fe45,_0x3646c1){_0x45fe45=_0x45fe45-0x1af;const _0x11c362=a0_0x11c3();let _0x1b76df=_0x11c362[_0x45fe45];if(a0_0x1b76['EAEdEM']===undefined){var _0x4ca466=function(_0x4df898){const _0x53be4d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xae7d40='',_0x572e08='';for(let _0x5e0cb1=0x0,_0x147d8d,_0x550ce1,_0x1cdd78=0x0;_0x550ce1=_0x4df898['charAt'](_0x1cdd78++);~_0x550ce1&&(_0x147d8d=_0x5e0cb1%0x4?_0x147d8d*0x40+_0x550ce1:_0x550ce1,_0x5e0cb1++%0x4)?_0xae7d40+=String['fromCharCode'](0xff&_0x147d8d>>(-0x2*_0x5e0cb1&0x6)):0x0){_0x550ce1=_0x53be4d['indexOf'](_0x550ce1);}for(let _0x41ac52=0x0,_0x437e97=_0xae7d40['length'];_0x41ac52<_0x437e97;_0x41ac52++){_0x572e08+='%'+('00'+_0xae7d40['charCodeAt'](_0x41ac52)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x572e08);};a0_0x1b76['bOgtQQ']=_0x4ca466,a0_0x1b76['sssXCt']={},a0_0x1b76['EAEdEM']=!![];}const _0x2de395=_0x11c362[0x0],_0x35093c=_0x45fe45+_0x2de395,_0x5e8e53=a0_0x1b76['sssXCt'][_0x35093c];return!_0x5e8e53?(_0x1b76df=a0_0x1b76['bOgtQQ'](_0x1b76df),a0_0x1b76['sssXCt'][_0x35093c]=_0x1b76df):_0x1b76df=_0x5e8e53,_0x1b76df;}const a0_0xa95c29=a0_0x1b76;(function(_0x2725ba,_0x97bccc){const _0x1cfaaa=a0_0x1b76,_0x4095ea=_0x2725ba();while(!![]){try{const _0x37e665=-parseInt(_0x1cfaaa(0x1c0))/0x1+parseInt(_0x1cfaaa(0x1d7))/0x2+parseInt(_0x1cfaaa(0x1c6))/0x3*(-parseInt(_0x1cfaaa(0x1dd))/0x4)+-parseInt(_0x1cfaaa(0x1d9))/0x5*(parseInt(_0x1cfaaa(0x1c3))/0x6)+parseInt(_0x1cfaaa(0x1d3))/0x7+parseInt(_0x1cfaaa(0x1de))/0x8*(-parseInt(_0x1cfaaa(0x1c2))/0x9)+parseInt(_0x1cfaaa(0x1d5))/0xa;if(_0x37e665===_0x97bccc)break;else _0x4095ea['push'](_0x4095ea['shift']());}catch(_0x1bedee){_0x4095ea['push'](_0x4095ea['shift']());}}}(a0_0x11c3,0xba1e2));import{STATIC_ANALYSIS}from'../utilities/constants.js';class CSSAnalyzer{constructor(_0xae7d40=null){const _0x47577a=a0_0x1b76;this['logger']=_0xae7d40,this['stylelint']=null,this['postcss']=null,this[_0x47577a(0x1d1)]=null,this['postcssLess']=null;}async['analyze'](_0x572e08,_0x5e0cb1,_0x147d8d={}){const _0x471a29=a0_0x1b76;try{const _0x550ce1=[],_0x1cdd78=this['detectLanguage'](_0x572e08),_0x41ac52=await this['checkSyntax'](_0x572e08,_0x5e0cb1,_0x1cdd78);_0x550ce1[_0x471a29(0x1d4)](..._0x41ac52);if(_0x41ac52[_0x471a29(0x1b7)]===0x0){const _0x437e97=await this['lintStyles'](_0x572e08,_0x5e0cb1,_0x1cdd78);_0x550ce1['push'](..._0x437e97);}return this[_0x471a29(0x1ce)]?.['debug'](_0x471a29(0x1e4),{'file':_0x572e08,'language':_0x1cdd78,'totalDiagnostics':_0x550ce1[_0x471a29(0x1b7)],'errors':_0x550ce1['filter'](_0x168971=>_0x168971['severity']===STATIC_ANALYSIS[_0x471a29(0x1bd)][_0x471a29(0x1c5)])[_0x471a29(0x1b7)],'warnings':_0x550ce1['filter'](_0x2d1ce7=>_0x2d1ce7['severity']===STATIC_ANALYSIS['SEVERITY']['WARNING'])['length']}),_0x550ce1;}catch(_0x5bdd13){return this['logger']?.[_0x471a29(0x1df)](_0x471a29(0x1cf),{'file':_0x572e08,'error':_0x5bdd13['message']}),[];}}async['checkSyntax'](_0x302c0b,_0x3b3ed4,_0x3fe7b8){const _0x495811=a0_0x1b76,_0x23420e=[];try{if(!this['postcss']){const _0xa2666a=await import(_0x495811(0x1ca));this[_0x495811(0x1ca)]=_0xa2666a['default'];}let _0x5bb6b0=null;if(_0x3fe7b8==='scss'){if(!this[_0x495811(0x1d1)]){const _0x50440b=await import('postcss-scss');this['postcssScss']=_0x50440b['default'];}_0x5bb6b0=this['postcssScss'];}else{if(_0x3fe7b8===_0x495811(0x1cb)){if(!this['postcssLess']){const _0x348e01=await import(_0x495811(0x1c7));this['postcssLess']=_0x348e01['default'];}_0x5bb6b0=this[_0x495811(0x1b6)];}}const _0x1cfedf=this['postcss']()['process'](_0x3b3ed4,{'from':_0x302c0b,'syntax':_0x5bb6b0}),_0x2fa027=_0x1cfedf[_0x495811(0x1b9)];this['logger']?.[_0x495811(0x1c9)]('PostCSS\x20syntax\x20check\x20passed',{'file':_0x302c0b});}catch(_0x51922e){const _0x40ff34=this[_0x495811(0x1b4)](_0x51922e,_0x302c0b);_0x40ff34&&_0x23420e[_0x495811(0x1d4)](_0x40ff34);}return _0x23420e;}async[a0_0xa95c29(0x1b1)](_0x59511a,_0x18492b,_0x57cb9b){const _0x2a011d=a0_0xa95c29,_0x1487ad=[];try{if(!this['stylelint']){const _0x33d914=await import('stylelint');this['stylelint']=_0x33d914['default'];}const _0x1a8a3e={'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':[_0x2a011d(0x1e0),'ng-deep']}],'media-feature-name-no-unknown':!![],'at-rule-no-unknown':_0x57cb9b===_0x2a011d(0x1c1)?[!![],{'ignoreAtRules':['mixin','include','extend','if',_0x2a011d(0x1d0),'for','each',_0x2a011d(0x1c8),'function','return',_0x2a011d(0x1bf),_0x2a011d(0x1d8),_0x2a011d(0x1e3)]}]:_0x57cb9b===_0x2a011d(0x1cb)?[!![],{'ignoreAtRules':[_0x2a011d(0x1e6)]}]:!![],'comment-no-empty':!![],'no-duplicate-selectors':!![],'no-empty-source':null,'block-no-empty':!![],'declaration-block-no-shorthand-property-overrides':!![],'font-family-no-missing-generic-family-keyword':!![],'function-linear-gradient-no-nonstandard-direction':!![],'no-descending-specificity':null,'no-duplicate-at-import-rules':!![],'no-extra-semicolons':!![],'no-invalid-double-slash-comments':!![],'selector-pseudo-element-colon-notation':'double','selector-type-case':_0x2a011d(0x1e7)},'customSyntax':_0x57cb9b===_0x2a011d(0x1c1)?'postcss-scss':_0x57cb9b===_0x2a011d(0x1cb)?'postcss-less':undefined},_0x8d9628=await this[_0x2a011d(0x1ba)]['lint']({'code':_0x18492b,'codeFilename':_0x59511a,'config':_0x1a8a3e});if(_0x8d9628['results']&&_0x8d9628['results']['length']>0x0){const _0x11c7b8=_0x8d9628['results'][0x0];if(_0x11c7b8['warnings'])for(const _0x2c8c8c of _0x11c7b8[_0x2a011d(0x1d6)]){_0x1487ad['push']({'file':_0x59511a,'line':_0x2c8c8c['line']||0x1,'column':_0x2c8c8c['column']||0x1,'severity':_0x2c8c8c['severity']===_0x2a011d(0x1df)?STATIC_ANALYSIS[_0x2a011d(0x1bd)][_0x2a011d(0x1c5)]:STATIC_ANALYSIS['SEVERITY'][_0x2a011d(0x1be)],'rule':_0x2c8c8c['rule']||'unknown','message':_0x2c8c8c['text'],'category':this['categorizeStylelintRule'](_0x2c8c8c['rule']),'fixable':![],'source':'stylelint'});}}}catch(_0x1e21e4){this['logger']?.['warn'](_0x2a011d(0x1da),{'file':_0x59511a,'error':_0x1e21e4[_0x2a011d(0x1bb)]});}return _0x1487ad;}[a0_0xa95c29(0x1b4)](_0x2bc781,_0x42deeb){const _0x2e65c6=a0_0xa95c29;return{'file':_0x42deeb,'line':_0x2bc781['line']||0x1,'column':_0x2bc781[_0x2e65c6(0x1c4)]||0x1,'severity':STATIC_ANALYSIS['SEVERITY']['ERROR'],'rule':_0x2bc781['name']||_0x2e65c6(0x1bc),'message':_0x2bc781[_0x2e65c6(0x1b5)]||_0x2bc781[_0x2e65c6(0x1bb)],'category':STATIC_ANALYSIS['CATEGORY'][_0x2e65c6(0x1e2)],'fixable':![],'source':_0x2e65c6(0x1ca),'code':_0x2bc781[_0x2e65c6(0x1dc)]||undefined};}[a0_0xa95c29(0x1b2)](_0x58bfc5){const _0x24fc31=a0_0xa95c29;if(!_0x58bfc5)return STATIC_ANALYSIS['CATEGORY'][_0x24fc31(0x1d2)];const _0x4a3b57=_0x58bfc5['toLowerCase']();if(_0x4a3b57[_0x24fc31(0x1e1)]('no-invalid')||_0x4a3b57[_0x24fc31(0x1e1)]('no-unknown')||_0x4a3b57[_0x24fc31(0x1e1)](_0x24fc31(0x1e5))||_0x4a3b57[_0x24fc31(0x1e1)]('syntax'))return STATIC_ANALYSIS[_0x24fc31(0x1cd)][_0x24fc31(0x1e2)];if(_0x4a3b57['includes']('performance')||_0x4a3b57['includes'](_0x24fc31(0x1db)))return STATIC_ANALYSIS[_0x24fc31(0x1cd)]['PERFORMANCE'];if(_0x4a3b57[_0x24fc31(0x1e1)]('best-practice')||_0x4a3b57['includes']('recommended'))return STATIC_ANALYSIS['CATEGORY']['BEST_PRACTICE'];return STATIC_ANALYSIS['CATEGORY'][_0x24fc31(0x1d2)];}['detectLanguage'](_0x50522c){const _0x566e47=a0_0xa95c29,_0x2097e1=_0x50522c[_0x566e47(0x1af)]();if(_0x2097e1[_0x566e47(0x1b0)](_0x566e47(0x1b3))||_0x2097e1['endsWith']('.sass'))return _0x566e47(0x1c1);if(_0x2097e1[_0x566e47(0x1b0)]('.less'))return _0x566e47(0x1cb);return'css';}[a0_0xa95c29(0x1cc)](){return['.css','.scss','.sass','.less'];}[a0_0xa95c29(0x1b8)](){return![];}}function a0_0x11c3(){const _0x146b71=['CMvHC29U','Cg9ZDgnZC0XLC3m','BgvUz3rO','C3vWCg9YDhnbDxrVrML4','CM9VDa','C3r5BgvSAw50','BwvZC2fNzq','q3nZu3LUDgf4rxjYB3i','u0vwrvjjvfK','v0fstKLorW','y29UDgvUDa','mtq3nduYne5StwzJwq','C2nZCW','mZG1ntGZneXduvP6BW','nJC3mdGZognzENPdza','y29SDw1U','rvjst1i','mZbOsvz3wvO','Cg9ZDgnZCY1SzxnZ','D2HPBgu','zgvIDwC','Cg9ZDgnZCW','BgvZCW','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','q0furuDpuLK','Bg9Nz2vY','q1ntigfUywX5C2LZigzHAwXLza','zwXZzq','Cg9ZDgnZC1nJC3m','u1rzteu','nJq5nZGYv2vgze51','ChvZAa','ndCXmtiYodbrwgDIwe0','D2fYBMLUz3m','mZi0ntK0yufyyNnp','DxnL','nuPrwLHutG','u3r5BgvSAw50igfUywX5C2LZigzHAwXLza','B3b0Aw1PEMu','C291CMnL','ndy5mdm2AfnWBgXP','ohzcDevAAW','zxjYB3i','l15JDxn0B20TlW','Aw5JBhvKzxm','u1Lovefy','zM9YD2fYza','q1ntigfUywX5C2LZignVBxbSzxrLza','BM8Tzw1WDhK','CgX1z2LU','Bg93zxi','Dg9mB3DLCKnHC2u','zw5KC1DPDgG','BgLUDfn0EwXLCW','y2f0zwDVCML6zvn0EwXLBgLUDfj1Bgu','lNnJC3m','zM9YBwf0ug9ZDentu0vYCM9Y'];a0_0x11c3=function(){return _0x146b71;};return a0_0x11c3();}export default CSSAnalyzer;
@@ -1 +1 @@
1
- function a0_0x4222(_0x270f4c,_0xc95fb4){_0x270f4c=_0x270f4c-0xc5;const _0xf6710c=a0_0xf671();let _0x42224d=_0xf6710c[_0x270f4c];if(a0_0x4222['ercuIL']===undefined){var _0x3bdbc6=function(_0x410d30){const _0x481c5e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xbe6498='',_0x534d40='';for(let _0x395874=0x0,_0x2ca789,_0x36d60c,_0x3b4c70=0x0;_0x36d60c=_0x410d30['charAt'](_0x3b4c70++);~_0x36d60c&&(_0x2ca789=_0x395874%0x4?_0x2ca789*0x40+_0x36d60c:_0x36d60c,_0x395874++%0x4)?_0xbe6498+=String['fromCharCode'](0xff&_0x2ca789>>(-0x2*_0x395874&0x6)):0x0){_0x36d60c=_0x481c5e['indexOf'](_0x36d60c);}for(let _0x563e0d=0x0,_0xf1edb7=_0xbe6498['length'];_0x563e0d<_0xf1edb7;_0x563e0d++){_0x534d40+='%'+('00'+_0xbe6498['charCodeAt'](_0x563e0d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x534d40);};a0_0x4222['OPUXXT']=_0x3bdbc6,a0_0x4222['Eddbqc']={},a0_0x4222['ercuIL']=!![];}const _0x401010=_0xf6710c[0x0],_0x1c3df2=_0x270f4c+_0x401010,_0x232b21=a0_0x4222['Eddbqc'][_0x1c3df2];return!_0x232b21?(_0x42224d=a0_0x4222['OPUXXT'](_0x42224d),a0_0x4222['Eddbqc'][_0x1c3df2]=_0x42224d):_0x42224d=_0x232b21,_0x42224d;}const a0_0xf0cea0=a0_0x4222;function a0_0xf671(){const _0x347bd4=['y29TBw9UANm','qvbjigTLEq','DMfSAwrHDgvxAxrOq2HLy2TVDG','mtbNs0rmv3u','A3vIzxjUzxrLCW','z2v0sw5ZDgfSBfjLy29TBwvUzgf0Aw9UCW','vw5RBM93BIbJB25MAwCGzMLSzsb0ExbL','ANnVBI1Zy2HLBwe','y2HLy2TVDIb2ywXPzgf0Aw9UigzHAwXLza','Ew91CI1RzxKTAgvYzq','CgfYC2u','DMfSAwrHDgveB2nRzxjMAwXL','z3vPzgvSAw5L','DgvZDa','zg9JA2vYzMLSzq','ug90zw50AwfSigHHCMrJB2rLzca','C2vJCMv0','DMfSAwrHDgvqywnRywDLsNnVBG','CgfYC2vzyw1SBgLUDfjLC3vSDhm','zxjYB3i','BgLUzq','yMvZDc1WCMfJDgLJzq','BwfWsgfKB2XPBNrtzxzLCML0Eq','mJfpBMjPAwO','y2HLy2TVDG','ANnVBI1WyxjZzq','y3DL','EwfTBgXPBNqGDMfSAwrHDgLVBIbMywLSzwq','BwfW','nZyZmJK1mhn5sK1vCW','Dw5RBM93BG','ic0TB3v0Chv0igPZB24Gls1JB21Wywn0','zMfPBgvKx2nOzwnRCW','rgLZywjSAw5Nig5Vsw1WBgLJAxrbBNKGCMvKDwnLCYb0ExbLihnHzMv0Eq','q29UC2LKzxiGzw5HyMXPBMCGiNn0CMLJDciGBw9KzsbMB3iGyMv0DgvYihr5CguGC2fMzxr5','CgfYyw1Z','nduWufPyBLDU','C3rHCNrZv2L0Aa','Bw9KDwXL','zxjYB3jZ','CgfYC2viywrVBgLUDfjLC3vSDhm','CNvSzq','y29SDw1U','y29TCgLSzxjpChrPB25Z','ANnVBLnJAgvTyq','DMfSAwrHDgvfBNzgAwXL','CgfZC3DVCMq','D2fYBG','zgLYBMfTzq','mZu0ndGYn2PZwLL5BG','CgfJA2fNzs5QC29U','C3rYAw5N','yxzHAwXHyMXLu2nHBM5LCNm','CMvZDwX0CW','AgfKB2XPBNqGDMfSAwrHDgLVBIbMywLSzwq','v0fstKLorW','zg9JA2vYx2nVBxbVC2u','Bwf0y2G','BxvZDcbOyxzLihjLCxvPCMvKihbYB3bLCNr5icC','CMvHzezPBgu','DgvYCMfMB3jT','zg9JA2vYlwnVBxbVC2uUEw1S','AgfKB2XPBNqGzgv0zwn0zwq','C2vJDxjPDhK','BM9YBwfSAxPLuMvZDwX0CW','BwLZC2LUz1bYB3bLCNr5','DMfSAwrHDgvuC0nVBMzPzW','ChjPDMf0zsbRzxK','CMvMzxjLBMnLCW','EwfTBgXPBNqGls12zxjZAw9U','BwvZC2fNzq','DMfSAwrHDgvzqu1m','DxrMltG','DhjPBq','zgv0zwn0qxzHAwXHyMXLvMfSAwrHDg9YCW','lNLTBa','AgfKB2XPBNq','lMvUDG','y29Kzq','su5gtW','Dg9Rzw4','lMPZB24','zgvMyxvSDa','C3bSAxq','EwfTBgXPBNqGlwyGCgfYC2fIBguGiG','ChvZAa','mJaYmdqZnfzVvw1prq','CgfYC2vdAgvJA292uMvZDwX0CW','sw52ywXPzcbku09ooIa','Dg9mB3DLCKnHC2u','u0vwrvjjvfK','z2L0AhvIlwfJDgLVBNm','lNrMDMfYCW','DhnJB25MAwCTDMfSAwrHDg9Y','AgfKB2XPBNqGls1MB3jTyxqGANnVBIaI','mJaXodyWmvb0EwTPuG','zgvIDwC','ywP2','mta1mJe4nfLWqwfowG','B2jQzwn0','lNLHBwW','mJyZnK5Uwhv0qq','BwvKAxvT','DhnJB25MAwCUANnVBG','mJy1nJuYohbswvvnEG','C3rKB3v0','EwfTBgXPBNq','BwfWwwfTBgXPBNrtzxzLCML0Eq','ywP2lwzVCM1HDhm','DhnJB25MAwCUANnVBIb2ywXPzgf0Aw9UigzHAwXLza','Bg9Nz2vY','y2HHBMDLBwu','y2HLy2TVDIaTzIaI','DMfSAwrHDgLVBG','EwfTBa','AxnbCNjHEq','Aw5ZDgfUy2vqyxrO','rvjst1i','zxH0BMfTzq','q1jjveLdquW'];a0_0xf671=function(){return _0x347bd4;};return a0_0xf671();}(function(_0x3e2c57,_0x18846f){const _0x1d044b=a0_0x4222,_0x5c71e1=_0x3e2c57();while(!![]){try{const _0x19f432=parseInt(_0x1d044b(0x11d))/0x1*(parseInt(_0x1d044b(0xe6))/0x2)+-parseInt(_0x1d044b(0x12a))/0x3+-parseInt(_0x1d044b(0xe3))/0x4*(-parseInt(_0x1d044b(0xfc))/0x5)+parseInt(_0x1d044b(0xd7))/0x6+-parseInt(_0x1d044b(0x110))/0x7*(-parseInt(_0x1d044b(0xe9))/0x8)+parseInt(_0x1d044b(0xe0))/0x9+-parseInt(_0x1d044b(0x116))/0xa;if(_0x19f432===_0x18846f)break;else _0x5c71e1['push'](_0x5c71e1['shift']());}catch(_0xf51756){_0x5c71e1['push'](_0x5c71e1['shift']());}}}(a0_0xf671,0xb297a));import{exec}from'child_process';import{promisify}from'util';import a0_0xbe6498 from'path';import a0_0x534d40 from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';const execAsync=promisify(exec);class ConfigValidator{constructor(_0x395874=null){const _0x5204eb=a0_0x4222;this[_0x5204eb(0xef)]=_0x395874,this[_0x5204eb(0x12d)]=null,this['scannerCache']=new Map();}async['detectAvailableValidators'](){const _0x3a6f89=a0_0x4222;if(this['availableScanners']!==null)return this['availableScanners'];const _0x2ca789={'checkov':![],'hadolint':![],'yamllint':![],'jsonSchema':![]};try{await execAsync('checkov\x20--version',{'timeout':0x1388}),_0x2ca789['checkov']=!![],this[_0x3a6f89(0xef)]?.['debug']('checkov\x20detected');}catch(_0x36d60c){this[_0x3a6f89(0xef)]?.['debug']('checkov\x20not\x20available',{'error':_0x36d60c['message']});}try{await execAsync('hadolint\x20--version',{'timeout':0x1388}),_0x2ca789[_0x3a6f89(0xcd)]=!![],this[_0x3a6f89(0xef)]?.[_0x3a6f89(0xe1)](_0x3a6f89(0x137));}catch(_0x3b4c70){this['logger']?.['debug']('hadolint\x20not\x20available',{'error':_0x3b4c70[_0x3a6f89(0xc7)]});}try{await execAsync(_0x3a6f89(0xc6),{'timeout':0x1388}),_0x2ca789['yamllint']=!![],this[_0x3a6f89(0xef)]?.['debug']('yamllint\x20detected');}catch(_0x563e0d){this[_0x3a6f89(0xef)]?.['debug']('yamllint\x20not\x20available',{'error':_0x563e0d[_0x3a6f89(0xc7)]});}try{await import(_0x3a6f89(0xe2)),_0x2ca789[_0x3a6f89(0x125)]=!![],this['logger']?.['debug']('JSON\x20Schema\x20validation\x20available');}catch(_0xf1edb7){this[_0x3a6f89(0xef)]?.['debug']('ajv\x20not\x20available',{'error':_0xf1edb7['message']});}return this[_0x3a6f89(0x12d)]=_0x2ca789,_0x2ca789;}async['validate'](_0x42bbef,_0x2456d7={}){const _0x42ebe2=a0_0x4222,_0x5d8b73=[],_0x260507=await this[_0x42ebe2(0xcb)](),_0x47d694=this['detectFileType'](_0x42bbef);this['logger']?.['debug']('Validating\x20config\x20file',{'filePath':_0x42bbef,'fileType':_0x47d694});switch(_0x47d694){case'dockerfile':if(_0x260507[_0x42ebe2(0xcd)]){const _0x3361ab=await this[_0x42ebe2(0x104)](_0x42bbef,_0x2456d7);_0x5d8b73[_0x42ebe2(0xd6)](..._0x3361ab);}if(_0x260507[_0x42ebe2(0x111)]){const _0x25ede4=await this['validateWithCheckov'](_0x42bbef,_0x42ebe2(0x107),_0x2456d7);_0x5d8b73[_0x42ebe2(0xd6)](..._0x25ede4);}break;case'docker-compose':if(_0x260507[_0x42ebe2(0xeb)]){const _0x39c41d=await this[_0x42ebe2(0xc8)](_0x42bbef,_0x2456d7);_0x5d8b73[_0x42ebe2(0xd6)](..._0x39c41d);}if(_0x260507[_0x42ebe2(0x111)]){const _0x3e5006=await this[_0x42ebe2(0xfb)](_0x42bbef,_0x42ebe2(0x131),_0x2456d7);_0x5d8b73['push'](..._0x3e5006);}break;case _0x42ebe2(0xfd):if(_0x260507['yamllint']){const _0x22919b=await this['validateYAML'](_0x42bbef,_0x2456d7);_0x5d8b73[_0x42ebe2(0xd6)](..._0x22919b);}if(_0x260507['checkov']){const _0x267744=await this[_0x42ebe2(0xfb)](_0x42bbef,_0x42ebe2(0xfd),_0x2456d7);_0x5d8b73[_0x42ebe2(0xd6)](..._0x267744);}break;case'terraform':if(_0x260507['checkov']){const _0x4d36b8=await this[_0x42ebe2(0xfb)](_0x42bbef,_0x42ebe2(0x135),_0x2456d7);_0x5d8b73[_0x42ebe2(0xd6)](..._0x4d36b8);}break;case _0x42ebe2(0x12b):if(_0x260507[_0x42ebe2(0x125)]){const _0xc0c1e4=await this[_0x42ebe2(0x10a)](_0x42bbef,_0x2456d7);_0x5d8b73['push'](..._0xc0c1e4);}break;case _0x42ebe2(0xe8):if(_0x260507['jsonSchema']){const _0x1a7885=await this['validateTsConfig'](_0x42bbef,_0x2456d7);_0x5d8b73[_0x42ebe2(0xd6)](..._0x1a7885);}break;case'github-actions':if(_0x260507['yamllint']){const _0x4c6cc6=await this[_0x42ebe2(0xc8)](_0x42bbef,_0x2456d7);_0x5d8b73[_0x42ebe2(0xd6)](..._0x4c6cc6);}break;case'env':const _0xcfbbe3=await this[_0x42ebe2(0x126)](_0x42bbef,_0x2456d7);_0x5d8b73[_0x42ebe2(0xd6)](..._0xcfbbe3);break;case'yaml':if(_0x260507['yamllint']){const _0x34988b=await this[_0x42ebe2(0xc8)](_0x42bbef,_0x2456d7);_0x5d8b73['push'](..._0x34988b);}break;default:this[_0x42ebe2(0xef)]?.[_0x42ebe2(0x128)](_0x42ebe2(0xff),{'filePath':_0x42bbef,'fileType':_0x47d694});return[];}return this[_0x42ebe2(0x139)](_0x5d8b73);}async[a0_0xf0cea0(0x104)](_0x2515c3,_0x569097={}){const _0x3465bf=a0_0xf0cea0;try{const _0x11ea14=await execAsync(_0x3465bf(0xdf)+_0x2515c3+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0x3e67c1=JSON['parse'](_0x11ea14['stdout']);return this[_0x3465bf(0x121)](_0x3e67c1,_0x2515c3);}catch(_0x250b2c){if(_0x250b2c[_0x3465bf(0xea)])try{const _0x39fd46=JSON[_0x3465bf(0x103)](_0x250b2c['stdout']);return this['parseHadolintResults'](_0x39fd46,_0x2515c3);}catch(_0x22052a){this['logger']?.[_0x3465bf(0x10c)]('Failed\x20to\x20parse\x20hadolint\x20output',{'error':_0x22052a[_0x3465bf(0xc7)]});}return this[_0x3465bf(0xef)]?.['error'](_0x3465bf(0x12f),{'error':_0x250b2c['message']}),[];}}[a0_0xf0cea0(0x121)](_0x18f85d,_0x23fd3d){const _0x584b79=a0_0xf0cea0,_0x4cb5ca=[];if(Array[_0x584b79(0xf4)](_0x18f85d))for(const _0x474ca8 of _0x18f85d){_0x4cb5ca['push']({'file':_0x23fd3d,'line':_0x474ca8[_0x584b79(0x10d)]||0x1,'column':_0x474ca8['column']||0x1,'severity':this['mapHadolintSeverity'](_0x474ca8['level']),'rule':_0x474ca8[_0x584b79(0xcf)],'message':_0x474ca8[_0x584b79(0xc7)],'category':_0x584b79(0x107),'validator':'hadolint'});}return _0x4cb5ca;}async[a0_0xf0cea0(0xc8)](_0x478872,_0x5f4543={}){const _0x8300d0=a0_0xf0cea0;try{const _0x9a8b5a=await execAsync(_0x8300d0(0xd5)+_0x478872+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530});return this[_0x8300d0(0x10b)](_0x9a8b5a['stdout'],_0x478872);}catch(_0x2c67a5){if(_0x2c67a5['stdout'])return this['parseYamllintResults'](_0x2c67a5[_0x8300d0(0xea)],_0x478872);return this['logger']?.[_0x8300d0(0x10c)](_0x8300d0(0x114),{'error':_0x2c67a5[_0x8300d0(0xc7)]}),[];}}['parseYamllintResults'](_0x2784f2,_0x4a7006){const _0x15c59f=a0_0xf0cea0,_0x42c4c5=[],_0x18e598=_0x2784f2['split']('\x0a')['filter'](_0x1cc3b1=>_0x1cc3b1[_0x15c59f(0xca)]());for(const _0x2cecb8 of _0x18e598){const _0x47371d=_0x2cecb8[_0x15c59f(0x132)](/^(.+?):(\d+):(\d+):\s*\[(\w+)\]\s*(.+?)\s*\((.+?)\)/);if(_0x47371d){const [,_0x5a3cd5,_0x4e1948,_0x3f8034,_0x5558bb,_0xc9246a,_0x567794]=_0x47371d;_0x42c4c5[_0x15c59f(0xd6)]({'file':_0x4a7006,'line':parseInt(_0x4e1948,0xa),'column':parseInt(_0x3f8034,0xa),'severity':this['mapYamllintSeverity'](_0x5558bb),'rule':_0x567794,'message':_0xc9246a,'category':_0x15c59f(0xf3),'validator':'yamllint'});}}return _0x42c4c5;}async[a0_0xf0cea0(0xfb)](_0x1c0ca5,_0x21f66c,_0x417fc3={}){const _0x24540a=a0_0xf0cea0;try{const _0x56932b=await execAsync(_0x24540a(0xf1)+_0x1c0ca5+'\x22\x20--framework\x20'+_0x21f66c+_0x24540a(0x118),{'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0x50cf07=JSON['parse'](_0x56932b[_0x24540a(0xea)]);return this[_0x24540a(0xd8)](_0x50cf07,_0x1c0ca5);}catch(_0x517503){if(_0x517503['stdout'])try{const _0x3e4bab=JSON[_0x24540a(0x103)](_0x517503['stdout']);return this['parseCheckovResults'](_0x3e4bab,_0x1c0ca5);}catch(_0x35c628){this['logger']?.['error']('Failed\x20to\x20parse\x20checkov\x20output',{'error':_0x35c628[_0x24540a(0xc7)]});}return this[_0x24540a(0xef)]?.['error'](_0x24540a(0x101),{'error':_0x517503[_0x24540a(0xc7)]}),[];}}['parseCheckovResults'](_0x549128,_0x45d388){const _0x4d4d52=a0_0xf0cea0,_0x19ae25=[];if(_0x549128[_0x4d4d52(0x12e)]&&_0x549128['results']['failed_checks'])for(const _0x342790 of _0x549128['results'][_0x4d4d52(0x119)]){_0x19ae25['push']({'file':_0x45d388,'line':_0x342790['file_line_range']?_0x342790['file_line_range'][0x0]:0x1,'column':0x1,'severity':this['mapCheckovSeverity'](_0x342790['check_class']),'rule':_0x342790['check_id'],'message':_0x342790['check_name']||_0x342790['check_id'],'category':_0x4d4d52(0x138),'validator':_0x4d4d52(0x111),'remediation':_0x342790[_0x4d4d52(0x105)],'cwe':_0x342790['cwe'],'references':_0x342790['guideline']?[_0x342790['guideline']]:[]});}return _0x19ae25;}async['validatePackageJson'](_0x2dabd5,_0x1ebbf2={}){const _0x4bef3b=a0_0xf0cea0;try{const _0x368a81=(await import('ajv'))[_0x4bef3b(0xd3)],_0x4f7789=(await import(_0x4bef3b(0xed)))['default'],_0x2ebcea=await a0_0x534d40[_0x4bef3b(0x134)](_0x2dabd5,'utf-8'),_0x4ff856=JSON[_0x4bef3b(0x103)](_0x2ebcea),_0x45947f=new _0x368a81({'allErrors':!![],'strict':![]});_0x4f7789(_0x45947f);const _0x4af864={'type':'object','required':['name','version'],'properties':{'name':{'type':_0x4bef3b(0x12c),'pattern':'^(?:@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$'},'version':{'type':_0x4bef3b(0x12c)},'description':{'type':_0x4bef3b(0x12c)},'main':{'type':'string'},'type':{'type':_0x4bef3b(0x12c),'enum':[_0x4bef3b(0x11f),_0x4bef3b(0xf9)]},'scripts':{'type':_0x4bef3b(0xe4)},'dependencies':{'type':_0x4bef3b(0xe4)},'devDependencies':{'type':_0x4bef3b(0xe4)}},'additionalProperties':!![]},_0x4740d8=_0x45947f['compile'](_0x4af864),_0x132566=_0x4740d8(_0x4ff856);if(!_0x132566&&_0x4740d8['errors'])return _0x4740d8[_0x4bef3b(0x120)][_0x4bef3b(0x115)](_0x14c6da=>({'file':_0x2dabd5,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x4bef3b(0xdb)]['ERROR'],'rule':_0x4bef3b(0x100),'message':_0x14c6da['instancePath']?_0x14c6da[_0x4bef3b(0xf5)]+'\x20'+_0x14c6da[_0x4bef3b(0xc7)]:_0x4bef3b(0x133)+_0x14c6da[_0x4bef3b(0x11c)][_0x4bef3b(0x13a)]+'\x27','category':_0x4bef3b(0xf2),'validator':'json-schema'}));return[];}catch(_0x36b6a2){return this[_0x4bef3b(0xef)]?.[_0x4bef3b(0x10c)]('package.json\x20validation\x20failed',{'error':_0x36b6a2['message']}),[{'file':_0x2dabd5,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x4bef3b(0xdb)][_0x4bef3b(0xf6)],'rule':_0x4bef3b(0x112),'message':'Invalid\x20JSON:\x20'+_0x36b6a2[_0x4bef3b(0xc7)],'category':'syntax','validator':_0x4bef3b(0x112)}];}}async[a0_0xf0cea0(0x13b)](_0x1594a8,_0x8f4aea={}){const _0x8fbb1c=a0_0xf0cea0;try{const _0x340ad2=await a0_0x534d40['readFile'](_0x1594a8,_0x8fbb1c(0xc9)),_0x2c2751=JSON['parse'](_0x340ad2),_0x240395=[];if(_0x2c2751[_0x8fbb1c(0x124)]){const _0x3f3a90=_0x2c2751[_0x8fbb1c(0x124)];!_0x3f3a90['strict']&&_0x240395[_0x8fbb1c(0xd6)]({'file':_0x1594a8,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':'strict-mode','message':_0x8fbb1c(0x11b),'category':'best-practice','validator':_0x8fbb1c(0xde)}),_0x3f3a90['noImplicitAny']===![]&&_0x240395['push']({'file':_0x1594a8,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x8fbb1c(0xdb)][_0x8fbb1c(0x130)],'rule':'no-implicit-any','message':_0x8fbb1c(0x11a),'category':_0x8fbb1c(0x10e),'validator':_0x8fbb1c(0xde)});}return _0x240395;}catch(_0x4e0e20){return this['logger']?.[_0x8fbb1c(0x10c)](_0x8fbb1c(0xee),{'error':_0x4e0e20['message']}),[{'file':_0x1594a8,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['ERROR'],'rule':_0x8fbb1c(0x112),'message':_0x8fbb1c(0xd9)+_0x4e0e20['message'],'category':'syntax','validator':_0x8fbb1c(0x112)}];}}async[a0_0xf0cea0(0x126)](_0x22e399,_0x34e14e={}){const _0x5e506a=a0_0xf0cea0;try{const _0xef7a8=await a0_0x534d40['readFile'](_0x22e399,_0x5e506a(0xc9)),_0x96365=[],_0x1426cd=_0xef7a8[_0x5e506a(0xd4)]('\x0a'),_0x2b2924=[{'pattern':/password|passwd|pwd/i,'name':_0x5e506a(0x127)},{'pattern':/api[_-]?key/i,'name':_0x5e506a(0xfa)},{'pattern':/secret/i,'name':_0x5e506a(0x109)},{'pattern':/token/i,'name':_0x5e506a(0xd1)},{'pattern':/private[_-]?key/i,'name':_0x5e506a(0x13c)},{'pattern':/aws[_-]?access/i,'name':'AWS\x20credentials'}];return _0x1426cd['forEach']((_0x266043,_0x594214)=>{const _0xa0fe68=_0x5e506a,_0x2b898b=_0x266043['trim']();if(!_0x2b898b||_0x2b898b[_0xa0fe68(0x11e)]('#'))return;if(_0x2b898b['includes']('=')){const [_0x2948b4,_0x4749a2]=_0x2b898b[_0xa0fe68(0xd4)]('='),_0x266d33=_0x2948b4[_0xa0fe68(0xda)](),_0x1a4949=_0x4749a2?.['trim']()||'',_0x10a28a=_0x1a4949&&_0x1a4949!==''&&!_0x1a4949[_0xa0fe68(0x11e)]('$')&&_0x1a4949!==_0xa0fe68(0x102)&&_0x1a4949!==_0xa0fe68(0xf0)&&_0x1a4949['length']>0x5;if(_0x10a28a)for(const {pattern:_0x6de51e,name:_0x40d359}of _0x2b2924){if(_0x6de51e[_0xa0fe68(0x106)](_0x266d33)){_0x96365['push']({'file':_0x22e399,'line':_0x594214+0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0xa0fe68(0xdb)][_0xa0fe68(0xf8)],'rule':'hardcoded-secret','message':_0xa0fe68(0x108)+_0x40d359+'\x20detected\x20in\x20.env\x20file','category':_0xa0fe68(0x138),'validator':'env-validator','remediation':'Use\x20environment-specific\x20.env\x20files\x20and\x20add\x20.env\x20to\x20.gitignore'});break;}}}}),_0x96365;}catch(_0x29833f){return this[_0x5e506a(0xef)]?.['error']('.env\x20validation\x20failed',{'error':_0x29833f[_0x5e506a(0xc7)]}),[];}}['detectFileType'](_0x13711e){const _0x4babca=a0_0xf0cea0,_0x51d4e1=a0_0xbe6498['basename'](_0x13711e)[_0x4babca(0xda)](),_0x11be93=a0_0xbe6498[_0x4babca(0x129)](_0x13711e);if(_0x51d4e1===_0x4babca(0x107))return'dockerfile';if(_0x51d4e1===_0x4babca(0x136)||_0x51d4e1==='docker-compose.yaml')return'docker-compose';if(_0x51d4e1===_0x4babca(0x12b))return _0x4babca(0x12b);if(_0x51d4e1==='tsconfig.json')return _0x4babca(0xe8);if(_0x51d4e1===_0x4babca(0xce)||_0x51d4e1['endsWith']('.env'))return'env';if(_0x11be93['includes']('.github/workflows'))return _0x4babca(0xdc);if(_0x11be93['includes']('kubernetes')||_0x11be93['includes']('k8s'))return'kubernetes';const _0x21887c=a0_0xbe6498[_0x4babca(0xf7)](_0x13711e)['toLowerCase']();if(_0x21887c==='.tf'||_0x21887c===_0x4babca(0xdd))return _0x4babca(0x135);if(_0x21887c===_0x4babca(0xcc)||_0x21887c===_0x4babca(0xe5))return _0x4babca(0xf3);if(_0x21887c===_0x4babca(0xd2))return'json';return _0x4babca(0x117);}['normalizeResults'](_0x1edd99){const _0x3ad31b=a0_0xf0cea0;return _0x1edd99['map'](_0x2ebbdd=>({'file':_0x2ebbdd['file'],'line':_0x2ebbdd['line']||0x1,'column':_0x2ebbdd[_0x3ad31b(0x123)]||0x1,'severity':_0x2ebbdd['severity']||STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':_0x2ebbdd[_0x3ad31b(0x122)]||'unknown','message':_0x2ebbdd[_0x3ad31b(0xc7)]||'Validation\x20issue\x20detected','category':_0x2ebbdd['category']||_0x3ad31b(0xf2),'validator':_0x2ebbdd['validator'],'cwe':_0x2ebbdd[_0x3ad31b(0x113)]||null,'remediation':_0x2ebbdd['remediation']||null,'references':_0x2ebbdd[_0x3ad31b(0xc5)]||[]}));}[a0_0xf0cea0(0x10f)](_0x4c1540){const _0x37d0a5=a0_0xf0cea0,_0x2de622={'error':STATIC_ANALYSIS['SEVERITY'][_0x37d0a5(0xf6)],'warning':STATIC_ANALYSIS['SEVERITY']['WARNING'],'info':STATIC_ANALYSIS['SEVERITY']['INFO'],'style':STATIC_ANALYSIS['SEVERITY'][_0x37d0a5(0xd0)]};return _0x2de622[_0x4c1540?.['toLowerCase']()]||STATIC_ANALYSIS[_0x37d0a5(0xdb)]['WARNING'];}[a0_0xf0cea0(0xec)](_0x53980f){const _0x1d5067=a0_0xf0cea0,_0x2dfca5={'error':STATIC_ANALYSIS['SEVERITY'][_0x1d5067(0xf6)],'warning':STATIC_ANALYSIS[_0x1d5067(0xdb)]['WARNING']};return _0x2dfca5[_0x53980f?.['toLowerCase']()]||STATIC_ANALYSIS[_0x1d5067(0xdb)][_0x1d5067(0x130)];}['mapCheckovSeverity'](_0x2d8b5a){const _0x19bf45=a0_0xf0cea0;return STATIC_ANALYSIS[_0x19bf45(0xdb)][_0x19bf45(0xf6)];}async['getValidatorStatus'](){const _0x1cec93=a0_0xf0cea0,_0x24f12e=await this[_0x1cec93(0xcb)]();return{'validators':_0x24f12e,'recommendations':this[_0x1cec93(0xfe)](_0x24f12e)};}[a0_0xf0cea0(0xfe)](_0xc926c8){const _0x23613a=a0_0xf0cea0,_0xf8d812=[];return!_0xc926c8[_0x23613a(0x111)]&&_0xf8d812[_0x23613a(0xd6)]({'validator':_0x23613a(0x111),'reason':'Infrastructure\x20as\x20Code\x20security\x20scanning\x20(Docker,\x20Kubernetes,\x20Terraform)','install':'pip\x20install\x20checkov','priority':'high'}),!_0xc926c8['hadolint']&&_0xf8d812['push']({'validator':'hadolint','reason':'Dockerfile\x20linting\x20and\x20best\x20practices','install':'Download from https://github.com/hadolint/hadolint/releases','priority':'high'}),!_0xc926c8[_0x23613a(0xeb)]&&_0xf8d812[_0x23613a(0xd6)]({'validator':'yamllint','reason':'YAML\x20file\x20validation','install':'pip\x20install\x20yamllint','priority':_0x23613a(0xe7)}),!_0xc926c8[_0x23613a(0x125)]&&_0xf8d812[_0x23613a(0xd6)]({'validator':'ajv\x20(JSON\x20Schema)','reason':'JSON\x20configuration\x20validation','install':'npm\x20install\x20ajv\x20ajv-formats','priority':_0x23613a(0xe7)}),_0xf8d812;}}export default ConfigValidator;
1
+ const a0_0x3c84af=a0_0x2200;(function(_0x59aba5,_0x559bc2){const _0x3de198=a0_0x2200,_0x43a17d=_0x59aba5();while(!![]){try{const _0xf3fea0=parseInt(_0x3de198(0x179))/0x1+parseInt(_0x3de198(0x1a3))/0x2+parseInt(_0x3de198(0x1b0))/0x3*(parseInt(_0x3de198(0x187))/0x4)+-parseInt(_0x3de198(0x1b3))/0x5+parseInt(_0x3de198(0x192))/0x6+-parseInt(_0x3de198(0x198))/0x7+-parseInt(_0x3de198(0x15d))/0x8*(-parseInt(_0x3de198(0x1ba))/0x9);if(_0xf3fea0===_0x559bc2)break;else _0x43a17d['push'](_0x43a17d['shift']());}catch(_0x62f7e9){_0x43a17d['push'](_0x43a17d['shift']());}}}(a0_0x435f,0x4e37f));import{exec}from'child_process';import{promisify}from'util';import a0_0x5447be from'path';import a0_0x55542b from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';function a0_0x2200(_0x541e47,_0x2bf0f3){_0x541e47=_0x541e47-0x143;const _0x435f46=a0_0x435f();let _0x220045=_0x435f46[_0x541e47];if(a0_0x2200['GvLOCa']===undefined){var _0x3553b=function(_0x6abeeb){const _0x205180='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5447be='',_0x55542b='';for(let _0x79d56f=0x0,_0x48330c,_0x13dac0,_0x3e3fcd=0x0;_0x13dac0=_0x6abeeb['charAt'](_0x3e3fcd++);~_0x13dac0&&(_0x48330c=_0x79d56f%0x4?_0x48330c*0x40+_0x13dac0:_0x13dac0,_0x79d56f++%0x4)?_0x5447be+=String['fromCharCode'](0xff&_0x48330c>>(-0x2*_0x79d56f&0x6)):0x0){_0x13dac0=_0x205180['indexOf'](_0x13dac0);}for(let _0x168b7a=0x0,_0x4bdf44=_0x5447be['length'];_0x168b7a<_0x4bdf44;_0x168b7a++){_0x55542b+='%'+('00'+_0x5447be['charCodeAt'](_0x168b7a)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x55542b);};a0_0x2200['yUmegO']=_0x3553b,a0_0x2200['xvadle']={},a0_0x2200['GvLOCa']=!![];}const _0xa99154=_0x435f46[0x0],_0x20a236=_0x541e47+_0xa99154,_0x3490a6=a0_0x2200['xvadle'][_0x20a236];return!_0x3490a6?(_0x220045=a0_0x2200['yUmegO'](_0x220045),a0_0x2200['xvadle'][_0x20a236]=_0x220045):_0x220045=_0x3490a6,_0x220045;}const execAsync=promisify(exec);class ConfigValidator{constructor(_0x79d56f=null){this['logger']=_0x79d56f,this['availableScanners']=null,this['scannerCache']=new Map();}async[a0_0x3c84af(0x1a2)](){const _0x10fea8=a0_0x3c84af;if(this[_0x10fea8(0x170)]!==null)return this['availableScanners'];const _0x48330c={'checkov':![],'hadolint':![],'yamllint':![],'jsonSchema':![]};try{await execAsync(_0x10fea8(0x18c),{'timeout':0x1388}),_0x48330c['checkov']=!![],this['logger']?.['debug'](_0x10fea8(0x185));}catch(_0x13dac0){this[_0x10fea8(0x166)]?.[_0x10fea8(0x17b)](_0x10fea8(0x1a8),{'error':_0x13dac0['message']});}try{await execAsync('hadolint\x20--version',{'timeout':0x1388}),_0x48330c['hadolint']=!![],this['logger']?.[_0x10fea8(0x17b)](_0x10fea8(0x1a9));}catch(_0x3e3fcd){this['logger']?.[_0x10fea8(0x17b)](_0x10fea8(0x19b),{'error':_0x3e3fcd['message']});}try{await execAsync(_0x10fea8(0x180),{'timeout':0x1388}),_0x48330c[_0x10fea8(0x176)]=!![],this['logger']?.['debug'](_0x10fea8(0x174));}catch(_0x168b7a){this['logger']?.[_0x10fea8(0x17b)](_0x10fea8(0x1bc),{'error':_0x168b7a['message']});}try{await import('ajv'),_0x48330c[_0x10fea8(0x143)]=!![],this['logger']?.['debug']('JSON\x20Schema\x20validation\x20available');}catch(_0x4bdf44){this['logger']?.[_0x10fea8(0x17b)](_0x10fea8(0x152),{'error':_0x4bdf44['message']});}return this['availableScanners']=_0x48330c,_0x48330c;}async[a0_0x3c84af(0x17a)](_0x1e9dd4,_0x70e3de={}){const _0x51b385=a0_0x3c84af,_0x380384=[],_0x27e403=await this[_0x51b385(0x1a2)](),_0x79793e=this[_0x51b385(0x14d)](_0x1e9dd4);this['logger']?.['debug']('Validating\x20config\x20file',{'filePath':_0x1e9dd4,'fileType':_0x79793e});switch(_0x79793e){case'dockerfile':if(_0x27e403[_0x51b385(0x148)]){const _0x4d0960=await this['validateDockerfile'](_0x1e9dd4,_0x70e3de);_0x380384[_0x51b385(0x1ae)](..._0x4d0960);}if(_0x27e403[_0x51b385(0x146)]){const _0x11a165=await this['validateWithCheckov'](_0x1e9dd4,'dockerfile',_0x70e3de);_0x380384[_0x51b385(0x1ae)](..._0x11a165);}break;case'docker-compose':if(_0x27e403['yamllint']){const _0x5d4d64=await this[_0x51b385(0x19d)](_0x1e9dd4,_0x70e3de);_0x380384[_0x51b385(0x1ae)](..._0x5d4d64);}if(_0x27e403[_0x51b385(0x146)]){const _0x17cab0=await this['validateWithCheckov'](_0x1e9dd4,_0x51b385(0x1a1),_0x70e3de);_0x380384['push'](..._0x17cab0);}break;case _0x51b385(0x19e):if(_0x27e403['yamllint']){const _0x162c0f=await this['validateYAML'](_0x1e9dd4,_0x70e3de);_0x380384[_0x51b385(0x1ae)](..._0x162c0f);}if(_0x27e403[_0x51b385(0x146)]){const _0x5904c7=await this['validateWithCheckov'](_0x1e9dd4,'kubernetes',_0x70e3de);_0x380384[_0x51b385(0x1ae)](..._0x5904c7);}break;case _0x51b385(0x16d):if(_0x27e403[_0x51b385(0x146)]){const _0x298d87=await this[_0x51b385(0x188)](_0x1e9dd4,_0x51b385(0x16d),_0x70e3de);_0x380384[_0x51b385(0x1ae)](..._0x298d87);}break;case _0x51b385(0x157):if(_0x27e403['jsonSchema']){const _0x39de1b=await this[_0x51b385(0x145)](_0x1e9dd4,_0x70e3de);_0x380384['push'](..._0x39de1b);}break;case'tsconfig.json':if(_0x27e403['jsonSchema']){const _0x3f6e79=await this[_0x51b385(0x183)](_0x1e9dd4,_0x70e3de);_0x380384['push'](..._0x3f6e79);}break;case _0x51b385(0x14b):if(_0x27e403['yamllint']){const _0x56586a=await this['validateYAML'](_0x1e9dd4,_0x70e3de);_0x380384[_0x51b385(0x1ae)](..._0x56586a);}break;case'env':const _0x364252=await this['validateEnvFile'](_0x1e9dd4,_0x70e3de);_0x380384[_0x51b385(0x1ae)](..._0x364252);break;case _0x51b385(0x1a4):if(_0x27e403[_0x51b385(0x176)]){const _0x53e482=await this['validateYAML'](_0x1e9dd4,_0x70e3de);_0x380384['push'](..._0x53e482);}break;default:this['logger']?.[_0x51b385(0x156)]('Unknown\x20config\x20file\x20type',{'filePath':_0x1e9dd4,'fileType':_0x79793e});return[];}return this['normalizeResults'](_0x380384);}async[a0_0x3c84af(0x159)](_0x40e3eb,_0x118e21={}){const _0x30023f=a0_0x3c84af;try{const _0x2fd4cf=await execAsync('hadolint\x20--format\x20json\x20\x22'+_0x40e3eb+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0x354f3e=JSON['parse'](_0x2fd4cf[_0x30023f(0x16a)]);return this[_0x30023f(0x168)](_0x354f3e,_0x40e3eb);}catch(_0x1806d4){if(_0x1806d4[_0x30023f(0x16a)])try{const _0x5dfd60=JSON[_0x30023f(0x167)](_0x1806d4[_0x30023f(0x16a)]);return this[_0x30023f(0x168)](_0x5dfd60,_0x40e3eb);}catch(_0x8a51a2){this['logger']?.['error']('Failed\x20to\x20parse\x20hadolint\x20output',{'error':_0x8a51a2['message']});}return this[_0x30023f(0x166)]?.[_0x30023f(0x16c)](_0x30023f(0x194),{'error':_0x1806d4[_0x30023f(0x1a6)]}),[];}}['parseHadolintResults'](_0x1abb4a,_0x39099c){const _0x24e5a1=a0_0x3c84af,_0x292e46=[];if(Array[_0x24e5a1(0x1ab)](_0x1abb4a))for(const _0x2f7e15 of _0x1abb4a){_0x292e46['push']({'file':_0x39099c,'line':_0x2f7e15['line']||0x1,'column':_0x2f7e15['column']||0x1,'severity':this['mapHadolintSeverity'](_0x2f7e15[_0x24e5a1(0x162)]),'rule':_0x2f7e15[_0x24e5a1(0x169)],'message':_0x2f7e15[_0x24e5a1(0x1a6)],'category':'dockerfile','validator':_0x24e5a1(0x148)});}return _0x292e46;}async['validateYAML'](_0x473e5b,_0x581a56={}){const _0x36e605=a0_0x3c84af;try{const _0x5bf0b=await execAsync('yamllint\x20-f\x20parsable\x20\x22'+_0x473e5b+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530});return this[_0x36e605(0x173)](_0x5bf0b['stdout'],_0x473e5b);}catch(_0x509c34){if(_0x509c34['stdout'])return this[_0x36e605(0x173)](_0x509c34['stdout'],_0x473e5b);return this['logger']?.[_0x36e605(0x16c)](_0x36e605(0x186),{'error':_0x509c34['message']}),[];}}['parseYamllintResults'](_0x238f9e,_0x4ea895){const _0x2ef929=a0_0x3c84af,_0x508979=[],_0x12c7c2=_0x238f9e[_0x2ef929(0x1b5)]('\x0a')['filter'](_0x29b96a=>_0x29b96a[_0x2ef929(0x165)]());for(const _0x384254 of _0x12c7c2){const _0x3f95ef=_0x384254['match'](/^(.+?):(\d+):(\d+):\s*\[(\w+)\]\s*(.+?)\s*\((.+?)\)/);if(_0x3f95ef){const [,_0x418b05,_0x78c366,_0x4e45e0,_0x2012c3,_0x10730b,_0x12c646]=_0x3f95ef;_0x508979[_0x2ef929(0x1ae)]({'file':_0x4ea895,'line':parseInt(_0x78c366,0xa),'column':parseInt(_0x4e45e0,0xa),'severity':this['mapYamllintSeverity'](_0x2012c3),'rule':_0x12c646,'message':_0x10730b,'category':'yaml','validator':'yamllint'});}}return _0x508979;}async[a0_0x3c84af(0x188)](_0x5c40de,_0x391110,_0x5ddeb6={}){const _0x2810ef=a0_0x3c84af;try{const _0x5e1996=await execAsync('checkov\x20-f\x20\x22'+_0x5c40de+'\x22\x20--framework\x20'+_0x391110+_0x2810ef(0x1b7),{'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0x1f042b=JSON['parse'](_0x5e1996['stdout']);return this['parseCheckovResults'](_0x1f042b,_0x5c40de);}catch(_0x1b5200){if(_0x1b5200['stdout'])try{const _0x1c956f=JSON['parse'](_0x1b5200[_0x2810ef(0x16a)]);return this['parseCheckovResults'](_0x1c956f,_0x5c40de);}catch(_0x26c10f){this['logger']?.['error']('Failed\x20to\x20parse\x20checkov\x20output',{'error':_0x26c10f['message']});}return this[_0x2810ef(0x166)]?.['error']('checkov\x20validation\x20failed',{'error':_0x1b5200['message']}),[];}}['parseCheckovResults'](_0x1aecc2,_0x17d1f4){const _0x28dd77=a0_0x3c84af,_0xd80139=[];if(_0x1aecc2[_0x28dd77(0x1b2)]&&_0x1aecc2[_0x28dd77(0x1b2)][_0x28dd77(0x18b)])for(const _0x19ef14 of _0x1aecc2['results'][_0x28dd77(0x18b)]){_0xd80139['push']({'file':_0x17d1f4,'line':_0x19ef14[_0x28dd77(0x196)]?_0x19ef14['file_line_range'][0x0]:0x1,'column':0x1,'severity':this['mapCheckovSeverity'](_0x19ef14['check_class']),'rule':_0x19ef14[_0x28dd77(0x15a)],'message':_0x19ef14[_0x28dd77(0x190)]||_0x19ef14['check_id'],'category':_0x28dd77(0x150),'validator':'checkov','remediation':_0x19ef14[_0x28dd77(0x1aa)],'cwe':_0x19ef14[_0x28dd77(0x163)],'references':_0x19ef14[_0x28dd77(0x1aa)]?[_0x19ef14[_0x28dd77(0x1aa)]]:[]});}return _0xd80139;}async[a0_0x3c84af(0x145)](_0x22e79d,_0x2d3576={}){const _0x2e1867=a0_0x3c84af;try{const _0x38b004=(await import('ajv'))['default'],_0x57f1cb=(await import(_0x2e1867(0x1b4)))['default'],_0x1a6738=await a0_0x55542b['readFile'](_0x22e79d,'utf-8'),_0x1c331e=JSON['parse'](_0x1a6738),_0x1de4df=new _0x38b004({'allErrors':!![],'strict':![]});_0x57f1cb(_0x1de4df);const _0x2cbca1={'type':_0x2e1867(0x147),'required':['name',_0x2e1867(0x15c)],'properties':{'name':{'type':_0x2e1867(0x17c),'pattern':_0x2e1867(0x181)},'version':{'type':'string'},'description':{'type':'string'},'main':{'type':_0x2e1867(0x17c)},'type':{'type':'string','enum':[_0x2e1867(0x14f),_0x2e1867(0x175)]},'scripts':{'type':'object'},'dependencies':{'type':_0x2e1867(0x147)},'devDependencies':{'type':'object'}},'additionalProperties':!![]},_0x2a06bc=_0x1de4df['compile'](_0x2cbca1),_0x3ff39e=_0x2a06bc(_0x1c331e);if(!_0x3ff39e&&_0x2a06bc['errors'])return _0x2a06bc[_0x2e1867(0x1b1)][_0x2e1867(0x177)](_0xb1fc05=>({'file':_0x22e79d,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['ERROR'],'rule':_0x2e1867(0x1b9),'message':_0xb1fc05['instancePath']?_0xb1fc05[_0x2e1867(0x14e)]+'\x20'+_0xb1fc05['message']:_0x2e1867(0x184)+_0xb1fc05[_0x2e1867(0x1a7)]['missingProperty']+'\x27','category':_0x2e1867(0x191),'validator':_0x2e1867(0x1b9)}));return[];}catch(_0x1c032c){return this[_0x2e1867(0x166)]?.['error']('package.json\x20validation\x20failed',{'error':_0x1c032c['message']}),[{'file':_0x22e79d,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x2e1867(0x19c)]['ERROR'],'rule':'json-parse','message':'Invalid\x20JSON:\x20'+_0x1c032c[_0x2e1867(0x1a6)],'category':'syntax','validator':_0x2e1867(0x153)}];}}async[a0_0x3c84af(0x183)](_0x13c986,_0x2bfbaf={}){const _0x2746c0=a0_0x3c84af;try{const _0x337ee3=await a0_0x55542b[_0x2746c0(0x14a)](_0x13c986,_0x2746c0(0x15b)),_0x41c837=JSON[_0x2746c0(0x167)](_0x337ee3),_0x53eda8=[];if(_0x41c837['compilerOptions']){const _0x567dff=_0x41c837['compilerOptions'];!_0x567dff['strict']&&_0x53eda8['push']({'file':_0x13c986,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x2746c0(0x19c)]['WARNING'],'rule':'strict-mode','message':_0x2746c0(0x17e),'category':'best-practice','validator':'tsconfig-validator'}),_0x567dff['noImplicitAny']===![]&&_0x53eda8['push']({'file':_0x13c986,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x2746c0(0x19c)][_0x2746c0(0x171)],'rule':_0x2746c0(0x1bd),'message':'Disabling\x20noImplicitAny\x20reduces\x20type\x20safety','category':_0x2746c0(0x160),'validator':_0x2746c0(0x1a0)});}return _0x53eda8;}catch(_0x2380ed){return this[_0x2746c0(0x166)]?.[_0x2746c0(0x16c)](_0x2746c0(0x1bf),{'error':_0x2380ed[_0x2746c0(0x1a6)]}),[{'file':_0x13c986,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['ERROR'],'rule':_0x2746c0(0x153),'message':'Invalid\x20JSON:\x20'+_0x2380ed[_0x2746c0(0x1a6)],'category':'syntax','validator':_0x2746c0(0x153)}];}}async[a0_0x3c84af(0x18d)](_0x4405b2,_0x2bf6d8={}){const _0x5f47bd=a0_0x3c84af;try{const _0x3d3c21=await a0_0x55542b['readFile'](_0x4405b2,'utf-8'),_0x3a6b1c=[],_0x4b3aac=_0x3d3c21['split']('\x0a'),_0x482129=[{'pattern':/password|passwd|pwd/i,'name':_0x5f47bd(0x155)},{'pattern':/api[_-]?key/i,'name':_0x5f47bd(0x178)},{'pattern':/secret/i,'name':'secret'},{'pattern':/token/i,'name':'token'},{'pattern':/private[_-]?key/i,'name':_0x5f47bd(0x15e)},{'pattern':/aws[_-]?access/i,'name':'AWS\x20credentials'}];return _0x4b3aac['forEach']((_0x54dd3d,_0x357f85)=>{const _0x2d5866=_0x5f47bd,_0x21f294=_0x54dd3d['trim']();if(!_0x21f294||_0x21f294['startsWith']('#'))return;if(_0x21f294[_0x2d5866(0x15f)]('=')){const [_0x1eebae,_0xfe302f]=_0x21f294['split']('='),_0x2510da=_0x1eebae[_0x2d5866(0x18a)](),_0x292627=_0xfe302f?.['trim']()||'',_0x4a1f14=_0x292627&&_0x292627!==''&&!_0x292627['startsWith']('$')&&_0x292627!=='your-key-here'&&_0x292627!=='changeme'&&_0x292627['length']>0x5;if(_0x4a1f14)for(const {pattern:_0x3532f4,name:_0x2ef598}of _0x482129){if(_0x3532f4['test'](_0x2510da)){_0x3a6b1c['push']({'file':_0x4405b2,'line':_0x357f85+0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x2d5866(0x19c)]['CRITICAL'],'rule':'hardcoded-secret','message':_0x2d5866(0x172)+_0x2ef598+'\x20detected\x20in\x20.env\x20file','category':_0x2d5866(0x150),'validator':'env-validator','remediation':'Use\x20environment-specific\x20.env\x20files\x20and\x20add\x20.env\x20to\x20.gitignore'});break;}}}}),_0x3a6b1c;}catch(_0x3b2572){return this[_0x5f47bd(0x166)]?.['error'](_0x5f47bd(0x19f),{'error':_0x3b2572['message']}),[];}}['detectFileType'](_0x26feed){const _0x2624a6=a0_0x3c84af,_0x4e4c7c=a0_0x5447be[_0x2624a6(0x19a)](_0x26feed)[_0x2624a6(0x18a)](),_0x5c269f=a0_0x5447be['dirname'](_0x26feed);if(_0x4e4c7c===_0x2624a6(0x17d))return'dockerfile';if(_0x4e4c7c===_0x2624a6(0x14c)||_0x4e4c7c===_0x2624a6(0x1a5))return'docker-compose';if(_0x4e4c7c===_0x2624a6(0x157))return _0x2624a6(0x157);if(_0x4e4c7c==='tsconfig.json')return'tsconfig.json';if(_0x4e4c7c==='.env'||_0x4e4c7c['endsWith']('.env'))return'env';if(_0x5c269f['includes']('.github/workflows'))return'github-actions';if(_0x5c269f[_0x2624a6(0x15f)]('kubernetes')||_0x5c269f['includes']('k8s'))return _0x2624a6(0x19e);const _0x2ad843=a0_0x5447be[_0x2624a6(0x164)](_0x26feed)[_0x2624a6(0x18a)]();if(_0x2ad843===_0x2624a6(0x195)||_0x2ad843===_0x2624a6(0x1b8))return'terraform';if(_0x2ad843==='.yml'||_0x2ad843===_0x2624a6(0x16f))return'yaml';if(_0x2ad843===_0x2624a6(0x154))return _0x2624a6(0x1af);return _0x2624a6(0x1ac);}[a0_0x3c84af(0x17f)](_0x1c35d6){const _0x38e8bb=a0_0x3c84af;return _0x1c35d6[_0x38e8bb(0x177)](_0x3f1837=>({'file':_0x3f1837[_0x38e8bb(0x149)],'line':_0x3f1837[_0x38e8bb(0x189)]||0x1,'column':_0x3f1837['column']||0x1,'severity':_0x3f1837[_0x38e8bb(0x1be)]||STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':_0x3f1837[_0x38e8bb(0x18e)]||_0x38e8bb(0x1ac),'message':_0x3f1837[_0x38e8bb(0x1a6)]||_0x38e8bb(0x144),'category':_0x3f1837['category']||'validation','validator':_0x3f1837['validator'],'cwe':_0x3f1837[_0x38e8bb(0x163)]||null,'remediation':_0x3f1837['remediation']||null,'references':_0x3f1837['references']||[]}));}[a0_0x3c84af(0x16e)](_0x461dcb){const _0x472459=a0_0x3c84af,_0x46c52e={'error':STATIC_ANALYSIS['SEVERITY'][_0x472459(0x1bb)],'warning':STATIC_ANALYSIS[_0x472459(0x19c)]['WARNING'],'info':STATIC_ANALYSIS[_0x472459(0x19c)][_0x472459(0x193)],'style':STATIC_ANALYSIS['SEVERITY'][_0x472459(0x193)]};return _0x46c52e[_0x461dcb?.['toLowerCase']()]||STATIC_ANALYSIS['SEVERITY']['WARNING'];}[a0_0x3c84af(0x16b)](_0x2db023){const _0x15d14b=a0_0x3c84af,_0x4eba55={'error':STATIC_ANALYSIS[_0x15d14b(0x19c)]['ERROR'],'warning':STATIC_ANALYSIS[_0x15d14b(0x19c)][_0x15d14b(0x171)]};return _0x4eba55[_0x2db023?.[_0x15d14b(0x18a)]()]||STATIC_ANALYSIS['SEVERITY'][_0x15d14b(0x171)];}['mapCheckovSeverity'](_0x44a41b){const _0x8e14fa=a0_0x3c84af;return STATIC_ANALYSIS[_0x8e14fa(0x19c)]['ERROR'];}async[a0_0x3c84af(0x1b6)](){const _0x41947b=a0_0x3c84af,_0x4100de=await this[_0x41947b(0x1a2)]();return{'validators':_0x4100de,'recommendations':this['getInstallRecommendations'](_0x4100de)};}['getInstallRecommendations'](_0x58ba2a){const _0x3ac4b5=a0_0x3c84af,_0x1c354a=[];return!_0x58ba2a[_0x3ac4b5(0x146)]&&_0x1c354a['push']({'validator':'checkov','reason':_0x3ac4b5(0x151),'install':'pip\x20install\x20checkov','priority':_0x3ac4b5(0x161)}),!_0x58ba2a[_0x3ac4b5(0x148)]&&_0x1c354a['push']({'validator':_0x3ac4b5(0x148),'reason':_0x3ac4b5(0x158),'install':'Download from https://github.com/hadolint/hadolint/releases','priority':'high'}),!_0x58ba2a[_0x3ac4b5(0x176)]&&_0x1c354a[_0x3ac4b5(0x1ae)]({'validator':'yamllint','reason':_0x3ac4b5(0x182),'install':_0x3ac4b5(0x1ad),'priority':'medium'}),!_0x58ba2a[_0x3ac4b5(0x143)]&&_0x1c354a['push']({'validator':_0x3ac4b5(0x199),'reason':_0x3ac4b5(0x18f),'install':_0x3ac4b5(0x197),'priority':'medium'}),_0x1c354a;}}function a0_0x435f(){const _0x1aac95=['z2L0AhvIlwfJDgLVBNm','zg9JA2vYlwnVBxbVC2uUEw1S','zgv0zwn0rMLSzvr5Cgu','Aw5ZDgfUy2vqyxrO','Bw9KDwXL','C2vJDxjPDhK','sw5MCMfZDhj1y3r1CMuGyxmGq29KzsbZzwn1CML0EsbZy2fUBMLUzYaOrg9JA2vYlcblDwjLCM5LDgvZlcbuzxjYywzVCM0P','ywP2ig5VDcbHDMfPBgfIBgu','ANnVBI1WyxjZzq','lMPZB24','CgfZC3DVCMq','D2fYBG','CgfJA2fNzs5QC29U','rg9JA2vYzMLSzsbSAw50Aw5NigfUzcbIzxn0ihbYywn0AwnLCW','DMfSAwrHDgveB2nRzxjMAwXL','y2HLy2TFAwq','DxrMltG','DMvYC2LVBG','ofLKrvburG','ChjPDMf0zsbRzxK','Aw5JBhvKzxm','yMvZDc1WCMfJDgLJzq','AgLNAa','Bgv2zwW','y3DL','zxH0BMfTzq','DhjPBq','Bg9Nz2vY','CgfYC2u','CgfYC2viywrVBgLUDfjLC3vSDhm','y29Kzq','C3rKB3v0','BwfWwwfTBgXPBNrtzxzLCML0Eq','zxjYB3i','DgvYCMfMB3jT','BwfWsgfKB2XPBNrtzxzLCML0Eq','lNLHBwW','yxzHAwXHyMXLu2nHBM5LCNm','v0fstKLorW','ug90zw50AwfSigHHCMrJB2rLzca','CgfYC2vzyw1SBgLUDfjLC3vSDhm','EwfTBgXPBNqGzgv0zwn0zwq','y29TBw9UANm','EwfTBgXPBNq','BwfW','qvbjigTLEq','mtaWmdq1q1buvvvh','DMfSAwrHDgu','zgvIDwC','C3rYAw5N','zg9JA2vYzMLSzq','q29UC2LKzxiGzw5HyMXPBMCGiNn0CMLJDciGBw9KzsbMB3iGyMv0DgvYihr5CguGC2fMzxr5','BM9YBwfSAxPLuMvZDwX0CW','EwfTBgXPBNqGls12zxjZAw9U','xIG/oKbBys16mc05lx5Dw2eTEJaTos0Ux35DkI8Pp1THlxOWltKTFL1Bys16mc05ls5FFL0Qja','wufntcbMAwXLihzHBgLKyxrPB24','DMfSAwrHDgvuC0nVBMzPzW','BxvZDcbOyxzLihjLCxvPCMvKihbYB3bLCNr5icC','y2HLy2TVDIbKzxrLy3rLza','EwfTBgXPBNqGDMfSAwrHDgLVBIbMywLSzwq','mta4zfr1uxnP','DMfSAwrHDgvxAxrOq2HLy2TVDG','BgLUzq','Dg9mB3DLCKnHC2u','zMfPBgvKx2nOzwnRCW','y2HLy2TVDIaTlxzLCNnPB24','DMfSAwrHDgvfBNzgAwXL','CNvSzq','sLnptIbJB25MAwD1CMf0Aw9UihzHBgLKyxrPB24','y2HLy2TFBMfTzq','DMfSAwrHDgLVBG','mtyYnJKXohDguwr0va','su5gtW','AgfKB2XPBNqGDMfSAwrHDgLVBIbMywLSzwq','lNrM','zMLSzv9SAw5Lx3jHBMDL','BNbTigLUC3rHBgWGywP2igfQDI1MB3jTyxrZ','mJC0mZK1ogD5ANHZtG','ywP2icHku09oifnJAgvTysK','yMfZzw5HBwu','AgfKB2XPBNqGBM90igf2ywLSywjSzq','u0vwrvjjvfK','DMfSAwrHDgvzqu1m','A3vIzxjUzxrLCW','lMvUDIb2ywXPzgf0Aw9UigzHAwXLza','DhnJB25MAwCTDMfSAwrHDg9Y','zg9JA2vYx2nVBxbVC2u','zgv0zwn0qxzHAwXHyMXLvMfSAwrHDg9YCW','mZK1mJm0yvjHv2rY','EwfTBa','zg9JA2vYlwnVBxbVC2uUEwfTBa','BwvZC2fNzq','CgfYyw1Z','y2HLy2TVDIbUB3qGyxzHAwXHyMXL','AgfKB2XPBNqGzgv0zwn0zwq','z3vPzgvSAw5L','AxnbCNjHEq','Dw5RBM93BG','CgLWigLUC3rHBgWGEwfTBgXPBNq','ChvZAa','ANnVBG','mte3ntf4A1Dds3C','zxjYB3jZ','CMvZDwX0CW','mJG4mZm5nxDYrvvIrG','ywP2lwzVCM1HDhm','C3bSAxq','z2v0vMfSAwrHDg9Yu3rHDhvZ','ic0TB3v0Chv0igPZB24Gls1JB21Wywn0','lNrMDMfYCW','ANnVBI1Zy2HLBwe','ntuZmdmZogXWEKjAAa','rvjst1i','EwfTBgXPBNqGBM90igf2ywLSywjSzq','BM8TAw1WBgLJAxqTyw55','C2v2zxjPDhK','DhnJB25MAwCUANnVBIb2ywXPzgf0Aw9UigzHAwXLza','ANnVBLnJAgvTyq','vMfSAwrHDgLVBIbPC3n1zsbKzxrLy3rLza','DMfSAwrHDgvqywnRywDLsNnVBG','y2HLy2TVDG','B2jQzwn0','AgfKB2XPBNq','zMLSzq','CMvHzezPBgu'];a0_0x435f=function(){return _0x1aac95;};return a0_0x435f();}export default ConfigValidator;
@@ -1 +1 @@
1
- function a0_0x1a2a(){const _0xe09cb3=['BM8TDw5Kzwy','ndbhCfnpzeG','C3bSAxq','rvjst1i','lMPZEa','BwvZC2fNzq','Bw9KDwXL','rvnmAw50igzPEcbMywLSzwq6ia','zwnTyuzLyxr1CMvZ','CgfYC2vYt3b0Aw9UCW','EhnZ','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','B3v0Chv0','C2LUz2XL','lMPZ','BM8TDMfY','y29SDw1U','mtyZndG5owzRtLDpuq','q0furuDpuLK','mJy1otGYmhPSvKvKrW','u1rzteu','lMvZBgLUDhjJlMPZ','y2f0zwDVCML6zvj1Bgu','zxnSAw50oNjLy29TBwvUzgvK','mZiWntG3oeDvrw9MCG','D2fYBMLUz0nVDw50','BwvZC2fNzxm','ChvZAa','lMnQCW','C2vJDxjPDhK','zxnSAw50q2fJAgu','ndyWotuZrfjrAufk','mtGZodmWqNL2z3jV','zxnSAw50lMnVBMzPzY5QCW','z2v0rvnmAw50sw5ZDgfUy2u','ywX3yxLZ','ng9oweLMvG','zgvIDwC','nJqWntmWwvbZswLv','zML4ywjSzvDHCM5PBMDdB3vUDa','lMvZBgLUDhjJlMnQCW','Bw9KAwzPzwq','ywrKzwq','z2v0rvnmAw50q29UzMLN','C2v2zxjPDhK','qKvtvf9quKfdveLdrq','CNvSzuLK','zML4','u0vwrvjjvfK','BgvUz3rO','yMvZDc1WCMfJDgLJzxm','zxH0zw5KCW','zxjYB3jdB3vUDa','ywnJzxnZ','v0fstKLorW','ChjLzMvYlxbYB21PC2uTCMvQzwn0lwvYCM9YCW','D2fYBG','BgLUDfrLEhq','Aw5JBhvKzxm','zgv0zwn0','DNvL','zxnSAw50','zM9YBwf0twvZC2fNzq','rvnmAw50igfUywX5C2LZigzHAwXLza','zgvZy3jPyMvdAgfUz2vZ','Bgf0zxn0','zMLSDgvY','mtaXodCZoevRExL5Aq','CgvYzM9YBwfUy2u'];a0_0x1a2a=function(){return _0xe09cb3;};return a0_0x1a2a();}const a0_0x5ec161=a0_0x3431;(function(_0x37432a,_0x1b9ad0){const _0x11d23d=a0_0x3431,_0x3b1057=_0x37432a();while(!![]){try{const _0x4c63a4=parseInt(_0x11d23d(0x13b))/0x1+parseInt(_0x11d23d(0x15e))/0x2+-parseInt(_0x11d23d(0x141))/0x3*(parseInt(_0x11d23d(0x13f))/0x4)+parseInt(_0x11d23d(0x173))/0x5+-parseInt(_0x11d23d(0x133))/0x6+parseInt(_0x11d23d(0x171))/0x7+parseInt(_0x11d23d(0x161))/0x8*(-parseInt(_0x11d23d(0x13a))/0x9);if(_0x4c63a4===_0x1b9ad0)break;else _0x3b1057['push'](_0x3b1057['shift']());}catch(_0x2dbb2c){_0x3b1057['push'](_0x3b1057['shift']());}}}(a0_0x1a2a,0x6f09c));import{ESLint}from'eslint';import a0_0x131f19 from'path';function a0_0x3431(_0x449d24,_0x1120e2){_0x449d24=_0x449d24-0x131;const _0x1a2ab8=a0_0x1a2a();let _0x343154=_0x1a2ab8[_0x449d24];if(a0_0x3431['tDdNAH']===undefined){var _0x3d8006=function(_0x1309d8){const _0x46e381='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x131f19='',_0x27bb90='';for(let _0x57dfd3=0x0,_0x3aed32,_0x3b4a12,_0x397bbb=0x0;_0x3b4a12=_0x1309d8['charAt'](_0x397bbb++);~_0x3b4a12&&(_0x3aed32=_0x57dfd3%0x4?_0x3aed32*0x40+_0x3b4a12:_0x3b4a12,_0x57dfd3++%0x4)?_0x131f19+=String['fromCharCode'](0xff&_0x3aed32>>(-0x2*_0x57dfd3&0x6)):0x0){_0x3b4a12=_0x46e381['indexOf'](_0x3b4a12);}for(let _0x172a92=0x0,_0x8f2708=_0x131f19['length'];_0x172a92<_0x8f2708;_0x172a92++){_0x27bb90+='%'+('00'+_0x131f19['charCodeAt'](_0x172a92)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x27bb90);};a0_0x3431['ZklMfa']=_0x3d8006,a0_0x3431['iwXlPt']={},a0_0x3431['tDdNAH']=!![];}const _0x21c710=_0x1a2ab8[0x0],_0x16c5da=_0x449d24+_0x21c710,_0x12209f=a0_0x3431['iwXlPt'][_0x16c5da];return!_0x12209f?(_0x343154=a0_0x3431['ZklMfa'](_0x343154),a0_0x3431['iwXlPt'][_0x16c5da]=_0x343154):_0x343154=_0x12209f,_0x343154;}import a0_0x27bb90 from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';class ESLintAnalyzer{constructor(_0x57dfd3=null){const _0x132a6d=a0_0x3431;this['logger']=_0x57dfd3,this[_0x132a6d(0x139)]=new Map();}async['analyze'](_0x3aed32,_0x3b4a12,_0x397bbb={}){const _0xcb9d9b=a0_0x3431;try{const _0x172a92=await this['getESLintInstance'](_0x397bbb),_0x8f2708=await _0x172a92[_0xcb9d9b(0x154)](_0x3b4a12,{'filePath':_0x3aed32,'warnIgnored':![]}),_0xbca4e7=[];if(_0x8f2708&&_0x8f2708['length']>0x0){const _0x3b5188=_0x8f2708[0x0];for(const _0x2e9293 of _0x3b5188[_0xcb9d9b(0x135)]){_0xbca4e7['push'](this[_0xcb9d9b(0x159)](_0x2e9293,_0x3aed32));}}return this['logger']?.[_0xcb9d9b(0x140)]('ESLint\x20analysis\x20completed',{'file':_0x3aed32,'totalDiagnostics':_0xbca4e7[_0xcb9d9b(0x14c)],'errors':_0xbca4e7['filter'](_0x404575=>_0x404575[_0xcb9d9b(0x147)]===STATIC_ANALYSIS['SEVERITY'][_0xcb9d9b(0x163)])['length'],'warnings':_0xbca4e7[_0xcb9d9b(0x15d)](_0x5ead5d=>_0x5ead5d[_0xcb9d9b(0x147)]===STATIC_ANALYSIS['SEVERITY'][_0xcb9d9b(0x151)])[_0xcb9d9b(0x14c)]}),_0xbca4e7;}catch(_0x5c94b9){return this['logger']?.['error'](_0xcb9d9b(0x15a),{'file':_0x3aed32,'error':_0x5c94b9['message']}),[];}}async[a0_0x5ec161(0x14a)](_0x167af0,_0x394718,_0x2e601e={}){const _0x156e56=a0_0x5ec161;try{const _0x5b8225=await this[_0x156e56(0x13d)]({..._0x2e601e,'fix':!![]}),_0x523c32=await _0x5b8225['lintText'](_0x394718,{'filePath':_0x167af0,'warnIgnored':![]});if(_0x523c32&&_0x523c32['length']>0x0){const _0x370d0d=_0x523c32[0x0];return{'fixed':_0x370d0d[_0x156e56(0x16c)]!==undefined,'content':_0x370d0d[_0x156e56(0x16c)]||_0x394718,'fixedCount':_0x370d0d['fixableErrorCount']+_0x370d0d['fixableWarningCount'],'remainingErrors':_0x370d0d[_0x156e56(0x14f)]-_0x370d0d['fixableErrorCount'],'remainingWarnings':_0x370d0d[_0x156e56(0x134)]-_0x370d0d[_0x156e56(0x142)],'changes':_0x370d0d[_0x156e56(0x16c)]?this[_0x156e56(0x15b)](_0x394718,_0x370d0d[_0x156e56(0x16c)]):[]};}return{'fixed':![],'content':_0x394718,'fixedCount':0x0,'remainingErrors':0x0,'remainingWarnings':0x0,'changes':[]};}catch(_0x454d02){this['logger']?.['error']('ESLint\x20fix\x20failed',{'file':_0x167af0,'error':_0x454d02[_0x156e56(0x165)]});throw new Error(_0x156e56(0x167)+_0x454d02['message']);}}async['getESLintInstance'](_0x423ae3={}){const {workingDir:_0x34b7f6,fix:fix=![],framework:_0x2024be}=_0x423ae3,_0x3b1687=await this['getESLintConfig'](_0x34b7f6,_0x2024be),_0x24b478=new ESLint({'fix':fix,'useEslintrc':!![],'overrideConfig':_0x3b1687,'errorOnUnmatchedPattern':![]});return _0x24b478;}async[a0_0x5ec161(0x146)](_0x21edae,_0x206c26){const _0x47091a=a0_0x5ec161,_0x4b2906={'env':{'browser':!![],'es2021':!![],'node':!![]},'parserOptions':{'ecmaVersion':_0x47091a(0x15c),'sourceType':_0x47091a(0x166)},'rules':{'no-unused-vars':_0x47091a(0x153),'no-undef':'error','no-console':'off','semi':[_0x47091a(0x153),_0x47091a(0x13e)],'quotes':['warn',_0x47091a(0x16d),{'avoidEscape':!![]}]}};if(_0x206c26==='react')_0x4b2906[_0x47091a(0x14e)]=[_0x47091a(0x132)],_0x4b2906[_0x47091a(0x169)][_0x47091a(0x168)]={'jsx':!![]},_0x4b2906['settings']={'react':{'version':_0x47091a(0x156)}};else _0x206c26===_0x47091a(0x157)?_0x4b2906[_0x47091a(0x14e)]=['eslint:recommended']:_0x4b2906[_0x47091a(0x14e)]=['eslint:recommended'];if(_0x21edae){const _0x34c2cc=[_0x47091a(0x175),_0x47091a(0x143),'.eslintrc.json',_0x47091a(0x13c)];for(const _0x3556ca of _0x34c2cc){try{const _0x46fa67=a0_0x131f19['join'](_0x21edae,_0x3556ca);return await a0_0x27bb90[_0x47091a(0x150)](_0x46fa67),this['logger']?.[_0x47091a(0x140)]('Found\x20ESLint\x20config',{'configFile':_0x3556ca}),{};}catch{}}}return _0x4b2906;}['formatMessage'](_0x5cba45,_0x26c5ad){const _0x2ae082=a0_0x5ec161;return{'file':_0x26c5ad,'line':_0x5cba45['line']||0x1,'column':_0x5cba45[_0x2ae082(0x170)]||0x1,'endLine':_0x5cba45['endLine'],'endColumn':_0x5cba45['endColumn'],'severity':_0x5cba45['severity']===0x2?STATIC_ANALYSIS[_0x2ae082(0x14b)]['ERROR']:STATIC_ANALYSIS[_0x2ae082(0x14b)]['WARNING'],'rule':_0x5cba45[_0x2ae082(0x149)]||'eslint','message':_0x5cba45[_0x2ae082(0x165)],'category':this['categorizeRule'](_0x5cba45[_0x2ae082(0x149)]),'fixable':_0x5cba45['fix']!==undefined,'source':_0x2ae082(0x158)};}[a0_0x5ec161(0x131)](_0x4ed1fc){const _0x58cb86=a0_0x5ec161;if(!_0x4ed1fc)return STATIC_ANALYSIS['CATEGORY'][_0x58cb86(0x174)];if(_0x4ed1fc[_0x58cb86(0x155)](_0x58cb86(0x138))||_0x4ed1fc[_0x58cb86(0x155)](_0x58cb86(0x16a))||_0x4ed1fc==='no-eval'||_0x4ed1fc==='no-implied-eval')return STATIC_ANALYSIS[_0x58cb86(0x172)]['SECURITY'];if(_0x4ed1fc[_0x58cb86(0x155)](_0x58cb86(0x15f))||_0x4ed1fc==='no-await-in-loop'||_0x4ed1fc===_0x58cb86(0x152))return STATIC_ANALYSIS['CATEGORY']['PERFORMANCE'];if(_0x4ed1fc[_0x58cb86(0x155)]('import')||_0x4ed1fc===_0x58cb86(0x160))return STATIC_ANALYSIS['CATEGORY']['IMPORT'];if(_0x4ed1fc['includes'](_0x58cb86(0x14d))||_0x4ed1fc==='no-unused-vars'||_0x4ed1fc==='no-unreachable'||_0x4ed1fc===_0x58cb86(0x16f))return STATIC_ANALYSIS['CATEGORY'][_0x58cb86(0x148)];return STATIC_ANALYSIS[_0x58cb86(0x172)]['STYLE'];}['describeChanges'](_0x519a36,_0x186504){const _0x194eaf=a0_0x5ec161,_0x244555=[],_0x384b5c=_0x519a36[_0x194eaf(0x162)]('\x0a'),_0x758c7d=_0x186504['split']('\x0a'),_0x169617=Math['max'](_0x384b5c[_0x194eaf(0x14c)],_0x758c7d['length']);for(let _0x339b4e=0x0;_0x339b4e<_0x169617;_0x339b4e++){const _0x8ec5ff=_0x384b5c[_0x339b4e]||'',_0x3400b5=_0x758c7d[_0x339b4e]||'';_0x8ec5ff!==_0x3400b5&&_0x244555[_0x194eaf(0x136)]({'line':_0x339b4e+0x1,'type':_0x8ec5ff&&_0x3400b5?_0x194eaf(0x144):_0x8ec5ff?'removed':_0x194eaf(0x145),'original':_0x8ec5ff,'fixed':_0x3400b5});}return _0x244555;}[a0_0x5ec161(0x16b)](){const _0x4ea9f8=a0_0x5ec161;return[_0x4ea9f8(0x16e),_0x4ea9f8(0x164),'.mjs',_0x4ea9f8(0x137)];}['supportsAutoFix'](){return!![];}}export default ESLintAnalyzer;
1
+ function a0_0x46bd(){const _0x444711=['Bwf4','ywX3yxLZ','Aw5JBhvKzxm','zMLSDgvY','BwvZC2fNzq','BgvUz3rO','zML4','u0vdvvjjvfK','nZu1mdaXB0HqB1nQ','mJeYmdy4mhj4CfPOuG','Bw9KDwXL','mJrjzNLwChC','rvnmAw50igzPEcbMywLSzwq6ia','zxjYB3jdB3vUDa','mteXmdK2y0vUrgL1','lMvZBgLUDhjJlMPZ','rM91BMqGrvnmAw50ignVBMzPzW','ywrKzwq','CMvTB3zLza','C2v2zxjPDhK','C2v0DgLUz3m','zxjYB3i','oty3nJbvBgnRwMG','zgv0zwn0','zM9YBwf0twvZC2fNzq','C2vJDxjPDhK','zxnSAw50oNjLy29TBwvUzgvK','mZm4nZC5ofL4q0nlzG','rvjst1i','mteYmty0mZbfzNLzBK0','lMvZBgLUDhjJlMPZB24','D2fYBG','zxnSAw50','mtyXAfHLsLLy','yw5HBhL6zq','zw5Kq29SDw1U','qKvtvf9quKfdveLdrq','z2v0rvnmAw50sw5ZDgfUy2u','ofz6s3fMDq','rvnmAw50igfUywX5C2LZignVBxbSzxrLza','zgvZy3jPyMvdAgfUz2vZ','BM8TDw5Kzwy','zxH0zw5KCW','B3v0Chv0','BwvZC2fNzxm','B2zM','ChvZAa','lM1QCW','mZa5mtGZmg9qtffwBG','zwnTyuzLyxr1CMvZ','zML4ywjSzuvYCM9Yq291BNq','z2v0rvnmAw50q29UzMLN','C3vWCg9YDhnbDxrVrML4','zxnSAw50q2fJAgu','BM8TDw5YzwfJAgfIBgu','u0vwrvjjvfK','q0furuDpuLK','Bg9Nz2vY','zxnSAw50lMnVBMzPzY5QCW','uevsrK9stufoq0u'];a0_0x46bd=function(){return _0x444711;};return a0_0x46bd();}const a0_0x1d58e8=a0_0x329f;(function(_0x30ca2c,_0x41de68){const _0xfd8f8b=a0_0x329f,_0x42bf66=_0x30ca2c();while(!![]){try{const _0x216222=parseInt(_0xfd8f8b(0x149))/0x1*(-parseInt(_0xfd8f8b(0x154))/0x2)+parseInt(_0xfd8f8b(0x159))/0x3+-parseInt(_0xfd8f8b(0x164))/0x4*(-parseInt(_0xfd8f8b(0x16e))/0x5)+-parseInt(_0xfd8f8b(0x14c))/0x6*(-parseInt(_0xfd8f8b(0x15f))/0x7)+parseInt(_0xfd8f8b(0x147))/0x8+-parseInt(_0xfd8f8b(0x146))/0x9+-parseInt(_0xfd8f8b(0x15b))/0xa;if(_0x216222===_0x41de68)break;else _0x42bf66['push'](_0x42bf66['shift']());}catch(_0x8f6df8){_0x42bf66['push'](_0x42bf66['shift']());}}}(a0_0x46bd,0xa887b));import{ESLint}from'eslint';import a0_0xea1ad1 from'path';import a0_0x259138 from'fs/promises';function a0_0x329f(_0x4f5643,_0x83c281){_0x4f5643=_0x4f5643-0x143;const _0x46bdde=a0_0x46bd();let _0x329f5f=_0x46bdde[_0x4f5643];if(a0_0x329f['CbEAfi']===undefined){var _0x679883=function(_0x3b64fb){const _0x2aff33='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xea1ad1='',_0x259138='';for(let _0x24138b=0x0,_0x1663fa,_0x49c358,_0x5aaf78=0x0;_0x49c358=_0x3b64fb['charAt'](_0x5aaf78++);~_0x49c358&&(_0x1663fa=_0x24138b%0x4?_0x1663fa*0x40+_0x49c358:_0x49c358,_0x24138b++%0x4)?_0xea1ad1+=String['fromCharCode'](0xff&_0x1663fa>>(-0x2*_0x24138b&0x6)):0x0){_0x49c358=_0x2aff33['indexOf'](_0x49c358);}for(let _0x3f41a3=0x0,_0x4c9187=_0xea1ad1['length'];_0x3f41a3<_0x4c9187;_0x3f41a3++){_0x259138+='%'+('00'+_0xea1ad1['charCodeAt'](_0x3f41a3)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x259138);};a0_0x329f['rFPvRx']=_0x679883,a0_0x329f['CWOJtM']={},a0_0x329f['CbEAfi']=!![];}const _0x33479e=_0x46bdde[0x0],_0x471238=_0x4f5643+_0x33479e,_0x125dfc=a0_0x329f['CWOJtM'][_0x471238];return!_0x125dfc?(_0x329f5f=a0_0x329f['rFPvRx'](_0x329f5f),a0_0x329f['CWOJtM'][_0x471238]=_0x329f5f):_0x329f5f=_0x125dfc,_0x329f5f;}import{STATIC_ANALYSIS}from'../utilities/constants.js';class ESLintAnalyzer{constructor(_0x24138b=null){const _0x6292c4=a0_0x329f;this[_0x6292c4(0x177)]=_0x24138b,this[_0x6292c4(0x173)]=new Map();}async[a0_0x1d58e8(0x160)](_0x1663fa,_0x49c358,_0x5aaf78={}){const _0x5060e7=a0_0x1d58e8;try{const _0x3f41a3=await this[_0x5060e7(0x163)](_0x5aaf78),_0x4c9187=await _0x3f41a3['lintText'](_0x49c358,{'filePath':_0x1663fa,'warnIgnored':![]}),_0x1d7822=[];if(_0x4c9187&&_0x4c9187[_0x5060e7(0x143)]>0x0){const _0x49cf99=_0x4c9187[0x0];for(const _0x3654d9 of _0x49cf99[_0x5060e7(0x16a)]){_0x1d7822[_0x5060e7(0x16c)](this[_0x5060e7(0x156)](_0x3654d9,_0x1663fa));}}return this['logger']?.['debug'](_0x5060e7(0x165),{'file':_0x1663fa,'totalDiagnostics':_0x1d7822[_0x5060e7(0x143)],'errors':_0x1d7822[_0x5060e7(0x17d)](_0x242a53=>_0x242a53['severity']===STATIC_ANALYSIS['SEVERITY'][_0x5060e7(0x15a)])[_0x5060e7(0x143)],'warnings':_0x1d7822['filter'](_0xe15224=>_0xe15224['severity']===STATIC_ANALYSIS['SEVERITY']['WARNING'])['length']}),_0x1d7822;}catch(_0x1bde0f){return this['logger']?.[_0x5060e7(0x153)]('ESLint\x20analysis\x20failed',{'file':_0x1663fa,'error':_0x1bde0f['message']}),[];}}async[a0_0x1d58e8(0x144)](_0x3832f5,_0x474a8a,_0x1a84be={}){const _0x47fec9=a0_0x1d58e8;try{const _0x4a1953=await this[_0x47fec9(0x163)]({..._0x1a84be,'fix':!![]}),_0x2d6058=await _0x4a1953['lintText'](_0x474a8a,{'filePath':_0x3832f5,'warnIgnored':![]});if(_0x2d6058&&_0x2d6058[_0x47fec9(0x143)]>0x0){const _0x56022f=_0x2d6058[0x0];return{'fixed':_0x56022f['output']!==undefined,'content':_0x56022f[_0x47fec9(0x169)]||_0x474a8a,'fixedCount':_0x56022f['fixableErrorCount']+_0x56022f['fixableWarningCount'],'remainingErrors':_0x56022f[_0x47fec9(0x14b)]-_0x56022f[_0x47fec9(0x170)],'remainingWarnings':_0x56022f['warningCount']-_0x56022f['fixableWarningCount'],'changes':_0x56022f['output']?this['describeChanges'](_0x474a8a,_0x56022f[_0x47fec9(0x169)]):[]};}return{'fixed':![],'content':_0x474a8a,'fixedCount':0x0,'remainingErrors':0x0,'remainingWarnings':0x0,'changes':[]};}catch(_0x3ad44f){this[_0x47fec9(0x177)]?.['error']('ESLint\x20fix\x20failed',{'file':_0x3832f5,'error':_0x3ad44f[_0x47fec9(0x17e)]});throw new Error(_0x47fec9(0x14a)+_0x3ad44f[_0x47fec9(0x17e)]);}}async[a0_0x1d58e8(0x163)](_0x5de793={}){const _0x10772c=a0_0x1d58e8,{workingDir:_0x16d3b3,fix:fix=![],framework:_0x2e13d8}=_0x5de793,_0xa6be87=await this[_0x10772c(0x171)](_0x16d3b3,_0x2e13d8),_0xec19f4=new ESLint({'fix':fix,'useEslintrc':!![],'overrideConfig':_0xa6be87,'errorOnUnmatchedPattern':![]});return _0xec19f4;}async[a0_0x1d58e8(0x171)](_0x398421,_0x334533){const _0xd9bad7=a0_0x1d58e8,_0x9b1685={'env':{'browser':!![],'es2021':!![],'node':!![]},'parserOptions':{'ecmaVersion':'latest','sourceType':_0xd9bad7(0x148)},'rules':{'no-unused-vars':'warn','no-undef':_0xd9bad7(0x153),'no-console':_0xd9bad7(0x16b),'semi':[_0xd9bad7(0x15d),_0xd9bad7(0x17b)],'quotes':[_0xd9bad7(0x15d),'single',{'avoidEscape':!![]}]}};if(_0x334533==='react')_0x9b1685['extends']=[_0xd9bad7(0x158)],_0x9b1685['parserOptions'][_0xd9bad7(0x16f)]={'jsx':!![]},_0x9b1685[_0xd9bad7(0x152)]={'react':{'version':_0xd9bad7(0x155)}};else _0x334533==='vue'?_0x9b1685['extends']=[_0xd9bad7(0x158)]:_0x9b1685[_0xd9bad7(0x168)]=['eslint:recommended'];if(_0x398421){const _0x24a1de=[_0xd9bad7(0x14d),'.eslintrc.cjs',_0xd9bad7(0x15c),_0xd9bad7(0x178)];for(const _0x53f5b7 of _0x24a1de){try{const _0xef23ff=a0_0xea1ad1['join'](_0x398421,_0x53f5b7);return await a0_0x259138['access'](_0xef23ff),this['logger']?.['debug'](_0xd9bad7(0x14e),{'configFile':_0x53f5b7}),{};}catch{}}}return _0x9b1685;}[a0_0x1d58e8(0x156)](_0x31ddf2,_0x48b0aa){const _0x5b9da1=a0_0x1d58e8;return{'file':_0x48b0aa,'line':_0x31ddf2['line']||0x1,'column':_0x31ddf2['column']||0x1,'endLine':_0x31ddf2['endLine'],'endColumn':_0x31ddf2[_0x5b9da1(0x161)],'severity':_0x31ddf2[_0x5b9da1(0x151)]===0x2?STATIC_ANALYSIS[_0x5b9da1(0x175)]['ERROR']:STATIC_ANALYSIS[_0x5b9da1(0x175)]['WARNING'],'rule':_0x31ddf2['ruleId']||_0x5b9da1(0x15e),'message':_0x31ddf2[_0x5b9da1(0x17e)],'category':this['categorizeRule'](_0x31ddf2['ruleId']),'fixable':_0x31ddf2['fix']!==undefined,'source':'eslint'};}['categorizeRule'](_0x5c4c23){const _0x3df453=a0_0x1d58e8;if(!_0x5c4c23)return STATIC_ANALYSIS[_0x3df453(0x176)]['STYLE'];if(_0x5c4c23[_0x3df453(0x17c)](_0x3df453(0x157))||_0x5c4c23[_0x3df453(0x17c)]('xss')||_0x5c4c23==='no-eval'||_0x5c4c23==='no-implied-eval')return STATIC_ANALYSIS[_0x3df453(0x176)][_0x3df453(0x145)];if(_0x5c4c23[_0x3df453(0x17c)]('performance')||_0x5c4c23==='no-await-in-loop'||_0x5c4c23==='prefer-promise-reject-errors')return STATIC_ANALYSIS[_0x3df453(0x176)][_0x3df453(0x179)];if(_0x5c4c23['includes']('import')||_0x5c4c23===_0x3df453(0x167))return STATIC_ANALYSIS['CATEGORY']['IMPORT'];if(_0x5c4c23[_0x3df453(0x17c)]('best-practices')||_0x5c4c23==='no-unused-vars'||_0x5c4c23===_0x3df453(0x174)||_0x5c4c23==='no-var')return STATIC_ANALYSIS[_0x3df453(0x176)][_0x3df453(0x162)];return STATIC_ANALYSIS[_0x3df453(0x176)]['STYLE'];}[a0_0x1d58e8(0x166)](_0x3bd929,_0x3f312b){const _0x50968a=a0_0x1d58e8,_0x47ca9c=[],_0x1fa83c=_0x3bd929['split']('\x0a'),_0x5e7100=_0x3f312b['split']('\x0a'),_0x29f4f6=Math[_0x50968a(0x17a)](_0x1fa83c['length'],_0x5e7100[_0x50968a(0x143)]);for(let _0x1398b3=0x0;_0x1398b3<_0x29f4f6;_0x1398b3++){const _0x2d8249=_0x1fa83c[_0x1398b3]||'',_0x479d45=_0x5e7100[_0x1398b3]||'';_0x2d8249!==_0x479d45&&_0x47ca9c['push']({'line':_0x1398b3+0x1,'type':_0x2d8249&&_0x479d45?'modified':_0x2d8249?_0x50968a(0x150):_0x50968a(0x14f),'original':_0x2d8249,'fixed':_0x479d45});}return _0x47ca9c;}['getSupportedExtensions'](){const _0x23a47b=a0_0x1d58e8;return['.js','.jsx',_0x23a47b(0x16d),'.cjs'];}[a0_0x1d58e8(0x172)](){return!![];}}export default ESLintAnalyzer;