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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/README.md +2 -2
  2. package/bin/cli.js +1 -1
  3. package/bin/loxia-terminal-v2.js +1 -1
  4. package/bin/loxia-terminal.js +1 -1
  5. package/bin/start-with-terminal.js +1 -1
  6. package/package.json +1 -1
  7. package/scripts/install-scanners.js +1 -1
  8. package/src/analyzers/CSSAnalyzer.js +1 -1
  9. package/src/analyzers/ConfigValidator.js +1 -1
  10. package/src/analyzers/ESLintAnalyzer.js +1 -1
  11. package/src/analyzers/JavaScriptAnalyzer.js +1 -1
  12. package/src/analyzers/PrettierFormatter.js +1 -1
  13. package/src/analyzers/PythonAnalyzer.js +1 -1
  14. package/src/analyzers/SecurityAnalyzer.js +1 -1
  15. package/src/analyzers/TypeScriptAnalyzer.js +1 -1
  16. package/src/analyzers/codeCloneDetector/analyzer.js +1 -1
  17. package/src/analyzers/codeCloneDetector/detector.js +1 -1
  18. package/src/analyzers/codeCloneDetector/index.js +1 -1
  19. package/src/analyzers/codeCloneDetector/parser.js +1 -1
  20. package/src/analyzers/codeCloneDetector/reporter.js +1 -1
  21. package/src/analyzers/codeCloneDetector/scanner.js +1 -1
  22. package/src/core/agentPool.js +1 -1
  23. package/src/core/agentScheduler.js +1 -1
  24. package/src/core/contextManager.js +1 -1
  25. package/src/core/messageProcessor.js +1 -1
  26. package/src/core/orchestrator.js +1 -1
  27. package/src/core/stateManager.js +1 -1
  28. package/src/index.js +1 -1
  29. package/src/interfaces/cli.js +1 -1
  30. package/src/interfaces/terminal/__tests__/smoke/advancedFeatures.test.js +1 -1
  31. package/src/interfaces/terminal/__tests__/smoke/agentControl.test.js +1 -1
  32. package/src/interfaces/terminal/__tests__/smoke/agents.test.js +1 -1
  33. package/src/interfaces/terminal/__tests__/smoke/components.test.js +1 -1
  34. package/src/interfaces/terminal/__tests__/smoke/connection.test.js +1 -1
  35. package/src/interfaces/terminal/__tests__/smoke/enhancements.test.js +1 -1
  36. package/src/interfaces/terminal/__tests__/smoke/imports.test.js +1 -1
  37. package/src/interfaces/terminal/__tests__/smoke/messages.test.js +1 -1
  38. package/src/interfaces/terminal/__tests__/smoke/tools.test.js +1 -1
  39. package/src/interfaces/terminal/api/apiClient.js +1 -1
  40. package/src/interfaces/terminal/api/messageRouter.js +1 -1
  41. package/src/interfaces/terminal/api/session.js +1 -1
  42. package/src/interfaces/terminal/api/websocket.js +1 -1
  43. package/src/interfaces/terminal/components/AgentCreator.js +1 -1
  44. package/src/interfaces/terminal/components/AgentEditor.js +1 -1
  45. package/src/interfaces/terminal/components/AgentSwitcher.js +1 -1
  46. package/src/interfaces/terminal/components/ErrorBoundary.js +1 -1
  47. package/src/interfaces/terminal/components/ErrorPanel.js +1 -1
  48. package/src/interfaces/terminal/components/Header.js +1 -1
  49. package/src/interfaces/terminal/components/HelpPanel.js +1 -1
  50. package/src/interfaces/terminal/components/InputBox.js +1 -1
  51. package/src/interfaces/terminal/components/Layout.js +1 -1
  52. package/src/interfaces/terminal/components/LoadingSpinner.js +1 -1
  53. package/src/interfaces/terminal/components/MessageList.js +1 -1
  54. package/src/interfaces/terminal/components/MultilineTextInput.js +1 -1
  55. package/src/interfaces/terminal/components/SearchPanel.js +1 -1
  56. package/src/interfaces/terminal/components/SettingsPanel.js +1 -1
  57. package/src/interfaces/terminal/components/StatusBar.js +1 -1
  58. package/src/interfaces/terminal/components/TextInput.js +1 -1
  59. package/src/interfaces/terminal/config/agentEditorConstants.js +1 -1
  60. package/src/interfaces/terminal/config/constants.js +1 -1
  61. package/src/interfaces/terminal/index.js +1 -1
  62. package/src/interfaces/terminal/state/useAgentControl.js +1 -1
  63. package/src/interfaces/terminal/state/useAgents.js +1 -1
  64. package/src/interfaces/terminal/state/useConnection.js +1 -1
  65. package/src/interfaces/terminal/state/useMessages.js +1 -1
  66. package/src/interfaces/terminal/state/useTools.js +1 -1
  67. package/src/interfaces/terminal/utils/debugLogger.js +1 -1
  68. package/src/interfaces/terminal/utils/settingsStorage.js +1 -1
  69. package/src/interfaces/terminal/utils/theme.js +1 -1
  70. package/src/interfaces/webServer.js +1 -1
  71. package/src/modules/fileExplorer/controller.js +1 -1
  72. package/src/modules/fileExplorer/index.js +1 -1
  73. package/src/modules/fileExplorer/middleware.js +1 -1
  74. package/src/modules/fileExplorer/routes.js +1 -1
  75. package/src/services/aiService.js +1 -1
  76. package/src/services/apiKeyManager.js +1 -1
  77. package/src/services/benchmarkService.js +1 -1
  78. package/src/services/budgetService.js +1 -1
  79. package/src/services/contextInjectionService.js +1 -1
  80. package/src/services/conversationCompactionService.js +1 -1
  81. package/src/services/errorHandler.js +1 -1
  82. package/src/services/fileAttachmentService.js +1 -1
  83. package/src/services/modelRouterService.js +1 -1
  84. package/src/services/modelsService.js +1 -1
  85. package/src/services/qualityInspector.js +1 -1
  86. package/src/services/tokenCountingService.js +1 -1
  87. package/src/tools/agentCommunicationTool.js +1 -1
  88. package/src/tools/agentDelayTool.js +1 -1
  89. package/src/tools/asyncToolManager.js +1 -1
  90. package/src/tools/baseTool.js +1 -1
  91. package/src/tools/browserTool.js +1 -1
  92. package/src/tools/cloneDetectionTool.js +1 -1
  93. package/src/tools/dependencyResolverTool.js +1 -1
  94. package/src/tools/fileContentReplaceTool.js +1 -1
  95. package/src/tools/fileSystemTool.js +1 -1
  96. package/src/tools/fileTreeTool.js +1 -1
  97. package/src/tools/imageTool.js +1 -1
  98. package/src/tools/importAnalyzerTool.js +1 -1
  99. package/src/tools/jobDoneTool.js +1 -1
  100. package/src/tools/seekTool.js +1 -1
  101. package/src/tools/staticAnalysisTool.js +1 -1
  102. package/src/tools/taskManagerTool.js +1 -1
  103. package/src/tools/terminalTool.js +1 -1
  104. package/src/tools/webTool.js +1 -1
  105. package/src/types/agent.js +1 -1
  106. package/src/types/contextReference.js +1 -1
  107. package/src/types/conversation.js +1 -1
  108. package/src/types/toolCommand.js +1 -1
  109. package/src/utilities/attachmentValidator.js +1 -1
  110. package/src/utilities/configManager.js +1 -1
  111. package/src/utilities/constants.js +1 -1
  112. package/src/utilities/directoryAccessManager.js +1 -1
  113. package/src/utilities/fileProcessor.js +1 -1
  114. package/src/utilities/logger.js +1 -1
  115. package/src/utilities/tagParser.js +1 -1
  116. package/src/utilities/toolConstants.js +1 -1
  117. package/web-ui/build/index.html +2 -2
  118. package/web-ui/build/static/index-BmKxmRe3.css +1 -0
  119. package/web-ui/build/static/{index-CX8ZfpGw.js → index-BzXbDs8z.js} +69 -69
  120. package/web-ui/build/static/index-Dwg_JrlO.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.6
