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

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 (119) hide show
  1. package/README.md +2 -2
  2. package/bin/cli.js +1 -1
  3. package/bin/loxia-terminal-v2.js +1 -1
  4. package/bin/loxia-terminal.js +1 -1
  5. package/bin/start-with-terminal.js +1 -1
  6. package/package.json +1 -1
  7. package/scripts/install-scanners.js +1 -1
  8. package/src/analyzers/CSSAnalyzer.js +1 -1
  9. package/src/analyzers/ConfigValidator.js +1 -1
  10. package/src/analyzers/ESLintAnalyzer.js +1 -1
  11. package/src/analyzers/JavaScriptAnalyzer.js +1 -1
  12. package/src/analyzers/PrettierFormatter.js +1 -1
  13. package/src/analyzers/PythonAnalyzer.js +1 -1
  14. package/src/analyzers/SecurityAnalyzer.js +1 -1
  15. package/src/analyzers/TypeScriptAnalyzer.js +1 -1
  16. package/src/analyzers/codeCloneDetector/analyzer.js +1 -1
  17. package/src/analyzers/codeCloneDetector/detector.js +1 -1
  18. package/src/analyzers/codeCloneDetector/index.js +1 -1
  19. package/src/analyzers/codeCloneDetector/parser.js +1 -1
  20. package/src/analyzers/codeCloneDetector/reporter.js +1 -1
  21. package/src/analyzers/codeCloneDetector/scanner.js +1 -1
  22. package/src/core/agentPool.js +1 -1
  23. package/src/core/agentScheduler.js +1 -1
  24. package/src/core/contextManager.js +1 -1
  25. package/src/core/messageProcessor.js +1 -1
  26. package/src/core/orchestrator.js +1 -1
  27. package/src/core/stateManager.js +1 -1
  28. package/src/index.js +1 -1
  29. package/src/interfaces/cli.js +1 -1
  30. package/src/interfaces/terminal/__tests__/smoke/advancedFeatures.test.js +1 -1
  31. package/src/interfaces/terminal/__tests__/smoke/agentControl.test.js +1 -1
  32. package/src/interfaces/terminal/__tests__/smoke/agents.test.js +1 -1
  33. package/src/interfaces/terminal/__tests__/smoke/components.test.js +1 -1
  34. package/src/interfaces/terminal/__tests__/smoke/connection.test.js +1 -1
  35. package/src/interfaces/terminal/__tests__/smoke/enhancements.test.js +1 -1
  36. package/src/interfaces/terminal/__tests__/smoke/imports.test.js +1 -1
  37. package/src/interfaces/terminal/__tests__/smoke/messages.test.js +1 -1
  38. package/src/interfaces/terminal/__tests__/smoke/tools.test.js +1 -1
  39. package/src/interfaces/terminal/api/apiClient.js +1 -1
  40. package/src/interfaces/terminal/api/messageRouter.js +1 -1
  41. package/src/interfaces/terminal/api/session.js +1 -1
  42. package/src/interfaces/terminal/api/websocket.js +1 -1
  43. package/src/interfaces/terminal/components/AgentCreator.js +1 -1
  44. package/src/interfaces/terminal/components/AgentEditor.js +1 -1
  45. package/src/interfaces/terminal/components/AgentSwitcher.js +1 -1
  46. package/src/interfaces/terminal/components/ErrorBoundary.js +1 -1
  47. package/src/interfaces/terminal/components/ErrorPanel.js +1 -1
  48. package/src/interfaces/terminal/components/Header.js +1 -1
  49. package/src/interfaces/terminal/components/HelpPanel.js +1 -1
  50. package/src/interfaces/terminal/components/InputBox.js +1 -1
  51. package/src/interfaces/terminal/components/Layout.js +1 -1
  52. package/src/interfaces/terminal/components/LoadingSpinner.js +1 -1
  53. package/src/interfaces/terminal/components/MessageList.js +1 -1
  54. package/src/interfaces/terminal/components/MultilineTextInput.js +1 -1
  55. package/src/interfaces/terminal/components/SearchPanel.js +1 -1
  56. package/src/interfaces/terminal/components/SettingsPanel.js +1 -1
  57. package/src/interfaces/terminal/components/StatusBar.js +1 -1
  58. package/src/interfaces/terminal/components/TextInput.js +1 -1
  59. package/src/interfaces/terminal/config/agentEditorConstants.js +1 -1
  60. package/src/interfaces/terminal/config/constants.js +1 -1
  61. package/src/interfaces/terminal/index.js +1 -1
  62. package/src/interfaces/terminal/state/useAgentControl.js +1 -1
  63. package/src/interfaces/terminal/state/useAgents.js +1 -1
  64. package/src/interfaces/terminal/state/useConnection.js +1 -1
  65. package/src/interfaces/terminal/state/useMessages.js +1 -1
  66. package/src/interfaces/terminal/state/useTools.js +1 -1
  67. package/src/interfaces/terminal/utils/debugLogger.js +1 -1
  68. package/src/interfaces/terminal/utils/settingsStorage.js +1 -1
  69. package/src/interfaces/terminal/utils/theme.js +1 -1
  70. package/src/interfaces/webServer.js +1 -1
  71. package/src/modules/fileExplorer/controller.js +1 -1
  72. package/src/modules/fileExplorer/index.js +1 -1
  73. package/src/modules/fileExplorer/middleware.js +1 -1
  74. package/src/modules/fileExplorer/routes.js +1 -1
  75. package/src/services/aiService.js +1 -1
  76. package/src/services/apiKeyManager.js +1 -1
  77. package/src/services/benchmarkService.js +1 -1
  78. package/src/services/budgetService.js +1 -1
  79. package/src/services/contextInjectionService.js +1 -1
  80. package/src/services/conversationCompactionService.js +1 -1
  81. package/src/services/errorHandler.js +1 -1
  82. package/src/services/fileAttachmentService.js +1 -1
  83. package/src/services/modelRouterService.js +1 -1
  84. package/src/services/modelsService.js +1 -1
  85. package/src/services/qualityInspector.js +1 -1
  86. package/src/services/tokenCountingService.js +1 -1
  87. package/src/tools/agentCommunicationTool.js +1 -1
  88. package/src/tools/agentDelayTool.js +1 -1
  89. package/src/tools/asyncToolManager.js +1 -1
  90. package/src/tools/baseTool.js +1 -1
  91. package/src/tools/browserTool.js +1 -1
  92. package/src/tools/cloneDetectionTool.js +1 -1
  93. package/src/tools/dependencyResolverTool.js +1 -1
  94. package/src/tools/fileContentReplaceTool.js +1 -1
  95. package/src/tools/fileSystemTool.js +1 -1
  96. package/src/tools/fileTreeTool.js +1 -1
  97. package/src/tools/imageTool.js +1 -1
  98. package/src/tools/importAnalyzerTool.js +1 -1
  99. package/src/tools/jobDoneTool.js +1 -1
  100. package/src/tools/seekTool.js +1 -1
  101. package/src/tools/staticAnalysisTool.js +1 -1
  102. package/src/tools/taskManagerTool.js +1 -1
  103. package/src/tools/terminalTool.js +1 -1
  104. package/src/tools/webTool.js +1 -1
  105. package/src/types/agent.js +1 -1
  106. package/src/types/contextReference.js +1 -1
  107. package/src/types/conversation.js +1 -1
  108. package/src/types/toolCommand.js +1 -1
  109. package/src/utilities/attachmentValidator.js +1 -1
  110. package/src/utilities/configManager.js +1 -1
  111. package/src/utilities/constants.js +1 -1
  112. package/src/utilities/directoryAccessManager.js +1 -1
  113. package/src/utilities/fileProcessor.js +1 -1
  114. package/src/utilities/logger.js +1 -1
  115. package/src/utilities/tagParser.js +1 -1
  116. package/src/utilities/toolConstants.js +1 -1
  117. package/web-ui/build/index.html +2 -2
  118. package/web-ui/build/static/{index-BVF_10a5.css → index-BmKxmRe3.css} +1 -1
  119. package/web-ui/build/static/{index-DE5VFS1q.js → index-BzXbDs8z.js} +63 -63
package/README.md CHANGED
@@ -99,7 +99,7 @@ npm install -g @loxia-labs/loxia-autopilot-one
99
99
 
100
100
  ```bash
101
101
  loxia --version
102
- # Should display: Loxia Autopilot One v1.0.7
102
+ # Should display: Loxia Autopilot One v1.0.8
103
103
  ```
104
104
 
105
105
  ### 4. Create an API Key
@@ -368,7 +368,7 @@ Loxia automatically compacts long conversations to stay within token limits:
368
368
 
369
369
  ## 🛣️ Roadmap
370
370
 
371
- ### Current Version (1.0.3)
371
+ ### Current Version (1.0.8)
372
372
 
373
373
  - ✅ Multi-agent orchestration
374
374
  - ✅ 18+ specialized tools
