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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/README.md +7 -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 -0
  76. package/src/services/aiService.js +1 -1
  77. package/src/services/apiKeyManager.js +1 -1
  78. package/src/services/benchmarkService.js +1 -1
  79. package/src/services/budgetService.js +1 -1
  80. package/src/services/contextInjectionService.js +1 -1
  81. package/src/services/conversationCompactionService.js +1 -1
  82. package/src/services/errorHandler.js +1 -1
  83. package/src/services/fileAttachmentService.js +1 -1
  84. package/src/services/modelRouterService.js +1 -1
  85. package/src/services/modelsService.js +1 -1
  86. package/src/services/qualityInspector.js +1 -1
  87. package/src/services/tokenCountingService.js +1 -1
  88. package/src/tools/agentCommunicationTool.js +1 -1
  89. package/src/tools/agentDelayTool.js +1 -1
  90. package/src/tools/asyncToolManager.js +1 -1
  91. package/src/tools/baseTool.js +1 -1
  92. package/src/tools/browserTool.js +1 -1
  93. package/src/tools/cloneDetectionTool.js +1 -1
  94. package/src/tools/dependencyResolverTool.js +1 -1
  95. package/src/tools/fileContentReplaceTool.js +1 -1
  96. package/src/tools/fileSystemTool.js +1 -1
  97. package/src/tools/fileTreeTool.js +1 -1
  98. package/src/tools/imageTool.js +1 -1
  99. package/src/tools/importAnalyzerTool.js +1 -1
  100. package/src/tools/jobDoneTool.js +1 -1
  101. package/src/tools/seekTool.js +1 -1
  102. package/src/tools/staticAnalysisTool.js +1 -1
  103. package/src/tools/taskManagerTool.js +1 -1
  104. package/src/tools/terminalTool.js +1 -1
  105. package/src/tools/webTool.js +1 -1
  106. package/src/types/agent.js +1 -1
  107. package/src/types/contextReference.js +1 -1
  108. package/src/types/conversation.js +1 -1
  109. package/src/types/toolCommand.js +1 -1
  110. package/src/utilities/attachmentValidator.js +1 -1
  111. package/src/utilities/configManager.js +1 -1
  112. package/src/utilities/constants.js +1 -1
  113. package/src/utilities/directoryAccessManager.js +1 -1
  114. package/src/utilities/fileProcessor.js +1 -1
  115. package/src/utilities/logger.js +1 -1
  116. package/src/utilities/tagParser.js +1 -1
  117. package/src/utilities/toolConstants.js +1 -1
  118. package/src/utilities/userDataDir.js +1 -1
  119. package/web-ui/build/index.html +2 -2
  120. package/web-ui/build/static/index-CR8edPA3.js +348 -0
  121. package/web-ui/build/static/index-uN7nOVvZ.css +1 -0
  122. package/web-ui/build/static/index-DXN850Y2.js +0 -400
  123. package/web-ui/build/static/index-an-YRzUX.css +0 -1
package/README.md CHANGED
@@ -99,7 +99,7 @@ npm install -g @loxia-labs/loxia-autopilot-one
99
99
 
100
100
  ```bash
101
101
  loxia --version
102
- # Should display: Loxia Autopilot One v1.0.11
102
+ # Should display: Loxia Autopilot One v1.0.15
103
103
  ```
104
104
 
105
105
  ### 4. Create an API Key
@@ -202,8 +202,9 @@ Loxia comes with 18+ specialized tools that agents can use autonomously:
202
202
  | Tool | Description | Key Features |
203
203
  |------|-------------|--------------|
204
204
  | ⏸️ **Agent Delay** | Pause agent execution | Timed delays, background operation support |
205
- | ✅ **Job Done** | Task completion | Mark tasks complete, trigger workflows |
205
+ | ✅ **Job Done** | Task completion | Mark autonomous work complete, exit to chat mode |
206
206
  | 🔧 **Async Tool Manager** | Background task handling | Long-running operations, status tracking |
207
+ | 🔄 **Loop Detection** | Repetition prevention | Sliding window analysis, automatic termination |
207
208
 
208
209
  ---
209
210
 
@@ -368,7 +369,7 @@ Loxia automatically compacts long conversations to stay within token limits:
368
369
 
369
370
  ## 🛣️ Roadmap
370
371
 
371
- ### Current Version (1.0.11)
372
+ ### Current Version (1.0.15)
372
373
 
373
374
  - ✅ Multi-agent orchestration
374
375
  - ✅ 18+ specialized tools
@@ -376,6 +377,9 @@ Loxia automatically compacts long conversations to stay within token limits:
376
377
  - ✅ Conversation compaction
377
378
  - ✅ File attachments
378
379
  - ✅ Task management
380
+ - ✅ Centralized agent activity service
381
+ - ✅ Intelligent loop detection
382
+ - ✅ Persistent user data across npm updates
379
383
 
380
384
  ### Upcoming Features
381
385
 
