@northflank/cli 0.10.7 → 0.10.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-helpers.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/context/contextCommands.js +1 -1
- package/dist/copy/index.js +1 -1
- package/dist/defaults.js +1 -1
- package/dist/exec/index.js +1 -1
- package/dist/formatting/command-overview.js +1 -1
- package/dist/formatting/console-format-helpers.js +1 -1
- package/dist/formatting/terminal-chart.js +1 -1
- package/dist/inquirer-helper.js +1 -1
- package/dist/login/browser-login.js +1 -1
- package/dist/logs/index.js +1 -1
- package/dist/logs/log-formatter.js +1 -1
- package/dist/metrics/index.js +1 -1
- package/dist/pagination/inquirer-pagination-prompt.js +1 -1
- package/dist/port-forward/index.js +1 -1
- package/dist/utils.js +1 -1
- package/package.json +17 -19
- package/postinstall.js +0 -16
package/dist/exec/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a5L=a5h;function a5j(){const C=['31150yakNyq','Exec\x20','rows',',\x20exit\x20code:\x20','without\x20shell','@northflank/js-client','\x20to\x20exec\x20into','service','Error\x20occured\x20during\x20','exec','getTerminalSize','Container\x20within\x20instance\x20to\x20exec\x20into\x20(if\x20not\x20specified,\x20first\x20container\x20of\x20the\x20instance\x20will\x20be\x20selected)','\x27Ctrl+D\x27','../inquirer-helper','with\x20command\x20\x27','Unknown','toUpperCase','with\x20group:','--group\x20[GROUP]','askForProject','Received\x20Ctrl+D\x20twice,\x20exiting\x20shell\x20forcefully.',',\x20details:\x20','description','instanceName','customUserAgent','--project\x20--projectId\x20[NAME]','isTTY','(only\x20applicable\x20for\x20custom\x20addon\x20types)\x20','InquirerHelper','chalk','done','getCurrentProjectName','exit','bold','\x20in\x20container\x20','323030EdzQut','Run\x20command\x20with\x20this\x20group','515925ZrFUWd','1600164etErdY','next','action','success','\x0a\x20\x20Single\x20command,\x20no\x20shell:\x20\x20\x20\x20\x20northflank\x20exec\x20','name','\x20--','Project\x20for\x20exec','60puIgtG','--container\x20--containerName\x20[NAME]','none','execCmd','stdOut','Command\x20to\x20execute.\x0aIf\x20--shell-cmd\x20option\x20such\x20as\x20\x27bash\x20-c\x27\x20is\x20present,\x20it\x20will\x20run\x20in\x20the\x20specified\x20shell.\x20Otherwise\x20the\x20command\x20will\x20run\x20without\x20a\x20shell.\x20If\x20no\x20command\x20is\x20provided,\x20an\x20interactive\x20session\x20with\x20stdin\x20and\x20tty\x20is\x20opened.','\x20--cmd\x20\x27\x22ls\x20-l\x20/usr\x22\x27\x20--shell-cmd\x20\x27bash\x20-c\x27\x0a\x20\x20Shell\x20session,\x20custom\x20shell:\x20\x20northflank\x20exec\x20','\x20in\x20project\x20','stdout','(random\x20instance\x20will\x20be\x20chosen\x20if\x20not\x20specified)','option','Id\x20[NAME]','execAddonSession','11VZUcYp','askForJob','488WEJBLg','addCommand','pipe','setRawMode','resizeTerminal','stdin','5bMsnWn','keypress','Instance\x20to\x20exec\x20into\x20','stdErr','Success','warning','Run\x20command\x20with\x20shell\x20(e.g.\x20\x27bash\x27,\x27sh\x27).\x0aIf\x20not\x20set\x20and\x20no\x20command\x20is\x20provided,\x20several\x20standard\x20shells\x20will\x20be\x20attempted.\x20If\x20not\x20set\x20and\x20a\x20command\x20is\x20provided,\x20the\x20command\x20will\x20run\x20without\x20shell.','with\x20user:','sequence','apiClient','getCurrentServiceName','containerName','job','--shell-cmd\x20[SHELL-CMD]','Run\x20command\x20with\x20this\x20user','getCommand','(exit\x20with\x20two\x20quick\x20','9067IqUyUf','__awaiter','message','\x20--cmd\x20\x27date\x27\x0a\x20\x20Single\x20command,\x20custom\x20shell:\x20northflank\x20exec\x20','resize','getStandardExecCommand','exitCode','--noDefaults','890778XOTrmV','charAt','greenBright','execJobSession','error','\x20command\x20exec:\x20','value','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','__esModule','defineProperty','addon','handleShellSession','default','log','Command\x20execution\x20(exec)\x20for\x20Northflank\x20services\x20and\x20jobs.','Command\x20exec\x20for\x20the\x20specified\x20','22HvCmya','shell\x20command\x20','CliExec','alias','askForAddon','throw','assertContextExisting','Command\x20didn\x27t\x20complete\x20successfully,\x20status:\x20','.\x0aExamples:\x0a\x20\x20Shell\x20session:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20northflank\x20exec\x20','askForService','execStartLog','execServiceSession','10936eCjfsH','join'];a5j=function(){return C;};return a5j();}(function(j,h){const k=a5h,N=j();while(!![]){try{const F=parseInt(k(0x1ca))/0x1*(-parseInt(k(0x1e2))/0x2)+-parseInt(k(0x21e))/0x3*(parseInt(k(0x1ee))/0x4)+-parseInt(k(0x1b9))/0x5*(-parseInt(k(0x1d2))/0x6)+parseInt(k(0x1f0))/0x7*(parseInt(k(0x1b3))/0x8)+parseInt(k(0x215))/0x9+-parseInt(k(0x213))/0xa*(parseInt(k(0x1b1))/0xb)+-parseInt(k(0x216))/0xc;if(F===h)break;else N['push'](N['shift']());}catch(K){N['push'](N['shift']());}}}(a5j,0x265f3));var __awaiter=this&&this[a5L(0x1cb)]||function(j,h,N,F){function K(G){return G instanceof N?G:new N(function(d){d(G);});}return new(N||(N=Promise))(function(G,d){function x(I){const A=a5h;try{e(F[A(0x217)](I));}catch(X){d(X);}}function m(I){const v=a5h;try{e(F[v(0x1e7)](I));}catch(X){d(X);}}function e(I){const s=a5h;I[s(0x20e)]?G(I[s(0x1d8)]):K(I['value'])['then'](x,m);}e((F=F['apply'](j,h||[]))['next']());});},__importDefault=this&&this['__importDefault']||function(j){const U=a5L;return j&&j[U(0x1da)]?j:{'default':j};};Object[a5L(0x1db)](exports,a5L(0x1da),{'value':!![]}),exports[a5L(0x1e4)]=void 0x0;function a5h(j,h){const N=a5j();return a5h=function(F,K){F=F-0x1ad;let G=N[F];return G;},a5h(j,h);}const js_client_1=require(a5L(0x1f5)),chalk_1=__importDefault(require(a5L(0x20d))),utils_1=require('../utils'),inquirer_helper_1=require(a5L(0x1fd));class CliExec{constructor(j,h){const r=a5L;this[r(0x1cf)]=d=>{const V=r,x=(0x0,utils_1[V(0x1c8)])(!![])[V(0x21b)](d)[V(0x206)](V(0x1e1)+d+(d===V(0x1dc)?V(0x20b):'')+V(0x1ea)+d+V(0x21a)+d+V(0x1cd)+d+V(0x224)+d+'\x20--shell-cmd\x20\x27sh\x27')[V(0x1ae)](V(0x209),V(0x21d))[V(0x1ae)]('--'+d+V(0x21c)+d+V(0x1af),d[V(0x1d3)](0x0)[V(0x200)]()+d['slice'](0x1)+V(0x1f6))['option']('--instance\x20--instanceName\x20[NAME]',V(0x1bb)+(d==='addon'?'(required)\x20':V(0x1ad)))[V(0x1ae)](V(0x1c6),V(0x1bf))['option'](V(0x1d1),V(0x1d9),![])[V(0x1ae)]('--cmd\x20--command\x20[COMMAND]',V(0x223));return d!=='addon'&&x['option']('--user\x20[USER]',V(0x1c7))[V(0x1ae)](V(0x202),V(0x214)),d===V(0x1dc)&&x[V(0x1ae)](V(0x21f),V(0x1fb)),x;},this[r(0x1fa)]=()=>({'columns':process[r(0x226)]['columns'],'rows':process[r(0x226)][r(0x1f2)]}),this[r(0x1ec)]=(d,x,m,P,e,I,X,l,p,J)=>{const f=r;if(l===!![])return;const Q=P===f(0x220),y=p!==undefined?'\x20on\x20instance\x20'+chalk_1['default'][f(0x211)](p):'',D=J!==undefined?f(0x212)+chalk_1[f(0x1de)][f(0x211)](J):'',i=Q?f(0x1f4):P===undefined?'with\x20shell\x20session':f(0x1e3)+chalk_1[f(0x1de)][f(0x1d4)](P),W=e?f(0x1c0)+e:'',E=I?f(0x201)+I:'',t=X?f(0x1fe)+chalk_1[f(0x1de)][f(0x1d4)](X)+'\x27':'',H=[t,i,W,E]['filter'](q=>q!=='')[f(0x1ef)]('\x20'),a=f(0x1c9)+chalk_1[f(0x1de)][f(0x211)](f(0x1fc))+')';console[f(0x1df)](f(0x1f1)+d+'\x20'+chalk_1['default'][f(0x211)](x)+f(0x225)+chalk_1[f(0x1de)][f(0x211)](m)+y+D+'\x20'+H+'\x20'+a);},this['handleShellSession']=(d,x,m=![])=>__awaiter(this,void 0x0,void 0x0,function*(){const O=r;var P,e;let I=![];try{if(process[O(0x1b8)][O(0x20a)]){const l=require('readline');l['emitKeypressEvents'](process[O(0x1b8)]),process[O(0x1b8)]['setRawMode'](!![]),process[O(0x226)]['on'](O(0x1ce),()=>{const z=O;d[z(0x1b7)](this[z(0x1fa)]());}),process['stdin']['on'](O(0x1ba),(p,J)=>{const b=O;J[b(0x1c1)]==='\x04'&&(I?(process[b(0x1b8)][b(0x1b6)](![]),(0x0,utils_1[b(0x1be)])(b(0x204)),process['exit']()):(I=!![],setTimeout(()=>I=![],0x190)));});}process[O(0x1b8)][O(0x1b5)](d['stdIn']),d[O(0x1bc)][O(0x1b5)](process['stderr']),d[O(0x222)][O(0x1b5)](process[O(0x226)]),d['on'](O(0x1d6),p=>{const T=O;var J;(0x0,utils_1[T(0x1d6)])(T(0x1f8)+x+T(0x1d7)+((J=p[T(0x1cc)])!==null&&J!==void 0x0?J:p)),process[T(0x1b8)][T(0x20a)]&&process['stdin'][T(0x1b6)](![]),process[T(0x210)](-0x1);});const X=yield d['waitForCommandResult']();if(m!==!![]){const p=(P=X===null||X===void 0x0?void 0x0:X['status'])!==null&&P!==void 0x0?P:O(0x1ff),J=(e=X===null||X===void 0x0?void 0x0:X[O(0x1d0)])!==null&&e!==void 0x0?e:-0x1,Q=(X===null||X===void 0x0?void 0x0:X[O(0x1cc)])?O(0x205)+X[O(0x1cc)]:'';p===O(0x1bd)?(0x0,utils_1[O(0x219)])('Command\x20completed\x20successfully,\x20exit\x20code:\x20'+J):(0x0,utils_1[O(0x1be)])(O(0x1e9)+p+O(0x1f3)+J+Q);}return X;}finally{process['stdin'][O(0x20a)]&&process[O(0x1b8)][O(0x1b6)](![]);}}),this[r(0x1c2)]=new js_client_1['ApiClient'](j,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[r(0x208)],'agent':h});const N=new inquirer_helper_1[(r(0x20c))](this[r(0x1c2)]);this[r(0x221)]=(0x0,utils_1[r(0x1c8)])()[r(0x21b)]('command-exec')[r(0x1e5)](r(0x1f9))[r(0x206)](r(0x1e0));const F=this[r(0x1cf)]('service')[r(0x218)](d=>__awaiter(this,void 0x0,void 0x0,function*(){const u=r,{noDefaults:x,projectId:m,serviceId:P,instanceName:I}=d,{shellCmd:X,user:l,group:p,command:J,quiet:Q}=d;(0x0,utils_1[u(0x1e8)])(this['apiClient']);try{const y=x?undefined:j[u(0x20f)](),D=m||y||(yield N['askForProject']()),i=x?undefined:j[u(0x1c3)](),W=P||i||(yield N[u(0x1eb)](D)()),E=X!==null&&X!==void 0x0?X:J!==undefined?u(0x220):undefined,t=process[u(0x226)]['columns'],H=process['stdout'][u(0x1f2)],a={'projectId':D,'serviceId':W},q={'instanceName':I,'command':J,'shell':E,'user':l,'group':p,'ttyColumns':t,'ttyRows':H},R=yield this['apiClient']['exec'][u(0x1ed)](a,q,n=>{const Z=u;this[Z(0x1ec)](Z(0x1f7),W,D,X,l,p,J,Q,n[Z(0x207)],n['containerName']);});yield this['handleShellSession'](R,u(0x1f7),Q);}catch(n){(0x0,utils_1[u(0x1d6)])(''+n[u(0x1cc)]);}finally{process[u(0x210)]();}})),K=this[r(0x1cf)]('job')[r(0x218)](d=>__awaiter(this,void 0x0,void 0x0,function*(){const S=r,{projectId:x,jobId:m,instanceName:P}=d,{noDefaults:I,shellCmd:X,user:l,group:p,command:J,quiet:Q}=d;(0x0,utils_1['assertContextExisting'])(this[S(0x1c2)]);try{const y=I?undefined:j[S(0x20f)](),D=x||y||(yield N[S(0x203)]()),i=m||(yield N[S(0x1b2)](D)()),{rows:W,columns:E}=this[S(0x1fa)](),t={'projectId':D,'jobId':i},H={'instanceName':P,'command':J,'shell':X,'user':l,'group':p,'ttyColumns':E,'ttyRows':W},a=yield this['apiClient'][S(0x1f9)][S(0x1d5)](t,H,q=>{const Y=S;this[Y(0x1ec)](Y(0x1c5),i,D,X,l,p,J,Q,q[Y(0x207)],q[Y(0x1c4)]);});yield this['handleShellSession'](a,S(0x1c5),Q);}catch(q){(0x0,utils_1[S(0x1d6)])(''+q[S(0x1cc)]);}finally{process[S(0x210)]();}})),G=this['getStandardExecCommand'](r(0x1dc))[r(0x218)](d=>__awaiter(this,void 0x0,void 0x0,function*(){const M=r,{projectId:x,addonId:m,instanceName:P,containerName:I}=d,{noDefaults:X,shellCmd:l,user:p,group:J,command:Q,quiet:y}=d;(0x0,utils_1[M(0x1e8)])(this[M(0x1c2)]);try{const D=X?undefined:j[M(0x20f)](),i=x||D||(yield N[M(0x203)]()),W=m||(yield N[M(0x1e6)](i)()),{rows:E,columns:t}=this[M(0x1fa)](),H=l!==null&&l!==void 0x0?l:Q!==undefined?'none':undefined,a={'projectId':i,'addonId':W},q={'instanceName':P,'containerName':I,'command':Q,'shell':H,'user':p,'group':J,'ttyColumns':t,'ttyRows':E},R=yield this[M(0x1c2)][M(0x1f9)][M(0x1b0)](a,q,n=>{const w=M;this[w(0x1ec)](w(0x1dc),W,i,H,p,J,Q,y,n['instanceName'],n['containerName']);});yield this[M(0x1dd)](R,'addon',y);}catch(n){(0x0,utils_1[M(0x1d6)])(''+n[M(0x1cc)]);}finally{process[M(0x210)]();}}));this[r(0x221)][r(0x1b4)](F),this[r(0x221)][r(0x1b4)](K),this[r(0x221)]['addCommand'](G);}}exports[a5L(0x1e4)]=CliExec;
|
|
1
|
+
'use strict';const a5p=a5B;(function(I,B){const O=a5B,J=I();while(!![]){try{const C=parseInt(O(0xad))/0x1*(-parseInt(O(0x9b))/0x2)+-parseInt(O(0xb8))/0x3+-parseInt(O(0xee))/0x4*(parseInt(O(0xf4))/0x5)+-parseInt(O(0x93))/0x6*(-parseInt(O(0xd5))/0x7)+-parseInt(O(0xd6))/0x8*(parseInt(O(0x100))/0x9)+parseInt(O(0xae))/0xa*(-parseInt(O(0xdb))/0xb)+parseInt(O(0xc0))/0xc*(parseInt(O(0xcc))/0xd);if(C===B)break;else J['push'](J['shift']());}catch(G){J['push'](J['shift']());}}}(a5I,0xca3de));function a5B(I,B){const J=a5I();return a5B=function(C,G){C=C-0x8c;let F=J[C];return F;},a5B(I,B);}var __awaiter=this&&this[a5p(0xe4)]||function(I,B,J,C){function G(F){return F instanceof J?F:new J(function(A){A(F);});}return new(J||(J=Promise))(function(F,A){const Q=a5B;function H(X){const w=a5B;try{d(C[w(0x106)](X));}catch(S){A(S);}}function t(X){const Z=a5B;try{d(C[Z(0xc9)](X));}catch(S){A(S);}}function d(X){const z=a5B;X[z(0x108)]?F(X[z(0xdd)]):G(X[z(0xdd)])[z(0xf0)](H,t);}d((C=C['apply'](I,B||[]))[Q(0x106)]());});},__importDefault=this&&this['__importDefault']||function(I){return I&&I['__esModule']?I:{'default':I};};Object[a5p(0xba)](exports,a5p(0xc4),{'value':!![]}),exports['CliExec']=void 0x0;const js_client_1=require(a5p(0xeb)),chalk_1=__importDefault(require(a5p(0x8f))),utils_1=require(a5p(0xe7)),inquirer_helper_1=require(a5p(0x9d));function a5I(){const L=['Received\x20Ctrl+D\x20twice,\x20exiting\x20shell\x20forcefully.','askForAddon','getCurrentServiceName','Id\x20[NAME]','2POvovT','70wTojOq','getCommand','getStandardExecCommand','containerName','join','addCommand','execCmd','apiClient','bold','Run\x20command\x20with\x20this\x20user','1209966YmryBd','log','defineProperty','readline','Project\x20for\x20exec','customUserAgent','with\x20user:','default','147336pRTdcb','setRawMode','stdin','CliExec','__esModule','Command\x20completed\x20successfully,\x20exit\x20code:\x20','\x20--cmd\x20\x27date\x27\x0a\x20\x20Single\x20command,\x20custom\x20shell:\x20northflank\x20exec\x20','getTerminalSize',',\x20details:\x20','throw','Container\x20within\x20instance\x20to\x20exec\x20into\x20(if\x20not\x20specified,\x20first\x20container\x20of\x20the\x20instance\x20will\x20be\x20selected)','\x0a\x20\x20Single\x20command,\x20no\x20shell:\x20\x20\x20\x20\x20northflank\x20exec\x20','4030RgilrZ','\x20--','without\x20shell','stdIn','--noDefaults','pipe','--group\x20[GROUP]','status','filter','2986067nHNPLd','8erRPYy','getCurrentProjectName','exec','\x20--cmd\x20\x27\x22ls\x20-l\x20/usr\x22\x27\x20--shell-cmd\x20\x27bash\x20-c\x27\x0a\x20\x20Shell\x20session,\x20custom\x20shell:\x20\x20northflank\x20exec\x20','message','2223188KjosZb','handleShellSession','value','waitForCommandResult','service','with\x20command\x20\x27','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','\x27Ctrl+D\x27','(exit\x20with\x20two\x20quick\x20','__awaiter','\x20in\x20container\x20','Command\x20exec\x20for\x20the\x20specified\x20','../utils','\x20command\x20exec:\x20','error','--instance\x20--instanceName\x20[NAME]','@northflank/js-client','stdErr','.\x0aExamples:\x0a\x20\x20Shell\x20session:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20northflank\x20exec\x20','212qgucfb','rows','then','Unknown','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.','emitKeypressEvents','47805AtxExm','Command\x20didn\x27t\x20complete\x20successfully,\x20status:\x20','stderr','stdOut','InquirerHelper','execJobSession','\x20--shell-cmd\x20\x27sh\x27','job','execStartLog','--shell-cmd\x20[SHELL-CMD]','resizeTerminal','alias','5685480rDeBTk','shell\x20command\x20','name','(random\x20instance\x20will\x20be\x20chosen\x20if\x20not\x20specified)','--cmd\x20--command\x20[COMMAND]','Command\x20execution\x20(exec)\x20for\x20Northflank\x20services\x20and\x20jobs.','next','instanceName','done','option','command-exec','Exec\x20','(required)\x20','chalk','action','exit','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.','6vmtrDB','\x20on\x20instance\x20','columns','description','keypress','assertContextExisting','Error\x20occured\x20during\x20','execAddonSession','447848YyLPow','greenBright','../inquirer-helper','stdout','askForJob','resize','--project\x20--projectId\x20[NAME]','with\x20shell\x20session','\x20in\x20project\x20','none','sequence','addon','warning','charAt'];a5I=function(){return L;};return a5I();}class CliExec{constructor(I,B){const c=a5p;this[c(0xb0)]=A=>{const l=c,H=(0x0,utils_1[l(0xaf)])(!![])['name'](A)[l(0x96)](l(0xe6)+A+(A==='addon'?'(only\x20applicable\x20for\x20custom\x20addon\x20types)\x20':'')+l(0xed)+A+l(0xcb)+A+l(0xc6)+A+l(0xd9)+A+l(0xfa))['option'](l(0xa1),l(0xbc))[l(0x109)]('--'+A+l(0xcd)+A+l(0xac),A[l(0xa8)](0x0)['toUpperCase']()+A['slice'](0x1)+'\x20to\x20exec\x20into')[l(0x109)](l(0xea),'Instance\x20to\x20exec\x20into\x20'+(A==='addon'?l(0x8e):l(0x103)))[l(0x109)](l(0xfd),l(0xf2))[l(0x109)](l(0xd0),l(0xe1),![])[l(0x109)](l(0x104),l(0x92));return A!==l(0xa6)&&H[l(0x109)]('--user\x20[USER]',l(0xb7))['option'](l(0xd2),'Run\x20command\x20with\x20this\x20group'),A===l(0xa6)&&H[l(0x109)]('--container\x20--containerName\x20[NAME]',l(0xca)),H;},this[c(0xc7)]=()=>({'columns':process[c(0x9e)][c(0x95)],'rows':process[c(0x9e)][c(0xef)]}),this[c(0xfc)]=(A,H,t,d,X,S,f,v,a,V)=>{const n=c;if(v===!![])return;const r=d===n(0xa4),s=a!==undefined?n(0x94)+chalk_1[n(0xbf)]['bold'](a):'',K=V!==undefined?n(0xe5)+chalk_1[n(0xbf)][n(0xb6)](V):'',b=r?n(0xce):d===undefined?n(0xa2):n(0x101)+chalk_1[n(0xbf)][n(0x9c)](d),W=X?n(0xbe)+X:'',u=S?'with\x20group:'+S:'',h=f?n(0xe0)+chalk_1[n(0xbf)]['greenBright'](f)+'\x27':'',q=[h,b,W,u][n(0xd4)](g=>g!=='')[n(0xb2)]('\x20'),x=n(0xe3)+chalk_1['default'][n(0xb6)](n(0xe2))+')';console[n(0xb9)](n(0x8d)+A+'\x20'+chalk_1[n(0xbf)]['bold'](H)+n(0xa3)+chalk_1[n(0xbf)]['bold'](t)+s+K+'\x20'+q+'\x20'+x);},this[c(0xdc)]=(A,H,...t)=>__awaiter(this,[A,H,...t],void 0x0,function*(d,X,S=![]){const m=c;var f,v;let a=![];try{if(process[m(0xc2)]['isTTY']){const r=require(m(0xbb));r[m(0xf3)](process[m(0xc2)]),process[m(0xc2)][m(0xc1)](!![]),process['stdout']['on'](m(0xa0),()=>{const E=m;d[E(0xfe)](this['getTerminalSize']());}),process['stdin']['on'](m(0x97),(s,K)=>{const j=m;K[j(0xa5)]==='\x04'&&(a?(process[j(0xc2)][j(0xc1)](![]),(0x0,utils_1[j(0xa7)])(j(0xa9)),process[j(0x91)]()):(a=!![],setTimeout(()=>a=![],0x190)));});}process[m(0xc2)][m(0xd1)](d[m(0xcf)]),d[m(0xec)][m(0xd1)](process[m(0xf6)]),d[m(0xf7)][m(0xd1)](process[m(0x9e)]),d['on'](m(0xe9),s=>{const U=m;var K;(0x0,utils_1[U(0xe9)])(U(0x99)+X+U(0xe8)+((K=s[U(0xda)])!==null&&K!==void 0x0?K:s)),process[U(0xc2)]['isTTY']&&process[U(0xc2)][U(0xc1)](![]),process[U(0x91)](-0x1);});const V=yield d[m(0xde)]();if(S!==!![]){const s=(f=V===null||V===void 0x0?void 0x0:V[m(0xd3)])!==null&&f!==void 0x0?f:m(0xf1),K=(v=V===null||V===void 0x0?void 0x0:V['exitCode'])!==null&&v!==void 0x0?v:-0x1,b=(V===null||V===void 0x0?void 0x0:V[m(0xda)])?m(0xc8)+V[m(0xda)]:'';s==='Success'?(0x0,utils_1['success'])(m(0xc5)+K):(0x0,utils_1[m(0xa7)])(m(0xf5)+s+',\x20exit\x20code:\x20'+K+b);}return V;}finally{process[m(0xc2)]['isTTY']&&process[m(0xc2)][m(0xc1)](![]);}}),this[c(0xb5)]=new js_client_1['ApiClient'](I,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[c(0xbd)],'agent':B});const J=new inquirer_helper_1[(c(0xf8))](this[c(0xb5)]);this[c(0xb4)]=(0x0,utils_1[c(0xaf)])()[c(0x102)](c(0x8c))[c(0xff)](c(0xd8))[c(0x96)](c(0x105));const C=this[c(0xb0)](c(0xdf))['action'](A=>__awaiter(this,void 0x0,void 0x0,function*(){const D=c,{noDefaults:H,projectId:t,serviceId:d,instanceName:X}=A,{shellCmd:S,user:f,group:v,command:a,quiet:V}=A;(0x0,utils_1[D(0x98)])(this[D(0xb5)]);try{const r=H?undefined:I[D(0xd7)](),s=t||r||(yield J['askForProject']()),K=H?undefined:I[D(0xab)](),b=d||K||(yield J['askForService'](s)()),W=S!==null&&S!==void 0x0?S:a!==undefined?'none':undefined,u=process[D(0x9e)][D(0x95)],h=process[D(0x9e)][D(0xef)],q={'projectId':s,'serviceId':b},x={'instanceName':X,'command':a,'shell':W,'user':f,'group':v,'ttyColumns':u,'ttyRows':h},g=yield this[D(0xb5)][D(0xd8)]['execServiceSession'](q,x,o=>{const M=D;this[M(0xfc)](M(0xdf),b,s,S,f,v,a,V,o[M(0x107)],o[M(0xb1)]);});yield this[D(0xdc)](g,D(0xdf),V);}catch(o){(0x0,utils_1[D(0xe9)])(''+o[D(0xda)]);}finally{process['exit']();}})),G=this[c(0xb0)](c(0xfb))[c(0x90)](A=>__awaiter(this,void 0x0,void 0x0,function*(){const R=c,{projectId:H,jobId:t,instanceName:d}=A,{noDefaults:X,shellCmd:S,user:f,group:v,command:a,quiet:V}=A;(0x0,utils_1[R(0x98)])(this[R(0xb5)]);try{const r=X?undefined:I['getCurrentProjectName'](),s=H||r||(yield J['askForProject']()),K=t||(yield J[R(0x9f)](s)()),{rows:b,columns:W}=this['getTerminalSize'](),u={'projectId':s,'jobId':K},h={'instanceName':d,'command':a,'shell':S,'user':f,'group':v,'ttyColumns':W,'ttyRows':b},q=yield this[R(0xb5)][R(0xd8)][R(0xf9)](u,h,x=>{const Y=R;this[Y(0xfc)](Y(0xfb),K,s,S,f,v,a,V,x[Y(0x107)],x['containerName']);});yield this[R(0xdc)](q,R(0xfb),V);}catch(x){(0x0,utils_1[R(0xe9)])(''+x[R(0xda)]);}finally{process['exit']();}})),F=this['getStandardExecCommand'](c(0xa6))[c(0x90)](A=>__awaiter(this,void 0x0,void 0x0,function*(){const P=c,{projectId:H,addonId:t,instanceName:d,containerName:X}=A,{noDefaults:S,shellCmd:f,user:v,group:a,command:V,quiet:r}=A;(0x0,utils_1[P(0x98)])(this[P(0xb5)]);try{const s=S?undefined:I['getCurrentProjectName'](),K=H||s||(yield J['askForProject']()),b=t||(yield J[P(0xaa)](K)()),{rows:W,columns:u}=this[P(0xc7)](),h=f!==null&&f!==void 0x0?f:V!==undefined?P(0xa4):undefined,q={'projectId':K,'addonId':b},x={'instanceName':d,'containerName':X,'command':V,'shell':h,'user':v,'group':a,'ttyColumns':u,'ttyRows':W},g=yield this[P(0xb5)]['exec'][P(0x9a)](q,x,o=>{const k=P;this[k(0xfc)]('addon',b,K,h,v,a,V,r,o['instanceName'],o['containerName']);});yield this['handleShellSession'](g,P(0xa6),r);}catch(o){(0x0,utils_1['error'])(''+o[P(0xda)]);}finally{process[P(0x91)]();}}));this['execCmd'][c(0xb3)](C),this[c(0xb4)][c(0xb3)](G),this[c(0xb4)]['addCommand'](F);}}exports[a5p(0xc3)]=CliExec;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a6w=a6B;(function(I,B){const p=a6B,J=I();while(!![]){try{const C=parseInt(p(0x1ec))/0x1+-parseInt(p(0x1ee))/0x2*(parseInt(p(0x1eb))/0x3)+-parseInt(p(0x1f3))/0x4*(parseInt(p(0x1e0))/0x5)+-parseInt(p(0x1d6))/0x6+parseInt(p(0x1d2))/0x7+-parseInt(p(0x1df))/0x8*(-parseInt(p(0x1e3))/0x9)+parseInt(p(0x1dd))/0xa;if(C===B)break;else J['push'](J['shift']());}catch(G){J['push'](J['shift']());}}}(a6I,0x19a37));function a6B(I,B){const J=a6I();return a6B=function(C,G){C=C-0x1d0;let F=J[C];return F;},a6B(I,B);}var __awaiter=this&&this[a6w(0x1d1)]||function(I,B,J,C){function G(F){return F instanceof J?F:new J(function(A){A(F);});}return new(J||(J=Promise))(function(F,A){function H(X){try{d(C['next'](X));}catch(S){A(S);}}function t(X){const Z=a6B;try{d(C[Z(0x1d3)](X));}catch(S){A(S);}}function d(X){const z=a6B;X[z(0x1ef)]?F(X[z(0x1fb)]):G(X[z(0x1fb)])['then'](H,t);}d((C=C['apply'](I,B||[]))['next']());});},__importDefault=this&&this['__importDefault']||function(I){return I&&I['__esModule']?I:{'default':I};};Object[a6w(0x1dc)](exports,a6w(0x1d4),{'value':!![]}),exports[a6w(0x1de)]=getCommandOverview;const chalk_1=__importDefault(require('chalk')),utils_1=require(a6w(0x1e5));function a6I(){const j=['114StglzX','153896DKphGT','getCommand','5594LSmSDw','done','flat','argument','Print\x20command\x20descriptions','20484ozQapE','log','length','option','find','slice','name','join','value','Only\x20display\x20tree\x20of\x20this\x20subcommand.\x20Example:\x20\x27northflank\x20command-overview\x20list\x27','description','__awaiter','852747GlvVxL','throw','__esModule','warning','98058lXJLFI','every','map','commands','No\x20subcommand\x20\x27','[subcommand]','defineProperty','453200TvQxeH','getCommandOverview','8lyEgJl','160Sadmby','opts','bold','634311WcPSEo','aliases','../utils','--verbose','forEach','abs','some','action'];a6I=function(){return j;};return a6I();}function getCommandOverview(I){const Q=a6w;return(0x0,utils_1[Q(0x1ed)])()[Q(0x1f9)]('command-overview')[Q(0x1d0)]('Prints\x20a\x20tree\x20view\x20of\x20all\x20available\x20commands')[Q(0x1f1)](Q(0x1db),Q(0x1fc))[Q(0x1f6)](Q(0x1e6),Q(0x1f2))[Q(0x1f6)]('--filter\x20<filter>','Show\x20only\x20commands\x20including\x20the\x20filter\x20word')[Q(0x1ea)]((B,J,C)=>__awaiter(this,void 0x0,void 0x0,function*(){const E=Q,{verbose:G,filter:F}=J,A=(d,X=[])=>{const c=a6B;if(d[c(0x1d9)][c(0x1f5)]>0x0)return[d[c(0x1f9)](),...d[c(0x1e4)](),...d[c(0x1d9)]['map'](S=>A(S,X))[c(0x1f0)]()];return[...X,d[c(0x1f9)](),...d[c(0x1e4)]()];};function H(d,X){const l=a6B;if(Math[l(0x1e8)](d[l(0x1f5)]-X[l(0x1f5)])>0x2)return![];const S=d[l(0x1f5)]>=X[l(0x1f5)]?d:X,f=d[l(0x1f5)]<X[l(0x1f5)]?d:X;let v=0x0;for(let V=0x0;V<S[l(0x1f5)];V++){if(S[V]!==f[V])v++;if(v>0x1)return![];}return!![];}function t(d,X){const n=a6B;var S;const f=(g,o=!![])=>o?chalk_1['default'][n(0x1e2)]['green'](g[n(0x1f9)]()):g['name'](),v=X['length']===0x0,a=F===undefined||A(d)['some'](g=>H(g,F)),V=F===undefined||[d['name'](),...d[n(0x1e4)]()][n(0x1e9)](g=>H(g,F))||a,r=d[n(0x1d9)];let s='';const K=r[n(0x1f5)]===0x0,b=K||((S=Object['keys'](d===null||d===void 0x0?void 0x0:d[n(0x1e1)]()))===null||S===void 0x0?void 0x0:S[n(0x1f5)])>0x0;!v&&(s=r&&!K?'┬\x20':'─\x20');const W=G&&b&&d[n(0x1d0)]()?':\x20'+d[n(0x1d0)]():'';V&&console[n(0x1f4)](''+X+s+f(d,b)+W);let u=X;if(!v){const g=X[n(0x1f8)](-0x2)==='└─';u=X[n(0x1f8)](0x0,-0x2)+(g?'\x20\x20':'│\x20');}const h=u+'├─',q=u+'└─',x=r[n(0x1d7)](o=>o[n(0x1d9)][n(0x1f5)]===0x0);x&&!K&&!G?V&&console[n(0x1f4)](q+'\x20'+r[n(0x1d8)](o=>f(o))[n(0x1fa)](',\x20')):r[n(0x1e7)]((o,O)=>{const m=n;t(o,r[m(0x1f5)]-0x1===O?q:h);});}if(B){const d=I[E(0x1d9)][E(0x1f7)](X=>X[E(0x1f9)]()===B);d===undefined?(0x0,utils_1[E(0x1d5)])(E(0x1da)+B+'\x27\x20found.\x20Available\x20subcommands:\x20'+I[E(0x1d9)][E(0x1d8)](X=>X[E(0x1f9)]())[E(0x1fa)](',\x20')):t(d,'');}else t(I,'');}));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a7V=a7B;(function(I,B){const a=a7B,J=I();while(!![]){try{const C=parseInt(a(0x12b))/0x1+-parseInt(a(0x113))/0x2+parseInt(a(0x132))/0x3+parseInt(a(0x122))/0x4*(parseInt(a(0x128))/0x5)+parseInt(a(0x143))/0x6+parseInt(a(0x13d))/0x7+-parseInt(a(0x131))/0x8;if(C===B)break;else J['push'](J['shift']());}catch(G){J['push'](J['shift']());}}}(a7I,0x931c4));function a7B(I,B){const J=a7I();return a7B=function(C,G){C=C-0x111;let F=J[C];return F;},a7B(I,B);}var __createBinding=this&&this[a7V(0x130)]||(Object[a7V(0x127)]?function(I,B,J,C){const r=a7V;if(C===undefined)C=J;var G=Object[r(0x13b)](B,J);(!G||(r(0x123)in G?!B[r(0x14a)]:G[r(0x14d)]||G[r(0x121)]))&&(G={'enumerable':!![],'get':function(){return B[J];}}),Object['defineProperty'](I,C,G);}:function(I,B,J,C){if(C===undefined)C=J;I[C]=B[J];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(I,B){const s=a7V;Object[s(0x142)](I,s(0x14b),{'enumerable':!![],'value':B});}:function(I,B){const K=a7V;I[K(0x14b)]=B;}),__importStar=this&&this[a7V(0x13e)]||(function(){var I=function(B){const b=a7B;return I=Object[b(0x140)]||function(J){const W=b;var C=[];for(var G in J)if(Object[W(0x11a)][W(0x150)][W(0x14c)](J,G))C[C['length']]=G;return C;},I(B);};return function(B){const u=a7B;if(B&&B['__esModule'])return B;var J={};if(B!=null){for(var C=I(B),G=0x0;G<C[u(0x112)];G++)if(C[G]!=='default')__createBinding(J,B,C[G]);}return __setModuleDefault(J,B),J;};}()),__importDefault=this&&this[a7V(0x11f)]||function(I){const h=a7V;return I&&I[h(0x14a)]?I:{'default':I};};Object[a7V(0x142)](exports,a7V(0x14a),{'value':!![]}),exports[a7V(0x13c)]=exports[a7V(0x141)]=exports[a7V(0x14f)]=exports[a7V(0x144)]=void 0x0,exports[a7V(0x13a)]=printAsTable,exports[a7V(0x118)]=consoleFormat;const chalk_1=__importDefault(require('chalk')),_=__importStar(require(a7V(0x111))),util=__importStar(require(a7V(0x134))),yaml=require(a7V(0x151)),columnify=require(a7V(0x12f));function printAsTable(I,B,J,C=![],G=0x0){const q=a7V;!C&&console[q(0x145)](''+chalk_1[q(0x14b)][q(0x11c)](B));function F(H){const x=q;return H===x(0x116)?H:H[x(0x12a)](x(0x116),'');}function A(H,t){const o=q;function d(S){const g=a7B,f=new Date(S);return f[g(0x115)]()+'/'+f[g(0x136)]()+'/'+f[g(0x117)]()+'\x0a'+f[g(0x133)]()+':'+f['getMinutes']()+':'+f[g(0x152)]();}const X=[o(0x11d),o(0x138)];if(X[o(0x137)](t['toLowerCase']())&&_[o(0x11e)](H)&&H[o(0x135)]()[o(0x112)]===0xd)return d(Number(H));if(_[o(0x12d)](H)){if(t!==o(0x116)&&t['includes'](o(0x116)))return H?'x':'✔';return H?'✔':'x';}if(_[o(0x13f)](H))return util[o(0x148)](H,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});return H;}if(_[q(0x149)](I)){I['length']===0x0&&console[q(0x145)]('No\x20'+B['toLowerCase']()+q(0x129));const H=I[q(0x12c)]((X,S)=>{const O=q,f={'i':S+G};return Object[O(0x139)](X)[O(0x146)](v=>{const p=O;(_[p(0x119)](J)||J[p(0x137)](v[p(0x120)]()))&&_['set'](f,F(v),A(X[v],v));}),f;}),t=_[q(0x147)](Object[q(0x139)]((H===null||H===void 0x0?void 0x0:H[0x0])||[]))[q(0x12e)]((X,S)=>{const w=q,f=v=>v!=='i'?v!==w(0x14e)?0x0:0x1:0x2;return f(S)-f(X);}),d={'maxWidth':0x1e,'preserveNewLines':!![],'showHeaders':!C,'config':{'_id':{'maxWidth':0x5,'truncate':!![]},'i':{'showHeaders':![]}},'columns':t};console[q(0x145)](columnify(H,d));}else console[q(0x145)](I);}function a7I(){const n=['sort','columnify','__createBinding','18740704EYnSrX','2922627zVGFbr','getHours','util','toString','getMonth','includes','updatedat','keys','printAsTable','getOwnPropertyDescriptor','printResponse','3440822IGYowP','__importStar','isObjectLike','getOwnPropertyNames','handleFormattedOutput','defineProperty','6695892BUCawz','handleJsonOutput','log','forEach','clone','inspect','isArrayLike','__esModule','default','call','writable','internalId','handleYamlOutput','hasOwnProperty','js-yaml','getSeconds','lodash','length','1621864czDBVr','json','getDate','disabled','getFullYear','consoleFormat','isUndefined','prototype','stringify','bold','createdat','isFinite','__importDefault','toLowerCase','configurable','4trJphb','get','dump','yml','\x20(HTTP\x20status:\x20','create','4119015WKqbdv','\x20found','replace','350544SFdPaM','map','isBoolean'];a7I=function(){return n;};return a7I();}function consoleFormat(I,B){const Z=a7V;if(_['isEmpty'](I)){const J=B?Z(0x126)+B+')':'';return chalk_1[Z(0x14b)]['green']('The\x20request\x20was\x20completed\x20successfully')+J;}if(!_[Z(0x13f)](I))return I===null||I===void 0x0?void 0x0:I[Z(0x135)]();return util[Z(0x148)](I,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});}const handleJsonOutput=(I,B)=>{const z=a7V,J=I===z(0x114);if(J)console[z(0x145)](JSON[z(0x11b)](B,null,'\x20'));};exports[a7V(0x144)]=handleJsonOutput;const handleYamlOutput=(I,B)=>{const Q=a7V,J=I==='yaml'||I===Q(0x125);if(J)console[Q(0x145)](yaml[Q(0x124)](B));};exports[a7V(0x14f)]=handleYamlOutput;const handleFormattedOutput=(I,B)=>{const c=a7V,J=I==='format';if(J)console[c(0x145)](consoleFormat(B));};exports[a7V(0x141)]=handleFormattedOutput;const printResponse=(I,B)=>{const l=a7V;(0x0,exports['handleJsonOutput'])(I,B),(0x0,exports[l(0x14f)])(I,B),(0x0,exports[l(0x141)])(I,B);};exports['printResponse']=printResponse;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a8T=a8B;function a8I(){const I2=['push','3817912SdhiLd','floor','map','padding','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','length','170fYxkqH','max','getAsciiChart','chalk','downSampleData','green','2-digit','399720ZnnIoa','join','isArray','offset','defineProperty','grey','119142BxLMAn','undefined','4487148JVDPDa','min','__esModule','red','height','4yMxzhv','slice','unit','abs','repeat','black','1308719YmAbXV','568wzoaPq','\x20\x20\x20','round','colors','format','blue','toLocaleDateString','5673444shifCc','symbols','toFixed','default'];a8I=function(){return I2;};return a8I();}(function(I,B){const N=a8B,J=I();while(!![]){try{const C=parseInt(N(0x1ec))/0x1+parseInt(N(0x1e6))/0x2*(parseInt(N(0x1d9))/0x3)+-parseInt(N(0x1ed))/0x4*(-parseInt(N(0x1d2))/0x5)+-parseInt(N(0x1df))/0x6+-parseInt(N(0x1f4))/0x7+-parseInt(N(0x1cc))/0x8+parseInt(N(0x1e1))/0x9;if(C===B)break;else J['push'](J['shift']());}catch(G){J['push'](J['shift']());}}}(a8I,0xbc3c3));function a8B(I,B){const J=a8I();return a8B=function(C,G){C=C-0x1c8;let F=J[C];return F;},a8B(I,B);}var __importDefault=this&&this['__importDefault']||function(I){return I&&I['__esModule']?I:{'default':I};};Object[a8T(0x1dd)](exports,a8T(0x1e3),{'value':!![]}),exports[a8T(0x1d6)]=exports['getAsciiChart']=void 0x0;const chalk_1=__importDefault(require(a8T(0x1d5))),colored=(I,B)=>{const y=a8T;return B===undefined?I:chalk_1[y(0x1ca)][B](I);},getAsciiChart=(I,B={})=>{const e=a8T,J=Array[e(0x1db)](I[0x0])?I:[I];let C=typeof B[e(0x1e2)]!==e(0x1e0)?B[e(0x1e2)]:J[0x0][0x0],G=typeof B[e(0x1d3)]!==e(0x1e0)?B[e(0x1d3)]:J[0x0][0x0];for(let u=0x0;u<J[e(0x1d1)];u++){for(let h=0x0;h<J[u]['length'];h++){C=Math['min'](C,J[u][h]),G=Math[e(0x1d3)](G,J[u][h]);}}let F=['┼','┤','╶','╴','─','╰','╭','╮','╯','│'],A=Math[e(0x1e9)](G-C),H=typeof B[e(0x1dc)]!=='undefined'?B[e(0x1dc)]:0x3,t=typeof B['padding']!==e(0x1e0)?B[e(0x1cf)]:e(0x1d0),d=typeof B['height']!==e(0x1e0)?B[e(0x1e5)]:A,X=typeof B['colors']!==e(0x1e0)?B[e(0x1f0)]:[e(0x1f2),e(0x1e4),e(0x1d7),e(0x1de),e(0x1eb)],S=A!==0x0?d/A:0x1,f=Math[e(0x1ef)](C*S),v=Math[e(0x1ef)](G*S),a=Math['abs'](v-f),V=0x0;for(let q=0x0;q<J[e(0x1d1)];q++){V=Math[e(0x1d3)](V,J[q][e(0x1d1)]);}V=V+H;let r=typeof B[e(0x1c8)]!==e(0x1e0)?B[e(0x1c8)]:F,s=B[e(0x1f1)]!==undefined?B[e(0x1f1)]:function(g){const i=e;return(t+g[i(0x1c9)](0x2)+B[i(0x1e8)])['slice'](-t[i(0x1d1)]);},K=new Array(a+0x1);for(let g=0x0;g<=a;g++){K[g]=new Array(V);for(let o=0x0;o<V;o++){K[g][o]='\x20';}}for(let O=f;O<=v;++O){const p=s(a>0x0?G-(O-f)*A/a:O,O-f);K[O-f][Math[e(0x1d3)](H-p[e(0x1d1)],0x0)]=p,K[O-f][H-0x1]=O==0x0?r[0x0]:r[0x1];}for(let w=0x0;w<J['length'];w++){let Z=X[w%X[e(0x1d1)]],z=Math[e(0x1ef)](J[w][0x0]*S)-f;K[a-z][H-0x1]=colored(r[0x0],Z);for(let Q=0x0;Q<J[w][e(0x1d1)]-0x1;Q++){let c=Math['round'](J[w][Q+0x0]*S)-f,l=Math[e(0x1ef)](J[w][Q+0x1]*S)-f;if(c==l)K[a-c][Q+H]=colored(r[0x4],Z);else{K[a-l][Q+H]=colored(c>l?r[0x5]:r[0x6],Z),K[a-c][Q+H]=colored(c>l?r[0x7]:r[0x8],Z);let n=Math[e(0x1e2)](c,l),m=Math[e(0x1d3)](c,l);for(let E=n+0x1;E<m;E++){K[a-E][Q+H]=colored(r[0x9],Z);}}}}const {startTs:b,endTs:W}=B;if(b||W){const U=P=>{const I0=e;if(!P)return I0(0x1ee);const k=P[I0(0x1f3)](undefined,{'day':'2-digit','month':I0(0x1d8),'year':I0(0x1d8)}),L=P['toLocaleTimeString'](undefined,{'hourCycle':'h24'});return k+'\x20'+L;},D=U(W),M=U(b),R=t[e(0x1e7)](0x0,Math[e(0x1d3)](0x2,t[e(0x1d1)]-M[e(0x1d1)]/0x2+0x1)),Y='\x20'[e(0x1ea)](Math['max'](V-(t[e(0x1d1)]+D[e(0x1d1)]/0x2),0x1));K[e(0x1cb)]([''+R+M+Y+D]),K[e(0x1cb)]([]);}return K[e(0x1ce)](P=>P[e(0x1da)](''))[e(0x1da)]('\x0a');};exports[a8T(0x1d4)]=getAsciiChart;const downSampleData=(I,B)=>{const I1=a8T,J=I[I1(0x1d1)];if(B>=J||B===0x0)return I;const C=[];let G=0x0;const F=(J-0x2)/(B-0x2);let A=0x0,H,t,d,X;C[G++]=I[A];for(var S=0x0;S<B-0x2;S++){let K=0x0,b=0x0,W=Math[I1(0x1cd)]((S+0x1)*F)+0x1,u=Math['floor']((S+0x2)*F)+0x1;u=u<J?u:J;var f=u-W;for(;W<u;W++){K+=I[W][0x0],b+=I[W][0x1];}K/=f,b/=f;var v=Math[I1(0x1cd)](S*F)+0x1,V=Math[I1(0x1cd)]((S+0x1)*F)+0x1,r=I[A][0x0],s=I[A][0x1];t=d=-0x1;for(;v<V;v++){d=Math[I1(0x1e9)]((r-K)*(I[v][0x1]-s)-(r-I[v][0x0])*(b-s))*0.5,d>t&&(t=d,H=I[v],X=v);}C[G++]=H,A=X;}return C[G++]=I[J-0x1],C;};exports[a8T(0x1d6)]=downSampleData;
|
package/dist/inquirer-helper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a9y=a9h;(function(j,h){const Q=a9h,N=j();while(!![]){try{const F=-parseInt(Q(0x264))/0x1+-parseInt(Q(0x210))/0x2*(parseInt(Q(0x1e6))/0x3)+-parseInt(Q(0x1f8))/0x4*(-parseInt(Q(0x254))/0x5)+parseInt(Q(0x205))/0x6*(-parseInt(Q(0x1bc))/0x7)+parseInt(Q(0x1fa))/0x8*(-parseInt(Q(0x27a))/0x9)+-parseInt(Q(0x1f5))/0xa+parseInt(Q(0x1d3))/0xb;if(F===h)break;else N['push'](N['shift']());}catch(K){N['push'](N['shift']());}}}(a9j,0x45c37));function a9j(){const jz=['startedAt','next','6560WimYwF','\x20type?','746104zSiKWf','split','opt','safeLoad','skipValidation','getCurrentProjectName','No,\x20but\x20save\x20as\x20file','What\x20do\x20you\x20want\x20to\x20use\x20as','templates','askForBuild','pathVars','78cXOQDy','__awaiter','js-yaml','message','editedResult','\x20to\x20use:','call','Go\x20to\x20editor','DynamicReloadPaginationPrompt','must\x20be\x20a\x20valid\x20non-empty\x20json\x20string','fileName','10826XVVTns','REPEAT','lodash','volume','repeat','test','askConfirm','override','json','cursor','this\x20option\x20is\x20required,\x20please\x20answer','log\x20sink','addEntry','saveFile','job\x20builds','builds','./pagination/inquirer-pagination-prompt','Aborted.','yellowBright','prompt','No,\x20abort','Yes,\x20send','throw','nextPageCursor','YES','data','keys','job\x20runs','minimum','\x20(startedAt:\x20','service\x20containers','value','create','then','logSinks','Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.','whiteBright',',\x20supported\x20types:\x20[json|yaml|yml]','don\x27t\x20change','join','subdomains','all-job-runs','set','getPathString','stringify','restores','must\x20be\x20longer\x20than\x20or\x20equal\x20to\x20','for\x20this\x20','askForProjectScopedResourcePaginated','all-containers','askForPipeline','askForTag','\x20in\x20','templateRuns','isUndefined','jobs','confirmation','registryCredentials','default','underline','confirmationPrompt','domain\x20(','blue','safeDump','yaml','hasOwnProperty','tokenPrompt','toUpperCase','1385BbKTcZ','inquirer-search-list','editPayload','minLength','askForProjectScopedResource','paths','domains','validate','writable','askForService','Configuration\x20file\x20written\x20to\x20','\x20characters,\x20is\x20','body','runs','green','list','285467xZVPHD','has','search-list','editor','askForTemplateRun','SAVE','Enter\x20the\x20','success','array','description','retrievePayloadViaInteractiveCli','must\x20be\x20bigger\x20than\x20or\x20equal\x20to\x20','clusters','What\x27s\x20the\x20','.*\x5c.(json|yaml|yml)$','all-builds','secret','askForTemplate','Template\x20id\x20not\x20provided.','grey','isArray','yml','18UdSlwk','token','askForCredentials','Provide\x20a\x20file\x20path\x20to\x20write\x20the\x20configuration\x20to\x20(<name>.[json|yaml|yml])','\x20and\x20it\x20','chalk','fullName','loginPrompt','createdAt','__esModule','greenBright','template','askForProject','getInnerType','slice','containers','propToType','rawObject','must\x20be\x20smaller\x20than\x20or\x20equal\x20to\x20','Context\x20with\x20name\x20\x27','cmdPath','found','maximum','askForResourcePaginated','nextCursor','__createBinding','get','askForDomain','EDIT','defaultPaginationPageSize','isObject','defineProperty','./utils','required','deleteWarningPrompt','items','Should\x20it\x20be','boolean','askForSubdomainPath','max','find','blueBright','\x20(completedAt:\x20','askForSecret','type','),\x20subdomain\x20(','Something\x20unexpected\x20happened.','enum','choice','name','Please\x20confirm\x20following\x20configuration:\x0a','project:\x20\x27','resultCache','Choose\x20the\x20name\x20of\x20the\x20new\x20local\x20context:','askForLogSink','addon','askForJobRun','oneOf','.\x20This\x20is\x20irreversible.\x20Please\x20confirm!','InquirerHelper','integer','writeFileSync','askForAddon','askGeneric','main-context','unset','unshift','assign','backup\x20destination','string','pagination','askForResource','isValidJSON','askForJob','charAt','job:\x20\x27','completedAt','password','not\x20completed','askForContainer','ask','Do\x20you\x20want\x20to\x20add','Writing\x20configuration\x20failed:\x20','No\x20containers\x20found','domain','maxLength','pipelines','106827GKTTqN','backupDestinations','template\x20run','prototype','projects','service:\x20\x27','volumes','bold','No\x20','doesn\x27t\x20match\x20pattern\x20\x27','\x20characters','uri','toString','length','service','services','all','__setModuleDefault','isBoolean','retry','getType','credentials','__importDefault','11777271xSVKqG','backups','red','pagination-prompt','registerPrompt','__importStar','pipeline','Context\x20name\x20already\x20exists.','anyOf','No,\x20edit','bgGrey','confirm','push','service\x20build','secrets','Choose\x20the\x20','apiClient','properties','configurable','219GUETjG','pattern','job','pop','getQuestionString','elements','input','Unexpected\x20file\x20type:\x20','filter','tags','No,\x20repeat','example','warning','ABORT','map','1736550QcWMEq'];a9j=function(){return jz;};return a9j();}var __createBinding=this&&this[a9y(0x293)]||(Object[a9y(0x230)]?function(j,h,N,F){const D=a9y;if(F===undefined)F=N;var K=Object['getOwnPropertyDescriptor'](h,N);(!K||('get'in K?!h[D(0x283)]:K[D(0x25c)]||K[D(0x1e5)]))&&(K={'enumerable':!![],'get':function(){return h[N];}}),Object[D(0x299)](j,F,K);}:function(j,h,N,F){if(F===undefined)F=N;j[F]=h[N];}),__setModuleDefault=this&&this[a9y(0x1cd)]||(Object[a9y(0x230)]?function(j,h){const i=a9y;Object[i(0x299)](j,i(0x24a),{'enumerable':!![],'value':h});}:function(j,h){j['default']=h;}),__importStar=this&&this[a9y(0x1d8)]||function(j){const W=a9y;if(j&&j[W(0x283)])return j;var h={};if(j!=null){for(var N in j)if(N!==W(0x24a)&&Object[W(0x1bf)][W(0x251)][W(0x20b)](j,N))__createBinding(h,j,N);}return __setModuleDefault(h,j),h;},__awaiter=this&&this[a9y(0x206)]||function(j,h,N,F){function K(G){return G instanceof N?G:new N(function(d){d(G);});}return new(N||(N=Promise))(function(G,d){const a=a9h;function x(I){const E=a9h;try{e(F[E(0x1f7)](I));}catch(X){d(X);}}function m(I){const t=a9h;try{e(F[t(0x226)](I));}catch(X){d(X);}}function e(I){const H=a9h;I['done']?G(I[H(0x22f)]):K(I[H(0x22f)])[H(0x231)](x,m);}e((F=F['apply'](j,h||[]))[a(0x1f7)]());});},__importDefault=this&&this[a9y(0x1d2)]||function(j){return j&&j['__esModule']?j:{'default':j};};Object[a9y(0x299)](exports,'__esModule',{'value':!![]}),exports[a9y(0x1a0)]=void 0x0;const _=__importStar(require(a9y(0x212))),chalk_1=__importDefault(require(a9y(0x27f))),fs=__importStar(require('fs')),utils_1=require(a9y(0x29a)),api_helpers_1=require('./api-helpers'),inquirer_pagination_prompt_1=require(a9y(0x220)),inquirer=require('inquirer'),inquirerSearchList=require(a9y(0x255)),yaml=require(a9y(0x207));function a9h(j,h){const N=a9j();return a9h=function(F,K){F=F-0x18c;let G=N[F];return G;},a9h(j,h);}var ConfirmChoices;(function(j){const q=a9y;j[q(0x228)]=q(0x225),j[q(0x211)]=q(0x1f0),j[q(0x296)]=q(0x1dc),j[q(0x269)]=q(0x200),j[q(0x1f3)]=q(0x224);}(ConfirmChoices||(ConfirmChoices={})));class InquirerHelper{constructor(j){const R=a9y;this[R(0x1e3)]=j,this[R(0x297)]=0x32,this[R(0x256)]=h=>__awaiter(this,void 0x0,void 0x0,function*(){const n=R,{editedResult:N}=yield inquirer['prompt']([{'type':n(0x267),'name':n(0x209),'message':n(0x20c),'default':yaml['safeDump'](h)}]);return yaml[n(0x1fd)](N);}),this[R(0x21d)]=h=>__awaiter(this,void 0x0,void 0x0,function*(){const k=R,N=d=>k(0x1ed)+d+k(0x235);function F(){return __awaiter(this,void 0x0,void 0x0,function*(){const L=a9h;return inquirer[L(0x223)]([{'type':L(0x1ec),'name':L(0x20f),'message':L(0x27d),'validate':d=>new RegExp(L(0x272))[L(0x215)](d)?!![]:N(d)}]);});}const {fileName:K}=yield F(),G=K[k(0x1c8)]()[k(0x1fb)]('.')[k(0x1e9)]();try{switch(G){case k(0x218):(0x0,utils_1[k(0x26b)])('Configuration\x20file\x20written\x20to\x20'+K);return fs['writeFileSync'](K,JSON[k(0x23c)](h,null,'\x20\x20'));case k(0x250):case k(0x279):(0x0,utils_1[k(0x26b)])(k(0x25e)+K);return fs[k(0x1a2)](K,yaml[k(0x24f)](h));default:(0x0,utils_1[k(0x1f2)])(N(G));}}catch(d){(0x0,utils_1[k(0x1f2)])(k(0x1b7)+d[k(0x208)]);}return undefined;}),this['filter']=(h,N)=>F=>{const A=R,K=typeof F===A(0x1aa)?F['trim']():F;return N===![]&&K==='don\x27t\x20change'?'':K;},this[R(0x25b)]=(h,N,F)=>K=>{const v=R;if(this[v(0x1fe)]===!![])return!![];const G=[];if(K===''||K===v(0x236)){if(N!==![])G[v(0x1df)](v(0x21a));else return!![];}h[v(0x191)]===v(0x1aa)&&!_[v(0x246)](h['pattern'])&&G[v(0x1df)](new RegExp(h[v(0x1e7)])[v(0x215)](K)?!![]:v(0x1c5)+h[v(0x1e7)]+'\x27');h[v(0x191)]===v(0x1aa)&&!_[v(0x246)](h[v(0x257)])&&G[v(0x1df)](K['length']>=h[v(0x257)]?!![]:v(0x23e)+h['minLength']+'\x20characters,\x20is\x20'+K[v(0x1c9)]+v(0x1c6));h[v(0x191)]===v(0x1aa)&&!_[v(0x246)](h[v(0x1ba)])&&G[v(0x1df)](K[v(0x1c9)]<=h[v(0x1ba)]?!![]:'must\x20be\x20shorter\x20than\x20or\x20equal\x20to\x20'+h['maxLength']+v(0x25f)+K[v(0x1c9)]+v(0x1c6));F&&Number['isNaN'](parseInt(K,0xa))&&G['push']('must\x20be\x20a\x20number,\x20is\x20'+K);h[v(0x191)]==='integer'&&!_[v(0x246)](h[v(0x22c)])&&G['push'](K>=h[v(0x22c)]?!![]:v(0x26f)+h[v(0x22c)]);h[v(0x191)]===v(0x1a1)&&!_[v(0x246)](h[v(0x290)])&&G['push'](K<=h[v(0x290)]?!![]:v(0x28c)+h[v(0x290)]);if(h['type']===v(0x28b)){const m=(0x0,utils_1[v(0x1ad)])(K);G['push'](m===![]||_['isEmpty'](m)?v(0x20e):!![]);}const d=G[v(0x1ee)](P=>P!==!![]),x=(h===null||h===void 0x0?void 0x0:h[v(0x1f1)])?'\x0a'+chalk_1[v(0x24a)][v(0x1d5)]('>>')+'\x20Example:\x20'+chalk_1[v(0x24a)][v(0x234)](JSON[v(0x23c)](h[v(0x1f1)])):'';return d['length']>0x0?d[v(0x237)](chalk_1['default'][v(0x24b)](v(0x27e)))+x:!![];},this[R(0x23b)]=(h,N,F)=>{const s=R,K=h[h[s(0x1c9)]-0x1];function G(){const U=s;return h[U(0x288)](0x0,-0x1)[U(0x1f4)](m=>m[U(0x1af)](0x0)[U(0x253)]()+m[U(0x288)](0x1))[U(0x237)]('>');}const d=h['length']>0x1?chalk_1[s(0x24a)][s(0x1dd)]['whiteBright'](G())+':\x20':'',x=F?'\x20('+chalk_1[s(0x24a)][s(0x24e)](F)+')':'';return chalk_1[s(0x24a)]['reset'](''+d+N+'\x20'+chalk_1[s(0x24a)]['bold'][s(0x284)](K)+x+'?');},this[R(0x1ac)]=(h,N,F)=>__awaiter(this,void 0x0,void 0x0,function*(){const r=R;if(N[r(0x1c9)]<0x1){const d=F?r(0x23f)+F:r(0x28f);throw new Error(r(0x1c4)+h+'\x20'+d+'.');}const K=r(0x1e2)+h+r(0x20a),G=N['length']>0x4?r(0x266):r(0x263);return(yield inquirer[r(0x223)]([{'type':G,'name':r(0x196),'message':K,'choices':N}]))[r(0x196)];}),this[R(0x291)]=(h,N,F)=>__awaiter(this,void 0x0,void 0x0,function*(){const V=R,{elements:K,nextCursor:G}=yield N();if(K['length']<0x1){const m=F?V(0x23f)+F:V(0x28f);throw new Error(V(0x1c4)+h+'\x20'+m+'.');}const d='Choose\x20the\x20'+h+'\x20to\x20use:';if(G!==undefined){const P=({nextPageCursor:e})=>__awaiter(this,void 0x0,void 0x0,function*(){const f=V,I=yield N(e);return{'elements':I[f(0x1eb)],'nextPageCursor':I[f(0x292)]};});return(yield inquirer[V(0x223)]([{'type':V(0x1d6),'name':'name','message':d,'choices':K,'nextPageCursor':G,'loadMore':P}]))[V(0x196)];}const x=K[V(0x1c9)]>0x4?'search-list':'list';return(yield inquirer['prompt']([{'type':x,'name':V(0x196),'message':d,'choices':K}]))[V(0x196)];}),this[R(0x1a4)]=(h,N)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const O=R,F=''+(N?'('+chalk_1['default'][O(0x24e)](N)+')\x20':''),K=O(0x26a)+chalk_1['default'][O(0x262)](h)+'\x20'+F+'to\x20use:',G=this[O(0x25b)]({'type':O(0x1aa),'required':!![]});return(yield inquirer[O(0x223)]([{'type':O(0x1ec),'name':O(0x196),'message':K,'validate':G}]))[O(0x196)];}),this[R(0x216)]=h=>__awaiter(this,void 0x0,void 0x0,function*(){const z=R;return(yield inquirer[z(0x223)]([{'type':z(0x1de),'name':z(0x196),'message':h,'default':!![]}]))[z(0x196)];}),this[R(0x25d)]=h=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const T=R,N=F=>__awaiter(this,void 0x0,void 0x0,function*(){const b=a9h,K=yield this[b(0x1e3)][b(0x263)][b(0x1cb)][b(0x1cc)]({'parameters':{'projectId':F}}),G=K[b(0x229)][b(0x1cb)][b(0x1f4)](d=>d['id']);return G;});return this[T(0x258)](T(0x1ca),N,h);}),this[R(0x275)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Z=R,h=N=>__awaiter(this,void 0x0,void 0x0,function*(){const u=a9h;var F;const K=yield this[u(0x1e3)][u(0x263)]['templates']({'options':{'per_page':this['defaultPaginationPageSize'],'cursor':N}}),G=K[u(0x229)][u(0x202)][u(0x1f4)](d=>d['id']);return{'elements':G,'nextCursor':(F=K[u(0x1ab)])===null||F===void 0x0?void 0x0:F[u(0x219)]};});return this[Z(0x291)](Z(0x285),h);}),this[R(0x243)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Y=R,h=N=>__awaiter(this,void 0x0,void 0x0,function*(){const S=a9h;var F,K,G;const d=yield this[S(0x1e3)][S(0x263)][S(0x1ef)]({'options':{'per_page':this[S(0x297)],'cursor':N}}),x=(K=(F=d[S(0x229)][S(0x1ef)])===null||F===void 0x0?void 0x0:F[S(0x1f4)](m=>m['id']))!==null&&K!==void 0x0?K:[];return{'elements':x,'nextCursor':(G=d[S(0x1ab)])===null||G===void 0x0?void 0x0:G[S(0x219)]};});return this[Y(0x291)]('tag',h);}),this['askForBackupDestination']=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const M=R;var h;const N=yield this[M(0x1e3)][M(0x263)][M(0x1bd)][M(0x1cc)]({}),F=(h=N[M(0x229)][M(0x1bd)][M(0x1f4)](K=>K[M(0x196)]))!==null&&h!==void 0x0?h:[];return this[M(0x1ac)](M(0x1a9),F);}),this['askForClusterId']=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const C=R,h=N=>__awaiter(this,void 0x0,void 0x0,function*(){const w=a9h;var F,K,G;const d=yield this[w(0x1e3)][w(0x263)]['cloud'][w(0x270)]({'options':{'per_page':this[w(0x297)],'cursor':N}}),x=(K=(F=d[w(0x229)][w(0x270)])===null||F===void 0x0?void 0x0:F[w(0x1f4)](m=>m[w(0x196)]))!==null&&K!==void 0x0?K:[];return{'elements':x,'nextCursor':(G=d[w(0x1ab)])===null||G===void 0x0?void 0x0:G[w(0x219)]};});return this[C(0x291)]('cluster\x20id',h);}),this[R(0x268)]=h=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const o=R;if(_[o(0x246)](h))throw new Error(o(0x276));const N=F=>__awaiter(this,void 0x0,void 0x0,function*(){const g=o;var K;let G=this[g(0x297)];const d=yield this[g(0x1e3)][g(0x263)]['templateRuns']({'parameters':{'templateId':h},'options':{'per_page':G,'cursor':F}}),x=d['data'][g(0x245)][g(0x1f4)](m=>m['id']+g(0x22d)+m[g(0x282)]+')');return{'elements':x,'nextCursor':(K=d[g(0x1ab)])===null||K===void 0x0?void 0x0:K[g(0x219)]};});return this['askForResourcePaginated'](o(0x1be),N)['then'](F=>F['split']('\x20')[0x0]);}),this[R(0x19b)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const j0=R,h=N=>__awaiter(this,void 0x0,void 0x0,function*(){const B=a9h;var F;let K=this[B(0x297)];const G=yield this['apiClient'][B(0x263)][B(0x232)]({'options':{'per_page':K,'cursor':N}}),d=G['data']['logSinks'][B(0x1f4)](x=>x['id']);return{'elements':d,'nextCursor':(F=G[B(0x1ab)])===null||F===void 0x0?void 0x0:F[B(0x219)]};});return this['askForResourcePaginated'](j0(0x21b),h);}),this[R(0x242)]=h=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const j2=R,N=F=>__awaiter(this,void 0x0,void 0x0,function*(){const j1=a9h,K=yield this['apiClient'][j1(0x263)][j1(0x1bb)]['all']({'parameters':{'projectId':F}});return K[j1(0x229)][j1(0x1bb)]['map'](G=>G['id']);});return this[j2(0x258)](j2(0x1d9),N,h);}),this[R(0x1ae)]=h=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const j4=R,N=F=>__awaiter(this,void 0x0,void 0x0,function*(){const j3=a9h,K=yield this['apiClient'][j3(0x263)][j3(0x247)][j3(0x1cc)]({'parameters':{'projectId':F}}),G=K[j3(0x229)][j3(0x247)][j3(0x1f4)](d=>d['id']);return G;});return this[j4(0x258)](j4(0x1e8),N,h);}),this[R(0x19d)]=(h,N,F=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const j5=R,K=j5(0x239),G=d=>x=>__awaiter(this,void 0x0,void 0x0,function*(){const j6=j5;var m;const P=yield this[j6(0x1e3)]['get']['job']['runs']({'parameters':{'projectId':d,'jobId':h},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':x}}),e=P[j6(0x229)][j6(0x261)][j6(0x1f4)](I=>I['id']+j6(0x22d)+I[j6(0x1f6)]+')');return F&&e[j6(0x1a7)](K),{'elements':e,'nextCursor':(m=P[j6(0x1ab)])===null||m===void 0x0?void 0x0:m[j6(0x219)]};});return this[j5(0x240)](j5(0x22b),G,N,'job:\x20\x27'+h+'\x27')[j5(0x231)](d=>{const j7=j5,x=d[j7(0x1fb)]('\x20')[0x0];if(x===K)return undefined;return x;});}),this[R(0x203)]=(h,N,F,K=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const j8=R,G=j8(0x273);if(F!==undefined){const d=x=>m=>__awaiter(this,void 0x0,void 0x0,function*(){const j9=j8;var P;const e=yield this[j9(0x1e3)][j9(0x294)]['job'][j9(0x21f)]({'parameters':{'projectId':x,'jobId':F},'options':{'per_page':this[j9(0x297)],'cursor':m}}),I=e[j9(0x229)][j9(0x21f)][j9(0x1f4)](X=>X['id']+j9(0x22d)+X[j9(0x282)]+')');return K&&I['unshift'](G),{'elements':I,'nextCursor':(P=e[j9(0x1ab)])===null||P===void 0x0?void 0x0:P[j9(0x219)]};});return this['askForProjectScopedResourcePaginated'](j8(0x21e),d,h,'job:\x20\x27'+F+'\x27')[j8(0x231)](x=>{const jj=j8,m=x[jj(0x1fb)]('\x20')[0x0];if(m===G)return undefined;return m;});}if(N!==undefined){const x=m=>P=>__awaiter(this,void 0x0,void 0x0,function*(){const jh=j8;var e;const I=yield this[jh(0x1e3)]['get'][jh(0x1ca)]['builds']({'parameters':{'projectId':m,'serviceId':N},'options':{'per_page':this[jh(0x297)],'cursor':P}}),X=I[jh(0x229)][jh(0x21f)]['map'](l=>l['id']+jh(0x22d)+l['createdAt']+')');if(K)X['unshift'](G);return{'elements':X,'nextCursor':(e=I['pagination'])===null||e===void 0x0?void 0x0:e[jh(0x219)]};});return this[j8(0x240)](j8(0x1e0),x,h,j8(0x1c1)+F+'\x27')[j8(0x231)](m=>{const jN=j8,P=m[jN(0x1fb)]('\x20')[0x0];if(P===G)return undefined;return P;});}throw new Error('No\x20builds\x20found');}),this[R(0x1b4)]=(h,N,F,K=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const jF=R,G=jF(0x241);if(F!==undefined){const d=x=>m=>__awaiter(this,void 0x0,void 0x0,function*(){const jK=jF;var P,e;const I=yield this[jK(0x1e3)][jK(0x294)][jK(0x1e8)][jK(0x289)]({'parameters':{'projectId':x,'jobId':F},'options':{'per_page':this[jK(0x297)],'cursor':m}}),X=(P=I[jK(0x229)][jK(0x289)])!==null&&P!==void 0x0?P:[],l=X===null||X===void 0x0?void 0x0:X[jK(0x1f4)](p=>p['name']+jK(0x22d)+p['createdAt']+')');return K&&l[jK(0x1a7)](G),{'elements':l,'nextCursor':(e=I[jK(0x1ab)])===null||e===void 0x0?void 0x0:e[jK(0x219)]};});return this[jF(0x240)]('job\x20containers',d,h,jF(0x1b0)+F+'\x27')[jF(0x231)](x=>{const jG=jF,m=x[jG(0x1fb)]('\x20')[0x0];if(m===G)return undefined;return m;});}if(N!==undefined){const x=m=>P=>__awaiter(this,void 0x0,void 0x0,function*(){const jd=jF;var e,I;const X=yield this[jd(0x1e3)][jd(0x294)][jd(0x1ca)]['containers']({'parameters':{'projectId':m,'serviceId':N},'options':{'per_page':this[jd(0x297)],'cursor':P}}),l=(e=X[jd(0x229)]['containers'])!==null&&e!==void 0x0?e:[],p=l[jd(0x1f4)](J=>J[jd(0x196)]+'\x20(startedAt:\x20'+J[jd(0x282)]+')');if(K)p===null||p===void 0x0?void 0x0:p[jd(0x1a7)](G);return{'elements':p,'nextCursor':(I=X[jd(0x1ab)])===null||I===void 0x0?void 0x0:I[jd(0x219)]};});return this[jF(0x240)](jF(0x22e),x,h,jF(0x1c1)+F+'\x27')['then'](m=>{const jx=jF,P=m[jx(0x1fb)]('\x20')[0x0];if(P===G)return undefined;return P;});}throw new Error(jF(0x1b8));}),this[R(0x1a3)]=h=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const jP=R,N=F=>__awaiter(this,void 0x0,void 0x0,function*(){const jm=a9h,K=yield this[jm(0x1e3)][jm(0x263)]['addons']['all']({'parameters':{'projectId':F}});return K[jm(0x229)]['addons'][jm(0x1f4)](G=>G['id']);});return this[jP(0x258)](jP(0x19c),N,h);}),this['askForAddonBackup']=(h,N)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const jI=R,F=K=>G=>__awaiter(this,void 0x0,void 0x0,function*(){const je=a9h;var d;const x=yield this[je(0x1e3)][je(0x294)][je(0x19c)][je(0x1d4)]({'parameters':{'projectId':K,'addonId':N},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':G}});return{'elements':x[je(0x229)][je(0x1d4)]['map'](m=>m['id']+je(0x18f)+(m['completedAt']||'not\x20completed')+')'),'nextCursor':(d=x[je(0x1ab)])===null||d===void 0x0?void 0x0:d[je(0x219)]};});return this[jI(0x240)](jI(0x1d4),F,h,'addon:\x20\x27'+N+'\x27')[jI(0x231)](K=>K[jI(0x1fb)]('\x20')[0x0]);}),this['askForAddonRestore']=(h,N,F)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const jl=R,K=G=>d=>__awaiter(this,void 0x0,void 0x0,function*(){const jX=a9h;var x;const m=yield this[jX(0x1e3)][jX(0x294)][jX(0x19c)]['backup'][jX(0x23d)]({'parameters':{'projectId':G,'addonId':N,'backupId':F},'options':{'per_page':this[jX(0x297)],'cursor':d}});return{'elements':m[jX(0x229)][jX(0x23d)]['map'](P=>P['id']+jX(0x18f)+(P[jX(0x1b1)]||jX(0x1b3))+')'),'nextCursor':(x=m[jX(0x1ab)])===null||x===void 0x0?void 0x0:x[jX(0x219)]};});return this[jl(0x240)]('restore',K,h,'addon:\x20\x27'+N+'\x27')[jl(0x231)](G=>G['split']('\x20')[0x0]);}),this['askForVolume']=h=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const jJ=R,N=F=>__awaiter(this,void 0x0,void 0x0,function*(){const jp=a9h;return(yield this['apiClient']['list'][jp(0x1c2)]({'parameters':{'projectId':F}}))[jp(0x229)]['map'](K=>K['id']);});return this[jJ(0x258)](jJ(0x213),N,h);}),this[R(0x190)]=h=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const jy=R,N=F=>__awaiter(this,void 0x0,void 0x0,function*(){const jQ=a9h,K=yield this['apiClient'][jQ(0x263)][jQ(0x1e1)][jQ(0x1cc)]({'parameters':{'projectId':F}});return K['data'][jQ(0x1e1)][jQ(0x1f4)](G=>G['id']);});return this[jy(0x258)](jy(0x274),N,h);}),this['askForSubdomain']=h=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const jD=R,N=yield this['apiClient'][jD(0x294)][jD(0x1b9)]({'parameters':{'domain':h}}),F=N[jD(0x229)][jD(0x238)][jD(0x1f4)](G=>G['name']+'\x20(full\x20domain:\x20'+G[jD(0x280)]+')'),K=jD(0x24d)+h+')';return this['askForResource']('subdomain',F,K)['then'](G=>G['split']('\x20')[0x0]);}),this[R(0x2a0)]=(h,N)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const ji=R,F=yield this[ji(0x1e3)][ji(0x263)]['subdomain']['path']({'parameters':{'domain':h,'subdomain':N}}),K=F[ji(0x229)][ji(0x259)]['map'](x=>''+x[ji(0x1c7)]),G=ji(0x24d)+h+ji(0x192)+N+')';return this[ji(0x1ac)]('subdomainPath',K,G);}),this[R(0x29c)]=h=>__awaiter(this,void 0x0,void 0x0,function*(){const jW=R;return(yield inquirer[jW(0x223)]([{'type':jW(0x1de),'name':'confirmation','message':chalk_1[jW(0x24a)][jW(0x222)]('WARNING:\x20You\x20are\x20about\x20to\x20delete\x20'+(h||'a\x20Northflank\x20resource')+jW(0x19f)),'default':![]}]))[jW(0x248)];}),this[R(0x281)]=(h,N)=>__awaiter(this,void 0x0,void 0x0,function*(){const jE=R;_[jE(0x246)](h['name'])&&(N[jE(0x1c9)]<=0x0?_[jE(0x23a)](h,'name',jE(0x24a)):yield(0x0,utils_1[jE(0x1cf)])(0xa)(()=>__awaiter(this,void 0x0,void 0x0,function*(){const jt=jE,{name:F}=yield inquirer[jt(0x223)]([{'type':jt(0x1ec),'name':jt(0x196),'message':jt(0x19a),'default':jt(0x1a5)}]);if(!h[jt(0x217)]&&N[jt(0x18d)](K=>K['name']===F)){const {c:K}=yield inquirer[jt(0x223)]([{'type':jt(0x1de),'name':'c','message':jt(0x28d)+F+'\x27\x20already\x20exists.\x20Do\x20you\x20want\x20to\x20override\x20this\x20context\x20(y)\x20or\x20enter\x20a\x20new\x20name\x20(N)?','default':![]}]);if(K===![])throw new Error(jt(0x1da));_[jt(0x23a)](h,'override',!![]);}_['set'](h,jt(0x196),F);})));if(_[jE(0x246)](h[jE(0x27b)])){const F=yield this[jE(0x252)]();_[jE(0x23a)](h,'token',F);}return h;}),this[R(0x252)]=()=>__awaiter(this,void 0x0,void 0x0,function*(){const jH=R,{token:h}=yield inquirer[jH(0x223)]([{'type':jH(0x1b2),'name':jH(0x27b),'mask':'*','message':'Choose\x20the\x20login\x20token:'}]);return h;}),inquirer[R(0x1d7)]('search-list',inquirerSearchList),inquirer[R(0x1d7)](R(0x1d6),inquirer_pagination_prompt_1[R(0x20d)]);}[a9y(0x24c)](j,h){return __awaiter(this,void 0x0,void 0x0,function*(){const ja=a9h,N=yaml[ja(0x24f)](j),F=_[ja(0x18c)](N[ja(0x1fb)]('\x0a')[ja(0x1f4)](d=>d[ja(0x1c9)])),K=chalk_1[ja(0x24a)][ja(0x277)]('-'[ja(0x214)](F)+'\x0a'),{confirm:G}=yield inquirer[ja(0x223)]([{'type':ja(0x263),'name':ja(0x1de),'message':''+chalk_1[ja(0x24a)][ja(0x1c3)]['green'](ja(0x197))+K+chalk_1[ja(0x24a)][ja(0x18e)](N)+K,'choices':Object['values'](ConfirmChoices)}]);switch(G){case ConfirmChoices['YES']:return j;case ConfirmChoices[ja(0x1f3)]:throw new Error(ja(0x221));case ConfirmChoices[ja(0x211)]:return this[ja(0x26e)](h);case ConfirmChoices['EDIT']:return this['confirmationPrompt'](yield this[ja(0x256)](j),h);case ConfirmChoices[ja(0x269)]:yield this[ja(0x21d)](j);return this['confirmationPrompt'](j,h);default:throw new Error(ja(0x193));}});}[a9y(0x26e)](j,h){return __awaiter(this,void 0x0,void 0x0,function*(){const jq=a9h;if((h===null||h===void 0x0?void 0x0:h[jq(0x199)])!==undefined)this['resultCache']=h===null||h===void 0x0?void 0x0:h['resultCache'];this['tmpCmdPath']=h===null||h===void 0x0?void 0x0:h[jq(0x28e)],this['skipValidation']=h===null||h===void 0x0?void 0x0:h[jq(0x1fe)];const N={};return yield this[jq(0x28a)]([],j[jq(0x1fc)][jq(0x260)],N),this['resultCache']=N,yield this[jq(0x24c)](N,j);});}[a9y(0x28a)](j,h,N,F){return __awaiter(this,void 0x0,void 0x0,function*(){const jR=a9h;let K;if(h[jR(0x19e)]&&!_[jR(0x265)](h,jR(0x1e4))){if(h[jR(0x19e)][jR(0x1c9)]>0x1){const {choice:G}=yield inquirer[jR(0x223)]([{'type':jR(0x263),'name':jR(0x195),'message':'What\x27s\x20the\x20'+(j[j[jR(0x1c9)]-0x1]||'')+jR(0x1f9),'choices':h['oneOf'][jR(0x1f4)](d=>{const jn=jR;var x;return(x=d[jn(0x26d)])!==null&&x!==void 0x0?x:'??';})}]);K=yield this['getType'](j,h[jR(0x19e)][jR(0x18d)](d=>d[jR(0x26d)]===G),N,F);}else{const d=h[jR(0x19e)][0x0];_[jR(0x23a)](d,jR(0x26d),h[jR(0x26d)]),K=yield this['getType'](j,d,N,F);}K={};}else{if(h['anyOf']&&!_[jR(0x265)](h,jR(0x1e4))){if(h[jR(0x1db)][jR(0x1c9)]>0x1){const {choice:x}=yield inquirer[jR(0x223)]([{'type':jR(0x263),'name':jR(0x195),'message':jR(0x271)+(j[j[jR(0x1c9)]-0x1]||'')+jR(0x1f9),'choices':[...h[jR(0x1db)][jR(0x1f4)](m=>{var P;return(P=m['description'])!==null&&P!==void 0x0?P:'??';}),jR(0x236)]}]);x!==jR(0x236)&&(K=yield this['getType'](j,h[jR(0x1db)]['find'](m=>m[jR(0x26d)]===x),N,F));}else{const m=h[jR(0x1db)][0x0];_['set'](m,jR(0x26d),h[jR(0x26d)]),K=yield this[jR(0x1d0)](j,m,N,F);}K={};}else K=yield this['getType'](j,h,N,F);}return K;});}[a9y(0x287)](j,h,N,F){var K;return __awaiter(this,void 0x0,void 0x0,function*(){const jk=a9h;if(F===![]){const {addEntry:x}=yield inquirer['prompt']([{'type':jk(0x1de),'name':jk(0x21c),'message':this[jk(0x23b)](h,jk(0x1b6),j===null||j===void 0x0?void 0x0:j['description']),'default':![]}]);if(!x)return N;}const G=Object[jk(0x22a)]((K=j===null||j===void 0x0?void 0x0:j[jk(0x1e4)])!==null&&K!==void 0x0?K:[]),d=j[jk(0x29b)]||[];if(G['length']>0x0)for(const m of G){const P=h['concat'](m);if(h[jk(0x1c9)]>0x0&&!_[jk(0x265)](N,h[jk(0x237)]('.')))_[jk(0x23a)](N,h[jk(0x237)]('.'),{});yield this[jk(0x28a)](P,j[jk(0x1e4)][m],N,d['includes'](m));}else yield this[jk(0x1d0)](h,Object[jk(0x1a8)](Object[jk(0x1a8)]({},j),{'type':'rawObject'}),N,F);return N;});}['askArrayEntry'](j,h,N,F){return __awaiter(this,void 0x0,void 0x0,function*(){const jL=a9h;if(h&&N)return!![];const K=h?'Do\x20you\x20want\x20to\x20add':'Do\x20you\x20want\x20to\x20add\x20more',{addEntry:G}=yield inquirer['prompt']([{'type':jL(0x1de),'name':jL(0x21c),'message':this[jL(0x23b)](j,K,h?F:undefined),'default':![]}]);return G;});}[a9y(0x1d0)](j,h,N,F){return __awaiter(this,void 0x0,void 0x0,function*(){const jA=a9h;let K;const G=j[jA(0x237)]('.');switch(h===null||h===void 0x0?void 0x0:h[jA(0x191)]){case jA(0x26c):{let d=!![];while(yield this['askArrayEntry'](j,d,F,h===null||h===void 0x0?void 0x0:h['description'])){const x=_['get'](N,G);_[jA(0x1a6)](N,G),yield this[jA(0x1d0)](j,h[jA(0x29d)],N);const m=_[jA(0x294)](N,G);!_[jA(0x278)](x)?_[jA(0x23a)](N,G,[m]):(x[jA(0x1df)](m),_['set'](N,G,x)),d=![];}return K||[];}case'object':{return K=yield this['getInnerType'](h,j,N,F),K;}case jA(0x28b):K=(0x0,utils_1[jA(0x1ad)])(yield this[jA(0x1b5)](j,h,F))||undefined;break;case jA(0x1aa):case jA(0x29f):case jA(0x1a1):default:K=yield this['ask'](j,h,F,N);break;}return!_['isUndefined'](K)&&_['set'](N,G,K),K;});}[a9y(0x1b5)](j,h,N,F){var K;return __awaiter(this,void 0x0,void 0x0,function*(){const jv=a9h,G=j[j[jv(0x1c9)]-0x1],{defaultValue:defaultValue=(K=h===null||h===void 0x0?void 0x0:h[jv(0x1f1)])!==null&&K!==void 0x0?K:h===null||h===void 0x0?void 0x0:h[jv(0x24a)],choices:choices=h===null||h===void 0x0?void 0x0:h[jv(0x194)],pagination:d}=yield(0x0,api_helpers_1['fetchResourceList'])(G,this['apiClient'],this['tmpCmdPath'],F,this[jv(0x204)],j);let x='input';if(!_[jv(0x246)](choices)&&choices['length']>0x0){if(d!==undefined&&d[jv(0x227)]!==undefined)x=jv(0x1d6);else choices[jv(0x1c9)]>0x4&&typeof choices[0x0]===jv(0x1aa)?x=jv(0x266):x=jv(0x263);}else{if((h===null||h===void 0x0?void 0x0:h['type'])===jv(0x29f))x=jv(0x1de);else{if((h===null||h===void 0x0?void 0x0:h['type'])===jv(0x1a1))x=jv(0x1ec);else(h===null||h===void 0x0?void 0x0:h[jv(0x191)])==='rawObject'&&(x=jv(0x267));}}let m=N!==![]?!_[jv(0x298)](defaultValue)?defaultValue:JSON[jv(0x23c)](defaultValue):_[jv(0x1ce)](defaultValue)?defaultValue:jv(0x236);if(choices)m=m[jv(0x1c8)]();_[jv(0x265)](this[jv(0x199)],j[jv(0x237)]('.'))&&(m=this[jv(0x199)][j[jv(0x237)]('.')]);const P=choices&&N===![]?['don\x27t\x20change',...choices]:choices,e=(h===null||h===void 0x0?void 0x0:h['type'])===jv(0x1a1),I=Object[jv(0x1a8)]({'type':x,'name':'id','message':this[jv(0x1ea)](j,h),'choices':P,'default':m,'filter':this['filter'](x,N),'validate':this[jv(0x25b)](h,N,e)},d),X=(yield inquirer[jv(0x223)]([I]))['id'];if(X===jv(0x236)||X==='')return undefined;if(e)return parseInt(X,0xa);return X;});}['getQuestionString'](j,h){const js=a9y,N=(h===null||h===void 0x0?void 0x0:h[js(0x191)])!==js(0x29f)?js(0x201):js(0x29e);return this[js(0x23b)](j,N,h===null||h===void 0x0?void 0x0:h[js(0x26d)]);}[a9y(0x286)](){return __awaiter(this,void 0x0,void 0x0,function*(){const jU=a9h,j=yield this[jU(0x1e3)][jU(0x263)][jU(0x1c0)][jU(0x1cc)]({})['then'](h=>h[jU(0x229)][jU(0x1c0)][jU(0x1f4)](N=>N['id']));return yield this['askForResource']('project',j);});}['askForProjectScopedResource'](j,h,N,F){return __awaiter(this,void 0x0,void 0x0,function*(){const jr=a9h,K=N||this[jr(0x1e3)]['contextProvider']['getCurrentProjectName']();if(_[jr(0x246)](K))throw new Error('Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.');const G=yield h(K);return yield this[jr(0x1ac)](j,G,(F?F+jr(0x244):'')+jr(0x198)+K+'\x27');});}['askForProjectScopedResourcePaginated'](j,h,N,F){return __awaiter(this,void 0x0,void 0x0,function*(){const jV=a9h,K=N||this['apiClient']['contextProvider'][jV(0x1ff)]();if(_[jV(0x246)](K))throw new Error(jV(0x233));const G=yield h(K);return yield this['askForResourcePaginated'](j,G,(F?F+jV(0x244):'')+jV(0x198)+K+'\x27');});}[a9y(0x295)](){return __awaiter(this,void 0x0,void 0x0,function*(){const jf=a9h,j=yield this['apiClient'][jf(0x263)][jf(0x25a)]['all']({}),h=j['data']['domains'][jf(0x1f4)](N=>N[jf(0x196)]);return this[jf(0x1ac)]('domain',h);});}[a9y(0x27c)](){return __awaiter(this,void 0x0,void 0x0,function*(){const jO=a9h,j=yield this[jO(0x1e3)][jO(0x263)][jO(0x249)]['all']({}),h=j[jO(0x229)][jO(0x1d1)]['map'](N=>N['id']);return this[jO(0x1ac)](jO(0x1d1),h);});}['setPathVars'](j){this['pathVars']=j;}}exports[a9y(0x1a0)]=InquirerHelper;
|
|
1
|
+
'use strict';const a9s=a9B;(function(I,B){const r=a9B,J=I();while(!![]){try{const C=-parseInt(r(0x114))/0x1+-parseInt(r(0x14f))/0x2+parseInt(r(0xf8))/0x3+parseInt(r(0x195))/0x4+parseInt(r(0xc7))/0x5*(-parseInt(r(0x173))/0x6)+-parseInt(r(0x172))/0x7*(-parseInt(r(0x17a))/0x8)+parseInt(r(0xf7))/0x9*(parseInt(r(0x164))/0xa);if(C===B)break;else J['push'](J['shift']());}catch(G){J['push'](J['shift']());}}}(a9I,0xc3568));function a9B(I,B){const J=a9I();return a9B=function(C,G){C=C-0x9c;let F=J[C];return F;},a9B(I,B);}function a9I(){const IR=['split','No\x20containers\x20found','enum','createdAt','getType','must\x20be\x20shorter\x20than\x20or\x20equal\x20to\x20','volumes','unset','.\x20This\x20is\x20irreversible.\x20Please\x20confirm!','askForService','prompt','includes','addons','Something\x20unexpected\x20happened.','askForCredentials','deleteWarningPrompt','input','defaultPaginationPageSize','./pagination/inquirer-pagination-prompt','editor','Choose\x20the\x20login\x20token:','clusters','editPayload','token','max','toUpperCase','cluster\x20id','3923240DdKYNg','InquirerHelper','search-list','loginPrompt','Enter\x20the\x20','required','\x20(completedAt:\x20','askForJob','string','all-job-runs','askForAddon','REPEAT','body','domain\x20(','\x20(full\x20domain:\x20','__setModuleDefault','registryCredentials','\x20Example:\x20','this\x20option\x20is\x20required,\x20please\x20answer','saveFile','),\x20subdomain\x20(','project:\x20\x27','hasOwnProperty','cmdPath','confirmationPrompt','Configuration\x20file\x20written\x20to\x20','properties','skipValidation','prototype','service','must\x20be\x20longer\x20than\x20or\x20equal\x20to\x20','volume','fetchResourceList','templates','ABORT','getOwnPropertyDescriptor','chalk','oneOf','addon:\x20\x27','repeat','askForAddonBackup','confirmation','subdomains','services','askForTemplateRun','subdomainPath','whiteBright','confirm','54ignXvx','4260720EFSPzq','pipeline','integer','askForBuild','secrets','askForLogSink','\x20and\x20it\x20','SAVE','name','don\x27t\x20change','js-yaml','isUndefined','password','doesn\x27t\x20match\x20pattern\x20\x27','throw','askForTemplate','list','restores','underline','askForResourcePaginated','askConfirm','\x20characters','projects','\x27\x20already\x20exists.\x20Do\x20you\x20want\x20to\x20override\x20this\x20context\x20(y)\x20or\x20enter\x20a\x20new\x20name\x20(N)?','__importStar','templateRuns','Provide\x20a\x20file\x20path\x20to\x20write\x20the\x20configuration\x20to\x20(<name>.[json|yaml|yml])','template','1197789yhjpNW','next','tmpCmdPath','unshift','minLength','writeFileSync','backupDestinations','logSinks',',\x20supported\x20types:\x20[json|yaml|yml]','What\x27s\x20the\x20','success','greenBright','lodash','must\x20be\x20smaller\x20than\x20or\x20equal\x20to\x20','askForDomain','propToType','filter','pagination','anyOf','type','backup\x20destination','bold','restore','job','getQuestionString','set','Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.','not\x20completed','EDIT','blue','\x20in\x20','all-containers','red','for\x20this\x20','job\x20runs','contextProvider','tokenPrompt','boolean','get','log\x20sink','fileName','inquirer','askForClusterId','No,\x20repeat','paths','join','create','ask','maximum','pathVars','./utils','WARNING:\x20You\x20are\x20about\x20to\x20delete\x20','__awaiter','minimum','a\x20Northflank\x20resource','all','main-context','askGeneric','cursor','1802900kQlJRG','green','__createBinding','writable','pipelines','maxLength','values','override','Choose\x20the\x20','backup','askForJobRun','fullName','retry','choice','rawObject','length','found','pagination-prompt','tags','then','getPathString','626590WvEElm','defineProperty','askForSubdomain','Do\x20you\x20want\x20to\x20add','object','getCurrentProjectName','configurable','Yes,\x20send','askForProject','apply','secret','setPathVars','__esModule','askForPipeline','595rLiYsf','6CFZzAM','credentials','load','backups','concat','addEntry','job:\x20\x27','69808TTqskz','bgGrey','has','example','uri','askArrayEntry','map','Choose\x20the\x20name\x20of\x20the\x20new\x20local\x20context:','\x20characters,\x20is\x20','\x20(startedAt:\x20','askForResource','find','askForProjectScopedResourcePaginated','to\x20use:','addon','validate','tag','jobs','\x20to\x20use:','call','warning','askForAddonRestore','Context\x20name\x20already\x20exists.','__importDefault','containers','No\x20','askForProjectScopedResource','4584348IpVVSp','YES','startedAt','\x20type?','push','slice','pattern','Context\x20with\x20name\x20\x27','domains','stringify','isValidJSON','resultCache','trim','items','isBoolean','data','default','json','test','apiClient','nextCursor','domain','description','builds','array','runs','dump','What\x20do\x20you\x20want\x20to\x20use\x20as','service:\x20\x27','toString','registerPrompt','askForVolume','Do\x20you\x20want\x20to\x20add\x20more','project','cloud','subdomain','yellowBright','completedAt','pop'];a9I=function(){return IR;};return a9I();}var __createBinding=this&&this[a9s(0x151)]||(Object[a9s(0x142)]?function(I,B,J,C){const K=a9s;if(C===undefined)C=J;var G=Object[K(0xea)](B,J);(!G||('get'in G?!B[K(0x170)]:G[K(0x152)]||G[K(0x16a)]))&&(G={'enumerable':!![],'get':function(){return B[J];}}),Object['defineProperty'](I,C,G);}:function(I,B,J,C){if(C===undefined)C=J;I[C]=B[J];}),__setModuleDefault=this&&this[a9s(0xd6)]||(Object['create']?function(I,B){const b=a9s;Object[b(0x165)](I,b(0x1a5),{'enumerable':!![],'value':B});}:function(I,B){const W=a9s;I[W(0x1a5)]=B;}),__importStar=this&&this[a9s(0x110)]||(function(){var I=function(B){return I=Object['getOwnPropertyNames']||function(J){const u=a9B;var C=[];for(var G in J)if(Object[u(0xe3)][u(0xdd)][u(0x18d)](J,G))C[C[u(0x15e)]]=G;return C;},I(B);};return function(B){const h=a9B;if(B&&B[h(0x170)])return B;var J={};if(B!=null){for(var C=I(B),G=0x0;G<C['length'];G++)if(C[G]!==h(0x1a5))__createBinding(J,B,C[G]);}return __setModuleDefault(J,B),J;};}()),__awaiter=this&&this[a9s(0x148)]||function(I,B,J,C){function G(F){return F instanceof J?F:new J(function(A){A(F);});}return new(J||(J=Promise))(function(F,A){const o=a9B;function H(X){const q=a9B;try{d(C[q(0x115)](X));}catch(S){A(S);}}function t(X){const x=a9B;try{d(C[x(0x106)](X));}catch(S){A(S);}}function d(X){const g=a9B;X['done']?F(X['value']):G(X['value'])[g(0x162)](H,t);}d((C=C[o(0x16d)](I,B||[]))['next']());});},__importDefault=this&&this[a9s(0x191)]||function(I){const O=a9s;return I&&I[O(0x170)]?I:{'default':I};};Object[a9s(0x165)](exports,a9s(0x170),{'value':!![]}),exports[a9s(0xc8)]=void 0x0;const _=__importStar(require(a9s(0x120))),chalk_1=__importDefault(require(a9s(0xeb))),fs=__importStar(require('fs')),utils_1=require(a9s(0x146)),api_helpers_1=require('./api-helpers'),inquirer_pagination_prompt_1=require(a9s(0xbe)),inquirer=require(a9s(0x13d)),inquirerSearchList=require('inquirer-search-list'),yaml=require(a9s(0x102));var ConfirmChoices;(function(I){const p=a9s;I['YES']=p(0x16b),I['REPEAT']=p(0x13f),I[p(0x130)]='No,\x20edit',I[p(0xff)]='No,\x20but\x20save\x20as\x20file',I[p(0xe9)]='No,\x20abort';}(ConfirmChoices||(ConfirmChoices={})));class InquirerHelper{constructor(I){const w=a9s;this[w(0x1a8)]=I,this['defaultPaginationPageSize']=0x32,this[w(0xc2)]=B=>__awaiter(this,void 0x0,void 0x0,function*(){const Z=w,{editedResult:J}=yield inquirer[Z(0xb6)]([{'type':Z(0xbf),'name':'editedResult','message':'Go\x20to\x20editor','default':yaml[Z(0x9f)](B)}]);return yaml[Z(0x175)](J);}),this[w(0xda)]=B=>__awaiter(this,void 0x0,void 0x0,function*(){const z=w,J=A=>'Unexpected\x20file\x20type:\x20'+A+z(0x11c);function C(){return __awaiter(this,void 0x0,void 0x0,function*(){const Q=a9B;return inquirer[Q(0xb6)]([{'type':Q(0xbc),'name':Q(0x13c),'message':Q(0x112),'validate':A=>new RegExp('.*\x5c.(json|yaml|yml)$')[Q(0x1a7)](A)?!![]:J(A)}]);});}const {fileName:G}=yield C(),F=G[z(0xa2)]()[z(0xac)]('.')[z(0xab)]();try{switch(F){case z(0x1a6):(0x0,utils_1[z(0x11e)])(z(0xe0)+G);return fs['writeFileSync'](G,JSON[z(0x19e)](B,null,'\x20\x20'));case'yaml':case'yml':(0x0,utils_1[z(0x11e)])(z(0xe0)+G);return fs[z(0x119)](G,yaml['dump'](B));default:(0x0,utils_1[z(0x18e)])(J(F));}}catch(A){(0x0,utils_1[z(0x18e)])('Writing\x20configuration\x20failed:\x20'+A['message']);}return undefined;}),this[w(0x124)]=(B,J)=>C=>{const l=w,G=typeof C===l(0xcf)?C[l(0x1a1)]():C;return J===![]&&G===l(0x101)?'':G;},this[w(0x189)]=(B,J,C)=>G=>{const n=w;if(this[n(0xe2)]===!![])return!![];const F=[];if(G===''||G===n(0x101)){if(J!==![])F[n(0x199)](n(0xd9));else return!![];}B[n(0x127)]===n(0xcf)&&!_[n(0x103)](B['pattern'])&&F[n(0x199)](new RegExp(B['pattern'])[n(0x1a7)](G)?!![]:n(0x105)+B[n(0x19b)]+'\x27');B[n(0x127)]===n(0xcf)&&!_[n(0x103)](B[n(0x118)])&&F[n(0x199)](G[n(0x15e)]>=B['minLength']?!![]:n(0xe5)+B[n(0x118)]+n(0x182)+G[n(0x15e)]+n(0x10d));B[n(0x127)]===n(0xcf)&&!_[n(0x103)](B[n(0x154)])&&F['push'](G[n(0x15e)]<=B[n(0x154)]?!![]:n(0xb1)+B[n(0x154)]+n(0x182)+G[n(0x15e)]+n(0x10d));C&&Number['isNaN'](parseInt(G,0xa))&&F[n(0x199)]('must\x20be\x20a\x20number,\x20is\x20'+G);B[n(0x127)]===n(0xfa)&&!_[n(0x103)](B[n(0x149)])&&F[n(0x199)](G>=B[n(0x149)]?!![]:'must\x20be\x20bigger\x20than\x20or\x20equal\x20to\x20'+B['minimum']);B[n(0x127)]===n(0xfa)&&!_['isUndefined'](B[n(0x144)])&&F[n(0x199)](G<=B[n(0x144)]?!![]:n(0x121)+B[n(0x144)]);if(B[n(0x127)]===n(0x15d)){const t=(0x0,utils_1[n(0x19f)])(G);F[n(0x199)](t===![]||_['isEmpty'](t)?'must\x20be\x20a\x20valid\x20non-empty\x20json\x20string':!![]);}const A=F[n(0x124)](d=>d!==!![]),H=(B===null||B===void 0x0?void 0x0:B[n(0x17d)])?'\x0a'+chalk_1[n(0x1a5)][n(0x134)]('>>')+n(0xd8)+chalk_1[n(0x1a5)][n(0xf5)](JSON[n(0x19e)](B[n(0x17d)])):'';return A[n(0x15e)]>0x0?A[n(0x141)](chalk_1[n(0x1a5)][n(0x10a)](n(0xfe)))+H:!![];},this['getPathString']=(B,J,C)=>{const m=w,G=B[B[m(0x15e)]-0x1];function F(){const E=m;return B[E(0x19a)](0x0,-0x1)[E(0x180)](t=>t['charAt'](0x0)[E(0xc5)]()+t[E(0x19a)](0x1))[E(0x141)]('>');}const A=B['length']>0x1?chalk_1['default'][m(0x17b)]['whiteBright'](F())+':\x20':'',H=C?'\x20('+chalk_1[m(0x1a5)]['blue'](C)+')':'';return chalk_1[m(0x1a5)]['reset'](''+A+J+'\x20'+chalk_1[m(0x1a5)][m(0x129)][m(0x11f)](G)+H+'?');},this[w(0x184)]=(B,J,C)=>__awaiter(this,void 0x0,void 0x0,function*(){const j=w;if(J[j(0x15e)]<0x1){const A=C?j(0x135)+C:j(0x15f);throw new Error('No\x20'+B+'\x20'+A+'.');}const G=j(0x157)+B+j(0x18c),F=J['length']>0x4?j(0xc9):'list';return(yield inquirer[j(0xb6)]([{'type':F,'name':j(0x100),'message':G,'choices':J}]))[j(0x100)];}),this[w(0x10b)]=(B,J,C)=>__awaiter(this,void 0x0,void 0x0,function*(){const U=w,{elements:G,nextCursor:F}=yield J();if(G[U(0x15e)]<0x1){const t=C?U(0x135)+C:U(0x15f);throw new Error(U(0x193)+B+'\x20'+t+'.');}const A=U(0x157)+B+U(0x18c);if(F!==undefined){const d=X=>__awaiter(this,[X],void 0x0,function*({nextPageCursor:S}){const D=U,f=yield J(S);return{'elements':f['elements'],'nextPageCursor':f[D(0x1a9)]};});return(yield inquirer['prompt']([{'type':'pagination-prompt','name':U(0x100),'message':A,'choices':G,'nextPageCursor':F,'loadMore':d}]))[U(0x100)];}const H=G['length']>0x4?U(0xc9):'list';return(yield inquirer[U(0xb6)]([{'type':H,'name':U(0x100),'message':A,'choices':G}]))[U(0x100)];}),this[w(0x14d)]=(B,J)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const M=w,C=''+(J?'('+chalk_1[M(0x1a5)][M(0x131)](J)+')\x20':''),G=M(0xcb)+chalk_1[M(0x1a5)][M(0x150)](B)+'\x20'+C+M(0x187),F=this[M(0x189)]({'type':'string','required':!![]});return(yield inquirer[M(0xb6)]([{'type':M(0xbc),'name':M(0x100),'message':G,'validate':F}]))[M(0x100)];}),this[w(0x10c)]=B=>__awaiter(this,void 0x0,void 0x0,function*(){const R=w;return(yield inquirer[R(0xb6)]([{'type':R(0xf6),'name':R(0x100),'message':B,'default':!![]}]))[R(0x100)];}),this[w(0xb5)]=B=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const P=w,J=C=>__awaiter(this,void 0x0,void 0x0,function*(){const Y=a9B,G=yield this[Y(0x1a8)][Y(0x108)][Y(0xf2)]['all']({'parameters':{'projectId':C}}),F=G[Y(0x1a4)][Y(0xf2)][Y(0x180)](A=>A['id']);return F;});return this[P(0x194)](P(0xe4),J,B);}),this[w(0x107)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const L=w,B=J=>__awaiter(this,void 0x0,void 0x0,function*(){const k=a9B;var C;const G=yield this[k(0x1a8)]['list'][k(0xe8)]({'options':{'per_page':this[k(0xbd)],'cursor':J}}),F=G['data'][k(0xe8)][k(0x180)](A=>A['id']);return{'elements':F,'nextCursor':(C=G[k(0x125)])===null||C===void 0x0?void 0x0:C[k(0x14e)]};});return this[L(0x10b)](L(0x113),B);}),this['askForTag']=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const T=w,B=J=>__awaiter(this,void 0x0,void 0x0,function*(){const N=a9B;var C,G,F;const A=yield this[N(0x1a8)][N(0x108)]['tags']({'options':{'per_page':this[N(0xbd)],'cursor':J}}),H=(G=(C=A[N(0x1a4)][N(0x161)])===null||C===void 0x0?void 0x0:C[N(0x180)](t=>t['id']))!==null&&G!==void 0x0?G:[];return{'elements':H,'nextCursor':(F=A['pagination'])===null||F===void 0x0?void 0x0:F[N(0x14e)]};});return this[T(0x10b)](T(0x18a),B);}),this['askForBackupDestination']=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const y=w;var B;const J=yield this[y(0x1a8)][y(0x108)][y(0x11a)]['all']({}),C=(B=J[y(0x1a4)][y(0x11a)][y(0x180)](G=>G[y(0x100)]))!==null&&B!==void 0x0?B:[];return this[y(0x184)](y(0x128),C);}),this[w(0x13e)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const i=w,B=J=>__awaiter(this,void 0x0,void 0x0,function*(){const e=a9B;var C,G,F;const A=yield this[e(0x1a8)]['list'][e(0xa7)][e(0xc1)]({'options':{'per_page':this[e(0xbd)],'cursor':J}}),H=(G=(C=A[e(0x1a4)][e(0xc1)])===null||C===void 0x0?void 0x0:C[e(0x180)](t=>t[e(0x100)]))!==null&&G!==void 0x0?G:[];return{'elements':H,'nextCursor':(F=A[e(0x125)])===null||F===void 0x0?void 0x0:F[e(0x14e)]};});return this[i(0x10b)](i(0xc6),B);}),this[w(0xf3)]=B=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const I1=w;if(_['isUndefined'](B))throw new Error('Template\x20id\x20not\x20provided.');const J=C=>__awaiter(this,void 0x0,void 0x0,function*(){const I0=a9B;var G;let F=this['defaultPaginationPageSize'];const A=yield this[I0(0x1a8)][I0(0x108)][I0(0x111)]({'parameters':{'templateId':B},'options':{'per_page':F,'cursor':C}}),H=A[I0(0x1a4)]['templateRuns'][I0(0x180)](t=>t['id']+I0(0x183)+t[I0(0xaf)]+')');return{'elements':H,'nextCursor':(G=A[I0(0x125)])===null||G===void 0x0?void 0x0:G[I0(0x14e)]};});return this[I1(0x10b)]('template\x20run',J)[I1(0x162)](C=>C[I1(0xac)]('\x20')[0x0]);}),this[w(0xfd)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const I3=w,B=J=>__awaiter(this,void 0x0,void 0x0,function*(){const I2=a9B;var C;let G=this[I2(0xbd)];const F=yield this[I2(0x1a8)]['list'][I2(0x11b)]({'options':{'per_page':G,'cursor':J}}),A=F['data'][I2(0x11b)][I2(0x180)](H=>H['id']);return{'elements':A,'nextCursor':(C=F[I2(0x125)])===null||C===void 0x0?void 0x0:C['cursor']};});return this['askForResourcePaginated'](I3(0x13b),B);}),this[w(0x171)]=B=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const I5=w,J=C=>__awaiter(this,void 0x0,void 0x0,function*(){const I4=a9B,G=yield this[I4(0x1a8)][I4(0x108)][I4(0x153)]['all']({'parameters':{'projectId':C}});return G['data'][I4(0x153)][I4(0x180)](F=>F['id']);});return this[I5(0x194)](I5(0xf9),J,B);}),this[w(0xce)]=B=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const I7=w,J=C=>__awaiter(this,void 0x0,void 0x0,function*(){const I6=a9B,G=yield this[I6(0x1a8)]['list'][I6(0x18b)][I6(0x14b)]({'parameters':{'projectId':C}}),F=G[I6(0x1a4)][I6(0x18b)]['map'](A=>A['id']);return F;});return this['askForProjectScopedResource'](I7(0x12b),J,B);}),this[w(0x159)]=(B,J,C=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const I8=w,G=I8(0xd0),F=A=>H=>__awaiter(this,void 0x0,void 0x0,function*(){const I9=I8;var t;const d=yield this[I9(0x1a8)][I9(0x13a)]['job'][I9(0x9e)]({'parameters':{'projectId':A,'jobId':B},'options':{'per_page':this[I9(0xbd)],'cursor':H}}),X=d['data']['runs'][I9(0x180)](S=>S['id']+I9(0x183)+S[I9(0x197)]+')');return C&&X[I9(0x117)](G),{'elements':X,'nextCursor':(t=d[I9(0x125)])===null||t===void 0x0?void 0x0:t[I9(0x14e)]};});return this['askForProjectScopedResourcePaginated'](I8(0x136),F,J,I8(0x179)+B+'\x27')['then'](A=>{const II=I8,H=A[II(0xac)]('\x20')[0x0];if(H===G)return undefined;return H;});}),this[w(0xfb)]=(B,J,C,G=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const IJ=w,F='all-builds';if(C!==undefined){const A=H=>t=>__awaiter(this,void 0x0,void 0x0,function*(){const IB=a9B;var d;const X=yield this[IB(0x1a8)]['get']['job'][IB(0x9c)]({'parameters':{'projectId':H,'jobId':C},'options':{'per_page':this[IB(0xbd)],'cursor':t}}),S=X[IB(0x1a4)]['builds'][IB(0x180)](f=>f['id']+'\x20(startedAt:\x20'+f['createdAt']+')');return G&&S[IB(0x117)](F),{'elements':S,'nextCursor':(d=X[IB(0x125)])===null||d===void 0x0?void 0x0:d['cursor']};});return this[IJ(0x186)]('job\x20builds',A,B,'job:\x20\x27'+C+'\x27')[IJ(0x162)](H=>{const IC=IJ,t=H[IC(0xac)]('\x20')[0x0];if(t===F)return undefined;return t;});}if(J!==undefined){const H=t=>d=>__awaiter(this,void 0x0,void 0x0,function*(){const IG=IJ;var X;const S=yield this[IG(0x1a8)]['get']['service'][IG(0x9c)]({'parameters':{'projectId':t,'serviceId':J},'options':{'per_page':this[IG(0xbd)],'cursor':d}}),f=S[IG(0x1a4)][IG(0x9c)][IG(0x180)](v=>v['id']+IG(0x183)+v[IG(0xaf)]+')');if(G)f['unshift'](F);return{'elements':f,'nextCursor':(X=S[IG(0x125)])===null||X===void 0x0?void 0x0:X[IG(0x14e)]};});return this[IJ(0x186)]('service\x20build',H,B,IJ(0xa1)+C+'\x27')[IJ(0x162)](t=>{const IF=IJ,d=t[IF(0xac)]('\x20')[0x0];if(d===F)return undefined;return d;});}throw new Error('No\x20builds\x20found');}),this['askForContainer']=(B,J,C,G=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const IA=w,F=IA(0x133);if(C!==undefined){const A=H=>t=>__awaiter(this,void 0x0,void 0x0,function*(){const IH=IA;var d,X;const S=yield this[IH(0x1a8)][IH(0x13a)][IH(0x12b)]['containers']({'parameters':{'projectId':H,'jobId':C},'options':{'per_page':this[IH(0xbd)],'cursor':t}}),f=(d=S['data'][IH(0x192)])!==null&&d!==void 0x0?d:[],v=f===null||f===void 0x0?void 0x0:f['map'](a=>a[IH(0x100)]+IH(0x183)+a[IH(0xaf)]+')');return G&&v['unshift'](F),{'elements':v,'nextCursor':(X=S[IH(0x125)])===null||X===void 0x0?void 0x0:X[IH(0x14e)]};});return this[IA(0x186)]('job\x20containers',A,B,IA(0x179)+C+'\x27')[IA(0x162)](H=>{const It=IA,t=H[It(0xac)]('\x20')[0x0];if(t===F)return undefined;return t;});}if(J!==undefined){const H=t=>d=>__awaiter(this,void 0x0,void 0x0,function*(){const Id=IA;var X,S;const f=yield this['apiClient'][Id(0x13a)]['service'][Id(0x192)]({'parameters':{'projectId':t,'serviceId':J},'options':{'per_page':this[Id(0xbd)],'cursor':d}}),v=(X=f['data']['containers'])!==null&&X!==void 0x0?X:[],a=v['map'](V=>V['name']+Id(0x183)+V['createdAt']+')');if(G)a===null||a===void 0x0?void 0x0:a['unshift'](F);return{'elements':a,'nextCursor':(S=f[Id(0x125)])===null||S===void 0x0?void 0x0:S['cursor']};});return this[IA(0x186)]('service\x20containers',H,B,IA(0xa1)+C+'\x27')[IA(0x162)](t=>{const d=t['split']('\x20')[0x0];if(d===F)return undefined;return d;});}throw new Error(IA(0xad));}),this[w(0xd1)]=B=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const IS=w,J=C=>__awaiter(this,void 0x0,void 0x0,function*(){const IX=a9B,G=yield this[IX(0x1a8)][IX(0x108)][IX(0xb8)][IX(0x14b)]({'parameters':{'projectId':C}});return G[IX(0x1a4)]['addons'][IX(0x180)](F=>F['id']);});return this[IS(0x194)]('addon',J,B);}),this[w(0xef)]=(B,J)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Iv=w,C=G=>F=>__awaiter(this,void 0x0,void 0x0,function*(){const If=a9B;var A;const H=yield this['apiClient'][If(0x13a)][If(0x188)][If(0x176)]({'parameters':{'projectId':G,'addonId':J},'options':{'per_page':this[If(0xbd)],'cursor':F}});return{'elements':H[If(0x1a4)][If(0x176)][If(0x180)](t=>t['id']+If(0xcd)+(t[If(0xaa)]||If(0x12f))+')'),'nextCursor':(A=H[If(0x125)])===null||A===void 0x0?void 0x0:A[If(0x14e)]};});return this[Iv(0x186)]('backups',C,B,'addon:\x20\x27'+J+'\x27')[Iv(0x162)](G=>G[Iv(0xac)]('\x20')[0x0]);}),this[w(0x18f)]=(B,J,C)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const IV=w,G=F=>A=>__awaiter(this,void 0x0,void 0x0,function*(){const Ia=a9B;var H;const t=yield this[Ia(0x1a8)][Ia(0x13a)]['addon'][Ia(0x158)][Ia(0x109)]({'parameters':{'projectId':F,'addonId':J,'backupId':C},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':A}});return{'elements':t[Ia(0x1a4)][Ia(0x109)][Ia(0x180)](d=>d['id']+Ia(0xcd)+(d[Ia(0xaa)]||Ia(0x12f))+')'),'nextCursor':(H=t[Ia(0x125)])===null||H===void 0x0?void 0x0:H[Ia(0x14e)]};});return this['askForProjectScopedResourcePaginated'](IV(0x12a),G,B,IV(0xed)+J+'\x27')[IV(0x162)](F=>F[IV(0xac)]('\x20')[0x0]);}),this[w(0xa4)]=B=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Is=w,J=C=>__awaiter(this,void 0x0,void 0x0,function*(){const Ir=a9B;return(yield this[Ir(0x1a8)][Ir(0x108)][Ir(0xb2)]({'parameters':{'projectId':C}}))[Ir(0x1a4)][Ir(0x180)](G=>G['id']);});return this[Is(0x194)](Is(0xe6),J,B);}),this['askForSecret']=B=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Ib=w,J=C=>__awaiter(this,void 0x0,void 0x0,function*(){const IK=a9B,G=yield this['apiClient'][IK(0x108)][IK(0xfc)][IK(0x14b)]({'parameters':{'projectId':C}});return G[IK(0x1a4)][IK(0xfc)][IK(0x180)](F=>F['id']);});return this[Ib(0x194)](Ib(0x16e),J,B);}),this[w(0x166)]=B=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const IW=w,J=yield this[IW(0x1a8)]['get'][IW(0x1aa)]({'parameters':{'domain':B}}),C=J['data'][IW(0xf1)][IW(0x180)](F=>F[IW(0x100)]+IW(0xd5)+F[IW(0x15a)]+')'),G=IW(0xd4)+B+')';return this[IW(0x184)]('subdomain',C,G)[IW(0x162)](F=>F[IW(0xac)]('\x20')[0x0]);}),this['askForSubdomainPath']=(B,J)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Iu=w,C=yield this['apiClient']['list'][Iu(0xa8)]['path']({'parameters':{'domain':B,'subdomain':J}}),G=C[Iu(0x1a4)][Iu(0x140)][Iu(0x180)](A=>''+A[Iu(0x17e)]),F='domain\x20('+B+Iu(0xdb)+J+')';return this[Iu(0x184)](Iu(0xf4),G,F);}),this[w(0xbb)]=B=>__awaiter(this,void 0x0,void 0x0,function*(){const Ih=w;return(yield inquirer[Ih(0xb6)]([{'type':'confirm','name':Ih(0xf0),'message':chalk_1[Ih(0x1a5)][Ih(0xa9)](Ih(0x147)+(B||Ih(0x14a))+Ih(0xb4)),'default':![]}]))[Ih(0xf0)];}),this[w(0xca)]=(B,J)=>__awaiter(this,void 0x0,void 0x0,function*(){const Iq=w;_[Iq(0x103)](B[Iq(0x100)])&&(J[Iq(0x15e)]<=0x0?_[Iq(0x12d)](B,'name',Iq(0x1a5)):yield(0x0,utils_1[Iq(0x15b)])(0xa)(()=>__awaiter(this,void 0x0,void 0x0,function*(){const Ix=Iq,{name:C}=yield inquirer[Ix(0xb6)]([{'type':'input','name':'name','message':Ix(0x181),'default':Ix(0x14c)}]);if(!B[Ix(0x156)]&&J[Ix(0x185)](G=>G[Ix(0x100)]===C)){const {c:G}=yield inquirer[Ix(0xb6)]([{'type':Ix(0xf6),'name':'c','message':Ix(0x19c)+C+Ix(0x10f),'default':![]}]);if(G===![])throw new Error(Ix(0x190));_[Ix(0x12d)](B,Ix(0x156),!![]);}_[Ix(0x12d)](B,Ix(0x100),C);})));if(_['isUndefined'](B[Iq(0xc3)])){const C=yield this[Iq(0x138)]();_['set'](B,Iq(0xc3),C);}return B;}),this['tokenPrompt']=()=>__awaiter(this,void 0x0,void 0x0,function*(){const Ig=w,{token:B}=yield inquirer[Ig(0xb6)]([{'type':Ig(0x104),'name':Ig(0xc3),'mask':'*','message':Ig(0xc0)}]);return B;}),inquirer[w(0xa3)](w(0xc9),inquirerSearchList),inquirer[w(0xa3)](w(0x160),inquirer_pagination_prompt_1['DynamicReloadPaginationPrompt']);}[a9s(0xdf)](I,B){return __awaiter(this,void 0x0,void 0x0,function*(){const Io=a9B,J=yaml[Io(0x9f)](I),C=_[Io(0xc4)](J[Io(0xac)]('\x0a')['map'](A=>A[Io(0x15e)])),G=chalk_1[Io(0x1a5)]['grey']('-'[Io(0xee)](C)+'\x0a'),{confirm:F}=yield inquirer[Io(0xb6)]([{'type':Io(0x108),'name':Io(0xf6),'message':''+chalk_1['default'][Io(0x129)][Io(0x150)]('Please\x20confirm\x20following\x20configuration:\x0a')+G+chalk_1['default']['blueBright'](J)+G,'choices':Object[Io(0x155)](ConfirmChoices)}]);switch(F){case ConfirmChoices[Io(0x196)]:return I;case ConfirmChoices[Io(0xe9)]:throw new Error('Aborted.');case ConfirmChoices[Io(0xd2)]:return this['retrievePayloadViaInteractiveCli'](B);case ConfirmChoices[Io(0x130)]:return this[Io(0xdf)](yield this[Io(0xc2)](I),B);case ConfirmChoices[Io(0xff)]:yield this[Io(0xda)](I);return this[Io(0xdf)](I,B);default:throw new Error(Io(0xb9));}});}['retrievePayloadViaInteractiveCli'](I,B){return __awaiter(this,void 0x0,void 0x0,function*(){const IO=a9B;if((B===null||B===void 0x0?void 0x0:B[IO(0x1a0)])!==undefined)this[IO(0x1a0)]=B===null||B===void 0x0?void 0x0:B[IO(0x1a0)];this[IO(0x116)]=B===null||B===void 0x0?void 0x0:B[IO(0xde)],this['skipValidation']=B===null||B===void 0x0?void 0x0:B[IO(0xe2)];const J={};return yield this['propToType']([],I['opt'][IO(0xd3)],J),this[IO(0x1a0)]=J,yield this[IO(0xdf)](J,I);});}['propToType'](I,B,J,C){return __awaiter(this,void 0x0,void 0x0,function*(){const Ip=a9B;let G;if(B[Ip(0xec)]&&!_[Ip(0x17c)](B,'properties')){if(B['oneOf'][Ip(0x15e)]>0x1){const {choice:F}=yield inquirer['prompt']([{'type':Ip(0x108),'name':Ip(0x15c),'message':Ip(0x11d)+(I[I[Ip(0x15e)]-0x1]||'')+Ip(0x198),'choices':B[Ip(0xec)]['map'](A=>{const Iw=Ip;var H;return(H=A[Iw(0x1ab)])!==null&&H!==void 0x0?H:'??';})}]);G=yield this[Ip(0xb0)](I,B['oneOf']['find'](A=>A[Ip(0x1ab)]===F),J,C);}else{const A=B['oneOf'][0x0];_[Ip(0x12d)](A,Ip(0x1ab),B['description']),G=yield this['getType'](I,A,J,C);}G={};}else{if(B[Ip(0x126)]&&!_['has'](B,Ip(0xe1))){if(B[Ip(0x126)]['length']>0x1){const {choice:H}=yield inquirer[Ip(0xb6)]([{'type':Ip(0x108),'name':'choice','message':Ip(0x11d)+(I[I[Ip(0x15e)]-0x1]||'')+Ip(0x198),'choices':[...B[Ip(0x126)][Ip(0x180)](t=>{const IZ=Ip;var d;return(d=t[IZ(0x1ab)])!==null&&d!==void 0x0?d:'??';}),Ip(0x101)]}]);H!=='don\x27t\x20change'&&(G=yield this[Ip(0xb0)](I,B[Ip(0x126)][Ip(0x185)](t=>t[Ip(0x1ab)]===H),J,C));}else{const t=B[Ip(0x126)][0x0];_[Ip(0x12d)](t,'description',B[Ip(0x1ab)]),G=yield this['getType'](I,t,J,C);}G={};}else G=yield this[Ip(0xb0)](I,B,J,C);}return G;});}['getInnerType'](I,B,J,C){return __awaiter(this,void 0x0,void 0x0,function*(){const Iz=a9B;var G;if(C===![]){const {addEntry:H}=yield inquirer['prompt']([{'type':Iz(0xf6),'name':Iz(0x178),'message':this[Iz(0x163)](B,Iz(0x167),I===null||I===void 0x0?void 0x0:I['description']),'default':![]}]);if(!H)return J;}const F=Object['keys']((G=I===null||I===void 0x0?void 0x0:I[Iz(0xe1)])!==null&&G!==void 0x0?G:[]),A=I[Iz(0xcc)]||[];if(F[Iz(0x15e)]>0x0)for(const t of F){const d=B[Iz(0x177)](t);if(B[Iz(0x15e)]>0x0&&!_[Iz(0x17c)](J,B[Iz(0x141)]('.')))_[Iz(0x12d)](J,B['join']('.'),{});yield this[Iz(0x123)](d,I[Iz(0xe1)][t],J,A[Iz(0xb7)](t));}else yield this[Iz(0xb0)](B,Object['assign'](Object['assign']({},I),{'type':Iz(0x15d)}),J,C);return J;});}[a9s(0x17f)](I,B,J,C){return __awaiter(this,void 0x0,void 0x0,function*(){const IQ=a9B;if(B&&J)return!![];const G=B?'Do\x20you\x20want\x20to\x20add':IQ(0xa5),{addEntry:F}=yield inquirer[IQ(0xb6)]([{'type':IQ(0xf6),'name':IQ(0x178),'message':this[IQ(0x163)](I,G,B?C:undefined),'default':![]}]);return F;});}[a9s(0xb0)](I,B,J,C){return __awaiter(this,void 0x0,void 0x0,function*(){const Ic=a9B;let G;const F=I[Ic(0x141)]('.');switch(B===null||B===void 0x0?void 0x0:B[Ic(0x127)]){case Ic(0x9d):{let A=!![];while(yield this[Ic(0x17f)](I,A,C,B===null||B===void 0x0?void 0x0:B[Ic(0x1ab)])){const H=_[Ic(0x13a)](J,F);_[Ic(0xb3)](J,F),yield this[Ic(0xb0)](I,B[Ic(0x1a2)],J);const t=_['get'](J,F);!_['isArray'](H)?_['set'](J,F,[t]):(H[Ic(0x199)](t),_[Ic(0x12d)](J,F,H)),A=![];}return G||[];}case Ic(0x168):{return G=yield this['getInnerType'](B,I,J,C),G;}case'rawObject':G=(0x0,utils_1[Ic(0x19f)])(yield this[Ic(0x143)](I,B,C))||undefined;break;case Ic(0xcf):case'boolean':case'integer':default:G=yield this[Ic(0x143)](I,B,C,J);break;}return!_['isUndefined'](G)&&_['set'](J,F,G),G;});}[a9s(0x143)](I,B,J,C){return __awaiter(this,void 0x0,void 0x0,function*(){const Il=a9B;var G;const F=I[I['length']-0x1],{defaultValue:defaultValue=(G=B===null||B===void 0x0?void 0x0:B[Il(0x17d)])!==null&&G!==void 0x0?G:B===null||B===void 0x0?void 0x0:B[Il(0x1a5)],choices:choices=B===null||B===void 0x0?void 0x0:B[Il(0xae)],pagination:A}=yield(0x0,api_helpers_1[Il(0xe7)])(F,this['apiClient'],this[Il(0x116)],C,this[Il(0x145)],I);let H=Il(0xbc);if(!_['isUndefined'](choices)&&choices['length']>0x0){if(A!==undefined&&A['nextPageCursor']!==undefined)H=Il(0x160);else choices[Il(0x15e)]>0x4&&typeof choices[0x0]==='string'?H=Il(0xc9):H=Il(0x108);}else{if((B===null||B===void 0x0?void 0x0:B[Il(0x127)])===Il(0x139))H='confirm';else{if((B===null||B===void 0x0?void 0x0:B[Il(0x127)])===Il(0xfa))H=Il(0xbc);else(B===null||B===void 0x0?void 0x0:B[Il(0x127)])===Il(0x15d)&&(H='editor');}}let t=J!==![]?!_['isObject'](defaultValue)?defaultValue:JSON['stringify'](defaultValue):_[Il(0x1a3)](defaultValue)?defaultValue:Il(0x101);if(choices)t=t['toString']();_[Il(0x17c)](this['resultCache'],I[Il(0x141)]('.'))&&(t=this['resultCache'][I[Il(0x141)]('.')]);const d=choices&&J===![]?[Il(0x101),...choices]:choices,X=(B===null||B===void 0x0?void 0x0:B[Il(0x127)])==='integer',S=Object['assign']({'type':H,'name':'id','message':this[Il(0x12c)](I,B),'choices':d,'default':t,'filter':this['filter'](H,J),'validate':this[Il(0x189)](B,J,X)},A),f=(yield inquirer['prompt']([S]))['id'];if(f===Il(0x101)||f==='')return undefined;if(X)return parseInt(f,0xa);return f;});}['getQuestionString'](I,B){const In=a9s,J=(B===null||B===void 0x0?void 0x0:B[In(0x127)])!=='boolean'?In(0xa0):'Should\x20it\x20be';return this[In(0x163)](I,J,B===null||B===void 0x0?void 0x0:B[In(0x1ab)]);}[a9s(0x16c)](){return __awaiter(this,void 0x0,void 0x0,function*(){const Im=a9B,I=yield this['apiClient'][Im(0x108)][Im(0x10e)]['all']({})[Im(0x162)](B=>B[Im(0x1a4)][Im(0x10e)][Im(0x180)](J=>J['id']));return yield this[Im(0x184)](Im(0xa6),I);});}[a9s(0x194)](I,B,J,C){return __awaiter(this,void 0x0,void 0x0,function*(){const IE=a9B,G=J||this[IE(0x1a8)][IE(0x137)][IE(0x169)]();if(_[IE(0x103)](G))throw new Error(IE(0x12e));const F=yield B(G);return yield this['askForResource'](I,F,(C?C+IE(0x132):'')+IE(0xdc)+G+'\x27');});}[a9s(0x186)](I,B,J,C){return __awaiter(this,void 0x0,void 0x0,function*(){const Ij=a9B,G=J||this[Ij(0x1a8)][Ij(0x137)]['getCurrentProjectName']();if(_[Ij(0x103)](G))throw new Error(Ij(0x12e));const F=yield B(G);return yield this[Ij(0x10b)](I,F,(C?C+Ij(0x132):'')+Ij(0xdc)+G+'\x27');});}[a9s(0x122)](){return __awaiter(this,void 0x0,void 0x0,function*(){const IU=a9B,I=yield this[IU(0x1a8)][IU(0x108)][IU(0x19d)][IU(0x14b)]({}),B=I[IU(0x1a4)][IU(0x19d)][IU(0x180)](J=>J[IU(0x100)]);return this[IU(0x184)](IU(0x1aa),B);});}[a9s(0xba)](){return __awaiter(this,void 0x0,void 0x0,function*(){const ID=a9B,I=yield this[ID(0x1a8)]['list'][ID(0xd7)][ID(0x14b)]({}),B=I[ID(0x1a4)][ID(0x174)][ID(0x180)](J=>J['id']);return this[ID(0x184)](ID(0x174),B);});}[a9s(0x16f)](I){const IM=a9s;this[IM(0x145)]=I;}}exports[a9s(0xc8)]=InquirerHelper;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';var a10u=a10B;(function(I,B){var W=a10B,J=I();while(!![]){try{var C=-parseInt(W(0x1a7))/0x1+parseInt(W(0x181))/0x2*(parseInt(W(0x188))/0x3)+-parseInt(W(0x194))/0x4+-parseInt(W(0x18b))/0x5+parseInt(W(0x176))/0x6*(parseInt(W(0x179))/0x7)+-parseInt(W(0x19a))/0x8+-parseInt(W(0x182))/0x9*(-parseInt(W(0x1a5))/0xa);if(C===B)break;else J['push'](J['shift']());}catch(G){J['push'](J['shift']());}}}(a10I,0xd56ee));function a10B(I,B){var J=a10I();return a10B=function(C,G){C=C-0x168;var F=J[C];return F;},a10B(I,B);}var __createBinding=this&&this[a10u(0x1a1)]||(Object['create']?function(I,B,J,C){var h=a10u;if(C===undefined)C=J;var G=Object[h(0x1a0)](B,J);(!G||(h(0x178)in G?!B[h(0x193)]:G['writable']||G[h(0x183)]))&&(G={'enumerable':!![],'get':function(){return B[J];}}),Object[h(0x16d)](I,C,G);}:function(I,B,J,C){if(C===undefined)C=J;I[C]=B[J];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a10u(0x185)]?function(I,B){Object['defineProperty'](I,'default',{'enumerable':!![],'value':B});}:function(I,B){var q=a10u;I[q(0x195)]=B;}),__importStar=this&&this[a10u(0x1a3)]||(function(){var I=function(B){var x=a10B;return I=Object[x(0x17e)]||function(J){var g=x,C=[];for(var G in J)if(Object[g(0x173)]['hasOwnProperty'][g(0x169)](J,G))C[C[g(0x170)]]=G;return C;},I(B);};return function(B){var o=a10B;if(B&&B[o(0x193)])return B;var J={};if(B!=null){for(var C=I(B),G=0x0;G<C['length'];G++)if(C[G]!==o(0x195))__createBinding(J,B,C[G]);}return __setModuleDefault(J,B),J;};}()),__awaiter=this&&this[a10u(0x17c)]||function(I,B,J,C){function G(F){return F instanceof J?F:new J(function(A){A(F);});}return new(J||(J=Promise))(function(F,A){var Z=a10B;function H(X){var O=a10B;try{d(C[O(0x18c)](X));}catch(S){A(S);}}function t(X){var p=a10B;try{d(C[p(0x19b)](X));}catch(S){A(S);}}function d(X){var w=a10B;X[w(0x1a4)]?F(X[w(0x180)]):G(X[w(0x180)])[w(0x1a2)](H,t);}d((C=C['apply'](I,B||[]))[Z(0x18c)]());});},__importDefault=this&&this[a10u(0x1a8)]||function(I){var z=a10u;return I&&I[z(0x193)]?I:{'default':I};};Object['defineProperty'](exports,a10u(0x193),{'value':!![]}),exports['NorthflankApiBrowserLogin']=void 0x0;const ws_1=__importStar(require('ws')),open_1=__importDefault(require(a10u(0x1a9))),events_1=require(a10u(0x196));class NorthflankApiBrowserLogin extends events_1[a10u(0x17b)]{constructor(I,B=!![],J){var Q=a10u;super(),this['baseUrl']=I,this[Q(0x186)]=B,this['agent']=J,this[Q(0x18a)]=Q(0x18e),this['initPackage']=()=>JSON['stringify']({'type':Q(0x199)});}[a10u(0x177)](){var c=a10u,I;const B=this['baseUrl'][c(0x18f)](c(0x197),c(0x16f))[c(0x18f)]('http:',c(0x175)),J=B+c(0x189),C=new ws_1['default'](J,{'agent':this[c(0x198)]}),G=()=>__awaiter(this,void 0x0,void 0x0,function*(){var n=c;yield new Promise(A=>{var l=a10B,H;(H=this['duplex'])===null||H===void 0x0?void 0x0:H[l(0x16e)](JSON['stringify']({'type':l(0x19c)}),()=>A());}),process[n(0x187)]();}),F=new Promise((A,H)=>{var m=c,t,d,X;try{this[m(0x19e)]=(0x0,ws_1[m(0x191)])(C),process['on'](m(0x16a),G);}catch(S){H(new Error(m(0x190)+S[m(0x16b)]));}(t=this[m(0x19e)])===null||t===void 0x0?void 0x0:t['on']('data',f=>{var E=m,v;const a=JSON[E(0x18d)](f[E(0x174)]());switch(a===null||a===void 0x0?void 0x0:a['type']){case'init-ack':{const {loginPage:V}=a;if(V===undefined){this[E(0x171)]('Unexpected\x20response',H);return;}this[E(0x186)]&&(0x0,open_1[E(0x195)])(V)['catch'](r=>{var j=E;const s='Unable\x20to\x20open\x20browser:\x20'+r[j(0x16b)];this['handleError'](s,H);});this[E(0x1a6)](E(0x17a),{'url':V});break;}case E(0x17f):{const {apiToken:r,contextName:s}=a;if(r===undefined){this['handleError']('Unexpected\x20response,\x20api\x20token\x20missing',H);return;}(v=this[E(0x19e)])===null||v===void 0x0?void 0x0:v[E(0x16e)](),A({'token':r,'contextName':s}),this[E(0x18a)]=E(0x168);break;}case E(0x184):{const K=E(0x172)+(a===null||a===void 0x0?void 0x0:a[E(0x16b)]);this['handleError'](K,H);break;}default:{const b='unable\x20to\x20parse\x20message:\x20'+JSON['stringify'](a);this[E(0x171)](b,H);}}}),(d=this[m(0x19e)])===null||d===void 0x0?void 0x0:d['on'](m(0x19d),f=>{var U=m;this[U(0x171)](U(0x1aa)+f[U(0x16b)],H);}),(X=this['duplex'])===null||X===void 0x0?void 0x0:X['on'](m(0x16e),()=>{var D=m;if(this[D(0x18a)]===D(0x168)){}else this[D(0x171)](D(0x192),H);});});return(I=this[c(0x19e)])===null||I===void 0x0?void 0x0:I['write'](this[c(0x17d)]()),this[c(0x18a)]=c(0x199),F[c(0x19f)](()=>{var M=c;process[M(0x16c)](M(0x16a),G);});}[a10u(0x171)](I,B){var R=a10u,J,C;B?(J=this[R(0x19e)])===null||J===void 0x0?void 0x0:J['end'](()=>B(new Error(I))):(C=this[R(0x19e)])===null||C===void 0x0?void 0x0:C['end'](),this[R(0x18a)]=R(0x19d);}}function a10I(){var Y=['getOwnPropertyNames','login-success','value','844574caXkTQ','9plNLJQ','configurable','login-failure','create','openBrowser','exit','3SsiTZZ','/v1/cli-login','status','7759365fhRdwS','next','parse','idle','replace','Failed\x20to\x20establish\x20connection\x20to\x20command\x20execution\x20proxy:\x20','createWebSocketStream','Login\x20process\x20stopped\x20before\x20completed','__esModule','2661464XVsGKP','default','events','https:','agent','init','5900752wDLMdx','throw','aborted','error','duplex','finally','getOwnPropertyDescriptor','__createBinding','then','__importStar','done','32016410LMwVGG','emit','537954ZRLwnx','__importDefault','open','error\x20happened\x20during\x20browser\x20login:\x20','success','call','SIGINT','message','removeListener','defineProperty','end','wss:','length','handleError','Failure\x20during\x20login:\x20','prototype','toString','ws:','4458486nVKyhe','startLogin','get','7USZuNq','browser-opened','EventEmitter','__awaiter','initPackage'];a10I=function(){return Y;};return a10I();}exports['NorthflankApiBrowserLogin']=NorthflankApiBrowserLogin;
|
package/dist/logs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a11g=a11h;(function(j,h){const o=a11h,N=j();while(!![]){try{const F=parseInt(o(0x133))/0x1*(-parseInt(o(0xe9))/0x2)+parseInt(o(0x10c))/0x3*(parseInt(o(0x168))/0x4)+-parseInt(o(0x156))/0x5*(-parseInt(o(0xe6))/0x6)+-parseInt(o(0x113))/0x7*(parseInt(o(0x15b))/0x8)+-parseInt(o(0x108))/0x9+-parseInt(o(0x10f))/0xa*(-parseInt(o(0xee))/0xb)+parseInt(o(0x12c))/0xc;if(F===h)break;else N['push'](N['shift']());}catch(K){N['push'](N['shift']());}}}(a11j,0x1de54));function a11h(j,h){const N=a11j();return a11h=function(F,K){F=F-0xd8;let G=N[F];return G;},a11h(j,h);}function a11j(){const jG=['toISOString','99IxhCCe','addonId','warning','--restore\x20--restoreId\x20[restoreId]','regexNotIncludes','setSeconds','Filter\x20log\x20lines\x20to\x20match\x20this\x20regular\x20expression','values','\x20in\x20project\x20','../formatting/console-format-helpers','error','apiClient','__esModule','alias','Get\x20log\x20for\x20the\x20specified\x20','Backup\x20to\x20get\x20logs\x20from','assign','tsHint',',\x20duration:\x20','deploymentId','Number\x20of\x20lines\x20to\x20return.','noDefaults','--regexNotIncludes\x20<regex>',',\x20from:\x20','Only\x20two\x20of\x20\x27startTime\x27,\x20\x27endTime\x27\x20and\x20\x27duration\x27\x20can\x20be\x20set.','yaml','464643uTwdDe','--deployment\x20--deploymentId\x20[deploymentId]','containerId','--textNotIncludes\x20<text>','12LEgdDC','logsApiClient','commander','100790rJPpWI','Option','--duration\x20[duration]','option','358421CntEPz','Job\x20run\x20id,\x20example:\x20162b1977-6636-4000-929b-cc265b862ff0','\x20seconds','description','Which\x20log\x20types\x20to\x20fetch','Project\x20for\x20logs','Output\x20formatting.\x20Will\x20use\x20advanced\x20formatting\x20by\x20default.','textNotIncludes','--noDefaults','hasNextPage','serviceId','choices','\x0aDetails:\x20','Tail\x20will\x20stream\x20logs\x20in\x20real-time.\x20Session\x20will\x20be\x20kept\x20open.','--textIncludes\x20<text>','getCurrentServiceName','../inquirer-helper','-f,\x20--tail','message','Error\x20while\x20tailing\x20log\x20lines:\x20','forward','getLogsCommand','InquirerHelper','\x20with\x20live-tailing','getStandardLogCommand','1534356HKIESt','jobId','done',',\x20restore\x20id\x20','parseDateInput','apply','tail','50823cJaVqy','Log\x20session\x20ended','Get\x20logs\x20generated\x20after\x20this\x20time,\x20','slice','textIncludes','logs-received','build-','Filter\x20log\x20lines\x20to\x20include\x20this\x20text','\x20for\x20container\x20','pagination','length','runId','conflicts','@northflank/js-client','Container\x20to\x20exec\x20into\x20(logs\x20from\x20all\x20containers\x20will\x20be\x20shown\x20if\x20not\x20specified)','getCurrentProjectName','getFormatter','service','yml','askForJob','addonBackup','\x20(exit\x20with\x20','-o,\x20--output\x20[output]','\x27Ctrl+C\x27','askForService','logs','\x20for\x20all\x20containers','customUserAgent','Length\x20of\x20timespan\x20in\x20seconds.\x20Only\x20valid\x20if\x20not\x20both,\x20startTime\x20and\x20endTime\x20are\x20set','details','log','askForProject','defineProperty','stringify','default','5VAmeMG','--backup\x20--backupId\x20[backupId]','Build\x20to\x20get\x20logs\x20from','--project\x20--projectId\x20[projectId]',',\x20backup\x20id\x20','24pqDVxp','assertContextExisting','close','Direction\x20of\x20logs.\x20Ignored\x20when\x20tailing.','No\x20logs\x20found\x20for\x20this\x20query.\x20Make\x20sure\x20to\x20select\x20an\x20appropriate\x20time\x20window.','__awaiter','argParser','askForBuild','buildId','\x20to\x20get\x20logs\x20from','start','CliLogs','restoreId','241676aEhJrC','Error\x20while\x20fetching\x20log\x20lines:\x20','job','addonRestore','value','addon','charAt','printInitInfo','addOption','-t,\x20--types\x20<types...>','inquirerHelper','regexIncludes','__importDefault','json','Id]','-l,\x20--lineLimit\x20[limit]','askForAddonBackup','throw','bold','valueOf','getCommand','defaultDurationSeconds','--endTime\x20<timestamp>',',\x20to:\x20','119442XlAHEa','-d,\x20--direction\x20<order>','Element\x20count\x20for\x20this\x20request\x20exceeds\x20the\x20line\x20limit,\x20output\x20was\x20truncated.\x20Cut\x20off\x20at\x20timestamp\x20','6gNGHrR','Deployment\x20id,\x20example:\x20my-service-54785f4','./log-formatter','next'];a11j=function(){return jG;};return a11j();}var __awaiter=this&&this[a11g(0x160)]||function(j,h,N,F){function K(G){return G instanceof N?G:new N(function(d){d(G);});}return new(N||(N=Promise))(function(G,d){const j1=a11h;function x(I){const c=a11h;try{e(F[c(0xec)](I));}catch(X){d(X);}}function m(I){const B=a11h;try{e(F[B(0xdf)](I));}catch(X){d(X);}}function e(I){const j0=a11h;I[j0(0x12e)]?G(I[j0(0x16c)]):K(I['value'])['then'](x,m);}e((F=F[j1(0x131)](j,h||[]))[j1(0xec)]());});},__importDefault=this&&this[a11g(0xda)]||function(j){return j&&j['__esModule']?j:{'default':j};};Object[a11g(0x153)](exports,a11g(0xfa),{'value':!![]}),exports[a11g(0x166)]=void 0x0;const js_client_1=require(a11g(0x140)),chalk_1=__importDefault(require('chalk')),utils_1=require('../utils'),inquirer_helper_1=require(a11g(0x123)),commander_1=require(a11g(0x10e)),console_format_helpers_1=require(a11g(0xf7)),log_formatter_1=require(a11g(0xeb));class CliLogs{constructor(j,h){const j2=a11g;this['apiContext']=j,this[j2(0xe3)]=0x708,this['getStandardLogCommand']=(N,F,K,G)=>{const j3=j2,d=(0x0,utils_1[j3(0xe2)])(!![])['name']((F?j3(0x139):'')+j3(0x14c))[j3(0xfb)]((F?j3(0x139):'')+'log')[j3(0x116)](j3(0xfc)+N)[j3(0x112)](j3(0x159),j3(0x118))['option']('--'+N+'\x20--'+N+'Id\x20['+N+j3(0xdc),N[j3(0x16e)](0x0)['toUpperCase']()+N[j3(0x136)](0x1)+j3(0x164))[j3(0x112)]('--container\x20--containerId\x20[containerId]',j3(0x141));if(F)d['option']('--build\x20--buildId\x20[buildId]',j3(0x158));if(N===j3(0x16a))d[j3(0x112)]('--run\x20--runId\x20[runId]',j3(0x114));if(N===j3(0x144))d[j3(0x112)](j3(0x109),j3(0xea));if(K)d[j3(0x112)](j3(0x157),j3(0xfd));if(G)d['option'](j3(0xf1),'Restore\x20to\x20get\x20logs\x20from');return!F&&!K&&!G&&d[j3(0x170)](new commander_1[(j3(0x110))](j3(0x171),j3(0x117))[j3(0x11e)](Object[j3(0xf5)](js_client_1['LogType']))),d['option'](j3(0x124),j3(0x120))[j3(0x112)](j3(0xdd),j3(0x102))['option']('--startTime\x20<timestamp>',j3(0x135)+utils_1[j3(0xff)],utils_1[j3(0x130)])[j3(0x170)](new commander_1[(j3(0x110))](j3(0xe4),'Get\x20logs\x20generated\x20before\x20this\x20time,\x20'+utils_1[j3(0xff)])[j3(0x161)](utils_1[j3(0x130)])[j3(0x13f)](['tail']))[j3(0x112)](j3(0x111),j3(0x14f))[j3(0x170)](new commander_1[(j3(0x110))](j3(0xe7),j3(0x15e))[j3(0x11e)](['backward',j3(0x127)])[j3(0x13f)]([j3(0x132)]))[j3(0x170)](new commander_1[(j3(0x110))](j3(0x121),j3(0x13a))[j3(0x13f)]([j3(0x11a),j3(0xd9),j3(0xf2)]))[j3(0x170)](new commander_1[(j3(0x110))](j3(0x10b),'Filter\x20log\x20lines\x20to\x20not\x20include\x20this\x20text')[j3(0x13f)](['textIncludes',j3(0xd9),'regexNotIncludes']))['addOption'](new commander_1[(j3(0x110))]('--regexIncludes\x20<regex>',j3(0xf4))[j3(0x13f)]([j3(0x11a),j3(0x137),j3(0xf2)]))[j3(0x170)](new commander_1['Option'](j3(0x104),'Filter\x20log\x20lines\x20to\x20not\x20match\x20this\x20regular\x20expression')['conflicts'](['textNotIncludes','regexIncludes',j3(0x137)]))[j3(0x112)](j3(0x11b),'Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.',![])[j3(0x170)](new commander_1[(j3(0x110))](j3(0x149),j3(0x119))['choices'](Object[j3(0xf5)](['format',j3(0xdb),j3(0x107)]))),d;},this[j2(0x16f)]=(N,F,K,G)=>{const j4=j2,{containerName:d,restoreId:x,backupId:m,quiet:P,tail:e,startTime:I,endTime:X,duration:l}=G;if(P===!![])return;const p=e?j4(0x148)+chalk_1[j4(0x155)][j4(0xe0)](j4(0x14a))+')':'',J=e?j4(0x12a):'',Q=new Date(),y=I!==null&&I!==void 0x0?I:new Date(new Date((X!==null&&X!==void 0x0?X:Q)['valueOf']())['setSeconds']((X!==null&&X!==void 0x0?X:Q)['getSeconds']()-(l!==null&&l!==void 0x0?l:this[j4(0xe3)]))),D=(X!==null&&X!==void 0x0?X:I!==undefined)?new Date(new Date(I[j4(0xe1)]())[j4(0xf3)](I['getSeconds']()+(l!==null&&l!==void 0x0?l:this[j4(0xe3)]))):Q,i=m!==undefined,W=y&&!i?j4(0x105)+chalk_1[j4(0x155)][j4(0xe0)](y[j4(0xed)]()):'',E=D&&!i?j4(0xe5)+chalk_1[j4(0x155)][j4(0xe0)](D['toISOString']()):'',t=l?j4(0x100)+l+j4(0x115):'',H=d?j4(0x13b)+chalk_1[j4(0x155)][j4(0xe0)](d):i?'':j4(0x14d),a=m?j4(0x15a)+m:'',q=x?j4(0x12f)+x:'',R=N+'\x20'+chalk_1[j4(0x155)]['bold'](F)+a+q+j4(0xf6)+chalk_1[j4(0x155)][j4(0xe0)](K),n=''+W+E+t;console[j4(0x151)]('>\x20Container\x20logs'+J+H+'\x20of\x20'+R+n+p+':');},this['getFormatter']=(N,F)=>(K,G)=>{const j5=j2;if(!N){if(K[j5(0x13d)]===0x0)console[j5(0x151)](j5(0x15f));K['forEach'](d=>(0x0,log_formatter_1['formatLogLine'])(d,F));}else(0x0,console_format_helpers_1['printResponse'])(N,K);(G===null||G===void 0x0?void 0x0:G[j5(0x11c)])&&(0x0,utils_1[j5(0xf0)])(j5(0xe8)+G['cursor']);},this[j2(0xf9)]=new js_client_1['ApiClient'](j,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[j2(0x14e)],'agent':h}),this[j2(0x10d)]=this[j2(0xf9)],this[j2(0xd8)]=new inquirer_helper_1[(j2(0x129))](this[j2(0xf9)]);}[a11g(0x128)](j,h=![],N=![],F=![]){const jF=a11g,K=(I,X)=>__awaiter(this,void 0x0,void 0x0,function*(){const j6=a11h,l=X[j6(0x103)],{apiContext:p,inquirerHelper:J}=this;switch(j){case j6(0x144):{const Q=l?undefined:p[j6(0x122)]();return X[j6(0x11d)]||Q||(yield J[j6(0x14b)](I)());}case'job':{const y=l?undefined:p['getCurrentJobName']();return X[j6(0x12d)]||y||(yield J[j6(0x146)](I)());}case j6(0x16d):{return X[j6(0xef)]||(yield J['askForAddon'](I)());}}}),G=(I,X,l)=>__awaiter(this,void 0x0,void 0x0,function*(){const j7=a11h;if(h)return l[j7(0x163)]||(yield this['inquirerHelper'][j7(0x162)](I,j==='service'?X:undefined,j==='job'?X:undefined,!![])());return undefined;}),d=(I,X,l)=>__awaiter(this,void 0x0,void 0x0,function*(){const j8=a11h;if(N||F)return l['backupId']||(yield this['inquirerHelper'][j8(0xde)](I,X)());return undefined;}),x=(I,X,l,p)=>__awaiter(this,void 0x0,void 0x0,function*(){const j9=a11h;if(F)return p[j9(0x167)]||(yield this[j9(0xd8)]['askForAddonRestore'](I,X,l)());return undefined;}),m=(I,X,l)=>__awaiter(this,void 0x0,void 0x0,function*(){const jj=a11h;if(!h&&l['containerId']!==undefined){if(l[jj(0x10a)]!==!![])return l[jj(0x10a)];return yield this[jj(0xd8)]['askForContainer'](I,j===jj(0x144)?X:undefined,j===jj(0x16a)?X:undefined,!![])();}return undefined;}),P=(I,X,l)=>__awaiter(this,void 0x0,void 0x0,function*(){const jh=a11h;if(j===jh(0x16a))return l[jh(0x13e)]||(yield this[jh(0xd8)]['askForJobRun'](X,I,!![])());return undefined;}),e=(I,X,l)=>__awaiter(this,void 0x0,void 0x0,function*(){const jN=a11h;if(j===jN(0x144)){if(l[jN(0x101)]!==!![])return l['deploymentId'];return l['deploymentId'];}return undefined;});return this[jF(0x12b)](j,h,N,F)['action'](I=>__awaiter(this,void 0x0,void 0x0,function*(){const jK=jF,{noDefaults:X,projectId:l,quiet:p,tail:J,types:Q,textIncludes:y,textNotIncludes:D,regexIncludes:i,regexNotIncludes:W,direction:E,lineLimit:t,startTime:H,endTime:a,duration:q,output:R}=I;(0x0,utils_1[jK(0x15c)])(this[jK(0xf9)]);const {apiContext:n,inquirerHelper:k,logsApiClient:L}=this,A=X?undefined:n[jK(0x142)](),v=l||A||(yield k[jK(0x152)]()),s=yield K(v,I),U=yield G(v,s,I),r=yield d(v,s,I),V=yield x(v,s,r,I),f=yield P(v,s,I),O=yield e(v,s,I),z=yield m(v,s,I);if(H&&a&&q)throw new Error(jK(0x106));const b={'projectId':v,'entityId':s},T={'containerName':z,'types':Q,'textIncludes':y,'textNotIncludes':D,'regexIncludes':i,'regexNotIncludes':W,'lineLimit':t,'startTime':H,'duration':q,'runId':f,'buildId':U,'backupId':r,'restoreId':V,'deploymentId':O,'isBuild':h!==null&&h!==void 0x0?h:![]},u=F?jK(0x16b):N?jK(0x147):j,Z=Object[jK(0xfe)](Object[jK(0xfe)]({},T),{'endTime':a,'direction':E});if(!p&&R!==jK(0x107)&&R!==jK(0x145)&&R!==jK(0xdb))this['printInitInfo'](j,s,v,Object[jK(0xfe)](Object[jK(0xfe)]({},Z),I));const S=this[jK(0x143)](R,y!==null&&y!==void 0x0?y:i);if(J){const Y=yield L[jK(0x14c)]['logTail'](b,T,u);Y['on'](jK(0x138),S),Y['on'](jK(0xf8),M=>(0x0,utils_1['error'])(jK(0x126)+M['message'])),Y['on'](jK(0x15d),()=>console[jK(0x151)](jK(0x134))),yield Y[jK(0x165)]();}else{const M=yield L[jK(0x14c)]['logRange'](b,Z,u);if(M[jK(0xf8)]){const w=M[jK(0xf8)][jK(0x150)],C=w?jK(0x11f)+JSON[jK(0x154)](w,null,'\x20'):'';(0x0,utils_1[jK(0xf8)])(jK(0x169)+M['error'][jK(0x125)]+C);}else S(M['data'],M[jK(0x13c)]);}}));}}exports['CliLogs']=CliLogs;
|
|
1
|
+
'use strict';const a11I1=a11B;(function(I,B){const T=a11B,J=I();while(!![]){try{const C=-parseInt(T(0x120))/0x1+-parseInt(T(0x11b))/0x2*(parseInt(T(0x130))/0x3)+parseInt(T(0x18e))/0x4+-parseInt(T(0x169))/0x5+-parseInt(T(0x10c))/0x6*(-parseInt(T(0x143))/0x7)+-parseInt(T(0x13b))/0x8*(parseInt(T(0x12e))/0x9)+parseInt(T(0x10d))/0xa*(parseInt(T(0x116))/0xb);if(C===B)break;else J['push'](J['shift']());}catch(G){J['push'](J['shift']());}}}(a11I,0x2b7ad));var __awaiter=this&&this['__awaiter']||function(I,B,J,C){function G(F){return F instanceof J?F:new J(function(A){A(F);});}return new(J||(J=Promise))(function(F,A){const I0=a11B;function H(X){const y=a11B;try{d(C[y(0x15c)](X));}catch(S){A(S);}}function t(X){const e=a11B;try{d(C[e(0x115)](X));}catch(S){A(S);}}function d(X){const i=a11B;X['done']?F(X[i(0x17a)]):G(X[i(0x17a)])[i(0x150)](H,t);}d((C=C['apply'](I,B||[]))[I0(0x15c)]());});},__importDefault=this&&this[a11I1(0x172)]||function(I){const I2=a11I1;return I&&I[I2(0x176)]?I:{'default':I};};Object[a11I1(0x184)](exports,a11I1(0x176),{'value':!![]}),exports['CliLogs']=void 0x0;const js_client_1=require('@northflank/js-client'),chalk_1=__importDefault(require(a11I1(0x15d))),utils_1=require(a11I1(0x10e)),inquirer_helper_1=require(a11I1(0x139)),commander_1=require(a11I1(0x177)),console_format_helpers_1=require('../formatting/console-format-helpers'),log_formatter_1=require(a11I1(0x12b));function a11I(){const IA=['Project\x20for\x20logs','6oDLGXT','logs','--run\x20--runId\x20[runId]','getLogsCommand','cursor','customUserAgent','--container\x20--containerId\x20[containerId]','--regexNotIncludes\x20<regex>','choices','../inquirer-helper','format','8zyactf','addonId','getStandardLogCommand','getSeconds','\x20seconds','setSeconds','yaml','addOption','175lypWCB','--textNotIncludes\x20<text>','ApiClient','toUpperCase','action','conflicts','-d,\x20--direction\x20<order>','\x27Ctrl+C\x27','addon','textNotIncludes','tsHint','build-','Number\x20of\x20lines\x20to\x20return.','then','Option','askForProject','logs-received','service','hasNextPage','serviceId','inquirerHelper','-l,\x20--lineLimit\x20[limit]','-o,\x20--output\x20[output]','Output\x20formatting.\x20Will\x20use\x20advanced\x20formatting\x20by\x20default.','\x20--','next','chalk','\x20to\x20get\x20logs\x20from','Id]','-f,\x20--tail','\x20with\x20live-tailing','restoreId','details','jobId','warning','printInitInfo','logRange','--backup\x20--backupId\x20[backupId]','1338455kxtHnZ','Job\x20run\x20id,\x20example:\x20162b1977-6636-4000-929b-cc265b862ff0','Build\x20to\x20get\x20logs\x20from','job','--restore\x20--restoreId\x20[restoreId]','parseDateInput','No\x20logs\x20found\x20for\x20this\x20query.\x20Make\x20sure\x20to\x20select\x20an\x20appropriate\x20time\x20window.','pagination','Container\x20to\x20exec\x20into\x20(logs\x20from\x20all\x20containers\x20will\x20be\x20shown\x20if\x20not\x20specified)','__importDefault','Filter\x20log\x20lines\x20to\x20include\x20this\x20text','printResponse','Which\x20log\x20types\x20to\x20fetch','__esModule','commander','slice','--endTime\x20<timestamp>','value','backupId','Length\x20of\x20timespan\x20in\x20seconds.\x20Only\x20valid\x20if\x20not\x20both,\x20startTime\x20and\x20endTime\x20are\x20set','toISOString','addonBackup','askForJobRun','error','assign','getCurrentJobName','default','defineProperty','stringify','apiContext','regexIncludes','getFormatter',',\x20backup\x20id\x20',',\x20duration:\x20','askForContainer','askForBuild','--textIncludes\x20<text>','1273428nDRYfl','Only\x20two\x20of\x20\x27startTime\x27,\x20\x27endTime\x27\x20and\x20\x27duration\x27\x20can\x20be\x20set.','tail','\x20in\x20project\x20','yml','containerId','option','Log\x20session\x20ended','buildId','getCurrentServiceName','-t,\x20--types\x20<types...>','CliLogs','Get\x20logs\x20generated\x20after\x20this\x20time,\x20','Filter\x20log\x20lines\x20to\x20not\x20match\x20this\x20regular\x20expression','\x20(exit\x20with\x20','argParser','\x20of\x20','--regexIncludes\x20<regex>','message','regexNotIncludes','Tail\x20will\x20stream\x20logs\x20in\x20real-time.\x20Session\x20will\x20be\x20kept\x20open.','forward','deploymentId','defaultDurationSeconds','78096PqarSa','20ovMsbj','../utils','formatLogLine','--startTime\x20<timestamp>','--noDefaults',',\x20restore\x20id\x20','getCurrentProjectName','askForService','throw','1446610HPHOPf','Id\x20[',',\x20from:\x20','--duration\x20[duration]','description','110632rMGOWc','Get\x20logs\x20generated\x20before\x20this\x20time,\x20','textIncludes','values','runId','305582ZeFVlF','log','length','alias','\x0aDetails:\x20','askForJob','bold','logTail','Filter\x20log\x20lines\x20to\x20match\x20this\x20regular\x20expression','json','addonRestore','./log-formatter','apiClient','askForAddon','403011MbxRrn'];a11I=function(){return IA;};return a11I();}function a11B(I,B){const J=a11I();return a11B=function(C,G){C=C-0xfe;let F=J[C];return F;},a11B(I,B);}class CliLogs{constructor(I,B){const I3=a11I1;this[I3(0x186)]=I,this[I3(0x10b)]=0x708,this[I3(0x13d)]=(J,C,G,F)=>{const I4=I3,A=(0x0,utils_1['getCommand'])(!![])['name']((C?'build-':'')+I4(0x131))[I4(0x123)]((C?I4(0x14e):'')+I4(0x121))[I4(0x11a)]('Get\x20log\x20for\x20the\x20specified\x20'+J)['option']('--project\x20--projectId\x20[projectId]',I4(0x12f))['option']('--'+J+I4(0x15b)+J+I4(0x117)+J+I4(0x15f),J['charAt'](0x0)[I4(0x146)]()+J[I4(0x178)](0x1)+I4(0x15e))['option'](I4(0x136),I4(0x171));if(C)A[I4(0x194)]('--build\x20--buildId\x20[buildId]',I4(0x16b));if(J==='job')A[I4(0x194)](I4(0x132),I4(0x16a));if(J===I4(0x154))A[I4(0x194)]('--deployment\x20--deploymentId\x20[deploymentId]','Deployment\x20id,\x20example:\x20my-service-54785f4');if(G)A['option'](I4(0x168),'Backup\x20to\x20get\x20logs\x20from');if(F)A[I4(0x194)](I4(0x16d),'Restore\x20to\x20get\x20logs\x20from');return!C&&!G&&!F&&A['addOption'](new commander_1[(I4(0x151))](I4(0xfe),I4(0x175))[I4(0x138)](Object[I4(0x11e)](js_client_1['LogType']))),A[I4(0x194)](I4(0x160),I4(0x108))[I4(0x194)](I4(0x158),I4(0x14f))[I4(0x194)](I4(0x110),I4(0x100)+utils_1[I4(0x14d)],utils_1[I4(0x16e)])[I4(0x142)](new commander_1[(I4(0x151))](I4(0x179),I4(0x11c)+utils_1[I4(0x14d)])[I4(0x103)](utils_1[I4(0x16e)])[I4(0x148)]([I4(0x190)]))[I4(0x194)](I4(0x119),I4(0x17c))[I4(0x142)](new commander_1[(I4(0x151))](I4(0x149),'Direction\x20of\x20logs.\x20Ignored\x20when\x20tailing.')['choices'](['backward',I4(0x109)])[I4(0x148)](['tail']))[I4(0x142)](new commander_1[(I4(0x151))](I4(0x18d),I4(0x173))[I4(0x148)]([I4(0x14c),I4(0x187),I4(0x107)]))[I4(0x142)](new commander_1[(I4(0x151))](I4(0x144),'Filter\x20log\x20lines\x20to\x20not\x20include\x20this\x20text')[I4(0x148)](['textIncludes',I4(0x187),I4(0x107)]))['addOption'](new commander_1[(I4(0x151))](I4(0x105),I4(0x128))[I4(0x148)]([I4(0x14c),I4(0x11d),I4(0x107)]))[I4(0x142)](new commander_1[(I4(0x151))](I4(0x137),I4(0x101))['conflicts'](['textNotIncludes',I4(0x187),I4(0x11d)]))[I4(0x194)](I4(0x111),'Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.',![])[I4(0x142)](new commander_1['Option'](I4(0x159),I4(0x15a))[I4(0x138)](Object[I4(0x11e)]([I4(0x13a),I4(0x129),I4(0x141)]))),A;},this[I3(0x166)]=(J,C,G,F)=>{const I5=I3,{containerName:A,restoreId:H,backupId:t,quiet:d,tail:X,startTime:S,endTime:f,duration:v}=F;if(d===!![])return;const a=X?I5(0x102)+chalk_1[I5(0x183)][I5(0x126)](I5(0x14a))+')':'',V=X?I5(0x161):'',r=new Date(),s=S!==null&&S!==void 0x0?S:new Date(new Date((f!==null&&f!==void 0x0?f:r)['valueOf']())[I5(0x140)]((f!==null&&f!==void 0x0?f:r)[I5(0x13e)]()-(v!==null&&v!==void 0x0?v:this['defaultDurationSeconds']))),K=(f!==null&&f!==void 0x0?f:S!==undefined)?new Date(new Date(S['valueOf']())[I5(0x140)](S[I5(0x13e)]()+(v!==null&&v!==void 0x0?v:this[I5(0x10b)]))):r,b=t!==undefined,W=s&&!b?I5(0x118)+chalk_1[I5(0x183)][I5(0x126)](s[I5(0x17d)]()):'',u=K&&!b?',\x20to:\x20'+chalk_1[I5(0x183)][I5(0x126)](K[I5(0x17d)]()):'',h=v?I5(0x18a)+v+I5(0x13f):'',q=A?'\x20for\x20container\x20'+chalk_1['default'][I5(0x126)](A):b?'':'\x20for\x20all\x20containers',x=t?I5(0x189)+t:'',g=H?I5(0x112)+H:'',o=J+'\x20'+chalk_1[I5(0x183)][I5(0x126)](C)+x+g+I5(0x191)+chalk_1[I5(0x183)][I5(0x126)](G),O=''+W+u+h;console['log']('>\x20Container\x20logs'+V+q+I5(0x104)+o+O+a+':');},this['getFormatter']=(J,C)=>(G,F)=>{const I6=I3;if(!J){if(G[I6(0x122)]===0x0)console[I6(0x121)](I6(0x16f));G['forEach'](A=>(0x0,log_formatter_1[I6(0x10f)])(A,C));}else(0x0,console_format_helpers_1[I6(0x174)])(J,G);(F===null||F===void 0x0?void 0x0:F[I6(0x155)])&&(0x0,utils_1[I6(0x165)])('Element\x20count\x20for\x20this\x20request\x20exceeds\x20the\x20line\x20limit,\x20output\x20was\x20truncated.\x20Cut\x20off\x20at\x20timestamp\x20'+F[I6(0x134)]);},this['apiClient']=new js_client_1[(I3(0x145))](I,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[I3(0x135)],'agent':B}),this['logsApiClient']=this[I3(0x12c)],this[I3(0x157)]=new inquirer_helper_1['InquirerHelper'](this['apiClient']);}[a11I1(0x133)](I,B=![],J=![],C=![]){const IG=a11I1,G=(S,f)=>__awaiter(this,void 0x0,void 0x0,function*(){const I7=a11B,v=f['noDefaults'],{apiContext:a,inquirerHelper:V}=this;switch(I){case I7(0x154):{const r=v?undefined:a[I7(0x197)]();return f[I7(0x156)]||r||(yield V[I7(0x114)](S)());}case I7(0x16c):{const s=v?undefined:a[I7(0x182)]();return f[I7(0x164)]||s||(yield V[I7(0x125)](S)());}case I7(0x14b):{return f[I7(0x13c)]||(yield V[I7(0x12d)](S)());}}}),F=(S,f,v)=>__awaiter(this,void 0x0,void 0x0,function*(){const I8=a11B;if(B)return v[I8(0x196)]||(yield this['inquirerHelper'][I8(0x18c)](S,I===I8(0x154)?f:undefined,I===I8(0x16c)?f:undefined,!![])());return undefined;}),A=(S,f,v)=>__awaiter(this,void 0x0,void 0x0,function*(){const I9=a11B;if(J||C)return v[I9(0x17b)]||(yield this[I9(0x157)]['askForAddonBackup'](S,f)());return undefined;}),H=(S,f,v,a)=>__awaiter(this,void 0x0,void 0x0,function*(){const II=a11B;if(C)return a[II(0x162)]||(yield this[II(0x157)]['askForAddonRestore'](S,f,v)());return undefined;}),t=(S,f,v)=>__awaiter(this,void 0x0,void 0x0,function*(){const IB=a11B;if(!B&&v[IB(0x193)]!==undefined){if(v[IB(0x193)]!==!![])return v[IB(0x193)];return yield this[IB(0x157)][IB(0x18b)](S,I===IB(0x154)?f:undefined,I===IB(0x16c)?f:undefined,!![])();}return undefined;}),d=(S,f,v)=>__awaiter(this,void 0x0,void 0x0,function*(){const IJ=a11B;if(I==='job')return v[IJ(0x11f)]||(yield this[IJ(0x157)][IJ(0x17f)](f,S,!![])());return undefined;}),X=(S,f,v)=>__awaiter(this,void 0x0,void 0x0,function*(){const IC=a11B;if(I===IC(0x154)){if(v[IC(0x10a)]!==!![])return v[IC(0x10a)];return v[IC(0x10a)];}return undefined;});return this[IG(0x13d)](I,B,J,C)[IG(0x147)](S=>__awaiter(this,void 0x0,void 0x0,function*(){const IF=IG,{noDefaults:f,projectId:v,quiet:a,tail:V,types:r,textIncludes:s,textNotIncludes:K,regexIncludes:b,regexNotIncludes:W,direction:u,lineLimit:h,startTime:q,endTime:x,duration:g,output:o}=S;(0x0,utils_1['assertContextExisting'])(this[IF(0x12c)]);const {apiContext:O,inquirerHelper:p,logsApiClient:w}=this,Z=f?undefined:O[IF(0x113)](),z=v||Z||(yield p[IF(0x152)]()),Q=yield G(z,S),c=yield F(z,Q,S),l=yield A(z,Q,S),n=yield H(z,Q,l,S),m=yield d(z,Q,S),E=yield X(z,Q,S),j=yield t(z,Q,S);if(q&&x&&g)throw new Error(IF(0x18f));const U={'projectId':z,'entityId':Q},D={'containerName':j,'types':r,'textIncludes':s,'textNotIncludes':K,'regexIncludes':b,'regexNotIncludes':W,'lineLimit':h,'startTime':q,'duration':g,'runId':m,'buildId':c,'backupId':l,'restoreId':n,'deploymentId':E,'isBuild':B!==null&&B!==void 0x0?B:![]},M=C?IF(0x12a):J?IF(0x17e):I,R=Object[IF(0x181)](Object[IF(0x181)]({},D),{'endTime':x,'direction':u});if(!a&&o!=='yaml'&&o!==IF(0x192)&&o!=='json')this[IF(0x166)](I,Q,z,Object[IF(0x181)](Object['assign']({},R),S));const Y=this[IF(0x188)](o,s!==null&&s!==void 0x0?s:b);if(V){const P=yield w[IF(0x131)][IF(0x127)](U,D,M);P['on'](IF(0x153),Y),P['on'](IF(0x180),k=>(0x0,utils_1[IF(0x180)])('Error\x20while\x20tailing\x20log\x20lines:\x20'+k['message'])),P['on']('close',()=>console[IF(0x121)](IF(0x195))),yield P['start']();}else{const k=yield w[IF(0x131)][IF(0x167)](U,R,M);if(k[IF(0x180)]){const L=k[IF(0x180)][IF(0x163)],N=L?IF(0x124)+JSON[IF(0x185)](L,null,'\x20'):'';(0x0,utils_1[IF(0x180)])('Error\x20while\x20fetching\x20log\x20lines:\x20'+k[IF(0x180)][IF(0x106)]+N);}else Y(k['data'],k[IF(0x170)]);}}));}}exports[a11I1(0xff)]=CliLogs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a12S=a12B;(function(I,B){const d=a12B,J=I();while(!![]){try{const C=parseInt(d(0x103))/0x1+-parseInt(d(0x101))/0x2*(-parseInt(d(0xf1))/0x3)+-parseInt(d(0xeb))/0x4+-parseInt(d(0xe9))/0x5+-parseInt(d(0xe8))/0x6+-parseInt(d(0xea))/0x7*(-parseInt(d(0xfd))/0x8)+parseInt(d(0xf9))/0x9*(-parseInt(d(0xe7))/0xa);if(C===B)break;else J['push'](J['shift']());}catch(G){J['push'](J['shift']());}}}(a12I,0x8ec8f));function a12B(I,B){const J=a12I();return a12B=function(C,G){C=C-0xe7;let F=J[C];return F;},a12B(I,B);}var __importDefault=this&&this['__importDefault']||function(I){const X=a12B;return I&&I[X(0xef)]?I:{'default':I};};Object[a12S(0x104)](exports,'__esModule',{'value':!![]}),exports[a12S(0xf5)]=exports[a12S(0xfa)]=void 0x0;const chalk_1=__importDefault(require('chalk'));exports['defaultLogSyntax']=[{'color':a12S(0xed),'pattern':/\[[0-9]{1,2}\/[a-z]{3}\/[0-9]{4}:[0-9]{2}:[0-9]{2}:[0-9]{2} \+[0-9]{4}\]/i},{'color':a12S(0xed),'pattern':/[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(.[0-9]+)?Z/i},{'color':'grey','pattern':/[0-9]{4}\/[0-9]{2}\/[0-9]{2}/i},{'color':a12S(0xed),'pattern':/\s\b([0-9]{2}:){1,2}[0-9]{2}\b\s/i},{'color':a12S(0xfc),'pattern':new RegExp('s\x08(?!mailto:)(?:(?:http|https|ftp)://)(?:\x5cS+(?::\x5cS*)?@)?(?:(?:(?:[1-9]\x5cd?|1\x5cd\x5cd|2[01]\x5cd|22[0-3])(?:\x5c.(?:1?\x5cd{1,2}|2[0-4]\x5cd|25[0-5])){2}(?:\x5c.(?:[0-9]\x5cd?|1\x5cd\x5cd|2[0-4]\x5cd|25[0-4]))|(?:(?:[a-z\x5cu00a1-\x5cuffff0-9]+-?)*[a-z\x5cu00a1-\x5cuffff0-9]+)(?:\x5c.(?:[a-z\x5cu00a1-\x5cuffff0-9]+-?)*[a-z\x5cu00a1-\x5cuffff0-9]+)*(?:\x5c.(?:[a-z\x5cu00a1-\x5cuffff]{2,})))|localhost)(?::\x5cd{2,5})?(?:(/|\x5c?|#)[^\x5cs]*)?\x08s','i')},{'color':a12S(0xfb),'pattern':/(?:\d{1,3}\.){3}\d{1,3}/i},{'color':a12S(0xfb),'pattern':/(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))/},{'color':a12S(0xf6),'pattern':/\b(GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH)\b/},{'color':a12S(0xf4),'pattern':/\b(successful|success|completed|complete|done)\b/i},{'color':a12S(0xf2),'pattern':/\b(failed|fail|stderr|error|err)\b/i},{'color':a12S(0x100),'pattern':/\b(information|info|debug)\b/i},{'color':a12S(0xec),'pattern':/\b(warning|warn)\b/i},{'color':'blue','pattern':/[0-9a-f]{64}/i},{'color':a12S(0xf6),'pattern':/[0-9a-fA-F]{8}[-]?([0-9a-fA-F]{4}[-]?){3}[0-9a-fA-F]{12}/i}];const formatLogLine=(I,B)=>{const f=a12S,J=chalk_1[f(0x102)]['dim'](I['ts']['toISOString']()),C=chalk_1['default'][f(0xf0)](I[f(0xf8)]),G=exports['defaultLogSyntax'][f(0xf3)]((A,H)=>{const v=f;return A[v(0xf7)](H[v(0xfe)],t=>H[v(0xee)]?chalk_1[v(0x102)][H[v(0xee)]](t):chalk_1[v(0x102)][v(0xed)](t));},I[f(0xff)]),F=B?G[f(0xf7)](new RegExp(B,'g'),A=>chalk_1[f(0x102)]['bold'](A)):G;console['log'](J+'\x20'+C+'\x20--\x20'+F);};function a12I(){const a=['bold','8BYEKyh','pattern','log','gray','386LSCUEO','default','1113682ofSVaB','defineProperty','30hAnVlk','3718056KCPDlM','5008370mwKaNR','3698338NbqZiB','1237356PxPFgW','yellow','grey','color','__esModule','cyan','15357lnqRSK','red','reduce','greenBright','formatLogLine','blue','replace','containerId','343341hdDlUe','defaultLogSyntax','green'];a12I=function(){return a;};return a12I();}exports['formatLogLine']=formatLogLine;
|