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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/README.md +2 -2
  2. package/bin/cli.js +1 -1
  3. package/bin/loxia-terminal-v2.js +1 -1
  4. package/bin/loxia-terminal.js +1 -1
  5. package/bin/start-with-terminal.js +1 -1
  6. package/package.json +1 -1
  7. package/scripts/install-scanners.js +1 -1
  8. package/src/analyzers/CSSAnalyzer.js +1 -1
  9. package/src/analyzers/ConfigValidator.js +1 -1
  10. package/src/analyzers/ESLintAnalyzer.js +1 -1
  11. package/src/analyzers/JavaScriptAnalyzer.js +1 -1
  12. package/src/analyzers/PrettierFormatter.js +1 -1
  13. package/src/analyzers/PythonAnalyzer.js +1 -1
  14. package/src/analyzers/SecurityAnalyzer.js +1 -1
  15. package/src/analyzers/TypeScriptAnalyzer.js +1 -1
  16. package/src/analyzers/codeCloneDetector/analyzer.js +1 -1
  17. package/src/analyzers/codeCloneDetector/detector.js +1 -1
  18. package/src/analyzers/codeCloneDetector/index.js +1 -1
  19. package/src/analyzers/codeCloneDetector/parser.js +1 -1
  20. package/src/analyzers/codeCloneDetector/reporter.js +1 -1
  21. package/src/analyzers/codeCloneDetector/scanner.js +1 -1
  22. package/src/core/agentPool.js +1 -1
  23. package/src/core/agentScheduler.js +1 -1
  24. package/src/core/contextManager.js +1 -1
  25. package/src/core/messageProcessor.js +1 -1
  26. package/src/core/orchestrator.js +1 -1
  27. package/src/core/stateManager.js +1 -1
  28. package/src/index.js +1 -1
  29. package/src/interfaces/cli.js +1 -1
  30. package/src/interfaces/terminal/__tests__/smoke/advancedFeatures.test.js +1 -1
  31. package/src/interfaces/terminal/__tests__/smoke/agentControl.test.js +1 -1
  32. package/src/interfaces/terminal/__tests__/smoke/agents.test.js +1 -1
  33. package/src/interfaces/terminal/__tests__/smoke/components.test.js +1 -1
  34. package/src/interfaces/terminal/__tests__/smoke/connection.test.js +1 -1
  35. package/src/interfaces/terminal/__tests__/smoke/enhancements.test.js +1 -1
  36. package/src/interfaces/terminal/__tests__/smoke/imports.test.js +1 -1
  37. package/src/interfaces/terminal/__tests__/smoke/messages.test.js +1 -1
  38. package/src/interfaces/terminal/__tests__/smoke/tools.test.js +1 -1
  39. package/src/interfaces/terminal/api/apiClient.js +1 -1
  40. package/src/interfaces/terminal/api/messageRouter.js +1 -1
  41. package/src/interfaces/terminal/api/session.js +1 -1
  42. package/src/interfaces/terminal/api/websocket.js +1 -1
  43. package/src/interfaces/terminal/components/AgentCreator.js +1 -1
  44. package/src/interfaces/terminal/components/AgentEditor.js +1 -1
  45. package/src/interfaces/terminal/components/AgentSwitcher.js +1 -1
  46. package/src/interfaces/terminal/components/ErrorBoundary.js +1 -1
  47. package/src/interfaces/terminal/components/ErrorPanel.js +1 -1
  48. package/src/interfaces/terminal/components/Header.js +1 -1
  49. package/src/interfaces/terminal/components/HelpPanel.js +1 -1
  50. package/src/interfaces/terminal/components/InputBox.js +1 -1
  51. package/src/interfaces/terminal/components/Layout.js +1 -1
  52. package/src/interfaces/terminal/components/LoadingSpinner.js +1 -1
  53. package/src/interfaces/terminal/components/MessageList.js +1 -1
  54. package/src/interfaces/terminal/components/MultilineTextInput.js +1 -1
  55. package/src/interfaces/terminal/components/SearchPanel.js +1 -1
  56. package/src/interfaces/terminal/components/SettingsPanel.js +1 -1
  57. package/src/interfaces/terminal/components/StatusBar.js +1 -1
  58. package/src/interfaces/terminal/components/TextInput.js +1 -1
  59. package/src/interfaces/terminal/config/agentEditorConstants.js +1 -1
  60. package/src/interfaces/terminal/config/constants.js +1 -1
  61. package/src/interfaces/terminal/index.js +1 -1
  62. package/src/interfaces/terminal/state/useAgentControl.js +1 -1
  63. package/src/interfaces/terminal/state/useAgents.js +1 -1
  64. package/src/interfaces/terminal/state/useConnection.js +1 -1
  65. package/src/interfaces/terminal/state/useMessages.js +1 -1
  66. package/src/interfaces/terminal/state/useTools.js +1 -1
  67. package/src/interfaces/terminal/utils/debugLogger.js +1 -1
  68. package/src/interfaces/terminal/utils/settingsStorage.js +1 -1
  69. package/src/interfaces/terminal/utils/theme.js +1 -1
  70. package/src/interfaces/webServer.js +1 -1
  71. package/src/modules/fileExplorer/controller.js +1 -1
  72. package/src/modules/fileExplorer/index.js +1 -1
  73. package/src/modules/fileExplorer/middleware.js +1 -1
  74. package/src/modules/fileExplorer/routes.js +1 -1
  75. package/src/services/aiService.js +1 -1
  76. package/src/services/apiKeyManager.js +1 -1
  77. package/src/services/benchmarkService.js +1 -1
  78. package/src/services/budgetService.js +1 -1
  79. package/src/services/contextInjectionService.js +1 -1
  80. package/src/services/conversationCompactionService.js +1 -1
  81. package/src/services/errorHandler.js +1 -1
  82. package/src/services/fileAttachmentService.js +1 -1
  83. package/src/services/modelRouterService.js +1 -1
  84. package/src/services/modelsService.js +1 -1
  85. package/src/services/qualityInspector.js +1 -1
  86. package/src/services/tokenCountingService.js +1 -1
  87. package/src/tools/agentCommunicationTool.js +1 -1
  88. package/src/tools/agentDelayTool.js +1 -1
  89. package/src/tools/asyncToolManager.js +1 -1
  90. package/src/tools/baseTool.js +1 -1
  91. package/src/tools/browserTool.js +1 -1
  92. package/src/tools/cloneDetectionTool.js +1 -1
  93. package/src/tools/dependencyResolverTool.js +1 -1
  94. package/src/tools/fileContentReplaceTool.js +1 -1
  95. package/src/tools/fileSystemTool.js +1 -1
  96. package/src/tools/fileTreeTool.js +1 -1
  97. package/src/tools/imageTool.js +1 -1
  98. package/src/tools/importAnalyzerTool.js +1 -1
  99. package/src/tools/jobDoneTool.js +1 -1
  100. package/src/tools/seekTool.js +1 -1
  101. package/src/tools/staticAnalysisTool.js +1 -1
  102. package/src/tools/taskManagerTool.js +1 -1
  103. package/src/tools/terminalTool.js +1 -1
  104. package/src/tools/webTool.js +1 -1
  105. package/src/types/agent.js +1 -1
  106. package/src/types/contextReference.js +1 -1
  107. package/src/types/conversation.js +1 -1
  108. package/src/types/toolCommand.js +1 -1
  109. package/src/utilities/attachmentValidator.js +1 -1
  110. package/src/utilities/configManager.js +1 -1
  111. package/src/utilities/constants.js +1 -1
  112. package/src/utilities/directoryAccessManager.js +1 -1
  113. package/src/utilities/fileProcessor.js +1 -1
  114. package/src/utilities/logger.js +1 -1
  115. package/src/utilities/tagParser.js +1 -1
  116. package/src/utilities/toolConstants.js +1 -1
  117. package/web-ui/build/index.html +2 -2
  118. package/web-ui/build/static/{index-BzXbDs8z.js → index-CoRE46V-.js} +28 -28
  119. package/web-ui/build/static/index-P281Rusr.css +1 -0
  120. package/web-ui/build/static/index-BmKxmRe3.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.9
