@loxia-labs/loxia-autopilot-one 1.0.10 → 1.0.12

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 (121) hide show
  1. package/README.md +2 -2
  2. package/bin/cli.js +1 -1
  3. package/bin/loxia-terminal-v2.js +1 -1
  4. package/bin/loxia-terminal.js +1 -1
  5. package/bin/start-with-terminal.js +1 -1
  6. package/package.json +1 -1
  7. package/scripts/install-scanners.js +1 -1
  8. package/src/analyzers/CSSAnalyzer.js +1 -1
  9. package/src/analyzers/ConfigValidator.js +1 -1
  10. package/src/analyzers/ESLintAnalyzer.js +1 -1
  11. package/src/analyzers/JavaScriptAnalyzer.js +1 -1
  12. package/src/analyzers/PrettierFormatter.js +1 -1
  13. package/src/analyzers/PythonAnalyzer.js +1 -1
  14. package/src/analyzers/SecurityAnalyzer.js +1 -1
  15. package/src/analyzers/TypeScriptAnalyzer.js +1 -1
  16. package/src/analyzers/codeCloneDetector/analyzer.js +1 -1
  17. package/src/analyzers/codeCloneDetector/detector.js +1 -1
  18. package/src/analyzers/codeCloneDetector/index.js +1 -1
  19. package/src/analyzers/codeCloneDetector/parser.js +1 -1
  20. package/src/analyzers/codeCloneDetector/reporter.js +1 -1
  21. package/src/analyzers/codeCloneDetector/scanner.js +1 -1
  22. package/src/core/agentPool.js +1 -1
  23. package/src/core/agentScheduler.js +1 -1
  24. package/src/core/contextManager.js +1 -1
  25. package/src/core/messageProcessor.js +1 -1
  26. package/src/core/orchestrator.js +1 -1
  27. package/src/core/stateManager.js +1 -1
  28. package/src/index.js +1 -1
  29. package/src/interfaces/cli.js +1 -1
  30. package/src/interfaces/terminal/__tests__/smoke/advancedFeatures.test.js +1 -1
  31. package/src/interfaces/terminal/__tests__/smoke/agentControl.test.js +1 -1
  32. package/src/interfaces/terminal/__tests__/smoke/agents.test.js +1 -1
  33. package/src/interfaces/terminal/__tests__/smoke/components.test.js +1 -1
  34. package/src/interfaces/terminal/__tests__/smoke/connection.test.js +1 -1
  35. package/src/interfaces/terminal/__tests__/smoke/enhancements.test.js +1 -1
  36. package/src/interfaces/terminal/__tests__/smoke/imports.test.js +1 -1
  37. package/src/interfaces/terminal/__tests__/smoke/messages.test.js +1 -1
  38. package/src/interfaces/terminal/__tests__/smoke/tools.test.js +1 -1
  39. package/src/interfaces/terminal/api/apiClient.js +1 -1
  40. package/src/interfaces/terminal/api/messageRouter.js +1 -1
  41. package/src/interfaces/terminal/api/session.js +1 -1
  42. package/src/interfaces/terminal/api/websocket.js +1 -1
  43. package/src/interfaces/terminal/components/AgentCreator.js +1 -1
  44. package/src/interfaces/terminal/components/AgentEditor.js +1 -1
  45. package/src/interfaces/terminal/components/AgentSwitcher.js +1 -1
  46. package/src/interfaces/terminal/components/ErrorBoundary.js +1 -1
  47. package/src/interfaces/terminal/components/ErrorPanel.js +1 -1
  48. package/src/interfaces/terminal/components/Header.js +1 -1
  49. package/src/interfaces/terminal/components/HelpPanel.js +1 -1
  50. package/src/interfaces/terminal/components/InputBox.js +1 -1
  51. package/src/interfaces/terminal/components/Layout.js +1 -1
  52. package/src/interfaces/terminal/components/LoadingSpinner.js +1 -1
  53. package/src/interfaces/terminal/components/MessageList.js +1 -1
  54. package/src/interfaces/terminal/components/MultilineTextInput.js +1 -1
  55. package/src/interfaces/terminal/components/SearchPanel.js +1 -1
  56. package/src/interfaces/terminal/components/SettingsPanel.js +1 -1
  57. package/src/interfaces/terminal/components/StatusBar.js +1 -1
  58. package/src/interfaces/terminal/components/TextInput.js +1 -1
  59. package/src/interfaces/terminal/config/agentEditorConstants.js +1 -1
  60. package/src/interfaces/terminal/config/constants.js +1 -1
  61. package/src/interfaces/terminal/index.js +1 -1
  62. package/src/interfaces/terminal/state/useAgentControl.js +1 -1
  63. package/src/interfaces/terminal/state/useAgents.js +1 -1
  64. package/src/interfaces/terminal/state/useConnection.js +1 -1
  65. package/src/interfaces/terminal/state/useMessages.js +1 -1
  66. package/src/interfaces/terminal/state/useTools.js +1 -1
  67. package/src/interfaces/terminal/utils/debugLogger.js +1 -1
  68. package/src/interfaces/terminal/utils/settingsStorage.js +1 -1
  69. package/src/interfaces/terminal/utils/theme.js +1 -1
  70. package/src/interfaces/webServer.js +1 -1
  71. package/src/modules/fileExplorer/controller.js +1 -1
  72. package/src/modules/fileExplorer/index.js +1 -1
  73. package/src/modules/fileExplorer/middleware.js +1 -1
  74. package/src/modules/fileExplorer/routes.js +1 -1
  75. package/src/services/aiService.js +1 -1
  76. package/src/services/apiKeyManager.js +1 -1
  77. package/src/services/benchmarkService.js +1 -1
  78. package/src/services/budgetService.js +1 -1
  79. package/src/services/contextInjectionService.js +1 -1
  80. package/src/services/conversationCompactionService.js +1 -1
  81. package/src/services/errorHandler.js +1 -1
  82. package/src/services/fileAttachmentService.js +1 -1
  83. package/src/services/modelRouterService.js +1 -1
  84. package/src/services/modelsService.js +1 -1
  85. package/src/services/qualityInspector.js +1 -1
  86. package/src/services/tokenCountingService.js +1 -1
  87. package/src/tools/agentCommunicationTool.js +1 -1
  88. package/src/tools/agentDelayTool.js +1 -1
  89. package/src/tools/asyncToolManager.js +1 -1
  90. package/src/tools/baseTool.js +1 -1
  91. package/src/tools/browserTool.js +1 -1
  92. package/src/tools/cloneDetectionTool.js +1 -1
  93. package/src/tools/dependencyResolverTool.js +1 -1
  94. package/src/tools/fileContentReplaceTool.js +1 -1
  95. package/src/tools/fileSystemTool.js +1 -1
  96. package/src/tools/fileTreeTool.js +1 -1
  97. package/src/tools/imageTool.js +1 -1
  98. package/src/tools/importAnalyzerTool.js +1 -1
  99. package/src/tools/jobDoneTool.js +1 -1
  100. package/src/tools/seekTool.js +1 -1
  101. package/src/tools/staticAnalysisTool.js +1 -1
  102. package/src/tools/taskManagerTool.js +1 -1
  103. package/src/tools/terminalTool.js +1 -1
  104. package/src/tools/webTool.js +1 -1
  105. package/src/types/agent.js +1 -1
  106. package/src/types/contextReference.js +1 -1
  107. package/src/types/conversation.js +1 -1
  108. package/src/types/toolCommand.js +1 -1
  109. package/src/utilities/attachmentValidator.js +1 -1
  110. package/src/utilities/configManager.js +1 -1
  111. package/src/utilities/constants.js +1 -1
  112. package/src/utilities/directoryAccessManager.js +1 -1
  113. package/src/utilities/fileProcessor.js +1 -1
  114. package/src/utilities/logger.js +1 -1
  115. package/src/utilities/tagParser.js +1 -1
  116. package/src/utilities/toolConstants.js +1 -1
  117. package/src/utilities/userDataDir.js +1 -0
  118. package/web-ui/build/index.html +2 -2
  119. package/web-ui/build/static/{index-CoRE46V-.js → index-DXN850Y2.js} +78 -74
  120. package/web-ui/build/static/index-an-YRzUX.css +1 -0
  121. package/web-ui/build/static/index-P281Rusr.css +0 -1
package/README.md CHANGED
@@ -99,7 +99,7 @@ npm install -g @loxia-labs/loxia-autopilot-one
99
99
 
100
100
  ```bash
101
101
  loxia --version
102
- # Should display: Loxia Autopilot One v1.0.10
102
+ # Should display: Loxia Autopilot One v1.0.11
103
103
  ```
104
104
 
105
105
  ### 4. Create an API Key
@@ -368,7 +368,7 @@ Loxia automatically compacts long conversations to stay within token limits:
368
368
 
369
369
  ## 🛣️ Roadmap
370
370
 
371
- ### Current Version (1.0.10)
371
+ ### Current Version (1.0.11)
372
372
 
373
373
  - ✅ Multi-agent orchestration
374
374
  - ✅ 18+ specialized tools
