@northflank/cli 0.9.19 → 0.9.20

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 a4o=a4I;(function(u,I){const R=a4I,a=u();while(!![]){try{const x=-parseInt(R(0x243))/0x1+-parseInt(R(0x221))/0x2*(parseInt(R(0x21b))/0x3)+parseInt(R(0x208))/0x4+-parseInt(R(0x202))/0x5*(-parseInt(R(0x21a))/0x6)+parseInt(R(0x1fe))/0x7*(-parseInt(R(0x226))/0x8)+-parseInt(R(0x250))/0x9*(-parseInt(R(0x1ec))/0xa)+parseInt(R(0x227))/0xb;if(x===I)break;else a['push'](a['shift']());}catch(D){a['push'](a['shift']());}}}(a4u,0x596b5));function a4u(){const S=['254352pCAmrx','stdout','setRawMode','with\x20shell\x20session','5aurMhj','resizeTerminal','slice','filter','execStartLog','warning','99848HTOtsI','status','getTerminalSize','assertContextExisting','handleShellSession','\x20to\x20exec\x20into','name','InquirerHelper','done','__importDefault','ApiClient','execJobSession','with\x20command\x20\x27','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','log','none','next','\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','4340706ytlWch','5667UGSEck','option','Received\x20Ctrl+D\x20twice,\x20exiting\x20shell\x20forcefully.','bold','Unknown','exitCode','398TSmiAZ','stdOut','getCommand','greenBright','without\x20shell','56WmsRxC','8566261NTCySW','stdin','getCurrentServiceName','Container\x20to\x20exec\x20into\x20(random\x20container\x20will\x20be\x20chosen\x20if\x20not\x20specified)','toUpperCase','--user\x20[USER]','Command\x20exec\x20for\x20the\x20specified\x20','Run\x20command\x20with\x20this\x20user','keypress','\x20in\x20project\x20','--container\x20--containerId\x20[NAME]','value','command-exec','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.','with\x20user:','isTTY','pipe','defineProperty','apply','exit','customUserAgent','sequence','columns','rows','join',',\x20details:\x20','Command\x20execution\x20(exec)\x20for\x20Northflank\x20services\x20and\x20jobs.','then','596530UdDWlL','description','Project\x20for\x20exec','exec','Run\x20command\x20with\x20this\x20group','execServiceSession','job','default','../utils','__esModule','throw','resize','addCommand','53910yqqjsJ','shell\x20command\x20','waitForCommandResult','--group\x20[GROUP]','.\x0aExamples:\x0a\x20\x20Shell\x20session:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20northflank\x20exec\x20','@northflank/js-client','action','execCmd','stdErr','error','--noDefaults','110lwQXvd','apiClient','getCurrentProjectName','alias','CliExec','stdIn','(exit\x20with\x20two\x20quick\x20','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.','\x0a\x20\x20Single\x20command,\x20no\x20shell:\x20\x20\x20\x20\x20northflank\x20exec\x20','getStandardExecCommand','with\x20group:','--project\x20--projectId\x20[NAME]','emitKeypressEvents','success','\x20--','askForService','message','askForProject'];a4u=function(){return S;};return a4u();}var __awaiter=this&&this['__awaiter']||function(u,I,a,x){function D(K){return K instanceof a?K:new a(function(z){z(K);});}return new(a||(a=Promise))(function(K,z){const r=a4I;function H(p){const q=a4I;try{C(x[q(0x218)](p));}catch(b){z(b);}}function s(p){const c=a4I;try{C(x[c(0x24d)](p));}catch(b){z(b);}}function C(p){const M=a4I;p[M(0x210)]?K(p[M(0x232)]):D(p[M(0x232)])[M(0x242)](H,s);}C((x=x[r(0x239)](u,I||[]))[r(0x218)]());});},__importDefault=this&&this[a4o(0x211)]||function(u){const w=a4o;return u&&u[w(0x24c)]?u:{'default':u};};Object[a4o(0x238)](exports,a4o(0x24c),{'value':!![]}),exports[a4o(0x1f0)]=void 0x0;const js_client_1=require(a4o(0x1e6)),chalk_1=__importDefault(require('chalk')),utils_1=require(a4o(0x24b)),inquirer_helper_1=require('../inquirer-helper');function a4I(u,I){const a=a4u();return a4I=function(x,D){x=x-0x1e6;let K=a[x];return K;},a4I(u,I);}class CliExec{constructor(u){const h=a4o;this['getStandardExecCommand']=D=>(0x0,utils_1[h(0x223)])(!![])[h(0x20e)](D)['description'](h(0x22d)+D+h(0x254)+D+h(0x1f4)+D+'\x20--cmd\x20\x27date\x27\x0a\x20\x20Single\x20command,\x20custom\x20shell:\x20northflank\x20exec\x20'+D+h(0x219)+D+'\x20--shell-cmd\x20\x27sh\x27')[h(0x21c)](h(0x1f7),h(0x245))[h(0x21c)]('--'+D+h(0x1fa)+D+'Id\x20[NAME]',D['charAt'](0x0)[h(0x22b)]()+D[h(0x204)](0x1)+h(0x20d))[h(0x21c)](h(0x231),h(0x22a))[h(0x21c)]('--shell-cmd\x20[SHELL-CMD]',h(0x1f3))[h(0x21c)](h(0x22c),h(0x22e))[h(0x21c)](h(0x253),h(0x247))[h(0x21c)](h(0x1eb),h(0x215),![])[h(0x21c)]('--cmd\x20--command\x20[COMMAND]',h(0x234)),this[h(0x20a)]=()=>({'columns':process['stdout'][h(0x23d)],'rows':process['stdout']['rows']}),this[h(0x206)]=(D,K,z,H,s,C,p,b)=>{const W=h;if(b===!![])return;const i=H==='none',j=i?W(0x225):H===undefined?W(0x201):W(0x251)+chalk_1['default'][W(0x224)](H),A=s!==undefined?W(0x235)+s:'',F=C!==undefined?W(0x1f6)+C:'',X=p!==undefined?W(0x214)+chalk_1[W(0x24a)]['greenBright'](p)+'\x27':'',T=[X,j,A,F][W(0x205)](f=>f!=='')[W(0x23f)]('\x20'),E=W(0x1f2)+chalk_1[W(0x24a)][W(0x21e)]('\x27Ctrl+D\x27')+')';console[W(0x216)]('Exec\x20'+D+'\x20'+chalk_1[W(0x24a)]['bold'](K)+W(0x230)+chalk_1[W(0x24a)][W(0x21e)](z)+'\x20'+T+'\x20'+E);},this[h(0x20c)]=(D,K,z=![])=>__awaiter(this,void 0x0,void 0x0,function*(){const B=h;var H,s;let C=![];try{if(process[B(0x228)][B(0x236)]){const b=require('readline');b[B(0x1f8)](process[B(0x228)]),process[B(0x228)][B(0x200)](!![]),process[B(0x1ff)]['on'](B(0x24e),()=>{const J=B;D[J(0x203)](this[J(0x20a)]());}),process[B(0x228)]['on'](B(0x22f),(i,j)=>{const V=B;j[V(0x23c)]==='\x04'&&(C?(process[V(0x228)][V(0x200)](![]),(0x0,utils_1[V(0x207)])(V(0x21d)),process[V(0x23a)]()):(C=!![],setTimeout(()=>C=![],0x190)));});}process[B(0x228)][B(0x237)](D[B(0x1f1)]),D[B(0x1e9)][B(0x237)](process['stderr']),D[B(0x222)][B(0x237)](process['stdout']),D['on'](B(0x1ea),i=>{const y=B;var j;(0x0,utils_1[y(0x1ea)])('Error\x20occured\x20during\x20'+K+'\x20command\x20exec:\x20'+((j=i[y(0x1fc)])!==null&&j!==void 0x0?j:i)),process[y(0x228)][y(0x236)]&&process[y(0x228)][y(0x200)](![]),process[y(0x23a)](-0x1);});const p=yield D[B(0x252)]();if(z!==!![]){const i=(H=p===null||p===void 0x0?void 0x0:p[B(0x209)])!==null&&H!==void 0x0?H:B(0x21f),j=(s=p===null||p===void 0x0?void 0x0:p[B(0x220)])!==null&&s!==void 0x0?s:-0x1,A=(p===null||p===void 0x0?void 0x0:p[B(0x1fc)])?B(0x240)+p[B(0x1fc)]:'';i==='Success'?(0x0,utils_1[B(0x1f9)])('Command\x20completed\x20successfully,\x20exit\x20code:\x20'+j):(0x0,utils_1[B(0x207)])('Command\x20didn\x27t\x20complete\x20successfully,\x20status:\x20'+i+',\x20exit\x20code:\x20'+j+A);}return p;}finally{process[B(0x228)]['isTTY']&&process[B(0x228)]['setRawMode'](![]);}}),this['apiClient']=new js_client_1[(h(0x212))](u,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[h(0x23b)]});const I=new inquirer_helper_1[(h(0x20f))](this[h(0x1ed)]);this[h(0x1e8)]=(0x0,utils_1[h(0x223)])()[h(0x20e)](h(0x233))[h(0x1ef)](h(0x246))[h(0x244)](h(0x241));const a=this[h(0x1f5)]('service')[h(0x1e7)](D=>__awaiter(this,void 0x0,void 0x0,function*(){const e=h,{noDefaults:K,projectId:z,serviceId:H,containerId:s,shellCmd:C,user:p,group:b,command:i,quiet:j}=D;(0x0,utils_1[e(0x20b)])(this[e(0x1ed)]);try{const A=K?undefined:u['getCurrentProjectName'](),F=z||A||(yield I[e(0x1fd)]()),X=K?undefined:u[e(0x229)](),T=H||X||(yield I[e(0x1fb)](F)()),E=C!==null&&C!==void 0x0?C:i!==undefined?e(0x217):undefined;this['execStartLog']('service',T,F,E,p,b,i,j);const f=process[e(0x1ff)][e(0x23d)],N=process[e(0x1ff)][e(0x23e)],P={'projectId':F,'serviceId':T},m=yield this[e(0x1ed)][e(0x246)][e(0x248)](P,{'containerName':s,'command':i,'shell':E,'user':p,'group':b,'ttyColumns':f,'ttyRows':N});yield this['handleShellSession'](m,'service',j);}catch(k){(0x0,utils_1[e(0x1ea)])(''+k[e(0x1fc)]);}finally{process[e(0x23a)]();}})),x=this['getStandardExecCommand'](h(0x249))['action'](D=>__awaiter(this,void 0x0,void 0x0,function*(){const U=h,{projectId:K,jobId:z,containerId:H,noDefaults:s,shellCmd:C,user:p,group:b,command:i,quiet:j}=D;(0x0,utils_1[U(0x20b)])(this['apiClient']);try{const A=s?undefined:u[U(0x1ee)](),F=K||A||(yield I[U(0x1fd)]()),X=z||(yield I['askForJob'](F)());this[U(0x206)]('job',X,F,C,j);const {rows:T,columns:E}=this['getTerminalSize'](),f={'projectId':F,'jobId':X},N=yield this['apiClient'][U(0x246)][U(0x213)](f,{'containerName':H,'command':i,'shell':C,'user':p,'group':b,'ttyColumns':E,'ttyRows':T});yield this[U(0x20c)](N,U(0x249),j);}catch(P){(0x0,utils_1[U(0x1ea)])(''+P[U(0x1fc)]);}finally{process[U(0x23a)]();}}));this[h(0x1e8)][h(0x24f)](a),this[h(0x1e8)][h(0x24f)](x);}}exports[a4o(0x1f0)]=CliExec;
1
+ 'use strict';const a4k=a4J;(function(Z,J){const d=a4J,z=Z();while(!![]){try{const P=-parseInt(d(0x78))/0x1+parseInt(d(0xcf))/0x2+-parseInt(d(0xbd))/0x3*(-parseInt(d(0xbf))/0x4)+parseInt(d(0xaf))/0x5*(parseInt(d(0x87))/0x6)+-parseInt(d(0xc1))/0x7+-parseInt(d(0x8c))/0x8*(parseInt(d(0x84))/0x9)+parseInt(d(0xc0))/0xa;if(P===J)break;else z['push'](z['shift']());}catch(B){z['push'](z['shift']());}}}(a4Z,0xa205a));function a4Z(){const f=['Command\x20completed\x20successfully,\x20exit\x20code:\x20','action','then','\x20to\x20exec\x20into','askForProject','greenBright','log','--user\x20[USER]','with\x20user:','\x20in\x20project\x20','__esModule','throw','setRawMode','readline','description','--cmd\x20--command\x20[COMMAND]','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\x20group:','Run\x20command\x20with\x20this\x20group','1820SYwoFS','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.','Container\x20to\x20exec\x20into\x20(random\x20container\x20will\x20be\x20chosen\x20if\x20not\x20specified)','toUpperCase','apply','stdout','default','error','sequence','join','message','shell\x20command\x20','InquirerHelper','chalk','566103YekaWx','exitCode','12LVmoPe','890940VCWmiL','1314502Mugcpk','getCurrentProjectName','@northflank/js-client','Id\x20[NAME]','getTerminalSize','charAt','resizeTerminal','exec','emitKeypressEvents','name','apiClient','getCommand','--group\x20[GROUP]','customUserAgent','52224PyAjyR','askForService','rows','execStartLog','bold','\x20--cmd\x20\x27date\x27\x0a\x20\x20Single\x20command,\x20custom\x20shell:\x20northflank\x20exec\x20','defineProperty','execCmd','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','pipe','addCommand','execJobSession','exit','command-exec','columns','__awaiter','--container\x20--containerId\x20[NAME]','job','Project\x20for\x20exec','Received\x20Ctrl+D\x20twice,\x20exiting\x20shell\x20forcefully.','service','value','\x0a\x20\x20Single\x20command,\x20no\x20shell:\x20\x20\x20\x20\x20northflank\x20exec\x20','95557pZMGxF','stdin','Unknown','Exec\x20','isTTY','Command\x20execution\x20(exec)\x20for\x20Northflank\x20services\x20and\x20jobs.','Command\x20exec\x20for\x20the\x20specified\x20','stderr','Success','none','Error\x20occured\x20during\x20','keypress','576GXzbHd','\x27Ctrl+D\x27','getStandardExecCommand','9462cZSCuc','status','execServiceSession','stdOut','next','38544vjHquF','without\x20shell','warning','__importDefault','handleShellSession','../utils','option','--shell-cmd\x20[SHELL-CMD]','waitForCommandResult','with\x20shell\x20session','with\x20command\x20\x27','assertContextExisting','\x20--','ApiClient','getCurrentServiceName','askForJob'];a4Z=function(){return f;};return a4Z();}var __awaiter=this&&this[a4k(0xde)]||function(Z,J,z,B){function U(s){return s instanceof z?s:new z(function(A){A(s);});}return new(z||(z=Promise))(function(s,A){const X=a4J;function n(v){try{C(B['next'](v));}catch(o){A(o);}}function F(v){const N=a4J;try{C(B[N(0xa7)](v));}catch(o){A(o);}}function C(v){const W=a4J;v['done']?s(v[W(0x76)]):U(v['value'])[W(0x9e)](n,F);}C((B=B[X(0xb3)](Z,J||[]))[X(0x8b)]());});},__importDefault=this&&this[a4k(0x8f)]||function(Z){return Z&&Z['__esModule']?Z:{'default':Z};};Object[a4k(0xd5)](exports,a4k(0xa6),{'value':!![]}),exports['CliExec']=void 0x0;function a4J(Z,J){const z=a4Z();return a4J=function(P,B){P=P-0x72;let U=z[P];return U;},a4J(Z,J);}const js_client_1=require(a4k(0xc3)),chalk_1=__importDefault(require(a4k(0xbc))),utils_1=require(a4k(0x91)),inquirer_helper_1=require('../inquirer-helper');class CliExec{constructor(Z){const D=a4k;this[D(0x86)]=B=>(0x0,utils_1[D(0xcc)])(!![])[D(0xca)](B)[D(0xaa)](D(0x7e)+B+'.\x0aExamples:\x0a\x20\x20Shell\x20session:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20northflank\x20exec\x20'+B+D(0x77)+B+D(0xd4)+B+'\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'+B+'\x20--shell-cmd\x20\x27sh\x27')[D(0x92)]('--project\x20--projectId\x20[NAME]',D(0x73))[D(0x92)]('--'+B+D(0x98)+B+D(0xc4),B[D(0xc6)](0x0)[D(0xb2)]()+B['slice'](0x1)+D(0x9f))[D(0x92)](D(0xdf),D(0xb1))[D(0x92)](D(0x93),D(0xac))[D(0x92)](D(0xa3),'Run\x20command\x20with\x20this\x20user')['option'](D(0xcd),D(0xae))[D(0x92)]('--noDefaults',D(0xd7),![])['option'](D(0xab),D(0xb0)),this[D(0xc5)]=()=>({'columns':process[D(0xb4)][D(0xdd)],'rows':process[D(0xb4)][D(0xd1)]}),this['execStartLog']=(B,U,s,A,n,F,C,v)=>{const q=D;if(v===!![])return;const o=A===q(0x81),j=o?q(0x8d):A===undefined?q(0x95):q(0xba)+chalk_1[q(0xb5)][q(0xa1)](A),V=n!==undefined?q(0xa4)+n:'',i=F!==undefined?q(0xad)+F:'',p=C!==undefined?q(0x96)+chalk_1[q(0xb5)][q(0xa1)](C)+'\x27':'',S=[p,j,V,i]['filter'](g=>g!=='')[q(0xb8)]('\x20'),e='(exit\x20with\x20two\x20quick\x20'+chalk_1[q(0xb5)][q(0xd3)](q(0x85))+')';console[q(0xa2)](q(0x7b)+B+'\x20'+chalk_1['default'][q(0xd3)](U)+q(0xa5)+chalk_1[q(0xb5)]['bold'](s)+'\x20'+S+'\x20'+e);},this[D(0x90)]=(B,U,s=![])=>__awaiter(this,void 0x0,void 0x0,function*(){const y=D;var A,n;let F=![];try{if(process['stdin'][y(0x7c)]){const v=require(y(0xa9));v[y(0xc9)](process[y(0x79)]),process[y(0x79)][y(0xa8)](!![]),process[y(0xb4)]['on']('resize',()=>{const O=y;B[O(0xc7)](this[O(0xc5)]());}),process[y(0x79)]['on'](y(0x83),(o,j)=>{const G=y;j[G(0xb7)]==='\x04'&&(F?(process[G(0x79)][G(0xa8)](![]),(0x0,utils_1['warning'])(G(0x74)),process[G(0xdb)]()):(F=!![],setTimeout(()=>F=![],0x190)));});}process[y(0x79)][y(0xd8)](B['stdIn']),B['stdErr'][y(0xd8)](process[y(0x7f)]),B[y(0x8a)][y(0xd8)](process[y(0xb4)]),B['on'](y(0xb6),o=>{const K=y;var j;(0x0,utils_1['error'])(K(0x82)+U+'\x20command\x20exec:\x20'+((j=o[K(0xb9)])!==null&&j!==void 0x0?j:o)),process[K(0x79)][K(0x7c)]&&process['stdin'][K(0xa8)](![]),process['exit'](-0x1);});const C=yield B[y(0x94)]();if(s!==!![]){const o=(A=C===null||C===void 0x0?void 0x0:C[y(0x88)])!==null&&A!==void 0x0?A:y(0x7a),j=(n=C===null||C===void 0x0?void 0x0:C[y(0xbe)])!==null&&n!==void 0x0?n:-0x1,V=(C===null||C===void 0x0?void 0x0:C['message'])?',\x20details:\x20'+C[y(0xb9)]:'';o===y(0x80)?(0x0,utils_1['success'])(y(0x9c)+j):(0x0,utils_1[y(0x8e)])('Command\x20didn\x27t\x20complete\x20successfully,\x20status:\x20'+o+',\x20exit\x20code:\x20'+j+V);}return C;}finally{process[y(0x79)][y(0x7c)]&&process['stdin']['setRawMode'](![]);}}),this[D(0xcb)]=new js_client_1[(D(0x99))](Z,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[D(0xce)]});const J=new inquirer_helper_1[(D(0xbb))](this[D(0xcb)]);this[D(0xd6)]=(0x0,utils_1[D(0xcc)])()[D(0xca)](D(0xdc))['alias'](D(0xc8))[D(0xaa)](D(0x7d));const z=this[D(0x86)](D(0x75))[D(0x9d)](B=>__awaiter(this,void 0x0,void 0x0,function*(){const l=D,{noDefaults:U,projectId:s,serviceId:A,containerId:n,shellCmd:F,user:C,group:v,command:o,quiet:j}=B;(0x0,utils_1[l(0x97)])(this[l(0xcb)]);try{const V=U?undefined:Z[l(0xc2)](),i=s||V||(yield J[l(0xa0)]()),p=U?undefined:Z[l(0x9a)](),S=A||p||(yield J[l(0xd0)](i)()),g=F!==null&&F!==void 0x0?F:o!==undefined?'none':undefined;this[l(0xd2)]('service',S,i,g,C,v,o,j);const I=process[l(0xb4)][l(0xdd)],m=process['stdout'][l(0xd1)],L={'projectId':i,'serviceId':S},M=yield this['apiClient'][l(0xc8)][l(0x89)](L,{'containerName':n,'command':o,'shell':g,'user':C,'group':v,'ttyColumns':I,'ttyRows':m});yield this['handleShellSession'](M,'service',j);}catch(x){(0x0,utils_1[l(0xb6)])(''+x[l(0xb9)]);}finally{process['exit']();}})),P=this[D(0x86)]('job')['action'](B=>__awaiter(this,void 0x0,void 0x0,function*(){const b=D,{projectId:U,jobId:s,containerId:A,noDefaults:n,shellCmd:F,user:C,group:v,command:o,quiet:j}=B;(0x0,utils_1[b(0x97)])(this['apiClient']);try{const V=n?undefined:Z[b(0xc2)](),i=U||V||(yield J[b(0xa0)]()),p=s||(yield J[b(0x9b)](i)());this['execStartLog'](b(0x72),p,i,F,j);const {rows:S,columns:g}=this[b(0xc5)](),I={'projectId':i,'jobId':p},m=yield this[b(0xcb)][b(0xc8)][b(0xda)](I,{'containerName':A,'command':o,'shell':F,'user':C,'group':v,'ttyColumns':g,'ttyRows':S});yield this[b(0x90)](m,b(0x72),j);}catch(L){(0x0,utils_1[b(0xb6)])(''+L[b(0xb9)]);}finally{process[b(0xdb)]();}}));this[D(0xd6)]['addCommand'](z),this['execCmd'][D(0xd9)](P);}}exports['CliExec']=CliExec;
@@ -1 +1 @@
1
- 'use strict';const a5m=a5I;(function(u,I){const P=a5I,a=u();while(!![]){try{const x=-parseInt(P(0x165))/0x1+parseInt(P(0x17b))/0x2+-parseInt(P(0x177))/0x3+parseInt(P(0x180))/0x4*(parseInt(P(0x16c))/0x5)+-parseInt(P(0x182))/0x6+-parseInt(P(0x172))/0x7*(-parseInt(P(0x16a))/0x8)+parseInt(P(0x167))/0x9*(parseInt(P(0x169))/0xa);if(x===I)break;else a['push'](a['shift']());}catch(D){a['push'](a['shift']());}}}(a5u,0xb7551));function a5I(u,I){const a=a5u();return a5I=function(x,D){x=x-0x160;let K=a[x];return K;},a5I(u,I);}var __awaiter=this&&this[a5m(0x166)]||function(u,I,a,x){function D(K){return K instanceof a?K:new a(function(z){z(K);});}return new(a||(a=Promise))(function(K,z){const c=a5I;function H(p){const k=a5I;try{C(x[k(0x160)](p));}catch(b){z(b);}}function s(p){const R=a5I;try{C(x[R(0x171)](p));}catch(b){z(b);}}function C(p){const q=a5I;p['done']?K(p[q(0x178)]):D(p[q(0x178)])[q(0x181)](H,s);}C((x=x[c(0x174)](u,I||[]))[c(0x160)]());});},__importDefault=this&&this[a5m(0x17c)]||function(u){return u&&u['__esModule']?u:{'default':u};};Object[a5m(0x16f)](exports,a5m(0x17d),{'value':!![]}),exports['getCommandOverview']=void 0x0;const chalk_1=__importDefault(require(a5m(0x17a))),utils_1=require('../utils');function getCommandOverview(u){const M=a5m;return(0x0,utils_1[M(0x17f)])()['name'](M(0x163))['description']('Prints\x20a\x20tree\x20view\x20of\x20all\x20available\x20commands')[M(0x164)](M(0x16e),M(0x16b))['action'](I=>__awaiter(this,void 0x0,void 0x0,function*(){const {verbose:a}=I;function x(D,K){const r=a5I;var z;const H=(E,f=!![])=>f?chalk_1['default'][r(0x162)]['green'](E['name']()):E[r(0x183)](),s=K[r(0x179)]===0x0,C=D[r(0x173)];let p='';const b=C[r(0x179)]===0x0,i=b||((z=Object[r(0x175)](D===null||D===void 0x0?void 0x0:D[r(0x16d)]()))===null||z===void 0x0?void 0x0:z[r(0x179)])>0x0;!s&&(p=C&&!b?'┬\x20':'─\x20');const j=a&&i&&D['description']()?':\x20'+D[r(0x170)]():'';console['log'](''+K+p+H(D,i)+j);let A=K;if(!s){const E=K[r(0x161)](-0x2)==='└─';A=K[r(0x161)](0x0,-0x2)+(E?'\x20\x20':'│\x20');}const F=A+'├─',X=A+'└─',T=C[r(0x17e)](f=>f[r(0x173)]['length']===0x0);T&&!b&&!a?console['log'](X+'\x20'+C[r(0x176)](f=>H(f))[r(0x168)](',\x20')):C['forEach']((f,N)=>{x(f,C['length']-0x1===N?X:F);});}x(u,'');}));}exports['getCommandOverview']=getCommandOverview;function a5u(){const o=['4970vbJWwI','408IQCzli','Print\x20command\x20descriptions','6635ODGeQL','opts','--verbose','defineProperty','description','throw','137949cjKFbF','commands','apply','keys','map','2038398hvMGRY','value','length','chalk','822852ZtYLuc','__importDefault','__esModule','every','getCommand','16STTrEM','then','5335314tDdDHx','name','next','slice','bold','command-overview','option','1260648jUqzSU','__awaiter','39087nbWYUd','join'];a5u=function(){return o;};return a5u();}
1
+ 'use strict';const a5L=a5J;(function(Z,J){const m=a5J,z=Z();while(!![]){try{const P=parseInt(m(0xbc))/0x1*(parseInt(m(0xbe))/0x2)+-parseInt(m(0xb5))/0x3+parseInt(m(0xb6))/0x4*(-parseInt(m(0xb7))/0x5)+-parseInt(m(0xa0))/0x6*(-parseInt(m(0xba))/0x7)+-parseInt(m(0xb1))/0x8+parseInt(m(0xa9))/0x9*(parseInt(m(0xa5))/0xa)+-parseInt(m(0xad))/0xb;if(P===J)break;else z['push'](z['shift']());}catch(B){z['push'](z['shift']());}}}(a5Z,0x5dcdb));var __awaiter=this&&this[a5L(0xa8)]||function(Z,J,z,B){function U(s){return s instanceof z?s:new z(function(A){A(s);});}return new(z||(z=Promise))(function(s,A){function n(v){const M=a5J;try{C(B[M(0xa7)](v));}catch(o){A(o);}}function F(v){const x=a5J;try{C(B[x(0xc5)](v));}catch(o){A(o);}}function C(v){const d=a5J;v[d(0xc3)]?s(v['value']):U(v[d(0xbf)])[d(0xb8)](n,F);}C((B=B['apply'](Z,J||[]))['next']());});},__importDefault=this&&this[a5L(0xaa)]||function(Z){const k=a5L;return Z&&Z[k(0xbd)]?Z:{'default':Z};};Object['defineProperty'](exports,a5L(0xbd),{'value':!![]}),exports['getCommandOverview']=void 0x0;const chalk_1=__importDefault(require(a5L(0xa6))),utils_1=require('../utils');function getCommandOverview(Z){const N=a5L;return(0x0,utils_1[N(0xaf)])()[N(0xae)](N(0xb0))['description'](N(0xa1))['option'](N(0xc2),N(0xa2))[N(0xbb)](J=>__awaiter(this,void 0x0,void 0x0,function*(){const {verbose:z}=J;function P(B,U){const W=a5J;var s;const A=(e,g=!![])=>g?chalk_1[W(0xc0)][W(0xab)]['green'](e[W(0xae)]()):e[W(0xae)](),n=U['length']===0x0,F=B[W(0xa4)];let C='';const v=F[W(0xa3)]===0x0,o=v||((s=Object[W(0xc1)](B===null||B===void 0x0?void 0x0:B[W(0xac)]()))===null||s===void 0x0?void 0x0:s['length'])>0x0;!n&&(C=F&&!v?'┬\x20':'─\x20');const j=z&&o&&B['description']()?':\x20'+B[W(0xb4)]():'';console[W(0xb9)](''+U+C+A(B,o)+j);let V=U;if(!n){const e=U[W(0xc4)](-0x2)==='└─';V=U[W(0xc4)](0x0,-0x2)+(e?'\x20\x20':'│\x20');}const i=V+'├─',p=V+'└─',S=F[W(0xb3)](g=>g[W(0xa4)]['length']===0x0);S&&!v&&!z?console[W(0xb9)](p+'\x20'+F['map'](g=>A(g))[W(0xb2)](',\x20')):F['forEach']((g,I)=>{const X=W;P(g,F[X(0xa3)]-0x1===I?p:i);});}P(Z,'');}));}function a5J(Z,J){const z=a5Z();return a5J=function(P,B){P=P-0xa0;let U=z[P];return U;},a5J(Z,J);}exports['getCommandOverview']=getCommandOverview;function a5Z(){const D=['1973872NKdGrs','join','every','description','925554PcqsXX','4pilRLQ','66335uUxOnN','then','log','7IUhOWP','action','30MMqhxY','__esModule','32542EEOLbj','value','default','keys','--verbose','done','slice','throw','3254226DdJYyg','Prints\x20a\x20tree\x20view\x20of\x20all\x20available\x20commands','Print\x20command\x20descriptions','length','commands','1553280mLVuao','chalk','next','__awaiter','9qfdBTy','__importDefault','bold','opts','2564001lDarsk','name','getCommand','command-overview'];a5Z=function(){return D;};return a5Z();}
@@ -1 +1 @@
1
- 'use strict';const a6X=a6I;(function(u,I){const F=a6I,a=u();while(!![]){try{const x=-parseInt(F(0xcc))/0x1*(parseInt(F(0xfe))/0x2)+-parseInt(F(0xe9))/0x3*(parseInt(F(0xcd))/0x4)+-parseInt(F(0xe6))/0x5+-parseInt(F(0xd2))/0x6*(-parseInt(F(0xe5))/0x7)+-parseInt(F(0xd4))/0x8*(-parseInt(F(0xc2))/0x9)+parseInt(F(0xbd))/0xa*(parseInt(F(0xdd))/0xb)+parseInt(F(0xf8))/0xc*(parseInt(F(0xde))/0xd);if(x===I)break;else a['push'](a['shift']());}catch(D){a['push'](a['shift']());}}}(a6u,0xb189d));var __createBinding=this&&this[a6X(0xf2)]||(Object[a6X(0xcb)]?function(u,I,a,x){const T=a6X;if(x===undefined)x=a;var D=Object['getOwnPropertyDescriptor'](I,a);(!D||(T(0xc6)in D?!I[T(0xed)]:D['writable']||D[T(0xdc)]))&&(D={'enumerable':!![],'get':function(){return I[a];}}),Object['defineProperty'](u,x,D);}:function(u,I,a,x){if(x===undefined)x=a;u[x]=I[a];}),__setModuleDefault=this&&this[a6X(0xe0)]||(Object[a6X(0xcb)]?function(u,I){const E=a6X;Object[E(0xea)](u,'default',{'enumerable':!![],'value':I});}:function(u,I){const f=a6X;u[f(0xd0)]=I;}),__importStar=this&&this['__importStar']||function(u){const N=a6X;if(u&&u[N(0xed)])return u;var I={};if(u!=null){for(var a in u)if(a!==N(0xd0)&&Object[N(0xe3)][N(0xc7)][N(0xf6)](u,a))__createBinding(I,u,a);}return __setModuleDefault(I,u),I;},__importDefault=this&&this[a6X(0xda)]||function(u){const P=a6X;return u&&u[P(0xed)]?u:{'default':u};};Object[a6X(0xea)](exports,a6X(0xed),{'value':!![]}),exports['printResponse']=exports[a6X(0xce)]=exports[a6X(0xd6)]=exports[a6X(0xc3)]=exports[a6X(0xdf)]=exports[a6X(0xf7)]=void 0x0;const chalk_1=__importDefault(require('chalk')),_=__importStar(require(a6X(0xef))),util=__importStar(require(a6X(0xd7))),yaml=require(a6X(0xd5)),columnify=require('columnify');function printAsTable(u,I,a,x=![],D=0x0){const m=a6X;!x&&console[m(0xf3)](''+chalk_1['default'][m(0xbc)](I));function K(H){const k=m;return H===k(0xec)?H:H[k(0xe1)](k(0xec),'');}function z(H,s){const q=m;function C(b){const R=a6I,i=new Date(b);return i[R(0xd1)]()+'/'+i[R(0xca)]()+'/'+i[R(0xc0)]()+'\x0a'+i['getHours']()+':'+i['getMinutes']()+':'+i[R(0xdb)]();}const p=[q(0xbb),q(0xf5)];if(p[q(0xe8)](s['toLowerCase']())&&_[q(0xf0)](H)&&H[q(0xcf)]()[q(0xfc)]===0xd)return C(Number(H));if(_[q(0xd3)](H)){if(s!==q(0xec)&&s[q(0xe8)]('disabled'))return H?'x':'✔';return H?'✔':'x';}if(_['isObjectLike'](H))return util[q(0xe4)](H,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});return H;}if(_[m(0xe7)](u)){u[m(0xfc)]===0x0&&console[m(0xf3)](m(0xd9)+I[m(0xbf)]()+'\x20found');const H=u['map']((p,b)=>{const c=m,i={'i':b+D};return Object[c(0xc8)](p)[c(0xc5)](j=>{const M=c;(_[M(0xf1)](a)||a[M(0xe8)](j[M(0xbf)]()))&&_[M(0xfd)](i,K(j),z(p[j],j));}),i;}),s=_['clone'](Object['keys']((H===null||H===void 0x0?void 0x0:H[0x0])||[]))['sort']((p,i)=>{const r=m,j=A=>A!=='i'?A!==r(0xc4)?0x0:0x1:0x2;return j(i)-j(p);}),C={'maxWidth':0x1e,'preserveNewLines':!![],'showHeaders':!x,'config':{'_id':{'maxWidth':0x5,'truncate':!![]},'i':{'showHeaders':![]}},'columns':s};console[m(0xf3)](columnify(H,C));}else console[m(0xf3)](u);}exports['printAsTable']=printAsTable;function consoleFormat(u,I){const o=a6X;if(_[o(0xfa)](u)){const a=I?o(0xe2)+I+')':'';return chalk_1[o(0xd0)][o(0xbe)](o(0xf4))+a;}if(!_[o(0xfb)](u))return u===null||u===void 0x0?void 0x0:u[o(0xcf)]();return util[o(0xe4)](u,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});}function a6I(u,I){const a=a6u();return a6I=function(x,D){x=x-0xbb;let K=a[x];return K;},a6I(u,I);}exports[a6X(0xdf)]=consoleFormat;const handleJsonOutput=(u,I)=>{const w=a6X,a=u===w(0xf9);if(a)console['log'](JSON[w(0xd8)](I,null,'\x20'));};exports['handleJsonOutput']=handleJsonOutput;const handleYamlOutput=(u,I)=>{const h=a6X,a=u===h(0xc9)||u===h(0xc1);if(a)console[h(0xf3)](yaml[h(0xee)](I));};exports[a6X(0xd6)]=handleYamlOutput;const handleFormattedOutput=(u,I)=>{const W=a6X,a=u===W(0xeb);if(a)console['log'](consoleFormat(I));};exports[a6X(0xce)]=handleFormattedOutput;const printResponse=(u,I)=>{const B=a6X;(0x0,exports[B(0xc3)])(u,I),(0x0,exports[B(0xd6)])(u,I),(0x0,exports['handleFormattedOutput'])(u,I);};exports['printResponse']=printResponse;function a6u(){const J=['2103aRXVOB','defineProperty','format','disabled','__esModule','safeDump','lodash','isFinite','isUndefined','__createBinding','log','The\x20request\x20was\x20completed\x20successfully','updatedat','call','printAsTable','9037788kOklsl','json','isEmpty','isObjectLike','length','set','296vtHOMC','createdat','bold','10HnMLnV','green','toLowerCase','getFullYear','yml','258246zjPkKS','handleJsonOutput','internalId','forEach','get','hasOwnProperty','keys','yaml','getMonth','create','5666XyrHWo','6008BGjBZX','handleFormattedOutput','toString','default','getDate','5256bEhqby','isBoolean','312irCNWj','js-yaml','handleYamlOutput','util','stringify','No\x20','__importDefault','getSeconds','configurable','11566577RfgfUx','13Hntqxp','consoleFormat','__setModuleDefault','replace','\x20(HTTP\x20status:\x20','prototype','inspect','189FMQcpZ','1643535NLAIWL','isArrayLike','includes'];a6u=function(){return J;};return a6u();}
1
+ 'use strict';function a6J(Z,J){const z=a6Z();return a6J=function(P,B){P=P-0x1da;let U=z[P];return U;},a6J(Z,J);}const a6i=a6J;(function(Z,J){const V=a6J,z=Z();while(!![]){try{const P=parseInt(V(0x1fe))/0x1*(-parseInt(V(0x205))/0x2)+-parseInt(V(0x202))/0x3+-parseInt(V(0x216))/0x4+parseInt(V(0x1f4))/0x5*(-parseInt(V(0x210))/0x6)+-parseInt(V(0x1eb))/0x7+-parseInt(V(0x20e))/0x8*(parseInt(V(0x209))/0x9)+parseInt(V(0x208))/0xa*(parseInt(V(0x204))/0xb);if(P===J)break;else z['push'](z['shift']());}catch(B){z['push'](z['shift']());}}}(a6Z,0x273bf));var __createBinding=this&&this[a6i(0x1e0)]||(Object[a6i(0x1fa)]?function(Z,J,z,P){const p=a6i;if(P===undefined)P=z;var B=Object[p(0x1ff)](J,z);(!B||(p(0x1e6)in B?!J[p(0x1ed)]:B['writable']||B[p(0x1fc)]))&&(B={'enumerable':!![],'get':function(){return J[z];}}),Object[p(0x1e5)](Z,P,B);}:function(Z,J,z,P){if(P===undefined)P=z;Z[P]=J[z];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a6i(0x1fa)]?function(Z,J){const S=a6i;Object[S(0x1e5)](Z,S(0x1e9),{'enumerable':!![],'value':J});}:function(Z,J){Z['default']=J;}),__importStar=this&&this[a6i(0x1db)]||function(Z){const e=a6i;if(Z&&Z['__esModule'])return Z;var J={};if(Z!=null){for(var z in Z)if(z!==e(0x1e9)&&Object[e(0x214)][e(0x1dd)]['call'](Z,z))__createBinding(J,Z,z);}return __setModuleDefault(J,Z),J;},__importDefault=this&&this[a6i(0x1e4)]||function(Z){const g=a6i;return Z&&Z[g(0x1ed)]?Z:{'default':Z};};Object['defineProperty'](exports,a6i(0x1ed),{'value':!![]}),exports[a6i(0x217)]=exports['handleFormattedOutput']=exports[a6i(0x1e2)]=exports['handleJsonOutput']=exports[a6i(0x20c)]=exports[a6i(0x1fd)]=void 0x0;const chalk_1=__importDefault(require(a6i(0x203))),_=__importStar(require(a6i(0x218))),util=__importStar(require(a6i(0x206))),yaml=require('js-yaml'),columnify=require(a6i(0x1ea));function printAsTable(Z,J,z,P=![],B=0x0){const I=a6i;!P&&console['log'](''+chalk_1[I(0x1e9)][I(0x215)](J));function U(A){const m=I;return A===m(0x1de)?A:A[m(0x1fb)](m(0x1de),'');}function s(A,n){const M=I;function F(v){const L=a6J,o=new Date(v);return o[L(0x1f3)]()+'/'+o[L(0x20f)]()+'/'+o[L(0x1f9)]()+'\x0a'+o['getHours']()+':'+o[L(0x219)]()+':'+o[L(0x1f7)]();}const C=['createdat','updatedat'];if(C['includes'](n[M(0x1ee)]())&&_[M(0x211)](A)&&A[M(0x1e3)]()[M(0x1f1)]===0xd)return F(Number(A));if(_['isBoolean'](A)){if(n!==M(0x1de)&&n[M(0x213)](M(0x1de)))return A?'x':'✔';return A?'✔':'x';}if(_[M(0x201)](A))return util[M(0x1f6)](A,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});return A;}if(_['isArrayLike'](Z)){Z[I(0x1f1)]===0x0&&console[I(0x207)]('No\x20'+J[I(0x1ee)]()+I(0x1f5));const A=Z[I(0x1ef)]((C,v)=>{const x=I,o={'i':v+B};return Object['keys'](C)[x(0x1f0)](j=>{const d=x;(_['isUndefined'](z)||z[d(0x213)](j[d(0x1ee)]()))&&_[d(0x1e8)](o,U(j),s(C[j],j));}),o;}),n=_['clone'](Object[I(0x20b)]((A===null||A===void 0x0?void 0x0:A[0x0])||[]))[I(0x1f2)]((C,v)=>{const k=I,o=j=>j!=='i'?j!==k(0x20a)?0x0:0x1:0x2;return o(v)-o(C);}),F={'maxWidth':0x1e,'preserveNewLines':!![],'showHeaders':!P,'config':{'_id':{'maxWidth':0x5,'truncate':!![]},'i':{'showHeaders':![]}},'columns':n};console[I(0x207)](columnify(A,F));}else console[I(0x207)](Z);}exports[a6i(0x1fd)]=printAsTable;function consoleFormat(Z,J){const N=a6i;if(_[N(0x20d)](Z)){const z=J?N(0x1e7)+J+')':'';return chalk_1[N(0x1e9)][N(0x1dc)](N(0x200))+z;}if(!_[N(0x201)](Z))return Z===null||Z===void 0x0?void 0x0:Z[N(0x1e3)]();return util[N(0x1f6)](Z,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});}exports['consoleFormat']=consoleFormat;const handleJsonOutput=(Z,J)=>{const W=a6i,z=Z===W(0x1e1);if(z)console[W(0x207)](JSON['stringify'](J,null,'\x20'));};function a6Z(){const y=['hasOwnProperty','disabled','handleFormattedOutput','__createBinding','json','handleYamlOutput','toString','__importDefault','defineProperty','get','\x20(HTTP\x20status:\x20','set','default','columnify','1574601ywyMuM','yaml','__esModule','toLowerCase','map','forEach','length','sort','getDate','605ShWIzn','\x20found','inspect','getSeconds','handleJsonOutput','getFullYear','create','replace','configurable','printAsTable','2SURclH','getOwnPropertyDescriptor','The\x20request\x20was\x20completed\x20successfully','isObjectLike','32064NwZCGL','chalk','121FtVpNj','111394VBjNQp','util','log','944200OwtfjF','27GRlcsD','internalId','keys','consoleFormat','isEmpty','808264LcuBgv','getMonth','10866FrFOKW','isFinite','format','includes','prototype','bold','34648Vtgbib','printResponse','lodash','getMinutes','safeDump','__importStar','green'];a6Z=function(){return y;};return a6Z();}exports['handleJsonOutput']=handleJsonOutput;const handleYamlOutput=(Z,J)=>{const X=a6i,z=Z===X(0x1ec)||Z==='yml';if(z)console[X(0x207)](yaml[X(0x1da)](J));};exports[a6i(0x1e2)]=handleYamlOutput;const handleFormattedOutput=(Z,J)=>{const D=a6i,z=Z===D(0x212);if(z)console[D(0x207)](consoleFormat(J));};exports[a6i(0x1df)]=handleFormattedOutput;const printResponse=(Z,J)=>{const q=a6i;(0x0,exports[q(0x1f8)])(Z,J),(0x0,exports[q(0x1e2)])(Z,J),(0x0,exports[q(0x1df)])(Z,J);};exports[a6i(0x217)]=printResponse;
@@ -1 +1 @@
1
- 'use strict';const a7t=a7I;(function(u,I){const v=a7I,a=u();while(!![]){try{const x=parseInt(v(0x128))/0x1*(-parseInt(v(0x124))/0x2)+parseInt(v(0x10f))/0x3+-parseInt(v(0x11d))/0x4*(-parseInt(v(0x118))/0x5)+-parseInt(v(0x116))/0x6+parseInt(v(0x101))/0x7*(parseInt(v(0x114))/0x8)+-parseInt(v(0x121))/0x9*(parseInt(v(0x103))/0xa)+-parseInt(v(0x11a))/0xb;if(x===I)break;else a['push'](a['shift']());}catch(D){a['push'](a['shift']());}}}(a7u,0x27689));function a7u(){const u5=['colors','max','2-digit','46074pxQfjn','default','12290iiIZnf','slice','repeat','map','symbols','h24','height','padding','undefined','green','push','__importDefault','564285NvKuOE','chalk','length','red','defineProperty','368rIAvIT','min','981444FnpXHs','grey','213215yVbPSq','__esModule','2377881OGziKu','isArray','format','8wUmAsl','abs','toLocaleDateString','offset','36ovJDuI','toLocaleTimeString','round','6YxSAZe','blue','join','toFixed','10025Cqowkd','floor'];a7u=function(){return u5;};return a7u();}var __importDefault=this&&this[a7t(0x10e)]||function(u){const Y=a7t;return u&&u[Y(0x119)]?u:{'default':u};};function a7I(u,I){const a=a7u();return a7I=function(x,D){x=x-0xfe;let K=a[x];return K;},a7I(u,I);}Object[a7t(0x113)](exports,a7t(0x119),{'value':!![]}),exports['downSampleData']=exports['getAsciiChart']=void 0x0;const chalk_1=__importDefault(require(a7t(0x110))),colored=(u,I)=>{const u0=a7t;return I===undefined?u:chalk_1[u0(0x102)][I](u);},getAsciiChart=(u,I={})=>{const u1=a7t,a=Array[u1(0x11b)](u[0x0])?u:[u];let D=typeof I[u1(0x115)]!==u1(0x10b)?I['min']:a[0x0][0x0],K=typeof I[u1(0xff)]!==u1(0x10b)?I[u1(0xff)]:a[0x0][0x0];for(let R=0x0;R<a[u1(0x111)];R++){for(let q=0x0;q<a[R][u1(0x111)];q++){D=Math[u1(0x115)](D,a[R][q]),K=Math[u1(0xff)](K,a[R][q]);}}let z=['┼','┤','╶','╴','─','╰','╭','╮','╯','│'],H=Math['abs'](K-D),s=typeof I[u1(0x120)]!==u1(0x10b)?I[u1(0x120)]:0x3,C=typeof I[u1(0x10a)]!==u1(0x10b)?I[u1(0x10a)]:'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',p=typeof I[u1(0x109)]!==u1(0x10b)?I[u1(0x109)]:H,b=typeof I[u1(0xfe)]!=='undefined'?I['colors']:[u1(0x125),u1(0x112),u1(0x10c),u1(0x117),'black'],A=H!==0x0?p/H:0x1,F=Math[u1(0x123)](D*A),X=Math[u1(0x123)](K*A),T=Math[u1(0x11e)](X-F),E=0x0;for(let c=0x0;c<a[u1(0x111)];c++){E=Math[u1(0xff)](E,a[c][u1(0x111)]);}E=E+s;let f=typeof I[u1(0x107)]!==u1(0x10b)?I[u1(0x107)]:z,N=I[u1(0x11c)]!==undefined?I[u1(0x11c)]:function(M){const u2=u1;return(C+M[u2(0x127)](0x2)+I['unit'])[u2(0x104)](-C['length']);},P=new Array(T+0x1);for(let M=0x0;M<=T;M++){P[M]=new Array(E);for(let r=0x0;r<E;r++){P[M][r]='\x20';}}for(let o=F;o<=X;++o){const w=N(T>0x0?K-(o-F)*H/T:o,o-F);P[o-F][Math[u1(0xff)](s-w['length'],0x0)]=w,P[o-F][s-0x1]=o==0x0?f[0x0]:f[0x1];}for(let h=0x0;h<a[u1(0x111)];h++){let W=b[h%b['length']],B=Math[u1(0x123)](a[h][0x0]*A)-F;P[T-B][s-0x1]=colored(f[0x0],W);for(let J=0x0;J<a[h][u1(0x111)]-0x1;J++){let V=Math[u1(0x123)](a[h][J+0x0]*A)-F,e=Math[u1(0x123)](a[h][J+0x1]*A)-F;if(V==e)P[T-V][J+s]=colored(f[0x4],W);else{P[T-e][J+s]=colored(V>e?f[0x5]:f[0x6],W),P[T-V][J+s]=colored(V>e?f[0x7]:f[0x8],W);let U=Math['min'](V,e),S=Math[u1(0xff)](V,e);for(let n=U+0x1;n<S;n++){P[T-n][J+s]=colored(f[0x9],W);}}}}const {startTs:m,endTs:k}=I;if(m||k){const L=O=>{const u3=u1;if(!O)return'\x20\x20\x20';const Q=O[u3(0x11f)](undefined,{'day':u3(0x100),'month':u3(0x100),'year':u3(0x100)}),d=O[u3(0x122)](undefined,{'hourCycle':u3(0x108)});return Q+'\x20'+d;},g=L(k),l=L(m),Z=C['slice'](0x0,Math[u1(0xff)](0x2,C[u1(0x111)]-l['length']/0x2+0x1)),G='\x20'[u1(0x105)](Math[u1(0xff)](E-(C[u1(0x111)]+g[u1(0x111)]/0x2),0x1));P[u1(0x10d)]([''+Z+l+G+g]),P[u1(0x10d)]([]);}return P[u1(0x106)](O=>O[u1(0x126)](''))[u1(0x126)]('\x0a');};exports['getAsciiChart']=getAsciiChart;const downSampleData=(u,I)=>{const u4=a7t,x=u[u4(0x111)];if(I>=x||I===0x0)return u;const D=[];let K=0x0;const z=(x-0x2)/(I-0x2);let H=0x0,s,C,p,b;D[K++]=u[H];for(var j=0x0;j<I-0x2;j++){let f=0x0,N=0x0,P=Math['floor']((j+0x1)*z)+0x1,m=Math[u4(0x129)]((j+0x2)*z)+0x1;m=m<x?m:x;var A=m-P;for(;P<m;P++){f+=u[P][0x0],N+=u[P][0x1];}f/=A,N/=A;var F=Math[u4(0x129)](j*z)+0x1,X=Math[u4(0x129)]((j+0x1)*z)+0x1,T=u[H][0x0],E=u[H][0x1];C=p=-0x1;for(;F<X;F++){p=Math[u4(0x11e)]((T-f)*(u[F][0x1]-E)-(T-u[F][0x0])*(N-E))*0.5,p>C&&(C=p,s=u[F],b=F);}D[K++]=s,H=b;}return D[K++]=u[x-0x1],D;};exports['downSampleData']=downSampleData;
1
+ 'use strict';const a7Y=a7J;(function(Z,J){const H=a7J,z=Z();while(!![]){try{const P=-parseInt(H(0x193))/0x1+-parseInt(H(0x1a8))/0x2+-parseInt(H(0x1af))/0x3+parseInt(H(0x18f))/0x4*(parseInt(H(0x195))/0x5)+parseInt(H(0x1b5))/0x6+-parseInt(H(0x1b2))/0x7*(-parseInt(H(0x1a1))/0x8)+-parseInt(H(0x19e))/0x9;if(P===J)break;else z['push'](z['shift']());}catch(B){z['push'](z['shift']());}}}(a7Z,0x7c76a));function a7J(Z,J){const z=a7Z();return a7J=function(P,B){P=P-0x18f;let U=z[P];return U;},a7J(Z,J);}var __importDefault=this&&this[a7Y(0x1b6)]||function(Z){return Z&&Z['__esModule']?Z:{'default':Z};};Object['defineProperty'](exports,a7Y(0x190),{'value':!![]}),exports[a7Y(0x19f)]=exports['getAsciiChart']=void 0x0;function a7Z(){const Z4=['toLocaleTimeString','27212ZogikS','__esModule','padding','getAsciiChart','234122iAMFQn','round','365vtyDVE','default','symbols','undefined','repeat','red','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','slice','height','462294GpIDBF','downSampleData','grey','1240cGJYBI','2-digit','\x20\x20\x20','colors','abs','push','offset','338000njxSsu','toLocaleDateString','max','unit','green','floor','map','1257426XZdgnd','join','toFixed','4417WEWxUj','length','min','4734048lNVliQ','__importDefault'];a7Z=function(){return Z4;};return a7Z();}const chalk_1=__importDefault(require('chalk')),colored=(Z,J)=>{const E=a7Y;return J===undefined?Z:chalk_1[E(0x196)][J](Z);},getAsciiChart=(Z,J={})=>{const Z0=a7Y,z=Array['isArray'](Z[0x0])?Z:[Z];let P=typeof J['min']!==Z0(0x198)?J[Z0(0x1b4)]:z[0x0][0x0],B=typeof J[Z0(0x1aa)]!==Z0(0x198)?J['max']:z[0x0][0x0];for(let M=0x0;M<z[Z0(0x1b3)];M++){for(let d=0x0;d<z[M]['length'];d++){P=Math[Z0(0x1b4)](P,z[M][d]),B=Math[Z0(0x1aa)](B,z[M][d]);}}let U=['┼','┤','╶','╴','─','╰','╭','╮','╯','│'],s=Math[Z0(0x1a5)](B-P),A=typeof J[Z0(0x1a7)]!==Z0(0x198)?J[Z0(0x1a7)]:0x3,n=typeof J[Z0(0x191)]!=='undefined'?J[Z0(0x191)]:Z0(0x19b),F=typeof J['height']!=='undefined'?J[Z0(0x19d)]:s,C=typeof J['colors']!==Z0(0x198)?J[Z0(0x1a4)]:['blue',Z0(0x19a),Z0(0x1ac),Z0(0x1a0),'black'],v=s!==0x0?F/s:0x1,o=Math[Z0(0x194)](P*v),V=Math['round'](B*v),p=Math[Z0(0x1a5)](V-o),S=0x0;for(let k=0x0;k<z['length'];k++){S=Math[Z0(0x1aa)](S,z[k][Z0(0x1b3)]);}S=S+A;let e=typeof J['symbols']!==Z0(0x198)?J[Z0(0x197)]:U,g=J['format']!==undefined?J['format']:function(N){const Z1=Z0;return(n+N[Z1(0x1b1)](0x2)+J[Z1(0x1ab)])[Z1(0x19c)](-n[Z1(0x1b3)]);},I=new Array(p+0x1);for(let N=0x0;N<=p;N++){I[N]=new Array(S);for(let W=0x0;W<S;W++){I[N][W]='\x20';}}for(let X=o;X<=V;++X){const D=g(p>0x0?B-(X-o)*s/p:X,X-o);I[X-o][Math[Z0(0x1aa)](A-D[Z0(0x1b3)],0x0)]=D,I[X-o][A-0x1]=X==0x0?e[0x0]:e[0x1];}for(let q=0x0;q<z[Z0(0x1b3)];q++){let O=C[q%C[Z0(0x1b3)]],G=Math['round'](z[q][0x0]*v)-o;I[p-G][A-0x1]=colored(e[0x0],O);for(let K=0x0;K<z[q][Z0(0x1b3)]-0x1;K++){let l=Math[Z0(0x194)](z[q][K+0x0]*v)-o,b=Math[Z0(0x194)](z[q][K+0x1]*v)-o;if(l==b)I[p-l][K+A]=colored(e[0x4],O);else{I[p-b][K+A]=colored(l>b?e[0x5]:e[0x6],O),I[p-l][K+A]=colored(l>b?e[0x7]:e[0x8],O);let f=Math[Z0(0x1b4)](l,b),r=Math[Z0(0x1aa)](l,b);for(let w=f+0x1;w<r;w++){I[p-w][K+A]=colored(e[0x9],O);}}}}const {startTs:m,endTs:L}=J;if(m||L){const Q=h=>{const Z2=Z0;if(!h)return Z2(0x1a3);const a=h[Z2(0x1a9)](undefined,{'day':Z2(0x1a2),'month':Z2(0x1a2),'year':Z2(0x1a2)}),u=h[Z2(0x1b7)](undefined,{'hourCycle':'h24'});return a+'\x20'+u;},T=Q(L),c=Q(m),t=n['slice'](0x0,Math[Z0(0x1aa)](0x2,n['length']-c[Z0(0x1b3)]/0x2+0x1)),R='\x20'[Z0(0x199)](Math[Z0(0x1aa)](S-(n[Z0(0x1b3)]+T[Z0(0x1b3)]/0x2),0x1));I[Z0(0x1a6)]([''+t+c+R+T]),I[Z0(0x1a6)]([]);}return I[Z0(0x1ae)](h=>h['join'](''))[Z0(0x1b0)]('\x0a');};exports[a7Y(0x192)]=getAsciiChart;const downSampleData=(Z,J)=>{const Z3=a7Y,z=Z[Z3(0x1b3)];if(J>=z||J===0x0)return Z;const P=[];let B=0x0;const U=(z-0x2)/(J-0x2);let s=0x0,A,n,F,C;P[B++]=Z[s];for(var v=0x0;v<J-0x2;v++){let e=0x0,g=0x0,I=Math[Z3(0x1ad)]((v+0x1)*U)+0x1,m=Math[Z3(0x1ad)]((v+0x2)*U)+0x1;m=m<z?m:z;var o=m-I;for(;I<m;I++){e+=Z[I][0x0],g+=Z[I][0x1];}e/=o,g/=o;var j=Math['floor'](v*U)+0x1,V=Math[Z3(0x1ad)]((v+0x1)*U)+0x1,p=Z[s][0x0],S=Z[s][0x1];n=F=-0x1;for(;j<V;j++){F=Math[Z3(0x1a5)]((p-e)*(Z[j][0x1]-S)-(p-Z[j][0x0])*(g-S))*0.5,F>n&&(n=F,A=Z[j],C=j);}P[B++]=A,s=C;}return P[B++]=Z[z-0x1],P;};exports[a7Y(0x19f)]=downSampleData;
@@ -1 +1 @@
1
- 'use strict';const a8T=a8I;function a8u(){const uy=['list','deleteWarningPrompt','for\x20this\x20','defaultPaginationPageSize','loginPrompt','secrets','secret','builds','oneOf','askForTag','isUndefined','cmdPath','512353rXZWEF','tmpCmdPath','tokenPrompt','121012BXbrVa','Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.','logSinks','addon','askForPipeline','askForResourcePaginated','No,\x20abort','paths','services','restore','confirmationPrompt','getQuestionString','call','registerPrompt','push','credentials','isObject','grey','askForCredentials','isValidJSON','service:\x20\x27','warning','includes','14KCIMWs','YES','search-list','__esModule','pattern','greenBright','filter','Do\x20you\x20want\x20to\x20add','askArrayEntry','ask','__awaiter','940VEBASs','askForTemplateRun','override','uri','yellowBright','confirmation','must\x20be\x20bigger\x20than\x20or\x20equal\x20to\x20','tag','type','apiClient','getType','Enter\x20the\x20','pop','password','cursor','to\x20use:','found','784DIaumk','\x20(full\x20domain:\x20','skipValidation','templates','./utils','subdomain','\x20(completedAt:\x20','isArray','runs','red','done','string','don\x27t\x20change','./api-helpers','getPathString','integer','subdomains','value','isBoolean','success','No,\x20edit','throw','containers','project','hasOwnProperty','chalk','length','No\x20','data','REPEAT','doesn\x27t\x20match\x20pattern\x20\x27','170RgqcDr','editor','askForProjectScopedResourcePaginated','askForJobRun','find','createdAt','Something\x20unexpected\x20happened.','Please\x20confirm\x20following\x20configuration:\x0a','choice','volumes','contextProvider','name','./pagination/inquirer-pagination-prompt','elements','retrievePayloadViaInteractiveCli','),\x20subdomain\x20(','this\x20option\x20is\x20required,\x20please\x20answer','SAVE','resultCache','service\x20build','not\x20completed','all-job-runs','No,\x20but\x20save\x20as\x20file','properties','toString','pipelines','repeat','.*\x5c.(json|yaml|yml)$','map','minLength','pagination-prompt','confirm','\x20type?','addon:\x20\x27','bgGrey','askGeneric','completedAt','get','maximum','example','default','configurable','isNaN','startedAt','blueBright','max','job:\x20\x27','safeLoad','Configuration\x20file\x20written\x20to\x20','askForContainer','token','.\x20This\x20is\x20irreversible.\x20Please\x20confirm!','jobs','enum','pathVars','values','input','__importDefault','2352456GJPLBE','__setModuleDefault','create','\x20and\x20it\x20','prompt','domain','domain\x20(','boolean','validate','charAt','WARNING:\x20You\x20are\x20about\x20to\x20delete\x20','lodash','Context\x20with\x20name\x20\x27','main-context','askForClusterId','all-builds','backup','backups','Should\x20it\x20be',',\x20supported\x20types:\x20[json|yaml|yml]','path','whiteBright','set','propToType','assign','InquirerHelper','test','description','inquirer','split','has','domains','askForProject','job','1556376hJRCqa','\x20characters,\x20is\x20','No\x20builds\x20found','restores','saveFile','minimum','Provide\x20a\x20file\x20path\x20to\x20write\x20the\x20configuration\x20to\x20(<name>.[json|yaml|yml])','templateRuns','askForTemplate','setPathVars','defineProperty','531bvDEvq','\x20to\x20use:','must\x20be\x20longer\x20than\x20or\x20equal\x20to\x20','blue','maxLength','must\x20be\x20a\x20valid\x20non-empty\x20json\x20string','getOwnPropertyDescriptor','unset','json','reset','then','anyOf','bold','unshift','a\x20Northflank\x20resource','askForService','clusters','__importStar','askForResource','Do\x20you\x20want\x20to\x20add\x20more','Go\x20to\x20editor','\x20characters','must\x20be\x20shorter\x20than\x20or\x20equal\x20to\x20','pipeline','apply','service','stringify','concat','\x27\x20already\x20exists.\x20Do\x20you\x20want\x20to\x20override\x20this\x20context\x20(y)\x20or\x20enter\x20a\x20new\x20name\x20(N)?','projects','askForSecret','green','askForAddonRestore','required','Choose\x20the\x20','\x20in\x20','writable','join','askForDomain','yaml','object','\x20Example:\x20','next','getInnerType','pagination','service\x20containers','underline','writeFileSync','ABORT','Choose\x20the\x20name\x20of\x20the\x20new\x20local\x20context:','prototype','No\x20containers\x20found','EDIT','editPayload','message','tags','1019510NklUuZ','addEntry','job\x20builds','\x20(startedAt:\x20','Template\x20id\x20not\x20provided.','js-yaml','Yes,\x20send','fileName','22715VUyfut'];a8u=function(){return uy;};return a8u();}(function(u,I){const X=a8I,a=u();while(!![]){try{const x=-parseInt(X(0x23c))/0x1+parseInt(X(0x227))/0x2+-parseInt(X(0x1c2))/0x3+-parseInt(X(0x23f))/0x4*(-parseInt(X(0x291))/0x5)+parseInt(X(0x1e4))/0x6*(parseInt(X(0x256))/0x7)+parseInt(X(0x272))/0x8*(-parseInt(X(0x1ef))/0x9)+parseInt(X(0x261))/0xa*(-parseInt(X(0x22f))/0xb);if(x===I)break;else a['push'](a['shift']());}catch(D){a['push'](a['shift']());}}}(a8u,0x88e70));var __createBinding=this&&this['__createBinding']||(Object[a8T(0x1c4)]?function(u,I,a,x){const E=a8T;if(x===undefined)x=a;var D=Object[E(0x1f5)](I,a);(!D||('get'in D?!I[E(0x259)]:D[E(0x213)]||D[E(0x1b1)]))&&(D={'enumerable':!![],'get':function(){return I[a];}}),Object[E(0x1ee)](u,x,D);}:function(u,I,a,x){if(x===undefined)x=a;u[x]=I[a];}),__setModuleDefault=this&&this[a8T(0x1c3)]||(Object[a8T(0x1c4)]?function(u,I){const f=a8T;Object['defineProperty'](u,f(0x1b0),{'enumerable':!![],'value':I});}:function(u,I){u['default']=I;}),__importStar=this&&this[a8T(0x200)]||function(u){const N=a8T;if(u&&u['__esModule'])return u;var I={};if(u!=null){for(var a in u)if(a!==N(0x1b0)&&Object[N(0x221)][N(0x28a)][N(0x24b)](u,a))__createBinding(I,u,a);}return __setModuleDefault(I,u),I;},__awaiter=this&&this[a8T(0x260)]||function(u,I,a,x){function D(K){return K instanceof a?K:new a(function(z){z(K);});}return new(a||(a=Promise))(function(K,z){const R=a8I;function H(p){const P=a8I;try{C(x[P(0x219)](p));}catch(b){z(b);}}function s(p){const m=a8I;try{C(x[m(0x287)](p));}catch(b){z(b);}}function C(p){const k=a8I;p[k(0x27c)]?K(p['value']):D(p[k(0x283)])[k(0x1f9)](H,s);}C((x=x[R(0x207)](u,I||[]))['next']());});},__importDefault=this&&this[a8T(0x1c1)]||function(u){const q=a8T;return u&&u[q(0x259)]?u:{'default':u};};function a8I(u,I){const a=a8u();return a8I=function(x,D){x=x-0x1a0;let K=a[x];return K;},a8I(u,I);}Object[a8T(0x1ee)](exports,'__esModule',{'value':!![]}),exports[a8T(0x1db)]=void 0x0;const _=__importStar(require(a8T(0x1cd))),chalk_1=__importDefault(require(a8T(0x28b))),fs=__importStar(require('fs')),utils_1=require(a8T(0x276)),api_helpers_1=require(a8T(0x27f)),inquirer_pagination_prompt_1=require(a8T(0x29d)),inquirer=require(a8T(0x1de)),inquirerSearchList=require('inquirer-search-list'),yaml=require(a8T(0x22c));var ConfirmChoices;(function(u){const M=a8T;u[M(0x257)]=M(0x22d),u[M(0x28f)]='No,\x20repeat',u[M(0x223)]=M(0x286),u[M(0x2a2)]=M(0x2a7),u[M(0x21f)]=M(0x245);}(ConfirmChoices||(ConfirmChoices={})));class InquirerHelper{constructor(u){const r=a8T;this[r(0x26a)]=u,this[r(0x233)]=0x32,this[r(0x224)]=I=>__awaiter(this,void 0x0,void 0x0,function*(){const o=r,{editedResult:a}=yield inquirer[o(0x1c6)]([{'type':'editor','name':'editedResult','message':o(0x203),'default':yaml['safeDump'](I)}]);return yaml[o(0x1b7)](a);}),this[r(0x1e8)]=I=>__awaiter(this,void 0x0,void 0x0,function*(){const w=r,a=z=>'Unexpected\x20file\x20type:\x20'+z+w(0x1d5);function x(){return __awaiter(this,void 0x0,void 0x0,function*(){const h=a8I;return inquirer[h(0x1c6)]([{'type':h(0x1c0),'name':h(0x22e),'message':h(0x1ea),'validate':z=>new RegExp(h(0x1a3))[h(0x1dc)](z)?!![]:a(z)}]);});}const {fileName:D}=yield x(),K=D[w(0x1a0)]()['split']('.')[w(0x26d)]();try{switch(K){case w(0x1f7):(0x0,utils_1[w(0x285)])(w(0x1b8)+D);return fs[w(0x21e)](D,JSON[w(0x209)](I,null,'\x20\x20'));case w(0x216):case'yml':(0x0,utils_1[w(0x285)])(w(0x1b8)+D);return fs[w(0x21e)](D,yaml['safeDump'](I));default:(0x0,utils_1[w(0x254)])(a(K));}}catch(z){(0x0,utils_1[w(0x254)])('Writing\x20configuration\x20failed:\x20'+z[w(0x225)]);}return undefined;}),this[r(0x25c)]=(I,a)=>x=>{const D=typeof x==='string'?x['trim']():x;return a===![]&&D==='don\x27t\x20change'?'':D;},this[r(0x1ca)]=(I,a,x)=>D=>{const W=r;if(this[W(0x274)]===!![])return!![];const K=[];if(D===''||D===W(0x27e)){if(a!==![])K[W(0x24d)](W(0x2a1));else return!![];}I[W(0x269)]===W(0x27d)&&!_[W(0x23a)](I[W(0x25a)])&&K['push'](new RegExp(I['pattern'])[W(0x1dc)](D)?!![]:W(0x290)+I[W(0x25a)]+'\x27');I[W(0x269)]===W(0x27d)&&!_[W(0x23a)](I['minLength'])&&K[W(0x24d)](D[W(0x28c)]>=I[W(0x1a5)]?!![]:W(0x1f1)+I[W(0x1a5)]+'\x20characters,\x20is\x20'+D[W(0x28c)]+W(0x204));I[W(0x269)]===W(0x27d)&&!_[W(0x23a)](I[W(0x1f3)])&&K['push'](D['length']<=I['maxLength']?!![]:W(0x205)+I[W(0x1f3)]+W(0x1e5)+D['length']+W(0x204));x&&Number[W(0x1b2)](parseInt(D,0xa))&&K[W(0x24d)]('must\x20be\x20a\x20number,\x20is\x20'+D);I[W(0x269)]===W(0x281)&&!_['isUndefined'](I[W(0x1e9)])&&K[W(0x24d)](D>=I[W(0x1e9)]?!![]:W(0x267)+I[W(0x1e9)]);I[W(0x269)]===W(0x281)&&!_[W(0x23a)](I['maximum'])&&K[W(0x24d)](D<=I[W(0x1ae)]?!![]:'must\x20be\x20smaller\x20than\x20or\x20equal\x20to\x20'+I[W(0x1ae)]);if(I['type']==='rawObject'){const s=(0x0,utils_1[W(0x252)])(D);K[W(0x24d)](s===![]||_['isEmpty'](s)?W(0x1f4):!![]);}const z=K[W(0x25c)](C=>C!==!![]),H=(I===null||I===void 0x0?void 0x0:I['example'])?'\x0a'+chalk_1['default'][W(0x27b)]('>>')+W(0x218)+chalk_1['default'][W(0x1d7)](JSON[W(0x209)](I[W(0x1af)])):'';return z[W(0x28c)]>0x0?z[W(0x214)](chalk_1[W(0x1b0)][W(0x21d)](W(0x1c5)))+H:!![];},this['getPathString']=(I,a,x)=>{const B=r,D=I[I[B(0x28c)]-0x1];function K(){const J=B;return I['slice'](0x0,-0x1)[J(0x1a4)](s=>s[J(0x1cb)](0x0)['toUpperCase']()+s['slice'](0x1))[J(0x214)]('>');}const z=I['length']>0x1?chalk_1[B(0x1b0)][B(0x1aa)][B(0x1d7)](K())+':\x20':'',H=x?'\x20('+chalk_1[B(0x1b0)][B(0x1f2)](x)+')':'';return chalk_1['default'][B(0x1f8)](''+z+a+'\x20'+chalk_1[B(0x1b0)][B(0x1fb)][B(0x25b)](D)+H+'?');},this['askForResource']=(I,a,x)=>__awaiter(this,void 0x0,void 0x0,function*(){const V=r;if(a['length']<0x1){const z=x?V(0x232)+x:V(0x271);throw new Error(V(0x28d)+I+'\x20'+z+'.');}const D=V(0x211)+I+'\x20to\x20use:',K=a[V(0x28c)]>0x4?V(0x258):V(0x230);return(yield inquirer['prompt']([{'type':K,'name':V(0x29c),'message':D,'choices':a}]))[V(0x29c)];}),this['askForResourcePaginated']=(I,a,x)=>__awaiter(this,void 0x0,void 0x0,function*(){const y=r,{elements:D,nextCursor:K}=yield a();if(D[y(0x28c)]<0x1){const s=x?y(0x232)+x:'found';throw new Error(y(0x28d)+I+'\x20'+s+'.');}const z=y(0x211)+I+y(0x1f0);if(K!==undefined){const C=({nextPageCursor:p})=>__awaiter(this,void 0x0,void 0x0,function*(){const e=y,b=yield a(p);return{'elements':b[e(0x29e)],'nextPageCursor':b['nextCursor']};});return(yield inquirer[y(0x1c6)]([{'type':y(0x1a6),'name':y(0x29c),'message':z,'choices':D,'nextPageCursor':K,'loadMore':C}]))[y(0x29c)];}const H=D[y(0x28c)]>0x4?y(0x258):y(0x230);return(yield inquirer[y(0x1c6)]([{'type':H,'name':y(0x29c),'message':z,'choices':D}]))[y(0x29c)];}),this[r(0x1ab)]=(I,a)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const U=r,x=''+(a?'('+chalk_1[U(0x1b0)][U(0x1f2)](a)+')\x20':''),D=U(0x26c)+chalk_1[U(0x1b0)]['green'](I)+'\x20'+x+U(0x270),K=this[U(0x1ca)]({'type':'string','required':!![]});return(yield inquirer['prompt']([{'type':'input','name':U(0x29c),'message':D,'validate':K}]))['name'];}),this['askConfirm']=I=>__awaiter(this,void 0x0,void 0x0,function*(){const S=r;return(yield inquirer[S(0x1c6)]([{'type':'confirm','name':'name','message':I,'default':!![]}]))[S(0x29c)];}),this[r(0x1fe)]=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const L=r,a=x=>D=>__awaiter(this,void 0x0,void 0x0,function*(){const n=a8I;var K;const z=yield this[n(0x26a)][n(0x230)][n(0x247)]({'parameters':{'projectId':x},'options':{'per_page':this[n(0x233)],'cursor':D}}),H=z[n(0x28e)]['services'][n(0x1a4)](s=>s['id']);return{'elements':H,'nextCursor':(K=z['pagination'])===null||K===void 0x0?void 0x0:K['cursor']};});return this[L(0x293)](L(0x208),a,I);}),this[r(0x1ec)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const l=r,I=a=>__awaiter(this,void 0x0,void 0x0,function*(){const g=a8I;var x;const D=yield this[g(0x26a)]['list'][g(0x275)]({'options':{'per_page':this[g(0x233)],'cursor':a}}),K=D[g(0x28e)][g(0x275)][g(0x1a4)](z=>z['id']);return{'elements':K,'nextCursor':(x=D[g(0x21b)])===null||x===void 0x0?void 0x0:x[g(0x26f)]};});return this[l(0x244)]('template',I);}),this[r(0x239)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const G=r,I=a=>__awaiter(this,void 0x0,void 0x0,function*(){const Z=a8I;var x,D,K;const z=yield this['apiClient'][Z(0x230)][Z(0x226)]({'options':{'per_page':this['defaultPaginationPageSize'],'cursor':a}}),H=(D=(x=z[Z(0x28e)][Z(0x226)])===null||x===void 0x0?void 0x0:x['map'](s=>s['id']))!==null&&D!==void 0x0?D:[];return{'elements':H,'nextCursor':(K=z[Z(0x21b)])===null||K===void 0x0?void 0x0:K[Z(0x26f)]};});return this[G(0x244)](G(0x268),I);}),this[r(0x1d0)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Q=r,I=a=>__awaiter(this,void 0x0,void 0x0,function*(){const O=a8I;var x,D,K;const z=yield this['apiClient'][O(0x230)]['cloud'][O(0x1ff)]({'options':{'per_page':this[O(0x233)],'cursor':a}}),H=(D=(x=z[O(0x28e)][O(0x1ff)])===null||x===void 0x0?void 0x0:x['map'](s=>s[O(0x29c)]))!==null&&D!==void 0x0?D:[];return{'elements':H,'nextCursor':(K=z[O(0x21b)])===null||K===void 0x0?void 0x0:K['cursor']};});return this[Q(0x244)]('cluster\x20id',I);}),this[r(0x262)]=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const d=r;if(_[d(0x23a)](I))throw new Error(d(0x22b));const a=x=>__awaiter(this,void 0x0,void 0x0,function*(){const v=d;var D;let K=this[v(0x233)];const z=yield this[v(0x26a)][v(0x230)]['templateRuns']({'parameters':{'templateId':I},'options':{'per_page':K,'cursor':x}}),H=z[v(0x28e)][v(0x1eb)][v(0x1a4)](s=>s['id']+v(0x22a)+s[v(0x296)]+')');return{'elements':H,'nextCursor':(D=z['pagination'])===null||D===void 0x0?void 0x0:D[v(0x26f)]};});return this[d(0x244)]('template\x20run',a)[d(0x1f9)](x=>x[d(0x1df)]('\x20')[0x0]);}),this['askForLogSink']=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Y=r,I=a=>__awaiter(this,void 0x0,void 0x0,function*(){const t=a8I;var x;let D=this['defaultPaginationPageSize'];const K=yield this[t(0x26a)][t(0x230)][t(0x241)]({'options':{'per_page':D,'cursor':a}}),z=K[t(0x28e)]['logSinks'][t(0x1a4)](H=>H['id']);return{'elements':z,'nextCursor':(x=K['pagination'])===null||x===void 0x0?void 0x0:x[t(0x26f)]};});return this[Y(0x244)]('log\x20sink',I);}),this[r(0x243)]=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const u1=r,a=x=>D=>__awaiter(this,void 0x0,void 0x0,function*(){const u0=a8I;var K;const z=yield this['apiClient']['list'][u0(0x1a1)]({'parameters':{'projectId':x},'options':{'per_page':this[u0(0x233)],'cursor':D}}),H=z[u0(0x28e)][u0(0x1a1)][u0(0x1a4)](s=>s['id']);return{'elements':H,'nextCursor':(K=z[u0(0x21b)])===null||K===void 0x0?void 0x0:K[u0(0x26f)]};});return this['askForProjectScopedResourcePaginated'](u1(0x206),a,I);}),this['askForJob']=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const u3=r,a=x=>D=>__awaiter(this,void 0x0,void 0x0,function*(){const u2=a8I;var K;const z=yield this[u2(0x26a)][u2(0x230)][u2(0x1bc)]({'parameters':{'projectId':x},'options':{'per_page':this[u2(0x233)],'cursor':D}}),H=z[u2(0x28e)][u2(0x1bc)][u2(0x1a4)](s=>s['id']);return{'elements':H,'nextCursor':(K=z[u2(0x21b)])===null||K===void 0x0?void 0x0:K['cursor']};});return this[u3(0x293)]('job',a,I);}),this[r(0x294)]=(I,a,x=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const u4=r,D=u4(0x2a6),K=z=>H=>__awaiter(this,void 0x0,void 0x0,function*(){const u5=u4;var s;const C=yield this[u5(0x26a)][u5(0x1ad)][u5(0x1e3)][u5(0x27a)]({'parameters':{'projectId':z,'jobId':I},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':H}}),p=C['data'][u5(0x27a)]['map'](b=>b['id']+u5(0x22a)+b[u5(0x1b3)]+')');return x&&p[u5(0x1fc)](D),{'elements':p,'nextCursor':(s=C[u5(0x21b)])===null||s===void 0x0?void 0x0:s[u5(0x26f)]};});return this[u4(0x293)]('job\x20runs',K,a,'job:\x20\x27'+I+'\x27')['then'](z=>{const u6=u4,H=z[u6(0x1df)]('\x20')[0x0];if(H===D)return undefined;return H;});}),this['askForBuild']=(I,a,x,D=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const u7=r,K=u7(0x1d1);if(x!==undefined){const z=H=>s=>__awaiter(this,void 0x0,void 0x0,function*(){const u8=u7;var C;const p=yield this[u8(0x26a)][u8(0x1ad)]['job'][u8(0x237)]({'parameters':{'projectId':H,'jobId':x},'options':{'per_page':this[u8(0x233)],'cursor':s}}),b=p['data']['builds'][u8(0x1a4)](i=>i['id']+u8(0x22a)+i[u8(0x296)]+')');return D&&b[u8(0x1fc)](K),{'elements':b,'nextCursor':(C=p['pagination'])===null||C===void 0x0?void 0x0:C['cursor']};});return this[u7(0x293)](u7(0x229),z,I,u7(0x1b6)+x+'\x27')['then'](H=>{const s=H['split']('\x20')[0x0];if(s===K)return undefined;return s;});}if(a!==undefined){const H=s=>C=>__awaiter(this,void 0x0,void 0x0,function*(){const u9=u7;var p;const b=yield this[u9(0x26a)][u9(0x1ad)][u9(0x208)]['builds']({'parameters':{'projectId':s,'serviceId':a},'options':{'per_page':this[u9(0x233)],'cursor':C}}),i=b[u9(0x28e)]['builds'][u9(0x1a4)](j=>j['id']+'\x20(startedAt:\x20'+j[u9(0x296)]+')');if(D)i[u9(0x1fc)](K);return{'elements':i,'nextCursor':(p=b[u9(0x21b)])===null||p===void 0x0?void 0x0:p['cursor']};});return this[u7(0x293)](u7(0x2a4),H,I,u7(0x253)+x+'\x27')[u7(0x1f9)](s=>{const C=s['split']('\x20')[0x0];if(C===K)return undefined;return C;});}throw new Error(u7(0x1e6));}),this[r(0x1b9)]=(I,a,x,D=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const uI=r,K='all-containers';if(x!==undefined){const z=H=>s=>__awaiter(this,void 0x0,void 0x0,function*(){const uu=a8I;var C,p;const b=yield this[uu(0x26a)]['get'][uu(0x1e3)]['containers']({'parameters':{'projectId':H,'jobId':x},'options':{'per_page':this[uu(0x233)],'cursor':s}}),i=(C=b[uu(0x28e)]['containers'])!==null&&C!==void 0x0?C:[],j=i===null||i===void 0x0?void 0x0:i['map'](A=>A[uu(0x29c)]+'\x20(startedAt:\x20'+A['createdAt']+')');return D&&j[uu(0x1fc)](K),{'elements':j,'nextCursor':(p=b[uu(0x21b)])===null||p===void 0x0?void 0x0:p[uu(0x26f)]};});return this[uI(0x293)]('job\x20containers',z,I,uI(0x1b6)+x+'\x27')['then'](H=>{const ua=uI,s=H[ua(0x1df)]('\x20')[0x0];if(s===K)return undefined;return s;});}if(a!==undefined){const H=s=>C=>__awaiter(this,void 0x0,void 0x0,function*(){const ux=uI;var p,b;const i=yield this[ux(0x26a)][ux(0x1ad)][ux(0x208)][ux(0x288)]({'parameters':{'projectId':s,'serviceId':a},'options':{'per_page':this[ux(0x233)],'cursor':C}}),j=(p=i[ux(0x28e)][ux(0x288)])!==null&&p!==void 0x0?p:[],A=j[ux(0x1a4)](F=>F[ux(0x29c)]+ux(0x22a)+F[ux(0x296)]+')');if(D)A===null||A===void 0x0?void 0x0:A[ux(0x1fc)](K);return{'elements':A,'nextCursor':(b=i[ux(0x21b)])===null||b===void 0x0?void 0x0:b[ux(0x26f)]};});return this[uI(0x293)](uI(0x21c),H,I,uI(0x253)+x+'\x27')['then'](s=>{const C=s['split']('\x20')[0x0];if(C===K)return undefined;return C;});}throw new Error(uI(0x222));}),this['askForAddon']=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const uK=r,a=x=>D=>__awaiter(this,void 0x0,void 0x0,function*(){const uD=a8I;var K;const z=yield this[uD(0x26a)][uD(0x230)]['addons']({'parameters':{'projectId':x},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':D}});return{'elements':z[uD(0x28e)]['addons'][uD(0x1a4)](H=>H['id']),'nextCursor':(K=z['pagination'])===null||K===void 0x0?void 0x0:K[uD(0x26f)]};});return this[uK(0x293)](uK(0x242),a,I);}),this['askForAddonBackup']=(I,a)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const uH=r,x=D=>K=>__awaiter(this,void 0x0,void 0x0,function*(){const uz=a8I;var z;const H=yield this[uz(0x26a)][uz(0x1ad)]['addon'][uz(0x1d3)]({'parameters':{'projectId':D,'addonId':a},'options':{'per_page':this[uz(0x233)],'cursor':K}});return{'elements':H[uz(0x28e)][uz(0x1d3)][uz(0x1a4)](s=>s['id']+uz(0x278)+(s[uz(0x1ac)]||uz(0x2a5))+')'),'nextCursor':(z=H[uz(0x21b)])===null||z===void 0x0?void 0x0:z[uz(0x26f)]};});return this[uH(0x293)]('backups',x,I,uH(0x1a9)+a+'\x27')['then'](D=>D[uH(0x1df)]('\x20')[0x0]);}),this[r(0x20f)]=(I,a,x)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const uC=r,D=K=>z=>__awaiter(this,void 0x0,void 0x0,function*(){const us=a8I;var H;const s=yield this[us(0x26a)][us(0x1ad)][us(0x242)][us(0x1d2)][us(0x1e7)]({'parameters':{'projectId':K,'addonId':a,'backupId':x},'options':{'per_page':this[us(0x233)],'cursor':z}});return{'elements':s[us(0x28e)][us(0x1e7)]['map'](C=>C['id']+us(0x278)+(C[us(0x1ac)]||'not\x20completed')+')'),'nextCursor':(H=s[us(0x21b)])===null||H===void 0x0?void 0x0:H[us(0x26f)]};});return this[uC(0x293)](uC(0x248),D,I,uC(0x1a9)+a+'\x27')[uC(0x1f9)](K=>K['split']('\x20')[0x0]);}),this['askForVolume']=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const a=x=>__awaiter(this,void 0x0,void 0x0,function*(){const up=a8I;return(yield this['apiClient'][up(0x230)][up(0x29a)]({'parameters':{'projectId':x}}))[up(0x28e)][up(0x1a4)](D=>D['id']);});return this['askForProjectScopedResource']('volume',a,I);}),this[r(0x20d)]=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const ui=r,a=x=>D=>__awaiter(this,void 0x0,void 0x0,function*(){const ub=a8I;var K;const z=yield this['apiClient'][ub(0x230)][ub(0x235)]({'parameters':{'projectId':x},'options':{'per_page':this[ub(0x233)],'cursor':D}});return{'elements':z[ub(0x28e)]['secrets'][ub(0x1a4)](H=>H['id']),'nextCursor':(K=z[ub(0x21b)])===null||K===void 0x0?void 0x0:K['cursor']};});return this[ui(0x293)](ui(0x236),a,I);}),this['askForSubdomain']=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const uj=r,a=yield this[uj(0x26a)]['get'][uj(0x1c7)]({'parameters':{'domain':I}}),x=a['data'][uj(0x282)][uj(0x1a4)](K=>K[uj(0x29c)]+uj(0x273)+K['fullName']+')'),D=uj(0x1c8)+I+')';return this['askForResource'](uj(0x277),x,D)[uj(0x1f9)](K=>K['split']('\x20')[0x0]);}),this['askForSubdomainPath']=(I,a)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const uA=r,x=yield this[uA(0x26a)][uA(0x230)][uA(0x277)][uA(0x1d6)]({'parameters':{'domain':I,'subdomain':a}}),D=x[uA(0x28e)][uA(0x246)][uA(0x1a4)](z=>''+z[uA(0x264)]),K=uA(0x1c8)+I+uA(0x2a0)+a+')';return this[uA(0x201)]('subdomainPath',D,K);}),this[r(0x231)]=I=>__awaiter(this,void 0x0,void 0x0,function*(){const uF=r;return(yield inquirer[uF(0x1c6)]([{'type':uF(0x1a7),'name':uF(0x266),'message':chalk_1[uF(0x1b0)][uF(0x265)](uF(0x1cc)+(I||uF(0x1fd))+uF(0x1bb)),'default':![]}]))[uF(0x266)];}),this[r(0x234)]=(I,a)=>__awaiter(this,void 0x0,void 0x0,function*(){const uX=r;_['isUndefined'](I[uX(0x29c)])&&(a[uX(0x28c)]<=0x0?_[uX(0x1d8)](I,'name',uX(0x1b0)):yield(0x0,utils_1['retry'])(0xa)(()=>__awaiter(this,void 0x0,void 0x0,function*(){const uT=uX,{name:x}=yield inquirer[uT(0x1c6)]([{'type':'input','name':'name','message':uT(0x220),'default':uT(0x1cf)}]);if(!I[uT(0x263)]&&a[uT(0x295)](D=>D[uT(0x29c)]===x)){const {c:D}=yield inquirer['prompt']([{'type':uT(0x1a7),'name':'c','message':uT(0x1ce)+x+uT(0x20b),'default':![]}]);if(D===![])throw new Error('Context\x20name\x20already\x20exists.');_['set'](I,uT(0x263),!![]);}_[uT(0x1d8)](I,uT(0x29c),x);})));if(_['isUndefined'](I[uX(0x1ba)])){const x=yield this[uX(0x23e)]();_['set'](I,'token',x);}return I;}),this[r(0x23e)]=()=>__awaiter(this,void 0x0,void 0x0,function*(){const uE=r,{token:I}=yield inquirer[uE(0x1c6)]([{'type':uE(0x26e),'name':uE(0x1ba),'mask':'*','message':'Choose\x20the\x20login\x20token:'}]);return I;}),inquirer['registerPrompt'](r(0x258),inquirerSearchList),inquirer[r(0x24c)]('pagination-prompt',inquirer_pagination_prompt_1['DynamicReloadPaginationPrompt']);}[a8T(0x249)](u,I){return __awaiter(this,void 0x0,void 0x0,function*(){const uf=a8I,a=yaml['safeDump'](u),x=_[uf(0x1b5)](a['split']('\x0a')[uf(0x1a4)](z=>z[uf(0x28c)])),D=chalk_1[uf(0x1b0)][uf(0x250)]('-'[uf(0x1a2)](x)+'\x0a'),{confirm:K}=yield inquirer['prompt']([{'type':uf(0x230),'name':uf(0x1a7),'message':''+chalk_1[uf(0x1b0)][uf(0x1fb)][uf(0x20e)](uf(0x298))+D+chalk_1[uf(0x1b0)][uf(0x1b4)](a)+D,'choices':Object[uf(0x1bf)](ConfirmChoices)}]);switch(K){case ConfirmChoices[uf(0x257)]:return u;case ConfirmChoices['ABORT']:throw new Error('Aborted.');case ConfirmChoices[uf(0x28f)]:return this[uf(0x29f)](I);case ConfirmChoices[uf(0x223)]:return this[uf(0x249)](yield this['editPayload'](u),I);case ConfirmChoices[uf(0x2a2)]:yield this[uf(0x1e8)](u);return this[uf(0x249)](u,I);default:throw new Error(uf(0x297));}});}[a8T(0x29f)](u,I){return __awaiter(this,void 0x0,void 0x0,function*(){const uN=a8I;if((I===null||I===void 0x0?void 0x0:I['resultCache'])!==undefined)this[uN(0x2a3)]=I===null||I===void 0x0?void 0x0:I[uN(0x2a3)];this[uN(0x23d)]=I===null||I===void 0x0?void 0x0:I[uN(0x23b)],this[uN(0x274)]=I===null||I===void 0x0?void 0x0:I[uN(0x274)];const a={};return yield this[uN(0x1d9)]([],u['opt']['body'],a),this['resultCache']=a,yield this['confirmationPrompt'](a,u);});}[a8T(0x1d9)](u,I,a,x){return __awaiter(this,void 0x0,void 0x0,function*(){const uP=a8I;let D;if(I['oneOf']&&!_['has'](I,'properties')){if(I[uP(0x238)]['length']>0x1){const {choice:K}=yield inquirer[uP(0x1c6)]([{'type':uP(0x230),'name':uP(0x299),'message':'What\x27s\x20the\x20'+(u[u[uP(0x28c)]-0x1]||'')+uP(0x1a8),'choices':I['oneOf'][uP(0x1a4)](z=>{const um=uP;var H;return(H=z[um(0x1dd)])!==null&&H!==void 0x0?H:'??';})}]);D=yield this['getType'](u,I['oneOf'][uP(0x295)](z=>z['description']===K),a,x);}else{const z=I[uP(0x238)][0x0];_[uP(0x1d8)](z,'description',I['description']),D=yield this[uP(0x26b)](u,z,a,x);}D={};}else{if(I[uP(0x1fa)]&&!_[uP(0x1e0)](I,uP(0x2a8))){if(I[uP(0x1fa)][uP(0x28c)]>0x1){const {choice:H}=yield inquirer[uP(0x1c6)]([{'type':'list','name':'choice','message':'What\x27s\x20the\x20'+(u[u[uP(0x28c)]-0x1]||'')+uP(0x1a8),'choices':[...I['anyOf']['map'](s=>{var C;return(C=s['description'])!==null&&C!==void 0x0?C:'??';}),uP(0x27e)]}]);H!==uP(0x27e)&&(D=yield this[uP(0x26b)](u,I[uP(0x1fa)][uP(0x295)](s=>s['description']===H),a,x));}else{const s=I['anyOf'][0x0];_['set'](s,'description',I['description']),D=yield this[uP(0x26b)](u,s,a,x);}D={};}else D=yield this[uP(0x26b)](u,I,a,x);}return D;});}[a8T(0x21a)](u,I,a,x){var D;return __awaiter(this,void 0x0,void 0x0,function*(){const uk=a8I;if(x===![]){const {addEntry:H}=yield inquirer[uk(0x1c6)]([{'type':uk(0x1a7),'name':uk(0x228),'message':this[uk(0x280)](I,uk(0x25d),u===null||u===void 0x0?void 0x0:u[uk(0x1dd)]),'default':![]}]);if(!H)return a;}const K=Object['keys']((D=u===null||u===void 0x0?void 0x0:u['properties'])!==null&&D!==void 0x0?D:[]),z=u[uk(0x210)]||[];if(K[uk(0x28c)]>0x0)for(const s of K){const C=I[uk(0x20a)](s);if(I['length']>0x0&&!_['has'](a,I[uk(0x214)]('.')))_[uk(0x1d8)](a,I[uk(0x214)]('.'),{});yield this[uk(0x1d9)](C,u[uk(0x2a8)][s],a,z[uk(0x255)](s));}else yield this['getType'](I,Object[uk(0x1da)](Object['assign']({},u),{'type':'rawObject'}),a,x);return a;});}[a8T(0x25e)](u,I,a,x){return __awaiter(this,void 0x0,void 0x0,function*(){const uR=a8I;if(I&&a)return!![];const D=I?'Do\x20you\x20want\x20to\x20add':uR(0x202),{addEntry:K}=yield inquirer[uR(0x1c6)]([{'type':'confirm','name':uR(0x228),'message':this['getPathString'](u,D,I?x:undefined),'default':![]}]);return K;});}[a8T(0x26b)](u,I,a,x){return __awaiter(this,void 0x0,void 0x0,function*(){const uq=a8I;let D;const K=u[uq(0x214)]('.');switch(I===null||I===void 0x0?void 0x0:I[uq(0x269)]){case'array':{let z=!![];while(yield this['askArrayEntry'](u,z,x,I===null||I===void 0x0?void 0x0:I[uq(0x1dd)])){const H=_[uq(0x1ad)](a,K);_[uq(0x1f6)](a,K),yield this[uq(0x26b)](u,I['items'],a);const s=_[uq(0x1ad)](a,K);!_[uq(0x279)](H)?_['set'](a,K,[s]):(H['push'](s),_[uq(0x1d8)](a,K,H)),z=![];}return D||[];}case uq(0x217):{return D=yield this[uq(0x21a)](I,u,a,x),D;}case'rawObject':D=(0x0,utils_1[uq(0x252)])(yield this[uq(0x25f)](u,I,x))||undefined;break;case uq(0x27d):case'boolean':case'integer':default:D=yield this[uq(0x25f)](u,I,x,a);break;}return!_['isUndefined'](D)&&_[uq(0x1d8)](a,K,D),D;});}[a8T(0x25f)](u,I,a,x){var D;return __awaiter(this,void 0x0,void 0x0,function*(){const uc=a8I,K=u[u[uc(0x28c)]-0x1],{defaultValue:defaultValue=(D=I===null||I===void 0x0?void 0x0:I[uc(0x1af)])!==null&&D!==void 0x0?D:I===null||I===void 0x0?void 0x0:I[uc(0x1b0)],choices:choices=I===null||I===void 0x0?void 0x0:I[uc(0x1bd)],pagination:z}=yield(0x0,api_helpers_1['fetchResourceList'])(K,this['apiClient'],this[uc(0x23d)],x,this[uc(0x1be)],u);let H=uc(0x1c0);if(!_[uc(0x23a)](choices)&&choices[uc(0x28c)]>0x0){if(z!==undefined&&z['nextPageCursor']!==undefined)H=uc(0x1a6);else choices['length']>0x4&&typeof choices[0x0]===uc(0x27d)?H='search-list':H=uc(0x230);}else{if((I===null||I===void 0x0?void 0x0:I[uc(0x269)])===uc(0x1c9))H=uc(0x1a7);else{if((I===null||I===void 0x0?void 0x0:I[uc(0x269)])===uc(0x281))H=uc(0x1c0);else(I===null||I===void 0x0?void 0x0:I[uc(0x269)])==='rawObject'&&(H=uc(0x292));}}let s=a!==![]?!_[uc(0x24f)](defaultValue)?defaultValue:JSON[uc(0x209)](defaultValue):_[uc(0x284)](defaultValue)?defaultValue:uc(0x27e);if(choices)s=s[uc(0x1a0)]();_[uc(0x1e0)](this[uc(0x2a3)],u[uc(0x214)]('.'))&&(s=this['resultCache'][u[uc(0x214)]('.')]);const C=choices&&a===![]?[uc(0x27e),...choices]:choices,p=(I===null||I===void 0x0?void 0x0:I[uc(0x269)])===uc(0x281),b=Object['assign']({'type':H,'name':'id','message':this[uc(0x24a)](u,I),'choices':C,'default':s,'filter':this[uc(0x25c)](H,a),'validate':this[uc(0x1ca)](I,a,p)},z),i=(yield inquirer[uc(0x1c6)]([b]))['id'];if(i==='don\x27t\x20change'||i==='')return undefined;if(p)return parseInt(i,0xa);return i;});}['getQuestionString'](u,I){const uM=a8T,a=(I===null||I===void 0x0?void 0x0:I['type'])!==uM(0x1c9)?'What\x20do\x20you\x20want\x20to\x20use\x20as':uM(0x1d4);return this[uM(0x280)](u,a,I===null||I===void 0x0?void 0x0:I['description']);}[a8T(0x1e2)](){return __awaiter(this,void 0x0,void 0x0,function*(){const uo=a8I,u=I=>__awaiter(this,void 0x0,void 0x0,function*(){const ur=a8I;var a;const x=yield this['apiClient'][ur(0x230)]['projects']({'options':{'per_page':this['defaultPaginationPageSize'],'cursor':I}}),D=x[ur(0x28e)][ur(0x20c)]['map'](K=>K['id']);return{'elements':D,'nextCursor':(a=x[ur(0x21b)])===null||a===void 0x0?void 0x0:a[ur(0x26f)]};});return yield this[uo(0x244)](uo(0x289),u);});}['askForProjectScopedResource'](u,I,a,x){return __awaiter(this,void 0x0,void 0x0,function*(){const uw=a8I,D=a||this[uw(0x26a)][uw(0x29b)]['getCurrentProjectName']();if(_['isUndefined'](D))throw new Error(uw(0x240));const K=yield I(D);return yield this[uw(0x201)](u,K,(x?x+uw(0x212):'')+'project:\x20\x27'+D+'\x27');});}[a8T(0x293)](u,I,a,x){return __awaiter(this,void 0x0,void 0x0,function*(){const uh=a8I,D=a||this[uh(0x26a)]['contextProvider']['getCurrentProjectName']();if(_[uh(0x23a)](D))throw new Error(uh(0x240));const K=yield I(D);return yield this[uh(0x244)](u,K,(x?x+uh(0x212):'')+'project:\x20\x27'+D+'\x27');});}[a8T(0x215)](){return __awaiter(this,void 0x0,void 0x0,function*(){const uB=a8I,u=I=>__awaiter(this,void 0x0,void 0x0,function*(){const uW=a8I;var a;const x=yield this[uW(0x26a)]['list'][uW(0x1e1)]({'options':{'per_page':this['defaultPaginationPageSize'],'cursor':I}});return{'elements':x['data']['domains'][uW(0x1a4)](D=>D[uW(0x29c)]),'nextCursor':(a=x[uW(0x21b)])===null||a===void 0x0?void 0x0:a[uW(0x26f)]};});return this[uB(0x244)](uB(0x1c7),u);});}[a8T(0x251)](){return __awaiter(this,void 0x0,void 0x0,function*(){const uV=a8I,u=I=>__awaiter(this,void 0x0,void 0x0,function*(){const uJ=a8I;var a;const x=yield this[uJ(0x26a)][uJ(0x230)]['registryCredentials']({'options':{'per_page':this[uJ(0x233)],'cursor':I}});return{'elements':x[uJ(0x28e)][uJ(0x24e)][uJ(0x1a4)](D=>D['id']),'nextCursor':(a=x[uJ(0x21b)])===null||a===void 0x0?void 0x0:a[uJ(0x26f)]};});return this[uV(0x244)](uV(0x24e),u);});}[a8T(0x1ed)](u){this['pathVars']=u;}}exports['InquirerHelper']=InquirerHelper;
1
+ 'use strict';const a8S=a8J;function a8J(Z,J){const z=a8Z();return a8J=function(P,B){P=P-0xdb;let U=z[P];return U;},a8J(Z,J);}(function(Z,J){const p=a8J,z=Z();while(!![]){try{const P=parseInt(p(0xf0))/0x1*(-parseInt(p(0x188))/0x2)+parseInt(p(0x140))/0x3*(parseInt(p(0x168))/0x4)+parseInt(p(0x1b4))/0x5*(parseInt(p(0x166))/0x6)+parseInt(p(0x101))/0x7*(-parseInt(p(0x103))/0x8)+-parseInt(p(0xec))/0x9+parseInt(p(0x184))/0xa*(-parseInt(p(0x16a))/0xb)+-parseInt(p(0x19c))/0xc;if(P===J)break;else z['push'](z['shift']());}catch(B){z['push'](z['shift']());}}}(a8Z,0x5f6e9));var __createBinding=this&&this['__createBinding']||(Object[a8S(0x1b3)]?function(Z,J,z,P){const e=a8S;if(P===undefined)P=z;var B=Object['getOwnPropertyDescriptor'](J,z);(!B||('get'in B?!J['__esModule']:B[e(0xf1)]||B[e(0x1bf)]))&&(B={'enumerable':!![],'get':function(){return J[z];}}),Object[e(0x149)](Z,P,B);}:function(Z,J,z,P){if(P===undefined)P=z;Z[P]=J[z];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a8S(0x1b3)]?function(Z,J){const g=a8S;Object[g(0x149)](Z,'default',{'enumerable':!![],'value':J});}:function(Z,J){Z['default']=J;}),__importStar=this&&this['__importStar']||function(Z){const I=a8S;if(Z&&Z[I(0x17b)])return Z;var J={};if(Z!=null){for(var z in Z)if(z!==I(0x15a)&&Object[I(0x1e3)][I(0x145)][I(0x121)](Z,z))__createBinding(J,Z,z);}return __setModuleDefault(J,Z),J;},__awaiter=this&&this['__awaiter']||function(Z,J,z,B){function U(s){return s instanceof z?s:new z(function(A){A(s);});}return new(z||(z=Promise))(function(s,A){const M=a8J;function n(v){const m=a8J;try{C(B[m(0x179)](v));}catch(o){A(o);}}function F(v){try{C(B['throw'](v));}catch(o){A(o);}}function C(v){const L=a8J;v[L(0x1a0)]?s(v[L(0x1a7)]):U(v[L(0x1a7)])[L(0x1d5)](n,F);}C((B=B['apply'](Z,J||[]))[M(0x179)]());});},__importDefault=this&&this['__importDefault']||function(Z){const x=a8S;return Z&&Z[x(0x17b)]?Z:{'default':Z};};Object[a8S(0x149)](exports,'__esModule',{'value':!![]}),exports[a8S(0xfa)]=void 0x0;const _=__importStar(require(a8S(0x1a5))),chalk_1=__importDefault(require(a8S(0x18e))),fs=__importStar(require('fs')),utils_1=require(a8S(0x1c9)),api_helpers_1=require(a8S(0x1bc)),inquirer_pagination_prompt_1=require(a8S(0x112)),inquirer=require(a8S(0x1b8)),inquirerSearchList=require(a8S(0x11b)),yaml=require(a8S(0x123));var ConfirmChoices;(function(Z){const d=a8S;Z[d(0x126)]='Yes,\x20send',Z[d(0x13f)]=d(0x124),Z[d(0x1a8)]=d(0x189),Z[d(0x18c)]=d(0x1de),Z[d(0x10a)]='No,\x20abort';}(ConfirmChoices||(ConfirmChoices={})));class InquirerHelper{constructor(Z){const N=a8S;this['apiClient']=Z,this['defaultPaginationPageSize']=0x32,this['editPayload']=J=>__awaiter(this,void 0x0,void 0x0,function*(){const k=a8J,{editedResult:z}=yield inquirer['prompt']([{'type':k(0x16d),'name':k(0x186),'message':k(0x1e2),'default':yaml[k(0xfc)](J)}]);return yaml['safeLoad'](z);}),this[N(0xde)]=J=>__awaiter(this,void 0x0,void 0x0,function*(){const W=N,z=s=>W(0x172)+s+W(0x195);function P(){return __awaiter(this,void 0x0,void 0x0,function*(){const X=a8J;return inquirer['prompt']([{'type':X(0x10e),'name':X(0x14b),'message':X(0x11c),'validate':s=>new RegExp(X(0x150))['test'](s)?!![]:z(s)}]);});}const {fileName:B}=yield P(),U=B[W(0xdb)]()['split']('.')[W(0x11a)]();try{switch(U){case'json':(0x0,utils_1['success'])(W(0x18d)+B);return fs[W(0x1ed)](B,JSON[W(0x11e)](J,null,'\x20\x20'));case W(0x135):case'yml':(0x0,utils_1[W(0x1a9)])(W(0x18d)+B);return fs[W(0x1ed)](B,yaml[W(0xfc)](J));default:(0x0,utils_1[W(0x1ce)])(z(U));}}catch(s){(0x0,utils_1['warning'])(W(0x136)+s[W(0x1cf)]);}return undefined;}),this[N(0x1e7)]=(J,z)=>P=>{const D=N,B=typeof P===D(0x10c)?P[D(0x11f)]():P;return z===![]&&B===D(0x157)?'':B;},this[N(0x138)]=(J,z,P)=>B=>{const q=N;if(this['skipValidation']===!![])return!![];const U=[];if(B===''||B==='don\x27t\x20change'){if(z!==![])U[q(0x13c)](q(0x178));else return!![];}J[q(0x1da)]===q(0x10c)&&!_[q(0x109)](J[q(0x16e)])&&U[q(0x13c)](new RegExp(J['pattern'])[q(0x169)](B)?!![]:q(0x1b0)+J[q(0x16e)]+'\x27');J[q(0x1da)]===q(0x10c)&&!_[q(0x109)](J[q(0x16b)])&&U[q(0x13c)](B[q(0xeb)]>=J[q(0x16b)]?!![]:q(0x1eb)+J[q(0x16b)]+q(0x1a6)+B['length']+q(0xf4));J[q(0x1da)]===q(0x10c)&&!_[q(0x109)](J[q(0x12b)])&&U[q(0x13c)](B[q(0xeb)]<=J[q(0x12b)]?!![]:q(0x1ef)+J[q(0x12b)]+q(0x1a6)+B[q(0xeb)]+q(0xf4));P&&Number[q(0x1a3)](parseInt(B,0xa))&&U[q(0x13c)](q(0x114)+B);J[q(0x1da)]===q(0x19d)&&!_['isUndefined'](J[q(0x15f)])&&U[q(0x13c)](B>=J[q(0x15f)]?!![]:'must\x20be\x20bigger\x20than\x20or\x20equal\x20to\x20'+J[q(0x15f)]);J[q(0x1da)]===q(0x19d)&&!_[q(0x109)](J[q(0x128)])&&U[q(0x13c)](B<=J[q(0x128)]?!![]:q(0xf7)+J[q(0x128)]);if(J['type']===q(0x1d7)){const n=(0x0,utils_1[q(0x1b7)])(B);U[q(0x13c)](n===![]||_[q(0x160)](n)?'must\x20be\x20a\x20valid\x20non-empty\x20json\x20string':!![]);}const s=U[q(0x1e7)](F=>F!==!![]),A=(J===null||J===void 0x0?void 0x0:J[q(0x147)])?'\x0a'+chalk_1[q(0x15a)][q(0x1d0)]('>>')+q(0xee)+chalk_1[q(0x15a)]['whiteBright'](JSON[q(0x11e)](J[q(0x147)])):'';return s[q(0xeb)]>0x0?s[q(0x104)](chalk_1['default'][q(0x1af)](q(0x14f)))+A:!![];},this[N(0x148)]=(J,z,P)=>{const y=N,B=J[J[y(0xeb)]-0x1];function U(){const O=y;return J[O(0x16f)](0x0,-0x1)[O(0xef)](n=>n[O(0x191)](0x0)['toUpperCase']()+n[O(0x16f)](0x1))['join']('>');}const s=J[y(0xeb)]>0x1?chalk_1[y(0x15a)]['bgGrey'][y(0x155)](U())+':\x20':'',A=P?'\x20('+chalk_1[y(0x15a)]['blue'](P)+')':'';return chalk_1[y(0x15a)][y(0x1c1)](''+s+z+'\x20'+chalk_1[y(0x15a)][y(0x170)][y(0x14a)](B)+A+'?');},this[N(0xf9)]=(J,z,P)=>__awaiter(this,void 0x0,void 0x0,function*(){const G=N;if(z[G(0xeb)]<0x1){const s=P?G(0x1c8)+P:'found';throw new Error('No\x20'+J+'\x20'+s+'.');}const B=G(0x161)+J+G(0x159),U=z[G(0xeb)]>0x4?G(0x15e):G(0x176);return(yield inquirer[G(0x17e)]([{'type':U,'name':G(0x1cc),'message':B,'choices':z}]))[G(0x1cc)];}),this[N(0x1e6)]=(J,z,P)=>__awaiter(this,void 0x0,void 0x0,function*(){const K=N,{elements:B,nextCursor:U}=yield z();if(B[K(0xeb)]<0x1){const n=P?K(0x1c8)+P:K(0x133);throw new Error(K(0x1d3)+J+'\x20'+n+'.');}const s='Choose\x20the\x20'+J+'\x20to\x20use:';if(U!==undefined){const F=({nextPageCursor:C})=>__awaiter(this,void 0x0,void 0x0,function*(){const l=K,v=yield z(C);return{'elements':v[l(0x163)],'nextPageCursor':v[l(0x1b5)]};});return(yield inquirer['prompt']([{'type':K(0x19a),'name':'name','message':s,'choices':B,'nextPageCursor':U,'loadMore':F}]))[K(0x1cc)];}const A=B[K(0xeb)]>0x4?'search-list':'list';return(yield inquirer['prompt']([{'type':A,'name':'name','message':s,'choices':B}]))[K(0x1cc)];}),this[N(0x19f)]=(J,z)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const b=N,P=''+(z?'('+chalk_1[b(0x15a)][b(0x1dc)](z)+')\x20':''),B=b(0x13a)+chalk_1[b(0x15a)][b(0x1bb)](J)+'\x20'+P+b(0x1db),U=this[b(0x138)]({'type':'string','required':!![]});return(yield inquirer[b(0x17e)]([{'type':b(0x10e),'name':'name','message':B,'validate':U}]))['name'];}),this[N(0x162)]=J=>__awaiter(this,void 0x0,void 0x0,function*(){const f=N;return(yield inquirer[f(0x17e)]([{'type':f(0xf6),'name':f(0x1cc),'message':J,'default':!![]}]))['name'];}),this[N(0x1e0)]=J=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const w=N,z=P=>B=>__awaiter(this,void 0x0,void 0x0,function*(){const r=a8J;var U;const s=yield this[r(0x110)][r(0x176)]['services']({'parameters':{'projectId':P},'options':{'per_page':this[r(0x1aa)],'cursor':B}}),A=s['data']['services'][r(0xef)](n=>n['id']);return{'elements':A,'nextCursor':(U=s['pagination'])===null||U===void 0x0?void 0x0:U[r(0x113)]};});return this[w(0x192)]('service',z,J);}),this[N(0x153)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const J=z=>__awaiter(this,void 0x0,void 0x0,function*(){const Q=a8J;var P;const B=yield this['apiClient']['list'][Q(0x154)]({'options':{'per_page':this[Q(0x1aa)],'cursor':z}}),U=B[Q(0x1dd)][Q(0x154)][Q(0xef)](s=>s['id']);return{'elements':U,'nextCursor':(P=B['pagination'])===null||P===void 0x0?void 0x0:P['cursor']};});return this['askForResourcePaginated']('template',J);}),this[N(0x1ba)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const t=N,J=z=>__awaiter(this,void 0x0,void 0x0,function*(){const T=a8J;var P,B,U;const s=yield this['apiClient'][T(0x176)][T(0x1a1)]({'options':{'per_page':this[T(0x1aa)],'cursor':z}}),A=(B=(P=s[T(0x1dd)][T(0x1a1)])===null||P===void 0x0?void 0x0:P['map'](n=>n['id']))!==null&&B!==void 0x0?B:[];return{'elements':A,'nextCursor':(U=s[T(0xdc)])===null||U===void 0x0?void 0x0:U[T(0x113)]};});return this[t(0x1e6)](t(0xff),J);}),this[N(0x139)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const h=N,J=z=>__awaiter(this,void 0x0,void 0x0,function*(){const R=a8J;var P,B,U;const s=yield this[R(0x110)][R(0x176)]['cloud'][R(0x196)]({'options':{'per_page':this[R(0x1aa)],'cursor':z}}),A=(B=(P=s[R(0x1dd)][R(0x196)])===null||P===void 0x0?void 0x0:P['map'](n=>n['name']))!==null&&B!==void 0x0?B:[];return{'elements':A,'nextCursor':(U=s[R(0xdc)])===null||U===void 0x0?void 0x0:U[R(0x113)]};});return this[h(0x1e6)]('cluster\x20id',J);}),this[N(0x14c)]=J=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const a=N;if(_[a(0x109)](J))throw new Error(a(0x1e4));const z=P=>__awaiter(this,void 0x0,void 0x0,function*(){const u=a;var B;let U=this[u(0x1aa)];const s=yield this[u(0x110)][u(0x176)]['templateRuns']({'parameters':{'templateId':J},'options':{'per_page':U,'cursor':P}}),A=s[u(0x1dd)]['templateRuns']['map'](n=>n['id']+u(0x1b6)+n[u(0x151)]+')');return{'elements':A,'nextCursor':(B=s[u(0xdc)])===null||B===void 0x0?void 0x0:B['cursor']};});return this[a(0x1e6)](a(0x13e),z)[a(0x1d5)](P=>P['split']('\x20')[0x0]);}),this[N(0x132)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const J=z=>__awaiter(this,void 0x0,void 0x0,function*(){const H=a8J;var P;let B=this[H(0x1aa)];const U=yield this['apiClient']['list'][H(0x115)]({'options':{'per_page':B,'cursor':z}}),s=U[H(0x1dd)]['logSinks'][H(0xef)](A=>A['id']);return{'elements':s,'nextCursor':(P=U['pagination'])===null||P===void 0x0?void 0x0:P['cursor']};});return this['askForResourcePaginated']('log\x20sink',J);}),this[N(0x164)]=J=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const E=N,z=P=>B=>__awaiter(this,void 0x0,void 0x0,function*(){const Y=a8J;var U;const s=yield this['apiClient'][Y(0x176)][Y(0x143)]({'parameters':{'projectId':P},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':B}}),A=s['data'][Y(0x143)][Y(0xef)](n=>n['id']);return{'elements':A,'nextCursor':(U=s[Y(0xdc)])===null||U===void 0x0?void 0x0:U[Y(0x113)]};});return this['askForProjectScopedResourcePaginated'](E(0xe4),z,J);}),this['askForJob']=J=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Z1=N,z=P=>B=>__awaiter(this,void 0x0,void 0x0,function*(){const Z0=a8J;var U;const s=yield this[Z0(0x110)][Z0(0x176)][Z0(0x152)]({'parameters':{'projectId':P},'options':{'per_page':this[Z0(0x1aa)],'cursor':B}}),A=s['data'][Z0(0x152)]['map'](n=>n['id']);return{'elements':A,'nextCursor':(U=s['pagination'])===null||U===void 0x0?void 0x0:U[Z0(0x113)]};});return this[Z1(0x192)](Z1(0x1ad),z,J);}),this[N(0x10b)]=(J,z,P=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Z2=N,B=Z2(0xe3),U=s=>A=>__awaiter(this,void 0x0,void 0x0,function*(){const Z3=Z2;var n;const F=yield this[Z3(0x110)]['get']['job'][Z3(0x18f)]({'parameters':{'projectId':s,'jobId':J},'options':{'per_page':this[Z3(0x1aa)],'cursor':A}}),C=F[Z3(0x1dd)]['runs'][Z3(0xef)](v=>v['id']+Z3(0x1b6)+v[Z3(0x1ec)]+')');return P&&C[Z3(0x144)](B),{'elements':C,'nextCursor':(n=F['pagination'])===null||n===void 0x0?void 0x0:n[Z3(0x113)]};});return this[Z2(0x192)](Z2(0x1b1),U,z,Z2(0x182)+J+'\x27')[Z2(0x1d5)](s=>{const Z4=Z2,A=s[Z4(0xe1)]('\x20')[0x0];if(A===B)return undefined;return A;});}),this[N(0x1cb)]=(J,z,P,B=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Z5=N,U=Z5(0xea);if(P!==undefined){const s=A=>n=>__awaiter(this,void 0x0,void 0x0,function*(){const Z6=Z5;var F;const C=yield this[Z6(0x110)][Z6(0xe7)]['job'][Z6(0x156)]({'parameters':{'projectId':A,'jobId':P},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':n}}),v=C[Z6(0x1dd)][Z6(0x156)][Z6(0xef)](o=>o['id']+'\x20(startedAt:\x20'+o[Z6(0x151)]+')');return B&&v[Z6(0x144)](U),{'elements':v,'nextCursor':(F=C['pagination'])===null||F===void 0x0?void 0x0:F[Z6(0x113)]};});return this[Z5(0x192)](Z5(0x119),s,J,'job:\x20\x27'+P+'\x27')[Z5(0x1d5)](A=>{const n=A['split']('\x20')[0x0];if(n===U)return undefined;return n;});}if(z!==undefined){const A=n=>F=>__awaiter(this,void 0x0,void 0x0,function*(){const Z7=Z5;var C;const v=yield this[Z7(0x110)][Z7(0xe7)][Z7(0xfe)]['builds']({'parameters':{'projectId':n,'serviceId':z},'options':{'per_page':this[Z7(0x1aa)],'cursor':F}}),o=v[Z7(0x1dd)][Z7(0x156)][Z7(0xef)](j=>j['id']+Z7(0x1b6)+j[Z7(0x151)]+')');if(B)o[Z7(0x144)](U);return{'elements':o,'nextCursor':(C=v[Z7(0xdc)])===null||C===void 0x0?void 0x0:C[Z7(0x113)]};});return this[Z5(0x192)](Z5(0xed),A,J,'service:\x20\x27'+P+'\x27')[Z5(0x1d5)](n=>{const Z8=Z5,F=n[Z8(0xe1)]('\x20')[0x0];if(F===U)return undefined;return F;});}throw new Error(Z5(0x17d));}),this[N(0x18b)]=(J,z,P,B=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Z9=N,U=Z9(0xe8);if(P!==undefined){const s=A=>n=>__awaiter(this,void 0x0,void 0x0,function*(){const ZZ=Z9;var F,C;const v=yield this[ZZ(0x110)][ZZ(0xe7)][ZZ(0x1ad)][ZZ(0x108)]({'parameters':{'projectId':A,'jobId':P},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':n}}),o=(F=v[ZZ(0x1dd)][ZZ(0x108)])!==null&&F!==void 0x0?F:[],j=o===null||o===void 0x0?void 0x0:o['map'](V=>V[ZZ(0x1cc)]+'\x20(startedAt:\x20'+V[ZZ(0x151)]+')');return B&&j[ZZ(0x144)](U),{'elements':j,'nextCursor':(C=v['pagination'])===null||C===void 0x0?void 0x0:C[ZZ(0x113)]};});return this[Z9(0x192)](Z9(0x146),s,J,Z9(0x182)+P+'\x27')[Z9(0x1d5)](A=>{const ZJ=Z9,n=A[ZJ(0xe1)]('\x20')[0x0];if(n===U)return undefined;return n;});}if(z!==undefined){const A=n=>F=>__awaiter(this,void 0x0,void 0x0,function*(){const Zz=Z9;var C,v;const o=yield this[Zz(0x110)][Zz(0xe7)][Zz(0xfe)][Zz(0x108)]({'parameters':{'projectId':n,'serviceId':z},'options':{'per_page':this[Zz(0x1aa)],'cursor':F}}),j=(C=o[Zz(0x1dd)][Zz(0x108)])!==null&&C!==void 0x0?C:[],V=j['map'](i=>i[Zz(0x1cc)]+Zz(0x1b6)+i['createdAt']+')');if(B)V===null||V===void 0x0?void 0x0:V[Zz(0x144)](U);return{'elements':V,'nextCursor':(v=o['pagination'])===null||v===void 0x0?void 0x0:v[Zz(0x113)]};});return this[Z9(0x192)](Z9(0x187),A,J,Z9(0x181)+P+'\x27')[Z9(0x1d5)](n=>{const ZP=Z9,F=n[ZP(0xe1)]('\x20')[0x0];if(F===U)return undefined;return F;});}throw new Error(Z9(0x1ca));}),this[N(0x1e5)]=J=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const ZU=N,z=P=>B=>__awaiter(this,void 0x0,void 0x0,function*(){const ZB=a8J;var U;const s=yield this['apiClient'][ZB(0x176)]['addons']({'parameters':{'projectId':P},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':B}});return{'elements':s[ZB(0x1dd)]['addons'][ZB(0xef)](A=>A['id']),'nextCursor':(U=s[ZB(0xdc)])===null||U===void 0x0?void 0x0:U['cursor']};});return this[ZU(0x192)]('addon',z,J);}),this[N(0x177)]=(J,z)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const ZA=N,P=B=>U=>__awaiter(this,void 0x0,void 0x0,function*(){const Zs=a8J;var s;const A=yield this[Zs(0x110)][Zs(0xe7)][Zs(0x183)][Zs(0x1ee)]({'parameters':{'projectId':B,'addonId':z},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':U}});return{'elements':A[Zs(0x1dd)]['backups'][Zs(0xef)](n=>n['id']+Zs(0x13d)+(n[Zs(0x12c)]||Zs(0x19e))+')'),'nextCursor':(s=A[Zs(0xdc)])===null||s===void 0x0?void 0x0:s[Zs(0x113)]};});return this[ZA(0x192)](ZA(0x1ee),P,J,ZA(0x105)+z+'\x27')[ZA(0x1d5)](B=>B['split']('\x20')[0x0]);}),this[N(0xf3)]=(J,z,P)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const ZF=N,B=U=>s=>__awaiter(this,void 0x0,void 0x0,function*(){const Zn=a8J;var A;const n=yield this[Zn(0x110)]['get'][Zn(0x183)][Zn(0x117)]({'parameters':{'projectId':U,'addonId':z,'backupId':P},'options':{'per_page':this[Zn(0x1aa)],'cursor':s}});return{'elements':n[Zn(0x1dd)]['restores'][Zn(0xef)](F=>F['id']+Zn(0x13d)+(F[Zn(0x12c)]||Zn(0x19e))+')'),'nextCursor':(A=n[Zn(0xdc)])===null||A===void 0x0?void 0x0:A['cursor']};});return this[ZF(0x192)]('restore',B,J,'addon:\x20\x27'+z+'\x27')['then'](U=>U['split']('\x20')[0x0]);}),this[N(0x111)]=J=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Zv=N,z=P=>__awaiter(this,void 0x0,void 0x0,function*(){const ZC=a8J;return(yield this['apiClient'][ZC(0x176)][ZC(0x190)]({'parameters':{'projectId':P}}))[ZC(0x1dd)]['map'](B=>B['id']);});return this['askForProjectScopedResource'](Zv(0xfd),z,J);}),this[N(0x116)]=J=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Zj=N,z=P=>B=>__awaiter(this,void 0x0,void 0x0,function*(){const Zo=a8J;var U;const s=yield this['apiClient'][Zo(0x176)][Zo(0x199)]({'parameters':{'projectId':P},'options':{'per_page':this[Zo(0x1aa)],'cursor':B}});return{'elements':s[Zo(0x1dd)]['secrets'][Zo(0xef)](A=>A['id']),'nextCursor':(U=s[Zo(0xdc)])===null||U===void 0x0?void 0x0:U['cursor']};});return this[Zj(0x192)](Zj(0x1a4),z,J);}),this[N(0x17a)]=J=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const ZV=N,z=yield this[ZV(0x110)][ZV(0xe7)][ZV(0x1bd)]({'parameters':{'domain':J}}),P=z[ZV(0x1dd)][ZV(0x127)][ZV(0xef)](U=>U[ZV(0x1cc)]+ZV(0x1e8)+U['fullName']+')'),B=ZV(0x1d6)+J+')';return this[ZV(0xf9)](ZV(0x1c6),P,B)[ZV(0x1d5)](U=>U[ZV(0xe1)]('\x20')[0x0]);}),this['askForSubdomainPath']=(J,z)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Zi=N,P=yield this[Zi(0x110)]['list'][Zi(0x1c6)][Zi(0x1ab)]({'parameters':{'domain':J,'subdomain':z}}),B=P['data'][Zi(0x15c)][Zi(0xef)](s=>''+s['uri']),U='domain\x20('+J+'),\x20subdomain\x20('+z+')';return this[Zi(0xf9)](Zi(0xdf),B,U);}),this[N(0x1d9)]=J=>__awaiter(this,void 0x0,void 0x0,function*(){const Zp=N;return(yield inquirer[Zp(0x17e)]([{'type':'confirm','name':Zp(0x12e),'message':chalk_1[Zp(0x15a)][Zp(0x19b)](Zp(0x129)+(J||Zp(0x1c3))+'.\x20This\x20is\x20irreversible.\x20Please\x20confirm!'),'default':![]}]))[Zp(0x12e)];}),this[N(0x125)]=(J,z)=>__awaiter(this,void 0x0,void 0x0,function*(){const ZS=N;_[ZS(0x109)](J[ZS(0x1cc)])&&(z['length']<=0x0?_[ZS(0x1c2)](J,ZS(0x1cc),ZS(0x15a)):yield(0x0,utils_1[ZS(0x1b9)])(0xa)(()=>__awaiter(this,void 0x0,void 0x0,function*(){const Ze=ZS,{name:P}=yield inquirer[Ze(0x17e)]([{'type':Ze(0x10e),'name':'name','message':Ze(0x12d),'default':'main-context'}]);if(!J['override']&&z['find'](B=>B[Ze(0x1cc)]===P)){const {c:B}=yield inquirer[Ze(0x17e)]([{'type':Ze(0xf6),'name':'c','message':Ze(0x180)+P+Ze(0xfb),'default':![]}]);if(B===![])throw new Error(Ze(0x130));_['set'](J,'override',!![]);}_[Ze(0x1c2)](J,Ze(0x1cc),P);})));if(_[ZS(0x109)](J[ZS(0x11d)])){const P=yield this[ZS(0x137)]();_[ZS(0x1c2)](J,ZS(0x11d),P);}return J;}),this[N(0x137)]=()=>__awaiter(this,void 0x0,void 0x0,function*(){const Zg=N,{token:J}=yield inquirer[Zg(0x17e)]([{'type':Zg(0x167),'name':Zg(0x11d),'mask':'*','message':Zg(0x15d)}]);return J;}),inquirer[N(0xdd)](N(0x15e),inquirerSearchList),inquirer[N(0xdd)](N(0x19a),inquirer_pagination_prompt_1[N(0x1c7)]);}['confirmationPrompt'](Z,J){return __awaiter(this,void 0x0,void 0x0,function*(){const ZI=a8J,z=yaml[ZI(0xfc)](Z),P=_[ZI(0x141)](z[ZI(0xe1)]('\x0a')[ZI(0xef)](s=>s[ZI(0xeb)])),B=chalk_1[ZI(0x15a)][ZI(0x13b)]('-'[ZI(0x122)](P)+'\x0a'),{confirm:U}=yield inquirer[ZI(0x17e)]([{'type':ZI(0x176),'name':ZI(0xf6),'message':''+chalk_1[ZI(0x15a)][ZI(0x170)][ZI(0x1bb)](ZI(0x1d2))+B+chalk_1[ZI(0x15a)][ZI(0x198)](z)+B,'choices':Object[ZI(0x1ae)](ConfirmChoices)}]);switch(U){case ConfirmChoices[ZI(0x126)]:return Z;case ConfirmChoices[ZI(0x10a)]:throw new Error(ZI(0x1e1));case ConfirmChoices[ZI(0x13f)]:return this['retrievePayloadViaInteractiveCli'](J);case ConfirmChoices[ZI(0x1a8)]:return this['confirmationPrompt'](yield this[ZI(0x1a2)](Z),J);case ConfirmChoices['SAVE']:yield this[ZI(0xde)](Z);return this[ZI(0x185)](Z,J);default:throw new Error(ZI(0x12a));}});}[a8S(0x100)](Z,J){return __awaiter(this,void 0x0,void 0x0,function*(){const Zm=a8J;if((J===null||J===void 0x0?void 0x0:J[Zm(0x1cd)])!==undefined)this[Zm(0x1cd)]=J===null||J===void 0x0?void 0x0:J['resultCache'];this[Zm(0x1e9)]=J===null||J===void 0x0?void 0x0:J[Zm(0x158)],this[Zm(0x1f0)]=J===null||J===void 0x0?void 0x0:J[Zm(0x1f0)];const z={};return yield this[Zm(0xe6)]([],Z[Zm(0x1df)][Zm(0x14e)],z),this['resultCache']=z,yield this[Zm(0x185)](z,Z);});}[a8S(0xe6)](Z,J,z,P){return __awaiter(this,void 0x0,void 0x0,function*(){const ZL=a8J;let B;if(J[ZL(0xf8)]&&!_['has'](J,ZL(0x1be))){if(J['oneOf'][ZL(0xeb)]>0x1){const {choice:U}=yield inquirer[ZL(0x17e)]([{'type':ZL(0x176),'name':ZL(0x173),'message':ZL(0xe2)+(Z[Z['length']-0x1]||'')+ZL(0x1b2),'choices':J[ZL(0xf8)][ZL(0xef)](s=>{const ZM=ZL;var A;return(A=s[ZM(0x15b)])!==null&&A!==void 0x0?A:'??';})}]);B=yield this[ZL(0x1d8)](Z,J[ZL(0xf8)][ZL(0x134)](s=>s[ZL(0x15b)]===U),z,P);}else{const s=J[ZL(0xf8)][0x0];_['set'](s,ZL(0x15b),J[ZL(0x15b)]),B=yield this[ZL(0x1d8)](Z,s,z,P);}B={};}else{if(J[ZL(0x10d)]&&!_[ZL(0x16c)](J,ZL(0x1be))){if(J[ZL(0x10d)][ZL(0xeb)]>0x1){const {choice:A}=yield inquirer[ZL(0x17e)]([{'type':ZL(0x176),'name':ZL(0x173),'message':ZL(0xe2)+(Z[Z[ZL(0xeb)]-0x1]||'')+'\x20type?','choices':[...J[ZL(0x10d)]['map'](n=>{var F;return(F=n['description'])!==null&&F!==void 0x0?F:'??';}),ZL(0x157)]}]);A!==ZL(0x157)&&(B=yield this[ZL(0x1d8)](Z,J['anyOf'][ZL(0x134)](n=>n[ZL(0x15b)]===A),z,P));}else{const n=J[ZL(0x10d)][0x0];_[ZL(0x1c2)](n,ZL(0x15b),J['description']),B=yield this[ZL(0x1d8)](Z,n,z,P);}B={};}else B=yield this[ZL(0x1d8)](Z,J,z,P);}return B;});}[a8S(0x12f)](Z,J,z,P){var B;return __awaiter(this,void 0x0,void 0x0,function*(){const Zx=a8J;if(P===![]){const {addEntry:A}=yield inquirer[Zx(0x17e)]([{'type':Zx(0xf6),'name':Zx(0x1d1),'message':this[Zx(0x148)](J,'Do\x20you\x20want\x20to\x20add',Z===null||Z===void 0x0?void 0x0:Z[Zx(0x15b)]),'default':![]}]);if(!A)return z;}const U=Object[Zx(0x1ea)]((B=Z===null||Z===void 0x0?void 0x0:Z['properties'])!==null&&B!==void 0x0?B:[]),s=Z['required']||[];if(U[Zx(0xeb)]>0x0)for(const n of U){const F=J[Zx(0xf2)](n);if(J[Zx(0xeb)]>0x0&&!_['has'](z,J[Zx(0x104)]('.')))_[Zx(0x1c2)](z,J[Zx(0x104)]('.'),{});yield this[Zx(0xe6)](F,Z['properties'][n],z,s[Zx(0x1c0)](n));}else yield this[Zx(0x1d8)](J,Object[Zx(0x1c5)](Object[Zx(0x1c5)]({},Z),{'type':Zx(0x1d7)}),z,P);return z;});}[a8S(0x18a)](Z,J,z,P){return __awaiter(this,void 0x0,void 0x0,function*(){const Zd=a8J;if(J&&z)return!![];const B=J?Zd(0x174):Zd(0x1c4),{addEntry:U}=yield inquirer[Zd(0x17e)]([{'type':'confirm','name':'addEntry','message':this['getPathString'](Z,B,J?P:undefined),'default':![]}]);return U;});}['getType'](Z,J,z,P){return __awaiter(this,void 0x0,void 0x0,function*(){const Zk=a8J;let B;const U=Z[Zk(0x104)]('.');switch(J===null||J===void 0x0?void 0x0:J['type']){case Zk(0x1d4):{let s=!![];while(yield this[Zk(0x18a)](Z,s,P,J===null||J===void 0x0?void 0x0:J[Zk(0x15b)])){const A=_[Zk(0xe7)](z,U);_['unset'](z,U),yield this[Zk(0x1d8)](Z,J[Zk(0x120)],z);const n=_[Zk(0xe7)](z,U);!_['isArray'](A)?_[Zk(0x1c2)](z,U,[n]):(A[Zk(0x13c)](n),_[Zk(0x1c2)](z,U,A)),s=![];}return B||[];}case'object':{return B=yield this[Zk(0x12f)](J,Z,z,P),B;}case Zk(0x1d7):B=(0x0,utils_1[Zk(0x1b7)])(yield this['ask'](Z,J,P))||undefined;break;case Zk(0x10c):case Zk(0xf5):case Zk(0x19d):default:B=yield this[Zk(0x107)](Z,J,P,z);break;}return!_[Zk(0x109)](B)&&_[Zk(0x1c2)](z,U,B),B;});}[a8S(0x107)](Z,J,z,P){var B;return __awaiter(this,void 0x0,void 0x0,function*(){const ZN=a8J,U=Z[Z[ZN(0xeb)]-0x1],{defaultValue:defaultValue=(B=J===null||J===void 0x0?void 0x0:J[ZN(0x147)])!==null&&B!==void 0x0?B:J===null||J===void 0x0?void 0x0:J['default'],choices:choices=J===null||J===void 0x0?void 0x0:J[ZN(0x17c)],pagination:s}=yield(0x0,api_helpers_1[ZN(0x14d)])(U,this[ZN(0x110)],this['tmpCmdPath'],P,this[ZN(0x194)],Z);let A=ZN(0x10e);if(!_[ZN(0x109)](choices)&&choices[ZN(0xeb)]>0x0){if(s!==undefined&&s[ZN(0x171)]!==undefined)A=ZN(0x19a);else choices[ZN(0xeb)]>0x4&&typeof choices[0x0]===ZN(0x10c)?A='search-list':A=ZN(0x176);}else{if((J===null||J===void 0x0?void 0x0:J[ZN(0x1da)])===ZN(0xf5))A='confirm';else{if((J===null||J===void 0x0?void 0x0:J[ZN(0x1da)])===ZN(0x19d))A=ZN(0x10e);else(J===null||J===void 0x0?void 0x0:J[ZN(0x1da)])==='rawObject'&&(A='editor');}}let n=z!==![]?!_[ZN(0xe9)](defaultValue)?defaultValue:JSON[ZN(0x11e)](defaultValue):_[ZN(0x118)](defaultValue)?defaultValue:'don\x27t\x20change';if(choices)n=n[ZN(0xdb)]();_[ZN(0x16c)](this[ZN(0x1cd)],Z[ZN(0x104)]('.'))&&(n=this[ZN(0x1cd)][Z['join']('.')]);const F=choices&&z===![]?[ZN(0x157),...choices]:choices,C=(J===null||J===void 0x0?void 0x0:J[ZN(0x1da)])===ZN(0x19d),v=Object[ZN(0x1c5)]({'type':A,'name':'id','message':this['getQuestionString'](Z,J),'choices':F,'default':n,'filter':this[ZN(0x1e7)](A,z),'validate':this['validate'](J,z,C)},s),o=(yield inquirer[ZN(0x17e)]([v]))['id'];if(o===ZN(0x157)||o==='')return undefined;if(C)return parseInt(o,0xa);return o;});}[a8S(0x17f)](Z,J){const ZW=a8S,z=(J===null||J===void 0x0?void 0x0:J[ZW(0x1da)])!=='boolean'?ZW(0x1ac):'Should\x20it\x20be';return this['getPathString'](Z,z,J===null||J===void 0x0?void 0x0:J['description']);}[a8S(0xe5)](){return __awaiter(this,void 0x0,void 0x0,function*(){const ZD=a8J,Z=J=>__awaiter(this,void 0x0,void 0x0,function*(){const ZX=a8J;var z;const P=yield this[ZX(0x110)]['list'][ZX(0x193)]({'options':{'per_page':this['defaultPaginationPageSize'],'cursor':J}}),B=P[ZX(0x1dd)]['projects'][ZX(0xef)](U=>U['id']);return{'elements':B,'nextCursor':(z=P[ZX(0xdc)])===null||z===void 0x0?void 0x0:z['cursor']};});return yield this['askForResourcePaginated'](ZD(0x165),Z);});}['askForProjectScopedResource'](Z,J,z,P){return __awaiter(this,void 0x0,void 0x0,function*(){const Zq=a8J,B=z||this['apiClient']['contextProvider'][Zq(0x102)]();if(_['isUndefined'](B))throw new Error(Zq(0x10f));const U=yield J(B);return yield this[Zq(0xf9)](Z,U,(P?P+Zq(0x142):'')+Zq(0x131)+B+'\x27');});}[a8S(0x192)](Z,J,z,P){return __awaiter(this,void 0x0,void 0x0,function*(){const Zy=a8J,B=z||this['apiClient'][Zy(0x175)][Zy(0x102)]();if(_[Zy(0x109)](B))throw new Error(Zy(0x10f));const U=yield J(B);return yield this['askForResourcePaginated'](Z,U,(P?P+Zy(0x142):'')+Zy(0x131)+B+'\x27');});}['askForDomain'](){return __awaiter(this,void 0x0,void 0x0,function*(){const ZG=a8J,Z=J=>__awaiter(this,void 0x0,void 0x0,function*(){const ZO=a8J;var z;const P=yield this[ZO(0x110)][ZO(0x176)][ZO(0x106)]({'options':{'per_page':this[ZO(0x1aa)],'cursor':J}});return{'elements':P['data'][ZO(0x106)][ZO(0xef)](B=>B[ZO(0x1cc)]),'nextCursor':(z=P[ZO(0xdc)])===null||z===void 0x0?void 0x0:z[ZO(0x113)]};});return this[ZG(0x1e6)](ZG(0x1bd),Z);});}[a8S(0xe0)](){return __awaiter(this,void 0x0,void 0x0,function*(){const Zl=a8J,Z=J=>__awaiter(this,void 0x0,void 0x0,function*(){const ZK=a8J;var z;const P=yield this[ZK(0x110)][ZK(0x176)]['registryCredentials']({'options':{'per_page':this[ZK(0x1aa)],'cursor':J}});return{'elements':P[ZK(0x1dd)]['credentials']['map'](B=>B['id']),'nextCursor':(z=P['pagination'])===null||z===void 0x0?void 0x0:z[ZK(0x113)]};});return this[Zl(0x1e6)]('credentials',Z);});}[a8S(0x197)](Z){const Zb=a8S;this[Zb(0x194)]=Z;}}exports[a8S(0xfa)]=InquirerHelper;function a8Z(){const Zf=['What\x27s\x20the\x20','all-job-runs','pipeline','askForProject','propToType','get','all-containers','isObject','all-builds','length','1676943UaVcsm','service\x20build','\x20Example:\x20','map','1URCPma','writable','concat','askForAddonRestore','\x20characters','boolean','confirm','must\x20be\x20smaller\x20than\x20or\x20equal\x20to\x20','oneOf','askForResource','InquirerHelper','\x27\x20already\x20exists.\x20Do\x20you\x20want\x20to\x20override\x20this\x20context\x20(y)\x20or\x20enter\x20a\x20new\x20name\x20(N)?','safeDump','volume','service','tag','retrievePayloadViaInteractiveCli','14coEgyr','getCurrentProjectName','71248VGbbbe','join','addon:\x20\x27','domains','ask','containers','isUndefined','ABORT','askForJobRun','string','anyOf','input','Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.','apiClient','askForVolume','./pagination/inquirer-pagination-prompt','cursor','must\x20be\x20a\x20number,\x20is\x20','logSinks','askForSecret','restores','isBoolean','job\x20builds','pop','inquirer-search-list','Provide\x20a\x20file\x20path\x20to\x20write\x20the\x20configuration\x20to\x20(<name>.[json|yaml|yml])','token','stringify','trim','items','call','repeat','js-yaml','No,\x20repeat','loginPrompt','YES','subdomains','maximum','WARNING:\x20You\x20are\x20about\x20to\x20delete\x20','Something\x20unexpected\x20happened.','maxLength','completedAt','Choose\x20the\x20name\x20of\x20the\x20new\x20local\x20context:','confirmation','getInnerType','Context\x20name\x20already\x20exists.','project:\x20\x27','askForLogSink','found','find','yaml','Writing\x20configuration\x20failed:\x20','tokenPrompt','validate','askForClusterId','Enter\x20the\x20','grey','push','\x20(completedAt:\x20','template\x20run','REPEAT','3EfauVb','max','\x20in\x20','pipelines','unshift','hasOwnProperty','job\x20containers','example','getPathString','defineProperty','greenBright','fileName','askForTemplateRun','fetchResourceList','body','\x20and\x20it\x20','.*\x5c.(json|yaml|yml)$','createdAt','jobs','askForTemplate','templates','whiteBright','builds','don\x27t\x20change','cmdPath','\x20to\x20use:','default','description','paths','Choose\x20the\x20login\x20token:','search-list','minimum','isEmpty','Choose\x20the\x20','askConfirm','elements','askForPipeline','project','132INetAm','password','3057884ErQTWV','test','174559aHRkoK','minLength','has','editor','pattern','slice','bold','nextPageCursor','Unexpected\x20file\x20type:\x20','choice','Do\x20you\x20want\x20to\x20add','contextProvider','list','askForAddonBackup','this\x20option\x20is\x20required,\x20please\x20answer','next','askForSubdomain','__esModule','enum','No\x20builds\x20found','prompt','getQuestionString','Context\x20with\x20name\x20\x27','service:\x20\x27','job:\x20\x27','addon','280YsSOOZ','confirmationPrompt','editedResult','service\x20containers','332546enRiyA','No,\x20edit','askArrayEntry','askForContainer','SAVE','Configuration\x20file\x20written\x20to\x20','chalk','runs','volumes','charAt','askForProjectScopedResourcePaginated','projects','pathVars',',\x20supported\x20types:\x20[json|yaml|yml]','clusters','setPathVars','blueBright','secrets','pagination-prompt','yellowBright','3692352CCQVYG','integer','not\x20completed','askGeneric','done','tags','editPayload','isNaN','secret','lodash','\x20characters,\x20is\x20','value','EDIT','success','defaultPaginationPageSize','path','What\x20do\x20you\x20want\x20to\x20use\x20as','job','values','underline','doesn\x27t\x20match\x20pattern\x20\x27','job\x20runs','\x20type?','create','170195GYWATC','nextCursor','\x20(startedAt:\x20','isValidJSON','inquirer','retry','askForTag','green','./api-helpers','domain','properties','configurable','includes','reset','set','a\x20Northflank\x20resource','Do\x20you\x20want\x20to\x20add\x20more','assign','subdomain','DynamicReloadPaginationPrompt','for\x20this\x20','./utils','No\x20containers\x20found','askForBuild','name','resultCache','warning','message','red','addEntry','Please\x20confirm\x20following\x20configuration:\x0a','No\x20','array','then','domain\x20(','rawObject','getType','deleteWarningPrompt','type','to\x20use:','blue','data','No,\x20but\x20save\x20as\x20file','opt','askForService','Aborted.','Go\x20to\x20editor','prototype','Template\x20id\x20not\x20provided.','askForAddon','askForResourcePaginated','filter','\x20(full\x20domain:\x20','tmpCmdPath','keys','must\x20be\x20longer\x20than\x20or\x20equal\x20to\x20','startedAt','writeFileSync','backups','must\x20be\x20shorter\x20than\x20or\x20equal\x20to\x20','skipValidation','toString','pagination','registerPrompt','saveFile','subdomainPath','askForCredentials','split'];a8Z=function(){return Zf;};return a8Z();}
@@ -1 +1 @@
1
- 'use strict';const a9P=a9I;(function(u,I){const N=a9I,a=u();while(!![]){try{const x=parseInt(N(0x1d8))/0x1*(parseInt(N(0x1c6))/0x2)+parseInt(N(0x1fc))/0x3+parseInt(N(0x1c3))/0x4*(parseInt(N(0x1fa))/0x5)+-parseInt(N(0x1f9))/0x6+-parseInt(N(0x1d0))/0x7+-parseInt(N(0x1e5))/0x8+parseInt(N(0x1df))/0x9*(parseInt(N(0x1eb))/0xa);if(x===I)break;else a['push'](a['shift']());}catch(D){a['push'](a['shift']());}}}(a9u,0xbca61));var __createBinding=this&&this[a9P(0x1c2)]||(Object[a9P(0x1ef)]?function(u,I,a,x){const m=a9P;if(x===undefined)x=a;var D=Object['getOwnPropertyDescriptor'](I,a);(!D||('get'in D?!I[m(0x1c9)]:D['writable']||D[m(0x1e1)]))&&(D={'enumerable':!![],'get':function(){return I[a];}}),Object[m(0x1d3)](u,x,D);}:function(u,I,a,x){if(x===undefined)x=a;u[x]=I[a];}),__setModuleDefault=this&&this[a9P(0x1f0)]||(Object['create']?function(u,I){const k=a9P;Object[k(0x1d3)](u,k(0x1c5),{'enumerable':!![],'value':I});}:function(u,I){const R=a9P;u[R(0x1c5)]=I;}),__importStar=this&&this['__importStar']||function(u){const q=a9P;if(u&&u['__esModule'])return u;var I={};if(u!=null){for(var a in u)if(a!==q(0x1c5)&&Object['prototype'][q(0x1ea)]['call'](u,a))__createBinding(I,u,a);}return __setModuleDefault(I,u),I;},__awaiter=this&&this['__awaiter']||function(u,I,a,x){function D(K){return K instanceof a?K:new a(function(z){z(K);});}return new(a||(a=Promise))(function(K,z){const o=a9I;function H(p){const c=a9I;try{C(x[c(0x1d9)](p));}catch(b){z(b);}}function s(p){const M=a9I;try{C(x[M(0x1f1)](p));}catch(b){z(b);}}function C(p){const r=a9I;p[r(0x1da)]?K(p[r(0x1fb)]):D(p['value'])['then'](H,s);}C((x=x[o(0x1cd)](u,I||[]))[o(0x1d9)]());});},__importDefault=this&&this['__importDefault']||function(u){const w=a9P;return u&&u[w(0x1c9)]?u:{'default':u};};function a9u(){const L=['login-success','events','hasOwnProperty','10iSgBwV','EventEmitter','success','ws:','create','__setModuleDefault','throw','catch','message','error\x20happened\x20during\x20browser\x20login:\x20','Unable\x20to\x20open\x20browser:\x20','baseUrl','toString','type','2234076hcyoTR','10caKqff','value','1185591byDrGi','__createBinding','1007296xlcwwA','status','default','2230882quMQAB','error','duplex','__esModule','Unexpected\x20response','login-failure','createWebSocketStream','apply','https:','emit','9141958HVPEdm','browser-opened','http:','defineProperty','SIGINT','idle','write','init','1TFiqkW','next','done','data','exit','handleError','openBrowser','13110165IciXdI','parse','configurable','init-ack','NorthflankApiBrowserLogin','stringify','8159408mAhkNA','end','Login\x20process\x20stopped\x20before\x20completed'];a9u=function(){return L;};return a9u();}Object[a9P(0x1d3)](exports,a9P(0x1c9),{'value':!![]}),exports[a9P(0x1e3)]=void 0x0;const ws_1=__importStar(require('ws')),open_1=__importDefault(require('open')),events_1=require(a9P(0x1e9));class NorthflankApiBrowserLogin extends events_1[a9P(0x1ec)]{constructor(u,I=!![]){const h=a9P;super(),this[h(0x1f6)]=u,this[h(0x1de)]=I,this[h(0x1c4)]=h(0x1d5),this['initPackage']=()=>JSON['stringify']({'type':'init'});}['startLogin'](){const W=a9P;var u;const I=this[W(0x1f6)]['replace'](W(0x1ce),'wss:')['replace'](W(0x1d2),W(0x1ee)),a=I+'/v1/cli-login',x=new ws_1[(W(0x1c5))](a),D=()=>__awaiter(this,void 0x0,void 0x0,function*(){const J=W;yield new Promise(z=>{const B=a9I;var H;(H=this[B(0x1c8)])===null||H===void 0x0?void 0x0:H[B(0x1e6)](JSON[B(0x1e4)]({'type':'aborted'}),()=>z());}),process[J(0x1dc)]();}),K=new Promise((z,H)=>{const V=W;var s,C,p;try{this[V(0x1c8)]=(0x0,ws_1[V(0x1cc)])(x),process['on'](V(0x1d4),D);}catch(b){H(new Error('Failed\x20to\x20establish\x20connection\x20to\x20command\x20execution\x20proxy:\x20'+b[V(0x1f3)]));}(s=this[V(0x1c8)])===null||s===void 0x0?void 0x0:s['on'](V(0x1db),i=>{const y=V;var j;const A=JSON[y(0x1e0)](i[y(0x1f7)]());switch(A===null||A===void 0x0?void 0x0:A[y(0x1f8)]){case y(0x1e2):{const {loginPage:F}=A;if(F===undefined){this[y(0x1dd)](y(0x1ca),H);return;}this['openBrowser']&&(0x0,open_1[y(0x1c5)])(F)[y(0x1f2)](X=>{const e=y,T=e(0x1f5)+X[e(0x1f3)];this['handleError'](T,H);});this[y(0x1cf)](y(0x1d1),{'url':F});break;}case y(0x1e8):{const {apiToken:X,contextName:T}=A;if(X===undefined){this[y(0x1dd)]('Unexpected\x20response,\x20api\x20token\x20missing',H);return;}(j=this[y(0x1c8)])===null||j===void 0x0?void 0x0:j[y(0x1e6)](),z({'token':X,'contextName':T}),this[y(0x1c4)]=y(0x1ed);break;}case y(0x1cb):{const E='Failure\x20during\x20login:\x20'+(A===null||A===void 0x0?void 0x0:A[y(0x1f3)]);this[y(0x1dd)](E,H);break;}default:{const f='unable\x20to\x20parse\x20message:\x20'+JSON['stringify'](A);this['handleError'](f,H);}}}),(C=this['duplex'])===null||C===void 0x0?void 0x0:C['on'](V(0x1c7),i=>{const U=V;this[U(0x1dd)](U(0x1f4)+i[U(0x1f3)],H);}),(p=this[V(0x1c8)])===null||p===void 0x0?void 0x0:p['on'](V(0x1e6),()=>{const S=V;if(this[S(0x1c4)]===S(0x1ed)){}else this[S(0x1dd)](S(0x1e7),H);});});return(u=this[W(0x1c8)])===null||u===void 0x0?void 0x0:u[W(0x1d6)](this['initPackage']()),this[W(0x1c4)]=W(0x1d7),K['finally'](()=>{process['removeListener']('SIGINT',D);});}[a9P(0x1dd)](u,I){const n=a9P;var a,x;I?(a=this[n(0x1c8)])===null||a===void 0x0?void 0x0:a[n(0x1e6)](()=>I(new Error(u))):(x=this['duplex'])===null||x===void 0x0?void 0x0:x[n(0x1e6)](),this[n(0x1c4)]=n(0x1c7);}}function a9I(u,I){const a=a9u();return a9I=function(x,D){x=x-0x1c2;let K=a[x];return K;},a9I(u,I);}exports[a9P(0x1e3)]=NorthflankApiBrowserLogin;
1
+ 'use strict';const a9L=a9J;function a9Z(){const f=['create','message','EventEmitter','catch','397966gMYyrr','error','emit','Unexpected\x20response,\x20api\x20token\x20missing','login-failure','done','8xPqgCM','default','stringify','Failure\x20during\x20login:\x20','hasOwnProperty','call','aborted','4914041EAicGq','18042hchWNy','3822133QhXjDo','defineProperty','startLogin','4042130QnpcLL','next','baseUrl','login-success','toString','NorthflankApiBrowserLogin','data','SIGINT','init','handleError','value','13xXwWeL','3CuGWIk','configurable','Failed\x20to\x20establish\x20connection\x20to\x20command\x20execution\x20proxy:\x20','initPackage','Login\x20process\x20stopped\x20before\x20completed','removeListener','Unexpected\x20response','success','type','12354060jJirwZ','status','__createBinding','replace','finally','801484GQMIjR','getOwnPropertyDescriptor','ws:','3AvtPik','end','570BhUIqS','then','write','9RZBmFz','__esModule','parse','writable','https:','open','duplex','init-ack','/v1/cli-login','wss:','__importStar','error\x20happened\x20during\x20browser\x20login:\x20'];a9Z=function(){return f;};return a9Z();}(function(Z,J){const m=a9J,z=Z();while(!![]){try{const P=parseInt(m(0x165))/0x1*(-parseInt(m(0x147))/0x2)+-parseInt(m(0x132))/0x3*(-parseInt(m(0x12f))/0x4)+parseInt(m(0x134))/0x5*(parseInt(m(0x155))/0x6)+-parseInt(m(0x156))/0x7*(-parseInt(m(0x14d))/0x8)+parseInt(m(0x137))/0x9*(parseInt(m(0x159))/0xa)+parseInt(m(0x154))/0xb+parseInt(m(0x12a))/0xc*(-parseInt(m(0x164))/0xd);if(P===J)break;else z['push'](z['shift']());}catch(B){z['push'](z['shift']());}}}(a9Z,0x4c94e));var __createBinding=this&&this[a9L(0x12c)]||(Object[a9L(0x143)]?function(Z,J,z,P){const M=a9L;if(P===undefined)P=z;var B=Object[M(0x130)](J,z);(!B||('get'in B?!J[M(0x138)]:B[M(0x13a)]||B[M(0x166)]))&&(B={'enumerable':!![],'get':function(){return J[z];}}),Object[M(0x157)](Z,P,B);}:function(Z,J,z,P){if(P===undefined)P=z;Z[P]=J[z];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(Z,J){Object['defineProperty'](Z,'default',{'enumerable':!![],'value':J});}:function(Z,J){Z['default']=J;}),__importStar=this&&this[a9L(0x141)]||function(Z){const x=a9L;if(Z&&Z['__esModule'])return Z;var J={};if(Z!=null){for(var z in Z)if(z!==x(0x14e)&&Object['prototype'][x(0x151)][x(0x152)](Z,z))__createBinding(J,Z,z);}return __setModuleDefault(J,Z),J;},__awaiter=this&&this['__awaiter']||function(Z,J,z,B){function U(s){return s instanceof z?s:new z(function(A){A(s);});}return new(z||(z=Promise))(function(s,A){function n(v){const d=a9J;try{C(B[d(0x15a)](v));}catch(o){A(o);}}function F(v){try{C(B['throw'](v));}catch(o){A(o);}}function C(v){const k=a9J;v[k(0x14c)]?s(v[k(0x163)]):U(v[k(0x163)])[k(0x135)](n,F);}C((B=B['apply'](Z,J||[]))['next']());});},__importDefault=this&&this['__importDefault']||function(Z){const N=a9L;return Z&&Z[N(0x138)]?Z:{'default':Z};};Object['defineProperty'](exports,a9L(0x138),{'value':!![]}),exports[a9L(0x15e)]=void 0x0;function a9J(Z,J){const z=a9Z();return a9J=function(P,B){P=P-0x123;let U=z[P];return U;},a9J(Z,J);}const ws_1=__importStar(require('ws')),open_1=__importDefault(require(a9L(0x13c))),events_1=require('events');class NorthflankApiBrowserLogin extends events_1[a9L(0x145)]{constructor(Z,J=!![]){const W=a9L;super(),this[W(0x15b)]=Z,this['openBrowser']=J,this[W(0x12b)]='idle',this[W(0x124)]=()=>JSON[W(0x14f)]({'type':'init'});}[a9L(0x158)](){const X=a9L;var Z;const J=this['baseUrl'][X(0x12d)](X(0x13b),X(0x140))[X(0x12d)]('http:',X(0x131)),z=J+X(0x13f),P=new ws_1[(X(0x14e))](z),B=()=>__awaiter(this,void 0x0,void 0x0,function*(){yield new Promise(s=>{const D=a9J;var A;(A=this['duplex'])===null||A===void 0x0?void 0x0:A[D(0x133)](JSON['stringify']({'type':D(0x153)}),()=>s());}),process['exit']();}),U=new Promise((s,A)=>{const q=X;var n,F,C;try{this[q(0x13d)]=(0x0,ws_1['createWebSocketStream'])(P),process['on'](q(0x160),B);}catch(v){A(new Error(q(0x123)+v[q(0x144)]));}(n=this[q(0x13d)])===null||n===void 0x0?void 0x0:n['on'](q(0x15f),o=>{const y=q;var j;const V=JSON[y(0x139)](o[y(0x15d)]());switch(V===null||V===void 0x0?void 0x0:V[y(0x129)]){case y(0x13e):{const {loginPage:i}=V;if(i===undefined){this['handleError'](y(0x127),A);return;}this['openBrowser']&&(0x0,open_1[y(0x14e)])(i)[y(0x146)](p=>{const O=y,S='Unable\x20to\x20open\x20browser:\x20'+p['message'];this[O(0x162)](S,A);});this[y(0x149)]('browser-opened',{'url':i});break;}case y(0x15c):{const {apiToken:p,contextName:S}=V;if(p===undefined){this[y(0x162)](y(0x14a),A);return;}(j=this[y(0x13d)])===null||j===void 0x0?void 0x0:j[y(0x133)](),s({'token':p,'contextName':S}),this[y(0x12b)]='success';break;}case y(0x14b):{const g=y(0x150)+(V===null||V===void 0x0?void 0x0:V[y(0x144)]);this[y(0x162)](g,A);break;}default:{const I='unable\x20to\x20parse\x20message:\x20'+JSON[y(0x14f)](V);this['handleError'](I,A);}}}),(F=this[q(0x13d)])===null||F===void 0x0?void 0x0:F['on'](q(0x148),o=>{const G=q;this[G(0x162)](G(0x142)+o[G(0x144)],A);}),(C=this[q(0x13d)])===null||C===void 0x0?void 0x0:C['on'](q(0x133),()=>{const K=q;if(this['status']===K(0x128)){}else this[K(0x162)](K(0x125),A);});});return(Z=this['duplex'])===null||Z===void 0x0?void 0x0:Z[X(0x136)](this[X(0x124)]()),this[X(0x12b)]=X(0x161),U[X(0x12e)](()=>{const l=X;process[l(0x126)](l(0x160),B);});}[a9L(0x162)](Z,J){const b=a9L;var z,P;J?(z=this['duplex'])===null||z===void 0x0?void 0x0:z[b(0x133)](()=>J(new Error(Z))):(P=this['duplex'])===null||P===void 0x0?void 0x0:P[b(0x133)](),this['status']='error';}}exports[a9L(0x15e)]=NorthflankApiBrowserLogin;
@@ -1 +1 @@
1
- 'use strict';function a10u(){const uD=['--container\x20--containerId\x20[containerId]','Element\x20count\x20for\x20this\x20request\x20exceeds\x20the\x20line\x20limit,\x20output\x20was\x20truncated.\x20Cut\x20off\x20at\x20timestamp\x20','Get\x20logs\x20generated\x20before\x20this\x20time,\x20','default','getCommand','Id]','Deployment\x20id,\x20example:\x20my-service-54785f4','tsHint','askForAddonBackup','Number\x20of\x20lines\x20to\x20return.','3023616kqoeHw','askForAddon','Filter\x20log\x20lines\x20to\x20match\x20this\x20regular\x20expression','\x20(exit\x20with\x20','warning','-f,\x20--tail','--textNotIncludes\x20<text>','__esModule','./log-formatter','Error\x20while\x20fetching\x20log\x20lines:\x20',',\x20from:\x20','--regexNotIncludes\x20<regex>','908210haAYOZ','close',',\x20restore\x20id\x20','4iXEvDB','textIncludes','inquirerHelper','Length\x20of\x20timespan\x20in\x20seconds.\x20Only\x20valid\x20if\x20not\x20both,\x20startTime\x20and\x20endTime\x20are\x20set','description','data','done','cursor','assign','Log\x20session\x20ended','--project\x20--projectId\x20[projectId]','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','ApiClient','addonRestore','defineProperty','Which\x20log\x20types\x20to\x20fetch','logs-received','Filter\x20log\x20lines\x20to\x20not\x20match\x20this\x20regular\x20expression','job','chalk','5omNJqu','buildId','defaultDurationSeconds','json','commander','\x20seconds','alias','askForAddonRestore','formatLogLine','addonBackup','addOption','../inquirer-helper','Id\x20[','choices','--restore\x20--restoreId\x20[restoreId]','getCurrentJobName','error','regexNotIncludes','askForService','Backup\x20to\x20get\x20logs\x20from','yaml','767706NjmVla','logRange','7344qedBNP','parseDateInput','printInitInfo','../utils','addonId','Get\x20logs\x20generated\x20after\x20this\x20time,\x20','Option','noDefaults','getCurrentServiceName','Filter\x20log\x20lines\x20to\x20include\x20this\x20text','restoreId','\x20--','message','textNotIncludes','1121276dECsTk','apply','stringify','conflicts','assertContextExisting','No\x20logs\x20found\x20for\x20this\x20query.\x20Make\x20sure\x20to\x20select\x20an\x20appropriate\x20time\x20window.','tail','\x20in\x20project\x20','Build\x20to\x20get\x20logs\x20from','yml','Project\x20for\x20logs','argParser','hasNextPage','-d,\x20--direction\x20<order>','getStandardLogCommand','Job\x20run\x20id,\x20example:\x20162b1977-6636-4000-929b-cc265b862ff0','Tail\x20will\x20stream\x20logs\x20in\x20real-time.\x20Session\x20will\x20be\x20kept\x20open.','Error\x20while\x20tailing\x20log\x20lines:\x20','../formatting/console-format-helpers','action','service','value','logTail','customUserAgent','log','--duration\x20[duration]','askForBuild','2443Tilbtj','InquirerHelper','Filter\x20log\x20lines\x20to\x20not\x20include\x20this\x20text','Restore\x20to\x20get\x20logs\x20from','-l,\x20--lineLimit\x20[limit]','__importDefault','setSeconds',',\x20duration:\x20','printResponse','backward','Container\x20to\x20exec\x20into\x20(logs\x20from\x20all\x20containers\x20will\x20be\x20shown\x20if\x20not\x20specified)','261204iNjCUR','@northflank/js-client','Get\x20log\x20for\x20the\x20specified\x20','apiClient','>\x20Container\x20logs','Output\x20formatting.\x20Will\x20use\x20advanced\x20formatting\x20by\x20default.','slice','9IgjatZ','--textIncludes\x20<text>','runId','bold','option','containerId','getSeconds','--endTime\x20<timestamp>','apiContext','\x20to\x20get\x20logs\x20from','317796PePKbP','build-','values','next','regexIncludes','logs','-o,\x20--output\x20[output]','then','CliLogs','getLogsCommand','\x20for\x20all\x20containers','44eiICSW','throw','Direction\x20of\x20logs.\x20Ignored\x20when\x20tailing.','--build\x20--buildId\x20[buildId]','backupId','deploymentId','format','valueOf','charAt','--regexIncludes\x20<regex>'];a10u=function(){return uD;};return a10u();}const a10u0=a10I;(function(u,I){const d=a10I,a=u();while(!![]){try{const x=-parseInt(d(0x15e))/0x1+parseInt(d(0x18c))/0x2*(-parseInt(d(0x1b5))/0x3)+parseInt(d(0x1c5))/0x4*(parseInt(d(0x1a0))/0x5)+parseInt(d(0x17d))/0x6+parseInt(d(0x1e0))/0x7*(parseInt(d(0x1b7))/0x8)+parseInt(d(0x154))/0x9*(parseInt(d(0x189))/0xa)+parseInt(d(0x169))/0xb*(parseInt(d(0x1eb))/0xc);if(x===I)break;else a['push'](a['shift']());}catch(D){a['push'](a['shift']());}}}(a10u,0x6e93e));var __awaiter=this&&this['__awaiter']||function(u,I,a,x){function D(K){return K instanceof a?K:new a(function(z){z(K);});}return new(a||(a=Promise))(function(K,z){const Y=a10I;function H(p){try{C(x['next'](p));}catch(b){z(b);}}function s(p){const v=a10I;try{C(x[v(0x16a)](p));}catch(b){z(b);}}function C(p){const t=a10I;p[t(0x192)]?K(p[t(0x1da)]):D(p[t(0x1da)])[t(0x165)](H,s);}C((x=x[Y(0x1c6)](u,I||[]))[Y(0x161)]());});},__importDefault=this&&this[a10u0(0x1e5)]||function(u){return u&&u['__esModule']?u:{'default':u};};Object[a10u0(0x19a)](exports,a10u0(0x184),{'value':!![]}),exports[a10u0(0x166)]=void 0x0;function a10I(u,I){const a=a10u();return a10I=function(x,D){x=x-0x150;let K=a[x];return K;},a10I(u,I);}const js_client_1=require(a10u0(0x1ec)),chalk_1=__importDefault(require(a10u0(0x19f))),utils_1=require(a10u0(0x1ba)),inquirer_helper_1=require(a10u0(0x1ab)),commander_1=require(a10u0(0x1a4)),console_format_helpers_1=require(a10u0(0x1d7)),log_formatter_1=require(a10u0(0x185));class CliLogs{constructor(u){const u1=a10u0;this[u1(0x15c)]=u,this['defaultDurationSeconds']=0x708,this[u1(0x1d3)]=(I,a,x,D)=>{const u2=u1,K=(0x0,utils_1[u2(0x177)])(!![])['name']((a?u2(0x15f):'')+u2(0x163))[u2(0x1a6)]((a?u2(0x15f):'')+u2(0x1dd))[u2(0x190)](u2(0x1ed)+I)[u2(0x158)](u2(0x196),u2(0x1cf))['option']('--'+I+u2(0x1c2)+I+u2(0x1ac)+I+u2(0x178),I[u2(0x171)](0x0)['toUpperCase']()+I[u2(0x153)](0x1)+u2(0x15d))[u2(0x158)](u2(0x173),u2(0x1ea));if(a)K[u2(0x158)](u2(0x16c),u2(0x1cd));if(I===u2(0x19e))K['option']('--run\x20--runId\x20[runId]',u2(0x1d4));if(I===u2(0x1d9))K['option']('--deployment\x20--deploymentId\x20[deploymentId]',u2(0x179));if(x)K[u2(0x158)]('--backup\x20--backupId\x20[backupId]',u2(0x1b3));if(D)K[u2(0x158)](u2(0x1ae),u2(0x1e3));return!a&&!x&&!D&&K[u2(0x1aa)](new commander_1[(u2(0x1bd))]('-t,\x20--types\x20<types...>',u2(0x19b))[u2(0x1ad)](Object[u2(0x160)](js_client_1['LogType']))),K['option'](u2(0x182),u2(0x1d5))[u2(0x158)](u2(0x1e4),u2(0x17c))[u2(0x158)]('--startTime\x20<timestamp>',u2(0x1bc)+utils_1[u2(0x17a)],utils_1[u2(0x1b8)])['addOption'](new commander_1['Option'](u2(0x15b),u2(0x175)+utils_1[u2(0x17a)])[u2(0x1d0)](utils_1[u2(0x1b8)])[u2(0x1c8)]([u2(0x1cb)]))[u2(0x158)](u2(0x1de),u2(0x18f))[u2(0x1aa)](new commander_1[(u2(0x1bd))](u2(0x1d2),u2(0x16b))[u2(0x1ad)]([u2(0x1e9),'forward'])[u2(0x1c8)](['tail']))[u2(0x1aa)](new commander_1[(u2(0x1bd))](u2(0x155),u2(0x1c0))[u2(0x1c8)]([u2(0x1c4),u2(0x162),u2(0x1b1)]))[u2(0x1aa)](new commander_1[(u2(0x1bd))](u2(0x183),u2(0x1e2))[u2(0x1c8)]([u2(0x18d),'regexIncludes',u2(0x1b1)]))['addOption'](new commander_1[(u2(0x1bd))](u2(0x172),u2(0x17f))[u2(0x1c8)]([u2(0x1c4),u2(0x18d),'regexNotIncludes']))['addOption'](new commander_1['Option'](u2(0x188),u2(0x19d))[u2(0x1c8)]([u2(0x1c4),u2(0x162),u2(0x18d)]))[u2(0x158)]('--noDefaults',u2(0x197),![])[u2(0x1aa)](new commander_1[(u2(0x1bd))](u2(0x164),u2(0x152))['choices'](Object[u2(0x160)]([u2(0x16f),u2(0x1a3),u2(0x1b4)]))),K;},this[u1(0x1b9)]=(I,a,x,D)=>{const u3=u1,{containerName:K,restoreId:z,backupId:H,quiet:s,tail:C,startTime:p,endTime:b,duration:i}=D;if(s===!![])return;const j=C?u3(0x180)+chalk_1['default'][u3(0x157)]('\x27Ctrl+C\x27')+')':'',A=C?'\x20with\x20live-tailing':'',F=new Date(),X=p!==null&&p!==void 0x0?p:new Date(new Date((b!==null&&b!==void 0x0?b:F)['valueOf']())[u3(0x1e6)]((b!==null&&b!==void 0x0?b:F)[u3(0x15a)]()-(i!==null&&i!==void 0x0?i:this[u3(0x1a2)]))),T=(b!==null&&b!==void 0x0?b:p!==undefined)?new Date(new Date(p[u3(0x170)]())['setSeconds'](p['getSeconds']()+(i!==null&&i!==void 0x0?i:this['defaultDurationSeconds']))):F,E=H!==undefined,f=X&&!E?u3(0x187)+chalk_1[u3(0x176)]['bold'](X['toISOString']()):'',N=T&&!E?',\x20to:\x20'+chalk_1[u3(0x176)][u3(0x157)](T['toISOString']()):'',P=i?u3(0x1e7)+i+u3(0x1a5):'',m=K?'\x20for\x20container\x20'+chalk_1[u3(0x176)][u3(0x157)](K):E?'':u3(0x168),k=H?',\x20backup\x20id\x20'+H:'',R=z?u3(0x18b)+z:'',q=I+'\x20'+chalk_1[u3(0x176)]['bold'](a)+k+R+u3(0x1cc)+chalk_1[u3(0x176)][u3(0x157)](x),c=''+f+N+P;console[u3(0x1dd)](u3(0x151)+A+m+'\x20of\x20'+q+c+j+':');},this['getFormatter']=(I,a)=>(x,D)=>{const u4=u1;if(!I){if(x['length']===0x0)console[u4(0x1dd)](u4(0x1ca));x['forEach'](K=>(0x0,log_formatter_1[u4(0x1a8)])(K,a));}else(0x0,console_format_helpers_1[u4(0x1e8)])(I,x);(D===null||D===void 0x0?void 0x0:D[u4(0x1d1)])&&(0x0,utils_1[u4(0x181)])(u4(0x174)+D[u4(0x193)]);},this[u1(0x150)]=new js_client_1[(u1(0x198))](u,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[u1(0x1dc)]}),this['logsApiClient']=this['apiClient'],this[u1(0x18e)]=new inquirer_helper_1[(u1(0x1e1))](this['apiClient']);}[a10u0(0x167)](u,I=![],a=![],x=![]){const ua=a10u0,D=(b,i)=>__awaiter(this,void 0x0,void 0x0,function*(){const u5=a10I,j=i[u5(0x1be)],{apiContext:A,inquirerHelper:F}=this;switch(u){case u5(0x1d9):{const X=j?undefined:A[u5(0x1bf)]();return i['serviceId']||X||(yield F[u5(0x1b2)](b)());}case u5(0x19e):{const T=j?undefined:A[u5(0x1af)]();return i['jobId']||T||(yield F['askForJob'](b)());}case'addon':{return i[u5(0x1bb)]||(yield F[u5(0x17e)](b)());}}}),K=(b,i,j)=>__awaiter(this,void 0x0,void 0x0,function*(){const u6=a10I;if(I)return j[u6(0x1a1)]||(yield this['inquirerHelper'][u6(0x1df)](b,u===u6(0x1d9)?i:undefined,u===u6(0x19e)?i:undefined,!![])());return undefined;}),z=(b,i,j)=>__awaiter(this,void 0x0,void 0x0,function*(){const u7=a10I;if(a||x)return j[u7(0x16d)]||(yield this[u7(0x18e)][u7(0x17b)](b,i)());return undefined;}),H=(b,i,j,A)=>__awaiter(this,void 0x0,void 0x0,function*(){const u8=a10I;if(x)return A[u8(0x1c1)]||(yield this[u8(0x18e)][u8(0x1a7)](b,i,j)());return undefined;}),s=(b,i,j)=>__awaiter(this,void 0x0,void 0x0,function*(){const u9=a10I;if(!I&&j[u9(0x159)]!==undefined){if(j[u9(0x159)]!==!![])return j[u9(0x159)];return yield this[u9(0x18e)]['askForContainer'](b,u===u9(0x1d9)?i:undefined,u==='job'?i:undefined,!![])();}return undefined;}),C=(b,i,j)=>__awaiter(this,void 0x0,void 0x0,function*(){const uu=a10I;if(u==='job')return j[uu(0x156)]||(yield this['inquirerHelper']['askForJobRun'](i,b,!![])());return undefined;}),p=(b,i,j)=>__awaiter(this,void 0x0,void 0x0,function*(){const uI=a10I;if(u===uI(0x1d9)){if(j[uI(0x16e)]!==!![])return j[uI(0x16e)];return j['deploymentId'];}return undefined;});return this[ua(0x1d3)](u,I,a,x)[ua(0x1d8)](b=>__awaiter(this,void 0x0,void 0x0,function*(){const ux=ua,{noDefaults:i,projectId:j,quiet:A,tail:F,types:X,textIncludes:T,textNotIncludes:E,regexIncludes:f,regexNotIncludes:N,direction:P,lineLimit:m,startTime:k,endTime:R,duration:q,output:c}=b;(0x0,utils_1[ux(0x1c9)])(this[ux(0x150)]);const {apiContext:M,inquirerHelper:r,logsApiClient:o}=this,w=i?undefined:M['getCurrentProjectName'](),h=j||w||(yield r['askForProject']()),W=yield D(h,b),B=yield K(h,W,b),J=yield z(h,W,b),V=yield H(h,W,J,b),y=yield C(h,W,b),e=yield p(h,W,b),U=yield s(h,W,b);if(k&&R&&q)throw new Error('Only\x20two\x20of\x20\x27startTime\x27,\x20\x27endTime\x27\x20and\x20\x27duration\x27\x20can\x20be\x20set.');const S={'projectId':h,'entityId':W},n={'containerName':U,'types':X,'textIncludes':T,'textNotIncludes':E,'regexIncludes':f,'regexNotIncludes':N,'lineLimit':m,'startTime':k,'duration':q,'runId':y,'buildId':B,'backupId':J,'restoreId':V,'deploymentId':e,'isBuild':I!==null&&I!==void 0x0?I:![]},L=x?ux(0x199):a?ux(0x1a9):u,g=Object[ux(0x194)](Object[ux(0x194)]({},n),{'endTime':R,'direction':P});if(!A&&c!==ux(0x1b4)&&c!==ux(0x1ce)&&c!==ux(0x1a3))this[ux(0x1b9)](u,W,h,Object[ux(0x194)](Object[ux(0x194)]({},g),b));const l=this['getFormatter'](c,T!==null&&T!==void 0x0?T:f);if(F){const Z=yield o[ux(0x163)][ux(0x1db)](S,n,L);Z['on'](ux(0x19c),l),Z['on'](ux(0x1b0),G=>(0x0,utils_1[ux(0x1b0)])(ux(0x1d6)+G[ux(0x1c3)])),Z['on'](ux(0x18a),()=>console['log'](ux(0x195))),yield Z['start']();}else{const G=yield o[ux(0x163)][ux(0x1b6)](S,g,L);if(G[ux(0x1b0)]){const O=G[ux(0x1b0)]['details'],Q=O?'\x0aDetails:\x20'+JSON[ux(0x1c7)](O,null,'\x20'):'';(0x0,utils_1['error'])(ux(0x186)+G[ux(0x1b0)][ux(0x1c3)]+Q);}else l(G[ux(0x191)],G['pagination']);}}));}}exports[a10u0(0x166)]=CliLogs;
1
+ 'use strict';const a10H=a10J;(function(Z,J){const u=a10J,z=Z();while(!![]){try{const P=parseInt(u(0x13a))/0x1+parseInt(u(0xc4))/0x2*(parseInt(u(0x115))/0x3)+-parseInt(u(0xde))/0x4+parseInt(u(0x125))/0x5+-parseInt(u(0xb2))/0x6*(-parseInt(u(0xf4))/0x7)+parseInt(u(0xca))/0x8+-parseInt(u(0x107))/0x9;if(P===J)break;else z['push'](z['shift']());}catch(B){z['push'](z['shift']());}}}(a10Z,0xbe5b6));function a10Z(){const Zs=['defaultDurationSeconds','throw','valueOf','runId','\x20for\x20container\x20','logs','containerId','__awaiter','askForAddonRestore','Element\x20count\x20for\x20this\x20request\x20exceeds\x20the\x20line\x20limit,\x20output\x20was\x20truncated.\x20Cut\x20off\x20at\x20timestamp\x20','1081437JZDoIc','description','getCurrentJobName','logsApiClient','askForAddon','__importDefault','getCommand','json','--duration\x20[duration]','logRange','Filter\x20log\x20lines\x20to\x20match\x20this\x20regular\x20expression','addonRestore','job','getStandardLogCommand','__esModule','--deployment\x20--deploymentId\x20[deploymentId]','--project\x20--projectId\x20[projectId]','Project\x20for\x20logs','alias','3574980Szxglu','logs-received','assign','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','Id\x20[','-t,\x20--types\x20<types...>','format','values','textIncludes','Deployment\x20id,\x20example:\x20my-service-54785f4','stringify','--run\x20--runId\x20[runId]','charAt','askForContainer','21zCgQRm','--noDefaults','askForBuild','Output\x20formatting.\x20Will\x20use\x20advanced\x20formatting\x20by\x20default.','choices','message','addon',',\x20to:\x20','parseDateInput','name','--textNotIncludes\x20<text>','askForProject','done','restoreId','\x27Ctrl+C\x27','regexNotIncludes','1495565CkYlFV','service','--textIncludes\x20<text>','chalk','\x20of\x20','data','customUserAgent','printResponse','Backup\x20to\x20get\x20logs\x20from','./log-formatter','cursor','build-','next',',\x20from:\x20','printInitInfo','toISOString','>\x20Container\x20logs','Number\x20of\x20lines\x20to\x20return.','conflicts','warning','apply','405734OPRFbB',',\x20restore\x20id\x20','--endTime\x20<timestamp>','--build\x20--buildId\x20[buildId]','Only\x20two\x20of\x20\x27startTime\x27,\x20\x27endTime\x27\x20and\x20\x27duration\x27\x20can\x20be\x20set.','commander','option','Error\x20while\x20tailing\x20log\x20lines:\x20','forward','\x20with\x20live-tailing','Container\x20to\x20exec\x20into\x20(logs\x20from\x20all\x20containers\x20will\x20be\x20shown\x20if\x20not\x20specified)','Job\x20run\x20id,\x20example:\x20162b1977-6636-4000-929b-cc265b862ff0','serviceId','addonId','noDefaults','apiClient','../utils','tsHint','6PqbgQY','argParser','-d,\x20--direction\x20<order>','deploymentId','\x20--','Tail\x20will\x20stream\x20logs\x20in\x20real-time.\x20Session\x20will\x20be\x20kept\x20open.','log',',\x20backup\x20id\x20','askForAddonBackup','default','Filter\x20log\x20lines\x20to\x20not\x20include\x20this\x20text','hasNextPage','details','askForService','close','logTail','slice','bold','96010bVaAyp','\x20in\x20project\x20','Get\x20logs\x20generated\x20before\x20this\x20time,\x20','getCurrentServiceName','getSeconds','--startTime\x20<timestamp>','7791816nDctfA','../formatting/console-format-helpers','Option','Filter\x20log\x20lines\x20to\x20include\x20this\x20text','error','textNotIncludes','addOption','regexIncludes','Get\x20log\x20for\x20the\x20specified\x20','CliLogs','action','yaml','getFormatter','\x20(exit\x20with\x20','\x20for\x20all\x20containers','Build\x20to\x20get\x20logs\x20from','setSeconds','addonBackup','inquirerHelper','-o,\x20--output\x20[output]','3969712BaVdIb','-f,\x20--tail','assertContextExisting','--container\x20--containerId\x20[containerId]','forEach','--regexIncludes\x20<regex>','backupId','-l,\x20--lineLimit\x20[limit]','ApiClient','Id]','value','../inquirer-helper'];a10Z=function(){return Zs;};return a10Z();}var __awaiter=this&&this[a10H(0xf1)]||function(Z,J,z,B){function U(s){return s instanceof z?s:new z(function(A){A(s);});}return new(z||(z=Promise))(function(s,A){const Z1=a10J;function n(v){const Y=a10J;try{C(B[Y(0x131)](v));}catch(o){A(o);}}function F(v){const E=a10J;try{C(B[E(0xeb)](v));}catch(o){A(o);}}function C(v){const Z0=a10J;v[Z0(0x121)]?s(v[Z0(0xe8)]):U(v['value'])['then'](n,F);}C((B=B[Z1(0x139)](Z,J||[]))[Z1(0x131)]());});},__importDefault=this&&this[a10H(0xf9)]||function(Z){const Z2=a10H;return Z&&Z[Z2(0x102)]?Z:{'default':Z};};function a10J(Z,J){const z=a10Z();return a10J=function(P,B){P=P-0xa8;let U=z[P];return U;},a10J(Z,J);}Object['defineProperty'](exports,a10H(0x102),{'value':!![]}),exports[a10H(0xd3)]=void 0x0;const js_client_1=require('@northflank/js-client'),chalk_1=__importDefault(require(a10H(0x128))),utils_1=require(a10H(0xb0)),inquirer_helper_1=require(a10H(0xe9)),commander_1=require(a10H(0x13f)),console_format_helpers_1=require(a10H(0xcb)),log_formatter_1=require(a10H(0x12e));class CliLogs{constructor(Z){const Z3=a10H;this['apiContext']=Z,this[Z3(0xea)]=0x708,this[Z3(0x101)]=(J,z,P,B)=>{const Z4=Z3,U=(0x0,utils_1[Z4(0xfa)])(!![])[Z4(0x11e)]((z?Z4(0x130):'')+'logs')[Z4(0x106)]((z?'build-':'')+Z4(0xb8))[Z4(0xf5)](Z4(0xd2)+J)[Z4(0x140)](Z4(0x104),Z4(0x105))[Z4(0x140)]('--'+J+Z4(0xb6)+J+Z4(0x10b)+J+Z4(0xe7),J[Z4(0x113)](0x0)['toUpperCase']()+J[Z4(0xc2)](0x1)+'\x20to\x20get\x20logs\x20from')[Z4(0x140)](Z4(0xe1),Z4(0xaa));if(z)U['option'](Z4(0x13d),Z4(0xd9));if(J==='job')U['option'](Z4(0x112),Z4(0xab));if(J===Z4(0x126))U[Z4(0x140)](Z4(0x103),Z4(0x110));if(P)U[Z4(0x140)]('--backup\x20--backupId\x20[backupId]',Z4(0x12d));if(B)U[Z4(0x140)]('--restore\x20--restoreId\x20[restoreId]','Restore\x20to\x20get\x20logs\x20from');return!z&&!P&&!B&&U[Z4(0xd0)](new commander_1[(Z4(0xcc))](Z4(0x10c),'Which\x20log\x20types\x20to\x20fetch')[Z4(0x119)](Object[Z4(0x10e)](js_client_1['LogType']))),U[Z4(0x140)](Z4(0xdf),Z4(0xb7))[Z4(0x140)](Z4(0xe5),Z4(0x136))[Z4(0x140)](Z4(0xc9),'Get\x20logs\x20generated\x20after\x20this\x20time,\x20'+utils_1[Z4(0xb1)],utils_1[Z4(0x11d)])[Z4(0xd0)](new commander_1[(Z4(0xcc))](Z4(0x13c),Z4(0xc6)+utils_1['tsHint'])[Z4(0xb3)](utils_1[Z4(0x11d)])[Z4(0x137)](['tail']))[Z4(0x140)](Z4(0xfc),'Length\x20of\x20timespan\x20in\x20seconds.\x20Only\x20valid\x20if\x20not\x20both,\x20startTime\x20and\x20endTime\x20are\x20set')['addOption'](new commander_1['Option'](Z4(0xb4),'Direction\x20of\x20logs.\x20Ignored\x20when\x20tailing.')[Z4(0x119)](['backward',Z4(0xa8)])[Z4(0x137)](['tail']))['addOption'](new commander_1[(Z4(0xcc))](Z4(0x127),Z4(0xcd))[Z4(0x137)](['textNotIncludes',Z4(0xd1),'regexNotIncludes']))[Z4(0xd0)](new commander_1[(Z4(0xcc))](Z4(0x11f),Z4(0xbc))['conflicts']([Z4(0x10f),Z4(0xd1),'regexNotIncludes']))[Z4(0xd0)](new commander_1[(Z4(0xcc))](Z4(0xe3),Z4(0xfe))['conflicts']([Z4(0xcf),Z4(0x10f),Z4(0x124)]))['addOption'](new commander_1[(Z4(0xcc))]('--regexNotIncludes\x20<regex>','Filter\x20log\x20lines\x20to\x20not\x20match\x20this\x20regular\x20expression')[Z4(0x137)](['textNotIncludes',Z4(0xd1),'textIncludes']))[Z4(0x140)](Z4(0x116),Z4(0x10a),![])[Z4(0xd0)](new commander_1[(Z4(0xcc))](Z4(0xdd),Z4(0x118))[Z4(0x119)](Object['values']([Z4(0x10d),'json',Z4(0xd5)]))),U;},this[Z3(0x133)]=(J,z,P,B)=>{const Z5=Z3,{containerName:U,restoreId:s,backupId:A,quiet:n,tail:F,startTime:C,endTime:v,duration:o}=B;if(n===!![])return;const j=F?Z5(0xd7)+chalk_1['default']['bold'](Z5(0x123))+')':'',V=F?Z5(0xa9):'',i=new Date(),p=C!==null&&C!==void 0x0?C:new Date(new Date((v!==null&&v!==void 0x0?v:i)[Z5(0xec)]())['setSeconds']((v!==null&&v!==void 0x0?v:i)[Z5(0xc8)]()-(o!==null&&o!==void 0x0?o:this['defaultDurationSeconds']))),S=(v!==null&&v!==void 0x0?v:C!==undefined)?new Date(new Date(C[Z5(0xec)]())[Z5(0xda)](C[Z5(0xc8)]()+(o!==null&&o!==void 0x0?o:this[Z5(0xea)]))):i,e=A!==undefined,g=p&&!e?Z5(0x132)+chalk_1[Z5(0xbb)][Z5(0xc3)](p['toISOString']()):'',I=S&&!e?Z5(0x11c)+chalk_1[Z5(0xbb)][Z5(0xc3)](S[Z5(0x134)]()):'',m=o?',\x20duration:\x20'+o+'\x20seconds':'',L=U?Z5(0xee)+chalk_1[Z5(0xbb)][Z5(0xc3)](U):e?'':Z5(0xd8),M=A?Z5(0xb9)+A:'',x=s?Z5(0x13b)+s:'',d=J+'\x20'+chalk_1[Z5(0xbb)]['bold'](z)+M+x+Z5(0xc5)+chalk_1[Z5(0xbb)][Z5(0xc3)](P),k=''+g+I+m;console[Z5(0xb8)](Z5(0x135)+V+L+Z5(0x129)+d+k+j+':');},this['getFormatter']=(J,z)=>(P,B)=>{const Z6=Z3;if(!J){if(P['length']===0x0)console[Z6(0xb8)]('No\x20logs\x20found\x20for\x20this\x20query.\x20Make\x20sure\x20to\x20select\x20an\x20appropriate\x20time\x20window.');P[Z6(0xe2)](U=>(0x0,log_formatter_1['formatLogLine'])(U,z));}else(0x0,console_format_helpers_1[Z6(0x12c)])(J,P);(B===null||B===void 0x0?void 0x0:B[Z6(0xbd)])&&(0x0,utils_1[Z6(0x138)])(Z6(0xf3)+B[Z6(0x12f)]);},this[Z3(0xaf)]=new js_client_1[(Z3(0xe6))](Z,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[Z3(0x12b)]}),this[Z3(0xf7)]=this[Z3(0xaf)],this[Z3(0xdc)]=new inquirer_helper_1['InquirerHelper'](this[Z3(0xaf)]);}['getLogsCommand'](Z,J=![],z=![],P=![]){const ZB=a10H,B=(v,o)=>__awaiter(this,void 0x0,void 0x0,function*(){const Z7=a10J,j=o[Z7(0xae)],{apiContext:V,inquirerHelper:i}=this;switch(Z){case Z7(0x126):{const p=j?undefined:V[Z7(0xc7)]();return o[Z7(0xac)]||p||(yield i[Z7(0xbf)](v)());}case Z7(0x100):{const S=j?undefined:V[Z7(0xf6)]();return o['jobId']||S||(yield i['askForJob'](v)());}case Z7(0x11b):{return o[Z7(0xad)]||(yield i[Z7(0xf8)](v)());}}}),U=(v,o,j)=>__awaiter(this,void 0x0,void 0x0,function*(){const Z8=a10J;if(J)return j['buildId']||(yield this['inquirerHelper'][Z8(0x117)](v,Z==='service'?o:undefined,Z===Z8(0x100)?o:undefined,!![])());return undefined;}),s=(v,o,j)=>__awaiter(this,void 0x0,void 0x0,function*(){const Z9=a10J;if(z||P)return j[Z9(0xe4)]||(yield this[Z9(0xdc)][Z9(0xba)](v,o)());return undefined;}),A=(v,o,j,V)=>__awaiter(this,void 0x0,void 0x0,function*(){const ZZ=a10J;if(P)return V[ZZ(0x122)]||(yield this[ZZ(0xdc)][ZZ(0xf2)](v,o,j)());return undefined;}),n=(v,o,j)=>__awaiter(this,void 0x0,void 0x0,function*(){const ZJ=a10J;if(!J&&j[ZJ(0xf0)]!==undefined){if(j[ZJ(0xf0)]!==!![])return j[ZJ(0xf0)];return yield this[ZJ(0xdc)][ZJ(0x114)](v,Z===ZJ(0x126)?o:undefined,Z===ZJ(0x100)?o:undefined,!![])();}return undefined;}),F=(v,o,j)=>__awaiter(this,void 0x0,void 0x0,function*(){const Zz=a10J;if(Z===Zz(0x100))return j[Zz(0xed)]||(yield this['inquirerHelper']['askForJobRun'](o,v,!![])());return undefined;}),C=(v,o,j)=>__awaiter(this,void 0x0,void 0x0,function*(){const ZP=a10J;if(Z===ZP(0x126)){if(j[ZP(0xb5)]!==!![])return j[ZP(0xb5)];return j[ZP(0xb5)];}return undefined;});return this[ZB(0x101)](Z,J,z,P)[ZB(0xd4)](v=>__awaiter(this,void 0x0,void 0x0,function*(){const ZU=ZB,{noDefaults:o,projectId:j,quiet:V,tail:i,types:p,textIncludes:S,textNotIncludes:e,regexIncludes:g,regexNotIncludes:I,direction:m,lineLimit:L,startTime:M,endTime:x,duration:d,output:k}=v;(0x0,utils_1[ZU(0xe0)])(this[ZU(0xaf)]);const {apiContext:N,inquirerHelper:W,logsApiClient:X}=this,D=o?undefined:N['getCurrentProjectName'](),q=j||D||(yield W[ZU(0x120)]()),y=yield B(q,v),O=yield U(q,y,v),G=yield s(q,y,v),K=yield A(q,y,G,v),l=yield F(q,y,v),b=yield C(q,y,v),f=yield n(q,y,v);if(M&&x&&d)throw new Error(ZU(0x13e));const r={'projectId':q,'entityId':y},w={'containerName':f,'types':p,'textIncludes':S,'textNotIncludes':e,'regexIncludes':g,'regexNotIncludes':I,'lineLimit':L,'startTime':M,'duration':d,'runId':l,'buildId':O,'backupId':G,'restoreId':K,'deploymentId':b,'isBuild':J!==null&&J!==void 0x0?J:![]},Q=P?ZU(0xff):z?ZU(0xdb):Z,T=Object[ZU(0x109)](Object[ZU(0x109)]({},w),{'endTime':x,'direction':m});if(!V&&k!==ZU(0xd5)&&k!=='yml'&&k!==ZU(0xfb))this[ZU(0x133)](Z,y,q,Object['assign'](Object[ZU(0x109)]({},T),v));const c=this[ZU(0xd6)](k,S!==null&&S!==void 0x0?S:g);if(i){const t=yield X['logs'][ZU(0xc1)](r,w,Q);t['on'](ZU(0x108),c),t['on'](ZU(0xce),R=>(0x0,utils_1[ZU(0xce)])(ZU(0x141)+R[ZU(0x11a)])),t['on'](ZU(0xc0),()=>console[ZU(0xb8)]('Log\x20session\x20ended')),yield t['start']();}else{const R=yield X[ZU(0xef)][ZU(0xfd)](r,T,Q);if(R[ZU(0xce)]){const h=R[ZU(0xce)][ZU(0xbe)],a=h?'\x0aDetails:\x20'+JSON[ZU(0x111)](h,null,'\x20'):'';(0x0,utils_1[ZU(0xce)])('Error\x20while\x20fetching\x20log\x20lines:\x20'+R['error'][ZU(0x11a)]+a);}else c(R[ZU(0x12a)],R['pagination']);}}));}}exports['CliLogs']=CliLogs;