@northflank/cli 0.9.27 → 0.10.1

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.
@@ -1 +1 @@
1
- 'use strict';function a4Y(){const Z=['customUserAgent','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.','2kkXzed','1033074dtROpv','--noDefaults','672723YhJKbk','149508qRnGgn','execCmd','\x20to\x20exec\x20into','defineProperty','--shell-cmd\x20[SHELL-CMD]','apiClient','.\x0aExamples:\x0a\x20\x20Shell\x20session:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20northflank\x20exec\x20','command-exec','action','stdin','\x27Ctrl+D\x27','name','7ByoseP','getCurrentServiceName','Container\x20to\x20exec\x20into\x20(random\x20container\x20will\x20be\x20chosen\x20if\x20not\x20specified)','bold','2122504VpeZSy','\x0a\x20\x20Single\x20command,\x20no\x20shell:\x20\x20\x20\x20\x20northflank\x20exec\x20','greenBright','waitForCommandResult','setRawMode','101445uSUMWB','sequence','getCurrentProjectName','__awaiter','--container\x20--containerId\x20[NAME]','default','Command\x20completed\x20successfully,\x20exit\x20code:\x20','10fdClbY','121332aTtxlP','addCommand','3400YhunAt','--group\x20[GROUP]',',\x20details:\x20','getTerminalSize','message','../inquirer-helper','stdout','success','columns','handleShellSession','Command\x20didn\x27t\x20complete\x20successfully,\x20status:\x20','execStartLog','askForJob','../utils','__esModule','stderr','with\x20shell\x20session','pipe','__importDefault','\x20--','\x20--cmd\x20\x27date\x27\x0a\x20\x20Single\x20command,\x20custom\x20shell:\x20northflank\x20exec\x20','Command\x20exec\x20for\x20the\x20specified\x20','none','--cmd\x20--command\x20[COMMAND]','readline','emitKeypressEvents','assertContextExisting','Exec\x20','job','exit','value','Id\x20[NAME]','\x20in\x20project\x20',',\x20exit\x20code:\x20','throw','Project\x20for\x20exec','stdOut','service','execServiceSession','\x20command\x20exec:\x20','next','with\x20command\x20\x27','671vwYNIE','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','604ZhouVq','status','filter','stdErr','--project\x20--projectId\x20[NAME]','Received\x20Ctrl+D\x20twice,\x20exiting\x20shell\x20forcefully.','exec','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.','askForProject','shell\x20command\x20','Unknown','rows','warning','option','Command\x20execution\x20(exec)\x20for\x20Northflank\x20services\x20and\x20jobs.','Run\x20command\x20with\x20this\x20user','getCommand','description','resize','getStandardExecCommand','toUpperCase','isTTY','error','ApiClient','\x20--shell-cmd\x20\x27sh\x27','stdIn','join','keypress','charAt'];a4Y=function(){return Z;};return a4Y();}const a4h=a4k;(function(Y,k){const w=a4k,X=Y();while(!![]){try{const B=-parseInt(w(0x17c))/0x1*(parseInt(w(0x163))/0x2)+-parseInt(w(0x184))/0x3+-parseInt(w(0x144))/0x4*(parseInt(w(0x186))/0x5)+-parseInt(w(0x164))/0x6+-parseInt(w(0x173))/0x7*(parseInt(w(0x177))/0x8)+parseInt(w(0x166))/0x9*(parseInt(w(0x183))/0xa)+-parseInt(w(0x142))/0xb*(-parseInt(w(0x167))/0xc);if(B===k)break;else X['push'](X['shift']());}catch(l){X['push'](X['shift']());}}}(a4Y,0x2546d));var __awaiter=this&&this[a4h(0x17f)]||function(Y,k,X,B){function l(S){return S instanceof X?S:new X(function(C){C(S);});}return new(X||(X=Promise))(function(S,C){function j(O){const g=a4k;try{e(B[g(0x140)](O));}catch(T){C(T);}}function o(O){const y=a4k;try{e(B[y(0x13a)](O));}catch(T){C(T);}}function e(O){const R=a4k;O['done']?S(O[R(0x136)]):l(O[R(0x136)])['then'](j,o);}e((B=B['apply'](Y,k||[]))['next']());});},__importDefault=this&&this[a4h(0x12a)]||function(Y){const q=a4h;return Y&&Y[q(0x126)]?Y:{'default':Y};};function a4k(Y,k){const X=a4Y();return a4k=function(B,l){B=B-0x119;let S=X[B];return S;},a4k(Y,k);}Object[a4h(0x16a)](exports,'__esModule',{'value':!![]}),exports['CliExec']=void 0x0;const js_client_1=require('@northflank/js-client'),chalk_1=__importDefault(require('chalk')),utils_1=require(a4h(0x125)),inquirer_helper_1=require(a4h(0x11d));class CliExec{constructor(Y,k){const U=a4h;this['getStandardExecCommand']=S=>(0x0,utils_1[U(0x154)])(!![])[U(0x172)](S)[U(0x155)](U(0x12d)+S+U(0x16d)+S+U(0x178)+S+U(0x12c)+S+'\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'+S+U(0x15c))[U(0x151)](U(0x148),U(0x13b))[U(0x151)]('--'+S+U(0x12b)+S+U(0x137),S[U(0x160)](0x0)[U(0x158)]()+S['slice'](0x1)+U(0x169))[U(0x151)](U(0x180),U(0x175))[U(0x151)](U(0x16b),U(0x14b))['option']('--user\x20[USER]',U(0x153))[U(0x151)](U(0x119),'Run\x20command\x20with\x20this\x20group')[U(0x151)](U(0x165),U(0x143),![])[U(0x151)](U(0x12f),U(0x162)),this[U(0x11b)]=()=>({'columns':process[U(0x11e)][U(0x120)],'rows':process[U(0x11e)][U(0x14f)]}),this[U(0x123)]=(S,C,j,o,e,O,T,v)=>{const L=U;if(v===!![])return;const F=o==='none',x=F?'without\x20shell':o===undefined?L(0x128):L(0x14d)+chalk_1['default'][L(0x179)](o),t=e!==undefined?'with\x20user:'+e:'',Q=O!==undefined?'with\x20group:'+O:'',n=T!==undefined?L(0x141)+chalk_1[L(0x181)][L(0x179)](T)+'\x27':'',M=[n,x,t,Q][L(0x146)](d=>d!=='')[L(0x15e)]('\x20'),p='(exit\x20with\x20two\x20quick\x20'+chalk_1['default'][L(0x176)](L(0x171))+')';console['log'](L(0x133)+S+'\x20'+chalk_1['default'][L(0x176)](C)+L(0x138)+chalk_1[L(0x181)][L(0x176)](j)+'\x20'+M+'\x20'+p);},this['handleShellSession']=(S,C,j=![])=>__awaiter(this,void 0x0,void 0x0,function*(){const z=U;var o,e;let O=![];try{if(process[z(0x170)][z(0x159)]){const v=require(z(0x130));v[z(0x131)](process[z(0x170)]),process[z(0x170)][z(0x17b)](!![]),process[z(0x11e)]['on'](z(0x156),()=>{const A=z;S['resizeTerminal'](this[A(0x11b)]());}),process['stdin']['on'](z(0x15f),(F,x)=>{const D=z;x[D(0x17d)]==='\x04'&&(O?(process['stdin']['setRawMode'](![]),(0x0,utils_1[D(0x150)])(D(0x149)),process[D(0x135)]()):(O=!![],setTimeout(()=>O=![],0x190)));});}process[z(0x170)][z(0x129)](S[z(0x15d)]),S[z(0x147)][z(0x129)](process[z(0x127)]),S[z(0x13c)][z(0x129)](process[z(0x11e)]),S['on'](z(0x15a),F=>{const E=z;var x;(0x0,utils_1[E(0x15a)])('Error\x20occured\x20during\x20'+C+E(0x13f)+((x=F['message'])!==null&&x!==void 0x0?x:F)),process[E(0x170)]['isTTY']&&process['stdin'][E(0x17b)](![]),process['exit'](-0x1);});const T=yield S[z(0x17a)]();if(j!==!![]){const F=(o=T===null||T===void 0x0?void 0x0:T[z(0x145)])!==null&&o!==void 0x0?o:z(0x14e),x=(e=T===null||T===void 0x0?void 0x0:T['exitCode'])!==null&&e!==void 0x0?e:-0x1,t=(T===null||T===void 0x0?void 0x0:T['message'])?z(0x11a)+T[z(0x11c)]:'';F==='Success'?(0x0,utils_1[z(0x11f)])(z(0x182)+x):(0x0,utils_1[z(0x150)])(z(0x122)+F+z(0x139)+x+t);}return T;}finally{process[z(0x170)][z(0x159)]&&process[z(0x170)][z(0x17b)](![]);}}),this[U(0x16c)]=new js_client_1[(U(0x15b))](Y,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[U(0x161)],'agent':k});const X=new inquirer_helper_1['InquirerHelper'](this[U(0x16c)]);this[U(0x168)]=(0x0,utils_1[U(0x154)])()['name'](U(0x16e))['alias'](U(0x14a))['description'](U(0x152));const B=this[U(0x157)](U(0x13d))[U(0x16f)](S=>__awaiter(this,void 0x0,void 0x0,function*(){const b=U,{noDefaults:C,projectId:j,serviceId:o,containerId:O,shellCmd:T,user:v,group:F,command:x,quiet:t}=S;(0x0,utils_1['assertContextExisting'])(this['apiClient']);try{const Q=C?undefined:Y['getCurrentProjectName'](),n=j||Q||(yield X['askForProject']()),M=C?undefined:Y[b(0x174)](),p=o||M||(yield X['askForService'](n)()),d=T!==null&&T!==void 0x0?T:x!==undefined?b(0x12e):undefined;this[b(0x123)](b(0x13d),p,n,d,v,F,x,t);const P=process[b(0x11e)][b(0x120)],f=process[b(0x11e)][b(0x14f)],N={'projectId':n,'serviceId':p},K=yield this[b(0x16c)]['exec'][b(0x13e)](N,{'containerName':O,'command':x,'shell':d,'user':v,'group':F,'ttyColumns':P,'ttyRows':f});yield this[b(0x121)](K,'service',t);}catch(r){(0x0,utils_1[b(0x15a)])(''+r[b(0x11c)]);}finally{process[b(0x135)]();}})),l=this['getStandardExecCommand'](U(0x134))['action'](S=>__awaiter(this,void 0x0,void 0x0,function*(){const a=U,{projectId:C,jobId:j,containerId:o,noDefaults:O,shellCmd:T,user:v,group:F,command:x,quiet:t}=S;(0x0,utils_1[a(0x132)])(this[a(0x16c)]);try{const Q=O?undefined:Y[a(0x17e)](),n=C||Q||(yield X[a(0x14c)]()),M=j||(yield X[a(0x124)](n)());this[a(0x123)](a(0x134),M,n,T,t);const {rows:p,columns:d}=this[a(0x11b)](),P={'projectId':n,'jobId':M},f=yield this[a(0x16c)]['exec']['execJobSession'](P,{'containerName':o,'command':x,'shell':T,'user':v,'group':F,'ttyColumns':d,'ttyRows':p});yield this[a(0x121)](f,a(0x134),t);}catch(N){(0x0,utils_1[a(0x15a)])(''+N[a(0x11c)]);}finally{process[a(0x135)]();}}));this[U(0x168)]['addCommand'](B),this[U(0x168)][U(0x185)](l);}}exports['CliExec']=CliExec;
1
+ 'use strict';const a5I=a5E;(function(c,E){const A=a5E,S=c();while(!![]){try{const X=-parseInt(A(0x1a7))/0x1*(-parseInt(A(0x1cd))/0x2)+parseInt(A(0x1e9))/0x3*(-parseInt(A(0x1a3))/0x4)+parseInt(A(0x1df))/0x5+-parseInt(A(0x1e0))/0x6*(parseInt(A(0x1f0))/0x7)+-parseInt(A(0x1f3))/0x8*(-parseInt(A(0x203))/0x9)+parseInt(A(0x1f2))/0xa+-parseInt(A(0x20d))/0xb*(parseInt(A(0x1d9))/0xc);if(X===E)break;else S['push'](S['shift']());}catch(u){S['push'](S['shift']());}}}(a5c,0x6d204));function a5E(c,E){const S=a5c();return a5E=function(X,u){X=X-0x1a2;let Y=S[X];return Y;},a5E(c,E);}var __awaiter=this&&this[a5I(0x1c3)]||function(c,E,S,X){function u(Y){return Y instanceof S?Y:new S(function(R){R(Y);});}return new(S||(S=Promise))(function(Y,R){const N=a5E;function d(p){const T=a5E;try{U(X[T(0x1cb)](p));}catch(q){R(q);}}function w(p){const M=a5E;try{U(X[M(0x1fa)](p));}catch(q){R(q);}}function U(p){const m=a5E;p[m(0x1af)]?Y(p[m(0x1d6)]):u(p[m(0x1d6)])[m(0x1ef)](d,w);}U((X=X[N(0x1b7)](c,E||[]))[N(0x1cb)]());});},__importDefault=this&&this['__importDefault']||function(c){const z=a5I;return c&&c[z(0x205)]?c:{'default':c};};Object[a5I(0x202)](exports,a5I(0x205),{'value':!![]}),exports[a5I(0x214)]=void 0x0;const js_client_1=require(a5I(0x207)),chalk_1=__importDefault(require(a5I(0x1ff))),utils_1=require(a5I(0x1b9)),inquirer_helper_1=require(a5I(0x20c));class CliExec{constructor(c,E){const J=a5I;this['getStandardExecCommand']=Y=>(0x0,utils_1['getCommand'])(!![])[J(0x217)](Y)[J(0x1ad)](J(0x20a)+Y+'.\x0aExamples:\x0a\x20\x20Shell\x20session:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20northflank\x20exec\x20'+Y+J(0x20e)+Y+J(0x209)+Y+J(0x1ed)+Y+J(0x1a6))[J(0x1f8)]('--project\x20--projectId\x20[NAME]',J(0x1d7))['option']('--'+Y+'\x20--'+Y+J(0x1dd),Y[J(0x1dc)](0x0)[J(0x1d1)]()+Y['slice'](0x1)+'\x20to\x20exec\x20into')[J(0x1f8)](J(0x1fb),J(0x1ab))['option'](J(0x1c0),J(0x1bc))[J(0x1f8)](J(0x1a8),J(0x1c7))[J(0x1f8)](J(0x1e3),J(0x1aa))['option'](J(0x1ca),J(0x201),![])[J(0x1f8)](J(0x1e8),J(0x1e2)),this[J(0x208)]=()=>({'columns':process[J(0x20f)]['columns'],'rows':process[J(0x20f)][J(0x1f7)]}),this[J(0x1f4)]=(Y,R,d,w,P,U,p,q)=>{const O=J;if(q===!![])return;const B=w===O(0x1f6),V=B?'without\x20shell':w===undefined?'with\x20shell\x20session':'shell\x20command\x20'+chalk_1[O(0x1cc)]['greenBright'](w),g=P!==undefined?O(0x1c6)+P:'',r=U!==undefined?O(0x1a5)+U:'',H=p!==undefined?O(0x1b0)+chalk_1['default']['greenBright'](p)+'\x27':'',f=[H,V,g,r][O(0x1bd)](K=>K!=='')['join']('\x20'),Z=O(0x1a2)+chalk_1[O(0x1cc)][O(0x1d3)](O(0x1b2))+')';console[O(0x1ee)](O(0x1e1)+Y+'\x20'+chalk_1['default'][O(0x1d3)](R)+O(0x1fe)+chalk_1[O(0x1cc)][O(0x1d3)](d)+'\x20'+f+'\x20'+Z);},this[J(0x1bb)]=(Y,R,d=![])=>__awaiter(this,void 0x0,void 0x0,function*(){const C=J;var w,P;let U=![];try{if(process[C(0x216)][C(0x210)]){const q=require(C(0x1f5));q[C(0x1d5)](process[C(0x216)]),process[C(0x216)]['setRawMode'](!![]),process[C(0x20f)]['on'](C(0x1b1),()=>{const k=C;Y[k(0x1eb)](this[k(0x208)]());}),process[C(0x216)]['on'](C(0x1c2),(B,V)=>{const o=C;V[o(0x213)]==='\x04'&&(U?(process[o(0x216)][o(0x1b5)](![]),(0x0,utils_1['warning'])(o(0x1c8)),process[o(0x1d0)]()):(U=!![],setTimeout(()=>U=![],0x190)));});}process[C(0x216)]['pipe'](Y['stdIn']),Y[C(0x1c4)][C(0x1d8)](process[C(0x1fd)]),Y[C(0x1cf)][C(0x1d8)](process[C(0x20f)]),Y['on']('error',B=>{const y=C;var V;(0x0,utils_1[y(0x1a9)])(y(0x1e7)+R+y(0x215)+((V=B[y(0x1db)])!==null&&V!==void 0x0?V:B)),process[y(0x216)][y(0x210)]&&process[y(0x216)][y(0x1b5)](![]),process[y(0x1d0)](-0x1);});const p=yield Y[C(0x204)]();if(d!==!![]){const B=(w=p===null||p===void 0x0?void 0x0:p[C(0x1c9)])!==null&&w!==void 0x0?w:C(0x1ec),V=(P=p===null||p===void 0x0?void 0x0:p[C(0x1c1)])!==null&&P!==void 0x0?P:-0x1,g=(p===null||p===void 0x0?void 0x0:p[C(0x1db)])?C(0x206)+p['message']:'';B==='Success'?(0x0,utils_1['success'])(C(0x1b3)+V):(0x0,utils_1[C(0x1b8)])(C(0x1ea)+B+C(0x1b6)+V+g);}return p;}finally{process['stdin'][C(0x210)]&&process['stdin'][C(0x1b5)](![]);}}),this[J(0x1b4)]=new js_client_1[(J(0x1de))](c,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[J(0x1fc)],'agent':E});const S=new inquirer_helper_1[(J(0x1a4))](this[J(0x1b4)]);this[J(0x1f9)]=(0x0,utils_1[J(0x1e6)])()['name'](J(0x1ce))[J(0x1c5)]('exec')[J(0x1ad)](J(0x20b));const X=this[J(0x1da)](J(0x1ba))[J(0x1d4)](Y=>__awaiter(this,void 0x0,void 0x0,function*(){const e=J,{noDefaults:R,projectId:d,serviceId:w,containerId:P,shellCmd:U,user:p,group:q,command:B,quiet:V}=Y;(0x0,utils_1[e(0x1bf)])(this['apiClient']);try{const g=R?undefined:c[e(0x1ac)](),r=d||g||(yield S[e(0x1be)]()),H=R?undefined:c['getCurrentServiceName'](),f=w||H||(yield S[e(0x211)](r)()),Z=U!==null&&U!==void 0x0?U:B!==undefined?e(0x1f6):undefined;this[e(0x1f4)](e(0x1ba),f,r,Z,p,q,B,V);const K=process['stdout'][e(0x212)],t=process[e(0x20f)]['rows'],G={'projectId':r,'serviceId':f},b=yield this['apiClient']['exec'][e(0x200)](G,{'containerName':P,'command':B,'shell':Z,'user':p,'group':q,'ttyColumns':K,'ttyRows':t});yield this[e(0x1bb)](b,'service',V);}catch(l){(0x0,utils_1[e(0x1a9)])(''+l[e(0x1db)]);}finally{process[e(0x1d0)]();}})),u=this[J(0x1da)](J(0x1e4))['action'](Y=>__awaiter(this,void 0x0,void 0x0,function*(){const D=J,{projectId:R,jobId:d,containerId:w,noDefaults:P,shellCmd:U,user:p,group:q,command:B,quiet:V}=Y;(0x0,utils_1['assertContextExisting'])(this['apiClient']);try{const g=P?undefined:c[D(0x1ac)](),r=R||g||(yield S['askForProject']()),H=d||(yield S[D(0x1e5)](r)());this[D(0x1f4)](D(0x1e4),H,r,U,V);const {rows:f,columns:Z}=this[D(0x208)](),K={'projectId':r,'jobId':H},t=yield this[D(0x1b4)][D(0x1d2)][D(0x1f1)](K,{'containerName':w,'command':B,'shell':U,'user':p,'group':q,'ttyColumns':Z,'ttyRows':f});yield this[D(0x1bb)](t,'job',V);}catch(G){(0x0,utils_1[D(0x1a9)])(''+G[D(0x1db)]);}finally{process[D(0x1d0)]();}}));this[J(0x1f9)]['addCommand'](X),this[J(0x1f9)][J(0x1ae)](u);}}exports[a5I(0x214)]=CliExec;function a5c(){const x=['sequence','CliExec','\x20command\x20exec:\x20','stdin','name','(exit\x20with\x20two\x20quick\x20','19256EiIRQI','InquirerHelper','with\x20group:','\x20--shell-cmd\x20\x27sh\x27','2BiPclV','--user\x20[USER]','error','Run\x20command\x20with\x20this\x20group','Container\x20to\x20exec\x20into\x20(random\x20container\x20will\x20be\x20chosen\x20if\x20not\x20specified)','getCurrentProjectName','description','addCommand','done','with\x20command\x20\x27','resize','\x27Ctrl+D\x27','Command\x20completed\x20successfully,\x20exit\x20code:\x20','apiClient','setRawMode',',\x20exit\x20code:\x20','apply','warning','../utils','service','handleShellSession','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.','filter','askForProject','assertContextExisting','--shell-cmd\x20[SHELL-CMD]','exitCode','keypress','__awaiter','stdErr','alias','with\x20user:','Run\x20command\x20with\x20this\x20user','Received\x20Ctrl+D\x20twice,\x20exiting\x20shell\x20forcefully.','status','--noDefaults','next','default','278724veackZ','command-exec','stdOut','exit','toUpperCase','exec','bold','action','emitKeypressEvents','value','Project\x20for\x20exec','pipe','192468xdFFLm','getStandardExecCommand','message','charAt','Id\x20[NAME]','ApiClient','4102245YnmNhk','150kIbxlj','Exec\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.','--group\x20[GROUP]','job','askForJob','getCommand','Error\x20occured\x20during\x20','--cmd\x20--command\x20[COMMAND]','471fSBXou','Command\x20didn\x27t\x20complete\x20successfully,\x20status:\x20','resizeTerminal','Unknown','\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','log','then','33873pBloEY','execJobSession','8858270vJtBbA','839024qdHgWQ','execStartLog','readline','none','rows','option','execCmd','throw','--container\x20--containerId\x20[NAME]','customUserAgent','stderr','\x20in\x20project\x20','chalk','execServiceSession','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','defineProperty','63lYeVbt','waitForCommandResult','__esModule',',\x20details:\x20','@northflank/js-client','getTerminalSize','\x20--cmd\x20\x27date\x27\x0a\x20\x20Single\x20command,\x20custom\x20shell:\x20northflank\x20exec\x20','Command\x20exec\x20for\x20the\x20specified\x20','Command\x20execution\x20(exec)\x20for\x20Northflank\x20services\x20and\x20jobs.','../inquirer-helper','957DawkiR','\x0a\x20\x20Single\x20command,\x20no\x20shell:\x20\x20\x20\x20\x20northflank\x20exec\x20','stdout','isTTY','askForService','columns'];a5c=function(){return x;};return a5c();}
@@ -1 +1 @@
1
- 'use strict';function a5k(Y,k){const X=a5Y();return a5k=function(B,l){B=B-0x1da;let S=X[B];return S;},a5k(Y,k);}const a5f=a5k;(function(Y,k){const P=a5k,X=Y();while(!![]){try{const B=-parseInt(P(0x1df))/0x1+parseInt(P(0x1dc))/0x2*(-parseInt(P(0x1e3))/0x3)+parseInt(P(0x1e4))/0x4+-parseInt(P(0x1fb))/0x5+-parseInt(P(0x1fc))/0x6+-parseInt(P(0x1f4))/0x7+parseInt(P(0x1e6))/0x8*(parseInt(P(0x1ed))/0x9);if(B===k)break;else X['push'](X['shift']());}catch(l){X['push'](X['shift']());}}}(a5Y,0xb8b0b));var __awaiter=this&&this[a5f(0x1e5)]||function(Y,k,X,B){function l(S){return S instanceof X?S:new X(function(C){C(S);});}return new(X||(X=Promise))(function(S,C){const r=a5k;function j(O){try{e(B['next'](O));}catch(T){C(T);}}function o(O){const N=a5k;try{e(B[N(0x1ee)](O));}catch(T){C(T);}}function e(O){const K=a5k;O[K(0x1dd)]?S(O[K(0x1f7)]):l(O['value'])[K(0x1f8)](j,o);}e((B=B['apply'](Y,k||[]))[r(0x1f0)]());});},__importDefault=this&&this['__importDefault']||function(Y){const w=a5f;return Y&&Y[w(0x1fe)]?Y:{'default':Y};};Object[a5f(0x1eb)](exports,a5f(0x1fe),{'value':!![]}),exports[a5f(0x1ec)]=void 0x0;const chalk_1=__importDefault(require(a5f(0x201))),utils_1=require(a5f(0x1f6));function a5Y(){const y=['forEach','description','chalk','keys','command-overview','8314KXRmfB','done','map','1383391UlovGl','commands','every','green','780aAgcHJ','2362744YvvVAx','__awaiter','1000UhbboY','length','Prints\x20a\x20tree\x20view\x20of\x20all\x20available\x20commands','default','--verbose','defineProperty','getCommandOverview','294741DVftjq','throw','Print\x20command\x20descriptions','next','join','log','getCommand','2998534ZicKxT','slice','../utils','value','then','name','opts','4957240NUXbxx','262794MPDBPo','option','__esModule'];a5Y=function(){return y;};return a5Y();}function getCommandOverview(Y){const h=a5f;return(0x0,utils_1[h(0x1f3)])()[h(0x1f9)](h(0x1db))[h(0x200)](h(0x1e8))[h(0x1fd)](h(0x1ea),h(0x1ef))['action'](k=>__awaiter(this,void 0x0,void 0x0,function*(){const {verbose:X}=k;function B(l,S){const g=a5k;var C;const j=(M,p=!![])=>p?chalk_1[g(0x1e9)]['bold'][g(0x1e2)](M[g(0x1f9)]()):M[g(0x1f9)](),o=S['length']===0x0,e=l[g(0x1e0)];let O='';const T=e[g(0x1e7)]===0x0,v=T||((C=Object[g(0x1da)](l===null||l===void 0x0?void 0x0:l[g(0x1fa)]()))===null||C===void 0x0?void 0x0:C[g(0x1e7)])>0x0;!o&&(O=e&&!T?'┬\x20':'─\x20');const F=X&&v&&l[g(0x200)]()?':\x20'+l[g(0x200)]():'';console[g(0x1f2)](''+S+O+j(l,v)+F);let x=S;if(!o){const M=S[g(0x1f5)](-0x2)==='└─';x=S[g(0x1f5)](0x0,-0x2)+(M?'\x20\x20':'│\x20');}const t=x+'├─',Q=x+'└─',n=e[g(0x1e1)](p=>p['commands'][g(0x1e7)]===0x0);n&&!T&&!X?console[g(0x1f2)](Q+'\x20'+e[g(0x1de)](p=>j(p))[g(0x1f1)](',\x20')):e[g(0x1ff)]((p,d)=>{B(p,e['length']-0x1===d?Q:t);});}B(Y,'');}));}exports['getCommandOverview']=getCommandOverview;
1
+ 'use strict';const a6T=a6E;(function(c,E){const t=a6E,S=c();while(!![]){try{const X=parseInt(t(0x1aa))/0x1+-parseInt(t(0x1ad))/0x2*(parseInt(t(0x1c3))/0x3)+parseInt(t(0x1b8))/0x4+-parseInt(t(0x1c5))/0x5*(parseInt(t(0x1ac))/0x6)+-parseInt(t(0x1bc))/0x7*(parseInt(t(0x1a1))/0x8)+-parseInt(t(0x1c6))/0x9+parseInt(t(0x1b4))/0xa*(-parseInt(t(0x1a9))/0xb);if(X===E)break;else S['push'](S['shift']());}catch(u){S['push'](S['shift']());}}}(a6c,0x3fe84));var __awaiter=this&&this['__awaiter']||function(c,E,S,X){function u(Y){return Y instanceof S?Y:new S(function(R){R(Y);});}return new(S||(S=Promise))(function(Y,R){const A=a6E;function d(p){const G=a6E;try{U(X[G(0x1bf)](p));}catch(q){R(q);}}function w(p){const b=a6E;try{U(X[b(0x1b0)](p));}catch(q){R(q);}}function U(p){const l=a6E;p[l(0x1bd)]?Y(p[l(0x1a6)]):u(p['value'])[l(0x1b6)](d,w);}U((X=X[A(0x1af)](c,E||[]))[A(0x1bf)]());});},__importDefault=this&&this['__importDefault']||function(c){const I=a6E;return c&&c[I(0x1a7)]?c:{'default':c};};Object[a6T(0x1b1)](exports,a6T(0x1a7),{'value':!![]}),exports[a6T(0x1ab)]=void 0x0;function a6E(c,E){const S=a6c();return a6E=function(X,u){X=X-0x1a1;let Y=S[X];return Y;},a6E(c,E);}const chalk_1=__importDefault(require('chalk')),utils_1=require(a6T(0x1c1));function getCommandOverview(c){const M=a6T;return(0x0,utils_1[M(0x1a5)])()[M(0x1b7)](M(0x1c0))['description'](M(0x1b9))[M(0x1b2)](M(0x1c7),M(0x1a4))[M(0x1b3)](E=>__awaiter(this,void 0x0,void 0x0,function*(){const {verbose:S}=E;function X(u,Y){const m=a6E;var R;const d=(f,Z=!![])=>Z?chalk_1[m(0x1a2)]['bold'][m(0x1a8)](f[m(0x1b7)]()):f[m(0x1b7)](),w=Y[m(0x1ba)]===0x0,P=u[m(0x1c8)];let U='';const p=P[m(0x1ba)]===0x0,q=p||((R=Object[m(0x1ae)](u===null||u===void 0x0?void 0x0:u[m(0x1c4)]()))===null||R===void 0x0?void 0x0:R[m(0x1ba)])>0x0;!w&&(U=P&&!p?'┬\x20':'─\x20');const B=S&&q&&u[m(0x1c9)]()?':\x20'+u[m(0x1c9)]():'';console[m(0x1c2)](''+Y+U+d(u,q)+B);let V=Y;if(!w){const f=Y['slice'](-0x2)==='└─';V=Y['slice'](0x0,-0x2)+(f?'\x20\x20':'│\x20');}const g=V+'├─',r=V+'└─',H=P[m(0x1bb)](Z=>Z[m(0x1c8)][m(0x1ba)]===0x0);H&&!p&&!S?console[m(0x1c2)](r+'\x20'+P[m(0x1a3)](Z=>d(Z))[m(0x1be)](',\x20')):P[m(0x1b5)]((Z,K)=>{const N=m;X(Z,P[N(0x1ba)]-0x1===K?r:g);});}X(c,'');}));}function a6c(){const z=['getCommand','value','__esModule','green','11eXVfGh','417520JCPIFf','getCommandOverview','180HVpPDr','766gYXEZA','keys','apply','throw','defineProperty','option','action','502010reYKON','forEach','then','name','1759048KgqsgH','Prints\x20a\x20tree\x20view\x20of\x20all\x20available\x20commands','length','every','7MCeHTQ','done','join','next','command-overview','../utils','log','333jsLMeM','opts','22030YPkTft','1538883MmEgyF','--verbose','commands','description','1597096NTkanl','default','map','Print\x20command\x20descriptions'];a6c=function(){return z;};return a6c();}exports[a6T(0x1ab)]=getCommandOverview;
@@ -1 +1 @@
1
- 'use strict';const a6t=a6k;(function(Y,k){const x=a6k,X=Y();while(!![]){try{const B=parseInt(x(0x1ef))/0x1*(parseInt(x(0x1bb))/0x2)+parseInt(x(0x1d0))/0x3*(-parseInt(x(0x1c8))/0x4)+-parseInt(x(0x1d4))/0x5+-parseInt(x(0x1ca))/0x6+-parseInt(x(0x1df))/0x7*(parseInt(x(0x1dd))/0x8)+parseInt(x(0x1b8))/0x9*(-parseInt(x(0x1d9))/0xa)+-parseInt(x(0x1c0))/0xb*(-parseInt(x(0x1d2))/0xc);if(B===k)break;else X['push'](X['shift']());}catch(l){X['push'](X['shift']());}}}(a6Y,0x7200b));var __createBinding=this&&this[a6t(0x1e1)]||(Object[a6t(0x1bc)]?function(Y,X,B,l){const Q=a6t;if(l===undefined)l=B;var S=Object[Q(0x1cd)](X,B);(!S||('get'in S?!X[Q(0x1b5)]:S['writable']||S[Q(0x1cc)]))&&(S={'enumerable':!![],'get':function(){return X[B];}}),Object[Q(0x1bd)](Y,l,S);}:function(Y,X,B,l){if(l===undefined)l=B;Y[l]=X[B];}),__setModuleDefault=this&&this[a6t(0x1e8)]||(Object['create']?function(Y,k){Object['defineProperty'](Y,'default',{'enumerable':!![],'value':k});}:function(Y,k){const n=a6t;Y[n(0x1d8)]=k;}),__importStar=this&&this[a6t(0x1b6)]||function(Y){const M=a6t;if(Y&&Y['__esModule'])return Y;var X={};if(Y!=null){for(var B in Y)if(B!=='default'&&Object[M(0x1f1)][M(0x1be)][M(0x1ce)](Y,B))__createBinding(X,Y,B);}return __setModuleDefault(X,Y),X;},__importDefault=this&&this['__importDefault']||function(Y){const p=a6t;return Y&&Y[p(0x1b5)]?Y:{'default':Y};};Object['defineProperty'](exports,a6t(0x1b5),{'value':!![]}),exports[a6t(0x1d3)]=exports[a6t(0x1f2)]=exports[a6t(0x1f3)]=exports[a6t(0x1cf)]=exports[a6t(0x1c9)]=exports[a6t(0x1da)]=void 0x0;const chalk_1=__importDefault(require(a6t(0x1d1))),_=__importStar(require(a6t(0x1ee))),util=__importStar(require(a6t(0x1d6))),yaml=require(a6t(0x1e3)),columnify=require(a6t(0x1ed));function a6Y(){const q=['1497228Uyvxni','printResponse','3721060WCLpiL','clone','util','isEmpty','default','10gXHUHj','printAsTable','stringify','bold','16lbkbXO','getMonth','62699mGVXKb','disabled','__createBinding','updatedat','js-yaml','safeDump','yaml','log','set','__setModuleDefault','getMinutes','keys','sort','toString','columnify','lodash','7diuxkM','json','prototype','handleFormattedOutput','handleYamlOutput','isArrayLike','createdat','getSeconds','__esModule','__importStar','format','4901625FRbDMO','length','includes','19202ZdLXqX','create','defineProperty','hasOwnProperty','getDate','275PGPZlg','green','toLowerCase','isFinite','\x20(HTTP\x20status:\x20','yml','replace','isBoolean','3609772EmoZre','consoleFormat','3061698myAYpv','isObjectLike','configurable','getOwnPropertyDescriptor','call','handleJsonOutput','3atVLoC','chalk'];a6Y=function(){return q;};return a6Y();}function a6k(Y,k){const X=a6Y();return a6k=function(B,l){B=B-0x1b4;let S=X[B];return S;},a6k(Y,k);}function printAsTable(Y,k,X,B=![],l=0x0){const d=a6t;!B&&console[d(0x1e6)](''+chalk_1['default'][d(0x1dc)](k));function S(j){const P=d;return j===P(0x1e0)?j:j[P(0x1c6)](P(0x1e0),'');}function C(j,o){const N=d;function e(T){const f=a6k,v=new Date(T);return v[f(0x1bf)]()+'/'+v[f(0x1de)]()+'/'+v['getFullYear']()+'\x0a'+v['getHours']()+':'+v[f(0x1e9)]()+':'+v[f(0x1b4)]();}const O=[N(0x1f5),N(0x1e2)];if(O[N(0x1ba)](o[N(0x1c2)]())&&_[N(0x1c3)](j)&&j['toString']()[N(0x1b9)]===0xd)return e(Number(j));if(_[N(0x1c7)](j)){if(o!==N(0x1e0)&&o['includes']('disabled'))return j?'x':'✔';return j?'✔':'x';}if(_[N(0x1cb)](j))return util['inspect'](j,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});return j;}if(_[d(0x1f4)](Y)){Y[d(0x1b9)]===0x0&&console[d(0x1e6)]('No\x20'+k[d(0x1c2)]()+'\x20found');const j=Y['map']((O,T)=>{const K=d,v={'i':T+l};return Object[K(0x1ea)](O)['forEach'](F=>{const r=K;(_['isUndefined'](X)||X[r(0x1ba)](F[r(0x1c2)]()))&&_[r(0x1e7)](v,S(F),C(O[F],F));}),v;}),o=_[d(0x1d5)](Object[d(0x1ea)]((j===null||j===void 0x0?void 0x0:j[0x0])||[]))[d(0x1eb)]((O,T)=>{const v=F=>F!=='i'?F!=='internalId'?0x0:0x1:0x2;return v(T)-v(O);}),e={'maxWidth':0x1e,'preserveNewLines':!![],'showHeaders':!B,'config':{'_id':{'maxWidth':0x5,'truncate':!![]},'i':{'showHeaders':![]}},'columns':o};console[d(0x1e6)](columnify(j,e));}else console[d(0x1e6)](Y);}exports[a6t(0x1da)]=printAsTable;function consoleFormat(Y,k){const w=a6t;if(_[w(0x1d7)](Y)){const X=k?w(0x1c4)+k+')':'';return chalk_1['default'][w(0x1c1)]('The\x20request\x20was\x20completed\x20successfully')+X;}if(!_[w(0x1cb)](Y))return Y===null||Y===void 0x0?void 0x0:Y[w(0x1ec)]();return util['inspect'](Y,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});}exports[a6t(0x1c9)]=consoleFormat;const handleJsonOutput=(Y,k)=>{const h=a6t,X=Y===h(0x1f0);if(X)console[h(0x1e6)](JSON[h(0x1db)](k,null,'\x20'));};exports[a6t(0x1cf)]=handleJsonOutput;const handleYamlOutput=(Y,k)=>{const g=a6t,X=Y===g(0x1e5)||Y===g(0x1c5);if(X)console[g(0x1e6)](yaml[g(0x1e4)](k));};exports[a6t(0x1f3)]=handleYamlOutput;const handleFormattedOutput=(Y,k)=>{const y=a6t,X=Y===y(0x1b7);if(X)console[y(0x1e6)](consoleFormat(k));};exports[a6t(0x1f2)]=handleFormattedOutput;const printResponse=(Y,k)=>{const R=a6t;(0x0,exports[R(0x1cf)])(Y,k),(0x0,exports[R(0x1f3)])(Y,k),(0x0,exports[R(0x1f2)])(Y,k);};exports[a6t(0x1d3)]=printResponse;
1
+ 'use strict';const a7g=a7E;(function(c,E){const V=a7E,S=c();while(!![]){try{const X=-parseInt(V(0x72))/0x1*(-parseInt(V(0xa1))/0x2)+parseInt(V(0xa8))/0x3+-parseInt(V(0x6e))/0x4+-parseInt(V(0x6c))/0x5*(parseInt(V(0x9a))/0x6)+-parseInt(V(0x76))/0x7*(-parseInt(V(0x7a))/0x8)+-parseInt(V(0x8e))/0x9+parseInt(V(0x7f))/0xa*(parseInt(V(0x94))/0xb);if(X===E)break;else S['push'](S['shift']());}catch(u){S['push'](S['shift']());}}}(a7c,0xa0a8b));var __createBinding=this&&this[a7g(0x86)]||(Object[a7g(0x79)]?function(c,E,S,X){const r=a7g;if(X===undefined)X=S;var u=Object['getOwnPropertyDescriptor'](E,S);(!u||(r(0x81)in u?!E[r(0x75)]:u[r(0x73)]||u[r(0x69)]))&&(u={'enumerable':!![],'get':function(){return E[S];}}),Object[r(0x96)](c,X,u);}:function(c,E,S,X){if(X===undefined)X=S;c[X]=E[S];}),__setModuleDefault=this&&this[a7g(0xa2)]||(Object[a7g(0x79)]?function(c,E){const H=a7g;Object[H(0x96)](c,'default',{'enumerable':!![],'value':E});}:function(c,E){c['default']=E;}),__importStar=this&&this['__importStar']||function(c){const f=a7g;if(c&&c[f(0x75)])return c;var E={};if(c!=null){for(var S in c)if(S!=='default'&&Object['prototype'][f(0x74)][f(0x7e)](c,S))__createBinding(E,c,S);}return __setModuleDefault(E,c),E;},__importDefault=this&&this[a7g(0x80)]||function(c){const Z=a7g;return c&&c[Z(0x75)]?c:{'default':c};};Object[a7g(0x96)](exports,a7g(0x75),{'value':!![]}),exports['printResponse']=exports[a7g(0x87)]=exports[a7g(0x6b)]=exports[a7g(0x8a)]=exports[a7g(0x77)]=exports['printAsTable']=void 0x0;const chalk_1=__importDefault(require(a7g(0x99))),_=__importStar(require(a7g(0x88))),util=__importStar(require(a7g(0x98))),yaml=require(a7g(0x7b)),columnify=require(a7g(0x8f));function a7E(c,E){const S=a7c();return a7E=function(X,u){X=X-0x68;let Y=S[X];return Y;},a7E(c,E);}function printAsTable(c,E,S,X=![],u=0x0){const K=a7g;!X&&console[K(0x95)](''+chalk_1[K(0xa6)]['bold'](E));function Y(d){return d==='disabled'?d:d['replace']('disabled','');}function R(d,w){const G=K;function P(p){const t=a7E,q=new Date(p);return q[t(0x9c)]()+'/'+q['getMonth']()+'/'+q[t(0x9b)]()+'\x0a'+q[t(0x82)]()+':'+q[t(0x9f)]()+':'+q['getSeconds']();}const U=[G(0x85),G(0x6d)];if(U[G(0xa5)](w['toLowerCase']())&&_[G(0x70)](d)&&d[G(0x89)]()['length']===0xd)return P(Number(d));if(_[G(0x9d)](d)){if(w!==G(0x8b)&&w[G(0xa5)]('disabled'))return d?'x':'✔';return d?'✔':'x';}if(_['isObjectLike'](d))return util[G(0x6a)](d,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});return d;}if(_[K(0x84)](c)){c['length']===0x0&&console[K(0x95)](K(0x91)+E['toLowerCase']()+K(0x78));const d=c['map']((U,p)=>{const b=K,q={'i':p+u};return Object['keys'](U)[b(0x9e)](B=>{const l=b;(_[l(0x8d)](S)||S['includes'](B[l(0x6f)]()))&&_[l(0xa3)](q,Y(B),R(U[B],B));}),q;}),w=_[K(0x92)](Object['keys']((d===null||d===void 0x0?void 0x0:d[0x0])||[]))[K(0xa4)]((U,p)=>{const A=K,q=B=>B!=='i'?B!==A(0x83)?0x0:0x1:0x2;return q(p)-q(U);}),P={'maxWidth':0x1e,'preserveNewLines':!![],'showHeaders':!X,'config':{'_id':{'maxWidth':0x5,'truncate':!![]},'i':{'showHeaders':![]}},'columns':w};console[K(0x95)](columnify(d,P));}else console[K(0x95)](c);}exports[a7g(0x7c)]=printAsTable;function consoleFormat(c,E){const I=a7g;if(_[I(0xa0)](c)){const S=E?'\x20(HTTP\x20status:\x20'+E+')':'';return chalk_1[I(0xa6)][I(0x97)]('The\x20request\x20was\x20completed\x20successfully')+S;}if(!_[I(0xa7)](c))return c===null||c===void 0x0?void 0x0:c[I(0x89)]();return util[I(0x6a)](c,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});}exports['consoleFormat']=consoleFormat;const handleJsonOutput=(c,E)=>{const T=a7g,S=c===T(0x7d);if(S)console['log'](JSON[T(0x8c)](E,null,'\x20'));};exports[a7g(0x8a)]=handleJsonOutput;const handleYamlOutput=(c,E)=>{const M=a7g,S=c===M(0x71)||c==='yml';if(S)console[M(0x95)](yaml[M(0x90)](E));};exports[a7g(0x6b)]=handleYamlOutput;const handleFormattedOutput=(c,E)=>{const m=a7g,S=c===m(0x93);if(S)console[m(0x95)](consoleFormat(E));};exports['handleFormattedOutput']=handleFormattedOutput;const printResponse=(c,E)=>{const N=a7g;(0x0,exports[N(0x8a)])(c,E),(0x0,exports['handleYamlOutput'])(c,E),(0x0,exports[N(0x87)])(c,E);};exports[a7g(0x68)]=printResponse;function a7c(){const z=['__importDefault','get','getHours','internalId','isArrayLike','createdat','__createBinding','handleFormattedOutput','lodash','toString','handleJsonOutput','disabled','stringify','isUndefined','3430980xQhKSX','columnify','safeDump','No\x20','clone','format','187WleAOy','log','defineProperty','green','util','chalk','6nsDKtD','getFullYear','getDate','isBoolean','forEach','getMinutes','isEmpty','8GLXfwy','__setModuleDefault','set','sort','includes','default','isObjectLike','3213384GdcQoC','printResponse','configurable','inspect','handleYamlOutput','5769140klPvNM','updatedat','667268KZZOqC','toLowerCase','isFinite','yaml','169751tklMzP','writable','hasOwnProperty','__esModule','580853MjLEZT','consoleFormat','\x20found','create','8uxDcyU','js-yaml','printAsTable','json','call','309890kvjcor'];a7c=function(){return z;};return a7c();}
@@ -1 +1 @@
1
- 'use strict';const a7i=a7k;(function(Y,k){const I=a7k,X=Y();while(!![]){try{const B=parseInt(I(0x16b))/0x1+parseInt(I(0x178))/0x2+parseInt(I(0x180))/0x3*(parseInt(I(0x17e))/0x4)+parseInt(I(0x161))/0x5*(-parseInt(I(0x17b))/0x6)+-parseInt(I(0x17f))/0x7+-parseInt(I(0x165))/0x8+parseInt(I(0x17c))/0x9*(parseInt(I(0x162))/0xa);if(B===k)break;else X['push'](X['shift']());}catch(l){X['push'](X['shift']());}}}(a7Y,0x95d2e));var __importDefault=this&&this['__importDefault']||function(Y){const u=a7k;return Y&&Y[u(0x172)]?Y:{'default':Y};};function a7k(Y,k){const X=a7Y();return a7k=function(B,l){B=B-0x15b;let S=X[B];return S;},a7k(Y,k);}Object[a7i(0x15e)](exports,a7i(0x172),{'value':!![]}),exports[a7i(0x171)]=exports[a7i(0x16f)]=void 0x0;const chalk_1=__importDefault(require(a7i(0x177))),colored=(Y,k)=>{return k===undefined?Y:chalk_1['default'][k](Y);},getAsciiChart=(Y,k={})=>{const W=a7i,X=Array[W(0x175)](Y[0x0])?Y:[Y];let B=typeof k[W(0x16a)]!==W(0x166)?k[W(0x16a)]:X[0x0][0x0],l=typeof k[W(0x16e)]!==W(0x166)?k[W(0x16e)]:X[0x0][0x0];for(let N=0x0;N<X[W(0x176)];N++){for(let K=0x0;K<X[N]['length'];K++){B=Math[W(0x16a)](B,X[N][K]),l=Math[W(0x16e)](l,X[N][K]);}}let S=['┼','┤','╶','╴','─','╰','╭','╮','╯','│'],C=Math['abs'](l-B),o=typeof k['offset']!==W(0x166)?k[W(0x181)]:0x3,e=typeof k[W(0x15b)]!==W(0x166)?k[W(0x15b)]:W(0x169),O=typeof k['height']!==W(0x166)?k[W(0x15c)]:C,T=typeof k[W(0x168)]!==W(0x166)?k['colors']:['blue','red',W(0x16c),W(0x167),'black'],v=C!==0x0?O/C:0x1,F=Math[W(0x17d)](B*v),t=Math[W(0x17d)](l*v),Q=Math[W(0x16d)](t-F),n=0x0;for(let r=0x0;r<X['length'];r++){n=Math[W(0x16e)](n,X[r][W(0x176)]);}n=n+o;let M=typeof k[W(0x174)]!==W(0x166)?k[W(0x174)]:S,p=k['format']!==undefined?k[W(0x164)]:function(w){const Y0=W;return(e+w['toFixed'](0x2)+k[Y0(0x170)])[Y0(0x160)](-e['length']);},d=new Array(Q+0x1);for(let w=0x0;w<=Q;w++){d[w]=new Array(n);for(let h=0x0;h<n;h++){d[w][h]='\x20';}}for(let g=F;g<=t;++g){const R=p(Q>0x0?l-(g-F)*C/Q:g,g-F);d[g-F][Math[W(0x16e)](o-R[W(0x176)],0x0)]=R,d[g-F][o-0x1]=g==0x0?M[0x0]:M[0x1];}for(let q=0x0;q<X[W(0x176)];q++){let U=T[q%T[W(0x176)]],L=Math[W(0x17d)](X[q][0x0]*v)-F;d[Q-L][o-0x1]=colored(M[0x0],U);for(let z=0x0;z<X[q][W(0x176)]-0x1;z++){let A=Math[W(0x17d)](X[q][z+0x0]*v)-F,D=Math[W(0x17d)](X[q][z+0x1]*v)-F;if(A==D)d[Q-A][z+o]=colored(M[0x4],U);else{d[Q-D][z+o]=colored(A>D?M[0x5]:M[0x6],U),d[Q-A][z+o]=colored(A>D?M[0x7]:M[0x8],U);let E=Math[W(0x16a)](A,D),b=Math[W(0x16e)](A,D);for(let a=E+0x1;a<b;a++){d[Q-a][z+o]=colored(M[0x9],U);}}}}const {startTs:P,endTs:f}=k;if(P||f){const Z=H=>{const Y1=W;if(!H)return Y1(0x179);const G=H['toLocaleDateString'](undefined,{'day':Y1(0x17a),'month':Y1(0x17a),'year':Y1(0x17a)}),s=H['toLocaleTimeString'](undefined,{'hourCycle':Y1(0x15f)});return G+'\x20'+s;},c=Z(f),V=Z(P),m=e[W(0x160)](0x0,Math[W(0x16e)](0x2,e[W(0x176)]-V['length']/0x2+0x1)),J='\x20'['repeat'](Math['max'](n-(e[W(0x176)]+c[W(0x176)]/0x2),0x1));d['push']([''+m+V+J+c]),d[W(0x173)]([]);}return d['map'](H=>H['join'](''))[W(0x163)]('\x0a');};function a7Y(){const Y3=['__esModule','push','symbols','isArray','length','chalk','2454168QAVUpr','\x20\x20\x20','2-digit','3324VRxsKc','1341yezdaE','round','44THfNLU','4167667SSnXxB','207219CmtmRl','offset','padding','height','floor','defineProperty','h24','slice','8140rGrJcj','62540RJpYEP','join','format','6753768KdCOAt','undefined','grey','colors','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','min','36459BaEdHb','green','abs','max','getAsciiChart','unit','downSampleData'];a7Y=function(){return Y3;};return a7Y();}exports[a7i(0x16f)]=getAsciiChart;const downSampleData=(Y,k)=>{const Y2=a7i,X=Y[Y2(0x176)];if(k>=X||k===0x0)return Y;const B=[];let l=0x0;const S=(X-0x2)/(k-0x2);let C=0x0,j,o,e,O;B[l++]=Y[C];for(var T=0x0;T<k-0x2;T++){let n=0x0,M=0x0,p=Math[Y2(0x15d)]((T+0x1)*S)+0x1,d=Math[Y2(0x15d)]((T+0x2)*S)+0x1;d=d<X?d:X;var v=d-p;for(;p<d;p++){n+=Y[p][0x0],M+=Y[p][0x1];}n/=v,M/=v;var F=Math[Y2(0x15d)](T*S)+0x1,x=Math[Y2(0x15d)]((T+0x1)*S)+0x1,t=Y[C][0x0],Q=Y[C][0x1];o=e=-0x1;for(;F<x;F++){e=Math['abs']((t-n)*(Y[F][0x1]-Q)-(t-Y[F][0x0])*(M-Q))*0.5,e>o&&(o=e,j=Y[F],O=F);}B[l++]=j,C=O;}return B[l++]=Y[X-0x1],B;};exports[a7i(0x171)]=downSampleData;
1
+ 'use strict';const a8F=a8E;(function(c,E){const W=a8E,S=c();while(!![]){try{const X=-parseInt(W(0x13f))/0x1*(-parseInt(W(0x149))/0x2)+parseInt(W(0x13b))/0x3+parseInt(W(0x14a))/0x4+-parseInt(W(0x152))/0x5+-parseInt(W(0x153))/0x6+parseInt(W(0x147))/0x7*(parseInt(W(0x156))/0x8)+-parseInt(W(0x12f))/0x9;if(X===E)break;else S['push'](S['shift']());}catch(u){S['push'](S['shift']());}}}(a8c,0x36803));function a8c(){const c4=['max','default','push','1607598EnFeJD','green','grey','slice','symbols','offset','blue','floor','defineProperty','abs','downSampleData','2-digit','1254684RlTtEE','format','__esModule','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','1qDsdOx','round','toLocaleDateString','map','__importDefault','padding','h24','repeat','7bhgJYN','length','48846xFebxl','517544eqENCk','colors','height','join','getAsciiChart','toLocaleTimeString','toFixed','red','492655EJqSjx','2583600PxDpIb','unit','undefined','2871608KdMpxk','min'];a8c=function(){return c4;};return a8c();}var __importDefault=this&&this[a8F(0x143)]||function(c){const i=a8F;return c&&c[i(0x13d)]?c:{'default':c};};Object[a8F(0x137)](exports,a8F(0x13d),{'value':!![]}),exports[a8F(0x139)]=exports[a8F(0x14e)]=void 0x0;function a8E(c,E){const S=a8c();return a8E=function(X,u){X=X-0x12b;let Y=S[X];return Y;},a8E(c,E);}const chalk_1=__importDefault(require('chalk')),colored=(c,E)=>{const v=a8F;return E===undefined?c:chalk_1[v(0x12d)][E](c);},getAsciiChart=(c,E={})=>{const c0=a8F,S=Array['isArray'](c[0x0])?c:[c];let X=typeof E[c0(0x12b)]!==c0(0x155)?E['min']:S[0x0][0x0],u=typeof E['max']!==c0(0x155)?E[c0(0x12c)]:S[0x0][0x0];for(let t=0x0;t<S[c0(0x148)];t++){for(let G=0x0;G<S[t][c0(0x148)];G++){X=Math['min'](X,S[t][G]),u=Math[c0(0x12c)](u,S[t][G]);}}let Y=['┼','┤','╶','╴','─','╰','╭','╮','╯','│'],R=Math[c0(0x138)](u-X),d=typeof E[c0(0x134)]!==c0(0x155)?E[c0(0x134)]:0x3,w=typeof E[c0(0x144)]!==c0(0x155)?E[c0(0x144)]:c0(0x13e),P=typeof E['height']!==c0(0x155)?E[c0(0x14c)]:R,U=typeof E['colors']!==c0(0x155)?E[c0(0x14b)]:[c0(0x135),c0(0x151),c0(0x130),c0(0x131),'black'],p=R!==0x0?P/R:0x1,q=Math[c0(0x140)](X*p),B=Math[c0(0x140)](u*p),V=Math[c0(0x138)](B-q),g=0x0;for(let b=0x0;b<S[c0(0x148)];b++){g=Math['max'](g,S[b][c0(0x148)]);}g=g+d;let r=typeof E[c0(0x133)]!==c0(0x155)?E[c0(0x133)]:Y,H=E[c0(0x13c)]!==undefined?E[c0(0x13c)]:function(l){const c1=c0;return(w+l[c1(0x150)](0x2)+E[c1(0x154)])[c1(0x132)](-w[c1(0x148)]);},f=new Array(V+0x1);for(let l=0x0;l<=V;l++){f[l]=new Array(g);for(let A=0x0;A<g;A++){f[l][A]='\x20';}}for(let I=q;I<=B;++I){const T=H(V>0x0?u-(I-q)*R/V:I,I-q);f[I-q][Math['max'](d-T[c0(0x148)],0x0)]=T,f[I-q][d-0x1]=I==0x0?r[0x0]:r[0x1];}for(let M=0x0;M<S[c0(0x148)];M++){let m=U[M%U['length']],N=Math[c0(0x140)](S[M][0x0]*p)-q;f[V-N][d-0x1]=colored(r[0x0],m);for(let z=0x0;z<S[M][c0(0x148)]-0x1;z++){let J=Math[c0(0x140)](S[M][z+0x0]*p)-q,O=Math['round'](S[M][z+0x1]*p)-q;if(J==O)f[V-J][z+d]=colored(r[0x4],m);else{f[V-O][z+d]=colored(J>O?r[0x5]:r[0x6],m),f[V-J][z+d]=colored(J>O?r[0x7]:r[0x8],m);let C=Math[c0(0x12b)](J,O),k=Math[c0(0x12c)](J,O);for(let o=C+0x1;o<k;o++){f[V-o][z+d]=colored(r[0x9],m);}}}}const {startTs:Z,endTs:K}=E;if(Z||K){const e=a=>{const c2=c0;if(!a)return'\x20\x20\x20';const Q=a[c2(0x141)](undefined,{'day':c2(0x13a),'month':c2(0x13a),'year':'2-digit'}),L=a[c2(0x14f)](undefined,{'hourCycle':c2(0x145)});return Q+'\x20'+L;},D=e(K),h=e(Z),n=w[c0(0x132)](0x0,Math[c0(0x12c)](0x2,w[c0(0x148)]-h['length']/0x2+0x1)),s='\x20'[c0(0x146)](Math[c0(0x12c)](g-(w[c0(0x148)]+D['length']/0x2),0x1));f['push']([''+n+h+s+D]),f[c0(0x12e)]([]);}return f[c0(0x142)](a=>a[c0(0x14d)](''))[c0(0x14d)]('\x0a');};exports[a8F(0x14e)]=getAsciiChart;const downSampleData=(c,E)=>{const c3=a8F,S=c['length'];if(E>=S||E===0x0)return c;const X=[];let u=0x0;const Y=(S-0x2)/(E-0x2);let R=0x0,d,w,P,U;X[u++]=c[R];for(var p=0x0;p<E-0x2;p++){let H=0x0,f=0x0,Z=Math[c3(0x136)]((p+0x1)*Y)+0x1,K=Math[c3(0x136)]((p+0x2)*Y)+0x1;K=K<S?K:S;var q=K-Z;for(;Z<K;Z++){H+=c[Z][0x0],f+=c[Z][0x1];}H/=q,f/=q;var B=Math[c3(0x136)](p*Y)+0x1,V=Math['floor']((p+0x1)*Y)+0x1,g=c[R][0x0],r=c[R][0x1];w=P=-0x1;for(;B<V;B++){P=Math[c3(0x138)]((g-H)*(c[B][0x1]-r)-(g-c[B][0x0])*(f-r))*0.5,P>w&&(w=P,d=c[B],U=B);}X[u++]=d,R=U;}return X[u++]=c[S-0x1],X;};exports['downSampleData']=downSampleData;
@@ -1 +1 @@
1
- 'use strict';const a8n=a8k;function a8k(Y,k){const X=a8Y();return a8k=function(B,l){B=B-0x1e1;let S=X[B];return S;},a8k(Y,k);}(function(Y,k){const Q=a8k,X=Y();while(!![]){try{const B=-parseInt(Q(0x211))/0x1+-parseInt(Q(0x257))/0x2*(-parseInt(Q(0x20f))/0x3)+parseInt(Q(0x253))/0x4*(-parseInt(Q(0x26b))/0x5)+parseInt(Q(0x27d))/0x6+parseInt(Q(0x2c6))/0x7*(parseInt(Q(0x2c0))/0x8)+-parseInt(Q(0x224))/0x9*(parseInt(Q(0x24a))/0xa)+parseInt(Q(0x2b2))/0xb*(parseInt(Q(0x23c))/0xc);if(B===k)break;else X['push'](X['shift']());}catch(l){X['push'](X['shift']());}}}(a8Y,0x901ae));function a8Y(){const YZ=['length','must\x20be\x20bigger\x20than\x20or\x20equal\x20to\x20','jobs','inquirer-search-list','Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.','subdomain','subdomains','createdAt','Unexpected\x20file\x20type:\x20','Choose\x20the\x20name\x20of\x20the\x20new\x20local\x20context:','bold','propToType','not\x20completed','getQuestionString','rawObject','backups','askForPipeline','nextPageCursor','filter','unshift','askForCredentials','./pagination/inquirer-pagination-prompt','InquirerHelper','search-list','No,\x20but\x20save\x20as\x20file','service:\x20\x27','split','Template\x20id\x20not\x20provided.','\x20in\x20','Writing\x20configuration\x20failed:\x20','templates','ABORT','yaml','all','create','boolean','3719694quAlRk','askForBackupDestination','token','input','then','askForAddonBackup','askForLogSink','pagination-prompt','No,\x20repeat','Provide\x20a\x20file\x20path\x20to\x20write\x20the\x20configuration\x20to\x20(<name>.[json|yaml|yml])','opt','throw','\x20(completedAt:\x20','maxLength','17592OGPVZF','backupDestinations','set','minLength','job\x20builds','reset','2653tdHvGm','pipelines','getInnerType','__setModuleDefault','secrets','volume','backup\x20destination','askArrayEntry','skipValidation','tmpCmdPath','\x20characters','isNaN','fullName','clusters','push','underline','green','must\x20be\x20smaller\x20than\x20or\x20equal\x20to\x20','resultCache','credentials','restore','No\x20','oneOf','addons','completedAt','chalk','containers','getCurrentProjectName','confirm','pipeline','apply','this\x20option\x20is\x20required,\x20please\x20answer','nextCursor','uri','deleteWarningPrompt','confirmation','\x20and\x20it\x20','pop','askForProjectScopedResourcePaginated','Something\x20unexpected\x20happened.','retry','concat','example','fileName','job\x20containers','defineProperty','must\x20be\x20a\x20number,\x20is\x20','No,\x20edit','template\x20run','askForAddonRestore','retrievePayloadViaInteractiveCli','service\x20containers','askForVolume','services','domain','startedAt','next','contextProvider','registryCredentials','askForSubdomainPath','trim','What\x27s\x20the\x20','service','getPathString','default','Aborted.','askForSecret','askForService','value','\x20(startedAt:\x20','editor','restores','__importStar','__importDefault','js-yaml','hasOwnProperty','builds','cmdPath','password','ask','setPathVars','enum','get','logSinks','Choose\x20the\x20','job:\x20\x27','join','isValidJSON','\x20(full\x20domain:\x20','tokenPrompt','editedResult','domain\x20(','addon:\x20\x27','whiteBright','writeFileSync','WARNING:\x20You\x20are\x20about\x20to\x20delete\x20','18141sDJPNx','getOwnPropertyDescriptor','918539jBYPZH','string','project','project:\x20\x27','__createBinding','blue','Enter\x20the\x20','isUndefined','.\x20This\x20is\x20irreversible.\x20Please\x20confirm!','found','properties','askForSubdomain','volumes','\x20characters,\x20is\x20','pagination','askForTag','red','Choose\x20the\x20login\x20token:','askForProjectScopedResource','6523353jqklnP','values','must\x20be\x20a\x20valid\x20non-empty\x20json\x20string','pattern','success','\x20to\x20use:','askForResourcePaginated','lodash','charAt','validate','greenBright','\x27\x20already\x20exists.\x20Do\x20you\x20want\x20to\x20override\x20this\x20context\x20(y)\x20or\x20enter\x20a\x20new\x20name\x20(N)?','cursor','test','prompt','No\x20builds\x20found','pathVars','to\x20use:','secret','array','DynamicReloadPaginationPrompt','find','path','type','72yVAGHq','list','saveFile','apiClient','Yes,\x20send','call','job','No,\x20abort','maximum','\x20type?','No\x20containers\x20found','isBoolean','integer','unset','10FeAKMO','isObject','all-containers','runs','__awaiter','map','askForResource','registerPrompt','safeDump','4DyIFFR','getType','subdomainPath','Should\x20it\x20be','6ifQJYd','json','must\x20be\x20longer\x20than\x20or\x20equal\x20to\x20','),\x20subdomain\x20(','domains','\x20Example:\x20','override','templateRuns','toString','Configuration\x20file\x20written\x20to\x20','__esModule','askForJob','includes','askForAddon','for\x20this\x20','stringify','addEntry','name','isArray','grey','3869345WIYGuJ','assign','REPEAT','inquirer','safeLoad','tags','defaultPaginationPageSize',',\x20supported\x20types:\x20[json|yaml|yml]','EDIT','data','askForJobRun','projects','description','configurable','Do\x20you\x20want\x20to\x20add','job\x20runs','doesn\x27t\x20match\x20pattern\x20\x27','SAVE','761958sdZhKp','has','don\x27t\x20change','askGeneric','yml','object','askForProject','anyOf','prototype','paths','addon','editPayload','warning','minimum','Context\x20with\x20name\x20\x27','all-builds','confirmationPrompt'];a8Y=function(){return YZ;};return a8Y();}var __createBinding=this&&this[a8n(0x215)]||(Object['create']?function(Y,X,B,l){const M=a8n;if(l===undefined)l=B;var S=Object[M(0x210)](X,B);(!S||(M(0x201)in S?!X['__esModule']:S['writable']||S[M(0x278)]))&&(S={'enumerable':!![],'get':function(){return X[B];}}),Object['defineProperty'](Y,l,S);}:function(Y,X,B,l){if(l===undefined)l=B;Y[l]=X[B];}),__setModuleDefault=this&&this[a8n(0x2c9)]||(Object[a8n(0x2b0)]?function(Y,k){const p=a8n;Object[p(0x2f3)](Y,p(0x1ef),{'enumerable':!![],'value':k});}:function(Y,k){const d=a8n;Y[d(0x1ef)]=k;}),__importStar=this&&this[a8n(0x1f7)]||function(Y){const P=a8n;if(Y&&Y[P(0x261)])return Y;var X={};if(Y!=null){for(var B in Y)if(B!==P(0x1ef)&&Object[P(0x285)][P(0x1fa)][P(0x241)](Y,B))__createBinding(X,Y,B);}return __setModuleDefault(X,Y),X;},__awaiter=this&&this[a8n(0x24e)]||function(Y,k,X,B){function l(S){return S instanceof X?S:new X(function(C){C(S);});}return new(X||(X=Promise))(function(S,C){const r=a8k;function j(O){const f=a8k;try{e(B[f(0x1e7)](O));}catch(T){C(T);}}function o(O){const N=a8k;try{e(B[N(0x2bd)](O));}catch(T){C(T);}}function e(O){const K=a8k;O['done']?S(O[K(0x1f3)]):l(O[K(0x1f3)])[K(0x2b6)](j,o);}e((B=B[r(0x2e4)](Y,k||[]))[r(0x1e7)]());});},__importDefault=this&&this[a8n(0x1f8)]||function(Y){const w=a8n;return Y&&Y[w(0x261)]?Y:{'default':Y};};Object[a8n(0x2f3)](exports,a8n(0x261),{'value':!![]}),exports[a8n(0x2a4)]=void 0x0;const _=__importStar(require(a8n(0x22b))),chalk_1=__importDefault(require(a8n(0x2df))),fs=__importStar(require('fs')),utils_1=require('./utils'),api_helpers_1=require('./api-helpers'),inquirer_pagination_prompt_1=require(a8n(0x2a3)),inquirer=require(a8n(0x26e)),inquirerSearchList=require(a8n(0x291)),yaml=require(a8n(0x1f9));var ConfirmChoices;(function(Y){const h=a8n;Y['YES']=h(0x240),Y[h(0x26d)]=h(0x2ba),Y[h(0x273)]=h(0x2f5),Y[h(0x27c)]=h(0x2a6),Y[h(0x2ad)]=h(0x243);}(ConfirmChoices||(ConfirmChoices={})));class InquirerHelper{constructor(Y){const g=a8n;this['apiClient']=Y,this[g(0x271)]=0x32,this['editPayload']=k=>__awaiter(this,void 0x0,void 0x0,function*(){const y=g,{editedResult:X}=yield inquirer['prompt']([{'type':'editor','name':y(0x209),'message':'Go\x20to\x20editor','default':yaml[y(0x252)](k)}]);return yaml[y(0x26f)](X);}),this['saveFile']=k=>__awaiter(this,void 0x0,void 0x0,function*(){const R=g,X=C=>R(0x296)+C+R(0x272);function B(){return __awaiter(this,void 0x0,void 0x0,function*(){const q=a8k;return inquirer[q(0x232)]([{'type':q(0x2b5),'name':q(0x2f1),'message':q(0x2bb),'validate':C=>new RegExp('.*\x5c.(json|yaml|yml)$')[q(0x231)](C)?!![]:X(C)}]);});}const {fileName:l}=yield B(),S=l['toString']()[R(0x2a8)]('.')[R(0x2eb)]();try{switch(S){case R(0x258):(0x0,utils_1[R(0x228)])(R(0x260)+l);return fs[R(0x20d)](l,JSON['stringify'](k,null,'\x20\x20'));case R(0x2ae):case R(0x281):(0x0,utils_1[R(0x228)])(R(0x260)+l);return fs[R(0x20d)](l,yaml[R(0x252)](k));default:(0x0,utils_1[R(0x289)])(X(S));}}catch(C){(0x0,utils_1[R(0x289)])(R(0x2ab)+C['message']);}return undefined;}),this[g(0x2a0)]=(k,X)=>B=>{const U=g,l=typeof B===U(0x212)?B[U(0x1eb)]():B;return X===![]&&l===U(0x27f)?'':l;},this['validate']=(k,X,B)=>l=>{const L=g;if(this[L(0x2ce)]===!![])return!![];const S=[];if(l===''||l===L(0x27f)){if(X!==![])S[L(0x2d4)](L(0x2e5));else return!![];}k[L(0x23b)]==='string'&&!_[L(0x218)](k[L(0x227)])&&S[L(0x2d4)](new RegExp(k['pattern'])['test'](l)?!![]:L(0x27b)+k[L(0x227)]+'\x27');k['type']==='string'&&!_[L(0x218)](k[L(0x2c3)])&&S['push'](l['length']>=k[L(0x2c3)]?!![]:L(0x259)+k[L(0x2c3)]+L(0x21e)+l['length']+L(0x2d0));k[L(0x23b)]==='string'&&!_[L(0x218)](k[L(0x2bf)])&&S[L(0x2d4)](l[L(0x28e)]<=k['maxLength']?!![]:'must\x20be\x20shorter\x20than\x20or\x20equal\x20to\x20'+k[L(0x2bf)]+L(0x21e)+l[L(0x28e)]+L(0x2d0));B&&Number[L(0x2d1)](parseInt(l,0xa))&&S[L(0x2d4)](L(0x2f4)+l);k[L(0x23b)]==='integer'&&!_['isUndefined'](k[L(0x28a)])&&S[L(0x2d4)](l>=k[L(0x28a)]?!![]:L(0x28f)+k['minimum']);k[L(0x23b)]===L(0x248)&&!_[L(0x218)](k[L(0x244)])&&S[L(0x2d4)](l<=k['maximum']?!![]:L(0x2d7)+k[L(0x244)]);if(k[L(0x23b)]===L(0x29c)){const o=(0x0,utils_1[L(0x206)])(l);S['push'](o===![]||_['isEmpty'](o)?L(0x226):!![]);}const C=S[L(0x2a0)](O=>O!==!![]),j=(k===null||k===void 0x0?void 0x0:k['example'])?'\x0a'+chalk_1[L(0x1ef)][L(0x221)]('>>')+L(0x25c)+chalk_1[L(0x1ef)]['whiteBright'](JSON['stringify'](k[L(0x2f0)])):'';return C['length']>0x0?C['join'](chalk_1[L(0x1ef)][L(0x2d5)](L(0x2ea)))+j:!![];},this[g(0x1ee)]=(k,X,B)=>{const z=g,l=k[k[z(0x28e)]-0x1];function S(){const A=z;return k['slice'](0x0,-0x1)[A(0x24f)](o=>o[A(0x22c)](0x0)['toUpperCase']()+o['slice'](0x1))[A(0x205)]('>');}const C=k[z(0x28e)]>0x1?chalk_1['default']['bgGrey'][z(0x20c)](S())+':\x20':'',j=B?'\x20('+chalk_1[z(0x1ef)][z(0x216)](B)+')':'';return chalk_1[z(0x1ef)][z(0x2c5)](''+C+X+'\x20'+chalk_1[z(0x1ef)]['bold'][z(0x22e)](l)+j+'?');},this['askForResource']=(k,X,B)=>__awaiter(this,void 0x0,void 0x0,function*(){const D=g;if(X[D(0x28e)]<0x1){const C=B?D(0x265)+B:D(0x21a);throw new Error(D(0x2db)+k+'\x20'+C+'.');}const l='Choose\x20the\x20'+k+'\x20to\x20use:',S=X['length']>0x4?D(0x2a5):'list';return(yield inquirer['prompt']([{'type':S,'name':D(0x268),'message':l,'choices':X}]))[D(0x268)];}),this['askForResourcePaginated']=(k,X,B)=>__awaiter(this,void 0x0,void 0x0,function*(){const E=g,{elements:l,nextCursor:S}=yield X();if(l[E(0x28e)]<0x1){const o=B?E(0x265)+B:E(0x21a);throw new Error(E(0x2db)+k+'\x20'+o+'.');}const C=E(0x203)+k+E(0x229);if(S!==undefined){const e=({nextPageCursor:O})=>__awaiter(this,void 0x0,void 0x0,function*(){const b=E,T=yield X(O);return{'elements':T['elements'],'nextPageCursor':T[b(0x2e6)]};});return(yield inquirer[E(0x232)]([{'type':'pagination-prompt','name':E(0x268),'message':C,'choices':l,'nextPageCursor':S,'loadMore':e}]))[E(0x268)];}const j=l[E(0x28e)]>0x4?'search-list':E(0x23d);return(yield inquirer[E(0x232)]([{'type':j,'name':E(0x268),'message':C,'choices':l}]))[E(0x268)];}),this[g(0x280)]=(k,X)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const a=g,B=''+(X?'('+chalk_1[a(0x1ef)][a(0x216)](X)+')\x20':''),l=a(0x217)+chalk_1['default'][a(0x2d6)](k)+'\x20'+B+a(0x235),S=this[a(0x22d)]({'type':a(0x212),'required':!![]});return(yield inquirer['prompt']([{'type':a(0x2b5),'name':a(0x268),'message':l,'validate':S}]))['name'];}),this['askConfirm']=k=>__awaiter(this,void 0x0,void 0x0,function*(){const Z=g;return(yield inquirer[Z(0x232)]([{'type':Z(0x2e2),'name':Z(0x268),'message':k,'default':!![]}]))['name'];}),this[g(0x1f2)]=k=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const m=g,X=B=>__awaiter(this,void 0x0,void 0x0,function*(){const V=a8k,l=yield this[V(0x23f)][V(0x23d)][V(0x1e4)][V(0x2af)]({'parameters':{'projectId':B}}),S=l['data']['services'][V(0x24f)](C=>C['id']);return S;});return this[m(0x223)]('service',X,k);}),this['askForTemplate']=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const H=g,k=X=>__awaiter(this,void 0x0,void 0x0,function*(){const J=a8k;var B;const l=yield this['apiClient'][J(0x23d)][J(0x2ac)]({'options':{'per_page':this[J(0x271)],'cursor':X}}),S=l[J(0x274)][J(0x2ac)]['map'](C=>C['id']);return{'elements':S,'nextCursor':(B=l[J(0x21f)])===null||B===void 0x0?void 0x0:B['cursor']};});return this[H(0x22a)]('template',k);}),this[g(0x220)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const s=g,k=X=>__awaiter(this,void 0x0,void 0x0,function*(){const G=a8k;var B,l,S;const C=yield this[G(0x23f)][G(0x23d)]['tags']({'options':{'per_page':this[G(0x271)],'cursor':X}}),j=(l=(B=C['data'][G(0x270)])===null||B===void 0x0?void 0x0:B[G(0x24f)](o=>o['id']))!==null&&l!==void 0x0?l:[];return{'elements':j,'nextCursor':(S=C['pagination'])===null||S===void 0x0?void 0x0:S['cursor']};});return this[s(0x22a)]('tag',k);}),this[g(0x2b3)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const I=g;var k;const X=yield this[I(0x23f)]['list']['backupDestinations'][I(0x2af)]({}),B=(k=X[I(0x274)][I(0x2c1)]['map'](l=>l['name']))!==null&&k!==void 0x0?k:[];return this['askForResource'](I(0x2cc),B);}),this['askForClusterId']=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const i=g,k=X=>__awaiter(this,void 0x0,void 0x0,function*(){const u=a8k;var B,l,S;const C=yield this[u(0x23f)][u(0x23d)]['cloud'][u(0x2d3)]({'options':{'per_page':this[u(0x271)],'cursor':X}}),j=(l=(B=C['data'][u(0x2d3)])===null||B===void 0x0?void 0x0:B[u(0x24f)](o=>o[u(0x268)]))!==null&&l!==void 0x0?l:[];return{'elements':j,'nextCursor':(S=C[u(0x21f)])===null||S===void 0x0?void 0x0:S[u(0x230)]};});return this[i(0x22a)]('cluster\x20id',k);}),this['askForTemplateRun']=k=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const W=g;if(_[W(0x218)](k))throw new Error(W(0x2a9));const X=B=>__awaiter(this,void 0x0,void 0x0,function*(){const Y0=W;var l;let S=this['defaultPaginationPageSize'];const C=yield this[Y0(0x23f)][Y0(0x23d)][Y0(0x25e)]({'parameters':{'templateId':k},'options':{'per_page':S,'cursor':B}}),j=C['data'][Y0(0x25e)][Y0(0x24f)](o=>o['id']+'\x20(startedAt:\x20'+o[Y0(0x295)]+')');return{'elements':j,'nextCursor':(l=C[Y0(0x21f)])===null||l===void 0x0?void 0x0:l[Y0(0x230)]};});return this[W(0x22a)](W(0x2f6),X)['then'](B=>B[W(0x2a8)]('\x20')[0x0]);}),this[g(0x2b8)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Y2=g,k=X=>__awaiter(this,void 0x0,void 0x0,function*(){const Y1=a8k;var B;let l=this['defaultPaginationPageSize'];const S=yield this[Y1(0x23f)]['list']['logSinks']({'options':{'per_page':l,'cursor':X}}),C=S[Y1(0x274)][Y1(0x202)][Y1(0x24f)](j=>j['id']);return{'elements':C,'nextCursor':(B=S[Y1(0x21f)])===null||B===void 0x0?void 0x0:B[Y1(0x230)]};});return this[Y2(0x22a)]('log\x20sink',k);}),this[g(0x29e)]=k=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Y4=g,X=B=>__awaiter(this,void 0x0,void 0x0,function*(){const Y3=a8k,l=yield this['apiClient'][Y3(0x23d)][Y3(0x2c7)]['all']({'parameters':{'projectId':B}});return l[Y3(0x274)][Y3(0x2c7)]['map'](S=>S['id']);});return this[Y4(0x223)](Y4(0x2e3),X,k);}),this[g(0x262)]=k=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Y6=g,X=B=>__awaiter(this,void 0x0,void 0x0,function*(){const Y5=a8k,l=yield this[Y5(0x23f)]['list'][Y5(0x290)][Y5(0x2af)]({'parameters':{'projectId':B}}),S=l[Y5(0x274)]['jobs'][Y5(0x24f)](C=>C['id']);return S;});return this['askForProjectScopedResource'](Y6(0x242),X,k);}),this[g(0x275)]=(k,X,B=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Y8=g,l='all-job-runs',S=C=>j=>__awaiter(this,void 0x0,void 0x0,function*(){const Y7=a8k;var o;const e=yield this[Y7(0x23f)][Y7(0x201)]['job'][Y7(0x24d)]({'parameters':{'projectId':C,'jobId':k},'options':{'per_page':this[Y7(0x271)],'cursor':j}}),O=e[Y7(0x274)]['runs']['map'](T=>T['id']+'\x20(startedAt:\x20'+T[Y7(0x1e6)]+')');return B&&O['unshift'](l),{'elements':O,'nextCursor':(o=e[Y7(0x21f)])===null||o===void 0x0?void 0x0:o[Y7(0x230)]};});return this[Y8(0x2ec)](Y8(0x27a),S,X,Y8(0x204)+k+'\x27')['then'](C=>{const Y9=Y8,o=C[Y9(0x2a8)]('\x20')[0x0];if(o===l)return undefined;return o;});}),this['askForBuild']=(k,X,B,l=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const YY=g,S=YY(0x28c);if(B!==undefined){const C=j=>o=>__awaiter(this,void 0x0,void 0x0,function*(){const Yk=YY;var e;const O=yield this[Yk(0x23f)][Yk(0x201)][Yk(0x242)]['builds']({'parameters':{'projectId':j,'jobId':B},'options':{'per_page':this[Yk(0x271)],'cursor':o}}),T=O['data'][Yk(0x1fb)][Yk(0x24f)](v=>v['id']+Yk(0x1f4)+v['createdAt']+')');return l&&T['unshift'](S),{'elements':T,'nextCursor':(e=O['pagination'])===null||e===void 0x0?void 0x0:e[Yk(0x230)]};});return this['askForProjectScopedResourcePaginated'](YY(0x2c4),C,k,YY(0x204)+B+'\x27')[YY(0x2b6)](o=>{const YX=YY,e=o[YX(0x2a8)]('\x20')[0x0];if(e===S)return undefined;return e;});}if(X!==undefined){const j=o=>e=>__awaiter(this,void 0x0,void 0x0,function*(){const YB=YY;var O;const T=yield this['apiClient'][YB(0x201)][YB(0x1ed)][YB(0x1fb)]({'parameters':{'projectId':o,'serviceId':X},'options':{'per_page':this[YB(0x271)],'cursor':e}}),v=T[YB(0x274)]['builds'][YB(0x24f)](F=>F['id']+YB(0x1f4)+F[YB(0x295)]+')');if(l)v[YB(0x2a1)](S);return{'elements':v,'nextCursor':(O=T[YB(0x21f)])===null||O===void 0x0?void 0x0:O['cursor']};});return this[YY(0x2ec)]('service\x20build',j,k,YY(0x2a7)+B+'\x27')['then'](o=>{const Yl=YY,e=o[Yl(0x2a8)]('\x20')[0x0];if(e===S)return undefined;return e;});}throw new Error(YY(0x233));}),this['askForContainer']=(k,X,B,l=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const YS=g,S=YS(0x24c);if(B!==undefined){const C=j=>o=>__awaiter(this,void 0x0,void 0x0,function*(){const YC=YS;var e,O;const T=yield this[YC(0x23f)][YC(0x201)]['job'][YC(0x2e0)]({'parameters':{'projectId':j,'jobId':B},'options':{'per_page':this[YC(0x271)],'cursor':o}}),v=(e=T[YC(0x274)]['containers'])!==null&&e!==void 0x0?e:[],F=v===null||v===void 0x0?void 0x0:v[YC(0x24f)](x=>x[YC(0x268)]+'\x20(startedAt:\x20'+x[YC(0x295)]+')');return l&&F[YC(0x2a1)](S),{'elements':F,'nextCursor':(O=T[YC(0x21f)])===null||O===void 0x0?void 0x0:O[YC(0x230)]};});return this[YS(0x2ec)](YS(0x2f2),C,k,YS(0x204)+B+'\x27')[YS(0x2b6)](o=>{const Yj=YS,e=o[Yj(0x2a8)]('\x20')[0x0];if(e===S)return undefined;return e;});}if(X!==undefined){const j=o=>e=>__awaiter(this,void 0x0,void 0x0,function*(){const Yo=YS;var O,T;const v=yield this[Yo(0x23f)]['get'][Yo(0x1ed)][Yo(0x2e0)]({'parameters':{'projectId':o,'serviceId':X},'options':{'per_page':this[Yo(0x271)],'cursor':e}}),F=(O=v[Yo(0x274)][Yo(0x2e0)])!==null&&O!==void 0x0?O:[],x=F[Yo(0x24f)](t=>t[Yo(0x268)]+Yo(0x1f4)+t[Yo(0x295)]+')');if(l)x===null||x===void 0x0?void 0x0:x[Yo(0x2a1)](S);return{'elements':x,'nextCursor':(T=v[Yo(0x21f)])===null||T===void 0x0?void 0x0:T[Yo(0x230)]};});return this['askForProjectScopedResourcePaginated'](YS(0x1e2),j,k,YS(0x2a7)+B+'\x27')[YS(0x2b6)](o=>{const Ye=YS,e=o[Ye(0x2a8)]('\x20')[0x0];if(e===S)return undefined;return e;});}throw new Error(YS(0x246));}),this[g(0x264)]=k=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const YT=g,X=B=>__awaiter(this,void 0x0,void 0x0,function*(){const YO=a8k,l=yield this[YO(0x23f)][YO(0x23d)][YO(0x2dd)][YO(0x2af)]({'parameters':{'projectId':B}});return l[YO(0x274)][YO(0x2dd)]['map'](S=>S['id']);});return this[YT(0x223)](YT(0x287),X,k);}),this[g(0x2b7)]=(k,X)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const YF=g,B=l=>S=>__awaiter(this,void 0x0,void 0x0,function*(){const Yv=a8k;var C;const j=yield this[Yv(0x23f)][Yv(0x201)][Yv(0x287)]['backups']({'parameters':{'projectId':l,'addonId':X},'options':{'per_page':this[Yv(0x271)],'cursor':S}});return{'elements':j[Yv(0x274)]['backups']['map'](o=>o['id']+Yv(0x2be)+(o[Yv(0x2de)]||Yv(0x29a))+')'),'nextCursor':(C=j[Yv(0x21f)])===null||C===void 0x0?void 0x0:C[Yv(0x230)]};});return this[YF(0x2ec)](YF(0x29d),B,k,YF(0x20b)+X+'\x27')[YF(0x2b6)](l=>l[YF(0x2a8)]('\x20')[0x0]);}),this[g(0x2f7)]=(k,X,B)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Yt=g,l=S=>C=>__awaiter(this,void 0x0,void 0x0,function*(){const Yx=a8k;var j;const o=yield this[Yx(0x23f)][Yx(0x201)][Yx(0x287)]['backup'][Yx(0x1f6)]({'parameters':{'projectId':S,'addonId':X,'backupId':B},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':C}});return{'elements':o[Yx(0x274)][Yx(0x1f6)]['map'](e=>e['id']+Yx(0x2be)+(e['completedAt']||Yx(0x29a))+')'),'nextCursor':(j=o['pagination'])===null||j===void 0x0?void 0x0:j[Yx(0x230)]};});return this[Yt(0x2ec)](Yt(0x2da),l,k,Yt(0x20b)+X+'\x27')['then'](S=>S['split']('\x20')[0x0]);}),this[g(0x1e3)]=k=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Yn=g,X=B=>__awaiter(this,void 0x0,void 0x0,function*(){const YQ=a8k;return(yield this[YQ(0x23f)][YQ(0x23d)][YQ(0x21d)]({'parameters':{'projectId':B}}))[YQ(0x274)]['map'](l=>l['id']);});return this[Yn(0x223)](Yn(0x2cb),X,k);}),this[g(0x1f1)]=k=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Yp=g,X=B=>__awaiter(this,void 0x0,void 0x0,function*(){const YM=a8k,l=yield this[YM(0x23f)][YM(0x23d)][YM(0x2ca)][YM(0x2af)]({'parameters':{'projectId':B}});return l[YM(0x274)][YM(0x2ca)][YM(0x24f)](S=>S['id']);});return this[Yp(0x223)](Yp(0x236),X,k);}),this[g(0x21c)]=k=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Yd=g,X=yield this[Yd(0x23f)][Yd(0x201)][Yd(0x1e5)]({'parameters':{'domain':k}}),B=X['data'][Yd(0x294)][Yd(0x24f)](S=>S[Yd(0x268)]+Yd(0x207)+S[Yd(0x2d2)]+')'),l=Yd(0x20a)+k+')';return this[Yd(0x250)](Yd(0x293),B,l)[Yd(0x2b6)](S=>S[Yd(0x2a8)]('\x20')[0x0]);}),this[g(0x1ea)]=(k,X)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const YP=g,B=yield this['apiClient'][YP(0x23d)]['subdomain'][YP(0x23a)]({'parameters':{'domain':k,'subdomain':X}}),l=B[YP(0x274)][YP(0x286)]['map'](C=>''+C[YP(0x2e7)]),S=YP(0x20a)+k+YP(0x25a)+X+')';return this['askForResource'](YP(0x255),l,S);}),this[g(0x2e8)]=k=>__awaiter(this,void 0x0,void 0x0,function*(){const Yf=g;return(yield inquirer['prompt']([{'type':Yf(0x2e2),'name':Yf(0x2e9),'message':chalk_1[Yf(0x1ef)]['yellowBright'](Yf(0x20e)+(k||'a\x20Northflank\x20resource')+Yf(0x219)),'default':![]}]))[Yf(0x2e9)];}),this['loginPrompt']=(k,X)=>__awaiter(this,void 0x0,void 0x0,function*(){const YN=g;_[YN(0x218)](k[YN(0x268)])&&(X[YN(0x28e)]<=0x0?_[YN(0x2c2)](k,YN(0x268),YN(0x1ef)):yield(0x0,utils_1[YN(0x2ee)])(0xa)(()=>__awaiter(this,void 0x0,void 0x0,function*(){const YK=YN,{name:B}=yield inquirer[YK(0x232)]([{'type':YK(0x2b5),'name':'name','message':YK(0x297),'default':'main-context'}]);if(!k['override']&&X[YK(0x239)](l=>l[YK(0x268)]===B)){const {c:l}=yield inquirer['prompt']([{'type':'confirm','name':'c','message':YK(0x28b)+B+YK(0x22f),'default':![]}]);if(l===![])throw new Error('Context\x20name\x20already\x20exists.');_[YK(0x2c2)](k,YK(0x25d),!![]);}_[YK(0x2c2)](k,YK(0x268),B);})));if(_[YN(0x218)](k[YN(0x2b4)])){const B=yield this[YN(0x208)]();_[YN(0x2c2)](k,'token',B);}return k;}),this[g(0x208)]=()=>__awaiter(this,void 0x0,void 0x0,function*(){const Yr=g,{token:k}=yield inquirer['prompt']([{'type':Yr(0x1fd),'name':Yr(0x2b4),'mask':'*','message':Yr(0x222)}]);return k;}),inquirer[g(0x251)](g(0x2a5),inquirerSearchList),inquirer[g(0x251)](g(0x2b9),inquirer_pagination_prompt_1[g(0x238)]);}[a8n(0x28d)](Y,k){return __awaiter(this,void 0x0,void 0x0,function*(){const Yw=a8k,X=yaml[Yw(0x252)](Y),B=_['max'](X['split']('\x0a')[Yw(0x24f)](C=>C[Yw(0x28e)])),l=chalk_1[Yw(0x1ef)][Yw(0x26a)]('-'['repeat'](B)+'\x0a'),{confirm:S}=yield inquirer[Yw(0x232)]([{'type':Yw(0x23d),'name':Yw(0x2e2),'message':''+chalk_1[Yw(0x1ef)][Yw(0x298)][Yw(0x2d6)]('Please\x20confirm\x20following\x20configuration:\x0a')+l+chalk_1[Yw(0x1ef)]['blueBright'](X)+l,'choices':Object[Yw(0x225)](ConfirmChoices)}]);switch(S){case ConfirmChoices['YES']:return Y;case ConfirmChoices['ABORT']:throw new Error(Yw(0x1f0));case ConfirmChoices[Yw(0x26d)]:return this[Yw(0x1e1)](k);case ConfirmChoices[Yw(0x273)]:return this[Yw(0x28d)](yield this[Yw(0x288)](Y),k);case ConfirmChoices['SAVE']:yield this[Yw(0x23e)](Y);return this['confirmationPrompt'](Y,k);default:throw new Error(Yw(0x2ed));}});}['retrievePayloadViaInteractiveCli'](Y,k){return __awaiter(this,void 0x0,void 0x0,function*(){const Yh=a8k;if((k===null||k===void 0x0?void 0x0:k[Yh(0x2d8)])!==undefined)this[Yh(0x2d8)]=k===null||k===void 0x0?void 0x0:k['resultCache'];this[Yh(0x2cf)]=k===null||k===void 0x0?void 0x0:k[Yh(0x1fc)],this[Yh(0x2ce)]=k===null||k===void 0x0?void 0x0:k[Yh(0x2ce)];const X={};return yield this[Yh(0x299)]([],Y[Yh(0x2bc)]['body'],X),this[Yh(0x2d8)]=X,yield this[Yh(0x28d)](X,Y);});}[a8n(0x299)](Y,k,X,B){return __awaiter(this,void 0x0,void 0x0,function*(){const Yg=a8k;let l;if(k[Yg(0x2dc)]&&!_[Yg(0x27e)](k,'properties')){if(k['oneOf'][Yg(0x28e)]>0x1){const {choice:S}=yield inquirer['prompt']([{'type':Yg(0x23d),'name':'choice','message':Yg(0x1ec)+(Y[Y[Yg(0x28e)]-0x1]||'')+Yg(0x245),'choices':k[Yg(0x2dc)]['map'](C=>{var j;return(j=C['description'])!==null&&j!==void 0x0?j:'??';})}]);l=yield this[Yg(0x254)](Y,k['oneOf'][Yg(0x239)](C=>C[Yg(0x277)]===S),X,B);}else{const C=k[Yg(0x2dc)][0x0];_[Yg(0x2c2)](C,Yg(0x277),k[Yg(0x277)]),l=yield this[Yg(0x254)](Y,C,X,B);}l={};}else{if(k[Yg(0x284)]&&!_[Yg(0x27e)](k,Yg(0x21b))){if(k[Yg(0x284)][Yg(0x28e)]>0x1){const {choice:j}=yield inquirer[Yg(0x232)]([{'type':'list','name':'choice','message':Yg(0x1ec)+(Y[Y[Yg(0x28e)]-0x1]||'')+Yg(0x245),'choices':[...k[Yg(0x284)][Yg(0x24f)](o=>{var e;return(e=o['description'])!==null&&e!==void 0x0?e:'??';}),Yg(0x27f)]}]);j!==Yg(0x27f)&&(l=yield this[Yg(0x254)](Y,k[Yg(0x284)][Yg(0x239)](o=>o[Yg(0x277)]===j),X,B));}else{const o=k['anyOf'][0x0];_['set'](o,'description',k[Yg(0x277)]),l=yield this[Yg(0x254)](Y,o,X,B);}l={};}else l=yield this[Yg(0x254)](Y,k,X,B);}return l;});}[a8n(0x2c8)](Y,k,X,B){var l;return __awaiter(this,void 0x0,void 0x0,function*(){const Yy=a8k;if(B===![]){const {addEntry:j}=yield inquirer[Yy(0x232)]([{'type':Yy(0x2e2),'name':Yy(0x267),'message':this[Yy(0x1ee)](k,Yy(0x279),Y===null||Y===void 0x0?void 0x0:Y[Yy(0x277)]),'default':![]}]);if(!j)return X;}const S=Object['keys']((l=Y===null||Y===void 0x0?void 0x0:Y[Yy(0x21b)])!==null&&l!==void 0x0?l:[]),C=Y['required']||[];if(S[Yy(0x28e)]>0x0)for(const o of S){const e=k[Yy(0x2ef)](o);if(k[Yy(0x28e)]>0x0&&!_[Yy(0x27e)](X,k[Yy(0x205)]('.')))_['set'](X,k[Yy(0x205)]('.'),{});yield this['propToType'](e,Y[Yy(0x21b)][o],X,C[Yy(0x263)](o));}else yield this[Yy(0x254)](k,Object[Yy(0x26c)](Object[Yy(0x26c)]({},Y),{'type':Yy(0x29c)}),X,B);return X;});}[a8n(0x2cd)](Y,k,X,B){return __awaiter(this,void 0x0,void 0x0,function*(){const YR=a8k;if(k&&X)return!![];const l=k?YR(0x279):'Do\x20you\x20want\x20to\x20add\x20more',{addEntry:S}=yield inquirer[YR(0x232)]([{'type':YR(0x2e2),'name':YR(0x267),'message':this['getPathString'](Y,l,k?B:undefined),'default':![]}]);return S;});}[a8n(0x254)](Y,k,X,B){return __awaiter(this,void 0x0,void 0x0,function*(){const Yq=a8k;let l;const S=Y[Yq(0x205)]('.');switch(k===null||k===void 0x0?void 0x0:k[Yq(0x23b)]){case Yq(0x237):{let C=!![];while(yield this['askArrayEntry'](Y,C,B,k===null||k===void 0x0?void 0x0:k[Yq(0x277)])){const j=_[Yq(0x201)](X,S);_[Yq(0x249)](X,S),yield this[Yq(0x254)](Y,k['items'],X);const o=_[Yq(0x201)](X,S);!_[Yq(0x269)](j)?_[Yq(0x2c2)](X,S,[o]):(j['push'](o),_['set'](X,S,j)),C=![];}return l||[];}case Yq(0x282):{return l=yield this[Yq(0x2c8)](k,Y,X,B),l;}case Yq(0x29c):l=(0x0,utils_1['isValidJSON'])(yield this[Yq(0x1fe)](Y,k,B))||undefined;break;case Yq(0x212):case Yq(0x2b1):case Yq(0x248):default:l=yield this[Yq(0x1fe)](Y,k,B,X);break;}return!_[Yq(0x218)](l)&&_[Yq(0x2c2)](X,S,l),l;});}[a8n(0x1fe)](Y,k,X,B){var l;return __awaiter(this,void 0x0,void 0x0,function*(){const YU=a8k,S=Y[Y[YU(0x28e)]-0x1],{defaultValue:defaultValue=(l=k===null||k===void 0x0?void 0x0:k[YU(0x2f0)])!==null&&l!==void 0x0?l:k===null||k===void 0x0?void 0x0:k[YU(0x1ef)],choices:choices=k===null||k===void 0x0?void 0x0:k[YU(0x200)],pagination:C}=yield(0x0,api_helpers_1['fetchResourceList'])(S,this[YU(0x23f)],this[YU(0x2cf)],B,this['pathVars'],Y);let j=YU(0x2b5);if(!_[YU(0x218)](choices)&&choices[YU(0x28e)]>0x0){if(C!==undefined&&C[YU(0x29f)]!==undefined)j=YU(0x2b9);else choices['length']>0x4&&typeof choices[0x0]==='string'?j=YU(0x2a5):j=YU(0x23d);}else{if((k===null||k===void 0x0?void 0x0:k[YU(0x23b)])===YU(0x2b1))j='confirm';else{if((k===null||k===void 0x0?void 0x0:k[YU(0x23b)])===YU(0x248))j=YU(0x2b5);else(k===null||k===void 0x0?void 0x0:k[YU(0x23b)])===YU(0x29c)&&(j=YU(0x1f5));}}let o=X!==![]?!_[YU(0x24b)](defaultValue)?defaultValue:JSON[YU(0x266)](defaultValue):_[YU(0x247)](defaultValue)?defaultValue:YU(0x27f);if(choices)o=o[YU(0x25f)]();_[YU(0x27e)](this[YU(0x2d8)],Y[YU(0x205)]('.'))&&(o=this[YU(0x2d8)][Y[YU(0x205)]('.')]);const e=choices&&X===![]?[YU(0x27f),...choices]:choices,O=(k===null||k===void 0x0?void 0x0:k[YU(0x23b)])===YU(0x248),T=Object[YU(0x26c)]({'type':j,'name':'id','message':this[YU(0x29b)](Y,k),'choices':e,'default':o,'filter':this[YU(0x2a0)](j,X),'validate':this[YU(0x22d)](k,X,O)},C),v=(yield inquirer['prompt']([T]))['id'];if(v===YU(0x27f)||v==='')return undefined;if(O)return parseInt(v,0xa);return v;});}[a8n(0x29b)](Y,k){const YL=a8n,X=(k===null||k===void 0x0?void 0x0:k[YL(0x23b)])!=='boolean'?'What\x20do\x20you\x20want\x20to\x20use\x20as':YL(0x256);return this['getPathString'](Y,X,k===null||k===void 0x0?void 0x0:k[YL(0x277)]);}[a8n(0x283)](){return __awaiter(this,void 0x0,void 0x0,function*(){const Yz=a8k,Y=yield this[Yz(0x23f)][Yz(0x23d)]['projects'][Yz(0x2af)]({})[Yz(0x2b6)](k=>k['data'][Yz(0x276)][Yz(0x24f)](X=>X['id']));return yield this['askForResource'](Yz(0x213),Y);});}[a8n(0x223)](Y,k,X,B){return __awaiter(this,void 0x0,void 0x0,function*(){const YA=a8k,l=X||this[YA(0x23f)]['contextProvider'][YA(0x2e1)]();if(_[YA(0x218)](l))throw new Error(YA(0x292));const S=yield k(l);return yield this[YA(0x250)](Y,S,(B?B+'\x20in\x20':'')+YA(0x214)+l+'\x27');});}[a8n(0x2ec)](Y,k,X,B){return __awaiter(this,void 0x0,void 0x0,function*(){const YD=a8k,l=X||this[YD(0x23f)][YD(0x1e8)][YD(0x2e1)]();if(_[YD(0x218)](l))throw new Error(YD(0x292));const S=yield k(l);return yield this[YD(0x22a)](Y,S,(B?B+YD(0x2aa):'')+YD(0x214)+l+'\x27');});}['askForDomain'](){return __awaiter(this,void 0x0,void 0x0,function*(){const YE=a8k,Y=yield this[YE(0x23f)][YE(0x23d)][YE(0x25b)][YE(0x2af)]({}),k=Y[YE(0x274)][YE(0x25b)]['map'](X=>X[YE(0x268)]);return this['askForResource'](YE(0x1e5),k);});}[a8n(0x2a2)](){return __awaiter(this,void 0x0,void 0x0,function*(){const Yb=a8k,Y=yield this[Yb(0x23f)][Yb(0x23d)][Yb(0x1e9)]['all']({}),k=Y[Yb(0x274)][Yb(0x2d9)]['map'](X=>X['id']);return this['askForResource'](Yb(0x2d9),k);});}[a8n(0x1ff)](Y){const Ya=a8n;this[Ya(0x234)]=Y;}}exports[a8n(0x2a4)]=InquirerHelper;
1
+ 'use strict';const a9f=a9E;(function(E,S){const H=a9E,X=E();while(!![]){try{const u=-parseInt(H(0x271))/0x1+parseInt(H(0x1fe))/0x2+parseInt(H(0x298))/0x3+-parseInt(H(0x278))/0x4*(-parseInt(H(0x24b))/0x5)+parseInt(H(0x2ba))/0x6+parseInt(H(0x205))/0x7*(parseInt(H(0x1f3))/0x8)+-parseInt(H(0x1fa))/0x9;if(u===S)break;else X['push'](X['shift']());}catch(Y){X['push'](X['shift']());}}}(a9c,0xe57ea));var __createBinding=this&&this[a9f(0x249)]||(Object[a9f(0x2a6)]?function(E,S,X,u){const Z=a9f;if(u===undefined)u=X;var Y=Object[Z(0x2b8)](S,X);(!Y||('get'in Y?!S['__esModule']:Y[Z(0x215)]||Y[Z(0x22b)]))&&(Y={'enumerable':!![],'get':function(){return S[X];}}),Object[Z(0x2b5)](E,u,Y);}:function(E,S,X,u){if(u===undefined)u=X;E[u]=S[X];}),__setModuleDefault=this&&this[a9f(0x1d0)]||(Object[a9f(0x2a6)]?function(E,S){const K=a9f;Object[K(0x2b5)](E,'default',{'enumerable':!![],'value':S});}:function(E,S){const t=a9f;E[t(0x1f7)]=S;}),__importStar=this&&this['__importStar']||function(E){const G=a9f;if(E&&E[G(0x1f0)])return E;var S={};if(E!=null){for(var X in E)if(X!==G(0x1f7)&&Object[G(0x20e)]['hasOwnProperty'][G(0x25a)](E,X))__createBinding(S,E,X);}return __setModuleDefault(S,E),S;},__awaiter=this&&this['__awaiter']||function(E,S,X,u){function Y(R){return R instanceof X?R:new X(function(d){d(R);});}return new(X||(X=Promise))(function(R,d){const I=a9E;function w(q){const b=a9E;try{p(u[b(0x285)](q));}catch(B){d(B);}}function U(q){const l=a9E;try{p(u[l(0x1c1)](q));}catch(B){d(B);}}function p(q){const A=a9E;q[A(0x234)]?R(q[A(0x239)]):Y(q[A(0x239)])[A(0x27e)](w,U);}p((u=u[I(0x269)](E,S||[]))['next']());});},__importDefault=this&&this[a9f(0x236)]||function(E){return E&&E['__esModule']?E:{'default':E};};function a9c(){const cD=['Context\x20name\x20already\x20exists.','not\x20completed','input','Aborted.','addon:\x20\x27','project:\x20\x27','pipelines','askForTemplate','yaml','registerPrompt','retry','apply','ask','askForAddonRestore','boolean','volume','validate','getInnerType','project','1852653wQgJQa','must\x20be\x20bigger\x20than\x20or\x20equal\x20to\x20','override','chalk','nextPageCursor','service\x20containers','prompt','124VrAwZI','set','blue','toString','js-yaml','includes','then','unset','askForProjectScopedResourcePaginated','confirm','domain','opt','askForResourcePaginated','next','templateRuns','main-context','services','Something\x20unexpected\x20happened.','.*\x5c.(json|yaml|yml)$','askArrayEntry','containers','maximum','tokenPrompt','Choose\x20the\x20','WARNING:\x20You\x20are\x20about\x20to\x20delete\x20','jobs','editedResult','No,\x20repeat','get','./pagination/inquirer-pagination-prompt','No,\x20edit','saveFile','3413844cnPaik','for\x20this\x20','don\x27t\x20change','object','slice','askForTemplateRun','minimum','must\x20be\x20smaller\x20than\x20or\x20equal\x20to\x20','filter','addons','underline','length','oneOf','test','create','fetchResourceList','EDIT','red','loginPrompt','safeDump','has','job:\x20\x27','No,\x20abort','credentials','backups','askForCredentials','template\x20run','\x20Example:\x20','a\x20Northflank\x20resource','defineProperty','safeLoad','whiteBright','getOwnPropertyDescriptor','service:\x20\x27','10943802iHToOd','\x20(full\x20domain:\x20','pathVars','addEntry','properties','must\x20be\x20shorter\x20than\x20or\x20equal\x20to\x20','REPEAT','editor','minLength','ABORT','retrievePayloadViaInteractiveCli','\x20type?','getCurrentProjectName','map','./api-helpers','Provide\x20a\x20file\x20path\x20to\x20write\x20the\x20configuration\x20to\x20(<name>.[json|yaml|yml])','tmpCmdPath','templates','yml','service\x20build','\x20characters','anyOf','nextCursor','askForAddonBackup','assign','job','isArray','logSinks','bold','pagination-prompt','throw','subdomain','No\x20','description','Go\x20to\x20editor','\x20(completedAt:\x20','yellowBright','pipeline','Do\x20you\x20want\x20to\x20add\x20more','\x20(startedAt:\x20','askForResource','\x27\x20already\x20exists.\x20Do\x20you\x20want\x20to\x20override\x20this\x20context\x20(y)\x20or\x20enter\x20a\x20new\x20name\x20(N)?','name','inquirer-search-list','unshift','__setModuleDefault','reset','askForClusterId','find','deleteWarningPrompt','message','clusters','\x20and\x20it\x20','choice','backup\x20destination','apiClient','tag','search-list','isUndefined','builds','doesn\x27t\x20match\x20pattern\x20\x27','\x20in\x20','getQuestionString','backup','askForProjectScopedResource','confirmationPrompt','askForDomain','all-builds','askForSubdomain','Template\x20id\x20not\x20provided.','lodash','No\x20containers\x20found','Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.','addon','SAVE','max','createdAt','__esModule','subdomains','bgGrey','4424FEYsVg','integer','domain\x20(','blueBright','default','maxLength','token','24705918YOeSBb','greenBright','example','.\x20This\x20is\x20irreversible.\x20Please\x20confirm!','1100792oCCaFC','isValidJSON','all','pattern','cursor','array','pagination','12229HbEsPB','askForJobRun','must\x20be\x20longer\x20than\x20or\x20equal\x20to\x20','askForAddon','type','projects','askForVolume','resultCache','runs','prototype','Enter\x20the\x20','all-containers','uri','askForPipeline','YES','charAt','writable','editPayload','\x20characters,\x20is\x20','cmdPath','askForLogSink','stringify','success','volumes','askForProject','DynamicReloadPaginationPrompt','push','propToType','Yes,\x20send','askGeneric','Do\x20you\x20want\x20to\x20add','password','askConfirm','required','getPathString','pop','askForBuild','string','configurable','json','skipValidation','backupDestinations','service','template','askForSecret','join','askForService','done','list','__importDefault','all-job-runs','elements','value','What\x27s\x20the\x20','trim','job\x20runs','completedAt','tags','warning','values','writeFileSync','startedAt','Choose\x20the\x20login\x20token:','registryCredentials','contextProvider','data','restores','\x20to\x20use:','__createBinding','defaultPaginationPageSize','170865LrjvpV','setPathVars','confirmation','rawObject','getType','secret','Should\x20it\x20be','secrets','./utils','green','subdomainPath','grey','split','isBoolean','must\x20be\x20a\x20valid\x20non-empty\x20json\x20string','call','found','keys','askForBackupDestination'];a9c=function(){return cD;};return a9c();}Object[a9f(0x2b5)](exports,a9f(0x1f0),{'value':!![]}),exports['InquirerHelper']=void 0x0;const _=__importStar(require(a9f(0x1e9))),chalk_1=__importDefault(require(a9f(0x274))),fs=__importStar(require('fs')),utils_1=require(a9f(0x253)),api_helpers_1=require(a9f(0x1b1)),inquirer_pagination_prompt_1=require(a9f(0x295)),inquirer=require('inquirer'),inquirerSearchList=require(a9f(0x1ce)),yaml=require(a9f(0x27c));function a9E(c,E){const S=a9c();return a9E=function(X,u){X=X-0x1ae;let Y=S[X];return Y;},a9E(c,E);}var ConfirmChoices;(function(E){const T=a9f;E[T(0x213)]=T(0x221),E[T(0x2c0)]=T(0x293),E[T(0x2a8)]=T(0x296),E[T(0x1ed)]='No,\x20but\x20save\x20as\x20file',E[T(0x2c3)]=T(0x2ae);}(ConfirmChoices||(ConfirmChoices={})));class InquirerHelper{constructor(E){const M=a9f;this[M(0x1da)]=E,this['defaultPaginationPageSize']=0x32,this[M(0x216)]=S=>__awaiter(this,void 0x0,void 0x0,function*(){const m=M,{editedResult:X}=yield inquirer[m(0x277)]([{'type':'editor','name':m(0x292),'message':m(0x1c5),'default':yaml[m(0x2ab)](S)}]);return yaml[m(0x2b6)](X);}),this[M(0x297)]=S=>__awaiter(this,void 0x0,void 0x0,function*(){const z=M,X=d=>'Unexpected\x20file\x20type:\x20'+d+',\x20supported\x20types:\x20[json|yaml|yml]';function u(){return __awaiter(this,void 0x0,void 0x0,function*(){const N=a9E;return inquirer[N(0x277)]([{'type':N(0x260),'name':'fileName','message':N(0x1b2),'validate':d=>new RegExp(N(0x28a))[N(0x2a5)](d)?!![]:X(d)}]);});}const {fileName:Y}=yield u(),R=Y[z(0x27b)]()[z(0x257)]('.')[z(0x228)]();try{switch(R){case z(0x22c):(0x0,utils_1['success'])('Configuration\x20file\x20written\x20to\x20'+Y);return fs[z(0x241)](Y,JSON['stringify'](S,null,'\x20\x20'));case z(0x266):case z(0x1b5):(0x0,utils_1[z(0x21b)])('Configuration\x20file\x20written\x20to\x20'+Y);return fs[z(0x241)](Y,yaml[z(0x2ab)](S));default:(0x0,utils_1[z(0x23f)])(X(R));}}catch(d){(0x0,utils_1['warning'])('Writing\x20configuration\x20failed:\x20'+d[z(0x1d5)]);}return undefined;}),this['filter']=(S,X)=>u=>{const J=M,Y=typeof u==='string'?u[J(0x23b)]():u;return X===![]&&Y==='don\x27t\x20change'?'':Y;},this['validate']=(S,X,u)=>Y=>{const O=M;if(this[O(0x22d)]===!![])return!![];const R=[];if(Y===''||Y===O(0x29a)){if(X!==![])R[O(0x21f)]('this\x20option\x20is\x20required,\x20please\x20answer');else return!![];}S[O(0x209)]===O(0x22a)&&!_[O(0x1dd)](S[O(0x201)])&&R[O(0x21f)](new RegExp(S['pattern'])[O(0x2a5)](Y)?!![]:O(0x1df)+S[O(0x201)]+'\x27');S[O(0x209)]==='string'&&!_[O(0x1dd)](S[O(0x2c2)])&&R['push'](Y[O(0x2a3)]>=S[O(0x2c2)]?!![]:O(0x207)+S[O(0x2c2)]+O(0x217)+Y[O(0x2a3)]+'\x20characters');S[O(0x209)]==='string'&&!_[O(0x1dd)](S[O(0x1f8)])&&R[O(0x21f)](Y[O(0x2a3)]<=S[O(0x1f8)]?!![]:O(0x2bf)+S[O(0x1f8)]+'\x20characters,\x20is\x20'+Y[O(0x2a3)]+O(0x1b7));u&&Number['isNaN'](parseInt(Y,0xa))&&R[O(0x21f)]('must\x20be\x20a\x20number,\x20is\x20'+Y);S[O(0x209)]===O(0x1f4)&&!_[O(0x1dd)](S['minimum'])&&R[O(0x21f)](Y>=S[O(0x29e)]?!![]:O(0x272)+S[O(0x29e)]);S[O(0x209)]===O(0x1f4)&&!_[O(0x1dd)](S[O(0x28d)])&&R['push'](Y<=S[O(0x28d)]?!![]:O(0x29f)+S['maximum']);if(S[O(0x209)]===O(0x24e)){const P=(0x0,utils_1[O(0x1ff)])(Y);R['push'](P===![]||_['isEmpty'](P)?O(0x259):!![]);}const d=R[O(0x2a0)](U=>U!==!![]),w=(S===null||S===void 0x0?void 0x0:S[O(0x1fc)])?'\x0a'+chalk_1[O(0x1f7)][O(0x2a9)]('>>')+O(0x2b3)+chalk_1[O(0x1f7)]['whiteBright'](JSON['stringify'](S[O(0x1fc)])):'';return d['length']>0x0?d['join'](chalk_1[O(0x1f7)][O(0x2a2)](O(0x1d7)))+w:!![];},this[M(0x227)]=(S,X,u)=>{const C=M,Y=S[S[C(0x2a3)]-0x1];function R(){const k=C;return S[k(0x29c)](0x0,-0x1)['map'](P=>P[k(0x214)](0x0)['toUpperCase']()+P['slice'](0x1))[k(0x232)]('>');}const d=S[C(0x2a3)]>0x1?chalk_1[C(0x1f7)][C(0x1f2)][C(0x2b7)](R())+':\x20':'',w=u?'\x20('+chalk_1[C(0x1f7)]['blue'](u)+')':'';return chalk_1[C(0x1f7)][C(0x1d1)](''+d+X+'\x20'+chalk_1[C(0x1f7)][C(0x1bf)][C(0x1fb)](Y)+w+'?');},this[M(0x1cb)]=(S,X,u)=>__awaiter(this,void 0x0,void 0x0,function*(){const o=M;if(X[o(0x2a3)]<0x1){const d=u?o(0x299)+u:o(0x25b);throw new Error(o(0x1c3)+S+'\x20'+d+'.');}const Y=o(0x28f)+S+o(0x248),R=X[o(0x2a3)]>0x4?o(0x1dc):o(0x235);return(yield inquirer[o(0x277)]([{'type':R,'name':'name','message':Y,'choices':X}]))[o(0x1cd)];}),this[M(0x284)]=(S,X,u)=>__awaiter(this,void 0x0,void 0x0,function*(){const y=M,{elements:Y,nextCursor:R}=yield X();if(Y['length']<0x1){const P=u?y(0x299)+u:y(0x25b);throw new Error(y(0x1c3)+S+'\x20'+P+'.');}const d=y(0x28f)+S+y(0x248);if(R!==undefined){const U=({nextPageCursor:p})=>__awaiter(this,void 0x0,void 0x0,function*(){const e=y,q=yield X(p);return{'elements':q[e(0x238)],'nextPageCursor':q[e(0x1b9)]};});return(yield inquirer[y(0x277)]([{'type':'pagination-prompt','name':y(0x1cd),'message':d,'choices':Y,'nextPageCursor':R,'loadMore':U}]))[y(0x1cd)];}const w=Y[y(0x2a3)]>0x4?y(0x1dc):y(0x235);return(yield inquirer[y(0x277)]([{'type':w,'name':y(0x1cd),'message':d,'choices':Y}]))['name'];}),this[M(0x222)]=(S,X)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const D=M,u=''+(X?'('+chalk_1['default'][D(0x27a)](X)+')\x20':''),Y=D(0x20f)+chalk_1['default'][D(0x254)](S)+'\x20'+u+'to\x20use:',R=this[D(0x26e)]({'type':'string','required':!![]});return(yield inquirer[D(0x277)]([{'type':D(0x260),'name':D(0x1cd),'message':Y,'validate':R}]))[D(0x1cd)];}),this[M(0x225)]=S=>__awaiter(this,void 0x0,void 0x0,function*(){const x=M;return(yield inquirer[x(0x277)]([{'type':x(0x281),'name':x(0x1cd),'message':S,'default':!![]}]))['name'];}),this[M(0x233)]=S=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const n=M,X=u=>__awaiter(this,void 0x0,void 0x0,function*(){const h=a9E,Y=yield this[h(0x1da)]['list'][h(0x288)][h(0x200)]({'parameters':{'projectId':u}}),R=Y['data'][h(0x288)][h(0x1b0)](d=>d['id']);return R;});return this[n(0x1e3)](n(0x22f),X,S);}),this[M(0x265)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const j=M,S=X=>__awaiter(this,void 0x0,void 0x0,function*(){const s=a9E;var u;const Y=yield this[s(0x1da)]['list'][s(0x1b4)]({'options':{'per_page':this[s(0x24a)],'cursor':X}}),R=Y[s(0x246)][s(0x1b4)][s(0x1b0)](d=>d['id']);return{'elements':R,'nextCursor':(u=Y[s(0x204)])===null||u===void 0x0?void 0x0:u['cursor']};});return this[j(0x284)](j(0x230),S);}),this['askForTag']=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Q=M,S=X=>__awaiter(this,void 0x0,void 0x0,function*(){const a=a9E;var u,Y,R;const d=yield this[a(0x1da)][a(0x235)][a(0x23e)]({'options':{'per_page':this[a(0x24a)],'cursor':X}}),w=(Y=(u=d[a(0x246)][a(0x23e)])===null||u===void 0x0?void 0x0:u[a(0x1b0)](P=>P['id']))!==null&&Y!==void 0x0?Y:[];return{'elements':w,'nextCursor':(R=d[a(0x204)])===null||R===void 0x0?void 0x0:R[a(0x202)]};});return this[Q(0x284)](Q(0x1db),S);}),this[M(0x25d)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const L=M;var S;const X=yield this[L(0x1da)][L(0x235)][L(0x22e)][L(0x200)]({}),u=(S=X[L(0x246)][L(0x22e)][L(0x1b0)](Y=>Y['name']))!==null&&S!==void 0x0?S:[];return this['askForResource'](L(0x1d9),u);}),this[M(0x1d2)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const F=M,S=X=>__awaiter(this,void 0x0,void 0x0,function*(){const W=a9E;var u,Y,R;const d=yield this[W(0x1da)][W(0x235)]['cloud'][W(0x1d6)]({'options':{'per_page':this[W(0x24a)],'cursor':X}}),w=(Y=(u=d[W(0x246)]['clusters'])===null||u===void 0x0?void 0x0:u[W(0x1b0)](P=>P['name']))!==null&&Y!==void 0x0?Y:[];return{'elements':w,'nextCursor':(R=d[W(0x204)])===null||R===void 0x0?void 0x0:R[W(0x202)]};});return this[F(0x284)]('cluster\x20id',S);}),this[M(0x29d)]=S=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const i=M;if(_['isUndefined'](S))throw new Error(i(0x1e8));const X=u=>__awaiter(this,void 0x0,void 0x0,function*(){const v=i;var Y;let R=this['defaultPaginationPageSize'];const d=yield this[v(0x1da)][v(0x235)][v(0x286)]({'parameters':{'templateId':S},'options':{'per_page':R,'cursor':u}}),w=d[v(0x246)][v(0x286)][v(0x1b0)](P=>P['id']+v(0x1ca)+P[v(0x1ef)]+')');return{'elements':w,'nextCursor':(Y=d[v(0x204)])===null||Y===void 0x0?void 0x0:Y['cursor']};});return this[i(0x284)](i(0x2b2),X)[i(0x27e)](u=>u['split']('\x20')[0x0]);}),this[M(0x219)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const c1=M,S=X=>__awaiter(this,void 0x0,void 0x0,function*(){const c0=a9E;var u;let Y=this[c0(0x24a)];const R=yield this[c0(0x1da)]['list']['logSinks']({'options':{'per_page':Y,'cursor':X}}),d=R['data'][c0(0x1be)][c0(0x1b0)](w=>w['id']);return{'elements':d,'nextCursor':(u=R[c0(0x204)])===null||u===void 0x0?void 0x0:u[c0(0x202)]};});return this[c1(0x284)]('log\x20sink',S);}),this[M(0x212)]=S=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const c3=M,X=u=>__awaiter(this,void 0x0,void 0x0,function*(){const c2=a9E,Y=yield this[c2(0x1da)][c2(0x235)][c2(0x264)]['all']({'parameters':{'projectId':u}});return Y[c2(0x246)][c2(0x264)]['map'](R=>R['id']);});return this[c3(0x1e3)](c3(0x1c8),X,S);}),this['askForJob']=S=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const c5=M,X=u=>__awaiter(this,void 0x0,void 0x0,function*(){const c4=a9E,Y=yield this[c4(0x1da)][c4(0x235)]['jobs'][c4(0x200)]({'parameters':{'projectId':u}}),R=Y['data'][c4(0x291)][c4(0x1b0)](d=>d['id']);return R;});return this[c5(0x1e3)]('job',X,S);}),this[M(0x206)]=(S,X,u=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const c6=M,Y=c6(0x237),R=d=>w=>__awaiter(this,void 0x0,void 0x0,function*(){const c7=c6;var P;const U=yield this[c7(0x1da)]['get'][c7(0x1bc)][c7(0x20d)]({'parameters':{'projectId':d,'jobId':S},'options':{'per_page':this[c7(0x24a)],'cursor':w}}),p=U[c7(0x246)]['runs'][c7(0x1b0)](q=>q['id']+c7(0x1ca)+q[c7(0x242)]+')');return u&&p['unshift'](Y),{'elements':p,'nextCursor':(P=U[c7(0x204)])===null||P===void 0x0?void 0x0:P[c7(0x202)]};});return this[c6(0x280)](c6(0x23c),R,X,'job:\x20\x27'+S+'\x27')[c6(0x27e)](d=>{const c8=c6,w=d[c8(0x257)]('\x20')[0x0];if(w===Y)return undefined;return w;});}),this[M(0x229)]=(S,X,u,Y=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const c9=M,R=c9(0x1e6);if(u!==undefined){const d=w=>P=>__awaiter(this,void 0x0,void 0x0,function*(){const cc=c9;var U;const p=yield this[cc(0x1da)][cc(0x294)][cc(0x1bc)][cc(0x1de)]({'parameters':{'projectId':w,'jobId':u},'options':{'per_page':this[cc(0x24a)],'cursor':P}}),q=p['data'][cc(0x1de)][cc(0x1b0)](B=>B['id']+'\x20(startedAt:\x20'+B[cc(0x1ef)]+')');return Y&&q[cc(0x1cf)](R),{'elements':q,'nextCursor':(U=p[cc(0x204)])===null||U===void 0x0?void 0x0:U[cc(0x202)]};});return this[c9(0x280)]('job\x20builds',d,S,c9(0x2ad)+u+'\x27')[c9(0x27e)](w=>{const cE=c9,P=w[cE(0x257)]('\x20')[0x0];if(P===R)return undefined;return P;});}if(X!==undefined){const w=P=>U=>__awaiter(this,void 0x0,void 0x0,function*(){const cS=c9;var p;const q=yield this[cS(0x1da)]['get'][cS(0x22f)]['builds']({'parameters':{'projectId':P,'serviceId':X},'options':{'per_page':this[cS(0x24a)],'cursor':U}}),B=q[cS(0x246)][cS(0x1de)]['map'](V=>V['id']+cS(0x1ca)+V[cS(0x1ef)]+')');if(Y)B['unshift'](R);return{'elements':B,'nextCursor':(p=q[cS(0x204)])===null||p===void 0x0?void 0x0:p[cS(0x202)]};});return this[c9(0x280)](c9(0x1b6),w,S,c9(0x2b9)+u+'\x27')[c9(0x27e)](P=>{const cX=c9,U=P[cX(0x257)]('\x20')[0x0];if(U===R)return undefined;return U;});}throw new Error('No\x20builds\x20found');}),this['askForContainer']=(S,X,u,Y=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const cu=M,R=cu(0x210);if(u!==undefined){const d=w=>P=>__awaiter(this,void 0x0,void 0x0,function*(){const cY=cu;var U,p;const q=yield this[cY(0x1da)]['get'][cY(0x1bc)][cY(0x28c)]({'parameters':{'projectId':w,'jobId':u},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':P}}),B=(U=q[cY(0x246)][cY(0x28c)])!==null&&U!==void 0x0?U:[],V=B===null||B===void 0x0?void 0x0:B['map'](g=>g['name']+'\x20(startedAt:\x20'+g['createdAt']+')');return Y&&V[cY(0x1cf)](R),{'elements':V,'nextCursor':(p=q['pagination'])===null||p===void 0x0?void 0x0:p[cY(0x202)]};});return this[cu(0x280)]('job\x20containers',d,S,cu(0x2ad)+u+'\x27')[cu(0x27e)](w=>{const P=w['split']('\x20')[0x0];if(P===R)return undefined;return P;});}if(X!==undefined){const w=P=>U=>__awaiter(this,void 0x0,void 0x0,function*(){const cR=cu;var p,q;const B=yield this[cR(0x1da)][cR(0x294)][cR(0x22f)][cR(0x28c)]({'parameters':{'projectId':P,'serviceId':X},'options':{'per_page':this[cR(0x24a)],'cursor':U}}),V=(p=B['data']['containers'])!==null&&p!==void 0x0?p:[],g=V[cR(0x1b0)](r=>r['name']+cR(0x1ca)+r[cR(0x1ef)]+')');if(Y)g===null||g===void 0x0?void 0x0:g[cR(0x1cf)](R);return{'elements':g,'nextCursor':(q=B['pagination'])===null||q===void 0x0?void 0x0:q['cursor']};});return this[cu(0x280)](cu(0x276),w,S,'service:\x20\x27'+u+'\x27')[cu(0x27e)](P=>{const U=P['split']('\x20')[0x0];if(U===R)return undefined;return U;});}throw new Error(cu(0x1ea));}),this[M(0x208)]=S=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const cw=M,X=u=>__awaiter(this,void 0x0,void 0x0,function*(){const cd=a9E,Y=yield this['apiClient']['list'][cd(0x2a1)][cd(0x200)]({'parameters':{'projectId':u}});return Y[cd(0x246)]['addons'][cd(0x1b0)](R=>R['id']);});return this[cw(0x1e3)](cw(0x1ec),X,S);}),this[M(0x1ba)]=(S,X)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const cU=M,u=Y=>R=>__awaiter(this,void 0x0,void 0x0,function*(){const cP=a9E;var d;const w=yield this[cP(0x1da)]['get'][cP(0x1ec)][cP(0x2b0)]({'parameters':{'projectId':Y,'addonId':X},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':R}});return{'elements':w[cP(0x246)][cP(0x2b0)][cP(0x1b0)](P=>P['id']+cP(0x1c6)+(P[cP(0x23d)]||cP(0x25f))+')'),'nextCursor':(d=w['pagination'])===null||d===void 0x0?void 0x0:d['cursor']};});return this[cU(0x280)](cU(0x2b0),u,S,cU(0x262)+X+'\x27')[cU(0x27e)](Y=>Y['split']('\x20')[0x0]);}),this[M(0x26b)]=(S,X,u)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const cq=M,Y=R=>d=>__awaiter(this,void 0x0,void 0x0,function*(){const cp=a9E;var w;const P=yield this[cp(0x1da)]['get'][cp(0x1ec)][cp(0x1e2)][cp(0x247)]({'parameters':{'projectId':R,'addonId':X,'backupId':u},'options':{'per_page':this[cp(0x24a)],'cursor':d}});return{'elements':P[cp(0x246)][cp(0x247)][cp(0x1b0)](U=>U['id']+'\x20(completedAt:\x20'+(U[cp(0x23d)]||cp(0x25f))+')'),'nextCursor':(w=P[cp(0x204)])===null||w===void 0x0?void 0x0:w['cursor']};});return this['askForProjectScopedResourcePaginated']('restore',Y,S,'addon:\x20\x27'+X+'\x27')[cq(0x27e)](R=>R[cq(0x257)]('\x20')[0x0]);}),this[M(0x20b)]=S=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const cV=M,X=u=>__awaiter(this,void 0x0,void 0x0,function*(){const cB=a9E;return(yield this[cB(0x1da)]['list'][cB(0x21c)]({'parameters':{'projectId':u}}))['data']['map'](Y=>Y['id']);});return this[cV(0x1e3)](cV(0x26d),X,S);}),this[M(0x231)]=S=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const cr=M,X=u=>__awaiter(this,void 0x0,void 0x0,function*(){const cg=a9E,Y=yield this[cg(0x1da)][cg(0x235)][cg(0x252)][cg(0x200)]({'parameters':{'projectId':u}});return Y['data'][cg(0x252)][cg(0x1b0)](R=>R['id']);});return this[cr(0x1e3)](cr(0x250),X,S);}),this[M(0x1e7)]=S=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const cH=M,X=yield this[cH(0x1da)]['get'][cH(0x282)]({'parameters':{'domain':S}}),u=X['data'][cH(0x1f1)]['map'](R=>R['name']+cH(0x2bb)+R['fullName']+')'),Y=cH(0x1f5)+S+')';return this['askForResource'](cH(0x1c2),u,Y)[cH(0x27e)](R=>R['split']('\x20')[0x0]);}),this['askForSubdomainPath']=(S,X)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const cf=M,u=yield this[cf(0x1da)]['list'][cf(0x1c2)]['path']({'parameters':{'domain':S,'subdomain':X}}),Y=u[cf(0x246)]['paths'][cf(0x1b0)](w=>''+w[cf(0x211)]),R=cf(0x1f5)+S+'),\x20subdomain\x20('+X+')';return this['askForResource'](cf(0x255),Y,R);}),this[M(0x1d4)]=S=>__awaiter(this,void 0x0,void 0x0,function*(){const cZ=M;return(yield inquirer[cZ(0x277)]([{'type':cZ(0x281),'name':cZ(0x24d),'message':chalk_1[cZ(0x1f7)][cZ(0x1c7)](cZ(0x290)+(S||cZ(0x2b4))+cZ(0x1fd)),'default':![]}]))['confirmation'];}),this[M(0x2aa)]=(S,X)=>__awaiter(this,void 0x0,void 0x0,function*(){const cK=M;_[cK(0x1dd)](S['name'])&&(X['length']<=0x0?_[cK(0x279)](S,cK(0x1cd),cK(0x1f7)):yield(0x0,utils_1[cK(0x268)])(0xa)(()=>__awaiter(this,void 0x0,void 0x0,function*(){const ct=cK,{name:u}=yield inquirer[ct(0x277)]([{'type':ct(0x260),'name':ct(0x1cd),'message':'Choose\x20the\x20name\x20of\x20the\x20new\x20local\x20context:','default':ct(0x287)}]);if(!S[ct(0x273)]&&X[ct(0x1d3)](Y=>Y[ct(0x1cd)]===u)){const {c:Y}=yield inquirer[ct(0x277)]([{'type':ct(0x281),'name':'c','message':'Context\x20with\x20name\x20\x27'+u+ct(0x1cc),'default':![]}]);if(Y===![])throw new Error(ct(0x25e));_['set'](S,ct(0x273),!![]);}_[ct(0x279)](S,ct(0x1cd),u);})));if(_['isUndefined'](S[cK(0x1f9)])){const u=yield this['tokenPrompt']();_[cK(0x279)](S,cK(0x1f9),u);}return S;}),this[M(0x28e)]=()=>__awaiter(this,void 0x0,void 0x0,function*(){const cG=M,{token:S}=yield inquirer[cG(0x277)]([{'type':cG(0x224),'name':cG(0x1f9),'mask':'*','message':cG(0x243)}]);return S;}),inquirer[M(0x267)]('search-list',inquirerSearchList),inquirer[M(0x267)](M(0x1c0),inquirer_pagination_prompt_1[M(0x21e)]);}[a9f(0x1e4)](E,S){return __awaiter(this,void 0x0,void 0x0,function*(){const cb=a9E,X=yaml[cb(0x2ab)](E),u=_[cb(0x1ee)](X[cb(0x257)]('\x0a')[cb(0x1b0)](d=>d[cb(0x2a3)])),Y=chalk_1['default'][cb(0x256)]('-'['repeat'](u)+'\x0a'),{confirm:R}=yield inquirer['prompt']([{'type':'list','name':cb(0x281),'message':''+chalk_1[cb(0x1f7)][cb(0x1bf)][cb(0x254)]('Please\x20confirm\x20following\x20configuration:\x0a')+Y+chalk_1['default'][cb(0x1f6)](X)+Y,'choices':Object[cb(0x240)](ConfirmChoices)}]);switch(R){case ConfirmChoices[cb(0x213)]:return E;case ConfirmChoices[cb(0x2c3)]:throw new Error(cb(0x261));case ConfirmChoices[cb(0x2c0)]:return this[cb(0x2c4)](S);case ConfirmChoices[cb(0x2a8)]:return this[cb(0x1e4)](yield this['editPayload'](E),S);case ConfirmChoices['SAVE']:yield this[cb(0x297)](E);return this[cb(0x1e4)](E,S);default:throw new Error(cb(0x289));}});}[a9f(0x2c4)](E,S){return __awaiter(this,void 0x0,void 0x0,function*(){const cl=a9E;if((S===null||S===void 0x0?void 0x0:S[cl(0x20c)])!==undefined)this[cl(0x20c)]=S===null||S===void 0x0?void 0x0:S[cl(0x20c)];this['tmpCmdPath']=S===null||S===void 0x0?void 0x0:S[cl(0x218)],this[cl(0x22d)]=S===null||S===void 0x0?void 0x0:S['skipValidation'];const X={};return yield this[cl(0x220)]([],E[cl(0x283)]['body'],X),this[cl(0x20c)]=X,yield this['confirmationPrompt'](X,E);});}['propToType'](E,S,X,u){return __awaiter(this,void 0x0,void 0x0,function*(){const cA=a9E;let Y;if(S[cA(0x2a4)]&&!_[cA(0x2ac)](S,cA(0x2be))){if(S[cA(0x2a4)][cA(0x2a3)]>0x1){const {choice:R}=yield inquirer[cA(0x277)]([{'type':'list','name':cA(0x1d8),'message':'What\x27s\x20the\x20'+(E[E['length']-0x1]||'')+cA(0x1ae),'choices':S[cA(0x2a4)][cA(0x1b0)](d=>{const cI=cA;var w;return(w=d[cI(0x1c4)])!==null&&w!==void 0x0?w:'??';})}]);Y=yield this[cA(0x24f)](E,S['oneOf'][cA(0x1d3)](d=>d[cA(0x1c4)]===R),X,u);}else{const d=S[cA(0x2a4)][0x0];_['set'](d,cA(0x1c4),S['description']),Y=yield this[cA(0x24f)](E,d,X,u);}Y={};}else{if(S[cA(0x1b8)]&&!_[cA(0x2ac)](S,cA(0x2be))){if(S[cA(0x1b8)][cA(0x2a3)]>0x1){const {choice:w}=yield inquirer[cA(0x277)]([{'type':cA(0x235),'name':cA(0x1d8),'message':cA(0x23a)+(E[E[cA(0x2a3)]-0x1]||'')+cA(0x1ae),'choices':[...S[cA(0x1b8)][cA(0x1b0)](P=>{const cT=cA;var U;return(U=P[cT(0x1c4)])!==null&&U!==void 0x0?U:'??';}),cA(0x29a)]}]);w!==cA(0x29a)&&(Y=yield this[cA(0x24f)](E,S[cA(0x1b8)][cA(0x1d3)](P=>P[cA(0x1c4)]===w),X,u));}else{const P=S['anyOf'][0x0];_[cA(0x279)](P,cA(0x1c4),S['description']),Y=yield this[cA(0x24f)](E,P,X,u);}Y={};}else Y=yield this[cA(0x24f)](E,S,X,u);}return Y;});}['getInnerType'](E,S,X,u){var Y;return __awaiter(this,void 0x0,void 0x0,function*(){const cM=a9E;if(u===![]){const {addEntry:w}=yield inquirer['prompt']([{'type':'confirm','name':cM(0x2bd),'message':this[cM(0x227)](S,cM(0x223),E===null||E===void 0x0?void 0x0:E[cM(0x1c4)]),'default':![]}]);if(!w)return X;}const R=Object[cM(0x25c)]((Y=E===null||E===void 0x0?void 0x0:E[cM(0x2be)])!==null&&Y!==void 0x0?Y:[]),d=E[cM(0x226)]||[];if(R[cM(0x2a3)]>0x0)for(const P of R){const U=S['concat'](P);if(S[cM(0x2a3)]>0x0&&!_[cM(0x2ac)](X,S[cM(0x232)]('.')))_[cM(0x279)](X,S['join']('.'),{});yield this[cM(0x220)](U,E[cM(0x2be)][P],X,d[cM(0x27d)](P));}else yield this[cM(0x24f)](S,Object['assign'](Object[cM(0x1bb)]({},E),{'type':cM(0x24e)}),X,u);return X;});}[a9f(0x28b)](E,S,X,u){return __awaiter(this,void 0x0,void 0x0,function*(){const cm=a9E;if(S&&X)return!![];const Y=S?'Do\x20you\x20want\x20to\x20add':cm(0x1c9),{addEntry:R}=yield inquirer[cm(0x277)]([{'type':cm(0x281),'name':cm(0x2bd),'message':this[cm(0x227)](E,Y,S?u:undefined),'default':![]}]);return R;});}[a9f(0x24f)](E,S,X,u){return __awaiter(this,void 0x0,void 0x0,function*(){const cN=a9E;let Y;const R=E[cN(0x232)]('.');switch(S===null||S===void 0x0?void 0x0:S[cN(0x209)]){case cN(0x203):{let d=!![];while(yield this[cN(0x28b)](E,d,u,S===null||S===void 0x0?void 0x0:S[cN(0x1c4)])){const w=_['get'](X,R);_[cN(0x27f)](X,R),yield this[cN(0x24f)](E,S['items'],X);const P=_[cN(0x294)](X,R);!_[cN(0x1bd)](w)?_[cN(0x279)](X,R,[P]):(w[cN(0x21f)](P),_[cN(0x279)](X,R,w)),d=![];}return Y||[];}case cN(0x29b):{return Y=yield this[cN(0x26f)](S,E,X,u),Y;}case'rawObject':Y=(0x0,utils_1[cN(0x1ff)])(yield this[cN(0x26a)](E,S,u))||undefined;break;case cN(0x22a):case cN(0x26c):case'integer':default:Y=yield this[cN(0x26a)](E,S,u,X);break;}return!_['isUndefined'](Y)&&_[cN(0x279)](X,R,Y),Y;});}[a9f(0x26a)](E,S,X,u){var Y;return __awaiter(this,void 0x0,void 0x0,function*(){const cz=a9E,R=E[E[cz(0x2a3)]-0x1],{defaultValue:defaultValue=(Y=S===null||S===void 0x0?void 0x0:S[cz(0x1fc)])!==null&&Y!==void 0x0?Y:S===null||S===void 0x0?void 0x0:S[cz(0x1f7)],choices:choices=S===null||S===void 0x0?void 0x0:S['enum'],pagination:d}=yield(0x0,api_helpers_1[cz(0x2a7)])(R,this[cz(0x1da)],this[cz(0x1b3)],u,this[cz(0x2bc)],E);let w=cz(0x260);if(!_['isUndefined'](choices)&&choices[cz(0x2a3)]>0x0){if(d!==undefined&&d[cz(0x275)]!==undefined)w=cz(0x1c0);else choices['length']>0x4&&typeof choices[0x0]==='string'?w=cz(0x1dc):w=cz(0x235);}else{if((S===null||S===void 0x0?void 0x0:S[cz(0x209)])===cz(0x26c))w=cz(0x281);else{if((S===null||S===void 0x0?void 0x0:S[cz(0x209)])===cz(0x1f4))w=cz(0x260);else(S===null||S===void 0x0?void 0x0:S['type'])===cz(0x24e)&&(w=cz(0x2c1));}}let P=X!==![]?!_['isObject'](defaultValue)?defaultValue:JSON[cz(0x21a)](defaultValue):_[cz(0x258)](defaultValue)?defaultValue:'don\x27t\x20change';if(choices)P=P[cz(0x27b)]();_[cz(0x2ac)](this[cz(0x20c)],E[cz(0x232)]('.'))&&(P=this[cz(0x20c)][E[cz(0x232)]('.')]);const U=choices&&X===![]?[cz(0x29a),...choices]:choices,p=(S===null||S===void 0x0?void 0x0:S[cz(0x209)])===cz(0x1f4),q=Object[cz(0x1bb)]({'type':w,'name':'id','message':this[cz(0x1e1)](E,S),'choices':U,'default':P,'filter':this['filter'](w,X),'validate':this[cz(0x26e)](S,X,p)},d),B=(yield inquirer[cz(0x277)]([q]))['id'];if(B===cz(0x29a)||B==='')return undefined;if(p)return parseInt(B,0xa);return B;});}[a9f(0x1e1)](E,S){const cJ=a9f,X=(S===null||S===void 0x0?void 0x0:S[cJ(0x209)])!==cJ(0x26c)?'What\x20do\x20you\x20want\x20to\x20use\x20as':cJ(0x251);return this['getPathString'](E,X,S===null||S===void 0x0?void 0x0:S['description']);}[a9f(0x21d)](){return __awaiter(this,void 0x0,void 0x0,function*(){const cO=a9E,E=yield this[cO(0x1da)]['list'][cO(0x20a)]['all']({})['then'](S=>S[cO(0x246)]['projects'][cO(0x1b0)](X=>X['id']));return yield this[cO(0x1cb)](cO(0x270),E);});}[a9f(0x1e3)](E,S,X,u){return __awaiter(this,void 0x0,void 0x0,function*(){const cC=a9E,Y=X||this[cC(0x1da)][cC(0x245)][cC(0x1af)]();if(_['isUndefined'](Y))throw new Error(cC(0x1eb));const R=yield S(Y);return yield this[cC(0x1cb)](E,R,(u?u+cC(0x1e0):'')+cC(0x263)+Y+'\x27');});}[a9f(0x280)](E,S,X,u){return __awaiter(this,void 0x0,void 0x0,function*(){const ck=a9E,Y=X||this['apiClient'][ck(0x245)][ck(0x1af)]();if(_[ck(0x1dd)](Y))throw new Error(ck(0x1eb));const R=yield S(Y);return yield this[ck(0x284)](E,R,(u?u+ck(0x1e0):'')+ck(0x263)+Y+'\x27');});}[a9f(0x1e5)](){return __awaiter(this,void 0x0,void 0x0,function*(){const co=a9E,E=yield this[co(0x1da)]['list']['domains'][co(0x200)]({}),S=E['data']['domains'][co(0x1b0)](X=>X['name']);return this[co(0x1cb)](co(0x282),S);});}[a9f(0x2b1)](){return __awaiter(this,void 0x0,void 0x0,function*(){const cy=a9E,E=yield this[cy(0x1da)][cy(0x235)][cy(0x244)][cy(0x200)]({}),S=E[cy(0x246)]['credentials'][cy(0x1b0)](X=>X['id']);return this['askForResource'](cy(0x2af),S);});}[a9f(0x24c)](E){const ce=a9f;this[ce(0x2bc)]=E;}}exports['InquirerHelper']=InquirerHelper;
@@ -1 +1 @@
1
- 'use strict';const a9f=a9k;(function(Y,k){const P=a9k,X=Y();while(!![]){try{const B=parseInt(P(0x130))/0x1*(parseInt(P(0x131))/0x2)+-parseInt(P(0x149))/0x3*(-parseInt(P(0x121))/0x4)+parseInt(P(0x13a))/0x5*(parseInt(P(0x141))/0x6)+parseInt(P(0x150))/0x7*(parseInt(P(0x128))/0x8)+parseInt(P(0x159))/0x9+-parseInt(P(0x14b))/0xa+-parseInt(P(0x123))/0xb*(parseInt(P(0x14c))/0xc);if(B===k)break;else X['push'](X['shift']());}catch(l){X['push'](X['shift']());}}}(a9Y,0x2cee5));var __createBinding=this&&this[a9f(0x161)]||(Object[a9f(0x148)]?function(Y,X,B,l){const N=a9f;if(l===undefined)l=B;var S=Object[N(0x12b)](X,B);(!S||(N(0x164)in S?!X[N(0x162)]:S[N(0x158)]||S['configurable']))&&(S={'enumerable':!![],'get':function(){return X[B];}}),Object['defineProperty'](Y,l,S);}:function(Y,X,B,l){if(l===undefined)l=B;Y[l]=X[B];}),__setModuleDefault=this&&this[a9f(0x144)]||(Object[a9f(0x148)]?function(Y,k){const K=a9f;Object[K(0x13f)](Y,K(0x166),{'enumerable':!![],'value':k});}:function(Y,k){const r=a9f;Y[r(0x166)]=k;}),__importStar=this&&this[a9f(0x146)]||function(Y){const w=a9f;if(Y&&Y[w(0x162)])return Y;var X={};if(Y!=null){for(var B in Y)if(B!==w(0x166)&&Object[w(0x129)][w(0x14a)]['call'](Y,B))__createBinding(X,Y,B);}return __setModuleDefault(X,Y),X;},__awaiter=this&&this[a9f(0x122)]||function(Y,k,X,B){function l(S){return S instanceof X?S:new X(function(C){C(S);});}return new(X||(X=Promise))(function(S,C){const R=a9k;function j(O){const h=a9k;try{e(B[h(0x142)](O));}catch(T){C(T);}}function o(O){const g=a9k;try{e(B[g(0x15f)](O));}catch(T){C(T);}}function e(O){const y=a9k;O[y(0x15e)]?S(O[y(0x12d)]):l(O[y(0x12d)])[y(0x15d)](j,o);}e((B=B[R(0x143)](Y,k||[]))['next']());});},__importDefault=this&&this[a9f(0x12e)]||function(Y){const q=a9f;return Y&&Y[q(0x162)]?Y:{'default':Y};};Object[a9f(0x13f)](exports,'__esModule',{'value':!![]}),exports[a9f(0x13c)]=void 0x0;const ws_1=__importStar(require('ws')),open_1=__importDefault(require('open')),events_1=require(a9f(0x153));function a9k(Y,k){const X=a9Y();return a9k=function(B,l){B=B-0x11f;let S=X[B];return S;},a9k(Y,k);}class NorthflankApiBrowserLogin extends events_1[a9f(0x167)]{constructor(Y,k=!![],X){const U=a9f;super(),this[U(0x134)]=Y,this['openBrowser']=k,this[U(0x147)]=X,this[U(0x15a)]=U(0x120),this[U(0x12a)]=()=>JSON[U(0x160)]({'type':U(0x137)});}[a9f(0x12f)](){const L=a9f;var Y;const k=this[L(0x134)][L(0x124)]('https:',L(0x12c))[L(0x124)](L(0x157),L(0x132)),X=k+'/v1/cli-login',B=new ws_1[(L(0x166))](X,{'agent':this[L(0x147)]}),l=()=>__awaiter(this,void 0x0,void 0x0,function*(){const A=L;yield new Promise(C=>{const z=a9k;var j;(j=this[z(0x156)])===null||j===void 0x0?void 0x0:j['end'](JSON[z(0x160)]({'type':z(0x133)}),()=>C());}),process[A(0x139)]();}),S=new Promise((C,j)=>{const D=L;var o,O,T;try{this[D(0x156)]=(0x0,ws_1[D(0x11f)])(B),process['on'](D(0x13d),l);}catch(v){j(new Error(D(0x138)+v['message']));}(o=this[D(0x156)])===null||o===void 0x0?void 0x0:o['on'](D(0x15c),F=>{const E=D;var x;const t=JSON[E(0x126)](F[E(0x151)]());switch(t===null||t===void 0x0?void 0x0:t[E(0x125)]){case'init-ack':{const {loginPage:Q}=t;if(Q===undefined){this[E(0x14e)](E(0x152),j);return;}this['openBrowser']&&(0x0,open_1[E(0x166)])(Q)[E(0x163)](n=>{const b=E,M=b(0x136)+n[b(0x14d)];this[b(0x14e)](M,j);});this[E(0x15b)](E(0x168),{'url':Q});break;}case E(0x13b):{const {apiToken:n,contextName:M}=t;if(n===undefined){this['handleError'](E(0x14f),j);return;}(x=this[E(0x156)])===null||x===void 0x0?void 0x0:x['end'](),C({'token':n,'contextName':M}),this[E(0x15a)]=E(0x13e);break;}case E(0x145):{const p='Failure\x20during\x20login:\x20'+(t===null||t===void 0x0?void 0x0:t[E(0x14d)]);this[E(0x14e)](p,j);break;}default:{const d=E(0x135)+JSON[E(0x160)](t);this[E(0x14e)](d,j);}}}),(O=this[D(0x156)])===null||O===void 0x0?void 0x0:O['on'](D(0x140),F=>{const a=D;this['handleError'](a(0x154)+F[a(0x14d)],j);}),(T=this[D(0x156)])===null||T===void 0x0?void 0x0:T['on'](D(0x127),()=>{const Z=D;if(this['status']===Z(0x13e)){}else this[Z(0x14e)](Z(0x165),j);});});return(Y=this[L(0x156)])===null||Y===void 0x0?void 0x0:Y['write'](this['initPackage']()),this['status']=L(0x137),S[L(0x155)](()=>{const c=L;process['removeListener'](c(0x13d),l);});}[a9f(0x14e)](Y,k){const V=a9f;var X,B;k?(X=this[V(0x156)])===null||X===void 0x0?void 0x0:X[V(0x127)](()=>k(new Error(Y))):(B=this[V(0x156)])===null||B===void 0x0?void 0x0:B[V(0x127)](),this['status']=V(0x140);}}exports['NorthflankApiBrowserLogin']=NorthflankApiBrowserLogin;function a9Y(){const m=['22SAptFR','replace','type','parse','end','49304qzQFxG','prototype','initPackage','getOwnPropertyDescriptor','wss:','value','__importDefault','startLogin','14180xLxOYQ','38YpMbFt','ws:','aborted','baseUrl','unable\x20to\x20parse\x20message:\x20','Unable\x20to\x20open\x20browser:\x20','init','Failed\x20to\x20establish\x20connection\x20to\x20command\x20execution\x20proxy:\x20','exit','3145wQwZtX','login-success','NorthflankApiBrowserLogin','SIGINT','success','defineProperty','error','1458FjpPyU','next','apply','__setModuleDefault','login-failure','__importStar','agent','create','354mCZlUc','hasOwnProperty','3337190VlOiIv','2774844wESBmF','message','handleError','Unexpected\x20response,\x20api\x20token\x20missing','63ByDtMI','toString','Unexpected\x20response','events','error\x20happened\x20during\x20browser\x20login:\x20','finally','duplex','http:','writable','2176506vGjLKK','status','emit','data','then','done','throw','stringify','__createBinding','__esModule','catch','get','Login\x20process\x20stopped\x20before\x20completed','default','EventEmitter','browser-opened','createWebSocketStream','idle','8836oQoEJO','__awaiter'];a9Y=function(){return m;};return a9Y();}
1
+ 'use strict';const a10t=a10E;(function(c,E){const K=a10E,S=c();while(!![]){try{const X=-parseInt(K(0xb4))/0x1*(parseInt(K(0xaa))/0x2)+parseInt(K(0xc4))/0x3*(parseInt(K(0x9f))/0x4)+-parseInt(K(0xc7))/0x5+parseInt(K(0x9b))/0x6*(parseInt(K(0xc8))/0x7)+-parseInt(K(0x89))/0x8*(parseInt(K(0x9c))/0x9)+parseInt(K(0x87))/0xa*(-parseInt(K(0xa1))/0xb)+parseInt(K(0x9d))/0xc;if(X===E)break;else S['push'](S['shift']());}catch(u){S['push'](S['shift']());}}}(a10c,0x9ae82));function a10c(){const n=['NorthflankApiBrowserLogin','removeListener','3554QkaCvk','error','error\x20happened\x20during\x20browser\x20login:\x20','exit','data','end','SIGINT','Failure\x20during\x20login:\x20','login-success','startLogin','open','type','done','ws:','call','message','18kBNYoc','replace','handleError','2219305WUvhKN','613291GRDmDz','idle','apply','__importStar','EventEmitter','createWebSocketStream','write','6104180gOxIHp','Login\x20process\x20stopped\x20before\x20completed','3664PSflyk','catch','duplex','Failed\x20to\x20establish\x20connection\x20to\x20command\x20execution\x20proxy:\x20','init-ack','parse','events','default','configurable','wss:','throw','aborted','__importDefault','initPackage','prototype','__setModuleDefault','agent','next','18KrUtbX','14220FwKqna','27442488zbiBOx','openBrowser','722940EAnRrI','writable','22knePbc','emit','Unable\x20to\x20open\x20browser:\x20','baseUrl','__esModule','success','stringify','getOwnPropertyDescriptor','init','344UbDCet','toString','status','Unexpected\x20response,\x20api\x20token\x20missing','login-failure','defineProperty','finally','create'];a10c=function(){return n;};return a10c();}var __createBinding=this&&this['__createBinding']||(Object[a10t(0xb1)]?function(c,E,S,X){const G=a10t;if(X===undefined)X=S;var u=Object[G(0xa8)](E,S);(!u||('get'in u?!E[G(0xa5)]:u[G(0xa0)]||u[G(0x91)]))&&(u={'enumerable':!![],'get':function(){return E[S];}}),Object['defineProperty'](c,X,u);}:function(c,E,S,X){if(X===undefined)X=S;c[X]=E[S];}),__setModuleDefault=this&&this[a10t(0x98)]||(Object['create']?function(c,E){const b=a10t;Object[b(0xaf)](c,b(0x90),{'enumerable':!![],'value':E});}:function(c,E){const l=a10t;c[l(0x90)]=E;}),__importStar=this&&this[a10t(0xcb)]||function(c){const A=a10t;if(c&&c[A(0xa5)])return c;var E={};if(c!=null){for(var S in c)if(S!==A(0x90)&&Object[A(0x97)]['hasOwnProperty'][A(0xc2)](c,S))__createBinding(E,c,S);}return __setModuleDefault(E,c),E;},__awaiter=this&&this['__awaiter']||function(c,E,S,X){function u(Y){return Y instanceof S?Y:new S(function(R){R(Y);});}return new(S||(S=Promise))(function(Y,R){const m=a10E;function d(p){const I=a10E;try{U(X[I(0x9a)](p));}catch(q){R(q);}}function w(p){const T=a10E;try{U(X[T(0x93)](p));}catch(q){R(q);}}function U(p){const M=a10E;p[M(0xc0)]?Y(p['value']):u(p['value'])['then'](d,w);}U((X=X[m(0xca)](c,E||[]))['next']());});},__importDefault=this&&this[a10t(0x95)]||function(c){const N=a10t;return c&&c[N(0xa5)]?c:{'default':c};};Object['defineProperty'](exports,a10t(0xa5),{'value':!![]}),exports[a10t(0xb2)]=void 0x0;const ws_1=__importStar(require('ws')),open_1=__importDefault(require(a10t(0xbe))),events_1=require(a10t(0x8f));function a10E(c,E){const S=a10c();return a10E=function(X,u){X=X-0x87;let Y=S[X];return Y;},a10E(c,E);}class NorthflankApiBrowserLogin extends events_1[a10t(0xcc)]{constructor(c,E=!![],S){const z=a10t;super(),this[z(0xa4)]=c,this['openBrowser']=E,this[z(0x99)]=S,this[z(0xac)]=z(0xc9),this[z(0x96)]=()=>JSON[z(0xa7)]({'type':z(0xa9)});}[a10t(0xbd)](){const J=a10t;var c;const E=this[J(0xa4)][J(0xc5)]('https:',J(0x92))[J(0xc5)]('http:',J(0xc1)),S=E+'/v1/cli-login',X=new ws_1[(J(0x90))](S,{'agent':this['agent']}),u=()=>__awaiter(this,void 0x0,void 0x0,function*(){const C=J;yield new Promise(R=>{const O=a10E;var d;(d=this['duplex'])===null||d===void 0x0?void 0x0:d[O(0xb9)](JSON['stringify']({'type':O(0x94)}),()=>R());}),process[C(0xb7)]();}),Y=new Promise((R,d)=>{const k=J;var w,P,U;try{this[k(0x8b)]=(0x0,ws_1[k(0xcd)])(X),process['on'](k(0xba),u);}catch(p){d(new Error(k(0x8c)+p[k(0xc3)]));}(w=this[k(0x8b)])===null||w===void 0x0?void 0x0:w['on'](k(0xb8),q=>{const o=k;var B;const V=JSON[o(0x8e)](q[o(0xab)]());switch(V===null||V===void 0x0?void 0x0:V[o(0xbf)]){case o(0x8d):{const {loginPage:g}=V;if(g===undefined){this[o(0xc6)]('Unexpected\x20response',d);return;}this[o(0x9e)]&&(0x0,open_1[o(0x90)])(g)[o(0x8a)](r=>{const y=o,H=y(0xa3)+r[y(0xc3)];this[y(0xc6)](H,d);});this[o(0xa2)]('browser-opened',{'url':g});break;}case o(0xbc):{const {apiToken:r,contextName:H}=V;if(r===undefined){this['handleError'](o(0xad),d);return;}(B=this[o(0x8b)])===null||B===void 0x0?void 0x0:B[o(0xb9)](),R({'token':r,'contextName':H}),this['status']=o(0xa6);break;}case o(0xae):{const f=o(0xbb)+(V===null||V===void 0x0?void 0x0:V[o(0xc3)]);this[o(0xc6)](f,d);break;}default:{const Z='unable\x20to\x20parse\x20message:\x20'+JSON[o(0xa7)](V);this['handleError'](Z,d);}}}),(P=this['duplex'])===null||P===void 0x0?void 0x0:P['on'](k(0xb5),q=>{const e=k;this['handleError'](e(0xb6)+q[e(0xc3)],d);}),(U=this[k(0x8b)])===null||U===void 0x0?void 0x0:U['on'](k(0xb9),()=>{const D=k;if(this[D(0xac)]==='success'){}else this[D(0xc6)](D(0x88),d);});});return(c=this['duplex'])===null||c===void 0x0?void 0x0:c[J(0xce)](this[J(0x96)]()),this[J(0xac)]=J(0xa9),Y[J(0xb0)](()=>{const x=J;process[x(0xb3)](x(0xba),u);});}[a10t(0xc6)](c,E){const h=a10t;var S,X;E?(S=this[h(0x8b)])===null||S===void 0x0?void 0x0:S[h(0xb9)](()=>E(new Error(c))):(X=this['duplex'])===null||X===void 0x0?void 0x0:X[h(0xb9)](),this[h(0xac)]=h(0xb5);}}exports['NorthflankApiBrowserLogin']=NorthflankApiBrowserLogin;
@@ -1 +1 @@
1
- 'use strict';const a10u=a10k;(function(Y,k){const I=a10k,X=Y();while(!![]){try{const B=-parseInt(I(0x217))/0x1+parseInt(I(0x261))/0x2+parseInt(I(0x224))/0x3+-parseInt(I(0x252))/0x4*(-parseInt(I(0x228))/0x5)+-parseInt(I(0x262))/0x6+parseInt(I(0x275))/0x7*(parseInt(I(0x1f4))/0x8)+parseInt(I(0x1df))/0x9;if(B===k)break;else X['push'](X['shift']());}catch(l){X['push'](X['shift']());}}}(a10Y,0x54005));function a10k(Y,k){const X=a10Y();return a10k=function(B,l){B=B-0x1d7;let S=X[B];return S;},a10k(Y,k);}function a10Y(){const YS=['__awaiter','280nqSAVg','Id]','Filter\x20log\x20lines\x20to\x20not\x20include\x20this\x20text','yaml','--startTime\x20<timestamp>','--restore\x20--restoreId\x20[restoreId]',',\x20backup\x20id\x20','textIncludes','regexIncludes','stringify','deploymentId','--regexNotIncludes\x20<regex>','askForAddon','--regexIncludes\x20<regex>','done','next','getFormatter','printResponse','data','askForService','length','forward','Get\x20logs\x20generated\x20before\x20this\x20time,\x20','Direction\x20of\x20logs.\x20Ignored\x20when\x20tailing.','regexNotIncludes','../formatting/console-format-helpers','containerId','askForContainer','--duration\x20[duration]','\x20of\x20','-t,\x20--types\x20<types...>','../inquirer-helper','job','value','bold','167418OGIBTn','addon','apiClient','backward','CliLogs','yml','getSeconds','backupId','apply','runId','serviceId','slice','addonBackup','865485nmjvzP','LogType','alias','start','415kmjnaA','restoreId','--project\x20--projectId\x20[projectId]','toUpperCase','default','getLogsCommand','--textIncludes\x20<text>','Element\x20count\x20for\x20this\x20request\x20exceeds\x20the\x20line\x20limit,\x20output\x20was\x20truncated.\x20Cut\x20off\x20at\x20timestamp\x20','getCommand','getCurrentServiceName','toISOString','logs-received','valueOf','pagination','apiContext','Number\x20of\x20lines\x20to\x20return.','json','\x20(exit\x20with\x20','noDefaults','message','tail','Filter\x20log\x20lines\x20to\x20include\x20this\x20text','--run\x20--runId\x20[runId]','hasNextPage','service','askForBuild','customUserAgent','\x20for\x20container\x20','\x20seconds','forEach','buildId','Error\x20while\x20tailing\x20log\x20lines:\x20','logs','getCurrentJobName','askForAddonRestore','getStandardLogCommand','--container\x20--containerId\x20[containerId]','values','-l,\x20--lineLimit\x20[limit]','Filter\x20log\x20lines\x20to\x20match\x20this\x20regular\x20expression','Option','Build\x20to\x20get\x20logs\x20from','15788aCgtAD','>\x20Container\x20logs','getCurrentProjectName','Length\x20of\x20timespan\x20in\x20seconds.\x20Only\x20valid\x20if\x20not\x20both,\x20startTime\x20and\x20endTime\x20are\x20set','conflicts',',\x20from:\x20','details','throw','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','defineProperty','argParser','log','__importDefault','logTail','defaultDurationSeconds','21952uRSWJX','3594342cCWxTF','--backup\x20--backupId\x20[backupId]','build-','charAt','--noDefaults','Log\x20session\x20ended','addonId','\x20--','../utils','Backup\x20to\x20get\x20logs\x20from','--build\x20--buildId\x20[buildId]','Output\x20formatting.\x20Will\x20use\x20advanced\x20formatting\x20by\x20default.','./log-formatter','printInitInfo','askForAddonBackup','description','\x0aDetails:\x20','Container\x20to\x20exec\x20into\x20(logs\x20from\x20all\x20containers\x20will\x20be\x20shown\x20if\x20not\x20specified)','tsHint','65044HSNavt','textNotIncludes','Deployment\x20id,\x20example:\x20my-service-54785f4','-d,\x20--direction\x20<order>',',\x20to:\x20','chalk','InquirerHelper','format','Filter\x20log\x20lines\x20to\x20not\x20match\x20this\x20regular\x20expression','askForJob','1424268dXhKjf','choices','error','Project\x20for\x20logs','setSeconds','\x20for\x20all\x20containers','inquirerHelper','parseDateInput','__esModule','addOption','warning','Job\x20run\x20id,\x20example:\x20162b1977-6636-4000-929b-cc265b862ff0','\x20with\x20live-tailing','askForJobRun','formatLogLine','assign','action','option','-o,\x20--output\x20[output]','Id\x20['];a10Y=function(){return YS;};return a10Y();}var __awaiter=this&&this[a10u(0x1f3)]||function(Y,k,X,B){function l(S){return S instanceof X?S:new X(function(C){C(S);});}return new(X||(X=Promise))(function(S,C){const Y1=a10k;function j(O){const i=a10k;try{e(B[i(0x203)](O));}catch(T){C(T);}}function o(O){const W=a10k;try{e(B[W(0x259)](O));}catch(T){C(T);}}function e(O){const Y0=a10k;O[Y0(0x202)]?S(O['value']):l(O[Y0(0x215)])['then'](j,o);}e((B=B[Y1(0x21f)](Y,k||[]))[Y1(0x203)]());});},__importDefault=this&&this[a10u(0x25e)]||function(Y){return Y&&Y['__esModule']?Y:{'default':Y};};Object[a10u(0x25b)](exports,a10u(0x1e7),{'value':!![]}),exports[a10u(0x21b)]=void 0x0;const js_client_1=require('@northflank/js-client'),chalk_1=__importDefault(require(a10u(0x1da))),utils_1=require(a10u(0x26a)),inquirer_helper_1=require(a10u(0x213)),commander_1=require('commander'),console_format_helpers_1=require(a10u(0x20d)),log_formatter_1=require(a10u(0x26e));class CliLogs{constructor(Y,k){const Y2=a10u;this[Y2(0x236)]=Y,this[Y2(0x260)]=0x708,this[Y2(0x24b)]=(X,B,l,S)=>{const Y3=Y2,C=(0x0,utils_1[Y3(0x230)])(!![])['name']((B?'build-':'')+Y3(0x248))[Y3(0x226)]((B?Y3(0x264):'')+Y3(0x25d))[Y3(0x271)]('Get\x20log\x20for\x20the\x20specified\x20'+X)[Y3(0x1f0)](Y3(0x22a),Y3(0x1e2))[Y3(0x1f0)]('--'+X+Y3(0x269)+X+Y3(0x1f2)+X+Y3(0x1f5),X[Y3(0x265)](0x0)[Y3(0x22b)]()+X[Y3(0x222)](0x1)+'\x20to\x20get\x20logs\x20from')[Y3(0x1f0)](Y3(0x24c),Y3(0x273));if(B)C[Y3(0x1f0)](Y3(0x26c),Y3(0x251));if(X===Y3(0x214))C[Y3(0x1f0)](Y3(0x23e),Y3(0x1ea));if(X===Y3(0x240))C['option']('--deployment\x20--deploymentId\x20[deploymentId]',Y3(0x1d7));if(l)C[Y3(0x1f0)](Y3(0x263),Y3(0x26b));if(S)C[Y3(0x1f0)](Y3(0x1f9),'Restore\x20to\x20get\x20logs\x20from');return!B&&!l&&!S&&C['addOption'](new commander_1['Option'](Y3(0x212),'Which\x20log\x20types\x20to\x20fetch')[Y3(0x1e0)](Object['values'](js_client_1[Y3(0x225)]))),C['option']('-f,\x20--tail','Tail\x20will\x20stream\x20logs\x20in\x20real-time.\x20Session\x20will\x20be\x20kept\x20open.')[Y3(0x1f0)](Y3(0x24e),Y3(0x237))[Y3(0x1f0)](Y3(0x1f8),'Get\x20logs\x20generated\x20after\x20this\x20time,\x20'+utils_1['tsHint'],utils_1[Y3(0x1e6)])[Y3(0x1e8)](new commander_1[(Y3(0x250))]('--endTime\x20<timestamp>',Y3(0x20a)+utils_1[Y3(0x274)])[Y3(0x25c)](utils_1[Y3(0x1e6)])['conflicts'](['tail']))[Y3(0x1f0)](Y3(0x210),Y3(0x255))[Y3(0x1e8)](new commander_1[(Y3(0x250))](Y3(0x1d8),Y3(0x20b))[Y3(0x1e0)]([Y3(0x21a),Y3(0x209)])[Y3(0x256)]([Y3(0x23c)]))['addOption'](new commander_1[(Y3(0x250))](Y3(0x22e),Y3(0x23d))[Y3(0x256)]([Y3(0x276),'regexIncludes',Y3(0x20c)]))[Y3(0x1e8)](new commander_1['Option']('--textNotIncludes\x20<text>',Y3(0x1f6))['conflicts']([Y3(0x1fb),Y3(0x1fc),Y3(0x20c)]))[Y3(0x1e8)](new commander_1[(Y3(0x250))](Y3(0x201),Y3(0x24f))[Y3(0x256)](['textNotIncludes',Y3(0x1fb),Y3(0x20c)]))['addOption'](new commander_1[(Y3(0x250))](Y3(0x1ff),Y3(0x1dd))['conflicts']([Y3(0x276),'regexIncludes',Y3(0x1fb)]))[Y3(0x1f0)](Y3(0x266),Y3(0x25a),![])['addOption'](new commander_1[(Y3(0x250))](Y3(0x1f1),Y3(0x26d))['choices'](Object[Y3(0x24d)]([Y3(0x1dc),Y3(0x238),Y3(0x1f7)]))),C;},this[Y2(0x26f)]=(X,B,l,S)=>{const Y4=Y2,{containerName:C,restoreId:j,backupId:o,quiet:e,tail:O,startTime:T,endTime:v,duration:F}=S;if(e===!![])return;const x=O?Y4(0x239)+chalk_1[Y4(0x22c)][Y4(0x216)]('\x27Ctrl+C\x27')+')':'',t=O?Y4(0x1eb):'',Q=new Date(),n=T!==null&&T!==void 0x0?T:new Date(new Date((v!==null&&v!==void 0x0?v:Q)[Y4(0x234)]())[Y4(0x1e3)]((v!==null&&v!==void 0x0?v:Q)[Y4(0x21d)]()-(F!==null&&F!==void 0x0?F:this[Y4(0x260)]))),M=(v!==null&&v!==void 0x0?v:T!==undefined)?new Date(new Date(T[Y4(0x234)]())[Y4(0x1e3)](T[Y4(0x21d)]()+(F!==null&&F!==void 0x0?F:this['defaultDurationSeconds']))):Q,p=o!==undefined,d=n&&!p?Y4(0x257)+chalk_1[Y4(0x22c)]['bold'](n['toISOString']()):'',P=M&&!p?Y4(0x1d9)+chalk_1['default']['bold'](M[Y4(0x232)]()):'',f=F?',\x20duration:\x20'+F+Y4(0x244):'',N=C?Y4(0x243)+chalk_1['default'][Y4(0x216)](C):p?'':Y4(0x1e4),K=o?Y4(0x1fa)+o:'',r=j?',\x20restore\x20id\x20'+j:'',w=X+'\x20'+chalk_1[Y4(0x22c)]['bold'](B)+K+r+'\x20in\x20project\x20'+chalk_1['default'][Y4(0x216)](l),h=''+d+P+f;console[Y4(0x25d)](Y4(0x253)+t+N+Y4(0x211)+w+h+x+':');},this[Y2(0x204)]=(X,B)=>(l,S)=>{const Y5=Y2;if(!X){if(l[Y5(0x208)]===0x0)console['log']('No\x20logs\x20found\x20for\x20this\x20query.\x20Make\x20sure\x20to\x20select\x20an\x20appropriate\x20time\x20window.');l[Y5(0x245)](C=>(0x0,log_formatter_1[Y5(0x1ed)])(C,B));}else(0x0,console_format_helpers_1[Y5(0x205)])(X,l);(S===null||S===void 0x0?void 0x0:S[Y5(0x23f)])&&(0x0,utils_1[Y5(0x1e9)])(Y5(0x22f)+S['cursor']);},this[Y2(0x219)]=new js_client_1['ApiClient'](Y,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[Y2(0x242)],'agent':k}),this['logsApiClient']=this[Y2(0x219)],this[Y2(0x1e5)]=new inquirer_helper_1[(Y2(0x1db))](this[Y2(0x219)]);}[a10u(0x22d)](Y,k=![],X=![],B=![]){const YB=a10u,l=(T,v)=>__awaiter(this,void 0x0,void 0x0,function*(){const Y6=a10k,F=v[Y6(0x23a)],{apiContext:x,inquirerHelper:t}=this;switch(Y){case Y6(0x240):{const Q=F?undefined:x[Y6(0x231)]();return v[Y6(0x221)]||Q||(yield t[Y6(0x207)](T)());}case Y6(0x214):{const n=F?undefined:x[Y6(0x249)]();return v['jobId']||n||(yield t[Y6(0x1de)](T)());}case Y6(0x218):{return v[Y6(0x268)]||(yield t[Y6(0x200)](T)());}}}),S=(T,v,F)=>__awaiter(this,void 0x0,void 0x0,function*(){const Y7=a10k;if(k)return F[Y7(0x246)]||(yield this[Y7(0x1e5)][Y7(0x241)](T,Y===Y7(0x240)?v:undefined,Y===Y7(0x214)?v:undefined,!![])());return undefined;}),C=(T,v,F)=>__awaiter(this,void 0x0,void 0x0,function*(){const Y8=a10k;if(X||B)return F[Y8(0x21e)]||(yield this[Y8(0x1e5)][Y8(0x270)](T,v)());return undefined;}),j=(T,v,F,x)=>__awaiter(this,void 0x0,void 0x0,function*(){const Y9=a10k;if(B)return x[Y9(0x229)]||(yield this['inquirerHelper'][Y9(0x24a)](T,v,F)());return undefined;}),o=(T,v,F)=>__awaiter(this,void 0x0,void 0x0,function*(){const YY=a10k;if(!k&&F['containerId']!==undefined){if(F['containerId']!==!![])return F[YY(0x20e)];return yield this[YY(0x1e5)][YY(0x20f)](T,Y==='service'?v:undefined,Y===YY(0x214)?v:undefined,!![])();}return undefined;}),e=(T,v,F)=>__awaiter(this,void 0x0,void 0x0,function*(){const Yk=a10k;if(Y===Yk(0x214))return F[Yk(0x220)]||(yield this[Yk(0x1e5)][Yk(0x1ec)](v,T,!![])());return undefined;}),O=(T,v,F)=>__awaiter(this,void 0x0,void 0x0,function*(){const YX=a10k;if(Y===YX(0x240)){if(F['deploymentId']!==!![])return F['deploymentId'];return F[YX(0x1fe)];}return undefined;});return this['getStandardLogCommand'](Y,k,X,B)[YB(0x1ef)](T=>__awaiter(this,void 0x0,void 0x0,function*(){const Yl=YB,{noDefaults:v,projectId:F,quiet:x,tail:t,types:Q,textIncludes:n,textNotIncludes:M,regexIncludes:p,regexNotIncludes:d,direction:P,lineLimit:f,startTime:N,endTime:K,duration:r,output:w}=T;(0x0,utils_1['assertContextExisting'])(this[Yl(0x219)]);const {apiContext:h,inquirerHelper:g,logsApiClient:y}=this,R=v?undefined:h[Yl(0x254)](),q=F||R||(yield g['askForProject']()),U=yield l(q,T),L=yield S(q,U,T),z=yield C(q,U,T),A=yield j(q,U,z,T),D=yield e(q,U,T),E=yield O(q,U,T),b=yield o(q,U,T);if(N&&K&&r)throw new Error('Only\x20two\x20of\x20\x27startTime\x27,\x20\x27endTime\x27\x20and\x20\x27duration\x27\x20can\x20be\x20set.');const a={'projectId':q,'entityId':U},Z={'containerName':b,'types':Q,'textIncludes':n,'textNotIncludes':M,'regexIncludes':p,'regexNotIncludes':d,'lineLimit':f,'startTime':N,'duration':r,'runId':D,'buildId':L,'backupId':z,'restoreId':A,'deploymentId':E,'isBuild':k!==null&&k!==void 0x0?k:![]},c=B?'addonRestore':X?Yl(0x223):Y,V=Object[Yl(0x1ee)](Object[Yl(0x1ee)]({},Z),{'endTime':K,'direction':P});if(!x&&w!==Yl(0x1f7)&&w!==Yl(0x21c)&&w!=='json')this[Yl(0x26f)](Y,U,q,Object[Yl(0x1ee)](Object[Yl(0x1ee)]({},V),T));const m=this['getFormatter'](w,n!==null&&n!==void 0x0?n:p);if(t){const J=yield y[Yl(0x248)][Yl(0x25f)](a,Z,c);J['on'](Yl(0x233),m),J['on'](Yl(0x1e1),H=>(0x0,utils_1[Yl(0x1e1)])(Yl(0x247)+H[Yl(0x23b)])),J['on']('close',()=>console[Yl(0x25d)](Yl(0x267))),yield J[Yl(0x227)]();}else{const H=yield y[Yl(0x248)]['logRange'](a,V,c);if(H[Yl(0x1e1)]){const G=H['error'][Yl(0x258)],s=G?Yl(0x272)+JSON[Yl(0x1fd)](G,null,'\x20'):'';(0x0,utils_1['error'])('Error\x20while\x20fetching\x20log\x20lines:\x20'+H['error'][Yl(0x23b)]+s);}else m(H[Yl(0x206)],H[Yl(0x235)]);}}));}}exports[a10u(0x21b)]=CliLogs;
1
+ 'use strict';const a11F=a11E;(function(c,E){const W=a11E,S=c();while(!![]){try{const X=parseInt(W(0x13f))/0x1+parseInt(W(0x161))/0x2*(parseInt(W(0x163))/0x3)+-parseInt(W(0x1ae))/0x4+-parseInt(W(0x133))/0x5*(parseInt(W(0x182))/0x6)+parseInt(W(0x1a9))/0x7+-parseInt(W(0x19f))/0x8+parseInt(W(0x178))/0x9*(parseInt(W(0x1b7))/0xa);if(X===E)break;else S['push'](S['shift']());}catch(u){S['push'](S['shift']());}}}(a11c,0x543c4));var __awaiter=this&&this[a11F(0x146)]||function(c,E,S,X){function u(Y){return Y instanceof S?Y:new S(function(R){R(Y);});}return new(S||(S=Promise))(function(Y,R){const c0=a11E;function d(p){const i=a11E;try{U(X[i(0x174)](p));}catch(q){R(q);}}function w(p){try{U(X['throw'](p));}catch(q){R(q);}}function U(p){const v=a11E;p[v(0x15c)]?Y(p[v(0x17e)]):u(p[v(0x17e)])[v(0x149)](d,w);}U((X=X['apply'](c,E||[]))[c0(0x174)]());});},__importDefault=this&&this[a11F(0x1bb)]||function(c){const c1=a11F;return c&&c[c1(0x19e)]?c:{'default':c};};Object['defineProperty'](exports,a11F(0x19e),{'value':!![]}),exports[a11F(0x177)]=void 0x0;function a11c(){const cY=['>\x20Container\x20logs','Filter\x20log\x20lines\x20to\x20not\x20match\x20this\x20regular\x20expression','build-','Id]','\x20(exit\x20with\x20','getStandardLogCommand','--textIncludes\x20<text>','getSeconds','Length\x20of\x20timespan\x20in\x20seconds.\x20Only\x20valid\x20if\x20not\x20both,\x20startTime\x20and\x20endTime\x20are\x20set','inquirerHelper','charAt','Restore\x20to\x20get\x20logs\x20from','customUserAgent','next','--startTime\x20<timestamp>','runId','CliLogs','65187VMVfNy','--backup\x20--backupId\x20[backupId]','deploymentId','\x27Ctrl+C\x27','values','--project\x20--projectId\x20[projectId]','value','data','json','forEach','41550TtjjVd','\x20for\x20all\x20containers','getLogsCommand','Project\x20for\x20logs','-d,\x20--direction\x20<order>','logRange','@northflank/js-client','option','start','Which\x20log\x20types\x20to\x20fetch','getCurrentProjectName','addonRestore','Number\x20of\x20lines\x20to\x20return.','logsApiClient','Tail\x20will\x20stream\x20logs\x20in\x20real-time.\x20Session\x20will\x20be\x20kept\x20open.','../inquirer-helper','-o,\x20--output\x20[output]','setSeconds','parseDateInput','Get\x20logs\x20generated\x20before\x20this\x20time,\x20','../utils','logs','tail','printInitInfo','textIncludes','printResponse','restoreId','Direction\x20of\x20logs.\x20Ignored\x20when\x20tailing.','__esModule','3490848nppBRs','Error\x20while\x20fetching\x20log\x20lines:\x20','--build\x20--buildId\x20[buildId]','--run\x20--runId\x20[runId]','--container\x20--containerId\x20[containerId]','\x20of\x20','containerId','buildId',',\x20to:\x20','Error\x20while\x20tailing\x20log\x20lines:\x20','4694746zDqfhm','askForContainer','tsHint','addonBackup','getFormatter','491412vATAGI','\x20for\x20container\x20','Get\x20logs\x20generated\x20after\x20this\x20time,\x20','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','regexNotIncludes','hasNextPage','textNotIncludes','Filter\x20log\x20lines\x20to\x20match\x20this\x20regular\x20expression','askForJobRun','250ROQXCc','--restore\x20--restoreId\x20[restoreId]','forward','Output\x20formatting.\x20Will\x20use\x20advanced\x20formatting\x20by\x20default.','__importDefault','Only\x20two\x20of\x20\x27startTime\x27,\x20\x27endTime\x27\x20and\x20\x27duration\x27\x20can\x20be\x20set.','askForAddonRestore','yaml','commander','default','logTail','--regexNotIncludes\x20<regex>','service','valueOf','Element\x20count\x20for\x20this\x20request\x20exceeds\x20the\x20line\x20limit,\x20output\x20was\x20truncated.\x20Cut\x20off\x20at\x20timestamp\x20','addOption',',\x20restore\x20id\x20','Backup\x20to\x20get\x20logs\x20from','\x0aDetails:\x20','length','-l,\x20--lineLimit\x20[limit]','Job\x20run\x20id,\x20example:\x20162b1977-6636-4000-929b-cc265b862ff0','Get\x20log\x20for\x20the\x20specified\x20','close','error','375GNVaPa','apiClient','details','log','LogType','askForBuild','regexIncludes','addon','\x20seconds','askForJob','-t,\x20--types\x20<types...>','slice','571526dpelMD','Container\x20to\x20exec\x20into\x20(logs\x20from\x20all\x20containers\x20will\x20be\x20shown\x20if\x20not\x20specified)','askForAddonBackup','argParser','\x20--','format','yml','__awaiter','conflicts','job','then','\x20with\x20live-tailing','bold','--noDefaults','--deployment\x20--deploymentId\x20[deploymentId]','--textNotIncludes\x20<text>','cursor','Build\x20to\x20get\x20logs\x20from','assign','addonId','chalk','defaultDurationSeconds','askForProject','--endTime\x20<timestamp>','getCurrentJobName','choices','description','Option','askForService','done','InquirerHelper','noDefaults','toISOString','backward','666gGtITa','Deployment\x20id,\x20example:\x20my-service-54785f4','3eUXtem','-f,\x20--tail','warning',',\x20from:\x20'];a11c=function(){return cY;};return a11c();}const js_client_1=require(a11F(0x188)),chalk_1=__importDefault(require(a11F(0x153))),utils_1=require(a11F(0x196)),inquirer_helper_1=require(a11F(0x191)),commander_1=require(a11F(0x1bf)),console_format_helpers_1=require('../formatting/console-format-helpers'),log_formatter_1=require('./log-formatter');class CliLogs{constructor(c,E){const c2=a11F;this['apiContext']=c,this[c2(0x154)]=0x708,this[c2(0x16c)]=(S,X,u,Y)=>{const c3=c2,R=(0x0,utils_1['getCommand'])(!![])['name']((X?c3(0x169):'')+c3(0x197))['alias']((X?c3(0x169):'')+c3(0x136))[c3(0x159)](c3(0x130)+S)[c3(0x189)](c3(0x17d),c3(0x185))[c3(0x189)]('--'+S+c3(0x143)+S+'Id\x20['+S+c3(0x16a),S[c3(0x171)](0x0)['toUpperCase']()+S[c3(0x13e)](0x1)+'\x20to\x20get\x20logs\x20from')[c3(0x189)](c3(0x1a3),c3(0x140));if(X)R[c3(0x189)](c3(0x1a1),c3(0x150));if(S==='job')R[c3(0x189)](c3(0x1a2),c3(0x12f));if(S===c3(0x1c3))R['option'](c3(0x14d),c3(0x162));if(u)R[c3(0x189)](c3(0x179),c3(0x12b));if(Y)R[c3(0x189)](c3(0x1b8),c3(0x172));return!X&&!u&&!Y&&R['addOption'](new commander_1[(c3(0x15a))](c3(0x13d),c3(0x18b))[c3(0x158)](Object[c3(0x17c)](js_client_1[c3(0x137)]))),R[c3(0x189)](c3(0x164),c3(0x190))[c3(0x189)](c3(0x12e),c3(0x18e))[c3(0x189)](c3(0x175),c3(0x1b0)+utils_1[c3(0x1ab)],utils_1[c3(0x194)])[c3(0x129)](new commander_1[(c3(0x15a))](c3(0x156),c3(0x195)+utils_1[c3(0x1ab)])[c3(0x142)](utils_1[c3(0x194)])[c3(0x147)]([c3(0x198)]))[c3(0x189)]('--duration\x20[duration]',c3(0x16f))['addOption'](new commander_1['Option'](c3(0x186),c3(0x19d))['choices']([c3(0x160),c3(0x1b9)])[c3(0x147)]([c3(0x198)]))['addOption'](new commander_1[(c3(0x15a))](c3(0x16d),'Filter\x20log\x20lines\x20to\x20include\x20this\x20text')[c3(0x147)]([c3(0x1b4),c3(0x139),c3(0x1b2)]))['addOption'](new commander_1[(c3(0x15a))](c3(0x14e),'Filter\x20log\x20lines\x20to\x20not\x20include\x20this\x20text')['conflicts'](['textIncludes',c3(0x139),c3(0x1b2)]))[c3(0x129)](new commander_1[(c3(0x15a))]('--regexIncludes\x20<regex>',c3(0x1b5))[c3(0x147)]([c3(0x1b4),'textIncludes','regexNotIncludes']))['addOption'](new commander_1['Option'](c3(0x1c2),c3(0x168))[c3(0x147)]([c3(0x1b4),c3(0x139),c3(0x19a)]))['option'](c3(0x14c),c3(0x1b1),![])['addOption'](new commander_1[(c3(0x15a))](c3(0x192),c3(0x1ba))[c3(0x158)](Object[c3(0x17c)]([c3(0x144),c3(0x180),'yaml']))),R;},this[c2(0x199)]=(S,X,u,Y)=>{const c4=c2,{containerName:R,restoreId:d,backupId:w,quiet:P,tail:U,startTime:p,endTime:q,duration:B}=Y;if(P===!![])return;const V=U?c4(0x16b)+chalk_1[c4(0x1c0)]['bold'](c4(0x17b))+')':'',g=U?c4(0x14a):'',r=new Date(),H=p!==null&&p!==void 0x0?p:new Date(new Date((q!==null&&q!==void 0x0?q:r)[c4(0x1c4)]())[c4(0x193)]((q!==null&&q!==void 0x0?q:r)[c4(0x16e)]()-(B!==null&&B!==void 0x0?B:this[c4(0x154)]))),f=(q!==null&&q!==void 0x0?q:p!==undefined)?new Date(new Date(p[c4(0x1c4)]())['setSeconds'](p[c4(0x16e)]()+(B!==null&&B!==void 0x0?B:this[c4(0x154)]))):r,Z=w!==undefined,K=H&&!Z?c4(0x166)+chalk_1[c4(0x1c0)][c4(0x14b)](H[c4(0x15f)]()):'',t=f&&!Z?c4(0x1a7)+chalk_1[c4(0x1c0)]['bold'](f[c4(0x15f)]()):'',G=B?',\x20duration:\x20'+B+c4(0x13b):'',b=R?c4(0x1af)+chalk_1[c4(0x1c0)][c4(0x14b)](R):Z?'':c4(0x183),l=w?',\x20backup\x20id\x20'+w:'',A=d?c4(0x12a)+d:'',I=S+'\x20'+chalk_1[c4(0x1c0)][c4(0x14b)](X)+l+A+'\x20in\x20project\x20'+chalk_1[c4(0x1c0)][c4(0x14b)](u),T=''+K+t+G;console[c4(0x136)](c4(0x167)+g+b+c4(0x1a4)+I+T+V+':');},this[c2(0x1ad)]=(S,X)=>(u,Y)=>{const c5=c2;if(!S){if(u[c5(0x12d)]===0x0)console[c5(0x136)]('No\x20logs\x20found\x20for\x20this\x20query.\x20Make\x20sure\x20to\x20select\x20an\x20appropriate\x20time\x20window.');u[c5(0x181)](R=>(0x0,log_formatter_1['formatLogLine'])(R,X));}else(0x0,console_format_helpers_1[c5(0x19b)])(S,u);(Y===null||Y===void 0x0?void 0x0:Y[c5(0x1b3)])&&(0x0,utils_1[c5(0x165)])(c5(0x128)+Y[c5(0x14f)]);},this[c2(0x134)]=new js_client_1['ApiClient'](c,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[c2(0x173)],'agent':E}),this[c2(0x18f)]=this[c2(0x134)],this[c2(0x170)]=new inquirer_helper_1[(c2(0x15d))](this[c2(0x134)]);}[a11F(0x184)](c,E=![],S=![],X=![]){const cX=a11F,u=(p,q)=>__awaiter(this,void 0x0,void 0x0,function*(){const c6=a11E,B=q[c6(0x15e)],{apiContext:V,inquirerHelper:g}=this;switch(c){case c6(0x1c3):{const r=B?undefined:V['getCurrentServiceName']();return q['serviceId']||r||(yield g[c6(0x15b)](p)());}case c6(0x148):{const H=B?undefined:V[c6(0x157)]();return q['jobId']||H||(yield g[c6(0x13c)](p)());}case c6(0x13a):{return q[c6(0x152)]||(yield g['askForAddon'](p)());}}}),Y=(p,q,B)=>__awaiter(this,void 0x0,void 0x0,function*(){const c7=a11E;if(E)return B[c7(0x1a6)]||(yield this[c7(0x170)][c7(0x138)](p,c===c7(0x1c3)?q:undefined,c===c7(0x148)?q:undefined,!![])());return undefined;}),R=(p,q,B)=>__awaiter(this,void 0x0,void 0x0,function*(){const c8=a11E;if(S||X)return B['backupId']||(yield this[c8(0x170)][c8(0x141)](p,q)());return undefined;}),d=(p,q,B,V)=>__awaiter(this,void 0x0,void 0x0,function*(){const c9=a11E;if(X)return V[c9(0x19c)]||(yield this[c9(0x170)][c9(0x1bd)](p,q,B)());return undefined;}),w=(p,q,B)=>__awaiter(this,void 0x0,void 0x0,function*(){const cc=a11E;if(!E&&B[cc(0x1a5)]!==undefined){if(B[cc(0x1a5)]!==!![])return B[cc(0x1a5)];return yield this['inquirerHelper'][cc(0x1aa)](p,c==='service'?q:undefined,c===cc(0x148)?q:undefined,!![])();}return undefined;}),P=(p,q,B)=>__awaiter(this,void 0x0,void 0x0,function*(){const cE=a11E;if(c==='job')return B[cE(0x176)]||(yield this[cE(0x170)][cE(0x1b6)](q,p,!![])());return undefined;}),U=(p,q,B)=>__awaiter(this,void 0x0,void 0x0,function*(){const cS=a11E;if(c===cS(0x1c3)){if(B[cS(0x17a)]!==!![])return B[cS(0x17a)];return B[cS(0x17a)];}return undefined;});return this[cX(0x16c)](c,E,S,X)['action'](p=>__awaiter(this,void 0x0,void 0x0,function*(){const cu=cX,{noDefaults:q,projectId:B,quiet:V,tail:g,types:r,textIncludes:H,textNotIncludes:f,regexIncludes:Z,regexNotIncludes:K,direction:t,lineLimit:G,startTime:b,endTime:l,duration:A,output:I}=p;(0x0,utils_1['assertContextExisting'])(this[cu(0x134)]);const {apiContext:T,inquirerHelper:M,logsApiClient:m}=this,N=q?undefined:T[cu(0x18c)](),z=B||N||(yield M[cu(0x155)]()),J=yield u(z,p),O=yield Y(z,J,p),C=yield R(z,J,p),k=yield d(z,J,C,p),o=yield P(z,J,p),y=yield U(z,J,p),e=yield w(z,J,p);if(b&&l&&A)throw new Error(cu(0x1bc));const D={'projectId':z,'entityId':J},x={'containerName':e,'types':r,'textIncludes':H,'textNotIncludes':f,'regexIncludes':Z,'regexNotIncludes':K,'lineLimit':G,'startTime':b,'duration':A,'runId':o,'buildId':O,'backupId':C,'restoreId':k,'deploymentId':y,'isBuild':E!==null&&E!==void 0x0?E:![]},h=X?cu(0x18d):S?cu(0x1ac):c,n=Object['assign'](Object['assign']({},x),{'endTime':l,'direction':t});if(!V&&I!==cu(0x1be)&&I!==cu(0x145)&&I!=='json')this[cu(0x199)](c,J,z,Object[cu(0x151)](Object['assign']({},n),p));const s=this['getFormatter'](I,H!==null&&H!==void 0x0?H:Z);if(g){const j=yield m['logs'][cu(0x1c1)](D,x,h);j['on']('logs-received',s),j['on']('error',a=>(0x0,utils_1[cu(0x132)])(cu(0x1a8)+a['message'])),j['on'](cu(0x131),()=>console['log']('Log\x20session\x20ended')),yield j[cu(0x18a)]();}else{const a=yield m[cu(0x197)][cu(0x187)](D,n,h);if(a['error']){const Q=a[cu(0x132)][cu(0x135)],L=Q?cu(0x12c)+JSON['stringify'](Q,null,'\x20'):'';(0x0,utils_1[cu(0x132)])(cu(0x1a0)+a[cu(0x132)]['message']+L);}else s(a[cu(0x17f)],a['pagination']);}}));}}function a11E(c,E){const S=a11c();return a11E=function(X,u){X=X-0x128;let Y=S[X];return Y;},a11E(c,E);}exports['CliLogs']=CliLogs;
@@ -1 +1 @@
1
- 'use strict';const a11T=a11k;(function(Y,k){const O=a11k,X=Y();while(!![]){try{const B=parseInt(O(0x1ad))/0x1+parseInt(O(0x19c))/0x2*(-parseInt(O(0x1b2))/0x3)+parseInt(O(0x196))/0x4+-parseInt(O(0x1a9))/0x5*(parseInt(O(0x19b))/0x6)+parseInt(O(0x199))/0x7+parseInt(O(0x19e))/0x8+-parseInt(O(0x1a2))/0x9*(parseInt(O(0x1a7))/0xa);if(B===k)break;else X['push'](X['shift']());}catch(l){X['push'](X['shift']());}}}(a11Y,0x72130));var __importDefault=this&&this[a11T(0x1a1)]||function(Y){const v=a11T;return Y&&Y[v(0x1a4)]?Y:{'default':Y};};Object[a11T(0x1ab)](exports,a11T(0x1a4),{'value':!![]}),exports['formatLogLine']=exports[a11T(0x194)]=void 0x0;const chalk_1=__importDefault(require('chalk'));exports[a11T(0x194)]=[{'color':a11T(0x1a0),'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':a11T(0x1a0),'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':'grey','pattern':/[0-9]{4}\/[0-9]{2}\/[0-9]{2}/i},{'color':a11T(0x1a0),'pattern':/\s\b([0-9]{2}:){1,2}[0-9]{2}\b\s/i},{'color':'bold','pattern':new RegExp(a11T(0x1a6),'i')},{'color':'green','pattern':/(?:\d{1,3}\.){3}\d{1,3}/i},{'color':'green','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':a11T(0x19f),'pattern':/\b(GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH)\b/},{'color':'greenBright','pattern':/\b(successful|success|completed|complete|done)\b/i},{'color':a11T(0x19d),'pattern':/\b(failed|fail|stderr|error|err)\b/i},{'color':a11T(0x1b1),'pattern':/\b(information|info|debug)\b/i},{'color':a11T(0x1af),'pattern':/\b(warning|warn)\b/i},{'color':a11T(0x19f),'pattern':/[0-9a-f]{64}/i},{'color':'blue','pattern':/[0-9a-fA-F]{8}[-]?([0-9a-fA-F]{4}[-]?){3}[0-9a-fA-F]{12}/i}];function a11Y(){const t=['containerId','2135YdnWLZ','reduce','defineProperty','default','394811iScdST','dim','yellow','color','gray','3rYAGQa','bold','defaultLogSyntax','replace','1667516mfwWIL','toISOString','formatLogLine','5410272SyDApl','pattern','2574kWyUzt','1085330epNUxi','red','6057416xYFAxI','blue','grey','__importDefault','27wiawka','log','__esModule','cyan','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','3828890pOoidP'];a11Y=function(){return t;};return a11Y();}const formatLogLine=(Y,k)=>{const F=a11T,X=chalk_1[F(0x1ac)][F(0x1ae)](Y['ts'][F(0x197)]()),B=chalk_1['default'][F(0x1a5)](Y[F(0x1a8)]),S=exports[F(0x194)][F(0x1aa)]((j,o)=>{const x=F;return j[x(0x195)](o[x(0x19a)],e=>o[x(0x1b0)]?chalk_1['default'][o[x(0x1b0)]](e):chalk_1['default'][x(0x1a0)](e));},Y[F(0x1a3)]),C=k?S['replace'](new RegExp(k,'g'),j=>chalk_1[F(0x1ac)][F(0x1b3)](j)):S;console[F(0x1a3)](X+'\x20'+B+'\x20--\x20'+C);};function a11k(Y,k){const X=a11Y();return a11k=function(B,l){B=B-0x194;let S=X[B];return S;},a11k(Y,k);}exports[a11T(0x198)]=formatLogLine;
1
+ 'use strict';function a12E(c,E){const S=a12c();return a12E=function(X,u){X=X-0x139;let Y=S[X];return Y;},a12E(c,E);}const a12U=a12E;(function(c,E){const P=a12E,S=c();while(!![]){try{const X=parseInt(P(0x156))/0x1*(-parseInt(P(0x153))/0x2)+-parseInt(P(0x140))/0x3*(parseInt(P(0x144))/0x4)+-parseInt(P(0x13a))/0x5+parseInt(P(0x13d))/0x6*(parseInt(P(0x13b))/0x7)+-parseInt(P(0x142))/0x8+parseInt(P(0x149))/0x9*(-parseInt(P(0x141))/0xa)+parseInt(P(0x159))/0xb;if(X===E)break;else S['push'](S['shift']());}catch(u){S['push'](S['shift']());}}}(a12c,0xd5973));var __importDefault=this&&this[a12U(0x157)]||function(c){const p=a12U;return c&&c[p(0x146)]?c:{'default':c};};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a12U(0x147)]=exports['defaultLogSyntax']=void 0x0;const chalk_1=__importDefault(require(a12U(0x14f)));function a12c(){const V=['8430WiLZIL','11562304UqoMWi','green','243876aQZVZN','yellow','__esModule','formatLogLine','dim','1872BikSqQ','default','gray','red','replace','grey','chalk','greenBright','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','blue','14BxtYcp','bold','containerId','237266YMgISf','__importDefault','defaultLogSyntax','58638195tpehOx','log','2066750PwObmV','7833rlmFtv','toISOString','4746nuLCUi','color','reduce','81PyIMzf'];a12c=function(){return V;};return a12c();}exports[a12U(0x158)]=[{'color':a12U(0x14e),'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':'grey','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':a12U(0x14e),'pattern':/[0-9]{4}\/[0-9]{2}\/[0-9]{2}/i},{'color':a12U(0x14e),'pattern':/\s\b([0-9]{2}:){1,2}[0-9]{2}\b\s/i},{'color':a12U(0x154),'pattern':new RegExp(a12U(0x151),'i')},{'color':a12U(0x143),'pattern':/(?:\d{1,3}\.){3}\d{1,3}/i},{'color':'green','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':a12U(0x152),'pattern':/\b(GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH)\b/},{'color':a12U(0x150),'pattern':/\b(successful|success|completed|complete|done)\b/i},{'color':a12U(0x14c),'pattern':/\b(failed|fail|stderr|error|err)\b/i},{'color':a12U(0x14b),'pattern':/\b(information|info|debug)\b/i},{'color':a12U(0x145),'pattern':/\b(warning|warn)\b/i},{'color':'blue','pattern':/[0-9a-f]{64}/i},{'color':a12U(0x152),'pattern':/[0-9a-fA-F]{8}[-]?([0-9a-fA-F]{4}[-]?){3}[0-9a-fA-F]{12}/i}];const formatLogLine=(c,E)=>{const q=a12U,S=chalk_1[q(0x14a)][q(0x148)](c['ts'][q(0x13c)]()),X=chalk_1[q(0x14a)]['cyan'](c[q(0x155)]),u=exports[q(0x158)][q(0x13f)]((R,d)=>{const B=q;return R['replace'](d['pattern'],w=>d[B(0x13e)]?chalk_1[B(0x14a)][d[B(0x13e)]](w):chalk_1[B(0x14a)][B(0x14e)](w));},c[q(0x139)]),Y=E?u[q(0x14d)](new RegExp(E,'g'),R=>chalk_1[q(0x14a)][q(0x154)](R)):u;console[q(0x139)](S+'\x20'+X+'\x20--\x20'+Y);};exports['formatLogLine']=formatLogLine;