@loxia-labs/loxia-autopilot-one 1.0.17 → 1.0.19

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 (122) hide show
  1. package/README.md +5 -3
  2. package/bin/cli.js +1 -1
  3. package/bin/loxia-terminal-v2.js +1 -1
  4. package/bin/loxia-terminal.js +1 -1
  5. package/bin/start-with-terminal.js +1 -1
  6. package/package.json +1 -1
  7. package/scripts/install-scanners.js +1 -1
  8. package/src/analyzers/CSSAnalyzer.js +1 -1
  9. package/src/analyzers/ConfigValidator.js +1 -1
  10. package/src/analyzers/ESLintAnalyzer.js +1 -1
  11. package/src/analyzers/JavaScriptAnalyzer.js +1 -1
  12. package/src/analyzers/PrettierFormatter.js +1 -1
  13. package/src/analyzers/PythonAnalyzer.js +1 -1
  14. package/src/analyzers/SecurityAnalyzer.js +1 -1
  15. package/src/analyzers/TypeScriptAnalyzer.js +1 -1
  16. package/src/analyzers/codeCloneDetector/analyzer.js +1 -1
  17. package/src/analyzers/codeCloneDetector/detector.js +1 -1
  18. package/src/analyzers/codeCloneDetector/index.js +1 -1
  19. package/src/analyzers/codeCloneDetector/parser.js +1 -1
  20. package/src/analyzers/codeCloneDetector/reporter.js +1 -1
  21. package/src/analyzers/codeCloneDetector/scanner.js +1 -1
  22. package/src/core/agentPool.js +1 -1
  23. package/src/core/agentScheduler.js +1 -1
  24. package/src/core/contextManager.js +1 -1
  25. package/src/core/messageProcessor.js +1 -1
  26. package/src/core/orchestrator.js +1 -1
  27. package/src/core/stateManager.js +1 -1
  28. package/src/index.js +1 -1
  29. package/src/interfaces/cli.js +1 -1
  30. package/src/interfaces/terminal/__tests__/smoke/advancedFeatures.test.js +1 -1
  31. package/src/interfaces/terminal/__tests__/smoke/agentControl.test.js +1 -1
  32. package/src/interfaces/terminal/__tests__/smoke/agents.test.js +1 -1
  33. package/src/interfaces/terminal/__tests__/smoke/components.test.js +1 -1
  34. package/src/interfaces/terminal/__tests__/smoke/connection.test.js +1 -1
  35. package/src/interfaces/terminal/__tests__/smoke/enhancements.test.js +1 -1
  36. package/src/interfaces/terminal/__tests__/smoke/imports.test.js +1 -1
  37. package/src/interfaces/terminal/__tests__/smoke/messages.test.js +1 -1
  38. package/src/interfaces/terminal/__tests__/smoke/tools.test.js +1 -1
  39. package/src/interfaces/terminal/api/apiClient.js +1 -1
  40. package/src/interfaces/terminal/api/messageRouter.js +1 -1
  41. package/src/interfaces/terminal/api/session.js +1 -1
  42. package/src/interfaces/terminal/api/websocket.js +1 -1
  43. package/src/interfaces/terminal/components/AgentCreator.js +1 -1
  44. package/src/interfaces/terminal/components/AgentEditor.js +1 -1
  45. package/src/interfaces/terminal/components/AgentSwitcher.js +1 -1
  46. package/src/interfaces/terminal/components/ErrorBoundary.js +1 -1
  47. package/src/interfaces/terminal/components/ErrorPanel.js +1 -1
  48. package/src/interfaces/terminal/components/Header.js +1 -1
  49. package/src/interfaces/terminal/components/HelpPanel.js +1 -1
  50. package/src/interfaces/terminal/components/InputBox.js +1 -1
  51. package/src/interfaces/terminal/components/Layout.js +1 -1
  52. package/src/interfaces/terminal/components/LoadingSpinner.js +1 -1
  53. package/src/interfaces/terminal/components/MessageList.js +1 -1
  54. package/src/interfaces/terminal/components/MultilineTextInput.js +1 -1
  55. package/src/interfaces/terminal/components/SearchPanel.js +1 -1
  56. package/src/interfaces/terminal/components/SettingsPanel.js +1 -1
  57. package/src/interfaces/terminal/components/StatusBar.js +1 -1
  58. package/src/interfaces/terminal/components/TextInput.js +1 -1
  59. package/src/interfaces/terminal/config/agentEditorConstants.js +1 -1
  60. package/src/interfaces/terminal/config/constants.js +1 -1
  61. package/src/interfaces/terminal/index.js +1 -1
  62. package/src/interfaces/terminal/state/useAgentControl.js +1 -1
  63. package/src/interfaces/terminal/state/useAgents.js +1 -1
  64. package/src/interfaces/terminal/state/useConnection.js +1 -1
  65. package/src/interfaces/terminal/state/useMessages.js +1 -1
  66. package/src/interfaces/terminal/state/useTools.js +1 -1
  67. package/src/interfaces/terminal/utils/debugLogger.js +1 -1
  68. package/src/interfaces/terminal/utils/settingsStorage.js +1 -1
  69. package/src/interfaces/terminal/utils/theme.js +1 -1
  70. package/src/interfaces/webServer.js +1 -1
  71. package/src/modules/fileExplorer/controller.js +1 -1
  72. package/src/modules/fileExplorer/index.js +1 -1
  73. package/src/modules/fileExplorer/middleware.js +1 -1
  74. package/src/modules/fileExplorer/routes.js +1 -1
  75. package/src/services/agentActivityService.js +1 -1
  76. package/src/services/aiService.js +1 -1
  77. package/src/services/apiKeyManager.js +1 -1
  78. package/src/services/benchmarkService.js +1 -1
  79. package/src/services/budgetService.js +1 -1
  80. package/src/services/contextInjectionService.js +1 -1
  81. package/src/services/conversationCompactionService.js +1 -1
  82. package/src/services/errorHandler.js +1 -1
  83. package/src/services/fileAttachmentService.js +1 -1
  84. package/src/services/modelRouterService.js +1 -1
  85. package/src/services/modelsService.js +1 -1
  86. package/src/services/qualityInspector.js +1 -1
  87. package/src/services/tokenCountingService.js +1 -1
  88. package/src/tools/agentCommunicationTool.js +1 -1
  89. package/src/tools/agentDelayTool.js +1 -1
  90. package/src/tools/asyncToolManager.js +1 -1
  91. package/src/tools/baseTool.js +1 -1
  92. package/src/tools/browserTool.js +1 -1
  93. package/src/tools/cloneDetectionTool.js +1 -1
  94. package/src/tools/dependencyResolverTool.js +1 -1
  95. package/src/tools/fileContentReplaceTool.js +1 -1
  96. package/src/tools/fileSystemTool.js +1 -1
  97. package/src/tools/fileTreeTool.js +1 -1
  98. package/src/tools/imageTool.js +1 -1
  99. package/src/tools/importAnalyzerTool.js +1 -1
  100. package/src/tools/jobDoneTool.js +1 -1
  101. package/src/tools/seekTool.js +1 -1
  102. package/src/tools/staticAnalysisTool.js +1 -1
  103. package/src/tools/taskManagerTool.js +1 -1
  104. package/src/tools/terminalTool.js +1 -1
  105. package/src/tools/webTool.js +1 -1
  106. package/src/types/agent.js +1 -1
  107. package/src/types/contextReference.js +1 -1
  108. package/src/types/conversation.js +1 -1
  109. package/src/types/toolCommand.js +1 -1
  110. package/src/utilities/attachmentValidator.js +1 -1
  111. package/src/utilities/configManager.js +1 -1
  112. package/src/utilities/constants.js +1 -1
  113. package/src/utilities/directoryAccessManager.js +1 -1
  114. package/src/utilities/fileProcessor.js +1 -1
  115. package/src/utilities/logger.js +1 -1
  116. package/src/utilities/tagParser.js +1 -1
  117. package/src/utilities/toolConstants.js +1 -1
  118. package/src/utilities/userDataDir.js +1 -1
  119. package/web-ui/build/index.html +2 -2
  120. package/web-ui/build/static/index-Cb8CHAFw.css +1 -0
  121. package/web-ui/build/static/{index-DzOU48ux.js → index-CcwO7jS4.js} +72 -72
  122. package/web-ui/build/static/index-CRkOpV4k.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.16
