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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/README.md +5 -3
  2. package/bin/cli.js +1 -1
  3. package/bin/loxia-terminal-v2.js +1 -1
  4. package/bin/loxia-terminal.js +1 -1
  5. package/bin/start-with-terminal.js +1 -1
  6. package/package.json +1 -1
  7. package/scripts/install-scanners.js +1 -1
  8. package/src/analyzers/CSSAnalyzer.js +1 -1
  9. package/src/analyzers/ConfigValidator.js +1 -1
  10. package/src/analyzers/ESLintAnalyzer.js +1 -1
  11. package/src/analyzers/JavaScriptAnalyzer.js +1 -1
  12. package/src/analyzers/PrettierFormatter.js +1 -1
  13. package/src/analyzers/PythonAnalyzer.js +1 -1
  14. package/src/analyzers/SecurityAnalyzer.js +1 -1
  15. package/src/analyzers/TypeScriptAnalyzer.js +1 -1
  16. package/src/analyzers/codeCloneDetector/analyzer.js +1 -1
  17. package/src/analyzers/codeCloneDetector/detector.js +1 -1
  18. package/src/analyzers/codeCloneDetector/index.js +1 -1
  19. package/src/analyzers/codeCloneDetector/parser.js +1 -1
  20. package/src/analyzers/codeCloneDetector/reporter.js +1 -1
  21. package/src/analyzers/codeCloneDetector/scanner.js +1 -1
  22. package/src/core/agentPool.js +1 -1
  23. package/src/core/agentScheduler.js +1 -1
  24. package/src/core/contextManager.js +1 -1
  25. package/src/core/messageProcessor.js +1 -1
  26. package/src/core/orchestrator.js +1 -1
  27. package/src/core/stateManager.js +1 -1
  28. package/src/index.js +1 -1
  29. package/src/interfaces/cli.js +1 -1
  30. package/src/interfaces/terminal/__tests__/smoke/advancedFeatures.test.js +1 -1
  31. package/src/interfaces/terminal/__tests__/smoke/agentControl.test.js +1 -1
  32. package/src/interfaces/terminal/__tests__/smoke/agents.test.js +1 -1
  33. package/src/interfaces/terminal/__tests__/smoke/components.test.js +1 -1
  34. package/src/interfaces/terminal/__tests__/smoke/connection.test.js +1 -1
  35. package/src/interfaces/terminal/__tests__/smoke/enhancements.test.js +1 -1
  36. package/src/interfaces/terminal/__tests__/smoke/imports.test.js +1 -1
  37. package/src/interfaces/terminal/__tests__/smoke/messages.test.js +1 -1
  38. package/src/interfaces/terminal/__tests__/smoke/tools.test.js +1 -1
  39. package/src/interfaces/terminal/api/apiClient.js +1 -1
  40. package/src/interfaces/terminal/api/messageRouter.js +1 -1
  41. package/src/interfaces/terminal/api/session.js +1 -1
  42. package/src/interfaces/terminal/api/websocket.js +1 -1
  43. package/src/interfaces/terminal/components/AgentCreator.js +1 -1
  44. package/src/interfaces/terminal/components/AgentEditor.js +1 -1
  45. package/src/interfaces/terminal/components/AgentSwitcher.js +1 -1
  46. package/src/interfaces/terminal/components/ErrorBoundary.js +1 -1
  47. package/src/interfaces/terminal/components/ErrorPanel.js +1 -1
  48. package/src/interfaces/terminal/components/Header.js +1 -1
  49. package/src/interfaces/terminal/components/HelpPanel.js +1 -1
  50. package/src/interfaces/terminal/components/InputBox.js +1 -1
  51. package/src/interfaces/terminal/components/Layout.js +1 -1
  52. package/src/interfaces/terminal/components/LoadingSpinner.js +1 -1
  53. package/src/interfaces/terminal/components/MessageList.js +1 -1
  54. package/src/interfaces/terminal/components/MultilineTextInput.js +1 -1
  55. package/src/interfaces/terminal/components/SearchPanel.js +1 -1
  56. package/src/interfaces/terminal/components/SettingsPanel.js +1 -1
  57. package/src/interfaces/terminal/components/StatusBar.js +1 -1
  58. package/src/interfaces/terminal/components/TextInput.js +1 -1
  59. package/src/interfaces/terminal/config/agentEditorConstants.js +1 -1
  60. package/src/interfaces/terminal/config/constants.js +1 -1
  61. package/src/interfaces/terminal/index.js +1 -1
  62. package/src/interfaces/terminal/state/useAgentControl.js +1 -1
  63. package/src/interfaces/terminal/state/useAgents.js +1 -1
  64. package/src/interfaces/terminal/state/useConnection.js +1 -1
  65. package/src/interfaces/terminal/state/useMessages.js +1 -1
  66. package/src/interfaces/terminal/state/useTools.js +1 -1
  67. package/src/interfaces/terminal/utils/debugLogger.js +1 -1
  68. package/src/interfaces/terminal/utils/settingsStorage.js +1 -1
  69. package/src/interfaces/terminal/utils/theme.js +1 -1
  70. package/src/interfaces/webServer.js +1 -1
  71. package/src/modules/fileExplorer/controller.js +1 -1
  72. package/src/modules/fileExplorer/index.js +1 -1
  73. package/src/modules/fileExplorer/middleware.js +1 -1
  74. package/src/modules/fileExplorer/routes.js +1 -1
  75. package/src/services/agentActivityService.js +1 -1
  76. package/src/services/aiService.js +1 -1
  77. package/src/services/apiKeyManager.js +1 -1
  78. package/src/services/benchmarkService.js +1 -1
  79. package/src/services/budgetService.js +1 -1
  80. package/src/services/contextInjectionService.js +1 -1
  81. package/src/services/conversationCompactionService.js +1 -1
  82. package/src/services/errorHandler.js +1 -1
  83. package/src/services/fileAttachmentService.js +1 -1
  84. package/src/services/modelRouterService.js +1 -1
  85. package/src/services/modelsService.js +1 -1
  86. package/src/services/qualityInspector.js +1 -1
  87. package/src/services/tokenCountingService.js +1 -1
  88. package/src/tools/agentCommunicationTool.js +1 -1
  89. package/src/tools/agentDelayTool.js +1 -1
  90. package/src/tools/asyncToolManager.js +1 -1
  91. package/src/tools/baseTool.js +1 -1
  92. package/src/tools/browserTool.js +1 -1
  93. package/src/tools/cloneDetectionTool.js +1 -1
  94. package/src/tools/dependencyResolverTool.js +1 -1
  95. package/src/tools/fileContentReplaceTool.js +1 -1
  96. package/src/tools/fileSystemTool.js +1 -1
  97. package/src/tools/fileTreeTool.js +1 -1
  98. package/src/tools/imageTool.js +1 -1
  99. package/src/tools/importAnalyzerTool.js +1 -1
  100. package/src/tools/jobDoneTool.js +1 -1
  101. package/src/tools/seekTool.js +1 -1
  102. package/src/tools/staticAnalysisTool.js +1 -1
  103. package/src/tools/taskManagerTool.js +1 -1
  104. package/src/tools/terminalTool.js +1 -1
  105. package/src/tools/webTool.js +1 -1
  106. package/src/types/agent.js +1 -1
  107. package/src/types/contextReference.js +1 -1
  108. package/src/types/conversation.js +1 -1
  109. package/src/types/toolCommand.js +1 -1
  110. package/src/utilities/attachmentValidator.js +1 -1
  111. package/src/utilities/configManager.js +1 -1
  112. package/src/utilities/constants.js +1 -1
  113. package/src/utilities/directoryAccessManager.js +1 -1
  114. package/src/utilities/fileProcessor.js +1 -1
  115. package/src/utilities/logger.js +1 -1
  116. package/src/utilities/tagParser.js +1 -1
  117. package/src/utilities/toolConstants.js +1 -1
  118. package/src/utilities/userDataDir.js +1 -1
  119. package/web-ui/build/index.html +2 -2
  120. package/web-ui/build/static/index-Cb8CHAFw.css +1 -0
  121. package/web-ui/build/static/{index-DzOU48ux.js → index-DL2-PyNX.js} +72 -72
  122. package/web-ui/build/static/index-CRkOpV4k.css +0 -1
package/README.md CHANGED
@@ -99,7 +99,7 @@ npm install -g @loxia-labs/loxia-autopilot-one
99
99
 
100
100
  ```bash
101
101
  loxia --version
102
- # Should display: Loxia Autopilot One v1.0.16
102
+ # Should display: Loxia Autopilot One v1.0.18
103
103
  ```
104
104
 
105
105
  ### 4. Create an API Key
@@ -369,17 +369,19 @@ Loxia automatically compacts long conversations to stay within token limits:
369
369
 
370
370
  ## 🛣️ Roadmap
371
371
 
372
- ### Current Version (1.0.16)
372
+ ### Current Version (1.0.18)
373
373
 
374
374
  - ✅ Multi-agent orchestration
375
375
  - ✅ 18+ specialized tools
376
376
  - ✅ Web UI + CLI interfaces
377
- - ✅ Conversation compaction
377
+ - ✅ Conversation compaction with round-robin model selection
378
378
  - ✅ File attachments
379
379
  - ✅ Task management
380
380
  - ✅ Centralized agent activity service
381
381
  - ✅ Intelligent loop detection
382
382
  - ✅ Persistent user data across npm updates
383
+ - ✅ Version status display with update notifications
384
+ - ✅ Automatic token limit error recovery
383
385
 
384
386
  ### Upcoming Features
385
387
 
