UNPKG

@northflank/cli

Version:

Provides a command-line interface to the Northflank platform.

1 lines 4.05 kB
'use strict';const a6C=a6a;(function(S,a){const e=a6a,j=S();while(!![]){try{const v=-parseInt(e(0xe8))/0x1*(-parseInt(e(0xf5))/0x2)+parseInt(e(0xea))/0x3*(-parseInt(e(0x110))/0x4)+-parseInt(e(0x10d))/0x5*(parseInt(e(0xf2))/0x6)+-parseInt(e(0x107))/0x7+parseInt(e(0x112))/0x8*(parseInt(e(0x10f))/0x9)+-parseInt(e(0xdd))/0xa*(parseInt(e(0x101))/0xb)+parseInt(e(0xdc))/0xc;if(v===a)break;else j['push'](j['shift']());}catch(z){j['push'](j['shift']());}}}(a6S,0x7c453));var __awaiter=this&&this[a6C(0xeb)]||function(S,a,j,v){function z(s){return s instanceof j?s:new j(function(u){u(s);});}return new(j||(j=Promise))(function(s,u){const h=a6a;function g(o){const q=a6a;try{i(v[q(0xfe)](o));}catch(X){u(X);}}function w(o){const b=a6a;try{i(v[b(0xef)](o));}catch(X){u(X);}}function i(o){const O=a6a;o[O(0xf0)]?s(o[O(0xe2)]):z(o[O(0xe2)])[O(0xe3)](g,w);}i((v=v[h(0x105)](S,a||[]))[h(0xfe)]());});},__importDefault=this&&this[a6C(0xe1)]||function(S){return S&&S['__esModule']?S:{'default':S};};function a6a(S,a){const j=a6S();return a6a=function(v,z){v=v-0xdb;let s=j[v];return s;},a6a(S,a);}Object[a6C(0xe4)](exports,a6C(0xfb),{'value':!![]}),exports['getCommandOverview']=void 0x0;const chalk_1=__importDefault(require(a6C(0x104))),utils_1=require(a6C(0xee));function a6S(){const J=['warning','getCommand','description','1185960zbvwBS','getCommandOverview','18gMKRSh','2556SMdKKD','some','1331112EbTyWX','aliases','Print\x20command\x20descriptions','5079900mVlOKH','634090fibVLP','length','action','bold','__importDefault','value','then','defineProperty','abs','keys','Show\x20only\x20commands\x20including\x20the\x20filter\x20word','962676rniDUb','flat','2547rPLLxr','__awaiter','opts','log','../utils','throw','done','--verbose','6xljTnM','Only\x20display\x20tree\x20of\x20this\x20subcommand.\x20Example:\x20\x27northflank\x20command-overview\x20list\x27','argument','2ZCeMjV','option','green','map','forEach','every','__esModule','[subcommand]','join','next','No\x20subcommand\x20\x27','commands','22AcHbXD','name','find','chalk','apply','default','2122729PTLNxb','slice','Prints\x20a\x20tree\x20view\x20of\x20all\x20available\x20commands'];a6S=function(){return J;};return a6S();}function getCommandOverview(S){const B=a6C;return(0x0,utils_1[B(0x10b)])()[B(0x102)]('command-overview')[B(0x10c)](B(0x109))[B(0xf4)](B(0xfc),B(0xf3))[B(0xf6)](B(0xf1),B(0xdb))[B(0xf6)]('--filter\x20<filter>',B(0xe7))[B(0xdf)]((a,j,v)=>__awaiter(this,void 0x0,void 0x0,function*(){const U=B,{verbose:z,filter:s}=j,u=(i,o=[])=>{const F=a6a;if(i[F(0x100)][F(0xde)]>0x0)return[i[F(0x102)](),...i[F(0x113)](),...i[F(0x100)][F(0xf8)](X=>u(X,o))[F(0xe9)]()];return[...o,i[F(0x102)](),...i[F(0x113)]()];};function g(o,X){const P=a6a;if(Math[P(0xe5)](o[P(0xde)]-X[P(0xde)])>0x2)return![];const T=o[P(0xde)]>=X['length']?o:X,H=o[P(0xde)]<X[P(0xde)]?o:X;let E=0x0;for(let Y=0x0;Y<T['length'];Y++){if(T[Y]!==H[Y])E++;if(E>0x1)return![];}return!![];}function w(i,o){const m=a6a;var X;const T=(N,Z=!![])=>Z?chalk_1[m(0x106)][m(0xe0)][m(0xf7)](N[m(0x102)]()):N[m(0x102)](),H=o[m(0xde)]===0x0,E=s===undefined||u(i)[m(0x111)](N=>g(N,s)),Y=s===undefined||[i['name'](),...i[m(0x113)]()][m(0x111)](N=>g(N,s))||E,V=i['commands'];let K='';const L=V['length']===0x0,A=L||((X=Object[m(0xe6)](i===null||i===void 0x0?void 0x0:i[m(0xec)]()))===null||X===void 0x0?void 0x0:X[m(0xde)])>0x0;!H&&(K=V&&!L?'┬\x20':'─\x20');const Q=z&&A&&i[m(0x10c)]()?':\x20'+i[m(0x10c)]():'';Y&&console['log'](''+o+K+T(i,A)+Q);let R=o;if(!H){const N=o[m(0x108)](-0x2)==='└─';R=o['slice'](0x0,-0x2)+(N?'\x20\x20':'│\x20');}const M=R+'├─',x=R+'└─',c=V[m(0xfa)](Z=>Z[m(0x100)][m(0xde)]===0x0);c&&!L&&!z?Y&&console[m(0xed)](x+'\x20'+V['map'](Z=>T(Z))['join'](',\x20')):V[m(0xf9)]((Z,D)=>{const y=m;w(Z,V[y(0xde)]-0x1===D?x:M);});}if(a){const i=S[U(0x100)][U(0x103)](o=>o[U(0x102)]()===a);i===undefined?(0x0,utils_1[U(0x10a)])(U(0xff)+a+'\x27\x20found.\x20Available\x20subcommands:\x20'+S[U(0x100)][U(0xf8)](o=>o[U(0x102)]())[U(0xfd)](',\x20')):w(i,'');}else w(S,'');}));}exports[a6C(0x10e)]=getCommandOverview;