package/bin/cli.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0xbede4f=a0_0x1417;(function(_0x1edeb3,_0x41efbd){const _0x4689af=a0_0x1417,_0x4b6977=_0x1edeb3();while(!![]){try{const _0x2c1c6d=parseInt(_0x4689af(0x10e))/0x1*(-parseInt(_0x4689af(0x122))/0x2)+parseInt(_0x4689af(0xfb))/0x3+-parseInt(_0x4689af(0xe8))/0x4*(parseInt(_0x4689af(0xe7))/0x5)+-parseInt(_0x4689af(0x11a))/0x6*(parseInt(_0x4689af(0xff))/0x7)+-parseInt(_0x4689af(0x121))/0x8*(-parseInt(_0x4689af(0x10b))/0x9)+parseInt(_0x4689af(0xf3))/0xa+parseInt(_0x4689af(0xe4))/0xb;if(_0x2c1c6d===_0x41efbd)break;else _0x4b6977['push'](_0x4b6977['shift']());}catch(_0x397cc9){_0x4b6977['push'](_0x4b6977['shift']());}}}(a0_0x1af8,0x2160d));import{fileURLToPath}from'url';import{dirname,join}from'path';import{spawn,exec}from'child_process';import{readFileSync}from'fs';function a0_0x1af8(){const _0x49242e=['destroy','\x0aLoxia\x20Autopilot\x20One\x20v','port','log','src','696xQJRZu','web','Could\x20not\x20open\x20browser\x20automatically.','parse','\x0aServer\x20is\x20not\x20running\x20at\x20','--help','Please\x20open\x20manually:\x20','1510656SyMbTs','32eGKcym','help','utf8','1959188tnDQoF','win32','SIGINT','15ZTdwJq','346660UNmUie','statusCode','Checking\x20if\x20server\x20is\x20running...','node','env','\x0aShutting\x20down\x20server...','host','toString','Unknown\x20command:\x20','LOXIA_HOST','Error:','748200QbKvYW','catch','open\x20\x22','package.json','includes','http://','Waiting\x20for\x20server\x20to\x20start...','startsWith','396348SxQFDP','ignore','SIGTERM','\x20manually.','6377BhBDef','xdg-open\x20\x22','\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a','version',')\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','/api/health','argv','error','Starting\x20Terminal\x20UI...\x0a','--port','inherit','Starting\x20Loxia\x20server...\x0a','9ZTbndg','Starting\x20Loxia\x20server\x20in\x20background...','exit','4468WGDMRZ','Server\x20is\x20running\x20at\x20','\x0aPlease\x20start\x20the\x20server\x20first:','kill','slice','ceil','loxia-terminal.js'];a0_0x1af8=function(){return _0x49242e;};return a0_0x1af8();}import a0_0x76563a from'http';function a0_0x1417(_0xd3e514,_0x4b1e98){_0xd3e514=_0xd3e514-0xe2;const _0x1af868=a0_0x1af8();let _0x1417b1=_0x1af868[_0xd3e514];return _0x1417b1;}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_0xbede4f(0x105)][a0_0xbede4f(0x112)](0x2),command=args[0x0]&&!args[0x0][a0_0xbede4f(0xfa)]('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args[a0_0xbede4f(0xf7)](a0_0xbede4f(0x11f))||args['includes']('-h'),'version':args[a0_0xbede4f(0xf7)]('--version')||args[a0_0xbede4f(0xf7)]('-v')};for(let i=0x0;i<args['length'];i++){args[i]===a0_0xbede4f(0x108)&&args[i+0x1]&&(flags[a0_0xbede4f(0x117)]=parseInt(args[i+0x1],0xa)),args[i]==='--host'&&args[i+0x1]&&(flags['host']=args[i+0x1]);}const port=flags[a0_0xbede4f(0x117)]||DEFAULT_PORT,host=flags[a0_0xbede4f(0xee)]||DEFAULT_HOST,serverUrl=a0_0xbede4f(0xf8)+host+':'+port;if(flags[a0_0xbede4f(0x102)]){const pkgPath=join(__dirname,'..',a0_0xbede4f(0xf6)),pkg=JSON[a0_0xbede4f(0x11d)](readFileSync(pkgPath,a0_0xbede4f(0xe3)));console[a0_0xbede4f(0x118)]('Loxia\x20Autopilot\x20One\x20v'+pkg[a0_0xbede4f(0x102)]),process[a0_0xbede4f(0x10d)](0x0);}if(flags[a0_0xbede4f(0xe2)]||!command){const pkgPath=join(__dirname,'..','package.json'),pkg=JSON[a0_0xbede4f(0x11d)](readFileSync(pkgPath,a0_0xbede4f(0xe3)));console['log'](a0_0xbede4f(0x116)+pkg[a0_0xbede4f(0x102)]+'\x20-\x20AI\x20Agent\x20System\x0a\x0aUsage:\x0a\x20\x20loxia\x20<command>\x20[options]\x0a\x0aCommands:\x0a\x20\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20+\x20open\x20Web\x20UI\x20in\x20browser\x0a\x20\x20terminal\x20\x20\x20\x20\x20\x20\x20\x20Start\x20Terminal\x20UI\x20(server\x20must\x20be\x20running)\x0a\x20\x20plus-web\x20\x20\x20\x20\x20\x20\x20\x20Alias\x20for\x20\x27web\x27\x0a\x20\x20plus-terminal\x20\x20\x20Start\x20server\x20+\x20Terminal\x20UI\x20together\x0a\x0aOptions:\x0a\x20\x20--port\x20<number>\x20\x20\x20Specify\x20port\x20(default:\x20'+DEFAULT_PORT+')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20'+DEFAULT_HOST+a0_0xbede4f(0x103)),process['exit'](0x0);}async function checkServerRunning(_0x438e2e,_0x1089f1,_0x4d8384=0x1){for(let _0x28a420=0x0;_0x28a420<_0x4d8384;_0x28a420++){const _0x3f54a0=await new Promise(_0x235735=>{const _0x3b3026=a0_0x1417,_0x359924=a0_0x76563a['get'](_0x3b3026(0xf8)+_0x438e2e+':'+_0x1089f1+_0x3b3026(0x104),_0x4f0f74=>{const _0x54c757=_0x3b3026;_0x235735(_0x4f0f74[_0x54c757(0xe9)]===0xc8);});_0x359924['on']('error',()=>_0x235735(![])),_0x359924['setTimeout'](0x7d0,()=>{const _0x368466=_0x3b3026;_0x359924[_0x368466(0x115)](),_0x235735(![]);});});if(_0x3f54a0)return!![];_0x28a420<_0x4d8384-0x1&&await new Promise(_0x3421ff=>setTimeout(_0x3421ff,SERVER_CHECK_INTERVAL));}return![];}async function waitForServer(_0x15fe32,_0x4a979,_0x498a82=SERVER_STARTUP_TIMEOUT){const _0x557e5a=a0_0xbede4f,_0x422ad2=Math[_0x557e5a(0x113)](_0x498a82/SERVER_CHECK_INTERVAL);return checkServerRunning(_0x15fe32,_0x4a979,_0x422ad2);}function openBrowser(_0x526b9e){const _0x3962a6=a0_0xbede4f,_0x5b480e=process['platform'];let _0x358219;if(_0x5b480e==='darwin')_0x358219=_0x3962a6(0xf5)+_0x526b9e+'\x22';else _0x5b480e===_0x3962a6(0xe5)?_0x358219='start\x20\x22\x22\x20\x22'+_0x526b9e+'\x22':_0x358219=_0x3962a6(0x100)+_0x526b9e+'\x22';exec(_0x358219,_0x4a9e42=>{const _0x2e2348=_0x3962a6;_0x4a9e42&&(console[_0x2e2348(0x118)](_0x2e2348(0x11c)),console[_0x2e2348(0x118)](_0x2e2348(0x120)+_0x526b9e));});}function startServer(_0x2a5526=![]){const _0x5a87d4=a0_0xbede4f,_0x540087={...process['env'],'LOXIA_PORT':port[_0x5a87d4(0xef)](),'PORT':port[_0x5a87d4(0xef)]()};flags[_0x5a87d4(0xee)]&&(_0x540087[_0x5a87d4(0xf1)]=flags[_0x5a87d4(0xee)]);const _0x58e424=join(__dirname,'..',_0x5a87d4(0x119),'index.js'),_0x6c82ef=spawn(_0x5a87d4(0xeb),[_0x58e424],{'cwd':join(__dirname,'..'),'env':_0x540087,'stdio':_0x2a5526?[_0x5a87d4(0xfc),_0x5a87d4(0xfc),_0x5a87d4(0xfc)]:_0x5a87d4(0x109),'detached':_0x2a5526});return _0x2a5526&&_0x6c82ef['unref'](),_0x6c82ef;}function startTerminalUI(){const _0x32f9d2=a0_0xbede4f,_0x128e9e=join(__dirname,_0x32f9d2(0x114)),_0x5438de={...process[_0x32f9d2(0xec)],'LOXIA_PORT':port[_0x32f9d2(0xef)](),'LOXIA_HOST':host},_0x1554c9=spawn(_0x32f9d2(0xeb),[_0x128e9e],{'cwd':join(__dirname,'..'),'env':_0x5438de,'stdio':_0x32f9d2(0x109)});return _0x1554c9;}const commands={'web':async()=>{const _0x3099c9=a0_0xbede4f;console[_0x3099c9(0x118)](_0x3099c9(0x10a));const _0x365622=startServer(![]);console[_0x3099c9(0x118)](_0x3099c9(0xf9));const _0x13c03a=await waitForServer(host,port);_0x13c03a?(console['log']('\x0aOpening\x20Web\x20UI\x20at\x20'+serverUrl),openBrowser(serverUrl)):console[_0x3099c9(0x118)]('\x0aServer\x20may\x20still\x20be\x20starting.\x20Open\x20'+serverUrl+_0x3099c9(0xfe)),process['on'](_0x3099c9(0xe6),()=>_0x365622[_0x3099c9(0x111)](_0x3099c9(0xe6))),process['on']('SIGTERM',()=>_0x365622[_0x3099c9(0x111)](_0x3099c9(0xfd))),_0x365622['on'](_0x3099c9(0x10d),_0x5ad9f9=>process[_0x3099c9(0x10d)](_0x5ad9f9||0x0));},'plus-web':async()=>{const _0x246639=a0_0xbede4f;await commands[_0x246639(0x11b)]();},'terminal':async()=>{const _0x5f18cc=a0_0xbede4f;console['log'](_0x5f18cc(0xea));const _0x57176a=await checkServerRunning(host,port);!_0x57176a&&(console['error'](_0x5f18cc(0x11e)+serverUrl),console[_0x5f18cc(0x106)](_0x5f18cc(0x110)),console[_0x5f18cc(0x106)]('\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI'),console['error'](_0x5f18cc(0x101)),process[_0x5f18cc(0x10d)](0x1));console[_0x5f18cc(0x118)](_0x5f18cc(0x10f)+serverUrl),console[_0x5f18cc(0x118)](_0x5f18cc(0x107));const _0x3955fa=startTerminalUI();process['on']('SIGINT',()=>_0x3955fa[_0x5f18cc(0x111)](_0x5f18cc(0xe6))),process['on'](_0x5f18cc(0xfd),()=>_0x3955fa[_0x5f18cc(0x111)](_0x5f18cc(0xfd))),_0x3955fa['on']('exit',_0x1fcde0=>process[_0x5f18cc(0x10d)](_0x1fcde0||0x0));},'plus-terminal':async()=>{const _0x493a93=a0_0xbede4f;console['log'](_0x493a93(0x10c));const _0x2f9cfd=startServer(!![]),_0x256bf8=await waitForServer(host,port);!_0x256bf8&&(console[_0x493a93(0x106)]('\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.'),process['exit'](0x1));console['log']('Server\x20running\x20at\x20'+serverUrl),console[_0x493a93(0x118)](_0x493a93(0x107));const _0x5a6726=startTerminalUI();_0x5a6726['on']('exit',_0x282de8=>{const _0xefad54=_0x493a93;console[_0xefad54(0x118)](_0xefad54(0xed));try{process['kill'](_0x2f9cfd['pid'],_0xefad54(0xfd));}catch(_0x1f79db){}process[_0xefad54(0x10d)](_0x282de8||0x0);}),process['on'](_0x493a93(0xe6),()=>{const _0x1807ab=_0x493a93;_0x5a6726[_0x1807ab(0x111)](_0x1807ab(0xe6));}),process['on']('SIGTERM',()=>{const _0x2ba298=_0x493a93;_0x5a6726[_0x2ba298(0x111)]('SIGTERM');});}};commands[command]?commands[command]()[a0_0xbede4f(0xf4)](_0x174ba3=>{const _0x30446a=a0_0xbede4f;console[_0x30446a(0x106)](_0x30446a(0xf2),_0x174ba3['message']),process[_0x30446a(0x10d)](0x1);}):(console['error'](a0_0xbede4f(0xf0)+command),console[a0_0xbede4f(0x106)]('Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.'),process['exit'](0x1));
3
+ const a0_0x3de577=a0_0x2c27;(function(_0x12d5d2,_0x9603e7){const _0x5c80c1=a0_0x2c27,_0x5ec526=_0x12d5d2();while(!![]){try{const _0xdd91cb=-parseInt(_0x5c80c1(0xd4))/0x1*(-parseInt(_0x5c80c1(0x104))/0x2)+parseInt(_0x5c80c1(0xf0))/0x3*(parseInt(_0x5c80c1(0xc2))/0x4)+parseInt(_0x5c80c1(0xf7))/0x5*(parseInt(_0x5c80c1(0xe3))/0x6)+parseInt(_0x5c80c1(0xcc))/0x7*(-parseInt(_0x5c80c1(0xfd))/0x8)+-parseInt(_0x5c80c1(0xdf))/0x9+parseInt(_0x5c80c1(0xf6))/0xa*(-parseInt(_0x5c80c1(0xcf))/0xb)+parseInt(_0x5c80c1(0xce))/0xc;if(_0xdd91cb===_0x9603e7)break;else _0x5ec526['push'](_0x5ec526['shift']());}catch(_0x952588){_0x5ec526['push'](_0x5ec526['shift']());}}}(a0_0xaeb2,0x244a3));import{fileURLToPath}from'url';import{dirname,join}from'path';import{spawn,exec}from'child_process';import{readFileSync}from'fs';import a0_0x5b5330 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x3de577(0xdc),SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process[a0_0x3de577(0xe9)][a0_0x3de577(0xc3)](0x2),command=args[0x0]&&!args[0x0][a0_0x3de577(0xe8)]('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args[a0_0x3de577(0xcd)](a0_0x3de577(0xff))||args[a0_0x3de577(0xcd)]('-h'),'version':args[a0_0x3de577(0xcd)](a0_0x3de577(0xfa))||args[a0_0x3de577(0xcd)]('-v')};for(let i=0x0;i<args['length'];i++){args[i]===a0_0x3de577(0xc8)&&args[i+0x1]&&(flags[a0_0x3de577(0xe4)]=parseInt(args[i+0x1],0xa)),args[i]==='--host'&&args[i+0x1]&&(flags[a0_0x3de577(0xfb)]=args[i+0x1]);}function a0_0x2c27(_0x3abb66,_0x557829){_0x3abb66=_0x3abb66-0xc2;const _0xaeb287=a0_0xaeb2();let _0x2c278b=_0xaeb287[_0x3abb66];return _0x2c278b;}const port=flags[a0_0x3de577(0xe4)]||DEFAULT_PORT,host=flags[a0_0x3de577(0xfb)]||DEFAULT_HOST,serverUrl=a0_0x3de577(0xe5)+host+':'+port;if(flags[a0_0x3de577(0xd8)]){const pkgPath=join(__dirname,'..',a0_0x3de577(0xf5)),pkg=JSON['parse'](readFileSync(pkgPath,a0_0x3de577(0xd6)));console['log'](a0_0x3de577(0xca)+pkg[a0_0x3de577(0xd8)]),process[a0_0x3de577(0xe1)](0x0);}if(flags['help']||!command){const pkgPath=join(__dirname,'..',a0_0x3de577(0xf5)),pkg=JSON[a0_0x3de577(0xd3)](readFileSync(pkgPath,a0_0x3de577(0xd6)));console['log'](a0_0x3de577(0xf2)+pkg[a0_0x3de577(0xd8)]+a0_0x3de577(0xf9)+DEFAULT_PORT+')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20'+DEFAULT_HOST+a0_0x3de577(0xfe)),process[a0_0x3de577(0xe1)](0x0);}async function checkServerRunning(_0x2e3d6e,_0x21350d,_0x4ae414=0x1){for(let _0x5e08af=0x0;_0x5e08af<_0x4ae414;_0x5e08af++){const _0x438139=await new Promise(_0x18c566=>{const _0x4e8bf7=a0_0x2c27,_0x404432=a0_0x5b5330[_0x4e8bf7(0xd2)](_0x4e8bf7(0xe5)+_0x2e3d6e+':'+_0x21350d+_0x4e8bf7(0xee),_0x212ef0=>{const _0x46d9fd=_0x4e8bf7;_0x18c566(_0x212ef0[_0x46d9fd(0xe0)]===0xc8);});_0x404432['on'](_0x4e8bf7(0xf8),()=>_0x18c566(![])),_0x404432[_0x4e8bf7(0xc6)](0x7d0,()=>{const _0x4daa13=_0x4e8bf7;_0x404432[_0x4daa13(0xd7)](),_0x18c566(![]);});});if(_0x438139)return!![];_0x5e08af<_0x4ae414-0x1&&await new Promise(_0x3d082c=>setTimeout(_0x3d082c,SERVER_CHECK_INTERVAL));}return![];}async function waitForServer(_0xa3271c,_0x1ac6d5,_0x1db942=SERVER_STARTUP_TIMEOUT){const _0x2b0e3a=Math['ceil'](_0x1db942/SERVER_CHECK_INTERVAL);return checkServerRunning(_0xa3271c,_0x1ac6d5,_0x2b0e3a);}function openBrowser(_0x19bf68){const _0xe6cdc0=a0_0x3de577,_0x5e1608=process['platform'];let _0x55a9de;if(_0x5e1608==='darwin')_0x55a9de=_0xe6cdc0(0x105)+_0x19bf68+'\x22';else _0x5e1608===_0xe6cdc0(0x102)?_0x55a9de=_0xe6cdc0(0xdd)+_0x19bf68+'\x22':_0x55a9de=_0xe6cdc0(0xe7)+_0x19bf68+'\x22';exec(_0x55a9de,_0x33dab0=>{const _0x4fef26=_0xe6cdc0;_0x33dab0&&(console[_0x4fef26(0x106)](_0x4fef26(0x108)),console[_0x4fef26(0x106)](_0x4fef26(0xcb)+_0x19bf68));});}function startServer(_0x42bdeb=![]){const _0x35db87=a0_0x3de577,_0x168c6c={...process['env'],'LOXIA_PORT':port[_0x35db87(0xfc)](),'PORT':port[_0x35db87(0xfc)]()};flags[_0x35db87(0xfb)]&&(_0x168c6c[_0x35db87(0xc4)]=flags[_0x35db87(0xfb)]);const _0x9ae793=join(__dirname,'..',_0x35db87(0xf1),_0x35db87(0xde)),_0xb9d18d=spawn(_0x35db87(0xf4),[_0x9ae793],{'cwd':join(__dirname,'..'),'env':_0x168c6c,'stdio':_0x42bdeb?[_0x35db87(0xe6),_0x35db87(0xe6),'ignore']:_0x35db87(0x103),'detached':_0x42bdeb});return _0x42bdeb&&_0xb9d18d['unref'](),_0xb9d18d;}function startTerminalUI(){const _0x3b850e=a0_0x3de577,_0x5c9a3f=join(__dirname,'loxia-terminal.js'),_0x322bf7={...process[_0x3b850e(0xc7)],'LOXIA_PORT':port[_0x3b850e(0xfc)](),'LOXIA_HOST':host},_0x660802=spawn('node',[_0x5c9a3f],{'cwd':join(__dirname,'..'),'env':_0x322bf7,'stdio':_0x3b850e(0x103)});return _0x660802;}const commands={'web':async()=>{const _0x1f5e01=a0_0x3de577;console[_0x1f5e01(0x106)](_0x1f5e01(0xe2));const _0x97d4d2=startServer(![]);console[_0x1f5e01(0x106)](_0x1f5e01(0x100));const _0x8d5560=await waitForServer(host,port);_0x8d5560?(console[_0x1f5e01(0x106)]('\x0aOpening\x20Web\x20UI\x20at\x20'+serverUrl),openBrowser(serverUrl)):console[_0x1f5e01(0x106)]('\x0aServer\x20may\x20still\x20be\x20starting.\x20Open\x20'+serverUrl+_0x1f5e01(0xf3)),process['on'](_0x1f5e01(0xea),()=>_0x97d4d2[_0x1f5e01(0xec)](_0x1f5e01(0xea))),process['on']('SIGTERM',()=>_0x97d4d2['kill']('SIGTERM')),_0x97d4d2['on']('exit',_0x10b35d=>process[_0x1f5e01(0xe1)](_0x10b35d||0x0));},'plus-web':async()=>{await commands['web']();},'terminal':async()=>{const _0x31b977=a0_0x3de577;console[_0x31b977(0x106)](_0x31b977(0xed));const _0xc520d9=await checkServerRunning(host,port);!_0xc520d9&&(console[_0x31b977(0xf8)](_0x31b977(0x107)+serverUrl),console[_0x31b977(0xf8)]('\x0aPlease\x20start\x20the\x20server\x20first:'),console[_0x31b977(0xf8)](_0x31b977(0xd5)),console['error'](_0x31b977(0xdb)),process[_0x31b977(0xe1)](0x1));console[_0x31b977(0x106)]('Server\x20is\x20running\x20at\x20'+serverUrl),console[_0x31b977(0x106)](_0x31b977(0xeb));const _0x496c71=startTerminalUI();process['on']('SIGINT',()=>_0x496c71[_0x31b977(0xec)](_0x31b977(0xea))),process['on']('SIGTERM',()=>_0x496c71[_0x31b977(0xec)](_0x31b977(0xd1))),_0x496c71['on']('exit',_0x34f22d=>process[_0x31b977(0xe1)](_0x34f22d||0x0));},'plus-terminal':async()=>{const _0x344ba9=a0_0x3de577;console[_0x344ba9(0x106)](_0x344ba9(0xc5));const _0x5aaa0e=startServer(!![]),_0x522e4a=await waitForServer(host,port);!_0x522e4a&&(console[_0x344ba9(0xf8)]('\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.'),process[_0x344ba9(0xe1)](0x1));console[_0x344ba9(0x106)](_0x344ba9(0xc9)+serverUrl),console[_0x344ba9(0x106)](_0x344ba9(0xeb));const _0x35a286=startTerminalUI();_0x35a286['on'](_0x344ba9(0xe1),_0x30a350=>{const _0x15d0aa=_0x344ba9;console['log'](_0x15d0aa(0xd9));try{process[_0x15d0aa(0xec)](_0x5aaa0e[_0x15d0aa(0xef)],'SIGTERM');}catch(_0x14ca2e){}process[_0x15d0aa(0xe1)](_0x30a350||0x0);}),process['on'](_0x344ba9(0xea),()=>{const _0x524c8f=_0x344ba9;_0x35a286['kill'](_0x524c8f(0xea));}),process['on'](_0x344ba9(0xd1),()=>{const _0x431961=_0x344ba9;_0x35a286[_0x431961(0xec)](_0x431961(0xd1));});}};function a0_0xaeb2(){const _0x3f2cdf=['--help','Waiting\x20for\x20server\x20to\x20start...','Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.','win32','inherit','28dZHKiM','open\x20\x22','log','\x0aServer\x20is\x20not\x20running\x20at\x20','Could\x20not\x20open\x20browser\x20automatically.','11448zkzQnT','slice','LOXIA_HOST','Starting\x20Loxia\x20server\x20in\x20background...','setTimeout','env','--port','Server\x20running\x20at\x20','Loxia\x20Autopilot\x20One\x20v','Please\x20open\x20manually:\x20','5649Ipzoqq','includes','1759272RVJkNf','671jHhbdj','Error:','SIGTERM','get','parse','12121iqjWwf','\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI','utf8','destroy','version','\x0aShutting\x20down\x20server...','Unknown\x20command:\x20','\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a','localhost','start\x20\x22\x22\x20\x22','index.js','1409967oJNAdy','statusCode','exit','Starting\x20Loxia\x20server...\x0a','6QnlHFT','port','http://','ignore','xdg-open\x20\x22','startsWith','argv','SIGINT','Starting\x20Terminal\x20UI...\x0a','kill','Checking\x20if\x20server\x20is\x20running...','/api/health','pid','51ntNPBm','src','\x0aLoxia\x20Autopilot\x20One\x20v','\x20manually.','node','package.json','39250JJnOUC','1023970tYalxo','error','\x20-\x20AI\x20Agent\x20System\x0a\x0aUsage:\x0a\x20\x20loxia\x20<command>\x20[options]\x0a\x0aCommands:\x0a\x20\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20+\x20open\x20Web\x20UI\x20in\x20browser\x0a\x20\x20terminal\x20\x20\x20\x20\x20\x20\x20\x20Start\x20Terminal\x20UI\x20(server\x20must\x20be\x20running)\x0a\x20\x20plus-web\x20\x20\x20\x20\x20\x20\x20\x20Alias\x20for\x20\x27web\x27\x0a\x20\x20plus-terminal\x20\x20\x20Start\x20server\x20+\x20Terminal\x20UI\x20together\x0a\x0aOptions:\x0a\x20\x20--port\x20<number>\x20\x20\x20Specify\x20port\x20(default:\x20','--version','host','toString','248PyIyOs',')\x0a\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x20message\x0a\x20\x20-v,\x20--version\x20\x20\x20\x20\x20Show\x20version\x20number\x0a\x0aExamples:\x0a\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20open\x20browser\x0a\x20\x20loxia\x20terminal\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Connect\x20Terminal\x20UI\x20to\x20running\x20server\x0a\x20\x20loxia\x20plus-terminal\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a\x20\x20loxia\x20web\x20--port\x203000\x20\x20\x20\x20#\x20Use\x20custom\x20port\x0a\x0aQuick\x20Start:\x0a\x20\x201.\x20Run\x20\x27loxia\x20web\x27\x20to\x20start\x20with\x20Web\x20UI\x0a\x20\x202.\x20Or\x20run\x20\x27loxia\x20plus-terminal\x27\x20for\x20Terminal\x20UI\x20experience\x0a\x0aDocumentation:\x0a\x20\x20https://autopilot.loxia.ai\x0a\x0a'];a0_0xaeb2=function(){return _0x3f2cdf;};return a0_0xaeb2();}commands[command]?commands[command]()['catch'](_0x2ad87d=>{const _0x32dc9d=a0_0x3de577;console[_0x32dc9d(0xf8)](_0x32dc9d(0xd0),_0x2ad87d['message']),process[_0x32dc9d(0xe1)](0x1);}):(console[a0_0x3de577(0xf8)](a0_0x3de577(0xda)+command),console['error'](a0_0x3de577(0x101)),process[a0_0x3de577(0xe1)](0x1));
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0xc4adb2=a0_0x540f;(function(_0x4939e4,_0x3765f9){const _0x539cd2=a0_0x540f,_0x5555a0=_0x4939e4();while(!![]){try{const _0x4af12d=parseInt(_0x539cd2(0xc8))/0x1*(-parseInt(_0x539cd2(0xb3))/0x2)+parseInt(_0x539cd2(0xb7))/0x3*(-parseInt(_0x539cd2(0xc3))/0x4)+parseInt(_0x539cd2(0xb9))/0x5+-parseInt(_0x539cd2(0xc5))/0x6+parseInt(_0x539cd2(0xda))/0x7*(parseInt(_0x539cd2(0xbd))/0x8)+-parseInt(_0x539cd2(0xc9))/0x9*(-parseInt(_0x539cd2(0xb4))/0xa)+-parseInt(_0x539cd2(0xcc))/0xb;if(_0x4af12d===_0x3765f9)break;else _0x5555a0['push'](_0x5555a0['shift']());}catch(_0x22befb){_0x5555a0['push'](_0x5555a0['shift']());}}}(a0_0x5e39,0x266cb));import{spawn}from'child_process';import a0_0x389655 from'net';import a0_0x55ed40 from'path';import{fileURLToPath}from'url';function a0_0x5e39(){const _0x39ead4=['argv','pipe','data','389711nEsrcr','🚀\x20Starting\x20Loxia\x20server...','ignore','env','LOXIA_PORT','node','Server\x20startup\x20timeout','--ui','localhost','🔍\x20Checking\x20if\x20server\x20is\x20running\x20at\x20','2lPMoVq','8100AXjLYo','log','--host','5058iFAljz','Failed\x20to\x20start\x20server:','1549245QAHXcD','exit','toString','kill','24SkpTjy','✗\x20Server\x20is\x20not\x20running','🎨\x20Launching\x20Ink-based\x20Terminal\x20UI...','...','connect','now','32tBKxBZ','\x20\x20Loxia\x20Autopilot\x20One\x20-\x20Terminal\x20UI','2370EeTUfV','LOXIA_HOST','error','14229jjNKUZ','1467hrJZSq','join','\x20\x20\x203.\x20Check\x20logs\x20for\x20more\x20details','4657389YtvQjj','dirname','slice','length','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','destroy','Socket','../src/interfaces/terminal/index.js','--port','bin/cli.js','stdout'];a0_0x5e39=function(){return _0x39ead4;};return a0_0x5e39();}const __filename=fileURLToPath(import.meta.url),__dirname=a0_0x55ed40[a0_0xc4adb2(0xcd)](__filename),projectRoot=a0_0x55ed40['dirname'](__dirname),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0xc4adb2(0xb1),SERVER_STARTUP_TIMEOUT=0x2710;async function isServerRunning(_0x4e3f07,_0x27b512){return new Promise(_0x193c80=>{const _0x590ed2=a0_0x540f,_0x12f700=new a0_0x389655[(_0x590ed2(0xd2))]();_0x12f700['setTimeout'](0x7d0),_0x12f700['on'](_0x590ed2(0xc1),()=>{const _0x1e97f7=_0x590ed2;_0x12f700[_0x1e97f7(0xd1)](),_0x193c80(!![]);}),_0x12f700['on']('timeout',()=>{const _0x521718=_0x590ed2;_0x12f700[_0x521718(0xd1)](),_0x193c80(![]);}),_0x12f700['on'](_0x590ed2(0xc7),()=>{const _0x439cc6=_0x590ed2;_0x12f700[_0x439cc6(0xd1)](),_0x193c80(![]);}),_0x12f700[_0x590ed2(0xc1)](_0x27b512,_0x4e3f07);});}async function startServer(_0x5bc551,_0x38e27a){const _0x59002f=a0_0xc4adb2;return console[_0x59002f(0xb5)](_0x59002f(0xdb)),new Promise((_0x2b236c,_0x2e11c2)=>{const _0x5a1590=_0x59002f,_0x3e5d66=spawn(_0x5a1590(0xae),[a0_0x55ed40[_0x5a1590(0xca)](projectRoot,_0x5a1590(0xd5)),_0x5a1590(0xb0),'web','--host',_0x5bc551,_0x5a1590(0xd4),_0x38e27a[_0x5a1590(0xbb)]()],{'detached':![],'stdio':[_0x5a1590(0xdc),_0x5a1590(0xd8),_0x5a1590(0xd8)]});_0x3e5d66[_0x5a1590(0xd6)]['on']('data',()=>{}),_0x3e5d66['stderr']['on'](_0x5a1590(0xd9),()=>{}),_0x3e5d66['on']('error',_0x1c2feb=>{const _0x4ee7bb=_0x5a1590;console[_0x4ee7bb(0xc7)](_0x4ee7bb(0xb8),_0x1c2feb['message']),_0x2e11c2(_0x1c2feb);});const _0x4fa94f=Date[_0x5a1590(0xc2)](),_0x11605c=setInterval(async()=>{const _0x5b2f38=_0x5a1590,_0x32cff6=await isServerRunning(_0x5bc551,_0x38e27a);if(_0x32cff6)clearInterval(_0x11605c),console['log']('✓\x20Server\x20started\x20at\x20'+_0x5bc551+':'+_0x38e27a),_0x2b236c();else Date[_0x5b2f38(0xc2)]()-_0x4fa94f>SERVER_STARTUP_TIMEOUT&&(clearInterval(_0x11605c),_0x3e5d66[_0x5b2f38(0xbc)](),_0x2e11c2(new Error(_0x5b2f38(0xaf))));},0x1f4);});}function a0_0x540f(_0x5b7457,_0x28c16c){_0x5b7457=_0x5b7457-0xad;const _0x5e3937=a0_0x5e39();let _0x540fb1=_0x5e3937[_0x5b7457];return _0x540fb1;}async function main(){const _0x3419f7=a0_0xc4adb2;try{console['log'](_0x3419f7(0xd0)),console[_0x3419f7(0xb5)](_0x3419f7(0xc4)),console[_0x3419f7(0xb5)](_0x3419f7(0xd0)),console['log']('');const _0x39f45e=process[_0x3419f7(0xd7)][_0x3419f7(0xce)](0x2);let _0x40137e=DEFAULT_HOST,_0x37e48a=DEFAULT_PORT;for(let _0x1ce2dc=0x0;_0x1ce2dc<_0x39f45e[_0x3419f7(0xcf)];_0x1ce2dc++){if(_0x39f45e[_0x1ce2dc]===_0x3419f7(0xb6)&&_0x39f45e[_0x1ce2dc+0x1])_0x40137e=_0x39f45e[_0x1ce2dc+0x1],_0x1ce2dc++;else _0x39f45e[_0x1ce2dc]===_0x3419f7(0xd4)&&_0x39f45e[_0x1ce2dc+0x1]&&(_0x37e48a=parseInt(_0x39f45e[_0x1ce2dc+0x1],0xa),_0x1ce2dc++);}console[_0x3419f7(0xb5)](_0x3419f7(0xb2)+_0x40137e+':'+_0x37e48a+_0x3419f7(0xc0));const _0x3ab40d=await isServerRunning(_0x40137e,_0x37e48a);!_0x3ab40d?(console[_0x3419f7(0xb5)](_0x3419f7(0xbe)),await startServer(_0x40137e,_0x37e48a)):console[_0x3419f7(0xb5)]('✓\x20Server\x20is\x20already\x20running\x20at\x20'+_0x40137e+':'+_0x37e48a),console[_0x3419f7(0xb5)](''),console[_0x3419f7(0xb5)](_0x3419f7(0xbf)),console[_0x3419f7(0xb5)](''),await new Promise(_0x3b2e81=>setTimeout(_0x3b2e81,0x1f4)),process[_0x3419f7(0xdd)][_0x3419f7(0xc6)]=_0x40137e,process[_0x3419f7(0xdd)][_0x3419f7(0xad)]=_0x37e48a[_0x3419f7(0xbb)](),await import(_0x3419f7(0xd3));}catch(_0x931e03){console[_0x3419f7(0xc7)](''),console['error']('❌\x20Failed\x20to\x20start\x20Terminal\x20UI:'),console[_0x3419f7(0xc7)]('\x20\x20',_0x931e03['message']),console[_0x3419f7(0xc7)](''),console['error']('💡\x20Troubleshooting:'),console['error']('\x20\x20\x201.\x20Make\x20sure\x20no\x20other\x20process\x20is\x20using\x20port\x208080'),console[_0x3419f7(0xc7)]('\x20\x20\x202.\x20Try\x20running\x20the\x20server\x20manually:\x20node\x20bin/cli.js'),console[_0x3419f7(0xc7)](_0x3419f7(0xcb)),console[_0x3419f7(0xc7)](''),process[_0x3419f7(0xba)](0x1);}}main();
3
+ const a0_0x1bbb1e=a0_0x16c4;function a0_0x9be4(){const _0x4b3f94=['--ui','connect','7031962yNTaBS','argv','2673570bTmLwc','toString','now','2456864hqseMI','342121bIWKbG','\x20\x20\x203.\x20Check\x20logs\x20for\x20more\x20details','../src/interfaces/terminal/index.js','localhost','\x20\x20\x201.\x20Make\x20sure\x20no\x20other\x20process\x20is\x20using\x20port\x208080','length','❌\x20Failed\x20to\x20start\x20Terminal\x20UI:','✓\x20Server\x20started\x20at\x20','log','web','setTimeout','LOXIA_PORT','timeout','data','--port','122814lVzJTc','stdout','bin/cli.js','536LmLTdN','--host','\x20\x20\x202.\x20Try\x20running\x20the\x20server\x20manually:\x20node\x20bin/cli.js','kill','LOXIA_HOST','ignore','1004308DgmCiR','Socket','error','dirname','3715eDbbeD','🚀\x20Starting\x20Loxia\x20server...','🔍\x20Checking\x20if\x20server\x20is\x20running\x20at\x20','Failed\x20to\x20start\x20server:','join','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','\x20\x20Loxia\x20Autopilot\x20One\x20-\x20Terminal\x20UI','✓\x20Server\x20is\x20already\x20running\x20at\x20','destroy','18KyZZdp','message','exit','env','node'];a0_0x9be4=function(){return _0x4b3f94;};return a0_0x9be4();}(function(_0x3dab88,_0x381086){const _0x59e3ee=a0_0x16c4,_0x3e2cc1=_0x3dab88();while(!![]){try{const _0x2909e6=parseInt(_0x59e3ee(0x155))/0x1+parseInt(_0x59e3ee(0x16d))/0x2+-parseInt(_0x59e3ee(0x164))/0x3+parseInt(_0x59e3ee(0x167))/0x4*(-parseInt(_0x59e3ee(0x13f))/0x5)+-parseInt(_0x59e3ee(0x151))/0x6+parseInt(_0x59e3ee(0x14f))/0x7+parseInt(_0x59e3ee(0x154))/0x8*(-parseInt(_0x59e3ee(0x148))/0x9);if(_0x2909e6===_0x381086)break;else _0x3e2cc1['push'](_0x3e2cc1['shift']());}catch(_0x4b6892){_0x3e2cc1['push'](_0x3e2cc1['shift']());}}}(a0_0x9be4,0x9e552));import{spawn}from'child_process';import a0_0xb389aa from'net';import a0_0x34c79f from'path';function a0_0x16c4(_0x35a49d,_0xca2d07){_0x35a49d=_0x35a49d-0x13c;const _0x9be4bf=a0_0x9be4();let _0x16c45b=_0x9be4bf[_0x35a49d];return _0x16c45b;}import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=a0_0x34c79f[a0_0x1bbb1e(0x13e)](__filename),projectRoot=a0_0x34c79f[a0_0x1bbb1e(0x13e)](__dirname),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x1bbb1e(0x158),SERVER_STARTUP_TIMEOUT=0x2710;async function isServerRunning(_0x17ac49,_0x477171){return new Promise(_0x2f56b9=>{const _0x32b1d5=a0_0x16c4,_0xb7aa03=new a0_0xb389aa[(_0x32b1d5(0x13c))]();_0xb7aa03[_0x32b1d5(0x15f)](0x7d0),_0xb7aa03['on'](_0x32b1d5(0x14e),()=>{const _0x314fcc=_0x32b1d5;_0xb7aa03[_0x314fcc(0x147)](),_0x2f56b9(!![]);}),_0xb7aa03['on'](_0x32b1d5(0x161),()=>{const _0x19f69f=_0x32b1d5;_0xb7aa03[_0x19f69f(0x147)](),_0x2f56b9(![]);}),_0xb7aa03['on']('error',()=>{const _0xdff789=_0x32b1d5;_0xb7aa03[_0xdff789(0x147)](),_0x2f56b9(![]);}),_0xb7aa03[_0x32b1d5(0x14e)](_0x477171,_0x17ac49);});}async function startServer(_0x2d3608,_0x1d36df){const _0x1dbe03=a0_0x1bbb1e;return console[_0x1dbe03(0x15d)](_0x1dbe03(0x140)),new Promise((_0x1e9c81,_0x218afd)=>{const _0x188b22=_0x1dbe03,_0x4ca672=spawn(_0x188b22(0x14c),[a0_0x34c79f[_0x188b22(0x143)](projectRoot,_0x188b22(0x166)),_0x188b22(0x14d),_0x188b22(0x15e),_0x188b22(0x168),_0x2d3608,_0x188b22(0x163),_0x1d36df[_0x188b22(0x152)]()],{'detached':![],'stdio':[_0x188b22(0x16c),'pipe','pipe']});_0x4ca672[_0x188b22(0x165)]['on'](_0x188b22(0x162),()=>{}),_0x4ca672['stderr']['on'](_0x188b22(0x162),()=>{}),_0x4ca672['on']('error',_0x595db9=>{const _0x25ee20=_0x188b22;console['error'](_0x25ee20(0x142),_0x595db9['message']),_0x218afd(_0x595db9);});const _0x20dad4=Date[_0x188b22(0x153)](),_0x59b74d=setInterval(async()=>{const _0x5d310c=_0x188b22,_0x176331=await isServerRunning(_0x2d3608,_0x1d36df);if(_0x176331)clearInterval(_0x59b74d),console[_0x5d310c(0x15d)](_0x5d310c(0x15c)+_0x2d3608+':'+_0x1d36df),_0x1e9c81();else Date[_0x5d310c(0x153)]()-_0x20dad4>SERVER_STARTUP_TIMEOUT&&(clearInterval(_0x59b74d),_0x4ca672[_0x5d310c(0x16a)](),_0x218afd(new Error('Server\x20startup\x20timeout')));},0x1f4);});}async function main(){const _0x5a41e9=a0_0x1bbb1e;try{console[_0x5a41e9(0x15d)](_0x5a41e9(0x144)),console[_0x5a41e9(0x15d)](_0x5a41e9(0x145)),console[_0x5a41e9(0x15d)](_0x5a41e9(0x144)),console[_0x5a41e9(0x15d)]('');const _0x59a19f=process[_0x5a41e9(0x150)]['slice'](0x2);let _0x2cd94a=DEFAULT_HOST,_0x3f74f7=DEFAULT_PORT;for(let _0x33479a=0x0;_0x33479a<_0x59a19f[_0x5a41e9(0x15a)];_0x33479a++){if(_0x59a19f[_0x33479a]===_0x5a41e9(0x168)&&_0x59a19f[_0x33479a+0x1])_0x2cd94a=_0x59a19f[_0x33479a+0x1],_0x33479a++;else _0x59a19f[_0x33479a]===_0x5a41e9(0x163)&&_0x59a19f[_0x33479a+0x1]&&(_0x3f74f7=parseInt(_0x59a19f[_0x33479a+0x1],0xa),_0x33479a++);}console[_0x5a41e9(0x15d)](_0x5a41e9(0x141)+_0x2cd94a+':'+_0x3f74f7+'...');const _0x3bdeb6=await isServerRunning(_0x2cd94a,_0x3f74f7);!_0x3bdeb6?(console[_0x5a41e9(0x15d)]('✗\x20Server\x20is\x20not\x20running'),await startServer(_0x2cd94a,_0x3f74f7)):console[_0x5a41e9(0x15d)](_0x5a41e9(0x146)+_0x2cd94a+':'+_0x3f74f7),console['log'](''),console[_0x5a41e9(0x15d)]('🎨\x20Launching\x20Ink-based\x20Terminal\x20UI...'),console['log'](''),await new Promise(_0x398961=>setTimeout(_0x398961,0x1f4)),process[_0x5a41e9(0x14b)][_0x5a41e9(0x16b)]=_0x2cd94a,process[_0x5a41e9(0x14b)][_0x5a41e9(0x160)]=_0x3f74f7[_0x5a41e9(0x152)](),await import(_0x5a41e9(0x157));}catch(_0x4ebf4a){console[_0x5a41e9(0x13d)](''),console[_0x5a41e9(0x13d)](_0x5a41e9(0x15b)),console['error']('\x20\x20',_0x4ebf4a[_0x5a41e9(0x149)]),console[_0x5a41e9(0x13d)](''),console[_0x5a41e9(0x13d)]('💡\x20Troubleshooting:'),console[_0x5a41e9(0x13d)](_0x5a41e9(0x159)),console[_0x5a41e9(0x13d)](_0x5a41e9(0x169)),console[_0x5a41e9(0x13d)](_0x5a41e9(0x156)),console[_0x5a41e9(0x13d)](''),process[_0x5a41e9(0x14a)](0x1);}}main();
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x532ec4=a0_0x4ef3;(function(_0x135556,_0x1f9f38){const _0x102523=a0_0x4ef3,_0x42994e=_0x135556();while(!![]){try{const _0x454709=parseInt(_0x102523(0xcd))/0x1+-parseInt(_0x102523(0xb3))/0x2+parseInt(_0x102523(0xc0))/0x3*(-parseInt(_0x102523(0xb4))/0x4)+-parseInt(_0x102523(0xbe))/0x5+parseInt(_0x102523(0xbd))/0x6*(parseInt(_0x102523(0xb6))/0x7)+parseInt(_0x102523(0xba))/0x8*(parseInt(_0x102523(0xaf))/0x9)+parseInt(_0x102523(0xc3))/0xa*(parseInt(_0x102523(0xae))/0xb);if(_0x454709===_0x1f9f38)break;else _0x42994e['push'](_0x42994e['shift']());}catch(_0x847fa9){_0x42994e['push'](_0x42994e['shift']());}}}(a0_0x1c43,0xeb819));import{startTerminalUI}from'../src/interfaces/terminal/index.js';const args=process[a0_0x532ec4(0xb8)][a0_0x532ec4(0xd3)](0x2),options={'host':'localhost','port':0x1f90};function a0_0x4ef3(_0x570eec,_0x429747){_0x570eec=_0x570eec-0xac;const _0x1c4318=a0_0x1c43();let _0x4ef36e=_0x1c4318[_0x570eec];return _0x4ef36e;}for(let i=0x0;i<args[a0_0x532ec4(0xac)];i++){const arg=args[i];if(arg===a0_0x532ec4(0xd6)||arg==='-h')options[a0_0x532ec4(0xbc)]=args[++i];else{if(arg===a0_0x532ec4(0xb7)||arg==='-p')options['port']=parseInt(args[++i],0xa);else arg===a0_0x532ec4(0xcf)&&(console['log'](a0_0x532ec4(0xd2)),process[a0_0x532ec4(0xb1)](0x0));}}process[a0_0x532ec4(0xc7)][a0_0x532ec4(0xbf)]&&(options[a0_0x532ec4(0xbc)]=process[a0_0x532ec4(0xc7)][a0_0x532ec4(0xbf)]);process['env']['LOXIA_PORT']&&(options[a0_0x532ec4(0xb5)]=parseInt(process[a0_0x532ec4(0xc7)][a0_0x532ec4(0xbb)],0xa));function a0_0x1c43(){const _0x25e47f=['host','6cYLxJi','3593915EQICLR','LOXIA_HOST','6JaBtVA','isTTY','\x20\x20-\x20Redirected\x20output\x20(e.g.,\x20>\x20file.txt,\x202>&1\x20|\x20...)','89890QMdvJC','error','catch','The\x20terminal\x20UI\x20cannot\x20run\x20in:','env','log','Or\x20use\x20the\x20web\x20UI\x20instead:','stdin','\x20\x20npm\x20start','Connecting\x20to:\x20','415362UuzFUV','\x20\x20-\x20Background\x20processes\x20(e.g.,\x20&\x20at\x20the\x20end)','--help','waitUntilExit','\x0aTerminal\x20UI\x20exited','\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','slice','\x20\x20npm\x20run\x20terminal-ui','\x0aTerminal\x20UI\x20error:','--host','length','Starting\x20Loxia\x20Terminal\x20UI...','1199llnOyO','4518UwfMqi','\x20\x20-\x20Some\x20CI/CD\x20environments','exit','then','2453856aUlZZq','2776504JwILjB','port','12175065AbJKOz','--port','argv','Press\x20Ctrl+C\x20to\x20exit\x0a','18552IsCcjw','LOXIA_PORT'];a0_0x1c43=function(){return _0x25e47f;};return a0_0x1c43();}!process[a0_0x532ec4(0xca)][a0_0x532ec4(0xc1)]&&(console['error']('ERROR:\x20Terminal\x20UI\x20requires\x20an\x20interactive\x20terminal\x20(TTY).'),console[a0_0x532ec4(0xc4)](''),console['error'](a0_0x532ec4(0xc6)),console[a0_0x532ec4(0xc4)]('\x20\x20-\x20Piped\x20environments\x20(e.g.,\x20|\x20head,\x20|\x20grep)'),console[a0_0x532ec4(0xc4)](a0_0x532ec4(0xc2)),console[a0_0x532ec4(0xc4)](a0_0x532ec4(0xce)),console[a0_0x532ec4(0xc4)](a0_0x532ec4(0xb0)),console[a0_0x532ec4(0xc4)](''),console[a0_0x532ec4(0xc4)]('Please\x20run\x20this\x20command\x20in\x20a\x20real\x20terminal\x20without\x20pipes\x20or\x20redirection:'),console[a0_0x532ec4(0xc4)](a0_0x532ec4(0xd4)),console['error'](''),console[a0_0x532ec4(0xc4)](a0_0x532ec4(0xc9)),console[a0_0x532ec4(0xc4)](a0_0x532ec4(0xcb)),process[a0_0x532ec4(0xb1)](0x1));console[a0_0x532ec4(0xc8)](a0_0x532ec4(0xad)),console[a0_0x532ec4(0xc8)](a0_0x532ec4(0xcc)+options[a0_0x532ec4(0xbc)]+':'+options[a0_0x532ec4(0xb5)]),console[a0_0x532ec4(0xc8)](a0_0x532ec4(0xb9));const instance=startTerminalUI(options);instance[a0_0x532ec4(0xd0)]()[a0_0x532ec4(0xb2)](()=>{const _0x1cf5e5=a0_0x532ec4;console[_0x1cf5e5(0xc8)](_0x1cf5e5(0xd1)),process[_0x1cf5e5(0xb1)](0x0);})[a0_0x532ec4(0xc5)](_0x56f543=>{const _0x39e36e=a0_0x532ec4;console[_0x39e36e(0xc4)](_0x39e36e(0xd5),_0x56f543),process[_0x39e36e(0xb1)](0x1);});
3
+ const a0_0x395d08=a0_0x5722;(function(_0x4c8086,_0x3ae5ce){const _0x5ecab5=a0_0x5722,_0xd92ccf=_0x4c8086();while(!![]){try{const _0x21e2f4=-parseInt(_0x5ecab5(0x6d))/0x1*(parseInt(_0x5ecab5(0x84))/0x2)+-parseInt(_0x5ecab5(0x8b))/0x3*(parseInt(_0x5ecab5(0x6b))/0x4)+parseInt(_0x5ecab5(0x7c))/0x5+-parseInt(_0x5ecab5(0x6e))/0x6+parseInt(_0x5ecab5(0x67))/0x7+parseInt(_0x5ecab5(0x81))/0x8+parseInt(_0x5ecab5(0x7f))/0x9*(parseInt(_0x5ecab5(0x7a))/0xa);if(_0x21e2f4===_0x3ae5ce)break;else _0xd92ccf['push'](_0xd92ccf['shift']());}catch(_0x4232b7){_0xd92ccf['push'](_0xd92ccf['shift']());}}}(a0_0x3840,0xdc2f4));function a0_0x5722(_0x510d60,_0x28541b){_0x510d60=_0x510d60-0x64;const _0x384009=a0_0x3840();let _0x572237=_0x384009[_0x510d60];return _0x572237;}import{startTerminalUI}from'../src/interfaces/terminal/index.js';const args=process[a0_0x395d08(0x8a)][a0_0x395d08(0x85)](0x2),options={'host':a0_0x395d08(0x8c),'port':0x1f90};for(let i=0x0;i<args[a0_0x395d08(0x77)];i++){const arg=args[i];if(arg===a0_0x395d08(0x64)||arg==='-h')options['host']=args[++i];else{if(arg===a0_0x395d08(0x88)||arg==='-p')options[a0_0x395d08(0x7b)]=parseInt(args[++i],0xa);else arg===a0_0x395d08(0x71)&&(console[a0_0x395d08(0x89)](a0_0x395d08(0x65)),process[a0_0x395d08(0x80)](0x0));}}process[a0_0x395d08(0x83)][a0_0x395d08(0x72)]&&(options[a0_0x395d08(0x87)]=process[a0_0x395d08(0x83)][a0_0x395d08(0x72)]);function a0_0x3840(){const _0x508c91=['localhost','--host','\x0aLoxia\x20Terminal\x20UI\x0a\x0aUsage:\x0a\x20\x20loxia-terminal\x20[options]\x0a\x0aOptions:\x0a\x20\x20--host,\x20-h\x20<host>\x20\x20\x20\x20Backend\x20host\x20(default:\x20localhost)\x0a\x20\x20--port,\x20-p\x20<port>\x20\x20\x20\x20Backend\x20port\x20(default:\x208080)\x0a\x20\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x20message\x0a\x0aEnvironment\x20Variables:\x0a\x20\x20LOXIA_HOST\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Backend\x20host\x0a\x20\x20LOXIA_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Backend\x20port\x0a\x0aExamples:\x0a\x20\x20loxia-terminal\x0a\x20\x20loxia-terminal\x20--host\x20192.168.1.100\x20--port\x203000\x0a\x20\x20LOXIA_HOST=api.example.com\x20LOXIA_PORT=443\x20loxia-terminal\x0a','Please\x20run\x20this\x20command\x20in\x20a\x20real\x20terminal\x20without\x20pipes\x20or\x20redirection:','6587637IFhMiT','\x20\x20npm\x20start','\x0aTerminal\x20UI\x20error:','ERROR:\x20Terminal\x20UI\x20requires\x20an\x20interactive\x20terminal\x20(TTY).','4516WgneUN','stdin','1tDDEAX','1116342RAhuVG','The\x20terminal\x20UI\x20cannot\x20run\x20in:','Starting\x20Loxia\x20Terminal\x20UI...','--help','LOXIA_HOST','\x20\x20-\x20Piped\x20environments\x20(e.g.,\x20|\x20head,\x20|\x20grep)','\x20\x20-\x20Redirected\x20output\x20(e.g.,\x20>\x20file.txt,\x202>&1\x20|\x20...)','LOXIA_PORT','\x20\x20-\x20Background\x20processes\x20(e.g.,\x20&\x20at\x20the\x20end)','length','Press\x20Ctrl+C\x20to\x20exit\x0a','error','290nLNgBD','port','783555vvDfxB','isTTY','catch','198999TqSlkx','exit','6035776XVtYxK','then','env','668278LUnqjP','slice','\x0aTerminal\x20UI\x20exited','host','--port','log','argv','2847WzpVKT'];a0_0x3840=function(){return _0x508c91;};return a0_0x3840();}process[a0_0x395d08(0x83)][a0_0x395d08(0x75)]&&(options[a0_0x395d08(0x7b)]=parseInt(process[a0_0x395d08(0x83)][a0_0x395d08(0x75)],0xa));!process[a0_0x395d08(0x6c)][a0_0x395d08(0x7d)]&&(console['error'](a0_0x395d08(0x6a)),console[a0_0x395d08(0x79)](''),console['error'](a0_0x395d08(0x6f)),console[a0_0x395d08(0x79)](a0_0x395d08(0x73)),console[a0_0x395d08(0x79)](a0_0x395d08(0x74)),console[a0_0x395d08(0x79)](a0_0x395d08(0x76)),console[a0_0x395d08(0x79)]('\x20\x20-\x20Some\x20CI/CD\x20environments'),console[a0_0x395d08(0x79)](''),console[a0_0x395d08(0x79)](a0_0x395d08(0x66)),console[a0_0x395d08(0x79)]('\x20\x20npm\x20run\x20terminal-ui'),console[a0_0x395d08(0x79)](''),console[a0_0x395d08(0x79)]('Or\x20use\x20the\x20web\x20UI\x20instead:'),console['error'](a0_0x395d08(0x68)),process[a0_0x395d08(0x80)](0x1));console[a0_0x395d08(0x89)](a0_0x395d08(0x70)),console[a0_0x395d08(0x89)]('Connecting\x20to:\x20'+options[a0_0x395d08(0x87)]+':'+options[a0_0x395d08(0x7b)]),console[a0_0x395d08(0x89)](a0_0x395d08(0x78));const instance=startTerminalUI(options);instance['waitUntilExit']()[a0_0x395d08(0x82)](()=>{const _0x27b59f=a0_0x395d08;console['log'](_0x27b59f(0x86)),process[_0x27b59f(0x80)](0x0);})[a0_0x395d08(0x7e)](_0x1fa2dd=>{const _0x1e1a2d=a0_0x395d08;console['error'](_0x1e1a2d(0x69),_0x1fa2dd),process[_0x1e1a2d(0x80)](0x1);});
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- function a0_0x2983(_0x3886ba,_0x11b1bf){_0x3886ba=_0x3886ba-0x6b;const _0x4d8960=a0_0x4d89();let _0x298359=_0x4d8960[_0x3886ba];return _0x298359;}const a0_0x1775eb=a0_0x2983;(function(_0x494f6b,_0x1a0c36){const _0x5b3c0f=a0_0x2983,_0x2a71d0=_0x494f6b();while(!![]){try{const _0x3bb9a5=-parseInt(_0x5b3c0f(0x95))/0x1*(-parseInt(_0x5b3c0f(0x9b))/0x2)+parseInt(_0x5b3c0f(0x83))/0x3+-parseInt(_0x5b3c0f(0x8a))/0x4*(-parseInt(_0x5b3c0f(0x6d))/0x5)+-parseInt(_0x5b3c0f(0x79))/0x6+-parseInt(_0x5b3c0f(0x92))/0x7*(-parseInt(_0x5b3c0f(0x93))/0x8)+-parseInt(_0x5b3c0f(0x7e))/0x9+parseInt(_0x5b3c0f(0x9f))/0xa*(parseInt(_0x5b3c0f(0x7f))/0xb);if(_0x3bb9a5===_0x1a0c36)break;else _0x2a71d0['push'](_0x2a71d0['shift']());}catch(_0x471dcf){_0x2a71d0['push'](_0x2a71d0['shift']());}}}(a0_0x4d89,0x669b9));import{spawn}from'child_process';import{fileURLToPath}from'url';import{dirname,join}from'path';import a0_0x3bb7d7 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),rootDir=join(__dirname,'..'),SERVER_PORT=process[a0_0x1775eb(0x73)][a0_0x1775eb(0x6e)]||0x1f90,STARTUP_WAIT=0x7d0;let serverProcess=null;async function checkServerReady(_0x3ec69c=0xa,_0x47f70b=0x1f4){const _0x3babf8=a0_0x1775eb;for(let _0x583282=0x0;_0x583282<_0x3ec69c;_0x583282++){try{return await new Promise((_0x36a01f,_0x477dd7)=>{const _0x1540e8=a0_0x2983,_0x8fc168=a0_0x3bb7d7[_0x1540e8(0x8b)](_0x1540e8(0x7c)+SERVER_PORT+_0x1540e8(0x87),_0x2c286c=>{const _0x2edade=_0x1540e8;_0x2c286c[_0x2edade(0x84)]===0xc8?_0x36a01f():_0x477dd7(new Error('Server\x20returned\x20'+_0x2c286c[_0x2edade(0x84)]));});_0x8fc168['on'](_0x1540e8(0x7d),_0x477dd7),_0x8fc168['setTimeout'](0x3e8,()=>{const _0x5128aa=_0x1540e8;_0x8fc168[_0x5128aa(0x80)](),_0x477dd7(new Error('Timeout'));});}),console[_0x3babf8(0x88)](_0x3babf8(0x75)),!![];}catch(_0x13a35f){_0x583282<_0x3ec69c-0x1&&await new Promise(_0x28b8d4=>setTimeout(_0x28b8d4,_0x47f70b));}}return console[_0x3babf8(0x88)](_0x3babf8(0x7a)),![];}async function startServer(){return new Promise(_0x2982b5=>{const _0x4144ea=a0_0x2983;console['log'](_0x4144ea(0x8d));const _0x112044=join(rootDir,_0x4144ea(0x94),_0x4144ea(0xa0));serverProcess=spawn(_0x4144ea(0x89),[_0x112044],{'cwd':rootDir,'env':{...process[_0x4144ea(0x73)]},'stdio':[_0x4144ea(0x6f),_0x4144ea(0x6b),_0x4144ea(0x6b)],'detached':![]}),serverProcess[_0x4144ea(0x78)]['on']('data',_0x240e06=>{const _0x52ae1a=_0x4144ea,_0x5c3466=_0x240e06[_0x52ae1a(0x8c)]()[_0x52ae1a(0x9c)]();_0x5c3466&&console[_0x52ae1a(0x88)](_0x52ae1a(0x9a)+_0x5c3466);}),serverProcess[_0x4144ea(0x77)]['on'](_0x4144ea(0x86),_0x5cd899=>{const _0x13dddf=_0x4144ea,_0xdb78fb=_0x5cd899[_0x13dddf(0x8c)]()[_0x13dddf(0x9c)]();_0xdb78fb&&!_0xdb78fb[_0x13dddf(0x96)](_0x13dddf(0x81))&&console[_0x13dddf(0x7d)](_0x13dddf(0x98)+_0xdb78fb);}),serverProcess['on'](_0x4144ea(0x7d),_0x41068a=>{const _0x4d4471=_0x4144ea;console[_0x4d4471(0x7d)](_0x4d4471(0x85),_0x41068a['message']),process['exit'](0x1);}),serverProcess['on'](_0x4144ea(0x99),(_0x3e70c7,_0x6f79d7)=>{const _0x59f20b=_0x4144ea;_0x3e70c7!==null&&_0x3e70c7!==0x0&&(console[_0x59f20b(0x7d)](_0x59f20b(0x97)+_0x3e70c7),process['exit'](_0x3e70c7));}),setTimeout(_0x2982b5,STARTUP_WAIT);});}async function startTerminalUI(){const _0x285f63=a0_0x1775eb;console[_0x285f63(0x88)]('🖥️\x20\x20Starting\x20Terminal\x20UI...'),console['log']('');const _0x503ae2=join(rootDir,_0x285f63(0x90),'loxia-terminal.js'),_0x3a5869=spawn(_0x285f63(0x89),[_0x503ae2],{'cwd':rootDir,'env':{...process[_0x285f63(0x73)]},'stdio':_0x285f63(0x6c)});return _0x3a5869['on']('error',_0x202f25=>{const _0x16f596=_0x285f63;console['error'](_0x16f596(0x72),_0x202f25[_0x16f596(0x71)]),cleanup(),process['exit'](0x1);}),_0x3a5869['on'](_0x285f63(0x99),_0x274803=>{const _0x2effd0=_0x285f63;console['log'](_0x2effd0(0x91)),cleanup(),process[_0x2effd0(0x99)](_0x274803||0x0);}),_0x3a5869;}function cleanup(){const _0x4e691e=a0_0x1775eb;serverProcess&&!serverProcess['killed']&&(console[_0x4e691e(0x88)](_0x4e691e(0x9d)),serverProcess[_0x4e691e(0x70)]('SIGTERM'),setTimeout(()=>{const _0x34e583=_0x4e691e;!serverProcess['killed']&&serverProcess[_0x34e583(0x70)](_0x34e583(0x9e));},0x1388));}function a0_0x4d89(){const _0x4f7932=['index.js','SIGINT','pipe','inherit','20BkAhQh','PORT','ignore','kill','message','Failed\x20to\x20start\x20Terminal\x20UI:','env','SIGTERM','✅\x20Server\x20is\x20ready!','\x0a⚠️\x20\x20Received\x20SIGTERM,\x20shutting\x20down...','stderr','stdout','2914182kzpUrq','⚠️\x20\x20Server\x20may\x20not\x20be\x20fully\x20ready,\x20but\x20continuing\x20anyway...','\x0a⚠️\x20\x20Received\x20SIGINT,\x20shutting\x20down...','http://localhost:','error','7242939DqTCik','1750837tpprGy','destroy','ExperimentalWarning','╔════════════════════════════════════════════════╗','1841268fYXdEc','statusCode','Failed\x20to\x20start\x20server:','data','/health','log','node','86168zZAuzy','get','toString','🚀\x20Starting\x20Loxia\x20server...','║\x20\x20\x20Loxia\x20AI\x20Agents\x20-\x20Server\x20+\x20Terminal\x20UI\x20\x20\x20\x20\x20\x20║','Error\x20during\x20startup:','bin','\x0a👋\x20Terminal\x20UI\x20closed.','26733wALyTG','1016gShVOW','src','15BUAqdg','includes','Server\x20exited\x20with\x20code\x20','[SERVER\x20ERROR]\x20','exit','[SERVER]\x20','48886yglSFM','trim','🛑\x20Stopping\x20server...','SIGKILL','10qTOMvi'];a0_0x4d89=function(){return _0x4f7932;};return a0_0x4d89();}process['on'](a0_0x1775eb(0xa1),()=>{const _0x2cb1a0=a0_0x1775eb;console[_0x2cb1a0(0x88)](_0x2cb1a0(0x7b)),cleanup(),process['exit'](0x0);}),process['on'](a0_0x1775eb(0x74),()=>{const _0x151ff5=a0_0x1775eb;console[_0x151ff5(0x88)](_0x151ff5(0x76)),cleanup(),process[_0x151ff5(0x99)](0x0);}),process['on'](a0_0x1775eb(0x99),()=>{cleanup();});async function main(){const _0x4ce4d6=a0_0x1775eb;console[_0x4ce4d6(0x88)](_0x4ce4d6(0x82)),console[_0x4ce4d6(0x88)](_0x4ce4d6(0x8e)),console[_0x4ce4d6(0x88)]('╚════════════════════════════════════════════════╝'),console[_0x4ce4d6(0x88)]('');try{await startServer(),await checkServerReady(),await startTerminalUI(),await new Promise(()=>{});}catch(_0x413283){console[_0x4ce4d6(0x7d)](_0x4ce4d6(0x8f),_0x413283['message']),cleanup(),process['exit'](0x1);}}main();
3
+ const a0_0x4b5aba=a0_0x1807;(function(_0x43a804,_0x762631){const _0x4ff910=a0_0x1807,_0x2d45a1=_0x43a804();while(!![]){try{const _0x4d6aa2=parseInt(_0x4ff910(0x1d7))/0x1+parseInt(_0x4ff910(0x1b2))/0x2*(-parseInt(_0x4ff910(0x1c3))/0x3)+parseInt(_0x4ff910(0x1c5))/0x4*(-parseInt(_0x4ff910(0x1b1))/0x5)+parseInt(_0x4ff910(0x1d0))/0x6*(parseInt(_0x4ff910(0x1e0))/0x7)+-parseInt(_0x4ff910(0x1d9))/0x8*(-parseInt(_0x4ff910(0x1de))/0x9)+-parseInt(_0x4ff910(0x1d8))/0xa*(parseInt(_0x4ff910(0x1c1))/0xb)+-parseInt(_0x4ff910(0x1df))/0xc*(-parseInt(_0x4ff910(0x1bd))/0xd);if(_0x4d6aa2===_0x762631)break;else _0x2d45a1['push'](_0x2d45a1['shift']());}catch(_0x2bcf0d){_0x2d45a1['push'](_0x2d45a1['shift']());}}}(a0_0x4f47,0x970be));import{spawn}from'child_process';import{fileURLToPath}from'url';import{dirname,join}from'path';function a0_0x1807(_0x58e6eb,_0x41f3ee){_0x58e6eb=_0x58e6eb-0x1b0;const _0x4f476e=a0_0x4f47();let _0x1807ec=_0x4f476e[_0x58e6eb];return _0x1807ec;}import a0_0xa5ffd2 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),rootDir=join(__dirname,'..'),SERVER_PORT=process[a0_0x4b5aba(0x1b7)][a0_0x4b5aba(0x1e2)]||0x1f90,STARTUP_WAIT=0x7d0;let serverProcess=null;async function checkServerReady(_0x3a6744=0xa,_0x51ab07=0x1f4){const _0x1d991c=a0_0x4b5aba;for(let _0x56e856=0x0;_0x56e856<_0x3a6744;_0x56e856++){try{return await new Promise((_0x4bd2af,_0x3dddf6)=>{const _0x33b6c5=a0_0x1807,_0x1915f2=a0_0xa5ffd2[_0x33b6c5(0x1da)](_0x33b6c5(0x1c2)+SERVER_PORT+'/health',_0x43f51b=>{const _0x492659=_0x33b6c5;_0x43f51b['statusCode']===0xc8?_0x4bd2af():_0x3dddf6(new Error(_0x492659(0x1d4)+_0x43f51b[_0x492659(0x1db)]));});_0x1915f2['on'](_0x33b6c5(0x1ba),_0x3dddf6),_0x1915f2[_0x33b6c5(0x1ca)](0x3e8,()=>{const _0x57e9ab=_0x33b6c5;_0x1915f2[_0x57e9ab(0x1d5)](),_0x3dddf6(new Error(_0x57e9ab(0x1c7)));});}),console[_0x1d991c(0x1b5)](_0x1d991c(0x1c4)),!![];}catch(_0x47d78c){_0x56e856<_0x3a6744-0x1&&await new Promise(_0x3e9b03=>setTimeout(_0x3e9b03,_0x51ab07));}}return console['log'](_0x1d991c(0x1e4)),![];}async function startServer(){return new Promise(_0x420a27=>{const _0x4fc983=a0_0x1807;console[_0x4fc983(0x1b5)]('🚀\x20Starting\x20Loxia\x20server...');const _0x1533b1=join(rootDir,_0x4fc983(0x1c8),'index.js');serverProcess=spawn(_0x4fc983(0x1d2),[_0x1533b1],{'cwd':rootDir,'env':{...process[_0x4fc983(0x1b7)]},'stdio':[_0x4fc983(0x1dd),_0x4fc983(0x1cc),_0x4fc983(0x1cc)],'detached':![]}),serverProcess[_0x4fc983(0x1c0)]['on'](_0x4fc983(0x1d6),_0x36fe14=>{const _0x235ab1=_0x4fc983,_0x8eb67=_0x36fe14['toString']()['trim']();_0x8eb67&&console[_0x235ab1(0x1b5)]('[SERVER]\x20'+_0x8eb67);}),serverProcess[_0x4fc983(0x1bf)]['on']('data',_0x2adc7a=>{const _0x2131f4=_0x4fc983,_0x1c4e67=_0x2adc7a['toString']()['trim']();_0x1c4e67&&!_0x1c4e67[_0x2131f4(0x1b0)](_0x2131f4(0x1b6))&&console[_0x2131f4(0x1ba)](_0x2131f4(0x1d3)+_0x1c4e67);}),serverProcess['on']('error',_0x2921df=>{const _0x441a2f=_0x4fc983;console[_0x441a2f(0x1ba)]('Failed\x20to\x20start\x20server:',_0x2921df[_0x441a2f(0x1c6)]),process[_0x441a2f(0x1b9)](0x1);}),serverProcess['on']('exit',(_0x46fd48,_0x476d3f)=>{const _0x227ab3=_0x4fc983;_0x46fd48!==null&&_0x46fd48!==0x0&&(console[_0x227ab3(0x1ba)]('Server\x20exited\x20with\x20code\x20'+_0x46fd48),process[_0x227ab3(0x1b9)](_0x46fd48));}),setTimeout(_0x420a27,STARTUP_WAIT);});}async function startTerminalUI(){const _0x416d37=a0_0x4b5aba;console['log'](_0x416d37(0x1d1)),console[_0x416d37(0x1b5)]('');const _0x33074f=join(rootDir,_0x416d37(0x1bc),_0x416d37(0x1cf)),_0x440797=spawn(_0x416d37(0x1d2),[_0x33074f],{'cwd':rootDir,'env':{...process[_0x416d37(0x1b7)]},'stdio':_0x416d37(0x1cd)});return _0x440797['on'](_0x416d37(0x1ba),_0xe9bde7=>{const _0x3bc5db=_0x416d37;console[_0x3bc5db(0x1ba)](_0x3bc5db(0x1ce),_0xe9bde7[_0x3bc5db(0x1c6)]),cleanup(),process[_0x3bc5db(0x1b9)](0x1);}),_0x440797['on'](_0x416d37(0x1b9),_0x240fd6=>{const _0xf92e21=_0x416d37;console[_0xf92e21(0x1b5)](_0xf92e21(0x1e3)),cleanup(),process[_0xf92e21(0x1b9)](_0x240fd6||0x0);}),_0x440797;}function a0_0x4f47(){const _0x42fecc=['3510ImBWjY','╚════════════════════════════════════════════════╝','stderr','stdout','187ScVJnx','http://localhost:','3CouZsN','✅\x20Server\x20is\x20ready!','4LVZQIS','message','Timeout','src','SIGKILL','setTimeout','║\x20\x20\x20Loxia\x20AI\x20Agents\x20-\x20Server\x20+\x20Terminal\x20UI\x20\x20\x20\x20\x20\x20║','pipe','inherit','Failed\x20to\x20start\x20Terminal\x20UI:','loxia-terminal.js','24oSTyRj','🖥️\x20\x20Starting\x20Terminal\x20UI...','node','[SERVER\x20ERROR]\x20','Server\x20returned\x20','destroy','data','227509ledgHB','56010jlCnXB','727400herQIE','get','statusCode','\x0a⚠️\x20\x20Received\x20SIGTERM,\x20shutting\x20down...','ignore','27zLegOk','50916eUPPIG','1395982YUusMY','killed','PORT','\x0a👋\x20Terminal\x20UI\x20closed.','⚠️\x20\x20Server\x20may\x20not\x20be\x20fully\x20ready,\x20but\x20continuing\x20anyway...','SIGTERM','includes','4949705NJyzfb','1479508lwKlqF','kill','🛑\x20Stopping\x20server...','log','ExperimentalWarning','env','SIGINT','exit','error','╔════════════════════════════════════════════════╗','bin'];a0_0x4f47=function(){return _0x42fecc;};return a0_0x4f47();}function cleanup(){const _0x53c7ed=a0_0x4b5aba;serverProcess&&!serverProcess[_0x53c7ed(0x1e1)]&&(console[_0x53c7ed(0x1b5)](_0x53c7ed(0x1b4)),serverProcess[_0x53c7ed(0x1b3)](_0x53c7ed(0x1e5)),setTimeout(()=>{const _0x271c0d=_0x53c7ed;!serverProcess[_0x271c0d(0x1e1)]&&serverProcess['kill'](_0x271c0d(0x1c9));},0x1388));}process['on'](a0_0x4b5aba(0x1b8),()=>{const _0x298f89=a0_0x4b5aba;console[_0x298f89(0x1b5)]('\x0a⚠️\x20\x20Received\x20SIGINT,\x20shutting\x20down...'),cleanup(),process[_0x298f89(0x1b9)](0x0);}),process['on'](a0_0x4b5aba(0x1e5),()=>{const _0xc9d299=a0_0x4b5aba;console[_0xc9d299(0x1b5)](_0xc9d299(0x1dc)),cleanup(),process[_0xc9d299(0x1b9)](0x0);}),process['on'](a0_0x4b5aba(0x1b9),()=>{cleanup();});async function main(){const _0x2da982=a0_0x4b5aba;console[_0x2da982(0x1b5)](_0x2da982(0x1bb)),console[_0x2da982(0x1b5)](_0x2da982(0x1cb)),console['log'](_0x2da982(0x1be)),console['log']('');try{await startServer(),await checkServerReady(),await startTerminalUI(),await new Promise(()=>{});}catch(_0x3a7632){console['error']('Error\x20during\x20startup:',_0x3a7632[_0x2da982(0x1c6)]),cleanup(),process[_0x2da982(0x1b9)](0x1);}}main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loxia-labs/loxia-autopilot-one",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "description": "Loxia AI Agents System - No-code/vibe-code/companion-coder platform",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a0_0x4b4a5e=a0_0x1490;(function(_0x1ab850,_0x35fd63){const _0x28d16e=a0_0x1490,_0x141487=_0x1ab850();while(!![]){try{const _0xf0d71f=-parseInt(_0x28d16e(0x17e))/0x1*(parseInt(_0x28d16e(0x176))/0x2)+parseInt(_0x28d16e(0x150))/0x3*(-parseInt(_0x28d16e(0x17f))/0x4)+parseInt(_0x28d16e(0x160))/0x5+parseInt(_0x28d16e(0x162))/0x6+parseInt(_0x28d16e(0x188))/0x7+-parseInt(_0x28d16e(0x14f))/0x8+parseInt(_0x28d16e(0x184))/0x9*(parseInt(_0x28d16e(0x161))/0xa);if(_0xf0d71f===_0x35fd63)break;else _0x141487['push'](_0x141487['shift']());}catch(_0x181488){_0x141487['push'](_0x141487['shift']());}}}(a0_0x169a,0xd7079));import{exec}from'child_process';function a0_0x169a(){const _0x1aa626=['log','v1.55.0','🐍\x20Checking\x20Python\x20scanners...','═══════════════════════════════════════════════════════════\x0a','semgrep','\x20\x20Installation\x20Complete','❌\x20Installation\x20failed:','then','\x20\x20\x20Please\x20install\x20manually:\x20https://semgrep.dev/docs/getting-started/\x0a','close','\x20\x20\x20pip\x20install\x20semgrep\x0a','\x20\x20\x20Run:\x20npm\x20install\x20--save-dev\x20eslint-plugin-security\x0a','Failed\x20to\x20download:\x20HTTP\x20','🔍\x20Installing\x20Semgrep...','3536285WzPEFC','3356220SzXHFq','5560950PBhzJT','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20','\x20-m\x20pip\x20show\x20','\x20\x20\x20Installing\x20','\x20\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit\x20checkov\x20yamllint\x0a','\x20\x20\x20✅\x20','headers','promises','\x20installed\x20successfully','python3\x20--version','\x20\x20Installing\x20Security\x20Scanners','\x20\x20\x20✅\x20Python\x20found:\x20','error','📦\x20Checking\x20ESLint\x20Security\x20Plugin...','...','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20semgrep\x0a','message','trim','chmod','\x20\x20\x20⚠️\x20\x20Python\x20not\x20found\x20-\x20skipping\x20Python\x20scanners','75234vaGWsH','get','startsWith','catch','stdout','\x20\x20\x20Downloading\x20from\x20','python\x20--version','\x0a═══════════════════════════════════════════════════════════','35cOULYi','4OLqDPw','unlink','\x20\x20\x20✅\x20Semgrep\x20installed\x20successfully','url','\x20-m\x20pip\x20install\x20--user\x20','9hLvAsl','mkdir','\x20\x20npm\x20install\x20--save-dev\x20eslint-plugin-security','semgrep\x20--version','7505561QcbXfR','═══════════════════════════════════════════════════════════','statusCode','\x20\x20\x20Location:\x20','checkov','\x20\x20\x20Semgrep\x20not\x20found\x20in\x20PATH,\x20installing\x20standalone\x20binary...','dirname','python','yamllint','\x20\x20\x20Using\x20system-installed\x20Semgrep\x0a','join','node_modules','1307744SiHnBj','2043309QObrlc','location'];a0_0x169a=function(){return _0x1aa626;};return a0_0x169a();}import{promisify}from'util';import a0_0x317743 from'https';import a0_0x524f7b from'http';import a0_0x26eb04 from'fs';import a0_0x17eea3 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_0x17eea3[a0_0x4b4a5e(0x18e)](__filename),SCANNER_DIR=a0_0x17eea3[a0_0x4b4a5e(0x192)](__dirname,'..',a0_0x4b4a5e(0x193),'.scanners'),SEMGREP_VERSION=a0_0x4b4a5e(0x153);console[a0_0x4b4a5e(0x152)](a0_0x4b4a5e(0x189)),console[a0_0x4b4a5e(0x152)](a0_0x4b4a5e(0x16c)),console['log'](a0_0x4b4a5e(0x155));async function installScanners(){const _0x4fb9d5=a0_0x4b4a5e;await a0_0x26eb04['promises'][_0x4fb9d5(0x185)](SCANNER_DIR,{'recursive':!![]}),await checkESLintSecurity(),await installSemgrep(),await installPythonScanners(),console['log'](_0x4fb9d5(0x17d)),console['log'](_0x4fb9d5(0x157)),console['log'](_0x4fb9d5(0x155));}async function checkESLintSecurity(){const _0x5baeb5=a0_0x4b4a5e;console['log'](_0x5baeb5(0x16f));try{await import('eslint-plugin-security'),console[_0x5baeb5(0x152)]('\x20\x20\x20✅\x20eslint-plugin-security\x20is\x20installed\x0a');}catch(_0x45e5c2){console[_0x5baeb5(0x152)]('\x20\x20\x20⚠️\x20\x20eslint-plugin-security\x20not\x20found'),console[_0x5baeb5(0x152)](_0x5baeb5(0x15d));}}async function installSemgrep(){const _0x15bbee=a0_0x4b4a5e;console[_0x15bbee(0x152)](_0x15bbee(0x15f));const _0x1a5cae=process['platform'],_0x502b7e=process['arch'];try{const _0xc4b779=await execAsync(_0x15bbee(0x187),{'timeout':0x1388});console['log']('\x20\x20\x20✅\x20Semgrep\x20already\x20installed:\x20'+_0xc4b779[_0x15bbee(0x17a)][_0x15bbee(0x173)]()),console[_0x15bbee(0x152)](_0x15bbee(0x191));return;}catch(_0x18323d){console[_0x15bbee(0x152)](_0x15bbee(0x18d));}const _0x52237c=getSemgrepBinaryInfo(_0x1a5cae,_0x502b7e);if(!_0x52237c){console[_0x15bbee(0x152)]('\x20\x20\x20⚠️\x20\x20No\x20Semgrep\x20binary\x20available\x20for\x20'+_0x1a5cae+'-'+_0x502b7e),console[_0x15bbee(0x152)](_0x15bbee(0x15a));return;}try{const _0x5f1d8c=a0_0x17eea3[_0x15bbee(0x192)](SCANNER_DIR,_0x15bbee(0x156));console['log'](_0x15bbee(0x17b)+_0x52237c[_0x15bbee(0x182)]+_0x15bbee(0x170)),await downloadFile(_0x52237c[_0x15bbee(0x182)],_0x5f1d8c),await a0_0x26eb04[_0x15bbee(0x169)][_0x15bbee(0x174)](_0x5f1d8c,0x1ed),console['log'](_0x15bbee(0x181)),console[_0x15bbee(0x152)](_0x15bbee(0x18b)+_0x5f1d8c+'\x0a'),console[_0x15bbee(0x152)]('\x20\x20\x20Note:\x20To\x20use\x20system-wide,\x20add\x20to\x20PATH\x20or\x20install\x20globally:'),console[_0x15bbee(0x152)](_0x15bbee(0x15c));}catch(_0xf69d03){console[_0x15bbee(0x152)]('\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20Semgrep:\x20'+_0xf69d03['message']),console['log'](_0x15bbee(0x171));}}function a0_0x1490(_0x4916aa,_0x685829){_0x4916aa=_0x4916aa-0x14f;const _0x169a01=a0_0x169a();let _0x1490d0=_0x169a01[_0x4916aa];return _0x1490d0;}function getSemgrepBinaryInfo(_0x24dcb9,_0xd103f8){return null;}async function installPythonScanners(){const _0x5e7b8d=a0_0x4b4a5e;console[_0x5e7b8d(0x152)](_0x5e7b8d(0x154));let _0x5a1167=null;try{await execAsync(_0x5e7b8d(0x16b),{'timeout':0x1388}),_0x5a1167='python3';}catch(_0x2354c0){try{await execAsync(_0x5e7b8d(0x17c),{'timeout':0x1388}),_0x5a1167=_0x5e7b8d(0x18f);}catch(_0x1962bc){console[_0x5e7b8d(0x152)](_0x5e7b8d(0x175)),console[_0x5e7b8d(0x152)]('\x20\x20\x20To\x20enable\x20Python\x20scanning,\x20install\x20Python\x20and\x20run:'),console[_0x5e7b8d(0x152)](_0x5e7b8d(0x166));return;}}console['log'](_0x5e7b8d(0x16d)+_0x5a1167),await installViaPip(_0x5e7b8d(0x156),_0x5a1167),await installViaPip('bandit',_0x5a1167),await installViaPip('pip-audit',_0x5a1167),await installViaPip(_0x5e7b8d(0x18c),_0x5a1167),await installViaPip(_0x5e7b8d(0x190),_0x5a1167),console[_0x5e7b8d(0x152)]('');}async function installViaPip(_0x57c211,_0x272195){const _0x50f9ec=a0_0x4b4a5e;try{const _0x4e7fda=await execAsync(_0x272195+_0x50f9ec(0x164)+_0x57c211,{'timeout':0x1388});return console[_0x50f9ec(0x152)]('\x20\x20\x20✅\x20'+_0x57c211+'\x20already\x20installed'),!![];}catch(_0x1863ab){console[_0x50f9ec(0x152)](_0x50f9ec(0x165)+_0x57c211+'...');try{return await execAsync(_0x272195+_0x50f9ec(0x183)+_0x57c211,{'timeout':0xea60}),console[_0x50f9ec(0x152)](_0x50f9ec(0x167)+_0x57c211+_0x50f9ec(0x16a)),!![];}catch(_0x12cf72){return console[_0x50f9ec(0x152)](_0x50f9ec(0x163)+_0x57c211+':\x20'+_0x12cf72[_0x50f9ec(0x172)]),console[_0x50f9ec(0x152)]('\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20'+_0x57c211),![];}}}async function downloadFile(_0x193038,_0x1c4a01){return new Promise((_0x33ab40,_0x16ae02)=>{const _0x531b7f=a0_0x1490,_0x3fdc33=_0x193038[_0x531b7f(0x178)]('https')?a0_0x317743:a0_0x524f7b;_0x3fdc33[_0x531b7f(0x177)](_0x193038,_0x1c1ce5=>{const _0xe2977a=_0x531b7f;if(_0x1c1ce5[_0xe2977a(0x18a)]===0x12e||_0x1c1ce5[_0xe2977a(0x18a)]===0x12d){downloadFile(_0x1c1ce5[_0xe2977a(0x168)][_0xe2977a(0x151)],_0x1c4a01)[_0xe2977a(0x159)](_0x33ab40)[_0xe2977a(0x179)](_0x16ae02);return;}if(_0x1c1ce5[_0xe2977a(0x18a)]!==0xc8){_0x16ae02(new Error(_0xe2977a(0x15e)+_0x1c1ce5[_0xe2977a(0x18a)]));return;}const _0x1852be=createWriteStream(_0x1c4a01);_0x1c1ce5['pipe'](_0x1852be),_0x1852be['on']('finish',()=>{const _0x13c173=_0xe2977a;_0x1852be[_0x13c173(0x15b)](),_0x33ab40();}),_0x1852be['on'](_0xe2977a(0x16e),_0x325351=>{const _0x5887f0=_0xe2977a;a0_0x26eb04[_0x5887f0(0x180)](_0x1c4a01,()=>{}),_0x16ae02(_0x325351);});})['on'](_0x531b7f(0x16e),_0x16ae02);});}installScanners()['catch'](_0x21e0ac=>{const _0x5bb720=a0_0x4b4a5e;console['error'](_0x5bb720(0x158),_0x21e0ac[_0x5bb720(0x172)]),console[_0x5bb720(0x16e)]('\x0aYou\x20can\x20manually\x20install\x20scanners:'),console[_0x5bb720(0x16e)](_0x5bb720(0x186)),console['error']('\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit'),process['exit'](0x0);});
2
+ const a0_0x614b74=a0_0x154e;(function(_0x319a8f,_0x249096){const _0x2af3ae=a0_0x154e,_0xaa7be4=_0x319a8f();while(!![]){try{const _0xadc1a9=-parseInt(_0x2af3ae(0xa1))/0x1*(-parseInt(_0x2af3ae(0xa7))/0x2)+parseInt(_0x2af3ae(0xbc))/0x3+parseInt(_0x2af3ae(0x7d))/0x4*(parseInt(_0x2af3ae(0x89))/0x5)+parseInt(_0x2af3ae(0xa4))/0x6+-parseInt(_0x2af3ae(0xb1))/0x7+-parseInt(_0x2af3ae(0xbb))/0x8+-parseInt(_0x2af3ae(0x80))/0x9;if(_0xadc1a9===_0x249096)break;else _0xaa7be4['push'](_0xaa7be4['shift']());}catch(_0x4715b9){_0xaa7be4['push'](_0xaa7be4['shift']());}}}(a0_0x4afc,0xa1274));import{exec}from'child_process';import{promisify}from'util';import a0_0x2ba046 from'https';import a0_0x4d8458 from'http';import a0_0x51039c from'fs';import a0_0x270876 from'path';function a0_0x4afc(){const _0x5beb7c=['\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20Semgrep:\x20','stdout','join','unlink','.scanners','\x20\x20Installing\x20Security\x20Scanners','Failed\x20to\x20download:\x20HTTP\x20','https','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20','1626704HGUfuM','═══════════════════════════════════════════════════════════','exit','298350YAUFPP','semgrep','python3\x20--version','finish','\x20\x20\x20To\x20enable\x20Python\x20scanning,\x20install\x20Python\x20and\x20run:','═══════════════════════════════════════════════════════════\x0a','bandit','pip-audit','headers','10ctqplw','\x20-m\x20pip\x20install\x20--user\x20','log','\x0a═══════════════════════════════════════════════════════════','startsWith','\x20\x20\x20Note:\x20To\x20use\x20system-wide,\x20add\x20to\x20PATH\x20or\x20install\x20globally:','\x20-m\x20pip\x20show\x20','v1.55.0','python3','arch','python','\x20\x20\x20Downloading\x20from\x20','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20','node_modules','\x20already\x20installed','error','\x20\x20Installation\x20Complete','\x20\x20\x20✅\x20','\x20\x20\x20Using\x20system-installed\x20Semgrep\x0a','get','eslint-plugin-security','\x20\x20\x20Installing\x20','python\x20--version','catch','16124qjnfJR','\x20\x20\x20⚠️\x20\x20No\x20Semgrep\x20binary\x20available\x20for\x20','message','4482720MYttYK','semgrep\x20--version','\x20\x20\x20✅\x20Python\x20found:\x20','2YqzHmj','mkdir','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20semgrep\x0a','❌\x20Installation\x20failed:','🔍\x20Installing\x20Semgrep...','pipe','\x20\x20\x20Run:\x20npm\x20install\x20--save-dev\x20eslint-plugin-security\x0a','promises','\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit','statusCode','3471531SFyYJF','\x20\x20\x20Semgrep\x20not\x20found\x20in\x20PATH,\x20installing\x20standalone\x20binary...','\x20\x20npm\x20install\x20--save-dev\x20eslint-plugin-security','\x20\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit\x20checkov\x20yamllint\x0a','\x20\x20\x20✅\x20Semgrep\x20already\x20installed:\x20','yamllint','\x20installed\x20successfully','\x20\x20\x20⚠️\x20\x20Python\x20not\x20found\x20-\x20skipping\x20Python\x20scanners','close','dirname','7502960ezyjZV','1651323sIGztK','🐍\x20Checking\x20Python\x20scanners...','\x20\x20\x20✅\x20Semgrep\x20installed\x20successfully','\x0aYou\x20can\x20manually\x20install\x20scanners:','url','trim'];a0_0x4afc=function(){return _0x5beb7c;};return a0_0x4afc();}import{fileURLToPath}from'url';import{createWriteStream}from'fs';import{pipeline}from'stream/promises';const execAsync=promisify(exec),__filename=fileURLToPath(import.meta.url),__dirname=a0_0x270876[a0_0x614b74(0xba)](__filename),SCANNER_DIR=a0_0x270876[a0_0x614b74(0xc4)](__dirname,'..',a0_0x614b74(0x96),a0_0x614b74(0xc6)),SEMGREP_VERSION=a0_0x614b74(0x90);console['log'](a0_0x614b74(0x7e)),console[a0_0x614b74(0x8b)](a0_0x614b74(0xc7)),console['log'](a0_0x614b74(0x85));async function installScanners(){const _0x446b7c=a0_0x614b74;await a0_0x51039c['promises'][_0x446b7c(0xa8)](SCANNER_DIR,{'recursive':!![]}),await checkESLintSecurity(),await installSemgrep(),await installPythonScanners(),console['log'](_0x446b7c(0x8c)),console['log'](_0x446b7c(0x99)),console[_0x446b7c(0x8b)](_0x446b7c(0x85));}async function checkESLintSecurity(){const _0x37c9c0=a0_0x614b74;console[_0x37c9c0(0x8b)]('📦\x20Checking\x20ESLint\x20Security\x20Plugin...');try{await import(_0x37c9c0(0x9d)),console[_0x37c9c0(0x8b)]('\x20\x20\x20✅\x20eslint-plugin-security\x20is\x20installed\x0a');}catch(_0x5954b9){console[_0x37c9c0(0x8b)]('\x20\x20\x20⚠️\x20\x20eslint-plugin-security\x20not\x20found'),console[_0x37c9c0(0x8b)](_0x37c9c0(0xad));}}async function installSemgrep(){const _0x47b9ea=a0_0x614b74;console[_0x47b9ea(0x8b)](_0x47b9ea(0xab));const _0x25e37e=process['platform'],_0x57d14e=process[_0x47b9ea(0x92)];try{const _0x1cfbda=await execAsync(_0x47b9ea(0xa5),{'timeout':0x1388});console['log'](_0x47b9ea(0xb5)+_0x1cfbda[_0x47b9ea(0xc3)][_0x47b9ea(0xc1)]()),console[_0x47b9ea(0x8b)](_0x47b9ea(0x9b));return;}catch(_0x2c6953){console[_0x47b9ea(0x8b)](_0x47b9ea(0xb2));}const _0x1548e4=getSemgrepBinaryInfo(_0x25e37e,_0x57d14e);if(!_0x1548e4){console[_0x47b9ea(0x8b)](_0x47b9ea(0xa2)+_0x25e37e+'-'+_0x57d14e),console['log']('\x20\x20\x20Please\x20install\x20manually:\x20https://semgrep.dev/docs/getting-started/\x0a');return;}try{const _0x372773=a0_0x270876[_0x47b9ea(0xc4)](SCANNER_DIR,_0x47b9ea(0x81));console[_0x47b9ea(0x8b)](_0x47b9ea(0x94)+_0x1548e4[_0x47b9ea(0xc0)]+'...'),await downloadFile(_0x1548e4[_0x47b9ea(0xc0)],_0x372773),await a0_0x51039c[_0x47b9ea(0xae)]['chmod'](_0x372773,0x1ed),console['log'](_0x47b9ea(0xbe)),console[_0x47b9ea(0x8b)]('\x20\x20\x20Location:\x20'+_0x372773+'\x0a'),console[_0x47b9ea(0x8b)](_0x47b9ea(0x8e)),console[_0x47b9ea(0x8b)]('\x20\x20\x20pip\x20install\x20semgrep\x0a');}catch(_0xb2f2bf){console[_0x47b9ea(0x8b)](_0x47b9ea(0xc2)+_0xb2f2bf[_0x47b9ea(0xa3)]),console['log'](_0x47b9ea(0xa9));}}function getSemgrepBinaryInfo(_0x1110fa,_0x28dc3f){return null;}async function installPythonScanners(){const _0x50d7ae=a0_0x614b74;console[_0x50d7ae(0x8b)](_0x50d7ae(0xbd));let _0x2c2d34=null;try{await execAsync(_0x50d7ae(0x82),{'timeout':0x1388}),_0x2c2d34=_0x50d7ae(0x91);}catch(_0x19557e){try{await execAsync(_0x50d7ae(0x9f),{'timeout':0x1388}),_0x2c2d34=_0x50d7ae(0x93);}catch(_0x41d5af){console[_0x50d7ae(0x8b)](_0x50d7ae(0xb8)),console[_0x50d7ae(0x8b)](_0x50d7ae(0x84)),console['log'](_0x50d7ae(0xb4));return;}}console[_0x50d7ae(0x8b)](_0x50d7ae(0xa6)+_0x2c2d34),await installViaPip(_0x50d7ae(0x81),_0x2c2d34),await installViaPip(_0x50d7ae(0x86),_0x2c2d34),await installViaPip(_0x50d7ae(0x87),_0x2c2d34),await installViaPip('checkov',_0x2c2d34),await installViaPip(_0x50d7ae(0xb6),_0x2c2d34),console['log']('');}async function installViaPip(_0x281252,_0xc711f1){const _0x2faa86=a0_0x614b74;try{const _0x3c2046=await execAsync(_0xc711f1+_0x2faa86(0x8f)+_0x281252,{'timeout':0x1388});return console[_0x2faa86(0x8b)](_0x2faa86(0x9a)+_0x281252+_0x2faa86(0x97)),!![];}catch(_0x3d4837){console[_0x2faa86(0x8b)](_0x2faa86(0x9e)+_0x281252+'...');try{return await execAsync(_0xc711f1+_0x2faa86(0x8a)+_0x281252,{'timeout':0xea60}),console[_0x2faa86(0x8b)](_0x2faa86(0x9a)+_0x281252+_0x2faa86(0xb7)),!![];}catch(_0x363d51){return console[_0x2faa86(0x8b)](_0x2faa86(0x7c)+_0x281252+':\x20'+_0x363d51[_0x2faa86(0xa3)]),console['log'](_0x2faa86(0x95)+_0x281252),![];}}}function a0_0x154e(_0x4c8720,_0x593b60){_0x4c8720=_0x4c8720-0x7c;const _0x4afc7a=a0_0x4afc();let _0x154e51=_0x4afc7a[_0x4c8720];return _0x154e51;}async function downloadFile(_0x57d263,_0x37c1cd){return new Promise((_0x5529c7,_0x473eb7)=>{const _0x1b31fe=a0_0x154e,_0x197ea9=_0x57d263[_0x1b31fe(0x8d)](_0x1b31fe(0xc9))?a0_0x2ba046:a0_0x4d8458;_0x197ea9[_0x1b31fe(0x9c)](_0x57d263,_0x3b084e=>{const _0x237e69=_0x1b31fe;if(_0x3b084e[_0x237e69(0xb0)]===0x12e||_0x3b084e[_0x237e69(0xb0)]===0x12d){downloadFile(_0x3b084e[_0x237e69(0x88)]['location'],_0x37c1cd)['then'](_0x5529c7)['catch'](_0x473eb7);return;}if(_0x3b084e[_0x237e69(0xb0)]!==0xc8){_0x473eb7(new Error(_0x237e69(0xc8)+_0x3b084e[_0x237e69(0xb0)]));return;}const _0x5e30b0=createWriteStream(_0x37c1cd);_0x3b084e[_0x237e69(0xac)](_0x5e30b0),_0x5e30b0['on'](_0x237e69(0x83),()=>{const _0x59c1f1=_0x237e69;_0x5e30b0[_0x59c1f1(0xb9)](),_0x5529c7();}),_0x5e30b0['on'](_0x237e69(0x98),_0x1f7a32=>{const _0xf41f21=_0x237e69;a0_0x51039c[_0xf41f21(0xc5)](_0x37c1cd,()=>{}),_0x473eb7(_0x1f7a32);});})['on'](_0x1b31fe(0x98),_0x473eb7);});}installScanners()[a0_0x614b74(0xa0)](_0x20bb17=>{const _0x2a9aa7=a0_0x614b74;console['error'](_0x2a9aa7(0xaa),_0x20bb17['message']),console['error'](_0x2a9aa7(0xbf)),console[_0x2a9aa7(0x98)](_0x2a9aa7(0xb3)),console[_0x2a9aa7(0x98)](_0x2a9aa7(0xaf)),process[_0x2a9aa7(0x7f)](0x0);});
@@ -1 +1 @@
1
- function a0_0x413b(){const _0x3c1263=['B3b0Aw1PEMu','CMvHC29U','C291CMnL','Bg9Nz2vY','rvjst1i','BMCTzgvLCa','ChjVy2vZCW','BwL4Aw4','C3r5BgvSAw50lwnVBMzPzY1ZDgfUzgfYza','zNvUy3rPB24','n05vzwDPBa','CM9VDa','y2HLy2TtEw50yxG','Cg9ZDgnZCY1Zy3nZ','mJmZnZi5nNn5B3b2ta','zM9YD2fYza','zM9Y','BgLUzq','lMnZCW','BgLUDfn0EwXLCW','mtGXmZm0nLfWzKLpAW','ofDUCerNCa','Cg9ZDgnZCW','lNnHC3m','ug9ZDentuYbZEw50yxGGy2HLy2SGCgfZC2vK','zwfJAa','zgvMyxvSDa','Aw5JBhvKzxm','C2v2zxjPDhK','Cg9ZDgnZCY1SzxnZ','qKvtvf9quKfdveLdrq','C3r5BgvSAw50','BM8TAw52ywXPza','ChvZAa','C3vWCg9YDhnbDxrVrML4','q0furuDpuLK','q1ntigfUywX5C2LZignVBxbSzxrLza','BgvZCW','BgLUDa','l15JDxn0B20TlW','Dw5RBM93BG','C3LUDgf4','CNvSzq','zM9YBwf0ug9ZDentu0vYCM9Y','ndC0mJa1mKDwrMjZDG','mZe0otu0ndbWu2Put1i','zgvIDwC','zw5KC1DPDgG','v0fstKLorW','DxnL','ntC4ntaWmMv4tvjfzG','BM8TDw5RBM93BG','u3r5BgvSAw50igfUywX5C2LZigzHAwXLza','BgvUz3rO','y29UDgvUDa','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','BwvZC2fNzq','zMLSDgvY','Cg9ZDgnZC0XLC3m','CMvZDwX0CW','CMvJB21Tzw5Kzwq','y29SDw1U','BMfTzq','y2f0zwDVCML6zvn0EwXLBgLUDfj1Bgu','u1rzteu','CgvYzM9YBwfUy2u','mZu2mdK3m25ywNbxCq','BM8Tzw1WDhK','lMXLC3m','Bg93zxi','u0vwrvjjvfK','mJyYmZvyz2jrvxa','mujgzxDOqq','u1Lovefy','D2fYBMLUz3m','yMvZDc1WCMfJDgLJzq','C2nZCW'];a0_0x413b=function(){return _0x3c1263;};return a0_0x413b();}function a0_0x13d2(_0x546047,_0x270734){_0x546047=_0x546047-0xd6;const _0x413be5=a0_0x413b();let _0x13d209=_0x413be5[_0x546047];if(a0_0x13d2['HbcOqP']===undefined){var _0x3d165a=function(_0x297df6){const _0x412769='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2d0184='',_0x31c6e0='';for(let _0x18e19a=0x0,_0x316761,_0x2672b4,_0x195f46=0x0;_0x2672b4=_0x297df6['charAt'](_0x195f46++);~_0x2672b4&&(_0x316761=_0x18e19a%0x4?_0x316761*0x40+_0x2672b4:_0x2672b4,_0x18e19a++%0x4)?_0x2d0184+=String['fromCharCode'](0xff&_0x316761>>(-0x2*_0x18e19a&0x6)):0x0){_0x2672b4=_0x412769['indexOf'](_0x2672b4);}for(let _0x111079=0x0,_0x1f18a8=_0x2d0184['length'];_0x111079<_0x1f18a8;_0x111079++){_0x31c6e0+='%'+('00'+_0x2d0184['charCodeAt'](_0x111079)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x31c6e0);};a0_0x13d2['DWIyfN']=_0x3d165a,a0_0x13d2['upSdMu']={},a0_0x13d2['HbcOqP']=!![];}const _0x50aad4=_0x413be5[0x0],_0x1924d8=_0x546047+_0x50aad4,_0x3f7f7b=a0_0x13d2['upSdMu'][_0x1924d8];return!_0x3f7f7b?(_0x13d209=a0_0x13d2['DWIyfN'](_0x13d209),a0_0x13d2['upSdMu'][_0x1924d8]=_0x13d209):_0x13d209=_0x3f7f7b,_0x13d209;}const a0_0x57b9bf=a0_0x13d2;(function(_0x576f16,_0x46563d){const _0x9c847f=a0_0x13d2,_0x42a597=_0x576f16();while(!![]){try{const _0x2c51bf=parseInt(_0x9c847f(0xdd))/0x1*(-parseInt(_0x9c847f(0xf6))/0x2)+-parseInt(_0x9c847f(0xd7))/0x3+-parseInt(_0x9c847f(0xf0))/0x4+-parseInt(_0x9c847f(0xdc))/0x5+-parseInt(_0x9c847f(0x10e))/0x6*(-parseInt(_0x9c847f(0xec))/0x7)+-parseInt(_0x9c847f(0xf7))/0x8*(parseInt(_0x9c847f(0x114))/0x9)+parseInt(_0x9c847f(0x10f))/0xa;if(_0x2c51bf===_0x46563d)break;else _0x42a597['push'](_0x42a597['shift']());}catch(_0x4dc4d7){_0x42a597['push'](_0x42a597['shift']());}}}(a0_0x413b,0x95df1));import{STATIC_ANALYSIS}from'../utilities/constants.js';class CSSAnalyzer{constructor(_0x2d0184=null){const _0xe69fb=a0_0x13d2;this[_0xe69fb(0xe5)]=_0x2d0184,this[_0xe69fb(0x101)]=null,this['postcss']=null,this['postcssScss']=null,this[_0xe69fb(0x11c)]=null;}async['analyze'](_0x31c6e0,_0x18e19a,_0x316761={}){const _0x3f1bef=a0_0x13d2;try{const _0x2672b4=[],_0x195f46=this['detectLanguage'](_0x31c6e0),_0x111079=await this[_0x3f1bef(0xee)](_0x31c6e0,_0x18e19a,_0x195f46);_0x2672b4[_0x3f1bef(0x103)](..._0x111079);if(_0x111079['length']===0x0){const _0x1f18a8=await this[_0x3f1bef(0xf5)](_0x31c6e0,_0x18e19a,_0x195f46);_0x2672b4[_0x3f1bef(0x103)](..._0x1f18a8);}return this['logger']?.[_0x3f1bef(0x110)](_0x3f1bef(0x106),{'file':_0x31c6e0,'language':_0x195f46,'totalDiagnostics':_0x2672b4[_0x3f1bef(0x117)],'errors':_0x2672b4[_0x3f1bef(0x11b)](_0x2b6745=>_0x2b6745['severity']===STATIC_ANALYSIS['SEVERITY']['ERROR'])[_0x3f1bef(0x117)],'warnings':_0x2672b4['filter'](_0x403a56=>_0x403a56[_0x3f1bef(0xfe)]===STATIC_ANALYSIS['SEVERITY']['WARNING'])['length']}),_0x2672b4;}catch(_0x5acdb2){return this['logger']?.['error']('CSS\x20analysis\x20failed',{'file':_0x31c6e0,'error':_0x5acdb2['message']}),[];}}async[a0_0x57b9bf(0xee)](_0x141ce9,_0x1b196f,_0x4bc73f){const _0x4884e6=a0_0x57b9bf,_0x283f94=[];try{if(!this['postcss']){const _0x549270=await import(_0x4884e6(0xf8));this[_0x4884e6(0xf8)]=_0x549270[_0x4884e6(0xfc)];}let _0x136e74=null;if(_0x4bc73f===_0x4884e6(0xe1)){if(!this['postcssScss']){const _0x3ea416=await import(_0x4884e6(0xef));this['postcssScss']=_0x3ea416[_0x4884e6(0xfc)];}_0x136e74=this['postcssScss'];}else{if(_0x4bc73f===_0x4884e6(0x107)){if(!this['postcssLess']){const _0x105650=await import(_0x4884e6(0xff));this['postcssLess']=_0x105650['default'];}_0x136e74=this['postcssLess'];}}const _0x22c404=this['postcss']()[_0x4884e6(0xe8)](_0x1b196f,{'from':_0x141ce9,'syntax':_0x136e74}),_0x16d128=_0x22c404[_0x4884e6(0xed)];this['logger']?.['debug'](_0x4884e6(0xfa),{'file':_0x141ce9});}catch(_0x249a22){const _0xa2c668=this[_0x4884e6(0x10d)](_0x249a22,_0x141ce9);_0xa2c668&&_0x283f94['push'](_0xa2c668);}return _0x283f94;}async[a0_0x57b9bf(0xf5)](_0x1a1401,_0x8d9a4a,_0x39e60f){const _0x30520f=a0_0x57b9bf,_0xfebc08=[];try{if(!this[_0x30520f(0x101)]){const _0x35d8aa=await import(_0x30520f(0x101));this['stylelint']=_0x35d8aa[_0x30520f(0xfc)];}const _0x1582ee={'extends':[_0x30520f(0xea)],'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':[_0x30520f(0x109),_0x30520f(0xe7)]}],'media-feature-name-no-unknown':!![],'at-rule-no-unknown':_0x39e60f===_0x30520f(0xe1)?[!![],{'ignoreAtRules':[_0x30520f(0xe9),'include','extend','if','else',_0x30520f(0xf2),_0x30520f(0xfb),'while',_0x30520f(0xeb),'return',_0x30520f(0x118),_0x30520f(0x113),_0x30520f(0xf1)]}]:_0x39e60f==='less'?[!![],{'ignoreAtRules':['plugin']}]:!![],'comment-no-empty':!![],'no-duplicate-selectors':!![],'no-empty-source':null,'block-no-empty':!![],'declaration-block-no-shorthand-property-overrides':!![],'font-family-no-missing-generic-family-keyword':!![],'function-linear-gradient-no-nonstandard-direction':!![],'no-descending-specificity':null,'no-duplicate-at-import-rules':!![],'no-extra-semicolons':!![],'no-invalid-double-slash-comments':!![],'selector-pseudo-element-colon-notation':'double','selector-type-case':_0x30520f(0xda)},'customSyntax':_0x39e60f===_0x30520f(0xe1)?'postcss-scss':_0x39e60f==='less'?_0x30520f(0xff):undefined},_0x331d36=await this[_0x30520f(0x101)][_0x30520f(0x108)]({'code':_0x8d9a4a,'codeFilename':_0x1a1401,'config':_0x1582ee});if(_0x331d36['results']&&_0x331d36['results'][_0x30520f(0x117)]>0x0){const _0x5465f8=_0x331d36[_0x30520f(0x11d)][0x0];if(_0x5465f8[_0x30520f(0xdf)])for(const _0x185539 of _0x5465f8['warnings']){_0xfebc08['push']({'file':_0x1a1401,'line':_0x185539[_0x30520f(0xf3)]||0x1,'column':_0x185539[_0x30520f(0x11f)]||0x1,'severity':_0x185539['severity']==='error'?STATIC_ANALYSIS['SEVERITY']['ERROR']:STATIC_ANALYSIS[_0x30520f(0xdb)][_0x30520f(0x112)],'rule':_0x185539[_0x30520f(0x10c)]||_0x30520f(0x10a),'message':_0x185539['text'],'category':this[_0x30520f(0x121)](_0x185539[_0x30520f(0x10c)]),'fixable':![],'source':_0x30520f(0x101)});}}}catch(_0x1b506b){this['logger']?.['warn'](_0x30520f(0x116),{'file':_0x1a1401,'error':_0x1b506b[_0x30520f(0x11a)]});}return _0xfebc08;}['formatPostCSSError'](_0x49d1a6,_0xee41ea){const _0x2d6632=a0_0x57b9bf;return{'file':_0xee41ea,'line':_0x49d1a6[_0x2d6632(0xf3)]||0x1,'column':_0x49d1a6['column']||0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x2d6632(0xe6)],'rule':_0x49d1a6[_0x2d6632(0x120)]||'CssSyntaxError','message':_0x49d1a6[_0x2d6632(0xe3)]||_0x49d1a6['message'],'category':STATIC_ANALYSIS[_0x2d6632(0x105)][_0x2d6632(0xde)],'fixable':![],'source':_0x2d6632(0xf8),'code':_0x49d1a6[_0x2d6632(0xe4)]||undefined};}['categorizeStylelintRule'](_0x3fa787){const _0x19fa46=a0_0x57b9bf;if(!_0x3fa787)return STATIC_ANALYSIS['CATEGORY'][_0x19fa46(0x122)];const _0x17d1c1=_0x3fa787['toLowerCase']();if(_0x17d1c1['includes'](_0x19fa46(0x102))||_0x17d1c1['includes'](_0x19fa46(0x115))||_0x17d1c1['includes'](_0x19fa46(0xd8))||_0x17d1c1[_0x19fa46(0xfd)](_0x19fa46(0x10b)))return STATIC_ANALYSIS[_0x19fa46(0x105)]['SYNTAX'];if(_0x17d1c1[_0x19fa46(0xfd)](_0x19fa46(0xd6))||_0x17d1c1[_0x19fa46(0xfd)](_0x19fa46(0xe2)))return STATIC_ANALYSIS[_0x19fa46(0x105)]['PERFORMANCE'];if(_0x17d1c1[_0x19fa46(0xfd)](_0x19fa46(0xe0))||_0x17d1c1['includes'](_0x19fa46(0x11e)))return STATIC_ANALYSIS[_0x19fa46(0x105)][_0x19fa46(0x100)];return STATIC_ANALYSIS[_0x19fa46(0x105)][_0x19fa46(0x122)];}['detectLanguage'](_0xe47fb3){const _0x5e44ce=a0_0x57b9bf,_0x142d17=_0xe47fb3['toLowerCase']();if(_0x142d17['endsWith']('.scss')||_0x142d17[_0x5e44ce(0x111)](_0x5e44ce(0xf9)))return'scss';if(_0x142d17['endsWith']('.less'))return _0x5e44ce(0x107);return'css';}[a0_0x57b9bf(0x119)](){const _0x2b909e=a0_0x57b9bf;return[_0x2b909e(0xf4),'.scss','.sass',_0x2b909e(0xd9)];}[a0_0x57b9bf(0x104)](){return![];}}export default CSSAnalyzer;
1
+ function a0_0x3ba2(_0x317b7e,_0x35993b){_0x317b7e=_0x317b7e-0x193;const _0x38e154=a0_0x38e1();let _0x3ba28b=_0x38e154[_0x317b7e];if(a0_0x3ba2['raNrNt']===undefined){var _0x4d2420=function(_0x10cbf5){const _0x2f64a9='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x547a06='',_0x75b2f0='';for(let _0x571441=0x0,_0x40ab50,_0x2d6450,_0x4ce857=0x0;_0x2d6450=_0x10cbf5['charAt'](_0x4ce857++);~_0x2d6450&&(_0x40ab50=_0x571441%0x4?_0x40ab50*0x40+_0x2d6450:_0x2d6450,_0x571441++%0x4)?_0x547a06+=String['fromCharCode'](0xff&_0x40ab50>>(-0x2*_0x571441&0x6)):0x0){_0x2d6450=_0x2f64a9['indexOf'](_0x2d6450);}for(let _0x1f4b95=0x0,_0x3f40fa=_0x547a06['length'];_0x1f4b95<_0x3f40fa;_0x1f4b95++){_0x75b2f0+='%'+('00'+_0x547a06['charCodeAt'](_0x1f4b95)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x75b2f0);};a0_0x3ba2['PmKzsv']=_0x4d2420,a0_0x3ba2['sxRQKE']={},a0_0x3ba2['raNrNt']=!![];}const _0x90a0fa=_0x38e154[0x0],_0x3b6291=_0x317b7e+_0x90a0fa,_0x1815ca=a0_0x3ba2['sxRQKE'][_0x3b6291];return!_0x1815ca?(_0x3ba28b=a0_0x3ba2['PmKzsv'](_0x3ba28b),a0_0x3ba2['sxRQKE'][_0x3b6291]=_0x3ba28b):_0x3ba28b=_0x1815ca,_0x3ba28b;}function a0_0x38e1(){const _0xf05980=['ChvZAa','CMvHC29U','ug9ZDentuYbZEw50yxGGy2HLy2SGCgfZC2vK','y29SDw1U','C3vWCg9YDhnbDxrVrML4','D2fYBG','BgLUzq','BM8TAw52ywXPza','lMXLC3m','y2f0zwDVCML6zvn0EwXLBgLUDfj1Bgu','zgvIDwC','zwXZzq','zgvMyxvSDa','C2nZCW','Bg9Nz2vY','C3r5BgvSAw50','u0vwrvjjvfK','CMvJB21Tzw5Kzwq','zMLSDgvY','BwvZC2fNzq','q0furuDpuLK','y29UDgvUDa','mM5srg5evq','CMvZDwX0CW','BMCTzgvLCa','mtqZmKfrweXmAW','y3nZ','zxH0zw5K','B3b0Aw1PEMu','BMfTzq','zw5KC1DPDgG','Dg9mB3DLCKnHC2u','Aw5JBhvKzxm','C3LUDgf4','u1rzteu','Dgv4Da','BgvZCW','DxnL','Cg9ZDgnZC1nJC3m','zgv0zwn0tgfUz3vHz2u','ntiZmJe3muDwAg9nyG','q3nZu3LUDgf4rxjYB3i','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','zNvUy3rPB24','uevsrK9stufoq0u','qKvtvf9quKfdveLdrq','nda1mZe4murvz0v6rW','Cg9ZDgnZCW','odaYmJq2vuDTwMf4','ndbAsfzrAuu','D2fYBMLUz3m','C3r5BgvSAw50lwnVBMzPzY1ZDgfUzgfYza','mJqXndu0nxHnB3nHtG','odK1mJaWt3rpruLZ','Cg9ZDgnZC0XLC3m','v0fstKLorW','mtK3ntm0oeDjy1vluG','BgvUz3rO','y2HLy2TtEw50yxG','zM9Y','mJi1mJDrEwTiuLa','ntbZtLb1BMG','u1Lovefy','u3r5BgvSAw50igfUywX5C2LZigzHAwXLza'];a0_0x38e1=function(){return _0xf05980;};return a0_0x38e1();}const a0_0x22c23c=a0_0x3ba2;(function(_0x32862b,_0x13b913){const _0x1df604=a0_0x3ba2,_0x4fab7c=_0x32862b();while(!![]){try{const _0x1bfbe1=parseInt(_0x1df604(0x1b5))/0x1*(-parseInt(_0x1df604(0x1cf))/0x2)+parseInt(_0x1df604(0x1c7))/0x3+parseInt(_0x1df604(0x197))/0x4+parseInt(_0x1df604(0x1d0))/0x5*(parseInt(_0x1df604(0x194))/0x6)+-parseInt(_0x1df604(0x193))/0x7+-parseInt(_0x1df604(0x1b8))/0x8*(-parseInt(_0x1df604(0x19b))/0x9)+parseInt(_0x1df604(0x19c))/0xa*(-parseInt(_0x1df604(0x1cd))/0xb);if(_0x1bfbe1===_0x13b913)break;else _0x4fab7c['push'](_0x4fab7c['shift']());}catch(_0xc3f53a){_0x4fab7c['push'](_0x4fab7c['shift']());}}}(a0_0x38e1,0xd948b));import{STATIC_ANALYSIS}from'../utilities/constants.js';class CSSAnalyzer{constructor(_0x547a06=null){const _0x59be7c=a0_0x3ba2;this[_0x59be7c(0x1ad)]=_0x547a06,this['stylelint']=null,this[_0x59be7c(0x1ce)]=null,this[_0x59be7c(0x1c5)]=null,this['postcssLess']=null;}async['analyze'](_0x75b2f0,_0x571441,_0x40ab50={}){const _0x3f042a=a0_0x3ba2;try{const _0x2d6450=[],_0x4ce857=this[_0x3f042a(0x1c6)](_0x75b2f0),_0x1f4b95=await this[_0x3f042a(0x199)](_0x75b2f0,_0x571441,_0x4ce857);_0x2d6450['push'](..._0x1f4b95);if(_0x1f4b95['length']===0x0){const _0x3f40fa=await this['lintStyles'](_0x75b2f0,_0x571441,_0x4ce857);_0x2d6450['push'](..._0x3f40fa);}return this[_0x3f042a(0x1ad)]?.[_0x3f042a(0x1a9)]('CSS\x20analysis\x20completed',{'file':_0x75b2f0,'language':_0x4ce857,'totalDiagnostics':_0x2d6450['length'],'errors':_0x2d6450['filter'](_0xe099ee=>_0xe099ee['severity']===STATIC_ANALYSIS['SEVERITY']['ERROR'])[_0x3f042a(0x198)],'warnings':_0x2d6450[_0x3f042a(0x1b1)](_0x5a39dc=>_0x5a39dc['severity']===STATIC_ANALYSIS['SEVERITY'][_0x3f042a(0x196)])[_0x3f042a(0x198)]}),_0x2d6450;}catch(_0x172256){return this['logger']?.['error']('CSS\x20analysis\x20failed',{'file':_0x75b2f0,'error':_0x172256[_0x3f042a(0x1b2)]}),[];}}async['checkSyntax'](_0xf2bf82,_0x2899a3,_0x56b91e){const _0x1f15c0=a0_0x3ba2,_0x3334c8=[];try{if(!this[_0x1f15c0(0x1ce)]){const _0x50a3a7=await import(_0x1f15c0(0x1ce));this[_0x1f15c0(0x1ce)]=_0x50a3a7[_0x1f15c0(0x1ab)];}let _0x13de7a=null;if(_0x56b91e===_0x1f15c0(0x1ac)){if(!this['postcssScss']){const _0x2e6f77=await import('postcss-scss');this['postcssScss']=_0x2e6f77[_0x1f15c0(0x1ab)];}_0x13de7a=this['postcssScss'];}else{if(_0x56b91e===_0x1f15c0(0x1c3)){if(!this[_0x1f15c0(0x195)]){const _0x6af35d=await import('postcss-less');this[_0x1f15c0(0x195)]=_0x6af35d['default'];}_0x13de7a=this['postcssLess'];}}const _0x5dfb92=this[_0x1f15c0(0x1ce)]()['process'](_0x2899a3,{'from':_0xf2bf82,'syntax':_0x13de7a}),_0x474ca6=_0x5dfb92['root'];this['logger']?.[_0x1f15c0(0x1a9)](_0x1f15c0(0x1a1),{'file':_0xf2bf82});}catch(_0x3e4031){const _0x1842ef=this['formatPostCSSError'](_0x3e4031,_0xf2bf82);_0x1842ef&&_0x3334c8['push'](_0x1842ef);}return _0x3334c8;}async['lintStyles'](_0x3f23aa,_0x12e42a,_0x41e084){const _0xbb8cd4=a0_0x3ba2,_0x4eb459=[];try{if(!this[_0xbb8cd4(0x1ae)]){const _0x2d6665=await import(_0xbb8cd4(0x1ae));this['stylelint']=_0x2d6665['default'];}const _0x11493e={'extends':[_0xbb8cd4(0x1d2)],'rules':{'color-no-invalid-hex':!![],'font-family-no-duplicate-names':!![],'function-calc-no-invalid':!![],'string-no-newline':!![],'unit-no-unknown':!![],'property-no-unknown':!![],'declaration-block-no-duplicate-properties':!![],'selector-pseudo-class-no-unknown':!![],'selector-pseudo-element-no-unknown':!![],'selector-type-no-unknown':[!![],{'ignoreTypes':['/^custom-/',_0xbb8cd4(0x1b7)]}],'media-feature-name-no-unknown':!![],'at-rule-no-unknown':_0x41e084===_0xbb8cd4(0x1ac)?[!![],{'ignoreAtRules':['mixin','include',_0xbb8cd4(0x1ba),'if',_0xbb8cd4(0x1aa),_0xbb8cd4(0x19a),'each','while',_0xbb8cd4(0x1ca),'return',_0xbb8cd4(0x1b4),_0xbb8cd4(0x1c4),'forward']}]:_0x41e084==='less'?[!![],{'ignoreAtRules':['plugin']}]:!![],'comment-no-empty':!![],'no-duplicate-selectors':!![],'no-empty-source':null,'block-no-empty':!![],'declaration-block-no-shorthand-property-overrides':!![],'font-family-no-missing-generic-family-keyword':!![],'function-linear-gradient-no-nonstandard-direction':!![],'no-descending-specificity':null,'no-duplicate-at-import-rules':!![],'no-extra-semicolons':!![],'no-invalid-double-slash-comments':!![],'selector-pseudo-element-colon-notation':'double','selector-type-case':'lower'},'customSyntax':_0x41e084==='scss'?'postcss-scss':_0x41e084==='less'?'postcss-less':undefined},_0x5cb6c5=await this['stylelint']['lint']({'code':_0x12e42a,'codeFilename':_0x3f23aa,'config':_0x11493e});if(_0x5cb6c5['results']&&_0x5cb6c5['results']['length']>0x0){const _0x1a8f08=_0x5cb6c5[_0xbb8cd4(0x1b6)][0x0];if(_0x1a8f08[_0xbb8cd4(0x1d1)])for(const _0x58f436 of _0x1a8f08['warnings']){_0x4eb459[_0xbb8cd4(0x19f)]({'file':_0x3f23aa,'line':_0x58f436[_0xbb8cd4(0x1a5)]||0x1,'column':_0x58f436[_0xbb8cd4(0x1a2)]||0x1,'severity':_0x58f436['severity']==='error'?STATIC_ANALYSIS[_0xbb8cd4(0x1af)]['ERROR']:STATIC_ANALYSIS[_0xbb8cd4(0x1af)][_0xbb8cd4(0x196)],'rule':_0x58f436['rule']||'unknown','message':_0x58f436[_0xbb8cd4(0x1c2)],'category':this[_0xbb8cd4(0x1a8)](_0x58f436['rule']),'fixable':![],'source':_0xbb8cd4(0x1ae)});}}}catch(_0x2df02f){this[_0xbb8cd4(0x1ad)]?.[_0xbb8cd4(0x1a4)](_0xbb8cd4(0x19e),{'file':_0x3f23aa,'error':_0x2df02f['message']});}return _0x4eb459;}['formatPostCSSError'](_0x4e3679,_0x380a0d){const _0x2ff2b4=a0_0x3ba2;return{'file':_0x380a0d,'line':_0x4e3679['line']||0x1,'column':_0x4e3679[_0x2ff2b4(0x1a2)]||0x1,'severity':STATIC_ANALYSIS['SEVERITY']['ERROR'],'rule':_0x4e3679[_0x2ff2b4(0x1bc)]||_0x2ff2b4(0x1c8),'message':_0x4e3679[_0x2ff2b4(0x1a0)]||_0x4e3679[_0x2ff2b4(0x1b2)],'category':STATIC_ANALYSIS['CATEGORY']['SYNTAX'],'fixable':![],'source':'postcss','code':_0x4e3679['source']||undefined};}[a0_0x22c23c(0x1a8)](_0x42cfaa){const _0x25985c=a0_0x22c23c;if(!_0x42cfaa)return STATIC_ANALYSIS[_0x25985c(0x1b3)][_0x25985c(0x1c1)];const _0x4d3740=_0x42cfaa[_0x25985c(0x1be)]();if(_0x4d3740['includes'](_0x25985c(0x1a6))||_0x4d3740[_0x25985c(0x1bf)]('no-unknown')||_0x4d3740[_0x25985c(0x1bf)]('no-empty')||_0x4d3740['includes'](_0x25985c(0x1c0)))return STATIC_ANALYSIS['CATEGORY'][_0x25985c(0x19d)];if(_0x4d3740[_0x25985c(0x1bf)]('performance')||_0x4d3740['includes'](_0x25985c(0x1bb)))return STATIC_ANALYSIS['CATEGORY'][_0x25985c(0x1cb)];if(_0x4d3740['includes']('best-practice')||_0x4d3740[_0x25985c(0x1bf)](_0x25985c(0x1b0)))return STATIC_ANALYSIS['CATEGORY'][_0x25985c(0x1cc)];return STATIC_ANALYSIS[_0x25985c(0x1b3)]['STYLE'];}['detectLanguage'](_0x50bdc0){const _0x48a7f6=a0_0x22c23c,_0x47c881=_0x50bdc0['toLowerCase']();if(_0x47c881[_0x48a7f6(0x1bd)]('.scss')||_0x47c881['endsWith']('.sass'))return'scss';if(_0x47c881['endsWith']('.less'))return _0x48a7f6(0x1c3);return _0x48a7f6(0x1b9);}[a0_0x22c23c(0x1c9)](){const _0x38fa8e=a0_0x22c23c;return['.css','.scss','.sass',_0x38fa8e(0x1a7)];}[a0_0x22c23c(0x1a3)](){return![];}}export default CSSAnalyzer;
@@ -1 +1 @@
1
- const a0_0x4236f8=a0_0x3744;(function(_0x389901,_0x4b6445){const _0x51cf05=a0_0x3744,_0x19338e=_0x389901();while(!![]){try{const _0x140004=parseInt(_0x51cf05(0x24c))/0x1+parseInt(_0x51cf05(0x23d))/0x2+parseInt(_0x51cf05(0x218))/0x3+parseInt(_0x51cf05(0x232))/0x4*(parseInt(_0x51cf05(0x233))/0x5)+-parseInt(_0x51cf05(0x1ee))/0x6*(parseInt(_0x51cf05(0x25c))/0x7)+parseInt(_0x51cf05(0x213))/0x8+-parseInt(_0x51cf05(0x222))/0x9;if(_0x140004===_0x4b6445)break;else _0x19338e['push'](_0x19338e['shift']());}catch(_0x5ef1ec){_0x19338e['push'](_0x19338e['shift']());}}}(a0_0x101e,0x490e7));import{exec}from'child_process';import{promisify}from'util';import a0_0x47ce9b from'path';import a0_0x5ca916 from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';function a0_0x3744(_0x4282a0,_0x4495f0){_0x4282a0=_0x4282a0-0x1df;const _0x101e15=a0_0x101e();let _0x3744cb=_0x101e15[_0x4282a0];if(a0_0x3744['BxinHg']===undefined){var _0x1662da=function(_0x5b62f8){const _0x51ce92='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x47ce9b='',_0x5ca916='';for(let _0x3dce79=0x0,_0x472eb4,_0x4ef07f,_0x53548e=0x0;_0x4ef07f=_0x5b62f8['charAt'](_0x53548e++);~_0x4ef07f&&(_0x472eb4=_0x3dce79%0x4?_0x472eb4*0x40+_0x4ef07f:_0x4ef07f,_0x3dce79++%0x4)?_0x47ce9b+=String['fromCharCode'](0xff&_0x472eb4>>(-0x2*_0x3dce79&0x6)):0x0){_0x4ef07f=_0x51ce92['indexOf'](_0x4ef07f);}for(let _0x362e34=0x0,_0x1587d8=_0x47ce9b['length'];_0x362e34<_0x1587d8;_0x362e34++){_0x5ca916+='%'+('00'+_0x47ce9b['charCodeAt'](_0x362e34)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5ca916);};a0_0x3744['vpMdRX']=_0x1662da,a0_0x3744['CrVIAa']={},a0_0x3744['BxinHg']=!![];}const _0xc3979a=_0x101e15[0x0],_0x3bf210=_0x4282a0+_0xc3979a,_0x2e1332=a0_0x3744['CrVIAa'][_0x3bf210];return!_0x2e1332?(_0x3744cb=a0_0x3744['vpMdRX'](_0x3744cb),a0_0x3744['CrVIAa'][_0x3bf210]=_0x3744cb):_0x3744cb=_0x2e1332,_0x3744cb;}const execAsync=promisify(exec);function a0_0x101e(){const _0x3381fd=['v0fstKLorW','CgfYyw1Z','DhnJB25MAwCUANnVBG','qvDtignYzwrLBNrPywXZ','EwfTBgXPBNqGlwyGCgfYC2fIBguGiG','Dw5RBM93BG','ANnVBI1WyxjZzq','DMfSAwrHDgvxAxrOq2HLy2TVDG','DgvZDa','su5gtW','C2nHBM5LCKnHy2HL','lNLTBa','zxH0BMfTzq','y29TBw9UANm','y2HLy2TVDG','mtG1mJrAv1blzNK','mJuWufD3t1vm','AgLNAa','zgvMyxvSDa','EwfTBgXPBNq','CgfYC2u','DhjPBq','y29TCgLSzxjpChrPB25Z','ywP2','Bg9Nz2vY','y3DL','nZqYmtK2veLzExvH','igrLDgvJDgvKigLUic5LBNyGzMLSzq','sw52ywXPzcbku09ooIa','zw52','ChvZAa','DgvYCMfMB3jT','CgLWigLUC3rHBgWGy2HLy2TVDG','DhnJB25MAwCUANnVBIb2ywXPzgf0Aw9UigzHAwXLza','zgv0zwn0rMLSzvr5Cgu','DMfSAwrHDgu','CgfYC2viywrVBgLUDfjLC3vSDhm','y2HHBMDLBwu','ywP2lwzVCM1HDhm','y2HLy2TVDIbKzxrLy3rLza','Bwf0y2G','mti2mtqWvhbtzgHb','ANnVBI1Zy2HLBwe','BwfW','BwfWq2HLy2TVDLnLDMvYAxr5','ChjPDMf0zsbRzxK','C3rKB3v0','BwfWsgfKB2XPBNrtzxzLCML0Eq','Aw5JBhvKzxm','sLnptIbty2HLBweGDMfSAwrHDgLVBIbHDMfPBgfIBgu','yMfZzw5HBwu','ANnVBLnJAgvTyq','BNbTigLUC3rHBgWGywP2igfQDI1MB3jTyxrZ','CgfJA2fNzs5QC29U','BgvUz3rO','vw5RBM93BIbJB25MAwCGzMLSzsb0ExbL','Bw9KDwXL','mJi4nJqXwM9Lwfjz','DMfSAwrHDgvzqu1m','AZHZ','y2HLy2TFAwq','CgfYC2vdAgvJA292uMvZDwX0CW','rMfPBgvKihrVihbHCNnLignOzwnRB3yGB3v0Chv0','z2L0AhvIlwfJDgLVBNm','rMfPBgvKihrVihbHCNnLigHHzg9SAw50ig91Dhb1Da','y2f0zwDVCNK','y29Kzq','zg9JA2vYlwnVBxbVC2uUEwfTBa','C2vJDxjPDhK','lMvUDG','q29UC2LKzxiGzw5HyMXPBMCGiNn0CMLJDciGBw9KzsbMB3iGyMv0DgvYihr5CguGC2fMzxr5','rvjst1i','Aw5ZDgfUy2vqyxrO','nZH0ugH5Eey','DMfSAwrHDgvuC0nVBMzPzW','AgfKB2XPBNqGDMfSAwrHDgLVBIbMywLSzwq','CgfZC3DVCMq','A3vIzxjUzxrLCW','BM8TAw1WBgLJAxqTyw55','BwfWwwfTBgXPBNrtzxzLCML0Eq','z3vPzgvSAw5L','CMvZDwX0CW','zM9YrwfJAa','z2v0sw5ZDgfSBfjLy29TBwvUzgf0Aw9UCW','zg9JA2vYlwnVBxbVC2u','DMfSAwrHDgvqywnRywDLsNnVBG','C3bSAxq','zg9JA2vYzMLSzq','y29SDw1U','BwvZC2fNzq','zgLYBMfTzq','zgvIDwC','BwvKAxvT','BM9YBwfSAxPLuMvZDwX0CW','vxnLigvUDMLYB25Tzw50lxnWzwnPzMLJic5LBNyGzMLSzxmGyw5KigfKzcaUzw52ihrVic5NAxrPz25VCMu','Dg9mB3DLCKnHC2u','zg9JA2vYlwnVBxbVC2uUEw1S','AgfKB2XPBNqGls1MB3jTyxqGANnVBIaI','C3rYAw5N','zxjYB3i','EwfTBgXPBNqGls12zxjZAw9U','y2HLy2TFy2XHC3m','DMfSAwrHDgveB2nRzxjMAwXL','zMLSzv9SAw5Lx3jHBMDL','y29TCgLSzq','EwfTBgXPBNqGzgv0zwn0zwq','zg9JA2vYx2nVBxbVC2u','y2HLy2TVDIb2ywXPzgf0Aw9UigzHAwXLza','yxzHAwXHyMXLu2nHBM5LCNm','DxrMltG','mtKXmJq4yK5zsfDS','DhnJB25MAwCTDMfSAwrHDg9Y','B2jQzwn0','zw52lxzHBgLKyxrVCG','C3LUDgf4','ntCWodK3qKruwe9q','yMvZDc1WCMfJDgLJzq','qvbjigTLEq','u0vwrvjjvfK','D2fYBG','wufntcbMAwXLihzHBgLKyxrPB24','Bgv2zwW','ug90zw50AwfSigHHCMrJB2rLzca','AgfYzgnVzgvKlxnLy3jLDa','zxjYB3jZ','mtK3mJiXnunyrMTuAa'];a0_0x101e=function(){return _0x3381fd;};return a0_0x101e();}class ConfigValidator{constructor(_0x3dce79=null){const _0x3ba135=a0_0x3744;this['logger']=_0x3dce79,this[_0x3ba135(0x211)]=null,this[_0x3ba135(0x22d)]=new Map();}async['detectAvailableValidators'](){const _0x5d1fbf=a0_0x3744;if(this[_0x5d1fbf(0x211)]!==null)return this[_0x5d1fbf(0x211)];const _0x472eb4={'checkov':![],'hadolint':![],'yamllint':![],'jsonSchema':![]};try{await execAsync('checkov\x20--version',{'timeout':0x1388}),_0x472eb4[_0x5d1fbf(0x231)]=!![],this[_0x5d1fbf(0x23b)]?.['debug'](_0x5d1fbf(0x24a));}catch(_0x4ef07f){this['logger']?.['debug']('checkov\x20not\x20available',{'error':_0x4ef07f[_0x5d1fbf(0x1fe)]});}try{await execAsync('hadolint\x20--version',{'timeout':0x1388}),_0x472eb4['hadolint']=!![],this['logger']?.['debug']('hadolint\x20detected');}catch(_0x53548e){this['logger']?.['debug']('hadolint\x20not\x20available',{'error':_0x53548e['message']});}try{await execAsync(_0x5d1fbf(0x209),{'timeout':0x1388}),_0x472eb4[_0x5d1fbf(0x236)]=!![],this[_0x5d1fbf(0x23b)]?.['debug'](_0x5d1fbf(0x20e));}catch(_0x362e34){this[_0x5d1fbf(0x23b)]?.['debug']('yamllint\x20not\x20available',{'error':_0x362e34[_0x5d1fbf(0x1fe)]});}try{await import(_0x5d1fbf(0x23a)),_0x472eb4['jsonSchema']=!![],this['logger']?.['debug'](_0x5d1fbf(0x254));}catch(_0x1587d8){this['logger']?.['debug']('ajv\x20not\x20available',{'error':_0x1587d8['message']});}return this[_0x5d1fbf(0x211)]=_0x472eb4,_0x472eb4;}async[a0_0x4236f8(0x246)](_0x19c711,_0x2401d7={}){const _0x19202b=a0_0x4236f8,_0x996cd4=[],_0x3aec8f=await this['detectAvailableValidators'](),_0x3147f5=this['detectFileType'](_0x19c711);this[_0x19202b(0x23b)]?.[_0x19202b(0x200)]('Validating\x20config\x20file',{'filePath':_0x19c711,'fileType':_0x3147f5});switch(_0x3147f5){case'dockerfile':if(_0x3aec8f['hadolint']){const _0x1f5045=await this['validateDockerfile'](_0x19c711,_0x2401d7);_0x996cd4['push'](..._0x1f5045);}if(_0x3aec8f[_0x19202b(0x231)]){const _0x19dae0=await this[_0x19202b(0x22a)](_0x19c711,_0x19202b(0x1fc),_0x2401d7);_0x996cd4[_0x19202b(0x241)](..._0x19dae0);}break;case'docker-compose':if(_0x3aec8f[_0x19202b(0x236)]){const _0x38997d=await this[_0x19202b(0x1df)](_0x19c711,_0x2401d7);_0x996cd4['push'](..._0x38997d);}if(_0x3aec8f[_0x19202b(0x231)]){const _0x447273=await this[_0x19202b(0x22a)](_0x19c711,_0x19202b(0x20f),_0x2401d7);_0x996cd4['push'](..._0x447273);}break;case'kubernetes':if(_0x3aec8f[_0x19202b(0x236)]){const _0x1341d1=await this[_0x19202b(0x1df)](_0x19c711,_0x2401d7);_0x996cd4['push'](..._0x1341d1);}if(_0x3aec8f['checkov']){const _0x1b2920=await this['validateWithCheckov'](_0x19c711,_0x19202b(0x1f2),_0x2401d7);_0x996cd4[_0x19202b(0x241)](..._0x1b2920);}break;case'terraform':if(_0x3aec8f['checkov']){const _0x298ff9=await this[_0x19202b(0x22a)](_0x19c711,'terraform',_0x2401d7);_0x996cd4[_0x19202b(0x241)](..._0x298ff9);}break;case'package.json':if(_0x3aec8f[_0x19202b(0x256)]){const _0x59aae3=await this['validatePackageJson'](_0x19c711,_0x2401d7);_0x996cd4[_0x19202b(0x241)](..._0x59aae3);}break;case'tsconfig.json':if(_0x3aec8f['jsonSchema']){const _0x4b0d07=await this[_0x19202b(0x1ef)](_0x19c711,_0x2401d7);_0x996cd4[_0x19202b(0x241)](..._0x4b0d07);}break;case'github-actions':if(_0x3aec8f[_0x19202b(0x236)]){const _0x53bc79=await this['validateYAML'](_0x19c711,_0x2401d7);_0x996cd4['push'](..._0x53bc79);}break;case _0x19202b(0x240):const _0x12fe6b=await this['validateEnvFile'](_0x19c711,_0x2401d7);_0x996cd4['push'](..._0x12fe6b);break;case'yaml':if(_0x3aec8f['yamllint']){const _0xc20d07=await this['validateYAML'](_0x19c711,_0x2401d7);_0x996cd4['push'](..._0xc20d07);}break;default:this[_0x19202b(0x23b)]?.[_0x19202b(0x21c)](_0x19202b(0x25a),{'filePath':_0x19c711,'fileType':_0x3147f5});return[];}return this[_0x19202b(0x202)](_0x996cd4);}async[a0_0x4236f8(0x20b)](_0x2c7a71,_0x5cd9e2={}){const _0x26b16d=a0_0x4236f8;try{const _0x4a128c=await execAsync(_0x26b16d(0x206)+_0x2c7a71+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0x1d90da=JSON[_0x26b16d(0x237)](_0x4a128c[_0x26b16d(0x251)]);return this['parseHadolintResults'](_0x1d90da,_0x2c7a71);}catch(_0x43dcfc){if(_0x43dcfc['stdout'])try{const _0x312acc=JSON['parse'](_0x43dcfc['stdout']);return this[_0x26b16d(0x247)](_0x312acc,_0x2c7a71);}catch(_0x13b033){this['logger']?.['error'](_0x26b16d(0x1e5),{'error':_0x13b033['message']});}return this[_0x26b16d(0x23b)]?.['error'](_0x26b16d(0x1f0),{'error':_0x43dcfc['message']}),[];}}[a0_0x4236f8(0x247)](_0x18b689,_0x468eee){const _0x34ef12=a0_0x4236f8,_0x4c88ea=[];if(Array['isArray'](_0x18b689))for(const _0x35f7ce of _0x18b689){_0x4c88ea[_0x34ef12(0x241)]({'file':_0x468eee,'line':_0x35f7ce['line']||0x1,'column':_0x35f7ce[_0x34ef12(0x1fd)]||0x1,'severity':this[_0x34ef12(0x252)](_0x35f7ce[_0x34ef12(0x21e)]),'rule':_0x35f7ce[_0x34ef12(0x1e7)],'message':_0x35f7ce[_0x34ef12(0x1fe)],'category':_0x34ef12(0x1fc),'validator':'hadolint'});}return _0x4c88ea;}async[a0_0x4236f8(0x1df)](_0x312775,_0xcf3d37={}){const _0x3ad0ec=a0_0x4236f8;try{const _0x443b7c=await execAsync(_0x3ad0ec(0x227)+_0x312775+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530});return this['parseYamllintResults'](_0x443b7c[_0x3ad0ec(0x251)],_0x312775);}catch(_0x1f6486){if(_0x1f6486['stdout'])return this['parseYamllintResults'](_0x1f6486['stdout'],_0x312775);return this[_0x3ad0ec(0x23b)]?.['error']('yamllint\x20validation\x20failed',{'error':_0x1f6486['message']}),[];}}['parseYamllintResults'](_0x31f370,_0x41522c){const _0x3a7a3b=a0_0x4236f8,_0x52088d=[],_0x57322d=_0x31f370[_0x3a7a3b(0x1fb)]('\x0a')['filter'](_0x3c331b=>_0x3c331b[_0x3a7a3b(0x238)]());for(const _0xa65c85 of _0x57322d){const _0x5b88bf=_0xa65c85[_0x3a7a3b(0x24b)](/^(.+?):(\d+):(\d+):\s*\[(\w+)\]\s*(.+?)\s*\((.+?)\)/);if(_0x5b88bf){const [,_0x5aa599,_0x27cf66,_0x1393d1,_0x2b8465,_0x481192,_0x58f7db]=_0x5b88bf;_0x52088d['push']({'file':_0x41522c,'line':parseInt(_0x27cf66,0xa),'column':parseInt(_0x1393d1,0xa),'severity':this[_0x3a7a3b(0x1f4)](_0x2b8465),'rule':_0x58f7db,'message':_0x481192,'category':'yaml','validator':'yamllint'});}}return _0x52088d;}async[a0_0x4236f8(0x22a)](_0x2829c5,_0x1a5be6,_0x431e86={}){const _0x147ab2=a0_0x4236f8;try{const _0x1fba39=await execAsync('checkov\x20-f\x20\x22'+_0x2829c5+'\x22\x20--framework\x20'+_0x1a5be6+'\x20--output\x20json\x20--compact',{'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0x2ace28=JSON['parse'](_0x1fba39[_0x147ab2(0x251)]);return this[_0x147ab2(0x1e2)](_0x2ace28,_0x2829c5);}catch(_0xcaeddf){if(_0xcaeddf['stdout'])try{const _0x1ef0dc=JSON[_0x147ab2(0x237)](_0xcaeddf['stdout']);return this[_0x147ab2(0x1e2)](_0x1ef0dc,_0x2829c5);}catch(_0x578094){this[_0x147ab2(0x23b)]?.[_0x147ab2(0x208)](_0x147ab2(0x1e3),{'error':_0x578094[_0x147ab2(0x1fe)]});}return this['logger']?.['error'](_0x147ab2(0x210),{'error':_0xcaeddf[_0x147ab2(0x1fe)]}),[];}}[a0_0x4236f8(0x1e2)](_0x2a5e35,_0x5a39ae){const _0x38dadf=a0_0x4236f8,_0x8a95c=[];if(_0x2a5e35[_0x38dadf(0x1f6)]&&_0x2a5e35['results']['failed_checks'])for(const _0x113992 of _0x2a5e35['results']['failed_checks']){_0x8a95c['push']({'file':_0x5a39ae,'line':_0x113992[_0x38dadf(0x20c)]?_0x113992['file_line_range'][0x0]:0x1,'column':0x1,'severity':this[_0x38dadf(0x24f)](_0x113992[_0x38dadf(0x20a)]),'rule':_0x113992[_0x38dadf(0x1e1)],'message':_0x113992['check_name']||_0x113992['check_id'],'category':_0x38dadf(0x1e9),'validator':_0x38dadf(0x231),'remediation':_0x113992[_0x38dadf(0x1f5)],'cwe':_0x113992[_0x38dadf(0x23c)],'references':_0x113992[_0x38dadf(0x1f5)]?[_0x113992[_0x38dadf(0x1f5)]]:[]});}return _0x8a95c;}async[a0_0x4236f8(0x1fa)](_0x1f55a6,_0x3c295b={}){const _0x2d1015=a0_0x4236f8;try{const _0x2e7a91=(await import(_0x2d1015(0x23a)))[_0x2d1015(0x235)],_0x5182ca=(await import(_0x2d1015(0x249)))[_0x2d1015(0x235)],_0xf2e054=await a0_0x5ca916['readFile'](_0x1f55a6,_0x2d1015(0x212)),_0x36bc34=JSON['parse'](_0xf2e054),_0x4bdffc=new _0x2e7a91({'allErrors':!![],'strict':![]});_0x5182ca(_0x4bdffc);const _0x423bf8={'type':'object','required':['name','version'],'properties':{'name':{'type':'string','pattern':'^(?:@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$'},'version':{'type':'string'},'description':{'type':_0x2d1015(0x207)},'main':{'type':_0x2d1015(0x207)},'type':{'type':'string','enum':[_0x2d1015(0x25b),_0x2d1015(0x230)]},'scripts':{'type':'object'},'dependencies':{'type':_0x2d1015(0x215)},'devDependencies':{'type':'object'}},'additionalProperties':!![]},_0xe60e78=_0x4bdffc[_0x2d1015(0x20d)](_0x423bf8),_0x3b234b=_0xe60e78(_0x36bc34);if(!_0x3b234b&&_0xe60e78['errors'])return _0xe60e78[_0x2d1015(0x221)]['map'](_0x5aff16=>({'file':_0x1f55a6,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x2d1015(0x21b)]['ERROR'],'rule':_0x2d1015(0x24d),'message':_0x5aff16[_0x2d1015(0x1ed)]?_0x5aff16[_0x2d1015(0x1ed)]+'\x20'+_0x5aff16[_0x2d1015(0x1fe)]:'must\x20have\x20required\x20property\x20\x27'+_0x5aff16[_0x2d1015(0x224)]['missingProperty']+'\x27','category':'validation','validator':'json-schema'}));return[];}catch(_0x4ec8b4){return this[_0x2d1015(0x23b)]?.['error']('package.json\x20validation\x20failed',{'error':_0x4ec8b4[_0x2d1015(0x1fe)]}),[{'file':_0x1f55a6,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x2d1015(0x21b)][_0x2d1015(0x1ec)],'rule':'json-parse','message':'Invalid\x20JSON:\x20'+_0x4ec8b4[_0x2d1015(0x1fe)],'category':_0x2d1015(0x217),'validator':'json-parse'}];}}async[a0_0x4236f8(0x1ef)](_0x574348,_0x111d1b={}){const _0x25e90a=a0_0x4236f8;try{const _0x1d031f=await a0_0x5ca916['readFile'](_0x574348,'utf-8'),_0x47e0f1=JSON['parse'](_0x1d031f),_0x12f691=[];if(_0x47e0f1['compilerOptions']){const _0x5c25c7=_0x47e0f1[_0x25e90a(0x239)];!_0x5c25c7['strict']&&_0x12f691['push']({'file':_0x574348,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x25e90a(0x223)],'rule':'strict-mode','message':_0x25e90a(0x1eb),'category':_0x25e90a(0x219),'validator':_0x25e90a(0x214)}),_0x5c25c7['noImplicitAny']===![]&&_0x12f691['push']({'file':_0x574348,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':_0x25e90a(0x1f3),'message':'Disabling\x20noImplicitAny\x20reduces\x20type\x20safety','category':'best-practice','validator':_0x25e90a(0x214)});}return _0x12f691;}catch(_0x10a1c8){return this['logger']?.[_0x25e90a(0x208)](_0x25e90a(0x244),{'error':_0x10a1c8[_0x25e90a(0x1fe)]}),[{'file':_0x574348,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['ERROR'],'rule':'json-parse','message':_0x25e90a(0x23f)+_0x10a1c8['message'],'category':_0x25e90a(0x217),'validator':_0x25e90a(0x229)}];}}async['validateEnvFile'](_0x4f66c0,_0x150766={}){const _0x4af102=a0_0x4236f8;try{const _0x16d729=await a0_0x5ca916['readFile'](_0x4f66c0,_0x4af102(0x212)),_0x572e53=[],_0x4ede96=_0x16d729[_0x4af102(0x1fb)]('\x0a'),_0x284a6c=[{'pattern':/password|passwd|pwd/i,'name':_0x4af102(0x1f1)},{'pattern':/api[_-]?key/i,'name':_0x4af102(0x21a)},{'pattern':/secret/i,'name':'secret'},{'pattern':/token/i,'name':'token'},{'pattern':/private[_-]?key/i,'name':_0x4af102(0x250)},{'pattern':/aws[_-]?access/i,'name':_0x4af102(0x226)}];return _0x4ede96[_0x4af102(0x1f7)]((_0x5f4b4c,_0x177b70)=>{const _0x5b1437=_0x4af102,_0x30bf2f=_0x5f4b4c['trim']();if(!_0x30bf2f||_0x30bf2f['startsWith']('#'))return;if(_0x30bf2f[_0x5b1437(0x253)]('=')){const [_0x12e3e7,_0x4e7f8b]=_0x30bf2f[_0x5b1437(0x1fb)]('='),_0x4906e5=_0x12e3e7[_0x5b1437(0x204)](),_0x587c03=_0x4e7f8b?.[_0x5b1437(0x238)]()||'',_0x5e608b=_0x587c03&&_0x587c03!==''&&!_0x587c03['startsWith']('$')&&_0x587c03!=='your-key-here'&&_0x587c03!==_0x5b1437(0x248)&&_0x587c03[_0x5b1437(0x259)]>0x5;if(_0x5e608b)for(const {pattern:_0x5c37e1,name:_0x135230}of _0x284a6c){if(_0x5c37e1[_0x5b1437(0x22b)](_0x4906e5)){_0x572e53[_0x5b1437(0x241)]({'file':_0x4f66c0,'line':_0x177b70+0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['CRITICAL'],'rule':_0x5b1437(0x220),'message':_0x5b1437(0x21f)+_0x135230+_0x5b1437(0x23e),'category':_0x5b1437(0x1e9),'validator':_0x5b1437(0x216),'remediation':_0x5b1437(0x203)});break;}}}}),_0x572e53;}catch(_0x2012c1){return this['logger']?.['error']('.env\x20validation\x20failed',{'error':_0x2012c1['message']}),[];}}[a0_0x4236f8(0x245)](_0x4eaf15){const _0xe9a75=a0_0x4236f8,_0x40f68f=a0_0x47ce9b[_0xe9a75(0x255)](_0x4eaf15)['toLowerCase'](),_0x1f6fe3=a0_0x47ce9b[_0xe9a75(0x1ff)](_0x4eaf15);if(_0x40f68f===_0xe9a75(0x1fc))return'dockerfile';if(_0x40f68f===_0xe9a75(0x205)||_0x40f68f===_0xe9a75(0x1e8))return _0xe9a75(0x1f9);if(_0x40f68f==='package.json')return _0xe9a75(0x258);if(_0x40f68f===_0xe9a75(0x225))return _0xe9a75(0x225);if(_0x40f68f===_0xe9a75(0x1ea)||_0x40f68f['endsWith']('.env'))return _0xe9a75(0x240);if(_0x1f6fe3[_0xe9a75(0x253)]('.github/workflows'))return _0xe9a75(0x1e4);if(_0x1f6fe3[_0xe9a75(0x253)](_0xe9a75(0x1f2))||_0x1f6fe3[_0xe9a75(0x253)](_0xe9a75(0x1e0)))return'kubernetes';const _0x5756d4=a0_0x47ce9b[_0xe9a75(0x22f)](_0x4eaf15)['toLowerCase']();if(_0x5756d4==='.tf'||_0x5756d4==='.tfvars')return _0xe9a75(0x242);if(_0x5756d4===_0xe9a75(0x22e)||_0x5756d4==='.yaml')return'yaml';if(_0x5756d4==='.json')return'json';return _0xe9a75(0x228);}['normalizeResults'](_0x3c6a6e){const _0x572d78=a0_0x4236f8;return _0x3c6a6e[_0x572d78(0x24e)](_0x38ca5c=>({'file':_0x38ca5c['file'],'line':_0x38ca5c['line']||0x1,'column':_0x38ca5c['column']||0x1,'severity':_0x38ca5c['severity']||STATIC_ANALYSIS[_0x572d78(0x21b)][_0x572d78(0x223)],'rule':_0x38ca5c['rule']||_0x572d78(0x228),'message':_0x38ca5c['message']||'Validation\x20issue\x20detected','category':_0x38ca5c[_0x572d78(0x1e6)]||'validation','validator':_0x38ca5c['validator'],'cwe':_0x38ca5c[_0x572d78(0x23c)]||null,'remediation':_0x38ca5c['remediation']||null,'references':_0x38ca5c['references']||[]}));}['mapHadolintSeverity'](_0x82d3ab){const _0x5e47f0=a0_0x4236f8,_0x360466={'error':STATIC_ANALYSIS[_0x5e47f0(0x21b)][_0x5e47f0(0x1ec)],'warning':STATIC_ANALYSIS[_0x5e47f0(0x21b)]['WARNING'],'info':STATIC_ANALYSIS['SEVERITY']['INFO'],'style':STATIC_ANALYSIS[_0x5e47f0(0x21b)][_0x5e47f0(0x22c)]};return _0x360466[_0x82d3ab?.[_0x5e47f0(0x204)]()]||STATIC_ANALYSIS['SEVERITY'][_0x5e47f0(0x223)];}[a0_0x4236f8(0x1f4)](_0x2707d1){const _0x73def3=a0_0x4236f8,_0x491619={'error':STATIC_ANALYSIS['SEVERITY']['ERROR'],'warning':STATIC_ANALYSIS[_0x73def3(0x21b)]['WARNING']};return _0x491619[_0x2707d1?.[_0x73def3(0x204)]()]||STATIC_ANALYSIS[_0x73def3(0x21b)][_0x73def3(0x223)];}['mapCheckovSeverity'](_0x55bebf){return STATIC_ANALYSIS['SEVERITY']['ERROR'];}async['getValidatorStatus'](){const _0x6da3e7=await this['detectAvailableValidators']();return{'validators':_0x6da3e7,'recommendations':this['getInstallRecommendations'](_0x6da3e7)};}[a0_0x4236f8(0x1f8)](_0x5de0a4){const _0x5d6979=a0_0x4236f8,_0x16878f=[];return!_0x5de0a4[_0x5d6979(0x231)]&&_0x16878f['push']({'validator':'checkov','reason':'Infrastructure\x20as\x20Code\x20security\x20scanning\x20(Docker,\x20Kubernetes,\x20Terraform)','install':_0x5d6979(0x243),'priority':'high'}),!_0x5de0a4['hadolint']&&_0x16878f['push']({'validator':'hadolint','reason':'Dockerfile\x20linting\x20and\x20best\x20practices','install':'Download from https://github.com/hadolint/hadolint/releases','priority':_0x5d6979(0x234)}),!_0x5de0a4['yamllint']&&_0x16878f[_0x5d6979(0x241)]({'validator':'yamllint','reason':_0x5d6979(0x21d),'install':'pip\x20install\x20yamllint','priority':_0x5d6979(0x201)}),!_0x5de0a4['jsonSchema']&&_0x16878f['push']({'validator':'ajv\x20(JSON\x20Schema)','reason':'JSON\x20configuration\x20validation','install':_0x5d6979(0x257),'priority':_0x5d6979(0x201)}),_0x16878f;}}export default ConfigValidator;
1
+ const a0_0x21897e=a0_0x1799;function a0_0x3279(){const _0x266021=['Bgv2zwW','ywP2lwzVCM1HDhm','ndKWnJa4mhHizLPLrW','zxH0BMfTzq','rMfPBgvKihrVihbHCNnLigHHzg9SAw50ig91Dhb1Da','xIG/oKbBys16mc05lx5Dw2eTEJaTos0Ux35DkI8Pp1THlxOWltKTFL1Bys16mc05ls5FFL0Qja','CMvTzwrPyxrPB24','Aw5JBhvKzxm','v0fstKLorW','DMvYC2LVBG','mJqYmdjTzuL2z0S','sw52ywXPzcbku09ooIa','EwfTBgXPBNq','u0vwrvjjvfK','Bw9KDwXL','DMfSAwrHDgvxAxrOq2HLy2TVDG','zgvIDwC','Ew91CI1RzxKTAgvYzq','zxjYB3i','ChjPDMf0zsbRzxK','sLnptIbty2HLBweGDMfSAwrHDgLVBIbHDMfPBgfIBgu','lNrM','sLnptIbJB25MAwD1CMf0Aw9UihzHBgLKyxrPB24','zg9JA2vYzMLSzq','ANnVBLnJAgvTyq','z2L0AhvIlwfJDgLVBNm','y2HLy2TVDIbUB3qGyxzHAwXHyMXL','BMfTzq','DhnJB25MAwCTDMfSAwrHDg9Y','Bwf0y2G','rgLZywjSAw5Nig5Vsw1WBgLJAxrbBNKGCMvKDwnLCYb0ExbLihnHzMv0Eq','ywP2icHku09oifnJAgvTysK','DMfSAwrHDgLVBG','y29SDw1U','su5gtW','zMLSDgvY','A3vIzxjUzxrLCW','AgfYzgnVzgvKlxnLy3jLDa','Bg9Nz2vY','BxvZDcbOyxzLihjLCxvPCMvKihbYB3bLCNr5icC','C3LUDgf4','D2fYBG','CMvHzezPBgu','C2vJCMv0','DMfSAwrHDgvuC0nVBMzPzW','Dw5RBM93BG','CgfYyw1Z','mti4D1PWquH3','ANnVBG','CgfYC2viywrVBgLUDfjLC3vSDhm','zgv0zwn0qxzHAwXHyMXLvMfSAwrHDg9YCW','mZvSzfzztui','AgfKB2XPBNqGDMfSAwrHDgLVBIbMywLSzwq','ANnVBI1WyxjZzq','C3rHCNrZv2L0Aa','z3vPzgvSAw5L','CgLWigLUC3rHBgWGy2HLy2TVDG','C3rYAwn0lw1Vzgu','zgLYBMfTzq','mtmZodG4nJHzwhf1zui','zxjYB3jZ','AgfKB2XPBNqGBM90igf2ywLSywjSzq','lMvUDG','DMfSAwrHDgveB2nRzxjMAwXL','BgLUzq','BM9YBwfSAxPLuMvZDwX0CW','ChvZAa','yxzHAwXHyMXLu2nHBM5LCNm','vxnLigvUDMLYB25Tzw50lxnWzwnPzMLJic5LBNyGzMLSzxmGyw5KigfKzcaUzw52ihrVic5NAxrPz25VCMu','y2HLy2TFAwq','rg9JA2vYzMLSzsbSAw50Aw5NigfUzcbIzxn0ihbYywn0AwnLCW','iIaTlwzYyw1LD29YAYa','C3bSAxq','zgvMyxvSDa','zgv0zwn0rMLSzvr5Cgu','DhnJB25MAwCUANnVBG','C2v2zxjPDhK','DMfSAwrHDgvfBNzgAwXL','CgfYC2u','zM9YrwfJAa','z2v0vMfSAwrHDg9Yu3rHDhvZ','zMLSzv9SAw5Lx3jHBMDL','AgfKB2XPBNq','odKZmZuYquzsDxbo','BwvZC2fNzq','q1jjveLdquW','Aw5ZDgfUy2vqyxrO','C3rYAw5N','ntiWodi3ovPkB3H0qq','CgfJA2fNzs5QC29U','yMfZzw5HBwu','zg9JA2vYlwnVBxbVC2uUEwfTBa','y29TCgLSzq','lNrMDMfYCW','lMDPDgH1yI93B3jRzMXVD3m','zg9JA2vYlwnVBxbVC2uUEw1S','DMfSAwrHDgvqywnRywDLsNnVBG','CgfYC2vzyw1SBgLUDfjLC3vSDhm','zg9JA2vYlwnVBxbVC2u','lMvUDIb2ywXPzgf0Aw9UigzHAwXLza','BgvUz3rO','Dg9mB3DLCKnHC2u','CNvSzq','zw52','y2HLy2TVDG','lNLTBa','AgfKB2XPBNqGls12zxjZAw9U','ywP2','C3rKB3v0','mZi1nNvstwLcEG','zMLSzq','yMvZDc1WCMfJDgLJzq','mta0nduWBNvYv2HH','DxrMltG','ANnVBI1Zy2HLBwe','y29TCgLSzxjpChrPB25Z','BwvKAxvT','rvjst1i','qvbjigTLEq','DMfSAwrHDgvzqu1m','ntaYnZzRB1DpDwS','B2jQzwn0','EwfTBa','mZvRBNLksvq','AZHZ','CgfYC2vdAgvJA292uMvZDwX0CW','q29UC2LKzxiGzw5HyMXPBMCGiNn0CMLJDciGBw9KzsbMB3iGyMv0DgvYihr5CguGC2fMzxr5','DMfSAwrHDg9Y','EwfTBgXPBNqGDMfSAwrHDgLVBIbMywLSzwq','vw5RBM93BIbJB25MAwCGzMLSzsb0ExbL'];a0_0x3279=function(){return _0x266021;};return a0_0x3279();}(function(_0x195427,_0x328d99){const _0x4a9546=a0_0x1799,_0x106ac1=_0x195427();while(!![]){try{const _0x43d96c=parseInt(_0x4a9546(0xd7))/0x1*(-parseInt(_0x4a9546(0xb2))/0x2)+-parseInt(_0x4a9546(0x7e))/0x3+parseInt(_0x4a9546(0x9e))/0x4*(-parseInt(_0x4a9546(0xa1))/0x5)+-parseInt(_0x4a9546(0xaa))/0x6+-parseInt(_0x4a9546(0xdb))/0x7*(-parseInt(_0x4a9546(0x79))/0x8)+parseInt(_0x4a9546(0xe3))/0x9+parseInt(_0x4a9546(0x96))/0xa*(parseInt(_0x4a9546(0x93))/0xb);if(_0x43d96c===_0x328d99)break;else _0x106ac1['push'](_0x106ac1['shift']());}catch(_0x363580){_0x106ac1['push'](_0x106ac1['shift']());}}}(a0_0x3279,0xe7359));function a0_0x1799(_0x4b25dc,_0x3a4760){_0x4b25dc=_0x4b25dc-0x79;const _0x3279c0=a0_0x3279();let _0x1799c7=_0x3279c0[_0x4b25dc];if(a0_0x1799['tBtHDJ']===undefined){var _0x50ae62=function(_0x281fe8){const _0x3afff5='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5a86a5='',_0x2bc31b='';for(let _0x4ad0b6=0x0,_0x1d8df1,_0x37fbb6,_0x24c547=0x0;_0x37fbb6=_0x281fe8['charAt'](_0x24c547++);~_0x37fbb6&&(_0x1d8df1=_0x4ad0b6%0x4?_0x1d8df1*0x40+_0x37fbb6:_0x37fbb6,_0x4ad0b6++%0x4)?_0x5a86a5+=String['fromCharCode'](0xff&_0x1d8df1>>(-0x2*_0x4ad0b6&0x6)):0x0){_0x37fbb6=_0x3afff5['indexOf'](_0x37fbb6);}for(let _0x593b77=0x0,_0x2e813c=_0x5a86a5['length'];_0x593b77<_0x2e813c;_0x593b77++){_0x2bc31b+='%'+('00'+_0x5a86a5['charCodeAt'](_0x593b77)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2bc31b);};a0_0x1799['ZVibeD']=_0x50ae62,a0_0x1799['qCeIzJ']={},a0_0x1799['tBtHDJ']=!![];}const _0x474b30=_0x3279c0[0x0],_0x56c5cd=_0x4b25dc+_0x474b30,_0x39f755=a0_0x1799['qCeIzJ'][_0x56c5cd];return!_0x39f755?(_0x1799c7=a0_0x1799['ZVibeD'](_0x1799c7),a0_0x1799['qCeIzJ'][_0x56c5cd]=_0x1799c7):_0x1799c7=_0x39f755,_0x1799c7;}import{exec}from'child_process';import{promisify}from'util';import a0_0x5a86a5 from'path';import a0_0x2bc31b from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';const execAsync=promisify(exec);class ConfigValidator{constructor(_0x4ad0b6=null){const _0x1acc4a=a0_0x1799;this[_0x1acc4a(0xce)]=_0x4ad0b6,this[_0x1acc4a(0xeb)]=null,this['scannerCache']=new Map();}async[a0_0x21897e(0xda)](){const _0xde15f4=a0_0x21897e;if(this['availableScanners']!==null)return this[_0xde15f4(0xeb)];const _0x1d8df1={'checkov':![],'hadolint':![],'yamllint':![],'jsonSchema':![]};try{await execAsync('checkov\x20--version',{'timeout':0x1388}),_0x1d8df1['checkov']=!![],this['logger']?.['debug']('checkov\x20detected');}catch(_0x37fbb6){this['logger']?.['debug'](_0xde15f4(0xc2),{'error':_0x37fbb6[_0xde15f4(0x7a)]});}try{await execAsync(_0xde15f4(0x90),{'timeout':0x1388}),_0x1d8df1['hadolint']=!![],this['logger']?.['debug']('hadolint\x20detected');}catch(_0x24c547){this['logger']?.['debug'](_0xde15f4(0xe5),{'error':_0x24c547[_0xde15f4(0x7a)]});}try{await execAsync('yamllint\x20--version',{'timeout':0x1388}),_0x1d8df1[_0xde15f4(0xb4)]=!![],this[_0xde15f4(0xce)]?.[_0xde15f4(0xb8)]('yamllint\x20detected');}catch(_0x593b77){this[_0xde15f4(0xce)]?.['debug']('yamllint\x20not\x20available',{'error':_0x593b77['message']});}try{await import('ajv'),_0x1d8df1[_0xde15f4(0xc0)]=!![],this[_0xde15f4(0xce)]?.[_0xde15f4(0xb8)](_0xde15f4(0xbc));}catch(_0x2e813c){this['logger']?.[_0xde15f4(0xb8)]('ajv\x20not\x20available',{'error':_0x2e813c['message']});}return this[_0xde15f4(0xeb)]=_0x1d8df1,_0x1d8df1;}async['validate'](_0x3348c6,_0x5eeb13={}){const _0x1f6548=a0_0x21897e,_0x3a8352=[],_0x4893dd=await this['detectAvailableValidators'](),_0x3ae132=this[_0x1f6548(0xf2)](_0x3348c6);this[_0x1f6548(0xce)]?.['debug']('Validating\x20config\x20file',{'filePath':_0x3348c6,'fileType':_0x3ae132});switch(_0x3ae132){case'dockerfile':if(_0x4893dd['hadolint']){const _0x4ab7b9=await this[_0x1f6548(0xe7)](_0x3348c6,_0x5eeb13);_0x3a8352['push'](..._0x4ab7b9);}if(_0x4893dd['checkov']){const _0x2279b6=await this['validateWithCheckov'](_0x3348c6,'dockerfile',_0x5eeb13);_0x3a8352[_0x1f6548(0xea)](..._0x2279b6);}break;case _0x1f6548(0x88):if(_0x4893dd['yamllint']){const _0x729b56=await this['validateYAML'](_0x3348c6,_0x5eeb13);_0x3a8352['push'](..._0x729b56);}if(_0x4893dd['checkov']){const _0x3e2d04=await this['validateWithCheckov'](_0x3348c6,'docker_compose',_0x5eeb13);_0x3a8352[_0x1f6548(0xea)](..._0x3e2d04);}break;case _0x1f6548(0xcc):if(_0x4893dd['yamllint']){const _0x159f0d=await this[_0x1f6548(0x9d)](_0x3348c6,_0x5eeb13);_0x3a8352[_0x1f6548(0xea)](..._0x159f0d);}if(_0x4893dd['checkov']){const _0x44a242=await this['validateWithCheckov'](_0x3348c6,_0x1f6548(0xcc),_0x5eeb13);_0x3a8352[_0x1f6548(0xea)](..._0x44a242);}break;case'terraform':if(_0x4893dd['checkov']){const _0xdd9c75=await this['validateWithCheckov'](_0x3348c6,'terraform',_0x5eeb13);_0x3a8352['push'](..._0xdd9c75);}break;case'package.json':if(_0x4893dd[_0x1f6548(0xc0)]){const _0x210b99=await this[_0x1f6548(0x86)](_0x3348c6,_0x5eeb13);_0x3a8352['push'](..._0x210b99);}break;case _0x1f6548(0xf3):if(_0x4893dd[_0x1f6548(0xc0)]){const _0x777d80=await this[_0x1f6548(0xd4)](_0x3348c6,_0x5eeb13);_0x3a8352[_0x1f6548(0xea)](..._0x777d80);}break;case _0x1f6548(0xc1):if(_0x4893dd['yamllint']){const _0x1e18f8=await this[_0x1f6548(0x9d)](_0x3348c6,_0x5eeb13);_0x3a8352[_0x1f6548(0xea)](..._0x1e18f8);}break;case'env':const _0xa975e9=await this[_0x1f6548(0xf5)](_0x3348c6,_0x5eeb13);_0x3a8352[_0x1f6548(0xea)](..._0xa975e9);break;case'yaml':if(_0x4893dd['yamllint']){const _0x37ff46=await this['validateYAML'](_0x3348c6,_0x5eeb13);_0x3a8352['push'](..._0x37ff46);}break;default:this[_0x1f6548(0xce)]?.[_0x1f6548(0xd1)](_0x1f6548(0xa7),{'filePath':_0x3348c6,'fileType':_0x3ae132});return[];}return this['normalizeResults'](_0x3a8352);}async[a0_0x21897e(0xe7)](_0x1766ab,_0x108401={}){const _0x1e7f24=a0_0x21897e;try{const _0x3edb1f=await execAsync('hadolint\x20--format\x20json\x20\x22'+_0x1766ab+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0x21a299=JSON[_0x1e7f24(0xf6)](_0x3edb1f[_0x1e7f24(0x92)]);return this['parseHadolintResults'](_0x21a299,_0x1766ab);}catch(_0xf0042a){if(_0xf0042a['stdout'])try{const _0x2f9cb5=JSON['parse'](_0xf0042a['stdout']);return this[_0x1e7f24(0xd9)](_0x2f9cb5,_0x1766ab);}catch(_0x33c7dc){this['logger']?.[_0x1e7f24(0xba)](_0x1e7f24(0xac),{'error':_0x33c7dc['message']});}return this[_0x1e7f24(0xce)]?.['error'](_0x1e7f24(0xdc),{'error':_0xf0042a['message']}),[];}}[a0_0x21897e(0xd9)](_0x1dc0e0,_0x5d224f){const _0x353c8a=a0_0x21897e,_0x53ad51=[];if(Array['isArray'](_0x1dc0e0))for(const _0x1aff5d of _0x1dc0e0){_0x53ad51[_0x353c8a(0xea)]({'file':_0x5d224f,'line':_0x1aff5d[_0x353c8a(0xe8)]||0x1,'column':_0x1aff5d[_0x353c8a(0xc9)]||0x1,'severity':this['mapHadolintSeverity'](_0x1aff5d[_0x353c8a(0xa8)]),'rule':_0x1aff5d['code'],'message':_0x1aff5d['message'],'category':_0x353c8a(0xbf),'validator':_0x353c8a(0xfa)});}return _0x53ad51;}async['validateYAML'](_0x149b5a,_0x1b9eb0={}){const _0x4c305d=a0_0x21897e;try{const _0x22309f=await execAsync('yamllint\x20-f\x20parsable\x20\x22'+_0x149b5a+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530});return this[_0x4c305d(0x87)](_0x22309f[_0x4c305d(0x92)],_0x149b5a);}catch(_0x5d919d){if(_0x5d919d[_0x4c305d(0x92)])return this['parseYamllintResults'](_0x5d919d['stdout'],_0x149b5a);return this[_0x4c305d(0xce)]?.[_0x4c305d(0xba)](_0x4c305d(0xa6),{'error':_0x5d919d[_0x4c305d(0x7a)]}),[];}}[a0_0x21897e(0x87)](_0x4c22c8,_0x356507){const _0x58a741=a0_0x21897e,_0x272c5a=[],_0x4675ef=_0x4c22c8['split']('\x0a')[_0x58a741(0xcb)](_0x3baf47=>_0x3baf47['trim']());for(const _0x1f8fad of _0x4675ef){const _0xfc9d80=_0x1f8fad[_0x58a741(0xc5)](/^(.+?):(\d+):(\d+):\s*\[(\w+)\]\s*(.+?)\s*\((.+?)\)/);if(_0xfc9d80){const [,_0x627f1,_0x12d9ec,_0x2b5ba5,_0x4f34dc,_0x51f1f6,_0x46e7a9]=_0xfc9d80;_0x272c5a['push']({'file':_0x356507,'line':parseInt(_0x12d9ec,0xa),'column':parseInt(_0x2b5ba5,0xa),'severity':this['mapYamllintSeverity'](_0x4f34dc),'rule':_0x46e7a9,'message':_0x51f1f6,'category':_0x58a741(0xa0),'validator':_0x58a741(0xb4)});}}return _0x272c5a;}async[a0_0x21897e(0xb7)](_0x136d01,_0x5600ab,_0x49e33e={}){const _0x128e12=a0_0x21897e;try{const _0x4969af=await execAsync('checkov\x20-f\x20\x22'+_0x136d01+_0x128e12(0xef)+_0x5600ab+'\x20--output\x20json\x20--compact',{'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0xb725da=JSON[_0x128e12(0xf6)](_0x4969af['stdout']);return this[_0x128e12(0xa3)](_0xb725da,_0x136d01);}catch(_0x425cd7){if(_0x425cd7[_0x128e12(0x92)])try{const _0x4228e6=JSON[_0x128e12(0xf6)](_0x425cd7['stdout']);return this['parseCheckovResults'](_0x4228e6,_0x136d01);}catch(_0x312dbf){this[_0x128e12(0xce)]?.['error']('Failed\x20to\x20parse\x20checkov\x20output',{'error':_0x312dbf[_0x128e12(0x7a)]});}return this[_0x128e12(0xce)]?.['error']('checkov\x20validation\x20failed',{'error':_0x425cd7[_0x128e12(0x7a)]}),[];}}['parseCheckovResults'](_0x5c3367,_0xb473eb){const _0x28c506=a0_0x21897e,_0x15f979=[];if(_0x5c3367['results']&&_0x5c3367['results']['failed_checks'])for(const _0x594e32 of _0x5c3367['results']['failed_checks']){_0x15f979['push']({'file':_0xb473eb,'line':_0x594e32[_0x28c506(0xf9)]?_0x594e32[_0x28c506(0xf9)][0x0]:0x1,'column':0x1,'severity':this['mapCheckovSeverity'](_0x594e32['check_class']),'rule':_0x594e32[_0x28c506(0xed)],'message':_0x594e32['check_name']||_0x594e32['check_id'],'category':'security','validator':'checkov','remediation':_0x594e32['guideline'],'cwe':_0x594e32['cwe'],'references':_0x594e32['guideline']?[_0x594e32[_0x28c506(0xdf)]]:[]});}return _0x15f979;}async['validatePackageJson'](_0xdb1ea9,_0x1ffce4={}){const _0x3bf0d8=a0_0x21897e;try{const _0xec12a1=(await import(_0x3bf0d8(0x91)))[_0x3bf0d8(0xf1)],_0x2fee13=(await import(_0x3bf0d8(0xa9)))['default'],_0x371f8d=await a0_0x2bc31b['readFile'](_0xdb1ea9,'utf-8'),_0x4ef996=JSON['parse'](_0x371f8d),_0x392c25=new _0xec12a1({'allErrors':!![],'strict':![]});_0x2fee13(_0x392c25);const _0x8e703e={'type':_0x3bf0d8(0x9f),'required':[_0x3bf0d8(0xc3),_0x3bf0d8(0xb1)],'properties':{'name':{'type':_0x3bf0d8(0x7d),'pattern':_0x3bf0d8(0xad)},'version':{'type':'string'},'description':{'type':_0x3bf0d8(0x7d)},'main':{'type':'string'},'type':{'type':_0x3bf0d8(0x7d),'enum':[_0x3bf0d8(0xb6),'commonjs']},'scripts':{'type':_0x3bf0d8(0x9f)},'dependencies':{'type':'object'},'devDependencies':{'type':'object'}},'additionalProperties':!![]},_0x369a10=_0x392c25[_0x3bf0d8(0x82)](_0x8e703e),_0x56cbfd=_0x369a10(_0x4ef996);if(!_0x56cbfd&&_0x369a10[_0x3bf0d8(0xe4)])return _0x369a10['errors']['map'](_0x5a10e6=>({'file':_0xdb1ea9,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x3bf0d8(0x9b)],'rule':'json-schema','message':_0x5a10e6[_0x3bf0d8(0x7c)]?_0x5a10e6['instancePath']+'\x20'+_0x5a10e6[_0x3bf0d8(0x7a)]:_0x3bf0d8(0xcf)+_0x5a10e6[_0x3bf0d8(0xd6)]['missingProperty']+'\x27','category':_0x3bf0d8(0xc8),'validator':_0x3bf0d8(0x98)}));return[];}catch(_0x46af66){return this[_0x3bf0d8(0xce)]?.[_0x3bf0d8(0xba)]('package.json\x20validation\x20failed',{'error':_0x46af66[_0x3bf0d8(0x7a)]}),[{'file':_0xdb1ea9,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x3bf0d8(0xb5)]['ERROR'],'rule':_0x3bf0d8(0xdd),'message':_0x3bf0d8(0xb3)+_0x46af66['message'],'category':_0x3bf0d8(0xd0),'validator':_0x3bf0d8(0xdd)}];}}async['validateTsConfig'](_0x1b879d,_0x395c08={}){const _0x9947d4=a0_0x21897e;try{const _0x37e48f=await a0_0x2bc31b[_0x9947d4(0xd2)](_0x1b879d,_0x9947d4(0x97)),_0x50e3a9=JSON[_0x9947d4(0xf6)](_0x37e48f),_0x5e2302=[];if(_0x50e3a9['compilerOptions']){const _0x38a9cd=_0x50e3a9[_0x9947d4(0x99)];!_0x38a9cd['strict']&&_0x5e2302[_0x9947d4(0xea)]({'file':_0x1b879d,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x9947d4(0xb5)]['WARNING'],'rule':_0x9947d4(0xe1),'message':_0x9947d4(0xa4),'category':_0x9947d4(0x95),'validator':'tsconfig-validator'}),_0x38a9cd['noImplicitAny']===![]&&_0x5e2302['push']({'file':_0x1b879d,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x9947d4(0xb5)][_0x9947d4(0xb0)],'rule':'no-implicit-any','message':_0x9947d4(0xc6),'category':_0x9947d4(0x95),'validator':_0x9947d4(0xc4)});}return _0x5e2302;}catch(_0x229516){return this[_0x9947d4(0xce)]?.[_0x9947d4(0xba)]('tsconfig.json\x20validation\x20failed',{'error':_0x229516['message']}),[{'file':_0x1b879d,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x9947d4(0x9b)],'rule':_0x9947d4(0xdd),'message':_0x9947d4(0xb3)+_0x229516['message'],'category':_0x9947d4(0xd0),'validator':_0x9947d4(0xdd)}];}}async['validateEnvFile'](_0x23f25b,_0x21b542={}){const _0x38d221=a0_0x21897e;try{const _0x249ea1=await a0_0x2bc31b['readFile'](_0x23f25b,'utf-8'),_0x34790f=[],_0x7dafbb=_0x249ea1['split']('\x0a'),_0x11ef2c=[{'pattern':/password|passwd|pwd/i,'name':'password'},{'pattern':/api[_-]?key/i,'name':_0x38d221(0x9c)},{'pattern':/secret/i,'name':_0x38d221(0xd3)},{'pattern':/token/i,'name':'token'},{'pattern':/private[_-]?key/i,'name':_0x38d221(0xbb)},{'pattern':/aws[_-]?access/i,'name':'AWS\x20credentials'}];return _0x7dafbb[_0x38d221(0xf7)]((_0x2fdb2b,_0x488640)=>{const _0x549e80=_0x38d221,_0x23f96a=_0x2fdb2b['trim']();if(!_0x23f96a||_0x23f96a[_0x549e80(0xde)]('#'))return;if(_0x23f96a[_0x549e80(0xaf)]('=')){const [_0x1ae321,_0x427781]=_0x23f96a[_0x549e80(0xf0)]('='),_0x55ac99=_0x1ae321[_0x549e80(0x8b)](),_0x3dcee9=_0x427781?.['trim']()||'',_0x1d756b=_0x3dcee9&&_0x3dcee9!==''&&!_0x3dcee9['startsWith']('$')&&_0x3dcee9!==_0x549e80(0xb9)&&_0x3dcee9!=='changeme'&&_0x3dcee9[_0x549e80(0x8a)]>0x5;if(_0x1d756b)for(const {pattern:_0x6d6947,name:_0x130d44}of _0x11ef2c){if(_0x6d6947['test'](_0x55ac99)){_0x34790f[_0x549e80(0xea)]({'file':_0x23f25b,'line':_0x488640+0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x549e80(0xb5)][_0x549e80(0x7b)],'rule':_0x549e80(0xcd),'message':'Potential\x20hardcoded\x20'+_0x130d44+'\x20detected\x20in\x20.env\x20file','category':'security','validator':'env-validator','remediation':_0x549e80(0xec)});break;}}}}),_0x34790f;}catch(_0x382093){return this['logger']?.[_0x38d221(0xba)](_0x38d221(0x89),{'error':_0x382093[_0x38d221(0x7a)]}),[];}}['detectFileType'](_0x4d7269){const _0x1b5252=a0_0x21897e,_0xbbdea2=a0_0x5a86a5[_0x1b5252(0x80)](_0x4d7269)[_0x1b5252(0x8b)](),_0x42e8bf=a0_0x5a86a5[_0x1b5252(0xe2)](_0x4d7269);if(_0xbbdea2==='dockerfile')return _0x1b5252(0xbf);if(_0xbbdea2===_0x1b5252(0x85)||_0xbbdea2===_0x1b5252(0x81))return _0x1b5252(0x88);if(_0xbbdea2===_0x1b5252(0x7f))return'package.json';if(_0xbbdea2===_0x1b5252(0xf3))return'tsconfig.json';if(_0xbbdea2===_0x1b5252(0xe6)||_0xbbdea2['endsWith'](_0x1b5252(0xe6)))return _0x1b5252(0x8d);if(_0x42e8bf['includes'](_0x1b5252(0x84)))return'github-actions';if(_0x42e8bf[_0x1b5252(0xaf)](_0x1b5252(0xcc))||_0x42e8bf[_0x1b5252(0xaf)](_0x1b5252(0xa2)))return _0x1b5252(0xcc);const _0x5d0e02=a0_0x5a86a5[_0x1b5252(0xab)](_0x4d7269)['toLowerCase']();if(_0x5d0e02===_0x1b5252(0xbd)||_0x5d0e02===_0x1b5252(0x83))return'terraform';if(_0x5d0e02===_0x1b5252(0x8f)||_0x5d0e02==='.yaml')return'yaml';if(_0x5d0e02==='.json')return _0x1b5252(0xd8);return _0x1b5252(0xd5);}[a0_0x21897e(0xe9)](_0x3902d3){const _0x369596=a0_0x21897e;return _0x3902d3['map'](_0x5dcb5a=>({'file':_0x5dcb5a[_0x369596(0x94)],'line':_0x5dcb5a[_0x369596(0xe8)]||0x1,'column':_0x5dcb5a['column']||0x1,'severity':_0x5dcb5a[_0x369596(0xf4)]||STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':_0x5dcb5a[_0x369596(0x8c)]||_0x369596(0xd5),'message':_0x5dcb5a['message']||'Validation\x20issue\x20detected','category':_0x5dcb5a['category']||_0x369596(0xc8),'validator':_0x5dcb5a[_0x369596(0xa5)],'cwe':_0x5dcb5a['cwe']||null,'remediation':_0x5dcb5a[_0x369596(0xae)]||null,'references':_0x5dcb5a['references']||[]}));}['mapHadolintSeverity'](_0x596a23){const _0x21c652=a0_0x21897e,_0x4b6e2f={'error':STATIC_ANALYSIS[_0x21c652(0xb5)][_0x21c652(0x9b)],'warning':STATIC_ANALYSIS['SEVERITY']['WARNING'],'info':STATIC_ANALYSIS[_0x21c652(0xb5)][_0x21c652(0xca)],'style':STATIC_ANALYSIS[_0x21c652(0xb5)]['INFO']};return _0x4b6e2f[_0x596a23?.['toLowerCase']()]||STATIC_ANALYSIS['SEVERITY']['WARNING'];}['mapYamllintSeverity'](_0x4ee7c8){const _0x514537=a0_0x21897e,_0x3f378b={'error':STATIC_ANALYSIS[_0x514537(0xb5)][_0x514537(0x9b)],'warning':STATIC_ANALYSIS['SEVERITY'][_0x514537(0xb0)]};return _0x3f378b[_0x4ee7c8?.[_0x514537(0x8b)]()]||STATIC_ANALYSIS['SEVERITY']['WARNING'];}['mapCheckovSeverity'](_0x35f273){const _0x32522d=a0_0x21897e;return STATIC_ANALYSIS[_0x32522d(0xb5)]['ERROR'];}async[a0_0x21897e(0xf8)](){const _0x567247=await this['detectAvailableValidators']();return{'validators':_0x567247,'recommendations':this['getInstallRecommendations'](_0x567247)};}['getInstallRecommendations'](_0x1da4d5){const _0x30d258=a0_0x21897e,_0x89be26=[];return!_0x1da4d5[_0x30d258(0x8e)]&&_0x89be26['push']({'validator':_0x30d258(0x8e),'reason':'Infrastructure\x20as\x20Code\x20security\x20scanning\x20(Docker,\x20Kubernetes,\x20Terraform)','install':_0x30d258(0xe0),'priority':'high'}),!_0x1da4d5['hadolint']&&_0x89be26['push']({'validator':_0x30d258(0xfa),'reason':_0x30d258(0xee),'install':'Download from https://github.com/hadolint/hadolint/releases','priority':'high'}),!_0x1da4d5['yamllint']&&_0x89be26[_0x30d258(0xea)]({'validator':'yamllint','reason':'YAML\x20file\x20validation','install':'pip\x20install\x20yamllint','priority':'medium'}),!_0x1da4d5['jsonSchema']&&_0x89be26[_0x30d258(0xea)]({'validator':_0x30d258(0xc7),'reason':_0x30d258(0xbe),'install':'npm\x20install\x20ajv\x20ajv-formats','priority':_0x30d258(0x9a)}),_0x89be26;}}export default ConfigValidator;