@loxia-labs/loxia-autopilot-one 1.0.14 → 1.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/README.md +2 -2
  2. package/bin/cli.js +1 -1
  3. package/bin/loxia-terminal-v2.js +1 -1
  4. package/bin/loxia-terminal.js +1 -1
  5. package/bin/start-with-terminal.js +1 -1
  6. package/package.json +1 -1
  7. package/scripts/install-scanners.js +1 -1
  8. package/src/analyzers/CSSAnalyzer.js +1 -1
  9. package/src/analyzers/ConfigValidator.js +1 -1
  10. package/src/analyzers/ESLintAnalyzer.js +1 -1
  11. package/src/analyzers/JavaScriptAnalyzer.js +1 -1
  12. package/src/analyzers/PrettierFormatter.js +1 -1
  13. package/src/analyzers/PythonAnalyzer.js +1 -1
  14. package/src/analyzers/SecurityAnalyzer.js +1 -1
  15. package/src/analyzers/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/agentActivityService.js +1 -1
  76. package/src/services/aiService.js +1 -1
  77. package/src/services/apiKeyManager.js +1 -1
  78. package/src/services/benchmarkService.js +1 -1
  79. package/src/services/budgetService.js +1 -1
  80. package/src/services/contextInjectionService.js +1 -1
  81. package/src/services/conversationCompactionService.js +1 -1
  82. package/src/services/errorHandler.js +1 -1
  83. package/src/services/fileAttachmentService.js +1 -1
  84. package/src/services/modelRouterService.js +1 -1
  85. package/src/services/modelsService.js +1 -1
  86. package/src/services/qualityInspector.js +1 -1
  87. package/src/services/tokenCountingService.js +1 -1
  88. package/src/tools/agentCommunicationTool.js +1 -1
  89. package/src/tools/agentDelayTool.js +1 -1
  90. package/src/tools/asyncToolManager.js +1 -1
  91. package/src/tools/baseTool.js +1 -1
  92. package/src/tools/browserTool.js +1 -1
  93. package/src/tools/cloneDetectionTool.js +1 -1
  94. package/src/tools/dependencyResolverTool.js +1 -1
  95. package/src/tools/fileContentReplaceTool.js +1 -1
  96. package/src/tools/fileSystemTool.js +1 -1
  97. package/src/tools/fileTreeTool.js +1 -1
  98. package/src/tools/imageTool.js +1 -1
  99. package/src/tools/importAnalyzerTool.js +1 -1
  100. package/src/tools/jobDoneTool.js +1 -1
  101. package/src/tools/seekTool.js +1 -1
  102. package/src/tools/staticAnalysisTool.js +1 -1
  103. package/src/tools/taskManagerTool.js +1 -1
  104. package/src/tools/terminalTool.js +1 -1
  105. package/src/tools/webTool.js +1 -1
  106. package/src/types/agent.js +1 -1
  107. package/src/types/contextReference.js +1 -1
  108. package/src/types/conversation.js +1 -1
  109. package/src/types/toolCommand.js +1 -1
  110. package/src/utilities/attachmentValidator.js +1 -1
  111. package/src/utilities/configManager.js +1 -1
  112. package/src/utilities/constants.js +1 -1
  113. package/src/utilities/directoryAccessManager.js +1 -1
  114. package/src/utilities/fileProcessor.js +1 -1
  115. package/src/utilities/logger.js +1 -1
  116. package/src/utilities/tagParser.js +1 -1
  117. package/src/utilities/toolConstants.js +1 -1
  118. package/src/utilities/userDataDir.js +1 -1
  119. package/web-ui/build/index.html +2 -2
  120. package/web-ui/build/static/index-CR8edPA3.js +348 -0
  121. package/web-ui/build/static/index-uN7nOVvZ.css +1 -0
  122. package/web-ui/build/static/index-DXN850Y2.js +0 -400
  123. package/web-ui/build/static/index-an-YRzUX.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.14
