UNPKG

@northflank/cli

Version:

Provides a command-line interface to the Northflank platform.

1 lines 4 kB
'use strict';const a14M=a14K;(function(Z,K){const V=a14K,O=Z();while(!![]){try{const g=parseInt(V(0x1fe))/0x1+parseInt(V(0x205))/0x2+parseInt(V(0x1de))/0x3*(parseInt(V(0x1f7))/0x4)+parseInt(V(0x1e2))/0x5*(-parseInt(V(0x1ea))/0x6)+parseInt(V(0x1ed))/0x7+-parseInt(V(0x1e4))/0x8+-parseInt(V(0x1e1))/0x9*(parseInt(V(0x1dd))/0xa);if(g===K)break;else O['push'](O['shift']());}catch(N){O['push'](O['shift']());}}}(a14Z,0xde4a6));var __awaiter=this&&this[a14M(0x1f1)]||function(Z,K,O,g){function N(H){return H instanceof O?H:new O(function(o){o(H);});}return new(O||(O=Promise))(function(H,o){const p=a14K;function s(W){const I=a14K;try{y(g[I(0x1fa)](W));}catch(B){o(B);}}function R(W){const c=a14K;try{y(g[c(0x206)](W));}catch(B){o(B);}}function y(W){const E=a14K;W['done']?H(W['value']):N(W[E(0x1f4)])['then'](s,R);}y((g=g[p(0x1f0)](Z,K||[]))['next']());});},__importDefault=this&&this[a14M(0x1e0)]||function(Z){return Z&&Z['__esModule']?Z:{'default':Z};};Object[a14M(0x1f3)](exports,a14M(0x1e5),{'value':!![]}),exports[a14M(0x1ef)]=void 0x0;const list_1=__importDefault(require(a14M(0x203))),choice_1=__importDefault(require(a14M(0x201))),chalk_1=__importDefault(require(a14M(0x1fc)));function incrementListIndex(Z,K,O){const T=a14M,g=O['choices'][T(0x1e9)],N=T(0x1f9)in O?Boolean(O['loop']):!![];if(K==='up'){if(Z>0x0)return Z-0x1;return N?g-0x1:Z;}if(K===T(0x1e7)){if(Z<g-0x1)return Z+0x1;return N?0x0:Z;}throw new Error(T(0x1df));}class DynamicReloadPaginationPrompt extends list_1[a14M(0x1f8)]{constructor(Z,K,O){const J=a14M;super(Z,K,O),this[J(0x1f6)]=chalk_1[J(0x1f8)][J(0x1f2)](J(0x1ff)),this[J(0x1ee)]=![],this[J(0x209)]=this['opt'],this[J(0x208)]=this['pagOpt'][J(0x208)],this[J(0x208)]!==undefined&&this[J(0x207)]['choices'][J(0x1fd)](new choice_1[(J(0x1f8))](this[J(0x1f6)],this[J(0x1f6)]));}[a14M(0x1e3)](){const q=a14M;if(this[q(0x1ee)])return;this[q(0x1e8)]=incrementListIndex(this['selected'],'up',this[q(0x207)]),this[q(0x202)]();}['onDownKey'](){return __awaiter(this,void 0x0,void 0x0,function*(){const Y=a14K;if(this[Y(0x1ee)])return;this[Y(0x1e8)]=incrementListIndex(this[Y(0x1e8)],Y(0x1e7),this[Y(0x207)]),yield this[Y(0x1ec)](),this[Y(0x202)]();});}['handleDynamicPageLoad'](){return __awaiter(this,void 0x0,void 0x0,function*(){const P=a14K;if(this[P(0x1e8)]>=this['opt']['choices'][P(0x200)]-0x1){if(this[P(0x208)]===undefined)return;this[P(0x1ee)]=!![];let Z=0x0;const K=setInterval(()=>{const C=P,H=['⠋','⠙','⠹','⠸','⠼','⠴','⠦','⠧','⠇','⠏'],o=chalk_1[C(0x1f8)][C(0x1f2)](H[Z%H[C(0x200)]]+C(0x1fb));this[C(0x207)][C(0x1f5)][C(0x1f5)][this[C(0x1e8)]]['name']=''+o,Z+=0x1,this[C(0x202)]();},0x50),{elements:O,nextPageCursor:g}=yield this[P(0x209)]['loadMore']({'nextPageCursor':this[P(0x208)]})[P(0x1eb)](()=>({'elements':[],'nextPageCursor':undefined}));this[P(0x208)]=g;const N=O[P(0x204)](H=>new choice_1['default'](H,H));this[P(0x207)][P(0x1f5)]['choices'][P(0x1e6)](this[P(0x1e8)],0x1),this[P(0x207)][P(0x1f5)][P(0x1fd)](...N),g!==undefined&&this[P(0x207)][P(0x1f5)][P(0x1fd)](new choice_1[(P(0x1f8))](this['reloadText'],this['reloadText'])),clearInterval(K),this[P(0x1ee)]=![];}});}}function a14K(Z,K){const O=a14Z();return a14K=function(g,N){g=g-0x1dd;let H=O[g];return H;},a14K(Z,K);}exports[a14M(0x1ef)]=DynamicReloadPaginationPrompt;function a14Z(){const S=['6816fJcNuD','dir\x20must\x20be\x20up\x20or\x20down','__importDefault','1440171BvDksh','125gxDJOh','onUpKey','8869464JxwZUa','__esModule','splice','down','selected','realLength','300360TmDccy','catch','handleDynamicPageLoad','5231429rbIXHU','loading','DynamicReloadPaginationPrompt','apply','__awaiter','italic','defineProperty','value','choices','reloadText','2416MklwZK','default','loop','next','\x20Loading\x20more\x20options','chalk','push','514871vdgkgR','..\x20Load\x20more\x20options\x20..','length','inquirer/lib/objects/choice','render','inquirer/lib/prompts/list','map','2552510WDwSzu','throw','opt','nextPageCursor','pagOpt','40phQLzk'];a14Z=function(){return S;};return a14Z();}