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