102
+ # Should display: Loxia Autopilot One v1.0.19
103
103
  ```
104
104
 
105
105
  ### 4. Create an API Key
@@ -369,17 +369,19 @@ Loxia automatically compacts long conversations to stay within token limits:
369
369
 
370
370
  ## 🛣️ Roadmap
371
371
 
372
- ### Current Version (1.0.16)
372
+ ### Current Version (1.0.19)
373
373
 
374
374
  - ✅ Multi-agent orchestration
375
375
  - ✅ 18+ specialized tools
376
376
  - ✅ Web UI + CLI interfaces
377
- - ✅ Conversation compaction
377
+ - ✅ Conversation compaction with round-robin model selection
378
378
  - ✅ File attachments
379
379
  - ✅ Task management
380
380
  - ✅ Centralized agent activity service
381
381
  - ✅ Intelligent loop detection
382
382
  - ✅ Persistent user data across npm updates
383
+ - ✅ Version status display with update notifications
384
+ - ✅ Automatic token limit error recovery
383
385
 
384
386
  ### Upcoming Features
385
387
 
package/bin/cli.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x1264ea=a0_0x466a;(function(_0x26470b,_0x575efe){const _0x439675=a0_0x466a,_0x3f3c0d=_0x26470b();while(!![]){try{const _0x2a51ab=parseInt(_0x439675(0x208))/0x1*(-parseInt(_0x439675(0x217))/0x2)+parseInt(_0x439675(0x1d8))/0x3+-parseInt(_0x439675(0x210))/0x4+-parseInt(_0x439675(0x1e6))/0x5+parseInt(_0x439675(0x1f6))/0x6*(-parseInt(_0x439675(0x1e1))/0x7)+parseInt(_0x439675(0x21e))/0x8*(parseInt(_0x439675(0x1e0))/0x9)+-parseInt(_0x439675(0x1d9))/0xa*(-parseInt(_0x439675(0x1ff))/0xb);if(_0x2a51ab===_0x575efe)break;else _0x3f3c0d['push'](_0x3f3c0d['shift']());}catch(_0x49d353){_0x3f3c0d['push'](_0x3f3c0d['shift']());}}}(a0_0x3438,0x25699));import{fileURLToPath}from'url';import{dirname,join}from'path';function a0_0x466a(_0x5dcd0f,_0x4a41f3){_0x5dcd0f=_0x5dcd0f-0x1d4;const _0x343854=a0_0x3438();let _0x466a5b=_0x343854[_0x5dcd0f];return _0x466a5b;}import{spawn,exec}from'child_process';import{readFileSync}from'fs';import a0_0x303651 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x1264ea(0x202),SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process[a0_0x1264ea(0x1e9)][a0_0x1264ea(0x1ea)](0x2),command=args[0x0]&&!args[0x0][a0_0x1264ea(0x1e3)]('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args['includes']('--help')||args[a0_0x1264ea(0x1f4)]('-h'),'version':args['includes'](a0_0x1264ea(0x1e8))||args[a0_0x1264ea(0x1f4)]('-v')};for(let i=0x0;i<args[a0_0x1264ea(0x21d)];i++){args[i]==='--port'&&args[i+0x1]&&(flags[a0_0x1264ea(0x218)]=parseInt(args[i+0x1],0xa)),args[i]===a0_0x1264ea(0x212)&&args[i+0x1]&&(flags['host']=args[i+0x1]);}const port=flags[a0_0x1264ea(0x218)]||DEFAULT_PORT,host=flags[a0_0x1264ea(0x1dd)]||DEFAULT_HOST,serverUrl=a0_0x1264ea(0x1fd)+host+':'+port;if(flags[a0_0x1264ea(0x1eb)]){const pkgPath=join(__dirname,'..',a0_0x1264ea(0x1f0)),pkg=JSON[a0_0x1264ea(0x1ee)](readFileSync(pkgPath,a0_0x1264ea(0x207)));console['log'](a0_0x1264ea(0x1e5)+pkg['version']),process[a0_0x1264ea(0x20c)](0x0);}if(flags[a0_0x1264ea(0x209)]||!command){const pkgPath=join(__dirname,'..',a0_0x1264ea(0x1f0)),pkg=JSON[a0_0x1264ea(0x1ee)](readFileSync(pkgPath,a0_0x1264ea(0x207)));console[a0_0x1264ea(0x1fc)](a0_0x1264ea(0x20b)+pkg[a0_0x1264ea(0x1eb)]+a0_0x1264ea(0x20f)+DEFAULT_PORT+a0_0x1264ea(0x1d7)+DEFAULT_HOST+')\x0a\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x20message\x0a\x20\x20-v,\x20--version\x20\x20\x20\x20\x20Show\x20version\x20number\x0a\x0aExamples:\x0a\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20open\x20browser\x0a\x20\x20loxia\x20terminal\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Connect\x20Terminal\x20UI\x20to\x20running\x20server\x0a\x20\x20loxia\x20plus-terminal\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a\x20\x20loxia\x20web\x20--port\x203000\x20\x20\x20\x20#\x20Use\x20custom\x20port\x0a\x0aQuick\x20Start:\x0a\x20\x201.\x20Run\x20\x27loxia\x20web\x27\x20to\x20start\x20with\x20Web\x20UI\x0a\x20\x202.\x20Or\x20run\x20\x27loxia\x20plus-terminal\x27\x20for\x20Terminal\x20UI\x20experience\x0a\x0aDocumentation:\x0a\x20\x20https://autopilot.loxia.ai\x0a\x0a'),process['exit'](0x0);}async function checkServerRunning(_0x2a6be6,_0x1b6b4e,_0x13f196=0x1){for(let _0x35d41c=0x0;_0x35d41c<_0x13f196;_0x35d41c++){const _0x5134c9=await new Promise(_0x47984e=>{const _0xa9ace3=a0_0x466a,_0x260f61=a0_0x303651[_0xa9ace3(0x20a)](_0xa9ace3(0x1fd)+_0x2a6be6+':'+_0x1b6b4e+_0xa9ace3(0x1f7),_0x360f45=>{_0x47984e(_0x360f45['statusCode']===0xc8);});_0x260f61['on'](_0xa9ace3(0x1f8),()=>_0x47984e(![])),_0x260f61['setTimeout'](0x7d0,()=>{const _0x35a148=_0xa9ace3;_0x260f61[_0x35a148(0x20d)](),_0x47984e(![]);});});if(_0x5134c9)return!![];_0x35d41c<_0x13f196-0x1&&await new Promise(_0x5b65ff=>setTimeout(_0x5b65ff,SERVER_CHECK_INTERVAL));}return![];}function a0_0x3438(){const _0x28b245=['SIGTERM','node','\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.','ceil','length','8FgtwKh','src','Starting\x20Loxia\x20server...\x0a','SIGINT','catch',')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20','680961nOEPra','25690DnYcrl','web','start\x20\x22\x22\x20\x22','Waiting\x20for\x20server\x20to\x20start...','host','index.js','\x20manually.','2176326tRKhDs','2912WZqJhg','kill','startsWith','win32','Loxia\x20Autopilot\x20One\x20v','408400DDCIdR','ignore','--version','argv','slice','version','loxia-terminal.js','\x0aServer\x20may\x20still\x20be\x20starting.\x20Open\x20','parse','env','package.json','Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.','Starting\x20Terminal\x20UI...\x0a','platform','includes','LOXIA_HOST','3072kHhLFl','/api/health','error','open\x20\x22','\x0aPlease\x20start\x20the\x20server\x20first:','inherit','log','http://','toString','1320KSOJBb','\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI','Could\x20not\x20open\x20browser\x20automatically.','localhost','unref','\x0aServer\x20is\x20not\x20running\x20at\x20','Checking\x20if\x20server\x20is\x20running...','\x0aShutting\x20down\x20server...','utf8','2861vbciLJ','help','get','\x0aLoxia\x20Autopilot\x20One\x20v','exit','destroy','Server\x20running\x20at\x20','\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','366820RlpDYm','\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a','--host','Please\x20open\x20manually:\x20','xdg-open\x20\x22','\x0aOpening\x20Web\x20UI\x20at\x20','Error:','166aMLWdZ','port'];a0_0x3438=function(){return _0x28b245;};return a0_0x3438();}async function waitForServer(_0x1205d8,_0xeeea4f,_0x4ba9c6=SERVER_STARTUP_TIMEOUT){const _0x23f347=a0_0x1264ea,_0x37bfcd=Math[_0x23f347(0x21c)](_0x4ba9c6/SERVER_CHECK_INTERVAL);return checkServerRunning(_0x1205d8,_0xeeea4f,_0x37bfcd);}function openBrowser(_0x5c2145){const _0x282a3c=a0_0x1264ea,_0x4309e5=process[_0x282a3c(0x1f3)];let _0x292c17;if(_0x4309e5==='darwin')_0x292c17=_0x282a3c(0x1f9)+_0x5c2145+'\x22';else _0x4309e5===_0x282a3c(0x1e4)?_0x292c17=_0x282a3c(0x1db)+_0x5c2145+'\x22':_0x292c17=_0x282a3c(0x214)+_0x5c2145+'\x22';exec(_0x292c17,_0x39d90a=>{const _0xd494c2=_0x282a3c;_0x39d90a&&(console[_0xd494c2(0x1fc)](_0xd494c2(0x201)),console['log'](_0xd494c2(0x213)+_0x5c2145));});}function startServer(_0x3ceb98=![]){const _0x205302=a0_0x1264ea,_0x44092b={...process[_0x205302(0x1ef)],'LOXIA_PORT':port[_0x205302(0x1fe)](),'PORT':port[_0x205302(0x1fe)]()};flags['host']&&(_0x44092b[_0x205302(0x1f5)]=flags[_0x205302(0x1dd)]);const _0x3fa527=join(__dirname,'..',_0x205302(0x21f),_0x205302(0x1de)),_0x4dc5aa=spawn(_0x205302(0x21a),[_0x3fa527],{'cwd':join(__dirname,'..'),'env':_0x44092b,'stdio':_0x3ceb98?[_0x205302(0x1e7),_0x205302(0x1e7),_0x205302(0x1e7)]:_0x205302(0x1fb),'detached':_0x3ceb98});return _0x3ceb98&&_0x4dc5aa[_0x205302(0x203)](),_0x4dc5aa;}function startTerminalUI(){const _0x20aa23=a0_0x1264ea,_0x2df044=join(__dirname,_0x20aa23(0x1ec)),_0x49b3bc={...process[_0x20aa23(0x1ef)],'LOXIA_PORT':port[_0x20aa23(0x1fe)](),'LOXIA_HOST':host},_0x752a0b=spawn(_0x20aa23(0x21a),[_0x2df044],{'cwd':join(__dirname,'..'),'env':_0x49b3bc,'stdio':_0x20aa23(0x1fb)});return _0x752a0b;}const commands={'web':async()=>{const _0x47d70d=a0_0x1264ea;console[_0x47d70d(0x1fc)](_0x47d70d(0x1d4));const _0xb81fd2=startServer(![]);console[_0x47d70d(0x1fc)](_0x47d70d(0x1dc));const _0x312aa3=await waitForServer(host,port);_0x312aa3?(console[_0x47d70d(0x1fc)](_0x47d70d(0x215)+serverUrl),openBrowser(serverUrl)):console[_0x47d70d(0x1fc)](_0x47d70d(0x1ed)+serverUrl+_0x47d70d(0x1df)),process['on']('SIGINT',()=>_0xb81fd2[_0x47d70d(0x1e2)](_0x47d70d(0x1d5))),process['on'](_0x47d70d(0x219),()=>_0xb81fd2[_0x47d70d(0x1e2)](_0x47d70d(0x219))),_0xb81fd2['on'](_0x47d70d(0x20c),_0x64f269=>process[_0x47d70d(0x20c)](_0x64f269||0x0));},'plus-web':async()=>{const _0x19796c=a0_0x1264ea;await commands[_0x19796c(0x1da)]();},'terminal':async()=>{const _0x155c75=a0_0x1264ea;console['log'](_0x155c75(0x205));const _0x81a185=await checkServerRunning(host,port);!_0x81a185&&(console[_0x155c75(0x1f8)](_0x155c75(0x204)+serverUrl),console[_0x155c75(0x1f8)](_0x155c75(0x1fa)),console[_0x155c75(0x1f8)](_0x155c75(0x200)),console[_0x155c75(0x1f8)](_0x155c75(0x211)),process[_0x155c75(0x20c)](0x1));console[_0x155c75(0x1fc)]('Server\x20is\x20running\x20at\x20'+serverUrl),console[_0x155c75(0x1fc)](_0x155c75(0x1f2));const _0x3d1266=startTerminalUI();process['on'](_0x155c75(0x1d5),()=>_0x3d1266[_0x155c75(0x1e2)](_0x155c75(0x1d5))),process['on'](_0x155c75(0x219),()=>_0x3d1266[_0x155c75(0x1e2)](_0x155c75(0x219))),_0x3d1266['on'](_0x155c75(0x20c),_0x2d0f5e=>process[_0x155c75(0x20c)](_0x2d0f5e||0x0));},'plus-terminal':async()=>{const _0x1ab78e=a0_0x1264ea;console[_0x1ab78e(0x1fc)]('Starting\x20Loxia\x20server\x20in\x20background...');const _0x557d94=startServer(!![]),_0x21b058=await waitForServer(host,port);!_0x21b058&&(console[_0x1ab78e(0x1f8)](_0x1ab78e(0x21b)),process[_0x1ab78e(0x20c)](0x1));console['log'](_0x1ab78e(0x20e)+serverUrl),console[_0x1ab78e(0x1fc)](_0x1ab78e(0x1f2));const _0xf1efe0=startTerminalUI();_0xf1efe0['on'](_0x1ab78e(0x20c),_0x48ca3d=>{const _0x4b6343=_0x1ab78e;console[_0x4b6343(0x1fc)](_0x4b6343(0x206));try{process[_0x4b6343(0x1e2)](_0x557d94['pid'],'SIGTERM');}catch(_0x410b12){}process['exit'](_0x48ca3d||0x0);}),process['on'](_0x1ab78e(0x1d5),()=>{const _0x174814=_0x1ab78e;_0xf1efe0[_0x174814(0x1e2)](_0x174814(0x1d5));}),process['on'](_0x1ab78e(0x219),()=>{const _0x11c864=_0x1ab78e;_0xf1efe0[_0x11c864(0x1e2)](_0x11c864(0x219));});}};commands[command]?commands[command]()[a0_0x1264ea(0x1d6)](_0x330c75=>{const _0x2bd7ba=a0_0x1264ea;console[_0x2bd7ba(0x1f8)](_0x2bd7ba(0x216),_0x330c75['message']),process[_0x2bd7ba(0x20c)](0x1);}):(console[a0_0x1264ea(0x1f8)]('Unknown\x20command:\x20'+command),console[a0_0x1264ea(0x1f8)](a0_0x1264ea(0x1f1)),process['exit'](0x1));
3
+ const a0_0x3455d4=a0_0x2017;(function(_0x55acdf,_0x4ff77b){const _0x5511e8=a0_0x2017,_0x3e5950=_0x55acdf();while(!![]){try{const _0xf92874=-parseInt(_0x5511e8(0xcf))/0x1+parseInt(_0x5511e8(0xb3))/0x2+-parseInt(_0x5511e8(0xde))/0x3*(parseInt(_0x5511e8(0xbe))/0x4)+parseInt(_0x5511e8(0xb2))/0x5+parseInt(_0x5511e8(0xc0))/0x6+-parseInt(_0x5511e8(0xf3))/0x7+parseInt(_0x5511e8(0xd9))/0x8*(parseInt(_0x5511e8(0xea))/0x9);if(_0xf92874===_0x4ff77b)break;else _0x3e5950['push'](_0x3e5950['shift']());}catch(_0x4d9248){_0x3e5950['push'](_0x3e5950['shift']());}}}(a0_0x2864,0xc7936));import{fileURLToPath}from'url';import{dirname,join}from'path';import{spawn,exec}from'child_process';import{readFileSync}from'fs';function a0_0x2864(){const _0x42f83b=['web','package.json','8216757byoQgw',')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20','inherit','startsWith','\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI','message','Starting\x20Loxia\x20server\x20in\x20background...','utf8','platform','10149580SHAiKC','\x0aPlease\x20start\x20the\x20server\x20first:','exit','2276085MsoMpp','2005510VALhxr','SIGINT','Please\x20open\x20manually:\x20','catch','log','start\x20\x22\x22\x20\x22','setTimeout','--version','includes','Loxia\x20Autopilot\x20One\x20v','http://','709264qHgMhT','ceil','8449206VoudTp','Checking\x20if\x20server\x20is\x20running...','Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.','port','destroy','\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.','xdg-open\x20\x22','node','statusCode','host','\x20manually.','env','src','\x0aLoxia\x20Autopilot\x20One\x20v','help','1538137sDjJsm','Starting\x20Loxia\x20server...\x0a','toString','\x20-\x20AI\x20Agent\x20System\x0a\x0aUsage:\x0a\x20\x20loxia\x20<command>\x20[options]\x0a\x0aCommands:\x0a\x20\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20+\x20open\x20Web\x20UI\x20in\x20browser\x0a\x20\x20terminal\x20\x20\x20\x20\x20\x20\x20\x20Start\x20Terminal\x20UI\x20(server\x20must\x20be\x20running)\x0a\x20\x20plus-web\x20\x20\x20\x20\x20\x20\x20\x20Alias\x20for\x20\x27web\x27\x0a\x20\x20plus-terminal\x20\x20\x20Start\x20server\x20+\x20Terminal\x20UI\x20together\x0a\x0aOptions:\x0a\x20\x20--port\x20<number>\x20\x20\x20Specify\x20port\x20(default:\x20','version','argv','pid','ignore','parse','SIGTERM','16ZPuHfh','\x0aShutting\x20down\x20server...','--port','\x0aOpening\x20Web\x20UI\x20at\x20','kill','15rpNXzk','--host','Unknown\x20command:\x20','win32','length','error','Could\x20not\x20open\x20browser\x20automatically.','\x0aServer\x20is\x20not\x20running\x20at\x20','/api/health','index.js'];a0_0x2864=function(){return _0x42f83b;};return a0_0x2864();}import a0_0x1c80b4 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST='localhost',SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process[a0_0x3455d4(0xd4)]['slice'](0x2),command=args[0x0]&&!args[0x0][a0_0x3455d4(0xed)]('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args['includes']('--help')||args[a0_0x3455d4(0xbb)]('-h'),'version':args[a0_0x3455d4(0xbb)](a0_0x3455d4(0xba))||args[a0_0x3455d4(0xbb)]('-v')};for(let i=0x0;i<args[a0_0x3455d4(0xe2)];i++){args[i]===a0_0x3455d4(0xdb)&&args[i+0x1]&&(flags['port']=parseInt(args[i+0x1],0xa)),args[i]===a0_0x3455d4(0xdf)&&args[i+0x1]&&(flags[a0_0x3455d4(0xc9)]=args[i+0x1]);}const port=flags[a0_0x3455d4(0xc3)]||DEFAULT_PORT,host=flags[a0_0x3455d4(0xc9)]||DEFAULT_HOST,serverUrl=a0_0x3455d4(0xbd)+host+':'+port;if(flags['version']){const pkgPath=join(__dirname,'..',a0_0x3455d4(0xe9)),pkg=JSON[a0_0x3455d4(0xd7)](readFileSync(pkgPath,a0_0x3455d4(0xf1)));console[a0_0x3455d4(0xb7)](a0_0x3455d4(0xbc)+pkg[a0_0x3455d4(0xd3)]),process['exit'](0x0);}if(flags[a0_0x3455d4(0xce)]||!command){const pkgPath=join(__dirname,'..',a0_0x3455d4(0xe9)),pkg=JSON[a0_0x3455d4(0xd7)](readFileSync(pkgPath,a0_0x3455d4(0xf1)));console['log'](a0_0x3455d4(0xcd)+pkg['version']+a0_0x3455d4(0xd2)+DEFAULT_PORT+a0_0x3455d4(0xeb)+DEFAULT_HOST+')\x0a\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x20message\x0a\x20\x20-v,\x20--version\x20\x20\x20\x20\x20Show\x20version\x20number\x0a\x0aExamples:\x0a\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20open\x20browser\x0a\x20\x20loxia\x20terminal\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Connect\x20Terminal\x20UI\x20to\x20running\x20server\x0a\x20\x20loxia\x20plus-terminal\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a\x20\x20loxia\x20web\x20--port\x203000\x20\x20\x20\x20#\x20Use\x20custom\x20port\x0a\x0aQuick\x20Start:\x0a\x20\x201.\x20Run\x20\x27loxia\x20web\x27\x20to\x20start\x20with\x20Web\x20UI\x0a\x20\x202.\x20Or\x20run\x20\x27loxia\x20plus-terminal\x27\x20for\x20Terminal\x20UI\x20experience\x0a\x0aDocumentation:\x0a\x20\x20https://autopilot.loxia.ai\x0a\x0a'),process['exit'](0x0);}async function checkServerRunning(_0x251934,_0x5aad9d,_0x4b9add=0x1){for(let _0x434726=0x0;_0x434726<_0x4b9add;_0x434726++){const _0x1d8da2=await new Promise(_0x189b29=>{const _0x589d55=a0_0x2017,_0xa67843=a0_0x1c80b4['get'](_0x589d55(0xbd)+_0x251934+':'+_0x5aad9d+_0x589d55(0xe6),_0x1258b3=>{const _0x58a2db=_0x589d55;_0x189b29(_0x1258b3[_0x58a2db(0xc8)]===0xc8);});_0xa67843['on']('error',()=>_0x189b29(![])),_0xa67843[_0x589d55(0xb9)](0x7d0,()=>{const _0x2cdc52=_0x589d55;_0xa67843[_0x2cdc52(0xc4)](),_0x189b29(![]);});});if(_0x1d8da2)return!![];_0x434726<_0x4b9add-0x1&&await new Promise(_0x1552f5=>setTimeout(_0x1552f5,SERVER_CHECK_INTERVAL));}return![];}async function waitForServer(_0x480fb2,_0xa7a71a,_0x3342d1=SERVER_STARTUP_TIMEOUT){const _0x350cf8=a0_0x3455d4,_0x1cd0d1=Math[_0x350cf8(0xbf)](_0x3342d1/SERVER_CHECK_INTERVAL);return checkServerRunning(_0x480fb2,_0xa7a71a,_0x1cd0d1);}function openBrowser(_0x4a620f){const _0x326a53=a0_0x3455d4,_0x44d295=process[_0x326a53(0xf2)];let _0x2675bd;if(_0x44d295==='darwin')_0x2675bd='open\x20\x22'+_0x4a620f+'\x22';else _0x44d295===_0x326a53(0xe1)?_0x2675bd=_0x326a53(0xb8)+_0x4a620f+'\x22':_0x2675bd=_0x326a53(0xc6)+_0x4a620f+'\x22';exec(_0x2675bd,_0x48b1d5=>{const _0x7fa4c0=_0x326a53;_0x48b1d5&&(console[_0x7fa4c0(0xb7)](_0x7fa4c0(0xe4)),console[_0x7fa4c0(0xb7)](_0x7fa4c0(0xb5)+_0x4a620f));});}function startServer(_0x5f54ae=![]){const _0x339ffd=a0_0x3455d4,_0x697ca3={...process[_0x339ffd(0xcb)],'LOXIA_PORT':port[_0x339ffd(0xd1)](),'PORT':port[_0x339ffd(0xd1)]()};flags['host']&&(_0x697ca3['LOXIA_HOST']=flags[_0x339ffd(0xc9)]);const _0x23559f=join(__dirname,'..',_0x339ffd(0xcc),_0x339ffd(0xe7)),_0x5ba812=spawn(_0x339ffd(0xc7),[_0x23559f],{'cwd':join(__dirname,'..'),'env':_0x697ca3,'stdio':_0x5f54ae?[_0x339ffd(0xd6),_0x339ffd(0xd6),_0x339ffd(0xd6)]:_0x339ffd(0xec),'detached':_0x5f54ae});return _0x5f54ae&&_0x5ba812['unref'](),_0x5ba812;}function a0_0x2017(_0x244b06,_0x229135){_0x244b06=_0x244b06-0xb0;const _0x286474=a0_0x2864();let _0x2017e9=_0x286474[_0x244b06];return _0x2017e9;}function startTerminalUI(){const _0x1399f9=a0_0x3455d4,_0x129c59=join(__dirname,'loxia-terminal.js'),_0x4f25e5={...process[_0x1399f9(0xcb)],'LOXIA_PORT':port[_0x1399f9(0xd1)](),'LOXIA_HOST':host},_0x5b270e=spawn(_0x1399f9(0xc7),[_0x129c59],{'cwd':join(__dirname,'..'),'env':_0x4f25e5,'stdio':'inherit'});return _0x5b270e;}const commands={'web':async()=>{const _0x426440=a0_0x3455d4;console[_0x426440(0xb7)](_0x426440(0xd0));const _0x3298ce=startServer(![]);console[_0x426440(0xb7)]('Waiting\x20for\x20server\x20to\x20start...');const _0x5ae852=await waitForServer(host,port);_0x5ae852?(console[_0x426440(0xb7)](_0x426440(0xdc)+serverUrl),openBrowser(serverUrl)):console['log']('\x0aServer\x20may\x20still\x20be\x20starting.\x20Open\x20'+serverUrl+_0x426440(0xca)),process['on'](_0x426440(0xb4),()=>_0x3298ce['kill']('SIGINT')),process['on'](_0x426440(0xd8),()=>_0x3298ce[_0x426440(0xdd)]('SIGTERM')),_0x3298ce['on']('exit',_0x2ae4b0=>process['exit'](_0x2ae4b0||0x0));},'plus-web':async()=>{const _0x440e89=a0_0x3455d4;await commands[_0x440e89(0xe8)]();},'terminal':async()=>{const _0x3bece4=a0_0x3455d4;console[_0x3bece4(0xb7)](_0x3bece4(0xc1));const _0x239f78=await checkServerRunning(host,port);!_0x239f78&&(console[_0x3bece4(0xe3)](_0x3bece4(0xe5)+serverUrl),console['error'](_0x3bece4(0xb0)),console[_0x3bece4(0xe3)](_0x3bece4(0xee)),console['error']('\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a'),process[_0x3bece4(0xb1)](0x1));console[_0x3bece4(0xb7)]('Server\x20is\x20running\x20at\x20'+serverUrl),console['log']('Starting\x20Terminal\x20UI...\x0a');const _0x3e7c93=startTerminalUI();process['on'](_0x3bece4(0xb4),()=>_0x3e7c93[_0x3bece4(0xdd)](_0x3bece4(0xb4))),process['on'](_0x3bece4(0xd8),()=>_0x3e7c93[_0x3bece4(0xdd)](_0x3bece4(0xd8))),_0x3e7c93['on'](_0x3bece4(0xb1),_0x5ed981=>process['exit'](_0x5ed981||0x0));},'plus-terminal':async()=>{const _0x4cc0c6=a0_0x3455d4;console[_0x4cc0c6(0xb7)](_0x4cc0c6(0xf0));const _0x28eb00=startServer(!![]),_0x4c00c3=await waitForServer(host,port);!_0x4c00c3&&(console[_0x4cc0c6(0xe3)](_0x4cc0c6(0xc5)),process[_0x4cc0c6(0xb1)](0x1));console['log']('Server\x20running\x20at\x20'+serverUrl),console['log']('Starting\x20Terminal\x20UI...\x0a');const _0x570402=startTerminalUI();_0x570402['on'](_0x4cc0c6(0xb1),_0x53e784=>{const _0x3593e7=_0x4cc0c6;console[_0x3593e7(0xb7)](_0x3593e7(0xda));try{process['kill'](_0x28eb00[_0x3593e7(0xd5)],_0x3593e7(0xd8));}catch(_0x44beda){}process['exit'](_0x53e784||0x0);}),process['on'](_0x4cc0c6(0xb4),()=>{const _0x35d37c=_0x4cc0c6;_0x570402[_0x35d37c(0xdd)](_0x35d37c(0xb4));}),process['on'](_0x4cc0c6(0xd8),()=>{const _0x3b9d1a=_0x4cc0c6;_0x570402[_0x3b9d1a(0xdd)](_0x3b9d1a(0xd8));});}};commands[command]?commands[command]()[a0_0x3455d4(0xb6)](_0x5625fe=>{const _0x569bdd=a0_0x3455d4;console[_0x569bdd(0xe3)]('Error:',_0x5625fe[_0x569bdd(0xef)]),process[_0x569bdd(0xb1)](0x1);}):(console[a0_0x3455d4(0xe3)](a0_0x3455d4(0xe0)+command),console[a0_0x3455d4(0xe3)](a0_0x3455d4(0xc2)),process['exit'](0x1));
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x3efb97=a0_0x3b53;(function(_0x999f31,_0x1a0794){const _0x2cfccd=a0_0x3b53,_0x8ba1a9=_0x999f31();while(!![]){try{const _0x228c60=parseInt(_0x2cfccd(0x198))/0x1+parseInt(_0x2cfccd(0x1a2))/0x2+parseInt(_0x2cfccd(0x174))/0x3*(parseInt(_0x2cfccd(0x19a))/0x4)+parseInt(_0x2cfccd(0x18d))/0x5*(-parseInt(_0x2cfccd(0x17d))/0x6)+parseInt(_0x2cfccd(0x17a))/0x7*(-parseInt(_0x2cfccd(0x18c))/0x8)+parseInt(_0x2cfccd(0x19b))/0x9*(-parseInt(_0x2cfccd(0x179))/0xa)+-parseInt(_0x2cfccd(0x186))/0xb*(-parseInt(_0x2cfccd(0x18a))/0xc);if(_0x228c60===_0x1a0794)break;else _0x8ba1a9['push'](_0x8ba1a9['shift']());}catch(_0xa711eb){_0x8ba1a9['push'](_0x8ba1a9['shift']());}}}(a0_0x7e64,0xac78e));function a0_0x3b53(_0x277244,_0x4ea0e8){_0x277244=_0x277244-0x173;const _0x7e6433=a0_0x7e64();let _0x3b53b0=_0x7e6433[_0x277244];return _0x3b53b0;}import{spawn}from'child_process';import a0_0x1f0203 from'net';import a0_0x56838d from'path';import{fileURLToPath}from'url';function a0_0x7e64(){const _0x5030c2=['\x20\x20Loxia\x20Autopilot\x20One\x20-\x20Terminal\x20UI','--ui','150SPBViW','destroy','--host','--port','toString','../src/interfaces/terminal/index.js','💡\x20Troubleshooting:','🔍\x20Checking\x20if\x20server\x20is\x20running\x20at\x20','setTimeout','19723649TXagzV','✓\x20Server\x20started\x20at\x20','web','message','12ipGjzh','stdout','8vnzptW','259270pqMAKN','ignore','localhost','now','✗\x20Server\x20is\x20not\x20running','dirname','connect','...','✓\x20Server\x20is\x20already\x20running\x20at\x20','\x20\x20\x201.\x20Make\x20sure\x20no\x20other\x20process\x20is\x20using\x20port\x208080','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','936572LGACAx','Failed\x20to\x20start\x20server:','95204AiUbOF','137961aSJyuU','pipe','join','log','❌\x20Failed\x20to\x20start\x20Terminal\x20UI:','error','LOXIA_HOST','1583184sBIpPX','data','🚀\x20Starting\x20Loxia\x20server...','\x20\x20\x203.\x20Check\x20logs\x20for\x20more\x20details','stderr','slice','🎨\x20Launching\x20Ink-based\x20Terminal\x20UI...','21ZqIige','Server\x20startup\x20timeout','Socket','\x20\x20\x202.\x20Try\x20running\x20the\x20server\x20manually:\x20node\x20bin/cli.js','env','330ZUzOJJ','8254239TGGaWd'];a0_0x7e64=function(){return _0x5030c2;};return a0_0x7e64();}const __filename=fileURLToPath(import.meta.url),__dirname=a0_0x56838d[a0_0x3efb97(0x192)](__filename),projectRoot=a0_0x56838d[a0_0x3efb97(0x192)](__dirname),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x3efb97(0x18f),SERVER_STARTUP_TIMEOUT=0x2710;async function isServerRunning(_0x112ba2,_0x196f1f){return new Promise(_0x44ab53=>{const _0x18d581=a0_0x3b53,_0x5c51ac=new a0_0x1f0203[(_0x18d581(0x176))]();_0x5c51ac[_0x18d581(0x185)](0x7d0),_0x5c51ac['on'](_0x18d581(0x193),()=>{const _0x12864a=_0x18d581;_0x5c51ac[_0x12864a(0x17e)](),_0x44ab53(!![]);}),_0x5c51ac['on']('timeout',()=>{const _0x5b4188=_0x18d581;_0x5c51ac[_0x5b4188(0x17e)](),_0x44ab53(![]);}),_0x5c51ac['on']('error',()=>{const _0x370420=_0x18d581;_0x5c51ac[_0x370420(0x17e)](),_0x44ab53(![]);}),_0x5c51ac[_0x18d581(0x193)](_0x196f1f,_0x112ba2);});}async function startServer(_0x183f88,_0x3e3469){const _0x3e43d9=a0_0x3efb97;return console['log'](_0x3e43d9(0x1a4)),new Promise((_0x28e7d6,_0x3ea427)=>{const _0x1ff437=_0x3e43d9,_0x5c107a=spawn('node',[a0_0x56838d[_0x1ff437(0x19d)](projectRoot,'bin/cli.js'),_0x1ff437(0x17c),_0x1ff437(0x188),_0x1ff437(0x17f),_0x183f88,'--port',_0x3e3469[_0x1ff437(0x181)]()],{'detached':![],'stdio':[_0x1ff437(0x18e),_0x1ff437(0x19c),_0x1ff437(0x19c)]});_0x5c107a[_0x1ff437(0x18b)]['on']('data',()=>{}),_0x5c107a[_0x1ff437(0x1a6)]['on'](_0x1ff437(0x1a3),()=>{}),_0x5c107a['on'](_0x1ff437(0x1a0),_0x33755e=>{const _0x2a3c42=_0x1ff437;console[_0x2a3c42(0x1a0)](_0x2a3c42(0x199),_0x33755e['message']),_0x3ea427(_0x33755e);});const _0x87ed99=Date[_0x1ff437(0x190)](),_0x1b4ac2=setInterval(async()=>{const _0x441619=_0x1ff437,_0x566319=await isServerRunning(_0x183f88,_0x3e3469);if(_0x566319)clearInterval(_0x1b4ac2),console[_0x441619(0x19e)](_0x441619(0x187)+_0x183f88+':'+_0x3e3469),_0x28e7d6();else Date[_0x441619(0x190)]()-_0x87ed99>SERVER_STARTUP_TIMEOUT&&(clearInterval(_0x1b4ac2),_0x5c107a['kill'](),_0x3ea427(new Error(_0x441619(0x175))));},0x1f4);});}async function main(){const _0x25967a=a0_0x3efb97;try{console[_0x25967a(0x19e)](_0x25967a(0x197)),console[_0x25967a(0x19e)](_0x25967a(0x17b)),console[_0x25967a(0x19e)](_0x25967a(0x197)),console[_0x25967a(0x19e)]('');const _0x33c2c0=process['argv'][_0x25967a(0x1a7)](0x2);let _0xe40c09=DEFAULT_HOST,_0x5a20fb=DEFAULT_PORT;for(let _0x1facaf=0x0;_0x1facaf<_0x33c2c0['length'];_0x1facaf++){if(_0x33c2c0[_0x1facaf]===_0x25967a(0x17f)&&_0x33c2c0[_0x1facaf+0x1])_0xe40c09=_0x33c2c0[_0x1facaf+0x1],_0x1facaf++;else _0x33c2c0[_0x1facaf]===_0x25967a(0x180)&&_0x33c2c0[_0x1facaf+0x1]&&(_0x5a20fb=parseInt(_0x33c2c0[_0x1facaf+0x1],0xa),_0x1facaf++);}console[_0x25967a(0x19e)](_0x25967a(0x184)+_0xe40c09+':'+_0x5a20fb+_0x25967a(0x194));const _0x3f9323=await isServerRunning(_0xe40c09,_0x5a20fb);!_0x3f9323?(console[_0x25967a(0x19e)](_0x25967a(0x191)),await startServer(_0xe40c09,_0x5a20fb)):console['log'](_0x25967a(0x195)+_0xe40c09+':'+_0x5a20fb),console[_0x25967a(0x19e)](''),console[_0x25967a(0x19e)](_0x25967a(0x173)),console[_0x25967a(0x19e)](''),await new Promise(_0x344ca5=>setTimeout(_0x344ca5,0x1f4)),process[_0x25967a(0x178)][_0x25967a(0x1a1)]=_0xe40c09,process[_0x25967a(0x178)]['LOXIA_PORT']=_0x5a20fb[_0x25967a(0x181)](),await import(_0x25967a(0x182));}catch(_0x20e127){console[_0x25967a(0x1a0)](''),console[_0x25967a(0x1a0)](_0x25967a(0x19f)),console[_0x25967a(0x1a0)]('\x20\x20',_0x20e127[_0x25967a(0x189)]),console[_0x25967a(0x1a0)](''),console[_0x25967a(0x1a0)](_0x25967a(0x183)),console[_0x25967a(0x1a0)](_0x25967a(0x196)),console[_0x25967a(0x1a0)](_0x25967a(0x177)),console[_0x25967a(0x1a0)](_0x25967a(0x1a5)),console[_0x25967a(0x1a0)](''),process['exit'](0x1);}}main();
3
+ const a0_0x28d422=a0_0xce81;(function(_0x20648c,_0x28fc5b){const _0x283b51=a0_0xce81,_0x31d8ad=_0x20648c();while(!![]){try{const _0x14fccd=-parseInt(_0x283b51(0xc4))/0x1*(parseInt(_0x283b51(0xb7))/0x2)+parseInt(_0x283b51(0xda))/0x3*(-parseInt(_0x283b51(0xc0))/0x4)+-parseInt(_0x283b51(0xd3))/0x5*(parseInt(_0x283b51(0xdd))/0x6)+parseInt(_0x283b51(0xdf))/0x7*(-parseInt(_0x283b51(0xb1))/0x8)+-parseInt(_0x283b51(0xd6))/0x9+-parseInt(_0x283b51(0xbe))/0xa*(parseInt(_0x283b51(0xc6))/0xb)+parseInt(_0x283b51(0xc9))/0xc;if(_0x14fccd===_0x28fc5b)break;else _0x31d8ad['push'](_0x31d8ad['shift']());}catch(_0x32a85e){_0x31d8ad['push'](_0x31d8ad['shift']());}}}(a0_0x44b3,0x7fe6c));import{spawn}from'child_process';import a0_0xee82d6 from'net';import a0_0x48a9cf from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=a0_0x48a9cf[a0_0x28d422(0xb6)](__filename),projectRoot=a0_0x48a9cf['dirname'](__dirname),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x28d422(0xc7),SERVER_STARTUP_TIMEOUT=0x2710;function a0_0x44b3(){const _0x1f0322=['\x20\x20\x202.\x20Try\x20running\x20the\x20server\x20manually:\x20node\x20bin/cli.js','dirname','2nRYgmG','kill','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','\x20\x20Loxia\x20Autopilot\x20One\x20-\x20Terminal\x20UI','\x20\x20\x203.\x20Check\x20logs\x20for\x20more\x20details','❌\x20Failed\x20to\x20start\x20Terminal\x20UI:','--port','20rYaljw','LOXIA_HOST','1608cBizWl','LOXIA_PORT','timeout','log','949570JamhPg','pipe','155177yEGuNY','localhost','bin/cli.js','43437672vngODF','slice','--host','destroy','message','ignore','🔍\x20Checking\x20if\x20server\x20is\x20running\x20at\x20','error','data','web','1985JhaVtT','../src/interfaces/terminal/index.js','--ui','8035470BjuFJR','connect','length','now','6717PdsZSa','node','argv','1614tuLMCa','stderr','7szzBdl','✗\x20Server\x20is\x20not\x20running','🚀\x20Starting\x20Loxia\x20server...','✓\x20Server\x20started\x20at\x20','Failed\x20to\x20start\x20server:','1747496qEDWmn','join','Server\x20startup\x20timeout','🎨\x20Launching\x20Ink-based\x20Terminal\x20UI...'];a0_0x44b3=function(){return _0x1f0322;};return a0_0x44b3();}async function isServerRunning(_0x1cbddc,_0x1de971){return new Promise(_0x4f6ea2=>{const _0x2a85e8=a0_0xce81,_0x3e70fe=new a0_0xee82d6['Socket']();_0x3e70fe['setTimeout'](0x7d0),_0x3e70fe['on'](_0x2a85e8(0xd7),()=>{_0x3e70fe['destroy'](),_0x4f6ea2(!![]);}),_0x3e70fe['on'](_0x2a85e8(0xc2),()=>{const _0x3336fd=_0x2a85e8;_0x3e70fe[_0x3336fd(0xcc)](),_0x4f6ea2(![]);}),_0x3e70fe['on'](_0x2a85e8(0xd0),()=>{_0x3e70fe['destroy'](),_0x4f6ea2(![]);}),_0x3e70fe[_0x2a85e8(0xd7)](_0x1de971,_0x1cbddc);});}async function startServer(_0x2acd4d,_0x536f7f){const _0x3b68a5=a0_0x28d422;return console['log'](_0x3b68a5(0xae)),new Promise((_0x4a74e3,_0xc3bdd1)=>{const _0x543a94=_0x3b68a5,_0x2d36a1=spawn(_0x543a94(0xdb),[a0_0x48a9cf[_0x543a94(0xb2)](projectRoot,_0x543a94(0xc8)),_0x543a94(0xd5),_0x543a94(0xd2),_0x543a94(0xcb),_0x2acd4d,'--port',_0x536f7f['toString']()],{'detached':![],'stdio':[_0x543a94(0xce),_0x543a94(0xc5),'pipe']});_0x2d36a1['stdout']['on'](_0x543a94(0xd1),()=>{}),_0x2d36a1[_0x543a94(0xde)]['on'](_0x543a94(0xd1),()=>{}),_0x2d36a1['on'](_0x543a94(0xd0),_0x3fafaf=>{const _0x3d4490=_0x543a94;console[_0x3d4490(0xd0)](_0x3d4490(0xb0),_0x3fafaf['message']),_0xc3bdd1(_0x3fafaf);});const _0x57fb5d=Date[_0x543a94(0xd9)](),_0x3633e3=setInterval(async()=>{const _0x1d9c9d=_0x543a94,_0x3ee46c=await isServerRunning(_0x2acd4d,_0x536f7f);if(_0x3ee46c)clearInterval(_0x3633e3),console['log'](_0x1d9c9d(0xaf)+_0x2acd4d+':'+_0x536f7f),_0x4a74e3();else Date['now']()-_0x57fb5d>SERVER_STARTUP_TIMEOUT&&(clearInterval(_0x3633e3),_0x2d36a1[_0x1d9c9d(0xb8)](),_0xc3bdd1(new Error(_0x1d9c9d(0xb3))));},0x1f4);});}async function main(){const _0x33880c=a0_0x28d422;try{console[_0x33880c(0xc3)](_0x33880c(0xb9)),console['log'](_0x33880c(0xba)),console[_0x33880c(0xc3)]('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'),console[_0x33880c(0xc3)]('');const _0xb5ea49=process[_0x33880c(0xdc)][_0x33880c(0xca)](0x2);let _0x2aa5d4=DEFAULT_HOST,_0x279386=DEFAULT_PORT;for(let _0x1ca92b=0x0;_0x1ca92b<_0xb5ea49[_0x33880c(0xd8)];_0x1ca92b++){if(_0xb5ea49[_0x1ca92b]===_0x33880c(0xcb)&&_0xb5ea49[_0x1ca92b+0x1])_0x2aa5d4=_0xb5ea49[_0x1ca92b+0x1],_0x1ca92b++;else _0xb5ea49[_0x1ca92b]===_0x33880c(0xbd)&&_0xb5ea49[_0x1ca92b+0x1]&&(_0x279386=parseInt(_0xb5ea49[_0x1ca92b+0x1],0xa),_0x1ca92b++);}console[_0x33880c(0xc3)](_0x33880c(0xcf)+_0x2aa5d4+':'+_0x279386+'...');const _0x5bcc74=await isServerRunning(_0x2aa5d4,_0x279386);!_0x5bcc74?(console[_0x33880c(0xc3)](_0x33880c(0xe0)),await startServer(_0x2aa5d4,_0x279386)):console[_0x33880c(0xc3)]('✓\x20Server\x20is\x20already\x20running\x20at\x20'+_0x2aa5d4+':'+_0x279386),console[_0x33880c(0xc3)](''),console['log'](_0x33880c(0xb4)),console[_0x33880c(0xc3)](''),await new Promise(_0x575fb0=>setTimeout(_0x575fb0,0x1f4)),process['env'][_0x33880c(0xbf)]=_0x2aa5d4,process['env'][_0x33880c(0xc1)]=_0x279386['toString'](),await import(_0x33880c(0xd4));}catch(_0x2c46b4){console[_0x33880c(0xd0)](''),console['error'](_0x33880c(0xbc)),console['error']('\x20\x20',_0x2c46b4[_0x33880c(0xcd)]),console[_0x33880c(0xd0)](''),console[_0x33880c(0xd0)]('💡\x20Troubleshooting:'),console[_0x33880c(0xd0)]('\x20\x20\x201.\x20Make\x20sure\x20no\x20other\x20process\x20is\x20using\x20port\x208080'),console['error'](_0x33880c(0xb5)),console[_0x33880c(0xd0)](_0x33880c(0xbb)),console[_0x33880c(0xd0)](''),process['exit'](0x1);}}function a0_0xce81(_0x2a5d4d,_0x3de434){_0x2a5d4d=_0x2a5d4d-0xae;const _0x44b3a8=a0_0x44b3();let _0xce8137=_0x44b3a8[_0x2a5d4d];return _0xce8137;}main();
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x529ea5=a0_0x5091;(function(_0x21e367,_0x519ce0){const _0x575461=a0_0x5091,_0x45bda2=_0x21e367();while(!![]){try{const _0xdcdea2=parseInt(_0x575461(0x90))/0x1+parseInt(_0x575461(0x8a))/0x2*(-parseInt(_0x575461(0x7a))/0x3)+parseInt(_0x575461(0x7f))/0x4+-parseInt(_0x575461(0x74))/0x5+parseInt(_0x575461(0x6d))/0x6+-parseInt(_0x575461(0x7c))/0x7+parseInt(_0x575461(0x86))/0x8;if(_0xdcdea2===_0x519ce0)break;else _0x45bda2['push'](_0x45bda2['shift']());}catch(_0x513d33){_0x45bda2['push'](_0x45bda2['shift']());}}}(a0_0x321c,0xcd3b1));import{startTerminalUI}from'../src/interfaces/terminal/index.js';function a0_0x321c(){const _0x569539=['host','--host','7562622uHZTcm','Starting\x20Loxia\x20Terminal\x20UI...','port','\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','LOXIA_PORT','error','\x20\x20npm\x20run\x20terminal-ui','2250030gAgiCp','Or\x20use\x20the\x20web\x20UI\x20instead:','Please\x20run\x20this\x20command\x20in\x20a\x20real\x20terminal\x20without\x20pipes\x20or\x20redirection:','\x20\x20-\x20Background\x20processes\x20(e.g.,\x20&\x20at\x20the\x20end)','then','Connecting\x20to:\x20','2181CfkHUp','argv','2733661muZwIw','exit','waitUntilExit','879428TkxZft','The\x20terminal\x20UI\x20cannot\x20run\x20in:','\x20\x20npm\x20start','stdin','Press\x20Ctrl+C\x20to\x20exit\x0a','LOXIA_HOST','ERROR:\x20Terminal\x20UI\x20requires\x20an\x20interactive\x20terminal\x20(TTY).','6261296pfiGzG','log','slice','isTTY','4114lmCMML','\x20\x20-\x20Redirected\x20output\x20(e.g.,\x20>\x20file.txt,\x202>&1\x20|\x20...)','\x20\x20-\x20Some\x20CI/CD\x20environments','\x0aTerminal\x20UI\x20exited','env','\x0aTerminal\x20UI\x20error:','913637ZzocmJ'];a0_0x321c=function(){return _0x569539;};return a0_0x321c();}const args=process[a0_0x529ea5(0x7b)][a0_0x529ea5(0x88)](0x2),options={'host':'localhost','port':0x1f90};for(let i=0x0;i<args['length'];i++){const arg=args[i];if(arg===a0_0x529ea5(0x6c)||arg==='-h')options[a0_0x529ea5(0x6b)]=args[++i];else{if(arg==='--port'||arg==='-p')options[a0_0x529ea5(0x6f)]=parseInt(args[++i],0xa);else arg==='--help'&&(console[a0_0x529ea5(0x87)](a0_0x529ea5(0x70)),process[a0_0x529ea5(0x7d)](0x0));}}process[a0_0x529ea5(0x8e)]['LOXIA_HOST']&&(options['host']=process[a0_0x529ea5(0x8e)][a0_0x529ea5(0x84)]);process[a0_0x529ea5(0x8e)][a0_0x529ea5(0x71)]&&(options['port']=parseInt(process[a0_0x529ea5(0x8e)][a0_0x529ea5(0x71)],0xa));function a0_0x5091(_0x197723,_0x152261){_0x197723=_0x197723-0x6b;const _0x321cd5=a0_0x321c();let _0x5091ca=_0x321cd5[_0x197723];return _0x5091ca;}!process[a0_0x529ea5(0x82)][a0_0x529ea5(0x89)]&&(console['error'](a0_0x529ea5(0x85)),console[a0_0x529ea5(0x72)](''),console[a0_0x529ea5(0x72)](a0_0x529ea5(0x80)),console[a0_0x529ea5(0x72)]('\x20\x20-\x20Piped\x20environments\x20(e.g.,\x20|\x20head,\x20|\x20grep)'),console[a0_0x529ea5(0x72)](a0_0x529ea5(0x8b)),console[a0_0x529ea5(0x72)](a0_0x529ea5(0x77)),console['error'](a0_0x529ea5(0x8c)),console[a0_0x529ea5(0x72)](''),console['error'](a0_0x529ea5(0x76)),console[a0_0x529ea5(0x72)](a0_0x529ea5(0x73)),console[a0_0x529ea5(0x72)](''),console['error'](a0_0x529ea5(0x75)),console[a0_0x529ea5(0x72)](a0_0x529ea5(0x81)),process[a0_0x529ea5(0x7d)](0x1));console[a0_0x529ea5(0x87)](a0_0x529ea5(0x6e)),console[a0_0x529ea5(0x87)](a0_0x529ea5(0x79)+options[a0_0x529ea5(0x6b)]+':'+options['port']),console[a0_0x529ea5(0x87)](a0_0x529ea5(0x83));const instance=startTerminalUI(options);instance[a0_0x529ea5(0x7e)]()[a0_0x529ea5(0x78)](()=>{const _0x455534=a0_0x529ea5;console[_0x455534(0x87)](_0x455534(0x8d)),process[_0x455534(0x7d)](0x0);})['catch'](_0x155efe=>{const _0x24030b=a0_0x529ea5;console[_0x24030b(0x72)](_0x24030b(0x8f),_0x155efe),process[_0x24030b(0x7d)](0x1);});
3
+ const a0_0x27ab6f=a0_0x23a5;(function(_0x31e463,_0x10b9b1){const _0x59e947=a0_0x23a5,_0x212aaf=_0x31e463();while(!![]){try{const _0x4bec8d=parseInt(_0x59e947(0x191))/0x1*(parseInt(_0x59e947(0x1b1))/0x2)+parseInt(_0x59e947(0x19f))/0x3*(-parseInt(_0x59e947(0x19e))/0x4)+parseInt(_0x59e947(0x1aa))/0x5*(parseInt(_0x59e947(0x19a))/0x6)+parseInt(_0x59e947(0x1a7))/0x7+parseInt(_0x59e947(0x190))/0x8*(parseInt(_0x59e947(0x1a0))/0x9)+parseInt(_0x59e947(0x1ae))/0xa+-parseInt(_0x59e947(0x199))/0xb*(parseInt(_0x59e947(0x19b))/0xc);if(_0x4bec8d===_0x10b9b1)break;else _0x212aaf['push'](_0x212aaf['shift']());}catch(_0x39f9de){_0x212aaf['push'](_0x212aaf['shift']());}}}(a0_0xb436,0xcaf1d));import{startTerminalUI}from'../src/interfaces/terminal/index.js';const args=process[a0_0x27ab6f(0x198)][a0_0x27ab6f(0x19c)](0x2),options={'host':'localhost','port':0x1f90};for(let i=0x0;i<args[a0_0x27ab6f(0x1af)];i++){const arg=args[i];if(arg==='--host'||arg==='-h')options['host']=args[++i];else{if(arg===a0_0x27ab6f(0x1a4)||arg==='-p')options[a0_0x27ab6f(0x194)]=parseInt(args[++i],0xa);else arg==='--help'&&(console[a0_0x27ab6f(0x1a6)](a0_0x27ab6f(0x1a2)),process[a0_0x27ab6f(0x1b0)](0x0));}}process[a0_0x27ab6f(0x1ad)][a0_0x27ab6f(0x192)]&&(options[a0_0x27ab6f(0x197)]=process[a0_0x27ab6f(0x1ad)][a0_0x27ab6f(0x192)]);process[a0_0x27ab6f(0x1ad)][a0_0x27ab6f(0x19d)]&&(options[a0_0x27ab6f(0x194)]=parseInt(process['env'][a0_0x27ab6f(0x19d)],0xa));!process[a0_0x27ab6f(0x1b3)][a0_0x27ab6f(0x1a5)]&&(console[a0_0x27ab6f(0x195)]('ERROR:\x20Terminal\x20UI\x20requires\x20an\x20interactive\x20terminal\x20(TTY).'),console['error'](''),console[a0_0x27ab6f(0x195)](a0_0x27ab6f(0x1ac)),console[a0_0x27ab6f(0x195)](a0_0x27ab6f(0x18e)),console['error']('\x20\x20-\x20Redirected\x20output\x20(e.g.,\x20>\x20file.txt,\x202>&1\x20|\x20...)'),console['error']('\x20\x20-\x20Background\x20processes\x20(e.g.,\x20&\x20at\x20the\x20end)'),console['error'](a0_0x27ab6f(0x1a8)),console[a0_0x27ab6f(0x195)](''),console[a0_0x27ab6f(0x195)](a0_0x27ab6f(0x1a3)),console[a0_0x27ab6f(0x195)](a0_0x27ab6f(0x193)),console[a0_0x27ab6f(0x195)](''),console[a0_0x27ab6f(0x195)]('Or\x20use\x20the\x20web\x20UI\x20instead:'),console['error']('\x20\x20npm\x20start'),process['exit'](0x1));console[a0_0x27ab6f(0x1a6)](a0_0x27ab6f(0x1a9)),console[a0_0x27ab6f(0x1a6)]('Connecting\x20to:\x20'+options[a0_0x27ab6f(0x197)]+':'+options[a0_0x27ab6f(0x194)]),console[a0_0x27ab6f(0x1a6)](a0_0x27ab6f(0x1a1));function a0_0xb436(){const _0x5e11fc=['catch','72jGArlf','10mUCdij','LOXIA_HOST','\x20\x20npm\x20run\x20terminal-ui','port','error','waitUntilExit','host','argv','187Qdpzxr','6nqpdwa','1164108FyWdCO','slice','LOXIA_PORT','476NxxefA','2841WDNvpJ','361764SJRUWt','Press\x20Ctrl+C\x20to\x20exit\x0a','\x0aLoxia\x20Terminal\x20UI\x0a\x0aUsage:\x0a\x20\x20loxia-terminal\x20[options]\x0a\x0aOptions:\x0a\x20\x20--host,\x20-h\x20<host>\x20\x20\x20\x20Backend\x20host\x20(default:\x20localhost)\x0a\x20\x20--port,\x20-p\x20<port>\x20\x20\x20\x20Backend\x20port\x20(default:\x208080)\x0a\x20\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x20message\x0a\x0aEnvironment\x20Variables:\x0a\x20\x20LOXIA_HOST\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Backend\x20host\x0a\x20\x20LOXIA_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Backend\x20port\x0a\x0aExamples:\x0a\x20\x20loxia-terminal\x0a\x20\x20loxia-terminal\x20--host\x20192.168.1.100\x20--port\x203000\x0a\x20\x20LOXIA_HOST=api.example.com\x20LOXIA_PORT=443\x20loxia-terminal\x0a','Please\x20run\x20this\x20command\x20in\x20a\x20real\x20terminal\x20without\x20pipes\x20or\x20redirection:','--port','isTTY','log','3729943xLgXAQ','\x20\x20-\x20Some\x20CI/CD\x20environments','Starting\x20Loxia\x20Terminal\x20UI...','1341455iNtyMv','\x0aTerminal\x20UI\x20error:','The\x20terminal\x20UI\x20cannot\x20run\x20in:','env','13486230UZiEkw','length','exit','16316jyKXjv','then','stdin','\x20\x20-\x20Piped\x20environments\x20(e.g.,\x20|\x20head,\x20|\x20grep)'];a0_0xb436=function(){return _0x5e11fc;};return a0_0xb436();}function a0_0x23a5(_0x409262,_0x28cf2d){_0x409262=_0x409262-0x18e;const _0xb43605=a0_0xb436();let _0x23a5d7=_0xb43605[_0x409262];return _0x23a5d7;}const instance=startTerminalUI(options);instance[a0_0x27ab6f(0x196)]()[a0_0x27ab6f(0x1b2)](()=>{const _0x14b2d1=a0_0x27ab6f;console['log']('\x0aTerminal\x20UI\x20exited'),process[_0x14b2d1(0x1b0)](0x0);})[a0_0x27ab6f(0x18f)](_0x15d676=>{const _0x3d107a=a0_0x27ab6f;console[_0x3d107a(0x195)](_0x3d107a(0x1ab),_0x15d676),process[_0x3d107a(0x1b0)](0x1);});
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x4202bf=a0_0x1cfa;function a0_0xd29b(){const _0x1f207c=['data','32781860VLkubM','\x0a⚠️\x20\x20Received\x20SIGINT,\x20shutting\x20down...','║\x20\x20\x20Loxia\x20AI\x20Agents\x20-\x20Server\x20+\x20Terminal\x20UI\x20\x20\x20\x20\x20\x20║','⚠️\x20\x20Server\x20may\x20not\x20be\x20fully\x20ready,\x20but\x20continuing\x20anyway...','includes','stderr','error','10JEbUxI','setTimeout','SIGKILL','kill','🛑\x20Stopping\x20server...','619468XBrJGA','index.js','PORT','\x0a👋\x20Terminal\x20UI\x20closed.','statusCode','toString','199125sIFfmG','11474624XudJNJ','🚀\x20Starting\x20Loxia\x20server...','SIGTERM','pipe','killed','trim','env','log','35NdTYvO','[SERVER]\x20','Timeout','4606902llUQFo','✅\x20Server\x20is\x20ready!','╚════════════════════════════════════════════════╝','src','bin','loxia-terminal.js','╔════════════════════════════════════════════════╗','node','\x0a⚠️\x20\x20Received\x20SIGTERM,\x20shutting\x20down...','destroy','exit','message','1165249vbhaOm','ignore','4596473lARlwE','6fbNVIy','Server\x20returned\x20','Failed\x20to\x20start\x20Terminal\x20UI:','[SERVER\x20ERROR]\x20','SIGINT'];a0_0xd29b=function(){return _0x1f207c;};return a0_0xd29b();}(function(_0x352f01,_0x349ccf){const _0x16ff5f=a0_0x1cfa,_0x16468e=_0x352f01();while(!![]){try{const _0x490a79=-parseInt(_0x16ff5f(0x1d5))/0x1+-parseInt(_0x16ff5f(0x1e5))/0x2*(parseInt(_0x16ff5f(0x1f0))/0x3)+-parseInt(_0x16ff5f(0x1ea))/0x4*(parseInt(_0x16ff5f(0x1f9))/0x5)+parseInt(_0x16ff5f(0x1d8))/0x6*(-parseInt(_0x16ff5f(0x1d7))/0x7)+parseInt(_0x16ff5f(0x1f1))/0x8+-parseInt(_0x16ff5f(0x1fc))/0x9+parseInt(_0x16ff5f(0x1de))/0xa;if(_0x490a79===_0x349ccf)break;else _0x16468e['push'](_0x16468e['shift']());}catch(_0x69e209){_0x16468e['push'](_0x16468e['shift']());}}}(a0_0xd29b,0xeb0f4));import{spawn}from'child_process';import{fileURLToPath}from'url';import{dirname,join}from'path';import a0_0x4ee972 from'http';function a0_0x1cfa(_0xf366bf,_0x3a95e4){_0xf366bf=_0xf366bf-0x1d3;const _0xd29bfe=a0_0xd29b();let _0x1cfa3c=_0xd29bfe[_0xf366bf];return _0x1cfa3c;}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),rootDir=join(__dirname,'..'),SERVER_PORT=process[a0_0x4202bf(0x1f7)][a0_0x4202bf(0x1ec)]||0x1f90,STARTUP_WAIT=0x7d0;let serverProcess=null;async function checkServerReady(_0x105e71=0xa,_0x2fe2cb=0x1f4){const _0x33f798=a0_0x4202bf;for(let _0x36b012=0x0;_0x36b012<_0x105e71;_0x36b012++){try{return await new Promise((_0x30479c,_0x1068b2)=>{const _0x4b9d4f=a0_0x1cfa,_0x51c65b=a0_0x4ee972['get']('http://localhost:'+SERVER_PORT+'/health',_0x17bd4e=>{const _0x428acb=a0_0x1cfa;_0x17bd4e[_0x428acb(0x1ee)]===0xc8?_0x30479c():_0x1068b2(new Error(_0x428acb(0x1d9)+_0x17bd4e[_0x428acb(0x1ee)]));});_0x51c65b['on'](_0x4b9d4f(0x1e4),_0x1068b2),_0x51c65b[_0x4b9d4f(0x1e6)](0x3e8,()=>{const _0x515b8c=_0x4b9d4f;_0x51c65b[_0x515b8c(0x205)](),_0x1068b2(new Error(_0x515b8c(0x1fb)));});}),console[_0x33f798(0x1f8)](_0x33f798(0x1fd)),!![];}catch(_0xcfd977){_0x36b012<_0x105e71-0x1&&await new Promise(_0xdb46b4=>setTimeout(_0xdb46b4,_0x2fe2cb));}}return console[_0x33f798(0x1f8)](_0x33f798(0x1e1)),![];}async function startServer(){return new Promise(_0x52ba82=>{const _0x56c00d=a0_0x1cfa;console[_0x56c00d(0x1f8)](_0x56c00d(0x1f2));const _0x57efc3=join(rootDir,_0x56c00d(0x1ff),_0x56c00d(0x1eb));serverProcess=spawn(_0x56c00d(0x203),[_0x57efc3],{'cwd':rootDir,'env':{...process[_0x56c00d(0x1f7)]},'stdio':[_0x56c00d(0x1d6),_0x56c00d(0x1f4),_0x56c00d(0x1f4)],'detached':![]}),serverProcess['stdout']['on'](_0x56c00d(0x1dd),_0x24edb5=>{const _0x1aed2c=_0x56c00d,_0x4d4e57=_0x24edb5['toString']()[_0x1aed2c(0x1f6)]();_0x4d4e57&&console[_0x1aed2c(0x1f8)](_0x1aed2c(0x1fa)+_0x4d4e57);}),serverProcess[_0x56c00d(0x1e3)]['on'](_0x56c00d(0x1dd),_0x2926be=>{const _0x4131f4=_0x56c00d,_0x243f16=_0x2926be[_0x4131f4(0x1ef)]()[_0x4131f4(0x1f6)]();_0x243f16&&!_0x243f16[_0x4131f4(0x1e2)]('ExperimentalWarning')&&console[_0x4131f4(0x1e4)](_0x4131f4(0x1db)+_0x243f16);}),serverProcess['on'](_0x56c00d(0x1e4),_0x1adcb3=>{const _0x4742ed=_0x56c00d;console[_0x4742ed(0x1e4)]('Failed\x20to\x20start\x20server:',_0x1adcb3[_0x4742ed(0x1d4)]),process[_0x4742ed(0x1d3)](0x1);}),serverProcess['on']('exit',(_0x5f467e,_0xecc48b)=>{const _0x11e1de=_0x56c00d;_0x5f467e!==null&&_0x5f467e!==0x0&&(console[_0x11e1de(0x1e4)]('Server\x20exited\x20with\x20code\x20'+_0x5f467e),process[_0x11e1de(0x1d3)](_0x5f467e));}),setTimeout(_0x52ba82,STARTUP_WAIT);});}async function startTerminalUI(){const _0x1abef3=a0_0x4202bf;console['log']('🖥️\x20\x20Starting\x20Terminal\x20UI...'),console[_0x1abef3(0x1f8)]('');const _0x5ab019=join(rootDir,_0x1abef3(0x200),_0x1abef3(0x201)),_0x113d90=spawn(_0x1abef3(0x203),[_0x5ab019],{'cwd':rootDir,'env':{...process[_0x1abef3(0x1f7)]},'stdio':'inherit'});return _0x113d90['on'](_0x1abef3(0x1e4),_0x432d60=>{const _0x4e9da8=_0x1abef3;console[_0x4e9da8(0x1e4)](_0x4e9da8(0x1da),_0x432d60[_0x4e9da8(0x1d4)]),cleanup(),process[_0x4e9da8(0x1d3)](0x1);}),_0x113d90['on']('exit',_0x421e02=>{const _0x4e8096=_0x1abef3;console[_0x4e8096(0x1f8)](_0x4e8096(0x1ed)),cleanup(),process[_0x4e8096(0x1d3)](_0x421e02||0x0);}),_0x113d90;}function cleanup(){const _0x8d918b=a0_0x4202bf;serverProcess&&!serverProcess[_0x8d918b(0x1f5)]&&(console['log'](_0x8d918b(0x1e9)),serverProcess[_0x8d918b(0x1e8)](_0x8d918b(0x1f3)),setTimeout(()=>{const _0xc7d10d=_0x8d918b;!serverProcess[_0xc7d10d(0x1f5)]&&serverProcess['kill'](_0xc7d10d(0x1e7));},0x1388));}process['on'](a0_0x4202bf(0x1dc),()=>{const _0x17431e=a0_0x4202bf;console['log'](_0x17431e(0x1df)),cleanup(),process['exit'](0x0);}),process['on'](a0_0x4202bf(0x1f3),()=>{const _0xf9f8e0=a0_0x4202bf;console[_0xf9f8e0(0x1f8)](_0xf9f8e0(0x204)),cleanup(),process[_0xf9f8e0(0x1d3)](0x0);}),process['on'](a0_0x4202bf(0x1d3),()=>{cleanup();});async function main(){const _0x5b4298=a0_0x4202bf;console[_0x5b4298(0x1f8)](_0x5b4298(0x202)),console[_0x5b4298(0x1f8)](_0x5b4298(0x1e0)),console['log'](_0x5b4298(0x1fe)),console['log']('');try{await startServer(),await checkServerReady(),await startTerminalUI(),await new Promise(()=>{});}catch(_0x2d12d1){console[_0x5b4298(0x1e4)]('Error\x20during\x20startup:',_0x2d12d1['message']),cleanup(),process[_0x5b4298(0x1d3)](0x1);}}main();
3
+ function a0_0x467a(){const _0x5dd6f3=['killed','get','32ZnEieH','env','SIGKILL','5380HXkReR','loxia-terminal.js','24150402TcZFSN','stderr','includes','752BlMmEN','[SERVER\x20ERROR]\x20','kill','message','ignore','1845600grHaBq','index.js','log','⚠️\x20\x20Server\x20may\x20not\x20be\x20fully\x20ready,\x20but\x20continuing\x20anyway...','/health','[SERVER]\x20','stdout','error','✅\x20Server\x20is\x20ready!','setTimeout','Error\x20during\x20startup:','node','PORT','SIGTERM','trim','Timeout','5644667yhGOQO','Failed\x20to\x20start\x20server:','SIGINT','exit','ExperimentalWarning','statusCode','\x0a⚠️\x20\x20Received\x20SIGTERM,\x20shutting\x20down...','toString','http://localhost:','1599drFIAm','data','\x0a⚠️\x20\x20Received\x20SIGINT,\x20shutting\x20down...','1376886bylIMq','Failed\x20to\x20start\x20Terminal\x20UI:','pipe','╚════════════════════════════════════════════════╝','6893368zNtKzd'];a0_0x467a=function(){return _0x5dd6f3;};return a0_0x467a();}const a0_0x39716b=a0_0x359a;(function(_0x1a28d5,_0x1e3c91){const _0x383ca4=a0_0x359a,_0x325fe7=_0x1a28d5();while(!![]){try{const _0x737023=-parseInt(_0x383ca4(0x214))/0x1*(parseInt(_0x383ca4(0x217))/0x2)+parseInt(_0x383ca4(0x20a))/0x3*(-parseInt(_0x383ca4(0x21c))/0x4)+-parseInt(_0x383ca4(0x1f1))/0x5+parseInt(_0x383ca4(0x20d))/0x6+-parseInt(_0x383ca4(0x201))/0x7+-parseInt(_0x383ca4(0x211))/0x8+parseInt(_0x383ca4(0x219))/0x9;if(_0x737023===_0x1e3c91)break;else _0x325fe7['push'](_0x325fe7['shift']());}catch(_0xa1c19b){_0x325fe7['push'](_0x325fe7['shift']());}}}(a0_0x467a,0xa84fb));import{spawn}from'child_process';import{fileURLToPath}from'url';import{dirname,join}from'path';import a0_0x2b4e08 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),rootDir=join(__dirname,'..'),SERVER_PORT=process[a0_0x39716b(0x215)][a0_0x39716b(0x1fd)]||0x1f90,STARTUP_WAIT=0x7d0;let serverProcess=null;async function checkServerReady(_0x38f5d5=0xa,_0x3fa063=0x1f4){const _0x489246=a0_0x39716b;for(let _0x122108=0x0;_0x122108<_0x38f5d5;_0x122108++){try{return await new Promise((_0x302a42,_0x219b90)=>{const _0x952297=a0_0x359a,_0xd38e4c=a0_0x2b4e08[_0x952297(0x213)](_0x952297(0x209)+SERVER_PORT+_0x952297(0x1f5),_0x5146b3=>{const _0x1f9524=_0x952297;_0x5146b3['statusCode']===0xc8?_0x302a42():_0x219b90(new Error('Server\x20returned\x20'+_0x5146b3[_0x1f9524(0x206)]));});_0xd38e4c['on']('error',_0x219b90),_0xd38e4c[_0x952297(0x1fa)](0x3e8,()=>{const _0x585f02=_0x952297;_0xd38e4c['destroy'](),_0x219b90(new Error(_0x585f02(0x200)));});}),console[_0x489246(0x1f3)](_0x489246(0x1f9)),!![];}catch(_0x53a465){_0x122108<_0x38f5d5-0x1&&await new Promise(_0x1af219=>setTimeout(_0x1af219,_0x3fa063));}}return console[_0x489246(0x1f3)](_0x489246(0x1f4)),![];}async function startServer(){return new Promise(_0xc148b0=>{const _0x1e243d=a0_0x359a;console[_0x1e243d(0x1f3)]('🚀\x20Starting\x20Loxia\x20server...');const _0x202acf=join(rootDir,'src',_0x1e243d(0x1f2));serverProcess=spawn('node',[_0x202acf],{'cwd':rootDir,'env':{...process[_0x1e243d(0x215)]},'stdio':[_0x1e243d(0x1f0),'pipe',_0x1e243d(0x20f)],'detached':![]}),serverProcess[_0x1e243d(0x1f7)]['on'](_0x1e243d(0x20b),_0x46c54e=>{const _0x5bc08e=_0x1e243d,_0x28cc2c=_0x46c54e['toString']()['trim']();_0x28cc2c&&console[_0x5bc08e(0x1f3)](_0x5bc08e(0x1f6)+_0x28cc2c);}),serverProcess[_0x1e243d(0x21a)]['on'](_0x1e243d(0x20b),_0x2194fd=>{const _0x2d49ea=_0x1e243d,_0x4a0415=_0x2194fd[_0x2d49ea(0x208)]()[_0x2d49ea(0x1ff)]();_0x4a0415&&!_0x4a0415[_0x2d49ea(0x21b)](_0x2d49ea(0x205))&&console[_0x2d49ea(0x1f8)](_0x2d49ea(0x21d)+_0x4a0415);}),serverProcess['on'](_0x1e243d(0x1f8),_0x2e158b=>{const _0x231f3f=_0x1e243d;console['error'](_0x231f3f(0x202),_0x2e158b[_0x231f3f(0x1ef)]),process['exit'](0x1);}),serverProcess['on'](_0x1e243d(0x204),(_0x13e88b,_0x4e3164)=>{const _0x555232=_0x1e243d;_0x13e88b!==null&&_0x13e88b!==0x0&&(console[_0x555232(0x1f8)]('Server\x20exited\x20with\x20code\x20'+_0x13e88b),process[_0x555232(0x204)](_0x13e88b));}),setTimeout(_0xc148b0,STARTUP_WAIT);});}async function startTerminalUI(){const _0x29724f=a0_0x39716b;console['log']('🖥️\x20\x20Starting\x20Terminal\x20UI...'),console[_0x29724f(0x1f3)]('');const _0x899312=join(rootDir,'bin',_0x29724f(0x218)),_0x24e83a=spawn(_0x29724f(0x1fc),[_0x899312],{'cwd':rootDir,'env':{...process[_0x29724f(0x215)]},'stdio':'inherit'});return _0x24e83a['on'](_0x29724f(0x1f8),_0x447749=>{const _0x53b7fc=_0x29724f;console[_0x53b7fc(0x1f8)](_0x53b7fc(0x20e),_0x447749['message']),cleanup(),process[_0x53b7fc(0x204)](0x1);}),_0x24e83a['on'](_0x29724f(0x204),_0x1fa490=>{const _0xe84f95=_0x29724f;console[_0xe84f95(0x1f3)]('\x0a👋\x20Terminal\x20UI\x20closed.'),cleanup(),process[_0xe84f95(0x204)](_0x1fa490||0x0);}),_0x24e83a;}function a0_0x359a(_0x36e3c8,_0x284bc2){_0x36e3c8=_0x36e3c8-0x1ef;const _0x467a71=a0_0x467a();let _0x359a19=_0x467a71[_0x36e3c8];return _0x359a19;}function cleanup(){const _0x5f0270=a0_0x39716b;serverProcess&&!serverProcess[_0x5f0270(0x212)]&&(console[_0x5f0270(0x1f3)]('🛑\x20Stopping\x20server...'),serverProcess[_0x5f0270(0x21e)](_0x5f0270(0x1fe)),setTimeout(()=>{const _0x299b0c=_0x5f0270;!serverProcess['killed']&&serverProcess[_0x299b0c(0x21e)](_0x299b0c(0x216));},0x1388));}process['on'](a0_0x39716b(0x203),()=>{const _0x1ab788=a0_0x39716b;console[_0x1ab788(0x1f3)](_0x1ab788(0x20c)),cleanup(),process[_0x1ab788(0x204)](0x0);}),process['on']('SIGTERM',()=>{const _0x2538a4=a0_0x39716b;console[_0x2538a4(0x1f3)](_0x2538a4(0x207)),cleanup(),process[_0x2538a4(0x204)](0x0);}),process['on'](a0_0x39716b(0x204),()=>{cleanup();});async function main(){const _0x38ba27=a0_0x39716b;console[_0x38ba27(0x1f3)]('╔════════════════════════════════════════════════╗'),console[_0x38ba27(0x1f3)]('║\x20\x20\x20Loxia\x20AI\x20Agents\x20-\x20Server\x20+\x20Terminal\x20UI\x20\x20\x20\x20\x20\x20║'),console['log'](_0x38ba27(0x210)),console[_0x38ba27(0x1f3)]('');try{await startServer(),await checkServerReady(),await startTerminalUI(),await new Promise(()=>{});}catch(_0x243709){console[_0x38ba27(0x1f8)](_0x38ba27(0x1fb),_0x243709[_0x38ba27(0x1ef)]),cleanup(),process[_0x38ba27(0x204)](0x1);}}main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loxia-labs/loxia-autopilot-one",
3
- "version": "1.0.17",
3
+ "version": "1.0.19",
4
4
  "description": "Loxia AI Agents System - No-code/vibe-code/companion-coder platform",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a0_0x18fc18=a0_0x2f4d;(function(_0x4c68ce,_0x31733f){const _0x165819=a0_0x2f4d,_0xd3980a=_0x4c68ce();while(!![]){try{const _0x3fd363=-parseInt(_0x165819(0x1f7))/0x1+parseInt(_0x165819(0x1f0))/0x2*(parseInt(_0x165819(0x1fe))/0x3)+parseInt(_0x165819(0x201))/0x4+parseInt(_0x165819(0x1d8))/0x5*(parseInt(_0x165819(0x213))/0x6)+parseInt(_0x165819(0x1f3))/0x7*(parseInt(_0x165819(0x1da))/0x8)+parseInt(_0x165819(0x1ff))/0x9*(-parseInt(_0x165819(0x212))/0xa)+parseInt(_0x165819(0x1d0))/0xb;if(_0x3fd363===_0x31733f)break;else _0xd3980a['push'](_0xd3980a['shift']());}catch(_0x1bda43){_0xd3980a['push'](_0xd3980a['shift']());}}}(a0_0x399d,0x4838b));import{exec}from'child_process';import{promisify}from'util';import a0_0x1a45fe from'https';import a0_0x4a5673 from'http';import a0_0x232cc8 from'fs';import a0_0x5d29b0 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_0x5d29b0['dirname'](__filename),SCANNER_DIR=a0_0x5d29b0[a0_0x18fc18(0x1f1)](__dirname,'..','node_modules',a0_0x18fc18(0x1ee)),SEMGREP_VERSION=a0_0x18fc18(0x1fc);console['log']('═══════════════════════════════════════════════════════════'),console[a0_0x18fc18(0x1d2)]('\x20\x20Installing\x20Security\x20Scanners'),console['log']('═══════════════════════════════════════════════════════════\x0a');async function installScanners(){const _0x4bf79c=a0_0x18fc18;await a0_0x232cc8[_0x4bf79c(0x1d3)][_0x4bf79c(0x1f4)](SCANNER_DIR,{'recursive':!![]}),await checkESLintSecurity(),await installSemgrep(),await installPythonScanners(),console[_0x4bf79c(0x1d2)](_0x4bf79c(0x214)),console[_0x4bf79c(0x1d2)]('\x20\x20Installation\x20Complete'),console[_0x4bf79c(0x1d2)]('═══════════════════════════════════════════════════════════\x0a');}async function checkESLintSecurity(){const _0x1ff9ef=a0_0x18fc18;console[_0x1ff9ef(0x1d2)]('📦\x20Checking\x20ESLint\x20Security\x20Plugin...');try{await import(_0x1ff9ef(0x1f5)),console['log']('\x20\x20\x20✅\x20eslint-plugin-security\x20is\x20installed\x0a');}catch(_0x147a06){console[_0x1ff9ef(0x1d2)](_0x1ff9ef(0x20b)),console[_0x1ff9ef(0x1d2)](_0x1ff9ef(0x1e1));}}function a0_0x2f4d(_0x374374,_0x434609){_0x374374=_0x374374-0x1cd;const _0x399d6b=a0_0x399d();let _0x2f4dc6=_0x399d6b[_0x374374];return _0x2f4dc6;}async function installSemgrep(){const _0x18a95e=a0_0x18fc18;console['log'](_0x18a95e(0x211));const _0x12d638=process[_0x18a95e(0x1d7)],_0x19ebc8=process[_0x18a95e(0x1d5)];try{const _0x27f083=await execAsync(_0x18a95e(0x1cf),{'timeout':0x1388});console[_0x18a95e(0x1d2)](_0x18a95e(0x20e)+_0x27f083[_0x18a95e(0x1e6)]['trim']()),console[_0x18a95e(0x1d2)]('\x20\x20\x20Using\x20system-installed\x20Semgrep\x0a');return;}catch(_0x4fa143){console[_0x18a95e(0x1d2)](_0x18a95e(0x210));}const _0x2e85b2=getSemgrepBinaryInfo(_0x12d638,_0x19ebc8);if(!_0x2e85b2){console[_0x18a95e(0x1d2)](_0x18a95e(0x1df)+_0x12d638+'-'+_0x19ebc8),console[_0x18a95e(0x1d2)](_0x18a95e(0x1e0));return;}try{const _0x13b66d=a0_0x5d29b0[_0x18a95e(0x1f1)](SCANNER_DIR,_0x18a95e(0x1e8));console['log'](_0x18a95e(0x1d1)+_0x2e85b2[_0x18a95e(0x209)]+'...'),await downloadFile(_0x2e85b2[_0x18a95e(0x209)],_0x13b66d),await a0_0x232cc8[_0x18a95e(0x1d3)]['chmod'](_0x13b66d,0x1ed),console[_0x18a95e(0x1d2)](_0x18a95e(0x1cd)),console['log'](_0x18a95e(0x20c)+_0x13b66d+'\x0a'),console['log']('\x20\x20\x20Note:\x20To\x20use\x20system-wide,\x20add\x20to\x20PATH\x20or\x20install\x20globally:'),console[_0x18a95e(0x1d2)](_0x18a95e(0x1f2));}catch(_0x25b22f){console[_0x18a95e(0x1d2)](_0x18a95e(0x1e4)+_0x25b22f[_0x18a95e(0x205)]),console['log'](_0x18a95e(0x1f6));}}function getSemgrepBinaryInfo(_0xa2ff99,_0x23e997){return null;}function a0_0x399d(){const _0x4e534d=['bandit','\x20\x20\x20Semgrep\x20not\x20found\x20in\x20PATH,\x20installing\x20standalone\x20binary...','🔍\x20Installing\x20Semgrep...','874280lotIln','330726PupBmT','\x0a═══════════════════════════════════════════════════════════','\x20\x20\x20✅\x20Semgrep\x20installed\x20successfully','🐍\x20Checking\x20Python\x20scanners...','semgrep\x20--version','4336222xedSZk','\x20\x20\x20Downloading\x20from\x20','log','promises','error','arch','\x20\x20\x20To\x20enable\x20Python\x20scanning,\x20install\x20Python\x20and\x20run:','platform','5LCNPTD','pipe','80ecDBPO','\x20-m\x20pip\x20show\x20','statusCode','python3\x20--version','headers','\x20\x20\x20⚠️\x20\x20No\x20Semgrep\x20binary\x20available\x20for\x20','\x20\x20\x20Please\x20install\x20manually:\x20https://semgrep.dev/docs/getting-started/\x0a','\x20\x20\x20Run:\x20npm\x20install\x20--save-dev\x20eslint-plugin-security\x0a','get','\x20\x20\x20⚠️\x20\x20Python\x20not\x20found\x20-\x20skipping\x20Python\x20scanners','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20Semgrep:\x20','python3','stdout','\x20\x20\x20✅\x20Python\x20found:\x20','semgrep','close','startsWith','\x20-m\x20pip\x20install\x20--user\x20','catch','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20','.scanners','\x20\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit\x20checkov\x20yamllint\x0a','4EuJVyj','join','\x20\x20\x20pip\x20install\x20semgrep\x0a','137081CEfqjP','mkdir','eslint-plugin-security','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20semgrep\x0a','57431KjVtsz','\x20\x20\x20✅\x20','\x20already\x20installed','\x20installed\x20successfully','\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit','v1.55.0','python\x20--version','10911xsNZbZ','36sCJKWy','\x0aYou\x20can\x20manually\x20install\x20scanners:','202140VwvutC','...','finish','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20','message','pip-audit','❌\x20Installation\x20failed:','\x20\x20\x20Installing\x20','url','exit','\x20\x20\x20⚠️\x20\x20eslint-plugin-security\x20not\x20found','\x20\x20\x20Location:\x20','checkov','\x20\x20\x20✅\x20Semgrep\x20already\x20installed:\x20'];a0_0x399d=function(){return _0x4e534d;};return a0_0x399d();}async function installPythonScanners(){const _0x32d6c9=a0_0x18fc18;console[_0x32d6c9(0x1d2)](_0x32d6c9(0x1ce));let _0x1b9d1c=null;try{await execAsync(_0x32d6c9(0x1dd),{'timeout':0x1388}),_0x1b9d1c=_0x32d6c9(0x1e5);}catch(_0x286cf7){try{await execAsync(_0x32d6c9(0x1fd),{'timeout':0x1388}),_0x1b9d1c='python';}catch(_0x25a317){console[_0x32d6c9(0x1d2)](_0x32d6c9(0x1e3)),console[_0x32d6c9(0x1d2)](_0x32d6c9(0x1d6)),console['log'](_0x32d6c9(0x1ef));return;}}console[_0x32d6c9(0x1d2)](_0x32d6c9(0x1e7)+_0x1b9d1c),await installViaPip(_0x32d6c9(0x1e8),_0x1b9d1c),await installViaPip(_0x32d6c9(0x20f),_0x1b9d1c),await installViaPip(_0x32d6c9(0x206),_0x1b9d1c),await installViaPip(_0x32d6c9(0x20d),_0x1b9d1c),await installViaPip('yamllint',_0x1b9d1c),console[_0x32d6c9(0x1d2)]('');}async function installViaPip(_0xd865b7,_0x4ae6cb){const _0x5b604c=a0_0x18fc18;try{const _0x145cc9=await execAsync(_0x4ae6cb+_0x5b604c(0x1db)+_0xd865b7,{'timeout':0x1388});return console['log']('\x20\x20\x20✅\x20'+_0xd865b7+_0x5b604c(0x1f9)),!![];}catch(_0x12bd27){console[_0x5b604c(0x1d2)](_0x5b604c(0x208)+_0xd865b7+_0x5b604c(0x202));try{return await execAsync(_0x4ae6cb+_0x5b604c(0x1eb)+_0xd865b7,{'timeout':0xea60}),console['log'](_0x5b604c(0x1f8)+_0xd865b7+_0x5b604c(0x1fa)),!![];}catch(_0x14ae4a){return console[_0x5b604c(0x1d2)](_0x5b604c(0x1ed)+_0xd865b7+':\x20'+_0x14ae4a[_0x5b604c(0x205)]),console[_0x5b604c(0x1d2)](_0x5b604c(0x204)+_0xd865b7),![];}}}async function downloadFile(_0x22782e,_0x5a7b39){return new Promise((_0x25da2c,_0x1111a7)=>{const _0x3152c3=a0_0x2f4d,_0x254ad3=_0x22782e[_0x3152c3(0x1ea)]('https')?a0_0x1a45fe:a0_0x4a5673;_0x254ad3[_0x3152c3(0x1e2)](_0x22782e,_0x7a520d=>{const _0x4f64d8=_0x3152c3;if(_0x7a520d[_0x4f64d8(0x1dc)]===0x12e||_0x7a520d[_0x4f64d8(0x1dc)]===0x12d){downloadFile(_0x7a520d[_0x4f64d8(0x1de)]['location'],_0x5a7b39)['then'](_0x25da2c)[_0x4f64d8(0x1ec)](_0x1111a7);return;}if(_0x7a520d[_0x4f64d8(0x1dc)]!==0xc8){_0x1111a7(new Error('Failed\x20to\x20download:\x20HTTP\x20'+_0x7a520d[_0x4f64d8(0x1dc)]));return;}const _0x47c148=createWriteStream(_0x5a7b39);_0x7a520d[_0x4f64d8(0x1d9)](_0x47c148),_0x47c148['on'](_0x4f64d8(0x203),()=>{const _0x561285=_0x4f64d8;_0x47c148[_0x561285(0x1e9)](),_0x25da2c();}),_0x47c148['on'](_0x4f64d8(0x1d4),_0x1266b1=>{a0_0x232cc8['unlink'](_0x5a7b39,()=>{}),_0x1111a7(_0x1266b1);});})['on']('error',_0x1111a7);});}installScanners()[a0_0x18fc18(0x1ec)](_0x5f4f55=>{const _0x201d42=a0_0x18fc18;console[_0x201d42(0x1d4)](_0x201d42(0x207),_0x5f4f55['message']),console['error'](_0x201d42(0x200)),console['error']('\x20\x20npm\x20install\x20--save-dev\x20eslint-plugin-security'),console[_0x201d42(0x1d4)](_0x201d42(0x1fb)),process[_0x201d42(0x20a)](0x0);});
2
+ const a0_0x2f1259=a0_0x303c;(function(_0x26dd2f,_0x3ce7b9){const _0x2d4658=a0_0x303c,_0x380c4f=_0x26dd2f();while(!![]){try{const _0x37171d=parseInt(_0x2d4658(0x1cc))/0x1*(parseInt(_0x2d4658(0x1cb))/0x2)+-parseInt(_0x2d4658(0x1a5))/0x3*(parseInt(_0x2d4658(0x1af))/0x4)+-parseInt(_0x2d4658(0x1d0))/0x5*(-parseInt(_0x2d4658(0x19c))/0x6)+-parseInt(_0x2d4658(0x1cd))/0x7+-parseInt(_0x2d4658(0x1a7))/0x8*(parseInt(_0x2d4658(0x19f))/0x9)+parseInt(_0x2d4658(0x1cf))/0xa+parseInt(_0x2d4658(0x1c6))/0xb*(parseInt(_0x2d4658(0x1ce))/0xc);if(_0x37171d===_0x3ce7b9)break;else _0x380c4f['push'](_0x380c4f['shift']());}catch(_0x19860c){_0x380c4f['push'](_0x380c4f['shift']());}}}(a0_0x47b5,0xf32cf));import{exec}from'child_process';import{promisify}from'util';import a0_0x4e2f58 from'https';import a0_0x437ed9 from'http';function a0_0x303c(_0x2df0bd,_0x1b93ac){_0x2df0bd=_0x2df0bd-0x19c;const _0x47b50d=a0_0x47b5();let _0x303c2e=_0x47b50d[_0x2df0bd];return _0x303c2e;}import a0_0x571029 from'fs';import a0_0x39804b from'path';import{fileURLToPath}from'url';import{createWriteStream}from'fs';function a0_0x47b5(){const _0x120041=['Failed\x20to\x20download:\x20HTTP\x20','unlink','4411kMheag','\x20installed\x20successfully','\x20\x20Installation\x20Complete','python3\x20--version','\x20\x20\x20Installing\x20','4pyCauv','451810TSOnUS','1913877DaYVzA','46572UhFKjD','4882920YBoloa','3646645OZavTA','═══════════════════════════════════════════════════════════\x0a','\x0a═══════════════════════════════════════════════════════════','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20','checkov','catch','\x20\x20\x20✅\x20Semgrep\x20already\x20installed:\x20','\x20\x20\x20To\x20enable\x20Python\x20scanning,\x20install\x20Python\x20and\x20run:','startsWith','\x0aYou\x20can\x20manually\x20install\x20scanners:','message','🔍\x20Installing\x20Semgrep...','...','\x20-m\x20pip\x20show\x20','log','finish','get','yamllint','chmod','url','\x20\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit\x20checkov\x20yamllint\x0a','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20','exit','6qUTjGz','python3','\x20\x20\x20Downloading\x20from\x20','4456845kEJhUE','\x20\x20\x20⚠️\x20\x20eslint-plugin-security\x20not\x20found','📦\x20Checking\x20ESLint\x20Security\x20Plugin...','\x20\x20\x20⚠️\x20\x20Python\x20not\x20found\x20-\x20skipping\x20Python\x20scanners','\x20\x20\x20Please\x20install\x20manually:\x20https://semgrep.dev/docs/getting-started/\x0a','dirname','2787BElBsM','bandit','16puYXYg','\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit','arch','python\x20--version','\x20\x20\x20✅\x20Semgrep\x20installed\x20successfully','\x20\x20\x20✅\x20','\x20\x20Installing\x20Security\x20Scanners','location','6104LfKfYg','then','\x20already\x20installed','mkdir','semgrep\x20--version','join','stdout','❌\x20Installation\x20failed:','\x20\x20\x20Run:\x20npm\x20install\x20--save-dev\x20eslint-plugin-security\x0a','node_modules','error','\x20\x20\x20Location:\x20','🐍\x20Checking\x20Python\x20scanners...','\x20\x20\x20Note:\x20To\x20use\x20system-wide,\x20add\x20to\x20PATH\x20or\x20install\x20globally:','python','\x20\x20\x20✅\x20eslint-plugin-security\x20is\x20installed\x0a','https','\x20\x20\x20pip\x20install\x20semgrep\x0a','statusCode','promises','eslint-plugin-security'];a0_0x47b5=function(){return _0x120041;};return a0_0x47b5();}import{pipeline}from'stream/promises';const execAsync=promisify(exec),__filename=fileURLToPath(import.meta.url),__dirname=a0_0x39804b[a0_0x2f1259(0x1a4)](__filename),SCANNER_DIR=a0_0x39804b[a0_0x2f1259(0x1b4)](__dirname,'..',a0_0x2f1259(0x1b8),'.scanners'),SEMGREP_VERSION='v1.55.0';console['log']('═══════════════════════════════════════════════════════════'),console['log'](a0_0x2f1259(0x1ad)),console[a0_0x2f1259(0x1de)](a0_0x2f1259(0x1d1));async function installScanners(){const _0x2e275d=a0_0x2f1259;await a0_0x571029[_0x2e275d(0x1c2)][_0x2e275d(0x1b2)](SCANNER_DIR,{'recursive':!![]}),await checkESLintSecurity(),await installSemgrep(),await installPythonScanners(),console['log'](_0x2e275d(0x1d2)),console[_0x2e275d(0x1de)](_0x2e275d(0x1c8)),console['log']('═══════════════════════════════════════════════════════════\x0a');}async function checkESLintSecurity(){const _0x3783c6=a0_0x2f1259;console[_0x3783c6(0x1de)](_0x3783c6(0x1a1));try{await import(_0x3783c6(0x1c3)),console[_0x3783c6(0x1de)](_0x3783c6(0x1be));}catch(_0x9c3a6e){console[_0x3783c6(0x1de)](_0x3783c6(0x1a0)),console['log'](_0x3783c6(0x1b7));}}async function installSemgrep(){const _0x4d5ca1=a0_0x2f1259;console[_0x4d5ca1(0x1de)](_0x4d5ca1(0x1db));const _0x3259e8=process['platform'],_0x4a4d87=process[_0x4d5ca1(0x1a9)];try{const _0x117784=await execAsync(_0x4d5ca1(0x1b3),{'timeout':0x1388});console[_0x4d5ca1(0x1de)](_0x4d5ca1(0x1d6)+_0x117784[_0x4d5ca1(0x1b5)]['trim']()),console['log']('\x20\x20\x20Using\x20system-installed\x20Semgrep\x0a');return;}catch(_0x39965c){console[_0x4d5ca1(0x1de)]('\x20\x20\x20Semgrep\x20not\x20found\x20in\x20PATH,\x20installing\x20standalone\x20binary...');}const _0x4a21ee=getSemgrepBinaryInfo(_0x3259e8,_0x4a4d87);if(!_0x4a21ee){console['log']('\x20\x20\x20⚠️\x20\x20No\x20Semgrep\x20binary\x20available\x20for\x20'+_0x3259e8+'-'+_0x4a4d87),console[_0x4d5ca1(0x1de)](_0x4d5ca1(0x1a3));return;}try{const _0x2013b9=a0_0x39804b[_0x4d5ca1(0x1b4)](SCANNER_DIR,'semgrep');console[_0x4d5ca1(0x1de)](_0x4d5ca1(0x19e)+_0x4a21ee[_0x4d5ca1(0x1e3)]+'...'),await downloadFile(_0x4a21ee['url'],_0x2013b9),await a0_0x571029[_0x4d5ca1(0x1c2)][_0x4d5ca1(0x1e2)](_0x2013b9,0x1ed),console[_0x4d5ca1(0x1de)](_0x4d5ca1(0x1ab)),console[_0x4d5ca1(0x1de)](_0x4d5ca1(0x1ba)+_0x2013b9+'\x0a'),console['log'](_0x4d5ca1(0x1bc)),console[_0x4d5ca1(0x1de)](_0x4d5ca1(0x1c0));}catch(_0x551813){console[_0x4d5ca1(0x1de)]('\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20Semgrep:\x20'+_0x551813[_0x4d5ca1(0x1da)]),console[_0x4d5ca1(0x1de)]('\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20semgrep\x0a');}}function getSemgrepBinaryInfo(_0x3d6b28,_0x49f16c){return null;}async function installPythonScanners(){const _0x364473=a0_0x2f1259;console[_0x364473(0x1de)](_0x364473(0x1bb));let _0x350e51=null;try{await execAsync(_0x364473(0x1c9),{'timeout':0x1388}),_0x350e51=_0x364473(0x19d);}catch(_0x6f664a){try{await execAsync(_0x364473(0x1aa),{'timeout':0x1388}),_0x350e51=_0x364473(0x1bd);}catch(_0x6d3779){console[_0x364473(0x1de)](_0x364473(0x1a2)),console[_0x364473(0x1de)](_0x364473(0x1d7)),console['log'](_0x364473(0x1e4));return;}}console[_0x364473(0x1de)]('\x20\x20\x20✅\x20Python\x20found:\x20'+_0x350e51),await installViaPip('semgrep',_0x350e51),await installViaPip(_0x364473(0x1a6),_0x350e51),await installViaPip('pip-audit',_0x350e51),await installViaPip(_0x364473(0x1d4),_0x350e51),await installViaPip(_0x364473(0x1e1),_0x350e51),console['log']('');}async function installViaPip(_0x5400f2,_0x32fca3){const _0x4ea5d5=a0_0x2f1259;try{const _0x204c7d=await execAsync(_0x32fca3+_0x4ea5d5(0x1dd)+_0x5400f2,{'timeout':0x1388});return console[_0x4ea5d5(0x1de)](_0x4ea5d5(0x1ac)+_0x5400f2+_0x4ea5d5(0x1b1)),!![];}catch(_0x1e35fd){console[_0x4ea5d5(0x1de)](_0x4ea5d5(0x1ca)+_0x5400f2+_0x4ea5d5(0x1dc));try{return await execAsync(_0x32fca3+'\x20-m\x20pip\x20install\x20--user\x20'+_0x5400f2,{'timeout':0xea60}),console[_0x4ea5d5(0x1de)](_0x4ea5d5(0x1ac)+_0x5400f2+_0x4ea5d5(0x1c7)),!![];}catch(_0x179aea){return console[_0x4ea5d5(0x1de)](_0x4ea5d5(0x1e5)+_0x5400f2+':\x20'+_0x179aea[_0x4ea5d5(0x1da)]),console[_0x4ea5d5(0x1de)](_0x4ea5d5(0x1d3)+_0x5400f2),![];}}}async function downloadFile(_0x57b8b9,_0x3e575e){return new Promise((_0x144363,_0x54e157)=>{const _0x2da9f5=a0_0x303c,_0x5458c6=_0x57b8b9[_0x2da9f5(0x1d8)](_0x2da9f5(0x1bf))?a0_0x4e2f58:a0_0x437ed9;_0x5458c6[_0x2da9f5(0x1e0)](_0x57b8b9,_0x1f1780=>{const _0x2a6e0e=_0x2da9f5;if(_0x1f1780[_0x2a6e0e(0x1c1)]===0x12e||_0x1f1780['statusCode']===0x12d){downloadFile(_0x1f1780['headers'][_0x2a6e0e(0x1ae)],_0x3e575e)[_0x2a6e0e(0x1b0)](_0x144363)['catch'](_0x54e157);return;}if(_0x1f1780[_0x2a6e0e(0x1c1)]!==0xc8){_0x54e157(new Error(_0x2a6e0e(0x1c4)+_0x1f1780[_0x2a6e0e(0x1c1)]));return;}const _0x204615=createWriteStream(_0x3e575e);_0x1f1780['pipe'](_0x204615),_0x204615['on'](_0x2a6e0e(0x1df),()=>{_0x204615['close'](),_0x144363();}),_0x204615['on'](_0x2a6e0e(0x1b9),_0x3bd2b6=>{const _0x27f399=_0x2a6e0e;a0_0x571029[_0x27f399(0x1c5)](_0x3e575e,()=>{}),_0x54e157(_0x3bd2b6);});})['on'](_0x2da9f5(0x1b9),_0x54e157);});}installScanners()[a0_0x2f1259(0x1d5)](_0x67f9ce=>{const _0x21b8ad=a0_0x2f1259;console[_0x21b8ad(0x1b9)](_0x21b8ad(0x1b6),_0x67f9ce[_0x21b8ad(0x1da)]),console['error'](_0x21b8ad(0x1d9)),console[_0x21b8ad(0x1b9)]('\x20\x20npm\x20install\x20--save-dev\x20eslint-plugin-security'),console[_0x21b8ad(0x1b9)](_0x21b8ad(0x1a8)),process[_0x21b8ad(0x1e6)](0x0);});
@@ -1 +1 @@
1
- const a0_0x233d81=a0_0x1460;function a0_0x5a62(){const _0x232748=['lNnJC3m','CMvZDwX0CW','u0vwrvjjvfK','mJa4ndG0mfDyrKvouq','C3LUDgf4','zw5KC1DPDgG','C3r5BgvSAw50','zxH0zw5K','lNnHC3m','lMXLC3m','C3vWCg9YDhnbDxrVrML4','u1Lovefy','l15JDxn0B20TlW','B3b0Aw1PEMu','zg91yMXL','mtHsANnPy3m','rvjst1i','Bg93zxi','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','BgvZCW','ChvZAa','Dgv4Da','BM8TDw5RBM93BG','mtmXmtzPy2PLqxC','C2v2zxjPDhK','CNvSzq','ChjVy2vZCW','Cg9ZDgnZCW','D2HPBgu','zNvUy3rPB24','Cg9ZDgnZC0XLC3m','BgLUDfn0EwXLCW','BgvUz3rO','Aw5JBhvKzxm','BM8TAw52ywXPza','v0fstKLorW','y29SDw1U','Dg9mB3DLCKnHC2u','ng9lvgrXEa','CgvYzM9YBwfUy2u','ntu2ndqWnw92Ae94wa','nJi4nJG4BNjmCffO','y2f0zwDVCML6zvn0EwXLBgLUDfj1Bgu','Bg9Nz2vY','C2nZCW','mJe5mJvbqNzkCg8','BwL4Aw4','mJaZA3rbCLrc','Cg9ZDgnZCY1SzxnZ','q0furuDpuLK','mtaZnZC3Be91z0H3','nhDhtNvhDW','zM9Y','zwXZzq','Cg9ZDgnZC1nJC3m','lMnZCW','D2fYBMLUz3m','y2HLy2TtEw50yxG','mZeXmti3tvP6rfPU','zxjYB3i','BwvZC2fNzq','u1rzteu'];a0_0x5a62=function(){return _0x232748;};return a0_0x5a62();}function a0_0x1460(_0x3409dc,_0x20b5a9){_0x3409dc=_0x3409dc-0x14f;const _0x5a6295=a0_0x5a62();let _0x14609e=_0x5a6295[_0x3409dc];if(a0_0x1460['sRMVsP']===undefined){var _0x102a14=function(_0x68385b){const _0x372dab='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x353114='',_0x1559da='';for(let _0x254b66=0x0,_0x592c59,_0x2ead50,_0x326bf2=0x0;_0x2ead50=_0x68385b['charAt'](_0x326bf2++);~_0x2ead50&&(_0x592c59=_0x254b66%0x4?_0x592c59*0x40+_0x2ead50:_0x2ead50,_0x254b66++%0x4)?_0x353114+=String['fromCharCode'](0xff&_0x592c59>>(-0x2*_0x254b66&0x6)):0x0){_0x2ead50=_0x372dab['indexOf'](_0x2ead50);}for(let _0xd29427=0x0,_0x12980b=_0x353114['length'];_0xd29427<_0x12980b;_0xd29427++){_0x1559da+='%'+('00'+_0x353114['charCodeAt'](_0xd29427)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1559da);};a0_0x1460['MjTlMz']=_0x102a14,a0_0x1460['HuGMhd']={},a0_0x1460['sRMVsP']=!![];}const _0x1d1ffc=_0x5a6295[0x0],_0x5b669d=_0x3409dc+_0x1d1ffc,_0x51bb31=a0_0x1460['HuGMhd'][_0x5b669d];return!_0x51bb31?(_0x14609e=a0_0x1460['MjTlMz'](_0x14609e),a0_0x1460['HuGMhd'][_0x5b669d]=_0x14609e):_0x14609e=_0x51bb31,_0x14609e;}(function(_0x5a1395,_0x59032b){const _0x1f6216=a0_0x1460,_0x5054ca=_0x5a1395();while(!![]){try{const _0x14c87f=-parseInt(_0x1f6216(0x173))/0x1*(-parseInt(_0x1f6216(0x167))/0x2)+parseInt(_0x1f6216(0x17b))/0x3+parseInt(_0x1f6216(0x174))/0x4*(parseInt(_0x1f6216(0x16e))/0x5)+parseInt(_0x1f6216(0x158))/0x6*(-parseInt(_0x1f6216(0x170))/0x7)+-parseInt(_0x1f6216(0x16a))/0x8*(-parseInt(_0x1f6216(0x150))/0x9)+parseInt(_0x1f6216(0x182))/0xa+-parseInt(_0x1f6216(0x169))/0xb;if(_0x14c87f===_0x59032b)break;else _0x5054ca['push'](_0x5054ca['shift']());}catch(_0x54ac5b){_0x5054ca['push'](_0x5054ca['shift']());}}}(a0_0x5a62,0x1b5b7));import{STATIC_ANALYSIS}from'../utilities/constants.js';class CSSAnalyzer{constructor(_0x353114=null){const _0x3938e3=a0_0x1460;this['logger']=_0x353114,this['stylelint']=null,this['postcss']=null,this[_0x3938e3(0x177)]=null,this['postcssLess']=null;}async['analyze'](_0x1559da,_0x254b66,_0x592c59={}){const _0x407936=a0_0x1460;try{const _0x2ead50=[],_0x326bf2=this['detectLanguage'](_0x1559da),_0xd29427=await this[_0x407936(0x17a)](_0x1559da,_0x254b66,_0x326bf2);_0x2ead50['push'](..._0xd29427);if(_0xd29427['length']===0x0){const _0x12980b=await this[_0x407936(0x160)](_0x1559da,_0x254b66,_0x326bf2);_0x2ead50['push'](..._0x12980b);}return this[_0x407936(0x16c)]?.['debug']('CSS\x20analysis\x20completed',{'file':_0x1559da,'language':_0x326bf2,'totalDiagnostics':_0x2ead50['length'],'errors':_0x2ead50['filter'](_0x25ce9b=>_0x25ce9b['severity']===STATIC_ANALYSIS[_0x407936(0x181)]['ERROR'])[_0x407936(0x161)],'warnings':_0x2ead50['filter'](_0x2870c0=>_0x2870c0['severity']===STATIC_ANALYSIS[_0x407936(0x181)][_0x407936(0x164)])[_0x407936(0x161)]}),_0x2ead50;}catch(_0x412be4){return this[_0x407936(0x16c)]?.['error']('CSS\x20analysis\x20failed',{'file':_0x1559da,'error':_0x412be4[_0x407936(0x17d)]}),[];}}async['checkSyntax'](_0x1d076d,_0x361456,_0x44c310){const _0x4ad0e5=a0_0x1460,_0x3bdae1=[];try{if(!this[_0x4ad0e5(0x15c)]){const _0x25648b=await import('postcss');this['postcss']=_0x25648b['default'];}let _0x4ef337=null;if(_0x44c310===_0x4ad0e5(0x16d)){if(!this['postcssScss']){const _0x1b6982=await import('postcss-scss');this['postcssScss']=_0x1b6982['default'];}_0x4ef337=this[_0x4ad0e5(0x177)];}else{if(_0x44c310===_0x4ad0e5(0x154)){if(!this[_0x4ad0e5(0x15f)]){const _0x303fac=await import('postcss-less');this['postcssLess']=_0x303fac['default'];}_0x4ef337=this['postcssLess'];}}const _0x239f29=this[_0x4ad0e5(0x15c)]()[_0x4ad0e5(0x15b)](_0x361456,{'from':_0x1d076d,'syntax':_0x4ef337}),_0x1a307a=_0x239f29['root'];this[_0x4ad0e5(0x16c)]?.['debug']('PostCSS\x20syntax\x20check\x20passed',{'file':_0x1d076d});}catch(_0x14ece4){const _0x79d2ab=this['formatPostCSSError'](_0x14ece4,_0x1d076d);_0x79d2ab&&_0x3bdae1['push'](_0x79d2ab);}return _0x3bdae1;}async[a0_0x233d81(0x160)](_0x163527,_0x3c8d65,_0xafc655){const _0x376ca9=a0_0x233d81,_0x17c3fc=[];try{if(!this['stylelint']){const _0x100fd0=await import('stylelint');this[_0x376ca9(0x185)]=_0x100fd0['default'];}const _0x55971e={'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':[_0x376ca9(0x18b),'ng-deep']}],'media-feature-name-no-unknown':!![],'at-rule-no-unknown':_0xafc655===_0x376ca9(0x16d)?[!![],{'ignoreAtRules':[_0x376ca9(0x16f),'include',_0x376ca9(0x186),'if',_0x376ca9(0x176),_0x376ca9(0x175),'each',_0x376ca9(0x15d),_0x376ca9(0x15e),'return','content','use','forward']}]:_0xafc655==='less'?[!![],{'ignoreAtRules':['plugin']}]:!![],'comment-no-empty':!![],'no-duplicate-selectors':!![],'no-empty-source':null,'block-no-empty':!![],'declaration-block-no-shorthand-property-overrides':!![],'font-family-no-missing-generic-family-keyword':!![],'function-linear-gradient-no-nonstandard-direction':!![],'no-descending-specificity':null,'no-duplicate-at-import-rules':!![],'no-extra-semicolons':!![],'no-invalid-double-slash-comments':!![],'selector-pseudo-element-colon-notation':_0x376ca9(0x14f),'selector-type-case':_0x376ca9(0x152)},'customSyntax':_0xafc655===_0x376ca9(0x16d)?'postcss-scss':_0xafc655==='less'?_0x376ca9(0x171):undefined},_0x316f59=await this['stylelint']['lint']({'code':_0x3c8d65,'codeFilename':_0x163527,'config':_0x55971e});if(_0x316f59[_0x376ca9(0x180)]&&_0x316f59['results'][_0x376ca9(0x161)]>0x0){const _0x50a6db=_0x316f59['results'][0x0];if(_0x50a6db['warnings'])for(const _0x43dd4d of _0x50a6db[_0x376ca9(0x179)]){_0x17c3fc[_0x376ca9(0x155)]({'file':_0x163527,'line':_0x43dd4d['line']||0x1,'column':_0x43dd4d['column']||0x1,'severity':_0x43dd4d[_0x376ca9(0x159)]===_0x376ca9(0x17c)?STATIC_ANALYSIS[_0x376ca9(0x181)]['ERROR']:STATIC_ANALYSIS['SEVERITY'][_0x376ca9(0x164)],'rule':_0x43dd4d['rule']||'unknown','message':_0x43dd4d[_0x376ca9(0x156)],'category':this[_0x376ca9(0x16b)](_0x43dd4d[_0x376ca9(0x15a)]),'fixable':![],'source':_0x376ca9(0x185)});}}}catch(_0x3e29a5){this[_0x376ca9(0x16c)]?.['warn']('Stylelint\x20analysis\x20failed',{'file':_0x163527,'error':_0x3e29a5['message']});}return _0x17c3fc;}['formatPostCSSError'](_0x4c54e3,_0x1f05ce){const _0x49ebd8=a0_0x233d81;return{'file':_0x1f05ce,'line':_0x4c54e3['line']||0x1,'column':_0x4c54e3[_0x49ebd8(0x165)]||0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x49ebd8(0x151)],'rule':_0x4c54e3['name']||'CssSyntaxError','message':_0x4c54e3['reason']||_0x4c54e3[_0x49ebd8(0x17d)],'category':STATIC_ANALYSIS['CATEGORY'][_0x49ebd8(0x18a)],'fixable':![],'source':'postcss','code':_0x4c54e3['source']||undefined};}[a0_0x233d81(0x16b)](_0x207d4e){const _0x17afa0=a0_0x233d81;if(!_0x207d4e)return STATIC_ANALYSIS[_0x17afa0(0x172)][_0x17afa0(0x17e)];const _0x530ec5=_0x207d4e[_0x17afa0(0x166)]();if(_0x530ec5['includes'](_0x17afa0(0x163))||_0x530ec5['includes'](_0x17afa0(0x157))||_0x530ec5[_0x17afa0(0x162)]('no-empty')||_0x530ec5['includes'](_0x17afa0(0x183)))return STATIC_ANALYSIS[_0x17afa0(0x172)]['SYNTAX'];if(_0x530ec5[_0x17afa0(0x162)](_0x17afa0(0x168))||_0x530ec5['includes'](_0x17afa0(0x18c)))return STATIC_ANALYSIS['CATEGORY']['PERFORMANCE'];if(_0x530ec5[_0x17afa0(0x162)]('best-practice')||_0x530ec5[_0x17afa0(0x162)]('recommended'))return STATIC_ANALYSIS[_0x17afa0(0x172)]['BEST_PRACTICE'];return STATIC_ANALYSIS[_0x17afa0(0x172)]['STYLE'];}['detectLanguage'](_0x1c8666){const _0x467a07=a0_0x233d81,_0x32552e=_0x1c8666[_0x467a07(0x166)]();if(_0x32552e['endsWith'](_0x467a07(0x17f))||_0x32552e[_0x467a07(0x184)](_0x467a07(0x187)))return'scss';if(_0x32552e[_0x467a07(0x184)](_0x467a07(0x188)))return _0x467a07(0x154);return'css';}[a0_0x233d81(0x153)](){const _0x2e5e32=a0_0x233d81;return[_0x2e5e32(0x178),'.scss','.sass','.less'];}[a0_0x233d81(0x189)](){return![];}}export default CSSAnalyzer;
1
+ const a0_0x53dc92=a0_0x2edc;(function(_0x179ec5,_0x1aa4bf){const _0x2976e9=a0_0x2edc,_0x293122=_0x179ec5();while(!![]){try{const _0x4ec662=-parseInt(_0x2976e9(0x1af))/0x1+-parseInt(_0x2976e9(0x1ae))/0x2+-parseInt(_0x2976e9(0x1bb))/0x3+-parseInt(_0x2976e9(0x19c))/0x4+parseInt(_0x2976e9(0x1bf))/0x5*(parseInt(_0x2976e9(0x1ad))/0x6)+parseInt(_0x2976e9(0x1b8))/0x7+parseInt(_0x2976e9(0x19e))/0x8*(parseInt(_0x2976e9(0x18b))/0x9);if(_0x4ec662===_0x1aa4bf)break;else _0x293122['push'](_0x293122['shift']());}catch(_0x5b5b29){_0x293122['push'](_0x293122['shift']());}}}(a0_0x3441,0x43f93));import{STATIC_ANALYSIS}from'../utilities/constants.js';class CSSAnalyzer{constructor(_0x10ac85=null){const _0x1d6fee=a0_0x2edc;this[_0x1d6fee(0x1b4)]=_0x10ac85,this['stylelint']=null,this[_0x1d6fee(0x198)]=null,this['postcssScss']=null,this[_0x1d6fee(0x195)]=null;}async[a0_0x53dc92(0x1ca)](_0x2ed7ee,_0x138e9b,_0x24a939={}){const _0x58dccb=a0_0x53dc92;try{const _0x49828c=[],_0x247ca1=this[_0x58dccb(0x1cc)](_0x2ed7ee),_0x37f111=await this['checkSyntax'](_0x2ed7ee,_0x138e9b,_0x247ca1);_0x49828c[_0x58dccb(0x1ac)](..._0x37f111);if(_0x37f111['length']===0x0){const _0x31d2e6=await this['lintStyles'](_0x2ed7ee,_0x138e9b,_0x247ca1);_0x49828c[_0x58dccb(0x1ac)](..._0x31d2e6);}return this[_0x58dccb(0x1b4)]?.['debug'](_0x58dccb(0x1a3),{'file':_0x2ed7ee,'language':_0x247ca1,'totalDiagnostics':_0x49828c['length'],'errors':_0x49828c['filter'](_0x5b850e=>_0x5b850e[_0x58dccb(0x18c)]===STATIC_ANALYSIS['SEVERITY'][_0x58dccb(0x197)])['length'],'warnings':_0x49828c[_0x58dccb(0x1be)](_0x4dc48a=>_0x4dc48a[_0x58dccb(0x18c)]===STATIC_ANALYSIS['SEVERITY']['WARNING'])['length']}),_0x49828c;}catch(_0x41fd32){return this['logger']?.[_0x58dccb(0x1c0)]('CSS\x20analysis\x20failed',{'file':_0x2ed7ee,'error':_0x41fd32[_0x58dccb(0x1b5)]}),[];}}async['checkSyntax'](_0x3e0547,_0x558682,_0x182e33){const _0x562580=a0_0x53dc92,_0x51c170=[];try{if(!this['postcss']){const _0x23d2c4=await import(_0x562580(0x198));this['postcss']=_0x23d2c4['default'];}let _0x264577=null;if(_0x182e33==='scss'){if(!this['postcssScss']){const _0x197720=await import(_0x562580(0x19b));this[_0x562580(0x19f)]=_0x197720['default'];}_0x264577=this['postcssScss'];}else{if(_0x182e33===_0x562580(0x1a9)){if(!this[_0x562580(0x195)]){const _0xc94ba=await import('postcss-less');this[_0x562580(0x195)]=_0xc94ba['default'];}_0x264577=this[_0x562580(0x195)];}}const _0x5f1944=this['postcss']()[_0x562580(0x1c4)](_0x558682,{'from':_0x3e0547,'syntax':_0x264577}),_0x4a276d=_0x5f1944['root'];this['logger']?.['debug'](_0x562580(0x1c9),{'file':_0x3e0547});}catch(_0x5f14e4){const _0x46949e=this[_0x562580(0x18e)](_0x5f14e4,_0x3e0547);_0x46949e&&_0x51c170[_0x562580(0x1ac)](_0x46949e);}return _0x51c170;}async[a0_0x53dc92(0x1bd)](_0x3ac300,_0x2ec45b,_0x1f183d){const _0x9c2caa=a0_0x53dc92,_0x2a1108=[];try{if(!this['stylelint']){const _0x3dbe40=await import(_0x9c2caa(0x194));this['stylelint']=_0x3dbe40[_0x9c2caa(0x199)];}const _0x1cbd80={'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':[_0x9c2caa(0x1ab),_0x9c2caa(0x1cd)]}],'media-feature-name-no-unknown':!![],'at-rule-no-unknown':_0x1f183d===_0x9c2caa(0x191)?[!![],{'ignoreAtRules':['mixin',_0x9c2caa(0x18f),_0x9c2caa(0x1b0),'if','else','for','each',_0x9c2caa(0x1a2),_0x9c2caa(0x1a5),_0x9c2caa(0x1cb),_0x9c2caa(0x1b2),_0x9c2caa(0x192),'forward']}]:_0x1f183d===_0x9c2caa(0x1a9)?[!![],{'ignoreAtRules':['plugin']}]:!![],'comment-no-empty':!![],'no-duplicate-selectors':!![],'no-empty-source':null,'block-no-empty':!![],'declaration-block-no-shorthand-property-overrides':!![],'font-family-no-missing-generic-family-keyword':!![],'function-linear-gradient-no-nonstandard-direction':!![],'no-descending-specificity':null,'no-duplicate-at-import-rules':!![],'no-extra-semicolons':!![],'no-invalid-double-slash-comments':!![],'selector-pseudo-element-colon-notation':'double','selector-type-case':_0x9c2caa(0x1c8)},'customSyntax':_0x1f183d===_0x9c2caa(0x191)?'postcss-scss':_0x1f183d==='less'?_0x9c2caa(0x19d):undefined},_0x3cdc4a=await this[_0x9c2caa(0x194)]['lint']({'code':_0x2ec45b,'codeFilename':_0x3ac300,'config':_0x1cbd80});if(_0x3cdc4a['results']&&_0x3cdc4a[_0x9c2caa(0x18d)]['length']>0x0){const _0x58b390=_0x3cdc4a[_0x9c2caa(0x18d)][0x0];if(_0x58b390[_0x9c2caa(0x1b1)])for(const _0x1d6959 of _0x58b390[_0x9c2caa(0x1b1)]){_0x2a1108[_0x9c2caa(0x1ac)]({'file':_0x3ac300,'line':_0x1d6959['line']||0x1,'column':_0x1d6959['column']||0x1,'severity':_0x1d6959['severity']==='error'?STATIC_ANALYSIS['SEVERITY'][_0x9c2caa(0x197)]:STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':_0x1d6959['rule']||'unknown','message':_0x1d6959[_0x9c2caa(0x1aa)],'category':this[_0x9c2caa(0x1ce)](_0x1d6959[_0x9c2caa(0x1a4)]),'fixable':![],'source':_0x9c2caa(0x194)});}}}catch(_0x293c08){this[_0x9c2caa(0x1b4)]?.['warn'](_0x9c2caa(0x1a7),{'file':_0x3ac300,'error':_0x293c08['message']});}return _0x2a1108;}['formatPostCSSError'](_0x2c8499,_0xfe939f){const _0x461838=a0_0x53dc92;return{'file':_0xfe939f,'line':_0x2c8499['line']||0x1,'column':_0x2c8499[_0x461838(0x1c6)]||0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x461838(0x197)],'rule':_0x2c8499[_0x461838(0x1a0)]||_0x461838(0x1a8),'message':_0x2c8499['reason']||_0x2c8499['message'],'category':STATIC_ANALYSIS['CATEGORY'][_0x461838(0x1c7)],'fixable':![],'source':_0x461838(0x198),'code':_0x2c8499[_0x461838(0x1c5)]||undefined};}['categorizeStylelintRule'](_0x5d737f){const _0x178f97=a0_0x53dc92;if(!_0x5d737f)return STATIC_ANALYSIS[_0x178f97(0x1c1)][_0x178f97(0x193)];const _0x4b4d4e=_0x5d737f['toLowerCase']();if(_0x4b4d4e['includes'](_0x178f97(0x1b6))||_0x4b4d4e[_0x178f97(0x1c3)]('no-unknown')||_0x4b4d4e[_0x178f97(0x1c3)](_0x178f97(0x1a1))||_0x4b4d4e[_0x178f97(0x1c3)](_0x178f97(0x1c2)))return STATIC_ANALYSIS['CATEGORY']['SYNTAX'];if(_0x4b4d4e[_0x178f97(0x1c3)]('performance')||_0x4b4d4e['includes'](_0x178f97(0x1bc)))return STATIC_ANALYSIS['CATEGORY'][_0x178f97(0x1b7)];if(_0x4b4d4e[_0x178f97(0x1c3)]('best-practice')||_0x4b4d4e['includes']('recommended'))return STATIC_ANALYSIS['CATEGORY']['BEST_PRACTICE'];return STATIC_ANALYSIS[_0x178f97(0x1c1)][_0x178f97(0x193)];}['detectLanguage'](_0x5dc46e){const _0x16f9dd=a0_0x53dc92,_0x511ef0=_0x5dc46e[_0x16f9dd(0x1b9)]();if(_0x511ef0['endsWith']('.scss')||_0x511ef0[_0x16f9dd(0x1ba)](_0x16f9dd(0x196)))return'scss';if(_0x511ef0['endsWith'](_0x16f9dd(0x19a)))return _0x16f9dd(0x1a9);return'css';}[a0_0x53dc92(0x190)](){const _0x5205dd=a0_0x53dc92;return['.css',_0x5205dd(0x1b3),'.sass',_0x5205dd(0x19a)];}[a0_0x53dc92(0x1a6)](){return![];}}function a0_0x2edc(_0xae005,_0x5e8982){_0xae005=_0xae005-0x18b;const _0x3441f8=a0_0x3441();let _0x2edc01=_0x3441f8[_0xae005];if(a0_0x2edc['ZYzuBJ']===undefined){var _0x209f8b=function(_0x1331d8){const _0x43e772='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x10ac85='',_0x2ed7ee='';for(let _0x138e9b=0x0,_0x24a939,_0x49828c,_0x247ca1=0x0;_0x49828c=_0x1331d8['charAt'](_0x247ca1++);~_0x49828c&&(_0x24a939=_0x138e9b%0x4?_0x24a939*0x40+_0x49828c:_0x49828c,_0x138e9b++%0x4)?_0x10ac85+=String['fromCharCode'](0xff&_0x24a939>>(-0x2*_0x138e9b&0x6)):0x0){_0x49828c=_0x43e772['indexOf'](_0x49828c);}for(let _0x37f111=0x0,_0x31d2e6=_0x10ac85['length'];_0x37f111<_0x31d2e6;_0x37f111++){_0x2ed7ee+='%'+('00'+_0x10ac85['charCodeAt'](_0x37f111)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2ed7ee);};a0_0x2edc['tYDqin']=_0x209f8b,a0_0x2edc['MIiWbH']={},a0_0x2edc['ZYzuBJ']=!![];}const _0x13b5e2=_0x3441f8[0x0],_0x57e700=_0xae005+_0x13b5e2,_0x14986f=a0_0x2edc['MIiWbH'][_0x57e700];return!_0x14986f?(_0x2edc01=a0_0x2edc['tYDqin'](_0x2edc01),a0_0x2edc['MIiWbH'][_0x57e700]=_0x2edc01):_0x2edc01=_0x14986f,_0x2edc01;}function a0_0x3441(){const _0x5c34a0=['zNvUy3rPB24','C3vWCg9YDhnbDxrVrML4','u3r5BgvSAw50igfUywX5C2LZigzHAwXLza','q3nZu3LUDgf4rxjYB3i','BgvZCW','Dgv4Da','l15JDxn0B20TlW','ChvZAa','mta4nMTOuKnTta','ndq5mJmYuM10yuP5','mJKWmZu5EvjwrePj','zxH0zw5K','D2fYBMLUz3m','y29UDgvUDa','lNnJC3m','Bg9Nz2vY','BwvZC2fNzq','BM8TAw52ywXPza','uevsrK9stufoq0u','odiYnta3twHAzwLI','Dg9mB3DLCKnHC2u','zw5KC1DPDgG','mte2mJu2mfH3AufVsa','B3b0Aw1PEMu','BgLUDfn0EwXLCW','zMLSDgvY','mtiYotvss2DJA2q','zxjYB3i','q0furuDpuLK','C3LUDgf4','Aw5JBhvKzxm','ChjVy2vZCW','C291CMnL','y29SDw1U','u1Lovefy','Bg93zxi','ug9ZDentuYbZEw50yxGGy2HLy2SGCgfZC2vK','yw5HBhL6zq','CMv0DxjU','zgv0zwn0tgfUz3vHz2u','BMCTzgvLCa','y2f0zwDVCML6zvn0EwXLBgLUDfj1Bgu','odq1mujSC1HKuG','C2v2zxjPDhK','CMvZDwX0CW','zM9YBwf0ug9ZDentu0vYCM9Y','Aw5JBhvKzq','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','C2nZCW','DxnL','u1rzteu','C3r5BgvSAw50','Cg9ZDgnZC0XLC3m','lNnHC3m','rvjst1i','Cg9ZDgnZCW','zgvMyxvSDa','lMXLC3m','Cg9ZDgnZCY1Zy3nZ','mtmWntiWmgvkuwjeDq','Cg9ZDgnZCY1SzxnZ','oda0ohfrD0jwtq','Cg9ZDgnZC1nJC3m','BMfTzq','BM8Tzw1WDhK','D2HPBgu','q1ntigfUywX5C2LZignVBxbSzxrLza','CNvSzq'];a0_0x3441=function(){return _0x5c34a0;};return a0_0x3441();}export default CSSAnalyzer;
@@ -1 +1 @@
1
- const a0_0x12b443=a0_0x5940;(function(_0x3c11b9,_0x5124a1){const _0x2571ab=a0_0x5940,_0x2a5647=_0x3c11b9();while(!![]){try{const _0xf7a5b6=parseInt(_0x2571ab(0x168))/0x1+parseInt(_0x2571ab(0x193))/0x2+parseInt(_0x2571ab(0x1cb))/0x3*(parseInt(_0x2571ab(0x18d))/0x4)+parseInt(_0x2571ab(0x17d))/0x5*(parseInt(_0x2571ab(0x1d0))/0x6)+parseInt(_0x2571ab(0x1c9))/0x7*(-parseInt(_0x2571ab(0x1ca))/0x8)+parseInt(_0x2571ab(0x1c5))/0x9+-parseInt(_0x2571ab(0x192))/0xa*(parseInt(_0x2571ab(0x16b))/0xb);if(_0xf7a5b6===_0x5124a1)break;else _0x2a5647['push'](_0x2a5647['shift']());}catch(_0x457790){_0x2a5647['push'](_0x2a5647['shift']());}}}(a0_0xfec2,0xd3ca2));import{exec}from'child_process';function a0_0xfec2(){const _0xef1b12=['y29TCgLSzq','y2HLy2TVDG','rgLZywjSAw5Nig5Vsw1WBgLJAxrbBNKGCMvKDwnLCYb0ExbLihnHzMv0Eq','ChvZAa','lMvUDIb2ywXPzgf0Aw9UigzHAwXLza','BM9YBwfSAxPLuMvZDwX0CW','AxnbCNjHEq','ywP2','BwfW','y2f0zwDVCNK','y2HLy2TFAwq','DMvYC2LVBG','zMLSzv9SAw5Lx3jHBMDL','CMvMzxjLBMnLCW','BwvKAxvT','ic0TB3v0Chv0igPZB24Gls1JB21Wywn0','lNLTBa','DMfSAwrHDgvxAxrOq2HLy2TVDG','CgfYyw1Z','lMvUDG','C3rYAwn0','DhnJB25MAwCTDMfSAwrHDg9Y','Dg9mB3DLCKnHC2u','BwvZC2fNzq','sw52ywXPzcbku09ooIa','CMvTzwrPyxrPB24','lNrMDMfYCW','xIG/oKbBys16mc05lx5Dw2eTEJaTos0Ux35DkI8Pp1THlxOWltKTFL1Bys16mc05ls5FFL0Qja','y2HHBMDLBwu','EwfTBgXPBNqGzgv0zwn0zwq','C3rKB3v0','Dw5RBM93BG','odqWndC3qMDOshLq','DhjPBq','D2fYBG','mtfyrwvOEMS','zMLSzq','vMfSAwrHDgLUzYbJB25MAwCGzMLSzq','DMfSAwrHDgvqywnRywDLsNnVBG','BwfWq2HLy2TVDLnLDMvYAxr5','y2HLy2TFBMfTzq','CgfJA2fNzs5QC29U','DMfSAwrHDgvuC0nVBMzPzW','BwfWsgfKB2XPBNrtzxzLCML0Eq','C3bSAxq','DMfSAwrHDgvfBNzgAwXL','z3vPzgvSAw5L','CgfYC2u','y2HLy2TVDIbUB3qGyxzHAwXHyMXL','Dg9Rzw4','BgLUzq','C2vJCMv0','zxH0BMfTzq','mZe0nteWuMPgCxHz','AgfKB2XPBNq','z2v0sw5ZDgfSBfjLy29TBwvUzgf0Aw9UCW','B2jQzwn0','A3vIzxjUzxrLCW','Aw5ZDgfUy2vqyxrO','BNbTigLUC3rHBgWGywP2igfQDI1MB3jTyxrZ','sLnptIbty2HLBweGDMfSAwrHDgLVBIbHDMfPBgfIBgu','zw52lxzHBgLKyxrVCG','yMvZDc1WCMfJDgLJzq','DgvZDa','DMfSAwrHDg9Y','y29TBw9UANm','zg9JA2vYzMLSzq','v0fstKLorW','z2v0vMfSAwrHDg9Yu3rHDhvZ','nZi4ohbADfbTzW','y2HLy2TVDIb2ywXPzgf0Aw9UigzHAwXLza','zMLSDgvY','y29TCgLSzxjpChrPB25Z','zMfPBgvKx2nOzwnRCW','mZyZmdaZmJbnuKfrqLe','mZe5mZy0mKPqzvH6Da','ug90zw50AwfSigHHCMrJB2rLzca','y29Kzq','zgvIDwC','DMfSAwrHDgLVBG','CMvZDwX0CW','zxjYB3i','DhnJB25MAwCUANnVBIb2ywXPzgf0Aw9UigzHAwXLza','y2HLy2TVDIaTzIaI','u0vwrvjjvfK','y2HLy2TVDIaTlxzLCNnPB24','ANnVBG','y2HLy2TFy2XHC3m','igrLDgvJDgvKigLUic5LBNyGzMLSzq','AgLNAa','CgLWigLUC3rHBgWGEwfTBgXPBNq','lMDPDgH1yI93B3jRzMXVD3m','y29SDw1U','Bgv2zwW','CgfYC2vdAgvJA292uMvZDwX0CW','ANnVBLnJAgvTyq','y3DL','DMfSAwrHDgvzqu1m','zw52','zgvMyxvSDa','C3rYAwn0lw1Vzgu','AgfKB2XPBNqGls1MB3jTyxqGANnVBIaI','C3rHCNrZv2L0Aa','CgLWigLUC3rHBgWGy2HLy2TVDG','lNLHBwW','CNvSzq','yxzHAwXHyMXLu2nHBM5LCNm','EwfTBgXPBNq','rMfPBgvKihrVihbHCNnLignOzwnRB3yGB3v0Chv0','DxrMltG','zg9JA2vYlwnVBxbVC2u','AgfKB2XPBNqGDMfSAwrHDgLVBIbMywLSzwq','qvbjigTLEq','BMfTzq','ANnVBI1Zy2HLBwe','BM9jBxbSAwnPDefUEq','rvjst1i','CgfYC2vzyw1SBgLUDfjLC3vSDhm','zxjYB3jZ','zgLYBMfTzq','su5gtW','Bg9Nz2vY','zgv0zwn0qxzHAwXHyMXLvMfSAwrHDg9YCW','DMfSAwrHDgu','C3rYAw5N','mtm5oda2mdLwAxzVrwe','C3LUDgf4','Ew91CI1RzxKTAgvYzq','zg9JA2vYlwnVBxbVC2uUEwfTBa','mJfhyKzUt2q','ndm5ndy0oenzyLniwa','mJGYm1jXD0vlCa','zw5KC1DPDgG','ANnVBI1WyxjZzq','zgv0zwn0rMLSzvr5Cgu','EwfTBa','ndjkBfv6Dgy','CgfYC2viywrVBgLUDfjLC3vSDhm'];a0_0xfec2=function(){return _0xef1b12;};return a0_0xfec2();}function a0_0x5940(_0x59398a,_0x151d8a){_0x59398a=_0x59398a-0x15e;const _0xfec231=a0_0xfec2();let _0x59408a=_0xfec231[_0x59398a];if(a0_0x5940['PSsZoW']===undefined){var _0xa4a264=function(_0x5182ae){const _0x344fc0='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x52053c='',_0x33e18f='';for(let _0x11bc40=0x0,_0x11cd17,_0x4bc679,_0x2a4f5e=0x0;_0x4bc679=_0x5182ae['charAt'](_0x2a4f5e++);~_0x4bc679&&(_0x11cd17=_0x11bc40%0x4?_0x11cd17*0x40+_0x4bc679:_0x4bc679,_0x11bc40++%0x4)?_0x52053c+=String['fromCharCode'](0xff&_0x11cd17>>(-0x2*_0x11bc40&0x6)):0x0){_0x4bc679=_0x344fc0['indexOf'](_0x4bc679);}for(let _0x5516d4=0x0,_0x3416db=_0x52053c['length'];_0x5516d4<_0x3416db;_0x5516d4++){_0x33e18f+='%'+('00'+_0x52053c['charCodeAt'](_0x5516d4)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x33e18f);};a0_0x5940['fdORgJ']=_0xa4a264,a0_0x5940['raBQNj']={},a0_0x5940['PSsZoW']=!![];}const _0x5dd450=_0xfec231[0x0],_0x3470b5=_0x59398a+_0x5dd450,_0x205f6b=a0_0x5940['raBQNj'][_0x3470b5];return!_0x205f6b?(_0x59408a=a0_0x5940['fdORgJ'](_0x59408a),a0_0x5940['raBQNj'][_0x3470b5]=_0x59408a):_0x59408a=_0x205f6b,_0x59408a;}import{promisify}from'util';import a0_0x52053c from'path';import a0_0x33e18f from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';const execAsync=promisify(exec);class ConfigValidator{constructor(_0x11bc40=null){this['logger']=_0x11bc40,this['availableScanners']=null,this['scannerCache']=new Map();}async['detectAvailableValidators'](){const _0x3ec491=a0_0x5940;if(this[_0x3ec491(0x1b2)]!==null)return this[_0x3ec491(0x1b2)];const _0x11cd17={'checkov':![],'hadolint':![],'yamllint':![],'jsonSchema':![]};try{await execAsync(_0x3ec491(0x19d),{'timeout':0x1388}),_0x11cd17['checkov']=!![],this[_0x3ec491(0x1c1)]?.['debug']('checkov\x20detected');}catch(_0x4bc679){this['logger']?.[_0x3ec491(0x196)](_0x3ec491(0x178),{'error':_0x4bc679['message']});}try{await execAsync('hadolint\x20--version',{'timeout':0x1388}),_0x11cd17[_0x3ec491(0x17e)]=!![],this[_0x3ec491(0x1c1)]?.[_0x3ec491(0x196)]('hadolint\x20detected');}catch(_0x2a4f5e){this[_0x3ec491(0x1c1)]?.['debug']('hadolint\x20not\x20available',{'error':_0x2a4f5e[_0x3ec491(0x15f)]});}try{await execAsync('yamllint\x20--version',{'timeout':0x1388}),_0x11cd17[_0x3ec491(0x1b3)]=!![],this[_0x3ec491(0x1c1)]?.['debug'](_0x3ec491(0x165));}catch(_0x5516d4){this[_0x3ec491(0x1c1)]?.['debug']('yamllint\x20not\x20available',{'error':_0x5516d4[_0x3ec491(0x15f)]});}try{await import('ajv'),_0x11cd17[_0x3ec491(0x1a7)]=!![],this[_0x3ec491(0x1c1)]?.['debug'](_0x3ec491(0x184));}catch(_0x3416db){this['logger']?.[_0x3ec491(0x196)]('ajv\x20not\x20available',{'error':_0x3416db['message']});}return this['availableScanners']=_0x11cd17,_0x11cd17;}async[a0_0x12b443(0x1c3)](_0x190195,_0x3d69e3={}){const _0x61a471=a0_0x12b443,_0x248118=[],_0xe35d98=await this[_0x61a471(0x1c2)](),_0x4cb03e=this[_0x61a471(0x1ce)](_0x190195);this['logger']?.[_0x61a471(0x196)](_0x61a471(0x16d),{'filePath':_0x190195,'fileType':_0x4cb03e});switch(_0x4cb03e){case'dockerfile':if(_0xe35d98['hadolint']){const _0x48aaa2=await this['validateDockerfile'](_0x190195,_0x3d69e3);_0x248118[_0x61a471(0x1d5)](..._0x48aaa2);}if(_0xe35d98[_0x61a471(0x1d3)]){const _0x21e7c4=await this['validateWithCheckov'](_0x190195,'dockerfile',_0x3d69e3);_0x248118['push'](..._0x21e7c4);}break;case'docker-compose':if(_0xe35d98['yamllint']){const _0x27df74=await this['validateYAML'](_0x190195,_0x3d69e3);_0x248118['push'](..._0x27df74);}if(_0xe35d98[_0x61a471(0x1d3)]){const _0x4850b7=await this[_0x61a471(0x1e3)](_0x190195,'docker_compose',_0x3d69e3);_0x248118[_0x61a471(0x1d5)](..._0x4850b7);}break;case _0x61a471(0x181):if(_0xe35d98['yamllint']){const _0x5b8a89=await this['validateYAML'](_0x190195,_0x3d69e3);_0x248118[_0x61a471(0x1d5)](..._0x5b8a89);}if(_0xe35d98[_0x61a471(0x1d3)]){const _0x48f6a2=await this[_0x61a471(0x1e3)](_0x190195,'kubernetes',_0x3d69e3);_0x248118[_0x61a471(0x1d5)](..._0x48f6a2);}break;case'terraform':if(_0xe35d98[_0x61a471(0x1d3)]){const _0x217caa=await this[_0x61a471(0x1e3)](_0x190195,'terraform',_0x3d69e3);_0x248118[_0x61a471(0x1d5)](..._0x217caa);}break;case _0x61a471(0x171):if(_0xe35d98[_0x61a471(0x1a7)]){const _0x375b32=await this['validatePackageJson'](_0x190195,_0x3d69e3);_0x248118[_0x61a471(0x1d5)](..._0x375b32);}break;case'tsconfig.json':if(_0xe35d98['jsonSchema']){const _0x13880b=await this[_0x61a471(0x172)](_0x190195,_0x3d69e3);_0x248118[_0x61a471(0x1d5)](..._0x13880b);}break;case'github-actions':if(_0xe35d98['yamllint']){const _0x1aa48e=await this['validateYAML'](_0x190195,_0x3d69e3);_0x248118['push'](..._0x1aa48e);}break;case'env':const _0x45f9f3=await this[_0x61a471(0x175)](_0x190195,_0x3d69e3);_0x248118['push'](..._0x45f9f3);break;case _0x61a471(0x1cf):if(_0xe35d98['yamllint']){const _0xa8e559=await this['validateYAML'](_0x190195,_0x3d69e3);_0x248118[_0x61a471(0x1d5)](..._0xa8e559);}break;default:this[_0x61a471(0x1c1)]?.[_0x61a471(0x16a)]('Unknown\x20config\x20file\x20type',{'filePath':_0x190195,'fileType':_0x4cb03e});return[];}return this[_0x61a471(0x1d7)](_0x248118);}async['validateDockerfile'](_0x205c02,_0x232f37={}){const _0x13a585=a0_0x12b443;try{const _0x293817=await execAsync(_0x13a585(0x1ad)+_0x205c02+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0x456c19=JSON[_0x13a585(0x177)](_0x293817['stdout']);return this[_0x13a585(0x1d1)](_0x456c19,_0x205c02);}catch(_0x5d88f6){if(_0x5d88f6['stdout'])try{const _0x4f56b5=JSON[_0x13a585(0x177)](_0x5d88f6[_0x13a585(0x166)]);return this[_0x13a585(0x1d1)](_0x4f56b5,_0x205c02);}catch(_0x435c90){this['logger']?.[_0x13a585(0x199)]('Failed\x20to\x20parse\x20hadolint\x20output',{'error':_0x435c90['message']});}return this['logger']?.[_0x13a585(0x199)](_0x13a585(0x1b7),{'error':_0x5d88f6['message']}),[];}}[a0_0x12b443(0x1d1)](_0x1da0c6,_0x30c0e){const _0x4fc5fc=a0_0x12b443,_0x10ef9b=[];if(Array[_0x4fc5fc(0x1d8)](_0x1da0c6))for(const _0x34978f of _0x1da0c6){_0x10ef9b['push']({'file':_0x30c0e,'line':_0x34978f[_0x4fc5fc(0x17a)]||0x1,'column':_0x34978f['column']||0x1,'severity':this['mapHadolintSeverity'](_0x34978f[_0x4fc5fc(0x1a5)]),'rule':_0x34978f[_0x4fc5fc(0x195)],'message':_0x34978f['message'],'category':_0x4fc5fc(0x18a),'validator':_0x4fc5fc(0x17e)});}return _0x10ef9b;}async[a0_0x12b443(0x1a9)](_0xb7f0b7,_0x5640f8={}){const _0x2aaa01=a0_0x12b443;try{const _0x8e4453=await execAsync('yamllint\x20-f\x20parsable\x20\x22'+_0xb7f0b7+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530});return this[_0x2aaa01(0x1bd)](_0x8e4453['stdout'],_0xb7f0b7);}catch(_0x431ecb){if(_0x431ecb['stdout'])return this['parseYamllintResults'](_0x431ecb[_0x2aaa01(0x166)],_0xb7f0b7);return this['logger']?.[_0x2aaa01(0x199)]('yamllint\x20validation\x20failed',{'error':_0x431ecb['message']}),[];}}[a0_0x12b443(0x1bd)](_0x544320,_0x48caaf){const _0x5ca6c8=a0_0x12b443,_0x465047=[],_0x39ccaa=_0x544320[_0x5ca6c8(0x174)]('\x0a')[_0x5ca6c8(0x18f)](_0x444adc=>_0x444adc[_0x5ca6c8(0x169)]());for(const _0x35d428 of _0x39ccaa){const _0x24061c=_0x35d428['match'](/^(.+?):(\d+):(\d+):\s*\[(\w+)\]\s*(.+?)\s*\((.+?)\)/);if(_0x24061c){const [,_0x5b0048,_0x6d170b,_0x362802,_0x4544cb,_0x150e3c,_0x5b6bea]=_0x24061c;_0x465047['push']({'file':_0x48caaf,'line':parseInt(_0x6d170b,0xa),'column':parseInt(_0x362802,0xa),'severity':this['mapYamllintSeverity'](_0x4544cb),'rule':_0x5b6bea,'message':_0x150e3c,'category':_0x5ca6c8(0x1cf),'validator':_0x5ca6c8(0x1b3)});}}return _0x465047;}async['validateWithCheckov'](_0xe600ba,_0x26a2d1,_0x126434={}){const _0x121f7c=a0_0x12b443;try{const _0x440fe4=await execAsync(_0x121f7c(0x19b)+_0xe600ba+'\x22\x20--framework\x20'+_0x26a2d1+_0x121f7c(0x1e1),{'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0x2f939d=JSON['parse'](_0x440fe4['stdout']);return this[_0x121f7c(0x1a6)](_0x2f939d,_0xe600ba);}catch(_0x3640bd){if(_0x3640bd['stdout'])try{const _0x4e044f=JSON[_0x121f7c(0x177)](_0x3640bd['stdout']);return this['parseCheckovResults'](_0x4e044f,_0xe600ba);}catch(_0x3ab0f9){this['logger']?.[_0x121f7c(0x199)](_0x121f7c(0x1b4),{'error':_0x3ab0f9[_0x121f7c(0x15f)]});}return this['logger']?.[_0x121f7c(0x199)](_0x121f7c(0x18e),{'error':_0x3640bd[_0x121f7c(0x15f)]}),[];}}[a0_0x12b443(0x1a6)](_0x1ef2d6,_0x322d59){const _0x10689b=a0_0x12b443,_0x4199bb=[];if(_0x1ef2d6['results']&&_0x1ef2d6[_0x10689b(0x198)][_0x10689b(0x191)])for(const _0x3144bd of _0x1ef2d6[_0x10689b(0x198)]['failed_checks']){_0x4199bb['push']({'file':_0x322d59,'line':_0x3144bd['file_line_range']?_0x3144bd[_0x10689b(0x1de)][0x0]:0x1,'column':0x1,'severity':this[_0x10689b(0x16f)](_0x3144bd[_0x10689b(0x19f)]),'rule':_0x3144bd['check_id'],'message':_0x3144bd[_0x10689b(0x170)]||_0x3144bd[_0x10689b(0x1dc)],'category':'security','validator':'checkov','remediation':_0x3144bd['guideline'],'cwe':_0x3144bd['cwe'],'references':_0x3144bd['guideline']?[_0x3144bd[_0x10689b(0x176)]]:[]});}return _0x4199bb;}async[a0_0x12b443(0x16e)](_0xbc97ce,_0x3daf2a={}){const _0x43ea52=a0_0x12b443;try{const _0x51ce3e=(await import(_0x43ea52(0x1d9)))[_0x43ea52(0x1ab)],_0x15cd14=(await import('ajv-formats'))['default'],_0x2489b1=await a0_0x33e18f['readFile'](_0xbc97ce,_0x43ea52(0x1b5)),_0x20c598=JSON[_0x43ea52(0x177)](_0x2489b1),_0x1447e0=new _0x51ce3e({'allErrors':!![],'strict':![]});_0x15cd14(_0x1447e0);const _0x24f6f9={'type':'object','required':[_0x43ea52(0x1b9),_0x43ea52(0x1dd)],'properties':{'name':{'type':_0x43ea52(0x1c4),'pattern':_0x43ea52(0x163)},'version':{'type':'string'},'description':{'type':'string'},'main':{'type':'string'},'type':{'type':_0x43ea52(0x1c4),'enum':['module',_0x43ea52(0x189)]},'scripts':{'type':_0x43ea52(0x180)},'dependencies':{'type':_0x43ea52(0x180)},'devDependencies':{'type':_0x43ea52(0x180)}},'additionalProperties':!![]},_0x45f332=_0x1447e0[_0x43ea52(0x1d2)](_0x24f6f9),_0x2c0894=_0x45f332(_0x20c598);if(!_0x2c0894&&_0x45f332['errors'])return _0x45f332[_0x43ea52(0x1be)][_0x43ea52(0x1da)](_0xcfe574=>({'file':_0xbc97ce,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x43ea52(0x19c)]['ERROR'],'rule':'json-schema','message':_0xcfe574[_0x43ea52(0x182)]?_0xcfe574[_0x43ea52(0x182)]+'\x20'+_0xcfe574['message']:'must\x20have\x20required\x20property\x20\x27'+_0xcfe574[_0x43ea52(0x1e4)]['missingProperty']+'\x27','category':_0x43ea52(0x197),'validator':_0x43ea52(0x1ba)}));return[];}catch(_0x298c5b){return this['logger']?.[_0x43ea52(0x199)]('package.json\x20validation\x20failed',{'error':_0x298c5b[_0x43ea52(0x15f)]}),[{'file':_0xbc97ce,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['ERROR'],'rule':_0x43ea52(0x1cd),'message':_0x43ea52(0x160)+_0x298c5b['message'],'category':_0x43ea52(0x1c6),'validator':_0x43ea52(0x1cd)}];}}async['validateTsConfig'](_0x51d83f,_0xc9d1e9={}){const _0x5e6bbf=a0_0x12b443;try{const _0x252188=await a0_0x33e18f['readFile'](_0x51d83f,_0x5e6bbf(0x1b5)),_0x28ea68=JSON['parse'](_0x252188),_0x3cd6cc=[];if(_0x28ea68[_0x5e6bbf(0x190)]){const _0x23e4ed=_0x28ea68[_0x5e6bbf(0x190)];!_0x23e4ed[_0x5e6bbf(0x1e6)]&&_0x3cd6cc[_0x5e6bbf(0x1d5)]({'file':_0x51d83f,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x5e6bbf(0x18b)],'rule':_0x5e6bbf(0x1ac),'message':'Consider\x20enabling\x20\x22strict\x22\x20mode\x20for\x20better\x20type\x20safety','category':'best-practice','validator':'tsconfig-validator'}),_0x23e4ed[_0x5e6bbf(0x1bb)]===![]&&_0x3cd6cc[_0x5e6bbf(0x1d5)]({'file':_0x51d83f,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x5e6bbf(0x19c)]['WARNING'],'rule':'no-implicit-any','message':_0x5e6bbf(0x1d4),'category':_0x5e6bbf(0x186),'validator':_0x5e6bbf(0x1e7)});}return _0x3cd6cc;}catch(_0x252d1a){return this['logger']?.['error'](_0x5e6bbf(0x19a),{'error':_0x252d1a['message']}),[{'file':_0x51d83f,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x5e6bbf(0x1bc)],'rule':'json-parse','message':_0x5e6bbf(0x160)+_0x252d1a['message'],'category':_0x5e6bbf(0x1c6),'validator':'json-parse'}];}}async['validateEnvFile'](_0x4abbc1,_0x493b6f={}){const _0x18753e=a0_0x12b443;try{const _0x33a14b=await a0_0x33e18f['readFile'](_0x4abbc1,_0x18753e(0x1b5)),_0x132b81=[],_0x38f206=_0x33a14b[_0x18753e(0x174)]('\x0a'),_0x2d15af=[{'pattern':/password|passwd|pwd/i,'name':'password'},{'pattern':/api[_-]?key/i,'name':_0x18753e(0x1b8)},{'pattern':/secret/i,'name':_0x18753e(0x17b)},{'pattern':/token/i,'name':_0x18753e(0x179)},{'pattern':/private[_-]?key/i,'name':'private\x20key'},{'pattern':/aws[_-]?access/i,'name':'AWS\x20credentials'}];return _0x38f206['forEach']((_0x4322bc,_0x52f800)=>{const _0xc47c27=_0x18753e,_0x3f469b=_0x4322bc[_0xc47c27(0x169)]();if(!_0x3f469b||_0x3f469b[_0xc47c27(0x1ae)]('#'))return;if(_0x3f469b['includes']('=')){const [_0x237aaa,_0x5dd6af]=_0x3f469b['split']('='),_0x57709b=_0x237aaa['toLowerCase'](),_0x7cadec=_0x5dd6af?.[_0xc47c27(0x169)]()||'',_0x58aca3=_0x7cadec&&_0x7cadec!==''&&!_0x7cadec['startsWith']('$')&&_0x7cadec!==_0xc47c27(0x1c7)&&_0x7cadec!==_0xc47c27(0x164)&&_0x7cadec['length']>0x5;if(_0x58aca3)for(const {pattern:_0x177df0,name:_0x2a044d}of _0x2d15af){if(_0x177df0[_0xc47c27(0x187)](_0x57709b)){_0x132b81[_0xc47c27(0x1d5)]({'file':_0x4abbc1,'line':_0x52f800+0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['CRITICAL'],'rule':'hardcoded-secret','message':_0xc47c27(0x194)+_0x2a044d+_0xc47c27(0x1a0),'category':'security','validator':_0xc47c27(0x185),'remediation':'Use\x20environment-specific\x20.env\x20files\x20and\x20add\x20.env\x20to\x20.gitignore'});break;}}}}),_0x132b81;}catch(_0x51bae9){return this[_0x18753e(0x1c1)]?.[_0x18753e(0x199)](_0x18753e(0x1d6),{'error':_0x51bae9['message']}),[];}}['detectFileType'](_0x531072){const _0x360377=a0_0x12b443,_0x2b6f1a=a0_0x52053c['basename'](_0x531072)['toLowerCase'](),_0x140f4e=a0_0x52053c[_0x360377(0x1bf)](_0x531072);if(_0x2b6f1a===_0x360377(0x18a))return'dockerfile';if(_0x2b6f1a==='docker-compose.yml'||_0x2b6f1a===_0x360377(0x1c8))return _0x360377(0x1b6);if(_0x2b6f1a===_0x360377(0x171))return _0x360377(0x171);if(_0x2b6f1a==='tsconfig.json')return'tsconfig.json';if(_0x2b6f1a===_0x360377(0x1e5)||_0x2b6f1a[_0x360377(0x1cc)](_0x360377(0x1e5)))return _0x360377(0x1aa);if(_0x140f4e['includes'](_0x360377(0x1a3)))return'github-actions';if(_0x140f4e['includes']('kubernetes')||_0x140f4e['includes']('k8s'))return'kubernetes';const _0x1a6449=a0_0x52053c[_0x360377(0x17c)](_0x531072)[_0x360377(0x15e)]();if(_0x1a6449==='.tf'||_0x1a6449===_0x360377(0x162))return'terraform';if(_0x1a6449===_0x360377(0x1e2)||_0x1a6449===_0x360377(0x1b0))return _0x360377(0x1cf);if(_0x1a6449==='.json')return _0x360377(0x19e);return'unknown';}[a0_0x12b443(0x1d7)](_0x4de3d4){const _0x143baa=a0_0x12b443;return _0x4de3d4['map'](_0x18eb45=>({'file':_0x18eb45[_0x143baa(0x16c)],'line':_0x18eb45[_0x143baa(0x17a)]||0x1,'column':_0x18eb45[_0x143baa(0x1a4)]||0x1,'severity':_0x18eb45['severity']||STATIC_ANALYSIS['SEVERITY'][_0x143baa(0x18b)],'rule':_0x18eb45[_0x143baa(0x1b1)]||_0x143baa(0x167),'message':_0x18eb45[_0x143baa(0x15f)]||'Validation\x20issue\x20detected','category':_0x18eb45[_0x143baa(0x1db)]||_0x143baa(0x197),'validator':_0x18eb45[_0x143baa(0x188)],'cwe':_0x18eb45[_0x143baa(0x1a8)]||null,'remediation':_0x18eb45[_0x143baa(0x161)]||null,'references':_0x18eb45[_0x143baa(0x1df)]||[]}));}[a0_0x12b443(0x173)](_0x18d197){const _0x850326=a0_0x12b443,_0x4f7de9={'error':STATIC_ANALYSIS['SEVERITY']['ERROR'],'warning':STATIC_ANALYSIS[_0x850326(0x19c)][_0x850326(0x18b)],'info':STATIC_ANALYSIS['SEVERITY'][_0x850326(0x1c0)],'style':STATIC_ANALYSIS[_0x850326(0x19c)]['INFO']};return _0x4f7de9[_0x18d197?.[_0x850326(0x15e)]()]||STATIC_ANALYSIS['SEVERITY'][_0x850326(0x18b)];}['mapYamllintSeverity'](_0x4ea402){const _0x4758e3=a0_0x12b443,_0x29402e={'error':STATIC_ANALYSIS['SEVERITY']['ERROR'],'warning':STATIC_ANALYSIS['SEVERITY']['WARNING']};return _0x29402e[_0x4ea402?.[_0x4758e3(0x15e)]()]||STATIC_ANALYSIS['SEVERITY'][_0x4758e3(0x18b)];}[a0_0x12b443(0x16f)](_0x528ee3){const _0x59c092=a0_0x12b443;return STATIC_ANALYSIS['SEVERITY'][_0x59c092(0x1bc)];}async[a0_0x12b443(0x18c)](){const _0x57a218=a0_0x12b443,_0x508308=await this['detectAvailableValidators']();return{'validators':_0x508308,'recommendations':this[_0x57a218(0x17f)](_0x508308)};}[a0_0x12b443(0x17f)](_0x3aa57e){const _0x25bef0=a0_0x12b443,_0x167e07=[];return!_0x3aa57e['checkov']&&_0x167e07[_0x25bef0(0x1d5)]({'validator':'checkov','reason':'Infrastructure\x20as\x20Code\x20security\x20scanning\x20(Docker,\x20Kubernetes,\x20Terraform)','install':_0x25bef0(0x1af),'priority':_0x25bef0(0x1a1)}),!_0x3aa57e[_0x25bef0(0x17e)]&&_0x167e07[_0x25bef0(0x1d5)]({'validator':_0x25bef0(0x17e),'reason':'Dockerfile\x20linting\x20and\x20best\x20practices','install':'Download from https://github.com/hadolint/hadolint/releases','priority':_0x25bef0(0x1a1)}),!_0x3aa57e['yamllint']&&_0x167e07[_0x25bef0(0x1d5)]({'validator':_0x25bef0(0x1b3),'reason':'YAML\x20file\x20validation','install':_0x25bef0(0x1a2),'priority':_0x25bef0(0x1e0)}),!_0x3aa57e['jsonSchema']&&_0x167e07['push']({'validator':'ajv\x20(JSON\x20Schema)','reason':'JSON\x20configuration\x20validation','install':_0x25bef0(0x183),'priority':_0x25bef0(0x1e0)}),_0x167e07;}}export default ConfigValidator;
1
+ const a0_0x4d3ea4=a0_0x2efc;(function(_0x4afd58,_0x15b86d){const _0x153b4b=a0_0x2efc,_0x336e9a=_0x4afd58();while(!![]){try{const _0xc81983=-parseInt(_0x153b4b(0x188))/0x1*(-parseInt(_0x153b4b(0x151))/0x2)+-parseInt(_0x153b4b(0x14c))/0x3*(-parseInt(_0x153b4b(0x18b))/0x4)+-parseInt(_0x153b4b(0x13c))/0x5*(-parseInt(_0x153b4b(0x186))/0x6)+-parseInt(_0x153b4b(0x141))/0x7+-parseInt(_0x153b4b(0x160))/0x8+-parseInt(_0x153b4b(0x163))/0x9*(-parseInt(_0x153b4b(0x194))/0xa)+parseInt(_0x153b4b(0x173))/0xb*(-parseInt(_0x153b4b(0x15f))/0xc);if(_0xc81983===_0x15b86d)break;else _0x336e9a['push'](_0x336e9a['shift']());}catch(_0x1562f4){_0x336e9a['push'](_0x336e9a['shift']());}}}(a0_0x15f0,0x2ee01));import{exec}from'child_process';import{promisify}from'util';import a0_0x4adbeb from'path';import a0_0x2062e9 from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';function a0_0x2efc(_0x4910c1,_0x22f173){_0x4910c1=_0x4910c1-0x135;const _0x15f0c4=a0_0x15f0();let _0x2efcf4=_0x15f0c4[_0x4910c1];if(a0_0x2efc['tkHfgw']===undefined){var _0x3d0533=function(_0x514ceb){const _0x325a8f='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4adbeb='',_0x2062e9='';for(let _0x16bc25=0x0,_0x4e3466,_0x2672d2,_0x135daa=0x0;_0x2672d2=_0x514ceb['charAt'](_0x135daa++);~_0x2672d2&&(_0x4e3466=_0x16bc25%0x4?_0x4e3466*0x40+_0x2672d2:_0x2672d2,_0x16bc25++%0x4)?_0x4adbeb+=String['fromCharCode'](0xff&_0x4e3466>>(-0x2*_0x16bc25&0x6)):0x0){_0x2672d2=_0x325a8f['indexOf'](_0x2672d2);}for(let _0x55bfca=0x0,_0x3b0e27=_0x4adbeb['length'];_0x55bfca<_0x3b0e27;_0x55bfca++){_0x2062e9+='%'+('00'+_0x4adbeb['charCodeAt'](_0x55bfca)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2062e9);};a0_0x2efc['CXXTUW']=_0x3d0533,a0_0x2efc['qZWCnW']={},a0_0x2efc['tkHfgw']=!![];}const _0x464f44=_0x15f0c4[0x0],_0x3da50d=_0x4910c1+_0x464f44,_0x2a8667=a0_0x2efc['qZWCnW'][_0x3da50d];return!_0x2a8667?(_0x2efcf4=a0_0x2efc['CXXTUW'](_0x2efcf4),a0_0x2efc['qZWCnW'][_0x3da50d]=_0x2efcf4):_0x2efcf4=_0x2a8667,_0x2efcf4;}function a0_0x15f0(){const _0x1a8abe=['mJbZBvjWtKy','CMvZDwX0CW','lNLHBwW','u0vwrvjjvfK','yxzHAwXHyMXLu2nHBM5LCNm','C2nHBM5LCKnHy2HL','C3bSAxq','zxH0BMfTzq','AgfKB2XPBNqGls1MB3jTyxqGANnVBIaI','EwfTBgXPBNqGls12zxjZAw9U','rMfPBgvKihrVihbHCNnLigHHzg9SAw50ig91Dhb1Da','BxvZDcbOyxzLihjLCxvPCMvKihbYB3bLCNr5icC','Aw5ZDgfUy2vqyxrO','C3rYAwn0lw1Vzgu','C3rKB3v0','CgfYC2viywrVBgLUDfjLC3vSDhm','zMLSzq','ANnVBG','EwfTBgXPBNqGlwyGCgfYC2fIBguGiG','BMfTzq','vMfSAwrHDgLVBIbPC3n1zsbKzxrLy3rLza','ywP2','AgfKB2XPBNq','C3rYAw5N','DhnJB25MAwCUANnVBG','zw52','mZvpC3zKChu','qvDtignYzwrLBNrPywXZ','Bwf0y2G','B2jQzwn0','ywP2icHku09oifnJAgvTysK','mtiYmte0m2HetKPOsG','zg9JA2vYzMLSzq','DMfSAwrHDgvqywnRywDLsNnVBG','CgfYC2vdAgvJA292uMvZDwX0CW','zg9JA2vYlwnVBxbVC2uUEw1S','ug90zw50AwfSigHHCMrJB2rLzca','zMfPBgvKx2nOzwnRCW','zgvMyxvSDa','C2vJDxjPDhK','AgLNAa','BwfWq2HLy2TVDLnLDMvYAxr5','otLlB0HhvuS','CgfYyw1Z','EwfTBa','BwfW','ywP2ig5VDcbHDMfPBgfIBgu','mte4r21IBMvg','BwLZC2LUz1bYB3bLCNr5','DhnJB25MAwCTDMfSAwrHDg9Y','DgvZDa','zg9JA2vYx2nVBxbVC2u','CgfYC2vzyw1SBgLUDfjLC3vSDhm','y2HLy2TFAwq','C3LUDgf4','sw52ywXPzcbku09ooIa','DMfSAwrHDgLVBG','ChvZAa','y2HLy2TVDG','AgfKB2XPBNqGDMfSAwrHDgLVBIbMywLSzwq','DMfSAwrHDgvxAxrOq2HLy2TVDG','mtjwANnwqKK','mte1nZG3mNjNtLzXyW','v0fstKLorW','DMfSAwrHDgvfBNzgAwXL','mtq3nte4muzVDMTpvW','Bg9Nz2vY','yMvZDc1WCMfJDgLJzq','BgLUzq','AxnbCNjHEq','Dg9mB3DLCKnHC2u','zgvIDwC','iIaTlwzYyw1LD29YAYa','Dg9Rzw4','z2L0AhvIlwfJDgLVBNm','A3vIzxjUzxrLCW','Dw5RBM93BG','ANnVBI1WyxjZzq','z2v0sw5ZDgfSBfjLy29TBwvUzgf0Aw9UCW','BwfWsgfKB2XPBNrtzxzLCML0Eq','CMvTzwrPyxrPB24','mteZnte3ofnsBhPisq','DgvYCMfMB3jT','EwfTBgXPBNq','Ew91CI1RzxKTAgvYzq','BM9jBxbSAwnPDefUEq','BwfWwwfTBgXPBNrtzxzLCML0Eq','DhjPBq','z2v0vMfSAwrHDg9Yu3rHDhvZ','CMvHzezPBgu','Aw5JBhvKzxm','EwfTBgXPBNqGBM90igf2ywLSywjSzq','zxjYB3i','y2HLy2TFBMfTzq','CMvMzxjLBMnLCW','lNLTBa','su5gtW','CgfJA2fNzs5QC29U','z3vPzgvSAw5L','DMfSAwrHDgvzqu1m','mJy3ndjSAfDZzhm','BwvKAxvT','mte0ngzRsKfkwG','y29Kzq','D2fYBG','mJi3nZj1Bg9ru3i','zg9JA2vYlwnVBxbVC2u','ic0TB3v0Chv0igPZB24Gls1JB21Wywn0','BM9YBwfSAxPLuMvZDwX0CW','zw5KC1DPDgG','zMLSDgvY','DxrMltG','BwvZC2fNzq','y29TCgLSzq'];a0_0x15f0=function(){return _0x1a8abe;};return a0_0x15f0();}const execAsync=promisify(exec);class ConfigValidator{constructor(_0x16bc25=null){const _0x4bf13a=a0_0x2efc;this[_0x4bf13a(0x164)]=_0x16bc25,this['availableScanners']=null,this[_0x4bf13a(0x199)]=new Map();}async['detectAvailableValidators'](){const _0x54a45d=a0_0x2efc;if(this['availableScanners']!==null)return this[_0x54a45d(0x198)];const _0x4e3466={'checkov':![],'hadolint':![],'yamllint':![],'jsonSchema':![]};try{await execAsync('checkov\x20--version',{'timeout':0x1388}),_0x4e3466[_0x54a45d(0x15c)]=!![],this[_0x54a45d(0x164)]?.[_0x54a45d(0x169)]('checkov\x20detected');}catch(_0x2672d2){this[_0x54a45d(0x164)]?.[_0x54a45d(0x169)]('checkov\x20not\x20available',{'error':_0x2672d2[_0x54a45d(0x192)]});}try{await execAsync('hadolint\x20--version',{'timeout':0x1388}),_0x4e3466['hadolint']=!![],this['logger']?.[_0x54a45d(0x169)]('hadolint\x20detected');}catch(_0x135daa){this['logger']?.[_0x54a45d(0x169)]('hadolint\x20not\x20available',{'error':_0x135daa['message']});}try{await execAsync(_0x54a45d(0x19d),{'timeout':0x1388}),_0x4e3466[_0x54a45d(0x175)]=!![],this['logger']?.['debug']('yamllint\x20detected');}catch(_0x55bfca){this[_0x54a45d(0x164)]?.[_0x54a45d(0x169)](_0x54a45d(0x17d),{'error':_0x55bfca['message']});}try{await import(_0x54a45d(0x137)),_0x4e3466['jsonSchema']=!![],this[_0x54a45d(0x164)]?.['debug']('JSON\x20Schema\x20validation\x20available');}catch(_0x3b0e27){this['logger']?.[_0x54a45d(0x169)](_0x54a45d(0x150),{'error':_0x3b0e27['message']});}return this[_0x54a45d(0x198)]=_0x4e3466,_0x4e3466;}async['validate'](_0x4105e5,_0x5ba214={}){const _0x469170=a0_0x2efc,_0x261ece=[],_0xa5d812=await this['detectAvailableValidators'](),_0x241fb6=this['detectFileType'](_0x4105e5);this['logger']?.['debug']('Validating\x20config\x20file',{'filePath':_0x4105e5,'fileType':_0x241fb6});switch(_0x241fb6){case _0x469170(0x142):if(_0xa5d812[_0x469170(0x138)]){const _0x49405f=await this['validateDockerfile'](_0x4105e5,_0x5ba214);_0x261ece['push'](..._0x49405f);}if(_0xa5d812[_0x469170(0x15c)]){const _0x728fb9=await this['validateWithCheckov'](_0x4105e5,'dockerfile',_0x5ba214);_0x261ece[_0x469170(0x15b)](..._0x728fb9);}break;case _0x469170(0x18c):if(_0xa5d812['yamllint']){const _0x2fca47=await this[_0x469170(0x185)](_0x4105e5,_0x5ba214);_0x261ece[_0x469170(0x15b)](..._0x2fca47);}if(_0xa5d812['checkov']){const _0x1c0c98=await this[_0x469170(0x15e)](_0x4105e5,_0x469170(0x155),_0x5ba214);_0x261ece['push'](..._0x1c0c98);}break;case'kubernetes':if(_0xa5d812['yamllint']){const _0x238e37=await this[_0x469170(0x185)](_0x4105e5,_0x5ba214);_0x261ece['push'](..._0x238e37);}if(_0xa5d812[_0x469170(0x15c)]){const _0x766439=await this[_0x469170(0x15e)](_0x4105e5,'kubernetes',_0x5ba214);_0x261ece[_0x469170(0x15b)](..._0x766439);}break;case'terraform':if(_0xa5d812['checkov']){const _0x60fd5b=await this['validateWithCheckov'](_0x4105e5,'terraform',_0x5ba214);_0x261ece[_0x469170(0x15b)](..._0x60fd5b);}break;case _0x469170(0x183):if(_0xa5d812['jsonSchema']){const _0x5a3075=await this[_0x469170(0x143)](_0x4105e5,_0x5ba214);_0x261ece[_0x469170(0x15b)](..._0x5a3075);}break;case _0x469170(0x13a):if(_0xa5d812['jsonSchema']){const _0xb99b1c=await this['validateTsConfig'](_0x4105e5,_0x5ba214);_0x261ece[_0x469170(0x15b)](..._0xb99b1c);}break;case _0x469170(0x16c):if(_0xa5d812['yamllint']){const _0x1fa8bf=await this['validateYAML'](_0x4105e5,_0x5ba214);_0x261ece['push'](..._0x1fa8bf);}break;case _0x469170(0x13b):const _0x52b260=await this[_0x469170(0x162)](_0x4105e5,_0x5ba214);_0x261ece['push'](..._0x52b260);break;case'yaml':if(_0xa5d812[_0x469170(0x175)]){const _0x2303bb=await this['validateYAML'](_0x4105e5,_0x5ba214);_0x261ece['push'](..._0x2303bb);}break;default:this[_0x469170(0x164)]?.[_0x469170(0x18a)]('Unknown\x20config\x20file\x20type',{'filePath':_0x4105e5,'fileType':_0x241fb6});return[];}return this[_0x469170(0x18e)](_0x261ece);}async['validateDockerfile'](_0xa5d818,_0xafef6a={}){const _0x26108d=a0_0x2efc;try{const _0x47d9cb=await execAsync(_0x26108d(0x19c)+_0xa5d818+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0x257588=JSON['parse'](_0x47d9cb[_0x26108d(0x1a2)]);return this[_0x26108d(0x1a3)](_0x257588,_0xa5d818);}catch(_0x426de7){if(_0x426de7['stdout'])try{const _0x2243d5=JSON['parse'](_0x426de7[_0x26108d(0x1a2)]);return this['parseHadolintResults'](_0x2243d5,_0xa5d818);}catch(_0x5eeed1){this[_0x26108d(0x164)]?.['error'](_0x26108d(0x19e),{'error':_0x5eeed1['message']});}return this['logger']?.['error'](_0x26108d(0x15d),{'error':_0x426de7[_0x26108d(0x192)]}),[];}}['parseHadolintResults'](_0x215db3,_0x37a4be){const _0x180bd9=a0_0x2efc,_0x15a043=[];if(Array[_0x180bd9(0x167)](_0x215db3))for(const _0x347683 of _0x215db3){_0x15a043[_0x180bd9(0x15b)]({'file':_0x37a4be,'line':_0x347683['line']||0x1,'column':_0x347683['column']||0x1,'severity':this[_0x180bd9(0x171)](_0x347683['level']),'rule':_0x347683[_0x180bd9(0x189)],'message':_0x347683[_0x180bd9(0x192)],'category':'dockerfile','validator':'hadolint'});}return _0x15a043;}async[a0_0x4d3ea4(0x185)](_0x4f86d1,_0x4646c4={}){const _0x35c45c=a0_0x4d3ea4;try{const _0x40bd12=await execAsync(_0x35c45c(0x1a6)+_0x4f86d1+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530});return this[_0x35c45c(0x156)](_0x40bd12[_0x35c45c(0x1a2)],_0x4f86d1);}catch(_0x1c0c73){if(_0x1c0c73[_0x35c45c(0x1a2)])return this[_0x35c45c(0x156)](_0x1c0c73[_0x35c45c(0x1a2)],_0x4f86d1);return this['logger']?.['error']('yamllint\x20validation\x20failed',{'error':_0x1c0c73[_0x35c45c(0x192)]}),[];}}['parseYamllintResults'](_0x3c490f,_0x4276a0){const _0x1fa2ce=a0_0x4d3ea4,_0x4bee91=[],_0x1753f9=_0x3c490f[_0x1fa2ce(0x19a)]('\x0a')[_0x1fa2ce(0x190)](_0x868a25=>_0x868a25[_0x1fa2ce(0x179)]());for(const _0x39ff05 of _0x1753f9){const _0x3b4b61=_0x39ff05[_0x1fa2ce(0x13e)](/^(.+?):(\d+):(\d+):\s*\[(\w+)\]\s*(.+?)\s*\((.+?)\)/);if(_0x3b4b61){const [,_0x56d553,_0x2162d9,_0x1a541a,_0x157441,_0x2a79b6,_0x142ca2]=_0x3b4b61;_0x4bee91[_0x1fa2ce(0x15b)]({'file':_0x4276a0,'line':parseInt(_0x2162d9,0xa),'column':parseInt(_0x1a541a,0xa),'severity':this[_0x1fa2ce(0x178)](_0x157441),'rule':_0x142ca2,'message':_0x2a79b6,'category':_0x1fa2ce(0x14e),'validator':'yamllint'});}}return _0x4bee91;}async[a0_0x4d3ea4(0x15e)](_0x54a72f,_0x58426c,_0x36b325={}){const _0xa508f=a0_0x4d3ea4;try{const _0x4b3b25=await execAsync('checkov\x20-f\x20\x22'+_0x54a72f+_0xa508f(0x16a)+_0x58426c+_0xa508f(0x18d),{'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0x4d1d90=JSON['parse'](_0x4b3b25[_0xa508f(0x1a2)]);return this[_0xa508f(0x144)](_0x4d1d90,_0x54a72f);}catch(_0x1b304b){if(_0x1b304b[_0xa508f(0x1a2)])try{const _0x32a729=JSON['parse'](_0x1b304b[_0xa508f(0x1a2)]);return this[_0xa508f(0x144)](_0x32a729,_0x54a72f);}catch(_0x4564b1){this[_0xa508f(0x164)]?.[_0xa508f(0x17e)]('Failed\x20to\x20parse\x20checkov\x20output',{'error':_0x4564b1[_0xa508f(0x192)]});}return this['logger']?.[_0xa508f(0x17e)]('checkov\x20validation\x20failed',{'error':_0x1b304b['message']}),[];}}['parseCheckovResults'](_0x7cb4e0,_0x1b512b){const _0x45d67b=a0_0x4d3ea4,_0xabe313=[];if(_0x7cb4e0[_0x45d67b(0x195)]&&_0x7cb4e0['results']['failed_checks'])for(const _0x57bb6d of _0x7cb4e0['results'][_0x45d67b(0x147)]){_0xabe313['push']({'file':_0x1b512b,'line':_0x57bb6d['file_line_range']?_0x57bb6d['file_line_range'][0x0]:0x1,'column':0x1,'severity':this['mapCheckovSeverity'](_0x57bb6d['check_class']),'rule':_0x57bb6d['check_id'],'message':_0x57bb6d[_0x45d67b(0x17f)]||_0x57bb6d[_0x45d67b(0x157)],'category':_0x45d67b(0x149),'validator':'checkov','remediation':_0x57bb6d['guideline'],'cwe':_0x57bb6d['cwe'],'references':_0x57bb6d[_0x45d67b(0x184)]?[_0x57bb6d['guideline']]:[]});}return _0xabe313;}async['validatePackageJson'](_0x447844,_0x523a18={}){const _0x23937a=a0_0x4d3ea4;try{const _0x23c8a6=(await import('ajv'))['default'],_0x463e59=(await import('ajv-formats'))[_0x23937a(0x148)],_0x1a258e=await a0_0x2062e9[_0x23937a(0x17b)](_0x447844,_0x23937a(0x191)),_0x5ed360=JSON['parse'](_0x1a258e),_0x58902d=new _0x23c8a6({'allErrors':!![],'strict':![]});_0x463e59(_0x58902d);const _0x3cf7a6={'type':'object','required':[_0x23937a(0x135),'version'],'properties':{'name':{'type':'string','pattern':'^(?:@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$'},'version':{'type':'string'},'description':{'type':'string'},'main':{'type':'string'},'type':{'type':_0x23937a(0x139),'enum':['module','commonjs']},'scripts':{'type':_0x23937a(0x13f)},'dependencies':{'type':'object'},'devDependencies':{'type':'object'}},'additionalProperties':!![]},_0x14bdb4=_0x58902d[_0x23937a(0x193)](_0x3cf7a6),_0x12565d=_0x14bdb4(_0x5ed360);if(!_0x12565d&&_0x14bdb4['errors'])return _0x14bdb4['errors'][_0x23937a(0x14f)](_0xc279db=>({'file':_0x447844,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['ERROR'],'rule':'json-schema','message':_0xc279db['instancePath']?_0xc279db[_0x23937a(0x1a0)]+'\x20'+_0xc279db[_0x23937a(0x192)]:_0x23937a(0x19f)+_0xc279db[_0x23937a(0x14d)][_0x23937a(0x152)]+'\x27','category':'validation','validator':'json-schema'}));return[];}catch(_0x21dcd5){return this['logger']?.['error']('package.json\x20validation\x20failed',{'error':_0x21dcd5['message']}),[{'file':_0x447844,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x23937a(0x197)]['ERROR'],'rule':_0x23937a(0x16f),'message':_0x23937a(0x159)+_0x21dcd5[_0x23937a(0x192)],'category':_0x23937a(0x158),'validator':_0x23937a(0x16f)}];}}async['validateTsConfig'](_0xdecc0c,_0x1d52c4={}){const _0x3613ec=a0_0x4d3ea4;try{const _0x48ce47=await a0_0x2062e9['readFile'](_0xdecc0c,_0x3613ec(0x191)),_0x42ee98=JSON['parse'](_0x48ce47),_0x1898c8=[];if(_0x42ee98['compilerOptions']){const _0x29b447=_0x42ee98['compilerOptions'];!_0x29b447['strict']&&_0x1898c8[_0x3613ec(0x15b)]({'file':_0xdecc0c,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x3613ec(0x197)][_0x3613ec(0x161)],'rule':_0x3613ec(0x1a1),'message':'Consider\x20enabling\x20\x22strict\x22\x20mode\x20for\x20better\x20type\x20safety','category':'best-practice','validator':'tsconfig-validator'}),_0x29b447[_0x3613ec(0x177)]===![]&&_0x1898c8['push']({'file':_0xdecc0c,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x3613ec(0x197)][_0x3613ec(0x161)],'rule':'no-implicit-any','message':'Disabling\x20noImplicitAny\x20reduces\x20type\x20safety','category':_0x3613ec(0x165),'validator':_0x3613ec(0x153)});}return _0x1898c8;}catch(_0x4f778b){return this['logger']?.['error']('tsconfig.json\x20validation\x20failed',{'error':_0x4f778b[_0x3613ec(0x192)]}),[{'file':_0xdecc0c,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x3613ec(0x197)]['ERROR'],'rule':_0x3613ec(0x16f),'message':_0x3613ec(0x159)+_0x4f778b[_0x3613ec(0x192)],'category':'syntax','validator':_0x3613ec(0x16f)}];}}async[a0_0x4d3ea4(0x162)](_0x5d63ea,_0x29eb24={}){const _0x181f42=a0_0x4d3ea4;try{const _0x4bd782=await a0_0x2062e9['readFile'](_0x5d63ea,_0x181f42(0x191)),_0x2a9b3d=[],_0x214ea4=_0x4bd782['split']('\x0a'),_0x5d3f19=[{'pattern':/password|passwd|pwd/i,'name':'password'},{'pattern':/api[_-]?key/i,'name':'API\x20key'},{'pattern':/secret/i,'name':'secret'},{'pattern':/token/i,'name':_0x181f42(0x16b)},{'pattern':/private[_-]?key/i,'name':'private\x20key'},{'pattern':/aws[_-]?access/i,'name':_0x181f42(0x13d)}];return _0x214ea4['forEach']((_0x4b39ce,_0x2bf55b)=>{const _0x178e87=_0x181f42,_0x2f900a=_0x4b39ce['trim']();if(!_0x2f900a||_0x2f900a['startsWith']('#'))return;if(_0x2f900a[_0x178e87(0x17c)]('=')){const [_0x5e542b,_0x59f497]=_0x2f900a['split']('='),_0x45b176=_0x5e542b[_0x178e87(0x168)](),_0xe1d433=_0x59f497?.['trim']()||'',_0x33bfa8=_0xe1d433&&_0xe1d433!==''&&!_0xe1d433['startsWith']('$')&&_0xe1d433!==_0x178e87(0x176)&&_0xe1d433!=='changeme'&&_0xe1d433['length']>0x5;if(_0x33bfa8)for(const {pattern:_0x573f37,name:_0x2de40f}of _0x5d3f19){if(_0x573f37[_0x178e87(0x154)](_0x45b176)){_0x2a9b3d['push']({'file':_0x5d63ea,'line':_0x2bf55b+0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['CRITICAL'],'rule':'hardcoded-secret','message':_0x178e87(0x146)+_0x2de40f+'\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;}}}}),_0x2a9b3d;}catch(_0x4aa7eb){return this['logger']?.['error']('.env\x20validation\x20failed',{'error':_0x4aa7eb['message']}),[];}}['detectFileType'](_0x1965b6){const _0x56c77f=a0_0x4d3ea4,_0xdaa9f5=a0_0x4adbeb['basename'](_0x1965b6)[_0x56c77f(0x168)](),_0x5b705c=a0_0x4adbeb['dirname'](_0x1965b6);if(_0xdaa9f5===_0x56c77f(0x142))return _0x56c77f(0x142);if(_0xdaa9f5===_0x56c77f(0x145)||_0xdaa9f5==='docker-compose.yaml')return'docker-compose';if(_0xdaa9f5==='package.json')return'package.json';if(_0xdaa9f5===_0x56c77f(0x13a))return'tsconfig.json';if(_0xdaa9f5==='.env'||_0xdaa9f5[_0x56c77f(0x18f)]('.env'))return _0x56c77f(0x13b);if(_0x5b705c['includes']('.github/workflows'))return'github-actions';if(_0x5b705c[_0x56c77f(0x17c)]('kubernetes')||_0x5b705c['includes']('k8s'))return _0x56c77f(0x16d);const _0x8fe64e=a0_0x4adbeb[_0x56c77f(0x19b)](_0x1965b6)[_0x56c77f(0x168)]();if(_0x8fe64e==='.tf'||_0x8fe64e==='.tfvars')return _0x56c77f(0x174);if(_0x8fe64e===_0x56c77f(0x181)||_0x8fe64e===_0x56c77f(0x196))return'yaml';if(_0x8fe64e==='.json')return _0x56c77f(0x1a5);return'unknown';}[a0_0x4d3ea4(0x18e)](_0x15d87d){const _0xd82e1=a0_0x4d3ea4;return _0x15d87d[_0xd82e1(0x14f)](_0x17a8a4=>({'file':_0x17a8a4[_0xd82e1(0x1a4)],'line':_0x17a8a4[_0xd82e1(0x166)]||0x1,'column':_0x17a8a4['column']||0x1,'severity':_0x17a8a4['severity']||STATIC_ANALYSIS['SEVERITY'][_0xd82e1(0x161)],'rule':_0x17a8a4['rule']||_0xd82e1(0x16e),'message':_0x17a8a4['message']||_0xd82e1(0x136),'category':_0x17a8a4['category']||_0xd82e1(0x15a),'validator':_0x17a8a4['validator'],'cwe':_0x17a8a4['cwe']||null,'remediation':_0x17a8a4[_0xd82e1(0x172)]||null,'references':_0x17a8a4[_0xd82e1(0x180)]||[]}));}['mapHadolintSeverity'](_0x31aaec){const _0x123077=a0_0x4d3ea4,_0x2682a4={'error':STATIC_ANALYSIS[_0x123077(0x197)]['ERROR'],'warning':STATIC_ANALYSIS['SEVERITY'][_0x123077(0x161)],'info':STATIC_ANALYSIS['SEVERITY'][_0x123077(0x182)],'style':STATIC_ANALYSIS['SEVERITY'][_0x123077(0x182)]};return _0x2682a4[_0x31aaec?.[_0x123077(0x168)]()]||STATIC_ANALYSIS[_0x123077(0x197)]['WARNING'];}[a0_0x4d3ea4(0x178)](_0x35e476){const _0x2c8ef5=a0_0x4d3ea4,_0x423211={'error':STATIC_ANALYSIS['SEVERITY']['ERROR'],'warning':STATIC_ANALYSIS[_0x2c8ef5(0x197)]['WARNING']};return _0x423211[_0x35e476?.[_0x2c8ef5(0x168)]()]||STATIC_ANALYSIS[_0x2c8ef5(0x197)]['WARNING'];}[a0_0x4d3ea4(0x14b)](_0x4e3581){const _0x20091e=a0_0x4d3ea4;return STATIC_ANALYSIS[_0x20091e(0x197)]['ERROR'];}async[a0_0x4d3ea4(0x17a)](){const _0x4f4750=a0_0x4d3ea4,_0x36d229=await this['detectAvailableValidators']();return{'validators':_0x36d229,'recommendations':this[_0x4f4750(0x170)](_0x36d229)};}[a0_0x4d3ea4(0x170)](_0x29bd6d){const _0x5afeab=a0_0x4d3ea4,_0x1105a8=[];return!_0x29bd6d[_0x5afeab(0x15c)]&&_0x1105a8[_0x5afeab(0x15b)]({'validator':_0x5afeab(0x15c),'reason':'Infrastructure\x20as\x20Code\x20security\x20scanning\x20(Docker,\x20Kubernetes,\x20Terraform)','install':'pip\x20install\x20checkov','priority':'high'}),!_0x29bd6d['hadolint']&&_0x1105a8['push']({'validator':'hadolint','reason':'Dockerfile\x20linting\x20and\x20best\x20practices','install':'Download from https://github.com/hadolint/hadolint/releases','priority':_0x5afeab(0x14a)}),!_0x29bd6d[_0x5afeab(0x175)]&&_0x1105a8[_0x5afeab(0x15b)]({'validator':_0x5afeab(0x175),'reason':'YAML\x20file\x20validation','install':'pip\x20install\x20yamllint','priority':_0x5afeab(0x187)}),!_0x29bd6d['jsonSchema']&&_0x1105a8['push']({'validator':_0x5afeab(0x140),'reason':'JSON\x20configuration\x20validation','install':'npm\x20install\x20ajv\x20ajv-formats','priority':'medium'}),_0x1105a8;}}export default ConfigValidator;
@@ -1 +1 @@
1
- const a0_0x3eb262=a0_0x242b;(function(_0x65d2d7,_0x33e70f){const _0x339f94=a0_0x242b,_0x13d422=_0x65d2d7();while(!![]){try{const _0x3259bc=parseInt(_0x339f94(0xcc))/0x1+-parseInt(_0x339f94(0xf9))/0x2+-parseInt(_0x339f94(0xf4))/0x3*(-parseInt(_0x339f94(0xf3))/0x4)+-parseInt(_0x339f94(0xe2))/0x5*(parseInt(_0x339f94(0xf0))/0x6)+-parseInt(_0x339f94(0xdb))/0x7*(-parseInt(_0x339f94(0xed))/0x8)+-parseInt(_0x339f94(0xe1))/0x9+-parseInt(_0x339f94(0xeb))/0xa*(-parseInt(_0x339f94(0xc6))/0xb);if(_0x3259bc===_0x33e70f)break;else _0x13d422['push'](_0x13d422['shift']());}catch(_0x2c852f){_0x13d422['push'](_0x13d422['shift']());}}}(a0_0x47e7,0x30c44));import{ESLint}from'eslint';import a0_0x153a1b from'path';import a0_0x3b0846 from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';function a0_0x242b(_0x15d009,_0x43bab4){_0x15d009=_0x15d009-0xbb;const _0x47e725=a0_0x47e7();let _0x242bb6=_0x47e725[_0x15d009];if(a0_0x242b['aCSMXG']===undefined){var _0x2c7638=function(_0x525ecf){const _0x31b18b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x153a1b='',_0x3b0846='';for(let _0x32d746=0x0,_0x2f48fd,_0x4da21f,_0x3c3853=0x0;_0x4da21f=_0x525ecf['charAt'](_0x3c3853++);~_0x4da21f&&(_0x2f48fd=_0x32d746%0x4?_0x2f48fd*0x40+_0x4da21f:_0x4da21f,_0x32d746++%0x4)?_0x153a1b+=String['fromCharCode'](0xff&_0x2f48fd>>(-0x2*_0x32d746&0x6)):0x0){_0x4da21f=_0x31b18b['indexOf'](_0x4da21f);}for(let _0x50858a=0x0,_0x1a9889=_0x153a1b['length'];_0x50858a<_0x1a9889;_0x50858a++){_0x3b0846+='%'+('00'+_0x153a1b['charCodeAt'](_0x50858a)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3b0846);};a0_0x242b['ZtHMKa']=_0x2c7638,a0_0x242b['xVSyPx']={},a0_0x242b['aCSMXG']=!![];}const _0x3e21f2=_0x47e725[0x0],_0x157e49=_0x15d009+_0x3e21f2,_0x4bfa1e=a0_0x242b['xVSyPx'][_0x157e49];return!_0x4bfa1e?(_0x242bb6=a0_0x242b['ZtHMKa'](_0x242bb6),a0_0x242b['xVSyPx'][_0x157e49]=_0x242bb6):_0x242bb6=_0x4bfa1e,_0x242bb6;}class ESLintAnalyzer{constructor(_0x32d746=null){const _0x273e02=a0_0x242b;this[_0x273e02(0xc3)]=_0x32d746,this[_0x273e02(0xfb)]=new Map();}async['analyze'](_0x2f48fd,_0x4da21f,_0x3c3853={}){const _0x5420f4=a0_0x242b;try{const _0x50858a=await this['getESLintInstance'](_0x3c3853),_0x1a9889=await _0x50858a[_0x5420f4(0xf8)](_0x4da21f,{'filePath':_0x2f48fd,'warnIgnored':![]}),_0x40f948=[];if(_0x1a9889&&_0x1a9889[_0x5420f4(0xf5)]>0x0){const _0x36ff0f=_0x1a9889[0x0];for(const _0x58032f of _0x36ff0f['messages']){_0x40f948[_0x5420f4(0xdf)](this[_0x5420f4(0xee)](_0x58032f,_0x2f48fd));}}return this['logger']?.[_0x5420f4(0xf7)]('ESLint\x20analysis\x20completed',{'file':_0x2f48fd,'totalDiagnostics':_0x40f948[_0x5420f4(0xf5)],'errors':_0x40f948[_0x5420f4(0xfa)](_0x318b4f=>_0x318b4f[_0x5420f4(0xcd)]===STATIC_ANALYSIS['SEVERITY']['ERROR'])[_0x5420f4(0xf5)],'warnings':_0x40f948[_0x5420f4(0xfa)](_0x12e047=>_0x12e047['severity']===STATIC_ANALYSIS['SEVERITY']['WARNING'])['length']}),_0x40f948;}catch(_0x4446b9){return this[_0x5420f4(0xc3)]?.[_0x5420f4(0xc5)]('ESLint\x20analysis\x20failed',{'file':_0x2f48fd,'error':_0x4446b9['message']}),[];}}async['fix'](_0x46f4be,_0x283d44,_0x51d29a={}){const _0x1f40e3=a0_0x242b;try{const _0x57fa14=await this['getESLintInstance']({..._0x51d29a,'fix':!![]}),_0x9fd983=await _0x57fa14['lintText'](_0x283d44,{'filePath':_0x46f4be,'warnIgnored':![]});if(_0x9fd983&&_0x9fd983[_0x1f40e3(0xf5)]>0x0){const _0x3650d4=_0x9fd983[0x0];return{'fixed':_0x3650d4[_0x1f40e3(0xd3)]!==undefined,'content':_0x3650d4['output']||_0x283d44,'fixedCount':_0x3650d4[_0x1f40e3(0xbb)]+_0x3650d4['fixableWarningCount'],'remainingErrors':_0x3650d4['errorCount']-_0x3650d4['fixableErrorCount'],'remainingWarnings':_0x3650d4['warningCount']-_0x3650d4[_0x1f40e3(0xe0)],'changes':_0x3650d4[_0x1f40e3(0xd3)]?this['describeChanges'](_0x283d44,_0x3650d4[_0x1f40e3(0xd3)]):[]};}return{'fixed':![],'content':_0x283d44,'fixedCount':0x0,'remainingErrors':0x0,'remainingWarnings':0x0,'changes':[]};}catch(_0x30ff34){this['logger']?.[_0x1f40e3(0xc5)](_0x1f40e3(0xbd),{'file':_0x46f4be,'error':_0x30ff34['message']});throw new Error('ESLint\x20fix\x20failed:\x20'+_0x30ff34[_0x1f40e3(0xe5)]);}}async[a0_0x3eb262(0xd2)](_0x2e67c7={}){const {workingDir:_0x2ff928,fix:fix=![],framework:_0xcf755c}=_0x2e67c7,_0x309e96=await this['getESLintConfig'](_0x2ff928,_0xcf755c),_0x2a530b=new ESLint({'fix':fix,'useEslintrc':!![],'overrideConfig':_0x309e96,'errorOnUnmatchedPattern':![]});return _0x2a530b;}async[a0_0x3eb262(0xd6)](_0x531606,_0x30eefb){const _0x491f8b=a0_0x3eb262,_0xe2f361={'env':{'browser':!![],'es2021':!![],'node':!![]},'parserOptions':{'ecmaVersion':'latest','sourceType':_0x491f8b(0xe7)},'rules':{'no-unused-vars':'warn','no-undef':_0x491f8b(0xc5),'no-console':'off','semi':['warn',_0x491f8b(0xef)],'quotes':[_0x491f8b(0xde),_0x491f8b(0xe6),{'avoidEscape':!![]}]}};if(_0x30eefb==='react')_0xe2f361[_0x491f8b(0xe8)]=[_0x491f8b(0xc2)],_0xe2f361[_0x491f8b(0xc1)][_0x491f8b(0xd5)]={'jsx':!![]},_0xe2f361['settings']={'react':{'version':_0x491f8b(0xd0)}};else _0x30eefb==='vue'?_0xe2f361[_0x491f8b(0xe8)]=['eslint:recommended']:_0xe2f361['extends']=[_0x491f8b(0xc2)];if(_0x531606){const _0x290170=[_0x491f8b(0xea),_0x491f8b(0xd4),'.eslintrc.json','eslint.config.js'];for(const _0x54799f of _0x290170){try{const _0x54b803=a0_0x153a1b[_0x491f8b(0xf2)](_0x531606,_0x54799f);return await a0_0x3b0846[_0x491f8b(0xc8)](_0x54b803),this['logger']?.['debug']('Found\x20ESLint\x20config',{'configFile':_0x54799f}),{};}catch{}}}return _0xe2f361;}[a0_0x3eb262(0xee)](_0x2fa4a3,_0x4dfa3c){const _0xfa29d3=a0_0x3eb262;return{'file':_0x4dfa3c,'line':_0x2fa4a3[_0xfa29d3(0xdd)]||0x1,'column':_0x2fa4a3[_0xfa29d3(0xd8)]||0x1,'endLine':_0x2fa4a3[_0xfa29d3(0xcb)],'endColumn':_0x2fa4a3[_0xfa29d3(0xe3)],'severity':_0x2fa4a3[_0xfa29d3(0xcd)]===0x2?STATIC_ANALYSIS['SEVERITY']['ERROR']:STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':_0x2fa4a3[_0xfa29d3(0xda)]||'eslint','message':_0x2fa4a3[_0xfa29d3(0xe5)],'category':this['categorizeRule'](_0x2fa4a3['ruleId']),'fixable':_0x2fa4a3['fix']!==undefined,'source':'eslint'};}[a0_0x3eb262(0xdc)](_0x23870f){const _0x3a4d4f=a0_0x3eb262;if(!_0x23870f)return STATIC_ANALYSIS['CATEGORY'][_0x3a4d4f(0xc4)];if(_0x23870f['includes']('security')||_0x23870f['includes'](_0x3a4d4f(0xc7))||_0x23870f===_0x3a4d4f(0xc9)||_0x23870f===_0x3a4d4f(0xd9))return STATIC_ANALYSIS['CATEGORY'][_0x3a4d4f(0xd1)];if(_0x23870f['includes'](_0x3a4d4f(0xca))||_0x23870f==='no-await-in-loop'||_0x23870f===_0x3a4d4f(0xcf))return STATIC_ANALYSIS[_0x3a4d4f(0xe9)][_0x3a4d4f(0xd7)];if(_0x23870f['includes']('import')||_0x23870f==='no-undef')return STATIC_ANALYSIS[_0x3a4d4f(0xe9)]['IMPORT'];if(_0x23870f[_0x3a4d4f(0xfc)](_0x3a4d4f(0xbc))||_0x23870f==='no-unused-vars'||_0x23870f==='no-unreachable'||_0x23870f==='no-var')return STATIC_ANALYSIS[_0x3a4d4f(0xe9)][_0x3a4d4f(0xbe)];return STATIC_ANALYSIS['CATEGORY'][_0x3a4d4f(0xc4)];}[a0_0x3eb262(0xbf)](_0x4eb19b,_0x45ea75){const _0x39877a=a0_0x3eb262,_0x1bae27=[],_0x42bf02=_0x4eb19b['split']('\x0a'),_0x43606c=_0x45ea75['split']('\x0a'),_0x58ec9f=Math['max'](_0x42bf02[_0x39877a(0xf5)],_0x43606c[_0x39877a(0xf5)]);for(let _0x37fa22=0x0;_0x37fa22<_0x58ec9f;_0x37fa22++){const _0x415804=_0x42bf02[_0x37fa22]||'',_0x3dcf42=_0x43606c[_0x37fa22]||'';_0x415804!==_0x3dcf42&&_0x1bae27[_0x39877a(0xdf)]({'line':_0x37fa22+0x1,'type':_0x415804&&_0x3dcf42?'modified':_0x415804?'removed':_0x39877a(0xec),'original':_0x415804,'fixed':_0x3dcf42});}return _0x1bae27;}[a0_0x3eb262(0xf6)](){const _0x485e8e=a0_0x3eb262;return[_0x485e8e(0xf1),_0x485e8e(0xe4),_0x485e8e(0xc0),_0x485e8e(0xce)];}['supportsAutoFix'](){return!![];}}export default ESLintAnalyzer;function a0_0x47e7(){const _0x4935e9=['lMnQCW','ChjLzMvYlxbYB21PC2uTCMvQzwn0lwvYCM9YCW','zgv0zwn0','u0vdvvjjvfK','z2v0rvnmAw50sw5ZDgfUy2u','B3v0Chv0','lMvZBgLUDhjJlMnQCW','zwnTyuzLyxr1CMvZ','z2v0rvnmAw50q29UzMLN','uevsrK9stufoq0u','y29SDw1U','BM8TAw1WBgLLzc1LDMfS','CNvSzuLK','mteZodyYz25WBenA','y2f0zwDVCML6zvj1Bgu','BgLUzq','D2fYBG','ChvZAa','zML4ywjSzvDHCM5PBMDdB3vUDa','mJe1mtaWmevQCM5Juq','nJG2ndb4Du5tufy','zw5Kq29SDw1U','lMPZEa','BwvZC2fNzq','C2LUz2XL','Bw9KDwXL','zxH0zw5KCW','q0furuDpuLK','lMvZBgLUDhjJlMPZ','ndiXnZe3mgHHuNbkwG','ywrKzwq','mtzrs2T5sey','zM9YBwf0twvZC2fNzq','ywX3yxLZ','nJzsAuHKyvK','lMPZ','AM9PBG','mtjwz0rlvwy','mte5ote2v0ftyKLn','BgvUz3rO','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','zgvIDwC','BgLUDfrLEhq','ntm2nda0C21pzMHl','zMLSDgvY','zxnSAw50q2fJAgu','Aw5JBhvKzxm','zML4ywjSzuvYCM9Yq291BNq','yMvZDc1WCMfJDgLJzxm','rvnmAw50igzPEcbMywLSzwq','qKvtvf9quKfdveLdrq','zgvZy3jPyMvdAgfUz2vZ','lM1QCW','CgfYC2vYt3b0Aw9UCW','zxnSAw50oNjLy29TBwvUzgvK','Bg9Nz2vY','u1rzteu','zxjYB3i','mtfcwgHcz00','EhnZ','ywnJzxnZ','BM8TzxzHBa','CgvYzM9YBwfUy2u','zw5KtgLUzq','mJGZnZKZD0rLC2rn','C2v2zxjPDhK'];a0_0x47e7=function(){return _0x4935e9;};return a0_0x47e7();}
1
+ const a0_0x3af43e=a0_0x592a;function a0_0x592a(_0x1a9749,_0x3968d3){_0x1a9749=_0x1a9749-0x1a6;const _0x503615=a0_0x5036();let _0x592ae3=_0x503615[_0x1a9749];if(a0_0x592a['sRjKBr']===undefined){var _0x3b9f51=function(_0x19443a){const _0x5ad55a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4313bf='',_0x538ec5='';for(let _0x14aa5d=0x0,_0x50c85c,_0x3fb552,_0x410d07=0x0;_0x3fb552=_0x19443a['charAt'](_0x410d07++);~_0x3fb552&&(_0x50c85c=_0x14aa5d%0x4?_0x50c85c*0x40+_0x3fb552:_0x3fb552,_0x14aa5d++%0x4)?_0x4313bf+=String['fromCharCode'](0xff&_0x50c85c>>(-0x2*_0x14aa5d&0x6)):0x0){_0x3fb552=_0x5ad55a['indexOf'](_0x3fb552);}for(let _0xc77d51=0x0,_0x356cbd=_0x4313bf['length'];_0xc77d51<_0x356cbd;_0xc77d51++){_0x538ec5+='%'+('00'+_0x4313bf['charCodeAt'](_0xc77d51)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x538ec5);};a0_0x592a['caBIRm']=_0x3b9f51,a0_0x592a['ozYLcn']={},a0_0x592a['sRjKBr']=!![];}const _0x501e57=_0x503615[0x0],_0xc4298f=_0x1a9749+_0x501e57,_0x5692f5=a0_0x592a['ozYLcn'][_0xc4298f];return!_0x5692f5?(_0x592ae3=a0_0x592a['caBIRm'](_0x592ae3),a0_0x592a['ozYLcn'][_0xc4298f]=_0x592ae3):_0x592ae3=_0x5692f5,_0x592ae3;}(function(_0x159dff,_0x4e0532){const _0x2e8d2a=a0_0x592a,_0x29a710=_0x159dff();while(!![]){try{const _0x28661f=parseInt(_0x2e8d2a(0x1c7))/0x1*(parseInt(_0x2e8d2a(0x1ac))/0x2)+-parseInt(_0x2e8d2a(0x1cd))/0x3+parseInt(_0x2e8d2a(0x1c9))/0x4+parseInt(_0x2e8d2a(0x1c5))/0x5+parseInt(_0x2e8d2a(0x1cc))/0x6*(-parseInt(_0x2e8d2a(0x1da))/0x7)+parseInt(_0x2e8d2a(0x1d1))/0x8*(-parseInt(_0x2e8d2a(0x1c1))/0x9)+parseInt(_0x2e8d2a(0x1dc))/0xa;if(_0x28661f===_0x4e0532)break;else _0x29a710['push'](_0x29a710['shift']());}catch(_0x304d1a){_0x29a710['push'](_0x29a710['shift']());}}}(a0_0x5036,0x4f6b3));import{ESLint}from'eslint';import a0_0x4313bf from'path';function a0_0x5036(){const _0x50ea80=['nJK3nJeYzgvqrg9f','yw5HBhL6zq','rvnmAw50igfUywX5C2LZigzHAwXLza','nLHssvPjCq','mtqZmJG3mM1bExLpAq','zw5Kq29SDw1U','C2vJDxjPDhK','ywnJzxnZ','oduYmhLoA2vrCG','B3v0Chv0','lMvZBgLUDhjJlMPZ','D2fYBG','lMvZBgLUDhjJlMnQCW','ywrKzwq','rvnmAw50igzPEcbMywLSzwq6ia','zw5KtgLUzq','lMPZ','mZCYntC1C1n0ENbP','zxnSAw50oNjLy29TBwvUzgvK','mZiZndy1mg1PBev5Dq','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','u0vdvvjjvfK','uevsrK9stufoq0u','Bg9Nz2vY','zML4','BwvZC2fNzq','zgvIDwC','AM9PBG','lM1QCW','Bgf0zxn0','zML4ywjSzuvYCM9Yq291BNq','rM91BMqGrvnmAw50ignVBMzPzW','Bw9KAwzPzwq','mtbkr2Lmque','v0fstKLorW','zML4ywjSzvDHCM5PBMDdB3vUDa','BwvZC2fNzxm','u0vwrvjjvfK','zgv0zwn0','C2v0DgLUz3m','rvnmAw50igzPEcbMywLSzwq','qKvtvf9quKfdveLdrq','lMPZEa','yMvZDc1WCMfJDgLJzxm','BgLUDfrLEhq','su1qt1ju','ChjLzMvYlxbYB21PC2uTCMvQzwn0lwvYCM9YCW','BgvUz3rO','CNvSzuLK','lMvZBgLUDhjJlMPZB24','zxjYB3i','q0furuDpuLK','C2v2zxjPDhK','Aw5JBhvKzxm','ndiZmfrPthruyq','zxH0zw5KCW','z2v0rvnmAw50sw5ZDgfUy2u','CMvTB3zLza','mZaWnZa3nwrdzwThvW','Bwf4','nte0odnrweL4sLK','C3bSAxq'];a0_0x5036=function(){return _0x50ea80;};return a0_0x5036();}import a0_0x538ec5 from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';class ESLintAnalyzer{constructor(_0x14aa5d=null){this['logger']=_0x14aa5d,this['eslintCache']=new Map();}async[a0_0x3af43e(0x1ca)](_0x50c85c,_0x3fb552,_0x410d07={}){const _0x358d92=a0_0x3af43e;try{const _0xc77d51=await this[_0x358d92(0x1c3)](_0x410d07),_0x356cbd=await _0xc77d51[_0x358d92(0x1b7)](_0x3fb552,{'filePath':_0x50c85c,'warnIgnored':![]}),_0x5d1288=[];if(_0x356cbd&&_0x356cbd['length']>0x0){const _0x33d612=_0x356cbd[0x0];for(const _0x1c8595 of _0x33d612[_0x358d92(0x1af)]){_0x5d1288['push'](this['formatMessage'](_0x1c8595,_0x50c85c));}}return this[_0x358d92(0x1e0)]?.['debug']('ESLint\x20analysis\x20completed',{'file':_0x50c85c,'totalDiagnostics':_0x5d1288[_0x358d92(0x1ba)],'errors':_0x5d1288['filter'](_0x3237be=>_0x3237be[_0x358d92(0x1bf)]===STATIC_ANALYSIS[_0x358d92(0x1b0)]['ERROR'])['length'],'warnings':_0x5d1288['filter'](_0x4f1ab7=>_0x4f1ab7[_0x358d92(0x1bf)]===STATIC_ANALYSIS[_0x358d92(0x1b0)][_0x358d92(0x1ad)])[_0x358d92(0x1ba)]}),_0x5d1288;}catch(_0x278b8a){return this[_0x358d92(0x1e0)]?.[_0x358d92(0x1bd)](_0x358d92(0x1cb),{'file':_0x50c85c,'error':_0x278b8a[_0x358d92(0x1e2)]}),[];}}async[a0_0x3af43e(0x1e1)](_0xe70c7e,_0x5ef0c4,_0x3fed17={}){const _0x341aaf=a0_0x3af43e;try{const _0x463a67=await this[_0x341aaf(0x1c3)]({..._0x3fed17,'fix':!![]}),_0x16e006=await _0x463a67['lintText'](_0x5ef0c4,{'filePath':_0xe70c7e,'warnIgnored':![]});if(_0x16e006&&_0x16e006[_0x341aaf(0x1ba)]>0x0){const _0x209608=_0x16e006[0x0];return{'fixed':_0x209608[_0x341aaf(0x1d2)]!==undefined,'content':_0x209608[_0x341aaf(0x1d2)]||_0x5ef0c4,'fixedCount':_0x209608['fixableErrorCount']+_0x209608[_0x341aaf(0x1ae)],'remainingErrors':_0x209608['errorCount']-_0x209608[_0x341aaf(0x1a9)],'remainingWarnings':_0x209608['warningCount']-_0x209608[_0x341aaf(0x1ae)],'changes':_0x209608['output']?this['describeChanges'](_0x5ef0c4,_0x209608[_0x341aaf(0x1d2)]):[]};}return{'fixed':![],'content':_0x5ef0c4,'fixedCount':0x0,'remainingErrors':0x0,'remainingWarnings':0x0,'changes':[]};}catch(_0x185bb8){this['logger']?.['error'](_0x341aaf(0x1b3),{'file':_0xe70c7e,'error':_0x185bb8[_0x341aaf(0x1e2)]});throw new Error(_0x341aaf(0x1d7)+_0x185bb8[_0x341aaf(0x1e2)]);}}async[a0_0x3af43e(0x1c3)](_0x5e83f1={}){const {workingDir:_0xd391fc,fix:fix=![],framework:_0x10c744}=_0x5e83f1,_0x3ae15f=await this['getESLintConfig'](_0xd391fc,_0x10c744),_0x3765c1=new ESLint({'fix':fix,'useEslintrc':!![],'overrideConfig':_0x3ae15f,'errorOnUnmatchedPattern':![]});return _0x3765c1;}async['getESLintConfig'](_0x2687db,_0x1a8701){const _0x5717c6=a0_0x3af43e,_0x2513c5={'env':{'browser':!![],'es2021':!![],'node':!![]},'parserOptions':{'ecmaVersion':_0x5717c6(0x1a8),'sourceType':'module'},'rules':{'no-unused-vars':'warn','no-undef':_0x5717c6(0x1bd),'no-console':'off','semi':['warn','always'],'quotes':[_0x5717c6(0x1d4),'single',{'avoidEscape':!![]}]}};if(_0x1a8701==='react')_0x2513c5['extends']=['eslint:recommended'],_0x2513c5['parserOptions']['ecmaFeatures']={'jsx':!![]},_0x2513c5[_0x5717c6(0x1b2)]={'react':{'version':_0x5717c6(0x1b1)}};else _0x1a8701==='vue'?_0x2513c5[_0x5717c6(0x1c2)]=[_0x5717c6(0x1db)]:_0x2513c5['extends']=[_0x5717c6(0x1db)];if(_0x2687db){const _0x578d57=[_0x5717c6(0x1d3),_0x5717c6(0x1d5),_0x5717c6(0x1bc),'eslint.config.js'];for(const _0x40ea24 of _0x578d57){try{const _0x11790f=a0_0x4313bf[_0x5717c6(0x1a6)](_0x2687db,_0x40ea24);return await a0_0x538ec5[_0x5717c6(0x1d0)](_0x11790f),this[_0x5717c6(0x1e0)]?.[_0x5717c6(0x1e3)](_0x5717c6(0x1aa),{'configFile':_0x40ea24}),{};}catch{}}}return _0x2513c5;}['formatMessage'](_0x33ddb2,_0x498e2a){const _0x451d6e=a0_0x3af43e;return{'file':_0x498e2a,'line':_0x33ddb2['line']||0x1,'column':_0x33ddb2['column']||0x1,'endLine':_0x33ddb2[_0x451d6e(0x1d8)],'endColumn':_0x33ddb2[_0x451d6e(0x1ce)],'severity':_0x33ddb2['severity']===0x2?STATIC_ANALYSIS[_0x451d6e(0x1b0)]['ERROR']:STATIC_ANALYSIS['SEVERITY'][_0x451d6e(0x1ad)],'rule':_0x33ddb2[_0x451d6e(0x1bb)]||'eslint','message':_0x33ddb2['message'],'category':this['categorizeRule'](_0x33ddb2['ruleId']),'fixable':_0x33ddb2[_0x451d6e(0x1e1)]!==undefined,'source':'eslint'};}['categorizeRule'](_0x2bd876){const _0x2c4d81=a0_0x3af43e;if(!_0x2bd876)return STATIC_ANALYSIS['CATEGORY']['STYLE'];if(_0x2bd876['includes'](_0x2c4d81(0x1cf))||_0x2bd876[_0x2c4d81(0x1c0)]('xss')||_0x2bd876==='no-eval'||_0x2bd876==='no-implied-eval')return STATIC_ANALYSIS[_0x2c4d81(0x1be)][_0x2c4d81(0x1de)];if(_0x2bd876['includes']('performance')||_0x2bd876==='no-await-in-loop'||_0x2bd876===_0x2c4d81(0x1b9))return STATIC_ANALYSIS[_0x2c4d81(0x1be)][_0x2c4d81(0x1df)];if(_0x2bd876['includes']('import')||_0x2bd876==='no-undef')return STATIC_ANALYSIS['CATEGORY'][_0x2c4d81(0x1b8)];if(_0x2bd876['includes'](_0x2c4d81(0x1b6))||_0x2bd876==='no-unused-vars'||_0x2bd876==='no-unreachable'||_0x2bd876==='no-var')return STATIC_ANALYSIS['CATEGORY'][_0x2c4d81(0x1b4)];return STATIC_ANALYSIS['CATEGORY']['STYLE'];}['describeChanges'](_0x20f540,_0x54a2d0){const _0x8824b6=a0_0x3af43e,_0x1bbcab=[],_0x4ee41d=_0x20f540['split']('\x0a'),_0x589313=_0x54a2d0[_0x8824b6(0x1c8)]('\x0a'),_0x208046=Math[_0x8824b6(0x1c6)](_0x4ee41d['length'],_0x589313[_0x8824b6(0x1ba)]);for(let _0x41affe=0x0;_0x41affe<_0x208046;_0x41affe++){const _0x553b4c=_0x4ee41d[_0x41affe]||'',_0x2109b2=_0x589313[_0x41affe]||'';_0x553b4c!==_0x2109b2&&_0x1bbcab['push']({'line':_0x41affe+0x1,'type':_0x553b4c&&_0x2109b2?_0x8824b6(0x1ab):_0x553b4c?_0x8824b6(0x1c4):_0x8824b6(0x1d6),'original':_0x553b4c,'fixed':_0x2109b2});}return _0x1bbcab;}[a0_0x3af43e(0x1dd)](){const _0xd5a94f=a0_0x3af43e;return[_0xd5a94f(0x1d9),_0xd5a94f(0x1b5),_0xd5a94f(0x1a7),'.cjs'];}['supportsAutoFix'](){return!![];}}export default ESLintAnalyzer;