@northflank/cli 0.10.4 → 0.10.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-helpers.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/context/contextCommands.js +1 -1
- package/dist/copy/index.js +1 -1
- package/dist/defaults.js +1 -1
- package/dist/exec/index.js +1 -1
- package/dist/formatting/command-overview.js +1 -1
- package/dist/formatting/console-format-helpers.js +1 -1
- package/dist/formatting/terminal-chart.js +1 -1
- package/dist/inquirer-helper.js +1 -1
- package/dist/login/browser-login.js +1 -1
- package/dist/logs/index.js +1 -1
- package/dist/logs/log-formatter.js +1 -1
- package/dist/metrics/index.js +1 -1
- package/dist/pagination/inquirer-pagination-prompt.js +1 -1
- package/dist/port-forward/index.js +1 -1
- package/dist/utils.js +1 -1
- package/package.json +2 -2
package/dist/exec/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a5k=a5K;(function(Z,K){const n=a5K,O=Z();while(!![]){try{const g=-parseInt(n(0x19c))/0x1+parseInt(n(0x16d))/0x2+parseInt(n(0x178))/0x3+-parseInt(n(0x173))/0x4*(-parseInt(n(0x1a3))/0x5)+-parseInt(n(0x193))/0x6+-parseInt(n(0x17e))/0x7+parseInt(n(0x183))/0x8;if(g===K)break;else O['push'](O['shift']());}catch(N){O['push'](O['shift']());}}}(a5Z,0xc029d));function a5Z(){const e=['slice','getStandardExecCommand','greenBright','__esModule','pipe','7753501OieDZH','addCommand','__awaiter','resize','Id\x20[NAME]','14018424ZKvYkl','customUserAgent','service','option','isTTY','setRawMode','ApiClient','--group\x20[GROUP]','then','warning','\x27Ctrl+D\x27','action','CliExec','stdin','execServiceSession','shell\x20command\x20','8824128OtWBdp','--container\x20--containerId\x20[NAME]','exec','\x20--cmd\x20\x27\x22ls\x20-l\x20/usr\x22\x27\x20--shell-cmd\x20\x27bash\x20-c\x27\x0a\x20\x20Shell\x20session,\x20custom\x20shell:\x20\x20northflank\x20exec\x20','\x20--','Command\x20to\x20execute.\x0aIf\x20--shell-cmd\x20option\x20such\x20as\x20\x27bash\x20-c\x27\x20is\x20present,\x20it\x20will\x20run\x20in\x20the\x20specified\x20shell.\x20Otherwise\x20the\x20command\x20will\x20run\x20without\x20a\x20shell.\x20If\x20no\x20command\x20is\x20provided,\x20an\x20interactive\x20session\x20with\x20stdin\x20and\x20tty\x20is\x20opened.','\x20command\x20exec:\x20','execStartLog','columns','837209nMVQlD','default','\x20in\x20project\x20','filter','bold','execCmd','askForProject','15VxiFiE','apiClient','readline','stdout','exit','stdIn','Exec\x20','log','defineProperty','\x20--cmd\x20\x27date\x27\x0a\x20\x20Single\x20command,\x20custom\x20shell:\x20northflank\x20exec\x20','stdOut','emitKeypressEvents','value','assertContextExisting','Project\x20for\x20exec','--user\x20[USER]','\x20to\x20exec\x20into','keypress','apply',',\x20exit\x20code:\x20','__importDefault','Command\x20execution\x20(exec)\x20for\x20Northflank\x20services\x20and\x20jobs.','askForService','with\x20group:','--shell-cmd\x20[SHELL-CMD]','rows','Received\x20Ctrl+D\x20twice,\x20exiting\x20shell\x20forcefully.','name','getTerminalSize','join','waitForCommandResult','Command\x20exec\x20for\x20the\x20specified\x20','job','message','../utils','askForJob','../inquirer-helper','Unknown','getCurrentServiceName','Run\x20command\x20with\x20this\x20group','Command\x20completed\x20successfully,\x20exit\x20code:\x20','description','InquirerHelper','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','3081042CFekHg','status','chalk','next','error','getCommand','892396DQDiEJ','handleShellSession','resizeTerminal','getCurrentProjectName','Run\x20command\x20with\x20shell\x20(e.g.\x20\x27bash\x27,\x27sh\x27).\x0aIf\x20not\x20set\x20and\x20no\x20command\x20is\x20provided,\x20several\x20standard\x20shells\x20will\x20be\x20attempted.\x20If\x20not\x20set\x20and\x20a\x20command\x20is\x20provided,\x20the\x20command\x20will\x20run\x20without\x20shell.','721560NsrjkR'];a5Z=function(){return e;};return a5Z();}var __awaiter=this&&this[a5k(0x180)]||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 r=a5K;function s(W){const x=a5K;try{y(g[x(0x170)](W));}catch(B){o(B);}}function R(W){try{y(g['throw'](W));}catch(B){o(B);}}function y(W){const m=a5K;W['done']?H(W['value']):N(W[m(0x1af)])[m(0x18b)](s,R);}y((g=g[r(0x1b5)](Z,K||[]))[r(0x170)]());});},__importDefault=this&&this[a5k(0x1b7)]||function(Z){const D=a5k;return Z&&Z[D(0x17c)]?Z:{'default':Z};};Object[a5k(0x1ab)](exports,a5k(0x17c),{'value':!![]}),exports[a5k(0x18f)]=void 0x0;const js_client_1=require('@northflank/js-client'),chalk_1=__importDefault(require(a5k(0x16f))),utils_1=require(a5k(0x1c5)),inquirer_helper_1=require(a5k(0x1c7));function a5K(Z,K){const O=a5Z();return a5K=function(g,N){g=g-0x167;let H=O[g];return H;},a5K(Z,K);}class CliExec{constructor(Z,K){const d=a5k;this[d(0x17a)]=H=>(0x0,utils_1['getCommand'])(!![])['name'](H)['description'](d(0x1c2)+H+'.\x0aExamples:\x0a\x20\x20Shell\x20session:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20northflank\x20exec\x20'+H+'\x0a\x20\x20Single\x20command,\x20no\x20shell:\x20\x20\x20\x20\x20northflank\x20exec\x20'+H+d(0x1ac)+H+d(0x196)+H+'\x20--shell-cmd\x20\x27sh\x27')['option']('--project\x20--projectId\x20[NAME]',d(0x1b1))[d(0x186)]('--'+H+d(0x197)+H+d(0x182),H['charAt'](0x0)['toUpperCase']()+H[d(0x179)](0x1)+d(0x1b3))[d(0x186)](d(0x194),'Container\x20to\x20exec\x20into\x20(random\x20container\x20will\x20be\x20chosen\x20if\x20not\x20specified)')[d(0x186)](d(0x1bb),d(0x177))[d(0x186)](d(0x1b2),'Run\x20command\x20with\x20this\x20user')[d(0x186)](d(0x18a),d(0x168))[d(0x186)]('--noDefaults',d(0x16c),![])[d(0x186)]('--cmd\x20--command\x20[COMMAND]',d(0x198)),this[d(0x1bf)]=()=>({'columns':process[d(0x1a6)][d(0x19b)],'rows':process[d(0x1a6)][d(0x1bc)]}),this[d(0x19a)]=(H,o,s,R,y,W,B,V)=>{const b=d;if(V===!![])return;const M=R==='none',I=M?'without\x20shell':R===undefined?'with\x20shell\x20session':b(0x192)+chalk_1[b(0x19d)][b(0x17b)](R),c=y!==undefined?'with\x20user:'+y:'',E=W!==undefined?b(0x1ba)+W:'',p=B!==undefined?'with\x20command\x20\x27'+chalk_1[b(0x19d)][b(0x17b)](B)+'\x27':'',T=[p,I,c,E][b(0x19f)](q=>q!=='')[b(0x1c0)]('\x20'),J='(exit\x20with\x20two\x20quick\x20'+chalk_1['default']['bold'](b(0x18d))+')';console[b(0x1aa)](b(0x1a9)+H+'\x20'+chalk_1['default'][b(0x1a0)](o)+b(0x19e)+chalk_1[b(0x19d)][b(0x1a0)](s)+'\x20'+T+'\x20'+J);},this[d(0x174)]=(H,o,s=![])=>__awaiter(this,void 0x0,void 0x0,function*(){const l=d;var R,y;let W=![];try{if(process['stdin'][l(0x187)]){const V=require(l(0x1a5));V[l(0x1ae)](process[l(0x190)]),process[l(0x190)][l(0x188)](!![]),process[l(0x1a6)]['on'](l(0x181),()=>{const f=l;H[f(0x175)](this[f(0x1bf)]());}),process['stdin']['on'](l(0x1b4),(M,I)=>{const a=l;I['sequence']==='\x04'&&(W?(process[a(0x190)]['setRawMode'](![]),(0x0,utils_1[a(0x18c)])(a(0x1bd)),process[a(0x1a7)]()):(W=!![],setTimeout(()=>W=![],0x190)));});}process[l(0x190)]['pipe'](H[l(0x1a8)]),H['stdErr']['pipe'](process['stderr']),H[l(0x1ad)][l(0x17d)](process[l(0x1a6)]),H['on']('error',M=>{const v=l;var I;(0x0,utils_1['error'])('Error\x20occured\x20during\x20'+o+v(0x199)+((I=M[v(0x1c4)])!==null&&I!==void 0x0?I:M)),process[v(0x190)][v(0x187)]&&process[v(0x190)]['setRawMode'](![]),process['exit'](-0x1);});const B=yield H[l(0x1c1)]();if(s!==!![]){const M=(R=B===null||B===void 0x0?void 0x0:B[l(0x16e)])!==null&&R!==void 0x0?R:l(0x1c8),I=(y=B===null||B===void 0x0?void 0x0:B['exitCode'])!==null&&y!==void 0x0?y:-0x1,c=(B===null||B===void 0x0?void 0x0:B[l(0x1c4)])?',\x20details:\x20'+B['message']:'';M==='Success'?(0x0,utils_1['success'])(l(0x169)+I):(0x0,utils_1[l(0x18c)])('Command\x20didn\x27t\x20complete\x20successfully,\x20status:\x20'+M+l(0x1b6)+I+c);}return B;}finally{process['stdin'][l(0x187)]&&process['stdin']['setRawMode'](![]);}}),this['apiClient']=new js_client_1[(d(0x189))](Z,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[d(0x184)],'agent':K});const O=new inquirer_helper_1[(d(0x16b))](this['apiClient']);this[d(0x1a1)]=(0x0,utils_1[d(0x172)])()[d(0x1be)]('command-exec')['alias'](d(0x195))[d(0x16a)](d(0x1b8));const g=this['getStandardExecCommand'](d(0x185))[d(0x18e)](H=>__awaiter(this,void 0x0,void 0x0,function*(){const L=d,{noDefaults:o,projectId:s,serviceId:R,containerId:y,shellCmd:W,user:B,group:V,command:M,quiet:I}=H;(0x0,utils_1[L(0x1b0)])(this[L(0x1a4)]);try{const c=o?undefined:Z[L(0x176)](),E=s||c||(yield O[L(0x1a2)]()),p=o?undefined:Z[L(0x167)](),T=R||p||(yield O[L(0x1b9)](E)()),J=W!==null&&W!==void 0x0?W:M!==undefined?'none':undefined;this[L(0x19a)](L(0x185),T,E,J,B,V,M,I);const q=process[L(0x1a6)][L(0x19b)],Y=process[L(0x1a6)][L(0x1bc)],P={'projectId':E,'serviceId':T},C=yield this[L(0x1a4)][L(0x195)][L(0x191)](P,{'containerName':y,'command':M,'shell':J,'user':B,'group':V,'ttyColumns':q,'ttyRows':Y});yield this[L(0x174)](C,'service',I);}catch(S){(0x0,utils_1[L(0x171)])(''+S[L(0x1c4)]);}finally{process['exit']();}})),N=this[d(0x17a)](d(0x1c3))[d(0x18e)](H=>__awaiter(this,void 0x0,void 0x0,function*(){const X=d,{projectId:o,jobId:s,containerId:R,noDefaults:y,shellCmd:W,user:B,group:V,command:M,quiet:I}=H;(0x0,utils_1[X(0x1b0)])(this[X(0x1a4)]);try{const c=y?undefined:Z[X(0x176)](),E=o||c||(yield O['askForProject']()),p=s||(yield O[X(0x1c6)](E)());this[X(0x19a)](X(0x1c3),p,E,W,I);const {rows:T,columns:J}=this[X(0x1bf)](),q={'projectId':E,'jobId':p},Y=yield this[X(0x1a4)][X(0x195)]['execJobSession'](q,{'containerName':R,'command':M,'shell':W,'user':B,'group':V,'ttyColumns':J,'ttyRows':T});yield this[X(0x174)](Y,X(0x1c3),I);}catch(P){(0x0,utils_1[X(0x171)])(''+P['message']);}finally{process[X(0x1a7)]();}}));this[d(0x1a1)][d(0x17f)](g),this[d(0x1a1)][d(0x17f)](N);}}exports['CliExec']=CliExec;
|
|
1
|
+
'use strict';function a5f(){const X=['__awaiter','Error\x20occured\x20during\x20','execStartLog','description','with\x20shell\x20session','CliExec','apiClient','Command\x20execution\x20(exec)\x20for\x20Northflank\x20services\x20and\x20jobs.','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','exec','next','with\x20command\x20\x27','@northflank/js-client','bold','service','message','../utils','columns','39oqtyHE','askForProject','getCurrentServiceName','command-exec','getStandardExecCommand','isTTY','stdout','Exec\x20','value','exit','\x20to\x20exec\x20into','Instance\x20to\x20exec\x20into\x20',',\x20details:\x20','31280QKZsMY','Run\x20command\x20with\x20shell\x20(e.g.\x20\x27bash\x27,\x27sh\x27).\x0aIf\x20not\x20set\x20and\x20no\x20command\x20is\x20provided,\x20several\x20standard\x20shells\x20will\x20be\x20attempted.\x20If\x20not\x20set\x20and\x20a\x20command\x20is\x20provided,\x20the\x20command\x20will\x20run\x20without\x20shell.','askForAddon','getCommand','\x20on\x20instance\x20','none','done','with\x20group:','--shell-cmd\x20[SHELL-CMD]','default','throw','1830zpnWwa','pipe','\x0a\x20\x20Single\x20command,\x20no\x20shell:\x20\x20\x20\x20\x20northflank\x20exec\x20','then','__esModule','Container\x20within\x20instance\x20to\x20exec\x20into\x20(if\x20not\x20specified,\x20first\x20container\x20of\x20the\x20instance\x20will\x20be\x20selected)','45783BkXyXw','containerName','alias','instanceName','rows','keypress','882MoYkPF','log','\x20in\x20container\x20','stdOut','toUpperCase','askForService','Run\x20command\x20with\x20this\x20group','106346dFqNse','Unknown','exitCode',',\x20exit\x20code:\x20','name','../inquirer-helper','error','\x20--','resizeTerminal','chalk','__importDefault','addCommand','--user\x20[USER]','stderr','Success','\x20--shell-cmd\x20\x27sh\x27','job','action','execCmd','Command\x20didn\x27t\x20complete\x20successfully,\x20status:\x20','10029016gvshAN','emitKeypressEvents','join','shell\x20command\x20','--cmd\x20--command\x20[COMMAND]','55992kcVHYG','199706KLowtX','charAt','askForJob','3534356XMzjcr','readline','status','Command\x20exec\x20for\x20the\x20specified\x20','.\x0aExamples:\x0a\x20\x20Shell\x20session:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20northflank\x20exec\x20','option','stdin','\x20--cmd\x20\x27date\x27\x0a\x20\x20Single\x20command,\x20custom\x20shell:\x20northflank\x20exec\x20','sequence','--project\x20--projectId\x20[NAME]','getTerminalSize','stdIn','\x20--cmd\x20\x27\x22ls\x20-l\x20/usr\x22\x27\x20--shell-cmd\x20\x27bash\x20-c\x27\x0a\x20\x20Shell\x20session,\x20custom\x20shell:\x20\x20northflank\x20exec\x20','resize','greenBright','getCurrentProjectName','Project\x20for\x20exec','InquirerHelper','handleShellSession','execJobSession','execAddonSession','setRawMode','Received\x20Ctrl+D\x20twice,\x20exiting\x20shell\x20forcefully.','\x20command\x20exec:\x20','\x20in\x20project\x20','Command\x20completed\x20successfully,\x20exit\x20code:\x20','(only\x20applicable\x20for\x20custom\x20addon\x20types)\x20','--container\x20--containerName\x20[NAME]','addon','assertContextExisting','defineProperty','waitForCommandResult'];a5f=function(){return X;};return a5f();}const a5A=a5y;(function(f,y){const u=a5y,z=f();while(!![]){try{const K=parseInt(u(0x1c1))/0x1+-parseInt(u(0x1db))/0x2*(parseInt(u(0x196))/0x3)+parseInt(u(0x1de))/0x4+parseInt(u(0x1a3))/0x5+parseInt(u(0x1da))/0x6*(-parseInt(u(0x1ba))/0x7)+parseInt(u(0x1d5))/0x8+parseInt(u(0x1b4))/0x9*(parseInt(u(0x1ae))/0xa);if(K===y)break;else z['push'](z['shift']());}catch(Y){z['push'](z['shift']());}}}(a5f,0xac902));function a5y(f,y){const z=a5f();return a5y=function(K,Y){K=K-0x175;let r=z[K];return r;},a5y(f,y);}var __awaiter=this&&this[a5A(0x184)]||function(f,y,z,K){function Y(r){return r instanceof z?r:new z(function(p){p(r);});}return new(z||(z=Promise))(function(r,p){const T=a5y;function L(m){const x=a5y;try{s(K[x(0x18e)](m));}catch(b){p(b);}}function Q(m){const j=a5y;try{s(K[j(0x1ad)](m));}catch(b){p(b);}}function s(e){const a=a5y;e[a(0x1a9)]?r(e['value']):Y(e[a(0x19e)])[a(0x1b1)](L,Q);}s((K=K['apply'](f,y||[]))[T(0x18e)]());});},__importDefault=this&&this[a5A(0x1cb)]||function(f){return f&&f['__esModule']?f:{'default':f};};Object[a5A(0x182)](exports,a5A(0x1b2),{'value':!![]}),exports[a5A(0x189)]=void 0x0;const js_client_1=require(a5A(0x190)),chalk_1=__importDefault(require(a5A(0x1ca))),utils_1=require(a5A(0x194)),inquirer_helper_1=require(a5A(0x1c6));class CliExec{constructor(f,y){const F=a5A;this[F(0x19a)]=p=>{const k=F,L=(0x0,utils_1[k(0x1a6)])(!![])[k(0x1c5)](p)[k(0x187)](k(0x1e1)+p+(p===k(0x180)?k(0x17e):'')+k(0x1e2)+p+k(0x1b0)+p+k(0x1e5)+p+k(0x1ea)+p+k(0x1d0))['option'](k(0x1e7),k(0x1ee))[k(0x1e3)]('--'+p+k(0x1c8)+p+'Id\x20[NAME]',p[k(0x1dc)](0x0)[k(0x1be)]()+p['slice'](0x1)+k(0x1a0))['option']('--instance\x20--instanceName\x20[NAME]',k(0x1a1)+(p==='addon'?'(required)\x20':'(random\x20instance\x20will\x20be\x20chosen\x20if\x20not\x20specified)'))[k(0x1e3)](k(0x1ab),k(0x1a4))[k(0x1e3)]('--noDefaults',k(0x18c),![])[k(0x1e3)](k(0x1d9),'Command\x20to\x20execute.\x0aIf\x20--shell-cmd\x20option\x20such\x20as\x20\x27bash\x20-c\x27\x20is\x20present,\x20it\x20will\x20run\x20in\x20the\x20specified\x20shell.\x20Otherwise\x20the\x20command\x20will\x20run\x20without\x20a\x20shell.\x20If\x20no\x20command\x20is\x20provided,\x20an\x20interactive\x20session\x20with\x20stdin\x20and\x20tty\x20is\x20opened.');return p!==k(0x180)&&L[k(0x1e3)](k(0x1cd),'Run\x20command\x20with\x20this\x20user')[k(0x1e3)]('--group\x20[GROUP]',k(0x1c0)),p===k(0x180)&&L['option'](k(0x17f),k(0x1b3)),L;},this['getTerminalSize']=()=>({'columns':process[F(0x19c)][F(0x195)],'rows':process['stdout'][F(0x1b8)]}),this['execStartLog']=(p,L,Q,s,e,m,b,N,V,i)=>{const w=F;if(N===!![])return;const g=s===w(0x1a8),t=V!==undefined?w(0x1a7)+chalk_1['default'][w(0x191)](V):'',l=i!==undefined?w(0x1bc)+chalk_1[w(0x1ac)][w(0x191)](i):'',Z=g?'without\x20shell':s===undefined?w(0x188):w(0x1d8)+chalk_1[w(0x1ac)]['greenBright'](s),J=e?'with\x20user:'+e:'',d=m?w(0x1aa)+m:'',n=b?w(0x18f)+chalk_1[w(0x1ac)][w(0x1ec)](b)+'\x27':'',G=[n,Z,J,d]['filter'](D=>D!=='')[w(0x1d7)]('\x20'),P='(exit\x20with\x20two\x20quick\x20'+chalk_1[w(0x1ac)][w(0x191)]('\x27Ctrl+D\x27')+')';console[w(0x1bb)](w(0x19d)+p+'\x20'+chalk_1[w(0x1ac)]['bold'](L)+w(0x17c)+chalk_1[w(0x1ac)][w(0x191)](Q)+t+l+'\x20'+G+'\x20'+P);},this[F(0x176)]=(p,L,Q=![])=>__awaiter(this,void 0x0,void 0x0,function*(){const c=F;var s,e;let m=![];try{if(process[c(0x1e4)][c(0x19b)]){const N=require(c(0x1df));N[c(0x1d6)](process[c(0x1e4)]),process[c(0x1e4)][c(0x179)](!![]),process[c(0x19c)]['on'](c(0x1eb),()=>{const B=c;p[B(0x1c9)](this['getTerminalSize']());}),process[c(0x1e4)]['on'](c(0x1b9),(V,i)=>{const E=c;i[E(0x1e6)]==='\x04'&&(m?(process['stdin'][E(0x179)](![]),(0x0,utils_1['warning'])(E(0x17a)),process[E(0x19f)]()):(m=!![],setTimeout(()=>m=![],0x190)));});}process[c(0x1e4)][c(0x1af)](p[c(0x1e9)]),p['stdErr'][c(0x1af)](process[c(0x1ce)]),p[c(0x1bd)][c(0x1af)](process[c(0x19c)]),p['on']('error',V=>{const q=c;var i;(0x0,utils_1[q(0x1c7)])(q(0x185)+L+q(0x17b)+((i=V[q(0x193)])!==null&&i!==void 0x0?i:V)),process['stdin']['isTTY']&&process['stdin'][q(0x179)](![]),process['exit'](-0x1);});const b=yield p[c(0x183)]();if(Q!==!![]){const V=(s=b===null||b===void 0x0?void 0x0:b[c(0x1e0)])!==null&&s!==void 0x0?s:c(0x1c2),i=(e=b===null||b===void 0x0?void 0x0:b[c(0x1c3)])!==null&&e!==void 0x0?e:-0x1,g=(b===null||b===void 0x0?void 0x0:b[c(0x193)])?c(0x1a2)+b[c(0x193)]:'';V===c(0x1cf)?(0x0,utils_1['success'])(c(0x17d)+i):(0x0,utils_1['warning'])(c(0x1d4)+V+c(0x1c4)+i+g);}return b;}finally{process[c(0x1e4)][c(0x19b)]&&process[c(0x1e4)][c(0x179)](![]);}}),this[F(0x18a)]=new js_client_1['ApiClient'](f,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1['customUserAgent'],'agent':y});const z=new inquirer_helper_1[(F(0x175))](this[F(0x18a)]);this[F(0x1d3)]=(0x0,utils_1['getCommand'])()['name'](F(0x199))[F(0x1b6)]('exec')['description'](F(0x18b));const K=this[F(0x19a)]('service')[F(0x1d2)](p=>__awaiter(this,void 0x0,void 0x0,function*(){const U=F,{noDefaults:L,projectId:Q,serviceId:s,instanceName:m}=p,{shellCmd:b,user:N,group:V,command:i,quiet:g}=p;(0x0,utils_1['assertContextExisting'])(this[U(0x18a)]);try{const t=L?undefined:f['getCurrentProjectName'](),l=Q||t||(yield z[U(0x197)]()),Z=L?undefined:f[U(0x198)](),J=s||Z||(yield z[U(0x1bf)](l)()),d=b!==null&&b!==void 0x0?b:i!==undefined?U(0x1a8):undefined,n=process['stdout'][U(0x195)],G=process['stdout'][U(0x1b8)],P={'projectId':l,'serviceId':J},D={'instanceName':m,'command':i,'shell':d,'user':N,'group':V,'ttyColumns':n,'ttyRows':G},H=yield this[U(0x18a)][U(0x18d)]['execServiceSession'](P,D,C=>{const M=U;this[M(0x186)]('service',J,l,b,N,V,i,g,C[M(0x1b7)],C[M(0x1b5)]);});yield this['handleShellSession'](H,U(0x192),g);}catch(C){(0x0,utils_1[U(0x1c7)])(''+C[U(0x193)]);}finally{process[U(0x19f)]();}})),Y=this[F(0x19a)](F(0x1d1))['action'](p=>__awaiter(this,void 0x0,void 0x0,function*(){const o=F,{projectId:L,jobId:Q,instanceName:s}=p,{noDefaults:m,shellCmd:b,user:N,group:V,command:i,quiet:g}=p;(0x0,utils_1[o(0x181)])(this[o(0x18a)]);try{const t=m?undefined:f[o(0x1ed)](),l=L||t||(yield z['askForProject']()),Z=Q||(yield z[o(0x1dd)](l)()),{rows:J,columns:d}=this[o(0x1e8)](),n={'projectId':l,'jobId':Z},G={'instanceName':s,'command':i,'shell':b,'user':N,'group':V,'ttyColumns':d,'ttyRows':J},P=yield this[o(0x18a)][o(0x18d)][o(0x177)](n,G,D=>{const h=o;this[h(0x186)](h(0x1d1),Z,l,b,N,V,i,g,D['instanceName'],D[h(0x1b5)]);});yield this[o(0x176)](P,o(0x1d1),g);}catch(D){(0x0,utils_1[o(0x1c7)])(''+D['message']);}finally{process[o(0x19f)]();}})),r=this[F(0x19a)](F(0x180))['action'](p=>__awaiter(this,void 0x0,void 0x0,function*(){const I=F,{projectId:L,addonId:Q,instanceName:s,containerName:m}=p,{noDefaults:b,shellCmd:N,user:V,group:i,command:g,quiet:t}=p;(0x0,utils_1['assertContextExisting'])(this['apiClient']);try{const l=b?undefined:f['getCurrentProjectName'](),Z=L||l||(yield z[I(0x197)]()),J=Q||(yield z[I(0x1a5)](Z)()),{rows:d,columns:n}=this[I(0x1e8)](),G=N!==null&&N!==void 0x0?N:g!==undefined?I(0x1a8):undefined,P={'projectId':Z,'addonId':J},D={'instanceName':s,'containerName':m,'command':g,'shell':G,'user':V,'group':i,'ttyColumns':n,'ttyRows':d},H=yield this[I(0x18a)][I(0x18d)][I(0x178)](P,D,C=>{const v=I;this['execStartLog'](v(0x180),J,Z,G,V,i,g,t,C['instanceName'],C['containerName']);});yield this[I(0x176)](H,I(0x180),t);}catch(C){(0x0,utils_1['error'])(''+C[I(0x193)]);}finally{process[I(0x19f)]();}}));this['execCmd'][F(0x1cc)](K),this[F(0x1d3)][F(0x1cc)](Y),this['execCmd'][F(0x1cc)](r);}}exports[a5A(0x189)]=CliExec;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a6n=a6y;(function(f,y){const d=a6y,z=f();while(!![]){try{const K=parseInt(d(0x1af))/0x1+-parseInt(d(0x1bc))/0x2+parseInt(d(0x1ad))/0x3*(-parseInt(d(0x1b2))/0x4)+parseInt(d(0x19b))/0x5+parseInt(d(0x19d))/0x6*(parseInt(d(0x19a))/0x7)+-parseInt(d(0x1b4))/0x8*(parseInt(d(0x19e))/0x9)+-parseInt(d(0x1a7))/0xa*(parseInt(d(0x1a5))/0xb);if(K===y)break;else z['push'](z['shift']());}catch(Y){z['push'](z['shift']());}}}(a6f,0x57725));function a6f(){const A=['142716pWQzTZ','forEach','next','slice','join','70385PIpIKg','2377700srLnLq','description','270IgtOfz','18vQNeTS','action','then','commands','log','option','value','3553krQtBR','getCommandOverview','3130tTMtfO','opts','__esModule','map','chalk','defineProperty','497229CVSPdb','Print\x20command\x20descriptions','342814liKLim','__importDefault','length','4dWIQnc','../utils','2297792jXLZCp','__awaiter','getCommand','default','Prints\x20a\x20tree\x20view\x20of\x20all\x20available\x20commands','name','done','green'];a6f=function(){return A;};return a6f();}var __awaiter=this&&this[a6n(0x1b5)]||function(f,y,z,K){function Y(r){return r instanceof z?r:new z(function(p){p(r);});}return new(z||(z=Promise))(function(r,p){const P=a6y;function L(m){try{s(K['next'](m));}catch(b){p(b);}}function Q(m){try{s(K['throw'](m));}catch(b){p(b);}}function s(e){const G=a6y;e[G(0x1ba)]?r(e['value']):Y(e[G(0x1a4)])[G(0x1a0)](L,Q);}s((K=K['apply'](f,y||[]))[P(0x1be)]());});},__importDefault=this&&this[a6n(0x1b0)]||function(f){const D=a6n;return f&&f[D(0x1a9)]?f:{'default':f};};function a6y(f,y){const z=a6f();return a6y=function(K,Y){K=K-0x19a;let r=z[K];return r;},a6y(f,y);}Object[a6n(0x1ac)](exports,a6n(0x1a9),{'value':!![]}),exports[a6n(0x1a6)]=void 0x0;const chalk_1=__importDefault(require(a6n(0x1ab))),utils_1=require(a6n(0x1b3));function getCommandOverview(f){const H=a6n;return(0x0,utils_1[H(0x1b6)])()[H(0x1b9)]('command-overview')['description'](H(0x1b8))[H(0x1a3)]('--verbose',H(0x1ae))[H(0x19f)](y=>__awaiter(this,void 0x0,void 0x0,function*(){const {verbose:z}=y;function K(Y,r){const C=a6y;var p;const L=(l,Z=!![])=>Z?chalk_1[C(0x1b7)]['bold'][C(0x1bb)](l[C(0x1b9)]()):l[C(0x1b9)](),Q=r['length']===0x0,s=Y['commands'];let e='';const m=s[C(0x1b1)]===0x0,b=m||((p=Object['keys'](Y===null||Y===void 0x0?void 0x0:Y[C(0x1a8)]()))===null||p===void 0x0?void 0x0:p[C(0x1b1)])>0x0;!Q&&(e=s&&!m?'┬\x20':'─\x20');const N=z&&b&&Y[C(0x19c)]()?':\x20'+Y[C(0x19c)]():'';console['log'](''+r+e+L(Y,b)+N);let V=r;if(!Q){const l=r['slice'](-0x2)==='└─';V=r[C(0x1bf)](0x0,-0x2)+(l?'\x20\x20':'│\x20');}const i=V+'├─',g=V+'└─',t=s['every'](Z=>Z[C(0x1a1)][C(0x1b1)]===0x0);t&&!m&&!z?console[C(0x1a2)](g+'\x20'+s[C(0x1aa)](Z=>L(Z))[C(0x1c0)](',\x20')):s[C(0x1bd)]((Z,J)=>{const u=C;K(Z,s[u(0x1b1)]-0x1===J?g:i);});}K(f,'');}));}exports['getCommandOverview']=getCommandOverview;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a7g=a7y;function a7f(){const T=['416808lzVSAk','handleYamlOutput','__importDefault','3222446xVzwZy','printResponse','yml','5GmHFCD','chalk','stringify','safeDump','isUndefined','1400088ZlwhNp','call','updatedat','prototype','The\x20request\x20was\x20completed\x20successfully','getMinutes','1CtbUxF','get','toLowerCase','length','bold','log','\x20(HTTP\x20status:\x20','handleJsonOutput','sort','getOwnPropertyDescriptor','307287DZrTdw','yaml','isFinite','consoleFormat','inspect','replace','\x20found','handleFormattedOutput','js-yaml','isArrayLike','No\x20','keys','getDate','__importStar','create','toString','columnify','printAsTable','4wKJiFL','json','map','defineProperty','disabled','default','internalId','util','isObjectLike','includes','getFullYear','20054452lbErTd','isEmpty','format','lodash','hasOwnProperty','5122746ScDoZq','__esModule','10gmfSsc','writable','__createBinding','getSeconds','1976079lQLQwW'];a7f=function(){return T;};return a7f();}(function(f,y){const i=a7y,z=f();while(!![]){try{const K=parseInt(i(0x165))/0x1*(parseInt(i(0x157))/0x2)+parseInt(i(0x16f))/0x3*(-parseInt(i(0x13d))/0x4)+parseInt(i(0x15a))/0x5*(parseInt(i(0x14d))/0x6)+parseInt(i(0x153))/0x7+parseInt(i(0x15f))/0x8+parseInt(i(0x154))/0x9*(-parseInt(i(0x14f))/0xa)+-parseInt(i(0x148))/0xb;if(K===y)break;else z['push'](z['shift']());}catch(Y){z['push'](z['shift']());}}}(a7f,0xe80b1));var __createBinding=this&&this[a7g(0x151)]||(Object[a7g(0x139)]?function(f,y,z,K){const t=a7g;if(K===undefined)K=z;var Y=Object[t(0x16e)](y,z);(!Y||(t(0x166)in Y?!y[t(0x14e)]:Y[t(0x150)]||Y['configurable']))&&(Y={'enumerable':!![],'get':function(){return y[z];}}),Object[t(0x140)](f,K,Y);}:function(f,y,z,K){if(K===undefined)K=z;f[K]=y[z];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(f,y){const l=a7g;Object[l(0x140)](f,l(0x142),{'enumerable':!![],'value':y});}:function(f,y){const Z=a7g;f[Z(0x142)]=y;}),__importStar=this&&this[a7g(0x138)]||function(f){const J=a7g;if(f&&f[J(0x14e)])return f;var y={};if(f!=null){for(var z in f)if(z!==J(0x142)&&Object[J(0x162)][J(0x14c)][J(0x160)](f,z))__createBinding(y,f,z);}return __setModuleDefault(y,f),y;},__importDefault=this&&this[a7g(0x156)]||function(f){return f&&f['__esModule']?f:{'default':f};};Object[a7g(0x140)](exports,a7g(0x14e),{'value':!![]}),exports['printResponse']=exports[a7g(0x176)]=exports[a7g(0x155)]=exports[a7g(0x16c)]=exports[a7g(0x172)]=exports[a7g(0x13c)]=void 0x0;const chalk_1=__importDefault(require(a7g(0x15b))),_=__importStar(require(a7g(0x14b))),util=__importStar(require(a7g(0x144))),yaml=require(a7g(0x133)),columnify=require(a7g(0x13b));function printAsTable(f,y,z,K=![],Y=0x0){const d=a7g;!K&&console[d(0x16a)](''+chalk_1[d(0x142)][d(0x169)](y));function r(L){const n=d;return L===n(0x141)?L:L[n(0x174)]('disabled','');}function p(L,Q){const P=d;function s(m){const G=a7y,b=new Date(m);return b[G(0x137)]()+'/'+b['getMonth']()+'/'+b[G(0x147)]()+'\x0a'+b['getHours']()+':'+b[G(0x164)]()+':'+b[G(0x152)]();}const e=['createdat',P(0x161)];if(e[P(0x146)](Q[P(0x167)]())&&_[P(0x171)](L)&&L[P(0x13a)]()[P(0x168)]===0xd)return s(Number(L));if(_['isBoolean'](L)){if(Q!=='disabled'&&Q[P(0x146)]('disabled'))return L?'x':'✔';return L?'✔':'x';}if(_[P(0x145)](L))return util[P(0x173)](L,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});return L;}if(_[d(0x134)](f)){f[d(0x168)]===0x0&&console['log'](d(0x135)+y[d(0x167)]()+d(0x175));const L=f[d(0x13f)]((e,m)=>{const D=d,b={'i':m+Y};return Object[D(0x136)](e)['forEach'](N=>{const H=D;(_[H(0x15e)](z)||z[H(0x146)](N[H(0x167)]()))&&_['set'](b,r(N),p(e[N],N));}),b;}),Q=_['clone'](Object[d(0x136)]((L===null||L===void 0x0?void 0x0:L[0x0])||[]))[d(0x16d)]((e,m)=>{const C=d,N=V=>V!=='i'?V!==C(0x143)?0x0:0x1:0x2;return N(m)-N(e);}),s={'maxWidth':0x1e,'preserveNewLines':!![],'showHeaders':!K,'config':{'_id':{'maxWidth':0x5,'truncate':!![]},'i':{'showHeaders':![]}},'columns':Q};console[d(0x16a)](columnify(L,s));}else console[d(0x16a)](f);}exports[a7g(0x13c)]=printAsTable;function consoleFormat(f,y){const u=a7g;if(_[u(0x149)](f)){const z=y?u(0x16b)+y+')':'';return chalk_1[u(0x142)]['green'](u(0x163))+z;}if(!_[u(0x145)](f))return f===null||f===void 0x0?void 0x0:f[u(0x13a)]();return util[u(0x173)](f,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});}exports[a7g(0x172)]=consoleFormat;const handleJsonOutput=(f,y)=>{const A=a7g,z=f===A(0x13e);if(z)console[A(0x16a)](JSON[A(0x15c)](y,null,'\x20'));};exports[a7g(0x16c)]=handleJsonOutput;const handleYamlOutput=(f,y)=>{const x=a7g,z=f===x(0x170)||f===x(0x159);if(z)console[x(0x16a)](yaml[x(0x15d)](y));};exports[a7g(0x155)]=handleYamlOutput;const handleFormattedOutput=(f,y)=>{const j=a7g,z=f===j(0x14a);if(z)console[j(0x16a)](consoleFormat(y));};exports[a7g(0x176)]=handleFormattedOutput;function a7y(f,y){const z=a7f();return a7y=function(K,Y){K=K-0x133;let r=z[K];return r;},a7y(f,y);}const printResponse=(f,y)=>{const a=a7g;(0x0,exports[a(0x16c)])(f,y),(0x0,exports[a(0x155)])(f,y),(0x0,exports[a(0x176)])(f,y);};exports[a7g(0x158)]=printResponse;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a8S=a8y;(function(f,y){const R=a8y,z=f();while(!![]){try{const K=parseInt(R(0x150))/0x1+-parseInt(R(0x165))/0x2+-parseInt(R(0x14b))/0x3*(parseInt(R(0x15c))/0x4)+parseInt(R(0x161))/0x5+-parseInt(R(0x15d))/0x6+parseInt(R(0x169))/0x7+-parseInt(R(0x155))/0x8*(-parseInt(R(0x15f))/0x9);if(K===y)break;else z['push'](z['shift']());}catch(Y){z['push'](z['shift']());}}}(a8f,0x22433));var __importDefault=this&&this[a8S(0x14f)]||function(f){return f&&f['__esModule']?f:{'default':f};};Object[a8S(0x166)](exports,'__esModule',{'value':!![]}),exports[a8S(0x163)]=exports[a8S(0x15e)]=void 0x0;function a8y(f,y){const z=a8f();return a8y=function(K,Y){K=K-0x142;let r=z[K];return r;},a8y(f,y);}const chalk_1=__importDefault(require(a8S(0x144))),colored=(f,y)=>{return y===undefined?f:chalk_1['default'][y](f);},getAsciiChart=(f,z={})=>{const W=a8S,K=Array['isArray'](f[0x0])?f:[f];let Y=typeof z[W(0x154)]!==W(0x153)?z[W(0x154)]:K[0x0][0x0],r=typeof z[W(0x160)]!==W(0x153)?z[W(0x160)]:K[0x0][0x0];for(let G=0x0;G<K[W(0x14c)];G++){for(let P=0x0;P<K[G][W(0x14c)];P++){Y=Math[W(0x154)](Y,K[G][P]),r=Math[W(0x160)](r,K[G][P]);}}let p=['┼','┤','╶','╴','─','╰','╭','╮','╯','│'],L=Math[W(0x158)](r-Y),Q=typeof z[W(0x14d)]!==W(0x153)?z['offset']:0x3,s=typeof z['padding']!==W(0x153)?z[W(0x164)]:W(0x148),e=typeof z['height']!==W(0x153)?z[W(0x16a)]:L,m=typeof z[W(0x147)]!==W(0x153)?z[W(0x147)]:[W(0x156),W(0x16b),W(0x14e),W(0x167),W(0x159)],b=L!==0x0?e/L:0x1,N=Math[W(0x15a)](Y*b),V=Math[W(0x15a)](r*b),g=Math[W(0x158)](V-N),t=0x0;for(let D=0x0;D<K[W(0x14c)];D++){t=Math[W(0x160)](t,K[D][W(0x14c)]);}t=t+Q;let l=typeof z[W(0x162)]!==W(0x153)?z[W(0x162)]:p,Z=z['format']!==undefined?z[W(0x149)]:function(H){const f0=W;return(s+H[f0(0x143)](0x2)+z[f0(0x14a)])['slice'](-s[f0(0x14c)]);},J=new Array(g+0x1);for(let H=0x0;H<=g;H++){J[H]=new Array(t);for(let C=0x0;C<t;C++){J[H][C]='\x20';}}for(let u=N;u<=V;++u){const A=Z(g>0x0?r-(u-N)*L/g:u,u-N);J[u-N][Math['max'](Q-A[W(0x14c)],0x0)]=A,J[u-N][Q-0x1]=u==0x0?l[0x0]:l[0x1];}for(let a=0x0;a<K[W(0x14c)];a++){let T=m[a%m[W(0x14c)]],F=Math[W(0x15a)](K[a][0x0]*b)-N;J[g-F][Q-0x1]=colored(l[0x0],T);for(let k=0x0;k<K[a]['length']-0x1;k++){let w=Math[W(0x15a)](K[a][k+0x0]*b)-N,c=Math[W(0x15a)](K[a][k+0x1]*b)-N;if(w==c)J[g-w][k+Q]=colored(l[0x4],T);else{J[g-c][k+Q]=colored(w>c?l[0x5]:l[0x6],T),J[g-w][k+Q]=colored(w>c?l[0x7]:l[0x8],T);let B=Math[W(0x154)](w,c),E=Math[W(0x160)](w,c);for(let q=B+0x1;q<E;q++){J[g-q][k+Q]=colored(l[0x9],T);}}}}const {startTs:d,endTs:n}=z;if(d||n){const U=v=>{const f1=W;if(!v)return f1(0x145);const X=v[f1(0x142)](undefined,{'day':f1(0x157),'month':f1(0x157),'year':f1(0x157)}),O=v['toLocaleTimeString'](undefined,{'hourCycle':'h24'});return X+'\x20'+O;},M=U(n),o=U(d),h=s[W(0x151)](0x0,Math[W(0x160)](0x2,s[W(0x14c)]-o[W(0x14c)]/0x2+0x1)),I='\x20'['repeat'](Math['max'](t-(s[W(0x14c)]+M[W(0x14c)]/0x2),0x1));J[W(0x152)]([''+h+o+I+M]),J[W(0x152)]([]);}return J[W(0x146)](v=>v[W(0x15b)](''))[W(0x15b)]('\x0a');};exports['getAsciiChart']=getAsciiChart;const downSampleData=(f,y)=>{const f2=a8S,z=f[f2(0x14c)];if(y>=z||y===0x0)return f;const K=[];let Y=0x0;const r=(z-0x2)/(y-0x2);let p=0x0,L,Q,s,e;K[Y++]=f[p];for(var m=0x0;m<y-0x2;m++){let l=0x0,Z=0x0,J=Math[f2(0x168)]((m+0x1)*r)+0x1,d=Math[f2(0x168)]((m+0x2)*r)+0x1;d=d<z?d:z;var b=d-J;for(;J<d;J++){l+=f[J][0x0],Z+=f[J][0x1];}l/=b,Z/=b;var N=Math[f2(0x168)](m*r)+0x1,V=Math[f2(0x168)]((m+0x1)*r)+0x1,g=f[p][0x0],t=f[p][0x1];Q=s=-0x1;for(;N<V;N++){s=Math[f2(0x158)]((g-l)*(f[N][0x1]-t)-(g-f[N][0x0])*(Z-t))*0.5,s>Q&&(Q=s,L=f[N],e=N);}K[Y++]=L,p=e;}return K[Y++]=f[z-0x1],K;};exports[a8S(0x163)]=downSampleData;function a8f(){const f3=['2-digit','abs','black','round','join','229868jrpkJE','1168632WAoExE','getAsciiChart','1208529AIzuuS','max','1343610OPHWGa','symbols','downSampleData','padding','469610QKkvTt','defineProperty','grey','floor','403788mfQPrk','height','red','toLocaleDateString','toFixed','chalk','\x20\x20\x20','map','colors','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','format','unit','6uXRzIj','length','offset','green','__importDefault','224163tcuFdq','slice','push','undefined','min','8kKQInk','blue'];a8f=function(){return f3;};return a8f();}
|
package/dist/inquirer-helper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a9T=a9K;(function(Z,K){const p=a9K,O=Z();while(!![]){try{const g=-parseInt(p(0x1f2))/0x1*(-parseInt(p(0x1c1))/0x2)+parseInt(p(0x151))/0x3+-parseInt(p(0x11a))/0x4+parseInt(p(0x109))/0x5*(-parseInt(p(0x1a8))/0x6)+parseInt(p(0x1d8))/0x7+parseInt(p(0x199))/0x8*(-parseInt(p(0x111))/0x9)+-parseInt(p(0x14f))/0xa*(-parseInt(p(0x138))/0xb);if(g===K)break;else O['push'](O['shift']());}catch(N){O['push'](O['shift']());}}}(a9Z,0xaa54b));var __createBinding=this&&this[a9T(0x124)]||(Object['create']?function(Z,K,O,g){const J=a9T;if(g===undefined)g=O;var N=Object[J(0x1e6)](K,O);(!N||(J(0x1aa)in N?!K[J(0x13c)]:N['writable']||N[J(0x17c)]))&&(N={'enumerable':!![],'get':function(){return K[O];}}),Object[J(0x174)](Z,g,N);}:function(Z,K,O,g){if(g===undefined)g=O;Z[g]=K[O];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a9T(0x1d3)]?function(Z,K){const q=a9T;Object[q(0x174)](Z,q(0x1a1),{'enumerable':!![],'value':K});}:function(Z,K){const Y=a9T;Z[Y(0x1a1)]=K;}),__importStar=this&&this[a9T(0x1a3)]||function(Z){const P=a9T;if(Z&&Z[P(0x13c)])return Z;var K={};if(Z!=null){for(var O in Z)if(O!==P(0x1a1)&&Object[P(0x1cf)]['hasOwnProperty'][P(0x1d5)](Z,O))__createBinding(K,Z,O);}return __setModuleDefault(K,Z),K;},__awaiter=this&&this['__awaiter']||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 S=a9K;function s(W){try{y(g['next'](W));}catch(B){o(B);}}function R(W){try{y(g['throw'](W));}catch(B){o(B);}}function y(W){const C=a9K;W[C(0x192)]?H(W[C(0x1dc)]):N(W[C(0x1dc)])['then'](s,R);}y((g=g[S(0x178)](Z,K||[]))[S(0x118)]());});},__importDefault=this&&this[a9T(0x115)]||function(Z){return Z&&Z['__esModule']?Z:{'default':Z};};function a9Z(){const ZL=['json','paths','builds','chalk','ask','concat','template\x20run','whiteBright','all','askForPipeline','Yes,\x20send','deleteWarningPrompt','fullName','askForAddonRestore','pattern','askForSecret','test','13267199ssgnoa','job','pipeline','fileName','__esModule','DynamicReloadPaginationPrompt','backups','blueBright','askForJob','jobs','pagination','Configuration\x20file\x20written\x20to\x20','path','askGeneric','No\x20builds\x20found','subdomain','tokenPrompt','askArrayEntry','isBoolean','./pagination/inquirer-pagination-prompt','writeFileSync','Something\x20unexpected\x20happened.','editPayload','10nFsTft','\x20(startedAt:\x20','2116296GvXCCj','required','REPEAT','addon:\x20\x27','safeDump','Do\x20you\x20want\x20to\x20add','Writing\x20configuration\x20failed:\x20','\x20characters,\x20is\x20','Unexpected\x20file\x20type:\x20','Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.','volumes','inquirer','filter','saveFile','anyOf','containers','must\x20be\x20longer\x20than\x20or\x20equal\x20to\x20','projects','yaml','subdomains','set','ABORT','pagination-prompt','must\x20be\x20a\x20valid\x20non-empty\x20json\x20string','confirmationPrompt','data','input','pathVars','message','choice','No,\x20edit','fetchResourceList','askForResource','for\x20this\x20','Context\x20name\x20already\x20exists.','defineProperty','WARNING:\x20You\x20are\x20about\x20to\x20delete\x20','secret','askForTemplateRun','apply','enum','askForLogSink','addEntry','configurable','No\x20','items','has','nextCursor','askForContainer','this\x20option\x20is\x20required,\x20please\x20answer','array','What\x27s\x20the\x20','prompt','tag','Choose\x20the\x20','isObject','askForAddon','confirm','inquirer-search-list','Go\x20to\x20editor','askForClusterId','\x20to\x20use:','js-yaml','InquirerHelper','isValidJSON','done','defaultPaginationPageSize','\x20and\x20it\x20','minLength','askForProjectScopedResourcePaginated','toString','askForResourcePaginated','1736CmqRWK','rawObject','cmdPath','yml','\x20type?','isArray','lodash','Please\x20confirm\x20following\x20configuration:\x0a','default','editor','__importStar','find','values','secrets','loginPrompt','12TfgOxo','must\x20be\x20a\x20number,\x20is\x20','get','elements','map','to\x20use:','propToType','repeat','doesn\x27t\x20match\x20pattern\x20\x27','Provide\x20a\x20file\x20path\x20to\x20write\x20the\x20configuration\x20to\x20(<name>.[json|yaml|yml])','object','./api-helpers','askForCredentials','tags','domains','Template\x20id\x20not\x20provided.','must\x20be\x20smaller\x20than\x20or\x20equal\x20to\x20','\x20(full\x20domain:\x20','tmpCmdPath','found','log\x20sink','job\x20builds','retrievePayloadViaInteractiveCli','description','No,\x20abort','565510TaBShJ','success','askForProjectScopedResource','isUndefined','service','confirmation','uri','red','split','length','askForProject','.\x20This\x20is\x20irreversible.\x20Please\x20confirm!','must\x20be\x20bigger\x20than\x20or\x20equal\x20to\x20','askForSubdomain','prototype','example','askForVolume','maxLength','create','addons','call','SAVE','assign','6901062NozfWu','a\x20Northflank\x20resource','askForBackupDestination','Enter\x20the\x20','value','retry','clusters','getCurrentProjectName','addon','No,\x20but\x20save\x20as\x20file','service\x20containers','reset','contextProvider','don\x27t\x20change','getOwnPropertyDescriptor','registryCredentials','must\x20be\x20shorter\x20than\x20or\x20equal\x20to\x20','then','restores','askForSubdomainPath','skipValidation','Do\x20you\x20want\x20to\x20add\x20more','main-context','green','push','underline','1AVfVsZ','askForTag','pop','\x20characters','\x27\x20already\x20exists.\x20Do\x20you\x20want\x20to\x20override\x20this\x20context\x20(y)\x20or\x20enter\x20a\x20new\x20name\x20(N)?','resultCache','properties','unshift','includes','job:\x20\x27','No\x20containers\x20found','cluster\x20id','subdomainPath','\x20(completedAt:\x20','pipelines','override','slice','project:\x20\x27','apiClient','getType','password','blue','domain\x20(','createdAt','./utils','getPathString','cursor','stringify','service\x20build','type','token','Choose\x20the\x20name\x20of\x20the\x20new\x20local\x20context:','EDIT','job\x20containers','join','name','backupDestinations',',\x20supported\x20types:\x20[json|yaml|yml]','string','runs','list','isNaN','2975950rmFZIN','search-list','validate','registerPrompt','isEmpty','bold','nextPageCursor','Context\x20with\x20name\x20\x27','46791seduxW','trim','integer','service:\x20\x27','__importDefault','minimum','safeLoad','next','oneOf','655696klfUZR','backup\x20destination','templateRuns','yellowBright','Choose\x20the\x20login\x20token:','unset','restore','getInnerType','domain','templates','__createBinding','boolean','maximum'];a9Z=function(){return ZL;};return a9Z();}function a9K(Z,K){const O=a9Z();return a9K=function(g,N){g=g-0x108;let H=O[g];return H;},a9K(Z,K);}Object[a9T(0x174)](exports,'__esModule',{'value':!![]}),exports[a9T(0x190)]=void 0x0;const _=__importStar(require(a9T(0x19f))),chalk_1=__importDefault(require(a9T(0x12a))),fs=__importStar(require('fs')),utils_1=require(a9T(0x20a)),api_helpers_1=require(a9T(0x1b3)),inquirer_pagination_prompt_1=require(a9T(0x14b)),inquirer=require(a9T(0x15c)),inquirerSearchList=require(a9T(0x18b)),yaml=require(a9T(0x18f));var ConfirmChoices;(function(Z){const n=a9T;Z['YES']=n(0x131),Z['REPEAT']='No,\x20repeat',Z[n(0x212)]=n(0x16f),Z['SAVE']=n(0x1e1),Z[n(0x166)]=n(0x1c0);}(ConfirmChoices||(ConfirmChoices={})));class InquirerHelper{constructor(Z){const k=a9T;this[k(0x204)]=Z,this[k(0x193)]=0x32,this[k(0x14e)]=K=>__awaiter(this,void 0x0,void 0x0,function*(){const x=k,{editedResult:O}=yield inquirer[x(0x185)]([{'type':x(0x1a2),'name':'editedResult','message':x(0x18c),'default':yaml[x(0x155)](K)}]);return yaml[x(0x117)](O);}),this['saveFile']=K=>__awaiter(this,void 0x0,void 0x0,function*(){const m=k,O=o=>m(0x159)+o+m(0x217);function g(){return __awaiter(this,void 0x0,void 0x0,function*(){const r=a9K;return inquirer[r(0x185)]([{'type':r(0x16b),'name':r(0x13b),'message':r(0x1b1),'validate':o=>new RegExp('.*\x5c.(json|yaml|yml)$')[r(0x137)](o)?!![]:O(o)}]);});}const {fileName:N}=yield g(),H=N[m(0x197)]()[m(0x1c9)]('.')[m(0x1f4)]();try{switch(H){case m(0x127):(0x0,utils_1['success'])(m(0x143)+N);return fs[m(0x14c)](N,JSON[m(0x20d)](K,null,'\x20\x20'));case m(0x163):case m(0x19c):(0x0,utils_1[m(0x1c2)])('Configuration\x20file\x20written\x20to\x20'+N);return fs['writeFileSync'](N,yaml[m(0x155)](K));default:(0x0,utils_1['warning'])(O(H));}}catch(o){(0x0,utils_1['warning'])(m(0x157)+o[m(0x16d)]);}return undefined;}),this['filter']=(K,O)=>g=>{const D=k,N=typeof g==='string'?g[D(0x112)]():g;return O===![]&&N===D(0x1e5)?'':N;},this['validate']=(K,O,g)=>N=>{const d=k;if(this['skipValidation']===!![])return!![];const H=[];if(N===''||N===d(0x1e5)){if(O!==![])H[d(0x1f0)](d(0x182));else return!![];}K[d(0x20f)]===d(0x218)&&!_[d(0x1c4)](K[d(0x135)])&&H[d(0x1f0)](new RegExp(K['pattern'])[d(0x137)](N)?!![]:d(0x1b0)+K[d(0x135)]+'\x27');K[d(0x20f)]==='string'&&!_[d(0x1c4)](K[d(0x195)])&&H[d(0x1f0)](N[d(0x1ca)]>=K['minLength']?!![]:d(0x161)+K[d(0x195)]+d(0x158)+N[d(0x1ca)]+d(0x1f5));K['type']===d(0x218)&&!_[d(0x1c4)](K[d(0x1d2)])&&H[d(0x1f0)](N[d(0x1ca)]<=K[d(0x1d2)]?!![]:d(0x1e8)+K[d(0x1d2)]+d(0x158)+N[d(0x1ca)]+'\x20characters');g&&Number[d(0x108)](parseInt(N,0xa))&&H[d(0x1f0)](d(0x1a9)+N);K[d(0x20f)]===d(0x113)&&!_['isUndefined'](K[d(0x116)])&&H['push'](N>=K[d(0x116)]?!![]:d(0x1cd)+K[d(0x116)]);K[d(0x20f)]==='integer'&&!_['isUndefined'](K[d(0x126)])&&H['push'](N<=K[d(0x126)]?!![]:d(0x1b8)+K[d(0x126)]);if(K[d(0x20f)]===d(0x19a)){const R=(0x0,utils_1[d(0x191)])(N);H[d(0x1f0)](R===![]||_[d(0x10d)](R)?d(0x168):!![]);}const o=H[d(0x15d)](y=>y!==!![]),s=(K===null||K===void 0x0?void 0x0:K['example'])?'\x0a'+chalk_1['default'][d(0x1c8)]('>>')+'\x20Example:\x20'+chalk_1[d(0x1a1)][d(0x12e)](JSON[d(0x20d)](K['example'])):'';return o[d(0x1ca)]>0x0?o[d(0x214)](chalk_1['default'][d(0x1f1)](d(0x194)))+s:!![];},this['getPathString']=(K,O,g)=>{const b=k,N=K[K[b(0x1ca)]-0x1];function H(){const l=b;return K[l(0x202)](0x0,-0x1)[l(0x1ac)](R=>R['charAt'](0x0)['toUpperCase']()+R[l(0x202)](0x1))[l(0x214)]('>');}const o=K[b(0x1ca)]>0x1?chalk_1[b(0x1a1)]['bgGrey'][b(0x12e)](H())+':\x20':'',s=g?'\x20('+chalk_1[b(0x1a1)][b(0x207)](g)+')':'';return chalk_1[b(0x1a1)][b(0x1e3)](''+o+O+'\x20'+chalk_1[b(0x1a1)]['bold']['greenBright'](N)+s+'?');},this[k(0x171)]=(K,O,g)=>__awaiter(this,void 0x0,void 0x0,function*(){const f=k;if(O[f(0x1ca)]<0x1){const o=g?f(0x172)+g:f(0x1bb);throw new Error(f(0x17d)+K+'\x20'+o+'.');}const N=f(0x187)+K+f(0x18e),H=O[f(0x1ca)]>0x4?f(0x10a):f(0x21a);return(yield inquirer[f(0x185)]([{'type':H,'name':f(0x215),'message':N,'choices':O}]))[f(0x215)];}),this['askForResourcePaginated']=(K,O,g)=>__awaiter(this,void 0x0,void 0x0,function*(){const a=k,{elements:N,nextCursor:H}=yield O();if(N[a(0x1ca)]<0x1){const R=g?a(0x172)+g:'found';throw new Error('No\x20'+K+'\x20'+R+'.');}const o=a(0x187)+K+a(0x18e);if(H!==undefined){const y=({nextPageCursor:W})=>__awaiter(this,void 0x0,void 0x0,function*(){const v=a,B=yield O(W);return{'elements':B[v(0x1ab)],'nextPageCursor':B[v(0x180)]};});return(yield inquirer[a(0x185)]([{'type':'pagination-prompt','name':a(0x215),'message':o,'choices':N,'nextPageCursor':H,'loadMore':y}]))[a(0x215)];}const s=N[a(0x1ca)]>0x4?a(0x10a):a(0x21a);return(yield inquirer[a(0x185)]([{'type':s,'name':'name','message':o,'choices':N}]))[a(0x215)];}),this[k(0x145)]=(K,O)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const L=k,g=''+(O?'('+chalk_1['default'][L(0x207)](O)+')\x20':''),N=L(0x1db)+chalk_1['default'][L(0x1ef)](K)+'\x20'+g+L(0x1ad),H=this[L(0x10b)]({'type':L(0x218),'required':!![]});return(yield inquirer[L(0x185)]([{'type':L(0x16b),'name':L(0x215),'message':N,'validate':H}]))[L(0x215)];}),this['askConfirm']=K=>__awaiter(this,void 0x0,void 0x0,function*(){const X=k;return(yield inquirer[X(0x185)]([{'type':X(0x18a),'name':'name','message':K,'default':!![]}]))[X(0x215)];}),this['askForService']=K=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const U=k,O=g=>__awaiter(this,void 0x0,void 0x0,function*(){const e=a9K,N=yield this[e(0x204)][e(0x21a)]['services'][e(0x12f)]({'parameters':{'projectId':g}}),H=N[e(0x16a)]['services']['map'](o=>o['id']);return H;});return this[U(0x1c3)](U(0x1c5),O,K);}),this['askForTemplate']=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const z=k,K=O=>__awaiter(this,void 0x0,void 0x0,function*(){const i=a9K;var g;const N=yield this[i(0x204)][i(0x21a)]['templates']({'options':{'per_page':this[i(0x193)],'cursor':O}}),H=N[i(0x16a)][i(0x123)]['map'](o=>o['id']);return{'elements':H,'nextCursor':(g=N[i(0x142)])===null||g===void 0x0?void 0x0:g[i(0x20c)]};});return this[z(0x198)]('template',K);}),this[k(0x1f3)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const G=k,K=O=>__awaiter(this,void 0x0,void 0x0,function*(){const j=a9K;var g,N,H;const o=yield this[j(0x204)][j(0x21a)][j(0x1b5)]({'options':{'per_page':this[j(0x193)],'cursor':O}}),s=(N=(g=o[j(0x16a)][j(0x1b5)])===null||g===void 0x0?void 0x0:g['map'](R=>R['id']))!==null&&N!==void 0x0?N:[];return{'elements':s,'nextCursor':(H=o[j(0x142)])===null||H===void 0x0?void 0x0:H[j(0x20c)]};});return this['askForResourcePaginated'](G(0x186),K);}),this[k(0x1da)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const w=k;var K;const O=yield this[w(0x204)][w(0x21a)][w(0x216)]['all']({}),g=(K=O[w(0x16a)][w(0x216)][w(0x1ac)](N=>N[w(0x215)]))!==null&&K!==void 0x0?K:[];return this[w(0x171)](w(0x11b),g);}),this[k(0x18d)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const u=k,K=O=>__awaiter(this,void 0x0,void 0x0,function*(){const Q=a9K;var g,N,H;const o=yield this[Q(0x204)][Q(0x21a)]['cloud'][Q(0x1de)]({'options':{'per_page':this[Q(0x193)],'cursor':O}}),s=(N=(g=o[Q(0x16a)][Q(0x1de)])===null||g===void 0x0?void 0x0:g[Q(0x1ac)](R=>R[Q(0x215)]))!==null&&N!==void 0x0?N:[];return{'elements':s,'nextCursor':(H=o[Q(0x142)])===null||H===void 0x0?void 0x0:H['cursor']};});return this[u(0x198)](u(0x1fd),K);}),this[k(0x177)]=K=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const F=k;if(_[F(0x1c4)](K))throw new Error(F(0x1b7));const O=g=>__awaiter(this,void 0x0,void 0x0,function*(){const A=F;var N;let H=this[A(0x193)];const o=yield this[A(0x204)][A(0x21a)][A(0x11c)]({'parameters':{'templateId':K},'options':{'per_page':H,'cursor':g}}),s=o[A(0x16a)][A(0x11c)][A(0x1ac)](R=>R['id']+A(0x150)+R[A(0x209)]+')');return{'elements':s,'nextCursor':(N=o[A(0x142)])===null||N===void 0x0?void 0x0:N[A(0x20c)]};});return this[F(0x198)](F(0x12d),O)['then'](g=>g['split']('\x20')[0x0]);}),this[k(0x17a)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const t=k,K=O=>__awaiter(this,void 0x0,void 0x0,function*(){const h=a9K;var g;let N=this[h(0x193)];const H=yield this['apiClient'][h(0x21a)]['logSinks']({'options':{'per_page':N,'cursor':O}}),o=H[h(0x16a)]['logSinks'][h(0x1ac)](s=>s['id']);return{'elements':o,'nextCursor':(g=H[h(0x142)])===null||g===void 0x0?void 0x0:g[h(0x20c)]};});return this[t(0x198)](t(0x1bc),K);}),this[k(0x130)]=K=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Z1=k,O=g=>__awaiter(this,void 0x0,void 0x0,function*(){const Z0=a9K,N=yield this['apiClient']['list'][Z0(0x200)][Z0(0x12f)]({'parameters':{'projectId':g}});return N[Z0(0x16a)]['pipelines'][Z0(0x1ac)](H=>H['id']);});return this[Z1(0x1c3)](Z1(0x13a),O,K);}),this[k(0x140)]=K=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Z3=k,O=g=>__awaiter(this,void 0x0,void 0x0,function*(){const Z2=a9K,N=yield this[Z2(0x204)]['list'][Z2(0x141)][Z2(0x12f)]({'parameters':{'projectId':g}}),H=N[Z2(0x16a)]['jobs']['map'](o=>o['id']);return H;});return this[Z3(0x1c3)]('job',O,K);}),this['askForJobRun']=(K,O,g=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Z5=k,N='all-job-runs',H=o=>s=>__awaiter(this,void 0x0,void 0x0,function*(){const Z4=a9K;var R;const y=yield this['apiClient']['get']['job'][Z4(0x219)]({'parameters':{'projectId':o,'jobId':K},'options':{'per_page':this[Z4(0x193)],'cursor':s}}),W=y['data'][Z4(0x219)][Z4(0x1ac)](B=>B['id']+Z4(0x150)+B['startedAt']+')');return g&&W[Z4(0x1f9)](N),{'elements':W,'nextCursor':(R=y['pagination'])===null||R===void 0x0?void 0x0:R[Z4(0x20c)]};});return this['askForProjectScopedResourcePaginated']('job\x20runs',H,O,Z5(0x1fb)+K+'\x27')[Z5(0x1e9)](o=>{const Z6=Z5,s=o[Z6(0x1c9)]('\x20')[0x0];if(s===N)return undefined;return s;});}),this['askForBuild']=(K,O,g,N=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Z8=k,H='all-builds';if(g!==undefined){const o=s=>R=>__awaiter(this,void 0x0,void 0x0,function*(){const Z7=a9K;var y;const W=yield this[Z7(0x204)][Z7(0x1aa)][Z7(0x139)][Z7(0x129)]({'parameters':{'projectId':s,'jobId':g},'options':{'per_page':this[Z7(0x193)],'cursor':R}}),B=W[Z7(0x16a)]['builds'][Z7(0x1ac)](V=>V['id']+'\x20(startedAt:\x20'+V['createdAt']+')');return N&&B[Z7(0x1f9)](H),{'elements':B,'nextCursor':(y=W[Z7(0x142)])===null||y===void 0x0?void 0x0:y['cursor']};});return this['askForProjectScopedResourcePaginated'](Z8(0x1bd),o,K,'job:\x20\x27'+g+'\x27')['then'](s=>{const Z9=Z8,R=s[Z9(0x1c9)]('\x20')[0x0];if(R===H)return undefined;return R;});}if(O!==undefined){const s=R=>y=>__awaiter(this,void 0x0,void 0x0,function*(){const ZZ=Z8;var W;const B=yield this[ZZ(0x204)][ZZ(0x1aa)][ZZ(0x1c5)][ZZ(0x129)]({'parameters':{'projectId':R,'serviceId':O},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':y}}),V=B[ZZ(0x16a)]['builds']['map'](M=>M['id']+'\x20(startedAt:\x20'+M[ZZ(0x209)]+')');if(N)V[ZZ(0x1f9)](H);return{'elements':V,'nextCursor':(W=B['pagination'])===null||W===void 0x0?void 0x0:W['cursor']};});return this[Z8(0x196)](Z8(0x20e),s,K,Z8(0x114)+g+'\x27')[Z8(0x1e9)](R=>{const ZK=Z8,y=R[ZK(0x1c9)]('\x20')[0x0];if(y===H)return undefined;return y;});}throw new Error(Z8(0x146));}),this[k(0x181)]=(K,O,g,N=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Zg=k,H='all-containers';if(g!==undefined){const o=s=>R=>__awaiter(this,void 0x0,void 0x0,function*(){const ZO=a9K;var y,W;const B=yield this[ZO(0x204)][ZO(0x1aa)][ZO(0x139)][ZO(0x160)]({'parameters':{'projectId':s,'jobId':g},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':R}}),V=(y=B[ZO(0x16a)][ZO(0x160)])!==null&&y!==void 0x0?y:[],M=V===null||V===void 0x0?void 0x0:V[ZO(0x1ac)](I=>I[ZO(0x215)]+ZO(0x150)+I[ZO(0x209)]+')');return N&&M[ZO(0x1f9)](H),{'elements':M,'nextCursor':(W=B[ZO(0x142)])===null||W===void 0x0?void 0x0:W[ZO(0x20c)]};});return this[Zg(0x196)](Zg(0x213),o,K,'job:\x20\x27'+g+'\x27')[Zg(0x1e9)](s=>{const ZN=Zg,R=s[ZN(0x1c9)]('\x20')[0x0];if(R===H)return undefined;return R;});}if(O!==undefined){const s=R=>y=>__awaiter(this,void 0x0,void 0x0,function*(){const ZH=Zg;var W,B;const V=yield this[ZH(0x204)][ZH(0x1aa)][ZH(0x1c5)][ZH(0x160)]({'parameters':{'projectId':R,'serviceId':O},'options':{'per_page':this[ZH(0x193)],'cursor':y}}),M=(W=V[ZH(0x16a)][ZH(0x160)])!==null&&W!==void 0x0?W:[],I=M['map'](E=>E[ZH(0x215)]+ZH(0x150)+E[ZH(0x209)]+')');if(N)I===null||I===void 0x0?void 0x0:I[ZH(0x1f9)](H);return{'elements':I,'nextCursor':(B=V['pagination'])===null||B===void 0x0?void 0x0:B[ZH(0x20c)]};});return this[Zg(0x196)](Zg(0x1e2),s,K,'service:\x20\x27'+g+'\x27')['then'](R=>{const Zo=Zg,y=R[Zo(0x1c9)]('\x20')[0x0];if(y===H)return undefined;return y;});}throw new Error(Zg(0x1fc));}),this[k(0x189)]=K=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const ZR=k,O=g=>__awaiter(this,void 0x0,void 0x0,function*(){const Zs=a9K,N=yield this[Zs(0x204)][Zs(0x21a)][Zs(0x1d4)][Zs(0x12f)]({'parameters':{'projectId':g}});return N['data'][Zs(0x1d4)][Zs(0x1ac)](H=>H['id']);});return this['askForProjectScopedResource'](ZR(0x1e0),O,K);}),this['askForAddonBackup']=(K,O)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const ZW=k,g=N=>H=>__awaiter(this,void 0x0,void 0x0,function*(){const Zy=a9K;var o;const s=yield this[Zy(0x204)][Zy(0x1aa)][Zy(0x1e0)]['backups']({'parameters':{'projectId':N,'addonId':O},'options':{'per_page':this[Zy(0x193)],'cursor':H}});return{'elements':s['data'][Zy(0x13e)][Zy(0x1ac)](R=>R['id']+Zy(0x1ff)+(R['completedAt']||'not\x20completed')+')'),'nextCursor':(o=s[Zy(0x142)])===null||o===void 0x0?void 0x0:o[Zy(0x20c)]};});return this[ZW(0x196)](ZW(0x13e),g,K,ZW(0x154)+O+'\x27')[ZW(0x1e9)](N=>N[ZW(0x1c9)]('\x20')[0x0]);}),this[k(0x134)]=(K,O,g)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const ZV=k,N=H=>o=>__awaiter(this,void 0x0,void 0x0,function*(){const ZB=a9K;var s;const R=yield this[ZB(0x204)][ZB(0x1aa)][ZB(0x1e0)]['backup'][ZB(0x1ea)]({'parameters':{'projectId':H,'addonId':O,'backupId':g},'options':{'per_page':this[ZB(0x193)],'cursor':o}});return{'elements':R['data'][ZB(0x1ea)]['map'](y=>y['id']+ZB(0x1ff)+(y['completedAt']||'not\x20completed')+')'),'nextCursor':(s=R[ZB(0x142)])===null||s===void 0x0?void 0x0:s[ZB(0x20c)]};});return this[ZV(0x196)](ZV(0x120),N,K,ZV(0x154)+O+'\x27')['then'](H=>H[ZV(0x1c9)]('\x20')[0x0]);}),this[k(0x1d1)]=K=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const O=g=>__awaiter(this,void 0x0,void 0x0,function*(){const ZM=a9K;return(yield this['apiClient']['list'][ZM(0x15b)]({'parameters':{'projectId':g}}))[ZM(0x16a)][ZM(0x1ac)](N=>N['id']);});return this['askForProjectScopedResource']('volume',O,K);}),this[k(0x136)]=K=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Zc=k,O=g=>__awaiter(this,void 0x0,void 0x0,function*(){const ZI=a9K,N=yield this[ZI(0x204)][ZI(0x21a)][ZI(0x1a6)][ZI(0x12f)]({'parameters':{'projectId':g}});return N['data'][ZI(0x1a6)]['map'](H=>H['id']);});return this[Zc(0x1c3)](Zc(0x176),O,K);}),this[k(0x1ce)]=K=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const ZE=k,O=yield this['apiClient'][ZE(0x1aa)][ZE(0x122)]({'parameters':{'domain':K}}),g=O[ZE(0x16a)][ZE(0x164)][ZE(0x1ac)](H=>H['name']+ZE(0x1b9)+H[ZE(0x133)]+')'),N=ZE(0x208)+K+')';return this[ZE(0x171)](ZE(0x147),g,N)[ZE(0x1e9)](H=>H[ZE(0x1c9)]('\x20')[0x0]);}),this[k(0x1eb)]=(K,O)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Zp=k,g=yield this[Zp(0x204)][Zp(0x21a)][Zp(0x147)][Zp(0x144)]({'parameters':{'domain':K,'subdomain':O}}),N=g[Zp(0x16a)][Zp(0x128)][Zp(0x1ac)](o=>''+o[Zp(0x1c7)]),H=Zp(0x208)+K+'),\x20subdomain\x20('+O+')';return this[Zp(0x171)](Zp(0x1fe),N,H);}),this[k(0x132)]=K=>__awaiter(this,void 0x0,void 0x0,function*(){const ZT=k;return(yield inquirer[ZT(0x185)]([{'type':ZT(0x18a),'name':ZT(0x1c6),'message':chalk_1[ZT(0x1a1)][ZT(0x11d)](ZT(0x175)+(K||ZT(0x1d9))+ZT(0x1cc)),'default':![]}]))[ZT(0x1c6)];}),this[k(0x1a7)]=(K,O)=>__awaiter(this,void 0x0,void 0x0,function*(){const ZJ=k;_[ZJ(0x1c4)](K[ZJ(0x215)])&&(O[ZJ(0x1ca)]<=0x0?_[ZJ(0x165)](K,'name','default'):yield(0x0,utils_1[ZJ(0x1dd)])(0xa)(()=>__awaiter(this,void 0x0,void 0x0,function*(){const Zq=ZJ,{name:g}=yield inquirer['prompt']([{'type':'input','name':'name','message':Zq(0x211),'default':Zq(0x1ee)}]);if(!K[Zq(0x201)]&&O[Zq(0x1a4)](N=>N['name']===g)){const {c:N}=yield inquirer[Zq(0x185)]([{'type':'confirm','name':'c','message':Zq(0x110)+g+Zq(0x1f6),'default':![]}]);if(N===![])throw new Error(Zq(0x173));_[Zq(0x165)](K,Zq(0x201),!![]);}_[Zq(0x165)](K,Zq(0x215),g);})));if(_[ZJ(0x1c4)](K[ZJ(0x210)])){const g=yield this[ZJ(0x148)]();_['set'](K,ZJ(0x210),g);}return K;}),this['tokenPrompt']=()=>__awaiter(this,void 0x0,void 0x0,function*(){const ZY=k,{token:K}=yield inquirer[ZY(0x185)]([{'type':ZY(0x206),'name':ZY(0x210),'mask':'*','message':ZY(0x11e)}]);return K;}),inquirer[k(0x10c)](k(0x10a),inquirerSearchList),inquirer[k(0x10c)](k(0x167),inquirer_pagination_prompt_1[k(0x13d)]);}[a9T(0x169)](Z,K){return __awaiter(this,void 0x0,void 0x0,function*(){const ZP=a9K,O=yaml[ZP(0x155)](Z),g=_['max'](O[ZP(0x1c9)]('\x0a')[ZP(0x1ac)](o=>o[ZP(0x1ca)])),N=chalk_1[ZP(0x1a1)]['grey']('-'[ZP(0x1af)](g)+'\x0a'),{confirm:H}=yield inquirer['prompt']([{'type':ZP(0x21a),'name':'confirm','message':''+chalk_1['default'][ZP(0x10e)][ZP(0x1ef)](ZP(0x1a0))+N+chalk_1['default'][ZP(0x13f)](O)+N,'choices':Object[ZP(0x1a5)](ConfirmChoices)}]);switch(H){case ConfirmChoices['YES']:return Z;case ConfirmChoices[ZP(0x166)]:throw new Error('Aborted.');case ConfirmChoices[ZP(0x153)]:return this[ZP(0x1be)](K);case ConfirmChoices['EDIT']:return this[ZP(0x169)](yield this[ZP(0x14e)](Z),K);case ConfirmChoices[ZP(0x1d6)]:yield this[ZP(0x15e)](Z);return this[ZP(0x169)](Z,K);default:throw new Error(ZP(0x14d));}});}['retrievePayloadViaInteractiveCli'](Z,K){return __awaiter(this,void 0x0,void 0x0,function*(){const ZC=a9K;if((K===null||K===void 0x0?void 0x0:K[ZC(0x1f7)])!==undefined)this[ZC(0x1f7)]=K===null||K===void 0x0?void 0x0:K[ZC(0x1f7)];this[ZC(0x1ba)]=K===null||K===void 0x0?void 0x0:K[ZC(0x19b)],this[ZC(0x1ec)]=K===null||K===void 0x0?void 0x0:K['skipValidation'];const O={};return yield this['propToType']([],Z['opt']['body'],O),this[ZC(0x1f7)]=O,yield this['confirmationPrompt'](O,Z);});}[a9T(0x1ae)](Z,K,O,g){return __awaiter(this,void 0x0,void 0x0,function*(){const ZS=a9K;let N;if(K['oneOf']&&!_[ZS(0x17f)](K,ZS(0x1f8))){if(K[ZS(0x119)]['length']>0x1){const {choice:H}=yield inquirer[ZS(0x185)]([{'type':'list','name':ZS(0x16e),'message':ZS(0x184)+(Z[Z[ZS(0x1ca)]-0x1]||'')+ZS(0x19d),'choices':K[ZS(0x119)][ZS(0x1ac)](o=>{const Zn=ZS;var s;return(s=o[Zn(0x1bf)])!==null&&s!==void 0x0?s:'??';})}]);N=yield this[ZS(0x205)](Z,K['oneOf']['find'](o=>o[ZS(0x1bf)]===H),O,g);}else{const o=K['oneOf'][0x0];_['set'](o,ZS(0x1bf),K[ZS(0x1bf)]),N=yield this[ZS(0x205)](Z,o,O,g);}N={};}else{if(K[ZS(0x15f)]&&!_['has'](K,ZS(0x1f8))){if(K[ZS(0x15f)][ZS(0x1ca)]>0x1){const {choice:s}=yield inquirer['prompt']([{'type':ZS(0x21a),'name':ZS(0x16e),'message':ZS(0x184)+(Z[Z[ZS(0x1ca)]-0x1]||'')+ZS(0x19d),'choices':[...K[ZS(0x15f)][ZS(0x1ac)](R=>{var y;return(y=R['description'])!==null&&y!==void 0x0?y:'??';}),ZS(0x1e5)]}]);s!==ZS(0x1e5)&&(N=yield this[ZS(0x205)](Z,K['anyOf'][ZS(0x1a4)](R=>R[ZS(0x1bf)]===s),O,g));}else{const R=K[ZS(0x15f)][0x0];_[ZS(0x165)](R,ZS(0x1bf),K[ZS(0x1bf)]),N=yield this[ZS(0x205)](Z,R,O,g);}N={};}else N=yield this[ZS(0x205)](Z,K,O,g);}return N;});}[a9T(0x121)](Z,K,O,g){var N;return __awaiter(this,void 0x0,void 0x0,function*(){const Zk=a9K;if(g===![]){const {addEntry:s}=yield inquirer['prompt']([{'type':Zk(0x18a),'name':'addEntry','message':this['getPathString'](K,Zk(0x156),Z===null||Z===void 0x0?void 0x0:Z[Zk(0x1bf)]),'default':![]}]);if(!s)return O;}const H=Object['keys']((N=Z===null||Z===void 0x0?void 0x0:Z[Zk(0x1f8)])!==null&&N!==void 0x0?N:[]),o=Z[Zk(0x152)]||[];if(H[Zk(0x1ca)]>0x0)for(const R of H){const y=K[Zk(0x12c)](R);if(K[Zk(0x1ca)]>0x0&&!_['has'](O,K[Zk(0x214)]('.')))_[Zk(0x165)](O,K[Zk(0x214)]('.'),{});yield this[Zk(0x1ae)](y,Z[Zk(0x1f8)][R],O,o[Zk(0x1fa)](R));}else yield this[Zk(0x205)](K,Object[Zk(0x1d7)](Object[Zk(0x1d7)]({},Z),{'type':'rawObject'}),O,g);return O;});}['askArrayEntry'](Z,K,O,g){return __awaiter(this,void 0x0,void 0x0,function*(){const Zx=a9K;if(K&&O)return!![];const N=K?Zx(0x156):Zx(0x1ed),{addEntry:H}=yield inquirer[Zx(0x185)]([{'type':Zx(0x18a),'name':Zx(0x17b),'message':this[Zx(0x20b)](Z,N,K?g:undefined),'default':![]}]);return H;});}['getType'](Z,K,O,g){return __awaiter(this,void 0x0,void 0x0,function*(){const Zm=a9K;let N;const H=Z['join']('.');switch(K===null||K===void 0x0?void 0x0:K[Zm(0x20f)]){case Zm(0x183):{let o=!![];while(yield this[Zm(0x149)](Z,o,g,K===null||K===void 0x0?void 0x0:K[Zm(0x1bf)])){const s=_[Zm(0x1aa)](O,H);_[Zm(0x11f)](O,H),yield this[Zm(0x205)](Z,K[Zm(0x17e)],O);const R=_[Zm(0x1aa)](O,H);!_[Zm(0x19e)](s)?_[Zm(0x165)](O,H,[R]):(s['push'](R),_[Zm(0x165)](O,H,s)),o=![];}return N||[];}case Zm(0x1b2):{return N=yield this[Zm(0x121)](K,Z,O,g),N;}case'rawObject':N=(0x0,utils_1[Zm(0x191)])(yield this[Zm(0x12b)](Z,K,g))||undefined;break;case'string':case Zm(0x125):case'integer':default:N=yield this['ask'](Z,K,g,O);break;}return!_[Zm(0x1c4)](N)&&_[Zm(0x165)](O,H,N),N;});}[a9T(0x12b)](Z,K,O,g){var N;return __awaiter(this,void 0x0,void 0x0,function*(){const Zr=a9K,H=Z[Z['length']-0x1],{defaultValue:defaultValue=(N=K===null||K===void 0x0?void 0x0:K[Zr(0x1d0)])!==null&&N!==void 0x0?N:K===null||K===void 0x0?void 0x0:K['default'],choices:choices=K===null||K===void 0x0?void 0x0:K[Zr(0x179)],pagination:o}=yield(0x0,api_helpers_1[Zr(0x170)])(H,this[Zr(0x204)],this[Zr(0x1ba)],g,this['pathVars'],Z);let s=Zr(0x16b);if(!_[Zr(0x1c4)](choices)&&choices['length']>0x0){if(o!==undefined&&o[Zr(0x10f)]!==undefined)s=Zr(0x167);else choices[Zr(0x1ca)]>0x4&&typeof choices[0x0]===Zr(0x218)?s=Zr(0x10a):s=Zr(0x21a);}else{if((K===null||K===void 0x0?void 0x0:K['type'])===Zr(0x125))s=Zr(0x18a);else{if((K===null||K===void 0x0?void 0x0:K[Zr(0x20f)])===Zr(0x113))s=Zr(0x16b);else(K===null||K===void 0x0?void 0x0:K[Zr(0x20f)])===Zr(0x19a)&&(s=Zr(0x1a2));}}let R=O!==![]?!_[Zr(0x188)](defaultValue)?defaultValue:JSON[Zr(0x20d)](defaultValue):_[Zr(0x14a)](defaultValue)?defaultValue:Zr(0x1e5);if(choices)R=R['toString']();_[Zr(0x17f)](this[Zr(0x1f7)],Z[Zr(0x214)]('.'))&&(R=this[Zr(0x1f7)][Z[Zr(0x214)]('.')]);const y=choices&&O===![]?['don\x27t\x20change',...choices]:choices,W=(K===null||K===void 0x0?void 0x0:K[Zr(0x20f)])==='integer',B=Object[Zr(0x1d7)]({'type':s,'name':'id','message':this['getQuestionString'](Z,K),'choices':y,'default':R,'filter':this[Zr(0x15d)](s,O),'validate':this[Zr(0x10b)](K,O,W)},o),V=(yield inquirer[Zr(0x185)]([B]))['id'];if(V===Zr(0x1e5)||V==='')return undefined;if(W)return parseInt(V,0xa);return V;});}['getQuestionString'](Z,K){const ZD=a9T,O=(K===null||K===void 0x0?void 0x0:K[ZD(0x20f)])!==ZD(0x125)?'What\x20do\x20you\x20want\x20to\x20use\x20as':'Should\x20it\x20be';return this[ZD(0x20b)](Z,O,K===null||K===void 0x0?void 0x0:K[ZD(0x1bf)]);}[a9T(0x1cb)](){return __awaiter(this,void 0x0,void 0x0,function*(){const Zd=a9K,Z=yield this['apiClient'][Zd(0x21a)]['projects']['all']({})[Zd(0x1e9)](K=>K[Zd(0x16a)][Zd(0x162)][Zd(0x1ac)](O=>O['id']));return yield this['askForResource']('project',Z);});}[a9T(0x1c3)](Z,K,O,g){return __awaiter(this,void 0x0,void 0x0,function*(){const Zb=a9K,N=O||this['apiClient'][Zb(0x1e4)]['getCurrentProjectName']();if(_['isUndefined'](N))throw new Error(Zb(0x15a));const H=yield K(N);return yield this[Zb(0x171)](Z,H,(g?g+'\x20in\x20':'')+Zb(0x203)+N+'\x27');});}[a9T(0x196)](Z,K,O,g){return __awaiter(this,void 0x0,void 0x0,function*(){const Zl=a9K,N=O||this[Zl(0x204)]['contextProvider'][Zl(0x1df)]();if(_[Zl(0x1c4)](N))throw new Error(Zl(0x15a));const H=yield K(N);return yield this[Zl(0x198)](Z,H,(g?g+'\x20in\x20':'')+Zl(0x203)+N+'\x27');});}['askForDomain'](){return __awaiter(this,void 0x0,void 0x0,function*(){const Zf=a9K,Z=yield this[Zf(0x204)][Zf(0x21a)]['domains'][Zf(0x12f)]({}),K=Z['data'][Zf(0x1b6)][Zf(0x1ac)](O=>O[Zf(0x215)]);return this[Zf(0x171)](Zf(0x122),K);});}[a9T(0x1b4)](){return __awaiter(this,void 0x0,void 0x0,function*(){const Za=a9K,Z=yield this[Za(0x204)]['list'][Za(0x1e7)][Za(0x12f)]({}),K=Z['data']['credentials']['map'](O=>O['id']);return this[Za(0x171)]('credentials',K);});}['setPathVars'](Z){const Zv=a9T;this[Zv(0x16c)]=Z;}}exports['InquirerHelper']=InquirerHelper;
|
|
1
|
+
'use strict';const a9t=a9y;(function(f,y){const g=a9y,z=f();while(!![]){try{const K=parseInt(g(0xc7))/0x1*(parseInt(g(0x182))/0x2)+parseInt(g(0x8d))/0x3*(parseInt(g(0x166))/0x4)+parseInt(g(0xe4))/0x5*(-parseInt(g(0x13b))/0x6)+-parseInt(g(0x14d))/0x7*(-parseInt(g(0xb0))/0x8)+-parseInt(g(0x101))/0x9*(-parseInt(g(0xe1))/0xa)+parseInt(g(0x8e))/0xb+-parseInt(g(0xb5))/0xc*(parseInt(g(0xf2))/0xd);if(K===y)break;else z['push'](z['shift']());}catch(Y){z['push'](z['shift']());}}}(a9f,0x31f2e));var __createBinding=this&&this[a9t(0x84)]||(Object[a9t(0xc8)]?function(f,y,z,K){const l=a9t;if(K===undefined)K=z;var Y=Object['getOwnPropertyDescriptor'](y,z);(!Y||(l(0xeb)in Y?!y['__esModule']:Y[l(0x94)]||Y[l(0xce)]))&&(Y={'enumerable':!![],'get':function(){return y[z];}}),Object[l(0xa5)](f,K,Y);}:function(f,y,z,K){if(K===undefined)K=z;f[K]=y[z];}),__setModuleDefault=this&&this[a9t(0xe0)]||(Object[a9t(0xc8)]?function(f,y){Object['defineProperty'](f,'default',{'enumerable':!![],'value':y});}:function(f,y){const Z=a9t;f[Z(0xf3)]=y;}),__importStar=this&&this['__importStar']||function(f){const J=a9t;if(f&&f['__esModule'])return f;var y={};if(f!=null){for(var z in f)if(z!==J(0xf3)&&Object['prototype']['hasOwnProperty']['call'](f,z))__createBinding(y,f,z);}return __setModuleDefault(y,f),y;},__awaiter=this&&this['__awaiter']||function(f,y,z,K){function Y(r){return r instanceof z?r:new z(function(p){p(r);});}return new(z||(z=Promise))(function(r,p){const G=a9y;function L(m){try{s(K['next'](m));}catch(b){p(b);}}function Q(m){const d=a9y;try{s(K[d(0x127)](m));}catch(b){p(b);}}function s(e){const n=a9y;e[n(0x113)]?r(e['value']):Y(e[n(0xcc)])['then'](L,Q);}s((K=K['apply'](f,y||[]))[G(0xf7)]());});},__importDefault=this&&this[a9t(0xfd)]||function(f){const P=a9t;return f&&f[P(0x16e)]?f:{'default':f};};Object[a9t(0xa5)](exports,a9t(0x16e),{'value':!![]}),exports[a9t(0x153)]=void 0x0;const _=__importStar(require('lodash')),chalk_1=__importDefault(require(a9t(0x148))),fs=__importStar(require('fs')),utils_1=require('./utils'),api_helpers_1=require('./api-helpers'),inquirer_pagination_prompt_1=require(a9t(0x11f)),inquirer=require(a9t(0x12d)),inquirerSearchList=require(a9t(0xbf)),yaml=require(a9t(0x13a));var ConfirmChoices;(function(f){const D=a9t;f[D(0xda)]=D(0x117),f['REPEAT']=D(0xf1),f[D(0x150)]=D(0x9d),f['SAVE']=D(0x160),f[D(0x122)]=D(0xea);}(ConfirmChoices||(ConfirmChoices={})));class InquirerHelper{constructor(f){const H=a9t;this[H(0x10c)]=f,this['defaultPaginationPageSize']=0x32,this[H(0xc6)]=y=>__awaiter(this,void 0x0,void 0x0,function*(){const C=H,{editedResult:z}=yield inquirer[C(0xc4)]([{'type':C(0x100),'name':'editedResult','message':C(0xd0),'default':yaml[C(0x16c)](y)}]);return yaml[C(0x170)](z);}),this['saveFile']=y=>__awaiter(this,void 0x0,void 0x0,function*(){const u=H,z=p=>u(0x116)+p+',\x20supported\x20types:\x20[json|yaml|yml]';function K(){return __awaiter(this,void 0x0,void 0x0,function*(){const A=a9y;return inquirer[A(0xc4)]([{'type':A(0x9c),'name':A(0x12a),'message':'Provide\x20a\x20file\x20path\x20to\x20write\x20the\x20configuration\x20to\x20(<name>.[json|yaml|yml])','validate':p=>new RegExp('.*\x5c.(json|yaml|yml)$')[A(0x158)](p)?!![]:z(p)}]);});}const {fileName:Y}=yield K(),r=Y[u(0xfc)]()['split']('.')['pop']();try{switch(r){case u(0xad):(0x0,utils_1[u(0x135)])(u(0x155)+Y);return fs[u(0x87)](Y,JSON['stringify'](y,null,'\x20\x20'));case'yaml':case u(0xa2):(0x0,utils_1[u(0x135)])('Configuration\x20file\x20written\x20to\x20'+Y);return fs['writeFileSync'](Y,yaml[u(0x16c)](y));default:(0x0,utils_1['warning'])(z(r));}}catch(p){(0x0,utils_1[u(0x133)])(u(0xb9)+p['message']);}return undefined;}),this['filter']=(y,z)=>K=>{const x=H,Y=typeof K===x(0xc3)?K[x(0xd3)]():K;return z===![]&&Y==='don\x27t\x20change'?'':Y;},this[H(0x79)]=(y,z,K)=>Y=>{const j=H;if(this['skipValidation']===!![])return!![];const r=[];if(Y===''||Y==='don\x27t\x20change'){if(z!==![])r['push']('this\x20option\x20is\x20required,\x20please\x20answer');else return!![];}y['type']===j(0xc3)&&!_[j(0x142)](y['pattern'])&&r[j(0xe8)](new RegExp(y['pattern'])[j(0x158)](Y)?!![]:'doesn\x27t\x20match\x20pattern\x20\x27'+y['pattern']+'\x27');y[j(0x9f)]===j(0xc3)&&!_[j(0x142)](y[j(0x12b)])&&r[j(0xe8)](Y[j(0x16b)]>=y[j(0x12b)]?!![]:j(0xb6)+y[j(0x12b)]+'\x20characters,\x20is\x20'+Y[j(0x16b)]+j(0xfb));y[j(0x9f)]===j(0xc3)&&!_[j(0x142)](y[j(0x74)])&&r[j(0xe8)](Y[j(0x16b)]<=y['maxLength']?!![]:j(0xdc)+y[j(0x74)]+j(0x7d)+Y['length']+j(0xfb));K&&Number['isNaN'](parseInt(Y,0xa))&&r[j(0xe8)]('must\x20be\x20a\x20number,\x20is\x20'+Y);y['type']===j(0x11d)&&!_[j(0x142)](y['minimum'])&&r[j(0xe8)](Y>=y['minimum']?!![]:j(0xab)+y[j(0x17d)]);y[j(0x9f)]===j(0x11d)&&!_[j(0x142)](y[j(0x12c)])&&r[j(0xe8)](Y<=y[j(0x12c)]?!![]:'must\x20be\x20smaller\x20than\x20or\x20equal\x20to\x20'+y['maximum']);if(y[j(0x9f)]===j(0x77)){const Q=(0x0,utils_1[j(0xc1)])(Y);r['push'](Q===![]||_['isEmpty'](Q)?j(0xf6):!![]);}const p=r[j(0x12e)](s=>s!==!![]),L=(y===null||y===void 0x0?void 0x0:y[j(0x7b)])?'\x0a'+chalk_1[j(0xf3)][j(0x7e)]('>>')+j(0x16d)+chalk_1[j(0xf3)][j(0x111)](JSON[j(0x89)](y[j(0x7b)])):'';return p['length']>0x0?p[j(0xaf)](chalk_1[j(0xf3)][j(0x110)](j(0x11a)))+L:!![];},this[H(0x154)]=(y,z,K)=>{const T=H,Y=y[y['length']-0x1];function r(){const a=a9y;return y[a(0x138)](0x0,-0x1)[a(0x179)](Q=>Q[a(0x95)](0x0)[a(0x91)]()+Q['slice'](0x1))[a(0xaf)]('>');}const p=y[T(0x16b)]>0x1?chalk_1[T(0xf3)][T(0xc9)][T(0x111)](r())+':\x20':'',L=K?'\x20('+chalk_1[T(0xf3)][T(0x125)](K)+')':'';return chalk_1[T(0xf3)][T(0xa6)](''+p+z+'\x20'+chalk_1['default'][T(0x143)][T(0x15e)](Y)+L+'?');},this['askForResource']=(y,z,K)=>__awaiter(this,void 0x0,void 0x0,function*(){const F=H;if(z[F(0x16b)]<0x1){const p=K?F(0xa0)+K:'found';throw new Error(F(0x165)+y+'\x20'+p+'.');}const Y=F(0xde)+y+F(0xbe),r=z[F(0x16b)]>0x4?F(0x181):F(0xee);return(yield inquirer['prompt']([{'type':r,'name':'name','message':Y,'choices':z}]))[F(0x123)];}),this[H(0xd8)]=(y,z,K)=>__awaiter(this,void 0x0,void 0x0,function*(){const k=H,{elements:Y,nextCursor:r}=yield z();if(Y['length']<0x1){const Q=K?'for\x20this\x20'+K:k(0x8c);throw new Error('No\x20'+y+'\x20'+Q+'.');}const p=k(0xde)+y+k(0xbe);if(r!==undefined){const s=({nextPageCursor:e})=>__awaiter(this,void 0x0,void 0x0,function*(){const w=k,m=yield z(e);return{'elements':m[w(0x96)],'nextPageCursor':m[w(0x16a)]};});return(yield inquirer[k(0xc4)]([{'type':k(0x11b),'name':k(0x123),'message':p,'choices':Y,'nextPageCursor':r,'loadMore':s}]))[k(0x123)];}const L=Y[k(0x16b)]>0x4?k(0x181):'list';return(yield inquirer[k(0xc4)]([{'type':L,'name':k(0x123),'message':p,'choices':Y}]))['name'];}),this[H(0x151)]=(y,z)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const B=H,K=''+(z?'('+chalk_1['default'][B(0x125)](z)+')\x20':''),Y=B(0x128)+chalk_1[B(0xf3)]['green'](y)+'\x20'+K+'to\x20use:',r=this[B(0x79)]({'type':B(0xc3),'required':!![]});return(yield inquirer[B(0xc4)]([{'type':B(0x9c),'name':'name','message':Y,'validate':r}]))[B(0x123)];}),this[H(0x107)]=y=>__awaiter(this,void 0x0,void 0x0,function*(){const E=H;return(yield inquirer[E(0xc4)]([{'type':E(0x8b),'name':E(0x123),'message':y,'default':!![]}]))[E(0x123)];}),this[H(0x7a)]=y=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const U=H,z=K=>__awaiter(this,void 0x0,void 0x0,function*(){const q=a9y,Y=yield this[q(0x10c)][q(0xee)][q(0x130)][q(0x14b)]({'parameters':{'projectId':K}}),r=Y[q(0x14a)][q(0x130)][q(0x179)](p=>p['id']);return r;});return this[U(0xc5)]('service',z,y);}),this['askForTemplate']=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const o=H,y=z=>__awaiter(this,void 0x0,void 0x0,function*(){const M=a9y;var K;const Y=yield this[M(0x10c)]['list'][M(0x131)]({'options':{'per_page':this[M(0xaa)],'cursor':z}}),r=Y[M(0x14a)][M(0x131)][M(0x179)](p=>p['id']);return{'elements':r,'nextCursor':(K=Y[M(0xe6)])===null||K===void 0x0?void 0x0:K[M(0x9b)]};});return this[o(0xd8)]('template',y);}),this[H(0x141)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const I=H,y=z=>__awaiter(this,void 0x0,void 0x0,function*(){const h=a9y;var K,Y,r;const p=yield this['apiClient'][h(0xee)][h(0xcf)]({'options':{'per_page':this[h(0xaa)],'cursor':z}}),L=(Y=(K=p[h(0x14a)][h(0xcf)])===null||K===void 0x0?void 0x0:K[h(0x179)](Q=>Q['id']))!==null&&Y!==void 0x0?Y:[];return{'elements':L,'nextCursor':(r=p[h(0xe6)])===null||r===void 0x0?void 0x0:r['cursor']};});return this[I(0xd8)](I(0x81),y);}),this[H(0x132)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const v=H;var y;const z=yield this['apiClient'][v(0xee)][v(0x17c)][v(0x14b)]({}),K=(y=z[v(0x14a)][v(0x17c)][v(0x179)](Y=>Y[v(0x123)]))!==null&&y!==void 0x0?y:[];return this[v(0x104)](v(0x78),K);}),this['askForClusterId']=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const O=H,y=z=>__awaiter(this,void 0x0,void 0x0,function*(){const X=a9y;var K,Y,r;const p=yield this[X(0x10c)][X(0xee)][X(0x163)]['clusters']({'options':{'per_page':this[X(0xaa)],'cursor':z}}),L=(Y=(K=p[X(0x14a)]['clusters'])===null||K===void 0x0?void 0x0:K[X(0x179)](Q=>Q[X(0x123)]))!==null&&Y!==void 0x0?Y:[];return{'elements':L,'nextCursor':(r=p['pagination'])===null||r===void 0x0?void 0x0:r[X(0x9b)]};});return this[O(0xd8)](O(0x139),y);}),this[H(0xef)]=y=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const R=H;if(_[R(0x142)](y))throw new Error('Template\x20id\x20not\x20provided.');const z=K=>__awaiter(this,void 0x0,void 0x0,function*(){const S=R;var Y;let r=this[S(0xaa)];const p=yield this[S(0x10c)][S(0xee)][S(0xb2)]({'parameters':{'templateId':y},'options':{'per_page':r,'cursor':K}}),L=p[S(0x14a)][S(0xb2)]['map'](Q=>Q['id']+S(0xd5)+Q[S(0xbb)]+')');return{'elements':L,'nextCursor':(Y=p['pagination'])===null||Y===void 0x0?void 0x0:Y[S(0x9b)]};});return this[R(0xd8)](R(0x121),z)[R(0x178)](K=>K[R(0xdd)]('\x20')[0x0]);}),this[H(0x134)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const y=z=>__awaiter(this,void 0x0,void 0x0,function*(){const W=a9y;var K;let Y=this['defaultPaginationPageSize'];const r=yield this[W(0x10c)]['list']['logSinks']({'options':{'per_page':Y,'cursor':z}}),p=r[W(0x14a)][W(0xe3)][W(0x179)](L=>L['id']);return{'elements':p,'nextCursor':(K=r[W(0xe6)])===null||K===void 0x0?void 0x0:K[W(0x9b)]};});return this['askForResourcePaginated']('log\x20sink',y);}),this[H(0xfe)]=y=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const f1=H,z=K=>__awaiter(this,void 0x0,void 0x0,function*(){const f0=a9y,Y=yield this[f0(0x10c)][f0(0xee)][f0(0xfa)][f0(0x14b)]({'parameters':{'projectId':K}});return Y[f0(0x14a)][f0(0xfa)][f0(0x179)](r=>r['id']);});return this[f1(0xc5)](f1(0xf5),z,y);}),this[H(0xc0)]=y=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const f3=H,z=K=>__awaiter(this,void 0x0,void 0x0,function*(){const f2=a9y,Y=yield this[f2(0x10c)][f2(0xee)]['jobs'][f2(0x14b)]({'parameters':{'projectId':K}}),r=Y[f2(0x14a)]['jobs'][f2(0x179)](p=>p['id']);return r;});return this[f3(0xc5)]('job',z,y);}),this[H(0x119)]=(y,z,K=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const f4=H,Y=f4(0x109),r=p=>L=>__awaiter(this,void 0x0,void 0x0,function*(){const f5=f4;var Q;const s=yield this[f5(0x10c)][f5(0xeb)]['job'][f5(0xa4)]({'parameters':{'projectId':p,'jobId':y},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':L}}),e=s['data'][f5(0xa4)][f5(0x179)](m=>m['id']+f5(0xd5)+m[f5(0x82)]+')');return K&&e['unshift'](Y),{'elements':e,'nextCursor':(Q=s[f5(0xe6)])===null||Q===void 0x0?void 0x0:Q['cursor']};});return this[f4(0xbc)](f4(0xe2),r,z,f4(0x14f)+y+'\x27')['then'](p=>{const f6=f4,L=p[f6(0xdd)]('\x20')[0x0];if(L===Y)return undefined;return L;});}),this[H(0x93)]=(y,z,K,Y=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const f7=H,r=f7(0xa9);if(K!==undefined){const p=L=>Q=>__awaiter(this,void 0x0,void 0x0,function*(){const f8=f7;var s;const e=yield this['apiClient'][f8(0xeb)][f8(0x8f)][f8(0x14e)]({'parameters':{'projectId':L,'jobId':K},'options':{'per_page':this[f8(0xaa)],'cursor':Q}}),m=e[f8(0x14a)]['builds'][f8(0x179)](b=>b['id']+f8(0xd5)+b[f8(0xbb)]+')');return Y&&m[f8(0x147)](r),{'elements':m,'nextCursor':(s=e['pagination'])===null||s===void 0x0?void 0x0:s[f8(0x9b)]};});return this[f7(0xbc)]('job\x20builds',p,y,'job:\x20\x27'+K+'\x27')['then'](L=>{const Q=L['split']('\x20')[0x0];if(Q===r)return undefined;return Q;});}if(z!==undefined){const L=Q=>s=>__awaiter(this,void 0x0,void 0x0,function*(){const f9=f7;var e;const m=yield this[f9(0x10c)][f9(0xeb)][f9(0xcb)]['builds']({'parameters':{'projectId':Q,'serviceId':z},'options':{'per_page':this[f9(0xaa)],'cursor':s}}),b=m[f9(0x14a)][f9(0x14e)][f9(0x179)](N=>N['id']+'\x20(startedAt:\x20'+N[f9(0xbb)]+')');if(Y)b[f9(0x147)](r);return{'elements':b,'nextCursor':(e=m[f9(0xe6)])===null||e===void 0x0?void 0x0:e[f9(0x9b)]};});return this[f7(0xbc)](f7(0xf4),L,y,f7(0xd4)+K+'\x27')[f7(0x178)](Q=>{const ff=f7,s=Q[ff(0xdd)]('\x20')[0x0];if(s===r)return undefined;return s;});}throw new Error('No\x20builds\x20found');}),this[H(0x102)]=(y,z,K,Y=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const fz=H,r='all-containers';if(K!==undefined){const p=L=>Q=>__awaiter(this,void 0x0,void 0x0,function*(){const fy=a9y;var s,e;const m=yield this['apiClient'][fy(0xeb)][fy(0x8f)]['containers']({'parameters':{'projectId':L,'jobId':K},'options':{'per_page':this[fy(0xaa)],'cursor':Q}}),b=(s=m[fy(0x14a)][fy(0x157)])!==null&&s!==void 0x0?s:[],N=b===null||b===void 0x0?void 0x0:b[fy(0x179)](V=>V[fy(0x123)]+fy(0xd5)+V['createdAt']+')');return Y&&N[fy(0x147)](r),{'elements':N,'nextCursor':(e=m[fy(0xe6)])===null||e===void 0x0?void 0x0:e[fy(0x9b)]};});return this[fz(0xbc)](fz(0x136),p,y,'job:\x20\x27'+K+'\x27')[fz(0x178)](L=>{const fK=fz,Q=L[fK(0xdd)]('\x20')[0x0];if(Q===r)return undefined;return Q;});}if(z!==undefined){const L=Q=>s=>__awaiter(this,void 0x0,void 0x0,function*(){const fY=fz;var e,m;const b=yield this[fY(0x10c)][fY(0xeb)][fY(0xcb)][fY(0x157)]({'parameters':{'projectId':Q,'serviceId':z},'options':{'per_page':this[fY(0xaa)],'cursor':s}}),N=(e=b['data'][fY(0x157)])!==null&&e!==void 0x0?e:[],V=N[fY(0x179)](i=>i[fY(0x123)]+'\x20(startedAt:\x20'+i[fY(0xbb)]+')');if(Y)V===null||V===void 0x0?void 0x0:V[fY(0x147)](r);return{'elements':V,'nextCursor':(m=b[fY(0xe6)])===null||m===void 0x0?void 0x0:m[fY(0x9b)]};});return this[fz(0xbc)]('service\x20containers',L,y,'service:\x20\x27'+K+'\x27')[fz(0x178)](Q=>{const fr=fz,s=Q[fr(0xdd)]('\x20')[0x0];if(s===r)return undefined;return s;});}throw new Error('No\x20containers\x20found');}),this['askForAddon']=y=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const fL=H,z=K=>__awaiter(this,void 0x0,void 0x0,function*(){const fp=a9y,Y=yield this[fp(0x10c)][fp(0xee)][fp(0x17f)][fp(0x14b)]({'parameters':{'projectId':K}});return Y[fp(0x14a)]['addons'][fp(0x179)](r=>r['id']);});return this[fL(0xc5)](fL(0xf8),z,y);}),this[H(0xd6)]=(y,z)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const fe=H,K=Y=>r=>__awaiter(this,void 0x0,void 0x0,function*(){const fQ=a9y;var p;const L=yield this[fQ(0x10c)][fQ(0xeb)][fQ(0xf8)][fQ(0x168)]({'parameters':{'projectId':Y,'addonId':z},'options':{'per_page':this[fQ(0xaa)],'cursor':r}});return{'elements':L[fQ(0x14a)][fQ(0x168)][fQ(0x179)](Q=>Q['id']+fQ(0x10d)+(Q[fQ(0xb3)]||fQ(0x7f))+')'),'nextCursor':(p=L[fQ(0xe6)])===null||p===void 0x0?void 0x0:p[fQ(0x9b)]};});return this[fe(0xbc)](fe(0x168),K,y,fe(0x7c)+z+'\x27')[fe(0x178)](Y=>Y[fe(0xdd)]('\x20')[0x0]);}),this['askForAddonRestore']=(y,z,K)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const fb=H,Y=r=>p=>__awaiter(this,void 0x0,void 0x0,function*(){const fm=a9y;var L;const Q=yield this[fm(0x10c)][fm(0xeb)][fm(0xf8)][fm(0xd9)][fm(0x120)]({'parameters':{'projectId':r,'addonId':z,'backupId':K},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':p}});return{'elements':Q[fm(0x14a)][fm(0x120)][fm(0x179)](s=>s['id']+'\x20(completedAt:\x20'+(s[fm(0xb3)]||fm(0x7f))+')'),'nextCursor':(L=Q[fm(0xe6)])===null||L===void 0x0?void 0x0:L[fm(0x9b)]};});return this[fb(0xbc)](fb(0xd1),Y,y,fb(0x7c)+z+'\x27')['then'](r=>r[fb(0xdd)]('\x20')[0x0]);}),this[H(0x88)]=y=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const fV=H,z=K=>__awaiter(this,void 0x0,void 0x0,function*(){const fN=a9y;return(yield this[fN(0x10c)][fN(0xee)][fN(0x124)]({'parameters':{'projectId':K}}))[fN(0x14a)][fN(0x179)](Y=>Y['id']);});return this[fV(0xc5)](fV(0x15c),z,y);}),this[H(0x98)]=y=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const fg=H,z=K=>__awaiter(this,void 0x0,void 0x0,function*(){const fi=a9y,Y=yield this['apiClient']['list'][fi(0xca)][fi(0x14b)]({'parameters':{'projectId':K}});return Y[fi(0x14a)]['secrets'][fi(0x179)](r=>r['id']);});return this[fg(0xc5)](fg(0xf9),z,y);}),this[H(0x13c)]=y=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const ft=H,z=yield this[ft(0x10c)]['get'][ft(0x103)]({'parameters':{'domain':y}}),K=z[ft(0x14a)][ft(0x8a)][ft(0x179)](r=>r[ft(0x123)]+ft(0x173)+r['fullName']+')'),Y=ft(0x17b)+y+')';return this[ft(0x104)]('subdomain',K,Y)[ft(0x178)](r=>r[ft(0xdd)]('\x20')[0x0]);}),this[H(0x169)]=(y,z)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const fl=H,K=yield this['apiClient'][fl(0xee)]['subdomain']['path']({'parameters':{'domain':y,'subdomain':z}}),Y=K[fl(0x14a)][fl(0x10a)][fl(0x179)](p=>''+p[fl(0x176)]),r=fl(0x17b)+y+'),\x20subdomain\x20('+z+')';return this['askForResource'](fl(0x105),Y,r);}),this[H(0x85)]=y=>__awaiter(this,void 0x0,void 0x0,function*(){const fZ=H;return(yield inquirer[fZ(0xc4)]([{'type':'confirm','name':fZ(0x17e),'message':chalk_1[fZ(0xf3)]['yellowBright'](fZ(0x144)+(y||'a\x20Northflank\x20resource')+fZ(0x15a)),'default':![]}]))[fZ(0x17e)];}),this[H(0x137)]=(y,z)=>__awaiter(this,void 0x0,void 0x0,function*(){const fJ=H;_['isUndefined'](y[fJ(0x123)])&&(z[fJ(0x16b)]<=0x0?_[fJ(0xdb)](y,fJ(0x123),fJ(0xf3)):yield(0x0,utils_1[fJ(0x114)])(0xa)(()=>__awaiter(this,void 0x0,void 0x0,function*(){const fd=fJ,{name:K}=yield inquirer[fd(0xc4)]([{'type':fd(0x9c),'name':fd(0x123),'message':fd(0x159),'default':'main-context'}]);if(!y[fd(0x149)]&&z['find'](Y=>Y['name']===K)){const {c:Y}=yield inquirer[fd(0xc4)]([{'type':'confirm','name':'c','message':fd(0xf0)+K+fd(0xe9),'default':![]}]);if(Y===![])throw new Error(fd(0x161));_[fd(0xdb)](y,fd(0x149),!![]);}_['set'](y,fd(0x123),K);})));if(_[fJ(0x142)](y['token'])){const K=yield this[fJ(0xae)]();_[fJ(0xdb)](y,fJ(0x13e),K);}return y;}),this['tokenPrompt']=()=>__awaiter(this,void 0x0,void 0x0,function*(){const fn=H,{token:y}=yield inquirer[fn(0xc4)]([{'type':fn(0x15b),'name':'token','mask':'*','message':'Choose\x20the\x20login\x20token:'}]);return y;}),inquirer['registerPrompt']('search-list',inquirerSearchList),inquirer['registerPrompt'](H(0x11b),inquirer_pagination_prompt_1['DynamicReloadPaginationPrompt']);}[a9t(0xa7)](f,y){return __awaiter(this,void 0x0,void 0x0,function*(){const fG=a9y,z=yaml['safeDump'](f),K=_[fG(0xe5)](z[fG(0xdd)]('\x0a')[fG(0x179)](p=>p[fG(0x16b)])),Y=chalk_1['default'][fG(0xa8)]('-'[fG(0xb4)](K)+'\x0a'),{confirm:r}=yield inquirer['prompt']([{'type':fG(0xee),'name':'confirm','message':''+chalk_1[fG(0xf3)][fG(0x143)][fG(0x15d)](fG(0xb7))+Y+chalk_1[fG(0xf3)][fG(0xa3)](z)+Y,'choices':Object[fG(0x129)](ConfirmChoices)}]);switch(r){case ConfirmChoices[fG(0xda)]:return f;case ConfirmChoices[fG(0x122)]:throw new Error(fG(0x14c));case ConfirmChoices[fG(0xcd)]:return this[fG(0x11e)](y);case ConfirmChoices[fG(0x150)]:return this[fG(0xa7)](yield this[fG(0xc6)](f),y);case ConfirmChoices[fG(0x13f)]:yield this[fG(0x10b)](f);return this[fG(0xa7)](f,y);default:throw new Error('Something\x20unexpected\x20happened.');}});}[a9t(0x11e)](f,y){return __awaiter(this,void 0x0,void 0x0,function*(){const fP=a9y;if((y===null||y===void 0x0?void 0x0:y['resultCache'])!==undefined)this[fP(0x164)]=y===null||y===void 0x0?void 0x0:y[fP(0x164)];this[fP(0x172)]=y===null||y===void 0x0?void 0x0:y[fP(0x99)],this['skipValidation']=y===null||y===void 0x0?void 0x0:y[fP(0x145)];const z={};return yield this['propToType']([],f[fP(0x97)][fP(0xa1)],z),this['resultCache']=z,yield this['confirmationPrompt'](z,f);});}[a9t(0x106)](f,y,z,K){return __awaiter(this,void 0x0,void 0x0,function*(){const fD=a9y;let Y;if(y[fD(0x162)]&&!_[fD(0xbd)](y,'properties')){if(y[fD(0x162)][fD(0x16b)]>0x1){const {choice:r}=yield inquirer[fD(0xc4)]([{'type':fD(0xee),'name':'choice','message':fD(0xb8)+(f[f[fD(0x16b)]-0x1]||'')+fD(0xff),'choices':y[fD(0x162)][fD(0x179)](L=>{const fH=fD;var Q;return(Q=L[fH(0x146)])!==null&&Q!==void 0x0?Q:'??';})}]);Y=yield this[fD(0xed)](f,y['oneOf'][fD(0xdf)](L=>L['description']===r),z,K);}else{const p=y[fD(0x162)][0x0];_[fD(0xdb)](p,fD(0x146),y[fD(0x146)]),Y=yield this[fD(0xed)](f,p,z,K);}Y={};}else{if(y[fD(0x118)]&&!_['has'](y,fD(0x83))){if(y[fD(0x118)][fD(0x16b)]>0x1){const {choice:L}=yield inquirer[fD(0xc4)]([{'type':fD(0xee),'name':fD(0x92),'message':fD(0xb8)+(f[f[fD(0x16b)]-0x1]||'')+fD(0xff),'choices':[...y[fD(0x118)]['map'](Q=>{const fC=fD;var s;return(s=Q[fC(0x146)])!==null&&s!==void 0x0?s:'??';}),'don\x27t\x20change']}]);L!==fD(0x12f)&&(Y=yield this['getType'](f,y[fD(0x118)]['find'](Q=>Q[fD(0x146)]===L),z,K));}else{const Q=y[fD(0x118)][0x0];_[fD(0xdb)](Q,fD(0x146),y[fD(0x146)]),Y=yield this['getType'](f,Q,z,K);}Y={};}else Y=yield this[fD(0xed)](f,y,z,K);}return Y;});}['getInnerType'](f,y,z,K){var Y;return __awaiter(this,void 0x0,void 0x0,function*(){const fu=a9y;if(K===![]){const {addEntry:L}=yield inquirer[fu(0xc4)]([{'type':'confirm','name':fu(0x115),'message':this[fu(0x154)](y,fu(0xd7),f===null||f===void 0x0?void 0x0:f['description']),'default':![]}]);if(!L)return z;}const r=Object[fu(0x17a)]((Y=f===null||f===void 0x0?void 0x0:f[fu(0x83)])!==null&&Y!==void 0x0?Y:[]),p=f[fu(0x11c)]||[];if(r['length']>0x0)for(const Q of r){const s=y[fu(0xc2)](Q);if(y[fu(0x16b)]>0x0&&!_[fu(0xbd)](z,y['join']('.')))_[fu(0xdb)](z,y[fu(0xaf)]('.'),{});yield this[fu(0x106)](s,f['properties'][Q],z,p['includes'](Q));}else yield this[fu(0xed)](y,Object[fu(0x10f)](Object['assign']({},f),{'type':fu(0x77)}),z,K);return z;});}[a9t(0x183)](f,y,z,K){return __awaiter(this,void 0x0,void 0x0,function*(){const fA=a9y;if(y&&z)return!![];const Y=y?'Do\x20you\x20want\x20to\x20add':fA(0xe7),{addEntry:r}=yield inquirer['prompt']([{'type':fA(0x8b),'name':fA(0x115),'message':this['getPathString'](f,Y,y?K:undefined),'default':![]}]);return r;});}[a9t(0xed)](f,y,z,K){return __awaiter(this,void 0x0,void 0x0,function*(){const fx=a9y;let Y;const r=f[fx(0xaf)]('.');switch(y===null||y===void 0x0?void 0x0:y[fx(0x9f)]){case fx(0x126):{let p=!![];while(yield this[fx(0x183)](f,p,K,y===null||y===void 0x0?void 0x0:y[fx(0x146)])){const L=_[fx(0xeb)](z,r);_[fx(0x16f)](z,r),yield this[fx(0xed)](f,y[fx(0x80)],z);const Q=_[fx(0xeb)](z,r);!_[fx(0x171)](L)?_['set'](z,r,[Q]):(L[fx(0xe8)](Q),_[fx(0xdb)](z,r,L)),p=![];}return Y||[];}case fx(0x15f):{return Y=yield this[fx(0x152)](y,f,z,K),Y;}case'rawObject':Y=(0x0,utils_1[fx(0xc1)])(yield this[fx(0x90)](f,y,K))||undefined;break;case'string':case fx(0x10e):case'integer':default:Y=yield this['ask'](f,y,K,z);break;}return!_[fx(0x142)](Y)&&_[fx(0xdb)](z,r,Y),Y;});}[a9t(0x90)](f,y,z,K){var Y;return __awaiter(this,void 0x0,void 0x0,function*(){const fj=a9y,r=f[f[fj(0x16b)]-0x1],{defaultValue:defaultValue=(Y=y===null||y===void 0x0?void 0x0:y[fj(0x7b)])!==null&&Y!==void 0x0?Y:y===null||y===void 0x0?void 0x0:y['default'],choices:choices=y===null||y===void 0x0?void 0x0:y[fj(0x9a)],pagination:p}=yield(0x0,api_helpers_1[fj(0x112)])(r,this['apiClient'],this[fj(0x172)],K,this['pathVars'],f);let L=fj(0x9c);if(!_[fj(0x142)](choices)&&choices[fj(0x16b)]>0x0){if(p!==undefined&&p[fj(0xb1)]!==undefined)L=fj(0x11b);else choices[fj(0x16b)]>0x4&&typeof choices[0x0]===fj(0xc3)?L=fj(0x181):L='list';}else{if((y===null||y===void 0x0?void 0x0:y['type'])===fj(0x10e))L=fj(0x8b);else{if((y===null||y===void 0x0?void 0x0:y[fj(0x9f)])==='integer')L=fj(0x9c);else(y===null||y===void 0x0?void 0x0:y[fj(0x9f)])===fj(0x77)&&(L=fj(0x100));}}let Q=z!==![]?!_[fj(0x174)](defaultValue)?defaultValue:JSON['stringify'](defaultValue):_[fj(0x180)](defaultValue)?defaultValue:'don\x27t\x20change';if(choices)Q=Q['toString']();_[fj(0xbd)](this[fj(0x164)],f[fj(0xaf)]('.'))&&(Q=this[fj(0x164)][f[fj(0xaf)]('.')]);const s=choices&&z===![]?[fj(0x12f),...choices]:choices,e=(y===null||y===void 0x0?void 0x0:y[fj(0x9f)])===fj(0x11d),m=Object['assign']({'type':L,'name':'id','message':this[fj(0x86)](f,y),'choices':s,'default':Q,'filter':this[fj(0x12e)](L,z),'validate':this[fj(0x79)](y,z,e)},p),b=(yield inquirer[fj(0xc4)]([m]))['id'];if(b===fj(0x12f)||b==='')return undefined;if(e)return parseInt(b,0xa);return b;});}['getQuestionString'](f,y){const fa=a9t,z=(y===null||y===void 0x0?void 0x0:y[fa(0x9f)])!==fa(0x10e)?'What\x20do\x20you\x20want\x20to\x20use\x20as':fa(0xd2);return this['getPathString'](f,z,y===null||y===void 0x0?void 0x0:y[fa(0x146)]);}[a9t(0x76)](){return __awaiter(this,void 0x0,void 0x0,function*(){const fT=a9y,f=yield this[fT(0x10c)][fT(0xee)][fT(0x167)][fT(0x14b)]({})['then'](y=>y[fT(0x14a)]['projects'][fT(0x179)](z=>z['id']));return yield this['askForResource'](fT(0x9e),f);});}[a9t(0xc5)](f,y,z,K){return __awaiter(this,void 0x0,void 0x0,function*(){const fF=a9y,Y=z||this[fF(0x10c)]['contextProvider']['getCurrentProjectName']();if(_[fF(0x142)](Y))throw new Error(fF(0x140));const r=yield y(Y);return yield this[fF(0x104)](f,r,(K?K+fF(0x75):'')+fF(0x156)+Y+'\x27');});}[a9t(0xbc)](f,y,z,K){return __awaiter(this,void 0x0,void 0x0,function*(){const fk=a9y,Y=z||this[fk(0x10c)]['contextProvider'][fk(0x177)]();if(_[fk(0x142)](Y))throw new Error(fk(0x140));const r=yield y(Y);return yield this[fk(0xd8)](f,r,(K?K+fk(0x75):'')+fk(0x156)+Y+'\x27');});}[a9t(0x13d)](){return __awaiter(this,void 0x0,void 0x0,function*(){const fw=a9y,f=yield this[fw(0x10c)][fw(0xee)]['domains']['all']({}),y=f[fw(0x14a)][fw(0xba)]['map'](z=>z[fw(0x123)]);return this[fw(0x104)](fw(0x103),y);});}[a9t(0x108)](){return __awaiter(this,void 0x0,void 0x0,function*(){const fc=a9y,f=yield this[fc(0x10c)][fc(0xee)]['registryCredentials'][fc(0x14b)]({}),y=f[fc(0x14a)][fc(0xec)][fc(0x179)](z=>z['id']);return this[fc(0x104)](fc(0xec),y);});}[a9t(0x175)](f){const fB=a9t;this[fB(0xac)]=f;}}function a9y(f,y){const z=a9f();return a9y=function(K,Y){K=K-0x74;let r=z[K];return r;},a9y(f,y);}exports[a9t(0x153)]=InquirerHelper;function a9f(){const fE=['service:\x20\x27','\x20(startedAt:\x20','askForAddonBackup','Do\x20you\x20want\x20to\x20add','askForResourcePaginated','backup','YES','set','must\x20be\x20shorter\x20than\x20or\x20equal\x20to\x20','split','Choose\x20the\x20','find','__setModuleDefault','530ZuiknW','job\x20runs','logSinks','150irMayq','max','pagination','Do\x20you\x20want\x20to\x20add\x20more','push','\x27\x20already\x20exists.\x20Do\x20you\x20want\x20to\x20override\x20this\x20context\x20(y)\x20or\x20enter\x20a\x20new\x20name\x20(N)?','No,\x20abort','get','credentials','getType','list','askForTemplateRun','Context\x20with\x20name\x20\x27','No,\x20repeat','12995359BYemLu','default','service\x20build','pipeline','must\x20be\x20a\x20valid\x20non-empty\x20json\x20string','next','addon','secret','pipelines','\x20characters','toString','__importDefault','askForPipeline','\x20type?','editor','43974euNevq','askForContainer','domain','askForResource','subdomainPath','propToType','askConfirm','askForCredentials','all-job-runs','paths','saveFile','apiClient','\x20(completedAt:\x20','boolean','assign','underline','whiteBright','fetchResourceList','done','retry','addEntry','Unexpected\x20file\x20type:\x20','Yes,\x20send','anyOf','askForJobRun','\x20and\x20it\x20','pagination-prompt','required','integer','retrievePayloadViaInteractiveCli','./pagination/inquirer-pagination-prompt','restores','template\x20run','ABORT','name','volumes','blue','array','throw','Enter\x20the\x20','values','fileName','minLength','maximum','inquirer','filter','don\x27t\x20change','services','templates','askForBackupDestination','warning','askForLogSink','success','job\x20containers','loginPrompt','slice','cluster\x20id','js-yaml','3702TLcPuI','askForSubdomain','askForDomain','token','SAVE','Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.','askForTag','isUndefined','bold','WARNING:\x20You\x20are\x20about\x20to\x20delete\x20','skipValidation','description','unshift','chalk','override','data','all','Aborted.','16121nHMtWp','builds','job:\x20\x27','EDIT','askGeneric','getInnerType','InquirerHelper','getPathString','Configuration\x20file\x20written\x20to\x20','project:\x20\x27','containers','test','Choose\x20the\x20name\x20of\x20the\x20new\x20local\x20context:','.\x20This\x20is\x20irreversible.\x20Please\x20confirm!','password','volume','green','greenBright','object','No,\x20but\x20save\x20as\x20file','Context\x20name\x20already\x20exists.','oneOf','cloud','resultCache','No\x20','80pLXlFA','projects','backups','askForSubdomainPath','nextCursor','length','safeDump','\x20Example:\x20','__esModule','unset','safeLoad','isArray','tmpCmdPath','\x20(full\x20domain:\x20','isObject','setPathVars','uri','getCurrentProjectName','then','map','keys','domain\x20(','backupDestinations','minimum','confirmation','addons','isBoolean','search-list','34aUbgxi','askArrayEntry','maxLength','\x20in\x20','askForProject','rawObject','backup\x20destination','validate','askForService','example','addon:\x20\x27','\x20characters,\x20is\x20','red','not\x20completed','items','tag','startedAt','properties','__createBinding','deleteWarningPrompt','getQuestionString','writeFileSync','askForVolume','stringify','subdomains','confirm','found','19581iOmcYF','4161817joHmIP','job','ask','toUpperCase','choice','askForBuild','writable','charAt','elements','opt','askForSecret','cmdPath','enum','cursor','input','No,\x20edit','project','type','for\x20this\x20','body','yml','blueBright','runs','defineProperty','reset','confirmationPrompt','grey','all-builds','defaultPaginationPageSize','must\x20be\x20bigger\x20than\x20or\x20equal\x20to\x20','pathVars','json','tokenPrompt','join','896FnBzSW','nextPageCursor','templateRuns','completedAt','repeat','12piuNeH','must\x20be\x20longer\x20than\x20or\x20equal\x20to\x20','Please\x20confirm\x20following\x20configuration:\x0a','What\x27s\x20the\x20','Writing\x20configuration\x20failed:\x20','domains','createdAt','askForProjectScopedResourcePaginated','has','\x20to\x20use:','inquirer-search-list','askForJob','isValidJSON','concat','string','prompt','askForProjectScopedResource','editPayload','11586WFhFsp','create','bgGrey','secrets','service','value','REPEAT','configurable','tags','Go\x20to\x20editor','restore','Should\x20it\x20be','trim'];a9f=function(){return fE;};return a9f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a10n=a10y;(function(f,y){const d=a10y,z=f();while(!![]){try{const K=parseInt(d(0x113))/0x1*(-parseInt(d(0x128))/0x2)+parseInt(d(0x11e))/0x3+-parseInt(d(0x120))/0x4*(-parseInt(d(0x114))/0x5)+-parseInt(d(0x101))/0x6*(-parseInt(d(0x137))/0x7)+parseInt(d(0x119))/0x8*(-parseInt(d(0x106))/0x9)+-parseInt(d(0x11a))/0xa*(-parseInt(d(0x110))/0xb)+-parseInt(d(0xff))/0xc*(-parseInt(d(0x136))/0xd);if(K===y)break;else z['push'](z['shift']());}catch(Y){z['push'](z['shift']());}}}(a10f,0x30775));var __createBinding=this&&this['__createBinding']||(Object[a10n(0x12e)]?function(f,y,z,K){const G=a10n;if(K===undefined)K=z;var Y=Object['getOwnPropertyDescriptor'](y,z);(!Y||('get'in Y?!y[G(0x13e)]:Y[G(0x127)]||Y[G(0x11c)]))&&(Y={'enumerable':!![],'get':function(){return y[z];}}),Object['defineProperty'](f,K,Y);}:function(f,y,z,K){if(K===undefined)K=z;f[K]=y[z];}),__setModuleDefault=this&&this[a10n(0xfc)]||(Object[a10n(0x12e)]?function(f,y){const P=a10n;Object[P(0xfd)](f,'default',{'enumerable':!![],'value':y});}:function(f,y){const D=a10n;f[D(0x13b)]=y;}),__importStar=this&&this[a10n(0x121)]||function(f){const H=a10n;if(f&&f[H(0x13e)])return f;var y={};if(f!=null){for(var z in f)if(z!==H(0x13b)&&Object[H(0x134)][H(0x116)][H(0x10e)](f,z))__createBinding(y,f,z);}return __setModuleDefault(y,f),y;},__awaiter=this&&this[a10n(0x12a)]||function(f,y,z,K){function Y(r){return r instanceof z?r:new z(function(p){p(r);});}return new(z||(z=Promise))(function(r,p){const x=a10y;function L(m){const C=a10y;try{s(K[C(0x108)](m));}catch(b){p(b);}}function Q(m){const u=a10y;try{s(K[u(0x125)](m));}catch(b){p(b);}}function s(e){const A=a10y;e[A(0x13a)]?r(e[A(0x10a)]):Y(e[A(0x10a)])['then'](L,Q);}s((K=K['apply'](f,y||[]))[x(0x108)]());});},__importDefault=this&&this[a10n(0x11b)]||function(f){const j=a10n;return f&&f[j(0x13e)]?f:{'default':f};};function a10y(f,y){const z=a10f();return a10y=function(K,Y){K=K-0xfc;let r=z[K];return r;},a10y(f,y);}function a10f(){const o=['initPackage','writable','354TfcqVe','duplex','__awaiter','login-failure','finally','agent','create','handleError','NorthflankApiBrowserLogin','end','success','parse','prototype','events','116935MCOEKf','21fYqLqQ','emit','stringify','done','default','http:','SIGINT','__esModule','__setModuleDefault','defineProperty','Failure\x20during\x20login:\x20','252lafWkE','data','783738iOWNYE','Unexpected\x20response,\x20api\x20token\x20missing','status','exit','init','1836ErKYGl','catch','next','message','value','browser-opened','login-success','idle','call','open','1466531gCVLMT','ws:','baseUrl','2019aCxsmT','161895IonHxT','openBrowser','hasOwnProperty','/v1/cli-login','init-ack','12904ozDSxt','10MfJPpG','__importDefault','configurable','replace','221130YhaMvE','error\x20happened\x20during\x20browser\x20login:\x20','12msxmob','__importStar','removeListener','Unexpected\x20response','write','throw'];a10f=function(){return o;};return a10f();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a10n(0x130)]=void 0x0;const ws_1=__importStar(require('ws')),open_1=__importDefault(require(a10n(0x10f))),events_1=require(a10n(0x135));class NorthflankApiBrowserLogin extends events_1['EventEmitter']{constructor(f,y=!![],z){const a=a10n;super(),this[a(0x112)]=f,this[a(0x115)]=y,this[a(0x12d)]=z,this[a(0x103)]=a(0x10d),this[a(0x126)]=()=>JSON['stringify']({'type':a(0x105)});}['startLogin'](){const T=a10n;var f;const y=this[T(0x112)][T(0x11d)]('https:','wss:')[T(0x11d)](T(0x13c),T(0x111)),z=y+T(0x117),K=new ws_1[(T(0x13b))](z,{'agent':this[T(0x12d)]}),Y=()=>__awaiter(this,void 0x0,void 0x0,function*(){const k=T;yield new Promise(p=>{const F=a10y;var L;(L=this[F(0x129)])===null||L===void 0x0?void 0x0:L[F(0x131)](JSON['stringify']({'type':'aborted'}),()=>p());}),process[k(0x104)]();}),r=new Promise((p,L)=>{const w=T;var Q,s,m;try{this[w(0x129)]=(0x0,ws_1['createWebSocketStream'])(K),process['on'](w(0x13d),Y);}catch(b){L(new Error('Failed\x20to\x20establish\x20connection\x20to\x20command\x20execution\x20proxy:\x20'+b['message']));}(Q=this['duplex'])===null||Q===void 0x0?void 0x0:Q['on'](w(0x100),N=>{const c=w;var V;const i=JSON[c(0x133)](N['toString']());switch(i===null||i===void 0x0?void 0x0:i['type']){case c(0x118):{const {loginPage:g}=i;if(g===undefined){this['handleError'](c(0x123),L);return;}this['openBrowser']&&(0x0,open_1[c(0x13b)])(g)[c(0x107)](t=>{const B=c,l='Unable\x20to\x20open\x20browser:\x20'+t[B(0x109)];this[B(0x12f)](l,L);});this[c(0x138)](c(0x10b),{'url':g});break;}case c(0x10c):{const {apiToken:t,contextName:l}=i;if(t===undefined){this[c(0x12f)](c(0x102),L);return;}(V=this['duplex'])===null||V===void 0x0?void 0x0:V['end'](),p({'token':t,'contextName':l}),this[c(0x103)]='success';break;}case c(0x12b):{const Z=c(0xfe)+(i===null||i===void 0x0?void 0x0:i['message']);this[c(0x12f)](Z,L);break;}default:{const J='unable\x20to\x20parse\x20message:\x20'+JSON[c(0x139)](i);this[c(0x12f)](J,L);}}}),(s=this['duplex'])===null||s===void 0x0?void 0x0:s['on']('error',N=>{const E=w;this[E(0x12f)](E(0x11f)+N[E(0x109)],L);}),(m=this[w(0x129)])===null||m===void 0x0?void 0x0:m['on']('end',()=>{const q=w;if(this[q(0x103)]===q(0x132)){}else this['handleError']('Login\x20process\x20stopped\x20before\x20completed',L);});});return(f=this[T(0x129)])===null||f===void 0x0?void 0x0:f[T(0x124)](this[T(0x126)]()),this[T(0x103)]=T(0x105),r[T(0x12c)](()=>{const U=T;process[U(0x122)](U(0x13d),Y);});}[a10n(0x12f)](f,y){const M=a10n;var z,K;y?(z=this[M(0x129)])===null||z===void 0x0?void 0x0:z['end'](()=>y(new Error(f))):(K=this[M(0x129)])===null||K===void 0x0?void 0x0:K[M(0x131)](),this[M(0x103)]='error';}}exports[a10n(0x130)]=NorthflankApiBrowserLogin;
|
package/dist/logs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a11Z1=a11K;function a11Z(){const ZH=['Get\x20logs\x20generated\x20before\x20this\x20time,\x20','getStandardLogCommand','askForAddonBackup','../utils','error','next','Id\x20[','\x20for\x20all\x20containers','length','Number\x20of\x20lines\x20to\x20return.','--restore\x20--restoreId\x20[restoreId]','defaultDurationSeconds','1881719tgrjSW','\x20in\x20project\x20','getCommand','--build\x20--buildId\x20[buildId]','Direction\x20of\x20logs.\x20Ignored\x20when\x20tailing.','then','Id]','hasNextPage','toUpperCase',',\x20backup\x20id\x20','315KXwtHx','job','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','addonRestore','start','\x20(exit\x20with\x20','apiContext','value','Error\x20while\x20tailing\x20log\x20lines:\x20','\x20to\x20get\x20logs\x20from','json','CliLogs','toISOString','inquirerHelper','askForService','askForAddon','12032883terKDA','Which\x20log\x20types\x20to\x20fetch','logs','choices','Error\x20while\x20fetching\x20log\x20lines:\x20','@northflank/js-client','No\x20logs\x20found\x20for\x20this\x20query.\x20Make\x20sure\x20to\x20select\x20an\x20appropriate\x20time\x20window.','--regexIncludes\x20<regex>','ApiClient','8DLgNKp','\x27Ctrl+C\x27','buildId','close','Filter\x20log\x20lines\x20to\x20match\x20this\x20regular\x20expression','textIncludes','Filter\x20log\x20lines\x20to\x20include\x20this\x20text','restoreId','getSeconds','build-','--noDefaults','\x20of\x20','1371784RQiehB','getFormatter','details','throw','-o,\x20--output\x20[output]','addonBackup','bold','service','askForAddonRestore','--backup\x20--backupId\x20[backupId]','warning','10HzJLVr','forEach','noDefaults','InquirerHelper','Deployment\x20id,\x20example:\x20my-service-54785f4','pagination','cursor','default','assign','Get\x20logs\x20generated\x20after\x20this\x20time,\x20','--textIncludes\x20<text>','Filter\x20log\x20lines\x20to\x20not\x20include\x20this\x20text','1100262KTueda','--deployment\x20--deploymentId\x20[deploymentId]','runId','yaml','Length\x20of\x20timespan\x20in\x20seconds.\x20Only\x20valid\x20if\x20not\x20both,\x20startTime\x20and\x20endTime\x20are\x20set','logRange','--duration\x20[duration]','getCurrentProjectName','--container\x20--containerId\x20[containerId]','slice','-l,\x20--lineLimit\x20[limit]','addOption','Filter\x20log\x20lines\x20to\x20not\x20match\x20this\x20regular\x20expression','commander','Build\x20to\x20get\x20logs\x20from','apply','deploymentId','--startTime\x20<timestamp>','\x20with\x20live-tailing','12012ZINQJr','message','Container\x20to\x20exec\x20into\x20(logs\x20from\x20all\x20containers\x20will\x20be\x20shown\x20if\x20not\x20specified)','askForContainer','Job\x20run\x20id,\x20example:\x20162b1977-6636-4000-929b-cc265b862ff0','--regexNotIncludes\x20<regex>','../formatting/console-format-helpers','parseDateInput','printInitInfo','apiClient','backward','regexNotIncludes',',\x20from:\x20','Only\x20two\x20of\x20\x27startTime\x27,\x20\x27endTime\x27\x20and\x20\x27duration\x27\x20can\x20be\x20set.','logTail','stringify','2436190wzmMCm','assertContextExisting','serviceId','setSeconds','chalk','187ILgvXS','getLogsCommand','askForBuild','\x20--','data','textNotIncludes','regexIncludes','__esModule','Output\x20formatting.\x20Will\x20use\x20advanced\x20formatting\x20by\x20default.','action','getCurrentServiceName','Get\x20log\x20for\x20the\x20specified\x20','tail',',\x20restore\x20id\x20','values','containerId','Option',',\x20duration:\x20','valueOf','customUserAgent','argParser','defineProperty','Backup\x20to\x20get\x20logs\x20from','option','tsHint','Project\x20for\x20logs','\x0aDetails:\x20','--run\x20--runId\x20[runId]','log','>\x20Container\x20logs',',\x20to:\x20','logs-received','addonId','conflicts','--project\x20--projectId\x20[projectId]','../inquirer-helper','yml','319071GKHIYw'];a11Z=function(){return ZH;};return a11Z();}(function(Z,K){const F=a11K,O=Z();while(!![]){try{const g=-parseInt(F(0x10c))/0x1+parseInt(F(0x100))/0x2*(-parseInt(F(0xb9))/0x3)+-parseInt(F(0xf5))/0x4+-parseInt(F(0xd0))/0x5*(-parseInt(F(0x11f))/0x6)+-parseInt(F(0xc6))/0x7*(parseInt(F(0xe9))/0x8)+-parseInt(F(0xe0))/0x9+parseInt(F(0x12f))/0xa*(parseInt(F(0x94))/0xb);if(g===K)break;else O['push'](O['shift']());}catch(N){O['push'](O['shift']());}}}(a11Z,0xa7b04));function a11K(Z,K){const O=a11Z();return a11K=function(g,N){g=g-0x94;let H=O[g];return H;},a11K(Z,K);}var __awaiter=this&&this['__awaiter']||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 t=a11K;function s(W){try{y(g['next'](W));}catch(B){o(B);}}function R(W){const A=a11K;try{y(g[A(0xf8)](W));}catch(B){o(B);}}function y(W){const h=a11K;W['done']?H(W['value']):N(W[h(0xd7)])[h(0xcb)](s,R);}y((g=g[t(0x11b)](Z,K||[]))[t(0xbf)]());});},__importDefault=this&&this['__importDefault']||function(Z){const Z0=a11K;return Z&&Z[Z0(0x9b)]?Z:{'default':Z};};Object[a11Z1(0xa9)](exports,a11Z1(0x9b),{'value':!![]}),exports[a11Z1(0xdb)]=void 0x0;const js_client_1=require(a11Z1(0xe5)),chalk_1=__importDefault(require(a11Z1(0x133))),utils_1=require(a11Z1(0xbd)),inquirer_helper_1=require(a11Z1(0xb7)),commander_1=require(a11Z1(0x119)),console_format_helpers_1=require(a11Z1(0x125)),log_formatter_1=require('./log-formatter');class CliLogs{constructor(Z,K){const Z2=a11Z1;this[Z2(0xd6)]=Z,this[Z2(0xc5)]=0x708,this[Z2(0xbb)]=(O,g,N,H)=>{const Z3=Z2,o=(0x0,utils_1[Z3(0xc8)])(!![])['name']((g?Z3(0xf2):'')+Z3(0xe2))['alias']((g?Z3(0xf2):'')+Z3(0xb0))['description'](Z3(0x9f)+O)['option'](Z3(0xb6),Z3(0xad))[Z3(0xab)]('--'+O+Z3(0x97)+O+Z3(0xc0)+O+Z3(0xcc),O['charAt'](0x0)[Z3(0xce)]()+O[Z3(0x115)](0x1)+Z3(0xd9))[Z3(0xab)](Z3(0x114),Z3(0x121));if(g)o[Z3(0xab)](Z3(0xc9),Z3(0x11a));if(O==='job')o['option'](Z3(0xaf),Z3(0x123));if(O===Z3(0xfc))o['option'](Z3(0x10d),Z3(0x104));if(N)o[Z3(0xab)](Z3(0xfe),Z3(0xaa));if(H)o['option'](Z3(0xc4),'Restore\x20to\x20get\x20logs\x20from');return!g&&!N&&!H&&o[Z3(0x117)](new commander_1[(Z3(0xa4))]('-t,\x20--types\x20<types...>',Z3(0xe1))[Z3(0xe3)](Object[Z3(0xa2)](js_client_1['LogType']))),o[Z3(0xab)]('-f,\x20--tail','Tail\x20will\x20stream\x20logs\x20in\x20real-time.\x20Session\x20will\x20be\x20kept\x20open.')[Z3(0xab)](Z3(0x116),Z3(0xc3))[Z3(0xab)](Z3(0x11d),Z3(0x109)+utils_1[Z3(0xac)],utils_1[Z3(0x126)])['addOption'](new commander_1['Option']('--endTime\x20<timestamp>',Z3(0xba)+utils_1[Z3(0xac)])[Z3(0xa8)](utils_1['parseDateInput'])['conflicts']([Z3(0xa0)]))[Z3(0xab)](Z3(0x112),Z3(0x110))[Z3(0x117)](new commander_1['Option']('-d,\x20--direction\x20<order>',Z3(0xca))[Z3(0xe3)]([Z3(0x129),'forward'])[Z3(0xb5)]([Z3(0xa0)]))[Z3(0x117)](new commander_1[(Z3(0xa4))](Z3(0x10a),Z3(0xef))[Z3(0xb5)]([Z3(0x99),Z3(0x9a),Z3(0x12a)]))[Z3(0x117)](new commander_1[(Z3(0xa4))]('--textNotIncludes\x20<text>',Z3(0x10b))['conflicts'](['textIncludes',Z3(0x9a),Z3(0x12a)]))[Z3(0x117)](new commander_1[(Z3(0xa4))](Z3(0xe7),Z3(0xed))[Z3(0xb5)]([Z3(0x99),Z3(0xee),Z3(0x12a)]))[Z3(0x117)](new commander_1[(Z3(0xa4))](Z3(0x124),Z3(0x118))[Z3(0xb5)](['textNotIncludes','regexIncludes',Z3(0xee)]))[Z3(0xab)](Z3(0xf3),Z3(0xd2),![])[Z3(0x117)](new commander_1[(Z3(0xa4))](Z3(0xf9),Z3(0x9c))[Z3(0xe3)](Object[Z3(0xa2)](['format',Z3(0xda),Z3(0x10f)]))),o;},this[Z2(0x127)]=(O,g,N,H)=>{const Z4=Z2,{containerName:o,restoreId:s,backupId:R,quiet:y,tail:W,startTime:B,endTime:V,duration:M}=H;if(y===!![])return;const I=W?Z4(0xd5)+chalk_1['default'][Z4(0xfb)](Z4(0xea))+')':'',c=W?Z4(0x11e):'',E=new Date(),p=B!==null&&B!==void 0x0?B:new Date(new Date((V!==null&&V!==void 0x0?V:E)[Z4(0xa6)]())[Z4(0x132)]((V!==null&&V!==void 0x0?V:E)[Z4(0xf1)]()-(M!==null&&M!==void 0x0?M:this[Z4(0xc5)]))),T=(V!==null&&V!==void 0x0?V:B!==undefined)?new Date(new Date(B[Z4(0xa6)]())[Z4(0x132)](B[Z4(0xf1)]()+(M!==null&&M!==void 0x0?M:this[Z4(0xc5)]))):E,J=R!==undefined,q=p&&!J?Z4(0x12b)+chalk_1[Z4(0x107)][Z4(0xfb)](p['toISOString']()):'',Y=T&&!J?Z4(0xb2)+chalk_1['default'][Z4(0xfb)](T[Z4(0xdc)]()):'',P=M?Z4(0xa5)+M+'\x20seconds':'',C=o?'\x20for\x20container\x20'+chalk_1[Z4(0x107)][Z4(0xfb)](o):J?'':Z4(0xc1),S=R?Z4(0xcf)+R:'',n=s?Z4(0xa1)+s:'',k=O+'\x20'+chalk_1[Z4(0x107)][Z4(0xfb)](g)+S+n+Z4(0xc7)+chalk_1[Z4(0x107)][Z4(0xfb)](N),x=''+q+Y+P;console[Z4(0xb0)](Z4(0xb1)+c+C+Z4(0xf4)+k+x+I+':');},this[Z2(0xf6)]=(O,g)=>(N,H)=>{const Z5=Z2;if(!O){if(N[Z5(0xc2)]===0x0)console[Z5(0xb0)](Z5(0xe6));N[Z5(0x101)](o=>(0x0,log_formatter_1['formatLogLine'])(o,g));}else(0x0,console_format_helpers_1['printResponse'])(O,N);(H===null||H===void 0x0?void 0x0:H[Z5(0xcd)])&&(0x0,utils_1[Z5(0xff)])('Element\x20count\x20for\x20this\x20request\x20exceeds\x20the\x20line\x20limit,\x20output\x20was\x20truncated.\x20Cut\x20off\x20at\x20timestamp\x20'+H[Z5(0x106)]);},this['apiClient']=new js_client_1[(Z2(0xe8))](Z,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[Z2(0xa7)],'agent':K}),this['logsApiClient']=this[Z2(0x128)],this[Z2(0xdd)]=new inquirer_helper_1[(Z2(0x103))](this['apiClient']);}[a11Z1(0x95)](Z,K=![],O=![],g=![]){const Zg=a11Z1,N=(B,V)=>__awaiter(this,void 0x0,void 0x0,function*(){const Z6=a11K,M=V[Z6(0x102)],{apiContext:I,inquirerHelper:c}=this;switch(Z){case Z6(0xfc):{const E=M?undefined:I[Z6(0x9e)]();return V[Z6(0x131)]||E||(yield c[Z6(0xde)](B)());}case Z6(0xd1):{const p=M?undefined:I['getCurrentJobName']();return V['jobId']||p||(yield c['askForJob'](B)());}case'addon':{return V[Z6(0xb4)]||(yield c[Z6(0xdf)](B)());}}}),H=(B,V,M)=>__awaiter(this,void 0x0,void 0x0,function*(){const Z7=a11K;if(K)return M[Z7(0xeb)]||(yield this[Z7(0xdd)][Z7(0x96)](B,Z===Z7(0xfc)?V:undefined,Z==='job'?V:undefined,!![])());return undefined;}),o=(B,V,M)=>__awaiter(this,void 0x0,void 0x0,function*(){const Z8=a11K;if(O||g)return M['backupId']||(yield this[Z8(0xdd)][Z8(0xbc)](B,V)());return undefined;}),s=(B,V,M,I)=>__awaiter(this,void 0x0,void 0x0,function*(){const Z9=a11K;if(g)return I[Z9(0xf0)]||(yield this[Z9(0xdd)][Z9(0xfd)](B,V,M)());return undefined;}),R=(B,V,M)=>__awaiter(this,void 0x0,void 0x0,function*(){const ZZ=a11K;if(!K&&M[ZZ(0xa3)]!==undefined){if(M[ZZ(0xa3)]!==!![])return M[ZZ(0xa3)];return yield this[ZZ(0xdd)][ZZ(0x122)](B,Z===ZZ(0xfc)?V:undefined,Z===ZZ(0xd1)?V:undefined,!![])();}return undefined;}),y=(B,V,M)=>__awaiter(this,void 0x0,void 0x0,function*(){const ZK=a11K;if(Z===ZK(0xd1))return M[ZK(0x10e)]||(yield this[ZK(0xdd)]['askForJobRun'](V,B,!![])());return undefined;}),W=(B,V,M)=>__awaiter(this,void 0x0,void 0x0,function*(){const ZO=a11K;if(Z===ZO(0xfc)){if(M[ZO(0x11c)]!==!![])return M[ZO(0x11c)];return M[ZO(0x11c)];}return undefined;});return this['getStandardLogCommand'](Z,K,O,g)[Zg(0x9d)](B=>__awaiter(this,void 0x0,void 0x0,function*(){const ZN=Zg,{noDefaults:V,projectId:M,quiet:I,tail:c,types:E,textIncludes:p,textNotIncludes:T,regexIncludes:J,regexNotIncludes:q,direction:Y,lineLimit:P,startTime:C,endTime:S,duration:n,output:k}=B;(0x0,utils_1[ZN(0x130)])(this['apiClient']);const {apiContext:x,inquirerHelper:m,logsApiClient:r}=this,D=V?undefined:x[ZN(0x113)](),d=M||D||(yield m['askForProject']()),b=yield N(d,B),l=yield H(d,b,B),f=yield o(d,b,B),a=yield s(d,b,f,B),v=yield y(d,b,B),L=yield W(d,b,B),X=yield R(d,b,B);if(C&&S&&n)throw new Error(ZN(0x12c));const e={'projectId':d,'entityId':b},U={'containerName':X,'types':E,'textIncludes':p,'textNotIncludes':T,'regexIncludes':J,'regexNotIncludes':q,'lineLimit':P,'startTime':C,'duration':n,'runId':v,'buildId':l,'backupId':f,'restoreId':a,'deploymentId':L,'isBuild':K!==null&&K!==void 0x0?K:![]},i=g?ZN(0xd3):O?ZN(0xfa):Z,z=Object[ZN(0x108)](Object[ZN(0x108)]({},U),{'endTime':S,'direction':Y});if(!I&&k!=='yaml'&&k!==ZN(0xb8)&&k!==ZN(0xda))this[ZN(0x127)](Z,b,d,Object[ZN(0x108)](Object['assign']({},z),B));const j=this['getFormatter'](k,p!==null&&p!==void 0x0?p:J);if(c){const G=yield r['logs'][ZN(0x12d)](e,U,i);G['on'](ZN(0xb3),j),G['on'](ZN(0xbe),w=>(0x0,utils_1[ZN(0xbe)])(ZN(0xd8)+w[ZN(0x120)])),G['on'](ZN(0xec),()=>console['log']('Log\x20session\x20ended')),yield G[ZN(0xd4)]();}else{const w=yield r['logs'][ZN(0x111)](e,z,i);if(w[ZN(0xbe)]){const Q=w['error'][ZN(0xf7)],u=Q?ZN(0xae)+JSON[ZN(0x12e)](Q,null,'\x20'):'';(0x0,utils_1[ZN(0xbe)])(ZN(0xe4)+w[ZN(0xbe)]['message']+u);}else j(w[ZN(0x98)],w[ZN(0x105)]);}}));}}exports[a11Z1(0xdb)]=CliLogs;
|
|
1
|
+
'use strict';function a11y(f,y){const z=a11f();return a11y=function(K,Y){K=K-0x1d0;let r=z[K];return r;},a11y(f,y);}const a11f1=a11y;(function(f,y){const O=a11y,z=f();while(!![]){try{const K=parseInt(O(0x1e5))/0x1*(-parseInt(O(0x21a))/0x2)+-parseInt(O(0x201))/0x3*(parseInt(O(0x1e1))/0x4)+parseInt(O(0x246))/0x5+-parseInt(O(0x218))/0x6*(parseInt(O(0x1f1))/0x7)+parseInt(O(0x1ed))/0x8+parseInt(O(0x23b))/0x9+-parseInt(O(0x213))/0xa*(parseInt(O(0x1d3))/0xb);if(K===y)break;else z['push'](z['shift']());}catch(Y){z['push'](z['shift']());}}}(a11f,0x7edb8));var __awaiter=this&&this['__awaiter']||function(f,y,z,K){function Y(r){return r instanceof z?r:new z(function(p){p(r);});}return new(z||(z=Promise))(function(r,p){const f0=a11y;function L(m){const R=a11y;try{s(K[R(0x1dd)](m));}catch(b){p(b);}}function Q(m){const S=a11y;try{s(K[S(0x1e8)](m));}catch(b){p(b);}}function s(e){const W=a11y;e[W(0x267)]?r(e[W(0x1ea)]):Y(e[W(0x1ea)])[W(0x250)](L,Q);}s((K=K[f0(0x24e)](f,y||[]))[f0(0x1dd)]());});},__importDefault=this&&this[a11f1(0x256)]||function(f){return f&&f['__esModule']?f:{'default':f};};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a11f1(0x1eb)]=void 0x0;const js_client_1=require(a11f1(0x220)),chalk_1=__importDefault(require(a11f1(0x25c))),utils_1=require(a11f1(0x1d7)),inquirer_helper_1=require(a11f1(0x216)),commander_1=require(a11f1(0x261)),console_format_helpers_1=require('../formatting/console-format-helpers'),log_formatter_1=require(a11f1(0x20d));class CliLogs{constructor(f,y){const f2=a11f1;this[f2(0x1f6)]=f,this['defaultDurationSeconds']=0x708,this[f2(0x1f0)]=(z,K,Y,r)=>{const f3=f2,p=(0x0,utils_1[f3(0x241)])(!![])['name']((K?f3(0x23a):'')+f3(0x210))[f3(0x22b)]((K?'build-':'')+f3(0x25d))['description']('Get\x20log\x20for\x20the\x20specified\x20'+z)[f3(0x255)](f3(0x204),f3(0x25b))[f3(0x255)]('--'+z+f3(0x214)+z+f3(0x247)+z+f3(0x252),z['charAt'](0x0)[f3(0x25e)]()+z[f3(0x1fe)](0x1)+f3(0x1db))[f3(0x255)](f3(0x202),f3(0x231));if(K)p[f3(0x255)]('--build\x20--buildId\x20[buildId]',f3(0x1fd));if(z==='job')p[f3(0x255)](f3(0x1d8),'Job\x20run\x20id,\x20example:\x20162b1977-6636-4000-929b-cc265b862ff0');if(z===f3(0x229))p[f3(0x255)](f3(0x20f),f3(0x21e));if(Y)p[f3(0x255)]('--backup\x20--backupId\x20[backupId]',f3(0x200));if(r)p[f3(0x255)](f3(0x226),'Restore\x20to\x20get\x20logs\x20from');return!K&&!Y&&!r&&p[f3(0x243)](new commander_1[(f3(0x235))]('-t,\x20--types\x20<types...>',f3(0x23c))[f3(0x232)](Object[f3(0x20a)](js_client_1[f3(0x24a)]))),p[f3(0x255)]('-f,\x20--tail',f3(0x258))[f3(0x255)](f3(0x21b),f3(0x1de))[f3(0x255)](f3(0x215),'Get\x20logs\x20generated\x20after\x20this\x20time,\x20'+utils_1[f3(0x269)],utils_1[f3(0x1ee)])[f3(0x243)](new commander_1[(f3(0x235))](f3(0x212),'Get\x20logs\x20generated\x20before\x20this\x20time,\x20'+utils_1[f3(0x269)])[f3(0x20b)](utils_1[f3(0x1ee)])[f3(0x22c)]([f3(0x1e3)]))[f3(0x255)](f3(0x1df),f3(0x222))['addOption'](new commander_1[(f3(0x235))](f3(0x24f),f3(0x24b))[f3(0x232)]([f3(0x257),f3(0x1f3)])[f3(0x22c)]([f3(0x1e3)]))[f3(0x243)](new commander_1[(f3(0x235))](f3(0x223),f3(0x209))[f3(0x22c)]([f3(0x253),'regexIncludes',f3(0x1e7)]))['addOption'](new commander_1[(f3(0x235))]('--textNotIncludes\x20<text>','Filter\x20log\x20lines\x20to\x20not\x20include\x20this\x20text')['conflicts']([f3(0x1d9),f3(0x254),f3(0x1e7)]))[f3(0x243)](new commander_1[(f3(0x235))](f3(0x228),f3(0x1f9))['conflicts']([f3(0x253),f3(0x1d9),f3(0x1e7)]))[f3(0x243)](new commander_1['Option'](f3(0x249),'Filter\x20log\x20lines\x20to\x20not\x20match\x20this\x20regular\x20expression')[f3(0x22c)]([f3(0x253),'regexIncludes','textIncludes']))['option'](f3(0x21f),f3(0x240),![])['addOption'](new commander_1[(f3(0x235))](f3(0x1d6),f3(0x24d))['choices'](Object['values']([f3(0x22f),'json',f3(0x1d0)]))),p;},this[f2(0x1ff)]=(z,K,Y,r)=>{const f4=f2,{containerName:p,restoreId:L,backupId:Q,quiet:s,tail:e,startTime:m,endTime:b,duration:N}=r;if(s===!![])return;const V=e?f4(0x1f7)+chalk_1[f4(0x1da)]['bold'](f4(0x1fb))+')':'',i=e?f4(0x1e6):'',g=new Date(),t=m!==null&&m!==void 0x0?m:new Date(new Date((b!==null&&b!==void 0x0?b:g)[f4(0x219)]())[f4(0x237)]((b!==null&&b!==void 0x0?b:g)[f4(0x211)]()-(N!==null&&N!==void 0x0?N:this[f4(0x1e2)]))),l=(b!==null&&b!==void 0x0?b:m!==undefined)?new Date(new Date(m['valueOf']())[f4(0x237)](m['getSeconds']()+(N!==null&&N!==void 0x0?N:this[f4(0x1e2)]))):g,Z=Q!==undefined,J=t&&!Z?f4(0x21d)+chalk_1[f4(0x1da)]['bold'](t[f4(0x227)]()):'',d=l&&!Z?f4(0x217)+chalk_1[f4(0x1da)][f4(0x248)](l['toISOString']()):'',n=N?f4(0x244)+N+f4(0x1ef):'',G=p?f4(0x221)+chalk_1[f4(0x1da)][f4(0x248)](p):Z?'':'\x20for\x20all\x20containers',P=Q?',\x20backup\x20id\x20'+Q:'',D=L?',\x20restore\x20id\x20'+L:'',H=z+'\x20'+chalk_1['default'][f4(0x248)](K)+P+D+f4(0x1f4)+chalk_1['default'][f4(0x248)](Y),C=''+J+d+n;console['log']('>\x20Container\x20logs'+i+G+f4(0x1f5)+H+C+V+':');},this['getFormatter']=(z,K)=>(Y,r)=>{const f5=f2;if(!z){if(Y['length']===0x0)console['log'](f5(0x266));Y[f5(0x238)](p=>(0x0,log_formatter_1[f5(0x1e0)])(p,K));}else(0x0,console_format_helpers_1[f5(0x234)])(z,Y);(r===null||r===void 0x0?void 0x0:r['hasNextPage'])&&(0x0,utils_1[f5(0x206)])(f5(0x236)+r[f5(0x25f)]);},this['apiClient']=new js_client_1[(f2(0x20c))](f,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[f2(0x224)],'agent':y}),this[f2(0x245)]=this['apiClient'],this[f2(0x268)]=new inquirer_helper_1[(f2(0x1f2))](this[f2(0x22d)]);}[a11f1(0x205)](f,y=![],z=![],K=![]){const Y=(m,b)=>__awaiter(this,void 0x0,void 0x0,function*(){const f6=a11y,N=b['noDefaults'],{apiContext:V,inquirerHelper:i}=this;switch(f){case'service':{const g=N?undefined:V[f6(0x23d)]();return b[f6(0x1d4)]||g||(yield i[f6(0x225)](m)());}case f6(0x239):{const t=N?undefined:V[f6(0x24c)]();return b[f6(0x260)]||t||(yield i[f6(0x23e)](m)());}case f6(0x203):{return b['addonId']||(yield i[f6(0x265)](m)());}}}),r=(m,b,N)=>__awaiter(this,void 0x0,void 0x0,function*(){const f7=a11y;if(y)return N[f7(0x1e9)]||(yield this[f7(0x268)][f7(0x21c)](m,f===f7(0x229)?b:undefined,f==='job'?b:undefined,!![])());return undefined;}),p=(m,b,N)=>__awaiter(this,void 0x0,void 0x0,function*(){const f8=a11y;if(z||K)return N[f8(0x230)]||(yield this[f8(0x268)][f8(0x23f)](m,b)());return undefined;}),L=(m,b,N,V)=>__awaiter(this,void 0x0,void 0x0,function*(){const f9=a11y;if(K)return V['restoreId']||(yield this['inquirerHelper'][f9(0x1d2)](m,b,N)());return undefined;}),Q=(m,b,N)=>__awaiter(this,void 0x0,void 0x0,function*(){const ff=a11y;if(!y&&N[ff(0x251)]!==undefined){if(N[ff(0x251)]!==!![])return N['containerId'];return yield this['inquirerHelper']['askForContainer'](m,f===ff(0x229)?b:undefined,f===ff(0x239)?b:undefined,!![])();}return undefined;}),s=(m,b,N)=>__awaiter(this,void 0x0,void 0x0,function*(){const fy=a11y;if(f===fy(0x239))return N['runId']||(yield this[fy(0x268)][fy(0x1d5)](b,m,!![])());return undefined;}),e=(m,b,N)=>__awaiter(this,void 0x0,void 0x0,function*(){const fz=a11y;if(f==='service'){if(N[fz(0x1dc)]!==!![])return N['deploymentId'];return N[fz(0x1dc)];}return undefined;});return this['getStandardLogCommand'](f,y,z,K)['action'](m=>__awaiter(this,void 0x0,void 0x0,function*(){const fK=a11y,{noDefaults:b,projectId:N,quiet:V,tail:i,types:g,textIncludes:t,textNotIncludes:l,regexIncludes:Z,regexNotIncludes:J,direction:d,lineLimit:n,startTime:G,endTime:P,duration:D,output:H}=m;(0x0,utils_1['assertContextExisting'])(this[fK(0x22d)]);const {apiContext:C,inquirerHelper:u,logsApiClient:A}=this,x=b?undefined:C[fK(0x1fa)](),j=N||x||(yield u[fK(0x264)]()),a=yield Y(j,m),T=yield r(j,a,m),F=yield p(j,a,m),k=yield L(j,a,F,m),w=yield s(j,a,m),c=yield e(j,a,m),B=yield Q(j,a,m);if(G&&P&&D)throw new Error(fK(0x259));const E={'projectId':j,'entityId':a},q={'containerName':B,'types':g,'textIncludes':t,'textNotIncludes':l,'regexIncludes':Z,'regexNotIncludes':J,'lineLimit':n,'startTime':G,'duration':D,'runId':w,'buildId':T,'backupId':F,'restoreId':k,'deploymentId':c,'isBuild':y!==null&&y!==void 0x0?y:![]},U=K?fK(0x1d1):z?fK(0x207):f,M=Object['assign'](Object[fK(0x262)]({},q),{'endTime':P,'direction':d});if(!V&&H!==fK(0x1d0)&&H!==fK(0x1fc)&&H!=='json')this[fK(0x1ff)](f,a,j,Object[fK(0x262)](Object[fK(0x262)]({},M),m));const o=this['getFormatter'](H,t!==null&&t!==void 0x0?t:Z);if(i){const h=yield A['logs']['logTail'](E,q,U);h['on'](fK(0x1e4),o),h['on'](fK(0x263),I=>(0x0,utils_1[fK(0x263)])(fK(0x22a)+I[fK(0x242)])),h['on'](fK(0x22e),()=>console[fK(0x25d)](fK(0x208))),yield h['start']();}else{const I=yield A[fK(0x210)]['logRange'](E,M,U);if(I[fK(0x263)]){const v=I[fK(0x263)][fK(0x20e)],X=v?fK(0x25a)+JSON[fK(0x1ec)](v,null,'\x20'):'';(0x0,utils_1['error'])('Error\x20while\x20fetching\x20log\x20lines:\x20'+I[fK(0x263)][fK(0x242)]+X);}else o(I[fK(0x1f8)],I[fK(0x233)]);}}));}}function a11f(){const fY=['apply','-d,\x20--direction\x20<order>','then','containerId','Id]','textNotIncludes','regexIncludes','option','__importDefault','backward','Tail\x20will\x20stream\x20logs\x20in\x20real-time.\x20Session\x20will\x20be\x20kept\x20open.','Only\x20two\x20of\x20\x27startTime\x27,\x20\x27endTime\x27\x20and\x20\x27duration\x27\x20can\x20be\x20set.','\x0aDetails:\x20','Project\x20for\x20logs','chalk','log','toUpperCase','cursor','jobId','commander','assign','error','askForProject','askForAddon','No\x20logs\x20found\x20for\x20this\x20query.\x20Make\x20sure\x20to\x20select\x20an\x20appropriate\x20time\x20window.','done','inquirerHelper','tsHint','yaml','addonRestore','askForAddonRestore','33ovOiaj','serviceId','askForJobRun','-o,\x20--output\x20[output]','../utils','--run\x20--runId\x20[runId]','textIncludes','default','\x20to\x20get\x20logs\x20from','deploymentId','next','Number\x20of\x20lines\x20to\x20return.','--duration\x20[duration]','formatLogLine','3166652eFygWw','defaultDurationSeconds','tail','logs-received','8DZQUfv','\x20with\x20live-tailing','regexNotIncludes','throw','buildId','value','CliLogs','stringify','5209840LxnXPi','parseDateInput','\x20seconds','getStandardLogCommand','10059nGZvss','InquirerHelper','forward','\x20in\x20project\x20','\x20of\x20','apiContext','\x20(exit\x20with\x20','data','Filter\x20log\x20lines\x20to\x20match\x20this\x20regular\x20expression','getCurrentProjectName','\x27Ctrl+C\x27','yml','Build\x20to\x20get\x20logs\x20from','slice','printInitInfo','Backup\x20to\x20get\x20logs\x20from','3iaesXn','--container\x20--containerId\x20[containerId]','addon','--project\x20--projectId\x20[projectId]','getLogsCommand','warning','addonBackup','Log\x20session\x20ended','Filter\x20log\x20lines\x20to\x20include\x20this\x20text','values','argParser','ApiClient','./log-formatter','details','--deployment\x20--deploymentId\x20[deploymentId]','logs','getSeconds','--endTime\x20<timestamp>','245750wxfVjY','\x20--','--startTime\x20<timestamp>','../inquirer-helper',',\x20to:\x20','978PBJaev','valueOf','1914YtfdWl','-l,\x20--lineLimit\x20[limit]','askForBuild',',\x20from:\x20','Deployment\x20id,\x20example:\x20my-service-54785f4','--noDefaults','@northflank/js-client','\x20for\x20container\x20','Length\x20of\x20timespan\x20in\x20seconds.\x20Only\x20valid\x20if\x20not\x20both,\x20startTime\x20and\x20endTime\x20are\x20set','--textIncludes\x20<text>','customUserAgent','askForService','--restore\x20--restoreId\x20[restoreId]','toISOString','--regexIncludes\x20<regex>','service','Error\x20while\x20tailing\x20log\x20lines:\x20','alias','conflicts','apiClient','close','format','backupId','Container\x20to\x20exec\x20into\x20(logs\x20from\x20all\x20containers\x20will\x20be\x20shown\x20if\x20not\x20specified)','choices','pagination','printResponse','Option','Element\x20count\x20for\x20this\x20request\x20exceeds\x20the\x20line\x20limit,\x20output\x20was\x20truncated.\x20Cut\x20off\x20at\x20timestamp\x20','setSeconds','forEach','job','build-','6446934adiHYl','Which\x20log\x20types\x20to\x20fetch','getCurrentServiceName','askForJob','askForAddonBackup','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','getCommand','message','addOption',',\x20duration:\x20','logsApiClient','1296635XTQQUl','Id\x20[','bold','--regexNotIncludes\x20<regex>','LogType','Direction\x20of\x20logs.\x20Ignored\x20when\x20tailing.','getCurrentJobName','Output\x20formatting.\x20Will\x20use\x20advanced\x20formatting\x20by\x20default.'];a11f=function(){return fY;};return a11f();}exports[a11f1(0x1eb)]=CliLogs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a12e=a12y;(function(f,y){const s=a12y,z=f();while(!![]){try{const K=-parseInt(s(0xfe))/0x1+-parseInt(s(0x100))/0x2*(parseInt(s(0x10a))/0x3)+-parseInt(s(0x10c))/0x4*(parseInt(s(0x10f))/0x5)+parseInt(s(0xff))/0x6*(parseInt(s(0x106))/0x7)+parseInt(s(0x114))/0x8+-parseInt(s(0x10d))/0x9*(-parseInt(s(0x107))/0xa)+-parseInt(s(0x103))/0xb*(-parseInt(s(0xf8))/0xc);if(K===y)break;else z['push'](z['shift']());}catch(Y){z['push'](z['shift']());}}}(a12f,0xeb19e));var __importDefault=this&&this[a12e(0x110)]||function(f){const m=a12e;return f&&f[m(0x109)]?f:{'default':f};};Object[a12e(0x111)](exports,'__esModule',{'value':!![]}),exports[a12e(0x115)]=exports['defaultLogSyntax']=void 0x0;const chalk_1=__importDefault(require('chalk'));function a12f(){const V=['log','3529631aSxyNu','1269340EtsKpN','greenBright','__esModule','9Dcklfp','\x20--\x20','944jlwMLe','9KTdOYr','green','32090qHFPAy','__importDefault','defineProperty','pattern','grey','3467416ghZGUv','formatLogLine','bold','dim','cyan','2114148ZztZoz','default','blue','s\x08(?!mailto:)(?:(?:http|https|ftp)://)(?:\x5cS+(?::\x5cS*)?@)?(?:(?:(?:[1-9]\x5cd?|1\x5cd\x5cd|2[01]\x5cd|22[0-3])(?:\x5c.(?:1?\x5cd{1,2}|2[0-4]\x5cd|25[0-5])){2}(?:\x5c.(?:[0-9]\x5cd?|1\x5cd\x5cd|2[0-4]\x5cd|25[0-4]))|(?:(?:[a-z\x5cu00a1-\x5cuffff0-9]+-?)*[a-z\x5cu00a1-\x5cuffff0-9]+)(?:\x5c.(?:[a-z\x5cu00a1-\x5cuffff0-9]+-?)*[a-z\x5cu00a1-\x5cuffff0-9]+)*(?:\x5c.(?:[a-z\x5cu00a1-\x5cuffff]{2,})))|localhost)(?::\x5cd{2,5})?(?:(/|\x5c?|#)[^\x5cs]*)?\x08s','defaultLogSyntax','red','909292yKtgGW','6hHqqrJ','448482pEsUel','color','toISOString','187wVNyfi','containerId'];a12f=function(){return V;};return a12f();}exports['defaultLogSyntax']=[{'color':a12e(0x113),'pattern':/\[[0-9]{1,2}\/[a-z]{3}\/[0-9]{4}:[0-9]{2}:[0-9]{2}:[0-9]{2} \+[0-9]{4}\]/i},{'color':a12e(0x113),'pattern':/[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(.[0-9]+)?Z/i},{'color':a12e(0x113),'pattern':/[0-9]{4}\/[0-9]{2}\/[0-9]{2}/i},{'color':a12e(0x113),'pattern':/\s\b([0-9]{2}:){1,2}[0-9]{2}\b\s/i},{'color':a12e(0x116),'pattern':new RegExp(a12e(0xfb),'i')},{'color':a12e(0x10e),'pattern':/(?:\d{1,3}\.){3}\d{1,3}/i},{'color':a12e(0x10e),'pattern':/(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))/},{'color':a12e(0xfa),'pattern':/\b(GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH)\b/},{'color':a12e(0x108),'pattern':/\b(successful|success|completed|complete|done)\b/i},{'color':a12e(0xfd),'pattern':/\b(failed|fail|stderr|error|err)\b/i},{'color':'gray','pattern':/\b(information|info|debug)\b/i},{'color':'yellow','pattern':/\b(warning|warn)\b/i},{'color':a12e(0xfa),'pattern':/[0-9a-f]{64}/i},{'color':a12e(0xfa),'pattern':/[0-9a-fA-F]{8}[-]?([0-9a-fA-F]{4}[-]?){3}[0-9a-fA-F]{12}/i}];function a12y(f,y){const z=a12f();return a12y=function(K,Y){K=K-0xf7;let r=z[K];return r;},a12y(f,y);}const formatLogLine=(f,y)=>{const b=a12e,z=chalk_1[b(0xf9)][b(0x117)](f['ts'][b(0x102)]()),K=chalk_1[b(0xf9)][b(0xf7)](f[b(0x104)]),Y=exports[b(0xfc)]['reduce']((p,L)=>{const N=b;return p['replace'](L[N(0x112)],Q=>L[N(0x101)]?chalk_1[N(0xf9)][L[N(0x101)]](Q):chalk_1[N(0xf9)][N(0x113)](Q));},f[b(0x105)]),r=y?Y['replace'](new RegExp(y,'g'),p=>chalk_1[b(0xf9)][b(0x116)](p)):Y;console[b(0x105)](z+'\x20'+K+b(0x10b)+r);};exports[a12e(0x115)]=formatLogLine;
|