@northflank/cli
Version:
Provides a command-line interface to the Northflank platform.
1 lines • 2.88 kB
JavaScript
(function(m,E){const O=a6E,h=m();while(!![]){try{const I=parseInt(O(0xdd))/0x1+parseInt(O(0xe1))/0x2+parseInt(O(0xe2))/0x3+-parseInt(O(0xef))/0x4*(parseInt(O(0xde))/0x5)+parseInt(O(0xf2))/0x6+-parseInt(O(0xf8))/0x7*(parseInt(O(0xf3))/0x8)+-parseInt(O(0xf9))/0x9;if(I===E)break;else h['push'](h['shift']());}catch(T){h['push'](h['shift']());}}}(a6m,0x56441));function a6E(m,E){const h=a6m();return a6E=function(I,T){I=I-0xdb;let e=h[I];return e;},a6E(m,E);}import a6h from'chalk';function a6m(){const f=['length','3570144XUFbtu','8KyLalj','Show\x20only\x20commands\x20including\x20the\x20filter\x20word','flat','green','Prints\x20a\x20tree\x20view\x20of\x20all\x20available\x20commands','3042319SVBQTX','3430170gvosJG','join','commands','Print\x20command\x20descriptions','slice','name','option','description','550344okVROe','5KHZTIN','Only\x20display\x20tree\x20of\x20this\x20subcommand.\x20Example:\x20\x27northflank\x20command-overview\x20list\x27','abs','270786wGgtJx','1695492vBTTht','[subcommand]','action','command-overview','some','--verbose','map','bold','aliases','\x27\x20found.\x20Available\x20subcommands:\x20','every','log','--filter\x20<filter>','2707332SDBIza','No\x20subcommand\x20\x27'];a6m=function(){return f;};return a6m();}import{getCommand,warning}from'../utils.js';export function getCommandOverview(m){const B=a6E;return getCommand()['name'](B(0xe5))['description'](B(0xf7))['argument'](B(0xe3),B(0xdf))['option'](B(0xe7),B(0xfc))[B(0xdb)](B(0xee),B(0xf4))[B(0xe4)](async(E,h,I)=>{const D=B,{verbose:T,filter:e}=h,o=(L,P=[])=>{const q=a6E;if(L[q(0xfb)][q(0xf1)]>0x0)return[L['name'](),...L[q(0xea)](),...L[q(0xfb)][q(0xe8)](X=>o(X,P))[q(0xf5)]()];return[...P,L[q(0xfe)](),...L[q(0xea)]()];};function g(L,P){const a=a6E;if(Math[a(0xe0)](L[a(0xf1)]-P['length'])>0x2)return![];const X=L[a(0xf1)]>=P[a(0xf1)]?L:P,W=L['length']<P[a(0xf1)]?L:P;let K=0x0;for(let z=0x0;z<X[a(0xf1)];z++){if(X[z]!==W[z])K++;if(K>0x1)return![];}return!![];}function J(L,P){const R=a6E,X=(n,Q=!![])=>Q?a6h[R(0xe9)][R(0xf6)](n[R(0xfe)]()):n[R(0xfe)](),W=P[R(0xf1)]===0x0,K=e===undefined||o(L)[R(0xe6)](n=>g(n,e)),z=e===undefined||[L['name'](),...L[R(0xea)]()][R(0xe6)](Q=>g(Q,e))||K,S=L[R(0xfb)];let H='';const r=S['length']===0x0,F=r||Object['keys'](L?.['opts']())?.[R(0xf1)]>0x0;!W&&(H=S&&!r?'┬\x20':'─\x20');const t=T&&F&&L[R(0xdc)]()?':\x20'+L[R(0xdc)]():'';z&&console['log'](''+P+H+X(L,F)+t);let Y=P;if(!W){const n=P[R(0xfd)](-0x2)==='└─';Y=P[R(0xfd)](0x0,-0x2)+(n?'\x20\x20':'│\x20');}const N=Y+'├─',w=Y+'└─',b=S[R(0xec)](Q=>Q[R(0xfb)][R(0xf1)]===0x0);b&&!r&&!T?z&&console[R(0xed)](w+'\x20'+S[R(0xe8)](Q=>X(Q))[R(0xfa)](',\x20')):S['forEach']((Q,c)=>{const x=R;J(Q,S[x(0xf1)]-0x1===c?w:N);});}if(E){const L=m[D(0xfb)]['find'](P=>P['name']()===E);L===undefined?warning(D(0xf0)+E+D(0xeb)+m[D(0xfb)]['map'](P=>P['name']())[D(0xfa)](',\x20')):J(L,'');}else J(m,'');});}