102
+ # Should display: Loxia Autopilot One v1.0.8
103
103
  ```
104
104
 
105
105
  ### 4. Create an API Key
@@ -368,7 +368,7 @@ Loxia automatically compacts long conversations to stay within token limits:
368
368
 
369
369
  ## 🛣️ Roadmap
370
370
 
371
- ### Current Version (1.0.3)
371
+ ### Current Version (1.0.8)
372
372
 
373
373
  - ✅ Multi-agent orchestration
374
374
  - ✅ 18+ specialized tools
package/bin/cli.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x2abc56=a0_0x5574;function a0_0x5574(_0x4dc9e3,_0x110161){_0x4dc9e3=_0x4dc9e3-0x154;const _0x1d869c=a0_0x1d86();let _0x55742a=_0x1d869c[_0x4dc9e3];return _0x55742a;}(function(_0x2eb2a2,_0x3d2eb5){const _0x553227=a0_0x5574,_0x2d3063=_0x2eb2a2();while(!![]){try{const _0x575059=parseInt(_0x553227(0x198))/0x1+parseInt(_0x553227(0x18f))/0x2*(-parseInt(_0x553227(0x17e))/0x3)+parseInt(_0x553227(0x187))/0x4*(-parseInt(_0x553227(0x16e))/0x5)+-parseInt(_0x553227(0x15c))/0x6*(-parseInt(_0x553227(0x17d))/0x7)+parseInt(_0x553227(0x193))/0x8*(-parseInt(_0x553227(0x170))/0x9)+parseInt(_0x553227(0x181))/0xa+parseInt(_0x553227(0x177))/0xb;if(_0x575059===_0x3d2eb5)break;else _0x2d3063['push'](_0x2d3063['shift']());}catch(_0x29d1d9){_0x2d3063['push'](_0x2d3063['shift']());}}}(a0_0x1d86,0x3b130));import{fileURLToPath}from'url';import{dirname,join}from'path';import{spawn,exec}from'child_process';import{readFileSync}from'fs';import a0_0x3cab67 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x2abc56(0x186),SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process[a0_0x2abc56(0x160)][a0_0x2abc56(0x197)](0x2),command=args[0x0]&&!args[0x0][a0_0x2abc56(0x179)]('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args[a0_0x2abc56(0x17f)](a0_0x2abc56(0x174))||args['includes']('-h'),'version':args[a0_0x2abc56(0x17f)](a0_0x2abc56(0x175))||args[a0_0x2abc56(0x17f)]('-v')};for(let i=0x0;i<args['length'];i++){args[i]==='--port'&&args[i+0x1]&&(flags['port']=parseInt(args[i+0x1],0xa)),args[i]===a0_0x2abc56(0x196)&&args[i+0x1]&&(flags[a0_0x2abc56(0x159)]=args[i+0x1]);}const port=flags['port']||DEFAULT_PORT,host=flags[a0_0x2abc56(0x159)]||DEFAULT_HOST,serverUrl='http://'+host+':'+port;if(flags[a0_0x2abc56(0x18e)]){const pkgPath=join(__dirname,'..',a0_0x2abc56(0x173)),pkg=JSON[a0_0x2abc56(0x18b)](readFileSync(pkgPath,a0_0x2abc56(0x178)));console['log'](a0_0x2abc56(0x169)+pkg[a0_0x2abc56(0x18e)]),process[a0_0x2abc56(0x162)](0x0);}if(flags[a0_0x2abc56(0x192)]||!command){const pkgPath=join(__dirname,'..',a0_0x2abc56(0x173)),pkg=JSON[a0_0x2abc56(0x18b)](readFileSync(pkgPath,a0_0x2abc56(0x178)));console[a0_0x2abc56(0x15d)]('\x0aLoxia\x20Autopilot\x20One\x20v'+pkg[a0_0x2abc56(0x18e)]+'\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+')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20'+DEFAULT_HOST+')\x0a\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x20message\x0a\x20\x20-v,\x20--version\x20\x20\x20\x20\x20Show\x20version\x20number\x0a\x0aExamples:\x0a\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20open\x20browser\x0a\x20\x20loxia\x20terminal\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Connect\x20Terminal\x20UI\x20to\x20running\x20server\x0a\x20\x20loxia\x20plus-terminal\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a\x20\x20loxia\x20web\x20--port\x203000\x20\x20\x20\x20#\x20Use\x20custom\x20port\x0a\x0aQuick\x20Start:\x0a\x20\x201.\x20Run\x20\x27loxia\x20web\x27\x20to\x20start\x20with\x20Web\x20UI\x0a\x20\x202.\x20Or\x20run\x20\x27loxia\x20plus-terminal\x27\x20for\x20Terminal\x20UI\x20experience\x0a\x0aDocumentation:\x0a\x20\x20https://autopilot.loxia.ai\x0a\x0a'),process['exit'](0x0);}async function checkServerRunning(_0x5dd5a1,_0x191de6,_0x1e2ee3=0x1){for(let _0x5aecf5=0x0;_0x5aecf5<_0x1e2ee3;_0x5aecf5++){const _0x8baf4d=await new Promise(_0x16de19=>{const _0x5da16e=a0_0x5574,_0x245db7=a0_0x3cab67[_0x5da16e(0x155)](_0x5da16e(0x19a)+_0x5dd5a1+':'+_0x191de6+'/api/health',_0x226f66=>{const _0x59c422=_0x5da16e;_0x16de19(_0x226f66[_0x59c422(0x165)]===0xc8);});_0x245db7['on'](_0x5da16e(0x15a),()=>_0x16de19(![])),_0x245db7[_0x5da16e(0x16d)](0x7d0,()=>{const _0x83dfae=_0x5da16e;_0x245db7[_0x83dfae(0x199)](),_0x16de19(![]);});});if(_0x8baf4d)return!![];_0x5aecf5<_0x1e2ee3-0x1&&await new Promise(_0x140566=>setTimeout(_0x140566,SERVER_CHECK_INTERVAL));}return![];}async function waitForServer(_0x2ce936,_0x51940e,_0x636833=SERVER_STARTUP_TIMEOUT){const _0x1695b3=a0_0x2abc56,_0x1a28ac=Math[_0x1695b3(0x184)](_0x636833/SERVER_CHECK_INTERVAL);return checkServerRunning(_0x2ce936,_0x51940e,_0x1a28ac);}function openBrowser(_0x25379c){const _0x320292=a0_0x2abc56,_0x4e6184=process[_0x320292(0x188)];let _0x80ee51;if(_0x4e6184===_0x320292(0x16b))_0x80ee51='open\x20\x22'+_0x25379c+'\x22';else _0x4e6184===_0x320292(0x194)?_0x80ee51='start\x20\x22\x22\x20\x22'+_0x25379c+'\x22':_0x80ee51=_0x320292(0x18c)+_0x25379c+'\x22';exec(_0x80ee51,_0x51d9a7=>{const _0x581f14=_0x320292;_0x51d9a7&&(console[_0x581f14(0x15d)](_0x581f14(0x15e)),console[_0x581f14(0x15d)](_0x581f14(0x171)+_0x25379c));});}function startServer(_0x232fcc=![]){const _0xfe6aeb=a0_0x2abc56,_0x3bdc16={...process[_0xfe6aeb(0x17a)],'LOXIA_PORT':port[_0xfe6aeb(0x176)](),'PORT':port[_0xfe6aeb(0x176)]()};flags['host']&&(_0x3bdc16[_0xfe6aeb(0x180)]=flags[_0xfe6aeb(0x159)]);const _0xdf1cdd=join(__dirname,'..',_0xfe6aeb(0x156),_0xfe6aeb(0x189)),_0x36ee62=spawn(_0xfe6aeb(0x164),[_0xdf1cdd],{'cwd':join(__dirname,'..'),'env':_0x3bdc16,'stdio':_0x232fcc?[_0xfe6aeb(0x191),_0xfe6aeb(0x191),_0xfe6aeb(0x191)]:_0xfe6aeb(0x16a),'detached':_0x232fcc});return _0x232fcc&&_0x36ee62['unref'](),_0x36ee62;}function startTerminalUI(){const _0x58f78c=a0_0x2abc56,_0x19737e=join(__dirname,_0x58f78c(0x182)),_0x3bc351={...process[_0x58f78c(0x17a)],'LOXIA_PORT':port[_0x58f78c(0x176)](),'LOXIA_HOST':host},_0x2354ef=spawn(_0x58f78c(0x164),[_0x19737e],{'cwd':join(__dirname,'..'),'env':_0x3bc351,'stdio':_0x58f78c(0x16a)});return _0x2354ef;}const commands={'web':async()=>{const _0x56075c=a0_0x2abc56;console[_0x56075c(0x15d)](_0x56075c(0x157));const _0x46fbcc=startServer(![]);console[_0x56075c(0x15d)](_0x56075c(0x18a));const _0xcc7ca=await waitForServer(host,port);_0xcc7ca?(console[_0x56075c(0x15d)](_0x56075c(0x16c)+serverUrl),openBrowser(serverUrl)):console[_0x56075c(0x15d)](_0x56075c(0x16f)+serverUrl+_0x56075c(0x18d)),process['on'](_0x56075c(0x161),()=>_0x46fbcc[_0x56075c(0x166)](_0x56075c(0x161))),process['on'](_0x56075c(0x19b),()=>_0x46fbcc['kill'](_0x56075c(0x19b))),_0x46fbcc['on'](_0x56075c(0x162),_0x593604=>process[_0x56075c(0x162)](_0x593604||0x0));},'plus-web':async()=>{const _0x2a7e7f=a0_0x2abc56;await commands[_0x2a7e7f(0x195)]();},'terminal':async()=>{const _0x3be28d=a0_0x2abc56;console[_0x3be28d(0x15d)](_0x3be28d(0x172));const _0x231624=await checkServerRunning(host,port);!_0x231624&&(console[_0x3be28d(0x15a)](_0x3be28d(0x185)+serverUrl),console[_0x3be28d(0x15a)]('\x0aPlease\x20start\x20the\x20server\x20first:'),console[_0x3be28d(0x15a)](_0x3be28d(0x168)),console[_0x3be28d(0x15a)]('\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a'),process[_0x3be28d(0x162)](0x1));console[_0x3be28d(0x15d)]('Server\x20is\x20running\x20at\x20'+serverUrl),console[_0x3be28d(0x15d)](_0x3be28d(0x17c));const _0xdd692e=startTerminalUI();process['on'](_0x3be28d(0x161),()=>_0xdd692e[_0x3be28d(0x166)](_0x3be28d(0x161))),process['on'](_0x3be28d(0x19b),()=>_0xdd692e['kill']('SIGTERM')),_0xdd692e['on']('exit',_0x205308=>process['exit'](_0x205308||0x0));},'plus-terminal':async()=>{const _0xf6b68b=a0_0x2abc56;console[_0xf6b68b(0x15d)](_0xf6b68b(0x167));const _0x12bc0b=startServer(!![]),_0x1e7e91=await waitForServer(host,port);!_0x1e7e91&&(console[_0xf6b68b(0x15a)](_0xf6b68b(0x163)),process[_0xf6b68b(0x162)](0x1));console[_0xf6b68b(0x15d)](_0xf6b68b(0x183)+serverUrl),console[_0xf6b68b(0x15d)]('Starting\x20Terminal\x20UI...\x0a');const _0x56a543=startTerminalUI();_0x56a543['on'](_0xf6b68b(0x162),_0x2b4012=>{const _0x371f76=_0xf6b68b;console[_0x371f76(0x15d)]('\x0aShutting\x20down\x20server...');try{process['kill'](_0x12bc0b[_0x371f76(0x158)],_0x371f76(0x19b));}catch(_0x1dbd7c){}process[_0x371f76(0x162)](_0x2b4012||0x0);}),process['on']('SIGINT',()=>{const _0x3f5b67=_0xf6b68b;_0x56a543[_0x3f5b67(0x166)](_0x3f5b67(0x161));}),process['on'](_0xf6b68b(0x19b),()=>{const _0x5271ee=_0xf6b68b;_0x56a543[_0x5271ee(0x166)](_0x5271ee(0x19b));});}};commands[command]?commands[command]()[a0_0x2abc56(0x15b)](_0x5e551c=>{const _0x387d43=a0_0x2abc56;console[_0x387d43(0x15a)](_0x387d43(0x190),_0x5e551c[_0x387d43(0x17b)]),process[_0x387d43(0x162)](0x1);}):(console['error'](a0_0x2abc56(0x154)+command),console[a0_0x2abc56(0x15a)](a0_0x2abc56(0x15f)),process['exit'](0x1));function a0_0x1d86(){const _0x1422fa=['SIGINT','exit','\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.','node','statusCode','kill','Starting\x20Loxia\x20server\x20in\x20background...','\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI','Loxia\x20Autopilot\x20One\x20v','inherit','darwin','\x0aOpening\x20Web\x20UI\x20at\x20','setTimeout','86665yDnlfv','\x0aServer\x20may\x20still\x20be\x20starting.\x20Open\x20','4327839okHvgX','Please\x20open\x20manually:\x20','Checking\x20if\x20server\x20is\x20running...','package.json','--help','--version','toString','6850349aojlsH','utf8','startsWith','env','message','Starting\x20Terminal\x20UI...\x0a','45899CdeYYL','26493MJmmow','includes','LOXIA_HOST','678450TFUbgk','loxia-terminal.js','Server\x20running\x20at\x20','ceil','\x0aServer\x20is\x20not\x20running\x20at\x20','localhost','28pdGtNw','platform','index.js','Waiting\x20for\x20server\x20to\x20start...','parse','xdg-open\x20\x22','\x20manually.','version','32oyrFTK','Error:','ignore','help','8ZMWqUX','win32','web','--host','slice','124380joixMz','destroy','http://','SIGTERM','Unknown\x20command:\x20','get','src','Starting\x20Loxia\x20server...\x0a','pid','host','error','catch','156AClHEO','log','Could\x20not\x20open\x20browser\x20automatically.','Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.','argv'];a0_0x1d86=function(){return _0x1422fa;};return a0_0x1d86();}
3
+ const a0_0x1cf3b5=a0_0x427f;(function(_0x251f47,_0x335b46){const _0x580400=a0_0x427f,_0x51d01d=_0x251f47();while(!![]){try{const _0x51f3ee=-parseInt(_0x580400(0x213))/0x1+-parseInt(_0x580400(0x1f8))/0x2*(-parseInt(_0x580400(0x223))/0x3)+-parseInt(_0x580400(0x228))/0x4+parseInt(_0x580400(0x210))/0x5+-parseInt(_0x580400(0x1f7))/0x6*(parseInt(_0x580400(0x219))/0x7)+-parseInt(_0x580400(0x222))/0x8*(-parseInt(_0x580400(0x1ff))/0x9)+-parseInt(_0x580400(0x224))/0xa;if(_0x51f3ee===_0x335b46)break;else _0x51d01d['push'](_0x51d01d['shift']());}catch(_0x2ba819){_0x51d01d['push'](_0x51d01d['shift']());}}}(a0_0x26d3,0x99221));import{fileURLToPath}from'url';import{dirname,join}from'path';import{spawn,exec}from'child_process';function a0_0x427f(_0x55836e,_0x31f002){_0x55836e=_0x55836e-0x1f4;const _0x26d3c8=a0_0x26d3();let _0x427f90=_0x26d3c8[_0x55836e];return _0x427f90;}import{readFileSync}from'fs';import a0_0x56f43f from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x1cf3b5(0x1fe),SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process[a0_0x1cf3b5(0x221)][a0_0x1cf3b5(0x201)](0x2),command=args[0x0]&&!args[0x0]['startsWith']('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args[a0_0x1cf3b5(0x227)](a0_0x1cf3b5(0x218))||args[a0_0x1cf3b5(0x227)]('-h'),'version':args[a0_0x1cf3b5(0x227)](a0_0x1cf3b5(0x20e))||args['includes']('-v')};function a0_0x26d3(){const _0xace574=['setTimeout','http://','Starting\x20Terminal\x20UI...\x0a','index.js','toString','\x20manually.','error','package.json','catch','--host','ignore','Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.',')\x0a\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x20message\x0a\x20\x20-v,\x20--version\x20\x20\x20\x20\x20Show\x20version\x20number\x0a\x0aExamples:\x0a\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20open\x20browser\x0a\x20\x20loxia\x20terminal\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Connect\x20Terminal\x20UI\x20to\x20running\x20server\x0a\x20\x20loxia\x20plus-terminal\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a\x20\x20loxia\x20web\x20--port\x203000\x20\x20\x20\x20#\x20Use\x20custom\x20port\x0a\x0aQuick\x20Start:\x0a\x20\x201.\x20Run\x20\x27loxia\x20web\x27\x20to\x20start\x20with\x20Web\x20UI\x0a\x20\x202.\x20Or\x20run\x20\x27loxia\x20plus-terminal\x27\x20for\x20Terminal\x20UI\x20experience\x0a\x0aDocumentation:\x0a\x20\x20https://autopilot.loxia.ai\x0a\x0a','\x0aPlease\x20start\x20the\x20server\x20first:','279306HLupDZ','4ScyvLu','parse','exit','\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI','src','win32','localhost','3177oIWbVM','open\x20\x22','slice','get','help','pid','/api/health','Waiting\x20for\x20server\x20to\x20start...','destroy','Please\x20open\x20manually:\x20','Could\x20not\x20open\x20browser\x20automatically.','log','utf8','\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.','darwin','--version','kill','3101605pdKdwi',')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20','\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a','694504HPPHZd','length','Checking\x20if\x20server\x20is\x20running...','env','Unknown\x20command:\x20','--help','70VNxgXR','web','Server\x20is\x20running\x20at\x20','SIGINT','host','Error:','SIGTERM','node','argv','21608NiVhnk','1119867VuBQWJ','1171530fhwrQq','platform','inherit','includes','1663808jHNbmv','port','\x0aShutting\x20down\x20server...','LOXIA_HOST','\x0aServer\x20may\x20still\x20be\x20starting.\x20Open\x20','\x0aServer\x20is\x20not\x20running\x20at\x20','version','xdg-open\x20\x22','statusCode'];a0_0x26d3=function(){return _0xace574;};return a0_0x26d3();}for(let i=0x0;i<args[a0_0x1cf3b5(0x214)];i++){args[i]==='--port'&&args[i+0x1]&&(flags[a0_0x1cf3b5(0x229)]=parseInt(args[i+0x1],0xa)),args[i]===a0_0x1cf3b5(0x23a)&&args[i+0x1]&&(flags[a0_0x1cf3b5(0x21d)]=args[i+0x1]);}const port=flags[a0_0x1cf3b5(0x229)]||DEFAULT_PORT,host=flags[a0_0x1cf3b5(0x21d)]||DEFAULT_HOST,serverUrl=a0_0x1cf3b5(0x232)+host+':'+port;if(flags[a0_0x1cf3b5(0x22e)]){const pkgPath=join(__dirname,'..',a0_0x1cf3b5(0x238)),pkg=JSON[a0_0x1cf3b5(0x1f9)](readFileSync(pkgPath,a0_0x1cf3b5(0x20b)));console['log']('Loxia\x20Autopilot\x20One\x20v'+pkg[a0_0x1cf3b5(0x22e)]),process[a0_0x1cf3b5(0x1fa)](0x0);}if(flags[a0_0x1cf3b5(0x203)]||!command){const pkgPath=join(__dirname,'..','package.json'),pkg=JSON['parse'](readFileSync(pkgPath,'utf8'));console[a0_0x1cf3b5(0x20a)]('\x0aLoxia\x20Autopilot\x20One\x20v'+pkg[a0_0x1cf3b5(0x22e)]+'\x20-\x20AI\x20Agent\x20System\x0a\x0aUsage:\x0a\x20\x20loxia\x20<command>\x20[options]\x0a\x0aCommands:\x0a\x20\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20+\x20open\x20Web\x20UI\x20in\x20browser\x0a\x20\x20terminal\x20\x20\x20\x20\x20\x20\x20\x20Start\x20Terminal\x20UI\x20(server\x20must\x20be\x20running)\x0a\x20\x20plus-web\x20\x20\x20\x20\x20\x20\x20\x20Alias\x20for\x20\x27web\x27\x0a\x20\x20plus-terminal\x20\x20\x20Start\x20server\x20+\x20Terminal\x20UI\x20together\x0a\x0aOptions:\x0a\x20\x20--port\x20<number>\x20\x20\x20Specify\x20port\x20(default:\x20'+DEFAULT_PORT+a0_0x1cf3b5(0x211)+DEFAULT_HOST+a0_0x1cf3b5(0x1f5)),process['exit'](0x0);}async function checkServerRunning(_0x1ee160,_0xa1e672,_0x4dac60=0x1){for(let _0x4620e9=0x0;_0x4620e9<_0x4dac60;_0x4620e9++){const _0x1bd8ba=await new Promise(_0x3afe98=>{const _0x49d120=a0_0x427f,_0x26671f=a0_0x56f43f[_0x49d120(0x202)](_0x49d120(0x232)+_0x1ee160+':'+_0xa1e672+_0x49d120(0x205),_0x5474e3=>{const _0xdb4741=_0x49d120;_0x3afe98(_0x5474e3[_0xdb4741(0x230)]===0xc8);});_0x26671f['on'](_0x49d120(0x237),()=>_0x3afe98(![])),_0x26671f[_0x49d120(0x231)](0x7d0,()=>{const _0x7e8e0d=_0x49d120;_0x26671f[_0x7e8e0d(0x207)](),_0x3afe98(![]);});});if(_0x1bd8ba)return!![];_0x4620e9<_0x4dac60-0x1&&await new Promise(_0x91950f=>setTimeout(_0x91950f,SERVER_CHECK_INTERVAL));}return![];}async function waitForServer(_0x4b5f1d,_0x205ea7,_0x2a4325=SERVER_STARTUP_TIMEOUT){const _0x40a0fb=Math['ceil'](_0x2a4325/SERVER_CHECK_INTERVAL);return checkServerRunning(_0x4b5f1d,_0x205ea7,_0x40a0fb);}function openBrowser(_0x3a61ee){const _0x1898bd=a0_0x1cf3b5,_0x47c2fe=process[_0x1898bd(0x225)];let _0x19a3e7;if(_0x47c2fe===_0x1898bd(0x20d))_0x19a3e7=_0x1898bd(0x200)+_0x3a61ee+'\x22';else _0x47c2fe===_0x1898bd(0x1fd)?_0x19a3e7='start\x20\x22\x22\x20\x22'+_0x3a61ee+'\x22':_0x19a3e7=_0x1898bd(0x22f)+_0x3a61ee+'\x22';exec(_0x19a3e7,_0x47235d=>{const _0x17d41e=_0x1898bd;_0x47235d&&(console['log'](_0x17d41e(0x209)),console[_0x17d41e(0x20a)](_0x17d41e(0x208)+_0x3a61ee));});}function startServer(_0x3a06c5=![]){const _0x1f13d=a0_0x1cf3b5,_0x8ad2b8={...process[_0x1f13d(0x216)],'LOXIA_PORT':port[_0x1f13d(0x235)](),'PORT':port[_0x1f13d(0x235)]()};flags[_0x1f13d(0x21d)]&&(_0x8ad2b8[_0x1f13d(0x22b)]=flags[_0x1f13d(0x21d)]);const _0x23bb31=join(__dirname,'..',_0x1f13d(0x1fc),_0x1f13d(0x234)),_0xc11f2b=spawn(_0x1f13d(0x220),[_0x23bb31],{'cwd':join(__dirname,'..'),'env':_0x8ad2b8,'stdio':_0x3a06c5?[_0x1f13d(0x23b),'ignore','ignore']:_0x1f13d(0x226),'detached':_0x3a06c5});return _0x3a06c5&&_0xc11f2b['unref'](),_0xc11f2b;}function startTerminalUI(){const _0x1e120b=a0_0x1cf3b5,_0x462d77=join(__dirname,'loxia-terminal.js'),_0x43cf34={...process[_0x1e120b(0x216)],'LOXIA_PORT':port['toString'](),'LOXIA_HOST':host},_0x1488b2=spawn('node',[_0x462d77],{'cwd':join(__dirname,'..'),'env':_0x43cf34,'stdio':_0x1e120b(0x226)});return _0x1488b2;}const commands={'web':async()=>{const _0x671bb7=a0_0x1cf3b5;console[_0x671bb7(0x20a)]('Starting\x20Loxia\x20server...\x0a');const _0x78ff55=startServer(![]);console[_0x671bb7(0x20a)](_0x671bb7(0x206));const _0x1d6fd1=await waitForServer(host,port);_0x1d6fd1?(console[_0x671bb7(0x20a)]('\x0aOpening\x20Web\x20UI\x20at\x20'+serverUrl),openBrowser(serverUrl)):console[_0x671bb7(0x20a)](_0x671bb7(0x22c)+serverUrl+_0x671bb7(0x236)),process['on'](_0x671bb7(0x21c),()=>_0x78ff55['kill'](_0x671bb7(0x21c))),process['on'](_0x671bb7(0x21f),()=>_0x78ff55[_0x671bb7(0x20f)]('SIGTERM')),_0x78ff55['on'](_0x671bb7(0x1fa),_0x5c6727=>process['exit'](_0x5c6727||0x0));},'plus-web':async()=>{const _0x43b846=a0_0x1cf3b5;await commands[_0x43b846(0x21a)]();},'terminal':async()=>{const _0x4c2f50=a0_0x1cf3b5;console[_0x4c2f50(0x20a)](_0x4c2f50(0x215));const _0x2d9bbf=await checkServerRunning(host,port);!_0x2d9bbf&&(console['error'](_0x4c2f50(0x22d)+serverUrl),console[_0x4c2f50(0x237)](_0x4c2f50(0x1f6)),console[_0x4c2f50(0x237)](_0x4c2f50(0x1fb)),console[_0x4c2f50(0x237)](_0x4c2f50(0x212)),process[_0x4c2f50(0x1fa)](0x1));console[_0x4c2f50(0x20a)](_0x4c2f50(0x21b)+serverUrl),console[_0x4c2f50(0x20a)](_0x4c2f50(0x233));const _0x4c688a=startTerminalUI();process['on']('SIGINT',()=>_0x4c688a['kill'](_0x4c2f50(0x21c))),process['on'](_0x4c2f50(0x21f),()=>_0x4c688a[_0x4c2f50(0x20f)](_0x4c2f50(0x21f))),_0x4c688a['on'](_0x4c2f50(0x1fa),_0xc23a12=>process['exit'](_0xc23a12||0x0));},'plus-terminal':async()=>{const _0x332f3b=a0_0x1cf3b5;console[_0x332f3b(0x20a)]('Starting\x20Loxia\x20server\x20in\x20background...');const _0x38b33b=startServer(!![]),_0x4f3f5e=await waitForServer(host,port);!_0x4f3f5e&&(console[_0x332f3b(0x237)](_0x332f3b(0x20c)),process[_0x332f3b(0x1fa)](0x1));console[_0x332f3b(0x20a)]('Server\x20running\x20at\x20'+serverUrl),console[_0x332f3b(0x20a)](_0x332f3b(0x233));const _0x16d2c2=startTerminalUI();_0x16d2c2['on'](_0x332f3b(0x1fa),_0xf48d5=>{const _0x57a3f1=_0x332f3b;console[_0x57a3f1(0x20a)](_0x57a3f1(0x22a));try{process['kill'](_0x38b33b[_0x57a3f1(0x204)],_0x57a3f1(0x21f));}catch(_0x3105e9){}process[_0x57a3f1(0x1fa)](_0xf48d5||0x0);}),process['on'](_0x332f3b(0x21c),()=>{_0x16d2c2['kill']('SIGINT');}),process['on']('SIGTERM',()=>{const _0x1cd371=_0x332f3b;_0x16d2c2['kill'](_0x1cd371(0x21f));});}};commands[command]?commands[command]()[a0_0x1cf3b5(0x239)](_0x1d8285=>{const _0x200c92=a0_0x1cf3b5;console[_0x200c92(0x237)](_0x200c92(0x21e),_0x1d8285['message']),process['exit'](0x1);}):(console['error'](a0_0x1cf3b5(0x217)+command),console[a0_0x1cf3b5(0x237)](a0_0x1cf3b5(0x1f4)),process['exit'](0x1));
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x4e850b=a0_0x9d8f;(function(_0x8480bc,_0x59db32){const _0x437d35=a0_0x9d8f,_0x253e27=_0x8480bc();while(!![]){try{const _0x1069cf=-parseInt(_0x437d35(0x117))/0x1*(-parseInt(_0x437d35(0x148))/0x2)+-parseInt(_0x437d35(0x11a))/0x3*(parseInt(_0x437d35(0x132))/0x4)+-parseInt(_0x437d35(0x12d))/0x5+parseInt(_0x437d35(0x12a))/0x6*(parseInt(_0x437d35(0x11f))/0x7)+-parseInt(_0x437d35(0x119))/0x8*(parseInt(_0x437d35(0x115))/0x9)+-parseInt(_0x437d35(0x149))/0xa*(-parseInt(_0x437d35(0x142))/0xb)+parseInt(_0x437d35(0x137))/0xc;if(_0x1069cf===_0x59db32)break;else _0x253e27['push'](_0x253e27['shift']());}catch(_0x1063aa){_0x253e27['push'](_0x253e27['shift']());}}}(a0_0x495f,0xee3df));import{spawn}from'child_process';import a0_0x2f75a7 from'net';function a0_0x9d8f(_0x2de049,_0x165d18){_0x2de049=_0x2de049-0x115;const _0x495fd0=a0_0x495f();let _0x9d8fe0=_0x495fd0[_0x2de049];return _0x9d8fe0;}function a0_0x495f(){const _0x5b5aca=['error','🔍\x20Checking\x20if\x20server\x20is\x20running\x20at\x20','LOXIA_HOST','stderr','destroy','🎨\x20Launching\x20Ink-based\x20Terminal\x20UI...','248743buLgRq','now','--host','setTimeout','--port','connect','62ZjukKa','30jEsaoP','1655523hGjCZA','dirname','41803ooDGQZ','join','72zzLutE','418383ugSmQA','\x20\x20\x201.\x20Make\x20sure\x20no\x20other\x20process\x20is\x20using\x20port\x208080','LOXIA_PORT','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','bin/cli.js','7IUdidy','\x20\x20Loxia\x20Autopilot\x20One\x20-\x20Terminal\x20UI','exit','message','✗\x20Server\x20is\x20not\x20running','timeout','node','...','log','✓\x20Server\x20is\x20already\x20running\x20at\x20','\x20\x20\x203.\x20Check\x20logs\x20for\x20more\x20details','7432098Rggoxx','web','length','1212530lMqGdh','❌\x20Failed\x20to\x20start\x20Terminal\x20UI:','slice','🚀\x20Starting\x20Loxia\x20server...','pipe','28QawvOl','✓\x20Server\x20started\x20at\x20','data','toString','Failed\x20to\x20start\x20server:','14972160EGghxB','env','Socket','\x20\x20\x202.\x20Try\x20running\x20the\x20server\x20manually:\x20node\x20bin/cli.js','argv'];a0_0x495f=function(){return _0x5b5aca;};return a0_0x495f();}import a0_0x2a0f77 from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=a0_0x2a0f77[a0_0x4e850b(0x116)](__filename),projectRoot=a0_0x2a0f77[a0_0x4e850b(0x116)](__dirname),DEFAULT_PORT=0x1f90,DEFAULT_HOST='localhost',SERVER_STARTUP_TIMEOUT=0x2710;async function isServerRunning(_0x3336b4,_0x2ad8f9){return new Promise(_0x34a330=>{const _0x270046=a0_0x9d8f,_0x3aa8c1=new a0_0x2f75a7[(_0x270046(0x139))]();_0x3aa8c1[_0x270046(0x145)](0x7d0),_0x3aa8c1['on']('connect',()=>{const _0x52722f=_0x270046;_0x3aa8c1[_0x52722f(0x140)](),_0x34a330(!![]);}),_0x3aa8c1['on'](_0x270046(0x124),()=>{const _0x5572ba=_0x270046;_0x3aa8c1[_0x5572ba(0x140)](),_0x34a330(![]);}),_0x3aa8c1['on'](_0x270046(0x13c),()=>{_0x3aa8c1['destroy'](),_0x34a330(![]);}),_0x3aa8c1[_0x270046(0x147)](_0x2ad8f9,_0x3336b4);});}async function startServer(_0x4f486a,_0x3dadbc){const _0x9e8bde=a0_0x4e850b;return console[_0x9e8bde(0x127)](_0x9e8bde(0x130)),new Promise((_0x14b156,_0x552edc)=>{const _0x2e0a2f=_0x9e8bde,_0x59675a=spawn(_0x2e0a2f(0x125),[a0_0x2a0f77[_0x2e0a2f(0x118)](projectRoot,_0x2e0a2f(0x11e)),'--ui',_0x2e0a2f(0x12b),'--host',_0x4f486a,_0x2e0a2f(0x146),_0x3dadbc[_0x2e0a2f(0x135)]()],{'detached':![],'stdio':['ignore',_0x2e0a2f(0x131),'pipe']});_0x59675a['stdout']['on']('data',()=>{}),_0x59675a[_0x2e0a2f(0x13f)]['on'](_0x2e0a2f(0x134),()=>{}),_0x59675a['on'](_0x2e0a2f(0x13c),_0x58d3ba=>{const _0x1ebd40=_0x2e0a2f;console[_0x1ebd40(0x13c)](_0x1ebd40(0x136),_0x58d3ba['message']),_0x552edc(_0x58d3ba);});const _0x51a40b=Date[_0x2e0a2f(0x143)](),_0x3e88c3=setInterval(async()=>{const _0x1461e8=_0x2e0a2f,_0x3aac3d=await isServerRunning(_0x4f486a,_0x3dadbc);if(_0x3aac3d)clearInterval(_0x3e88c3),console[_0x1461e8(0x127)](_0x1461e8(0x133)+_0x4f486a+':'+_0x3dadbc),_0x14b156();else Date[_0x1461e8(0x143)]()-_0x51a40b>SERVER_STARTUP_TIMEOUT&&(clearInterval(_0x3e88c3),_0x59675a['kill'](),_0x552edc(new Error('Server\x20startup\x20timeout')));},0x1f4);});}async function main(){const _0x143002=a0_0x4e850b;try{console[_0x143002(0x127)](_0x143002(0x11d)),console[_0x143002(0x127)](_0x143002(0x120)),console[_0x143002(0x127)](_0x143002(0x11d)),console[_0x143002(0x127)]('');const _0x268a89=process[_0x143002(0x13b)][_0x143002(0x12f)](0x2);let _0x1f2a96=DEFAULT_HOST,_0x58e90b=DEFAULT_PORT;for(let _0x5df5b3=0x0;_0x5df5b3<_0x268a89[_0x143002(0x12c)];_0x5df5b3++){if(_0x268a89[_0x5df5b3]===_0x143002(0x144)&&_0x268a89[_0x5df5b3+0x1])_0x1f2a96=_0x268a89[_0x5df5b3+0x1],_0x5df5b3++;else _0x268a89[_0x5df5b3]===_0x143002(0x146)&&_0x268a89[_0x5df5b3+0x1]&&(_0x58e90b=parseInt(_0x268a89[_0x5df5b3+0x1],0xa),_0x5df5b3++);}console[_0x143002(0x127)](_0x143002(0x13d)+_0x1f2a96+':'+_0x58e90b+_0x143002(0x126));const _0x266eab=await isServerRunning(_0x1f2a96,_0x58e90b);!_0x266eab?(console[_0x143002(0x127)](_0x143002(0x123)),await startServer(_0x1f2a96,_0x58e90b)):console[_0x143002(0x127)](_0x143002(0x128)+_0x1f2a96+':'+_0x58e90b),console[_0x143002(0x127)](''),console[_0x143002(0x127)](_0x143002(0x141)),console[_0x143002(0x127)](''),await new Promise(_0x3d230f=>setTimeout(_0x3d230f,0x1f4)),process[_0x143002(0x138)][_0x143002(0x13e)]=_0x1f2a96,process[_0x143002(0x138)][_0x143002(0x11c)]=_0x58e90b[_0x143002(0x135)](),await import('../src/interfaces/terminal/index.js');}catch(_0x58e7e9){console[_0x143002(0x13c)](''),console[_0x143002(0x13c)](_0x143002(0x12e)),console['error']('\x20\x20',_0x58e7e9[_0x143002(0x122)]),console[_0x143002(0x13c)](''),console['error']('💡\x20Troubleshooting:'),console[_0x143002(0x13c)](_0x143002(0x11b)),console['error'](_0x143002(0x13a)),console[_0x143002(0x13c)](_0x143002(0x129)),console[_0x143002(0x13c)](''),process[_0x143002(0x121)](0x1);}}main();
3
+ const a0_0x1e09bc=a0_0x975a;function a0_0x975a(_0x2bb7b6,_0x3aacfd){_0x2bb7b6=_0x2bb7b6-0xcd;const _0x3aff5=a0_0x3aff();let _0x975aca=_0x3aff5[_0x2bb7b6];return _0x975aca;}(function(_0x21d199,_0x1411cc){const _0x4fcf9f=a0_0x975a,_0x1645a4=_0x21d199();while(!![]){try{const _0x2a1464=-parseInt(_0x4fcf9f(0xfd))/0x1+parseInt(_0x4fcf9f(0xed))/0x2+parseInt(_0x4fcf9f(0xf2))/0x3*(parseInt(_0x4fcf9f(0xdd))/0x4)+parseInt(_0x4fcf9f(0xe9))/0x5*(parseInt(_0x4fcf9f(0xd0))/0x6)+-parseInt(_0x4fcf9f(0xf1))/0x7*(parseInt(_0x4fcf9f(0xcd))/0x8)+parseInt(_0x4fcf9f(0xd6))/0x9+parseInt(_0x4fcf9f(0xf7))/0xa*(-parseInt(_0x4fcf9f(0xe1))/0xb);if(_0x2a1464===_0x1411cc)break;else _0x1645a4['push'](_0x1645a4['shift']());}catch(_0x43aba8){_0x1645a4['push'](_0x1645a4['shift']());}}}(a0_0x3aff,0x7d795));import{spawn}from'child_process';import a0_0x20facb from'net';import a0_0x1eb21c from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=a0_0x1eb21c[a0_0x1e09bc(0xdb)](__filename),projectRoot=a0_0x1eb21c[a0_0x1e09bc(0xdb)](__dirname),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x1e09bc(0xee),SERVER_STARTUP_TIMEOUT=0x2710;async function isServerRunning(_0x34f518,_0x1d707f){return new Promise(_0x73f994=>{const _0x5001ff=a0_0x975a,_0x410be7=new a0_0x20facb[(_0x5001ff(0xff))]();_0x410be7[_0x5001ff(0xe5)](0x7d0),_0x410be7['on']('connect',()=>{_0x410be7['destroy'](),_0x73f994(!![]);}),_0x410be7['on']('timeout',()=>{_0x410be7['destroy'](),_0x73f994(![]);}),_0x410be7['on'](_0x5001ff(0xd9),()=>{_0x410be7['destroy'](),_0x73f994(![]);}),_0x410be7[_0x5001ff(0xf3)](_0x1d707f,_0x34f518);});}async function startServer(_0x4f1a4,_0x3b9d2c){const _0x1a2240=a0_0x1e09bc;return console[_0x1a2240(0xde)]('🚀\x20Starting\x20Loxia\x20server...'),new Promise((_0x269e60,_0x5f0c9d)=>{const _0x5620a3=_0x1a2240,_0x404a93=spawn(_0x5620a3(0xfc),[a0_0x1eb21c[_0x5620a3(0xef)](projectRoot,'bin/cli.js'),_0x5620a3(0xdf),'web',_0x5620a3(0xfe),_0x4f1a4,'--port',_0x3b9d2c[_0x5620a3(0xd4)]()],{'detached':![],'stdio':[_0x5620a3(0xf8),_0x5620a3(0xe4),_0x5620a3(0xe4)]});_0x404a93[_0x5620a3(0xe8)]['on'](_0x5620a3(0xd8),()=>{}),_0x404a93[_0x5620a3(0xda)]['on']('data',()=>{}),_0x404a93['on'](_0x5620a3(0xd9),_0x5d0aff=>{const _0x2bb2f5=_0x5620a3;console[_0x2bb2f5(0xd9)](_0x2bb2f5(0xd7),_0x5d0aff[_0x2bb2f5(0xd2)]),_0x5f0c9d(_0x5d0aff);});const _0x3f0cc1=Date['now'](),_0x2289c7=setInterval(async()=>{const _0x32cf0f=_0x5620a3,_0x154a03=await isServerRunning(_0x4f1a4,_0x3b9d2c);if(_0x154a03)clearInterval(_0x2289c7),console['log'](_0x32cf0f(0xec)+_0x4f1a4+':'+_0x3b9d2c),_0x269e60();else Date[_0x32cf0f(0xf9)]()-_0x3f0cc1>SERVER_STARTUP_TIMEOUT&&(clearInterval(_0x2289c7),_0x404a93[_0x32cf0f(0xf5)](),_0x5f0c9d(new Error(_0x32cf0f(0xf0))));},0x1f4);});}async function main(){const _0x41a7b2=a0_0x1e09bc;try{console[_0x41a7b2(0xde)](_0x41a7b2(0xe6)),console[_0x41a7b2(0xde)]('\x20\x20Loxia\x20Autopilot\x20One\x20-\x20Terminal\x20UI'),console[_0x41a7b2(0xde)]('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'),console['log']('');const _0x437528=process[_0x41a7b2(0xd1)][_0x41a7b2(0x100)](0x2);let _0x58902c=DEFAULT_HOST,_0x260594=DEFAULT_PORT;for(let _0x345db3=0x0;_0x345db3<_0x437528[_0x41a7b2(0xce)];_0x345db3++){if(_0x437528[_0x345db3]===_0x41a7b2(0xfe)&&_0x437528[_0x345db3+0x1])_0x58902c=_0x437528[_0x345db3+0x1],_0x345db3++;else _0x437528[_0x345db3]===_0x41a7b2(0xd3)&&_0x437528[_0x345db3+0x1]&&(_0x260594=parseInt(_0x437528[_0x345db3+0x1],0xa),_0x345db3++);}console[_0x41a7b2(0xde)](_0x41a7b2(0xe0)+_0x58902c+':'+_0x260594+_0x41a7b2(0xe2));const _0x4dc1d8=await isServerRunning(_0x58902c,_0x260594);!_0x4dc1d8?(console[_0x41a7b2(0xde)](_0x41a7b2(0xeb)),await startServer(_0x58902c,_0x260594)):console['log'](_0x41a7b2(0xdc)+_0x58902c+':'+_0x260594),console[_0x41a7b2(0xde)](''),console[_0x41a7b2(0xde)]('🎨\x20Launching\x20Ink-based\x20Terminal\x20UI...'),console[_0x41a7b2(0xde)](''),await new Promise(_0x594705=>setTimeout(_0x594705,0x1f4)),process[_0x41a7b2(0xf6)][_0x41a7b2(0xfb)]=_0x58902c,process[_0x41a7b2(0xf6)][_0x41a7b2(0xe7)]=_0x260594[_0x41a7b2(0xd4)](),await import(_0x41a7b2(0xe3));}catch(_0x383785){console[_0x41a7b2(0xd9)](''),console['error'](_0x41a7b2(0xd5)),console['error']('\x20\x20',_0x383785[_0x41a7b2(0xd2)]),console[_0x41a7b2(0xd9)](''),console['error'](_0x41a7b2(0xea)),console[_0x41a7b2(0xd9)]('\x20\x20\x201.\x20Make\x20sure\x20no\x20other\x20process\x20is\x20using\x20port\x208080'),console[_0x41a7b2(0xd9)](_0x41a7b2(0xf4)),console[_0x41a7b2(0xd9)](_0x41a7b2(0xfa)),console['error'](''),process[_0x41a7b2(0xcf)](0x1);}}function a0_0x3aff(){const _0x17b4c4=['slice','8LSmYUd','length','exit','6630WjOhKX','argv','message','--port','toString','❌\x20Failed\x20to\x20start\x20Terminal\x20UI:','1622250Ynigdv','Failed\x20to\x20start\x20server:','data','error','stderr','dirname','✓\x20Server\x20is\x20already\x20running\x20at\x20','1292RlBGua','log','--ui','🔍\x20Checking\x20if\x20server\x20is\x20running\x20at\x20','57563OMPWPK','...','../src/interfaces/terminal/index.js','pipe','setTimeout','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','LOXIA_PORT','stdout','1310BFMGes','💡\x20Troubleshooting:','✗\x20Server\x20is\x20not\x20running','✓\x20Server\x20started\x20at\x20','780994qoezWs','localhost','join','Server\x20startup\x20timeout','2333821RbPZBi','6465OtwJzh','connect','\x20\x20\x202.\x20Try\x20running\x20the\x20server\x20manually:\x20node\x20bin/cli.js','kill','env','1130DYpKaJ','ignore','now','\x20\x20\x203.\x20Check\x20logs\x20for\x20more\x20details','LOXIA_HOST','node','117649qOUhNm','--host','Socket'];a0_0x3aff=function(){return _0x17b4c4;};return a0_0x3aff();}main();
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0xff4462=a0_0x2fd9;(function(_0x48918d,_0x5afe01){const _0x5c27ff=a0_0x2fd9,_0x263f51=_0x48918d();while(!![]){try{const _0x1cbec9=parseInt(_0x5c27ff(0x197))/0x1*(-parseInt(_0x5c27ff(0x189))/0x2)+parseInt(_0x5c27ff(0x195))/0x3+parseInt(_0x5c27ff(0x18a))/0x4+-parseInt(_0x5c27ff(0x188))/0x5+parseInt(_0x5c27ff(0x17f))/0x6+-parseInt(_0x5c27ff(0x18f))/0x7*(parseInt(_0x5c27ff(0x183))/0x8)+parseInt(_0x5c27ff(0x19c))/0x9;if(_0x1cbec9===_0x5afe01)break;else _0x263f51['push'](_0x263f51['shift']());}catch(_0x10a417){_0x263f51['push'](_0x263f51['shift']());}}}(a0_0x5974,0x3c6ab));import{startTerminalUI}from'../src/interfaces/terminal/index.js';const args=process[a0_0xff4462(0x1a1)][a0_0xff4462(0x187)](0x2),options={'host':'localhost','port':0x1f90};function a0_0x2fd9(_0x3a1686,_0x4a4959){_0x3a1686=_0x3a1686-0x17a;const _0x597417=a0_0x5974();let _0x2fd90e=_0x597417[_0x3a1686];return _0x2fd90e;}function a0_0x5974(){const _0x5c9eea=['\x20\x20npm\x20run\x20terminal-ui','The\x20terminal\x20UI\x20cannot\x20run\x20in:','\x20\x20-\x20Piped\x20environments\x20(e.g.,\x20|\x20head,\x20|\x20grep)','log','2137429oaypDU','\x0aTerminal\x20UI\x20error:','ERROR:\x20Terminal\x20UI\x20requires\x20an\x20interactive\x20terminal\x20(TTY).','--port','host','port','92712qwTMjQ','error','1UeuDYX','--host','Or\x20use\x20the\x20web\x20UI\x20instead:','\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','Starting\x20Loxia\x20Terminal\x20UI...','4854717rLMmmH','--help','isTTY','exit','length','argv','Connecting\x20to:\x20','stdin','waitUntilExit','catch','\x20\x20-\x20Some\x20CI/CD\x20environments','\x20\x20-\x20Redirected\x20output\x20(e.g.,\x20>\x20file.txt,\x202>&1\x20|\x20...)','2101278osAApP','LOXIA_HOST','then','\x20\x20-\x20Background\x20processes\x20(e.g.,\x20&\x20at\x20the\x20end)','8ZDkeyz','LOXIA_PORT','env','Press\x20Ctrl+C\x20to\x20exit\x0a','slice','1899690qYchTD','798782mPGMeY','1646452BviSgB'];a0_0x5974=function(){return _0x5c9eea;};return a0_0x5974();}for(let i=0x0;i<args[a0_0xff4462(0x1a0)];i++){const arg=args[i];if(arg===a0_0xff4462(0x198)||arg==='-h')options[a0_0xff4462(0x193)]=args[++i];else{if(arg===a0_0xff4462(0x192)||arg==='-p')options[a0_0xff4462(0x194)]=parseInt(args[++i],0xa);else arg===a0_0xff4462(0x19d)&&(console['log'](a0_0xff4462(0x19a)),process[a0_0xff4462(0x19f)](0x0));}}process[a0_0xff4462(0x185)][a0_0xff4462(0x180)]&&(options['host']=process[a0_0xff4462(0x185)][a0_0xff4462(0x180)]);process[a0_0xff4462(0x185)][a0_0xff4462(0x184)]&&(options[a0_0xff4462(0x194)]=parseInt(process['env'][a0_0xff4462(0x184)],0xa));!process[a0_0xff4462(0x17a)][a0_0xff4462(0x19e)]&&(console[a0_0xff4462(0x196)](a0_0xff4462(0x191)),console[a0_0xff4462(0x196)](''),console[a0_0xff4462(0x196)](a0_0xff4462(0x18c)),console[a0_0xff4462(0x196)](a0_0xff4462(0x18d)),console['error'](a0_0xff4462(0x17e)),console[a0_0xff4462(0x196)](a0_0xff4462(0x182)),console[a0_0xff4462(0x196)](a0_0xff4462(0x17d)),console[a0_0xff4462(0x196)](''),console[a0_0xff4462(0x196)]('Please\x20run\x20this\x20command\x20in\x20a\x20real\x20terminal\x20without\x20pipes\x20or\x20redirection:'),console['error'](a0_0xff4462(0x18b)),console[a0_0xff4462(0x196)](''),console[a0_0xff4462(0x196)](a0_0xff4462(0x199)),console[a0_0xff4462(0x196)]('\x20\x20npm\x20start'),process[a0_0xff4462(0x19f)](0x1));console[a0_0xff4462(0x18e)](a0_0xff4462(0x19b)),console[a0_0xff4462(0x18e)](a0_0xff4462(0x1a2)+options['host']+':'+options['port']),console[a0_0xff4462(0x18e)](a0_0xff4462(0x186));const instance=startTerminalUI(options);instance[a0_0xff4462(0x17b)]()[a0_0xff4462(0x181)](()=>{const _0x4ef69c=a0_0xff4462;console[_0x4ef69c(0x18e)]('\x0aTerminal\x20UI\x20exited'),process[_0x4ef69c(0x19f)](0x0);})[a0_0xff4462(0x17c)](_0x1fd63d=>{const _0x4149c6=a0_0xff4462;console[_0x4149c6(0x196)](_0x4149c6(0x190),_0x1fd63d),process[_0x4149c6(0x19f)](0x1);});
3
+ const a0_0x347a8a=a0_0x32f2;(function(_0x86632f,_0x4da94a){const _0x3891cf=a0_0x32f2,_0x4c6a4d=_0x86632f();while(!![]){try{const _0xe15e3f=parseInt(_0x3891cf(0x1cf))/0x1*(parseInt(_0x3891cf(0x1be))/0x2)+parseInt(_0x3891cf(0x1b3))/0x3+parseInt(_0x3891cf(0x1c2))/0x4+-parseInt(_0x3891cf(0x1cb))/0x5+-parseInt(_0x3891cf(0x1bf))/0x6*(parseInt(_0x3891cf(0x1c5))/0x7)+parseInt(_0x3891cf(0x1b4))/0x8+-parseInt(_0x3891cf(0x1ca))/0x9*(parseInt(_0x3891cf(0x1cd))/0xa);if(_0xe15e3f===_0x4da94a)break;else _0x4c6a4d['push'](_0x4c6a4d['shift']());}catch(_0x21a201){_0x4c6a4d['push'](_0x4c6a4d['shift']());}}}(a0_0x9ffa,0xdadec));import{startTerminalUI}from'../src/interfaces/terminal/index.js';const args=process[a0_0x347a8a(0x1ac)][a0_0x347a8a(0x1b7)](0x2),options={'host':a0_0x347a8a(0x1b8),'port':0x1f90};for(let i=0x0;i<args[a0_0x347a8a(0x1c3)];i++){const arg=args[i];if(arg===a0_0x347a8a(0x1c0)||arg==='-h')options[a0_0x347a8a(0x1c7)]=args[++i];else{if(arg===a0_0x347a8a(0x1b5)||arg==='-p')options[a0_0x347a8a(0x1c4)]=parseInt(args[++i],0xa);else arg==='--help'&&(console[a0_0x347a8a(0x1c6)](a0_0x347a8a(0x1ad)),process[a0_0x347a8a(0x1c9)](0x0));}}process[a0_0x347a8a(0x1b1)][a0_0x347a8a(0x1bb)]&&(options[a0_0x347a8a(0x1c7)]=process['env'][a0_0x347a8a(0x1bb)]);process[a0_0x347a8a(0x1b1)]['LOXIA_PORT']&&(options[a0_0x347a8a(0x1c4)]=parseInt(process[a0_0x347a8a(0x1b1)][a0_0x347a8a(0x1cc)],0xa));!process[a0_0x347a8a(0x1ce)]['isTTY']&&(console[a0_0x347a8a(0x1d0)](a0_0x347a8a(0x1c8)),console[a0_0x347a8a(0x1d0)](''),console['error'](a0_0x347a8a(0x1a9)),console[a0_0x347a8a(0x1d0)]('\x20\x20-\x20Piped\x20environments\x20(e.g.,\x20|\x20head,\x20|\x20grep)'),console[a0_0x347a8a(0x1d0)](a0_0x347a8a(0x1ab)),console[a0_0x347a8a(0x1d0)](a0_0x347a8a(0x1b6)),console[a0_0x347a8a(0x1d0)](a0_0x347a8a(0x1b9)),console[a0_0x347a8a(0x1d0)](''),console['error'](a0_0x347a8a(0x1ba)),console[a0_0x347a8a(0x1d0)](a0_0x347a8a(0x1c1)),console[a0_0x347a8a(0x1d0)](''),console[a0_0x347a8a(0x1d0)](a0_0x347a8a(0x1ae)),console[a0_0x347a8a(0x1d0)]('\x20\x20npm\x20start'),process[a0_0x347a8a(0x1c9)](0x1));console['log'](a0_0x347a8a(0x1bd)),console['log'](a0_0x347a8a(0x1bc)+options['host']+':'+options[a0_0x347a8a(0x1c4)]),console[a0_0x347a8a(0x1c6)](a0_0x347a8a(0x1b2));const instance=startTerminalUI(options);function a0_0x9ffa(){const _0x2a1782=['slice','localhost','\x20\x20-\x20Some\x20CI/CD\x20environments','Please\x20run\x20this\x20command\x20in\x20a\x20real\x20terminal\x20without\x20pipes\x20or\x20redirection:','LOXIA_HOST','Connecting\x20to:\x20','Starting\x20Loxia\x20Terminal\x20UI...','17756CEgStp','860838VXqvNu','--host','\x20\x20npm\x20run\x20terminal-ui','1662072rirosh','length','port','49gcWDJG','log','host','ERROR:\x20Terminal\x20UI\x20requires\x20an\x20interactive\x20terminal\x20(TTY).','exit','124461XirpZm','3580160grlFxH','LOXIA_PORT','1560FrChis','stdin','157ohfTuc','error','The\x20terminal\x20UI\x20cannot\x20run\x20in:','catch','\x20\x20-\x20Redirected\x20output\x20(e.g.,\x20>\x20file.txt,\x202>&1\x20|\x20...)','argv','\x0aLoxia\x20Terminal\x20UI\x0a\x0aUsage:\x0a\x20\x20loxia-terminal\x20[options]\x0a\x0aOptions:\x0a\x20\x20--host,\x20-h\x20<host>\x20\x20\x20\x20Backend\x20host\x20(default:\x20localhost)\x0a\x20\x20--port,\x20-p\x20<port>\x20\x20\x20\x20Backend\x20port\x20(default:\x208080)\x0a\x20\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x20message\x0a\x0aEnvironment\x20Variables:\x0a\x20\x20LOXIA_HOST\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Backend\x20host\x0a\x20\x20LOXIA_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Backend\x20port\x0a\x0aExamples:\x0a\x20\x20loxia-terminal\x0a\x20\x20loxia-terminal\x20--host\x20192.168.1.100\x20--port\x203000\x0a\x20\x20LOXIA_HOST=api.example.com\x20LOXIA_PORT=443\x20loxia-terminal\x0a','Or\x20use\x20the\x20web\x20UI\x20instead:','\x0aTerminal\x20UI\x20exited','waitUntilExit','env','Press\x20Ctrl+C\x20to\x20exit\x0a','4225113sKcCvp','12451392dfIybq','--port','\x20\x20-\x20Background\x20processes\x20(e.g.,\x20&\x20at\x20the\x20end)'];a0_0x9ffa=function(){return _0x2a1782;};return a0_0x9ffa();}function a0_0x32f2(_0x43cfb7,_0x40ede4){_0x43cfb7=_0x43cfb7-0x1a9;const _0x9ffa02=a0_0x9ffa();let _0x32f2c2=_0x9ffa02[_0x43cfb7];return _0x32f2c2;}instance[a0_0x347a8a(0x1b0)]()['then'](()=>{const _0x5230dc=a0_0x347a8a;console['log'](_0x5230dc(0x1af)),process[_0x5230dc(0x1c9)](0x0);})[a0_0x347a8a(0x1aa)](_0xac4c72=>{const _0x5f2045=a0_0x347a8a;console[_0x5f2045(0x1d0)]('\x0aTerminal\x20UI\x20error:',_0xac4c72),process[_0x5f2045(0x1c9)](0x1);});
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x5c4b23=a0_0x2b5f;(function(_0x255279,_0x51eda7){const _0x39d590=a0_0x2b5f,_0x3f7a99=_0x255279();while(!![]){try{const _0x4d6ad7=-parseInt(_0x39d590(0x18e))/0x1*(-parseInt(_0x39d590(0x176))/0x2)+parseInt(_0x39d590(0x198))/0x3+parseInt(_0x39d590(0x172))/0x4*(-parseInt(_0x39d590(0x17b))/0x5)+-parseInt(_0x39d590(0x185))/0x6*(-parseInt(_0x39d590(0x1a0))/0x7)+-parseInt(_0x39d590(0x174))/0x8+-parseInt(_0x39d590(0x1a2))/0x9+-parseInt(_0x39d590(0x18f))/0xa*(parseInt(_0x39d590(0x18b))/0xb);if(_0x4d6ad7===_0x51eda7)break;else _0x3f7a99['push'](_0x3f7a99['shift']());}catch(_0x5ac190){_0x3f7a99['push'](_0x3f7a99['shift']());}}}(a0_0x5912,0x9c77c));import{spawn}from'child_process';function a0_0x2b5f(_0x1faf70,_0x5c0780){_0x1faf70=_0x1faf70-0x16e;const _0x591241=a0_0x5912();let _0x2b5f8c=_0x591241[_0x1faf70];return _0x2b5f8c;}import{fileURLToPath}from'url';import{dirname,join}from'path';import a0_0x492670 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),rootDir=join(__dirname,'..'),SERVER_PORT=process['env'][a0_0x5c4b23(0x19e)]||0x1f90,STARTUP_WAIT=0x7d0;let serverProcess=null;async function checkServerReady(_0x2933a6=0xa,_0x317290=0x1f4){const _0x1a6d23=a0_0x5c4b23;for(let _0xe51ffa=0x0;_0xe51ffa<_0x2933a6;_0xe51ffa++){try{return await new Promise((_0x7d5a28,_0x86caf4)=>{const _0xad59fc=a0_0x2b5f,_0x45687f=a0_0x492670[_0xad59fc(0x188)](_0xad59fc(0x1a1)+SERVER_PORT+'/health',_0xb3f44=>{const _0x1b900d=_0xad59fc;_0xb3f44[_0x1b900d(0x18d)]===0xc8?_0x7d5a28():_0x86caf4(new Error(_0x1b900d(0x186)+_0xb3f44['statusCode']));});_0x45687f['on'](_0xad59fc(0x177),_0x86caf4),_0x45687f[_0xad59fc(0x19a)](0x3e8,()=>{_0x45687f['destroy'](),_0x86caf4(new Error('Timeout'));});}),console[_0x1a6d23(0x183)](_0x1a6d23(0x180)),!![];}catch(_0x532f18){_0xe51ffa<_0x2933a6-0x1&&await new Promise(_0xd6af9f=>setTimeout(_0xd6af9f,_0x317290));}}return console[_0x1a6d23(0x183)](_0x1a6d23(0x170)),![];}async function startServer(){return new Promise(_0x144807=>{const _0x2761b4=a0_0x2b5f;console['log'](_0x2761b4(0x18c));const _0xe789aa=join(rootDir,_0x2761b4(0x17e),_0x2761b4(0x182));serverProcess=spawn(_0x2761b4(0x171),[_0xe789aa],{'cwd':rootDir,'env':{...process[_0x2761b4(0x19f)]},'stdio':['ignore',_0x2761b4(0x175),_0x2761b4(0x175)],'detached':![]}),serverProcess[_0x2761b4(0x184)]['on'](_0x2761b4(0x17f),_0x3cf444=>{const _0x54a433=_0x2761b4,_0x428b25=_0x3cf444[_0x54a433(0x191)]()[_0x54a433(0x19b)]();_0x428b25&&console[_0x54a433(0x183)](_0x54a433(0x195)+_0x428b25);}),serverProcess[_0x2761b4(0x173)]['on'](_0x2761b4(0x17f),_0x491057=>{const _0x3d60f6=_0x2761b4,_0xeb930=_0x491057[_0x3d60f6(0x191)]()[_0x3d60f6(0x19b)]();_0xeb930&&!_0xeb930[_0x3d60f6(0x199)](_0x3d60f6(0x18a))&&console['error'](_0x3d60f6(0x17a)+_0xeb930);}),serverProcess['on'](_0x2761b4(0x177),_0x3530a4=>{const _0xcfb878=_0x2761b4;console[_0xcfb878(0x177)](_0xcfb878(0x197),_0x3530a4[_0xcfb878(0x17c)]),process[_0xcfb878(0x189)](0x1);}),serverProcess['on'](_0x2761b4(0x189),(_0x2fc614,_0x6b789)=>{const _0x6123d0=_0x2761b4;_0x2fc614!==null&&_0x2fc614!==0x0&&(console[_0x6123d0(0x177)](_0x6123d0(0x187)+_0x2fc614),process[_0x6123d0(0x189)](_0x2fc614));}),setTimeout(_0x144807,STARTUP_WAIT);});}async function startTerminalUI(){const _0x5aa366=a0_0x5c4b23;console['log'](_0x5aa366(0x196)),console[_0x5aa366(0x183)]('');const _0x2dd182=join(rootDir,'bin','loxia-terminal.js'),_0x478954=spawn(_0x5aa366(0x171),[_0x2dd182],{'cwd':rootDir,'env':{...process[_0x5aa366(0x19f)]},'stdio':'inherit'});return _0x478954['on']('error',_0x1644ce=>{const _0x19edf8=_0x5aa366;console[_0x19edf8(0x177)](_0x19edf8(0x178),_0x1644ce[_0x19edf8(0x17c)]),cleanup(),process[_0x19edf8(0x189)](0x1);}),_0x478954['on'](_0x5aa366(0x189),_0x431bf3=>{const _0x3a26c1=_0x5aa366;console['log'](_0x3a26c1(0x193)),cleanup(),process['exit'](_0x431bf3||0x0);}),_0x478954;}function cleanup(){const _0x1fee85=a0_0x5c4b23;serverProcess&&!serverProcess[_0x1fee85(0x190)]&&(console[_0x1fee85(0x183)](_0x1fee85(0x179)),serverProcess[_0x1fee85(0x194)](_0x1fee85(0x17d)),setTimeout(()=>{const _0x15e3c5=_0x1fee85;!serverProcess['killed']&&serverProcess['kill'](_0x15e3c5(0x181));},0x1388));}process['on'](a0_0x5c4b23(0x16e),()=>{const _0x150bce=a0_0x5c4b23;console['log'](_0x150bce(0x19c)),cleanup(),process['exit'](0x0);}),process['on'](a0_0x5c4b23(0x17d),()=>{const _0x283f08=a0_0x5c4b23;console[_0x283f08(0x183)]('\x0a⚠️\x20\x20Received\x20SIGTERM,\x20shutting\x20down...'),cleanup(),process[_0x283f08(0x189)](0x0);}),process['on']('exit',()=>{cleanup();});async function main(){const _0x4384f4=a0_0x5c4b23;console[_0x4384f4(0x183)](_0x4384f4(0x16f)),console[_0x4384f4(0x183)]('║\x20\x20\x20Loxia\x20AI\x20Agents\x20-\x20Server\x20+\x20Terminal\x20UI\x20\x20\x20\x20\x20\x20║'),console[_0x4384f4(0x183)](_0x4384f4(0x19d)),console[_0x4384f4(0x183)]('');try{await startServer(),await checkServerReady(),await startTerminalUI(),await new Promise(()=>{});}catch(_0x36d2bb){console[_0x4384f4(0x177)](_0x4384f4(0x192),_0x36d2bb['message']),cleanup(),process[_0x4384f4(0x189)](0x1);}}main();function a0_0x5912(){const _0x10755f=['src','data','✅\x20Server\x20is\x20ready!','SIGKILL','index.js','log','stdout','216WKnGlx','Server\x20returned\x20','Server\x20exited\x20with\x20code\x20','get','exit','ExperimentalWarning','7512978sRLujh','🚀\x20Starting\x20Loxia\x20server...','statusCode','1oQfcIL','20VRUduL','killed','toString','Error\x20during\x20startup:','\x0a👋\x20Terminal\x20UI\x20closed.','kill','[SERVER]\x20','🖥️\x20\x20Starting\x20Terminal\x20UI...','Failed\x20to\x20start\x20server:','3458967vGctDk','includes','setTimeout','trim','\x0a⚠️\x20\x20Received\x20SIGINT,\x20shutting\x20down...','╚════════════════════════════════════════════════╝','PORT','env','170534fGGlTu','http://localhost:','6099696RcxFlC','SIGINT','╔════════════════════════════════════════════════╗','⚠️\x20\x20Server\x20may\x20not\x20be\x20fully\x20ready,\x20but\x20continuing\x20anyway...','node','20iOEyFW','stderr','2914584JHvFlZ','pipe','2429658Vpsmmg','error','Failed\x20to\x20start\x20Terminal\x20UI:','🛑\x20Stopping\x20server...','[SERVER\x20ERROR]\x20','195895LjnCCZ','message','SIGTERM'];a0_0x5912=function(){return _0x10755f;};return a0_0x5912();}
3
+ const a0_0x3466d1=a0_0x47ff;(function(_0x5cc321,_0x2d1019){const _0x436a99=a0_0x47ff,_0x1ed6da=_0x5cc321();while(!![]){try{const _0x1cac34=-parseInt(_0x436a99(0xc2))/0x1*(-parseInt(_0x436a99(0xd6))/0x2)+-parseInt(_0x436a99(0xd0))/0x3+-parseInt(_0x436a99(0xb7))/0x4*(parseInt(_0x436a99(0xd8))/0x5)+parseInt(_0x436a99(0xc9))/0x6*(-parseInt(_0x436a99(0xdd))/0x7)+-parseInt(_0x436a99(0xc3))/0x8*(-parseInt(_0x436a99(0xdf))/0x9)+-parseInt(_0x436a99(0xbf))/0xa+-parseInt(_0x436a99(0xd7))/0xb*(-parseInt(_0x436a99(0xd4))/0xc);if(_0x1cac34===_0x2d1019)break;else _0x1ed6da['push'](_0x1ed6da['shift']());}catch(_0x2de587){_0x1ed6da['push'](_0x1ed6da['shift']());}}}(a0_0x101f,0xad9b0));import{spawn}from'child_process';import{fileURLToPath}from'url';import{dirname,join}from'path';import a0_0x5b1603 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),rootDir=join(__dirname,'..'),SERVER_PORT=process[a0_0x3466d1(0xbc)][a0_0x3466d1(0xe3)]||0x1f90,STARTUP_WAIT=0x7d0;let serverProcess=null;async function checkServerReady(_0x5c1fec=0xa,_0x42ce45=0x1f4){const _0x46ebd3=a0_0x3466d1;for(let _0x8cae44=0x0;_0x8cae44<_0x5c1fec;_0x8cae44++){try{return await new Promise((_0x25a4f3,_0x33556f)=>{const _0x1d691d=a0_0x47ff,_0xd519c9=a0_0x5b1603['get'](_0x1d691d(0xe0)+SERVER_PORT+_0x1d691d(0xe1),_0x372437=>{const _0x96453b=_0x1d691d;_0x372437[_0x96453b(0xcf)]===0xc8?_0x25a4f3():_0x33556f(new Error(_0x96453b(0xc6)+_0x372437[_0x96453b(0xcf)]));});_0xd519c9['on'](_0x1d691d(0xde),_0x33556f),_0xd519c9['setTimeout'](0x3e8,()=>{const _0x53cae1=_0x1d691d;_0xd519c9['destroy'](),_0x33556f(new Error(_0x53cae1(0xe7)));});}),console[_0x46ebd3(0xda)](_0x46ebd3(0xe4)),!![];}catch(_0x36dfd7){_0x8cae44<_0x5c1fec-0x1&&await new Promise(_0x4a761e=>setTimeout(_0x4a761e,_0x42ce45));}}return console[_0x46ebd3(0xda)](_0x46ebd3(0xb6)),![];}async function startServer(){return new Promise(_0x49d790=>{const _0x177768=a0_0x47ff;console[_0x177768(0xda)](_0x177768(0xb9));const _0x1f368d=join(rootDir,_0x177768(0xdb),_0x177768(0xc4));serverProcess=spawn('node',[_0x1f368d],{'cwd':rootDir,'env':{...process[_0x177768(0xbc)]},'stdio':[_0x177768(0xca),'pipe',_0x177768(0xd9)],'detached':![]}),serverProcess[_0x177768(0xc5)]['on']('data',_0x17aa47=>{const _0x558072=_0x177768,_0x182ba=_0x17aa47[_0x558072(0xcc)]()['trim']();_0x182ba&&console[_0x558072(0xda)]('[SERVER]\x20'+_0x182ba);}),serverProcess[_0x177768(0xba)]['on'](_0x177768(0xce),_0x4ef098=>{const _0x1d02c8=_0x177768,_0x1609cd=_0x4ef098[_0x1d02c8(0xcc)]()[_0x1d02c8(0xb5)]();_0x1609cd&&!_0x1609cd['includes'](_0x1d02c8(0xc8))&&console[_0x1d02c8(0xde)](_0x1d02c8(0xe8)+_0x1609cd);}),serverProcess['on'](_0x177768(0xde),_0x5ebaf4=>{const _0x36e5b8=_0x177768;console[_0x36e5b8(0xde)](_0x36e5b8(0xbb),_0x5ebaf4[_0x36e5b8(0xbd)]),process['exit'](0x1);}),serverProcess['on'](_0x177768(0xcb),(_0x1c8d22,_0x3ef0f1)=>{const _0x480e49=_0x177768;_0x1c8d22!==null&&_0x1c8d22!==0x0&&(console[_0x480e49(0xde)]('Server\x20exited\x20with\x20code\x20'+_0x1c8d22),process[_0x480e49(0xcb)](_0x1c8d22));}),setTimeout(_0x49d790,STARTUP_WAIT);});}function a0_0x101f(){const _0x1a8637=['killed','SIGTERM','Timeout','[SERVER\x20ERROR]\x20','\x0a👋\x20Terminal\x20UI\x20closed.','trim','⚠️\x20\x20Server\x20may\x20not\x20be\x20fully\x20ready,\x20but\x20continuing\x20anyway...','4388RmynRc','bin','🚀\x20Starting\x20Loxia\x20server...','stderr','Failed\x20to\x20start\x20server:','env','message','Failed\x20to\x20start\x20Terminal\x20UI:','9175900PbVcQG','║\x20\x20\x20Loxia\x20AI\x20Agents\x20-\x20Server\x20+\x20Terminal\x20UI\x20\x20\x20\x20\x20\x20║','node','647663HJowHQ','8IVjdIa','index.js','stdout','Server\x20returned\x20','╚════════════════════════════════════════════════╝','ExperimentalWarning','12qTrWyE','ignore','exit','toString','SIGKILL','data','statusCode','396564tChleG','inherit','kill','\x0a⚠️\x20\x20Received\x20SIGTERM,\x20shutting\x20down...','108qcAPtP','loxia-terminal.js','2GzPSzg','277255JOMeIy','5alJZwK','pipe','log','src','Error\x20during\x20startup:','1464491BCQazz','error','11752929zpoOGb','http://localhost:','/health','SIGINT','PORT','✅\x20Server\x20is\x20ready!'];a0_0x101f=function(){return _0x1a8637;};return a0_0x101f();}function a0_0x47ff(_0x4dc81b,_0x58bf9c){_0x4dc81b=_0x4dc81b-0xb5;const _0x101faf=a0_0x101f();let _0x47ff27=_0x101faf[_0x4dc81b];return _0x47ff27;}async function startTerminalUI(){const _0x9e7a71=a0_0x3466d1;console[_0x9e7a71(0xda)]('🖥️\x20\x20Starting\x20Terminal\x20UI...'),console[_0x9e7a71(0xda)]('');const _0x1eb622=join(rootDir,_0x9e7a71(0xb8),_0x9e7a71(0xd5)),_0x4966c5=spawn(_0x9e7a71(0xc1),[_0x1eb622],{'cwd':rootDir,'env':{...process[_0x9e7a71(0xbc)]},'stdio':_0x9e7a71(0xd1)});return _0x4966c5['on'](_0x9e7a71(0xde),_0x1489e2=>{const _0x1a90b5=_0x9e7a71;console[_0x1a90b5(0xde)](_0x1a90b5(0xbe),_0x1489e2[_0x1a90b5(0xbd)]),cleanup(),process[_0x1a90b5(0xcb)](0x1);}),_0x4966c5['on']('exit',_0x324a3e=>{const _0x3ae771=_0x9e7a71;console['log'](_0x3ae771(0xe9)),cleanup(),process[_0x3ae771(0xcb)](_0x324a3e||0x0);}),_0x4966c5;}function cleanup(){const _0x5098b3=a0_0x3466d1;serverProcess&&!serverProcess[_0x5098b3(0xe5)]&&(console[_0x5098b3(0xda)]('🛑\x20Stopping\x20server...'),serverProcess[_0x5098b3(0xd2)](_0x5098b3(0xe6)),setTimeout(()=>{const _0x13a02a=_0x5098b3;!serverProcess[_0x13a02a(0xe5)]&&serverProcess[_0x13a02a(0xd2)](_0x13a02a(0xcd));},0x1388));}process['on'](a0_0x3466d1(0xe2),()=>{const _0x472341=a0_0x3466d1;console[_0x472341(0xda)]('\x0a⚠️\x20\x20Received\x20SIGINT,\x20shutting\x20down...'),cleanup(),process[_0x472341(0xcb)](0x0);}),process['on'](a0_0x3466d1(0xe6),()=>{const _0x30edf5=a0_0x3466d1;console[_0x30edf5(0xda)](_0x30edf5(0xd3)),cleanup(),process[_0x30edf5(0xcb)](0x0);}),process['on'](a0_0x3466d1(0xcb),()=>{cleanup();});async function main(){const _0x42aafc=a0_0x3466d1;console['log']('╔════════════════════════════════════════════════╗'),console[_0x42aafc(0xda)](_0x42aafc(0xc0)),console[_0x42aafc(0xda)](_0x42aafc(0xc7)),console[_0x42aafc(0xda)]('');try{await startServer(),await checkServerReady(),await startTerminalUI(),await new Promise(()=>{});}catch(_0x5b39ac){console[_0x42aafc(0xde)](_0x42aafc(0xdc),_0x5b39ac[_0x42aafc(0xbd)]),cleanup(),process[_0x42aafc(0xcb)](0x1);}}main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loxia-labs/loxia-autopilot-one",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "Loxia AI Agents System - No-code/vibe-code/companion-coder platform",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- function a0_0x502f(){const _0x23c45d=['\x20\x20\x20Location:\x20','488RTFrbk','\x20\x20\x20✅\x20Semgrep\x20already\x20installed:\x20','\x20\x20\x20Semgrep\x20not\x20found\x20in\x20PATH,\x20installing\x20standalone\x20binary...','❌\x20Installation\x20failed:','\x20\x20\x20To\x20enable\x20Python\x20scanning,\x20install\x20Python\x20and\x20run:','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20','pip-audit','\x20\x20npm\x20install\x20--save-dev\x20eslint-plugin-security','\x20-m\x20pip\x20install\x20--user\x20','🐍\x20Checking\x20Python\x20scanners...','\x20\x20\x20Downloading\x20from\x20','\x20\x20\x20⚠️\x20\x20No\x20Semgrep\x20binary\x20available\x20for\x20','error','semgrep','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20Semgrep:\x20','\x20\x20\x20✅\x20eslint-plugin-security\x20is\x20installed\x0a','yamllint','log','14kTznbk','close','pipe','═══════════════════════════════════════════════════════════\x0a','bandit','711333ZudhZG','python3\x20--version','...','url','stdout','.scanners','join','message','\x20installed\x20successfully','\x20\x20\x20✅\x20Python\x20found:\x20','catch','\x20\x20Installing\x20Security\x20Scanners','8189960zHiMJq','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20','headers','20545mRbHXG','7fATTKZ','\x20\x20\x20Please\x20install\x20manually:\x20https://semgrep.dev/docs/getting-started/\x0a','\x0a═══════════════════════════════════════════════════════════','Failed\x20to\x20download:\x20HTTP\x20','\x20\x20\x20⚠️\x20\x20Python\x20not\x20found\x20-\x20skipping\x20Python\x20scanners','984112SgSGho','\x20\x20\x20✅\x20','checkov','location','\x20-m\x20pip\x20show\x20','44310THvLTP','python3','semgrep\x20--version','📦\x20Checking\x20ESLint\x20Security\x20Plugin...','\x20\x20\x20Run:\x20npm\x20install\x20--save-dev\x20eslint-plugin-security\x0a','statusCode','551682dlaUkT','chmod','═══════════════════════════════════════════════════════════','\x20\x20\x20Installing\x20','\x20\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit\x20checkov\x20yamllint\x0a','finish','\x20\x20\x20✅\x20Semgrep\x20installed\x20successfully','🔍\x20Installing\x20Semgrep...','11GkNnUD','29289VzHUYN','\x20\x20\x20Using\x20system-installed\x20Semgrep\x0a','https','unlink','exit','python','startsWith','mkdir','get'];a0_0x502f=function(){return _0x23c45d;};return a0_0x502f();}const a0_0x129c01=a0_0x1a99;(function(_0xb89910,_0x4ee367){const _0x176553=a0_0x1a99,_0x87c948=_0xb89910();while(!![]){try{const _0x576578=parseInt(_0x176553(0x87))/0x1+parseInt(_0x176553(0xac))/0x2*(parseInt(_0x176553(0x90))/0x3)+-parseInt(_0x176553(0x9a))/0x4*(-parseInt(_0x176553(0xc0))/0x5)+-parseInt(_0x176553(0x81))/0x6*(-parseInt(_0x176553(0xc1))/0x7)+parseInt(_0x176553(0xc6))/0x8+-parseInt(_0x176553(0xb1))/0x9+-parseInt(_0x176553(0xbd))/0xa*(parseInt(_0x176553(0x8f))/0xb);if(_0x576578===_0x4ee367)break;else _0x87c948['push'](_0x87c948['shift']());}catch(_0x198b99){_0x87c948['push'](_0x87c948['shift']());}}}(a0_0x502f,0x56597));import{exec}from'child_process';import{promisify}from'util';import a0_0x485850 from'https';import a0_0x4df76f from'http';import a0_0x3b9ac5 from'fs';import a0_0x589fbb 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_0x589fbb['dirname'](__filename),SCANNER_DIR=a0_0x589fbb[a0_0x129c01(0xb7)](__dirname,'..','node_modules',a0_0x129c01(0xb6)),SEMGREP_VERSION='v1.55.0';console[a0_0x129c01(0xab)](a0_0x129c01(0x89)),console[a0_0x129c01(0xab)](a0_0x129c01(0xbc)),console['log'](a0_0x129c01(0xaf));async function installScanners(){const _0x26109b=a0_0x129c01;await a0_0x3b9ac5['promises'][_0x26109b(0x97)](SCANNER_DIR,{'recursive':!![]}),await checkESLintSecurity(),await installSemgrep(),await installPythonScanners(),console[_0x26109b(0xab)](_0x26109b(0xc3)),console[_0x26109b(0xab)]('\x20\x20Installation\x20Complete'),console['log'](_0x26109b(0xaf));}async function checkESLintSecurity(){const _0x306115=a0_0x129c01;console[_0x306115(0xab)](_0x306115(0x84));try{await import('eslint-plugin-security'),console[_0x306115(0xab)](_0x306115(0xa9));}catch(_0x5e6d79){console[_0x306115(0xab)]('\x20\x20\x20⚠️\x20\x20eslint-plugin-security\x20not\x20found'),console[_0x306115(0xab)](_0x306115(0x85));}}async function installSemgrep(){const _0x2ceefe=a0_0x129c01;console[_0x2ceefe(0xab)](_0x2ceefe(0x8e));const _0x351147=process['platform'],_0x2d13ed=process['arch'];try{const _0x549e07=await execAsync(_0x2ceefe(0x83),{'timeout':0x1388});console[_0x2ceefe(0xab)](_0x2ceefe(0x9b)+_0x549e07[_0x2ceefe(0xb5)]['trim']()),console['log'](_0x2ceefe(0x91));return;}catch(_0x7de870){console[_0x2ceefe(0xab)](_0x2ceefe(0x9c));}const _0x381bc7=getSemgrepBinaryInfo(_0x351147,_0x2d13ed);if(!_0x381bc7){console[_0x2ceefe(0xab)](_0x2ceefe(0xa5)+_0x351147+'-'+_0x2d13ed),console['log'](_0x2ceefe(0xc2));return;}try{const _0x14ba91=a0_0x589fbb['join'](SCANNER_DIR,_0x2ceefe(0xa7));console[_0x2ceefe(0xab)](_0x2ceefe(0xa4)+_0x381bc7[_0x2ceefe(0xb4)]+_0x2ceefe(0xb3)),await downloadFile(_0x381bc7['url'],_0x14ba91),await a0_0x3b9ac5['promises'][_0x2ceefe(0x88)](_0x14ba91,0x1ed),console[_0x2ceefe(0xab)](_0x2ceefe(0x8d)),console[_0x2ceefe(0xab)](_0x2ceefe(0x99)+_0x14ba91+'\x0a'),console[_0x2ceefe(0xab)]('\x20\x20\x20Note:\x20To\x20use\x20system-wide,\x20add\x20to\x20PATH\x20or\x20install\x20globally:'),console[_0x2ceefe(0xab)]('\x20\x20\x20pip\x20install\x20semgrep\x0a');}catch(_0x2cc3d5){console[_0x2ceefe(0xab)](_0x2ceefe(0xa8)+_0x2cc3d5[_0x2ceefe(0xb8)]),console['log']('\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20semgrep\x0a');}}function getSemgrepBinaryInfo(_0x5185cd,_0x4d03cf){return null;}async function installPythonScanners(){const _0x1f4432=a0_0x129c01;console['log'](_0x1f4432(0xa3));let _0x2be45b=null;try{await execAsync(_0x1f4432(0xb2),{'timeout':0x1388}),_0x2be45b=_0x1f4432(0x82);}catch(_0xa2d998){try{await execAsync('python\x20--version',{'timeout':0x1388}),_0x2be45b=_0x1f4432(0x95);}catch(_0x2928cf){console[_0x1f4432(0xab)](_0x1f4432(0xc5)),console[_0x1f4432(0xab)](_0x1f4432(0x9e)),console[_0x1f4432(0xab)](_0x1f4432(0x8b));return;}}console[_0x1f4432(0xab)](_0x1f4432(0xba)+_0x2be45b),await installViaPip(_0x1f4432(0xa7),_0x2be45b),await installViaPip(_0x1f4432(0xb0),_0x2be45b),await installViaPip(_0x1f4432(0xa0),_0x2be45b),await installViaPip(_0x1f4432(0xc8),_0x2be45b),await installViaPip(_0x1f4432(0xaa),_0x2be45b),console[_0x1f4432(0xab)]('');}async function installViaPip(_0x5c54c6,_0x314b0c){const _0x14a1ca=a0_0x129c01;try{const _0x2beac2=await execAsync(_0x314b0c+_0x14a1ca(0x80)+_0x5c54c6,{'timeout':0x1388});return console[_0x14a1ca(0xab)](_0x14a1ca(0xc7)+_0x5c54c6+'\x20already\x20installed'),!![];}catch(_0x501f57){console['log'](_0x14a1ca(0x8a)+_0x5c54c6+_0x14a1ca(0xb3));try{return await execAsync(_0x314b0c+_0x14a1ca(0xa2)+_0x5c54c6,{'timeout':0xea60}),console[_0x14a1ca(0xab)](_0x14a1ca(0xc7)+_0x5c54c6+_0x14a1ca(0xb9)),!![];}catch(_0x99a406){return console[_0x14a1ca(0xab)](_0x14a1ca(0x9f)+_0x5c54c6+':\x20'+_0x99a406[_0x14a1ca(0xb8)]),console[_0x14a1ca(0xab)](_0x14a1ca(0xbe)+_0x5c54c6),![];}}}function a0_0x1a99(_0x3426ed,_0x598957){_0x3426ed=_0x3426ed-0x7f;const _0x502f95=a0_0x502f();let _0x1a9915=_0x502f95[_0x3426ed];return _0x1a9915;}async function downloadFile(_0x2d6d31,_0x4c9ffb){return new Promise((_0x4ab9c1,_0x5aec5f)=>{const _0x54f0fc=a0_0x1a99,_0x44c875=_0x2d6d31[_0x54f0fc(0x96)](_0x54f0fc(0x92))?a0_0x485850:a0_0x4df76f;_0x44c875[_0x54f0fc(0x98)](_0x2d6d31,_0x5f0138=>{const _0xc243d9=_0x54f0fc;if(_0x5f0138[_0xc243d9(0x86)]===0x12e||_0x5f0138['statusCode']===0x12d){downloadFile(_0x5f0138[_0xc243d9(0xbf)][_0xc243d9(0x7f)],_0x4c9ffb)['then'](_0x4ab9c1)[_0xc243d9(0xbb)](_0x5aec5f);return;}if(_0x5f0138['statusCode']!==0xc8){_0x5aec5f(new Error(_0xc243d9(0xc4)+_0x5f0138[_0xc243d9(0x86)]));return;}const _0x2156a1=createWriteStream(_0x4c9ffb);_0x5f0138[_0xc243d9(0xae)](_0x2156a1),_0x2156a1['on'](_0xc243d9(0x8c),()=>{const _0x202d6c=_0xc243d9;_0x2156a1[_0x202d6c(0xad)](),_0x4ab9c1();}),_0x2156a1['on']('error',_0x46db60=>{const _0x2100d5=_0xc243d9;a0_0x3b9ac5[_0x2100d5(0x93)](_0x4c9ffb,()=>{}),_0x5aec5f(_0x46db60);});})['on'](_0x54f0fc(0xa6),_0x5aec5f);});}installScanners()['catch'](_0x56d082=>{const _0x119c02=a0_0x129c01;console[_0x119c02(0xa6)](_0x119c02(0x9d),_0x56d082[_0x119c02(0xb8)]),console[_0x119c02(0xa6)]('\x0aYou\x20can\x20manually\x20install\x20scanners:'),console[_0x119c02(0xa6)](_0x119c02(0xa1)),console['error']('\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit'),process[_0x119c02(0x94)](0x0);});
2
+ const a0_0x202f7e=a0_0x17e2;(function(_0x18530f,_0x3a5eac){const _0x40dd76=a0_0x17e2,_0x1f3578=_0x18530f();while(!![]){try{const _0x3309c0=parseInt(_0x40dd76(0x1a0))/0x1*(parseInt(_0x40dd76(0x1b6))/0x2)+parseInt(_0x40dd76(0x199))/0x3+-parseInt(_0x40dd76(0x191))/0x4*(-parseInt(_0x40dd76(0x198))/0x5)+-parseInt(_0x40dd76(0x19f))/0x6+parseInt(_0x40dd76(0x194))/0x7*(parseInt(_0x40dd76(0x1d1))/0x8)+-parseInt(_0x40dd76(0x1b7))/0x9+parseInt(_0x40dd76(0x1a6))/0xa*(-parseInt(_0x40dd76(0x1a1))/0xb);if(_0x3309c0===_0x3a5eac)break;else _0x1f3578['push'](_0x1f3578['shift']());}catch(_0x293a8b){_0x1f3578['push'](_0x1f3578['shift']());}}}(a0_0x5882,0xa1eaf));function a0_0x5882(){const _0x3004f1=['🐍\x20Checking\x20Python\x20scanners...','\x0a═══════════════════════════════════════════════════════════','platform','pipe','\x20\x20Installation\x20Complete','\x20\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit\x20checkov\x20yamllint\x0a','trim','pip-audit','═══════════════════════════════════════════════════════════','then','🔍\x20Installing\x20Semgrep...','\x20\x20\x20Location:\x20','checkov','\x0aYou\x20can\x20manually\x20install\x20scanners:','\x20\x20\x20✅\x20eslint-plugin-security\x20is\x20installed\x0a','3048iRbvYg','📦\x20Checking\x20ESLint\x20Security\x20Plugin...','statusCode','\x20\x20\x20✅\x20Python\x20found:\x20','\x20already\x20installed','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20','\x20\x20\x20Note:\x20To\x20use\x20system-wide,\x20add\x20to\x20PATH\x20or\x20install\x20globally:','https','\x20\x20\x20Installing\x20','\x20\x20\x20pip\x20install\x20semgrep\x0a','24EiVFMJ','close','\x20\x20Installing\x20Security\x20Scanners','5789lTVYVi','Failed\x20to\x20download:\x20HTTP\x20','get','❌\x20Installation\x20failed:','466645TIAoqD','1178856OvGrjs','stdout','bandit','headers','promises','python3\x20--version','2057748neBftw','2jMEOME','11QFMiaT','startsWith','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20','yamllint','\x20\x20\x20✅\x20Semgrep\x20already\x20installed:\x20','11888020JwcAvu','error','python\x20--version','\x20\x20\x20⚠️\x20\x20eslint-plugin-security\x20not\x20found','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20semgrep\x0a','\x20\x20\x20Please\x20install\x20manually:\x20https://semgrep.dev/docs/getting-started/\x0a','\x20\x20\x20✅\x20Semgrep\x20installed\x20successfully','message','catch','═══════════════════════════════════════════════════════════\x0a','semgrep','mkdir','join','...','\x20\x20\x20✅\x20','\x20-m\x20pip\x20install\x20--user\x20','1168506qMHJhW','2173896izwpDF','.scanners','location','\x20\x20\x20Semgrep\x20not\x20found\x20in\x20PATH,\x20installing\x20standalone\x20binary...','\x20installed\x20successfully','log','\x20\x20\x20⚠️\x20\x20No\x20Semgrep\x20binary\x20available\x20for\x20','\x20\x20\x20⚠️\x20\x20Python\x20not\x20found\x20-\x20skipping\x20Python\x20scanners','\x20\x20\x20Using\x20system-installed\x20Semgrep\x0a','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20Semgrep:\x20','\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit'];a0_0x5882=function(){return _0x3004f1;};return a0_0x5882();}import{exec}from'child_process';import{promisify}from'util';import a0_0x42b3a3 from'https';import a0_0xad98e3 from'http';import a0_0x269ad3 from'fs';import a0_0x28193b from'path';import{fileURLToPath}from'url';import{createWriteStream}from'fs';import{pipeline}from'stream/promises';const execAsync=promisify(exec),__filename=fileURLToPath(import.meta.url),__dirname=a0_0x28193b['dirname'](__filename),SCANNER_DIR=a0_0x28193b[a0_0x202f7e(0x1b2)](__dirname,'..','node_modules',a0_0x202f7e(0x1b8)),SEMGREP_VERSION='v1.55.0';console[a0_0x202f7e(0x1bc)](a0_0x202f7e(0x1ca)),console['log'](a0_0x202f7e(0x193)),console[a0_0x202f7e(0x1bc)](a0_0x202f7e(0x1af));async function installScanners(){const _0x2b628c=a0_0x202f7e;await a0_0x269ad3[_0x2b628c(0x19d)][_0x2b628c(0x1b1)](SCANNER_DIR,{'recursive':!![]}),await checkESLintSecurity(),await installSemgrep(),await installPythonScanners(),console[_0x2b628c(0x1bc)](_0x2b628c(0x1c3)),console[_0x2b628c(0x1bc)](_0x2b628c(0x1c6)),console['log']('═══════════════════════════════════════════════════════════\x0a');}async function checkESLintSecurity(){const _0x48ef38=a0_0x202f7e;console[_0x48ef38(0x1bc)](_0x48ef38(0x188));try{await import('eslint-plugin-security'),console[_0x48ef38(0x1bc)](_0x48ef38(0x1d0));}catch(_0x12e38c){console['log'](_0x48ef38(0x1a9)),console[_0x48ef38(0x1bc)]('\x20\x20\x20Run:\x20npm\x20install\x20--save-dev\x20eslint-plugin-security\x0a');}}async function installSemgrep(){const _0x3c3276=a0_0x202f7e;console[_0x3c3276(0x1bc)](_0x3c3276(0x1cc));const _0x5021bb=process[_0x3c3276(0x1c4)],_0x12a05f=process['arch'];try{const _0x205b6f=await execAsync('semgrep\x20--version',{'timeout':0x1388});console['log'](_0x3c3276(0x1a5)+_0x205b6f[_0x3c3276(0x19a)][_0x3c3276(0x1c8)]()),console['log'](_0x3c3276(0x1bf));return;}catch(_0x359e76){console[_0x3c3276(0x1bc)](_0x3c3276(0x1ba));}const _0x1eb69=getSemgrepBinaryInfo(_0x5021bb,_0x12a05f);if(!_0x1eb69){console['log'](_0x3c3276(0x1bd)+_0x5021bb+'-'+_0x12a05f),console['log'](_0x3c3276(0x1ab));return;}try{const _0x492fcd=a0_0x28193b[_0x3c3276(0x1b2)](SCANNER_DIR,_0x3c3276(0x1b0));console[_0x3c3276(0x1bc)]('\x20\x20\x20Downloading\x20from\x20'+_0x1eb69['url']+_0x3c3276(0x1b3)),await downloadFile(_0x1eb69['url'],_0x492fcd),await a0_0x269ad3[_0x3c3276(0x19d)]['chmod'](_0x492fcd,0x1ed),console[_0x3c3276(0x1bc)](_0x3c3276(0x1ac)),console[_0x3c3276(0x1bc)](_0x3c3276(0x1cd)+_0x492fcd+'\x0a'),console['log'](_0x3c3276(0x18d)),console[_0x3c3276(0x1bc)](_0x3c3276(0x190));}catch(_0x53f865){console['log'](_0x3c3276(0x1c0)+_0x53f865[_0x3c3276(0x1ad)]),console['log'](_0x3c3276(0x1aa));}}function a0_0x17e2(_0x5eb3b1,_0x203ed3){_0x5eb3b1=_0x5eb3b1-0x188;const _0x5882ba=a0_0x5882();let _0x17e2b5=_0x5882ba[_0x5eb3b1];return _0x17e2b5;}function getSemgrepBinaryInfo(_0x52989c,_0x2d1c0f){return null;}async function installPythonScanners(){const _0x3b15bd=a0_0x202f7e;console[_0x3b15bd(0x1bc)](_0x3b15bd(0x1c2));let _0x56633f=null;try{await execAsync(_0x3b15bd(0x19e),{'timeout':0x1388}),_0x56633f='python3';}catch(_0x28d7ca){try{await execAsync(_0x3b15bd(0x1a8),{'timeout':0x1388}),_0x56633f='python';}catch(_0x31abc8){console[_0x3b15bd(0x1bc)](_0x3b15bd(0x1be)),console[_0x3b15bd(0x1bc)]('\x20\x20\x20To\x20enable\x20Python\x20scanning,\x20install\x20Python\x20and\x20run:'),console['log'](_0x3b15bd(0x1c7));return;}}console[_0x3b15bd(0x1bc)](_0x3b15bd(0x18a)+_0x56633f),await installViaPip(_0x3b15bd(0x1b0),_0x56633f),await installViaPip(_0x3b15bd(0x19b),_0x56633f),await installViaPip(_0x3b15bd(0x1c9),_0x56633f),await installViaPip(_0x3b15bd(0x1ce),_0x56633f),await installViaPip(_0x3b15bd(0x1a4),_0x56633f),console['log']('');}async function installViaPip(_0x7c0037,_0x5c0ff6){const _0xd3ccac=a0_0x202f7e;try{const _0x231fde=await execAsync(_0x5c0ff6+'\x20-m\x20pip\x20show\x20'+_0x7c0037,{'timeout':0x1388});return console[_0xd3ccac(0x1bc)](_0xd3ccac(0x1b4)+_0x7c0037+_0xd3ccac(0x18b)),!![];}catch(_0x31f4f0){console[_0xd3ccac(0x1bc)](_0xd3ccac(0x18f)+_0x7c0037+_0xd3ccac(0x1b3));try{return await execAsync(_0x5c0ff6+_0xd3ccac(0x1b5)+_0x7c0037,{'timeout':0xea60}),console[_0xd3ccac(0x1bc)]('\x20\x20\x20✅\x20'+_0x7c0037+_0xd3ccac(0x1bb)),!![];}catch(_0x5b9fb5){return console['log'](_0xd3ccac(0x18c)+_0x7c0037+':\x20'+_0x5b9fb5[_0xd3ccac(0x1ad)]),console['log'](_0xd3ccac(0x1a3)+_0x7c0037),![];}}}async function downloadFile(_0x14ba0f,_0x53ba48){return new Promise((_0x86e148,_0xd404dd)=>{const _0x2667fa=a0_0x17e2,_0xcdd9e2=_0x14ba0f[_0x2667fa(0x1a2)](_0x2667fa(0x18e))?a0_0x42b3a3:a0_0xad98e3;_0xcdd9e2[_0x2667fa(0x196)](_0x14ba0f,_0x1b7686=>{const _0xdf1ccd=_0x2667fa;if(_0x1b7686['statusCode']===0x12e||_0x1b7686['statusCode']===0x12d){downloadFile(_0x1b7686[_0xdf1ccd(0x19c)][_0xdf1ccd(0x1b9)],_0x53ba48)[_0xdf1ccd(0x1cb)](_0x86e148)[_0xdf1ccd(0x1ae)](_0xd404dd);return;}if(_0x1b7686[_0xdf1ccd(0x189)]!==0xc8){_0xd404dd(new Error(_0xdf1ccd(0x195)+_0x1b7686[_0xdf1ccd(0x189)]));return;}const _0xbc6521=createWriteStream(_0x53ba48);_0x1b7686[_0xdf1ccd(0x1c5)](_0xbc6521),_0xbc6521['on']('finish',()=>{const _0x130a92=_0xdf1ccd;_0xbc6521[_0x130a92(0x192)](),_0x86e148();}),_0xbc6521['on'](_0xdf1ccd(0x1a7),_0x228602=>{a0_0x269ad3['unlink'](_0x53ba48,()=>{}),_0xd404dd(_0x228602);});})['on']('error',_0xd404dd);});}installScanners()[a0_0x202f7e(0x1ae)](_0x475c6f=>{const _0x1bec5b=a0_0x202f7e;console[_0x1bec5b(0x1a7)](_0x1bec5b(0x197),_0x475c6f[_0x1bec5b(0x1ad)]),console['error'](_0x1bec5b(0x1cf)),console['error']('\x20\x20npm\x20install\x20--save-dev\x20eslint-plugin-security'),console[_0x1bec5b(0x1a7)](_0x1bec5b(0x1c1)),process['exit'](0x0);});
@@ -1 +1 @@
1
- const a0_0x11a127=a0_0x4601;(function(_0xef98f1,_0x1ab223){const _0x268098=a0_0x4601,_0x3aa0aa=_0xef98f1();while(!![]){try{const _0x3780c1=parseInt(_0x268098(0xb7))/0x1+-parseInt(_0x268098(0x9c))/0x2+parseInt(_0x268098(0xab))/0x3+-parseInt(_0x268098(0xca))/0x4*(-parseInt(_0x268098(0xad))/0x5)+-parseInt(_0x268098(0xc9))/0x6+-parseInt(_0x268098(0xb5))/0x7*(-parseInt(_0x268098(0xa0))/0x8)+-parseInt(_0x268098(0xb4))/0x9;if(_0x3780c1===_0x1ab223)break;else _0x3aa0aa['push'](_0x3aa0aa['shift']());}catch(_0x1e8a0d){_0x3aa0aa['push'](_0x3aa0aa['shift']());}}}(a0_0x31cf,0xd28a1));import{STATIC_ANALYSIS}from'../utilities/constants.js';function a0_0x31cf(){const _0x2b1cf0=['ChvZAa','Dg9mB3DLCKnHC2u','CMvHC29U','Cg9ZDgnZC1nJC3m','y29SDw1U','zxH0zw5K','D2fYBMLUz3m','mtC5otm3mgzlAMvwtW','neDlDfHMBq','zNvUy3rPB24','Dw5RBM93BG','v0fstKLorW','BgLUDfn0EwXLCW','Dgv4Da','C3r5BgvSAw50lwnVBMzPzY1ZDgfUzgfYza','BwvZC2fNzq','Aw5JBhvKzq','u1Lovefy','rvjst1i','Aw5JBhvKzxm','u1rzteu','lMnZCW','Cg9ZDgnZCW','Cg9ZDgnZCY1SzxnZ','mtiZndy1nLj1CxvztG','Bg9Nz2vY','y2HLy2TtEw50yxG','lMXLC3m','ndCYALzhuwfS','CMvJB21Tzw5Kzwq','zwfJAa','CMv0DxjU','Bg93zxi','yw5HBhL6zq','Cg9ZDgnZCY1Zy3nZ','l15JDxn0B20TlW','zM9YBwf0ug9ZDentu0vYCM9Y','BgvUz3rO','BM8TAw52ywXPza','ndy5mJmZnNLrANDHwa','BgvZCW','ndy2oteYnufdzhfXAG','lNnJC3m','q0furuDpuLK','u0vwrvjjvfK','zM9Y','Cg9ZDgnZC0XLC3m','zMLSDgvY','mtmXmZeWmdL3DuT6Bwq','odi4mJrvswjKz3G','uevsrK9stufoq0u','ndi1nJHywwfMB1C','C3r5BgvSAw50','C2v2zxjPDhK','CgvYzM9YBwfUy2u','D2fYBG','BMCTzgvLCa','C2nZCW','qKvtvf9quKfdveLdrq','C291CMnL','CMvZDwX0CW','zgvIDwC'];a0_0x31cf=function(){return _0x2b1cf0;};return a0_0x31cf();}function a0_0x4601(_0x3ca8d0,_0x38e0bd){_0x3ca8d0=_0x3ca8d0-0x8e;const _0x31cfea=a0_0x31cf();let _0x4601f7=_0x31cfea[_0x3ca8d0];if(a0_0x4601['TDwzSn']===undefined){var _0x1fd2b5=function(_0xb9e9eb){const _0xc1b107='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5798cc='',_0xbb3bb6='';for(let _0x3ec6f6=0x0,_0x247648,_0x3987ae,_0x12597b=0x0;_0x3987ae=_0xb9e9eb['charAt'](_0x12597b++);~_0x3987ae&&(_0x247648=_0x3ec6f6%0x4?_0x247648*0x40+_0x3987ae:_0x3987ae,_0x3ec6f6++%0x4)?_0x5798cc+=String['fromCharCode'](0xff&_0x247648>>(-0x2*_0x3ec6f6&0x6)):0x0){_0x3987ae=_0xc1b107['indexOf'](_0x3987ae);}for(let _0x19c405=0x0,_0x557922=_0x5798cc['length'];_0x19c405<_0x557922;_0x19c405++){_0xbb3bb6+='%'+('00'+_0x5798cc['charCodeAt'](_0x19c405)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xbb3bb6);};a0_0x4601['pdlZwn']=_0x1fd2b5,a0_0x4601['FPDFos']={},a0_0x4601['TDwzSn']=!![];}const _0x27ab76=_0x31cfea[0x0],_0x1d6493=_0x3ca8d0+_0x27ab76,_0x498714=a0_0x4601['FPDFos'][_0x1d6493];return!_0x498714?(_0x4601f7=a0_0x4601['pdlZwn'](_0x4601f7),a0_0x4601['FPDFos'][_0x1d6493]=_0x4601f7):_0x4601f7=_0x498714,_0x4601f7;}class CSSAnalyzer{constructor(_0x5798cc=null){const _0x49aaf6=a0_0x4601;this['logger']=_0x5798cc,this[_0x49aaf6(0xb8)]=null,this['postcss']=null,this[_0x49aaf6(0xc5)]=null,this['postcssLess']=null;}async[a0_0x11a127(0xa5)](_0xbb3bb6,_0x3ec6f6,_0x247648={}){const _0x161ea2=a0_0x11a127;try{const _0x3987ae=[],_0x12597b=this['detectLanguage'](_0xbb3bb6),_0x19c405=await this['checkSyntax'](_0xbb3bb6,_0x3ec6f6,_0x12597b);_0x3987ae[_0x161ea2(0xc2)](..._0x19c405);if(_0x19c405[_0x161ea2(0xa9)]===0x0){const _0x557922=await this[_0x161ea2(0x90)](_0xbb3bb6,_0x3ec6f6,_0x12597b);_0x3987ae['push'](..._0x557922);}return this['logger']?.[_0x161ea2(0xc1)]('CSS\x20analysis\x20completed',{'file':_0xbb3bb6,'language':_0x12597b,'totalDiagnostics':_0x3987ae[_0x161ea2(0xa9)],'errors':_0x3987ae[_0x161ea2(0xb3)](_0x1b6ddb=>_0x1b6ddb[_0x161ea2(0xb9)]===STATIC_ANALYSIS[_0x161ea2(0xb0)]['ERROR'])[_0x161ea2(0xa9)],'warnings':_0x3987ae[_0x161ea2(0xb3)](_0x5eed35=>_0x5eed35['severity']===STATIC_ANALYSIS['SEVERITY'][_0x161ea2(0x8f)])['length']}),_0x3987ae;}catch(_0x3b0254){return this['logger']?.['error']('CSS\x20analysis\x20failed',{'file':_0xbb3bb6,'error':_0x3b0254[_0x161ea2(0x93)]}),[];}}async[a0_0x11a127(0x9e)](_0x43ba7a,_0x880b94,_0x1e636b){const _0x44051f=a0_0x11a127,_0x3149b5=[];try{if(!this['postcss']){const _0x1a3408=await import('postcss');this[_0x44051f(0x9a)]=_0x1a3408['default'];}let _0x223e7a=null;if(_0x1e636b==='scss'){if(!this[_0x44051f(0xc5)]){const _0x80cf4f=await import('postcss-scss');this[_0x44051f(0xc5)]=_0x80cf4f['default'];}_0x223e7a=this['postcssScss'];}else{if(_0x1e636b===_0x44051f(0xac)){if(!this[_0x44051f(0xb2)]){const _0x3fa21b=await import(_0x44051f(0x9b));this[_0x44051f(0xb2)]=_0x3fa21b['default'];}_0x223e7a=this['postcssLess'];}}const _0x3a7123=this['postcss']()['process'](_0x880b94,{'from':_0x43ba7a,'syntax':_0x223e7a}),_0x581d24=_0x3a7123['root'];this[_0x44051f(0x9d)]?.['debug']('PostCSS\x20syntax\x20check\x20passed',{'file':_0x43ba7a});}catch(_0x21c24e){const _0xd16bee=this[_0x44051f(0xa8)](_0x21c24e,_0x43ba7a);_0xd16bee&&_0x3149b5['push'](_0xd16bee);}return _0x3149b5;}async['lintStyles'](_0xfd8efa,_0x27ad66,_0x11c8b0){const _0x4a88c6=a0_0x11a127,_0x911d08=[];try{if(!this['stylelint']){const _0x2ca96c=await import('stylelint');this['stylelint']=_0x2ca96c['default'];}const _0xf6daa9={'extends':[_0x4a88c6(0x92)],'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':[_0x4a88c6(0xa7),_0x4a88c6(0xbc)]}],'media-feature-name-no-unknown':!![],'at-rule-no-unknown':_0x11c8b0===_0x4a88c6(0xbd)?[!![],{'ignoreAtRules':['mixin',_0x4a88c6(0x94),_0x4a88c6(0xc7),'if','else',_0x4a88c6(0xb1),_0x4a88c6(0xa2),'while',_0x4a88c6(0xcb),_0x4a88c6(0xa3),'content','use','forward']}]:_0x11c8b0===_0x4a88c6(0xac)?[!![],{'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':_0x4a88c6(0xa4)},'customSyntax':_0x11c8b0===_0x4a88c6(0xbd)?_0x4a88c6(0xa6):_0x11c8b0==='less'?_0x4a88c6(0x9b):undefined},_0x4fe50f=await this['stylelint']['lint']({'code':_0x27ad66,'codeFilename':_0xfd8efa,'config':_0xf6daa9});if(_0x4fe50f['results']&&_0x4fe50f[_0x4a88c6(0xc0)]['length']>0x0){const _0x46ede0=_0x4fe50f[_0x4a88c6(0xc0)][0x0];if(_0x46ede0['warnings'])for(const _0x460653 of _0x46ede0[_0x4a88c6(0xc8)]){_0x911d08[_0x4a88c6(0xc2)]({'file':_0xfd8efa,'line':_0x460653['line']||0x1,'column':_0x460653[_0x4a88c6(0xc6)]||0x1,'severity':_0x460653[_0x4a88c6(0xb9)]==='error'?STATIC_ANALYSIS['SEVERITY'][_0x4a88c6(0x96)]:STATIC_ANALYSIS['SEVERITY'][_0x4a88c6(0x8f)],'rule':_0x460653['rule']||_0x4a88c6(0x8e),'message':_0x460653[_0x4a88c6(0x91)],'category':this['categorizeStylelintRule'](_0x460653['rule']),'fixable':![],'source':'stylelint'});}}}catch(_0x5beb2d){this[_0x4a88c6(0x9d)]?.[_0x4a88c6(0xbb)]('Stylelint\x20analysis\x20failed',{'file':_0xfd8efa,'error':_0x5beb2d['message']});}return _0x911d08;}['formatPostCSSError'](_0x48c742,_0x241ca8){const _0x3fe28e=a0_0x11a127;return{'file':_0x241ca8,'line':_0x48c742['line']||0x1,'column':_0x48c742[_0x3fe28e(0xc6)]||0x1,'severity':STATIC_ANALYSIS[_0x3fe28e(0xb0)][_0x3fe28e(0x96)],'rule':_0x48c742['name']||'CssSyntaxError','message':_0x48c742[_0x3fe28e(0xc4)]||_0x48c742[_0x3fe28e(0x93)],'category':STATIC_ANALYSIS[_0x3fe28e(0xaf)][_0x3fe28e(0x95)],'fixable':![],'source':'postcss','code':_0x48c742[_0x3fe28e(0xbf)]||undefined};}['categorizeStylelintRule'](_0x3d8cb4){const _0x5cbab4=a0_0x11a127;if(!_0x3d8cb4)return STATIC_ANALYSIS['CATEGORY'][_0x5cbab4(0x98)];const _0x49c45c=_0x3d8cb4[_0x5cbab4(0xc3)]();if(_0x49c45c['includes'](_0x5cbab4(0xaa))||_0x49c45c[_0x5cbab4(0x97)]('no-unknown')||_0x49c45c['includes']('no-empty')||_0x49c45c[_0x5cbab4(0x97)]('syntax'))return STATIC_ANALYSIS['CATEGORY']['SYNTAX'];if(_0x49c45c['includes'](_0x5cbab4(0xba))||_0x49c45c[_0x5cbab4(0x97)]('optimize'))return STATIC_ANALYSIS['CATEGORY'][_0x5cbab4(0xb6)];if(_0x49c45c['includes']('best-practice')||_0x49c45c[_0x5cbab4(0x97)](_0x5cbab4(0xa1)))return STATIC_ANALYSIS['CATEGORY'][_0x5cbab4(0xbe)];return STATIC_ANALYSIS['CATEGORY']['STYLE'];}['detectLanguage'](_0x2a0caa){const _0x27a80e=a0_0x11a127,_0x49fab3=_0x2a0caa['toLowerCase']();if(_0x49fab3['endsWith'](_0x27a80e(0xae))||_0x49fab3['endsWith']('.sass'))return _0x27a80e(0xbd);if(_0x49fab3['endsWith'](_0x27a80e(0x9f)))return'less';return'css';}['getSupportedExtensions'](){const _0x5050b7=a0_0x11a127;return[_0x5050b7(0x99),_0x5050b7(0xae),'.sass','.less'];}['supportsAutoFix'](){return![];}}export default CSSAnalyzer;
1
+ const a0_0x5c5ec6=a0_0x5e92;function a0_0x5e92(_0x2d0295,_0x5e1ea2){_0x2d0295=_0x2d0295-0x129;const _0x13bf23=a0_0x13bf();let _0x5e9211=_0x13bf23[_0x2d0295];if(a0_0x5e92['kEkdDj']===undefined){var _0x3c3ac6=function(_0x4431bf){const _0x36b78d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x20a7cd='',_0x41568e='';for(let _0x4a56d7=0x0,_0x1f65ad,_0x22ba11,_0x13e0c8=0x0;_0x22ba11=_0x4431bf['charAt'](_0x13e0c8++);~_0x22ba11&&(_0x1f65ad=_0x4a56d7%0x4?_0x1f65ad*0x40+_0x22ba11:_0x22ba11,_0x4a56d7++%0x4)?_0x20a7cd+=String['fromCharCode'](0xff&_0x1f65ad>>(-0x2*_0x4a56d7&0x6)):0x0){_0x22ba11=_0x36b78d['indexOf'](_0x22ba11);}for(let _0x3ec646=0x0,_0x20ea72=_0x20a7cd['length'];_0x3ec646<_0x20ea72;_0x3ec646++){_0x41568e+='%'+('00'+_0x20a7cd['charCodeAt'](_0x3ec646)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x41568e);};a0_0x5e92['fWUFUF']=_0x3c3ac6,a0_0x5e92['gnrEfR']={},a0_0x5e92['kEkdDj']=!![];}const _0x14ff32=_0x13bf23[0x0],_0x494ba5=_0x2d0295+_0x14ff32,_0x327fc4=a0_0x5e92['gnrEfR'][_0x494ba5];return!_0x327fc4?(_0x5e9211=a0_0x5e92['fWUFUF'](_0x5e9211),a0_0x5e92['gnrEfR'][_0x494ba5]=_0x5e9211):_0x5e9211=_0x327fc4,_0x5e9211;}(function(_0x12a6b1,_0xcb5956){const _0x14d3a3=a0_0x5e92,_0x3fd9b1=_0x12a6b1();while(!![]){try{const _0x75d835=-parseInt(_0x14d3a3(0x149))/0x1*(parseInt(_0x14d3a3(0x15a))/0x2)+parseInt(_0x14d3a3(0x12f))/0x3*(parseInt(_0x14d3a3(0x14f))/0x4)+parseInt(_0x14d3a3(0x146))/0x5+parseInt(_0x14d3a3(0x14b))/0x6*(parseInt(_0x14d3a3(0x142))/0x7)+-parseInt(_0x14d3a3(0x15c))/0x8+-parseInt(_0x14d3a3(0x14c))/0x9*(parseInt(_0x14d3a3(0x14e))/0xa)+-parseInt(_0x14d3a3(0x162))/0xb*(-parseInt(_0x14d3a3(0x156))/0xc);if(_0x75d835===_0xcb5956)break;else _0x3fd9b1['push'](_0x3fd9b1['shift']());}catch(_0x7237a6){_0x3fd9b1['push'](_0x3fd9b1['shift']());}}}(a0_0x13bf,0xef4a3));import{STATIC_ANALYSIS}from'../utilities/constants.js';class CSSAnalyzer{constructor(_0x20a7cd=null){const _0x4b36f9=a0_0x5e92;this['logger']=_0x20a7cd,this['stylelint']=null,this['postcss']=null,this[_0x4b36f9(0x16c)]=null,this['postcssLess']=null;}async['analyze'](_0x41568e,_0x4a56d7,_0x1f65ad={}){const _0x8c9ae7=a0_0x5e92;try{const _0x22ba11=[],_0x13e0c8=this['detectLanguage'](_0x41568e),_0x3ec646=await this[_0x8c9ae7(0x136)](_0x41568e,_0x4a56d7,_0x13e0c8);_0x22ba11[_0x8c9ae7(0x12b)](..._0x3ec646);if(_0x3ec646['length']===0x0){const _0x20ea72=await this['lintStyles'](_0x41568e,_0x4a56d7,_0x13e0c8);_0x22ba11[_0x8c9ae7(0x12b)](..._0x20ea72);}return this['logger']?.['debug'](_0x8c9ae7(0x157),{'file':_0x41568e,'language':_0x13e0c8,'totalDiagnostics':_0x22ba11['length'],'errors':_0x22ba11[_0x8c9ae7(0x12c)](_0x276aa3=>_0x276aa3['severity']===STATIC_ANALYSIS[_0x8c9ae7(0x163)][_0x8c9ae7(0x15d)])['length'],'warnings':_0x22ba11[_0x8c9ae7(0x12c)](_0x3cbee7=>_0x3cbee7[_0x8c9ae7(0x150)]===STATIC_ANALYSIS['SEVERITY']['WARNING'])[_0x8c9ae7(0x138)]}),_0x22ba11;}catch(_0x2b95df){return this[_0x8c9ae7(0x13f)]?.[_0x8c9ae7(0x13c)](_0x8c9ae7(0x129),{'file':_0x41568e,'error':_0x2b95df[_0x8c9ae7(0x16b)]}),[];}}async['checkSyntax'](_0x210d75,_0x46d2ec,_0x1b5edb){const _0x4af8db=a0_0x5e92,_0x5c192f=[];try{if(!this[_0x4af8db(0x15e)]){const _0x49576c=await import(_0x4af8db(0x15e));this[_0x4af8db(0x15e)]=_0x49576c[_0x4af8db(0x134)];}let _0x4488b3=null;if(_0x1b5edb===_0x4af8db(0x12e)){if(!this[_0x4af8db(0x16c)]){const _0x460ad1=await import('postcss-scss');this[_0x4af8db(0x16c)]=_0x460ad1[_0x4af8db(0x134)];}_0x4488b3=this[_0x4af8db(0x16c)];}else{if(_0x1b5edb==='less'){if(!this['postcssLess']){const _0x12b1cf=await import('postcss-less');this[_0x4af8db(0x151)]=_0x12b1cf[_0x4af8db(0x134)];}_0x4488b3=this[_0x4af8db(0x151)];}}const _0x2ce8d9=this[_0x4af8db(0x15e)]()['process'](_0x46d2ec,{'from':_0x210d75,'syntax':_0x4488b3}),_0x55dbbd=_0x2ce8d9[_0x4af8db(0x131)];this[_0x4af8db(0x13f)]?.['debug'](_0x4af8db(0x132),{'file':_0x210d75});}catch(_0x2d27d3){const _0x5cb08f=this[_0x4af8db(0x15f)](_0x2d27d3,_0x210d75);_0x5cb08f&&_0x5c192f['push'](_0x5cb08f);}return _0x5c192f;}async[a0_0x5c5ec6(0x13d)](_0x5170e7,_0x913634,_0xc95f4f){const _0x24eed3=a0_0x5c5ec6,_0x3c36ca=[];try{if(!this[_0x24eed3(0x14d)]){const _0x9a8d39=await import(_0x24eed3(0x14d));this['stylelint']=_0x9a8d39['default'];}const _0x5b23aa={'extends':[_0x24eed3(0x137)],'rules':{'color-no-invalid-hex':!![],'font-family-no-duplicate-names':!![],'function-calc-no-invalid':!![],'string-no-newline':!![],'unit-no-unknown':!![],'property-no-unknown':!![],'declaration-block-no-duplicate-properties':!![],'selector-pseudo-class-no-unknown':!![],'selector-pseudo-element-no-unknown':!![],'selector-type-no-unknown':[!![],{'ignoreTypes':['/^custom-/','ng-deep']}],'media-feature-name-no-unknown':!![],'at-rule-no-unknown':_0xc95f4f===_0x24eed3(0x12e)?[!![],{'ignoreAtRules':['mixin','include','extend','if','else',_0x24eed3(0x13e),'each',_0x24eed3(0x14a),_0x24eed3(0x164),'return','content','use',_0x24eed3(0x168)]}]:_0xc95f4f===_0x24eed3(0x12a)?[!![],{'ignoreAtRules':['plugin']}]:!![],'comment-no-empty':!![],'no-duplicate-selectors':!![],'no-empty-source':null,'block-no-empty':!![],'declaration-block-no-shorthand-property-overrides':!![],'font-family-no-missing-generic-family-keyword':!![],'function-linear-gradient-no-nonstandard-direction':!![],'no-descending-specificity':null,'no-duplicate-at-import-rules':!![],'no-extra-semicolons':!![],'no-invalid-double-slash-comments':!![],'selector-pseudo-element-colon-notation':_0x24eed3(0x155),'selector-type-case':'lower'},'customSyntax':_0xc95f4f==='scss'?_0x24eed3(0x15b):_0xc95f4f==='less'?_0x24eed3(0x159):undefined},_0x3f2b5d=await this['stylelint'][_0x24eed3(0x167)]({'code':_0x913634,'codeFilename':_0x5170e7,'config':_0x5b23aa});if(_0x3f2b5d[_0x24eed3(0x165)]&&_0x3f2b5d['results'][_0x24eed3(0x138)]>0x0){const _0xa0e82=_0x3f2b5d[_0x24eed3(0x165)][0x0];if(_0xa0e82[_0x24eed3(0x139)])for(const _0x4b38f1 of _0xa0e82['warnings']){_0x3c36ca['push']({'file':_0x5170e7,'line':_0x4b38f1[_0x24eed3(0x153)]||0x1,'column':_0x4b38f1[_0x24eed3(0x143)]||0x1,'severity':_0x4b38f1['severity']==='error'?STATIC_ANALYSIS['SEVERITY']['ERROR']:STATIC_ANALYSIS[_0x24eed3(0x163)]['WARNING'],'rule':_0x4b38f1['rule']||'unknown','message':_0x4b38f1['text'],'category':this[_0x24eed3(0x141)](_0x4b38f1[_0x24eed3(0x133)]),'fixable':![],'source':'stylelint'});}}}catch(_0x3e527f){this[_0x24eed3(0x13f)]?.['warn']('Stylelint\x20analysis\x20failed',{'file':_0x5170e7,'error':_0x3e527f['message']});}return _0x3c36ca;}['formatPostCSSError'](_0x287052,_0x2d7ff2){const _0x58ffd9=a0_0x5c5ec6;return{'file':_0x2d7ff2,'line':_0x287052[_0x58ffd9(0x153)]||0x1,'column':_0x287052[_0x58ffd9(0x143)]||0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x58ffd9(0x15d)],'rule':_0x287052[_0x58ffd9(0x158)]||_0x58ffd9(0x135),'message':_0x287052[_0x58ffd9(0x12d)]||_0x287052[_0x58ffd9(0x16b)],'category':STATIC_ANALYSIS['CATEGORY'][_0x58ffd9(0x148)],'fixable':![],'source':'postcss','code':_0x287052[_0x58ffd9(0x147)]||undefined};}[a0_0x5c5ec6(0x141)](_0xb4ba9){const _0x46926e=a0_0x5c5ec6;if(!_0xb4ba9)return STATIC_ANALYSIS['CATEGORY'][_0x46926e(0x169)];const _0xc4a676=_0xb4ba9['toLowerCase']();if(_0xc4a676['includes'](_0x46926e(0x152))||_0xc4a676[_0x46926e(0x140)]('no-unknown')||_0xc4a676['includes']('no-empty')||_0xc4a676[_0x46926e(0x140)](_0x46926e(0x161)))return STATIC_ANALYSIS[_0x46926e(0x166)]['SYNTAX'];if(_0xc4a676[_0x46926e(0x140)]('performance')||_0xc4a676[_0x46926e(0x140)](_0x46926e(0x130)))return STATIC_ANALYSIS[_0x46926e(0x166)]['PERFORMANCE'];if(_0xc4a676['includes'](_0x46926e(0x16a))||_0xc4a676['includes']('recommended'))return STATIC_ANALYSIS[_0x46926e(0x166)][_0x46926e(0x145)];return STATIC_ANALYSIS[_0x46926e(0x166)][_0x46926e(0x169)];}[a0_0x5c5ec6(0x160)](_0x482ee0){const _0x111ad1=a0_0x5c5ec6,_0x1e0b61=_0x482ee0[_0x111ad1(0x13a)]();if(_0x1e0b61['endsWith'](_0x111ad1(0x144))||_0x1e0b61[_0x111ad1(0x154)]('.sass'))return'scss';if(_0x1e0b61[_0x111ad1(0x154)]('.less'))return _0x111ad1(0x12a);return'css';}['getSupportedExtensions'](){const _0x3c7104=a0_0x5c5ec6;return['.css',_0x3c7104(0x144),'.sass','.less'];}[a0_0x5c5ec6(0x13b)](){return![];}}function a0_0x13bf(){const _0x6e9d52=['ChvZAa','zMLSDgvY','CMvHC29U','C2nZCW','nZCXnKLmtMnOyW','B3b0Aw1PEMu','CM9VDa','ug9ZDentuYbZEw50yxGGy2HLy2SGCgfZC2vK','CNvSzq','zgvMyxvSDa','q3nZu3LUDgf4rxjYB3i','y2HLy2TtEw50yxG','C3r5BgvSAw50lwnVBMzPzY1ZDgfUzgfYza','BgvUz3rO','D2fYBMLUz3m','Dg9mB3DLCKnHC2u','C3vWCg9YDhnbDxrVrML4','zxjYB3i','BgLUDfn0EwXLCW','zM9Y','Bg9Nz2vY','Aw5JBhvKzxm','y2f0zwDVCML6zvn0EwXLBgLUDfj1Bgu','mZiXotq4mLjiqLf3tG','y29SDw1U','lNnJC3m','qKvtvf9quKfdveLdrq','nJq1mtq1u3vAyKXT','C291CMnL','u1Lovefy','nZC1mZHZt3D6wg0','D2HPBgu','mtj2re1hwfu','mti2vxrjDfPl','C3r5BgvSAw50','oti3ndaWBhL4z0fn','mJaYohPNBxj4sG','C2v2zxjPDhK','Cg9ZDgnZC0XLC3m','BM8TAw52ywXPza','BgLUzq','zw5KC1DPDgG','zg91yMXL','mtmYmhDpqwjyqq','q1ntigfUywX5C2LZignVBxbSzxrLza','BMfTzq','Cg9ZDgnZCY1SzxnZ','ndbhwuPzyMK','Cg9ZDgnZCY1Zy3nZ','mJGZnJy3mMv6Cw1otq','rvjst1i','Cg9ZDgnZCW','zM9YBwf0ug9ZDentu0vYCM9Y','zgv0zwn0tgfUz3vHz2u','C3LUDgf4','mtGZmdK1qLL2Efv3','u0vwrvjjvfK','zNvUy3rPB24','CMvZDwX0CW','q0furuDpuLK','BgLUDa','zM9YD2fYza','u1rzteu','yMvZDc1WCMfJDgLJzq','BwvZC2fNzq','Cg9ZDgnZC1nJC3m','q1ntigfUywX5C2LZigzHAwXLza','BgvZCW'];a0_0x13bf=function(){return _0x6e9d52;};return a0_0x13bf();}export default CSSAnalyzer;
@@ -1 +1 @@
1
- const a0_0xf3def9=a0_0x1376;(function(_0x573572,_0xb3fe98){const _0x1f7f6a=a0_0x1376,_0x48ba0e=_0x573572();while(!![]){try{const _0x3b5999=-parseInt(_0x1f7f6a(0x1e1))/0x1*(parseInt(_0x1f7f6a(0x1f0))/0x2)+parseInt(_0x1f7f6a(0x211))/0x3*(-parseInt(_0x1f7f6a(0x1ef))/0x4)+parseInt(_0x1f7f6a(0x1ee))/0x5+-parseInt(_0x1f7f6a(0x21c))/0x6*(parseInt(_0x1f7f6a(0x1da))/0x7)+parseInt(_0x1f7f6a(0x1e6))/0x8+parseInt(_0x1f7f6a(0x220))/0x9+parseInt(_0x1f7f6a(0x1d7))/0xa*(parseInt(_0x1f7f6a(0x1e3))/0xb);if(_0x3b5999===_0xb3fe98)break;else _0x48ba0e['push'](_0x48ba0e['shift']());}catch(_0x1ef57a){_0x48ba0e['push'](_0x48ba0e['shift']());}}}(a0_0x168b,0xefdea));import{exec}from'child_process';import{promisify}from'util';import a0_0x4007ff from'path';import a0_0x193cab from'fs/promises';function a0_0x168b(){const _0x20691a=['nJu4mZi2ngfytgfADW','DMfSAwrHDgvxAxrOq2HLy2TVDG','zgv0zwn0rMLSzvr5Cgu','zw52','DhjPBq','BwvZC2fNzq','BxvZDcbOyxzLihjLCxvPCMvKihbYB3bLCNr5icC','y3DL','ntm2oti2mefhwgTuqq','mZy4ognzzfPYAa','odu1mZu0u0jUANHw','zg9JA2vYx2nVBxbVC2u','A3vIzxjUzxrLCW','zMLSDgvY','BwfWq2HLy2TVDLnLDMvYAxr5','y29TCgLSzq','y2HLy2TVDIb2ywXPzgf0Aw9UigzHAwXLza','ANnVBLnJAgvTyq','Bg9Nz2vY','BM9jBxbSAwnPDefUEq','EwfTBgXPBNqGzgv0zwn0zwq','C3rYAwn0','C3bSAxq','DhnJB25MAwCUANnVBIb2ywXPzgf0Aw9UigzHAwXLza','Dw5RBM93BG','y2HLy2TFAwq','BgLUzq','sw52ywXPzcbku09ooIa','DhnJB25MAwCUANnVBG','zg9JA2vYzMLSzq','EwfTBa','C3rYAw5N','C2nHBM5LCKnHy2HL','DgvYCMfMB3jT','yxzHAwXHyMXLu2nHBM5LCNm','CgfJA2fNzs5QC29U','y2HLy2TVDIaTzIaI','DMfSAwrHDgveB2nRzxjMAwXL','CgfZC3DVCMq','ywP2ig5VDcbHDMfPBgfIBgu','yMfZzw5HBwu','BwfWwwfTBgXPBNrtzxzLCML0Eq','u0vwrvjjvfK','ndyYnMv2s2Lvsq','rvjst1i','CgfYC2u','ANnVBI1WyxjZzq','y29TCgLSzxjpChrPB25Z','DhnJB25MAwCTDMfSAwrHDg9Y','qvDtignYzwrLBNrPywXZ','vMfSAwrHDgLVBIbPC3n1zsbKzxrLy3rLza','su5gtW','Aw5JBhvKzxm','zgv0zwn0qxzHAwXHyMXLvMfSAwrHDg9YCW','nLn6wgjrsa','B2jQzwn0','lMvUDG','CgfJA2fNzs5QC29UihzHBgLKyxrPB24GzMfPBgvK','mtyXotu1nZjPsKDks2q','BM9YBwfSAxPLuMvZDwX0CW','EwfTBgXPBNqGDMfSAwrHDgLVBIbMywLSzwq','CMvHzezPBgu','CMvTzwrPyxrPB24','iIaTlwzYyw1LD29YAYa','lNLHBwW','AgfKB2XPBNqGls1MB3jTyxqGANnVBIaI','Dg9mB3DLCKnHC2u','DMfSAwrHDgvqywnRywDLsNnVBG','zgvIDwC','DMfSAwrHDgvuC0nVBMzPzW','BgvUz3rO','zgLYBMfTzq','ANnVBG','z2v0sw5ZDgfSBfjLy29TBwvUzgf0Aw9UCW','AgfKB2XPBNqGBM90igf2ywLSywjSzq','y2HLy2TVDIbKzxrLy3rLza','BwfWsgfKB2XPBNrtzxzLCML0Eq','zxjYB3i','BwvKAxvT','CgfYC2vdAgvJA292uMvZDwX0CW','CMvZDwX0CW','AgfKB2XPBNq','BwfW','vw5RBM93BIbJB25MAwCGzMLSzsb0ExbL','AZHZ','EwfTBgXPBNq','zMLSzv9SAw5Lx3jHBMDL','DMfSAwrHDgvzqu1m','y2f0zwDVCNK','C3rHCNrZv2L0Aa','zg9JA2vYlwnVBxbVC2uUEwfTBa','ChvZAa','DMfSAwrHDg9Y','BwLZC2LUz1bYB3bLCNr5','sLnptIbJB25MAwD1CMf0Aw9UihzHBgLKyxrPB24','C3rKB3v0','AgfKB2XPBNqGls12zxjZAw9U','lNLTBa','C2vJDxjPDhK','z3vPzgvSAw5L','y29TBw9UANm','DMfSAwrHDgvfBNzgAwXL','zw5KC1DPDgG','q29UC2LKzxiGzw5HyMXPBMCGiNn0CMLJDciGBw9KzsbMB3iGyMv0DgvYihr5CguGC2fMzxr5','DxrMltG','lNrMDMfYCW','mtaWsxHxDMDm','lNrM','ywP2','ody3mte1owPhq0XpEa','C3LUDgf4','CgfYC2vzyw1SBgLUDfjLC3vSDhm','CgfYC2viywrVBgLUDfjLC3vSDhm','C3rYAwn0lw1Vzgu','v0fstKLorW','zMfPBgvKx2nOzwnRCW','m2vMyvH6ta','q1jjveLdquW','mtm1mJCWm2fmDgThuq','y2HLy2TFBMfTzq','y2HLy2TVDG'];a0_0x168b=function(){return _0x20691a;};return a0_0x168b();}function a0_0x1376(_0x3d82a7,_0x4cd83a){_0x3d82a7=_0x3d82a7-0x1c4;const _0x168b6e=a0_0x168b();let _0x13764e=_0x168b6e[_0x3d82a7];if(a0_0x1376['wOjbHm']===undefined){var _0x372b50=function(_0x164abe){const _0x48213c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4007ff='',_0x193cab='';for(let _0x18e867=0x0,_0x12c9cb,_0x1c07c6,_0x4081ac=0x0;_0x1c07c6=_0x164abe['charAt'](_0x4081ac++);~_0x1c07c6&&(_0x12c9cb=_0x18e867%0x4?_0x12c9cb*0x40+_0x1c07c6:_0x1c07c6,_0x18e867++%0x4)?_0x4007ff+=String['fromCharCode'](0xff&_0x12c9cb>>(-0x2*_0x18e867&0x6)):0x0){_0x1c07c6=_0x48213c['indexOf'](_0x1c07c6);}for(let _0x4f4f47=0x0,_0x5e9558=_0x4007ff['length'];_0x4f4f47<_0x5e9558;_0x4f4f47++){_0x193cab+='%'+('00'+_0x4007ff['charCodeAt'](_0x4f4f47)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x193cab);};a0_0x1376['ptmlPP']=_0x372b50,a0_0x1376['sdvXUW']={},a0_0x1376['wOjbHm']=!![];}const _0x125263=_0x168b6e[0x0],_0x1eb906=_0x3d82a7+_0x125263,_0x23048d=a0_0x1376['sdvXUW'][_0x1eb906];return!_0x23048d?(_0x13764e=a0_0x1376['ptmlPP'](_0x13764e),a0_0x1376['sdvXUW'][_0x1eb906]=_0x13764e):_0x13764e=_0x23048d,_0x13764e;}import{STATIC_ANALYSIS}from'../utilities/constants.js';const execAsync=promisify(exec);class ConfigValidator{constructor(_0x18e867=null){const _0x327c92=a0_0x1376;this[_0x327c92(0x1f8)]=_0x18e867,this[_0x327c92(0x208)]=null,this[_0x327c92(0x206)]=new Map();}async[a0_0xf3def9(0x21b)](){const _0x130291=a0_0xf3def9;if(this['availableScanners']!==null)return this['availableScanners'];const _0x12c9cb={'checkov':![],'hadolint':![],'yamllint':![],'jsonSchema':![]};try{await execAsync('checkov\x20--version',{'timeout':0x1388}),_0x12c9cb['checkov']=!![],this['logger']?.['debug'](_0x130291(0x231));}catch(_0x1c07c6){this['logger']?.['debug']('checkov\x20not\x20available',{'error':_0x1c07c6['message']});}try{await execAsync(_0x130291(0x1cd),{'timeout':0x1388}),_0x12c9cb[_0x130291(0x237)]=!![],this['logger']?.[_0x130291(0x22a)]('hadolint\x20detected');}catch(_0x4081ac){this[_0x130291(0x1f8)]?.[_0x130291(0x22a)](_0x130291(0x230),{'error':_0x4081ac[_0x130291(0x1eb)]});}try{await execAsync('yamllint\x20--version',{'timeout':0x1388}),_0x12c9cb[_0x130291(0x23b)]=!![],this[_0x130291(0x1f8)]?.['debug'](_0x130291(0x1fa));}catch(_0x4f4f47){this[_0x130291(0x1f8)]?.[_0x130291(0x22a)]('yamllint\x20not\x20available',{'error':_0x4f4f47[_0x130291(0x1eb)]});}try{await import(_0x130291(0x1d9)),_0x12c9cb['jsonSchema']=!![],this['logger']?.['debug']('JSON\x20Schema\x20validation\x20available');}catch(_0x5e9558){this['logger']?.[_0x130291(0x22a)](_0x130291(0x20d),{'error':_0x5e9558['message']});}return this['availableScanners']=_0x12c9cb,_0x12c9cb;}async['validate'](_0x3c2fb8,_0x3f71aa={}){const _0x481c5b=a0_0xf3def9,_0x38b5bb=[],_0x7b0e94=await this['detectAvailableValidators'](),_0x11c446=this[_0x481c5b(0x1e8)](_0x3c2fb8);this['logger']?.['debug']('Validating\x20config\x20file',{'filePath':_0x3c2fb8,'fileType':_0x11c446});switch(_0x11c446){case _0x481c5b(0x203):if(_0x7b0e94['hadolint']){const _0x4a9429=await this[_0x481c5b(0x20b)](_0x3c2fb8,_0x3f71aa);_0x38b5bb[_0x481c5b(0x1c8)](..._0x4a9429);}if(_0x7b0e94[_0x481c5b(0x1e5)]){const _0x1afb46=await this['validateWithCheckov'](_0x3c2fb8,_0x481c5b(0x203),_0x3f71aa);_0x38b5bb['push'](..._0x1afb46);}break;case'docker-compose':if(_0x7b0e94[_0x481c5b(0x23b)]){const _0x3eaa8f=await this['validateYAML'](_0x3c2fb8,_0x3f71aa);_0x38b5bb[_0x481c5b(0x1c8)](..._0x3eaa8f);}if(_0x7b0e94[_0x481c5b(0x1e5)]){const _0x18634d=await this[_0x481c5b(0x1e7)](_0x3c2fb8,_0x481c5b(0x1f1),_0x3f71aa);_0x38b5bb[_0x481c5b(0x1c8)](..._0x18634d);}break;case'kubernetes':if(_0x7b0e94['yamllint']){const _0x47c5b3=await this['validateYAML'](_0x3c2fb8,_0x3f71aa);_0x38b5bb['push'](..._0x47c5b3);}if(_0x7b0e94[_0x481c5b(0x1e5)]){const _0x3c90f1=await this['validateWithCheckov'](_0x3c2fb8,'kubernetes',_0x3f71aa);_0x38b5bb['push'](..._0x3c90f1);}break;case _0x481c5b(0x207):if(_0x7b0e94['checkov']){const _0xecf737=await this[_0x481c5b(0x1e7)](_0x3c2fb8,'terraform',_0x3f71aa);_0x38b5bb[_0x481c5b(0x1c8)](..._0xecf737);}break;case'package.json':if(_0x7b0e94[_0x481c5b(0x1f7)]){const _0x2a418f=await this[_0x481c5b(0x229)](_0x3c2fb8,_0x3f71aa);_0x38b5bb[_0x481c5b(0x1c8)](..._0x2a418f);}break;case _0x481c5b(0x202):if(_0x7b0e94[_0x481c5b(0x1f7)]){const _0x4f8833=await this[_0x481c5b(0x22b)](_0x3c2fb8,_0x3f71aa);_0x38b5bb[_0x481c5b(0x1c8)](..._0x4f8833);}break;case'github-actions':if(_0x7b0e94['yamllint']){const _0x358782=await this[_0x481c5b(0x1c4)](_0x3c2fb8,_0x3f71aa);_0x38b5bb[_0x481c5b(0x1c8)](..._0x358782);}break;case _0x481c5b(0x1e9):const _0x204110=await this[_0x481c5b(0x1d2)](_0x3c2fb8,_0x3f71aa);_0x38b5bb[_0x481c5b(0x1c8)](..._0x204110);break;case'yaml':if(_0x7b0e94['yamllint']){const _0x546698=await this[_0x481c5b(0x1c4)](_0x3c2fb8,_0x3f71aa);_0x38b5bb[_0x481c5b(0x1c8)](..._0x546698);}break;default:this[_0x481c5b(0x1f8)]?.['warn'](_0x481c5b(0x239),{'filePath':_0x3c2fb8,'fileType':_0x11c446});return[];}return this[_0x481c5b(0x221)](_0x38b5bb);}async[a0_0xf3def9(0x20b)](_0x235856,_0x2ce11d={}){const _0x573e3b=a0_0xf3def9;try{const _0x5bee61=await execAsync(_0x573e3b(0x227)+_0x235856+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0x4a526b=JSON['parse'](_0x5bee61['stdout']);return this['parseHadolintResults'](_0x4a526b,_0x235856);}catch(_0x4344dd){if(_0x4344dd[_0x573e3b(0x1cc)])try{const _0x73b63d=JSON[_0x573e3b(0x213)](_0x4344dd['stdout']);return this[_0x573e3b(0x1dd)](_0x73b63d,_0x235856);}catch(_0x150b5a){this[_0x573e3b(0x1f8)]?.['error']('Failed\x20to\x20parse\x20hadolint\x20output',{'error':_0x150b5a['message']});}return this[_0x573e3b(0x1f8)]?.['error']('hadolint\x20validation\x20failed',{'error':_0x4344dd[_0x573e3b(0x1eb)]}),[];}}['parseHadolintResults'](_0x29b9e7,_0x499b13){const _0xfd8874=a0_0xf3def9,_0x2f7e53=[];if(Array['isArray'](_0x29b9e7))for(const _0x3f2d10 of _0x29b9e7){_0x2f7e53['push']({'file':_0x499b13,'line':_0x3f2d10['line']||0x1,'column':_0x3f2d10['column']||0x1,'severity':this['mapHadolintSeverity'](_0x3f2d10['level']),'rule':_0x3f2d10['code'],'message':_0x3f2d10['message'],'category':_0xfd8874(0x203),'validator':_0xfd8874(0x237)});}return _0x2f7e53;}async['validateYAML'](_0x2635ef,_0x3f6792={}){const _0x150632=a0_0xf3def9;try{const _0x149f8d=await execAsync('yamllint\x20-f\x20parsable\x20\x22'+_0x2635ef+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530});return this[_0x150632(0x1dc)](_0x149f8d[_0x150632(0x1cc)],_0x2635ef);}catch(_0x3957cf){if(_0x3957cf[_0x150632(0x1cc)])return this['parseYamllintResults'](_0x3957cf[_0x150632(0x1cc)],_0x2635ef);return this[_0x150632(0x1f8)]?.[_0x150632(0x233)](_0x150632(0x222),{'error':_0x3957cf[_0x150632(0x1eb)]}),[];}}['parseYamllintResults'](_0x182b64,_0x3209f4){const _0x36f0e5=a0_0xf3def9,_0x2a11c3=[],_0x17ea6b=_0x182b64[_0x36f0e5(0x1fc)]('\x0a')[_0x36f0e5(0x1f3)](_0x46367f=>_0x46367f['trim']());for(const _0x465c1d of _0x17ea6b){const _0xde677f=_0x465c1d['match'](/^(.+?):(\d+):(\d+):\s*\[(\w+)\]\s*(.+?)\s*\((.+?)\)/);if(_0xde677f){const [,_0x4fa9ac,_0x24c564,_0x257660,_0x16c08b,_0x167d2f,_0x20d332]=_0xde677f;_0x2a11c3[_0x36f0e5(0x1c8)]({'file':_0x3209f4,'line':parseInt(_0x24c564,0xa),'column':parseInt(_0x257660,0xa),'severity':this[_0x36f0e5(0x20f)](_0x16c08b),'rule':_0x20d332,'message':_0x167d2f,'category':_0x36f0e5(0x204),'validator':_0x36f0e5(0x23b)});}}return _0x2a11c3;}async['validateWithCheckov'](_0x25e24f,_0x3f7a42,_0x509733={}){const _0x42a5ee=a0_0xf3def9;try{const _0x3b9441=await execAsync(_0x42a5ee(0x20a)+_0x25e24f+_0x42a5ee(0x225)+_0x3f7a42+'\x20--output\x20json\x20--compact',{'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0x453f53=JSON['parse'](_0x3b9441[_0x42a5ee(0x1cc)]);return this['parseCheckovResults'](_0x453f53,_0x25e24f);}catch(_0x3db6be){if(_0x3db6be[_0x42a5ee(0x1cc)])try{const _0x680520=JSON['parse'](_0x3db6be[_0x42a5ee(0x1cc)]);return this[_0x42a5ee(0x235)](_0x680520,_0x25e24f);}catch(_0x50a396){this['logger']?.['error']('Failed\x20to\x20parse\x20checkov\x20output',{'error':_0x50a396['message']});}return this['logger']?.[_0x42a5ee(0x233)](_0x42a5ee(0x1f6),{'error':_0x3db6be[_0x42a5ee(0x1eb)]}),[];}}[a0_0xf3def9(0x235)](_0x50d7ba,_0x4dc7fb){const _0x747c5e=a0_0xf3def9,_0x481284=[];if(_0x50d7ba['results']&&_0x50d7ba[_0x747c5e(0x236)][_0x747c5e(0x1e0)])for(const _0x4fd8e9 of _0x50d7ba[_0x747c5e(0x236)]['failed_checks']){_0x481284['push']({'file':_0x4dc7fb,'line':_0x4fd8e9['file_line_range']?_0x4fd8e9[_0x747c5e(0x23c)][0x0]:0x1,'column':0x1,'severity':this['mapCheckovSeverity'](_0x4fd8e9['check_class']),'rule':_0x4fd8e9[_0x747c5e(0x1ff)],'message':_0x4fd8e9[_0x747c5e(0x1e4)]||_0x4fd8e9['check_id'],'category':_0x747c5e(0x1cf),'validator':'checkov','remediation':_0x4fd8e9[_0x747c5e(0x1d0)],'cwe':_0x4fd8e9[_0x747c5e(0x1ed)],'references':_0x4fd8e9['guideline']?[_0x4fd8e9['guideline']]:[]});}return _0x481284;}async['validatePackageJson'](_0x70c57f,_0x357be8={}){const _0xbce2b=a0_0xf3def9;try{const _0x141abf=(await import('ajv'))['default'],_0xcf289b=(await import('ajv-formats'))['default'],_0x509379=await a0_0x193cab['readFile'](_0x70c57f,'utf-8'),_0x21ae6c=JSON[_0xbce2b(0x213)](_0x509379),_0x5c56be=new _0x141abf({'allErrors':!![],'strict':![]});_0xcf289b(_0x5c56be);const _0x4802fb={'type':_0xbce2b(0x21d),'required':['name','version'],'properties':{'name':{'type':'string','pattern':'^(?:@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$'},'version':{'type':'string'},'description':{'type':'string'},'main':{'type':_0xbce2b(0x205)},'type':{'type':_0xbce2b(0x205),'enum':['module',_0xbce2b(0x1d1)]},'scripts':{'type':'object'},'dependencies':{'type':_0xbce2b(0x21d)},'devDependencies':{'type':'object'}},'additionalProperties':!![]},_0x41536d=_0x5c56be[_0xbce2b(0x1f5)](_0x4802fb),_0x6bbe7a=_0x41536d(_0x21ae6c);if(!_0x6bbe7a&&_0x41536d['errors'])return _0x41536d['errors'][_0xbce2b(0x238)](_0x3c1e57=>({'file':_0x70c57f,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0xbce2b(0x212)],'rule':'json-schema','message':_0x3c1e57['instancePath']?_0x3c1e57['instancePath']+'\x20'+_0x3c1e57['message']:_0xbce2b(0x1ec)+_0x3c1e57['params'][_0xbce2b(0x1ca)]+'\x27','category':'validation','validator':'json-schema'}));return[];}catch(_0x26c257){return this[_0xbce2b(0x1f8)]?.['error'](_0xbce2b(0x21f),{'error':_0x26c257['message']}),[{'file':_0x70c57f,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0xbce2b(0x210)][_0xbce2b(0x212)],'rule':_0xbce2b(0x214),'message':_0xbce2b(0x201)+_0x26c257[_0xbce2b(0x1eb)],'category':_0xbce2b(0x1db),'validator':'json-parse'}];}}async[a0_0xf3def9(0x22b)](_0x46532f,_0x1f5608={}){const _0x5962fe=a0_0xf3def9;try{const _0x14d0d0=await a0_0x193cab[_0x5962fe(0x223)](_0x46532f,_0x5962fe(0x1d5)),_0x32784c=JSON[_0x5962fe(0x213)](_0x14d0d0),_0x90441c=[];if(_0x32784c[_0x5962fe(0x215)]){const _0x296979=_0x32784c['compilerOptions'];!_0x296979[_0x5962fe(0x1fb)]&&_0x90441c[_0x5962fe(0x1c8)]({'file':_0x46532f,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x5962fe(0x210)]['WARNING'],'rule':_0x5962fe(0x1de),'message':_0x5962fe(0x1d4),'category':'best-practice','validator':_0x5962fe(0x216)}),_0x296979[_0x5962fe(0x1f9)]===![]&&_0x90441c['push']({'file':_0x46532f,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':'no-implicit-any','message':'Disabling\x20noImplicitAny\x20reduces\x20type\x20safety','category':'best-practice','validator':'tsconfig-validator'});}return _0x90441c;}catch(_0x1033ca){return this[_0x5962fe(0x1f8)]?.['error'](_0x5962fe(0x1fd),{'error':_0x1033ca[_0x5962fe(0x1eb)]}),[{'file':_0x46532f,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x5962fe(0x210)]['ERROR'],'rule':'json-parse','message':'Invalid\x20JSON:\x20'+_0x1033ca[_0x5962fe(0x1eb)],'category':'syntax','validator':'json-parse'}];}}async['validateEnvFile'](_0x5047b9,_0x16774e={}){const _0x2fc14e=a0_0xf3def9;try{const _0x564de7=await a0_0x193cab['readFile'](_0x5047b9,_0x2fc14e(0x1d5)),_0x558b65=[],_0x4e07eb=_0x564de7[_0x2fc14e(0x1fc)]('\x0a'),_0x10bcb7=[{'pattern':/password|passwd|pwd/i,'name':_0x2fc14e(0x20c)},{'pattern':/api[_-]?key/i,'name':'API\x20key'},{'pattern':/secret/i,'name':'secret'},{'pattern':/token/i,'name':'token'},{'pattern':/private[_-]?key/i,'name':'private\x20key'},{'pattern':/aws[_-]?access/i,'name':_0x2fc14e(0x217)}];return _0x4e07eb['forEach']((_0x1723d5,_0x14314a)=>{const _0x1d59c9=_0x2fc14e,_0x5340be=_0x1723d5['trim']();if(!_0x5340be||_0x5340be['startsWith']('#'))return;if(_0x5340be[_0x1d59c9(0x21a)]('=')){const [_0x2c865c,_0xafe81e]=_0x5340be['split']('='),_0x51c9b5=_0x2c865c['toLowerCase'](),_0x305aac=_0xafe81e?.[_0x1d59c9(0x1ea)]()||'',_0x3397ed=_0x305aac&&_0x305aac!==''&&!_0x305aac[_0x1d59c9(0x1c6)]('$')&&_0x305aac!=='your-key-here'&&_0x305aac!=='changeme'&&_0x305aac[_0x1d59c9(0x22c)]>0x5;if(_0x3397ed)for(const {pattern:_0x1f40cf,name:_0x25a064}of _0x10bcb7){if(_0x1f40cf['test'](_0x51c9b5)){_0x558b65['push']({'file':_0x5047b9,'line':_0x14314a+0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x1d59c9(0x210)][_0x1d59c9(0x1e2)],'rule':'hardcoded-secret','message':'Potential\x20hardcoded\x20'+_0x25a064+'\x20detected\x20in\x20.env\x20file','category':_0x1d59c9(0x1cf),'validator':'env-validator','remediation':'Use\x20environment-specific\x20.env\x20files\x20and\x20add\x20.env\x20to\x20.gitignore'});break;}}}}),_0x558b65;}catch(_0x55bdba){return this['logger']?.[_0x2fc14e(0x233)]('.env\x20validation\x20failed',{'error':_0x55bdba['message']}),[];}}[a0_0xf3def9(0x1e8)](_0x11c1f2){const _0x373ef0=a0_0xf3def9,_0x111f49=a0_0x4007ff[_0x373ef0(0x20e)](_0x11c1f2)['toLowerCase'](),_0x360f37=a0_0x4007ff[_0x373ef0(0x22d)](_0x11c1f2);if(_0x111f49===_0x373ef0(0x203))return'dockerfile';if(_0x111f49==='docker-compose.yml'||_0x111f49===_0x373ef0(0x1c7))return'docker-compose';if(_0x111f49==='package.json')return _0x373ef0(0x209);if(_0x111f49===_0x373ef0(0x202))return'tsconfig.json';if(_0x111f49===_0x373ef0(0x21e)||_0x111f49[_0x373ef0(0x1d3)](_0x373ef0(0x21e)))return _0x373ef0(0x1e9);if(_0x360f37[_0x373ef0(0x21a)]('.github/workflows'))return'github-actions';if(_0x360f37[_0x373ef0(0x21a)](_0x373ef0(0x1f2))||_0x360f37[_0x373ef0(0x21a)](_0x373ef0(0x23a)))return'kubernetes';const _0x360720=a0_0x4007ff['extname'](_0x11c1f2)['toLowerCase']();if(_0x360720===_0x373ef0(0x1d8)||_0x360720===_0x373ef0(0x1d6))return _0x373ef0(0x207);if(_0x360720===_0x373ef0(0x1ce)||_0x360720===_0x373ef0(0x226))return'yaml';if(_0x360720==='.json')return _0x373ef0(0x22e);return _0x373ef0(0x1fe);}[a0_0xf3def9(0x221)](_0x2ffe1c){const _0x6262e7=a0_0xf3def9;return _0x2ffe1c['map'](_0x5c6344=>({'file':_0x5c6344['file'],'line':_0x5c6344[_0x6262e7(0x200)]||0x1,'column':_0x5c6344['column']||0x1,'severity':_0x5c6344['severity']||STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':_0x5c6344['rule']||'unknown','message':_0x5c6344[_0x6262e7(0x1eb)]||_0x6262e7(0x218),'category':_0x5c6344[_0x6262e7(0x1c5)]||'validation','validator':_0x5c6344[_0x6262e7(0x1c9)],'cwe':_0x5c6344['cwe']||null,'remediation':_0x5c6344[_0x6262e7(0x224)]||null,'references':_0x5c6344['references']||[]}));}[a0_0xf3def9(0x232)](_0x2767b6){const _0x452a35=a0_0xf3def9,_0x11423e={'error':STATIC_ANALYSIS['SEVERITY'][_0x452a35(0x212)],'warning':STATIC_ANALYSIS['SEVERITY']['WARNING'],'info':STATIC_ANALYSIS[_0x452a35(0x210)][_0x452a35(0x219)],'style':STATIC_ANALYSIS['SEVERITY'][_0x452a35(0x219)]};return _0x11423e[_0x2767b6?.['toLowerCase']()]||STATIC_ANALYSIS[_0x452a35(0x210)]['WARNING'];}['mapYamllintSeverity'](_0x31c342){const _0x237117=a0_0xf3def9,_0x528fa2={'error':STATIC_ANALYSIS['SEVERITY'][_0x237117(0x212)],'warning':STATIC_ANALYSIS[_0x237117(0x210)]['WARNING']};return _0x528fa2[_0x31c342?.[_0x237117(0x228)]()]||STATIC_ANALYSIS['SEVERITY'][_0x237117(0x1df)];}[a0_0xf3def9(0x1f4)](_0x15a465){const _0x39f95d=a0_0xf3def9;return STATIC_ANALYSIS[_0x39f95d(0x210)]['ERROR'];}async['getValidatorStatus'](){const _0x1e106f=await this['detectAvailableValidators']();return{'validators':_0x1e106f,'recommendations':this['getInstallRecommendations'](_0x1e106f)};}[a0_0xf3def9(0x22f)](_0x5b9c4e){const _0x3b8fd6=a0_0xf3def9,_0x37a811=[];return!_0x5b9c4e['checkov']&&_0x37a811[_0x3b8fd6(0x1c8)]({'validator':_0x3b8fd6(0x1e5),'reason':'Infrastructure\x20as\x20Code\x20security\x20scanning\x20(Docker,\x20Kubernetes,\x20Terraform)','install':'pip\x20install\x20checkov','priority':'high'}),!_0x5b9c4e[_0x3b8fd6(0x237)]&&_0x37a811[_0x3b8fd6(0x1c8)]({'validator':'hadolint','reason':'Dockerfile\x20linting\x20and\x20best\x20practices','install':'Download from https://github.com/hadolint/hadolint/releases','priority':'high'}),!_0x5b9c4e['yamllint']&&_0x37a811[_0x3b8fd6(0x1c8)]({'validator':'yamllint','reason':'YAML\x20file\x20validation','install':'pip\x20install\x20yamllint','priority':_0x3b8fd6(0x234)}),!_0x5b9c4e[_0x3b8fd6(0x1f7)]&&_0x37a811['push']({'validator':'ajv\x20(JSON\x20Schema)','reason':_0x3b8fd6(0x1cb),'install':'npm\x20install\x20ajv\x20ajv-formats','priority':_0x3b8fd6(0x234)}),_0x37a811;}}export default ConfigValidator;
1
+ const a0_0x5acffd=a0_0x4b14;function a0_0x244d(){const _0x44ff5d=['qvDtignYzwrLBNrPywXZ','EwfTBgXPBNqGlwyGCgfYC2fIBguGiG','CgfJA2fNzs5QC29U','iIaTlwzYyw1LD29YAYa','ANnVBI1Zy2HLBwe','mJm2tuzsqNH4','CgfYC2viywrVBgLUDfjLC3vSDhm','nte4nJbTqMrgsNO','owHfwhflrq','DMfSAwrHDgveB2nRzxjMAwXL','nJC3nJyYngPyr3vgEq','CMvZDwX0CW','AgfKB2XPBNqGzgv0zwn0zwq','rMfPBgvKihrVihbHCNnLignOzwnRB3yGB3v0Chv0','EwfTBgXPBNqGBM90igf2ywLSywjSzq','y29Kzq','zgvIDwC','C2vJCMv0','C3rKB3v0','sLnptIbty2HLBweGDMfSAwrHDgLVBIbHDMfPBgfIBgu','EwfTBa','u0vwrvjjvfK','lNLHBwW','lMPZB24','DhjPBq','DhnJB25MAwCUANnVBIb2ywXPzgf0Aw9UigzHAwXLza','D2fYBG','y2HLy2TVDIbUB3qGyxzHAwXHyMXL','BwLZC2LUz1bYB3bLCNr5','AZHZ','y3DL','BwfW','DgvYCMfMB3jT','BM9YBwfSAxPLuMvZDwX0CW','lMDPDgH1yI93B3jRzMXVD3m','zxjYB3jZ','ANnVBLnJAgvTyq','AgfKB2XPBNqGBM90igf2ywLSywjSzq','EwfTBgXPBNq','v0fstKLorW','sw52ywXPzcbku09ooIa','y2HLy2TFAwq','BgvUz3rO','DMfSAwrHDgvuC0nVBMzPzW','DgvZDa','ChvZAa','lMvUDG','zMLSDgvY','zMfPBgvKx2nOzwnRCW','mtiZmZi4ogD6A21MCG','C3rYAwn0','CgLWigLUC3rHBgWGEwfTBgXPBNq','EwfTBgXPBNqGls12zxjZAw9U','BwfWwwfTBgXPBNrtzxzLCML0Eq','EwfTBgXPBNqGDMfSAwrHDgLVBIbMywLSzwq','BgLUzq','CgfZC3DVCMq','zw52lxzHBgLKyxrVCG','lNLTBa','C2vJDxjPDhK','DMfSAwrHDgvxAxrOq2HLy2TVDG','Aw5JBhvKzxm','zMLSzq','y29TCgLSzq','vMfSAwrHDgLVBIbPC3n1zsbKzxrLy3rLza','vxnLigvUDMLYB25Tzw50lxnWzwnPzMLJic5LBNyGzMLSzxmGyw5KigfKzcaUzw52ihrVic5NAxrPz25VCMu','zg9JA2vYzMLSzq','zg9JA2vYlwnVBxbVC2uUEw1S','zMLSzv9SAw5Lx3jHBMDL','BwvKAxvT','A3vIzxjUzxrLCW','mtC2mdGWndrdEM5xAK8','DhnJB25MAwCUANnVBG','B2jQzwn0','zgv0zwn0qxzHAwXHyMXLvMfSAwrHDg9YCW','ywP2icHku09oifnJAgvTysK','z2v0sw5ZDgfSBfjLy29TBwvUzgf0Aw9UCW','C3LUDgf4','nu1ptwzXsa','Bg9Nz2vY','Bw9KDwXL','CMvMzxjLBMnLCW','qvbjigTLEq','CgfYC2u','mZeYode3mMv4yu91ra','C3bSAxq','ndm2mNbeDNzMDG','CMvHzezPBgu','y2HLy2TVDG','Dg9Rzw4','BM9jBxbSAwnPDefUEq','Dg9mB3DLCKnHC2u','ug90zw50AwfSigHHCMrJB2rLzca','zgvMyxvSDa','CNvSzq','sw5MCMfZDhj1y3r1CMuGyxmGq29KzsbZzwn1CML0EsbZy2fUBMLUzYaOrg9JA2vYlcblDwjLCM5LDgvZlcbuzxjYywzVCM0P','BwfWsgfKB2XPBNrtzxzLCML0Eq','y29SDw1U','AgfYzgnVzgvKlxnLy3jLDa','lNrMDMfYCW','zgLYBMfTzq','y2HLy2TVDIaTzIaI','DMfSAwrHDgLVBG','ywP2ig5VDcbHDMfPBgfIBgu','BwfWq2HLy2TVDLnLDMvYAxr5','nJC3nffKvNPAsW','ywP2','wufntcbMAwXLihzHBgLKyxrPB24','zM9YrwfJAa','AgfKB2XPBNqGDMfSAwrHDgLVBIbMywLSzwq','rMfPBgvKihrVihbHCNnLigHHzg9SAw50ig91Dhb1Da','zxjYB3i','Aw5ZDgfUy2vqyxrO','vw5RBM93BIbJB25MAwCGzMLSzsb0ExbL','DxrMltG','z3vPzgvSAw5L','CgfYC2vzyw1SBgLUDfjLC3vSDhm','CgfYC2vdAgvJA292uMvZDwX0CW','zxH0BMfTzq','zg9JA2vYlwnVBxbVC2uUEwfTBa','rvjst1i','sLnptIbJB25MAwD1CMf0Aw9UihzHBgLKyxrPB24','nda1m2fHy3DkuG','ic0TB3v0Chv0igPZB24Gls1JB21Wywn0','DMfSAwrHDgvfBNzgAwXL','BNbTigLUC3rHBgWGywP2igfQDI1MB3jTyxrZ','yMfZzw5HBwu','nJzHCuzYEMO','CgfYyw1Z','BwvZC2fNzq','su5gtW','AgfKB2XPBNq','C3rYAw5N','y29TCgLSzxjpChrPB25Z','yxzHAwXHyMXLu2nHBM5LCNm','ANnVBI1WyxjZzq','y2HLy2TVDIb2ywXPzgf0Aw9UigzHAwXLza','C3rHCNrZv2L0Aa','mtnfD0fus3a'];a0_0x244d=function(){return _0x44ff5d;};return a0_0x244d();}(function(_0x5eed19,_0x14098b){const _0x84d53=a0_0x4b14,_0x3ac51a=_0x5eed19();while(!![]){try{const _0x32867c=-parseInt(_0x84d53(0x173))/0x1*(parseInt(_0x84d53(0x14c))/0x2)+-parseInt(_0x84d53(0x1c2))/0x3+-parseInt(_0x84d53(0x19f))/0x4*(parseInt(_0x84d53(0x1bc))/0x5)+-parseInt(_0x84d53(0x1c4))/0x6*(-parseInt(_0x84d53(0x15d))/0x7)+-parseInt(_0x84d53(0x178))/0x8*(-parseInt(_0x84d53(0x176))/0x9)+parseInt(_0x84d53(0x175))/0xa*(parseInt(_0x84d53(0x162))/0xb)+-parseInt(_0x84d53(0x1b5))/0xc*(-parseInt(_0x84d53(0x16d))/0xd);if(_0x32867c===_0x14098b)break;else _0x3ac51a['push'](_0x3ac51a['shift']());}catch(_0x52496b){_0x3ac51a['push'](_0x3ac51a['shift']());}}}(a0_0x244d,0x96696));function a0_0x4b14(_0x509e08,_0x564e61){_0x509e08=_0x509e08-0x149;const _0x244d3c=a0_0x244d();let _0x4b14db=_0x244d3c[_0x509e08];if(a0_0x4b14['ByyiAL']===undefined){var _0x1e85c7=function(_0x28e55f){const _0x5da023='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4d76df='',_0x44e05c='';for(let _0x20d3e9=0x0,_0xd41ec2,_0x49f044,_0x967218=0x0;_0x49f044=_0x28e55f['charAt'](_0x967218++);~_0x49f044&&(_0xd41ec2=_0x20d3e9%0x4?_0xd41ec2*0x40+_0x49f044:_0x49f044,_0x20d3e9++%0x4)?_0x4d76df+=String['fromCharCode'](0xff&_0xd41ec2>>(-0x2*_0x20d3e9&0x6)):0x0){_0x49f044=_0x5da023['indexOf'](_0x49f044);}for(let _0xd8b482=0x0,_0x265843=_0x4d76df['length'];_0xd8b482<_0x265843;_0xd8b482++){_0x44e05c+='%'+('00'+_0x4d76df['charCodeAt'](_0xd8b482)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x44e05c);};a0_0x4b14['TRwFaL']=_0x1e85c7,a0_0x4b14['jOBbfz']={},a0_0x4b14['ByyiAL']=!![];}const _0x1ed09b=_0x244d3c[0x0],_0x47166d=_0x509e08+_0x1ed09b,_0x527442=a0_0x4b14['jOBbfz'][_0x47166d];return!_0x527442?(_0x4b14db=a0_0x4b14['TRwFaL'](_0x4b14db),a0_0x4b14['jOBbfz'][_0x47166d]=_0x4b14db):_0x4b14db=_0x527442,_0x4b14db;}import{exec}from'child_process';import{promisify}from'util';import a0_0x4d76df from'path';import a0_0x44e05c from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';const execAsync=promisify(exec);class ConfigValidator{constructor(_0x20d3e9=null){this['logger']=_0x20d3e9,this['availableScanners']=null,this['scannerCache']=new Map();}async[a0_0x5acffd(0x1b8)](){const _0x73e9ca=a0_0x5acffd;if(this['availableScanners']!==null)return this[_0x73e9ca(0x169)];const _0xd41ec2={'checkov':![],'hadolint':![],'yamllint':![],'jsonSchema':![]};try{await execAsync('checkov\x20--version',{'timeout':0x1388}),_0xd41ec2[_0x73e9ca(0x1c6)]=!![],this['logger']?.[_0x73e9ca(0x17e)]('checkov\x20detected');}catch(_0x49f044){this['logger']?.[_0x73e9ca(0x17e)](_0x73e9ca(0x189),{'error':_0x49f044['message']});}try{await execAsync('hadolint\x20--version',{'timeout':0x1388}),_0xd41ec2[_0x73e9ca(0x166)]=!![],this[_0x73e9ca(0x1bd)]?.['debug'](_0x73e9ca(0x17a));}catch(_0x967218){this['logger']?.[_0x73e9ca(0x17e)](_0x73e9ca(0x193),{'error':_0x967218['message']});}try{await execAsync(_0x73e9ca(0x1a2),{'timeout':0x1388}),_0xd41ec2['yamllint']=!![],this['logger']?.['debug']('yamllint\x20detected');}catch(_0xd8b482){this['logger']?.[_0x73e9ca(0x17e)](_0x73e9ca(0x17c),{'error':_0xd8b482['message']});}try{await import(_0x73e9ca(0x14d)),_0xd41ec2[_0x73e9ca(0x192)]=!![],this[_0x73e9ca(0x1bd)]?.[_0x73e9ca(0x17e)](_0x73e9ca(0x181));}catch(_0x265843){this[_0x73e9ca(0x1bd)]?.['debug'](_0x73e9ca(0x14a),{'error':_0x265843[_0x73e9ca(0x164)]});}return this[_0x73e9ca(0x169)]=_0xd41ec2,_0xd41ec2;}async['validate'](_0x46de9e,_0x52af4f={}){const _0x34341f=a0_0x5acffd,_0xac2ecc=[],_0x2c3d8f=await this['detectAvailableValidators'](),_0x4ef984=this['detectFileType'](_0x46de9e);this[_0x34341f(0x1bd)]?.[_0x34341f(0x17e)]('Validating\x20config\x20file',{'filePath':_0x46de9e,'fileType':_0x4ef984});switch(_0x4ef984){case'dockerfile':if(_0x2c3d8f['hadolint']){const _0x3e45da=await this[_0x34341f(0x177)](_0x46de9e,_0x52af4f);_0xac2ecc[_0x34341f(0x19b)](..._0x3e45da);}if(_0x2c3d8f[_0x34341f(0x1c6)]){const _0x2de911=await this[_0x34341f(0x1aa)](_0x46de9e,_0x34341f(0x1b0),_0x52af4f);_0xac2ecc[_0x34341f(0x19b)](..._0x2de911);}break;case'docker-compose':if(_0x2c3d8f[_0x34341f(0x194)]){const _0x9f2f80=await this['validateYAML'](_0x46de9e,_0x52af4f);_0xac2ecc['push'](..._0x9f2f80);}if(_0x2c3d8f['checkov']){const _0x155104=await this[_0x34341f(0x1aa)](_0x46de9e,'docker_compose',_0x52af4f);_0xac2ecc[_0x34341f(0x19b)](..._0x155104);}break;case _0x34341f(0x1b4):if(_0x2c3d8f['yamllint']){const _0x17d6d2=await this['validateYAML'](_0x46de9e,_0x52af4f);_0xac2ecc[_0x34341f(0x19b)](..._0x17d6d2);}if(_0x2c3d8f['checkov']){const _0x5af2aa=await this['validateWithCheckov'](_0x46de9e,_0x34341f(0x1b4),_0x52af4f);_0xac2ecc[_0x34341f(0x19b)](..._0x5af2aa);}break;case _0x34341f(0x18e):if(_0x2c3d8f['checkov']){const _0x4fd0fd=await this['validateWithCheckov'](_0x46de9e,_0x34341f(0x18e),_0x52af4f);_0xac2ecc[_0x34341f(0x19b)](..._0x4fd0fd);}break;case _0x34341f(0x170):if(_0x2c3d8f[_0x34341f(0x192)]){const _0x3235bd=await this['validatePackageJson'](_0x46de9e,_0x52af4f);_0xac2ecc['push'](..._0x3235bd);}break;case _0x34341f(0x1b6):if(_0x2c3d8f[_0x34341f(0x192)]){const _0x5cd9b2=await this['validateTsConfig'](_0x46de9e,_0x52af4f);_0xac2ecc[_0x34341f(0x19b)](..._0x5cd9b2);}break;case'github-actions':if(_0x2c3d8f['yamllint']){const _0x1b719d=await this['validateYAML'](_0x46de9e,_0x52af4f);_0xac2ecc[_0x34341f(0x19b)](..._0x1b719d);}break;case'env':const _0x5e69ac=await this['validateEnvFile'](_0x46de9e,_0x52af4f);_0xac2ecc['push'](..._0x5e69ac);break;case _0x34341f(0x182):if(_0x2c3d8f['yamllint']){const _0x291aaa=await this['validateYAML'](_0x46de9e,_0x52af4f);_0xac2ecc['push'](..._0x291aaa);}break;default:this[_0x34341f(0x1bd)]?.[_0x34341f(0x188)](_0x34341f(0x154),{'filePath':_0x46de9e,'fileType':_0x4ef984});return[];}return this[_0x34341f(0x18f)](_0xac2ecc);}async[a0_0x5acffd(0x177)](_0x5abd43,_0x528fce={}){const _0x68a0c4=a0_0x5acffd;try{const _0x1910f1=await execAsync('hadolint\x20--format\x20json\x20\x22'+_0x5abd43+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0x4ad79a=JSON[_0x68a0c4(0x1c1)](_0x1910f1[_0x68a0c4(0x180)]);return this[_0x68a0c4(0x174)](_0x4ad79a,_0x5abd43);}catch(_0x5f600d){if(_0x5f600d['stdout'])try{const _0x2a8c64=JSON[_0x68a0c4(0x1c1)](_0x5f600d[_0x68a0c4(0x180)]);return this[_0x68a0c4(0x174)](_0x2a8c64,_0x5abd43);}catch(_0x5bb51d){this[_0x68a0c4(0x1bd)]?.['error'](_0x68a0c4(0x151),{'error':_0x5bb51d[_0x68a0c4(0x164)]});}return this['logger']?.['error'](_0x68a0c4(0x150),{'error':_0x5f600d['message']}),[];}}['parseHadolintResults'](_0xdee912,_0x23b90a){const _0x5dd052=a0_0x5acffd,_0x43f0cb=[];if(Array['isArray'](_0xdee912))for(const _0x155d23 of _0xdee912){_0x43f0cb[_0x5dd052(0x19b)]({'file':_0x23b90a,'line':_0x155d23[_0x5dd052(0x1a5)]||0x1,'column':_0x155d23[_0x5dd052(0x1cf)]||0x1,'severity':this[_0x5dd052(0x1ce)](_0x155d23['level']),'rule':_0x155d23[_0x5dd052(0x17d)],'message':_0x155d23[_0x5dd052(0x164)],'category':_0x5dd052(0x1b0),'validator':'hadolint'});}return _0x43f0cb;}async['validateYAML'](_0x1f5a53,_0x2de78a={}){const _0x4acff0=a0_0x5acffd;try{const _0x465eed=await execAsync(_0x4acff0(0x16f)+_0x1f5a53+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530});return this[_0x4acff0(0x157)](_0x465eed['stdout'],_0x1f5a53);}catch(_0x4bf86e){if(_0x4bf86e[_0x4acff0(0x180)])return this[_0x4acff0(0x157)](_0x4bf86e[_0x4acff0(0x180)],_0x1f5a53);return this['logger']?.['error'](_0x4acff0(0x1a4),{'error':_0x4bf86e['message']}),[];}}['parseYamllintResults'](_0x30588c,_0x363651){const _0xf8784d=a0_0x5acffd,_0x73d66b=[],_0x117529=_0x30588c['split']('\x0a')[_0xf8784d(0x19d)](_0x128959=>_0x128959[_0xf8784d(0x186)]());for(const _0x17110f of _0x117529){const _0x4c1de3=_0x17110f['match'](/^(.+?):(\d+):(\d+):\s*\[(\w+)\]\s*(.+?)\s*\((.+?)\)/);if(_0x4c1de3){const [,_0xadbde8,_0x4c8ee3,_0x24288a,_0x4b62a7,_0x527e88,_0x24861e]=_0x4c1de3;_0x73d66b['push']({'file':_0x363651,'line':parseInt(_0x4c8ee3,0xa),'column':parseInt(_0x24288a,0xa),'severity':this['mapYamllintSeverity'](_0x4b62a7),'rule':_0x24861e,'message':_0x527e88,'category':'yaml','validator':'yamllint'});}}return _0x73d66b;}async[a0_0x5acffd(0x1aa)](_0x4df01f,_0x3a0213,_0x3e705a={}){const _0x125406=a0_0x5acffd;try{const _0x3b384d=await execAsync(_0x125406(0x1d3)+_0x4df01f+_0x125406(0x171)+_0x3a0213+_0x125406(0x15e),{'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0x1fc0fb=JSON[_0x125406(0x1c1)](_0x3b384d['stdout']);return this['parseCheckovResults'](_0x1fc0fb,_0x4df01f);}catch(_0x411245){if(_0x411245['stdout'])try{const _0x5179dd=JSON['parse'](_0x411245['stdout']);return this[_0x125406(0x158)](_0x5179dd,_0x4df01f);}catch(_0x4c9423){this[_0x125406(0x1bd)]?.['error'](_0x125406(0x17b),{'error':_0x4c9423['message']});}return this['logger']?.[_0x125406(0x152)](_0x125406(0x16b),{'error':_0x411245[_0x125406(0x164)]}),[];}}['parseCheckovResults'](_0xe28805,_0x3c8680){const _0x17670f=a0_0x5acffd,_0x1cae0b=[];if(_0xe28805[_0x17670f(0x179)]&&_0xe28805[_0x17670f(0x179)]['failed_checks'])for(const _0x2eebec of _0xe28805['results'][_0x17670f(0x19e)]){_0x1cae0b['push']({'file':_0x3c8680,'line':_0x2eebec['file_line_range']?_0x2eebec[_0x17670f(0x1b2)][0x0]:0x1,'column':0x1,'severity':this[_0x17670f(0x14b)](_0x2eebec['check_class']),'rule':_0x2eebec['check_id'],'message':_0x2eebec['check_name']||_0x2eebec[_0x17670f(0x197)],'category':_0x17670f(0x1a9),'validator':_0x17670f(0x1c6),'remediation':_0x2eebec['guideline'],'cwe':_0x2eebec[_0x17670f(0x18c)],'references':_0x2eebec[_0x17670f(0x156)]?[_0x2eebec[_0x17670f(0x156)]]:[]});}return _0x1cae0b;}async['validatePackageJson'](_0x173156,_0x3d3dd1={}){const _0x1e405a=a0_0x5acffd;try{const _0x39443f=(await import('ajv'))['default'],_0xfa9b39=(await import('ajv-formats'))[_0x1e405a(0x1cb)],_0x323f8c=await a0_0x44e05c[_0x1e405a(0x1c5)](_0x173156,_0x1e405a(0x155)),_0x436349=JSON[_0x1e405a(0x1c1)](_0x323f8c),_0x5e1a5c=new _0x39443f({'allErrors':!![],'strict':![]});_0xfa9b39(_0x5e1a5c);const _0x28b742={'type':_0x1e405a(0x1b7),'required':['name','version'],'properties':{'name':{'type':'string','pattern':'^(?:@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$'},'version':{'type':'string'},'description':{'type':_0x1e405a(0x167)},'main':{'type':'string'},'type':{'type':'string','enum':[_0x1e405a(0x1be),'commonjs']},'scripts':{'type':_0x1e405a(0x1b7)},'dependencies':{'type':'object'},'devDependencies':{'type':_0x1e405a(0x1b7)}},'additionalProperties':!![]},_0x41c7f4=_0x5e1a5c[_0x1e405a(0x1ad)](_0x28b742),_0x237865=_0x41c7f4(_0x436349);if(!_0x237865&&_0x41c7f4[_0x1e405a(0x191)])return _0x41c7f4['errors'][_0x1e405a(0x18d)](_0x22edc3=>({'file':_0x173156,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x1e405a(0x15b)],'rule':_0x1e405a(0x172),'message':_0x22edc3[_0x1e405a(0x153)]?_0x22edc3['instancePath']+'\x20'+_0x22edc3['message']:'must\x20have\x20required\x20property\x20\x27'+_0x22edc3[_0x1e405a(0x163)][_0x1e405a(0x18a)]+'\x27','category':_0x1e405a(0x149),'validator':_0x1e405a(0x172)}));return[];}catch(_0x2d2469){return this['logger']?.['error']('package.json\x20validation\x20failed',{'error':_0x2d2469['message']}),[{'file':_0x173156,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['ERROR'],'rule':'json-parse','message':'Invalid\x20JSON:\x20'+_0x2d2469['message'],'category':'syntax','validator':'json-parse'}];}}async[a0_0x5acffd(0x199)](_0x522a27,_0x1d52b5={}){const _0x1d9cb5=a0_0x5acffd;try{const _0x590872=await a0_0x44e05c[_0x1d9cb5(0x1c5)](_0x522a27,_0x1d9cb5(0x155)),_0x493e04=JSON[_0x1d9cb5(0x1c1)](_0x590872),_0x25d639=[];if(_0x493e04[_0x1d9cb5(0x168)]){const _0x2385de=_0x493e04[_0x1d9cb5(0x168)];!_0x2385de[_0x1d9cb5(0x1a0)]&&_0x25d639['push']({'file':_0x522a27,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x1d9cb5(0x195)],'rule':'strict-mode','message':'Consider\x20enabling\x20\x22strict\x22\x20mode\x20for\x20better\x20type\x20safety','category':'best-practice','validator':'tsconfig-validator'}),_0x2385de[_0x1d9cb5(0x1c8)]===![]&&_0x25d639[_0x1d9cb5(0x19b)]({'file':_0x522a27,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x1d9cb5(0x195)],'rule':'no-implicit-any','message':'Disabling\x20noImplicitAny\x20reduces\x20type\x20safety','category':'best-practice','validator':'tsconfig-validator'});}return _0x25d639;}catch(_0x215dbe){return this[_0x1d9cb5(0x1bd)]?.[_0x1d9cb5(0x152)](_0x1d9cb5(0x187),{'error':_0x215dbe['message']}),[{'file':_0x522a27,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x1d9cb5(0x183)]['ERROR'],'rule':_0x1d9cb5(0x16a),'message':_0x1d9cb5(0x196)+_0x215dbe['message'],'category':_0x1d9cb5(0x1bb),'validator':'json-parse'}];}}async[a0_0x5acffd(0x15f)](_0x344d25,_0x389dba={}){const _0xf6047c=a0_0x5acffd;try{const _0x21a377=await a0_0x44e05c['readFile'](_0x344d25,'utf-8'),_0xede09b=[],_0x1c99da=_0x21a377['split']('\x0a'),_0x228a74=[{'pattern':/password|passwd|pwd/i,'name':_0xf6047c(0x1a6)},{'pattern':/api[_-]?key/i,'name':_0xf6047c(0x1c0)},{'pattern':/secret/i,'name':_0xf6047c(0x17f)},{'pattern':/token/i,'name':_0xf6047c(0x1c7)},{'pattern':/private[_-]?key/i,'name':'private\x20key'},{'pattern':/aws[_-]?access/i,'name':_0xf6047c(0x16e)}];return _0x1c99da[_0xf6047c(0x14f)]((_0x401f12,_0x1539fa)=>{const _0x7527a3=_0xf6047c,_0x5dc458=_0x401f12[_0x7527a3(0x186)]();if(!_0x5dc458||_0x5dc458[_0x7527a3(0x16c)]('#'))return;if(_0x5dc458['includes']('=')){const [_0x193a64,_0x44f345]=_0x5dc458[_0x7527a3(0x1c3)]('='),_0x4cf3f9=_0x193a64['toLowerCase'](),_0x89d92a=_0x44f345?.['trim']()||'',_0x2ed33b=_0x89d92a&&_0x89d92a!==''&&!_0x89d92a[_0x7527a3(0x16c)]('$')&&_0x89d92a!=='your-key-here'&&_0x89d92a!=='changeme'&&_0x89d92a[_0x7527a3(0x198)]>0x5;if(_0x2ed33b)for(const {pattern:_0x3ef42b,name:_0x2b2d46}of _0x228a74){if(_0x3ef42b[_0x7527a3(0x19a)](_0x4cf3f9)){_0xede09b[_0x7527a3(0x19b)]({'file':_0x344d25,'line':_0x1539fa+0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['CRITICAL'],'rule':_0x7527a3(0x1d0),'message':_0x7527a3(0x1ca)+_0x2b2d46+'\x20detected\x20in\x20.env\x20file','category':_0x7527a3(0x1a9),'validator':_0x7527a3(0x1a7),'remediation':_0x7527a3(0x1af)});break;}}}}),_0xede09b;}catch(_0x3f0fa8){return this['logger']?.[_0xf6047c(0x152)]('.env\x20validation\x20failed',{'error':_0x3f0fa8['message']}),[];}}['detectFileType'](_0x111505){const _0x2c1a8d=a0_0x5acffd,_0x9be3bd=a0_0x4d76df[_0x2c1a8d(0x161)](_0x111505)['toLowerCase'](),_0x1c885b=a0_0x4d76df[_0x2c1a8d(0x1d2)](_0x111505);if(_0x9be3bd===_0x2c1a8d(0x1b0))return _0x2c1a8d(0x1b0);if(_0x9be3bd===_0x2c1a8d(0x1b1)||_0x9be3bd===_0x2c1a8d(0x15a))return'docker-compose';if(_0x9be3bd===_0x2c1a8d(0x170))return _0x2c1a8d(0x170);if(_0x9be3bd==='tsconfig.json')return'tsconfig.json';if(_0x9be3bd===_0x2c1a8d(0x19c)||_0x9be3bd['endsWith']('.env'))return'env';if(_0x1c885b['includes'](_0x2c1a8d(0x190)))return'github-actions';if(_0x1c885b[_0x2c1a8d(0x1ab)](_0x2c1a8d(0x1b4))||_0x1c885b[_0x2c1a8d(0x1ab)](_0x2c1a8d(0x18b)))return _0x2c1a8d(0x1b4);const _0x126345=a0_0x4d76df[_0x2c1a8d(0x159)](_0x111505)[_0x2c1a8d(0x1c9)]();if(_0x126345==='.tf'||_0x126345===_0x2c1a8d(0x1d1))return _0x2c1a8d(0x18e);if(_0x126345===_0x2c1a8d(0x1a8)||_0x126345===_0x2c1a8d(0x184))return'yaml';if(_0x126345===_0x2c1a8d(0x185))return'json';return'unknown';}['normalizeResults'](_0x3c3a3f){const _0x438fc7=a0_0x5acffd;return _0x3c3a3f['map'](_0x20cbb5=>({'file':_0x20cbb5[_0x438fc7(0x1ac)],'line':_0x20cbb5['line']||0x1,'column':_0x20cbb5[_0x438fc7(0x1cf)]||0x1,'severity':_0x20cbb5['severity']||STATIC_ANALYSIS[_0x438fc7(0x183)]['WARNING'],'rule':_0x20cbb5[_0x438fc7(0x1cc)]||'unknown','message':_0x20cbb5['message']||_0x438fc7(0x1ae),'category':_0x20cbb5['category']||_0x438fc7(0x149),'validator':_0x20cbb5['validator'],'cwe':_0x20cbb5['cwe']||null,'remediation':_0x20cbb5['remediation']||null,'references':_0x20cbb5[_0x438fc7(0x1bf)]||[]}));}[a0_0x5acffd(0x1ce)](_0x578a7e){const _0x28385e=a0_0x5acffd,_0x484f75={'error':STATIC_ANALYSIS[_0x28385e(0x183)][_0x28385e(0x15b)],'warning':STATIC_ANALYSIS[_0x28385e(0x183)]['WARNING'],'info':STATIC_ANALYSIS[_0x28385e(0x183)]['INFO'],'style':STATIC_ANALYSIS['SEVERITY'][_0x28385e(0x165)]};return _0x484f75[_0x578a7e?.[_0x28385e(0x1c9)]()]||STATIC_ANALYSIS['SEVERITY']['WARNING'];}[a0_0x5acffd(0x1a3)](_0x28a988){const _0x36cdd8=a0_0x5acffd,_0x4376cd={'error':STATIC_ANALYSIS[_0x36cdd8(0x183)][_0x36cdd8(0x15b)],'warning':STATIC_ANALYSIS[_0x36cdd8(0x183)][_0x36cdd8(0x195)]};return _0x4376cd[_0x28a988?.['toLowerCase']()]||STATIC_ANALYSIS['SEVERITY'][_0x36cdd8(0x195)];}['mapCheckovSeverity'](_0x145e81){const _0x3800b6=a0_0x5acffd;return STATIC_ANALYSIS['SEVERITY'][_0x3800b6(0x15b)];}async['getValidatorStatus'](){const _0x429e11=a0_0x5acffd,_0x184942=await this['detectAvailableValidators']();return{'validators':_0x184942,'recommendations':this[_0x429e11(0x1ba)](_0x184942)};}[a0_0x5acffd(0x1ba)](_0x546d0d){const _0x319e2d=a0_0x5acffd,_0x3e44f0=[];return!_0x546d0d['checkov']&&_0x3e44f0['push']({'validator':_0x319e2d(0x1c6),'reason':_0x319e2d(0x1cd),'install':'pip\x20install\x20checkov','priority':'high'}),!_0x546d0d[_0x319e2d(0x166)]&&_0x3e44f0[_0x319e2d(0x19b)]({'validator':'hadolint','reason':'Dockerfile\x20linting\x20and\x20best\x20practices','install':'Download from https://github.com/hadolint/hadolint/releases','priority':'high'}),!_0x546d0d[_0x319e2d(0x194)]&&_0x3e44f0[_0x319e2d(0x19b)]({'validator':'yamllint','reason':_0x319e2d(0x14e),'install':_0x319e2d(0x1a1),'priority':_0x319e2d(0x1b3)}),!_0x546d0d['jsonSchema']&&_0x3e44f0[_0x319e2d(0x19b)]({'validator':_0x319e2d(0x1b9),'reason':_0x319e2d(0x15c),'install':_0x319e2d(0x160),'priority':_0x319e2d(0x1b3)}),_0x3e44f0;}}export default ConfigValidator;
@@ -1 +1 @@
1
- const a0_0x4b4ff0=a0_0x5e7b;function a0_0x5e7b(_0x3ab333,_0x529e0b){_0x3ab333=_0x3ab333-0xc2;const _0x1566ec=a0_0x1566();let _0x5e7b90=_0x1566ec[_0x3ab333];if(a0_0x5e7b['QgYWLr']===undefined){var _0xf1530e=function(_0x4cf2b8){const _0x1adec5='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x31a891='',_0x582d49='';for(let _0x2f4dde=0x0,_0x532608,_0x218d1a,_0x3029e4=0x0;_0x218d1a=_0x4cf2b8['charAt'](_0x3029e4++);~_0x218d1a&&(_0x532608=_0x2f4dde%0x4?_0x532608*0x40+_0x218d1a:_0x218d1a,_0x2f4dde++%0x4)?_0x31a891+=String['fromCharCode'](0xff&_0x532608>>(-0x2*_0x2f4dde&0x6)):0x0){_0x218d1a=_0x1adec5['indexOf'](_0x218d1a);}for(let _0x1df401=0x0,_0x291165=_0x31a891['length'];_0x1df401<_0x291165;_0x1df401++){_0x582d49+='%'+('00'+_0x31a891['charCodeAt'](_0x1df401)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x582d49);};a0_0x5e7b['RKDtnK']=_0xf1530e,a0_0x5e7b['WmWmbe']={},a0_0x5e7b['QgYWLr']=!![];}const _0x280f23=_0x1566ec[0x0],_0xa6552f=_0x3ab333+_0x280f23,_0x328f53=a0_0x5e7b['WmWmbe'][_0xa6552f];return!_0x328f53?(_0x5e7b90=a0_0x5e7b['RKDtnK'](_0x5e7b90),a0_0x5e7b['WmWmbe'][_0xa6552f]=_0x5e7b90):_0x5e7b90=_0x328f53,_0x5e7b90;}(function(_0x3c5b9a,_0x40de4e){const _0x57872e=a0_0x5e7b,_0x201809=_0x3c5b9a();while(!![]){try{const _0xc53f57=-parseInt(_0x57872e(0xde))/0x1+parseInt(_0x57872e(0xd6))/0x2+-parseInt(_0x57872e(0xd0))/0x3+-parseInt(_0x57872e(0xf9))/0x4*(-parseInt(_0x57872e(0xc6))/0x5)+-parseInt(_0x57872e(0xeb))/0x6*(-parseInt(_0x57872e(0xc4))/0x7)+parseInt(_0x57872e(0x105))/0x8+-parseInt(_0x57872e(0xfa))/0x9;if(_0xc53f57===_0x40de4e)break;else _0x201809['push'](_0x201809['shift']());}catch(_0x3c6aab){_0x201809['push'](_0x201809['shift']());}}}(a0_0x1566,0xe9c86));function a0_0x1566(){const _0x393d39=['CgvYzM9YBwfUy2u','CgfYC2vYt3b0Aw9UCW','mteYmJCWmdHNs0POyLq','zML4ywjSzuvYCM9Yq291BNq','C2v2zxjPDhK','lMvZBgLUDhjJlMPZB24','z2v0rvnmAw50sw5ZDgfUy2u','AM9PBG','mtrrwvf4A1G','BM8TAw1WBgLLzc1LDMfS','mte4nte0nvDHufnKBG','Bg9Nz2vY','BwvZC2fNzq','zMLSDgvY','ChjLzMvYlxbYB21PC2uTCMvQzwn0lwvYCM9YCW','CMvHy3q','zxnSAw50q2fJAgu','u0vwrvjjvfK','C2v0DgLUz3m','q0furuDpuLK','nti3otK0mfz5u1nkAa','ChvZAa','qKvtvf9quKfdveLdrq','Bgf0zxn0','rvnmAw50igfUywX5C2LZignVBxbSzxrLza','C2vJDxjPDhK','mJm4mZq4me9iuhPHzG','BM8TDw5YzwfJAgfIBgu','zxjYB3i','zM9YBwf0twvZC2fNzq','u1rzteu','zxnSAw50','Bw9KDwXL','BwvZC2fNzxm','mtqZmJK3nvfNyLrqAW','Bwf4','zxH0zw5KCW','D2fYBMLUz0nVDw50','Bw9KAwzPzwq','zw5KtgLUzq','ywX3yxLZ','y29SDw1U','zML4ywjSzvDHCM5PBMDdB3vUDa','BgLUzq','C3vWCg9YDhnbDxrVrML4','BgvUz3rO','zxnSAw50lMnVBMzPzY5QCW','mtG4otq2nKHtqxHusG','lMPZ','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','z2v0rvnmAw50q29UzMLN','zw5Kq29SDw1U','Aw5JBhvKzxm','BM8TDMfY','u0vdvvjjvfK','CNvSzuLK','BM8TDw5Kzwy','su1qt1ju','lM1QCW','D2fYBG','zxnSAw50oNjLy29TBwvUzgvK','mJHzv0jdyMi','nJyWmJuWohHqA25fBW','B3v0Chv0','lMvZBgLUDhjJlMPZ','zxjYB3jdB3vUDa','lMnQCW','zML4','BgLUDfrLEhq','EhnZ','rvnmAw50igzPEcbMywLSzwq'];a0_0x1566=function(){return _0x393d39;};return a0_0x1566();}import{ESLint}from'eslint';import a0_0x31a891 from'path';import a0_0x582d49 from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';class ESLintAnalyzer{constructor(_0x2f4dde=null){const _0x44a8d6=a0_0x5e7b;this[_0x44a8d6(0xc7)]=_0x2f4dde,this[_0x44a8d6(0xcc)]=new Map();}async['analyze'](_0x532608,_0x218d1a,_0x3029e4={}){const _0x29c847=a0_0x5e7b;try{const _0x1df401=await this[_0x29c847(0xc2)](_0x3029e4),_0x291165=await _0x1df401['lintText'](_0x218d1a,{'filePath':_0x532608,'warnIgnored':![]}),_0x412e10=[];if(_0x291165&&_0x291165[_0x29c847(0xe9)]>0x0){const _0x1b1b27=_0x291165[0x0];for(const _0x9a3bc5 of _0x1b1b27[_0x29c847(0xdd)]){_0x412e10[_0x29c847(0xd1)](this['formatMessage'](_0x9a3bc5,_0x532608));}}return this['logger']?.['debug'](_0x29c847(0xd4),{'file':_0x532608,'totalDiagnostics':_0x412e10['length'],'errors':_0x412e10['filter'](_0x5a471c=>_0x5a471c['severity']===STATIC_ANALYSIS[_0x29c847(0xcd)]['ERROR'])['length'],'warnings':_0x412e10[_0x29c847(0xc9)](_0x4f1cb5=>_0x4f1cb5['severity']===STATIC_ANALYSIS[_0x29c847(0xcd)]['WARNING'])['length']}),_0x412e10;}catch(_0x1e6295){return this[_0x29c847(0xc7)]?.[_0x29c847(0xd8)]('ESLint\x20analysis\x20failed',{'file':_0x532608,'error':_0x1e6295[_0x29c847(0xc8)]}),[];}}async['fix'](_0x54f03b,_0x4a7669,_0x4c8bdc={}){const _0x400ba6=a0_0x5e7b;try{const _0x5c8128=await this['getESLintInstance']({..._0x4c8bdc,'fix':!![]}),_0x5281f8=await _0x5c8128[_0x400ba6(0x100)](_0x4a7669,{'filePath':_0x54f03b,'warnIgnored':![]});if(_0x5281f8&&_0x5281f8[_0x400ba6(0xe9)]>0x0){const _0x2bb7c2=_0x5281f8[0x0];return{'fixed':_0x2bb7c2[_0x400ba6(0xfb)]!==undefined,'content':_0x2bb7c2['output']||_0x4a7669,'fixedCount':_0x2bb7c2[_0x400ba6(0x106)]+_0x2bb7c2['fixableWarningCount'],'remainingErrors':_0x2bb7c2[_0x400ba6(0xfd)]-_0x2bb7c2['fixableErrorCount'],'remainingWarnings':_0x2bb7c2[_0x400ba6(0xe1)]-_0x2bb7c2[_0x400ba6(0xe6)],'changes':_0x2bb7c2[_0x400ba6(0xfb)]?this['describeChanges'](_0x4a7669,_0x2bb7c2[_0x400ba6(0xfb)]):[]};}return{'fixed':![],'content':_0x4a7669,'fixedCount':0x0,'remainingErrors':0x0,'remainingWarnings':0x0,'changes':[]};}catch(_0x3d7e83){this[_0x400ba6(0xc7)]?.['error'](_0x400ba6(0x102),{'file':_0x54f03b,'error':_0x3d7e83['message']});throw new Error('ESLint\x20fix\x20failed:\x20'+_0x3d7e83['message']);}}async['getESLintInstance'](_0x3cb819={}){const _0x3ea605=a0_0x5e7b,{workingDir:_0x3b4eb2,fix:fix=![],framework:_0x14f5f5}=_0x3cb819,_0x1bc138=await this[_0x3ea605(0xee)](_0x3b4eb2,_0x14f5f5),_0x54b691=new ESLint({'fix':fix,'useEslintrc':!![],'overrideConfig':_0x1bc138,'errorOnUnmatchedPattern':![]});return _0x54b691;}async['getESLintConfig'](_0x26e3dc,_0x5ad9f6){const _0x3f3fd4=a0_0x5e7b,_0x58759f={'env':{'browser':!![],'es2021':!![],'node':!![]},'parserOptions':{'ecmaVersion':_0x3f3fd4(0xd3),'sourceType':_0x3f3fd4(0xdc)},'rules':{'no-unused-vars':_0x3f3fd4(0xf7),'no-undef':_0x3f3fd4(0xd8),'no-console':'off','semi':[_0x3f3fd4(0xf7),_0x3f3fd4(0xe4)],'quotes':[_0x3f3fd4(0xf7),'single',{'avoidEscape':!![]}]}};if(_0x5ad9f6===_0x3f3fd4(0xcb))_0x58759f[_0x3f3fd4(0xe0)]=['eslint:recommended'],_0x58759f[_0x3f3fd4(0x104)]['ecmaFeatures']={'jsx':!![]},_0x58759f[_0x3f3fd4(0xce)]={'react':{'version':'detect'}};else _0x5ad9f6==='vue'?_0x58759f[_0x3f3fd4(0xe0)]=['eslint:recommended']:_0x58759f['extends']=[_0x3f3fd4(0xf8)];if(_0x26e3dc){const _0x1c5c70=[_0x3f3fd4(0xfc),'.eslintrc.cjs',_0x3f3fd4(0x108),_0x3f3fd4(0xea)];for(const _0x6a6c2 of _0x1c5c70){try{const _0x52944b=a0_0x31a891[_0x3f3fd4(0xc3)](_0x26e3dc,_0x6a6c2);return await a0_0x582d49['access'](_0x52944b),this['logger']?.['debug']('Found\x20ESLint\x20config',{'configFile':_0x6a6c2}),{};}catch{}}}return _0x58759f;}[a0_0x4b4ff0(0xd9)](_0x1d996e,_0x2e5160){const _0x1ce041=a0_0x4b4ff0;return{'file':_0x2e5160,'line':_0x1d996e[_0x1ce041(0xe7)]||0x1,'column':_0x1d996e[_0x1ce041(0xe5)]||0x1,'endLine':_0x1d996e[_0x1ce041(0xe3)],'endColumn':_0x1d996e[_0x1ce041(0xef)],'severity':_0x1d996e[_0x1ce041(0x107)]===0x2?STATIC_ANALYSIS['SEVERITY']['ERROR']:STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':_0x1d996e['ruleId']||'eslint','message':_0x1d996e['message'],'category':this['categorizeRule'](_0x1d996e[_0x1ce041(0xf3)]),'fixable':_0x1d996e[_0x1ce041(0xff)]!==undefined,'source':_0x1ce041(0xdb)};}['categorizeRule'](_0x1b2b39){const _0x289d94=a0_0x4b4ff0;if(!_0x1b2b39)return STATIC_ANALYSIS['CATEGORY']['STYLE'];if(_0x1b2b39['includes'](_0x289d94(0xd5))||_0x1b2b39['includes'](_0x289d94(0x101))||_0x1b2b39==='no-eval'||_0x1b2b39===_0x289d94(0xc5))return STATIC_ANALYSIS[_0x289d94(0xcf)][_0x289d94(0xf2)];if(_0x1b2b39[_0x289d94(0xf0)](_0x289d94(0x103))||_0x1b2b39==='no-await-in-loop'||_0x1b2b39===_0x289d94(0xca))return STATIC_ANALYSIS[_0x289d94(0xcf)]['PERFORMANCE'];if(_0x1b2b39[_0x289d94(0xf0)]('import')||_0x1b2b39===_0x289d94(0xf4))return STATIC_ANALYSIS[_0x289d94(0xcf)][_0x289d94(0xf5)];if(_0x1b2b39['includes']('best-practices')||_0x1b2b39==='no-unused-vars'||_0x1b2b39===_0x289d94(0xd7)||_0x1b2b39===_0x289d94(0xf1))return STATIC_ANALYSIS[_0x289d94(0xcf)][_0x289d94(0xd2)];return STATIC_ANALYSIS['CATEGORY'][_0x289d94(0xda)];}['describeChanges'](_0x272164,_0xcfc401){const _0x2ce073=a0_0x4b4ff0,_0x5bdeca=[],_0x33b8be=_0x272164['split']('\x0a'),_0x963400=_0xcfc401['split']('\x0a'),_0x5af3e5=Math[_0x2ce073(0xdf)](_0x33b8be[_0x2ce073(0xe9)],_0x963400[_0x2ce073(0xe9)]);for(let _0x2630cc=0x0;_0x2630cc<_0x5af3e5;_0x2630cc++){const _0x43a335=_0x33b8be[_0x2630cc]||'',_0x46b9d9=_0x963400[_0x2630cc]||'';_0x43a335!==_0x46b9d9&&_0x5bdeca['push']({'line':_0x2630cc+0x1,'type':_0x43a335&&_0x46b9d9?_0x2ce073(0xe2):_0x43a335?'removed':'added','original':_0x43a335,'fixed':_0x46b9d9});}return _0x5bdeca;}[a0_0x4b4ff0(0xed)](){const _0xb456aa=a0_0x4b4ff0;return[_0xb456aa(0xec),'.jsx',_0xb456aa(0xf6),_0xb456aa(0xfe)];}[a0_0x4b4ff0(0xe8)](){return!![];}}export default ESLintAnalyzer;
1
+ function a0_0x85a1(){const _0x7a59d=['B3v0Chv0','z2v0rvnmAw50sw5ZDgfUy2u','lMPZEa','B2zM','zgv0zwn0','odCXmJniq2vUquW','Aw5JBhvKzxm','BM8TDw51C2vKlxzHCNm','lMnQCW','C2v0DgLUz3m','q0furuDpuLK','nKj5u0Hvvq','BgLUzq','lMPZ','mJHRzwL1DvK','mtbqzfrWvhq','C3bSAxq','zgvZy3jPyMvdAgfUz2vZ','uevsrK9stufoq0u','D2fYBG','zxjYB3i','BM8TAw1WBgLLzc1LDMfS','zxjYB3jdB3vUDa','zML4ywjSzvDHCM5PBMDdB3vUDa','AM9PBG','zw5Kq29SDw1U','mJyZmZiZmNvjwKDvvq','BgvUz3rO','zM9YBwf0twvZC2fNzq','ywX3yxLZ','lMvZBgLUDhjJlMPZ','mta4otK4mJnuveLMz2G','zxnSAw50oNjLy29TBwvUzgvK','nde1mdC2owT1zLHVyG','zxnSAw50lMnVBMzPzY5QCW','BM8TDMfY','ChvZAa','Bg9Nz2vY','mJe4mdy1q0TWzhnP','mZqXmZyZn1Ptq3Dxva','zML4','BM8TzxzHBa','rM91BMqGrvnmAw50ignVBMzPzW','lMvZBgLUDhjJlMnQCW','yMvZDc1WCMfJDgLJzxm','rvnmAw50igzPEcbMywLSzwq','yw5HBhL6zq','CMvHy3q','zxH0zw5KCW','u0vwrvjjvfK','ntzRENHuv2S','ndmWnty5wercy0Dw','lM1QCW','C2v2zxjPDhK','CNvSzuLK','rvnmAw50igfUywX5C2LZigzHAwXLza','rvjst1i','BwvZC2fNzq'];a0_0x85a1=function(){return _0x7a59d;};return a0_0x85a1();}function a0_0x35be(_0x3e88db,_0x5375dd){_0x3e88db=_0x3e88db-0xc1;const _0x85a1d3=a0_0x85a1();let _0x35bea2=_0x85a1d3[_0x3e88db];if(a0_0x35be['nLYwpu']===undefined){var _0x322681=function(_0x540d5f){const _0x83b75a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x52664c='',_0x2387aa='';for(let _0x41cd2c=0x0,_0x5b3b7a,_0x2e1dec,_0x2e466a=0x0;_0x2e1dec=_0x540d5f['charAt'](_0x2e466a++);~_0x2e1dec&&(_0x5b3b7a=_0x41cd2c%0x4?_0x5b3b7a*0x40+_0x2e1dec:_0x2e1dec,_0x41cd2c++%0x4)?_0x52664c+=String['fromCharCode'](0xff&_0x5b3b7a>>(-0x2*_0x41cd2c&0x6)):0x0){_0x2e1dec=_0x83b75a['indexOf'](_0x2e1dec);}for(let _0xb75b74=0x0,_0xb53ddb=_0x52664c['length'];_0xb75b74<_0xb53ddb;_0xb75b74++){_0x2387aa+='%'+('00'+_0x52664c['charCodeAt'](_0xb75b74)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2387aa);};a0_0x35be['voYgym']=_0x322681,a0_0x35be['joJUMS']={},a0_0x35be['nLYwpu']=!![];}const _0x387ddb=_0x85a1d3[0x0],_0x2905c5=_0x3e88db+_0x387ddb,_0x3a27bc=a0_0x35be['joJUMS'][_0x2905c5];return!_0x3a27bc?(_0x35bea2=a0_0x35be['voYgym'](_0x35bea2),a0_0x35be['joJUMS'][_0x2905c5]=_0x35bea2):_0x35bea2=_0x3a27bc,_0x35bea2;}const a0_0x5d4e8d=a0_0x35be;(function(_0x161784,_0x423ff4){const _0x1d6611=a0_0x35be,_0x3911e6=_0x161784();while(!![]){try{const _0x1b3b67=parseInt(_0x1d6611(0xe9))/0x1+-parseInt(_0x1d6611(0xc4))/0x2*(-parseInt(_0x1d6611(0xf5))/0x3)+-parseInt(_0x1d6611(0xe8))/0x4*(-parseInt(_0x1d6611(0xdc))/0x5)+-parseInt(_0x1d6611(0xc1))/0x6*(-parseInt(_0x1d6611(0xd7))/0x7)+-parseInt(_0x1d6611(0xd0))/0x8+-parseInt(_0x1d6611(0xdd))/0x9+-parseInt(_0x1d6611(0xc5))/0xa*(parseInt(_0x1d6611(0xd5))/0xb);if(_0x1b3b67===_0x423ff4)break;else _0x3911e6['push'](_0x3911e6['shift']());}catch(_0x2ac6a8){_0x3911e6['push'](_0x3911e6['shift']());}}}(a0_0x85a1,0x53568));import{ESLint}from'eslint';import a0_0x52664c from'path';import a0_0x2387aa from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';class ESLintAnalyzer{constructor(_0x41cd2c=null){const _0x4f4968=a0_0x35be;this[_0x4f4968(0xdb)]=_0x41cd2c,this['eslintCache']=new Map();}async[a0_0x5d4e8d(0xe4)](_0x5b3b7a,_0x2e1dec,_0x2e466a={}){const _0x4412d0=a0_0x5d4e8d;try{const _0xb75b74=await this[_0x4412d0(0xf1)](_0x2e466a),_0xb53ddb=await _0xb75b74['lintText'](_0x2e1dec,{'filePath':_0x5b3b7a,'warnIgnored':![]}),_0x526f87=[];if(_0xb53ddb&&_0xb53ddb['length']>0x0){const _0x2474cc=_0xb53ddb[0x0];for(const _0x19ae21 of _0x2474cc['messages']){_0x526f87[_0x4412d0(0xda)](this[_0x4412d0(0xd2)](_0x19ae21,_0x5b3b7a));}}return this['logger']?.['debug']('ESLint\x20analysis\x20completed',{'file':_0x5b3b7a,'totalDiagnostics':_0x526f87['length'],'errors':_0x526f87['filter'](_0x538b36=>_0x538b36[_0x4412d0(0xeb)]===STATIC_ANALYSIS['SEVERITY'][_0x4412d0(0xee)])[_0x4412d0(0xd1)],'warnings':_0x526f87['filter'](_0x4152ff=>_0x4152ff['severity']===STATIC_ANALYSIS[_0x4412d0(0xe7)]['WARNING'])[_0x4412d0(0xd1)]}),_0x526f87;}catch(_0x57e2ea){return this['logger']?.[_0x4412d0(0xca)](_0x4412d0(0xed),{'file':_0x5b3b7a,'error':_0x57e2ea[_0x4412d0(0xef)]}),[];}}async[a0_0x5d4e8d(0xde)](_0x2315d9,_0x2132b3,_0x5b9afa={}){const _0xb13352=a0_0x5d4e8d;try{const _0x201dae=await this[_0xb13352(0xf1)]({..._0x5b9afa,'fix':!![]}),_0x28a59e=await _0x201dae['lintText'](_0x2132b3,{'filePath':_0x2315d9,'warnIgnored':![]});if(_0x28a59e&&_0x28a59e[_0xb13352(0xd1)]>0x0){const _0x4abe5e=_0x28a59e[0x0];return{'fixed':_0x4abe5e[_0xb13352(0xf0)]!==undefined,'content':_0x4abe5e[_0xb13352(0xf0)]||_0x2132b3,'fixedCount':_0x4abe5e['fixableErrorCount']+_0x4abe5e[_0xb13352(0xcd)],'remainingErrors':_0x4abe5e[_0xb13352(0xcc)]-_0x4abe5e['fixableErrorCount'],'remainingWarnings':_0x4abe5e['warningCount']-_0x4abe5e['fixableWarningCount'],'changes':_0x4abe5e['output']?this['describeChanges'](_0x2132b3,_0x4abe5e[_0xb13352(0xf0)]):[]};}return{'fixed':![],'content':_0x2132b3,'fixedCount':0x0,'remainingErrors':0x0,'remainingWarnings':0x0,'changes':[]};}catch(_0x23e67b){this['logger']?.['error'](_0xb13352(0xe3),{'file':_0x2315d9,'error':_0x23e67b[_0xb13352(0xef)]});throw new Error('ESLint\x20fix\x20failed:\x20'+_0x23e67b['message']);}}async['getESLintInstance'](_0x197784={}){const {workingDir:_0x509fde,fix:fix=![],framework:_0x28201c}=_0x197784,_0x73d0b0=await this['getESLintConfig'](_0x509fde,_0x28201c),_0x516383=new ESLint({'fix':fix,'useEslintrc':!![],'overrideConfig':_0x73d0b0,'errorOnUnmatchedPattern':![]});return _0x516383;}async['getESLintConfig'](_0x4dfeb3,_0x204ae7){const _0x595099=a0_0x5d4e8d,_0x2b7a40={'env':{'browser':!![],'es2021':!![],'node':!![]},'parserOptions':{'ecmaVersion':'latest','sourceType':'module'},'rules':{'no-unused-vars':_0x595099(0xc9),'no-undef':'error','no-console':_0x595099(0xf3),'semi':[_0x595099(0xc9),_0x595099(0xd3)],'quotes':['warn','single',{'avoidEscape':!![]}]}};if(_0x204ae7===_0x595099(0xe5))_0x2b7a40[_0x595099(0xe6)]=['eslint:recommended'],_0x2b7a40['parserOptions']['ecmaFeatures']={'jsx':!![]},_0x2b7a40[_0x595099(0xf9)]={'react':{'version':_0x595099(0xf4)}};else _0x204ae7==='vue'?_0x2b7a40['extends']=[_0x595099(0xd6)]:_0x2b7a40[_0x595099(0xe6)]=['eslint:recommended'];if(_0x4dfeb3){const _0x58a8b4=[_0x595099(0xd4),_0x595099(0xe1),'.eslintrc.json',_0x595099(0xd8)];for(const _0x25bf53 of _0x58a8b4){try{const _0x19db74=a0_0x52664c[_0x595099(0xce)](_0x4dfeb3,_0x25bf53);return await a0_0x2387aa['access'](_0x19db74),this['logger']?.['debug'](_0x595099(0xe0),{'configFile':_0x25bf53}),{};}catch{}}}return _0x2b7a40;}[a0_0x5d4e8d(0xd2)](_0x523843,_0x1e1e74){const _0x2b6f57=a0_0x5d4e8d;return{'file':_0x1e1e74,'line':_0x523843[_0x2b6f57(0xc2)]||0x1,'column':_0x523843['column']||0x1,'endLine':_0x523843['endLine'],'endColumn':_0x523843[_0x2b6f57(0xcf)],'severity':_0x523843[_0x2b6f57(0xeb)]===0x2?STATIC_ANALYSIS[_0x2b6f57(0xe7)][_0x2b6f57(0xee)]:STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':_0x523843[_0x2b6f57(0xec)]||'eslint','message':_0x523843['message'],'category':this['categorizeRule'](_0x523843['ruleId']),'fixable':_0x523843[_0x2b6f57(0xde)]!==undefined,'source':'eslint'};}['categorizeRule'](_0x332f6d){const _0x5a0d20=a0_0x5d4e8d;if(!_0x332f6d)return STATIC_ANALYSIS[_0x5a0d20(0xfa)]['STYLE'];if(_0x332f6d['includes']('security')||_0x332f6d['includes']('xss')||_0x332f6d===_0x5a0d20(0xdf)||_0x332f6d===_0x5a0d20(0xcb))return STATIC_ANALYSIS[_0x5a0d20(0xfa)]['SECURITY'];if(_0x332f6d[_0x5a0d20(0xf6)]('performance')||_0x332f6d==='no-await-in-loop'||_0x332f6d==='prefer-promise-reject-errors')return STATIC_ANALYSIS[_0x5a0d20(0xfa)][_0x5a0d20(0xc8)];if(_0x332f6d[_0x5a0d20(0xf6)]('import')||_0x332f6d==='no-undef')return STATIC_ANALYSIS['CATEGORY']['IMPORT'];if(_0x332f6d[_0x5a0d20(0xf6)](_0x5a0d20(0xe2))||_0x332f6d===_0x5a0d20(0xf7)||_0x332f6d==='no-unreachable'||_0x332f6d===_0x5a0d20(0xd9))return STATIC_ANALYSIS['CATEGORY']['BEST_PRACTICE'];return STATIC_ANALYSIS[_0x5a0d20(0xfa)]['STYLE'];}[a0_0x5d4e8d(0xc7)](_0x5e2935,_0x43dbe6){const _0x41da92=a0_0x5d4e8d,_0x2ddf4d=[],_0x22fbd1=_0x5e2935['split']('\x0a'),_0x2d2e48=_0x43dbe6[_0x41da92(0xc6)]('\x0a'),_0xfb12db=Math['max'](_0x22fbd1[_0x41da92(0xd1)],_0x2d2e48['length']);for(let _0x482fe4=0x0;_0x482fe4<_0xfb12db;_0x482fe4++){const _0x3a56f4=_0x22fbd1[_0x482fe4]||'',_0x2bf32f=_0x2d2e48[_0x482fe4]||'';_0x3a56f4!==_0x2bf32f&&_0x2ddf4d['push']({'line':_0x482fe4+0x1,'type':_0x3a56f4&&_0x2bf32f?'modified':_0x3a56f4?'removed':'added','original':_0x3a56f4,'fixed':_0x2bf32f});}return _0x2ddf4d;}['getSupportedExtensions'](){const _0x19278b=a0_0x5d4e8d;return[_0x19278b(0xc3),_0x19278b(0xf2),_0x19278b(0xea),_0x19278b(0xf8)];}['supportsAutoFix'](){return!![];}}export default ESLintAnalyzer;