102
+ # Should display: Loxia Autopilot One v1.0.10
103
103
  ```
104
104
 
105
105
  ### 4. Create an API Key
@@ -368,7 +368,7 @@ Loxia automatically compacts long conversations to stay within token limits:
368
368
 
369
369
  ## 🛣️ Roadmap
370
370
 
371
- ### Current Version (1.0.9)
371
+ ### Current Version (1.0.10)
372
372
 
373
373
  - ✅ Multi-agent orchestration
374
374
  - ✅ 18+ specialized tools
package/bin/cli.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x69ee2=a0_0x5ce9;function a0_0x5b96(){const _0x3c8e4f=['9527392gPaXVD','SIGINT','env','slice','message','--host','Checking\x20if\x20server\x20is\x20running...','Starting\x20Terminal\x20UI...\x0a','--port','get','\x0aShutting\x20down\x20server...','10314AdswYc','Please\x20open\x20manually:\x20','destroy','node','ceil','catch','version','\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI',')\x0a\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x20message\x0a\x20\x20-v,\x20--version\x20\x20\x20\x20\x20Show\x20version\x20number\x0a\x0aExamples:\x0a\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20open\x20browser\x0a\x20\x20loxia\x20terminal\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Connect\x20Terminal\x20UI\x20to\x20running\x20server\x0a\x20\x20loxia\x20plus-terminal\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a\x20\x20loxia\x20web\x20--port\x203000\x20\x20\x20\x20#\x20Use\x20custom\x20port\x0a\x0aQuick\x20Start:\x0a\x20\x201.\x20Run\x20\x27loxia\x20web\x27\x20to\x20start\x20with\x20Web\x20UI\x0a\x20\x202.\x20Or\x20run\x20\x27loxia\x20plus-terminal\x27\x20for\x20Terminal\x20UI\x20experience\x0a\x0aDocumentation:\x0a\x20\x20https://autopilot.loxia.ai\x0a\x0a','--help','web','length','Waiting\x20for\x20server\x20to\x20start...','199040PhcpBm','argv','Starting\x20Loxia\x20server\x20in\x20background...','help','ignore','528fQyQgH',')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20','LOXIA_HOST','host','src','loxia-terminal.js','start\x20\x22\x22\x20\x22','Server\x20running\x20at\x20','\x20manually.','Server\x20is\x20running\x20at\x20','kill','3389352wsCoax','3470FINleb','utf8','\x0aLoxia\x20Autopilot\x20One\x20v','Error:','statusCode','\x0aServer\x20may\x20still\x20be\x20starting.\x20Open\x20','port','8842824gsVYYq','Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.','4442Hxfoqg','inherit','package.json','--version','includes','toString','422504SGjtCS','\x20-\x20AI\x20Agent\x20System\x0a\x0aUsage:\x0a\x20\x20loxia\x20<command>\x20[options]\x0a\x0aCommands:\x0a\x20\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20+\x20open\x20Web\x20UI\x20in\x20browser\x0a\x20\x20terminal\x20\x20\x20\x20\x20\x20\x20\x20Start\x20Terminal\x20UI\x20(server\x20must\x20be\x20running)\x0a\x20\x20plus-web\x20\x20\x20\x20\x20\x20\x20\x20Alias\x20for\x20\x27web\x27\x0a\x20\x20plus-terminal\x20\x20\x20Start\x20server\x20+\x20Terminal\x20UI\x20together\x0a\x0aOptions:\x0a\x20\x20--port\x20<number>\x20\x20\x20Specify\x20port\x20(default:\x20','675aiPpAM','open\x20\x22','\x0aPlease\x20start\x20the\x20server\x20first:','exit','http://','localhost','parse','SIGTERM','darwin','\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a','platform','Loxia\x20Autopilot\x20One\x20v','Unknown\x20command:\x20','startsWith','error','log'];a0_0x5b96=function(){return _0x3c8e4f;};return a0_0x5b96();}(function(_0x3d1996,_0x3ad00e){const _0x1b329c=a0_0x5ce9,_0x2742c7=_0x3d1996();while(!![]){try{const _0x3dd8c9=parseInt(_0x1b329c(0x1b6))/0x1+-parseInt(_0x1b329c(0x1b0))/0x2*(parseInt(_0x1b329c(0x19b))/0x3)+parseInt(_0x1b329c(0x1a6))/0x4+parseInt(_0x1b329c(0x1a7))/0x5*(-parseInt(_0x1b329c(0x189))/0x6)+-parseInt(_0x1b329c(0x17e))/0x7+parseInt(_0x1b329c(0x1ae))/0x8+-parseInt(_0x1b329c(0x1b8))/0x9*(-parseInt(_0x1b329c(0x196))/0xa);if(_0x3dd8c9===_0x3ad00e)break;else _0x2742c7['push'](_0x2742c7['shift']());}catch(_0x4eb147){_0x2742c7['push'](_0x2742c7['shift']());}}}(a0_0x5b96,0xe15b1));import{fileURLToPath}from'url';import{dirname,join}from'path';import{spawn,exec}from'child_process';import{readFileSync}from'fs';import a0_0x4f5e5a from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x69ee2(0x1bd),SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process[a0_0x69ee2(0x197)][a0_0x69ee2(0x181)](0x2),command=args[0x0]&&!args[0x0][a0_0x69ee2(0x17b)]('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args['includes'](a0_0x69ee2(0x192))||args[a0_0x69ee2(0x1b4)]('-h'),'version':args[a0_0x69ee2(0x1b4)](a0_0x69ee2(0x1b3))||args[a0_0x69ee2(0x1b4)]('-v')};for(let i=0x0;i<args[a0_0x69ee2(0x194)];i++){args[i]===a0_0x69ee2(0x186)&&args[i+0x1]&&(flags[a0_0x69ee2(0x1ad)]=parseInt(args[i+0x1],0xa)),args[i]===a0_0x69ee2(0x183)&&args[i+0x1]&&(flags['host']=args[i+0x1]);}const port=flags[a0_0x69ee2(0x1ad)]||DEFAULT_PORT,host=flags[a0_0x69ee2(0x19e)]||DEFAULT_HOST,serverUrl=a0_0x69ee2(0x1bc)+host+':'+port;if(flags[a0_0x69ee2(0x18f)]){const pkgPath=join(__dirname,'..',a0_0x69ee2(0x1b2)),pkg=JSON[a0_0x69ee2(0x1be)](readFileSync(pkgPath,'utf8'));console[a0_0x69ee2(0x17d)](a0_0x69ee2(0x179)+pkg['version']),process['exit'](0x0);}if(flags[a0_0x69ee2(0x199)]||!command){const pkgPath=join(__dirname,'..',a0_0x69ee2(0x1b2)),pkg=JSON[a0_0x69ee2(0x1be)](readFileSync(pkgPath,a0_0x69ee2(0x1a8)));console['log'](a0_0x69ee2(0x1a9)+pkg[a0_0x69ee2(0x18f)]+a0_0x69ee2(0x1b7)+DEFAULT_PORT+a0_0x69ee2(0x19c)+DEFAULT_HOST+a0_0x69ee2(0x191)),process['exit'](0x0);}async function checkServerRunning(_0x382b4d,_0x5c6e10,_0x3a80a6=0x1){for(let _0x4e14eb=0x0;_0x4e14eb<_0x3a80a6;_0x4e14eb++){const _0x37b16f=await new Promise(_0x206c1e=>{const _0x266dd5=a0_0x5ce9,_0x54f5f0=a0_0x4f5e5a[_0x266dd5(0x187)]('http://'+_0x382b4d+':'+_0x5c6e10+'/api/health',_0x49a55e=>{const _0x31ba4c=_0x266dd5;_0x206c1e(_0x49a55e[_0x31ba4c(0x1ab)]===0xc8);});_0x54f5f0['on']('error',()=>_0x206c1e(![])),_0x54f5f0['setTimeout'](0x7d0,()=>{const _0x26dfb2=_0x266dd5;_0x54f5f0[_0x26dfb2(0x18b)](),_0x206c1e(![]);});});if(_0x37b16f)return!![];_0x4e14eb<_0x3a80a6-0x1&&await new Promise(_0x38892d=>setTimeout(_0x38892d,SERVER_CHECK_INTERVAL));}return![];}async function waitForServer(_0x2cf549,_0x3a2f13,_0x19d470=SERVER_STARTUP_TIMEOUT){const _0xbf2048=a0_0x69ee2,_0x509960=Math[_0xbf2048(0x18d)](_0x19d470/SERVER_CHECK_INTERVAL);return checkServerRunning(_0x2cf549,_0x3a2f13,_0x509960);}function openBrowser(_0x3593de){const _0x3be758=a0_0x69ee2,_0x3f97b5=process[_0x3be758(0x178)];let _0x5ac456;if(_0x3f97b5===_0x3be758(0x1c0))_0x5ac456=_0x3be758(0x1b9)+_0x3593de+'\x22';else _0x3f97b5==='win32'?_0x5ac456=_0x3be758(0x1a1)+_0x3593de+'\x22':_0x5ac456='xdg-open\x20\x22'+_0x3593de+'\x22';exec(_0x5ac456,_0x59645d=>{const _0x634c51=_0x3be758;_0x59645d&&(console[_0x634c51(0x17d)]('Could\x20not\x20open\x20browser\x20automatically.'),console['log'](_0x634c51(0x18a)+_0x3593de));});}function startServer(_0x417ad6=![]){const _0x4b9167=a0_0x69ee2,_0x16e2ff={...process[_0x4b9167(0x180)],'LOXIA_PORT':port[_0x4b9167(0x1b5)](),'PORT':port[_0x4b9167(0x1b5)]()};flags['host']&&(_0x16e2ff[_0x4b9167(0x19d)]=flags[_0x4b9167(0x19e)]);const _0x47cbb7=join(__dirname,'..',_0x4b9167(0x19f),'index.js'),_0x54bc1a=spawn(_0x4b9167(0x18c),[_0x47cbb7],{'cwd':join(__dirname,'..'),'env':_0x16e2ff,'stdio':_0x417ad6?['ignore',_0x4b9167(0x19a),'ignore']:_0x4b9167(0x1b1),'detached':_0x417ad6});return _0x417ad6&&_0x54bc1a['unref'](),_0x54bc1a;}function startTerminalUI(){const _0x5cebe=a0_0x69ee2,_0x484cb5=join(__dirname,_0x5cebe(0x1a0)),_0x5681a8={...process[_0x5cebe(0x180)],'LOXIA_PORT':port[_0x5cebe(0x1b5)](),'LOXIA_HOST':host},_0x5eeab8=spawn(_0x5cebe(0x18c),[_0x484cb5],{'cwd':join(__dirname,'..'),'env':_0x5681a8,'stdio':_0x5cebe(0x1b1)});return _0x5eeab8;}function a0_0x5ce9(_0x23cead,_0x3d53ba){_0x23cead=_0x23cead-0x177;const _0x5b9688=a0_0x5b96();let _0x5ce9ec=_0x5b9688[_0x23cead];return _0x5ce9ec;}const commands={'web':async()=>{const _0x53e5ea=a0_0x69ee2;console[_0x53e5ea(0x17d)]('Starting\x20Loxia\x20server...\x0a');const _0x3dc05d=startServer(![]);console[_0x53e5ea(0x17d)](_0x53e5ea(0x195));const _0x437049=await waitForServer(host,port);_0x437049?(console[_0x53e5ea(0x17d)]('\x0aOpening\x20Web\x20UI\x20at\x20'+serverUrl),openBrowser(serverUrl)):console[_0x53e5ea(0x17d)](_0x53e5ea(0x1ac)+serverUrl+_0x53e5ea(0x1a3)),process['on'](_0x53e5ea(0x17f),()=>_0x3dc05d['kill']('SIGINT')),process['on'](_0x53e5ea(0x1bf),()=>_0x3dc05d[_0x53e5ea(0x1a5)](_0x53e5ea(0x1bf))),_0x3dc05d['on'](_0x53e5ea(0x1bb),_0x2b0d57=>process[_0x53e5ea(0x1bb)](_0x2b0d57||0x0));},'plus-web':async()=>{const _0x174320=a0_0x69ee2;await commands[_0x174320(0x193)]();},'terminal':async()=>{const _0x161468=a0_0x69ee2;console[_0x161468(0x17d)](_0x161468(0x184));const _0x14c292=await checkServerRunning(host,port);!_0x14c292&&(console[_0x161468(0x17c)]('\x0aServer\x20is\x20not\x20running\x20at\x20'+serverUrl),console[_0x161468(0x17c)](_0x161468(0x1ba)),console[_0x161468(0x17c)](_0x161468(0x190)),console[_0x161468(0x17c)](_0x161468(0x177)),process[_0x161468(0x1bb)](0x1));console[_0x161468(0x17d)](_0x161468(0x1a4)+serverUrl),console[_0x161468(0x17d)]('Starting\x20Terminal\x20UI...\x0a');const _0x3dd914=startTerminalUI();process['on'](_0x161468(0x17f),()=>_0x3dd914[_0x161468(0x1a5)](_0x161468(0x17f))),process['on'](_0x161468(0x1bf),()=>_0x3dd914[_0x161468(0x1a5)](_0x161468(0x1bf))),_0x3dd914['on']('exit',_0x314cbf=>process[_0x161468(0x1bb)](_0x314cbf||0x0));},'plus-terminal':async()=>{const _0x1e6af5=a0_0x69ee2;console[_0x1e6af5(0x17d)](_0x1e6af5(0x198));const _0x19d4f2=startServer(!![]),_0x1a603b=await waitForServer(host,port);!_0x1a603b&&(console[_0x1e6af5(0x17c)]('\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.'),process[_0x1e6af5(0x1bb)](0x1));console['log'](_0x1e6af5(0x1a2)+serverUrl),console['log'](_0x1e6af5(0x185));const _0x35b02e=startTerminalUI();_0x35b02e['on']('exit',_0x5903df=>{const _0x4718af=_0x1e6af5;console[_0x4718af(0x17d)](_0x4718af(0x188));try{process[_0x4718af(0x1a5)](_0x19d4f2['pid'],'SIGTERM');}catch(_0x591db9){}process['exit'](_0x5903df||0x0);}),process['on'](_0x1e6af5(0x17f),()=>{_0x35b02e['kill']('SIGINT');}),process['on'](_0x1e6af5(0x1bf),()=>{const _0x2ff1c0=_0x1e6af5;_0x35b02e[_0x2ff1c0(0x1a5)](_0x2ff1c0(0x1bf));});}};commands[command]?commands[command]()[a0_0x69ee2(0x18e)](_0x40780e=>{const _0x4c642c=a0_0x69ee2;console[_0x4c642c(0x17c)](_0x4c642c(0x1aa),_0x40780e[_0x4c642c(0x182)]),process['exit'](0x1);}):(console['error'](a0_0x69ee2(0x17a)+command),console['error'](a0_0x69ee2(0x1af)),process['exit'](0x1));
3
+ const a0_0x121421=a0_0x533d;(function(_0x2bd853,_0x4dd01d){const _0x17aba0=a0_0x533d,_0x5da70f=_0x2bd853();while(!![]){try{const _0x5074cb=-parseInt(_0x17aba0(0xb3))/0x1+-parseInt(_0x17aba0(0x98))/0x2+-parseInt(_0x17aba0(0x9c))/0x3+-parseInt(_0x17aba0(0xa5))/0x4*(parseInt(_0x17aba0(0xb1))/0x5)+parseInt(_0x17aba0(0xaa))/0x6+-parseInt(_0x17aba0(0xc0))/0x7*(parseInt(_0x17aba0(0x8b))/0x8)+-parseInt(_0x17aba0(0xc3))/0x9*(-parseInt(_0x17aba0(0x95))/0xa);if(_0x5074cb===_0x4dd01d)break;else _0x5da70f['push'](_0x5da70f['shift']());}catch(_0x3a9de5){_0x5da70f['push'](_0x5da70f['shift']());}}}(a0_0x2668,0x5f60d));import{fileURLToPath}from'url';function a0_0x2668(){const _0x470a03=['1185050tECZhJ','Please\x20open\x20manually:\x20','startsWith','win32','2302812CbhFql','ignore','Loxia\x20Autopilot\x20One\x20v','\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.','log','port','kill','Waiting\x20for\x20server\x20to\x20start...','Checking\x20if\x20server\x20is\x20running...','523372yGTqcJ','\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI','version','SIGINT','destroy','3766686OpIvmg','env','argv','exit','xdg-open\x20\x22','length','ceil','15nFKBKP','utf8','237655hEvvBr','Error:','\x0aOpening\x20Web\x20UI\x20at\x20','Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.','localhost','Server\x20is\x20running\x20at\x20','start\x20\x22\x22\x20\x22','Starting\x20Loxia\x20server...\x0a','pid','parse','\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a','includes','setTimeout','497469RUsaeC','--host','\x0aServer\x20may\x20still\x20be\x20starting.\x20Open\x20','414awqIjQ','help',')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20','darwin','Starting\x20Loxia\x20server\x20in\x20background...','toString','loxia-terminal.js','unref','\x0aPlease\x20start\x20the\x20server\x20first:','catch','Starting\x20Terminal\x20UI...\x0a','8MFkhWt','inherit','SIGTERM','host',')\x0a\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x20message\x0a\x20\x20-v,\x20--version\x20\x20\x20\x20\x20Show\x20version\x20number\x0a\x0aExamples:\x0a\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20open\x20browser\x0a\x20\x20loxia\x20terminal\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Connect\x20Terminal\x20UI\x20to\x20running\x20server\x0a\x20\x20loxia\x20plus-terminal\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a\x20\x20loxia\x20web\x20--port\x203000\x20\x20\x20\x20#\x20Use\x20custom\x20port\x0a\x0aQuick\x20Start:\x0a\x20\x201.\x20Run\x20\x27loxia\x20web\x27\x20to\x20start\x20with\x20Web\x20UI\x0a\x20\x202.\x20Or\x20run\x20\x27loxia\x20plus-terminal\x27\x20for\x20Terminal\x20UI\x20experience\x0a\x0aDocumentation:\x0a\x20\x20https://autopilot.loxia.ai\x0a\x0a','--version','\x0aShutting\x20down\x20server...','error','\x20manually.','--help','396580cTKqyb','package.json','\x20-\x20AI\x20Agent\x20System\x0a\x0aUsage:\x0a\x20\x20loxia\x20<command>\x20[options]\x0a\x0aCommands:\x0a\x20\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20+\x20open\x20Web\x20UI\x20in\x20browser\x0a\x20\x20terminal\x20\x20\x20\x20\x20\x20\x20\x20Start\x20Terminal\x20UI\x20(server\x20must\x20be\x20running)\x0a\x20\x20plus-web\x20\x20\x20\x20\x20\x20\x20\x20Alias\x20for\x20\x27web\x27\x0a\x20\x20plus-terminal\x20\x20\x20Start\x20server\x20+\x20Terminal\x20UI\x20together\x0a\x0aOptions:\x0a\x20\x20--port\x20<number>\x20\x20\x20Specify\x20port\x20(default:\x20'];a0_0x2668=function(){return _0x470a03;};return a0_0x2668();}import{dirname,join}from'path';import{spawn,exec}from'child_process';import{readFileSync}from'fs';import a0_0x1805c9 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x121421(0xb7),SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process[a0_0x121421(0xac)]['slice'](0x2),command=args[0x0]&&!args[0x0][a0_0x121421(0x9a)]('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args[a0_0x121421(0xbe)](a0_0x121421(0x94))||args[a0_0x121421(0xbe)]('-h'),'version':args[a0_0x121421(0xbe)](a0_0x121421(0x90))||args[a0_0x121421(0xbe)]('-v')};for(let i=0x0;i<args[a0_0x121421(0xaf)];i++){args[i]==='--port'&&args[i+0x1]&&(flags[a0_0x121421(0xa1)]=parseInt(args[i+0x1],0xa)),args[i]===a0_0x121421(0xc1)&&args[i+0x1]&&(flags['host']=args[i+0x1]);}function a0_0x533d(_0x4a6df9,_0xe35a22){_0x4a6df9=_0x4a6df9-0x83;const _0x2668df=a0_0x2668();let _0x533d7f=_0x2668df[_0x4a6df9];return _0x533d7f;}const port=flags[a0_0x121421(0xa1)]||DEFAULT_PORT,host=flags[a0_0x121421(0x8e)]||DEFAULT_HOST,serverUrl='http://'+host+':'+port;if(flags[a0_0x121421(0xa7)]){const pkgPath=join(__dirname,'..','package.json'),pkg=JSON[a0_0x121421(0xbc)](readFileSync(pkgPath,a0_0x121421(0xb2)));console['log'](a0_0x121421(0x9e)+pkg[a0_0x121421(0xa7)]),process['exit'](0x0);}if(flags[a0_0x121421(0xc4)]||!command){const pkgPath=join(__dirname,'..',a0_0x121421(0x96)),pkg=JSON[a0_0x121421(0xbc)](readFileSync(pkgPath,a0_0x121421(0xb2)));console[a0_0x121421(0xa0)]('\x0aLoxia\x20Autopilot\x20One\x20v'+pkg[a0_0x121421(0xa7)]+a0_0x121421(0x97)+DEFAULT_PORT+a0_0x121421(0xc5)+DEFAULT_HOST+a0_0x121421(0x8f)),process[a0_0x121421(0xad)](0x0);}async function checkServerRunning(_0xafbbc9,_0x290101,_0x3bad71=0x1){for(let _0x4eb6ea=0x0;_0x4eb6ea<_0x3bad71;_0x4eb6ea++){const _0x4f5050=await new Promise(_0x66b4f1=>{const _0x4fbbdb=a0_0x533d,_0x50ffbb=a0_0x1805c9['get']('http://'+_0xafbbc9+':'+_0x290101+'/api/health',_0x27b858=>{_0x66b4f1(_0x27b858['statusCode']===0xc8);});_0x50ffbb['on'](_0x4fbbdb(0x92),()=>_0x66b4f1(![])),_0x50ffbb[_0x4fbbdb(0xbf)](0x7d0,()=>{const _0xb1b894=_0x4fbbdb;_0x50ffbb[_0xb1b894(0xa9)](),_0x66b4f1(![]);});});if(_0x4f5050)return!![];_0x4eb6ea<_0x3bad71-0x1&&await new Promise(_0x137aa6=>setTimeout(_0x137aa6,SERVER_CHECK_INTERVAL));}return![];}async function waitForServer(_0x1b6be9,_0x3c27b2,_0x361439=SERVER_STARTUP_TIMEOUT){const _0xa02673=a0_0x121421,_0x477994=Math[_0xa02673(0xb0)](_0x361439/SERVER_CHECK_INTERVAL);return checkServerRunning(_0x1b6be9,_0x3c27b2,_0x477994);}function openBrowser(_0x3becef){const _0x5c299d=a0_0x121421,_0x15ec12=process['platform'];let _0x928030;if(_0x15ec12===_0x5c299d(0x83))_0x928030='open\x20\x22'+_0x3becef+'\x22';else _0x15ec12===_0x5c299d(0x9b)?_0x928030=_0x5c299d(0xb9)+_0x3becef+'\x22':_0x928030=_0x5c299d(0xae)+_0x3becef+'\x22';exec(_0x928030,_0x414f50=>{const _0x120875=_0x5c299d;_0x414f50&&(console[_0x120875(0xa0)]('Could\x20not\x20open\x20browser\x20automatically.'),console['log'](_0x120875(0x99)+_0x3becef));});}function startServer(_0x208e3e=![]){const _0x4ac1e2=a0_0x121421,_0x40f758={...process[_0x4ac1e2(0xab)],'LOXIA_PORT':port[_0x4ac1e2(0x85)](),'PORT':port[_0x4ac1e2(0x85)]()};flags[_0x4ac1e2(0x8e)]&&(_0x40f758['LOXIA_HOST']=flags['host']);const _0x516cc5=join(__dirname,'..','src','index.js'),_0x238ee3=spawn('node',[_0x516cc5],{'cwd':join(__dirname,'..'),'env':_0x40f758,'stdio':_0x208e3e?[_0x4ac1e2(0x9d),_0x4ac1e2(0x9d),_0x4ac1e2(0x9d)]:_0x4ac1e2(0x8c),'detached':_0x208e3e});return _0x208e3e&&_0x238ee3[_0x4ac1e2(0x87)](),_0x238ee3;}function startTerminalUI(){const _0x53012=a0_0x121421,_0x25735f=join(__dirname,_0x53012(0x86)),_0x4960c7={...process[_0x53012(0xab)],'LOXIA_PORT':port['toString'](),'LOXIA_HOST':host},_0x20a1d1=spawn('node',[_0x25735f],{'cwd':join(__dirname,'..'),'env':_0x4960c7,'stdio':_0x53012(0x8c)});return _0x20a1d1;}const commands={'web':async()=>{const _0x2003c0=a0_0x121421;console['log'](_0x2003c0(0xba));const _0x49917b=startServer(![]);console[_0x2003c0(0xa0)](_0x2003c0(0xa3));const _0x47f7a0=await waitForServer(host,port);_0x47f7a0?(console[_0x2003c0(0xa0)](_0x2003c0(0xb5)+serverUrl),openBrowser(serverUrl)):console[_0x2003c0(0xa0)](_0x2003c0(0xc2)+serverUrl+_0x2003c0(0x93)),process['on'](_0x2003c0(0xa8),()=>_0x49917b[_0x2003c0(0xa2)](_0x2003c0(0xa8))),process['on'](_0x2003c0(0x8d),()=>_0x49917b['kill']('SIGTERM')),_0x49917b['on'](_0x2003c0(0xad),_0x42ab96=>process[_0x2003c0(0xad)](_0x42ab96||0x0));},'plus-web':async()=>{await commands['web']();},'terminal':async()=>{const _0x2777bb=a0_0x121421;console[_0x2777bb(0xa0)](_0x2777bb(0xa4));const _0x55448d=await checkServerRunning(host,port);!_0x55448d&&(console[_0x2777bb(0x92)]('\x0aServer\x20is\x20not\x20running\x20at\x20'+serverUrl),console[_0x2777bb(0x92)](_0x2777bb(0x88)),console['error'](_0x2777bb(0xa6)),console[_0x2777bb(0x92)](_0x2777bb(0xbd)),process[_0x2777bb(0xad)](0x1));console['log'](_0x2777bb(0xb8)+serverUrl),console[_0x2777bb(0xa0)](_0x2777bb(0x8a));const _0x103323=startTerminalUI();process['on']('SIGINT',()=>_0x103323[_0x2777bb(0xa2)]('SIGINT')),process['on'](_0x2777bb(0x8d),()=>_0x103323['kill'](_0x2777bb(0x8d))),_0x103323['on']('exit',_0x41590f=>process[_0x2777bb(0xad)](_0x41590f||0x0));},'plus-terminal':async()=>{const _0x28492d=a0_0x121421;console[_0x28492d(0xa0)](_0x28492d(0x84));const _0x51140a=startServer(!![]),_0x5727db=await waitForServer(host,port);!_0x5727db&&(console[_0x28492d(0x92)](_0x28492d(0x9f)),process[_0x28492d(0xad)](0x1));console[_0x28492d(0xa0)]('Server\x20running\x20at\x20'+serverUrl),console[_0x28492d(0xa0)](_0x28492d(0x8a));const _0x2e1c83=startTerminalUI();_0x2e1c83['on']('exit',_0x494a7c=>{const _0x208c18=_0x28492d;console[_0x208c18(0xa0)](_0x208c18(0x91));try{process['kill'](_0x51140a[_0x208c18(0xbb)],'SIGTERM');}catch(_0x57f5da){}process[_0x208c18(0xad)](_0x494a7c||0x0);}),process['on'](_0x28492d(0xa8),()=>{const _0x4c3a1f=_0x28492d;_0x2e1c83['kill'](_0x4c3a1f(0xa8));}),process['on'](_0x28492d(0x8d),()=>{const _0x30b9db=_0x28492d;_0x2e1c83['kill'](_0x30b9db(0x8d));});}};commands[command]?commands[command]()[a0_0x121421(0x89)](_0x154dcb=>{const _0x4b3af7=a0_0x121421;console['error'](_0x4b3af7(0xb4),_0x154dcb['message']),process[_0x4b3af7(0xad)](0x1);}):(console[a0_0x121421(0x92)]('Unknown\x20command:\x20'+command),console[a0_0x121421(0x92)](a0_0x121421(0xb6)),process[a0_0x121421(0xad)](0x1));
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x1b0204=a0_0x2509;(function(_0x122913,_0x5a24ef){const _0x4204d8=a0_0x2509,_0x59cafb=_0x122913();while(!![]){try{const _0x533359=parseInt(_0x4204d8(0x1f6))/0x1*(parseInt(_0x4204d8(0x1fc))/0x2)+parseInt(_0x4204d8(0x1ee))/0x3+parseInt(_0x4204d8(0x1f9))/0x4*(parseInt(_0x4204d8(0x1f7))/0x5)+-parseInt(_0x4204d8(0x1ff))/0x6*(parseInt(_0x4204d8(0x1f2))/0x7)+parseInt(_0x4204d8(0x1f8))/0x8+-parseInt(_0x4204d8(0x1d4))/0x9*(-parseInt(_0x4204d8(0x1db))/0xa)+-parseInt(_0x4204d8(0x1fa))/0xb;if(_0x533359===_0x5a24ef)break;else _0x59cafb['push'](_0x59cafb['shift']());}catch(_0xf01e37){_0x59cafb['push'](_0x59cafb['shift']());}}}(a0_0x55da,0x6330d));import{spawn}from'child_process';import a0_0x5ed915 from'net';function a0_0x2509(_0x1b2660,_0x3cb548){_0x1b2660=_0x1b2660-0x1ce;const _0x55da63=a0_0x55da();let _0x2509f9=_0x55da63[_0x1b2660];return _0x2509f9;}import a0_0x1a8ee0 from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=a0_0x1a8ee0[a0_0x1b0204(0x1fb)](__filename),projectRoot=a0_0x1a8ee0['dirname'](__dirname),DEFAULT_PORT=0x1f90,DEFAULT_HOST='localhost',SERVER_STARTUP_TIMEOUT=0x2710;async function isServerRunning(_0x2a2ec2,_0x7a8725){return new Promise(_0x51ab20=>{const _0x16aaa8=a0_0x2509,_0x55781b=new a0_0x5ed915[(_0x16aaa8(0x1d7))]();_0x55781b['setTimeout'](0x7d0),_0x55781b['on'](_0x16aaa8(0x1df),()=>{const _0x55bcec=_0x16aaa8;_0x55781b[_0x55bcec(0x1dd)](),_0x51ab20(!![]);}),_0x55781b['on']('timeout',()=>{_0x55781b['destroy'](),_0x51ab20(![]);}),_0x55781b['on']('error',()=>{_0x55781b['destroy'](),_0x51ab20(![]);}),_0x55781b[_0x16aaa8(0x1df)](_0x7a8725,_0x2a2ec2);});}async function startServer(_0x9baba8,_0x271e96){const _0x405888=a0_0x1b0204;return console[_0x405888(0x1ec)](_0x405888(0x1d8)),new Promise((_0x4de3fe,_0x3c6069)=>{const _0x37e407=_0x405888,_0x47ee6e=spawn('node',[a0_0x1a8ee0[_0x37e407(0x1ce)](projectRoot,_0x37e407(0x1f3)),_0x37e407(0x1e8),_0x37e407(0x1f1),_0x37e407(0x1f0),_0x9baba8,_0x37e407(0x1da),_0x271e96[_0x37e407(0x1cf)]()],{'detached':![],'stdio':[_0x37e407(0x1e1),_0x37e407(0x1e7),_0x37e407(0x1e7)]});_0x47ee6e[_0x37e407(0x1d5)]['on']('data',()=>{}),_0x47ee6e[_0x37e407(0x1e4)]['on']('data',()=>{}),_0x47ee6e['on']('error',_0x4af05e=>{const _0x1692e4=_0x37e407;console[_0x1692e4(0x1e5)](_0x1692e4(0x1e9),_0x4af05e['message']),_0x3c6069(_0x4af05e);});const _0x3f4929=Date[_0x37e407(0x1ed)](),_0x4fe447=setInterval(async()=>{const _0x46541b=_0x37e407,_0x322c2c=await isServerRunning(_0x9baba8,_0x271e96);if(_0x322c2c)clearInterval(_0x4fe447),console[_0x46541b(0x1ec)](_0x46541b(0x1e0)+_0x9baba8+':'+_0x271e96),_0x4de3fe();else Date['now']()-_0x3f4929>SERVER_STARTUP_TIMEOUT&&(clearInterval(_0x4fe447),_0x47ee6e[_0x46541b(0x1de)](),_0x3c6069(new Error('Server\x20startup\x20timeout')));},0x1f4);});}function a0_0x55da(){const _0x42668f=['\x20\x20\x201.\x20Make\x20sure\x20no\x20other\x20process\x20is\x20using\x20port\x208080','--host','web','3396533jEBYQl','bin/cli.js','length','...','437259iXhXWX','245viEYzn','5298592HGiFlK','64472mnkSql','14864674gzKNMF','dirname','2LMVYdd','💡\x20Troubleshooting:','LOXIA_PORT','6UGzwmY','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','join','toString','slice','🎨\x20Launching\x20Ink-based\x20Terminal\x20UI...','🔍\x20Checking\x20if\x20server\x20is\x20running\x20at\x20','env','9KWRQGG','stdout','✗\x20Server\x20is\x20not\x20running','Socket','🚀\x20Starting\x20Loxia\x20server...','❌\x20Failed\x20to\x20start\x20Terminal\x20UI:','--port','1046620KIuTeE','✓\x20Server\x20is\x20already\x20running\x20at\x20','destroy','kill','connect','✓\x20Server\x20started\x20at\x20','ignore','\x20\x20Loxia\x20Autopilot\x20One\x20-\x20Terminal\x20UI','\x20\x20\x202.\x20Try\x20running\x20the\x20server\x20manually:\x20node\x20bin/cli.js','stderr','error','argv','pipe','--ui','Failed\x20to\x20start\x20server:','LOXIA_HOST','../src/interfaces/terminal/index.js','log','now','746433UuWggx'];a0_0x55da=function(){return _0x42668f;};return a0_0x55da();}async function main(){const _0x2da930=a0_0x1b0204;try{console[_0x2da930(0x1ec)](_0x2da930(0x200)),console[_0x2da930(0x1ec)](_0x2da930(0x1e2)),console['log'](_0x2da930(0x200)),console[_0x2da930(0x1ec)]('');const _0x72fad4=process[_0x2da930(0x1e6)][_0x2da930(0x1d0)](0x2);let _0x1b77c2=DEFAULT_HOST,_0x5ad80a=DEFAULT_PORT;for(let _0x3adf6b=0x0;_0x3adf6b<_0x72fad4[_0x2da930(0x1f4)];_0x3adf6b++){if(_0x72fad4[_0x3adf6b]===_0x2da930(0x1f0)&&_0x72fad4[_0x3adf6b+0x1])_0x1b77c2=_0x72fad4[_0x3adf6b+0x1],_0x3adf6b++;else _0x72fad4[_0x3adf6b]===_0x2da930(0x1da)&&_0x72fad4[_0x3adf6b+0x1]&&(_0x5ad80a=parseInt(_0x72fad4[_0x3adf6b+0x1],0xa),_0x3adf6b++);}console[_0x2da930(0x1ec)](_0x2da930(0x1d2)+_0x1b77c2+':'+_0x5ad80a+_0x2da930(0x1f5));const _0x1aa20c=await isServerRunning(_0x1b77c2,_0x5ad80a);!_0x1aa20c?(console['log'](_0x2da930(0x1d6)),await startServer(_0x1b77c2,_0x5ad80a)):console['log'](_0x2da930(0x1dc)+_0x1b77c2+':'+_0x5ad80a),console[_0x2da930(0x1ec)](''),console[_0x2da930(0x1ec)](_0x2da930(0x1d1)),console[_0x2da930(0x1ec)](''),await new Promise(_0x32f49f=>setTimeout(_0x32f49f,0x1f4)),process[_0x2da930(0x1d3)][_0x2da930(0x1ea)]=_0x1b77c2,process[_0x2da930(0x1d3)][_0x2da930(0x1fe)]=_0x5ad80a['toString'](),await import(_0x2da930(0x1eb));}catch(_0x5db738){console['error'](''),console['error'](_0x2da930(0x1d9)),console[_0x2da930(0x1e5)]('\x20\x20',_0x5db738['message']),console[_0x2da930(0x1e5)](''),console[_0x2da930(0x1e5)](_0x2da930(0x1fd)),console['error'](_0x2da930(0x1ef)),console[_0x2da930(0x1e5)](_0x2da930(0x1e3)),console[_0x2da930(0x1e5)]('\x20\x20\x203.\x20Check\x20logs\x20for\x20more\x20details'),console[_0x2da930(0x1e5)](''),process['exit'](0x1);}}main();
3
+ function a0_0x586c(_0x55c1e0,_0x393858){_0x55c1e0=_0x55c1e0-0xcd;const _0x384c04=a0_0x384c();let _0x586cb5=_0x384c04[_0x55c1e0];return _0x586cb5;}const a0_0x1ce17a=a0_0x586c;function a0_0x384c(){const _0x387b44=['web','923840PxkKiv','length','✗\x20Server\x20is\x20not\x20running','LOXIA_HOST','321UmhLMs','connect','data','\x20\x20\x203.\x20Check\x20logs\x20for\x20more\x20details','exit','now','106393XmYYwn','--ui','LOXIA_PORT','Failed\x20to\x20start\x20server:','🚀\x20Starting\x20Loxia\x20server...','env','destroy','7GoQHyq','💡\x20Troubleshooting:','545940ePPZkj','slice','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','🎨\x20Launching\x20Ink-based\x20Terminal\x20UI...','error','✓\x20Server\x20started\x20at\x20','localhost','pipe','1737012WVmpWT','🔍\x20Checking\x20if\x20server\x20is\x20running\x20at\x20','\x20\x20Loxia\x20Autopilot\x20One\x20-\x20Terminal\x20UI','--port','toString','--host','5960448JScaaS','1818vvODZb','message','stderr','log','setTimeout','../src/interfaces/terminal/index.js','\x20\x20\x202.\x20Try\x20running\x20the\x20server\x20manually:\x20node\x20bin/cli.js','❌\x20Failed\x20to\x20start\x20Terminal\x20UI:','bin/cli.js','timeout','Socket','1186520cVclpi','kill'];a0_0x384c=function(){return _0x387b44;};return a0_0x384c();}(function(_0x319fc1,_0x3484c7){const _0x4a8c21=a0_0x586c,_0x138553=_0x319fc1();while(!![]){try{const _0x5aaad8=-parseInt(_0x4a8c21(0xd0))/0x1+-parseInt(_0x4a8c21(0xe8))/0x2*(parseInt(_0x4a8c21(0xfa))/0x3)+-parseInt(_0x4a8c21(0xd9))/0x4+parseInt(_0x4a8c21(0xf3))/0x5+-parseInt(_0x4a8c21(0xe1))/0x6+parseInt(_0x4a8c21(0xd7))/0x7*(-parseInt(_0x4a8c21(0xf6))/0x8)+parseInt(_0x4a8c21(0xe7))/0x9;if(_0x5aaad8===_0x3484c7)break;else _0x138553['push'](_0x138553['shift']());}catch(_0x42d6ac){_0x138553['push'](_0x138553['shift']());}}}(a0_0x384c,0x25b55));import{spawn}from'child_process';import a0_0x56009c from'net';import a0_0x8da3fc from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=a0_0x8da3fc['dirname'](__filename),projectRoot=a0_0x8da3fc['dirname'](__dirname),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x1ce17a(0xdf),SERVER_STARTUP_TIMEOUT=0x2710;async function isServerRunning(_0x3ed3ac,_0x5bb33a){return new Promise(_0x5d493e=>{const _0x3d0209=a0_0x586c,_0x22aada=new a0_0x56009c[(_0x3d0209(0xf2))]();_0x22aada[_0x3d0209(0xec)](0x7d0),_0x22aada['on']('connect',()=>{const _0xe5e5cb=_0x3d0209;_0x22aada[_0xe5e5cb(0xd6)](),_0x5d493e(!![]);}),_0x22aada['on'](_0x3d0209(0xf1),()=>{const _0x23f15a=_0x3d0209;_0x22aada[_0x23f15a(0xd6)](),_0x5d493e(![]);}),_0x22aada['on'](_0x3d0209(0xdd),()=>{const _0x47e350=_0x3d0209;_0x22aada[_0x47e350(0xd6)](),_0x5d493e(![]);}),_0x22aada[_0x3d0209(0xfb)](_0x5bb33a,_0x3ed3ac);});}async function startServer(_0x363ae3,_0x529456){const _0x15dd02=a0_0x1ce17a;return console['log'](_0x15dd02(0xd4)),new Promise((_0x362c2c,_0x2375a4)=>{const _0x1bece5=_0x15dd02,_0x5c9b29=spawn('node',[a0_0x8da3fc['join'](projectRoot,_0x1bece5(0xf0)),_0x1bece5(0xd1),_0x1bece5(0xf5),_0x1bece5(0xe6),_0x363ae3,_0x1bece5(0xe4),_0x529456[_0x1bece5(0xe5)]()],{'detached':![],'stdio':['ignore',_0x1bece5(0xe0),'pipe']});_0x5c9b29['stdout']['on'](_0x1bece5(0xfc),()=>{}),_0x5c9b29[_0x1bece5(0xea)]['on']('data',()=>{}),_0x5c9b29['on'](_0x1bece5(0xdd),_0x5bc133=>{const _0x472b2b=_0x1bece5;console[_0x472b2b(0xdd)](_0x472b2b(0xd3),_0x5bc133[_0x472b2b(0xe9)]),_0x2375a4(_0x5bc133);});const _0xa7d85b=Date[_0x1bece5(0xcf)](),_0x2158b5=setInterval(async()=>{const _0x4d7fe7=_0x1bece5,_0x4c2a5e=await isServerRunning(_0x363ae3,_0x529456);if(_0x4c2a5e)clearInterval(_0x2158b5),console[_0x4d7fe7(0xeb)](_0x4d7fe7(0xde)+_0x363ae3+':'+_0x529456),_0x362c2c();else Date[_0x4d7fe7(0xcf)]()-_0xa7d85b>SERVER_STARTUP_TIMEOUT&&(clearInterval(_0x2158b5),_0x5c9b29[_0x4d7fe7(0xf4)](),_0x2375a4(new Error('Server\x20startup\x20timeout')));},0x1f4);});}async function main(){const _0x2e2d35=a0_0x1ce17a;try{console['log'](_0x2e2d35(0xdb)),console[_0x2e2d35(0xeb)](_0x2e2d35(0xe3)),console[_0x2e2d35(0xeb)](_0x2e2d35(0xdb)),console[_0x2e2d35(0xeb)]('');const _0x276ae4=process['argv'][_0x2e2d35(0xda)](0x2);let _0x583436=DEFAULT_HOST,_0xbd1154=DEFAULT_PORT;for(let _0x57c852=0x0;_0x57c852<_0x276ae4[_0x2e2d35(0xf7)];_0x57c852++){if(_0x276ae4[_0x57c852]===_0x2e2d35(0xe6)&&_0x276ae4[_0x57c852+0x1])_0x583436=_0x276ae4[_0x57c852+0x1],_0x57c852++;else _0x276ae4[_0x57c852]===_0x2e2d35(0xe4)&&_0x276ae4[_0x57c852+0x1]&&(_0xbd1154=parseInt(_0x276ae4[_0x57c852+0x1],0xa),_0x57c852++);}console[_0x2e2d35(0xeb)](_0x2e2d35(0xe2)+_0x583436+':'+_0xbd1154+'...');const _0x3d1b58=await isServerRunning(_0x583436,_0xbd1154);!_0x3d1b58?(console['log'](_0x2e2d35(0xf8)),await startServer(_0x583436,_0xbd1154)):console['log']('✓\x20Server\x20is\x20already\x20running\x20at\x20'+_0x583436+':'+_0xbd1154),console[_0x2e2d35(0xeb)](''),console[_0x2e2d35(0xeb)](_0x2e2d35(0xdc)),console['log'](''),await new Promise(_0x2495c1=>setTimeout(_0x2495c1,0x1f4)),process[_0x2e2d35(0xd5)][_0x2e2d35(0xf9)]=_0x583436,process[_0x2e2d35(0xd5)][_0x2e2d35(0xd2)]=_0xbd1154[_0x2e2d35(0xe5)](),await import(_0x2e2d35(0xed));}catch(_0x234179){console[_0x2e2d35(0xdd)](''),console[_0x2e2d35(0xdd)](_0x2e2d35(0xef)),console['error']('\x20\x20',_0x234179[_0x2e2d35(0xe9)]),console[_0x2e2d35(0xdd)](''),console['error'](_0x2e2d35(0xd8)),console['error']('\x20\x20\x201.\x20Make\x20sure\x20no\x20other\x20process\x20is\x20using\x20port\x208080'),console['error'](_0x2e2d35(0xee)),console[_0x2e2d35(0xdd)](_0x2e2d35(0xcd)),console[_0x2e2d35(0xdd)](''),process[_0x2e2d35(0xce)](0x1);}}main();
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x3130d8=a0_0x14e4;(function(_0x5b92af,_0x28dc8e){const _0x138159=a0_0x14e4,_0x302392=_0x5b92af();while(!![]){try{const _0x5e9a86=parseInt(_0x138159(0x1e9))/0x1*(parseInt(_0x138159(0x1f1))/0x2)+parseInt(_0x138159(0x1ea))/0x3*(-parseInt(_0x138159(0x1ee))/0x4)+parseInt(_0x138159(0x1fc))/0x5+-parseInt(_0x138159(0x1ec))/0x6+-parseInt(_0x138159(0x1e8))/0x7*(parseInt(_0x138159(0x1ff))/0x8)+parseInt(_0x138159(0x1ed))/0x9+-parseInt(_0x138159(0x201))/0xa;if(_0x5e9a86===_0x28dc8e)break;else _0x302392['push'](_0x302392['shift']());}catch(_0x5beabc){_0x302392['push'](_0x302392['shift']());}}}(a0_0x13ce,0x84005));import{startTerminalUI}from'../src/interfaces/terminal/index.js';function a0_0x13ce(){const _0x4326aa=['7819983lifzGa','16LkalxO','\x20\x20npm\x20start','Starting\x20Loxia\x20Terminal\x20UI...','22682oHHaOi','LOXIA_PORT','Connecting\x20to:\x20','ERROR:\x20Terminal\x20UI\x20requires\x20an\x20interactive\x20terminal\x20(TTY).','error','catch','Press\x20Ctrl+C\x20to\x20exit\x0a','--port','--host','LOXIA_HOST','--help','5002410tiREHM','\x0aTerminal\x20UI\x20exited','isTTY','16XQzDwj','The\x20terminal\x20UI\x20cannot\x20run\x20in:','432290uGlnLK','length','env','argv','Please\x20run\x20this\x20command\x20in\x20a\x20real\x20terminal\x20without\x20pipes\x20or\x20redirection:','stdin','slice','\x20\x20npm\x20run\x20terminal-ui','log','port','host','\x20\x20-\x20Redirected\x20output\x20(e.g.,\x20>\x20file.txt,\x202>&1\x20|\x20...)','467026UATXhi','7eeAdmi','646572NbypJb','exit','2215908achEtW'];a0_0x13ce=function(){return _0x4326aa;};return a0_0x13ce();}const args=process[a0_0x3130d8(0x204)][a0_0x3130d8(0x1e2)](0x2),options={'host':'localhost','port':0x1f90};for(let i=0x0;i<args[a0_0x3130d8(0x202)];i++){const arg=args[i];if(arg===a0_0x3130d8(0x1f9)||arg==='-h')options[a0_0x3130d8(0x1e6)]=args[++i];else{if(arg===a0_0x3130d8(0x1f8)||arg==='-p')options[a0_0x3130d8(0x1e5)]=parseInt(args[++i],0xa);else arg===a0_0x3130d8(0x1fb)&&(console[a0_0x3130d8(0x1e4)]('\x0aLoxia\x20Terminal\x20UI\x0a\x0aUsage:\x0a\x20\x20loxia-terminal\x20[options]\x0a\x0aOptions:\x0a\x20\x20--host,\x20-h\x20<host>\x20\x20\x20\x20Backend\x20host\x20(default:\x20localhost)\x0a\x20\x20--port,\x20-p\x20<port>\x20\x20\x20\x20Backend\x20port\x20(default:\x208080)\x0a\x20\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x20message\x0a\x0aEnvironment\x20Variables:\x0a\x20\x20LOXIA_HOST\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Backend\x20host\x0a\x20\x20LOXIA_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Backend\x20port\x0a\x0aExamples:\x0a\x20\x20loxia-terminal\x0a\x20\x20loxia-terminal\x20--host\x20192.168.1.100\x20--port\x203000\x0a\x20\x20LOXIA_HOST=api.example.com\x20LOXIA_PORT=443\x20loxia-terminal\x0a'),process[a0_0x3130d8(0x1eb)](0x0));}}process[a0_0x3130d8(0x203)][a0_0x3130d8(0x1fa)]&&(options[a0_0x3130d8(0x1e6)]=process[a0_0x3130d8(0x203)][a0_0x3130d8(0x1fa)]);process['env']['LOXIA_PORT']&&(options[a0_0x3130d8(0x1e5)]=parseInt(process[a0_0x3130d8(0x203)][a0_0x3130d8(0x1f2)],0xa));!process[a0_0x3130d8(0x1e1)][a0_0x3130d8(0x1fe)]&&(console['error'](a0_0x3130d8(0x1f4)),console[a0_0x3130d8(0x1f5)](''),console[a0_0x3130d8(0x1f5)](a0_0x3130d8(0x200)),console[a0_0x3130d8(0x1f5)]('\x20\x20-\x20Piped\x20environments\x20(e.g.,\x20|\x20head,\x20|\x20grep)'),console[a0_0x3130d8(0x1f5)](a0_0x3130d8(0x1e7)),console[a0_0x3130d8(0x1f5)]('\x20\x20-\x20Background\x20processes\x20(e.g.,\x20&\x20at\x20the\x20end)'),console['error']('\x20\x20-\x20Some\x20CI/CD\x20environments'),console[a0_0x3130d8(0x1f5)](''),console[a0_0x3130d8(0x1f5)](a0_0x3130d8(0x205)),console[a0_0x3130d8(0x1f5)](a0_0x3130d8(0x1e3)),console['error'](''),console[a0_0x3130d8(0x1f5)]('Or\x20use\x20the\x20web\x20UI\x20instead:'),console[a0_0x3130d8(0x1f5)](a0_0x3130d8(0x1ef)),process['exit'](0x1));console[a0_0x3130d8(0x1e4)](a0_0x3130d8(0x1f0)),console[a0_0x3130d8(0x1e4)](a0_0x3130d8(0x1f3)+options['host']+':'+options[a0_0x3130d8(0x1e5)]),console[a0_0x3130d8(0x1e4)](a0_0x3130d8(0x1f7));const instance=startTerminalUI(options);function a0_0x14e4(_0xfb6a59,_0x1eb770){_0xfb6a59=_0xfb6a59-0x1e1;const _0x13cedd=a0_0x13ce();let _0x14e44c=_0x13cedd[_0xfb6a59];return _0x14e44c;}instance['waitUntilExit']()['then'](()=>{const _0x37265c=a0_0x3130d8;console[_0x37265c(0x1e4)](_0x37265c(0x1fd)),process[_0x37265c(0x1eb)](0x0);})[a0_0x3130d8(0x1f6)](_0x27f9b3=>{const _0x3462fd=a0_0x3130d8;console[_0x3462fd(0x1f5)]('\x0aTerminal\x20UI\x20error:',_0x27f9b3),process[_0x3462fd(0x1eb)](0x1);});
3
+ const a0_0x2b9757=a0_0x3f10;(function(_0x35aaea,_0x2bbfd2){const _0x52c588=a0_0x3f10,_0x4eb66d=_0x35aaea();while(!![]){try{const _0x402c86=parseInt(_0x52c588(0x6f))/0x1+parseInt(_0x52c588(0x7e))/0x2+-parseInt(_0x52c588(0x75))/0x3+-parseInt(_0x52c588(0x81))/0x4*(parseInt(_0x52c588(0x7b))/0x5)+parseInt(_0x52c588(0x6b))/0x6+-parseInt(_0x52c588(0x68))/0x7*(-parseInt(_0x52c588(0x7d))/0x8)+parseInt(_0x52c588(0x8b))/0x9*(-parseInt(_0x52c588(0x89))/0xa);if(_0x402c86===_0x2bbfd2)break;else _0x4eb66d['push'](_0x4eb66d['shift']());}catch(_0x1883a8){_0x4eb66d['push'](_0x4eb66d['shift']());}}}(a0_0x3a0b,0xb3d4e));import{startTerminalUI}from'../src/interfaces/terminal/index.js';const args=process[a0_0x2b9757(0x6a)][a0_0x2b9757(0x80)](0x2),options={'host':a0_0x2b9757(0x6e),'port':0x1f90};function a0_0x3f10(_0x4d4e14,_0x25a38e){_0x4d4e14=_0x4d4e14-0x66;const _0x3a0bca=a0_0x3a0b();let _0x3f10b6=_0x3a0bca[_0x4d4e14];return _0x3f10b6;}for(let i=0x0;i<args[a0_0x2b9757(0x82)];i++){const arg=args[i];if(arg==='--host'||arg==='-h')options['host']=args[++i];else{if(arg===a0_0x2b9757(0x72)||arg==='-p')options[a0_0x2b9757(0x84)]=parseInt(args[++i],0xa);else arg===a0_0x2b9757(0x71)&&(console[a0_0x2b9757(0x7a)]('\x0aLoxia\x20Terminal\x20UI\x0a\x0aUsage:\x0a\x20\x20loxia-terminal\x20[options]\x0a\x0aOptions:\x0a\x20\x20--host,\x20-h\x20<host>\x20\x20\x20\x20Backend\x20host\x20(default:\x20localhost)\x0a\x20\x20--port,\x20-p\x20<port>\x20\x20\x20\x20Backend\x20port\x20(default:\x208080)\x0a\x20\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x20message\x0a\x0aEnvironment\x20Variables:\x0a\x20\x20LOXIA_HOST\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Backend\x20host\x0a\x20\x20LOXIA_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Backend\x20port\x0a\x0aExamples:\x0a\x20\x20loxia-terminal\x0a\x20\x20loxia-terminal\x20--host\x20192.168.1.100\x20--port\x203000\x0a\x20\x20LOXIA_HOST=api.example.com\x20LOXIA_PORT=443\x20loxia-terminal\x0a'),process['exit'](0x0));}}process['env']['LOXIA_HOST']&&(options[a0_0x2b9757(0x88)]=process['env'][a0_0x2b9757(0x7f)]);process['env'][a0_0x2b9757(0x87)]&&(options[a0_0x2b9757(0x84)]=parseInt(process['env'][a0_0x2b9757(0x87)],0xa));!process[a0_0x2b9757(0x66)]['isTTY']&&(console[a0_0x2b9757(0x83)]('ERROR:\x20Terminal\x20UI\x20requires\x20an\x20interactive\x20terminal\x20(TTY).'),console['error'](''),console[a0_0x2b9757(0x83)](a0_0x2b9757(0x6d)),console[a0_0x2b9757(0x83)](a0_0x2b9757(0x70)),console[a0_0x2b9757(0x83)](a0_0x2b9757(0x78)),console[a0_0x2b9757(0x83)](a0_0x2b9757(0x76)),console[a0_0x2b9757(0x83)](a0_0x2b9757(0x6c)),console['error'](''),console[a0_0x2b9757(0x83)](a0_0x2b9757(0x67)),console[a0_0x2b9757(0x83)](a0_0x2b9757(0x73)),console['error'](''),console[a0_0x2b9757(0x83)](a0_0x2b9757(0x79)),console[a0_0x2b9757(0x83)](a0_0x2b9757(0x85)),process[a0_0x2b9757(0x77)](0x1));console[a0_0x2b9757(0x7a)](a0_0x2b9757(0x8a)),console['log']('Connecting\x20to:\x20'+options[a0_0x2b9757(0x88)]+':'+options[a0_0x2b9757(0x84)]),console[a0_0x2b9757(0x7a)](a0_0x2b9757(0x74));const instance=startTerminalUI(options);instance['waitUntilExit']()[a0_0x2b9757(0x7c)](()=>{const _0x583d21=a0_0x2b9757;console[_0x583d21(0x7a)]('\x0aTerminal\x20UI\x20exited'),process[_0x583d21(0x77)](0x0);})[a0_0x2b9757(0x69)](_0x403f74=>{const _0x4dcfbc=a0_0x2b9757;console[_0x4dcfbc(0x83)](_0x4dcfbc(0x86),_0x403f74),process[_0x4dcfbc(0x77)](0x1);});function a0_0x3a0b(){const _0x2b7687=['localhost','1306195nsyJzK','\x20\x20-\x20Piped\x20environments\x20(e.g.,\x20|\x20head,\x20|\x20grep)','--help','--port','\x20\x20npm\x20run\x20terminal-ui','Press\x20Ctrl+C\x20to\x20exit\x0a','965388uAeqJX','\x20\x20-\x20Background\x20processes\x20(e.g.,\x20&\x20at\x20the\x20end)','exit','\x20\x20-\x20Redirected\x20output\x20(e.g.,\x20>\x20file.txt,\x202>&1\x20|\x20...)','Or\x20use\x20the\x20web\x20UI\x20instead:','log','48595sJFTyI','then','8yiuDwm','1784450fKHlle','LOXIA_HOST','slice','344yNKsDH','length','error','port','\x20\x20npm\x20start','\x0aTerminal\x20UI\x20error:','LOXIA_PORT','host','10BpgyER','Starting\x20Loxia\x20Terminal\x20UI...','24521661UBEnLz','stdin','Please\x20run\x20this\x20command\x20in\x20a\x20real\x20terminal\x20without\x20pipes\x20or\x20redirection:','7368977GMoSPb','catch','argv','8206308gzWwGm','\x20\x20-\x20Some\x20CI/CD\x20environments','The\x20terminal\x20UI\x20cannot\x20run\x20in:'];a0_0x3a0b=function(){return _0x2b7687;};return a0_0x3a0b();}
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0xc4add4=a0_0x4bc5;(function(_0x3a231e,_0x335da3){const _0xebab04=a0_0x4bc5,_0x435d04=_0x3a231e();while(!![]){try{const _0xda2ba0=parseInt(_0xebab04(0x159))/0x1+parseInt(_0xebab04(0x13f))/0x2+-parseInt(_0xebab04(0x152))/0x3+parseInt(_0xebab04(0x13e))/0x4*(parseInt(_0xebab04(0x14a))/0x5)+-parseInt(_0xebab04(0x146))/0x6+parseInt(_0xebab04(0x163))/0x7*(-parseInt(_0xebab04(0x168))/0x8)+-parseInt(_0xebab04(0x15e))/0x9*(-parseInt(_0xebab04(0x149))/0xa);if(_0xda2ba0===_0x335da3)break;else _0x435d04['push'](_0x435d04['shift']());}catch(_0x39626d){_0x435d04['push'](_0x435d04['shift']());}}}(a0_0xaf32,0x87860));import{spawn}from'child_process';function a0_0x4bc5(_0xe09dc7,_0x5b2824){_0xe09dc7=_0xe09dc7-0x13c;const _0xaf3273=a0_0xaf32();let _0x4bc537=_0xaf3273[_0xe09dc7];return _0x4bc537;}function a0_0xaf32(){const _0x35b572=['153RulStR','kill','message','bin','exit','153559GLmgWO','ExperimentalWarning','Failed\x20to\x20start\x20Terminal\x20UI:','PORT','🚀\x20Starting\x20Loxia\x20server...','8mTakOi','loxia-terminal.js','SIGTERM','1853608yYelFo','1251670wAlMCv','Failed\x20to\x20start\x20server:','setTimeout','statusCode','src','killed','\x0a⚠️\x20\x20Received\x20SIGTERM,\x20shutting\x20down...','5649042GXMYox','pipe','║\x20\x20\x20Loxia\x20AI\x20Agents\x20-\x20Server\x20+\x20Terminal\x20UI\x20\x20\x20\x20\x20\x20║','240780pAQFZc','5RKyeBE','stderr','log','destroy','error','env','http://localhost:','/health','1627296QmIFGk','Timeout','✅\x20Server\x20is\x20ready!','node','toString','Error\x20during\x20startup:','trim','562417eYgWgM','inherit','data','get','Server\x20returned\x20'];a0_0xaf32=function(){return _0x35b572;};return a0_0xaf32();}import{fileURLToPath}from'url';import{dirname,join}from'path';import a0_0xc8d96 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),rootDir=join(__dirname,'..'),SERVER_PORT=process[a0_0xc4add4(0x14f)][a0_0xc4add4(0x166)]||0x1f90,STARTUP_WAIT=0x7d0;let serverProcess=null;async function checkServerReady(_0x23d54b=0xa,_0x122d80=0x1f4){const _0x2df69f=a0_0xc4add4;for(let _0x552413=0x0;_0x552413<_0x23d54b;_0x552413++){try{return await new Promise((_0x51854a,_0xa2402c)=>{const _0x428fbc=a0_0x4bc5,_0x5c627c=a0_0xc8d96[_0x428fbc(0x15c)](_0x428fbc(0x150)+SERVER_PORT+_0x428fbc(0x151),_0x1ee69d=>{const _0x836177=_0x428fbc;_0x1ee69d[_0x836177(0x142)]===0xc8?_0x51854a():_0xa2402c(new Error(_0x836177(0x15d)+_0x1ee69d[_0x836177(0x142)]));});_0x5c627c['on'](_0x428fbc(0x14e),_0xa2402c),_0x5c627c[_0x428fbc(0x141)](0x3e8,()=>{const _0x52378f=_0x428fbc;_0x5c627c[_0x52378f(0x14d)](),_0xa2402c(new Error(_0x52378f(0x153)));});}),console['log'](_0x2df69f(0x154)),!![];}catch(_0x4d7405){_0x552413<_0x23d54b-0x1&&await new Promise(_0x2d8d5c=>setTimeout(_0x2d8d5c,_0x122d80));}}return console[_0x2df69f(0x14c)]('⚠️\x20\x20Server\x20may\x20not\x20be\x20fully\x20ready,\x20but\x20continuing\x20anyway...'),![];}async function startServer(){return new Promise(_0x40268e=>{const _0x17916b=a0_0x4bc5;console[_0x17916b(0x14c)](_0x17916b(0x167));const _0x5eb723=join(rootDir,_0x17916b(0x143),'index.js');serverProcess=spawn('node',[_0x5eb723],{'cwd':rootDir,'env':{...process['env']},'stdio':['ignore',_0x17916b(0x147),'pipe'],'detached':![]}),serverProcess['stdout']['on'](_0x17916b(0x15b),_0x4d6f3f=>{const _0x121519=_0x17916b,_0xec991b=_0x4d6f3f[_0x121519(0x156)]()[_0x121519(0x158)]();_0xec991b&&console[_0x121519(0x14c)]('[SERVER]\x20'+_0xec991b);}),serverProcess[_0x17916b(0x14b)]['on'](_0x17916b(0x15b),_0x36c3af=>{const _0x192275=_0x17916b,_0x36405e=_0x36c3af[_0x192275(0x156)]()[_0x192275(0x158)]();_0x36405e&&!_0x36405e['includes'](_0x192275(0x164))&&console[_0x192275(0x14e)]('[SERVER\x20ERROR]\x20'+_0x36405e);}),serverProcess['on'](_0x17916b(0x14e),_0x566bd3=>{const _0x697b92=_0x17916b;console[_0x697b92(0x14e)](_0x697b92(0x140),_0x566bd3[_0x697b92(0x160)]),process[_0x697b92(0x162)](0x1);}),serverProcess['on'](_0x17916b(0x162),(_0x51eca3,_0x118a12)=>{_0x51eca3!==null&&_0x51eca3!==0x0&&(console['error']('Server\x20exited\x20with\x20code\x20'+_0x51eca3),process['exit'](_0x51eca3));}),setTimeout(_0x40268e,STARTUP_WAIT);});}async function startTerminalUI(){const _0x108939=a0_0xc4add4;console[_0x108939(0x14c)]('🖥️\x20\x20Starting\x20Terminal\x20UI...'),console[_0x108939(0x14c)]('');const _0x2a7f24=join(rootDir,_0x108939(0x161),_0x108939(0x13c)),_0xe3d090=spawn(_0x108939(0x155),[_0x2a7f24],{'cwd':rootDir,'env':{...process['env']},'stdio':_0x108939(0x15a)});return _0xe3d090['on'](_0x108939(0x14e),_0x48f632=>{const _0x1b734b=_0x108939;console[_0x1b734b(0x14e)](_0x1b734b(0x165),_0x48f632[_0x1b734b(0x160)]),cleanup(),process[_0x1b734b(0x162)](0x1);}),_0xe3d090['on'](_0x108939(0x162),_0xbc9e14=>{const _0xd6db03=_0x108939;console[_0xd6db03(0x14c)]('\x0a👋\x20Terminal\x20UI\x20closed.'),cleanup(),process[_0xd6db03(0x162)](_0xbc9e14||0x0);}),_0xe3d090;}function cleanup(){const _0x31c01d=a0_0xc4add4;serverProcess&&!serverProcess[_0x31c01d(0x144)]&&(console[_0x31c01d(0x14c)]('🛑\x20Stopping\x20server...'),serverProcess[_0x31c01d(0x15f)](_0x31c01d(0x13d)),setTimeout(()=>{const _0x3d380d=_0x31c01d;!serverProcess[_0x3d380d(0x144)]&&serverProcess['kill']('SIGKILL');},0x1388));}process['on']('SIGINT',()=>{const _0x479215=a0_0xc4add4;console[_0x479215(0x14c)]('\x0a⚠️\x20\x20Received\x20SIGINT,\x20shutting\x20down...'),cleanup(),process[_0x479215(0x162)](0x0);}),process['on'](a0_0xc4add4(0x13d),()=>{const _0x9bd1cb=a0_0xc4add4;console[_0x9bd1cb(0x14c)](_0x9bd1cb(0x145)),cleanup(),process[_0x9bd1cb(0x162)](0x0);}),process['on']('exit',()=>{cleanup();});async function main(){const _0x5c1bdf=a0_0xc4add4;console['log']('╔════════════════════════════════════════════════╗'),console[_0x5c1bdf(0x14c)](_0x5c1bdf(0x148)),console[_0x5c1bdf(0x14c)]('╚════════════════════════════════════════════════╝'),console['log']('');try{await startServer(),await checkServerReady(),await startTerminalUI(),await new Promise(()=>{});}catch(_0x9638f2){console[_0x5c1bdf(0x14e)](_0x5c1bdf(0x157),_0x9638f2['message']),cleanup(),process[_0x5c1bdf(0x162)](0x1);}}main();
3
+ function a0_0x3952(){const _0x55ecc2=['SIGTERM','Failed\x20to\x20start\x20server:','29068yHCzRM','index.js','ignore','[SERVER\x20ERROR]\x20','33lvdJbS','setTimeout','2185365GWsKov','8990802XnmXlv','env','message','\x0a⚠️\x20\x20Received\x20SIGINT,\x20shutting\x20down...','Server\x20exited\x20with\x20code\x20','🛑\x20Stopping\x20server...','data','ExperimentalWarning','355npugqC','bin','stderr','http://localhost:','║\x20\x20\x20Loxia\x20AI\x20Agents\x20-\x20Server\x20+\x20Terminal\x20UI\x20\x20\x20\x20\x20\x20║','4693689bkEcpc','exit','2rRzHLq','loxia-terminal.js','Timeout','\x0a👋\x20Terminal\x20UI\x20closed.','trim','Server\x20returned\x20','8wWZwiY','16819420ISMjAe','SIGINT','includes','1729409hhpFTm','/health','pipe','2560365vshCjn','🖥️\x20\x20Starting\x20Terminal\x20UI...','log','⚠️\x20\x20Server\x20may\x20not\x20be\x20fully\x20ready,\x20but\x20continuing\x20anyway...','error','\x0a⚠️\x20\x20Received\x20SIGTERM,\x20shutting\x20down...','killed','kill'];a0_0x3952=function(){return _0x55ecc2;};return a0_0x3952();}const a0_0x45e7e5=a0_0x459c;(function(_0x248636,_0x2f2f5e){const _0x2eb81e=a0_0x459c,_0x47e6d2=_0x248636();while(!![]){try{const _0x286478=-parseInt(_0x2eb81e(0x161))/0x1+-parseInt(_0x2eb81e(0x157))/0x2*(parseInt(_0x2eb81e(0x147))/0x3)+parseInt(_0x2eb81e(0x141))/0x4*(-parseInt(_0x2eb81e(0x150))/0x5)+-parseInt(_0x2eb81e(0x148))/0x6+parseInt(_0x2eb81e(0x155))/0x7+parseInt(_0x2eb81e(0x15d))/0x8*(-parseInt(_0x2eb81e(0x137))/0x9)+-parseInt(_0x2eb81e(0x15e))/0xa*(-parseInt(_0x2eb81e(0x145))/0xb);if(_0x286478===_0x2f2f5e)break;else _0x47e6d2['push'](_0x47e6d2['shift']());}catch(_0x27dd46){_0x47e6d2['push'](_0x47e6d2['shift']());}}}(a0_0x3952,0xea45c));import{spawn}from'child_process';function a0_0x459c(_0x37790d,_0x5b1559){_0x37790d=_0x37790d-0x136;const _0x39522b=a0_0x3952();let _0x459c31=_0x39522b[_0x37790d];return _0x459c31;}import{fileURLToPath}from'url';import{dirname,join}from'path';import a0_0x23887b from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),rootDir=join(__dirname,'..'),SERVER_PORT=process['env']['PORT']||0x1f90,STARTUP_WAIT=0x7d0;let serverProcess=null;async function checkServerReady(_0xe6ac7c=0xa,_0x598143=0x1f4){const _0x255d4f=a0_0x459c;for(let _0x87576c=0x0;_0x87576c<_0xe6ac7c;_0x87576c++){try{return await new Promise((_0x499cc7,_0x5dbb07)=>{const _0x2861c8=a0_0x459c,_0x58f245=a0_0x23887b['get'](_0x2861c8(0x153)+SERVER_PORT+_0x2861c8(0x162),_0x1b5b56=>{const _0x577292=_0x2861c8;_0x1b5b56['statusCode']===0xc8?_0x499cc7():_0x5dbb07(new Error(_0x577292(0x15c)+_0x1b5b56['statusCode']));});_0x58f245['on'](_0x2861c8(0x13b),_0x5dbb07),_0x58f245[_0x2861c8(0x146)](0x3e8,()=>{const _0x4ba0e8=_0x2861c8;_0x58f245['destroy'](),_0x5dbb07(new Error(_0x4ba0e8(0x159)));});}),console[_0x255d4f(0x139)]('✅\x20Server\x20is\x20ready!'),!![];}catch(_0x3438a3){_0x87576c<_0xe6ac7c-0x1&&await new Promise(_0x4c3590=>setTimeout(_0x4c3590,_0x598143));}}return console[_0x255d4f(0x139)](_0x255d4f(0x13a)),![];}async function startServer(){return new Promise(_0x4a31af=>{const _0x4c7172=a0_0x459c;console[_0x4c7172(0x139)]('🚀\x20Starting\x20Loxia\x20server...');const _0x17f61f=join(rootDir,'src',_0x4c7172(0x142));serverProcess=spawn('node',[_0x17f61f],{'cwd':rootDir,'env':{...process['env']},'stdio':[_0x4c7172(0x143),_0x4c7172(0x136),'pipe'],'detached':![]}),serverProcess['stdout']['on'](_0x4c7172(0x14e),_0x6efd4b=>{const _0x57d7c7=_0x4c7172,_0x423a1b=_0x6efd4b['toString']()[_0x57d7c7(0x15b)]();_0x423a1b&&console['log']('[SERVER]\x20'+_0x423a1b);}),serverProcess[_0x4c7172(0x152)]['on'](_0x4c7172(0x14e),_0x2c2636=>{const _0x7cfb0c=_0x4c7172,_0x44588f=_0x2c2636['toString']()[_0x7cfb0c(0x15b)]();_0x44588f&&!_0x44588f[_0x7cfb0c(0x160)](_0x7cfb0c(0x14f))&&console[_0x7cfb0c(0x13b)](_0x7cfb0c(0x144)+_0x44588f);}),serverProcess['on'](_0x4c7172(0x13b),_0x436f53=>{const _0x5698c0=_0x4c7172;console['error'](_0x5698c0(0x140),_0x436f53[_0x5698c0(0x14a)]),process[_0x5698c0(0x156)](0x1);}),serverProcess['on'](_0x4c7172(0x156),(_0x36cca4,_0x5d72e8)=>{const _0x3e2120=_0x4c7172;_0x36cca4!==null&&_0x36cca4!==0x0&&(console[_0x3e2120(0x13b)](_0x3e2120(0x14c)+_0x36cca4),process[_0x3e2120(0x156)](_0x36cca4));}),setTimeout(_0x4a31af,STARTUP_WAIT);});}async function startTerminalUI(){const _0x5a04e8=a0_0x459c;console[_0x5a04e8(0x139)](_0x5a04e8(0x138)),console['log']('');const _0xbf3853=join(rootDir,_0x5a04e8(0x151),_0x5a04e8(0x158)),_0x895476=spawn('node',[_0xbf3853],{'cwd':rootDir,'env':{...process[_0x5a04e8(0x149)]},'stdio':'inherit'});return _0x895476['on'](_0x5a04e8(0x13b),_0x37f25d=>{const _0x464584=_0x5a04e8;console['error']('Failed\x20to\x20start\x20Terminal\x20UI:',_0x37f25d['message']),cleanup(),process[_0x464584(0x156)](0x1);}),_0x895476['on'](_0x5a04e8(0x156),_0x59c5ff=>{const _0x4ecc30=_0x5a04e8;console[_0x4ecc30(0x139)](_0x4ecc30(0x15a)),cleanup(),process[_0x4ecc30(0x156)](_0x59c5ff||0x0);}),_0x895476;}function cleanup(){const _0xea2580=a0_0x459c;serverProcess&&!serverProcess[_0xea2580(0x13d)]&&(console['log'](_0xea2580(0x14d)),serverProcess[_0xea2580(0x13e)](_0xea2580(0x13f)),setTimeout(()=>{const _0x482447=_0xea2580;!serverProcess[_0x482447(0x13d)]&&serverProcess[_0x482447(0x13e)]('SIGKILL');},0x1388));}process['on'](a0_0x45e7e5(0x15f),()=>{const _0x3cb839=a0_0x45e7e5;console['log'](_0x3cb839(0x14b)),cleanup(),process['exit'](0x0);}),process['on'](a0_0x45e7e5(0x13f),()=>{const _0xdb5229=a0_0x45e7e5;console[_0xdb5229(0x139)](_0xdb5229(0x13c)),cleanup(),process[_0xdb5229(0x156)](0x0);}),process['on'](a0_0x45e7e5(0x156),()=>{cleanup();});async function main(){const _0x32d8af=a0_0x45e7e5;console[_0x32d8af(0x139)]('╔════════════════════════════════════════════════╗'),console['log'](_0x32d8af(0x154)),console[_0x32d8af(0x139)]('╚════════════════════════════════════════════════╝'),console[_0x32d8af(0x139)]('');try{await startServer(),await checkServerReady(),await startTerminalUI(),await new Promise(()=>{});}catch(_0x49f2a7){console[_0x32d8af(0x13b)]('Error\x20during\x20startup:',_0x49f2a7[_0x32d8af(0x14a)]),cleanup(),process[_0x32d8af(0x156)](0x1);}}main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loxia-labs/loxia-autopilot-one",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
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_0x26c1(){const _0x4a8c5b=['pipe','semgrep','arch','\x20\x20\x20✅\x20Python\x20found:\x20','\x20\x20\x20Semgrep\x20not\x20found\x20in\x20PATH,\x20installing\x20standalone\x20binary...','semgrep\x20--version','6253326poQELO','\x20\x20\x20pip\x20install\x20semgrep\x0a','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20','https','promises','8270090AIbwhp','python3','log','907692kLYkOA','37458irvakA','📦\x20Checking\x20ESLint\x20Security\x20Plugin...','\x20\x20\x20✅\x20eslint-plugin-security\x20is\x20installed\x0a','\x20\x20\x20✅\x20Semgrep\x20already\x20installed:\x20','\x0aYou\x20can\x20manually\x20install\x20scanners:','\x20-m\x20pip\x20show\x20','python','🐍\x20Checking\x20Python\x20scanners...','...','exit','platform','join','═══════════════════════════════════════════════════════════','checkov','\x20installed\x20successfully','\x0a═══════════════════════════════════════════════════════════','\x20\x20\x20To\x20enable\x20Python\x20scanning,\x20install\x20Python\x20and\x20run:','\x20\x20\x20⚠️\x20\x20No\x20Semgrep\x20binary\x20available\x20for\x20','catch','\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20Semgrep:\x20','242XcNjCH','═══════════════════════════════════════════════════════════\x0a','🔍\x20Installing\x20Semgrep...','\x20\x20\x20Installing\x20','python3\x20--version','\x20\x20\x20✅\x20','mkdir','2104PJmzoU','stdout','\x20\x20\x20Please\x20install\x20manually:\x20https://semgrep.dev/docs/getting-started/\x0a','Failed\x20to\x20download:\x20HTTP\x20','9NdjyrA','close','7WtxApK','error','then','yamllint','\x20\x20Installing\x20Security\x20Scanners','357400tCzoox','dirname','url','bandit','node_modules','.scanners','get','eslint-plugin-security','\x20\x20Installation\x20Complete','\x20\x20\x20Downloading\x20from\x20','\x20\x20\x20Note:\x20To\x20use\x20system-wide,\x20add\x20to\x20PATH\x20or\x20install\x20globally:','626755CnSNEy','❌\x20Installation\x20failed:','trim','76YiAJSQ','statusCode','startsWith','\x20\x20\x20Using\x20system-installed\x20Semgrep\x0a','270654mqkQEO','\x20-m\x20pip\x20install\x20--user\x20','message','\x20\x20\x20⚠️\x20\x20Python\x20not\x20found\x20-\x20skipping\x20Python\x20scanners','\x20\x20\x20Run:\x20npm\x20install\x20--save-dev\x20eslint-plugin-security\x0a','\x20already\x20installed'];a0_0x26c1=function(){return _0x4a8c5b;};return a0_0x26c1();}const a0_0x315ea8=a0_0x36e4;(function(_0x4853b4,_0xdb5440){const _0x37b457=a0_0x36e4,_0x489209=_0x4853b4();while(!![]){try{const _0x5a5274=parseInt(_0x37b457(0x238))/0x1+parseInt(_0x37b457(0x1f1))/0x2*(-parseInt(_0x37b457(0x226))/0x3)+-parseInt(_0x37b457(0x23b))/0x4*(-parseInt(_0x37b457(0x22d))/0x5)+parseInt(_0x37b457(0x1fd))/0x6*(parseInt(_0x37b457(0x228))/0x7)+parseInt(_0x37b457(0x222))/0x8*(-parseInt(_0x37b457(0x206))/0x9)+parseInt(_0x37b457(0x202))/0xa+parseInt(_0x37b457(0x21b))/0xb*(-parseInt(_0x37b457(0x205))/0xc);if(_0x5a5274===_0xdb5440)break;else _0x489209['push'](_0x489209['shift']());}catch(_0x3f3598){_0x489209['push'](_0x489209['shift']());}}}(a0_0x26c1,0xa8508));import{exec}from'child_process';import{promisify}from'util';import a0_0x8ffd5d from'https';import a0_0x6979db from'http';import a0_0x4a5341 from'fs';import a0_0x55fe1e from'path';import{fileURLToPath}from'url';import{createWriteStream}from'fs';import{pipeline}from'stream/promises';const execAsync=promisify(exec),__filename=fileURLToPath(import.meta.url),__dirname=a0_0x55fe1e[a0_0x315ea8(0x22e)](__filename),SCANNER_DIR=a0_0x55fe1e[a0_0x315ea8(0x211)](__dirname,'..',a0_0x315ea8(0x231),a0_0x315ea8(0x232)),SEMGREP_VERSION='v1.55.0';console[a0_0x315ea8(0x204)](a0_0x315ea8(0x212)),console['log'](a0_0x315ea8(0x22c)),console['log'](a0_0x315ea8(0x21c));async function installScanners(){const _0x5d55ee=a0_0x315ea8;await a0_0x4a5341['promises'][_0x5d55ee(0x221)](SCANNER_DIR,{'recursive':!![]}),await checkESLintSecurity(),await installSemgrep(),await installPythonScanners(),console[_0x5d55ee(0x204)](_0x5d55ee(0x215)),console['log'](_0x5d55ee(0x235)),console[_0x5d55ee(0x204)](_0x5d55ee(0x21c));}async function checkESLintSecurity(){const _0x124426=a0_0x315ea8;console[_0x124426(0x204)](_0x124426(0x207));try{await import(_0x124426(0x234)),console[_0x124426(0x204)](_0x124426(0x208));}catch(_0x41211d){console[_0x124426(0x204)]('\x20\x20\x20⚠️\x20\x20eslint-plugin-security\x20not\x20found'),console[_0x124426(0x204)](_0x124426(0x1f5));}}async function installSemgrep(){const _0x15a234=a0_0x315ea8;console[_0x15a234(0x204)](_0x15a234(0x21d));const _0x6f4215=process[_0x15a234(0x210)],_0x116359=process[_0x15a234(0x1f9)];try{const _0x317212=await execAsync(_0x15a234(0x1fc),{'timeout':0x1388});console['log'](_0x15a234(0x209)+_0x317212[_0x15a234(0x223)][_0x15a234(0x23a)]()),console[_0x15a234(0x204)](_0x15a234(0x1f0));return;}catch(_0x255feb){console['log'](_0x15a234(0x1fb));}const _0x51da98=getSemgrepBinaryInfo(_0x6f4215,_0x116359);if(!_0x51da98){console[_0x15a234(0x204)](_0x15a234(0x217)+_0x6f4215+'-'+_0x116359),console[_0x15a234(0x204)](_0x15a234(0x224));return;}try{const _0x4e8557=a0_0x55fe1e[_0x15a234(0x211)](SCANNER_DIR,_0x15a234(0x1f8));console[_0x15a234(0x204)](_0x15a234(0x236)+_0x51da98[_0x15a234(0x22f)]+_0x15a234(0x20e)),await downloadFile(_0x51da98[_0x15a234(0x22f)],_0x4e8557),await a0_0x4a5341[_0x15a234(0x201)]['chmod'](_0x4e8557,0x1ed),console[_0x15a234(0x204)]('\x20\x20\x20✅\x20Semgrep\x20installed\x20successfully'),console[_0x15a234(0x204)]('\x20\x20\x20Location:\x20'+_0x4e8557+'\x0a'),console['log'](_0x15a234(0x237)),console[_0x15a234(0x204)](_0x15a234(0x1fe));}catch(_0x18e91b){console[_0x15a234(0x204)](_0x15a234(0x21a)+_0x18e91b[_0x15a234(0x1f3)]),console[_0x15a234(0x204)]('\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20semgrep\x0a');}}function getSemgrepBinaryInfo(_0x12866,_0x3fd507){return null;}async function installPythonScanners(){const _0x529d63=a0_0x315ea8;console['log'](_0x529d63(0x20d));let _0x5ddd44=null;try{await execAsync(_0x529d63(0x21f),{'timeout':0x1388}),_0x5ddd44=_0x529d63(0x203);}catch(_0x84cea0){try{await execAsync('python\x20--version',{'timeout':0x1388}),_0x5ddd44=_0x529d63(0x20c);}catch(_0x2669f5){console[_0x529d63(0x204)](_0x529d63(0x1f4)),console[_0x529d63(0x204)](_0x529d63(0x216)),console['log']('\x20\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit\x20checkov\x20yamllint\x0a');return;}}console[_0x529d63(0x204)](_0x529d63(0x1fa)+_0x5ddd44),await installViaPip('semgrep',_0x5ddd44),await installViaPip(_0x529d63(0x230),_0x5ddd44),await installViaPip('pip-audit',_0x5ddd44),await installViaPip(_0x529d63(0x213),_0x5ddd44),await installViaPip(_0x529d63(0x22b),_0x5ddd44),console[_0x529d63(0x204)]('');}function a0_0x36e4(_0x349c53,_0x48dbd2){_0x349c53=_0x349c53-0x1f0;const _0x26c18f=a0_0x26c1();let _0x36e49b=_0x26c18f[_0x349c53];return _0x36e49b;}async function installViaPip(_0x1ff293,_0x3ac438){const _0x19074e=a0_0x315ea8;try{const _0x5f0f29=await execAsync(_0x3ac438+_0x19074e(0x20b)+_0x1ff293,{'timeout':0x1388});return console['log'](_0x19074e(0x220)+_0x1ff293+_0x19074e(0x1f6)),!![];}catch(_0x27ff6e){console[_0x19074e(0x204)](_0x19074e(0x21e)+_0x1ff293+_0x19074e(0x20e));try{return await execAsync(_0x3ac438+_0x19074e(0x1f2)+_0x1ff293,{'timeout':0xea60}),console[_0x19074e(0x204)](_0x19074e(0x220)+_0x1ff293+_0x19074e(0x214)),!![];}catch(_0x448500){return console[_0x19074e(0x204)]('\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20'+_0x1ff293+':\x20'+_0x448500[_0x19074e(0x1f3)]),console[_0x19074e(0x204)](_0x19074e(0x1ff)+_0x1ff293),![];}}}async function downloadFile(_0x530321,_0x3575e9){return new Promise((_0x1b4a85,_0x44a2cf)=>{const _0x36d8ab=a0_0x36e4,_0x586157=_0x530321[_0x36d8ab(0x23d)](_0x36d8ab(0x200))?a0_0x8ffd5d:a0_0x6979db;_0x586157[_0x36d8ab(0x233)](_0x530321,_0x542019=>{const _0x35b5ef=_0x36d8ab;if(_0x542019[_0x35b5ef(0x23c)]===0x12e||_0x542019[_0x35b5ef(0x23c)]===0x12d){downloadFile(_0x542019['headers']['location'],_0x3575e9)[_0x35b5ef(0x22a)](_0x1b4a85)[_0x35b5ef(0x218)](_0x44a2cf);return;}if(_0x542019[_0x35b5ef(0x23c)]!==0xc8){_0x44a2cf(new Error(_0x35b5ef(0x225)+_0x542019['statusCode']));return;}const _0xc0abc5=createWriteStream(_0x3575e9);_0x542019[_0x35b5ef(0x1f7)](_0xc0abc5),_0xc0abc5['on']('finish',()=>{const _0x42d48e=_0x35b5ef;_0xc0abc5[_0x42d48e(0x227)](),_0x1b4a85();}),_0xc0abc5['on'](_0x35b5ef(0x229),_0x1dc388=>{a0_0x4a5341['unlink'](_0x3575e9,()=>{}),_0x44a2cf(_0x1dc388);});})['on'](_0x36d8ab(0x229),_0x44a2cf);});}installScanners()[a0_0x315ea8(0x218)](_0x1ea214=>{const _0x18bf0f=a0_0x315ea8;console[_0x18bf0f(0x229)](_0x18bf0f(0x239),_0x1ea214[_0x18bf0f(0x1f3)]),console[_0x18bf0f(0x229)](_0x18bf0f(0x20a)),console[_0x18bf0f(0x229)]('\x20\x20npm\x20install\x20--save-dev\x20eslint-plugin-security'),console['error'](_0x18bf0f(0x219)),process[_0x18bf0f(0x20f)](0x0);});
2
+ const a0_0x245eb1=a0_0x4569;(function(_0x336276,_0x1cbed4){const _0x328552=a0_0x4569,_0x56c623=_0x336276();while(!![]){try{const _0xabc068=parseInt(_0x328552(0x1e0))/0x1*(-parseInt(_0x328552(0x21a))/0x2)+-parseInt(_0x328552(0x20a))/0x3+-parseInt(_0x328552(0x1f7))/0x4*(-parseInt(_0x328552(0x1df))/0x5)+parseInt(_0x328552(0x201))/0x6+-parseInt(_0x328552(0x1fb))/0x7+-parseInt(_0x328552(0x1d7))/0x8*(-parseInt(_0x328552(0x1eb))/0x9)+parseInt(_0x328552(0x1fd))/0xa*(parseInt(_0x328552(0x1f9))/0xb);if(_0xabc068===_0x1cbed4)break;else _0x56c623['push'](_0x56c623['shift']());}catch(_0x36d040){_0x56c623['push'](_0x56c623['shift']());}}}(a0_0x5a5f,0x36e2f));import{exec}from'child_process';import{promisify}from'util';import a0_0x684c96 from'https';import a0_0x293a9c from'http';import a0_0xafba44 from'fs';import a0_0x5e48e2 from'path';import{fileURLToPath}from'url';import{createWriteStream}from'fs';import{pipeline}from'stream/promises';const execAsync=promisify(exec),__filename=fileURLToPath(import.meta.url),__dirname=a0_0x5e48e2['dirname'](__filename),SCANNER_DIR=a0_0x5e48e2['join'](__dirname,'..','node_modules',a0_0x245eb1(0x202)),SEMGREP_VERSION=a0_0x245eb1(0x1da);console[a0_0x245eb1(0x1f8)]('═══════════════════════════════════════════════════════════'),console[a0_0x245eb1(0x1f8)](a0_0x245eb1(0x1f0)),console[a0_0x245eb1(0x1f8)](a0_0x245eb1(0x1f4));function a0_0x5a5f(){const _0x3479f0=['\x0a═══════════════════════════════════════════════════════════','\x20\x20Installing\x20Security\x20Scanners','\x20\x20\x20⚠️\x20\x20Python\x20not\x20found\x20-\x20skipping\x20Python\x20scanners','headers','promises','═══════════════════════════════════════════════════════════\x0a','...','\x20\x20\x20✅\x20Python\x20found:\x20','1088316EOoBsl','log','23727KnHXyj','python3','1829562xIAjlI','\x0aYou\x20can\x20manually\x20install\x20scanners:','910pCMztT','\x20\x20Installation\x20Complete','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20','catch','534408cpxJGO','.scanners','message','then','🔍\x20Installing\x20Semgrep...','semgrep','url','📦\x20Checking\x20ESLint\x20Security\x20Plugin...','🐍\x20Checking\x20Python\x20scanners...','1302147QgxMrX','semgrep\x20--version','unlink','python\x20--version','❌\x20Installation\x20failed:','eslint-plugin-security','pipe','error','\x20\x20\x20✅\x20eslint-plugin-security\x20is\x20installed\x0a','bandit','get','\x20\x20\x20Installing\x20','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20Semgrep:\x20','\x20\x20\x20To\x20enable\x20Python\x20scanning,\x20install\x20Python\x20and\x20run:','\x20\x20\x20Using\x20system-installed\x20Semgrep\x0a','arch','2802VEGsGg','join','24ZjMmSW','checkov','Failed\x20to\x20download:\x20HTTP\x20','v1.55.0','\x20-m\x20pip\x20show\x20','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20','finish','\x20\x20\x20Note:\x20To\x20use\x20system-wide,\x20add\x20to\x20PATH\x20or\x20install\x20globally:','5hhoKTR','54auPlda','statusCode','location','\x20\x20\x20⚠️\x20\x20eslint-plugin-security\x20not\x20found','trim','\x20\x20\x20Downloading\x20from\x20','startsWith','chmod','close','\x20\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit\x20checkov\x20yamllint\x0a','\x20\x20\x20Semgrep\x20not\x20found\x20in\x20PATH,\x20installing\x20standalone\x20binary...','1315350GSfPEd','\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit','\x20\x20npm\x20install\x20--save-dev\x20eslint-plugin-security','\x20\x20\x20✅\x20'];a0_0x5a5f=function(){return _0x3479f0;};return a0_0x5a5f();}async function installScanners(){const _0xd781c7=a0_0x245eb1;await a0_0xafba44[_0xd781c7(0x1f3)]['mkdir'](SCANNER_DIR,{'recursive':!![]}),await checkESLintSecurity(),await installSemgrep(),await installPythonScanners(),console[_0xd781c7(0x1f8)](_0xd781c7(0x1ef)),console[_0xd781c7(0x1f8)](_0xd781c7(0x1fe)),console[_0xd781c7(0x1f8)](_0xd781c7(0x1f4));}async function checkESLintSecurity(){const _0x53a808=a0_0x245eb1;console[_0x53a808(0x1f8)](_0x53a808(0x208));try{await import(_0x53a808(0x20f)),console[_0x53a808(0x1f8)](_0x53a808(0x212));}catch(_0x8c7edd){console['log'](_0x53a808(0x1e3)),console[_0x53a808(0x1f8)]('\x20\x20\x20Run:\x20npm\x20install\x20--save-dev\x20eslint-plugin-security\x0a');}}async function installSemgrep(){const _0x1f2b87=a0_0x245eb1;console[_0x1f2b87(0x1f8)](_0x1f2b87(0x205));const _0x35602d=process['platform'],_0x289444=process[_0x1f2b87(0x219)];try{const _0x370418=await execAsync(_0x1f2b87(0x20b),{'timeout':0x1388});console['log']('\x20\x20\x20✅\x20Semgrep\x20already\x20installed:\x20'+_0x370418['stdout'][_0x1f2b87(0x1e4)]()),console['log'](_0x1f2b87(0x218));return;}catch(_0x5dcf04){console['log'](_0x1f2b87(0x1ea));}const _0x5c49bf=getSemgrepBinaryInfo(_0x35602d,_0x289444);if(!_0x5c49bf){console[_0x1f2b87(0x1f8)]('\x20\x20\x20⚠️\x20\x20No\x20Semgrep\x20binary\x20available\x20for\x20'+_0x35602d+'-'+_0x289444),console[_0x1f2b87(0x1f8)]('\x20\x20\x20Please\x20install\x20manually:\x20https://semgrep.dev/docs/getting-started/\x0a');return;}try{const _0x36003c=a0_0x5e48e2[_0x1f2b87(0x1d6)](SCANNER_DIR,'semgrep');console['log'](_0x1f2b87(0x1e5)+_0x5c49bf[_0x1f2b87(0x207)]+'...'),await downloadFile(_0x5c49bf['url'],_0x36003c),await a0_0xafba44[_0x1f2b87(0x1f3)][_0x1f2b87(0x1e7)](_0x36003c,0x1ed),console['log']('\x20\x20\x20✅\x20Semgrep\x20installed\x20successfully'),console[_0x1f2b87(0x1f8)]('\x20\x20\x20Location:\x20'+_0x36003c+'\x0a'),console[_0x1f2b87(0x1f8)](_0x1f2b87(0x1de)),console[_0x1f2b87(0x1f8)]('\x20\x20\x20pip\x20install\x20semgrep\x0a');}catch(_0x533a91){console[_0x1f2b87(0x1f8)](_0x1f2b87(0x216)+_0x533a91[_0x1f2b87(0x203)]),console['log']('\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20semgrep\x0a');}}function a0_0x4569(_0x48d950,_0x3222f7){_0x48d950=_0x48d950-0x1d6;const _0x5a5f01=a0_0x5a5f();let _0x456938=_0x5a5f01[_0x48d950];return _0x456938;}function getSemgrepBinaryInfo(_0x3194ca,_0x2f180a){return null;}async function installPythonScanners(){const _0x4ef95c=a0_0x245eb1;console['log'](_0x4ef95c(0x209));let _0x396cb4=null;try{await execAsync('python3\x20--version',{'timeout':0x1388}),_0x396cb4=_0x4ef95c(0x1fa);}catch(_0x27dd2b){try{await execAsync(_0x4ef95c(0x20d),{'timeout':0x1388}),_0x396cb4='python';}catch(_0x3a21dc){console[_0x4ef95c(0x1f8)](_0x4ef95c(0x1f1)),console[_0x4ef95c(0x1f8)](_0x4ef95c(0x217)),console[_0x4ef95c(0x1f8)](_0x4ef95c(0x1e9));return;}}console[_0x4ef95c(0x1f8)](_0x4ef95c(0x1f6)+_0x396cb4),await installViaPip(_0x4ef95c(0x206),_0x396cb4),await installViaPip(_0x4ef95c(0x213),_0x396cb4),await installViaPip('pip-audit',_0x396cb4),await installViaPip(_0x4ef95c(0x1d8),_0x396cb4),await installViaPip('yamllint',_0x396cb4),console[_0x4ef95c(0x1f8)]('');}async function installViaPip(_0x51bb4e,_0x4cd793){const _0x49eeba=a0_0x245eb1;try{const _0x5aaad7=await execAsync(_0x4cd793+_0x49eeba(0x1db)+_0x51bb4e,{'timeout':0x1388});return console['log'](_0x49eeba(0x1ee)+_0x51bb4e+'\x20already\x20installed'),!![];}catch(_0x3360c5){console[_0x49eeba(0x1f8)](_0x49eeba(0x215)+_0x51bb4e+_0x49eeba(0x1f5));try{return await execAsync(_0x4cd793+'\x20-m\x20pip\x20install\x20--user\x20'+_0x51bb4e,{'timeout':0xea60}),console[_0x49eeba(0x1f8)](_0x49eeba(0x1ee)+_0x51bb4e+'\x20installed\x20successfully'),!![];}catch(_0x4b90e6){return console['log'](_0x49eeba(0x1dc)+_0x51bb4e+':\x20'+_0x4b90e6[_0x49eeba(0x203)]),console[_0x49eeba(0x1f8)](_0x49eeba(0x1ff)+_0x51bb4e),![];}}}async function downloadFile(_0x126a32,_0x4c79c6){return new Promise((_0x51d159,_0x35f267)=>{const _0x77eadc=a0_0x4569,_0xc96dc3=_0x126a32[_0x77eadc(0x1e6)]('https')?a0_0x684c96:a0_0x293a9c;_0xc96dc3[_0x77eadc(0x214)](_0x126a32,_0x43c6d1=>{const _0x57a520=_0x77eadc;if(_0x43c6d1[_0x57a520(0x1e1)]===0x12e||_0x43c6d1[_0x57a520(0x1e1)]===0x12d){downloadFile(_0x43c6d1[_0x57a520(0x1f2)][_0x57a520(0x1e2)],_0x4c79c6)[_0x57a520(0x204)](_0x51d159)['catch'](_0x35f267);return;}if(_0x43c6d1[_0x57a520(0x1e1)]!==0xc8){_0x35f267(new Error(_0x57a520(0x1d9)+_0x43c6d1[_0x57a520(0x1e1)]));return;}const _0x1f5134=createWriteStream(_0x4c79c6);_0x43c6d1[_0x57a520(0x210)](_0x1f5134),_0x1f5134['on'](_0x57a520(0x1dd),()=>{const _0x9fb0e9=_0x57a520;_0x1f5134[_0x9fb0e9(0x1e8)](),_0x51d159();}),_0x1f5134['on']('error',_0x57a6c3=>{const _0x38776f=_0x57a520;a0_0xafba44[_0x38776f(0x20c)](_0x4c79c6,()=>{}),_0x35f267(_0x57a6c3);});})['on'](_0x77eadc(0x211),_0x35f267);});}installScanners()[a0_0x245eb1(0x200)](_0x1f28e9=>{const _0x57fc60=a0_0x245eb1;console[_0x57fc60(0x211)](_0x57fc60(0x20e),_0x1f28e9['message']),console[_0x57fc60(0x211)](_0x57fc60(0x1fc)),console[_0x57fc60(0x211)](_0x57fc60(0x1ed)),console['error'](_0x57fc60(0x1ec)),process['exit'](0x0);});
@@ -1 +1 @@
1
- const a0_0x1df93b=a0_0x30f1;(function(_0x2aed48,_0x325631){const _0x4759ec=a0_0x30f1,_0x222f5c=_0x2aed48();while(!![]){try{const _0x1478c9=parseInt(_0x4759ec(0x160))/0x1+-parseInt(_0x4759ec(0x179))/0x2+parseInt(_0x4759ec(0x14c))/0x3+parseInt(_0x4759ec(0x184))/0x4+parseInt(_0x4759ec(0x188))/0x5*(parseInt(_0x4759ec(0x162))/0x6)+parseInt(_0x4759ec(0x165))/0x7+parseInt(_0x4759ec(0x15e))/0x8*(-parseInt(_0x4759ec(0x14f))/0x9);if(_0x1478c9===_0x325631)break;else _0x222f5c['push'](_0x222f5c['shift']());}catch(_0x56fc40){_0x222f5c['push'](_0x222f5c['shift']());}}}(a0_0x2512,0x58700));import{STATIC_ANALYSIS}from'../utilities/constants.js';function a0_0x30f1(_0x351052,_0x2f4785){_0x351052=_0x351052-0x146;const _0x2512e1=a0_0x2512();let _0x30f11d=_0x2512e1[_0x351052];if(a0_0x30f1['vwusTg']===undefined){var _0xf04ba=function(_0x5462df){const _0xfb0241='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x307ab0='',_0x747c5f='';for(let _0x18a35d=0x0,_0x54a05f,_0x3aba07,_0x3aa59d=0x0;_0x3aba07=_0x5462df['charAt'](_0x3aa59d++);~_0x3aba07&&(_0x54a05f=_0x18a35d%0x4?_0x54a05f*0x40+_0x3aba07:_0x3aba07,_0x18a35d++%0x4)?_0x307ab0+=String['fromCharCode'](0xff&_0x54a05f>>(-0x2*_0x18a35d&0x6)):0x0){_0x3aba07=_0xfb0241['indexOf'](_0x3aba07);}for(let _0x110548=0x0,_0x3c4667=_0x307ab0['length'];_0x110548<_0x3c4667;_0x110548++){_0x747c5f+='%'+('00'+_0x307ab0['charCodeAt'](_0x110548)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x747c5f);};a0_0x30f1['gpTXDg']=_0xf04ba,a0_0x30f1['RcEmMq']={},a0_0x30f1['vwusTg']=!![];}const _0x5af0b1=_0x2512e1[0x0],_0x138702=_0x351052+_0x5af0b1,_0x42d9b8=a0_0x30f1['RcEmMq'][_0x138702];return!_0x42d9b8?(_0x30f11d=a0_0x30f1['gpTXDg'](_0x30f11d),a0_0x30f1['RcEmMq'][_0x138702]=_0x30f11d):_0x30f11d=_0x42d9b8,_0x30f11d;}class CSSAnalyzer{constructor(_0x307ab0=null){const _0x471dc9=a0_0x30f1;this['logger']=_0x307ab0,this['stylelint']=null,this[_0x471dc9(0x16c)]=null,this['postcssScss']=null,this[_0x471dc9(0x148)]=null;}async[a0_0x1df93b(0x17a)](_0x747c5f,_0x18a35d,_0x54a05f={}){const _0x3ca75f=a0_0x1df93b;try{const _0x3aba07=[],_0x3aa59d=this['detectLanguage'](_0x747c5f),_0x110548=await this['checkSyntax'](_0x747c5f,_0x18a35d,_0x3aa59d);_0x3aba07['push'](..._0x110548);if(_0x110548[_0x3ca75f(0x147)]===0x0){const _0x3c4667=await this['lintStyles'](_0x747c5f,_0x18a35d,_0x3aa59d);_0x3aba07['push'](..._0x3c4667);}return this['logger']?.['debug']('CSS\x20analysis\x20completed',{'file':_0x747c5f,'language':_0x3aa59d,'totalDiagnostics':_0x3aba07[_0x3ca75f(0x147)],'errors':_0x3aba07['filter'](_0x48293b=>_0x48293b['severity']===STATIC_ANALYSIS['SEVERITY']['ERROR'])['length'],'warnings':_0x3aba07['filter'](_0x356f11=>_0x356f11[_0x3ca75f(0x183)]===STATIC_ANALYSIS[_0x3ca75f(0x16b)][_0x3ca75f(0x172)])['length']}),_0x3aba07;}catch(_0x4b6947){return this[_0x3ca75f(0x18a)]?.['error'](_0x3ca75f(0x17c),{'file':_0x747c5f,'error':_0x4b6947[_0x3ca75f(0x180)]}),[];}}async[a0_0x1df93b(0x14d)](_0x18faf0,_0x2032b9,_0x113c2b){const _0x525641=a0_0x1df93b,_0xae0f43=[];try{if(!this['postcss']){const _0x324e2b=await import('postcss');this[_0x525641(0x16c)]=_0x324e2b[_0x525641(0x15a)];}let _0x11cf28=null;if(_0x113c2b==='scss'){if(!this[_0x525641(0x15b)]){const _0x37ecb0=await import(_0x525641(0x164));this['postcssScss']=_0x37ecb0[_0x525641(0x15a)];}_0x11cf28=this['postcssScss'];}else{if(_0x113c2b==='less'){if(!this[_0x525641(0x148)]){const _0x345bb0=await import('postcss-less');this['postcssLess']=_0x345bb0[_0x525641(0x15a)];}_0x11cf28=this['postcssLess'];}}const _0x481f96=this[_0x525641(0x16c)]()['process'](_0x2032b9,{'from':_0x18faf0,'syntax':_0x11cf28}),_0x34f546=_0x481f96[_0x525641(0x163)];this['logger']?.[_0x525641(0x18c)](_0x525641(0x14b),{'file':_0x18faf0});}catch(_0x3333e7){const _0xb38233=this[_0x525641(0x16e)](_0x3333e7,_0x18faf0);_0xb38233&&_0xae0f43[_0x525641(0x150)](_0xb38233);}return _0xae0f43;}async[a0_0x1df93b(0x156)](_0x390a5d,_0x7c928,_0x2befa3){const _0x43055a=a0_0x1df93b,_0x498a7d=[];try{if(!this[_0x43055a(0x157)]){const _0xc4f61=await import('stylelint');this[_0x43055a(0x157)]=_0xc4f61['default'];}const _0x32e32a={'extends':[_0x43055a(0x15f)],'rules':{'color-no-invalid-hex':!![],'font-family-no-duplicate-names':!![],'function-calc-no-invalid':!![],'string-no-newline':!![],'unit-no-unknown':!![],'property-no-unknown':!![],'declaration-block-no-duplicate-properties':!![],'selector-pseudo-class-no-unknown':!![],'selector-pseudo-element-no-unknown':!![],'selector-type-no-unknown':[!![],{'ignoreTypes':['/^custom-/',_0x43055a(0x168)]}],'media-feature-name-no-unknown':!![],'at-rule-no-unknown':_0x2befa3===_0x43055a(0x16d)?[!![],{'ignoreAtRules':['mixin',_0x43055a(0x169),'extend','if',_0x43055a(0x155),'for',_0x43055a(0x186),'while','function',_0x43055a(0x173),_0x43055a(0x16f),'use',_0x43055a(0x17f)]}]:_0x2befa3===_0x43055a(0x15c)?[!![],{'ignoreAtRules':['plugin']}]:!![],'comment-no-empty':!![],'no-duplicate-selectors':!![],'no-empty-source':null,'block-no-empty':!![],'declaration-block-no-shorthand-property-overrides':!![],'font-family-no-missing-generic-family-keyword':!![],'function-linear-gradient-no-nonstandard-direction':!![],'no-descending-specificity':null,'no-duplicate-at-import-rules':!![],'no-extra-semicolons':!![],'no-invalid-double-slash-comments':!![],'selector-pseudo-element-colon-notation':_0x43055a(0x158),'selector-type-case':_0x43055a(0x14a)},'customSyntax':_0x2befa3==='scss'?_0x43055a(0x164):_0x2befa3===_0x43055a(0x15c)?_0x43055a(0x187):undefined},_0x499abd=await this[_0x43055a(0x157)]['lint']({'code':_0x7c928,'codeFilename':_0x390a5d,'config':_0x32e32a});if(_0x499abd[_0x43055a(0x161)]&&_0x499abd['results']['length']>0x0){const _0x32f1c8=_0x499abd['results'][0x0];if(_0x32f1c8[_0x43055a(0x166)])for(const _0x367ba4 of _0x32f1c8['warnings']){_0x498a7d[_0x43055a(0x150)]({'file':_0x390a5d,'line':_0x367ba4['line']||0x1,'column':_0x367ba4[_0x43055a(0x149)]||0x1,'severity':_0x367ba4['severity']===_0x43055a(0x177)?STATIC_ANALYSIS['SEVERITY']['ERROR']:STATIC_ANALYSIS[_0x43055a(0x16b)][_0x43055a(0x172)],'rule':_0x367ba4['rule']||'unknown','message':_0x367ba4['text'],'category':this['categorizeStylelintRule'](_0x367ba4['rule']),'fixable':![],'source':'stylelint'});}}}catch(_0x3b8b9e){this[_0x43055a(0x18a)]?.[_0x43055a(0x146)](_0x43055a(0x18d),{'file':_0x390a5d,'error':_0x3b8b9e['message']});}return _0x498a7d;}[a0_0x1df93b(0x16e)](_0x4d7353,_0x209627){const _0x49edb9=a0_0x1df93b;return{'file':_0x209627,'line':_0x4d7353[_0x49edb9(0x181)]||0x1,'column':_0x4d7353[_0x49edb9(0x149)]||0x1,'severity':STATIC_ANALYSIS[_0x49edb9(0x16b)][_0x49edb9(0x17e)],'rule':_0x4d7353[_0x49edb9(0x159)]||'CssSyntaxError','message':_0x4d7353[_0x49edb9(0x171)]||_0x4d7353['message'],'category':STATIC_ANALYSIS[_0x49edb9(0x174)][_0x49edb9(0x175)],'fixable':![],'source':'postcss','code':_0x4d7353[_0x49edb9(0x170)]||undefined};}[a0_0x1df93b(0x153)](_0x259e18){const _0x426f7d=a0_0x1df93b;if(!_0x259e18)return STATIC_ANALYSIS[_0x426f7d(0x174)]['STYLE'];const _0x161e58=_0x259e18[_0x426f7d(0x185)]();if(_0x161e58[_0x426f7d(0x17d)]('no-invalid')||_0x161e58['includes']('no-unknown')||_0x161e58['includes'](_0x426f7d(0x167))||_0x161e58[_0x426f7d(0x17d)]('syntax'))return STATIC_ANALYSIS[_0x426f7d(0x174)]['SYNTAX'];if(_0x161e58['includes'](_0x426f7d(0x154))||_0x161e58[_0x426f7d(0x17d)](_0x426f7d(0x18b)))return STATIC_ANALYSIS['CATEGORY']['PERFORMANCE'];if(_0x161e58[_0x426f7d(0x17d)](_0x426f7d(0x16a))||_0x161e58['includes'](_0x426f7d(0x17b)))return STATIC_ANALYSIS[_0x426f7d(0x174)][_0x426f7d(0x14e)];return STATIC_ANALYSIS['CATEGORY'][_0x426f7d(0x15d)];}[a0_0x1df93b(0x152)](_0x916852){const _0x207736=a0_0x1df93b,_0x3a0379=_0x916852[_0x207736(0x185)]();if(_0x3a0379[_0x207736(0x182)]('.scss')||_0x3a0379[_0x207736(0x182)](_0x207736(0x189)))return'scss';if(_0x3a0379['endsWith']('.less'))return _0x207736(0x15c);return _0x207736(0x178);}[a0_0x1df93b(0x151)](){const _0x5449a5=a0_0x1df93b;return[_0x5449a5(0x176),'.scss',_0x5449a5(0x189),'.less'];}['supportsAutoFix'](){return![];}}export default CSSAnalyzer;function a0_0x2512(){const _0x3a6c5e=['Aw5JBhvKzq','yMvZDc1WCMfJDgLJzq','u0vwrvjjvfK','Cg9ZDgnZCW','C2nZCW','zM9YBwf0ug9ZDentu0vYCM9Y','y29UDgvUDa','C291CMnL','CMvHC29U','v0fstKLorW','CMv0DxjU','q0furuDpuLK','u1Lovefy','lMnZCW','zxjYB3i','y3nZ','ntm5mZm0BuzuDwDz','yw5HBhL6zq','CMvJB21Tzw5Kzwq','q1ntigfUywX5C2LZigzHAwXLza','Aw5JBhvKzxm','rvjst1i','zM9YD2fYza','BwvZC2fNzq','BgLUzq','zw5KC1DPDgG','C2v2zxjPDhK','mtyYmtaWog1XEwjWzG','Dg9mB3DLCKnHC2u','zwfJAa','Cg9ZDgnZCY1SzxnZ','mtiZmdeWr1nJsfzJ','lNnHC3m','Bg9Nz2vY','B3b0Aw1PEMu','zgvIDwC','u3r5BgvSAw50igfUywX5C2LZigzHAwXLza','D2fYBG','BgvUz3rO','Cg9ZDgnZC0XLC3m','y29SDw1U','Bg93zxi','ug9ZDentuYbZEw50yxGGy2HLy2SGCgfZC2vK','nJu0otKWuNv2Axvs','y2HLy2TtEw50yxG','qKvtvf9quKfdveLdrq','mtCWntv4CLzzz0G','ChvZAa','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','zgv0zwn0tgfUz3vHz2u','y2f0zwDVCML6zvn0EwXLBgLUDfj1Bgu','CgvYzM9YBwfUy2u','zwXZzq','BgLUDfn0EwXLCW','C3r5BgvSAw50','zg91yMXL','BMfTzq','zgvMyxvSDa','Cg9ZDgnZC1nJC3m','BgvZCW','u1rzteu','mZGWme5Nz2rWqq','C3r5BgvSAw50lwnVBMzPzY1ZDgfUzgfYza','nJmYntCWt3zxr1jc','CMvZDwX0CW','nJbkB05oswe','CM9VDa','Cg9ZDgnZCY1Zy3nZ','mJa5mdiWwvjVD2Do','D2fYBMLUz3m','BM8Tzw1WDhK','BMCTzgvLCa'];a0_0x2512=function(){return _0x3a6c5e;};return a0_0x2512();}
1
+ const a0_0x9bcabf=a0_0x4f6b;(function(_0x46b0df,_0x5336c9){const _0x2e7fdd=a0_0x4f6b,_0x4dca8f=_0x46b0df();while(!![]){try{const _0x564d7d=-parseInt(_0x2e7fdd(0x1c5))/0x1+parseInt(_0x2e7fdd(0x1d5))/0x2*(parseInt(_0x2e7fdd(0x199))/0x3)+-parseInt(_0x2e7fdd(0x1d3))/0x4+-parseInt(_0x2e7fdd(0x1af))/0x5*(parseInt(_0x2e7fdd(0x1b7))/0x6)+parseInt(_0x2e7fdd(0x19d))/0x7+-parseInt(_0x2e7fdd(0x1b6))/0x8+-parseInt(_0x2e7fdd(0x1a3))/0x9*(-parseInt(_0x2e7fdd(0x1a2))/0xa);if(_0x564d7d===_0x5336c9)break;else _0x4dca8f['push'](_0x4dca8f['shift']());}catch(_0x4c109d){_0x4dca8f['push'](_0x4dca8f['shift']());}}}(a0_0x2741,0xb7af2));import{STATIC_ANALYSIS}from'../utilities/constants.js';class CSSAnalyzer{constructor(_0x1d501b=null){const _0x4707cd=a0_0x4f6b;this['logger']=_0x1d501b,this['stylelint']=null,this['postcss']=null,this['postcssScss']=null,this[_0x4707cd(0x1c3)]=null;}async[a0_0x9bcabf(0x1da)](_0xada45f,_0x5c24ed,_0x46a196={}){const _0x416a69=a0_0x9bcabf;try{const _0x187651=[],_0x4d9977=this['detectLanguage'](_0xada45f),_0x557654=await this[_0x416a69(0x1cd)](_0xada45f,_0x5c24ed,_0x4d9977);_0x187651['push'](..._0x557654);if(_0x557654[_0x416a69(0x1b3)]===0x0){const _0x3b17aa=await this[_0x416a69(0x1b8)](_0xada45f,_0x5c24ed,_0x4d9977);_0x187651[_0x416a69(0x1c1)](..._0x3b17aa);}return this[_0x416a69(0x1ab)]?.[_0x416a69(0x1a7)]('CSS\x20analysis\x20completed',{'file':_0xada45f,'language':_0x4d9977,'totalDiagnostics':_0x187651['length'],'errors':_0x187651[_0x416a69(0x1c7)](_0x12fe4d=>_0x12fe4d['severity']===STATIC_ANALYSIS['SEVERITY'][_0x416a69(0x19e)])['length'],'warnings':_0x187651['filter'](_0x5142cf=>_0x5142cf[_0x416a69(0x1d7)]===STATIC_ANALYSIS[_0x416a69(0x1c8)][_0x416a69(0x1c0)])[_0x416a69(0x1b3)]}),_0x187651;}catch(_0x200a15){return this['logger']?.[_0x416a69(0x1d4)](_0x416a69(0x1c4),{'file':_0xada45f,'error':_0x200a15['message']}),[];}}async['checkSyntax'](_0xdd29cc,_0x70df33,_0x4f506d){const _0x343dd4=a0_0x9bcabf,_0x827dc9=[];try{if(!this['postcss']){const _0x171a4d=await import('postcss');this[_0x343dd4(0x19a)]=_0x171a4d[_0x343dd4(0x1a5)];}let _0x1d4ac7=null;if(_0x4f506d==='scss'){if(!this[_0x343dd4(0x1ba)]){const _0xc7c943=await import(_0x343dd4(0x198));this['postcssScss']=_0xc7c943['default'];}_0x1d4ac7=this['postcssScss'];}else{if(_0x4f506d==='less'){if(!this[_0x343dd4(0x1c3)]){const _0x273645=await import(_0x343dd4(0x19c));this['postcssLess']=_0x273645[_0x343dd4(0x1a5)];}_0x1d4ac7=this[_0x343dd4(0x1c3)];}}const _0x4ef52f=this['postcss']()['process'](_0x70df33,{'from':_0xdd29cc,'syntax':_0x1d4ac7}),_0x2730f2=_0x4ef52f[_0x343dd4(0x1ca)];this[_0x343dd4(0x1ab)]?.['debug']('PostCSS\x20syntax\x20check\x20passed',{'file':_0xdd29cc});}catch(_0x7f536c){const _0x35f1a5=this['formatPostCSSError'](_0x7f536c,_0xdd29cc);_0x35f1a5&&_0x827dc9['push'](_0x35f1a5);}return _0x827dc9;}async[a0_0x9bcabf(0x1b8)](_0x4db899,_0x2e3e55,_0x2f5d01){const _0x5f4b21=a0_0x9bcabf,_0x4b9c89=[];try{if(!this['stylelint']){const _0x583362=await import(_0x5f4b21(0x1aa));this['stylelint']=_0x583362['default'];}const _0x304266={'extends':['stylelint-config-standard'],'rules':{'color-no-invalid-hex':!![],'font-family-no-duplicate-names':!![],'function-calc-no-invalid':!![],'string-no-newline':!![],'unit-no-unknown':!![],'property-no-unknown':!![],'declaration-block-no-duplicate-properties':!![],'selector-pseudo-class-no-unknown':!![],'selector-pseudo-element-no-unknown':!![],'selector-type-no-unknown':[!![],{'ignoreTypes':[_0x5f4b21(0x1cb),_0x5f4b21(0x1ad)]}],'media-feature-name-no-unknown':!![],'at-rule-no-unknown':_0x2f5d01==='scss'?[!![],{'ignoreAtRules':[_0x5f4b21(0x1cc),'include',_0x5f4b21(0x1b5),'if','else','for',_0x5f4b21(0x1bd),'while',_0x5f4b21(0x1d6),'return','content',_0x5f4b21(0x1d1),'forward']}]:_0x2f5d01===_0x5f4b21(0x1bb)?[!![],{'ignoreAtRules':[_0x5f4b21(0x1bc)]}]:!![],'comment-no-empty':!![],'no-duplicate-selectors':!![],'no-empty-source':null,'block-no-empty':!![],'declaration-block-no-shorthand-property-overrides':!![],'font-family-no-missing-generic-family-keyword':!![],'function-linear-gradient-no-nonstandard-direction':!![],'no-descending-specificity':null,'no-duplicate-at-import-rules':!![],'no-extra-semicolons':!![],'no-invalid-double-slash-comments':!![],'selector-pseudo-element-colon-notation':'double','selector-type-case':_0x5f4b21(0x1d9)},'customSyntax':_0x2f5d01===_0x5f4b21(0x1a4)?'postcss-scss':_0x2f5d01===_0x5f4b21(0x1bb)?'postcss-less':undefined},_0x2e536=await this[_0x5f4b21(0x1aa)][_0x5f4b21(0x1d0)]({'code':_0x2e3e55,'codeFilename':_0x4db899,'config':_0x304266});if(_0x2e536['results']&&_0x2e536[_0x5f4b21(0x1be)]['length']>0x0){const _0x491341=_0x2e536[_0x5f4b21(0x1be)][0x0];if(_0x491341['warnings'])for(const _0x51cf66 of _0x491341[_0x5f4b21(0x1b4)]){_0x4b9c89[_0x5f4b21(0x1c1)]({'file':_0x4db899,'line':_0x51cf66[_0x5f4b21(0x1b1)]||0x1,'column':_0x51cf66['column']||0x1,'severity':_0x51cf66[_0x5f4b21(0x1d7)]===_0x5f4b21(0x1d4)?STATIC_ANALYSIS[_0x5f4b21(0x1c8)][_0x5f4b21(0x19e)]:STATIC_ANALYSIS[_0x5f4b21(0x1c8)][_0x5f4b21(0x1c0)],'rule':_0x51cf66[_0x5f4b21(0x1ce)]||'unknown','message':_0x51cf66[_0x5f4b21(0x1c2)],'category':this['categorizeStylelintRule'](_0x51cf66[_0x5f4b21(0x1ce)]),'fixable':![],'source':_0x5f4b21(0x1aa)});}}}catch(_0x57f9dd){this[_0x5f4b21(0x1ab)]?.[_0x5f4b21(0x1c6)]('Stylelint\x20analysis\x20failed',{'file':_0x4db899,'error':_0x57f9dd[_0x5f4b21(0x1ac)]});}return _0x4b9c89;}['formatPostCSSError'](_0x2b2761,_0x5741c1){const _0x2881cc=a0_0x9bcabf;return{'file':_0x5741c1,'line':_0x2b2761[_0x2881cc(0x1b1)]||0x1,'column':_0x2b2761[_0x2881cc(0x1d8)]||0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x2881cc(0x19e)],'rule':_0x2b2761['name']||'CssSyntaxError','message':_0x2b2761[_0x2881cc(0x1a0)]||_0x2b2761[_0x2881cc(0x1ac)],'category':STATIC_ANALYSIS[_0x2881cc(0x1cf)]['SYNTAX'],'fixable':![],'source':_0x2881cc(0x19a),'code':_0x2b2761[_0x2881cc(0x1bf)]||undefined};}[a0_0x9bcabf(0x1a6)](_0x1f31af){const _0x556bac=a0_0x9bcabf;if(!_0x1f31af)return STATIC_ANALYSIS[_0x556bac(0x1cf)]['STYLE'];const _0x4a72de=_0x1f31af['toLowerCase']();if(_0x4a72de[_0x556bac(0x1b0)]('no-invalid')||_0x4a72de['includes'](_0x556bac(0x1a1))||_0x4a72de[_0x556bac(0x1b0)]('no-empty')||_0x4a72de['includes']('syntax'))return STATIC_ANALYSIS['CATEGORY']['SYNTAX'];if(_0x4a72de['includes'](_0x556bac(0x1a8))||_0x4a72de[_0x556bac(0x1b0)]('optimize'))return STATIC_ANALYSIS[_0x556bac(0x1cf)][_0x556bac(0x19b)];if(_0x4a72de[_0x556bac(0x1b0)]('best-practice')||_0x4a72de[_0x556bac(0x1b0)](_0x556bac(0x1ae)))return STATIC_ANALYSIS['CATEGORY'][_0x556bac(0x1a9)];return STATIC_ANALYSIS['CATEGORY'][_0x556bac(0x1d2)];}['detectLanguage'](_0x346bde){const _0x53c656=a0_0x9bcabf,_0xae8f6c=_0x346bde['toLowerCase']();if(_0xae8f6c[_0x53c656(0x1c9)](_0x53c656(0x1db))||_0xae8f6c['endsWith']('.sass'))return'scss';if(_0xae8f6c['endsWith']('.less'))return _0x53c656(0x1bb);return'css';}[a0_0x9bcabf(0x19f)](){const _0x538435=a0_0x9bcabf;return['.css','.scss',_0x538435(0x1b2),_0x538435(0x1b9)];}['supportsAutoFix'](){return![];}}function a0_0x2741(){const _0x5c4f13=['y2HLy2TtEw50yxG','CNvSzq','q0furuDpuLK','BgLUDa','DxnL','u1rzteu','ndq2ndmYogT5uKPiqq','zxjYB3i','mLzRA01tra','zNvUy3rPB24','C2v2zxjPDhK','y29SDw1U','Bg93zxi','yw5HBhL6zq','lNnJC3m','Cg9ZDgnZCY1Zy3nZ','mJe3mZuZow1qExHPvG','Cg9ZDgnZCW','uevsrK9stufoq0u','Cg9ZDgnZCY1SzxnZ','nZi1mZe1nuLUqxDjrW','rvjst1i','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','CMvHC29U','BM8TDw5RBM93BG','mtC3otyWEg5SCw1I','mtmXngjjBuzkwa','C2nZCW','zgvMyxvSDa','y2f0zwDVCML6zvn0EwXLBgLUDfj1Bgu','zgvIDwC','CgvYzM9YBwfUy2u','qKvtvf9quKfdveLdrq','C3r5BgvSAw50','Bg9Nz2vY','BwvZC2fNzq','BMCTzgvLCa','CMvJB21Tzw5Kzwq','mta3nZy4nxHxwKXkEa','Aw5JBhvKzxm','BgLUzq','lNnHC3m','BgvUz3rO','D2fYBMLUz3m','zxH0zw5K','oda4odi4meztuefIwG','mZzREgrSEMu','BgLUDfn0EwXLCW','lMXLC3m','Cg9ZDgnZC1nJC3m','BgvZCW','CgX1z2LU','zwfJAa','CMvZDwX0CW','C291CMnL','v0fstKLorW','ChvZAa','Dgv4Da','Cg9ZDgnZC0XLC3m','q1ntigfUywX5C2LZigzHAwXLza','mtG2mtG1q2vruhf0','D2fYBG','zMLSDgvY','u0vwrvjjvfK','zw5KC1DPDgG','CM9VDa','l15JDxn0B20TlW','BwL4Aw4'];a0_0x2741=function(){return _0x5c4f13;};return a0_0x2741();}function a0_0x4f6b(_0x4ce494,_0x558bd3){_0x4ce494=_0x4ce494-0x198;const _0x2741c0=a0_0x2741();let _0x4f6bac=_0x2741c0[_0x4ce494];if(a0_0x4f6b['YSyQKP']===undefined){var _0x52a243=function(_0x2fc751){const _0x23e391='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1d501b='',_0xada45f='';for(let _0x5c24ed=0x0,_0x46a196,_0x187651,_0x4d9977=0x0;_0x187651=_0x2fc751['charAt'](_0x4d9977++);~_0x187651&&(_0x46a196=_0x5c24ed%0x4?_0x46a196*0x40+_0x187651:_0x187651,_0x5c24ed++%0x4)?_0x1d501b+=String['fromCharCode'](0xff&_0x46a196>>(-0x2*_0x5c24ed&0x6)):0x0){_0x187651=_0x23e391['indexOf'](_0x187651);}for(let _0x557654=0x0,_0x3b17aa=_0x1d501b['length'];_0x557654<_0x3b17aa;_0x557654++){_0xada45f+='%'+('00'+_0x1d501b['charCodeAt'](_0x557654)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xada45f);};a0_0x4f6b['mPuXpf']=_0x52a243,a0_0x4f6b['jRLWgo']={},a0_0x4f6b['YSyQKP']=!![];}const _0x462f7f=_0x2741c0[0x0],_0x151753=_0x4ce494+_0x462f7f,_0x2ae56d=a0_0x4f6b['jRLWgo'][_0x151753];return!_0x2ae56d?(_0x4f6bac=a0_0x4f6b['mPuXpf'](_0x4f6bac),a0_0x4f6b['jRLWgo'][_0x151753]=_0x4f6bac):_0x4f6bac=_0x2ae56d,_0x4f6bac;}export default CSSAnalyzer;
@@ -1 +1 @@
1
- const a0_0x492102=a0_0x406e;(function(_0x4f7eb2,_0x1d603e){const _0x20a513=a0_0x406e,_0x4355e3=_0x4f7eb2();while(!![]){try{const _0xfdd2c4=parseInt(_0x20a513(0x1b4))/0x1+parseInt(_0x20a513(0x1c0))/0x2*(-parseInt(_0x20a513(0x1ad))/0x3)+parseInt(_0x20a513(0x1dc))/0x4*(parseInt(_0x20a513(0x1f5))/0x5)+-parseInt(_0x20a513(0x1be))/0x6*(parseInt(_0x20a513(0x193))/0x7)+parseInt(_0x20a513(0x1ef))/0x8*(parseInt(_0x20a513(0x199))/0x9)+parseInt(_0x20a513(0x1ea))/0xa*(parseInt(_0x20a513(0x181))/0xb)+parseInt(_0x20a513(0x1d4))/0xc*(parseInt(_0x20a513(0x184))/0xd);if(_0xfdd2c4===_0x1d603e)break;else _0x4355e3['push'](_0x4355e3['shift']());}catch(_0x294576){_0x4355e3['push'](_0x4355e3['shift']());}}}(a0_0x41a0,0xc9bda));import{exec}from'child_process';import{promisify}from'util';import a0_0x1c908d from'path';import a0_0x314b12 from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';function a0_0x406e(_0x1bc81e,_0x51b159){_0x1bc81e=_0x1bc81e-0x17f;const _0x41a0de=a0_0x41a0();let _0x406e56=_0x41a0de[_0x1bc81e];if(a0_0x406e['CTJsfX']===undefined){var _0x1e3e82=function(_0x2c75b9){const _0x3a7632='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1c908d='',_0x314b12='';for(let _0x2b0992=0x0,_0x501d7c,_0xcc5350,_0x2b103c=0x0;_0xcc5350=_0x2c75b9['charAt'](_0x2b103c++);~_0xcc5350&&(_0x501d7c=_0x2b0992%0x4?_0x501d7c*0x40+_0xcc5350:_0xcc5350,_0x2b0992++%0x4)?_0x1c908d+=String['fromCharCode'](0xff&_0x501d7c>>(-0x2*_0x2b0992&0x6)):0x0){_0xcc5350=_0x3a7632['indexOf'](_0xcc5350);}for(let _0x29c184=0x0,_0x1b34ff=_0x1c908d['length'];_0x29c184<_0x1b34ff;_0x29c184++){_0x314b12+='%'+('00'+_0x1c908d['charCodeAt'](_0x29c184)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x314b12);};a0_0x406e['FRLYBw']=_0x1e3e82,a0_0x406e['Lsrvvw']={},a0_0x406e['CTJsfX']=!![];}const _0x15f181=_0x41a0de[0x0],_0x2c0d5b=_0x1bc81e+_0x15f181,_0x2dfb1c=a0_0x406e['Lsrvvw'][_0x2c0d5b];return!_0x2dfb1c?(_0x406e56=a0_0x406e['FRLYBw'](_0x406e56),a0_0x406e['Lsrvvw'][_0x2c0d5b]=_0x406e56):_0x406e56=_0x2dfb1c,_0x406e56;}const execAsync=promisify(exec);class ConfigValidator{constructor(_0x2b0992=null){const _0x42d219=a0_0x406e;this[_0x42d219(0x189)]=_0x2b0992,this[_0x42d219(0x1f6)]=null,this[_0x42d219(0x1c4)]=new Map();}async['detectAvailableValidators'](){const _0x39db7e=a0_0x406e;if(this['availableScanners']!==null)return this[_0x39db7e(0x1f6)];const _0x501d7c={'checkov':![],'hadolint':![],'yamllint':![],'jsonSchema':![]};try{await execAsync('checkov\x20--version',{'timeout':0x1388}),_0x501d7c['checkov']=!![],this['logger']?.['debug'](_0x39db7e(0x18f));}catch(_0xcc5350){this[_0x39db7e(0x189)]?.[_0x39db7e(0x1d6)]('checkov\x20not\x20available',{'error':_0xcc5350['message']});}try{await execAsync('hadolint\x20--version',{'timeout':0x1388}),_0x501d7c['hadolint']=!![],this['logger']?.[_0x39db7e(0x1d6)](_0x39db7e(0x187));}catch(_0x2b103c){this['logger']?.['debug'](_0x39db7e(0x1cb),{'error':_0x2b103c['message']});}try{await execAsync('yamllint\x20--version',{'timeout':0x1388}),_0x501d7c[_0x39db7e(0x1a3)]=!![],this['logger']?.[_0x39db7e(0x1d6)](_0x39db7e(0x1e8));}catch(_0x29c184){this['logger']?.['debug'](_0x39db7e(0x1e7),{'error':_0x29c184['message']});}try{await import(_0x39db7e(0x1f9)),_0x501d7c['jsonSchema']=!![],this[_0x39db7e(0x189)]?.['debug'](_0x39db7e(0x1aa));}catch(_0x1b34ff){this[_0x39db7e(0x189)]?.['debug']('ajv\x20not\x20available',{'error':_0x1b34ff['message']});}return this['availableScanners']=_0x501d7c,_0x501d7c;}async[a0_0x492102(0x190)](_0x3c0fe7,_0x5da177={}){const _0x1cf86c=a0_0x492102,_0x1aa984=[],_0x2831be=await this[_0x1cf86c(0x1c7)](),_0x124f59=this['detectFileType'](_0x3c0fe7);this['logger']?.['debug']('Validating\x20config\x20file',{'filePath':_0x3c0fe7,'fileType':_0x124f59});switch(_0x124f59){case'dockerfile':if(_0x2831be[_0x1cf86c(0x1ec)]){const _0x5ca3f7=await this['validateDockerfile'](_0x3c0fe7,_0x5da177);_0x1aa984[_0x1cf86c(0x1b7)](..._0x5ca3f7);}if(_0x2831be[_0x1cf86c(0x1c5)]){const _0x81ed1c=await this['validateWithCheckov'](_0x3c0fe7,_0x1cf86c(0x1fa),_0x5da177);_0x1aa984[_0x1cf86c(0x1b7)](..._0x81ed1c);}break;case _0x1cf86c(0x1a7):if(_0x2831be[_0x1cf86c(0x1a3)]){const _0x99a713=await this[_0x1cf86c(0x1d8)](_0x3c0fe7,_0x5da177);_0x1aa984['push'](..._0x99a713);}if(_0x2831be['checkov']){const _0x3f6559=await this[_0x1cf86c(0x1cc)](_0x3c0fe7,_0x1cf86c(0x1fc),_0x5da177);_0x1aa984['push'](..._0x3f6559);}break;case _0x1cf86c(0x1f4):if(_0x2831be['yamllint']){const _0x5a5eec=await this['validateYAML'](_0x3c0fe7,_0x5da177);_0x1aa984[_0x1cf86c(0x1b7)](..._0x5a5eec);}if(_0x2831be['checkov']){const _0x185601=await this[_0x1cf86c(0x1cc)](_0x3c0fe7,_0x1cf86c(0x1f4),_0x5da177);_0x1aa984[_0x1cf86c(0x1b7)](..._0x185601);}break;case _0x1cf86c(0x1d7):if(_0x2831be[_0x1cf86c(0x1c5)]){const _0xb11c5d=await this[_0x1cf86c(0x1cc)](_0x3c0fe7,'terraform',_0x5da177);_0x1aa984[_0x1cf86c(0x1b7)](..._0xb11c5d);}break;case'package.json':if(_0x2831be['jsonSchema']){const _0x3749c0=await this[_0x1cf86c(0x1b8)](_0x3c0fe7,_0x5da177);_0x1aa984[_0x1cf86c(0x1b7)](..._0x3749c0);}break;case _0x1cf86c(0x1d2):if(_0x2831be['jsonSchema']){const _0x52a4cc=await this['validateTsConfig'](_0x3c0fe7,_0x5da177);_0x1aa984[_0x1cf86c(0x1b7)](..._0x52a4cc);}break;case _0x1cf86c(0x1f8):if(_0x2831be['yamllint']){const _0x168be7=await this['validateYAML'](_0x3c0fe7,_0x5da177);_0x1aa984[_0x1cf86c(0x1b7)](..._0x168be7);}break;case _0x1cf86c(0x1c1):const _0x5f15cb=await this['validateEnvFile'](_0x3c0fe7,_0x5da177);_0x1aa984[_0x1cf86c(0x1b7)](..._0x5f15cb);break;case _0x1cf86c(0x1af):if(_0x2831be['yamllint']){const _0x2f178c=await this[_0x1cf86c(0x1d8)](_0x3c0fe7,_0x5da177);_0x1aa984[_0x1cf86c(0x1b7)](..._0x2f178c);}break;default:this['logger']?.['warn'](_0x1cf86c(0x1e0),{'filePath':_0x3c0fe7,'fileType':_0x124f59});return[];}return this[_0x1cf86c(0x1f3)](_0x1aa984);}async[a0_0x492102(0x19f)](_0x2dfd66,_0x4d06ea={}){const _0x25340e=a0_0x492102;try{const _0x36247a=await execAsync(_0x25340e(0x1ac)+_0x2dfd66+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0x43be32=JSON['parse'](_0x36247a['stdout']);return this[_0x25340e(0x1e4)](_0x43be32,_0x2dfd66);}catch(_0x2a39b7){if(_0x2a39b7[_0x25340e(0x1a1)])try{const _0x33ea90=JSON['parse'](_0x2a39b7[_0x25340e(0x1a1)]);return this['parseHadolintResults'](_0x33ea90,_0x2dfd66);}catch(_0x28cc49){this['logger']?.[_0x25340e(0x1f7)]('Failed\x20to\x20parse\x20hadolint\x20output',{'error':_0x28cc49['message']});}return this['logger']?.[_0x25340e(0x1f7)](_0x25340e(0x1b2),{'error':_0x2a39b7[_0x25340e(0x1cd)]}),[];}}['parseHadolintResults'](_0x4dd37c,_0x4e88c6){const _0x394ec2=a0_0x492102,_0x26baf6=[];if(Array[_0x394ec2(0x17f)](_0x4dd37c))for(const _0x155e7a of _0x4dd37c){_0x26baf6[_0x394ec2(0x1b7)]({'file':_0x4e88c6,'line':_0x155e7a[_0x394ec2(0x19c)]||0x1,'column':_0x155e7a['column']||0x1,'severity':this[_0x394ec2(0x1da)](_0x155e7a['level']),'rule':_0x155e7a['code'],'message':_0x155e7a['message'],'category':_0x394ec2(0x1fa),'validator':_0x394ec2(0x1ec)});}return _0x26baf6;}async['validateYAML'](_0xca43e6,_0x1fb700={}){const _0x4922f8=a0_0x492102;try{const _0x4fbac1=await execAsync(_0x4922f8(0x197)+_0xca43e6+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530});return this[_0x4922f8(0x1c8)](_0x4fbac1['stdout'],_0xca43e6);}catch(_0xdae334){if(_0xdae334['stdout'])return this['parseYamllintResults'](_0xdae334['stdout'],_0xca43e6);return this['logger']?.[_0x4922f8(0x1f7)](_0x4922f8(0x1a2),{'error':_0xdae334['message']}),[];}}[a0_0x492102(0x1c8)](_0x18505c,_0x14360a){const _0x4f5bf0=a0_0x492102,_0x4c9a9e=[],_0x2adacd=_0x18505c['split']('\x0a')['filter'](_0x2094d6=>_0x2094d6[_0x4f5bf0(0x1de)]());for(const _0x33f835 of _0x2adacd){const _0x40eef9=_0x33f835['match'](/^(.+?):(\d+):(\d+):\s*\[(\w+)\]\s*(.+?)\s*\((.+?)\)/);if(_0x40eef9){const [,_0x2f7d84,_0xd34b7f,_0x59df02,_0x4d5dcc,_0x580d70,_0x2c8b6e]=_0x40eef9;_0x4c9a9e['push']({'file':_0x14360a,'line':parseInt(_0xd34b7f,0xa),'column':parseInt(_0x59df02,0xa),'severity':this['mapYamllintSeverity'](_0x4d5dcc),'rule':_0x2c8b6e,'message':_0x580d70,'category':'yaml','validator':'yamllint'});}}return _0x4c9a9e;}async[a0_0x492102(0x1cc)](_0x4d7f7d,_0x56c5ef,_0x35ab11={}){const _0x3a14e7=a0_0x492102;try{const _0x1ce1a0=await execAsync('checkov\x20-f\x20\x22'+_0x4d7f7d+_0x3a14e7(0x1b3)+_0x56c5ef+'\x20--output\x20json\x20--compact',{'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0x251794=JSON[_0x3a14e7(0x1b0)](_0x1ce1a0[_0x3a14e7(0x1a1)]);return this[_0x3a14e7(0x1b5)](_0x251794,_0x4d7f7d);}catch(_0x44a675){if(_0x44a675[_0x3a14e7(0x1a1)])try{const _0x39e841=JSON['parse'](_0x44a675['stdout']);return this['parseCheckovResults'](_0x39e841,_0x4d7f7d);}catch(_0x59602b){this[_0x3a14e7(0x189)]?.[_0x3a14e7(0x1f7)]('Failed\x20to\x20parse\x20checkov\x20output',{'error':_0x59602b['message']});}return this['logger']?.['error'](_0x3a14e7(0x188),{'error':_0x44a675[_0x3a14e7(0x1cd)]}),[];}}['parseCheckovResults'](_0x84e899,_0x54410f){const _0x23472b=a0_0x492102,_0x28b0e2=[];if(_0x84e899[_0x23472b(0x1ba)]&&_0x84e899['results']['failed_checks'])for(const _0x429403 of _0x84e899[_0x23472b(0x1ba)][_0x23472b(0x185)]){_0x28b0e2[_0x23472b(0x1b7)]({'file':_0x54410f,'line':_0x429403['file_line_range']?_0x429403[_0x23472b(0x1bf)][0x0]:0x1,'column':0x1,'severity':this[_0x23472b(0x19e)](_0x429403[_0x23472b(0x1fb)]),'rule':_0x429403[_0x23472b(0x1a4)],'message':_0x429403['check_name']||_0x429403['check_id'],'category':'security','validator':'checkov','remediation':_0x429403['guideline'],'cwe':_0x429403[_0x23472b(0x180)],'references':_0x429403['guideline']?[_0x429403['guideline']]:[]});}return _0x28b0e2;}async[a0_0x492102(0x1b8)](_0x4eaafd,_0x3da684={}){const _0x587e7b=a0_0x492102;try{const _0x5a4f14=(await import('ajv'))['default'],_0x1163df=(await import(_0x587e7b(0x1a0)))['default'],_0x2796a4=await a0_0x314b12['readFile'](_0x4eaafd,'utf-8'),_0xd51720=JSON[_0x587e7b(0x1b0)](_0x2796a4),_0x4d6d95=new _0x5a4f14({'allErrors':!![],'strict':![]});_0x1163df(_0x4d6d95);const _0xd18d64={'type':_0x587e7b(0x1b6),'required':['name',_0x587e7b(0x1d3)],'properties':{'name':{'type':'string','pattern':'^(?:@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$'},'version':{'type':'string'},'description':{'type':_0x587e7b(0x1ca)},'main':{'type':'string'},'type':{'type':_0x587e7b(0x1ca),'enum':['module',_0x587e7b(0x1df)]},'scripts':{'type':'object'},'dependencies':{'type':'object'},'devDependencies':{'type':_0x587e7b(0x1b6)}},'additionalProperties':!![]},_0x4b5740=_0x4d6d95['compile'](_0xd18d64),_0x56529d=_0x4b5740(_0xd51720);if(!_0x56529d&&_0x4b5740[_0x587e7b(0x18d)])return _0x4b5740['errors'][_0x587e7b(0x1e6)](_0xf675f3=>({'file':_0x4eaafd,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x587e7b(0x1e1)][_0x587e7b(0x1bc)],'rule':'json-schema','message':_0xf675f3[_0x587e7b(0x18e)]?_0xf675f3['instancePath']+'\x20'+_0xf675f3[_0x587e7b(0x1cd)]:_0x587e7b(0x1b1)+_0xf675f3['params']['missingProperty']+'\x27','category':'validation','validator':'json-schema'}));return[];}catch(_0x33b43f){return this[_0x587e7b(0x189)]?.[_0x587e7b(0x1f7)]('package.json\x20validation\x20failed',{'error':_0x33b43f[_0x587e7b(0x1cd)]}),[{'file':_0x4eaafd,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x587e7b(0x1e1)][_0x587e7b(0x1bc)],'rule':'json-parse','message':'Invalid\x20JSON:\x20'+_0x33b43f['message'],'category':'syntax','validator':_0x587e7b(0x1f2)}];}}async['validateTsConfig'](_0x43e66,_0x799486={}){const _0x187a8a=a0_0x492102;try{const _0x37b472=await a0_0x314b12[_0x187a8a(0x1e9)](_0x43e66,_0x187a8a(0x194)),_0x21d32e=JSON[_0x187a8a(0x1b0)](_0x37b472),_0x3e8145=[];if(_0x21d32e[_0x187a8a(0x1ce)]){const _0x5b90d2=_0x21d32e['compilerOptions'];!_0x5b90d2[_0x187a8a(0x1eb)]&&_0x3e8145[_0x187a8a(0x1b7)]({'file':_0x43e66,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':'strict-mode','message':_0x187a8a(0x198),'category':'best-practice','validator':_0x187a8a(0x18b)}),_0x5b90d2[_0x187a8a(0x1bd)]===![]&&_0x3e8145[_0x187a8a(0x1b7)]({'file':_0x43e66,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x187a8a(0x1db)],'rule':_0x187a8a(0x191),'message':_0x187a8a(0x192),'category':_0x187a8a(0x1e3),'validator':_0x187a8a(0x18b)});}return _0x3e8145;}catch(_0x40c52f){return this['logger']?.['error'](_0x187a8a(0x1d5),{'error':_0x40c52f[_0x187a8a(0x1cd)]}),[{'file':_0x43e66,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x187a8a(0x1e1)]['ERROR'],'rule':'json-parse','message':'Invalid\x20JSON:\x20'+_0x40c52f[_0x187a8a(0x1cd)],'category':'syntax','validator':'json-parse'}];}}async['validateEnvFile'](_0x4b5886,_0x18176f={}){const _0x237f64=a0_0x492102;try{const _0x2f35cc=await a0_0x314b12[_0x237f64(0x1e9)](_0x4b5886,_0x237f64(0x194)),_0x11fd19=[],_0x5b5d22=_0x2f35cc[_0x237f64(0x1f1)]('\x0a'),_0xf65eb2=[{'pattern':/password|passwd|pwd/i,'name':_0x237f64(0x195)},{'pattern':/api[_-]?key/i,'name':_0x237f64(0x1c6)},{'pattern':/secret/i,'name':'secret'},{'pattern':/token/i,'name':'token'},{'pattern':/private[_-]?key/i,'name':'private\x20key'},{'pattern':/aws[_-]?access/i,'name':'AWS\x20credentials'}];return _0x5b5d22['forEach']((_0x13512a,_0x1c1cbe)=>{const _0x194349=_0x237f64,_0x1dbf3e=_0x13512a['trim']();if(!_0x1dbf3e||_0x1dbf3e[_0x194349(0x18a)]('#'))return;if(_0x1dbf3e[_0x194349(0x1c9)]('=')){const [_0x5db285,_0x452546]=_0x1dbf3e[_0x194349(0x1f1)]('='),_0x2aae29=_0x5db285[_0x194349(0x1fd)](),_0x5b9d61=_0x452546?.[_0x194349(0x1de)]()||'',_0x396b89=_0x5b9d61&&_0x5b9d61!==''&&!_0x5b9d61['startsWith']('$')&&_0x5b9d61!=='your-key-here'&&_0x5b9d61!=='changeme'&&_0x5b9d61[_0x194349(0x1ee)]>0x5;if(_0x396b89)for(const {pattern:_0x1d1b22,name:_0x15f77d}of _0xf65eb2){if(_0x1d1b22[_0x194349(0x1a8)](_0x2aae29)){_0x11fd19['push']({'file':_0x4b5886,'line':_0x1c1cbe+0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x194349(0x1e1)]['CRITICAL'],'rule':_0x194349(0x19d),'message':'Potential\x20hardcoded\x20'+_0x15f77d+'\x20detected\x20in\x20.env\x20file','category':_0x194349(0x18c),'validator':'env-validator','remediation':'Use\x20environment-specific\x20.env\x20files\x20and\x20add\x20.env\x20to\x20.gitignore'});break;}}}}),_0x11fd19;}catch(_0x32688e){return this['logger']?.[_0x237f64(0x1f7)](_0x237f64(0x1f0),{'error':_0x32688e['message']}),[];}}['detectFileType'](_0xd92638){const _0x147d52=a0_0x492102,_0x21a1c6=a0_0x1c908d[_0x147d52(0x1d9)](_0xd92638)['toLowerCase'](),_0x5826ae=a0_0x1c908d['dirname'](_0xd92638);if(_0x21a1c6==='dockerfile')return _0x147d52(0x1fa);if(_0x21a1c6==='docker-compose.yml'||_0x21a1c6===_0x147d52(0x1cf))return'docker-compose';if(_0x21a1c6==='package.json')return'package.json';if(_0x21a1c6==='tsconfig.json')return _0x147d52(0x1d2);if(_0x21a1c6===_0x147d52(0x1ab)||_0x21a1c6[_0x147d52(0x186)]('.env'))return _0x147d52(0x1c1);if(_0x5826ae[_0x147d52(0x1c9)](_0x147d52(0x1a6)))return'github-actions';if(_0x5826ae[_0x147d52(0x1c9)]('kubernetes')||_0x5826ae[_0x147d52(0x1c9)]('k8s'))return'kubernetes';const _0x24d1f9=a0_0x1c908d[_0x147d52(0x1a5)](_0xd92638)['toLowerCase']();if(_0x24d1f9===_0x147d52(0x1dd)||_0x24d1f9==='.tfvars')return _0x147d52(0x1d7);if(_0x24d1f9===_0x147d52(0x19a)||_0x24d1f9==='.yaml')return _0x147d52(0x1af);if(_0x24d1f9==='.json')return'json';return'unknown';}['normalizeResults'](_0x765061){const _0x312d4a=a0_0x492102;return _0x765061['map'](_0x36617c=>({'file':_0x36617c['file'],'line':_0x36617c[_0x312d4a(0x19c)]||0x1,'column':_0x36617c[_0x312d4a(0x1d0)]||0x1,'severity':_0x36617c['severity']||STATIC_ANALYSIS[_0x312d4a(0x1e1)][_0x312d4a(0x1db)],'rule':_0x36617c[_0x312d4a(0x1c3)]||'unknown','message':_0x36617c[_0x312d4a(0x1cd)]||_0x312d4a(0x1d1),'category':_0x36617c[_0x312d4a(0x183)]||'validation','validator':_0x36617c['validator'],'cwe':_0x36617c[_0x312d4a(0x180)]||null,'remediation':_0x36617c['remediation']||null,'references':_0x36617c[_0x312d4a(0x1bb)]||[]}));}['mapHadolintSeverity'](_0x3b73f8){const _0xc0e4cb=a0_0x492102,_0x358e2a={'error':STATIC_ANALYSIS['SEVERITY'][_0xc0e4cb(0x1bc)],'warning':STATIC_ANALYSIS[_0xc0e4cb(0x1e1)][_0xc0e4cb(0x1db)],'info':STATIC_ANALYSIS['SEVERITY'][_0xc0e4cb(0x1ed)],'style':STATIC_ANALYSIS[_0xc0e4cb(0x1e1)][_0xc0e4cb(0x1ed)]};return _0x358e2a[_0x3b73f8?.['toLowerCase']()]||STATIC_ANALYSIS['SEVERITY']['WARNING'];}['mapYamllintSeverity'](_0x3621bc){const _0x182bdb=a0_0x492102,_0x44d05a={'error':STATIC_ANALYSIS['SEVERITY'][_0x182bdb(0x1bc)],'warning':STATIC_ANALYSIS[_0x182bdb(0x1e1)][_0x182bdb(0x1db)]};return _0x44d05a[_0x3621bc?.[_0x182bdb(0x1fd)]()]||STATIC_ANALYSIS[_0x182bdb(0x1e1)][_0x182bdb(0x1db)];}['mapCheckovSeverity'](_0xe79726){const _0x38269d=a0_0x492102;return STATIC_ANALYSIS['SEVERITY'][_0x38269d(0x1bc)];}async[a0_0x492102(0x1e2)](){const _0x6981f6=a0_0x492102,_0x19eaf8=await this['detectAvailableValidators']();return{'validators':_0x19eaf8,'recommendations':this[_0x6981f6(0x1b9)](_0x19eaf8)};}['getInstallRecommendations'](_0x5057a9){const _0x43afed=a0_0x492102,_0x3022e3=[];return!_0x5057a9['checkov']&&_0x3022e3[_0x43afed(0x1b7)]({'validator':'checkov','reason':_0x43afed(0x1c2),'install':_0x43afed(0x19b),'priority':'high'}),!_0x5057a9[_0x43afed(0x1ec)]&&_0x3022e3['push']({'validator':'hadolint','reason':_0x43afed(0x1a9),'install':'Download from https://github.com/hadolint/hadolint/releases','priority':'high'}),!_0x5057a9[_0x43afed(0x1a3)]&&_0x3022e3['push']({'validator':_0x43afed(0x1a3),'reason':'YAML\x20file\x20validation','install':_0x43afed(0x182),'priority':_0x43afed(0x1e5)}),!_0x5057a9['jsonSchema']&&_0x3022e3[_0x43afed(0x1b7)]({'validator':_0x43afed(0x196),'reason':_0x43afed(0x1ae),'install':'npm\x20install\x20ajv\x20ajv-formats','priority':_0x43afed(0x1e5)}),_0x3022e3;}}function a0_0x41a0(){const _0x14170a=['sLnptIbJB25MAwD1CMf0Aw9UihzHBgLKyxrPB24','EwfTBa','CgfYC2u','BxvZDcbOyxzLihjLCxvPCMvKihbYB3bLCNr5icC','AgfKB2XPBNqGDMfSAwrHDgLVBIbMywLSzwq','iIaTlwzYyw1LD29YAYa','mtuWndG5mwffrxzYDq','CgfYC2vdAgvJA292uMvZDwX0CW','B2jQzwn0','ChvZAa','DMfSAwrHDgvqywnRywDLsNnVBG','z2v0sw5ZDgfSBfjLy29TBwvUzgf0Aw9UCW','CMvZDwX0CW','CMvMzxjLBMnLCW','rvjst1i','BM9jBxbSAwnPDefUEq','nMfbtxvcqq','zMLSzv9SAw5Lx3jHBMDL','mti2mdHJuLrLEgS','zw52','sw5MCMfZDhj1y3r1CMuGyxmGq29KzsbZzwn1CML0EsbZy2fUBMLUzYaOrg9JA2vYlcblDwjLCM5LDgvZlcbuzxjYywzVCM0P','CNvSzq','C2nHBM5LCKnHy2HL','y2HLy2TVDG','qvbjigTLEq','zgv0zwn0qxzHAwXHyMXLvMfSAwrHDg9YCW','CgfYC2vzyw1SBgLUDfjLC3vSDhm','Aw5JBhvKzxm','C3rYAw5N','AgfKB2XPBNqGBM90igf2ywLSywjSzq','DMfSAwrHDgvxAxrOq2HLy2TVDG','BwvZC2fNzq','y29TCgLSzxjpChrPB25Z','zg9JA2vYlwnVBxbVC2uUEwfTBa','y29SDw1U','vMfSAwrHDgLVBIbPC3n1zsbKzxrLy3rLza','DhnJB25MAwCUANnVBG','DMvYC2LVBG','ndC3mtK0ne1is0fvDa','DhnJB25MAwCUANnVBIb2ywXPzgf0Aw9UigzHAwXLza','zgvIDwC','DgvYCMfMB3jT','DMfSAwrHDgvzqu1m','yMfZzw5HBwu','BwfWsgfKB2XPBNrtzxzLCML0Eq','v0fstKLorW','nte2mZuYu1POwMDj','lNrM','DhjPBq','y29TBw9UANm','vw5RBM93BIbJB25MAwCGzMLSzsb0ExbL','u0vwrvjjvfK','z2v0vMfSAwrHDg9Yu3rHDhvZ','yMvZDc1WCMfJDgLJzq','CgfYC2viywrVBgLUDfjLC3vSDhm','BwvKAxvT','BwfW','EwfTBgXPBNqGBM90igf2ywLSywjSzq','EwfTBgXPBNqGzgv0zwn0zwq','CMvHzezPBgu','mZbjEeriCxq','C3rYAwn0','AgfKB2XPBNq','su5gtW','BgvUz3rO','nJC5ntjev3foB1K','lMvUDIb2ywXPzgf0Aw9UigzHAwXLza','C3bSAxq','ANnVBI1WyxjZzq','BM9YBwfSAxPLuMvZDwX0CW','A3vIzxjUzxrLCW','mZbhtK1JzwC','yxzHAwXHyMXLu2nHBM5LCNm','zxjYB3i','z2L0AhvIlwfJDgLVBNm','ywP2','zg9JA2vYzMLSzq','y2HLy2TFy2XHC3m','zg9JA2vYx2nVBxbVC2u','Dg9mB3DLCKnHC2u','AxnbCNjHEq','y3DL','mteWnJq5mhLcBuvntq','CgLWigLUC3rHBgWGEwfTBgXPBNq','y2f0zwDVCNK','mtnytLniy2W','zMfPBgvKx2nOzwnRCW','zw5KC1DPDgG','AgfKB2XPBNqGzgv0zwn0zwq','y2HLy2TVDIb2ywXPzgf0Aw9UigzHAwXLza','Bg9Nz2vY','C3rHCNrZv2L0Aa','DhnJB25MAwCTDMfSAwrHDg9Y','C2vJDxjPDhK','zxjYB3jZ','Aw5ZDgfUy2vqyxrO','y2HLy2TVDIbKzxrLy3rLza','DMfSAwrHDgu','BM8TAw1WBgLJAxqTyw55','rgLZywjSAw5Nig5Vsw1WBgLJAxrbBNKGCMvKDwnLCYb0ExbLihnHzMv0Eq','ota0ode3oxvOy2L5tW','DxrMltG','CgfZC3DVCMq','ywP2icHku09oifnJAgvTysK','EwfTBgXPBNqGlwyGCgfYC2fIBguGiG','q29UC2LKzxiGzw5HyMXPBMCGiNn0CMLJDciGBw9KzsbMB3iGyMv0DgvYihr5CguGC2fMzxr5','mZC4BNnuEerg','lNLTBa','CgLWigLUC3rHBgWGy2HLy2TVDG','BgLUzq','AgfYzgnVzgvKlxnLy3jLDa','BwfWq2HLy2TVDLnLDMvYAxr5','DMfSAwrHDgveB2nRzxjMAwXL','ywP2lwzVCM1HDhm','C3rKB3v0','EwfTBgXPBNqGDMfSAwrHDgLVBIbMywLSzwq','EwfTBgXPBNq','y2HLy2TFAwq','zxH0BMfTzq','lMDPDgH1yI93B3jRzMXVD3m','zg9JA2vYlwnVBxbVC2u','DgvZDa','rg9JA2vYzMLSzsbSAw50Aw5NigfUzcbIzxn0ihbYywn0AwnLCW','sLnptIbty2HLBweGDMfSAwrHDgLVBIbHDMfPBgfIBgu','lMvUDG','AgfKB2XPBNqGls1MB3jTyxqGANnVBIaI','ntC5qxzkANrL'];a0_0x41a0=function(){return _0x14170a;};return a0_0x41a0();}export default ConfigValidator;
1
+ const a0_0x4253e6=a0_0x2b15;function a0_0x2b15(_0x4db42d,_0x247a43){_0x4db42d=_0x4db42d-0x1d4;const _0xa6c53a=a0_0xa6c5();let _0x2b15d8=_0xa6c53a[_0x4db42d];if(a0_0x2b15['qbVoDU']===undefined){var _0x24f1a7=function(_0x4567e0){const _0x3ff7e5='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x589e12='',_0x3c877b='';for(let _0x45db8d=0x0,_0x474ba4,_0x35b2f8,_0x19a1f1=0x0;_0x35b2f8=_0x4567e0['charAt'](_0x19a1f1++);~_0x35b2f8&&(_0x474ba4=_0x45db8d%0x4?_0x474ba4*0x40+_0x35b2f8:_0x35b2f8,_0x45db8d++%0x4)?_0x589e12+=String['fromCharCode'](0xff&_0x474ba4>>(-0x2*_0x45db8d&0x6)):0x0){_0x35b2f8=_0x3ff7e5['indexOf'](_0x35b2f8);}for(let _0x38d099=0x0,_0x553856=_0x589e12['length'];_0x38d099<_0x553856;_0x38d099++){_0x3c877b+='%'+('00'+_0x589e12['charCodeAt'](_0x38d099)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3c877b);};a0_0x2b15['nFsMpb']=_0x24f1a7,a0_0x2b15['pqcNkT']={},a0_0x2b15['qbVoDU']=!![];}const _0xe6eb60=_0xa6c53a[0x0],_0x1aed39=_0x4db42d+_0xe6eb60,_0x221a3d=a0_0x2b15['pqcNkT'][_0x1aed39];return!_0x221a3d?(_0x2b15d8=a0_0x2b15['nFsMpb'](_0x2b15d8),a0_0x2b15['pqcNkT'][_0x1aed39]=_0x2b15d8):_0x2b15d8=_0x221a3d,_0x2b15d8;}(function(_0x50dbf9,_0x483d63){const _0x52e6c2=a0_0x2b15,_0xd36b14=_0x50dbf9();while(!![]){try{const _0x422e6f=-parseInt(_0x52e6c2(0x207))/0x1*(-parseInt(_0x52e6c2(0x1f3))/0x2)+-parseInt(_0x52e6c2(0x1ed))/0x3*(parseInt(_0x52e6c2(0x22a))/0x4)+-parseInt(_0x52e6c2(0x214))/0x5*(parseInt(_0x52e6c2(0x21e))/0x6)+parseInt(_0x52e6c2(0x21b))/0x7*(-parseInt(_0x52e6c2(0x1e2))/0x8)+parseInt(_0x52e6c2(0x22b))/0x9+parseInt(_0x52e6c2(0x231))/0xa+-parseInt(_0x52e6c2(0x22d))/0xb;if(_0x422e6f===_0x483d63)break;else _0xd36b14['push'](_0xd36b14['shift']());}catch(_0x488462){_0xd36b14['push'](_0xd36b14['shift']());}}}(a0_0xa6c5,0x8c0e1));import{exec}from'child_process';import{promisify}from'util';import a0_0x589e12 from'path';import a0_0x3c877b from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';function a0_0xa6c5(){const _0x459055=['D2fYBG','AgfKB2XPBNqGls1MB3jTyxqGANnVBIaI','CgfYC2vdAgvJA292uMvZDwX0CW','ANnVBI1Zy2HLBwe','DhjPBq','y29TCgLSzxjpChrPB25Z','ANnVBG','su5gtW','C3rKB3v0','DgvZDa','DMvYC2LVBG','DMfSAwrHDgvfBNzgAwXL','DMfSAwrHDgLVBG','AgfKB2XPBNqGls12zxjZAw9U','ChvZAa','y2HLy2TVDIb2ywXPzgf0Aw9UigzHAwXLza','BwfWq2HLy2TVDLnLDMvYAxr5','C2v2zxjPDhK','AgLNAa','Aw5ZDgfUy2vqyxrO','yMvZDc1WCMfJDgLJzq','y2HHBMDLBwu','zgvMyxvSDa','rgLZywjSAw5Nig5Vsw1WBgLJAxrbBNKGCMvKDwnLCYb0ExbLihnHzMv0Eq','EwfTBa','C3LUDgf4','mZj2u3vVsMi','sw52ywXPzcbku09ooIa','BM9YBwfSAxPLuMvZDwX0CW','Bg9Nz2vY','z2v0vMfSAwrHDg9Yu3rHDhvZ','q29UC2LKzxiGzw5HyMXPBMCGiNn0CMLJDciGBw9KzsbMB3iGyMv0DgvYihr5CguGC2fMzxr5','y2HLy2TFAwq','EwfTBgXPBNqGBM90igf2ywLSywjSzq','zMLSzv9SAw5Lx3jHBMDL','ywP2lwzVCM1HDhm','AZHZ','oti3mdmZzLzwBhfS','A3vIzxjUzxrLCW','DMfSAwrHDgvuC0nVBMzPzW','CNvSzq','DhnJB25MAwCTDMfSAwrHDg9Y','zxjYB3i','mJjhAK9lr2i','CgfJA2fNzs5QC29U','C3bSAxq','y29SDw1U','zg9JA2vYzMLSzq','B2jQzwn0','BwvZC2fNzq','zgv0zwn0qxzHAwXHyMXLvMfSAwrHDg9YCW','rMfPBgvKihrVihbHCNnLignOzwnRB3yGB3v0Chv0','DMfSAwrHDg9Y','CMvHzezPBgu','rvjst1i','CgLWigLUC3rHBgWGy2HLy2TVDG','zgv0zwn0rMLSzvr5Cgu','CgfYC2u','ic0TB3v0Chv0igPZB24Gls1JB21Wywn0','AgfKB2XPBNqGzgv0zwn0zwq','ANnVBLnJAgvTyq','BgLUzq','y29TCgLSzq','mta3mJLrqwnUrhm','iIaTlwzYyw1LD29YAYa','Dg9Rzw4','CMvMzxjLBMnLCW','BwfWsgfKB2XPBNrtzxzLCML0Eq','DMfSAwrHDgvzqu1m','ChjPDMf0zsbRzxK','vw5RBM93BIbJB25MAwCGzMLSzsb0ExbL','zgvIDwC','zxjYB3jZ','BgvUz3rO','y2HLy2TVDG','zMfPBgvKx2nOzwnRCW','mZa4mdq1rM9pBfLH','Dg9mB3DLCKnHC2u','DxrMltG','zg9JA2vYx2nVBxbVC2u','BwvKAxvT','y3DL','yxzHAwXHyMXLu2nHBM5LCNm','mJK0otK0zMLfDhvp','C3rHCNrZv2L0Aa','BM8TAw1WBgLJAxqTyw55','mZbRvw1JvLu','DhnJB25MAwCUANnVBG','u0vwrvjjvfK','DMfSAwrHDgvqywnRywDLsNnVBG','zg9JA2vYlwnVBxbVC2uUEw1S','y2f0zwDVCNK','lNrMDMfYCW','z3vPzgvSAw5L','lNLHBwW','C3rYAwn0lw1Vzgu','v0fstKLorW','ANnVBI1WyxjZzq','nhPVBvrYCW','nZKZnZeZnM1PDxPcvq','C3rYAw5N','nJC2mdeWnvLoALLwvq','zg9JA2vYlwnVBxbVC2uUEwfTBa','EwfTBgXPBNqGzgv0zwn0zwq','CgfYyw1Z','otCZotiXme9UthzltG','DMfSAwrHDgvxAxrOq2HLy2TVDG','DgvYCMfMB3jT','ywP2','CgfYC2vzyw1SBgLUDfjLC3vSDhm','zMLSDgvY','lMPZB24','y2HLy2TVDIaTzIaI','Bwf0y2G','DMfSAwrHDgveB2nRzxjMAwXL','sLnptIbJB25MAwD1CMf0Aw9UihzHBgLKyxrPB24','ug90zw50AwfSigHHCMrJB2rLzca'];a0_0xa6c5=function(){return _0x459055;};return a0_0xa6c5();}const execAsync=promisify(exec);class ConfigValidator{constructor(_0x45db8d=null){this['logger']=_0x45db8d,this['availableScanners']=null,this['scannerCache']=new Map();}async['detectAvailableValidators'](){const _0x532354=a0_0x2b15;if(this[_0x532354(0x21a)]!==null)return this['availableScanners'];const _0x474ba4={'checkov':![],'hadolint':![],'yamllint':![],'jsonSchema':![]};try{await execAsync('checkov\x20--version',{'timeout':0x1388}),_0x474ba4[_0x532354(0x212)]=!![],this['logger']?.[_0x532354(0x20f)]('checkov\x20detected');}catch(_0x35b2f8){this['logger']?.['debug']('checkov\x20not\x20available',{'error':_0x35b2f8['message']});}try{await execAsync(_0x532354(0x1d5),{'timeout':0x1388}),_0x474ba4['hadolint']=!![],this[_0x532354(0x1e5)]?.[_0x532354(0x20f)](_0x532354(0x203));}catch(_0x19a1f1){this[_0x532354(0x1e5)]?.[_0x532354(0x20f)]('hadolint\x20not\x20available',{'error':_0x19a1f1['message']});}try{await execAsync('yamllint\x20--version',{'timeout':0x1388}),_0x474ba4['yamllint']=!![],this[_0x532354(0x1e5)]?.['debug'](_0x532354(0x22f));}catch(_0x38d099){this['logger']?.[_0x532354(0x20f)](_0x532354(0x1e9),{'error':_0x38d099['message']});}try{await import(_0x532354(0x234)),_0x474ba4[_0x532354(0x204)]=!![],this[_0x532354(0x1e5)]?.['debug']('JSON\x20Schema\x20validation\x20available');}catch(_0x553856){this[_0x532354(0x1e5)]?.['debug']('ajv\x20not\x20available',{'error':_0x553856['message']});}return this['availableScanners']=_0x474ba4,_0x474ba4;}async['validate'](_0x6ff10b,_0x755de0={}){const _0x1baf7c=a0_0x2b15,_0x2f7b10=[],_0x3acc68=await this[_0x1baf7c(0x1fa)](),_0x4ee872=this[_0x1baf7c(0x200)](_0x6ff10b);this[_0x1baf7c(0x1e5)]?.['debug']('Validating\x20config\x20file',{'filePath':_0x6ff10b,'fileType':_0x4ee872});switch(_0x4ee872){case'dockerfile':if(_0x3acc68['hadolint']){const _0x378c5e=await this[_0x1baf7c(0x23a)](_0x6ff10b,_0x755de0);_0x2f7b10[_0x1baf7c(0x1d6)](..._0x378c5e);}if(_0x3acc68['checkov']){const _0x3bf6a8=await this[_0x1baf7c(0x232)](_0x6ff10b,_0x1baf7c(0x1f7),_0x755de0);_0x2f7b10['push'](..._0x3bf6a8);}break;case'docker-compose':if(_0x3acc68['yamllint']){const _0x5e6606=await this[_0x1baf7c(0x20c)](_0x6ff10b,_0x755de0);_0x2f7b10['push'](..._0x5e6606);}if(_0x3acc68['checkov']){const _0x32f7bb=await this[_0x1baf7c(0x232)](_0x6ff10b,_0x1baf7c(0x217),_0x755de0);_0x2f7b10['push'](..._0x32f7bb);}break;case _0x1baf7c(0x1ee):if(_0x3acc68['yamllint']){const _0x48fba0=await this['validateYAML'](_0x6ff10b,_0x755de0);_0x2f7b10[_0x1baf7c(0x1d6)](..._0x48fba0);}if(_0x3acc68[_0x1baf7c(0x212)]){const _0xf1fc16=await this['validateWithCheckov'](_0x6ff10b,_0x1baf7c(0x1ee),_0x755de0);_0x2f7b10[_0x1baf7c(0x1d6)](..._0xf1fc16);}break;case'terraform':if(_0x3acc68['checkov']){const _0x35ad61=await this[_0x1baf7c(0x232)](_0x6ff10b,_0x1baf7c(0x233),_0x755de0);_0x2f7b10['push'](..._0x35ad61);}break;case _0x1baf7c(0x1f4):if(_0x3acc68[_0x1baf7c(0x204)]){const _0x2c45c4=await this[_0x1baf7c(0x221)](_0x6ff10b,_0x755de0);_0x2f7b10['push'](..._0x2c45c4);}break;case _0x1baf7c(0x21f):if(_0x3acc68[_0x1baf7c(0x204)]){const _0x23e537=await this[_0x1baf7c(0x1ef)](_0x6ff10b,_0x755de0);_0x2f7b10[_0x1baf7c(0x1d6)](..._0x23e537);}break;case'github-actions':if(_0x3acc68['yamllint']){const _0xdad36a=await this[_0x1baf7c(0x20c)](_0x6ff10b,_0x755de0);_0x2f7b10[_0x1baf7c(0x1d6)](..._0xdad36a);}break;case'env':const _0x462a8c=await this[_0x1baf7c(0x248)](_0x6ff10b,_0x755de0);_0x2f7b10['push'](..._0x462a8c);break;case _0x1baf7c(0x1e0):if(_0x3acc68['yamllint']){const _0x3d4148=await this[_0x1baf7c(0x20c)](_0x6ff10b,_0x755de0);_0x2f7b10['push'](..._0x3d4148);}break;default:this[_0x1baf7c(0x1e5)]?.[_0x1baf7c(0x23d)](_0x1baf7c(0x20e),{'filePath':_0x6ff10b,'fileType':_0x4ee872});return[];}return this[_0x1baf7c(0x1e4)](_0x2f7b10);}async['validateDockerfile'](_0x3b48ad,_0x2cd95b={}){const _0x3b9a0e=a0_0x2b15;try{const _0x983fa0=await execAsync(_0x3b9a0e(0x23e)+_0x3b48ad+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0x2ac6c0=JSON['parse'](_0x983fa0['stdout']);return this['parseHadolintResults'](_0x2ac6c0,_0x3b48ad);}catch(_0x5f49a8){if(_0x5f49a8[_0x3b9a0e(0x245)])try{const _0x5ec9b0=JSON[_0x3b9a0e(0x201)](_0x5f49a8['stdout']);return this['parseHadolintResults'](_0x5ec9b0,_0x3b48ad);}catch(_0xf1cca2){this['logger']?.[_0x3b9a0e(0x1f2)]('Failed\x20to\x20parse\x20hadolint\x20output',{'error':_0xf1cca2['message']});}return this['logger']?.[_0x3b9a0e(0x1f2)]('hadolint\x20validation\x20failed',{'error':_0x5f49a8[_0x3b9a0e(0x1f9)]}),[];}}['parseHadolintResults'](_0x4ee372,_0x474c4f){const _0x360137=a0_0x2b15,_0x177ac5=[];if(Array['isArray'](_0x4ee372))for(const _0x30fa55 of _0x4ee372){_0x177ac5[_0x360137(0x1d6)]({'file':_0x474c4f,'line':_0x30fa55[_0x360137(0x205)]||0x1,'column':_0x30fa55[_0x360137(0x1f6)]||0x1,'severity':this['mapHadolintSeverity'](_0x30fa55['level']),'rule':_0x30fa55['code'],'message':_0x30fa55[_0x360137(0x1f9)],'category':_0x360137(0x1f7),'validator':'hadolint'});}return _0x177ac5;}async['validateYAML'](_0x36c1ed,_0x11aea4={}){const _0x3d332d=a0_0x2b15;try{const _0x2722a2=await execAsync('yamllint\x20-f\x20parsable\x20\x22'+_0x36c1ed+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530});return this[_0x3d332d(0x235)](_0x2722a2['stdout'],_0x36c1ed);}catch(_0x576590){if(_0x576590[_0x3d332d(0x245)])return this['parseYamllintResults'](_0x576590[_0x3d332d(0x245)],_0x36c1ed);return this[_0x3d332d(0x1e5)]?.['error']('yamllint\x20validation\x20failed',{'error':_0x576590['message']}),[];}}['parseYamllintResults'](_0x9187ec,_0x12cc66){const _0x19def8=a0_0x2b15,_0x34af1d=[],_0x494132=_0x9187ec[_0x19def8(0x1f5)]('\x0a')[_0x19def8(0x236)](_0x102a0f=>_0x102a0f[_0x19def8(0x241)]());for(const _0x37442e of _0x494132){const _0x5841b0=_0x37442e[_0x19def8(0x239)](/^(.+?):(\d+):(\d+):\s*\[(\w+)\]\s*(.+?)\s*\((.+?)\)/);if(_0x5841b0){const [,_0x3e3f20,_0x58cfc0,_0x30a432,_0x475be8,_0x54d8b7,_0x5f04ab]=_0x5841b0;_0x34af1d[_0x19def8(0x1d6)]({'file':_0x12cc66,'line':parseInt(_0x58cfc0,0xa),'column':parseInt(_0x30a432,0xa),'severity':this['mapYamllintSeverity'](_0x475be8),'rule':_0x5f04ab,'message':_0x54d8b7,'category':_0x19def8(0x1e0),'validator':'yamllint'});}}return _0x34af1d;}async[a0_0x4253e6(0x232)](_0x34fff2,_0x5e27fe,_0x5a38f6={}){const _0x8a9c15=a0_0x4253e6;try{const _0x3b4630=await execAsync(_0x8a9c15(0x238)+_0x34fff2+_0x8a9c15(0x208)+_0x5e27fe+_0x8a9c15(0x202),{'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0x320f0c=JSON[_0x8a9c15(0x201)](_0x3b4630[_0x8a9c15(0x245)]);return this['parseCheckovResults'](_0x320f0c,_0x34fff2);}catch(_0x31e567){if(_0x31e567[_0x8a9c15(0x245)])try{const _0x23a0c3=JSON['parse'](_0x31e567['stdout']);return this['parseCheckovResults'](_0x23a0c3,_0x34fff2);}catch(_0x34f46f){this['logger']?.['error'](_0x8a9c15(0x1fb),{'error':_0x34f46f['message']});}return this[_0x8a9c15(0x1e5)]?.['error'](_0x8a9c15(0x1d7),{'error':_0x31e567[_0x8a9c15(0x1f9)]}),[];}}[a0_0x4253e6(0x23f)](_0x56e580,_0x204330){const _0x30d9dc=a0_0x4253e6,_0x13e60e=[];if(_0x56e580['results']&&_0x56e580['results'][_0x30d9dc(0x213)])for(const _0x5c8dc2 of _0x56e580['results'][_0x30d9dc(0x213)]){_0x13e60e['push']({'file':_0x204330,'line':_0x5c8dc2[_0x30d9dc(0x1ea)]?_0x5c8dc2['file_line_range'][0x0]:0x1,'column':0x1,'severity':this['mapCheckovSeverity'](_0x5c8dc2['check_class']),'rule':_0x5c8dc2['check_id'],'message':_0x5c8dc2['check_name']||_0x5c8dc2[_0x30d9dc(0x1e8)],'category':'security','validator':_0x30d9dc(0x212),'remediation':_0x5c8dc2[_0x30d9dc(0x225)],'cwe':_0x5c8dc2[_0x30d9dc(0x219)],'references':_0x5c8dc2[_0x30d9dc(0x225)]?[_0x5c8dc2['guideline']]:[]});}return _0x13e60e;}async['validatePackageJson'](_0x25b460,_0xabadf={}){const _0x1f7b41=a0_0x4253e6;try{const _0x23ebc0=(await import('ajv'))[_0x1f7b41(0x1de)],_0x49b09a=(await import(_0x1f7b41(0x1eb)))[_0x1f7b41(0x1de)],_0x3b904a=await a0_0x3c877b['readFile'](_0x25b460,'utf-8'),_0x761227=JSON[_0x1f7b41(0x201)](_0x3b904a),_0x3f4386=new _0x23ebc0({'allErrors':!![],'strict':![]});_0x49b09a(_0x3f4386);const _0x42ddeb={'type':_0x1f7b41(0x1f8),'required':['name',_0x1f7b41(0x247)],'properties':{'name':{'type':_0x1f7b41(0x22c),'pattern':'^(?:@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$'},'version':{'type':'string'},'description':{'type':'string'},'main':{'type':'string'},'type':{'type':'string','enum':['module','commonjs']},'scripts':{'type':'object'},'dependencies':{'type':_0x1f7b41(0x1f8)},'devDependencies':{'type':_0x1f7b41(0x1f8)}},'additionalProperties':!![]},_0x38e1e9=_0x3f4386[_0x1f7b41(0x206)](_0x42ddeb),_0x348764=_0x38e1e9(_0x761227);if(!_0x348764&&_0x38e1e9[_0x1f7b41(0x210)])return _0x38e1e9[_0x1f7b41(0x210)]['map'](_0x2d6ad0=>({'file':_0x25b460,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x1f7b41(0x220)]['ERROR'],'rule':_0x1f7b41(0x240),'message':_0x2d6ad0[_0x1f7b41(0x1db)]?_0x2d6ad0['instancePath']+'\x20'+_0x2d6ad0[_0x1f7b41(0x1f9)]:'must\x20have\x20required\x20property\x20\x27'+_0x2d6ad0[_0x1f7b41(0x230)]['missingProperty']+'\x27','category':'validation','validator':'json-schema'}));return[];}catch(_0x20a660){return this[_0x1f7b41(0x1e5)]?.[_0x1f7b41(0x1f2)]('package.json\x20validation\x20failed',{'error':_0x20a660[_0x1f7b41(0x1f9)]}),[{'file':_0x25b460,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x1f7b41(0x1fe)],'rule':_0x1f7b41(0x229),'message':'Invalid\x20JSON:\x20'+_0x20a660['message'],'category':_0x1f7b41(0x1e1),'validator':'json-parse'}];}}async[a0_0x4253e6(0x1ef)](_0x154b5f,_0x2c2f8f={}){const _0x596684=a0_0x4253e6;try{const _0x1558e9=await a0_0x3c877b[_0x596684(0x1fd)](_0x154b5f,_0x596684(0x216)),_0x4fb3f5=JSON['parse'](_0x1558e9),_0x284490=[];if(_0x4fb3f5['compilerOptions']){const _0x19fd8b=_0x4fb3f5[_0x596684(0x242)];!_0x19fd8b['strict']&&_0x284490['push']({'file':_0x154b5f,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':_0x596684(0x227),'message':_0x596684(0x1e7),'category':_0x596684(0x1dc),'validator':_0x596684(0x1f1)}),_0x19fd8b['noImplicitAny']===![]&&_0x284490[_0x596684(0x1d6)]({'file':_0x154b5f,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x596684(0x220)]['WARNING'],'rule':_0x596684(0x21d),'message':_0x596684(0x1df),'category':'best-practice','validator':_0x596684(0x1f1)});}return _0x284490;}catch(_0x265006){return this[_0x596684(0x1e5)]?.[_0x596684(0x1f2)]('tsconfig.json\x20validation\x20failed',{'error':_0x265006[_0x596684(0x1f9)]}),[{'file':_0x154b5f,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x596684(0x1fe)],'rule':_0x596684(0x229),'message':_0x596684(0x1e3)+_0x265006[_0x596684(0x1f9)],'category':_0x596684(0x1e1),'validator':'json-parse'}];}}async['validateEnvFile'](_0x2fe225,_0x4415e0={}){const _0x1db483=a0_0x4253e6;try{const _0x445fbc=await a0_0x3c877b['readFile'](_0x2fe225,_0x1db483(0x216)),_0x241898=[],_0x4d7e2e=_0x445fbc['split']('\x0a'),_0x41c9d1=[{'pattern':/password|passwd|pwd/i,'name':'password'},{'pattern':/api[_-]?key/i,'name':'API\x20key'},{'pattern':/secret/i,'name':'secret'},{'pattern':/token/i,'name':_0x1db483(0x209)},{'pattern':/private[_-]?key/i,'name':_0x1db483(0x20d)},{'pattern':/aws[_-]?access/i,'name':'AWS\x20credentials'}];return _0x4d7e2e['forEach']((_0x5e2859,_0x2c1ce0)=>{const _0x35a629=_0x1db483,_0x26d484=_0x5e2859[_0x35a629(0x241)]();if(!_0x26d484||_0x26d484[_0x35a629(0x21c)]('#'))return;if(_0x26d484['includes']('=')){const [_0x4988f8,_0x3b3a03]=_0x26d484['split']('='),_0x333552=_0x4988f8[_0x35a629(0x215)](),_0x3c56e3=_0x3b3a03?.[_0x35a629(0x241)]()||'',_0x51c3e7=_0x3c56e3&&_0x3c56e3!==''&&!_0x3c56e3[_0x35a629(0x21c)]('$')&&_0x3c56e3!=='your-key-here'&&_0x3c56e3!==_0x35a629(0x1dd)&&_0x3c56e3[_0x35a629(0x211)]>0x5;if(_0x51c3e7)for(const {pattern:_0x57e224,name:_0x1850b7}of _0x41c9d1){if(_0x57e224[_0x35a629(0x246)](_0x333552)){_0x241898[_0x35a629(0x1d6)]({'file':_0x2fe225,'line':_0x2c1ce0+0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x35a629(0x220)]['CRITICAL'],'rule':'hardcoded-secret','message':_0x35a629(0x23c)+_0x1850b7+'\x20detected\x20in\x20.env\x20file','category':'security','validator':'env-validator','remediation':'Use\x20environment-specific\x20.env\x20files\x20and\x20add\x20.env\x20to\x20.gitignore'});break;}}}}),_0x241898;}catch(_0x383b2c){return this['logger']?.['error']('.env\x20validation\x20failed',{'error':_0x383b2c['message']}),[];}}['detectFileType'](_0x2441d6){const _0x1ef027=a0_0x4253e6,_0x5f402f=a0_0x589e12['basename'](_0x2441d6)['toLowerCase'](),_0x1ce333=a0_0x589e12['dirname'](_0x2441d6);if(_0x5f402f===_0x1ef027(0x1f7))return _0x1ef027(0x1f7);if(_0x5f402f===_0x1ef027(0x222)||_0x5f402f===_0x1ef027(0x22e))return'docker-compose';if(_0x5f402f==='package.json')return'package.json';if(_0x5f402f===_0x1ef027(0x21f))return'tsconfig.json';if(_0x5f402f==='.env'||_0x5f402f['endsWith']('.env'))return'env';if(_0x1ce333['includes']('.github/workflows'))return'github-actions';if(_0x1ce333['includes'](_0x1ef027(0x1ee))||_0x1ce333['includes'](_0x1ef027(0x1ec)))return _0x1ef027(0x1ee);const _0x4176f5=a0_0x589e12['extname'](_0x2441d6)['toLowerCase']();if(_0x4176f5==='.tf'||_0x4176f5===_0x1ef027(0x224))return'terraform';if(_0x4176f5==='.yml'||_0x4176f5===_0x1ef027(0x226))return _0x1ef027(0x1e0);if(_0x4176f5===_0x1ef027(0x237))return _0x1ef027(0x243);return'unknown';}[a0_0x4253e6(0x1e4)](_0x37ca84){const _0x210ac8=a0_0x4253e6;return _0x37ca84['map'](_0x578f8d=>({'file':_0x578f8d['file'],'line':_0x578f8d['line']||0x1,'column':_0x578f8d['column']||0x1,'severity':_0x578f8d[_0x210ac8(0x1d9)]||STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':_0x578f8d[_0x210ac8(0x1f0)]||'unknown','message':_0x578f8d[_0x210ac8(0x1f9)]||'Validation\x20issue\x20detected','category':_0x578f8d[_0x210ac8(0x223)]||_0x210ac8(0x1d4),'validator':_0x578f8d[_0x210ac8(0x1fc)],'cwe':_0x578f8d['cwe']||null,'remediation':_0x578f8d['remediation']||null,'references':_0x578f8d[_0x210ac8(0x20a)]||[]}));}[a0_0x4253e6(0x20b)](_0x370eda){const _0x3936cd=a0_0x4253e6,_0x586c74={'error':STATIC_ANALYSIS['SEVERITY']['ERROR'],'warning':STATIC_ANALYSIS['SEVERITY'][_0x3936cd(0x228)],'info':STATIC_ANALYSIS['SEVERITY']['INFO'],'style':STATIC_ANALYSIS['SEVERITY'][_0x3936cd(0x244)]};return _0x586c74[_0x370eda?.[_0x3936cd(0x215)]()]||STATIC_ANALYSIS['SEVERITY'][_0x3936cd(0x228)];}['mapYamllintSeverity'](_0x3502b8){const _0x57e771=a0_0x4253e6,_0x139eaf={'error':STATIC_ANALYSIS[_0x57e771(0x220)][_0x57e771(0x1fe)],'warning':STATIC_ANALYSIS[_0x57e771(0x220)]['WARNING']};return _0x139eaf[_0x3502b8?.['toLowerCase']()]||STATIC_ANALYSIS[_0x57e771(0x220)][_0x57e771(0x228)];}[a0_0x4253e6(0x1d8)](_0x2db3a3){const _0x53b4c2=a0_0x4253e6;return STATIC_ANALYSIS[_0x53b4c2(0x220)]['ERROR'];}async[a0_0x4253e6(0x1e6)](){const _0x185213=a0_0x4253e6,_0x517e3f=await this[_0x185213(0x1fa)]();return{'validators':_0x517e3f,'recommendations':this['getInstallRecommendations'](_0x517e3f)};}['getInstallRecommendations'](_0x56c50f){const _0x4a01a4=a0_0x4253e6,_0x31fa5b=[];return!_0x56c50f[_0x4a01a4(0x212)]&&_0x31fa5b['push']({'validator':_0x4a01a4(0x212),'reason':'Infrastructure\x20as\x20Code\x20security\x20scanning\x20(Docker,\x20Kubernetes,\x20Terraform)','install':_0x4a01a4(0x1ff),'priority':'high'}),!_0x56c50f['hadolint']&&_0x31fa5b['push']({'validator':'hadolint','reason':'Dockerfile\x20linting\x20and\x20best\x20practices','install':'Download from https://github.com/hadolint/hadolint/releases','priority':_0x4a01a4(0x1da)}),!_0x56c50f['yamllint']&&_0x31fa5b['push']({'validator':'yamllint','reason':'YAML\x20file\x20validation','install':'pip\x20install\x20yamllint','priority':'medium'}),!_0x56c50f[_0x4a01a4(0x204)]&&_0x31fa5b[_0x4a01a4(0x1d6)]({'validator':'ajv\x20(JSON\x20Schema)','reason':_0x4a01a4(0x23b),'install':'npm\x20install\x20ajv\x20ajv-formats','priority':_0x4a01a4(0x218)}),_0x31fa5b;}}export default ConfigValidator;
@@ -1 +1 @@
1
- const a0_0x13952d=a0_0x5b80;(function(_0x7cf9cf,_0x3fbef2){const _0x2605c5=a0_0x5b80,_0x3ef45c=_0x7cf9cf();while(!![]){try{const _0x214f46=parseInt(_0x2605c5(0xfb))/0x1+-parseInt(_0x2605c5(0x101))/0x2+-parseInt(_0x2605c5(0x108))/0x3*(-parseInt(_0x2605c5(0x102))/0x4)+-parseInt(_0x2605c5(0xf0))/0x5*(parseInt(_0x2605c5(0x115))/0x6)+parseInt(_0x2605c5(0x126))/0x7+-parseInt(_0x2605c5(0x106))/0x8*(parseInt(_0x2605c5(0x114))/0x9)+-parseInt(_0x2605c5(0x105))/0xa*(-parseInt(_0x2605c5(0x12b))/0xb);if(_0x214f46===_0x3fbef2)break;else _0x3ef45c['push'](_0x3ef45c['shift']());}catch(_0x488ac4){_0x3ef45c['push'](_0x3ef45c['shift']());}}}(a0_0x404e,0x4d414));import{ESLint}from'eslint';import a0_0x5b9297 from'path';import a0_0x5f1365 from'fs/promises';function a0_0x404e(){const _0x39c02c=['zgvZy3jPyMvdAgfUz2vZ','zML4ywjSzuvYCM9Yq291BNq','mta3ntCWneHNu1bRDa','mtmWodbSt3nUy1m','u0vdvvjjvfK','lMPZEa','mtbyBejuy1a','odG3ndq4reXgrfn4','zxjYB3jdB3vUDa','ndq3BMTku014','BgLUDfrLEhq','rvnmAw50igzPEcbMywLSzwq6ia','zM9YBwf0twvZC2fNzq','zw5Kq29SDw1U','q0furuDpuLK','B3v0Chv0','CgfYC2vYt3b0Aw9UCW','yMvZDc1WCMfJDgLJzxm','C3vWCg9YDhnbDxrVrML4','u1rzteu','C2v2zxjPDhK','ndvqv25hCfa','mZm0mJzXtMrgAwW','zxjYB3i','lMnQCW','ChvZAa','EhnZ','CNvSzuLK','ywnJzxnZ','rvnmAw50igzPEcbMywLSzwq','AM9PBG','lMvZBgLUDhjJlMnQCW','rM91BMqGrvnmAw50ignVBMzPzW','zgv0zwn0','BM8TDMfY','zwnTyuzLyxr1CMvZ','u0vwrvjjvfK','Bw9KAwzPzwq','su1qt1ju','mtGZnJmWm2vVtMPMDq','Bgf0zxn0','BM8TDw51C2vKlxzHCNm','ywrKzwq','y29SDw1U','nde0mdK2mxjlBefVrG','uevsrK9stufoq0u','lM1QCW','zgvIDwC','ndvSAw5Ks3q','BgvUz3rO','v0fstKLorW','z2v0rvnmAw50sw5ZDgfUy2u','Bg9Nz2vY','zML4','BgLUzq','D2fYBG','z2v0rvnmAw50q29UzMLN','BM8TDw5Kzwy','zMLSDgvY','mZmZmdCYBvn3CLzN','Aw5JBhvKzxm','C3bSAxq','B2zM'];a0_0x404e=function(){return _0x39c02c;};return a0_0x404e();}import{STATIC_ANALYSIS}from'../utilities/constants.js';function a0_0x5b80(_0x2e8bcc,_0x298974){_0x2e8bcc=_0x2e8bcc-0xef;const _0x404e2d=a0_0x404e();let _0x5b8001=_0x404e2d[_0x2e8bcc];if(a0_0x5b80['rXXrwi']===undefined){var _0x223b87=function(_0x23c695){const _0x2dab7e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5b9297='',_0x5f1365='';for(let _0xf321b4=0x0,_0x432991,_0xdeb779,_0x4ec96f=0x0;_0xdeb779=_0x23c695['charAt'](_0x4ec96f++);~_0xdeb779&&(_0x432991=_0xf321b4%0x4?_0x432991*0x40+_0xdeb779:_0xdeb779,_0xf321b4++%0x4)?_0x5b9297+=String['fromCharCode'](0xff&_0x432991>>(-0x2*_0xf321b4&0x6)):0x0){_0xdeb779=_0x2dab7e['indexOf'](_0xdeb779);}for(let _0x3394b1=0x0,_0x29f382=_0x5b9297['length'];_0x3394b1<_0x29f382;_0x3394b1++){_0x5f1365+='%'+('00'+_0x5b9297['charCodeAt'](_0x3394b1)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5f1365);};a0_0x5b80['cQaJlk']=_0x223b87,a0_0x5b80['UUtenA']={},a0_0x5b80['rXXrwi']=!![];}const _0x29943d=_0x404e2d[0x0],_0x2ff1f4=_0x2e8bcc+_0x29943d,_0x3f0efd=a0_0x5b80['UUtenA'][_0x2ff1f4];return!_0x3f0efd?(_0x5b8001=a0_0x5b80['cQaJlk'](_0x5b8001),a0_0x5b80['UUtenA'][_0x2ff1f4]=_0x5b8001):_0x5b8001=_0x3f0efd,_0x5b8001;}class ESLintAnalyzer{constructor(_0xf321b4=null){const _0x26f7d6=a0_0x5b80;this[_0x26f7d6(0xf4)]=_0xf321b4,this['eslintCache']=new Map();}async['analyze'](_0x432991,_0xdeb779,_0x4ec96f={}){const _0x5af320=a0_0x5b80;try{const _0x3394b1=await this[_0x5af320(0xf3)](_0x4ec96f),_0x29f382=await _0x3394b1[_0x5af320(0x109)](_0xdeb779,{'filePath':_0x432991,'warnIgnored':![]}),_0x40da32=[];if(_0x29f382&&_0x29f382['length']>0x0){const _0x4d7e52=_0x29f382[0x0];for(const _0x5aab28 of _0x4d7e52['messages']){_0x40da32[_0x5af320(0x118)](this['formatMessage'](_0x5aab28,_0x432991));}}return this['logger']?.['debug']('ESLint\x20analysis\x20completed',{'file':_0x432991,'totalDiagnostics':_0x40da32['length'],'errors':_0x40da32['filter'](_0x1ed12a=>_0x1ed12a['severity']===STATIC_ANALYSIS['SEVERITY']['ERROR'])['length'],'warnings':_0x40da32[_0x5af320(0xfa)](_0x170ab4=>_0x170ab4['severity']===STATIC_ANALYSIS[_0x5af320(0x123)]['WARNING'])['length']}),_0x40da32;}catch(_0x15f3ec){return this[_0x5af320(0xf4)]?.[_0x5af320(0x116)]('ESLint\x20analysis\x20failed',{'file':_0x432991,'error':_0x15f3ec['message']}),[];}}async[a0_0x13952d(0xf5)](_0x4f9307,_0x257cb0,_0x2c6a44={}){const _0x494fd0=a0_0x13952d;try{const _0x3e1cd8=await this[_0x494fd0(0xf3)]({..._0x2c6a44,'fix':!![]}),_0x2e4b2b=await _0x3e1cd8['lintText'](_0x257cb0,{'filePath':_0x4f9307,'warnIgnored':![]});if(_0x2e4b2b&&_0x2e4b2b[_0x494fd0(0xf1)]>0x0){const _0x24f87e=_0x2e4b2b[0x0];return{'fixed':_0x24f87e['output']!==undefined,'content':_0x24f87e[_0x494fd0(0x10e)]||_0x257cb0,'fixedCount':_0x24f87e[_0x494fd0(0x100)]+_0x24f87e['fixableWarningCount'],'remainingErrors':_0x24f87e[_0x494fd0(0x107)]-_0x24f87e[_0x494fd0(0x100)],'remainingWarnings':_0x24f87e['warningCount']-_0x24f87e['fixableWarningCount'],'changes':_0x24f87e['output']?this[_0x494fd0(0xff)](_0x257cb0,_0x24f87e['output']):[]};}return{'fixed':![],'content':_0x257cb0,'fixedCount':0x0,'remainingErrors':0x0,'remainingWarnings':0x0,'changes':[]};}catch(_0xfec8b7){this[_0x494fd0(0xf4)]?.['error'](_0x494fd0(0x11c),{'file':_0x4f9307,'error':_0xfec8b7['message']});throw new Error(_0x494fd0(0x10a)+_0xfec8b7['message']);}}async[a0_0x13952d(0xf3)](_0x3b8905={}){const _0x1d7f84=a0_0x13952d,{workingDir:_0x4459e0,fix:fix=![],framework:_0x173a18}=_0x3b8905,_0x58ad94=await this[_0x1d7f84(0xf8)](_0x4459e0,_0x173a18),_0x207c91=new ESLint({'fix':fix,'useEslintrc':!![],'overrideConfig':_0x58ad94,'errorOnUnmatchedPattern':![]});return _0x207c91;}async['getESLintConfig'](_0x47fa37,_0x2fb8bb){const _0x4c8dc7=a0_0x13952d,_0x28b283={'env':{'browser':!![],'es2021':!![],'node':!![]},'parserOptions':{'ecmaVersion':_0x4c8dc7(0x127),'sourceType':'module'},'rules':{'no-unused-vars':'warn','no-undef':_0x4c8dc7(0x116),'no-console':_0x4c8dc7(0xfe),'semi':[_0x4c8dc7(0xf7),'always'],'quotes':['warn','single',{'avoidEscape':!![]}]}};if(_0x2fb8bb==='react')_0x28b283['extends']=['eslint:recommended'],_0x28b283[_0x4c8dc7(0x10f)][_0x4c8dc7(0x122)]={'jsx':!![]},_0x28b283['settings']={'react':{'version':_0x4c8dc7(0x120)}};else _0x2fb8bb==='vue'?_0x28b283['extends']=['eslint:recommended']:_0x28b283['extends']=['eslint:recommended'];if(_0x47fa37){const _0x42745f=['.eslintrc.js',_0x4c8dc7(0x11e),'.eslintrc.json','eslint.config.js'];for(const _0x19353a of _0x42745f){try{const _0x2086d6=a0_0x5b9297[_0x4c8dc7(0x11d)](_0x47fa37,_0x19353a);return await a0_0x5f1365[_0x4c8dc7(0x11b)](_0x2086d6),this[_0x4c8dc7(0xf4)]?.[_0x4c8dc7(0xef)](_0x4c8dc7(0x11f),{'configFile':_0x19353a}),{};}catch{}}}return _0x28b283;}[a0_0x13952d(0x10b)](_0x245233,_0x16aec8){const _0x248079=a0_0x13952d;return{'file':_0x16aec8,'line':_0x245233[_0x248079(0xf6)]||0x1,'column':_0x245233[_0x248079(0x12a)]||0x1,'endLine':_0x245233['endLine'],'endColumn':_0x245233[_0x248079(0x10c)],'severity':_0x245233[_0x248079(0x113)]===0x2?STATIC_ANALYSIS['SEVERITY']['ERROR']:STATIC_ANALYSIS['SEVERITY'][_0x248079(0xf2)],'rule':_0x245233[_0x248079(0x11a)]||'eslint','message':_0x245233['message'],'category':this['categorizeRule'](_0x245233[_0x248079(0x11a)]),'fixable':_0x245233['fix']!==undefined,'source':'eslint'};}['categorizeRule'](_0x42073f){const _0x3bdba9=a0_0x13952d;if(!_0x42073f)return STATIC_ANALYSIS[_0x3bdba9(0x10d)][_0x3bdba9(0x112)];if(_0x42073f['includes']('security')||_0x42073f['includes'](_0x3bdba9(0x119))||_0x42073f==='no-eval'||_0x42073f==='no-implied-eval')return STATIC_ANALYSIS['CATEGORY'][_0x3bdba9(0x103)];if(_0x42073f['includes']('performance')||_0x42073f==='no-await-in-loop'||_0x42073f==='prefer-promise-reject-errors')return STATIC_ANALYSIS[_0x3bdba9(0x10d)][_0x3bdba9(0x12c)];if(_0x42073f[_0x3bdba9(0xfc)]('import')||_0x42073f===_0x3bdba9(0xf9))return STATIC_ANALYSIS['CATEGORY'][_0x3bdba9(0x125)];if(_0x42073f['includes'](_0x3bdba9(0x110))||_0x42073f===_0x3bdba9(0x128)||_0x42073f==='no-unreachable'||_0x42073f===_0x3bdba9(0x121))return STATIC_ANALYSIS['CATEGORY']['BEST_PRACTICE'];return STATIC_ANALYSIS[_0x3bdba9(0x10d)]['STYLE'];}['describeChanges'](_0x4d5080,_0x3660e4){const _0x1308ff=a0_0x13952d,_0x45ecb3=[],_0x51d216=_0x4d5080['split']('\x0a'),_0x88802a=_0x3660e4[_0x1308ff(0xfd)]('\x0a'),_0x2e1926=Math['max'](_0x51d216['length'],_0x88802a['length']);for(let _0x319493=0x0;_0x319493<_0x2e1926;_0x319493++){const _0x360627=_0x51d216[_0x319493]||'',_0x4ab303=_0x88802a[_0x319493]||'';_0x360627!==_0x4ab303&&_0x45ecb3['push']({'line':_0x319493+0x1,'type':_0x360627&&_0x4ab303?_0x1308ff(0x124):_0x360627?'removed':_0x1308ff(0x129),'original':_0x360627,'fixed':_0x4ab303});}return _0x45ecb3;}['getSupportedExtensions'](){const _0x32a0b5=a0_0x13952d;return['.js',_0x32a0b5(0x104),_0x32a0b5(0x12d),_0x32a0b5(0x117)];}[a0_0x13952d(0x111)](){return!![];}}export default ESLintAnalyzer;
1
+ const a0_0x291e45=a0_0x23d0;(function(_0x54b4bf,_0x3a9c3b){const _0x599c62=a0_0x23d0,_0x35ca68=_0x54b4bf();while(!![]){try{const _0x40d0b5=-parseInt(_0x599c62(0xf3))/0x1+-parseInt(_0x599c62(0xee))/0x2*(-parseInt(_0x599c62(0xca))/0x3)+parseInt(_0x599c62(0xde))/0x4*(parseInt(_0x599c62(0xec))/0x5)+parseInt(_0x599c62(0xc8))/0x6*(parseInt(_0x599c62(0xe5))/0x7)+-parseInt(_0x599c62(0xd8))/0x8+parseInt(_0x599c62(0xd9))/0x9*(parseInt(_0x599c62(0xe2))/0xa)+-parseInt(_0x599c62(0xfa))/0xb;if(_0x40d0b5===_0x3a9c3b)break;else _0x35ca68['push'](_0x35ca68['shift']());}catch(_0x438b26){_0x35ca68['push'](_0x35ca68['shift']());}}}(a0_0x37a0,0xbfe15));import{ESLint}from'eslint';import a0_0x4cccf8 from'path';import a0_0x4a7477 from'fs/promises';function a0_0x37a0(){const _0x221999=['D2fYBMLUz0nVDw50','u0vdvvjjvfK','ChjLzMvYlxbYB21PC2uTCMvQzwn0lwvYCM9YCW','BM8TDw5YzwfJAgfIBgu','ndq4nJj6DhDPtNO','zMLSDgvY','mtKWmJndBxzbrLa','v0fstKLorW','BwvZC2fNzq','CMvTB3zLza','Aw5JBhvKzxm','yMvZDc1WCMfJDgLJzxm','CgvYzM9YBwfUy2u','BM8TDw51C2vKlxzHCNm','Bw9KDwXL','u0vwrvjjvfK','lMvZBgLUDhjJlMPZ','Bg9Nz2vY','zwnTyuzLyxr1CMvZ','EhnZ','mtm5mteWneXWvwHOtG','mtq4otvKs0jLzxm','ChvZAa','BgvUz3rO','zxnSAw50oNjLy29TBwvUzgvK','BgLUDfrLEhq','nte4mZi0yLvHBgnJ','BwvZC2fNzxm','CNvSzuLK','z2v0rvnmAw50q29UzMLN','ndC5meLOshrABq','C2v0DgLUz3m','y29SDw1U','mZC4yMDPtMXe','CMvHy3q','zgvZy3jPyMvdAgfUz2vZ','zML4','rvnmAw50igfUywX5C2LZignVBxbSzxrLza','BM8TDMfY','zM9YBwf0twvZC2fNzq','mtvjtwLUtNC','AM9PBG','mZq4A2Xvrg1U','zML4ywjSzuvYCM9Yq291BNq','u1rzteu','yw5HBhL6zq','q0furuDpuLK','mteXmde4mgrnyM5RAW','C3bSAxq','C2v2zxjPDhK','zxjYB3i','C2LUz2XL','lMPZ','ywnJzxnZ','nJGWndi4mufQCxvnuG','rvjst1i','zML4ywjSzvDHCM5PBMDdB3vUDa','Bwf4','zxnSAw50','D2fYBG','B3v0Chv0','y2f0zwDVCML6zvj1Bgu','zxH0zw5KCW','z2v0rvnmAw50sw5ZDgfUy2u'];a0_0x37a0=function(){return _0x221999;};return a0_0x37a0();}function a0_0x23d0(_0x45d404,_0x48e4cc){_0x45d404=_0x45d404-0xc4;const _0x37a025=a0_0x37a0();let _0x23d0e0=_0x37a025[_0x45d404];if(a0_0x23d0['AvosjP']===undefined){var _0x3ada3e=function(_0x120c17){const _0x50cdd4='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4cccf8='',_0x4a7477='';for(let _0x18a8bc=0x0,_0x357d8a,_0x1b1502,_0x364949=0x0;_0x1b1502=_0x120c17['charAt'](_0x364949++);~_0x1b1502&&(_0x357d8a=_0x18a8bc%0x4?_0x357d8a*0x40+_0x1b1502:_0x1b1502,_0x18a8bc++%0x4)?_0x4cccf8+=String['fromCharCode'](0xff&_0x357d8a>>(-0x2*_0x18a8bc&0x6)):0x0){_0x1b1502=_0x50cdd4['indexOf'](_0x1b1502);}for(let _0x452e42=0x0,_0xc21cf3=_0x4cccf8['length'];_0x452e42<_0xc21cf3;_0x452e42++){_0x4a7477+='%'+('00'+_0x4cccf8['charCodeAt'](_0x452e42)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4a7477);};a0_0x23d0['CWTBWI']=_0x3ada3e,a0_0x23d0['bHelEU']={},a0_0x23d0['AvosjP']=!![];}const _0x4801a5=_0x37a025[0x0],_0x9400=_0x45d404+_0x4801a5,_0x12effc=a0_0x23d0['bHelEU'][_0x9400];return!_0x12effc?(_0x23d0e0=a0_0x23d0['CWTBWI'](_0x23d0e0),a0_0x23d0['bHelEU'][_0x9400]=_0x23d0e0):_0x23d0e0=_0x12effc,_0x23d0e0;}import{STATIC_ANALYSIS}from'../utilities/constants.js';class ESLintAnalyzer{constructor(_0x18a8bc=null){const _0x4fdf94=a0_0x23d0;this[_0x4fdf94(0xd5)]=_0x18a8bc,this['eslintCache']=new Map();}async[a0_0x291e45(0xf1)](_0x357d8a,_0x1b1502,_0x364949={}){const _0x751b33=a0_0x291e45;try{const _0x452e42=await this[_0x751b33(0x103)](_0x364949),_0xc21cf3=await _0x452e42['lintText'](_0x1b1502,{'filePath':_0x357d8a,'warnIgnored':![]}),_0x2e01f3=[];if(_0xc21cf3&&_0xc21cf3['length']>0x0){const _0x192151=_0xc21cf3[0x0];for(const _0x332e91 of _0x192151[_0x751b33(0xdf)]){_0x2e01f3['push'](this['formatMessage'](_0x332e91,_0x357d8a));}}return this['logger']?.['debug'](_0x751b33(0xe9),{'file':_0x357d8a,'totalDiagnostics':_0x2e01f3['length'],'errors':_0x2e01f3[_0x751b33(0xc9)](_0x5aa48b=>_0x5aa48b[_0x751b33(0xf5)]===STATIC_ANALYSIS['SEVERITY'][_0x751b33(0xfb)])[_0x751b33(0xdb)],'warnings':_0x2e01f3[_0x751b33(0xc9)](_0x13ba25=>_0x13ba25[_0x751b33(0xf5)]===STATIC_ANALYSIS['SEVERITY'][_0x751b33(0xcb)])['length']}),_0x2e01f3;}catch(_0x12295b){return this['logger']?.['error']('ESLint\x20analysis\x20failed',{'file':_0x357d8a,'error':_0x12295b[_0x751b33(0xcc)]}),[];}}async['fix'](_0x1a8a00,_0x66256e,_0x5121e5={}){const _0x585029=a0_0x291e45;try{const _0x1915ee=await this['getESLintInstance']({..._0x5121e5,'fix':!![]}),_0x137a0e=await _0x1915ee[_0x585029(0xdd)](_0x66256e,{'filePath':_0x1a8a00,'warnIgnored':![]});if(_0x137a0e&&_0x137a0e[_0x585029(0xdb)]>0x0){const _0x58e2ae=_0x137a0e[0x0];return{'fixed':_0x58e2ae['output']!==undefined,'content':_0x58e2ae[_0x585029(0x100)]||_0x66256e,'fixedCount':_0x58e2ae['fixableErrorCount']+_0x58e2ae[_0x585029(0xfc)],'remainingErrors':_0x58e2ae['errorCount']-_0x58e2ae[_0x585029(0xef)],'remainingWarnings':_0x58e2ae[_0x585029(0xc4)]-_0x58e2ae['fixableWarningCount'],'changes':_0x58e2ae['output']?this[_0x585029(0xe7)](_0x66256e,_0x58e2ae['output']):[]};}return{'fixed':![],'content':_0x66256e,'fixedCount':0x0,'remainingErrors':0x0,'remainingWarnings':0x0,'changes':[]};}catch(_0x26e29c){this[_0x585029(0xd5)]?.['error']('ESLint\x20fix\x20failed',{'file':_0x1a8a00,'error':_0x26e29c[_0x585029(0xcc)]});throw new Error('ESLint\x20fix\x20failed:\x20'+_0x26e29c['message']);}}async['getESLintInstance'](_0x3db309={}){const _0x31ce26=a0_0x291e45,{workingDir:_0x171977,fix:fix=![],framework:_0x4961a8}=_0x3db309,_0x3325ad=await this[_0x31ce26(0xe1)](_0x171977,_0x4961a8),_0x376136=new ESLint({'fix':fix,'useEslintrc':!![],'overrideConfig':_0x3325ad,'errorOnUnmatchedPattern':![]});return _0x376136;}async['getESLintConfig'](_0xf30da2,_0x2c6c1e){const _0x52b910=a0_0x291e45,_0x27369f={'env':{'browser':!![],'es2021':!![],'node':!![]},'parserOptions':{'ecmaVersion':'latest','sourceType':_0x52b910(0xd2)},'rules':{'no-unused-vars':_0x52b910(0xff),'no-undef':_0x52b910(0xf6),'no-console':'off','semi':[_0x52b910(0xff),'always'],'quotes':['warn',_0x52b910(0xf7),{'avoidEscape':!![]}]}};if(_0x2c6c1e===_0x52b910(0xe6))_0x27369f['extends']=['eslint:recommended'],_0x27369f['parserOptions'][_0x52b910(0xd6)]={'jsx':!![]},_0x27369f[_0x52b910(0xe3)]={'react':{'version':'detect'}};else _0x2c6c1e==='vue'?_0x27369f['extends']=['eslint:recommended']:_0x27369f[_0x52b910(0x102)]=[_0x52b910(0xdc)];if(_0xf30da2){const _0x5a8857=[_0x52b910(0xd4),'.eslintrc.cjs','.eslintrc.json','eslint.config.js'];for(const _0xa16679 of _0x5a8857){try{const _0x3cf4d4=a0_0x4cccf8[_0x52b910(0xed)](_0xf30da2,_0xa16679);return await a0_0x4a7477[_0x52b910(0xf9)](_0x3cf4d4),this['logger']?.['debug']('Found\x20ESLint\x20config',{'configFile':_0xa16679}),{};}catch{}}}return _0x27369f;}[a0_0x291e45(0xeb)](_0x550d32,_0x554c05){const _0x5e41ee=a0_0x291e45;return{'file':_0x554c05,'line':_0x550d32['line']||0x1,'column':_0x550d32[_0x5e41ee(0xe4)]||0x1,'endLine':_0x550d32['endLine'],'endColumn':_0x550d32['endColumn'],'severity':_0x550d32[_0x5e41ee(0xf5)]===0x2?STATIC_ANALYSIS[_0x5e41ee(0xd3)][_0x5e41ee(0xfb)]:STATIC_ANALYSIS[_0x5e41ee(0xd3)]['WARNING'],'rule':_0x550d32[_0x5e41ee(0xe0)]||_0x5e41ee(0xfe),'message':_0x550d32[_0x5e41ee(0xcc)],'category':this[_0x5e41ee(0x101)](_0x550d32[_0x5e41ee(0xe0)]),'fixable':_0x550d32[_0x5e41ee(0xe8)]!==undefined,'source':'eslint'};}[a0_0x291e45(0x101)](_0x57a02c){const _0x47a3fd=a0_0x291e45;if(!_0x57a02c)return STATIC_ANALYSIS[_0x47a3fd(0xf2)]['STYLE'];if(_0x57a02c[_0x47a3fd(0xce)]('security')||_0x57a02c['includes'](_0x47a3fd(0xd7))||_0x57a02c==='no-eval'||_0x57a02c==='no-implied-eval')return STATIC_ANALYSIS[_0x47a3fd(0xf2)][_0x47a3fd(0xc5)];if(_0x57a02c['includes'](_0x47a3fd(0xd0))||_0x57a02c==='no-await-in-loop'||_0x57a02c===_0x47a3fd(0xc6))return STATIC_ANALYSIS[_0x47a3fd(0xf2)]['PERFORMANCE'];if(_0x57a02c[_0x47a3fd(0xce)]('import')||_0x57a02c==='no-undef')return STATIC_ANALYSIS['CATEGORY']['IMPORT'];if(_0x57a02c['includes'](_0x47a3fd(0xcf))||_0x57a02c===_0x47a3fd(0xd1)||_0x57a02c===_0x47a3fd(0xc7)||_0x57a02c===_0x47a3fd(0xea))return STATIC_ANALYSIS[_0x47a3fd(0xf2)]['BEST_PRACTICE'];return STATIC_ANALYSIS['CATEGORY'][_0x47a3fd(0xf0)];}['describeChanges'](_0x160372,_0x4caeae){const _0x4223c5=a0_0x291e45,_0xcbdff1=[],_0x3e16c3=_0x160372['split']('\x0a'),_0x592638=_0x4caeae[_0x4223c5(0xf4)]('\x0a'),_0x55ac8b=Math[_0x4223c5(0xfd)](_0x3e16c3[_0x4223c5(0xdb)],_0x592638['length']);for(let _0x3cb571=0x0;_0x3cb571<_0x55ac8b;_0x3cb571++){const _0x4565fb=_0x3e16c3[_0x3cb571]||'',_0x59bf4e=_0x592638[_0x3cb571]||'';_0x4565fb!==_0x59bf4e&&_0xcbdff1[_0x4223c5(0xda)]({'line':_0x3cb571+0x1,'type':_0x4565fb&&_0x59bf4e?'modified':_0x4565fb?_0x4223c5(0xcd):'added','original':_0x4565fb,'fixed':_0x59bf4e});}return _0xcbdff1;}['getSupportedExtensions'](){const _0x5f3e66=a0_0x291e45;return[_0x5f3e66(0xf8),'.jsx','.mjs','.cjs'];}['supportsAutoFix'](){return!![];}}export default ESLintAnalyzer;