UNPKG

@northflank/cli

Version:

Provides a command-line interface to the Northflank platform.

1 lines 3.18 kB
function a14j(X,j){const V=a14X();return a14j=function(H,O){H=H-0x179;let F=V[H];return F;},a14j(X,j);}function a14X(){const l=['selected','762853GjTzYC','reloadText','length','map','2069672IjuYnd','nextPageCursor','down','\x20Loading\x20more\x20options','handleDynamicPageLoad','loading','144zYWzkU','3iQzIuU','choices','569534ElOGlC','10150UOQCRR','pagOpt','resolve','14lsjBzW','onDownKey','..\x20Load\x20more\x20options\x20..','loop','Method\x20not\x20implemented','4183024GRNrBw','9441cWQAES','realLength','1638300dBHGDP','opt','catch','run','onUpKey','push','italic','95kJprIy','render','78012heFOfm','name','splice','loadMore'];a14X=function(){return l;};return a14X();}const a14C=a14j;(function(X,j){const P=a14j,V=X();while(!![]){try{const H=-parseInt(P(0x180))/0x1+-parseInt(P(0x18d))/0x2*(parseInt(P(0x18b))/0x3)+-parseInt(P(0x199))/0x4+-parseInt(P(0x179))/0x5*(parseInt(P(0x17b))/0x6)+-parseInt(P(0x191))/0x7*(parseInt(P(0x196))/0x8)+parseInt(P(0x197))/0x9*(parseInt(P(0x18e))/0xa)+parseInt(P(0x184))/0xb*(parseInt(P(0x18a))/0xc);if(H===j)break;else V['push'](V['shift']());}catch(O){V['push'](V['shift']());}}}(a14X,0x8bc9a));import a14V from'inquirer/lib/prompts/list.js';import a14H from'inquirer/lib/objects/choice.js';import a14O from'chalk';function incrementListIndex(X,j,V){const o=a14j,H=V[o(0x18c)][o(0x198)],O='loop'in V?Boolean(V[o(0x194)]):!![];if(j==='up'){if(X>0x0)return X-0x1;return O?H-0x1:X;}if(j==='down'){if(X<H-0x1)return X+0x1;return O?0x0:X;}throw new Error('dir\x20must\x20be\x20up\x20or\x20down');}export class DynamicReloadPaginationPrompt extends a14V{[a14C(0x181)]=a14O[a14C(0x19f)](a14C(0x193));[a14C(0x18f)];[a14C(0x189)]=![];['nextPageCursor'];constructor(X,j,V){const B=a14C;super(X,j,V),this[B(0x18f)]=this[B(0x19a)],this[B(0x185)]=this[B(0x18f)][B(0x185)],this['nextPageCursor']!==undefined&&this[B(0x19a)][B(0x18c)][B(0x19e)](new a14H(this[B(0x181)],this[B(0x181)]));}[a14C(0x19c)](){const s=a14C;return console['log'](s(0x195)),Promise[s(0x190)]();}[a14C(0x19d)](){const S=a14C;if(this[S(0x189)])return;this[S(0x17f)]=incrementListIndex(this['selected'],'up',this[S(0x19a)]),this['render']();}async[a14C(0x192)](){const y=a14C;if(this[y(0x189)])return;this[y(0x17f)]=incrementListIndex(this['selected'],y(0x186),this[y(0x19a)]),await this['handleDynamicPageLoad'](),this[y(0x17a)]();}async[a14C(0x188)](){const e=a14C;if(this['selected']>=this[e(0x19a)][e(0x18c)]['length']-0x1){if(this[e(0x185)]===undefined)return;this[e(0x189)]=!![];let X=0x0;const j=setInterval(()=>{const A=e,F=['⠋','⠙','⠹','⠸','⠼','⠴','⠦','⠧','⠇','⠏'],h=a14O[A(0x19f)](F[X%F[A(0x182)]]+A(0x187));this[A(0x19a)]['choices'][A(0x18c)][this[A(0x17f)]][A(0x17c)]=''+h,X+=0x1,this[A(0x17a)]();},0x50),{elements:V,nextPageCursor:H}=await this[e(0x18f)][e(0x17e)]({'nextPageCursor':this[e(0x185)]})[e(0x19b)](()=>({'elements':[],'nextPageCursor':undefined}));this[e(0x185)]=H;const O=V[e(0x183)](F=>new a14H(F,F));this[e(0x19a)][e(0x18c)]['choices'][e(0x17d)](this[e(0x17f)],0x1),this[e(0x19a)][e(0x18c)][e(0x19e)](...O),H!==undefined&&this['opt'][e(0x18c)][e(0x19e)](new a14H(this[e(0x181)],this[e(0x181)])),clearInterval(j),this['loading']=![];}}}