@qnet/cli
Version:
A powerful command-line interface tool designed for managing and interacting with Quantex projects and services efficiently. Built with modern features and smooth integrations to streamline your workflow.
1 lines • 3.75 kB
JavaScript
function a0_0x5731(_0x66c3c2,_0x38da90){const _0x501243=a0_0x5012();return a0_0x5731=function(_0x5731d3,_0x315645){_0x5731d3=_0x5731d3-0x12c;let _0x4297d6=_0x501243[_0x5731d3];return _0x4297d6;},a0_0x5731(_0x66c3c2,_0x38da90);}const a0_0x1550a7=a0_0x5731;(function(_0x49d7bb,_0x4d9e41){const _0x435115=a0_0x5731,_0x73f059=_0x49d7bb();while(!![]){try{const _0x7a80d5=-parseInt(_0x435115(0x131))/0x1+parseInt(_0x435115(0x13c))/0x2*(-parseInt(_0x435115(0x152))/0x3)+-parseInt(_0x435115(0x14b))/0x4*(parseInt(_0x435115(0x138))/0x5)+-parseInt(_0x435115(0x132))/0x6*(parseInt(_0x435115(0x133))/0x7)+parseInt(_0x435115(0x12e))/0x8+-parseInt(_0x435115(0x13b))/0x9*(-parseInt(_0x435115(0x145))/0xa)+parseInt(_0x435115(0x147))/0xb;if(_0x7a80d5===_0x4d9e41)break;else _0x73f059['push'](_0x73f059['shift']());}catch(_0x382793){_0x73f059['push'](_0x73f059['shift']());}}}(a0_0x5012,0x6938a));import a0_0x5f48b1 from'path';import a0_0x4b5c45 from'chalk';import a0_0x3954aa from'figlet';import{execSync}from'child_process';import a0_0x3e371d from'https';import{fileURLToPath}from'url';import a0_0x4ec5d0 from'fs';const __filename=fileURLToPath(import.meta['url']),__dirname=a0_0x5f48b1[a0_0x1550a7(0x151)](__filename),packageJsonPath=a0_0x5f48b1[a0_0x1550a7(0x150)](__dirname,'..','package.json'),pkg=JSON['parse'](a0_0x4ec5d0[a0_0x1550a7(0x13f)](packageJsonPath,a0_0x1550a7(0x14d))),version=pkg[a0_0x1550a7(0x146)];function a0_0x5012(){const _0x59a8e9=['2869656CJpTQM','parse','blue','486719trquEB','774WfulLh','7574gDKSpP','\x20-\x20Made\x20with\x20','\x20→\x20','Run\x20','bold','2595smnWBh','yellow','end','27TrEelc','37282fSdQvj','red','get','readFileSync','log','green','full','data','Shows\x20your\x20current\x20version\x20and\x20if\x20updates\x20are\x20available','2201890bZajCo','version','15013713RFEcFy','QuantCLI\x20','error','textSync','6060RxTpKt','Could\x20not\x20check\x20for\x20updates.','utf-8','No\x20updates\x20found,\x20your\x20QuantCLI\x20is\x20up-to-date!\x20🎉','Update\x20available:\x20','join','dirname','87qJVwjc','\x20to\x20update\x20to\x20the\x20latest\x20version.','https://registry.npmjs.org/','/latest'];a0_0x5012=function(){return _0x59a8e9;};return a0_0x5012();}function checkLatestVersion(_0x59026f){return new Promise((_0x581ab7,_0x37dd7f)=>{const _0x3daf20=a0_0x5731;a0_0x3e371d[_0x3daf20(0x13e)](_0x3daf20(0x12c)+_0x59026f+_0x3daf20(0x12d),_0x57dd2a=>{const _0x54944d=_0x3daf20;let _0x23eb8='';_0x57dd2a['on'](_0x54944d(0x143),_0x2bd77a=>_0x23eb8+=_0x2bd77a),_0x57dd2a['on'](_0x54944d(0x13a),()=>{const _0x30079f=_0x54944d;try{const _0x5eb78f=JSON[_0x30079f(0x12f)](_0x23eb8);_0x581ab7(_0x5eb78f[_0x30079f(0x146)]);}catch{_0x37dd7f('Failed\x20to\x20parse\x20npm\x20response');}});})['on'](_0x3daf20(0x149),_0x87a090=>_0x37dd7f(_0x87a090));});}export const name=a0_0x1550a7(0x146);export const description=a0_0x1550a7(0x144);export async function action(){const _0x2045ad=a0_0x1550a7;console[_0x2045ad(0x140)](a0_0x4b5c45[_0x2045ad(0x141)](a0_0x3954aa[_0x2045ad(0x14a)]('QuantCLI',{'horizontalLayout':_0x2045ad(0x142)}))),console[_0x2045ad(0x140)]('You\x20are\x20currently\x20running\x20'+a0_0x4b5c45[_0x2045ad(0x141)](_0x2045ad(0x148)+version)+_0x2045ad(0x134)+a0_0x4b5c45[_0x2045ad(0x13d)]('♡')+'\x20by\x20RoAuth!');try{const _0x36eeaf=await checkLatestVersion('@qnet/cli');_0x36eeaf===version?console[_0x2045ad(0x140)](a0_0x4b5c45[_0x2045ad(0x130)](_0x2045ad(0x14e))):(console[_0x2045ad(0x140)](a0_0x4b5c45['yellow'](_0x2045ad(0x14f)+version+_0x2045ad(0x135)+_0x36eeaf)),console['log'](a0_0x4b5c45[_0x2045ad(0x139)](_0x2045ad(0x136)+a0_0x4b5c45[_0x2045ad(0x137)]('npm\x20install\x20-g\x20@qnet/cli')+_0x2045ad(0x153))));}catch(_0x3fc593){console[_0x2045ad(0x140)](a0_0x4b5c45[_0x2045ad(0x13d)](_0x2045ad(0x14c)));}}