102
+ # Should display: Loxia Autopilot One v1.0.15
103
103
  ```
104
104
 
105
105
  ### 4. Create an API Key
@@ -369,7 +369,7 @@ Loxia automatically compacts long conversations to stay within token limits:
369
369
 
370
370
  ## 🛣️ Roadmap
371
371
 
372
- ### Current Version (1.0.14)
372
+ ### Current Version (1.0.15)
373
373
 
374
374
  - ✅ Multi-agent orchestration
375
375
  - ✅ 18+ specialized tools
package/bin/cli.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x20cb28=a0_0x4bad;function a0_0x4bad(_0x77b389,_0x20616e){_0x77b389=_0x77b389-0xbb;const _0x411973=a0_0x4119();let _0x4badc6=_0x411973[_0x77b389];return _0x4badc6;}(function(_0xc749f4,_0x449c4d){const _0x43a51e=a0_0x4bad,_0x18d3df=_0xc749f4();while(!![]){try{const _0x255a64=-parseInt(_0x43a51e(0xf7))/0x1*(-parseInt(_0x43a51e(0xcd))/0x2)+-parseInt(_0x43a51e(0xef))/0x3*(-parseInt(_0x43a51e(0x105))/0x4)+parseInt(_0x43a51e(0xdc))/0x5*(parseInt(_0x43a51e(0xe5))/0x6)+-parseInt(_0x43a51e(0xee))/0x7+-parseInt(_0x43a51e(0xe6))/0x8*(-parseInt(_0x43a51e(0xe4))/0x9)+-parseInt(_0x43a51e(0x102))/0xa+-parseInt(_0x43a51e(0xea))/0xb;if(_0x255a64===_0x449c4d)break;else _0x18d3df['push'](_0x18d3df['shift']());}catch(_0xc8d689){_0x18d3df['push'](_0x18d3df['shift']());}}}(a0_0x4119,0xc2d2a));import{fileURLToPath}from'url';import{dirname,join}from'path';import{spawn,exec}from'child_process';import{readFileSync}from'fs';import a0_0x18e68e from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x20cb28(0xd9),SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process['argv'][a0_0x20cb28(0xe2)](0x2),command=args[0x0]&&!args[0x0][a0_0x20cb28(0xbb)]('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args[a0_0x20cb28(0x106)]('--help')||args[a0_0x20cb28(0x106)]('-h'),'version':args['includes'](a0_0x20cb28(0xfb))||args['includes']('-v')};for(let i=0x0;i<args['length'];i++){args[i]===a0_0x20cb28(0xce)&&args[i+0x1]&&(flags['port']=parseInt(args[i+0x1],0xa)),args[i]===a0_0x20cb28(0xe1)&&args[i+0x1]&&(flags['host']=args[i+0x1]);}const port=flags[a0_0x20cb28(0xe3)]||DEFAULT_PORT,host=flags[a0_0x20cb28(0xff)]||DEFAULT_HOST,serverUrl='http://'+host+':'+port;if(flags[a0_0x20cb28(0xc5)]){const pkgPath=join(__dirname,'..',a0_0x20cb28(0xf3)),pkg=JSON[a0_0x20cb28(0xc6)](readFileSync(pkgPath,a0_0x20cb28(0xf0)));console['log'](a0_0x20cb28(0xcf)+pkg[a0_0x20cb28(0xc5)]),process[a0_0x20cb28(0xdb)](0x0);}if(flags[a0_0x20cb28(0xd4)]||!command){const pkgPath=join(__dirname,'..',a0_0x20cb28(0xf3)),pkg=JSON[a0_0x20cb28(0xc6)](readFileSync(pkgPath,a0_0x20cb28(0xf0)));console[a0_0x20cb28(0xed)](a0_0x20cb28(0xf1)+pkg[a0_0x20cb28(0xc5)]+'\x20-\x20AI\x20Agent\x20System\x0a\x0aUsage:\x0a\x20\x20loxia\x20<command>\x20[options]\x0a\x0aCommands:\x0a\x20\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20+\x20open\x20Web\x20UI\x20in\x20browser\x0a\x20\x20terminal\x20\x20\x20\x20\x20\x20\x20\x20Start\x20Terminal\x20UI\x20(server\x20must\x20be\x20running)\x0a\x20\x20plus-web\x20\x20\x20\x20\x20\x20\x20\x20Alias\x20for\x20\x27web\x27\x0a\x20\x20plus-terminal\x20\x20\x20Start\x20server\x20+\x20Terminal\x20UI\x20together\x0a\x0aOptions:\x0a\x20\x20--port\x20<number>\x20\x20\x20Specify\x20port\x20(default:\x20'+DEFAULT_PORT+a0_0x20cb28(0xc4)+DEFAULT_HOST+a0_0x20cb28(0xf2)),process['exit'](0x0);}async function checkServerRunning(_0x28014d,_0x193c2a,_0x584934=0x1){for(let _0x55d444=0x0;_0x55d444<_0x584934;_0x55d444++){const _0x25744d=await new Promise(_0x29c34d=>{const _0x5d9af2=a0_0x4bad,_0x2c4ae0=a0_0x18e68e[_0x5d9af2(0xbf)](_0x5d9af2(0xd7)+_0x28014d+':'+_0x193c2a+_0x5d9af2(0xf4),_0x28f7ec=>{const _0x2c8b94=_0x5d9af2;_0x29c34d(_0x28f7ec[_0x2c8b94(0xf8)]===0xc8);});_0x2c4ae0['on'](_0x5d9af2(0x103),()=>_0x29c34d(![])),_0x2c4ae0[_0x5d9af2(0xc1)](0x7d0,()=>{const _0x417a5a=_0x5d9af2;_0x2c4ae0[_0x417a5a(0x107)](),_0x29c34d(![]);});});if(_0x25744d)return!![];_0x55d444<_0x584934-0x1&&await new Promise(_0x3f5158=>setTimeout(_0x3f5158,SERVER_CHECK_INTERVAL));}return![];}async function waitForServer(_0x452945,_0x179c3b,_0x17fa3f=SERVER_STARTUP_TIMEOUT){const _0x4db531=a0_0x20cb28,_0x258b12=Math[_0x4db531(0xd3)](_0x17fa3f/SERVER_CHECK_INTERVAL);return checkServerRunning(_0x452945,_0x179c3b,_0x258b12);}function openBrowser(_0x446678){const _0xe237df=a0_0x20cb28,_0x332014=process[_0xe237df(0xc0)];let _0x2120c5;if(_0x332014===_0xe237df(0xcc))_0x2120c5=_0xe237df(0xfa)+_0x446678+'\x22';else _0x332014===_0xe237df(0xf6)?_0x2120c5=_0xe237df(0xda)+_0x446678+'\x22':_0x2120c5=_0xe237df(0x101)+_0x446678+'\x22';exec(_0x2120c5,_0x2b621a=>{const _0x3265b5=_0xe237df;_0x2b621a&&(console[_0x3265b5(0xed)](_0x3265b5(0xc9)),console[_0x3265b5(0xed)](_0x3265b5(0xe9)+_0x446678));});}function startServer(_0x4097b1=![]){const _0x227c4f=a0_0x20cb28,_0x4d0220={...process['env'],'LOXIA_PORT':port['toString'](),'PORT':port['toString']()};flags['host']&&(_0x4d0220['LOXIA_HOST']=flags[_0x227c4f(0xff)]);const _0x1e8555=join(__dirname,'..',_0x227c4f(0xc3),_0x227c4f(0xf5)),_0x280e1c=spawn('node',[_0x1e8555],{'cwd':join(__dirname,'..'),'env':_0x4d0220,'stdio':_0x4097b1?[_0x227c4f(0xfd),_0x227c4f(0xfd),_0x227c4f(0xfd)]:_0x227c4f(0xcb),'detached':_0x4097b1});return _0x4097b1&&_0x280e1c[_0x227c4f(0xde)](),_0x280e1c;}function startTerminalUI(){const _0x3a6fe0=a0_0x20cb28,_0x422de8=join(__dirname,_0x3a6fe0(0xe7)),_0x361614={...process[_0x3a6fe0(0xe0)],'LOXIA_PORT':port['toString'](),'LOXIA_HOST':host},_0x33e343=spawn(_0x3a6fe0(0xc7),[_0x422de8],{'cwd':join(__dirname,'..'),'env':_0x361614,'stdio':_0x3a6fe0(0xcb)});return _0x33e343;}function a0_0x4119(){const _0x366277=['8088340qfxcPJ','error','message','804JYACpw','includes','destroy','\x0aOpening\x20Web\x20UI\x20at\x20','startsWith','Error:','Server\x20is\x20running\x20at\x20','Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.','get','platform','setTimeout','web','src',')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20','version','parse','node','SIGINT','Could\x20not\x20open\x20browser\x20automatically.','Starting\x20Loxia\x20server\x20in\x20background...','inherit','darwin','49458RJeGfA','--port','Loxia\x20Autopilot\x20One\x20v','Server\x20running\x20at\x20','\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI','\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a','ceil','help','catch','kill','http://','\x20manually.','localhost','start\x20\x22\x22\x20\x22','exit','6404725CQuUIc','pid','unref','\x0aServer\x20may\x20still\x20be\x20starting.\x20Open\x20','env','--host','slice','port','81CHwCWC','6lkzbZI','484856GXIzze','loxia-terminal.js','Starting\x20Terminal\x20UI...\x0a','Please\x20open\x20manually:\x20','28857763BbPGrF','SIGTERM','\x0aShutting\x20down\x20server...','log','130928lOpdqV','17334BOxZQm','utf8','\x0aLoxia\x20Autopilot\x20One\x20v',')\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','package.json','/api/health','index.js','win32','51RaJKki','statusCode','\x0aPlease\x20start\x20the\x20server\x20first:','open\x20\x22','--version','Waiting\x20for\x20server\x20to\x20start...','ignore','Unknown\x20command:\x20','host','\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.','xdg-open\x20\x22'];a0_0x4119=function(){return _0x366277;};return a0_0x4119();}const commands={'web':async()=>{const _0x15ea42=a0_0x20cb28;console[_0x15ea42(0xed)]('Starting\x20Loxia\x20server...\x0a');const _0x1977fd=startServer(![]);console[_0x15ea42(0xed)](_0x15ea42(0xfc));const _0xf17734=await waitForServer(host,port);_0xf17734?(console[_0x15ea42(0xed)](_0x15ea42(0x108)+serverUrl),openBrowser(serverUrl)):console[_0x15ea42(0xed)](_0x15ea42(0xdf)+serverUrl+_0x15ea42(0xd8)),process['on'](_0x15ea42(0xc8),()=>_0x1977fd[_0x15ea42(0xd6)](_0x15ea42(0xc8))),process['on'](_0x15ea42(0xeb),()=>_0x1977fd['kill'](_0x15ea42(0xeb))),_0x1977fd['on'](_0x15ea42(0xdb),_0xdb146c=>process[_0x15ea42(0xdb)](_0xdb146c||0x0));},'plus-web':async()=>{const _0x19d2af=a0_0x20cb28;await commands[_0x19d2af(0xc2)]();},'terminal':async()=>{const _0x7376ab=a0_0x20cb28;console[_0x7376ab(0xed)]('Checking\x20if\x20server\x20is\x20running...');const _0x199396=await checkServerRunning(host,port);!_0x199396&&(console[_0x7376ab(0x103)]('\x0aServer\x20is\x20not\x20running\x20at\x20'+serverUrl),console[_0x7376ab(0x103)](_0x7376ab(0xf9)),console[_0x7376ab(0x103)](_0x7376ab(0xd1)),console[_0x7376ab(0x103)](_0x7376ab(0xd2)),process['exit'](0x1));console[_0x7376ab(0xed)](_0x7376ab(0xbd)+serverUrl),console['log'](_0x7376ab(0xe8));const _0x457bd2=startTerminalUI();process['on']('SIGINT',()=>_0x457bd2['kill'](_0x7376ab(0xc8))),process['on'](_0x7376ab(0xeb),()=>_0x457bd2[_0x7376ab(0xd6)]('SIGTERM')),_0x457bd2['on']('exit',_0x5922e7=>process[_0x7376ab(0xdb)](_0x5922e7||0x0));},'plus-terminal':async()=>{const _0x373936=a0_0x20cb28;console['log'](_0x373936(0xca));const _0x541583=startServer(!![]),_0x2ff221=await waitForServer(host,port);!_0x2ff221&&(console[_0x373936(0x103)](_0x373936(0x100)),process[_0x373936(0xdb)](0x1));console['log'](_0x373936(0xd0)+serverUrl),console['log'](_0x373936(0xe8));const _0x48683f=startTerminalUI();_0x48683f['on'](_0x373936(0xdb),_0xed7ee=>{const _0x311511=_0x373936;console['log'](_0x311511(0xec));try{process['kill'](_0x541583[_0x311511(0xdd)],_0x311511(0xeb));}catch(_0x102b7b){}process['exit'](_0xed7ee||0x0);}),process['on'](_0x373936(0xc8),()=>{const _0x212b76=_0x373936;_0x48683f[_0x212b76(0xd6)](_0x212b76(0xc8));}),process['on'](_0x373936(0xeb),()=>{const _0x3dc8f8=_0x373936;_0x48683f[_0x3dc8f8(0xd6)]('SIGTERM');});}};commands[command]?commands[command]()[a0_0x20cb28(0xd5)](_0xda4bf7=>{const _0x4a562c=a0_0x20cb28;console[_0x4a562c(0x103)](_0x4a562c(0xbc),_0xda4bf7[_0x4a562c(0x104)]),process[_0x4a562c(0xdb)](0x1);}):(console[a0_0x20cb28(0x103)](a0_0x20cb28(0xfe)+command),console['error'](a0_0x20cb28(0xbe)),process[a0_0x20cb28(0xdb)](0x1));
3
+ const a0_0x3de577=a0_0x2c27;(function(_0x12d5d2,_0x9603e7){const _0x5c80c1=a0_0x2c27,_0x5ec526=_0x12d5d2();while(!![]){try{const _0xdd91cb=-parseInt(_0x5c80c1(0xd4))/0x1*(-parseInt(_0x5c80c1(0x104))/0x2)+parseInt(_0x5c80c1(0xf0))/0x3*(parseInt(_0x5c80c1(0xc2))/0x4)+parseInt(_0x5c80c1(0xf7))/0x5*(parseInt(_0x5c80c1(0xe3))/0x6)+parseInt(_0x5c80c1(0xcc))/0x7*(-parseInt(_0x5c80c1(0xfd))/0x8)+-parseInt(_0x5c80c1(0xdf))/0x9+parseInt(_0x5c80c1(0xf6))/0xa*(-parseInt(_0x5c80c1(0xcf))/0xb)+parseInt(_0x5c80c1(0xce))/0xc;if(_0xdd91cb===_0x9603e7)break;else _0x5ec526['push'](_0x5ec526['shift']());}catch(_0x952588){_0x5ec526['push'](_0x5ec526['shift']());}}}(a0_0xaeb2,0x244a3));import{fileURLToPath}from'url';import{dirname,join}from'path';import{spawn,exec}from'child_process';import{readFileSync}from'fs';import a0_0x5b5330 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x3de577(0xdc),SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process[a0_0x3de577(0xe9)][a0_0x3de577(0xc3)](0x2),command=args[0x0]&&!args[0x0][a0_0x3de577(0xe8)]('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args[a0_0x3de577(0xcd)](a0_0x3de577(0xff))||args[a0_0x3de577(0xcd)]('-h'),'version':args[a0_0x3de577(0xcd)](a0_0x3de577(0xfa))||args[a0_0x3de577(0xcd)]('-v')};for(let i=0x0;i<args['length'];i++){args[i]===a0_0x3de577(0xc8)&&args[i+0x1]&&(flags[a0_0x3de577(0xe4)]=parseInt(args[i+0x1],0xa)),args[i]==='--host'&&args[i+0x1]&&(flags[a0_0x3de577(0xfb)]=args[i+0x1]);}function a0_0x2c27(_0x3abb66,_0x557829){_0x3abb66=_0x3abb66-0xc2;const _0xaeb287=a0_0xaeb2();let _0x2c278b=_0xaeb287[_0x3abb66];return _0x2c278b;}const port=flags[a0_0x3de577(0xe4)]||DEFAULT_PORT,host=flags[a0_0x3de577(0xfb)]||DEFAULT_HOST,serverUrl=a0_0x3de577(0xe5)+host+':'+port;if(flags[a0_0x3de577(0xd8)]){const pkgPath=join(__dirname,'..',a0_0x3de577(0xf5)),pkg=JSON['parse'](readFileSync(pkgPath,a0_0x3de577(0xd6)));console['log'](a0_0x3de577(0xca)+pkg[a0_0x3de577(0xd8)]),process[a0_0x3de577(0xe1)](0x0);}if(flags['help']||!command){const pkgPath=join(__dirname,'..',a0_0x3de577(0xf5)),pkg=JSON[a0_0x3de577(0xd3)](readFileSync(pkgPath,a0_0x3de577(0xd6)));console['log'](a0_0x3de577(0xf2)+pkg[a0_0x3de577(0xd8)]+a0_0x3de577(0xf9)+DEFAULT_PORT+')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20'+DEFAULT_HOST+a0_0x3de577(0xfe)),process[a0_0x3de577(0xe1)](0x0);}async function checkServerRunning(_0x2e3d6e,_0x21350d,_0x4ae414=0x1){for(let _0x5e08af=0x0;_0x5e08af<_0x4ae414;_0x5e08af++){const _0x438139=await new Promise(_0x18c566=>{const _0x4e8bf7=a0_0x2c27,_0x404432=a0_0x5b5330[_0x4e8bf7(0xd2)](_0x4e8bf7(0xe5)+_0x2e3d6e+':'+_0x21350d+_0x4e8bf7(0xee),_0x212ef0=>{const _0x46d9fd=_0x4e8bf7;_0x18c566(_0x212ef0[_0x46d9fd(0xe0)]===0xc8);});_0x404432['on'](_0x4e8bf7(0xf8),()=>_0x18c566(![])),_0x404432[_0x4e8bf7(0xc6)](0x7d0,()=>{const _0x4daa13=_0x4e8bf7;_0x404432[_0x4daa13(0xd7)](),_0x18c566(![]);});});if(_0x438139)return!![];_0x5e08af<_0x4ae414-0x1&&await new Promise(_0x3d082c=>setTimeout(_0x3d082c,SERVER_CHECK_INTERVAL));}return![];}async function waitForServer(_0xa3271c,_0x1ac6d5,_0x1db942=SERVER_STARTUP_TIMEOUT){const _0x2b0e3a=Math['ceil'](_0x1db942/SERVER_CHECK_INTERVAL);return checkServerRunning(_0xa3271c,_0x1ac6d5,_0x2b0e3a);}function openBrowser(_0x19bf68){const _0xe6cdc0=a0_0x3de577,_0x5e1608=process['platform'];let _0x55a9de;if(_0x5e1608==='darwin')_0x55a9de=_0xe6cdc0(0x105)+_0x19bf68+'\x22';else _0x5e1608===_0xe6cdc0(0x102)?_0x55a9de=_0xe6cdc0(0xdd)+_0x19bf68+'\x22':_0x55a9de=_0xe6cdc0(0xe7)+_0x19bf68+'\x22';exec(_0x55a9de,_0x33dab0=>{const _0x4fef26=_0xe6cdc0;_0x33dab0&&(console[_0x4fef26(0x106)](_0x4fef26(0x108)),console[_0x4fef26(0x106)](_0x4fef26(0xcb)+_0x19bf68));});}function startServer(_0x42bdeb=![]){const _0x35db87=a0_0x3de577,_0x168c6c={...process['env'],'LOXIA_PORT':port[_0x35db87(0xfc)](),'PORT':port[_0x35db87(0xfc)]()};flags[_0x35db87(0xfb)]&&(_0x168c6c[_0x35db87(0xc4)]=flags[_0x35db87(0xfb)]);const _0x9ae793=join(__dirname,'..',_0x35db87(0xf1),_0x35db87(0xde)),_0xb9d18d=spawn(_0x35db87(0xf4),[_0x9ae793],{'cwd':join(__dirname,'..'),'env':_0x168c6c,'stdio':_0x42bdeb?[_0x35db87(0xe6),_0x35db87(0xe6),'ignore']:_0x35db87(0x103),'detached':_0x42bdeb});return _0x42bdeb&&_0xb9d18d['unref'](),_0xb9d18d;}function startTerminalUI(){const _0x3b850e=a0_0x3de577,_0x5c9a3f=join(__dirname,'loxia-terminal.js'),_0x322bf7={...process[_0x3b850e(0xc7)],'LOXIA_PORT':port[_0x3b850e(0xfc)](),'LOXIA_HOST':host},_0x660802=spawn('node',[_0x5c9a3f],{'cwd':join(__dirname,'..'),'env':_0x322bf7,'stdio':_0x3b850e(0x103)});return _0x660802;}const commands={'web':async()=>{const _0x1f5e01=a0_0x3de577;console[_0x1f5e01(0x106)](_0x1f5e01(0xe2));const _0x97d4d2=startServer(![]);console[_0x1f5e01(0x106)](_0x1f5e01(0x100));const _0x8d5560=await waitForServer(host,port);_0x8d5560?(console[_0x1f5e01(0x106)]('\x0aOpening\x20Web\x20UI\x20at\x20'+serverUrl),openBrowser(serverUrl)):console[_0x1f5e01(0x106)]('\x0aServer\x20may\x20still\x20be\x20starting.\x20Open\x20'+serverUrl+_0x1f5e01(0xf3)),process['on'](_0x1f5e01(0xea),()=>_0x97d4d2[_0x1f5e01(0xec)](_0x1f5e01(0xea))),process['on']('SIGTERM',()=>_0x97d4d2['kill']('SIGTERM')),_0x97d4d2['on']('exit',_0x10b35d=>process[_0x1f5e01(0xe1)](_0x10b35d||0x0));},'plus-web':async()=>{await commands['web']();},'terminal':async()=>{const _0x31b977=a0_0x3de577;console[_0x31b977(0x106)](_0x31b977(0xed));const _0xc520d9=await checkServerRunning(host,port);!_0xc520d9&&(console[_0x31b977(0xf8)](_0x31b977(0x107)+serverUrl),console[_0x31b977(0xf8)]('\x0aPlease\x20start\x20the\x20server\x20first:'),console[_0x31b977(0xf8)](_0x31b977(0xd5)),console['error'](_0x31b977(0xdb)),process[_0x31b977(0xe1)](0x1));console[_0x31b977(0x106)]('Server\x20is\x20running\x20at\x20'+serverUrl),console[_0x31b977(0x106)](_0x31b977(0xeb));const _0x496c71=startTerminalUI();process['on']('SIGINT',()=>_0x496c71[_0x31b977(0xec)](_0x31b977(0xea))),process['on']('SIGTERM',()=>_0x496c71[_0x31b977(0xec)](_0x31b977(0xd1))),_0x496c71['on']('exit',_0x34f22d=>process[_0x31b977(0xe1)](_0x34f22d||0x0));},'plus-terminal':async()=>{const _0x344ba9=a0_0x3de577;console[_0x344ba9(0x106)](_0x344ba9(0xc5));const _0x5aaa0e=startServer(!![]),_0x522e4a=await waitForServer(host,port);!_0x522e4a&&(console[_0x344ba9(0xf8)]('\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.'),process[_0x344ba9(0xe1)](0x1));console[_0x344ba9(0x106)](_0x344ba9(0xc9)+serverUrl),console[_0x344ba9(0x106)](_0x344ba9(0xeb));const _0x35a286=startTerminalUI();_0x35a286['on'](_0x344ba9(0xe1),_0x30a350=>{const _0x15d0aa=_0x344ba9;console['log'](_0x15d0aa(0xd9));try{process[_0x15d0aa(0xec)](_0x5aaa0e[_0x15d0aa(0xef)],'SIGTERM');}catch(_0x14ca2e){}process[_0x15d0aa(0xe1)](_0x30a350||0x0);}),process['on'](_0x344ba9(0xea),()=>{const _0x524c8f=_0x344ba9;_0x35a286['kill'](_0x524c8f(0xea));}),process['on'](_0x344ba9(0xd1),()=>{const _0x431961=_0x344ba9;_0x35a286[_0x431961(0xec)](_0x431961(0xd1));});}};function a0_0xaeb2(){const _0x3f2cdf=['--help','Waiting\x20for\x20server\x20to\x20start...','Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.','win32','inherit','28dZHKiM','open\x20\x22','log','\x0aServer\x20is\x20not\x20running\x20at\x20','Could\x20not\x20open\x20browser\x20automatically.','11448zkzQnT','slice','LOXIA_HOST','Starting\x20Loxia\x20server\x20in\x20background...','setTimeout','env','--port','Server\x20running\x20at\x20','Loxia\x20Autopilot\x20One\x20v','Please\x20open\x20manually:\x20','5649Ipzoqq','includes','1759272RVJkNf','671jHhbdj','Error:','SIGTERM','get','parse','12121iqjWwf','\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI','utf8','destroy','version','\x0aShutting\x20down\x20server...','Unknown\x20command:\x20','\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a','localhost','start\x20\x22\x22\x20\x22','index.js','1409967oJNAdy','statusCode','exit','Starting\x20Loxia\x20server...\x0a','6QnlHFT','port','http://','ignore','xdg-open\x20\x22','startsWith','argv','SIGINT','Starting\x20Terminal\x20UI...\x0a','kill','Checking\x20if\x20server\x20is\x20running...','/api/health','pid','51ntNPBm','src','\x0aLoxia\x20Autopilot\x20One\x20v','\x20manually.','node','package.json','39250JJnOUC','1023970tYalxo','error','\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','--version','host','toString','248PyIyOs',')\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'];a0_0xaeb2=function(){return _0x3f2cdf;};return a0_0xaeb2();}commands[command]?commands[command]()['catch'](_0x2ad87d=>{const _0x32dc9d=a0_0x3de577;console[_0x32dc9d(0xf8)](_0x32dc9d(0xd0),_0x2ad87d['message']),process[_0x32dc9d(0xe1)](0x1);}):(console[a0_0x3de577(0xf8)](a0_0x3de577(0xda)+command),console['error'](a0_0x3de577(0x101)),process[a0_0x3de577(0xe1)](0x1));
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x4b6ec5=a0_0x18a8;(function(_0x45a9b6,_0x5da477){const _0x4fdea8=a0_0x18a8,_0x1fb582=_0x45a9b6();while(!![]){try{const _0x20f106=-parseInt(_0x4fdea8(0xdc))/0x1*(parseInt(_0x4fdea8(0xe1))/0x2)+-parseInt(_0x4fdea8(0xe9))/0x3*(parseInt(_0x4fdea8(0xd1))/0x4)+parseInt(_0x4fdea8(0xd2))/0x5+parseInt(_0x4fdea8(0xe5))/0x6+parseInt(_0x4fdea8(0xd3))/0x7+-parseInt(_0x4fdea8(0xc9))/0x8+parseInt(_0x4fdea8(0xe4))/0x9;if(_0x20f106===_0x5da477)break;else _0x1fb582['push'](_0x1fb582['shift']());}catch(_0x27cb94){_0x1fb582['push'](_0x1fb582['shift']());}}}(a0_0x59d4,0xb6453));import{spawn}from'child_process';function a0_0x18a8(_0x51b6db,_0x38d2f9){_0x51b6db=_0x51b6db-0xc5;const _0x59d45f=a0_0x59d4();let _0x18a888=_0x59d45f[_0x51b6db];return _0x18a888;}import a0_0x21508e from'net';function a0_0x59d4(){const _0x20004d=['exit','...','❌\x20Failed\x20to\x20start\x20Terminal\x20UI:','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','LOXIA_PORT','dirname','slice','ignore','677170hlqmbF','--port','🎨\x20Launching\x20Ink-based\x20Terminal\x20UI...','message','\x20\x20\x201.\x20Make\x20sure\x20no\x20other\x20process\x20is\x20using\x20port\x208080','2kdZkUb','\x20\x20\x202.\x20Try\x20running\x20the\x20server\x20manually:\x20node\x20bin/cli.js','✓\x20Server\x20is\x20already\x20running\x20at\x20','5365395qhkCBv','4813704JkQhsg','length','stderr','Failed\x20to\x20start\x20server:','163143qHxsrc','--host','bin/cli.js','join','kill','stdout','toString','web','destroy','\x20\x20Loxia\x20Autopilot\x20One\x20-\x20Terminal\x20UI','node','error','env','--ui','localhost','now','💡\x20Troubleshooting:','connect','3162288umAlZE','pipe','Server\x20startup\x20timeout','timeout','LOXIA_HOST','\x20\x20\x203.\x20Check\x20logs\x20for\x20more\x20details','Socket','log','52TaiPRS','3718965yRUEov','2686292kzdYSm'];a0_0x59d4=function(){return _0x20004d;};return a0_0x59d4();}import a0_0x528584 from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=a0_0x528584['dirname'](__filename),projectRoot=a0_0x528584[a0_0x4b6ec5(0xd9)](__dirname),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x4b6ec5(0xc5),SERVER_STARTUP_TIMEOUT=0x2710;async function isServerRunning(_0x4960df,_0x4042f5){return new Promise(_0x3f1c80=>{const _0x20a07d=a0_0x18a8,_0x5e154c=new a0_0x21508e[(_0x20a07d(0xcf))]();_0x5e154c['setTimeout'](0x7d0),_0x5e154c['on'](_0x20a07d(0xc8),()=>{_0x5e154c['destroy'](),_0x3f1c80(!![]);}),_0x5e154c['on'](_0x20a07d(0xcc),()=>{const _0x45890f=_0x20a07d;_0x5e154c[_0x45890f(0xf1)](),_0x3f1c80(![]);}),_0x5e154c['on'](_0x20a07d(0xf4),()=>{const _0x5d21a1=_0x20a07d;_0x5e154c[_0x5d21a1(0xf1)](),_0x3f1c80(![]);}),_0x5e154c[_0x20a07d(0xc8)](_0x4042f5,_0x4960df);});}async function startServer(_0x34f70c,_0x5700e3){const _0x523d40=a0_0x4b6ec5;return console[_0x523d40(0xd0)]('🚀\x20Starting\x20Loxia\x20server...'),new Promise((_0x5e645f,_0x2f93bf)=>{const _0x2ef3da=_0x523d40,_0x171e73=spawn(_0x2ef3da(0xf3),[a0_0x528584[_0x2ef3da(0xec)](projectRoot,_0x2ef3da(0xeb)),_0x2ef3da(0xf6),_0x2ef3da(0xf0),_0x2ef3da(0xea),_0x34f70c,_0x2ef3da(0xdd),_0x5700e3[_0x2ef3da(0xef)]()],{'detached':![],'stdio':[_0x2ef3da(0xdb),_0x2ef3da(0xca),_0x2ef3da(0xca)]});_0x171e73[_0x2ef3da(0xee)]['on']('data',()=>{}),_0x171e73[_0x2ef3da(0xe7)]['on']('data',()=>{}),_0x171e73['on'](_0x2ef3da(0xf4),_0x45eb4b=>{const _0x432831=_0x2ef3da;console[_0x432831(0xf4)](_0x432831(0xe8),_0x45eb4b['message']),_0x2f93bf(_0x45eb4b);});const _0x46798e=Date[_0x2ef3da(0xc6)](),_0x45a109=setInterval(async()=>{const _0x4e16e6=_0x2ef3da,_0x70fb24=await isServerRunning(_0x34f70c,_0x5700e3);if(_0x70fb24)clearInterval(_0x45a109),console[_0x4e16e6(0xd0)]('✓\x20Server\x20started\x20at\x20'+_0x34f70c+':'+_0x5700e3),_0x5e645f();else Date[_0x4e16e6(0xc6)]()-_0x46798e>SERVER_STARTUP_TIMEOUT&&(clearInterval(_0x45a109),_0x171e73[_0x4e16e6(0xed)](),_0x2f93bf(new Error(_0x4e16e6(0xcb))));},0x1f4);});}async function main(){const _0x2306ee=a0_0x4b6ec5;try{console['log'](_0x2306ee(0xd7)),console[_0x2306ee(0xd0)](_0x2306ee(0xf2)),console['log'](_0x2306ee(0xd7)),console['log']('');const _0x2d8c04=process['argv'][_0x2306ee(0xda)](0x2);let _0x454ad3=DEFAULT_HOST,_0x2c6abb=DEFAULT_PORT;for(let _0x129175=0x0;_0x129175<_0x2d8c04[_0x2306ee(0xe6)];_0x129175++){if(_0x2d8c04[_0x129175]===_0x2306ee(0xea)&&_0x2d8c04[_0x129175+0x1])_0x454ad3=_0x2d8c04[_0x129175+0x1],_0x129175++;else _0x2d8c04[_0x129175]===_0x2306ee(0xdd)&&_0x2d8c04[_0x129175+0x1]&&(_0x2c6abb=parseInt(_0x2d8c04[_0x129175+0x1],0xa),_0x129175++);}console[_0x2306ee(0xd0)]('🔍\x20Checking\x20if\x20server\x20is\x20running\x20at\x20'+_0x454ad3+':'+_0x2c6abb+_0x2306ee(0xd5));const _0x5aa300=await isServerRunning(_0x454ad3,_0x2c6abb);!_0x5aa300?(console[_0x2306ee(0xd0)]('✗\x20Server\x20is\x20not\x20running'),await startServer(_0x454ad3,_0x2c6abb)):console[_0x2306ee(0xd0)](_0x2306ee(0xe3)+_0x454ad3+':'+_0x2c6abb),console[_0x2306ee(0xd0)](''),console['log'](_0x2306ee(0xde)),console['log'](''),await new Promise(_0x3eaf8d=>setTimeout(_0x3eaf8d,0x1f4)),process[_0x2306ee(0xf5)][_0x2306ee(0xcd)]=_0x454ad3,process[_0x2306ee(0xf5)][_0x2306ee(0xd8)]=_0x2c6abb[_0x2306ee(0xef)](),await import('../src/interfaces/terminal/index.js');}catch(_0x46b5ab){console[_0x2306ee(0xf4)](''),console[_0x2306ee(0xf4)](_0x2306ee(0xd6)),console[_0x2306ee(0xf4)]('\x20\x20',_0x46b5ab[_0x2306ee(0xdf)]),console[_0x2306ee(0xf4)](''),console[_0x2306ee(0xf4)](_0x2306ee(0xc7)),console[_0x2306ee(0xf4)](_0x2306ee(0xe0)),console[_0x2306ee(0xf4)](_0x2306ee(0xe2)),console[_0x2306ee(0xf4)](_0x2306ee(0xce)),console[_0x2306ee(0xf4)](''),process[_0x2306ee(0xd4)](0x1);}}main();
3
+ const a0_0x1bbb1e=a0_0x16c4;function a0_0x9be4(){const _0x4b3f94=['--ui','connect','7031962yNTaBS','argv','2673570bTmLwc','toString','now','2456864hqseMI','342121bIWKbG','\x20\x20\x203.\x20Check\x20logs\x20for\x20more\x20details','../src/interfaces/terminal/index.js','localhost','\x20\x20\x201.\x20Make\x20sure\x20no\x20other\x20process\x20is\x20using\x20port\x208080','length','❌\x20Failed\x20to\x20start\x20Terminal\x20UI:','✓\x20Server\x20started\x20at\x20','log','web','setTimeout','LOXIA_PORT','timeout','data','--port','122814lVzJTc','stdout','bin/cli.js','536LmLTdN','--host','\x20\x20\x202.\x20Try\x20running\x20the\x20server\x20manually:\x20node\x20bin/cli.js','kill','LOXIA_HOST','ignore','1004308DgmCiR','Socket','error','dirname','3715eDbbeD','🚀\x20Starting\x20Loxia\x20server...','🔍\x20Checking\x20if\x20server\x20is\x20running\x20at\x20','Failed\x20to\x20start\x20server:','join','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','\x20\x20Loxia\x20Autopilot\x20One\x20-\x20Terminal\x20UI','✓\x20Server\x20is\x20already\x20running\x20at\x20','destroy','18KyZZdp','message','exit','env','node'];a0_0x9be4=function(){return _0x4b3f94;};return a0_0x9be4();}(function(_0x3dab88,_0x381086){const _0x59e3ee=a0_0x16c4,_0x3e2cc1=_0x3dab88();while(!![]){try{const _0x2909e6=parseInt(_0x59e3ee(0x155))/0x1+parseInt(_0x59e3ee(0x16d))/0x2+-parseInt(_0x59e3ee(0x164))/0x3+parseInt(_0x59e3ee(0x167))/0x4*(-parseInt(_0x59e3ee(0x13f))/0x5)+-parseInt(_0x59e3ee(0x151))/0x6+parseInt(_0x59e3ee(0x14f))/0x7+parseInt(_0x59e3ee(0x154))/0x8*(-parseInt(_0x59e3ee(0x148))/0x9);if(_0x2909e6===_0x381086)break;else _0x3e2cc1['push'](_0x3e2cc1['shift']());}catch(_0x4b6892){_0x3e2cc1['push'](_0x3e2cc1['shift']());}}}(a0_0x9be4,0x9e552));import{spawn}from'child_process';import a0_0xb389aa from'net';import a0_0x34c79f from'path';function a0_0x16c4(_0x35a49d,_0xca2d07){_0x35a49d=_0x35a49d-0x13c;const _0x9be4bf=a0_0x9be4();let _0x16c45b=_0x9be4bf[_0x35a49d];return _0x16c45b;}import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=a0_0x34c79f[a0_0x1bbb1e(0x13e)](__filename),projectRoot=a0_0x34c79f[a0_0x1bbb1e(0x13e)](__dirname),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x1bbb1e(0x158),SERVER_STARTUP_TIMEOUT=0x2710;async function isServerRunning(_0x17ac49,_0x477171){return new Promise(_0x2f56b9=>{const _0x32b1d5=a0_0x16c4,_0xb7aa03=new a0_0xb389aa[(_0x32b1d5(0x13c))]();_0xb7aa03[_0x32b1d5(0x15f)](0x7d0),_0xb7aa03['on'](_0x32b1d5(0x14e),()=>{const _0x314fcc=_0x32b1d5;_0xb7aa03[_0x314fcc(0x147)](),_0x2f56b9(!![]);}),_0xb7aa03['on'](_0x32b1d5(0x161),()=>{const _0x19f69f=_0x32b1d5;_0xb7aa03[_0x19f69f(0x147)](),_0x2f56b9(![]);}),_0xb7aa03['on']('error',()=>{const _0xdff789=_0x32b1d5;_0xb7aa03[_0xdff789(0x147)](),_0x2f56b9(![]);}),_0xb7aa03[_0x32b1d5(0x14e)](_0x477171,_0x17ac49);});}async function startServer(_0x2d3608,_0x1d36df){const _0x1dbe03=a0_0x1bbb1e;return console[_0x1dbe03(0x15d)](_0x1dbe03(0x140)),new Promise((_0x1e9c81,_0x218afd)=>{const _0x188b22=_0x1dbe03,_0x4ca672=spawn(_0x188b22(0x14c),[a0_0x34c79f[_0x188b22(0x143)](projectRoot,_0x188b22(0x166)),_0x188b22(0x14d),_0x188b22(0x15e),_0x188b22(0x168),_0x2d3608,_0x188b22(0x163),_0x1d36df[_0x188b22(0x152)]()],{'detached':![],'stdio':[_0x188b22(0x16c),'pipe','pipe']});_0x4ca672[_0x188b22(0x165)]['on'](_0x188b22(0x162),()=>{}),_0x4ca672['stderr']['on'](_0x188b22(0x162),()=>{}),_0x4ca672['on']('error',_0x595db9=>{const _0x25ee20=_0x188b22;console['error'](_0x25ee20(0x142),_0x595db9['message']),_0x218afd(_0x595db9);});const _0x20dad4=Date[_0x188b22(0x153)](),_0x59b74d=setInterval(async()=>{const _0x5d310c=_0x188b22,_0x176331=await isServerRunning(_0x2d3608,_0x1d36df);if(_0x176331)clearInterval(_0x59b74d),console[_0x5d310c(0x15d)](_0x5d310c(0x15c)+_0x2d3608+':'+_0x1d36df),_0x1e9c81();else Date[_0x5d310c(0x153)]()-_0x20dad4>SERVER_STARTUP_TIMEOUT&&(clearInterval(_0x59b74d),_0x4ca672[_0x5d310c(0x16a)](),_0x218afd(new Error('Server\x20startup\x20timeout')));},0x1f4);});}async function main(){const _0x5a41e9=a0_0x1bbb1e;try{console[_0x5a41e9(0x15d)](_0x5a41e9(0x144)),console[_0x5a41e9(0x15d)](_0x5a41e9(0x145)),console[_0x5a41e9(0x15d)](_0x5a41e9(0x144)),console[_0x5a41e9(0x15d)]('');const _0x59a19f=process[_0x5a41e9(0x150)]['slice'](0x2);let _0x2cd94a=DEFAULT_HOST,_0x3f74f7=DEFAULT_PORT;for(let _0x33479a=0x0;_0x33479a<_0x59a19f[_0x5a41e9(0x15a)];_0x33479a++){if(_0x59a19f[_0x33479a]===_0x5a41e9(0x168)&&_0x59a19f[_0x33479a+0x1])_0x2cd94a=_0x59a19f[_0x33479a+0x1],_0x33479a++;else _0x59a19f[_0x33479a]===_0x5a41e9(0x163)&&_0x59a19f[_0x33479a+0x1]&&(_0x3f74f7=parseInt(_0x59a19f[_0x33479a+0x1],0xa),_0x33479a++);}console[_0x5a41e9(0x15d)](_0x5a41e9(0x141)+_0x2cd94a+':'+_0x3f74f7+'...');const _0x3bdeb6=await isServerRunning(_0x2cd94a,_0x3f74f7);!_0x3bdeb6?(console[_0x5a41e9(0x15d)]('✗\x20Server\x20is\x20not\x20running'),await startServer(_0x2cd94a,_0x3f74f7)):console[_0x5a41e9(0x15d)](_0x5a41e9(0x146)+_0x2cd94a+':'+_0x3f74f7),console['log'](''),console[_0x5a41e9(0x15d)]('🎨\x20Launching\x20Ink-based\x20Terminal\x20UI...'),console['log'](''),await new Promise(_0x398961=>setTimeout(_0x398961,0x1f4)),process[_0x5a41e9(0x14b)][_0x5a41e9(0x16b)]=_0x2cd94a,process[_0x5a41e9(0x14b)][_0x5a41e9(0x160)]=_0x3f74f7[_0x5a41e9(0x152)](),await import(_0x5a41e9(0x157));}catch(_0x4ebf4a){console[_0x5a41e9(0x13d)](''),console[_0x5a41e9(0x13d)](_0x5a41e9(0x15b)),console['error']('\x20\x20',_0x4ebf4a[_0x5a41e9(0x149)]),console[_0x5a41e9(0x13d)](''),console[_0x5a41e9(0x13d)]('💡\x20Troubleshooting:'),console[_0x5a41e9(0x13d)](_0x5a41e9(0x159)),console[_0x5a41e9(0x13d)](_0x5a41e9(0x169)),console[_0x5a41e9(0x13d)](_0x5a41e9(0x156)),console[_0x5a41e9(0x13d)](''),process[_0x5a41e9(0x14a)](0x1);}}main();
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x55c1f5=a0_0x2340;(function(_0x351c1a,_0x113c9e){const _0x3bb446=a0_0x2340,_0x20ce55=_0x351c1a();while(!![]){try{const _0x351a9b=parseInt(_0x3bb446(0x153))/0x1*(-parseInt(_0x3bb446(0x145))/0x2)+-parseInt(_0x3bb446(0x155))/0x3*(-parseInt(_0x3bb446(0x14d))/0x4)+-parseInt(_0x3bb446(0x15d))/0x5*(parseInt(_0x3bb446(0x144))/0x6)+-parseInt(_0x3bb446(0x141))/0x7*(parseInt(_0x3bb446(0x143))/0x8)+parseInt(_0x3bb446(0x15f))/0x9+parseInt(_0x3bb446(0x150))/0xa+parseInt(_0x3bb446(0x154))/0xb;if(_0x351a9b===_0x113c9e)break;else _0x20ce55['push'](_0x20ce55['shift']());}catch(_0x6beea9){_0x20ce55['push'](_0x20ce55['shift']());}}}(a0_0x1114,0x30caa));import{startTerminalUI}from'../src/interfaces/terminal/index.js';const args=process[a0_0x55c1f5(0x14e)][a0_0x55c1f5(0x152)](0x2),options={'host':a0_0x55c1f5(0x163),'port':0x1f90};function a0_0x2340(_0x452cf0,_0x191a49){_0x452cf0=_0x452cf0-0x141;const _0x111416=a0_0x1114();let _0x23400e=_0x111416[_0x452cf0];return _0x23400e;}for(let i=0x0;i<args[a0_0x55c1f5(0x14c)];i++){const arg=args[i];if(arg===a0_0x55c1f5(0x15e)||arg==='-h')options[a0_0x55c1f5(0x165)]=args[++i];else{if(arg===a0_0x55c1f5(0x14f)||arg==='-p')options[a0_0x55c1f5(0x169)]=parseInt(args[++i],0xa);else arg===a0_0x55c1f5(0x164)&&(console[a0_0x55c1f5(0x146)](a0_0x55c1f5(0x160)),process[a0_0x55c1f5(0x161)](0x0));}}process['env']['LOXIA_HOST']&&(options[a0_0x55c1f5(0x165)]=process[a0_0x55c1f5(0x14b)][a0_0x55c1f5(0x168)]);process[a0_0x55c1f5(0x14b)][a0_0x55c1f5(0x142)]&&(options[a0_0x55c1f5(0x169)]=parseInt(process[a0_0x55c1f5(0x14b)]['LOXIA_PORT'],0xa));!process[a0_0x55c1f5(0x15a)][a0_0x55c1f5(0x156)]&&(console['error']('ERROR:\x20Terminal\x20UI\x20requires\x20an\x20interactive\x20terminal\x20(TTY).'),console[a0_0x55c1f5(0x15c)](''),console[a0_0x55c1f5(0x15c)](a0_0x55c1f5(0x162)),console['error']('\x20\x20-\x20Piped\x20environments\x20(e.g.,\x20|\x20head,\x20|\x20grep)'),console[a0_0x55c1f5(0x15c)](a0_0x55c1f5(0x14a)),console[a0_0x55c1f5(0x15c)](a0_0x55c1f5(0x158)),console[a0_0x55c1f5(0x15c)](a0_0x55c1f5(0x167)),console['error'](''),console[a0_0x55c1f5(0x15c)]('Please\x20run\x20this\x20command\x20in\x20a\x20real\x20terminal\x20without\x20pipes\x20or\x20redirection:'),console[a0_0x55c1f5(0x15c)](a0_0x55c1f5(0x148)),console[a0_0x55c1f5(0x15c)](''),console[a0_0x55c1f5(0x15c)](a0_0x55c1f5(0x157)),console[a0_0x55c1f5(0x15c)](a0_0x55c1f5(0x166)),process[a0_0x55c1f5(0x161)](0x1));console[a0_0x55c1f5(0x146)](a0_0x55c1f5(0x149)),console[a0_0x55c1f5(0x146)]('Connecting\x20to:\x20'+options[a0_0x55c1f5(0x165)]+':'+options[a0_0x55c1f5(0x169)]),console[a0_0x55c1f5(0x146)](a0_0x55c1f5(0x147));const instance=startTerminalUI(options);function a0_0x1114(){const _0xf9d841=['waitUntilExit','slice','122641KBRtrr','4001800FIbNAl','6RANpWZ','isTTY','Or\x20use\x20the\x20web\x20UI\x20instead:','\x20\x20-\x20Background\x20processes\x20(e.g.,\x20&\x20at\x20the\x20end)','\x0aTerminal\x20UI\x20exited','stdin','catch','error','171635ZSHOyM','--host','91863YLzZhP','\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','exit','The\x20terminal\x20UI\x20cannot\x20run\x20in:','localhost','--help','host','\x20\x20npm\x20start','\x20\x20-\x20Some\x20CI/CD\x20environments','LOXIA_HOST','port','274246wvWtBM','LOXIA_PORT','24DJWWxx','18IdrLCH','6ctieny','log','Press\x20Ctrl+C\x20to\x20exit\x0a','\x20\x20npm\x20run\x20terminal-ui','Starting\x20Loxia\x20Terminal\x20UI...','\x20\x20-\x20Redirected\x20output\x20(e.g.,\x20>\x20file.txt,\x202>&1\x20|\x20...)','env','length','431324jBPQfl','argv','--port','1986190gIhBgS'];a0_0x1114=function(){return _0xf9d841;};return a0_0x1114();}instance[a0_0x55c1f5(0x151)]()['then'](()=>{const _0x45bb2e=a0_0x55c1f5;console[_0x45bb2e(0x146)](_0x45bb2e(0x159)),process[_0x45bb2e(0x161)](0x0);})[a0_0x55c1f5(0x15b)](_0x41f3b1=>{const _0x19b855=a0_0x55c1f5;console[_0x19b855(0x15c)]('\x0aTerminal\x20UI\x20error:',_0x41f3b1),process[_0x19b855(0x161)](0x1);});
3
+ const a0_0x395d08=a0_0x5722;(function(_0x4c8086,_0x3ae5ce){const _0x5ecab5=a0_0x5722,_0xd92ccf=_0x4c8086();while(!![]){try{const _0x21e2f4=-parseInt(_0x5ecab5(0x6d))/0x1*(parseInt(_0x5ecab5(0x84))/0x2)+-parseInt(_0x5ecab5(0x8b))/0x3*(parseInt(_0x5ecab5(0x6b))/0x4)+parseInt(_0x5ecab5(0x7c))/0x5+-parseInt(_0x5ecab5(0x6e))/0x6+parseInt(_0x5ecab5(0x67))/0x7+parseInt(_0x5ecab5(0x81))/0x8+parseInt(_0x5ecab5(0x7f))/0x9*(parseInt(_0x5ecab5(0x7a))/0xa);if(_0x21e2f4===_0x3ae5ce)break;else _0xd92ccf['push'](_0xd92ccf['shift']());}catch(_0x4232b7){_0xd92ccf['push'](_0xd92ccf['shift']());}}}(a0_0x3840,0xdc2f4));function a0_0x5722(_0x510d60,_0x28541b){_0x510d60=_0x510d60-0x64;const _0x384009=a0_0x3840();let _0x572237=_0x384009[_0x510d60];return _0x572237;}import{startTerminalUI}from'../src/interfaces/terminal/index.js';const args=process[a0_0x395d08(0x8a)][a0_0x395d08(0x85)](0x2),options={'host':a0_0x395d08(0x8c),'port':0x1f90};for(let i=0x0;i<args[a0_0x395d08(0x77)];i++){const arg=args[i];if(arg===a0_0x395d08(0x64)||arg==='-h')options['host']=args[++i];else{if(arg===a0_0x395d08(0x88)||arg==='-p')options[a0_0x395d08(0x7b)]=parseInt(args[++i],0xa);else arg===a0_0x395d08(0x71)&&(console[a0_0x395d08(0x89)](a0_0x395d08(0x65)),process[a0_0x395d08(0x80)](0x0));}}process[a0_0x395d08(0x83)][a0_0x395d08(0x72)]&&(options[a0_0x395d08(0x87)]=process[a0_0x395d08(0x83)][a0_0x395d08(0x72)]);function a0_0x3840(){const _0x508c91=['localhost','--host','\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','Please\x20run\x20this\x20command\x20in\x20a\x20real\x20terminal\x20without\x20pipes\x20or\x20redirection:','6587637IFhMiT','\x20\x20npm\x20start','\x0aTerminal\x20UI\x20error:','ERROR:\x20Terminal\x20UI\x20requires\x20an\x20interactive\x20terminal\x20(TTY).','4516WgneUN','stdin','1tDDEAX','1116342RAhuVG','The\x20terminal\x20UI\x20cannot\x20run\x20in:','Starting\x20Loxia\x20Terminal\x20UI...','--help','LOXIA_HOST','\x20\x20-\x20Piped\x20environments\x20(e.g.,\x20|\x20head,\x20|\x20grep)','\x20\x20-\x20Redirected\x20output\x20(e.g.,\x20>\x20file.txt,\x202>&1\x20|\x20...)','LOXIA_PORT','\x20\x20-\x20Background\x20processes\x20(e.g.,\x20&\x20at\x20the\x20end)','length','Press\x20Ctrl+C\x20to\x20exit\x0a','error','290nLNgBD','port','783555vvDfxB','isTTY','catch','198999TqSlkx','exit','6035776XVtYxK','then','env','668278LUnqjP','slice','\x0aTerminal\x20UI\x20exited','host','--port','log','argv','2847WzpVKT'];a0_0x3840=function(){return _0x508c91;};return a0_0x3840();}process[a0_0x395d08(0x83)][a0_0x395d08(0x75)]&&(options[a0_0x395d08(0x7b)]=parseInt(process[a0_0x395d08(0x83)][a0_0x395d08(0x75)],0xa));!process[a0_0x395d08(0x6c)][a0_0x395d08(0x7d)]&&(console['error'](a0_0x395d08(0x6a)),console[a0_0x395d08(0x79)](''),console['error'](a0_0x395d08(0x6f)),console[a0_0x395d08(0x79)](a0_0x395d08(0x73)),console[a0_0x395d08(0x79)](a0_0x395d08(0x74)),console[a0_0x395d08(0x79)](a0_0x395d08(0x76)),console[a0_0x395d08(0x79)]('\x20\x20-\x20Some\x20CI/CD\x20environments'),console[a0_0x395d08(0x79)](''),console[a0_0x395d08(0x79)](a0_0x395d08(0x66)),console[a0_0x395d08(0x79)]('\x20\x20npm\x20run\x20terminal-ui'),console[a0_0x395d08(0x79)](''),console[a0_0x395d08(0x79)]('Or\x20use\x20the\x20web\x20UI\x20instead:'),console['error'](a0_0x395d08(0x68)),process[a0_0x395d08(0x80)](0x1));console[a0_0x395d08(0x89)](a0_0x395d08(0x70)),console[a0_0x395d08(0x89)]('Connecting\x20to:\x20'+options[a0_0x395d08(0x87)]+':'+options[a0_0x395d08(0x7b)]),console[a0_0x395d08(0x89)](a0_0x395d08(0x78));const instance=startTerminalUI(options);instance['waitUntilExit']()[a0_0x395d08(0x82)](()=>{const _0x27b59f=a0_0x395d08;console['log'](_0x27b59f(0x86)),process[_0x27b59f(0x80)](0x0);})[a0_0x395d08(0x7e)](_0x1fa2dd=>{const _0x1e1a2d=a0_0x395d08;console['error'](_0x1e1a2d(0x69),_0x1fa2dd),process[_0x1e1a2d(0x80)](0x1);});
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0xcac525=a0_0xf4f2;(function(_0x495c40,_0x4421ef){const _0x375fdd=a0_0xf4f2,_0x350a47=_0x495c40();while(!![]){try{const _0x1aa348=-parseInt(_0x375fdd(0xc3))/0x1+parseInt(_0x375fdd(0xd8))/0x2+parseInt(_0x375fdd(0xe0))/0x3*(parseInt(_0x375fdd(0xc4))/0x4)+-parseInt(_0x375fdd(0xd3))/0x5+parseInt(_0x375fdd(0xc6))/0x6*(-parseInt(_0x375fdd(0xb8))/0x7)+parseInt(_0x375fdd(0xc0))/0x8*(parseInt(_0x375fdd(0xe1))/0x9)+parseInt(_0x375fdd(0xb2))/0xa*(-parseInt(_0x375fdd(0xc8))/0xb);if(_0x1aa348===_0x4421ef)break;else _0x350a47['push'](_0x350a47['shift']());}catch(_0x4b82f3){_0x350a47['push'](_0x350a47['shift']());}}}(a0_0x3a61,0xe2e92));import{spawn}from'child_process';import{fileURLToPath}from'url';import{dirname,join}from'path';import a0_0x311625 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),rootDir=join(__dirname,'..'),SERVER_PORT=process[a0_0xcac525(0xd4)][a0_0xcac525(0xca)]||0x1f90,STARTUP_WAIT=0x7d0;function a0_0xf4f2(_0x3d9867,_0x55b59a){_0x3d9867=_0x3d9867-0xb1;const _0x3a611b=a0_0x3a61();let _0xf4f28b=_0x3a611b[_0x3d9867];return _0xf4f28b;}let serverProcess=null;async function checkServerReady(_0x4994a0=0xa,_0x2f4eac=0x1f4){const _0x85c636=a0_0xcac525;for(let _0x5a916d=0x0;_0x5a916d<_0x4994a0;_0x5a916d++){try{return await new Promise((_0x2cd364,_0x8784bc)=>{const _0x4cc583=a0_0xf4f2,_0x12fac6=a0_0x311625['get'](_0x4cc583(0xc5)+SERVER_PORT+'/health',_0x46f454=>{const _0x4a352b=_0x4cc583;_0x46f454[_0x4a352b(0xd2)]===0xc8?_0x2cd364():_0x8784bc(new Error(_0x4a352b(0xdc)+_0x46f454[_0x4a352b(0xd2)]));});_0x12fac6['on']('error',_0x8784bc),_0x12fac6[_0x4cc583(0xd5)](0x3e8,()=>{const _0x39f2e8=_0x4cc583;_0x12fac6[_0x39f2e8(0xdd)](),_0x8784bc(new Error(_0x39f2e8(0xb6)));});}),console[_0x85c636(0xbe)](_0x85c636(0xb3)),!![];}catch(_0x2b9dde){_0x5a916d<_0x4994a0-0x1&&await new Promise(_0x3e41f3=>setTimeout(_0x3e41f3,_0x2f4eac));}}return console[_0x85c636(0xbe)](_0x85c636(0xda)),![];}async function startServer(){return new Promise(_0x336b7e=>{const _0x121dff=a0_0xf4f2;console[_0x121dff(0xbe)]('🚀\x20Starting\x20Loxia\x20server...');const _0x39980b=join(rootDir,_0x121dff(0xd1),_0x121dff(0xb5));serverProcess=spawn(_0x121dff(0xd6),[_0x39980b],{'cwd':rootDir,'env':{...process[_0x121dff(0xd4)]},'stdio':['ignore',_0x121dff(0xe2),'pipe'],'detached':![]}),serverProcess['stdout']['on']('data',_0x262e19=>{const _0x2bcac7=_0x121dff,_0x53f54e=_0x262e19[_0x2bcac7(0xb9)]()[_0x2bcac7(0xba)]();_0x53f54e&&console[_0x2bcac7(0xbe)](_0x2bcac7(0xbc)+_0x53f54e);}),serverProcess['stderr']['on']('data',_0x4d9681=>{const _0x3c6161=_0x121dff,_0x41c01b=_0x4d9681[_0x3c6161(0xb9)]()['trim']();_0x41c01b&&!_0x41c01b[_0x3c6161(0xbd)](_0x3c6161(0xcc))&&console[_0x3c6161(0xc1)](_0x3c6161(0xb4)+_0x41c01b);}),serverProcess['on'](_0x121dff(0xc1),_0x13f3c7=>{const _0x808c73=_0x121dff;console['error'](_0x808c73(0xcd),_0x13f3c7[_0x808c73(0xd7)]),process['exit'](0x1);}),serverProcess['on'](_0x121dff(0xce),(_0x1af36e,_0x3da91a)=>{const _0x42f511=_0x121dff;_0x1af36e!==null&&_0x1af36e!==0x0&&(console[_0x42f511(0xc1)](_0x42f511(0xd9)+_0x1af36e),process['exit'](_0x1af36e));}),setTimeout(_0x336b7e,STARTUP_WAIT);});}function a0_0x3a61(){const _0x1687df=['loxia-terminal.js','kill','3dOQUhT','793062bJxcvN','pipe','killed','20dXZkwL','✅\x20Server\x20is\x20ready!','[SERVER\x20ERROR]\x20','index.js','Timeout','\x0a⚠️\x20\x20Received\x20SIGINT,\x20shutting\x20down...','7wdoSsr','toString','trim','Error\x20during\x20startup:','[SERVER]\x20','includes','log','SIGKILL','112oSpMPG','error','║\x20\x20\x20Loxia\x20AI\x20Agents\x20-\x20Server\x20+\x20Terminal\x20UI\x20\x20\x20\x20\x20\x20║','825295KUaRuT','3037724FnhVoE','http://localhost:','2350596sIjHFm','Failed\x20to\x20start\x20Terminal\x20UI:','5215078klFSme','\x0a👋\x20Terminal\x20UI\x20closed.','PORT','╚════════════════════════════════════════════════╝','ExperimentalWarning','Failed\x20to\x20start\x20server:','exit','SIGTERM','SIGINT','src','statusCode','1796120NTbjGX','env','setTimeout','node','message','2921648WqUsad','Server\x20exited\x20with\x20code\x20','⚠️\x20\x20Server\x20may\x20not\x20be\x20fully\x20ready,\x20but\x20continuing\x20anyway...','bin','Server\x20returned\x20','destroy'];a0_0x3a61=function(){return _0x1687df;};return a0_0x3a61();}async function startTerminalUI(){const _0x4d213a=a0_0xcac525;console[_0x4d213a(0xbe)]('🖥️\x20\x20Starting\x20Terminal\x20UI...'),console[_0x4d213a(0xbe)]('');const _0x6c5e90=join(rootDir,_0x4d213a(0xdb),_0x4d213a(0xde)),_0x32186f=spawn(_0x4d213a(0xd6),[_0x6c5e90],{'cwd':rootDir,'env':{...process[_0x4d213a(0xd4)]},'stdio':'inherit'});return _0x32186f['on'](_0x4d213a(0xc1),_0x553ea4=>{const _0x44737f=_0x4d213a;console[_0x44737f(0xc1)](_0x44737f(0xc7),_0x553ea4[_0x44737f(0xd7)]),cleanup(),process['exit'](0x1);}),_0x32186f['on'](_0x4d213a(0xce),_0x29ee52=>{const _0x3531c4=_0x4d213a;console[_0x3531c4(0xbe)](_0x3531c4(0xc9)),cleanup(),process[_0x3531c4(0xce)](_0x29ee52||0x0);}),_0x32186f;}function cleanup(){const _0x29cf43=a0_0xcac525;serverProcess&&!serverProcess[_0x29cf43(0xb1)]&&(console[_0x29cf43(0xbe)]('🛑\x20Stopping\x20server...'),serverProcess[_0x29cf43(0xdf)](_0x29cf43(0xcf)),setTimeout(()=>{const _0x239f8c=_0x29cf43;!serverProcess[_0x239f8c(0xb1)]&&serverProcess[_0x239f8c(0xdf)](_0x239f8c(0xbf));},0x1388));}process['on'](a0_0xcac525(0xd0),()=>{const _0x53f6bf=a0_0xcac525;console[_0x53f6bf(0xbe)](_0x53f6bf(0xb7)),cleanup(),process[_0x53f6bf(0xce)](0x0);}),process['on']('SIGTERM',()=>{const _0x487435=a0_0xcac525;console[_0x487435(0xbe)]('\x0a⚠️\x20\x20Received\x20SIGTERM,\x20shutting\x20down...'),cleanup(),process[_0x487435(0xce)](0x0);}),process['on'](a0_0xcac525(0xce),()=>{cleanup();});async function main(){const _0x3f9e78=a0_0xcac525;console[_0x3f9e78(0xbe)]('╔════════════════════════════════════════════════╗'),console[_0x3f9e78(0xbe)](_0x3f9e78(0xc2)),console[_0x3f9e78(0xbe)](_0x3f9e78(0xcb)),console[_0x3f9e78(0xbe)]('');try{await startServer(),await checkServerReady(),await startTerminalUI(),await new Promise(()=>{});}catch(_0x1a28be){console[_0x3f9e78(0xc1)](_0x3f9e78(0xbb),_0x1a28be[_0x3f9e78(0xd7)]),cleanup(),process['exit'](0x1);}}main();
3
+ const a0_0x4b5aba=a0_0x1807;(function(_0x43a804,_0x762631){const _0x4ff910=a0_0x1807,_0x2d45a1=_0x43a804();while(!![]){try{const _0x4d6aa2=parseInt(_0x4ff910(0x1d7))/0x1+parseInt(_0x4ff910(0x1b2))/0x2*(-parseInt(_0x4ff910(0x1c3))/0x3)+parseInt(_0x4ff910(0x1c5))/0x4*(-parseInt(_0x4ff910(0x1b1))/0x5)+parseInt(_0x4ff910(0x1d0))/0x6*(parseInt(_0x4ff910(0x1e0))/0x7)+-parseInt(_0x4ff910(0x1d9))/0x8*(-parseInt(_0x4ff910(0x1de))/0x9)+-parseInt(_0x4ff910(0x1d8))/0xa*(parseInt(_0x4ff910(0x1c1))/0xb)+-parseInt(_0x4ff910(0x1df))/0xc*(-parseInt(_0x4ff910(0x1bd))/0xd);if(_0x4d6aa2===_0x762631)break;else _0x2d45a1['push'](_0x2d45a1['shift']());}catch(_0x2bcf0d){_0x2d45a1['push'](_0x2d45a1['shift']());}}}(a0_0x4f47,0x970be));import{spawn}from'child_process';import{fileURLToPath}from'url';import{dirname,join}from'path';function a0_0x1807(_0x58e6eb,_0x41f3ee){_0x58e6eb=_0x58e6eb-0x1b0;const _0x4f476e=a0_0x4f47();let _0x1807ec=_0x4f476e[_0x58e6eb];return _0x1807ec;}import a0_0xa5ffd2 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),rootDir=join(__dirname,'..'),SERVER_PORT=process[a0_0x4b5aba(0x1b7)][a0_0x4b5aba(0x1e2)]||0x1f90,STARTUP_WAIT=0x7d0;let serverProcess=null;async function checkServerReady(_0x3a6744=0xa,_0x51ab07=0x1f4){const _0x1d991c=a0_0x4b5aba;for(let _0x56e856=0x0;_0x56e856<_0x3a6744;_0x56e856++){try{return await new Promise((_0x4bd2af,_0x3dddf6)=>{const _0x33b6c5=a0_0x1807,_0x1915f2=a0_0xa5ffd2[_0x33b6c5(0x1da)](_0x33b6c5(0x1c2)+SERVER_PORT+'/health',_0x43f51b=>{const _0x492659=_0x33b6c5;_0x43f51b['statusCode']===0xc8?_0x4bd2af():_0x3dddf6(new Error(_0x492659(0x1d4)+_0x43f51b[_0x492659(0x1db)]));});_0x1915f2['on'](_0x33b6c5(0x1ba),_0x3dddf6),_0x1915f2[_0x33b6c5(0x1ca)](0x3e8,()=>{const _0x57e9ab=_0x33b6c5;_0x1915f2[_0x57e9ab(0x1d5)](),_0x3dddf6(new Error(_0x57e9ab(0x1c7)));});}),console[_0x1d991c(0x1b5)](_0x1d991c(0x1c4)),!![];}catch(_0x47d78c){_0x56e856<_0x3a6744-0x1&&await new Promise(_0x3e9b03=>setTimeout(_0x3e9b03,_0x51ab07));}}return console['log'](_0x1d991c(0x1e4)),![];}async function startServer(){return new Promise(_0x420a27=>{const _0x4fc983=a0_0x1807;console[_0x4fc983(0x1b5)]('🚀\x20Starting\x20Loxia\x20server...');const _0x1533b1=join(rootDir,_0x4fc983(0x1c8),'index.js');serverProcess=spawn(_0x4fc983(0x1d2),[_0x1533b1],{'cwd':rootDir,'env':{...process[_0x4fc983(0x1b7)]},'stdio':[_0x4fc983(0x1dd),_0x4fc983(0x1cc),_0x4fc983(0x1cc)],'detached':![]}),serverProcess[_0x4fc983(0x1c0)]['on'](_0x4fc983(0x1d6),_0x36fe14=>{const _0x235ab1=_0x4fc983,_0x8eb67=_0x36fe14['toString']()['trim']();_0x8eb67&&console[_0x235ab1(0x1b5)]('[SERVER]\x20'+_0x8eb67);}),serverProcess[_0x4fc983(0x1bf)]['on']('data',_0x2adc7a=>{const _0x2131f4=_0x4fc983,_0x1c4e67=_0x2adc7a['toString']()['trim']();_0x1c4e67&&!_0x1c4e67[_0x2131f4(0x1b0)](_0x2131f4(0x1b6))&&console[_0x2131f4(0x1ba)](_0x2131f4(0x1d3)+_0x1c4e67);}),serverProcess['on']('error',_0x2921df=>{const _0x441a2f=_0x4fc983;console[_0x441a2f(0x1ba)]('Failed\x20to\x20start\x20server:',_0x2921df[_0x441a2f(0x1c6)]),process[_0x441a2f(0x1b9)](0x1);}),serverProcess['on']('exit',(_0x46fd48,_0x476d3f)=>{const _0x227ab3=_0x4fc983;_0x46fd48!==null&&_0x46fd48!==0x0&&(console[_0x227ab3(0x1ba)]('Server\x20exited\x20with\x20code\x20'+_0x46fd48),process[_0x227ab3(0x1b9)](_0x46fd48));}),setTimeout(_0x420a27,STARTUP_WAIT);});}async function startTerminalUI(){const _0x416d37=a0_0x4b5aba;console['log'](_0x416d37(0x1d1)),console[_0x416d37(0x1b5)]('');const _0x33074f=join(rootDir,_0x416d37(0x1bc),_0x416d37(0x1cf)),_0x440797=spawn(_0x416d37(0x1d2),[_0x33074f],{'cwd':rootDir,'env':{...process[_0x416d37(0x1b7)]},'stdio':_0x416d37(0x1cd)});return _0x440797['on'](_0x416d37(0x1ba),_0xe9bde7=>{const _0x3bc5db=_0x416d37;console[_0x3bc5db(0x1ba)](_0x3bc5db(0x1ce),_0xe9bde7[_0x3bc5db(0x1c6)]),cleanup(),process[_0x3bc5db(0x1b9)](0x1);}),_0x440797['on'](_0x416d37(0x1b9),_0x240fd6=>{const _0xf92e21=_0x416d37;console[_0xf92e21(0x1b5)](_0xf92e21(0x1e3)),cleanup(),process[_0xf92e21(0x1b9)](_0x240fd6||0x0);}),_0x440797;}function a0_0x4f47(){const _0x42fecc=['3510ImBWjY','╚════════════════════════════════════════════════╝','stderr','stdout','187ScVJnx','http://localhost:','3CouZsN','✅\x20Server\x20is\x20ready!','4LVZQIS','message','Timeout','src','SIGKILL','setTimeout','║\x20\x20\x20Loxia\x20AI\x20Agents\x20-\x20Server\x20+\x20Terminal\x20UI\x20\x20\x20\x20\x20\x20║','pipe','inherit','Failed\x20to\x20start\x20Terminal\x20UI:','loxia-terminal.js','24oSTyRj','🖥️\x20\x20Starting\x20Terminal\x20UI...','node','[SERVER\x20ERROR]\x20','Server\x20returned\x20','destroy','data','227509ledgHB','56010jlCnXB','727400herQIE','get','statusCode','\x0a⚠️\x20\x20Received\x20SIGTERM,\x20shutting\x20down...','ignore','27zLegOk','50916eUPPIG','1395982YUusMY','killed','PORT','\x0a👋\x20Terminal\x20UI\x20closed.','⚠️\x20\x20Server\x20may\x20not\x20be\x20fully\x20ready,\x20but\x20continuing\x20anyway...','SIGTERM','includes','4949705NJyzfb','1479508lwKlqF','kill','🛑\x20Stopping\x20server...','log','ExperimentalWarning','env','SIGINT','exit','error','╔════════════════════════════════════════════════╗','bin'];a0_0x4f47=function(){return _0x42fecc;};return a0_0x4f47();}function cleanup(){const _0x53c7ed=a0_0x4b5aba;serverProcess&&!serverProcess[_0x53c7ed(0x1e1)]&&(console[_0x53c7ed(0x1b5)](_0x53c7ed(0x1b4)),serverProcess[_0x53c7ed(0x1b3)](_0x53c7ed(0x1e5)),setTimeout(()=>{const _0x271c0d=_0x53c7ed;!serverProcess[_0x271c0d(0x1e1)]&&serverProcess['kill'](_0x271c0d(0x1c9));},0x1388));}process['on'](a0_0x4b5aba(0x1b8),()=>{const _0x298f89=a0_0x4b5aba;console[_0x298f89(0x1b5)]('\x0a⚠️\x20\x20Received\x20SIGINT,\x20shutting\x20down...'),cleanup(),process[_0x298f89(0x1b9)](0x0);}),process['on'](a0_0x4b5aba(0x1e5),()=>{const _0xc9d299=a0_0x4b5aba;console[_0xc9d299(0x1b5)](_0xc9d299(0x1dc)),cleanup(),process[_0xc9d299(0x1b9)](0x0);}),process['on'](a0_0x4b5aba(0x1b9),()=>{cleanup();});async function main(){const _0x2da982=a0_0x4b5aba;console[_0x2da982(0x1b5)](_0x2da982(0x1bb)),console[_0x2da982(0x1b5)](_0x2da982(0x1cb)),console['log'](_0x2da982(0x1be)),console['log']('');try{await startServer(),await checkServerReady(),await startTerminalUI(),await new Promise(()=>{});}catch(_0x3a7632){console['error']('Error\x20during\x20startup:',_0x3a7632[_0x2da982(0x1c6)]),cleanup(),process[_0x2da982(0x1b9)](0x1);}}main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loxia-labs/loxia-autopilot-one",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
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_0x3c67e3=a0_0xbe97;(function(_0x3e0301,_0x81b0ac){const _0x6edbb5=a0_0xbe97,_0x184725=_0x3e0301();while(!![]){try{const _0x300fe0=-parseInt(_0x6edbb5(0x202))/0x1*(parseInt(_0x6edbb5(0x1e4))/0x2)+parseInt(_0x6edbb5(0x1ea))/0x3+-parseInt(_0x6edbb5(0x1f2))/0x4*(parseInt(_0x6edbb5(0x1f1))/0x5)+parseInt(_0x6edbb5(0x1fb))/0x6*(parseInt(_0x6edbb5(0x1da))/0x7)+-parseInt(_0x6edbb5(0x1d8))/0x8+parseInt(_0x6edbb5(0x1c4))/0x9*(parseInt(_0x6edbb5(0x1dd))/0xa)+parseInt(_0x6edbb5(0x20c))/0xb;if(_0x300fe0===_0x81b0ac)break;else _0x184725['push'](_0x184725['shift']());}catch(_0x4b3488){_0x184725['push'](_0x184725['shift']());}}}(a0_0x3407,0xf41fa));function a0_0x3407(){const _0x264a83=['mkdir','\x20\x20\x20⚠️\x20\x20eslint-plugin-security\x20not\x20found','location','\x20\x20\x20pip\x20install\x20semgrep\x0a','\x20\x20Installation\x20Complete','message','\x0a═══════════════════════════════════════════════════════════','startsWith','https','7998032UOcfNn','arch','3976VYpkoa','pipe','\x0aYou\x20can\x20manually\x20install\x20scanners:','5710hzoYZl','python','chmod','platform','finish','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20Semgrep:\x20','...','12UELvZj','\x20\x20\x20Downloading\x20from\x20','\x20-m\x20pip\x20show\x20','\x20\x20\x20✅\x20Python\x20found:\x20','\x20\x20\x20Installing\x20','join','2601534wvPlBJ','headers','semgrep\x20--version','log','get','Failed\x20to\x20download:\x20HTTP\x20','\x20\x20\x20Note:\x20To\x20use\x20system-wide,\x20add\x20to\x20PATH\x20or\x20install\x20globally:','786020eLJTJQ','40liRFmY','trim','\x20\x20\x20✅\x20','\x20\x20\x20✅\x20eslint-plugin-security\x20is\x20installed\x0a','\x20\x20\x20✅\x20Semgrep\x20already\x20installed:\x20','python\x20--version','statusCode','semgrep','python3\x20--version','13956mrxrdW','unlink','\x20-m\x20pip\x20install\x20--user\x20','url','catch','checkov','python3','91301KVvkyD','eslint-plugin-security','❌\x20Installation\x20failed:','dirname','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20semgrep\x0a','\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit','═══════════════════════════════════════════════════════════\x0a','\x20\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit\x20checkov\x20yamllint\x0a','\x20\x20Installing\x20Security\x20Scanners','promises','5879698XHoLGF','.scanners','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20','22014iKVbZo','error','\x20\x20\x20Please\x20install\x20manually:\x20https://semgrep.dev/docs/getting-started/\x0a','\x20\x20\x20Location:\x20','🐍\x20Checking\x20Python\x20scanners...','node_modules','\x20\x20\x20To\x20enable\x20Python\x20scanning,\x20install\x20Python\x20and\x20run:','pip-audit','\x20\x20\x20Run:\x20npm\x20install\x20--save-dev\x20eslint-plugin-security\x0a','\x20\x20npm\x20install\x20--save-dev\x20eslint-plugin-security','\x20\x20\x20✅\x20Semgrep\x20installed\x20successfully'];a0_0x3407=function(){return _0x264a83;};return a0_0x3407();}import{exec}from'child_process';import{promisify}from'util';import a0_0x8db8fe from'https';import a0_0x5740aa from'http';import a0_0x2f8a95 from'fs';import a0_0x114a5a 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_0x114a5a[a0_0x3c67e3(0x205)](__filename),SCANNER_DIR=a0_0x114a5a[a0_0x3c67e3(0x1e9)](__dirname,'..',a0_0x3c67e3(0x1c9),a0_0x3c67e3(0x20d)),SEMGREP_VERSION='v1.55.0';function a0_0xbe97(_0x2da0d6,_0xe79853){_0x2da0d6=_0x2da0d6-0x1c3;const _0x3407c2=a0_0x3407();let _0xbe97f5=_0x3407c2[_0x2da0d6];return _0xbe97f5;}console[a0_0x3c67e3(0x1ed)]('═══════════════════════════════════════════════════════════'),console[a0_0x3c67e3(0x1ed)](a0_0x3c67e3(0x20a)),console[a0_0x3c67e3(0x1ed)](a0_0x3c67e3(0x208));async function installScanners(){const _0x169c3e=a0_0x3c67e3;await a0_0x2f8a95[_0x169c3e(0x20b)][_0x169c3e(0x1cf)](SCANNER_DIR,{'recursive':!![]}),await checkESLintSecurity(),await installSemgrep(),await installPythonScanners(),console['log'](_0x169c3e(0x1d5)),console[_0x169c3e(0x1ed)](_0x169c3e(0x1d3)),console[_0x169c3e(0x1ed)]('═══════════════════════════════════════════════════════════\x0a');}async function checkESLintSecurity(){const _0x3ed22d=a0_0x3c67e3;console[_0x3ed22d(0x1ed)]('📦\x20Checking\x20ESLint\x20Security\x20Plugin...');try{await import(_0x3ed22d(0x203)),console['log'](_0x3ed22d(0x1f5));}catch(_0x3b73cf){console[_0x3ed22d(0x1ed)](_0x3ed22d(0x1d0)),console[_0x3ed22d(0x1ed)](_0x3ed22d(0x1cc));}}async function installSemgrep(){const _0x4ef711=a0_0x3c67e3;console[_0x4ef711(0x1ed)]('🔍\x20Installing\x20Semgrep...');const _0x18dd06=process[_0x4ef711(0x1e0)],_0x593eab=process[_0x4ef711(0x1d9)];try{const _0x3c61c9=await execAsync(_0x4ef711(0x1ec),{'timeout':0x1388});console['log'](_0x4ef711(0x1f6)+_0x3c61c9['stdout'][_0x4ef711(0x1f3)]()),console[_0x4ef711(0x1ed)]('\x20\x20\x20Using\x20system-installed\x20Semgrep\x0a');return;}catch(_0x4fc685){console[_0x4ef711(0x1ed)]('\x20\x20\x20Semgrep\x20not\x20found\x20in\x20PATH,\x20installing\x20standalone\x20binary...');}const _0xc6a646=getSemgrepBinaryInfo(_0x18dd06,_0x593eab);if(!_0xc6a646){console[_0x4ef711(0x1ed)]('\x20\x20\x20⚠️\x20\x20No\x20Semgrep\x20binary\x20available\x20for\x20'+_0x18dd06+'-'+_0x593eab),console[_0x4ef711(0x1ed)](_0x4ef711(0x1c6));return;}try{const _0x47f8e8=a0_0x114a5a['join'](SCANNER_DIR,'semgrep');console['log'](_0x4ef711(0x1e5)+_0xc6a646[_0x4ef711(0x1fe)]+_0x4ef711(0x1e3)),await downloadFile(_0xc6a646[_0x4ef711(0x1fe)],_0x47f8e8),await a0_0x2f8a95[_0x4ef711(0x20b)][_0x4ef711(0x1df)](_0x47f8e8,0x1ed),console[_0x4ef711(0x1ed)](_0x4ef711(0x1ce)),console[_0x4ef711(0x1ed)](_0x4ef711(0x1c7)+_0x47f8e8+'\x0a'),console['log'](_0x4ef711(0x1f0)),console[_0x4ef711(0x1ed)](_0x4ef711(0x1d2));}catch(_0x51608a){console[_0x4ef711(0x1ed)](_0x4ef711(0x1e2)+_0x51608a[_0x4ef711(0x1d4)]),console[_0x4ef711(0x1ed)](_0x4ef711(0x206));}}function getSemgrepBinaryInfo(_0x41f6d1,_0x507f3a){return null;}async function installPythonScanners(){const _0x294222=a0_0x3c67e3;console['log'](_0x294222(0x1c8));let _0xaf819e=null;try{await execAsync(_0x294222(0x1fa),{'timeout':0x1388}),_0xaf819e=_0x294222(0x201);}catch(_0x3d37eb){try{await execAsync(_0x294222(0x1f7),{'timeout':0x1388}),_0xaf819e=_0x294222(0x1de);}catch(_0x546310){console[_0x294222(0x1ed)]('\x20\x20\x20⚠️\x20\x20Python\x20not\x20found\x20-\x20skipping\x20Python\x20scanners'),console[_0x294222(0x1ed)](_0x294222(0x1ca)),console[_0x294222(0x1ed)](_0x294222(0x209));return;}}console['log'](_0x294222(0x1e7)+_0xaf819e),await installViaPip(_0x294222(0x1f9),_0xaf819e),await installViaPip('bandit',_0xaf819e),await installViaPip(_0x294222(0x1cb),_0xaf819e),await installViaPip(_0x294222(0x200),_0xaf819e),await installViaPip('yamllint',_0xaf819e),console[_0x294222(0x1ed)]('');}async function installViaPip(_0x1dc106,_0x9c53c7){const _0x5ce952=a0_0x3c67e3;try{const _0x11d2a6=await execAsync(_0x9c53c7+_0x5ce952(0x1e6)+_0x1dc106,{'timeout':0x1388});return console[_0x5ce952(0x1ed)](_0x5ce952(0x1f4)+_0x1dc106+'\x20already\x20installed'),!![];}catch(_0x2cdb10){console[_0x5ce952(0x1ed)](_0x5ce952(0x1e8)+_0x1dc106+'...');try{return await execAsync(_0x9c53c7+_0x5ce952(0x1fd)+_0x1dc106,{'timeout':0xea60}),console[_0x5ce952(0x1ed)]('\x20\x20\x20✅\x20'+_0x1dc106+'\x20installed\x20successfully'),!![];}catch(_0x18b5f1){return console[_0x5ce952(0x1ed)](_0x5ce952(0x1c3)+_0x1dc106+':\x20'+_0x18b5f1[_0x5ce952(0x1d4)]),console[_0x5ce952(0x1ed)](_0x5ce952(0x20e)+_0x1dc106),![];}}}async function downloadFile(_0x277c22,_0x1c116c){return new Promise((_0x530749,_0x225b65)=>{const _0x4de4ea=a0_0xbe97,_0x27d632=_0x277c22[_0x4de4ea(0x1d6)](_0x4de4ea(0x1d7))?a0_0x8db8fe:a0_0x5740aa;_0x27d632[_0x4de4ea(0x1ee)](_0x277c22,_0x3995a6=>{const _0x4a5727=_0x4de4ea;if(_0x3995a6[_0x4a5727(0x1f8)]===0x12e||_0x3995a6[_0x4a5727(0x1f8)]===0x12d){downloadFile(_0x3995a6[_0x4a5727(0x1eb)][_0x4a5727(0x1d1)],_0x1c116c)['then'](_0x530749)[_0x4a5727(0x1ff)](_0x225b65);return;}if(_0x3995a6[_0x4a5727(0x1f8)]!==0xc8){_0x225b65(new Error(_0x4a5727(0x1ef)+_0x3995a6['statusCode']));return;}const _0x5c9687=createWriteStream(_0x1c116c);_0x3995a6[_0x4a5727(0x1db)](_0x5c9687),_0x5c9687['on'](_0x4a5727(0x1e1),()=>{_0x5c9687['close'](),_0x530749();}),_0x5c9687['on'](_0x4a5727(0x1c5),_0x1b88b2=>{const _0xa038ce=_0x4a5727;a0_0x2f8a95[_0xa038ce(0x1fc)](_0x1c116c,()=>{}),_0x225b65(_0x1b88b2);});})['on']('error',_0x225b65);});}installScanners()[a0_0x3c67e3(0x1ff)](_0x4e634b=>{const _0x3378b0=a0_0x3c67e3;console['error'](_0x3378b0(0x204),_0x4e634b[_0x3378b0(0x1d4)]),console[_0x3378b0(0x1c5)](_0x3378b0(0x1dc)),console['error'](_0x3378b0(0x1cd)),console[_0x3378b0(0x1c5)](_0x3378b0(0x207)),process['exit'](0x0);});
2
+ const a0_0x614b74=a0_0x154e;(function(_0x319a8f,_0x249096){const _0x2af3ae=a0_0x154e,_0xaa7be4=_0x319a8f();while(!![]){try{const _0xadc1a9=-parseInt(_0x2af3ae(0xa1))/0x1*(-parseInt(_0x2af3ae(0xa7))/0x2)+parseInt(_0x2af3ae(0xbc))/0x3+parseInt(_0x2af3ae(0x7d))/0x4*(parseInt(_0x2af3ae(0x89))/0x5)+parseInt(_0x2af3ae(0xa4))/0x6+-parseInt(_0x2af3ae(0xb1))/0x7+-parseInt(_0x2af3ae(0xbb))/0x8+-parseInt(_0x2af3ae(0x80))/0x9;if(_0xadc1a9===_0x249096)break;else _0xaa7be4['push'](_0xaa7be4['shift']());}catch(_0x4715b9){_0xaa7be4['push'](_0xaa7be4['shift']());}}}(a0_0x4afc,0xa1274));import{exec}from'child_process';import{promisify}from'util';import a0_0x2ba046 from'https';import a0_0x4d8458 from'http';import a0_0x51039c from'fs';import a0_0x270876 from'path';function a0_0x4afc(){const _0x5beb7c=['\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20Semgrep:\x20','stdout','join','unlink','.scanners','\x20\x20Installing\x20Security\x20Scanners','Failed\x20to\x20download:\x20HTTP\x20','https','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20','1626704HGUfuM','═══════════════════════════════════════════════════════════','exit','298350YAUFPP','semgrep','python3\x20--version','finish','\x20\x20\x20To\x20enable\x20Python\x20scanning,\x20install\x20Python\x20and\x20run:','═══════════════════════════════════════════════════════════\x0a','bandit','pip-audit','headers','10ctqplw','\x20-m\x20pip\x20install\x20--user\x20','log','\x0a═══════════════════════════════════════════════════════════','startsWith','\x20\x20\x20Note:\x20To\x20use\x20system-wide,\x20add\x20to\x20PATH\x20or\x20install\x20globally:','\x20-m\x20pip\x20show\x20','v1.55.0','python3','arch','python','\x20\x20\x20Downloading\x20from\x20','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20','node_modules','\x20already\x20installed','error','\x20\x20Installation\x20Complete','\x20\x20\x20✅\x20','\x20\x20\x20Using\x20system-installed\x20Semgrep\x0a','get','eslint-plugin-security','\x20\x20\x20Installing\x20','python\x20--version','catch','16124qjnfJR','\x20\x20\x20⚠️\x20\x20No\x20Semgrep\x20binary\x20available\x20for\x20','message','4482720MYttYK','semgrep\x20--version','\x20\x20\x20✅\x20Python\x20found:\x20','2YqzHmj','mkdir','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20semgrep\x0a','❌\x20Installation\x20failed:','🔍\x20Installing\x20Semgrep...','pipe','\x20\x20\x20Run:\x20npm\x20install\x20--save-dev\x20eslint-plugin-security\x0a','promises','\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit','statusCode','3471531SFyYJF','\x20\x20\x20Semgrep\x20not\x20found\x20in\x20PATH,\x20installing\x20standalone\x20binary...','\x20\x20npm\x20install\x20--save-dev\x20eslint-plugin-security','\x20\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit\x20checkov\x20yamllint\x0a','\x20\x20\x20✅\x20Semgrep\x20already\x20installed:\x20','yamllint','\x20installed\x20successfully','\x20\x20\x20⚠️\x20\x20Python\x20not\x20found\x20-\x20skipping\x20Python\x20scanners','close','dirname','7502960ezyjZV','1651323sIGztK','🐍\x20Checking\x20Python\x20scanners...','\x20\x20\x20✅\x20Semgrep\x20installed\x20successfully','\x0aYou\x20can\x20manually\x20install\x20scanners:','url','trim'];a0_0x4afc=function(){return _0x5beb7c;};return a0_0x4afc();}import{fileURLToPath}from'url';import{createWriteStream}from'fs';import{pipeline}from'stream/promises';const execAsync=promisify(exec),__filename=fileURLToPath(import.meta.url),__dirname=a0_0x270876[a0_0x614b74(0xba)](__filename),SCANNER_DIR=a0_0x270876[a0_0x614b74(0xc4)](__dirname,'..',a0_0x614b74(0x96),a0_0x614b74(0xc6)),SEMGREP_VERSION=a0_0x614b74(0x90);console['log'](a0_0x614b74(0x7e)),console[a0_0x614b74(0x8b)](a0_0x614b74(0xc7)),console['log'](a0_0x614b74(0x85));async function installScanners(){const _0x446b7c=a0_0x614b74;await a0_0x51039c['promises'][_0x446b7c(0xa8)](SCANNER_DIR,{'recursive':!![]}),await checkESLintSecurity(),await installSemgrep(),await installPythonScanners(),console['log'](_0x446b7c(0x8c)),console['log'](_0x446b7c(0x99)),console[_0x446b7c(0x8b)](_0x446b7c(0x85));}async function checkESLintSecurity(){const _0x37c9c0=a0_0x614b74;console[_0x37c9c0(0x8b)]('📦\x20Checking\x20ESLint\x20Security\x20Plugin...');try{await import(_0x37c9c0(0x9d)),console[_0x37c9c0(0x8b)]('\x20\x20\x20✅\x20eslint-plugin-security\x20is\x20installed\x0a');}catch(_0x5954b9){console[_0x37c9c0(0x8b)]('\x20\x20\x20⚠️\x20\x20eslint-plugin-security\x20not\x20found'),console[_0x37c9c0(0x8b)](_0x37c9c0(0xad));}}async function installSemgrep(){const _0x47b9ea=a0_0x614b74;console[_0x47b9ea(0x8b)](_0x47b9ea(0xab));const _0x25e37e=process['platform'],_0x57d14e=process[_0x47b9ea(0x92)];try{const _0x1cfbda=await execAsync(_0x47b9ea(0xa5),{'timeout':0x1388});console['log'](_0x47b9ea(0xb5)+_0x1cfbda[_0x47b9ea(0xc3)][_0x47b9ea(0xc1)]()),console[_0x47b9ea(0x8b)](_0x47b9ea(0x9b));return;}catch(_0x2c6953){console[_0x47b9ea(0x8b)](_0x47b9ea(0xb2));}const _0x1548e4=getSemgrepBinaryInfo(_0x25e37e,_0x57d14e);if(!_0x1548e4){console[_0x47b9ea(0x8b)](_0x47b9ea(0xa2)+_0x25e37e+'-'+_0x57d14e),console['log']('\x20\x20\x20Please\x20install\x20manually:\x20https://semgrep.dev/docs/getting-started/\x0a');return;}try{const _0x372773=a0_0x270876[_0x47b9ea(0xc4)](SCANNER_DIR,_0x47b9ea(0x81));console[_0x47b9ea(0x8b)](_0x47b9ea(0x94)+_0x1548e4[_0x47b9ea(0xc0)]+'...'),await downloadFile(_0x1548e4[_0x47b9ea(0xc0)],_0x372773),await a0_0x51039c[_0x47b9ea(0xae)]['chmod'](_0x372773,0x1ed),console['log'](_0x47b9ea(0xbe)),console[_0x47b9ea(0x8b)]('\x20\x20\x20Location:\x20'+_0x372773+'\x0a'),console[_0x47b9ea(0x8b)](_0x47b9ea(0x8e)),console[_0x47b9ea(0x8b)]('\x20\x20\x20pip\x20install\x20semgrep\x0a');}catch(_0xb2f2bf){console[_0x47b9ea(0x8b)](_0x47b9ea(0xc2)+_0xb2f2bf[_0x47b9ea(0xa3)]),console['log'](_0x47b9ea(0xa9));}}function getSemgrepBinaryInfo(_0x1110fa,_0x28dc3f){return null;}async function installPythonScanners(){const _0x50d7ae=a0_0x614b74;console[_0x50d7ae(0x8b)](_0x50d7ae(0xbd));let _0x2c2d34=null;try{await execAsync(_0x50d7ae(0x82),{'timeout':0x1388}),_0x2c2d34=_0x50d7ae(0x91);}catch(_0x19557e){try{await execAsync(_0x50d7ae(0x9f),{'timeout':0x1388}),_0x2c2d34=_0x50d7ae(0x93);}catch(_0x41d5af){console[_0x50d7ae(0x8b)](_0x50d7ae(0xb8)),console[_0x50d7ae(0x8b)](_0x50d7ae(0x84)),console['log'](_0x50d7ae(0xb4));return;}}console[_0x50d7ae(0x8b)](_0x50d7ae(0xa6)+_0x2c2d34),await installViaPip(_0x50d7ae(0x81),_0x2c2d34),await installViaPip(_0x50d7ae(0x86),_0x2c2d34),await installViaPip(_0x50d7ae(0x87),_0x2c2d34),await installViaPip('checkov',_0x2c2d34),await installViaPip(_0x50d7ae(0xb6),_0x2c2d34),console['log']('');}async function installViaPip(_0x281252,_0xc711f1){const _0x2faa86=a0_0x614b74;try{const _0x3c2046=await execAsync(_0xc711f1+_0x2faa86(0x8f)+_0x281252,{'timeout':0x1388});return console[_0x2faa86(0x8b)](_0x2faa86(0x9a)+_0x281252+_0x2faa86(0x97)),!![];}catch(_0x3d4837){console[_0x2faa86(0x8b)](_0x2faa86(0x9e)+_0x281252+'...');try{return await execAsync(_0xc711f1+_0x2faa86(0x8a)+_0x281252,{'timeout':0xea60}),console[_0x2faa86(0x8b)](_0x2faa86(0x9a)+_0x281252+_0x2faa86(0xb7)),!![];}catch(_0x363d51){return console[_0x2faa86(0x8b)](_0x2faa86(0x7c)+_0x281252+':\x20'+_0x363d51[_0x2faa86(0xa3)]),console['log'](_0x2faa86(0x95)+_0x281252),![];}}}function a0_0x154e(_0x4c8720,_0x593b60){_0x4c8720=_0x4c8720-0x7c;const _0x4afc7a=a0_0x4afc();let _0x154e51=_0x4afc7a[_0x4c8720];return _0x154e51;}async function downloadFile(_0x57d263,_0x37c1cd){return new Promise((_0x5529c7,_0x473eb7)=>{const _0x1b31fe=a0_0x154e,_0x197ea9=_0x57d263[_0x1b31fe(0x8d)](_0x1b31fe(0xc9))?a0_0x2ba046:a0_0x4d8458;_0x197ea9[_0x1b31fe(0x9c)](_0x57d263,_0x3b084e=>{const _0x237e69=_0x1b31fe;if(_0x3b084e[_0x237e69(0xb0)]===0x12e||_0x3b084e[_0x237e69(0xb0)]===0x12d){downloadFile(_0x3b084e[_0x237e69(0x88)]['location'],_0x37c1cd)['then'](_0x5529c7)['catch'](_0x473eb7);return;}if(_0x3b084e[_0x237e69(0xb0)]!==0xc8){_0x473eb7(new Error(_0x237e69(0xc8)+_0x3b084e[_0x237e69(0xb0)]));return;}const _0x5e30b0=createWriteStream(_0x37c1cd);_0x3b084e[_0x237e69(0xac)](_0x5e30b0),_0x5e30b0['on'](_0x237e69(0x83),()=>{const _0x59c1f1=_0x237e69;_0x5e30b0[_0x59c1f1(0xb9)](),_0x5529c7();}),_0x5e30b0['on'](_0x237e69(0x98),_0x1f7a32=>{const _0xf41f21=_0x237e69;a0_0x51039c[_0xf41f21(0xc5)](_0x37c1cd,()=>{}),_0x473eb7(_0x1f7a32);});})['on'](_0x1b31fe(0x98),_0x473eb7);});}installScanners()[a0_0x614b74(0xa0)](_0x20bb17=>{const _0x2a9aa7=a0_0x614b74;console['error'](_0x2a9aa7(0xaa),_0x20bb17['message']),console['error'](_0x2a9aa7(0xbf)),console[_0x2a9aa7(0x98)](_0x2a9aa7(0xb3)),console[_0x2a9aa7(0x98)](_0x2a9aa7(0xaf)),process[_0x2a9aa7(0x7f)](0x0);});
@@ -1 +1 @@
1
- const a0_0x1eeb64=a0_0x4da3;(function(_0x10234f,_0x48c9b3){const _0x2452e5=a0_0x4da3,_0x33d956=_0x10234f();while(!![]){try{const _0x56a8a5=parseInt(_0x2452e5(0x93))/0x1+parseInt(_0x2452e5(0x98))/0x2*(-parseInt(_0x2452e5(0x9e))/0x3)+-parseInt(_0x2452e5(0x82))/0x4*(-parseInt(_0x2452e5(0x9d))/0x5)+parseInt(_0x2452e5(0x9c))/0x6*(parseInt(_0x2452e5(0xb3))/0x7)+parseInt(_0x2452e5(0xaa))/0x8*(-parseInt(_0x2452e5(0xbc))/0x9)+-parseInt(_0x2452e5(0xa9))/0xa+parseInt(_0x2452e5(0xb8))/0xb;if(_0x56a8a5===_0x48c9b3)break;else _0x33d956['push'](_0x33d956['shift']());}catch(_0x1a3a97){_0x33d956['push'](_0x33d956['shift']());}}}(a0_0x5aee,0x98c07));function a0_0x4da3(_0x337817,_0x4afd10){_0x337817=_0x337817-0x7c;const _0x5aeef2=a0_0x5aee();let _0x4da3e3=_0x5aeef2[_0x337817];if(a0_0x4da3['lciYOI']===undefined){var _0x4c7426=function(_0x5902b2){const _0x5c5abf='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x35c96e='',_0x5c598c='';for(let _0x50eb5b=0x0,_0x700ee7,_0x4e4ee5,_0x76a4ab=0x0;_0x4e4ee5=_0x5902b2['charAt'](_0x76a4ab++);~_0x4e4ee5&&(_0x700ee7=_0x50eb5b%0x4?_0x700ee7*0x40+_0x4e4ee5:_0x4e4ee5,_0x50eb5b++%0x4)?_0x35c96e+=String['fromCharCode'](0xff&_0x700ee7>>(-0x2*_0x50eb5b&0x6)):0x0){_0x4e4ee5=_0x5c5abf['indexOf'](_0x4e4ee5);}for(let _0xccfe29=0x0,_0x18f76c=_0x35c96e['length'];_0xccfe29<_0x18f76c;_0xccfe29++){_0x5c598c+='%'+('00'+_0x35c96e['charCodeAt'](_0xccfe29)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5c598c);};a0_0x4da3['sKUNsc']=_0x4c7426,a0_0x4da3['ymdFtb']={},a0_0x4da3['lciYOI']=!![];}const _0x42ecdf=_0x5aeef2[0x0],_0x1140d8=_0x337817+_0x42ecdf,_0x2bf161=a0_0x4da3['ymdFtb'][_0x1140d8];return!_0x2bf161?(_0x4da3e3=a0_0x4da3['sKUNsc'](_0x4da3e3),a0_0x4da3['ymdFtb'][_0x1140d8]=_0x4da3e3):_0x4da3e3=_0x2bf161,_0x4da3e3;}import{STATIC_ANALYSIS}from'../utilities/constants.js';class CSSAnalyzer{constructor(_0x35c96e=null){const _0x337e3e=a0_0x4da3;this['logger']=_0x35c96e,this['stylelint']=null,this['postcss']=null,this['postcssScss']=null,this[_0x337e3e(0xb9)]=null;}async['analyze'](_0x5c598c,_0x50eb5b,_0x700ee7={}){const _0x23de0a=a0_0x4da3;try{const _0x4e4ee5=[],_0x76a4ab=this['detectLanguage'](_0x5c598c),_0xccfe29=await this['checkSyntax'](_0x5c598c,_0x50eb5b,_0x76a4ab);_0x4e4ee5['push'](..._0xccfe29);if(_0xccfe29['length']===0x0){const _0x18f76c=await this['lintStyles'](_0x5c598c,_0x50eb5b,_0x76a4ab);_0x4e4ee5['push'](..._0x18f76c);}return this['logger']?.[_0x23de0a(0x96)]('CSS\x20analysis\x20completed',{'file':_0x5c598c,'language':_0x76a4ab,'totalDiagnostics':_0x4e4ee5['length'],'errors':_0x4e4ee5['filter'](_0xe5695a=>_0xe5695a[_0x23de0a(0x9f)]===STATIC_ANALYSIS['SEVERITY'][_0x23de0a(0x8e)])[_0x23de0a(0x94)],'warnings':_0x4e4ee5['filter'](_0x40ea93=>_0x40ea93[_0x23de0a(0x9f)]===STATIC_ANALYSIS[_0x23de0a(0x87)][_0x23de0a(0xab)])['length']}),_0x4e4ee5;}catch(_0x3cb246){return this[_0x23de0a(0xb0)]?.[_0x23de0a(0xb5)](_0x23de0a(0x8f),{'file':_0x5c598c,'error':_0x3cb246['message']}),[];}}async['checkSyntax'](_0x10e6cd,_0x2c413a,_0x92457e){const _0x21714c=a0_0x4da3,_0x2c6202=[];try{if(!this['postcss']){const _0x5e7a0c=await import(_0x21714c(0x8c));this['postcss']=_0x5e7a0c[_0x21714c(0x83)];}let _0x2feabd=null;if(_0x92457e===_0x21714c(0xb6)){if(!this[_0x21714c(0xbb)]){const _0x5234e8=await import(_0x21714c(0x8b));this[_0x21714c(0xbb)]=_0x5234e8[_0x21714c(0x83)];}_0x2feabd=this[_0x21714c(0xbb)];}else{if(_0x92457e==='less'){if(!this['postcssLess']){const _0x2c5759=await import('postcss-less');this['postcssLess']=_0x2c5759[_0x21714c(0x83)];}_0x2feabd=this['postcssLess'];}}const _0x56fe43=this[_0x21714c(0x8c)]()[_0x21714c(0x8a)](_0x2c413a,{'from':_0x10e6cd,'syntax':_0x2feabd}),_0x3895d=_0x56fe43['root'];this['logger']?.['debug'](_0x21714c(0xbd),{'file':_0x10e6cd});}catch(_0x56180d){const _0x54e4cc=this[_0x21714c(0xa4)](_0x56180d,_0x10e6cd);_0x54e4cc&&_0x2c6202[_0x21714c(0x85)](_0x54e4cc);}return _0x2c6202;}async['lintStyles'](_0x9d08ed,_0x557412,_0x245de1){const _0x5abacf=a0_0x4da3,_0x2650b5=[];try{if(!this[_0x5abacf(0x86)]){const _0x14629d=await import(_0x5abacf(0x86));this['stylelint']=_0x14629d[_0x5abacf(0x83)];}const _0xb6381b={'extends':['stylelint-config-standard'],'rules':{'color-no-invalid-hex':!![],'font-family-no-duplicate-names':!![],'function-calc-no-invalid':!![],'string-no-newline':!![],'unit-no-unknown':!![],'property-no-unknown':!![],'declaration-block-no-duplicate-properties':!![],'selector-pseudo-class-no-unknown':!![],'selector-pseudo-element-no-unknown':!![],'selector-type-no-unknown':[!![],{'ignoreTypes':['/^custom-/','ng-deep']}],'media-feature-name-no-unknown':!![],'at-rule-no-unknown':_0x245de1==='scss'?[!![],{'ignoreAtRules':['mixin','include','extend','if',_0x5abacf(0xad),_0x5abacf(0x95),'each','while','function','return','content',_0x5abacf(0xb1),'forward']}]:_0x245de1===_0x5abacf(0x88)?[!![],{'ignoreAtRules':[_0x5abacf(0xa5)]}]:!![],'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':_0x5abacf(0xa1),'selector-type-case':_0x5abacf(0x84)},'customSyntax':_0x245de1==='scss'?'postcss-scss':_0x245de1===_0x5abacf(0x88)?'postcss-less':undefined},_0x28fd3e=await this['stylelint'][_0x5abacf(0x90)]({'code':_0x557412,'codeFilename':_0x9d08ed,'config':_0xb6381b});if(_0x28fd3e['results']&&_0x28fd3e[_0x5abacf(0x9b)]['length']>0x0){const _0x42c1b5=_0x28fd3e[_0x5abacf(0x9b)][0x0];if(_0x42c1b5['warnings'])for(const _0x178482 of _0x42c1b5[_0x5abacf(0xaf)]){_0x2650b5['push']({'file':_0x9d08ed,'line':_0x178482['line']||0x1,'column':_0x178482['column']||0x1,'severity':_0x178482['severity']==='error'?STATIC_ANALYSIS[_0x5abacf(0x87)]['ERROR']:STATIC_ANALYSIS['SEVERITY'][_0x5abacf(0xab)],'rule':_0x178482[_0x5abacf(0x91)]||'unknown','message':_0x178482[_0x5abacf(0xa6)],'category':this['categorizeStylelintRule'](_0x178482['rule']),'fixable':![],'source':'stylelint'});}}}catch(_0x155717){this['logger']?.[_0x5abacf(0xae)](_0x5abacf(0xba),{'file':_0x9d08ed,'error':_0x155717[_0x5abacf(0xb2)]});}return _0x2650b5;}['formatPostCSSError'](_0x1192f4,_0x4a1f8e){const _0x3b4e20=a0_0x4da3;return{'file':_0x4a1f8e,'line':_0x1192f4[_0x3b4e20(0xa7)]||0x1,'column':_0x1192f4['column']||0x1,'severity':STATIC_ANALYSIS[_0x3b4e20(0x87)]['ERROR'],'rule':_0x1192f4[_0x3b4e20(0x7d)]||_0x3b4e20(0x7e),'message':_0x1192f4[_0x3b4e20(0x99)]||_0x1192f4['message'],'category':STATIC_ANALYSIS[_0x3b4e20(0xa0)]['SYNTAX'],'fixable':![],'source':'postcss','code':_0x1192f4[_0x3b4e20(0xb7)]||undefined};}['categorizeStylelintRule'](_0x1fe91a){const _0x1d2ae3=a0_0x4da3;if(!_0x1fe91a)return STATIC_ANALYSIS[_0x1d2ae3(0xa0)][_0x1d2ae3(0xa2)];const _0x38e83d=_0x1fe91a['toLowerCase']();if(_0x38e83d[_0x1d2ae3(0x8d)](_0x1d2ae3(0x92))||_0x38e83d[_0x1d2ae3(0x8d)](_0x1d2ae3(0x97))||_0x38e83d[_0x1d2ae3(0x8d)](_0x1d2ae3(0xa8))||_0x38e83d['includes']('syntax'))return STATIC_ANALYSIS[_0x1d2ae3(0xa0)]['SYNTAX'];if(_0x38e83d[_0x1d2ae3(0x8d)](_0x1d2ae3(0xac))||_0x38e83d['includes']('optimize'))return STATIC_ANALYSIS['CATEGORY']['PERFORMANCE'];if(_0x38e83d[_0x1d2ae3(0x8d)]('best-practice')||_0x38e83d[_0x1d2ae3(0x8d)](_0x1d2ae3(0xb4)))return STATIC_ANALYSIS['CATEGORY']['BEST_PRACTICE'];return STATIC_ANALYSIS[_0x1d2ae3(0xa0)]['STYLE'];}[a0_0x1eeb64(0xa3)](_0xabd34a){const _0x473ae5=a0_0x1eeb64,_0x126d7c=_0xabd34a['toLowerCase']();if(_0x126d7c['endsWith']('.scss')||_0x126d7c['endsWith'](_0x473ae5(0x7c)))return _0x473ae5(0xb6);if(_0x126d7c[_0x473ae5(0x89)](_0x473ae5(0x7f)))return'less';return _0x473ae5(0x80);}[a0_0x1eeb64(0x81)](){const _0x59aa72=a0_0x1eeb64;return['.css','.scss',_0x59aa72(0x7c),_0x59aa72(0x7f)];}[a0_0x1eeb64(0x9a)](){return![];}}export default CSSAnalyzer;function a0_0x5aee(){const _0x57d302=['zgvMyxvSDa','Bg93zxi','ChvZAa','C3r5BgvSAw50','u0vwrvjjvfK','BgvZCW','zw5KC1DPDgG','ChjVy2vZCW','Cg9ZDgnZCY1Zy3nZ','Cg9ZDgnZCW','Aw5JBhvKzxm','rvjst1i','q1ntigfUywX5C2LZigzHAwXLza','BgLUDa','CNvSzq','BM8TAw52ywXPza','nZaWmJa4CMXUz1zJ','BgvUz3rO','zM9Y','zgvIDwC','BM8TDw5RBM93BG','ngjpy1zhuW','CMvHC29U','C3vWCg9YDhnbDxrVrML4','CMvZDwX0CW','ntK1mZK4wgzor0rs','nta4mJyXnvnurePVtW','mtmYmtC5n2LzDerlta','C2v2zxjPDhK','q0furuDpuLK','zg91yMXL','u1rzteu','zgv0zwn0tgfUz3vHz2u','zM9YBwf0ug9ZDentu0vYCM9Y','CgX1z2LU','Dgv4Da','BgLUzq','BM8Tzw1WDhK','otuXnty2mfPbwe5JCG','mtK0mJCZnKHrAgrwtG','v0fstKLorW','CgvYzM9YBwfUy2u','zwXZzq','D2fYBG','D2fYBMLUz3m','Bg9Nz2vY','DxnL','BwvZC2fNzq','nJnLtNHiB2W','CMvJB21Tzw5Kzwq','zxjYB3i','C2nZCW','C291CMnL','nJm0odq2m1bttwHnsW','Cg9ZDgnZC0XLC3m','u3r5BgvSAw50igfUywX5C2LZigzHAwXLza','Cg9ZDgnZC1nJC3m','mJDJCM1vCLe','ug9ZDentuYbZEw50yxGGy2HLy2SGCgfZC2vK','lNnHC3m','BMfTzq','q3nZu3LUDgf4rxjYB3i','lMXLC3m','y3nZ','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','neLNvKTLqW'];a0_0x5aee=function(){return _0x57d302;};return a0_0x5aee();}
1
+ function a0_0x3ba2(_0x317b7e,_0x35993b){_0x317b7e=_0x317b7e-0x193;const _0x38e154=a0_0x38e1();let _0x3ba28b=_0x38e154[_0x317b7e];if(a0_0x3ba2['raNrNt']===undefined){var _0x4d2420=function(_0x10cbf5){const _0x2f64a9='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x547a06='',_0x75b2f0='';for(let _0x571441=0x0,_0x40ab50,_0x2d6450,_0x4ce857=0x0;_0x2d6450=_0x10cbf5['charAt'](_0x4ce857++);~_0x2d6450&&(_0x40ab50=_0x571441%0x4?_0x40ab50*0x40+_0x2d6450:_0x2d6450,_0x571441++%0x4)?_0x547a06+=String['fromCharCode'](0xff&_0x40ab50>>(-0x2*_0x571441&0x6)):0x0){_0x2d6450=_0x2f64a9['indexOf'](_0x2d6450);}for(let _0x1f4b95=0x0,_0x3f40fa=_0x547a06['length'];_0x1f4b95<_0x3f40fa;_0x1f4b95++){_0x75b2f0+='%'+('00'+_0x547a06['charCodeAt'](_0x1f4b95)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x75b2f0);};a0_0x3ba2['PmKzsv']=_0x4d2420,a0_0x3ba2['sxRQKE']={},a0_0x3ba2['raNrNt']=!![];}const _0x90a0fa=_0x38e154[0x0],_0x3b6291=_0x317b7e+_0x90a0fa,_0x1815ca=a0_0x3ba2['sxRQKE'][_0x3b6291];return!_0x1815ca?(_0x3ba28b=a0_0x3ba2['PmKzsv'](_0x3ba28b),a0_0x3ba2['sxRQKE'][_0x3b6291]=_0x3ba28b):_0x3ba28b=_0x1815ca,_0x3ba28b;}function a0_0x38e1(){const _0xf05980=['ChvZAa','CMvHC29U','ug9ZDentuYbZEw50yxGGy2HLy2SGCgfZC2vK','y29SDw1U','C3vWCg9YDhnbDxrVrML4','D2fYBG','BgLUzq','BM8TAw52ywXPza','lMXLC3m','y2f0zwDVCML6zvn0EwXLBgLUDfj1Bgu','zgvIDwC','zwXZzq','zgvMyxvSDa','C2nZCW','Bg9Nz2vY','C3r5BgvSAw50','u0vwrvjjvfK','CMvJB21Tzw5Kzwq','zMLSDgvY','BwvZC2fNzq','q0furuDpuLK','y29UDgvUDa','mM5srg5evq','CMvZDwX0CW','BMCTzgvLCa','mtqZmKfrweXmAW','y3nZ','zxH0zw5K','B3b0Aw1PEMu','BMfTzq','zw5KC1DPDgG','Dg9mB3DLCKnHC2u','Aw5JBhvKzxm','C3LUDgf4','u1rzteu','Dgv4Da','BgvZCW','DxnL','Cg9ZDgnZC1nJC3m','zgv0zwn0tgfUz3vHz2u','ntiZmJe3muDwAg9nyG','q3nZu3LUDgf4rxjYB3i','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','zNvUy3rPB24','uevsrK9stufoq0u','qKvtvf9quKfdveLdrq','nda1mZe4murvz0v6rW','Cg9ZDgnZCW','odaYmJq2vuDTwMf4','ndbAsfzrAuu','D2fYBMLUz3m','C3r5BgvSAw50lwnVBMzPzY1ZDgfUzgfYza','mJqXndu0nxHnB3nHtG','odK1mJaWt3rpruLZ','Cg9ZDgnZC0XLC3m','v0fstKLorW','mtK3ntm0oeDjy1vluG','BgvUz3rO','y2HLy2TtEw50yxG','zM9Y','mJi1mJDrEwTiuLa','ntbZtLb1BMG','u1Lovefy','u3r5BgvSAw50igfUywX5C2LZigzHAwXLza'];a0_0x38e1=function(){return _0xf05980;};return a0_0x38e1();}const a0_0x22c23c=a0_0x3ba2;(function(_0x32862b,_0x13b913){const _0x1df604=a0_0x3ba2,_0x4fab7c=_0x32862b();while(!![]){try{const _0x1bfbe1=parseInt(_0x1df604(0x1b5))/0x1*(-parseInt(_0x1df604(0x1cf))/0x2)+parseInt(_0x1df604(0x1c7))/0x3+parseInt(_0x1df604(0x197))/0x4+parseInt(_0x1df604(0x1d0))/0x5*(parseInt(_0x1df604(0x194))/0x6)+-parseInt(_0x1df604(0x193))/0x7+-parseInt(_0x1df604(0x1b8))/0x8*(-parseInt(_0x1df604(0x19b))/0x9)+parseInt(_0x1df604(0x19c))/0xa*(-parseInt(_0x1df604(0x1cd))/0xb);if(_0x1bfbe1===_0x13b913)break;else _0x4fab7c['push'](_0x4fab7c['shift']());}catch(_0xc3f53a){_0x4fab7c['push'](_0x4fab7c['shift']());}}}(a0_0x38e1,0xd948b));import{STATIC_ANALYSIS}from'../utilities/constants.js';class CSSAnalyzer{constructor(_0x547a06=null){const _0x59be7c=a0_0x3ba2;this[_0x59be7c(0x1ad)]=_0x547a06,this['stylelint']=null,this[_0x59be7c(0x1ce)]=null,this[_0x59be7c(0x1c5)]=null,this['postcssLess']=null;}async['analyze'](_0x75b2f0,_0x571441,_0x40ab50={}){const _0x3f042a=a0_0x3ba2;try{const _0x2d6450=[],_0x4ce857=this[_0x3f042a(0x1c6)](_0x75b2f0),_0x1f4b95=await this[_0x3f042a(0x199)](_0x75b2f0,_0x571441,_0x4ce857);_0x2d6450['push'](..._0x1f4b95);if(_0x1f4b95['length']===0x0){const _0x3f40fa=await this['lintStyles'](_0x75b2f0,_0x571441,_0x4ce857);_0x2d6450['push'](..._0x3f40fa);}return this[_0x3f042a(0x1ad)]?.[_0x3f042a(0x1a9)]('CSS\x20analysis\x20completed',{'file':_0x75b2f0,'language':_0x4ce857,'totalDiagnostics':_0x2d6450['length'],'errors':_0x2d6450['filter'](_0xe099ee=>_0xe099ee['severity']===STATIC_ANALYSIS['SEVERITY']['ERROR'])[_0x3f042a(0x198)],'warnings':_0x2d6450[_0x3f042a(0x1b1)](_0x5a39dc=>_0x5a39dc['severity']===STATIC_ANALYSIS['SEVERITY'][_0x3f042a(0x196)])[_0x3f042a(0x198)]}),_0x2d6450;}catch(_0x172256){return this['logger']?.['error']('CSS\x20analysis\x20failed',{'file':_0x75b2f0,'error':_0x172256[_0x3f042a(0x1b2)]}),[];}}async['checkSyntax'](_0xf2bf82,_0x2899a3,_0x56b91e){const _0x1f15c0=a0_0x3ba2,_0x3334c8=[];try{if(!this[_0x1f15c0(0x1ce)]){const _0x50a3a7=await import(_0x1f15c0(0x1ce));this[_0x1f15c0(0x1ce)]=_0x50a3a7[_0x1f15c0(0x1ab)];}let _0x13de7a=null;if(_0x56b91e===_0x1f15c0(0x1ac)){if(!this['postcssScss']){const _0x2e6f77=await import('postcss-scss');this['postcssScss']=_0x2e6f77[_0x1f15c0(0x1ab)];}_0x13de7a=this['postcssScss'];}else{if(_0x56b91e===_0x1f15c0(0x1c3)){if(!this[_0x1f15c0(0x195)]){const _0x6af35d=await import('postcss-less');this[_0x1f15c0(0x195)]=_0x6af35d['default'];}_0x13de7a=this['postcssLess'];}}const _0x5dfb92=this[_0x1f15c0(0x1ce)]()['process'](_0x2899a3,{'from':_0xf2bf82,'syntax':_0x13de7a}),_0x474ca6=_0x5dfb92['root'];this['logger']?.[_0x1f15c0(0x1a9)](_0x1f15c0(0x1a1),{'file':_0xf2bf82});}catch(_0x3e4031){const _0x1842ef=this['formatPostCSSError'](_0x3e4031,_0xf2bf82);_0x1842ef&&_0x3334c8['push'](_0x1842ef);}return _0x3334c8;}async['lintStyles'](_0x3f23aa,_0x12e42a,_0x41e084){const _0xbb8cd4=a0_0x3ba2,_0x4eb459=[];try{if(!this[_0xbb8cd4(0x1ae)]){const _0x2d6665=await import(_0xbb8cd4(0x1ae));this['stylelint']=_0x2d6665['default'];}const _0x11493e={'extends':[_0xbb8cd4(0x1d2)],'rules':{'color-no-invalid-hex':!![],'font-family-no-duplicate-names':!![],'function-calc-no-invalid':!![],'string-no-newline':!![],'unit-no-unknown':!![],'property-no-unknown':!![],'declaration-block-no-duplicate-properties':!![],'selector-pseudo-class-no-unknown':!![],'selector-pseudo-element-no-unknown':!![],'selector-type-no-unknown':[!![],{'ignoreTypes':['/^custom-/',_0xbb8cd4(0x1b7)]}],'media-feature-name-no-unknown':!![],'at-rule-no-unknown':_0x41e084===_0xbb8cd4(0x1ac)?[!![],{'ignoreAtRules':['mixin','include',_0xbb8cd4(0x1ba),'if',_0xbb8cd4(0x1aa),_0xbb8cd4(0x19a),'each','while',_0xbb8cd4(0x1ca),'return',_0xbb8cd4(0x1b4),_0xbb8cd4(0x1c4),'forward']}]:_0x41e084==='less'?[!![],{'ignoreAtRules':['plugin']}]:!![],'comment-no-empty':!![],'no-duplicate-selectors':!![],'no-empty-source':null,'block-no-empty':!![],'declaration-block-no-shorthand-property-overrides':!![],'font-family-no-missing-generic-family-keyword':!![],'function-linear-gradient-no-nonstandard-direction':!![],'no-descending-specificity':null,'no-duplicate-at-import-rules':!![],'no-extra-semicolons':!![],'no-invalid-double-slash-comments':!![],'selector-pseudo-element-colon-notation':'double','selector-type-case':'lower'},'customSyntax':_0x41e084==='scss'?'postcss-scss':_0x41e084==='less'?'postcss-less':undefined},_0x5cb6c5=await this['stylelint']['lint']({'code':_0x12e42a,'codeFilename':_0x3f23aa,'config':_0x11493e});if(_0x5cb6c5['results']&&_0x5cb6c5['results']['length']>0x0){const _0x1a8f08=_0x5cb6c5[_0xbb8cd4(0x1b6)][0x0];if(_0x1a8f08[_0xbb8cd4(0x1d1)])for(const _0x58f436 of _0x1a8f08['warnings']){_0x4eb459[_0xbb8cd4(0x19f)]({'file':_0x3f23aa,'line':_0x58f436[_0xbb8cd4(0x1a5)]||0x1,'column':_0x58f436[_0xbb8cd4(0x1a2)]||0x1,'severity':_0x58f436['severity']==='error'?STATIC_ANALYSIS[_0xbb8cd4(0x1af)]['ERROR']:STATIC_ANALYSIS[_0xbb8cd4(0x1af)][_0xbb8cd4(0x196)],'rule':_0x58f436['rule']||'unknown','message':_0x58f436[_0xbb8cd4(0x1c2)],'category':this[_0xbb8cd4(0x1a8)](_0x58f436['rule']),'fixable':![],'source':_0xbb8cd4(0x1ae)});}}}catch(_0x2df02f){this[_0xbb8cd4(0x1ad)]?.[_0xbb8cd4(0x1a4)](_0xbb8cd4(0x19e),{'file':_0x3f23aa,'error':_0x2df02f['message']});}return _0x4eb459;}['formatPostCSSError'](_0x4e3679,_0x380a0d){const _0x2ff2b4=a0_0x3ba2;return{'file':_0x380a0d,'line':_0x4e3679['line']||0x1,'column':_0x4e3679[_0x2ff2b4(0x1a2)]||0x1,'severity':STATIC_ANALYSIS['SEVERITY']['ERROR'],'rule':_0x4e3679[_0x2ff2b4(0x1bc)]||_0x2ff2b4(0x1c8),'message':_0x4e3679[_0x2ff2b4(0x1a0)]||_0x4e3679[_0x2ff2b4(0x1b2)],'category':STATIC_ANALYSIS['CATEGORY']['SYNTAX'],'fixable':![],'source':'postcss','code':_0x4e3679['source']||undefined};}[a0_0x22c23c(0x1a8)](_0x42cfaa){const _0x25985c=a0_0x22c23c;if(!_0x42cfaa)return STATIC_ANALYSIS[_0x25985c(0x1b3)][_0x25985c(0x1c1)];const _0x4d3740=_0x42cfaa[_0x25985c(0x1be)]();if(_0x4d3740['includes'](_0x25985c(0x1a6))||_0x4d3740[_0x25985c(0x1bf)]('no-unknown')||_0x4d3740[_0x25985c(0x1bf)]('no-empty')||_0x4d3740['includes'](_0x25985c(0x1c0)))return STATIC_ANALYSIS['CATEGORY'][_0x25985c(0x19d)];if(_0x4d3740[_0x25985c(0x1bf)]('performance')||_0x4d3740['includes'](_0x25985c(0x1bb)))return STATIC_ANALYSIS['CATEGORY'][_0x25985c(0x1cb)];if(_0x4d3740['includes']('best-practice')||_0x4d3740[_0x25985c(0x1bf)](_0x25985c(0x1b0)))return STATIC_ANALYSIS['CATEGORY'][_0x25985c(0x1cc)];return STATIC_ANALYSIS[_0x25985c(0x1b3)]['STYLE'];}['detectLanguage'](_0x50bdc0){const _0x48a7f6=a0_0x22c23c,_0x47c881=_0x50bdc0['toLowerCase']();if(_0x47c881[_0x48a7f6(0x1bd)]('.scss')||_0x47c881['endsWith']('.sass'))return'scss';if(_0x47c881['endsWith']('.less'))return _0x48a7f6(0x1c3);return _0x48a7f6(0x1b9);}[a0_0x22c23c(0x1c9)](){const _0x38fa8e=a0_0x22c23c;return['.css','.scss','.sass',_0x38fa8e(0x1a7)];}[a0_0x22c23c(0x1a3)](){return![];}}export default CSSAnalyzer;
@@ -1 +1 @@
1
- const a0_0x1e7674=a0_0x2583;(function(_0x50da16,_0x1f3232){const _0x8e8f6e=a0_0x2583,_0x4a716e=_0x50da16();while(!![]){try{const _0x42df34=parseInt(_0x8e8f6e(0x1bd))/0x1+parseInt(_0x8e8f6e(0x178))/0x2*(parseInt(_0x8e8f6e(0x166))/0x3)+parseInt(_0x8e8f6e(0x1bb))/0x4+parseInt(_0x8e8f6e(0x17f))/0x5+parseInt(_0x8e8f6e(0x1bf))/0x6*(-parseInt(_0x8e8f6e(0x16c))/0x7)+parseInt(_0x8e8f6e(0x189))/0x8+parseInt(_0x8e8f6e(0x163))/0x9*(-parseInt(_0x8e8f6e(0x186))/0xa);if(_0x42df34===_0x1f3232)break;else _0x4a716e['push'](_0x4a716e['shift']());}catch(_0x16c386){_0x4a716e['push'](_0x4a716e['shift']());}}}(a0_0x3f8e,0xe51ec));function a0_0x2583(_0x1f07ab,_0x59f9b5){_0x1f07ab=_0x1f07ab-0x15b;const _0x3f8efe=a0_0x3f8e();let _0x2583fd=_0x3f8efe[_0x1f07ab];if(a0_0x2583['LfBsnr']===undefined){var _0x2b2d0f=function(_0x755f9){const _0x35067a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3f96d7='',_0x15bab0='';for(let _0x40113a=0x0,_0x1a0659,_0x1d442b,_0x5f2cc1=0x0;_0x1d442b=_0x755f9['charAt'](_0x5f2cc1++);~_0x1d442b&&(_0x1a0659=_0x40113a%0x4?_0x1a0659*0x40+_0x1d442b:_0x1d442b,_0x40113a++%0x4)?_0x3f96d7+=String['fromCharCode'](0xff&_0x1a0659>>(-0x2*_0x40113a&0x6)):0x0){_0x1d442b=_0x35067a['indexOf'](_0x1d442b);}for(let _0x14c832=0x0,_0x2f1a04=_0x3f96d7['length'];_0x14c832<_0x2f1a04;_0x14c832++){_0x15bab0+='%'+('00'+_0x3f96d7['charCodeAt'](_0x14c832)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x15bab0);};a0_0x2583['LRUdkd']=_0x2b2d0f,a0_0x2583['PfXROZ']={},a0_0x2583['LfBsnr']=!![];}const _0x115041=_0x3f8efe[0x0],_0x1cea03=_0x1f07ab+_0x115041,_0x2c56a0=a0_0x2583['PfXROZ'][_0x1cea03];return!_0x2c56a0?(_0x2583fd=a0_0x2583['LRUdkd'](_0x2583fd),a0_0x2583['PfXROZ'][_0x1cea03]=_0x2583fd):_0x2583fd=_0x2c56a0,_0x2583fd;}import{exec}from'child_process';import{promisify}from'util';import a0_0x3f96d7 from'path';import a0_0x15bab0 from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';const execAsync=promisify(exec);class ConfigValidator{constructor(_0x40113a=null){const _0x33e92f=a0_0x2583;this['logger']=_0x40113a,this[_0x33e92f(0x165)]=null,this[_0x33e92f(0x1a4)]=new Map();}async['detectAvailableValidators'](){const _0x54eaae=a0_0x2583;if(this['availableScanners']!==null)return this[_0x54eaae(0x165)];const _0x1a0659={'checkov':![],'hadolint':![],'yamllint':![],'jsonSchema':![]};try{await execAsync('checkov\x20--version',{'timeout':0x1388}),_0x1a0659[_0x54eaae(0x1d9)]=!![],this['logger']?.['debug']('checkov\x20detected');}catch(_0x1d442b){this[_0x54eaae(0x15d)]?.['debug']('checkov\x20not\x20available',{'error':_0x1d442b['message']});}try{await execAsync('hadolint\x20--version',{'timeout':0x1388}),_0x1a0659[_0x54eaae(0x175)]=!![],this['logger']?.['debug'](_0x54eaae(0x1d2));}catch(_0x5f2cc1){this[_0x54eaae(0x15d)]?.['debug'](_0x54eaae(0x1aa),{'error':_0x5f2cc1['message']});}try{await execAsync(_0x54eaae(0x1a6),{'timeout':0x1388}),_0x1a0659[_0x54eaae(0x1d3)]=!![],this['logger']?.[_0x54eaae(0x1ae)](_0x54eaae(0x170));}catch(_0x14c832){this['logger']?.['debug'](_0x54eaae(0x1ac),{'error':_0x14c832[_0x54eaae(0x1b3)]});}try{await import(_0x54eaae(0x18b)),_0x1a0659[_0x54eaae(0x1db)]=!![],this[_0x54eaae(0x15d)]?.['debug'](_0x54eaae(0x1c5));}catch(_0x2f1a04){this[_0x54eaae(0x15d)]?.[_0x54eaae(0x1ae)]('ajv\x20not\x20available',{'error':_0x2f1a04[_0x54eaae(0x1b3)]});}return this['availableScanners']=_0x1a0659,_0x1a0659;}async[a0_0x1e7674(0x1bc)](_0x190b0b,_0x30079c={}){const _0x3d260d=a0_0x1e7674,_0x13efdd=[],_0x204ddf=await this['detectAvailableValidators'](),_0x352e67=this[_0x3d260d(0x171)](_0x190b0b);this[_0x3d260d(0x15d)]?.[_0x3d260d(0x1ae)](_0x3d260d(0x1ca),{'filePath':_0x190b0b,'fileType':_0x352e67});switch(_0x352e67){case'dockerfile':if(_0x204ddf['hadolint']){const _0x415659=await this[_0x3d260d(0x1cd)](_0x190b0b,_0x30079c);_0x13efdd['push'](..._0x415659);}if(_0x204ddf['checkov']){const _0x191234=await this[_0x3d260d(0x1ab)](_0x190b0b,'dockerfile',_0x30079c);_0x13efdd['push'](..._0x191234);}break;case'docker-compose':if(_0x204ddf[_0x3d260d(0x1d3)]){const _0x365c55=await this[_0x3d260d(0x172)](_0x190b0b,_0x30079c);_0x13efdd[_0x3d260d(0x1ce)](..._0x365c55);}if(_0x204ddf['checkov']){const _0x254dcd=await this['validateWithCheckov'](_0x190b0b,'docker_compose',_0x30079c);_0x13efdd[_0x3d260d(0x1ce)](..._0x254dcd);}break;case _0x3d260d(0x196):if(_0x204ddf['yamllint']){const _0x586e97=await this['validateYAML'](_0x190b0b,_0x30079c);_0x13efdd[_0x3d260d(0x1ce)](..._0x586e97);}if(_0x204ddf[_0x3d260d(0x1d9)]){const _0x2a81a6=await this[_0x3d260d(0x1ab)](_0x190b0b,_0x3d260d(0x196),_0x30079c);_0x13efdd[_0x3d260d(0x1ce)](..._0x2a81a6);}break;case'terraform':if(_0x204ddf['checkov']){const _0x1d6829=await this[_0x3d260d(0x1ab)](_0x190b0b,_0x3d260d(0x19f),_0x30079c);_0x13efdd['push'](..._0x1d6829);}break;case'package.json':if(_0x204ddf['jsonSchema']){const _0xdf9244=await this['validatePackageJson'](_0x190b0b,_0x30079c);_0x13efdd[_0x3d260d(0x1ce)](..._0xdf9244);}break;case _0x3d260d(0x15c):if(_0x204ddf['jsonSchema']){const _0x40d9b6=await this[_0x3d260d(0x168)](_0x190b0b,_0x30079c);_0x13efdd['push'](..._0x40d9b6);}break;case _0x3d260d(0x187):if(_0x204ddf[_0x3d260d(0x1d3)]){const _0x2e3247=await this['validateYAML'](_0x190b0b,_0x30079c);_0x13efdd['push'](..._0x2e3247);}break;case _0x3d260d(0x16d):const _0x45fc39=await this['validateEnvFile'](_0x190b0b,_0x30079c);_0x13efdd[_0x3d260d(0x1ce)](..._0x45fc39);break;case'yaml':if(_0x204ddf['yamllint']){const _0x4ae7ba=await this['validateYAML'](_0x190b0b,_0x30079c);_0x13efdd[_0x3d260d(0x1ce)](..._0x4ae7ba);}break;default:this['logger']?.[_0x3d260d(0x167)](_0x3d260d(0x17e),{'filePath':_0x190b0b,'fileType':_0x352e67});return[];}return this['normalizeResults'](_0x13efdd);}async[a0_0x1e7674(0x1cd)](_0x3648af,_0x27786f={}){const _0x406b1d=a0_0x1e7674;try{const _0xa2692d=await execAsync(_0x406b1d(0x197)+_0x3648af+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0x22c4c0=JSON[_0x406b1d(0x17b)](_0xa2692d['stdout']);return this[_0x406b1d(0x1c2)](_0x22c4c0,_0x3648af);}catch(_0x549351){if(_0x549351[_0x406b1d(0x1d5)])try{const _0x49e547=JSON['parse'](_0x549351[_0x406b1d(0x1d5)]);return this['parseHadolintResults'](_0x49e547,_0x3648af);}catch(_0x3d06fc){this['logger']?.[_0x406b1d(0x16b)](_0x406b1d(0x1a7),{'error':_0x3d06fc[_0x406b1d(0x1b3)]});}return this[_0x406b1d(0x15d)]?.['error']('hadolint\x20validation\x20failed',{'error':_0x549351[_0x406b1d(0x1b3)]}),[];}}['parseHadolintResults'](_0x3c1308,_0x3b0fdf){const _0xcd075f=a0_0x1e7674,_0x4286c6=[];if(Array[_0xcd075f(0x16e)](_0x3c1308))for(const _0x3de00f of _0x3c1308){_0x4286c6['push']({'file':_0x3b0fdf,'line':_0x3de00f['line']||0x1,'column':_0x3de00f['column']||0x1,'severity':this[_0xcd075f(0x1d6)](_0x3de00f['level']),'rule':_0x3de00f[_0xcd075f(0x1d4)],'message':_0x3de00f[_0xcd075f(0x1b3)],'category':_0xcd075f(0x1a3),'validator':'hadolint'});}return _0x4286c6;}async[a0_0x1e7674(0x172)](_0x55e421,_0x556019={}){const _0x30a80c=a0_0x1e7674;try{const _0x4efb7=await execAsync('yamllint\x20-f\x20parsable\x20\x22'+_0x55e421+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530});return this[_0x30a80c(0x190)](_0x4efb7[_0x30a80c(0x1d5)],_0x55e421);}catch(_0x5c6f85){if(_0x5c6f85['stdout'])return this['parseYamllintResults'](_0x5c6f85['stdout'],_0x55e421);return this[_0x30a80c(0x15d)]?.['error']('yamllint\x20validation\x20failed',{'error':_0x5c6f85[_0x30a80c(0x1b3)]}),[];}}[a0_0x1e7674(0x190)](_0x262647,_0xd6365a){const _0x527429=a0_0x1e7674,_0x4edf39=[],_0x194488=_0x262647[_0x527429(0x1d0)]('\x0a')[_0x527429(0x179)](_0x1a5429=>_0x1a5429['trim']());for(const _0x3c8cd5 of _0x194488){const _0x5a6aa2=_0x3c8cd5['match'](/^(.+?):(\d+):(\d+):\s*\[(\w+)\]\s*(.+?)\s*\((.+?)\)/);if(_0x5a6aa2){const [,_0x3ab82e,_0x27ca33,_0x433616,_0x1caf47,_0x2e9839,_0x126f3c]=_0x5a6aa2;_0x4edf39[_0x527429(0x1ce)]({'file':_0xd6365a,'line':parseInt(_0x27ca33,0xa),'column':parseInt(_0x433616,0xa),'severity':this['mapYamllintSeverity'](_0x1caf47),'rule':_0x126f3c,'message':_0x2e9839,'category':_0x527429(0x162),'validator':'yamllint'});}}return _0x4edf39;}async['validateWithCheckov'](_0x1c9c35,_0xcbe2c9,_0x82952e={}){const _0x37ece1=a0_0x1e7674;try{const _0x552287=await execAsync(_0x37ece1(0x15b)+_0x1c9c35+_0x37ece1(0x19c)+_0xcbe2c9+'\x20--output\x20json\x20--compact',{'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0x26a82a=JSON['parse'](_0x552287[_0x37ece1(0x1d5)]);return this['parseCheckovResults'](_0x26a82a,_0x1c9c35);}catch(_0x549d26){if(_0x549d26['stdout'])try{const _0x50bdc6=JSON[_0x37ece1(0x17b)](_0x549d26['stdout']);return this[_0x37ece1(0x17d)](_0x50bdc6,_0x1c9c35);}catch(_0x93c2b0){this['logger']?.[_0x37ece1(0x16b)](_0x37ece1(0x19b),{'error':_0x93c2b0['message']});}return this[_0x37ece1(0x15d)]?.[_0x37ece1(0x16b)](_0x37ece1(0x1c4),{'error':_0x549d26[_0x37ece1(0x1b3)]}),[];}}[a0_0x1e7674(0x17d)](_0x317c52,_0x215795){const _0x1cfe93=a0_0x1e7674,_0x2835b6=[];if(_0x317c52[_0x1cfe93(0x174)]&&_0x317c52[_0x1cfe93(0x174)]['failed_checks'])for(const _0x4e5e50 of _0x317c52[_0x1cfe93(0x174)]['failed_checks']){_0x2835b6['push']({'file':_0x215795,'line':_0x4e5e50['file_line_range']?_0x4e5e50[_0x1cfe93(0x181)][0x0]:0x1,'column':0x1,'severity':this[_0x1cfe93(0x188)](_0x4e5e50['check_class']),'rule':_0x4e5e50[_0x1cfe93(0x16f)],'message':_0x4e5e50['check_name']||_0x4e5e50['check_id'],'category':_0x1cfe93(0x173),'validator':_0x1cfe93(0x1d9),'remediation':_0x4e5e50['guideline'],'cwe':_0x4e5e50['cwe'],'references':_0x4e5e50[_0x1cfe93(0x17a)]?[_0x4e5e50['guideline']]:[]});}return _0x2835b6;}async['validatePackageJson'](_0x90ef61,_0x341334={}){const _0x692876=a0_0x1e7674;try{const _0x274cdf=(await import('ajv'))['default'],_0x11f126=(await import(_0x692876(0x193)))['default'],_0x3a197d=await a0_0x15bab0['readFile'](_0x90ef61,'utf-8'),_0x5709a6=JSON[_0x692876(0x17b)](_0x3a197d),_0x120b40=new _0x274cdf({'allErrors':!![],'strict':![]});_0x11f126(_0x120b40);const _0x30a2c0={'type':_0x692876(0x18d),'required':[_0x692876(0x16a),_0x692876(0x1b9)],'properties':{'name':{'type':_0x692876(0x1a1),'pattern':_0x692876(0x1b8)},'version':{'type':_0x692876(0x1a1)},'description':{'type':'string'},'main':{'type':'string'},'type':{'type':_0x692876(0x1a1),'enum':['module',_0x692876(0x18a)]},'scripts':{'type':'object'},'dependencies':{'type':'object'},'devDependencies':{'type':_0x692876(0x18d)}},'additionalProperties':!![]},_0x130ad0=_0x120b40[_0x692876(0x182)](_0x30a2c0),_0xa2ce7c=_0x130ad0(_0x5709a6);if(!_0xa2ce7c&&_0x130ad0['errors'])return _0x130ad0['errors']['map'](_0x4ee980=>({'file':_0x90ef61,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x692876(0x1b7)]['ERROR'],'rule':_0x692876(0x1a5),'message':_0x4ee980['instancePath']?_0x4ee980[_0x692876(0x1b5)]+'\x20'+_0x4ee980[_0x692876(0x1b3)]:_0x692876(0x1ad)+_0x4ee980['params'][_0x692876(0x1cf)]+'\x27','category':_0x692876(0x1c9),'validator':_0x692876(0x1a5)}));return[];}catch(_0x22ff53){return this['logger']?.['error']('package.json\x20validation\x20failed',{'error':_0x22ff53[_0x692876(0x1b3)]}),[{'file':_0x90ef61,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['ERROR'],'rule':'json-parse','message':'Invalid\x20JSON:\x20'+_0x22ff53['message'],'category':_0x692876(0x1b6),'validator':'json-parse'}];}}async['validateTsConfig'](_0x5dfbd5,_0x160b63={}){const _0x4b461a=a0_0x1e7674;try{const _0x591187=await a0_0x15bab0[_0x4b461a(0x19e)](_0x5dfbd5,_0x4b461a(0x161)),_0x2d9a81=JSON[_0x4b461a(0x17b)](_0x591187),_0xedc207=[];if(_0x2d9a81[_0x4b461a(0x192)]){const _0xe1d861=_0x2d9a81['compilerOptions'];!_0xe1d861['strict']&&_0xedc207['push']({'file':_0x5dfbd5,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x4b461a(0x1b7)]['WARNING'],'rule':'strict-mode','message':'Consider\x20enabling\x20\x22strict\x22\x20mode\x20for\x20better\x20type\x20safety','category':_0x4b461a(0x1ba),'validator':'tsconfig-validator'}),_0xe1d861['noImplicitAny']===![]&&_0xedc207[_0x4b461a(0x1ce)]({'file':_0x5dfbd5,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x4b461a(0x1b7)][_0x4b461a(0x1d7)],'rule':_0x4b461a(0x1dc),'message':_0x4b461a(0x1a2),'category':_0x4b461a(0x1ba),'validator':_0x4b461a(0x180)});}return _0xedc207;}catch(_0x56edfc){return this['logger']?.[_0x4b461a(0x16b)]('tsconfig.json\x20validation\x20failed',{'error':_0x56edfc[_0x4b461a(0x1b3)]}),[{'file':_0x5dfbd5,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x4b461a(0x1c0)],'rule':'json-parse','message':_0x4b461a(0x1dd)+_0x56edfc[_0x4b461a(0x1b3)],'category':'syntax','validator':'json-parse'}];}}async['validateEnvFile'](_0x569857,_0x44fb01={}){const _0x1bd5d0=a0_0x1e7674;try{const _0x586ced=await a0_0x15bab0[_0x1bd5d0(0x19e)](_0x569857,'utf-8'),_0x5144f3=[],_0x1edbc5=_0x586ced['split']('\x0a'),_0x36a4b3=[{'pattern':/password|passwd|pwd/i,'name':_0x1bd5d0(0x160)},{'pattern':/api[_-]?key/i,'name':_0x1bd5d0(0x169)},{'pattern':/secret/i,'name':'secret'},{'pattern':/token/i,'name':_0x1bd5d0(0x176)},{'pattern':/private[_-]?key/i,'name':_0x1bd5d0(0x19d)},{'pattern':/aws[_-]?access/i,'name':_0x1bd5d0(0x1a0)}];return _0x1edbc5['forEach']((_0x3ee824,_0x204df4)=>{const _0x20580f=_0x1bd5d0,_0x27b2ac=_0x3ee824['trim']();if(!_0x27b2ac||_0x27b2ac['startsWith']('#'))return;if(_0x27b2ac[_0x20580f(0x183)]('=')){const [_0x468ef7,_0x2a28fd]=_0x27b2ac[_0x20580f(0x1d0)]('='),_0x3582d5=_0x468ef7[_0x20580f(0x15f)](),_0x146a24=_0x2a28fd?.[_0x20580f(0x1b4)]()||'',_0x1aba8b=_0x146a24&&_0x146a24!==''&&!_0x146a24['startsWith']('$')&&_0x146a24!==_0x20580f(0x1af)&&_0x146a24!=='changeme'&&_0x146a24['length']>0x5;if(_0x1aba8b)for(const {pattern:_0x176cfa,name:_0xdecd7b}of _0x36a4b3){if(_0x176cfa[_0x20580f(0x191)](_0x3582d5)){_0x5144f3[_0x20580f(0x1ce)]({'file':_0x569857,'line':_0x204df4+0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x20580f(0x1c7)],'rule':'hardcoded-secret','message':'Potential\x20hardcoded\x20'+_0xdecd7b+_0x20580f(0x194),'category':'security','validator':_0x20580f(0x1be),'remediation':_0x20580f(0x1da)});break;}}}}),_0x5144f3;}catch(_0xfdc90d){return this[_0x1bd5d0(0x15d)]?.['error'](_0x1bd5d0(0x1d8),{'error':_0xfdc90d[_0x1bd5d0(0x1b3)]}),[];}}[a0_0x1e7674(0x171)](_0x5e9aee){const _0x2531df=a0_0x1e7674,_0x3d48d0=a0_0x3f96d7['basename'](_0x5e9aee)['toLowerCase'](),_0x1b7b40=a0_0x3f96d7['dirname'](_0x5e9aee);if(_0x3d48d0===_0x2531df(0x1a3))return'dockerfile';if(_0x3d48d0==='docker-compose.yml'||_0x3d48d0==='docker-compose.yaml')return'docker-compose';if(_0x3d48d0==='package.json')return _0x2531df(0x1d1);if(_0x3d48d0==='tsconfig.json')return'tsconfig.json';if(_0x3d48d0===_0x2531df(0x18c)||_0x3d48d0[_0x2531df(0x17c)](_0x2531df(0x18c)))return _0x2531df(0x16d);if(_0x1b7b40[_0x2531df(0x183)](_0x2531df(0x198)))return'github-actions';if(_0x1b7b40[_0x2531df(0x183)]('kubernetes')||_0x1b7b40['includes']('k8s'))return _0x2531df(0x196);const _0x4043d4=a0_0x3f96d7['extname'](_0x5e9aee)['toLowerCase']();if(_0x4043d4===_0x2531df(0x1b2)||_0x4043d4===_0x2531df(0x1b0))return'terraform';if(_0x4043d4===_0x2531df(0x19a)||_0x4043d4==='.yaml')return _0x2531df(0x162);if(_0x4043d4===_0x2531df(0x18e))return'json';return _0x2531df(0x1a9);}['normalizeResults'](_0x4b95d1){const _0x53b18d=a0_0x1e7674;return _0x4b95d1[_0x53b18d(0x1c8)](_0x1ea8d3=>({'file':_0x1ea8d3['file'],'line':_0x1ea8d3[_0x53b18d(0x1a8)]||0x1,'column':_0x1ea8d3['column']||0x1,'severity':_0x1ea8d3['severity']||STATIC_ANALYSIS[_0x53b18d(0x1b7)][_0x53b18d(0x1d7)],'rule':_0x1ea8d3['rule']||_0x53b18d(0x1a9),'message':_0x1ea8d3['message']||_0x53b18d(0x1c6),'category':_0x1ea8d3['category']||'validation','validator':_0x1ea8d3['validator'],'cwe':_0x1ea8d3[_0x53b18d(0x199)]||null,'remediation':_0x1ea8d3[_0x53b18d(0x1cc)]||null,'references':_0x1ea8d3[_0x53b18d(0x177)]||[]}));}[a0_0x1e7674(0x1d6)](_0x4f884f){const _0x338f91=a0_0x1e7674,_0x57f33a={'error':STATIC_ANALYSIS[_0x338f91(0x1b7)][_0x338f91(0x1c0)],'warning':STATIC_ANALYSIS[_0x338f91(0x1b7)][_0x338f91(0x1d7)],'info':STATIC_ANALYSIS['SEVERITY'][_0x338f91(0x1c1)],'style':STATIC_ANALYSIS[_0x338f91(0x1b7)]['INFO']};return _0x57f33a[_0x4f884f?.['toLowerCase']()]||STATIC_ANALYSIS['SEVERITY']['WARNING'];}['mapYamllintSeverity'](_0x175127){const _0x5cf1aa=a0_0x1e7674,_0x55f7ac={'error':STATIC_ANALYSIS[_0x5cf1aa(0x1b7)][_0x5cf1aa(0x1c0)],'warning':STATIC_ANALYSIS['SEVERITY'][_0x5cf1aa(0x1d7)]};return _0x55f7ac[_0x175127?.['toLowerCase']()]||STATIC_ANALYSIS['SEVERITY']['WARNING'];}['mapCheckovSeverity'](_0x441426){const _0x21f3b6=a0_0x1e7674;return STATIC_ANALYSIS[_0x21f3b6(0x1b7)]['ERROR'];}async[a0_0x1e7674(0x15e)](){const _0x30af31=a0_0x1e7674,_0x321d39=await this['detectAvailableValidators']();return{'validators':_0x321d39,'recommendations':this[_0x30af31(0x185)](_0x321d39)};}['getInstallRecommendations'](_0x5da78f){const _0xef8caf=a0_0x1e7674,_0x4a32bb=[];return!_0x5da78f['checkov']&&_0x4a32bb[_0xef8caf(0x1ce)]({'validator':_0xef8caf(0x1d9),'reason':'Infrastructure\x20as\x20Code\x20security\x20scanning\x20(Docker,\x20Kubernetes,\x20Terraform)','install':'pip\x20install\x20checkov','priority':'high'}),!_0x5da78f['hadolint']&&_0x4a32bb[_0xef8caf(0x1ce)]({'validator':_0xef8caf(0x175),'reason':_0xef8caf(0x1c3),'install':'Download from https://github.com/hadolint/hadolint/releases','priority':'high'}),!_0x5da78f['yamllint']&&_0x4a32bb['push']({'validator':'yamllint','reason':_0xef8caf(0x1b1),'install':_0xef8caf(0x18f),'priority':'medium'}),!_0x5da78f['jsonSchema']&&_0x4a32bb[_0xef8caf(0x1ce)]({'validator':_0xef8caf(0x184),'reason':_0xef8caf(0x164),'install':_0xef8caf(0x195),'priority':_0xef8caf(0x1cb)}),_0x4a32bb;}}function a0_0x3f8e(){const _0x186fbe=['z3vPzgvSAw5L','CgfYC2u','zw5KC1DPDgG','CgfYC2vdAgvJA292uMvZDwX0CW','vw5RBM93BIbJB25MAwCGzMLSzsb0ExbL','ndG5otaWy1bqven5','DhnJB25MAwCTDMfSAwrHDg9Y','zMLSzv9SAw5Lx3jHBMDL','y29TCgLSzq','Aw5JBhvKzxm','ywP2icHku09oifnJAgvTysK','z2v0sw5ZDgfSBfjLy29TBwvUzgf0Aw9UCW','nduWndeWBK5Jyu5Q','z2L0AhvIlwfJDgLVBNm','BwfWq2HLy2TVDLnLDMvYAxr5','mti3nJiZndrpyKLXu08','y29TBw9UANm','ywP2','lMvUDG','B2jQzwn0','lMPZB24','CgLWigLUC3rHBgWGEwfTBgXPBNq','CgfYC2vzyw1SBgLUDfjLC3vSDhm','DgvZDa','y29TCgLSzxjpChrPB25Z','ywP2lwzVCM1HDhm','igrLDgvJDgvKigLUic5LBNyGzMLSzq','BNbTigLUC3rHBgWGywP2igfQDI1MB3jTyxrZ','A3vIzxjUzxrLCW','AgfKB2XPBNqGls1MB3jTyxqGANnVBIaI','lMDPDgH1yI93B3jRzMXVD3m','y3DL','lNLTBa','rMfPBgvKihrVihbHCNnLignOzwnRB3yGB3v0Chv0','iIaTlwzYyw1LD29YAYa','ChjPDMf0zsbRzxK','CMvHzezPBgu','DgvYCMfMB3jT','qvDtignYzwrLBNrPywXZ','C3rYAw5N','rgLZywjSAw5Nig5Vsw1WBgLJAxrbBNKGCMvKDwnLCYb0ExbLihnHzMv0Eq','zg9JA2vYzMLSzq','C2nHBM5LCKnHy2HL','ANnVBI1Zy2HLBwe','EwfTBgXPBNqGls12zxjZAw9U','rMfPBgvKihrVihbHCNnLigHHzg9SAw50ig91Dhb1Da','BgLUzq','Dw5RBM93BG','AgfKB2XPBNqGBM90igf2ywLSywjSzq','DMfSAwrHDgvxAxrOq2HLy2TVDG','EwfTBgXPBNqGBM90igf2ywLSywjSzq','BxvZDcbOyxzLihjLCxvPCMvKihbYB3bLCNr5icC','zgvIDwC','Ew91CI1RzxKTAgvYzq','lNrMDMfYCW','wufntcbMAwXLihzHBgLKyxrPB24','lNrM','BwvZC2fNzq','DhjPBq','Aw5ZDgfUy2vqyxrO','C3LUDgf4','u0vwrvjjvfK','xIG/oKbBys16mc05lx5Dw2eTEJaTos0Ux35DkI8Pp1THlxOWltKTFL1Bys16mc05ls5FFL0Qja','DMvYC2LVBG','yMvZDc1WCMfJDgLJzq','mJu4nZKYner3z3D4Aq','DMfSAwrHDgu','mtq4otq2oxLbyxj2Ca','zw52lxzHBgLKyxrVCG','otm3nte1mgn3vfLNwq','rvjst1i','su5gtW','CgfYC2viywrVBgLUDfjLC3vSDhm','rg9JA2vYzMLSzsbSAw50Aw5NigfUzcbIzxn0ihbYywn0AwnLCW','y2HLy2TVDIb2ywXPzgf0Aw9UigzHAwXLza','sLnptIbty2HLBweGDMfSAwrHDgLVBIbHDMfPBgfIBgu','vMfSAwrHDgLVBIbPC3n1zsbKzxrLy3rLza','q1jjveLdquW','BwfW','DMfSAwrHDgLVBG','vMfSAwrHDgLUzYbJB25MAwCGzMLSzq','BwvKAxvT','CMvTzwrPyxrPB24','DMfSAwrHDgveB2nRzxjMAwXL','ChvZAa','BwLZC2LUz1bYB3bLCNr5','C3bSAxq','CgfJA2fNzs5QC29U','AgfKB2XPBNqGzgv0zwn0zwq','EwfTBgXPBNq','y29Kzq','C3rKB3v0','BwfWsgfKB2XPBNrtzxzLCML0Eq','v0fstKLorW','lMvUDIb2ywXPzgf0Aw9UigzHAwXLza','y2HLy2TVDG','vxnLigvUDMLYB25Tzw50lxnWzwnPzMLJic5LBNyGzMLSzxmGyw5KigfKzcaUzw52ihrVic5NAxrPz25VCMu','ANnVBLnJAgvTyq','BM8TAw1WBgLJAxqTyw55','sw52ywXPzcbku09ooIa','y2HLy2TVDIaTzIaI','DhnJB25MAwCUANnVBG','Bg9Nz2vY','z2v0vMfSAwrHDg9Yu3rHDhvZ','Dg9mB3DLCKnHC2u','CgfZC3DVCMq','DxrMltG','EwfTBa','mZy5zwLMreLL','sLnptIbJB25MAwD1CMf0Aw9UihzHBgLKyxrPB24','yxzHAwXHyMXLu2nHBM5LCNm','mtu1mZG3n2H3uNf4sW','D2fYBG','DMfSAwrHDgvuC0nVBMzPzW','qvbjigTLEq','BMfTzq','zxjYB3i','n2P1q2ngzW','zw52','AxnbCNjHEq','y2HLy2TFAwq','EwfTBgXPBNqGzgv0zwn0zwq','zgv0zwn0rMLSzvr5Cgu','DMfSAwrHDgvzqu1m','C2vJDxjPDhK','CMvZDwX0CW','AgfKB2XPBNq','Dg9Rzw4','CMvMzxjLBMnLCW','mLHgB1Hftq','zMLSDgvY'];a0_0x3f8e=function(){return _0x186fbe;};return a0_0x3f8e();}export default ConfigValidator;
1
+ const a0_0x21897e=a0_0x1799;function a0_0x3279(){const _0x266021=['Bgv2zwW','ywP2lwzVCM1HDhm','ndKWnJa4mhHizLPLrW','zxH0BMfTzq','rMfPBgvKihrVihbHCNnLigHHzg9SAw50ig91Dhb1Da','xIG/oKbBys16mc05lx5Dw2eTEJaTos0Ux35DkI8Pp1THlxOWltKTFL1Bys16mc05ls5FFL0Qja','CMvTzwrPyxrPB24','Aw5JBhvKzxm','v0fstKLorW','DMvYC2LVBG','mJqYmdjTzuL2z0S','sw52ywXPzcbku09ooIa','EwfTBgXPBNq','u0vwrvjjvfK','Bw9KDwXL','DMfSAwrHDgvxAxrOq2HLy2TVDG','zgvIDwC','Ew91CI1RzxKTAgvYzq','zxjYB3i','ChjPDMf0zsbRzxK','sLnptIbty2HLBweGDMfSAwrHDgLVBIbHDMfPBgfIBgu','lNrM','sLnptIbJB25MAwD1CMf0Aw9UihzHBgLKyxrPB24','zg9JA2vYzMLSzq','ANnVBLnJAgvTyq','z2L0AhvIlwfJDgLVBNm','y2HLy2TVDIbUB3qGyxzHAwXHyMXL','BMfTzq','DhnJB25MAwCTDMfSAwrHDg9Y','Bwf0y2G','rgLZywjSAw5Nig5Vsw1WBgLJAxrbBNKGCMvKDwnLCYb0ExbLihnHzMv0Eq','ywP2icHku09oifnJAgvTysK','DMfSAwrHDgLVBG','y29SDw1U','su5gtW','zMLSDgvY','A3vIzxjUzxrLCW','AgfYzgnVzgvKlxnLy3jLDa','Bg9Nz2vY','BxvZDcbOyxzLihjLCxvPCMvKihbYB3bLCNr5icC','C3LUDgf4','D2fYBG','CMvHzezPBgu','C2vJCMv0','DMfSAwrHDgvuC0nVBMzPzW','Dw5RBM93BG','CgfYyw1Z','mti4D1PWquH3','ANnVBG','CgfYC2viywrVBgLUDfjLC3vSDhm','zgv0zwn0qxzHAwXHyMXLvMfSAwrHDg9YCW','mZvSzfzztui','AgfKB2XPBNqGDMfSAwrHDgLVBIbMywLSzwq','ANnVBI1WyxjZzq','C3rHCNrZv2L0Aa','z3vPzgvSAw5L','CgLWigLUC3rHBgWGy2HLy2TVDG','C3rYAwn0lw1Vzgu','zgLYBMfTzq','mtmZodG4nJHzwhf1zui','zxjYB3jZ','AgfKB2XPBNqGBM90igf2ywLSywjSzq','lMvUDG','DMfSAwrHDgveB2nRzxjMAwXL','BgLUzq','BM9YBwfSAxPLuMvZDwX0CW','ChvZAa','yxzHAwXHyMXLu2nHBM5LCNm','vxnLigvUDMLYB25Tzw50lxnWzwnPzMLJic5LBNyGzMLSzxmGyw5KigfKzcaUzw52ihrVic5NAxrPz25VCMu','y2HLy2TFAwq','rg9JA2vYzMLSzsbSAw50Aw5NigfUzcbIzxn0ihbYywn0AwnLCW','iIaTlwzYyw1LD29YAYa','C3bSAxq','zgvMyxvSDa','zgv0zwn0rMLSzvr5Cgu','DhnJB25MAwCUANnVBG','C2v2zxjPDhK','DMfSAwrHDgvfBNzgAwXL','CgfYC2u','zM9YrwfJAa','z2v0vMfSAwrHDg9Yu3rHDhvZ','zMLSzv9SAw5Lx3jHBMDL','AgfKB2XPBNq','odKZmZuYquzsDxbo','BwvZC2fNzq','q1jjveLdquW','Aw5ZDgfUy2vqyxrO','C3rYAw5N','ntiWodi3ovPkB3H0qq','CgfJA2fNzs5QC29U','yMfZzw5HBwu','zg9JA2vYlwnVBxbVC2uUEwfTBa','y29TCgLSzq','lNrMDMfYCW','lMDPDgH1yI93B3jRzMXVD3m','zg9JA2vYlwnVBxbVC2uUEw1S','DMfSAwrHDgvqywnRywDLsNnVBG','CgfYC2vzyw1SBgLUDfjLC3vSDhm','zg9JA2vYlwnVBxbVC2u','lMvUDIb2ywXPzgf0Aw9UigzHAwXLza','BgvUz3rO','Dg9mB3DLCKnHC2u','CNvSzq','zw52','y2HLy2TVDG','lNLTBa','AgfKB2XPBNqGls12zxjZAw9U','ywP2','C3rKB3v0','mZi1nNvstwLcEG','zMLSzq','yMvZDc1WCMfJDgLJzq','mta0nduWBNvYv2HH','DxrMltG','ANnVBI1Zy2HLBwe','y29TCgLSzxjpChrPB25Z','BwvKAxvT','rvjst1i','qvbjigTLEq','DMfSAwrHDgvzqu1m','ntaYnZzRB1DpDwS','B2jQzwn0','EwfTBa','mZvRBNLksvq','AZHZ','CgfYC2vdAgvJA292uMvZDwX0CW','q29UC2LKzxiGzw5HyMXPBMCGiNn0CMLJDciGBw9KzsbMB3iGyMv0DgvYihr5CguGC2fMzxr5','DMfSAwrHDg9Y','EwfTBgXPBNqGDMfSAwrHDgLVBIbMywLSzwq','vw5RBM93BIbJB25MAwCGzMLSzsb0ExbL'];a0_0x3279=function(){return _0x266021;};return a0_0x3279();}(function(_0x195427,_0x328d99){const _0x4a9546=a0_0x1799,_0x106ac1=_0x195427();while(!![]){try{const _0x43d96c=parseInt(_0x4a9546(0xd7))/0x1*(-parseInt(_0x4a9546(0xb2))/0x2)+-parseInt(_0x4a9546(0x7e))/0x3+parseInt(_0x4a9546(0x9e))/0x4*(-parseInt(_0x4a9546(0xa1))/0x5)+-parseInt(_0x4a9546(0xaa))/0x6+-parseInt(_0x4a9546(0xdb))/0x7*(-parseInt(_0x4a9546(0x79))/0x8)+parseInt(_0x4a9546(0xe3))/0x9+parseInt(_0x4a9546(0x96))/0xa*(parseInt(_0x4a9546(0x93))/0xb);if(_0x43d96c===_0x328d99)break;else _0x106ac1['push'](_0x106ac1['shift']());}catch(_0x363580){_0x106ac1['push'](_0x106ac1['shift']());}}}(a0_0x3279,0xe7359));function a0_0x1799(_0x4b25dc,_0x3a4760){_0x4b25dc=_0x4b25dc-0x79;const _0x3279c0=a0_0x3279();let _0x1799c7=_0x3279c0[_0x4b25dc];if(a0_0x1799['tBtHDJ']===undefined){var _0x50ae62=function(_0x281fe8){const _0x3afff5='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5a86a5='',_0x2bc31b='';for(let _0x4ad0b6=0x0,_0x1d8df1,_0x37fbb6,_0x24c547=0x0;_0x37fbb6=_0x281fe8['charAt'](_0x24c547++);~_0x37fbb6&&(_0x1d8df1=_0x4ad0b6%0x4?_0x1d8df1*0x40+_0x37fbb6:_0x37fbb6,_0x4ad0b6++%0x4)?_0x5a86a5+=String['fromCharCode'](0xff&_0x1d8df1>>(-0x2*_0x4ad0b6&0x6)):0x0){_0x37fbb6=_0x3afff5['indexOf'](_0x37fbb6);}for(let _0x593b77=0x0,_0x2e813c=_0x5a86a5['length'];_0x593b77<_0x2e813c;_0x593b77++){_0x2bc31b+='%'+('00'+_0x5a86a5['charCodeAt'](_0x593b77)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2bc31b);};a0_0x1799['ZVibeD']=_0x50ae62,a0_0x1799['qCeIzJ']={},a0_0x1799['tBtHDJ']=!![];}const _0x474b30=_0x3279c0[0x0],_0x56c5cd=_0x4b25dc+_0x474b30,_0x39f755=a0_0x1799['qCeIzJ'][_0x56c5cd];return!_0x39f755?(_0x1799c7=a0_0x1799['ZVibeD'](_0x1799c7),a0_0x1799['qCeIzJ'][_0x56c5cd]=_0x1799c7):_0x1799c7=_0x39f755,_0x1799c7;}import{exec}from'child_process';import{promisify}from'util';import a0_0x5a86a5 from'path';import a0_0x2bc31b from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';const execAsync=promisify(exec);class ConfigValidator{constructor(_0x4ad0b6=null){const _0x1acc4a=a0_0x1799;this[_0x1acc4a(0xce)]=_0x4ad0b6,this[_0x1acc4a(0xeb)]=null,this['scannerCache']=new Map();}async[a0_0x21897e(0xda)](){const _0xde15f4=a0_0x21897e;if(this['availableScanners']!==null)return this[_0xde15f4(0xeb)];const _0x1d8df1={'checkov':![],'hadolint':![],'yamllint':![],'jsonSchema':![]};try{await execAsync('checkov\x20--version',{'timeout':0x1388}),_0x1d8df1['checkov']=!![],this['logger']?.['debug']('checkov\x20detected');}catch(_0x37fbb6){this['logger']?.['debug'](_0xde15f4(0xc2),{'error':_0x37fbb6[_0xde15f4(0x7a)]});}try{await execAsync(_0xde15f4(0x90),{'timeout':0x1388}),_0x1d8df1['hadolint']=!![],this['logger']?.['debug']('hadolint\x20detected');}catch(_0x24c547){this['logger']?.['debug'](_0xde15f4(0xe5),{'error':_0x24c547[_0xde15f4(0x7a)]});}try{await execAsync('yamllint\x20--version',{'timeout':0x1388}),_0x1d8df1[_0xde15f4(0xb4)]=!![],this[_0xde15f4(0xce)]?.[_0xde15f4(0xb8)]('yamllint\x20detected');}catch(_0x593b77){this[_0xde15f4(0xce)]?.['debug']('yamllint\x20not\x20available',{'error':_0x593b77['message']});}try{await import('ajv'),_0x1d8df1[_0xde15f4(0xc0)]=!![],this[_0xde15f4(0xce)]?.[_0xde15f4(0xb8)](_0xde15f4(0xbc));}catch(_0x2e813c){this['logger']?.[_0xde15f4(0xb8)]('ajv\x20not\x20available',{'error':_0x2e813c['message']});}return this[_0xde15f4(0xeb)]=_0x1d8df1,_0x1d8df1;}async['validate'](_0x3348c6,_0x5eeb13={}){const _0x1f6548=a0_0x21897e,_0x3a8352=[],_0x4893dd=await this['detectAvailableValidators'](),_0x3ae132=this[_0x1f6548(0xf2)](_0x3348c6);this[_0x1f6548(0xce)]?.['debug']('Validating\x20config\x20file',{'filePath':_0x3348c6,'fileType':_0x3ae132});switch(_0x3ae132){case'dockerfile':if(_0x4893dd['hadolint']){const _0x4ab7b9=await this[_0x1f6548(0xe7)](_0x3348c6,_0x5eeb13);_0x3a8352['push'](..._0x4ab7b9);}if(_0x4893dd['checkov']){const _0x2279b6=await this['validateWithCheckov'](_0x3348c6,'dockerfile',_0x5eeb13);_0x3a8352[_0x1f6548(0xea)](..._0x2279b6);}break;case _0x1f6548(0x88):if(_0x4893dd['yamllint']){const _0x729b56=await this['validateYAML'](_0x3348c6,_0x5eeb13);_0x3a8352['push'](..._0x729b56);}if(_0x4893dd['checkov']){const _0x3e2d04=await this['validateWithCheckov'](_0x3348c6,'docker_compose',_0x5eeb13);_0x3a8352[_0x1f6548(0xea)](..._0x3e2d04);}break;case _0x1f6548(0xcc):if(_0x4893dd['yamllint']){const _0x159f0d=await this[_0x1f6548(0x9d)](_0x3348c6,_0x5eeb13);_0x3a8352[_0x1f6548(0xea)](..._0x159f0d);}if(_0x4893dd['checkov']){const _0x44a242=await this['validateWithCheckov'](_0x3348c6,_0x1f6548(0xcc),_0x5eeb13);_0x3a8352[_0x1f6548(0xea)](..._0x44a242);}break;case'terraform':if(_0x4893dd['checkov']){const _0xdd9c75=await this['validateWithCheckov'](_0x3348c6,'terraform',_0x5eeb13);_0x3a8352['push'](..._0xdd9c75);}break;case'package.json':if(_0x4893dd[_0x1f6548(0xc0)]){const _0x210b99=await this[_0x1f6548(0x86)](_0x3348c6,_0x5eeb13);_0x3a8352['push'](..._0x210b99);}break;case _0x1f6548(0xf3):if(_0x4893dd[_0x1f6548(0xc0)]){const _0x777d80=await this[_0x1f6548(0xd4)](_0x3348c6,_0x5eeb13);_0x3a8352[_0x1f6548(0xea)](..._0x777d80);}break;case _0x1f6548(0xc1):if(_0x4893dd['yamllint']){const _0x1e18f8=await this[_0x1f6548(0x9d)](_0x3348c6,_0x5eeb13);_0x3a8352[_0x1f6548(0xea)](..._0x1e18f8);}break;case'env':const _0xa975e9=await this[_0x1f6548(0xf5)](_0x3348c6,_0x5eeb13);_0x3a8352[_0x1f6548(0xea)](..._0xa975e9);break;case'yaml':if(_0x4893dd['yamllint']){const _0x37ff46=await this['validateYAML'](_0x3348c6,_0x5eeb13);_0x3a8352['push'](..._0x37ff46);}break;default:this[_0x1f6548(0xce)]?.[_0x1f6548(0xd1)](_0x1f6548(0xa7),{'filePath':_0x3348c6,'fileType':_0x3ae132});return[];}return this['normalizeResults'](_0x3a8352);}async[a0_0x21897e(0xe7)](_0x1766ab,_0x108401={}){const _0x1e7f24=a0_0x21897e;try{const _0x3edb1f=await execAsync('hadolint\x20--format\x20json\x20\x22'+_0x1766ab+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0x21a299=JSON[_0x1e7f24(0xf6)](_0x3edb1f[_0x1e7f24(0x92)]);return this['parseHadolintResults'](_0x21a299,_0x1766ab);}catch(_0xf0042a){if(_0xf0042a['stdout'])try{const _0x2f9cb5=JSON['parse'](_0xf0042a['stdout']);return this[_0x1e7f24(0xd9)](_0x2f9cb5,_0x1766ab);}catch(_0x33c7dc){this['logger']?.[_0x1e7f24(0xba)](_0x1e7f24(0xac),{'error':_0x33c7dc['message']});}return this[_0x1e7f24(0xce)]?.['error'](_0x1e7f24(0xdc),{'error':_0xf0042a['message']}),[];}}[a0_0x21897e(0xd9)](_0x1dc0e0,_0x5d224f){const _0x353c8a=a0_0x21897e,_0x53ad51=[];if(Array['isArray'](_0x1dc0e0))for(const _0x1aff5d of _0x1dc0e0){_0x53ad51[_0x353c8a(0xea)]({'file':_0x5d224f,'line':_0x1aff5d[_0x353c8a(0xe8)]||0x1,'column':_0x1aff5d[_0x353c8a(0xc9)]||0x1,'severity':this['mapHadolintSeverity'](_0x1aff5d[_0x353c8a(0xa8)]),'rule':_0x1aff5d['code'],'message':_0x1aff5d['message'],'category':_0x353c8a(0xbf),'validator':_0x353c8a(0xfa)});}return _0x53ad51;}async['validateYAML'](_0x149b5a,_0x1b9eb0={}){const _0x4c305d=a0_0x21897e;try{const _0x22309f=await execAsync('yamllint\x20-f\x20parsable\x20\x22'+_0x149b5a+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530});return this[_0x4c305d(0x87)](_0x22309f[_0x4c305d(0x92)],_0x149b5a);}catch(_0x5d919d){if(_0x5d919d[_0x4c305d(0x92)])return this['parseYamllintResults'](_0x5d919d['stdout'],_0x149b5a);return this[_0x4c305d(0xce)]?.[_0x4c305d(0xba)](_0x4c305d(0xa6),{'error':_0x5d919d[_0x4c305d(0x7a)]}),[];}}[a0_0x21897e(0x87)](_0x4c22c8,_0x356507){const _0x58a741=a0_0x21897e,_0x272c5a=[],_0x4675ef=_0x4c22c8['split']('\x0a')[_0x58a741(0xcb)](_0x3baf47=>_0x3baf47['trim']());for(const _0x1f8fad of _0x4675ef){const _0xfc9d80=_0x1f8fad[_0x58a741(0xc5)](/^(.+?):(\d+):(\d+):\s*\[(\w+)\]\s*(.+?)\s*\((.+?)\)/);if(_0xfc9d80){const [,_0x627f1,_0x12d9ec,_0x2b5ba5,_0x4f34dc,_0x51f1f6,_0x46e7a9]=_0xfc9d80;_0x272c5a['push']({'file':_0x356507,'line':parseInt(_0x12d9ec,0xa),'column':parseInt(_0x2b5ba5,0xa),'severity':this['mapYamllintSeverity'](_0x4f34dc),'rule':_0x46e7a9,'message':_0x51f1f6,'category':_0x58a741(0xa0),'validator':_0x58a741(0xb4)});}}return _0x272c5a;}async[a0_0x21897e(0xb7)](_0x136d01,_0x5600ab,_0x49e33e={}){const _0x128e12=a0_0x21897e;try{const _0x4969af=await execAsync('checkov\x20-f\x20\x22'+_0x136d01+_0x128e12(0xef)+_0x5600ab+'\x20--output\x20json\x20--compact',{'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0xb725da=JSON[_0x128e12(0xf6)](_0x4969af['stdout']);return this[_0x128e12(0xa3)](_0xb725da,_0x136d01);}catch(_0x425cd7){if(_0x425cd7[_0x128e12(0x92)])try{const _0x4228e6=JSON[_0x128e12(0xf6)](_0x425cd7['stdout']);return this['parseCheckovResults'](_0x4228e6,_0x136d01);}catch(_0x312dbf){this[_0x128e12(0xce)]?.['error']('Failed\x20to\x20parse\x20checkov\x20output',{'error':_0x312dbf[_0x128e12(0x7a)]});}return this[_0x128e12(0xce)]?.['error']('checkov\x20validation\x20failed',{'error':_0x425cd7[_0x128e12(0x7a)]}),[];}}['parseCheckovResults'](_0x5c3367,_0xb473eb){const _0x28c506=a0_0x21897e,_0x15f979=[];if(_0x5c3367['results']&&_0x5c3367['results']['failed_checks'])for(const _0x594e32 of _0x5c3367['results']['failed_checks']){_0x15f979['push']({'file':_0xb473eb,'line':_0x594e32[_0x28c506(0xf9)]?_0x594e32[_0x28c506(0xf9)][0x0]:0x1,'column':0x1,'severity':this['mapCheckovSeverity'](_0x594e32['check_class']),'rule':_0x594e32[_0x28c506(0xed)],'message':_0x594e32['check_name']||_0x594e32['check_id'],'category':'security','validator':'checkov','remediation':_0x594e32['guideline'],'cwe':_0x594e32['cwe'],'references':_0x594e32['guideline']?[_0x594e32[_0x28c506(0xdf)]]:[]});}return _0x15f979;}async['validatePackageJson'](_0xdb1ea9,_0x1ffce4={}){const _0x3bf0d8=a0_0x21897e;try{const _0xec12a1=(await import(_0x3bf0d8(0x91)))[_0x3bf0d8(0xf1)],_0x2fee13=(await import(_0x3bf0d8(0xa9)))['default'],_0x371f8d=await a0_0x2bc31b['readFile'](_0xdb1ea9,'utf-8'),_0x4ef996=JSON['parse'](_0x371f8d),_0x392c25=new _0xec12a1({'allErrors':!![],'strict':![]});_0x2fee13(_0x392c25);const _0x8e703e={'type':_0x3bf0d8(0x9f),'required':[_0x3bf0d8(0xc3),_0x3bf0d8(0xb1)],'properties':{'name':{'type':_0x3bf0d8(0x7d),'pattern':_0x3bf0d8(0xad)},'version':{'type':'string'},'description':{'type':_0x3bf0d8(0x7d)},'main':{'type':'string'},'type':{'type':_0x3bf0d8(0x7d),'enum':[_0x3bf0d8(0xb6),'commonjs']},'scripts':{'type':_0x3bf0d8(0x9f)},'dependencies':{'type':'object'},'devDependencies':{'type':'object'}},'additionalProperties':!![]},_0x369a10=_0x392c25[_0x3bf0d8(0x82)](_0x8e703e),_0x56cbfd=_0x369a10(_0x4ef996);if(!_0x56cbfd&&_0x369a10[_0x3bf0d8(0xe4)])return _0x369a10['errors']['map'](_0x5a10e6=>({'file':_0xdb1ea9,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x3bf0d8(0x9b)],'rule':'json-schema','message':_0x5a10e6[_0x3bf0d8(0x7c)]?_0x5a10e6['instancePath']+'\x20'+_0x5a10e6[_0x3bf0d8(0x7a)]:_0x3bf0d8(0xcf)+_0x5a10e6[_0x3bf0d8(0xd6)]['missingProperty']+'\x27','category':_0x3bf0d8(0xc8),'validator':_0x3bf0d8(0x98)}));return[];}catch(_0x46af66){return this[_0x3bf0d8(0xce)]?.[_0x3bf0d8(0xba)]('package.json\x20validation\x20failed',{'error':_0x46af66[_0x3bf0d8(0x7a)]}),[{'file':_0xdb1ea9,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x3bf0d8(0xb5)]['ERROR'],'rule':_0x3bf0d8(0xdd),'message':_0x3bf0d8(0xb3)+_0x46af66['message'],'category':_0x3bf0d8(0xd0),'validator':_0x3bf0d8(0xdd)}];}}async['validateTsConfig'](_0x1b879d,_0x395c08={}){const _0x9947d4=a0_0x21897e;try{const _0x37e48f=await a0_0x2bc31b[_0x9947d4(0xd2)](_0x1b879d,_0x9947d4(0x97)),_0x50e3a9=JSON[_0x9947d4(0xf6)](_0x37e48f),_0x5e2302=[];if(_0x50e3a9['compilerOptions']){const _0x38a9cd=_0x50e3a9[_0x9947d4(0x99)];!_0x38a9cd['strict']&&_0x5e2302[_0x9947d4(0xea)]({'file':_0x1b879d,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x9947d4(0xb5)]['WARNING'],'rule':_0x9947d4(0xe1),'message':_0x9947d4(0xa4),'category':_0x9947d4(0x95),'validator':'tsconfig-validator'}),_0x38a9cd['noImplicitAny']===![]&&_0x5e2302['push']({'file':_0x1b879d,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x9947d4(0xb5)][_0x9947d4(0xb0)],'rule':'no-implicit-any','message':_0x9947d4(0xc6),'category':_0x9947d4(0x95),'validator':_0x9947d4(0xc4)});}return _0x5e2302;}catch(_0x229516){return this[_0x9947d4(0xce)]?.[_0x9947d4(0xba)]('tsconfig.json\x20validation\x20failed',{'error':_0x229516['message']}),[{'file':_0x1b879d,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x9947d4(0x9b)],'rule':_0x9947d4(0xdd),'message':_0x9947d4(0xb3)+_0x229516['message'],'category':_0x9947d4(0xd0),'validator':_0x9947d4(0xdd)}];}}async['validateEnvFile'](_0x23f25b,_0x21b542={}){const _0x38d221=a0_0x21897e;try{const _0x249ea1=await a0_0x2bc31b['readFile'](_0x23f25b,'utf-8'),_0x34790f=[],_0x7dafbb=_0x249ea1['split']('\x0a'),_0x11ef2c=[{'pattern':/password|passwd|pwd/i,'name':'password'},{'pattern':/api[_-]?key/i,'name':_0x38d221(0x9c)},{'pattern':/secret/i,'name':_0x38d221(0xd3)},{'pattern':/token/i,'name':'token'},{'pattern':/private[_-]?key/i,'name':_0x38d221(0xbb)},{'pattern':/aws[_-]?access/i,'name':'AWS\x20credentials'}];return _0x7dafbb[_0x38d221(0xf7)]((_0x2fdb2b,_0x488640)=>{const _0x549e80=_0x38d221,_0x23f96a=_0x2fdb2b['trim']();if(!_0x23f96a||_0x23f96a[_0x549e80(0xde)]('#'))return;if(_0x23f96a[_0x549e80(0xaf)]('=')){const [_0x1ae321,_0x427781]=_0x23f96a[_0x549e80(0xf0)]('='),_0x55ac99=_0x1ae321[_0x549e80(0x8b)](),_0x3dcee9=_0x427781?.['trim']()||'',_0x1d756b=_0x3dcee9&&_0x3dcee9!==''&&!_0x3dcee9['startsWith']('$')&&_0x3dcee9!==_0x549e80(0xb9)&&_0x3dcee9!=='changeme'&&_0x3dcee9[_0x549e80(0x8a)]>0x5;if(_0x1d756b)for(const {pattern:_0x6d6947,name:_0x130d44}of _0x11ef2c){if(_0x6d6947['test'](_0x55ac99)){_0x34790f[_0x549e80(0xea)]({'file':_0x23f25b,'line':_0x488640+0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x549e80(0xb5)][_0x549e80(0x7b)],'rule':_0x549e80(0xcd),'message':'Potential\x20hardcoded\x20'+_0x130d44+'\x20detected\x20in\x20.env\x20file','category':'security','validator':'env-validator','remediation':_0x549e80(0xec)});break;}}}}),_0x34790f;}catch(_0x382093){return this['logger']?.[_0x38d221(0xba)](_0x38d221(0x89),{'error':_0x382093[_0x38d221(0x7a)]}),[];}}['detectFileType'](_0x4d7269){const _0x1b5252=a0_0x21897e,_0xbbdea2=a0_0x5a86a5[_0x1b5252(0x80)](_0x4d7269)[_0x1b5252(0x8b)](),_0x42e8bf=a0_0x5a86a5[_0x1b5252(0xe2)](_0x4d7269);if(_0xbbdea2==='dockerfile')return _0x1b5252(0xbf);if(_0xbbdea2===_0x1b5252(0x85)||_0xbbdea2===_0x1b5252(0x81))return _0x1b5252(0x88);if(_0xbbdea2===_0x1b5252(0x7f))return'package.json';if(_0xbbdea2===_0x1b5252(0xf3))return'tsconfig.json';if(_0xbbdea2===_0x1b5252(0xe6)||_0xbbdea2['endsWith'](_0x1b5252(0xe6)))return _0x1b5252(0x8d);if(_0x42e8bf['includes'](_0x1b5252(0x84)))return'github-actions';if(_0x42e8bf[_0x1b5252(0xaf)](_0x1b5252(0xcc))||_0x42e8bf[_0x1b5252(0xaf)](_0x1b5252(0xa2)))return _0x1b5252(0xcc);const _0x5d0e02=a0_0x5a86a5[_0x1b5252(0xab)](_0x4d7269)['toLowerCase']();if(_0x5d0e02===_0x1b5252(0xbd)||_0x5d0e02===_0x1b5252(0x83))return'terraform';if(_0x5d0e02===_0x1b5252(0x8f)||_0x5d0e02==='.yaml')return'yaml';if(_0x5d0e02==='.json')return _0x1b5252(0xd8);return _0x1b5252(0xd5);}[a0_0x21897e(0xe9)](_0x3902d3){const _0x369596=a0_0x21897e;return _0x3902d3['map'](_0x5dcb5a=>({'file':_0x5dcb5a[_0x369596(0x94)],'line':_0x5dcb5a[_0x369596(0xe8)]||0x1,'column':_0x5dcb5a['column']||0x1,'severity':_0x5dcb5a[_0x369596(0xf4)]||STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':_0x5dcb5a[_0x369596(0x8c)]||_0x369596(0xd5),'message':_0x5dcb5a['message']||'Validation\x20issue\x20detected','category':_0x5dcb5a['category']||_0x369596(0xc8),'validator':_0x5dcb5a[_0x369596(0xa5)],'cwe':_0x5dcb5a['cwe']||null,'remediation':_0x5dcb5a[_0x369596(0xae)]||null,'references':_0x5dcb5a['references']||[]}));}['mapHadolintSeverity'](_0x596a23){const _0x21c652=a0_0x21897e,_0x4b6e2f={'error':STATIC_ANALYSIS[_0x21c652(0xb5)][_0x21c652(0x9b)],'warning':STATIC_ANALYSIS['SEVERITY']['WARNING'],'info':STATIC_ANALYSIS[_0x21c652(0xb5)][_0x21c652(0xca)],'style':STATIC_ANALYSIS[_0x21c652(0xb5)]['INFO']};return _0x4b6e2f[_0x596a23?.['toLowerCase']()]||STATIC_ANALYSIS['SEVERITY']['WARNING'];}['mapYamllintSeverity'](_0x4ee7c8){const _0x514537=a0_0x21897e,_0x3f378b={'error':STATIC_ANALYSIS[_0x514537(0xb5)][_0x514537(0x9b)],'warning':STATIC_ANALYSIS['SEVERITY'][_0x514537(0xb0)]};return _0x3f378b[_0x4ee7c8?.[_0x514537(0x8b)]()]||STATIC_ANALYSIS['SEVERITY']['WARNING'];}['mapCheckovSeverity'](_0x35f273){const _0x32522d=a0_0x21897e;return STATIC_ANALYSIS[_0x32522d(0xb5)]['ERROR'];}async[a0_0x21897e(0xf8)](){const _0x567247=await this['detectAvailableValidators']();return{'validators':_0x567247,'recommendations':this['getInstallRecommendations'](_0x567247)};}['getInstallRecommendations'](_0x1da4d5){const _0x30d258=a0_0x21897e,_0x89be26=[];return!_0x1da4d5[_0x30d258(0x8e)]&&_0x89be26['push']({'validator':_0x30d258(0x8e),'reason':'Infrastructure\x20as\x20Code\x20security\x20scanning\x20(Docker,\x20Kubernetes,\x20Terraform)','install':_0x30d258(0xe0),'priority':'high'}),!_0x1da4d5['hadolint']&&_0x89be26['push']({'validator':_0x30d258(0xfa),'reason':_0x30d258(0xee),'install':'Download from https://github.com/hadolint/hadolint/releases','priority':'high'}),!_0x1da4d5['yamllint']&&_0x89be26[_0x30d258(0xea)]({'validator':'yamllint','reason':'YAML\x20file\x20validation','install':'pip\x20install\x20yamllint','priority':'medium'}),!_0x1da4d5['jsonSchema']&&_0x89be26[_0x30d258(0xea)]({'validator':_0x30d258(0xc7),'reason':_0x30d258(0xbe),'install':'npm\x20install\x20ajv\x20ajv-formats','priority':_0x30d258(0x9a)}),_0x89be26;}}export default ConfigValidator;
@@ -1 +1 @@
1
- const a0_0x3d0303=a0_0x366f;(function(_0x1c6825,_0x450635){const _0x43d3eb=a0_0x366f,_0x57b61b=_0x1c6825();while(!![]){try{const _0x1b3969=-parseInt(_0x43d3eb(0x147))/0x1*(-parseInt(_0x43d3eb(0x136))/0x2)+parseInt(_0x43d3eb(0x125))/0x3+-parseInt(_0x43d3eb(0x141))/0x4*(-parseInt(_0x43d3eb(0x12b))/0x5)+parseInt(_0x43d3eb(0x149))/0x6*(-parseInt(_0x43d3eb(0x13c))/0x7)+parseInt(_0x43d3eb(0x135))/0x8*(parseInt(_0x43d3eb(0x115))/0x9)+-parseInt(_0x43d3eb(0x122))/0xa+parseInt(_0x43d3eb(0x13d))/0xb*(-parseInt(_0x43d3eb(0x116))/0xc);if(_0x1b3969===_0x450635)break;else _0x57b61b['push'](_0x57b61b['shift']());}catch(_0x22bfca){_0x57b61b['push'](_0x57b61b['shift']());}}}(a0_0x361d,0x1b26b));import{ESLint}from'eslint';function a0_0x366f(_0x920103,_0xa66d1c){_0x920103=_0x920103-0x113;const _0x361d23=a0_0x361d();let _0x366f2d=_0x361d23[_0x920103];if(a0_0x366f['yjosSq']===undefined){var _0x136e62=function(_0x4ce2dc){const _0x532159='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4239b9='',_0x4a1faa='';for(let _0x262556=0x0,_0x3d7629,_0x79fb06,_0x1a4f71=0x0;_0x79fb06=_0x4ce2dc['charAt'](_0x1a4f71++);~_0x79fb06&&(_0x3d7629=_0x262556%0x4?_0x3d7629*0x40+_0x79fb06:_0x79fb06,_0x262556++%0x4)?_0x4239b9+=String['fromCharCode'](0xff&_0x3d7629>>(-0x2*_0x262556&0x6)):0x0){_0x79fb06=_0x532159['indexOf'](_0x79fb06);}for(let _0x38fcc4=0x0,_0x41117=_0x4239b9['length'];_0x38fcc4<_0x41117;_0x38fcc4++){_0x4a1faa+='%'+('00'+_0x4239b9['charCodeAt'](_0x38fcc4)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4a1faa);};a0_0x366f['jjUPHL']=_0x136e62,a0_0x366f['MgRPyY']={},a0_0x366f['yjosSq']=!![];}const _0x4c771a=_0x361d23[0x0],_0x1983c3=_0x920103+_0x4c771a,_0x4645aa=a0_0x366f['MgRPyY'][_0x1983c3];return!_0x4645aa?(_0x366f2d=a0_0x366f['jjUPHL'](_0x366f2d),a0_0x366f['MgRPyY'][_0x1983c3]=_0x366f2d):_0x366f2d=_0x4645aa,_0x366f2d;}import a0_0x4239b9 from'path';import a0_0x4a1faa from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';class ESLintAnalyzer{constructor(_0x262556=null){const _0x2094e0=a0_0x366f;this[_0x2094e0(0x150)]=_0x262556,this['eslintCache']=new Map();}async[a0_0x3d0303(0x134)](_0x3d7629,_0x79fb06,_0x1a4f71={}){const _0x32d0bd=a0_0x3d0303;try{const _0x38fcc4=await this['getESLintInstance'](_0x1a4f71),_0x41117=await _0x38fcc4['lintText'](_0x79fb06,{'filePath':_0x3d7629,'warnIgnored':![]}),_0x4f4512=[];if(_0x41117&&_0x41117['length']>0x0){const _0x3b74e6=_0x41117[0x0];for(const _0x1aa1ea of _0x3b74e6[_0x32d0bd(0x120)]){_0x4f4512[_0x32d0bd(0x14b)](this[_0x32d0bd(0x137)](_0x1aa1ea,_0x3d7629));}}return this['logger']?.[_0x32d0bd(0x132)](_0x32d0bd(0x148),{'file':_0x3d7629,'totalDiagnostics':_0x4f4512['length'],'errors':_0x4f4512[_0x32d0bd(0x12e)](_0x3b4729=>_0x3b4729['severity']===STATIC_ANALYSIS[_0x32d0bd(0x12d)][_0x32d0bd(0x114)])['length'],'warnings':_0x4f4512['filter'](_0xb5a608=>_0xb5a608[_0x32d0bd(0x11b)]===STATIC_ANALYSIS['SEVERITY'][_0x32d0bd(0x126)])['length']}),_0x4f4512;}catch(_0x3f7a59){return this['logger']?.[_0x32d0bd(0x146)](_0x32d0bd(0x121),{'file':_0x3d7629,'error':_0x3f7a59['message']}),[];}}async['fix'](_0x519e91,_0xb435db,_0x8dcfee={}){const _0xbd961b=a0_0x3d0303;try{const _0x1aab9f=await this['getESLintInstance']({..._0x8dcfee,'fix':!![]}),_0x5788e1=await _0x1aab9f[_0xbd961b(0x11e)](_0xb435db,{'filePath':_0x519e91,'warnIgnored':![]});if(_0x5788e1&&_0x5788e1['length']>0x0){const _0x27a4f5=_0x5788e1[0x0];return{'fixed':_0x27a4f5['output']!==undefined,'content':_0x27a4f5[_0xbd961b(0x143)]||_0xb435db,'fixedCount':_0x27a4f5[_0xbd961b(0x113)]+_0x27a4f5['fixableWarningCount'],'remainingErrors':_0x27a4f5[_0xbd961b(0x117)]-_0x27a4f5['fixableErrorCount'],'remainingWarnings':_0x27a4f5[_0xbd961b(0x129)]-_0x27a4f5['fixableWarningCount'],'changes':_0x27a4f5['output']?this['describeChanges'](_0xb435db,_0x27a4f5[_0xbd961b(0x143)]):[]};}return{'fixed':![],'content':_0xb435db,'fixedCount':0x0,'remainingErrors':0x0,'remainingWarnings':0x0,'changes':[]};}catch(_0x17f8cd){this['logger']?.[_0xbd961b(0x146)]('ESLint\x20fix\x20failed',{'file':_0x519e91,'error':_0x17f8cd['message']});throw new Error('ESLint\x20fix\x20failed:\x20'+_0x17f8cd[_0xbd961b(0x123)]);}}async['getESLintInstance'](_0xb3db22={}){const _0x332ec4=a0_0x3d0303,{workingDir:_0x23e278,fix:fix=![],framework:_0x2cdd28}=_0xb3db22,_0x2bf2f2=await this[_0x332ec4(0x127)](_0x23e278,_0x2cdd28),_0x38b819=new ESLint({'fix':fix,'useEslintrc':!![],'overrideConfig':_0x2bf2f2,'errorOnUnmatchedPattern':![]});return _0x38b819;}async[a0_0x3d0303(0x127)](_0x5e2ff3,_0x41c54a){const _0x564a04=a0_0x3d0303,_0xfdb0c8={'env':{'browser':!![],'es2021':!![],'node':!![]},'parserOptions':{'ecmaVersion':_0x564a04(0x124),'sourceType':'module'},'rules':{'no-unused-vars':_0x564a04(0x14d),'no-undef':'error','no-console':'off','semi':['warn','always'],'quotes':['warn',_0x564a04(0x138),{'avoidEscape':!![]}]}};if(_0x41c54a===_0x564a04(0x12c))_0xfdb0c8['extends']=[_0x564a04(0x13e)],_0xfdb0c8[_0x564a04(0x139)]['ecmaFeatures']={'jsx':!![]},_0xfdb0c8['settings']={'react':{'version':_0x564a04(0x13f)}};else _0x41c54a==='vue'?_0xfdb0c8['extends']=['eslint:recommended']:_0xfdb0c8['extends']=['eslint:recommended'];if(_0x5e2ff3){const _0x2f9112=['.eslintrc.js',_0x564a04(0x13b),_0x564a04(0x14c),_0x564a04(0x13a)];for(const _0x595e13 of _0x2f9112){try{const _0x38f5bd=a0_0x4239b9['join'](_0x5e2ff3,_0x595e13);return await a0_0x4a1faa['access'](_0x38f5bd),this[_0x564a04(0x150)]?.[_0x564a04(0x132)](_0x564a04(0x12f),{'configFile':_0x595e13}),{};}catch{}}}return _0xfdb0c8;}['formatMessage'](_0x4171c8,_0x5d7f78){const _0x42db7e=a0_0x3d0303;return{'file':_0x5d7f78,'line':_0x4171c8['line']||0x1,'column':_0x4171c8['column']||0x1,'endLine':_0x4171c8[_0x42db7e(0x118)],'endColumn':_0x4171c8[_0x42db7e(0x11c)],'severity':_0x4171c8[_0x42db7e(0x11b)]===0x2?STATIC_ANALYSIS['SEVERITY'][_0x42db7e(0x114)]:STATIC_ANALYSIS['SEVERITY'][_0x42db7e(0x126)],'rule':_0x4171c8[_0x42db7e(0x14e)]||_0x42db7e(0x11f),'message':_0x4171c8['message'],'category':this['categorizeRule'](_0x4171c8['ruleId']),'fixable':_0x4171c8['fix']!==undefined,'source':_0x42db7e(0x11f)};}[a0_0x3d0303(0x133)](_0xaf9dd7){const _0x16734f=a0_0x3d0303;if(!_0xaf9dd7)return STATIC_ANALYSIS['CATEGORY'][_0x16734f(0x14a)];if(_0xaf9dd7['includes']('security')||_0xaf9dd7['includes']('xss')||_0xaf9dd7==='no-eval'||_0xaf9dd7==='no-implied-eval')return STATIC_ANALYSIS[_0x16734f(0x145)][_0x16734f(0x142)];if(_0xaf9dd7['includes']('performance')||_0xaf9dd7==='no-await-in-loop'||_0xaf9dd7==='prefer-promise-reject-errors')return STATIC_ANALYSIS['CATEGORY'][_0x16734f(0x130)];if(_0xaf9dd7['includes']('import')||_0xaf9dd7===_0x16734f(0x14f))return STATIC_ANALYSIS[_0x16734f(0x145)][_0x16734f(0x128)];if(_0xaf9dd7['includes']('best-practices')||_0xaf9dd7==='no-unused-vars'||_0xaf9dd7===_0x16734f(0x11a)||_0xaf9dd7===_0x16734f(0x12a))return STATIC_ANALYSIS[_0x16734f(0x145)][_0x16734f(0x131)];return STATIC_ANALYSIS[_0x16734f(0x145)][_0x16734f(0x14a)];}['describeChanges'](_0x3f3330,_0x42e8f4){const _0x105f0a=a0_0x3d0303,_0xac666e=[],_0x111e59=_0x3f3330[_0x105f0a(0x144)]('\x0a'),_0x448291=_0x42e8f4['split']('\x0a'),_0x2c128b=Math['max'](_0x111e59['length'],_0x448291['length']);for(let _0x74e6ae=0x0;_0x74e6ae<_0x2c128b;_0x74e6ae++){const _0x2c2b79=_0x111e59[_0x74e6ae]||'',_0x418cb9=_0x448291[_0x74e6ae]||'';_0x2c2b79!==_0x418cb9&&_0xac666e[_0x105f0a(0x14b)]({'line':_0x74e6ae+0x1,'type':_0x2c2b79&&_0x418cb9?'modified':_0x2c2b79?'removed':'added','original':_0x2c2b79,'fixed':_0x418cb9});}return _0xac666e;}['getSupportedExtensions'](){const _0x1f3f6a=a0_0x3d0303;return[_0x1f3f6a(0x11d),_0x1f3f6a(0x119),'.mjs','.cjs'];}[a0_0x3d0303(0x140)](){return!![];}}function a0_0x361d(){const _0x75f09f=['v0fstKLorW','z2v0rvnmAw50q29UzMLN','su1qt1ju','D2fYBMLUz0nVDw50','BM8TDMfY','otCZntK1zwPKufre','CMvHy3q','u0vwrvjjvfK','zMLSDgvY','rM91BMqGrvnmAw50ignVBMzPzW','uevsrK9stufoq0u','qKvtvf9quKfdveLdrq','zgvIDwC','y2f0zwDVCML6zvj1Bgu','yw5HBhL6zq','nJCXmMziDgHYrW','mte5mNjIrwPiza','zM9YBwf0twvZC2fNzq','C2LUz2XL','CgfYC2vYt3b0Aw9UCW','zxnSAw50lMnVBMzPzY5QCW','lMvZBgLUDhjJlMnQCW','ndyWnJyZBLvMALbY','odu0mtvkB0PWzuK','zxnSAw50oNjLy29TBwvUzgvK','zgv0zwn0','C3vWCg9YDhnbDxrVrML4','nfHICMfsyG','u0vdvvjjvfK','B3v0Chv0','C3bSAxq','q0furuDpuLK','zxjYB3i','otHgBfnjEuW','rvnmAw50igfUywX5C2LZignVBxbSzxrLza','mtjtCg9WDKK','u1rzteu','ChvZAa','lMvZBgLUDhjJlMPZB24','D2fYBG','CNvSzuLK','BM8TDw5Kzwy','Bg9Nz2vY','zML4ywjSzuvYCM9Yq291BNq','rvjst1i','mZmZteTYtLjV','mtjqEfPKqxG','zxjYB3jdB3vUDa','zw5KtgLUzq','lMPZEa','BM8TDw5YzwfJAgfIBgu','C2v2zxjPDhK','zw5Kq29SDw1U','lMPZ','BgLUDfrLEhq','zxnSAw50','BwvZC2fNzxm','rvnmAw50igfUywX5C2LZigzHAwXLza','nJe4nZGWuLbRuunJ','BwvZC2fNzq','Bgf0zxn0','odq5mdzfsvHiBKW'];a0_0x361d=function(){return _0x75f09f;};return a0_0x361d();}export default ESLintAnalyzer;
1
+ const a0_0x2a7f5c=a0_0x3641;(function(_0x1d5ec5,_0x469633){const _0x26a5d7=a0_0x3641,_0x4e489d=_0x1d5ec5();while(!![]){try{const _0x34d8e3=-parseInt(_0x26a5d7(0xc7))/0x1+parseInt(_0x26a5d7(0xdc))/0x2+-parseInt(_0x26a5d7(0xe6))/0x3+parseInt(_0x26a5d7(0xca))/0x4+-parseInt(_0x26a5d7(0xc4))/0x5+parseInt(_0x26a5d7(0xde))/0x6+parseInt(_0x26a5d7(0xdf))/0x7;if(_0x34d8e3===_0x469633)break;else _0x4e489d['push'](_0x4e489d['shift']());}catch(_0x1a0180){_0x4e489d['push'](_0x4e489d['shift']());}}}(a0_0x37cd,0xc9d59));function a0_0x3641(_0x1b1d55,_0xb9d276){_0x1b1d55=_0x1b1d55-0xb7;const _0x37cd1e=a0_0x37cd();let _0x36412a=_0x37cd1e[_0x1b1d55];if(a0_0x3641['CWGmGY']===undefined){var _0x325517=function(_0x140a85){const _0x52b4e2='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2a1df5='',_0x23c322='';for(let _0x28a452=0x0,_0x59a616,_0x253f23,_0x4d8c54=0x0;_0x253f23=_0x140a85['charAt'](_0x4d8c54++);~_0x253f23&&(_0x59a616=_0x28a452%0x4?_0x59a616*0x40+_0x253f23:_0x253f23,_0x28a452++%0x4)?_0x2a1df5+=String['fromCharCode'](0xff&_0x59a616>>(-0x2*_0x28a452&0x6)):0x0){_0x253f23=_0x52b4e2['indexOf'](_0x253f23);}for(let _0x57b786=0x0,_0x5b7a62=_0x2a1df5['length'];_0x57b786<_0x5b7a62;_0x57b786++){_0x23c322+='%'+('00'+_0x2a1df5['charCodeAt'](_0x57b786)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x23c322);};a0_0x3641['MPytmY']=_0x325517,a0_0x3641['pWwwqb']={},a0_0x3641['CWGmGY']=!![];}const _0x382ea2=_0x37cd1e[0x0],_0x56bcea=_0x1b1d55+_0x382ea2,_0x2fe39a=a0_0x3641['pWwwqb'][_0x56bcea];return!_0x2fe39a?(_0x36412a=a0_0x3641['MPytmY'](_0x36412a),a0_0x3641['pWwwqb'][_0x56bcea]=_0x36412a):_0x36412a=_0x2fe39a,_0x36412a;}import{ESLint}from'eslint';import a0_0x2a1df5 from'path';function a0_0x37cd(){const _0x243d92=['lM1QCW','Bgf0zxn0','BgvUz3rO','C2v2zxjPDhK','BgLUzq','ChjLzMvYlxbYB21PC2uTCMvQzwn0lwvYCM9YCW','EhnZ','yw5HBhL6zq','zw5Kq29SDw1U','BM8TDw5YzwfJAgfIBgu','zxH0zw5KCW','otm1ntG0vNLJEKDT','Aw5JBhvKzxm','mtKZotq0mhnYyMHdsa','mtaXnZq2ndDTq0jJwfq','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','zML4ywjSzuvYCM9Yq291BNq','q0furuDpuLK','zML4','DNvL','zxnSAw50oNjLy29TBwvUzgvK','mZi0mdq5ogTqDLzoEq','CgvYzM9YBwfUy2u','zMLSDgvY','B2zM','BwvZC2fNzq','zxnSAw50q2fJAgu','Bwf4','BM8TDw5Kzwy','zxnSAw50lMnVBMzPzY5QCW','BwvZC2fNzxm','C2LUz2XL','zgvZy3jPyMvdAgfUz2vZ','zwnTyuzLyxr1CMvZ','v0fstKLorW','Bg9Nz2vY','ChvZAa','rvnmAw50igzPEcbMywLSzwq6ia','zw5KtgLUzq','BM8TAw1WBgLLzc1LDMfS','mZa3oda2mfHSAwfwuW','lMPZ','C3bSAxq','mtm1mtu3ovDkDuzuEG','zxjYB3i','z2v0rvnmAw50q29UzMLN','nJuXoda2ofbszxLZzG','ywX3yxLZ','u0vdvvjjvfK','zxnSAw50','zM9YBwf0twvZC2fNzq','y2f0zwDVCML6zvj1Bgu','B3v0Chv0'];a0_0x37cd=function(){return _0x243d92;};return a0_0x37cd();}import a0_0x23c322 from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';class ESLintAnalyzer{constructor(_0x28a452=null){const _0x249a9f=a0_0x3641;this['logger']=_0x28a452,this[_0x249a9f(0xeb)]=new Map();}async[a0_0x2a7f5c(0xd8)](_0x59a616,_0x253f23,_0x4d8c54={}){const _0x34d20a=a0_0x2a7f5c;try{const _0x57b786=await this['getESLintInstance'](_0x4d8c54),_0x5b7a62=await _0x57b786['lintText'](_0x253f23,{'filePath':_0x59a616,'warnIgnored':![]}),_0x13455c=[];if(_0x5b7a62&&_0x5b7a62['length']>0x0){const _0x29dfdf=_0x5b7a62[0x0];for(const _0x331b58 of _0x29dfdf[_0x34d20a(0xba)]){_0x13455c['push'](this['formatMessage'](_0x331b58,_0x59a616));}}return this[_0x34d20a(0xbf)]?.['debug']('ESLint\x20analysis\x20completed',{'file':_0x59a616,'totalDiagnostics':_0x13455c['length'],'errors':_0x13455c[_0x34d20a(0xe8)](_0x154adb=>_0x154adb[_0x34d20a(0xd4)]===STATIC_ANALYSIS['SEVERITY']['ERROR'])[_0x34d20a(0xd3)],'warnings':_0x13455c['filter'](_0x20d897=>_0x20d897[_0x34d20a(0xd4)]===STATIC_ANALYSIS['SEVERITY'][_0x34d20a(0xbe)])[_0x34d20a(0xd3)]}),_0x13455c;}catch(_0x5f4ca7){return this[_0x34d20a(0xbf)]?.[_0x34d20a(0xc8)]('ESLint\x20analysis\x20failed',{'file':_0x59a616,'error':_0x5f4ca7['message']}),[];}}async['fix'](_0x36e4ab,_0x1bc5e4,_0x20dffe={}){const _0x4cafba=a0_0x2a7f5c;try{const _0xd845f5=await this['getESLintInstance']({..._0x20dffe,'fix':!![]}),_0x4210d9=await _0xd845f5['lintText'](_0x1bc5e4,{'filePath':_0x36e4ab,'warnIgnored':![]});if(_0x4210d9&&_0x4210d9['length']>0x0){const _0x33a58d=_0x4210d9[0x0];return{'fixed':_0x33a58d[_0x4cafba(0xd0)]!==undefined,'content':_0x33a58d['output']||_0x1bc5e4,'fixedCount':_0x33a58d[_0x4cafba(0xe1)]+_0x33a58d['fixableWarningCount'],'remainingErrors':_0x33a58d['errorCount']-_0x33a58d[_0x4cafba(0xe1)],'remainingWarnings':_0x33a58d['warningCount']-_0x33a58d['fixableWarningCount'],'changes':_0x33a58d[_0x4cafba(0xd0)]?this['describeChanges'](_0x1bc5e4,_0x33a58d['output']):[]};}return{'fixed':![],'content':_0x1bc5e4,'fixedCount':0x0,'remainingErrors':0x0,'remainingWarnings':0x0,'changes':[]};}catch(_0x14e811){this['logger']?.[_0x4cafba(0xc8)]('ESLint\x20fix\x20failed',{'file':_0x36e4ab,'error':_0x14e811['message']});throw new Error(_0x4cafba(0xc1)+_0x14e811[_0x4cafba(0xea)]);}}async['getESLintInstance'](_0x50eb16={}){const _0x15de04=a0_0x2a7f5c,{workingDir:_0x56c762,fix:fix=![],framework:_0x407117}=_0x50eb16,_0x58c183=await this[_0x15de04(0xc9)](_0x56c762,_0x407117),_0x6edde2=new ESLint({'fix':fix,'useEslintrc':!![],'overrideConfig':_0x58c183,'errorOnUnmatchedPattern':![]});return _0x6edde2;}async[a0_0x2a7f5c(0xc9)](_0x1ac501,_0x78f473){const _0x46dc1f=a0_0x2a7f5c,_0x3ce0ed={'env':{'browser':!![],'es2021':!![],'node':!![]},'parserOptions':{'ecmaVersion':_0x46dc1f(0xd2),'sourceType':'module'},'rules':{'no-unused-vars':'warn','no-undef':'error','no-console':_0x46dc1f(0xe9),'semi':['warn',_0x46dc1f(0xcb)],'quotes':['warn',_0x46dc1f(0xbb),{'avoidEscape':!![]}]}};if(_0x78f473==='react')_0x3ce0ed[_0x46dc1f(0xdb)]=[_0x46dc1f(0xe5)],_0x3ce0ed['parserOptions'][_0x46dc1f(0xbd)]={'jsx':!![]},_0x3ce0ed['settings']={'react':{'version':'detect'}};else _0x78f473===_0x46dc1f(0xe4)?_0x3ce0ed['extends']=[_0x46dc1f(0xe5)]:_0x3ce0ed[_0x46dc1f(0xdb)]=[_0x46dc1f(0xe5)];if(_0x1ac501){const _0x19e733=['.eslintrc.js','.eslintrc.cjs','.eslintrc.json',_0x46dc1f(0xb9)];for(const _0x23ad7a of _0x19e733){try{const _0xc87b4d=a0_0x2a1df5['join'](_0x1ac501,_0x23ad7a);return await a0_0x23c322['access'](_0xc87b4d),this['logger']?.['debug']('Found\x20ESLint\x20config',{'configFile':_0x23ad7a}),{};}catch{}}}return _0x3ce0ed;}[a0_0x2a7f5c(0xce)](_0xe18f04,_0x4708e9){const _0x2afb26=a0_0x2a7f5c;return{'file':_0x4708e9,'line':_0xe18f04[_0x2afb26(0xd5)]||0x1,'column':_0xe18f04['column']||0x1,'endLine':_0xe18f04[_0x2afb26(0xc2)],'endColumn':_0xe18f04[_0x2afb26(0xd9)],'severity':_0xe18f04['severity']===0x2?STATIC_ANALYSIS['SEVERITY']['ERROR']:STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':_0xe18f04['ruleId']||_0x2afb26(0xcd),'message':_0xe18f04['message'],'category':this['categorizeRule'](_0xe18f04['ruleId']),'fixable':_0xe18f04[_0x2afb26(0xe3)]!==undefined,'source':'eslint'};}[a0_0x2a7f5c(0xcf)](_0x4b811e){const _0x322582=a0_0x2a7f5c;if(!_0x4b811e)return STATIC_ANALYSIS[_0x322582(0xe2)]['STYLE'];if(_0x4b811e[_0x322582(0xdd)]('security')||_0x4b811e['includes'](_0x322582(0xd7))||_0x4b811e==='no-eval'||_0x4b811e===_0x322582(0xc3))return STATIC_ANALYSIS[_0x322582(0xe2)][_0x322582(0xcc)];if(_0x4b811e[_0x322582(0xdd)](_0x322582(0xe7))||_0x4b811e==='no-await-in-loop'||_0x4b811e===_0x322582(0xd6))return STATIC_ANALYSIS['CATEGORY']['PERFORMANCE'];if(_0x4b811e[_0x322582(0xdd)]('import')||_0x4b811e===_0x322582(0xb8))return STATIC_ANALYSIS[_0x322582(0xe2)]['IMPORT'];if(_0x4b811e[_0x322582(0xdd)]('best-practices')||_0x4b811e==='no-unused-vars'||_0x4b811e===_0x322582(0xda)||_0x4b811e==='no-var')return STATIC_ANALYSIS[_0x322582(0xe2)]['BEST_PRACTICE'];return STATIC_ANALYSIS['CATEGORY']['STYLE'];}[a0_0x2a7f5c(0xbc)](_0x416e5d,_0x15afa6){const _0x1db933=a0_0x2a7f5c,_0x3ae5ea=[],_0xbbb332=_0x416e5d[_0x1db933(0xc6)]('\x0a'),_0x194979=_0x15afa6['split']('\x0a'),_0x3612dd=Math[_0x1db933(0xb7)](_0xbbb332[_0x1db933(0xd3)],_0x194979['length']);for(let _0x4ad190=0x0;_0x4ad190<_0x3612dd;_0x4ad190++){const _0x32faf2=_0xbbb332[_0x4ad190]||'',_0x3ba46f=_0x194979[_0x4ad190]||'';_0x32faf2!==_0x3ba46f&&_0x3ae5ea[_0x1db933(0xc0)]({'line':_0x4ad190+0x1,'type':_0x32faf2&&_0x3ba46f?'modified':_0x32faf2?'removed':'added','original':_0x32faf2,'fixed':_0x3ba46f});}return _0x3ae5ea;}[a0_0x2a7f5c(0xe0)](){const _0x50353a=a0_0x2a7f5c;return[_0x50353a(0xc5),'.jsx',_0x50353a(0xd1),'.cjs'];}['supportsAutoFix'](){return!![];}}export default ESLintAnalyzer;