@northflank/cli
Version:
Provides a command-line interface to the Northflank platform.
1 lines • 3.02 kB
JavaScript
const a14L=a14E;(function(m,E){const g=a14E,h=m();while(!![]){try{const I=parseInt(g(0x18f))/0x1*(parseInt(g(0x197))/0x2)+parseInt(g(0x187))/0x3*(-parseInt(g(0x19d))/0x4)+-parseInt(g(0x18b))/0x5*(parseInt(g(0x19b))/0x6)+-parseInt(g(0x1a0))/0x7*(-parseInt(g(0x19e))/0x8)+-parseInt(g(0x198))/0x9+parseInt(g(0x189))/0xa*(parseInt(g(0x194))/0xb)+parseInt(g(0x1a7))/0xc;if(I===E)break;else h['push'](h['shift']());}catch(T){h['push'](h['shift']());}}}(a14m,0xb9a7b));import a14h from'inquirer/lib/prompts/list.js';import a14I from'inquirer/lib/objects/choice.js';import a14T from'chalk';function a14E(m,E){const h=a14m();return a14E=function(I,T){I=I-0x187;let e=h[I];return e;},a14E(m,E);}function incrementListIndex(m,E,h){const J=a14E,I=h[J(0x19a)][J(0x188)],T=J(0x19c)in h?Boolean(h[J(0x19c)]):!![];if(E==='up'){if(m>0x0)return m-0x1;return T?I-0x1:m;}if(E===J(0x18e)){if(m<I-0x1)return m+0x1;return T?0x0:m;}throw new Error('dir\x20must\x20be\x20up\x20or\x20down');}export class DynamicReloadPaginationPrompt extends a14h{[a14L(0x1a2)]=a14T['italic']('..\x20Load\x20more\x20options\x20..');[a14L(0x193)];[a14L(0x196)]=![];[a14L(0x199)];constructor(m,E,h){const P=a14L;super(m,E,h),this['pagOpt']=this[P(0x1a1)],this[P(0x199)]=this['pagOpt'][P(0x199)],this[P(0x199)]!==undefined&&this[P(0x1a1)][P(0x19a)][P(0x19f)](new a14I(this['reloadText'],this[P(0x1a2)]));}[a14L(0x191)](){const X=a14L;if(this[X(0x196)])return;this['selected']=incrementListIndex(this['selected'],'up',this['opt']),this['render']();}async[a14L(0x1a4)](){const W=a14L;if(this[W(0x196)])return;this[W(0x18c)]=incrementListIndex(this[W(0x18c)],'down',this[W(0x1a1)]),await this[W(0x18a)](),this['render']();}async['handleDynamicPageLoad'](){const K=a14L;if(this[K(0x18c)]>=this[K(0x1a1)][K(0x19a)]['length']-0x1){if(this[K(0x199)]===undefined)return;this['loading']=!![];let m=0x0;const E=setInterval(()=>{const z=K,e=['⠋','⠙','⠹','⠸','⠼','⠴','⠦','⠧','⠇','⠏'],o=a14T[z(0x192)](e[m%e[z(0x18d)]]+z(0x195));this[z(0x1a1)]['choices']['choices'][this['selected']][z(0x1a5)]=''+o,m+=0x1,this[z(0x1a6)]();},0x50),{elements:h,nextPageCursor:I}=await this['pagOpt'][K(0x190)]({'nextPageCursor':this['nextPageCursor']})[K(0x1a3)](()=>({'elements':[],'nextPageCursor':undefined}));this[K(0x199)]=I;const T=h['map'](o=>new a14I(o,o));this[K(0x1a1)][K(0x19a)]['choices']['splice'](this['selected'],0x1),this[K(0x1a1)][K(0x19a)]['push'](...T),I!==undefined&&this[K(0x1a1)]['choices'][K(0x19f)](new a14I(this[K(0x1a2)],this['reloadText'])),clearInterval(E),this[K(0x196)]=![];}}}function a14m(){const S=['58QwgIJg','9736731yAknfh','nextPageCursor','choices','978PgRBsQ','loop','1142308sVLlhO','121096gPSKqs','push','658TqHeiA','opt','reloadText','catch','onDownKey','name','render','19674696iQpGqe','15UhKqLi','realLength','70lWpano','handleDynamicPageLoad','38145ZPJZuR','selected','length','down','49745iOsSuR','loadMore','onUpKey','italic','pagOpt','13629SHuilw','\x20Loading\x20more\x20options','loading'];a14m=function(){return S;};return a14m();}