@northflank/cli 0.10.6 → 0.10.7

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';const a5f=a5g;(function(O,g){const H=a5g,R=O();while(!![]){try{const Y=-parseInt(H(0xec))/0x1+-parseInt(H(0xeb))/0x2+parseInt(H(0xad))/0x3+parseInt(H(0xb2))/0x4*(parseInt(H(0xda))/0x5)+-parseInt(H(0xc3))/0x6*(-parseInt(H(0xd2))/0x7)+parseInt(H(0xaa))/0x8+-parseInt(H(0x98))/0x9;if(Y===g)break;else R['push'](R['shift']());}catch(y){R['push'](R['shift']());}}}(a5O,0xd8f40));function a5O(){const B=['Error\x20occured\x20during\x20','(only\x20applicable\x20for\x20custom\x20addon\x20types)\x20','alias','Project\x20for\x20exec','service','default','customUserAgent','InquirerHelper','\x0a\x20\x20Single\x20command,\x20no\x20shell:\x20\x20\x20\x20\x20northflank\x20exec\x20','Command\x20execution\x20(exec)\x20for\x20Northflank\x20services\x20and\x20jobs.','--cmd\x20--command\x20[COMMAND]','toUpperCase','execCmd','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.','addCommand','--noDefaults','execStartLog','shell\x20command\x20','assertContextExisting','--container\x20--containerName\x20[NAME]','with\x20user:','.\x0aExamples:\x0a\x20\x20Shell\x20session:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20northflank\x20exec\x20','stdin','\x20--','--user\x20[USER]','stdout','\x20on\x20instance\x20','__awaiter','getTerminalSize','execJobSession','option','greenBright','instanceName','stdOut','action','message','18676089hzRohx','rows','(exit\x20with\x20two\x20quick\x20','name','Instance\x20to\x20exec\x20into\x20','log','Command\x20completed\x20successfully,\x20exit\x20code:\x20','pipe','next','Container\x20within\x20instance\x20to\x20exec\x20into\x20(if\x20not\x20specified,\x20first\x20container\x20of\x20the\x20instance\x20will\x20be\x20selected)','askForAddon','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.','Id\x20[NAME]','exec','Run\x20command\x20with\x20this\x20user','Command\x20didn\x27t\x20complete\x20successfully,\x20status:\x20','bold','__importDefault','6736808dtKRHB','value','Exec\x20','720435GHYpWF','__esModule','\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','defineProperty','with\x20shell\x20session','37204bfRKRD','job','success','handleShellSession','apply','isTTY','exit','filter','@northflank/js-client','join',',\x20exit\x20code:\x20','\x20--shell-cmd\x20\x27sh\x27','getStandardExecCommand','description','error','with\x20group:','getCurrentServiceName','6VwWIJs','exitCode','addon','then','with\x20command\x20\x27','(required)\x20','Command\x20exec\x20for\x20the\x20specified\x20','Success','\x20command\x20exec:\x20','slice','\x20in\x20project\x20','setRawMode','status','../inquirer-helper','columns','7445627PqKkPF','Received\x20Ctrl+D\x20twice,\x20exiting\x20shell\x20forcefully.','apiClient','(random\x20instance\x20will\x20be\x20chosen\x20if\x20not\x20specified)','none','--shell-cmd\x20[SHELL-CMD]','containerName','askForProject','655JpJbiV','getCurrentProjectName','sequence','execServiceSession','Run\x20command\x20with\x20this\x20group','emitKeypressEvents','warning','Unknown','--project\x20--projectId\x20[NAME]','command-exec',',\x20details:\x20','stdIn','\x27Ctrl+D\x27','--group\x20[GROUP]','waitForCommandResult','../utils','\x20to\x20exec\x20into','743578wrKvmD','28788dXCSYE'];a5O=function(){return B;};return a5O();}var __awaiter=this&&this[a5f(0x8f)]||function(O,g,R,Y){function y(n){return n instanceof R?n:new R(function(G){G(n);});}return new(R||(R=Promise))(function(n,G){const Z=a5g;function S(L){const i=a5g;try{V(Y[i(0xa0)](L));}catch(N){G(N);}}function q(L){try{V(Y['throw'](L));}catch(N){G(N);}}function V(e){const A=a5g;e['done']?n(e[A(0xab)]):y(e['value'])[A(0xc6)](S,q);}V((Y=Y[Z(0xb6)](O,g||[]))[Z(0xa0)]());});},__importDefault=this&&this[a5f(0xa9)]||function(O){const c=a5f;return O&&O[c(0xae)]?O:{'default':O};};Object[a5f(0xb0)](exports,a5f(0xae),{'value':!![]}),exports['CliExec']=void 0x0;const js_client_1=require(a5f(0xba)),chalk_1=__importDefault(require('chalk')),utils_1=require(a5f(0xe9)),inquirer_helper_1=require(a5f(0xd0));class CliExec{constructor(O,g){const d=a5f;this['getStandardExecCommand']=G=>{const U=a5g,S=(0x0,utils_1['getCommand'])(!![])[U(0x9b)](G)[U(0xbf)](U(0xc9)+G+(G===U(0xc5)?U(0xee):'')+U(0x89)+G+U(0xf5)+G+'\x20--cmd\x20\x27date\x27\x0a\x20\x20Single\x20command,\x20custom\x20shell:\x20northflank\x20exec\x20'+G+U(0xaf)+G+U(0xbd))['option'](U(0xe2),U(0xf0))['option']('--'+G+U(0x8b)+G+U(0xa4),G['charAt'](0x0)[U(0xf8)]()+G[U(0xcc)](0x1)+U(0xea))[U(0x92)]('--instance\x20--instanceName\x20[NAME]',U(0x9c)+(G==='addon'?U(0xc8):U(0xd5)))[U(0x92)](U(0xd7),U(0xa3))[U(0x92)](U(0x83),'Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.',![])[U(0x92)](U(0xf7),U(0x81));return G!=='addon'&&S[U(0x92)](U(0x8c),U(0xa6))[U(0x92)](U(0xe7),U(0xde)),G===U(0xc5)&&S['option'](U(0x87),U(0xa1)),S;},this[d(0x90)]=()=>({'columns':process[d(0x8d)][d(0xd1)],'rows':process[d(0x8d)][d(0x99)]}),this['execStartLog']=(G,S,q,V,e,L,N,b,E,p)=>{const r=d;if(b===!![])return;const F=V===r(0xd6),m=E!==undefined?r(0x8e)+chalk_1[r(0xf2)]['bold'](E):'',o=p!==undefined?'\x20in\x20container\x20'+chalk_1[r(0xf2)][r(0xa8)](p):'',v=F?'without\x20shell':V===undefined?r(0xb1):r(0x85)+chalk_1['default'][r(0x93)](V),a=e?r(0x88)+e:'',z=L?r(0xc1)+L:'',W=N?r(0xc7)+chalk_1['default'][r(0x93)](N)+'\x27':'',X=[W,v,a,z][r(0xb9)](l=>l!=='')[r(0xbb)]('\x20'),M=r(0x9a)+chalk_1[r(0xf2)][r(0xa8)](r(0xe6))+')';console[r(0x9d)](r(0xac)+G+'\x20'+chalk_1[r(0xf2)][r(0xa8)](S)+r(0xcd)+chalk_1[r(0xf2)][r(0xa8)](q)+m+o+'\x20'+X+'\x20'+M);},this[d(0xb5)]=(G,S,q=![])=>__awaiter(this,void 0x0,void 0x0,function*(){const j=d;var V,e;let L=![];try{if(process[j(0x8a)]['isTTY']){const b=require('readline');b[j(0xdf)](process[j(0x8a)]),process['stdin'][j(0xce)](!![]),process['stdout']['on']('resize',()=>{const t=j;G['resizeTerminal'](this[t(0x90)]());}),process[j(0x8a)]['on']('keypress',(E,p)=>{const Q=j;p[Q(0xdc)]==='\x04'&&(L?(process[Q(0x8a)][Q(0xce)](![]),(0x0,utils_1['warning'])(Q(0xd3)),process[Q(0xb8)]()):(L=!![],setTimeout(()=>L=![],0x190)));});}process[j(0x8a)][j(0x9f)](G[j(0xe5)]),G['stdErr'][j(0x9f)](process['stderr']),G[j(0x95)][j(0x9f)](process[j(0x8d)]),G['on']('error',E=>{const T=j;var p;(0x0,utils_1[T(0xc0)])(T(0xed)+S+T(0xcb)+((p=E['message'])!==null&&p!==void 0x0?p:E)),process[T(0x8a)][T(0xb7)]&&process['stdin'][T(0xce)](![]),process['exit'](-0x1);});const N=yield G[j(0xe8)]();if(q!==!![]){const E=(V=N===null||N===void 0x0?void 0x0:N[j(0xcf)])!==null&&V!==void 0x0?V:j(0xe1),p=(e=N===null||N===void 0x0?void 0x0:N[j(0xc4)])!==null&&e!==void 0x0?e:-0x1,F=(N===null||N===void 0x0?void 0x0:N['message'])?j(0xe4)+N[j(0x97)]:'';E===j(0xca)?(0x0,utils_1[j(0xb4)])(j(0x9e)+p):(0x0,utils_1[j(0xe0)])(j(0xa7)+E+j(0xbc)+p+F);}return N;}finally{process[j(0x8a)][j(0xb7)]&&process[j(0x8a)]['setRawMode'](![]);}}),this[d(0xd4)]=new js_client_1['ApiClient'](O,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[d(0xf3)],'agent':g});const R=new inquirer_helper_1[(d(0xf4))](this[d(0xd4)]);this['execCmd']=(0x0,utils_1['getCommand'])()['name'](d(0xe3))[d(0xef)](d(0xa5))[d(0xbf)](d(0xf6));const Y=this[d(0xbe)](d(0xf1))[d(0x96)](G=>__awaiter(this,void 0x0,void 0x0,function*(){const u=d,{noDefaults:S,projectId:q,serviceId:V,instanceName:L}=G,{shellCmd:N,user:b,group:E,command:p,quiet:F}=G;(0x0,utils_1[u(0x86)])(this['apiClient']);try{const m=S?undefined:O[u(0xdb)](),o=q||m||(yield R[u(0xd9)]()),v=S?undefined:O[u(0xc2)](),a=V||v||(yield R['askForService'](o)()),z=N!==null&&N!==void 0x0?N:p!==undefined?'none':undefined,W=process[u(0x8d)]['columns'],X=process[u(0x8d)]['rows'],M={'projectId':o,'serviceId':a},l={'instanceName':L,'command':p,'shell':z,'user':b,'group':E,'ttyColumns':W,'ttyRows':X},C=yield this[u(0xd4)]['exec'][u(0xdd)](M,l,K=>{const I=u;this[I(0x84)](I(0xf1),a,o,N,b,E,p,F,K[I(0x94)],K[I(0xd8)]);});yield this[u(0xb5)](C,'service',F);}catch(K){(0x0,utils_1[u(0xc0)])(''+K[u(0x97)]);}finally{process[u(0xb8)]();}})),y=this[d(0xbe)](d(0xb3))[d(0x96)](G=>__awaiter(this,void 0x0,void 0x0,function*(){const x=d,{projectId:S,jobId:q,instanceName:V}=G,{noDefaults:L,shellCmd:N,user:b,group:E,command:p,quiet:F}=G;(0x0,utils_1[x(0x86)])(this[x(0xd4)]);try{const m=L?undefined:O['getCurrentProjectName'](),o=S||m||(yield R[x(0xd9)]()),v=q||(yield R['askForJob'](o)()),{rows:a,columns:z}=this[x(0x90)](),W={'projectId':o,'jobId':v},X={'instanceName':V,'command':p,'shell':N,'user':b,'group':E,'ttyColumns':z,'ttyRows':a},M=yield this[x(0xd4)]['exec'][x(0x91)](W,X,l=>{const k=x;this['execStartLog'](k(0xb3),v,o,N,b,E,p,F,l['instanceName'],l[k(0xd8)]);});yield this[x(0xb5)](M,x(0xb3),F);}catch(l){(0x0,utils_1[x(0xc0)])(''+l[x(0x97)]);}finally{process['exit']();}})),n=this[d(0xbe)](d(0xc5))[d(0x96)](G=>__awaiter(this,void 0x0,void 0x0,function*(){const s=d,{projectId:S,addonId:q,instanceName:V,containerName:L}=G,{noDefaults:N,shellCmd:b,user:E,group:p,command:F,quiet:m}=G;(0x0,utils_1[s(0x86)])(this['apiClient']);try{const o=N?undefined:O[s(0xdb)](),v=S||o||(yield R['askForProject']()),a=q||(yield R[s(0xa2)](v)()),{rows:z,columns:W}=this['getTerminalSize'](),X=b!==null&&b!==void 0x0?b:F!==undefined?s(0xd6):undefined,M={'projectId':v,'addonId':a},l={'instanceName':V,'containerName':L,'command':F,'shell':X,'user':E,'group':p,'ttyColumns':W,'ttyRows':z},C=yield this[s(0xd4)][s(0xa5)]['execAddonSession'](M,l,K=>{const P=s;this['execStartLog'](P(0xc5),a,v,X,E,p,F,m,K['instanceName'],K[P(0xd8)]);});yield this[s(0xb5)](C,s(0xc5),m);}catch(K){(0x0,utils_1[s(0xc0)])(''+K['message']);}finally{process[s(0xb8)]();}}));this[d(0xf9)][d(0x82)](Y),this[d(0xf9)][d(0x82)](y),this[d(0xf9)][d(0x82)](n);}}function a5g(O,g){const R=a5O();return a5g=function(Y,y){Y=Y-0x81;let n=R[Y];return n;},a5g(O,g);}exports['CliExec']=CliExec;
1
+ 'use strict';const a5L=a5h;function a5j(){const C=['31150yakNyq','Exec\x20','rows',',\x20exit\x20code:\x20','without\x20shell','@northflank/js-client','\x20to\x20exec\x20into','service','Error\x20occured\x20during\x20','exec','getTerminalSize','Container\x20within\x20instance\x20to\x20exec\x20into\x20(if\x20not\x20specified,\x20first\x20container\x20of\x20the\x20instance\x20will\x20be\x20selected)','\x27Ctrl+D\x27','../inquirer-helper','with\x20command\x20\x27','Unknown','toUpperCase','with\x20group:','--group\x20[GROUP]','askForProject','Received\x20Ctrl+D\x20twice,\x20exiting\x20shell\x20forcefully.',',\x20details:\x20','description','instanceName','customUserAgent','--project\x20--projectId\x20[NAME]','isTTY','(only\x20applicable\x20for\x20custom\x20addon\x20types)\x20','InquirerHelper','chalk','done','getCurrentProjectName','exit','bold','\x20in\x20container\x20','323030EdzQut','Run\x20command\x20with\x20this\x20group','515925ZrFUWd','1600164etErdY','next','action','success','\x0a\x20\x20Single\x20command,\x20no\x20shell:\x20\x20\x20\x20\x20northflank\x20exec\x20','name','\x20--','Project\x20for\x20exec','60puIgtG','--container\x20--containerName\x20[NAME]','none','execCmd','stdOut','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.','\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','\x20in\x20project\x20','stdout','(random\x20instance\x20will\x20be\x20chosen\x20if\x20not\x20specified)','option','Id\x20[NAME]','execAddonSession','11VZUcYp','askForJob','488WEJBLg','addCommand','pipe','setRawMode','resizeTerminal','stdin','5bMsnWn','keypress','Instance\x20to\x20exec\x20into\x20','stdErr','Success','warning','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.','with\x20user:','sequence','apiClient','getCurrentServiceName','containerName','job','--shell-cmd\x20[SHELL-CMD]','Run\x20command\x20with\x20this\x20user','getCommand','(exit\x20with\x20two\x20quick\x20','9067IqUyUf','__awaiter','message','\x20--cmd\x20\x27date\x27\x0a\x20\x20Single\x20command,\x20custom\x20shell:\x20northflank\x20exec\x20','resize','getStandardExecCommand','exitCode','--noDefaults','890778XOTrmV','charAt','greenBright','execJobSession','error','\x20command\x20exec:\x20','value','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','__esModule','defineProperty','addon','handleShellSession','default','log','Command\x20execution\x20(exec)\x20for\x20Northflank\x20services\x20and\x20jobs.','Command\x20exec\x20for\x20the\x20specified\x20','22HvCmya','shell\x20command\x20','CliExec','alias','askForAddon','throw','assertContextExisting','Command\x20didn\x27t\x20complete\x20successfully,\x20status:\x20','.\x0aExamples:\x0a\x20\x20Shell\x20session:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20northflank\x20exec\x20','askForService','execStartLog','execServiceSession','10936eCjfsH','join'];a5j=function(){return C;};return a5j();}(function(j,h){const k=a5h,N=j();while(!![]){try{const F=parseInt(k(0x1ca))/0x1*(-parseInt(k(0x1e2))/0x2)+-parseInt(k(0x21e))/0x3*(parseInt(k(0x1ee))/0x4)+-parseInt(k(0x1b9))/0x5*(-parseInt(k(0x1d2))/0x6)+parseInt(k(0x1f0))/0x7*(parseInt(k(0x1b3))/0x8)+parseInt(k(0x215))/0x9+-parseInt(k(0x213))/0xa*(parseInt(k(0x1b1))/0xb)+-parseInt(k(0x216))/0xc;if(F===h)break;else N['push'](N['shift']());}catch(K){N['push'](N['shift']());}}}(a5j,0x265f3));var __awaiter=this&&this[a5L(0x1cb)]||function(j,h,N,F){function K(G){return G instanceof N?G:new N(function(d){d(G);});}return new(N||(N=Promise))(function(G,d){function x(I){const A=a5h;try{e(F[A(0x217)](I));}catch(X){d(X);}}function m(I){const v=a5h;try{e(F[v(0x1e7)](I));}catch(X){d(X);}}function e(I){const s=a5h;I[s(0x20e)]?G(I[s(0x1d8)]):K(I['value'])['then'](x,m);}e((F=F['apply'](j,h||[]))['next']());});},__importDefault=this&&this['__importDefault']||function(j){const U=a5L;return j&&j[U(0x1da)]?j:{'default':j};};Object[a5L(0x1db)](exports,a5L(0x1da),{'value':!![]}),exports[a5L(0x1e4)]=void 0x0;function a5h(j,h){const N=a5j();return a5h=function(F,K){F=F-0x1ad;let G=N[F];return G;},a5h(j,h);}const js_client_1=require(a5L(0x1f5)),chalk_1=__importDefault(require(a5L(0x20d))),utils_1=require('../utils'),inquirer_helper_1=require(a5L(0x1fd));class CliExec{constructor(j,h){const r=a5L;this[r(0x1cf)]=d=>{const V=r,x=(0x0,utils_1[V(0x1c8)])(!![])[V(0x21b)](d)[V(0x206)](V(0x1e1)+d+(d===V(0x1dc)?V(0x20b):'')+V(0x1ea)+d+V(0x21a)+d+V(0x1cd)+d+V(0x224)+d+'\x20--shell-cmd\x20\x27sh\x27')[V(0x1ae)](V(0x209),V(0x21d))[V(0x1ae)]('--'+d+V(0x21c)+d+V(0x1af),d[V(0x1d3)](0x0)[V(0x200)]()+d['slice'](0x1)+V(0x1f6))['option']('--instance\x20--instanceName\x20[NAME]',V(0x1bb)+(d==='addon'?'(required)\x20':V(0x1ad)))[V(0x1ae)](V(0x1c6),V(0x1bf))['option'](V(0x1d1),V(0x1d9),![])[V(0x1ae)]('--cmd\x20--command\x20[COMMAND]',V(0x223));return d!=='addon'&&x['option']('--user\x20[USER]',V(0x1c7))[V(0x1ae)](V(0x202),V(0x214)),d===V(0x1dc)&&x[V(0x1ae)](V(0x21f),V(0x1fb)),x;},this[r(0x1fa)]=()=>({'columns':process[r(0x226)]['columns'],'rows':process[r(0x226)][r(0x1f2)]}),this[r(0x1ec)]=(d,x,m,P,e,I,X,l,p,J)=>{const f=r;if(l===!![])return;const Q=P===f(0x220),y=p!==undefined?'\x20on\x20instance\x20'+chalk_1['default'][f(0x211)](p):'',D=J!==undefined?f(0x212)+chalk_1[f(0x1de)][f(0x211)](J):'',i=Q?f(0x1f4):P===undefined?'with\x20shell\x20session':f(0x1e3)+chalk_1[f(0x1de)][f(0x1d4)](P),W=e?f(0x1c0)+e:'',E=I?f(0x201)+I:'',t=X?f(0x1fe)+chalk_1[f(0x1de)][f(0x1d4)](X)+'\x27':'',H=[t,i,W,E]['filter'](q=>q!=='')[f(0x1ef)]('\x20'),a=f(0x1c9)+chalk_1[f(0x1de)][f(0x211)](f(0x1fc))+')';console[f(0x1df)](f(0x1f1)+d+'\x20'+chalk_1['default'][f(0x211)](x)+f(0x225)+chalk_1[f(0x1de)][f(0x211)](m)+y+D+'\x20'+H+'\x20'+a);},this['handleShellSession']=(d,x,m=![])=>__awaiter(this,void 0x0,void 0x0,function*(){const O=r;var P,e;let I=![];try{if(process[O(0x1b8)][O(0x20a)]){const l=require('readline');l['emitKeypressEvents'](process[O(0x1b8)]),process[O(0x1b8)]['setRawMode'](!![]),process[O(0x226)]['on'](O(0x1ce),()=>{const z=O;d[z(0x1b7)](this[z(0x1fa)]());}),process['stdin']['on'](O(0x1ba),(p,J)=>{const b=O;J[b(0x1c1)]==='\x04'&&(I?(process[b(0x1b8)][b(0x1b6)](![]),(0x0,utils_1[b(0x1be)])(b(0x204)),process['exit']()):(I=!![],setTimeout(()=>I=![],0x190)));});}process[O(0x1b8)][O(0x1b5)](d['stdIn']),d[O(0x1bc)][O(0x1b5)](process['stderr']),d[O(0x222)][O(0x1b5)](process[O(0x226)]),d['on'](O(0x1d6),p=>{const T=O;var J;(0x0,utils_1[T(0x1d6)])(T(0x1f8)+x+T(0x1d7)+((J=p[T(0x1cc)])!==null&&J!==void 0x0?J:p)),process[T(0x1b8)][T(0x20a)]&&process['stdin'][T(0x1b6)](![]),process[T(0x210)](-0x1);});const X=yield d['waitForCommandResult']();if(m!==!![]){const p=(P=X===null||X===void 0x0?void 0x0:X['status'])!==null&&P!==void 0x0?P:O(0x1ff),J=(e=X===null||X===void 0x0?void 0x0:X[O(0x1d0)])!==null&&e!==void 0x0?e:-0x1,Q=(X===null||X===void 0x0?void 0x0:X[O(0x1cc)])?O(0x205)+X[O(0x1cc)]:'';p===O(0x1bd)?(0x0,utils_1[O(0x219)])('Command\x20completed\x20successfully,\x20exit\x20code:\x20'+J):(0x0,utils_1[O(0x1be)])(O(0x1e9)+p+O(0x1f3)+J+Q);}return X;}finally{process['stdin'][O(0x20a)]&&process[O(0x1b8)][O(0x1b6)](![]);}}),this[r(0x1c2)]=new js_client_1['ApiClient'](j,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[r(0x208)],'agent':h});const N=new inquirer_helper_1[(r(0x20c))](this[r(0x1c2)]);this[r(0x221)]=(0x0,utils_1[r(0x1c8)])()[r(0x21b)]('command-exec')[r(0x1e5)](r(0x1f9))[r(0x206)](r(0x1e0));const F=this[r(0x1cf)]('service')[r(0x218)](d=>__awaiter(this,void 0x0,void 0x0,function*(){const u=r,{noDefaults:x,projectId:m,serviceId:P,instanceName:I}=d,{shellCmd:X,user:l,group:p,command:J,quiet:Q}=d;(0x0,utils_1[u(0x1e8)])(this['apiClient']);try{const y=x?undefined:j[u(0x20f)](),D=m||y||(yield N['askForProject']()),i=x?undefined:j[u(0x1c3)](),W=P||i||(yield N[u(0x1eb)](D)()),E=X!==null&&X!==void 0x0?X:J!==undefined?u(0x220):undefined,t=process[u(0x226)]['columns'],H=process['stdout'][u(0x1f2)],a={'projectId':D,'serviceId':W},q={'instanceName':I,'command':J,'shell':E,'user':l,'group':p,'ttyColumns':t,'ttyRows':H},R=yield this['apiClient']['exec'][u(0x1ed)](a,q,n=>{const Z=u;this[Z(0x1ec)](Z(0x1f7),W,D,X,l,p,J,Q,n[Z(0x207)],n['containerName']);});yield this['handleShellSession'](R,u(0x1f7),Q);}catch(n){(0x0,utils_1[u(0x1d6)])(''+n[u(0x1cc)]);}finally{process[u(0x210)]();}})),K=this[r(0x1cf)]('job')[r(0x218)](d=>__awaiter(this,void 0x0,void 0x0,function*(){const S=r,{projectId:x,jobId:m,instanceName:P}=d,{noDefaults:I,shellCmd:X,user:l,group:p,command:J,quiet:Q}=d;(0x0,utils_1['assertContextExisting'])(this[S(0x1c2)]);try{const y=I?undefined:j[S(0x20f)](),D=x||y||(yield N[S(0x203)]()),i=m||(yield N[S(0x1b2)](D)()),{rows:W,columns:E}=this[S(0x1fa)](),t={'projectId':D,'jobId':i},H={'instanceName':P,'command':J,'shell':X,'user':l,'group':p,'ttyColumns':E,'ttyRows':W},a=yield this['apiClient'][S(0x1f9)][S(0x1d5)](t,H,q=>{const Y=S;this[Y(0x1ec)](Y(0x1c5),i,D,X,l,p,J,Q,q[Y(0x207)],q[Y(0x1c4)]);});yield this['handleShellSession'](a,S(0x1c5),Q);}catch(q){(0x0,utils_1[S(0x1d6)])(''+q[S(0x1cc)]);}finally{process[S(0x210)]();}})),G=this['getStandardExecCommand'](r(0x1dc))[r(0x218)](d=>__awaiter(this,void 0x0,void 0x0,function*(){const M=r,{projectId:x,addonId:m,instanceName:P,containerName:I}=d,{noDefaults:X,shellCmd:l,user:p,group:J,command:Q,quiet:y}=d;(0x0,utils_1[M(0x1e8)])(this[M(0x1c2)]);try{const D=X?undefined:j[M(0x20f)](),i=x||D||(yield N[M(0x203)]()),W=m||(yield N[M(0x1e6)](i)()),{rows:E,columns:t}=this[M(0x1fa)](),H=l!==null&&l!==void 0x0?l:Q!==undefined?'none':undefined,a={'projectId':i,'addonId':W},q={'instanceName':P,'containerName':I,'command':Q,'shell':H,'user':p,'group':J,'ttyColumns':t,'ttyRows':E},R=yield this[M(0x1c2)][M(0x1f9)][M(0x1b0)](a,q,n=>{const w=M;this[w(0x1ec)](w(0x1dc),W,i,H,p,J,Q,y,n['instanceName'],n['containerName']);});yield this[M(0x1dd)](R,'addon',y);}catch(n){(0x0,utils_1[M(0x1d6)])(''+n[M(0x1cc)]);}finally{process[M(0x210)]();}}));this[r(0x221)][r(0x1b4)](F),this[r(0x221)][r(0x1b4)](K),this[r(0x221)]['addCommand'](G);}}exports[a5L(0x1e4)]=CliExec;
@@ -1 +1 @@
1
- 'use strict';const a6l=a6g;(function(O,g){const z=a6g,R=O();while(!![]){try{const Y=-parseInt(z(0x1af))/0x1+-parseInt(z(0x1a0))/0x2*(-parseInt(z(0x1ad))/0x3)+-parseInt(z(0x1bf))/0x4+parseInt(z(0x1b1))/0x5+-parseInt(z(0x1be))/0x6+parseInt(z(0x1a2))/0x7+-parseInt(z(0x1b8))/0x8;if(Y===g)break;else R['push'](R['shift']());}catch(y){R['push'](R['shift']());}}}(a6O,0x61d7f));function a6g(O,g){const R=a6O();return a6g=function(Y,y){Y=Y-0x19f;let n=R[Y];return n;},a6g(O,g);}var __awaiter=this&&this['__awaiter']||function(O,g,R,Y){function y(n){return n instanceof R?n:new R(function(G){G(n);});}return new(R||(R=Promise))(function(n,G){const M=a6g;function S(L){const W=a6g;try{V(Y[W(0x1a4)](L));}catch(N){G(N);}}function q(L){try{V(Y['throw'](L));}catch(N){G(N);}}function V(e){const X=a6g;e[X(0x1aa)]?n(e[X(0x1bc)]):y(e[X(0x1bc)])[X(0x1ae)](S,q);}V((Y=Y[M(0x1ab)](O,g||[]))[M(0x1a4)]());});},__importDefault=this&&this[a6l(0x1b7)]||function(O){const C=a6l;return O&&O[C(0x1ba)]?O:{'default':O};};Object[a6l(0x1a1)](exports,'__esModule',{'value':!![]}),exports[a6l(0x1b0)]=void 0x0;function a6O(){const i=['description','next','log','option','Print\x20command\x20descriptions','--verbose','slice','done','apply','../utils','1018002mCNDLX','then','138351hgZFsW','getCommandOverview','3651400IUnqRL','command-overview','name','Prints\x20a\x20tree\x20view\x20of\x20all\x20available\x20commands','length','every','__importDefault','3455504OXsdQE','commands','__esModule','opts','value','bold','4271670kwnCnR','215764OlndMI','forEach','getCommand','map','default','keys','join','4GyvGbo','defineProperty','2295958BMhRCm'];a6O=function(){return i;};return a6O();}const chalk_1=__importDefault(require('chalk')),utils_1=require(a6l(0x1ac));function getCommandOverview(O){const K=a6l;return(0x0,utils_1[K(0x1c1)])()[K(0x1b3)](K(0x1b2))[K(0x1a3)](K(0x1b4))[K(0x1a6)](K(0x1a8),K(0x1a7))['action'](g=>__awaiter(this,void 0x0,void 0x0,function*(){const {verbose:R}=g;function Y(y,n){const H=a6g;var G;const S=(o,v=!![])=>v?chalk_1[H(0x1c3)][H(0x1bd)]['green'](o[H(0x1b3)]()):o['name'](),q=n[H(0x1b5)]===0x0,V=y[H(0x1b9)];let e='';const L=V[H(0x1b5)]===0x0,N=L||((G=Object[H(0x1c4)](y===null||y===void 0x0?void 0x0:y[H(0x1bb)]()))===null||G===void 0x0?void 0x0:G['length'])>0x0;!q&&(e=V&&!L?'┬\x20':'─\x20');const b=R&&N&&y['description']()?':\x20'+y[H(0x1a3)]():'';console[H(0x1a5)](''+n+e+S(y,N)+b);let E=n;if(!q){const o=n['slice'](-0x2)==='└─';E=n[H(0x1a9)](0x0,-0x2)+(o?'\x20\x20':'│\x20');}const p=E+'├─',F=E+'└─',m=V[H(0x1b6)](v=>v[H(0x1b9)][H(0x1b5)]===0x0);m&&!L&&!R?console[H(0x1a5)](F+'\x20'+V[H(0x1c2)](v=>S(v))[H(0x19f)](',\x20')):V[H(0x1c0)]((v,a)=>{const f=H;Y(v,V[f(0x1b5)]-0x1===a?F:p);});}Y(O,'');}));}exports['getCommandOverview']=getCommandOverview;
1
+ 'use strict';const a6t=a6h;(function(j,h){const E=a6h,N=j();while(!![]){try{const F=parseInt(E(0xc7))/0x1+parseInt(E(0xba))/0x2+-parseInt(E(0xcb))/0x3*(-parseInt(E(0xa7))/0x4)+-parseInt(E(0xc4))/0x5+-parseInt(E(0xb5))/0x6*(-parseInt(E(0xc0))/0x7)+parseInt(E(0xa8))/0x8*(-parseInt(E(0xca))/0x9)+-parseInt(E(0xab))/0xa;if(F===h)break;else N['push'](N['shift']());}catch(K){N['push'](N['shift']());}}}(a6j,0xe6bfa));var __awaiter=this&&this[a6t(0xc8)]||function(j,h,N,F){function K(G){return G instanceof N?G:new N(function(d){d(G);});}return new(N||(N=Promise))(function(G,d){const R=a6h;function x(I){const H=a6h;try{e(F[H(0xb7)](I));}catch(X){d(X);}}function m(I){const a=a6h;try{e(F[a(0xc3)](I));}catch(X){d(X);}}function e(I){const q=a6h;I[q(0xbe)]?G(I[q(0xc5)]):K(I[q(0xc5)])[q(0xae)](x,m);}e((F=F[R(0xb3)](j,h||[]))[R(0xb7)]());});},__importDefault=this&&this[a6t(0xc2)]||function(j){const n=a6t;return j&&j[n(0xb9)]?j:{'default':j};};Object[a6t(0xb0)](exports,a6t(0xb9),{'value':!![]}),exports['getCommandOverview']=void 0x0;const chalk_1=__importDefault(require(a6t(0xb1))),utils_1=require('../utils');function getCommandOverview(j){const k=a6t;return(0x0,utils_1['getCommand'])()[k(0xbc)]('command-overview')['description'](k(0xb6))[k(0xcd)](k(0xad),k(0xbf))[k(0xcc)](h=>__awaiter(this,void 0x0,void 0x0,function*(){const {verbose:N}=h;function F(K,G){const L=a6h;var d;const x=(D,i=!![])=>i?chalk_1[L(0xc1)][L(0xc9)][L(0xa9)](D[L(0xbc)]()):D[L(0xbc)](),m=G[L(0xc6)]===0x0,P=K[L(0xce)];let e='';const I=P[L(0xc6)]===0x0,X=I||((d=Object[L(0xaf)](K===null||K===void 0x0?void 0x0:K[L(0xb2)]()))===null||d===void 0x0?void 0x0:d[L(0xc6)])>0x0;!m&&(e=P&&!I?'┬\x20':'─\x20');const l=N&&X&&K[L(0xa6)]()?':\x20'+K[L(0xa6)]():'';console[L(0xaa)](''+G+e+x(K,X)+l);let p=G;if(!m){const D=G[L(0xac)](-0x2)==='└─';p=G[L(0xac)](0x0,-0x2)+(D?'\x20\x20':'│\x20');}const J=p+'├─',Q=p+'└─',y=P[L(0xbb)](i=>i[L(0xce)]['length']===0x0);y&&!I&&!N?console[L(0xaa)](Q+'\x20'+P['map'](i=>x(i))[L(0xb4)](',\x20')):P[L(0xb8)]((i,W)=>{const A=L;F(i,P[A(0xc6)]-0x1===W?Q:J);});}F(j,'');}));}function a6h(j,h){const N=a6j();return a6h=function(F,K){F=F-0xa6;let G=N[F];return G;},a6h(j,h);}function a6j(){const v=['699052JwsnfL','__awaiter','bold','18WJucHs','288324VZbqvJ','action','option','commands','description','52ulyHJQ','3384048UWGVQa','green','log','26511650oGmOPf','slice','--verbose','then','keys','defineProperty','chalk','opts','apply','join','548856MPwBED','Prints\x20a\x20tree\x20view\x20of\x20all\x20available\x20commands','next','forEach','__esModule','2799844XCwfRa','every','name','getCommandOverview','done','Print\x20command\x20descriptions','98JMfGWK','default','__importDefault','throw','933595dCbpzR','value','length'];a6j=function(){return v;};return a6j();}exports[a6t(0xbd)]=getCommandOverview;
@@ -1 +1 @@
1
- 'use strict';function a7O(){const Z=['safeDump','8sYkXXm','getMinutes','isArrayLike','hasOwnProperty','format','No\x20','handleFormattedOutput','The\x20request\x20was\x20completed\x20successfully','\x20(HTTP\x20status:\x20','1045179suFYtr','7998JJgLyq','create','handleYamlOutput','defineProperty','getDate','printAsTable','__importDefault','getHours','get','includes','bold','yaml','lodash','isEmpty','__createBinding','getSeconds','2yyYivn','createdat','configurable','log','set','prototype','printResponse','543748HmbGHH','isBoolean','writable','5YezcEV','4147mztWmw','updatedat','toString','replace','isUndefined','green','3PTmrRQ','keys','disabled','isObjectLike','internalId','getOwnPropertyDescriptor','js-yaml','default','214319sePNyX','2328456LtHtaK','json','handleJsonOutput','toLowerCase','inspect','91226gyzGLP','stringify','call','chalk','yml','4010EwrElB','getMonth','clone','forEach','columnify','sort','__esModule','consoleFormat','map','isFinite'];a7O=function(){return Z;};return a7O();}const a7F=a7g;(function(O,g){const p=a7g,R=O();while(!![]){try{const Y=parseInt(p(0x1d0))/0x1*(parseInt(p(0x1ef))/0x2)+-parseInt(p(0x1e1))/0x3*(-parseInt(p(0x1d7))/0x4)+-parseInt(p(0x1da))/0x5*(-parseInt(p(0x209))/0x6)+-parseInt(p(0x1e9))/0x7*(-parseInt(p(0x1ff))/0x8)+-parseInt(p(0x208))/0x9+parseInt(p(0x1f4))/0xa*(parseInt(p(0x1db))/0xb)+-parseInt(p(0x1ea))/0xc;if(Y===g)break;else R['push'](R['shift']());}catch(y){R['push'](R['shift']());}}}(a7O,0x18719));var __createBinding=this&&this[a7F(0x1ce)]||(Object[a7F(0x20a)]?function(O,g,R,Y){const m=a7F;if(Y===undefined)Y=R;var y=Object[m(0x1e6)](g,R);(!y||(m(0x211)in y?!g['__esModule']:y[m(0x1d9)]||y[m(0x1d2)]))&&(y={'enumerable':!![],'get':function(){return g[R];}}),Object[m(0x20c)](O,Y,y);}:function(O,g,R,Y){if(Y===undefined)Y=R;O[Y]=g[R];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a7F(0x20a)]?function(O,g){const o=a7F;Object[o(0x20c)](O,o(0x1e8),{'enumerable':!![],'value':g});}:function(O,g){O['default']=g;}),__importStar=this&&this['__importStar']||function(O){const v=a7F;if(O&&O[v(0x1fa)])return O;var g={};if(O!=null){for(var R in O)if(R!==v(0x1e8)&&Object[v(0x1d5)][v(0x202)][v(0x1f1)](O,R))__createBinding(g,O,R);}return __setModuleDefault(g,O),g;},__importDefault=this&&this[a7F(0x20f)]||function(O){return O&&O['__esModule']?O:{'default':O};};Object['defineProperty'](exports,a7F(0x1fa),{'value':!![]}),exports[a7F(0x1d6)]=exports[a7F(0x205)]=exports[a7F(0x20b)]=exports[a7F(0x1ec)]=exports[a7F(0x1fb)]=exports[a7F(0x20e)]=void 0x0;function a7g(O,g){const R=a7O();return a7g=function(Y,y){Y=Y-0x1cd;let n=R[Y];return n;},a7g(O,g);}const chalk_1=__importDefault(require(a7F(0x1f2))),_=__importStar(require(a7F(0x215))),util=__importStar(require('util')),yaml=require(a7F(0x1e7)),columnify=require(a7F(0x1f8));function printAsTable(O,g,R,Y=![],y=0x0){const a=a7F;!Y&&console[a(0x1d3)](''+chalk_1[a(0x1e8)][a(0x213)](g));function n(S){const z=a;return S===z(0x1e3)?S:S[z(0x1de)]('disabled','');}function G(S,q){const X=a;function V(L){const W=a7g,N=new Date(L);return N[W(0x20d)]()+'/'+N[W(0x1f5)]()+'/'+N['getFullYear']()+'\x0a'+N[W(0x210)]()+':'+N[W(0x200)]()+':'+N[W(0x1cf)]();}const e=[X(0x1d1),X(0x1dc)];if(e[X(0x212)](q[X(0x1ed)]())&&_[X(0x1fd)](S)&&S[X(0x1dd)]()['length']===0xd)return V(Number(S));if(_[X(0x1d8)](S)){if(q!==X(0x1e3)&&q[X(0x212)]('disabled'))return S?'x':'✔';return S?'✔':'x';}if(_[X(0x1e4)](S))return util[X(0x1ee)](S,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});return S;}if(_[a(0x201)](O)){O['length']===0x0&&console['log'](a(0x204)+g['toLowerCase']()+'\x20found');const S=O[a(0x1fc)]((e,L)=>{const M=a,N={'i':L+y};return Object[M(0x1e2)](e)[M(0x1f7)](b=>{const l=M;(_[l(0x1df)](R)||R[l(0x212)](b[l(0x1ed)]()))&&_[l(0x1d4)](N,n(b),G(e[b],b));}),N;}),q=_[a(0x1f6)](Object[a(0x1e2)]((S===null||S===void 0x0?void 0x0:S[0x0])||[]))[a(0x1f9)]((e,L)=>{const C=a,N=E=>E!=='i'?E!==C(0x1e5)?0x0:0x1:0x2;return N(L)-N(e);}),V={'maxWidth':0x1e,'preserveNewLines':!![],'showHeaders':!Y,'config':{'_id':{'maxWidth':0x5,'truncate':!![]},'i':{'showHeaders':![]}},'columns':q};console['log'](columnify(S,V));}else console['log'](O);}exports[a7F(0x20e)]=printAsTable;function consoleFormat(O,g){const K=a7F;if(_[K(0x1cd)](O)){const R=g?K(0x207)+g+')':'';return chalk_1['default'][K(0x1e0)](K(0x206))+R;}if(!_['isObjectLike'](O))return O===null||O===void 0x0?void 0x0:O['toString']();return util['inspect'](O,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});}exports[a7F(0x1fb)]=consoleFormat;const handleJsonOutput=(O,g)=>{const H=a7F,R=O===H(0x1eb);if(R)console[H(0x1d3)](JSON[H(0x1f0)](g,null,'\x20'));};exports[a7F(0x1ec)]=handleJsonOutput;const handleYamlOutput=(O,g)=>{const f=a7F,R=O===f(0x214)||O===f(0x1f3);if(R)console['log'](yaml[f(0x1fe)](g));};exports[a7F(0x20b)]=handleYamlOutput;const handleFormattedOutput=(O,g)=>{const i=a7F,R=O===i(0x203);if(R)console[i(0x1d3)](consoleFormat(g));};exports[a7F(0x205)]=handleFormattedOutput;const printResponse=(O,g)=>{const A=a7F;(0x0,exports['handleJsonOutput'])(O,g),(0x0,exports[A(0x20b)])(O,g),(0x0,exports[A(0x205)])(O,g);};exports[a7F(0x1d6)]=printResponse;
1
+ 'use strict';const a7Q=a7h;(function(j,h){const J=a7h,N=j();while(!![]){try{const F=parseInt(J(0x184))/0x1+parseInt(J(0x175))/0x2+-parseInt(J(0x169))/0x3*(-parseInt(J(0x162))/0x4)+parseInt(J(0x15d))/0x5*(-parseInt(J(0x167))/0x6)+-parseInt(J(0x17f))/0x7+parseInt(J(0x163))/0x8+-parseInt(J(0x168))/0x9;if(F===h)break;else N['push'](N['shift']());}catch(K){N['push'](N['shift']());}}}(a7j,0x89b59));var __createBinding=this&&this[a7Q(0x189)]||(Object['create']?function(j,h,N,F){const y=a7Q;if(F===undefined)F=N;var K=Object[y(0x16a)](h,N);(!K||(y(0x173)in K?!h[y(0x165)]:K[y(0x16d)]||K[y(0x16b)]))&&(K={'enumerable':!![],'get':function(){return h[N];}}),Object[y(0x18e)](j,F,K);}:function(j,h,N,F){if(F===undefined)F=N;j[F]=h[N];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(j,h){const D=a7Q;Object[D(0x18e)](j,D(0x191),{'enumerable':!![],'value':h});}:function(j,h){const i=a7Q;j[i(0x191)]=h;}),__importStar=this&&this[a7Q(0x197)]||function(j){const W=a7Q;if(j&&j[W(0x165)])return j;var h={};if(j!=null){for(var N in j)if(N!==W(0x191)&&Object[W(0x17e)][W(0x166)][W(0x18c)](j,N))__createBinding(h,j,N);}return __setModuleDefault(h,j),h;},__importDefault=this&&this[a7Q(0x164)]||function(j){const E=a7Q;return j&&j[E(0x165)]?j:{'default':j};};Object[a7Q(0x18e)](exports,'__esModule',{'value':!![]}),exports[a7Q(0x179)]=exports[a7Q(0x18b)]=exports['handleYamlOutput']=exports[a7Q(0x16f)]=exports[a7Q(0x160)]=exports['printAsTable']=void 0x0;const chalk_1=__importDefault(require(a7Q(0x195))),_=__importStar(require('lodash')),util=__importStar(require('util')),yaml=require(a7Q(0x196)),columnify=require(a7Q(0x171));function printAsTable(j,h,N,F=![],K=0x0){const t=a7Q;!F&&console['log'](''+chalk_1[t(0x191)][t(0x15e)](h));function G(x){const H=t;return x===H(0x17b)?x:x[H(0x192)]('disabled','');}function d(x,m){const q=t;function P(I){const a=a7h,X=new Date(I);return X['getDate']()+'/'+X['getMonth']()+'/'+X[a(0x187)]()+'\x0a'+X[a(0x172)]()+':'+X[a(0x18d)]()+':'+X[a(0x180)]();}const e=[q(0x176),'updatedat'];if(e[q(0x185)](m['toLowerCase']())&&_['isFinite'](x)&&x[q(0x193)]()[q(0x182)]===0xd)return P(Number(x));if(_[q(0x183)](x)){if(m!==q(0x17b)&&m[q(0x185)](q(0x17b)))return x?'x':'✔';return x?'✔':'x';}if(_['isObjectLike'](x))return util['inspect'](x,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});return x;}if(_[t(0x174)](j)){j[t(0x182)]===0x0&&console[t(0x170)](t(0x15a)+h[t(0x17d)]()+'\x20found');const x=j['map']((e,I)=>{const R=t,X={'i':I+K};return Object['keys'](e)[R(0x18f)](p=>{const n=R;(_[n(0x190)](N)||N[n(0x185)](p[n(0x17d)]()))&&_[n(0x161)](X,G(p),d(e[p],p));}),X;}),m=_[t(0x18a)](Object[t(0x181)]((x===null||x===void 0x0?void 0x0:x[0x0])||[]))[t(0x15f)]((e,I)=>{const k=t,X=l=>l!=='i'?l!==k(0x194)?0x0:0x1:0x2;return X(I)-X(e);}),P={'maxWidth':0x1e,'preserveNewLines':!![],'showHeaders':!F,'config':{'_id':{'maxWidth':0x5,'truncate':!![]},'i':{'showHeaders':![]}},'columns':m};console['log'](columnify(x,P));}else console['log'](j);}exports['printAsTable']=printAsTable;function consoleFormat(j,h){const L=a7Q;if(_['isEmpty'](j)){const N=h?L(0x188)+h+')':'';return chalk_1['default'][L(0x16c)]('The\x20request\x20was\x20completed\x20successfully')+N;}if(!_['isObjectLike'](j))return j===null||j===void 0x0?void 0x0:j[L(0x193)]();return util[L(0x17c)](j,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});}function a7j(){const r=['stringify','155945CkHNTS','bold','sort','consoleFormat','set','1309536glNUGP','8635216HmoPkv','__importDefault','__esModule','hasOwnProperty','192yIspRD','1235241CsLkVh','9GNhpAy','getOwnPropertyDescriptor','configurable','green','writable','json','handleJsonOutput','log','columnify','getHours','get','isArrayLike','406164ZYifPx','createdat','yaml','yml','printResponse','handleYamlOutput','disabled','inspect','toLowerCase','prototype','5704006jdlLGf','getSeconds','keys','length','isBoolean','249576DlUpIo','includes','format','getFullYear','\x20(HTTP\x20status:\x20','__createBinding','clone','handleFormattedOutput','call','getMinutes','defineProperty','forEach','isUndefined','default','replace','toString','internalId','chalk','js-yaml','__importStar','No\x20','safeDump'];a7j=function(){return r;};return a7j();}exports['consoleFormat']=consoleFormat;function a7h(j,h){const N=a7j();return a7h=function(F,K){F=F-0x15a;let G=N[F];return G;},a7h(j,h);}const handleJsonOutput=(j,h)=>{const A=a7Q,N=j===A(0x16e);if(N)console[A(0x170)](JSON[A(0x15c)](h,null,'\x20'));};exports[a7Q(0x16f)]=handleJsonOutput;const handleYamlOutput=(j,h)=>{const v=a7Q,N=j===v(0x177)||j===v(0x178);if(N)console[v(0x170)](yaml[v(0x15b)](h));};exports['handleYamlOutput']=handleYamlOutput;const handleFormattedOutput=(j,h)=>{const s=a7Q,N=j===s(0x186);if(N)console[s(0x170)](consoleFormat(h));};exports[a7Q(0x18b)]=handleFormattedOutput;const printResponse=(j,h)=>{const U=a7Q;(0x0,exports[U(0x16f)])(j,h),(0x0,exports[U(0x17a)])(j,h),(0x0,exports[U(0x18b)])(j,h);};exports[a7Q(0x179)]=printResponse;
@@ -1 +1 @@
1
- 'use strict';const a8D=a8g;(function(O,g){const J=a8g,R=O();while(!![]){try{const Y=-parseInt(J(0x148))/0x1*(-parseInt(J(0x157))/0x2)+parseInt(J(0x156))/0x3+parseInt(J(0x135))/0x4*(parseInt(J(0x14e))/0x5)+parseInt(J(0x143))/0x6+-parseInt(J(0x154))/0x7*(-parseInt(J(0x14c))/0x8)+-parseInt(J(0x155))/0x9+parseInt(J(0x141))/0xa*(-parseInt(J(0x153))/0xb);if(Y===g)break;else R['push'](R['shift']());}catch(y){R['push'](R['shift']());}}}(a8O,0x33601));function a8O(){const O5=['93355vEKsox','colors','grey','padding','length','1638868CeOwWF','428330oBCPlm','1132524NAuawH','121758NhBBTW','474154YqrLpe','symbols','height','repeat','map','slice','2-digit','undefined','downSampleData','\x20\x20\x20','isArray','52xGIzdO','red','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','format','abs','join','getAsciiChart','default','push','max','toLocaleTimeString','toFixed','40TnWApo','offset','1736730XRcacU','floor','black','toLocaleDateString','h24','1Oibela','round','unit','min','16kprKTP','__esModule'];a8O=function(){return O5;};return a8O();}function a8g(O,g){const R=a8O();return a8g=function(Y,y){Y=Y-0x12f;let n=R[Y];return n;},a8g(O,g);}var __importDefault=this&&this['__importDefault']||function(O){const h=a8g;return O&&O[h(0x14d)]?O:{'default':O};};Object['defineProperty'](exports,a8D(0x14d),{'value':!![]}),exports[a8D(0x132)]=exports['getAsciiChart']=void 0x0;const chalk_1=__importDefault(require('chalk')),colored=(O,g)=>{const O0=a8D;return g===undefined?O:chalk_1[O0(0x13c)][g](O);},getAsciiChart=(O,g={})=>{const O1=a8D,R=Array[O1(0x134)](O[0x0])?O:[O];let Y=typeof g[O1(0x14b)]!==O1(0x131)?g[O1(0x14b)]:R[0x0][0x0],n=typeof g[O1(0x13e)]!==O1(0x131)?g['max']:R[0x0][0x0];for(let W=0x0;W<R['length'];W++){for(let X=0x0;X<R[W][O1(0x152)];X++){Y=Math[O1(0x14b)](Y,R[W][X]),n=Math['max'](n,R[W][X]);}}let G=['┼','┤','╶','╴','─','╰','╭','╮','╯','│'],S=Math[O1(0x139)](n-Y),q=typeof g[O1(0x142)]!==O1(0x131)?g['offset']:0x3,V=typeof g['padding']!==O1(0x131)?g[O1(0x151)]:O1(0x137),e=typeof g[O1(0x159)]!==O1(0x131)?g[O1(0x159)]:S,L=typeof g['colors']!=='undefined'?g[O1(0x14f)]:['blue',O1(0x136),'green',O1(0x150),O1(0x145)],N=S!==0x0?e/S:0x1,b=Math['round'](Y*N),E=Math[O1(0x149)](n*N),p=Math[O1(0x139)](E-b),F=0x0;for(let M=0x0;M<R[O1(0x152)];M++){F=Math[O1(0x13e)](F,R[M]['length']);}F=F+q;let m=typeof g[O1(0x158)]!==O1(0x131)?g[O1(0x158)]:G,o=g['format']!==undefined?g[O1(0x138)]:function(l){const O2=O1;return(V+l[O2(0x140)](0x2)+g[O2(0x14a)])[O2(0x12f)](-V[O2(0x152)]);},v=new Array(p+0x1);for(let l=0x0;l<=p;l++){v[l]=new Array(F);for(let C=0x0;C<F;C++){v[l][C]='\x20';}}for(let K=b;K<=E;++K){const H=o(p>0x0?n-(K-b)*S/p:K,K-b);v[K-b][Math[O1(0x13e)](q-H['length'],0x0)]=H,v[K-b][q-0x1]=K==0x0?m[0x0]:m[0x1];}for(let f=0x0;f<R[O1(0x152)];f++){let A=L[f%L[O1(0x152)]],Z=Math[O1(0x149)](R[f][0x0]*N)-b;v[p-Z][q-0x1]=colored(m[0x0],A);for(let c=0x0;c<R[f][O1(0x152)]-0x1;c++){let U=Math[O1(0x149)](R[f][c+0x0]*N)-b,d=Math[O1(0x149)](R[f][c+0x1]*N)-b;if(U==d)v[p-U][c+q]=colored(m[0x4],A);else{v[p-d][c+q]=colored(U>d?m[0x5]:m[0x6],A),v[p-U][c+q]=colored(U>d?m[0x7]:m[0x8],A);let r=Math[O1(0x14b)](U,d),t=Math['max'](U,d);for(let Q=r+0x1;Q<t;Q++){v[p-Q][c+q]=colored(m[0x9],A);}}}}const {startTs:a,endTs:z}=g;if(a||z){const T=P=>{const O3=O1;if(!P)return O3(0x133);const B=P[O3(0x146)](undefined,{'day':O3(0x130),'month':O3(0x130),'year':O3(0x130)}),w=P[O3(0x13f)](undefined,{'hourCycle':O3(0x147)});return B+'\x20'+w;},u=T(z),I=T(a),k=V['slice'](0x0,Math[O1(0x13e)](0x2,V['length']-I[O1(0x152)]/0x2+0x1)),s='\x20'[O1(0x15a)](Math[O1(0x13e)](F-(V['length']+u['length']/0x2),0x1));v[O1(0x13d)]([''+k+I+s+u]),v[O1(0x13d)]([]);}return v[O1(0x15b)](P=>P[O1(0x13a)](''))['join']('\x0a');};exports[a8D(0x13b)]=getAsciiChart;const downSampleData=(O,g)=>{const O4=a8D,R=O[O4(0x152)];if(g>=R||g===0x0)return O;const Y=[];let y=0x0;const n=(R-0x2)/(g-0x2);let G=0x0,S,q,V,e;Y[y++]=O[G];for(var L=0x0;L<g-0x2;L++){let m=0x0,o=0x0,v=Math[O4(0x144)]((L+0x1)*n)+0x1,z=Math[O4(0x144)]((L+0x2)*n)+0x1;z=z<R?z:R;var N=z-v;for(;v<z;v++){m+=O[v][0x0],o+=O[v][0x1];}m/=N,o/=N;var b=Math[O4(0x144)](L*n)+0x1,E=Math[O4(0x144)]((L+0x1)*n)+0x1,p=O[G][0x0],F=O[G][0x1];q=V=-0x1;for(;b<E;b++){V=Math[O4(0x139)]((p-m)*(O[b][0x1]-F)-(p-O[b][0x0])*(o-F))*0.5,V>q&&(q=V,S=O[b],e=b);}Y[y++]=S,G=e;}return Y[y++]=O[R-0x1],Y;};exports[a8D(0x132)]=downSampleData;
1
+ 'use strict';const a8c=a8h;(function(j,h){const g=a8h,N=j();while(!![]){try{const F=-parseInt(g(0xbf))/0x1+-parseInt(g(0xa8))/0x2+parseInt(g(0xa3))/0x3+-parseInt(g(0xb0))/0x4*(-parseInt(g(0xb4))/0x5)+-parseInt(g(0xba))/0x6*(-parseInt(g(0xad))/0x7)+parseInt(g(0xae))/0x8*(-parseInt(g(0x99))/0x9)+-parseInt(g(0xb1))/0xa;if(F===h)break;else N['push'](N['shift']());}catch(K){N['push'](N['shift']());}}}(a8j,0x6a484));var __importDefault=this&&this[a8c(0xbe)]||function(j){const B=a8c;return j&&j[B(0xa6)]?j:{'default':j};};Object[a8c(0x9d)](exports,'__esModule',{'value':!![]}),exports[a8c(0xb9)]=exports[a8c(0x93)]=void 0x0;const chalk_1=__importDefault(require(a8c(0x9b))),colored=(j,h)=>{const j0=a8c;return h===undefined?j:chalk_1[j0(0xb2)][h](j);},getAsciiChart=(h,N={})=>{const j1=a8c,F=Array[j1(0x9f)](h[0x0])?h:[h];let K=typeof N[j1(0xa1)]!=='undefined'?N[j1(0xa1)]:F[0x0][0x0],G=typeof N['max']!=='undefined'?N['max']:F[0x0][0x0];for(let q=0x0;q<F[j1(0xb3)];q++){for(let R=0x0;R<F[q][j1(0xb3)];R++){K=Math[j1(0xa1)](K,F[q][R]),G=Math[j1(0xb8)](G,F[q][R]);}}let d=['┼','┤','╶','╴','─','╰','╭','╮','╯','│'],m=Math[j1(0xbb)](G-K),P=typeof N[j1(0x97)]!=='undefined'?N[j1(0x97)]:0x3,e=typeof N['padding']!==j1(0xa7)?N[j1(0xc0)]:j1(0x9e),I=typeof N[j1(0x96)]!==j1(0xa7)?N['height']:m,X=typeof N[j1(0x98)]!==j1(0xa7)?N[j1(0x98)]:['blue',j1(0xb6),j1(0x9c),'grey',j1(0xa0)],l=m!==0x0?I/m:0x1,p=Math[j1(0xbc)](K*l),J=Math[j1(0xbc)](G*l),Q=Math[j1(0xbb)](J-p),D=0x0;for(let n=0x0;n<F[j1(0xb3)];n++){D=Math[j1(0xb8)](D,F[n][j1(0xb3)]);}D=D+P;let W=typeof N[j1(0xa5)]!=='undefined'?N[j1(0xa5)]:d,E=N['format']!==undefined?N[j1(0x92)]:function(k){const j2=j1;return(e+k[j2(0xa9)](0x2)+N[j2(0xac)])[j2(0xa2)](-e[j2(0xb3)]);},t=new Array(Q+0x1);for(let k=0x0;k<=Q;k++){t[k]=new Array(D);for(let L=0x0;L<D;L++){t[k][L]='\x20';}}for(let A=p;A<=J;++A){const v=E(Q>0x0?G-(A-p)*m/Q:A,A-p);t[A-p][Math[j1(0xb8)](P-v['length'],0x0)]=v,t[A-p][P-0x1]=A==0x0?W[0x0]:W[0x1];}for(let s=0x0;s<F['length'];s++){let U=X[s%X['length']],r=Math[j1(0xbc)](F[s][0x0]*l)-p;t[Q-r][P-0x1]=colored(W[0x0],U);for(let V=0x0;V<F[s][j1(0xb3)]-0x1;V++){let f=Math[j1(0xbc)](F[s][V+0x0]*l)-p,O=Math[j1(0xbc)](F[s][V+0x1]*l)-p;if(f==O)t[Q-f][V+P]=colored(W[0x4],U);else{t[Q-O][V+P]=colored(f>O?W[0x5]:W[0x6],U),t[Q-f][V+P]=colored(f>O?W[0x7]:W[0x8],U);let z=Math[j1(0xa1)](f,O),b=Math['max'](f,O);for(let T=z+0x1;T<b;T++){t[Q-T][V+P]=colored(W[0x9],U);}}}}const {startTs:H,endTs:a}=N;if(H||a){const u=w=>{const j3=j1;if(!w)return j3(0xa4);const C=w[j3(0xbd)](undefined,{'day':j3(0x95),'month':j3(0x95),'year':j3(0x95)}),o=w[j3(0xaf)](undefined,{'hourCycle':j3(0xaa)});return C+'\x20'+o;},Z=u(a),S=u(H),Y=e[j1(0xa2)](0x0,Math[j1(0xb8)](0x2,e['length']-S[j1(0xb3)]/0x2+0x1)),M='\x20'[j1(0x9a)](Math['max'](D-(e[j1(0xb3)]+Z[j1(0xb3)]/0x2),0x1));t[j1(0xb5)]([''+Y+S+M+Z]),t['push']([]);}return t[j1(0xb7)](w=>w[j1(0x94)](''))[j1(0x94)]('\x0a');};exports['getAsciiChart']=getAsciiChart;const downSampleData=(j,h)=>{const j4=a8c,N=j[j4(0xb3)];if(h>=N||h===0x0)return j;const F=[];let K=0x0;const G=(N-0x2)/(h-0x2);let d=0x0,x,m,P,e;F[K++]=j[d];for(var I=0x0;I<h-0x2;I++){let y=0x0,D=0x0,W=Math[j4(0xab)]((I+0x1)*G)+0x1,E=Math['floor']((I+0x2)*G)+0x1;E=E<N?E:N;var X=E-W;for(;W<E;W++){y+=j[W][0x0],D+=j[W][0x1];}y/=X,D/=X;var l=Math['floor'](I*G)+0x1,p=Math[j4(0xab)]((I+0x1)*G)+0x1,J=j[d][0x0],Q=j[d][0x1];m=P=-0x1;for(;l<p;l++){P=Math[j4(0xbb)]((J-y)*(j[l][0x1]-Q)-(J-j[l][0x0])*(D-Q))*0.5,P>m&&(m=P,x=j[l],e=l);}F[K++]=x,d=e;}return F[K++]=j[N-0x1],F;};exports['downSampleData']=downSampleData;function a8h(j,h){const N=a8j();return a8h=function(F,K){F=F-0x92;let G=N[F];return G;},a8h(j,h);}function a8j(){const j5=['7053993KJDpyy','repeat','chalk','green','defineProperty','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','isArray','black','min','slice','1475436VjInOY','\x20\x20\x20','symbols','__esModule','undefined','241902kqwmqK','toFixed','h24','floor','unit','49pZRgEs','8ZlHMlW','toLocaleTimeString','4docUUf','117470oEjCpS','default','length','2477185yIFzLf','push','red','map','max','downSampleData','649806vbIIlE','abs','round','toLocaleDateString','__importDefault','393549rVUiHr','padding','format','getAsciiChart','join','2-digit','height','offset','colors'];a8j=function(){return j5;};return a8j();}
@@ -1 +1 @@
1
- 'use strict';const a9m=a9g;(function(O,g){const F=a9g,R=O();while(!![]){try{const Y=parseInt(F(0xbf))/0x1+parseInt(F(0x127))/0x2+parseInt(F(0x10c))/0x3*(parseInt(F(0xd6))/0x4)+parseInt(F(0x17e))/0x5+parseInt(F(0x168))/0x6+-parseInt(F(0x113))/0x7+-parseInt(F(0xf3))/0x8*(parseInt(F(0xc4))/0x9);if(Y===g)break;else R['push'](R['shift']());}catch(y){R['push'](R['shift']());}}}(a9O,0x389ff));function a9O(){const Oj=['unshift','editedResult','for\x20this\x20','restore','has','grey','elements','clusters','charAt','oneOf','job\x20runs','template','integer','description','Should\x20it\x20be','greenBright','isValidJSON','found','231kvBXzh','No\x20','templates','concat','Template\x20id\x20not\x20provided.','SAVE','Enter\x20the\x20','596246cHsiQH','stringify','lodash','Context\x20with\x20name\x20\x27','askForBuild','REPEAT','yml','validate','override','jobs','job','maximum','minLength','tmpCmdPath','success','restores','secrets','push','No,\x20repeat','\x20Example:\x20','464834sRGFWO','__setModuleDefault','propToType','askForLogSink','must\x20be\x20smaller\x20than\x20or\x20equal\x20to\x20','nextPageCursor','backup','volumes','cursor','registerPrompt','editor','must\x20be\x20bigger\x20than\x20or\x20equal\x20to\x20','default','type','pipeline','volume','Yes,\x20send','inquirer-search-list','minimum','askForTemplateRun','deleteWarningPrompt','\x20to\x20use:','opt','underline','askForSubdomainPath','editPayload','credentials','builds','askForSubdomain','askForResourcePaginated','contextProvider','unset','WARNING:\x20You\x20are\x20about\x20to\x20delete\x20','pipelines','reset','project:\x20\x27','warning','next','setPathVars','addon:\x20\x27','Provide\x20a\x20file\x20path\x20to\x20write\x20the\x20configuration\x20to\x20(<name>.[json|yaml|yml])','assign','ask','\x20in\x20','must\x20be\x20a\x20valid\x20non-empty\x20json\x20string','getOwnPropertyDescriptor','Context\x20name\x20already\x20exists.','.*\x5c.(json|yaml|yml)$','askForAddon','Do\x20you\x20want\x20to\x20add','logSinks','pattern','service:\x20\x27','boolean','writable','askForAddonBackup','blue','askForVolume','template\x20run','isObject','No\x20containers\x20found','DynamicReloadPaginationPrompt','job:\x20\x27','don\x27t\x20change','InquirerHelper','1775508UqXySn','addEntry','this\x20option\x20is\x20required,\x20please\x20answer','What\x27s\x20the\x20','test','map','service','length','chalk','subdomains','js-yaml','all-containers','__createBinding','red','trim','search-list','domains','confirmation','services','writeFileSync','Choose\x20the\x20login\x20token:','What\x20do\x20you\x20want\x20to\x20use\x20as','1492360RkyhyR','addons','askForService','secret','askForJobRun','No,\x20edit','choice','string','pop','data','askForContainer','a\x20Northflank\x20resource','bold','\x20characters','skipValidation','toUpperCase','addon','askGeneric','retrievePayloadViaInteractiveCli','list','log\x20sink','backups','object','then','items','create','apply','isEmpty','startedAt','tokenPrompt','askForResource','prompt','Something\x20unexpected\x20happened.','saveFile','configurable','job\x20containers','Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.','defineProperty','hasOwnProperty','confirm','safeDump','runs','\x20characters,\x20is\x20','askForTemplate','required','backupDestinations','cloud','domain','pagination-prompt','\x20and\x20it\x20','isNaN','green','join','json','all-builds','askConfirm','password','EDIT','values','get','__esModule','domain\x20(','tag','pagination','askForClusterId','throw','inquirer','ABORT','blueBright','askForAddonRestore','createdAt','input','backup\x20destination','done','name','42448tfoRss','must\x20be\x20longer\x20than\x20or\x20equal\x20to\x20','getType','retry','\x20(full\x20domain:\x20','6687HVqeLB','\x20(startedAt:\x20','subdomainPath','getQuestionString','askForPipeline','askForProjectScopedResource','call','No\x20builds\x20found','askForProjectScopedResourcePaginated','isUndefined','example','set','subdomain','apiClient','split','Choose\x20the\x20','must\x20be\x20a\x20number,\x20is\x20','containers','11420DkGBDi','must\x20be\x20shorter\x20than\x20or\x20equal\x20to\x20','defaultPaginationPageSize','doesn\x27t\x20match\x20pattern\x20\x27','fullName','Unexpected\x20file\x20type:\x20','uri','all','safeLoad','token','rawObject','bgGrey','not\x20completed','confirmationPrompt','filter','Aborted.','anyOf','Do\x20you\x20want\x20to\x20add\x20more','find','getPathString','maxLength','templateRuns','./pagination/inquirer-pagination-prompt','YES','\x20type?','properties','projects','whiteBright','askForCredentials','8312BVkSbJ','path','fetchResourceList','completedAt','resultCache','repeat','tags'];a9O=function(){return Oj;};return a9O();}var __createBinding=this&&this[a9m(0x174)]||(Object[a9m(0x197)]?function(O,g,R,Y){const o=a9m;if(Y===undefined)Y=R;var y=Object[o(0x154)](g,R);(!y||(o(0x1b9)in y?!g[o(0x1ba)]:y[o(0x15d)]||y[o(0x1a0)]))&&(y={'enumerable':!![],'get':function(){return g[R];}}),Object[o(0x1a3)](O,Y,y);}:function(O,g,R,Y){if(Y===undefined)Y=R;O[Y]=g[R];}),__setModuleDefault=this&&this[a9m(0x128)]||(Object['create']?function(O,g){const v=a9m;Object['defineProperty'](O,v(0x133),{'enumerable':!![],'value':g});}:function(O,g){const a=a9m;O[a(0x133)]=g;}),__importStar=this&&this['__importStar']||function(O){const z=a9m;if(O&&O[z(0x1ba)])return O;var g={};if(O!=null){for(var R in O)if(R!=='default'&&Object['prototype'][z(0x1a4)][z(0xca)](O,R))__createBinding(g,O,R);}return __setModuleDefault(g,O),g;},__awaiter=this&&this['__awaiter']||function(O,g,R,Y){function y(n){return n instanceof R?n:new R(function(G){G(n);});}return new(R||(R=Promise))(function(n,G){const l=a9g;function S(L){const W=a9g;try{V(Y[W(0x14c)](L));}catch(N){G(N);}}function q(L){const X=a9g;try{V(Y[X(0xb5)](L));}catch(N){G(N);}}function V(e){const M=a9g;e[M(0xbd)]?n(e['value']):y(e['value'])[M(0x195)](S,q);}V((Y=Y[l(0x198)](O,g||[]))['next']());});},__importDefault=this&&this['__importDefault']||function(O){return O&&O['__esModule']?O:{'default':O};};function a9g(O,g){const R=a9O();return a9g=function(Y,y){Y=Y-0xb3;let n=R[Y];return n;},a9g(O,g);}Object['defineProperty'](exports,a9m(0x1ba),{'value':!![]}),exports[a9m(0x167)]=void 0x0;const _=__importStar(require(a9m(0x115))),chalk_1=__importDefault(require(a9m(0x170))),fs=__importStar(require('fs')),utils_1=require('./utils'),api_helpers_1=require('./api-helpers'),inquirer_pagination_prompt_1=require(a9m(0xec)),inquirer=require(a9m(0xb6)),inquirerSearchList=require(a9m(0x138)),yaml=require(a9m(0x172));var ConfirmChoices;(function(O){const C=a9m;O[C(0xed)]=C(0x137),O[C(0x118)]=C(0x125),O['EDIT']=C(0x183),O[C(0x111)]='No,\x20but\x20save\x20as\x20file',O['ABORT']='No,\x20abort';}(ConfirmChoices||(ConfirmChoices={})));class InquirerHelper{constructor(O){const K=a9m;this[K(0xd1)]=O,this[K(0xd8)]=0x32,this[K(0x140)]=g=>__awaiter(this,void 0x0,void 0x0,function*(){const H=K,{editedResult:R}=yield inquirer[H(0x19d)]([{'type':'editor','name':H(0xfb),'message':'Go\x20to\x20editor','default':yaml['safeDump'](g)}]);return yaml[H(0xde)](R);}),this[K(0x19f)]=g=>__awaiter(this,void 0x0,void 0x0,function*(){const f=K,R=G=>f(0xdb)+G+',\x20supported\x20types:\x20[json|yaml|yml]';function Y(){return __awaiter(this,void 0x0,void 0x0,function*(){const i=a9g;return inquirer['prompt']([{'type':i(0xbb),'name':'fileName','message':i(0x14f),'validate':G=>new RegExp(i(0x156))[i(0x16c)](G)?!![]:R(G)}]);});}const {fileName:y}=yield Y(),n=y['toString']()[f(0xd2)]('.')[f(0x186)]();try{switch(n){case f(0x1b3):(0x0,utils_1[f(0x121)])('Configuration\x20file\x20written\x20to\x20'+y);return fs[f(0x17b)](y,JSON[f(0x114)](g,null,'\x20\x20'));case'yaml':case f(0x119):(0x0,utils_1[f(0x121)])('Configuration\x20file\x20written\x20to\x20'+y);return fs[f(0x17b)](y,yaml[f(0x1a6)](g));default:(0x0,utils_1[f(0x14b)])(R(n));}}catch(G){(0x0,utils_1['warning'])('Writing\x20configuration\x20failed:\x20'+G['message']);}return undefined;}),this[K(0xe4)]=(g,R)=>Y=>{const A=K,y=typeof Y===A(0x185)?Y[A(0x176)]():Y;return R===![]&&y===A(0x166)?'':y;},this['validate']=(g,R,Y)=>y=>{const Z=K;if(this[Z(0x18c)]===!![])return!![];const n=[];if(y===''||y===Z(0x166)){if(R!==![])n[Z(0x124)](Z(0x16a));else return!![];}g[Z(0x134)]==='string'&&!_[Z(0xcd)](g[Z(0x15a)])&&n[Z(0x124)](new RegExp(g[Z(0x15a)])[Z(0x16c)](y)?!![]:Z(0xd9)+g[Z(0x15a)]+'\x27');g['type']===Z(0x185)&&!_[Z(0xcd)](g[Z(0x11f)])&&n[Z(0x124)](y[Z(0x16f)]>=g['minLength']?!![]:Z(0xc0)+g[Z(0x11f)]+Z(0x1a8)+y['length']+Z(0x18b));g[Z(0x134)]===Z(0x185)&&!_['isUndefined'](g[Z(0xea)])&&n[Z(0x124)](y[Z(0x16f)]<=g[Z(0xea)]?!![]:Z(0xd7)+g['maxLength']+'\x20characters,\x20is\x20'+y[Z(0x16f)]+Z(0x18b));Y&&Number[Z(0x1b0)](parseInt(y,0xa))&&n[Z(0x124)](Z(0xd4)+y);g[Z(0x134)]==='integer'&&!_['isUndefined'](g[Z(0x139)])&&n[Z(0x124)](y>=g[Z(0x139)]?!![]:Z(0x132)+g[Z(0x139)]);g[Z(0x134)]===Z(0x106)&&!_['isUndefined'](g[Z(0x11e)])&&n[Z(0x124)](y<=g[Z(0x11e)]?!![]:Z(0x12b)+g['maximum']);if(g['type']==='rawObject'){const q=(0x0,utils_1['isValidJSON'])(y);n['push'](q===![]||_[Z(0x199)](q)?Z(0x153):!![]);}const G=n[Z(0xe4)](V=>V!==!![]),S=(g===null||g===void 0x0?void 0x0:g[Z(0xce)])?'\x0a'+chalk_1['default'][Z(0x175)]('>>')+Z(0x126)+chalk_1[Z(0x133)][Z(0xf1)](JSON[Z(0x114)](g[Z(0xce)])):'';return G[Z(0x16f)]>0x0?G[Z(0x1b2)](chalk_1[Z(0x133)][Z(0x13e)](Z(0x1af)))+S:!![];},this[K(0xe9)]=(g,R,Y)=>{const U=K,y=g[g[U(0x16f)]-0x1];function n(){const d=U;return g['slice'](0x0,-0x1)[d(0x16d)](q=>q[d(0x102)](0x0)[d(0x18d)]()+q['slice'](0x1))[d(0x1b2)]('>');}const G=g[U(0x16f)]>0x1?chalk_1['default'][U(0xe1)]['whiteBright'](n())+':\x20':'',S=Y?'\x20('+chalk_1[U(0x133)]['blue'](Y)+')':'';return chalk_1[U(0x133)][U(0x149)](''+G+R+'\x20'+chalk_1[U(0x133)]['bold'][U(0x109)](y)+S+'?');},this[K(0x19c)]=(g,R,Y)=>__awaiter(this,void 0x0,void 0x0,function*(){const r=K;if(R[r(0x16f)]<0x1){const G=Y?r(0xfc)+Y:'found';throw new Error('No\x20'+g+'\x20'+G+'.');}const y='Choose\x20the\x20'+g+r(0x13c),n=R[r(0x16f)]>0x4?r(0x177):r(0x191);return(yield inquirer[r(0x19d)]([{'type':n,'name':'name','message':y,'choices':R}]))['name'];}),this[K(0x144)]=(g,R,Y)=>__awaiter(this,void 0x0,void 0x0,function*(){const j=K,{elements:y,nextCursor:n}=yield R();if(y[j(0x16f)]<0x1){const q=Y?j(0xfc)+Y:j(0x10b);throw new Error(j(0x10d)+g+'\x20'+q+'.');}const G=j(0xd3)+g+'\x20to\x20use:';if(n!==undefined){const V=({nextPageCursor:e})=>__awaiter(this,void 0x0,void 0x0,function*(){const t=j,L=yield R(e);return{'elements':L[t(0x100)],'nextPageCursor':L['nextCursor']};});return(yield inquirer[j(0x19d)]([{'type':j(0x1ae),'name':j(0xbe),'message':G,'choices':y,'nextPageCursor':n,'loadMore':V}]))[j(0xbe)];}const S=y[j(0x16f)]>0x4?j(0x177):j(0x191);return(yield inquirer[j(0x19d)]([{'type':S,'name':j(0xbe),'message':G,'choices':y}]))[j(0xbe)];}),this[K(0x18f)]=(g,R)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Q=K,Y=''+(R?'('+chalk_1[Q(0x133)][Q(0x15f)](R)+')\x20':''),y=Q(0x112)+chalk_1[Q(0x133)][Q(0x1b1)](g)+'\x20'+Y+'to\x20use:',n=this['validate']({'type':Q(0x185),'required':!![]});return(yield inquirer['prompt']([{'type':Q(0xbb),'name':'name','message':y,'validate':n}]))[Q(0xbe)];}),this[K(0x1b5)]=g=>__awaiter(this,void 0x0,void 0x0,function*(){const T=K;return(yield inquirer[T(0x19d)]([{'type':'confirm','name':T(0xbe),'message':g,'default':!![]}]))[T(0xbe)];}),this[K(0x180)]=g=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const I=K,R=Y=>__awaiter(this,void 0x0,void 0x0,function*(){const u=a9g,y=yield this['apiClient'][u(0x191)][u(0x17a)][u(0xdd)]({'parameters':{'projectId':Y}}),n=y[u(0x187)][u(0x17a)]['map'](G=>G['id']);return n;});return this[I(0xc9)](I(0x16e),R,g);}),this[K(0x1a9)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const k=K,g=R=>__awaiter(this,void 0x0,void 0x0,function*(){const x=a9g;var Y;const y=yield this[x(0xd1)]['list'][x(0x10e)]({'options':{'per_page':this[x(0xd8)],'cursor':R}}),n=y[x(0x187)][x(0x10e)][x(0x16d)](G=>G['id']);return{'elements':n,'nextCursor':(Y=y[x(0xb3)])===null||Y===void 0x0?void 0x0:Y[x(0x12f)]};});return this[k(0x144)](k(0x105),g);}),this['askForTag']=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const P=K,g=R=>__awaiter(this,void 0x0,void 0x0,function*(){const s=a9g;var Y,y,n;const G=yield this[s(0xd1)]['list']['tags']({'options':{'per_page':this[s(0xd8)],'cursor':R}}),S=(y=(Y=G[s(0x187)][s(0xf9)])===null||Y===void 0x0?void 0x0:Y[s(0x16d)](q=>q['id']))!==null&&y!==void 0x0?y:[];return{'elements':S,'nextCursor':(n=G[s(0xb3)])===null||n===void 0x0?void 0x0:n[s(0x12f)]};});return this[P(0x144)](P(0x1bc),g);}),this['askForBackupDestination']=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const B=K;var g;const R=yield this['apiClient'][B(0x191)][B(0x1ab)][B(0xdd)]({}),Y=(g=R[B(0x187)][B(0x1ab)][B(0x16d)](y=>y[B(0xbe)]))!==null&&g!==void 0x0?g:[];return this[B(0x19c)](B(0xbc),Y);}),this[K(0xb4)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const J=K,g=R=>__awaiter(this,void 0x0,void 0x0,function*(){const w=a9g;var Y,y,n;const G=yield this[w(0xd1)][w(0x191)][w(0x1ac)][w(0x101)]({'options':{'per_page':this[w(0xd8)],'cursor':R}}),S=(y=(Y=G[w(0x187)][w(0x101)])===null||Y===void 0x0?void 0x0:Y[w(0x16d)](q=>q[w(0xbe)]))!==null&&y!==void 0x0?y:[];return{'elements':S,'nextCursor':(n=G[w(0xb3)])===null||n===void 0x0?void 0x0:n[w(0x12f)]};});return this[J(0x144)]('cluster\x20id',g);}),this[K(0x13a)]=g=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const h=K;if(_[h(0xcd)](g))throw new Error(h(0x110));const R=Y=>__awaiter(this,void 0x0,void 0x0,function*(){const D=h;var y;let n=this[D(0xd8)];const G=yield this[D(0xd1)][D(0x191)][D(0xeb)]({'parameters':{'templateId':g},'options':{'per_page':n,'cursor':Y}}),S=G[D(0x187)]['templateRuns'][D(0x16d)](q=>q['id']+D(0xc5)+q['createdAt']+')');return{'elements':S,'nextCursor':(y=G[D(0xb3)])===null||y===void 0x0?void 0x0:y['cursor']};});return this[h(0x144)](h(0x161),R)[h(0x195)](Y=>Y[h(0xd2)]('\x20')[0x0]);}),this[K(0x12a)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const O1=K,g=R=>__awaiter(this,void 0x0,void 0x0,function*(){const O0=a9g;var Y;let y=this[O0(0xd8)];const n=yield this['apiClient'][O0(0x191)][O0(0x159)]({'options':{'per_page':y,'cursor':R}}),G=n[O0(0x187)][O0(0x159)][O0(0x16d)](S=>S['id']);return{'elements':G,'nextCursor':(Y=n['pagination'])===null||Y===void 0x0?void 0x0:Y[O0(0x12f)]};});return this[O1(0x144)](O1(0x192),g);}),this[K(0xc8)]=g=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const O3=K,R=Y=>__awaiter(this,void 0x0,void 0x0,function*(){const O2=a9g,y=yield this[O2(0xd1)][O2(0x191)]['pipelines'][O2(0xdd)]({'parameters':{'projectId':Y}});return y['data'][O2(0x148)][O2(0x16d)](n=>n['id']);});return this['askForProjectScopedResource'](O3(0x135),R,g);}),this['askForJob']=g=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const R=Y=>__awaiter(this,void 0x0,void 0x0,function*(){const O4=a9g,y=yield this['apiClient']['list']['jobs']['all']({'parameters':{'projectId':Y}}),n=y[O4(0x187)][O4(0x11c)][O4(0x16d)](G=>G['id']);return n;});return this['askForProjectScopedResource']('job',R,g);}),this[K(0x182)]=(g,R,Y=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const O6=K,y='all-job-runs',n=G=>S=>__awaiter(this,void 0x0,void 0x0,function*(){const O5=a9g;var q;const V=yield this[O5(0xd1)]['get'][O5(0x11d)][O5(0x1a7)]({'parameters':{'projectId':G,'jobId':g},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':S}}),e=V['data'][O5(0x1a7)][O5(0x16d)](L=>L['id']+'\x20(startedAt:\x20'+L[O5(0x19a)]+')');return Y&&e['unshift'](y),{'elements':e,'nextCursor':(q=V['pagination'])===null||q===void 0x0?void 0x0:q['cursor']};});return this['askForProjectScopedResourcePaginated'](O6(0x104),n,R,O6(0x165)+g+'\x27')[O6(0x195)](G=>{const S=G['split']('\x20')[0x0];if(S===y)return undefined;return S;});}),this[K(0x117)]=(g,R,Y,y=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const O7=K,n=O7(0x1b4);if(Y!==undefined){const G=S=>q=>__awaiter(this,void 0x0,void 0x0,function*(){const O8=O7;var V;const e=yield this[O8(0xd1)]['get'][O8(0x11d)][O8(0x142)]({'parameters':{'projectId':S,'jobId':Y},'options':{'per_page':this[O8(0xd8)],'cursor':q}}),L=e[O8(0x187)][O8(0x142)]['map'](N=>N['id']+'\x20(startedAt:\x20'+N['createdAt']+')');return y&&L[O8(0xfa)](n),{'elements':L,'nextCursor':(V=e[O8(0xb3)])===null||V===void 0x0?void 0x0:V[O8(0x12f)]};});return this[O7(0xcc)]('job\x20builds',G,g,O7(0x165)+Y+'\x27')[O7(0x195)](S=>{const O9=O7,q=S[O9(0xd2)]('\x20')[0x0];if(q===n)return undefined;return q;});}if(R!==undefined){const S=q=>V=>__awaiter(this,void 0x0,void 0x0,function*(){const OO=O7;var e;const L=yield this['apiClient'][OO(0x1b9)]['service'][OO(0x142)]({'parameters':{'projectId':q,'serviceId':R},'options':{'per_page':this[OO(0xd8)],'cursor':V}}),N=L['data']['builds']['map'](b=>b['id']+OO(0xc5)+b[OO(0xba)]+')');if(y)N[OO(0xfa)](n);return{'elements':N,'nextCursor':(e=L[OO(0xb3)])===null||e===void 0x0?void 0x0:e[OO(0x12f)]};});return this['askForProjectScopedResourcePaginated']('service\x20build',S,g,'service:\x20\x27'+Y+'\x27')[O7(0x195)](q=>{const Og=O7,V=q[Og(0xd2)]('\x20')[0x0];if(V===n)return undefined;return V;});}throw new Error(O7(0xcb));}),this[K(0x188)]=(g,R,Y,y=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const OR=K,n=OR(0x173);if(Y!==undefined){const G=S=>q=>__awaiter(this,void 0x0,void 0x0,function*(){const OY=OR;var V,e;const L=yield this[OY(0xd1)]['get']['job']['containers']({'parameters':{'projectId':S,'jobId':Y},'options':{'per_page':this[OY(0xd8)],'cursor':q}}),N=(V=L[OY(0x187)][OY(0xd5)])!==null&&V!==void 0x0?V:[],b=N===null||N===void 0x0?void 0x0:N[OY(0x16d)](E=>E[OY(0xbe)]+OY(0xc5)+E[OY(0xba)]+')');return y&&b['unshift'](n),{'elements':b,'nextCursor':(e=L['pagination'])===null||e===void 0x0?void 0x0:e[OY(0x12f)]};});return this[OR(0xcc)](OR(0x1a1),G,g,OR(0x165)+Y+'\x27')[OR(0x195)](S=>{const q=S['split']('\x20')[0x0];if(q===n)return undefined;return q;});}if(R!==undefined){const S=q=>V=>__awaiter(this,void 0x0,void 0x0,function*(){const Oy=OR;var e,L;const N=yield this['apiClient']['get'][Oy(0x16e)][Oy(0xd5)]({'parameters':{'projectId':q,'serviceId':R},'options':{'per_page':this[Oy(0xd8)],'cursor':V}}),b=(e=N[Oy(0x187)]['containers'])!==null&&e!==void 0x0?e:[],E=b[Oy(0x16d)](p=>p[Oy(0xbe)]+Oy(0xc5)+p[Oy(0xba)]+')');if(y)E===null||E===void 0x0?void 0x0:E[Oy(0xfa)](n);return{'elements':E,'nextCursor':(L=N[Oy(0xb3)])===null||L===void 0x0?void 0x0:L[Oy(0x12f)]};});return this[OR(0xcc)]('service\x20containers',S,g,OR(0x15b)+Y+'\x27')[OR(0x195)](q=>{const On=OR,V=q[On(0xd2)]('\x20')[0x0];if(V===n)return undefined;return V;});}throw new Error(OR(0x163));}),this[K(0x157)]=g=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const OS=K,R=Y=>__awaiter(this,void 0x0,void 0x0,function*(){const OG=a9g,y=yield this[OG(0xd1)]['list'][OG(0x17f)][OG(0xdd)]({'parameters':{'projectId':Y}});return y[OG(0x187)]['addons'][OG(0x16d)](n=>n['id']);});return this[OS(0xc9)](OS(0x18e),R,g);}),this[K(0x15e)]=(g,R)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const OV=K,Y=y=>n=>__awaiter(this,void 0x0,void 0x0,function*(){const Oq=a9g;var G;const S=yield this[Oq(0xd1)]['get']['addon'][Oq(0x193)]({'parameters':{'projectId':y,'addonId':R},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':n}});return{'elements':S[Oq(0x187)]['backups']['map'](q=>q['id']+'\x20(completedAt:\x20'+(q[Oq(0xf6)]||Oq(0xe2))+')'),'nextCursor':(G=S[Oq(0xb3)])===null||G===void 0x0?void 0x0:G[Oq(0x12f)]};});return this[OV(0xcc)](OV(0x193),Y,g,'addon:\x20\x27'+R+'\x27')[OV(0x195)](y=>y[OV(0xd2)]('\x20')[0x0]);}),this[K(0xb9)]=(g,R,Y)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const OL=K,y=n=>G=>__awaiter(this,void 0x0,void 0x0,function*(){const Oe=a9g;var S;const q=yield this['apiClient'][Oe(0x1b9)][Oe(0x18e)][Oe(0x12d)]['restores']({'parameters':{'projectId':n,'addonId':R,'backupId':Y},'options':{'per_page':this[Oe(0xd8)],'cursor':G}});return{'elements':q['data'][Oe(0x122)]['map'](V=>V['id']+'\x20(completedAt:\x20'+(V['completedAt']||Oe(0xe2))+')'),'nextCursor':(S=q['pagination'])===null||S===void 0x0?void 0x0:S[Oe(0x12f)]};});return this['askForProjectScopedResourcePaginated'](OL(0xfd),y,g,OL(0x14e)+R+'\x27')[OL(0x195)](n=>n[OL(0xd2)]('\x20')[0x0]);}),this[K(0x160)]=g=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Ob=K,R=Y=>__awaiter(this,void 0x0,void 0x0,function*(){const ON=a9g;return(yield this['apiClient']['list'][ON(0x12e)]({'parameters':{'projectId':Y}}))[ON(0x187)][ON(0x16d)](y=>y['id']);});return this['askForProjectScopedResource'](Ob(0x136),R,g);}),this['askForSecret']=g=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Op=K,R=Y=>__awaiter(this,void 0x0,void 0x0,function*(){const OE=a9g,y=yield this[OE(0xd1)]['list'][OE(0x123)][OE(0xdd)]({'parameters':{'projectId':Y}});return y[OE(0x187)][OE(0x123)][OE(0x16d)](n=>n['id']);});return this[Op(0xc9)](Op(0x181),R,g);}),this[K(0x143)]=g=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const OF=K,R=yield this[OF(0xd1)][OF(0x1b9)][OF(0x1ad)]({'parameters':{'domain':g}}),Y=R[OF(0x187)][OF(0x171)]['map'](n=>n[OF(0xbe)]+OF(0xc3)+n[OF(0xda)]+')'),y=OF(0x1bb)+g+')';return this[OF(0x19c)](OF(0xd0),Y,y)[OF(0x195)](n=>n[OF(0xd2)]('\x20')[0x0]);}),this[K(0x13f)]=(g,R)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Om=K,Y=yield this[Om(0xd1)][Om(0x191)][Om(0xd0)][Om(0xf4)]({'parameters':{'domain':g,'subdomain':R}}),y=Y[Om(0x187)]['paths'][Om(0x16d)](G=>''+G[Om(0xdc)]),n=Om(0x1bb)+g+'),\x20subdomain\x20('+R+')';return this[Om(0x19c)](Om(0xc6),y,n);}),this[K(0x13b)]=g=>__awaiter(this,void 0x0,void 0x0,function*(){const Oo=K;return(yield inquirer[Oo(0x19d)]([{'type':Oo(0x1a5),'name':'confirmation','message':chalk_1['default']['yellowBright'](Oo(0x147)+(g||Oo(0x189))+'.\x20This\x20is\x20irreversible.\x20Please\x20confirm!'),'default':![]}]))[Oo(0x179)];}),this['loginPrompt']=(g,R)=>__awaiter(this,void 0x0,void 0x0,function*(){const Ov=K;_[Ov(0xcd)](g[Ov(0xbe)])&&(R[Ov(0x16f)]<=0x0?_[Ov(0xcf)](g,Ov(0xbe),Ov(0x133)):yield(0x0,utils_1[Ov(0xc2)])(0xa)(()=>__awaiter(this,void 0x0,void 0x0,function*(){const Oa=Ov,{name:Y}=yield inquirer[Oa(0x19d)]([{'type':Oa(0xbb),'name':Oa(0xbe),'message':'Choose\x20the\x20name\x20of\x20the\x20new\x20local\x20context:','default':'main-context'}]);if(!g[Oa(0x11b)]&&R[Oa(0xe8)](y=>y['name']===Y)){const {c:y}=yield inquirer[Oa(0x19d)]([{'type':Oa(0x1a5),'name':'c','message':Oa(0x116)+Y+'\x27\x20already\x20exists.\x20Do\x20you\x20want\x20to\x20override\x20this\x20context\x20(y)\x20or\x20enter\x20a\x20new\x20name\x20(N)?','default':![]}]);if(y===![])throw new Error(Oa(0x155));_[Oa(0xcf)](g,Oa(0x11b),!![]);}_[Oa(0xcf)](g,Oa(0xbe),Y);})));if(_['isUndefined'](g[Ov(0xdf)])){const Y=yield this[Ov(0x19b)]();_[Ov(0xcf)](g,Ov(0xdf),Y);}return g;}),this[K(0x19b)]=()=>__awaiter(this,void 0x0,void 0x0,function*(){const Oz=K,{token:g}=yield inquirer[Oz(0x19d)]([{'type':Oz(0x1b6),'name':Oz(0xdf),'mask':'*','message':Oz(0x17c)}]);return g;}),inquirer[K(0x130)]('search-list',inquirerSearchList),inquirer['registerPrompt'](K(0x1ae),inquirer_pagination_prompt_1[K(0x164)]);}[a9m(0xe3)](O,g){return __awaiter(this,void 0x0,void 0x0,function*(){const OW=a9g,R=yaml[OW(0x1a6)](O),Y=_['max'](R[OW(0xd2)]('\x0a')['map'](G=>G[OW(0x16f)])),y=chalk_1[OW(0x133)][OW(0xff)]('-'[OW(0xf8)](Y)+'\x0a'),{confirm:n}=yield inquirer[OW(0x19d)]([{'type':OW(0x191),'name':'confirm','message':''+chalk_1[OW(0x133)][OW(0x18a)][OW(0x1b1)]('Please\x20confirm\x20following\x20configuration:\x0a')+y+chalk_1[OW(0x133)][OW(0xb8)](R)+y,'choices':Object[OW(0x1b8)](ConfirmChoices)}]);switch(n){case ConfirmChoices[OW(0xed)]:return O;case ConfirmChoices[OW(0xb7)]:throw new Error(OW(0xe5));case ConfirmChoices['REPEAT']:return this[OW(0x190)](g);case ConfirmChoices[OW(0x1b7)]:return this['confirmationPrompt'](yield this[OW(0x140)](O),g);case ConfirmChoices[OW(0x111)]:yield this[OW(0x19f)](O);return this[OW(0xe3)](O,g);default:throw new Error(OW(0x19e));}});}[a9m(0x190)](O,g){return __awaiter(this,void 0x0,void 0x0,function*(){const OX=a9g;if((g===null||g===void 0x0?void 0x0:g[OX(0xf7)])!==undefined)this[OX(0xf7)]=g===null||g===void 0x0?void 0x0:g['resultCache'];this[OX(0x120)]=g===null||g===void 0x0?void 0x0:g['cmdPath'],this[OX(0x18c)]=g===null||g===void 0x0?void 0x0:g['skipValidation'];const R={};return yield this[OX(0x129)]([],O[OX(0x13d)]['body'],R),this[OX(0xf7)]=R,yield this[OX(0xe3)](R,O);});}[a9m(0x129)](O,g,R,Y){return __awaiter(this,void 0x0,void 0x0,function*(){const OM=a9g;let y;if(g['oneOf']&&!_[OM(0xfe)](g,OM(0xef))){if(g[OM(0x103)]['length']>0x1){const {choice:n}=yield inquirer[OM(0x19d)]([{'type':OM(0x191),'name':OM(0x184),'message':OM(0x16b)+(O[O[OM(0x16f)]-0x1]||'')+'\x20type?','choices':g['oneOf'][OM(0x16d)](G=>{const Ol=OM;var S;return(S=G[Ol(0x107)])!==null&&S!==void 0x0?S:'??';})}]);y=yield this[OM(0xc1)](O,g[OM(0x103)][OM(0xe8)](G=>G[OM(0x107)]===n),R,Y);}else{const G=g[OM(0x103)][0x0];_['set'](G,OM(0x107),g[OM(0x107)]),y=yield this['getType'](O,G,R,Y);}y={};}else{if(g['anyOf']&&!_['has'](g,OM(0xef))){if(g[OM(0xe6)][OM(0x16f)]>0x1){const {choice:S}=yield inquirer[OM(0x19d)]([{'type':OM(0x191),'name':'choice','message':OM(0x16b)+(O[O[OM(0x16f)]-0x1]||'')+OM(0xee),'choices':[...g['anyOf'][OM(0x16d)](q=>{const OC=OM;var V;return(V=q[OC(0x107)])!==null&&V!==void 0x0?V:'??';}),'don\x27t\x20change']}]);S!==OM(0x166)&&(y=yield this[OM(0xc1)](O,g['anyOf']['find'](q=>q[OM(0x107)]===S),R,Y));}else{const q=g[OM(0xe6)][0x0];_[OM(0xcf)](q,OM(0x107),g[OM(0x107)]),y=yield this[OM(0xc1)](O,q,R,Y);}y={};}else y=yield this[OM(0xc1)](O,g,R,Y);}return y;});}['getInnerType'](O,g,R,Y){var y;return __awaiter(this,void 0x0,void 0x0,function*(){const OK=a9g;if(Y===![]){const {addEntry:S}=yield inquirer[OK(0x19d)]([{'type':'confirm','name':OK(0x169),'message':this['getPathString'](g,OK(0x158),O===null||O===void 0x0?void 0x0:O[OK(0x107)]),'default':![]}]);if(!S)return R;}const n=Object['keys']((y=O===null||O===void 0x0?void 0x0:O['properties'])!==null&&y!==void 0x0?y:[]),G=O[OK(0x1aa)]||[];if(n[OK(0x16f)]>0x0)for(const q of n){const V=g[OK(0x10f)](q);if(g[OK(0x16f)]>0x0&&!_['has'](R,g[OK(0x1b2)]('.')))_[OK(0xcf)](R,g[OK(0x1b2)]('.'),{});yield this[OK(0x129)](V,O[OK(0xef)][q],R,G['includes'](q));}else yield this['getType'](g,Object['assign'](Object[OK(0x150)]({},O),{'type':OK(0xe0)}),R,Y);return R;});}['askArrayEntry'](O,g,R,Y){return __awaiter(this,void 0x0,void 0x0,function*(){const OH=a9g;if(g&&R)return!![];const y=g?OH(0x158):OH(0xe7),{addEntry:n}=yield inquirer[OH(0x19d)]([{'type':OH(0x1a5),'name':OH(0x169),'message':this[OH(0xe9)](O,y,g?Y:undefined),'default':![]}]);return n;});}[a9m(0xc1)](O,g,R,Y){return __awaiter(this,void 0x0,void 0x0,function*(){const Of=a9g;let y;const n=O[Of(0x1b2)]('.');switch(g===null||g===void 0x0?void 0x0:g[Of(0x134)]){case'array':{let G=!![];while(yield this['askArrayEntry'](O,G,Y,g===null||g===void 0x0?void 0x0:g[Of(0x107)])){const S=_[Of(0x1b9)](R,n);_[Of(0x146)](R,n),yield this['getType'](O,g[Of(0x196)],R);const q=_[Of(0x1b9)](R,n);!_['isArray'](S)?_[Of(0xcf)](R,n,[q]):(S['push'](q),_['set'](R,n,S)),G=![];}return y||[];}case Of(0x194):{return y=yield this['getInnerType'](g,O,R,Y),y;}case Of(0xe0):y=(0x0,utils_1[Of(0x10a)])(yield this[Of(0x151)](O,g,Y))||undefined;break;case Of(0x185):case Of(0x15c):case Of(0x106):default:y=yield this[Of(0x151)](O,g,Y,R);break;}return!_[Of(0xcd)](y)&&_[Of(0xcf)](R,n,y),y;});}[a9m(0x151)](O,g,R,Y){var y;return __awaiter(this,void 0x0,void 0x0,function*(){const Oi=a9g,n=O[O['length']-0x1],{defaultValue:defaultValue=(y=g===null||g===void 0x0?void 0x0:g['example'])!==null&&y!==void 0x0?y:g===null||g===void 0x0?void 0x0:g['default'],choices:choices=g===null||g===void 0x0?void 0x0:g['enum'],pagination:G}=yield(0x0,api_helpers_1[Oi(0xf5)])(n,this[Oi(0xd1)],this[Oi(0x120)],Y,this['pathVars'],O);let S='input';if(!_['isUndefined'](choices)&&choices[Oi(0x16f)]>0x0){if(G!==undefined&&G[Oi(0x12c)]!==undefined)S=Oi(0x1ae);else choices[Oi(0x16f)]>0x4&&typeof choices[0x0]===Oi(0x185)?S='search-list':S=Oi(0x191);}else{if((g===null||g===void 0x0?void 0x0:g[Oi(0x134)])===Oi(0x15c))S=Oi(0x1a5);else{if((g===null||g===void 0x0?void 0x0:g[Oi(0x134)])===Oi(0x106))S='input';else(g===null||g===void 0x0?void 0x0:g[Oi(0x134)])===Oi(0xe0)&&(S=Oi(0x131));}}let q=R!==![]?!_[Oi(0x162)](defaultValue)?defaultValue:JSON[Oi(0x114)](defaultValue):_['isBoolean'](defaultValue)?defaultValue:Oi(0x166);if(choices)q=q['toString']();_[Oi(0xfe)](this['resultCache'],O[Oi(0x1b2)]('.'))&&(q=this[Oi(0xf7)][O[Oi(0x1b2)]('.')]);const V=choices&&R===![]?[Oi(0x166),...choices]:choices,e=(g===null||g===void 0x0?void 0x0:g[Oi(0x134)])===Oi(0x106),L=Object[Oi(0x150)]({'type':S,'name':'id','message':this['getQuestionString'](O,g),'choices':V,'default':q,'filter':this['filter'](S,R),'validate':this[Oi(0x11a)](g,R,e)},G),N=(yield inquirer[Oi(0x19d)]([L]))['id'];if(N===Oi(0x166)||N==='')return undefined;if(e)return parseInt(N,0xa);return N;});}[a9m(0xc7)](O,g){const OA=a9m,R=(g===null||g===void 0x0?void 0x0:g[OA(0x134)])!==OA(0x15c)?OA(0x17d):OA(0x108);return this['getPathString'](O,R,g===null||g===void 0x0?void 0x0:g[OA(0x107)]);}['askForProject'](){return __awaiter(this,void 0x0,void 0x0,function*(){const OZ=a9g,O=yield this[OZ(0xd1)][OZ(0x191)][OZ(0xf0)]['all']({})['then'](g=>g['data'][OZ(0xf0)][OZ(0x16d)](R=>R['id']));return yield this['askForResource']('project',O);});}['askForProjectScopedResource'](O,g,R,Y){return __awaiter(this,void 0x0,void 0x0,function*(){const Oc=a9g,y=R||this[Oc(0xd1)][Oc(0x145)]['getCurrentProjectName']();if(_[Oc(0xcd)](y))throw new Error(Oc(0x1a2));const n=yield g(y);return yield this[Oc(0x19c)](O,n,(Y?Y+Oc(0x152):'')+Oc(0x14a)+y+'\x27');});}[a9m(0xcc)](O,g,R,Y){return __awaiter(this,void 0x0,void 0x0,function*(){const OU=a9g,y=R||this[OU(0xd1)][OU(0x145)]['getCurrentProjectName']();if(_['isUndefined'](y))throw new Error(OU(0x1a2));const n=yield g(y);return yield this['askForResourcePaginated'](O,n,(Y?Y+OU(0x152):'')+OU(0x14a)+y+'\x27');});}['askForDomain'](){return __awaiter(this,void 0x0,void 0x0,function*(){const Od=a9g,O=yield this[Od(0xd1)][Od(0x191)][Od(0x178)][Od(0xdd)]({}),g=O[Od(0x187)][Od(0x178)][Od(0x16d)](R=>R['name']);return this[Od(0x19c)](Od(0x1ad),g);});}[a9m(0xf2)](){return __awaiter(this,void 0x0,void 0x0,function*(){const Or=a9g,O=yield this[Or(0xd1)][Or(0x191)]['registryCredentials']['all']({}),g=O[Or(0x187)]['credentials'][Or(0x16d)](R=>R['id']);return this['askForResource'](Or(0x141),g);});}[a9m(0x14d)](O){this['pathVars']=O;}}exports[a9m(0x167)]=InquirerHelper;
1
+ 'use strict';const a9y=a9h;(function(j,h){const Q=a9h,N=j();while(!![]){try{const F=-parseInt(Q(0x264))/0x1+-parseInt(Q(0x210))/0x2*(parseInt(Q(0x1e6))/0x3)+-parseInt(Q(0x1f8))/0x4*(-parseInt(Q(0x254))/0x5)+parseInt(Q(0x205))/0x6*(-parseInt(Q(0x1bc))/0x7)+parseInt(Q(0x1fa))/0x8*(-parseInt(Q(0x27a))/0x9)+-parseInt(Q(0x1f5))/0xa+parseInt(Q(0x1d3))/0xb;if(F===h)break;else N['push'](N['shift']());}catch(K){N['push'](N['shift']());}}}(a9j,0x45c37));function a9j(){const jz=['startedAt','next','6560WimYwF','\x20type?','746104zSiKWf','split','opt','safeLoad','skipValidation','getCurrentProjectName','No,\x20but\x20save\x20as\x20file','What\x20do\x20you\x20want\x20to\x20use\x20as','templates','askForBuild','pathVars','78cXOQDy','__awaiter','js-yaml','message','editedResult','\x20to\x20use:','call','Go\x20to\x20editor','DynamicReloadPaginationPrompt','must\x20be\x20a\x20valid\x20non-empty\x20json\x20string','fileName','10826XVVTns','REPEAT','lodash','volume','repeat','test','askConfirm','override','json','cursor','this\x20option\x20is\x20required,\x20please\x20answer','log\x20sink','addEntry','saveFile','job\x20builds','builds','./pagination/inquirer-pagination-prompt','Aborted.','yellowBright','prompt','No,\x20abort','Yes,\x20send','throw','nextPageCursor','YES','data','keys','job\x20runs','minimum','\x20(startedAt:\x20','service\x20containers','value','create','then','logSinks','Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.','whiteBright',',\x20supported\x20types:\x20[json|yaml|yml]','don\x27t\x20change','join','subdomains','all-job-runs','set','getPathString','stringify','restores','must\x20be\x20longer\x20than\x20or\x20equal\x20to\x20','for\x20this\x20','askForProjectScopedResourcePaginated','all-containers','askForPipeline','askForTag','\x20in\x20','templateRuns','isUndefined','jobs','confirmation','registryCredentials','default','underline','confirmationPrompt','domain\x20(','blue','safeDump','yaml','hasOwnProperty','tokenPrompt','toUpperCase','1385BbKTcZ','inquirer-search-list','editPayload','minLength','askForProjectScopedResource','paths','domains','validate','writable','askForService','Configuration\x20file\x20written\x20to\x20','\x20characters,\x20is\x20','body','runs','green','list','285467xZVPHD','has','search-list','editor','askForTemplateRun','SAVE','Enter\x20the\x20','success','array','description','retrievePayloadViaInteractiveCli','must\x20be\x20bigger\x20than\x20or\x20equal\x20to\x20','clusters','What\x27s\x20the\x20','.*\x5c.(json|yaml|yml)$','all-builds','secret','askForTemplate','Template\x20id\x20not\x20provided.','grey','isArray','yml','18UdSlwk','token','askForCredentials','Provide\x20a\x20file\x20path\x20to\x20write\x20the\x20configuration\x20to\x20(<name>.[json|yaml|yml])','\x20and\x20it\x20','chalk','fullName','loginPrompt','createdAt','__esModule','greenBright','template','askForProject','getInnerType','slice','containers','propToType','rawObject','must\x20be\x20smaller\x20than\x20or\x20equal\x20to\x20','Context\x20with\x20name\x20\x27','cmdPath','found','maximum','askForResourcePaginated','nextCursor','__createBinding','get','askForDomain','EDIT','defaultPaginationPageSize','isObject','defineProperty','./utils','required','deleteWarningPrompt','items','Should\x20it\x20be','boolean','askForSubdomainPath','max','find','blueBright','\x20(completedAt:\x20','askForSecret','type','),\x20subdomain\x20(','Something\x20unexpected\x20happened.','enum','choice','name','Please\x20confirm\x20following\x20configuration:\x0a','project:\x20\x27','resultCache','Choose\x20the\x20name\x20of\x20the\x20new\x20local\x20context:','askForLogSink','addon','askForJobRun','oneOf','.\x20This\x20is\x20irreversible.\x20Please\x20confirm!','InquirerHelper','integer','writeFileSync','askForAddon','askGeneric','main-context','unset','unshift','assign','backup\x20destination','string','pagination','askForResource','isValidJSON','askForJob','charAt','job:\x20\x27','completedAt','password','not\x20completed','askForContainer','ask','Do\x20you\x20want\x20to\x20add','Writing\x20configuration\x20failed:\x20','No\x20containers\x20found','domain','maxLength','pipelines','106827GKTTqN','backupDestinations','template\x20run','prototype','projects','service:\x20\x27','volumes','bold','No\x20','doesn\x27t\x20match\x20pattern\x20\x27','\x20characters','uri','toString','length','service','services','all','__setModuleDefault','isBoolean','retry','getType','credentials','__importDefault','11777271xSVKqG','backups','red','pagination-prompt','registerPrompt','__importStar','pipeline','Context\x20name\x20already\x20exists.','anyOf','No,\x20edit','bgGrey','confirm','push','service\x20build','secrets','Choose\x20the\x20','apiClient','properties','configurable','219GUETjG','pattern','job','pop','getQuestionString','elements','input','Unexpected\x20file\x20type:\x20','filter','tags','No,\x20repeat','example','warning','ABORT','map','1736550QcWMEq'];a9j=function(){return jz;};return a9j();}var __createBinding=this&&this[a9y(0x293)]||(Object[a9y(0x230)]?function(j,h,N,F){const D=a9y;if(F===undefined)F=N;var K=Object['getOwnPropertyDescriptor'](h,N);(!K||('get'in K?!h[D(0x283)]:K[D(0x25c)]||K[D(0x1e5)]))&&(K={'enumerable':!![],'get':function(){return h[N];}}),Object[D(0x299)](j,F,K);}:function(j,h,N,F){if(F===undefined)F=N;j[F]=h[N];}),__setModuleDefault=this&&this[a9y(0x1cd)]||(Object[a9y(0x230)]?function(j,h){const i=a9y;Object[i(0x299)](j,i(0x24a),{'enumerable':!![],'value':h});}:function(j,h){j['default']=h;}),__importStar=this&&this[a9y(0x1d8)]||function(j){const W=a9y;if(j&&j[W(0x283)])return j;var h={};if(j!=null){for(var N in j)if(N!==W(0x24a)&&Object[W(0x1bf)][W(0x251)][W(0x20b)](j,N))__createBinding(h,j,N);}return __setModuleDefault(h,j),h;},__awaiter=this&&this[a9y(0x206)]||function(j,h,N,F){function K(G){return G instanceof N?G:new N(function(d){d(G);});}return new(N||(N=Promise))(function(G,d){const a=a9h;function x(I){const E=a9h;try{e(F[E(0x1f7)](I));}catch(X){d(X);}}function m(I){const t=a9h;try{e(F[t(0x226)](I));}catch(X){d(X);}}function e(I){const H=a9h;I['done']?G(I[H(0x22f)]):K(I[H(0x22f)])[H(0x231)](x,m);}e((F=F['apply'](j,h||[]))[a(0x1f7)]());});},__importDefault=this&&this[a9y(0x1d2)]||function(j){return j&&j['__esModule']?j:{'default':j};};Object[a9y(0x299)](exports,'__esModule',{'value':!![]}),exports[a9y(0x1a0)]=void 0x0;const _=__importStar(require(a9y(0x212))),chalk_1=__importDefault(require(a9y(0x27f))),fs=__importStar(require('fs')),utils_1=require(a9y(0x29a)),api_helpers_1=require('./api-helpers'),inquirer_pagination_prompt_1=require(a9y(0x220)),inquirer=require('inquirer'),inquirerSearchList=require(a9y(0x255)),yaml=require(a9y(0x207));function a9h(j,h){const N=a9j();return a9h=function(F,K){F=F-0x18c;let G=N[F];return G;},a9h(j,h);}var ConfirmChoices;(function(j){const q=a9y;j[q(0x228)]=q(0x225),j[q(0x211)]=q(0x1f0),j[q(0x296)]=q(0x1dc),j[q(0x269)]=q(0x200),j[q(0x1f3)]=q(0x224);}(ConfirmChoices||(ConfirmChoices={})));class InquirerHelper{constructor(j){const R=a9y;this[R(0x1e3)]=j,this[R(0x297)]=0x32,this[R(0x256)]=h=>__awaiter(this,void 0x0,void 0x0,function*(){const n=R,{editedResult:N}=yield inquirer['prompt']([{'type':n(0x267),'name':n(0x209),'message':n(0x20c),'default':yaml['safeDump'](h)}]);return yaml[n(0x1fd)](N);}),this[R(0x21d)]=h=>__awaiter(this,void 0x0,void 0x0,function*(){const k=R,N=d=>k(0x1ed)+d+k(0x235);function F(){return __awaiter(this,void 0x0,void 0x0,function*(){const L=a9h;return inquirer[L(0x223)]([{'type':L(0x1ec),'name':L(0x20f),'message':L(0x27d),'validate':d=>new RegExp(L(0x272))[L(0x215)](d)?!![]:N(d)}]);});}const {fileName:K}=yield F(),G=K[k(0x1c8)]()[k(0x1fb)]('.')[k(0x1e9)]();try{switch(G){case k(0x218):(0x0,utils_1[k(0x26b)])('Configuration\x20file\x20written\x20to\x20'+K);return fs['writeFileSync'](K,JSON[k(0x23c)](h,null,'\x20\x20'));case k(0x250):case k(0x279):(0x0,utils_1[k(0x26b)])(k(0x25e)+K);return fs[k(0x1a2)](K,yaml[k(0x24f)](h));default:(0x0,utils_1[k(0x1f2)])(N(G));}}catch(d){(0x0,utils_1[k(0x1f2)])(k(0x1b7)+d[k(0x208)]);}return undefined;}),this['filter']=(h,N)=>F=>{const A=R,K=typeof F===A(0x1aa)?F['trim']():F;return N===![]&&K==='don\x27t\x20change'?'':K;},this[R(0x25b)]=(h,N,F)=>K=>{const v=R;if(this[v(0x1fe)]===!![])return!![];const G=[];if(K===''||K===v(0x236)){if(N!==![])G[v(0x1df)](v(0x21a));else return!![];}h[v(0x191)]===v(0x1aa)&&!_[v(0x246)](h['pattern'])&&G[v(0x1df)](new RegExp(h[v(0x1e7)])[v(0x215)](K)?!![]:v(0x1c5)+h[v(0x1e7)]+'\x27');h[v(0x191)]===v(0x1aa)&&!_[v(0x246)](h[v(0x257)])&&G[v(0x1df)](K['length']>=h[v(0x257)]?!![]:v(0x23e)+h['minLength']+'\x20characters,\x20is\x20'+K[v(0x1c9)]+v(0x1c6));h[v(0x191)]===v(0x1aa)&&!_[v(0x246)](h[v(0x1ba)])&&G[v(0x1df)](K[v(0x1c9)]<=h[v(0x1ba)]?!![]:'must\x20be\x20shorter\x20than\x20or\x20equal\x20to\x20'+h['maxLength']+v(0x25f)+K[v(0x1c9)]+v(0x1c6));F&&Number['isNaN'](parseInt(K,0xa))&&G['push']('must\x20be\x20a\x20number,\x20is\x20'+K);h[v(0x191)]==='integer'&&!_[v(0x246)](h[v(0x22c)])&&G['push'](K>=h[v(0x22c)]?!![]:v(0x26f)+h[v(0x22c)]);h[v(0x191)]===v(0x1a1)&&!_[v(0x246)](h[v(0x290)])&&G['push'](K<=h[v(0x290)]?!![]:v(0x28c)+h[v(0x290)]);if(h['type']===v(0x28b)){const m=(0x0,utils_1[v(0x1ad)])(K);G['push'](m===![]||_['isEmpty'](m)?v(0x20e):!![]);}const d=G[v(0x1ee)](P=>P!==!![]),x=(h===null||h===void 0x0?void 0x0:h[v(0x1f1)])?'\x0a'+chalk_1[v(0x24a)][v(0x1d5)]('>>')+'\x20Example:\x20'+chalk_1[v(0x24a)][v(0x234)](JSON[v(0x23c)](h[v(0x1f1)])):'';return d['length']>0x0?d[v(0x237)](chalk_1['default'][v(0x24b)](v(0x27e)))+x:!![];},this[R(0x23b)]=(h,N,F)=>{const s=R,K=h[h[s(0x1c9)]-0x1];function G(){const U=s;return h[U(0x288)](0x0,-0x1)[U(0x1f4)](m=>m[U(0x1af)](0x0)[U(0x253)]()+m[U(0x288)](0x1))[U(0x237)]('>');}const d=h['length']>0x1?chalk_1[s(0x24a)][s(0x1dd)]['whiteBright'](G())+':\x20':'',x=F?'\x20('+chalk_1[s(0x24a)][s(0x24e)](F)+')':'';return chalk_1[s(0x24a)]['reset'](''+d+N+'\x20'+chalk_1[s(0x24a)]['bold'][s(0x284)](K)+x+'?');},this[R(0x1ac)]=(h,N,F)=>__awaiter(this,void 0x0,void 0x0,function*(){const r=R;if(N[r(0x1c9)]<0x1){const d=F?r(0x23f)+F:r(0x28f);throw new Error(r(0x1c4)+h+'\x20'+d+'.');}const K=r(0x1e2)+h+r(0x20a),G=N['length']>0x4?r(0x266):r(0x263);return(yield inquirer[r(0x223)]([{'type':G,'name':r(0x196),'message':K,'choices':N}]))[r(0x196)];}),this[R(0x291)]=(h,N,F)=>__awaiter(this,void 0x0,void 0x0,function*(){const V=R,{elements:K,nextCursor:G}=yield N();if(K['length']<0x1){const m=F?V(0x23f)+F:V(0x28f);throw new Error(V(0x1c4)+h+'\x20'+m+'.');}const d='Choose\x20the\x20'+h+'\x20to\x20use:';if(G!==undefined){const P=({nextPageCursor:e})=>__awaiter(this,void 0x0,void 0x0,function*(){const f=V,I=yield N(e);return{'elements':I[f(0x1eb)],'nextPageCursor':I[f(0x292)]};});return(yield inquirer[V(0x223)]([{'type':V(0x1d6),'name':'name','message':d,'choices':K,'nextPageCursor':G,'loadMore':P}]))[V(0x196)];}const x=K[V(0x1c9)]>0x4?'search-list':'list';return(yield inquirer['prompt']([{'type':x,'name':V(0x196),'message':d,'choices':K}]))[V(0x196)];}),this[R(0x1a4)]=(h,N)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const O=R,F=''+(N?'('+chalk_1['default'][O(0x24e)](N)+')\x20':''),K=O(0x26a)+chalk_1['default'][O(0x262)](h)+'\x20'+F+'to\x20use:',G=this[O(0x25b)]({'type':O(0x1aa),'required':!![]});return(yield inquirer[O(0x223)]([{'type':O(0x1ec),'name':O(0x196),'message':K,'validate':G}]))[O(0x196)];}),this[R(0x216)]=h=>__awaiter(this,void 0x0,void 0x0,function*(){const z=R;return(yield inquirer[z(0x223)]([{'type':z(0x1de),'name':z(0x196),'message':h,'default':!![]}]))[z(0x196)];}),this[R(0x25d)]=h=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const T=R,N=F=>__awaiter(this,void 0x0,void 0x0,function*(){const b=a9h,K=yield this[b(0x1e3)][b(0x263)][b(0x1cb)][b(0x1cc)]({'parameters':{'projectId':F}}),G=K[b(0x229)][b(0x1cb)][b(0x1f4)](d=>d['id']);return G;});return this[T(0x258)](T(0x1ca),N,h);}),this[R(0x275)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Z=R,h=N=>__awaiter(this,void 0x0,void 0x0,function*(){const u=a9h;var F;const K=yield this[u(0x1e3)][u(0x263)]['templates']({'options':{'per_page':this['defaultPaginationPageSize'],'cursor':N}}),G=K[u(0x229)][u(0x202)][u(0x1f4)](d=>d['id']);return{'elements':G,'nextCursor':(F=K[u(0x1ab)])===null||F===void 0x0?void 0x0:F[u(0x219)]};});return this[Z(0x291)](Z(0x285),h);}),this[R(0x243)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Y=R,h=N=>__awaiter(this,void 0x0,void 0x0,function*(){const S=a9h;var F,K,G;const d=yield this[S(0x1e3)][S(0x263)][S(0x1ef)]({'options':{'per_page':this[S(0x297)],'cursor':N}}),x=(K=(F=d[S(0x229)][S(0x1ef)])===null||F===void 0x0?void 0x0:F[S(0x1f4)](m=>m['id']))!==null&&K!==void 0x0?K:[];return{'elements':x,'nextCursor':(G=d[S(0x1ab)])===null||G===void 0x0?void 0x0:G[S(0x219)]};});return this[Y(0x291)]('tag',h);}),this['askForBackupDestination']=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const M=R;var h;const N=yield this[M(0x1e3)][M(0x263)][M(0x1bd)][M(0x1cc)]({}),F=(h=N[M(0x229)][M(0x1bd)][M(0x1f4)](K=>K[M(0x196)]))!==null&&h!==void 0x0?h:[];return this[M(0x1ac)](M(0x1a9),F);}),this['askForClusterId']=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const C=R,h=N=>__awaiter(this,void 0x0,void 0x0,function*(){const w=a9h;var F,K,G;const d=yield this[w(0x1e3)][w(0x263)]['cloud'][w(0x270)]({'options':{'per_page':this[w(0x297)],'cursor':N}}),x=(K=(F=d[w(0x229)][w(0x270)])===null||F===void 0x0?void 0x0:F[w(0x1f4)](m=>m[w(0x196)]))!==null&&K!==void 0x0?K:[];return{'elements':x,'nextCursor':(G=d[w(0x1ab)])===null||G===void 0x0?void 0x0:G[w(0x219)]};});return this[C(0x291)]('cluster\x20id',h);}),this[R(0x268)]=h=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const o=R;if(_[o(0x246)](h))throw new Error(o(0x276));const N=F=>__awaiter(this,void 0x0,void 0x0,function*(){const g=o;var K;let G=this[g(0x297)];const d=yield this[g(0x1e3)][g(0x263)]['templateRuns']({'parameters':{'templateId':h},'options':{'per_page':G,'cursor':F}}),x=d['data'][g(0x245)][g(0x1f4)](m=>m['id']+g(0x22d)+m[g(0x282)]+')');return{'elements':x,'nextCursor':(K=d[g(0x1ab)])===null||K===void 0x0?void 0x0:K[g(0x219)]};});return this['askForResourcePaginated'](o(0x1be),N)['then'](F=>F['split']('\x20')[0x0]);}),this[R(0x19b)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const j0=R,h=N=>__awaiter(this,void 0x0,void 0x0,function*(){const B=a9h;var F;let K=this[B(0x297)];const G=yield this['apiClient'][B(0x263)][B(0x232)]({'options':{'per_page':K,'cursor':N}}),d=G['data']['logSinks'][B(0x1f4)](x=>x['id']);return{'elements':d,'nextCursor':(F=G[B(0x1ab)])===null||F===void 0x0?void 0x0:F[B(0x219)]};});return this['askForResourcePaginated'](j0(0x21b),h);}),this[R(0x242)]=h=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const j2=R,N=F=>__awaiter(this,void 0x0,void 0x0,function*(){const j1=a9h,K=yield this['apiClient'][j1(0x263)][j1(0x1bb)]['all']({'parameters':{'projectId':F}});return K[j1(0x229)][j1(0x1bb)]['map'](G=>G['id']);});return this[j2(0x258)](j2(0x1d9),N,h);}),this[R(0x1ae)]=h=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const j4=R,N=F=>__awaiter(this,void 0x0,void 0x0,function*(){const j3=a9h,K=yield this['apiClient'][j3(0x263)][j3(0x247)][j3(0x1cc)]({'parameters':{'projectId':F}}),G=K[j3(0x229)][j3(0x247)][j3(0x1f4)](d=>d['id']);return G;});return this[j4(0x258)](j4(0x1e8),N,h);}),this[R(0x19d)]=(h,N,F=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const j5=R,K=j5(0x239),G=d=>x=>__awaiter(this,void 0x0,void 0x0,function*(){const j6=j5;var m;const P=yield this[j6(0x1e3)]['get']['job']['runs']({'parameters':{'projectId':d,'jobId':h},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':x}}),e=P[j6(0x229)][j6(0x261)][j6(0x1f4)](I=>I['id']+j6(0x22d)+I[j6(0x1f6)]+')');return F&&e[j6(0x1a7)](K),{'elements':e,'nextCursor':(m=P[j6(0x1ab)])===null||m===void 0x0?void 0x0:m[j6(0x219)]};});return this[j5(0x240)](j5(0x22b),G,N,'job:\x20\x27'+h+'\x27')[j5(0x231)](d=>{const j7=j5,x=d[j7(0x1fb)]('\x20')[0x0];if(x===K)return undefined;return x;});}),this[R(0x203)]=(h,N,F,K=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const j8=R,G=j8(0x273);if(F!==undefined){const d=x=>m=>__awaiter(this,void 0x0,void 0x0,function*(){const j9=j8;var P;const e=yield this[j9(0x1e3)][j9(0x294)]['job'][j9(0x21f)]({'parameters':{'projectId':x,'jobId':F},'options':{'per_page':this[j9(0x297)],'cursor':m}}),I=e[j9(0x229)][j9(0x21f)][j9(0x1f4)](X=>X['id']+j9(0x22d)+X[j9(0x282)]+')');return K&&I['unshift'](G),{'elements':I,'nextCursor':(P=e[j9(0x1ab)])===null||P===void 0x0?void 0x0:P[j9(0x219)]};});return this['askForProjectScopedResourcePaginated'](j8(0x21e),d,h,'job:\x20\x27'+F+'\x27')[j8(0x231)](x=>{const jj=j8,m=x[jj(0x1fb)]('\x20')[0x0];if(m===G)return undefined;return m;});}if(N!==undefined){const x=m=>P=>__awaiter(this,void 0x0,void 0x0,function*(){const jh=j8;var e;const I=yield this[jh(0x1e3)]['get'][jh(0x1ca)]['builds']({'parameters':{'projectId':m,'serviceId':N},'options':{'per_page':this[jh(0x297)],'cursor':P}}),X=I[jh(0x229)][jh(0x21f)]['map'](l=>l['id']+jh(0x22d)+l['createdAt']+')');if(K)X['unshift'](G);return{'elements':X,'nextCursor':(e=I['pagination'])===null||e===void 0x0?void 0x0:e[jh(0x219)]};});return this[j8(0x240)](j8(0x1e0),x,h,j8(0x1c1)+F+'\x27')[j8(0x231)](m=>{const jN=j8,P=m[jN(0x1fb)]('\x20')[0x0];if(P===G)return undefined;return P;});}throw new Error('No\x20builds\x20found');}),this[R(0x1b4)]=(h,N,F,K=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const jF=R,G=jF(0x241);if(F!==undefined){const d=x=>m=>__awaiter(this,void 0x0,void 0x0,function*(){const jK=jF;var P,e;const I=yield this[jK(0x1e3)][jK(0x294)][jK(0x1e8)][jK(0x289)]({'parameters':{'projectId':x,'jobId':F},'options':{'per_page':this[jK(0x297)],'cursor':m}}),X=(P=I[jK(0x229)][jK(0x289)])!==null&&P!==void 0x0?P:[],l=X===null||X===void 0x0?void 0x0:X[jK(0x1f4)](p=>p['name']+jK(0x22d)+p['createdAt']+')');return K&&l[jK(0x1a7)](G),{'elements':l,'nextCursor':(e=I[jK(0x1ab)])===null||e===void 0x0?void 0x0:e[jK(0x219)]};});return this[jF(0x240)]('job\x20containers',d,h,jF(0x1b0)+F+'\x27')[jF(0x231)](x=>{const jG=jF,m=x[jG(0x1fb)]('\x20')[0x0];if(m===G)return undefined;return m;});}if(N!==undefined){const x=m=>P=>__awaiter(this,void 0x0,void 0x0,function*(){const jd=jF;var e,I;const X=yield this[jd(0x1e3)][jd(0x294)][jd(0x1ca)]['containers']({'parameters':{'projectId':m,'serviceId':N},'options':{'per_page':this[jd(0x297)],'cursor':P}}),l=(e=X[jd(0x229)]['containers'])!==null&&e!==void 0x0?e:[],p=l[jd(0x1f4)](J=>J[jd(0x196)]+'\x20(startedAt:\x20'+J[jd(0x282)]+')');if(K)p===null||p===void 0x0?void 0x0:p[jd(0x1a7)](G);return{'elements':p,'nextCursor':(I=X[jd(0x1ab)])===null||I===void 0x0?void 0x0:I[jd(0x219)]};});return this[jF(0x240)](jF(0x22e),x,h,jF(0x1c1)+F+'\x27')['then'](m=>{const jx=jF,P=m[jx(0x1fb)]('\x20')[0x0];if(P===G)return undefined;return P;});}throw new Error(jF(0x1b8));}),this[R(0x1a3)]=h=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const jP=R,N=F=>__awaiter(this,void 0x0,void 0x0,function*(){const jm=a9h,K=yield this[jm(0x1e3)][jm(0x263)]['addons']['all']({'parameters':{'projectId':F}});return K[jm(0x229)]['addons'][jm(0x1f4)](G=>G['id']);});return this[jP(0x258)](jP(0x19c),N,h);}),this['askForAddonBackup']=(h,N)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const jI=R,F=K=>G=>__awaiter(this,void 0x0,void 0x0,function*(){const je=a9h;var d;const x=yield this[je(0x1e3)][je(0x294)][je(0x19c)][je(0x1d4)]({'parameters':{'projectId':K,'addonId':N},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':G}});return{'elements':x[je(0x229)][je(0x1d4)]['map'](m=>m['id']+je(0x18f)+(m['completedAt']||'not\x20completed')+')'),'nextCursor':(d=x[je(0x1ab)])===null||d===void 0x0?void 0x0:d[je(0x219)]};});return this[jI(0x240)](jI(0x1d4),F,h,'addon:\x20\x27'+N+'\x27')[jI(0x231)](K=>K[jI(0x1fb)]('\x20')[0x0]);}),this['askForAddonRestore']=(h,N,F)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const jl=R,K=G=>d=>__awaiter(this,void 0x0,void 0x0,function*(){const jX=a9h;var x;const m=yield this[jX(0x1e3)][jX(0x294)][jX(0x19c)]['backup'][jX(0x23d)]({'parameters':{'projectId':G,'addonId':N,'backupId':F},'options':{'per_page':this[jX(0x297)],'cursor':d}});return{'elements':m[jX(0x229)][jX(0x23d)]['map'](P=>P['id']+jX(0x18f)+(P[jX(0x1b1)]||jX(0x1b3))+')'),'nextCursor':(x=m[jX(0x1ab)])===null||x===void 0x0?void 0x0:x[jX(0x219)]};});return this[jl(0x240)]('restore',K,h,'addon:\x20\x27'+N+'\x27')[jl(0x231)](G=>G['split']('\x20')[0x0]);}),this['askForVolume']=h=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const jJ=R,N=F=>__awaiter(this,void 0x0,void 0x0,function*(){const jp=a9h;return(yield this['apiClient']['list'][jp(0x1c2)]({'parameters':{'projectId':F}}))[jp(0x229)]['map'](K=>K['id']);});return this[jJ(0x258)](jJ(0x213),N,h);}),this[R(0x190)]=h=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const jy=R,N=F=>__awaiter(this,void 0x0,void 0x0,function*(){const jQ=a9h,K=yield this['apiClient'][jQ(0x263)][jQ(0x1e1)][jQ(0x1cc)]({'parameters':{'projectId':F}});return K['data'][jQ(0x1e1)][jQ(0x1f4)](G=>G['id']);});return this[jy(0x258)](jy(0x274),N,h);}),this['askForSubdomain']=h=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const jD=R,N=yield this['apiClient'][jD(0x294)][jD(0x1b9)]({'parameters':{'domain':h}}),F=N[jD(0x229)][jD(0x238)][jD(0x1f4)](G=>G['name']+'\x20(full\x20domain:\x20'+G[jD(0x280)]+')'),K=jD(0x24d)+h+')';return this['askForResource']('subdomain',F,K)['then'](G=>G['split']('\x20')[0x0]);}),this[R(0x2a0)]=(h,N)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const ji=R,F=yield this[ji(0x1e3)][ji(0x263)]['subdomain']['path']({'parameters':{'domain':h,'subdomain':N}}),K=F[ji(0x229)][ji(0x259)]['map'](x=>''+x[ji(0x1c7)]),G=ji(0x24d)+h+ji(0x192)+N+')';return this[ji(0x1ac)]('subdomainPath',K,G);}),this[R(0x29c)]=h=>__awaiter(this,void 0x0,void 0x0,function*(){const jW=R;return(yield inquirer[jW(0x223)]([{'type':jW(0x1de),'name':'confirmation','message':chalk_1[jW(0x24a)][jW(0x222)]('WARNING:\x20You\x20are\x20about\x20to\x20delete\x20'+(h||'a\x20Northflank\x20resource')+jW(0x19f)),'default':![]}]))[jW(0x248)];}),this[R(0x281)]=(h,N)=>__awaiter(this,void 0x0,void 0x0,function*(){const jE=R;_[jE(0x246)](h['name'])&&(N[jE(0x1c9)]<=0x0?_[jE(0x23a)](h,'name',jE(0x24a)):yield(0x0,utils_1[jE(0x1cf)])(0xa)(()=>__awaiter(this,void 0x0,void 0x0,function*(){const jt=jE,{name:F}=yield inquirer[jt(0x223)]([{'type':jt(0x1ec),'name':jt(0x196),'message':jt(0x19a),'default':jt(0x1a5)}]);if(!h[jt(0x217)]&&N[jt(0x18d)](K=>K['name']===F)){const {c:K}=yield inquirer[jt(0x223)]([{'type':jt(0x1de),'name':'c','message':jt(0x28d)+F+'\x27\x20already\x20exists.\x20Do\x20you\x20want\x20to\x20override\x20this\x20context\x20(y)\x20or\x20enter\x20a\x20new\x20name\x20(N)?','default':![]}]);if(K===![])throw new Error(jt(0x1da));_[jt(0x23a)](h,'override',!![]);}_['set'](h,jt(0x196),F);})));if(_[jE(0x246)](h[jE(0x27b)])){const F=yield this[jE(0x252)]();_[jE(0x23a)](h,'token',F);}return h;}),this[R(0x252)]=()=>__awaiter(this,void 0x0,void 0x0,function*(){const jH=R,{token:h}=yield inquirer[jH(0x223)]([{'type':jH(0x1b2),'name':jH(0x27b),'mask':'*','message':'Choose\x20the\x20login\x20token:'}]);return h;}),inquirer[R(0x1d7)]('search-list',inquirerSearchList),inquirer[R(0x1d7)](R(0x1d6),inquirer_pagination_prompt_1[R(0x20d)]);}[a9y(0x24c)](j,h){return __awaiter(this,void 0x0,void 0x0,function*(){const ja=a9h,N=yaml[ja(0x24f)](j),F=_[ja(0x18c)](N[ja(0x1fb)]('\x0a')[ja(0x1f4)](d=>d[ja(0x1c9)])),K=chalk_1[ja(0x24a)][ja(0x277)]('-'[ja(0x214)](F)+'\x0a'),{confirm:G}=yield inquirer[ja(0x223)]([{'type':ja(0x263),'name':ja(0x1de),'message':''+chalk_1[ja(0x24a)][ja(0x1c3)]['green'](ja(0x197))+K+chalk_1[ja(0x24a)][ja(0x18e)](N)+K,'choices':Object['values'](ConfirmChoices)}]);switch(G){case ConfirmChoices['YES']:return j;case ConfirmChoices[ja(0x1f3)]:throw new Error(ja(0x221));case ConfirmChoices[ja(0x211)]:return this[ja(0x26e)](h);case ConfirmChoices['EDIT']:return this['confirmationPrompt'](yield this[ja(0x256)](j),h);case ConfirmChoices[ja(0x269)]:yield this[ja(0x21d)](j);return this['confirmationPrompt'](j,h);default:throw new Error(ja(0x193));}});}[a9y(0x26e)](j,h){return __awaiter(this,void 0x0,void 0x0,function*(){const jq=a9h;if((h===null||h===void 0x0?void 0x0:h[jq(0x199)])!==undefined)this['resultCache']=h===null||h===void 0x0?void 0x0:h['resultCache'];this['tmpCmdPath']=h===null||h===void 0x0?void 0x0:h[jq(0x28e)],this['skipValidation']=h===null||h===void 0x0?void 0x0:h[jq(0x1fe)];const N={};return yield this[jq(0x28a)]([],j[jq(0x1fc)][jq(0x260)],N),this['resultCache']=N,yield this[jq(0x24c)](N,j);});}[a9y(0x28a)](j,h,N,F){return __awaiter(this,void 0x0,void 0x0,function*(){const jR=a9h;let K;if(h[jR(0x19e)]&&!_[jR(0x265)](h,jR(0x1e4))){if(h[jR(0x19e)][jR(0x1c9)]>0x1){const {choice:G}=yield inquirer[jR(0x223)]([{'type':jR(0x263),'name':jR(0x195),'message':'What\x27s\x20the\x20'+(j[j[jR(0x1c9)]-0x1]||'')+jR(0x1f9),'choices':h['oneOf'][jR(0x1f4)](d=>{const jn=jR;var x;return(x=d[jn(0x26d)])!==null&&x!==void 0x0?x:'??';})}]);K=yield this['getType'](j,h[jR(0x19e)][jR(0x18d)](d=>d[jR(0x26d)]===G),N,F);}else{const d=h[jR(0x19e)][0x0];_[jR(0x23a)](d,jR(0x26d),h[jR(0x26d)]),K=yield this['getType'](j,d,N,F);}K={};}else{if(h['anyOf']&&!_[jR(0x265)](h,jR(0x1e4))){if(h[jR(0x1db)][jR(0x1c9)]>0x1){const {choice:x}=yield inquirer[jR(0x223)]([{'type':jR(0x263),'name':jR(0x195),'message':jR(0x271)+(j[j[jR(0x1c9)]-0x1]||'')+jR(0x1f9),'choices':[...h[jR(0x1db)][jR(0x1f4)](m=>{var P;return(P=m['description'])!==null&&P!==void 0x0?P:'??';}),jR(0x236)]}]);x!==jR(0x236)&&(K=yield this['getType'](j,h[jR(0x1db)]['find'](m=>m[jR(0x26d)]===x),N,F));}else{const m=h[jR(0x1db)][0x0];_['set'](m,jR(0x26d),h[jR(0x26d)]),K=yield this[jR(0x1d0)](j,m,N,F);}K={};}else K=yield this['getType'](j,h,N,F);}return K;});}[a9y(0x287)](j,h,N,F){var K;return __awaiter(this,void 0x0,void 0x0,function*(){const jk=a9h;if(F===![]){const {addEntry:x}=yield inquirer['prompt']([{'type':jk(0x1de),'name':jk(0x21c),'message':this[jk(0x23b)](h,jk(0x1b6),j===null||j===void 0x0?void 0x0:j['description']),'default':![]}]);if(!x)return N;}const G=Object[jk(0x22a)]((K=j===null||j===void 0x0?void 0x0:j[jk(0x1e4)])!==null&&K!==void 0x0?K:[]),d=j[jk(0x29b)]||[];if(G['length']>0x0)for(const m of G){const P=h['concat'](m);if(h[jk(0x1c9)]>0x0&&!_[jk(0x265)](N,h[jk(0x237)]('.')))_[jk(0x23a)](N,h[jk(0x237)]('.'),{});yield this[jk(0x28a)](P,j[jk(0x1e4)][m],N,d['includes'](m));}else yield this[jk(0x1d0)](h,Object[jk(0x1a8)](Object[jk(0x1a8)]({},j),{'type':'rawObject'}),N,F);return N;});}['askArrayEntry'](j,h,N,F){return __awaiter(this,void 0x0,void 0x0,function*(){const jL=a9h;if(h&&N)return!![];const K=h?'Do\x20you\x20want\x20to\x20add':'Do\x20you\x20want\x20to\x20add\x20more',{addEntry:G}=yield inquirer['prompt']([{'type':jL(0x1de),'name':jL(0x21c),'message':this[jL(0x23b)](j,K,h?F:undefined),'default':![]}]);return G;});}[a9y(0x1d0)](j,h,N,F){return __awaiter(this,void 0x0,void 0x0,function*(){const jA=a9h;let K;const G=j[jA(0x237)]('.');switch(h===null||h===void 0x0?void 0x0:h[jA(0x191)]){case jA(0x26c):{let d=!![];while(yield this['askArrayEntry'](j,d,F,h===null||h===void 0x0?void 0x0:h['description'])){const x=_['get'](N,G);_[jA(0x1a6)](N,G),yield this[jA(0x1d0)](j,h[jA(0x29d)],N);const m=_[jA(0x294)](N,G);!_[jA(0x278)](x)?_[jA(0x23a)](N,G,[m]):(x[jA(0x1df)](m),_['set'](N,G,x)),d=![];}return K||[];}case'object':{return K=yield this['getInnerType'](h,j,N,F),K;}case jA(0x28b):K=(0x0,utils_1[jA(0x1ad)])(yield this[jA(0x1b5)](j,h,F))||undefined;break;case jA(0x1aa):case jA(0x29f):case jA(0x1a1):default:K=yield this['ask'](j,h,F,N);break;}return!_['isUndefined'](K)&&_['set'](N,G,K),K;});}[a9y(0x1b5)](j,h,N,F){var K;return __awaiter(this,void 0x0,void 0x0,function*(){const jv=a9h,G=j[j[jv(0x1c9)]-0x1],{defaultValue:defaultValue=(K=h===null||h===void 0x0?void 0x0:h[jv(0x1f1)])!==null&&K!==void 0x0?K:h===null||h===void 0x0?void 0x0:h[jv(0x24a)],choices:choices=h===null||h===void 0x0?void 0x0:h[jv(0x194)],pagination:d}=yield(0x0,api_helpers_1['fetchResourceList'])(G,this['apiClient'],this['tmpCmdPath'],F,this[jv(0x204)],j);let x='input';if(!_[jv(0x246)](choices)&&choices['length']>0x0){if(d!==undefined&&d[jv(0x227)]!==undefined)x=jv(0x1d6);else choices[jv(0x1c9)]>0x4&&typeof choices[0x0]===jv(0x1aa)?x=jv(0x266):x=jv(0x263);}else{if((h===null||h===void 0x0?void 0x0:h['type'])===jv(0x29f))x=jv(0x1de);else{if((h===null||h===void 0x0?void 0x0:h['type'])===jv(0x1a1))x=jv(0x1ec);else(h===null||h===void 0x0?void 0x0:h[jv(0x191)])==='rawObject'&&(x=jv(0x267));}}let m=N!==![]?!_[jv(0x298)](defaultValue)?defaultValue:JSON[jv(0x23c)](defaultValue):_[jv(0x1ce)](defaultValue)?defaultValue:jv(0x236);if(choices)m=m[jv(0x1c8)]();_[jv(0x265)](this[jv(0x199)],j[jv(0x237)]('.'))&&(m=this[jv(0x199)][j[jv(0x237)]('.')]);const P=choices&&N===![]?['don\x27t\x20change',...choices]:choices,e=(h===null||h===void 0x0?void 0x0:h['type'])===jv(0x1a1),I=Object[jv(0x1a8)]({'type':x,'name':'id','message':this[jv(0x1ea)](j,h),'choices':P,'default':m,'filter':this['filter'](x,N),'validate':this[jv(0x25b)](h,N,e)},d),X=(yield inquirer[jv(0x223)]([I]))['id'];if(X===jv(0x236)||X==='')return undefined;if(e)return parseInt(X,0xa);return X;});}['getQuestionString'](j,h){const js=a9y,N=(h===null||h===void 0x0?void 0x0:h[js(0x191)])!==js(0x29f)?js(0x201):js(0x29e);return this[js(0x23b)](j,N,h===null||h===void 0x0?void 0x0:h[js(0x26d)]);}[a9y(0x286)](){return __awaiter(this,void 0x0,void 0x0,function*(){const jU=a9h,j=yield this[jU(0x1e3)][jU(0x263)][jU(0x1c0)][jU(0x1cc)]({})['then'](h=>h[jU(0x229)][jU(0x1c0)][jU(0x1f4)](N=>N['id']));return yield this['askForResource']('project',j);});}['askForProjectScopedResource'](j,h,N,F){return __awaiter(this,void 0x0,void 0x0,function*(){const jr=a9h,K=N||this[jr(0x1e3)]['contextProvider']['getCurrentProjectName']();if(_[jr(0x246)](K))throw new Error('Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.');const G=yield h(K);return yield this[jr(0x1ac)](j,G,(F?F+jr(0x244):'')+jr(0x198)+K+'\x27');});}['askForProjectScopedResourcePaginated'](j,h,N,F){return __awaiter(this,void 0x0,void 0x0,function*(){const jV=a9h,K=N||this['apiClient']['contextProvider'][jV(0x1ff)]();if(_[jV(0x246)](K))throw new Error(jV(0x233));const G=yield h(K);return yield this['askForResourcePaginated'](j,G,(F?F+jV(0x244):'')+jV(0x198)+K+'\x27');});}[a9y(0x295)](){return __awaiter(this,void 0x0,void 0x0,function*(){const jf=a9h,j=yield this['apiClient'][jf(0x263)][jf(0x25a)]['all']({}),h=j['data']['domains'][jf(0x1f4)](N=>N[jf(0x196)]);return this[jf(0x1ac)]('domain',h);});}[a9y(0x27c)](){return __awaiter(this,void 0x0,void 0x0,function*(){const jO=a9h,j=yield this[jO(0x1e3)][jO(0x263)][jO(0x249)]['all']({}),h=j[jO(0x229)][jO(0x1d1)]['map'](N=>N['id']);return this[jO(0x1ac)](jO(0x1d1),h);});}['setPathVars'](j){this['pathVars']=j;}}exports[a9y(0x1a0)]=InquirerHelper;
@@ -1 +1 @@
1
- 'use strict';const a10W=a10g;(function(O,g){const z=a10g,R=O();while(!![]){try{const Y=parseInt(z(0xf7))/0x1+-parseInt(z(0xda))/0x2*(-parseInt(z(0xd4))/0x3)+parseInt(z(0xed))/0x4+-parseInt(z(0xd5))/0x5*(parseInt(z(0xe2))/0x6)+parseInt(z(0xde))/0x7*(-parseInt(z(0xc2))/0x8)+parseInt(z(0xdd))/0x9+parseInt(z(0xd9))/0xa*(-parseInt(z(0xe5))/0xb);if(Y===g)break;else R['push'](R['shift']());}catch(y){R['push'](R['shift']());}}}(a10O,0x597c4));var __createBinding=this&&this[a10W(0xec)]||(Object['create']?function(O,g,R,Y){const X=a10W;if(Y===undefined)Y=R;var y=Object['getOwnPropertyDescriptor'](g,R);(!y||(X(0xd6)in y?!g[X(0xfb)]:y[X(0xdc)]||y['configurable']))&&(y={'enumerable':!![],'get':function(){return g[R];}}),Object[X(0xc4)](O,Y,y);}:function(O,g,R,Y){if(Y===undefined)Y=R;O[Y]=g[R];}),__setModuleDefault=this&&this[a10W(0xd0)]||(Object[a10W(0xee)]?function(O,g){const M=a10W;Object[M(0xc4)](O,'default',{'enumerable':!![],'value':g});}:function(O,g){const l=a10W;O[l(0xdf)]=g;}),__importStar=this&&this['__importStar']||function(O){const C=a10W;if(O&&O['__esModule'])return O;var g={};if(O!=null){for(var R in O)if(R!==C(0xdf)&&Object[C(0xf3)][C(0xca)][C(0xfd)](O,R))__createBinding(g,O,R);}return __setModuleDefault(g,O),g;},__awaiter=this&&this['__awaiter']||function(O,g,R,Y){function y(n){return n instanceof R?n:new R(function(G){G(n);});}return new(R||(R=Promise))(function(n,G){const H=a10g;function S(L){try{V(Y['next'](L));}catch(N){G(N);}}function q(L){try{V(Y['throw'](L));}catch(N){G(N);}}function V(e){const K=a10g;e['done']?n(e[K(0xe1)]):y(e[K(0xe1)])['then'](S,q);}V((Y=Y[H(0xfe)](O,g||[]))[H(0xe4)]());});},__importDefault=this&&this[a10W(0xc5)]||function(O){return O&&O['__esModule']?O:{'default':O};};function a10O(){const T=['call','apply','duplex','stringify','unable\x20to\x20parse\x20message:\x20','type','4768YTENpJ','write','defineProperty','__importDefault','Failure\x20during\x20login:\x20','data','Failed\x20to\x20establish\x20connection\x20to\x20command\x20execution\x20proxy:\x20','error','hasOwnProperty','Unable\x20to\x20open\x20browser:\x20','open','emit','catch','replace','__setModuleDefault','startLogin','EventEmitter','events','267XEWiHD','1639765wiqfhb','get','https:','Login\x20process\x20stopped\x20before\x20completed','780VxLwQg','10258eluiYt','parse','writable','6384078zrdktj','35mjzDaC','default','SIGINT','value','6kJhCSZ','status','next','162789lQKsew','idle','browser-opened','wss:','agent','message','end','__createBinding','1316364aSusRh','create','Unexpected\x20response','error\x20happened\x20during\x20browser\x20login:\x20','/v1/cli-login','init','prototype','exit','initPackage','handleError','356873YGjfei','success','login-failure','baseUrl','__esModule','NorthflankApiBrowserLogin'];a10O=function(){return T;};return a10O();}Object['defineProperty'](exports,a10W(0xfb),{'value':!![]}),exports[a10W(0xfc)]=void 0x0;const ws_1=__importStar(require('ws')),open_1=__importDefault(require(a10W(0xcc))),events_1=require(a10W(0xd3));function a10g(O,g){const R=a10O();return a10g=function(Y,y){Y=Y-0xc1;let n=R[Y];return n;},a10g(O,g);}class NorthflankApiBrowserLogin extends events_1[a10W(0xd2)]{constructor(O,g=!![],R){const f=a10W;super(),this[f(0xfa)]=O,this['openBrowser']=g,this[f(0xe9)]=R,this[f(0xe3)]=f(0xe6),this[f(0xf5)]=()=>JSON[f(0x100)]({'type':f(0xf2)});}[a10W(0xd1)](){const i=a10W;var O;const g=this[i(0xfa)][i(0xcf)](i(0xd7),i(0xe8))[i(0xcf)]('http:','ws:'),R=g+i(0xf1),Y=new ws_1[(i(0xdf))](R,{'agent':this['agent']}),y=()=>__awaiter(this,void 0x0,void 0x0,function*(){const Z=i;yield new Promise(G=>{const A=a10g;var S;(S=this[A(0xff)])===null||S===void 0x0?void 0x0:S['end'](JSON[A(0x100)]({'type':'aborted'}),()=>G());}),process[Z(0xf4)]();}),n=new Promise((G,S)=>{const c=i;var q,V,L;try{this[c(0xff)]=(0x0,ws_1['createWebSocketStream'])(Y),process['on'](c(0xe0),y);}catch(N){S(new Error(c(0xc8)+N[c(0xea)]));}(q=this[c(0xff)])===null||q===void 0x0?void 0x0:q['on'](c(0xc7),b=>{const U=c;var E;const p=JSON[U(0xdb)](b['toString']());switch(p===null||p===void 0x0?void 0x0:p[U(0xc1)]){case'init-ack':{const {loginPage:F}=p;if(F===undefined){this[U(0xf6)](U(0xef),S);return;}this['openBrowser']&&(0x0,open_1[U(0xdf)])(F)[U(0xce)](m=>{const d=U,o=d(0xcb)+m[d(0xea)];this[d(0xf6)](o,S);});this[U(0xcd)](U(0xe7),{'url':F});break;}case'login-success':{const {apiToken:m,contextName:o}=p;if(m===undefined){this[U(0xf6)]('Unexpected\x20response,\x20api\x20token\x20missing',S);return;}(E=this['duplex'])===null||E===void 0x0?void 0x0:E[U(0xeb)](),G({'token':m,'contextName':o}),this['status']=U(0xf8);break;}case U(0xf9):{const v=U(0xc6)+(p===null||p===void 0x0?void 0x0:p[U(0xea)]);this[U(0xf6)](v,S);break;}default:{const a=U(0x101)+JSON['stringify'](p);this[U(0xf6)](a,S);}}}),(V=this['duplex'])===null||V===void 0x0?void 0x0:V['on'](c(0xc9),b=>{const r=c;this[r(0xf6)](r(0xf0)+b[r(0xea)],S);}),(L=this[c(0xff)])===null||L===void 0x0?void 0x0:L['on']('end',()=>{const j=c;if(this[j(0xe3)]===j(0xf8)){}else this['handleError'](j(0xd8),S);});});return(O=this[i(0xff)])===null||O===void 0x0?void 0x0:O[i(0xc3)](this[i(0xf5)]()),this[i(0xe3)]='init',n['finally'](()=>{const t=i;process['removeListener'](t(0xe0),y);});}['handleError'](O,g){const Q=a10W;var R,Y;g?(R=this['duplex'])===null||R===void 0x0?void 0x0:R[Q(0xeb)](()=>g(new Error(O))):(Y=this['duplex'])===null||Y===void 0x0?void 0x0:Y[Q(0xeb)](),this['status']='error';}}exports['NorthflankApiBrowserLogin']=NorthflankApiBrowserLogin;
1
+ 'use strict';const a10t=a10h;function a10j(){const S=['end','apply','6NCpJaz','message','/v1/cli-login','error\x20happened\x20during\x20browser\x20login:\x20','3666282KSlJWQ','throw','8018360aMkFWw','error','hasOwnProperty','duplex','Failed\x20to\x20establish\x20connection\x20to\x20command\x20execution\x20proxy:\x20','__setModuleDefault','then','ws:','next','success','937044GPEdZi','replace','handleError','stringify','init-ack','exit','init','__importStar','value','status','1036886MIxTxX','NorthflankApiBrowserLogin','aborted','Login\x20process\x20stopped\x20before\x20completed','1NswnwB','call','SIGINT','9659408BjKiaU','__awaiter','parse','prototype','removeListener','default','https:','78140xmDxAY','agent','4515180xNVNDq','idle','catch','__esModule','Failure\x20during\x20login:\x20','finally','Unable\x20to\x20open\x20browser:\x20','baseUrl','initPackage','data','createWebSocketStream','getOwnPropertyDescriptor','open','__createBinding','get','emit','writable','configurable','Unexpected\x20response','create','1503RjYllC','openBrowser','44ZOhLQS','defineProperty','15TDIosB'];a10j=function(){return S;};return a10j();}(function(j,h){const E=a10h,N=j();while(!![]){try{const F=parseInt(E(0xf0))/0x1*(parseInt(E(0xec))/0x2)+-parseInt(E(0xd6))/0x3+-parseInt(E(0xe2))/0x4*(parseInt(E(0xcf))/0x5)+-parseInt(E(0xd2))/0x6*(-parseInt(E(0xd8))/0x7)+parseInt(E(0xf3))/0x8+parseInt(E(0xcb))/0x9*(parseInt(E(0xfa))/0xa)+-parseInt(E(0xcd))/0xb*(parseInt(E(0xb7))/0xc);if(F===h)break;else N['push'](N['shift']());}catch(K){N['push'](N['shift']());}}}(a10j,0xb636e));var __createBinding=this&&this[a10t(0xc4)]||(Object[a10t(0xca)]?function(j,h,N,F){const H=a10t;if(F===undefined)F=N;var K=Object[H(0xc2)](h,N);(!K||(H(0xc5)in K?!h[H(0xba)]:K[H(0xc7)]||K[H(0xc8)]))&&(K={'enumerable':!![],'get':function(){return h[N];}}),Object[H(0xce)](j,F,K);}:function(j,h,N,F){if(F===undefined)F=N;j[F]=h[N];}),__setModuleDefault=this&&this[a10t(0xdd)]||(Object[a10t(0xca)]?function(j,h){const a=a10t;Object[a(0xce)](j,'default',{'enumerable':!![],'value':h});}:function(j,h){const q=a10t;j[q(0xf8)]=h;}),__importStar=this&&this[a10t(0xe9)]||function(j){const R=a10t;if(j&&j['__esModule'])return j;var h={};if(j!=null){for(var N in j)if(N!==R(0xf8)&&Object[R(0xf6)][R(0xda)][R(0xf1)](j,N))__createBinding(h,j,N);}return __setModuleDefault(h,j),h;},__awaiter=this&&this[a10t(0xf4)]||function(j,h,N,F){function K(G){return G instanceof N?G:new N(function(d){d(G);});}return new(N||(N=Promise))(function(G,d){const A=a10h;function x(I){const n=a10h;try{e(F[n(0xe0)](I));}catch(X){d(X);}}function m(I){const k=a10h;try{e(F[k(0xd7)](I));}catch(X){d(X);}}function e(I){const L=a10h;I['done']?G(I[L(0xea)]):K(I[L(0xea)])[L(0xde)](x,m);}e((F=F[A(0xd1)](j,h||[]))[A(0xe0)]());});},__importDefault=this&&this['__importDefault']||function(j){const v=a10t;return j&&j[v(0xba)]?j:{'default':j};};Object[a10t(0xce)](exports,a10t(0xba),{'value':!![]}),exports[a10t(0xed)]=void 0x0;function a10h(j,h){const N=a10j();return a10h=function(F,K){F=F-0xb6;let G=N[F];return G;},a10h(j,h);}const ws_1=__importStar(require('ws')),open_1=__importDefault(require(a10t(0xc3))),events_1=require('events');class NorthflankApiBrowserLogin extends events_1['EventEmitter']{constructor(j,h=!![],N){const s=a10t;super(),this['baseUrl']=j,this[s(0xcc)]=h,this[s(0xb6)]=N,this[s(0xeb)]=s(0xb8),this['initPackage']=()=>JSON[s(0xe5)]({'type':s(0xe8)});}['startLogin'](){const U=a10t;var j;const h=this[U(0xbe)][U(0xe3)](U(0xf9),'wss:')[U(0xe3)]('http:',U(0xdf)),N=h+U(0xd4),F=new ws_1[(U(0xf8))](N,{'agent':this['agent']}),K=()=>__awaiter(this,void 0x0,void 0x0,function*(){const V=U;yield new Promise(d=>{const r=a10h;var x;(x=this[r(0xdb)])===null||x===void 0x0?void 0x0:x['end'](JSON[r(0xe5)]({'type':r(0xee)}),()=>d());}),process[V(0xe7)]();}),G=new Promise((d,x)=>{const f=U;var m,P,I;try{this[f(0xdb)]=(0x0,ws_1[f(0xc1)])(F),process['on']('SIGINT',K);}catch(X){x(new Error(f(0xdc)+X[f(0xd3)]));}(m=this[f(0xdb)])===null||m===void 0x0?void 0x0:m['on'](f(0xc0),l=>{const O=f;var p;const J=JSON[O(0xf5)](l['toString']());switch(J===null||J===void 0x0?void 0x0:J['type']){case O(0xe6):{const {loginPage:Q}=J;if(Q===undefined){this[O(0xe4)](O(0xc9),x);return;}this[O(0xcc)]&&(0x0,open_1[O(0xf8)])(Q)[O(0xb9)](y=>{const z=O,D=z(0xbd)+y[z(0xd3)];this[z(0xe4)](D,x);});this[O(0xc6)]('browser-opened',{'url':Q});break;}case'login-success':{const {apiToken:y,contextName:D}=J;if(y===undefined){this[O(0xe4)]('Unexpected\x20response,\x20api\x20token\x20missing',x);return;}(p=this[O(0xdb)])===null||p===void 0x0?void 0x0:p[O(0xd0)](),d({'token':y,'contextName':D}),this[O(0xeb)]=O(0xe1);break;}case'login-failure':{const i=O(0xbb)+(J===null||J===void 0x0?void 0x0:J[O(0xd3)]);this[O(0xe4)](i,x);break;}default:{const W='unable\x20to\x20parse\x20message:\x20'+JSON[O(0xe5)](J);this[O(0xe4)](W,x);}}}),(P=this[f(0xdb)])===null||P===void 0x0?void 0x0:P['on'](f(0xd9),l=>{const b=f;this['handleError'](b(0xd5)+l[b(0xd3)],x);}),(I=this[f(0xdb)])===null||I===void 0x0?void 0x0:I['on'](f(0xd0),()=>{const T=f;if(this['status']==='success'){}else this[T(0xe4)](T(0xef),x);});});return(j=this[U(0xdb)])===null||j===void 0x0?void 0x0:j['write'](this[U(0xbf)]()),this[U(0xeb)]=U(0xe8),G[U(0xbc)](()=>{const u=U;process[u(0xf7)](u(0xf2),K);});}[a10t(0xe4)](j,h){const Z=a10t;var N,F;h?(N=this['duplex'])===null||N===void 0x0?void 0x0:N[Z(0xd0)](()=>h(new Error(j))):(F=this[Z(0xdb)])===null||F===void 0x0?void 0x0:F[Z(0xd0)](),this[Z(0xeb)]=Z(0xd9);}}exports['NorthflankApiBrowserLogin']=NorthflankApiBrowserLogin;
@@ -1 +1 @@
1
- 'use strict';const a11J=a11g;(function(O,g){const w=a11g,R=O();while(!![]){try{const Y=-parseInt(w(0x27d))/0x1*(parseInt(w(0x21d))/0x2)+-parseInt(w(0x1d9))/0x3*(parseInt(w(0x253))/0x4)+-parseInt(w(0x278))/0x5+parseInt(w(0x266))/0x6*(parseInt(w(0x242))/0x7)+parseInt(w(0x234))/0x8+parseInt(w(0x220))/0x9*(-parseInt(w(0x1f0))/0xa)+parseInt(w(0x1fc))/0xb*(parseInt(w(0x270))/0xc);if(Y===g)break;else R['push'](R['shift']());}catch(y){R['push'](R['shift']());}}}(a11O,0x54564));function a11g(O,g){const R=a11O();return a11g=function(Y,y){Y=Y-0x1d8;let n=R[Y];return n;},a11g(O,g);}var __awaiter=this&&this[a11J(0x202)]||function(O,g,R,Y){function y(n){return n instanceof R?n:new R(function(G){G(n);});}return new(R||(R=Promise))(function(n,G){const O1=a11g;function S(L){const h=a11g;try{V(Y[h(0x209)](L));}catch(N){G(N);}}function q(L){const D=a11g;try{V(Y[D(0x24a)](L));}catch(N){G(N);}}function V(e){const O0=a11g;e[O0(0x20b)]?n(e[O0(0x258)]):y(e[O0(0x258)])[O0(0x219)](S,q);}V((Y=Y[O1(0x259)](O,g||[]))[O1(0x209)]());});},__importDefault=this&&this[a11J(0x26f)]||function(O){return O&&O['__esModule']?O:{'default':O};};Object[a11J(0x1fb)](exports,'__esModule',{'value':!![]}),exports[a11J(0x274)]=void 0x0;const js_client_1=require(a11J(0x27a)),chalk_1=__importDefault(require(a11J(0x27b))),utils_1=require(a11J(0x231)),inquirer_helper_1=require(a11J(0x1ef)),commander_1=require(a11J(0x20d)),console_format_helpers_1=require('../formatting/console-format-helpers'),log_formatter_1=require(a11J(0x222));class CliLogs{constructor(O,g){const O2=a11J;this[O2(0x21c)]=O,this[O2(0x232)]=0x708,this[O2(0x1f2)]=(R,Y,y,n)=>{const O3=O2,G=(0x0,utils_1['getCommand'])(!![])[O3(0x239)]((Y?O3(0x238):'')+O3(0x1de))[O3(0x27f)]((Y?O3(0x238):'')+O3(0x213))[O3(0x229)](O3(0x1fa)+R)[O3(0x22a)](O3(0x215),O3(0x264))['option']('--'+R+'\x20--'+R+O3(0x25a)+R+O3(0x24f),R[O3(0x269)](0x0)[O3(0x27c)]()+R[O3(0x272)](0x1)+O3(0x1e9))['option'](O3(0x1f4),O3(0x201));if(Y)G[O3(0x22a)]('--build\x20--buildId\x20[buildId]',O3(0x24b));if(R===O3(0x1df))G[O3(0x22a)]('--run\x20--runId\x20[runId]',O3(0x20c));if(R==='service')G[O3(0x22a)](O3(0x26b),O3(0x257));if(y)G[O3(0x22a)](O3(0x21f),O3(0x252));if(n)G[O3(0x22a)](O3(0x1e6),O3(0x225));return!Y&&!y&&!n&&G[O3(0x217)](new commander_1[(O3(0x208))](O3(0x271),O3(0x203))[O3(0x235)](Object[O3(0x22f)](js_client_1[O3(0x24c)]))),G[O3(0x22a)](O3(0x236),O3(0x26e))['option'](O3(0x221),O3(0x233))[O3(0x22a)](O3(0x22d),'Get\x20logs\x20generated\x20after\x20this\x20time,\x20'+utils_1[O3(0x245)],utils_1[O3(0x261)])[O3(0x217)](new commander_1[(O3(0x208))](O3(0x22c),O3(0x1fe)+utils_1[O3(0x245)])[O3(0x24e)](utils_1[O3(0x261)])[O3(0x1ee)](['tail']))[O3(0x22a)](O3(0x214),'Length\x20of\x20timespan\x20in\x20seconds.\x20Only\x20valid\x20if\x20not\x20both,\x20startTime\x20and\x20endTime\x20are\x20set')[O3(0x217)](new commander_1['Option'](O3(0x212),O3(0x279))[O3(0x235)]([O3(0x25d),'forward'])[O3(0x1ee)]([O3(0x21b)]))['addOption'](new commander_1['Option']('--textIncludes\x20<text>',O3(0x1eb))['conflicts']([O3(0x23c),O3(0x1e4),O3(0x273)]))[O3(0x217)](new commander_1[(O3(0x208))](O3(0x207),O3(0x204))[O3(0x1ee)]([O3(0x21e),O3(0x1e4),'regexNotIncludes']))['addOption'](new commander_1['Option'](O3(0x230),O3(0x1e8))['conflicts']([O3(0x23c),O3(0x21e),'regexNotIncludes']))['addOption'](new commander_1[(O3(0x208))](O3(0x23b),O3(0x1db))[O3(0x1ee)]([O3(0x23c),O3(0x1e4),O3(0x21e)]))['option'](O3(0x20e),O3(0x262),![])['addOption'](new commander_1[(O3(0x208))](O3(0x22b),O3(0x1dd))['choices'](Object[O3(0x22f)]([O3(0x1f7),O3(0x260),O3(0x249)]))),G;},this[O2(0x206)]=(R,Y,y,n)=>{const O4=O2,{containerName:G,restoreId:S,backupId:q,quiet:V,tail:e,startTime:L,endTime:N,duration:b}=n;if(V===!![])return;const E=e?O4(0x20f)+chalk_1[O4(0x25c)]['bold'](O4(0x22e))+')':'',p=e?O4(0x23e):'',F=new Date(),m=L!==null&&L!==void 0x0?L:new Date(new Date((N!==null&&N!==void 0x0?N:F)[O4(0x277)]())[O4(0x1fd)]((N!==null&&N!==void 0x0?N:F)[O4(0x1e0)]()-(b!==null&&b!==void 0x0?b:this[O4(0x232)]))),o=(N!==null&&N!==void 0x0?N:L!==undefined)?new Date(new Date(L[O4(0x277)]())[O4(0x1fd)](L[O4(0x1e0)]()+(b!==null&&b!==void 0x0?b:this['defaultDurationSeconds']))):F,v=q!==undefined,a=m&&!v?O4(0x263)+chalk_1[O4(0x25c)][O4(0x247)](m[O4(0x240)]()):'',z=o&&!v?O4(0x268)+chalk_1[O4(0x25c)][O4(0x247)](o[O4(0x240)]()):'',W=b?O4(0x216)+b+'\x20seconds':'',X=G?O4(0x218)+chalk_1[O4(0x25c)][O4(0x247)](G):v?'':O4(0x25b),M=q?O4(0x25f)+q:'',l=S?O4(0x1f3)+S:'',C=R+'\x20'+chalk_1[O4(0x25c)][O4(0x247)](Y)+M+l+O4(0x1ff)+chalk_1[O4(0x25c)]['bold'](y),K=''+a+z+W;console[O4(0x213)](O4(0x1e1)+p+X+O4(0x1e7)+C+K+E+':');},this['getFormatter']=(R,Y)=>(y,n)=>{const O5=O2;if(!R){if(y[O5(0x267)]===0x0)console['log'](O5(0x1da));y[O5(0x237)](G=>(0x0,log_formatter_1['formatLogLine'])(G,Y));}else(0x0,console_format_helpers_1[O5(0x1e2)])(R,y);(n===null||n===void 0x0?void 0x0:n[O5(0x23d)])&&(0x0,utils_1[O5(0x1ec)])('Element\x20count\x20for\x20this\x20request\x20exceeds\x20the\x20line\x20limit,\x20output\x20was\x20truncated.\x20Cut\x20off\x20at\x20timestamp\x20'+n[O5(0x250)]);},this[O2(0x1f1)]=new js_client_1[(O2(0x205))](O,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[O2(0x1ed)],'agent':g}),this[O2(0x1f6)]=this[O2(0x1f1)],this[O2(0x1f8)]=new inquirer_helper_1[(O2(0x276))](this['apiClient']);}[a11J(0x200)](O,g=![],R=![],Y=![]){const OY=a11J,y=(L,N)=>__awaiter(this,void 0x0,void 0x0,function*(){const O6=a11g,b=N[O6(0x246)],{apiContext:E,inquirerHelper:p}=this;switch(O){case O6(0x1f9):{const F=b?undefined:E['getCurrentServiceName']();return N[O6(0x23a)]||F||(yield p[O6(0x26d)](L)());}case'job':{const m=b?undefined:E[O6(0x21a)]();return N['jobId']||m||(yield p['askForJob'](L)());}case O6(0x244):{return N[O6(0x248)]||(yield p[O6(0x275)](L)());}}}),n=(L,N,b)=>__awaiter(this,void 0x0,void 0x0,function*(){const O7=a11g;if(g)return b[O7(0x223)]||(yield this[O7(0x1f8)][O7(0x27e)](L,O==='service'?N:undefined,O===O7(0x1df)?N:undefined,!![])());return undefined;}),G=(L,N,b)=>__awaiter(this,void 0x0,void 0x0,function*(){const O8=a11g;if(R||Y)return b[O8(0x243)]||(yield this[O8(0x1f8)]['askForAddonBackup'](L,N)());return undefined;}),S=(L,N,b,E)=>__awaiter(this,void 0x0,void 0x0,function*(){const O9=a11g;if(Y)return E['restoreId']||(yield this[O9(0x1f8)]['askForAddonRestore'](L,N,b)());return undefined;}),q=(L,N,b)=>__awaiter(this,void 0x0,void 0x0,function*(){const OO=a11g;if(!g&&b['containerId']!==undefined){if(b['containerId']!==!![])return b[OO(0x25e)];return yield this[OO(0x1f8)][OO(0x224)](L,O===OO(0x1f9)?N:undefined,O==='job'?N:undefined,!![])();}return undefined;}),V=(L,N,b)=>__awaiter(this,void 0x0,void 0x0,function*(){const Og=a11g;if(O===Og(0x1df))return b[Og(0x228)]||(yield this[Og(0x1f8)][Og(0x254)](N,L,!![])());return undefined;}),e=(L,N,b)=>__awaiter(this,void 0x0,void 0x0,function*(){const OR=a11g;if(O==='service'){if(b[OR(0x1e3)]!==!![])return b[OR(0x1e3)];return b['deploymentId'];}return undefined;});return this[OY(0x1f2)](O,g,R,Y)[OY(0x265)](L=>__awaiter(this,void 0x0,void 0x0,function*(){const Oy=OY,{noDefaults:N,projectId:b,quiet:E,tail:p,types:F,textIncludes:m,textNotIncludes:o,regexIncludes:v,regexNotIncludes:a,direction:z,lineLimit:W,startTime:X,endTime:M,duration:l,output:C}=L;(0x0,utils_1[Oy(0x211)])(this[Oy(0x1f1)]);const {apiContext:K,inquirerHelper:H,logsApiClient:f}=this,i=N?undefined:K['getCurrentProjectName'](),A=b||i||(yield H[Oy(0x1dc)]()),Z=yield y(A,L),c=yield n(A,Z,L),U=yield G(A,Z,L),d=yield S(A,Z,U,L),r=yield V(A,Z,L),j=yield e(A,Z,L),t=yield q(A,Z,L);if(X&&M&&l)throw new Error(Oy(0x20a));const Q={'projectId':A,'entityId':Z},T={'containerName':t,'types':F,'textIncludes':m,'textNotIncludes':o,'regexIncludes':v,'regexNotIncludes':a,'lineLimit':W,'startTime':X,'duration':l,'runId':r,'buildId':c,'backupId':U,'restoreId':d,'deploymentId':j,'isBuild':g!==null&&g!==void 0x0?g:![]},u=Y?Oy(0x1f5):R?'addonBackup':O,I=Object['assign'](Object[Oy(0x255)]({},T),{'endTime':M,'direction':z});if(!E&&C!==Oy(0x249)&&C!==Oy(0x1ea)&&C!==Oy(0x260))this[Oy(0x206)](O,Z,A,Object['assign'](Object[Oy(0x255)]({},I),L));const x=this[Oy(0x23f)](C,m!==null&&m!==void 0x0?m:v);if(p){const k=yield f[Oy(0x1de)][Oy(0x251)](Q,T,u);k['on']('logs-received',x),k['on'](Oy(0x24d),s=>(0x0,utils_1[Oy(0x24d)])(Oy(0x227)+s[Oy(0x26c)])),k['on'](Oy(0x1d8),()=>console[Oy(0x213)](Oy(0x226))),yield k[Oy(0x1e5)]();}else{const s=yield f[Oy(0x1de)]['logRange'](Q,I,u);if(s[Oy(0x24d)]){const P=s[Oy(0x24d)][Oy(0x241)],B=P?Oy(0x210)+JSON[Oy(0x26a)](P,null,'\x20'):'';(0x0,utils_1[Oy(0x24d)])(Oy(0x256)+s[Oy(0x24d)][Oy(0x26c)]+B);}else x(s['data'],s['pagination']);}}));}}exports[a11J(0x274)]=CliLogs;function a11O(){const On=['getCurrentJobName','tail','apiContext','2VvytlC','textIncludes','--backup\x20--backupId\x20[backupId]','18JPtqoR','-l,\x20--lineLimit\x20[limit]','./log-formatter','buildId','askForContainer','Restore\x20to\x20get\x20logs\x20from','Log\x20session\x20ended','Error\x20while\x20tailing\x20log\x20lines:\x20','runId','description','option','-o,\x20--output\x20[output]','--endTime\x20<timestamp>','--startTime\x20<timestamp>','\x27Ctrl+C\x27','values','--regexIncludes\x20<regex>','../utils','defaultDurationSeconds','Number\x20of\x20lines\x20to\x20return.','2572360hYquaI','choices','-f,\x20--tail','forEach','build-','name','serviceId','--regexNotIncludes\x20<regex>','textNotIncludes','hasNextPage','\x20with\x20live-tailing','getFormatter','toISOString','details','581TqvSHh','backupId','addon','tsHint','noDefaults','bold','addonId','yaml','throw','Build\x20to\x20get\x20logs\x20from','LogType','error','argParser','Id]','cursor','logTail','Backup\x20to\x20get\x20logs\x20from','2260392QxAhEz','askForJobRun','assign','Error\x20while\x20fetching\x20log\x20lines:\x20','Deployment\x20id,\x20example:\x20my-service-54785f4','value','apply','Id\x20[','\x20for\x20all\x20containers','default','backward','containerId',',\x20backup\x20id\x20','json','parseDateInput','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.',',\x20from:\x20','Project\x20for\x20logs','action','32502tCgtoQ','length',',\x20to:\x20','charAt','stringify','--deployment\x20--deploymentId\x20[deploymentId]','message','askForService','Tail\x20will\x20stream\x20logs\x20in\x20real-time.\x20Session\x20will\x20be\x20kept\x20open.','__importDefault','2728152xqDFnf','-t,\x20--types\x20<types...>','slice','regexNotIncludes','CliLogs','askForAddon','InquirerHelper','valueOf','1805235AzrBIA','Direction\x20of\x20logs.\x20Ignored\x20when\x20tailing.','@northflank/js-client','chalk','toUpperCase','179457knMMUb','askForBuild','alias','close','3yvptbH','No\x20logs\x20found\x20for\x20this\x20query.\x20Make\x20sure\x20to\x20select\x20an\x20appropriate\x20time\x20window.','Filter\x20log\x20lines\x20to\x20not\x20match\x20this\x20regular\x20expression','askForProject','Output\x20formatting.\x20Will\x20use\x20advanced\x20formatting\x20by\x20default.','logs','job','getSeconds','>\x20Container\x20logs','printResponse','deploymentId','regexIncludes','start','--restore\x20--restoreId\x20[restoreId]','\x20of\x20','Filter\x20log\x20lines\x20to\x20match\x20this\x20regular\x20expression','\x20to\x20get\x20logs\x20from','yml','Filter\x20log\x20lines\x20to\x20include\x20this\x20text','warning','customUserAgent','conflicts','../inquirer-helper','1147470hYKrOo','apiClient','getStandardLogCommand',',\x20restore\x20id\x20','--container\x20--containerId\x20[containerId]','addonRestore','logsApiClient','format','inquirerHelper','service','Get\x20log\x20for\x20the\x20specified\x20','defineProperty','44zDdqhW','setSeconds','Get\x20logs\x20generated\x20before\x20this\x20time,\x20','\x20in\x20project\x20','getLogsCommand','Container\x20to\x20exec\x20into\x20(logs\x20from\x20all\x20containers\x20will\x20be\x20shown\x20if\x20not\x20specified)','__awaiter','Which\x20log\x20types\x20to\x20fetch','Filter\x20log\x20lines\x20to\x20not\x20include\x20this\x20text','ApiClient','printInitInfo','--textNotIncludes\x20<text>','Option','next','Only\x20two\x20of\x20\x27startTime\x27,\x20\x27endTime\x27\x20and\x20\x27duration\x27\x20can\x20be\x20set.','done','Job\x20run\x20id,\x20example:\x20162b1977-6636-4000-929b-cc265b862ff0','commander','--noDefaults','\x20(exit\x20with\x20','\x0aDetails:\x20','assertContextExisting','-d,\x20--direction\x20<order>','log','--duration\x20[duration]','--project\x20--projectId\x20[projectId]',',\x20duration:\x20','addOption','\x20for\x20container\x20','then'];a11O=function(){return On;};return a11O();}
1
+ 'use strict';const a11g=a11h;(function(j,h){const o=a11h,N=j();while(!![]){try{const F=parseInt(o(0x133))/0x1*(-parseInt(o(0xe9))/0x2)+parseInt(o(0x10c))/0x3*(parseInt(o(0x168))/0x4)+-parseInt(o(0x156))/0x5*(-parseInt(o(0xe6))/0x6)+-parseInt(o(0x113))/0x7*(parseInt(o(0x15b))/0x8)+-parseInt(o(0x108))/0x9+-parseInt(o(0x10f))/0xa*(-parseInt(o(0xee))/0xb)+parseInt(o(0x12c))/0xc;if(F===h)break;else N['push'](N['shift']());}catch(K){N['push'](N['shift']());}}}(a11j,0x1de54));function a11h(j,h){const N=a11j();return a11h=function(F,K){F=F-0xd8;let G=N[F];return G;},a11h(j,h);}function a11j(){const jG=['toISOString','99IxhCCe','addonId','warning','--restore\x20--restoreId\x20[restoreId]','regexNotIncludes','setSeconds','Filter\x20log\x20lines\x20to\x20match\x20this\x20regular\x20expression','values','\x20in\x20project\x20','../formatting/console-format-helpers','error','apiClient','__esModule','alias','Get\x20log\x20for\x20the\x20specified\x20','Backup\x20to\x20get\x20logs\x20from','assign','tsHint',',\x20duration:\x20','deploymentId','Number\x20of\x20lines\x20to\x20return.','noDefaults','--regexNotIncludes\x20<regex>',',\x20from:\x20','Only\x20two\x20of\x20\x27startTime\x27,\x20\x27endTime\x27\x20and\x20\x27duration\x27\x20can\x20be\x20set.','yaml','464643uTwdDe','--deployment\x20--deploymentId\x20[deploymentId]','containerId','--textNotIncludes\x20<text>','12LEgdDC','logsApiClient','commander','100790rJPpWI','Option','--duration\x20[duration]','option','358421CntEPz','Job\x20run\x20id,\x20example:\x20162b1977-6636-4000-929b-cc265b862ff0','\x20seconds','description','Which\x20log\x20types\x20to\x20fetch','Project\x20for\x20logs','Output\x20formatting.\x20Will\x20use\x20advanced\x20formatting\x20by\x20default.','textNotIncludes','--noDefaults','hasNextPage','serviceId','choices','\x0aDetails:\x20','Tail\x20will\x20stream\x20logs\x20in\x20real-time.\x20Session\x20will\x20be\x20kept\x20open.','--textIncludes\x20<text>','getCurrentServiceName','../inquirer-helper','-f,\x20--tail','message','Error\x20while\x20tailing\x20log\x20lines:\x20','forward','getLogsCommand','InquirerHelper','\x20with\x20live-tailing','getStandardLogCommand','1534356HKIESt','jobId','done',',\x20restore\x20id\x20','parseDateInput','apply','tail','50823cJaVqy','Log\x20session\x20ended','Get\x20logs\x20generated\x20after\x20this\x20time,\x20','slice','textIncludes','logs-received','build-','Filter\x20log\x20lines\x20to\x20include\x20this\x20text','\x20for\x20container\x20','pagination','length','runId','conflicts','@northflank/js-client','Container\x20to\x20exec\x20into\x20(logs\x20from\x20all\x20containers\x20will\x20be\x20shown\x20if\x20not\x20specified)','getCurrentProjectName','getFormatter','service','yml','askForJob','addonBackup','\x20(exit\x20with\x20','-o,\x20--output\x20[output]','\x27Ctrl+C\x27','askForService','logs','\x20for\x20all\x20containers','customUserAgent','Length\x20of\x20timespan\x20in\x20seconds.\x20Only\x20valid\x20if\x20not\x20both,\x20startTime\x20and\x20endTime\x20are\x20set','details','log','askForProject','defineProperty','stringify','default','5VAmeMG','--backup\x20--backupId\x20[backupId]','Build\x20to\x20get\x20logs\x20from','--project\x20--projectId\x20[projectId]',',\x20backup\x20id\x20','24pqDVxp','assertContextExisting','close','Direction\x20of\x20logs.\x20Ignored\x20when\x20tailing.','No\x20logs\x20found\x20for\x20this\x20query.\x20Make\x20sure\x20to\x20select\x20an\x20appropriate\x20time\x20window.','__awaiter','argParser','askForBuild','buildId','\x20to\x20get\x20logs\x20from','start','CliLogs','restoreId','241676aEhJrC','Error\x20while\x20fetching\x20log\x20lines:\x20','job','addonRestore','value','addon','charAt','printInitInfo','addOption','-t,\x20--types\x20<types...>','inquirerHelper','regexIncludes','__importDefault','json','Id]','-l,\x20--lineLimit\x20[limit]','askForAddonBackup','throw','bold','valueOf','getCommand','defaultDurationSeconds','--endTime\x20<timestamp>',',\x20to:\x20','119442XlAHEa','-d,\x20--direction\x20<order>','Element\x20count\x20for\x20this\x20request\x20exceeds\x20the\x20line\x20limit,\x20output\x20was\x20truncated.\x20Cut\x20off\x20at\x20timestamp\x20','6gNGHrR','Deployment\x20id,\x20example:\x20my-service-54785f4','./log-formatter','next'];a11j=function(){return jG;};return a11j();}var __awaiter=this&&this[a11g(0x160)]||function(j,h,N,F){function K(G){return G instanceof N?G:new N(function(d){d(G);});}return new(N||(N=Promise))(function(G,d){const j1=a11h;function x(I){const c=a11h;try{e(F[c(0xec)](I));}catch(X){d(X);}}function m(I){const B=a11h;try{e(F[B(0xdf)](I));}catch(X){d(X);}}function e(I){const j0=a11h;I[j0(0x12e)]?G(I[j0(0x16c)]):K(I['value'])['then'](x,m);}e((F=F[j1(0x131)](j,h||[]))[j1(0xec)]());});},__importDefault=this&&this[a11g(0xda)]||function(j){return j&&j['__esModule']?j:{'default':j};};Object[a11g(0x153)](exports,a11g(0xfa),{'value':!![]}),exports[a11g(0x166)]=void 0x0;const js_client_1=require(a11g(0x140)),chalk_1=__importDefault(require('chalk')),utils_1=require('../utils'),inquirer_helper_1=require(a11g(0x123)),commander_1=require(a11g(0x10e)),console_format_helpers_1=require(a11g(0xf7)),log_formatter_1=require(a11g(0xeb));class CliLogs{constructor(j,h){const j2=a11g;this['apiContext']=j,this[j2(0xe3)]=0x708,this['getStandardLogCommand']=(N,F,K,G)=>{const j3=j2,d=(0x0,utils_1[j3(0xe2)])(!![])['name']((F?j3(0x139):'')+j3(0x14c))[j3(0xfb)]((F?j3(0x139):'')+'log')[j3(0x116)](j3(0xfc)+N)[j3(0x112)](j3(0x159),j3(0x118))['option']('--'+N+'\x20--'+N+'Id\x20['+N+j3(0xdc),N[j3(0x16e)](0x0)['toUpperCase']()+N[j3(0x136)](0x1)+j3(0x164))[j3(0x112)]('--container\x20--containerId\x20[containerId]',j3(0x141));if(F)d['option']('--build\x20--buildId\x20[buildId]',j3(0x158));if(N===j3(0x16a))d[j3(0x112)]('--run\x20--runId\x20[runId]',j3(0x114));if(N===j3(0x144))d[j3(0x112)](j3(0x109),j3(0xea));if(K)d[j3(0x112)](j3(0x157),j3(0xfd));if(G)d['option'](j3(0xf1),'Restore\x20to\x20get\x20logs\x20from');return!F&&!K&&!G&&d[j3(0x170)](new commander_1[(j3(0x110))](j3(0x171),j3(0x117))[j3(0x11e)](Object[j3(0xf5)](js_client_1['LogType']))),d['option'](j3(0x124),j3(0x120))[j3(0x112)](j3(0xdd),j3(0x102))['option']('--startTime\x20<timestamp>',j3(0x135)+utils_1[j3(0xff)],utils_1[j3(0x130)])[j3(0x170)](new commander_1[(j3(0x110))](j3(0xe4),'Get\x20logs\x20generated\x20before\x20this\x20time,\x20'+utils_1[j3(0xff)])[j3(0x161)](utils_1[j3(0x130)])[j3(0x13f)](['tail']))[j3(0x112)](j3(0x111),j3(0x14f))[j3(0x170)](new commander_1[(j3(0x110))](j3(0xe7),j3(0x15e))[j3(0x11e)](['backward',j3(0x127)])[j3(0x13f)]([j3(0x132)]))[j3(0x170)](new commander_1[(j3(0x110))](j3(0x121),j3(0x13a))[j3(0x13f)]([j3(0x11a),j3(0xd9),j3(0xf2)]))[j3(0x170)](new commander_1[(j3(0x110))](j3(0x10b),'Filter\x20log\x20lines\x20to\x20not\x20include\x20this\x20text')[j3(0x13f)](['textIncludes',j3(0xd9),'regexNotIncludes']))['addOption'](new commander_1[(j3(0x110))]('--regexIncludes\x20<regex>',j3(0xf4))[j3(0x13f)]([j3(0x11a),j3(0x137),j3(0xf2)]))[j3(0x170)](new commander_1['Option'](j3(0x104),'Filter\x20log\x20lines\x20to\x20not\x20match\x20this\x20regular\x20expression')['conflicts'](['textNotIncludes','regexIncludes',j3(0x137)]))[j3(0x112)](j3(0x11b),'Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.',![])[j3(0x170)](new commander_1[(j3(0x110))](j3(0x149),j3(0x119))['choices'](Object[j3(0xf5)](['format',j3(0xdb),j3(0x107)]))),d;},this[j2(0x16f)]=(N,F,K,G)=>{const j4=j2,{containerName:d,restoreId:x,backupId:m,quiet:P,tail:e,startTime:I,endTime:X,duration:l}=G;if(P===!![])return;const p=e?j4(0x148)+chalk_1[j4(0x155)][j4(0xe0)](j4(0x14a))+')':'',J=e?j4(0x12a):'',Q=new Date(),y=I!==null&&I!==void 0x0?I:new Date(new Date((X!==null&&X!==void 0x0?X:Q)['valueOf']())['setSeconds']((X!==null&&X!==void 0x0?X:Q)['getSeconds']()-(l!==null&&l!==void 0x0?l:this[j4(0xe3)]))),D=(X!==null&&X!==void 0x0?X:I!==undefined)?new Date(new Date(I[j4(0xe1)]())[j4(0xf3)](I['getSeconds']()+(l!==null&&l!==void 0x0?l:this[j4(0xe3)]))):Q,i=m!==undefined,W=y&&!i?j4(0x105)+chalk_1[j4(0x155)][j4(0xe0)](y[j4(0xed)]()):'',E=D&&!i?j4(0xe5)+chalk_1[j4(0x155)][j4(0xe0)](D['toISOString']()):'',t=l?j4(0x100)+l+j4(0x115):'',H=d?j4(0x13b)+chalk_1[j4(0x155)][j4(0xe0)](d):i?'':j4(0x14d),a=m?j4(0x15a)+m:'',q=x?j4(0x12f)+x:'',R=N+'\x20'+chalk_1[j4(0x155)]['bold'](F)+a+q+j4(0xf6)+chalk_1[j4(0x155)][j4(0xe0)](K),n=''+W+E+t;console[j4(0x151)]('>\x20Container\x20logs'+J+H+'\x20of\x20'+R+n+p+':');},this['getFormatter']=(N,F)=>(K,G)=>{const j5=j2;if(!N){if(K[j5(0x13d)]===0x0)console[j5(0x151)](j5(0x15f));K['forEach'](d=>(0x0,log_formatter_1['formatLogLine'])(d,F));}else(0x0,console_format_helpers_1['printResponse'])(N,K);(G===null||G===void 0x0?void 0x0:G[j5(0x11c)])&&(0x0,utils_1[j5(0xf0)])(j5(0xe8)+G['cursor']);},this[j2(0xf9)]=new js_client_1['ApiClient'](j,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[j2(0x14e)],'agent':h}),this[j2(0x10d)]=this[j2(0xf9)],this[j2(0xd8)]=new inquirer_helper_1[(j2(0x129))](this[j2(0xf9)]);}[a11g(0x128)](j,h=![],N=![],F=![]){const jF=a11g,K=(I,X)=>__awaiter(this,void 0x0,void 0x0,function*(){const j6=a11h,l=X[j6(0x103)],{apiContext:p,inquirerHelper:J}=this;switch(j){case j6(0x144):{const Q=l?undefined:p[j6(0x122)]();return X[j6(0x11d)]||Q||(yield J[j6(0x14b)](I)());}case'job':{const y=l?undefined:p['getCurrentJobName']();return X[j6(0x12d)]||y||(yield J[j6(0x146)](I)());}case j6(0x16d):{return X[j6(0xef)]||(yield J['askForAddon'](I)());}}}),G=(I,X,l)=>__awaiter(this,void 0x0,void 0x0,function*(){const j7=a11h;if(h)return l[j7(0x163)]||(yield this['inquirerHelper'][j7(0x162)](I,j==='service'?X:undefined,j==='job'?X:undefined,!![])());return undefined;}),d=(I,X,l)=>__awaiter(this,void 0x0,void 0x0,function*(){const j8=a11h;if(N||F)return l['backupId']||(yield this['inquirerHelper'][j8(0xde)](I,X)());return undefined;}),x=(I,X,l,p)=>__awaiter(this,void 0x0,void 0x0,function*(){const j9=a11h;if(F)return p[j9(0x167)]||(yield this[j9(0xd8)]['askForAddonRestore'](I,X,l)());return undefined;}),m=(I,X,l)=>__awaiter(this,void 0x0,void 0x0,function*(){const jj=a11h;if(!h&&l['containerId']!==undefined){if(l[jj(0x10a)]!==!![])return l[jj(0x10a)];return yield this[jj(0xd8)]['askForContainer'](I,j===jj(0x144)?X:undefined,j===jj(0x16a)?X:undefined,!![])();}return undefined;}),P=(I,X,l)=>__awaiter(this,void 0x0,void 0x0,function*(){const jh=a11h;if(j===jh(0x16a))return l[jh(0x13e)]||(yield this[jh(0xd8)]['askForJobRun'](X,I,!![])());return undefined;}),e=(I,X,l)=>__awaiter(this,void 0x0,void 0x0,function*(){const jN=a11h;if(j===jN(0x144)){if(l[jN(0x101)]!==!![])return l['deploymentId'];return l['deploymentId'];}return undefined;});return this[jF(0x12b)](j,h,N,F)['action'](I=>__awaiter(this,void 0x0,void 0x0,function*(){const jK=jF,{noDefaults:X,projectId:l,quiet:p,tail:J,types:Q,textIncludes:y,textNotIncludes:D,regexIncludes:i,regexNotIncludes:W,direction:E,lineLimit:t,startTime:H,endTime:a,duration:q,output:R}=I;(0x0,utils_1[jK(0x15c)])(this[jK(0xf9)]);const {apiContext:n,inquirerHelper:k,logsApiClient:L}=this,A=X?undefined:n[jK(0x142)](),v=l||A||(yield k[jK(0x152)]()),s=yield K(v,I),U=yield G(v,s,I),r=yield d(v,s,I),V=yield x(v,s,r,I),f=yield P(v,s,I),O=yield e(v,s,I),z=yield m(v,s,I);if(H&&a&&q)throw new Error(jK(0x106));const b={'projectId':v,'entityId':s},T={'containerName':z,'types':Q,'textIncludes':y,'textNotIncludes':D,'regexIncludes':i,'regexNotIncludes':W,'lineLimit':t,'startTime':H,'duration':q,'runId':f,'buildId':U,'backupId':r,'restoreId':V,'deploymentId':O,'isBuild':h!==null&&h!==void 0x0?h:![]},u=F?jK(0x16b):N?jK(0x147):j,Z=Object[jK(0xfe)](Object[jK(0xfe)]({},T),{'endTime':a,'direction':E});if(!p&&R!==jK(0x107)&&R!==jK(0x145)&&R!==jK(0xdb))this['printInitInfo'](j,s,v,Object[jK(0xfe)](Object[jK(0xfe)]({},Z),I));const S=this[jK(0x143)](R,y!==null&&y!==void 0x0?y:i);if(J){const Y=yield L[jK(0x14c)]['logTail'](b,T,u);Y['on'](jK(0x138),S),Y['on'](jK(0xf8),M=>(0x0,utils_1['error'])(jK(0x126)+M['message'])),Y['on'](jK(0x15d),()=>console[jK(0x151)](jK(0x134))),yield Y[jK(0x165)]();}else{const M=yield L[jK(0x14c)]['logRange'](b,Z,u);if(M[jK(0xf8)]){const w=M[jK(0xf8)][jK(0x150)],C=w?jK(0x11f)+JSON[jK(0x154)](w,null,'\x20'):'';(0x0,utils_1[jK(0xf8)])(jK(0x169)+M['error'][jK(0x125)]+C);}else S(M['data'],M[jK(0x13c)]);}}));}}exports['CliLogs']=CliLogs;
@@ -1 +1 @@
1
- 'use strict';const a12L=a12g;(function(O,g){const V=a12g,R=O();while(!![]){try{const Y=parseInt(V(0xee))/0x1*(parseInt(V(0xd8))/0x2)+-parseInt(V(0xea))/0x3+parseInt(V(0xf5))/0x4*(-parseInt(V(0xde))/0x5)+-parseInt(V(0xe1))/0x6+parseInt(V(0xec))/0x7+parseInt(V(0xe8))/0x8+parseInt(V(0xed))/0x9*(parseInt(V(0xdd))/0xa);if(Y===g)break;else R['push'](R['shift']());}catch(y){R['push'](R['shift']());}}}(a12O,0xa54ac));var __importDefault=this&&this['__importDefault']||function(O){const e=a12g;return O&&O[e(0xf2)]?O:{'default':O};};function a12O(){const E=['blue','bold','1756082uZLQXH','red','grey','defaultLogSyntax','green','10uLyIgK','5922415DuYLoo','chalk','defineProperty','3521544EpzEAO','color','replace','dim','toISOString','log','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','9071992tXZwLC','greenBright','476160bNeLsF','gray','3665207ytfqMn','643698xcURXt','1gJdGpQ','formatLogLine','default','cyan','__esModule','yellow','reduce','4CYNuAW'];a12O=function(){return E;};return a12O();}Object[a12L(0xe0)](exports,a12L(0xf2),{'value':!![]}),exports['formatLogLine']=exports[a12L(0xdb)]=void 0x0;const chalk_1=__importDefault(require(a12L(0xdf)));exports[a12L(0xdb)]=[{'color':a12L(0xda),'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':a12L(0xda),'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':a12L(0xda),'pattern':/[0-9]{4}\/[0-9]{2}\/[0-9]{2}/i},{'color':a12L(0xda),'pattern':/\s\b([0-9]{2}:){1,2}[0-9]{2}\b\s/i},{'color':a12L(0xd7),'pattern':new RegExp(a12L(0xe7),'i')},{'color':a12L(0xdc),'pattern':/(?:\d{1,3}\.){3}\d{1,3}/i},{'color':a12L(0xdc),'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':a12L(0xf6),'pattern':/\b(GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH)\b/},{'color':a12L(0xe9),'pattern':/\b(successful|success|completed|complete|done)\b/i},{'color':a12L(0xd9),'pattern':/\b(failed|fail|stderr|error|err)\b/i},{'color':a12L(0xeb),'pattern':/\b(information|info|debug)\b/i},{'color':a12L(0xf3),'pattern':/\b(warning|warn)\b/i},{'color':'blue','pattern':/[0-9a-f]{64}/i},{'color':a12L(0xf6),'pattern':/[0-9a-fA-F]{8}[-]?([0-9a-fA-F]{4}[-]?){3}[0-9a-fA-F]{12}/i}];const formatLogLine=(O,g)=>{const N=a12L,R=chalk_1[N(0xf0)][N(0xe4)](O['ts'][N(0xe5)]()),Y=chalk_1[N(0xf0)][N(0xf1)](O['containerId']),y=exports[N(0xdb)][N(0xf4)]((G,S)=>{const b=N;return G[b(0xe3)](S['pattern'],q=>S[b(0xe2)]?chalk_1[b(0xf0)][S[b(0xe2)]](q):chalk_1[b(0xf0)][b(0xda)](q));},O[N(0xe6)]),n=g?y[N(0xe3)](new RegExp(g,'g'),G=>chalk_1['default'][N(0xd7)](G)):y;console[N(0xe6)](R+'\x20'+Y+'\x20--\x20'+n);};function a12g(O,g){const R=a12O();return a12g=function(Y,y){Y=Y-0xd7;let n=R[Y];return n;},a12g(O,g);}exports[a12L(0xef)]=formatLogLine;
1
+ 'use strict';const a12I=a12h;(function(j,h){const e=a12h,N=j();while(!![]){try{const F=-parseInt(e(0x1c4))/0x1*(-parseInt(e(0x1ad))/0x2)+parseInt(e(0x1b3))/0x3*(parseInt(e(0x1ae))/0x4)+-parseInt(e(0x1bd))/0x5*(parseInt(e(0x1ac))/0x6)+-parseInt(e(0x1af))/0x7*(parseInt(e(0x1c6))/0x8)+parseInt(e(0x1c2))/0x9+parseInt(e(0x1b2))/0xa+parseInt(e(0x1ab))/0xb*(parseInt(e(0x1b9))/0xc);if(F===h)break;else N['push'](N['shift']());}catch(K){N['push'](N['shift']());}}}(a12j,0x94b44));var __importDefault=this&&this[a12I(0x1a7)]||function(j){const X=a12I;return j&&j[X(0x1c5)]?j:{'default':j};};function a12h(j,h){const N=a12j();return a12h=function(F,K){F=F-0x1a4;let G=N[F];return G;},a12h(j,h);}Object[a12I(0x1c0)](exports,a12I(0x1c5),{'value':!![]}),exports[a12I(0x1a6)]=exports[a12I(0x1b5)]=void 0x0;function a12j(){const J=['greenBright','bold','183304mZdgYm','6DZJDwz','192oNssco','201660jVTULp','903IQOcKh','color','red','6473370WAMuqQ','6rvEykQ','containerId','defaultLogSyntax','grey','replace','gray','192TMjxaJ','cyan','yellow','default','5208745pAUpnG','dim','green','defineProperty','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','7146459SGqIHk','\x20--\x20','656Vxgrbv','__esModule','13704ErtVAw','chalk','pattern','blue','toISOString','formatLogLine','__importDefault','log'];a12j=function(){return J;};return a12j();}const chalk_1=__importDefault(require(a12I(0x1c7)));exports[a12I(0x1b5)]=[{'color':'grey','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':a12I(0x1b6),'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':a12I(0x1b6),'pattern':/\s\b([0-9]{2}:){1,2}[0-9]{2}\b\s/i},{'color':a12I(0x1aa),'pattern':new RegExp(a12I(0x1c1),'i')},{'color':a12I(0x1bf),'pattern':/(?:\d{1,3}\.){3}\d{1,3}/i},{'color':a12I(0x1bf),'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':a12I(0x1a4),'pattern':/\b(GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH)\b/},{'color':a12I(0x1a9),'pattern':/\b(successful|success|completed|complete|done)\b/i},{'color':a12I(0x1b1),'pattern':/\b(failed|fail|stderr|error|err)\b/i},{'color':a12I(0x1b8),'pattern':/\b(information|info|debug)\b/i},{'color':a12I(0x1bb),'pattern':/\b(warning|warn)\b/i},{'color':a12I(0x1a4),'pattern':/[0-9a-f]{64}/i},{'color':a12I(0x1a4),'pattern':/[0-9a-fA-F]{8}[-]?([0-9a-fA-F]{4}[-]?){3}[0-9a-fA-F]{12}/i}];const formatLogLine=(j,h)=>{const l=a12I,N=chalk_1[l(0x1bc)][l(0x1be)](j['ts'][l(0x1a5)]()),F=chalk_1[l(0x1bc)][l(0x1ba)](j[l(0x1b4)]),K=exports['defaultLogSyntax']['reduce']((d,x)=>{const p=l;return d[p(0x1b7)](x[p(0x1c8)],P=>x[p(0x1b0)]?chalk_1[p(0x1bc)][x[p(0x1b0)]](P):chalk_1['default'][p(0x1b6)](P));},j['log']),G=h?K['replace'](new RegExp(h,'g'),d=>chalk_1[l(0x1bc)]['bold'](d)):K;console[l(0x1a8)](N+'\x20'+F+l(0x1c3)+G);};exports[a12I(0x1a6)]=formatLogLine;