package/bin/cli.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x1264ea=a0_0x466a;(function(_0x26470b,_0x575efe){const _0x439675=a0_0x466a,_0x3f3c0d=_0x26470b();while(!![]){try{const _0x2a51ab=parseInt(_0x439675(0x208))/0x1*(-parseInt(_0x439675(0x217))/0x2)+parseInt(_0x439675(0x1d8))/0x3+-parseInt(_0x439675(0x210))/0x4+-parseInt(_0x439675(0x1e6))/0x5+parseInt(_0x439675(0x1f6))/0x6*(-parseInt(_0x439675(0x1e1))/0x7)+parseInt(_0x439675(0x21e))/0x8*(parseInt(_0x439675(0x1e0))/0x9)+-parseInt(_0x439675(0x1d9))/0xa*(-parseInt(_0x439675(0x1ff))/0xb);if(_0x2a51ab===_0x575efe)break;else _0x3f3c0d['push'](_0x3f3c0d['shift']());}catch(_0x49d353){_0x3f3c0d['push'](_0x3f3c0d['shift']());}}}(a0_0x3438,0x25699));import{fileURLToPath}from'url';import{dirname,join}from'path';function a0_0x466a(_0x5dcd0f,_0x4a41f3){_0x5dcd0f=_0x5dcd0f-0x1d4;const _0x343854=a0_0x3438();let _0x466a5b=_0x343854[_0x5dcd0f];return _0x466a5b;}import{spawn,exec}from'child_process';import{readFileSync}from'fs';import a0_0x303651 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x1264ea(0x202),SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process[a0_0x1264ea(0x1e9)][a0_0x1264ea(0x1ea)](0x2),command=args[0x0]&&!args[0x0][a0_0x1264ea(0x1e3)]('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args['includes']('--help')||args[a0_0x1264ea(0x1f4)]('-h'),'version':args['includes'](a0_0x1264ea(0x1e8))||args[a0_0x1264ea(0x1f4)]('-v')};for(let i=0x0;i<args[a0_0x1264ea(0x21d)];i++){args[i]==='--port'&&args[i+0x1]&&(flags[a0_0x1264ea(0x218)]=parseInt(args[i+0x1],0xa)),args[i]===a0_0x1264ea(0x212)&&args[i+0x1]&&(flags['host']=args[i+0x1]);}const port=flags[a0_0x1264ea(0x218)]||DEFAULT_PORT,host=flags[a0_0x1264ea(0x1dd)]||DEFAULT_HOST,serverUrl=a0_0x1264ea(0x1fd)+host+':'+port;if(flags[a0_0x1264ea(0x1eb)]){const pkgPath=join(__dirname,'..',a0_0x1264ea(0x1f0)),pkg=JSON[a0_0x1264ea(0x1ee)](readFileSync(pkgPath,a0_0x1264ea(0x207)));console['log'](a0_0x1264ea(0x1e5)+pkg['version']),process[a0_0x1264ea(0x20c)](0x0);}if(flags[a0_0x1264ea(0x209)]||!command){const pkgPath=join(__dirname,'..',a0_0x1264ea(0x1f0)),pkg=JSON[a0_0x1264ea(0x1ee)](readFileSync(pkgPath,a0_0x1264ea(0x207)));console[a0_0x1264ea(0x1fc)](a0_0x1264ea(0x20b)+pkg[a0_0x1264ea(0x1eb)]+a0_0x1264ea(0x20f)+DEFAULT_PORT+a0_0x1264ea(0x1d7)+DEFAULT_HOST+')\x0a\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x20message\x0a\x20\x20-v,\x20--version\x20\x20\x20\x20\x20Show\x20version\x20number\x0a\x0aExamples:\x0a\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20open\x20browser\x0a\x20\x20loxia\x20terminal\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Connect\x20Terminal\x20UI\x20to\x20running\x20server\x0a\x20\x20loxia\x20plus-terminal\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a\x20\x20loxia\x20web\x20--port\x203000\x20\x20\x20\x20#\x20Use\x20custom\x20port\x0a\x0aQuick\x20Start:\x0a\x20\x201.\x20Run\x20\x27loxia\x20web\x27\x20to\x20start\x20with\x20Web\x20UI\x0a\x20\x202.\x20Or\x20run\x20\x27loxia\x20plus-terminal\x27\x20for\x20Terminal\x20UI\x20experience\x0a\x0aDocumentation:\x0a\x20\x20https://autopilot.loxia.ai\x0a\x0a'),process['exit'](0x0);}async function checkServerRunning(_0x2a6be6,_0x1b6b4e,_0x13f196=0x1){for(let _0x35d41c=0x0;_0x35d41c<_0x13f196;_0x35d41c++){const _0x5134c9=await new Promise(_0x47984e=>{const _0xa9ace3=a0_0x466a,_0x260f61=a0_0x303651[_0xa9ace3(0x20a)](_0xa9ace3(0x1fd)+_0x2a6be6+':'+_0x1b6b4e+_0xa9ace3(0x1f7),_0x360f45=>{_0x47984e(_0x360f45['statusCode']===0xc8);});_0x260f61['on'](_0xa9ace3(0x1f8),()=>_0x47984e(![])),_0x260f61['setTimeout'](0x7d0,()=>{const _0x35a148=_0xa9ace3;_0x260f61[_0x35a148(0x20d)](),_0x47984e(![]);});});if(_0x5134c9)return!![];_0x35d41c<_0x13f196-0x1&&await new Promise(_0x5b65ff=>setTimeout(_0x5b65ff,SERVER_CHECK_INTERVAL));}return![];}function a0_0x3438(){const _0x28b245=['SIGTERM','node','\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.','ceil','length','8FgtwKh','src','Starting\x20Loxia\x20server...\x0a','SIGINT','catch',')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20','680961nOEPra','25690DnYcrl','web','start\x20\x22\x22\x20\x22','Waiting\x20for\x20server\x20to\x20start...','host','index.js','\x20manually.','2176326tRKhDs','2912WZqJhg','kill','startsWith','win32','Loxia\x20Autopilot\x20One\x20v','408400DDCIdR','ignore','--version','argv','slice','version','loxia-terminal.js','\x0aServer\x20may\x20still\x20be\x20starting.\x20Open\x20','parse','env','package.json','Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.','Starting\x20Terminal\x20UI...\x0a','platform','includes','LOXIA_HOST','3072kHhLFl','/api/health','error','open\x20\x22','\x0aPlease\x20start\x20the\x20server\x20first:','inherit','log','http://','toString','1320KSOJBb','\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI','Could\x20not\x20open\x20browser\x20automatically.','localhost','unref','\x0aServer\x20is\x20not\x20running\x20at\x20','Checking\x20if\x20server\x20is\x20running...','\x0aShutting\x20down\x20server...','utf8','2861vbciLJ','help','get','\x0aLoxia\x20Autopilot\x20One\x20v','exit','destroy','Server\x20running\x20at\x20','\x20-\x20AI\x20Agent\x20System\x0a\x0aUsage:\x0a\x20\x20loxia\x20<command>\x20[options]\x0a\x0aCommands:\x0a\x20\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20+\x20open\x20Web\x20UI\x20in\x20browser\x0a\x20\x20terminal\x20\x20\x20\x20\x20\x20\x20\x20Start\x20Terminal\x20UI\x20(server\x20must\x20be\x20running)\x0a\x20\x20plus-web\x20\x20\x20\x20\x20\x20\x20\x20Alias\x20for\x20\x27web\x27\x0a\x20\x20plus-terminal\x20\x20\x20Start\x20server\x20+\x20Terminal\x20UI\x20together\x0a\x0aOptions:\x0a\x20\x20--port\x20<number>\x20\x20\x20Specify\x20port\x20(default:\x20','366820RlpDYm','\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a','--host','Please\x20open\x20manually:\x20','xdg-open\x20\x22','\x0aOpening\x20Web\x20UI\x20at\x20','Error:','166aMLWdZ','port'];a0_0x3438=function(){return _0x28b245;};return a0_0x3438();}async function waitForServer(_0x1205d8,_0xeeea4f,_0x4ba9c6=SERVER_STARTUP_TIMEOUT){const _0x23f347=a0_0x1264ea,_0x37bfcd=Math[_0x23f347(0x21c)](_0x4ba9c6/SERVER_CHECK_INTERVAL);return checkServerRunning(_0x1205d8,_0xeeea4f,_0x37bfcd);}function openBrowser(_0x5c2145){const _0x282a3c=a0_0x1264ea,_0x4309e5=process[_0x282a3c(0x1f3)];let _0x292c17;if(_0x4309e5==='darwin')_0x292c17=_0x282a3c(0x1f9)+_0x5c2145+'\x22';else _0x4309e5===_0x282a3c(0x1e4)?_0x292c17=_0x282a3c(0x1db)+_0x5c2145+'\x22':_0x292c17=_0x282a3c(0x214)+_0x5c2145+'\x22';exec(_0x292c17,_0x39d90a=>{const _0xd494c2=_0x282a3c;_0x39d90a&&(console[_0xd494c2(0x1fc)](_0xd494c2(0x201)),console['log'](_0xd494c2(0x213)+_0x5c2145));});}function startServer(_0x3ceb98=![]){const _0x205302=a0_0x1264ea,_0x44092b={...process[_0x205302(0x1ef)],'LOXIA_PORT':port[_0x205302(0x1fe)](),'PORT':port[_0x205302(0x1fe)]()};flags['host']&&(_0x44092b[_0x205302(0x1f5)]=flags[_0x205302(0x1dd)]);const _0x3fa527=join(__dirname,'..',_0x205302(0x21f),_0x205302(0x1de)),_0x4dc5aa=spawn(_0x205302(0x21a),[_0x3fa527],{'cwd':join(__dirname,'..'),'env':_0x44092b,'stdio':_0x3ceb98?[_0x205302(0x1e7),_0x205302(0x1e7),_0x205302(0x1e7)]:_0x205302(0x1fb),'detached':_0x3ceb98});return _0x3ceb98&&_0x4dc5aa[_0x205302(0x203)](),_0x4dc5aa;}function startTerminalUI(){const _0x20aa23=a0_0x1264ea,_0x2df044=join(__dirname,_0x20aa23(0x1ec)),_0x49b3bc={...process[_0x20aa23(0x1ef)],'LOXIA_PORT':port[_0x20aa23(0x1fe)](),'LOXIA_HOST':host},_0x752a0b=spawn(_0x20aa23(0x21a),[_0x2df044],{'cwd':join(__dirname,'..'),'env':_0x49b3bc,'stdio':_0x20aa23(0x1fb)});return _0x752a0b;}const commands={'web':async()=>{const _0x47d70d=a0_0x1264ea;console[_0x47d70d(0x1fc)](_0x47d70d(0x1d4));const _0xb81fd2=startServer(![]);console[_0x47d70d(0x1fc)](_0x47d70d(0x1dc));const _0x312aa3=await waitForServer(host,port);_0x312aa3?(console[_0x47d70d(0x1fc)](_0x47d70d(0x215)+serverUrl),openBrowser(serverUrl)):console[_0x47d70d(0x1fc)](_0x47d70d(0x1ed)+serverUrl+_0x47d70d(0x1df)),process['on']('SIGINT',()=>_0xb81fd2[_0x47d70d(0x1e2)](_0x47d70d(0x1d5))),process['on'](_0x47d70d(0x219),()=>_0xb81fd2[_0x47d70d(0x1e2)](_0x47d70d(0x219))),_0xb81fd2['on'](_0x47d70d(0x20c),_0x64f269=>process[_0x47d70d(0x20c)](_0x64f269||0x0));},'plus-web':async()=>{const _0x19796c=a0_0x1264ea;await commands[_0x19796c(0x1da)]();},'terminal':async()=>{const _0x155c75=a0_0x1264ea;console['log'](_0x155c75(0x205));const _0x81a185=await checkServerRunning(host,port);!_0x81a185&&(console[_0x155c75(0x1f8)](_0x155c75(0x204)+serverUrl),console[_0x155c75(0x1f8)](_0x155c75(0x1fa)),console[_0x155c75(0x1f8)](_0x155c75(0x200)),console[_0x155c75(0x1f8)](_0x155c75(0x211)),process[_0x155c75(0x20c)](0x1));console[_0x155c75(0x1fc)]('Server\x20is\x20running\x20at\x20'+serverUrl),console[_0x155c75(0x1fc)](_0x155c75(0x1f2));const _0x3d1266=startTerminalUI();process['on'](_0x155c75(0x1d5),()=>_0x3d1266[_0x155c75(0x1e2)](_0x155c75(0x1d5))),process['on'](_0x155c75(0x219),()=>_0x3d1266[_0x155c75(0x1e2)](_0x155c75(0x219))),_0x3d1266['on'](_0x155c75(0x20c),_0x2d0f5e=>process[_0x155c75(0x20c)](_0x2d0f5e||0x0));},'plus-terminal':async()=>{const _0x1ab78e=a0_0x1264ea;console[_0x1ab78e(0x1fc)]('Starting\x20Loxia\x20server\x20in\x20background...');const _0x557d94=startServer(!![]),_0x21b058=await waitForServer(host,port);!_0x21b058&&(console[_0x1ab78e(0x1f8)](_0x1ab78e(0x21b)),process[_0x1ab78e(0x20c)](0x1));console['log'](_0x1ab78e(0x20e)+serverUrl),console[_0x1ab78e(0x1fc)](_0x1ab78e(0x1f2));const _0xf1efe0=startTerminalUI();_0xf1efe0['on'](_0x1ab78e(0x20c),_0x48ca3d=>{const _0x4b6343=_0x1ab78e;console[_0x4b6343(0x1fc)](_0x4b6343(0x206));try{process[_0x4b6343(0x1e2)](_0x557d94['pid'],'SIGTERM');}catch(_0x410b12){}process['exit'](_0x48ca3d||0x0);}),process['on'](_0x1ab78e(0x1d5),()=>{const _0x174814=_0x1ab78e;_0xf1efe0[_0x174814(0x1e2)](_0x174814(0x1d5));}),process['on'](_0x1ab78e(0x219),()=>{const _0x11c864=_0x1ab78e;_0xf1efe0[_0x11c864(0x1e2)](_0x11c864(0x219));});}};commands[command]?commands[command]()[a0_0x1264ea(0x1d6)](_0x330c75=>{const _0x2bd7ba=a0_0x1264ea;console[_0x2bd7ba(0x1f8)](_0x2bd7ba(0x216),_0x330c75['message']),process[_0x2bd7ba(0x20c)](0x1);}):(console[a0_0x1264ea(0x1f8)]('Unknown\x20command:\x20'+command),console[a0_0x1264ea(0x1f8)](a0_0x1264ea(0x1f1)),process['exit'](0x1));
3
+ const a0_0x17e29c=a0_0x4da5;(function(_0x36c68a,_0x1ff2ef){const _0x47a18c=a0_0x4da5,_0x79798e=_0x36c68a();while(!![]){try{const _0x486473=-parseInt(_0x47a18c(0x14a))/0x1+parseInt(_0x47a18c(0x124))/0x2+parseInt(_0x47a18c(0x144))/0x3+parseInt(_0x47a18c(0x15c))/0x4+parseInt(_0x47a18c(0x139))/0x5+-parseInt(_0x47a18c(0x13a))/0x6+-parseInt(_0x47a18c(0x135))/0x7*(parseInt(_0x47a18c(0x123))/0x8);if(_0x486473===_0x1ff2ef)break;else _0x79798e['push'](_0x79798e['shift']());}catch(_0x206354){_0x79798e['push'](_0x79798e['shift']());}}}(a0_0x579c,0xaf695));import{fileURLToPath}from'url';import{dirname,join}from'path';import{spawn,exec}from'child_process';import{readFileSync}from'fs';import a0_0x4ce4f1 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x17e29c(0x142),SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process['argv'][a0_0x17e29c(0x156)](0x2),command=args[0x0]&&!args[0x0][a0_0x17e29c(0x149)]('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args[a0_0x17e29c(0x160)]('--help')||args[a0_0x17e29c(0x160)]('-h'),'version':args['includes'](a0_0x17e29c(0x132))||args[a0_0x17e29c(0x160)]('-v')};function a0_0x4da5(_0x409975,_0x591818){_0x409975=_0x409975-0x121;const _0x579c6d=a0_0x579c();let _0x4da5d4=_0x579c6d[_0x409975];return _0x4da5d4;}for(let i=0x0;i<args[a0_0x17e29c(0x12c)];i++){args[i]===a0_0x17e29c(0x12d)&&args[i+0x1]&&(flags[a0_0x17e29c(0x130)]=parseInt(args[i+0x1],0xa)),args[i]===a0_0x17e29c(0x14e)&&args[i+0x1]&&(flags[a0_0x17e29c(0x157)]=args[i+0x1]);}const port=flags[a0_0x17e29c(0x130)]||DEFAULT_PORT,host=flags[a0_0x17e29c(0x157)]||DEFAULT_HOST,serverUrl=a0_0x17e29c(0x154)+host+':'+port;if(flags['version']){const pkgPath=join(__dirname,'..',a0_0x17e29c(0x146)),pkg=JSON[a0_0x17e29c(0x133)](readFileSync(pkgPath,a0_0x17e29c(0x134)));console[a0_0x17e29c(0x167)](a0_0x17e29c(0x15f)+pkg['version']),process[a0_0x17e29c(0x169)](0x0);}if(flags['help']||!command){const pkgPath=join(__dirname,'..',a0_0x17e29c(0x146)),pkg=JSON[a0_0x17e29c(0x133)](readFileSync(pkgPath,a0_0x17e29c(0x134)));console[a0_0x17e29c(0x167)](a0_0x17e29c(0x143)+pkg[a0_0x17e29c(0x125)]+a0_0x17e29c(0x162)+DEFAULT_PORT+a0_0x17e29c(0x12f)+DEFAULT_HOST+')\x0a\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x20message\x0a\x20\x20-v,\x20--version\x20\x20\x20\x20\x20Show\x20version\x20number\x0a\x0aExamples:\x0a\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20open\x20browser\x0a\x20\x20loxia\x20terminal\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Connect\x20Terminal\x20UI\x20to\x20running\x20server\x0a\x20\x20loxia\x20plus-terminal\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a\x20\x20loxia\x20web\x20--port\x203000\x20\x20\x20\x20#\x20Use\x20custom\x20port\x0a\x0aQuick\x20Start:\x0a\x20\x201.\x20Run\x20\x27loxia\x20web\x27\x20to\x20start\x20with\x20Web\x20UI\x0a\x20\x202.\x20Or\x20run\x20\x27loxia\x20plus-terminal\x27\x20for\x20Terminal\x20UI\x20experience\x0a\x0aDocumentation:\x0a\x20\x20https://autopilot.loxia.ai\x0a\x0a'),process[a0_0x17e29c(0x169)](0x0);}async function checkServerRunning(_0x2692a1,_0x39bae7,_0x53cd21=0x1){for(let _0x5cb1bb=0x0;_0x5cb1bb<_0x53cd21;_0x5cb1bb++){const _0x42cc7f=await new Promise(_0x2bb33c=>{const _0x478dcc=a0_0x4da5,_0x23b566=a0_0x4ce4f1[_0x478dcc(0x127)](_0x478dcc(0x154)+_0x2692a1+':'+_0x39bae7+_0x478dcc(0x12e),_0x227794=>{const _0x3dc341=_0x478dcc;_0x2bb33c(_0x227794[_0x3dc341(0x13d)]===0xc8);});_0x23b566['on'](_0x478dcc(0x14f),()=>_0x2bb33c(![])),_0x23b566[_0x478dcc(0x164)](0x7d0,()=>{const _0x3afbb2=_0x478dcc;_0x23b566[_0x3afbb2(0x13c)](),_0x2bb33c(![]);});});if(_0x42cc7f)return!![];_0x5cb1bb<_0x53cd21-0x1&&await new Promise(_0x39201c=>setTimeout(_0x39201c,SERVER_CHECK_INTERVAL));}return![];}async function waitForServer(_0x45660a,_0x24aed4,_0x291e5c=SERVER_STARTUP_TIMEOUT){const _0x4b6ee9=a0_0x17e29c,_0x5cb5be=Math[_0x4b6ee9(0x148)](_0x291e5c/SERVER_CHECK_INTERVAL);return checkServerRunning(_0x45660a,_0x24aed4,_0x5cb5be);}function openBrowser(_0x1cc75e){const _0x53b815=a0_0x17e29c,_0x456ee2=process['platform'];let _0x315e94;if(_0x456ee2==='darwin')_0x315e94=_0x53b815(0x138)+_0x1cc75e+'\x22';else _0x456ee2===_0x53b815(0x141)?_0x315e94=_0x53b815(0x151)+_0x1cc75e+'\x22':_0x315e94=_0x53b815(0x166)+_0x1cc75e+'\x22';exec(_0x315e94,_0x54ee8e=>{const _0x443bf6=_0x53b815;_0x54ee8e&&(console[_0x443bf6(0x167)](_0x443bf6(0x161)),console[_0x443bf6(0x167)](_0x443bf6(0x136)+_0x1cc75e));});}function startServer(_0x184f9b=![]){const _0x36f1d5=a0_0x17e29c,_0x21a131={...process[_0x36f1d5(0x150)],'LOXIA_PORT':port[_0x36f1d5(0x163)](),'PORT':port['toString']()};flags['host']&&(_0x21a131[_0x36f1d5(0x13f)]=flags[_0x36f1d5(0x157)]);const _0x4f4b72=join(__dirname,'..',_0x36f1d5(0x145),_0x36f1d5(0x129)),_0x5efcf3=spawn(_0x36f1d5(0x15a),[_0x4f4b72],{'cwd':join(__dirname,'..'),'env':_0x21a131,'stdio':_0x184f9b?['ignore',_0x36f1d5(0x14d),_0x36f1d5(0x14d)]:_0x36f1d5(0x15b),'detached':_0x184f9b});return _0x184f9b&&_0x5efcf3[_0x36f1d5(0x147)](),_0x5efcf3;}function startTerminalUI(){const _0x2c6454=a0_0x17e29c,_0x2e3fcf=join(__dirname,_0x2c6454(0x131)),_0x22a0c5={...process[_0x2c6454(0x150)],'LOXIA_PORT':port[_0x2c6454(0x163)](),'LOXIA_HOST':host},_0x22c242=spawn(_0x2c6454(0x15a),[_0x2e3fcf],{'cwd':join(__dirname,'..'),'env':_0x22a0c5,'stdio':_0x2c6454(0x15b)});return _0x22c242;}function a0_0x579c(){const _0x3cdbe0=['1127ONLyEQ','Please\x20open\x20manually:\x20','Server\x20is\x20running\x20at\x20','open\x20\x22','3165875wUZZYV','3359808YEMXQw','Server\x20running\x20at\x20','destroy','statusCode','\x0aShutting\x20down\x20server...','LOXIA_HOST','SIGTERM','win32','localhost','\x0aLoxia\x20Autopilot\x20One\x20v','2300232nUosUU','src','package.json','unref','ceil','startsWith','1174173DEptse','Error:','Waiting\x20for\x20server\x20to\x20start...','ignore','--host','error','env','start\x20\x22\x22\x20\x22','Starting\x20Terminal\x20UI...\x0a','catch','http://','Starting\x20Loxia\x20server\x20in\x20background...','slice','host','Starting\x20Loxia\x20server...\x0a','\x0aPlease\x20start\x20the\x20server\x20first:','node','inherit','4251924sRPCXB','\x0aServer\x20may\x20still\x20be\x20starting.\x20Open\x20','Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.','Loxia\x20Autopilot\x20One\x20v','includes','Could\x20not\x20open\x20browser\x20automatically.','\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','toString','setTimeout','\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a','xdg-open\x20\x22','log','SIGINT','exit','pid','kill','41744tfgyNe','1659648pTlIMh','version','\x0aServer\x20is\x20not\x20running\x20at\x20','get','\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI','index.js','Checking\x20if\x20server\x20is\x20running...','\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.','length','--port','/api/health',')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20','port','loxia-terminal.js','--version','parse','utf8'];a0_0x579c=function(){return _0x3cdbe0;};return a0_0x579c();}const commands={'web':async()=>{const _0x4048ef=a0_0x17e29c;console[_0x4048ef(0x167)](_0x4048ef(0x158));const _0x38d306=startServer(![]);console[_0x4048ef(0x167)](_0x4048ef(0x14c));const _0x2dbb94=await waitForServer(host,port);_0x2dbb94?(console[_0x4048ef(0x167)]('\x0aOpening\x20Web\x20UI\x20at\x20'+serverUrl),openBrowser(serverUrl)):console['log'](_0x4048ef(0x15d)+serverUrl+'\x20manually.'),process['on'](_0x4048ef(0x168),()=>_0x38d306[_0x4048ef(0x122)]('SIGINT')),process['on'](_0x4048ef(0x140),()=>_0x38d306[_0x4048ef(0x122)](_0x4048ef(0x140))),_0x38d306['on'](_0x4048ef(0x169),_0xec8d14=>process[_0x4048ef(0x169)](_0xec8d14||0x0));},'plus-web':async()=>{await commands['web']();},'terminal':async()=>{const _0x5ec065=a0_0x17e29c;console[_0x5ec065(0x167)](_0x5ec065(0x12a));const _0x53769d=await checkServerRunning(host,port);!_0x53769d&&(console['error'](_0x5ec065(0x126)+serverUrl),console[_0x5ec065(0x14f)](_0x5ec065(0x159)),console['error'](_0x5ec065(0x128)),console[_0x5ec065(0x14f)](_0x5ec065(0x165)),process[_0x5ec065(0x169)](0x1));console[_0x5ec065(0x167)](_0x5ec065(0x137)+serverUrl),console[_0x5ec065(0x167)](_0x5ec065(0x152));const _0x401f44=startTerminalUI();process['on']('SIGINT',()=>_0x401f44[_0x5ec065(0x122)]('SIGINT')),process['on'](_0x5ec065(0x140),()=>_0x401f44[_0x5ec065(0x122)](_0x5ec065(0x140))),_0x401f44['on']('exit',_0x2959e5=>process[_0x5ec065(0x169)](_0x2959e5||0x0));},'plus-terminal':async()=>{const _0x4cdd31=a0_0x17e29c;console[_0x4cdd31(0x167)](_0x4cdd31(0x155));const _0x14bc80=startServer(!![]),_0x41320a=await waitForServer(host,port);!_0x41320a&&(console[_0x4cdd31(0x14f)](_0x4cdd31(0x12b)),process['exit'](0x1));console[_0x4cdd31(0x167)](_0x4cdd31(0x13b)+serverUrl),console[_0x4cdd31(0x167)](_0x4cdd31(0x152));const _0x5aa800=startTerminalUI();_0x5aa800['on']('exit',_0x588ad2=>{const _0x4f6568=_0x4cdd31;console[_0x4f6568(0x167)](_0x4f6568(0x13e));try{process['kill'](_0x14bc80[_0x4f6568(0x121)],_0x4f6568(0x140));}catch(_0x594efe){}process[_0x4f6568(0x169)](_0x588ad2||0x0);}),process['on'](_0x4cdd31(0x168),()=>{const _0x521956=_0x4cdd31;_0x5aa800[_0x521956(0x122)](_0x521956(0x168));}),process['on']('SIGTERM',()=>{const _0x4dd42e=_0x4cdd31;_0x5aa800[_0x4dd42e(0x122)]('SIGTERM');});}};commands[command]?commands[command]()[a0_0x17e29c(0x153)](_0xe1d898=>{const _0x23cc14=a0_0x17e29c;console[_0x23cc14(0x14f)](_0x23cc14(0x14b),_0xe1d898['message']),process['exit'](0x1);}):(console[a0_0x17e29c(0x14f)]('Unknown\x20command:\x20'+command),console[a0_0x17e29c(0x14f)](a0_0x17e29c(0x15e)),process[a0_0x17e29c(0x169)](0x1));
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x3efb97=a0_0x3b53;(function(_0x999f31,_0x1a0794){const _0x2cfccd=a0_0x3b53,_0x8ba1a9=_0x999f31();while(!![]){try{const _0x228c60=parseInt(_0x2cfccd(0x198))/0x1+parseInt(_0x2cfccd(0x1a2))/0x2+parseInt(_0x2cfccd(0x174))/0x3*(parseInt(_0x2cfccd(0x19a))/0x4)+parseInt(_0x2cfccd(0x18d))/0x5*(-parseInt(_0x2cfccd(0x17d))/0x6)+parseInt(_0x2cfccd(0x17a))/0x7*(-parseInt(_0x2cfccd(0x18c))/0x8)+parseInt(_0x2cfccd(0x19b))/0x9*(-parseInt(_0x2cfccd(0x179))/0xa)+-parseInt(_0x2cfccd(0x186))/0xb*(-parseInt(_0x2cfccd(0x18a))/0xc);if(_0x228c60===_0x1a0794)break;else _0x8ba1a9['push'](_0x8ba1a9['shift']());}catch(_0xa711eb){_0x8ba1a9['push'](_0x8ba1a9['shift']());}}}(a0_0x7e64,0xac78e));function a0_0x3b53(_0x277244,_0x4ea0e8){_0x277244=_0x277244-0x173;const _0x7e6433=a0_0x7e64();let _0x3b53b0=_0x7e6433[_0x277244];return _0x3b53b0;}import{spawn}from'child_process';import a0_0x1f0203 from'net';import a0_0x56838d from'path';import{fileURLToPath}from'url';function a0_0x7e64(){const _0x5030c2=['\x20\x20Loxia\x20Autopilot\x20One\x20-\x20Terminal\x20UI','--ui','150SPBViW','destroy','--host','--port','toString','../src/interfaces/terminal/index.js','💡\x20Troubleshooting:','🔍\x20Checking\x20if\x20server\x20is\x20running\x20at\x20','setTimeout','19723649TXagzV','✓\x20Server\x20started\x20at\x20','web','message','12ipGjzh','stdout','8vnzptW','259270pqMAKN','ignore','localhost','now','✗\x20Server\x20is\x20not\x20running','dirname','connect','...','✓\x20Server\x20is\x20already\x20running\x20at\x20','\x20\x20\x201.\x20Make\x20sure\x20no\x20other\x20process\x20is\x20using\x20port\x208080','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','936572LGACAx','Failed\x20to\x20start\x20server:','95204AiUbOF','137961aSJyuU','pipe','join','log','❌\x20Failed\x20to\x20start\x20Terminal\x20UI:','error','LOXIA_HOST','1583184sBIpPX','data','🚀\x20Starting\x20Loxia\x20server...','\x20\x20\x203.\x20Check\x20logs\x20for\x20more\x20details','stderr','slice','🎨\x20Launching\x20Ink-based\x20Terminal\x20UI...','21ZqIige','Server\x20startup\x20timeout','Socket','\x20\x20\x202.\x20Try\x20running\x20the\x20server\x20manually:\x20node\x20bin/cli.js','env','330ZUzOJJ','8254239TGGaWd'];a0_0x7e64=function(){return _0x5030c2;};return a0_0x7e64();}const __filename=fileURLToPath(import.meta.url),__dirname=a0_0x56838d[a0_0x3efb97(0x192)](__filename),projectRoot=a0_0x56838d[a0_0x3efb97(0x192)](__dirname),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x3efb97(0x18f),SERVER_STARTUP_TIMEOUT=0x2710;async function isServerRunning(_0x112ba2,_0x196f1f){return new Promise(_0x44ab53=>{const _0x18d581=a0_0x3b53,_0x5c51ac=new a0_0x1f0203[(_0x18d581(0x176))]();_0x5c51ac[_0x18d581(0x185)](0x7d0),_0x5c51ac['on'](_0x18d581(0x193),()=>{const _0x12864a=_0x18d581;_0x5c51ac[_0x12864a(0x17e)](),_0x44ab53(!![]);}),_0x5c51ac['on']('timeout',()=>{const _0x5b4188=_0x18d581;_0x5c51ac[_0x5b4188(0x17e)](),_0x44ab53(![]);}),_0x5c51ac['on']('error',()=>{const _0x370420=_0x18d581;_0x5c51ac[_0x370420(0x17e)](),_0x44ab53(![]);}),_0x5c51ac[_0x18d581(0x193)](_0x196f1f,_0x112ba2);});}async function startServer(_0x183f88,_0x3e3469){const _0x3e43d9=a0_0x3efb97;return console['log'](_0x3e43d9(0x1a4)),new Promise((_0x28e7d6,_0x3ea427)=>{const _0x1ff437=_0x3e43d9,_0x5c107a=spawn('node',[a0_0x56838d[_0x1ff437(0x19d)](projectRoot,'bin/cli.js'),_0x1ff437(0x17c),_0x1ff437(0x188),_0x1ff437(0x17f),_0x183f88,'--port',_0x3e3469[_0x1ff437(0x181)]()],{'detached':![],'stdio':[_0x1ff437(0x18e),_0x1ff437(0x19c),_0x1ff437(0x19c)]});_0x5c107a[_0x1ff437(0x18b)]['on']('data',()=>{}),_0x5c107a[_0x1ff437(0x1a6)]['on'](_0x1ff437(0x1a3),()=>{}),_0x5c107a['on'](_0x1ff437(0x1a0),_0x33755e=>{const _0x2a3c42=_0x1ff437;console[_0x2a3c42(0x1a0)](_0x2a3c42(0x199),_0x33755e['message']),_0x3ea427(_0x33755e);});const _0x87ed99=Date[_0x1ff437(0x190)](),_0x1b4ac2=setInterval(async()=>{const _0x441619=_0x1ff437,_0x566319=await isServerRunning(_0x183f88,_0x3e3469);if(_0x566319)clearInterval(_0x1b4ac2),console[_0x441619(0x19e)](_0x441619(0x187)+_0x183f88+':'+_0x3e3469),_0x28e7d6();else Date[_0x441619(0x190)]()-_0x87ed99>SERVER_STARTUP_TIMEOUT&&(clearInterval(_0x1b4ac2),_0x5c107a['kill'](),_0x3ea427(new Error(_0x441619(0x175))));},0x1f4);});}async function main(){const _0x25967a=a0_0x3efb97;try{console[_0x25967a(0x19e)](_0x25967a(0x197)),console[_0x25967a(0x19e)](_0x25967a(0x17b)),console[_0x25967a(0x19e)](_0x25967a(0x197)),console[_0x25967a(0x19e)]('');const _0x33c2c0=process['argv'][_0x25967a(0x1a7)](0x2);let _0xe40c09=DEFAULT_HOST,_0x5a20fb=DEFAULT_PORT;for(let _0x1facaf=0x0;_0x1facaf<_0x33c2c0['length'];_0x1facaf++){if(_0x33c2c0[_0x1facaf]===_0x25967a(0x17f)&&_0x33c2c0[_0x1facaf+0x1])_0xe40c09=_0x33c2c0[_0x1facaf+0x1],_0x1facaf++;else _0x33c2c0[_0x1facaf]===_0x25967a(0x180)&&_0x33c2c0[_0x1facaf+0x1]&&(_0x5a20fb=parseInt(_0x33c2c0[_0x1facaf+0x1],0xa),_0x1facaf++);}console[_0x25967a(0x19e)](_0x25967a(0x184)+_0xe40c09+':'+_0x5a20fb+_0x25967a(0x194));const _0x3f9323=await isServerRunning(_0xe40c09,_0x5a20fb);!_0x3f9323?(console[_0x25967a(0x19e)](_0x25967a(0x191)),await startServer(_0xe40c09,_0x5a20fb)):console['log'](_0x25967a(0x195)+_0xe40c09+':'+_0x5a20fb),console[_0x25967a(0x19e)](''),console[_0x25967a(0x19e)](_0x25967a(0x173)),console[_0x25967a(0x19e)](''),await new Promise(_0x344ca5=>setTimeout(_0x344ca5,0x1f4)),process[_0x25967a(0x178)][_0x25967a(0x1a1)]=_0xe40c09,process[_0x25967a(0x178)]['LOXIA_PORT']=_0x5a20fb[_0x25967a(0x181)](),await import(_0x25967a(0x182));}catch(_0x20e127){console[_0x25967a(0x1a0)](''),console[_0x25967a(0x1a0)](_0x25967a(0x19f)),console[_0x25967a(0x1a0)]('\x20\x20',_0x20e127[_0x25967a(0x189)]),console[_0x25967a(0x1a0)](''),console[_0x25967a(0x1a0)](_0x25967a(0x183)),console[_0x25967a(0x1a0)](_0x25967a(0x196)),console[_0x25967a(0x1a0)](_0x25967a(0x177)),console[_0x25967a(0x1a0)](_0x25967a(0x1a5)),console[_0x25967a(0x1a0)](''),process['exit'](0x1);}}main();
3
+ const a0_0x2cf118=a0_0x3b76;function a0_0x3b76(_0x4d9bee,_0xf0b11){_0x4d9bee=_0x4d9bee-0xaf;const _0x4b1ca4=a0_0x4b1c();let _0x3b7662=_0x4b1ca4[_0x4d9bee];return _0x3b7662;}(function(_0x7ed920,_0x2ea2c6){const _0x57d557=a0_0x3b76,_0x1653f9=_0x7ed920();while(!![]){try{const _0x5ec719=parseInt(_0x57d557(0xd8))/0x1+parseInt(_0x57d557(0xbf))/0x2*(parseInt(_0x57d557(0xb6))/0x3)+parseInt(_0x57d557(0xcf))/0x4+parseInt(_0x57d557(0xd2))/0x5*(-parseInt(_0x57d557(0xce))/0x6)+parseInt(_0x57d557(0xaf))/0x7*(-parseInt(_0x57d557(0xbe))/0x8)+parseInt(_0x57d557(0xb8))/0x9*(parseInt(_0x57d557(0xda))/0xa)+-parseInt(_0x57d557(0xc4))/0xb;if(_0x5ec719===_0x2ea2c6)break;else _0x1653f9['push'](_0x1653f9['shift']());}catch(_0x7c68e0){_0x1653f9['push'](_0x1653f9['shift']());}}}(a0_0x4b1c,0x7c63a));import{spawn}from'child_process';function a0_0x4b1c(){const _0x4650de=['node','localhost','--port','\x20\x20\x203.\x20Check\x20logs\x20for\x20more\x20details','ignore','1220808NuaQjc','681670gJHnpD','\x20\x20\x202.\x20Try\x20running\x20the\x20server\x20manually:\x20node\x20bin/cli.js','error','🔍\x20Checking\x20if\x20server\x20is\x20running\x20at\x20','../src/interfaces/terminal/index.js','13417283RxBxaJ','now','🎨\x20Launching\x20Ink-based\x20Terminal\x20UI...','dirname','stderr','pipe','--ui','join','kill','Failed\x20to\x20start\x20server:','31386GdIPJc','824820hcjZZM','destroy','length','185HzCnyy','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','slice','stdout','✗\x20Server\x20is\x20not\x20running','\x20\x20Loxia\x20Autopilot\x20One\x20-\x20Terminal\x20UI','806179bNGeeL','--host','762690koLkQz','Server\x20startup\x20timeout','env','\x20\x20\x201.\x20Make\x20sure\x20no\x20other\x20process\x20is\x20using\x20port\x208080','message','💡\x20Troubleshooting:','7BvMDqh','🚀\x20Starting\x20Loxia\x20server...','timeout','log','LOXIA_PORT','data','...','6RVskqN','connect','45OUaxuD'];a0_0x4b1c=function(){return _0x4650de;};return a0_0x4b1c();}import a0_0x52991e from'net';import a0_0x379c42 from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=a0_0x379c42[a0_0x2cf118(0xc7)](__filename),projectRoot=a0_0x379c42[a0_0x2cf118(0xc7)](__dirname),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x2cf118(0xba),SERVER_STARTUP_TIMEOUT=0x2710;async function isServerRunning(_0x2601fa,_0x189d20){return new Promise(_0x3323ba=>{const _0x4c5281=a0_0x3b76,_0x2742ef=new a0_0x52991e['Socket']();_0x2742ef['setTimeout'](0x7d0),_0x2742ef['on'](_0x4c5281(0xb7),()=>{const _0x52bae7=_0x4c5281;_0x2742ef[_0x52bae7(0xd0)](),_0x3323ba(!![]);}),_0x2742ef['on'](_0x4c5281(0xb1),()=>{_0x2742ef['destroy'](),_0x3323ba(![]);}),_0x2742ef['on'](_0x4c5281(0xc1),()=>{const _0x33e579=_0x4c5281;_0x2742ef[_0x33e579(0xd0)](),_0x3323ba(![]);}),_0x2742ef[_0x4c5281(0xb7)](_0x189d20,_0x2601fa);});}async function startServer(_0x832155,_0x522127){const _0x5d8deb=a0_0x2cf118;return console[_0x5d8deb(0xb2)](_0x5d8deb(0xb0)),new Promise((_0xa711b8,_0x673d4d)=>{const _0x3ab309=_0x5d8deb,_0x339f90=spawn(_0x3ab309(0xb9),[a0_0x379c42[_0x3ab309(0xcb)](projectRoot,'bin/cli.js'),_0x3ab309(0xca),'web',_0x3ab309(0xd9),_0x832155,_0x3ab309(0xbb),_0x522127['toString']()],{'detached':![],'stdio':[_0x3ab309(0xbd),_0x3ab309(0xc9),_0x3ab309(0xc9)]});_0x339f90[_0x3ab309(0xd5)]['on'](_0x3ab309(0xb4),()=>{}),_0x339f90[_0x3ab309(0xc8)]['on'](_0x3ab309(0xb4),()=>{}),_0x339f90['on']('error',_0x328242=>{const _0x1e1efb=_0x3ab309;console[_0x1e1efb(0xc1)](_0x1e1efb(0xcd),_0x328242[_0x1e1efb(0xde)]),_0x673d4d(_0x328242);});const _0x4b6d69=Date[_0x3ab309(0xc5)](),_0xeed3e1=setInterval(async()=>{const _0x4a5eb9=_0x3ab309,_0x29b425=await isServerRunning(_0x832155,_0x522127);if(_0x29b425)clearInterval(_0xeed3e1),console[_0x4a5eb9(0xb2)]('✓\x20Server\x20started\x20at\x20'+_0x832155+':'+_0x522127),_0xa711b8();else Date[_0x4a5eb9(0xc5)]()-_0x4b6d69>SERVER_STARTUP_TIMEOUT&&(clearInterval(_0xeed3e1),_0x339f90[_0x4a5eb9(0xcc)](),_0x673d4d(new Error(_0x4a5eb9(0xdb))));},0x1f4);});}async function main(){const _0x48e7af=a0_0x2cf118;try{console[_0x48e7af(0xb2)](_0x48e7af(0xd3)),console[_0x48e7af(0xb2)](_0x48e7af(0xd7)),console[_0x48e7af(0xb2)](_0x48e7af(0xd3)),console[_0x48e7af(0xb2)]('');const _0x4ea6d8=process['argv'][_0x48e7af(0xd4)](0x2);let _0x5b5507=DEFAULT_HOST,_0x5673b9=DEFAULT_PORT;for(let _0x57c2e4=0x0;_0x57c2e4<_0x4ea6d8[_0x48e7af(0xd1)];_0x57c2e4++){if(_0x4ea6d8[_0x57c2e4]==='--host'&&_0x4ea6d8[_0x57c2e4+0x1])_0x5b5507=_0x4ea6d8[_0x57c2e4+0x1],_0x57c2e4++;else _0x4ea6d8[_0x57c2e4]===_0x48e7af(0xbb)&&_0x4ea6d8[_0x57c2e4+0x1]&&(_0x5673b9=parseInt(_0x4ea6d8[_0x57c2e4+0x1],0xa),_0x57c2e4++);}console['log'](_0x48e7af(0xc2)+_0x5b5507+':'+_0x5673b9+_0x48e7af(0xb5));const _0xe19392=await isServerRunning(_0x5b5507,_0x5673b9);!_0xe19392?(console['log'](_0x48e7af(0xd6)),await startServer(_0x5b5507,_0x5673b9)):console[_0x48e7af(0xb2)]('✓\x20Server\x20is\x20already\x20running\x20at\x20'+_0x5b5507+':'+_0x5673b9),console[_0x48e7af(0xb2)](''),console[_0x48e7af(0xb2)](_0x48e7af(0xc6)),console[_0x48e7af(0xb2)](''),await new Promise(_0x6718ba=>setTimeout(_0x6718ba,0x1f4)),process[_0x48e7af(0xdc)]['LOXIA_HOST']=_0x5b5507,process['env'][_0x48e7af(0xb3)]=_0x5673b9['toString'](),await import(_0x48e7af(0xc3));}catch(_0x39ec28){console[_0x48e7af(0xc1)](''),console[_0x48e7af(0xc1)]('❌\x20Failed\x20to\x20start\x20Terminal\x20UI:'),console[_0x48e7af(0xc1)]('\x20\x20',_0x39ec28['message']),console[_0x48e7af(0xc1)](''),console[_0x48e7af(0xc1)](_0x48e7af(0xdf)),console[_0x48e7af(0xc1)](_0x48e7af(0xdd)),console[_0x48e7af(0xc1)](_0x48e7af(0xc0)),console[_0x48e7af(0xc1)](_0x48e7af(0xbc)),console[_0x48e7af(0xc1)](''),process['exit'](0x1);}}main();
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x529ea5=a0_0x5091;(function(_0x21e367,_0x519ce0){const _0x575461=a0_0x5091,_0x45bda2=_0x21e367();while(!![]){try{const _0xdcdea2=parseInt(_0x575461(0x90))/0x1+parseInt(_0x575461(0x8a))/0x2*(-parseInt(_0x575461(0x7a))/0x3)+parseInt(_0x575461(0x7f))/0x4+-parseInt(_0x575461(0x74))/0x5+parseInt(_0x575461(0x6d))/0x6+-parseInt(_0x575461(0x7c))/0x7+parseInt(_0x575461(0x86))/0x8;if(_0xdcdea2===_0x519ce0)break;else _0x45bda2['push'](_0x45bda2['shift']());}catch(_0x513d33){_0x45bda2['push'](_0x45bda2['shift']());}}}(a0_0x321c,0xcd3b1));import{startTerminalUI}from'../src/interfaces/terminal/index.js';function a0_0x321c(){const _0x569539=['host','--host','7562622uHZTcm','Starting\x20Loxia\x20Terminal\x20UI...','port','\x0aLoxia\x20Terminal\x20UI\x0a\x0aUsage:\x0a\x20\x20loxia-terminal\x20[options]\x0a\x0aOptions:\x0a\x20\x20--host,\x20-h\x20<host>\x20\x20\x20\x20Backend\x20host\x20(default:\x20localhost)\x0a\x20\x20--port,\x20-p\x20<port>\x20\x20\x20\x20Backend\x20port\x20(default:\x208080)\x0a\x20\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x20message\x0a\x0aEnvironment\x20Variables:\x0a\x20\x20LOXIA_HOST\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Backend\x20host\x0a\x20\x20LOXIA_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Backend\x20port\x0a\x0aExamples:\x0a\x20\x20loxia-terminal\x0a\x20\x20loxia-terminal\x20--host\x20192.168.1.100\x20--port\x203000\x0a\x20\x20LOXIA_HOST=api.example.com\x20LOXIA_PORT=443\x20loxia-terminal\x0a','LOXIA_PORT','error','\x20\x20npm\x20run\x20terminal-ui','2250030gAgiCp','Or\x20use\x20the\x20web\x20UI\x20instead:','Please\x20run\x20this\x20command\x20in\x20a\x20real\x20terminal\x20without\x20pipes\x20or\x20redirection:','\x20\x20-\x20Background\x20processes\x20(e.g.,\x20&\x20at\x20the\x20end)','then','Connecting\x20to:\x20','2181CfkHUp','argv','2733661muZwIw','exit','waitUntilExit','879428TkxZft','The\x20terminal\x20UI\x20cannot\x20run\x20in:','\x20\x20npm\x20start','stdin','Press\x20Ctrl+C\x20to\x20exit\x0a','LOXIA_HOST','ERROR:\x20Terminal\x20UI\x20requires\x20an\x20interactive\x20terminal\x20(TTY).','6261296pfiGzG','log','slice','isTTY','4114lmCMML','\x20\x20-\x20Redirected\x20output\x20(e.g.,\x20>\x20file.txt,\x202>&1\x20|\x20...)','\x20\x20-\x20Some\x20CI/CD\x20environments','\x0aTerminal\x20UI\x20exited','env','\x0aTerminal\x20UI\x20error:','913637ZzocmJ'];a0_0x321c=function(){return _0x569539;};return a0_0x321c();}const args=process[a0_0x529ea5(0x7b)][a0_0x529ea5(0x88)](0x2),options={'host':'localhost','port':0x1f90};for(let i=0x0;i<args['length'];i++){const arg=args[i];if(arg===a0_0x529ea5(0x6c)||arg==='-h')options[a0_0x529ea5(0x6b)]=args[++i];else{if(arg==='--port'||arg==='-p')options[a0_0x529ea5(0x6f)]=parseInt(args[++i],0xa);else arg==='--help'&&(console[a0_0x529ea5(0x87)](a0_0x529ea5(0x70)),process[a0_0x529ea5(0x7d)](0x0));}}process[a0_0x529ea5(0x8e)]['LOXIA_HOST']&&(options['host']=process[a0_0x529ea5(0x8e)][a0_0x529ea5(0x84)]);process[a0_0x529ea5(0x8e)][a0_0x529ea5(0x71)]&&(options['port']=parseInt(process[a0_0x529ea5(0x8e)][a0_0x529ea5(0x71)],0xa));function a0_0x5091(_0x197723,_0x152261){_0x197723=_0x197723-0x6b;const _0x321cd5=a0_0x321c();let _0x5091ca=_0x321cd5[_0x197723];return _0x5091ca;}!process[a0_0x529ea5(0x82)][a0_0x529ea5(0x89)]&&(console['error'](a0_0x529ea5(0x85)),console[a0_0x529ea5(0x72)](''),console[a0_0x529ea5(0x72)](a0_0x529ea5(0x80)),console[a0_0x529ea5(0x72)]('\x20\x20-\x20Piped\x20environments\x20(e.g.,\x20|\x20head,\x20|\x20grep)'),console[a0_0x529ea5(0x72)](a0_0x529ea5(0x8b)),console[a0_0x529ea5(0x72)](a0_0x529ea5(0x77)),console['error'](a0_0x529ea5(0x8c)),console[a0_0x529ea5(0x72)](''),console['error'](a0_0x529ea5(0x76)),console[a0_0x529ea5(0x72)](a0_0x529ea5(0x73)),console[a0_0x529ea5(0x72)](''),console['error'](a0_0x529ea5(0x75)),console[a0_0x529ea5(0x72)](a0_0x529ea5(0x81)),process[a0_0x529ea5(0x7d)](0x1));console[a0_0x529ea5(0x87)](a0_0x529ea5(0x6e)),console[a0_0x529ea5(0x87)](a0_0x529ea5(0x79)+options[a0_0x529ea5(0x6b)]+':'+options['port']),console[a0_0x529ea5(0x87)](a0_0x529ea5(0x83));const instance=startTerminalUI(options);instance[a0_0x529ea5(0x7e)]()[a0_0x529ea5(0x78)](()=>{const _0x455534=a0_0x529ea5;console[_0x455534(0x87)](_0x455534(0x8d)),process[_0x455534(0x7d)](0x0);})['catch'](_0x155efe=>{const _0x24030b=a0_0x529ea5;console[_0x24030b(0x72)](_0x24030b(0x8f),_0x155efe),process[_0x24030b(0x7d)](0x1);});
3
+ const a0_0x4dd9fd=a0_0x3a1e;(function(_0x4996f,_0x2df47d){const _0x24f075=a0_0x3a1e,_0x14827f=_0x4996f();while(!![]){try{const _0x5eac02=parseInt(_0x24f075(0xcc))/0x1+-parseInt(_0x24f075(0xe5))/0x2+parseInt(_0x24f075(0xdb))/0x3*(parseInt(_0x24f075(0xcf))/0x4)+-parseInt(_0x24f075(0xe4))/0x5*(-parseInt(_0x24f075(0xda))/0x6)+-parseInt(_0x24f075(0xce))/0x7+parseInt(_0x24f075(0xe7))/0x8*(parseInt(_0x24f075(0xd8))/0x9)+-parseInt(_0x24f075(0xde))/0xa;if(_0x5eac02===_0x2df47d)break;else _0x14827f['push'](_0x14827f['shift']());}catch(_0x700f6c){_0x14827f['push'](_0x14827f['shift']());}}}(a0_0x3671,0x6f980));function a0_0x3a1e(_0x7e0635,_0x32bcaf){_0x7e0635=_0x7e0635-0xc2;const _0x367159=a0_0x3671();let _0x3a1e17=_0x367159[_0x7e0635];return _0x3a1e17;}import{startTerminalUI}from'../src/interfaces/terminal/index.js';const args=process[a0_0x4dd9fd(0xe6)]['slice'](0x2),options={'host':a0_0x4dd9fd(0xdc),'port':0x1f90};for(let i=0x0;i<args[a0_0x4dd9fd(0xca)];i++){const arg=args[i];if(arg===a0_0x4dd9fd(0xc5)||arg==='-h')options[a0_0x4dd9fd(0xc7)]=args[++i];else{if(arg===a0_0x4dd9fd(0xcb)||arg==='-p')options[a0_0x4dd9fd(0xc6)]=parseInt(args[++i],0xa);else arg===a0_0x4dd9fd(0xc3)&&(console['log'](a0_0x4dd9fd(0xe0)),process['exit'](0x0));}}process[a0_0x4dd9fd(0xdf)][a0_0x4dd9fd(0xc8)]&&(options['host']=process['env'][a0_0x4dd9fd(0xc8)]);process['env'][a0_0x4dd9fd(0xd4)]&&(options[a0_0x4dd9fd(0xc6)]=parseInt(process[a0_0x4dd9fd(0xdf)][a0_0x4dd9fd(0xd4)],0xa));!process[a0_0x4dd9fd(0xe1)][a0_0x4dd9fd(0xc2)]&&(console[a0_0x4dd9fd(0xdd)]('ERROR:\x20Terminal\x20UI\x20requires\x20an\x20interactive\x20terminal\x20(TTY).'),console[a0_0x4dd9fd(0xdd)](''),console[a0_0x4dd9fd(0xdd)](a0_0x4dd9fd(0xe2)),console['error'](a0_0x4dd9fd(0xd0)),console[a0_0x4dd9fd(0xdd)](a0_0x4dd9fd(0xd9)),console[a0_0x4dd9fd(0xdd)](a0_0x4dd9fd(0xc9)),console[a0_0x4dd9fd(0xdd)]('\x20\x20-\x20Some\x20CI/CD\x20environments'),console[a0_0x4dd9fd(0xdd)](''),console['error']('Please\x20run\x20this\x20command\x20in\x20a\x20real\x20terminal\x20without\x20pipes\x20or\x20redirection:'),console[a0_0x4dd9fd(0xdd)]('\x20\x20npm\x20run\x20terminal-ui'),console[a0_0x4dd9fd(0xdd)](''),console['error'](a0_0x4dd9fd(0xd2)),console[a0_0x4dd9fd(0xdd)]('\x20\x20npm\x20start'),process['exit'](0x1));console[a0_0x4dd9fd(0xd6)](a0_0x4dd9fd(0xe3)),console['log'](a0_0x4dd9fd(0xcd)+options[a0_0x4dd9fd(0xc7)]+':'+options['port']),console[a0_0x4dd9fd(0xd6)](a0_0x4dd9fd(0xd7));const instance=startTerminalUI(options);instance['waitUntilExit']()[a0_0x4dd9fd(0xd5)](()=>{const _0x4ed653=a0_0x4dd9fd;console[_0x4ed653(0xd6)](_0x4ed653(0xc4)),process[_0x4ed653(0xd1)](0x0);})['catch'](_0x38c5f8=>{const _0x27e2c8=a0_0x4dd9fd;console[_0x27e2c8(0xdd)](_0x27e2c8(0xd3),_0x38c5f8),process[_0x27e2c8(0xd1)](0x1);});function a0_0x3671(){const _0x2642ca=['\x20\x20-\x20Piped\x20environments\x20(e.g.,\x20|\x20head,\x20|\x20grep)','exit','Or\x20use\x20the\x20web\x20UI\x20instead:','\x0aTerminal\x20UI\x20error:','LOXIA_PORT','then','log','Press\x20Ctrl+C\x20to\x20exit\x0a','9qOHVfG','\x20\x20-\x20Redirected\x20output\x20(e.g.,\x20>\x20file.txt,\x202>&1\x20|\x20...)','6xRwLxw','3hRTWbw','localhost','error','14590680syMieF','env','\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','stdin','The\x20terminal\x20UI\x20cannot\x20run\x20in:','Starting\x20Loxia\x20Terminal\x20UI...','4253290mQkgHu','1331396OXBgoa','argv','5655112fVaRWI','isTTY','--help','\x0aTerminal\x20UI\x20exited','--host','port','host','LOXIA_HOST','\x20\x20-\x20Background\x20processes\x20(e.g.,\x20&\x20at\x20the\x20end)','length','--port','719892uxAnSQ','Connecting\x20to:\x20','2417492REHQic','2599084SUrVUs'];a0_0x3671=function(){return _0x2642ca;};return a0_0x3671();}
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x4202bf=a0_0x1cfa;function a0_0xd29b(){const _0x1f207c=['data','32781860VLkubM','\x0a⚠️\x20\x20Received\x20SIGINT,\x20shutting\x20down...','║\x20\x20\x20Loxia\x20AI\x20Agents\x20-\x20Server\x20+\x20Terminal\x20UI\x20\x20\x20\x20\x20\x20║','⚠️\x20\x20Server\x20may\x20not\x20be\x20fully\x20ready,\x20but\x20continuing\x20anyway...','includes','stderr','error','10JEbUxI','setTimeout','SIGKILL','kill','🛑\x20Stopping\x20server...','619468XBrJGA','index.js','PORT','\x0a👋\x20Terminal\x20UI\x20closed.','statusCode','toString','199125sIFfmG','11474624XudJNJ','🚀\x20Starting\x20Loxia\x20server...','SIGTERM','pipe','killed','trim','env','log','35NdTYvO','[SERVER]\x20','Timeout','4606902llUQFo','✅\x20Server\x20is\x20ready!','╚════════════════════════════════════════════════╝','src','bin','loxia-terminal.js','╔════════════════════════════════════════════════╗','node','\x0a⚠️\x20\x20Received\x20SIGTERM,\x20shutting\x20down...','destroy','exit','message','1165249vbhaOm','ignore','4596473lARlwE','6fbNVIy','Server\x20returned\x20','Failed\x20to\x20start\x20Terminal\x20UI:','[SERVER\x20ERROR]\x20','SIGINT'];a0_0xd29b=function(){return _0x1f207c;};return a0_0xd29b();}(function(_0x352f01,_0x349ccf){const _0x16ff5f=a0_0x1cfa,_0x16468e=_0x352f01();while(!![]){try{const _0x490a79=-parseInt(_0x16ff5f(0x1d5))/0x1+-parseInt(_0x16ff5f(0x1e5))/0x2*(parseInt(_0x16ff5f(0x1f0))/0x3)+-parseInt(_0x16ff5f(0x1ea))/0x4*(parseInt(_0x16ff5f(0x1f9))/0x5)+parseInt(_0x16ff5f(0x1d8))/0x6*(-parseInt(_0x16ff5f(0x1d7))/0x7)+parseInt(_0x16ff5f(0x1f1))/0x8+-parseInt(_0x16ff5f(0x1fc))/0x9+parseInt(_0x16ff5f(0x1de))/0xa;if(_0x490a79===_0x349ccf)break;else _0x16468e['push'](_0x16468e['shift']());}catch(_0x69e209){_0x16468e['push'](_0x16468e['shift']());}}}(a0_0xd29b,0xeb0f4));import{spawn}from'child_process';import{fileURLToPath}from'url';import{dirname,join}from'path';import a0_0x4ee972 from'http';function a0_0x1cfa(_0xf366bf,_0x3a95e4){_0xf366bf=_0xf366bf-0x1d3;const _0xd29bfe=a0_0xd29b();let _0x1cfa3c=_0xd29bfe[_0xf366bf];return _0x1cfa3c;}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),rootDir=join(__dirname,'..'),SERVER_PORT=process[a0_0x4202bf(0x1f7)][a0_0x4202bf(0x1ec)]||0x1f90,STARTUP_WAIT=0x7d0;let serverProcess=null;async function checkServerReady(_0x105e71=0xa,_0x2fe2cb=0x1f4){const _0x33f798=a0_0x4202bf;for(let _0x36b012=0x0;_0x36b012<_0x105e71;_0x36b012++){try{return await new Promise((_0x30479c,_0x1068b2)=>{const _0x4b9d4f=a0_0x1cfa,_0x51c65b=a0_0x4ee972['get']('http://localhost:'+SERVER_PORT+'/health',_0x17bd4e=>{const _0x428acb=a0_0x1cfa;_0x17bd4e[_0x428acb(0x1ee)]===0xc8?_0x30479c():_0x1068b2(new Error(_0x428acb(0x1d9)+_0x17bd4e[_0x428acb(0x1ee)]));});_0x51c65b['on'](_0x4b9d4f(0x1e4),_0x1068b2),_0x51c65b[_0x4b9d4f(0x1e6)](0x3e8,()=>{const _0x515b8c=_0x4b9d4f;_0x51c65b[_0x515b8c(0x205)](),_0x1068b2(new Error(_0x515b8c(0x1fb)));});}),console[_0x33f798(0x1f8)](_0x33f798(0x1fd)),!![];}catch(_0xcfd977){_0x36b012<_0x105e71-0x1&&await new Promise(_0xdb46b4=>setTimeout(_0xdb46b4,_0x2fe2cb));}}return console[_0x33f798(0x1f8)](_0x33f798(0x1e1)),![];}async function startServer(){return new Promise(_0x52ba82=>{const _0x56c00d=a0_0x1cfa;console[_0x56c00d(0x1f8)](_0x56c00d(0x1f2));const _0x57efc3=join(rootDir,_0x56c00d(0x1ff),_0x56c00d(0x1eb));serverProcess=spawn(_0x56c00d(0x203),[_0x57efc3],{'cwd':rootDir,'env':{...process[_0x56c00d(0x1f7)]},'stdio':[_0x56c00d(0x1d6),_0x56c00d(0x1f4),_0x56c00d(0x1f4)],'detached':![]}),serverProcess['stdout']['on'](_0x56c00d(0x1dd),_0x24edb5=>{const _0x1aed2c=_0x56c00d,_0x4d4e57=_0x24edb5['toString']()[_0x1aed2c(0x1f6)]();_0x4d4e57&&console[_0x1aed2c(0x1f8)](_0x1aed2c(0x1fa)+_0x4d4e57);}),serverProcess[_0x56c00d(0x1e3)]['on'](_0x56c00d(0x1dd),_0x2926be=>{const _0x4131f4=_0x56c00d,_0x243f16=_0x2926be[_0x4131f4(0x1ef)]()[_0x4131f4(0x1f6)]();_0x243f16&&!_0x243f16[_0x4131f4(0x1e2)]('ExperimentalWarning')&&console[_0x4131f4(0x1e4)](_0x4131f4(0x1db)+_0x243f16);}),serverProcess['on'](_0x56c00d(0x1e4),_0x1adcb3=>{const _0x4742ed=_0x56c00d;console[_0x4742ed(0x1e4)]('Failed\x20to\x20start\x20server:',_0x1adcb3[_0x4742ed(0x1d4)]),process[_0x4742ed(0x1d3)](0x1);}),serverProcess['on']('exit',(_0x5f467e,_0xecc48b)=>{const _0x11e1de=_0x56c00d;_0x5f467e!==null&&_0x5f467e!==0x0&&(console[_0x11e1de(0x1e4)]('Server\x20exited\x20with\x20code\x20'+_0x5f467e),process[_0x11e1de(0x1d3)](_0x5f467e));}),setTimeout(_0x52ba82,STARTUP_WAIT);});}async function startTerminalUI(){const _0x1abef3=a0_0x4202bf;console['log']('🖥️\x20\x20Starting\x20Terminal\x20UI...'),console[_0x1abef3(0x1f8)]('');const _0x5ab019=join(rootDir,_0x1abef3(0x200),_0x1abef3(0x201)),_0x113d90=spawn(_0x1abef3(0x203),[_0x5ab019],{'cwd':rootDir,'env':{...process[_0x1abef3(0x1f7)]},'stdio':'inherit'});return _0x113d90['on'](_0x1abef3(0x1e4),_0x432d60=>{const _0x4e9da8=_0x1abef3;console[_0x4e9da8(0x1e4)](_0x4e9da8(0x1da),_0x432d60[_0x4e9da8(0x1d4)]),cleanup(),process[_0x4e9da8(0x1d3)](0x1);}),_0x113d90['on']('exit',_0x421e02=>{const _0x4e8096=_0x1abef3;console[_0x4e8096(0x1f8)](_0x4e8096(0x1ed)),cleanup(),process[_0x4e8096(0x1d3)](_0x421e02||0x0);}),_0x113d90;}function cleanup(){const _0x8d918b=a0_0x4202bf;serverProcess&&!serverProcess[_0x8d918b(0x1f5)]&&(console['log'](_0x8d918b(0x1e9)),serverProcess[_0x8d918b(0x1e8)](_0x8d918b(0x1f3)),setTimeout(()=>{const _0xc7d10d=_0x8d918b;!serverProcess[_0xc7d10d(0x1f5)]&&serverProcess['kill'](_0xc7d10d(0x1e7));},0x1388));}process['on'](a0_0x4202bf(0x1dc),()=>{const _0x17431e=a0_0x4202bf;console['log'](_0x17431e(0x1df)),cleanup(),process['exit'](0x0);}),process['on'](a0_0x4202bf(0x1f3),()=>{const _0xf9f8e0=a0_0x4202bf;console[_0xf9f8e0(0x1f8)](_0xf9f8e0(0x204)),cleanup(),process[_0xf9f8e0(0x1d3)](0x0);}),process['on'](a0_0x4202bf(0x1d3),()=>{cleanup();});async function main(){const _0x5b4298=a0_0x4202bf;console[_0x5b4298(0x1f8)](_0x5b4298(0x202)),console[_0x5b4298(0x1f8)](_0x5b4298(0x1e0)),console['log'](_0x5b4298(0x1fe)),console['log']('');try{await startServer(),await checkServerReady(),await startTerminalUI(),await new Promise(()=>{});}catch(_0x2d12d1){console[_0x5b4298(0x1e4)]('Error\x20during\x20startup:',_0x2d12d1['message']),cleanup(),process[_0x5b4298(0x1d3)](0x1);}}main();
3
+ const a0_0x3da864=a0_0x5c33;(function(_0x5c4bc5,_0x245558){const _0x1e9e47=a0_0x5c33,_0x50c306=_0x5c4bc5();while(!![]){try{const _0x1196a9=-parseInt(_0x1e9e47(0x1a8))/0x1*(-parseInt(_0x1e9e47(0x1ae))/0x2)+-parseInt(_0x1e9e47(0x192))/0x3+parseInt(_0x1e9e47(0x1a4))/0x4*(-parseInt(_0x1e9e47(0x1a9))/0x5)+parseInt(_0x1e9e47(0x198))/0x6+-parseInt(_0x1e9e47(0x197))/0x7*(-parseInt(_0x1e9e47(0x19f))/0x8)+parseInt(_0x1e9e47(0x18a))/0x9+-parseInt(_0x1e9e47(0x18b))/0xa*(parseInt(_0x1e9e47(0x1b6))/0xb);if(_0x1196a9===_0x245558)break;else _0x50c306['push'](_0x50c306['shift']());}catch(_0x1c3b6b){_0x50c306['push'](_0x50c306['shift']());}}}(a0_0x5052,0x4a793));import{spawn}from'child_process';function a0_0x5c33(_0x292d91,_0xeb3aa){_0x292d91=_0x292d91-0x188;const _0x5052fa=a0_0x5052();let _0x5c3365=_0x5052fa[_0x292d91];return _0x5c3365;}import{fileURLToPath}from'url';import{dirname,join}from'path';import a0_0x2f290b from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),rootDir=join(__dirname,'..'),SERVER_PORT=process[a0_0x3da864(0x18c)][a0_0x3da864(0x1af)]||0x1f90,STARTUP_WAIT=0x7d0;let serverProcess=null;async function checkServerReady(_0x57427e=0xa,_0x498ee7=0x1f4){const _0x5e3224=a0_0x3da864;for(let _0x51cf4b=0x0;_0x51cf4b<_0x57427e;_0x51cf4b++){try{return await new Promise((_0x5ac546,_0x3dc032)=>{const _0xa588ae=a0_0x5c33,_0x2612a3=a0_0x2f290b['get'](_0xa588ae(0x18f)+SERVER_PORT+_0xa588ae(0x1a6),_0x31a986=>{const _0x31153f=_0xa588ae;_0x31a986[_0x31153f(0x19d)]===0xc8?_0x5ac546():_0x3dc032(new Error(_0x31153f(0x1a0)+_0x31a986[_0x31153f(0x19d)]));});_0x2612a3['on'](_0xa588ae(0x1bc),_0x3dc032),_0x2612a3[_0xa588ae(0x1b1)](0x3e8,()=>{const _0x281390=_0xa588ae;_0x2612a3[_0x281390(0x188)](),_0x3dc032(new Error(_0x281390(0x19a)));});}),console[_0x5e3224(0x18e)](_0x5e3224(0x194)),!![];}catch(_0x2ec31b){_0x51cf4b<_0x57427e-0x1&&await new Promise(_0x39683b=>setTimeout(_0x39683b,_0x498ee7));}}return console[_0x5e3224(0x18e)]('⚠️\x20\x20Server\x20may\x20not\x20be\x20fully\x20ready,\x20but\x20continuing\x20anyway...'),![];}async function startServer(){return new Promise(_0x341a12=>{const _0x3e56eb=a0_0x5c33;console['log'](_0x3e56eb(0x1a1));const _0x4859ca=join(rootDir,_0x3e56eb(0x1b4),_0x3e56eb(0x195));serverProcess=spawn(_0x3e56eb(0x1a5),[_0x4859ca],{'cwd':rootDir,'env':{...process['env']},'stdio':['ignore',_0x3e56eb(0x1ac),'pipe'],'detached':![]}),serverProcess[_0x3e56eb(0x1b9)]['on']('data',_0x54ab2b=>{const _0x3b6193=_0x3e56eb,_0x56ce0b=_0x54ab2b[_0x3b6193(0x1bb)]()[_0x3b6193(0x1ba)]();_0x56ce0b&&console[_0x3b6193(0x18e)](_0x3b6193(0x1a7)+_0x56ce0b);}),serverProcess[_0x3e56eb(0x19b)]['on']('data',_0x5bf5ad=>{const _0x42ec58=_0x3e56eb,_0x2163c7=_0x5bf5ad['toString']()['trim']();_0x2163c7&&!_0x2163c7[_0x42ec58(0x1b5)]('ExperimentalWarning')&&console[_0x42ec58(0x1bc)](_0x42ec58(0x191)+_0x2163c7);}),serverProcess['on']('error',_0x1631cd=>{const _0x1e10bf=_0x3e56eb;console[_0x1e10bf(0x1bc)]('Failed\x20to\x20start\x20server:',_0x1631cd[_0x1e10bf(0x1b7)]),process[_0x1e10bf(0x190)](0x1);}),serverProcess['on'](_0x3e56eb(0x190),(_0x4656a7,_0x8dde1f)=>{const _0x4a43d7=_0x3e56eb;_0x4656a7!==null&&_0x4656a7!==0x0&&(console[_0x4a43d7(0x1bc)]('Server\x20exited\x20with\x20code\x20'+_0x4656a7),process[_0x4a43d7(0x190)](_0x4656a7));}),setTimeout(_0x341a12,STARTUP_WAIT);});}async function startTerminalUI(){const _0x9a1898=a0_0x3da864;console[_0x9a1898(0x18e)](_0x9a1898(0x1b0)),console[_0x9a1898(0x18e)]('');const _0x48fb26=join(rootDir,_0x9a1898(0x199),_0x9a1898(0x1aa)),_0x86ca71=spawn(_0x9a1898(0x1a5),[_0x48fb26],{'cwd':rootDir,'env':{...process[_0x9a1898(0x18c)]},'stdio':'inherit'});return _0x86ca71['on']('error',_0x28b3f8=>{const _0x5d633d=_0x9a1898;console['error'](_0x5d633d(0x1ad),_0x28b3f8[_0x5d633d(0x1b7)]),cleanup(),process['exit'](0x1);}),_0x86ca71['on'](_0x9a1898(0x190),_0x5abfc2=>{const _0x336103=_0x9a1898;console[_0x336103(0x18e)](_0x336103(0x18d)),cleanup(),process[_0x336103(0x190)](_0x5abfc2||0x0);}),_0x86ca71;}function cleanup(){const _0x2993ed=a0_0x3da864;serverProcess&&!serverProcess[_0x2993ed(0x196)]&&(console['log'](_0x2993ed(0x193)),serverProcess['kill'](_0x2993ed(0x19e)),setTimeout(()=>{const _0x2c4623=_0x2993ed;!serverProcess['killed']&&serverProcess[_0x2c4623(0x189)]('SIGKILL');},0x1388));}function a0_0x5052(){const _0x175e8d=['toString','error','destroy','kill','1976958ymiUZW','365470JyyZnw','env','\x0a👋\x20Terminal\x20UI\x20closed.','log','http://localhost:','exit','[SERVER\x20ERROR]\x20','1676595aEwssK','🛑\x20Stopping\x20server...','✅\x20Server\x20is\x20ready!','index.js','killed','1559537DRuhpN','1106526DrbpaI','bin','Timeout','stderr','SIGINT','statusCode','SIGTERM','8HGThaw','Server\x20returned\x20','🚀\x20Starting\x20Loxia\x20server...','\x0a⚠️\x20\x20Received\x20SIGTERM,\x20shutting\x20down...','╔════════════════════════════════════════════════╗','8CZWnyS','node','/health','[SERVER]\x20','67JQPWRD','30530FXxEIu','loxia-terminal.js','\x0a⚠️\x20\x20Received\x20SIGINT,\x20shutting\x20down...','pipe','Failed\x20to\x20start\x20Terminal\x20UI:','11804uOOlPR','PORT','🖥️\x20\x20Starting\x20Terminal\x20UI...','setTimeout','╚════════════════════════════════════════════════╝','Error\x20during\x20startup:','src','includes','44cCUNPQ','message','║\x20\x20\x20Loxia\x20AI\x20Agents\x20-\x20Server\x20+\x20Terminal\x20UI\x20\x20\x20\x20\x20\x20║','stdout','trim'];a0_0x5052=function(){return _0x175e8d;};return a0_0x5052();}process['on'](a0_0x3da864(0x19c),()=>{const _0x17bfba=a0_0x3da864;console[_0x17bfba(0x18e)](_0x17bfba(0x1ab)),cleanup(),process[_0x17bfba(0x190)](0x0);}),process['on'](a0_0x3da864(0x19e),()=>{const _0x18c2ed=a0_0x3da864;console[_0x18c2ed(0x18e)](_0x18c2ed(0x1a2)),cleanup(),process[_0x18c2ed(0x190)](0x0);}),process['on'](a0_0x3da864(0x190),()=>{cleanup();});async function main(){const _0x258839=a0_0x3da864;console['log'](_0x258839(0x1a3)),console['log'](_0x258839(0x1b8)),console[_0x258839(0x18e)](_0x258839(0x1b2)),console[_0x258839(0x18e)]('');try{await startServer(),await checkServerReady(),await startTerminalUI(),await new Promise(()=>{});}catch(_0x179e6b){console['error'](_0x258839(0x1b3),_0x179e6b[_0x258839(0x1b7)]),cleanup(),process[_0x258839(0x190)](0x1);}}main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loxia-labs/loxia-autopilot-one",
3
- "version": "1.0.17",
3
+ "version": "1.0.18",
4
4
  "description": "Loxia AI Agents System - No-code/vibe-code/companion-coder platform",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a0_0x18fc18=a0_0x2f4d;(function(_0x4c68ce,_0x31733f){const _0x165819=a0_0x2f4d,_0xd3980a=_0x4c68ce();while(!![]){try{const _0x3fd363=-parseInt(_0x165819(0x1f7))/0x1+parseInt(_0x165819(0x1f0))/0x2*(parseInt(_0x165819(0x1fe))/0x3)+parseInt(_0x165819(0x201))/0x4+parseInt(_0x165819(0x1d8))/0x5*(parseInt(_0x165819(0x213))/0x6)+parseInt(_0x165819(0x1f3))/0x7*(parseInt(_0x165819(0x1da))/0x8)+parseInt(_0x165819(0x1ff))/0x9*(-parseInt(_0x165819(0x212))/0xa)+parseInt(_0x165819(0x1d0))/0xb;if(_0x3fd363===_0x31733f)break;else _0xd3980a['push'](_0xd3980a['shift']());}catch(_0x1bda43){_0xd3980a['push'](_0xd3980a['shift']());}}}(a0_0x399d,0x4838b));import{exec}from'child_process';import{promisify}from'util';import a0_0x1a45fe from'https';import a0_0x4a5673 from'http';import a0_0x232cc8 from'fs';import a0_0x5d29b0 from'path';import{fileURLToPath}from'url';import{createWriteStream}from'fs';import{pipeline}from'stream/promises';const execAsync=promisify(exec),__filename=fileURLToPath(import.meta.url),__dirname=a0_0x5d29b0['dirname'](__filename),SCANNER_DIR=a0_0x5d29b0[a0_0x18fc18(0x1f1)](__dirname,'..','node_modules',a0_0x18fc18(0x1ee)),SEMGREP_VERSION=a0_0x18fc18(0x1fc);console['log']('═══════════════════════════════════════════════════════════'),console[a0_0x18fc18(0x1d2)]('\x20\x20Installing\x20Security\x20Scanners'),console['log']('═══════════════════════════════════════════════════════════\x0a');async function installScanners(){const _0x4bf79c=a0_0x18fc18;await a0_0x232cc8[_0x4bf79c(0x1d3)][_0x4bf79c(0x1f4)](SCANNER_DIR,{'recursive':!![]}),await checkESLintSecurity(),await installSemgrep(),await installPythonScanners(),console[_0x4bf79c(0x1d2)](_0x4bf79c(0x214)),console[_0x4bf79c(0x1d2)]('\x20\x20Installation\x20Complete'),console[_0x4bf79c(0x1d2)]('═══════════════════════════════════════════════════════════\x0a');}async function checkESLintSecurity(){const _0x1ff9ef=a0_0x18fc18;console[_0x1ff9ef(0x1d2)]('📦\x20Checking\x20ESLint\x20Security\x20Plugin...');try{await import(_0x1ff9ef(0x1f5)),console['log']('\x20\x20\x20✅\x20eslint-plugin-security\x20is\x20installed\x0a');}catch(_0x147a06){console[_0x1ff9ef(0x1d2)](_0x1ff9ef(0x20b)),console[_0x1ff9ef(0x1d2)](_0x1ff9ef(0x1e1));}}function a0_0x2f4d(_0x374374,_0x434609){_0x374374=_0x374374-0x1cd;const _0x399d6b=a0_0x399d();let _0x2f4dc6=_0x399d6b[_0x374374];return _0x2f4dc6;}async function installSemgrep(){const _0x18a95e=a0_0x18fc18;console['log'](_0x18a95e(0x211));const _0x12d638=process[_0x18a95e(0x1d7)],_0x19ebc8=process[_0x18a95e(0x1d5)];try{const _0x27f083=await execAsync(_0x18a95e(0x1cf),{'timeout':0x1388});console[_0x18a95e(0x1d2)](_0x18a95e(0x20e)+_0x27f083[_0x18a95e(0x1e6)]['trim']()),console[_0x18a95e(0x1d2)]('\x20\x20\x20Using\x20system-installed\x20Semgrep\x0a');return;}catch(_0x4fa143){console[_0x18a95e(0x1d2)](_0x18a95e(0x210));}const _0x2e85b2=getSemgrepBinaryInfo(_0x12d638,_0x19ebc8);if(!_0x2e85b2){console[_0x18a95e(0x1d2)](_0x18a95e(0x1df)+_0x12d638+'-'+_0x19ebc8),console[_0x18a95e(0x1d2)](_0x18a95e(0x1e0));return;}try{const _0x13b66d=a0_0x5d29b0[_0x18a95e(0x1f1)](SCANNER_DIR,_0x18a95e(0x1e8));console['log'](_0x18a95e(0x1d1)+_0x2e85b2[_0x18a95e(0x209)]+'...'),await downloadFile(_0x2e85b2[_0x18a95e(0x209)],_0x13b66d),await a0_0x232cc8[_0x18a95e(0x1d3)]['chmod'](_0x13b66d,0x1ed),console[_0x18a95e(0x1d2)](_0x18a95e(0x1cd)),console['log'](_0x18a95e(0x20c)+_0x13b66d+'\x0a'),console['log']('\x20\x20\x20Note:\x20To\x20use\x20system-wide,\x20add\x20to\x20PATH\x20or\x20install\x20globally:'),console[_0x18a95e(0x1d2)](_0x18a95e(0x1f2));}catch(_0x25b22f){console[_0x18a95e(0x1d2)](_0x18a95e(0x1e4)+_0x25b22f[_0x18a95e(0x205)]),console['log'](_0x18a95e(0x1f6));}}function getSemgrepBinaryInfo(_0xa2ff99,_0x23e997){return null;}function a0_0x399d(){const _0x4e534d=['bandit','\x20\x20\x20Semgrep\x20not\x20found\x20in\x20PATH,\x20installing\x20standalone\x20binary...','🔍\x20Installing\x20Semgrep...','874280lotIln','330726PupBmT','\x0a═══════════════════════════════════════════════════════════','\x20\x20\x20✅\x20Semgrep\x20installed\x20successfully','🐍\x20Checking\x20Python\x20scanners...','semgrep\x20--version','4336222xedSZk','\x20\x20\x20Downloading\x20from\x20','log','promises','error','arch','\x20\x20\x20To\x20enable\x20Python\x20scanning,\x20install\x20Python\x20and\x20run:','platform','5LCNPTD','pipe','80ecDBPO','\x20-m\x20pip\x20show\x20','statusCode','python3\x20--version','headers','\x20\x20\x20⚠️\x20\x20No\x20Semgrep\x20binary\x20available\x20for\x20','\x20\x20\x20Please\x20install\x20manually:\x20https://semgrep.dev/docs/getting-started/\x0a','\x20\x20\x20Run:\x20npm\x20install\x20--save-dev\x20eslint-plugin-security\x0a','get','\x20\x20\x20⚠️\x20\x20Python\x20not\x20found\x20-\x20skipping\x20Python\x20scanners','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20Semgrep:\x20','python3','stdout','\x20\x20\x20✅\x20Python\x20found:\x20','semgrep','close','startsWith','\x20-m\x20pip\x20install\x20--user\x20','catch','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20','.scanners','\x20\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit\x20checkov\x20yamllint\x0a','4EuJVyj','join','\x20\x20\x20pip\x20install\x20semgrep\x0a','137081CEfqjP','mkdir','eslint-plugin-security','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20semgrep\x0a','57431KjVtsz','\x20\x20\x20✅\x20','\x20already\x20installed','\x20installed\x20successfully','\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit','v1.55.0','python\x20--version','10911xsNZbZ','36sCJKWy','\x0aYou\x20can\x20manually\x20install\x20scanners:','202140VwvutC','...','finish','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20','message','pip-audit','❌\x20Installation\x20failed:','\x20\x20\x20Installing\x20','url','exit','\x20\x20\x20⚠️\x20\x20eslint-plugin-security\x20not\x20found','\x20\x20\x20Location:\x20','checkov','\x20\x20\x20✅\x20Semgrep\x20already\x20installed:\x20'];a0_0x399d=function(){return _0x4e534d;};return a0_0x399d();}async function installPythonScanners(){const _0x32d6c9=a0_0x18fc18;console[_0x32d6c9(0x1d2)](_0x32d6c9(0x1ce));let _0x1b9d1c=null;try{await execAsync(_0x32d6c9(0x1dd),{'timeout':0x1388}),_0x1b9d1c=_0x32d6c9(0x1e5);}catch(_0x286cf7){try{await execAsync(_0x32d6c9(0x1fd),{'timeout':0x1388}),_0x1b9d1c='python';}catch(_0x25a317){console[_0x32d6c9(0x1d2)](_0x32d6c9(0x1e3)),console[_0x32d6c9(0x1d2)](_0x32d6c9(0x1d6)),console['log'](_0x32d6c9(0x1ef));return;}}console[_0x32d6c9(0x1d2)](_0x32d6c9(0x1e7)+_0x1b9d1c),await installViaPip(_0x32d6c9(0x1e8),_0x1b9d1c),await installViaPip(_0x32d6c9(0x20f),_0x1b9d1c),await installViaPip(_0x32d6c9(0x206),_0x1b9d1c),await installViaPip(_0x32d6c9(0x20d),_0x1b9d1c),await installViaPip('yamllint',_0x1b9d1c),console[_0x32d6c9(0x1d2)]('');}async function installViaPip(_0xd865b7,_0x4ae6cb){const _0x5b604c=a0_0x18fc18;try{const _0x145cc9=await execAsync(_0x4ae6cb+_0x5b604c(0x1db)+_0xd865b7,{'timeout':0x1388});return console['log']('\x20\x20\x20✅\x20'+_0xd865b7+_0x5b604c(0x1f9)),!![];}catch(_0x12bd27){console[_0x5b604c(0x1d2)](_0x5b604c(0x208)+_0xd865b7+_0x5b604c(0x202));try{return await execAsync(_0x4ae6cb+_0x5b604c(0x1eb)+_0xd865b7,{'timeout':0xea60}),console['log'](_0x5b604c(0x1f8)+_0xd865b7+_0x5b604c(0x1fa)),!![];}catch(_0x14ae4a){return console[_0x5b604c(0x1d2)](_0x5b604c(0x1ed)+_0xd865b7+':\x20'+_0x14ae4a[_0x5b604c(0x205)]),console[_0x5b604c(0x1d2)](_0x5b604c(0x204)+_0xd865b7),![];}}}async function downloadFile(_0x22782e,_0x5a7b39){return new Promise((_0x25da2c,_0x1111a7)=>{const _0x3152c3=a0_0x2f4d,_0x254ad3=_0x22782e[_0x3152c3(0x1ea)]('https')?a0_0x1a45fe:a0_0x4a5673;_0x254ad3[_0x3152c3(0x1e2)](_0x22782e,_0x7a520d=>{const _0x4f64d8=_0x3152c3;if(_0x7a520d[_0x4f64d8(0x1dc)]===0x12e||_0x7a520d[_0x4f64d8(0x1dc)]===0x12d){downloadFile(_0x7a520d[_0x4f64d8(0x1de)]['location'],_0x5a7b39)['then'](_0x25da2c)[_0x4f64d8(0x1ec)](_0x1111a7);return;}if(_0x7a520d[_0x4f64d8(0x1dc)]!==0xc8){_0x1111a7(new Error('Failed\x20to\x20download:\x20HTTP\x20'+_0x7a520d[_0x4f64d8(0x1dc)]));return;}const _0x47c148=createWriteStream(_0x5a7b39);_0x7a520d[_0x4f64d8(0x1d9)](_0x47c148),_0x47c148['on'](_0x4f64d8(0x203),()=>{const _0x561285=_0x4f64d8;_0x47c148[_0x561285(0x1e9)](),_0x25da2c();}),_0x47c148['on'](_0x4f64d8(0x1d4),_0x1266b1=>{a0_0x232cc8['unlink'](_0x5a7b39,()=>{}),_0x1111a7(_0x1266b1);});})['on']('error',_0x1111a7);});}installScanners()[a0_0x18fc18(0x1ec)](_0x5f4f55=>{const _0x201d42=a0_0x18fc18;console[_0x201d42(0x1d4)](_0x201d42(0x207),_0x5f4f55['message']),console['error'](_0x201d42(0x200)),console['error']('\x20\x20npm\x20install\x20--save-dev\x20eslint-plugin-security'),console[_0x201d42(0x1d4)](_0x201d42(0x1fb)),process[_0x201d42(0x20a)](0x0);});
