@northflank/cli
Version:
Provides a command-line interface to the Northflank platform.
1 lines • 3.99 kB
JavaScript
'use strict';const a14H=a14a;(function(S,a){const T=a14a,j=S();while(!![]){try{const v=parseInt(T(0x184))/0x1*(parseInt(T(0x1af))/0x2)+parseInt(T(0x18d))/0x3+-parseInt(T(0x194))/0x4*(-parseInt(T(0x1ae))/0x5)+parseInt(T(0x186))/0x6+parseInt(T(0x188))/0x7*(parseInt(T(0x1a3))/0x8)+parseInt(T(0x19e))/0x9+-parseInt(T(0x18c))/0xa;if(v===a)break;else j['push'](j['shift']());}catch(z){j['push'](j['shift']());}}}(a14S,0x376d4));var __awaiter=this&&this[a14H(0x189)]||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 Y=a14a;function g(o){try{i(v['next'](o));}catch(X){u(X);}}function w(o){try{i(v['throw'](o));}catch(X){u(X);}}function i(o){const E=a14a;o['done']?s(o[E(0x191)]):z(o[E(0x191)])[E(0x1a8)](g,w);}i((v=v[Y(0x185)](S,a||[]))[Y(0x1a5)]());});},__importDefault=this&&this[a14H(0x18f)]||function(S){return S&&S['__esModule']?S:{'default':S};};Object[a14H(0x18b)](exports,a14H(0x198),{'value':!![]}),exports['DynamicReloadPaginationPrompt']=void 0x0;function a14S(){const M=['defineProperty','16205420GtOxDj','853803HHtUeW','inquirer/lib/prompts/list','__importDefault','italic','value','opt','default','136QjMILH','handleDynamicPageLoad','loop','DynamicReloadPaginationPrompt','__esModule','map','nextPageCursor','length','selected','dir\x20must\x20be\x20up\x20or\x20down','2354895QBiiur','push','realLength','down','splice','61768DbbDib','\x20Loading\x20more\x20options','next','onDownKey','reloadText','then','loading','catch','chalk','choices','loadMore','20245FmCfcd','3232nHvQxJ','220CFItbQ','apply','2347164kTXNtZ','render','378hYgfZf','__awaiter','pagOpt'];a14S=function(){return M;};return a14S();}const list_1=__importDefault(require(a14H(0x18e))),choice_1=__importDefault(require('inquirer/lib/objects/choice')),chalk_1=__importDefault(require(a14H(0x1ab)));function incrementListIndex(S,a,j){const V=a14H,v=j[V(0x1ac)][V(0x1a0)],z=V(0x196)in j?Boolean(j[V(0x196)]):!![];if(a==='up'){if(S>0x0)return S-0x1;return z?v-0x1:S;}if(a===V(0x1a1)){if(S<v-0x1)return S+0x1;return z?0x0:S;}throw new Error(V(0x19d));}function a14a(S,a){const j=a14S();return a14a=function(v,z){v=v-0x184;let s=j[v];return s;},a14a(S,a);}class DynamicReloadPaginationPrompt extends list_1[a14H(0x193)]{constructor(S,j,v){const K=a14H;super(S,j,v),this[K(0x1a7)]=chalk_1['default']['italic']('..\x20Load\x20more\x20options\x20..'),this[K(0x1a9)]=![],this['pagOpt']=this[K(0x192)],this[K(0x19a)]=this[K(0x18a)]['nextPageCursor'],this[K(0x19a)]!==undefined&&this[K(0x192)][K(0x1ac)]['push'](new choice_1[(K(0x193))](this[K(0x1a7)],this[K(0x1a7)]));}['onUpKey'](){const L=a14H;if(this[L(0x1a9)])return;this['selected']=incrementListIndex(this[L(0x19c)],'up',this[L(0x192)]),this['render']();}[a14H(0x1a6)](){return __awaiter(this,void 0x0,void 0x0,function*(){const A=a14a;if(this[A(0x1a9)])return;this[A(0x19c)]=incrementListIndex(this[A(0x19c)],'down',this[A(0x192)]),yield this['handleDynamicPageLoad'](),this[A(0x187)]();});}[a14H(0x195)](){return __awaiter(this,void 0x0,void 0x0,function*(){const Q=a14a;if(this[Q(0x19c)]>=this['opt'][Q(0x1ac)]['length']-0x1){if(this[Q(0x19a)]===undefined)return;this[Q(0x1a9)]=!![];let S=0x0;const a=setInterval(()=>{const R=Q,s=['⠋','⠙','⠹','⠸','⠼','⠴','⠦','⠧','⠇','⠏'],u=chalk_1[R(0x193)][R(0x190)](s[S%s[R(0x19b)]]+R(0x1a4));this[R(0x192)]['choices'][R(0x1ac)][this[R(0x19c)]]['name']=''+u,S+=0x1,this['render']();},0x50),{elements:j,nextPageCursor:v}=yield this[Q(0x18a)][Q(0x1ad)]({'nextPageCursor':this[Q(0x19a)]})[Q(0x1aa)](()=>({'elements':[],'nextPageCursor':undefined}));this['nextPageCursor']=v;const z=j[Q(0x199)](s=>new choice_1[(Q(0x193))](s,s));this['opt']['choices'][Q(0x1ac)][Q(0x1a2)](this['selected'],0x1),this[Q(0x192)]['choices'][Q(0x19f)](...z),v!==undefined&&this[Q(0x192)][Q(0x1ac)][Q(0x19f)](new choice_1[(Q(0x193))](this[Q(0x1a7)],this[Q(0x1a7)])),clearInterval(a),this[Q(0x1a9)]=![];}});}}exports[a14H(0x197)]=DynamicReloadPaginationPrompt;