package/bin/cli.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x27a322=a0_0x52bb;(function(_0x528674,_0xdc3d6a){const _0x18d418=a0_0x52bb,_0x3538d4=_0x528674();while(!![]){try{const _0x1a3ed1=parseInt(_0x18d418(0xa8))/0x1+parseInt(_0x18d418(0x99))/0x2*(parseInt(_0x18d418(0x95))/0x3)+-parseInt(_0x18d418(0xb2))/0x4*(parseInt(_0x18d418(0x9d))/0x5)+-parseInt(_0x18d418(0x8e))/0x6*(-parseInt(_0x18d418(0xb1))/0x7)+parseInt(_0x18d418(0x93))/0x8+parseInt(_0x18d418(0x88))/0x9+parseInt(_0x18d418(0x8f))/0xa*(-parseInt(_0x18d418(0x83))/0xb);if(_0x1a3ed1===_0xdc3d6a)break;else _0x3538d4['push'](_0x3538d4['shift']());}catch(_0x11ddb0){_0x3538d4['push'](_0x3538d4['shift']());}}}(a0_0x2461,0x2228e));import{fileURLToPath}from'url';import{dirname,join}from'path';import{spawn,exec}from'child_process';import{readFileSync}from'fs';import a0_0x4fa148 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x27a322(0x8b),SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process[a0_0x27a322(0x7c)][a0_0x27a322(0x9b)](0x2),command=args[0x0]&&!args[0x0]['startsWith']('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args[a0_0x27a322(0x80)]('--help')||args['includes']('-h'),'version':args[a0_0x27a322(0x80)](a0_0x27a322(0xad))||args['includes']('-v')};for(let i=0x0;i<args[a0_0x27a322(0x94)];i++){args[i]==='--port'&&args[i+0x1]&&(flags[a0_0x27a322(0x82)]=parseInt(args[i+0x1],0xa)),args[i]===a0_0x27a322(0xa9)&&args[i+0x1]&&(flags['host']=args[i+0x1]);}const port=flags[a0_0x27a322(0x82)]||DEFAULT_PORT,host=flags['host']||DEFAULT_HOST,serverUrl=a0_0x27a322(0x86)+host+':'+port;if(flags[a0_0x27a322(0x92)]){const pkgPath=join(__dirname,'..',a0_0x27a322(0x9a)),pkg=JSON['parse'](readFileSync(pkgPath,a0_0x27a322(0x74)));console['log']('Loxia\x20Autopilot\x20One\x20v'+pkg[a0_0x27a322(0x92)]),process['exit'](0x0);}if(flags['help']||!command){const pkgPath=join(__dirname,'..',a0_0x27a322(0x9a)),pkg=JSON[a0_0x27a322(0x8c)](readFileSync(pkgPath,a0_0x27a322(0x74)));console[a0_0x27a322(0x9e)]('\x0aLoxia\x20Autopilot\x20One\x20v'+pkg['version']+a0_0x27a322(0x77)+DEFAULT_PORT+a0_0x27a322(0x97)+DEFAULT_HOST+')\x0a\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x20message\x0a\x20\x20-v,\x20--version\x20\x20\x20\x20\x20Show\x20version\x20number\x0a\x0aExamples:\x0a\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20open\x20browser\x0a\x20\x20loxia\x20terminal\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Connect\x20Terminal\x20UI\x20to\x20running\x20server\x0a\x20\x20loxia\x20plus-terminal\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a\x20\x20loxia\x20web\x20--port\x203000\x20\x20\x20\x20#\x20Use\x20custom\x20port\x0a\x0aQuick\x20Start:\x0a\x20\x201.\x20Run\x20\x27loxia\x20web\x27\x20to\x20start\x20with\x20Web\x20UI\x0a\x20\x202.\x20Or\x20run\x20\x27loxia\x20plus-terminal\x27\x20for\x20Terminal\x20UI\x20experience\x0a\x0aDocumentation:\x0a\x20\x20https://autopilot.loxia.ai\x0a\x0a'),process[a0_0x27a322(0x76)](0x0);}function a0_0x52bb(_0x31d8a3,_0x8dedec){_0x31d8a3=_0x31d8a3-0x72;const _0x24611f=a0_0x2461();let _0x52bbbc=_0x24611f[_0x31d8a3];return _0x52bbbc;}async function checkServerRunning(_0x6f3913,_0x5db77d,_0x3f0e82=0x1){for(let _0x2d9fd1=0x0;_0x2d9fd1<_0x3f0e82;_0x2d9fd1++){const _0x2f8730=await new Promise(_0x414701=>{const _0x38eb46=a0_0x52bb,_0x18c442=a0_0x4fa148[_0x38eb46(0x96)](_0x38eb46(0x86)+_0x6f3913+':'+_0x5db77d+'/api/health',_0x3691fb=>{const _0x1e9db5=_0x38eb46;_0x414701(_0x3691fb[_0x1e9db5(0x8d)]===0xc8);});_0x18c442['on'](_0x38eb46(0x84),()=>_0x414701(![])),_0x18c442[_0x38eb46(0xb0)](0x7d0,()=>{_0x18c442['destroy'](),_0x414701(![]);});});if(_0x2f8730)return!![];_0x2d9fd1<_0x3f0e82-0x1&&await new Promise(_0x32ae36=>setTimeout(_0x32ae36,SERVER_CHECK_INTERVAL));}return![];}async function waitForServer(_0x57e229,_0x504302,_0x54100d=SERVER_STARTUP_TIMEOUT){const _0x5c26c7=Math['ceil'](_0x54100d/SERVER_CHECK_INTERVAL);return checkServerRunning(_0x57e229,_0x504302,_0x5c26c7);}function openBrowser(_0x272672){const _0x4ef4c9=a0_0x27a322,_0x2314b5=process[_0x4ef4c9(0xa7)];let _0x5b4c83;if(_0x2314b5==='darwin')_0x5b4c83=_0x4ef4c9(0xac)+_0x272672+'\x22';else _0x2314b5===_0x4ef4c9(0x7e)?_0x5b4c83=_0x4ef4c9(0x87)+_0x272672+'\x22':_0x5b4c83=_0x4ef4c9(0xaa)+_0x272672+'\x22';exec(_0x5b4c83,_0x1aeab7=>{const _0x28d25e=_0x4ef4c9;_0x1aeab7&&(console[_0x28d25e(0x9e)](_0x28d25e(0x78)),console[_0x28d25e(0x9e)]('Please\x20open\x20manually:\x20'+_0x272672));});}function startServer(_0x40aba6=![]){const _0x3b2517=a0_0x27a322,_0x28df71={...process[_0x3b2517(0xa0)],'LOXIA_PORT':port[_0x3b2517(0xa4)](),'PORT':port[_0x3b2517(0xa4)]()};flags['host']&&(_0x28df71[_0x3b2517(0xa2)]=flags[_0x3b2517(0x7a)]);const _0x1ea5fb=join(__dirname,'..','src','index.js'),_0x4e8b23=spawn(_0x3b2517(0x75),[_0x1ea5fb],{'cwd':join(__dirname,'..'),'env':_0x28df71,'stdio':_0x40aba6?[_0x3b2517(0x9f),'ignore','ignore']:_0x3b2517(0x85),'detached':_0x40aba6});return _0x40aba6&&_0x4e8b23[_0x3b2517(0x7b)](),_0x4e8b23;}function a0_0x2461(){const _0x320109=['env','Error:','LOXIA_HOST','\x0aPlease\x20start\x20the\x20server\x20first:','toString','\x0aOpening\x20Web\x20UI\x20at\x20','Starting\x20Terminal\x20UI...\x0a','platform','217166KyufiH','--host','xdg-open\x20\x22','\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI','open\x20\x22','--version','Server\x20is\x20running\x20at\x20','Waiting\x20for\x20server\x20to\x20start...','setTimeout','6181npqlLi','44VvBFLn','SIGTERM','Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.','utf8','node','exit','\x20-\x20AI\x20Agent\x20System\x0a\x0aUsage:\x0a\x20\x20loxia\x20<command>\x20[options]\x0a\x0aCommands:\x0a\x20\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20+\x20open\x20Web\x20UI\x20in\x20browser\x0a\x20\x20terminal\x20\x20\x20\x20\x20\x20\x20\x20Start\x20Terminal\x20UI\x20(server\x20must\x20be\x20running)\x0a\x20\x20plus-web\x20\x20\x20\x20\x20\x20\x20\x20Alias\x20for\x20\x27web\x27\x0a\x20\x20plus-terminal\x20\x20\x20Start\x20server\x20+\x20Terminal\x20UI\x20together\x0a\x0aOptions:\x0a\x20\x20--port\x20<number>\x20\x20\x20Specify\x20port\x20(default:\x20','Could\x20not\x20open\x20browser\x20automatically.','Starting\x20Loxia\x20server\x20in\x20background...','host','unref','argv','SIGINT','win32','Checking\x20if\x20server\x20is\x20running...','includes','Server\x20running\x20at\x20','port','2202959RGatvO','error','inherit','http://','start\x20\x22\x22\x20\x22','128673rlpRjd','web','\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.','localhost','parse','statusCode','822Kniulq','10lEnYPA','kill','catch','version','827808EvEcfK','length','687glahiM','get',')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20','loxia-terminal.js','520orvCVX','package.json','slice','Unknown\x20command:\x20','79665zGreXO','log','ignore'];a0_0x2461=function(){return _0x320109;};return a0_0x2461();}function startTerminalUI(){const _0x3c389a=a0_0x27a322,_0x3a9c40=join(__dirname,_0x3c389a(0x98)),_0x34cc17={...process[_0x3c389a(0xa0)],'LOXIA_PORT':port[_0x3c389a(0xa4)](),'LOXIA_HOST':host},_0x4404e7=spawn(_0x3c389a(0x75),[_0x3a9c40],{'cwd':join(__dirname,'..'),'env':_0x34cc17,'stdio':_0x3c389a(0x85)});return _0x4404e7;}const commands={'web':async()=>{const _0x1275e8=a0_0x27a322;console[_0x1275e8(0x9e)]('Starting\x20Loxia\x20server...\x0a');const _0xf8fa17=startServer(![]);console[_0x1275e8(0x9e)](_0x1275e8(0xaf));const _0x5e7e1d=await waitForServer(host,port);_0x5e7e1d?(console[_0x1275e8(0x9e)](_0x1275e8(0xa5)+serverUrl),openBrowser(serverUrl)):console[_0x1275e8(0x9e)]('\x0aServer\x20may\x20still\x20be\x20starting.\x20Open\x20'+serverUrl+'\x20manually.'),process['on']('SIGINT',()=>_0xf8fa17[_0x1275e8(0x90)](_0x1275e8(0x7d))),process['on']('SIGTERM',()=>_0xf8fa17['kill']('SIGTERM')),_0xf8fa17['on'](_0x1275e8(0x76),_0x55900f=>process[_0x1275e8(0x76)](_0x55900f||0x0));},'plus-web':async()=>{const _0x404964=a0_0x27a322;await commands[_0x404964(0x89)]();},'terminal':async()=>{const _0x509afc=a0_0x27a322;console[_0x509afc(0x9e)](_0x509afc(0x7f));const _0x3cdb18=await checkServerRunning(host,port);!_0x3cdb18&&(console[_0x509afc(0x84)]('\x0aServer\x20is\x20not\x20running\x20at\x20'+serverUrl),console[_0x509afc(0x84)](_0x509afc(0xa3)),console['error'](_0x509afc(0xab)),console[_0x509afc(0x84)]('\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a'),process['exit'](0x1));console[_0x509afc(0x9e)](_0x509afc(0xae)+serverUrl),console['log'](_0x509afc(0xa6));const _0xc19780=startTerminalUI();process['on'](_0x509afc(0x7d),()=>_0xc19780[_0x509afc(0x90)](_0x509afc(0x7d))),process['on'](_0x509afc(0x72),()=>_0xc19780['kill']('SIGTERM')),_0xc19780['on'](_0x509afc(0x76),_0x5a5be6=>process['exit'](_0x5a5be6||0x0));},'plus-terminal':async()=>{const _0x22c46e=a0_0x27a322;console[_0x22c46e(0x9e)](_0x22c46e(0x79));const _0x52f80f=startServer(!![]),_0x5e259d=await waitForServer(host,port);!_0x5e259d&&(console[_0x22c46e(0x84)](_0x22c46e(0x8a)),process['exit'](0x1));console[_0x22c46e(0x9e)](_0x22c46e(0x81)+serverUrl),console['log']('Starting\x20Terminal\x20UI...\x0a');const _0x451144=startTerminalUI();_0x451144['on'](_0x22c46e(0x76),_0x32972f=>{const _0x5344ac=_0x22c46e;console[_0x5344ac(0x9e)]('\x0aShutting\x20down\x20server...');try{process[_0x5344ac(0x90)](_0x52f80f['pid'],'SIGTERM');}catch(_0x3afe18){}process[_0x5344ac(0x76)](_0x32972f||0x0);}),process['on'](_0x22c46e(0x7d),()=>{const _0x41bffa=_0x22c46e;_0x451144['kill'](_0x41bffa(0x7d));}),process['on'](_0x22c46e(0x72),()=>{const _0x2aae1d=_0x22c46e;_0x451144[_0x2aae1d(0x90)](_0x2aae1d(0x72));});}};commands[command]?commands[command]()[a0_0x27a322(0x91)](_0x4ffc57=>{const _0x285d92=a0_0x27a322;console[_0x285d92(0x84)](_0x285d92(0xa1),_0x4ffc57['message']),process[_0x285d92(0x76)](0x1);}):(console['error'](a0_0x27a322(0x9c)+command),console[a0_0x27a322(0x84)](a0_0x27a322(0x73)),process[a0_0x27a322(0x76)](0x1));
3
+ const a0_0x1cf3b5=a0_0x427f;(function(_0x251f47,_0x335b46){const _0x580400=a0_0x427f,_0x51d01d=_0x251f47();while(!![]){try{const _0x51f3ee=-parseInt(_0x580400(0x213))/0x1+-parseInt(_0x580400(0x1f8))/0x2*(-parseInt(_0x580400(0x223))/0x3)+-parseInt(_0x580400(0x228))/0x4+parseInt(_0x580400(0x210))/0x5+-parseInt(_0x580400(0x1f7))/0x6*(parseInt(_0x580400(0x219))/0x7)+-parseInt(_0x580400(0x222))/0x8*(-parseInt(_0x580400(0x1ff))/0x9)+-parseInt(_0x580400(0x224))/0xa;if(_0x51f3ee===_0x335b46)break;else _0x51d01d['push'](_0x51d01d['shift']());}catch(_0x2ba819){_0x51d01d['push'](_0x51d01d['shift']());}}}(a0_0x26d3,0x99221));import{fileURLToPath}from'url';import{dirname,join}from'path';import{spawn,exec}from'child_process';function a0_0x427f(_0x55836e,_0x31f002){_0x55836e=_0x55836e-0x1f4;const _0x26d3c8=a0_0x26d3();let _0x427f90=_0x26d3c8[_0x55836e];return _0x427f90;}import{readFileSync}from'fs';import a0_0x56f43f from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x1cf3b5(0x1fe),SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process[a0_0x1cf3b5(0x221)][a0_0x1cf3b5(0x201)](0x2),command=args[0x0]&&!args[0x0]['startsWith']('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args[a0_0x1cf3b5(0x227)](a0_0x1cf3b5(0x218))||args[a0_0x1cf3b5(0x227)]('-h'),'version':args[a0_0x1cf3b5(0x227)](a0_0x1cf3b5(0x20e))||args['includes']('-v')};function a0_0x26d3(){const _0xace574=['setTimeout','http://','Starting\x20Terminal\x20UI...\x0a','index.js','toString','\x20manually.','error','package.json','catch','--host','ignore','Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.',')\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','\x0aPlease\x20start\x20the\x20server\x20first:','279306HLupDZ','4ScyvLu','parse','exit','\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI','src','win32','localhost','3177oIWbVM','open\x20\x22','slice','get','help','pid','/api/health','Waiting\x20for\x20server\x20to\x20start...','destroy','Please\x20open\x20manually:\x20','Could\x20not\x20open\x20browser\x20automatically.','log','utf8','\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.','darwin','--version','kill','3101605pdKdwi',')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20','\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a','694504HPPHZd','length','Checking\x20if\x20server\x20is\x20running...','env','Unknown\x20command:\x20','--help','70VNxgXR','web','Server\x20is\x20running\x20at\x20','SIGINT','host','Error:','SIGTERM','node','argv','21608NiVhnk','1119867VuBQWJ','1171530fhwrQq','platform','inherit','includes','1663808jHNbmv','port','\x0aShutting\x20down\x20server...','LOXIA_HOST','\x0aServer\x20may\x20still\x20be\x20starting.\x20Open\x20','\x0aServer\x20is\x20not\x20running\x20at\x20','version','xdg-open\x20\x22','statusCode'];a0_0x26d3=function(){return _0xace574;};return a0_0x26d3();}for(let i=0x0;i<args[a0_0x1cf3b5(0x214)];i++){args[i]==='--port'&&args[i+0x1]&&(flags[a0_0x1cf3b5(0x229)]=parseInt(args[i+0x1],0xa)),args[i]===a0_0x1cf3b5(0x23a)&&args[i+0x1]&&(flags[a0_0x1cf3b5(0x21d)]=args[i+0x1]);}const port=flags[a0_0x1cf3b5(0x229)]||DEFAULT_PORT,host=flags[a0_0x1cf3b5(0x21d)]||DEFAULT_HOST,serverUrl=a0_0x1cf3b5(0x232)+host+':'+port;if(flags[a0_0x1cf3b5(0x22e)]){const pkgPath=join(__dirname,'..',a0_0x1cf3b5(0x238)),pkg=JSON[a0_0x1cf3b5(0x1f9)](readFileSync(pkgPath,a0_0x1cf3b5(0x20b)));console['log']('Loxia\x20Autopilot\x20One\x20v'+pkg[a0_0x1cf3b5(0x22e)]),process[a0_0x1cf3b5(0x1fa)](0x0);}if(flags[a0_0x1cf3b5(0x203)]||!command){const pkgPath=join(__dirname,'..','package.json'),pkg=JSON['parse'](readFileSync(pkgPath,'utf8'));console[a0_0x1cf3b5(0x20a)]('\x0aLoxia\x20Autopilot\x20One\x20v'+pkg[a0_0x1cf3b5(0x22e)]+'\x20-\x20AI\x20Agent\x20System\x0a\x0aUsage:\x0a\x20\x20loxia\x20<command>\x20[options]\x0a\x0aCommands:\x0a\x20\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20+\x20open\x20Web\x20UI\x20in\x20browser\x0a\x20\x20terminal\x20\x20\x20\x20\x20\x20\x20\x20Start\x20Terminal\x20UI\x20(server\x20must\x20be\x20running)\x0a\x20\x20plus-web\x20\x20\x20\x20\x20\x20\x20\x20Alias\x20for\x20\x27web\x27\x0a\x20\x20plus-terminal\x20\x20\x20Start\x20server\x20+\x20Terminal\x20UI\x20together\x0a\x0aOptions:\x0a\x20\x20--port\x20<number>\x20\x20\x20Specify\x20port\x20(default:\x20'+DEFAULT_PORT+a0_0x1cf3b5(0x211)+DEFAULT_HOST+a0_0x1cf3b5(0x1f5)),process['exit'](0x0);}async function checkServerRunning(_0x1ee160,_0xa1e672,_0x4dac60=0x1){for(let _0x4620e9=0x0;_0x4620e9<_0x4dac60;_0x4620e9++){const _0x1bd8ba=await new Promise(_0x3afe98=>{const _0x49d120=a0_0x427f,_0x26671f=a0_0x56f43f[_0x49d120(0x202)](_0x49d120(0x232)+_0x1ee160+':'+_0xa1e672+_0x49d120(0x205),_0x5474e3=>{const _0xdb4741=_0x49d120;_0x3afe98(_0x5474e3[_0xdb4741(0x230)]===0xc8);});_0x26671f['on'](_0x49d120(0x237),()=>_0x3afe98(![])),_0x26671f[_0x49d120(0x231)](0x7d0,()=>{const _0x7e8e0d=_0x49d120;_0x26671f[_0x7e8e0d(0x207)](),_0x3afe98(![]);});});if(_0x1bd8ba)return!![];_0x4620e9<_0x4dac60-0x1&&await new Promise(_0x91950f=>setTimeout(_0x91950f,SERVER_CHECK_INTERVAL));}return![];}async function waitForServer(_0x4b5f1d,_0x205ea7,_0x2a4325=SERVER_STARTUP_TIMEOUT){const _0x40a0fb=Math['ceil'](_0x2a4325/SERVER_CHECK_INTERVAL);return checkServerRunning(_0x4b5f1d,_0x205ea7,_0x40a0fb);}function openBrowser(_0x3a61ee){const _0x1898bd=a0_0x1cf3b5,_0x47c2fe=process[_0x1898bd(0x225)];let _0x19a3e7;if(_0x47c2fe===_0x1898bd(0x20d))_0x19a3e7=_0x1898bd(0x200)+_0x3a61ee+'\x22';else _0x47c2fe===_0x1898bd(0x1fd)?_0x19a3e7='start\x20\x22\x22\x20\x22'+_0x3a61ee+'\x22':_0x19a3e7=_0x1898bd(0x22f)+_0x3a61ee+'\x22';exec(_0x19a3e7,_0x47235d=>{const _0x17d41e=_0x1898bd;_0x47235d&&(console['log'](_0x17d41e(0x209)),console[_0x17d41e(0x20a)](_0x17d41e(0x208)+_0x3a61ee));});}function startServer(_0x3a06c5=![]){const _0x1f13d=a0_0x1cf3b5,_0x8ad2b8={...process[_0x1f13d(0x216)],'LOXIA_PORT':port[_0x1f13d(0x235)](),'PORT':port[_0x1f13d(0x235)]()};flags[_0x1f13d(0x21d)]&&(_0x8ad2b8[_0x1f13d(0x22b)]=flags[_0x1f13d(0x21d)]);const _0x23bb31=join(__dirname,'..',_0x1f13d(0x1fc),_0x1f13d(0x234)),_0xc11f2b=spawn(_0x1f13d(0x220),[_0x23bb31],{'cwd':join(__dirname,'..'),'env':_0x8ad2b8,'stdio':_0x3a06c5?[_0x1f13d(0x23b),'ignore','ignore']:_0x1f13d(0x226),'detached':_0x3a06c5});return _0x3a06c5&&_0xc11f2b['unref'](),_0xc11f2b;}function startTerminalUI(){const _0x1e120b=a0_0x1cf3b5,_0x462d77=join(__dirname,'loxia-terminal.js'),_0x43cf34={...process[_0x1e120b(0x216)],'LOXIA_PORT':port['toString'](),'LOXIA_HOST':host},_0x1488b2=spawn('node',[_0x462d77],{'cwd':join(__dirname,'..'),'env':_0x43cf34,'stdio':_0x1e120b(0x226)});return _0x1488b2;}const commands={'web':async()=>{const _0x671bb7=a0_0x1cf3b5;console[_0x671bb7(0x20a)]('Starting\x20Loxia\x20server...\x0a');const _0x78ff55=startServer(![]);console[_0x671bb7(0x20a)](_0x671bb7(0x206));const _0x1d6fd1=await waitForServer(host,port);_0x1d6fd1?(console[_0x671bb7(0x20a)]('\x0aOpening\x20Web\x20UI\x20at\x20'+serverUrl),openBrowser(serverUrl)):console[_0x671bb7(0x20a)](_0x671bb7(0x22c)+serverUrl+_0x671bb7(0x236)),process['on'](_0x671bb7(0x21c),()=>_0x78ff55['kill'](_0x671bb7(0x21c))),process['on'](_0x671bb7(0x21f),()=>_0x78ff55[_0x671bb7(0x20f)]('SIGTERM')),_0x78ff55['on'](_0x671bb7(0x1fa),_0x5c6727=>process['exit'](_0x5c6727||0x0));},'plus-web':async()=>{const _0x43b846=a0_0x1cf3b5;await commands[_0x43b846(0x21a)]();},'terminal':async()=>{const _0x4c2f50=a0_0x1cf3b5;console[_0x4c2f50(0x20a)](_0x4c2f50(0x215));const _0x2d9bbf=await checkServerRunning(host,port);!_0x2d9bbf&&(console['error'](_0x4c2f50(0x22d)+serverUrl),console[_0x4c2f50(0x237)](_0x4c2f50(0x1f6)),console[_0x4c2f50(0x237)](_0x4c2f50(0x1fb)),console[_0x4c2f50(0x237)](_0x4c2f50(0x212)),process[_0x4c2f50(0x1fa)](0x1));console[_0x4c2f50(0x20a)](_0x4c2f50(0x21b)+serverUrl),console[_0x4c2f50(0x20a)](_0x4c2f50(0x233));const _0x4c688a=startTerminalUI();process['on']('SIGINT',()=>_0x4c688a['kill'](_0x4c2f50(0x21c))),process['on'](_0x4c2f50(0x21f),()=>_0x4c688a[_0x4c2f50(0x20f)](_0x4c2f50(0x21f))),_0x4c688a['on'](_0x4c2f50(0x1fa),_0xc23a12=>process['exit'](_0xc23a12||0x0));},'plus-terminal':async()=>{const _0x332f3b=a0_0x1cf3b5;console[_0x332f3b(0x20a)]('Starting\x20Loxia\x20server\x20in\x20background...');const _0x38b33b=startServer(!![]),_0x4f3f5e=await waitForServer(host,port);!_0x4f3f5e&&(console[_0x332f3b(0x237)](_0x332f3b(0x20c)),process[_0x332f3b(0x1fa)](0x1));console[_0x332f3b(0x20a)]('Server\x20running\x20at\x20'+serverUrl),console[_0x332f3b(0x20a)](_0x332f3b(0x233));const _0x16d2c2=startTerminalUI();_0x16d2c2['on'](_0x332f3b(0x1fa),_0xf48d5=>{const _0x57a3f1=_0x332f3b;console[_0x57a3f1(0x20a)](_0x57a3f1(0x22a));try{process['kill'](_0x38b33b[_0x57a3f1(0x204)],_0x57a3f1(0x21f));}catch(_0x3105e9){}process[_0x57a3f1(0x1fa)](_0xf48d5||0x0);}),process['on'](_0x332f3b(0x21c),()=>{_0x16d2c2['kill']('SIGINT');}),process['on']('SIGTERM',()=>{const _0x1cd371=_0x332f3b;_0x16d2c2['kill'](_0x1cd371(0x21f));});}};commands[command]?commands[command]()[a0_0x1cf3b5(0x239)](_0x1d8285=>{const _0x200c92=a0_0x1cf3b5;console[_0x200c92(0x237)](_0x200c92(0x21e),_0x1d8285['message']),process['exit'](0x1);}):(console['error'](a0_0x1cf3b5(0x217)+command),console[a0_0x1cf3b5(0x237)](a0_0x1cf3b5(0x1f4)),process['exit'](0x1));
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x333457=a0_0xf070;(function(_0x3efa29,_0x28f31e){const _0x51644d=a0_0xf070,_0x1a9327=_0x3efa29();while(!![]){try{const _0x15c1f3=-parseInt(_0x51644d(0xb2))/0x1+-parseInt(_0x51644d(0xac))/0x2+parseInt(_0x51644d(0xb8))/0x3+parseInt(_0x51644d(0xba))/0x4+parseInt(_0x51644d(0xd1))/0x5+-parseInt(_0x51644d(0xc6))/0x6*(parseInt(_0x51644d(0xbf))/0x7)+-parseInt(_0x51644d(0xcd))/0x8;if(_0x15c1f3===_0x28f31e)break;else _0x1a9327['push'](_0x1a9327['shift']());}catch(_0x5de381){_0x1a9327['push'](_0x1a9327['shift']());}}}(a0_0x36f9,0x31f79));import{spawn}from'child_process';import a0_0x53b19a from'net';import a0_0x1241b1 from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=a0_0x1241b1[a0_0x333457(0xd3)](__filename),projectRoot=a0_0x1241b1[a0_0x333457(0xd3)](__dirname),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x333457(0xc7),SERVER_STARTUP_TIMEOUT=0x2710;async function isServerRunning(_0x3bafb1,_0x33690a){return new Promise(_0x2abffb=>{const _0xe7b43b=a0_0xf070,_0x5b8fec=new a0_0x53b19a[(_0xe7b43b(0xd5))]();_0x5b8fec[_0xe7b43b(0xb3)](0x7d0),_0x5b8fec['on']('connect',()=>{_0x5b8fec['destroy'](),_0x2abffb(!![]);}),_0x5b8fec['on'](_0xe7b43b(0xd2),()=>{const _0x10a3f1=_0xe7b43b;_0x5b8fec[_0x10a3f1(0xbe)](),_0x2abffb(![]);}),_0x5b8fec['on'](_0xe7b43b(0xbd),()=>{const _0x2277cf=_0xe7b43b;_0x5b8fec[_0x2277cf(0xbe)](),_0x2abffb(![]);}),_0x5b8fec[_0xe7b43b(0xd4)](_0x33690a,_0x3bafb1);});}async function startServer(_0x4b981e,_0x3a03e9){const _0x3644ad=a0_0x333457;return console[_0x3644ad(0xbc)](_0x3644ad(0xb5)),new Promise((_0x2a676e,_0x2d9fa0)=>{const _0x2439ae=_0x3644ad,_0x266fa7=spawn(_0x2439ae(0xcf),[a0_0x1241b1[_0x2439ae(0xc2)](projectRoot,_0x2439ae(0xc4)),_0x2439ae(0xaa),'web','--host',_0x4b981e,_0x2439ae(0xd0),_0x3a03e9[_0x2439ae(0xbb)]()],{'detached':![],'stdio':[_0x2439ae(0xd9),_0x2439ae(0xcc),_0x2439ae(0xcc)]});_0x266fa7[_0x2439ae(0xc8)]['on'](_0x2439ae(0xc3),()=>{}),_0x266fa7[_0x2439ae(0xa8)]['on'](_0x2439ae(0xc3),()=>{}),_0x266fa7['on'](_0x2439ae(0xbd),_0x412511=>{console['error']('Failed\x20to\x20start\x20server:',_0x412511['message']),_0x2d9fa0(_0x412511);});const _0x4acce7=Date[_0x2439ae(0xae)](),_0x5b9174=setInterval(async()=>{const _0x3e824a=_0x2439ae,_0x5b314f=await isServerRunning(_0x4b981e,_0x3a03e9);if(_0x5b314f)clearInterval(_0x5b9174),console[_0x3e824a(0xbc)]('✓\x20Server\x20started\x20at\x20'+_0x4b981e+':'+_0x3a03e9),_0x2a676e();else Date[_0x3e824a(0xae)]()-_0x4acce7>SERVER_STARTUP_TIMEOUT&&(clearInterval(_0x5b9174),_0x266fa7[_0x3e824a(0xce)](),_0x2d9fa0(new Error(_0x3e824a(0xc1))));},0x1f4);});}function a0_0xf070(_0x1d0300,_0x24912d){_0x1d0300=_0x1d0300-0xa8;const _0x36f9ed=a0_0x36f9();let _0xf070aa=_0x36f9ed[_0x1d0300];return _0xf070aa;}async function main(){const _0x3f1b4f=a0_0x333457;try{console[_0x3f1b4f(0xbc)]('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'),console[_0x3f1b4f(0xbc)]('\x20\x20Loxia\x20Autopilot\x20One\x20-\x20Terminal\x20UI'),console['log'](_0x3f1b4f(0xc0)),console[_0x3f1b4f(0xbc)]('');const _0x20581e=process[_0x3f1b4f(0xcb)][_0x3f1b4f(0xc9)](0x2);let _0x5d5346=DEFAULT_HOST,_0x43541d=DEFAULT_PORT;for(let _0x594330=0x0;_0x594330<_0x20581e[_0x3f1b4f(0xa9)];_0x594330++){if(_0x20581e[_0x594330]===_0x3f1b4f(0xca)&&_0x20581e[_0x594330+0x1])_0x5d5346=_0x20581e[_0x594330+0x1],_0x594330++;else _0x20581e[_0x594330]===_0x3f1b4f(0xd0)&&_0x20581e[_0x594330+0x1]&&(_0x43541d=parseInt(_0x20581e[_0x594330+0x1],0xa),_0x594330++);}console['log'](_0x3f1b4f(0xb1)+_0x5d5346+':'+_0x43541d+_0x3f1b4f(0xc5));const _0x50aaf1=await isServerRunning(_0x5d5346,_0x43541d);!_0x50aaf1?(console['log'](_0x3f1b4f(0xd6)),await startServer(_0x5d5346,_0x43541d)):console['log']('✓\x20Server\x20is\x20already\x20running\x20at\x20'+_0x5d5346+':'+_0x43541d),console[_0x3f1b4f(0xbc)](''),console['log'](_0x3f1b4f(0xad)),console[_0x3f1b4f(0xbc)](''),await new Promise(_0x1049b2=>setTimeout(_0x1049b2,0x1f4)),process['env'][_0x3f1b4f(0xd7)]=_0x5d5346,process[_0x3f1b4f(0xb9)][_0x3f1b4f(0xb4)]=_0x43541d[_0x3f1b4f(0xbb)](),await import(_0x3f1b4f(0xab));}catch(_0x51ba7c){console[_0x3f1b4f(0xbd)](''),console[_0x3f1b4f(0xbd)]('❌\x20Failed\x20to\x20start\x20Terminal\x20UI:'),console[_0x3f1b4f(0xbd)]('\x20\x20',_0x51ba7c[_0x3f1b4f(0xd8)]),console[_0x3f1b4f(0xbd)](''),console[_0x3f1b4f(0xbd)](_0x3f1b4f(0xaf)),console['error']('\x20\x20\x201.\x20Make\x20sure\x20no\x20other\x20process\x20is\x20using\x20port\x208080'),console[_0x3f1b4f(0xbd)](_0x3f1b4f(0xb0)),console[_0x3f1b4f(0xbd)](_0x3f1b4f(0xb6)),console[_0x3f1b4f(0xbd)](''),process[_0x3f1b4f(0xb7)](0x1);}}main();function a0_0x36f9(){const _0x3c2d1e=['Socket','✗\x20Server\x20is\x20not\x20running','LOXIA_HOST','message','ignore','stderr','length','--ui','../src/interfaces/terminal/index.js','656880yAUvJx','🎨\x20Launching\x20Ink-based\x20Terminal\x20UI...','now','💡\x20Troubleshooting:','\x20\x20\x202.\x20Try\x20running\x20the\x20server\x20manually:\x20node\x20bin/cli.js','🔍\x20Checking\x20if\x20server\x20is\x20running\x20at\x20','22734IAVfBQ','setTimeout','LOXIA_PORT','🚀\x20Starting\x20Loxia\x20server...','\x20\x20\x203.\x20Check\x20logs\x20for\x20more\x20details','exit','282945LHhCUt','env','1356348xMDYvk','toString','log','error','destroy','7322tmhDjJ','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','Server\x20startup\x20timeout','join','data','bin/cli.js','...','1368noUOQE','localhost','stdout','slice','--host','argv','pipe','101816BwKpjE','kill','node','--port','1868260sdDgUb','timeout','dirname','connect'];a0_0x36f9=function(){return _0x3c2d1e;};return a0_0x36f9();}
3
+ const a0_0x1e09bc=a0_0x975a;function a0_0x975a(_0x2bb7b6,_0x3aacfd){_0x2bb7b6=_0x2bb7b6-0xcd;const _0x3aff5=a0_0x3aff();let _0x975aca=_0x3aff5[_0x2bb7b6];return _0x975aca;}(function(_0x21d199,_0x1411cc){const _0x4fcf9f=a0_0x975a,_0x1645a4=_0x21d199();while(!![]){try{const _0x2a1464=-parseInt(_0x4fcf9f(0xfd))/0x1+parseInt(_0x4fcf9f(0xed))/0x2+parseInt(_0x4fcf9f(0xf2))/0x3*(parseInt(_0x4fcf9f(0xdd))/0x4)+parseInt(_0x4fcf9f(0xe9))/0x5*(parseInt(_0x4fcf9f(0xd0))/0x6)+-parseInt(_0x4fcf9f(0xf1))/0x7*(parseInt(_0x4fcf9f(0xcd))/0x8)+parseInt(_0x4fcf9f(0xd6))/0x9+parseInt(_0x4fcf9f(0xf7))/0xa*(-parseInt(_0x4fcf9f(0xe1))/0xb);if(_0x2a1464===_0x1411cc)break;else _0x1645a4['push'](_0x1645a4['shift']());}catch(_0x43aba8){_0x1645a4['push'](_0x1645a4['shift']());}}}(a0_0x3aff,0x7d795));import{spawn}from'child_process';import a0_0x20facb from'net';import a0_0x1eb21c from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=a0_0x1eb21c[a0_0x1e09bc(0xdb)](__filename),projectRoot=a0_0x1eb21c[a0_0x1e09bc(0xdb)](__dirname),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x1e09bc(0xee),SERVER_STARTUP_TIMEOUT=0x2710;async function isServerRunning(_0x34f518,_0x1d707f){return new Promise(_0x73f994=>{const _0x5001ff=a0_0x975a,_0x410be7=new a0_0x20facb[(_0x5001ff(0xff))]();_0x410be7[_0x5001ff(0xe5)](0x7d0),_0x410be7['on']('connect',()=>{_0x410be7['destroy'](),_0x73f994(!![]);}),_0x410be7['on']('timeout',()=>{_0x410be7['destroy'](),_0x73f994(![]);}),_0x410be7['on'](_0x5001ff(0xd9),()=>{_0x410be7['destroy'](),_0x73f994(![]);}),_0x410be7[_0x5001ff(0xf3)](_0x1d707f,_0x34f518);});}async function startServer(_0x4f1a4,_0x3b9d2c){const _0x1a2240=a0_0x1e09bc;return console[_0x1a2240(0xde)]('🚀\x20Starting\x20Loxia\x20server...'),new Promise((_0x269e60,_0x5f0c9d)=>{const _0x5620a3=_0x1a2240,_0x404a93=spawn(_0x5620a3(0xfc),[a0_0x1eb21c[_0x5620a3(0xef)](projectRoot,'bin/cli.js'),_0x5620a3(0xdf),'web',_0x5620a3(0xfe),_0x4f1a4,'--port',_0x3b9d2c[_0x5620a3(0xd4)]()],{'detached':![],'stdio':[_0x5620a3(0xf8),_0x5620a3(0xe4),_0x5620a3(0xe4)]});_0x404a93[_0x5620a3(0xe8)]['on'](_0x5620a3(0xd8),()=>{}),_0x404a93[_0x5620a3(0xda)]['on']('data',()=>{}),_0x404a93['on'](_0x5620a3(0xd9),_0x5d0aff=>{const _0x2bb2f5=_0x5620a3;console[_0x2bb2f5(0xd9)](_0x2bb2f5(0xd7),_0x5d0aff[_0x2bb2f5(0xd2)]),_0x5f0c9d(_0x5d0aff);});const _0x3f0cc1=Date['now'](),_0x2289c7=setInterval(async()=>{const _0x32cf0f=_0x5620a3,_0x154a03=await isServerRunning(_0x4f1a4,_0x3b9d2c);if(_0x154a03)clearInterval(_0x2289c7),console['log'](_0x32cf0f(0xec)+_0x4f1a4+':'+_0x3b9d2c),_0x269e60();else Date[_0x32cf0f(0xf9)]()-_0x3f0cc1>SERVER_STARTUP_TIMEOUT&&(clearInterval(_0x2289c7),_0x404a93[_0x32cf0f(0xf5)](),_0x5f0c9d(new Error(_0x32cf0f(0xf0))));},0x1f4);});}async function main(){const _0x41a7b2=a0_0x1e09bc;try{console[_0x41a7b2(0xde)](_0x41a7b2(0xe6)),console[_0x41a7b2(0xde)]('\x20\x20Loxia\x20Autopilot\x20One\x20-\x20Terminal\x20UI'),console[_0x41a7b2(0xde)]('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'),console['log']('');const _0x437528=process[_0x41a7b2(0xd1)][_0x41a7b2(0x100)](0x2);let _0x58902c=DEFAULT_HOST,_0x260594=DEFAULT_PORT;for(let _0x345db3=0x0;_0x345db3<_0x437528[_0x41a7b2(0xce)];_0x345db3++){if(_0x437528[_0x345db3]===_0x41a7b2(0xfe)&&_0x437528[_0x345db3+0x1])_0x58902c=_0x437528[_0x345db3+0x1],_0x345db3++;else _0x437528[_0x345db3]===_0x41a7b2(0xd3)&&_0x437528[_0x345db3+0x1]&&(_0x260594=parseInt(_0x437528[_0x345db3+0x1],0xa),_0x345db3++);}console[_0x41a7b2(0xde)](_0x41a7b2(0xe0)+_0x58902c+':'+_0x260594+_0x41a7b2(0xe2));const _0x4dc1d8=await isServerRunning(_0x58902c,_0x260594);!_0x4dc1d8?(console[_0x41a7b2(0xde)](_0x41a7b2(0xeb)),await startServer(_0x58902c,_0x260594)):console['log'](_0x41a7b2(0xdc)+_0x58902c+':'+_0x260594),console[_0x41a7b2(0xde)](''),console[_0x41a7b2(0xde)]('🎨\x20Launching\x20Ink-based\x20Terminal\x20UI...'),console[_0x41a7b2(0xde)](''),await new Promise(_0x594705=>setTimeout(_0x594705,0x1f4)),process[_0x41a7b2(0xf6)][_0x41a7b2(0xfb)]=_0x58902c,process[_0x41a7b2(0xf6)][_0x41a7b2(0xe7)]=_0x260594[_0x41a7b2(0xd4)](),await import(_0x41a7b2(0xe3));}catch(_0x383785){console[_0x41a7b2(0xd9)](''),console['error'](_0x41a7b2(0xd5)),console['error']('\x20\x20',_0x383785[_0x41a7b2(0xd2)]),console[_0x41a7b2(0xd9)](''),console['error'](_0x41a7b2(0xea)),console[_0x41a7b2(0xd9)]('\x20\x20\x201.\x20Make\x20sure\x20no\x20other\x20process\x20is\x20using\x20port\x208080'),console[_0x41a7b2(0xd9)](_0x41a7b2(0xf4)),console[_0x41a7b2(0xd9)](_0x41a7b2(0xfa)),console['error'](''),process[_0x41a7b2(0xcf)](0x1);}}function a0_0x3aff(){const _0x17b4c4=['slice','8LSmYUd','length','exit','6630WjOhKX','argv','message','--port','toString','❌\x20Failed\x20to\x20start\x20Terminal\x20UI:','1622250Ynigdv','Failed\x20to\x20start\x20server:','data','error','stderr','dirname','✓\x20Server\x20is\x20already\x20running\x20at\x20','1292RlBGua','log','--ui','🔍\x20Checking\x20if\x20server\x20is\x20running\x20at\x20','57563OMPWPK','...','../src/interfaces/terminal/index.js','pipe','setTimeout','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','LOXIA_PORT','stdout','1310BFMGes','💡\x20Troubleshooting:','✗\x20Server\x20is\x20not\x20running','✓\x20Server\x20started\x20at\x20','780994qoezWs','localhost','join','Server\x20startup\x20timeout','2333821RbPZBi','6465OtwJzh','connect','\x20\x20\x202.\x20Try\x20running\x20the\x20server\x20manually:\x20node\x20bin/cli.js','kill','env','1130DYpKaJ','ignore','now','\x20\x20\x203.\x20Check\x20logs\x20for\x20more\x20details','LOXIA_HOST','node','117649qOUhNm','--host','Socket'];a0_0x3aff=function(){return _0x17b4c4;};return a0_0x3aff();}main();
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x46aa30=a0_0x4c74;(function(_0x4af109,_0xbb0d0d){const _0x955920=a0_0x4c74,_0xc3acf3=_0x4af109();while(!![]){try{const _0x218f70=parseInt(_0x955920(0x1cb))/0x1+parseInt(_0x955920(0x1a8))/0x2*(-parseInt(_0x955920(0x1c3))/0x3)+parseInt(_0x955920(0x1bf))/0x4+parseInt(_0x955920(0x1c9))/0x5*(parseInt(_0x955920(0x1cd))/0x6)+-parseInt(_0x955920(0x1b5))/0x7+parseInt(_0x955920(0x1c8))/0x8*(-parseInt(_0x955920(0x1a7))/0x9)+parseInt(_0x955920(0x1b6))/0xa*(parseInt(_0x955920(0x1ae))/0xb);if(_0x218f70===_0xbb0d0d)break;else _0xc3acf3['push'](_0xc3acf3['shift']());}catch(_0x5c09e4){_0xc3acf3['push'](_0xc3acf3['shift']());}}}(a0_0x4dde,0x4430b));function a0_0x4dde(){const _0x39908b=['Connecting\x20to:\x20','6012DUIIsa','748elSHNT','\x0aTerminal\x20UI\x20error:','Press\x20Ctrl+C\x20to\x20exit\x0a','\x20\x20npm\x20start','\x20\x20-\x20Background\x20processes\x20(e.g.,\x20&\x20at\x20the\x20end)','--host','902ZlpfHD','--help','stdin','localhost','length','exit','LOXIA_PORT','2911734ZXNvKe','90490TZtURh','env','\x20\x20-\x20Redirected\x20output\x20(e.g.,\x20>\x20file.txt,\x202>&1\x20|\x20...)','error','Starting\x20Loxia\x20Terminal\x20UI...','\x0aLoxia\x20Terminal\x20UI\x0a\x0aUsage:\x0a\x20\x20loxia-terminal\x20[options]\x0a\x0aOptions:\x0a\x20\x20--host,\x20-h\x20<host>\x20\x20\x20\x20Backend\x20host\x20(default:\x20localhost)\x0a\x20\x20--port,\x20-p\x20<port>\x20\x20\x20\x20Backend\x20port\x20(default:\x208080)\x0a\x20\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x20message\x0a\x0aEnvironment\x20Variables:\x0a\x20\x20LOXIA_HOST\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Backend\x20host\x0a\x20\x20LOXIA_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Backend\x20port\x0a\x0aExamples:\x0a\x20\x20loxia-terminal\x0a\x20\x20loxia-terminal\x20--host\x20192.168.1.100\x20--port\x203000\x0a\x20\x20LOXIA_HOST=api.example.com\x20LOXIA_PORT=443\x20loxia-terminal\x0a','log','LOXIA_HOST','waitUntilExit','1481612WnBYZx','argv','\x20\x20-\x20Piped\x20environments\x20(e.g.,\x20|\x20head,\x20|\x20grep)','The\x20terminal\x20UI\x20cannot\x20run\x20in:','2370RNZYPd','host','isTTY','Please\x20run\x20this\x20command\x20in\x20a\x20real\x20terminal\x20without\x20pipes\x20or\x20redirection:','\x20\x20-\x20Some\x20CI/CD\x20environments','6576hvNiYP','695795btHkFJ','ERROR:\x20Terminal\x20UI\x20requires\x20an\x20interactive\x20terminal\x20(TTY).','288245GaqbPD','port','6bILsEq','--port','\x20\x20npm\x20run\x20terminal-ui'];a0_0x4dde=function(){return _0x39908b;};return a0_0x4dde();}import{startTerminalUI}from'../src/interfaces/terminal/index.js';const args=process[a0_0x46aa30(0x1c0)]['slice'](0x2),options={'host':a0_0x46aa30(0x1b1),'port':0x1f90};function a0_0x4c74(_0x2fdb24,_0x3cec33){_0x2fdb24=_0x2fdb24-0x1a5;const _0x4dde0d=a0_0x4dde();let _0x4c7470=_0x4dde0d[_0x2fdb24];return _0x4c7470;}for(let i=0x0;i<args[a0_0x46aa30(0x1b2)];i++){const arg=args[i];if(arg===a0_0x46aa30(0x1ad)||arg==='-h')options['host']=args[++i];else{if(arg===a0_0x46aa30(0x1ce)||arg==='-p')options[a0_0x46aa30(0x1cc)]=parseInt(args[++i],0xa);else arg===a0_0x46aa30(0x1af)&&(console['log'](a0_0x46aa30(0x1bb)),process[a0_0x46aa30(0x1b3)](0x0));}}process[a0_0x46aa30(0x1b7)][a0_0x46aa30(0x1bd)]&&(options[a0_0x46aa30(0x1c4)]=process[a0_0x46aa30(0x1b7)][a0_0x46aa30(0x1bd)]);process[a0_0x46aa30(0x1b7)][a0_0x46aa30(0x1b4)]&&(options[a0_0x46aa30(0x1cc)]=parseInt(process['env']['LOXIA_PORT'],0xa));!process[a0_0x46aa30(0x1b0)][a0_0x46aa30(0x1c5)]&&(console['error'](a0_0x46aa30(0x1ca)),console['error'](''),console['error'](a0_0x46aa30(0x1c2)),console[a0_0x46aa30(0x1b9)](a0_0x46aa30(0x1c1)),console[a0_0x46aa30(0x1b9)](a0_0x46aa30(0x1b8)),console[a0_0x46aa30(0x1b9)](a0_0x46aa30(0x1ac)),console[a0_0x46aa30(0x1b9)](a0_0x46aa30(0x1c7)),console[a0_0x46aa30(0x1b9)](''),console[a0_0x46aa30(0x1b9)](a0_0x46aa30(0x1c6)),console['error'](a0_0x46aa30(0x1a5)),console['error'](''),console[a0_0x46aa30(0x1b9)]('Or\x20use\x20the\x20web\x20UI\x20instead:'),console[a0_0x46aa30(0x1b9)](a0_0x46aa30(0x1ab)),process[a0_0x46aa30(0x1b3)](0x1));console[a0_0x46aa30(0x1bc)](a0_0x46aa30(0x1ba)),console['log'](a0_0x46aa30(0x1a6)+options[a0_0x46aa30(0x1c4)]+':'+options[a0_0x46aa30(0x1cc)]),console[a0_0x46aa30(0x1bc)](a0_0x46aa30(0x1aa));const instance=startTerminalUI(options);instance[a0_0x46aa30(0x1be)]()['then'](()=>{const _0x677d46=a0_0x46aa30;console[_0x677d46(0x1bc)]('\x0aTerminal\x20UI\x20exited'),process[_0x677d46(0x1b3)](0x0);})['catch'](_0x4bec82=>{const _0x4d996f=a0_0x46aa30;console[_0x4d996f(0x1b9)](_0x4d996f(0x1a9),_0x4bec82),process[_0x4d996f(0x1b3)](0x1);});
3
+ const a0_0x347a8a=a0_0x32f2;(function(_0x86632f,_0x4da94a){const _0x3891cf=a0_0x32f2,_0x4c6a4d=_0x86632f();while(!![]){try{const _0xe15e3f=parseInt(_0x3891cf(0x1cf))/0x1*(parseInt(_0x3891cf(0x1be))/0x2)+parseInt(_0x3891cf(0x1b3))/0x3+parseInt(_0x3891cf(0x1c2))/0x4+-parseInt(_0x3891cf(0x1cb))/0x5+-parseInt(_0x3891cf(0x1bf))/0x6*(parseInt(_0x3891cf(0x1c5))/0x7)+parseInt(_0x3891cf(0x1b4))/0x8+-parseInt(_0x3891cf(0x1ca))/0x9*(parseInt(_0x3891cf(0x1cd))/0xa);if(_0xe15e3f===_0x4da94a)break;else _0x4c6a4d['push'](_0x4c6a4d['shift']());}catch(_0x21a201){_0x4c6a4d['push'](_0x4c6a4d['shift']());}}}(a0_0x9ffa,0xdadec));import{startTerminalUI}from'../src/interfaces/terminal/index.js';const args=process[a0_0x347a8a(0x1ac)][a0_0x347a8a(0x1b7)](0x2),options={'host':a0_0x347a8a(0x1b8),'port':0x1f90};for(let i=0x0;i<args[a0_0x347a8a(0x1c3)];i++){const arg=args[i];if(arg===a0_0x347a8a(0x1c0)||arg==='-h')options[a0_0x347a8a(0x1c7)]=args[++i];else{if(arg===a0_0x347a8a(0x1b5)||arg==='-p')options[a0_0x347a8a(0x1c4)]=parseInt(args[++i],0xa);else arg==='--help'&&(console[a0_0x347a8a(0x1c6)](a0_0x347a8a(0x1ad)),process[a0_0x347a8a(0x1c9)](0x0));}}process[a0_0x347a8a(0x1b1)][a0_0x347a8a(0x1bb)]&&(options[a0_0x347a8a(0x1c7)]=process['env'][a0_0x347a8a(0x1bb)]);process[a0_0x347a8a(0x1b1)]['LOXIA_PORT']&&(options[a0_0x347a8a(0x1c4)]=parseInt(process[a0_0x347a8a(0x1b1)][a0_0x347a8a(0x1cc)],0xa));!process[a0_0x347a8a(0x1ce)]['isTTY']&&(console[a0_0x347a8a(0x1d0)](a0_0x347a8a(0x1c8)),console[a0_0x347a8a(0x1d0)](''),console['error'](a0_0x347a8a(0x1a9)),console[a0_0x347a8a(0x1d0)]('\x20\x20-\x20Piped\x20environments\x20(e.g.,\x20|\x20head,\x20|\x20grep)'),console[a0_0x347a8a(0x1d0)](a0_0x347a8a(0x1ab)),console[a0_0x347a8a(0x1d0)](a0_0x347a8a(0x1b6)),console[a0_0x347a8a(0x1d0)](a0_0x347a8a(0x1b9)),console[a0_0x347a8a(0x1d0)](''),console['error'](a0_0x347a8a(0x1ba)),console[a0_0x347a8a(0x1d0)](a0_0x347a8a(0x1c1)),console[a0_0x347a8a(0x1d0)](''),console[a0_0x347a8a(0x1d0)](a0_0x347a8a(0x1ae)),console[a0_0x347a8a(0x1d0)]('\x20\x20npm\x20start'),process[a0_0x347a8a(0x1c9)](0x1));console['log'](a0_0x347a8a(0x1bd)),console['log'](a0_0x347a8a(0x1bc)+options['host']+':'+options[a0_0x347a8a(0x1c4)]),console[a0_0x347a8a(0x1c6)](a0_0x347a8a(0x1b2));const instance=startTerminalUI(options);function a0_0x9ffa(){const _0x2a1782=['slice','localhost','\x20\x20-\x20Some\x20CI/CD\x20environments','Please\x20run\x20this\x20command\x20in\x20a\x20real\x20terminal\x20without\x20pipes\x20or\x20redirection:','LOXIA_HOST','Connecting\x20to:\x20','Starting\x20Loxia\x20Terminal\x20UI...','17756CEgStp','860838VXqvNu','--host','\x20\x20npm\x20run\x20terminal-ui','1662072rirosh','length','port','49gcWDJG','log','host','ERROR:\x20Terminal\x20UI\x20requires\x20an\x20interactive\x20terminal\x20(TTY).','exit','124461XirpZm','3580160grlFxH','LOXIA_PORT','1560FrChis','stdin','157ohfTuc','error','The\x20terminal\x20UI\x20cannot\x20run\x20in:','catch','\x20\x20-\x20Redirected\x20output\x20(e.g.,\x20>\x20file.txt,\x202>&1\x20|\x20...)','argv','\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','Or\x20use\x20the\x20web\x20UI\x20instead:','\x0aTerminal\x20UI\x20exited','waitUntilExit','env','Press\x20Ctrl+C\x20to\x20exit\x0a','4225113sKcCvp','12451392dfIybq','--port','\x20\x20-\x20Background\x20processes\x20(e.g.,\x20&\x20at\x20the\x20end)'];a0_0x9ffa=function(){return _0x2a1782;};return a0_0x9ffa();}function a0_0x32f2(_0x43cfb7,_0x40ede4){_0x43cfb7=_0x43cfb7-0x1a9;const _0x9ffa02=a0_0x9ffa();let _0x32f2c2=_0x9ffa02[_0x43cfb7];return _0x32f2c2;}instance[a0_0x347a8a(0x1b0)]()['then'](()=>{const _0x5230dc=a0_0x347a8a;console['log'](_0x5230dc(0x1af)),process[_0x5230dc(0x1c9)](0x0);})[a0_0x347a8a(0x1aa)](_0xac4c72=>{const _0x5f2045=a0_0x347a8a;console[_0x5f2045(0x1d0)]('\x0aTerminal\x20UI\x20error:',_0xac4c72),process[_0x5f2045(0x1c9)](0x1);});
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x471d8e=a0_0x2e89;(function(_0x5720d1,_0x2c544f){const _0x41d41b=a0_0x2e89,_0x2f3647=_0x5720d1();while(!![]){try{const _0x4dc530=-parseInt(_0x41d41b(0x131))/0x1*(parseInt(_0x41d41b(0x142))/0x2)+-parseInt(_0x41d41b(0x11f))/0x3*(parseInt(_0x41d41b(0x124))/0x4)+parseInt(_0x41d41b(0x145))/0x5*(-parseInt(_0x41d41b(0x12a))/0x6)+parseInt(_0x41d41b(0x14a))/0x7+parseInt(_0x41d41b(0x139))/0x8*(parseInt(_0x41d41b(0x123))/0x9)+parseInt(_0x41d41b(0x13f))/0xa*(-parseInt(_0x41d41b(0x120))/0xb)+parseInt(_0x41d41b(0x147))/0xc;if(_0x4dc530===_0x2c544f)break;else _0x2f3647['push'](_0x2f3647['shift']());}catch(_0x19bf7e){_0x2f3647['push'](_0x2f3647['shift']());}}}(a0_0x49fe,0x57118));import{spawn}from'child_process';import{fileURLToPath}from'url';import{dirname,join}from'path';import a0_0x549628 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),rootDir=join(__dirname,'..'),SERVER_PORT=process[a0_0x471d8e(0x11e)]['PORT']||0x1f90,STARTUP_WAIT=0x7d0;let serverProcess=null;async function checkServerReady(_0x17a8ff=0xa,_0x5a9c63=0x1f4){const _0x5410bf=a0_0x471d8e;for(let _0x556241=0x0;_0x556241<_0x17a8ff;_0x556241++){try{return await new Promise((_0x34c122,_0x333525)=>{const _0x9fdd1d=a0_0x2e89,_0x27ab58=a0_0x549628['get'](_0x9fdd1d(0x128)+SERVER_PORT+_0x9fdd1d(0x121),_0x16a614=>{const _0x4621c8=_0x9fdd1d;_0x16a614['statusCode']===0xc8?_0x34c122():_0x333525(new Error(_0x4621c8(0x11c)+_0x16a614[_0x4621c8(0x13d)]));});_0x27ab58['on']('error',_0x333525),_0x27ab58['setTimeout'](0x3e8,()=>{const _0x3695f9=_0x9fdd1d;_0x27ab58[_0x3695f9(0x14b)](),_0x333525(new Error(_0x3695f9(0x13e)));});}),console['log'](_0x5410bf(0x12f)),!![];}catch(_0x4bfa36){_0x556241<_0x17a8ff-0x1&&await new Promise(_0x3dd0ba=>setTimeout(_0x3dd0ba,_0x5a9c63));}}return console['log']('⚠️\x20\x20Server\x20may\x20not\x20be\x20fully\x20ready,\x20but\x20continuing\x20anyway...'),![];}function a0_0x49fe(){const _0x4fddc9=['6dyVPnV','133804ODpOOX','/health','includes','13554MZKWLk','974692TYJkGg','\x0a⚠️\x20\x20Received\x20SIGTERM,\x20shutting\x20down...','src','Failed\x20to\x20start\x20Terminal\x20UI:','http://localhost:','╔════════════════════════════════════════════════╗','264930iQCZtA','node','error','SIGTERM','╚════════════════════════════════════════════════╝','✅\x20Server\x20is\x20ready!','toString','6344dcbTJl','[SERVER]\x20','log','ExperimentalWarning','\x0a👋\x20Terminal\x20UI\x20closed.','║\x20\x20\x20Loxia\x20AI\x20Agents\x20-\x20Server\x20+\x20Terminal\x20UI\x20\x20\x20\x20\x20\x20║','ignore','data','1704NCHxXf','killed','stderr','trim','statusCode','Timeout','140twvnKh','Server\x20exited\x20with\x20code\x20','pipe','24QQsaxg','message','kill','80fugdQY','exit','14557596yNMRPj','[SERVER\x20ERROR]\x20','Failed\x20to\x20start\x20server:','1840797foOgBF','destroy','index.js','inherit','stdout','SIGINT','🚀\x20Starting\x20Loxia\x20server...','Server\x20returned\x20','bin','env'];a0_0x49fe=function(){return _0x4fddc9;};return a0_0x49fe();}async function startServer(){return new Promise(_0x4a2d0d=>{const _0x2afcbf=a0_0x2e89;console[_0x2afcbf(0x133)](_0x2afcbf(0x11b));const _0x515a27=join(rootDir,_0x2afcbf(0x126),_0x2afcbf(0x14c));serverProcess=spawn(_0x2afcbf(0x12b),[_0x515a27],{'cwd':rootDir,'env':{...process[_0x2afcbf(0x11e)]},'stdio':[_0x2afcbf(0x137),_0x2afcbf(0x141),_0x2afcbf(0x141)],'detached':![]}),serverProcess[_0x2afcbf(0x14e)]['on'](_0x2afcbf(0x138),_0x16e6b3=>{const _0x594567=_0x2afcbf,_0x215be0=_0x16e6b3[_0x594567(0x130)]()[_0x594567(0x13c)]();_0x215be0&&console['log'](_0x594567(0x132)+_0x215be0);}),serverProcess[_0x2afcbf(0x13b)]['on'](_0x2afcbf(0x138),_0x2392c6=>{const _0x321b80=_0x2afcbf,_0x4872b2=_0x2392c6[_0x321b80(0x130)]()[_0x321b80(0x13c)]();_0x4872b2&&!_0x4872b2[_0x321b80(0x122)](_0x321b80(0x134))&&console[_0x321b80(0x12c)](_0x321b80(0x148)+_0x4872b2);}),serverProcess['on']('error',_0x1369d7=>{const _0x461608=_0x2afcbf;console['error'](_0x461608(0x149),_0x1369d7[_0x461608(0x143)]),process[_0x461608(0x146)](0x1);}),serverProcess['on'](_0x2afcbf(0x146),(_0x3d2f2f,_0x49dfde)=>{const _0x4e730d=_0x2afcbf;_0x3d2f2f!==null&&_0x3d2f2f!==0x0&&(console[_0x4e730d(0x12c)](_0x4e730d(0x140)+_0x3d2f2f),process['exit'](_0x3d2f2f));}),setTimeout(_0x4a2d0d,STARTUP_WAIT);});}async function startTerminalUI(){const _0x538bed=a0_0x471d8e;console[_0x538bed(0x133)]('🖥️\x20\x20Starting\x20Terminal\x20UI...'),console[_0x538bed(0x133)]('');const _0x1ac397=join(rootDir,_0x538bed(0x11d),'loxia-terminal.js'),_0x4d59af=spawn(_0x538bed(0x12b),[_0x1ac397],{'cwd':rootDir,'env':{...process[_0x538bed(0x11e)]},'stdio':_0x538bed(0x14d)});return _0x4d59af['on'](_0x538bed(0x12c),_0x3f228d=>{const _0x4343c6=_0x538bed;console[_0x4343c6(0x12c)](_0x4343c6(0x127),_0x3f228d[_0x4343c6(0x143)]),cleanup(),process[_0x4343c6(0x146)](0x1);}),_0x4d59af['on'](_0x538bed(0x146),_0x11ab95=>{const _0x45dea0=_0x538bed;console['log'](_0x45dea0(0x135)),cleanup(),process[_0x45dea0(0x146)](_0x11ab95||0x0);}),_0x4d59af;}function a0_0x2e89(_0x5d720c,_0x217d8a){_0x5d720c=_0x5d720c-0x11a;const _0x49fe2e=a0_0x49fe();let _0x2e8964=_0x49fe2e[_0x5d720c];return _0x2e8964;}function cleanup(){const _0x4c9a2e=a0_0x471d8e;serverProcess&&!serverProcess[_0x4c9a2e(0x13a)]&&(console[_0x4c9a2e(0x133)]('🛑\x20Stopping\x20server...'),serverProcess[_0x4c9a2e(0x144)](_0x4c9a2e(0x12d)),setTimeout(()=>{const _0x2ef9b1=_0x4c9a2e;!serverProcess['killed']&&serverProcess[_0x2ef9b1(0x144)]('SIGKILL');},0x1388));}process['on'](a0_0x471d8e(0x11a),()=>{const _0x20f8e2=a0_0x471d8e;console[_0x20f8e2(0x133)]('\x0a⚠️\x20\x20Received\x20SIGINT,\x20shutting\x20down...'),cleanup(),process[_0x20f8e2(0x146)](0x0);}),process['on'](a0_0x471d8e(0x12d),()=>{const _0xfb03d6=a0_0x471d8e;console['log'](_0xfb03d6(0x125)),cleanup(),process['exit'](0x0);}),process['on']('exit',()=>{cleanup();});async function main(){const _0x545afe=a0_0x471d8e;console['log'](_0x545afe(0x129)),console[_0x545afe(0x133)](_0x545afe(0x136)),console[_0x545afe(0x133)](_0x545afe(0x12e)),console[_0x545afe(0x133)]('');try{await startServer(),await checkServerReady(),await startTerminalUI(),await new Promise(()=>{});}catch(_0x4636b8){console[_0x545afe(0x12c)]('Error\x20during\x20startup:',_0x4636b8[_0x545afe(0x143)]),cleanup(),process['exit'](0x1);}}main();
3
+ const a0_0x3466d1=a0_0x47ff;(function(_0x5cc321,_0x2d1019){const _0x436a99=a0_0x47ff,_0x1ed6da=_0x5cc321();while(!![]){try{const _0x1cac34=-parseInt(_0x436a99(0xc2))/0x1*(-parseInt(_0x436a99(0xd6))/0x2)+-parseInt(_0x436a99(0xd0))/0x3+-parseInt(_0x436a99(0xb7))/0x4*(parseInt(_0x436a99(0xd8))/0x5)+parseInt(_0x436a99(0xc9))/0x6*(-parseInt(_0x436a99(0xdd))/0x7)+-parseInt(_0x436a99(0xc3))/0x8*(-parseInt(_0x436a99(0xdf))/0x9)+-parseInt(_0x436a99(0xbf))/0xa+-parseInt(_0x436a99(0xd7))/0xb*(-parseInt(_0x436a99(0xd4))/0xc);if(_0x1cac34===_0x2d1019)break;else _0x1ed6da['push'](_0x1ed6da['shift']());}catch(_0x2de587){_0x1ed6da['push'](_0x1ed6da['shift']());}}}(a0_0x101f,0xad9b0));import{spawn}from'child_process';import{fileURLToPath}from'url';import{dirname,join}from'path';import a0_0x5b1603 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),rootDir=join(__dirname,'..'),SERVER_PORT=process[a0_0x3466d1(0xbc)][a0_0x3466d1(0xe3)]||0x1f90,STARTUP_WAIT=0x7d0;let serverProcess=null;async function checkServerReady(_0x5c1fec=0xa,_0x42ce45=0x1f4){const _0x46ebd3=a0_0x3466d1;for(let _0x8cae44=0x0;_0x8cae44<_0x5c1fec;_0x8cae44++){try{return await new Promise((_0x25a4f3,_0x33556f)=>{const _0x1d691d=a0_0x47ff,_0xd519c9=a0_0x5b1603['get'](_0x1d691d(0xe0)+SERVER_PORT+_0x1d691d(0xe1),_0x372437=>{const _0x96453b=_0x1d691d;_0x372437[_0x96453b(0xcf)]===0xc8?_0x25a4f3():_0x33556f(new Error(_0x96453b(0xc6)+_0x372437[_0x96453b(0xcf)]));});_0xd519c9['on'](_0x1d691d(0xde),_0x33556f),_0xd519c9['setTimeout'](0x3e8,()=>{const _0x53cae1=_0x1d691d;_0xd519c9['destroy'](),_0x33556f(new Error(_0x53cae1(0xe7)));});}),console[_0x46ebd3(0xda)](_0x46ebd3(0xe4)),!![];}catch(_0x36dfd7){_0x8cae44<_0x5c1fec-0x1&&await new Promise(_0x4a761e=>setTimeout(_0x4a761e,_0x42ce45));}}return console[_0x46ebd3(0xda)](_0x46ebd3(0xb6)),![];}async function startServer(){return new Promise(_0x49d790=>{const _0x177768=a0_0x47ff;console[_0x177768(0xda)](_0x177768(0xb9));const _0x1f368d=join(rootDir,_0x177768(0xdb),_0x177768(0xc4));serverProcess=spawn('node',[_0x1f368d],{'cwd':rootDir,'env':{...process[_0x177768(0xbc)]},'stdio':[_0x177768(0xca),'pipe',_0x177768(0xd9)],'detached':![]}),serverProcess[_0x177768(0xc5)]['on']('data',_0x17aa47=>{const _0x558072=_0x177768,_0x182ba=_0x17aa47[_0x558072(0xcc)]()['trim']();_0x182ba&&console[_0x558072(0xda)]('[SERVER]\x20'+_0x182ba);}),serverProcess[_0x177768(0xba)]['on'](_0x177768(0xce),_0x4ef098=>{const _0x1d02c8=_0x177768,_0x1609cd=_0x4ef098[_0x1d02c8(0xcc)]()[_0x1d02c8(0xb5)]();_0x1609cd&&!_0x1609cd['includes'](_0x1d02c8(0xc8))&&console[_0x1d02c8(0xde)](_0x1d02c8(0xe8)+_0x1609cd);}),serverProcess['on'](_0x177768(0xde),_0x5ebaf4=>{const _0x36e5b8=_0x177768;console[_0x36e5b8(0xde)](_0x36e5b8(0xbb),_0x5ebaf4[_0x36e5b8(0xbd)]),process['exit'](0x1);}),serverProcess['on'](_0x177768(0xcb),(_0x1c8d22,_0x3ef0f1)=>{const _0x480e49=_0x177768;_0x1c8d22!==null&&_0x1c8d22!==0x0&&(console[_0x480e49(0xde)]('Server\x20exited\x20with\x20code\x20'+_0x1c8d22),process[_0x480e49(0xcb)](_0x1c8d22));}),setTimeout(_0x49d790,STARTUP_WAIT);});}function a0_0x101f(){const _0x1a8637=['killed','SIGTERM','Timeout','[SERVER\x20ERROR]\x20','\x0a👋\x20Terminal\x20UI\x20closed.','trim','⚠️\x20\x20Server\x20may\x20not\x20be\x20fully\x20ready,\x20but\x20continuing\x20anyway...','4388RmynRc','bin','🚀\x20Starting\x20Loxia\x20server...','stderr','Failed\x20to\x20start\x20server:','env','message','Failed\x20to\x20start\x20Terminal\x20UI:','9175900PbVcQG','║\x20\x20\x20Loxia\x20AI\x20Agents\x20-\x20Server\x20+\x20Terminal\x20UI\x20\x20\x20\x20\x20\x20║','node','647663HJowHQ','8IVjdIa','index.js','stdout','Server\x20returned\x20','╚════════════════════════════════════════════════╝','ExperimentalWarning','12qTrWyE','ignore','exit','toString','SIGKILL','data','statusCode','396564tChleG','inherit','kill','\x0a⚠️\x20\x20Received\x20SIGTERM,\x20shutting\x20down...','108qcAPtP','loxia-terminal.js','2GzPSzg','277255JOMeIy','5alJZwK','pipe','log','src','Error\x20during\x20startup:','1464491BCQazz','error','11752929zpoOGb','http://localhost:','/health','SIGINT','PORT','✅\x20Server\x20is\x20ready!'];a0_0x101f=function(){return _0x1a8637;};return a0_0x101f();}function a0_0x47ff(_0x4dc81b,_0x58bf9c){_0x4dc81b=_0x4dc81b-0xb5;const _0x101faf=a0_0x101f();let _0x47ff27=_0x101faf[_0x4dc81b];return _0x47ff27;}async function startTerminalUI(){const _0x9e7a71=a0_0x3466d1;console[_0x9e7a71(0xda)]('🖥️\x20\x20Starting\x20Terminal\x20UI...'),console[_0x9e7a71(0xda)]('');const _0x1eb622=join(rootDir,_0x9e7a71(0xb8),_0x9e7a71(0xd5)),_0x4966c5=spawn(_0x9e7a71(0xc1),[_0x1eb622],{'cwd':rootDir,'env':{...process[_0x9e7a71(0xbc)]},'stdio':_0x9e7a71(0xd1)});return _0x4966c5['on'](_0x9e7a71(0xde),_0x1489e2=>{const _0x1a90b5=_0x9e7a71;console[_0x1a90b5(0xde)](_0x1a90b5(0xbe),_0x1489e2[_0x1a90b5(0xbd)]),cleanup(),process[_0x1a90b5(0xcb)](0x1);}),_0x4966c5['on']('exit',_0x324a3e=>{const _0x3ae771=_0x9e7a71;console['log'](_0x3ae771(0xe9)),cleanup(),process[_0x3ae771(0xcb)](_0x324a3e||0x0);}),_0x4966c5;}function cleanup(){const _0x5098b3=a0_0x3466d1;serverProcess&&!serverProcess[_0x5098b3(0xe5)]&&(console[_0x5098b3(0xda)]('🛑\x20Stopping\x20server...'),serverProcess[_0x5098b3(0xd2)](_0x5098b3(0xe6)),setTimeout(()=>{const _0x13a02a=_0x5098b3;!serverProcess[_0x13a02a(0xe5)]&&serverProcess[_0x13a02a(0xd2)](_0x13a02a(0xcd));},0x1388));}process['on'](a0_0x3466d1(0xe2),()=>{const _0x472341=a0_0x3466d1;console[_0x472341(0xda)]('\x0a⚠️\x20\x20Received\x20SIGINT,\x20shutting\x20down...'),cleanup(),process[_0x472341(0xcb)](0x0);}),process['on'](a0_0x3466d1(0xe6),()=>{const _0x30edf5=a0_0x3466d1;console[_0x30edf5(0xda)](_0x30edf5(0xd3)),cleanup(),process[_0x30edf5(0xcb)](0x0);}),process['on'](a0_0x3466d1(0xcb),()=>{cleanup();});async function main(){const _0x42aafc=a0_0x3466d1;console['log']('╔════════════════════════════════════════════════╗'),console[_0x42aafc(0xda)](_0x42aafc(0xc0)),console[_0x42aafc(0xda)](_0x42aafc(0xc7)),console[_0x42aafc(0xda)]('');try{await startServer(),await checkServerReady(),await startTerminalUI(),await new Promise(()=>{});}catch(_0x5b39ac){console[_0x42aafc(0xde)](_0x42aafc(0xdc),_0x5b39ac[_0x42aafc(0xbd)]),cleanup(),process[_0x42aafc(0xcb)](0x1);}}main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loxia-labs/loxia-autopilot-one",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
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_0x379162=a0_0x1a8e;(function(_0x1e6128,_0x74437){const _0x37be9b=a0_0x1a8e,_0x268b14=_0x1e6128();while(!![]){try{const _0x1a4497=parseInt(_0x37be9b(0x1d0))/0x1*(-parseInt(_0x37be9b(0x1e1))/0x2)+parseInt(_0x37be9b(0x1ae))/0x3*(parseInt(_0x37be9b(0x1c3))/0x4)+parseInt(_0x37be9b(0x1cd))/0x5*(-parseInt(_0x37be9b(0x1c4))/0x6)+parseInt(_0x37be9b(0x1e2))/0x7*(-parseInt(_0x37be9b(0x1ac))/0x8)+-parseInt(_0x37be9b(0x1c5))/0x9*(-parseInt(_0x37be9b(0x1e3))/0xa)+-parseInt(_0x37be9b(0x1dd))/0xb*(-parseInt(_0x37be9b(0x19d))/0xc)+parseInt(_0x37be9b(0x19c))/0xd;if(_0x1a4497===_0x74437)break;else _0x268b14['push'](_0x268b14['shift']());}catch(_0x6f1da5){_0x268b14['push'](_0x268b14['shift']());}}}(a0_0x21fb,0x7784c));import{exec}from'child_process';import{promisify}from'util';import a0_0x577dee from'https';function a0_0x1a8e(_0x54d7fe,_0x10b55d){_0x54d7fe=_0x54d7fe-0x19b;const _0x21fb7a=a0_0x21fb();let _0x1a8ec8=_0x21fb7a[_0x54d7fe];return _0x1a8ec8;}import a0_0x120828 from'http';import a0_0x5d389a from'fs';import a0_0x404bbd from'path';import{fileURLToPath}from'url';import{createWriteStream}from'fs';import{pipeline}from'stream/promises';const execAsync=promisify(exec),__filename=fileURLToPath(import.meta.url),__dirname=a0_0x404bbd[a0_0x379162(0x1bf)](__filename),SCANNER_DIR=a0_0x404bbd[a0_0x379162(0x1de)](__dirname,'..',a0_0x379162(0x1db),a0_0x379162(0x1e7)),SEMGREP_VERSION=a0_0x379162(0x1ba);console[a0_0x379162(0x19f)](a0_0x379162(0x1c0)),console['log'](a0_0x379162(0x1e6)),console[a0_0x379162(0x19f)]('═══════════════════════════════════════════════════════════\x0a');async function installScanners(){const _0x5c7350=a0_0x379162;await a0_0x5d389a[_0x5c7350(0x1a0)][_0x5c7350(0x1b9)](SCANNER_DIR,{'recursive':!![]}),await checkESLintSecurity(),await installSemgrep(),await installPythonScanners(),console[_0x5c7350(0x19f)](_0x5c7350(0x1c7)),console['log'](_0x5c7350(0x1a9)),console[_0x5c7350(0x19f)]('═══════════════════════════════════════════════════════════\x0a');}async function checkESLintSecurity(){const _0x49b83b=a0_0x379162;console[_0x49b83b(0x19f)]('📦\x20Checking\x20ESLint\x20Security\x20Plugin...');try{await import(_0x49b83b(0x1cf)),console[_0x49b83b(0x19f)](_0x49b83b(0x1df));}catch(_0x3eddb6){console[_0x49b83b(0x19f)]('\x20\x20\x20⚠️\x20\x20eslint-plugin-security\x20not\x20found'),console[_0x49b83b(0x19f)]('\x20\x20\x20Run:\x20npm\x20install\x20--save-dev\x20eslint-plugin-security\x0a');}}async function installSemgrep(){const _0x4d1905=a0_0x379162;console[_0x4d1905(0x19f)](_0x4d1905(0x1d9));const _0x3527b1=process[_0x4d1905(0x1c6)],_0x2438be=process[_0x4d1905(0x1b7)];try{const _0x1c2b7f=await execAsync(_0x4d1905(0x1dc),{'timeout':0x1388});console['log']('\x20\x20\x20✅\x20Semgrep\x20already\x20installed:\x20'+_0x1c2b7f[_0x4d1905(0x1b3)][_0x4d1905(0x1bc)]()),console[_0x4d1905(0x19f)]('\x20\x20\x20Using\x20system-installed\x20Semgrep\x0a');return;}catch(_0x5df60e){console[_0x4d1905(0x19f)]('\x20\x20\x20Semgrep\x20not\x20found\x20in\x20PATH,\x20installing\x20standalone\x20binary...');}const _0x47d044=getSemgrepBinaryInfo(_0x3527b1,_0x2438be);if(!_0x47d044){console[_0x4d1905(0x19f)](_0x4d1905(0x1c1)+_0x3527b1+'-'+_0x2438be),console['log'](_0x4d1905(0x1b5));return;}try{const _0x5bdc85=a0_0x404bbd[_0x4d1905(0x1de)](SCANNER_DIR,'semgrep');console[_0x4d1905(0x19f)]('\x20\x20\x20Downloading\x20from\x20'+_0x47d044['url']+_0x4d1905(0x1a3)),await downloadFile(_0x47d044[_0x4d1905(0x1ad)],_0x5bdc85),await a0_0x5d389a[_0x4d1905(0x1a0)][_0x4d1905(0x1b6)](_0x5bdc85,0x1ed),console['log']('\x20\x20\x20✅\x20Semgrep\x20installed\x20successfully'),console[_0x4d1905(0x19f)](_0x4d1905(0x1e5)+_0x5bdc85+'\x0a'),console[_0x4d1905(0x19f)](_0x4d1905(0x1bd)),console[_0x4d1905(0x19f)](_0x4d1905(0x1ce));}catch(_0x222ecf){console[_0x4d1905(0x19f)](_0x4d1905(0x1aa)+_0x222ecf[_0x4d1905(0x19b)]),console[_0x4d1905(0x19f)](_0x4d1905(0x1af));}}function a0_0x21fb(){const _0x220d1a=['\x20-m\x20pip\x20install\x20--user\x20','mkdir','v1.55.0','finish','trim','\x20\x20\x20Note:\x20To\x20use\x20system-wide,\x20add\x20to\x20PATH\x20or\x20install\x20globally:','python\x20--version','dirname','═══════════════════════════════════════════════════════════','\x20\x20\x20⚠️\x20\x20No\x20Semgrep\x20binary\x20available\x20for\x20','startsWith','9596JmRgdj','1587594keLOzN','9nMamJe','platform','\x0a═══════════════════════════════════════════════════════════','\x0aYou\x20can\x20manually\x20install\x20scanners:','\x20\x20\x20✅\x20','location','❌\x20Installation\x20failed:','bandit','5xBIRZW','\x20\x20\x20pip\x20install\x20semgrep\x0a','eslint-plugin-security','13DDOXBS','\x20\x20npm\x20install\x20--save-dev\x20eslint-plugin-security','\x20already\x20installed','\x20-m\x20pip\x20show\x20','get','unlink','headers','catch','python','🔍\x20Installing\x20Semgrep...','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20','node_modules','semgrep\x20--version','109758YigIiu','join','\x20\x20\x20✅\x20eslint-plugin-security\x20is\x20installed\x0a','python3\x20--version','117982VsPuyA','6732873RdbUsP','4434260TNLBJn','error','\x20\x20\x20Location:\x20','\x20\x20Installing\x20Security\x20Scanners','.scanners','message','12781938ONtsfw','96YaoGpH','pipe','log','promises','\x20\x20\x20⚠️\x20\x20Python\x20not\x20found\x20-\x20skipping\x20Python\x20scanners','exit','...','then','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20','semgrep','yamllint','statusCode','\x20\x20Installation\x20Complete','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20Semgrep:\x20','\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit','8DszFpE','url','1221sVLhAG','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20semgrep\x0a','pip-audit','https','\x20installed\x20successfully','stdout','close','\x20\x20\x20Please\x20install\x20manually:\x20https://semgrep.dev/docs/getting-started/\x0a','chmod','arch'];a0_0x21fb=function(){return _0x220d1a;};return a0_0x21fb();}function getSemgrepBinaryInfo(_0x51e16f,_0x182884){return null;}async function installPythonScanners(){const _0x437b0d=a0_0x379162;console['log']('🐍\x20Checking\x20Python\x20scanners...');let _0x39f1df=null;try{await execAsync(_0x437b0d(0x1e0),{'timeout':0x1388}),_0x39f1df='python3';}catch(_0x447498){try{await execAsync(_0x437b0d(0x1be),{'timeout':0x1388}),_0x39f1df=_0x437b0d(0x1d8);}catch(_0x1907f5){console[_0x437b0d(0x19f)](_0x437b0d(0x1a1)),console['log']('\x20\x20\x20To\x20enable\x20Python\x20scanning,\x20install\x20Python\x20and\x20run:'),console[_0x437b0d(0x19f)]('\x20\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit\x20checkov\x20yamllint\x0a');return;}}console[_0x437b0d(0x19f)]('\x20\x20\x20✅\x20Python\x20found:\x20'+_0x39f1df),await installViaPip(_0x437b0d(0x1a6),_0x39f1df),await installViaPip(_0x437b0d(0x1cc),_0x39f1df),await installViaPip(_0x437b0d(0x1b0),_0x39f1df),await installViaPip('checkov',_0x39f1df),await installViaPip(_0x437b0d(0x1a7),_0x39f1df),console['log']('');}async function installViaPip(_0x246010,_0x3b409d){const _0xc5798=a0_0x379162;try{const _0x4fdc98=await execAsync(_0x3b409d+_0xc5798(0x1d3)+_0x246010,{'timeout':0x1388});return console[_0xc5798(0x19f)](_0xc5798(0x1c9)+_0x246010+_0xc5798(0x1d2)),!![];}catch(_0x3a285f){console['log']('\x20\x20\x20Installing\x20'+_0x246010+_0xc5798(0x1a3));try{return await execAsync(_0x3b409d+_0xc5798(0x1b8)+_0x246010,{'timeout':0xea60}),console[_0xc5798(0x19f)](_0xc5798(0x1c9)+_0x246010+_0xc5798(0x1b2)),!![];}catch(_0x563b75){return console[_0xc5798(0x19f)](_0xc5798(0x1da)+_0x246010+':\x20'+_0x563b75['message']),console['log'](_0xc5798(0x1a5)+_0x246010),![];}}}async function downloadFile(_0x3a50b4,_0x1dc8c7){return new Promise((_0xf1cdd7,_0x1a8cbb)=>{const _0x49c838=a0_0x1a8e,_0x4c2f8f=_0x3a50b4[_0x49c838(0x1c2)](_0x49c838(0x1b1))?a0_0x577dee:a0_0x120828;_0x4c2f8f[_0x49c838(0x1d4)](_0x3a50b4,_0x3ee9eb=>{const _0x4f729c=_0x49c838;if(_0x3ee9eb[_0x4f729c(0x1a8)]===0x12e||_0x3ee9eb['statusCode']===0x12d){downloadFile(_0x3ee9eb[_0x4f729c(0x1d6)][_0x4f729c(0x1ca)],_0x1dc8c7)[_0x4f729c(0x1a4)](_0xf1cdd7)[_0x4f729c(0x1d7)](_0x1a8cbb);return;}if(_0x3ee9eb[_0x4f729c(0x1a8)]!==0xc8){_0x1a8cbb(new Error('Failed\x20to\x20download:\x20HTTP\x20'+_0x3ee9eb[_0x4f729c(0x1a8)]));return;}const _0x3ba09e=createWriteStream(_0x1dc8c7);_0x3ee9eb[_0x4f729c(0x19e)](_0x3ba09e),_0x3ba09e['on'](_0x4f729c(0x1bb),()=>{const _0x187a1d=_0x4f729c;_0x3ba09e[_0x187a1d(0x1b4)](),_0xf1cdd7();}),_0x3ba09e['on']('error',_0x27eebd=>{const _0x39c596=_0x4f729c;a0_0x5d389a[_0x39c596(0x1d5)](_0x1dc8c7,()=>{}),_0x1a8cbb(_0x27eebd);});})['on'](_0x49c838(0x1e4),_0x1a8cbb);});}installScanners()['catch'](_0x31214a=>{const _0x10969d=a0_0x379162;console['error'](_0x10969d(0x1cb),_0x31214a['message']),console[_0x10969d(0x1e4)](_0x10969d(0x1c8)),console[_0x10969d(0x1e4)](_0x10969d(0x1d1)),console['error'](_0x10969d(0x1ab)),process[_0x10969d(0x1a2)](0x0);});
2
+ const a0_0x202f7e=a0_0x17e2;(function(_0x18530f,_0x3a5eac){const _0x40dd76=a0_0x17e2,_0x1f3578=_0x18530f();while(!![]){try{const _0x3309c0=parseInt(_0x40dd76(0x1a0))/0x1*(parseInt(_0x40dd76(0x1b6))/0x2)+parseInt(_0x40dd76(0x199))/0x3+-parseInt(_0x40dd76(0x191))/0x4*(-parseInt(_0x40dd76(0x198))/0x5)+-parseInt(_0x40dd76(0x19f))/0x6+parseInt(_0x40dd76(0x194))/0x7*(parseInt(_0x40dd76(0x1d1))/0x8)+-parseInt(_0x40dd76(0x1b7))/0x9+parseInt(_0x40dd76(0x1a6))/0xa*(-parseInt(_0x40dd76(0x1a1))/0xb);if(_0x3309c0===_0x3a5eac)break;else _0x1f3578['push'](_0x1f3578['shift']());}catch(_0x293a8b){_0x1f3578['push'](_0x1f3578['shift']());}}}(a0_0x5882,0xa1eaf));function a0_0x5882(){const _0x3004f1=['🐍\x20Checking\x20Python\x20scanners...','\x0a═══════════════════════════════════════════════════════════','platform','pipe','\x20\x20Installation\x20Complete','\x20\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit\x20checkov\x20yamllint\x0a','trim','pip-audit','═══════════════════════════════════════════════════════════','then','🔍\x20Installing\x20Semgrep...','\x20\x20\x20Location:\x20','checkov','\x0aYou\x20can\x20manually\x20install\x20scanners:','\x20\x20\x20✅\x20eslint-plugin-security\x20is\x20installed\x0a','3048iRbvYg','📦\x20Checking\x20ESLint\x20Security\x20Plugin...','statusCode','\x20\x20\x20✅\x20Python\x20found:\x20','\x20already\x20installed','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20','\x20\x20\x20Note:\x20To\x20use\x20system-wide,\x20add\x20to\x20PATH\x20or\x20install\x20globally:','https','\x20\x20\x20Installing\x20','\x20\x20\x20pip\x20install\x20semgrep\x0a','24EiVFMJ','close','\x20\x20Installing\x20Security\x20Scanners','5789lTVYVi','Failed\x20to\x20download:\x20HTTP\x20','get','❌\x20Installation\x20failed:','466645TIAoqD','1178856OvGrjs','stdout','bandit','headers','promises','python3\x20--version','2057748neBftw','2jMEOME','11QFMiaT','startsWith','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20','yamllint','\x20\x20\x20✅\x20Semgrep\x20already\x20installed:\x20','11888020JwcAvu','error','python\x20--version','\x20\x20\x20⚠️\x20\x20eslint-plugin-security\x20not\x20found','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20semgrep\x0a','\x20\x20\x20Please\x20install\x20manually:\x20https://semgrep.dev/docs/getting-started/\x0a','\x20\x20\x20✅\x20Semgrep\x20installed\x20successfully','message','catch','═══════════════════════════════════════════════════════════\x0a','semgrep','mkdir','join','...','\x20\x20\x20✅\x20','\x20-m\x20pip\x20install\x20--user\x20','1168506qMHJhW','2173896izwpDF','.scanners','location','\x20\x20\x20Semgrep\x20not\x20found\x20in\x20PATH,\x20installing\x20standalone\x20binary...','\x20installed\x20successfully','log','\x20\x20\x20⚠️\x20\x20No\x20Semgrep\x20binary\x20available\x20for\x20','\x20\x20\x20⚠️\x20\x20Python\x20not\x20found\x20-\x20skipping\x20Python\x20scanners','\x20\x20\x20Using\x20system-installed\x20Semgrep\x0a','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20Semgrep:\x20','\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit'];a0_0x5882=function(){return _0x3004f1;};return a0_0x5882();}import{exec}from'child_process';import{promisify}from'util';import a0_0x42b3a3 from'https';import a0_0xad98e3 from'http';import a0_0x269ad3 from'fs';import a0_0x28193b 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_0x28193b['dirname'](__filename),SCANNER_DIR=a0_0x28193b[a0_0x202f7e(0x1b2)](__dirname,'..','node_modules',a0_0x202f7e(0x1b8)),SEMGREP_VERSION='v1.55.0';console[a0_0x202f7e(0x1bc)](a0_0x202f7e(0x1ca)),console['log'](a0_0x202f7e(0x193)),console[a0_0x202f7e(0x1bc)](a0_0x202f7e(0x1af));async function installScanners(){const _0x2b628c=a0_0x202f7e;await a0_0x269ad3[_0x2b628c(0x19d)][_0x2b628c(0x1b1)](SCANNER_DIR,{'recursive':!![]}),await checkESLintSecurity(),await installSemgrep(),await installPythonScanners(),console[_0x2b628c(0x1bc)](_0x2b628c(0x1c3)),console[_0x2b628c(0x1bc)](_0x2b628c(0x1c6)),console['log']('═══════════════════════════════════════════════════════════\x0a');}async function checkESLintSecurity(){const _0x48ef38=a0_0x202f7e;console[_0x48ef38(0x1bc)](_0x48ef38(0x188));try{await import('eslint-plugin-security'),console[_0x48ef38(0x1bc)](_0x48ef38(0x1d0));}catch(_0x12e38c){console['log'](_0x48ef38(0x1a9)),console[_0x48ef38(0x1bc)]('\x20\x20\x20Run:\x20npm\x20install\x20--save-dev\x20eslint-plugin-security\x0a');}}async function installSemgrep(){const _0x3c3276=a0_0x202f7e;console[_0x3c3276(0x1bc)](_0x3c3276(0x1cc));const _0x5021bb=process[_0x3c3276(0x1c4)],_0x12a05f=process['arch'];try{const _0x205b6f=await execAsync('semgrep\x20--version',{'timeout':0x1388});console['log'](_0x3c3276(0x1a5)+_0x205b6f[_0x3c3276(0x19a)][_0x3c3276(0x1c8)]()),console['log'](_0x3c3276(0x1bf));return;}catch(_0x359e76){console[_0x3c3276(0x1bc)](_0x3c3276(0x1ba));}const _0x1eb69=getSemgrepBinaryInfo(_0x5021bb,_0x12a05f);if(!_0x1eb69){console['log'](_0x3c3276(0x1bd)+_0x5021bb+'-'+_0x12a05f),console['log'](_0x3c3276(0x1ab));return;}try{const _0x492fcd=a0_0x28193b[_0x3c3276(0x1b2)](SCANNER_DIR,_0x3c3276(0x1b0));console[_0x3c3276(0x1bc)]('\x20\x20\x20Downloading\x20from\x20'+_0x1eb69['url']+_0x3c3276(0x1b3)),await downloadFile(_0x1eb69['url'],_0x492fcd),await a0_0x269ad3[_0x3c3276(0x19d)]['chmod'](_0x492fcd,0x1ed),console[_0x3c3276(0x1bc)](_0x3c3276(0x1ac)),console[_0x3c3276(0x1bc)](_0x3c3276(0x1cd)+_0x492fcd+'\x0a'),console['log'](_0x3c3276(0x18d)),console[_0x3c3276(0x1bc)](_0x3c3276(0x190));}catch(_0x53f865){console['log'](_0x3c3276(0x1c0)+_0x53f865[_0x3c3276(0x1ad)]),console['log'](_0x3c3276(0x1aa));}}function a0_0x17e2(_0x5eb3b1,_0x203ed3){_0x5eb3b1=_0x5eb3b1-0x188;const _0x5882ba=a0_0x5882();let _0x17e2b5=_0x5882ba[_0x5eb3b1];return _0x17e2b5;}function getSemgrepBinaryInfo(_0x52989c,_0x2d1c0f){return null;}async function installPythonScanners(){const _0x3b15bd=a0_0x202f7e;console[_0x3b15bd(0x1bc)](_0x3b15bd(0x1c2));let _0x56633f=null;try{await execAsync(_0x3b15bd(0x19e),{'timeout':0x1388}),_0x56633f='python3';}catch(_0x28d7ca){try{await execAsync(_0x3b15bd(0x1a8),{'timeout':0x1388}),_0x56633f='python';}catch(_0x31abc8){console[_0x3b15bd(0x1bc)](_0x3b15bd(0x1be)),console[_0x3b15bd(0x1bc)]('\x20\x20\x20To\x20enable\x20Python\x20scanning,\x20install\x20Python\x20and\x20run:'),console['log'](_0x3b15bd(0x1c7));return;}}console[_0x3b15bd(0x1bc)](_0x3b15bd(0x18a)+_0x56633f),await installViaPip(_0x3b15bd(0x1b0),_0x56633f),await installViaPip(_0x3b15bd(0x19b),_0x56633f),await installViaPip(_0x3b15bd(0x1c9),_0x56633f),await installViaPip(_0x3b15bd(0x1ce),_0x56633f),await installViaPip(_0x3b15bd(0x1a4),_0x56633f),console['log']('');}async function installViaPip(_0x7c0037,_0x5c0ff6){const _0xd3ccac=a0_0x202f7e;try{const _0x231fde=await execAsync(_0x5c0ff6+'\x20-m\x20pip\x20show\x20'+_0x7c0037,{'timeout':0x1388});return console[_0xd3ccac(0x1bc)](_0xd3ccac(0x1b4)+_0x7c0037+_0xd3ccac(0x18b)),!![];}catch(_0x31f4f0){console[_0xd3ccac(0x1bc)](_0xd3ccac(0x18f)+_0x7c0037+_0xd3ccac(0x1b3));try{return await execAsync(_0x5c0ff6+_0xd3ccac(0x1b5)+_0x7c0037,{'timeout':0xea60}),console[_0xd3ccac(0x1bc)]('\x20\x20\x20✅\x20'+_0x7c0037+_0xd3ccac(0x1bb)),!![];}catch(_0x5b9fb5){return console['log'](_0xd3ccac(0x18c)+_0x7c0037+':\x20'+_0x5b9fb5[_0xd3ccac(0x1ad)]),console['log'](_0xd3ccac(0x1a3)+_0x7c0037),![];}}}async function downloadFile(_0x14ba0f,_0x53ba48){return new Promise((_0x86e148,_0xd404dd)=>{const _0x2667fa=a0_0x17e2,_0xcdd9e2=_0x14ba0f[_0x2667fa(0x1a2)](_0x2667fa(0x18e))?a0_0x42b3a3:a0_0xad98e3;_0xcdd9e2[_0x2667fa(0x196)](_0x14ba0f,_0x1b7686=>{const _0xdf1ccd=_0x2667fa;if(_0x1b7686['statusCode']===0x12e||_0x1b7686['statusCode']===0x12d){downloadFile(_0x1b7686[_0xdf1ccd(0x19c)][_0xdf1ccd(0x1b9)],_0x53ba48)[_0xdf1ccd(0x1cb)](_0x86e148)[_0xdf1ccd(0x1ae)](_0xd404dd);return;}if(_0x1b7686[_0xdf1ccd(0x189)]!==0xc8){_0xd404dd(new Error(_0xdf1ccd(0x195)+_0x1b7686[_0xdf1ccd(0x189)]));return;}const _0xbc6521=createWriteStream(_0x53ba48);_0x1b7686[_0xdf1ccd(0x1c5)](_0xbc6521),_0xbc6521['on']('finish',()=>{const _0x130a92=_0xdf1ccd;_0xbc6521[_0x130a92(0x192)](),_0x86e148();}),_0xbc6521['on'](_0xdf1ccd(0x1a7),_0x228602=>{a0_0x269ad3['unlink'](_0x53ba48,()=>{}),_0xd404dd(_0x228602);});})['on']('error',_0xd404dd);});}installScanners()[a0_0x202f7e(0x1ae)](_0x475c6f=>{const _0x1bec5b=a0_0x202f7e;console[_0x1bec5b(0x1a7)](_0x1bec5b(0x197),_0x475c6f[_0x1bec5b(0x1ad)]),console['error'](_0x1bec5b(0x1cf)),console['error']('\x20\x20npm\x20install\x20--save-dev\x20eslint-plugin-security'),console[_0x1bec5b(0x1a7)](_0x1bec5b(0x1c1)),process['exit'](0x0);});
@@ -1 +1 @@
1
- const a0_0x4bf2d9=a0_0x273b;(function(_0x2b39f0,_0x14f2e3){const _0x3526e2=a0_0x273b,_0x25d71c=_0x2b39f0();while(!![]){try{const _0x24ce5b=parseInt(_0x3526e2(0x8c))/0x1*(-parseInt(_0x3526e2(0xb2))/0x2)+-parseInt(_0x3526e2(0x9f))/0x3+parseInt(_0x3526e2(0xac))/0x4+-parseInt(_0x3526e2(0x94))/0x5*(-parseInt(_0x3526e2(0xab))/0x6)+parseInt(_0x3526e2(0x90))/0x7+-parseInt(_0x3526e2(0x93))/0x8*(parseInt(_0x3526e2(0x8e))/0x9)+parseInt(_0x3526e2(0x97))/0xa;if(_0x24ce5b===_0x14f2e3)break;else _0x25d71c['push'](_0x25d71c['shift']());}catch(_0x32cc69){_0x25d71c['push'](_0x25d71c['shift']());}}}(a0_0x4e8c,0x4994f));function a0_0x273b(_0x1d015a,_0x43f388){_0x1d015a=_0x1d015a-0x85;const _0x4e8c8b=a0_0x4e8c();let _0x273b78=_0x4e8c8b[_0x1d015a];if(a0_0x273b['JBSuSc']===undefined){var _0x33485d=function(_0x54cba9){const _0x291756='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x18bbad='',_0x2ed67f='';for(let _0x31ca95=0x0,_0x1c5f67,_0x32a404,_0x1a8d73=0x0;_0x32a404=_0x54cba9['charAt'](_0x1a8d73++);~_0x32a404&&(_0x1c5f67=_0x31ca95%0x4?_0x1c5f67*0x40+_0x32a404:_0x32a404,_0x31ca95++%0x4)?_0x18bbad+=String['fromCharCode'](0xff&_0x1c5f67>>(-0x2*_0x31ca95&0x6)):0x0){_0x32a404=_0x291756['indexOf'](_0x32a404);}for(let _0x25f164=0x0,_0x55f355=_0x18bbad['length'];_0x25f164<_0x55f355;_0x25f164++){_0x2ed67f+='%'+('00'+_0x18bbad['charCodeAt'](_0x25f164)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2ed67f);};a0_0x273b['RcPVfK']=_0x33485d,a0_0x273b['zoMwJr']={},a0_0x273b['JBSuSc']=!![];}const _0x21ee5f=_0x4e8c8b[0x0],_0x3bcb05=_0x1d015a+_0x21ee5f,_0x2ebf28=a0_0x273b['zoMwJr'][_0x3bcb05];return!_0x2ebf28?(_0x273b78=a0_0x273b['RcPVfK'](_0x273b78),a0_0x273b['zoMwJr'][_0x3bcb05]=_0x273b78):_0x273b78=_0x2ebf28,_0x273b78;}function a0_0x4e8c(){const _0x2af163=['C3r5BgvSAw50','DxnL','mZe0nde1zvHYEwPN','lNnHC3m','C2v2zxjPDhK','CgX1z2LU','u3r5BgvSAw50igfUywX5C2LZigzHAwXLza','zgvMyxvSDa','ChvZAa','Cg9ZDgnZCY1SzxnZ','rvjst1i','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','CMvZDwX0CW','BgvUz3rO','nK1oDMfACW','nJe4ndHUy1vOu1O','zM9YD2fYza','BMCTzgvLCa','v0fstKLorW','u1rzteu','lMnZCW','mKvQtM5prq','y29SDw1U','zgv0zwn0tgfUz3vHz2u','Cg9ZDgnZC1nJC3m','Cg9ZDgnZCW','BgvZCW','BM8TAw52ywXPza','zgvIDwC','Aw5JBhvKzxm','C2nZCW','y2HLy2TtEw50yxG','BwL4Aw4','y2f0zwDVCML6zvn0EwXLBgLUDfj1Bgu','zxH0zw5K','zM9Y','BMfTzq','q1ntigfUywX5C2LZigzHAwXLza','CMv0DxjU','zg91yMXL','Cg9ZDgnZC0XLC3m','zwfJAa','nta1ntu5rhreEKfm','q0furuDpuLK','oti5n2rwwwr3zq','u0vwrvjjvfK','mJyZntmYnuTZuMvnBG','lMXLC3m','CgvYzM9YBwfUy2u','nde4nfrPDhHMCG','mJyYndeXmfbps3DVyq','y29UDgvUDa','Bg9Nz2vY','ntm1mJu1mfPIrK5ira','BwvZC2fNzq','yw5HBhL6zq','zM9YBwf0ug9ZDentu0vYCM9Y','BgLUDfn0EwXLCW','zxjYB3i'];a0_0x4e8c=function(){return _0x2af163;};return a0_0x4e8c();}import{STATIC_ANALYSIS}from'../utilities/constants.js';class CSSAnalyzer{constructor(_0x18bbad=null){const _0x104048=a0_0x273b;this[_0x104048(0x96)]=_0x18bbad,this[_0x104048(0x9d)]=null,this[_0x104048(0xb6)]=null,this[_0x104048(0xb5)]=null,this[_0x104048(0x8a)]=null;}async[a0_0x4bf2d9(0x99)](_0x2ed67f,_0x31ca95,_0x1c5f67={}){const _0x15b04f=a0_0x4bf2d9;try{const _0x32a404=[],_0x1a8d73=this[_0x15b04f(0xb4)](_0x2ed67f),_0x25f164=await this[_0x15b04f(0xbc)](_0x2ed67f,_0x31ca95,_0x1a8d73);_0x32a404[_0x15b04f(0xa5)](..._0x25f164);if(_0x25f164['length']===0x0){const _0x55f355=await this['lintStyles'](_0x2ed67f,_0x31ca95,_0x1a8d73);_0x32a404[_0x15b04f(0xa5)](..._0x55f355);}return this[_0x15b04f(0x96)]?.[_0x15b04f(0xb9)]('CSS\x20analysis\x20completed',{'file':_0x2ed67f,'language':_0x1a8d73,'totalDiagnostics':_0x32a404['length'],'errors':_0x32a404['filter'](_0x20c641=>_0x20c641['severity']===STATIC_ANALYSIS['SEVERITY'][_0x15b04f(0xa7)])[_0x15b04f(0xaa)],'warnings':_0x32a404['filter'](_0x4f57f5=>_0x4f57f5[_0x15b04f(0xa1)]===STATIC_ANALYSIS[_0x15b04f(0x8f)][_0x15b04f(0xaf)])[_0x15b04f(0xaa)]}),_0x32a404;}catch(_0x24a9c9){return this[_0x15b04f(0x96)]?.[_0x15b04f(0x9c)](_0x15b04f(0x87),{'file':_0x2ed67f,'error':_0x24a9c9[_0x15b04f(0x98)]}),[];}}async['checkSyntax'](_0x1fc0ec,_0x490b14,_0x11587f){const _0x5e2f2b=a0_0x4bf2d9,_0x127530=[];try{if(!this['postcss']){const _0x349425=await import('postcss');this['postcss']=_0x349425['default'];}let _0x544930=null;if(_0x11587f==='scss'){if(!this[_0x5e2f2b(0xb5)]){const _0x41183c=await import('postcss-scss');this[_0x5e2f2b(0xb5)]=_0x41183c['default'];}_0x544930=this['postcssScss'];}else{if(_0x11587f===_0x5e2f2b(0xb7)){if(!this[_0x5e2f2b(0x8a)]){const _0x48ed91=await import(_0x5e2f2b(0xa6));this['postcssLess']=_0x48ed91['default'];}_0x544930=this['postcssLess'];}}const _0x676ef1=this[_0x5e2f2b(0xb6)]()['process'](_0x490b14,{'from':_0x1fc0ec,'syntax':_0x544930}),_0x562556=_0x676ef1['root'];this['logger']?.[_0x5e2f2b(0xb9)]('PostCSS\x20syntax\x20check\x20passed',{'file':_0x1fc0ec});}catch(_0xcfa171){const _0x3e0de0=this[_0x5e2f2b(0x9a)](_0xcfa171,_0x1fc0ec);_0x3e0de0&&_0x127530['push'](_0x3e0de0);}return _0x127530;}async[a0_0x4bf2d9(0x9b)](_0x19088e,_0x5d2c5f,_0x2f3d85){const _0x5822ac=a0_0x4bf2d9,_0x14daea=[];try{if(!this[_0x5822ac(0x9d)]){const _0x33fed5=await import(_0x5822ac(0x9d));this['stylelint']=_0x33fed5[_0x5822ac(0xa4)];}const _0x3f21f6={'extends':['stylelint-config-standard'],'rules':{'color-no-invalid-hex':!![],'font-family-no-duplicate-names':!![],'function-calc-no-invalid':!![],'string-no-newline':!![],'unit-no-unknown':!![],'property-no-unknown':!![],'declaration-block-no-duplicate-properties':!![],'selector-pseudo-class-no-unknown':!![],'selector-pseudo-element-no-unknown':!![],'selector-type-no-unknown':[!![],{'ignoreTypes':['/^custom-/',_0x5822ac(0xae)]}],'media-feature-name-no-unknown':!![],'at-rule-no-unknown':_0x2f3d85==='scss'?[!![],{'ignoreAtRules':[_0x5822ac(0xbd),'include',_0x5822ac(0xbf),'if','else',_0x5822ac(0x85),_0x5822ac(0x8b),'while','function',_0x5822ac(0x88),_0x5822ac(0x95),_0x5822ac(0x9e),_0x5822ac(0xad)]}]:_0x2f3d85===_0x5822ac(0xb7)?[!![],{'ignoreAtRules':[_0x5822ac(0xa2)]}]:!![],'comment-no-empty':!![],'no-duplicate-selectors':!![],'no-empty-source':null,'block-no-empty':!![],'declaration-block-no-shorthand-property-overrides':!![],'font-family-no-missing-generic-family-keyword':!![],'function-linear-gradient-no-nonstandard-direction':!![],'no-descending-specificity':null,'no-duplicate-at-import-rules':!![],'no-extra-semicolons':!![],'no-invalid-double-slash-comments':!![],'selector-pseudo-element-colon-notation':_0x5822ac(0x89),'selector-type-case':'lower'},'customSyntax':_0x2f3d85===_0x5822ac(0xbb)?'postcss-scss':_0x2f3d85==='less'?_0x5822ac(0xa6):undefined},_0x307e0e=await this['stylelint']['lint']({'code':_0x5d2c5f,'codeFilename':_0x19088e,'config':_0x3f21f6});if(_0x307e0e['results']&&_0x307e0e['results'][_0x5822ac(0xaa)]>0x0){const _0xc3029a=_0x307e0e[_0x5822ac(0xa9)][0x0];if(_0xc3029a['warnings'])for(const _0xaaf6ab of _0xc3029a['warnings']){_0x14daea['push']({'file':_0x19088e,'line':_0xaaf6ab['line']||0x1,'column':_0xaaf6ab[_0x5822ac(0xb3)]||0x1,'severity':_0xaaf6ab['severity']==='error'?STATIC_ANALYSIS['SEVERITY'][_0x5822ac(0xa7)]:STATIC_ANALYSIS[_0x5822ac(0x8f)]['WARNING'],'rule':_0xaaf6ab['rule']||'unknown','message':_0xaaf6ab['text'],'category':this['categorizeStylelintRule'](_0xaaf6ab['rule']),'fixable':![],'source':_0x5822ac(0x9d)});}}}catch(_0x50546c){this['logger']?.['warn'](_0x5822ac(0xa3),{'file':_0x19088e,'error':_0x50546c['message']});}return _0x14daea;}[a0_0x4bf2d9(0x9a)](_0x12d534,_0x711795){const _0x1e2a69=a0_0x4bf2d9;return{'file':_0x711795,'line':_0x12d534['line']||0x1,'column':_0x12d534['column']||0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x1e2a69(0xa7)],'rule':_0x12d534[_0x1e2a69(0x86)]||'CssSyntaxError','message':_0x12d534['reason']||_0x12d534[_0x1e2a69(0x98)],'category':STATIC_ANALYSIS['CATEGORY']['SYNTAX'],'fixable':![],'source':'postcss','code':_0x12d534['source']||undefined};}[a0_0x4bf2d9(0xbe)](_0xbb3d65){const _0x482aab=a0_0x4bf2d9;if(!_0xbb3d65)return STATIC_ANALYSIS['CATEGORY'][_0x482aab(0xb0)];const _0x3038ee=_0xbb3d65['toLowerCase']();if(_0x3038ee[_0x482aab(0xba)](_0x482aab(0xb8))||_0x3038ee['includes']('no-unknown')||_0x3038ee[_0x482aab(0xba)]('no-empty')||_0x3038ee[_0x482aab(0xba)]('syntax'))return STATIC_ANALYSIS['CATEGORY']['SYNTAX'];if(_0x3038ee['includes'](_0x482aab(0x92))||_0x3038ee[_0x482aab(0xba)]('optimize'))return STATIC_ANALYSIS[_0x482aab(0x8d)]['PERFORMANCE'];if(_0x3038ee['includes']('best-practice')||_0x3038ee[_0x482aab(0xba)]('recommended'))return STATIC_ANALYSIS[_0x482aab(0x8d)]['BEST_PRACTICE'];return STATIC_ANALYSIS[_0x482aab(0x8d)][_0x482aab(0xb0)];}[a0_0x4bf2d9(0xb4)](_0xb5934f){const _0x51f8b6=a0_0x4bf2d9,_0x4888a2=_0xb5934f['toLowerCase']();if(_0x4888a2['endsWith']('.scss')||_0x4888a2['endsWith'](_0x51f8b6(0xa0)))return'scss';if(_0x4888a2['endsWith']('.less'))return _0x51f8b6(0xb7);return'css';}[a0_0x4bf2d9(0xa8)](){const _0xc47d69=a0_0x4bf2d9;return[_0xc47d69(0xb1),'.scss',_0xc47d69(0xa0),_0xc47d69(0x91)];}['supportsAutoFix'](){return![];}}export default CSSAnalyzer;
1
+ const a0_0x5c5ec6=a0_0x5e92;function a0_0x5e92(_0x2d0295,_0x5e1ea2){_0x2d0295=_0x2d0295-0x129;const _0x13bf23=a0_0x13bf();let _0x5e9211=_0x13bf23[_0x2d0295];if(a0_0x5e92['kEkdDj']===undefined){var _0x3c3ac6=function(_0x4431bf){const _0x36b78d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x20a7cd='',_0x41568e='';for(let _0x4a56d7=0x0,_0x1f65ad,_0x22ba11,_0x13e0c8=0x0;_0x22ba11=_0x4431bf['charAt'](_0x13e0c8++);~_0x22ba11&&(_0x1f65ad=_0x4a56d7%0x4?_0x1f65ad*0x40+_0x22ba11:_0x22ba11,_0x4a56d7++%0x4)?_0x20a7cd+=String['fromCharCode'](0xff&_0x1f65ad>>(-0x2*_0x4a56d7&0x6)):0x0){_0x22ba11=_0x36b78d['indexOf'](_0x22ba11);}for(let _0x3ec646=0x0,_0x20ea72=_0x20a7cd['length'];_0x3ec646<_0x20ea72;_0x3ec646++){_0x41568e+='%'+('00'+_0x20a7cd['charCodeAt'](_0x3ec646)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x41568e);};a0_0x5e92['fWUFUF']=_0x3c3ac6,a0_0x5e92['gnrEfR']={},a0_0x5e92['kEkdDj']=!![];}const _0x14ff32=_0x13bf23[0x0],_0x494ba5=_0x2d0295+_0x14ff32,_0x327fc4=a0_0x5e92['gnrEfR'][_0x494ba5];return!_0x327fc4?(_0x5e9211=a0_0x5e92['fWUFUF'](_0x5e9211),a0_0x5e92['gnrEfR'][_0x494ba5]=_0x5e9211):_0x5e9211=_0x327fc4,_0x5e9211;}(function(_0x12a6b1,_0xcb5956){const _0x14d3a3=a0_0x5e92,_0x3fd9b1=_0x12a6b1();while(!![]){try{const _0x75d835=-parseInt(_0x14d3a3(0x149))/0x1*(parseInt(_0x14d3a3(0x15a))/0x2)+parseInt(_0x14d3a3(0x12f))/0x3*(parseInt(_0x14d3a3(0x14f))/0x4)+parseInt(_0x14d3a3(0x146))/0x5+parseInt(_0x14d3a3(0x14b))/0x6*(parseInt(_0x14d3a3(0x142))/0x7)+-parseInt(_0x14d3a3(0x15c))/0x8+-parseInt(_0x14d3a3(0x14c))/0x9*(parseInt(_0x14d3a3(0x14e))/0xa)+-parseInt(_0x14d3a3(0x162))/0xb*(-parseInt(_0x14d3a3(0x156))/0xc);if(_0x75d835===_0xcb5956)break;else _0x3fd9b1['push'](_0x3fd9b1['shift']());}catch(_0x7237a6){_0x3fd9b1['push'](_0x3fd9b1['shift']());}}}(a0_0x13bf,0xef4a3));import{STATIC_ANALYSIS}from'../utilities/constants.js';class CSSAnalyzer{constructor(_0x20a7cd=null){const _0x4b36f9=a0_0x5e92;this['logger']=_0x20a7cd,this['stylelint']=null,this['postcss']=null,this[_0x4b36f9(0x16c)]=null,this['postcssLess']=null;}async['analyze'](_0x41568e,_0x4a56d7,_0x1f65ad={}){const _0x8c9ae7=a0_0x5e92;try{const _0x22ba11=[],_0x13e0c8=this['detectLanguage'](_0x41568e),_0x3ec646=await this[_0x8c9ae7(0x136)](_0x41568e,_0x4a56d7,_0x13e0c8);_0x22ba11[_0x8c9ae7(0x12b)](..._0x3ec646);if(_0x3ec646['length']===0x0){const _0x20ea72=await this['lintStyles'](_0x41568e,_0x4a56d7,_0x13e0c8);_0x22ba11[_0x8c9ae7(0x12b)](..._0x20ea72);}return this['logger']?.['debug'](_0x8c9ae7(0x157),{'file':_0x41568e,'language':_0x13e0c8,'totalDiagnostics':_0x22ba11['length'],'errors':_0x22ba11[_0x8c9ae7(0x12c)](_0x276aa3=>_0x276aa3['severity']===STATIC_ANALYSIS[_0x8c9ae7(0x163)][_0x8c9ae7(0x15d)])['length'],'warnings':_0x22ba11[_0x8c9ae7(0x12c)](_0x3cbee7=>_0x3cbee7[_0x8c9ae7(0x150)]===STATIC_ANALYSIS['SEVERITY']['WARNING'])[_0x8c9ae7(0x138)]}),_0x22ba11;}catch(_0x2b95df){return this[_0x8c9ae7(0x13f)]?.[_0x8c9ae7(0x13c)](_0x8c9ae7(0x129),{'file':_0x41568e,'error':_0x2b95df[_0x8c9ae7(0x16b)]}),[];}}async['checkSyntax'](_0x210d75,_0x46d2ec,_0x1b5edb){const _0x4af8db=a0_0x5e92,_0x5c192f=[];try{if(!this[_0x4af8db(0x15e)]){const _0x49576c=await import(_0x4af8db(0x15e));this[_0x4af8db(0x15e)]=_0x49576c[_0x4af8db(0x134)];}let _0x4488b3=null;if(_0x1b5edb===_0x4af8db(0x12e)){if(!this[_0x4af8db(0x16c)]){const _0x460ad1=await import('postcss-scss');this[_0x4af8db(0x16c)]=_0x460ad1[_0x4af8db(0x134)];}_0x4488b3=this[_0x4af8db(0x16c)];}else{if(_0x1b5edb==='less'){if(!this['postcssLess']){const _0x12b1cf=await import('postcss-less');this[_0x4af8db(0x151)]=_0x12b1cf[_0x4af8db(0x134)];}_0x4488b3=this[_0x4af8db(0x151)];}}const _0x2ce8d9=this[_0x4af8db(0x15e)]()['process'](_0x46d2ec,{'from':_0x210d75,'syntax':_0x4488b3}),_0x55dbbd=_0x2ce8d9[_0x4af8db(0x131)];this[_0x4af8db(0x13f)]?.['debug'](_0x4af8db(0x132),{'file':_0x210d75});}catch(_0x2d27d3){const _0x5cb08f=this[_0x4af8db(0x15f)](_0x2d27d3,_0x210d75);_0x5cb08f&&_0x5c192f['push'](_0x5cb08f);}return _0x5c192f;}async[a0_0x5c5ec6(0x13d)](_0x5170e7,_0x913634,_0xc95f4f){const _0x24eed3=a0_0x5c5ec6,_0x3c36ca=[];try{if(!this[_0x24eed3(0x14d)]){const _0x9a8d39=await import(_0x24eed3(0x14d));this['stylelint']=_0x9a8d39['default'];}const _0x5b23aa={'extends':[_0x24eed3(0x137)],'rules':{'color-no-invalid-hex':!![],'font-family-no-duplicate-names':!![],'function-calc-no-invalid':!![],'string-no-newline':!![],'unit-no-unknown':!![],'property-no-unknown':!![],'declaration-block-no-duplicate-properties':!![],'selector-pseudo-class-no-unknown':!![],'selector-pseudo-element-no-unknown':!![],'selector-type-no-unknown':[!![],{'ignoreTypes':['/^custom-/','ng-deep']}],'media-feature-name-no-unknown':!![],'at-rule-no-unknown':_0xc95f4f===_0x24eed3(0x12e)?[!![],{'ignoreAtRules':['mixin','include','extend','if','else',_0x24eed3(0x13e),'each',_0x24eed3(0x14a),_0x24eed3(0x164),'return','content','use',_0x24eed3(0x168)]}]:_0xc95f4f===_0x24eed3(0x12a)?[!![],{'ignoreAtRules':['plugin']}]:!![],'comment-no-empty':!![],'no-duplicate-selectors':!![],'no-empty-source':null,'block-no-empty':!![],'declaration-block-no-shorthand-property-overrides':!![],'font-family-no-missing-generic-family-keyword':!![],'function-linear-gradient-no-nonstandard-direction':!![],'no-descending-specificity':null,'no-duplicate-at-import-rules':!![],'no-extra-semicolons':!![],'no-invalid-double-slash-comments':!![],'selector-pseudo-element-colon-notation':_0x24eed3(0x155),'selector-type-case':'lower'},'customSyntax':_0xc95f4f==='scss'?_0x24eed3(0x15b):_0xc95f4f==='less'?_0x24eed3(0x159):undefined},_0x3f2b5d=await this['stylelint'][_0x24eed3(0x167)]({'code':_0x913634,'codeFilename':_0x5170e7,'config':_0x5b23aa});if(_0x3f2b5d[_0x24eed3(0x165)]&&_0x3f2b5d['results'][_0x24eed3(0x138)]>0x0){const _0xa0e82=_0x3f2b5d[_0x24eed3(0x165)][0x0];if(_0xa0e82[_0x24eed3(0x139)])for(const _0x4b38f1 of _0xa0e82['warnings']){_0x3c36ca['push']({'file':_0x5170e7,'line':_0x4b38f1[_0x24eed3(0x153)]||0x1,'column':_0x4b38f1[_0x24eed3(0x143)]||0x1,'severity':_0x4b38f1['severity']==='error'?STATIC_ANALYSIS['SEVERITY']['ERROR']:STATIC_ANALYSIS[_0x24eed3(0x163)]['WARNING'],'rule':_0x4b38f1['rule']||'unknown','message':_0x4b38f1['text'],'category':this[_0x24eed3(0x141)](_0x4b38f1[_0x24eed3(0x133)]),'fixable':![],'source':'stylelint'});}}}catch(_0x3e527f){this[_0x24eed3(0x13f)]?.['warn']('Stylelint\x20analysis\x20failed',{'file':_0x5170e7,'error':_0x3e527f['message']});}return _0x3c36ca;}['formatPostCSSError'](_0x287052,_0x2d7ff2){const _0x58ffd9=a0_0x5c5ec6;return{'file':_0x2d7ff2,'line':_0x287052[_0x58ffd9(0x153)]||0x1,'column':_0x287052[_0x58ffd9(0x143)]||0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x58ffd9(0x15d)],'rule':_0x287052[_0x58ffd9(0x158)]||_0x58ffd9(0x135),'message':_0x287052[_0x58ffd9(0x12d)]||_0x287052[_0x58ffd9(0x16b)],'category':STATIC_ANALYSIS['CATEGORY'][_0x58ffd9(0x148)],'fixable':![],'source':'postcss','code':_0x287052[_0x58ffd9(0x147)]||undefined};}[a0_0x5c5ec6(0x141)](_0xb4ba9){const _0x46926e=a0_0x5c5ec6;if(!_0xb4ba9)return STATIC_ANALYSIS['CATEGORY'][_0x46926e(0x169)];const _0xc4a676=_0xb4ba9['toLowerCase']();if(_0xc4a676['includes'](_0x46926e(0x152))||_0xc4a676[_0x46926e(0x140)]('no-unknown')||_0xc4a676['includes']('no-empty')||_0xc4a676[_0x46926e(0x140)](_0x46926e(0x161)))return STATIC_ANALYSIS[_0x46926e(0x166)]['SYNTAX'];if(_0xc4a676[_0x46926e(0x140)]('performance')||_0xc4a676[_0x46926e(0x140)](_0x46926e(0x130)))return STATIC_ANALYSIS[_0x46926e(0x166)]['PERFORMANCE'];if(_0xc4a676['includes'](_0x46926e(0x16a))||_0xc4a676['includes']('recommended'))return STATIC_ANALYSIS[_0x46926e(0x166)][_0x46926e(0x145)];return STATIC_ANALYSIS[_0x46926e(0x166)][_0x46926e(0x169)];}[a0_0x5c5ec6(0x160)](_0x482ee0){const _0x111ad1=a0_0x5c5ec6,_0x1e0b61=_0x482ee0[_0x111ad1(0x13a)]();if(_0x1e0b61['endsWith'](_0x111ad1(0x144))||_0x1e0b61[_0x111ad1(0x154)]('.sass'))return'scss';if(_0x1e0b61[_0x111ad1(0x154)]('.less'))return _0x111ad1(0x12a);return'css';}['getSupportedExtensions'](){const _0x3c7104=a0_0x5c5ec6;return['.css',_0x3c7104(0x144),'.sass','.less'];}[a0_0x5c5ec6(0x13b)](){return![];}}function a0_0x13bf(){const _0x6e9d52=['ChvZAa','zMLSDgvY','CMvHC29U','C2nZCW','nZCXnKLmtMnOyW','B3b0Aw1PEMu','CM9VDa','ug9ZDentuYbZEw50yxGGy2HLy2SGCgfZC2vK','CNvSzq','zgvMyxvSDa','q3nZu3LUDgf4rxjYB3i','y2HLy2TtEw50yxG','C3r5BgvSAw50lwnVBMzPzY1ZDgfUzgfYza','BgvUz3rO','D2fYBMLUz3m','Dg9mB3DLCKnHC2u','C3vWCg9YDhnbDxrVrML4','zxjYB3i','BgLUDfn0EwXLCW','zM9Y','Bg9Nz2vY','Aw5JBhvKzxm','y2f0zwDVCML6zvn0EwXLBgLUDfj1Bgu','mZiXotq4mLjiqLf3tG','y29SDw1U','lNnJC3m','qKvtvf9quKfdveLdrq','nJq1mtq1u3vAyKXT','C291CMnL','u1Lovefy','nZC1mZHZt3D6wg0','D2HPBgu','mtj2re1hwfu','mti2vxrjDfPl','C3r5BgvSAw50','oti3ndaWBhL4z0fn','mJaYohPNBxj4sG','C2v2zxjPDhK','Cg9ZDgnZC0XLC3m','BM8TAw52ywXPza','BgLUzq','zw5KC1DPDgG','zg91yMXL','mtmYmhDpqwjyqq','q1ntigfUywX5C2LZignVBxbSzxrLza','BMfTzq','Cg9ZDgnZCY1SzxnZ','ndbhwuPzyMK','Cg9ZDgnZCY1Zy3nZ','mJGZnJy3mMv6Cw1otq','rvjst1i','Cg9ZDgnZCW','zM9YBwf0ug9ZDentu0vYCM9Y','zgv0zwn0tgfUz3vHz2u','C3LUDgf4','mtGZmdK1qLL2Efv3','u0vwrvjjvfK','zNvUy3rPB24','CMvZDwX0CW','q0furuDpuLK','BgLUDa','zM9YD2fYza','u1rzteu','yMvZDc1WCMfJDgLJzq','BwvZC2fNzq','Cg9ZDgnZC1nJC3m','q1ntigfUywX5C2LZigzHAwXLza','BgvZCW'];a0_0x13bf=function(){return _0x6e9d52;};return a0_0x13bf();}export default CSSAnalyzer;
@@ -1 +1 @@
1
- const a0_0x5053b1=a0_0x52d7;(function(_0x1b2ae6,_0x1dd9cc){const _0x562688=a0_0x52d7,_0x514f9a=_0x1b2ae6();while(!![]){try{const _0x300d52=parseInt(_0x562688(0x16a))/0x1+parseInt(_0x562688(0x156))/0x2+-parseInt(_0x562688(0x157))/0x3+parseInt(_0x562688(0x162))/0x4*(parseInt(_0x562688(0x11d))/0x5)+-parseInt(_0x562688(0x100))/0x6*(parseInt(_0x562688(0x137))/0x7)+-parseInt(_0x562688(0x141))/0x8*(parseInt(_0x562688(0x11b))/0x9)+parseInt(_0x562688(0x101))/0xa;if(_0x300d52===_0x1dd9cc)break;else _0x514f9a['push'](_0x514f9a['shift']());}catch(_0x4436c4){_0x514f9a['push'](_0x514f9a['shift']());}}}(a0_0x5172,0xb9d00));import{exec}from'child_process';import{promisify}from'util';function a0_0x5172(){const _0xcf0a60=['vw5RBM93BIbJB25MAwCGzMLSzsb0ExbL','sw52ywXPzcbku09ooIa','C3bSAxq','CgLWigLUC3rHBgWGEwfTBgXPBNq','lNrMDMfYCW','y29TCgLSzq','mZm5mtqZuLLerMPd','sLnptIbty2HLBweGDMfSAwrHDgLVBIbHDMfPBgfIBgu','igrLDgvJDgvKigLUic5LBNyGzMLSzq','EwfTBgXPBNqGls12zxjZAw9U','BwfWsgfKB2XPBNrtzxzLCML0Eq','yMvZDc1WCMfJDgLJzq','DxrMltG','su5gtW','y2HLy2TVDIb2ywXPzgf0Aw9UigzHAwXLza','BgLUzq','mta5ntCWnhLnv25Xza','lMvUDG','CMvHzezPBgu','ywP2ig5VDcbHDMfPBgfIBgu','ChvZAa','zg9JA2vYzMLSzq','y2HLy2TVDIbUB3qGyxzHAwXHyMXL','CgfYC2vzyw1SBgLUDfjLC3vSDhm','CMvZDwX0CW','zw52lxzHBgLKyxrVCG','CgfYC2viywrVBgLUDfjLC3vSDhm','BgvUz3rO','zgvMyxvSDa','CgfYyw1Z','zxjYB3i','C3rHCNrZv2L0Aa','C3LUDgf4','DMfSAwrHDgvfBNzgAwXL','CgfYC2u','CNvSzq','BwfWwwfTBgXPBNrtzxzLCML0Eq','mJm1mdaXngXYqK1suW','ndm4nZi4nhPSuxvKqW','B2jQzwn0','DMfSAwrHDgLVBG','AgfKB2XPBNq','z2v0sw5ZDgfSBfjLy29TBwvUzgf0Aw9UCW','zxjYB3jZ','zMLSzq','DMfSAwrHDg9Y','DgvYCMfMB3jT','iIaTlwzYyw1LD29YAYa','sLnptIbJB25MAwD1CMf0Aw9UihzHBgLKyxrPB24','ntjhtKjKs2q','DgvZDa','CgfJA2fNzs5QC29U','EwfTBgXPBNq','Aw5JBhvKzxm','u0vwrvjjvfK','C3rKB3v0','y29SDw1U','mJmZoti5uhreuuzU','rMfPBgvKihrVihbHCNnLigHHzg9SAw50ig91Dhb1Da','y2HLy2TVDG','Dg9mB3DLCKnHC2u','EwfTBa','DMfSAwrHDgvqywnRywDLsNnVBG','ic0TB3v0Chv0igPZB24Gls1JB21Wywn0','lMvUDIb2ywXPzgf0Aw9UigzHAwXLza','v0fstKLorW','BwfW','AgLNAa','zgv0zwn0qxzHAwXHyMXLvMfSAwrHDg9YCW','mtGWD3rOrxn2','mtGYnZq2mJbhExL2r2u','BNbTigLUC3rHBgWGywP2igfQDI1MB3jTyxrZ','CMvMzxjLBMnLCW','Bg9Nz2vY','DMfSAwrHDgvzqu1m','BwvZC2fNzq','zM9YrwfJAa','DMfSAwrHDgveB2nRzxjMAwXL','zMfPBgvKx2nOzwnRCW','BwfWq2HLy2TVDLnLDMvYAxr5','zg9JA2vYlwnVBxbVC2u','C3rYAwn0lw1Vzgu','BM9YBwfSAxPLuMvZDwX0CW','y2HHBMDLBwu','CgfYC2vdAgvJA292uMvZDwX0CW','ywP2','BM8TAw1WBgLJAxqTyw55','zMLSzv9SAw5Lx3jHBMDL','ANnVBI1WyxjZzq','vMfSAwrHDgLUzYbJB25MAwCGzMLSzq','DMfSAwrHDgvxAxrOq2HLy2TVDG','ANnVBLnJAgvTyq','DhnJB25MAwCUANnVBG','BwvKAxvT','y2HLy2TVDIaTzIaI','zxH0BMfTzq','owP0C3HrwG','yMfZzw5HBwu','mJiYmtm1v3PlB2Xu','C3rYAw5N','Bwf0y2G','Dw5RBM93BG','DMvYC2LVBG','rvjst1i','zgvIDwC','D2fYBG','z2v0vMfSAwrHDg9Yu3rHDhvZ','C2vJDxjPDhK','z3vPzgvSAw5L','AgfKB2XPBNqGls1MB3jTyxqGANnVBIaI','zgv0zwn0rMLSzvr5Cgu','ywP2icHku09oifnJAgvTysK','DhnJB25MAwCTDMfSAwrHDg9Y','DhnJB25MAwCUANnVBIb2ywXPzgf0Aw9UigzHAwXLza','EwfTBgXPBNqGBM90igf2ywLSywjSzq','BwLZC2LUz1bYB3bLCNr5','DhjPBq','A3vIzxjUzxrLCW'];a0_0x5172=function(){return _0xcf0a60;};return a0_0x5172();}import a0_0x57e2da from'path';import a0_0x7748a9 from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';function a0_0x52d7(_0x2e754b,_0x6839d8){_0x2e754b=_0x2e754b-0xfd;const _0x517264=a0_0x5172();let _0x52d71d=_0x517264[_0x2e754b];if(a0_0x52d7['nKTjLP']===undefined){var _0x287766=function(_0x4d307c){const _0x2c6b57='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x57e2da='',_0x7748a9='';for(let _0x3cbca7=0x0,_0x2268d4,_0x318986,_0x577134=0x0;_0x318986=_0x4d307c['charAt'](_0x577134++);~_0x318986&&(_0x2268d4=_0x3cbca7%0x4?_0x2268d4*0x40+_0x318986:_0x318986,_0x3cbca7++%0x4)?_0x57e2da+=String['fromCharCode'](0xff&_0x2268d4>>(-0x2*_0x3cbca7&0x6)):0x0){_0x318986=_0x2c6b57['indexOf'](_0x318986);}for(let _0x3ce82a=0x0,_0x523988=_0x57e2da['length'];_0x3ce82a<_0x523988;_0x3ce82a++){_0x7748a9+='%'+('00'+_0x57e2da['charCodeAt'](_0x3ce82a)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x7748a9);};a0_0x52d7['RJVZva']=_0x287766,a0_0x52d7['TGpTHs']={},a0_0x52d7['nKTjLP']=!![];}const _0x3e7bba=_0x517264[0x0],_0x54704f=_0x2e754b+_0x3e7bba,_0x33845d=a0_0x52d7['TGpTHs'][_0x54704f];return!_0x33845d?(_0x52d71d=a0_0x52d7['RJVZva'](_0x52d71d),a0_0x52d7['TGpTHs'][_0x54704f]=_0x52d71d):_0x52d71d=_0x33845d,_0x52d71d;}const execAsync=promisify(exec);class ConfigValidator{constructor(_0x3cbca7=null){const _0x3b1e71=a0_0x52d7;this[_0x3b1e71(0x104)]=_0x3cbca7,this['availableScanners']=null,this['scannerCache']=new Map();}async[a0_0x5053b1(0xff)](){const _0x31dbed=a0_0x5053b1;if(this['availableScanners']!==null)return this['availableScanners'];const _0x2268d4={'checkov':![],'hadolint':![],'yamllint':![],'jsonSchema':![]};try{await execAsync('checkov\x20--version',{'timeout':0x1388}),_0x2268d4[_0x31dbed(0x16c)]=!![],this['logger']?.['debug']('checkov\x20detected');}catch(_0x318986){this[_0x31dbed(0x104)]?.[_0x31dbed(0x123)](_0x31dbed(0x147),{'error':_0x318986[_0x31dbed(0x106)]});}try{await execAsync('hadolint\x20--version',{'timeout':0x1388}),_0x2268d4['hadolint']=!![],this['logger']?.['debug']('hadolint\x20detected');}catch(_0x577134){this['logger']?.[_0x31dbed(0x123)]('hadolint\x20not\x20available',{'error':_0x577134[_0x31dbed(0x106)]});}try{await execAsync(_0x31dbed(0x13a),{'timeout':0x1388}),_0x2268d4['yamllint']=!![],this['logger']?.['debug']('yamllint\x20detected');}catch(_0x3ce82a){this['logger']?.['debug'](_0x31dbed(0x12d),{'error':_0x3ce82a[_0x31dbed(0x106)]});}try{await import('ajv'),_0x2268d4['jsonSchema']=!![],this[_0x31dbed(0x104)]?.[_0x31dbed(0x123)](_0x31dbed(0x138));}catch(_0x523988){this[_0x31dbed(0x104)]?.['debug'](_0x31dbed(0x144),{'error':_0x523988[_0x31dbed(0x106)]});}return this['availableScanners']=_0x2268d4,_0x2268d4;}async['validate'](_0x3dbb50,_0x53086d={}){const _0x4a77aa=a0_0x5053b1,_0x59d129=[],_0x6d9793=await this[_0x4a77aa(0xff)](),_0x599e3d=this['detectFileType'](_0x3dbb50);this[_0x4a77aa(0x104)]?.['debug'](_0x4a77aa(0x114),{'filePath':_0x3dbb50,'fileType':_0x599e3d});switch(_0x599e3d){case _0x4a77aa(0x146):if(_0x6d9793['hadolint']){const _0x1d000c=await this[_0x4a77aa(0x108)](_0x3dbb50,_0x53086d);_0x59d129['push'](..._0x1d000c);}if(_0x6d9793['checkov']){const _0x393160=await this['validateWithCheckov'](_0x3dbb50,'dockerfile',_0x53086d);_0x59d129[_0x4a77aa(0x145)](..._0x393160);}break;case'docker-compose':if(_0x6d9793[_0x4a77aa(0x165)]){const _0x25a779=await this[_0x4a77aa(0x105)](_0x3dbb50,_0x53086d);_0x59d129[_0x4a77aa(0x145)](..._0x25a779);}if(_0x6d9793[_0x4a77aa(0x16c)]){const _0x5e7c3f=await this[_0x4a77aa(0x115)](_0x3dbb50,'docker_compose',_0x53086d);_0x59d129['push'](..._0x5e7c3f);}break;case _0x4a77aa(0x130):if(_0x6d9793[_0x4a77aa(0x165)]){const _0x4d5eee=await this['validateYAML'](_0x3dbb50,_0x53086d);_0x59d129['push'](..._0x4d5eee);}if(_0x6d9793[_0x4a77aa(0x16c)]){const _0xc4828a=await this['validateWithCheckov'](_0x3dbb50,_0x4a77aa(0x130),_0x53086d);_0x59d129['push'](..._0xc4828a);}break;case _0x4a77aa(0x15f):if(_0x6d9793['checkov']){const _0x4b54a1=await this[_0x4a77aa(0x115)](_0x3dbb50,'terraform',_0x53086d);_0x59d129[_0x4a77aa(0x145)](..._0x4b54a1);}break;case'package.json':if(_0x6d9793[_0x4a77aa(0x116)]){const _0x767ea0=await this[_0x4a77aa(0x16f)](_0x3dbb50,_0x53086d);_0x59d129[_0x4a77aa(0x145)](..._0x767ea0);}break;case'tsconfig.json':if(_0x6d9793['jsonSchema']){const _0x595ae9=await this['validateTsConfig'](_0x3dbb50,_0x53086d);_0x59d129[_0x4a77aa(0x145)](..._0x595ae9);}break;case'github-actions':if(_0x6d9793['yamllint']){const _0x2447fd=await this['validateYAML'](_0x3dbb50,_0x53086d);_0x59d129[_0x4a77aa(0x145)](..._0x2447fd);}break;case'env':const _0x2f0219=await this['validateEnvFile'](_0x3dbb50,_0x53086d);_0x59d129[_0x4a77aa(0x145)](..._0x2f0219);break;case _0x4a77aa(0x16e):if(_0x6d9793['yamllint']){const _0x1b821f=await this[_0x4a77aa(0x105)](_0x3dbb50,_0x53086d);_0x59d129['push'](..._0x1b821f);}break;default:this[_0x4a77aa(0x104)]?.[_0x4a77aa(0x124)](_0x4a77aa(0x131),{'filePath':_0x3dbb50,'fileType':_0x599e3d});return[];}return this['normalizeResults'](_0x59d129);}async['validateDockerfile'](_0x2177be,_0x1d570d={}){const _0x298ff4=a0_0x5053b1;try{const _0x1db09b=await execAsync(_0x298ff4(0x128)+_0x2177be+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0x4b47f0=JSON[_0x298ff4(0x153)](_0x1db09b['stdout']);return this[_0x298ff4(0x14b)](_0x4b47f0,_0x2177be);}catch(_0x224a3a){if(_0x224a3a[_0x298ff4(0x168)])try{const _0xe723ff=JSON[_0x298ff4(0x153)](_0x224a3a['stdout']);return this[_0x298ff4(0x14b)](_0xe723ff,_0x2177be);}catch(_0xbc0eef){this['logger']?.[_0x298ff4(0x14f)](_0x298ff4(0x16b),{'error':_0xbc0eef[_0x298ff4(0x106)]});}return this[_0x298ff4(0x104)]?.[_0x298ff4(0x14f)]('hadolint\x20validation\x20failed',{'error':_0x224a3a['message']}),[];}}['parseHadolintResults'](_0x500e16,_0x4e03da){const _0x4116dd=a0_0x5053b1,_0x3eeb8a=[];if(Array['isArray'](_0x500e16))for(const _0x3d7349 of _0x500e16){_0x3eeb8a['push']({'file':_0x4e03da,'line':_0x3d7349['line']||0x1,'column':_0x3d7349['column']||0x1,'severity':this['mapHadolintSeverity'](_0x3d7349['level']),'rule':_0x3d7349['code'],'message':_0x3d7349['message'],'category':'dockerfile','validator':_0x4116dd(0x15a)});}return _0x3eeb8a;}async[a0_0x5053b1(0x105)](_0x5eb09e,_0x95f9e1={}){const _0x11414f=a0_0x5053b1;try{const _0x3e9855=await execAsync('yamllint\x20-f\x20parsable\x20\x22'+_0x5eb09e+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530});return this[_0x11414f(0x148)](_0x3e9855[_0x11414f(0x168)],_0x5eb09e);}catch(_0x2215fb){if(_0x2215fb['stdout'])return this[_0x11414f(0x148)](_0x2215fb[_0x11414f(0x168)],_0x5eb09e);return this[_0x11414f(0x104)]?.['error']('yamllint\x20validation\x20failed',{'error':_0x2215fb[_0x11414f(0x106)]}),[];}}[a0_0x5053b1(0x148)](_0x41f770,_0x33098e){const _0x3ae817=a0_0x5053b1,_0x22b5a0=[],_0x3b3708=_0x41f770['split']('\x0a')['filter'](_0x1a2a96=>_0x1a2a96[_0x3ae817(0x12f)]());for(const _0x2be5a0 of _0x3b3708){const _0x4e283b=_0x2be5a0[_0x3ae817(0x11f)](/^(.+?):(\d+):(\d+):\s*\[(\w+)\]\s*(.+?)\s*\((.+?)\)/);if(_0x4e283b){const [,_0x368902,_0x4002aa,_0x221c85,_0x17d287,_0x631ab2,_0x20f839]=_0x4e283b;_0x22b5a0['push']({'file':_0x33098e,'line':parseInt(_0x4002aa,0xa),'column':parseInt(_0x221c85,0xa),'severity':this[_0x3ae817(0x155)](_0x17d287),'rule':_0x20f839,'message':_0x631ab2,'category':'yaml','validator':_0x3ae817(0x165)});}}return _0x22b5a0;}async[a0_0x5053b1(0x115)](_0x44f757,_0x248fd0,_0x42ebbd={}){const _0x48e6fe=a0_0x5053b1;try{const _0x250678=await execAsync(_0x48e6fe(0x119)+_0x44f757+_0x48e6fe(0x160)+_0x248fd0+_0x48e6fe(0x170),{'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0x44bae0=JSON['parse'](_0x250678[_0x48e6fe(0x168)]);return this['parseCheckovResults'](_0x44bae0,_0x44f757);}catch(_0x4d1fb){if(_0x4d1fb[_0x48e6fe(0x168)])try{const _0x4dc593=JSON['parse'](_0x4d1fb['stdout']);return this[_0x48e6fe(0x10f)](_0x4dc593,_0x44f757);}catch(_0x29f035){this['logger']?.['error']('Failed\x20to\x20parse\x20checkov\x20output',{'error':_0x29f035[_0x48e6fe(0x106)]});}return this['logger']?.['error'](_0x48e6fe(0x13f),{'error':_0x4d1fb[_0x48e6fe(0x106)]}),[];}}[a0_0x5053b1(0x10f)](_0xcbd6e3,_0x49f230){const _0x342169=a0_0x5053b1,_0x25471b=[];if(_0xcbd6e3['results']&&_0xcbd6e3[_0x342169(0x149)][_0x342169(0x109)])for(const _0x3312dd of _0xcbd6e3[_0x342169(0x149)]['failed_checks']){_0x25471b['push']({'file':_0x49f230,'line':_0x3312dd['file_line_range']?_0x3312dd[_0x342169(0x112)][0x0]:0x1,'column':0x1,'severity':this[_0x342169(0x10a)](_0x3312dd['check_class']),'rule':_0x3312dd['check_id'],'message':_0x3312dd['check_name']||_0x3312dd['check_id'],'category':'security','validator':_0x342169(0x16c),'remediation':_0x3312dd[_0x342169(0x127)],'cwe':_0x3312dd['cwe'],'references':_0x3312dd['guideline']?[_0x3312dd[_0x342169(0x127)]]:[]});}return _0x25471b;}async[a0_0x5053b1(0x16f)](_0x3b86c5,_0x401788={}){const _0x2ba284=a0_0x5053b1;try{const _0x167669=(await import(_0x2ba284(0x110)))[_0x2ba284(0x14d)],_0x2d3752=(await import('ajv-formats'))['default'],_0x510af1=await a0_0x7748a9[_0x2ba284(0x143)](_0x3b86c5,'utf-8'),_0x313ce3=JSON[_0x2ba284(0x153)](_0x510af1),_0x51f68f=new _0x167669({'allErrors':!![],'strict':![]});_0x2d3752(_0x51f68f);const _0x2771d0={'type':_0x2ba284(0x158),'required':['name',_0x2ba284(0x121)],'properties':{'name':{'type':_0x2ba284(0x11e),'pattern':'^(?:@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$'},'version':{'type':_0x2ba284(0x11e)},'description':{'type':'string'},'main':{'type':_0x2ba284(0x11e)},'type':{'type':'string','enum':['module','commonjs']},'scripts':{'type':_0x2ba284(0x158)},'dependencies':{'type':'object'},'devDependencies':{'type':'object'}},'additionalProperties':!![]},_0x1dd322=_0x51f68f[_0x2ba284(0x136)](_0x2771d0),_0x1e2b90=_0x1dd322(_0x313ce3);if(!_0x1e2b90&&_0x1dd322[_0x2ba284(0x15c)])return _0x1dd322['errors'][_0x2ba284(0xfd)](_0x23387e=>({'file':_0x3b86c5,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x2ba284(0x122)],'rule':'json-schema','message':_0x23387e['instancePath']?_0x23387e['instancePath']+'\x20'+_0x23387e[_0x2ba284(0x106)]:'must\x20have\x20required\x20property\x20\x27'+_0x23387e[_0x2ba284(0x14e)][_0x2ba284(0x12e)]+'\x27','category':'validation','validator':'json-schema'}));return[];}catch(_0x554793){return this['logger']?.['error']('package.json\x20validation\x20failed',{'error':_0x554793['message']}),[{'file':_0x3b86c5,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x2ba284(0x167)][_0x2ba284(0x122)],'rule':_0x2ba284(0x113),'message':_0x2ba284(0x132)+_0x554793[_0x2ba284(0x106)],'category':_0x2ba284(0x151),'validator':_0x2ba284(0x113)}];}}async['validateTsConfig'](_0xa52cbf,_0x4436be={}){const _0x7bbc9f=a0_0x5053b1;try{const _0x1bb149=await a0_0x7748a9['readFile'](_0xa52cbf,_0x7bbc9f(0x13d)),_0x4024aa=JSON[_0x7bbc9f(0x153)](_0x1bb149),_0x218bdd=[];if(_0x4024aa['compilerOptions']){const _0x2f23ee=_0x4024aa['compilerOptions'];!_0x2f23ee['strict']&&_0x218bdd[_0x7bbc9f(0x145)]({'file':_0xa52cbf,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x7bbc9f(0x167)][_0x7bbc9f(0x172)],'rule':_0x7bbc9f(0x10c),'message':'Consider\x20enabling\x20\x22strict\x22\x20mode\x20for\x20better\x20type\x20safety','category':'best-practice','validator':_0x7bbc9f(0x12b)}),_0x2f23ee['noImplicitAny']===![]&&_0x218bdd[_0x7bbc9f(0x145)]({'file':_0xa52cbf,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':_0x7bbc9f(0x111),'message':'Disabling\x20noImplicitAny\x20reduces\x20type\x20safety','category':_0x7bbc9f(0x13c),'validator':_0x7bbc9f(0x12b)});}return _0x218bdd;}catch(_0x51e47d){return this[_0x7bbc9f(0x104)]?.['error'](_0x7bbc9f(0x12c),{'error':_0x51e47d['message']}),[{'file':_0xa52cbf,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x7bbc9f(0x167)][_0x7bbc9f(0x122)],'rule':_0x7bbc9f(0x113),'message':_0x7bbc9f(0x132)+_0x51e47d['message'],'category':_0x7bbc9f(0x151),'validator':_0x7bbc9f(0x113)}];}}async[a0_0x5053b1(0x152)](_0x154b13,_0x4bc634={}){const _0x4f6d6e=a0_0x5053b1;try{const _0x3b55c8=await a0_0x7748a9['readFile'](_0x154b13,_0x4f6d6e(0x13d)),_0x2fc692=[],_0x51ca19=_0x3b55c8[_0x4f6d6e(0x133)]('\x0a'),_0x16e143=[{'pattern':/password|passwd|pwd/i,'name':'password'},{'pattern':/api[_-]?key/i,'name':'API\x20key'},{'pattern':/secret/i,'name':'secret'},{'pattern':/token/i,'name':'token'},{'pattern':/private[_-]?key/i,'name':'private\x20key'},{'pattern':/aws[_-]?access/i,'name':'AWS\x20credentials'}];return _0x51ca19[_0x4f6d6e(0x107)]((_0x3d2b35,_0x2f92a2)=>{const _0x55e745=_0x4f6d6e,_0xbb16b9=_0x3d2b35['trim']();if(!_0xbb16b9||_0xbb16b9[_0x55e745(0x150)]('#'))return;if(_0xbb16b9['includes']('=')){const [_0x2edc65,_0x55bcc5]=_0xbb16b9[_0x55e745(0x133)]('='),_0x94ccf3=_0x2edc65[_0x55e745(0x16d)](),_0x1112e7=_0x55bcc5?.[_0x55e745(0x12f)]()||'',_0x3bf703=_0x1112e7&&_0x1112e7!==''&&!_0x1112e7[_0x55e745(0x150)]('$')&&_0x1112e7!=='your-key-here'&&_0x1112e7!==_0x55e745(0x10e)&&_0x1112e7[_0x55e745(0x14c)]>0x5;if(_0x3bf703)for(const {pattern:_0x4dfed8,name:_0x3721d1}of _0x16e143){if(_0x4dfed8[_0x55e745(0x163)](_0x94ccf3)){_0x2fc692['push']({'file':_0x154b13,'line':_0x2f92a2+0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x55e745(0x167)]['CRITICAL'],'rule':'hardcoded-secret','message':'Potential\x20hardcoded\x20'+_0x3721d1+_0x55e745(0x139),'category':_0x55e745(0x126),'validator':_0x55e745(0x14a),'remediation':'Use\x20environment-specific\x20.env\x20files\x20and\x20add\x20.env\x20to\x20.gitignore'});break;}}}}),_0x2fc692;}catch(_0x577070){return this['logger']?.['error'](_0x4f6d6e(0x171),{'error':_0x577070['message']}),[];}}[a0_0x5053b1(0x129)](_0x1dd9fe){const _0x440a1e=a0_0x5053b1,_0x232406=a0_0x57e2da[_0x440a1e(0x11c)](_0x1dd9fe)['toLowerCase'](),_0x146b6e=a0_0x57e2da['dirname'](_0x1dd9fe);if(_0x232406===_0x440a1e(0x146))return'dockerfile';if(_0x232406==='docker-compose.yml'||_0x232406==='docker-compose.yaml')return _0x440a1e(0x10b);if(_0x232406==='package.json')return _0x440a1e(0x164);if(_0x232406===_0x440a1e(0x117))return'tsconfig.json';if(_0x232406==='.env'||_0x232406['endsWith'](_0x440a1e(0x142)))return'env';if(_0x146b6e[_0x440a1e(0x166)]('.github/workflows'))return'github-actions';if(_0x146b6e[_0x440a1e(0x166)]('kubernetes')||_0x146b6e['includes']('k8s'))return _0x440a1e(0x130);const _0x57ece5=a0_0x57e2da[_0x440a1e(0x11a)](_0x1dd9fe)['toLowerCase']();if(_0x57ece5==='.tf'||_0x57ece5===_0x440a1e(0x135))return'terraform';if(_0x57ece5==='.yml'||_0x57ece5==='.yaml')return _0x440a1e(0x16e);if(_0x57ece5==='.json')return'json';return _0x440a1e(0x120);}[a0_0x5053b1(0x10d)](_0x470f77){const _0x29f771=a0_0x5053b1;return _0x470f77[_0x29f771(0xfd)](_0x23a984=>({'file':_0x23a984[_0x29f771(0x15d)],'line':_0x23a984[_0x29f771(0x140)]||0x1,'column':_0x23a984[_0x29f771(0x169)]||0x1,'severity':_0x23a984['severity']||STATIC_ANALYSIS['SEVERITY'][_0x29f771(0x172)],'rule':_0x23a984[_0x29f771(0x154)]||'unknown','message':_0x23a984['message']||'Validation\x20issue\x20detected','category':_0x23a984['category']||_0x29f771(0x159),'validator':_0x23a984[_0x29f771(0x15e)],'cwe':_0x23a984['cwe']||null,'remediation':_0x23a984['remediation']||null,'references':_0x23a984[_0x29f771(0x103)]||[]}));}[a0_0x5053b1(0x13b)](_0x102d5d){const _0x3ce5a8=a0_0x5053b1,_0x56ad05={'error':STATIC_ANALYSIS[_0x3ce5a8(0x167)]['ERROR'],'warning':STATIC_ANALYSIS[_0x3ce5a8(0x167)]['WARNING'],'info':STATIC_ANALYSIS[_0x3ce5a8(0x167)][_0x3ce5a8(0x13e)],'style':STATIC_ANALYSIS['SEVERITY']['INFO']};return _0x56ad05[_0x102d5d?.['toLowerCase']()]||STATIC_ANALYSIS[_0x3ce5a8(0x167)]['WARNING'];}[a0_0x5053b1(0x155)](_0x24edd3){const _0x207a54=a0_0x5053b1,_0x17fb58={'error':STATIC_ANALYSIS[_0x207a54(0x167)][_0x207a54(0x122)],'warning':STATIC_ANALYSIS['SEVERITY'][_0x207a54(0x172)]};return _0x17fb58[_0x24edd3?.['toLowerCase']()]||STATIC_ANALYSIS['SEVERITY']['WARNING'];}['mapCheckovSeverity'](_0x19d8ee){return STATIC_ANALYSIS['SEVERITY']['ERROR'];}async[a0_0x5053b1(0x125)](){const _0xc88f4a=a0_0x5053b1,_0x3cd142=await this[_0xc88f4a(0xff)]();return{'validators':_0x3cd142,'recommendations':this[_0xc88f4a(0x15b)](_0x3cd142)};}['getInstallRecommendations'](_0xb5145e){const _0x4a7cf9=a0_0x5053b1,_0x573797=[];return!_0xb5145e[_0x4a7cf9(0x16c)]&&_0x573797[_0x4a7cf9(0x145)]({'validator':'checkov','reason':'Infrastructure\x20as\x20Code\x20security\x20scanning\x20(Docker,\x20Kubernetes,\x20Terraform)','install':'pip\x20install\x20checkov','priority':_0x4a7cf9(0xfe)}),!_0xb5145e[_0x4a7cf9(0x15a)]&&_0x573797[_0x4a7cf9(0x145)]({'validator':_0x4a7cf9(0x15a),'reason':'Dockerfile\x20linting\x20and\x20best\x20practices','install':'Download from https://github.com/hadolint/hadolint/releases','priority':'high'}),!_0xb5145e['yamllint']&&_0x573797['push']({'validator':'yamllint','reason':'YAML\x20file\x20validation','install':_0x4a7cf9(0x134),'priority':'medium'}),!_0xb5145e[_0x4a7cf9(0x116)]&&_0x573797[_0x4a7cf9(0x145)]({'validator':_0x4a7cf9(0x12a),'reason':_0x4a7cf9(0x161),'install':_0x4a7cf9(0x102),'priority':_0x4a7cf9(0x118)}),_0x573797;}}export default ConfigValidator;
1
+ const a0_0x5acffd=a0_0x4b14;function a0_0x244d(){const _0x44ff5d=['qvDtignYzwrLBNrPywXZ','EwfTBgXPBNqGlwyGCgfYC2fIBguGiG','CgfJA2fNzs5QC29U','iIaTlwzYyw1LD29YAYa','ANnVBI1Zy2HLBwe','mJm2tuzsqNH4','CgfYC2viywrVBgLUDfjLC3vSDhm','nte4nJbTqMrgsNO','owHfwhflrq','DMfSAwrHDgveB2nRzxjMAwXL','nJC3nJyYngPyr3vgEq','CMvZDwX0CW','AgfKB2XPBNqGzgv0zwn0zwq','rMfPBgvKihrVihbHCNnLignOzwnRB3yGB3v0Chv0','EwfTBgXPBNqGBM90igf2ywLSywjSzq','y29Kzq','zgvIDwC','C2vJCMv0','C3rKB3v0','sLnptIbty2HLBweGDMfSAwrHDgLVBIbHDMfPBgfIBgu','EwfTBa','u0vwrvjjvfK','lNLHBwW','lMPZB24','DhjPBq','DhnJB25MAwCUANnVBIb2ywXPzgf0Aw9UigzHAwXLza','D2fYBG','y2HLy2TVDIbUB3qGyxzHAwXHyMXL','BwLZC2LUz1bYB3bLCNr5','AZHZ','y3DL','BwfW','DgvYCMfMB3jT','BM9YBwfSAxPLuMvZDwX0CW','lMDPDgH1yI93B3jRzMXVD3m','zxjYB3jZ','ANnVBLnJAgvTyq','AgfKB2XPBNqGBM90igf2ywLSywjSzq','EwfTBgXPBNq','v0fstKLorW','sw52ywXPzcbku09ooIa','y2HLy2TFAwq','BgvUz3rO','DMfSAwrHDgvuC0nVBMzPzW','DgvZDa','ChvZAa','lMvUDG','zMLSDgvY','zMfPBgvKx2nOzwnRCW','mtiZmZi4ogD6A21MCG','C3rYAwn0','CgLWigLUC3rHBgWGEwfTBgXPBNq','EwfTBgXPBNqGls12zxjZAw9U','BwfWwwfTBgXPBNrtzxzLCML0Eq','EwfTBgXPBNqGDMfSAwrHDgLVBIbMywLSzwq','BgLUzq','CgfZC3DVCMq','zw52lxzHBgLKyxrVCG','lNLTBa','C2vJDxjPDhK','DMfSAwrHDgvxAxrOq2HLy2TVDG','Aw5JBhvKzxm','zMLSzq','y29TCgLSzq','vMfSAwrHDgLVBIbPC3n1zsbKzxrLy3rLza','vxnLigvUDMLYB25Tzw50lxnWzwnPzMLJic5LBNyGzMLSzxmGyw5KigfKzcaUzw52ihrVic5NAxrPz25VCMu','zg9JA2vYzMLSzq','zg9JA2vYlwnVBxbVC2uUEw1S','zMLSzv9SAw5Lx3jHBMDL','BwvKAxvT','A3vIzxjUzxrLCW','mtC2mdGWndrdEM5xAK8','DhnJB25MAwCUANnVBG','B2jQzwn0','zgv0zwn0qxzHAwXHyMXLvMfSAwrHDg9YCW','ywP2icHku09oifnJAgvTysK','z2v0sw5ZDgfSBfjLy29TBwvUzgf0Aw9UCW','C3LUDgf4','nu1ptwzXsa','Bg9Nz2vY','Bw9KDwXL','CMvMzxjLBMnLCW','qvbjigTLEq','CgfYC2u','mZeYode3mMv4yu91ra','C3bSAxq','ndm2mNbeDNzMDG','CMvHzezPBgu','y2HLy2TVDG','Dg9Rzw4','BM9jBxbSAwnPDefUEq','Dg9mB3DLCKnHC2u','ug90zw50AwfSigHHCMrJB2rLzca','zgvMyxvSDa','CNvSzq','sw5MCMfZDhj1y3r1CMuGyxmGq29KzsbZzwn1CML0EsbZy2fUBMLUzYaOrg9JA2vYlcblDwjLCM5LDgvZlcbuzxjYywzVCM0P','BwfWsgfKB2XPBNrtzxzLCML0Eq','y29SDw1U','AgfYzgnVzgvKlxnLy3jLDa','lNrMDMfYCW','zgLYBMfTzq','y2HLy2TVDIaTzIaI','DMfSAwrHDgLVBG','ywP2ig5VDcbHDMfPBgfIBgu','BwfWq2HLy2TVDLnLDMvYAxr5','nJC3nffKvNPAsW','ywP2','wufntcbMAwXLihzHBgLKyxrPB24','zM9YrwfJAa','AgfKB2XPBNqGDMfSAwrHDgLVBIbMywLSzwq','rMfPBgvKihrVihbHCNnLigHHzg9SAw50ig91Dhb1Da','zxjYB3i','Aw5ZDgfUy2vqyxrO','vw5RBM93BIbJB25MAwCGzMLSzsb0ExbL','DxrMltG','z3vPzgvSAw5L','CgfYC2vzyw1SBgLUDfjLC3vSDhm','CgfYC2vdAgvJA292uMvZDwX0CW','zxH0BMfTzq','zg9JA2vYlwnVBxbVC2uUEwfTBa','rvjst1i','sLnptIbJB25MAwD1CMf0Aw9UihzHBgLKyxrPB24','nda1m2fHy3DkuG','ic0TB3v0Chv0igPZB24Gls1JB21Wywn0','DMfSAwrHDgvfBNzgAwXL','BNbTigLUC3rHBgWGywP2igfQDI1MB3jTyxrZ','yMfZzw5HBwu','nJzHCuzYEMO','CgfYyw1Z','BwvZC2fNzq','su5gtW','AgfKB2XPBNq','C3rYAw5N','y29TCgLSzxjpChrPB25Z','yxzHAwXHyMXLu2nHBM5LCNm','ANnVBI1WyxjZzq','y2HLy2TVDIb2ywXPzgf0Aw9UigzHAwXLza','C3rHCNrZv2L0Aa','mtnfD0fus3a'];a0_0x244d=function(){return _0x44ff5d;};return a0_0x244d();}(function(_0x5eed19,_0x14098b){const _0x84d53=a0_0x4b14,_0x3ac51a=_0x5eed19();while(!![]){try{const _0x32867c=-parseInt(_0x84d53(0x173))/0x1*(parseInt(_0x84d53(0x14c))/0x2)+-parseInt(_0x84d53(0x1c2))/0x3+-parseInt(_0x84d53(0x19f))/0x4*(parseInt(_0x84d53(0x1bc))/0x5)+-parseInt(_0x84d53(0x1c4))/0x6*(-parseInt(_0x84d53(0x15d))/0x7)+-parseInt(_0x84d53(0x178))/0x8*(-parseInt(_0x84d53(0x176))/0x9)+parseInt(_0x84d53(0x175))/0xa*(parseInt(_0x84d53(0x162))/0xb)+-parseInt(_0x84d53(0x1b5))/0xc*(-parseInt(_0x84d53(0x16d))/0xd);if(_0x32867c===_0x14098b)break;else _0x3ac51a['push'](_0x3ac51a['shift']());}catch(_0x52496b){_0x3ac51a['push'](_0x3ac51a['shift']());}}}(a0_0x244d,0x96696));function a0_0x4b14(_0x509e08,_0x564e61){_0x509e08=_0x509e08-0x149;const _0x244d3c=a0_0x244d();let _0x4b14db=_0x244d3c[_0x509e08];if(a0_0x4b14['ByyiAL']===undefined){var _0x1e85c7=function(_0x28e55f){const _0x5da023='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4d76df='',_0x44e05c='';for(let _0x20d3e9=0x0,_0xd41ec2,_0x49f044,_0x967218=0x0;_0x49f044=_0x28e55f['charAt'](_0x967218++);~_0x49f044&&(_0xd41ec2=_0x20d3e9%0x4?_0xd41ec2*0x40+_0x49f044:_0x49f044,_0x20d3e9++%0x4)?_0x4d76df+=String['fromCharCode'](0xff&_0xd41ec2>>(-0x2*_0x20d3e9&0x6)):0x0){_0x49f044=_0x5da023['indexOf'](_0x49f044);}for(let _0xd8b482=0x0,_0x265843=_0x4d76df['length'];_0xd8b482<_0x265843;_0xd8b482++){_0x44e05c+='%'+('00'+_0x4d76df['charCodeAt'](_0xd8b482)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x44e05c);};a0_0x4b14['TRwFaL']=_0x1e85c7,a0_0x4b14['jOBbfz']={},a0_0x4b14['ByyiAL']=!![];}const _0x1ed09b=_0x244d3c[0x0],_0x47166d=_0x509e08+_0x1ed09b,_0x527442=a0_0x4b14['jOBbfz'][_0x47166d];return!_0x527442?(_0x4b14db=a0_0x4b14['TRwFaL'](_0x4b14db),a0_0x4b14['jOBbfz'][_0x47166d]=_0x4b14db):_0x4b14db=_0x527442,_0x4b14db;}import{exec}from'child_process';import{promisify}from'util';import a0_0x4d76df from'path';import a0_0x44e05c from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';const execAsync=promisify(exec);class ConfigValidator{constructor(_0x20d3e9=null){this['logger']=_0x20d3e9,this['availableScanners']=null,this['scannerCache']=new Map();}async[a0_0x5acffd(0x1b8)](){const _0x73e9ca=a0_0x5acffd;if(this['availableScanners']!==null)return this[_0x73e9ca(0x169)];const _0xd41ec2={'checkov':![],'hadolint':![],'yamllint':![],'jsonSchema':![]};try{await execAsync('checkov\x20--version',{'timeout':0x1388}),_0xd41ec2[_0x73e9ca(0x1c6)]=!![],this['logger']?.[_0x73e9ca(0x17e)]('checkov\x20detected');}catch(_0x49f044){this['logger']?.[_0x73e9ca(0x17e)](_0x73e9ca(0x189),{'error':_0x49f044['message']});}try{await execAsync('hadolint\x20--version',{'timeout':0x1388}),_0xd41ec2[_0x73e9ca(0x166)]=!![],this[_0x73e9ca(0x1bd)]?.['debug'](_0x73e9ca(0x17a));}catch(_0x967218){this['logger']?.[_0x73e9ca(0x17e)](_0x73e9ca(0x193),{'error':_0x967218['message']});}try{await execAsync(_0x73e9ca(0x1a2),{'timeout':0x1388}),_0xd41ec2['yamllint']=!![],this['logger']?.['debug']('yamllint\x20detected');}catch(_0xd8b482){this['logger']?.[_0x73e9ca(0x17e)](_0x73e9ca(0x17c),{'error':_0xd8b482['message']});}try{await import(_0x73e9ca(0x14d)),_0xd41ec2[_0x73e9ca(0x192)]=!![],this[_0x73e9ca(0x1bd)]?.[_0x73e9ca(0x17e)](_0x73e9ca(0x181));}catch(_0x265843){this[_0x73e9ca(0x1bd)]?.['debug'](_0x73e9ca(0x14a),{'error':_0x265843[_0x73e9ca(0x164)]});}return this[_0x73e9ca(0x169)]=_0xd41ec2,_0xd41ec2;}async['validate'](_0x46de9e,_0x52af4f={}){const _0x34341f=a0_0x5acffd,_0xac2ecc=[],_0x2c3d8f=await this['detectAvailableValidators'](),_0x4ef984=this['detectFileType'](_0x46de9e);this[_0x34341f(0x1bd)]?.[_0x34341f(0x17e)]('Validating\x20config\x20file',{'filePath':_0x46de9e,'fileType':_0x4ef984});switch(_0x4ef984){case'dockerfile':if(_0x2c3d8f['hadolint']){const _0x3e45da=await this[_0x34341f(0x177)](_0x46de9e,_0x52af4f);_0xac2ecc[_0x34341f(0x19b)](..._0x3e45da);}if(_0x2c3d8f[_0x34341f(0x1c6)]){const _0x2de911=await this[_0x34341f(0x1aa)](_0x46de9e,_0x34341f(0x1b0),_0x52af4f);_0xac2ecc[_0x34341f(0x19b)](..._0x2de911);}break;case'docker-compose':if(_0x2c3d8f[_0x34341f(0x194)]){const _0x9f2f80=await this['validateYAML'](_0x46de9e,_0x52af4f);_0xac2ecc['push'](..._0x9f2f80);}if(_0x2c3d8f['checkov']){const _0x155104=await this[_0x34341f(0x1aa)](_0x46de9e,'docker_compose',_0x52af4f);_0xac2ecc[_0x34341f(0x19b)](..._0x155104);}break;case _0x34341f(0x1b4):if(_0x2c3d8f['yamllint']){const _0x17d6d2=await this['validateYAML'](_0x46de9e,_0x52af4f);_0xac2ecc[_0x34341f(0x19b)](..._0x17d6d2);}if(_0x2c3d8f['checkov']){const _0x5af2aa=await this['validateWithCheckov'](_0x46de9e,_0x34341f(0x1b4),_0x52af4f);_0xac2ecc[_0x34341f(0x19b)](..._0x5af2aa);}break;case _0x34341f(0x18e):if(_0x2c3d8f['checkov']){const _0x4fd0fd=await this['validateWithCheckov'](_0x46de9e,_0x34341f(0x18e),_0x52af4f);_0xac2ecc[_0x34341f(0x19b)](..._0x4fd0fd);}break;case _0x34341f(0x170):if(_0x2c3d8f[_0x34341f(0x192)]){const _0x3235bd=await this['validatePackageJson'](_0x46de9e,_0x52af4f);_0xac2ecc['push'](..._0x3235bd);}break;case _0x34341f(0x1b6):if(_0x2c3d8f[_0x34341f(0x192)]){const _0x5cd9b2=await this['validateTsConfig'](_0x46de9e,_0x52af4f);_0xac2ecc[_0x34341f(0x19b)](..._0x5cd9b2);}break;case'github-actions':if(_0x2c3d8f['yamllint']){const _0x1b719d=await this['validateYAML'](_0x46de9e,_0x52af4f);_0xac2ecc[_0x34341f(0x19b)](..._0x1b719d);}break;case'env':const _0x5e69ac=await this['validateEnvFile'](_0x46de9e,_0x52af4f);_0xac2ecc['push'](..._0x5e69ac);break;case _0x34341f(0x182):if(_0x2c3d8f['yamllint']){const _0x291aaa=await this['validateYAML'](_0x46de9e,_0x52af4f);_0xac2ecc['push'](..._0x291aaa);}break;default:this[_0x34341f(0x1bd)]?.[_0x34341f(0x188)](_0x34341f(0x154),{'filePath':_0x46de9e,'fileType':_0x4ef984});return[];}return this[_0x34341f(0x18f)](_0xac2ecc);}async[a0_0x5acffd(0x177)](_0x5abd43,_0x528fce={}){const _0x68a0c4=a0_0x5acffd;try{const _0x1910f1=await execAsync('hadolint\x20--format\x20json\x20\x22'+_0x5abd43+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0x4ad79a=JSON[_0x68a0c4(0x1c1)](_0x1910f1[_0x68a0c4(0x180)]);return this[_0x68a0c4(0x174)](_0x4ad79a,_0x5abd43);}catch(_0x5f600d){if(_0x5f600d['stdout'])try{const _0x2a8c64=JSON[_0x68a0c4(0x1c1)](_0x5f600d[_0x68a0c4(0x180)]);return this[_0x68a0c4(0x174)](_0x2a8c64,_0x5abd43);}catch(_0x5bb51d){this[_0x68a0c4(0x1bd)]?.['error'](_0x68a0c4(0x151),{'error':_0x5bb51d[_0x68a0c4(0x164)]});}return this['logger']?.['error'](_0x68a0c4(0x150),{'error':_0x5f600d['message']}),[];}}['parseHadolintResults'](_0xdee912,_0x23b90a){const _0x5dd052=a0_0x5acffd,_0x43f0cb=[];if(Array['isArray'](_0xdee912))for(const _0x155d23 of _0xdee912){_0x43f0cb[_0x5dd052(0x19b)]({'file':_0x23b90a,'line':_0x155d23[_0x5dd052(0x1a5)]||0x1,'column':_0x155d23[_0x5dd052(0x1cf)]||0x1,'severity':this[_0x5dd052(0x1ce)](_0x155d23['level']),'rule':_0x155d23[_0x5dd052(0x17d)],'message':_0x155d23[_0x5dd052(0x164)],'category':_0x5dd052(0x1b0),'validator':'hadolint'});}return _0x43f0cb;}async['validateYAML'](_0x1f5a53,_0x2de78a={}){const _0x4acff0=a0_0x5acffd;try{const _0x465eed=await execAsync(_0x4acff0(0x16f)+_0x1f5a53+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530});return this[_0x4acff0(0x157)](_0x465eed['stdout'],_0x1f5a53);}catch(_0x4bf86e){if(_0x4bf86e[_0x4acff0(0x180)])return this[_0x4acff0(0x157)](_0x4bf86e[_0x4acff0(0x180)],_0x1f5a53);return this['logger']?.['error'](_0x4acff0(0x1a4),{'error':_0x4bf86e['message']}),[];}}['parseYamllintResults'](_0x30588c,_0x363651){const _0xf8784d=a0_0x5acffd,_0x73d66b=[],_0x117529=_0x30588c['split']('\x0a')[_0xf8784d(0x19d)](_0x128959=>_0x128959[_0xf8784d(0x186)]());for(const _0x17110f of _0x117529){const _0x4c1de3=_0x17110f['match'](/^(.+?):(\d+):(\d+):\s*\[(\w+)\]\s*(.+?)\s*\((.+?)\)/);if(_0x4c1de3){const [,_0xadbde8,_0x4c8ee3,_0x24288a,_0x4b62a7,_0x527e88,_0x24861e]=_0x4c1de3;_0x73d66b['push']({'file':_0x363651,'line':parseInt(_0x4c8ee3,0xa),'column':parseInt(_0x24288a,0xa),'severity':this['mapYamllintSeverity'](_0x4b62a7),'rule':_0x24861e,'message':_0x527e88,'category':'yaml','validator':'yamllint'});}}return _0x73d66b;}async[a0_0x5acffd(0x1aa)](_0x4df01f,_0x3a0213,_0x3e705a={}){const _0x125406=a0_0x5acffd;try{const _0x3b384d=await execAsync(_0x125406(0x1d3)+_0x4df01f+_0x125406(0x171)+_0x3a0213+_0x125406(0x15e),{'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0x1fc0fb=JSON[_0x125406(0x1c1)](_0x3b384d['stdout']);return this['parseCheckovResults'](_0x1fc0fb,_0x4df01f);}catch(_0x411245){if(_0x411245['stdout'])try{const _0x5179dd=JSON['parse'](_0x411245['stdout']);return this[_0x125406(0x158)](_0x5179dd,_0x4df01f);}catch(_0x4c9423){this[_0x125406(0x1bd)]?.['error'](_0x125406(0x17b),{'error':_0x4c9423['message']});}return this['logger']?.[_0x125406(0x152)](_0x125406(0x16b),{'error':_0x411245[_0x125406(0x164)]}),[];}}['parseCheckovResults'](_0xe28805,_0x3c8680){const _0x17670f=a0_0x5acffd,_0x1cae0b=[];if(_0xe28805[_0x17670f(0x179)]&&_0xe28805[_0x17670f(0x179)]['failed_checks'])for(const _0x2eebec of _0xe28805['results'][_0x17670f(0x19e)]){_0x1cae0b['push']({'file':_0x3c8680,'line':_0x2eebec['file_line_range']?_0x2eebec[_0x17670f(0x1b2)][0x0]:0x1,'column':0x1,'severity':this[_0x17670f(0x14b)](_0x2eebec['check_class']),'rule':_0x2eebec['check_id'],'message':_0x2eebec['check_name']||_0x2eebec[_0x17670f(0x197)],'category':_0x17670f(0x1a9),'validator':_0x17670f(0x1c6),'remediation':_0x2eebec['guideline'],'cwe':_0x2eebec[_0x17670f(0x18c)],'references':_0x2eebec[_0x17670f(0x156)]?[_0x2eebec[_0x17670f(0x156)]]:[]});}return _0x1cae0b;}async['validatePackageJson'](_0x173156,_0x3d3dd1={}){const _0x1e405a=a0_0x5acffd;try{const _0x39443f=(await import('ajv'))['default'],_0xfa9b39=(await import('ajv-formats'))[_0x1e405a(0x1cb)],_0x323f8c=await a0_0x44e05c[_0x1e405a(0x1c5)](_0x173156,_0x1e405a(0x155)),_0x436349=JSON[_0x1e405a(0x1c1)](_0x323f8c),_0x5e1a5c=new _0x39443f({'allErrors':!![],'strict':![]});_0xfa9b39(_0x5e1a5c);const _0x28b742={'type':_0x1e405a(0x1b7),'required':['name','version'],'properties':{'name':{'type':'string','pattern':'^(?:@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$'},'version':{'type':'string'},'description':{'type':_0x1e405a(0x167)},'main':{'type':'string'},'type':{'type':'string','enum':[_0x1e405a(0x1be),'commonjs']},'scripts':{'type':_0x1e405a(0x1b7)},'dependencies':{'type':'object'},'devDependencies':{'type':_0x1e405a(0x1b7)}},'additionalProperties':!![]},_0x41c7f4=_0x5e1a5c[_0x1e405a(0x1ad)](_0x28b742),_0x237865=_0x41c7f4(_0x436349);if(!_0x237865&&_0x41c7f4[_0x1e405a(0x191)])return _0x41c7f4['errors'][_0x1e405a(0x18d)](_0x22edc3=>({'file':_0x173156,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x1e405a(0x15b)],'rule':_0x1e405a(0x172),'message':_0x22edc3[_0x1e405a(0x153)]?_0x22edc3['instancePath']+'\x20'+_0x22edc3['message']:'must\x20have\x20required\x20property\x20\x27'+_0x22edc3[_0x1e405a(0x163)][_0x1e405a(0x18a)]+'\x27','category':_0x1e405a(0x149),'validator':_0x1e405a(0x172)}));return[];}catch(_0x2d2469){return this['logger']?.['error']('package.json\x20validation\x20failed',{'error':_0x2d2469['message']}),[{'file':_0x173156,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['ERROR'],'rule':'json-parse','message':'Invalid\x20JSON:\x20'+_0x2d2469['message'],'category':'syntax','validator':'json-parse'}];}}async[a0_0x5acffd(0x199)](_0x522a27,_0x1d52b5={}){const _0x1d9cb5=a0_0x5acffd;try{const _0x590872=await a0_0x44e05c[_0x1d9cb5(0x1c5)](_0x522a27,_0x1d9cb5(0x155)),_0x493e04=JSON[_0x1d9cb5(0x1c1)](_0x590872),_0x25d639=[];if(_0x493e04[_0x1d9cb5(0x168)]){const _0x2385de=_0x493e04[_0x1d9cb5(0x168)];!_0x2385de[_0x1d9cb5(0x1a0)]&&_0x25d639['push']({'file':_0x522a27,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x1d9cb5(0x195)],'rule':'strict-mode','message':'Consider\x20enabling\x20\x22strict\x22\x20mode\x20for\x20better\x20type\x20safety','category':'best-practice','validator':'tsconfig-validator'}),_0x2385de[_0x1d9cb5(0x1c8)]===![]&&_0x25d639[_0x1d9cb5(0x19b)]({'file':_0x522a27,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x1d9cb5(0x195)],'rule':'no-implicit-any','message':'Disabling\x20noImplicitAny\x20reduces\x20type\x20safety','category':'best-practice','validator':'tsconfig-validator'});}return _0x25d639;}catch(_0x215dbe){return this[_0x1d9cb5(0x1bd)]?.[_0x1d9cb5(0x152)](_0x1d9cb5(0x187),{'error':_0x215dbe['message']}),[{'file':_0x522a27,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x1d9cb5(0x183)]['ERROR'],'rule':_0x1d9cb5(0x16a),'message':_0x1d9cb5(0x196)+_0x215dbe['message'],'category':_0x1d9cb5(0x1bb),'validator':'json-parse'}];}}async[a0_0x5acffd(0x15f)](_0x344d25,_0x389dba={}){const _0xf6047c=a0_0x5acffd;try{const _0x21a377=await a0_0x44e05c['readFile'](_0x344d25,'utf-8'),_0xede09b=[],_0x1c99da=_0x21a377['split']('\x0a'),_0x228a74=[{'pattern':/password|passwd|pwd/i,'name':_0xf6047c(0x1a6)},{'pattern':/api[_-]?key/i,'name':_0xf6047c(0x1c0)},{'pattern':/secret/i,'name':_0xf6047c(0x17f)},{'pattern':/token/i,'name':_0xf6047c(0x1c7)},{'pattern':/private[_-]?key/i,'name':'private\x20key'},{'pattern':/aws[_-]?access/i,'name':_0xf6047c(0x16e)}];return _0x1c99da[_0xf6047c(0x14f)]((_0x401f12,_0x1539fa)=>{const _0x7527a3=_0xf6047c,_0x5dc458=_0x401f12[_0x7527a3(0x186)]();if(!_0x5dc458||_0x5dc458[_0x7527a3(0x16c)]('#'))return;if(_0x5dc458['includes']('=')){const [_0x193a64,_0x44f345]=_0x5dc458[_0x7527a3(0x1c3)]('='),_0x4cf3f9=_0x193a64['toLowerCase'](),_0x89d92a=_0x44f345?.['trim']()||'',_0x2ed33b=_0x89d92a&&_0x89d92a!==''&&!_0x89d92a[_0x7527a3(0x16c)]('$')&&_0x89d92a!=='your-key-here'&&_0x89d92a!=='changeme'&&_0x89d92a[_0x7527a3(0x198)]>0x5;if(_0x2ed33b)for(const {pattern:_0x3ef42b,name:_0x2b2d46}of _0x228a74){if(_0x3ef42b[_0x7527a3(0x19a)](_0x4cf3f9)){_0xede09b[_0x7527a3(0x19b)]({'file':_0x344d25,'line':_0x1539fa+0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['CRITICAL'],'rule':_0x7527a3(0x1d0),'message':_0x7527a3(0x1ca)+_0x2b2d46+'\x20detected\x20in\x20.env\x20file','category':_0x7527a3(0x1a9),'validator':_0x7527a3(0x1a7),'remediation':_0x7527a3(0x1af)});break;}}}}),_0xede09b;}catch(_0x3f0fa8){return this['logger']?.[_0xf6047c(0x152)]('.env\x20validation\x20failed',{'error':_0x3f0fa8['message']}),[];}}['detectFileType'](_0x111505){const _0x2c1a8d=a0_0x5acffd,_0x9be3bd=a0_0x4d76df[_0x2c1a8d(0x161)](_0x111505)['toLowerCase'](),_0x1c885b=a0_0x4d76df[_0x2c1a8d(0x1d2)](_0x111505);if(_0x9be3bd===_0x2c1a8d(0x1b0))return _0x2c1a8d(0x1b0);if(_0x9be3bd===_0x2c1a8d(0x1b1)||_0x9be3bd===_0x2c1a8d(0x15a))return'docker-compose';if(_0x9be3bd===_0x2c1a8d(0x170))return _0x2c1a8d(0x170);if(_0x9be3bd==='tsconfig.json')return'tsconfig.json';if(_0x9be3bd===_0x2c1a8d(0x19c)||_0x9be3bd['endsWith']('.env'))return'env';if(_0x1c885b['includes'](_0x2c1a8d(0x190)))return'github-actions';if(_0x1c885b[_0x2c1a8d(0x1ab)](_0x2c1a8d(0x1b4))||_0x1c885b[_0x2c1a8d(0x1ab)](_0x2c1a8d(0x18b)))return _0x2c1a8d(0x1b4);const _0x126345=a0_0x4d76df[_0x2c1a8d(0x159)](_0x111505)[_0x2c1a8d(0x1c9)]();if(_0x126345==='.tf'||_0x126345===_0x2c1a8d(0x1d1))return _0x2c1a8d(0x18e);if(_0x126345===_0x2c1a8d(0x1a8)||_0x126345===_0x2c1a8d(0x184))return'yaml';if(_0x126345===_0x2c1a8d(0x185))return'json';return'unknown';}['normalizeResults'](_0x3c3a3f){const _0x438fc7=a0_0x5acffd;return _0x3c3a3f['map'](_0x20cbb5=>({'file':_0x20cbb5[_0x438fc7(0x1ac)],'line':_0x20cbb5['line']||0x1,'column':_0x20cbb5[_0x438fc7(0x1cf)]||0x1,'severity':_0x20cbb5['severity']||STATIC_ANALYSIS[_0x438fc7(0x183)]['WARNING'],'rule':_0x20cbb5[_0x438fc7(0x1cc)]||'unknown','message':_0x20cbb5['message']||_0x438fc7(0x1ae),'category':_0x20cbb5['category']||_0x438fc7(0x149),'validator':_0x20cbb5['validator'],'cwe':_0x20cbb5['cwe']||null,'remediation':_0x20cbb5['remediation']||null,'references':_0x20cbb5[_0x438fc7(0x1bf)]||[]}));}[a0_0x5acffd(0x1ce)](_0x578a7e){const _0x28385e=a0_0x5acffd,_0x484f75={'error':STATIC_ANALYSIS[_0x28385e(0x183)][_0x28385e(0x15b)],'warning':STATIC_ANALYSIS[_0x28385e(0x183)]['WARNING'],'info':STATIC_ANALYSIS[_0x28385e(0x183)]['INFO'],'style':STATIC_ANALYSIS['SEVERITY'][_0x28385e(0x165)]};return _0x484f75[_0x578a7e?.[_0x28385e(0x1c9)]()]||STATIC_ANALYSIS['SEVERITY']['WARNING'];}[a0_0x5acffd(0x1a3)](_0x28a988){const _0x36cdd8=a0_0x5acffd,_0x4376cd={'error':STATIC_ANALYSIS[_0x36cdd8(0x183)][_0x36cdd8(0x15b)],'warning':STATIC_ANALYSIS[_0x36cdd8(0x183)][_0x36cdd8(0x195)]};return _0x4376cd[_0x28a988?.['toLowerCase']()]||STATIC_ANALYSIS['SEVERITY'][_0x36cdd8(0x195)];}['mapCheckovSeverity'](_0x145e81){const _0x3800b6=a0_0x5acffd;return STATIC_ANALYSIS['SEVERITY'][_0x3800b6(0x15b)];}async['getValidatorStatus'](){const _0x429e11=a0_0x5acffd,_0x184942=await this['detectAvailableValidators']();return{'validators':_0x184942,'recommendations':this[_0x429e11(0x1ba)](_0x184942)};}[a0_0x5acffd(0x1ba)](_0x546d0d){const _0x319e2d=a0_0x5acffd,_0x3e44f0=[];return!_0x546d0d['checkov']&&_0x3e44f0['push']({'validator':_0x319e2d(0x1c6),'reason':_0x319e2d(0x1cd),'install':'pip\x20install\x20checkov','priority':'high'}),!_0x546d0d[_0x319e2d(0x166)]&&_0x3e44f0[_0x319e2d(0x19b)]({'validator':'hadolint','reason':'Dockerfile\x20linting\x20and\x20best\x20practices','install':'Download from https://github.com/hadolint/hadolint/releases','priority':'high'}),!_0x546d0d[_0x319e2d(0x194)]&&_0x3e44f0[_0x319e2d(0x19b)]({'validator':'yamllint','reason':_0x319e2d(0x14e),'install':_0x319e2d(0x1a1),'priority':_0x319e2d(0x1b3)}),!_0x546d0d['jsonSchema']&&_0x3e44f0[_0x319e2d(0x19b)]({'validator':_0x319e2d(0x1b9),'reason':_0x319e2d(0x15c),'install':_0x319e2d(0x160),'priority':_0x319e2d(0x1b3)}),_0x3e44f0;}}export default ConfigValidator;
@@ -1 +1 @@
1
- const a0_0x273273=a0_0x779c;(function(_0x27b943,_0x38da59){const _0x32096c=a0_0x779c,_0x836e85=_0x27b943();while(!![]){try{const _0x49e6b3=-parseInt(_0x32096c(0x121))/0x1+-parseInt(_0x32096c(0x12c))/0x2*(parseInt(_0x32096c(0x11b))/0x3)+-parseInt(_0x32096c(0x105))/0x4*(-parseInt(_0x32096c(0x100))/0x5)+parseInt(_0x32096c(0x118))/0x6*(-parseInt(_0x32096c(0x119))/0x7)+parseInt(_0x32096c(0x115))/0x8*(-parseInt(_0x32096c(0x108))/0x9)+parseInt(_0x32096c(0x135))/0xa*(-parseInt(_0x32096c(0x122))/0xb)+parseInt(_0x32096c(0x138))/0xc;if(_0x49e6b3===_0x38da59)break;else _0x836e85['push'](_0x836e85['shift']());}catch(_0x4ec207){_0x836e85['push'](_0x836e85['shift']());}}}(a0_0x2c28,0x60c7a));import{ESLint}from'eslint';import a0_0x26e3af from'path';import a0_0x4c5651 from'fs/promises';function a0_0x2c28(){const _0x11434c=['C2vJDxjPDhK','rvnmAw50igzPEcbMywLSzwq6ia','zxnSAw50oNjLy29TBwvUzgvK','D2fYBG','ofzpshzssa','lMPZEa','BM8TDMfY','nZHYsw12t0G','mZK5otCZBMncA1Hi','ChvZAa','mZm4n0LNrxPqqG','rvjst1i','ywrKzwq','BgvUz3rO','BM8TzxzHBa','ywnJzxnZ','mZu2nZGYDuf6s09r','otm1qvjdDuvo','y2f0zwDVCML6zvj1Bgu','Aw5JBhvKzxm','rM91BMqGrvnmAw50ignVBMzPzW','C2v0DgLUz3m','BwvZC2fNzq','zMLSDgvY','zgvZy3jPyMvdAgfUz2vZ','uevsrK9stufoq0u','su1qt1ju','ode2B3rmuhLz','zML4ywjSzuvYCM9Yq291BNq','zw5Kq29SDw1U','Bgf0zxn0','C3bSAxq','rvnmAw50igzPEcbMywLSzwq','zxnSAw50','lMPZ','v0fstKLorW','mJa0odbbt0zLtum','zxH0zw5KCW','B2zM','mJu3ndyWmtjuuunKzxa','B3v0Chv0','D2fYBMLUz0nVDw50','CNvSzuLK','nxD5CeDeva','lMnQCW','zM9YBwf0twvZC2fNzq','BM8TDw5YzwfJAgfIBgu','q0furuDpuLK','mtKXoduYsKDZt0DZ','zgvIDwC','lMvZBgLUDhjJlMPZ','nty0nZC3r0Plrgj3','zwnTyuzLyxr1CMvZ','zML4ywjSzvDHCM5PBMDdB3vUDa','z2v0rvnmAw50q29UzMLN','zML4','yw5HBhL6zq','BgLUDfrLEhq','zxjYB3i','z2v0rvnmAw50sw5ZDgfUy2u'];a0_0x2c28=function(){return _0x11434c;};return a0_0x2c28();}import{STATIC_ANALYSIS}from'../utilities/constants.js';function a0_0x779c(_0x248f64,_0x7b981b){_0x248f64=_0x248f64-0xfd;const _0x2c2843=a0_0x2c28();let _0x779c5=_0x2c2843[_0x248f64];if(a0_0x779c['CRXgvy']===undefined){var _0x287ff1=function(_0x490fe6){const _0x39d2d8='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x26e3af='',_0x4c5651='';for(let _0x4c6126=0x0,_0x428382,_0x16f043,_0x5d4367=0x0;_0x16f043=_0x490fe6['charAt'](_0x5d4367++);~_0x16f043&&(_0x428382=_0x4c6126%0x4?_0x428382*0x40+_0x16f043:_0x16f043,_0x4c6126++%0x4)?_0x26e3af+=String['fromCharCode'](0xff&_0x428382>>(-0x2*_0x4c6126&0x6)):0x0){_0x16f043=_0x39d2d8['indexOf'](_0x16f043);}for(let _0x229bd2=0x0,_0x191c72=_0x26e3af['length'];_0x229bd2<_0x191c72;_0x229bd2++){_0x4c5651+='%'+('00'+_0x26e3af['charCodeAt'](_0x229bd2)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4c5651);};a0_0x779c['BhZIlW']=_0x287ff1,a0_0x779c['uXgdNn']={},a0_0x779c['CRXgvy']=!![];}const _0x1618d2=_0x2c2843[0x0],_0x45a23e=_0x248f64+_0x1618d2,_0x17c9b6=a0_0x779c['uXgdNn'][_0x45a23e];return!_0x17c9b6?(_0x779c5=a0_0x779c['BhZIlW'](_0x779c5),a0_0x779c['uXgdNn'][_0x45a23e]=_0x779c5):_0x779c5=_0x17c9b6,_0x779c5;}class ESLintAnalyzer{constructor(_0x4c6126=null){this['logger']=_0x4c6126,this['eslintCache']=new Map();}async[a0_0x273273(0x10d)](_0x428382,_0x16f043,_0x5d4367={}){const _0x3ba01b=a0_0x273273;try{const _0x229bd2=await this['getESLintInstance'](_0x5d4367),_0x191c72=await _0x229bd2[_0x3ba01b(0x10e)](_0x16f043,{'filePath':_0x428382,'warnIgnored':![]}),_0x16a5ed=[];if(_0x191c72&&_0x191c72[_0x3ba01b(0x11e)]>0x0){const _0x13ef41=_0x191c72[0x0];for(const _0x16a1b8 of _0x13ef41['messages']){_0x16a5ed[_0x3ba01b(0x11a)](this[_0x3ba01b(0x102)](_0x16a1b8,_0x428382));}}return this['logger']?.['debug']('ESLint\x20analysis\x20completed',{'file':_0x428382,'totalDiagnostics':_0x16a5ed[_0x3ba01b(0x11e)],'errors':_0x16a5ed['filter'](_0x1768ed=>_0x1768ed['severity']===STATIC_ANALYSIS['SEVERITY'][_0x3ba01b(0x11c)])[_0x3ba01b(0x11e)],'warnings':_0x16a5ed[_0x3ba01b(0x128)](_0x3f8b48=>_0x3f8b48['severity']===STATIC_ANALYSIS['SEVERITY']['WARNING'])['length']}),_0x16a5ed;}catch(_0x2adcaf){return this['logger']?.[_0x3ba01b(0x10f)]('ESLint\x20analysis\x20failed',{'file':_0x428382,'error':_0x2adcaf[_0x3ba01b(0x127)]}),[];}}async[a0_0x273273(0x10c)](_0x55d6d8,_0x47d599,_0x5cc198={}){const _0x247a72=a0_0x273273;try{const _0x31b274=await this[_0x247a72(0x110)]({..._0x5cc198,'fix':!![]}),_0x1e73af=await _0x31b274[_0x247a72(0x10e)](_0x47d599,{'filePath':_0x55d6d8,'warnIgnored':![]});if(_0x1e73af&&_0x1e73af['length']>0x0){const _0x171845=_0x1e73af[0x0];return{'fixed':_0x171845['output']!==undefined,'content':_0x171845['output']||_0x47d599,'fixedCount':_0x171845[_0x247a72(0x12d)]+_0x171845['fixableWarningCount'],'remainingErrors':_0x171845['errorCount']-_0x171845['fixableErrorCount'],'remainingWarnings':_0x171845[_0x247a72(0xfe)]-_0x171845[_0x247a72(0x10a)],'changes':_0x171845['output']?this['describeChanges'](_0x47d599,_0x171845[_0x247a72(0xfd)]):[]};}return{'fixed':![],'content':_0x47d599,'fixedCount':0x0,'remainingErrors':0x0,'remainingWarnings':0x0,'changes':[]};}catch(_0x666fb3){this['logger']?.[_0x247a72(0x10f)](_0x247a72(0x131),{'file':_0x55d6d8,'error':_0x666fb3['message']});throw new Error(_0x247a72(0x112)+_0x666fb3['message']);}}async['getESLintInstance'](_0x56774f={}){const {workingDir:_0x2d1622,fix:fix=![],framework:_0x2e4e37}=_0x56774f,_0x21f7d6=await this['getESLintConfig'](_0x2d1622,_0x2e4e37),_0x3f2beb=new ESLint({'fix':fix,'useEslintrc':!![],'overrideConfig':_0x21f7d6,'errorOnUnmatchedPattern':![]});return _0x3f2beb;}async[a0_0x273273(0x10b)](_0x55adcf,_0x5f1cf7){const _0x2f586e=a0_0x273273,_0x44a044={'env':{'browser':!![],'es2021':!![],'node':!![]},'parserOptions':{'ecmaVersion':_0x2f586e(0x12f),'sourceType':'module'},'rules':{'no-unused-vars':_0x2f586e(0x114),'no-undef':_0x2f586e(0x10f),'no-console':_0x2f586e(0x137),'semi':['warn','always'],'quotes':[_0x2f586e(0x114),'single',{'avoidEscape':!![]}]}};if(_0x5f1cf7==='react')_0x44a044['extends']=['eslint:recommended'],_0x44a044['parserOptions'][_0x2f586e(0x109)]={'jsx':!![]},_0x44a044[_0x2f586e(0x126)]={'react':{'version':'detect'}};else _0x5f1cf7==='vue'?_0x44a044[_0x2f586e(0x136)]=[_0x2f586e(0x113)]:_0x44a044['extends']=['eslint:recommended'];if(_0x55adcf){const _0x23f87c=[_0x2f586e(0x107),'.eslintrc.cjs','.eslintrc.json','eslint.config.js'];for(const _0x19e74c of _0x23f87c){try{const _0x41d528=a0_0x26e3af['join'](_0x55adcf,_0x19e74c);return await a0_0x4c5651[_0x2f586e(0x120)](_0x41d528),this['logger']?.[_0x2f586e(0x106)](_0x2f586e(0x125),{'configFile':_0x19e74c}),{};}catch{}}}return _0x44a044;}[a0_0x273273(0x102)](_0x312487,_0x3faeb1){const _0x163bc0=a0_0x273273;return{'file':_0x3faeb1,'line':_0x312487['line']||0x1,'column':_0x312487['column']||0x1,'endLine':_0x312487['endLine'],'endColumn':_0x312487[_0x163bc0(0x12e)],'severity':_0x312487['severity']===0x2?STATIC_ANALYSIS['SEVERITY']['ERROR']:STATIC_ANALYSIS['SEVERITY'][_0x163bc0(0x134)],'rule':_0x312487['ruleId']||_0x163bc0(0x132),'message':_0x312487[_0x163bc0(0x127)],'category':this[_0x163bc0(0x123)](_0x312487[_0x163bc0(0xff)]),'fixable':_0x312487['fix']!==undefined,'source':_0x163bc0(0x132)};}['categorizeRule'](_0x22015f){const _0x14af46=a0_0x273273;if(!_0x22015f)return STATIC_ANALYSIS['CATEGORY']['STYLE'];if(_0x22015f['includes'](_0x14af46(0x111))||_0x22015f['includes']('xss')||_0x22015f===_0x14af46(0x11f)||_0x22015f==='no-implied-eval')return STATIC_ANALYSIS['CATEGORY']['SECURITY'];if(_0x22015f['includes']('performance')||_0x22015f==='no-await-in-loop'||_0x22015f==='prefer-promise-reject-errors')return STATIC_ANALYSIS['CATEGORY'][_0x14af46(0x12a)];if(_0x22015f[_0x14af46(0x124)]('import')||_0x22015f==='no-undef')return STATIC_ANALYSIS[_0x14af46(0x104)][_0x14af46(0x12b)];if(_0x22015f[_0x14af46(0x124)]('best-practices')||_0x22015f==='no-unused-vars'||_0x22015f===_0x14af46(0x103)||_0x22015f===_0x14af46(0x117))return STATIC_ANALYSIS['CATEGORY']['BEST_PRACTICE'];return STATIC_ANALYSIS[_0x14af46(0x104)]['STYLE'];}[a0_0x273273(0x129)](_0x29f39e,_0xe8afed){const _0x3bc203=a0_0x273273,_0x5b40d0=[],_0x31de0a=_0x29f39e[_0x3bc203(0x130)]('\x0a'),_0xd5fcb5=_0xe8afed[_0x3bc203(0x130)]('\x0a'),_0x2ddb2f=Math['max'](_0x31de0a['length'],_0xd5fcb5['length']);for(let _0x473e96=0x0;_0x473e96<_0x2ddb2f;_0x473e96++){const _0x1dce0b=_0x31de0a[_0x473e96]||'',_0x56a94a=_0xd5fcb5[_0x473e96]||'';_0x1dce0b!==_0x56a94a&&_0x5b40d0['push']({'line':_0x473e96+0x1,'type':_0x1dce0b&&_0x56a94a?'modified':_0x1dce0b?'removed':_0x3bc203(0x11d),'original':_0x1dce0b,'fixed':_0x56a94a});}return _0x5b40d0;}['getSupportedExtensions'](){const _0x572151=a0_0x273273;return[_0x572151(0x133),_0x572151(0x116),'.mjs',_0x572151(0x101)];}['supportsAutoFix'](){return!![];}}export default ESLintAnalyzer;
1
+ function a0_0x85a1(){const _0x7a59d=['B3v0Chv0','z2v0rvnmAw50sw5ZDgfUy2u','lMPZEa','B2zM','zgv0zwn0','odCXmJniq2vUquW','Aw5JBhvKzxm','BM8TDw51C2vKlxzHCNm','lMnQCW','C2v0DgLUz3m','q0furuDpuLK','nKj5u0Hvvq','BgLUzq','lMPZ','mJHRzwL1DvK','mtbqzfrWvhq','C3bSAxq','zgvZy3jPyMvdAgfUz2vZ','uevsrK9stufoq0u','D2fYBG','zxjYB3i','BM8TAw1WBgLLzc1LDMfS','zxjYB3jdB3vUDa','zML4ywjSzvDHCM5PBMDdB3vUDa','AM9PBG','zw5Kq29SDw1U','mJyZmZiZmNvjwKDvvq','BgvUz3rO','zM9YBwf0twvZC2fNzq','ywX3yxLZ','lMvZBgLUDhjJlMPZ','mta4otK4mJnuveLMz2G','zxnSAw50oNjLy29TBwvUzgvK','nde1mdC2owT1zLHVyG','zxnSAw50lMnVBMzPzY5QCW','BM8TDMfY','ChvZAa','Bg9Nz2vY','mJe4mdy1q0TWzhnP','mZqXmZyZn1Ptq3Dxva','zML4','BM8TzxzHBa','rM91BMqGrvnmAw50ignVBMzPzW','lMvZBgLUDhjJlMnQCW','yMvZDc1WCMfJDgLJzxm','rvnmAw50igzPEcbMywLSzwq','yw5HBhL6zq','CMvHy3q','zxH0zw5KCW','u0vwrvjjvfK','ntzRENHuv2S','ndmWnty5wercy0Dw','lM1QCW','C2v2zxjPDhK','CNvSzuLK','rvnmAw50igfUywX5C2LZigzHAwXLza','rvjst1i','BwvZC2fNzq'];a0_0x85a1=function(){return _0x7a59d;};return a0_0x85a1();}function a0_0x35be(_0x3e88db,_0x5375dd){_0x3e88db=_0x3e88db-0xc1;const _0x85a1d3=a0_0x85a1();let _0x35bea2=_0x85a1d3[_0x3e88db];if(a0_0x35be['nLYwpu']===undefined){var _0x322681=function(_0x540d5f){const _0x83b75a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x52664c='',_0x2387aa='';for(let _0x41cd2c=0x0,_0x5b3b7a,_0x2e1dec,_0x2e466a=0x0;_0x2e1dec=_0x540d5f['charAt'](_0x2e466a++);~_0x2e1dec&&(_0x5b3b7a=_0x41cd2c%0x4?_0x5b3b7a*0x40+_0x2e1dec:_0x2e1dec,_0x41cd2c++%0x4)?_0x52664c+=String['fromCharCode'](0xff&_0x5b3b7a>>(-0x2*_0x41cd2c&0x6)):0x0){_0x2e1dec=_0x83b75a['indexOf'](_0x2e1dec);}for(let _0xb75b74=0x0,_0xb53ddb=_0x52664c['length'];_0xb75b74<_0xb53ddb;_0xb75b74++){_0x2387aa+='%'+('00'+_0x52664c['charCodeAt'](_0xb75b74)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2387aa);};a0_0x35be['voYgym']=_0x322681,a0_0x35be['joJUMS']={},a0_0x35be['nLYwpu']=!![];}const _0x387ddb=_0x85a1d3[0x0],_0x2905c5=_0x3e88db+_0x387ddb,_0x3a27bc=a0_0x35be['joJUMS'][_0x2905c5];return!_0x3a27bc?(_0x35bea2=a0_0x35be['voYgym'](_0x35bea2),a0_0x35be['joJUMS'][_0x2905c5]=_0x35bea2):_0x35bea2=_0x3a27bc,_0x35bea2;}const a0_0x5d4e8d=a0_0x35be;(function(_0x161784,_0x423ff4){const _0x1d6611=a0_0x35be,_0x3911e6=_0x161784();while(!![]){try{const _0x1b3b67=parseInt(_0x1d6611(0xe9))/0x1+-parseInt(_0x1d6611(0xc4))/0x2*(-parseInt(_0x1d6611(0xf5))/0x3)+-parseInt(_0x1d6611(0xe8))/0x4*(-parseInt(_0x1d6611(0xdc))/0x5)+-parseInt(_0x1d6611(0xc1))/0x6*(-parseInt(_0x1d6611(0xd7))/0x7)+-parseInt(_0x1d6611(0xd0))/0x8+-parseInt(_0x1d6611(0xdd))/0x9+-parseInt(_0x1d6611(0xc5))/0xa*(parseInt(_0x1d6611(0xd5))/0xb);if(_0x1b3b67===_0x423ff4)break;else _0x3911e6['push'](_0x3911e6['shift']());}catch(_0x2ac6a8){_0x3911e6['push'](_0x3911e6['shift']());}}}(a0_0x85a1,0x53568));import{ESLint}from'eslint';import a0_0x52664c from'path';import a0_0x2387aa from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';class ESLintAnalyzer{constructor(_0x41cd2c=null){const _0x4f4968=a0_0x35be;this[_0x4f4968(0xdb)]=_0x41cd2c,this['eslintCache']=new Map();}async[a0_0x5d4e8d(0xe4)](_0x5b3b7a,_0x2e1dec,_0x2e466a={}){const _0x4412d0=a0_0x5d4e8d;try{const _0xb75b74=await this[_0x4412d0(0xf1)](_0x2e466a),_0xb53ddb=await _0xb75b74['lintText'](_0x2e1dec,{'filePath':_0x5b3b7a,'warnIgnored':![]}),_0x526f87=[];if(_0xb53ddb&&_0xb53ddb['length']>0x0){const _0x2474cc=_0xb53ddb[0x0];for(const _0x19ae21 of _0x2474cc['messages']){_0x526f87[_0x4412d0(0xda)](this[_0x4412d0(0xd2)](_0x19ae21,_0x5b3b7a));}}return this['logger']?.['debug']('ESLint\x20analysis\x20completed',{'file':_0x5b3b7a,'totalDiagnostics':_0x526f87['length'],'errors':_0x526f87['filter'](_0x538b36=>_0x538b36[_0x4412d0(0xeb)]===STATIC_ANALYSIS['SEVERITY'][_0x4412d0(0xee)])[_0x4412d0(0xd1)],'warnings':_0x526f87['filter'](_0x4152ff=>_0x4152ff['severity']===STATIC_ANALYSIS[_0x4412d0(0xe7)]['WARNING'])[_0x4412d0(0xd1)]}),_0x526f87;}catch(_0x57e2ea){return this['logger']?.[_0x4412d0(0xca)](_0x4412d0(0xed),{'file':_0x5b3b7a,'error':_0x57e2ea[_0x4412d0(0xef)]}),[];}}async[a0_0x5d4e8d(0xde)](_0x2315d9,_0x2132b3,_0x5b9afa={}){const _0xb13352=a0_0x5d4e8d;try{const _0x201dae=await this[_0xb13352(0xf1)]({..._0x5b9afa,'fix':!![]}),_0x28a59e=await _0x201dae['lintText'](_0x2132b3,{'filePath':_0x2315d9,'warnIgnored':![]});if(_0x28a59e&&_0x28a59e[_0xb13352(0xd1)]>0x0){const _0x4abe5e=_0x28a59e[0x0];return{'fixed':_0x4abe5e[_0xb13352(0xf0)]!==undefined,'content':_0x4abe5e[_0xb13352(0xf0)]||_0x2132b3,'fixedCount':_0x4abe5e['fixableErrorCount']+_0x4abe5e[_0xb13352(0xcd)],'remainingErrors':_0x4abe5e[_0xb13352(0xcc)]-_0x4abe5e['fixableErrorCount'],'remainingWarnings':_0x4abe5e['warningCount']-_0x4abe5e['fixableWarningCount'],'changes':_0x4abe5e['output']?this['describeChanges'](_0x2132b3,_0x4abe5e[_0xb13352(0xf0)]):[]};}return{'fixed':![],'content':_0x2132b3,'fixedCount':0x0,'remainingErrors':0x0,'remainingWarnings':0x0,'changes':[]};}catch(_0x23e67b){this['logger']?.['error'](_0xb13352(0xe3),{'file':_0x2315d9,'error':_0x23e67b[_0xb13352(0xef)]});throw new Error('ESLint\x20fix\x20failed:\x20'+_0x23e67b['message']);}}async['getESLintInstance'](_0x197784={}){const {workingDir:_0x509fde,fix:fix=![],framework:_0x28201c}=_0x197784,_0x73d0b0=await this['getESLintConfig'](_0x509fde,_0x28201c),_0x516383=new ESLint({'fix':fix,'useEslintrc':!![],'overrideConfig':_0x73d0b0,'errorOnUnmatchedPattern':![]});return _0x516383;}async['getESLintConfig'](_0x4dfeb3,_0x204ae7){const _0x595099=a0_0x5d4e8d,_0x2b7a40={'env':{'browser':!![],'es2021':!![],'node':!![]},'parserOptions':{'ecmaVersion':'latest','sourceType':'module'},'rules':{'no-unused-vars':_0x595099(0xc9),'no-undef':'error','no-console':_0x595099(0xf3),'semi':[_0x595099(0xc9),_0x595099(0xd3)],'quotes':['warn','single',{'avoidEscape':!![]}]}};if(_0x204ae7===_0x595099(0xe5))_0x2b7a40[_0x595099(0xe6)]=['eslint:recommended'],_0x2b7a40['parserOptions']['ecmaFeatures']={'jsx':!![]},_0x2b7a40[_0x595099(0xf9)]={'react':{'version':_0x595099(0xf4)}};else _0x204ae7==='vue'?_0x2b7a40['extends']=[_0x595099(0xd6)]:_0x2b7a40[_0x595099(0xe6)]=['eslint:recommended'];if(_0x4dfeb3){const _0x58a8b4=[_0x595099(0xd4),_0x595099(0xe1),'.eslintrc.json',_0x595099(0xd8)];for(const _0x25bf53 of _0x58a8b4){try{const _0x19db74=a0_0x52664c[_0x595099(0xce)](_0x4dfeb3,_0x25bf53);return await a0_0x2387aa['access'](_0x19db74),this['logger']?.['debug'](_0x595099(0xe0),{'configFile':_0x25bf53}),{};}catch{}}}return _0x2b7a40;}[a0_0x5d4e8d(0xd2)](_0x523843,_0x1e1e74){const _0x2b6f57=a0_0x5d4e8d;return{'file':_0x1e1e74,'line':_0x523843[_0x2b6f57(0xc2)]||0x1,'column':_0x523843['column']||0x1,'endLine':_0x523843['endLine'],'endColumn':_0x523843[_0x2b6f57(0xcf)],'severity':_0x523843[_0x2b6f57(0xeb)]===0x2?STATIC_ANALYSIS[_0x2b6f57(0xe7)][_0x2b6f57(0xee)]:STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':_0x523843[_0x2b6f57(0xec)]||'eslint','message':_0x523843['message'],'category':this['categorizeRule'](_0x523843['ruleId']),'fixable':_0x523843[_0x2b6f57(0xde)]!==undefined,'source':'eslint'};}['categorizeRule'](_0x332f6d){const _0x5a0d20=a0_0x5d4e8d;if(!_0x332f6d)return STATIC_ANALYSIS[_0x5a0d20(0xfa)]['STYLE'];if(_0x332f6d['includes']('security')||_0x332f6d['includes']('xss')||_0x332f6d===_0x5a0d20(0xdf)||_0x332f6d===_0x5a0d20(0xcb))return STATIC_ANALYSIS[_0x5a0d20(0xfa)]['SECURITY'];if(_0x332f6d[_0x5a0d20(0xf6)]('performance')||_0x332f6d==='no-await-in-loop'||_0x332f6d==='prefer-promise-reject-errors')return STATIC_ANALYSIS[_0x5a0d20(0xfa)][_0x5a0d20(0xc8)];if(_0x332f6d[_0x5a0d20(0xf6)]('import')||_0x332f6d==='no-undef')return STATIC_ANALYSIS['CATEGORY']['IMPORT'];if(_0x332f6d[_0x5a0d20(0xf6)](_0x5a0d20(0xe2))||_0x332f6d===_0x5a0d20(0xf7)||_0x332f6d==='no-unreachable'||_0x332f6d===_0x5a0d20(0xd9))return STATIC_ANALYSIS['CATEGORY']['BEST_PRACTICE'];return STATIC_ANALYSIS[_0x5a0d20(0xfa)]['STYLE'];}[a0_0x5d4e8d(0xc7)](_0x5e2935,_0x43dbe6){const _0x41da92=a0_0x5d4e8d,_0x2ddf4d=[],_0x22fbd1=_0x5e2935['split']('\x0a'),_0x2d2e48=_0x43dbe6[_0x41da92(0xc6)]('\x0a'),_0xfb12db=Math['max'](_0x22fbd1[_0x41da92(0xd1)],_0x2d2e48['length']);for(let _0x482fe4=0x0;_0x482fe4<_0xfb12db;_0x482fe4++){const _0x3a56f4=_0x22fbd1[_0x482fe4]||'',_0x2bf32f=_0x2d2e48[_0x482fe4]||'';_0x3a56f4!==_0x2bf32f&&_0x2ddf4d['push']({'line':_0x482fe4+0x1,'type':_0x3a56f4&&_0x2bf32f?'modified':_0x3a56f4?'removed':'added','original':_0x3a56f4,'fixed':_0x2bf32f});}return _0x2ddf4d;}['getSupportedExtensions'](){const _0x19278b=a0_0x5d4e8d;return[_0x19278b(0xc3),_0x19278b(0xf2),_0x19278b(0xea),_0x19278b(0xf8)];}['supportsAutoFix'](){return!![];}}export default ESLintAnalyzer;