2
+ const a0_0x389d31=a0_0x184e;(function(_0x190f97,_0x40e3ef){const _0x149564=a0_0x184e,_0x392fa0=_0x190f97();while(!![]){try{const _0x22d520=parseInt(_0x149564(0xed))/0x1*(-parseInt(_0x149564(0xea))/0x2)+parseInt(_0x149564(0x104))/0x3*(-parseInt(_0x149564(0xe9))/0x4)+parseInt(_0x149564(0xef))/0x5*(-parseInt(_0x149564(0xd0))/0x6)+-parseInt(_0x149564(0xf8))/0x7+parseInt(_0x149564(0xd6))/0x8*(parseInt(_0x149564(0xdd))/0x9)+parseInt(_0x149564(0xfd))/0xa*(-parseInt(_0x149564(0xe5))/0xb)+-parseInt(_0x149564(0xfa))/0xc*(-parseInt(_0x149564(0x112))/0xd);if(_0x22d520===_0x40e3ef)break;else _0x392fa0['push'](_0x392fa0['shift']());}catch(_0x1fca07){_0x392fa0['push'](_0x392fa0['shift']());}}}(a0_0x3feb,0x5da68));import{exec}from'child_process';import{promisify}from'util';import a0_0x5b54b4 from'https';import a0_0x4f2fe3 from'http';import a0_0x47a92e from'fs';import a0_0x56ef16 from'path';import{fileURLToPath}from'url';function a0_0x184e(_0x3ae31e,_0x13ae83){_0x3ae31e=_0x3ae31e-0xc9;const _0x3feba1=a0_0x3feb();let _0x184e2a=_0x3feba1[_0x3ae31e];return _0x184e2a;}import{createWriteStream}from'fs';import{pipeline}from'stream/promises';const execAsync=promisify(exec),__filename=fileURLToPath(import.meta.url),__dirname=a0_0x56ef16[a0_0x389d31(0xcf)](__filename),SCANNER_DIR=a0_0x56ef16[a0_0x389d31(0x100)](__dirname,'..',a0_0x389d31(0xd1),a0_0x389d31(0xce)),SEMGREP_VERSION='v1.55.0';console['log']('═══════════════════════════════════════════════════════════'),console[a0_0x389d31(0xe3)](a0_0x389d31(0xeb)),console[a0_0x389d31(0xe3)]('═══════════════════════════════════════════════════════════\x0a');async function installScanners(){const _0x5a2f1e=a0_0x389d31;await a0_0x47a92e['promises'][_0x5a2f1e(0xee)](SCANNER_DIR,{'recursive':!![]}),await checkESLintSecurity(),await installSemgrep(),await installPythonScanners(),console[_0x5a2f1e(0xe3)](_0x5a2f1e(0x10d)),console[_0x5a2f1e(0xe3)](_0x5a2f1e(0xcd)),console[_0x5a2f1e(0xe3)](_0x5a2f1e(0xf0));}async function checkESLintSecurity(){const _0x377197=a0_0x389d31;console['log'](_0x377197(0xd4));try{await import(_0x377197(0xe7)),console[_0x377197(0xe3)]('\x20\x20\x20✅\x20eslint-plugin-security\x20is\x20installed\x0a');}catch(_0x583f33){console[_0x377197(0xe3)](_0x377197(0xd9)),console[_0x377197(0xe3)](_0x377197(0xf5));}}async function installSemgrep(){const _0xf894f9=a0_0x389d31;console[_0xf894f9(0xe3)](_0xf894f9(0xf4));const _0x13e78e=process[_0xf894f9(0xd3)],_0x11e5b3=process['arch'];try{const _0x5563d8=await execAsync(_0xf894f9(0x10f),{'timeout':0x1388});console[_0xf894f9(0xe3)](_0xf894f9(0xdb)+_0x5563d8[_0xf894f9(0xff)]['trim']()),console[_0xf894f9(0xe3)](_0xf894f9(0xf1));return;}catch(_0x8ffd14){console[_0xf894f9(0xe3)]('\x20\x20\x20Semgrep\x20not\x20found\x20in\x20PATH,\x20installing\x20standalone\x20binary...');}const _0x17cce5=getSemgrepBinaryInfo(_0x13e78e,_0x11e5b3);if(!_0x17cce5){console[_0xf894f9(0xe3)]('\x20\x20\x20⚠️\x20\x20No\x20Semgrep\x20binary\x20available\x20for\x20'+_0x13e78e+'-'+_0x11e5b3),console[_0xf894f9(0xe3)](_0xf894f9(0xd5));return;}try{const _0x1c6563=a0_0x56ef16['join'](SCANNER_DIR,'semgrep');console[_0xf894f9(0xe3)]('\x20\x20\x20Downloading\x20from\x20'+_0x17cce5[_0xf894f9(0xfc)]+_0xf894f9(0x111)),await downloadFile(_0x17cce5['url'],_0x1c6563),await a0_0x47a92e[_0xf894f9(0x110)]['chmod'](_0x1c6563,0x1ed),console['log']('\x20\x20\x20✅\x20Semgrep\x20installed\x20successfully'),console['log']('\x20\x20\x20Location:\x20'+_0x1c6563+'\x0a'),console[_0xf894f9(0xe3)](_0xf894f9(0xe2)),console['log'](_0xf894f9(0xd8));}catch(_0x2e6d54){console['log'](_0xf894f9(0x107)+_0x2e6d54[_0xf894f9(0x10e)]),console['log']('\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20semgrep\x0a');}}function getSemgrepBinaryInfo(_0x512186,_0x5e6243){return null;}async function installPythonScanners(){const _0x3dc3b2=a0_0x389d31;console['log'](_0x3dc3b2(0xec));let _0x29aa6c=null;try{await execAsync(_0x3dc3b2(0x114),{'timeout':0x1388}),_0x29aa6c=_0x3dc3b2(0x108);}catch(_0x1df1c8){try{await execAsync(_0x3dc3b2(0xe4),{'timeout':0x1388}),_0x29aa6c=_0x3dc3b2(0x10a);}catch(_0x19bb23){console[_0x3dc3b2(0xe3)](_0x3dc3b2(0xf9)),console['log'](_0x3dc3b2(0xca)),console[_0x3dc3b2(0xe3)](_0x3dc3b2(0xf6));return;}}console[_0x3dc3b2(0xe3)](_0x3dc3b2(0xd2)+_0x29aa6c),await installViaPip(_0x3dc3b2(0xfe),_0x29aa6c),await installViaPip(_0x3dc3b2(0xe1),_0x29aa6c),await installViaPip(_0x3dc3b2(0xd7),_0x29aa6c),await installViaPip(_0x3dc3b2(0x109),_0x29aa6c),await installViaPip(_0x3dc3b2(0x102),_0x29aa6c),console['log']('');}function a0_0x3feb(){const _0x3d98c9=['pip-audit','\x20\x20\x20pip\x20install\x20semgrep\x0a','\x20\x20\x20⚠️\x20\x20eslint-plugin-security\x20not\x20found','❌\x20Installation\x20failed:','\x20\x20\x20✅\x20Semgrep\x20already\x20installed:\x20','pipe','48249yqGYfJ','finish','\x20installed\x20successfully','error','bandit','\x20\x20\x20Note:\x20To\x20use\x20system-wide,\x20add\x20to\x20PATH\x20or\x20install\x20globally:','log','python\x20--version','357225hIZRpm','\x20-m\x20pip\x20show\x20','eslint-plugin-security','\x20already\x20installed','2227076MXILbf','68Kmdojt','\x20\x20Installing\x20Security\x20Scanners','🐍\x20Checking\x20Python\x20scanners...','7262WJpdrq','mkdir','3699715yEfFXh','═══════════════════════════════════════════════════════════\x0a','\x20\x20\x20Using\x20system-installed\x20Semgrep\x0a','close','Failed\x20to\x20download:\x20HTTP\x20','🔍\x20Installing\x20Semgrep...','\x20\x20\x20Run:\x20npm\x20install\x20--save-dev\x20eslint-plugin-security\x0a','\x20\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit\x20checkov\x20yamllint\x0a','catch','699860bHfukW','\x20\x20\x20⚠️\x20\x20Python\x20not\x20found\x20-\x20skipping\x20Python\x20scanners','41028CsTEsr','\x20\x20npm\x20install\x20--save-dev\x20eslint-plugin-security','url','70HKxvNL','semgrep','stdout','join','headers','yamllint','location','3pLileH','\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20Semgrep:\x20','python3','checkov','python','https','\x20-m\x20pip\x20install\x20--user\x20','\x0a═══════════════════════════════════════════════════════════','message','semgrep\x20--version','promises','...','5902Ddsdjz','startsWith','python3\x20--version','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20','\x20\x20\x20To\x20enable\x20Python\x20scanning,\x20install\x20Python\x20and\x20run:','statusCode','\x20\x20\x20✅\x20','\x20\x20Installation\x20Complete','.scanners','dirname','6yWkVeS','node_modules','\x20\x20\x20✅\x20Python\x20found:\x20','platform','📦\x20Checking\x20ESLint\x20Security\x20Plugin...','\x20\x20\x20Please\x20install\x20manually:\x20https://semgrep.dev/docs/getting-started/\x0a','1048qXEIPZ'];a0_0x3feb=function(){return _0x3d98c9;};return a0_0x3feb();}async function installViaPip(_0xb34f4e,_0x341442){const _0x44707c=a0_0x389d31;try{const _0x906571=await execAsync(_0x341442+_0x44707c(0xe6)+_0xb34f4e,{'timeout':0x1388});return console[_0x44707c(0xe3)](_0x44707c(0xcc)+_0xb34f4e+_0x44707c(0xe8)),!![];}catch(_0xad7e26){console['log']('\x20\x20\x20Installing\x20'+_0xb34f4e+_0x44707c(0x111));try{return await execAsync(_0x341442+_0x44707c(0x10c)+_0xb34f4e,{'timeout':0xea60}),console[_0x44707c(0xe3)]('\x20\x20\x20✅\x20'+_0xb34f4e+_0x44707c(0xdf)),!![];}catch(_0x5c6772){return console[_0x44707c(0xe3)](_0x44707c(0xc9)+_0xb34f4e+':\x20'+_0x5c6772[_0x44707c(0x10e)]),console[_0x44707c(0xe3)](_0x44707c(0x106)+_0xb34f4e),![];}}}async function downloadFile(_0x37601e,_0x233e65){return new Promise((_0x10ffbc,_0x4b4431)=>{const _0x2e2e2a=a0_0x184e,_0x1c709f=_0x37601e[_0x2e2e2a(0x113)](_0x2e2e2a(0x10b))?a0_0x5b54b4:a0_0x4f2fe3;_0x1c709f['get'](_0x37601e,_0x2c8ebb=>{const _0x3e51b2=_0x2e2e2a;if(_0x2c8ebb[_0x3e51b2(0xcb)]===0x12e||_0x2c8ebb[_0x3e51b2(0xcb)]===0x12d){downloadFile(_0x2c8ebb[_0x3e51b2(0x101)][_0x3e51b2(0x103)],_0x233e65)['then'](_0x10ffbc)[_0x3e51b2(0xf7)](_0x4b4431);return;}if(_0x2c8ebb[_0x3e51b2(0xcb)]!==0xc8){_0x4b4431(new Error(_0x3e51b2(0xf3)+_0x2c8ebb['statusCode']));return;}const _0x3a4fb5=createWriteStream(_0x233e65);_0x2c8ebb[_0x3e51b2(0xdc)](_0x3a4fb5),_0x3a4fb5['on'](_0x3e51b2(0xde),()=>{const _0x5513bb=_0x3e51b2;_0x3a4fb5[_0x5513bb(0xf2)](),_0x10ffbc();}),_0x3a4fb5['on']('error',_0xeaaabf=>{a0_0x47a92e['unlink'](_0x233e65,()=>{}),_0x4b4431(_0xeaaabf);});})['on'](_0x2e2e2a(0xe0),_0x4b4431);});}installScanners()[a0_0x389d31(0xf7)](_0x44552f=>{const _0x2e4339=a0_0x389d31;console[_0x2e4339(0xe0)](_0x2e4339(0xda),_0x44552f[_0x2e4339(0x10e)]),console['error']('\x0aYou\x20can\x20manually\x20install\x20scanners:'),console[_0x2e4339(0xe0)](_0x2e4339(0xfb)),console[_0x2e4339(0xe0)](_0x2e4339(0x105)),process['exit'](0x0);});
@@ -1 +1 @@
1
- const a0_0x233d81=a0_0x1460;function a0_0x5a62(){const _0x232748=['lNnJC3m','CMvZDwX0CW','u0vwrvjjvfK','mJa4ndG0mfDyrKvouq','C3LUDgf4','zw5KC1DPDgG','C3r5BgvSAw50','zxH0zw5K','lNnHC3m','lMXLC3m','C3vWCg9YDhnbDxrVrML4','u1Lovefy','l15JDxn0B20TlW','B3b0Aw1PEMu','zg91yMXL','mtHsANnPy3m','rvjst1i','Bg93zxi','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','BgvZCW','ChvZAa','Dgv4Da','BM8TDw5RBM93BG','mtmXmtzPy2PLqxC','C2v2zxjPDhK','CNvSzq','ChjVy2vZCW','Cg9ZDgnZCW','D2HPBgu','zNvUy3rPB24','Cg9ZDgnZC0XLC3m','BgLUDfn0EwXLCW','BgvUz3rO','Aw5JBhvKzxm','BM8TAw52ywXPza','v0fstKLorW','y29SDw1U','Dg9mB3DLCKnHC2u','ng9lvgrXEa','CgvYzM9YBwfUy2u','ntu2ndqWnw92Ae94wa','nJi4nJG4BNjmCffO','y2f0zwDVCML6zvn0EwXLBgLUDfj1Bgu','Bg9Nz2vY','C2nZCW','mJe5mJvbqNzkCg8','BwL4Aw4','mJaZA3rbCLrc','Cg9ZDgnZCY1SzxnZ','q0furuDpuLK','mtaZnZC3Be91z0H3','nhDhtNvhDW','zM9Y','zwXZzq','Cg9ZDgnZC1nJC3m','lMnZCW','D2fYBMLUz3m','y2HLy2TtEw50yxG','mZeXmti3tvP6rfPU','zxjYB3i','BwvZC2fNzq','u1rzteu'];a0_0x5a62=function(){return _0x232748;};return a0_0x5a62();}function a0_0x1460(_0x3409dc,_0x20b5a9){_0x3409dc=_0x3409dc-0x14f;const _0x5a6295=a0_0x5a62();let _0x14609e=_0x5a6295[_0x3409dc];if(a0_0x1460['sRMVsP']===undefined){var _0x102a14=function(_0x68385b){const _0x372dab='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x353114='',_0x1559da='';for(let _0x254b66=0x0,_0x592c59,_0x2ead50,_0x326bf2=0x0;_0x2ead50=_0x68385b['charAt'](_0x326bf2++);~_0x2ead50&&(_0x592c59=_0x254b66%0x4?_0x592c59*0x40+_0x2ead50:_0x2ead50,_0x254b66++%0x4)?_0x353114+=String['fromCharCode'](0xff&_0x592c59>>(-0x2*_0x254b66&0x6)):0x0){_0x2ead50=_0x372dab['indexOf'](_0x2ead50);}for(let _0xd29427=0x0,_0x12980b=_0x353114['length'];_0xd29427<_0x12980b;_0xd29427++){_0x1559da+='%'+('00'+_0x353114['charCodeAt'](_0xd29427)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1559da);};a0_0x1460['MjTlMz']=_0x102a14,a0_0x1460['HuGMhd']={},a0_0x1460['sRMVsP']=!![];}const _0x1d1ffc=_0x5a6295[0x0],_0x5b669d=_0x3409dc+_0x1d1ffc,_0x51bb31=a0_0x1460['HuGMhd'][_0x5b669d];return!_0x51bb31?(_0x14609e=a0_0x1460['MjTlMz'](_0x14609e),a0_0x1460['HuGMhd'][_0x5b669d]=_0x14609e):_0x14609e=_0x51bb31,_0x14609e;}(function(_0x5a1395,_0x59032b){const _0x1f6216=a0_0x1460,_0x5054ca=_0x5a1395();while(!![]){try{const _0x14c87f=-parseInt(_0x1f6216(0x173))/0x1*(-parseInt(_0x1f6216(0x167))/0x2)+parseInt(_0x1f6216(0x17b))/0x3+parseInt(_0x1f6216(0x174))/0x4*(parseInt(_0x1f6216(0x16e))/0x5)+parseInt(_0x1f6216(0x158))/0x6*(-parseInt(_0x1f6216(0x170))/0x7)+-parseInt(_0x1f6216(0x16a))/0x8*(-parseInt(_0x1f6216(0x150))/0x9)+parseInt(_0x1f6216(0x182))/0xa+-parseInt(_0x1f6216(0x169))/0xb;if(_0x14c87f===_0x59032b)break;else _0x5054ca['push'](_0x5054ca['shift']());}catch(_0x54ac5b){_0x5054ca['push'](_0x5054ca['shift']());}}}(a0_0x5a62,0x1b5b7));import{STATIC_ANALYSIS}from'../utilities/constants.js';class CSSAnalyzer{constructor(_0x353114=null){const _0x3938e3=a0_0x1460;this['logger']=_0x353114,this['stylelint']=null,this['postcss']=null,this[_0x3938e3(0x177)]=null,this['postcssLess']=null;}async['analyze'](_0x1559da,_0x254b66,_0x592c59={}){const _0x407936=a0_0x1460;try{const _0x2ead50=[],_0x326bf2=this['detectLanguage'](_0x1559da),_0xd29427=await this[_0x407936(0x17a)](_0x1559da,_0x254b66,_0x326bf2);_0x2ead50['push'](..._0xd29427);if(_0xd29427['length']===0x0){const _0x12980b=await this[_0x407936(0x160)](_0x1559da,_0x254b66,_0x326bf2);_0x2ead50['push'](..._0x12980b);}return this[_0x407936(0x16c)]?.['debug']('CSS\x20analysis\x20completed',{'file':_0x1559da,'language':_0x326bf2,'totalDiagnostics':_0x2ead50['length'],'errors':_0x2ead50['filter'](_0x25ce9b=>_0x25ce9b['severity']===STATIC_ANALYSIS[_0x407936(0x181)]['ERROR'])[_0x407936(0x161)],'warnings':_0x2ead50['filter'](_0x2870c0=>_0x2870c0['severity']===STATIC_ANALYSIS[_0x407936(0x181)][_0x407936(0x164)])[_0x407936(0x161)]}),_0x2ead50;}catch(_0x412be4){return this[_0x407936(0x16c)]?.['error']('CSS\x20analysis\x20failed',{'file':_0x1559da,'error':_0x412be4[_0x407936(0x17d)]}),[];}}async['checkSyntax'](_0x1d076d,_0x361456,_0x44c310){const _0x4ad0e5=a0_0x1460,_0x3bdae1=[];try{if(!this[_0x4ad0e5(0x15c)]){const _0x25648b=await import('postcss');this['postcss']=_0x25648b['default'];}let _0x4ef337=null;if(_0x44c310===_0x4ad0e5(0x16d)){if(!this['postcssScss']){const _0x1b6982=await import('postcss-scss');this['postcssScss']=_0x1b6982['default'];}_0x4ef337=this[_0x4ad0e5(0x177)];}else{if(_0x44c310===_0x4ad0e5(0x154)){if(!this[_0x4ad0e5(0x15f)]){const _0x303fac=await import('postcss-less');this['postcssLess']=_0x303fac['default'];}_0x4ef337=this['postcssLess'];}}const _0x239f29=this[_0x4ad0e5(0x15c)]()[_0x4ad0e5(0x15b)](_0x361456,{'from':_0x1d076d,'syntax':_0x4ef337}),_0x1a307a=_0x239f29['root'];this[_0x4ad0e5(0x16c)]?.['debug']('PostCSS\x20syntax\x20check\x20passed',{'file':_0x1d076d});}catch(_0x14ece4){const _0x79d2ab=this['formatPostCSSError'](_0x14ece4,_0x1d076d);_0x79d2ab&&_0x3bdae1['push'](_0x79d2ab);}return _0x3bdae1;}async[a0_0x233d81(0x160)](_0x163527,_0x3c8d65,_0xafc655){const _0x376ca9=a0_0x233d81,_0x17c3fc=[];try{if(!this['stylelint']){const _0x100fd0=await import('stylelint');this[_0x376ca9(0x185)]=_0x100fd0['default'];}const _0x55971e={'extends':['stylelint-config-standard'],'rules':{'color-no-invalid-hex':!![],'font-family-no-duplicate-names':!![],'function-calc-no-invalid':!![],'string-no-newline':!![],'unit-no-unknown':!![],'property-no-unknown':!![],'declaration-block-no-duplicate-properties':!![],'selector-pseudo-class-no-unknown':!![],'selector-pseudo-element-no-unknown':!![],'selector-type-no-unknown':[!![],{'ignoreTypes':[_0x376ca9(0x18b),'ng-deep']}],'media-feature-name-no-unknown':!![],'at-rule-no-unknown':_0xafc655===_0x376ca9(0x16d)?[!![],{'ignoreAtRules':[_0x376ca9(0x16f),'include',_0x376ca9(0x186),'if',_0x376ca9(0x176),_0x376ca9(0x175),'each',_0x376ca9(0x15d),_0x376ca9(0x15e),'return','content','use','forward']}]:_0xafc655==='less'?[!![],{'ignoreAtRules':['plugin']}]:!![],'comment-no-empty':!![],'no-duplicate-selectors':!![],'no-empty-source':null,'block-no-empty':!![],'declaration-block-no-shorthand-property-overrides':!![],'font-family-no-missing-generic-family-keyword':!![],'function-linear-gradient-no-nonstandard-direction':!![],'no-descending-specificity':null,'no-duplicate-at-import-rules':!![],'no-extra-semicolons':!![],'no-invalid-double-slash-comments':!![],'selector-pseudo-element-colon-notation':_0x376ca9(0x14f),'selector-type-case':_0x376ca9(0x152)},'customSyntax':_0xafc655===_0x376ca9(0x16d)?'postcss-scss':_0xafc655==='less'?_0x376ca9(0x171):undefined},_0x316f59=await this['stylelint']['lint']({'code':_0x3c8d65,'codeFilename':_0x163527,'config':_0x55971e});if(_0x316f59[_0x376ca9(0x180)]&&_0x316f59['results'][_0x376ca9(0x161)]>0x0){const _0x50a6db=_0x316f59['results'][0x0];if(_0x50a6db['warnings'])for(const _0x43dd4d of _0x50a6db[_0x376ca9(0x179)]){_0x17c3fc[_0x376ca9(0x155)]({'file':_0x163527,'line':_0x43dd4d['line']||0x1,'column':_0x43dd4d['column']||0x1,'severity':_0x43dd4d[_0x376ca9(0x159)]===_0x376ca9(0x17c)?STATIC_ANALYSIS[_0x376ca9(0x181)]['ERROR']:STATIC_ANALYSIS['SEVERITY'][_0x376ca9(0x164)],'rule':_0x43dd4d['rule']||'unknown','message':_0x43dd4d[_0x376ca9(0x156)],'category':this[_0x376ca9(0x16b)](_0x43dd4d[_0x376ca9(0x15a)]),'fixable':![],'source':_0x376ca9(0x185)});}}}catch(_0x3e29a5){this[_0x376ca9(0x16c)]?.['warn']('Stylelint\x20analysis\x20failed',{'file':_0x163527,'error':_0x3e29a5['message']});}return _0x17c3fc;}['formatPostCSSError'](_0x4c54e3,_0x1f05ce){const _0x49ebd8=a0_0x233d81;return{'file':_0x1f05ce,'line':_0x4c54e3['line']||0x1,'column':_0x4c54e3[_0x49ebd8(0x165)]||0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x49ebd8(0x151)],'rule':_0x4c54e3['name']||'CssSyntaxError','message':_0x4c54e3['reason']||_0x4c54e3[_0x49ebd8(0x17d)],'category':STATIC_ANALYSIS['CATEGORY'][_0x49ebd8(0x18a)],'fixable':![],'source':'postcss','code':_0x4c54e3['source']||undefined};}[a0_0x233d81(0x16b)](_0x207d4e){const _0x17afa0=a0_0x233d81;if(!_0x207d4e)return STATIC_ANALYSIS[_0x17afa0(0x172)][_0x17afa0(0x17e)];const _0x530ec5=_0x207d4e[_0x17afa0(0x166)]();if(_0x530ec5['includes'](_0x17afa0(0x163))||_0x530ec5['includes'](_0x17afa0(0x157))||_0x530ec5[_0x17afa0(0x162)]('no-empty')||_0x530ec5['includes'](_0x17afa0(0x183)))return STATIC_ANALYSIS[_0x17afa0(0x172)]['SYNTAX'];if(_0x530ec5[_0x17afa0(0x162)](_0x17afa0(0x168))||_0x530ec5['includes'](_0x17afa0(0x18c)))return STATIC_ANALYSIS['CATEGORY']['PERFORMANCE'];if(_0x530ec5[_0x17afa0(0x162)]('best-practice')||_0x530ec5[_0x17afa0(0x162)]('recommended'))return STATIC_ANALYSIS[_0x17afa0(0x172)]['BEST_PRACTICE'];return STATIC_ANALYSIS[_0x17afa0(0x172)]['STYLE'];}['detectLanguage'](_0x1c8666){const _0x467a07=a0_0x233d81,_0x32552e=_0x1c8666[_0x467a07(0x166)]();if(_0x32552e['endsWith'](_0x467a07(0x17f))||_0x32552e[_0x467a07(0x184)](_0x467a07(0x187)))return'scss';if(_0x32552e[_0x467a07(0x184)](_0x467a07(0x188)))return _0x467a07(0x154);return'css';}[a0_0x233d81(0x153)](){const _0x2e5e32=a0_0x233d81;return[_0x2e5e32(0x178),'.scss','.sass','.less'];}[a0_0x233d81(0x189)](){return![];}}export default CSSAnalyzer;
1
+ const a0_0x135ca4=a0_0x4484;(function(_0x5979dd,_0x4bf512){const _0x5e1f64=a0_0x4484,_0x621a33=_0x5979dd();while(!![]){try{const _0x5a9e92=-parseInt(_0x5e1f64(0x105))/0x1+-parseInt(_0x5e1f64(0x12d))/0x2*(parseInt(_0x5e1f64(0x12b))/0x3)+-parseInt(_0x5e1f64(0x123))/0x4*(-parseInt(_0x5e1f64(0x117))/0x5)+parseInt(_0x5e1f64(0x10d))/0x6+parseInt(_0x5e1f64(0x13c))/0x7+-parseInt(_0x5e1f64(0x10e))/0x8*(-parseInt(_0x5e1f64(0xfd))/0x9)+parseInt(_0x5e1f64(0x10f))/0xa;if(_0x5a9e92===_0x4bf512)break;else _0x621a33['push'](_0x621a33['shift']());}catch(_0x1981bc){_0x621a33['push'](_0x621a33['shift']());}}}(a0_0x512e,0xcc66e));function a0_0x4484(_0x562967,_0xb92561){_0x562967=_0x562967-0xfd;const _0x512eaf=a0_0x512e();let _0x4484f6=_0x512eaf[_0x562967];if(a0_0x4484['bBoDFy']===undefined){var _0x269231=function(_0x5da136){const _0x266df9='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3cc5f7='',_0x2fcdb8='';for(let _0x57a87d=0x0,_0x2c5dc5,_0x2cb8af,_0xc825a1=0x0;_0x2cb8af=_0x5da136['charAt'](_0xc825a1++);~_0x2cb8af&&(_0x2c5dc5=_0x57a87d%0x4?_0x2c5dc5*0x40+_0x2cb8af:_0x2cb8af,_0x57a87d++%0x4)?_0x3cc5f7+=String['fromCharCode'](0xff&_0x2c5dc5>>(-0x2*_0x57a87d&0x6)):0x0){_0x2cb8af=_0x266df9['indexOf'](_0x2cb8af);}for(let _0xedcd67=0x0,_0x6bcf13=_0x3cc5f7['length'];_0xedcd67<_0x6bcf13;_0xedcd67++){_0x2fcdb8+='%'+('00'+_0x3cc5f7['charCodeAt'](_0xedcd67)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2fcdb8);};a0_0x4484['uBFlMT']=_0x269231,a0_0x4484['YAPOEx']={},a0_0x4484['bBoDFy']=!![];}const _0x3c02b0=_0x512eaf[0x0],_0x970fc5=_0x562967+_0x3c02b0,_0x2fbdbd=a0_0x4484['YAPOEx'][_0x970fc5];return!_0x2fbdbd?(_0x4484f6=a0_0x4484['uBFlMT'](_0x4484f6),a0_0x4484['YAPOEx'][_0x970fc5]=_0x4484f6):_0x4484f6=_0x2fbdbd,_0x4484f6;}import{STATIC_ANALYSIS}from'../utilities/constants.js';function a0_0x512e(){const _0x1fda9e=['CgvYzM9YBwfUy2u','zgv0zwn0tgfUz3vHz2u','lNnJC3m','Cg9ZDgnZCW','y29SDw1U','zM9YBwf0ug9ZDentu0vYCM9Y','Cg9ZDgnZC1nJC3m','ug9ZDentuYbZEw50yxGGy2HLy2SGCgfZC2vK','neDivuvszW','C3LUDgf4','ChvZAa','BwvZC2fNzq','BM8TAw52ywXPza','Cg9ZDgnZC0XLC3m','y3nZ','CgX1z2LU','mtmYmfzcuxrssW','zgvMyxvSDa','mtKYtgXfwfPT','ChjVy2vZCW','zNvUy3rPB24','y2f0zwDVCML6zvn0EwXLBgLUDfj1Bgu','zMLSDgvY','zxjYB3i','BgvZCW','u1Lovefy','Cg9ZDgnZCY1Zy3nZ','qKvtvf9quKfdveLdrq','BwL4Aw4','zgvIDwC','BgLUDa','DxnL','lMnZCW','ntC3oteZmgz6uenkra','Cg9ZDgnZCY1SzxnZ','C2nZCW','mZCWndq5Eg9cq1vX','Aw5JBhvKzxm','y29UDgvUDa','lMXLC3m','u3r5BgvSAw50igfUywX5C2LZigzHAwXLza','Bg9Nz2vY','BM8TDw5RBM93BG','BgLUDfn0EwXLCW','mtu3oty1nwXbCfjszW','CMvHC29U','q1ntigfUywX5C2LZigzHAwXLza','zw5KC1DPDgG','CMvJB21Tzw5Kzwq','BMCTzgvLCa','CMvZDwX0CW','CM9VDa','mtG5ndG3mKLnuMjPCa','mJa4yMTSugjg','mJqWnZq3mhHYwMHQqq','BMfTzq','y2HLy2TtEw50yxG','C3vWCg9YDhnbDxrVrML4','lNnHC3m','BgvUz3rO','C3r5BgvSAw50','u0vwrvjjvfK','mZm5ntbltgDQwfu','yw5HBhL6zq','uevsrK9stufoq0u','q0furuDpuLK'];a0_0x512e=function(){return _0x1fda9e;};return a0_0x512e();}class CSSAnalyzer{constructor(_0x3cc5f7=null){const _0x3a469c=a0_0x4484;this['logger']=_0x3cc5f7,this[_0x3a469c(0x115)]=null,this[_0x3a469c(0x11e)]=null,this[_0x3a469c(0x121)]=null,this['postcssLess']=null;}async[a0_0x135ca4(0x118)](_0x2fcdb8,_0x57a87d,_0x2c5dc5={}){const _0x3d12cd=a0_0x135ca4;try{const _0x2cb8af=[],_0xc825a1=this[_0x3d12cd(0x11c)](_0x2fcdb8),_0xedcd67=await this[_0x3d12cd(0x111)](_0x2fcdb8,_0x57a87d,_0xc825a1);_0x2cb8af[_0x3d12cd(0x125)](..._0xedcd67);if(_0xedcd67[_0x3d12cd(0x114)]===0x0){const _0x6bcf13=await this['lintStyles'](_0x2fcdb8,_0x57a87d,_0xc825a1);_0x2cb8af[_0x3d12cd(0x125)](..._0x6bcf13);}return this[_0x3d12cd(0x102)]?.['debug']('CSS\x20analysis\x20completed',{'file':_0x2fcdb8,'language':_0xc825a1,'totalDiagnostics':_0x2cb8af['length'],'errors':_0x2cb8af['filter'](_0x35639b=>_0x35639b['severity']===STATIC_ANALYSIS[_0x3d12cd(0x116)]['ERROR'])['length'],'warnings':_0x2cb8af[_0x3d12cd(0x131)](_0x2affcb=>_0x2affcb['severity']===STATIC_ANALYSIS['SEVERITY']['WARNING'])['length']}),_0x2cb8af;}catch(_0x426a51){return this[_0x3d12cd(0x102)]?.[_0x3d12cd(0x132)](_0x3d12cd(0x107),{'file':_0x2fcdb8,'error':_0x426a51[_0x3d12cd(0x126)]}),[];}}async[a0_0x135ca4(0x111)](_0x28530a,_0xbc5cb4,_0x3a2224){const _0x32e331=a0_0x135ca4,_0xb37413=[];try{if(!this['postcss']){const _0x3ab67a=await import(_0x32e331(0x11e));this[_0x32e331(0x11e)]=_0x3ab67a[_0x32e331(0x12c)];}let _0x163864=null;if(_0x3a2224==='scss'){if(!this['postcssScss']){const _0x5d33bb=await import(_0x32e331(0x135));this[_0x32e331(0x121)]=_0x5d33bb[_0x32e331(0x12c)];}_0x163864=this['postcssScss'];}else{if(_0x3a2224===_0x32e331(0x133)){if(!this['postcssLess']){const _0x4c8b39=await import(_0x32e331(0x13d));this['postcssLess']=_0x4c8b39[_0x32e331(0x12c)];}_0x163864=this[_0x32e331(0x128)];}}const _0x3d47da=this['postcss']()[_0x32e331(0x12e)](_0xbc5cb4,{'from':_0x28530a,'syntax':_0x163864}),_0xb72381=_0x3d47da[_0x32e331(0x10c)];this['logger']?.[_0x32e331(0x138)](_0x32e331(0x122),{'file':_0x28530a});}catch(_0x503e1f){const _0x12b920=this[_0x32e331(0x120)](_0x503e1f,_0x28530a);_0x12b920&&_0xb37413['push'](_0x12b920);}return _0xb37413;}async[a0_0x135ca4(0x104)](_0x8bde9d,_0x20c02c,_0x55ce38){const _0x55b839=a0_0x135ca4,_0x314a72=[];try{if(!this['stylelint']){const _0x2e7561=await import('stylelint');this[_0x55b839(0x115)]=_0x2e7561[_0x55b839(0x12c)];}const _0x47d1b1={'extends':['stylelint-config-standard'],'rules':{'color-no-invalid-hex':!![],'font-family-no-duplicate-names':!![],'function-calc-no-invalid':!![],'string-no-newline':!![],'unit-no-unknown':!![],'property-no-unknown':!![],'declaration-block-no-duplicate-properties':!![],'selector-pseudo-class-no-unknown':!![],'selector-pseudo-element-no-unknown':!![],'selector-type-no-unknown':[!![],{'ignoreTypes':['/^custom-/',_0x55b839(0x10a)]}],'media-feature-name-no-unknown':!![],'at-rule-no-unknown':_0x55ce38===_0x55b839(0x13e)?[!![],{'ignoreAtRules':[_0x55b839(0x137),'include','extend','if','else','for','each','while',_0x55b839(0x12f),'return',_0x55b839(0xff),_0x55b839(0x13a),'forward']}]:_0x55ce38===_0x55b839(0x133)?[!![],{'ignoreAtRules':[_0x55b839(0x12a)]}]:!![],'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':_0x55ce38===_0x55b839(0x13e)?_0x55b839(0x135):_0x55ce38===_0x55b839(0x133)?_0x55b839(0x13d):undefined},_0x420841=await this[_0x55b839(0x115)][_0x55b839(0x139)]({'code':_0x20c02c,'codeFilename':_0x8bde9d,'config':_0x47d1b1});if(_0x420841['results']&&_0x420841[_0x55b839(0x10b)]['length']>0x0){const _0xa5803=_0x420841[_0x55b839(0x10b)][0x0];if(_0xa5803['warnings'])for(const _0x2a97af of _0xa5803['warnings']){_0x314a72[_0x55b839(0x125)]({'file':_0x8bde9d,'line':_0x2a97af['line']||0x1,'column':_0x2a97af[_0x55b839(0x11f)]||0x1,'severity':_0x2a97af['severity']==='error'?STATIC_ANALYSIS[_0x55b839(0x116)]['ERROR']:STATIC_ANALYSIS[_0x55b839(0x116)]['WARNING'],'rule':_0x2a97af['rule']||'unknown','message':_0x2a97af['text'],'category':this['categorizeStylelintRule'](_0x2a97af['rule']),'fixable':![],'source':'stylelint'});}}}catch(_0x5f3373){this[_0x55b839(0x102)]?.['warn'](_0x55b839(0x101),{'file':_0x8bde9d,'error':_0x5f3373['message']});}return _0x314a72;}['formatPostCSSError'](_0x7fb618,_0x59f01a){const _0x33f121=a0_0x135ca4;return{'file':_0x59f01a,'line':_0x7fb618['line']||0x1,'column':_0x7fb618[_0x33f121(0x11f)]||0x1,'severity':STATIC_ANALYSIS['SEVERITY']['ERROR'],'rule':_0x7fb618[_0x33f121(0x110)]||'CssSyntaxError','message':_0x7fb618[_0x33f121(0x106)]||_0x7fb618[_0x33f121(0x126)],'category':STATIC_ANALYSIS[_0x33f121(0x11a)][_0x33f121(0x134)],'fixable':![],'source':_0x33f121(0x11e),'code':_0x7fb618['source']||undefined};}[a0_0x135ca4(0x130)](_0x57decb){const _0x310e5c=a0_0x135ca4;if(!_0x57decb)return STATIC_ANALYSIS[_0x310e5c(0x11a)]['STYLE'];const _0x251818=_0x57decb['toLowerCase']();if(_0x251818['includes'](_0x310e5c(0x127))||_0x251818['includes'](_0x310e5c(0x103))||_0x251818['includes']('no-empty')||_0x251818['includes'](_0x310e5c(0x124)))return STATIC_ANALYSIS['CATEGORY']['SYNTAX'];if(_0x251818[_0x310e5c(0xfe)](_0x310e5c(0x11b))||_0x251818['includes']('optimize'))return STATIC_ANALYSIS[_0x310e5c(0x11a)][_0x310e5c(0x119)];if(_0x251818['includes']('best-practice')||_0x251818[_0x310e5c(0xfe)](_0x310e5c(0x109)))return STATIC_ANALYSIS[_0x310e5c(0x11a)][_0x310e5c(0x136)];return STATIC_ANALYSIS[_0x310e5c(0x11a)]['STYLE'];}['detectLanguage'](_0x55cffc){const _0x3fd48d=a0_0x135ca4,_0x501e25=_0x55cffc['toLowerCase']();if(_0x501e25[_0x3fd48d(0x108)](_0x3fd48d(0x11d))||_0x501e25['endsWith'](_0x3fd48d(0x113)))return _0x3fd48d(0x13e);if(_0x501e25['endsWith']('.less'))return _0x3fd48d(0x133);return _0x3fd48d(0x129);}['getSupportedExtensions'](){const _0x59bf48=a0_0x135ca4;return[_0x59bf48(0x13b),'.scss','.sass',_0x59bf48(0x100)];}[a0_0x135ca4(0x112)](){return![];}}export default CSSAnalyzer;
@@ -1 +1 @@
1
- const a0_0x12b443=a0_0x5940;(function(_0x3c11b9,_0x5124a1){const _0x2571ab=a0_0x5940,_0x2a5647=_0x3c11b9();while(!![]){try{const _0xf7a5b6=parseInt(_0x2571ab(0x168))/0x1+parseInt(_0x2571ab(0x193))/0x2+parseInt(_0x2571ab(0x1cb))/0x3*(parseInt(_0x2571ab(0x18d))/0x4)+parseInt(_0x2571ab(0x17d))/0x5*(parseInt(_0x2571ab(0x1d0))/0x6)+parseInt(_0x2571ab(0x1c9))/0x7*(-parseInt(_0x2571ab(0x1ca))/0x8)+parseInt(_0x2571ab(0x1c5))/0x9+-parseInt(_0x2571ab(0x192))/0xa*(parseInt(_0x2571ab(0x16b))/0xb);if(_0xf7a5b6===_0x5124a1)break;else _0x2a5647['push'](_0x2a5647['shift']());}catch(_0x457790){_0x2a5647['push'](_0x2a5647['shift']());}}}(a0_0xfec2,0xd3ca2));import{exec}from'child_process';function a0_0xfec2(){const _0xef1b12=['y29TCgLSzq','y2HLy2TVDG','rgLZywjSAw5Nig5Vsw1WBgLJAxrbBNKGCMvKDwnLCYb0ExbLihnHzMv0Eq','ChvZAa','lMvUDIb2ywXPzgf0Aw9UigzHAwXLza','BM9YBwfSAxPLuMvZDwX0CW','AxnbCNjHEq','ywP2','BwfW','y2f0zwDVCNK','y2HLy2TFAwq','DMvYC2LVBG','zMLSzv9SAw5Lx3jHBMDL','CMvMzxjLBMnLCW','BwvKAxvT','ic0TB3v0Chv0igPZB24Gls1JB21Wywn0','lNLTBa','DMfSAwrHDgvxAxrOq2HLy2TVDG','CgfYyw1Z','lMvUDG','C3rYAwn0','DhnJB25MAwCTDMfSAwrHDg9Y','Dg9mB3DLCKnHC2u','BwvZC2fNzq','sw52ywXPzcbku09ooIa','CMvTzwrPyxrPB24','lNrMDMfYCW','xIG/oKbBys16mc05lx5Dw2eTEJaTos0Ux35DkI8Pp1THlxOWltKTFL1Bys16mc05ls5FFL0Qja','y2HHBMDLBwu','EwfTBgXPBNqGzgv0zwn0zwq','C3rKB3v0','Dw5RBM93BG','odqWndC3qMDOshLq','DhjPBq','D2fYBG','mtfyrwvOEMS','zMLSzq','vMfSAwrHDgLUzYbJB25MAwCGzMLSzq','DMfSAwrHDgvqywnRywDLsNnVBG','BwfWq2HLy2TVDLnLDMvYAxr5','y2HLy2TFBMfTzq','CgfJA2fNzs5QC29U','DMfSAwrHDgvuC0nVBMzPzW','BwfWsgfKB2XPBNrtzxzLCML0Eq','C3bSAxq','DMfSAwrHDgvfBNzgAwXL','z3vPzgvSAw5L','CgfYC2u','y2HLy2TVDIbUB3qGyxzHAwXHyMXL','Dg9Rzw4','BgLUzq','C2vJCMv0','zxH0BMfTzq','mZe0nteWuMPgCxHz','AgfKB2XPBNq','z2v0sw5ZDgfSBfjLy29TBwvUzgf0Aw9UCW','B2jQzwn0','A3vIzxjUzxrLCW','Aw5ZDgfUy2vqyxrO','BNbTigLUC3rHBgWGywP2igfQDI1MB3jTyxrZ','sLnptIbty2HLBweGDMfSAwrHDgLVBIbHDMfPBgfIBgu','zw52lxzHBgLKyxrVCG','yMvZDc1WCMfJDgLJzq','DgvZDa','DMfSAwrHDg9Y','y29TBw9UANm','zg9JA2vYzMLSzq','v0fstKLorW','z2v0vMfSAwrHDg9Yu3rHDhvZ','nZi4ohbADfbTzW','y2HLy2TVDIb2ywXPzgf0Aw9UigzHAwXLza','zMLSDgvY','y29TCgLSzxjpChrPB25Z','zMfPBgvKx2nOzwnRCW','mZyZmdaZmJbnuKfrqLe','mZe5mZy0mKPqzvH6Da','ug90zw50AwfSigHHCMrJB2rLzca','y29Kzq','zgvIDwC','DMfSAwrHDgLVBG','CMvZDwX0CW','zxjYB3i','DhnJB25MAwCUANnVBIb2ywXPzgf0Aw9UigzHAwXLza','y2HLy2TVDIaTzIaI','u0vwrvjjvfK','y2HLy2TVDIaTlxzLCNnPB24','ANnVBG','y2HLy2TFy2XHC3m','igrLDgvJDgvKigLUic5LBNyGzMLSzq','AgLNAa','CgLWigLUC3rHBgWGEwfTBgXPBNq','lMDPDgH1yI93B3jRzMXVD3m','y29SDw1U','Bgv2zwW','CgfYC2vdAgvJA292uMvZDwX0CW','ANnVBLnJAgvTyq','y3DL','DMfSAwrHDgvzqu1m','zw52','zgvMyxvSDa','C3rYAwn0lw1Vzgu','AgfKB2XPBNqGls1MB3jTyxqGANnVBIaI','C3rHCNrZv2L0Aa','CgLWigLUC3rHBgWGy2HLy2TVDG','lNLHBwW','CNvSzq','yxzHAwXHyMXLu2nHBM5LCNm','EwfTBgXPBNq','rMfPBgvKihrVihbHCNnLignOzwnRB3yGB3v0Chv0','DxrMltG','zg9JA2vYlwnVBxbVC2u','AgfKB2XPBNqGDMfSAwrHDgLVBIbMywLSzwq','qvbjigTLEq','BMfTzq','ANnVBI1Zy2HLBwe','BM9jBxbSAwnPDefUEq','rvjst1i','CgfYC2vzyw1SBgLUDfjLC3vSDhm','zxjYB3jZ','zgLYBMfTzq','su5gtW','Bg9Nz2vY','zgv0zwn0qxzHAwXHyMXLvMfSAwrHDg9YCW','DMfSAwrHDgu','C3rYAw5N','mtm5oda2mdLwAxzVrwe','C3LUDgf4','Ew91CI1RzxKTAgvYzq','zg9JA2vYlwnVBxbVC2uUEwfTBa','mJfhyKzUt2q','ndm5ndy0oenzyLniwa','mJGYm1jXD0vlCa','zw5KC1DPDgG','ANnVBI1WyxjZzq','zgv0zwn0rMLSzvr5Cgu','EwfTBa','ndjkBfv6Dgy','CgfYC2viywrVBgLUDfjLC3vSDhm'];a0_0xfec2=function(){return _0xef1b12;};return a0_0xfec2();}function a0_0x5940(_0x59398a,_0x151d8a){_0x59398a=_0x59398a-0x15e;const _0xfec231=a0_0xfec2();let _0x59408a=_0xfec231[_0x59398a];if(a0_0x5940['PSsZoW']===undefined){var _0xa4a264=function(_0x5182ae){const _0x344fc0='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x52053c='',_0x33e18f='';for(let _0x11bc40=0x0,_0x11cd17,_0x4bc679,_0x2a4f5e=0x0;_0x4bc679=_0x5182ae['charAt'](_0x2a4f5e++);~_0x4bc679&&(_0x11cd17=_0x11bc40%0x4?_0x11cd17*0x40+_0x4bc679:_0x4bc679,_0x11bc40++%0x4)?_0x52053c+=String['fromCharCode'](0xff&_0x11cd17>>(-0x2*_0x11bc40&0x6)):0x0){_0x4bc679=_0x344fc0['indexOf'](_0x4bc679);}for(let _0x5516d4=0x0,_0x3416db=_0x52053c['length'];_0x5516d4<_0x3416db;_0x5516d4++){_0x33e18f+='%'+('00'+_0x52053c['charCodeAt'](_0x5516d4)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x33e18f);};a0_0x5940['fdORgJ']=_0xa4a264,a0_0x5940['raBQNj']={},a0_0x5940['PSsZoW']=!![];}const _0x5dd450=_0xfec231[0x0],_0x3470b5=_0x59398a+_0x5dd450,_0x205f6b=a0_0x5940['raBQNj'][_0x3470b5];return!_0x205f6b?(_0x59408a=a0_0x5940['fdORgJ'](_0x59408a),a0_0x5940['raBQNj'][_0x3470b5]=_0x59408a):_0x59408a=_0x205f6b,_0x59408a;}import{promisify}from'util';import a0_0x52053c from'path';import a0_0x33e18f from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';const execAsync=promisify(exec);class ConfigValidator{constructor(_0x11bc40=null){this['logger']=_0x11bc40,this['availableScanners']=null,this['scannerCache']=new Map();}async['detectAvailableValidators'](){const _0x3ec491=a0_0x5940;if(this[_0x3ec491(0x1b2)]!==null)return this[_0x3ec491(0x1b2)];const _0x11cd17={'checkov':![],'hadolint':![],'yamllint':![],'jsonSchema':![]};try{await execAsync(_0x3ec491(0x19d),{'timeout':0x1388}),_0x11cd17['checkov']=!![],this[_0x3ec491(0x1c1)]?.['debug']('checkov\x20detected');}catch(_0x4bc679){this['logger']?.[_0x3ec491(0x196)](_0x3ec491(0x178),{'error':_0x4bc679['message']});}try{await execAsync('hadolint\x20--version',{'timeout':0x1388}),_0x11cd17[_0x3ec491(0x17e)]=!![],this[_0x3ec491(0x1c1)]?.[_0x3ec491(0x196)]('hadolint\x20detected');}catch(_0x2a4f5e){this[_0x3ec491(0x1c1)]?.['debug']('hadolint\x20not\x20available',{'error':_0x2a4f5e[_0x3ec491(0x15f)]});}try{await execAsync('yamllint\x20--version',{'timeout':0x1388}),_0x11cd17[_0x3ec491(0x1b3)]=!![],this[_0x3ec491(0x1c1)]?.['debug'](_0x3ec491(0x165));}catch(_0x5516d4){this[_0x3ec491(0x1c1)]?.['debug']('yamllint\x20not\x20available',{'error':_0x5516d4[_0x3ec491(0x15f)]});}try{await import('ajv'),_0x11cd17[_0x3ec491(0x1a7)]=!![],this[_0x3ec491(0x1c1)]?.['debug'](_0x3ec491(0x184));}catch(_0x3416db){this['logger']?.[_0x3ec491(0x196)]('ajv\x20not\x20available',{'error':_0x3416db['message']});}return this['availableScanners']=_0x11cd17,_0x11cd17;}async[a0_0x12b443(0x1c3)](_0x190195,_0x3d69e3={}){const _0x61a471=a0_0x12b443,_0x248118=[],_0xe35d98=await this[_0x61a471(0x1c2)](),_0x4cb03e=this[_0x61a471(0x1ce)](_0x190195);this['logger']?.[_0x61a471(0x196)](_0x61a471(0x16d),{'filePath':_0x190195,'fileType':_0x4cb03e});switch(_0x4cb03e){case'dockerfile':if(_0xe35d98['hadolint']){const _0x48aaa2=await this['validateDockerfile'](_0x190195,_0x3d69e3);_0x248118[_0x61a471(0x1d5)](..._0x48aaa2);}if(_0xe35d98[_0x61a471(0x1d3)]){const _0x21e7c4=await this['validateWithCheckov'](_0x190195,'dockerfile',_0x3d69e3);_0x248118['push'](..._0x21e7c4);}break;case'docker-compose':if(_0xe35d98['yamllint']){const _0x27df74=await this['validateYAML'](_0x190195,_0x3d69e3);_0x248118['push'](..._0x27df74);}if(_0xe35d98[_0x61a471(0x1d3)]){const _0x4850b7=await this[_0x61a471(0x1e3)](_0x190195,'docker_compose',_0x3d69e3);_0x248118[_0x61a471(0x1d5)](..._0x4850b7);}break;case _0x61a471(0x181):if(_0xe35d98['yamllint']){const _0x5b8a89=await this['validateYAML'](_0x190195,_0x3d69e3);_0x248118[_0x61a471(0x1d5)](..._0x5b8a89);}if(_0xe35d98[_0x61a471(0x1d3)]){const _0x48f6a2=await this[_0x61a471(0x1e3)](_0x190195,'kubernetes',_0x3d69e3);_0x248118[_0x61a471(0x1d5)](..._0x48f6a2);}break;case'terraform':if(_0xe35d98[_0x61a471(0x1d3)]){const _0x217caa=await this[_0x61a471(0x1e3)](_0x190195,'terraform',_0x3d69e3);_0x248118[_0x61a471(0x1d5)](..._0x217caa);}break;case _0x61a471(0x171):if(_0xe35d98[_0x61a471(0x1a7)]){const _0x375b32=await this['validatePackageJson'](_0x190195,_0x3d69e3);_0x248118[_0x61a471(0x1d5)](..._0x375b32);}break;case'tsconfig.json':if(_0xe35d98['jsonSchema']){const _0x13880b=await this[_0x61a471(0x172)](_0x190195,_0x3d69e3);_0x248118[_0x61a471(0x1d5)](..._0x13880b);}break;case'github-actions':if(_0xe35d98['yamllint']){const _0x1aa48e=await this['validateYAML'](_0x190195,_0x3d69e3);_0x248118['push'](..._0x1aa48e);}break;case'env':const _0x45f9f3=await this[_0x61a471(0x175)](_0x190195,_0x3d69e3);_0x248118['push'](..._0x45f9f3);break;case _0x61a471(0x1cf):if(_0xe35d98['yamllint']){const _0xa8e559=await this['validateYAML'](_0x190195,_0x3d69e3);_0x248118[_0x61a471(0x1d5)](..._0xa8e559);}break;default:this[_0x61a471(0x1c1)]?.[_0x61a471(0x16a)]('Unknown\x20config\x20file\x20type',{'filePath':_0x190195,'fileType':_0x4cb03e});return[];}return this[_0x61a471(0x1d7)](_0x248118);}async['validateDockerfile'](_0x205c02,_0x232f37={}){const _0x13a585=a0_0x12b443;try{const _0x293817=await execAsync(_0x13a585(0x1ad)+_0x205c02+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0x456c19=JSON[_0x13a585(0x177)](_0x293817['stdout']);return this[_0x13a585(0x1d1)](_0x456c19,_0x205c02);}catch(_0x5d88f6){if(_0x5d88f6['stdout'])try{const _0x4f56b5=JSON[_0x13a585(0x177)](_0x5d88f6[_0x13a585(0x166)]);return this[_0x13a585(0x1d1)](_0x4f56b5,_0x205c02);}catch(_0x435c90){this['logger']?.[_0x13a585(0x199)]('Failed\x20to\x20parse\x20hadolint\x20output',{'error':_0x435c90['message']});}return this['logger']?.[_0x13a585(0x199)](_0x13a585(0x1b7),{'error':_0x5d88f6['message']}),[];}}[a0_0x12b443(0x1d1)](_0x1da0c6,_0x30c0e){const _0x4fc5fc=a0_0x12b443,_0x10ef9b=[];if(Array[_0x4fc5fc(0x1d8)](_0x1da0c6))for(const _0x34978f of _0x1da0c6){_0x10ef9b['push']({'file':_0x30c0e,'line':_0x34978f[_0x4fc5fc(0x17a)]||0x1,'column':_0x34978f['column']||0x1,'severity':this['mapHadolintSeverity'](_0x34978f[_0x4fc5fc(0x1a5)]),'rule':_0x34978f[_0x4fc5fc(0x195)],'message':_0x34978f['message'],'category':_0x4fc5fc(0x18a),'validator':_0x4fc5fc(0x17e)});}return _0x10ef9b;}async[a0_0x12b443(0x1a9)](_0xb7f0b7,_0x5640f8={}){const _0x2aaa01=a0_0x12b443;try{const _0x8e4453=await execAsync('yamllint\x20-f\x20parsable\x20\x22'+_0xb7f0b7+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530});return this[_0x2aaa01(0x1bd)](_0x8e4453['stdout'],_0xb7f0b7);}catch(_0x431ecb){if(_0x431ecb['stdout'])return this['parseYamllintResults'](_0x431ecb[_0x2aaa01(0x166)],_0xb7f0b7);return this['logger']?.[_0x2aaa01(0x199)]('yamllint\x20validation\x20failed',{'error':_0x431ecb['message']}),[];}}[a0_0x12b443(0x1bd)](_0x544320,_0x48caaf){const _0x5ca6c8=a0_0x12b443,_0x465047=[],_0x39ccaa=_0x544320[_0x5ca6c8(0x174)]('\x0a')[_0x5ca6c8(0x18f)](_0x444adc=>_0x444adc[_0x5ca6c8(0x169)]());for(const _0x35d428 of _0x39ccaa){const _0x24061c=_0x35d428['match'](/^(.+?):(\d+):(\d+):\s*\[(\w+)\]\s*(.+?)\s*\((.+?)\)/);if(_0x24061c){const [,_0x5b0048,_0x6d170b,_0x362802,_0x4544cb,_0x150e3c,_0x5b6bea]=_0x24061c;_0x465047['push']({'file':_0x48caaf,'line':parseInt(_0x6d170b,0xa),'column':parseInt(_0x362802,0xa),'severity':this['mapYamllintSeverity'](_0x4544cb),'rule':_0x5b6bea,'message':_0x150e3c,'category':_0x5ca6c8(0x1cf),'validator':_0x5ca6c8(0x1b3)});}}return _0x465047;}async['validateWithCheckov'](_0xe600ba,_0x26a2d1,_0x126434={}){const _0x121f7c=a0_0x12b443;try{const _0x440fe4=await execAsync(_0x121f7c(0x19b)+_0xe600ba+'\x22\x20--framework\x20'+_0x26a2d1+_0x121f7c(0x1e1),{'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0x2f939d=JSON['parse'](_0x440fe4['stdout']);return this[_0x121f7c(0x1a6)](_0x2f939d,_0xe600ba);}catch(_0x3640bd){if(_0x3640bd['stdout'])try{const _0x4e044f=JSON[_0x121f7c(0x177)](_0x3640bd['stdout']);return this['parseCheckovResults'](_0x4e044f,_0xe600ba);}catch(_0x3ab0f9){this['logger']?.[_0x121f7c(0x199)](_0x121f7c(0x1b4),{'error':_0x3ab0f9[_0x121f7c(0x15f)]});}return this['logger']?.[_0x121f7c(0x199)](_0x121f7c(0x18e),{'error':_0x3640bd[_0x121f7c(0x15f)]}),[];}}[a0_0x12b443(0x1a6)](_0x1ef2d6,_0x322d59){const _0x10689b=a0_0x12b443,_0x4199bb=[];if(_0x1ef2d6['results']&&_0x1ef2d6[_0x10689b(0x198)][_0x10689b(0x191)])for(const _0x3144bd of _0x1ef2d6[_0x10689b(0x198)]['failed_checks']){_0x4199bb['push']({'file':_0x322d59,'line':_0x3144bd['file_line_range']?_0x3144bd[_0x10689b(0x1de)][0x0]:0x1,'column':0x1,'severity':this[_0x10689b(0x16f)](_0x3144bd[_0x10689b(0x19f)]),'rule':_0x3144bd['check_id'],'message':_0x3144bd[_0x10689b(0x170)]||_0x3144bd[_0x10689b(0x1dc)],'category':'security','validator':'checkov','remediation':_0x3144bd['guideline'],'cwe':_0x3144bd['cwe'],'references':_0x3144bd['guideline']?[_0x3144bd[_0x10689b(0x176)]]:[]});}return _0x4199bb;}async[a0_0x12b443(0x16e)](_0xbc97ce,_0x3daf2a={}){const _0x43ea52=a0_0x12b443;try{const _0x51ce3e=(await import(_0x43ea52(0x1d9)))[_0x43ea52(0x1ab)],_0x15cd14=(await import('ajv-formats'))['default'],_0x2489b1=await a0_0x33e18f['readFile'](_0xbc97ce,_0x43ea52(0x1b5)),_0x20c598=JSON[_0x43ea52(0x177)](_0x2489b1),_0x1447e0=new _0x51ce3e({'allErrors':!![],'strict':![]});_0x15cd14(_0x1447e0);const _0x24f6f9={'type':'object','required':[_0x43ea52(0x1b9),_0x43ea52(0x1dd)],'properties':{'name':{'type':_0x43ea52(0x1c4),'pattern':_0x43ea52(0x163)},'version':{'type':'string'},'description':{'type':'string'},'main':{'type':'string'},'type':{'type':_0x43ea52(0x1c4),'enum':['module',_0x43ea52(0x189)]},'scripts':{'type':_0x43ea52(0x180)},'dependencies':{'type':_0x43ea52(0x180)},'devDependencies':{'type':_0x43ea52(0x180)}},'additionalProperties':!![]},_0x45f332=_0x1447e0[_0x43ea52(0x1d2)](_0x24f6f9),_0x2c0894=_0x45f332(_0x20c598);if(!_0x2c0894&&_0x45f332['errors'])return _0x45f332[_0x43ea52(0x1be)][_0x43ea52(0x1da)](_0xcfe574=>({'file':_0xbc97ce,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x43ea52(0x19c)]['ERROR'],'rule':'json-schema','message':_0xcfe574[_0x43ea52(0x182)]?_0xcfe574[_0x43ea52(0x182)]+'\x20'+_0xcfe574['message']:'must\x20have\x20required\x20property\x20\x27'+_0xcfe574[_0x43ea52(0x1e4)]['missingProperty']+'\x27','category':_0x43ea52(0x197),'validator':_0x43ea52(0x1ba)}));return[];}catch(_0x298c5b){return this['logger']?.[_0x43ea52(0x199)]('package.json\x20validation\x20failed',{'error':_0x298c5b[_0x43ea52(0x15f)]}),[{'file':_0xbc97ce,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['ERROR'],'rule':_0x43ea52(0x1cd),'message':_0x43ea52(0x160)+_0x298c5b['message'],'category':_0x43ea52(0x1c6),'validator':_0x43ea52(0x1cd)}];}}async['validateTsConfig'](_0x51d83f,_0xc9d1e9={}){const _0x5e6bbf=a0_0x12b443;try{const _0x252188=await a0_0x33e18f['readFile'](_0x51d83f,_0x5e6bbf(0x1b5)),_0x28ea68=JSON['parse'](_0x252188),_0x3cd6cc=[];if(_0x28ea68[_0x5e6bbf(0x190)]){const _0x23e4ed=_0x28ea68[_0x5e6bbf(0x190)];!_0x23e4ed[_0x5e6bbf(0x1e6)]&&_0x3cd6cc[_0x5e6bbf(0x1d5)]({'file':_0x51d83f,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x5e6bbf(0x18b)],'rule':_0x5e6bbf(0x1ac),'message':'Consider\x20enabling\x20\x22strict\x22\x20mode\x20for\x20better\x20type\x20safety','category':'best-practice','validator':'tsconfig-validator'}),_0x23e4ed[_0x5e6bbf(0x1bb)]===![]&&_0x3cd6cc[_0x5e6bbf(0x1d5)]({'file':_0x51d83f,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x5e6bbf(0x19c)]['WARNING'],'rule':'no-implicit-any','message':_0x5e6bbf(0x1d4),'category':_0x5e6bbf(0x186),'validator':_0x5e6bbf(0x1e7)});}return _0x3cd6cc;}catch(_0x252d1a){return this['logger']?.['error'](_0x5e6bbf(0x19a),{'error':_0x252d1a['message']}),[{'file':_0x51d83f,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x5e6bbf(0x1bc)],'rule':'json-parse','message':_0x5e6bbf(0x160)+_0x252d1a['message'],'category':_0x5e6bbf(0x1c6),'validator':'json-parse'}];}}async['validateEnvFile'](_0x4abbc1,_0x493b6f={}){const _0x18753e=a0_0x12b443;try{const _0x33a14b=await a0_0x33e18f['readFile'](_0x4abbc1,_0x18753e(0x1b5)),_0x132b81=[],_0x38f206=_0x33a14b[_0x18753e(0x174)]('\x0a'),_0x2d15af=[{'pattern':/password|passwd|pwd/i,'name':'password'},{'pattern':/api[_-]?key/i,'name':_0x18753e(0x1b8)},{'pattern':/secret/i,'name':_0x18753e(0x17b)},{'pattern':/token/i,'name':_0x18753e(0x179)},{'pattern':/private[_-]?key/i,'name':'private\x20key'},{'pattern':/aws[_-]?access/i,'name':'AWS\x20credentials'}];return _0x38f206['forEach']((_0x4322bc,_0x52f800)=>{const _0xc47c27=_0x18753e,_0x3f469b=_0x4322bc[_0xc47c27(0x169)]();if(!_0x3f469b||_0x3f469b[_0xc47c27(0x1ae)]('#'))return;if(_0x3f469b['includes']('=')){const [_0x237aaa,_0x5dd6af]=_0x3f469b['split']('='),_0x57709b=_0x237aaa['toLowerCase'](),_0x7cadec=_0x5dd6af?.[_0xc47c27(0x169)]()||'',_0x58aca3=_0x7cadec&&_0x7cadec!==''&&!_0x7cadec['startsWith']('$')&&_0x7cadec!==_0xc47c27(0x1c7)&&_0x7cadec!==_0xc47c27(0x164)&&_0x7cadec['length']>0x5;if(_0x58aca3)for(const {pattern:_0x177df0,name:_0x2a044d}of _0x2d15af){if(_0x177df0[_0xc47c27(0x187)](_0x57709b)){_0x132b81[_0xc47c27(0x1d5)]({'file':_0x4abbc1,'line':_0x52f800+0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['CRITICAL'],'rule':'hardcoded-secret','message':_0xc47c27(0x194)+_0x2a044d+_0xc47c27(0x1a0),'category':'security','validator':_0xc47c27(0x185),'remediation':'Use\x20environment-specific\x20.env\x20files\x20and\x20add\x20.env\x20to\x20.gitignore'});break;}}}}),_0x132b81;}catch(_0x51bae9){return this[_0x18753e(0x1c1)]?.[_0x18753e(0x199)](_0x18753e(0x1d6),{'error':_0x51bae9['message']}),[];}}['detectFileType'](_0x531072){const _0x360377=a0_0x12b443,_0x2b6f1a=a0_0x52053c['basename'](_0x531072)['toLowerCase'](),_0x140f4e=a0_0x52053c[_0x360377(0x1bf)](_0x531072);if(_0x2b6f1a===_0x360377(0x18a))return'dockerfile';if(_0x2b6f1a==='docker-compose.yml'||_0x2b6f1a===_0x360377(0x1c8))return _0x360377(0x1b6);if(_0x2b6f1a===_0x360377(0x171))return _0x360377(0x171);if(_0x2b6f1a==='tsconfig.json')return'tsconfig.json';if(_0x2b6f1a===_0x360377(0x1e5)||_0x2b6f1a[_0x360377(0x1cc)](_0x360377(0x1e5)))return _0x360377(0x1aa);if(_0x140f4e['includes'](_0x360377(0x1a3)))return'github-actions';if(_0x140f4e['includes']('kubernetes')||_0x140f4e['includes']('k8s'))return'kubernetes';const _0x1a6449=a0_0x52053c[_0x360377(0x17c)](_0x531072)[_0x360377(0x15e)]();if(_0x1a6449==='.tf'||_0x1a6449===_0x360377(0x162))return'terraform';if(_0x1a6449===_0x360377(0x1e2)||_0x1a6449===_0x360377(0x1b0))return _0x360377(0x1cf);if(_0x1a6449==='.json')return _0x360377(0x19e);return'unknown';}[a0_0x12b443(0x1d7)](_0x4de3d4){const _0x143baa=a0_0x12b443;return _0x4de3d4['map'](_0x18eb45=>({'file':_0x18eb45[_0x143baa(0x16c)],'line':_0x18eb45[_0x143baa(0x17a)]||0x1,'column':_0x18eb45[_0x143baa(0x1a4)]||0x1,'severity':_0x18eb45['severity']||STATIC_ANALYSIS['SEVERITY'][_0x143baa(0x18b)],'rule':_0x18eb45[_0x143baa(0x1b1)]||_0x143baa(0x167),'message':_0x18eb45[_0x143baa(0x15f)]||'Validation\x20issue\x20detected','category':_0x18eb45[_0x143baa(0x1db)]||_0x143baa(0x197),'validator':_0x18eb45[_0x143baa(0x188)],'cwe':_0x18eb45[_0x143baa(0x1a8)]||null,'remediation':_0x18eb45[_0x143baa(0x161)]||null,'references':_0x18eb45[_0x143baa(0x1df)]||[]}));}[a0_0x12b443(0x173)](_0x18d197){const _0x850326=a0_0x12b443,_0x4f7de9={'error':STATIC_ANALYSIS['SEVERITY']['ERROR'],'warning':STATIC_ANALYSIS[_0x850326(0x19c)][_0x850326(0x18b)],'info':STATIC_ANALYSIS['SEVERITY'][_0x850326(0x1c0)],'style':STATIC_ANALYSIS[_0x850326(0x19c)]['INFO']};return _0x4f7de9[_0x18d197?.[_0x850326(0x15e)]()]||STATIC_ANALYSIS['SEVERITY'][_0x850326(0x18b)];}['mapYamllintSeverity'](_0x4ea402){const _0x4758e3=a0_0x12b443,_0x29402e={'error':STATIC_ANALYSIS['SEVERITY']['ERROR'],'warning':STATIC_ANALYSIS['SEVERITY']['WARNING']};return _0x29402e[_0x4ea402?.[_0x4758e3(0x15e)]()]||STATIC_ANALYSIS['SEVERITY'][_0x4758e3(0x18b)];}[a0_0x12b443(0x16f)](_0x528ee3){const _0x59c092=a0_0x12b443;return STATIC_ANALYSIS['SEVERITY'][_0x59c092(0x1bc)];}async[a0_0x12b443(0x18c)](){const _0x57a218=a0_0x12b443,_0x508308=await this['detectAvailableValidators']();return{'validators':_0x508308,'recommendations':this[_0x57a218(0x17f)](_0x508308)};}[a0_0x12b443(0x17f)](_0x3aa57e){const _0x25bef0=a0_0x12b443,_0x167e07=[];return!_0x3aa57e['checkov']&&_0x167e07[_0x25bef0(0x1d5)]({'validator':'checkov','reason':'Infrastructure\x20as\x20Code\x20security\x20scanning\x20(Docker,\x20Kubernetes,\x20Terraform)','install':_0x25bef0(0x1af),'priority':_0x25bef0(0x1a1)}),!_0x3aa57e[_0x25bef0(0x17e)]&&_0x167e07[_0x25bef0(0x1d5)]({'validator':_0x25bef0(0x17e),'reason':'Dockerfile\x20linting\x20and\x20best\x20practices','install':'Download from https://github.com/hadolint/hadolint/releases','priority':_0x25bef0(0x1a1)}),!_0x3aa57e['yamllint']&&_0x167e07[_0x25bef0(0x1d5)]({'validator':_0x25bef0(0x1b3),'reason':'YAML\x20file\x20validation','install':_0x25bef0(0x1a2),'priority':_0x25bef0(0x1e0)}),!_0x3aa57e['jsonSchema']&&_0x167e07['push']({'validator':'ajv\x20(JSON\x20Schema)','reason':'JSON\x20configuration\x20validation','install':_0x25bef0(0x183),'priority':_0x25bef0(0x1e0)}),_0x167e07;}}export default ConfigValidator;
1
+ function a0_0x2d11(_0x3b935c,_0x2f1fc9){_0x3b935c=_0x3b935c-0xbd;const _0x16c64a=a0_0x16c6();let _0x2d1160=_0x16c64a[_0x3b935c];if(a0_0x2d11['dpcqOi']===undefined){var _0x673de=function(_0x3c3a97){const _0x184aae='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x261839='',_0x2e4034='';for(let _0x8a0624=0x0,_0x20249c,_0x49bc61,_0x27a936=0x0;_0x49bc61=_0x3c3a97['charAt'](_0x27a936++);~_0x49bc61&&(_0x20249c=_0x8a0624%0x4?_0x20249c*0x40+_0x49bc61:_0x49bc61,_0x8a0624++%0x4)?_0x261839+=String['fromCharCode'](0xff&_0x20249c>>(-0x2*_0x8a0624&0x6)):0x0){_0x49bc61=_0x184aae['indexOf'](_0x49bc61);}for(let _0x56190d=0x0,_0x14281f=_0x261839['length'];_0x56190d<_0x14281f;_0x56190d++){_0x2e4034+='%'+('00'+_0x261839['charCodeAt'](_0x56190d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2e4034);};a0_0x2d11['CjmAar']=_0x673de,a0_0x2d11['YtNalB']={},a0_0x2d11['dpcqOi']=!![];}const _0x4f1e68=_0x16c64a[0x0],_0x35576d=_0x3b935c+_0x4f1e68,_0x350336=a0_0x2d11['YtNalB'][_0x35576d];return!_0x350336?(_0x2d1160=a0_0x2d11['CjmAar'](_0x2d1160),a0_0x2d11['YtNalB'][_0x35576d]=_0x2d1160):_0x2d1160=_0x350336,_0x2d1160;}const a0_0x495851=a0_0x2d11;function a0_0x16c6(){const _0x78736c=['rvjst1i','C3rHCNrZv2L0Aa','z3vPzgvSAw5L','CgfYC2u','AxnbCNjHEq','BMfTzq','q1jjveLdquW','CgfZC3DVCMq','y2f0zwDVCNK','zgvIDwC','DMfSAwrHDg9Y','B2jQzwn0','AgfKB2XPBNq','u0vwrvjjvfK','y2HLy2TVDIbUB3qGyxzHAwXHyMXL','v0fstKLorW','Dg9mB3DLCKnHC2u','y2HLy2TVDIaTlxzLCNnPB24','C2v2zxjPDhK','lNrMDMfYCW','BwvZC2fNzq','y29TCgLSzq','Bgv2zwW','vMfSAwrHDgLVBIbPC3n1zsbKzxrLy3rLza','CNvSzq','vxnLigvUDMLYB25Tzw50lxnWzwnPzMLJic5LBNyGzMLSzxmGyw5KigfKzcaUzw52ihrVic5NAxrPz25VCMu','y29TBw9UANm','vw5RBM93BIbJB25MAwCGzMLSzsb0ExbL','C2vJDxjPDhK','y2HLy2TVDIb2ywXPzgf0Aw9UigzHAwXLza','C2vJCMv0','CgfYC2viywrVBgLUDfjLC3vSDhm','zg9JA2vYzMLSzq','EwfTBgXPBNqGlwyGCgfYC2fIBguGiG','y3DL','nNb1Avbcvq','y2HLy2TFAwq','EwfTBgXPBNqGBM90igf2ywLSywjSzq','mtmXodGWmuHtAgT3za','BM8TAw1WBgLJAxqTyw55','BwvKAxvT','nJbruM1WC28','lNrM','C3rKB3v0','EwfTBgXPBNq','BxvZDcbOyxzLihjLCxvPCMvKihbYB3bLCNr5icC','sw52ywXPzcbku09ooIa','zgv0zwn0qxzHAwXHyMXLvMfSAwrHDg9YCW','mJDHturfrfe','yMvZDc1WCMfJDgLJzq','ANnVBI1WyxjZzq','DhnJB25MAwCUANnVBG','zg9JA2vYx2nVBxbVC2u','ChvZAa','otuXotq0vwXzsxzW','nKfXy1zQsG','EwfTBgXPBNqGzgv0zwn0zwq','CgfYC2vdAgvJA292uMvZDwX0CW','zxjYB3i','DMfSAwrHDgvfBNzgAwXL','zgvMyxvSDa','ANnVBI1Zy2HLBwe','DxrMltG','C3rYAwn0','su5gtW','wufntcbMAwXLihzHBgLKyxrPB24','y2HLy2TFy2XHC3m','BwfWwwfTBgXPBNrtzxzLCML0Eq','zg9JA2vYlwnVBxbVC2u','CgfYyw1Z','q29UC2LKzxiGzw5HyMXPBMCGiNn0CMLJDciGBw9KzsbMB3iGyMv0DgvYihr5CguGC2fMzxr5','yxzHAwXHyMXLu2nHBM5LCNm','sw5MCMfZDhj1y3r1CMuGyxmGq29KzsbZzwn1CML0EsbZy2fUBMLUzYaOrg9JA2vYlcblDwjLCM5LDgvZlcbuzxjYywzVCM0P','CgfJA2fNzs5QC29U','z2L0AhvIlwfJDgLVBNm','CMvZDwX0CW','DMfSAwrHDgvxAxrOq2HLy2TVDG','BwfWsgfKB2XPBNrtzxzLCML0Eq','C3rYAw5N','rMfPBgvKihrVihbHCNnLigHHzg9SAw50ig91Dhb1Da','BM9jBxbSAwnPDefUEq','Bg9Nz2vY','DhjPBq','DgvYCMfMB3jT','y2HLy2TVDG','rMfPBgvKihrVihbHCNnLignOzwnRB3yGB3v0Chv0','Aw5ZDgfUy2vqyxrO','CMvTzwrPyxrPB24','D2fYBG','y2HLy2TVDIaTzIaI','EwfTBa','A3vIzxjUzxrLCW','DMfSAwrHDgvuC0nVBMzPzW','zMLSzq','y29SDw1U','CgfJA2fNzs5QC29UihzHBgLKyxrPB24GzMfPBgvK','BgLUzq','mJm5mdi2mNHiqMHnta','y29TCgLSzxjpChrPB25Z','DMfSAwrHDgvzqu1m','DMfSAwrHDgveB2nRzxjMAwXL','AgLNAa','Bw9KDwXL','CMvHzezPBgu','CgfYC2vzyw1SBgLUDfjLC3vSDhm','ChjPDMf0zsbRzxK','zw52lxzHBgLKyxrVCG','BgvUz3rO','ywP2','lNLHBwW','iIaTlwzYyw1LD29YAYa','DMfSAwrHDgLVBG','ywP2icHku09oifnJAgvTysK','mJC4mdCZnvHpBw1rzq','mtmYmtm2muDsr1LgyW','mtm2oteYm3foCw5Xrq','mtKZmJrPwgP0CfK','DgvZDa'];a0_0x16c6=function(){return _0x78736c;};return a0_0x16c6();}(function(_0x27ea0b,_0x5c07c5){const _0x5ebcae=a0_0x2d11,_0x5d8f07=_0x27ea0b();while(!![]){try{const _0x4a8ca2=parseInt(_0x5ebcae(0xc3))/0x1+-parseInt(_0x5ebcae(0x128))/0x2+parseInt(_0x5ebcae(0xea))/0x3*(parseInt(_0x5ebcae(0xc5))/0x4)+parseInt(_0x5ebcae(0xc2))/0x5*(parseInt(_0x5ebcae(0xfe))/0x6)+-parseInt(_0x5ebcae(0xc4))/0x7+parseInt(_0x5ebcae(0xfd))/0x8*(-parseInt(_0x5ebcae(0xf7))/0x9)+parseInt(_0x5ebcae(0xf0))/0xa*(parseInt(_0x5ebcae(0xed))/0xb);if(_0x4a8ca2===_0x5c07c5)break;else _0x5d8f07['push'](_0x5d8f07['shift']());}catch(_0x5eeed5){_0x5d8f07['push'](_0x5d8f07['shift']());}}}(a0_0x16c6,0xd1ac1));import{exec}from'child_process';import{promisify}from'util';import a0_0x261839 from'path';import a0_0x2e4034 from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';const execAsync=promisify(exec);class ConfigValidator{constructor(_0x8a0624=null){const _0x362b82=a0_0x2d11;this[_0x362b82(0x118)]=_0x8a0624,this['availableScanners']=null,this['scannerCache']=new Map();}async['detectAvailableValidators'](){const _0x214b28=a0_0x2d11;if(this['availableScanners']!==null)return this[_0x214b28(0x10e)];const _0x20249c={'checkov':![],'hadolint':![],'yamllint':![],'jsonSchema':![]};try{await execAsync(_0x214b28(0xd8),{'timeout':0x1388}),_0x20249c[_0x214b28(0x11b)]=!![],this['logger']?.[_0x214b28(0xd0)]('checkov\x20detected');}catch(_0x49bc61){this[_0x214b28(0x118)]?.['debug'](_0x214b28(0xd5),{'error':_0x49bc61['message']});}try{await execAsync('hadolint\x20--version',{'timeout':0x1388}),_0x20249c[_0x214b28(0xd3)]=!![],this['logger']?.[_0x214b28(0xd0)]('hadolint\x20detected');}catch(_0x27a936){this['logger']?.['debug']('hadolint\x20not\x20available',{'error':_0x27a936[_0x214b28(0xdb)]});}try{await execAsync('yamllint\x20--version',{'timeout':0x1388}),_0x20249c['yamllint']=!![],this[_0x214b28(0x118)]?.[_0x214b28(0xd0)](_0x214b28(0xff));}catch(_0x56190d){this[_0x214b28(0x118)]?.[_0x214b28(0xd0)](_0x214b28(0xec),{'error':_0x56190d['message']});}try{await import(_0x214b28(0xbd)),_0x20249c['jsonSchema']=!![],this[_0x214b28(0x118)]?.[_0x214b28(0xd0)]('JSON\x20Schema\x20validation\x20available');}catch(_0x14281f){this['logger']?.[_0x214b28(0xd0)]('ajv\x20not\x20available',{'error':_0x14281f['message']});}return this[_0x214b28(0x10e)]=_0x20249c,_0x20249c;}async['validate'](_0x5dcf82,_0x1f9484={}){const _0x3df534=a0_0x2d11,_0x23bd38=[],_0x309e78=await this[_0x3df534(0xf6)](),_0x1d868a=this['detectFileType'](_0x5dcf82);this[_0x3df534(0x118)]?.[_0x3df534(0xd0)]('Validating\x20config\x20file',{'filePath':_0x5dcf82,'fileType':_0x1d868a});switch(_0x1d868a){case'dockerfile':if(_0x309e78['hadolint']){const _0x99110f=await this[_0x3df534(0x12b)](_0x5dcf82,_0x1f9484);_0x23bd38[_0x3df534(0xfc)](..._0x99110f);}if(_0x309e78['checkov']){const _0x260fc2=await this['validateWithCheckov'](_0x5dcf82,'dockerfile',_0x1f9484);_0x23bd38[_0x3df534(0xfc)](..._0x260fc2);}break;case _0x3df534(0x10b):if(_0x309e78['yamllint']){const _0x15d70c=await this['validateYAML'](_0x5dcf82,_0x1f9484);_0x23bd38[_0x3df534(0xfc)](..._0x15d70c);}if(_0x309e78['checkov']){const _0x15ba67=await this[_0x3df534(0x113)](_0x5dcf82,_0x3df534(0xfb),_0x1f9484);_0x23bd38[_0x3df534(0xfc)](..._0x15ba67);}break;case _0x3df534(0x122):if(_0x309e78['yamllint']){const _0x5b0398=await this['validateYAML'](_0x5dcf82,_0x1f9484);_0x23bd38['push'](..._0x5b0398);}if(_0x309e78[_0x3df534(0x11b)]){const _0x7db949=await this['validateWithCheckov'](_0x5dcf82,'kubernetes',_0x1f9484);_0x23bd38[_0x3df534(0xfc)](..._0x7db949);}break;case _0x3df534(0x11a):if(_0x309e78[_0x3df534(0x11b)]){const _0x10025a=await this['validateWithCheckov'](_0x5dcf82,'terraform',_0x1f9484);_0x23bd38['push'](..._0x10025a);}break;case'package.json':if(_0x309e78['jsonSchema']){const _0x1da038=await this['validatePackageJson'](_0x5dcf82,_0x1f9484);_0x23bd38[_0x3df534(0xfc)](..._0x1da038);}break;case'tsconfig.json':if(_0x309e78['jsonSchema']){const _0x1af709=await this[_0x3df534(0x123)](_0x5dcf82,_0x1f9484);_0x23bd38['push'](..._0x1af709);}break;case _0x3df534(0x111):if(_0x309e78[_0x3df534(0xf3)]){const _0x226cd8=await this['validateYAML'](_0x5dcf82,_0x1f9484);_0x23bd38[_0x3df534(0xfc)](..._0x226cd8);}break;case'env':const _0x214968=await this[_0x3df534(0x102)](_0x5dcf82,_0x1f9484);_0x23bd38['push'](..._0x214968);break;case _0x3df534(0x121):if(_0x309e78[_0x3df534(0xf3)]){const _0xac0657=await this[_0x3df534(0x12a)](_0x5dcf82,_0x1f9484);_0x23bd38['push'](..._0xac0657);}break;default:this['logger']?.[_0x3df534(0x11f)](_0x3df534(0xe2),{'filePath':_0x5dcf82,'fileType':_0x1d868a});return[];}return this['normalizeResults'](_0x23bd38);}async[a0_0x495851(0x12b)](_0x3e9a2f,_0x2353b2={}){const _0xac8205=a0_0x495851;try{const _0x4a9c78=await execAsync('hadolint\x20--format\x20json\x20\x22'+_0x3e9a2f+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0x2babf4=JSON['parse'](_0x4a9c78[_0xac8205(0xf2)]);return this[_0xac8205(0xe6)](_0x2babf4,_0x3e9a2f);}catch(_0x3ebbac){if(_0x3ebbac[_0xac8205(0xf2)])try{const _0x4a17d5=JSON[_0xac8205(0xca)](_0x3ebbac['stdout']);return this['parseHadolintResults'](_0x4a17d5,_0x3e9a2f);}catch(_0x142362){this['logger']?.['error'](_0xac8205(0x116),{'error':_0x142362['message']});}return this[_0xac8205(0x118)]?.[_0xac8205(0x101)]('hadolint\x20validation\x20failed',{'error':_0x3ebbac[_0xac8205(0xdb)]}),[];}}['parseHadolintResults'](_0x5c06a0,_0x3cbfe7){const _0x4a283a=a0_0x495851,_0x52ce=[];if(Array[_0x4a283a(0xcb)](_0x5c06a0))for(const _0x46327e of _0x5c06a0){_0x52ce[_0x4a283a(0xfc)]({'file':_0x3cbfe7,'line':_0x46327e['line']||0x1,'column':_0x46327e['column']||0x1,'severity':this['mapHadolintSeverity'](_0x46327e[_0x4a283a(0xdd)]),'rule':_0x46327e['code'],'message':_0x46327e['message'],'category':_0x4a283a(0xe7),'validator':_0x4a283a(0xd3)});}return _0x52ce;}async['validateYAML'](_0x374e22,_0x40cd76={}){const _0x518b2a=a0_0x495851;try{const _0x5e272d=await execAsync(_0x518b2a(0xe8)+_0x374e22+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530});return this[_0x518b2a(0x12f)](_0x5e272d[_0x518b2a(0xf2)],_0x374e22);}catch(_0x423a95){if(_0x423a95['stdout'])return this['parseYamllintResults'](_0x423a95['stdout'],_0x374e22);return this['logger']?.[_0x518b2a(0x101)]('yamllint\x20validation\x20failed',{'error':_0x423a95['message']}),[];}}[a0_0x495851(0x12f)](_0x3a42dd,_0x302cc4){const _0xc750d2=a0_0x495851,_0x198688=[],_0x4c9a80=_0x3a42dd['split']('\x0a')['filter'](_0x387a74=>_0x387a74['trim']());for(const _0x12aa4f of _0x4c9a80){const _0x55e397=_0x12aa4f['match'](/^(.+?):(\d+):(\d+):\s*\[(\w+)\]\s*(.+?)\s*\((.+?)\)/);if(_0x55e397){const [,_0x31232a,_0x47718d,_0x32d677,_0x2add7d,_0x414e25,_0x379d50]=_0x55e397;_0x198688[_0xc750d2(0xfc)]({'file':_0x302cc4,'line':parseInt(_0x47718d,0xa),'column':parseInt(_0x32d677,0xa),'severity':this['mapYamllintSeverity'](_0x2add7d),'rule':_0x379d50,'message':_0x414e25,'category':_0xc750d2(0x121),'validator':_0xc750d2(0xf3)});}}return _0x198688;}async[a0_0x495851(0x113)](_0x256b40,_0x12bf0d,_0x4d6f8c={}){const _0x3f96b1=a0_0x495851;try{const _0x17e4f9=await execAsync(_0x3f96b1(0x120)+_0x256b40+_0x3f96b1(0xbf)+_0x12bf0d+'\x20--output\x20json\x20--compact',{'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0x26730f=JSON[_0x3f96b1(0xca)](_0x17e4f9[_0x3f96b1(0xf2)]);return this['parseCheckovResults'](_0x26730f,_0x256b40);}catch(_0x471899){if(_0x471899[_0x3f96b1(0xf2)])try{const _0x25a17e=JSON['parse'](_0x471899['stdout']);return this['parseCheckovResults'](_0x25a17e,_0x256b40);}catch(_0x44a11d){this['logger']?.['error'](_0x3f96b1(0x11c),{'error':_0x44a11d[_0x3f96b1(0xdb)]});}return this['logger']?.[_0x3f96b1(0x101)](_0x3f96b1(0xe4),{'error':_0x471899[_0x3f96b1(0xdb)]}),[];}}[a0_0x495851(0x100)](_0x44a526,_0x4220f7){const _0x2dee79=a0_0x495851,_0x25153c=[];if(_0x44a526['results']&&_0x44a526[_0x2dee79(0x112)]['failed_checks'])for(const _0x58af71 of _0x44a526[_0x2dee79(0x112)]['failed_checks']){_0x25153c[_0x2dee79(0xfc)]({'file':_0x4220f7,'line':_0x58af71['file_line_range']?_0x58af71['file_line_range'][0x0]:0x1,'column':0x1,'severity':this['mapCheckovSeverity'](_0x58af71[_0x2dee79(0x109)]),'rule':_0x58af71['check_id'],'message':_0x58af71['check_name']||_0x58af71[_0x2dee79(0xeb)],'category':_0x2dee79(0xe3),'validator':_0x2dee79(0x11b),'remediation':_0x58af71[_0x2dee79(0xc9)],'cwe':_0x58af71[_0x2dee79(0xe9)],'references':_0x58af71['guideline']?[_0x58af71['guideline']]:[]});}return _0x25153c;}async['validatePackageJson'](_0x19354d,_0x2766b9={}){const _0x1944bb=a0_0x495851;try{const _0x132eed=(await import('ajv'))['default'],_0x4a5ec4=(await import('ajv-formats'))[_0x1944bb(0x103)],_0x425b13=await a0_0x2e4034[_0x1944bb(0x12e)](_0x19354d,'utf-8'),_0x558add=JSON[_0x1944bb(0xca)](_0x425b13),_0x49ee91=new _0x132eed({'allErrors':!![],'strict':![]});_0x4a5ec4(_0x49ee91);const _0x333f13={'type':_0x1944bb(0xd2),'required':[_0x1944bb(0xcc),'version'],'properties':{'name':{'type':'string','pattern':'^(?:@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$'},'version':{'type':_0x1944bb(0x115)},'description':{'type':'string'},'main':{'type':'string'},'type':{'type':'string','enum':[_0x1944bb(0x12d),_0x1944bb(0xe1)]},'scripts':{'type':_0x1944bb(0xd2)},'dependencies':{'type':_0x1944bb(0xd2)},'devDependencies':{'type':_0x1944bb(0xd2)}},'additionalProperties':!![]},_0xf3d429=_0x49ee91[_0x1944bb(0xdc)](_0x333f13),_0x353e52=_0xf3d429(_0x558add);if(!_0x353e52&&_0xf3d429['errors'])return _0xf3d429['errors']['map'](_0x47ee08=>({'file':_0x19354d,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['ERROR'],'rule':'json-schema','message':_0x47ee08[_0x1944bb(0x11d)]?_0x47ee08['instancePath']+'\x20'+_0x47ee08['message']:_0x1944bb(0xf4)+_0x47ee08[_0x1944bb(0x10c)]['missingProperty']+'\x27','category':_0x1944bb(0xc0),'validator':_0x1944bb(0x104)}));return[];}catch(_0x14eab1){return this['logger']?.[_0x1944bb(0x101)](_0x1944bb(0x126),{'error':_0x14eab1['message']}),[{'file':_0x19354d,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x1944bb(0xc7)],'rule':'json-parse','message':'Invalid\x20JSON:\x20'+_0x14eab1[_0x1944bb(0xdb)],'category':'syntax','validator':'json-parse'}];}}async['validateTsConfig'](_0x11f0bb,_0x385af1={}){const _0x4cf1d2=a0_0x495851;try{const _0x4daff4=await a0_0x2e4034['readFile'](_0x11f0bb,_0x4cf1d2(0x105)),_0x51aa3f=JSON[_0x4cf1d2(0xca)](_0x4daff4),_0x177988=[];if(_0x51aa3f[_0x4cf1d2(0x129)]){const _0x270d57=_0x51aa3f[_0x4cf1d2(0x129)];!_0x270d57[_0x4cf1d2(0x106)]&&_0x177988[_0x4cf1d2(0xfc)]({'file':_0x11f0bb,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':'strict-mode','message':_0x4cf1d2(0x10d),'category':'best-practice','validator':'tsconfig-validator'}),_0x270d57[_0x4cf1d2(0x117)]===![]&&_0x177988['push']({'file':_0x11f0bb,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':_0x4cf1d2(0xee),'message':'Disabling\x20noImplicitAny\x20reduces\x20type\x20safety','category':_0x4cf1d2(0xf8),'validator':'tsconfig-validator'});}return _0x177988;}catch(_0x5db71a){return this[_0x4cf1d2(0x118)]?.[_0x4cf1d2(0x101)]('tsconfig.json\x20validation\x20failed',{'error':_0x5db71a[_0x4cf1d2(0xdb)]}),[{'file':_0x11f0bb,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['ERROR'],'rule':_0x4cf1d2(0xf9),'message':_0x4cf1d2(0xf5)+_0x5db71a[_0x4cf1d2(0xdb)],'category':'syntax','validator':'json-parse'}];}}async['validateEnvFile'](_0x3f19c4,_0x364fcc={}){const _0x56caaa=a0_0x495851;try{const _0x2406b2=await a0_0x2e4034[_0x56caaa(0x12e)](_0x3f19c4,'utf-8'),_0x2e2c37=[],_0x40e7ae=_0x2406b2['split']('\x0a'),_0x587a48=[{'pattern':/password|passwd|pwd/i,'name':_0x56caaa(0xce)},{'pattern':/api[_-]?key/i,'name':'API\x20key'},{'pattern':/secret/i,'name':_0x56caaa(0xe5)},{'pattern':/token/i,'name':'token'},{'pattern':/private[_-]?key/i,'name':_0x56caaa(0x130)},{'pattern':/aws[_-]?access/i,'name':'AWS\x20credentials'}];return _0x40e7ae['forEach']((_0x50ba2b,_0x4d7339)=>{const _0xc50be4=_0x56caaa,_0x4e30ba=_0x50ba2b[_0xc50be4(0x119)]();if(!_0x4e30ba||_0x4e30ba[_0xc50be4(0xc8)]('#'))return;if(_0x4e30ba['includes']('=')){const [_0x3ae033,_0xd72ee6]=_0x4e30ba['split']('='),_0x33e379=_0x3ae033[_0xc50be4(0xd7)](),_0x4dffbf=_0xd72ee6?.['trim']()||'',_0x35d4d9=_0x4dffbf&&_0x4dffbf!==''&&!_0x4dffbf[_0xc50be4(0xc8)]('$')&&_0x4dffbf!=='your-key-here'&&_0x4dffbf!=='changeme'&&_0x4dffbf[_0xc50be4(0x132)]>0x5;if(_0x35d4d9)for(const {pattern:_0x2b66ce,name:_0x568bfb}of _0x587a48){if(_0x2b66ce[_0xc50be4(0xc6)](_0x33e379)){_0x2e2c37['push']({'file':_0x3f19c4,'line':_0x4d7339+0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0xc50be4(0xcd)],'rule':'hardcoded-secret','message':'Potential\x20hardcoded\x20'+_0x568bfb+'\x20detected\x20in\x20.env\x20file','category':_0xc50be4(0xe3),'validator':_0xc50be4(0x131),'remediation':_0xc50be4(0xe0)});break;}}}}),_0x2e2c37;}catch(_0x2882aa){return this['logger']?.[_0x56caaa(0x101)]('.env\x20validation\x20failed',{'error':_0x2882aa[_0x56caaa(0xdb)]}),[];}}['detectFileType'](_0x11fad0){const _0x24746d=a0_0x495851,_0x199a4d=a0_0x261839['basename'](_0x11fad0)['toLowerCase'](),_0x4f26b0=a0_0x261839['dirname'](_0x11fad0);if(_0x199a4d==='dockerfile')return _0x24746d(0xe7);if(_0x199a4d==='docker-compose.yml'||_0x199a4d==='docker-compose.yaml')return'docker-compose';if(_0x199a4d===_0x24746d(0x110))return'package.json';if(_0x199a4d===_0x24746d(0xfa))return'tsconfig.json';if(_0x199a4d==='.env'||_0x199a4d['endsWith']('.env'))return'env';if(_0x4f26b0['includes']('.github/workflows'))return _0x24746d(0x111);if(_0x4f26b0['includes']('kubernetes')||_0x4f26b0['includes']('k8s'))return'kubernetes';const _0x1830c9=a0_0x261839['extname'](_0x11fad0)[_0x24746d(0xd7)]();if(_0x1830c9===_0x24746d(0xf1)||_0x1830c9===_0x24746d(0xda))return _0x24746d(0x11a);if(_0x1830c9==='.yml'||_0x1830c9===_0x24746d(0xbe))return'yaml';if(_0x1830c9==='.json')return'json';return'unknown';}['normalizeResults'](_0x4dab13){const _0xace169=a0_0x495851;return _0x4dab13['map'](_0x42f44d=>({'file':_0x42f44d[_0xace169(0x124)],'line':_0x42f44d[_0xace169(0x127)]||0x1,'column':_0x42f44d[_0xace169(0x125)]||0x1,'severity':_0x42f44d[_0xace169(0xd9)]||STATIC_ANALYSIS[_0xace169(0xd4)][_0xace169(0xd6)],'rule':_0x42f44d[_0xace169(0xdf)]||'unknown','message':_0x42f44d[_0xace169(0xdb)]||_0xace169(0xde),'category':_0x42f44d[_0xace169(0xcf)]||_0xace169(0xc0),'validator':_0x42f44d[_0xace169(0xd1)],'cwe':_0x42f44d[_0xace169(0xe9)]||null,'remediation':_0x42f44d[_0xace169(0x11e)]||null,'references':_0x42f44d['references']||[]}));}[a0_0x495851(0x114)](_0x57b47e){const _0x49ee16=a0_0x495851,_0x3f7b8c={'error':STATIC_ANALYSIS[_0x49ee16(0xd4)]['ERROR'],'warning':STATIC_ANALYSIS[_0x49ee16(0xd4)][_0x49ee16(0xd6)],'info':STATIC_ANALYSIS['SEVERITY'][_0x49ee16(0x107)],'style':STATIC_ANALYSIS['SEVERITY'][_0x49ee16(0x107)]};return _0x3f7b8c[_0x57b47e?.[_0x49ee16(0xd7)]()]||STATIC_ANALYSIS[_0x49ee16(0xd4)]['WARNING'];}[a0_0x495851(0x10a)](_0x2b4590){const _0x18399d=a0_0x495851,_0x3adffc={'error':STATIC_ANALYSIS[_0x18399d(0xd4)]['ERROR'],'warning':STATIC_ANALYSIS['SEVERITY']['WARNING']};return _0x3adffc[_0x2b4590?.[_0x18399d(0xd7)]()]||STATIC_ANALYSIS[_0x18399d(0xd4)]['WARNING'];}['mapCheckovSeverity'](_0x16efc2){const _0x185b77=a0_0x495851;return STATIC_ANALYSIS[_0x185b77(0xd4)]['ERROR'];}async['getValidatorStatus'](){const _0x1ba7ed=await this['detectAvailableValidators']();return{'validators':_0x1ba7ed,'recommendations':this['getInstallRecommendations'](_0x1ba7ed)};}['getInstallRecommendations'](_0x1ebb9d){const _0x29b1c0=a0_0x495851,_0x1f31de=[];return!_0x1ebb9d['checkov']&&_0x1f31de[_0x29b1c0(0xfc)]({'validator':'checkov','reason':_0x29b1c0(0x10f),'install':'pip\x20install\x20checkov','priority':_0x29b1c0(0x12c)}),!_0x1ebb9d[_0x29b1c0(0xd3)]&&_0x1f31de[_0x29b1c0(0xfc)]({'validator':'hadolint','reason':'Dockerfile\x20linting\x20and\x20best\x20practices','install':'Download from https://github.com/hadolint/hadolint/releases','priority':'high'}),!_0x1ebb9d[_0x29b1c0(0xf3)]&&_0x1f31de['push']({'validator':_0x29b1c0(0xf3),'reason':_0x29b1c0(0x108),'install':'pip\x20install\x20yamllint','priority':_0x29b1c0(0xef)}),!_0x1ebb9d['jsonSchema']&&_0x1f31de['push']({'validator':_0x29b1c0(0xc1),'reason':'JSON\x20configuration\x20validation','install':'npm\x20install\x20ajv\x20ajv-formats','priority':'medium'}),_0x1f31de;}}export default ConfigValidator;