@northflank/cli 0.9.7 → 0.9.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-helpers.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/context/contextCommands.js +1 -1
- package/dist/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';const
|
|
1
|
+
'use strict';const a4O=a4V;(function(X,V){const B=a4V,h=X();while(!![]){try{const Q=parseInt(B(0x1d4))/0x1*(parseInt(B(0x1ad))/0x2)+-parseInt(B(0x1af))/0x3*(-parseInt(B(0x1a2))/0x4)+-parseInt(B(0x18d))/0x5+-parseInt(B(0x189))/0x6*(parseInt(B(0x1d5))/0x7)+-parseInt(B(0x1de))/0x8+parseInt(B(0x1bc))/0x9+parseInt(B(0x1a8))/0xa;if(Q===V)break;else h['push'](h['shift']());}catch(J){h['push'](h['shift']());}}}(a4X,0x4e558));function a4X(){const u=['__esModule','Success','readline','stdin','execJobSession','with\x20user:','with\x20command\x20\x27','customUserAgent','execServiceSession','InquirerHelper','message','--project\x20--projectId\x20[NAME]','193OmGQEc','114149ebGBRC','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','getStandardExecCommand','default','__awaiter','execCmd',',\x20exit\x20code:\x20','name','pipe','1309504CIcCFO','../utils','ApiClient','askForProject','sequence','value','addCommand','askForService','slice','stdIn','isTTY','warning','Run\x20command\x20with\x20this\x20group','Exec\x20','getCommand','waitForCommandResult','Id\x20[NAME]','resize','getTerminalSize','status','108JlAxrV','filter','\x20command\x20exec:\x20','columns','2706315EaDsZf','stderr','action','rows','next','shell\x20command\x20','option','error','\x20--','--noDefaults','execStartLog','Container\x20to\x20exec\x20into\x20(random\x20container\x20will\x20be\x20chosen\x20if\x20not\x20specified)','resizeTerminal','getCurrentProjectName','Command\x20exec\x20for\x20the\x20specified\x20','getCurrentServiceName','without\x20shell','Command\x20completed\x20successfully,\x20exit\x20code:\x20','__importDefault','log','keypress','2044dzmmnn','Error\x20occured\x20during\x20','throw','exit','Unknown','description','1736860tdPCMT','job','none','--user\x20[USER]',',\x20details:\x20','5018wqDazC','greenBright','2274xIBzRE','charAt','Run\x20command\x20with\x20shell\x20(e.g.\x20bash,sh).\x20If\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','(exit\x20with\x20two\x20quick\x20','exec','--cmd\x20--command\x20[COMMAND]','setRawMode','assertContextExisting','stdout','emitKeypressEvents','bold','command-exec','join','2466648OvMabB','CliExec','Run\x20command\x20with\x20this\x20user','service','handleShellSession','with\x20group:','Command\x20to\x20execute,\x20if\x20--shell\x20option\x20is\x20present,\x20it\x20will\x20run\x20in\x20the\x20specified\x20shell,\x20otherwise','with\x20shell\x20session','apply','apiClient','--container\x20--containerId\x20[NAME]','exitCode'];a4X=function(){return u;};return a4X();}var __awaiter=this&&this[a4O(0x1d9)]||function(X,V,h,Q){function J(G){return G instanceof h?G:new h(function(I){I(G);});}return new(h||(h=Promise))(function(G,I){const N=a4V;function T(A){const H=a4V;try{E(Q[H(0x191)](A));}catch(D){I(D);}}function W(A){const k=a4V;try{E(Q[k(0x1a4)](A));}catch(D){I(D);}}function E(A){const o=a4V;A['done']?G(A[o(0x1e3)]):J(A['value'])['then'](T,W);}E((Q=Q[N(0x1c4)](X,V||[]))['next']());});},__importDefault=this&&this[a4O(0x19f)]||function(X){const p=a4O;return X&&X[p(0x1c8)]?X:{'default':X};};function a4V(X,V){const h=a4X();return a4V=function(Q,J){Q=Q-0x17b;let G=h[Q];return G;},a4V(X,V);}Object['defineProperty'](exports,a4O(0x1c8),{'value':!![]}),exports[a4O(0x1bd)]=void 0x0;const js_client_1=require('@northflank/js-client'),chalk_1=__importDefault(require('chalk')),utils_1=require(a4O(0x1df)),inquirer_helper_1=require('../inquirer-helper');class CliExec{constructor(X){const i=a4O;this[i(0x1d7)]=J=>(0x0,utils_1['getCommand'])(!![])['name'](J)[i(0x1a7)](i(0x19b)+J)[i(0x193)](i(0x1d3),'Project\x20for\x20exec')['option']('--'+J+i(0x195)+J+i(0x185),J[i(0x1b0)](0x0)['toUpperCase']()+J[i(0x17d)](0x1)+'\x20to\x20exec\x20into')[i(0x193)](i(0x1c6),i(0x198))[i(0x193)]('--shell-cmd\x20[SHELL-CMD]',i(0x1b1))[i(0x193)](i(0x1ab),i(0x1be))[i(0x193)]('--group\x20[GROUP]',i(0x181))['option'](i(0x196),i(0x1d6),![])[i(0x193)](i(0x1b4),i(0x1c2)),this[i(0x187)]=()=>({'columns':process['stdout'][i(0x18c)],'rows':process[i(0x1b7)][i(0x190)]}),this[i(0x197)]=(J,G,I,T,W,E,A,P)=>{const x=i;if(P===!![])return;const D=T===x(0x1aa),K=D?x(0x19d):T===undefined?x(0x1c3):x(0x192)+chalk_1[x(0x1d8)][x(0x1ae)](T),d=W!==undefined?x(0x1cd)+W:'',f=E!==undefined?x(0x1c1)+E:'',z=A!==undefined?x(0x1ce)+chalk_1['default']['greenBright'](A)+'\x27':'',F=[z,K,d,f][x(0x18a)](q=>q!=='')[x(0x1bb)]('\x20'),n=x(0x1b2)+chalk_1[x(0x1d8)][x(0x1b9)]('\x27Ctrl+D\x27')+')';console[x(0x1a0)](x(0x182)+J+'\x20'+chalk_1[x(0x1d8)][x(0x1b9)](G)+'\x20in\x20project\x20'+chalk_1['default']['bold'](I)+'\x20'+F+'\x20'+n);},this[i(0x1c0)]=(J,G,I=![])=>__awaiter(this,void 0x0,void 0x0,function*(){const L=i;var T,W;let E=![];try{if(process['stdin'][L(0x17f)]){const P=require(L(0x1ca));P[L(0x1b8)](process[L(0x1cb)]),process[L(0x1cb)]['setRawMode'](!![]),process[L(0x1b7)]['on'](L(0x186),()=>{const y=L;J[y(0x199)](this[y(0x187)]());}),process[L(0x1cb)]['on'](L(0x1a1),(D,K)=>{const M=L;K[M(0x1e2)]==='\x04'&&(E?(process[M(0x1cb)][M(0x1b5)](![]),(0x0,utils_1[M(0x180)])('Received\x20Ctrl+D\x20twice,\x20exiting\x20shell\x20forcefully.'),process['exit']()):(E=!![],setTimeout(()=>E=![],0x190)));});}process[L(0x1cb)][L(0x1dd)](J[L(0x17e)]),J['stdErr']['pipe'](process[L(0x18e)]),J['stdOut'][L(0x1dd)](process['stdout']),J['on'](L(0x194),D=>{const e=L;var K;(0x0,utils_1[e(0x194)])(e(0x1a3)+G+e(0x18b)+((K=D[e(0x1d2)])!==null&&K!==void 0x0?K:D)),process[e(0x1cb)][e(0x17f)]&&process['stdin'][e(0x1b5)](![]),process['exit'](-0x1);});const A=yield J[L(0x184)]();if(I!==!![]){const D=(T=A===null||A===void 0x0?void 0x0:A[L(0x188)])!==null&&T!==void 0x0?T:L(0x1a6),K=(W=A===null||A===void 0x0?void 0x0:A[L(0x1c7)])!==null&&W!==void 0x0?W:-0x1,d=(A===null||A===void 0x0?void 0x0:A['message'])?L(0x1ac)+A[L(0x1d2)]:'';D===L(0x1c9)?(0x0,utils_1['success'])(L(0x19e)+K):(0x0,utils_1[L(0x180)])('Command\x20didn\x27t\x20complete\x20successfully,\x20status:\x20'+D+L(0x1db)+K+d);}return A;}finally{process[L(0x1cb)][L(0x17f)]&&process[L(0x1cb)]['setRawMode'](![]);}}),this[i(0x1c5)]=new js_client_1[(i(0x1e0))](X,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[i(0x1cf)]});const V=new inquirer_helper_1[(i(0x1d1))](this[i(0x1c5)]);this[i(0x1da)]=(0x0,utils_1[i(0x183)])()[i(0x1dc)](i(0x1ba))['alias']('exec')[i(0x1a7)]('Command\x20execution\x20(exec)\x20for\x20Northflank\x20services\x20and\x20jobs.');const h=this['getStandardExecCommand']('service')[i(0x18f)](J=>__awaiter(this,void 0x0,void 0x0,function*(){const Z=i,{noDefaults:G,projectId:I,serviceId:T,containerId:W,shellCmd:E,user:A,group:P,command:D,quiet:K}=J;(0x0,utils_1['assertContextExisting'])(this[Z(0x1c5)]);try{const d=G?undefined:X[Z(0x19a)](),f=I||d||(yield V['askForProject']()),z=G?undefined:X[Z(0x19c)](),F=T||z||(yield V[Z(0x17c)](f)()),n=E!==null&&E!==void 0x0?E:D!==undefined?Z(0x1aa):undefined;this[Z(0x197)](Z(0x1bf),F,f,n,A,P,D,K);const q=process['stdout']['columns'],a=process[Z(0x1b7)][Z(0x190)],R={'projectId':f,'serviceId':F},v=yield this['apiClient'][Z(0x1b3)][Z(0x1d0)](R,{'containerName':W,'command':D,'shell':n,'user':A,'group':P,'ttyColumns':q,'ttyRows':a});yield this[Z(0x1c0)](v,Z(0x1bf),K);}catch(g){(0x0,utils_1[Z(0x194)])(''+g['message']);}finally{process[Z(0x1a5)]();}})),Q=this[i(0x1d7)](i(0x1a9))['action'](J=>__awaiter(this,void 0x0,void 0x0,function*(){const C=i,{projectId:G,jobId:I,containerId:T,noDefaults:W,shellCmd:E,user:A,group:P,command:D,quiet:K}=J;(0x0,utils_1[C(0x1b6)])(this[C(0x1c5)]);try{const d=W?undefined:X['getCurrentProjectName'](),f=G||d||(yield V[C(0x1e1)]()),z=I||(yield V['askForJob'](f)());this[C(0x197)](C(0x1a9),z,f,E,K);const {rows:F,columns:n}=this[C(0x187)](),q={'projectId':f,'jobId':z},a=yield this[C(0x1c5)][C(0x1b3)][C(0x1cc)](q,{'containerName':T,'command':D,'shell':E,'user':A,'group':P,'ttyColumns':n,'ttyRows':F});yield this[C(0x1c0)](a,C(0x1a9),K);}catch(R){(0x0,utils_1[C(0x194)])(''+R[C(0x1d2)]);}finally{process[C(0x1a5)]();}}));this[i(0x1da)]['addCommand'](h),this[i(0x1da)][i(0x17b)](Q);}}exports[a4O(0x1bd)]=CliExec;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a5v=a5V;(function(X,V){const R=a5V,h=X();while(!![]){try{const Q=-parseInt(R(0x146))/0x1*(parseInt(R(0x13a))/0x2)+parseInt(R(0x152))/0x3*(-parseInt(R(0x142))/0x4)+-parseInt(R(0x148))/0x5+parseInt(R(0x15b))/0x6+parseInt(R(0x155))/0x7*(-parseInt(R(0x158))/0x8)+-parseInt(R(0x13c))/0x9+-parseInt(R(0x153))/0xa*(-parseInt(R(0x140))/0xb);if(Q===V)break;else h['push'](h['shift']());}catch(J){h['push'](h['shift']());}}}(a5X,0xafac0));function a5V(X,V){const h=a5X();return a5V=function(Q,J){Q=Q-0x138;let G=h[Q];return G;},a5V(X,V);}var __awaiter=this&&this[a5v(0x150)]||function(X,V,h,Q){function J(G){return G instanceof h?G:new h(function(I){I(G);});}return new(h||(h=Promise))(function(G,I){const O=a5V;function T(A){try{E(Q['next'](A));}catch(D){I(D);}}function W(A){const g=a5V;try{E(Q[g(0x14b)](A));}catch(D){I(D);}}function E(A){const B=a5V;A[B(0x141)]?G(A[B(0x15e)]):J(A['value'])['then'](T,W);}E((Q=Q[O(0x147)](X,V||[]))[O(0x139)]());});},__importDefault=this&&this['__importDefault']||function(X){return X&&X['__esModule']?X:{'default':X};};Object[a5v(0x13b)](exports,a5v(0x15c),{'value':!![]}),exports[a5v(0x138)]=void 0x0;function a5X(){const o=['option','291840csrxiE','__esModule','forEach','value','chalk','getCommandOverview','next','914402vyYNoJ','defineProperty','10053198Vzycay','../utils','green','every','6457NiogDu','done','4lylzZO','Prints\x20a\x20tree\x20view\x20of\x20all\x20available\x20commands','description','opts','3EQphiz','apply','5852380PUqZCK','commands','map','throw','slice','--verbose','action','keys','__awaiter','name','3127380bOEiER','114710NNbbEH','length','21mNubDp','bold','command-overview','3629344PVNtjL','getCommand'];a5X=function(){return o;};return a5X();}const chalk_1=__importDefault(require(a5v(0x15f))),utils_1=require(a5v(0x13d));function getCommandOverview(X){const H=a5v;return(0x0,utils_1[H(0x159)])()[H(0x151)](H(0x157))[H(0x144)](H(0x143))[H(0x15a)](H(0x14d),'Print\x20command\x20descriptions')[H(0x14e)](V=>__awaiter(this,void 0x0,void 0x0,function*(){const {verbose:h}=V;function Q(J,G){const k=a5V;var I;const T=(n,q=!![])=>q?chalk_1['default'][k(0x156)][k(0x13e)](n[k(0x151)]()):n[k(0x151)](),W=G[k(0x154)]===0x0,E=J['commands'];let A='';const P=E[k(0x154)]===0x0,D=P||((I=Object[k(0x14f)](J===null||J===void 0x0?void 0x0:J[k(0x145)]()))===null||I===void 0x0?void 0x0:I[k(0x154)])>0x0;!W&&(A=E&&!P?'┬\x20':'─\x20');const K=h&&D&&J['description']()?':\x20'+J[k(0x144)]():'';console['log'](''+G+A+T(J,D)+K);let d=G;if(!W){const n=G[k(0x14c)](-0x2)==='└─';d=G['slice'](0x0,-0x2)+(n?'\x20\x20':'│\x20');}const f=d+'├─',z=d+'└─',F=E[k(0x13f)](q=>q[k(0x149)][k(0x154)]===0x0);F&&!P&&!h?console['log'](z+'\x20'+E[k(0x14a)](q=>T(q))['join'](',\x20')):E[k(0x15d)]((q,a)=>{Q(q,E['length']-0x1===a?z:f);});}Q(X,'');}));}exports[a5v(0x138)]=getCommandOverview;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a6f=a6V;(function(X,V){const d=a6V,h=X();while(!![]){try{const Q=parseInt(d(0xea))/0x1*(parseInt(d(0xde))/0x2)+-parseInt(d(0x101))/0x3*(-parseInt(d(0x109))/0x4)+parseInt(d(0x113))/0x5*(parseInt(d(0xe2))/0x6)+parseInt(d(0xfa))/0x7+parseInt(d(0xe8))/0x8+-parseInt(d(0xfc))/0x9*(parseInt(d(0xf8))/0xa)+parseInt(d(0x112))/0xb*(-parseInt(d(0x10f))/0xc);if(Q===V)break;else h['push'](h['shift']());}catch(J){h['push'](h['shift']());}}}(a6X,0xeca90));var __createBinding=this&&this['__createBinding']||(Object[a6f(0xe5)]?function(X,V,h,Q){const z=a6f;if(Q===undefined)Q=h;var J=Object['getOwnPropertyDescriptor'](V,h);(!J||(z(0xfb)in J?!V[z(0xdc)]:J[z(0x104)]||J[z(0x108)]))&&(J={'enumerable':!![],'get':function(){return V[h];}}),Object['defineProperty'](X,Q,J);}:function(X,V,h,Q){if(Q===undefined)Q=h;X[Q]=V[h];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a6f(0xe5)]?function(X,V){Object['defineProperty'](X,'default',{'enumerable':!![],'value':V});}:function(X,V){const F=a6f;X[F(0x10c)]=V;}),__importStar=this&&this['__importStar']||function(X){const n=a6f;if(X&&X[n(0xdc)])return X;var V={};if(X!=null){for(var h in X)if(h!==n(0x10c)&&Object[n(0x10d)]['hasOwnProperty'][n(0xf4)](X,h))__createBinding(V,X,h);}return __setModuleDefault(V,X),V;},__importDefault=this&&this[a6f(0xf3)]||function(X){const q=a6f;return X&&X[q(0xdc)]?X:{'default':X};};function a6X(){const i=['length','safeDump','8570pLEMkz','keys','12477129AtWLDL','get','13284zVLgWR','isUndefined','No\x20','handleFormattedOutput','createdat','20073zrqXeg','lodash','bold','writable','includes','getSeconds','inspect','configurable','872GDFHuU','handleYamlOutput','yaml','default','prototype','yml','30083964YuPeXV','clone','isBoolean','11oNVTcZ','5rmMsaB','js-yaml','sort','defineProperty','updatedat','toString','consoleFormat','log','__esModule','forEach','2TFwlVT','handleJsonOutput','getMinutes','map','4857228HpnLah','getMonth','disabled','create','chalk','printResponse','1843456ctUvdq','toLowerCase','460234GrvPds','isFinite','util','set','\x20found','stringify','format','replace','getDate','__importDefault','call','getHours'];a6X=function(){return i;};return a6X();}Object[a6f(0xd7)](exports,'__esModule',{'value':!![]}),exports[a6f(0xe7)]=exports[a6f(0xff)]=exports[a6f(0x10a)]=exports[a6f(0xdf)]=exports[a6f(0xda)]=exports['printAsTable']=void 0x0;const chalk_1=__importDefault(require(a6f(0xe6))),_=__importStar(require(a6f(0x102))),util=__importStar(require(a6f(0xec))),yaml=require(a6f(0x114)),columnify=require('columnify');function printAsTable(X,V,h,Q=![],J=0x0){const a=a6f;!Q&&console[a(0xdb)](''+chalk_1['default'][a(0x103)](V));function G(T){const R=a;return T===R(0xe4)?T:T[R(0xf1)](R(0xe4),'');}function I(T,W){const g=a;function E(P){const v=a6V,D=new Date(P);return D[v(0xf2)]()+'/'+D[v(0xe3)]()+'/'+D['getFullYear']()+'\x0a'+D[v(0xf5)]()+':'+D[v(0xe0)]()+':'+D[v(0x106)]();}const A=[g(0x100),g(0xd8)];if(A['includes'](W['toLowerCase']())&&_[g(0xeb)](T)&&T['toString']()[g(0xf6)]===0xd)return E(Number(T));if(_[g(0x111)](T)){if(W!==g(0xe4)&&W['includes'](g(0xe4)))return T?'x':'✔';return T?'✔':'x';}if(_['isObjectLike'](T))return util[g(0x107)](T,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});return T;}if(_['isArrayLike'](X)){X['length']===0x0&&console['log'](a(0xfe)+V[a(0xe9)]()+a(0xee));const T=X[a(0xe1)]((A,P)=>{const B=a,D={'i':P+J};return Object[B(0xf9)](A)[B(0xdd)](K=>{const O=B;(_[O(0xfd)](h)||h[O(0x105)](K['toLowerCase']()))&&_[O(0xed)](D,G(K),I(A[K],K));}),D;}),W=_[a(0x110)](Object[a(0xf9)]((T===null||T===void 0x0?void 0x0:T[0x0])||[]))[a(0x115)]((A,P)=>{const D=K=>K!=='i'?K!=='internalId'?0x0:0x1:0x2;return D(P)-D(A);}),E={'maxWidth':0x1e,'preserveNewLines':!![],'showHeaders':!Q,'config':{'_id':{'maxWidth':0x5,'truncate':!![]},'i':{'showHeaders':![]}},'columns':W};console[a(0xdb)](columnify(T,E));}else console['log'](X);}function a6V(X,V){const h=a6X();return a6V=function(Q,J){Q=Q-0xd7;let G=h[Q];return G;},a6V(X,V);}exports['printAsTable']=printAsTable;function consoleFormat(X){const H=a6f;if(!_['isObjectLike'](X))return X===null||X===void 0x0?void 0x0:X[H(0xd9)]();return util['inspect'](X,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});}exports['consoleFormat']=consoleFormat;const handleJsonOutput=(X,V)=>{const k=a6f,h=X==='json';if(h)console[k(0xdb)](JSON[k(0xef)](V,null,'\x20'));};exports[a6f(0xdf)]=handleJsonOutput;const handleYamlOutput=(X,V)=>{const o=a6f,h=X===o(0x10b)||X===o(0x10e);if(h)console[o(0xdb)](yaml[o(0xf7)](V));};exports['handleYamlOutput']=handleYamlOutput;const handleFormattedOutput=(X,V)=>{const N=a6f,h=X===N(0xf0);if(h)console[N(0xdb)](consoleFormat(V));};exports['handleFormattedOutput']=handleFormattedOutput;const printResponse=(X,V)=>{const p=a6f;(0x0,exports['handleJsonOutput'])(X,V),(0x0,exports[p(0x10a)])(X,V),(0x0,exports['handleFormattedOutput'])(X,V);};exports['printResponse']=printResponse;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a7t=a7V;(function(X,V){const S=a7V,h=X();while(!![]){try{const Q=-parseInt(S(0x1c3))/0x1*(-parseInt(S(0x1b4))/0x2)+-parseInt(S(0x1ca))/0x3+parseInt(S(0x1d0))/0x4*(parseInt(S(0x1ce))/0x5)+parseInt(S(0x1c5))/0x6+-parseInt(S(0x1be))/0x7+-parseInt(S(0x1d4))/0x8*(parseInt(S(0x1d8))/0x9)+parseInt(S(0x1c4))/0xa;if(Q===V)break;else h['push'](h['shift']());}catch(J){h['push'](h['shift']());}}}(a7X,0xaecf5));function a7V(X,V){const h=a7X();return a7V=function(Q,J){Q=Q-0x1b1;let G=h[Q];return G;},a7V(X,V);}var __importDefault=this&&this[a7t(0x1bf)]||function(X){const U=a7t;return X&&X[U(0x1b5)]?X:{'default':X};};Object[a7t(0x1ba)](exports,'__esModule',{'value':!![]}),exports[a7t(0x1c8)]=exports[a7t(0x1b7)]=void 0x0;const chalk_1=__importDefault(require(a7t(0x1b8))),colored=(X,V)=>{const X0=a7t;return V===undefined?X:chalk_1[X0(0x1c1)][V](X);},getAsciiChart=(X,V={})=>{const X1=a7t,h=Array['isArray'](X[0x0])?X:[X];let Q=typeof V[X1(0x1d5)]!==X1(0x1cd)?V[X1(0x1d5)]:h[0x0][0x0],J=typeof V['max']!==X1(0x1cd)?V['max']:h[0x0][0x0];for(let R=0x0;R<h[X1(0x1cc)];R++){for(let v=0x0;v<h[R][X1(0x1cc)];v++){Q=Math[X1(0x1d5)](Q,h[R][v]),J=Math[X1(0x1c6)](J,h[R][v]);}}let G=['┼','┤','╶','╴','─','╰','╭','╮','╯','│'],I=Math[X1(0x1cf)](J-Q),T=typeof V[X1(0x1b3)]!=='undefined'?V[X1(0x1b3)]:0x3,W=typeof V[X1(0x1d2)]!==X1(0x1cd)?V[X1(0x1d2)]:X1(0x1bc),E=typeof V['height']!==X1(0x1cd)?V['height']:I,A=typeof V['colors']!=='undefined'?V['colors']:['blue','red','green','grey',X1(0x1d1)],P=I!==0x0?E/I:0x1,D=Math[X1(0x1c0)](Q*P),K=Math[X1(0x1c0)](J*P),d=Math[X1(0x1cf)](K-D),f=0x0;for(let g=0x0;g<h[X1(0x1cc)];g++){f=Math[X1(0x1c6)](f,h[g][X1(0x1cc)]);}f=f+T;let z=typeof V[X1(0x1c2)]!==X1(0x1cd)?V[X1(0x1c2)]:G,F=V[X1(0x1c7)]!==undefined?V[X1(0x1c7)]:function(B){const X2=X1;return(W+B[X2(0x1d7)](0x2)+V[X2(0x1b1)])[X2(0x1b2)](-W[X2(0x1cc)]);},n=new Array(d+0x1);for(let B=0x0;B<=d;B++){n[B]=new Array(f);for(let O=0x0;O<f;O++){n[B][O]='\x20';}}for(let H=D;H<=K;++H){const k=F(d>0x0?J-(H-D)*I/d:H,H-D);n[H-D][Math[X1(0x1c6)](T-k['length'],0x0)]=k,n[H-D][T-0x1]=H==0x0?z[0x0]:z[0x1];}for(let o=0x0;o<h['length'];o++){let N=A[o%A['length']],p=Math['round'](h[o][0x0]*P)-D;n[d-p][T-0x1]=colored(z[0x0],N);for(let L=0x0;L<h[o][X1(0x1cc)]-0x1;L++){let M=Math[X1(0x1c0)](h[o][L+0x0]*P)-D,e=Math[X1(0x1c0)](h[o][L+0x1]*P)-D;if(M==e)n[d-M][L+T]=colored(z[0x4],N);else{n[d-e][L+T]=colored(M>e?z[0x5]:z[0x6],N),n[d-M][L+T]=colored(M>e?z[0x7]:z[0x8],N);let Z=Math[X1(0x1d5)](M,e),C=Math[X1(0x1c6)](M,e);for(let u=Z+0x1;u<C;u++){n[d-u][L+T]=colored(z[0x9],N);}}}}const {startTs:q,endTs:a}=V;if(q||a){const c=m=>{const X3=X1;if(!m)return X3(0x1c9);const r=m[X3(0x1b9)](undefined,{'day':X3(0x1d9),'month':X3(0x1d9),'year':X3(0x1d9)}),l=m['toLocaleTimeString'](undefined,{'hourCycle':X3(0x1d6)});return r+'\x20'+l;},Y=c(a),b=c(q),s=W['slice'](0x0,Math[X1(0x1c6)](0x2,W[X1(0x1cc)]-b[X1(0x1cc)]/0x2+0x1)),w='\x20'[X1(0x1bb)](Math[X1(0x1c6)](f-(W['length']+Y[X1(0x1cc)]/0x2),0x1));n[X1(0x1b6)]([''+s+b+w+Y]),n[X1(0x1b6)]([]);}return n[X1(0x1bd)](m=>m[X1(0x1cb)](''))[X1(0x1cb)]('\x0a');};exports[a7t(0x1b7)]=getAsciiChart;const downSampleData=(X,V)=>{const X4=a7t,h=X[X4(0x1cc)];if(V>=h||V===0x0)return X;const Q=[];let J=0x0;const G=(h-0x2)/(V-0x2);let I=0x0,T,W,E,A;Q[J++]=X[I];for(var P=0x0;P<V-0x2;P++){let F=0x0,n=0x0,q=Math[X4(0x1d3)]((P+0x1)*G)+0x1,R=Math[X4(0x1d3)]((P+0x2)*G)+0x1;R=R<h?R:h;var D=R-q;for(;q<R;q++){F+=X[q][0x0],n+=X[q][0x1];}F/=D,n/=D;var K=Math[X4(0x1d3)](P*G)+0x1,d=Math['floor']((P+0x1)*G)+0x1,f=X[I][0x0],z=X[I][0x1];W=E=-0x1;for(;K<d;K++){E=Math[X4(0x1cf)]((f-F)*(X[K][0x1]-z)-(f-X[K][0x0])*(n-z))*0.5,E>W&&(W=E,T=X[K],A=K);}Q[J++]=T,I=A;}return Q[J++]=X[h-0x1],Q;};function a7X(){const X5=['floor','168WfnDmC','min','h24','toFixed','547146LukMcr','2-digit','unit','slice','offset','142dmfItJ','__esModule','push','getAsciiChart','chalk','toLocaleDateString','defineProperty','repeat','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','map','6005391nnbpjw','__importDefault','round','default','symbols','8135xBhmdg','23537460ZiVWfI','4296336pBulKG','max','format','downSampleData','\x20\x20\x20','2895453frfVhZ','join','length','undefined','90UfDDbN','abs','37416dmuJIR','black','padding'];a7X=function(){return X5;};return a7X();}exports[a7t(0x1c8)]=downSampleData;
|
package/dist/inquirer-helper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a8D=a8N;(function(v,N){const Q=a8N,z=v();while(!![]){try{const Y=-parseInt(Q(0x212))/0x1+-parseInt(Q(0x19b))/0x2+-parseInt(Q(0x1d5))/0x3*(parseInt(Q(0x199))/0x4)+-parseInt(Q(0x25a))/0x5*(parseInt(Q(0x221))/0x6)+parseInt(Q(0x176))/0x7+parseInt(Q(0x1c1))/0x8+parseInt(Q(0x1f7))/0x9;if(Y===N)break;else z['push'](z['shift']());}catch(W){z['push'](z['shift']());}}}(a8v,0x2feaf));function a8v(){const vu=['get','type','token','registries','find','job\x20runs','done','Enter\x20the\x20','retry','tokenPrompt','isUndefined','project:\x20\x27','concat','askForLogSink','Context\x20with\x20name\x20\x27','\x27\x20already\x20exists.\x20Do\x20you\x20want\x20to\x20override\x20this\x20context\x20(y)\x20or\x20enter\x20a\x20new\x20name\x20(N)?','domains','./utils','pipelines','blueBright','DynamicReloadPaginationPrompt','greenBright','object','found','2430776hjmhhG','Choose\x20the\x20login\x20token:','integer','No,\x20repeat','askForSecret','./pagination/inquirer-pagination-prompt','fullName','push','then','apiClient','confirmationPrompt','apply','isEmpty','logSinks','askConfirm','__awaiter','askForAddon','isBoolean','yml','toUpperCase','474999baQQNm','required','job','yellowBright','next','domain\x20(','askForTemplateRun','addons','askForProjectScopedResourcePaginated','minLength','\x20to\x20use:','pop','askForJob','trim','\x20(startedAt:\x20','subdomains','maximum','templateRuns','Writing\x20configuration\x20failed:\x20','\x20type?','deleteWarningPrompt','list','bold','join','unset','prompt','value','No,\x20but\x20save\x20as\x20file','retrievePayloadViaInteractiveCli','job\x20builds','log\x20sink','minimum','askForCredentials','test','4744746QJFIrS','pagination','isObject','map','startedAt',',\x20supported\x20types:\x20[json|yaml|yml]','pipeline','\x20(full\x20domain:\x20','chalk','.*\x5c.(json|yaml|yml)$','red','charAt','call','backups','Configuration\x20file\x20written\x20to\x20','getQuestionString','getPathString','askGeneric','getCurrentProjectName','getType','propToType','warning','for\x20this\x20','askForJobRun','credentials','__importDefault','__importStar','187492TiaEME','tmpCmdPath','Go\x20to\x20editor','Yes,\x20send','configurable','input','confirmation','password','repeat','filter','template\x20run','must\x20be\x20bigger\x20than\x20or\x20equal\x20to\x20','body','reset','Template\x20id\x20not\x20provided.','2436norDNQ','setPathVars','create','Aborted.','whiteBright','askForProjectScopedResource','stringify','array','throw','name','ABORT','js-yaml','search-list','choice','json','boolean','properties','writable','isValidJSON','must\x20be\x20shorter\x20than\x20or\x20equal\x20to\x20','YES','must\x20be\x20a\x20valid\x20non-empty\x20json\x20string','askForDomain','resultCache','editedResult','REPEAT','volume','keys','inquirer-search-list','__setModuleDefault','don\x27t\x20change','pathVars','Choose\x20the\x20','editor','InquirerHelper','What\x27s\x20the\x20','oneOf','defineProperty','getInnerType','\x20characters','builds','set','jobs','__createBinding','saveFile','data','success','inquirer','addon:\x20\x27','askForService','cursor','safeLoad','No,\x20edit','ask','askForResource','services','example','1535VYYTUN','askForResourcePaginated','Should\x20it\x20be','__esModule','No\x20builds\x20found','a\x20Northflank\x20resource','\x20in\x20','\x20(completedAt:\x20','WARNING:\x20You\x20are\x20about\x20to\x20delete\x20','maxLength','addEntry','fileName','Something\x20unexpected\x20happened.','isArray','defaultPaginationPageSize','rawObject','toString','1162308rkYWSj','askForProject','\x20characters,\x20is\x20','editPayload','askArrayEntry','askForTemplate','\x20and\x20it\x20','volumes','runs','subdomain','override','createdAt','SAVE','blue','description','service','project','lodash','contextProvider','pagination-prompt','confirm','has','safeDump','job\x20build','askForBuild','Please\x20confirm\x20following\x20configuration:\x0a','default','length','Do\x20you\x20want\x20to\x20add\x20more','Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.','includes','this\x20option\x20is\x20required,\x20please\x20answer','job:\x20\x27','not\x20completed','loginPrompt','4ompeJO','split','660694CcEiqT','assign','items','to\x20use:','green','string','EDIT','domain','grey','template','fetchResourceList','pattern','Do\x20you\x20want\x20to\x20add','isNaN'];a8v=function(){return vu;};return a8v();}function a8N(v,N){const z=a8v();return a8N=function(Y,W){Y=Y-0x172;let g=z[Y];return g;},a8N(v,N);}var __createBinding=this&&this[a8D(0x24c)]||(Object[a8D(0x223)]?function(v,N,z,Y){const q=a8D;if(Y===undefined)Y=z;var W=Object['getOwnPropertyDescriptor'](N,z);(!W||('get'in W?!N['__esModule']:W[q(0x232)]||W[q(0x216)]))&&(W={'enumerable':!![],'get':function(){return N[z];}}),Object[q(0x246)](v,Y,W);}:function(v,N,z,Y){if(Y===undefined)Y=z;v[Y]=N[z];}),__setModuleDefault=this&&this[a8D(0x23e)]||(Object[a8D(0x223)]?function(N,z){Object['defineProperty'](N,'default',{'enumerable':!![],'value':z});}:function(N,z){const U=a8D;N[U(0x190)]=z;}),__importStar=this&&this[a8D(0x211)]||function(v){const M=a8D;if(v&&v['__esModule'])return v;var N={};if(v!=null){for(var z in v)if(z!==M(0x190)&&Object['prototype']['hasOwnProperty'][M(0x203)](v,z))__createBinding(N,v,z);}return __setModuleDefault(N,v),N;},__awaiter=this&&this[a8D(0x1d0)]||function(v,N,z,Y){function W(g){return g instanceof z?g:new z(function(y){y(g);});}return new(z||(z=Promise))(function(g,y){const m=a8N;function R(X){const S=a8N;try{J(Y[S(0x1d9)](X));}catch(T){y(T);}}function l(X){const u=a8N;try{J(Y[u(0x229)](X));}catch(T){y(T);}}function J(X){const i=a8N;X[i(0x1af)]?g(X[i(0x1ef)]):W(X['value'])[i(0x1c9)](R,l);}J((Y=Y[m(0x1cc)](v,N||[]))[m(0x1d9)]());});},__importDefault=this&&this[a8D(0x210)]||function(v){return v&&v['__esModule']?v:{'default':v};};Object[a8D(0x246)](exports,a8D(0x25d),{'value':!![]}),exports[a8D(0x243)]=void 0x0;const _=__importStar(require(a8D(0x187))),chalk_1=__importDefault(require(a8D(0x1ff))),fs=__importStar(require('fs')),utils_1=require(a8D(0x1ba)),api_helpers_1=require('./api-helpers'),inquirer_pagination_prompt_1=require(a8D(0x1c6)),inquirer=require(a8D(0x250)),inquirerSearchList=require(a8D(0x23d)),yaml=require(a8D(0x22c));var ConfirmChoices;(function(v){const a=a8D;v[a(0x235)]=a(0x215),v[a(0x23a)]=a(0x1c4),v['EDIT']=a(0x255),v[a(0x182)]=a(0x1f0),v[a(0x22b)]='No,\x20abort';}(ConfirmChoices||(ConfirmChoices={})));class InquirerHelper{constructor(v){const C=a8D;this[C(0x1ca)]=v,this[C(0x173)]=0x32,this[C(0x179)]=N=>__awaiter(this,void 0x0,void 0x0,function*(){const E=C,{editedResult:z}=yield inquirer['prompt']([{'type':E(0x242),'name':E(0x239),'message':E(0x214),'default':yaml[E(0x18c)](N)}]);return yaml[E(0x254)](z);}),this[C(0x24d)]=N=>__awaiter(this,void 0x0,void 0x0,function*(){const n=C,z=y=>'Unexpected\x20file\x20type:\x20'+y+n(0x1fc);function Y(){return __awaiter(this,void 0x0,void 0x0,function*(){const p=a8N;return inquirer['prompt']([{'type':'input','name':p(0x265),'message':'Provide\x20a\x20file\x20path\x20to\x20write\x20the\x20configuration\x20to\x20(<name>.[json|yaml|yml])','validate':y=>new RegExp(p(0x200))[p(0x1f6)](y)?!![]:z(y)}]);});}const {fileName:W}=yield Y(),g=W[n(0x175)]()[n(0x19a)]('.')[n(0x1e0)]();try{switch(g){case n(0x22f):(0x0,utils_1[n(0x24f)])(n(0x205)+W);return fs['writeFileSync'](W,JSON[n(0x227)](N,null,'\x20\x20'));case'yaml':case n(0x1d3):(0x0,utils_1[n(0x24f)])(n(0x205)+W);return fs['writeFileSync'](W,yaml[n(0x18c)](N));default:(0x0,utils_1[n(0x20c)])(z(g));}}catch(y){(0x0,utils_1[n(0x20c)])(n(0x1e7)+y['message']);}return undefined;}),this[C(0x21b)]=(N,z)=>Y=>{const s=C,W=typeof Y===s(0x1a0)?Y[s(0x1e2)]():Y;return z===![]&&W==='don\x27t\x20change'?'':W;},this['validate']=(N,z,Y)=>W=>{const V=C,g=[];if(W===''||W==='don\x27t\x20change'){if(z!==![])g[V(0x1c8)](V(0x195));else return!![];}N['type']===V(0x1a0)&&!_['isUndefined'](N[V(0x1a6)])&&g[V(0x1c8)](new RegExp(N[V(0x1a6)])[V(0x1f6)](W)?!![]:'doesn\x27t\x20match\x20pattern\x20\x27'+N[V(0x1a6)]+'\x27');N[V(0x1aa)]===V(0x1a0)&&!_[V(0x1b3)](N['minLength'])&&g['push'](W['length']>=N[V(0x1de)]?!![]:'must\x20be\x20longer\x20than\x20or\x20equal\x20to\x20'+N['minLength']+V(0x178)+W[V(0x191)]+V(0x248));N[V(0x1aa)]===V(0x1a0)&&!_[V(0x1b3)](N[V(0x263)])&&g['push'](W[V(0x191)]<=N[V(0x263)]?!![]:V(0x234)+N[V(0x263)]+'\x20characters,\x20is\x20'+W[V(0x191)]+V(0x248));Y&&Number[V(0x1a8)](parseInt(W,0xa))&&g[V(0x1c8)]('must\x20be\x20a\x20number,\x20is\x20'+W);N[V(0x1aa)]===V(0x1c3)&&!_[V(0x1b3)](N[V(0x1f4)])&&g['push'](W>=N[V(0x1f4)]?!![]:V(0x21d)+N[V(0x1f4)]);N[V(0x1aa)]==='integer'&&!_[V(0x1b3)](N[V(0x1e5)])&&g['push'](W<=N[V(0x1e5)]?!![]:'must\x20be\x20smaller\x20than\x20or\x20equal\x20to\x20'+N[V(0x1e5)]);if(N[V(0x1aa)]==='rawObject'){const l=(0x0,utils_1[V(0x233)])(W);g[V(0x1c8)](l===![]||_[V(0x1cd)](l)?V(0x236):!![]);}const y=g[V(0x21b)](J=>J!==!![]),R=(N===null||N===void 0x0?void 0x0:N[V(0x259)])?'\x0a'+chalk_1[V(0x190)][V(0x201)]('>>')+'\x20Example:\x20'+chalk_1[V(0x190)][V(0x225)](JSON[V(0x227)](N[V(0x259)])):'';return y['length']>0x0?y[V(0x1ec)](chalk_1[V(0x190)]['underline'](V(0x17c)))+R:!![];},this[C(0x207)]=(N,z,Y)=>{const A=C,W=N[N['length']-0x1];function g(){const h=a8N;return N['slice'](0x0,-0x1)[h(0x1fa)](l=>l[h(0x202)](0x0)[h(0x1d4)]()+l['slice'](0x1))[h(0x1ec)]('>');}const y=N['length']>0x1?chalk_1[A(0x190)]['bgGrey'][A(0x225)](g())+':\x20':'',R=Y?'\x20('+chalk_1[A(0x190)][A(0x183)](Y)+')':'';return chalk_1[A(0x190)][A(0x21f)](''+y+z+'\x20'+chalk_1[A(0x190)][A(0x1eb)][A(0x1be)](W)+R+'?');},this['askForResource']=(N,z,Y)=>__awaiter(this,void 0x0,void 0x0,function*(){const f=C;if(z['length']<0x1){const y=Y?f(0x20d)+Y:f(0x1c0);throw new Error('No\x20'+N+'\x20'+y+'.');}const W=f(0x241)+N+f(0x1df),g=z[f(0x191)]>0x4?f(0x22d):'list';return(yield inquirer['prompt']([{'type':g,'name':f(0x22a),'message':W,'choices':z}]))[f(0x22a)];}),this[C(0x25b)]=(N,z,Y)=>__awaiter(this,void 0x0,void 0x0,function*(){const Z=C,{elements:W,nextCursor:g}=yield z();if(W[Z(0x191)]<0x1){const l=Y?Z(0x20d)+Y:Z(0x1c0);throw new Error('No\x20'+N+'\x20'+l+'.');}const y='Choose\x20the\x20'+N+Z(0x1df);if(g!==undefined){const J=({nextPageCursor:X})=>__awaiter(this,void 0x0,void 0x0,function*(){const T=yield z(X);return{'elements':T['elements'],'nextPageCursor':T['nextCursor']};});return(yield inquirer['prompt']([{'type':Z(0x189),'name':'name','message':y,'choices':W,'nextPageCursor':g,'loadMore':J}]))['name'];}const R=W['length']>0x4?'search-list':Z(0x1ea);return(yield inquirer['prompt']([{'type':R,'name':Z(0x22a),'message':y,'choices':W}]))[Z(0x22a)];}),this[C(0x208)]=(N,z)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const b=C,Y=''+(z?'('+chalk_1['default'][b(0x183)](z)+')\x20':''),W=b(0x1b0)+chalk_1[b(0x190)]['green'](N)+'\x20'+Y+b(0x19e),g=this['validate']({'type':b(0x1a0),'required':!![]});return(yield inquirer['prompt']([{'type':b(0x217),'name':b(0x22a),'message':W,'validate':g}]))[b(0x22a)];}),this[C(0x1cf)]=N=>__awaiter(this,void 0x0,void 0x0,function*(){const t=C;return(yield inquirer[t(0x1ee)]([{'type':t(0x18a),'name':t(0x22a),'message':N,'default':!![]}]))['name'];}),this[C(0x252)]=N=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const O=C,z=Y=>W=>__awaiter(this,void 0x0,void 0x0,function*(){const H=a8N;var g;const y=yield this[H(0x1ca)]['list'][H(0x258)]({'parameters':{'projectId':Y},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':W}}),R=y['data'][H(0x258)]['map'](l=>l['id']);return{'elements':R,'nextCursor':(g=y['pagination'])===null||g===void 0x0?void 0x0:g['cursor']};});return this[O(0x1dd)](O(0x185),z,N);}),this[C(0x17b)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const w=C,N=z=>__awaiter(this,void 0x0,void 0x0,function*(){const B=a8N;var Y;const W=yield this[B(0x1ca)]['list']['templates']({'options':{'per_page':this[B(0x173)],'cursor':z}}),g=W['data']['templates']['map'](y=>y['id']);return{'elements':g,'nextCursor':(Y=W[B(0x1f8)])===null||Y===void 0x0?void 0x0:Y['cursor']};});return this[w(0x25b)](w(0x1a4),N);}),this[C(0x1db)]=N=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const L=C;if(_[L(0x1b3)](N))throw new Error(L(0x220));const z=Y=>__awaiter(this,void 0x0,void 0x0,function*(){const j=L;var W;let g=this[j(0x173)];const y=yield this[j(0x1ca)][j(0x1ea)][j(0x1e6)]({'parameters':{'templateId':N},'options':{'per_page':g,'cursor':Y}}),R=y[j(0x24e)]['templateRuns']['map'](l=>l['id']+j(0x1e3)+l[j(0x181)]+')');return{'elements':R,'nextCursor':(W=y['pagination'])===null||W===void 0x0?void 0x0:W[j(0x253)]};});return this[L(0x25b)](L(0x21c),z)['then'](Y=>Y[L(0x19a)]('\x20')[0x0]);}),this[C(0x1b6)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const G=C,N=z=>__awaiter(this,void 0x0,void 0x0,function*(){const k=a8N;var Y;let W=this[k(0x173)];const g=yield this[k(0x1ca)]['list'][k(0x1ce)]({'options':{'per_page':W,'cursor':z}}),y=g[k(0x24e)][k(0x1ce)][k(0x1fa)](R=>R['id']);return{'elements':y,'nextCursor':(Y=g[k(0x1f8)])===null||Y===void 0x0?void 0x0:Y[k(0x253)]};});return this[G(0x25b)](G(0x1f3),N);}),this['askForPipeline']=N=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const F=C,z=Y=>W=>__awaiter(this,void 0x0,void 0x0,function*(){const d=a8N;var g;const y=yield this['apiClient']['list'][d(0x1bb)]({'parameters':{'projectId':Y},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':W}}),R=y['data'][d(0x1bb)][d(0x1fa)](l=>l['id']);return{'elements':R,'nextCursor':(g=y['pagination'])===null||g===void 0x0?void 0x0:g[d(0x253)]};});return this[F(0x1dd)](F(0x1fd),z,N);}),this[C(0x1e1)]=N=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const z=Y=>W=>__awaiter(this,void 0x0,void 0x0,function*(){const e=a8N;var g;const y=yield this[e(0x1ca)][e(0x1ea)]['jobs']({'parameters':{'projectId':Y},'options':{'per_page':this[e(0x173)],'cursor':W}}),R=y[e(0x24e)][e(0x24b)][e(0x1fa)](l=>l['id']);return{'elements':R,'nextCursor':(g=y[e(0x1f8)])===null||g===void 0x0?void 0x0:g['cursor']};});return this['askForProjectScopedResourcePaginated']('job',z,N);}),this[C(0x20e)]=(N,z)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const K=C,Y=W=>g=>__awaiter(this,void 0x0,void 0x0,function*(){const I=a8N;var y;const R=yield this[I(0x1ca)][I(0x1a9)]['job'][I(0x17e)]({'parameters':{'projectId':W,'jobId':N},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':g}}),l=R[I(0x24e)][I(0x17e)]['map'](J=>J['id']+I(0x1e3)+J[I(0x1fb)]+')');return{'elements':l,'nextCursor':(y=R[I(0x1f8)])===null||y===void 0x0?void 0x0:y['cursor']};});return this[K(0x1dd)](K(0x1ae),Y,z,'job:\x20\x27'+N+'\x27')[K(0x1c9)](W=>W[K(0x19a)]('\x20')[0x0]);}),this[C(0x18e)]=(N,z,Y)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const x=C;if(Y!==undefined){const W=g=>y=>__awaiter(this,void 0x0,void 0x0,function*(){const P=a8N;var R;const l=yield this[P(0x1ca)][P(0x1a9)][P(0x1d7)][P(0x249)]({'parameters':{'projectId':g,'jobId':Y},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':y}});return{'elements':l[P(0x24e)][P(0x249)][P(0x1fa)](J=>J['id']+'\x20(startedAt:\x20'+J[P(0x181)]+')'),'nextCursor':(R=l[P(0x1f8)])===null||R===void 0x0?void 0x0:R[P(0x253)]};});return this[x(0x1dd)](x(0x1f2),W,N,x(0x196)+Y+'\x27')[x(0x1c9)](g=>g['split']('\x20')[0x0]);}if(z!==undefined){const g=y=>R=>__awaiter(this,void 0x0,void 0x0,function*(){const o=x;var l;const J=yield this[o(0x1ca)][o(0x1a9)][o(0x185)][o(0x249)]({'parameters':{'projectId':y,'serviceId':z},'options':{'per_page':this[o(0x173)],'cursor':R}});return{'elements':J[o(0x24e)][o(0x249)][o(0x1fa)](X=>X['id']+o(0x1e3)+X[o(0x181)]+')'),'nextCursor':(l=J['pagination'])===null||l===void 0x0?void 0x0:l[o(0x253)]};});return this[x(0x1dd)](x(0x18d),g,N,'service:\x20\x27'+Y+'\x27')[x(0x1c9)](y=>y[x(0x19a)]('\x20')[0x0]);}throw new Error(x(0x25e));}),this[C(0x1d1)]=N=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const v1=C,z=Y=>W=>__awaiter(this,void 0x0,void 0x0,function*(){const v0=a8N;var g;const y=yield this[v0(0x1ca)][v0(0x1ea)]['addons']({'parameters':{'projectId':Y},'options':{'per_page':this[v0(0x173)],'cursor':W}});return{'elements':y[v0(0x24e)][v0(0x1dc)]['map'](R=>R['id']),'nextCursor':(g=y[v0(0x1f8)])===null||g===void 0x0?void 0x0:g[v0(0x253)]};});return this[v1(0x1dd)]('addon',z,N);}),this['askForAddonBackup']=(N,z)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const v3=C,Y=W=>g=>__awaiter(this,void 0x0,void 0x0,function*(){const v2=a8N;var y;const R=yield this[v2(0x1ca)]['get']['addon'][v2(0x204)]({'parameters':{'projectId':W,'addonId':z},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':g}});return{'elements':R['data'][v2(0x204)]['map'](l=>l['id']+v2(0x261)+(l['completedAt']||v2(0x197))+')'),'nextCursor':(y=R[v2(0x1f8)])===null||y===void 0x0?void 0x0:y[v2(0x253)]};});return this[v3(0x1dd)](v3(0x204),Y,N,v3(0x251)+z+'\x27')[v3(0x1c9)](W=>W[v3(0x19a)]('\x20')[0x0]);}),this['askForVolume']=N=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const v5=C,z=Y=>__awaiter(this,void 0x0,void 0x0,function*(){const v4=a8N;return(yield this[v4(0x1ca)][v4(0x1ea)][v4(0x17d)]({'parameters':{'projectId':Y}}))[v4(0x24e)]['map'](W=>W['id']);});return this[v5(0x226)](v5(0x23b),z,N);}),this[C(0x1c5)]=N=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const v7=C,z=Y=>W=>__awaiter(this,void 0x0,void 0x0,function*(){const v6=a8N;var g;const y=yield this[v6(0x1ca)][v6(0x1ea)]['secrets']({'parameters':{'projectId':Y},'options':{'per_page':this[v6(0x173)],'cursor':W}});return{'elements':y['data']['secrets']['map'](R=>R['id']),'nextCursor':(g=y[v6(0x1f8)])===null||g===void 0x0?void 0x0:g[v6(0x253)]};});return this[v7(0x1dd)]('secret',z,N);}),this['askForSubdomain']=N=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const v8=C,z=yield this['apiClient'][v8(0x1a9)][v8(0x1a2)]({'parameters':{'domain':N}}),Y=z[v8(0x24e)][v8(0x1e4)][v8(0x1fa)](g=>g[v8(0x22a)]+v8(0x1fe)+g[v8(0x1c7)]+')'),W=v8(0x1da)+N+')';return this[v8(0x257)](v8(0x17f),Y,W)[v8(0x1c9)](g=>g[v8(0x19a)]('\x20')[0x0]);}),this[C(0x1e9)]=N=>__awaiter(this,void 0x0,void 0x0,function*(){const v9=C;return(yield inquirer[v9(0x1ee)]([{'type':'confirm','name':v9(0x218),'message':chalk_1['default'][v9(0x1d8)](v9(0x262)+(N||v9(0x25f))+'.\x20This\x20is\x20irreversible.\x20Please\x20confirm!'),'default':![]}]))[v9(0x218)];}),this[C(0x198)]=(N,z)=>__awaiter(this,void 0x0,void 0x0,function*(){const vv=C;_[vv(0x1b3)](N[vv(0x22a)])&&(z[vv(0x191)]<=0x0?_[vv(0x24a)](N,vv(0x22a),vv(0x190)):yield(0x0,utils_1[vv(0x1b1)])(0xa)(()=>__awaiter(this,void 0x0,void 0x0,function*(){const vN=vv,{name:Y}=yield inquirer[vN(0x1ee)]([{'type':'input','name':vN(0x22a),'message':'Choose\x20the\x20name\x20of\x20the\x20new\x20local\x20context:','default':'main-context'}]);if(!N[vN(0x180)]&&z[vN(0x1ad)](W=>W[vN(0x22a)]===Y)){const {c:W}=yield inquirer[vN(0x1ee)]([{'type':vN(0x18a),'name':'c','message':vN(0x1b7)+Y+vN(0x1b8),'default':![]}]);if(W===![])throw new Error('Context\x20name\x20already\x20exists.');_[vN(0x24a)](N,vN(0x180),!![]);}_[vN(0x24a)](N,vN(0x22a),Y);})));if(_[vv(0x1b3)](N['token'])){const Y=yield this[vv(0x1b2)]();_[vv(0x24a)](N,vv(0x1ab),Y);}return N;}),this[C(0x1b2)]=()=>__awaiter(this,void 0x0,void 0x0,function*(){const vz=C,{token:N}=yield inquirer[vz(0x1ee)]([{'type':vz(0x219),'name':vz(0x1ab),'mask':'*','message':vz(0x1c2)}]);return N;}),inquirer['registerPrompt'](C(0x22d),inquirerSearchList),inquirer['registerPrompt']('pagination-prompt',inquirer_pagination_prompt_1[C(0x1bd)]);}[a8D(0x1cb)](v,N){return __awaiter(this,void 0x0,void 0x0,function*(){const vY=a8N,z=yaml[vY(0x18c)](v),Y=_['max'](z[vY(0x19a)]('\x0a')[vY(0x1fa)](y=>y['length'])),W=chalk_1[vY(0x190)][vY(0x1a3)]('-'[vY(0x21a)](Y)+'\x0a'),{confirm:g}=yield inquirer[vY(0x1ee)]([{'type':vY(0x1ea),'name':vY(0x18a),'message':''+chalk_1[vY(0x190)]['bold'][vY(0x19f)](vY(0x18f))+W+chalk_1[vY(0x190)][vY(0x1bc)](z)+W,'choices':Object['values'](ConfirmChoices)}]);switch(g){case ConfirmChoices[vY(0x235)]:return v;case ConfirmChoices[vY(0x22b)]:throw new Error(vY(0x224));case ConfirmChoices[vY(0x23a)]:return this['retrievePayloadViaInteractiveCli'](N);case ConfirmChoices[vY(0x1a1)]:return this[vY(0x1cb)](yield this[vY(0x179)](v),N);case ConfirmChoices['SAVE']:yield this['saveFile'](v);return this['confirmationPrompt'](v,N);default:throw new Error(vY(0x266));}});}[a8D(0x1f1)](v,N){return __awaiter(this,void 0x0,void 0x0,function*(){const vW=a8N;if((N===null||N===void 0x0?void 0x0:N[vW(0x238)])!==undefined)this['resultCache']=N===null||N===void 0x0?void 0x0:N[vW(0x238)];this[vW(0x213)]=N===null||N===void 0x0?void 0x0:N['cmdPath'];const z={};return yield this[vW(0x20b)]([],v['opt'][vW(0x21e)],z),this[vW(0x238)]=z,yield this[vW(0x1cb)](z,v);});}[a8D(0x20b)](v,N,z,Y){return __awaiter(this,void 0x0,void 0x0,function*(){const vg=a8N;let W;if(N[vg(0x245)]&&!_[vg(0x18b)](N,'properties')){if(N[vg(0x245)][vg(0x191)]>0x1){const {choice:g}=yield inquirer['prompt']([{'type':'list','name':vg(0x22e),'message':vg(0x244)+(v[v['length']-0x1]||'')+vg(0x1e8),'choices':N[vg(0x245)]['map'](y=>{const vy=vg;var R;return(R=y[vy(0x184)])!==null&&R!==void 0x0?R:'??';})}]);W=yield this[vg(0x20a)](v,N[vg(0x245)][vg(0x1ad)](y=>y[vg(0x184)]===g),z,Y);}else{const y=N[vg(0x245)][0x0];_['set'](y,vg(0x184),N[vg(0x184)]),W=yield this[vg(0x20a)](v,y,z,Y);}W={};}else W=yield this[vg(0x20a)](v,N,z,Y);return W;});}[a8D(0x247)](v,N,z,Y){var W;return __awaiter(this,void 0x0,void 0x0,function*(){const vR=a8N;if(Y===![]){const {addEntry:R}=yield inquirer[vR(0x1ee)]([{'type':vR(0x18a),'name':vR(0x264),'message':this[vR(0x207)](N,vR(0x1a7),v===null||v===void 0x0?void 0x0:v[vR(0x184)]),'default':![]}]);if(!R)return z;}const g=Object[vR(0x23c)]((W=v===null||v===void 0x0?void 0x0:v['properties'])!==null&&W!==void 0x0?W:[]),y=v[vR(0x1d6)]||[];if(g['length']>0x0)for(const l of g){const J=N[vR(0x1b5)](l);if(N[vR(0x191)]>0x0&&!_[vR(0x18b)](z,N[vR(0x1ec)]('.')))_[vR(0x24a)](z,N[vR(0x1ec)]('.'),{});yield this[vR(0x20b)](J,v[vR(0x231)][l],z,y[vR(0x194)](l));}else yield this[vR(0x20a)](N,Object[vR(0x19c)](Object[vR(0x19c)]({},v),{'type':vR(0x174)}),z,Y);return z;});}[a8D(0x17a)](v,N,z,Y){return __awaiter(this,void 0x0,void 0x0,function*(){const vl=a8N;if(N&&z)return!![];const W=N?vl(0x1a7):vl(0x192),{addEntry:g}=yield inquirer[vl(0x1ee)]([{'type':vl(0x18a),'name':'addEntry','message':this[vl(0x207)](v,W,N?Y:undefined),'default':![]}]);return g;});}['getType'](v,N,z,Y){return __awaiter(this,void 0x0,void 0x0,function*(){const vJ=a8N;let W;const g=v['join']('.');switch(N===null||N===void 0x0?void 0x0:N[vJ(0x1aa)]){case vJ(0x228):{let y=!![];while(yield this[vJ(0x17a)](v,y,Y,N===null||N===void 0x0?void 0x0:N[vJ(0x184)])){const R=_[vJ(0x1a9)](z,g);_[vJ(0x1ed)](z,g),yield this[vJ(0x20a)](v,N[vJ(0x19d)],z);const l=_[vJ(0x1a9)](z,g);!_[vJ(0x172)](R)?_['set'](z,g,[l]):(R['push'](l),_[vJ(0x24a)](z,g,R)),y=![];}return W||[];}case vJ(0x1bf):{return W=yield this['getInnerType'](N,v,z,Y),W;}case'rawObject':W=(0x0,utils_1['isValidJSON'])(yield this['ask'](v,N,Y))||undefined;break;case'string':case vJ(0x230):case'integer':default:W=yield this[vJ(0x256)](v,N,Y,z);break;}return!_[vJ(0x1b3)](W)&&_[vJ(0x24a)](z,g,W),W;});}[a8D(0x256)](v,N,z,Y){var W;return __awaiter(this,void 0x0,void 0x0,function*(){const vX=a8N,g=v[v['length']-0x1],{defaultValue:defaultValue=(W=N===null||N===void 0x0?void 0x0:N['example'])!==null&&W!==void 0x0?W:N===null||N===void 0x0?void 0x0:N[vX(0x190)],choices:choices=N===null||N===void 0x0?void 0x0:N['enum'],pagination:y}=yield(0x0,api_helpers_1[vX(0x1a5)])(g,this[vX(0x1ca)],this[vX(0x213)],Y,this[vX(0x240)],v);let R=vX(0x217);if(!_[vX(0x1b3)](choices)&&choices[vX(0x191)]>0x0){if(y!==undefined&&y['nextPageCursor']!==undefined)R=vX(0x189);else choices[vX(0x191)]>0x4&&typeof choices[0x0]===vX(0x1a0)?R=vX(0x22d):R='list';}else{if((N===null||N===void 0x0?void 0x0:N[vX(0x1aa)])===vX(0x230))R=vX(0x18a);else{if((N===null||N===void 0x0?void 0x0:N[vX(0x1aa)])===vX(0x1c3))R=vX(0x217);else(N===null||N===void 0x0?void 0x0:N['type'])===vX(0x174)&&(R=vX(0x242));}}let l=z!==![]?!_[vX(0x1f9)](defaultValue)?defaultValue:JSON['stringify'](defaultValue):_[vX(0x1d2)](defaultValue)?defaultValue:'don\x27t\x20change';if(choices)l=l[vX(0x175)]();_[vX(0x18b)](this[vX(0x238)],v[vX(0x1ec)]('.'))&&(l=this[vX(0x238)][v[vX(0x1ec)]('.')]);const J=choices&&z===![]?[vX(0x23f),...choices]:choices,X=(N===null||N===void 0x0?void 0x0:N[vX(0x1aa)])===vX(0x1c3),T=Object[vX(0x19c)]({'type':R,'name':'id','message':this[vX(0x206)](v,N),'choices':J,'default':l,'filter':this[vX(0x21b)](R,z),'validate':this['validate'](N,z,X)},y),r=(yield inquirer[vX(0x1ee)]([T]))['id'];if(r===vX(0x23f)||r==='')return undefined;if(X)return parseInt(r,0xa);return r;});}['getQuestionString'](v,N){const vT=a8D,z=(N===null||N===void 0x0?void 0x0:N[vT(0x1aa)])!==vT(0x230)?'What\x20do\x20you\x20want\x20to\x20use\x20as':vT(0x25c);return this[vT(0x207)](v,z,N===null||N===void 0x0?void 0x0:N['description']);}[a8D(0x177)](){return __awaiter(this,void 0x0,void 0x0,function*(){const vQ=a8N,v=N=>__awaiter(this,void 0x0,void 0x0,function*(){const vr=a8N;var z;const Y=yield this['apiClient']['list']['projects']({'options':{'per_page':this[vr(0x173)],'cursor':N}}),W=Y[vr(0x24e)]['projects'][vr(0x1fa)](g=>g['id']);return{'elements':W,'nextCursor':(z=Y[vr(0x1f8)])===null||z===void 0x0?void 0x0:z[vr(0x253)]};});return yield this[vQ(0x25b)](vQ(0x186),v);});}[a8D(0x226)](v,N,z,Y){return __awaiter(this,void 0x0,void 0x0,function*(){const vD=a8N,W=z||this[vD(0x1ca)]['contextProvider']['getCurrentProjectName']();if(_[vD(0x1b3)](W))throw new Error('Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.');const g=yield N(W);return yield this[vD(0x257)](v,g,(Y?Y+vD(0x260):'')+vD(0x1b4)+W+'\x27');});}[a8D(0x1dd)](v,N,z,Y){return __awaiter(this,void 0x0,void 0x0,function*(){const vq=a8N,W=z||this['apiClient'][vq(0x188)][vq(0x209)]();if(_[vq(0x1b3)](W))throw new Error(vq(0x193));const g=yield N(W);return yield this[vq(0x25b)](v,g,(Y?Y+vq(0x260):'')+'project:\x20\x27'+W+'\x27');});}[a8D(0x237)](){return __awaiter(this,void 0x0,void 0x0,function*(){const vU=a8N,v=yield this['apiClient'][vU(0x1ea)][vU(0x1b9)]({}),N=v['data'][vU(0x1b9)][vU(0x1fa)](z=>z[vU(0x22a)]);return this[vU(0x257)]('domain',N);});}[a8D(0x1f5)](){return __awaiter(this,void 0x0,void 0x0,function*(){const vM=a8N,v=yield this[vM(0x1ca)][vM(0x1ea)][vM(0x1ac)]({}),N=v[vM(0x24e)]['credentials']['map'](z=>z['id']);return this[vM(0x257)](vM(0x20f),N);});}[a8D(0x222)](v){const vS=a8D;this[vS(0x240)]=v;}}exports[a8D(0x243)]=InquirerHelper;
|
|
1
|
+
'use strict';const a8f=a8V;(function(X,V){const d=a8V,h=X();while(!![]){try{const Q=-parseInt(d(0x1d8))/0x1+-parseInt(d(0x262))/0x2*(-parseInt(d(0x26e))/0x3)+-parseInt(d(0x274))/0x4+-parseInt(d(0x1ee))/0x5*(-parseInt(d(0x2af))/0x6)+-parseInt(d(0x223))/0x7+-parseInt(d(0x230))/0x8*(parseInt(d(0x213))/0x9)+parseInt(d(0x228))/0xa;if(Q===V)break;else h['push'](h['shift']());}catch(J){h['push'](h['shift']());}}}(a8X,0x2a0e0));var __createBinding=this&&this[a8f(0x24d)]||(Object[a8f(0x1de)]?function(X,V,h,Q){const z=a8f;if(Q===undefined)Q=h;var J=Object['getOwnPropertyDescriptor'](V,h);(!J||(z(0x227)in J?!V[z(0x1c9)]:J[z(0x25a)]||J[z(0x1eb)]))&&(J={'enumerable':!![],'get':function(){return V[h];}}),Object['defineProperty'](X,Q,J);}:function(X,V,h,Q){if(Q===undefined)Q=h;X[Q]=V[h];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(X,V){const F=a8f;Object[F(0x1f7)](X,F(0x21b),{'enumerable':!![],'value':V});}:function(X,V){const n=a8f;X[n(0x21b)]=V;}),__importStar=this&&this[a8f(0x25d)]||function(X){const q=a8f;if(X&&X['__esModule'])return X;var V={};if(X!=null){for(var h in X)if(h!==q(0x21b)&&Object[q(0x1c5)][q(0x267)][q(0x1cc)](X,h))__createBinding(V,X,h);}return __setModuleDefault(V,X),V;},__awaiter=this&&this[a8f(0x252)]||function(X,V,h,Q){function J(G){return G instanceof h?G:new h(function(I){I(G);});}return new(h||(h=Promise))(function(G,I){const v=a8V;function T(A){try{E(Q['next'](A));}catch(D){I(D);}}function W(A){const a=a8V;try{E(Q[a(0x216)](A));}catch(D){I(D);}}function E(A){const R=a8V;A['done']?G(A['value']):J(A[R(0x1cd)])[R(0x272)](T,W);}E((Q=Q['apply'](X,V||[]))[v(0x1e6)]());});},__importDefault=this&&this[a8f(0x2aa)]||function(X){const g=a8f;return X&&X[g(0x1c9)]?X:{'default':X};};Object[a8f(0x1f7)](exports,a8f(0x1c9),{'value':!![]}),exports[a8f(0x297)]=void 0x0;const _=__importStar(require(a8f(0x1fc))),chalk_1=__importDefault(require(a8f(0x1c6))),fs=__importStar(require('fs')),utils_1=require(a8f(0x273)),api_helpers_1=require(a8f(0x279)),inquirer_pagination_prompt_1=require('./pagination/inquirer-pagination-prompt'),inquirer=require(a8f(0x2a9)),inquirerSearchList=require(a8f(0x2bd)),yaml=require(a8f(0x1c0));var ConfirmChoices;(function(X){const B=a8f;X[B(0x23d)]=B(0x298),X[B(0x2a6)]=B(0x1e4),X[B(0x1d0)]=B(0x235),X[B(0x24f)]=B(0x1e9),X[B(0x1c3)]=B(0x26d);}(ConfirmChoices||(ConfirmChoices={})));class InquirerHelper{constructor(X){const O=a8f;this[O(0x22f)]=X,this[O(0x288)]=0x32,this['editPayload']=V=>__awaiter(this,void 0x0,void 0x0,function*(){const H=O,{editedResult:h}=yield inquirer[H(0x2a8)]([{'type':'editor','name':H(0x290),'message':'Go\x20to\x20editor','default':yaml[H(0x263)](V)}]);return yaml['safeLoad'](h);}),this[O(0x1bb)]=V=>__awaiter(this,void 0x0,void 0x0,function*(){const k=O,h=I=>k(0x21f)+I+k(0x2ad);function Q(){return __awaiter(this,void 0x0,void 0x0,function*(){const o=a8V;return inquirer['prompt']([{'type':o(0x209),'name':'fileName','message':o(0x292),'validate':I=>new RegExp(o(0x1bd))[o(0x21d)](I)?!![]:h(I)}]);});}const {fileName:J}=yield Q(),G=J[k(0x222)]()[k(0x260)]('.')[k(0x202)]();try{switch(G){case k(0x1fa):(0x0,utils_1[k(0x1db)])(k(0x1e7)+J);return fs[k(0x1ff)](J,JSON['stringify'](V,null,'\x20\x20'));case k(0x286):case k(0x26b):(0x0,utils_1[k(0x1db)])(k(0x1e7)+J);return fs[k(0x1ff)](J,yaml[k(0x263)](V));default:(0x0,utils_1['warning'])(h(G));}}catch(I){(0x0,utils_1['warning'])('Writing\x20configuration\x20failed:\x20'+I[k(0x20a)]);}return undefined;}),this[O(0x1d9)]=(V,h)=>Q=>{const N=O,J=typeof Q==='string'?Q[N(0x1bf)]():Q;return h===![]&&J==='don\x27t\x20change'?'':J;},this['validate']=(V,h,Q)=>J=>{const p=O,G=[];if(J===''||J===p(0x1f5)){if(h!==![])G[p(0x2b0)]('this\x20option\x20is\x20required,\x20please\x20answer');else return!![];}V[p(0x1bc)]===p(0x24b)&&!_['isUndefined'](V[p(0x224)])&&G['push'](new RegExp(V[p(0x224)])['test'](J)?!![]:p(0x210)+V[p(0x224)]+'\x27');V[p(0x1bc)]===p(0x24b)&&!_[p(0x250)](V[p(0x214)])&&G[p(0x2b0)](J[p(0x1be)]>=V[p(0x214)]?!![]:'must\x20be\x20longer\x20than\x20or\x20equal\x20to\x20'+V[p(0x214)]+p(0x234)+J[p(0x1be)]+p(0x23b));V[p(0x1bc)]===p(0x24b)&&!_[p(0x250)](V[p(0x215)])&&G[p(0x2b0)](J[p(0x1be)]<=V[p(0x215)]?!![]:p(0x25c)+V[p(0x215)]+'\x20characters,\x20is\x20'+J[p(0x1be)]+p(0x23b));Q&&Number['isNaN'](parseInt(J,0xa))&&G[p(0x2b0)](p(0x28e)+J);V[p(0x1bc)]===p(0x25b)&&!_[p(0x250)](V['minimum'])&&G[p(0x2b0)](J>=V[p(0x1d5)]?!![]:p(0x26f)+V[p(0x1d5)]);V[p(0x1bc)]===p(0x25b)&&!_[p(0x250)](V[p(0x28d)])&&G[p(0x2b0)](J<=V[p(0x28d)]?!![]:p(0x2a5)+V[p(0x28d)]);if(V[p(0x1bc)]===p(0x238)){const W=(0x0,utils_1[p(0x23c)])(J);G[p(0x2b0)](W===![]||_['isEmpty'](W)?p(0x1fb):!![]);}const I=G[p(0x1d9)](E=>E!==!![]),T=(V===null||V===void 0x0?void 0x0:V[p(0x261)])?'\x0a'+chalk_1[p(0x21b)]['red']('>>')+p(0x1cf)+chalk_1[p(0x21b)][p(0x270)](JSON[p(0x2ac)](V['example'])):'';return I[p(0x1be)]>0x0?I[p(0x1df)](chalk_1['default'][p(0x1dd)](p(0x248)))+T:!![];},this['getPathString']=(V,h,Q)=>{const i=O,J=V[V[i(0x1be)]-0x1];function G(){const x=i;return V[x(0x22e)](0x0,-0x1)[x(0x29f)](W=>W['charAt'](0x0)[x(0x1d3)]()+W[x(0x22e)](0x1))['join']('>');}const I=V[i(0x1be)]>0x1?chalk_1[i(0x21b)][i(0x254)][i(0x270)](G())+':\x20':'',T=Q?'\x20('+chalk_1[i(0x21b)][i(0x25f)](Q)+')':'';return chalk_1[i(0x21b)][i(0x24c)](''+I+h+'\x20'+chalk_1[i(0x21b)][i(0x1d2)][i(0x217)](J)+T+'?');},this[O(0x1d7)]=(V,h,Q)=>__awaiter(this,void 0x0,void 0x0,function*(){const L=O;if(h[L(0x1be)]<0x1){const I=Q?'for\x20this\x20'+Q:L(0x1f8);throw new Error(L(0x211)+V+'\x20'+I+'.');}const J=L(0x241)+V+L(0x28f),G=h[L(0x1be)]>0x4?L(0x27e):L(0x251);return(yield inquirer[L(0x2a8)]([{'type':G,'name':'name','message':J,'choices':h}]))[L(0x287)];}),this[O(0x29e)]=(V,h,Q)=>__awaiter(this,void 0x0,void 0x0,function*(){const y=O,{elements:J,nextCursor:G}=yield h();if(J[y(0x1be)]<0x1){const W=Q?'for\x20this\x20'+Q:y(0x1f8);throw new Error('No\x20'+V+'\x20'+W+'.');}const I=y(0x241)+V+'\x20to\x20use:';if(G!==undefined){const E=({nextPageCursor:A})=>__awaiter(this,void 0x0,void 0x0,function*(){const M=y,P=yield h(A);return{'elements':P[M(0x1c8)],'nextPageCursor':P[M(0x236)]};});return(yield inquirer[y(0x2a8)]([{'type':y(0x20b),'name':'name','message':I,'choices':J,'nextPageCursor':G,'loadMore':E}]))[y(0x287)];}const T=J[y(0x1be)]>0x4?y(0x27e):'list';return(yield inquirer[y(0x2a8)]([{'type':T,'name':y(0x287),'message':I,'choices':J}]))['name'];}),this['askGeneric']=(V,h)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const e=O,Q=''+(h?'('+chalk_1[e(0x21b)][e(0x25f)](h)+')\x20':''),J=e(0x23e)+chalk_1[e(0x21b)][e(0x2b9)](V)+'\x20'+Q+e(0x2a4),G=this[e(0x2bb)]({'type':e(0x24b),'required':!![]});return(yield inquirer['prompt']([{'type':e(0x209),'name':e(0x287),'message':J,'validate':G}]))[e(0x287)];}),this[O(0x22b)]=V=>__awaiter(this,void 0x0,void 0x0,function*(){const Z=O;return(yield inquirer[Z(0x2a8)]([{'type':Z(0x20d),'name':'name','message':V,'default':!![]}]))[Z(0x287)];}),this['askForService']=V=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const u=O,h=Q=>J=>__awaiter(this,void 0x0,void 0x0,function*(){const C=a8V;var G;const I=yield this[C(0x22f)]['list'][C(0x206)]({'parameters':{'projectId':Q},'options':{'per_page':this[C(0x288)],'cursor':J}}),T=I['data'][C(0x206)][C(0x29f)](W=>W['id']);return{'elements':T,'nextCursor':(G=I[C(0x296)])===null||G===void 0x0?void 0x0:G[C(0x2b7)]};});return this[u(0x1dc)](u(0x22d),h,V);}),this['askForTemplate']=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const j=O,V=h=>__awaiter(this,void 0x0,void 0x0,function*(){const Y=a8V;var Q;const J=yield this[Y(0x22f)][Y(0x251)][Y(0x28b)]({'options':{'per_page':this[Y(0x288)],'cursor':h}}),G=J[Y(0x2ba)][Y(0x28b)]['map'](I=>I['id']);return{'elements':G,'nextCursor':(Q=J[Y(0x296)])===null||Q===void 0x0?void 0x0:Q[Y(0x2b7)]};});return this[j(0x29e)](j(0x1e5),V);}),this[O(0x28a)]=V=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const b=O;if(_[b(0x250)](V))throw new Error(b(0x22c));const h=Q=>__awaiter(this,void 0x0,void 0x0,function*(){const s=b;var J;let G=this[s(0x288)];const I=yield this[s(0x22f)][s(0x251)][s(0x281)]({'parameters':{'templateId':V},'options':{'per_page':G,'cursor':Q}}),T=I['data'][s(0x281)][s(0x29f)](W=>W['id']+s(0x203)+W['createdAt']+')');return{'elements':T,'nextCursor':(J=I[s(0x296)])===null||J===void 0x0?void 0x0:J['cursor']};});return this[b(0x29e)]('template\x20run',h)[b(0x272)](Q=>Q[b(0x260)]('\x20')[0x0]);}),this[O(0x276)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const m=O,V=h=>__awaiter(this,void 0x0,void 0x0,function*(){const w=a8V;var Q;let J=this[w(0x288)];const G=yield this['apiClient'][w(0x251)][w(0x1d6)]({'options':{'per_page':J,'cursor':h}}),I=G[w(0x2ba)][w(0x1d6)][w(0x29f)](T=>T['id']);return{'elements':I,'nextCursor':(Q=G[w(0x296)])===null||Q===void 0x0?void 0x0:Q[w(0x2b7)]};});return this['askForResourcePaginated'](m(0x244),V);}),this['askForPipeline']=V=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const l=O,h=Q=>J=>__awaiter(this,void 0x0,void 0x0,function*(){const r=a8V;var G;const I=yield this[r(0x22f)]['list'][r(0x2ab)]({'parameters':{'projectId':Q},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':J}}),T=I[r(0x2ba)][r(0x2ab)]['map'](W=>W['id']);return{'elements':T,'nextCursor':(G=I[r(0x296)])===null||G===void 0x0?void 0x0:G[r(0x2b7)]};});return this['askForProjectScopedResourcePaginated'](l(0x2b2),h,V);}),this[O(0x26c)]=V=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const t=O,h=Q=>J=>__awaiter(this,void 0x0,void 0x0,function*(){const S=a8V;var G;const I=yield this[S(0x22f)]['list'][S(0x2b1)]({'parameters':{'projectId':Q},'options':{'per_page':this[S(0x288)],'cursor':J}}),T=I[S(0x2ba)]['jobs'][S(0x29f)](W=>W['id']);return{'elements':T,'nextCursor':(G=I[S(0x296)])===null||G===void 0x0?void 0x0:G['cursor']};});return this[t(0x1dc)](t(0x207),h,V);}),this['askForJobRun']=(V,h,Q=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const U=O,J=U(0x1fd),G=I=>T=>__awaiter(this,void 0x0,void 0x0,function*(){const X0=U;var W;const E=yield this[X0(0x22f)][X0(0x227)][X0(0x207)][X0(0x239)]({'parameters':{'projectId':I,'jobId':V},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':T}}),A=E[X0(0x2ba)][X0(0x239)][X0(0x29f)](P=>P['id']+X0(0x203)+P[X0(0x1e2)]+')');return Q&&A[X0(0x221)](J),{'elements':A,'nextCursor':(W=E[X0(0x296)])===null||W===void 0x0?void 0x0:W[X0(0x2b7)]};});return this[U(0x1dc)](U(0x2a1),G,h,U(0x247)+V+'\x27')[U(0x272)](I=>{const T=I['split']('\x20')[0x0];if(T===J)return undefined;return T;});}),this['askForBuild']=(V,h,Q,J=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const X1=O,G=X1(0x2b6);if(Q!==undefined){const I=T=>W=>__awaiter(this,void 0x0,void 0x0,function*(){const X2=X1;var E;const A=yield this[X2(0x22f)]['get'][X2(0x207)][X2(0x1f3)]({'parameters':{'projectId':T,'jobId':Q},'options':{'per_page':this[X2(0x288)],'cursor':W}}),P=A[X2(0x2ba)][X2(0x1f3)]['map'](D=>D['id']+'\x20(startedAt:\x20'+D[X2(0x1ca)]+')');return J&&P[X2(0x221)](G),{'elements':P,'nextCursor':(E=A[X2(0x296)])===null||E===void 0x0?void 0x0:E['cursor']};});return this['askForProjectScopedResourcePaginated'](X1(0x29d),I,V,'job:\x20\x27'+Q+'\x27')['then'](T=>{const X3=X1,W=T[X3(0x260)]('\x20')[0x0];if(W===G)return undefined;return W;});}if(h!==undefined){const T=W=>E=>__awaiter(this,void 0x0,void 0x0,function*(){const X4=X1;var A;const P=yield this[X4(0x22f)][X4(0x227)]['service'][X4(0x1f3)]({'parameters':{'projectId':W,'serviceId':h},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':E}}),D=P['data'][X4(0x1f3)]['map'](K=>K['id']+'\x20(startedAt:\x20'+K[X4(0x1ca)]+')');if(J)D[X4(0x221)](G);return{'elements':D,'nextCursor':(A=P[X4(0x296)])===null||A===void 0x0?void 0x0:A['cursor']};});return this[X1(0x1dc)](X1(0x2b5),T,V,'service:\x20\x27'+Q+'\x27')[X1(0x272)](W=>{const X5=X1,E=W[X5(0x260)]('\x20')[0x0];if(E===G)return undefined;return E;});}throw new Error(X1(0x1c2));}),this[O(0x20c)]=(V,h,Q,J=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const X6=O,G=X6(0x2bc);if(Q!==undefined){const I=T=>W=>__awaiter(this,void 0x0,void 0x0,function*(){const X7=X6;var E;const A=yield this[X7(0x22f)][X7(0x227)][X7(0x207)]['containers']({'parameters':{'projectId':T,'jobId':Q},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':W}}),P=A[X7(0x2ba)][X7(0x27f)][X7(0x29f)](D=>D['name']+X7(0x203)+D[X7(0x1ca)]+')');return J&&P[X7(0x221)](G),{'elements':P,'nextCursor':(E=A[X7(0x296)])===null||E===void 0x0?void 0x0:E[X7(0x2b7)]};});return this[X6(0x1dc)](X6(0x1e1),I,V,X6(0x247)+Q+'\x27')[X6(0x272)](T=>{const W=T['split']('\x20')[0x0];if(W===G)return undefined;return W;});}if(h!==undefined){const T=W=>E=>__awaiter(this,void 0x0,void 0x0,function*(){const X8=X6;var A;const P=yield this[X8(0x22f)][X8(0x227)][X8(0x22d)]['containers']({'parameters':{'projectId':W,'serviceId':h},'options':{'per_page':this[X8(0x288)],'cursor':E}}),D=P[X8(0x2ba)]['containers'][X8(0x29f)](K=>K[X8(0x287)]+X8(0x203)+K[X8(0x1ca)]+')');if(J)D['unshift'](G);return{'elements':D,'nextCursor':(A=P['pagination'])===null||A===void 0x0?void 0x0:A[X8(0x2b7)]};});return this[X6(0x1dc)](X6(0x22a),T,V,'service:\x20\x27'+Q+'\x27')[X6(0x272)](W=>{const X9=X6,E=W[X9(0x260)]('\x20')[0x0];if(E===G)return undefined;return E;});}throw new Error(X6(0x295));}),this['askForAddon']=V=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const XV=O,h=Q=>J=>__awaiter(this,void 0x0,void 0x0,function*(){const XX=a8V;var G;const I=yield this['apiClient']['list']['addons']({'parameters':{'projectId':Q},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':J}});return{'elements':I[XX(0x2ba)][XX(0x229)][XX(0x29f)](T=>T['id']),'nextCursor':(G=I[XX(0x296)])===null||G===void 0x0?void 0x0:G[XX(0x2b7)]};});return this[XV(0x1dc)](XV(0x266),h,V);}),this['askForAddonBackup']=(V,h)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const XQ=O,Q=J=>G=>__awaiter(this,void 0x0,void 0x0,function*(){const Xh=a8V;var I;const T=yield this[Xh(0x22f)][Xh(0x227)]['addon'][Xh(0x24e)]({'parameters':{'projectId':J,'addonId':h},'options':{'per_page':this[Xh(0x288)],'cursor':G}});return{'elements':T['data']['backups'][Xh(0x29f)](W=>W['id']+Xh(0x231)+(W[Xh(0x253)]||Xh(0x29a))+')'),'nextCursor':(I=T['pagination'])===null||I===void 0x0?void 0x0:I[Xh(0x2b7)]};});return this[XQ(0x1dc)](XQ(0x24e),Q,V,'addon:\x20\x27'+h+'\x27')['then'](J=>J[XQ(0x260)]('\x20')[0x0]);}),this[O(0x282)]=V=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const XG=O,h=Q=>__awaiter(this,void 0x0,void 0x0,function*(){const XJ=a8V;return(yield this[XJ(0x22f)]['list'][XJ(0x24a)]({'parameters':{'projectId':Q}}))[XJ(0x2ba)][XJ(0x29f)](J=>J['id']);});return this[XG(0x245)](XG(0x27b),h,V);}),this[O(0x1f2)]=V=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const XT=O,h=Q=>J=>__awaiter(this,void 0x0,void 0x0,function*(){const XI=a8V;var G;const I=yield this[XI(0x22f)][XI(0x251)][XI(0x269)]({'parameters':{'projectId':Q},'options':{'per_page':this[XI(0x288)],'cursor':J}});return{'elements':I['data']['secrets']['map'](T=>T['id']),'nextCursor':(G=I[XI(0x296)])===null||G===void 0x0?void 0x0:G['cursor']};});return this[XT(0x1dc)](XT(0x268),h,V);}),this[O(0x1d4)]=V=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const XW=O,h=yield this[XW(0x22f)][XW(0x227)][XW(0x1e3)]({'parameters':{'domain':V}}),Q=h['data'][XW(0x226)][XW(0x29f)](G=>G['name']+XW(0x258)+G[XW(0x242)]+')'),J=XW(0x27c)+V+')';return this[XW(0x1d7)]('subdomain',Q,J)[XW(0x272)](G=>G['split']('\x20')[0x0]);}),this[O(0x291)]=V=>__awaiter(this,void 0x0,void 0x0,function*(){const XE=O;return(yield inquirer[XE(0x2a8)]([{'type':XE(0x20d),'name':XE(0x293),'message':chalk_1[XE(0x21b)]['yellowBright'](XE(0x1ec)+(V||XE(0x212))+XE(0x275)),'default':![]}]))[XE(0x293)];}),this[O(0x294)]=(V,h)=>__awaiter(this,void 0x0,void 0x0,function*(){const XA=O;_['isUndefined'](V[XA(0x287)])&&(h[XA(0x1be)]<=0x0?_[XA(0x1f1)](V,XA(0x287),XA(0x21b)):yield(0x0,utils_1[XA(0x1f6)])(0xa)(()=>__awaiter(this,void 0x0,void 0x0,function*(){const XP=XA,{name:Q}=yield inquirer[XP(0x2a8)]([{'type':XP(0x209),'name':XP(0x287),'message':XP(0x2a7),'default':'main-context'}]);if(!V['override']&&h[XP(0x204)](J=>J['name']===Q)){const {c:J}=yield inquirer['prompt']([{'type':XP(0x20d),'name':'c','message':'Context\x20with\x20name\x20\x27'+Q+XP(0x1cb),'default':![]}]);if(J===![])throw new Error(XP(0x277));_[XP(0x1f1)](V,XP(0x208),!![]);}_[XP(0x1f1)](V,'name',Q);})));if(_['isUndefined'](V[XA(0x21e)])){const Q=yield this[XA(0x205)]();_[XA(0x1f1)](V,XA(0x21e),Q);}return V;}),this[O(0x205)]=()=>__awaiter(this,void 0x0,void 0x0,function*(){const XD=O,{token:V}=yield inquirer[XD(0x2a8)]([{'type':XD(0x249),'name':'token','mask':'*','message':XD(0x256)}]);return V;}),inquirer[O(0x29c)]('search-list',inquirerSearchList),inquirer[O(0x29c)]('pagination-prompt',inquirer_pagination_prompt_1[O(0x21c)]);}[a8f(0x1fe)](X,V){return __awaiter(this,void 0x0,void 0x0,function*(){const XK=a8V,h=yaml[XK(0x263)](X),Q=_[XK(0x1e8)](h['split']('\x0a')['map'](I=>I['length'])),J=chalk_1['default'][XK(0x1e0)]('-'[XK(0x27d)](Q)+'\x0a'),{confirm:G}=yield inquirer['prompt']([{'type':'list','name':'confirm','message':''+chalk_1[XK(0x21b)][XK(0x1d2)]['green'](XK(0x2a2))+J+chalk_1['default'][XK(0x299)](h)+J,'choices':Object[XK(0x20f)](ConfirmChoices)}]);switch(G){case ConfirmChoices['YES']:return X;case ConfirmChoices[XK(0x1c3)]:throw new Error(XK(0x220));case ConfirmChoices[XK(0x2a6)]:return this['retrievePayloadViaInteractiveCli'](V);case ConfirmChoices['EDIT']:return this[XK(0x1fe)](yield this[XK(0x1c7)](X),V);case ConfirmChoices['SAVE']:yield this[XK(0x1bb)](X);return this[XK(0x1fe)](X,V);default:throw new Error(XK(0x232));}});}[a8f(0x225)](X,V){return __awaiter(this,void 0x0,void 0x0,function*(){const Xd=a8V;if((V===null||V===void 0x0?void 0x0:V[Xd(0x23a)])!==undefined)this[Xd(0x23a)]=V===null||V===void 0x0?void 0x0:V[Xd(0x23a)];this[Xd(0x21a)]=V===null||V===void 0x0?void 0x0:V[Xd(0x26a)];const h={};return yield this[Xd(0x2a0)]([],X['opt'][Xd(0x1f9)],h),this[Xd(0x23a)]=h,yield this[Xd(0x1fe)](h,X);});}['propToType'](X,V,h,Q){return __awaiter(this,void 0x0,void 0x0,function*(){const Xf=a8V;let J;if(V[Xf(0x2a3)]&&!_[Xf(0x240)](V,Xf(0x280))){if(V[Xf(0x2a3)][Xf(0x1be)]>0x1){const {choice:G}=yield inquirer['prompt']([{'type':'list','name':Xf(0x289),'message':Xf(0x271)+(X[X[Xf(0x1be)]-0x1]||'')+Xf(0x255),'choices':V[Xf(0x2a3)][Xf(0x29f)](I=>{var T;return(T=I['description'])!==null&&T!==void 0x0?T:'??';})}]);J=yield this['getType'](X,V[Xf(0x2a3)]['find'](I=>I['description']===G),h,Q);}else{const I=V[Xf(0x2a3)][0x0];_[Xf(0x1f1)](I,Xf(0x243),V[Xf(0x243)]),J=yield this[Xf(0x265)](X,I,h,Q);}J={};}else J=yield this[Xf(0x265)](X,V,h,Q);return J;});}['getInnerType'](X,V,h,Q){var J;return __awaiter(this,void 0x0,void 0x0,function*(){const Xz=a8V;if(Q===![]){const {addEntry:T}=yield inquirer[Xz(0x2a8)]([{'type':'confirm','name':Xz(0x23f),'message':this[Xz(0x257)](V,Xz(0x283),X===null||X===void 0x0?void 0x0:X[Xz(0x243)]),'default':![]}]);if(!T)return h;}const G=Object[Xz(0x278)]((J=X===null||X===void 0x0?void 0x0:X[Xz(0x280)])!==null&&J!==void 0x0?J:[]),I=X[Xz(0x233)]||[];if(G[Xz(0x1be)]>0x0)for(const W of G){const E=V[Xz(0x284)](W);if(V[Xz(0x1be)]>0x0&&!_[Xz(0x240)](h,V[Xz(0x1df)]('.')))_['set'](h,V[Xz(0x1df)]('.'),{});yield this[Xz(0x2a0)](E,X[Xz(0x280)][W],h,I[Xz(0x1b9)](W));}else yield this['getType'](V,Object[Xz(0x219)](Object[Xz(0x219)]({},X),{'type':Xz(0x238)}),h,Q);return h;});}[a8f(0x27a)](X,V,h,Q){return __awaiter(this,void 0x0,void 0x0,function*(){const XF=a8V;if(V&&h)return!![];const J=V?XF(0x283):'Do\x20you\x20want\x20to\x20add\x20more',{addEntry:G}=yield inquirer[XF(0x2a8)]([{'type':XF(0x20d),'name':XF(0x23f),'message':this[XF(0x257)](X,J,V?Q:undefined),'default':![]}]);return G;});}[a8f(0x265)](X,V,h,Q){return __awaiter(this,void 0x0,void 0x0,function*(){const Xn=a8V;let J;const G=X[Xn(0x1df)]('.');switch(V===null||V===void 0x0?void 0x0:V[Xn(0x1bc)]){case Xn(0x246):{let I=!![];while(yield this['askArrayEntry'](X,I,Q,V===null||V===void 0x0?void 0x0:V[Xn(0x243)])){const T=_[Xn(0x227)](h,G);_[Xn(0x2b3)](h,G),yield this[Xn(0x265)](X,V[Xn(0x2b4)],h);const W=_[Xn(0x227)](h,G);!_[Xn(0x1c4)](T)?_['set'](h,G,[W]):(T[Xn(0x2b0)](W),_[Xn(0x1f1)](h,G,T)),I=![];}return J||[];}case Xn(0x2b8):{return J=yield this['getInnerType'](V,X,h,Q),J;}case Xn(0x238):J=(0x0,utils_1[Xn(0x23c)])(yield this[Xn(0x1ba)](X,V,Q))||undefined;break;case Xn(0x24b):case Xn(0x29b):case Xn(0x25b):default:J=yield this[Xn(0x1ba)](X,V,Q,h);break;}return!_[Xn(0x250)](J)&&_[Xn(0x1f1)](h,G,J),J;});}[a8f(0x1ba)](X,V,h,Q){var J;return __awaiter(this,void 0x0,void 0x0,function*(){const Xq=a8V,G=X[X[Xq(0x1be)]-0x1],{defaultValue:defaultValue=(J=V===null||V===void 0x0?void 0x0:V['example'])!==null&&J!==void 0x0?J:V===null||V===void 0x0?void 0x0:V[Xq(0x21b)],choices:choices=V===null||V===void 0x0?void 0x0:V[Xq(0x1ce)],pagination:I}=yield(0x0,api_helpers_1['fetchResourceList'])(G,this[Xq(0x22f)],this[Xq(0x21a)],Q,this[Xq(0x1f4)],X);let T=Xq(0x209);if(!_[Xq(0x250)](choices)&&choices[Xq(0x1be)]>0x0){if(I!==undefined&&I[Xq(0x259)]!==undefined)T=Xq(0x20b);else choices[Xq(0x1be)]>0x4&&typeof choices[0x0]===Xq(0x24b)?T='search-list':T=Xq(0x251);}else{if((V===null||V===void 0x0?void 0x0:V[Xq(0x1bc)])===Xq(0x29b))T=Xq(0x20d);else{if((V===null||V===void 0x0?void 0x0:V[Xq(0x1bc)])===Xq(0x25b))T=Xq(0x209);else(V===null||V===void 0x0?void 0x0:V[Xq(0x1bc)])===Xq(0x238)&&(T=Xq(0x1c1));}}let W=h!==![]?!_[Xq(0x237)](defaultValue)?defaultValue:JSON['stringify'](defaultValue):_[Xq(0x1ed)](defaultValue)?defaultValue:Xq(0x1f5);if(choices)W=W[Xq(0x222)]();_[Xq(0x240)](this['resultCache'],X[Xq(0x1df)]('.'))&&(W=this['resultCache'][X[Xq(0x1df)]('.')]);const E=choices&&h===![]?[Xq(0x1f5),...choices]:choices,A=(V===null||V===void 0x0?void 0x0:V[Xq(0x1bc)])===Xq(0x25b),P=Object[Xq(0x219)]({'type':T,'name':'id','message':this[Xq(0x1f0)](X,V),'choices':E,'default':W,'filter':this[Xq(0x1d9)](T,h),'validate':this[Xq(0x2bb)](V,h,A)},I),D=(yield inquirer['prompt']([P]))['id'];if(D===Xq(0x1f5)||D==='')return undefined;if(A)return parseInt(D,0xa);return D;});}['getQuestionString'](X,V){const Xa=a8f,h=(V===null||V===void 0x0?void 0x0:V[Xa(0x1bc)])!=='boolean'?'What\x20do\x20you\x20want\x20to\x20use\x20as':'Should\x20it\x20be';return this[Xa(0x257)](X,h,V===null||V===void 0x0?void 0x0:V['description']);}[a8f(0x1ef)](){return __awaiter(this,void 0x0,void 0x0,function*(){const Xv=a8V,X=V=>__awaiter(this,void 0x0,void 0x0,function*(){const XR=a8V;var h;const Q=yield this[XR(0x22f)][XR(0x251)][XR(0x285)]({'options':{'per_page':this['defaultPaginationPageSize'],'cursor':V}}),J=Q['data'][XR(0x285)]['map'](G=>G['id']);return{'elements':J,'nextCursor':(h=Q[XR(0x296)])===null||h===void 0x0?void 0x0:h[XR(0x2b7)]};});return yield this[Xv(0x29e)](Xv(0x1d1),X);});}['askForProjectScopedResource'](X,V,h,Q){return __awaiter(this,void 0x0,void 0x0,function*(){const Xg=a8V,J=h||this['apiClient'][Xg(0x1da)]['getCurrentProjectName']();if(_[Xg(0x250)](J))throw new Error(Xg(0x2ae));const G=yield V(J);return yield this[Xg(0x1d7)](X,G,(Q?Q+Xg(0x201):'')+Xg(0x200)+J+'\x27');});}['askForProjectScopedResourcePaginated'](X,V,h,Q){return __awaiter(this,void 0x0,void 0x0,function*(){const XB=a8V,J=h||this[XB(0x22f)][XB(0x1da)][XB(0x264)]();if(_['isUndefined'](J))throw new Error('Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.');const G=yield V(J);return yield this[XB(0x29e)](X,G,(Q?Q+XB(0x201):'')+XB(0x200)+J+'\x27');});}[a8f(0x218)](){return __awaiter(this,void 0x0,void 0x0,function*(){const XH=a8V,X=V=>__awaiter(this,void 0x0,void 0x0,function*(){const XO=a8V;var h;const Q=yield this['apiClient']['list'][XO(0x1ea)]({'options':{'per_page':this[XO(0x288)],'cursor':V}});return{'elements':Q[XO(0x2ba)]['domains'][XO(0x29f)](J=>J[XO(0x287)]),'nextCursor':(h=Q[XO(0x296)])===null||h===void 0x0?void 0x0:h[XO(0x2b7)]};});return this[XH(0x29e)](XH(0x1e3),X);});}['askForCredentials'](){return __awaiter(this,void 0x0,void 0x0,function*(){const X=V=>__awaiter(this,void 0x0,void 0x0,function*(){const Xk=a8V;var h;const Q=yield this['apiClient'][Xk(0x251)][Xk(0x28c)]({'options':{'per_page':this[Xk(0x288)],'cursor':V}});return{'elements':Q[Xk(0x2ba)][Xk(0x20e)][Xk(0x29f)](J=>J['id']),'nextCursor':(h=Q[Xk(0x296)])===null||h===void 0x0?void 0x0:h[Xk(0x2b7)]};});return this['askForResourcePaginated']('credentials',X);});}[a8f(0x25e)](X){const Xo=a8f;this[Xo(0x1f4)]=X;}}function a8V(X,V){const h=a8X();return a8V=function(Q,J){Q=Q-0x1b9;let G=h[Q];return G;},a8V(X,V);}exports[a8f(0x297)]=InquirerHelper;function a8X(){const XN=['tokenPrompt','services','job','override','input','message','pagination-prompt','askForContainer','confirm','credentials','values','doesn\x27t\x20match\x20pattern\x20\x27','No\x20','a\x20Northflank\x20resource','9sxjSkr','minLength','maxLength','throw','greenBright','askForDomain','assign','tmpCmdPath','default','DynamicReloadPaginationPrompt','test','token','Unexpected\x20file\x20type:\x20','Aborted.','unshift','toString','1456721ysGLFH','pattern','retrievePayloadViaInteractiveCli','subdomains','get','7531290EGDGay','addons','service\x20containers','askConfirm','Template\x20id\x20not\x20provided.','service','slice','apiClient','450176ITBtFe','\x20(completedAt:\x20','Something\x20unexpected\x20happened.','required','\x20characters,\x20is\x20','No,\x20edit','nextCursor','isObject','rawObject','runs','resultCache','\x20characters','isValidJSON','YES','Enter\x20the\x20','addEntry','has','Choose\x20the\x20','fullName','description','log\x20sink','askForProjectScopedResource','array','job:\x20\x27','\x20and\x20it\x20','password','volumes','string','reset','__createBinding','backups','SAVE','isUndefined','list','__awaiter','completedAt','bgGrey','\x20type?','Choose\x20the\x20login\x20token:','getPathString','\x20(full\x20domain:\x20','nextPageCursor','writable','integer','must\x20be\x20shorter\x20than\x20or\x20equal\x20to\x20','__importStar','setPathVars','blue','split','example','2VdHDXb','safeDump','getCurrentProjectName','getType','addon','hasOwnProperty','secret','secrets','cmdPath','yml','askForJob','No,\x20abort','187941GxGTYU','must\x20be\x20bigger\x20than\x20or\x20equal\x20to\x20','whiteBright','What\x27s\x20the\x20','then','./utils','974492dpbKqU','.\x20This\x20is\x20irreversible.\x20Please\x20confirm!','askForLogSink','Context\x20name\x20already\x20exists.','keys','./api-helpers','askArrayEntry','volume','domain\x20(','repeat','search-list','containers','properties','templateRuns','askForVolume','Do\x20you\x20want\x20to\x20add','concat','projects','yaml','name','defaultPaginationPageSize','choice','askForTemplateRun','templates','registries','maximum','must\x20be\x20a\x20number,\x20is\x20','\x20to\x20use:','editedResult','deleteWarningPrompt','Provide\x20a\x20file\x20path\x20to\x20write\x20the\x20configuration\x20to\x20(<name>.[json|yaml|yml])','confirmation','loginPrompt','No\x20containers\x20found','pagination','InquirerHelper','Yes,\x20send','blueBright','not\x20completed','boolean','registerPrompt','job\x20builds','askForResourcePaginated','map','propToType','job\x20runs','Please\x20confirm\x20following\x20configuration:\x0a','oneOf','to\x20use:','must\x20be\x20smaller\x20than\x20or\x20equal\x20to\x20','REPEAT','Choose\x20the\x20name\x20of\x20the\x20new\x20local\x20context:','prompt','inquirer','__importDefault','pipelines','stringify',',\x20supported\x20types:\x20[json|yaml|yml]','Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.','96588fRSZSB','push','jobs','pipeline','unset','items','service\x20build','all-builds','cursor','object','green','data','validate','all-containers','inquirer-search-list','includes','ask','saveFile','type','.*\x5c.(json|yaml|yml)$','length','trim','js-yaml','editor','No\x20builds\x20found','ABORT','isArray','prototype','chalk','editPayload','elements','__esModule','createdAt','\x27\x20already\x20exists.\x20Do\x20you\x20want\x20to\x20override\x20this\x20context\x20(y)\x20or\x20enter\x20a\x20new\x20name\x20(N)?','call','value','enum','\x20Example:\x20','EDIT','project','bold','toUpperCase','askForSubdomain','minimum','logSinks','askForResource','232110skfXYQ','filter','contextProvider','success','askForProjectScopedResourcePaginated','underline','create','join','grey','job\x20containers','startedAt','domain','No,\x20repeat','template','next','Configuration\x20file\x20written\x20to\x20','max','No,\x20but\x20save\x20as\x20file','domains','configurable','WARNING:\x20You\x20are\x20about\x20to\x20delete\x20','isBoolean','30bWfhnW','askForProject','getQuestionString','set','askForSecret','builds','pathVars','don\x27t\x20change','retry','defineProperty','found','body','json','must\x20be\x20a\x20valid\x20non-empty\x20json\x20string','lodash','all-job-runs','confirmationPrompt','writeFileSync','project:\x20\x27','\x20in\x20','pop','\x20(startedAt:\x20','find'];a8X=function(){return XN;};return a8X();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a9R=a9V;(function(X,V){const a=a9V,h=X();while(!![]){try{const Q=parseInt(a(0x1ba))/0x1*(parseInt(a(0x1b6))/0x2)+-parseInt(a(0x1bf))/0x3*(parseInt(a(0x1c2))/0x4)+parseInt(a(0x1b5))/0x5*(parseInt(a(0x1a8))/0x6)+-parseInt(a(0x1d1))/0x7+-parseInt(a(0x1d7))/0x8*(-parseInt(a(0x1c4))/0x9)+parseInt(a(0x1d5))/0xa*(-parseInt(a(0x1a7))/0xb)+parseInt(a(0x1b4))/0xc*(-parseInt(a(0x1b0))/0xd);if(Q===V)break;else h['push'](h['shift']());}catch(J){h['push'](h['shift']());}}}(a9X,0x54cef));var __createBinding=this&&this[a9R(0x19a)]||(Object[a9R(0x1be)]?function(X,V,h,Q){const v=a9R;if(Q===undefined)Q=h;var J=Object[v(0x1bc)](V,h);(!J||(v(0x1b1)in J?!V[v(0x1d8)]:J['writable']||J[v(0x1a9)]))&&(J={'enumerable':!![],'get':function(){return V[h];}}),Object['defineProperty'](X,Q,J);}:function(X,V,h,Q){if(Q===undefined)Q=h;X[Q]=V[h];}),__setModuleDefault=this&&this[a9R(0x1d2)]||(Object[a9R(0x1be)]?function(X,V){const g=a9R;Object[g(0x1af)](X,g(0x1c6),{'enumerable':!![],'value':V});}:function(X,V){const B=a9R;X[B(0x1c6)]=V;}),__importStar=this&&this[a9R(0x19d)]||function(X){const O=a9R;if(X&&X['__esModule'])return X;var V={};if(X!=null){for(var h in X)if(h!=='default'&&Object[O(0x1cd)][O(0x1d3)][O(0x1c8)](X,h))__createBinding(V,X,h);}return __setModuleDefault(V,X),V;},__awaiter=this&&this[a9R(0x1c0)]||function(X,V,h,Q){function J(G){return G instanceof h?G:new h(function(I){I(G);});}return new(h||(h=Promise))(function(G,I){const o=a9V;function T(A){const H=a9V;try{E(Q[H(0x1a4)](A));}catch(D){I(D);}}function W(A){try{E(Q['throw'](A));}catch(D){I(D);}}function E(A){const k=a9V;A[k(0x1ae)]?G(A[k(0x1d0)]):J(A['value'])[k(0x1b8)](T,W);}E((Q=Q['apply'](X,V||[]))[o(0x1a4)]());});},__importDefault=this&&this['__importDefault']||function(X){const N=a9R;return X&&X[N(0x1d8)]?X:{'default':X};};function a9V(X,V){const h=a9X();return a9V=function(Q,J){Q=Q-0x198;let G=h[Q];return G;},a9V(X,V);}function a9X(){const c=['932298ogArXf','__awaiter','end','4pbiAVH','createWebSocketStream','4041aAZRzM','/v1/cli-login','default','http:','call','error','idle','NorthflankApiBrowserLogin','toString','prototype','message','exit','value','4235812hUqdRq','__setModuleDefault','hasOwnProperty','wss:','1133180CwJBZt','removeListener','10024ZdfuAQ','__esModule','status','stringify','success','Failed\x20to\x20establish\x20connection\x20to\x20command\x20execution\x20proxy:\x20','init','__createBinding','login-failure','baseUrl','__importStar','type','openBrowser','catch','parse','Failure\x20during\x20login:\x20','browser-opened','next','SIGINT','handleError','33AdxjDA','2154ijVcSu','configurable','Unexpected\x20response','duplex','https:','write','done','defineProperty','3458YsGcnW','get','init-ack','unable\x20to\x20parse\x20message:\x20','1656sziAgF','8255aBZNwW','2VElBBY','replace','then','EventEmitter','484613FxhsUi','initPackage','getOwnPropertyDescriptor','data','create'];a9X=function(){return c;};return a9X();}Object[a9R(0x1af)](exports,a9R(0x1d8),{'value':!![]}),exports[a9R(0x1cb)]=void 0x0;const ws_1=__importStar(require('ws')),open_1=__importDefault(require('open')),events_1=require('events');class NorthflankApiBrowserLogin extends events_1[a9R(0x1b9)]{constructor(X,V=!![]){const p=a9R;super(),this[p(0x19c)]=X,this[p(0x19f)]=V,this['status']=p(0x1ca),this['initPackage']=()=>JSON[p(0x1da)]({'type':p(0x199)});}['startLogin'](){const i=a9R;var X;const V=this[i(0x19c)][i(0x1b7)](i(0x1ac),i(0x1d4))[i(0x1b7)](i(0x1c7),'ws:'),h=V+i(0x1c5),Q=new ws_1['default'](h),J=()=>__awaiter(this,void 0x0,void 0x0,function*(){const L=i;yield new Promise(I=>{const x=a9V;var T;(T=this['duplex'])===null||T===void 0x0?void 0x0:T['end'](JSON[x(0x1da)]({'type':'aborted'}),()=>I());}),process[L(0x1cf)]();}),G=new Promise((I,T)=>{const y=i;var W,E,A;try{this[y(0x1ab)]=(0x0,ws_1[y(0x1c3)])(Q),process['on'](y(0x1a5),J);}catch(P){T(new Error(y(0x198)+P[y(0x1ce)]));}(W=this[y(0x1ab)])===null||W===void 0x0?void 0x0:W['on'](y(0x1bd),D=>{const M=y;var K;const d=JSON[M(0x1a1)](D[M(0x1cc)]());switch(d===null||d===void 0x0?void 0x0:d[M(0x19e)]){case M(0x1b2):{const {loginPage:f}=d;if(f===undefined){this['handleError'](M(0x1aa),T);return;}this['openBrowser']&&(0x0,open_1[M(0x1c6)])(f)[M(0x1a0)](z=>{const e=M,F='Unable\x20to\x20open\x20browser:\x20'+z[e(0x1ce)];this['handleError'](F,T);});this['emit'](M(0x1a3),{'url':f});break;}case'login-success':{const {apiToken:z,contextName:F}=d;if(z===undefined){this[M(0x1a6)]('Unexpected\x20response,\x20api\x20token\x20missing',T);return;}(K=this[M(0x1ab)])===null||K===void 0x0?void 0x0:K[M(0x1c1)](),I({'token':z,'contextName':F}),this[M(0x1d9)]=M(0x1db);break;}case M(0x19b):{const n=M(0x1a2)+(d===null||d===void 0x0?void 0x0:d[M(0x1ce)]);this[M(0x1a6)](n,T);break;}default:{const q=M(0x1b3)+JSON[M(0x1da)](d);this[M(0x1a6)](q,T);}}}),(E=this[y(0x1ab)])===null||E===void 0x0?void 0x0:E['on'](y(0x1c9),D=>{this['handleError']('error\x20happened\x20during\x20browser\x20login:\x20'+D['message'],T);}),(A=this['duplex'])===null||A===void 0x0?void 0x0:A['on'](y(0x1c1),()=>{const Z=y;if(this[Z(0x1d9)]===Z(0x1db)){}else this[Z(0x1a6)]('Login\x20process\x20stopped\x20before\x20completed',T);});});return(X=this[i(0x1ab)])===null||X===void 0x0?void 0x0:X[i(0x1ad)](this[i(0x1bb)]()),this[i(0x1d9)]='init',G['finally'](()=>{const C=i;process[C(0x1d6)]('SIGINT',J);});}[a9R(0x1a6)](X,V){const u=a9R;var h,Q;V?(h=this[u(0x1ab)])===null||h===void 0x0?void 0x0:h['end'](()=>V(new Error(X))):(Q=this[u(0x1ab)])===null||Q===void 0x0?void 0x0:Q[u(0x1c1)](),this[u(0x1d9)]=u(0x1c9);}}exports[a9R(0x1cb)]=NorthflankApiBrowserLogin;
|
package/dist/logs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a10Z=a10V;function a10V(X,V){const h=a10X();return a10V=function(Q,J){Q=Q-0x1b7;let G=h[Q];return G;},a10V(X,V);}(function(X,V){const e=a10V,h=X();while(!![]){try{const Q=parseInt(e(0x1f8))/0x1+-parseInt(e(0x1e5))/0x2+-parseInt(e(0x1e7))/0x3*(parseInt(e(0x219))/0x4)+-parseInt(e(0x20a))/0x5+parseInt(e(0x200))/0x6+parseInt(e(0x226))/0x7*(parseInt(e(0x227))/0x8)+parseInt(e(0x1c4))/0x9*(-parseInt(e(0x22b))/0xa);if(Q===V)break;else h['push'](h['shift']());}catch(J){h['push'](h['shift']());}}}(a10X,0xda74c));var __awaiter=this&&this[a10Z(0x239)]||function(X,V,h,Q){function J(G){return G instanceof h?G:new h(function(I){I(G);});}return new(h||(h=Promise))(function(G,I){function T(A){const C=a10V;try{E(Q[C(0x23a)](A));}catch(D){I(D);}}function W(A){try{E(Q['throw'](A));}catch(D){I(D);}}function E(A){const u=a10V;A['done']?G(A[u(0x1b8)]):J(A['value'])[u(0x21e)](T,W);}E((Q=Q['apply'](X,V||[]))['next']());});},__importDefault=this&&this[a10Z(0x1d8)]||function(X){const c=a10Z;return X&&X[c(0x22c)]?X:{'default':X};};Object[a10Z(0x21a)](exports,'__esModule',{'value':!![]}),exports['CliLogs']=void 0x0;const js_client_1=require(a10Z(0x1fe)),chalk_1=__importDefault(require(a10Z(0x1cc))),utils_1=require('../utils'),inquirer_helper_1=require(a10Z(0x1d5)),commander_1=require('commander'),console_format_helpers_1=require('../formatting/console-format-helpers'),log_formatter_1=require(a10Z(0x1f6));class CliLogs{constructor(X){const Y=a10Z;this[Y(0x236)]=X,this[Y(0x20e)]=(V,h)=>{const j=Y,Q=(0x0,utils_1[j(0x1de)])(!![])[j(0x202)]((h?'build-':'')+'logs')[j(0x1bc)]((h?j(0x1f1):'')+j(0x1c0))[j(0x1be)](j(0x1ce)+V)[j(0x1bf)](j(0x1df),'Project\x20for\x20logs')[j(0x1bf)]('--'+V+j(0x20d)+V+j(0x209)+V+'Id]',V[j(0x1dc)](0x0)[j(0x1d7)]()+V['slice'](0x1)+j(0x208))[j(0x1bf)](j(0x1dd),j(0x1cf))[j(0x1bf)](j(0x234),j(0x205))[j(0x1bf)](j(0x1fa),j(0x238))[j(0x1bf)](j(0x1bd),'Get\x20logs\x20generated\x20after\x20this\x20time,\x20'+utils_1[j(0x222)],utils_1['parseDateInput'])[j(0x1ba)](new commander_1['Option'](j(0x232),j(0x1d1)+utils_1[j(0x222)])['argParser'](utils_1[j(0x1f7)])[j(0x1fb)]([j(0x1f0)]))[j(0x1bf)](j(0x1b7),'Length\x20of\x20timespan\x20in\x20seconds.\x20Only\x20valid\x20if\x20not\x20both,\x20startTime\x20and\x20endTime\x20are\x20set')[j(0x1ba)](new commander_1[(j(0x1d2))](j(0x1e8),j(0x211))[j(0x20f)]([j(0x1c1),j(0x206)])[j(0x1fb)]([j(0x1f0)]))[j(0x1ba)](new commander_1[(j(0x1d2))](j(0x231),j(0x224))[j(0x1fb)]([j(0x1cd),j(0x218),j(0x229)]))['addOption'](new commander_1[(j(0x1d2))](j(0x1e4),j(0x203))[j(0x1fb)]([j(0x213),j(0x218),'regexNotIncludes']))[j(0x1ba)](new commander_1[(j(0x1d2))](j(0x214),j(0x1c7))[j(0x1fb)]([j(0x1cd),j(0x213),j(0x229)]))['addOption'](new commander_1[(j(0x1d2))](j(0x1c5),j(0x230))['conflicts']([j(0x1cd),'regexIncludes',j(0x213)]))['option'](j(0x1c6),j(0x223),![])[j(0x1ba)](new commander_1[(j(0x1d2))](j(0x23b),'Output\x20formatting.\x20Will\x20use\x20advanced\x20formatting\x20by\x20default.')['choices'](Object[j(0x20b)]([j(0x1d9),'json','yaml'])));if(h)Q['option'](j(0x22a),'Build\x20to\x20get\x20logs\x20from');if(V==='job')Q[j(0x1bf)]('--run\x20--runId\x20[runId]',j(0x22f));return Q;},this[Y(0x1ca)]=(V,h,Q,J)=>{const b=Y,{containerId:G,quiet:I,tail:T,startTime:W,endTime:E,duration:A}=J;if(I===!![])return;const P=T?'(exit\x20with\x20'+chalk_1[b(0x22d)][b(0x1f2)]('\x27Ctrl+C\x27')+')':'',D=T?b(0x204):'',K=W?b(0x1f3)+W[b(0x1e9)]():'',d=E?b(0x225)+E['toISOString']():'',f=A?b(0x21b)+A+b(0x1e6):'',z=G?b(0x23d)+chalk_1[b(0x22d)][b(0x1f2)](G):b(0x1e3),F=V+'\x20'+chalk_1[b(0x22d)][b(0x1f2)](h)+b(0x22e)+chalk_1[b(0x22d)][b(0x1f2)](Q),n=''+K+d+f;console[b(0x1c0)]('Container\x20logs\x20'+D+'for\x20'+z+b(0x1eb)+F+n+'\x20'+P);},this[Y(0x212)]=(V,h)=>Q=>{const s=Y;if(!V){if(Q['length']===0x0)console['log'](s(0x1d6));Q[s(0x235)](J=>(0x0,log_formatter_1[s(0x1ee)])(J,h));}else(0x0,console_format_helpers_1[s(0x1ea)])(V,Q);},this['apiClient']=new js_client_1[(Y(0x207))](X,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[Y(0x1c3)]}),this[Y(0x1db)]=this['apiClient'],this[Y(0x216)]=new inquirer_helper_1['InquirerHelper'](this[Y(0x217)]);}[a10Z(0x1e0)](X,V=![]){const S=a10Z,h=(I,T)=>__awaiter(this,void 0x0,void 0x0,function*(){const w=a10V,W=T[w(0x220)],{apiContext:E,inquirerHelper:A}=this;switch(X){case'service':{const P=W?undefined:E[w(0x1fc)]();return T[w(0x1bb)]||P||(yield A[w(0x201)](I)());}case'job':{const D=W?undefined:E[w(0x1fc)]();return T[w(0x1ec)]||D||(yield A[w(0x1e2)](I)());}case w(0x1d3):{const K=W?undefined:E[w(0x1fc)]();return T[w(0x20c)]||K||(yield A[w(0x1c9)](I)());}}}),Q=(I,T,W)=>__awaiter(this,void 0x0,void 0x0,function*(){const m=a10V;if(V)return W['buildId']||(yield this['inquirerHelper'][m(0x233)](I,X===m(0x221)?T:undefined,X===m(0x1c8)?T:undefined,!![])());return undefined;}),J=(I,T,W)=>__awaiter(this,void 0x0,void 0x0,function*(){const r=a10V;if(!V&&W[r(0x1d4)]!==undefined){if(W[r(0x1d4)]!==!![])return W[r(0x1d4)];return yield this[r(0x216)][r(0x237)](I,X===r(0x221)?T:undefined,X===r(0x1c8)?T:undefined,!![])();}return undefined;}),G=(I,T,W)=>__awaiter(this,void 0x0,void 0x0,function*(){const l=a10V;if(X===l(0x1c8))return W[l(0x1e1)]||(yield this[l(0x216)][l(0x1b9)](T,I,!![])());return undefined;});return this['getStandardLogCommand'](X,V)[S(0x215)](I=>__awaiter(this,void 0x0,void 0x0,function*(){const t=S,{noDefaults:T,projectId:W,quiet:E,tail:A,textIncludes:P,textNotIncludes:D,regexIncludes:K,regexNotIncludes:d,direction:f,lineLimit:z,startTime:F,endTime:n,duration:q,output:a}=I;(0x0,utils_1[t(0x228)])(this[t(0x217)]);const {apiContext:R,inquirerHelper:v,logsApiClient:g}=this,B=T?undefined:R[t(0x1fd)](),O=W||B||(yield v[t(0x21d)]()),H=yield h(O,I),k=yield Q(O,H,I),o=yield G(O,H,I),N=yield J(O,H,I);if(!E&&a!==t(0x1ef)&&a!=='yml'&&a!==t(0x1c2))this[t(0x1ca)](X,H,O,I);if(F&&n&&q)throw new Error(t(0x1cb));const p={'projectId':O,'entityId':H},i={'containerName':N,'textIncludes':P,'textNotIncludes':D,'regexIncludes':K,'regexNotIncludes':d,'lineLimit':z,'startTime':F,'duration':q,'runId':o,'buildId':k,'isBuild':V!==null&&V!==void 0x0?V:![]},x=this[t(0x212)](a,P!==null&&P!==void 0x0?P:K);if(A){const L=yield g['logs'][t(0x1f4)](p,i,X);L['on'](t(0x1f9),x),L['on'](t(0x21f),y=>(0x0,utils_1[t(0x21f)])(t(0x1ed)+y[t(0x1f5)])),L['on'](t(0x23c),()=>console[t(0x1c0)](t(0x1d0))),yield L['start']();}else{const y=Object['assign'](Object['assign']({},i),{'endTime':n,'direction':f}),M=yield g['logs'][t(0x1ff)](p,y,X);if(M[t(0x21f)])(0x0,utils_1[t(0x21f)])(t(0x1da)+M[t(0x21f)]['message']);else x(M[t(0x210)]);}}));}}function a10X(){const U=['format','Error\x20while\x20fetching\x20log\x20lines:\x20','logsApiClient','charAt','--container\x20--containerId\x20[containerId]','getCommand','--project\x20--projectId\x20[projectId]','getLogsCommand','runId','askForJob','all\x20containers','--textNotIncludes\x20<text>','930076zHwtHL','\x20seconds','4764jVfmCS','-d,\x20--direction\x20<order>','toISOString','printResponse','\x20of\x20','jobId','Error\x20while\x20tailing\x20log\x20lines:\x20','formatLogLine','yaml','tail','build-','bold',',\x20from:\x20','logTail','message','./log-formatter','parseDateInput','131046ZtyWLm','logs-received','-l,\x20--lineLimit\x20[limit]','conflicts','getCurrentServiceName','getCurrentProjectName','@northflank/js-client','logRange','6508974btOSJJ','askForService','name','Filter\x20log\x20lines\x20to\x20not\x20include\x20this\x20text','with\x20live-tailing\x20','Tail\x20will\x20stream\x20logs\x20in\x20real-time.\x20Session\x20will\x20be\x20kept\x20open.','forward','ApiClient','\x20to\x20get\x20logs\x20from','Id\x20[','1768660ZsmWzX','values','addonId','\x20--','getStandardLogCommand','choices','data','Direction\x20of\x20logs.\x20Ignored\x20when\x20tailing.','getFormatter','textIncludes','--regexIncludes\x20<regex>','action','inquirerHelper','apiClient','regexIncludes','1076wDsCUd','defineProperty',',\x20duration:\x20','CliLogs','askForProject','then','error','noDefaults','service','tsHint','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','Filter\x20log\x20lines\x20to\x20include\x20this\x20text',',\x20to:\x20','256984MpuopL','304JBVPQF','assertContextExisting','regexNotIncludes','--build\x20--buildId\x20[buildId]','730IDpViM','__esModule','default','\x20in\x20project\x20','Job\x20run\x20id,\x20example:\x20162b1977-6636-4000-929b-cc265b862ff0','Filter\x20log\x20lines\x20to\x20not\x20match\x20this\x20regular\x20expression','--textIncludes\x20<text>','--endTime\x20<timestamp>','askForBuild','-f,\x20--tail','forEach','apiContext','askForContainer','Number\x20of\x20lines\x20to\x20return.','__awaiter','next','-o,\x20--output\x20[output]','close','container\x20','--duration\x20[duration]','value','askForJobRun','addOption','serviceId','alias','--startTime\x20<timestamp>','description','option','log','backward','json','customUserAgent','57969XLbeUb','--regexNotIncludes\x20<regex>','--noDefaults','Filter\x20log\x20lines\x20to\x20match\x20this\x20regular\x20expression','job','askForAddon','printInitInfo','Only\x20two\x20of\x20\x27startTime\x27,\x20\x27endTime\x27\x20and\x20\x27duration\x27\x20can\x20be\x20set.','chalk','textNotIncludes','Get\x20log\x20for\x20the\x20specified\x20','Container\x20to\x20exec\x20into\x20(logs\x20from\x20all\x20containers\x20will\x20be\x20shown\x20if\x20not\x20specified)','Log\x20session\x20ended','Get\x20logs\x20generated\x20before\x20this\x20time,\x20','Option','addon','containerId','../inquirer-helper','No\x20logs\x20found\x20for\x20this\x20query.\x20Make\x20sure\x20to\x20select\x20an\x20appropriate\x20time\x20window.','toUpperCase','__importDefault'];a10X=function(){return U;};return a10X();}exports[a10Z(0x21c)]=CliLogs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a11A=a11V;(function(X,V){const E=a11V,h=X();while(!![]){try{const Q=parseInt(E(0xec))/0x1+parseInt(E(0xe6))/0x2*(-parseInt(E(0xe9))/0x3)+-parseInt(E(0xef))/0x4*(-parseInt(E(0xea))/0x5)+parseInt(E(0xed))/0x6+parseInt(E(0xe7))/0x7*(parseInt(E(0xe8))/0x8)+parseInt(E(0xe2))/0x9*(-parseInt(E(0xdd))/0xa)+-parseInt(E(0xdc))/0xb;if(Q===V)break;else h['push'](h['shift']());}catch(J){h['push'](h['shift']());}}}(a11X,0x89066));function a11X(){const K=['toISOString','formatLogLine','green','log','red','9354664rhqler','4041740ZOQqsc','__esModule','bold','blue','default','9bXAhYf','grey','pattern','defaultLogSyntax','2sTEVQW','28MrgZld','168528OwXLSe','1441023upBXRA','90KUdiru','containerId','745407IGcmfS','5710008xAkERd','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','114412EJisef'];a11X=function(){return K;};return a11X();}var __importDefault=this&&this['__importDefault']||function(X){return X&&X['__esModule']?X:{'default':X};};Object['defineProperty'](exports,a11A(0xde),{'value':!![]}),exports[a11A(0xf1)]=exports[a11A(0xe5)]=void 0x0;const chalk_1=__importDefault(require('chalk'));exports[a11A(0xe5)]=[{'color':a11A(0xe3),'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':'grey','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':a11A(0xe3),'pattern':/[0-9]{4}\/[0-9]{2}\/[0-9]{2}/i},{'color':a11A(0xe3),'pattern':/\s\b([0-9]{2}:){1,2}[0-9]{2}\b\s/i},{'color':a11A(0xdf),'pattern':new RegExp(a11A(0xee),'i')},{'color':'green','pattern':/(?:\d{1,3}\.){3}\d{1,3}/i},{'color':a11A(0xf2),'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':'blue','pattern':/\b(GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH)\b/},{'color':'greenBright','pattern':/\b(successful|success|completed|complete|done)\b/i},{'color':a11A(0xf4),'pattern':/\b(failed|fail|stderr|error|err)\b/i},{'color':'gray','pattern':/\b(information|info|debug)\b/i},{'color':'yellow','pattern':/\b(warning|warn)\b/i},{'color':a11A(0xe0),'pattern':/[0-9a-f]{64}/i},{'color':'blue','pattern':/[0-9a-fA-F]{8}[-]?([0-9a-fA-F]{4}[-]?){3}[0-9a-fA-F]{12}/i}];function a11V(X,V){const h=a11X();return a11V=function(Q,J){Q=Q-0xdc;let G=h[Q];return G;},a11V(X,V);}const formatLogLine=(X,V)=>{const P=a11A,h=chalk_1[P(0xe1)]['dim'](X['ts'][P(0xf0)]()),Q=chalk_1[P(0xe1)]['cyan'](X[P(0xeb)]),J=exports[P(0xe5)]['reduce']((I,T)=>{const D=P;return I['replace'](T[D(0xe4)],W=>T['color']?chalk_1['default'][T['color']](W):chalk_1[D(0xe1)][D(0xe3)](W));},X[P(0xf3)]),G=V?J['replace'](new RegExp(V,'g'),I=>chalk_1[P(0xe1)]['bold'](I)):J;console[P(0xf3)](h+'\x20'+Q+'\x20--\x20'+G);};exports[a11A(0xf1)]=formatLogLine;
|