package/bin/cli.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x121421=a0_0x533d;(function(_0x2bd853,_0x4dd01d){const _0x17aba0=a0_0x533d,_0x5da70f=_0x2bd853();while(!![]){try{const _0x5074cb=-parseInt(_0x17aba0(0xb3))/0x1+-parseInt(_0x17aba0(0x98))/0x2+-parseInt(_0x17aba0(0x9c))/0x3+-parseInt(_0x17aba0(0xa5))/0x4*(parseInt(_0x17aba0(0xb1))/0x5)+parseInt(_0x17aba0(0xaa))/0x6+-parseInt(_0x17aba0(0xc0))/0x7*(parseInt(_0x17aba0(0x8b))/0x8)+-parseInt(_0x17aba0(0xc3))/0x9*(-parseInt(_0x17aba0(0x95))/0xa);if(_0x5074cb===_0x4dd01d)break;else _0x5da70f['push'](_0x5da70f['shift']());}catch(_0x3a9de5){_0x5da70f['push'](_0x5da70f['shift']());}}}(a0_0x2668,0x5f60d));import{fileURLToPath}from'url';function a0_0x2668(){const _0x470a03=['1185050tECZhJ','Please\x20open\x20manually:\x20','startsWith','win32','2302812CbhFql','ignore','Loxia\x20Autopilot\x20One\x20v','\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.','log','port','kill','Waiting\x20for\x20server\x20to\x20start...','Checking\x20if\x20server\x20is\x20running...','523372yGTqcJ','\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI','version','SIGINT','destroy','3766686OpIvmg','env','argv','exit','xdg-open\x20\x22','length','ceil','15nFKBKP','utf8','237655hEvvBr','Error:','\x0aOpening\x20Web\x20UI\x20at\x20','Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.','localhost','Server\x20is\x20running\x20at\x20','start\x20\x22\x22\x20\x22','Starting\x20Loxia\x20server...\x0a','pid','parse','\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a','includes','setTimeout','497469RUsaeC','--host','\x0aServer\x20may\x20still\x20be\x20starting.\x20Open\x20','414awqIjQ','help',')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20','darwin','Starting\x20Loxia\x20server\x20in\x20background...','toString','loxia-terminal.js','unref','\x0aPlease\x20start\x20the\x20server\x20first:','catch','Starting\x20Terminal\x20UI...\x0a','8MFkhWt','inherit','SIGTERM','host',')\x0a\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x20message\x0a\x20\x20-v,\x20--version\x20\x20\x20\x20\x20Show\x20version\x20number\x0a\x0aExamples:\x0a\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20open\x20browser\x0a\x20\x20loxia\x20terminal\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Connect\x20Terminal\x20UI\x20to\x20running\x20server\x0a\x20\x20loxia\x20plus-terminal\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a\x20\x20loxia\x20web\x20--port\x203000\x20\x20\x20\x20#\x20Use\x20custom\x20port\x0a\x0aQuick\x20Start:\x0a\x20\x201.\x20Run\x20\x27loxia\x20web\x27\x20to\x20start\x20with\x20Web\x20UI\x0a\x20\x202.\x20Or\x20run\x20\x27loxia\x20plus-terminal\x27\x20for\x20Terminal\x20UI\x20experience\x0a\x0aDocumentation:\x0a\x20\x20https://autopilot.loxia.ai\x0a\x0a','--version','\x0aShutting\x20down\x20server...','error','\x20manually.','--help','396580cTKqyb','package.json','\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'];a0_0x2668=function(){return _0x470a03;};return a0_0x2668();}import{dirname,join}from'path';import{spawn,exec}from'child_process';import{readFileSync}from'fs';import a0_0x1805c9 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x121421(0xb7),SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process[a0_0x121421(0xac)]['slice'](0x2),command=args[0x0]&&!args[0x0][a0_0x121421(0x9a)]('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args[a0_0x121421(0xbe)](a0_0x121421(0x94))||args[a0_0x121421(0xbe)]('-h'),'version':args[a0_0x121421(0xbe)](a0_0x121421(0x90))||args[a0_0x121421(0xbe)]('-v')};for(let i=0x0;i<args[a0_0x121421(0xaf)];i++){args[i]==='--port'&&args[i+0x1]&&(flags[a0_0x121421(0xa1)]=parseInt(args[i+0x1],0xa)),args[i]===a0_0x121421(0xc1)&&args[i+0x1]&&(flags['host']=args[i+0x1]);}function a0_0x533d(_0x4a6df9,_0xe35a22){_0x4a6df9=_0x4a6df9-0x83;const _0x2668df=a0_0x2668();let _0x533d7f=_0x2668df[_0x4a6df9];return _0x533d7f;}const port=flags[a0_0x121421(0xa1)]||DEFAULT_PORT,host=flags[a0_0x121421(0x8e)]||DEFAULT_HOST,serverUrl='http://'+host+':'+port;if(flags[a0_0x121421(0xa7)]){const pkgPath=join(__dirname,'..','package.json'),pkg=JSON[a0_0x121421(0xbc)](readFileSync(pkgPath,a0_0x121421(0xb2)));console['log'](a0_0x121421(0x9e)+pkg[a0_0x121421(0xa7)]),process['exit'](0x0);}if(flags[a0_0x121421(0xc4)]||!command){const pkgPath=join(__dirname,'..',a0_0x121421(0x96)),pkg=JSON[a0_0x121421(0xbc)](readFileSync(pkgPath,a0_0x121421(0xb2)));console[a0_0x121421(0xa0)]('\x0aLoxia\x20Autopilot\x20One\x20v'+pkg[a0_0x121421(0xa7)]+a0_0x121421(0x97)+DEFAULT_PORT+a0_0x121421(0xc5)+DEFAULT_HOST+a0_0x121421(0x8f)),process[a0_0x121421(0xad)](0x0);}async function checkServerRunning(_0xafbbc9,_0x290101,_0x3bad71=0x1){for(let _0x4eb6ea=0x0;_0x4eb6ea<_0x3bad71;_0x4eb6ea++){const _0x4f5050=await new Promise(_0x66b4f1=>{const _0x4fbbdb=a0_0x533d,_0x50ffbb=a0_0x1805c9['get']('http://'+_0xafbbc9+':'+_0x290101+'/api/health',_0x27b858=>{_0x66b4f1(_0x27b858['statusCode']===0xc8);});_0x50ffbb['on'](_0x4fbbdb(0x92),()=>_0x66b4f1(![])),_0x50ffbb[_0x4fbbdb(0xbf)](0x7d0,()=>{const _0xb1b894=_0x4fbbdb;_0x50ffbb[_0xb1b894(0xa9)](),_0x66b4f1(![]);});});if(_0x4f5050)return!![];_0x4eb6ea<_0x3bad71-0x1&&await new Promise(_0x137aa6=>setTimeout(_0x137aa6,SERVER_CHECK_INTERVAL));}return![];}async function waitForServer(_0x1b6be9,_0x3c27b2,_0x361439=SERVER_STARTUP_TIMEOUT){const _0xa02673=a0_0x121421,_0x477994=Math[_0xa02673(0xb0)](_0x361439/SERVER_CHECK_INTERVAL);return checkServerRunning(_0x1b6be9,_0x3c27b2,_0x477994);}function openBrowser(_0x3becef){const _0x5c299d=a0_0x121421,_0x15ec12=process['platform'];let _0x928030;if(_0x15ec12===_0x5c299d(0x83))_0x928030='open\x20\x22'+_0x3becef+'\x22';else _0x15ec12===_0x5c299d(0x9b)?_0x928030=_0x5c299d(0xb9)+_0x3becef+'\x22':_0x928030=_0x5c299d(0xae)+_0x3becef+'\x22';exec(_0x928030,_0x414f50=>{const _0x120875=_0x5c299d;_0x414f50&&(console[_0x120875(0xa0)]('Could\x20not\x20open\x20browser\x20automatically.'),console['log'](_0x120875(0x99)+_0x3becef));});}function startServer(_0x208e3e=![]){const _0x4ac1e2=a0_0x121421,_0x40f758={...process[_0x4ac1e2(0xab)],'LOXIA_PORT':port[_0x4ac1e2(0x85)](),'PORT':port[_0x4ac1e2(0x85)]()};flags[_0x4ac1e2(0x8e)]&&(_0x40f758['LOXIA_HOST']=flags['host']);const _0x516cc5=join(__dirname,'..','src','index.js'),_0x238ee3=spawn('node',[_0x516cc5],{'cwd':join(__dirname,'..'),'env':_0x40f758,'stdio':_0x208e3e?[_0x4ac1e2(0x9d),_0x4ac1e2(0x9d),_0x4ac1e2(0x9d)]:_0x4ac1e2(0x8c),'detached':_0x208e3e});return _0x208e3e&&_0x238ee3[_0x4ac1e2(0x87)](),_0x238ee3;}function startTerminalUI(){const _0x53012=a0_0x121421,_0x25735f=join(__dirname,_0x53012(0x86)),_0x4960c7={...process[_0x53012(0xab)],'LOXIA_PORT':port['toString'](),'LOXIA_HOST':host},_0x20a1d1=spawn('node',[_0x25735f],{'cwd':join(__dirname,'..'),'env':_0x4960c7,'stdio':_0x53012(0x8c)});return _0x20a1d1;}const commands={'web':async()=>{const _0x2003c0=a0_0x121421;console['log'](_0x2003c0(0xba));const _0x49917b=startServer(![]);console[_0x2003c0(0xa0)](_0x2003c0(0xa3));const _0x47f7a0=await waitForServer(host,port);_0x47f7a0?(console[_0x2003c0(0xa0)](_0x2003c0(0xb5)+serverUrl),openBrowser(serverUrl)):console[_0x2003c0(0xa0)](_0x2003c0(0xc2)+serverUrl+_0x2003c0(0x93)),process['on'](_0x2003c0(0xa8),()=>_0x49917b[_0x2003c0(0xa2)](_0x2003c0(0xa8))),process['on'](_0x2003c0(0x8d),()=>_0x49917b['kill']('SIGTERM')),_0x49917b['on'](_0x2003c0(0xad),_0x42ab96=>process[_0x2003c0(0xad)](_0x42ab96||0x0));},'plus-web':async()=>{await commands['web']();},'terminal':async()=>{const _0x2777bb=a0_0x121421;console[_0x2777bb(0xa0)](_0x2777bb(0xa4));const _0x55448d=await checkServerRunning(host,port);!_0x55448d&&(console[_0x2777bb(0x92)]('\x0aServer\x20is\x20not\x20running\x20at\x20'+serverUrl),console[_0x2777bb(0x92)](_0x2777bb(0x88)),console['error'](_0x2777bb(0xa6)),console[_0x2777bb(0x92)](_0x2777bb(0xbd)),process[_0x2777bb(0xad)](0x1));console['log'](_0x2777bb(0xb8)+serverUrl),console[_0x2777bb(0xa0)](_0x2777bb(0x8a));const _0x103323=startTerminalUI();process['on']('SIGINT',()=>_0x103323[_0x2777bb(0xa2)]('SIGINT')),process['on'](_0x2777bb(0x8d),()=>_0x103323['kill'](_0x2777bb(0x8d))),_0x103323['on']('exit',_0x41590f=>process[_0x2777bb(0xad)](_0x41590f||0x0));},'plus-terminal':async()=>{const _0x28492d=a0_0x121421;console[_0x28492d(0xa0)](_0x28492d(0x84));const _0x51140a=startServer(!![]),_0x5727db=await waitForServer(host,port);!_0x5727db&&(console[_0x28492d(0x92)](_0x28492d(0x9f)),process[_0x28492d(0xad)](0x1));console[_0x28492d(0xa0)]('Server\x20running\x20at\x20'+serverUrl),console[_0x28492d(0xa0)](_0x28492d(0x8a));const _0x2e1c83=startTerminalUI();_0x2e1c83['on']('exit',_0x494a7c=>{const _0x208c18=_0x28492d;console[_0x208c18(0xa0)](_0x208c18(0x91));try{process['kill'](_0x51140a[_0x208c18(0xbb)],'SIGTERM');}catch(_0x57f5da){}process[_0x208c18(0xad)](_0x494a7c||0x0);}),process['on'](_0x28492d(0xa8),()=>{const _0x4c3a1f=_0x28492d;_0x2e1c83['kill'](_0x4c3a1f(0xa8));}),process['on'](_0x28492d(0x8d),()=>{const _0x30b9db=_0x28492d;_0x2e1c83['kill'](_0x30b9db(0x8d));});}};commands[command]?commands[command]()[a0_0x121421(0x89)](_0x154dcb=>{const _0x4b3af7=a0_0x121421;console['error'](_0x4b3af7(0xb4),_0x154dcb['message']),process[_0x4b3af7(0xad)](0x1);}):(console[a0_0x121421(0x92)]('Unknown\x20command:\x20'+command),console[a0_0x121421(0x92)](a0_0x121421(0xb6)),process[a0_0x121421(0xad)](0x1));
3
+ function a0_0x1a37(){const _0x185d49=['35DveABh','node','Server\x20running\x20at\x20','port','error','Unknown\x20command:\x20','1842756hXvaCd','\x0aShutting\x20down\x20server...','SIGTERM','--port','env','\x0aLoxia\x20Autopilot\x20One\x20v','includes','Starting\x20Loxia\x20server...\x0a','startsWith','utf8','win32','host','catch','Waiting\x20for\x20server\x20to\x20start...','statusCode','SIGINT','open\x20\x22','1067304UylLrE','LOXIA_HOST','length',')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20','start\x20\x22\x22\x20\x22','\x0aOpening\x20Web\x20UI\x20at\x20','11QKDeek','argv','kill','--help','180495ekykSy','toString','--host','\x0aServer\x20may\x20still\x20be\x20starting.\x20Open\x20','\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI','Loxia\x20Autopilot\x20One\x20v','pid','Please\x20open\x20manually:\x20','log',')\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','14693990CpqMuo','Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.','Starting\x20Loxia\x20server\x20in\x20background...','129045tbJRbc','\x0aPlease\x20start\x20the\x20server\x20first:','Could\x20not\x20open\x20browser\x20automatically.','parse','36mfgFps','Checking\x20if\x20server\x20is\x20running...','/api/health','\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a','version','8669637eUIltg','54796MxaKst','setTimeout','Error:','ceil','ignore','Starting\x20Terminal\x20UI...\x0a','\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.','darwin','\x0aServer\x20is\x20not\x20running\x20at\x20','unref','exit','\x20-\x20AI\x20Agent\x20System\x0a\x0aUsage:\x0a\x20\x20loxia\x20<command>\x20[options]\x0a\x0aCommands:\x0a\x20\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20+\x20open\x20Web\x20UI\x20in\x20browser\x0a\x20\x20terminal\x20\x20\x20\x20\x20\x20\x20\x20Start\x20Terminal\x20UI\x20(server\x20must\x20be\x20running)\x0a\x20\x20plus-web\x20\x20\x20\x20\x20\x20\x20\x20Alias\x20for\x20\x27web\x27\x0a\x20\x20plus-terminal\x20\x20\x20Start\x20server\x20+\x20Terminal\x20UI\x20together\x0a\x0aOptions:\x0a\x20\x20--port\x20<number>\x20\x20\x20Specify\x20port\x20(default:\x20','help','loxia-terminal.js','--version','slice','web','localhost','10tPoXrK'];a0_0x1a37=function(){return _0x185d49;};return a0_0x1a37();}function a0_0x4243(_0x1ce742,_0x16bd46){_0x1ce742=_0x1ce742-0x6d;const _0x1a379e=a0_0x1a37();let _0x424357=_0x1a379e[_0x1ce742];return _0x424357;}const a0_0x7e0d73=a0_0x4243;(function(_0x2e2597,_0x40dea3){const _0x47548f=a0_0x4243,_0x556272=_0x2e2597();while(!![]){try{const _0x2d90f6=-parseInt(_0x47548f(0xae))/0x1*(parseInt(_0x47548f(0x75))/0x2)+parseInt(_0x47548f(0x97))/0x3+parseInt(_0x47548f(0x7c))/0x4+parseInt(_0x47548f(0xa4))/0x5*(parseInt(_0x47548f(0xa8))/0x6)+-parseInt(_0x47548f(0x76))/0x7*(-parseInt(_0x47548f(0x8d))/0x8)+parseInt(_0x47548f(0xad))/0x9+-parseInt(_0x47548f(0xa1))/0xa*(parseInt(_0x47548f(0x93))/0xb);if(_0x2d90f6===_0x40dea3)break;else _0x556272['push'](_0x556272['shift']());}catch(_0x5b8ad1){_0x556272['push'](_0x556272['shift']());}}}(a0_0x1a37,0x895ff));import{fileURLToPath}from'url';import{dirname,join}from'path';import{spawn,exec}from'child_process';import{readFileSync}from'fs';import a0_0x4ed263 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x7e0d73(0x74),SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process[a0_0x7e0d73(0x94)][a0_0x7e0d73(0x72)](0x2),command=args[0x0]&&!args[0x0][a0_0x7e0d73(0x84)]('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args[a0_0x7e0d73(0x82)](a0_0x7e0d73(0x96))||args[a0_0x7e0d73(0x82)]('-h'),'version':args[a0_0x7e0d73(0x82)](a0_0x7e0d73(0x71))||args[a0_0x7e0d73(0x82)]('-v')};for(let i=0x0;i<args[a0_0x7e0d73(0x8f)];i++){args[i]===a0_0x7e0d73(0x7f)&&args[i+0x1]&&(flags['port']=parseInt(args[i+0x1],0xa)),args[i]===a0_0x7e0d73(0x99)&&args[i+0x1]&&(flags[a0_0x7e0d73(0x87)]=args[i+0x1]);}const port=flags[a0_0x7e0d73(0x79)]||DEFAULT_PORT,host=flags[a0_0x7e0d73(0x87)]||DEFAULT_HOST,serverUrl='http://'+host+':'+port;if(flags[a0_0x7e0d73(0xac)]){const pkgPath=join(__dirname,'..','package.json'),pkg=JSON[a0_0x7e0d73(0xa7)](readFileSync(pkgPath,a0_0x7e0d73(0x85)));console[a0_0x7e0d73(0x9f)](a0_0x7e0d73(0x9c)+pkg[a0_0x7e0d73(0xac)]),process[a0_0x7e0d73(0x6d)](0x0);}if(flags[a0_0x7e0d73(0x6f)]||!command){const pkgPath=join(__dirname,'..','package.json'),pkg=JSON['parse'](readFileSync(pkgPath,a0_0x7e0d73(0x85)));console['log'](a0_0x7e0d73(0x81)+pkg['version']+a0_0x7e0d73(0x6e)+DEFAULT_PORT+a0_0x7e0d73(0x90)+DEFAULT_HOST+a0_0x7e0d73(0xa0)),process[a0_0x7e0d73(0x6d)](0x0);}async function checkServerRunning(_0x9b29b9,_0xba1ca,_0x32a9ff=0x1){for(let _0x51d055=0x0;_0x51d055<_0x32a9ff;_0x51d055++){const _0x338ffc=await new Promise(_0x33c7f8=>{const _0x239540=a0_0x4243,_0x2c9745=a0_0x4ed263['get']('http://'+_0x9b29b9+':'+_0xba1ca+_0x239540(0xaa),_0x34b01a=>{const _0x1e5772=_0x239540;_0x33c7f8(_0x34b01a[_0x1e5772(0x8a)]===0xc8);});_0x2c9745['on'](_0x239540(0x7a),()=>_0x33c7f8(![])),_0x2c9745[_0x239540(0xaf)](0x7d0,()=>{_0x2c9745['destroy'](),_0x33c7f8(![]);});});if(_0x338ffc)return!![];_0x51d055<_0x32a9ff-0x1&&await new Promise(_0x5e1efd=>setTimeout(_0x5e1efd,SERVER_CHECK_INTERVAL));}return![];}async function waitForServer(_0x467a2b,_0x56c1d9,_0x4d0b=SERVER_STARTUP_TIMEOUT){const _0x31b2bc=a0_0x7e0d73,_0x2b9c01=Math[_0x31b2bc(0xb1)](_0x4d0b/SERVER_CHECK_INTERVAL);return checkServerRunning(_0x467a2b,_0x56c1d9,_0x2b9c01);}function openBrowser(_0x1aa592){const _0x42f40d=a0_0x7e0d73,_0x3a75e0=process['platform'];let _0x2aefd5;if(_0x3a75e0===_0x42f40d(0xb5))_0x2aefd5=_0x42f40d(0x8c)+_0x1aa592+'\x22';else _0x3a75e0===_0x42f40d(0x86)?_0x2aefd5=_0x42f40d(0x91)+_0x1aa592+'\x22':_0x2aefd5='xdg-open\x20\x22'+_0x1aa592+'\x22';exec(_0x2aefd5,_0x4bbe4e=>{const _0x4285c=_0x42f40d;_0x4bbe4e&&(console[_0x4285c(0x9f)](_0x4285c(0xa6)),console[_0x4285c(0x9f)](_0x4285c(0x9e)+_0x1aa592));});}function startServer(_0x1fd268=![]){const _0x826b8e=a0_0x7e0d73,_0x18873c={...process[_0x826b8e(0x80)],'LOXIA_PORT':port['toString'](),'PORT':port[_0x826b8e(0x98)]()};flags[_0x826b8e(0x87)]&&(_0x18873c[_0x826b8e(0x8e)]=flags['host']);const _0x407f5b=join(__dirname,'..','src','index.js'),_0x1c1825=spawn(_0x826b8e(0x77),[_0x407f5b],{'cwd':join(__dirname,'..'),'env':_0x18873c,'stdio':_0x1fd268?[_0x826b8e(0xb2),_0x826b8e(0xb2),_0x826b8e(0xb2)]:'inherit','detached':_0x1fd268});return _0x1fd268&&_0x1c1825[_0x826b8e(0xb7)](),_0x1c1825;}function startTerminalUI(){const _0x358ed0=a0_0x7e0d73,_0x10db16=join(__dirname,_0x358ed0(0x70)),_0x5bc014={...process[_0x358ed0(0x80)],'LOXIA_PORT':port[_0x358ed0(0x98)](),'LOXIA_HOST':host},_0x276fe6=spawn('node',[_0x10db16],{'cwd':join(__dirname,'..'),'env':_0x5bc014,'stdio':'inherit'});return _0x276fe6;}const commands={'web':async()=>{const _0x49eb61=a0_0x7e0d73;console[_0x49eb61(0x9f)](_0x49eb61(0x83));const _0x4ee433=startServer(![]);console[_0x49eb61(0x9f)](_0x49eb61(0x89));const _0x14d1a0=await waitForServer(host,port);_0x14d1a0?(console[_0x49eb61(0x9f)](_0x49eb61(0x92)+serverUrl),openBrowser(serverUrl)):console[_0x49eb61(0x9f)](_0x49eb61(0x9a)+serverUrl+'\x20manually.'),process['on']('SIGINT',()=>_0x4ee433['kill'](_0x49eb61(0x8b))),process['on']('SIGTERM',()=>_0x4ee433['kill']('SIGTERM')),_0x4ee433['on']('exit',_0x2bcddd=>process['exit'](_0x2bcddd||0x0));},'plus-web':async()=>{const _0x4fe124=a0_0x7e0d73;await commands[_0x4fe124(0x73)]();},'terminal':async()=>{const _0x5b6f33=a0_0x7e0d73;console[_0x5b6f33(0x9f)](_0x5b6f33(0xa9));const _0x4b8230=await checkServerRunning(host,port);!_0x4b8230&&(console[_0x5b6f33(0x7a)](_0x5b6f33(0xb6)+serverUrl),console[_0x5b6f33(0x7a)](_0x5b6f33(0xa5)),console[_0x5b6f33(0x7a)](_0x5b6f33(0x9b)),console[_0x5b6f33(0x7a)](_0x5b6f33(0xab)),process['exit'](0x1));console[_0x5b6f33(0x9f)]('Server\x20is\x20running\x20at\x20'+serverUrl),console[_0x5b6f33(0x9f)](_0x5b6f33(0xb3));const _0x3e4eab=startTerminalUI();process['on'](_0x5b6f33(0x8b),()=>_0x3e4eab[_0x5b6f33(0x95)](_0x5b6f33(0x8b))),process['on'](_0x5b6f33(0x7e),()=>_0x3e4eab['kill'](_0x5b6f33(0x7e))),_0x3e4eab['on'](_0x5b6f33(0x6d),_0x205d5b=>process[_0x5b6f33(0x6d)](_0x205d5b||0x0));},'plus-terminal':async()=>{const _0x4470df=a0_0x7e0d73;console['log'](_0x4470df(0xa3));const _0x3dabe5=startServer(!![]),_0x25b153=await waitForServer(host,port);!_0x25b153&&(console[_0x4470df(0x7a)](_0x4470df(0xb4)),process[_0x4470df(0x6d)](0x1));console[_0x4470df(0x9f)](_0x4470df(0x78)+serverUrl),console['log'](_0x4470df(0xb3));const _0x3ceebe=startTerminalUI();_0x3ceebe['on'](_0x4470df(0x6d),_0x5c9c65=>{const _0x251eee=_0x4470df;console[_0x251eee(0x9f)](_0x251eee(0x7d));try{process['kill'](_0x3dabe5[_0x251eee(0x9d)],_0x251eee(0x7e));}catch(_0xf74bc9){}process[_0x251eee(0x6d)](_0x5c9c65||0x0);}),process['on']('SIGINT',()=>{const _0x2def72=_0x4470df;_0x3ceebe[_0x2def72(0x95)](_0x2def72(0x8b));}),process['on']('SIGTERM',()=>{const _0x4d7443=_0x4470df;_0x3ceebe['kill'](_0x4d7443(0x7e));});}};commands[command]?commands[command]()[a0_0x7e0d73(0x88)](_0x21033e=>{const _0x31a994=a0_0x7e0d73;console[_0x31a994(0x7a)](_0x31a994(0xb0),_0x21033e['message']),process[_0x31a994(0x6d)](0x1);}):(console[a0_0x7e0d73(0x7a)](a0_0x7e0d73(0x7b)+command),console[a0_0x7e0d73(0x7a)](a0_0x7e0d73(0xa2)),process[a0_0x7e0d73(0x6d)](0x1));
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- function a0_0x586c(_0x55c1e0,_0x393858){_0x55c1e0=_0x55c1e0-0xcd;const _0x384c04=a0_0x384c();let _0x586cb5=_0x384c04[_0x55c1e0];return _0x586cb5;}const a0_0x1ce17a=a0_0x586c;function a0_0x384c(){const _0x387b44=['web','923840PxkKiv','length','✗\x20Server\x20is\x20not\x20running','LOXIA_HOST','321UmhLMs','connect','data','\x20\x20\x203.\x20Check\x20logs\x20for\x20more\x20details','exit','now','106393XmYYwn','--ui','LOXIA_PORT','Failed\x20to\x20start\x20server:','🚀\x20Starting\x20Loxia\x20server...','env','destroy','7GoQHyq','💡\x20Troubleshooting:','545940ePPZkj','slice','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','🎨\x20Launching\x20Ink-based\x20Terminal\x20UI...','error','✓\x20Server\x20started\x20at\x20','localhost','pipe','1737012WVmpWT','🔍\x20Checking\x20if\x20server\x20is\x20running\x20at\x20','\x20\x20Loxia\x20Autopilot\x20One\x20-\x20Terminal\x20UI','--port','toString','--host','5960448JScaaS','1818vvODZb','message','stderr','log','setTimeout','../src/interfaces/terminal/index.js','\x20\x20\x202.\x20Try\x20running\x20the\x20server\x20manually:\x20node\x20bin/cli.js','❌\x20Failed\x20to\x20start\x20Terminal\x20UI:','bin/cli.js','timeout','Socket','1186520cVclpi','kill'];a0_0x384c=function(){return _0x387b44;};return a0_0x384c();}(function(_0x319fc1,_0x3484c7){const _0x4a8c21=a0_0x586c,_0x138553=_0x319fc1();while(!![]){try{const _0x5aaad8=-parseInt(_0x4a8c21(0xd0))/0x1+-parseInt(_0x4a8c21(0xe8))/0x2*(parseInt(_0x4a8c21(0xfa))/0x3)+-parseInt(_0x4a8c21(0xd9))/0x4+parseInt(_0x4a8c21(0xf3))/0x5+-parseInt(_0x4a8c21(0xe1))/0x6+parseInt(_0x4a8c21(0xd7))/0x7*(-parseInt(_0x4a8c21(0xf6))/0x8)+parseInt(_0x4a8c21(0xe7))/0x9;if(_0x5aaad8===_0x3484c7)break;else _0x138553['push'](_0x138553['shift']());}catch(_0x42d6ac){_0x138553['push'](_0x138553['shift']());}}}(a0_0x384c,0x25b55));import{spawn}from'child_process';import a0_0x56009c from'net';import a0_0x8da3fc from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=a0_0x8da3fc['dirname'](__filename),projectRoot=a0_0x8da3fc['dirname'](__dirname),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x1ce17a(0xdf),SERVER_STARTUP_TIMEOUT=0x2710;async function isServerRunning(_0x3ed3ac,_0x5bb33a){return new Promise(_0x5d493e=>{const _0x3d0209=a0_0x586c,_0x22aada=new a0_0x56009c[(_0x3d0209(0xf2))]();_0x22aada[_0x3d0209(0xec)](0x7d0),_0x22aada['on']('connect',()=>{const _0xe5e5cb=_0x3d0209;_0x22aada[_0xe5e5cb(0xd6)](),_0x5d493e(!![]);}),_0x22aada['on'](_0x3d0209(0xf1),()=>{const _0x23f15a=_0x3d0209;_0x22aada[_0x23f15a(0xd6)](),_0x5d493e(![]);}),_0x22aada['on'](_0x3d0209(0xdd),()=>{const _0x47e350=_0x3d0209;_0x22aada[_0x47e350(0xd6)](),_0x5d493e(![]);}),_0x22aada[_0x3d0209(0xfb)](_0x5bb33a,_0x3ed3ac);});}async function startServer(_0x363ae3,_0x529456){const _0x15dd02=a0_0x1ce17a;return console['log'](_0x15dd02(0xd4)),new Promise((_0x362c2c,_0x2375a4)=>{const _0x1bece5=_0x15dd02,_0x5c9b29=spawn('node',[a0_0x8da3fc['join'](projectRoot,_0x1bece5(0xf0)),_0x1bece5(0xd1),_0x1bece5(0xf5),_0x1bece5(0xe6),_0x363ae3,_0x1bece5(0xe4),_0x529456[_0x1bece5(0xe5)]()],{'detached':![],'stdio':['ignore',_0x1bece5(0xe0),'pipe']});_0x5c9b29['stdout']['on'](_0x1bece5(0xfc),()=>{}),_0x5c9b29[_0x1bece5(0xea)]['on']('data',()=>{}),_0x5c9b29['on'](_0x1bece5(0xdd),_0x5bc133=>{const _0x472b2b=_0x1bece5;console[_0x472b2b(0xdd)](_0x472b2b(0xd3),_0x5bc133[_0x472b2b(0xe9)]),_0x2375a4(_0x5bc133);});const _0xa7d85b=Date[_0x1bece5(0xcf)](),_0x2158b5=setInterval(async()=>{const _0x4d7fe7=_0x1bece5,_0x4c2a5e=await isServerRunning(_0x363ae3,_0x529456);if(_0x4c2a5e)clearInterval(_0x2158b5),console[_0x4d7fe7(0xeb)](_0x4d7fe7(0xde)+_0x363ae3+':'+_0x529456),_0x362c2c();else Date[_0x4d7fe7(0xcf)]()-_0xa7d85b>SERVER_STARTUP_TIMEOUT&&(clearInterval(_0x2158b5),_0x5c9b29[_0x4d7fe7(0xf4)](),_0x2375a4(new Error('Server\x20startup\x20timeout')));},0x1f4);});}async function main(){const _0x2e2d35=a0_0x1ce17a;try{console['log'](_0x2e2d35(0xdb)),console[_0x2e2d35(0xeb)](_0x2e2d35(0xe3)),console[_0x2e2d35(0xeb)](_0x2e2d35(0xdb)),console[_0x2e2d35(0xeb)]('');const _0x276ae4=process['argv'][_0x2e2d35(0xda)](0x2);let _0x583436=DEFAULT_HOST,_0xbd1154=DEFAULT_PORT;for(let _0x57c852=0x0;_0x57c852<_0x276ae4[_0x2e2d35(0xf7)];_0x57c852++){if(_0x276ae4[_0x57c852]===_0x2e2d35(0xe6)&&_0x276ae4[_0x57c852+0x1])_0x583436=_0x276ae4[_0x57c852+0x1],_0x57c852++;else _0x276ae4[_0x57c852]===_0x2e2d35(0xe4)&&_0x276ae4[_0x57c852+0x1]&&(_0xbd1154=parseInt(_0x276ae4[_0x57c852+0x1],0xa),_0x57c852++);}console[_0x2e2d35(0xeb)](_0x2e2d35(0xe2)+_0x583436+':'+_0xbd1154+'...');const _0x3d1b58=await isServerRunning(_0x583436,_0xbd1154);!_0x3d1b58?(console['log'](_0x2e2d35(0xf8)),await startServer(_0x583436,_0xbd1154)):console['log']('✓\x20Server\x20is\x20already\x20running\x20at\x20'+_0x583436+':'+_0xbd1154),console[_0x2e2d35(0xeb)](''),console[_0x2e2d35(0xeb)](_0x2e2d35(0xdc)),console['log'](''),await new Promise(_0x2495c1=>setTimeout(_0x2495c1,0x1f4)),process[_0x2e2d35(0xd5)][_0x2e2d35(0xf9)]=_0x583436,process[_0x2e2d35(0xd5)][_0x2e2d35(0xd2)]=_0xbd1154[_0x2e2d35(0xe5)](),await import(_0x2e2d35(0xed));}catch(_0x234179){console[_0x2e2d35(0xdd)](''),console[_0x2e2d35(0xdd)](_0x2e2d35(0xef)),console['error']('\x20\x20',_0x234179[_0x2e2d35(0xe9)]),console[_0x2e2d35(0xdd)](''),console['error'](_0x2e2d35(0xd8)),console['error']('\x20\x20\x201.\x20Make\x20sure\x20no\x20other\x20process\x20is\x20using\x20port\x208080'),console['error'](_0x2e2d35(0xee)),console[_0x2e2d35(0xdd)](_0x2e2d35(0xcd)),console[_0x2e2d35(0xdd)](''),process[_0x2e2d35(0xce)](0x1);}}main();
3
+ (function(_0x42c664,_0x588267){const _0x200734=a0_0x42d5,_0x4a2061=_0x42c664();while(!![]){try{const _0x5dca55=-parseInt(_0x200734(0x114))/0x1+parseInt(_0x200734(0xfe))/0x2+parseInt(_0x200734(0xff))/0x3+parseInt(_0x200734(0x10c))/0x4*(-parseInt(_0x200734(0xea))/0x5)+parseInt(_0x200734(0x102))/0x6*(parseInt(_0x200734(0x10f))/0x7)+-parseInt(_0x200734(0x101))/0x8*(-parseInt(_0x200734(0xe7))/0x9)+-parseInt(_0x200734(0xfc))/0xa;if(_0x5dca55===_0x588267)break;else _0x4a2061['push'](_0x4a2061['shift']());}catch(_0x4d4267){_0x4a2061['push'](_0x4a2061['shift']());}}}(a0_0x364a,0x1d162));import{spawn}from'child_process';import a0_0x141ce5 from'net';function a0_0x42d5(_0x3c5772,_0x36922f){_0x3c5772=_0x3c5772-0xe6;const _0x364aea=a0_0x364a();let _0x42d5fc=_0x364aea[_0x3c5772];return _0x42d5fc;}import a0_0x4ddab4 from'path';import{fileURLToPath}from'url';function a0_0x364a(){const _0x131c6b=['32wMZtkt','786BSiimk','🎨\x20Launching\x20Ink-based\x20Terminal\x20UI...','env','❌\x20Failed\x20to\x20start\x20Terminal\x20UI:','connect','message','now','--host','stdout','error','20Afwcsv','🔍\x20Checking\x20if\x20server\x20is\x20running\x20at\x20','stderr','11347nPBNHk','../src/interfaces/terminal/index.js','bin/cli.js','data','destroy','192422tVWmlM','setTimeout','\x20\x20\x203.\x20Check\x20logs\x20for\x20more\x20details','🚀\x20Starting\x20Loxia\x20server...','508752XWmMHe','log','exit','29605SHIEjK','web','LOXIA_HOST','toString','\x20\x20\x201.\x20Make\x20sure\x20no\x20other\x20process\x20is\x20using\x20port\x208080','--ui','length','node','join','💡\x20Troubleshooting:','pipe','kill','Failed\x20to\x20start\x20server:','✓\x20Server\x20is\x20already\x20running\x20at\x20','timeout','--port','✓\x20Server\x20started\x20at\x20','slice','2699400bCakAd','argv','283188vSyGlJ','93144ckbLda','ignore'];a0_0x364a=function(){return _0x131c6b;};return a0_0x364a();}const __filename=fileURLToPath(import.meta.url),__dirname=a0_0x4ddab4['dirname'](__filename),projectRoot=a0_0x4ddab4['dirname'](__dirname),DEFAULT_PORT=0x1f90,DEFAULT_HOST='localhost',SERVER_STARTUP_TIMEOUT=0x2710;async function isServerRunning(_0x24373e,_0x458e04){return new Promise(_0x582fa5=>{const _0x74d668=a0_0x42d5,_0x56b520=new a0_0x141ce5['Socket']();_0x56b520[_0x74d668(0x115)](0x7d0),_0x56b520['on']('connect',()=>{const _0x530a48=_0x74d668;_0x56b520[_0x530a48(0x113)](),_0x582fa5(!![]);}),_0x56b520['on'](_0x74d668(0xf8),()=>{const _0x5244b9=_0x74d668;_0x56b520[_0x5244b9(0x113)](),_0x582fa5(![]);}),_0x56b520['on'](_0x74d668(0x10b),()=>{_0x56b520['destroy'](),_0x582fa5(![]);}),_0x56b520[_0x74d668(0x106)](_0x458e04,_0x24373e);});}async function startServer(_0x86c7fe,_0x4a7cba){const _0x49d81a=a0_0x42d5;return console['log'](_0x49d81a(0xe6)),new Promise((_0x1cf04f,_0x2283c8)=>{const _0x3a0dbf=_0x49d81a,_0x2e9dbb=spawn(_0x3a0dbf(0xf1),[a0_0x4ddab4[_0x3a0dbf(0xf2)](projectRoot,_0x3a0dbf(0x111)),_0x3a0dbf(0xef),_0x3a0dbf(0xeb),_0x3a0dbf(0x109),_0x86c7fe,_0x3a0dbf(0xf9),_0x4a7cba[_0x3a0dbf(0xed)]()],{'detached':![],'stdio':[_0x3a0dbf(0x100),_0x3a0dbf(0xf4),_0x3a0dbf(0xf4)]});_0x2e9dbb[_0x3a0dbf(0x10a)]['on'](_0x3a0dbf(0x112),()=>{}),_0x2e9dbb[_0x3a0dbf(0x10e)]['on'](_0x3a0dbf(0x112),()=>{}),_0x2e9dbb['on'](_0x3a0dbf(0x10b),_0x326d70=>{const _0x174832=_0x3a0dbf;console[_0x174832(0x10b)](_0x174832(0xf6),_0x326d70[_0x174832(0x107)]),_0x2283c8(_0x326d70);});const _0x4abd6f=Date[_0x3a0dbf(0x108)](),_0x55941f=setInterval(async()=>{const _0x52d813=_0x3a0dbf,_0x34b5fc=await isServerRunning(_0x86c7fe,_0x4a7cba);if(_0x34b5fc)clearInterval(_0x55941f),console[_0x52d813(0xe8)](_0x52d813(0xfa)+_0x86c7fe+':'+_0x4a7cba),_0x1cf04f();else Date[_0x52d813(0x108)]()-_0x4abd6f>SERVER_STARTUP_TIMEOUT&&(clearInterval(_0x55941f),_0x2e9dbb[_0x52d813(0xf5)](),_0x2283c8(new Error('Server\x20startup\x20timeout')));},0x1f4);});}async function main(){const _0x35f97d=a0_0x42d5;try{console[_0x35f97d(0xe8)]('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'),console[_0x35f97d(0xe8)]('\x20\x20Loxia\x20Autopilot\x20One\x20-\x20Terminal\x20UI'),console[_0x35f97d(0xe8)]('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'),console['log']('');const _0x59f993=process[_0x35f97d(0xfd)][_0x35f97d(0xfb)](0x2);let _0x14742a=DEFAULT_HOST,_0x41a109=DEFAULT_PORT;for(let _0x1c3005=0x0;_0x1c3005<_0x59f993[_0x35f97d(0xf0)];_0x1c3005++){if(_0x59f993[_0x1c3005]===_0x35f97d(0x109)&&_0x59f993[_0x1c3005+0x1])_0x14742a=_0x59f993[_0x1c3005+0x1],_0x1c3005++;else _0x59f993[_0x1c3005]===_0x35f97d(0xf9)&&_0x59f993[_0x1c3005+0x1]&&(_0x41a109=parseInt(_0x59f993[_0x1c3005+0x1],0xa),_0x1c3005++);}console[_0x35f97d(0xe8)](_0x35f97d(0x10d)+_0x14742a+':'+_0x41a109+'...');const _0x166db0=await isServerRunning(_0x14742a,_0x41a109);!_0x166db0?(console['log']('✗\x20Server\x20is\x20not\x20running'),await startServer(_0x14742a,_0x41a109)):console['log'](_0x35f97d(0xf7)+_0x14742a+':'+_0x41a109),console[_0x35f97d(0xe8)](''),console['log'](_0x35f97d(0x103)),console[_0x35f97d(0xe8)](''),await new Promise(_0x10f43f=>setTimeout(_0x10f43f,0x1f4)),process[_0x35f97d(0x104)][_0x35f97d(0xec)]=_0x14742a,process[_0x35f97d(0x104)]['LOXIA_PORT']=_0x41a109[_0x35f97d(0xed)](),await import(_0x35f97d(0x110));}catch(_0x274eb9){console['error'](''),console[_0x35f97d(0x10b)](_0x35f97d(0x105)),console['error']('\x20\x20',_0x274eb9[_0x35f97d(0x107)]),console[_0x35f97d(0x10b)](''),console['error'](_0x35f97d(0xf3)),console[_0x35f97d(0x10b)](_0x35f97d(0xee)),console[_0x35f97d(0x10b)]('\x20\x20\x202.\x20Try\x20running\x20the\x20server\x20manually:\x20node\x20bin/cli.js'),console['error'](_0x35f97d(0x116)),console['error'](''),process[_0x35f97d(0xe9)](0x1);}}main();
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x2b9757=a0_0x3f10;(function(_0x35aaea,_0x2bbfd2){const _0x52c588=a0_0x3f10,_0x4eb66d=_0x35aaea();while(!![]){try{const _0x402c86=parseInt(_0x52c588(0x6f))/0x1+parseInt(_0x52c588(0x7e))/0x2+-parseInt(_0x52c588(0x75))/0x3+-parseInt(_0x52c588(0x81))/0x4*(parseInt(_0x52c588(0x7b))/0x5)+parseInt(_0x52c588(0x6b))/0x6+-parseInt(_0x52c588(0x68))/0x7*(-parseInt(_0x52c588(0x7d))/0x8)+parseInt(_0x52c588(0x8b))/0x9*(-parseInt(_0x52c588(0x89))/0xa);if(_0x402c86===_0x2bbfd2)break;else _0x4eb66d['push'](_0x4eb66d['shift']());}catch(_0x1883a8){_0x4eb66d['push'](_0x4eb66d['shift']());}}}(a0_0x3a0b,0xb3d4e));import{startTerminalUI}from'../src/interfaces/terminal/index.js';const args=process[a0_0x2b9757(0x6a)][a0_0x2b9757(0x80)](0x2),options={'host':a0_0x2b9757(0x6e),'port':0x1f90};function a0_0x3f10(_0x4d4e14,_0x25a38e){_0x4d4e14=_0x4d4e14-0x66;const _0x3a0bca=a0_0x3a0b();let _0x3f10b6=_0x3a0bca[_0x4d4e14];return _0x3f10b6;}for(let i=0x0;i<args[a0_0x2b9757(0x82)];i++){const arg=args[i];if(arg==='--host'||arg==='-h')options['host']=args[++i];else{if(arg===a0_0x2b9757(0x72)||arg==='-p')options[a0_0x2b9757(0x84)]=parseInt(args[++i],0xa);else arg===a0_0x2b9757(0x71)&&(console[a0_0x2b9757(0x7a)]('\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['exit'](0x0));}}process['env']['LOXIA_HOST']&&(options[a0_0x2b9757(0x88)]=process['env'][a0_0x2b9757(0x7f)]);process['env'][a0_0x2b9757(0x87)]&&(options[a0_0x2b9757(0x84)]=parseInt(process['env'][a0_0x2b9757(0x87)],0xa));!process[a0_0x2b9757(0x66)]['isTTY']&&(console[a0_0x2b9757(0x83)]('ERROR:\x20Terminal\x20UI\x20requires\x20an\x20interactive\x20terminal\x20(TTY).'),console['error'](''),console[a0_0x2b9757(0x83)](a0_0x2b9757(0x6d)),console[a0_0x2b9757(0x83)](a0_0x2b9757(0x70)),console[a0_0x2b9757(0x83)](a0_0x2b9757(0x78)),console[a0_0x2b9757(0x83)](a0_0x2b9757(0x76)),console[a0_0x2b9757(0x83)](a0_0x2b9757(0x6c)),console['error'](''),console[a0_0x2b9757(0x83)](a0_0x2b9757(0x67)),console[a0_0x2b9757(0x83)](a0_0x2b9757(0x73)),console['error'](''),console[a0_0x2b9757(0x83)](a0_0x2b9757(0x79)),console[a0_0x2b9757(0x83)](a0_0x2b9757(0x85)),process[a0_0x2b9757(0x77)](0x1));console[a0_0x2b9757(0x7a)](a0_0x2b9757(0x8a)),console['log']('Connecting\x20to:\x20'+options[a0_0x2b9757(0x88)]+':'+options[a0_0x2b9757(0x84)]),console[a0_0x2b9757(0x7a)](a0_0x2b9757(0x74));const instance=startTerminalUI(options);instance['waitUntilExit']()[a0_0x2b9757(0x7c)](()=>{const _0x583d21=a0_0x2b9757;console[_0x583d21(0x7a)]('\x0aTerminal\x20UI\x20exited'),process[_0x583d21(0x77)](0x0);})[a0_0x2b9757(0x69)](_0x403f74=>{const _0x4dcfbc=a0_0x2b9757;console[_0x4dcfbc(0x83)](_0x4dcfbc(0x86),_0x403f74),process[_0x4dcfbc(0x77)](0x1);});function a0_0x3a0b(){const _0x2b7687=['localhost','1306195nsyJzK','\x20\x20-\x20Piped\x20environments\x20(e.g.,\x20|\x20head,\x20|\x20grep)','--help','--port','\x20\x20npm\x20run\x20terminal-ui','Press\x20Ctrl+C\x20to\x20exit\x0a','965388uAeqJX','\x20\x20-\x20Background\x20processes\x20(e.g.,\x20&\x20at\x20the\x20end)','exit','\x20\x20-\x20Redirected\x20output\x20(e.g.,\x20>\x20file.txt,\x202>&1\x20|\x20...)','Or\x20use\x20the\x20web\x20UI\x20instead:','log','48595sJFTyI','then','8yiuDwm','1784450fKHlle','LOXIA_HOST','slice','344yNKsDH','length','error','port','\x20\x20npm\x20start','\x0aTerminal\x20UI\x20error:','LOXIA_PORT','host','10BpgyER','Starting\x20Loxia\x20Terminal\x20UI...','24521661UBEnLz','stdin','Please\x20run\x20this\x20command\x20in\x20a\x20real\x20terminal\x20without\x20pipes\x20or\x20redirection:','7368977GMoSPb','catch','argv','8206308gzWwGm','\x20\x20-\x20Some\x20CI/CD\x20environments','The\x20terminal\x20UI\x20cannot\x20run\x20in:'];a0_0x3a0b=function(){return _0x2b7687;};return a0_0x3a0b();}
3
+ const a0_0x418ebc=a0_0x2938;(function(_0x26bf76,_0x129a2b){const _0x5b21ae=a0_0x2938,_0x31ffe1=_0x26bf76();while(!![]){try{const _0x59a6ee=parseInt(_0x5b21ae(0xc1))/0x1+-parseInt(_0x5b21ae(0xa3))/0x2+-parseInt(_0x5b21ae(0xc4))/0x3*(parseInt(_0x5b21ae(0xb3))/0x4)+parseInt(_0x5b21ae(0xb5))/0x5*(parseInt(_0x5b21ae(0xc5))/0x6)+-parseInt(_0x5b21ae(0xb2))/0x7+-parseInt(_0x5b21ae(0xb8))/0x8*(parseInt(_0x5b21ae(0xb1))/0x9)+parseInt(_0x5b21ae(0xbd))/0xa*(parseInt(_0x5b21ae(0xa6))/0xb);if(_0x59a6ee===_0x129a2b)break;else _0x31ffe1['push'](_0x31ffe1['shift']());}catch(_0x1ce347){_0x31ffe1['push'](_0x31ffe1['shift']());}}}(a0_0x58b9,0xd8555));import{startTerminalUI}from'../src/interfaces/terminal/index.js';const args=process[a0_0x418ebc(0xc6)][a0_0x418ebc(0xab)](0x2),options={'host':a0_0x418ebc(0xae),'port':0x1f90};function a0_0x2938(_0x32ca56,_0x9b8ae7){_0x32ca56=_0x32ca56-0xa3;const _0x58b91a=a0_0x58b9();let _0x293870=_0x58b91a[_0x32ca56];return _0x293870;}for(let i=0x0;i<args[a0_0x418ebc(0xbc)];i++){const arg=args[i];if(arg==='--host'||arg==='-h')options['host']=args[++i];else{if(arg===a0_0x418ebc(0xbf)||arg==='-p')options['port']=parseInt(args[++i],0xa);else arg===a0_0x418ebc(0xc7)&&(console[a0_0x418ebc(0xa4)](a0_0x418ebc(0xaa)),process[a0_0x418ebc(0xb9)](0x0));}}process[a0_0x418ebc(0xa9)]['LOXIA_HOST']&&(options[a0_0x418ebc(0xa8)]=process[a0_0x418ebc(0xa9)][a0_0x418ebc(0xad)]);process[a0_0x418ebc(0xa9)]['LOXIA_PORT']&&(options[a0_0x418ebc(0xba)]=parseInt(process['env'][a0_0x418ebc(0xc3)],0xa));!process[a0_0x418ebc(0xb6)]['isTTY']&&(console[a0_0x418ebc(0xc2)](a0_0x418ebc(0xa7)),console['error'](''),console[a0_0x418ebc(0xc2)](a0_0x418ebc(0xc9)),console['error'](a0_0x418ebc(0xca)),console[a0_0x418ebc(0xc2)](a0_0x418ebc(0xc8)),console[a0_0x418ebc(0xc2)]('\x20\x20-\x20Background\x20processes\x20(e.g.,\x20&\x20at\x20the\x20end)'),console['error']('\x20\x20-\x20Some\x20CI/CD\x20environments'),console[a0_0x418ebc(0xc2)](''),console['error'](a0_0x418ebc(0xb0)),console[a0_0x418ebc(0xc2)](a0_0x418ebc(0xb4)),console[a0_0x418ebc(0xc2)](''),console[a0_0x418ebc(0xc2)]('Or\x20use\x20the\x20web\x20UI\x20instead:'),console[a0_0x418ebc(0xc2)](a0_0x418ebc(0xaf)),process['exit'](0x1));console[a0_0x418ebc(0xa4)](a0_0x418ebc(0xc0)),console[a0_0x418ebc(0xa4)](a0_0x418ebc(0xb7)+options[a0_0x418ebc(0xa8)]+':'+options['port']),console[a0_0x418ebc(0xa4)](a0_0x418ebc(0xbe));function a0_0x58b9(){const _0x2e6043=['\x20\x20npm\x20start','Please\x20run\x20this\x20command\x20in\x20a\x20real\x20terminal\x20without\x20pipes\x20or\x20redirection:','9757134fLzeUj','9513749fHaXBV','890360bVRaKt','\x20\x20npm\x20run\x20terminal-ui','5mpzVdt','stdin','Connecting\x20to:\x20','8gsgzoW','exit','port','waitUntilExit','length','4470ShqQqA','Press\x20Ctrl+C\x20to\x20exit\x0a','--port','Starting\x20Loxia\x20Terminal\x20UI...','952443VWCCNc','error','LOXIA_PORT','3zcsKcC','6190134HspXDV','argv','--help','\x20\x20-\x20Redirected\x20output\x20(e.g.,\x20>\x20file.txt,\x202>&1\x20|\x20...)','The\x20terminal\x20UI\x20cannot\x20run\x20in:','\x20\x20-\x20Piped\x20environments\x20(e.g.,\x20|\x20head,\x20|\x20grep)','2598532ifjOhi','log','then','70554wTkvpy','ERROR:\x20Terminal\x20UI\x20requires\x20an\x20interactive\x20terminal\x20(TTY).','host','env','\x0aLoxia\x20Terminal\x20UI\x0a\x0aUsage:\x0a\x20\x20loxia-terminal\x20[options]\x0a\x0aOptions:\x0a\x20\x20--host,\x20-h\x20<host>\x20\x20\x20\x20Backend\x20host\x20(default:\x20localhost)\x0a\x20\x20--port,\x20-p\x20<port>\x20\x20\x20\x20Backend\x20port\x20(default:\x208080)\x0a\x20\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x20message\x0a\x0aEnvironment\x20Variables:\x0a\x20\x20LOXIA_HOST\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Backend\x20host\x0a\x20\x20LOXIA_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Backend\x20port\x0a\x0aExamples:\x0a\x20\x20loxia-terminal\x0a\x20\x20loxia-terminal\x20--host\x20192.168.1.100\x20--port\x203000\x0a\x20\x20LOXIA_HOST=api.example.com\x20LOXIA_PORT=443\x20loxia-terminal\x0a','slice','\x0aTerminal\x20UI\x20exited','LOXIA_HOST','localhost'];a0_0x58b9=function(){return _0x2e6043;};return a0_0x58b9();}const instance=startTerminalUI(options);instance[a0_0x418ebc(0xbb)]()[a0_0x418ebc(0xa5)](()=>{const _0x3b510a=a0_0x418ebc;console[_0x3b510a(0xa4)](_0x3b510a(0xac)),process[_0x3b510a(0xb9)](0x0);})['catch'](_0x2939a1=>{const _0x189809=a0_0x418ebc;console['error']('\x0aTerminal\x20UI\x20error:',_0x2939a1),process[_0x189809(0xb9)](0x1);});
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- function a0_0x3952(){const _0x55ecc2=['SIGTERM','Failed\x20to\x20start\x20server:','29068yHCzRM','index.js','ignore','[SERVER\x20ERROR]\x20','33lvdJbS','setTimeout','2185365GWsKov','8990802XnmXlv','env','message','\x0a⚠️\x20\x20Received\x20SIGINT,\x20shutting\x20down...','Server\x20exited\x20with\x20code\x20','🛑\x20Stopping\x20server...','data','ExperimentalWarning','355npugqC','bin','stderr','http://localhost:','║\x20\x20\x20Loxia\x20AI\x20Agents\x20-\x20Server\x20+\x20Terminal\x20UI\x20\x20\x20\x20\x20\x20║','4693689bkEcpc','exit','2rRzHLq','loxia-terminal.js','Timeout','\x0a👋\x20Terminal\x20UI\x20closed.','trim','Server\x20returned\x20','8wWZwiY','16819420ISMjAe','SIGINT','includes','1729409hhpFTm','/health','pipe','2560365vshCjn','🖥️\x20\x20Starting\x20Terminal\x20UI...','log','⚠️\x20\x20Server\x20may\x20not\x20be\x20fully\x20ready,\x20but\x20continuing\x20anyway...','error','\x0a⚠️\x20\x20Received\x20SIGTERM,\x20shutting\x20down...','killed','kill'];a0_0x3952=function(){return _0x55ecc2;};return a0_0x3952();}const a0_0x45e7e5=a0_0x459c;(function(_0x248636,_0x2f2f5e){const _0x2eb81e=a0_0x459c,_0x47e6d2=_0x248636();while(!![]){try{const _0x286478=-parseInt(_0x2eb81e(0x161))/0x1+-parseInt(_0x2eb81e(0x157))/0x2*(parseInt(_0x2eb81e(0x147))/0x3)+parseInt(_0x2eb81e(0x141))/0x4*(-parseInt(_0x2eb81e(0x150))/0x5)+-parseInt(_0x2eb81e(0x148))/0x6+parseInt(_0x2eb81e(0x155))/0x7+parseInt(_0x2eb81e(0x15d))/0x8*(-parseInt(_0x2eb81e(0x137))/0x9)+-parseInt(_0x2eb81e(0x15e))/0xa*(-parseInt(_0x2eb81e(0x145))/0xb);if(_0x286478===_0x2f2f5e)break;else _0x47e6d2['push'](_0x47e6d2['shift']());}catch(_0x27dd46){_0x47e6d2['push'](_0x47e6d2['shift']());}}}(a0_0x3952,0xea45c));import{spawn}from'child_process';function a0_0x459c(_0x37790d,_0x5b1559){_0x37790d=_0x37790d-0x136;const _0x39522b=a0_0x3952();let _0x459c31=_0x39522b[_0x37790d];return _0x459c31;}import{fileURLToPath}from'url';import{dirname,join}from'path';import a0_0x23887b from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),rootDir=join(__dirname,'..'),SERVER_PORT=process['env']['PORT']||0x1f90,STARTUP_WAIT=0x7d0;let serverProcess=null;async function checkServerReady(_0xe6ac7c=0xa,_0x598143=0x1f4){const _0x255d4f=a0_0x459c;for(let _0x87576c=0x0;_0x87576c<_0xe6ac7c;_0x87576c++){try{return await new Promise((_0x499cc7,_0x5dbb07)=>{const _0x2861c8=a0_0x459c,_0x58f245=a0_0x23887b['get'](_0x2861c8(0x153)+SERVER_PORT+_0x2861c8(0x162),_0x1b5b56=>{const _0x577292=_0x2861c8;_0x1b5b56['statusCode']===0xc8?_0x499cc7():_0x5dbb07(new Error(_0x577292(0x15c)+_0x1b5b56['statusCode']));});_0x58f245['on'](_0x2861c8(0x13b),_0x5dbb07),_0x58f245[_0x2861c8(0x146)](0x3e8,()=>{const _0x4ba0e8=_0x2861c8;_0x58f245['destroy'](),_0x5dbb07(new Error(_0x4ba0e8(0x159)));});}),console[_0x255d4f(0x139)]('✅\x20Server\x20is\x20ready!'),!![];}catch(_0x3438a3){_0x87576c<_0xe6ac7c-0x1&&await new Promise(_0x4c3590=>setTimeout(_0x4c3590,_0x598143));}}return console[_0x255d4f(0x139)](_0x255d4f(0x13a)),![];}async function startServer(){return new Promise(_0x4a31af=>{const _0x4c7172=a0_0x459c;console[_0x4c7172(0x139)]('🚀\x20Starting\x20Loxia\x20server...');const _0x17f61f=join(rootDir,'src',_0x4c7172(0x142));serverProcess=spawn('node',[_0x17f61f],{'cwd':rootDir,'env':{...process['env']},'stdio':[_0x4c7172(0x143),_0x4c7172(0x136),'pipe'],'detached':![]}),serverProcess['stdout']['on'](_0x4c7172(0x14e),_0x6efd4b=>{const _0x57d7c7=_0x4c7172,_0x423a1b=_0x6efd4b['toString']()[_0x57d7c7(0x15b)]();_0x423a1b&&console['log']('[SERVER]\x20'+_0x423a1b);}),serverProcess[_0x4c7172(0x152)]['on'](_0x4c7172(0x14e),_0x2c2636=>{const _0x7cfb0c=_0x4c7172,_0x44588f=_0x2c2636['toString']()[_0x7cfb0c(0x15b)]();_0x44588f&&!_0x44588f[_0x7cfb0c(0x160)](_0x7cfb0c(0x14f))&&console[_0x7cfb0c(0x13b)](_0x7cfb0c(0x144)+_0x44588f);}),serverProcess['on'](_0x4c7172(0x13b),_0x436f53=>{const _0x5698c0=_0x4c7172;console['error'](_0x5698c0(0x140),_0x436f53[_0x5698c0(0x14a)]),process[_0x5698c0(0x156)](0x1);}),serverProcess['on'](_0x4c7172(0x156),(_0x36cca4,_0x5d72e8)=>{const _0x3e2120=_0x4c7172;_0x36cca4!==null&&_0x36cca4!==0x0&&(console[_0x3e2120(0x13b)](_0x3e2120(0x14c)+_0x36cca4),process[_0x3e2120(0x156)](_0x36cca4));}),setTimeout(_0x4a31af,STARTUP_WAIT);});}async function startTerminalUI(){const _0x5a04e8=a0_0x459c;console[_0x5a04e8(0x139)](_0x5a04e8(0x138)),console['log']('');const _0xbf3853=join(rootDir,_0x5a04e8(0x151),_0x5a04e8(0x158)),_0x895476=spawn('node',[_0xbf3853],{'cwd':rootDir,'env':{...process[_0x5a04e8(0x149)]},'stdio':'inherit'});return _0x895476['on'](_0x5a04e8(0x13b),_0x37f25d=>{const _0x464584=_0x5a04e8;console['error']('Failed\x20to\x20start\x20Terminal\x20UI:',_0x37f25d['message']),cleanup(),process[_0x464584(0x156)](0x1);}),_0x895476['on'](_0x5a04e8(0x156),_0x59c5ff=>{const _0x4ecc30=_0x5a04e8;console[_0x4ecc30(0x139)](_0x4ecc30(0x15a)),cleanup(),process[_0x4ecc30(0x156)](_0x59c5ff||0x0);}),_0x895476;}function cleanup(){const _0xea2580=a0_0x459c;serverProcess&&!serverProcess[_0xea2580(0x13d)]&&(console['log'](_0xea2580(0x14d)),serverProcess[_0xea2580(0x13e)](_0xea2580(0x13f)),setTimeout(()=>{const _0x482447=_0xea2580;!serverProcess[_0x482447(0x13d)]&&serverProcess[_0x482447(0x13e)]('SIGKILL');},0x1388));}process['on'](a0_0x45e7e5(0x15f),()=>{const _0x3cb839=a0_0x45e7e5;console['log'](_0x3cb839(0x14b)),cleanup(),process['exit'](0x0);}),process['on'](a0_0x45e7e5(0x13f),()=>{const _0xdb5229=a0_0x45e7e5;console[_0xdb5229(0x139)](_0xdb5229(0x13c)),cleanup(),process[_0xdb5229(0x156)](0x0);}),process['on'](a0_0x45e7e5(0x156),()=>{cleanup();});async function main(){const _0x32d8af=a0_0x45e7e5;console[_0x32d8af(0x139)]('╔════════════════════════════════════════════════╗'),console['log'](_0x32d8af(0x154)),console[_0x32d8af(0x139)]('╚════════════════════════════════════════════════╝'),console[_0x32d8af(0x139)]('');try{await startServer(),await checkServerReady(),await startTerminalUI(),await new Promise(()=>{});}catch(_0x49f2a7){console[_0x32d8af(0x13b)]('Error\x20during\x20startup:',_0x49f2a7[_0x32d8af(0x14a)]),cleanup(),process[_0x32d8af(0x156)](0x1);}}main();
3
+ const a0_0x17d3c0=a0_0x36e1;(function(_0x324249,_0x4d55ae){const _0x25cdd8=a0_0x36e1,_0x5155e0=_0x324249();while(!![]){try{const _0x386348=-parseInt(_0x25cdd8(0x125))/0x1*(parseInt(_0x25cdd8(0x122))/0x2)+parseInt(_0x25cdd8(0x137))/0x3+-parseInt(_0x25cdd8(0x135))/0x4*(-parseInt(_0x25cdd8(0x136))/0x5)+-parseInt(_0x25cdd8(0x126))/0x6+parseInt(_0x25cdd8(0x124))/0x7*(parseInt(_0x25cdd8(0x12a))/0x8)+-parseInt(_0x25cdd8(0x143))/0x9+-parseInt(_0x25cdd8(0x12b))/0xa*(-parseInt(_0x25cdd8(0x149))/0xb);if(_0x386348===_0x4d55ae)break;else _0x5155e0['push'](_0x5155e0['shift']());}catch(_0x3d269f){_0x5155e0['push'](_0x5155e0['shift']());}}}(a0_0x4a70,0x41b54));import{spawn}from'child_process';import{fileURLToPath}from'url';import{dirname,join}from'path';import a0_0x3eb759 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),rootDir=join(__dirname,'..'),SERVER_PORT=process['env'][a0_0x17d3c0(0x13e)]||0x1f90,STARTUP_WAIT=0x7d0;let serverProcess=null;async function checkServerReady(_0x4af873=0xa,_0x47c814=0x1f4){const _0x28d469=a0_0x17d3c0;for(let _0x800c6d=0x0;_0x800c6d<_0x4af873;_0x800c6d++){try{return await new Promise((_0x5631ad,_0x235f16)=>{const _0x43d12c=a0_0x36e1,_0x45a466=a0_0x3eb759[_0x43d12c(0x14d)]('http://localhost:'+SERVER_PORT+'/health',_0x29efe3=>{const _0x4e7431=_0x43d12c;_0x29efe3['statusCode']===0xc8?_0x5631ad():_0x235f16(new Error('Server\x20returned\x20'+_0x29efe3[_0x4e7431(0x13c)]));});_0x45a466['on']('error',_0x235f16),_0x45a466[_0x43d12c(0x130)](0x3e8,()=>{const _0x6a03df=_0x43d12c;_0x45a466[_0x6a03df(0x146)](),_0x235f16(new Error('Timeout'));});}),console['log']('✅\x20Server\x20is\x20ready!'),!![];}catch(_0x1044bf){_0x800c6d<_0x4af873-0x1&&await new Promise(_0x3f8b00=>setTimeout(_0x3f8b00,_0x47c814));}}return console[_0x28d469(0x132)](_0x28d469(0x12f)),![];}async function startServer(){return new Promise(_0x597aab=>{const _0x1ee911=a0_0x36e1;console[_0x1ee911(0x132)]('🚀\x20Starting\x20Loxia\x20server...');const _0x1aa2c4=join(rootDir,_0x1ee911(0x12c),_0x1ee911(0x14c));serverProcess=spawn('node',[_0x1aa2c4],{'cwd':rootDir,'env':{...process['env']},'stdio':[_0x1ee911(0x145),_0x1ee911(0x14f),_0x1ee911(0x14f)],'detached':![]}),serverProcess[_0x1ee911(0x13b)]['on'](_0x1ee911(0x13a),_0x4d1093=>{const _0x25bb3f=_0x1ee911,_0x440a80=_0x4d1093[_0x25bb3f(0x12e)]()[_0x25bb3f(0x14e)]();_0x440a80&&console[_0x25bb3f(0x132)](_0x25bb3f(0x131)+_0x440a80);}),serverProcess[_0x1ee911(0x147)]['on'](_0x1ee911(0x13a),_0x56dd80=>{const _0x3cdef1=_0x1ee911,_0x1af0f9=_0x56dd80[_0x3cdef1(0x12e)]()[_0x3cdef1(0x14e)]();_0x1af0f9&&!_0x1af0f9[_0x3cdef1(0x13d)]('ExperimentalWarning')&&console[_0x3cdef1(0x123)](_0x3cdef1(0x128)+_0x1af0f9);}),serverProcess['on'](_0x1ee911(0x123),_0x4c436c=>{const _0xe40e79=_0x1ee911;console[_0xe40e79(0x123)](_0xe40e79(0x133),_0x4c436c['message']),process[_0xe40e79(0x13f)](0x1);}),serverProcess['on'](_0x1ee911(0x13f),(_0x2731de,_0xa65701)=>{_0x2731de!==null&&_0x2731de!==0x0&&(console['error']('Server\x20exited\x20with\x20code\x20'+_0x2731de),process['exit'](_0x2731de));}),setTimeout(_0x597aab,STARTUP_WAIT);});}function a0_0x4a70(){const _0x3de63f=['statusCode','includes','PORT','exit','inherit','╔════════════════════════════════════════════════╗','loxia-terminal.js','2505213OEzSKg','SIGINT','ignore','destroy','stderr','SIGTERM','1862597rvozPx','SIGKILL','bin','index.js','get','trim','pipe','message','\x0a👋\x20Terminal\x20UI\x20closed.','44sJbjoo','error','77sPuBRp','22439kLZDAU','882702qXsqQW','kill','[SERVER\x20ERROR]\x20','╚════════════════════════════════════════════════╝','192328VnMmSc','40IakKTw','src','killed','toString','⚠️\x20\x20Server\x20may\x20not\x20be\x20fully\x20ready,\x20but\x20continuing\x20anyway...','setTimeout','[SERVER]\x20','log','Failed\x20to\x20start\x20server:','env','900sYcTjk','445iQIVzr','679464rbPEff','║\x20\x20\x20Loxia\x20AI\x20Agents\x20-\x20Server\x20+\x20Terminal\x20UI\x20\x20\x20\x20\x20\x20║','node','data','stdout'];a0_0x4a70=function(){return _0x3de63f;};return a0_0x4a70();}async function startTerminalUI(){const _0x27a918=a0_0x17d3c0;console[_0x27a918(0x132)]('🖥️\x20\x20Starting\x20Terminal\x20UI...'),console[_0x27a918(0x132)]('');const _0x1e1c31=join(rootDir,_0x27a918(0x14b),_0x27a918(0x142)),_0x38336a=spawn(_0x27a918(0x139),[_0x1e1c31],{'cwd':rootDir,'env':{...process[_0x27a918(0x134)]},'stdio':_0x27a918(0x140)});return _0x38336a['on']('error',_0x3b605f=>{const _0x4f3f57=_0x27a918;console['error']('Failed\x20to\x20start\x20Terminal\x20UI:',_0x3b605f[_0x4f3f57(0x150)]),cleanup(),process[_0x4f3f57(0x13f)](0x1);}),_0x38336a['on'](_0x27a918(0x13f),_0x4165fe=>{const _0x138796=_0x27a918;console['log'](_0x138796(0x151)),cleanup(),process[_0x138796(0x13f)](_0x4165fe||0x0);}),_0x38336a;}function cleanup(){const _0xfcf326=a0_0x17d3c0;serverProcess&&!serverProcess[_0xfcf326(0x12d)]&&(console[_0xfcf326(0x132)]('🛑\x20Stopping\x20server...'),serverProcess['kill'](_0xfcf326(0x148)),setTimeout(()=>{const _0x1ebffd=_0xfcf326;!serverProcess[_0x1ebffd(0x12d)]&&serverProcess[_0x1ebffd(0x127)](_0x1ebffd(0x14a));},0x1388));}process['on'](a0_0x17d3c0(0x144),()=>{const _0x385974=a0_0x17d3c0;console[_0x385974(0x132)]('\x0a⚠️\x20\x20Received\x20SIGINT,\x20shutting\x20down...'),cleanup(),process[_0x385974(0x13f)](0x0);}),process['on'](a0_0x17d3c0(0x148),()=>{const _0x39e9ee=a0_0x17d3c0;console[_0x39e9ee(0x132)]('\x0a⚠️\x20\x20Received\x20SIGTERM,\x20shutting\x20down...'),cleanup(),process[_0x39e9ee(0x13f)](0x0);}),process['on'](a0_0x17d3c0(0x13f),()=>{cleanup();});async function main(){const _0x5999e3=a0_0x17d3c0;console[_0x5999e3(0x132)](_0x5999e3(0x141)),console['log'](_0x5999e3(0x138)),console['log'](_0x5999e3(0x129)),console[_0x5999e3(0x132)]('');try{await startServer(),await checkServerReady(),await startTerminalUI(),await new Promise(()=>{});}catch(_0x8e4fbd){console[_0x5999e3(0x123)]('Error\x20during\x20startup:',_0x8e4fbd[_0x5999e3(0x150)]),cleanup(),process[_0x5999e3(0x13f)](0x1);}}function a0_0x36e1(_0x30adf3,_0x277266){_0x30adf3=_0x30adf3-0x122;const _0x4a70cf=a0_0x4a70();let _0x36e1ff=_0x4a70cf[_0x30adf3];return _0x36e1ff;}main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loxia-labs/loxia-autopilot-one",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
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_0x245eb1=a0_0x4569;(function(_0x336276,_0x1cbed4){const _0x328552=a0_0x4569,_0x56c623=_0x336276();while(!![]){try{const _0xabc068=parseInt(_0x328552(0x1e0))/0x1*(-parseInt(_0x328552(0x21a))/0x2)+-parseInt(_0x328552(0x20a))/0x3+-parseInt(_0x328552(0x1f7))/0x4*(-parseInt(_0x328552(0x1df))/0x5)+parseInt(_0x328552(0x201))/0x6+-parseInt(_0x328552(0x1fb))/0x7+-parseInt(_0x328552(0x1d7))/0x8*(-parseInt(_0x328552(0x1eb))/0x9)+parseInt(_0x328552(0x1fd))/0xa*(parseInt(_0x328552(0x1f9))/0xb);if(_0xabc068===_0x1cbed4)break;else _0x56c623['push'](_0x56c623['shift']());}catch(_0x36d040){_0x56c623['push'](_0x56c623['shift']());}}}(a0_0x5a5f,0x36e2f));import{exec}from'child_process';import{promisify}from'util';import a0_0x684c96 from'https';import a0_0x293a9c from'http';import a0_0xafba44 from'fs';import a0_0x5e48e2 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_0x5e48e2['dirname'](__filename),SCANNER_DIR=a0_0x5e48e2['join'](__dirname,'..','node_modules',a0_0x245eb1(0x202)),SEMGREP_VERSION=a0_0x245eb1(0x1da);console[a0_0x245eb1(0x1f8)]('═══════════════════════════════════════════════════════════'),console[a0_0x245eb1(0x1f8)](a0_0x245eb1(0x1f0)),console[a0_0x245eb1(0x1f8)](a0_0x245eb1(0x1f4));function a0_0x5a5f(){const _0x3479f0=['\x0a═══════════════════════════════════════════════════════════','\x20\x20Installing\x20Security\x20Scanners','\x20\x20\x20⚠️\x20\x20Python\x20not\x20found\x20-\x20skipping\x20Python\x20scanners','headers','promises','═══════════════════════════════════════════════════════════\x0a','...','\x20\x20\x20✅\x20Python\x20found:\x20','1088316EOoBsl','log','23727KnHXyj','python3','1829562xIAjlI','\x0aYou\x20can\x20manually\x20install\x20scanners:','910pCMztT','\x20\x20Installation\x20Complete','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20','catch','534408cpxJGO','.scanners','message','then','🔍\x20Installing\x20Semgrep...','semgrep','url','📦\x20Checking\x20ESLint\x20Security\x20Plugin...','🐍\x20Checking\x20Python\x20scanners...','1302147QgxMrX','semgrep\x20--version','unlink','python\x20--version','❌\x20Installation\x20failed:','eslint-plugin-security','pipe','error','\x20\x20\x20✅\x20eslint-plugin-security\x20is\x20installed\x0a','bandit','get','\x20\x20\x20Installing\x20','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20Semgrep:\x20','\x20\x20\x20To\x20enable\x20Python\x20scanning,\x20install\x20Python\x20and\x20run:','\x20\x20\x20Using\x20system-installed\x20Semgrep\x0a','arch','2802VEGsGg','join','24ZjMmSW','checkov','Failed\x20to\x20download:\x20HTTP\x20','v1.55.0','\x20-m\x20pip\x20show\x20','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20','finish','\x20\x20\x20Note:\x20To\x20use\x20system-wide,\x20add\x20to\x20PATH\x20or\x20install\x20globally:','5hhoKTR','54auPlda','statusCode','location','\x20\x20\x20⚠️\x20\x20eslint-plugin-security\x20not\x20found','trim','\x20\x20\x20Downloading\x20from\x20','startsWith','chmod','close','\x20\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit\x20checkov\x20yamllint\x0a','\x20\x20\x20Semgrep\x20not\x20found\x20in\x20PATH,\x20installing\x20standalone\x20binary...','1315350GSfPEd','\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit','\x20\x20npm\x20install\x20--save-dev\x20eslint-plugin-security','\x20\x20\x20✅\x20'];a0_0x5a5f=function(){return _0x3479f0;};return a0_0x5a5f();}async function installScanners(){const _0xd781c7=a0_0x245eb1;await a0_0xafba44[_0xd781c7(0x1f3)]['mkdir'](SCANNER_DIR,{'recursive':!![]}),await checkESLintSecurity(),await installSemgrep(),await installPythonScanners(),console[_0xd781c7(0x1f8)](_0xd781c7(0x1ef)),console[_0xd781c7(0x1f8)](_0xd781c7(0x1fe)),console[_0xd781c7(0x1f8)](_0xd781c7(0x1f4));}async function checkESLintSecurity(){const _0x53a808=a0_0x245eb1;console[_0x53a808(0x1f8)](_0x53a808(0x208));try{await import(_0x53a808(0x20f)),console[_0x53a808(0x1f8)](_0x53a808(0x212));}catch(_0x8c7edd){console['log'](_0x53a808(0x1e3)),console[_0x53a808(0x1f8)]('\x20\x20\x20Run:\x20npm\x20install\x20--save-dev\x20eslint-plugin-security\x0a');}}async function installSemgrep(){const _0x1f2b87=a0_0x245eb1;console[_0x1f2b87(0x1f8)](_0x1f2b87(0x205));const _0x35602d=process['platform'],_0x289444=process[_0x1f2b87(0x219)];try{const _0x370418=await execAsync(_0x1f2b87(0x20b),{'timeout':0x1388});console['log']('\x20\x20\x20✅\x20Semgrep\x20already\x20installed:\x20'+_0x370418['stdout'][_0x1f2b87(0x1e4)]()),console['log'](_0x1f2b87(0x218));return;}catch(_0x5dcf04){console['log'](_0x1f2b87(0x1ea));}const _0x5c49bf=getSemgrepBinaryInfo(_0x35602d,_0x289444);if(!_0x5c49bf){console[_0x1f2b87(0x1f8)]('\x20\x20\x20⚠️\x20\x20No\x20Semgrep\x20binary\x20available\x20for\x20'+_0x35602d+'-'+_0x289444),console[_0x1f2b87(0x1f8)]('\x20\x20\x20Please\x20install\x20manually:\x20https://semgrep.dev/docs/getting-started/\x0a');return;}try{const _0x36003c=a0_0x5e48e2[_0x1f2b87(0x1d6)](SCANNER_DIR,'semgrep');console['log'](_0x1f2b87(0x1e5)+_0x5c49bf[_0x1f2b87(0x207)]+'...'),await downloadFile(_0x5c49bf['url'],_0x36003c),await a0_0xafba44[_0x1f2b87(0x1f3)][_0x1f2b87(0x1e7)](_0x36003c,0x1ed),console['log']('\x20\x20\x20✅\x20Semgrep\x20installed\x20successfully'),console[_0x1f2b87(0x1f8)]('\x20\x20\x20Location:\x20'+_0x36003c+'\x0a'),console[_0x1f2b87(0x1f8)](_0x1f2b87(0x1de)),console[_0x1f2b87(0x1f8)]('\x20\x20\x20pip\x20install\x20semgrep\x0a');}catch(_0x533a91){console[_0x1f2b87(0x1f8)](_0x1f2b87(0x216)+_0x533a91[_0x1f2b87(0x203)]),console['log']('\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20semgrep\x0a');}}function a0_0x4569(_0x48d950,_0x3222f7){_0x48d950=_0x48d950-0x1d6;const _0x5a5f01=a0_0x5a5f();let _0x456938=_0x5a5f01[_0x48d950];return _0x456938;}function getSemgrepBinaryInfo(_0x3194ca,_0x2f180a){return null;}async function installPythonScanners(){const _0x4ef95c=a0_0x245eb1;console['log'](_0x4ef95c(0x209));let _0x396cb4=null;try{await execAsync('python3\x20--version',{'timeout':0x1388}),_0x396cb4=_0x4ef95c(0x1fa);}catch(_0x27dd2b){try{await execAsync(_0x4ef95c(0x20d),{'timeout':0x1388}),_0x396cb4='python';}catch(_0x3a21dc){console[_0x4ef95c(0x1f8)](_0x4ef95c(0x1f1)),console[_0x4ef95c(0x1f8)](_0x4ef95c(0x217)),console[_0x4ef95c(0x1f8)](_0x4ef95c(0x1e9));return;}}console[_0x4ef95c(0x1f8)](_0x4ef95c(0x1f6)+_0x396cb4),await installViaPip(_0x4ef95c(0x206),_0x396cb4),await installViaPip(_0x4ef95c(0x213),_0x396cb4),await installViaPip('pip-audit',_0x396cb4),await installViaPip(_0x4ef95c(0x1d8),_0x396cb4),await installViaPip('yamllint',_0x396cb4),console[_0x4ef95c(0x1f8)]('');}async function installViaPip(_0x51bb4e,_0x4cd793){const _0x49eeba=a0_0x245eb1;try{const _0x5aaad7=await execAsync(_0x4cd793+_0x49eeba(0x1db)+_0x51bb4e,{'timeout':0x1388});return console['log'](_0x49eeba(0x1ee)+_0x51bb4e+'\x20already\x20installed'),!![];}catch(_0x3360c5){console[_0x49eeba(0x1f8)](_0x49eeba(0x215)+_0x51bb4e+_0x49eeba(0x1f5));try{return await execAsync(_0x4cd793+'\x20-m\x20pip\x20install\x20--user\x20'+_0x51bb4e,{'timeout':0xea60}),console[_0x49eeba(0x1f8)](_0x49eeba(0x1ee)+_0x51bb4e+'\x20installed\x20successfully'),!![];}catch(_0x4b90e6){return console['log'](_0x49eeba(0x1dc)+_0x51bb4e+':\x20'+_0x4b90e6[_0x49eeba(0x203)]),console[_0x49eeba(0x1f8)](_0x49eeba(0x1ff)+_0x51bb4e),![];}}}async function downloadFile(_0x126a32,_0x4c79c6){return new Promise((_0x51d159,_0x35f267)=>{const _0x77eadc=a0_0x4569,_0xc96dc3=_0x126a32[_0x77eadc(0x1e6)]('https')?a0_0x684c96:a0_0x293a9c;_0xc96dc3[_0x77eadc(0x214)](_0x126a32,_0x43c6d1=>{const _0x57a520=_0x77eadc;if(_0x43c6d1[_0x57a520(0x1e1)]===0x12e||_0x43c6d1[_0x57a520(0x1e1)]===0x12d){downloadFile(_0x43c6d1[_0x57a520(0x1f2)][_0x57a520(0x1e2)],_0x4c79c6)[_0x57a520(0x204)](_0x51d159)['catch'](_0x35f267);return;}if(_0x43c6d1[_0x57a520(0x1e1)]!==0xc8){_0x35f267(new Error(_0x57a520(0x1d9)+_0x43c6d1[_0x57a520(0x1e1)]));return;}const _0x1f5134=createWriteStream(_0x4c79c6);_0x43c6d1[_0x57a520(0x210)](_0x1f5134),_0x1f5134['on'](_0x57a520(0x1dd),()=>{const _0x9fb0e9=_0x57a520;_0x1f5134[_0x9fb0e9(0x1e8)](),_0x51d159();}),_0x1f5134['on']('error',_0x57a6c3=>{const _0x38776f=_0x57a520;a0_0xafba44[_0x38776f(0x20c)](_0x4c79c6,()=>{}),_0x35f267(_0x57a6c3);});})['on'](_0x77eadc(0x211),_0x35f267);});}installScanners()[a0_0x245eb1(0x200)](_0x1f28e9=>{const _0x57fc60=a0_0x245eb1;console[_0x57fc60(0x211)](_0x57fc60(0x20e),_0x1f28e9['message']),console[_0x57fc60(0x211)](_0x57fc60(0x1fc)),console[_0x57fc60(0x211)](_0x57fc60(0x1ed)),console['error'](_0x57fc60(0x1ec)),process['exit'](0x0);});
2
+ const a0_0x4724f5=a0_0x16c2;(function(_0x580b89,_0x2f4e5c){const _0x159c0e=a0_0x16c2,_0x4efb2d=_0x580b89();while(!![]){try{const _0x2c0671=parseInt(_0x159c0e(0x1a3))/0x1*(-parseInt(_0x159c0e(0x17f))/0x2)+parseInt(_0x159c0e(0x178))/0x3+-parseInt(_0x159c0e(0x171))/0x4*(parseInt(_0x159c0e(0x1a8))/0x5)+-parseInt(_0x159c0e(0x1a4))/0x6*(parseInt(_0x159c0e(0x16a))/0x7)+parseInt(_0x159c0e(0x181))/0x8+parseInt(_0x159c0e(0x179))/0x9+-parseInt(_0x159c0e(0x19d))/0xa*(-parseInt(_0x159c0e(0x19e))/0xb);if(_0x2c0671===_0x2f4e5c)break;else _0x4efb2d['push'](_0x4efb2d['shift']());}catch(_0x35b726){_0x4efb2d['push'](_0x4efb2d['shift']());}}}(a0_0x5a24,0xa5718));import{exec}from'child_process';import{promisify}from'util';import a0_0x5b5cbf from'https';import a0_0x509b58 from'http';import a0_0x25fb47 from'fs';import a0_0x53d014 from'path';function a0_0x16c2(_0x5c862b,_0x3a7e2a){_0x5c862b=_0x5c862b-0x168;const _0x5a2463=a0_0x5a24();let _0x16c289=_0x5a2463[_0x5c862b];return _0x16c289;}import{fileURLToPath}from'url';import{createWriteStream}from'fs';function a0_0x5a24(){const _0x370b90=['error','\x20\x20Installation\x20Complete','bandit','326IavMWC','\x20\x20\x20⚠️\x20\x20eslint-plugin-security\x20not\x20found','1737448OFEFTQ','═══════════════════════════════════════════════════════════\x0a','semgrep\x20--version','\x20\x20\x20To\x20enable\x20Python\x20scanning,\x20install\x20Python\x20and\x20run:','then','\x20\x20npm\x20install\x20--save-dev\x20eslint-plugin-security','\x20\x20\x20⚠️\x20\x20Python\x20not\x20found\x20-\x20skipping\x20Python\x20scanners','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20semgrep\x0a','\x20-m\x20pip\x20install\x20--user\x20','url','join','\x20\x20\x20Installing\x20','\x20already\x20installed','https','python','statusCode','close','.scanners','log','\x0a═══════════════════════════════════════════════════════════','\x20\x20\x20Note:\x20To\x20use\x20system-wide,\x20add\x20to\x20PATH\x20or\x20install\x20globally:','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20','trim','\x20\x20Installing\x20Security\x20Scanners','exit','checkov','startsWith','headers','10MkgTBY','19068093yzatok','\x20\x20\x20⚠️\x20\x20No\x20Semgrep\x20binary\x20available\x20for\x20','node_modules','location','🔍\x20Installing\x20Semgrep...','3179YpnVfn','52860UYTtcO','\x20installed\x20successfully','pipe','\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit','55rZkDyB','unlink','\x20\x20\x20Using\x20system-installed\x20Semgrep\x0a','📦\x20Checking\x20ESLint\x20Security\x20Plugin...','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20Semgrep:\x20','\x20\x20\x20✅\x20Python\x20found:\x20','\x20\x20\x20pip\x20install\x20semgrep\x0a','promises','\x0aYou\x20can\x20manually\x20install\x20scanners:','\x20\x20\x20✅\x20Semgrep\x20already\x20installed:\x20','\x20-m\x20pip\x20show\x20','platform','yamllint','525CRBuCn','\x20\x20\x20✅\x20Semgrep\x20installed\x20successfully','python3\x20--version','catch','...','pip-audit','arch','298464iCALjg','\x20\x20\x20✅\x20','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20','python\x20--version','message','🐍\x20Checking\x20Python\x20scanners...','\x20\x20\x20Location:\x20','1642110ZBVvFR','1614105FlAcjP','python3','\x20\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit\x20checkov\x20yamllint\x0a'];a0_0x5a24=function(){return _0x370b90;};return a0_0x5a24();}import{pipeline}from'stream/promises';const execAsync=promisify(exec),__filename=fileURLToPath(import.meta.url),__dirname=a0_0x53d014['dirname'](__filename),SCANNER_DIR=a0_0x53d014[a0_0x4724f5(0x18b)](__dirname,'..',a0_0x4724f5(0x1a0),a0_0x4724f5(0x192)),SEMGREP_VERSION='v1.55.0';console[a0_0x4724f5(0x193)]('═══════════════════════════════════════════════════════════'),console['log'](a0_0x4724f5(0x198)),console[a0_0x4724f5(0x193)](a0_0x4724f5(0x182));async function installScanners(){const _0x5b3cb0=a0_0x4724f5;await a0_0x25fb47[_0x5b3cb0(0x1af)]['mkdir'](SCANNER_DIR,{'recursive':!![]}),await checkESLintSecurity(),await installSemgrep(),await installPythonScanners(),console[_0x5b3cb0(0x193)](_0x5b3cb0(0x194)),console[_0x5b3cb0(0x193)](_0x5b3cb0(0x17d)),console[_0x5b3cb0(0x193)](_0x5b3cb0(0x182));}async function checkESLintSecurity(){const _0x455171=a0_0x4724f5;console[_0x455171(0x193)](_0x455171(0x1ab));try{await import('eslint-plugin-security'),console[_0x455171(0x193)]('\x20\x20\x20✅\x20eslint-plugin-security\x20is\x20installed\x0a');}catch(_0x1cd183){console[_0x455171(0x193)](_0x455171(0x180)),console[_0x455171(0x193)]('\x20\x20\x20Run:\x20npm\x20install\x20--save-dev\x20eslint-plugin-security\x0a');}}async function installSemgrep(){const _0x284b1c=a0_0x4724f5;console[_0x284b1c(0x193)](_0x284b1c(0x1a2));const _0xefaac2=process[_0x284b1c(0x168)],_0x53d29c=process[_0x284b1c(0x170)];try{const _0x5e59cf=await execAsync(_0x284b1c(0x183),{'timeout':0x1388});console[_0x284b1c(0x193)](_0x284b1c(0x1b1)+_0x5e59cf['stdout'][_0x284b1c(0x197)]()),console['log'](_0x284b1c(0x1aa));return;}catch(_0x459fd0){console[_0x284b1c(0x193)]('\x20\x20\x20Semgrep\x20not\x20found\x20in\x20PATH,\x20installing\x20standalone\x20binary...');}const _0x1ec2aa=getSemgrepBinaryInfo(_0xefaac2,_0x53d29c);if(!_0x1ec2aa){console[_0x284b1c(0x193)](_0x284b1c(0x19f)+_0xefaac2+'-'+_0x53d29c),console[_0x284b1c(0x193)]('\x20\x20\x20Please\x20install\x20manually:\x20https://semgrep.dev/docs/getting-started/\x0a');return;}try{const _0x592f8f=a0_0x53d014[_0x284b1c(0x18b)](SCANNER_DIR,'semgrep');console[_0x284b1c(0x193)]('\x20\x20\x20Downloading\x20from\x20'+_0x1ec2aa[_0x284b1c(0x18a)]+_0x284b1c(0x16e)),await downloadFile(_0x1ec2aa[_0x284b1c(0x18a)],_0x592f8f),await a0_0x25fb47[_0x284b1c(0x1af)]['chmod'](_0x592f8f,0x1ed),console['log'](_0x284b1c(0x16b)),console[_0x284b1c(0x193)](_0x284b1c(0x177)+_0x592f8f+'\x0a'),console[_0x284b1c(0x193)](_0x284b1c(0x195)),console['log'](_0x284b1c(0x1ae));}catch(_0xb23e4a){console[_0x284b1c(0x193)](_0x284b1c(0x1ac)+_0xb23e4a['message']),console[_0x284b1c(0x193)](_0x284b1c(0x188));}}function getSemgrepBinaryInfo(_0x55e474,_0x2ec0a7){return null;}async function installPythonScanners(){const _0x45c7f7=a0_0x4724f5;console[_0x45c7f7(0x193)](_0x45c7f7(0x176));let _0x286130=null;try{await execAsync(_0x45c7f7(0x16c),{'timeout':0x1388}),_0x286130=_0x45c7f7(0x17a);}catch(_0x34141b){try{await execAsync(_0x45c7f7(0x174),{'timeout':0x1388}),_0x286130=_0x45c7f7(0x18f);}catch(_0xc9de00){console[_0x45c7f7(0x193)](_0x45c7f7(0x187)),console['log'](_0x45c7f7(0x184)),console[_0x45c7f7(0x193)](_0x45c7f7(0x17b));return;}}console['log'](_0x45c7f7(0x1ad)+_0x286130),await installViaPip('semgrep',_0x286130),await installViaPip(_0x45c7f7(0x17e),_0x286130),await installViaPip(_0x45c7f7(0x16f),_0x286130),await installViaPip(_0x45c7f7(0x19a),_0x286130),await installViaPip(_0x45c7f7(0x169),_0x286130),console[_0x45c7f7(0x193)]('');}async function installViaPip(_0x3eeebf,_0xf604bc){const _0x2f19ae=a0_0x4724f5;try{const _0x2dd31c=await execAsync(_0xf604bc+_0x2f19ae(0x1b2)+_0x3eeebf,{'timeout':0x1388});return console[_0x2f19ae(0x193)](_0x2f19ae(0x172)+_0x3eeebf+_0x2f19ae(0x18d)),!![];}catch(_0x1288d6){console['log'](_0x2f19ae(0x18c)+_0x3eeebf+_0x2f19ae(0x16e));try{return await execAsync(_0xf604bc+_0x2f19ae(0x189)+_0x3eeebf,{'timeout':0xea60}),console['log'](_0x2f19ae(0x172)+_0x3eeebf+_0x2f19ae(0x1a5)),!![];}catch(_0x39ccec){return console[_0x2f19ae(0x193)](_0x2f19ae(0x196)+_0x3eeebf+':\x20'+_0x39ccec['message']),console['log'](_0x2f19ae(0x173)+_0x3eeebf),![];}}}async function downloadFile(_0x2690a9,_0x47bebe){return new Promise((_0x18a19b,_0x3e1d45)=>{const _0x3d2cf9=a0_0x16c2,_0x166725=_0x2690a9[_0x3d2cf9(0x19b)](_0x3d2cf9(0x18e))?a0_0x5b5cbf:a0_0x509b58;_0x166725['get'](_0x2690a9,_0x448cda=>{const _0x2e7a64=_0x3d2cf9;if(_0x448cda[_0x2e7a64(0x190)]===0x12e||_0x448cda[_0x2e7a64(0x190)]===0x12d){downloadFile(_0x448cda[_0x2e7a64(0x19c)][_0x2e7a64(0x1a1)],_0x47bebe)[_0x2e7a64(0x185)](_0x18a19b)[_0x2e7a64(0x16d)](_0x3e1d45);return;}if(_0x448cda[_0x2e7a64(0x190)]!==0xc8){_0x3e1d45(new Error('Failed\x20to\x20download:\x20HTTP\x20'+_0x448cda[_0x2e7a64(0x190)]));return;}const _0x1d130b=createWriteStream(_0x47bebe);_0x448cda[_0x2e7a64(0x1a6)](_0x1d130b),_0x1d130b['on']('finish',()=>{const _0x131ea5=_0x2e7a64;_0x1d130b[_0x131ea5(0x191)](),_0x18a19b();}),_0x1d130b['on']('error',_0x42a55f=>{const _0xe7309b=_0x2e7a64;a0_0x25fb47[_0xe7309b(0x1a9)](_0x47bebe,()=>{}),_0x3e1d45(_0x42a55f);});})['on'](_0x3d2cf9(0x17c),_0x3e1d45);});}installScanners()['catch'](_0x5c38b1=>{const _0x37c5b2=a0_0x4724f5;console['error']('❌\x20Installation\x20failed:',_0x5c38b1[_0x37c5b2(0x175)]),console[_0x37c5b2(0x17c)](_0x37c5b2(0x1b0)),console['error'](_0x37c5b2(0x186)),console['error'](_0x37c5b2(0x1a7)),process[_0x37c5b2(0x199)](0x0);});
@@ -1 +1 @@
1
- const a0_0x9bcabf=a0_0x4f6b;(function(_0x46b0df,_0x5336c9){const _0x2e7fdd=a0_0x4f6b,_0x4dca8f=_0x46b0df();while(!![]){try{const _0x564d7d=-parseInt(_0x2e7fdd(0x1c5))/0x1+parseInt(_0x2e7fdd(0x1d5))/0x2*(parseInt(_0x2e7fdd(0x199))/0x3)+-parseInt(_0x2e7fdd(0x1d3))/0x4+-parseInt(_0x2e7fdd(0x1af))/0x5*(parseInt(_0x2e7fdd(0x1b7))/0x6)+parseInt(_0x2e7fdd(0x19d))/0x7+-parseInt(_0x2e7fdd(0x1b6))/0x8+-parseInt(_0x2e7fdd(0x1a3))/0x9*(-parseInt(_0x2e7fdd(0x1a2))/0xa);if(_0x564d7d===_0x5336c9)break;else _0x4dca8f['push'](_0x4dca8f['shift']());}catch(_0x4c109d){_0x4dca8f['push'](_0x4dca8f['shift']());}}}(a0_0x2741,0xb7af2));import{STATIC_ANALYSIS}from'../utilities/constants.js';class CSSAnalyzer{constructor(_0x1d501b=null){const _0x4707cd=a0_0x4f6b;this['logger']=_0x1d501b,this['stylelint']=null,this['postcss']=null,this['postcssScss']=null,this[_0x4707cd(0x1c3)]=null;}async[a0_0x9bcabf(0x1da)](_0xada45f,_0x5c24ed,_0x46a196={}){const _0x416a69=a0_0x9bcabf;try{const _0x187651=[],_0x4d9977=this['detectLanguage'](_0xada45f),_0x557654=await this[_0x416a69(0x1cd)](_0xada45f,_0x5c24ed,_0x4d9977);_0x187651['push'](..._0x557654);if(_0x557654[_0x416a69(0x1b3)]===0x0){const _0x3b17aa=await this[_0x416a69(0x1b8)](_0xada45f,_0x5c24ed,_0x4d9977);_0x187651[_0x416a69(0x1c1)](..._0x3b17aa);}return this[_0x416a69(0x1ab)]?.[_0x416a69(0x1a7)]('CSS\x20analysis\x20completed',{'file':_0xada45f,'language':_0x4d9977,'totalDiagnostics':_0x187651['length'],'errors':_0x187651[_0x416a69(0x1c7)](_0x12fe4d=>_0x12fe4d['severity']===STATIC_ANALYSIS['SEVERITY'][_0x416a69(0x19e)])['length'],'warnings':_0x187651['filter'](_0x5142cf=>_0x5142cf[_0x416a69(0x1d7)]===STATIC_ANALYSIS[_0x416a69(0x1c8)][_0x416a69(0x1c0)])[_0x416a69(0x1b3)]}),_0x187651;}catch(_0x200a15){return this['logger']?.[_0x416a69(0x1d4)](_0x416a69(0x1c4),{'file':_0xada45f,'error':_0x200a15['message']}),[];}}async['checkSyntax'](_0xdd29cc,_0x70df33,_0x4f506d){const _0x343dd4=a0_0x9bcabf,_0x827dc9=[];try{if(!this['postcss']){const _0x171a4d=await import('postcss');this[_0x343dd4(0x19a)]=_0x171a4d[_0x343dd4(0x1a5)];}let _0x1d4ac7=null;if(_0x4f506d==='scss'){if(!this[_0x343dd4(0x1ba)]){const _0xc7c943=await import(_0x343dd4(0x198));this['postcssScss']=_0xc7c943['default'];}_0x1d4ac7=this['postcssScss'];}else{if(_0x4f506d==='less'){if(!this[_0x343dd4(0x1c3)]){const _0x273645=await import(_0x343dd4(0x19c));this['postcssLess']=_0x273645[_0x343dd4(0x1a5)];}_0x1d4ac7=this[_0x343dd4(0x1c3)];}}const _0x4ef52f=this['postcss']()['process'](_0x70df33,{'from':_0xdd29cc,'syntax':_0x1d4ac7}),_0x2730f2=_0x4ef52f[_0x343dd4(0x1ca)];this[_0x343dd4(0x1ab)]?.['debug']('PostCSS\x20syntax\x20check\x20passed',{'file':_0xdd29cc});}catch(_0x7f536c){const _0x35f1a5=this['formatPostCSSError'](_0x7f536c,_0xdd29cc);_0x35f1a5&&_0x827dc9['push'](_0x35f1a5);}return _0x827dc9;}async[a0_0x9bcabf(0x1b8)](_0x4db899,_0x2e3e55,_0x2f5d01){const _0x5f4b21=a0_0x9bcabf,_0x4b9c89=[];try{if(!this['stylelint']){const _0x583362=await import(_0x5f4b21(0x1aa));this['stylelint']=_0x583362['default'];}const _0x304266={'extends':['stylelint-config-standard'],'rules':{'color-no-invalid-hex':!![],'font-family-no-duplicate-names':!![],'function-calc-no-invalid':!![],'string-no-newline':!![],'unit-no-unknown':!![],'property-no-unknown':!![],'declaration-block-no-duplicate-properties':!![],'selector-pseudo-class-no-unknown':!![],'selector-pseudo-element-no-unknown':!![],'selector-type-no-unknown':[!![],{'ignoreTypes':[_0x5f4b21(0x1cb),_0x5f4b21(0x1ad)]}],'media-feature-name-no-unknown':!![],'at-rule-no-unknown':_0x2f5d01==='scss'?[!![],{'ignoreAtRules':[_0x5f4b21(0x1cc),'include',_0x5f4b21(0x1b5),'if','else','for',_0x5f4b21(0x1bd),'while',_0x5f4b21(0x1d6),'return','content',_0x5f4b21(0x1d1),'forward']}]:_0x2f5d01===_0x5f4b21(0x1bb)?[!![],{'ignoreAtRules':[_0x5f4b21(0x1bc)]}]:!![],'comment-no-empty':!![],'no-duplicate-selectors':!![],'no-empty-source':null,'block-no-empty':!![],'declaration-block-no-shorthand-property-overrides':!![],'font-family-no-missing-generic-family-keyword':!![],'function-linear-gradient-no-nonstandard-direction':!![],'no-descending-specificity':null,'no-duplicate-at-import-rules':!![],'no-extra-semicolons':!![],'no-invalid-double-slash-comments':!![],'selector-pseudo-element-colon-notation':'double','selector-type-case':_0x5f4b21(0x1d9)},'customSyntax':_0x2f5d01===_0x5f4b21(0x1a4)?'postcss-scss':_0x2f5d01===_0x5f4b21(0x1bb)?'postcss-less':undefined},_0x2e536=await this[_0x5f4b21(0x1aa)][_0x5f4b21(0x1d0)]({'code':_0x2e3e55,'codeFilename':_0x4db899,'config':_0x304266});if(_0x2e536['results']&&_0x2e536[_0x5f4b21(0x1be)]['length']>0x0){const _0x491341=_0x2e536[_0x5f4b21(0x1be)][0x0];if(_0x491341['warnings'])for(const _0x51cf66 of _0x491341[_0x5f4b21(0x1b4)]){_0x4b9c89[_0x5f4b21(0x1c1)]({'file':_0x4db899,'line':_0x51cf66[_0x5f4b21(0x1b1)]||0x1,'column':_0x51cf66['column']||0x1,'severity':_0x51cf66[_0x5f4b21(0x1d7)]===_0x5f4b21(0x1d4)?STATIC_ANALYSIS[_0x5f4b21(0x1c8)][_0x5f4b21(0x19e)]:STATIC_ANALYSIS[_0x5f4b21(0x1c8)][_0x5f4b21(0x1c0)],'rule':_0x51cf66[_0x5f4b21(0x1ce)]||'unknown','message':_0x51cf66[_0x5f4b21(0x1c2)],'category':this['categorizeStylelintRule'](_0x51cf66[_0x5f4b21(0x1ce)]),'fixable':![],'source':_0x5f4b21(0x1aa)});}}}catch(_0x57f9dd){this[_0x5f4b21(0x1ab)]?.[_0x5f4b21(0x1c6)]('Stylelint\x20analysis\x20failed',{'file':_0x4db899,'error':_0x57f9dd[_0x5f4b21(0x1ac)]});}return _0x4b9c89;}['formatPostCSSError'](_0x2b2761,_0x5741c1){const _0x2881cc=a0_0x9bcabf;return{'file':_0x5741c1,'line':_0x2b2761[_0x2881cc(0x1b1)]||0x1,'column':_0x2b2761[_0x2881cc(0x1d8)]||0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x2881cc(0x19e)],'rule':_0x2b2761['name']||'CssSyntaxError','message':_0x2b2761[_0x2881cc(0x1a0)]||_0x2b2761[_0x2881cc(0x1ac)],'category':STATIC_ANALYSIS[_0x2881cc(0x1cf)]['SYNTAX'],'fixable':![],'source':_0x2881cc(0x19a),'code':_0x2b2761[_0x2881cc(0x1bf)]||undefined};}[a0_0x9bcabf(0x1a6)](_0x1f31af){const _0x556bac=a0_0x9bcabf;if(!_0x1f31af)return STATIC_ANALYSIS[_0x556bac(0x1cf)]['STYLE'];const _0x4a72de=_0x1f31af['toLowerCase']();if(_0x4a72de[_0x556bac(0x1b0)]('no-invalid')||_0x4a72de['includes'](_0x556bac(0x1a1))||_0x4a72de[_0x556bac(0x1b0)]('no-empty')||_0x4a72de['includes']('syntax'))return STATIC_ANALYSIS['CATEGORY']['SYNTAX'];if(_0x4a72de['includes'](_0x556bac(0x1a8))||_0x4a72de[_0x556bac(0x1b0)]('optimize'))return STATIC_ANALYSIS[_0x556bac(0x1cf)][_0x556bac(0x19b)];if(_0x4a72de[_0x556bac(0x1b0)]('best-practice')||_0x4a72de[_0x556bac(0x1b0)](_0x556bac(0x1ae)))return STATIC_ANALYSIS['CATEGORY'][_0x556bac(0x1a9)];return STATIC_ANALYSIS['CATEGORY'][_0x556bac(0x1d2)];}['detectLanguage'](_0x346bde){const _0x53c656=a0_0x9bcabf,_0xae8f6c=_0x346bde['toLowerCase']();if(_0xae8f6c[_0x53c656(0x1c9)](_0x53c656(0x1db))||_0xae8f6c['endsWith']('.sass'))return'scss';if(_0xae8f6c['endsWith']('.less'))return _0x53c656(0x1bb);return'css';}[a0_0x9bcabf(0x19f)](){const _0x538435=a0_0x9bcabf;return['.css','.scss',_0x538435(0x1b2),_0x538435(0x1b9)];}['supportsAutoFix'](){return![];}}function a0_0x2741(){const _0x5c4f13=['y2HLy2TtEw50yxG','CNvSzq','q0furuDpuLK','BgLUDa','DxnL','u1rzteu','ndq2ndmYogT5uKPiqq','zxjYB3i','mLzRA01tra','zNvUy3rPB24','C2v2zxjPDhK','y29SDw1U','Bg93zxi','yw5HBhL6zq','lNnJC3m','Cg9ZDgnZCY1Zy3nZ','mJe3mZuZow1qExHPvG','Cg9ZDgnZCW','uevsrK9stufoq0u','Cg9ZDgnZCY1SzxnZ','nZi1mZe1nuLUqxDjrW','rvjst1i','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','CMvHC29U','BM8TDw5RBM93BG','mtC3otyWEg5SCw1I','mtmXngjjBuzkwa','C2nZCW','zgvMyxvSDa','y2f0zwDVCML6zvn0EwXLBgLUDfj1Bgu','zgvIDwC','CgvYzM9YBwfUy2u','qKvtvf9quKfdveLdrq','C3r5BgvSAw50','Bg9Nz2vY','BwvZC2fNzq','BMCTzgvLCa','CMvJB21Tzw5Kzwq','mta3nZy4nxHxwKXkEa','Aw5JBhvKzxm','BgLUzq','lNnHC3m','BgvUz3rO','D2fYBMLUz3m','zxH0zw5K','oda4odi4meztuefIwG','mZzREgrSEMu','BgLUDfn0EwXLCW','lMXLC3m','Cg9ZDgnZC1nJC3m','BgvZCW','CgX1z2LU','zwfJAa','CMvZDwX0CW','C291CMnL','v0fstKLorW','ChvZAa','Dgv4Da','Cg9ZDgnZC0XLC3m','q1ntigfUywX5C2LZigzHAwXLza','mtG2mtG1q2vruhf0','D2fYBG','zMLSDgvY','u0vwrvjjvfK','zw5KC1DPDgG','CM9VDa','l15JDxn0B20TlW','BwL4Aw4'];a0_0x2741=function(){return _0x5c4f13;};return a0_0x2741();}function a0_0x4f6b(_0x4ce494,_0x558bd3){_0x4ce494=_0x4ce494-0x198;const _0x2741c0=a0_0x2741();let _0x4f6bac=_0x2741c0[_0x4ce494];if(a0_0x4f6b['YSyQKP']===undefined){var _0x52a243=function(_0x2fc751){const _0x23e391='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1d501b='',_0xada45f='';for(let _0x5c24ed=0x0,_0x46a196,_0x187651,_0x4d9977=0x0;_0x187651=_0x2fc751['charAt'](_0x4d9977++);~_0x187651&&(_0x46a196=_0x5c24ed%0x4?_0x46a196*0x40+_0x187651:_0x187651,_0x5c24ed++%0x4)?_0x1d501b+=String['fromCharCode'](0xff&_0x46a196>>(-0x2*_0x5c24ed&0x6)):0x0){_0x187651=_0x23e391['indexOf'](_0x187651);}for(let _0x557654=0x0,_0x3b17aa=_0x1d501b['length'];_0x557654<_0x3b17aa;_0x557654++){_0xada45f+='%'+('00'+_0x1d501b['charCodeAt'](_0x557654)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xada45f);};a0_0x4f6b['mPuXpf']=_0x52a243,a0_0x4f6b['jRLWgo']={},a0_0x4f6b['YSyQKP']=!![];}const _0x462f7f=_0x2741c0[0x0],_0x151753=_0x4ce494+_0x462f7f,_0x2ae56d=a0_0x4f6b['jRLWgo'][_0x151753];return!_0x2ae56d?(_0x4f6bac=a0_0x4f6b['mPuXpf'](_0x4f6bac),a0_0x4f6b['jRLWgo'][_0x151753]=_0x4f6bac):_0x4f6bac=_0x2ae56d,_0x4f6bac;}export default CSSAnalyzer;
1
+ const a0_0x91cba5=a0_0x46d0;(function(_0xbac233,_0x955679){const _0x2d9e69=a0_0x46d0,_0x2ec92b=_0xbac233();while(!![]){try{const _0x372fb5=parseInt(_0x2d9e69(0x16b))/0x1+parseInt(_0x2d9e69(0x159))/0x2+-parseInt(_0x2d9e69(0x149))/0x3+-parseInt(_0x2d9e69(0x152))/0x4*(-parseInt(_0x2d9e69(0x143))/0x5)+-parseInt(_0x2d9e69(0x14b))/0x6+-parseInt(_0x2d9e69(0x14e))/0x7+parseInt(_0x2d9e69(0x13c))/0x8;if(_0x372fb5===_0x955679)break;else _0x2ec92b['push'](_0x2ec92b['shift']());}catch(_0x4815bc){_0x2ec92b['push'](_0x2ec92b['shift']());}}}(a0_0x5dac,0xb9e3c));function a0_0x46d0(_0xf16503,_0x4a31a8){_0xf16503=_0xf16503-0x136;const _0x5dac74=a0_0x5dac();let _0x46d01b=_0x5dac74[_0xf16503];if(a0_0x46d0['OuTxvu']===undefined){var _0x4599c7=function(_0x5e7cdc){const _0x1c1c34='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xabd835='',_0x293bc4='';for(let _0x57b06c=0x0,_0x46b0cb,_0x9d41f5,_0x3bdd77=0x0;_0x9d41f5=_0x5e7cdc['charAt'](_0x3bdd77++);~_0x9d41f5&&(_0x46b0cb=_0x57b06c%0x4?_0x46b0cb*0x40+_0x9d41f5:_0x9d41f5,_0x57b06c++%0x4)?_0xabd835+=String['fromCharCode'](0xff&_0x46b0cb>>(-0x2*_0x57b06c&0x6)):0x0){_0x9d41f5=_0x1c1c34['indexOf'](_0x9d41f5);}for(let _0x2d415d=0x0,_0x6301e4=_0xabd835['length'];_0x2d415d<_0x6301e4;_0x2d415d++){_0x293bc4+='%'+('00'+_0xabd835['charCodeAt'](_0x2d415d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x293bc4);};a0_0x46d0['uJwEKj']=_0x4599c7,a0_0x46d0['DMsbQh']={},a0_0x46d0['OuTxvu']=!![];}const _0x7606f2=_0x5dac74[0x0],_0xfeeb80=_0xf16503+_0x7606f2,_0x1b1a92=a0_0x46d0['DMsbQh'][_0xfeeb80];return!_0x1b1a92?(_0x46d01b=a0_0x46d0['uJwEKj'](_0x46d01b),a0_0x46d0['DMsbQh'][_0xfeeb80]=_0x46d01b):_0x46d01b=_0x1b1a92,_0x46d01b;}import{STATIC_ANALYSIS}from'../utilities/constants.js';class CSSAnalyzer{constructor(_0xabd835=null){const _0x41d98f=a0_0x46d0;this[_0x41d98f(0x141)]=_0xabd835,this['stylelint']=null,this['postcss']=null,this[_0x41d98f(0x139)]=null,this['postcssLess']=null;}async['analyze'](_0x293bc4,_0x57b06c,_0x46b0cb={}){const _0xae6725=a0_0x46d0;try{const _0x9d41f5=[],_0x3bdd77=this[_0xae6725(0x147)](_0x293bc4),_0x2d415d=await this[_0xae6725(0x15f)](_0x293bc4,_0x57b06c,_0x3bdd77);_0x9d41f5['push'](..._0x2d415d);if(_0x2d415d['length']===0x0){const _0x6301e4=await this[_0xae6725(0x15c)](_0x293bc4,_0x57b06c,_0x3bdd77);_0x9d41f5['push'](..._0x6301e4);}return this[_0xae6725(0x141)]?.['debug']('CSS\x20analysis\x20completed',{'file':_0x293bc4,'language':_0x3bdd77,'totalDiagnostics':_0x9d41f5['length'],'errors':_0x9d41f5['filter'](_0x1f4caf=>_0x1f4caf[_0xae6725(0x13d)]===STATIC_ANALYSIS['SEVERITY'][_0xae6725(0x165)])[_0xae6725(0x13e)],'warnings':_0x9d41f5['filter'](_0x2c1731=>_0x2c1731[_0xae6725(0x13d)]===STATIC_ANALYSIS[_0xae6725(0x169)][_0xae6725(0x14f)])[_0xae6725(0x13e)]}),_0x9d41f5;}catch(_0x5772fc){return this['logger']?.['error']('CSS\x20analysis\x20failed',{'file':_0x293bc4,'error':_0x5772fc['message']}),[];}}async[a0_0x91cba5(0x15f)](_0x4a9b37,_0x3c1d83,_0x321cc0){const _0x389c14=a0_0x91cba5,_0x6648f6=[];try{if(!this[_0x389c14(0x148)]){const _0x24815a=await import('postcss');this[_0x389c14(0x148)]=_0x24815a['default'];}let _0x3e8261=null;if(_0x321cc0==='scss'){if(!this[_0x389c14(0x139)]){const _0x508268=await import('postcss-scss');this[_0x389c14(0x139)]=_0x508268['default'];}_0x3e8261=this['postcssScss'];}else{if(_0x321cc0==='less'){if(!this['postcssLess']){const _0x4cbe97=await import(_0x389c14(0x16d));this[_0x389c14(0x15d)]=_0x4cbe97[_0x389c14(0x163)];}_0x3e8261=this[_0x389c14(0x15d)];}}const _0x141c0e=this[_0x389c14(0x148)]()['process'](_0x3c1d83,{'from':_0x4a9b37,'syntax':_0x3e8261}),_0x4d8478=_0x141c0e['root'];this['logger']?.['debug']('PostCSS\x20syntax\x20check\x20passed',{'file':_0x4a9b37});}catch(_0x365bf3){const _0x571580=this[_0x389c14(0x138)](_0x365bf3,_0x4a9b37);_0x571580&&_0x6648f6[_0x389c14(0x146)](_0x571580);}return _0x6648f6;}async['lintStyles'](_0x13aeac,_0xaca8de,_0x2e64f9){const _0x12bea3=a0_0x91cba5,_0x564811=[];try{if(!this['stylelint']){const _0xf728bd=await import('stylelint');this[_0x12bea3(0x16f)]=_0xf728bd['default'];}const _0x521eff={'extends':['stylelint-config-standard'],'rules':{'color-no-invalid-hex':!![],'font-family-no-duplicate-names':!![],'function-calc-no-invalid':!![],'string-no-newline':!![],'unit-no-unknown':!![],'property-no-unknown':!![],'declaration-block-no-duplicate-properties':!![],'selector-pseudo-class-no-unknown':!![],'selector-pseudo-element-no-unknown':!![],'selector-type-no-unknown':[!![],{'ignoreTypes':[_0x12bea3(0x144),_0x12bea3(0x160)]}],'media-feature-name-no-unknown':!![],'at-rule-no-unknown':_0x2e64f9==='scss'?[!![],{'ignoreAtRules':['mixin','include',_0x12bea3(0x175),'if',_0x12bea3(0x142),_0x12bea3(0x166),'each','while',_0x12bea3(0x153),_0x12bea3(0x151),_0x12bea3(0x154),'use','forward']}]:_0x2e64f9===_0x12bea3(0x155)?[!![],{'ignoreAtRules':['plugin']}]:!![],'comment-no-empty':!![],'no-duplicate-selectors':!![],'no-empty-source':null,'block-no-empty':!![],'declaration-block-no-shorthand-property-overrides':!![],'font-family-no-missing-generic-family-keyword':!![],'function-linear-gradient-no-nonstandard-direction':!![],'no-descending-specificity':null,'no-duplicate-at-import-rules':!![],'no-extra-semicolons':!![],'no-invalid-double-slash-comments':!![],'selector-pseudo-element-colon-notation':'double','selector-type-case':_0x12bea3(0x13a)},'customSyntax':_0x2e64f9===_0x12bea3(0x156)?_0x12bea3(0x150):_0x2e64f9===_0x12bea3(0x155)?'postcss-less':undefined},_0xe02625=await this[_0x12bea3(0x16f)]['lint']({'code':_0xaca8de,'codeFilename':_0x13aeac,'config':_0x521eff});if(_0xe02625[_0x12bea3(0x172)]&&_0xe02625['results'][_0x12bea3(0x13e)]>0x0){const _0x46bb12=_0xe02625['results'][0x0];if(_0x46bb12['warnings'])for(const _0x571aca of _0x46bb12['warnings']){_0x564811['push']({'file':_0x13aeac,'line':_0x571aca['line']||0x1,'column':_0x571aca[_0x12bea3(0x16e)]||0x1,'severity':_0x571aca['severity']===_0x12bea3(0x157)?STATIC_ANALYSIS[_0x12bea3(0x169)][_0x12bea3(0x165)]:STATIC_ANALYSIS['SEVERITY'][_0x12bea3(0x14f)],'rule':_0x571aca[_0x12bea3(0x161)]||'unknown','message':_0x571aca['text'],'category':this['categorizeStylelintRule'](_0x571aca[_0x12bea3(0x161)]),'fixable':![],'source':'stylelint'});}}}catch(_0xfff92d){this['logger']?.[_0x12bea3(0x16c)](_0x12bea3(0x14c),{'file':_0x13aeac,'error':_0xfff92d['message']});}return _0x564811;}[a0_0x91cba5(0x138)](_0x1627c7,_0x3ab484){const _0x37d701=a0_0x91cba5;return{'file':_0x3ab484,'line':_0x1627c7[_0x37d701(0x136)]||0x1,'column':_0x1627c7[_0x37d701(0x16e)]||0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x37d701(0x165)],'rule':_0x1627c7[_0x37d701(0x15b)]||_0x37d701(0x158),'message':_0x1627c7[_0x37d701(0x167)]||_0x1627c7['message'],'category':STATIC_ANALYSIS['CATEGORY'][_0x37d701(0x15a)],'fixable':![],'source':_0x37d701(0x148),'code':_0x1627c7[_0x37d701(0x162)]||undefined};}[a0_0x91cba5(0x16a)](_0xdb285c){const _0x40565a=a0_0x91cba5;if(!_0xdb285c)return STATIC_ANALYSIS['CATEGORY']['STYLE'];const _0x18a309=_0xdb285c[_0x40565a(0x140)]();if(_0x18a309[_0x40565a(0x14a)]('no-invalid')||_0x18a309['includes']('no-unknown')||_0x18a309['includes'](_0x40565a(0x171))||_0x18a309[_0x40565a(0x14a)]('syntax'))return STATIC_ANALYSIS['CATEGORY'][_0x40565a(0x15a)];if(_0x18a309['includes'](_0x40565a(0x145))||_0x18a309[_0x40565a(0x14a)]('optimize'))return STATIC_ANALYSIS[_0x40565a(0x170)][_0x40565a(0x137)];if(_0x18a309[_0x40565a(0x14a)](_0x40565a(0x13f))||_0x18a309[_0x40565a(0x14a)]('recommended'))return STATIC_ANALYSIS['CATEGORY']['BEST_PRACTICE'];return STATIC_ANALYSIS['CATEGORY'][_0x40565a(0x164)];}[a0_0x91cba5(0x147)](_0x261930){const _0x2dc1e0=a0_0x91cba5,_0x2df17f=_0x261930[_0x2dc1e0(0x140)]();if(_0x2df17f[_0x2dc1e0(0x168)]('.scss')||_0x2df17f['endsWith'](_0x2dc1e0(0x173)))return _0x2dc1e0(0x156);if(_0x2df17f[_0x2dc1e0(0x168)]('.less'))return _0x2dc1e0(0x155);return'css';}[a0_0x91cba5(0x174)](){const _0x75e892=a0_0x91cba5;return[_0x75e892(0x14d),'.scss','.sass',_0x75e892(0x15e)];}[a0_0x91cba5(0x13b)](){return![];}}function a0_0x5dac(){const _0xf25f57=['Cg9ZDgnZCY1SzxnZ','y29SDw1U','C3r5BgvSAw50','q0furuDpuLK','BM8Tzw1WDhK','CMvZDwX0CW','lNnHC3m','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','zxH0zw5K','BgLUzq','uevsrK9stufoq0u','zM9YBwf0ug9ZDentu0vYCM9Y','Cg9ZDgnZC1nJC3m','Bg93zxi','C3vWCg9YDhnbDxrVrML4','mteWodqWndHwveLJyMG','C2v2zxjPDhK','BgvUz3rO','yMvZDc1WCMfJDgLJzq','Dg9mB3DLCKnHC2u','Bg9Nz2vY','zwXZzq','mtm3nJvtvuXrELa','l15JDxn0B20TlW','CgvYzM9YBwfUy2u','ChvZAa','zgv0zwn0tgfUz3vHz2u','Cg9ZDgnZCW','ndiZmZG2mw5XEg1cwa','Aw5JBhvKzxm','mZm4nJa4ofvbzuTNvW','u3r5BgvSAw50igfUywX5C2LZigzHAwXLza','lMnZCW','mtK3nJG0mMLmvg1lEG','v0fstKLorW','Cg9ZDgnZCY1Zy3nZ','CMv0DxjU','mtG2mhbLtvPmDa','zNvUy3rPB24','y29UDgvUDa','BgvZCW','C2nZCW','zxjYB3i','q3nZu3LUDgf4rxjYB3i','mJGYodK2wvr5wwPU','u1Lovefy','BMfTzq','BgLUDfn0EwXLCW','Cg9ZDgnZC0XLC3m','lMXLC3m','y2HLy2TtEw50yxG','BMCTzgvLCa','CNvSzq','C291CMnL','zgvMyxvSDa','u1rzteu','rvjst1i','zM9Y','CMvHC29U','zw5KC1DPDgG','u0vwrvjjvfK','y2f0zwDVCML6zvn0EwXLBgLUDfj1Bgu','mJeYmZq2Cu9xD2Di','D2fYBG'];a0_0x5dac=function(){return _0xf25f57;};return a0_0x5dac();}export default CSSAnalyzer;
@@ -1 +1 @@
1
- const a0_0x4253e6=a0_0x2b15;function a0_0x2b15(_0x4db42d,_0x247a43){_0x4db42d=_0x4db42d-0x1d4;const _0xa6c53a=a0_0xa6c5();let _0x2b15d8=_0xa6c53a[_0x4db42d];if(a0_0x2b15['qbVoDU']===undefined){var _0x24f1a7=function(_0x4567e0){const _0x3ff7e5='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x589e12='',_0x3c877b='';for(let _0x45db8d=0x0,_0x474ba4,_0x35b2f8,_0x19a1f1=0x0;_0x35b2f8=_0x4567e0['charAt'](_0x19a1f1++);~_0x35b2f8&&(_0x474ba4=_0x45db8d%0x4?_0x474ba4*0x40+_0x35b2f8:_0x35b2f8,_0x45db8d++%0x4)?_0x589e12+=String['fromCharCode'](0xff&_0x474ba4>>(-0x2*_0x45db8d&0x6)):0x0){_0x35b2f8=_0x3ff7e5['indexOf'](_0x35b2f8);}for(let _0x38d099=0x0,_0x553856=_0x589e12['length'];_0x38d099<_0x553856;_0x38d099++){_0x3c877b+='%'+('00'+_0x589e12['charCodeAt'](_0x38d099)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3c877b);};a0_0x2b15['nFsMpb']=_0x24f1a7,a0_0x2b15['pqcNkT']={},a0_0x2b15['qbVoDU']=!![];}const _0xe6eb60=_0xa6c53a[0x0],_0x1aed39=_0x4db42d+_0xe6eb60,_0x221a3d=a0_0x2b15['pqcNkT'][_0x1aed39];return!_0x221a3d?(_0x2b15d8=a0_0x2b15['nFsMpb'](_0x2b15d8),a0_0x2b15['pqcNkT'][_0x1aed39]=_0x2b15d8):_0x2b15d8=_0x221a3d,_0x2b15d8;}(function(_0x50dbf9,_0x483d63){const _0x52e6c2=a0_0x2b15,_0xd36b14=_0x50dbf9();while(!![]){try{const _0x422e6f=-parseInt(_0x52e6c2(0x207))/0x1*(-parseInt(_0x52e6c2(0x1f3))/0x2)+-parseInt(_0x52e6c2(0x1ed))/0x3*(parseInt(_0x52e6c2(0x22a))/0x4)+-parseInt(_0x52e6c2(0x214))/0x5*(parseInt(_0x52e6c2(0x21e))/0x6)+parseInt(_0x52e6c2(0x21b))/0x7*(-parseInt(_0x52e6c2(0x1e2))/0x8)+parseInt(_0x52e6c2(0x22b))/0x9+parseInt(_0x52e6c2(0x231))/0xa+-parseInt(_0x52e6c2(0x22d))/0xb;if(_0x422e6f===_0x483d63)break;else _0xd36b14['push'](_0xd36b14['shift']());}catch(_0x488462){_0xd36b14['push'](_0xd36b14['shift']());}}}(a0_0xa6c5,0x8c0e1));import{exec}from'child_process';import{promisify}from'util';import a0_0x589e12 from'path';import a0_0x3c877b from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';function a0_0xa6c5(){const _0x459055=['D2fYBG','AgfKB2XPBNqGls1MB3jTyxqGANnVBIaI','CgfYC2vdAgvJA292uMvZDwX0CW','ANnVBI1Zy2HLBwe','DhjPBq','y29TCgLSzxjpChrPB25Z','ANnVBG','su5gtW','C3rKB3v0','DgvZDa','DMvYC2LVBG','DMfSAwrHDgvfBNzgAwXL','DMfSAwrHDgLVBG','AgfKB2XPBNqGls12zxjZAw9U','ChvZAa','y2HLy2TVDIb2ywXPzgf0Aw9UigzHAwXLza','BwfWq2HLy2TVDLnLDMvYAxr5','C2v2zxjPDhK','AgLNAa','Aw5ZDgfUy2vqyxrO','yMvZDc1WCMfJDgLJzq','y2HHBMDLBwu','zgvMyxvSDa','rgLZywjSAw5Nig5Vsw1WBgLJAxrbBNKGCMvKDwnLCYb0ExbLihnHzMv0Eq','EwfTBa','C3LUDgf4','mZj2u3vVsMi','sw52ywXPzcbku09ooIa','BM9YBwfSAxPLuMvZDwX0CW','Bg9Nz2vY','z2v0vMfSAwrHDg9Yu3rHDhvZ','q29UC2LKzxiGzw5HyMXPBMCGiNn0CMLJDciGBw9KzsbMB3iGyMv0DgvYihr5CguGC2fMzxr5','y2HLy2TFAwq','EwfTBgXPBNqGBM90igf2ywLSywjSzq','zMLSzv9SAw5Lx3jHBMDL','ywP2lwzVCM1HDhm','AZHZ','oti3mdmZzLzwBhfS','A3vIzxjUzxrLCW','DMfSAwrHDgvuC0nVBMzPzW','CNvSzq','DhnJB25MAwCTDMfSAwrHDg9Y','zxjYB3i','mJjhAK9lr2i','CgfJA2fNzs5QC29U','C3bSAxq','y29SDw1U','zg9JA2vYzMLSzq','B2jQzwn0','BwvZC2fNzq','zgv0zwn0qxzHAwXHyMXLvMfSAwrHDg9YCW','rMfPBgvKihrVihbHCNnLignOzwnRB3yGB3v0Chv0','DMfSAwrHDg9Y','CMvHzezPBgu','rvjst1i','CgLWigLUC3rHBgWGy2HLy2TVDG','zgv0zwn0rMLSzvr5Cgu','CgfYC2u','ic0TB3v0Chv0igPZB24Gls1JB21Wywn0','AgfKB2XPBNqGzgv0zwn0zwq','ANnVBLnJAgvTyq','BgLUzq','y29TCgLSzq','mta3mJLrqwnUrhm','iIaTlwzYyw1LD29YAYa','Dg9Rzw4','CMvMzxjLBMnLCW','BwfWsgfKB2XPBNrtzxzLCML0Eq','DMfSAwrHDgvzqu1m','ChjPDMf0zsbRzxK','vw5RBM93BIbJB25MAwCGzMLSzsb0ExbL','zgvIDwC','zxjYB3jZ','BgvUz3rO','y2HLy2TVDG','zMfPBgvKx2nOzwnRCW','mZa4mdq1rM9pBfLH','Dg9mB3DLCKnHC2u','DxrMltG','zg9JA2vYx2nVBxbVC2u','BwvKAxvT','y3DL','yxzHAwXHyMXLu2nHBM5LCNm','mJK0otK0zMLfDhvp','C3rHCNrZv2L0Aa','BM8TAw1WBgLJAxqTyw55','mZbRvw1JvLu','DhnJB25MAwCUANnVBG','u0vwrvjjvfK','DMfSAwrHDgvqywnRywDLsNnVBG','zg9JA2vYlwnVBxbVC2uUEw1S','y2f0zwDVCNK','lNrMDMfYCW','z3vPzgvSAw5L','lNLHBwW','C3rYAwn0lw1Vzgu','v0fstKLorW','ANnVBI1WyxjZzq','nhPVBvrYCW','nZKZnZeZnM1PDxPcvq','C3rYAw5N','nJC2mdeWnvLoALLwvq','zg9JA2vYlwnVBxbVC2uUEwfTBa','EwfTBgXPBNqGzgv0zwn0zwq','CgfYyw1Z','otCZotiXme9UthzltG','DMfSAwrHDgvxAxrOq2HLy2TVDG','DgvYCMfMB3jT','ywP2','CgfYC2vzyw1SBgLUDfjLC3vSDhm','zMLSDgvY','lMPZB24','y2HLy2TVDIaTzIaI','Bwf0y2G','DMfSAwrHDgveB2nRzxjMAwXL','sLnptIbJB25MAwD1CMf0Aw9UihzHBgLKyxrPB24','ug90zw50AwfSigHHCMrJB2rLzca'];a0_0xa6c5=function(){return _0x459055;};return a0_0xa6c5();}const execAsync=promisify(exec);class ConfigValidator{constructor(_0x45db8d=null){this['logger']=_0x45db8d,this['availableScanners']=null,this['scannerCache']=new Map();}async['detectAvailableValidators'](){const _0x532354=a0_0x2b15;if(this[_0x532354(0x21a)]!==null)return this['availableScanners'];const _0x474ba4={'checkov':![],'hadolint':![],'yamllint':![],'jsonSchema':![]};try{await execAsync('checkov\x20--version',{'timeout':0x1388}),_0x474ba4[_0x532354(0x212)]=!![],this['logger']?.[_0x532354(0x20f)]('checkov\x20detected');}catch(_0x35b2f8){this['logger']?.['debug']('checkov\x20not\x20available',{'error':_0x35b2f8['message']});}try{await execAsync(_0x532354(0x1d5),{'timeout':0x1388}),_0x474ba4['hadolint']=!![],this[_0x532354(0x1e5)]?.[_0x532354(0x20f)](_0x532354(0x203));}catch(_0x19a1f1){this[_0x532354(0x1e5)]?.[_0x532354(0x20f)]('hadolint\x20not\x20available',{'error':_0x19a1f1['message']});}try{await execAsync('yamllint\x20--version',{'timeout':0x1388}),_0x474ba4['yamllint']=!![],this[_0x532354(0x1e5)]?.['debug'](_0x532354(0x22f));}catch(_0x38d099){this['logger']?.[_0x532354(0x20f)](_0x532354(0x1e9),{'error':_0x38d099['message']});}try{await import(_0x532354(0x234)),_0x474ba4[_0x532354(0x204)]=!![],this[_0x532354(0x1e5)]?.['debug']('JSON\x20Schema\x20validation\x20available');}catch(_0x553856){this[_0x532354(0x1e5)]?.['debug']('ajv\x20not\x20available',{'error':_0x553856['message']});}return this['availableScanners']=_0x474ba4,_0x474ba4;}async['validate'](_0x6ff10b,_0x755de0={}){const _0x1baf7c=a0_0x2b15,_0x2f7b10=[],_0x3acc68=await this[_0x1baf7c(0x1fa)](),_0x4ee872=this[_0x1baf7c(0x200)](_0x6ff10b);this[_0x1baf7c(0x1e5)]?.['debug']('Validating\x20config\x20file',{'filePath':_0x6ff10b,'fileType':_0x4ee872});switch(_0x4ee872){case'dockerfile':if(_0x3acc68['hadolint']){const _0x378c5e=await this[_0x1baf7c(0x23a)](_0x6ff10b,_0x755de0);_0x2f7b10[_0x1baf7c(0x1d6)](..._0x378c5e);}if(_0x3acc68['checkov']){const _0x3bf6a8=await this[_0x1baf7c(0x232)](_0x6ff10b,_0x1baf7c(0x1f7),_0x755de0);_0x2f7b10['push'](..._0x3bf6a8);}break;case'docker-compose':if(_0x3acc68['yamllint']){const _0x5e6606=await this[_0x1baf7c(0x20c)](_0x6ff10b,_0x755de0);_0x2f7b10['push'](..._0x5e6606);}if(_0x3acc68['checkov']){const _0x32f7bb=await this[_0x1baf7c(0x232)](_0x6ff10b,_0x1baf7c(0x217),_0x755de0);_0x2f7b10['push'](..._0x32f7bb);}break;case _0x1baf7c(0x1ee):if(_0x3acc68['yamllint']){const _0x48fba0=await this['validateYAML'](_0x6ff10b,_0x755de0);_0x2f7b10[_0x1baf7c(0x1d6)](..._0x48fba0);}if(_0x3acc68[_0x1baf7c(0x212)]){const _0xf1fc16=await this['validateWithCheckov'](_0x6ff10b,_0x1baf7c(0x1ee),_0x755de0);_0x2f7b10[_0x1baf7c(0x1d6)](..._0xf1fc16);}break;case'terraform':if(_0x3acc68['checkov']){const _0x35ad61=await this[_0x1baf7c(0x232)](_0x6ff10b,_0x1baf7c(0x233),_0x755de0);_0x2f7b10['push'](..._0x35ad61);}break;case _0x1baf7c(0x1f4):if(_0x3acc68[_0x1baf7c(0x204)]){const _0x2c45c4=await this[_0x1baf7c(0x221)](_0x6ff10b,_0x755de0);_0x2f7b10['push'](..._0x2c45c4);}break;case _0x1baf7c(0x21f):if(_0x3acc68[_0x1baf7c(0x204)]){const _0x23e537=await this[_0x1baf7c(0x1ef)](_0x6ff10b,_0x755de0);_0x2f7b10[_0x1baf7c(0x1d6)](..._0x23e537);}break;case'github-actions':if(_0x3acc68['yamllint']){const _0xdad36a=await this[_0x1baf7c(0x20c)](_0x6ff10b,_0x755de0);_0x2f7b10[_0x1baf7c(0x1d6)](..._0xdad36a);}break;case'env':const _0x462a8c=await this[_0x1baf7c(0x248)](_0x6ff10b,_0x755de0);_0x2f7b10['push'](..._0x462a8c);break;case _0x1baf7c(0x1e0):if(_0x3acc68['yamllint']){const _0x3d4148=await this[_0x1baf7c(0x20c)](_0x6ff10b,_0x755de0);_0x2f7b10['push'](..._0x3d4148);}break;default:this[_0x1baf7c(0x1e5)]?.[_0x1baf7c(0x23d)](_0x1baf7c(0x20e),{'filePath':_0x6ff10b,'fileType':_0x4ee872});return[];}return this[_0x1baf7c(0x1e4)](_0x2f7b10);}async['validateDockerfile'](_0x3b48ad,_0x2cd95b={}){const _0x3b9a0e=a0_0x2b15;try{const _0x983fa0=await execAsync(_0x3b9a0e(0x23e)+_0x3b48ad+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0x2ac6c0=JSON['parse'](_0x983fa0['stdout']);return this['parseHadolintResults'](_0x2ac6c0,_0x3b48ad);}catch(_0x5f49a8){if(_0x5f49a8[_0x3b9a0e(0x245)])try{const _0x5ec9b0=JSON[_0x3b9a0e(0x201)](_0x5f49a8['stdout']);return this['parseHadolintResults'](_0x5ec9b0,_0x3b48ad);}catch(_0xf1cca2){this['logger']?.[_0x3b9a0e(0x1f2)]('Failed\x20to\x20parse\x20hadolint\x20output',{'error':_0xf1cca2['message']});}return this['logger']?.[_0x3b9a0e(0x1f2)]('hadolint\x20validation\x20failed',{'error':_0x5f49a8[_0x3b9a0e(0x1f9)]}),[];}}['parseHadolintResults'](_0x4ee372,_0x474c4f){const _0x360137=a0_0x2b15,_0x177ac5=[];if(Array['isArray'](_0x4ee372))for(const _0x30fa55 of _0x4ee372){_0x177ac5[_0x360137(0x1d6)]({'file':_0x474c4f,'line':_0x30fa55[_0x360137(0x205)]||0x1,'column':_0x30fa55[_0x360137(0x1f6)]||0x1,'severity':this['mapHadolintSeverity'](_0x30fa55['level']),'rule':_0x30fa55['code'],'message':_0x30fa55[_0x360137(0x1f9)],'category':_0x360137(0x1f7),'validator':'hadolint'});}return _0x177ac5;}async['validateYAML'](_0x36c1ed,_0x11aea4={}){const _0x3d332d=a0_0x2b15;try{const _0x2722a2=await execAsync('yamllint\x20-f\x20parsable\x20\x22'+_0x36c1ed+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530});return this[_0x3d332d(0x235)](_0x2722a2['stdout'],_0x36c1ed);}catch(_0x576590){if(_0x576590[_0x3d332d(0x245)])return this['parseYamllintResults'](_0x576590[_0x3d332d(0x245)],_0x36c1ed);return this[_0x3d332d(0x1e5)]?.['error']('yamllint\x20validation\x20failed',{'error':_0x576590['message']}),[];}}['parseYamllintResults'](_0x9187ec,_0x12cc66){const _0x19def8=a0_0x2b15,_0x34af1d=[],_0x494132=_0x9187ec[_0x19def8(0x1f5)]('\x0a')[_0x19def8(0x236)](_0x102a0f=>_0x102a0f[_0x19def8(0x241)]());for(const _0x37442e of _0x494132){const _0x5841b0=_0x37442e[_0x19def8(0x239)](/^(.+?):(\d+):(\d+):\s*\[(\w+)\]\s*(.+?)\s*\((.+?)\)/);if(_0x5841b0){const [,_0x3e3f20,_0x58cfc0,_0x30a432,_0x475be8,_0x54d8b7,_0x5f04ab]=_0x5841b0;_0x34af1d[_0x19def8(0x1d6)]({'file':_0x12cc66,'line':parseInt(_0x58cfc0,0xa),'column':parseInt(_0x30a432,0xa),'severity':this['mapYamllintSeverity'](_0x475be8),'rule':_0x5f04ab,'message':_0x54d8b7,'category':_0x19def8(0x1e0),'validator':'yamllint'});}}return _0x34af1d;}async[a0_0x4253e6(0x232)](_0x34fff2,_0x5e27fe,_0x5a38f6={}){const _0x8a9c15=a0_0x4253e6;try{const _0x3b4630=await execAsync(_0x8a9c15(0x238)+_0x34fff2+_0x8a9c15(0x208)+_0x5e27fe+_0x8a9c15(0x202),{'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0x320f0c=JSON[_0x8a9c15(0x201)](_0x3b4630[_0x8a9c15(0x245)]);return this['parseCheckovResults'](_0x320f0c,_0x34fff2);}catch(_0x31e567){if(_0x31e567[_0x8a9c15(0x245)])try{const _0x23a0c3=JSON['parse'](_0x31e567['stdout']);return this['parseCheckovResults'](_0x23a0c3,_0x34fff2);}catch(_0x34f46f){this['logger']?.['error'](_0x8a9c15(0x1fb),{'error':_0x34f46f['message']});}return this[_0x8a9c15(0x1e5)]?.['error'](_0x8a9c15(0x1d7),{'error':_0x31e567[_0x8a9c15(0x1f9)]}),[];}}[a0_0x4253e6(0x23f)](_0x56e580,_0x204330){const _0x30d9dc=a0_0x4253e6,_0x13e60e=[];if(_0x56e580['results']&&_0x56e580['results'][_0x30d9dc(0x213)])for(const _0x5c8dc2 of _0x56e580['results'][_0x30d9dc(0x213)]){_0x13e60e['push']({'file':_0x204330,'line':_0x5c8dc2[_0x30d9dc(0x1ea)]?_0x5c8dc2['file_line_range'][0x0]:0x1,'column':0x1,'severity':this['mapCheckovSeverity'](_0x5c8dc2['check_class']),'rule':_0x5c8dc2['check_id'],'message':_0x5c8dc2['check_name']||_0x5c8dc2[_0x30d9dc(0x1e8)],'category':'security','validator':_0x30d9dc(0x212),'remediation':_0x5c8dc2[_0x30d9dc(0x225)],'cwe':_0x5c8dc2[_0x30d9dc(0x219)],'references':_0x5c8dc2[_0x30d9dc(0x225)]?[_0x5c8dc2['guideline']]:[]});}return _0x13e60e;}async['validatePackageJson'](_0x25b460,_0xabadf={}){const _0x1f7b41=a0_0x4253e6;try{const _0x23ebc0=(await import('ajv'))[_0x1f7b41(0x1de)],_0x49b09a=(await import(_0x1f7b41(0x1eb)))[_0x1f7b41(0x1de)],_0x3b904a=await a0_0x3c877b['readFile'](_0x25b460,'utf-8'),_0x761227=JSON[_0x1f7b41(0x201)](_0x3b904a),_0x3f4386=new _0x23ebc0({'allErrors':!![],'strict':![]});_0x49b09a(_0x3f4386);const _0x42ddeb={'type':_0x1f7b41(0x1f8),'required':['name',_0x1f7b41(0x247)],'properties':{'name':{'type':_0x1f7b41(0x22c),'pattern':'^(?:@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$'},'version':{'type':'string'},'description':{'type':'string'},'main':{'type':'string'},'type':{'type':'string','enum':['module','commonjs']},'scripts':{'type':'object'},'dependencies':{'type':_0x1f7b41(0x1f8)},'devDependencies':{'type':_0x1f7b41(0x1f8)}},'additionalProperties':!![]},_0x38e1e9=_0x3f4386[_0x1f7b41(0x206)](_0x42ddeb),_0x348764=_0x38e1e9(_0x761227);if(!_0x348764&&_0x38e1e9[_0x1f7b41(0x210)])return _0x38e1e9[_0x1f7b41(0x210)]['map'](_0x2d6ad0=>({'file':_0x25b460,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x1f7b41(0x220)]['ERROR'],'rule':_0x1f7b41(0x240),'message':_0x2d6ad0[_0x1f7b41(0x1db)]?_0x2d6ad0['instancePath']+'\x20'+_0x2d6ad0[_0x1f7b41(0x1f9)]:'must\x20have\x20required\x20property\x20\x27'+_0x2d6ad0[_0x1f7b41(0x230)]['missingProperty']+'\x27','category':'validation','validator':'json-schema'}));return[];}catch(_0x20a660){return this[_0x1f7b41(0x1e5)]?.[_0x1f7b41(0x1f2)]('package.json\x20validation\x20failed',{'error':_0x20a660[_0x1f7b41(0x1f9)]}),[{'file':_0x25b460,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x1f7b41(0x1fe)],'rule':_0x1f7b41(0x229),'message':'Invalid\x20JSON:\x20'+_0x20a660['message'],'category':_0x1f7b41(0x1e1),'validator':'json-parse'}];}}async[a0_0x4253e6(0x1ef)](_0x154b5f,_0x2c2f8f={}){const _0x596684=a0_0x4253e6;try{const _0x1558e9=await a0_0x3c877b[_0x596684(0x1fd)](_0x154b5f,_0x596684(0x216)),_0x4fb3f5=JSON['parse'](_0x1558e9),_0x284490=[];if(_0x4fb3f5['compilerOptions']){const _0x19fd8b=_0x4fb3f5[_0x596684(0x242)];!_0x19fd8b['strict']&&_0x284490['push']({'file':_0x154b5f,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':_0x596684(0x227),'message':_0x596684(0x1e7),'category':_0x596684(0x1dc),'validator':_0x596684(0x1f1)}),_0x19fd8b['noImplicitAny']===![]&&_0x284490[_0x596684(0x1d6)]({'file':_0x154b5f,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x596684(0x220)]['WARNING'],'rule':_0x596684(0x21d),'message':_0x596684(0x1df),'category':'best-practice','validator':_0x596684(0x1f1)});}return _0x284490;}catch(_0x265006){return this[_0x596684(0x1e5)]?.[_0x596684(0x1f2)]('tsconfig.json\x20validation\x20failed',{'error':_0x265006[_0x596684(0x1f9)]}),[{'file':_0x154b5f,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x596684(0x1fe)],'rule':_0x596684(0x229),'message':_0x596684(0x1e3)+_0x265006[_0x596684(0x1f9)],'category':_0x596684(0x1e1),'validator':'json-parse'}];}}async['validateEnvFile'](_0x2fe225,_0x4415e0={}){const _0x1db483=a0_0x4253e6;try{const _0x445fbc=await a0_0x3c877b['readFile'](_0x2fe225,_0x1db483(0x216)),_0x241898=[],_0x4d7e2e=_0x445fbc['split']('\x0a'),_0x41c9d1=[{'pattern':/password|passwd|pwd/i,'name':'password'},{'pattern':/api[_-]?key/i,'name':'API\x20key'},{'pattern':/secret/i,'name':'secret'},{'pattern':/token/i,'name':_0x1db483(0x209)},{'pattern':/private[_-]?key/i,'name':_0x1db483(0x20d)},{'pattern':/aws[_-]?access/i,'name':'AWS\x20credentials'}];return _0x4d7e2e['forEach']((_0x5e2859,_0x2c1ce0)=>{const _0x35a629=_0x1db483,_0x26d484=_0x5e2859[_0x35a629(0x241)]();if(!_0x26d484||_0x26d484[_0x35a629(0x21c)]('#'))return;if(_0x26d484['includes']('=')){const [_0x4988f8,_0x3b3a03]=_0x26d484['split']('='),_0x333552=_0x4988f8[_0x35a629(0x215)](),_0x3c56e3=_0x3b3a03?.[_0x35a629(0x241)]()||'',_0x51c3e7=_0x3c56e3&&_0x3c56e3!==''&&!_0x3c56e3[_0x35a629(0x21c)]('$')&&_0x3c56e3!=='your-key-here'&&_0x3c56e3!==_0x35a629(0x1dd)&&_0x3c56e3[_0x35a629(0x211)]>0x5;if(_0x51c3e7)for(const {pattern:_0x57e224,name:_0x1850b7}of _0x41c9d1){if(_0x57e224[_0x35a629(0x246)](_0x333552)){_0x241898[_0x35a629(0x1d6)]({'file':_0x2fe225,'line':_0x2c1ce0+0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x35a629(0x220)]['CRITICAL'],'rule':'hardcoded-secret','message':_0x35a629(0x23c)+_0x1850b7+'\x20detected\x20in\x20.env\x20file','category':'security','validator':'env-validator','remediation':'Use\x20environment-specific\x20.env\x20files\x20and\x20add\x20.env\x20to\x20.gitignore'});break;}}}}),_0x241898;}catch(_0x383b2c){return this['logger']?.['error']('.env\x20validation\x20failed',{'error':_0x383b2c['message']}),[];}}['detectFileType'](_0x2441d6){const _0x1ef027=a0_0x4253e6,_0x5f402f=a0_0x589e12['basename'](_0x2441d6)['toLowerCase'](),_0x1ce333=a0_0x589e12['dirname'](_0x2441d6);if(_0x5f402f===_0x1ef027(0x1f7))return _0x1ef027(0x1f7);if(_0x5f402f===_0x1ef027(0x222)||_0x5f402f===_0x1ef027(0x22e))return'docker-compose';if(_0x5f402f==='package.json')return'package.json';if(_0x5f402f===_0x1ef027(0x21f))return'tsconfig.json';if(_0x5f402f==='.env'||_0x5f402f['endsWith']('.env'))return'env';if(_0x1ce333['includes']('.github/workflows'))return'github-actions';if(_0x1ce333['includes'](_0x1ef027(0x1ee))||_0x1ce333['includes'](_0x1ef027(0x1ec)))return _0x1ef027(0x1ee);const _0x4176f5=a0_0x589e12['extname'](_0x2441d6)['toLowerCase']();if(_0x4176f5==='.tf'||_0x4176f5===_0x1ef027(0x224))return'terraform';if(_0x4176f5==='.yml'||_0x4176f5===_0x1ef027(0x226))return _0x1ef027(0x1e0);if(_0x4176f5===_0x1ef027(0x237))return _0x1ef027(0x243);return'unknown';}[a0_0x4253e6(0x1e4)](_0x37ca84){const _0x210ac8=a0_0x4253e6;return _0x37ca84['map'](_0x578f8d=>({'file':_0x578f8d['file'],'line':_0x578f8d['line']||0x1,'column':_0x578f8d['column']||0x1,'severity':_0x578f8d[_0x210ac8(0x1d9)]||STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':_0x578f8d[_0x210ac8(0x1f0)]||'unknown','message':_0x578f8d[_0x210ac8(0x1f9)]||'Validation\x20issue\x20detected','category':_0x578f8d[_0x210ac8(0x223)]||_0x210ac8(0x1d4),'validator':_0x578f8d[_0x210ac8(0x1fc)],'cwe':_0x578f8d['cwe']||null,'remediation':_0x578f8d['remediation']||null,'references':_0x578f8d[_0x210ac8(0x20a)]||[]}));}[a0_0x4253e6(0x20b)](_0x370eda){const _0x3936cd=a0_0x4253e6,_0x586c74={'error':STATIC_ANALYSIS['SEVERITY']['ERROR'],'warning':STATIC_ANALYSIS['SEVERITY'][_0x3936cd(0x228)],'info':STATIC_ANALYSIS['SEVERITY']['INFO'],'style':STATIC_ANALYSIS['SEVERITY'][_0x3936cd(0x244)]};return _0x586c74[_0x370eda?.[_0x3936cd(0x215)]()]||STATIC_ANALYSIS['SEVERITY'][_0x3936cd(0x228)];}['mapYamllintSeverity'](_0x3502b8){const _0x57e771=a0_0x4253e6,_0x139eaf={'error':STATIC_ANALYSIS[_0x57e771(0x220)][_0x57e771(0x1fe)],'warning':STATIC_ANALYSIS[_0x57e771(0x220)]['WARNING']};return _0x139eaf[_0x3502b8?.['toLowerCase']()]||STATIC_ANALYSIS[_0x57e771(0x220)][_0x57e771(0x228)];}[a0_0x4253e6(0x1d8)](_0x2db3a3){const _0x53b4c2=a0_0x4253e6;return STATIC_ANALYSIS[_0x53b4c2(0x220)]['ERROR'];}async[a0_0x4253e6(0x1e6)](){const _0x185213=a0_0x4253e6,_0x517e3f=await this[_0x185213(0x1fa)]();return{'validators':_0x517e3f,'recommendations':this['getInstallRecommendations'](_0x517e3f)};}['getInstallRecommendations'](_0x56c50f){const _0x4a01a4=a0_0x4253e6,_0x31fa5b=[];return!_0x56c50f[_0x4a01a4(0x212)]&&_0x31fa5b['push']({'validator':_0x4a01a4(0x212),'reason':'Infrastructure\x20as\x20Code\x20security\x20scanning\x20(Docker,\x20Kubernetes,\x20Terraform)','install':_0x4a01a4(0x1ff),'priority':'high'}),!_0x56c50f['hadolint']&&_0x31fa5b['push']({'validator':'hadolint','reason':'Dockerfile\x20linting\x20and\x20best\x20practices','install':'Download from https://github.com/hadolint/hadolint/releases','priority':_0x4a01a4(0x1da)}),!_0x56c50f['yamllint']&&_0x31fa5b['push']({'validator':'yamllint','reason':'YAML\x20file\x20validation','install':'pip\x20install\x20yamllint','priority':'medium'}),!_0x56c50f[_0x4a01a4(0x204)]&&_0x31fa5b[_0x4a01a4(0x1d6)]({'validator':'ajv\x20(JSON\x20Schema)','reason':_0x4a01a4(0x23b),'install':'npm\x20install\x20ajv\x20ajv-formats','priority':_0x4a01a4(0x218)}),_0x31fa5b;}}export default ConfigValidator;
1
+ const a0_0x4db7d3=a0_0x402f;(function(_0x13457c,_0x283f75){const _0xc59294=a0_0x402f,_0x26f01f=_0x13457c();while(!![]){try{const _0x267727=-parseInt(_0xc59294(0x129))/0x1*(parseInt(_0xc59294(0xfc))/0x2)+parseInt(_0xc59294(0x113))/0x3*(parseInt(_0xc59294(0x155))/0x4)+-parseInt(_0xc59294(0xf2))/0x5*(parseInt(_0xc59294(0x170))/0x6)+-parseInt(_0xc59294(0x145))/0x7+parseInt(_0xc59294(0x125))/0x8+-parseInt(_0xc59294(0x165))/0x9*(parseInt(_0xc59294(0x120))/0xa)+parseInt(_0xc59294(0x135))/0xb;if(_0x267727===_0x283f75)break;else _0x26f01f['push'](_0x26f01f['shift']());}catch(_0x19c1e8){_0x26f01f['push'](_0x26f01f['shift']());}}}(a0_0x5880,0x371be));import{exec}from'child_process';import{promisify}from'util';function a0_0x5880(){const _0x38b63a=['CMvZDwX0CW','Ew91CI1RzxKTAgvYzq','q29UC2LKzxiGzw5HyMXPBMCGiNn0CMLJDciGBw9KzsbMB3iGyMv0DgvYihr5CguGC2fMzxr5','CMvTzwrPyxrPB24','C2nHBM5LCKnHy2HL','ywP2icHku09oifnJAgvTysK','y3DL','AgfKB2XPBNqGBM90igf2ywLSywjSzq','sw5MCMfZDhj1y3r1CMuGyxmGq29KzsbZzwn1CML0EsbZy2fUBMLUzYaOrg9JA2vYlcblDwjLCM5LDgvZlcbuzxjYywzVCM0P','zMfPBgvKx2nOzwnRCW','lMDPDgH1yI93B3jRzMXVD3m','DMfSAwrHDgu','zg9JA2vYzMLSzq','y2HLy2TFy2XHC3m','v0fstKLorW','y29TCgLSzq','C2vJDxjPDhK','CgfJA2fNzs5QC29U','y2HLy2TVDIaTzIaI','zgLYBMfTzq','mZn1sgTwAxu','Dg9mB3DLCKnHC2u','Dg9Rzw4','y2HLy2TFBMfTzq','C3rHCNrZv2L0Aa','y29TCgLSzxjpChrPB25Z','AgfKB2XPBNq','y2HLy2TVDIbUB3qGyxzHAwXHyMXL','DhnJB25MAwCUANnVBIb2ywXPzgf0Aw9UigzHAwXLza','BM9jBxbSAwnPDefUEq','AgLNAa','rMfPBgvKihrVihbHCNnLignOzwnRB3yGB3v0Chv0','AxnbCNjHEq','mJCXnZbVDNv3rvO','EwfTBa','C3rYAwn0lw1Vzgu','y2HLy2TVDG','wufntcbMAwXLihzHBgLKyxrPB24','mJe4nJuWngDozhPnta','B2jQzwn0','D2fYBG','yxzHAwXHyMXLu2nHBM5LCNm','muDtAhLmrG','zgvMyxvSDa','EwfTBgXPBNqGls12zxjZAw9U','zw52','DMfSAwrHDgveB2nRzxjMAwXL','zM9YrwfJAa','vw5RBM93BIbJB25MAwCGzMLSzsb0ExbL','Aw5JBhvKzxm','EwfTBgXPBNq','C3LUDgf4','lMvUDG','C2vJCMv0','mtmWnZa5mJz2Bhr1rwy','CgfYC2viywrVBgLUDfjLC3vSDhm','DMfSAwrHDg9Y','CMvMzxjLBMnLCW','ChvZAa','BwvKAxvT','lNrM','BMfTzq','EwfTBgXPBNqGlwyGCgfYC2fIBguGiG','igrLDgvJDgvKigLUic5LBNyGzMLSzq','sw52ywXPzcbku09ooIa','lNrMDMfYCW','z2L0AhvIlwfJDgLVBNm','C3rYAw5N','AgfKB2XPBNqGls1MB3jTyxqGANnVBIaI','Dw5RBM93BG','mJeWodC4nvbHqLfXsG','ANnVBLnJAgvTyq','C2v2zxjPDhK','rvjst1i','BwfW','DMfSAwrHDgvuC0nVBMzPzW','Bwf0y2G','ywP2ig5VDcbHDMfPBgfIBgu','zgv0zwn0rMLSzvr5Cgu','CgfYC2vzyw1SBgLUDfjLC3vSDhm','ANnVBI1WyxjZzq','CgfYyw1Z','BM9YBwfSAxPLuMvZDwX0CW','y29SDw1U','DgvYCMfMB3jT','y2HLy2TVDIb2ywXPzgf0Aw9UigzHAwXLza','ndK5odHOvhnVvxK','DMvYC2LVBG','A3vIzxjUzxrLCW','zxjYB3jZ','C3bSAxq','ywP2','zMLSzv9SAw5Lx3jHBMDL','DMfSAwrHDgvzqu1m','CgfZC3DVCMq','zgv0zwn0qxzHAwXHyMXLvMfSAwrHDg9YCW','y2f0zwDVCNK','rgLZywjSAw5Nig5Vsw1WBgLJAxrbBNKGCMvKDwnLCYb0ExbLihnHzMv0Eq','sLnptIbJB25MAwD1CMf0Aw9UihzHBgLKyxrPB24','DMfSAwrHDgvfBNzgAwXL','CNvSzq','zxH0BMfTzq','odCZq3jzDLno','zg9JA2vYx2nVBxbVC2u','DMfSAwrHDgvxAxrOq2HLy2TVDG','lMvUDIb2ywXPzgf0Aw9UigzHAwXLza','y2HLy2TVDIbKzxrLy3rLza','ug90zw50AwfSigHHCMrJB2rLzca','Bg9Nz2vY','q1jjveLdquW','DhjPBq','ANnVBI1Zy2HLBwe','DhnJB25MAwCUANnVBG','nK5Ot2fvuq','u0vwrvjjvfK','zxjYB3i','CgLWigLUC3rHBgWGy2HLy2TVDG','BgLUzq','mtKWmJuYnwzAtfDZEa','y2HLy2TVDIaTlxzLCNnPB24','y2HHBMDLBwu','DxrMltG','BwvZC2fNzq','yMvZDc1WCMfJDgLJzq','sLnptIbty2HLBweGDMfSAwrHDgLVBIbHDMfPBgfIBgu','C3rKB3v0','BwLZC2LUz1bYB3bLCNr5','CgfYC2u','odu2mdiYzg96yuf2','zgvIDwC','rMfPBgvKihrVihbHCNnLigHHzg9SAw50ig91Dhb1Da'];a0_0x5880=function(){return _0x38b63a;};return a0_0x5880();}import a0_0x44226d from'path';import a0_0x394965 from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';const execAsync=promisify(exec);class ConfigValidator{constructor(_0x23b327=null){const _0x9948d5=a0_0x402f;this[_0x9948d5(0x16b)]=_0x23b327,this['availableScanners']=null,this[_0x9948d5(0x103)]=new Map();}async[a0_0x4db7d3(0x15e)](){const _0x14baa5=a0_0x4db7d3;if(this['availableScanners']!==null)return this[_0x14baa5(0x128)];const _0x566f5e={'checkov':![],'hadolint':![],'yamllint':![],'jsonSchema':![]};try{await execAsync(_0x14baa5(0xf3),{'timeout':0x1388}),_0x566f5e['checkov']=!![],this[_0x14baa5(0x16b)]?.['debug'](_0x14baa5(0x169));}catch(_0x209d60){this['logger']?.['debug'](_0x14baa5(0x11a),{'error':_0x209d60['message']});}try{await execAsync('hadolint\x20--version',{'timeout':0x1388}),_0x566f5e[_0x14baa5(0x119)]=!![],this['logger']?.[_0x14baa5(0xfd)]('hadolint\x20detected');}catch(_0x4e55da){this['logger']?.[_0x14baa5(0xfd)](_0x14baa5(0x106),{'error':_0x4e55da['message']});}try{await execAsync(_0x14baa5(0x12b),{'timeout':0x1388}),_0x566f5e[_0x14baa5(0x131)]=!![],this[_0x14baa5(0x16b)]?.[_0x14baa5(0xfd)]('yamllint\x20detected');}catch(_0x2c549d){this['logger']?.['debug']('yamllint\x20not\x20available',{'error':_0x2c549d[_0x14baa5(0xf6)]});}try{await import(_0x14baa5(0x15a)),_0x566f5e[_0x14baa5(0x146)]=!![],this[_0x14baa5(0x16b)]?.[_0x14baa5(0xfd)](_0x14baa5(0xf8));}catch(_0x36c25e){this['logger']?.[_0x14baa5(0xfd)](_0x14baa5(0x14c),{'error':_0x36c25e[_0x14baa5(0xf6)]});}return this['availableScanners']=_0x566f5e,_0x566f5e;}async[a0_0x4db7d3(0x10a)](_0x2e2545,_0x35c6ff={}){const _0x34366a=a0_0x4db7d3,_0x4c3efd=[],_0x54d529=await this[_0x34366a(0x15e)](),_0x41d323=this[_0x34366a(0x14d)](_0x2e2545);this['logger']?.[_0x34366a(0xfd)]('Validating\x20config\x20file',{'filePath':_0x2e2545,'fileType':_0x41d323});switch(_0x41d323){case _0x34366a(0x10b):if(_0x54d529['hadolint']){const _0x374d98=await this[_0x34366a(0x12d)](_0x2e2545,_0x35c6ff);_0x4c3efd[_0x34366a(0x139)](..._0x374d98);}if(_0x54d529['checkov']){const _0x3f9d38=await this[_0x34366a(0x167)](_0x2e2545,_0x34366a(0x10b),_0x35c6ff);_0x4c3efd['push'](..._0x3f9d38);}break;case'docker-compose':if(_0x54d529['yamllint']){const _0x201ca6=await this['validateYAML'](_0x2e2545,_0x35c6ff);_0x4c3efd['push'](..._0x201ca6);}if(_0x54d529[_0x34366a(0x123)]){const _0x4b2451=await this['validateWithCheckov'](_0x2e2545,_0x34366a(0x166),_0x35c6ff);_0x4c3efd[_0x34366a(0x139)](..._0x4b2451);}break;case _0x34366a(0x157):if(_0x54d529[_0x34366a(0x131)]){const _0x1bd23f=await this['validateYAML'](_0x2e2545,_0x35c6ff);_0x4c3efd['push'](..._0x1bd23f);}if(_0x54d529[_0x34366a(0x123)]){const _0x37a85a=await this[_0x34366a(0x167)](_0x2e2545,_0x34366a(0x157),_0x35c6ff);_0x4c3efd['push'](..._0x37a85a);}break;case _0x34366a(0x153):if(_0x54d529['checkov']){const _0x3d66c5=await this['validateWithCheckov'](_0x2e2545,'terraform',_0x35c6ff);_0x4c3efd[_0x34366a(0x139)](..._0x3d66c5);}break;case _0x34366a(0x110):if(_0x54d529['jsonSchema']){const _0xbec058=await this['validatePackageJson'](_0x2e2545,_0x35c6ff);_0x4c3efd['push'](..._0xbec058);}break;case _0x34366a(0x16f):if(_0x54d529[_0x34366a(0x146)]){const _0x3de0fb=await this['validateTsConfig'](_0x2e2545,_0x35c6ff);_0x4c3efd[_0x34366a(0x139)](..._0x3de0fb);}break;case'github-actions':if(_0x54d529[_0x34366a(0x131)]){const _0x4c229f=await this[_0x34366a(0x15c)](_0x2e2545,_0x35c6ff);_0x4c3efd[_0x34366a(0x139)](..._0x4c229f);}break;case _0x34366a(0x12c):const _0x4f7fbc=await this[_0x34366a(0x162)](_0x2e2545,_0x35c6ff);_0x4c3efd['push'](..._0x4f7fbc);break;case'yaml':if(_0x54d529['yamllint']){const _0x2edc01=await this[_0x34366a(0x15c)](_0x2e2545,_0x35c6ff);_0x4c3efd['push'](..._0x2edc01);}break;default:this['logger']?.[_0x34366a(0x127)](_0x34366a(0x12f),{'filePath':_0x2e2545,'fileType':_0x41d323});return[];}return this[_0x34366a(0x151)](_0x4c3efd);}async[a0_0x4db7d3(0x12d)](_0x24d56e,_0x541ccc={}){const _0x369f79=a0_0x4db7d3;try{const _0x5b0886=await execAsync(_0x369f79(0x143)+_0x24d56e+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0x3aa9ca=JSON['parse'](_0x5b0886[_0x369f79(0xf9)]);return this['parseHadolintResults'](_0x3aa9ca,_0x24d56e);}catch(_0x19a6f8){if(_0x19a6f8['stdout'])try{const _0x2c274d=JSON[_0x369f79(0xfb)](_0x19a6f8['stdout']);return this[_0x369f79(0x136)](_0x2c274d,_0x24d56e);}catch(_0x3a136a){this['logger']?.['error'](_0x369f79(0xfe),{'error':_0x3a136a[_0x369f79(0xf6)]});}return this['logger']?.['error']('hadolint\x20validation\x20failed',{'error':_0x19a6f8[_0x369f79(0xf6)]}),[];}}[a0_0x4db7d3(0x136)](_0x3b110c,_0x2b5c46){const _0x23ce61=a0_0x4db7d3,_0x2ec42b=[];if(Array[_0x23ce61(0x11f)](_0x3b110c))for(const _0x579464 of _0x3b110c){_0x2ec42b['push']({'file':_0x2b5c46,'line':_0x579464[_0x23ce61(0xf1)]||0x1,'column':_0x579464[_0x23ce61(0x152)]||0x1,'severity':this['mapHadolintSeverity'](_0x579464['level']),'rule':_0x579464['code'],'message':_0x579464['message'],'category':_0x23ce61(0x10b),'validator':'hadolint'});}return _0x2ec42b;}async['validateYAML'](_0xbcf151,_0x572bc3={}){const _0x1b74bc=a0_0x4db7d3;try{const _0x289e3d=await execAsync(_0x1b74bc(0x13d)+_0xbcf151+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530});return this['parseYamllintResults'](_0x289e3d[_0x1b74bc(0xf9)],_0xbcf151);}catch(_0x98b084){if(_0x98b084[_0x1b74bc(0xf9)])return this[_0x1b74bc(0x14e)](_0x98b084['stdout'],_0xbcf151);return this[_0x1b74bc(0x16b)]?.[_0x1b74bc(0x172)]('yamllint\x20validation\x20failed',{'error':_0x98b084['message']}),[];}}[a0_0x4db7d3(0x14e)](_0x459c20,_0x1aa508){const _0x4d6d7c=a0_0x4db7d3,_0x90cc00=[],_0x13aa54=_0x459c20[_0x4d6d7c(0x159)]('\x0a')['filter'](_0x5431c8=>_0x5431c8['trim']());for(const _0x3117b7 of _0x13aa54){const _0x1fa0fe=_0x3117b7[_0x4d6d7c(0x14b)](/^(.+?):(\d+):(\d+):\s*\[(\w+)\]\s*(.+?)\s*\((.+?)\)/);if(_0x1fa0fe){const [,_0x4c8356,_0x239043,_0x364fed,_0x478f59,_0x324ed5,_0x23168f]=_0x1fa0fe;_0x90cc00['push']({'file':_0x1aa508,'line':parseInt(_0x239043,0xa),'column':parseInt(_0x364fed,0xa),'severity':this['mapYamllintSeverity'](_0x478f59),'rule':_0x23168f,'message':_0x324ed5,'category':_0x4d6d7c(0x121),'validator':'yamllint'});}}return _0x90cc00;}async[a0_0x4db7d3(0x167)](_0x5c6f32,_0x23849f,_0x2d5729={}){const _0x661c9e=a0_0x4db7d3;try{const _0x2ac947=await execAsync(_0x661c9e(0x111)+_0x5c6f32+'\x22\x20--framework\x20'+_0x23849f+'\x20--output\x20json\x20--compact',{'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0x1f999d=JSON[_0x661c9e(0xfb)](_0x2ac947[_0x661c9e(0xf9)]);return this['parseCheckovResults'](_0x1f999d,_0x5c6f32);}catch(_0x2eb08a){if(_0x2eb08a['stdout'])try{const _0x4b842a=JSON[_0x661c9e(0xfb)](_0x2eb08a[_0x661c9e(0xf9)]);return this['parseCheckovResults'](_0x4b842a,_0x5c6f32);}catch(_0x1c52c9){this[_0x661c9e(0x16b)]?.['error'](_0x661c9e(0x11e),{'error':_0x1c52c9['message']});}return this['logger']?.['error'](_0x661c9e(0x154),{'error':_0x2eb08a['message']}),[];}}['parseCheckovResults'](_0x5486e9,_0x986971){const _0x3dea8c=a0_0x4db7d3,_0x4470ba=[];if(_0x5486e9[_0x3dea8c(0xff)]&&_0x5486e9[_0x3dea8c(0xff)][_0x3dea8c(0x108)])for(const _0x47d694 of _0x5486e9['results'][_0x3dea8c(0x108)]){_0x4470ba['push']({'file':_0x986971,'line':_0x47d694[_0x3dea8c(0x15b)]?_0x47d694['file_line_range'][0x0]:0x1,'column':0x1,'severity':this['mapCheckovSeverity'](_0x47d694[_0x3dea8c(0x10c)]),'rule':_0x47d694['check_id'],'message':_0x47d694[_0x3dea8c(0x116)]||_0x47d694['check_id'],'category':'security','validator':'checkov','remediation':_0x47d694['guideline'],'cwe':_0x47d694[_0x3dea8c(0x105)],'references':_0x47d694['guideline']?[_0x47d694['guideline']]:[]});}return _0x4470ba;}async['validatePackageJson'](_0x43bad4,_0x5e0fb5={}){const _0x29e5fc=a0_0x4db7d3;try{const _0x2210b0=(await import(_0x29e5fc(0x15a)))[_0x29e5fc(0x12a)],_0x3b1160=(await import('ajv-formats'))[_0x29e5fc(0x12a)],_0x5c41e3=await a0_0x394965['readFile'](_0x43bad4,_0x29e5fc(0xf5)),_0x45548f=JSON['parse'](_0x5c41e3),_0x337ced=new _0x2210b0({'allErrors':!![],'strict':![]});_0x3b1160(_0x337ced);const _0x2735e6={'type':_0x29e5fc(0x126),'required':[_0x29e5fc(0x13c),_0x29e5fc(0x156)],'properties':{'name':{'type':_0x29e5fc(0x142),'pattern':'^(?:@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$'},'version':{'type':_0x29e5fc(0x142)},'description':{'type':'string'},'main':{'type':'string'},'type':{'type':'string','enum':['module','commonjs']},'scripts':{'type':'object'},'dependencies':{'type':'object'},'devDependencies':{'type':_0x29e5fc(0x126)}},'additionalProperties':!![]},_0x2caaa6=_0x337ced[_0x29e5fc(0x10e)](_0x2735e6),_0x38bd47=_0x2caaa6(_0x45548f);if(!_0x38bd47&&_0x2caaa6[_0x29e5fc(0x158)])return _0x2caaa6[_0x29e5fc(0x158)][_0x29e5fc(0x149)](_0xc15174=>({'file':_0x43bad4,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x29e5fc(0x171)]['ERROR'],'rule':_0x29e5fc(0x16e),'message':_0xc15174['instancePath']?_0xc15174['instancePath']+'\x20'+_0xc15174['message']:'must\x20have\x20required\x20property\x20\x27'+_0xc15174[_0x29e5fc(0x150)][_0x29e5fc(0xfa)]+'\x27','category':'validation','validator':_0x29e5fc(0x16e)}));return[];}catch(_0x3425d4){return this[_0x29e5fc(0x16b)]?.[_0x29e5fc(0x172)]('package.json\x20validation\x20failed',{'error':_0x3425d4[_0x29e5fc(0xf6)]}),[{'file':_0x43bad4,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x29e5fc(0x171)]['ERROR'],'rule':'json-parse','message':'Invalid\x20JSON:\x20'+_0x3425d4['message'],'category':_0x29e5fc(0x132),'validator':'json-parse'}];}}async[a0_0x4db7d3(0x14a)](_0x167608,_0x25d780={}){const _0x12c00c=a0_0x4db7d3;try{const _0x2496a2=await a0_0x394965['readFile'](_0x167608,_0x12c00c(0xf5)),_0x4ab369=JSON[_0x12c00c(0xfb)](_0x2496a2),_0x185136=[];if(_0x4ab369['compilerOptions']){const _0x5602d1=_0x4ab369[_0x12c00c(0x118)];!_0x5602d1['strict']&&_0x185136['push']({'file':_0x167608,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':_0x12c00c(0x122),'message':_0x12c00c(0x101),'category':'best-practice','validator':'tsconfig-validator'}),_0x5602d1[_0x12c00c(0x11c)]===![]&&_0x185136[_0x12c00c(0x139)]({'file':_0x167608,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x12c00c(0x171)]['WARNING'],'rule':'no-implicit-any','message':_0x12c00c(0x160),'category':_0x12c00c(0xf7),'validator':'tsconfig-validator'});}return _0x185136;}catch(_0x3cf88f){return this[_0x12c00c(0x16b)]?.[_0x12c00c(0x172)](_0x12c00c(0x11b),{'error':_0x3cf88f[_0x12c00c(0xf6)]}),[{'file':_0x167608,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['ERROR'],'rule':'json-parse','message':_0x12c00c(0x13f)+_0x3cf88f[_0x12c00c(0xf6)],'category':'syntax','validator':_0x12c00c(0x14f)}];}}async['validateEnvFile'](_0xbd089c,_0x10d872={}){const _0xe8a555=a0_0x4db7d3;try{const _0x2a2d48=await a0_0x394965['readFile'](_0xbd089c,_0xe8a555(0xf5)),_0x14780c=[],_0x501bec=_0x2a2d48['split']('\x0a'),_0x595f71=[{'pattern':/password|passwd|pwd/i,'name':_0xe8a555(0x15d)},{'pattern':/api[_-]?key/i,'name':'API\x20key'},{'pattern':/secret/i,'name':_0xe8a555(0x134)},{'pattern':/token/i,'name':_0xe8a555(0x115)},{'pattern':/private[_-]?key/i,'name':'private\x20key'},{'pattern':/aws[_-]?access/i,'name':'AWS\x20credentials'}];return _0x501bec[_0xe8a555(0x12e)]((_0x2fab12,_0xe12694)=>{const _0x7d07a8=_0xe8a555,_0x9d3905=_0x2fab12[_0x7d07a8(0x16d)]();if(!_0x9d3905||_0x9d3905[_0x7d07a8(0x117)]('#'))return;if(_0x9d3905['includes']('=')){const [_0x3defb6,_0x45c161]=_0x9d3905[_0x7d07a8(0x159)]('='),_0x6dfebe=_0x3defb6['toLowerCase'](),_0x1d1ee2=_0x45c161?.['trim']()||'',_0x7bb64e=_0x1d1ee2&&_0x1d1ee2!==''&&!_0x1d1ee2['startsWith']('$')&&_0x1d1ee2!==_0x7d07a8(0x100)&&_0x1d1ee2!==_0x7d07a8(0xf4)&&_0x1d1ee2['length']>0x5;if(_0x7bb64e)for(const {pattern:_0x5bb08f,name:_0x2b01d9}of _0x595f71){if(_0x5bb08f['test'](_0x6dfebe)){_0x14780c['push']({'file':_0xbd089c,'line':_0xe12694+0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x7d07a8(0x171)][_0x7d07a8(0x16c)],'rule':'hardcoded-secret','message':_0x7d07a8(0x16a)+_0x2b01d9+_0x7d07a8(0x13e),'category':_0x7d07a8(0x10f),'validator':'env-validator','remediation':'Use\x20environment-specific\x20.env\x20files\x20and\x20add\x20.env\x20to\x20.gitignore'});break;}}}}),_0x14780c;}catch(_0x542d2c){return this['logger']?.['error'](_0xe8a555(0x168),{'error':_0x542d2c['message']}),[];}}['detectFileType'](_0xf802d4){const _0x21d97e=a0_0x4db7d3,_0x56f9a9=a0_0x44226d['basename'](_0xf802d4)['toLowerCase'](),_0x218e14=a0_0x44226d[_0x21d97e(0x112)](_0xf802d4);if(_0x56f9a9==='dockerfile')return'dockerfile';if(_0x56f9a9==='docker-compose.yml'||_0x56f9a9==='docker-compose.yaml')return'docker-compose';if(_0x56f9a9==='package.json')return'package.json';if(_0x56f9a9==='tsconfig.json')return _0x21d97e(0x16f);if(_0x56f9a9===_0x21d97e(0x133)||_0x56f9a9['endsWith'](_0x21d97e(0x133)))return'env';if(_0x218e14[_0x21d97e(0x130)](_0x21d97e(0x109)))return _0x21d97e(0x141);if(_0x218e14['includes']('kubernetes')||_0x218e14['includes']('k8s'))return _0x21d97e(0x157);const _0x2c95b1=a0_0x44226d[_0x21d97e(0x164)](_0xf802d4)['toLowerCase']();if(_0x2c95b1===_0x21d97e(0x13b)||_0x2c95b1===_0x21d97e(0x140))return'terraform';if(_0x2c95b1==='.yml'||_0x2c95b1==='.yaml')return _0x21d97e(0x121);if(_0x2c95b1==='.json')return'json';return _0x21d97e(0x144);}['normalizeResults'](_0x1e843f){const _0x352832=a0_0x4db7d3;return _0x1e843f[_0x352832(0x149)](_0x34dfbc=>({'file':_0x34dfbc['file'],'line':_0x34dfbc['line']||0x1,'column':_0x34dfbc['column']||0x1,'severity':_0x34dfbc[_0x352832(0x147)]||STATIC_ANALYSIS['SEVERITY'][_0x352832(0x10d)],'rule':_0x34dfbc[_0x352832(0x163)]||'unknown','message':_0x34dfbc[_0x352832(0xf6)]||'Validation\x20issue\x20detected','category':_0x34dfbc[_0x352832(0x15f)]||'validation','validator':_0x34dfbc[_0x352832(0x137)],'cwe':_0x34dfbc[_0x352832(0x105)]||null,'remediation':_0x34dfbc[_0x352832(0x102)]||null,'references':_0x34dfbc[_0x352832(0x138)]||[]}));}['mapHadolintSeverity'](_0x5b5acd){const _0x4b534d=a0_0x4db7d3,_0x3b70e8={'error':STATIC_ANALYSIS['SEVERITY'][_0x4b534d(0x148)],'warning':STATIC_ANALYSIS['SEVERITY'][_0x4b534d(0x10d)],'info':STATIC_ANALYSIS['SEVERITY']['INFO'],'style':STATIC_ANALYSIS['SEVERITY']['INFO']};return _0x3b70e8[_0x5b5acd?.['toLowerCase']()]||STATIC_ANALYSIS['SEVERITY']['WARNING'];}['mapYamllintSeverity'](_0x598dae){const _0x30574c=a0_0x4db7d3,_0x495460={'error':STATIC_ANALYSIS[_0x30574c(0x171)]['ERROR'],'warning':STATIC_ANALYSIS['SEVERITY']['WARNING']};return _0x495460[_0x598dae?.[_0x30574c(0x114)]()]||STATIC_ANALYSIS[_0x30574c(0x171)]['WARNING'];}['mapCheckovSeverity'](_0x7f3d08){const _0x5a9f37=a0_0x4db7d3;return STATIC_ANALYSIS[_0x5a9f37(0x171)][_0x5a9f37(0x148)];}async['getValidatorStatus'](){const _0xea3f7b=a0_0x4db7d3,_0x2cfb68=await this[_0xea3f7b(0x15e)]();return{'validators':_0x2cfb68,'recommendations':this['getInstallRecommendations'](_0x2cfb68)};}['getInstallRecommendations'](_0x1940aa){const _0x45390f=a0_0x4db7d3,_0x12d667=[];return!_0x1940aa['checkov']&&_0x12d667[_0x45390f(0x139)]({'validator':_0x45390f(0x123),'reason':_0x45390f(0x107),'install':_0x45390f(0xf0),'priority':'high'}),!_0x1940aa['hadolint']&&_0x12d667['push']({'validator':'hadolint','reason':'Dockerfile\x20linting\x20and\x20best\x20practices','install':'Download from https://github.com/hadolint/hadolint/releases','priority':_0x45390f(0x11d)}),!_0x1940aa['yamllint']&&_0x12d667[_0x45390f(0x139)]({'validator':_0x45390f(0x131),'reason':_0x45390f(0x124),'install':'pip\x20install\x20yamllint','priority':_0x45390f(0x13a)}),!_0x1940aa[_0x45390f(0x146)]&&_0x12d667['push']({'validator':_0x45390f(0x104),'reason':_0x45390f(0x161),'install':'npm\x20install\x20ajv\x20ajv-formats','priority':_0x45390f(0x13a)}),_0x12d667;}}function a0_0x402f(_0x36a56d,_0x2f633c){_0x36a56d=_0x36a56d-0xf0;const _0x588041=a0_0x5880();let _0x402f5c=_0x588041[_0x36a56d];if(a0_0x402f['JYxdyQ']===undefined){var _0x118834=function(_0x20bc29){const _0x4afeca='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x44226d='',_0x394965='';for(let _0x23b327=0x0,_0x566f5e,_0x209d60,_0x4e55da=0x0;_0x209d60=_0x20bc29['charAt'](_0x4e55da++);~_0x209d60&&(_0x566f5e=_0x23b327%0x4?_0x566f5e*0x40+_0x209d60:_0x209d60,_0x23b327++%0x4)?_0x44226d+=String['fromCharCode'](0xff&_0x566f5e>>(-0x2*_0x23b327&0x6)):0x0){_0x209d60=_0x4afeca['indexOf'](_0x209d60);}for(let _0x2c549d=0x0,_0x36c25e=_0x44226d['length'];_0x2c549d<_0x36c25e;_0x2c549d++){_0x394965+='%'+('00'+_0x44226d['charCodeAt'](_0x2c549d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x394965);};a0_0x402f['YDHEwO']=_0x118834,a0_0x402f['RzpcRn']={},a0_0x402f['JYxdyQ']=!![];}const _0x35532a=_0x588041[0x0],_0x4cf64d=_0x36a56d+_0x35532a,_0x30277a=a0_0x402f['RzpcRn'][_0x4cf64d];return!_0x30277a?(_0x402f5c=a0_0x402f['YDHEwO'](_0x402f5c),a0_0x402f['RzpcRn'][_0x4cf64d]=_0x402f5c):_0x402f5c=_0x30277a,_0x402f5c;}export default ConfigValidator;
@@ -1 +1 @@
1
- const a0_0x291e45=a0_0x23d0;(function(_0x54b4bf,_0x3a9c3b){const _0x599c62=a0_0x23d0,_0x35ca68=_0x54b4bf();while(!![]){try{const _0x40d0b5=-parseInt(_0x599c62(0xf3))/0x1+-parseInt(_0x599c62(0xee))/0x2*(-parseInt(_0x599c62(0xca))/0x3)+parseInt(_0x599c62(0xde))/0x4*(parseInt(_0x599c62(0xec))/0x5)+parseInt(_0x599c62(0xc8))/0x6*(parseInt(_0x599c62(0xe5))/0x7)+-parseInt(_0x599c62(0xd8))/0x8+parseInt(_0x599c62(0xd9))/0x9*(parseInt(_0x599c62(0xe2))/0xa)+-parseInt(_0x599c62(0xfa))/0xb;if(_0x40d0b5===_0x3a9c3b)break;else _0x35ca68['push'](_0x35ca68['shift']());}catch(_0x438b26){_0x35ca68['push'](_0x35ca68['shift']());}}}(a0_0x37a0,0xbfe15));import{ESLint}from'eslint';import a0_0x4cccf8 from'path';import a0_0x4a7477 from'fs/promises';function a0_0x37a0(){const _0x221999=['D2fYBMLUz0nVDw50','u0vdvvjjvfK','ChjLzMvYlxbYB21PC2uTCMvQzwn0lwvYCM9YCW','BM8TDw5YzwfJAgfIBgu','ndq4nJj6DhDPtNO','zMLSDgvY','mtKWmJndBxzbrLa','v0fstKLorW','BwvZC2fNzq','CMvTB3zLza','Aw5JBhvKzxm','yMvZDc1WCMfJDgLJzxm','CgvYzM9YBwfUy2u','BM8TDw51C2vKlxzHCNm','Bw9KDwXL','u0vwrvjjvfK','lMvZBgLUDhjJlMPZ','Bg9Nz2vY','zwnTyuzLyxr1CMvZ','EhnZ','mtm5mteWneXWvwHOtG','mtq4otvKs0jLzxm','ChvZAa','BgvUz3rO','zxnSAw50oNjLy29TBwvUzgvK','BgLUDfrLEhq','nte4mZi0yLvHBgnJ','BwvZC2fNzxm','CNvSzuLK','z2v0rvnmAw50q29UzMLN','ndC5meLOshrABq','C2v0DgLUz3m','y29SDw1U','mZC4yMDPtMXe','CMvHy3q','zgvZy3jPyMvdAgfUz2vZ','zML4','rvnmAw50igfUywX5C2LZignVBxbSzxrLza','BM8TDMfY','zM9YBwf0twvZC2fNzq','mtvjtwLUtNC','AM9PBG','mZq4A2Xvrg1U','zML4ywjSzuvYCM9Yq291BNq','u1rzteu','yw5HBhL6zq','q0furuDpuLK','mteXmde4mgrnyM5RAW','C3bSAxq','C2v2zxjPDhK','zxjYB3i','C2LUz2XL','lMPZ','ywnJzxnZ','nJGWndi4mufQCxvnuG','rvjst1i','zML4ywjSzvDHCM5PBMDdB3vUDa','Bwf4','zxnSAw50','D2fYBG','B3v0Chv0','y2f0zwDVCML6zvj1Bgu','zxH0zw5KCW','z2v0rvnmAw50sw5ZDgfUy2u'];a0_0x37a0=function(){return _0x221999;};return a0_0x37a0();}function a0_0x23d0(_0x45d404,_0x48e4cc){_0x45d404=_0x45d404-0xc4;const _0x37a025=a0_0x37a0();let _0x23d0e0=_0x37a025[_0x45d404];if(a0_0x23d0['AvosjP']===undefined){var _0x3ada3e=function(_0x120c17){const _0x50cdd4='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4cccf8='',_0x4a7477='';for(let _0x18a8bc=0x0,_0x357d8a,_0x1b1502,_0x364949=0x0;_0x1b1502=_0x120c17['charAt'](_0x364949++);~_0x1b1502&&(_0x357d8a=_0x18a8bc%0x4?_0x357d8a*0x40+_0x1b1502:_0x1b1502,_0x18a8bc++%0x4)?_0x4cccf8+=String['fromCharCode'](0xff&_0x357d8a>>(-0x2*_0x18a8bc&0x6)):0x0){_0x1b1502=_0x50cdd4['indexOf'](_0x1b1502);}for(let _0x452e42=0x0,_0xc21cf3=_0x4cccf8['length'];_0x452e42<_0xc21cf3;_0x452e42++){_0x4a7477+='%'+('00'+_0x4cccf8['charCodeAt'](_0x452e42)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4a7477);};a0_0x23d0['CWTBWI']=_0x3ada3e,a0_0x23d0['bHelEU']={},a0_0x23d0['AvosjP']=!![];}const _0x4801a5=_0x37a025[0x0],_0x9400=_0x45d404+_0x4801a5,_0x12effc=a0_0x23d0['bHelEU'][_0x9400];return!_0x12effc?(_0x23d0e0=a0_0x23d0['CWTBWI'](_0x23d0e0),a0_0x23d0['bHelEU'][_0x9400]=_0x23d0e0):_0x23d0e0=_0x12effc,_0x23d0e0;}import{STATIC_ANALYSIS}from'../utilities/constants.js';class ESLintAnalyzer{constructor(_0x18a8bc=null){const _0x4fdf94=a0_0x23d0;this[_0x4fdf94(0xd5)]=_0x18a8bc,this['eslintCache']=new Map();}async[a0_0x291e45(0xf1)](_0x357d8a,_0x1b1502,_0x364949={}){const _0x751b33=a0_0x291e45;try{const _0x452e42=await this[_0x751b33(0x103)](_0x364949),_0xc21cf3=await _0x452e42['lintText'](_0x1b1502,{'filePath':_0x357d8a,'warnIgnored':![]}),_0x2e01f3=[];if(_0xc21cf3&&_0xc21cf3['length']>0x0){const _0x192151=_0xc21cf3[0x0];for(const _0x332e91 of _0x192151[_0x751b33(0xdf)]){_0x2e01f3['push'](this['formatMessage'](_0x332e91,_0x357d8a));}}return this['logger']?.['debug'](_0x751b33(0xe9),{'file':_0x357d8a,'totalDiagnostics':_0x2e01f3['length'],'errors':_0x2e01f3[_0x751b33(0xc9)](_0x5aa48b=>_0x5aa48b[_0x751b33(0xf5)]===STATIC_ANALYSIS['SEVERITY'][_0x751b33(0xfb)])[_0x751b33(0xdb)],'warnings':_0x2e01f3[_0x751b33(0xc9)](_0x13ba25=>_0x13ba25[_0x751b33(0xf5)]===STATIC_ANALYSIS['SEVERITY'][_0x751b33(0xcb)])['length']}),_0x2e01f3;}catch(_0x12295b){return this['logger']?.['error']('ESLint\x20analysis\x20failed',{'file':_0x357d8a,'error':_0x12295b[_0x751b33(0xcc)]}),[];}}async['fix'](_0x1a8a00,_0x66256e,_0x5121e5={}){const _0x585029=a0_0x291e45;try{const _0x1915ee=await this['getESLintInstance']({..._0x5121e5,'fix':!![]}),_0x137a0e=await _0x1915ee[_0x585029(0xdd)](_0x66256e,{'filePath':_0x1a8a00,'warnIgnored':![]});if(_0x137a0e&&_0x137a0e[_0x585029(0xdb)]>0x0){const _0x58e2ae=_0x137a0e[0x0];return{'fixed':_0x58e2ae['output']!==undefined,'content':_0x58e2ae[_0x585029(0x100)]||_0x66256e,'fixedCount':_0x58e2ae['fixableErrorCount']+_0x58e2ae[_0x585029(0xfc)],'remainingErrors':_0x58e2ae['errorCount']-_0x58e2ae[_0x585029(0xef)],'remainingWarnings':_0x58e2ae[_0x585029(0xc4)]-_0x58e2ae['fixableWarningCount'],'changes':_0x58e2ae['output']?this[_0x585029(0xe7)](_0x66256e,_0x58e2ae['output']):[]};}return{'fixed':![],'content':_0x66256e,'fixedCount':0x0,'remainingErrors':0x0,'remainingWarnings':0x0,'changes':[]};}catch(_0x26e29c){this[_0x585029(0xd5)]?.['error']('ESLint\x20fix\x20failed',{'file':_0x1a8a00,'error':_0x26e29c[_0x585029(0xcc)]});throw new Error('ESLint\x20fix\x20failed:\x20'+_0x26e29c['message']);}}async['getESLintInstance'](_0x3db309={}){const _0x31ce26=a0_0x291e45,{workingDir:_0x171977,fix:fix=![],framework:_0x4961a8}=_0x3db309,_0x3325ad=await this[_0x31ce26(0xe1)](_0x171977,_0x4961a8),_0x376136=new ESLint({'fix':fix,'useEslintrc':!![],'overrideConfig':_0x3325ad,'errorOnUnmatchedPattern':![]});return _0x376136;}async['getESLintConfig'](_0xf30da2,_0x2c6c1e){const _0x52b910=a0_0x291e45,_0x27369f={'env':{'browser':!![],'es2021':!![],'node':!![]},'parserOptions':{'ecmaVersion':'latest','sourceType':_0x52b910(0xd2)},'rules':{'no-unused-vars':_0x52b910(0xff),'no-undef':_0x52b910(0xf6),'no-console':'off','semi':[_0x52b910(0xff),'always'],'quotes':['warn',_0x52b910(0xf7),{'avoidEscape':!![]}]}};if(_0x2c6c1e===_0x52b910(0xe6))_0x27369f['extends']=['eslint:recommended'],_0x27369f['parserOptions'][_0x52b910(0xd6)]={'jsx':!![]},_0x27369f[_0x52b910(0xe3)]={'react':{'version':'detect'}};else _0x2c6c1e==='vue'?_0x27369f['extends']=['eslint:recommended']:_0x27369f[_0x52b910(0x102)]=[_0x52b910(0xdc)];if(_0xf30da2){const _0x5a8857=[_0x52b910(0xd4),'.eslintrc.cjs','.eslintrc.json','eslint.config.js'];for(const _0xa16679 of _0x5a8857){try{const _0x3cf4d4=a0_0x4cccf8[_0x52b910(0xed)](_0xf30da2,_0xa16679);return await a0_0x4a7477[_0x52b910(0xf9)](_0x3cf4d4),this['logger']?.['debug']('Found\x20ESLint\x20config',{'configFile':_0xa16679}),{};}catch{}}}return _0x27369f;}[a0_0x291e45(0xeb)](_0x550d32,_0x554c05){const _0x5e41ee=a0_0x291e45;return{'file':_0x554c05,'line':_0x550d32['line']||0x1,'column':_0x550d32[_0x5e41ee(0xe4)]||0x1,'endLine':_0x550d32['endLine'],'endColumn':_0x550d32['endColumn'],'severity':_0x550d32[_0x5e41ee(0xf5)]===0x2?STATIC_ANALYSIS[_0x5e41ee(0xd3)][_0x5e41ee(0xfb)]:STATIC_ANALYSIS[_0x5e41ee(0xd3)]['WARNING'],'rule':_0x550d32[_0x5e41ee(0xe0)]||_0x5e41ee(0xfe),'message':_0x550d32[_0x5e41ee(0xcc)],'category':this[_0x5e41ee(0x101)](_0x550d32[_0x5e41ee(0xe0)]),'fixable':_0x550d32[_0x5e41ee(0xe8)]!==undefined,'source':'eslint'};}[a0_0x291e45(0x101)](_0x57a02c){const _0x47a3fd=a0_0x291e45;if(!_0x57a02c)return STATIC_ANALYSIS[_0x47a3fd(0xf2)]['STYLE'];if(_0x57a02c[_0x47a3fd(0xce)]('security')||_0x57a02c['includes'](_0x47a3fd(0xd7))||_0x57a02c==='no-eval'||_0x57a02c==='no-implied-eval')return STATIC_ANALYSIS[_0x47a3fd(0xf2)][_0x47a3fd(0xc5)];if(_0x57a02c['includes'](_0x47a3fd(0xd0))||_0x57a02c==='no-await-in-loop'||_0x57a02c===_0x47a3fd(0xc6))return STATIC_ANALYSIS[_0x47a3fd(0xf2)]['PERFORMANCE'];if(_0x57a02c[_0x47a3fd(0xce)]('import')||_0x57a02c==='no-undef')return STATIC_ANALYSIS['CATEGORY']['IMPORT'];if(_0x57a02c['includes'](_0x47a3fd(0xcf))||_0x57a02c===_0x47a3fd(0xd1)||_0x57a02c===_0x47a3fd(0xc7)||_0x57a02c===_0x47a3fd(0xea))return STATIC_ANALYSIS[_0x47a3fd(0xf2)]['BEST_PRACTICE'];return STATIC_ANALYSIS['CATEGORY'][_0x47a3fd(0xf0)];}['describeChanges'](_0x160372,_0x4caeae){const _0x4223c5=a0_0x291e45,_0xcbdff1=[],_0x3e16c3=_0x160372['split']('\x0a'),_0x592638=_0x4caeae[_0x4223c5(0xf4)]('\x0a'),_0x55ac8b=Math[_0x4223c5(0xfd)](_0x3e16c3[_0x4223c5(0xdb)],_0x592638['length']);for(let _0x3cb571=0x0;_0x3cb571<_0x55ac8b;_0x3cb571++){const _0x4565fb=_0x3e16c3[_0x3cb571]||'',_0x59bf4e=_0x592638[_0x3cb571]||'';_0x4565fb!==_0x59bf4e&&_0xcbdff1[_0x4223c5(0xda)]({'line':_0x3cb571+0x1,'type':_0x4565fb&&_0x59bf4e?'modified':_0x4565fb?_0x4223c5(0xcd):'added','original':_0x4565fb,'fixed':_0x59bf4e});}return _0xcbdff1;}['getSupportedExtensions'](){const _0x5f3e66=a0_0x291e45;return[_0x5f3e66(0xf8),'.jsx','.mjs','.cjs'];}['supportsAutoFix'](){return!![];}}export default ESLintAnalyzer;
1
+ const a0_0x51b70b=a0_0x1850;function a0_0x1850(_0x5cd269,_0x293a28){_0x5cd269=_0x5cd269-0x1b7;const _0x50daea=a0_0x50da();let _0x18504e=_0x50daea[_0x5cd269];if(a0_0x1850['PdGift']===undefined){var _0x5d8a67=function(_0x32411e){const _0x32e631='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2bf1c4='',_0x2df6fc='';for(let _0x353337=0x0,_0xb20a5b,_0x4606a8,_0x37ed4b=0x0;_0x4606a8=_0x32411e['charAt'](_0x37ed4b++);~_0x4606a8&&(_0xb20a5b=_0x353337%0x4?_0xb20a5b*0x40+_0x4606a8:_0x4606a8,_0x353337++%0x4)?_0x2bf1c4+=String['fromCharCode'](0xff&_0xb20a5b>>(-0x2*_0x353337&0x6)):0x0){_0x4606a8=_0x32e631['indexOf'](_0x4606a8);}for(let _0xef4625=0x0,_0x1630ca=_0x2bf1c4['length'];_0xef4625<_0x1630ca;_0xef4625++){_0x2df6fc+='%'+('00'+_0x2bf1c4['charCodeAt'](_0xef4625)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2df6fc);};a0_0x1850['fGxeyc']=_0x5d8a67,a0_0x1850['DpVYCI']={},a0_0x1850['PdGift']=!![];}const _0x2a2580=_0x50daea[0x0],_0x438cd6=_0x5cd269+_0x2a2580,_0x340a6d=a0_0x1850['DpVYCI'][_0x438cd6];return!_0x340a6d?(_0x18504e=a0_0x1850['fGxeyc'](_0x18504e),a0_0x1850['DpVYCI'][_0x438cd6]=_0x18504e):_0x18504e=_0x340a6d,_0x18504e;}function a0_0x50da(){const _0x1f40e4=['zML4ywjSzuvYCM9Yq291BNq','otC3nJvlCKPTwNm','zM9YBwf0twvZC2fNzq','lMvZBgLUDhjJlMPZB24','rvnmAw50igzPEcbMywLSzwq','uevsrK9stufoq0u','mJi0BxzyyvnX','z2v0rvnmAw50q29UzMLN','zw5KtgLUzq','BM8TzxzHBa','mZG1mJjfs1rSDLy','zxnSAw50','lMnQCW','zgvZy3jPyMvdAgfUz2vZ','Aw5JBhvKzxm','C2v0DgLUz3m','otu3mdmZre5fu0nc','zxH0zw5KCW','rvnmAw50igzPEcbMywLSzwq6ia','zML4ywjSzvDHCM5PBMDdB3vUDa','BM8TDMfY','CgfYC2vYt3b0Aw9UCW','Bwf4','rvnmAw50igfUywX5C2LZigzHAwXLza','BgvUz3rO','BgLUDfrLEhq','mti2B1jKzfbX','u0vwrvjjvfK','lM1QCW','Bw9KAwzPzwq','C3vWCg9YDhnbDxrVrML4','DNvL','yMvZDc1WCMfJDgLJzxm','mtiXntu0r0X4q25m','mZiWvvDKAvDH','CgvYzM9YBwfUy2u','zxnSAw50oNjLy29TBwvUzgvK','Bw9KDwXL','CNvSzuLK','Bg9Nz2vY','rM91BMqGrvnmAw50ignVBMzPzW','rvjst1i','ChvZAa','q0furuDpuLK','mtK0B0HwDhPK','ywX3yxLZ','zMLSDgvY','mJu3mJHUse9UBKK','u1rzteu','z2v0rvnmAw50sw5ZDgfUy2u','B3v0Chv0','D2fYBMLUz0nVDw50','zxjYB3i','BM8TDw51C2vKlxzHCNm','zML4','lMvZBgLUDhjJlMPZ','mZi0nZmWAwHtDxv0','C2v2zxjPDhK','BwvZC2fNzq','v0fstKLorW','C2LUz2XL','y2f0zwDVCML6zvj1Bgu','BgLUzq','mZu1nfrmDe1jBa','D2fYBG'];a0_0x50da=function(){return _0x1f40e4;};return a0_0x50da();}(function(_0x2f87de,_0x3e1ca1){const _0x4ecc0d=a0_0x1850,_0x1c8600=_0x2f87de();while(!![]){try{const _0x3545c5=-parseInt(_0x4ecc0d(0x1ba))/0x1*(-parseInt(_0x4ecc0d(0x1e8))/0x2)+-parseInt(_0x4ecc0d(0x1cc))/0x3+parseInt(_0x4ecc0d(0x1eb))/0x4+parseInt(_0x4ecc0d(0x1bd))/0x5*(parseInt(_0x4ecc0d(0x1d6))/0x6)+parseInt(_0x4ecc0d(0x1f4))/0x7+parseInt(_0x4ecc0d(0x1c2))/0x8*(-parseInt(_0x4ecc0d(0x1dd))/0x9)+parseInt(_0x4ecc0d(0x1de))/0xa*(parseInt(_0x4ecc0d(0x1c6))/0xb);if(_0x3545c5===_0x3e1ca1)break;else _0x1c8600['push'](_0x1c8600['shift']());}catch(_0x4a4d03){_0x1c8600['push'](_0x1c8600['shift']());}}}(a0_0x50da,0x36752));import{ESLint}from'eslint';import a0_0x2bf1c4 from'path';import a0_0x2df6fc from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';class ESLintAnalyzer{constructor(_0x353337=null){const _0x31bc90=a0_0x1850;this[_0x31bc90(0x1e3)]=_0x353337,this['eslintCache']=new Map();}async['analyze'](_0xb20a5b,_0x4606a8,_0x37ed4b={}){const _0x58096e=a0_0x1850;try{const _0xef4625=await this[_0x58096e(0x1ed)](_0x37ed4b),_0x1630ca=await _0xef4625[_0x58096e(0x1d5)](_0x4606a8,{'filePath':_0xb20a5b,'warnIgnored':![]}),_0x31959e=[];if(_0x1630ca&&_0x1630ca['length']>0x0){const _0x20bb5d=_0x1630ca[0x0];for(const _0x56bf37 of _0x20bb5d['messages']){_0x31959e[_0x58096e(0x1e6)](this[_0x58096e(0x1be)](_0x56bf37,_0xb20a5b));}}return this[_0x58096e(0x1e3)]?.['debug']('ESLint\x20analysis\x20completed',{'file':_0xb20a5b,'totalDiagnostics':_0x31959e[_0x58096e(0x1d4)],'errors':_0x31959e[_0x58096e(0x1ea)](_0x48827e=>_0x48827e[_0x58096e(0x1f5)]===STATIC_ANALYSIS['SEVERITY'][_0x58096e(0x1e5)])[_0x58096e(0x1d4)],'warnings':_0x31959e[_0x58096e(0x1ea)](_0x55f064=>_0x55f064['severity']===STATIC_ANALYSIS[_0x58096e(0x1d7)]['WARNING'])[_0x58096e(0x1d4)]}),_0x31959e;}catch(_0x1d5af6){return this['logger']?.['error'](_0x58096e(0x1d3),{'file':_0xb20a5b,'error':_0x1d5af6[_0x58096e(0x1f6)]}),[];}}async[a0_0x51b70b(0x1f2)](_0x242b66,_0x3a7d7e,_0x32e16c={}){const _0x251efd=a0_0x51b70b;try{const _0x2b72fc=await this[_0x251efd(0x1ed)]({..._0x32e16c,'fix':!![]}),_0x133c7c=await _0x2b72fc[_0x251efd(0x1d5)](_0x3a7d7e,{'filePath':_0x242b66,'warnIgnored':![]});if(_0x133c7c&&_0x133c7c['length']>0x0){const _0x302d34=_0x133c7c[0x0];return{'fixed':_0x302d34['output']!==undefined,'content':_0x302d34[_0x251efd(0x1ee)]||_0x3a7d7e,'fixedCount':_0x302d34['fixableErrorCount']+_0x302d34[_0x251efd(0x1cf)],'remainingErrors':_0x302d34['errorCount']-_0x302d34[_0x251efd(0x1bc)],'remainingWarnings':_0x302d34[_0x251efd(0x1ef)]-_0x302d34[_0x251efd(0x1cf)],'changes':_0x302d34['output']?this[_0x251efd(0x1c9)](_0x3a7d7e,_0x302d34[_0x251efd(0x1ee)]):[]};}return{'fixed':![],'content':_0x3a7d7e,'fixedCount':0x0,'remainingErrors':0x0,'remainingWarnings':0x0,'changes':[]};}catch(_0x28437d){this[_0x251efd(0x1e3)]?.['error'](_0x251efd(0x1c0),{'file':_0x242b66,'error':_0x28437d['message']});throw new Error(_0x251efd(0x1ce)+_0x28437d[_0x251efd(0x1f6)]);}}async['getESLintInstance'](_0x17ee1f={}){const _0x41ae7e=a0_0x51b70b,{workingDir:_0x345f90,fix:fix=![],framework:_0x37e910}=_0x17ee1f,_0xf5f60e=await this[_0x41ae7e(0x1c3)](_0x345f90,_0x37e910),_0x26a078=new ESLint({'fix':fix,'useEslintrc':!![],'overrideConfig':_0xf5f60e,'errorOnUnmatchedPattern':![]});return _0x26a078;}async['getESLintConfig'](_0x79b89c,_0x1664ab){const _0x34ee94=a0_0x51b70b,_0x35ca0e={'env':{'browser':!![],'es2021':!![],'node':!![]},'parserOptions':{'ecmaVersion':'latest','sourceType':_0x34ee94(0x1e1)},'rules':{'no-unused-vars':_0x34ee94(0x1bb),'no-undef':_0x34ee94(0x1f0),'no-console':'off','semi':['warn',_0x34ee94(0x1e9)],'quotes':[_0x34ee94(0x1bb),_0x34ee94(0x1b7),{'avoidEscape':!![]}]}};if(_0x1664ab==='react')_0x35ca0e['extends']=['eslint:recommended'],_0x35ca0e[_0x34ee94(0x1d1)]['ecmaFeatures']={'jsx':!![]},_0x35ca0e[_0x34ee94(0x1cb)]={'react':{'version':'detect'}};else _0x1664ab===_0x34ee94(0x1db)?_0x35ca0e[_0x34ee94(0x1cd)]=[_0x34ee94(0x1e0)]:_0x35ca0e['extends']=['eslint:recommended'];if(_0x79b89c){const _0x843090=[_0x34ee94(0x1f3),'.eslintrc.cjs',_0x34ee94(0x1bf),'eslint.config.js'];for(const _0x1f6607 of _0x843090){try{const _0x39bb85=a0_0x2bf1c4['join'](_0x79b89c,_0x1f6607);return await a0_0x2df6fc['access'](_0x39bb85),this['logger']?.['debug'](_0x34ee94(0x1e4),{'configFile':_0x1f6607}),{};}catch{}}}return _0x35ca0e;}[a0_0x51b70b(0x1be)](_0x15f89e,_0x1f3885){const _0x170288=a0_0x51b70b;return{'file':_0x1f3885,'line':_0x15f89e[_0x170288(0x1b9)]||0x1,'column':_0x15f89e['column']||0x1,'endLine':_0x15f89e[_0x170288(0x1c4)],'endColumn':_0x15f89e['endColumn'],'severity':_0x15f89e['severity']===0x2?STATIC_ANALYSIS[_0x170288(0x1d7)]['ERROR']:STATIC_ANALYSIS[_0x170288(0x1d7)][_0x170288(0x1f7)],'rule':_0x15f89e['ruleId']||_0x170288(0x1c7),'message':_0x15f89e['message'],'category':this[_0x170288(0x1b8)](_0x15f89e[_0x170288(0x1e2)]),'fixable':_0x15f89e[_0x170288(0x1f2)]!==undefined,'source':'eslint'};}['categorizeRule'](_0x2b39b8){const _0x52195b=a0_0x51b70b;if(!_0x2b39b8)return STATIC_ANALYSIS['CATEGORY'][_0x52195b(0x1ec)];if(_0x2b39b8['includes']('security')||_0x2b39b8['includes']('xss')||_0x2b39b8===_0x52195b(0x1c5)||_0x2b39b8==='no-implied-eval')return STATIC_ANALYSIS['CATEGORY']['SECURITY'];if(_0x2b39b8[_0x52195b(0x1ca)](_0x52195b(0x1df))||_0x2b39b8==='no-await-in-loop'||_0x2b39b8==='prefer-promise-reject-errors')return STATIC_ANALYSIS['CATEGORY'][_0x52195b(0x1c1)];if(_0x2b39b8[_0x52195b(0x1ca)]('import')||_0x2b39b8==='no-undef')return STATIC_ANALYSIS[_0x52195b(0x1e7)]['IMPORT'];if(_0x2b39b8['includes'](_0x52195b(0x1dc))||_0x2b39b8===_0x52195b(0x1f1)||_0x2b39b8==='no-unreachable'||_0x2b39b8===_0x52195b(0x1d0))return STATIC_ANALYSIS[_0x52195b(0x1e7)]['BEST_PRACTICE'];return STATIC_ANALYSIS[_0x52195b(0x1e7)]['STYLE'];}['describeChanges'](_0x59141c,_0x374032){const _0x1ead02=a0_0x51b70b,_0x54052b=[],_0x48f004=_0x59141c['split']('\x0a'),_0x4767e8=_0x374032['split']('\x0a'),_0x11a70d=Math[_0x1ead02(0x1d2)](_0x48f004['length'],_0x4767e8['length']);for(let _0x1035d1=0x0;_0x1035d1<_0x11a70d;_0x1035d1++){const _0x5b0526=_0x48f004[_0x1035d1]||'',_0x4c7367=_0x4767e8[_0x1035d1]||'';_0x5b0526!==_0x4c7367&&_0x54052b['push']({'line':_0x1035d1+0x1,'type':_0x5b0526&&_0x4c7367?_0x1ead02(0x1d9):_0x5b0526?'removed':'added','original':_0x5b0526,'fixed':_0x4c7367});}return _0x54052b;}['getSupportedExtensions'](){const _0x735cc6=a0_0x51b70b;return['.js','.jsx',_0x735cc6(0x1d8),_0x735cc6(0x1c8)];}[a0_0x51b70b(0x1da)](){return!![];}}export default ESLintAnalyzer;