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

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 (116) 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
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.8
102
+ # Should display: Loxia Autopilot One v1.0.9
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.8)
371
+ ### Current Version (1.0.9)
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_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));
3
+ const a0_0x69ee2=a0_0x5ce9;function a0_0x5b96(){const _0x3c8e4f=['9527392gPaXVD','SIGINT','env','slice','message','--host','Checking\x20if\x20server\x20is\x20running...','Starting\x20Terminal\x20UI...\x0a','--port','get','\x0aShutting\x20down\x20server...','10314AdswYc','Please\x20open\x20manually:\x20','destroy','node','ceil','catch','version','\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI',')\x0a\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x20message\x0a\x20\x20-v,\x20--version\x20\x20\x20\x20\x20Show\x20version\x20number\x0a\x0aExamples:\x0a\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20open\x20browser\x0a\x20\x20loxia\x20terminal\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Connect\x20Terminal\x20UI\x20to\x20running\x20server\x0a\x20\x20loxia\x20plus-terminal\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a\x20\x20loxia\x20web\x20--port\x203000\x20\x20\x20\x20#\x20Use\x20custom\x20port\x0a\x0aQuick\x20Start:\x0a\x20\x201.\x20Run\x20\x27loxia\x20web\x27\x20to\x20start\x20with\x20Web\x20UI\x0a\x20\x202.\x20Or\x20run\x20\x27loxia\x20plus-terminal\x27\x20for\x20Terminal\x20UI\x20experience\x0a\x0aDocumentation:\x0a\x20\x20https://autopilot.loxia.ai\x0a\x0a','--help','web','length','Waiting\x20for\x20server\x20to\x20start...','199040PhcpBm','argv','Starting\x20Loxia\x20server\x20in\x20background...','help','ignore','528fQyQgH',')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20','LOXIA_HOST','host','src','loxia-terminal.js','start\x20\x22\x22\x20\x22','Server\x20running\x20at\x20','\x20manually.','Server\x20is\x20running\x20at\x20','kill','3389352wsCoax','3470FINleb','utf8','\x0aLoxia\x20Autopilot\x20One\x20v','Error:','statusCode','\x0aServer\x20may\x20still\x20be\x20starting.\x20Open\x20','port','8842824gsVYYq','Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.','4442Hxfoqg','inherit','package.json','--version','includes','toString','422504SGjtCS','\x20-\x20AI\x20Agent\x20System\x0a\x0aUsage:\x0a\x20\x20loxia\x20<command>\x20[options]\x0a\x0aCommands:\x0a\x20\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20+\x20open\x20Web\x20UI\x20in\x20browser\x0a\x20\x20terminal\x20\x20\x20\x20\x20\x20\x20\x20Start\x20Terminal\x20UI\x20(server\x20must\x20be\x20running)\x0a\x20\x20plus-web\x20\x20\x20\x20\x20\x20\x20\x20Alias\x20for\x20\x27web\x27\x0a\x20\x20plus-terminal\x20\x20\x20Start\x20server\x20+\x20Terminal\x20UI\x20together\x0a\x0aOptions:\x0a\x20\x20--port\x20<number>\x20\x20\x20Specify\x20port\x20(default:\x20','675aiPpAM','open\x20\x22','\x0aPlease\x20start\x20the\x20server\x20first:','exit','http://','localhost','parse','SIGTERM','darwin','\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a','platform','Loxia\x20Autopilot\x20One\x20v','Unknown\x20command:\x20','startsWith','error','log'];a0_0x5b96=function(){return _0x3c8e4f;};return a0_0x5b96();}(function(_0x3d1996,_0x3ad00e){const _0x1b329c=a0_0x5ce9,_0x2742c7=_0x3d1996();while(!![]){try{const _0x3dd8c9=parseInt(_0x1b329c(0x1b6))/0x1+-parseInt(_0x1b329c(0x1b0))/0x2*(parseInt(_0x1b329c(0x19b))/0x3)+parseInt(_0x1b329c(0x1a6))/0x4+parseInt(_0x1b329c(0x1a7))/0x5*(-parseInt(_0x1b329c(0x189))/0x6)+-parseInt(_0x1b329c(0x17e))/0x7+parseInt(_0x1b329c(0x1ae))/0x8+-parseInt(_0x1b329c(0x1b8))/0x9*(-parseInt(_0x1b329c(0x196))/0xa);if(_0x3dd8c9===_0x3ad00e)break;else _0x2742c7['push'](_0x2742c7['shift']());}catch(_0x4eb147){_0x2742c7['push'](_0x2742c7['shift']());}}}(a0_0x5b96,0xe15b1));import{fileURLToPath}from'url';import{dirname,join}from'path';import{spawn,exec}from'child_process';import{readFileSync}from'fs';import a0_0x4f5e5a from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x69ee2(0x1bd),SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process[a0_0x69ee2(0x197)][a0_0x69ee2(0x181)](0x2),command=args[0x0]&&!args[0x0][a0_0x69ee2(0x17b)]('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args['includes'](a0_0x69ee2(0x192))||args[a0_0x69ee2(0x1b4)]('-h'),'version':args[a0_0x69ee2(0x1b4)](a0_0x69ee2(0x1b3))||args[a0_0x69ee2(0x1b4)]('-v')};for(let i=0x0;i<args[a0_0x69ee2(0x194)];i++){args[i]===a0_0x69ee2(0x186)&&args[i+0x1]&&(flags[a0_0x69ee2(0x1ad)]=parseInt(args[i+0x1],0xa)),args[i]===a0_0x69ee2(0x183)&&args[i+0x1]&&(flags['host']=args[i+0x1]);}const port=flags[a0_0x69ee2(0x1ad)]||DEFAULT_PORT,host=flags[a0_0x69ee2(0x19e)]||DEFAULT_HOST,serverUrl=a0_0x69ee2(0x1bc)+host+':'+port;if(flags[a0_0x69ee2(0x18f)]){const pkgPath=join(__dirname,'..',a0_0x69ee2(0x1b2)),pkg=JSON[a0_0x69ee2(0x1be)](readFileSync(pkgPath,'utf8'));console[a0_0x69ee2(0x17d)](a0_0x69ee2(0x179)+pkg['version']),process['exit'](0x0);}if(flags[a0_0x69ee2(0x199)]||!command){const pkgPath=join(__dirname,'..',a0_0x69ee2(0x1b2)),pkg=JSON[a0_0x69ee2(0x1be)](readFileSync(pkgPath,a0_0x69ee2(0x1a8)));console['log'](a0_0x69ee2(0x1a9)+pkg[a0_0x69ee2(0x18f)]+a0_0x69ee2(0x1b7)+DEFAULT_PORT+a0_0x69ee2(0x19c)+DEFAULT_HOST+a0_0x69ee2(0x191)),process['exit'](0x0);}async function checkServerRunning(_0x382b4d,_0x5c6e10,_0x3a80a6=0x1){for(let _0x4e14eb=0x0;_0x4e14eb<_0x3a80a6;_0x4e14eb++){const _0x37b16f=await new Promise(_0x206c1e=>{const _0x266dd5=a0_0x5ce9,_0x54f5f0=a0_0x4f5e5a[_0x266dd5(0x187)]('http://'+_0x382b4d+':'+_0x5c6e10+'/api/health',_0x49a55e=>{const _0x31ba4c=_0x266dd5;_0x206c1e(_0x49a55e[_0x31ba4c(0x1ab)]===0xc8);});_0x54f5f0['on']('error',()=>_0x206c1e(![])),_0x54f5f0['setTimeout'](0x7d0,()=>{const _0x26dfb2=_0x266dd5;_0x54f5f0[_0x26dfb2(0x18b)](),_0x206c1e(![]);});});if(_0x37b16f)return!![];_0x4e14eb<_0x3a80a6-0x1&&await new Promise(_0x38892d=>setTimeout(_0x38892d,SERVER_CHECK_INTERVAL));}return![];}async function waitForServer(_0x2cf549,_0x3a2f13,_0x19d470=SERVER_STARTUP_TIMEOUT){const _0xbf2048=a0_0x69ee2,_0x509960=Math[_0xbf2048(0x18d)](_0x19d470/SERVER_CHECK_INTERVAL);return checkServerRunning(_0x2cf549,_0x3a2f13,_0x509960);}function openBrowser(_0x3593de){const _0x3be758=a0_0x69ee2,_0x3f97b5=process[_0x3be758(0x178)];let _0x5ac456;if(_0x3f97b5===_0x3be758(0x1c0))_0x5ac456=_0x3be758(0x1b9)+_0x3593de+'\x22';else _0x3f97b5==='win32'?_0x5ac456=_0x3be758(0x1a1)+_0x3593de+'\x22':_0x5ac456='xdg-open\x20\x22'+_0x3593de+'\x22';exec(_0x5ac456,_0x59645d=>{const _0x634c51=_0x3be758;_0x59645d&&(console[_0x634c51(0x17d)]('Could\x20not\x20open\x20browser\x20automatically.'),console['log'](_0x634c51(0x18a)+_0x3593de));});}function startServer(_0x417ad6=![]){const _0x4b9167=a0_0x69ee2,_0x16e2ff={...process[_0x4b9167(0x180)],'LOXIA_PORT':port[_0x4b9167(0x1b5)](),'PORT':port[_0x4b9167(0x1b5)]()};flags['host']&&(_0x16e2ff[_0x4b9167(0x19d)]=flags[_0x4b9167(0x19e)]);const _0x47cbb7=join(__dirname,'..',_0x4b9167(0x19f),'index.js'),_0x54bc1a=spawn(_0x4b9167(0x18c),[_0x47cbb7],{'cwd':join(__dirname,'..'),'env':_0x16e2ff,'stdio':_0x417ad6?['ignore',_0x4b9167(0x19a),'ignore']:_0x4b9167(0x1b1),'detached':_0x417ad6});return _0x417ad6&&_0x54bc1a['unref'](),_0x54bc1a;}function startTerminalUI(){const _0x5cebe=a0_0x69ee2,_0x484cb5=join(__dirname,_0x5cebe(0x1a0)),_0x5681a8={...process[_0x5cebe(0x180)],'LOXIA_PORT':port[_0x5cebe(0x1b5)](),'LOXIA_HOST':host},_0x5eeab8=spawn(_0x5cebe(0x18c),[_0x484cb5],{'cwd':join(__dirname,'..'),'env':_0x5681a8,'stdio':_0x5cebe(0x1b1)});return _0x5eeab8;}function a0_0x5ce9(_0x23cead,_0x3d53ba){_0x23cead=_0x23cead-0x177;const _0x5b9688=a0_0x5b96();let _0x5ce9ec=_0x5b9688[_0x23cead];return _0x5ce9ec;}const commands={'web':async()=>{const _0x53e5ea=a0_0x69ee2;console[_0x53e5ea(0x17d)]('Starting\x20Loxia\x20server...\x0a');const _0x3dc05d=startServer(![]);console[_0x53e5ea(0x17d)](_0x53e5ea(0x195));const _0x437049=await waitForServer(host,port);_0x437049?(console[_0x53e5ea(0x17d)]('\x0aOpening\x20Web\x20UI\x20at\x20'+serverUrl),openBrowser(serverUrl)):console[_0x53e5ea(0x17d)](_0x53e5ea(0x1ac)+serverUrl+_0x53e5ea(0x1a3)),process['on'](_0x53e5ea(0x17f),()=>_0x3dc05d['kill']('SIGINT')),process['on'](_0x53e5ea(0x1bf),()=>_0x3dc05d[_0x53e5ea(0x1a5)](_0x53e5ea(0x1bf))),_0x3dc05d['on'](_0x53e5ea(0x1bb),_0x2b0d57=>process[_0x53e5ea(0x1bb)](_0x2b0d57||0x0));},'plus-web':async()=>{const _0x174320=a0_0x69ee2;await commands[_0x174320(0x193)]();},'terminal':async()=>{const _0x161468=a0_0x69ee2;console[_0x161468(0x17d)](_0x161468(0x184));const _0x14c292=await checkServerRunning(host,port);!_0x14c292&&(console[_0x161468(0x17c)]('\x0aServer\x20is\x20not\x20running\x20at\x20'+serverUrl),console[_0x161468(0x17c)](_0x161468(0x1ba)),console[_0x161468(0x17c)](_0x161468(0x190)),console[_0x161468(0x17c)](_0x161468(0x177)),process[_0x161468(0x1bb)](0x1));console[_0x161468(0x17d)](_0x161468(0x1a4)+serverUrl),console[_0x161468(0x17d)]('Starting\x20Terminal\x20UI...\x0a');const _0x3dd914=startTerminalUI();process['on'](_0x161468(0x17f),()=>_0x3dd914[_0x161468(0x1a5)](_0x161468(0x17f))),process['on'](_0x161468(0x1bf),()=>_0x3dd914[_0x161468(0x1a5)](_0x161468(0x1bf))),_0x3dd914['on']('exit',_0x314cbf=>process[_0x161468(0x1bb)](_0x314cbf||0x0));},'plus-terminal':async()=>{const _0x1e6af5=a0_0x69ee2;console[_0x1e6af5(0x17d)](_0x1e6af5(0x198));const _0x19d4f2=startServer(!![]),_0x1a603b=await waitForServer(host,port);!_0x1a603b&&(console[_0x1e6af5(0x17c)]('\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.'),process[_0x1e6af5(0x1bb)](0x1));console['log'](_0x1e6af5(0x1a2)+serverUrl),console['log'](_0x1e6af5(0x185));const _0x35b02e=startTerminalUI();_0x35b02e['on']('exit',_0x5903df=>{const _0x4718af=_0x1e6af5;console[_0x4718af(0x17d)](_0x4718af(0x188));try{process[_0x4718af(0x1a5)](_0x19d4f2['pid'],'SIGTERM');}catch(_0x591db9){}process['exit'](_0x5903df||0x0);}),process['on'](_0x1e6af5(0x17f),()=>{_0x35b02e['kill']('SIGINT');}),process['on'](_0x1e6af5(0x1bf),()=>{const _0x2ff1c0=_0x1e6af5;_0x35b02e[_0x2ff1c0(0x1a5)](_0x2ff1c0(0x1bf));});}};commands[command]?commands[command]()[a0_0x69ee2(0x18e)](_0x40780e=>{const _0x4c642c=a0_0x69ee2;console[_0x4c642c(0x17c)](_0x4c642c(0x1aa),_0x40780e[_0x4c642c(0x182)]),process['exit'](0x1);}):(console['error'](a0_0x69ee2(0x17a)+command),console['error'](a0_0x69ee2(0x1af)),process['exit'](0x1));
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
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();
3
+ const a0_0x1b0204=a0_0x2509;(function(_0x122913,_0x5a24ef){const _0x4204d8=a0_0x2509,_0x59cafb=_0x122913();while(!![]){try{const _0x533359=parseInt(_0x4204d8(0x1f6))/0x1*(parseInt(_0x4204d8(0x1fc))/0x2)+parseInt(_0x4204d8(0x1ee))/0x3+parseInt(_0x4204d8(0x1f9))/0x4*(parseInt(_0x4204d8(0x1f7))/0x5)+-parseInt(_0x4204d8(0x1ff))/0x6*(parseInt(_0x4204d8(0x1f2))/0x7)+parseInt(_0x4204d8(0x1f8))/0x8+-parseInt(_0x4204d8(0x1d4))/0x9*(-parseInt(_0x4204d8(0x1db))/0xa)+-parseInt(_0x4204d8(0x1fa))/0xb;if(_0x533359===_0x5a24ef)break;else _0x59cafb['push'](_0x59cafb['shift']());}catch(_0xf01e37){_0x59cafb['push'](_0x59cafb['shift']());}}}(a0_0x55da,0x6330d));import{spawn}from'child_process';import a0_0x5ed915 from'net';function a0_0x2509(_0x1b2660,_0x3cb548){_0x1b2660=_0x1b2660-0x1ce;const _0x55da63=a0_0x55da();let _0x2509f9=_0x55da63[_0x1b2660];return _0x2509f9;}import a0_0x1a8ee0 from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=a0_0x1a8ee0[a0_0x1b0204(0x1fb)](__filename),projectRoot=a0_0x1a8ee0['dirname'](__dirname),DEFAULT_PORT=0x1f90,DEFAULT_HOST='localhost',SERVER_STARTUP_TIMEOUT=0x2710;async function isServerRunning(_0x2a2ec2,_0x7a8725){return new Promise(_0x51ab20=>{const _0x16aaa8=a0_0x2509,_0x55781b=new a0_0x5ed915[(_0x16aaa8(0x1d7))]();_0x55781b['setTimeout'](0x7d0),_0x55781b['on'](_0x16aaa8(0x1df),()=>{const _0x55bcec=_0x16aaa8;_0x55781b[_0x55bcec(0x1dd)](),_0x51ab20(!![]);}),_0x55781b['on']('timeout',()=>{_0x55781b['destroy'](),_0x51ab20(![]);}),_0x55781b['on']('error',()=>{_0x55781b['destroy'](),_0x51ab20(![]);}),_0x55781b[_0x16aaa8(0x1df)](_0x7a8725,_0x2a2ec2);});}async function startServer(_0x9baba8,_0x271e96){const _0x405888=a0_0x1b0204;return console[_0x405888(0x1ec)](_0x405888(0x1d8)),new Promise((_0x4de3fe,_0x3c6069)=>{const _0x37e407=_0x405888,_0x47ee6e=spawn('node',[a0_0x1a8ee0[_0x37e407(0x1ce)](projectRoot,_0x37e407(0x1f3)),_0x37e407(0x1e8),_0x37e407(0x1f1),_0x37e407(0x1f0),_0x9baba8,_0x37e407(0x1da),_0x271e96[_0x37e407(0x1cf)]()],{'detached':![],'stdio':[_0x37e407(0x1e1),_0x37e407(0x1e7),_0x37e407(0x1e7)]});_0x47ee6e[_0x37e407(0x1d5)]['on']('data',()=>{}),_0x47ee6e[_0x37e407(0x1e4)]['on']('data',()=>{}),_0x47ee6e['on']('error',_0x4af05e=>{const _0x1692e4=_0x37e407;console[_0x1692e4(0x1e5)](_0x1692e4(0x1e9),_0x4af05e['message']),_0x3c6069(_0x4af05e);});const _0x3f4929=Date[_0x37e407(0x1ed)](),_0x4fe447=setInterval(async()=>{const _0x46541b=_0x37e407,_0x322c2c=await isServerRunning(_0x9baba8,_0x271e96);if(_0x322c2c)clearInterval(_0x4fe447),console[_0x46541b(0x1ec)](_0x46541b(0x1e0)+_0x9baba8+':'+_0x271e96),_0x4de3fe();else Date['now']()-_0x3f4929>SERVER_STARTUP_TIMEOUT&&(clearInterval(_0x4fe447),_0x47ee6e[_0x46541b(0x1de)](),_0x3c6069(new Error('Server\x20startup\x20timeout')));},0x1f4);});}function a0_0x55da(){const _0x42668f=['\x20\x20\x201.\x20Make\x20sure\x20no\x20other\x20process\x20is\x20using\x20port\x208080','--host','web','3396533jEBYQl','bin/cli.js','length','...','437259iXhXWX','245viEYzn','5298592HGiFlK','64472mnkSql','14864674gzKNMF','dirname','2LMVYdd','💡\x20Troubleshooting:','LOXIA_PORT','6UGzwmY','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','join','toString','slice','🎨\x20Launching\x20Ink-based\x20Terminal\x20UI...','🔍\x20Checking\x20if\x20server\x20is\x20running\x20at\x20','env','9KWRQGG','stdout','✗\x20Server\x20is\x20not\x20running','Socket','🚀\x20Starting\x20Loxia\x20server...','❌\x20Failed\x20to\x20start\x20Terminal\x20UI:','--port','1046620KIuTeE','✓\x20Server\x20is\x20already\x20running\x20at\x20','destroy','kill','connect','✓\x20Server\x20started\x20at\x20','ignore','\x20\x20Loxia\x20Autopilot\x20One\x20-\x20Terminal\x20UI','\x20\x20\x202.\x20Try\x20running\x20the\x20server\x20manually:\x20node\x20bin/cli.js','stderr','error','argv','pipe','--ui','Failed\x20to\x20start\x20server:','LOXIA_HOST','../src/interfaces/terminal/index.js','log','now','746433UuWggx'];a0_0x55da=function(){return _0x42668f;};return a0_0x55da();}async function main(){const _0x2da930=a0_0x1b0204;try{console[_0x2da930(0x1ec)](_0x2da930(0x200)),console[_0x2da930(0x1ec)](_0x2da930(0x1e2)),console['log'](_0x2da930(0x200)),console[_0x2da930(0x1ec)]('');const _0x72fad4=process[_0x2da930(0x1e6)][_0x2da930(0x1d0)](0x2);let _0x1b77c2=DEFAULT_HOST,_0x5ad80a=DEFAULT_PORT;for(let _0x3adf6b=0x0;_0x3adf6b<_0x72fad4[_0x2da930(0x1f4)];_0x3adf6b++){if(_0x72fad4[_0x3adf6b]===_0x2da930(0x1f0)&&_0x72fad4[_0x3adf6b+0x1])_0x1b77c2=_0x72fad4[_0x3adf6b+0x1],_0x3adf6b++;else _0x72fad4[_0x3adf6b]===_0x2da930(0x1da)&&_0x72fad4[_0x3adf6b+0x1]&&(_0x5ad80a=parseInt(_0x72fad4[_0x3adf6b+0x1],0xa),_0x3adf6b++);}console[_0x2da930(0x1ec)](_0x2da930(0x1d2)+_0x1b77c2+':'+_0x5ad80a+_0x2da930(0x1f5));const _0x1aa20c=await isServerRunning(_0x1b77c2,_0x5ad80a);!_0x1aa20c?(console['log'](_0x2da930(0x1d6)),await startServer(_0x1b77c2,_0x5ad80a)):console['log'](_0x2da930(0x1dc)+_0x1b77c2+':'+_0x5ad80a),console[_0x2da930(0x1ec)](''),console[_0x2da930(0x1ec)](_0x2da930(0x1d1)),console[_0x2da930(0x1ec)](''),await new Promise(_0x32f49f=>setTimeout(_0x32f49f,0x1f4)),process[_0x2da930(0x1d3)][_0x2da930(0x1ea)]=_0x1b77c2,process[_0x2da930(0x1d3)][_0x2da930(0x1fe)]=_0x5ad80a['toString'](),await import(_0x2da930(0x1eb));}catch(_0x5db738){console['error'](''),console['error'](_0x2da930(0x1d9)),console[_0x2da930(0x1e5)]('\x20\x20',_0x5db738['message']),console[_0x2da930(0x1e5)](''),console[_0x2da930(0x1e5)](_0x2da930(0x1fd)),console['error'](_0x2da930(0x1ef)),console[_0x2da930(0x1e5)](_0x2da930(0x1e3)),console[_0x2da930(0x1e5)]('\x20\x20\x203.\x20Check\x20logs\x20for\x20more\x20details'),console[_0x2da930(0x1e5)](''),process['exit'](0x1);}}main();
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
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);});
3
+ const a0_0x3130d8=a0_0x14e4;(function(_0x5b92af,_0x28dc8e){const _0x138159=a0_0x14e4,_0x302392=_0x5b92af();while(!![]){try{const _0x5e9a86=parseInt(_0x138159(0x1e9))/0x1*(parseInt(_0x138159(0x1f1))/0x2)+parseInt(_0x138159(0x1ea))/0x3*(-parseInt(_0x138159(0x1ee))/0x4)+parseInt(_0x138159(0x1fc))/0x5+-parseInt(_0x138159(0x1ec))/0x6+-parseInt(_0x138159(0x1e8))/0x7*(parseInt(_0x138159(0x1ff))/0x8)+parseInt(_0x138159(0x1ed))/0x9+-parseInt(_0x138159(0x201))/0xa;if(_0x5e9a86===_0x28dc8e)break;else _0x302392['push'](_0x302392['shift']());}catch(_0x5beabc){_0x302392['push'](_0x302392['shift']());}}}(a0_0x13ce,0x84005));import{startTerminalUI}from'../src/interfaces/terminal/index.js';function a0_0x13ce(){const _0x4326aa=['7819983lifzGa','16LkalxO','\x20\x20npm\x20start','Starting\x20Loxia\x20Terminal\x20UI...','22682oHHaOi','LOXIA_PORT','Connecting\x20to:\x20','ERROR:\x20Terminal\x20UI\x20requires\x20an\x20interactive\x20terminal\x20(TTY).','error','catch','Press\x20Ctrl+C\x20to\x20exit\x0a','--port','--host','LOXIA_HOST','--help','5002410tiREHM','\x0aTerminal\x20UI\x20exited','isTTY','16XQzDwj','The\x20terminal\x20UI\x20cannot\x20run\x20in:','432290uGlnLK','length','env','argv','Please\x20run\x20this\x20command\x20in\x20a\x20real\x20terminal\x20without\x20pipes\x20or\x20redirection:','stdin','slice','\x20\x20npm\x20run\x20terminal-ui','log','port','host','\x20\x20-\x20Redirected\x20output\x20(e.g.,\x20>\x20file.txt,\x202>&1\x20|\x20...)','467026UATXhi','7eeAdmi','646572NbypJb','exit','2215908achEtW'];a0_0x13ce=function(){return _0x4326aa;};return a0_0x13ce();}const args=process[a0_0x3130d8(0x204)][a0_0x3130d8(0x1e2)](0x2),options={'host':'localhost','port':0x1f90};for(let i=0x0;i<args[a0_0x3130d8(0x202)];i++){const arg=args[i];if(arg===a0_0x3130d8(0x1f9)||arg==='-h')options[a0_0x3130d8(0x1e6)]=args[++i];else{if(arg===a0_0x3130d8(0x1f8)||arg==='-p')options[a0_0x3130d8(0x1e5)]=parseInt(args[++i],0xa);else arg===a0_0x3130d8(0x1fb)&&(console[a0_0x3130d8(0x1e4)]('\x0aLoxia\x20Terminal\x20UI\x0a\x0aUsage:\x0a\x20\x20loxia-terminal\x20[options]\x0a\x0aOptions:\x0a\x20\x20--host,\x20-h\x20<host>\x20\x20\x20\x20Backend\x20host\x20(default:\x20localhost)\x0a\x20\x20--port,\x20-p\x20<port>\x20\x20\x20\x20Backend\x20port\x20(default:\x208080)\x0a\x20\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x20message\x0a\x0aEnvironment\x20Variables:\x0a\x20\x20LOXIA_HOST\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Backend\x20host\x0a\x20\x20LOXIA_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Backend\x20port\x0a\x0aExamples:\x0a\x20\x20loxia-terminal\x0a\x20\x20loxia-terminal\x20--host\x20192.168.1.100\x20--port\x203000\x0a\x20\x20LOXIA_HOST=api.example.com\x20LOXIA_PORT=443\x20loxia-terminal\x0a'),process[a0_0x3130d8(0x1eb)](0x0));}}process[a0_0x3130d8(0x203)][a0_0x3130d8(0x1fa)]&&(options[a0_0x3130d8(0x1e6)]=process[a0_0x3130d8(0x203)][a0_0x3130d8(0x1fa)]);process['env']['LOXIA_PORT']&&(options[a0_0x3130d8(0x1e5)]=parseInt(process[a0_0x3130d8(0x203)][a0_0x3130d8(0x1f2)],0xa));!process[a0_0x3130d8(0x1e1)][a0_0x3130d8(0x1fe)]&&(console['error'](a0_0x3130d8(0x1f4)),console[a0_0x3130d8(0x1f5)](''),console[a0_0x3130d8(0x1f5)](a0_0x3130d8(0x200)),console[a0_0x3130d8(0x1f5)]('\x20\x20-\x20Piped\x20environments\x20(e.g.,\x20|\x20head,\x20|\x20grep)'),console[a0_0x3130d8(0x1f5)](a0_0x3130d8(0x1e7)),console[a0_0x3130d8(0x1f5)]('\x20\x20-\x20Background\x20processes\x20(e.g.,\x20&\x20at\x20the\x20end)'),console['error']('\x20\x20-\x20Some\x20CI/CD\x20environments'),console[a0_0x3130d8(0x1f5)](''),console[a0_0x3130d8(0x1f5)](a0_0x3130d8(0x205)),console[a0_0x3130d8(0x1f5)](a0_0x3130d8(0x1e3)),console['error'](''),console[a0_0x3130d8(0x1f5)]('Or\x20use\x20the\x20web\x20UI\x20instead:'),console[a0_0x3130d8(0x1f5)](a0_0x3130d8(0x1ef)),process['exit'](0x1));console[a0_0x3130d8(0x1e4)](a0_0x3130d8(0x1f0)),console[a0_0x3130d8(0x1e4)](a0_0x3130d8(0x1f3)+options['host']+':'+options[a0_0x3130d8(0x1e5)]),console[a0_0x3130d8(0x1e4)](a0_0x3130d8(0x1f7));const instance=startTerminalUI(options);function a0_0x14e4(_0xfb6a59,_0x1eb770){_0xfb6a59=_0xfb6a59-0x1e1;const _0x13cedd=a0_0x13ce();let _0x14e44c=_0x13cedd[_0xfb6a59];return _0x14e44c;}instance['waitUntilExit']()['then'](()=>{const _0x37265c=a0_0x3130d8;console[_0x37265c(0x1e4)](_0x37265c(0x1fd)),process[_0x37265c(0x1eb)](0x0);})[a0_0x3130d8(0x1f6)](_0x27f9b3=>{const _0x3462fd=a0_0x3130d8;console[_0x3462fd(0x1f5)]('\x0aTerminal\x20UI\x20error:',_0x27f9b3),process[_0x3462fd(0x1eb)](0x1);});
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
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();
3
+ const a0_0xc4add4=a0_0x4bc5;(function(_0x3a231e,_0x335da3){const _0xebab04=a0_0x4bc5,_0x435d04=_0x3a231e();while(!![]){try{const _0xda2ba0=parseInt(_0xebab04(0x159))/0x1+parseInt(_0xebab04(0x13f))/0x2+-parseInt(_0xebab04(0x152))/0x3+parseInt(_0xebab04(0x13e))/0x4*(parseInt(_0xebab04(0x14a))/0x5)+-parseInt(_0xebab04(0x146))/0x6+parseInt(_0xebab04(0x163))/0x7*(-parseInt(_0xebab04(0x168))/0x8)+-parseInt(_0xebab04(0x15e))/0x9*(-parseInt(_0xebab04(0x149))/0xa);if(_0xda2ba0===_0x335da3)break;else _0x435d04['push'](_0x435d04['shift']());}catch(_0x39626d){_0x435d04['push'](_0x435d04['shift']());}}}(a0_0xaf32,0x87860));import{spawn}from'child_process';function a0_0x4bc5(_0xe09dc7,_0x5b2824){_0xe09dc7=_0xe09dc7-0x13c;const _0xaf3273=a0_0xaf32();let _0x4bc537=_0xaf3273[_0xe09dc7];return _0x4bc537;}function a0_0xaf32(){const _0x35b572=['153RulStR','kill','message','bin','exit','153559GLmgWO','ExperimentalWarning','Failed\x20to\x20start\x20Terminal\x20UI:','PORT','🚀\x20Starting\x20Loxia\x20server...','8mTakOi','loxia-terminal.js','SIGTERM','1853608yYelFo','1251670wAlMCv','Failed\x20to\x20start\x20server:','setTimeout','statusCode','src','killed','\x0a⚠️\x20\x20Received\x20SIGTERM,\x20shutting\x20down...','5649042GXMYox','pipe','║\x20\x20\x20Loxia\x20AI\x20Agents\x20-\x20Server\x20+\x20Terminal\x20UI\x20\x20\x20\x20\x20\x20║','240780pAQFZc','5RKyeBE','stderr','log','destroy','error','env','http://localhost:','/health','1627296QmIFGk','Timeout','✅\x20Server\x20is\x20ready!','node','toString','Error\x20during\x20startup:','trim','562417eYgWgM','inherit','data','get','Server\x20returned\x20'];a0_0xaf32=function(){return _0x35b572;};return a0_0xaf32();}import{fileURLToPath}from'url';import{dirname,join}from'path';import a0_0xc8d96 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),rootDir=join(__dirname,'..'),SERVER_PORT=process[a0_0xc4add4(0x14f)][a0_0xc4add4(0x166)]||0x1f90,STARTUP_WAIT=0x7d0;let serverProcess=null;async function checkServerReady(_0x23d54b=0xa,_0x122d80=0x1f4){const _0x2df69f=a0_0xc4add4;for(let _0x552413=0x0;_0x552413<_0x23d54b;_0x552413++){try{return await new Promise((_0x51854a,_0xa2402c)=>{const _0x428fbc=a0_0x4bc5,_0x5c627c=a0_0xc8d96[_0x428fbc(0x15c)](_0x428fbc(0x150)+SERVER_PORT+_0x428fbc(0x151),_0x1ee69d=>{const _0x836177=_0x428fbc;_0x1ee69d[_0x836177(0x142)]===0xc8?_0x51854a():_0xa2402c(new Error(_0x836177(0x15d)+_0x1ee69d[_0x836177(0x142)]));});_0x5c627c['on'](_0x428fbc(0x14e),_0xa2402c),_0x5c627c[_0x428fbc(0x141)](0x3e8,()=>{const _0x52378f=_0x428fbc;_0x5c627c[_0x52378f(0x14d)](),_0xa2402c(new Error(_0x52378f(0x153)));});}),console['log'](_0x2df69f(0x154)),!![];}catch(_0x4d7405){_0x552413<_0x23d54b-0x1&&await new Promise(_0x2d8d5c=>setTimeout(_0x2d8d5c,_0x122d80));}}return console[_0x2df69f(0x14c)]('⚠️\x20\x20Server\x20may\x20not\x20be\x20fully\x20ready,\x20but\x20continuing\x20anyway...'),![];}async function startServer(){return new Promise(_0x40268e=>{const _0x17916b=a0_0x4bc5;console[_0x17916b(0x14c)](_0x17916b(0x167));const _0x5eb723=join(rootDir,_0x17916b(0x143),'index.js');serverProcess=spawn('node',[_0x5eb723],{'cwd':rootDir,'env':{...process['env']},'stdio':['ignore',_0x17916b(0x147),'pipe'],'detached':![]}),serverProcess['stdout']['on'](_0x17916b(0x15b),_0x4d6f3f=>{const _0x121519=_0x17916b,_0xec991b=_0x4d6f3f[_0x121519(0x156)]()[_0x121519(0x158)]();_0xec991b&&console[_0x121519(0x14c)]('[SERVER]\x20'+_0xec991b);}),serverProcess[_0x17916b(0x14b)]['on'](_0x17916b(0x15b),_0x36c3af=>{const _0x192275=_0x17916b,_0x36405e=_0x36c3af[_0x192275(0x156)]()[_0x192275(0x158)]();_0x36405e&&!_0x36405e['includes'](_0x192275(0x164))&&console[_0x192275(0x14e)]('[SERVER\x20ERROR]\x20'+_0x36405e);}),serverProcess['on'](_0x17916b(0x14e),_0x566bd3=>{const _0x697b92=_0x17916b;console[_0x697b92(0x14e)](_0x697b92(0x140),_0x566bd3[_0x697b92(0x160)]),process[_0x697b92(0x162)](0x1);}),serverProcess['on'](_0x17916b(0x162),(_0x51eca3,_0x118a12)=>{_0x51eca3!==null&&_0x51eca3!==0x0&&(console['error']('Server\x20exited\x20with\x20code\x20'+_0x51eca3),process['exit'](_0x51eca3));}),setTimeout(_0x40268e,STARTUP_WAIT);});}async function startTerminalUI(){const _0x108939=a0_0xc4add4;console[_0x108939(0x14c)]('🖥️\x20\x20Starting\x20Terminal\x20UI...'),console[_0x108939(0x14c)]('');const _0x2a7f24=join(rootDir,_0x108939(0x161),_0x108939(0x13c)),_0xe3d090=spawn(_0x108939(0x155),[_0x2a7f24],{'cwd':rootDir,'env':{...process['env']},'stdio':_0x108939(0x15a)});return _0xe3d090['on'](_0x108939(0x14e),_0x48f632=>{const _0x1b734b=_0x108939;console[_0x1b734b(0x14e)](_0x1b734b(0x165),_0x48f632[_0x1b734b(0x160)]),cleanup(),process[_0x1b734b(0x162)](0x1);}),_0xe3d090['on'](_0x108939(0x162),_0xbc9e14=>{const _0xd6db03=_0x108939;console[_0xd6db03(0x14c)]('\x0a👋\x20Terminal\x20UI\x20closed.'),cleanup(),process[_0xd6db03(0x162)](_0xbc9e14||0x0);}),_0xe3d090;}function cleanup(){const _0x31c01d=a0_0xc4add4;serverProcess&&!serverProcess[_0x31c01d(0x144)]&&(console[_0x31c01d(0x14c)]('🛑\x20Stopping\x20server...'),serverProcess[_0x31c01d(0x15f)](_0x31c01d(0x13d)),setTimeout(()=>{const _0x3d380d=_0x31c01d;!serverProcess[_0x3d380d(0x144)]&&serverProcess['kill']('SIGKILL');},0x1388));}process['on']('SIGINT',()=>{const _0x479215=a0_0xc4add4;console[_0x479215(0x14c)]('\x0a⚠️\x20\x20Received\x20SIGINT,\x20shutting\x20down...'),cleanup(),process[_0x479215(0x162)](0x0);}),process['on'](a0_0xc4add4(0x13d),()=>{const _0x9bd1cb=a0_0xc4add4;console[_0x9bd1cb(0x14c)](_0x9bd1cb(0x145)),cleanup(),process[_0x9bd1cb(0x162)](0x0);}),process['on']('exit',()=>{cleanup();});async function main(){const _0x5c1bdf=a0_0xc4add4;console['log']('╔════════════════════════════════════════════════╗'),console[_0x5c1bdf(0x14c)](_0x5c1bdf(0x148)),console[_0x5c1bdf(0x14c)]('╚════════════════════════════════════════════════╝'),console['log']('');try{await startServer(),await checkServerReady(),await startTerminalUI(),await new Promise(()=>{});}catch(_0x9638f2){console[_0x5c1bdf(0x14e)](_0x5c1bdf(0x157),_0x9638f2['message']),cleanup(),process[_0x5c1bdf(0x162)](0x1);}}main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loxia-labs/loxia-autopilot-one",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
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_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);});
2
+ function a0_0x26c1(){const _0x4a8c5b=['pipe','semgrep','arch','\x20\x20\x20✅\x20Python\x20found:\x20','\x20\x20\x20Semgrep\x20not\x20found\x20in\x20PATH,\x20installing\x20standalone\x20binary...','semgrep\x20--version','6253326poQELO','\x20\x20\x20pip\x20install\x20semgrep\x0a','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20','https','promises','8270090AIbwhp','python3','log','907692kLYkOA','37458irvakA','📦\x20Checking\x20ESLint\x20Security\x20Plugin...','\x20\x20\x20✅\x20eslint-plugin-security\x20is\x20installed\x0a','\x20\x20\x20✅\x20Semgrep\x20already\x20installed:\x20','\x0aYou\x20can\x20manually\x20install\x20scanners:','\x20-m\x20pip\x20show\x20','python','🐍\x20Checking\x20Python\x20scanners...','...','exit','platform','join','═══════════════════════════════════════════════════════════','checkov','\x20installed\x20successfully','\x0a═══════════════════════════════════════════════════════════','\x20\x20\x20To\x20enable\x20Python\x20scanning,\x20install\x20Python\x20and\x20run:','\x20\x20\x20⚠️\x20\x20No\x20Semgrep\x20binary\x20available\x20for\x20','catch','\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20Semgrep:\x20','242XcNjCH','═══════════════════════════════════════════════════════════\x0a','🔍\x20Installing\x20Semgrep...','\x20\x20\x20Installing\x20','python3\x20--version','\x20\x20\x20✅\x20','mkdir','2104PJmzoU','stdout','\x20\x20\x20Please\x20install\x20manually:\x20https://semgrep.dev/docs/getting-started/\x0a','Failed\x20to\x20download:\x20HTTP\x20','9NdjyrA','close','7WtxApK','error','then','yamllint','\x20\x20Installing\x20Security\x20Scanners','357400tCzoox','dirname','url','bandit','node_modules','.scanners','get','eslint-plugin-security','\x20\x20Installation\x20Complete','\x20\x20\x20Downloading\x20from\x20','\x20\x20\x20Note:\x20To\x20use\x20system-wide,\x20add\x20to\x20PATH\x20or\x20install\x20globally:','626755CnSNEy','❌\x20Installation\x20failed:','trim','76YiAJSQ','statusCode','startsWith','\x20\x20\x20Using\x20system-installed\x20Semgrep\x0a','270654mqkQEO','\x20-m\x20pip\x20install\x20--user\x20','message','\x20\x20\x20⚠️\x20\x20Python\x20not\x20found\x20-\x20skipping\x20Python\x20scanners','\x20\x20\x20Run:\x20npm\x20install\x20--save-dev\x20eslint-plugin-security\x0a','\x20already\x20installed'];a0_0x26c1=function(){return _0x4a8c5b;};return a0_0x26c1();}const a0_0x315ea8=a0_0x36e4;(function(_0x4853b4,_0xdb5440){const _0x37b457=a0_0x36e4,_0x489209=_0x4853b4();while(!![]){try{const _0x5a5274=parseInt(_0x37b457(0x238))/0x1+parseInt(_0x37b457(0x1f1))/0x2*(-parseInt(_0x37b457(0x226))/0x3)+-parseInt(_0x37b457(0x23b))/0x4*(-parseInt(_0x37b457(0x22d))/0x5)+parseInt(_0x37b457(0x1fd))/0x6*(parseInt(_0x37b457(0x228))/0x7)+parseInt(_0x37b457(0x222))/0x8*(-parseInt(_0x37b457(0x206))/0x9)+parseInt(_0x37b457(0x202))/0xa+parseInt(_0x37b457(0x21b))/0xb*(-parseInt(_0x37b457(0x205))/0xc);if(_0x5a5274===_0xdb5440)break;else _0x489209['push'](_0x489209['shift']());}catch(_0x3f3598){_0x489209['push'](_0x489209['shift']());}}}(a0_0x26c1,0xa8508));import{exec}from'child_process';import{promisify}from'util';import a0_0x8ffd5d from'https';import a0_0x6979db from'http';import a0_0x4a5341 from'fs';import a0_0x55fe1e from'path';import{fileURLToPath}from'url';import{createWriteStream}from'fs';import{pipeline}from'stream/promises';const execAsync=promisify(exec),__filename=fileURLToPath(import.meta.url),__dirname=a0_0x55fe1e[a0_0x315ea8(0x22e)](__filename),SCANNER_DIR=a0_0x55fe1e[a0_0x315ea8(0x211)](__dirname,'..',a0_0x315ea8(0x231),a0_0x315ea8(0x232)),SEMGREP_VERSION='v1.55.0';console[a0_0x315ea8(0x204)](a0_0x315ea8(0x212)),console['log'](a0_0x315ea8(0x22c)),console['log'](a0_0x315ea8(0x21c));async function installScanners(){const _0x5d55ee=a0_0x315ea8;await a0_0x4a5341['promises'][_0x5d55ee(0x221)](SCANNER_DIR,{'recursive':!![]}),await checkESLintSecurity(),await installSemgrep(),await installPythonScanners(),console[_0x5d55ee(0x204)](_0x5d55ee(0x215)),console['log'](_0x5d55ee(0x235)),console[_0x5d55ee(0x204)](_0x5d55ee(0x21c));}async function checkESLintSecurity(){const _0x124426=a0_0x315ea8;console[_0x124426(0x204)](_0x124426(0x207));try{await import(_0x124426(0x234)),console[_0x124426(0x204)](_0x124426(0x208));}catch(_0x41211d){console[_0x124426(0x204)]('\x20\x20\x20⚠️\x20\x20eslint-plugin-security\x20not\x20found'),console[_0x124426(0x204)](_0x124426(0x1f5));}}async function installSemgrep(){const _0x15a234=a0_0x315ea8;console[_0x15a234(0x204)](_0x15a234(0x21d));const _0x6f4215=process[_0x15a234(0x210)],_0x116359=process[_0x15a234(0x1f9)];try{const _0x317212=await execAsync(_0x15a234(0x1fc),{'timeout':0x1388});console['log'](_0x15a234(0x209)+_0x317212[_0x15a234(0x223)][_0x15a234(0x23a)]()),console[_0x15a234(0x204)](_0x15a234(0x1f0));return;}catch(_0x255feb){console['log'](_0x15a234(0x1fb));}const _0x51da98=getSemgrepBinaryInfo(_0x6f4215,_0x116359);if(!_0x51da98){console[_0x15a234(0x204)](_0x15a234(0x217)+_0x6f4215+'-'+_0x116359),console[_0x15a234(0x204)](_0x15a234(0x224));return;}try{const _0x4e8557=a0_0x55fe1e[_0x15a234(0x211)](SCANNER_DIR,_0x15a234(0x1f8));console[_0x15a234(0x204)](_0x15a234(0x236)+_0x51da98[_0x15a234(0x22f)]+_0x15a234(0x20e)),await downloadFile(_0x51da98[_0x15a234(0x22f)],_0x4e8557),await a0_0x4a5341[_0x15a234(0x201)]['chmod'](_0x4e8557,0x1ed),console[_0x15a234(0x204)]('\x20\x20\x20✅\x20Semgrep\x20installed\x20successfully'),console[_0x15a234(0x204)]('\x20\x20\x20Location:\x20'+_0x4e8557+'\x0a'),console['log'](_0x15a234(0x237)),console[_0x15a234(0x204)](_0x15a234(0x1fe));}catch(_0x18e91b){console[_0x15a234(0x204)](_0x15a234(0x21a)+_0x18e91b[_0x15a234(0x1f3)]),console[_0x15a234(0x204)]('\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20semgrep\x0a');}}function getSemgrepBinaryInfo(_0x12866,_0x3fd507){return null;}async function installPythonScanners(){const _0x529d63=a0_0x315ea8;console['log'](_0x529d63(0x20d));let _0x5ddd44=null;try{await execAsync(_0x529d63(0x21f),{'timeout':0x1388}),_0x5ddd44=_0x529d63(0x203);}catch(_0x84cea0){try{await execAsync('python\x20--version',{'timeout':0x1388}),_0x5ddd44=_0x529d63(0x20c);}catch(_0x2669f5){console[_0x529d63(0x204)](_0x529d63(0x1f4)),console[_0x529d63(0x204)](_0x529d63(0x216)),console['log']('\x20\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit\x20checkov\x20yamllint\x0a');return;}}console[_0x529d63(0x204)](_0x529d63(0x1fa)+_0x5ddd44),await installViaPip('semgrep',_0x5ddd44),await installViaPip(_0x529d63(0x230),_0x5ddd44),await installViaPip('pip-audit',_0x5ddd44),await installViaPip(_0x529d63(0x213),_0x5ddd44),await installViaPip(_0x529d63(0x22b),_0x5ddd44),console[_0x529d63(0x204)]('');}function a0_0x36e4(_0x349c53,_0x48dbd2){_0x349c53=_0x349c53-0x1f0;const _0x26c18f=a0_0x26c1();let _0x36e49b=_0x26c18f[_0x349c53];return _0x36e49b;}async function installViaPip(_0x1ff293,_0x3ac438){const _0x19074e=a0_0x315ea8;try{const _0x5f0f29=await execAsync(_0x3ac438+_0x19074e(0x20b)+_0x1ff293,{'timeout':0x1388});return console['log'](_0x19074e(0x220)+_0x1ff293+_0x19074e(0x1f6)),!![];}catch(_0x27ff6e){console[_0x19074e(0x204)](_0x19074e(0x21e)+_0x1ff293+_0x19074e(0x20e));try{return await execAsync(_0x3ac438+_0x19074e(0x1f2)+_0x1ff293,{'timeout':0xea60}),console[_0x19074e(0x204)](_0x19074e(0x220)+_0x1ff293+_0x19074e(0x214)),!![];}catch(_0x448500){return console[_0x19074e(0x204)]('\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20'+_0x1ff293+':\x20'+_0x448500[_0x19074e(0x1f3)]),console[_0x19074e(0x204)](_0x19074e(0x1ff)+_0x1ff293),![];}}}async function downloadFile(_0x530321,_0x3575e9){return new Promise((_0x1b4a85,_0x44a2cf)=>{const _0x36d8ab=a0_0x36e4,_0x586157=_0x530321[_0x36d8ab(0x23d)](_0x36d8ab(0x200))?a0_0x8ffd5d:a0_0x6979db;_0x586157[_0x36d8ab(0x233)](_0x530321,_0x542019=>{const _0x35b5ef=_0x36d8ab;if(_0x542019[_0x35b5ef(0x23c)]===0x12e||_0x542019[_0x35b5ef(0x23c)]===0x12d){downloadFile(_0x542019['headers']['location'],_0x3575e9)[_0x35b5ef(0x22a)](_0x1b4a85)[_0x35b5ef(0x218)](_0x44a2cf);return;}if(_0x542019[_0x35b5ef(0x23c)]!==0xc8){_0x44a2cf(new Error(_0x35b5ef(0x225)+_0x542019['statusCode']));return;}const _0xc0abc5=createWriteStream(_0x3575e9);_0x542019[_0x35b5ef(0x1f7)](_0xc0abc5),_0xc0abc5['on']('finish',()=>{const _0x42d48e=_0x35b5ef;_0xc0abc5[_0x42d48e(0x227)](),_0x1b4a85();}),_0xc0abc5['on'](_0x35b5ef(0x229),_0x1dc388=>{a0_0x4a5341['unlink'](_0x3575e9,()=>{}),_0x44a2cf(_0x1dc388);});})['on'](_0x36d8ab(0x229),_0x44a2cf);});}installScanners()[a0_0x315ea8(0x218)](_0x1ea214=>{const _0x18bf0f=a0_0x315ea8;console[_0x18bf0f(0x229)](_0x18bf0f(0x239),_0x1ea214[_0x18bf0f(0x1f3)]),console[_0x18bf0f(0x229)](_0x18bf0f(0x20a)),console[_0x18bf0f(0x229)]('\x20\x20npm\x20install\x20--save-dev\x20eslint-plugin-security'),console['error'](_0x18bf0f(0x219)),process[_0x18bf0f(0x20f)](0x0);});
@@ -1 +1 @@
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
+ const a0_0x1df93b=a0_0x30f1;(function(_0x2aed48,_0x325631){const _0x4759ec=a0_0x30f1,_0x222f5c=_0x2aed48();while(!![]){try{const _0x1478c9=parseInt(_0x4759ec(0x160))/0x1+-parseInt(_0x4759ec(0x179))/0x2+parseInt(_0x4759ec(0x14c))/0x3+parseInt(_0x4759ec(0x184))/0x4+parseInt(_0x4759ec(0x188))/0x5*(parseInt(_0x4759ec(0x162))/0x6)+parseInt(_0x4759ec(0x165))/0x7+parseInt(_0x4759ec(0x15e))/0x8*(-parseInt(_0x4759ec(0x14f))/0x9);if(_0x1478c9===_0x325631)break;else _0x222f5c['push'](_0x222f5c['shift']());}catch(_0x56fc40){_0x222f5c['push'](_0x222f5c['shift']());}}}(a0_0x2512,0x58700));import{STATIC_ANALYSIS}from'../utilities/constants.js';function a0_0x30f1(_0x351052,_0x2f4785){_0x351052=_0x351052-0x146;const _0x2512e1=a0_0x2512();let _0x30f11d=_0x2512e1[_0x351052];if(a0_0x30f1['vwusTg']===undefined){var _0xf04ba=function(_0x5462df){const _0xfb0241='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x307ab0='',_0x747c5f='';for(let _0x18a35d=0x0,_0x54a05f,_0x3aba07,_0x3aa59d=0x0;_0x3aba07=_0x5462df['charAt'](_0x3aa59d++);~_0x3aba07&&(_0x54a05f=_0x18a35d%0x4?_0x54a05f*0x40+_0x3aba07:_0x3aba07,_0x18a35d++%0x4)?_0x307ab0+=String['fromCharCode'](0xff&_0x54a05f>>(-0x2*_0x18a35d&0x6)):0x0){_0x3aba07=_0xfb0241['indexOf'](_0x3aba07);}for(let _0x110548=0x0,_0x3c4667=_0x307ab0['length'];_0x110548<_0x3c4667;_0x110548++){_0x747c5f+='%'+('00'+_0x307ab0['charCodeAt'](_0x110548)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x747c5f);};a0_0x30f1['gpTXDg']=_0xf04ba,a0_0x30f1['RcEmMq']={},a0_0x30f1['vwusTg']=!![];}const _0x5af0b1=_0x2512e1[0x0],_0x138702=_0x351052+_0x5af0b1,_0x42d9b8=a0_0x30f1['RcEmMq'][_0x138702];return!_0x42d9b8?(_0x30f11d=a0_0x30f1['gpTXDg'](_0x30f11d),a0_0x30f1['RcEmMq'][_0x138702]=_0x30f11d):_0x30f11d=_0x42d9b8,_0x30f11d;}class CSSAnalyzer{constructor(_0x307ab0=null){const _0x471dc9=a0_0x30f1;this['logger']=_0x307ab0,this['stylelint']=null,this[_0x471dc9(0x16c)]=null,this['postcssScss']=null,this[_0x471dc9(0x148)]=null;}async[a0_0x1df93b(0x17a)](_0x747c5f,_0x18a35d,_0x54a05f={}){const _0x3ca75f=a0_0x1df93b;try{const _0x3aba07=[],_0x3aa59d=this['detectLanguage'](_0x747c5f),_0x110548=await this['checkSyntax'](_0x747c5f,_0x18a35d,_0x3aa59d);_0x3aba07['push'](..._0x110548);if(_0x110548[_0x3ca75f(0x147)]===0x0){const _0x3c4667=await this['lintStyles'](_0x747c5f,_0x18a35d,_0x3aa59d);_0x3aba07['push'](..._0x3c4667);}return this['logger']?.['debug']('CSS\x20analysis\x20completed',{'file':_0x747c5f,'language':_0x3aa59d,'totalDiagnostics':_0x3aba07[_0x3ca75f(0x147)],'errors':_0x3aba07['filter'](_0x48293b=>_0x48293b['severity']===STATIC_ANALYSIS['SEVERITY']['ERROR'])['length'],'warnings':_0x3aba07['filter'](_0x356f11=>_0x356f11[_0x3ca75f(0x183)]===STATIC_ANALYSIS[_0x3ca75f(0x16b)][_0x3ca75f(0x172)])['length']}),_0x3aba07;}catch(_0x4b6947){return this[_0x3ca75f(0x18a)]?.['error'](_0x3ca75f(0x17c),{'file':_0x747c5f,'error':_0x4b6947[_0x3ca75f(0x180)]}),[];}}async[a0_0x1df93b(0x14d)](_0x18faf0,_0x2032b9,_0x113c2b){const _0x525641=a0_0x1df93b,_0xae0f43=[];try{if(!this['postcss']){const _0x324e2b=await import('postcss');this[_0x525641(0x16c)]=_0x324e2b[_0x525641(0x15a)];}let _0x11cf28=null;if(_0x113c2b==='scss'){if(!this[_0x525641(0x15b)]){const _0x37ecb0=await import(_0x525641(0x164));this['postcssScss']=_0x37ecb0[_0x525641(0x15a)];}_0x11cf28=this['postcssScss'];}else{if(_0x113c2b==='less'){if(!this[_0x525641(0x148)]){const _0x345bb0=await import('postcss-less');this['postcssLess']=_0x345bb0[_0x525641(0x15a)];}_0x11cf28=this['postcssLess'];}}const _0x481f96=this[_0x525641(0x16c)]()['process'](_0x2032b9,{'from':_0x18faf0,'syntax':_0x11cf28}),_0x34f546=_0x481f96[_0x525641(0x163)];this['logger']?.[_0x525641(0x18c)](_0x525641(0x14b),{'file':_0x18faf0});}catch(_0x3333e7){const _0xb38233=this[_0x525641(0x16e)](_0x3333e7,_0x18faf0);_0xb38233&&_0xae0f43[_0x525641(0x150)](_0xb38233);}return _0xae0f43;}async[a0_0x1df93b(0x156)](_0x390a5d,_0x7c928,_0x2befa3){const _0x43055a=a0_0x1df93b,_0x498a7d=[];try{if(!this[_0x43055a(0x157)]){const _0xc4f61=await import('stylelint');this[_0x43055a(0x157)]=_0xc4f61['default'];}const _0x32e32a={'extends':[_0x43055a(0x15f)],'rules':{'color-no-invalid-hex':!![],'font-family-no-duplicate-names':!![],'function-calc-no-invalid':!![],'string-no-newline':!![],'unit-no-unknown':!![],'property-no-unknown':!![],'declaration-block-no-duplicate-properties':!![],'selector-pseudo-class-no-unknown':!![],'selector-pseudo-element-no-unknown':!![],'selector-type-no-unknown':[!![],{'ignoreTypes':['/^custom-/',_0x43055a(0x168)]}],'media-feature-name-no-unknown':!![],'at-rule-no-unknown':_0x2befa3===_0x43055a(0x16d)?[!![],{'ignoreAtRules':['mixin',_0x43055a(0x169),'extend','if',_0x43055a(0x155),'for',_0x43055a(0x186),'while','function',_0x43055a(0x173),_0x43055a(0x16f),'use',_0x43055a(0x17f)]}]:_0x2befa3===_0x43055a(0x15c)?[!![],{'ignoreAtRules':['plugin']}]:!![],'comment-no-empty':!![],'no-duplicate-selectors':!![],'no-empty-source':null,'block-no-empty':!![],'declaration-block-no-shorthand-property-overrides':!![],'font-family-no-missing-generic-family-keyword':!![],'function-linear-gradient-no-nonstandard-direction':!![],'no-descending-specificity':null,'no-duplicate-at-import-rules':!![],'no-extra-semicolons':!![],'no-invalid-double-slash-comments':!![],'selector-pseudo-element-colon-notation':_0x43055a(0x158),'selector-type-case':_0x43055a(0x14a)},'customSyntax':_0x2befa3==='scss'?_0x43055a(0x164):_0x2befa3===_0x43055a(0x15c)?_0x43055a(0x187):undefined},_0x499abd=await this[_0x43055a(0x157)]['lint']({'code':_0x7c928,'codeFilename':_0x390a5d,'config':_0x32e32a});if(_0x499abd[_0x43055a(0x161)]&&_0x499abd['results']['length']>0x0){const _0x32f1c8=_0x499abd['results'][0x0];if(_0x32f1c8[_0x43055a(0x166)])for(const _0x367ba4 of _0x32f1c8['warnings']){_0x498a7d[_0x43055a(0x150)]({'file':_0x390a5d,'line':_0x367ba4['line']||0x1,'column':_0x367ba4[_0x43055a(0x149)]||0x1,'severity':_0x367ba4['severity']===_0x43055a(0x177)?STATIC_ANALYSIS['SEVERITY']['ERROR']:STATIC_ANALYSIS[_0x43055a(0x16b)][_0x43055a(0x172)],'rule':_0x367ba4['rule']||'unknown','message':_0x367ba4['text'],'category':this['categorizeStylelintRule'](_0x367ba4['rule']),'fixable':![],'source':'stylelint'});}}}catch(_0x3b8b9e){this[_0x43055a(0x18a)]?.[_0x43055a(0x146)](_0x43055a(0x18d),{'file':_0x390a5d,'error':_0x3b8b9e['message']});}return _0x498a7d;}[a0_0x1df93b(0x16e)](_0x4d7353,_0x209627){const _0x49edb9=a0_0x1df93b;return{'file':_0x209627,'line':_0x4d7353[_0x49edb9(0x181)]||0x1,'column':_0x4d7353[_0x49edb9(0x149)]||0x1,'severity':STATIC_ANALYSIS[_0x49edb9(0x16b)][_0x49edb9(0x17e)],'rule':_0x4d7353[_0x49edb9(0x159)]||'CssSyntaxError','message':_0x4d7353[_0x49edb9(0x171)]||_0x4d7353['message'],'category':STATIC_ANALYSIS[_0x49edb9(0x174)][_0x49edb9(0x175)],'fixable':![],'source':'postcss','code':_0x4d7353[_0x49edb9(0x170)]||undefined};}[a0_0x1df93b(0x153)](_0x259e18){const _0x426f7d=a0_0x1df93b;if(!_0x259e18)return STATIC_ANALYSIS[_0x426f7d(0x174)]['STYLE'];const _0x161e58=_0x259e18[_0x426f7d(0x185)]();if(_0x161e58[_0x426f7d(0x17d)]('no-invalid')||_0x161e58['includes']('no-unknown')||_0x161e58['includes'](_0x426f7d(0x167))||_0x161e58[_0x426f7d(0x17d)]('syntax'))return STATIC_ANALYSIS[_0x426f7d(0x174)]['SYNTAX'];if(_0x161e58['includes'](_0x426f7d(0x154))||_0x161e58[_0x426f7d(0x17d)](_0x426f7d(0x18b)))return STATIC_ANALYSIS['CATEGORY']['PERFORMANCE'];if(_0x161e58[_0x426f7d(0x17d)](_0x426f7d(0x16a))||_0x161e58['includes'](_0x426f7d(0x17b)))return STATIC_ANALYSIS[_0x426f7d(0x174)][_0x426f7d(0x14e)];return STATIC_ANALYSIS['CATEGORY'][_0x426f7d(0x15d)];}[a0_0x1df93b(0x152)](_0x916852){const _0x207736=a0_0x1df93b,_0x3a0379=_0x916852[_0x207736(0x185)]();if(_0x3a0379[_0x207736(0x182)]('.scss')||_0x3a0379[_0x207736(0x182)](_0x207736(0x189)))return'scss';if(_0x3a0379['endsWith']('.less'))return _0x207736(0x15c);return _0x207736(0x178);}[a0_0x1df93b(0x151)](){const _0x5449a5=a0_0x1df93b;return[_0x5449a5(0x176),'.scss',_0x5449a5(0x189),'.less'];}['supportsAutoFix'](){return![];}}export default CSSAnalyzer;function a0_0x2512(){const _0x3a6c5e=['Aw5JBhvKzq','yMvZDc1WCMfJDgLJzq','u0vwrvjjvfK','Cg9ZDgnZCW','C2nZCW','zM9YBwf0ug9ZDentu0vYCM9Y','y29UDgvUDa','C291CMnL','CMvHC29U','v0fstKLorW','CMv0DxjU','q0furuDpuLK','u1Lovefy','lMnZCW','zxjYB3i','y3nZ','ntm5mZm0BuzuDwDz','yw5HBhL6zq','CMvJB21Tzw5Kzwq','q1ntigfUywX5C2LZigzHAwXLza','Aw5JBhvKzxm','rvjst1i','zM9YD2fYza','BwvZC2fNzq','BgLUzq','zw5KC1DPDgG','C2v2zxjPDhK','mtyYmtaWog1XEwjWzG','Dg9mB3DLCKnHC2u','zwfJAa','Cg9ZDgnZCY1SzxnZ','mtiZmdeWr1nJsfzJ','lNnHC3m','Bg9Nz2vY','B3b0Aw1PEMu','zgvIDwC','u3r5BgvSAw50igfUywX5C2LZigzHAwXLza','D2fYBG','BgvUz3rO','Cg9ZDgnZC0XLC3m','y29SDw1U','Bg93zxi','ug9ZDentuYbZEw50yxGGy2HLy2SGCgfZC2vK','nJu0otKWuNv2Axvs','y2HLy2TtEw50yxG','qKvtvf9quKfdveLdrq','mtCWntv4CLzzz0G','ChvZAa','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','zgv0zwn0tgfUz3vHz2u','y2f0zwDVCML6zvn0EwXLBgLUDfj1Bgu','CgvYzM9YBwfUy2u','zwXZzq','BgLUDfn0EwXLCW','C3r5BgvSAw50','zg91yMXL','BMfTzq','zgvMyxvSDa','Cg9ZDgnZC1nJC3m','BgvZCW','u1rzteu','mZGWme5Nz2rWqq','C3r5BgvSAw50lwnVBMzPzY1ZDgfUzgfYza','nJmYntCWt3zxr1jc','CMvZDwX0CW','nJbkB05oswe','CM9VDa','Cg9ZDgnZCY1Zy3nZ','mJa5mdiWwvjVD2Do','D2fYBMLUz3m','BM8Tzw1WDhK','BMCTzgvLCa'];a0_0x2512=function(){return _0x3a6c5e;};return a0_0x2512();}
@@ -1 +1 @@
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
+ const a0_0x492102=a0_0x406e;(function(_0x4f7eb2,_0x1d603e){const _0x20a513=a0_0x406e,_0x4355e3=_0x4f7eb2();while(!![]){try{const _0xfdd2c4=parseInt(_0x20a513(0x1b4))/0x1+parseInt(_0x20a513(0x1c0))/0x2*(-parseInt(_0x20a513(0x1ad))/0x3)+parseInt(_0x20a513(0x1dc))/0x4*(parseInt(_0x20a513(0x1f5))/0x5)+-parseInt(_0x20a513(0x1be))/0x6*(parseInt(_0x20a513(0x193))/0x7)+parseInt(_0x20a513(0x1ef))/0x8*(parseInt(_0x20a513(0x199))/0x9)+parseInt(_0x20a513(0x1ea))/0xa*(parseInt(_0x20a513(0x181))/0xb)+parseInt(_0x20a513(0x1d4))/0xc*(parseInt(_0x20a513(0x184))/0xd);if(_0xfdd2c4===_0x1d603e)break;else _0x4355e3['push'](_0x4355e3['shift']());}catch(_0x294576){_0x4355e3['push'](_0x4355e3['shift']());}}}(a0_0x41a0,0xc9bda));import{exec}from'child_process';import{promisify}from'util';import a0_0x1c908d from'path';import a0_0x314b12 from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';function a0_0x406e(_0x1bc81e,_0x51b159){_0x1bc81e=_0x1bc81e-0x17f;const _0x41a0de=a0_0x41a0();let _0x406e56=_0x41a0de[_0x1bc81e];if(a0_0x406e['CTJsfX']===undefined){var _0x1e3e82=function(_0x2c75b9){const _0x3a7632='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1c908d='',_0x314b12='';for(let _0x2b0992=0x0,_0x501d7c,_0xcc5350,_0x2b103c=0x0;_0xcc5350=_0x2c75b9['charAt'](_0x2b103c++);~_0xcc5350&&(_0x501d7c=_0x2b0992%0x4?_0x501d7c*0x40+_0xcc5350:_0xcc5350,_0x2b0992++%0x4)?_0x1c908d+=String['fromCharCode'](0xff&_0x501d7c>>(-0x2*_0x2b0992&0x6)):0x0){_0xcc5350=_0x3a7632['indexOf'](_0xcc5350);}for(let _0x29c184=0x0,_0x1b34ff=_0x1c908d['length'];_0x29c184<_0x1b34ff;_0x29c184++){_0x314b12+='%'+('00'+_0x1c908d['charCodeAt'](_0x29c184)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x314b12);};a0_0x406e['FRLYBw']=_0x1e3e82,a0_0x406e['Lsrvvw']={},a0_0x406e['CTJsfX']=!![];}const _0x15f181=_0x41a0de[0x0],_0x2c0d5b=_0x1bc81e+_0x15f181,_0x2dfb1c=a0_0x406e['Lsrvvw'][_0x2c0d5b];return!_0x2dfb1c?(_0x406e56=a0_0x406e['FRLYBw'](_0x406e56),a0_0x406e['Lsrvvw'][_0x2c0d5b]=_0x406e56):_0x406e56=_0x2dfb1c,_0x406e56;}const execAsync=promisify(exec);class ConfigValidator{constructor(_0x2b0992=null){const _0x42d219=a0_0x406e;this[_0x42d219(0x189)]=_0x2b0992,this[_0x42d219(0x1f6)]=null,this[_0x42d219(0x1c4)]=new Map();}async['detectAvailableValidators'](){const _0x39db7e=a0_0x406e;if(this['availableScanners']!==null)return this[_0x39db7e(0x1f6)];const _0x501d7c={'checkov':![],'hadolint':![],'yamllint':![],'jsonSchema':![]};try{await execAsync('checkov\x20--version',{'timeout':0x1388}),_0x501d7c['checkov']=!![],this['logger']?.['debug'](_0x39db7e(0x18f));}catch(_0xcc5350){this[_0x39db7e(0x189)]?.[_0x39db7e(0x1d6)]('checkov\x20not\x20available',{'error':_0xcc5350['message']});}try{await execAsync('hadolint\x20--version',{'timeout':0x1388}),_0x501d7c['hadolint']=!![],this['logger']?.[_0x39db7e(0x1d6)](_0x39db7e(0x187));}catch(_0x2b103c){this['logger']?.['debug'](_0x39db7e(0x1cb),{'error':_0x2b103c['message']});}try{await execAsync('yamllint\x20--version',{'timeout':0x1388}),_0x501d7c[_0x39db7e(0x1a3)]=!![],this['logger']?.[_0x39db7e(0x1d6)](_0x39db7e(0x1e8));}catch(_0x29c184){this['logger']?.['debug'](_0x39db7e(0x1e7),{'error':_0x29c184['message']});}try{await import(_0x39db7e(0x1f9)),_0x501d7c['jsonSchema']=!![],this[_0x39db7e(0x189)]?.['debug'](_0x39db7e(0x1aa));}catch(_0x1b34ff){this[_0x39db7e(0x189)]?.['debug']('ajv\x20not\x20available',{'error':_0x1b34ff['message']});}return this['availableScanners']=_0x501d7c,_0x501d7c;}async[a0_0x492102(0x190)](_0x3c0fe7,_0x5da177={}){const _0x1cf86c=a0_0x492102,_0x1aa984=[],_0x2831be=await this[_0x1cf86c(0x1c7)](),_0x124f59=this['detectFileType'](_0x3c0fe7);this['logger']?.['debug']('Validating\x20config\x20file',{'filePath':_0x3c0fe7,'fileType':_0x124f59});switch(_0x124f59){case'dockerfile':if(_0x2831be[_0x1cf86c(0x1ec)]){const _0x5ca3f7=await this['validateDockerfile'](_0x3c0fe7,_0x5da177);_0x1aa984[_0x1cf86c(0x1b7)](..._0x5ca3f7);}if(_0x2831be[_0x1cf86c(0x1c5)]){const _0x81ed1c=await this['validateWithCheckov'](_0x3c0fe7,_0x1cf86c(0x1fa),_0x5da177);_0x1aa984[_0x1cf86c(0x1b7)](..._0x81ed1c);}break;case _0x1cf86c(0x1a7):if(_0x2831be[_0x1cf86c(0x1a3)]){const _0x99a713=await this[_0x1cf86c(0x1d8)](_0x3c0fe7,_0x5da177);_0x1aa984['push'](..._0x99a713);}if(_0x2831be['checkov']){const _0x3f6559=await this[_0x1cf86c(0x1cc)](_0x3c0fe7,_0x1cf86c(0x1fc),_0x5da177);_0x1aa984['push'](..._0x3f6559);}break;case _0x1cf86c(0x1f4):if(_0x2831be['yamllint']){const _0x5a5eec=await this['validateYAML'](_0x3c0fe7,_0x5da177);_0x1aa984[_0x1cf86c(0x1b7)](..._0x5a5eec);}if(_0x2831be['checkov']){const _0x185601=await this[_0x1cf86c(0x1cc)](_0x3c0fe7,_0x1cf86c(0x1f4),_0x5da177);_0x1aa984[_0x1cf86c(0x1b7)](..._0x185601);}break;case _0x1cf86c(0x1d7):if(_0x2831be[_0x1cf86c(0x1c5)]){const _0xb11c5d=await this[_0x1cf86c(0x1cc)](_0x3c0fe7,'terraform',_0x5da177);_0x1aa984[_0x1cf86c(0x1b7)](..._0xb11c5d);}break;case'package.json':if(_0x2831be['jsonSchema']){const _0x3749c0=await this[_0x1cf86c(0x1b8)](_0x3c0fe7,_0x5da177);_0x1aa984[_0x1cf86c(0x1b7)](..._0x3749c0);}break;case _0x1cf86c(0x1d2):if(_0x2831be['jsonSchema']){const _0x52a4cc=await this['validateTsConfig'](_0x3c0fe7,_0x5da177);_0x1aa984[_0x1cf86c(0x1b7)](..._0x52a4cc);}break;case _0x1cf86c(0x1f8):if(_0x2831be['yamllint']){const _0x168be7=await this['validateYAML'](_0x3c0fe7,_0x5da177);_0x1aa984[_0x1cf86c(0x1b7)](..._0x168be7);}break;case _0x1cf86c(0x1c1):const _0x5f15cb=await this['validateEnvFile'](_0x3c0fe7,_0x5da177);_0x1aa984[_0x1cf86c(0x1b7)](..._0x5f15cb);break;case _0x1cf86c(0x1af):if(_0x2831be['yamllint']){const _0x2f178c=await this[_0x1cf86c(0x1d8)](_0x3c0fe7,_0x5da177);_0x1aa984[_0x1cf86c(0x1b7)](..._0x2f178c);}break;default:this['logger']?.['warn'](_0x1cf86c(0x1e0),{'filePath':_0x3c0fe7,'fileType':_0x124f59});return[];}return this[_0x1cf86c(0x1f3)](_0x1aa984);}async[a0_0x492102(0x19f)](_0x2dfd66,_0x4d06ea={}){const _0x25340e=a0_0x492102;try{const _0x36247a=await execAsync(_0x25340e(0x1ac)+_0x2dfd66+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0x43be32=JSON['parse'](_0x36247a['stdout']);return this[_0x25340e(0x1e4)](_0x43be32,_0x2dfd66);}catch(_0x2a39b7){if(_0x2a39b7[_0x25340e(0x1a1)])try{const _0x33ea90=JSON['parse'](_0x2a39b7[_0x25340e(0x1a1)]);return this['parseHadolintResults'](_0x33ea90,_0x2dfd66);}catch(_0x28cc49){this['logger']?.[_0x25340e(0x1f7)]('Failed\x20to\x20parse\x20hadolint\x20output',{'error':_0x28cc49['message']});}return this['logger']?.[_0x25340e(0x1f7)](_0x25340e(0x1b2),{'error':_0x2a39b7[_0x25340e(0x1cd)]}),[];}}['parseHadolintResults'](_0x4dd37c,_0x4e88c6){const _0x394ec2=a0_0x492102,_0x26baf6=[];if(Array[_0x394ec2(0x17f)](_0x4dd37c))for(const _0x155e7a of _0x4dd37c){_0x26baf6[_0x394ec2(0x1b7)]({'file':_0x4e88c6,'line':_0x155e7a[_0x394ec2(0x19c)]||0x1,'column':_0x155e7a['column']||0x1,'severity':this[_0x394ec2(0x1da)](_0x155e7a['level']),'rule':_0x155e7a['code'],'message':_0x155e7a['message'],'category':_0x394ec2(0x1fa),'validator':_0x394ec2(0x1ec)});}return _0x26baf6;}async['validateYAML'](_0xca43e6,_0x1fb700={}){const _0x4922f8=a0_0x492102;try{const _0x4fbac1=await execAsync(_0x4922f8(0x197)+_0xca43e6+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530});return this[_0x4922f8(0x1c8)](_0x4fbac1['stdout'],_0xca43e6);}catch(_0xdae334){if(_0xdae334['stdout'])return this['parseYamllintResults'](_0xdae334['stdout'],_0xca43e6);return this['logger']?.[_0x4922f8(0x1f7)](_0x4922f8(0x1a2),{'error':_0xdae334['message']}),[];}}[a0_0x492102(0x1c8)](_0x18505c,_0x14360a){const _0x4f5bf0=a0_0x492102,_0x4c9a9e=[],_0x2adacd=_0x18505c['split']('\x0a')['filter'](_0x2094d6=>_0x2094d6[_0x4f5bf0(0x1de)]());for(const _0x33f835 of _0x2adacd){const _0x40eef9=_0x33f835['match'](/^(.+?):(\d+):(\d+):\s*\[(\w+)\]\s*(.+?)\s*\((.+?)\)/);if(_0x40eef9){const [,_0x2f7d84,_0xd34b7f,_0x59df02,_0x4d5dcc,_0x580d70,_0x2c8b6e]=_0x40eef9;_0x4c9a9e['push']({'file':_0x14360a,'line':parseInt(_0xd34b7f,0xa),'column':parseInt(_0x59df02,0xa),'severity':this['mapYamllintSeverity'](_0x4d5dcc),'rule':_0x2c8b6e,'message':_0x580d70,'category':'yaml','validator':'yamllint'});}}return _0x4c9a9e;}async[a0_0x492102(0x1cc)](_0x4d7f7d,_0x56c5ef,_0x35ab11={}){const _0x3a14e7=a0_0x492102;try{const _0x1ce1a0=await execAsync('checkov\x20-f\x20\x22'+_0x4d7f7d+_0x3a14e7(0x1b3)+_0x56c5ef+'\x20--output\x20json\x20--compact',{'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0x251794=JSON[_0x3a14e7(0x1b0)](_0x1ce1a0[_0x3a14e7(0x1a1)]);return this[_0x3a14e7(0x1b5)](_0x251794,_0x4d7f7d);}catch(_0x44a675){if(_0x44a675[_0x3a14e7(0x1a1)])try{const _0x39e841=JSON['parse'](_0x44a675['stdout']);return this['parseCheckovResults'](_0x39e841,_0x4d7f7d);}catch(_0x59602b){this[_0x3a14e7(0x189)]?.[_0x3a14e7(0x1f7)]('Failed\x20to\x20parse\x20checkov\x20output',{'error':_0x59602b['message']});}return this['logger']?.['error'](_0x3a14e7(0x188),{'error':_0x44a675[_0x3a14e7(0x1cd)]}),[];}}['parseCheckovResults'](_0x84e899,_0x54410f){const _0x23472b=a0_0x492102,_0x28b0e2=[];if(_0x84e899[_0x23472b(0x1ba)]&&_0x84e899['results']['failed_checks'])for(const _0x429403 of _0x84e899[_0x23472b(0x1ba)][_0x23472b(0x185)]){_0x28b0e2[_0x23472b(0x1b7)]({'file':_0x54410f,'line':_0x429403['file_line_range']?_0x429403[_0x23472b(0x1bf)][0x0]:0x1,'column':0x1,'severity':this[_0x23472b(0x19e)](_0x429403[_0x23472b(0x1fb)]),'rule':_0x429403[_0x23472b(0x1a4)],'message':_0x429403['check_name']||_0x429403['check_id'],'category':'security','validator':'checkov','remediation':_0x429403['guideline'],'cwe':_0x429403[_0x23472b(0x180)],'references':_0x429403['guideline']?[_0x429403['guideline']]:[]});}return _0x28b0e2;}async[a0_0x492102(0x1b8)](_0x4eaafd,_0x3da684={}){const _0x587e7b=a0_0x492102;try{const _0x5a4f14=(await import('ajv'))['default'],_0x1163df=(await import(_0x587e7b(0x1a0)))['default'],_0x2796a4=await a0_0x314b12['readFile'](_0x4eaafd,'utf-8'),_0xd51720=JSON[_0x587e7b(0x1b0)](_0x2796a4),_0x4d6d95=new _0x5a4f14({'allErrors':!![],'strict':![]});_0x1163df(_0x4d6d95);const _0xd18d64={'type':_0x587e7b(0x1b6),'required':['name',_0x587e7b(0x1d3)],'properties':{'name':{'type':'string','pattern':'^(?:@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$'},'version':{'type':'string'},'description':{'type':_0x587e7b(0x1ca)},'main':{'type':'string'},'type':{'type':_0x587e7b(0x1ca),'enum':['module',_0x587e7b(0x1df)]},'scripts':{'type':'object'},'dependencies':{'type':'object'},'devDependencies':{'type':_0x587e7b(0x1b6)}},'additionalProperties':!![]},_0x4b5740=_0x4d6d95['compile'](_0xd18d64),_0x56529d=_0x4b5740(_0xd51720);if(!_0x56529d&&_0x4b5740[_0x587e7b(0x18d)])return _0x4b5740['errors'][_0x587e7b(0x1e6)](_0xf675f3=>({'file':_0x4eaafd,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x587e7b(0x1e1)][_0x587e7b(0x1bc)],'rule':'json-schema','message':_0xf675f3[_0x587e7b(0x18e)]?_0xf675f3['instancePath']+'\x20'+_0xf675f3[_0x587e7b(0x1cd)]:_0x587e7b(0x1b1)+_0xf675f3['params']['missingProperty']+'\x27','category':'validation','validator':'json-schema'}));return[];}catch(_0x33b43f){return this[_0x587e7b(0x189)]?.[_0x587e7b(0x1f7)]('package.json\x20validation\x20failed',{'error':_0x33b43f[_0x587e7b(0x1cd)]}),[{'file':_0x4eaafd,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x587e7b(0x1e1)][_0x587e7b(0x1bc)],'rule':'json-parse','message':'Invalid\x20JSON:\x20'+_0x33b43f['message'],'category':'syntax','validator':_0x587e7b(0x1f2)}];}}async['validateTsConfig'](_0x43e66,_0x799486={}){const _0x187a8a=a0_0x492102;try{const _0x37b472=await a0_0x314b12[_0x187a8a(0x1e9)](_0x43e66,_0x187a8a(0x194)),_0x21d32e=JSON[_0x187a8a(0x1b0)](_0x37b472),_0x3e8145=[];if(_0x21d32e[_0x187a8a(0x1ce)]){const _0x5b90d2=_0x21d32e['compilerOptions'];!_0x5b90d2[_0x187a8a(0x1eb)]&&_0x3e8145[_0x187a8a(0x1b7)]({'file':_0x43e66,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':'strict-mode','message':_0x187a8a(0x198),'category':'best-practice','validator':_0x187a8a(0x18b)}),_0x5b90d2[_0x187a8a(0x1bd)]===![]&&_0x3e8145[_0x187a8a(0x1b7)]({'file':_0x43e66,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x187a8a(0x1db)],'rule':_0x187a8a(0x191),'message':_0x187a8a(0x192),'category':_0x187a8a(0x1e3),'validator':_0x187a8a(0x18b)});}return _0x3e8145;}catch(_0x40c52f){return this['logger']?.['error'](_0x187a8a(0x1d5),{'error':_0x40c52f[_0x187a8a(0x1cd)]}),[{'file':_0x43e66,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x187a8a(0x1e1)]['ERROR'],'rule':'json-parse','message':'Invalid\x20JSON:\x20'+_0x40c52f[_0x187a8a(0x1cd)],'category':'syntax','validator':'json-parse'}];}}async['validateEnvFile'](_0x4b5886,_0x18176f={}){const _0x237f64=a0_0x492102;try{const _0x2f35cc=await a0_0x314b12[_0x237f64(0x1e9)](_0x4b5886,_0x237f64(0x194)),_0x11fd19=[],_0x5b5d22=_0x2f35cc[_0x237f64(0x1f1)]('\x0a'),_0xf65eb2=[{'pattern':/password|passwd|pwd/i,'name':_0x237f64(0x195)},{'pattern':/api[_-]?key/i,'name':_0x237f64(0x1c6)},{'pattern':/secret/i,'name':'secret'},{'pattern':/token/i,'name':'token'},{'pattern':/private[_-]?key/i,'name':'private\x20key'},{'pattern':/aws[_-]?access/i,'name':'AWS\x20credentials'}];return _0x5b5d22['forEach']((_0x13512a,_0x1c1cbe)=>{const _0x194349=_0x237f64,_0x1dbf3e=_0x13512a['trim']();if(!_0x1dbf3e||_0x1dbf3e[_0x194349(0x18a)]('#'))return;if(_0x1dbf3e[_0x194349(0x1c9)]('=')){const [_0x5db285,_0x452546]=_0x1dbf3e[_0x194349(0x1f1)]('='),_0x2aae29=_0x5db285[_0x194349(0x1fd)](),_0x5b9d61=_0x452546?.[_0x194349(0x1de)]()||'',_0x396b89=_0x5b9d61&&_0x5b9d61!==''&&!_0x5b9d61['startsWith']('$')&&_0x5b9d61!=='your-key-here'&&_0x5b9d61!=='changeme'&&_0x5b9d61[_0x194349(0x1ee)]>0x5;if(_0x396b89)for(const {pattern:_0x1d1b22,name:_0x15f77d}of _0xf65eb2){if(_0x1d1b22[_0x194349(0x1a8)](_0x2aae29)){_0x11fd19['push']({'file':_0x4b5886,'line':_0x1c1cbe+0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x194349(0x1e1)]['CRITICAL'],'rule':_0x194349(0x19d),'message':'Potential\x20hardcoded\x20'+_0x15f77d+'\x20detected\x20in\x20.env\x20file','category':_0x194349(0x18c),'validator':'env-validator','remediation':'Use\x20environment-specific\x20.env\x20files\x20and\x20add\x20.env\x20to\x20.gitignore'});break;}}}}),_0x11fd19;}catch(_0x32688e){return this['logger']?.[_0x237f64(0x1f7)](_0x237f64(0x1f0),{'error':_0x32688e['message']}),[];}}['detectFileType'](_0xd92638){const _0x147d52=a0_0x492102,_0x21a1c6=a0_0x1c908d[_0x147d52(0x1d9)](_0xd92638)['toLowerCase'](),_0x5826ae=a0_0x1c908d['dirname'](_0xd92638);if(_0x21a1c6==='dockerfile')return _0x147d52(0x1fa);if(_0x21a1c6==='docker-compose.yml'||_0x21a1c6===_0x147d52(0x1cf))return'docker-compose';if(_0x21a1c6==='package.json')return'package.json';if(_0x21a1c6==='tsconfig.json')return _0x147d52(0x1d2);if(_0x21a1c6===_0x147d52(0x1ab)||_0x21a1c6[_0x147d52(0x186)]('.env'))return _0x147d52(0x1c1);if(_0x5826ae[_0x147d52(0x1c9)](_0x147d52(0x1a6)))return'github-actions';if(_0x5826ae[_0x147d52(0x1c9)]('kubernetes')||_0x5826ae[_0x147d52(0x1c9)]('k8s'))return'kubernetes';const _0x24d1f9=a0_0x1c908d[_0x147d52(0x1a5)](_0xd92638)['toLowerCase']();if(_0x24d1f9===_0x147d52(0x1dd)||_0x24d1f9==='.tfvars')return _0x147d52(0x1d7);if(_0x24d1f9===_0x147d52(0x19a)||_0x24d1f9==='.yaml')return _0x147d52(0x1af);if(_0x24d1f9==='.json')return'json';return'unknown';}['normalizeResults'](_0x765061){const _0x312d4a=a0_0x492102;return _0x765061['map'](_0x36617c=>({'file':_0x36617c['file'],'line':_0x36617c[_0x312d4a(0x19c)]||0x1,'column':_0x36617c[_0x312d4a(0x1d0)]||0x1,'severity':_0x36617c['severity']||STATIC_ANALYSIS[_0x312d4a(0x1e1)][_0x312d4a(0x1db)],'rule':_0x36617c[_0x312d4a(0x1c3)]||'unknown','message':_0x36617c[_0x312d4a(0x1cd)]||_0x312d4a(0x1d1),'category':_0x36617c[_0x312d4a(0x183)]||'validation','validator':_0x36617c['validator'],'cwe':_0x36617c[_0x312d4a(0x180)]||null,'remediation':_0x36617c['remediation']||null,'references':_0x36617c[_0x312d4a(0x1bb)]||[]}));}['mapHadolintSeverity'](_0x3b73f8){const _0xc0e4cb=a0_0x492102,_0x358e2a={'error':STATIC_ANALYSIS['SEVERITY'][_0xc0e4cb(0x1bc)],'warning':STATIC_ANALYSIS[_0xc0e4cb(0x1e1)][_0xc0e4cb(0x1db)],'info':STATIC_ANALYSIS['SEVERITY'][_0xc0e4cb(0x1ed)],'style':STATIC_ANALYSIS[_0xc0e4cb(0x1e1)][_0xc0e4cb(0x1ed)]};return _0x358e2a[_0x3b73f8?.['toLowerCase']()]||STATIC_ANALYSIS['SEVERITY']['WARNING'];}['mapYamllintSeverity'](_0x3621bc){const _0x182bdb=a0_0x492102,_0x44d05a={'error':STATIC_ANALYSIS['SEVERITY'][_0x182bdb(0x1bc)],'warning':STATIC_ANALYSIS[_0x182bdb(0x1e1)][_0x182bdb(0x1db)]};return _0x44d05a[_0x3621bc?.[_0x182bdb(0x1fd)]()]||STATIC_ANALYSIS[_0x182bdb(0x1e1)][_0x182bdb(0x1db)];}['mapCheckovSeverity'](_0xe79726){const _0x38269d=a0_0x492102;return STATIC_ANALYSIS['SEVERITY'][_0x38269d(0x1bc)];}async[a0_0x492102(0x1e2)](){const _0x6981f6=a0_0x492102,_0x19eaf8=await this['detectAvailableValidators']();return{'validators':_0x19eaf8,'recommendations':this[_0x6981f6(0x1b9)](_0x19eaf8)};}['getInstallRecommendations'](_0x5057a9){const _0x43afed=a0_0x492102,_0x3022e3=[];return!_0x5057a9['checkov']&&_0x3022e3[_0x43afed(0x1b7)]({'validator':'checkov','reason':_0x43afed(0x1c2),'install':_0x43afed(0x19b),'priority':'high'}),!_0x5057a9[_0x43afed(0x1ec)]&&_0x3022e3['push']({'validator':'hadolint','reason':_0x43afed(0x1a9),'install':'Download from https://github.com/hadolint/hadolint/releases','priority':'high'}),!_0x5057a9[_0x43afed(0x1a3)]&&_0x3022e3['push']({'validator':_0x43afed(0x1a3),'reason':'YAML\x20file\x20validation','install':_0x43afed(0x182),'priority':_0x43afed(0x1e5)}),!_0x5057a9['jsonSchema']&&_0x3022e3[_0x43afed(0x1b7)]({'validator':_0x43afed(0x196),'reason':_0x43afed(0x1ae),'install':'npm\x20install\x20ajv\x20ajv-formats','priority':_0x43afed(0x1e5)}),_0x3022e3;}}function a0_0x41a0(){const _0x14170a=['sLnptIbJB25MAwD1CMf0Aw9UihzHBgLKyxrPB24','EwfTBa','CgfYC2u','BxvZDcbOyxzLihjLCxvPCMvKihbYB3bLCNr5icC','AgfKB2XPBNqGDMfSAwrHDgLVBIbMywLSzwq','iIaTlwzYyw1LD29YAYa','mtuWndG5mwffrxzYDq','CgfYC2vdAgvJA292uMvZDwX0CW','B2jQzwn0','ChvZAa','DMfSAwrHDgvqywnRywDLsNnVBG','z2v0sw5ZDgfSBfjLy29TBwvUzgf0Aw9UCW','CMvZDwX0CW','CMvMzxjLBMnLCW','rvjst1i','BM9jBxbSAwnPDefUEq','nMfbtxvcqq','zMLSzv9SAw5Lx3jHBMDL','mti2mdHJuLrLEgS','zw52','sw5MCMfZDhj1y3r1CMuGyxmGq29KzsbZzwn1CML0EsbZy2fUBMLUzYaOrg9JA2vYlcblDwjLCM5LDgvZlcbuzxjYywzVCM0P','CNvSzq','C2nHBM5LCKnHy2HL','y2HLy2TVDG','qvbjigTLEq','zgv0zwn0qxzHAwXHyMXLvMfSAwrHDg9YCW','CgfYC2vzyw1SBgLUDfjLC3vSDhm','Aw5JBhvKzxm','C3rYAw5N','AgfKB2XPBNqGBM90igf2ywLSywjSzq','DMfSAwrHDgvxAxrOq2HLy2TVDG','BwvZC2fNzq','y29TCgLSzxjpChrPB25Z','zg9JA2vYlwnVBxbVC2uUEwfTBa','y29SDw1U','vMfSAwrHDgLVBIbPC3n1zsbKzxrLy3rLza','DhnJB25MAwCUANnVBG','DMvYC2LVBG','ndC3mtK0ne1is0fvDa','DhnJB25MAwCUANnVBIb2ywXPzgf0Aw9UigzHAwXLza','zgvIDwC','DgvYCMfMB3jT','DMfSAwrHDgvzqu1m','yMfZzw5HBwu','BwfWsgfKB2XPBNrtzxzLCML0Eq','v0fstKLorW','nte2mZuYu1POwMDj','lNrM','DhjPBq','y29TBw9UANm','vw5RBM93BIbJB25MAwCGzMLSzsb0ExbL','u0vwrvjjvfK','z2v0vMfSAwrHDg9Yu3rHDhvZ','yMvZDc1WCMfJDgLJzq','CgfYC2viywrVBgLUDfjLC3vSDhm','BwvKAxvT','BwfW','EwfTBgXPBNqGBM90igf2ywLSywjSzq','EwfTBgXPBNqGzgv0zwn0zwq','CMvHzezPBgu','mZbjEeriCxq','C3rYAwn0','AgfKB2XPBNq','su5gtW','BgvUz3rO','nJC5ntjev3foB1K','lMvUDIb2ywXPzgf0Aw9UigzHAwXLza','C3bSAxq','ANnVBI1WyxjZzq','BM9YBwfSAxPLuMvZDwX0CW','A3vIzxjUzxrLCW','mZbhtK1JzwC','yxzHAwXHyMXLu2nHBM5LCNm','zxjYB3i','z2L0AhvIlwfJDgLVBNm','ywP2','zg9JA2vYzMLSzq','y2HLy2TFy2XHC3m','zg9JA2vYx2nVBxbVC2u','Dg9mB3DLCKnHC2u','AxnbCNjHEq','y3DL','mteWnJq5mhLcBuvntq','CgLWigLUC3rHBgWGEwfTBgXPBNq','y2f0zwDVCNK','mtnytLniy2W','zMfPBgvKx2nOzwnRCW','zw5KC1DPDgG','AgfKB2XPBNqGzgv0zwn0zwq','y2HLy2TVDIb2ywXPzgf0Aw9UigzHAwXLza','Bg9Nz2vY','C3rHCNrZv2L0Aa','DhnJB25MAwCTDMfSAwrHDg9Y','C2vJDxjPDhK','zxjYB3jZ','Aw5ZDgfUy2vqyxrO','y2HLy2TVDIbKzxrLy3rLza','DMfSAwrHDgu','BM8TAw1WBgLJAxqTyw55','rgLZywjSAw5Nig5Vsw1WBgLJAxrbBNKGCMvKDwnLCYb0ExbLihnHzMv0Eq','ota0ode3oxvOy2L5tW','DxrMltG','CgfZC3DVCMq','ywP2icHku09oifnJAgvTysK','EwfTBgXPBNqGlwyGCgfYC2fIBguGiG','q29UC2LKzxiGzw5HyMXPBMCGiNn0CMLJDciGBw9KzsbMB3iGyMv0DgvYihr5CguGC2fMzxr5','mZC4BNnuEerg','lNLTBa','CgLWigLUC3rHBgWGy2HLy2TVDG','BgLUzq','AgfYzgnVzgvKlxnLy3jLDa','BwfWq2HLy2TVDLnLDMvYAxr5','DMfSAwrHDgveB2nRzxjMAwXL','ywP2lwzVCM1HDhm','C3rKB3v0','EwfTBgXPBNqGDMfSAwrHDgLVBIbMywLSzwq','EwfTBgXPBNq','y2HLy2TFAwq','zxH0BMfTzq','lMDPDgH1yI93B3jRzMXVD3m','zg9JA2vYlwnVBxbVC2u','DgvZDa','rg9JA2vYzMLSzsbSAw50Aw5NigfUzcbIzxn0ihbYywn0AwnLCW','sLnptIbty2HLBweGDMfSAwrHDgLVBIbHDMfPBgfIBgu','lMvUDG','AgfKB2XPBNqGls1MB3jTyxqGANnVBIaI','ntC5qxzkANrL'];a0_0x41a0=function(){return _0x14170a;};return a0_0x41a0();}export default ConfigValidator;
@@ -1 +1 @@
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;
1
+ const a0_0x13952d=a0_0x5b80;(function(_0x7cf9cf,_0x3fbef2){const _0x2605c5=a0_0x5b80,_0x3ef45c=_0x7cf9cf();while(!![]){try{const _0x214f46=parseInt(_0x2605c5(0xfb))/0x1+-parseInt(_0x2605c5(0x101))/0x2+-parseInt(_0x2605c5(0x108))/0x3*(-parseInt(_0x2605c5(0x102))/0x4)+-parseInt(_0x2605c5(0xf0))/0x5*(parseInt(_0x2605c5(0x115))/0x6)+parseInt(_0x2605c5(0x126))/0x7+-parseInt(_0x2605c5(0x106))/0x8*(parseInt(_0x2605c5(0x114))/0x9)+-parseInt(_0x2605c5(0x105))/0xa*(-parseInt(_0x2605c5(0x12b))/0xb);if(_0x214f46===_0x3fbef2)break;else _0x3ef45c['push'](_0x3ef45c['shift']());}catch(_0x488ac4){_0x3ef45c['push'](_0x3ef45c['shift']());}}}(a0_0x404e,0x4d414));import{ESLint}from'eslint';import a0_0x5b9297 from'path';import a0_0x5f1365 from'fs/promises';function a0_0x404e(){const _0x39c02c=['zgvZy3jPyMvdAgfUz2vZ','zML4ywjSzuvYCM9Yq291BNq','mta3ntCWneHNu1bRDa','mtmWodbSt3nUy1m','u0vdvvjjvfK','lMPZEa','mtbyBejuy1a','odG3ndq4reXgrfn4','zxjYB3jdB3vUDa','ndq3BMTku014','BgLUDfrLEhq','rvnmAw50igzPEcbMywLSzwq6ia','zM9YBwf0twvZC2fNzq','zw5Kq29SDw1U','q0furuDpuLK','B3v0Chv0','CgfYC2vYt3b0Aw9UCW','yMvZDc1WCMfJDgLJzxm','C3vWCg9YDhnbDxrVrML4','u1rzteu','C2v2zxjPDhK','ndvqv25hCfa','mZm0mJzXtMrgAwW','zxjYB3i','lMnQCW','ChvZAa','EhnZ','CNvSzuLK','ywnJzxnZ','rvnmAw50igzPEcbMywLSzwq','AM9PBG','lMvZBgLUDhjJlMnQCW','rM91BMqGrvnmAw50ignVBMzPzW','zgv0zwn0','BM8TDMfY','zwnTyuzLyxr1CMvZ','u0vwrvjjvfK','Bw9KAwzPzwq','su1qt1ju','mtGZnJmWm2vVtMPMDq','Bgf0zxn0','BM8TDw51C2vKlxzHCNm','ywrKzwq','y29SDw1U','nde0mdK2mxjlBefVrG','uevsrK9stufoq0u','lM1QCW','zgvIDwC','ndvSAw5Ks3q','BgvUz3rO','v0fstKLorW','z2v0rvnmAw50sw5ZDgfUy2u','Bg9Nz2vY','zML4','BgLUzq','D2fYBG','z2v0rvnmAw50q29UzMLN','BM8TDw5Kzwy','zMLSDgvY','mZmZmdCYBvn3CLzN','Aw5JBhvKzxm','C3bSAxq','B2zM'];a0_0x404e=function(){return _0x39c02c;};return a0_0x404e();}import{STATIC_ANALYSIS}from'../utilities/constants.js';function a0_0x5b80(_0x2e8bcc,_0x298974){_0x2e8bcc=_0x2e8bcc-0xef;const _0x404e2d=a0_0x404e();let _0x5b8001=_0x404e2d[_0x2e8bcc];if(a0_0x5b80['rXXrwi']===undefined){var _0x223b87=function(_0x23c695){const _0x2dab7e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5b9297='',_0x5f1365='';for(let _0xf321b4=0x0,_0x432991,_0xdeb779,_0x4ec96f=0x0;_0xdeb779=_0x23c695['charAt'](_0x4ec96f++);~_0xdeb779&&(_0x432991=_0xf321b4%0x4?_0x432991*0x40+_0xdeb779:_0xdeb779,_0xf321b4++%0x4)?_0x5b9297+=String['fromCharCode'](0xff&_0x432991>>(-0x2*_0xf321b4&0x6)):0x0){_0xdeb779=_0x2dab7e['indexOf'](_0xdeb779);}for(let _0x3394b1=0x0,_0x29f382=_0x5b9297['length'];_0x3394b1<_0x29f382;_0x3394b1++){_0x5f1365+='%'+('00'+_0x5b9297['charCodeAt'](_0x3394b1)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5f1365);};a0_0x5b80['cQaJlk']=_0x223b87,a0_0x5b80['UUtenA']={},a0_0x5b80['rXXrwi']=!![];}const _0x29943d=_0x404e2d[0x0],_0x2ff1f4=_0x2e8bcc+_0x29943d,_0x3f0efd=a0_0x5b80['UUtenA'][_0x2ff1f4];return!_0x3f0efd?(_0x5b8001=a0_0x5b80['cQaJlk'](_0x5b8001),a0_0x5b80['UUtenA'][_0x2ff1f4]=_0x5b8001):_0x5b8001=_0x3f0efd,_0x5b8001;}class ESLintAnalyzer{constructor(_0xf321b4=null){const _0x26f7d6=a0_0x5b80;this[_0x26f7d6(0xf4)]=_0xf321b4,this['eslintCache']=new Map();}async['analyze'](_0x432991,_0xdeb779,_0x4ec96f={}){const _0x5af320=a0_0x5b80;try{const _0x3394b1=await this[_0x5af320(0xf3)](_0x4ec96f),_0x29f382=await _0x3394b1[_0x5af320(0x109)](_0xdeb779,{'filePath':_0x432991,'warnIgnored':![]}),_0x40da32=[];if(_0x29f382&&_0x29f382['length']>0x0){const _0x4d7e52=_0x29f382[0x0];for(const _0x5aab28 of _0x4d7e52['messages']){_0x40da32[_0x5af320(0x118)](this['formatMessage'](_0x5aab28,_0x432991));}}return this['logger']?.['debug']('ESLint\x20analysis\x20completed',{'file':_0x432991,'totalDiagnostics':_0x40da32['length'],'errors':_0x40da32['filter'](_0x1ed12a=>_0x1ed12a['severity']===STATIC_ANALYSIS['SEVERITY']['ERROR'])['length'],'warnings':_0x40da32[_0x5af320(0xfa)](_0x170ab4=>_0x170ab4['severity']===STATIC_ANALYSIS[_0x5af320(0x123)]['WARNING'])['length']}),_0x40da32;}catch(_0x15f3ec){return this[_0x5af320(0xf4)]?.[_0x5af320(0x116)]('ESLint\x20analysis\x20failed',{'file':_0x432991,'error':_0x15f3ec['message']}),[];}}async[a0_0x13952d(0xf5)](_0x4f9307,_0x257cb0,_0x2c6a44={}){const _0x494fd0=a0_0x13952d;try{const _0x3e1cd8=await this[_0x494fd0(0xf3)]({..._0x2c6a44,'fix':!![]}),_0x2e4b2b=await _0x3e1cd8['lintText'](_0x257cb0,{'filePath':_0x4f9307,'warnIgnored':![]});if(_0x2e4b2b&&_0x2e4b2b[_0x494fd0(0xf1)]>0x0){const _0x24f87e=_0x2e4b2b[0x0];return{'fixed':_0x24f87e['output']!==undefined,'content':_0x24f87e[_0x494fd0(0x10e)]||_0x257cb0,'fixedCount':_0x24f87e[_0x494fd0(0x100)]+_0x24f87e['fixableWarningCount'],'remainingErrors':_0x24f87e[_0x494fd0(0x107)]-_0x24f87e[_0x494fd0(0x100)],'remainingWarnings':_0x24f87e['warningCount']-_0x24f87e['fixableWarningCount'],'changes':_0x24f87e['output']?this[_0x494fd0(0xff)](_0x257cb0,_0x24f87e['output']):[]};}return{'fixed':![],'content':_0x257cb0,'fixedCount':0x0,'remainingErrors':0x0,'remainingWarnings':0x0,'changes':[]};}catch(_0xfec8b7){this[_0x494fd0(0xf4)]?.['error'](_0x494fd0(0x11c),{'file':_0x4f9307,'error':_0xfec8b7['message']});throw new Error(_0x494fd0(0x10a)+_0xfec8b7['message']);}}async[a0_0x13952d(0xf3)](_0x3b8905={}){const _0x1d7f84=a0_0x13952d,{workingDir:_0x4459e0,fix:fix=![],framework:_0x173a18}=_0x3b8905,_0x58ad94=await this[_0x1d7f84(0xf8)](_0x4459e0,_0x173a18),_0x207c91=new ESLint({'fix':fix,'useEslintrc':!![],'overrideConfig':_0x58ad94,'errorOnUnmatchedPattern':![]});return _0x207c91;}async['getESLintConfig'](_0x47fa37,_0x2fb8bb){const _0x4c8dc7=a0_0x13952d,_0x28b283={'env':{'browser':!![],'es2021':!![],'node':!![]},'parserOptions':{'ecmaVersion':_0x4c8dc7(0x127),'sourceType':'module'},'rules':{'no-unused-vars':'warn','no-undef':_0x4c8dc7(0x116),'no-console':_0x4c8dc7(0xfe),'semi':[_0x4c8dc7(0xf7),'always'],'quotes':['warn','single',{'avoidEscape':!![]}]}};if(_0x2fb8bb==='react')_0x28b283['extends']=['eslint:recommended'],_0x28b283[_0x4c8dc7(0x10f)][_0x4c8dc7(0x122)]={'jsx':!![]},_0x28b283['settings']={'react':{'version':_0x4c8dc7(0x120)}};else _0x2fb8bb==='vue'?_0x28b283['extends']=['eslint:recommended']:_0x28b283['extends']=['eslint:recommended'];if(_0x47fa37){const _0x42745f=['.eslintrc.js',_0x4c8dc7(0x11e),'.eslintrc.json','eslint.config.js'];for(const _0x19353a of _0x42745f){try{const _0x2086d6=a0_0x5b9297[_0x4c8dc7(0x11d)](_0x47fa37,_0x19353a);return await a0_0x5f1365[_0x4c8dc7(0x11b)](_0x2086d6),this[_0x4c8dc7(0xf4)]?.[_0x4c8dc7(0xef)](_0x4c8dc7(0x11f),{'configFile':_0x19353a}),{};}catch{}}}return _0x28b283;}[a0_0x13952d(0x10b)](_0x245233,_0x16aec8){const _0x248079=a0_0x13952d;return{'file':_0x16aec8,'line':_0x245233[_0x248079(0xf6)]||0x1,'column':_0x245233[_0x248079(0x12a)]||0x1,'endLine':_0x245233['endLine'],'endColumn':_0x245233[_0x248079(0x10c)],'severity':_0x245233[_0x248079(0x113)]===0x2?STATIC_ANALYSIS['SEVERITY']['ERROR']:STATIC_ANALYSIS['SEVERITY'][_0x248079(0xf2)],'rule':_0x245233[_0x248079(0x11a)]||'eslint','message':_0x245233['message'],'category':this['categorizeRule'](_0x245233[_0x248079(0x11a)]),'fixable':_0x245233['fix']!==undefined,'source':'eslint'};}['categorizeRule'](_0x42073f){const _0x3bdba9=a0_0x13952d;if(!_0x42073f)return STATIC_ANALYSIS[_0x3bdba9(0x10d)][_0x3bdba9(0x112)];if(_0x42073f['includes']('security')||_0x42073f['includes'](_0x3bdba9(0x119))||_0x42073f==='no-eval'||_0x42073f==='no-implied-eval')return STATIC_ANALYSIS['CATEGORY'][_0x3bdba9(0x103)];if(_0x42073f['includes']('performance')||_0x42073f==='no-await-in-loop'||_0x42073f==='prefer-promise-reject-errors')return STATIC_ANALYSIS[_0x3bdba9(0x10d)][_0x3bdba9(0x12c)];if(_0x42073f[_0x3bdba9(0xfc)]('import')||_0x42073f===_0x3bdba9(0xf9))return STATIC_ANALYSIS['CATEGORY'][_0x3bdba9(0x125)];if(_0x42073f['includes'](_0x3bdba9(0x110))||_0x42073f===_0x3bdba9(0x128)||_0x42073f==='no-unreachable'||_0x42073f===_0x3bdba9(0x121))return STATIC_ANALYSIS['CATEGORY']['BEST_PRACTICE'];return STATIC_ANALYSIS[_0x3bdba9(0x10d)]['STYLE'];}['describeChanges'](_0x4d5080,_0x3660e4){const _0x1308ff=a0_0x13952d,_0x45ecb3=[],_0x51d216=_0x4d5080['split']('\x0a'),_0x88802a=_0x3660e4[_0x1308ff(0xfd)]('\x0a'),_0x2e1926=Math['max'](_0x51d216['length'],_0x88802a['length']);for(let _0x319493=0x0;_0x319493<_0x2e1926;_0x319493++){const _0x360627=_0x51d216[_0x319493]||'',_0x4ab303=_0x88802a[_0x319493]||'';_0x360627!==_0x4ab303&&_0x45ecb3['push']({'line':_0x319493+0x1,'type':_0x360627&&_0x4ab303?_0x1308ff(0x124):_0x360627?'removed':_0x1308ff(0x129),'original':_0x360627,'fixed':_0x4ab303});}return _0x45ecb3;}['getSupportedExtensions'](){const _0x32a0b5=a0_0x13952d;return['.js',_0x32a0b5(0x104),_0x32a0b5(0x12d),_0x32a0b5(0x117)];}[a0_0x13952d(0x111)](){return!![];}}export default ESLintAnalyzer;