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