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