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

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 +1 -1
  2. package/bin/cli.js +1 -1
  3. package/bin/loxia-terminal-v2.js +1 -1
  4. package/bin/loxia-terminal.js +1 -1
  5. package/bin/start-with-terminal.js +1 -1
  6. package/package.json +1 -1
  7. package/scripts/install-scanners.js +1 -1
  8. package/src/analyzers/CSSAnalyzer.js +1 -1
  9. package/src/analyzers/ConfigValidator.js +1 -1
  10. package/src/analyzers/ESLintAnalyzer.js +1 -1
  11. package/src/analyzers/JavaScriptAnalyzer.js +1 -1
  12. package/src/analyzers/PrettierFormatter.js +1 -1
  13. package/src/analyzers/PythonAnalyzer.js +1 -1
  14. package/src/analyzers/SecurityAnalyzer.js +1 -1
  15. package/src/analyzers/TypeScriptAnalyzer.js +1 -1
  16. package/src/analyzers/codeCloneDetector/analyzer.js +1 -1
  17. package/src/analyzers/codeCloneDetector/detector.js +1 -1
  18. package/src/analyzers/codeCloneDetector/index.js +1 -1
  19. package/src/analyzers/codeCloneDetector/parser.js +1 -1
  20. package/src/analyzers/codeCloneDetector/reporter.js +1 -1
  21. package/src/analyzers/codeCloneDetector/scanner.js +1 -1
  22. package/src/core/agentPool.js +1 -1
  23. package/src/core/agentScheduler.js +1 -1
  24. package/src/core/contextManager.js +1 -1
  25. package/src/core/messageProcessor.js +1 -1
  26. package/src/core/orchestrator.js +1 -1
  27. package/src/core/stateManager.js +1 -1
  28. package/src/index.js +1 -1
  29. package/src/interfaces/cli.js +1 -1
  30. package/src/interfaces/terminal/__tests__/smoke/advancedFeatures.test.js +1 -1
  31. package/src/interfaces/terminal/__tests__/smoke/agentControl.test.js +1 -1
  32. package/src/interfaces/terminal/__tests__/smoke/agents.test.js +1 -1
  33. package/src/interfaces/terminal/__tests__/smoke/components.test.js +1 -1
  34. package/src/interfaces/terminal/__tests__/smoke/connection.test.js +1 -1
  35. package/src/interfaces/terminal/__tests__/smoke/enhancements.test.js +1 -1
  36. package/src/interfaces/terminal/__tests__/smoke/imports.test.js +1 -1
  37. package/src/interfaces/terminal/__tests__/smoke/messages.test.js +1 -1
  38. package/src/interfaces/terminal/__tests__/smoke/tools.test.js +1 -1
  39. package/src/interfaces/terminal/api/apiClient.js +1 -1
  40. package/src/interfaces/terminal/api/messageRouter.js +1 -1
  41. package/src/interfaces/terminal/api/session.js +1 -1
  42. package/src/interfaces/terminal/api/websocket.js +1 -1
  43. package/src/interfaces/terminal/components/AgentCreator.js +1 -1
  44. package/src/interfaces/terminal/components/AgentEditor.js +1 -1
  45. package/src/interfaces/terminal/components/AgentSwitcher.js +1 -1
  46. package/src/interfaces/terminal/components/ErrorBoundary.js +1 -1
  47. package/src/interfaces/terminal/components/ErrorPanel.js +1 -1
  48. package/src/interfaces/terminal/components/Header.js +1 -1
  49. package/src/interfaces/terminal/components/HelpPanel.js +1 -1
  50. package/src/interfaces/terminal/components/InputBox.js +1 -1
  51. package/src/interfaces/terminal/components/Layout.js +1 -1
  52. package/src/interfaces/terminal/components/LoadingSpinner.js +1 -1
  53. package/src/interfaces/terminal/components/MessageList.js +1 -1
  54. package/src/interfaces/terminal/components/MultilineTextInput.js +1 -1
  55. package/src/interfaces/terminal/components/SearchPanel.js +1 -1
  56. package/src/interfaces/terminal/components/SettingsPanel.js +1 -1
  57. package/src/interfaces/terminal/components/StatusBar.js +1 -1
  58. package/src/interfaces/terminal/components/TextInput.js +1 -1
  59. package/src/interfaces/terminal/config/agentEditorConstants.js +1 -1
  60. package/src/interfaces/terminal/config/constants.js +1 -1
  61. package/src/interfaces/terminal/index.js +1 -1
  62. package/src/interfaces/terminal/state/useAgentControl.js +1 -1
  63. package/src/interfaces/terminal/state/useAgents.js +1 -1
  64. package/src/interfaces/terminal/state/useConnection.js +1 -1
  65. package/src/interfaces/terminal/state/useMessages.js +1 -1
  66. package/src/interfaces/terminal/state/useTools.js +1 -1
  67. package/src/interfaces/terminal/utils/debugLogger.js +1 -1
  68. package/src/interfaces/terminal/utils/settingsStorage.js +1 -1
  69. package/src/interfaces/terminal/utils/theme.js +1 -1
  70. package/src/interfaces/webServer.js +1 -1
  71. package/src/modules/fileExplorer/controller.js +1 -1
  72. package/src/modules/fileExplorer/index.js +1 -1
  73. package/src/modules/fileExplorer/middleware.js +1 -1
  74. package/src/modules/fileExplorer/routes.js +1 -1
  75. package/src/services/aiService.js +1 -1
  76. package/src/services/apiKeyManager.js +1 -1
  77. package/src/services/benchmarkService.js +1 -1
  78. package/src/services/budgetService.js +1 -1
  79. package/src/services/contextInjectionService.js +1 -1
  80. package/src/services/conversationCompactionService.js +1 -1
  81. package/src/services/errorHandler.js +1 -1
  82. package/src/services/fileAttachmentService.js +1 -1
  83. package/src/services/modelRouterService.js +1 -1
  84. package/src/services/modelsService.js +1 -1
  85. package/src/services/qualityInspector.js +1 -1
  86. package/src/services/tokenCountingService.js +1 -1
  87. package/src/tools/agentCommunicationTool.js +1 -1
  88. package/src/tools/agentDelayTool.js +1 -1
  89. package/src/tools/asyncToolManager.js +1 -1
  90. package/src/tools/baseTool.js +1 -1
  91. package/src/tools/browserTool.js +1 -1
  92. package/src/tools/cloneDetectionTool.js +1 -1
  93. package/src/tools/dependencyResolverTool.js +1 -1
  94. package/src/tools/fileContentReplaceTool.js +1 -1
  95. package/src/tools/fileSystemTool.js +1 -1
  96. package/src/tools/fileTreeTool.js +1 -1
  97. package/src/tools/imageTool.js +1 -1
  98. package/src/tools/importAnalyzerTool.js +1 -1
  99. package/src/tools/jobDoneTool.js +1 -1
  100. package/src/tools/seekTool.js +1 -1
  101. package/src/tools/staticAnalysisTool.js +1 -1
  102. package/src/tools/taskManagerTool.js +1 -1
  103. package/src/tools/terminalTool.js +1 -1
  104. package/src/tools/webTool.js +1 -1
  105. package/src/types/agent.js +1 -1
  106. package/src/types/contextReference.js +1 -1
  107. package/src/types/conversation.js +1 -1
  108. package/src/types/toolCommand.js +1 -1
  109. package/src/utilities/attachmentValidator.js +1 -1
  110. package/src/utilities/configManager.js +1 -1
  111. package/src/utilities/constants.js +1 -1
  112. package/src/utilities/directoryAccessManager.js +1 -1
  113. package/src/utilities/fileProcessor.js +1 -1
  114. package/src/utilities/logger.js +1 -1
  115. package/src/utilities/tagParser.js +1 -1
  116. package/src/utilities/toolConstants.js +1 -1
  117. package/web-ui/build/index.html +2 -2
  118. package/web-ui/build/static/index-BVF_10a5.css +1 -0
  119. package/web-ui/build/static/{index-CX8ZfpGw.js → index-DE5VFS1q.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.7
103
103
  ```
104
104
 
105
105
  ### 4. Create an API Key
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_0x27a322=a0_0x52bb;(function(_0x528674,_0xdc3d6a){const _0x18d418=a0_0x52bb,_0x3538d4=_0x528674();while(!![]){try{const _0x1a3ed1=parseInt(_0x18d418(0xa8))/0x1+parseInt(_0x18d418(0x99))/0x2*(parseInt(_0x18d418(0x95))/0x3)+-parseInt(_0x18d418(0xb2))/0x4*(parseInt(_0x18d418(0x9d))/0x5)+-parseInt(_0x18d418(0x8e))/0x6*(-parseInt(_0x18d418(0xb1))/0x7)+parseInt(_0x18d418(0x93))/0x8+parseInt(_0x18d418(0x88))/0x9+parseInt(_0x18d418(0x8f))/0xa*(-parseInt(_0x18d418(0x83))/0xb);if(_0x1a3ed1===_0xdc3d6a)break;else _0x3538d4['push'](_0x3538d4['shift']());}catch(_0x11ddb0){_0x3538d4['push'](_0x3538d4['shift']());}}}(a0_0x2461,0x2228e));import{fileURLToPath}from'url';import{dirname,join}from'path';import{spawn,exec}from'child_process';import{readFileSync}from'fs';import a0_0x4fa148 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x27a322(0x8b),SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process[a0_0x27a322(0x7c)][a0_0x27a322(0x9b)](0x2),command=args[0x0]&&!args[0x0]['startsWith']('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args[a0_0x27a322(0x80)]('--help')||args['includes']('-h'),'version':args[a0_0x27a322(0x80)](a0_0x27a322(0xad))||args['includes']('-v')};for(let i=0x0;i<args[a0_0x27a322(0x94)];i++){args[i]==='--port'&&args[i+0x1]&&(flags[a0_0x27a322(0x82)]=parseInt(args[i+0x1],0xa)),args[i]===a0_0x27a322(0xa9)&&args[i+0x1]&&(flags['host']=args[i+0x1]);}const port=flags[a0_0x27a322(0x82)]||DEFAULT_PORT,host=flags['host']||DEFAULT_HOST,serverUrl=a0_0x27a322(0x86)+host+':'+port;if(flags[a0_0x27a322(0x92)]){const pkgPath=join(__dirname,'..',a0_0x27a322(0x9a)),pkg=JSON['parse'](readFileSync(pkgPath,a0_0x27a322(0x74)));console['log']('Loxia\x20Autopilot\x20One\x20v'+pkg[a0_0x27a322(0x92)]),process['exit'](0x0);}if(flags['help']||!command){const pkgPath=join(__dirname,'..',a0_0x27a322(0x9a)),pkg=JSON[a0_0x27a322(0x8c)](readFileSync(pkgPath,a0_0x27a322(0x74)));console[a0_0x27a322(0x9e)]('\x0aLoxia\x20Autopilot\x20One\x20v'+pkg['version']+a0_0x27a322(0x77)+DEFAULT_PORT+a0_0x27a322(0x97)+DEFAULT_HOST+')\x0a\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x20message\x0a\x20\x20-v,\x20--version\x20\x20\x20\x20\x20Show\x20version\x20number\x0a\x0aExamples:\x0a\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20open\x20browser\x0a\x20\x20loxia\x20terminal\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Connect\x20Terminal\x20UI\x20to\x20running\x20server\x0a\x20\x20loxia\x20plus-terminal\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a\x20\x20loxia\x20web\x20--port\x203000\x20\x20\x20\x20#\x20Use\x20custom\x20port\x0a\x0aQuick\x20Start:\x0a\x20\x201.\x20Run\x20\x27loxia\x20web\x27\x20to\x20start\x20with\x20Web\x20UI\x0a\x20\x202.\x20Or\x20run\x20\x27loxia\x20plus-terminal\x27\x20for\x20Terminal\x20UI\x20experience\x0a\x0aDocumentation:\x0a\x20\x20https://autopilot.loxia.ai\x0a\x0a'),process[a0_0x27a322(0x76)](0x0);}function a0_0x52bb(_0x31d8a3,_0x8dedec){_0x31d8a3=_0x31d8a3-0x72;const _0x24611f=a0_0x2461();let _0x52bbbc=_0x24611f[_0x31d8a3];return _0x52bbbc;}async function checkServerRunning(_0x6f3913,_0x5db77d,_0x3f0e82=0x1){for(let _0x2d9fd1=0x0;_0x2d9fd1<_0x3f0e82;_0x2d9fd1++){const _0x2f8730=await new Promise(_0x414701=>{const _0x38eb46=a0_0x52bb,_0x18c442=a0_0x4fa148[_0x38eb46(0x96)](_0x38eb46(0x86)+_0x6f3913+':'+_0x5db77d+'/api/health',_0x3691fb=>{const _0x1e9db5=_0x38eb46;_0x414701(_0x3691fb[_0x1e9db5(0x8d)]===0xc8);});_0x18c442['on'](_0x38eb46(0x84),()=>_0x414701(![])),_0x18c442[_0x38eb46(0xb0)](0x7d0,()=>{_0x18c442['destroy'](),_0x414701(![]);});});if(_0x2f8730)return!![];_0x2d9fd1<_0x3f0e82-0x1&&await new Promise(_0x32ae36=>setTimeout(_0x32ae36,SERVER_CHECK_INTERVAL));}return![];}async function waitForServer(_0x57e229,_0x504302,_0x54100d=SERVER_STARTUP_TIMEOUT){const _0x5c26c7=Math['ceil'](_0x54100d/SERVER_CHECK_INTERVAL);return checkServerRunning(_0x57e229,_0x504302,_0x5c26c7);}function openBrowser(_0x272672){const _0x4ef4c9=a0_0x27a322,_0x2314b5=process[_0x4ef4c9(0xa7)];let _0x5b4c83;if(_0x2314b5==='darwin')_0x5b4c83=_0x4ef4c9(0xac)+_0x272672+'\x22';else _0x2314b5===_0x4ef4c9(0x7e)?_0x5b4c83=_0x4ef4c9(0x87)+_0x272672+'\x22':_0x5b4c83=_0x4ef4c9(0xaa)+_0x272672+'\x22';exec(_0x5b4c83,_0x1aeab7=>{const _0x28d25e=_0x4ef4c9;_0x1aeab7&&(console[_0x28d25e(0x9e)](_0x28d25e(0x78)),console[_0x28d25e(0x9e)]('Please\x20open\x20manually:\x20'+_0x272672));});}function startServer(_0x40aba6=![]){const _0x3b2517=a0_0x27a322,_0x28df71={...process[_0x3b2517(0xa0)],'LOXIA_PORT':port[_0x3b2517(0xa4)](),'PORT':port[_0x3b2517(0xa4)]()};flags['host']&&(_0x28df71[_0x3b2517(0xa2)]=flags[_0x3b2517(0x7a)]);const _0x1ea5fb=join(__dirname,'..','src','index.js'),_0x4e8b23=spawn(_0x3b2517(0x75),[_0x1ea5fb],{'cwd':join(__dirname,'..'),'env':_0x28df71,'stdio':_0x40aba6?[_0x3b2517(0x9f),'ignore','ignore']:_0x3b2517(0x85),'detached':_0x40aba6});return _0x40aba6&&_0x4e8b23[_0x3b2517(0x7b)](),_0x4e8b23;}function a0_0x2461(){const _0x320109=['env','Error:','LOXIA_HOST','\x0aPlease\x20start\x20the\x20server\x20first:','toString','\x0aOpening\x20Web\x20UI\x20at\x20','Starting\x20Terminal\x20UI...\x0a','platform','217166KyufiH','--host','xdg-open\x20\x22','\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI','open\x20\x22','--version','Server\x20is\x20running\x20at\x20','Waiting\x20for\x20server\x20to\x20start...','setTimeout','6181npqlLi','44VvBFLn','SIGTERM','Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.','utf8','node','exit','\x20-\x20AI\x20Agent\x20System\x0a\x0aUsage:\x0a\x20\x20loxia\x20<command>\x20[options]\x0a\x0aCommands:\x0a\x20\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20+\x20open\x20Web\x20UI\x20in\x20browser\x0a\x20\x20terminal\x20\x20\x20\x20\x20\x20\x20\x20Start\x20Terminal\x20UI\x20(server\x20must\x20be\x20running)\x0a\x20\x20plus-web\x20\x20\x20\x20\x20\x20\x20\x20Alias\x20for\x20\x27web\x27\x0a\x20\x20plus-terminal\x20\x20\x20Start\x20server\x20+\x20Terminal\x20UI\x20together\x0a\x0aOptions:\x0a\x20\x20--port\x20<number>\x20\x20\x20Specify\x20port\x20(default:\x20','Could\x20not\x20open\x20browser\x20automatically.','Starting\x20Loxia\x20server\x20in\x20background...','host','unref','argv','SIGINT','win32','Checking\x20if\x20server\x20is\x20running...','includes','Server\x20running\x20at\x20','port','2202959RGatvO','error','inherit','http://','start\x20\x22\x22\x20\x22','128673rlpRjd','web','\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.','localhost','parse','statusCode','822Kniulq','10lEnYPA','kill','catch','version','827808EvEcfK','length','687glahiM','get',')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20','loxia-terminal.js','520orvCVX','package.json','slice','Unknown\x20command:\x20','79665zGreXO','log','ignore'];a0_0x2461=function(){return _0x320109;};return a0_0x2461();}function startTerminalUI(){const _0x3c389a=a0_0x27a322,_0x3a9c40=join(__dirname,_0x3c389a(0x98)),_0x34cc17={...process[_0x3c389a(0xa0)],'LOXIA_PORT':port[_0x3c389a(0xa4)](),'LOXIA_HOST':host},_0x4404e7=spawn(_0x3c389a(0x75),[_0x3a9c40],{'cwd':join(__dirname,'..'),'env':_0x34cc17,'stdio':_0x3c389a(0x85)});return _0x4404e7;}const commands={'web':async()=>{const _0x1275e8=a0_0x27a322;console[_0x1275e8(0x9e)]('Starting\x20Loxia\x20server...\x0a');const _0xf8fa17=startServer(![]);console[_0x1275e8(0x9e)](_0x1275e8(0xaf));const _0x5e7e1d=await waitForServer(host,port);_0x5e7e1d?(console[_0x1275e8(0x9e)](_0x1275e8(0xa5)+serverUrl),openBrowser(serverUrl)):console[_0x1275e8(0x9e)]('\x0aServer\x20may\x20still\x20be\x20starting.\x20Open\x20'+serverUrl+'\x20manually.'),process['on']('SIGINT',()=>_0xf8fa17[_0x1275e8(0x90)](_0x1275e8(0x7d))),process['on']('SIGTERM',()=>_0xf8fa17['kill']('SIGTERM')),_0xf8fa17['on'](_0x1275e8(0x76),_0x55900f=>process[_0x1275e8(0x76)](_0x55900f||0x0));},'plus-web':async()=>{const _0x404964=a0_0x27a322;await commands[_0x404964(0x89)]();},'terminal':async()=>{const _0x509afc=a0_0x27a322;console[_0x509afc(0x9e)](_0x509afc(0x7f));const _0x3cdb18=await checkServerRunning(host,port);!_0x3cdb18&&(console[_0x509afc(0x84)]('\x0aServer\x20is\x20not\x20running\x20at\x20'+serverUrl),console[_0x509afc(0x84)](_0x509afc(0xa3)),console['error'](_0x509afc(0xab)),console[_0x509afc(0x84)]('\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a'),process['exit'](0x1));console[_0x509afc(0x9e)](_0x509afc(0xae)+serverUrl),console['log'](_0x509afc(0xa6));const _0xc19780=startTerminalUI();process['on'](_0x509afc(0x7d),()=>_0xc19780[_0x509afc(0x90)](_0x509afc(0x7d))),process['on'](_0x509afc(0x72),()=>_0xc19780['kill']('SIGTERM')),_0xc19780['on'](_0x509afc(0x76),_0x5a5be6=>process['exit'](_0x5a5be6||0x0));},'plus-terminal':async()=>{const _0x22c46e=a0_0x27a322;console[_0x22c46e(0x9e)](_0x22c46e(0x79));const _0x52f80f=startServer(!![]),_0x5e259d=await waitForServer(host,port);!_0x5e259d&&(console[_0x22c46e(0x84)](_0x22c46e(0x8a)),process['exit'](0x1));console[_0x22c46e(0x9e)](_0x22c46e(0x81)+serverUrl),console['log']('Starting\x20Terminal\x20UI...\x0a');const _0x451144=startTerminalUI();_0x451144['on'](_0x22c46e(0x76),_0x32972f=>{const _0x5344ac=_0x22c46e;console[_0x5344ac(0x9e)]('\x0aShutting\x20down\x20server...');try{process[_0x5344ac(0x90)](_0x52f80f['pid'],'SIGTERM');}catch(_0x3afe18){}process[_0x5344ac(0x76)](_0x32972f||0x0);}),process['on'](_0x22c46e(0x7d),()=>{const _0x41bffa=_0x22c46e;_0x451144['kill'](_0x41bffa(0x7d));}),process['on'](_0x22c46e(0x72),()=>{const _0x2aae1d=_0x22c46e;_0x451144[_0x2aae1d(0x90)](_0x2aae1d(0x72));});}};commands[command]?commands[command]()[a0_0x27a322(0x91)](_0x4ffc57=>{const _0x285d92=a0_0x27a322;console[_0x285d92(0x84)](_0x285d92(0xa1),_0x4ffc57['message']),process[_0x285d92(0x76)](0x1);}):(console['error'](a0_0x27a322(0x9c)+command),console[a0_0x27a322(0x84)](a0_0x27a322(0x73)),process[a0_0x27a322(0x76)](0x1));
@@ -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_0x333457=a0_0xf070;(function(_0x3efa29,_0x28f31e){const _0x51644d=a0_0xf070,_0x1a9327=_0x3efa29();while(!![]){try{const _0x15c1f3=-parseInt(_0x51644d(0xb2))/0x1+-parseInt(_0x51644d(0xac))/0x2+parseInt(_0x51644d(0xb8))/0x3+parseInt(_0x51644d(0xba))/0x4+parseInt(_0x51644d(0xd1))/0x5+-parseInt(_0x51644d(0xc6))/0x6*(parseInt(_0x51644d(0xbf))/0x7)+-parseInt(_0x51644d(0xcd))/0x8;if(_0x15c1f3===_0x28f31e)break;else _0x1a9327['push'](_0x1a9327['shift']());}catch(_0x5de381){_0x1a9327['push'](_0x1a9327['shift']());}}}(a0_0x36f9,0x31f79));import{spawn}from'child_process';import a0_0x53b19a from'net';import a0_0x1241b1 from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=a0_0x1241b1[a0_0x333457(0xd3)](__filename),projectRoot=a0_0x1241b1[a0_0x333457(0xd3)](__dirname),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x333457(0xc7),SERVER_STARTUP_TIMEOUT=0x2710;async function isServerRunning(_0x3bafb1,_0x33690a){return new Promise(_0x2abffb=>{const _0xe7b43b=a0_0xf070,_0x5b8fec=new a0_0x53b19a[(_0xe7b43b(0xd5))]();_0x5b8fec[_0xe7b43b(0xb3)](0x7d0),_0x5b8fec['on']('connect',()=>{_0x5b8fec['destroy'](),_0x2abffb(!![]);}),_0x5b8fec['on'](_0xe7b43b(0xd2),()=>{const _0x10a3f1=_0xe7b43b;_0x5b8fec[_0x10a3f1(0xbe)](),_0x2abffb(![]);}),_0x5b8fec['on'](_0xe7b43b(0xbd),()=>{const _0x2277cf=_0xe7b43b;_0x5b8fec[_0x2277cf(0xbe)](),_0x2abffb(![]);}),_0x5b8fec[_0xe7b43b(0xd4)](_0x33690a,_0x3bafb1);});}async function startServer(_0x4b981e,_0x3a03e9){const _0x3644ad=a0_0x333457;return console[_0x3644ad(0xbc)](_0x3644ad(0xb5)),new Promise((_0x2a676e,_0x2d9fa0)=>{const _0x2439ae=_0x3644ad,_0x266fa7=spawn(_0x2439ae(0xcf),[a0_0x1241b1[_0x2439ae(0xc2)](projectRoot,_0x2439ae(0xc4)),_0x2439ae(0xaa),'web','--host',_0x4b981e,_0x2439ae(0xd0),_0x3a03e9[_0x2439ae(0xbb)]()],{'detached':![],'stdio':[_0x2439ae(0xd9),_0x2439ae(0xcc),_0x2439ae(0xcc)]});_0x266fa7[_0x2439ae(0xc8)]['on'](_0x2439ae(0xc3),()=>{}),_0x266fa7[_0x2439ae(0xa8)]['on'](_0x2439ae(0xc3),()=>{}),_0x266fa7['on'](_0x2439ae(0xbd),_0x412511=>{console['error']('Failed\x20to\x20start\x20server:',_0x412511['message']),_0x2d9fa0(_0x412511);});const _0x4acce7=Date[_0x2439ae(0xae)](),_0x5b9174=setInterval(async()=>{const _0x3e824a=_0x2439ae,_0x5b314f=await isServerRunning(_0x4b981e,_0x3a03e9);if(_0x5b314f)clearInterval(_0x5b9174),console[_0x3e824a(0xbc)]('✓\x20Server\x20started\x20at\x20'+_0x4b981e+':'+_0x3a03e9),_0x2a676e();else Date[_0x3e824a(0xae)]()-_0x4acce7>SERVER_STARTUP_TIMEOUT&&(clearInterval(_0x5b9174),_0x266fa7[_0x3e824a(0xce)](),_0x2d9fa0(new Error(_0x3e824a(0xc1))));},0x1f4);});}function a0_0xf070(_0x1d0300,_0x24912d){_0x1d0300=_0x1d0300-0xa8;const _0x36f9ed=a0_0x36f9();let _0xf070aa=_0x36f9ed[_0x1d0300];return _0xf070aa;}async function main(){const _0x3f1b4f=a0_0x333457;try{console[_0x3f1b4f(0xbc)]('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'),console[_0x3f1b4f(0xbc)]('\x20\x20Loxia\x20Autopilot\x20One\x20-\x20Terminal\x20UI'),console['log'](_0x3f1b4f(0xc0)),console[_0x3f1b4f(0xbc)]('');const _0x20581e=process[_0x3f1b4f(0xcb)][_0x3f1b4f(0xc9)](0x2);let _0x5d5346=DEFAULT_HOST,_0x43541d=DEFAULT_PORT;for(let _0x594330=0x0;_0x594330<_0x20581e[_0x3f1b4f(0xa9)];_0x594330++){if(_0x20581e[_0x594330]===_0x3f1b4f(0xca)&&_0x20581e[_0x594330+0x1])_0x5d5346=_0x20581e[_0x594330+0x1],_0x594330++;else _0x20581e[_0x594330]===_0x3f1b4f(0xd0)&&_0x20581e[_0x594330+0x1]&&(_0x43541d=parseInt(_0x20581e[_0x594330+0x1],0xa),_0x594330++);}console['log'](_0x3f1b4f(0xb1)+_0x5d5346+':'+_0x43541d+_0x3f1b4f(0xc5));const _0x50aaf1=await isServerRunning(_0x5d5346,_0x43541d);!_0x50aaf1?(console['log'](_0x3f1b4f(0xd6)),await startServer(_0x5d5346,_0x43541d)):console['log']('✓\x20Server\x20is\x20already\x20running\x20at\x20'+_0x5d5346+':'+_0x43541d),console[_0x3f1b4f(0xbc)](''),console['log'](_0x3f1b4f(0xad)),console[_0x3f1b4f(0xbc)](''),await new Promise(_0x1049b2=>setTimeout(_0x1049b2,0x1f4)),process['env'][_0x3f1b4f(0xd7)]=_0x5d5346,process[_0x3f1b4f(0xb9)][_0x3f1b4f(0xb4)]=_0x43541d[_0x3f1b4f(0xbb)](),await import(_0x3f1b4f(0xab));}catch(_0x51ba7c){console[_0x3f1b4f(0xbd)](''),console[_0x3f1b4f(0xbd)]('❌\x20Failed\x20to\x20start\x20Terminal\x20UI:'),console[_0x3f1b4f(0xbd)]('\x20\x20',_0x51ba7c[_0x3f1b4f(0xd8)]),console[_0x3f1b4f(0xbd)](''),console[_0x3f1b4f(0xbd)](_0x3f1b4f(0xaf)),console['error']('\x20\x20\x201.\x20Make\x20sure\x20no\x20other\x20process\x20is\x20using\x20port\x208080'),console[_0x3f1b4f(0xbd)](_0x3f1b4f(0xb0)),console[_0x3f1b4f(0xbd)](_0x3f1b4f(0xb6)),console[_0x3f1b4f(0xbd)](''),process[_0x3f1b4f(0xb7)](0x1);}}main();function a0_0x36f9(){const _0x3c2d1e=['Socket','✗\x20Server\x20is\x20not\x20running','LOXIA_HOST','message','ignore','stderr','length','--ui','../src/interfaces/terminal/index.js','656880yAUvJx','🎨\x20Launching\x20Ink-based\x20Terminal\x20UI...','now','💡\x20Troubleshooting:','\x20\x20\x202.\x20Try\x20running\x20the\x20server\x20manually:\x20node\x20bin/cli.js','🔍\x20Checking\x20if\x20server\x20is\x20running\x20at\x20','22734IAVfBQ','setTimeout','LOXIA_PORT','🚀\x20Starting\x20Loxia\x20server...','\x20\x20\x203.\x20Check\x20logs\x20for\x20more\x20details','exit','282945LHhCUt','env','1356348xMDYvk','toString','log','error','destroy','7322tmhDjJ','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','Server\x20startup\x20timeout','join','data','bin/cli.js','...','1368noUOQE','localhost','stdout','slice','--host','argv','pipe','101816BwKpjE','kill','node','--port','1868260sdDgUb','timeout','dirname','connect'];a0_0x36f9=function(){return _0x3c2d1e;};return a0_0x36f9();}
@@ -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_0x46aa30=a0_0x4c74;(function(_0x4af109,_0xbb0d0d){const _0x955920=a0_0x4c74,_0xc3acf3=_0x4af109();while(!![]){try{const _0x218f70=parseInt(_0x955920(0x1cb))/0x1+parseInt(_0x955920(0x1a8))/0x2*(-parseInt(_0x955920(0x1c3))/0x3)+parseInt(_0x955920(0x1bf))/0x4+parseInt(_0x955920(0x1c9))/0x5*(parseInt(_0x955920(0x1cd))/0x6)+-parseInt(_0x955920(0x1b5))/0x7+parseInt(_0x955920(0x1c8))/0x8*(-parseInt(_0x955920(0x1a7))/0x9)+parseInt(_0x955920(0x1b6))/0xa*(parseInt(_0x955920(0x1ae))/0xb);if(_0x218f70===_0xbb0d0d)break;else _0xc3acf3['push'](_0xc3acf3['shift']());}catch(_0x5c09e4){_0xc3acf3['push'](_0xc3acf3['shift']());}}}(a0_0x4dde,0x4430b));function a0_0x4dde(){const _0x39908b=['Connecting\x20to:\x20','6012DUIIsa','748elSHNT','\x0aTerminal\x20UI\x20error:','Press\x20Ctrl+C\x20to\x20exit\x0a','\x20\x20npm\x20start','\x20\x20-\x20Background\x20processes\x20(e.g.,\x20&\x20at\x20the\x20end)','--host','902ZlpfHD','--help','stdin','localhost','length','exit','LOXIA_PORT','2911734ZXNvKe','90490TZtURh','env','\x20\x20-\x20Redirected\x20output\x20(e.g.,\x20>\x20file.txt,\x202>&1\x20|\x20...)','error','Starting\x20Loxia\x20Terminal\x20UI...','\x0aLoxia\x20Terminal\x20UI\x0a\x0aUsage:\x0a\x20\x20loxia-terminal\x20[options]\x0a\x0aOptions:\x0a\x20\x20--host,\x20-h\x20<host>\x20\x20\x20\x20Backend\x20host\x20(default:\x20localhost)\x0a\x20\x20--port,\x20-p\x20<port>\x20\x20\x20\x20Backend\x20port\x20(default:\x208080)\x0a\x20\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x20message\x0a\x0aEnvironment\x20Variables:\x0a\x20\x20LOXIA_HOST\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Backend\x20host\x0a\x20\x20LOXIA_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Backend\x20port\x0a\x0aExamples:\x0a\x20\x20loxia-terminal\x0a\x20\x20loxia-terminal\x20--host\x20192.168.1.100\x20--port\x203000\x0a\x20\x20LOXIA_HOST=api.example.com\x20LOXIA_PORT=443\x20loxia-terminal\x0a','log','LOXIA_HOST','waitUntilExit','1481612WnBYZx','argv','\x20\x20-\x20Piped\x20environments\x20(e.g.,\x20|\x20head,\x20|\x20grep)','The\x20terminal\x20UI\x20cannot\x20run\x20in:','2370RNZYPd','host','isTTY','Please\x20run\x20this\x20command\x20in\x20a\x20real\x20terminal\x20without\x20pipes\x20or\x20redirection:','\x20\x20-\x20Some\x20CI/CD\x20environments','6576hvNiYP','695795btHkFJ','ERROR:\x20Terminal\x20UI\x20requires\x20an\x20interactive\x20terminal\x20(TTY).','288245GaqbPD','port','6bILsEq','--port','\x20\x20npm\x20run\x20terminal-ui'];a0_0x4dde=function(){return _0x39908b;};return a0_0x4dde();}import{startTerminalUI}from'../src/interfaces/terminal/index.js';const args=process[a0_0x46aa30(0x1c0)]['slice'](0x2),options={'host':a0_0x46aa30(0x1b1),'port':0x1f90};function a0_0x4c74(_0x2fdb24,_0x3cec33){_0x2fdb24=_0x2fdb24-0x1a5;const _0x4dde0d=a0_0x4dde();let _0x4c7470=_0x4dde0d[_0x2fdb24];return _0x4c7470;}for(let i=0x0;i<args[a0_0x46aa30(0x1b2)];i++){const arg=args[i];if(arg===a0_0x46aa30(0x1ad)||arg==='-h')options['host']=args[++i];else{if(arg===a0_0x46aa30(0x1ce)||arg==='-p')options[a0_0x46aa30(0x1cc)]=parseInt(args[++i],0xa);else arg===a0_0x46aa30(0x1af)&&(console['log'](a0_0x46aa30(0x1bb)),process[a0_0x46aa30(0x1b3)](0x0));}}process[a0_0x46aa30(0x1b7)][a0_0x46aa30(0x1bd)]&&(options[a0_0x46aa30(0x1c4)]=process[a0_0x46aa30(0x1b7)][a0_0x46aa30(0x1bd)]);process[a0_0x46aa30(0x1b7)][a0_0x46aa30(0x1b4)]&&(options[a0_0x46aa30(0x1cc)]=parseInt(process['env']['LOXIA_PORT'],0xa));!process[a0_0x46aa30(0x1b0)][a0_0x46aa30(0x1c5)]&&(console['error'](a0_0x46aa30(0x1ca)),console['error'](''),console['error'](a0_0x46aa30(0x1c2)),console[a0_0x46aa30(0x1b9)](a0_0x46aa30(0x1c1)),console[a0_0x46aa30(0x1b9)](a0_0x46aa30(0x1b8)),console[a0_0x46aa30(0x1b9)](a0_0x46aa30(0x1ac)),console[a0_0x46aa30(0x1b9)](a0_0x46aa30(0x1c7)),console[a0_0x46aa30(0x1b9)](''),console[a0_0x46aa30(0x1b9)](a0_0x46aa30(0x1c6)),console['error'](a0_0x46aa30(0x1a5)),console['error'](''),console[a0_0x46aa30(0x1b9)]('Or\x20use\x20the\x20web\x20UI\x20instead:'),console[a0_0x46aa30(0x1b9)](a0_0x46aa30(0x1ab)),process[a0_0x46aa30(0x1b3)](0x1));console[a0_0x46aa30(0x1bc)](a0_0x46aa30(0x1ba)),console['log'](a0_0x46aa30(0x1a6)+options[a0_0x46aa30(0x1c4)]+':'+options[a0_0x46aa30(0x1cc)]),console[a0_0x46aa30(0x1bc)](a0_0x46aa30(0x1aa));const instance=startTerminalUI(options);instance[a0_0x46aa30(0x1be)]()['then'](()=>{const _0x677d46=a0_0x46aa30;console[_0x677d46(0x1bc)]('\x0aTerminal\x20UI\x20exited'),process[_0x677d46(0x1b3)](0x0);})['catch'](_0x4bec82=>{const _0x4d996f=a0_0x46aa30;console[_0x4d996f(0x1b9)](_0x4d996f(0x1a9),_0x4bec82),process[_0x4d996f(0x1b3)](0x1);});
@@ -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_0x471d8e=a0_0x2e89;(function(_0x5720d1,_0x2c544f){const _0x41d41b=a0_0x2e89,_0x2f3647=_0x5720d1();while(!![]){try{const _0x4dc530=-parseInt(_0x41d41b(0x131))/0x1*(parseInt(_0x41d41b(0x142))/0x2)+-parseInt(_0x41d41b(0x11f))/0x3*(parseInt(_0x41d41b(0x124))/0x4)+parseInt(_0x41d41b(0x145))/0x5*(-parseInt(_0x41d41b(0x12a))/0x6)+parseInt(_0x41d41b(0x14a))/0x7+parseInt(_0x41d41b(0x139))/0x8*(parseInt(_0x41d41b(0x123))/0x9)+parseInt(_0x41d41b(0x13f))/0xa*(-parseInt(_0x41d41b(0x120))/0xb)+parseInt(_0x41d41b(0x147))/0xc;if(_0x4dc530===_0x2c544f)break;else _0x2f3647['push'](_0x2f3647['shift']());}catch(_0x19bf7e){_0x2f3647['push'](_0x2f3647['shift']());}}}(a0_0x49fe,0x57118));import{spawn}from'child_process';import{fileURLToPath}from'url';import{dirname,join}from'path';import a0_0x549628 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),rootDir=join(__dirname,'..'),SERVER_PORT=process[a0_0x471d8e(0x11e)]['PORT']||0x1f90,STARTUP_WAIT=0x7d0;let serverProcess=null;async function checkServerReady(_0x17a8ff=0xa,_0x5a9c63=0x1f4){const _0x5410bf=a0_0x471d8e;for(let _0x556241=0x0;_0x556241<_0x17a8ff;_0x556241++){try{return await new Promise((_0x34c122,_0x333525)=>{const _0x9fdd1d=a0_0x2e89,_0x27ab58=a0_0x549628['get'](_0x9fdd1d(0x128)+SERVER_PORT+_0x9fdd1d(0x121),_0x16a614=>{const _0x4621c8=_0x9fdd1d;_0x16a614['statusCode']===0xc8?_0x34c122():_0x333525(new Error(_0x4621c8(0x11c)+_0x16a614[_0x4621c8(0x13d)]));});_0x27ab58['on']('error',_0x333525),_0x27ab58['setTimeout'](0x3e8,()=>{const _0x3695f9=_0x9fdd1d;_0x27ab58[_0x3695f9(0x14b)](),_0x333525(new Error(_0x3695f9(0x13e)));});}),console['log'](_0x5410bf(0x12f)),!![];}catch(_0x4bfa36){_0x556241<_0x17a8ff-0x1&&await new Promise(_0x3dd0ba=>setTimeout(_0x3dd0ba,_0x5a9c63));}}return console['log']('⚠️\x20\x20Server\x20may\x20not\x20be\x20fully\x20ready,\x20but\x20continuing\x20anyway...'),![];}function a0_0x49fe(){const _0x4fddc9=['6dyVPnV','133804ODpOOX','/health','includes','13554MZKWLk','974692TYJkGg','\x0a⚠️\x20\x20Received\x20SIGTERM,\x20shutting\x20down...','src','Failed\x20to\x20start\x20Terminal\x20UI:','http://localhost:','╔════════════════════════════════════════════════╗','264930iQCZtA','node','error','SIGTERM','╚════════════════════════════════════════════════╝','✅\x20Server\x20is\x20ready!','toString','6344dcbTJl','[SERVER]\x20','log','ExperimentalWarning','\x0a👋\x20Terminal\x20UI\x20closed.','║\x20\x20\x20Loxia\x20AI\x20Agents\x20-\x20Server\x20+\x20Terminal\x20UI\x20\x20\x20\x20\x20\x20║','ignore','data','1704NCHxXf','killed','stderr','trim','statusCode','Timeout','140twvnKh','Server\x20exited\x20with\x20code\x20','pipe','24QQsaxg','message','kill','80fugdQY','exit','14557596yNMRPj','[SERVER\x20ERROR]\x20','Failed\x20to\x20start\x20server:','1840797foOgBF','destroy','index.js','inherit','stdout','SIGINT','🚀\x20Starting\x20Loxia\x20server...','Server\x20returned\x20','bin','env'];a0_0x49fe=function(){return _0x4fddc9;};return a0_0x49fe();}async function startServer(){return new Promise(_0x4a2d0d=>{const _0x2afcbf=a0_0x2e89;console[_0x2afcbf(0x133)](_0x2afcbf(0x11b));const _0x515a27=join(rootDir,_0x2afcbf(0x126),_0x2afcbf(0x14c));serverProcess=spawn(_0x2afcbf(0x12b),[_0x515a27],{'cwd':rootDir,'env':{...process[_0x2afcbf(0x11e)]},'stdio':[_0x2afcbf(0x137),_0x2afcbf(0x141),_0x2afcbf(0x141)],'detached':![]}),serverProcess[_0x2afcbf(0x14e)]['on'](_0x2afcbf(0x138),_0x16e6b3=>{const _0x594567=_0x2afcbf,_0x215be0=_0x16e6b3[_0x594567(0x130)]()[_0x594567(0x13c)]();_0x215be0&&console['log'](_0x594567(0x132)+_0x215be0);}),serverProcess[_0x2afcbf(0x13b)]['on'](_0x2afcbf(0x138),_0x2392c6=>{const _0x321b80=_0x2afcbf,_0x4872b2=_0x2392c6[_0x321b80(0x130)]()[_0x321b80(0x13c)]();_0x4872b2&&!_0x4872b2[_0x321b80(0x122)](_0x321b80(0x134))&&console[_0x321b80(0x12c)](_0x321b80(0x148)+_0x4872b2);}),serverProcess['on']('error',_0x1369d7=>{const _0x461608=_0x2afcbf;console['error'](_0x461608(0x149),_0x1369d7[_0x461608(0x143)]),process[_0x461608(0x146)](0x1);}),serverProcess['on'](_0x2afcbf(0x146),(_0x3d2f2f,_0x49dfde)=>{const _0x4e730d=_0x2afcbf;_0x3d2f2f!==null&&_0x3d2f2f!==0x0&&(console[_0x4e730d(0x12c)](_0x4e730d(0x140)+_0x3d2f2f),process['exit'](_0x3d2f2f));}),setTimeout(_0x4a2d0d,STARTUP_WAIT);});}async function startTerminalUI(){const _0x538bed=a0_0x471d8e;console[_0x538bed(0x133)]('🖥️\x20\x20Starting\x20Terminal\x20UI...'),console[_0x538bed(0x133)]('');const _0x1ac397=join(rootDir,_0x538bed(0x11d),'loxia-terminal.js'),_0x4d59af=spawn(_0x538bed(0x12b),[_0x1ac397],{'cwd':rootDir,'env':{...process[_0x538bed(0x11e)]},'stdio':_0x538bed(0x14d)});return _0x4d59af['on'](_0x538bed(0x12c),_0x3f228d=>{const _0x4343c6=_0x538bed;console[_0x4343c6(0x12c)](_0x4343c6(0x127),_0x3f228d[_0x4343c6(0x143)]),cleanup(),process[_0x4343c6(0x146)](0x1);}),_0x4d59af['on'](_0x538bed(0x146),_0x11ab95=>{const _0x45dea0=_0x538bed;console['log'](_0x45dea0(0x135)),cleanup(),process[_0x45dea0(0x146)](_0x11ab95||0x0);}),_0x4d59af;}function a0_0x2e89(_0x5d720c,_0x217d8a){_0x5d720c=_0x5d720c-0x11a;const _0x49fe2e=a0_0x49fe();let _0x2e8964=_0x49fe2e[_0x5d720c];return _0x2e8964;}function cleanup(){const _0x4c9a2e=a0_0x471d8e;serverProcess&&!serverProcess[_0x4c9a2e(0x13a)]&&(console[_0x4c9a2e(0x133)]('🛑\x20Stopping\x20server...'),serverProcess[_0x4c9a2e(0x144)](_0x4c9a2e(0x12d)),setTimeout(()=>{const _0x2ef9b1=_0x4c9a2e;!serverProcess['killed']&&serverProcess[_0x2ef9b1(0x144)]('SIGKILL');},0x1388));}process['on'](a0_0x471d8e(0x11a),()=>{const _0x20f8e2=a0_0x471d8e;console[_0x20f8e2(0x133)]('\x0a⚠️\x20\x20Received\x20SIGINT,\x20shutting\x20down...'),cleanup(),process[_0x20f8e2(0x146)](0x0);}),process['on'](a0_0x471d8e(0x12d),()=>{const _0xfb03d6=a0_0x471d8e;console['log'](_0xfb03d6(0x125)),cleanup(),process['exit'](0x0);}),process['on']('exit',()=>{cleanup();});async function main(){const _0x545afe=a0_0x471d8e;console['log'](_0x545afe(0x129)),console[_0x545afe(0x133)](_0x545afe(0x136)),console[_0x545afe(0x133)](_0x545afe(0x12e)),console[_0x545afe(0x133)]('');try{await startServer(),await checkServerReady(),await startTerminalUI(),await new Promise(()=>{});}catch(_0x4636b8){console[_0x545afe(0x12c)]('Error\x20during\x20startup:',_0x4636b8[_0x545afe(0x143)]),cleanup(),process['exit'](0x1);}}main();
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.7",
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_0x379162=a0_0x1a8e;(function(_0x1e6128,_0x74437){const _0x37be9b=a0_0x1a8e,_0x268b14=_0x1e6128();while(!![]){try{const _0x1a4497=parseInt(_0x37be9b(0x1d0))/0x1*(-parseInt(_0x37be9b(0x1e1))/0x2)+parseInt(_0x37be9b(0x1ae))/0x3*(parseInt(_0x37be9b(0x1c3))/0x4)+parseInt(_0x37be9b(0x1cd))/0x5*(-parseInt(_0x37be9b(0x1c4))/0x6)+parseInt(_0x37be9b(0x1e2))/0x7*(-parseInt(_0x37be9b(0x1ac))/0x8)+-parseInt(_0x37be9b(0x1c5))/0x9*(-parseInt(_0x37be9b(0x1e3))/0xa)+-parseInt(_0x37be9b(0x1dd))/0xb*(-parseInt(_0x37be9b(0x19d))/0xc)+parseInt(_0x37be9b(0x19c))/0xd;if(_0x1a4497===_0x74437)break;else _0x268b14['push'](_0x268b14['shift']());}catch(_0x6f1da5){_0x268b14['push'](_0x268b14['shift']());}}}(a0_0x21fb,0x7784c));import{exec}from'child_process';import{promisify}from'util';import a0_0x577dee from'https';function a0_0x1a8e(_0x54d7fe,_0x10b55d){_0x54d7fe=_0x54d7fe-0x19b;const _0x21fb7a=a0_0x21fb();let _0x1a8ec8=_0x21fb7a[_0x54d7fe];return _0x1a8ec8;}import a0_0x120828 from'http';import a0_0x5d389a from'fs';import a0_0x404bbd from'path';import{fileURLToPath}from'url';import{createWriteStream}from'fs';import{pipeline}from'stream/promises';const execAsync=promisify(exec),__filename=fileURLToPath(import.meta.url),__dirname=a0_0x404bbd[a0_0x379162(0x1bf)](__filename),SCANNER_DIR=a0_0x404bbd[a0_0x379162(0x1de)](__dirname,'..',a0_0x379162(0x1db),a0_0x379162(0x1e7)),SEMGREP_VERSION=a0_0x379162(0x1ba);console[a0_0x379162(0x19f)](a0_0x379162(0x1c0)),console['log'](a0_0x379162(0x1e6)),console[a0_0x379162(0x19f)]('═══════════════════════════════════════════════════════════\x0a');async function installScanners(){const _0x5c7350=a0_0x379162;await a0_0x5d389a[_0x5c7350(0x1a0)][_0x5c7350(0x1b9)](SCANNER_DIR,{'recursive':!![]}),await checkESLintSecurity(),await installSemgrep(),await installPythonScanners(),console[_0x5c7350(0x19f)](_0x5c7350(0x1c7)),console['log'](_0x5c7350(0x1a9)),console[_0x5c7350(0x19f)]('═══════════════════════════════════════════════════════════\x0a');}async function checkESLintSecurity(){const _0x49b83b=a0_0x379162;console[_0x49b83b(0x19f)]('📦\x20Checking\x20ESLint\x20Security\x20Plugin...');try{await import(_0x49b83b(0x1cf)),console[_0x49b83b(0x19f)](_0x49b83b(0x1df));}catch(_0x3eddb6){console[_0x49b83b(0x19f)]('\x20\x20\x20⚠️\x20\x20eslint-plugin-security\x20not\x20found'),console[_0x49b83b(0x19f)]('\x20\x20\x20Run:\x20npm\x20install\x20--save-dev\x20eslint-plugin-security\x0a');}}async function installSemgrep(){const _0x4d1905=a0_0x379162;console[_0x4d1905(0x19f)](_0x4d1905(0x1d9));const _0x3527b1=process[_0x4d1905(0x1c6)],_0x2438be=process[_0x4d1905(0x1b7)];try{const _0x1c2b7f=await execAsync(_0x4d1905(0x1dc),{'timeout':0x1388});console['log']('\x20\x20\x20✅\x20Semgrep\x20already\x20installed:\x20'+_0x1c2b7f[_0x4d1905(0x1b3)][_0x4d1905(0x1bc)]()),console[_0x4d1905(0x19f)]('\x20\x20\x20Using\x20system-installed\x20Semgrep\x0a');return;}catch(_0x5df60e){console[_0x4d1905(0x19f)]('\x20\x20\x20Semgrep\x20not\x20found\x20in\x20PATH,\x20installing\x20standalone\x20binary...');}const _0x47d044=getSemgrepBinaryInfo(_0x3527b1,_0x2438be);if(!_0x47d044){console[_0x4d1905(0x19f)](_0x4d1905(0x1c1)+_0x3527b1+'-'+_0x2438be),console['log'](_0x4d1905(0x1b5));return;}try{const _0x5bdc85=a0_0x404bbd[_0x4d1905(0x1de)](SCANNER_DIR,'semgrep');console[_0x4d1905(0x19f)]('\x20\x20\x20Downloading\x20from\x20'+_0x47d044['url']+_0x4d1905(0x1a3)),await downloadFile(_0x47d044[_0x4d1905(0x1ad)],_0x5bdc85),await a0_0x5d389a[_0x4d1905(0x1a0)][_0x4d1905(0x1b6)](_0x5bdc85,0x1ed),console['log']('\x20\x20\x20✅\x20Semgrep\x20installed\x20successfully'),console[_0x4d1905(0x19f)](_0x4d1905(0x1e5)+_0x5bdc85+'\x0a'),console[_0x4d1905(0x19f)](_0x4d1905(0x1bd)),console[_0x4d1905(0x19f)](_0x4d1905(0x1ce));}catch(_0x222ecf){console[_0x4d1905(0x19f)](_0x4d1905(0x1aa)+_0x222ecf[_0x4d1905(0x19b)]),console[_0x4d1905(0x19f)](_0x4d1905(0x1af));}}function a0_0x21fb(){const _0x220d1a=['\x20-m\x20pip\x20install\x20--user\x20','mkdir','v1.55.0','finish','trim','\x20\x20\x20Note:\x20To\x20use\x20system-wide,\x20add\x20to\x20PATH\x20or\x20install\x20globally:','python\x20--version','dirname','═══════════════════════════════════════════════════════════','\x20\x20\x20⚠️\x20\x20No\x20Semgrep\x20binary\x20available\x20for\x20','startsWith','9596JmRgdj','1587594keLOzN','9nMamJe','platform','\x0a═══════════════════════════════════════════════════════════','\x0aYou\x20can\x20manually\x20install\x20scanners:','\x20\x20\x20✅\x20','location','❌\x20Installation\x20failed:','bandit','5xBIRZW','\x20\x20\x20pip\x20install\x20semgrep\x0a','eslint-plugin-security','13DDOXBS','\x20\x20npm\x20install\x20--save-dev\x20eslint-plugin-security','\x20already\x20installed','\x20-m\x20pip\x20show\x20','get','unlink','headers','catch','python','🔍\x20Installing\x20Semgrep...','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20','node_modules','semgrep\x20--version','109758YigIiu','join','\x20\x20\x20✅\x20eslint-plugin-security\x20is\x20installed\x0a','python3\x20--version','117982VsPuyA','6732873RdbUsP','4434260TNLBJn','error','\x20\x20\x20Location:\x20','\x20\x20Installing\x20Security\x20Scanners','.scanners','message','12781938ONtsfw','96YaoGpH','pipe','log','promises','\x20\x20\x20⚠️\x20\x20Python\x20not\x20found\x20-\x20skipping\x20Python\x20scanners','exit','...','then','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20','semgrep','yamllint','statusCode','\x20\x20Installation\x20Complete','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20Semgrep:\x20','\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit','8DszFpE','url','1221sVLhAG','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20semgrep\x0a','pip-audit','https','\x20installed\x20successfully','stdout','close','\x20\x20\x20Please\x20install\x20manually:\x20https://semgrep.dev/docs/getting-started/\x0a','chmod','arch'];a0_0x21fb=function(){return _0x220d1a;};return a0_0x21fb();}function getSemgrepBinaryInfo(_0x51e16f,_0x182884){return null;}async function installPythonScanners(){const _0x437b0d=a0_0x379162;console['log']('🐍\x20Checking\x20Python\x20scanners...');let _0x39f1df=null;try{await execAsync(_0x437b0d(0x1e0),{'timeout':0x1388}),_0x39f1df='python3';}catch(_0x447498){try{await execAsync(_0x437b0d(0x1be),{'timeout':0x1388}),_0x39f1df=_0x437b0d(0x1d8);}catch(_0x1907f5){console[_0x437b0d(0x19f)](_0x437b0d(0x1a1)),console['log']('\x20\x20\x20To\x20enable\x20Python\x20scanning,\x20install\x20Python\x20and\x20run:'),console[_0x437b0d(0x19f)]('\x20\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit\x20checkov\x20yamllint\x0a');return;}}console[_0x437b0d(0x19f)]('\x20\x20\x20✅\x20Python\x20found:\x20'+_0x39f1df),await installViaPip(_0x437b0d(0x1a6),_0x39f1df),await installViaPip(_0x437b0d(0x1cc),_0x39f1df),await installViaPip(_0x437b0d(0x1b0),_0x39f1df),await installViaPip('checkov',_0x39f1df),await installViaPip(_0x437b0d(0x1a7),_0x39f1df),console['log']('');}async function installViaPip(_0x246010,_0x3b409d){const _0xc5798=a0_0x379162;try{const _0x4fdc98=await execAsync(_0x3b409d+_0xc5798(0x1d3)+_0x246010,{'timeout':0x1388});return console[_0xc5798(0x19f)](_0xc5798(0x1c9)+_0x246010+_0xc5798(0x1d2)),!![];}catch(_0x3a285f){console['log']('\x20\x20\x20Installing\x20'+_0x246010+_0xc5798(0x1a3));try{return await execAsync(_0x3b409d+_0xc5798(0x1b8)+_0x246010,{'timeout':0xea60}),console[_0xc5798(0x19f)](_0xc5798(0x1c9)+_0x246010+_0xc5798(0x1b2)),!![];}catch(_0x563b75){return console[_0xc5798(0x19f)](_0xc5798(0x1da)+_0x246010+':\x20'+_0x563b75['message']),console['log'](_0xc5798(0x1a5)+_0x246010),![];}}}async function downloadFile(_0x3a50b4,_0x1dc8c7){return new Promise((_0xf1cdd7,_0x1a8cbb)=>{const _0x49c838=a0_0x1a8e,_0x4c2f8f=_0x3a50b4[_0x49c838(0x1c2)](_0x49c838(0x1b1))?a0_0x577dee:a0_0x120828;_0x4c2f8f[_0x49c838(0x1d4)](_0x3a50b4,_0x3ee9eb=>{const _0x4f729c=_0x49c838;if(_0x3ee9eb[_0x4f729c(0x1a8)]===0x12e||_0x3ee9eb['statusCode']===0x12d){downloadFile(_0x3ee9eb[_0x4f729c(0x1d6)][_0x4f729c(0x1ca)],_0x1dc8c7)[_0x4f729c(0x1a4)](_0xf1cdd7)[_0x4f729c(0x1d7)](_0x1a8cbb);return;}if(_0x3ee9eb[_0x4f729c(0x1a8)]!==0xc8){_0x1a8cbb(new Error('Failed\x20to\x20download:\x20HTTP\x20'+_0x3ee9eb[_0x4f729c(0x1a8)]));return;}const _0x3ba09e=createWriteStream(_0x1dc8c7);_0x3ee9eb[_0x4f729c(0x19e)](_0x3ba09e),_0x3ba09e['on'](_0x4f729c(0x1bb),()=>{const _0x187a1d=_0x4f729c;_0x3ba09e[_0x187a1d(0x1b4)](),_0xf1cdd7();}),_0x3ba09e['on']('error',_0x27eebd=>{const _0x39c596=_0x4f729c;a0_0x5d389a[_0x39c596(0x1d5)](_0x1dc8c7,()=>{}),_0x1a8cbb(_0x27eebd);});})['on'](_0x49c838(0x1e4),_0x1a8cbb);});}installScanners()['catch'](_0x31214a=>{const _0x10969d=a0_0x379162;console['error'](_0x10969d(0x1cb),_0x31214a['message']),console[_0x10969d(0x1e4)](_0x10969d(0x1c8)),console[_0x10969d(0x1e4)](_0x10969d(0x1d1)),console['error'](_0x10969d(0x1ab)),process[_0x10969d(0x1a2)](0x0);});
@@ -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_0x4bf2d9=a0_0x273b;(function(_0x2b39f0,_0x14f2e3){const _0x3526e2=a0_0x273b,_0x25d71c=_0x2b39f0();while(!![]){try{const _0x24ce5b=parseInt(_0x3526e2(0x8c))/0x1*(-parseInt(_0x3526e2(0xb2))/0x2)+-parseInt(_0x3526e2(0x9f))/0x3+parseInt(_0x3526e2(0xac))/0x4+-parseInt(_0x3526e2(0x94))/0x5*(-parseInt(_0x3526e2(0xab))/0x6)+parseInt(_0x3526e2(0x90))/0x7+-parseInt(_0x3526e2(0x93))/0x8*(parseInt(_0x3526e2(0x8e))/0x9)+parseInt(_0x3526e2(0x97))/0xa;if(_0x24ce5b===_0x14f2e3)break;else _0x25d71c['push'](_0x25d71c['shift']());}catch(_0x32cc69){_0x25d71c['push'](_0x25d71c['shift']());}}}(a0_0x4e8c,0x4994f));function a0_0x273b(_0x1d015a,_0x43f388){_0x1d015a=_0x1d015a-0x85;const _0x4e8c8b=a0_0x4e8c();let _0x273b78=_0x4e8c8b[_0x1d015a];if(a0_0x273b['JBSuSc']===undefined){var _0x33485d=function(_0x54cba9){const _0x291756='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x18bbad='',_0x2ed67f='';for(let _0x31ca95=0x0,_0x1c5f67,_0x32a404,_0x1a8d73=0x0;_0x32a404=_0x54cba9['charAt'](_0x1a8d73++);~_0x32a404&&(_0x1c5f67=_0x31ca95%0x4?_0x1c5f67*0x40+_0x32a404:_0x32a404,_0x31ca95++%0x4)?_0x18bbad+=String['fromCharCode'](0xff&_0x1c5f67>>(-0x2*_0x31ca95&0x6)):0x0){_0x32a404=_0x291756['indexOf'](_0x32a404);}for(let _0x25f164=0x0,_0x55f355=_0x18bbad['length'];_0x25f164<_0x55f355;_0x25f164++){_0x2ed67f+='%'+('00'+_0x18bbad['charCodeAt'](_0x25f164)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2ed67f);};a0_0x273b['RcPVfK']=_0x33485d,a0_0x273b['zoMwJr']={},a0_0x273b['JBSuSc']=!![];}const _0x21ee5f=_0x4e8c8b[0x0],_0x3bcb05=_0x1d015a+_0x21ee5f,_0x2ebf28=a0_0x273b['zoMwJr'][_0x3bcb05];return!_0x2ebf28?(_0x273b78=a0_0x273b['RcPVfK'](_0x273b78),a0_0x273b['zoMwJr'][_0x3bcb05]=_0x273b78):_0x273b78=_0x2ebf28,_0x273b78;}function a0_0x4e8c(){const _0x2af163=['C3r5BgvSAw50','DxnL','mZe0nde1zvHYEwPN','lNnHC3m','C2v2zxjPDhK','CgX1z2LU','u3r5BgvSAw50igfUywX5C2LZigzHAwXLza','zgvMyxvSDa','ChvZAa','Cg9ZDgnZCY1SzxnZ','rvjst1i','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','CMvZDwX0CW','BgvUz3rO','nK1oDMfACW','nJe4ndHUy1vOu1O','zM9YD2fYza','BMCTzgvLCa','v0fstKLorW','u1rzteu','lMnZCW','mKvQtM5prq','y29SDw1U','zgv0zwn0tgfUz3vHz2u','Cg9ZDgnZC1nJC3m','Cg9ZDgnZCW','BgvZCW','BM8TAw52ywXPza','zgvIDwC','Aw5JBhvKzxm','C2nZCW','y2HLy2TtEw50yxG','BwL4Aw4','y2f0zwDVCML6zvn0EwXLBgLUDfj1Bgu','zxH0zw5K','zM9Y','BMfTzq','q1ntigfUywX5C2LZigzHAwXLza','CMv0DxjU','zg91yMXL','Cg9ZDgnZC0XLC3m','zwfJAa','nta1ntu5rhreEKfm','q0furuDpuLK','oti5n2rwwwr3zq','u0vwrvjjvfK','mJyZntmYnuTZuMvnBG','lMXLC3m','CgvYzM9YBwfUy2u','nde4nfrPDhHMCG','mJyYndeXmfbps3DVyq','y29UDgvUDa','Bg9Nz2vY','ntm1mJu1mfPIrK5ira','BwvZC2fNzq','yw5HBhL6zq','zM9YBwf0ug9ZDentu0vYCM9Y','BgLUDfn0EwXLCW','zxjYB3i'];a0_0x4e8c=function(){return _0x2af163;};return a0_0x4e8c();}import{STATIC_ANALYSIS}from'../utilities/constants.js';class CSSAnalyzer{constructor(_0x18bbad=null){const _0x104048=a0_0x273b;this[_0x104048(0x96)]=_0x18bbad,this[_0x104048(0x9d)]=null,this[_0x104048(0xb6)]=null,this[_0x104048(0xb5)]=null,this[_0x104048(0x8a)]=null;}async[a0_0x4bf2d9(0x99)](_0x2ed67f,_0x31ca95,_0x1c5f67={}){const _0x15b04f=a0_0x4bf2d9;try{const _0x32a404=[],_0x1a8d73=this[_0x15b04f(0xb4)](_0x2ed67f),_0x25f164=await this[_0x15b04f(0xbc)](_0x2ed67f,_0x31ca95,_0x1a8d73);_0x32a404[_0x15b04f(0xa5)](..._0x25f164);if(_0x25f164['length']===0x0){const _0x55f355=await this['lintStyles'](_0x2ed67f,_0x31ca95,_0x1a8d73);_0x32a404[_0x15b04f(0xa5)](..._0x55f355);}return this[_0x15b04f(0x96)]?.[_0x15b04f(0xb9)]('CSS\x20analysis\x20completed',{'file':_0x2ed67f,'language':_0x1a8d73,'totalDiagnostics':_0x32a404['length'],'errors':_0x32a404['filter'](_0x20c641=>_0x20c641['severity']===STATIC_ANALYSIS['SEVERITY'][_0x15b04f(0xa7)])[_0x15b04f(0xaa)],'warnings':_0x32a404['filter'](_0x4f57f5=>_0x4f57f5[_0x15b04f(0xa1)]===STATIC_ANALYSIS[_0x15b04f(0x8f)][_0x15b04f(0xaf)])[_0x15b04f(0xaa)]}),_0x32a404;}catch(_0x24a9c9){return this[_0x15b04f(0x96)]?.[_0x15b04f(0x9c)](_0x15b04f(0x87),{'file':_0x2ed67f,'error':_0x24a9c9[_0x15b04f(0x98)]}),[];}}async['checkSyntax'](_0x1fc0ec,_0x490b14,_0x11587f){const _0x5e2f2b=a0_0x4bf2d9,_0x127530=[];try{if(!this['postcss']){const _0x349425=await import('postcss');this['postcss']=_0x349425['default'];}let _0x544930=null;if(_0x11587f==='scss'){if(!this[_0x5e2f2b(0xb5)]){const _0x41183c=await import('postcss-scss');this[_0x5e2f2b(0xb5)]=_0x41183c['default'];}_0x544930=this['postcssScss'];}else{if(_0x11587f===_0x5e2f2b(0xb7)){if(!this[_0x5e2f2b(0x8a)]){const _0x48ed91=await import(_0x5e2f2b(0xa6));this['postcssLess']=_0x48ed91['default'];}_0x544930=this['postcssLess'];}}const _0x676ef1=this[_0x5e2f2b(0xb6)]()['process'](_0x490b14,{'from':_0x1fc0ec,'syntax':_0x544930}),_0x562556=_0x676ef1['root'];this['logger']?.[_0x5e2f2b(0xb9)]('PostCSS\x20syntax\x20check\x20passed',{'file':_0x1fc0ec});}catch(_0xcfa171){const _0x3e0de0=this[_0x5e2f2b(0x9a)](_0xcfa171,_0x1fc0ec);_0x3e0de0&&_0x127530['push'](_0x3e0de0);}return _0x127530;}async[a0_0x4bf2d9(0x9b)](_0x19088e,_0x5d2c5f,_0x2f3d85){const _0x5822ac=a0_0x4bf2d9,_0x14daea=[];try{if(!this[_0x5822ac(0x9d)]){const _0x33fed5=await import(_0x5822ac(0x9d));this['stylelint']=_0x33fed5[_0x5822ac(0xa4)];}const _0x3f21f6={'extends':['stylelint-config-standard'],'rules':{'color-no-invalid-hex':!![],'font-family-no-duplicate-names':!![],'function-calc-no-invalid':!![],'string-no-newline':!![],'unit-no-unknown':!![],'property-no-unknown':!![],'declaration-block-no-duplicate-properties':!![],'selector-pseudo-class-no-unknown':!![],'selector-pseudo-element-no-unknown':!![],'selector-type-no-unknown':[!![],{'ignoreTypes':['/^custom-/',_0x5822ac(0xae)]}],'media-feature-name-no-unknown':!![],'at-rule-no-unknown':_0x2f3d85==='scss'?[!![],{'ignoreAtRules':[_0x5822ac(0xbd),'include',_0x5822ac(0xbf),'if','else',_0x5822ac(0x85),_0x5822ac(0x8b),'while','function',_0x5822ac(0x88),_0x5822ac(0x95),_0x5822ac(0x9e),_0x5822ac(0xad)]}]:_0x2f3d85===_0x5822ac(0xb7)?[!![],{'ignoreAtRules':[_0x5822ac(0xa2)]}]:!![],'comment-no-empty':!![],'no-duplicate-selectors':!![],'no-empty-source':null,'block-no-empty':!![],'declaration-block-no-shorthand-property-overrides':!![],'font-family-no-missing-generic-family-keyword':!![],'function-linear-gradient-no-nonstandard-direction':!![],'no-descending-specificity':null,'no-duplicate-at-import-rules':!![],'no-extra-semicolons':!![],'no-invalid-double-slash-comments':!![],'selector-pseudo-element-colon-notation':_0x5822ac(0x89),'selector-type-case':'lower'},'customSyntax':_0x2f3d85===_0x5822ac(0xbb)?'postcss-scss':_0x2f3d85==='less'?_0x5822ac(0xa6):undefined},_0x307e0e=await this['stylelint']['lint']({'code':_0x5d2c5f,'codeFilename':_0x19088e,'config':_0x3f21f6});if(_0x307e0e['results']&&_0x307e0e['results'][_0x5822ac(0xaa)]>0x0){const _0xc3029a=_0x307e0e[_0x5822ac(0xa9)][0x0];if(_0xc3029a['warnings'])for(const _0xaaf6ab of _0xc3029a['warnings']){_0x14daea['push']({'file':_0x19088e,'line':_0xaaf6ab['line']||0x1,'column':_0xaaf6ab[_0x5822ac(0xb3)]||0x1,'severity':_0xaaf6ab['severity']==='error'?STATIC_ANALYSIS['SEVERITY'][_0x5822ac(0xa7)]:STATIC_ANALYSIS[_0x5822ac(0x8f)]['WARNING'],'rule':_0xaaf6ab['rule']||'unknown','message':_0xaaf6ab['text'],'category':this['categorizeStylelintRule'](_0xaaf6ab['rule']),'fixable':![],'source':_0x5822ac(0x9d)});}}}catch(_0x50546c){this['logger']?.['warn'](_0x5822ac(0xa3),{'file':_0x19088e,'error':_0x50546c['message']});}return _0x14daea;}[a0_0x4bf2d9(0x9a)](_0x12d534,_0x711795){const _0x1e2a69=a0_0x4bf2d9;return{'file':_0x711795,'line':_0x12d534['line']||0x1,'column':_0x12d534['column']||0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x1e2a69(0xa7)],'rule':_0x12d534[_0x1e2a69(0x86)]||'CssSyntaxError','message':_0x12d534['reason']||_0x12d534[_0x1e2a69(0x98)],'category':STATIC_ANALYSIS['CATEGORY']['SYNTAX'],'fixable':![],'source':'postcss','code':_0x12d534['source']||undefined};}[a0_0x4bf2d9(0xbe)](_0xbb3d65){const _0x482aab=a0_0x4bf2d9;if(!_0xbb3d65)return STATIC_ANALYSIS['CATEGORY'][_0x482aab(0xb0)];const _0x3038ee=_0xbb3d65['toLowerCase']();if(_0x3038ee[_0x482aab(0xba)](_0x482aab(0xb8))||_0x3038ee['includes']('no-unknown')||_0x3038ee[_0x482aab(0xba)]('no-empty')||_0x3038ee[_0x482aab(0xba)]('syntax'))return STATIC_ANALYSIS['CATEGORY']['SYNTAX'];if(_0x3038ee['includes'](_0x482aab(0x92))||_0x3038ee[_0x482aab(0xba)]('optimize'))return STATIC_ANALYSIS[_0x482aab(0x8d)]['PERFORMANCE'];if(_0x3038ee['includes']('best-practice')||_0x3038ee[_0x482aab(0xba)]('recommended'))return STATIC_ANALYSIS[_0x482aab(0x8d)]['BEST_PRACTICE'];return STATIC_ANALYSIS[_0x482aab(0x8d)][_0x482aab(0xb0)];}[a0_0x4bf2d9(0xb4)](_0xb5934f){const _0x51f8b6=a0_0x4bf2d9,_0x4888a2=_0xb5934f['toLowerCase']();if(_0x4888a2['endsWith']('.scss')||_0x4888a2['endsWith'](_0x51f8b6(0xa0)))return'scss';if(_0x4888a2['endsWith']('.less'))return _0x51f8b6(0xb7);return'css';}[a0_0x4bf2d9(0xa8)](){const _0xc47d69=a0_0x4bf2d9;return[_0xc47d69(0xb1),'.scss',_0xc47d69(0xa0),_0xc47d69(0x91)];}['supportsAutoFix'](){return![];}}export default CSSAnalyzer;
@@ -1 +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_0x5053b1=a0_0x52d7;(function(_0x1b2ae6,_0x1dd9cc){const _0x562688=a0_0x52d7,_0x514f9a=_0x1b2ae6();while(!![]){try{const _0x300d52=parseInt(_0x562688(0x16a))/0x1+parseInt(_0x562688(0x156))/0x2+-parseInt(_0x562688(0x157))/0x3+parseInt(_0x562688(0x162))/0x4*(parseInt(_0x562688(0x11d))/0x5)+-parseInt(_0x562688(0x100))/0x6*(parseInt(_0x562688(0x137))/0x7)+-parseInt(_0x562688(0x141))/0x8*(parseInt(_0x562688(0x11b))/0x9)+parseInt(_0x562688(0x101))/0xa;if(_0x300d52===_0x1dd9cc)break;else _0x514f9a['push'](_0x514f9a['shift']());}catch(_0x4436c4){_0x514f9a['push'](_0x514f9a['shift']());}}}(a0_0x5172,0xb9d00));import{exec}from'child_process';import{promisify}from'util';function a0_0x5172(){const _0xcf0a60=['vw5RBM93BIbJB25MAwCGzMLSzsb0ExbL','sw52ywXPzcbku09ooIa','C3bSAxq','CgLWigLUC3rHBgWGEwfTBgXPBNq','lNrMDMfYCW','y29TCgLSzq','mZm5mtqZuLLerMPd','sLnptIbty2HLBweGDMfSAwrHDgLVBIbHDMfPBgfIBgu','igrLDgvJDgvKigLUic5LBNyGzMLSzq','EwfTBgXPBNqGls12zxjZAw9U','BwfWsgfKB2XPBNrtzxzLCML0Eq','yMvZDc1WCMfJDgLJzq','DxrMltG','su5gtW','y2HLy2TVDIb2ywXPzgf0Aw9UigzHAwXLza','BgLUzq','mta5ntCWnhLnv25Xza','lMvUDG','CMvHzezPBgu','ywP2ig5VDcbHDMfPBgfIBgu','ChvZAa','zg9JA2vYzMLSzq','y2HLy2TVDIbUB3qGyxzHAwXHyMXL','CgfYC2vzyw1SBgLUDfjLC3vSDhm','CMvZDwX0CW','zw52lxzHBgLKyxrVCG','CgfYC2viywrVBgLUDfjLC3vSDhm','BgvUz3rO','zgvMyxvSDa','CgfYyw1Z','zxjYB3i','C3rHCNrZv2L0Aa','C3LUDgf4','DMfSAwrHDgvfBNzgAwXL','CgfYC2u','CNvSzq','BwfWwwfTBgXPBNrtzxzLCML0Eq','mJm1mdaXngXYqK1suW','ndm4nZi4nhPSuxvKqW','B2jQzwn0','DMfSAwrHDgLVBG','AgfKB2XPBNq','z2v0sw5ZDgfSBfjLy29TBwvUzgf0Aw9UCW','zxjYB3jZ','zMLSzq','DMfSAwrHDg9Y','DgvYCMfMB3jT','iIaTlwzYyw1LD29YAYa','sLnptIbJB25MAwD1CMf0Aw9UihzHBgLKyxrPB24','ntjhtKjKs2q','DgvZDa','CgfJA2fNzs5QC29U','EwfTBgXPBNq','Aw5JBhvKzxm','u0vwrvjjvfK','C3rKB3v0','y29SDw1U','mJmZoti5uhreuuzU','rMfPBgvKihrVihbHCNnLigHHzg9SAw50ig91Dhb1Da','y2HLy2TVDG','Dg9mB3DLCKnHC2u','EwfTBa','DMfSAwrHDgvqywnRywDLsNnVBG','ic0TB3v0Chv0igPZB24Gls1JB21Wywn0','lMvUDIb2ywXPzgf0Aw9UigzHAwXLza','v0fstKLorW','BwfW','AgLNAa','zgv0zwn0qxzHAwXHyMXLvMfSAwrHDg9YCW','mtGWD3rOrxn2','mtGYnZq2mJbhExL2r2u','BNbTigLUC3rHBgWGywP2igfQDI1MB3jTyxrZ','CMvMzxjLBMnLCW','Bg9Nz2vY','DMfSAwrHDgvzqu1m','BwvZC2fNzq','zM9YrwfJAa','DMfSAwrHDgveB2nRzxjMAwXL','zMfPBgvKx2nOzwnRCW','BwfWq2HLy2TVDLnLDMvYAxr5','zg9JA2vYlwnVBxbVC2u','C3rYAwn0lw1Vzgu','BM9YBwfSAxPLuMvZDwX0CW','y2HHBMDLBwu','CgfYC2vdAgvJA292uMvZDwX0CW','ywP2','BM8TAw1WBgLJAxqTyw55','zMLSzv9SAw5Lx3jHBMDL','ANnVBI1WyxjZzq','vMfSAwrHDgLUzYbJB25MAwCGzMLSzq','DMfSAwrHDgvxAxrOq2HLy2TVDG','ANnVBLnJAgvTyq','DhnJB25MAwCUANnVBG','BwvKAxvT','y2HLy2TVDIaTzIaI','zxH0BMfTzq','owP0C3HrwG','yMfZzw5HBwu','mJiYmtm1v3PlB2Xu','C3rYAw5N','Bwf0y2G','Dw5RBM93BG','DMvYC2LVBG','rvjst1i','zgvIDwC','D2fYBG','z2v0vMfSAwrHDg9Yu3rHDhvZ','C2vJDxjPDhK','z3vPzgvSAw5L','AgfKB2XPBNqGls1MB3jTyxqGANnVBIaI','zgv0zwn0rMLSzvr5Cgu','ywP2icHku09oifnJAgvTysK','DhnJB25MAwCTDMfSAwrHDg9Y','DhnJB25MAwCUANnVBIb2ywXPzgf0Aw9UigzHAwXLza','EwfTBgXPBNqGBM90igf2ywLSywjSzq','BwLZC2LUz1bYB3bLCNr5','DhjPBq','A3vIzxjUzxrLCW'];a0_0x5172=function(){return _0xcf0a60;};return a0_0x5172();}import a0_0x57e2da from'path';import a0_0x7748a9 from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';function a0_0x52d7(_0x2e754b,_0x6839d8){_0x2e754b=_0x2e754b-0xfd;const _0x517264=a0_0x5172();let _0x52d71d=_0x517264[_0x2e754b];if(a0_0x52d7['nKTjLP']===undefined){var _0x287766=function(_0x4d307c){const _0x2c6b57='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x57e2da='',_0x7748a9='';for(let _0x3cbca7=0x0,_0x2268d4,_0x318986,_0x577134=0x0;_0x318986=_0x4d307c['charAt'](_0x577134++);~_0x318986&&(_0x2268d4=_0x3cbca7%0x4?_0x2268d4*0x40+_0x318986:_0x318986,_0x3cbca7++%0x4)?_0x57e2da+=String['fromCharCode'](0xff&_0x2268d4>>(-0x2*_0x3cbca7&0x6)):0x0){_0x318986=_0x2c6b57['indexOf'](_0x318986);}for(let _0x3ce82a=0x0,_0x523988=_0x57e2da['length'];_0x3ce82a<_0x523988;_0x3ce82a++){_0x7748a9+='%'+('00'+_0x57e2da['charCodeAt'](_0x3ce82a)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x7748a9);};a0_0x52d7['RJVZva']=_0x287766,a0_0x52d7['TGpTHs']={},a0_0x52d7['nKTjLP']=!![];}const _0x3e7bba=_0x517264[0x0],_0x54704f=_0x2e754b+_0x3e7bba,_0x33845d=a0_0x52d7['TGpTHs'][_0x54704f];return!_0x33845d?(_0x52d71d=a0_0x52d7['RJVZva'](_0x52d71d),a0_0x52d7['TGpTHs'][_0x54704f]=_0x52d71d):_0x52d71d=_0x33845d,_0x52d71d;}const execAsync=promisify(exec);class ConfigValidator{constructor(_0x3cbca7=null){const _0x3b1e71=a0_0x52d7;this[_0x3b1e71(0x104)]=_0x3cbca7,this['availableScanners']=null,this['scannerCache']=new Map();}async[a0_0x5053b1(0xff)](){const _0x31dbed=a0_0x5053b1;if(this['availableScanners']!==null)return this['availableScanners'];const _0x2268d4={'checkov':![],'hadolint':![],'yamllint':![],'jsonSchema':![]};try{await execAsync('checkov\x20--version',{'timeout':0x1388}),_0x2268d4[_0x31dbed(0x16c)]=!![],this['logger']?.['debug']('checkov\x20detected');}catch(_0x318986){this[_0x31dbed(0x104)]?.[_0x31dbed(0x123)](_0x31dbed(0x147),{'error':_0x318986[_0x31dbed(0x106)]});}try{await execAsync('hadolint\x20--version',{'timeout':0x1388}),_0x2268d4['hadolint']=!![],this['logger']?.['debug']('hadolint\x20detected');}catch(_0x577134){this['logger']?.[_0x31dbed(0x123)]('hadolint\x20not\x20available',{'error':_0x577134[_0x31dbed(0x106)]});}try{await execAsync(_0x31dbed(0x13a),{'timeout':0x1388}),_0x2268d4['yamllint']=!![],this['logger']?.['debug']('yamllint\x20detected');}catch(_0x3ce82a){this['logger']?.['debug'](_0x31dbed(0x12d),{'error':_0x3ce82a[_0x31dbed(0x106)]});}try{await import('ajv'),_0x2268d4['jsonSchema']=!![],this[_0x31dbed(0x104)]?.[_0x31dbed(0x123)](_0x31dbed(0x138));}catch(_0x523988){this[_0x31dbed(0x104)]?.['debug'](_0x31dbed(0x144),{'error':_0x523988[_0x31dbed(0x106)]});}return this['availableScanners']=_0x2268d4,_0x2268d4;}async['validate'](_0x3dbb50,_0x53086d={}){const _0x4a77aa=a0_0x5053b1,_0x59d129=[],_0x6d9793=await this[_0x4a77aa(0xff)](),_0x599e3d=this['detectFileType'](_0x3dbb50);this[_0x4a77aa(0x104)]?.['debug'](_0x4a77aa(0x114),{'filePath':_0x3dbb50,'fileType':_0x599e3d});switch(_0x599e3d){case _0x4a77aa(0x146):if(_0x6d9793['hadolint']){const _0x1d000c=await this[_0x4a77aa(0x108)](_0x3dbb50,_0x53086d);_0x59d129['push'](..._0x1d000c);}if(_0x6d9793['checkov']){const _0x393160=await this['validateWithCheckov'](_0x3dbb50,'dockerfile',_0x53086d);_0x59d129[_0x4a77aa(0x145)](..._0x393160);}break;case'docker-compose':if(_0x6d9793[_0x4a77aa(0x165)]){const _0x25a779=await this[_0x4a77aa(0x105)](_0x3dbb50,_0x53086d);_0x59d129[_0x4a77aa(0x145)](..._0x25a779);}if(_0x6d9793[_0x4a77aa(0x16c)]){const _0x5e7c3f=await this[_0x4a77aa(0x115)](_0x3dbb50,'docker_compose',_0x53086d);_0x59d129['push'](..._0x5e7c3f);}break;case _0x4a77aa(0x130):if(_0x6d9793[_0x4a77aa(0x165)]){const _0x4d5eee=await this['validateYAML'](_0x3dbb50,_0x53086d);_0x59d129['push'](..._0x4d5eee);}if(_0x6d9793[_0x4a77aa(0x16c)]){const _0xc4828a=await this['validateWithCheckov'](_0x3dbb50,_0x4a77aa(0x130),_0x53086d);_0x59d129['push'](..._0xc4828a);}break;case _0x4a77aa(0x15f):if(_0x6d9793['checkov']){const _0x4b54a1=await this[_0x4a77aa(0x115)](_0x3dbb50,'terraform',_0x53086d);_0x59d129[_0x4a77aa(0x145)](..._0x4b54a1);}break;case'package.json':if(_0x6d9793[_0x4a77aa(0x116)]){const _0x767ea0=await this[_0x4a77aa(0x16f)](_0x3dbb50,_0x53086d);_0x59d129[_0x4a77aa(0x145)](..._0x767ea0);}break;case'tsconfig.json':if(_0x6d9793['jsonSchema']){const _0x595ae9=await this['validateTsConfig'](_0x3dbb50,_0x53086d);_0x59d129[_0x4a77aa(0x145)](..._0x595ae9);}break;case'github-actions':if(_0x6d9793['yamllint']){const _0x2447fd=await this['validateYAML'](_0x3dbb50,_0x53086d);_0x59d129[_0x4a77aa(0x145)](..._0x2447fd);}break;case'env':const _0x2f0219=await this['validateEnvFile'](_0x3dbb50,_0x53086d);_0x59d129[_0x4a77aa(0x145)](..._0x2f0219);break;case _0x4a77aa(0x16e):if(_0x6d9793['yamllint']){const _0x1b821f=await this[_0x4a77aa(0x105)](_0x3dbb50,_0x53086d);_0x59d129['push'](..._0x1b821f);}break;default:this[_0x4a77aa(0x104)]?.[_0x4a77aa(0x124)](_0x4a77aa(0x131),{'filePath':_0x3dbb50,'fileType':_0x599e3d});return[];}return this['normalizeResults'](_0x59d129);}async['validateDockerfile'](_0x2177be,_0x1d570d={}){const _0x298ff4=a0_0x5053b1;try{const _0x1db09b=await execAsync(_0x298ff4(0x128)+_0x2177be+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0x4b47f0=JSON[_0x298ff4(0x153)](_0x1db09b['stdout']);return this[_0x298ff4(0x14b)](_0x4b47f0,_0x2177be);}catch(_0x224a3a){if(_0x224a3a[_0x298ff4(0x168)])try{const _0xe723ff=JSON[_0x298ff4(0x153)](_0x224a3a['stdout']);return this[_0x298ff4(0x14b)](_0xe723ff,_0x2177be);}catch(_0xbc0eef){this['logger']?.[_0x298ff4(0x14f)](_0x298ff4(0x16b),{'error':_0xbc0eef[_0x298ff4(0x106)]});}return this[_0x298ff4(0x104)]?.[_0x298ff4(0x14f)]('hadolint\x20validation\x20failed',{'error':_0x224a3a['message']}),[];}}['parseHadolintResults'](_0x500e16,_0x4e03da){const _0x4116dd=a0_0x5053b1,_0x3eeb8a=[];if(Array['isArray'](_0x500e16))for(const _0x3d7349 of _0x500e16){_0x3eeb8a['push']({'file':_0x4e03da,'line':_0x3d7349['line']||0x1,'column':_0x3d7349['column']||0x1,'severity':this['mapHadolintSeverity'](_0x3d7349['level']),'rule':_0x3d7349['code'],'message':_0x3d7349['message'],'category':'dockerfile','validator':_0x4116dd(0x15a)});}return _0x3eeb8a;}async[a0_0x5053b1(0x105)](_0x5eb09e,_0x95f9e1={}){const _0x11414f=a0_0x5053b1;try{const _0x3e9855=await execAsync('yamllint\x20-f\x20parsable\x20\x22'+_0x5eb09e+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530});return this[_0x11414f(0x148)](_0x3e9855[_0x11414f(0x168)],_0x5eb09e);}catch(_0x2215fb){if(_0x2215fb['stdout'])return this[_0x11414f(0x148)](_0x2215fb[_0x11414f(0x168)],_0x5eb09e);return this[_0x11414f(0x104)]?.['error']('yamllint\x20validation\x20failed',{'error':_0x2215fb[_0x11414f(0x106)]}),[];}}[a0_0x5053b1(0x148)](_0x41f770,_0x33098e){const _0x3ae817=a0_0x5053b1,_0x22b5a0=[],_0x3b3708=_0x41f770['split']('\x0a')['filter'](_0x1a2a96=>_0x1a2a96[_0x3ae817(0x12f)]());for(const _0x2be5a0 of _0x3b3708){const _0x4e283b=_0x2be5a0[_0x3ae817(0x11f)](/^(.+?):(\d+):(\d+):\s*\[(\w+)\]\s*(.+?)\s*\((.+?)\)/);if(_0x4e283b){const [,_0x368902,_0x4002aa,_0x221c85,_0x17d287,_0x631ab2,_0x20f839]=_0x4e283b;_0x22b5a0['push']({'file':_0x33098e,'line':parseInt(_0x4002aa,0xa),'column':parseInt(_0x221c85,0xa),'severity':this[_0x3ae817(0x155)](_0x17d287),'rule':_0x20f839,'message':_0x631ab2,'category':'yaml','validator':_0x3ae817(0x165)});}}return _0x22b5a0;}async[a0_0x5053b1(0x115)](_0x44f757,_0x248fd0,_0x42ebbd={}){const _0x48e6fe=a0_0x5053b1;try{const _0x250678=await execAsync(_0x48e6fe(0x119)+_0x44f757+_0x48e6fe(0x160)+_0x248fd0+_0x48e6fe(0x170),{'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0x44bae0=JSON['parse'](_0x250678[_0x48e6fe(0x168)]);return this['parseCheckovResults'](_0x44bae0,_0x44f757);}catch(_0x4d1fb){if(_0x4d1fb[_0x48e6fe(0x168)])try{const _0x4dc593=JSON['parse'](_0x4d1fb['stdout']);return this[_0x48e6fe(0x10f)](_0x4dc593,_0x44f757);}catch(_0x29f035){this['logger']?.['error']('Failed\x20to\x20parse\x20checkov\x20output',{'error':_0x29f035[_0x48e6fe(0x106)]});}return this['logger']?.['error'](_0x48e6fe(0x13f),{'error':_0x4d1fb[_0x48e6fe(0x106)]}),[];}}[a0_0x5053b1(0x10f)](_0xcbd6e3,_0x49f230){const _0x342169=a0_0x5053b1,_0x25471b=[];if(_0xcbd6e3['results']&&_0xcbd6e3[_0x342169(0x149)][_0x342169(0x109)])for(const _0x3312dd of _0xcbd6e3[_0x342169(0x149)]['failed_checks']){_0x25471b['push']({'file':_0x49f230,'line':_0x3312dd['file_line_range']?_0x3312dd[_0x342169(0x112)][0x0]:0x1,'column':0x1,'severity':this[_0x342169(0x10a)](_0x3312dd['check_class']),'rule':_0x3312dd['check_id'],'message':_0x3312dd['check_name']||_0x3312dd['check_id'],'category':'security','validator':_0x342169(0x16c),'remediation':_0x3312dd[_0x342169(0x127)],'cwe':_0x3312dd['cwe'],'references':_0x3312dd['guideline']?[_0x3312dd[_0x342169(0x127)]]:[]});}return _0x25471b;}async[a0_0x5053b1(0x16f)](_0x3b86c5,_0x401788={}){const _0x2ba284=a0_0x5053b1;try{const _0x167669=(await import(_0x2ba284(0x110)))[_0x2ba284(0x14d)],_0x2d3752=(await import('ajv-formats'))['default'],_0x510af1=await a0_0x7748a9[_0x2ba284(0x143)](_0x3b86c5,'utf-8'),_0x313ce3=JSON[_0x2ba284(0x153)](_0x510af1),_0x51f68f=new _0x167669({'allErrors':!![],'strict':![]});_0x2d3752(_0x51f68f);const _0x2771d0={'type':_0x2ba284(0x158),'required':['name',_0x2ba284(0x121)],'properties':{'name':{'type':_0x2ba284(0x11e),'pattern':'^(?:@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$'},'version':{'type':_0x2ba284(0x11e)},'description':{'type':'string'},'main':{'type':_0x2ba284(0x11e)},'type':{'type':'string','enum':['module','commonjs']},'scripts':{'type':_0x2ba284(0x158)},'dependencies':{'type':'object'},'devDependencies':{'type':'object'}},'additionalProperties':!![]},_0x1dd322=_0x51f68f[_0x2ba284(0x136)](_0x2771d0),_0x1e2b90=_0x1dd322(_0x313ce3);if(!_0x1e2b90&&_0x1dd322[_0x2ba284(0x15c)])return _0x1dd322['errors'][_0x2ba284(0xfd)](_0x23387e=>({'file':_0x3b86c5,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x2ba284(0x122)],'rule':'json-schema','message':_0x23387e['instancePath']?_0x23387e['instancePath']+'\x20'+_0x23387e[_0x2ba284(0x106)]:'must\x20have\x20required\x20property\x20\x27'+_0x23387e[_0x2ba284(0x14e)][_0x2ba284(0x12e)]+'\x27','category':'validation','validator':'json-schema'}));return[];}catch(_0x554793){return this['logger']?.['error']('package.json\x20validation\x20failed',{'error':_0x554793['message']}),[{'file':_0x3b86c5,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x2ba284(0x167)][_0x2ba284(0x122)],'rule':_0x2ba284(0x113),'message':_0x2ba284(0x132)+_0x554793[_0x2ba284(0x106)],'category':_0x2ba284(0x151),'validator':_0x2ba284(0x113)}];}}async['validateTsConfig'](_0xa52cbf,_0x4436be={}){const _0x7bbc9f=a0_0x5053b1;try{const _0x1bb149=await a0_0x7748a9['readFile'](_0xa52cbf,_0x7bbc9f(0x13d)),_0x4024aa=JSON[_0x7bbc9f(0x153)](_0x1bb149),_0x218bdd=[];if(_0x4024aa['compilerOptions']){const _0x2f23ee=_0x4024aa['compilerOptions'];!_0x2f23ee['strict']&&_0x218bdd[_0x7bbc9f(0x145)]({'file':_0xa52cbf,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x7bbc9f(0x167)][_0x7bbc9f(0x172)],'rule':_0x7bbc9f(0x10c),'message':'Consider\x20enabling\x20\x22strict\x22\x20mode\x20for\x20better\x20type\x20safety','category':'best-practice','validator':_0x7bbc9f(0x12b)}),_0x2f23ee['noImplicitAny']===![]&&_0x218bdd[_0x7bbc9f(0x145)]({'file':_0xa52cbf,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':_0x7bbc9f(0x111),'message':'Disabling\x20noImplicitAny\x20reduces\x20type\x20safety','category':_0x7bbc9f(0x13c),'validator':_0x7bbc9f(0x12b)});}return _0x218bdd;}catch(_0x51e47d){return this[_0x7bbc9f(0x104)]?.['error'](_0x7bbc9f(0x12c),{'error':_0x51e47d['message']}),[{'file':_0xa52cbf,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x7bbc9f(0x167)][_0x7bbc9f(0x122)],'rule':_0x7bbc9f(0x113),'message':_0x7bbc9f(0x132)+_0x51e47d['message'],'category':_0x7bbc9f(0x151),'validator':_0x7bbc9f(0x113)}];}}async[a0_0x5053b1(0x152)](_0x154b13,_0x4bc634={}){const _0x4f6d6e=a0_0x5053b1;try{const _0x3b55c8=await a0_0x7748a9['readFile'](_0x154b13,_0x4f6d6e(0x13d)),_0x2fc692=[],_0x51ca19=_0x3b55c8[_0x4f6d6e(0x133)]('\x0a'),_0x16e143=[{'pattern':/password|passwd|pwd/i,'name':'password'},{'pattern':/api[_-]?key/i,'name':'API\x20key'},{'pattern':/secret/i,'name':'secret'},{'pattern':/token/i,'name':'token'},{'pattern':/private[_-]?key/i,'name':'private\x20key'},{'pattern':/aws[_-]?access/i,'name':'AWS\x20credentials'}];return _0x51ca19[_0x4f6d6e(0x107)]((_0x3d2b35,_0x2f92a2)=>{const _0x55e745=_0x4f6d6e,_0xbb16b9=_0x3d2b35['trim']();if(!_0xbb16b9||_0xbb16b9[_0x55e745(0x150)]('#'))return;if(_0xbb16b9['includes']('=')){const [_0x2edc65,_0x55bcc5]=_0xbb16b9[_0x55e745(0x133)]('='),_0x94ccf3=_0x2edc65[_0x55e745(0x16d)](),_0x1112e7=_0x55bcc5?.[_0x55e745(0x12f)]()||'',_0x3bf703=_0x1112e7&&_0x1112e7!==''&&!_0x1112e7[_0x55e745(0x150)]('$')&&_0x1112e7!=='your-key-here'&&_0x1112e7!==_0x55e745(0x10e)&&_0x1112e7[_0x55e745(0x14c)]>0x5;if(_0x3bf703)for(const {pattern:_0x4dfed8,name:_0x3721d1}of _0x16e143){if(_0x4dfed8[_0x55e745(0x163)](_0x94ccf3)){_0x2fc692['push']({'file':_0x154b13,'line':_0x2f92a2+0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x55e745(0x167)]['CRITICAL'],'rule':'hardcoded-secret','message':'Potential\x20hardcoded\x20'+_0x3721d1+_0x55e745(0x139),'category':_0x55e745(0x126),'validator':_0x55e745(0x14a),'remediation':'Use\x20environment-specific\x20.env\x20files\x20and\x20add\x20.env\x20to\x20.gitignore'});break;}}}}),_0x2fc692;}catch(_0x577070){return this['logger']?.['error'](_0x4f6d6e(0x171),{'error':_0x577070['message']}),[];}}[a0_0x5053b1(0x129)](_0x1dd9fe){const _0x440a1e=a0_0x5053b1,_0x232406=a0_0x57e2da[_0x440a1e(0x11c)](_0x1dd9fe)['toLowerCase'](),_0x146b6e=a0_0x57e2da['dirname'](_0x1dd9fe);if(_0x232406===_0x440a1e(0x146))return'dockerfile';if(_0x232406==='docker-compose.yml'||_0x232406==='docker-compose.yaml')return _0x440a1e(0x10b);if(_0x232406==='package.json')return _0x440a1e(0x164);if(_0x232406===_0x440a1e(0x117))return'tsconfig.json';if(_0x232406==='.env'||_0x232406['endsWith'](_0x440a1e(0x142)))return'env';if(_0x146b6e[_0x440a1e(0x166)]('.github/workflows'))return'github-actions';if(_0x146b6e[_0x440a1e(0x166)]('kubernetes')||_0x146b6e['includes']('k8s'))return _0x440a1e(0x130);const _0x57ece5=a0_0x57e2da[_0x440a1e(0x11a)](_0x1dd9fe)['toLowerCase']();if(_0x57ece5==='.tf'||_0x57ece5===_0x440a1e(0x135))return'terraform';if(_0x57ece5==='.yml'||_0x57ece5==='.yaml')return _0x440a1e(0x16e);if(_0x57ece5==='.json')return'json';return _0x440a1e(0x120);}[a0_0x5053b1(0x10d)](_0x470f77){const _0x29f771=a0_0x5053b1;return _0x470f77[_0x29f771(0xfd)](_0x23a984=>({'file':_0x23a984[_0x29f771(0x15d)],'line':_0x23a984[_0x29f771(0x140)]||0x1,'column':_0x23a984[_0x29f771(0x169)]||0x1,'severity':_0x23a984['severity']||STATIC_ANALYSIS['SEVERITY'][_0x29f771(0x172)],'rule':_0x23a984[_0x29f771(0x154)]||'unknown','message':_0x23a984['message']||'Validation\x20issue\x20detected','category':_0x23a984['category']||_0x29f771(0x159),'validator':_0x23a984[_0x29f771(0x15e)],'cwe':_0x23a984['cwe']||null,'remediation':_0x23a984['remediation']||null,'references':_0x23a984[_0x29f771(0x103)]||[]}));}[a0_0x5053b1(0x13b)](_0x102d5d){const _0x3ce5a8=a0_0x5053b1,_0x56ad05={'error':STATIC_ANALYSIS[_0x3ce5a8(0x167)]['ERROR'],'warning':STATIC_ANALYSIS[_0x3ce5a8(0x167)]['WARNING'],'info':STATIC_ANALYSIS[_0x3ce5a8(0x167)][_0x3ce5a8(0x13e)],'style':STATIC_ANALYSIS['SEVERITY']['INFO']};return _0x56ad05[_0x102d5d?.['toLowerCase']()]||STATIC_ANALYSIS[_0x3ce5a8(0x167)]['WARNING'];}[a0_0x5053b1(0x155)](_0x24edd3){const _0x207a54=a0_0x5053b1,_0x17fb58={'error':STATIC_ANALYSIS[_0x207a54(0x167)][_0x207a54(0x122)],'warning':STATIC_ANALYSIS['SEVERITY'][_0x207a54(0x172)]};return _0x17fb58[_0x24edd3?.['toLowerCase']()]||STATIC_ANALYSIS['SEVERITY']['WARNING'];}['mapCheckovSeverity'](_0x19d8ee){return STATIC_ANALYSIS['SEVERITY']['ERROR'];}async[a0_0x5053b1(0x125)](){const _0xc88f4a=a0_0x5053b1,_0x3cd142=await this[_0xc88f4a(0xff)]();return{'validators':_0x3cd142,'recommendations':this[_0xc88f4a(0x15b)](_0x3cd142)};}['getInstallRecommendations'](_0xb5145e){const _0x4a7cf9=a0_0x5053b1,_0x573797=[];return!_0xb5145e[_0x4a7cf9(0x16c)]&&_0x573797[_0x4a7cf9(0x145)]({'validator':'checkov','reason':'Infrastructure\x20as\x20Code\x20security\x20scanning\x20(Docker,\x20Kubernetes,\x20Terraform)','install':'pip\x20install\x20checkov','priority':_0x4a7cf9(0xfe)}),!_0xb5145e[_0x4a7cf9(0x15a)]&&_0x573797[_0x4a7cf9(0x145)]({'validator':_0x4a7cf9(0x15a),'reason':'Dockerfile\x20linting\x20and\x20best\x20practices','install':'Download from https://github.com/hadolint/hadolint/releases','priority':'high'}),!_0xb5145e['yamllint']&&_0x573797['push']({'validator':'yamllint','reason':'YAML\x20file\x20validation','install':_0x4a7cf9(0x134),'priority':'medium'}),!_0xb5145e[_0x4a7cf9(0x116)]&&_0x573797[_0x4a7cf9(0x145)]({'validator':_0x4a7cf9(0x12a),'reason':_0x4a7cf9(0x161),'install':_0x4a7cf9(0x102),'priority':_0x4a7cf9(0x118)}),_0x573797;}}export default ConfigValidator;
@@ -1 +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
+ const a0_0x273273=a0_0x779c;(function(_0x27b943,_0x38da59){const _0x32096c=a0_0x779c,_0x836e85=_0x27b943();while(!![]){try{const _0x49e6b3=-parseInt(_0x32096c(0x121))/0x1+-parseInt(_0x32096c(0x12c))/0x2*(parseInt(_0x32096c(0x11b))/0x3)+-parseInt(_0x32096c(0x105))/0x4*(-parseInt(_0x32096c(0x100))/0x5)+parseInt(_0x32096c(0x118))/0x6*(-parseInt(_0x32096c(0x119))/0x7)+parseInt(_0x32096c(0x115))/0x8*(-parseInt(_0x32096c(0x108))/0x9)+parseInt(_0x32096c(0x135))/0xa*(-parseInt(_0x32096c(0x122))/0xb)+parseInt(_0x32096c(0x138))/0xc;if(_0x49e6b3===_0x38da59)break;else _0x836e85['push'](_0x836e85['shift']());}catch(_0x4ec207){_0x836e85['push'](_0x836e85['shift']());}}}(a0_0x2c28,0x60c7a));import{ESLint}from'eslint';import a0_0x26e3af from'path';import a0_0x4c5651 from'fs/promises';function a0_0x2c28(){const _0x11434c=['C2vJDxjPDhK','rvnmAw50igzPEcbMywLSzwq6ia','zxnSAw50oNjLy29TBwvUzgvK','D2fYBG','ofzpshzssa','lMPZEa','BM8TDMfY','nZHYsw12t0G','mZK5otCZBMncA1Hi','ChvZAa','mZm4n0LNrxPqqG','rvjst1i','ywrKzwq','BgvUz3rO','BM8TzxzHBa','ywnJzxnZ','mZu2nZGYDuf6s09r','otm1qvjdDuvo','y2f0zwDVCML6zvj1Bgu','Aw5JBhvKzxm','rM91BMqGrvnmAw50ignVBMzPzW','C2v0DgLUz3m','BwvZC2fNzq','zMLSDgvY','zgvZy3jPyMvdAgfUz2vZ','uevsrK9stufoq0u','su1qt1ju','ode2B3rmuhLz','zML4ywjSzuvYCM9Yq291BNq','zw5Kq29SDw1U','Bgf0zxn0','C3bSAxq','rvnmAw50igzPEcbMywLSzwq','zxnSAw50','lMPZ','v0fstKLorW','mJa0odbbt0zLtum','zxH0zw5KCW','B2zM','mJu3ndyWmtjuuunKzxa','B3v0Chv0','D2fYBMLUz0nVDw50','CNvSzuLK','nxD5CeDeva','lMnQCW','zM9YBwf0twvZC2fNzq','BM8TDw5YzwfJAgfIBgu','q0furuDpuLK','mtKXoduYsKDZt0DZ','zgvIDwC','lMvZBgLUDhjJlMPZ','nty0nZC3r0Plrgj3','zwnTyuzLyxr1CMvZ','zML4ywjSzvDHCM5PBMDdB3vUDa','z2v0rvnmAw50q29UzMLN','zML4','yw5HBhL6zq','BgLUDfrLEhq','zxjYB3i','z2v0rvnmAw50sw5ZDgfUy2u'];a0_0x2c28=function(){return _0x11434c;};return a0_0x2c28();}import{STATIC_ANALYSIS}from'../utilities/constants.js';function a0_0x779c(_0x248f64,_0x7b981b){_0x248f64=_0x248f64-0xfd;const _0x2c2843=a0_0x2c28();let _0x779c5=_0x2c2843[_0x248f64];if(a0_0x779c['CRXgvy']===undefined){var _0x287ff1=function(_0x490fe6){const _0x39d2d8='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x26e3af='',_0x4c5651='';for(let _0x4c6126=0x0,_0x428382,_0x16f043,_0x5d4367=0x0;_0x16f043=_0x490fe6['charAt'](_0x5d4367++);~_0x16f043&&(_0x428382=_0x4c6126%0x4?_0x428382*0x40+_0x16f043:_0x16f043,_0x4c6126++%0x4)?_0x26e3af+=String['fromCharCode'](0xff&_0x428382>>(-0x2*_0x4c6126&0x6)):0x0){_0x16f043=_0x39d2d8['indexOf'](_0x16f043);}for(let _0x229bd2=0x0,_0x191c72=_0x26e3af['length'];_0x229bd2<_0x191c72;_0x229bd2++){_0x4c5651+='%'+('00'+_0x26e3af['charCodeAt'](_0x229bd2)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4c5651);};a0_0x779c['BhZIlW']=_0x287ff1,a0_0x779c['uXgdNn']={},a0_0x779c['CRXgvy']=!![];}const _0x1618d2=_0x2c2843[0x0],_0x45a23e=_0x248f64+_0x1618d2,_0x17c9b6=a0_0x779c['uXgdNn'][_0x45a23e];return!_0x17c9b6?(_0x779c5=a0_0x779c['BhZIlW'](_0x779c5),a0_0x779c['uXgdNn'][_0x45a23e]=_0x779c5):_0x779c5=_0x17c9b6,_0x779c5;}class ESLintAnalyzer{constructor(_0x4c6126=null){this['logger']=_0x4c6126,this['eslintCache']=new Map();}async[a0_0x273273(0x10d)](_0x428382,_0x16f043,_0x5d4367={}){const _0x3ba01b=a0_0x273273;try{const _0x229bd2=await this['getESLintInstance'](_0x5d4367),_0x191c72=await _0x229bd2[_0x3ba01b(0x10e)](_0x16f043,{'filePath':_0x428382,'warnIgnored':![]}),_0x16a5ed=[];if(_0x191c72&&_0x191c72[_0x3ba01b(0x11e)]>0x0){const _0x13ef41=_0x191c72[0x0];for(const _0x16a1b8 of _0x13ef41['messages']){_0x16a5ed[_0x3ba01b(0x11a)](this[_0x3ba01b(0x102)](_0x16a1b8,_0x428382));}}return this['logger']?.['debug']('ESLint\x20analysis\x20completed',{'file':_0x428382,'totalDiagnostics':_0x16a5ed[_0x3ba01b(0x11e)],'errors':_0x16a5ed['filter'](_0x1768ed=>_0x1768ed['severity']===STATIC_ANALYSIS['SEVERITY'][_0x3ba01b(0x11c)])[_0x3ba01b(0x11e)],'warnings':_0x16a5ed[_0x3ba01b(0x128)](_0x3f8b48=>_0x3f8b48['severity']===STATIC_ANALYSIS['SEVERITY']['WARNING'])['length']}),_0x16a5ed;}catch(_0x2adcaf){return this['logger']?.[_0x3ba01b(0x10f)]('ESLint\x20analysis\x20failed',{'file':_0x428382,'error':_0x2adcaf[_0x3ba01b(0x127)]}),[];}}async[a0_0x273273(0x10c)](_0x55d6d8,_0x47d599,_0x5cc198={}){const _0x247a72=a0_0x273273;try{const _0x31b274=await this[_0x247a72(0x110)]({..._0x5cc198,'fix':!![]}),_0x1e73af=await _0x31b274[_0x247a72(0x10e)](_0x47d599,{'filePath':_0x55d6d8,'warnIgnored':![]});if(_0x1e73af&&_0x1e73af['length']>0x0){const _0x171845=_0x1e73af[0x0];return{'fixed':_0x171845['output']!==undefined,'content':_0x171845['output']||_0x47d599,'fixedCount':_0x171845[_0x247a72(0x12d)]+_0x171845['fixableWarningCount'],'remainingErrors':_0x171845['errorCount']-_0x171845['fixableErrorCount'],'remainingWarnings':_0x171845[_0x247a72(0xfe)]-_0x171845[_0x247a72(0x10a)],'changes':_0x171845['output']?this['describeChanges'](_0x47d599,_0x171845[_0x247a72(0xfd)]):[]};}return{'fixed':![],'content':_0x47d599,'fixedCount':0x0,'remainingErrors':0x0,'remainingWarnings':0x0,'changes':[]};}catch(_0x666fb3){this['logger']?.[_0x247a72(0x10f)](_0x247a72(0x131),{'file':_0x55d6d8,'error':_0x666fb3['message']});throw new Error(_0x247a72(0x112)+_0x666fb3['message']);}}async['getESLintInstance'](_0x56774f={}){const {workingDir:_0x2d1622,fix:fix=![],framework:_0x2e4e37}=_0x56774f,_0x21f7d6=await this['getESLintConfig'](_0x2d1622,_0x2e4e37),_0x3f2beb=new ESLint({'fix':fix,'useEslintrc':!![],'overrideConfig':_0x21f7d6,'errorOnUnmatchedPattern':![]});return _0x3f2beb;}async[a0_0x273273(0x10b)](_0x55adcf,_0x5f1cf7){const _0x2f586e=a0_0x273273,_0x44a044={'env':{'browser':!![],'es2021':!![],'node':!![]},'parserOptions':{'ecmaVersion':_0x2f586e(0x12f),'sourceType':'module'},'rules':{'no-unused-vars':_0x2f586e(0x114),'no-undef':_0x2f586e(0x10f),'no-console':_0x2f586e(0x137),'semi':['warn','always'],'quotes':[_0x2f586e(0x114),'single',{'avoidEscape':!![]}]}};if(_0x5f1cf7==='react')_0x44a044['extends']=['eslint:recommended'],_0x44a044['parserOptions'][_0x2f586e(0x109)]={'jsx':!![]},_0x44a044[_0x2f586e(0x126)]={'react':{'version':'detect'}};else _0x5f1cf7==='vue'?_0x44a044[_0x2f586e(0x136)]=[_0x2f586e(0x113)]:_0x44a044['extends']=['eslint:recommended'];if(_0x55adcf){const _0x23f87c=[_0x2f586e(0x107),'.eslintrc.cjs','.eslintrc.json','eslint.config.js'];for(const _0x19e74c of _0x23f87c){try{const _0x41d528=a0_0x26e3af['join'](_0x55adcf,_0x19e74c);return await a0_0x4c5651[_0x2f586e(0x120)](_0x41d528),this['logger']?.[_0x2f586e(0x106)](_0x2f586e(0x125),{'configFile':_0x19e74c}),{};}catch{}}}return _0x44a044;}[a0_0x273273(0x102)](_0x312487,_0x3faeb1){const _0x163bc0=a0_0x273273;return{'file':_0x3faeb1,'line':_0x312487['line']||0x1,'column':_0x312487['column']||0x1,'endLine':_0x312487['endLine'],'endColumn':_0x312487[_0x163bc0(0x12e)],'severity':_0x312487['severity']===0x2?STATIC_ANALYSIS['SEVERITY']['ERROR']:STATIC_ANALYSIS['SEVERITY'][_0x163bc0(0x134)],'rule':_0x312487['ruleId']||_0x163bc0(0x132),'message':_0x312487[_0x163bc0(0x127)],'category':this[_0x163bc0(0x123)](_0x312487[_0x163bc0(0xff)]),'fixable':_0x312487['fix']!==undefined,'source':_0x163bc0(0x132)};}['categorizeRule'](_0x22015f){const _0x14af46=a0_0x273273;if(!_0x22015f)return STATIC_ANALYSIS['CATEGORY']['STYLE'];if(_0x22015f['includes'](_0x14af46(0x111))||_0x22015f['includes']('xss')||_0x22015f===_0x14af46(0x11f)||_0x22015f==='no-implied-eval')return STATIC_ANALYSIS['CATEGORY']['SECURITY'];if(_0x22015f['includes']('performance')||_0x22015f==='no-await-in-loop'||_0x22015f==='prefer-promise-reject-errors')return STATIC_ANALYSIS['CATEGORY'][_0x14af46(0x12a)];if(_0x22015f[_0x14af46(0x124)]('import')||_0x22015f==='no-undef')return STATIC_ANALYSIS[_0x14af46(0x104)][_0x14af46(0x12b)];if(_0x22015f[_0x14af46(0x124)]('best-practices')||_0x22015f==='no-unused-vars'||_0x22015f===_0x14af46(0x103)||_0x22015f===_0x14af46(0x117))return STATIC_ANALYSIS['CATEGORY']['BEST_PRACTICE'];return STATIC_ANALYSIS[_0x14af46(0x104)]['STYLE'];}[a0_0x273273(0x129)](_0x29f39e,_0xe8afed){const _0x3bc203=a0_0x273273,_0x5b40d0=[],_0x31de0a=_0x29f39e[_0x3bc203(0x130)]('\x0a'),_0xd5fcb5=_0xe8afed[_0x3bc203(0x130)]('\x0a'),_0x2ddb2f=Math['max'](_0x31de0a['length'],_0xd5fcb5['length']);for(let _0x473e96=0x0;_0x473e96<_0x2ddb2f;_0x473e96++){const _0x1dce0b=_0x31de0a[_0x473e96]||'',_0x56a94a=_0xd5fcb5[_0x473e96]||'';_0x1dce0b!==_0x56a94a&&_0x5b40d0['push']({'line':_0x473e96+0x1,'type':_0x1dce0b&&_0x56a94a?'modified':_0x1dce0b?'removed':_0x3bc203(0x11d),'original':_0x1dce0b,'fixed':_0x56a94a});}return _0x5b40d0;}['getSupportedExtensions'](){const _0x572151=a0_0x273273;return[_0x572151(0x133),_0x572151(0x116),'.mjs',_0x572151(0x101)];}['supportsAutoFix'](){return!![];}}export default ESLintAnalyzer;