@northflank/cli
Version:
Provides a command-line interface to the Northflank platform.
1 lines • 2.92 kB
JavaScript
(function(X,j){const E=a6j,V=X();while(!![]){try{const H=parseInt(E(0x78))/0x1+-parseInt(E(0x6d))/0x2*(parseInt(E(0x83))/0x3)+parseInt(E(0x77))/0x4+parseInt(E(0x88))/0x5+parseInt(E(0x67))/0x6*(parseInt(E(0x6b))/0x7)+-parseInt(E(0x7f))/0x8*(-parseInt(E(0x81))/0x9)+-parseInt(E(0x89))/0xa;if(H===j)break;else V['push'](V['shift']());}catch(O){V['push'](V['shift']());}}}(a6X,0xe62aa));function a6j(X,j){const V=a6X();return a6j=function(H,O){H=H-0x67;let F=V[H];return F;},a6j(X,j);}import a6V from'chalk';import{getCommand,warning}from'../utils.js';function a6X(){const k=['Show\x20only\x20commands\x20including\x20the\x20filter\x20word','flat','length','Print\x20command\x20descriptions','aliases','forEach','green','find','--filter\x20<filter>','6436368nLgSyh','1119854JOAEGt','description','Only\x20display\x20tree\x20of\x20this\x20subcommand.\x20Example:\x20\x27northflank\x20command-overview\x20list\x27','some','name','No\x20subcommand\x20\x27','Prints\x20a\x20tree\x20view\x20of\x20all\x20available\x20commands','8OchyQA','option','15445737SORIor','join','201eAzOdg','bold','slice','commands','--verbose','212675QQFHpg','31565630WAVYEI','map','opts','7542624pmrKtg','\x27\x20found.\x20Available\x20subcommands:\x20','every','command-overview','7dmawrL','keys','49118neAjWg'];a6X=function(){return k;};return a6X();}export function getCommandOverview(X){const t=a6j;return getCommand()['name'](t(0x6a))[t(0x79)](t(0x7e))['argument']('[subcommand]',t(0x7a))[t(0x80)](t(0x87),t(0x71))[t(0x80)](t(0x76),t(0x6e))['action'](async(j,V,H)=>{const m=t,{verbose:O,filter:F}=V,h=(C,B=[])=>{const Z=a6j;if(C[Z(0x86)][Z(0x70)]>0x0)return[C[Z(0x7c)](),...C[Z(0x72)](),...C['commands'][Z(0x8a)](s=>h(s,B))[Z(0x6f)]()];return[...B,C['name'](),...C[Z(0x72)]()];};function P(C,B){const w=a6j;if(Math['abs'](C[w(0x70)]-B[w(0x70)])>0x2)return![];const s=C['length']>=B[w(0x70)]?C:B,S=C[w(0x70)]<B[w(0x70)]?C:B;let y=0x0;for(let e=0x0;e<s[w(0x70)];e++){if(s[e]!==S[e])y++;if(y>0x1)return![];}return!![];}function o(C,B){const N=a6j,s=(g,J=!![])=>J?a6V[N(0x84)][N(0x74)](g[N(0x7c)]()):g['name'](),S=B[N(0x70)]===0x0,y=F===undefined||h(C)[N(0x7b)](g=>P(g,F)),e=F===undefined||[C[N(0x7c)](),...C[N(0x72)]()][N(0x7b)](g=>P(g,F))||y,A=C[N(0x86)];let l='';const T=A[N(0x70)]===0x0,W=T||Object[N(0x6c)](C?.[N(0x8b)]())?.[N(0x70)]>0x0;!S&&(l=A&&!T?'┬\x20':'─\x20');const v=O&&W&&C[N(0x79)]()?':\x20'+C[N(0x79)]():'';e&&console['log'](''+B+l+s(C,W)+v);let G=B;if(!S){const g=B[N(0x85)](-0x2)==='└─';G=B[N(0x85)](0x0,-0x2)+(g?'\x20\x20':'│\x20');}const d=G+'├─',x=G+'└─',M=A[N(0x69)](J=>J['commands'][N(0x70)]===0x0);M&&!T&&!O?e&&console['log'](x+'\x20'+A[N(0x8a)](J=>s(J))[N(0x82)](',\x20')):A[N(0x73)]((J,b)=>{const p=N;o(J,A[p(0x70)]-0x1===b?x:d);});}if(j){const C=X[m(0x86)][m(0x75)](B=>B[m(0x7c)]()===j);C===undefined?warning(m(0x7d)+j+m(0x68)+X[m(0x86)][m(0x8a)](B=>B[m(0x7c)]())[m(0x82)](',\x20')):o(C,'');}else o(X,'');});}