@northflank/cli 0.9.11 → 0.9.13
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 a4Q=a4I;(function(A,I){const l=a4I,a=A();while(!![]){try{const d=parseInt(l(0x105))/0x1+parseInt(l(0xe1))/0x2+parseInt(l(0x107))/0x3+-parseInt(l(0xf4))/0x4+-parseInt(l(0x13f))/0x5+-parseInt(l(0xf6))/0x6*(parseInt(l(0x106))/0x7)+-parseInt(l(0xfa))/0x8*(-parseInt(l(0x12c))/0x9);if(d===I)break;else a['push'](a['shift']());}catch(s){a['push'](a['shift']());}}}(a4A,0x1bfaf));var __awaiter=this&&this['__awaiter']||function(A,I,a,d){function s(T){return T instanceof a?T:new a(function(V){V(T);});}return new(a||(a=Promise))(function(T,V){const X=a4I;function g(f){try{L(d['next'](f));}catch(t){V(t);}}function u(f){const n=a4I;try{L(d[n(0xf8)](f));}catch(t){V(t);}}function L(f){const v=a4I;f[v(0x139)]?T(f[v(0x10d)]):s(f[v(0x10d)])[v(0xf9)](g,u);}L((d=d['apply'](A,I||[]))[X(0x11b)]());});},__importDefault=this&&this[a4Q(0x12b)]||function(A){return A&&A['__esModule']?A:{'default':A};};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['CliExec']=void 0x0;const js_client_1=require(a4Q(0x118)),chalk_1=__importDefault(require(a4Q(0xf1))),utils_1=require('../utils'),inquirer_helper_1=require(a4Q(0x117));function a4A(){const E=['option','\x20--','value','resizeTerminal','--project\x20--projectId\x20[NAME]',',\x20exit\x20code:\x20','job','Command\x20exec\x20for\x20the\x20specified\x20','exitCode','greenBright','askForJob','stdin','../inquirer-helper','@northflank/js-client','Received\x20Ctrl+D\x20twice,\x20exiting\x20shell\x20forcefully.','ApiClient','next','with\x20user:','without\x20shell','error','sequence','stderr','Command\x20execution\x20(exec)\x20for\x20Northflank\x20services\x20and\x20jobs.','service','\x20command\x20exec:\x20','emitKeypressEvents','default','slice','message','exec','askForProject','Exec\x20','__importDefault','9NTXopC','getTerminalSize','Command\x20completed\x20successfully,\x20exit\x20code:\x20','pipe','charAt','bold','success','(exit\x20with\x20two\x20quick\x20','filter','\x27Ctrl+D\x27','--shell-cmd\x20[SHELL-CMD]','Id\x20[NAME]','waitForCommandResult','done','stdout','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','--container\x20--containerId\x20[NAME]','apiClient','addCommand','623055MdeIJR','columns','Error\x20occured\x20during\x20','getStandardExecCommand','customUserAgent','handleShellSession','162508kFWuhW','Unknown','with\x20group:','warning','rows','keypress','description','getCurrentServiceName','execJobSession','exit','shell\x20command\x20',',\x20details:\x20','toUpperCase','execCmd','name','stdIn','chalk','getCommand','resize','431880nIoVZB','assertContextExisting','366muAjQj','\x20to\x20exec\x20into','throw','then','2718728dEjCLI','action','execStartLog','alias','--user\x20[USER]','log','getCurrentProjectName','isTTY','with\x20shell\x20session','readline','none','50599TGdcek','25697hwewmb','298275MjYwlG','askForService','Container\x20to\x20exec\x20into\x20(random\x20container\x20will\x20be\x20chosen\x20if\x20not\x20specified)','setRawMode'];a4A=function(){return E;};return a4A();}function a4I(A,I){const a=a4A();return a4I=function(d,s){d=d-0xe1;let T=a[d];return T;},a4I(A,I);}class CliExec{constructor(A){const O=a4Q;this[O(0x142)]=s=>(0x0,utils_1[O(0xf2)])(!![])[O(0xef)](s)[O(0xe7)](O(0x112)+s)[O(0x10b)](O(0x10f),'Project\x20for\x20exec')[O(0x10b)]('--'+s+O(0x10c)+s+O(0x137),s[O(0x130)](0x0)[O(0xed)]()+s[O(0x126)](0x1)+O(0xf7))['option'](O(0x13c),O(0x109))[O(0x10b)](O(0x136),O(0x13b))[O(0x10b)](O(0xfe),'Run\x20command\x20with\x20this\x20user')[O(0x10b)]('--group\x20[GROUP]','Run\x20command\x20with\x20this\x20group')['option']('--noDefaults','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.',![])[O(0x10b)]('--cmd\x20--command\x20[COMMAND]','Command\x20to\x20execute,\x20if\x20--shell\x20option\x20is\x20present,\x20it\x20will\x20run\x20in\x20the\x20specified\x20shell,\x20otherwise'),this[O(0x12d)]=()=>({'columns':process[O(0x13a)][O(0x140)],'rows':process[O(0x13a)][O(0xe5)]}),this[O(0xfc)]=(s,T,V,g,u,L,f,t)=>{const p=O;if(t===!![])return;const m=g===p(0x104),U=m?p(0x11d):g===undefined?p(0x102):p(0xeb)+chalk_1[p(0x125)]['greenBright'](g),S=u!==undefined?p(0x11c)+u:'',k=L!==undefined?p(0xe3)+L:'',e=f!==undefined?'with\x20command\x20\x27'+chalk_1[p(0x125)][p(0x114)](f)+'\x27':'',x=[e,U,S,k][p(0x134)](M=>M!=='')['join']('\x20'),o=p(0x133)+chalk_1[p(0x125)]['bold'](p(0x135))+')';console[p(0xff)](p(0x12a)+s+'\x20'+chalk_1[p(0x125)][p(0x131)](T)+'\x20in\x20project\x20'+chalk_1[p(0x125)][p(0x131)](V)+'\x20'+x+'\x20'+o);},this['handleShellSession']=(s,T,V=![])=>__awaiter(this,void 0x0,void 0x0,function*(){const r=O;var g,u;let L=![];try{if(process['stdin'][r(0x101)]){const t=require(r(0x103));t[r(0x124)](process[r(0x116)]),process[r(0x116)][r(0x10a)](!![]),process[r(0x13a)]['on'](r(0xf3),()=>{const H=r;s[H(0x10e)](this[H(0x12d)]());}),process[r(0x116)]['on'](r(0xe6),(m,U)=>{const P=r;U[P(0x11f)]==='\x04'&&(L?(process[P(0x116)]['setRawMode'](![]),(0x0,utils_1[P(0xe4)])(P(0x119)),process['exit']()):(L=!![],setTimeout(()=>L=![],0x190)));});}process[r(0x116)][r(0x12f)](s[r(0xf0)]),s['stdErr'][r(0x12f)](process[r(0x120)]),s['stdOut'][r(0x12f)](process[r(0x13a)]),s['on'](r(0x11e),m=>{const R=r;var U;(0x0,utils_1[R(0x11e)])(R(0x141)+T+R(0x123)+((U=m[R(0x127)])!==null&&U!==void 0x0?U:m)),process[R(0x116)][R(0x101)]&&process[R(0x116)][R(0x10a)](![]),process[R(0xea)](-0x1);});const f=yield s[r(0x138)]();if(V!==!![]){const m=(g=f===null||f===void 0x0?void 0x0:f['status'])!==null&&g!==void 0x0?g:r(0xe2),U=(u=f===null||f===void 0x0?void 0x0:f[r(0x113)])!==null&&u!==void 0x0?u:-0x1,S=(f===null||f===void 0x0?void 0x0:f[r(0x127)])?r(0xec)+f[r(0x127)]:'';m==='Success'?(0x0,utils_1[r(0x132)])(r(0x12e)+U):(0x0,utils_1['warning'])('Command\x20didn\x27t\x20complete\x20successfully,\x20status:\x20'+m+r(0x110)+U+S);}return f;}finally{process[r(0x116)][r(0x101)]&&process[r(0x116)]['setRawMode'](![]);}}),this[O(0x13d)]=new js_client_1[(O(0x11a))](A,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[O(0x143)]});const I=new inquirer_helper_1['InquirerHelper'](this[O(0x13d)]);this[O(0xee)]=(0x0,utils_1[O(0xf2)])()[O(0xef)]('command-exec')[O(0xfd)]('exec')[O(0xe7)](O(0x121));const a=this[O(0x142)](O(0x122))['action'](s=>__awaiter(this,void 0x0,void 0x0,function*(){const Z=O,{noDefaults:T,projectId:V,serviceId:g,containerId:u,shellCmd:L,user:f,group:t,command:m,quiet:U}=s;(0x0,utils_1['assertContextExisting'])(this['apiClient']);try{const S=T?undefined:A[Z(0x100)](),k=V||S||(yield I['askForProject']()),x=T?undefined:A[Z(0xe8)](),o=g||x||(yield I[Z(0x108)](k)()),M=L!==null&&L!==void 0x0?L:m!==undefined?Z(0x104):undefined;this[Z(0xfc)](Z(0x122),o,k,M,f,t,m,U);const N=process[Z(0x13a)][Z(0x140)],q=process[Z(0x13a)]['rows'],K={'projectId':k,'serviceId':o},y=yield this[Z(0x13d)][Z(0x128)]['execServiceSession'](K,{'containerName':u,'command':m,'shell':M,'user':f,'group':t,'ttyColumns':N,'ttyRows':q});yield this[Z(0x144)](y,Z(0x122),U);}catch(D){(0x0,utils_1[Z(0x11e)])(''+D['message']);}finally{process[Z(0xea)]();}})),d=this['getStandardExecCommand']('job')[O(0xfb)](s=>__awaiter(this,void 0x0,void 0x0,function*(){const B=O,{projectId:T,jobId:V,containerId:g,noDefaults:u,shellCmd:L,user:f,group:t,command:m,quiet:U}=s;(0x0,utils_1[B(0xf5)])(this[B(0x13d)]);try{const S=u?undefined:A[B(0x100)](),k=T||S||(yield I[B(0x129)]()),x=V||(yield I[B(0x115)](k)());this[B(0xfc)]('job',x,k,L,U);const {rows:o,columns:M}=this[B(0x12d)](),N={'projectId':k,'jobId':x},q=yield this['apiClient'][B(0x128)][B(0xe9)](N,{'containerName':g,'command':m,'shell':L,'user':f,'group':t,'ttyColumns':M,'ttyRows':o});yield this[B(0x144)](q,B(0x111),U);}catch(K){(0x0,utils_1[B(0x11e)])(''+K['message']);}finally{process['exit']();}}));this[O(0xee)][O(0x13e)](a),this[O(0xee)][O(0x13e)](d);}}exports['CliExec']=CliExec;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function a5A(){const p=['__awaiter','574128PhXJRX','forEach','log','5tVPcgu','1398966AYceer','chalk','130220HpIbeR','__esModule','next','4fkLMCN','slice','name','getCommand','action','796113RSJAuy','106zsefVn','value','length','apply','description','keys','map','549hdZKCz','17029PRCgTq','getCommandOverview','default','throw','Print\x20command\x20descriptions','8177120iCcVmS','../utils','--verbose','1804aAFMHO','170796jLsOYJ','join'];a5A=function(){return p;};return a5A();}const a5K=a5I;(function(A,I){const q=a5I,a=A();while(!![]){try{const d=parseInt(q(0xaa))/0x1*(parseInt(q(0xc5))/0x2)+parseInt(q(0xc4))/0x3*(-parseInt(q(0xbf))/0x4)+-parseInt(q(0xb9))/0x5*(parseInt(q(0xba))/0x6)+-parseInt(q(0xaf))/0x7+-parseInt(q(0xb6))/0x8+-parseInt(q(0xa9))/0x9*(parseInt(q(0xbc))/0xa)+parseInt(q(0xb2))/0xb*(parseInt(q(0xb3))/0xc);if(d===I)break;else a['push'](a['shift']());}catch(s){a['push'](a['shift']());}}}(a5A,0xabdcd));var __awaiter=this&&this[a5K(0xb5)]||function(A,I,a,d){function s(T){return T instanceof a?T:new a(function(V){V(T);});}return new(a||(a=Promise))(function(T,V){const n=a5I;function g(f){const y=a5I;try{L(d[y(0xbe)](f));}catch(t){V(t);}}function u(f){const D=a5I;try{L(d[D(0xad)](f));}catch(t){V(t);}}function L(f){const l=a5I;f['done']?T(f[l(0xc6)]):s(f['value'])['then'](g,u);}L((d=d[n(0xc8)](A,I||[]))[n(0xbe)]());});},__importDefault=this&&this['__importDefault']||function(A){const v=a5K;return A&&A[v(0xbd)]?A:{'default':A};};Object['defineProperty'](exports,a5K(0xbd),{'value':!![]}),exports[a5K(0xab)]=void 0x0;function a5I(A,I){const a=a5A();return a5I=function(d,s){d=d-0xa7;let T=a[d];return T;},a5I(A,I);}const chalk_1=__importDefault(require(a5K(0xbb))),utils_1=require(a5K(0xb0));function getCommandOverview(A){const X=a5K;return(0x0,utils_1[X(0xc2)])()[X(0xc1)]('command-overview')[X(0xc9)]('Prints\x20a\x20tree\x20view\x20of\x20all\x20available\x20commands')['option'](X(0xb1),X(0xae))[X(0xc3)](I=>__awaiter(this,void 0x0,void 0x0,function*(){const {verbose:a}=I;function d(s,T){const Q=a5I;var V;const g=(o,M=!![])=>M?chalk_1[Q(0xac)]['bold']['green'](o[Q(0xc1)]()):o[Q(0xc1)](),u=T[Q(0xc7)]===0x0,L=s['commands'];let f='';const t=L[Q(0xc7)]===0x0,m=t||((V=Object[Q(0xa7)](s===null||s===void 0x0?void 0x0:s['opts']()))===null||V===void 0x0?void 0x0:V['length'])>0x0;!u&&(f=L&&!t?'┬\x20':'─\x20');const U=a&&m&&s[Q(0xc9)]()?':\x20'+s[Q(0xc9)]():'';console[Q(0xb8)](''+T+f+g(s,m)+U);let S=T;if(!u){const o=T[Q(0xc0)](-0x2)==='└─';S=T[Q(0xc0)](0x0,-0x2)+(o?'\x20\x20':'│\x20');}const k=S+'├─',e=S+'└─',x=L['every'](M=>M['commands']['length']===0x0);x&&!t&&!a?console['log'](e+'\x20'+L[Q(0xa8)](M=>g(M))[Q(0xb4)](',\x20')):L[Q(0xb7)]((M,N)=>{const O=Q;d(M,L[O(0xc7)]-0x1===N?e:k);});}d(A,'');}));}exports[a5K(0xab)]=getCommandOverview;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a6e=a6I;(function(A,I){const S=a6I,a=A();while(!![]){try{const d=parseInt(S(0x157))/0x1+-parseInt(S(0x16b))/0x2*(-parseInt(S(0x13e))/0x3)+parseInt(S(0x165))/0x4+-parseInt(S(0x146))/0x5+-parseInt(S(0x149))/0x6+-parseInt(S(0x15f))/0x7*(parseInt(S(0x144))/0x8)+parseInt(S(0x164))/0x9;if(d===I)break;else a['push'](a['shift']());}catch(s){a['push'](a['shift']());}}}(a6A,0xaac3c));var __createBinding=this&&this['__createBinding']||(Object['create']?function(A,I,a,d){const k=a6I;if(d===undefined)d=a;var s=Object[k(0x14b)](I,a);(!s||(k(0x156)in s?!I['__esModule']:s[k(0x15e)]||s['configurable']))&&(s={'enumerable':!![],'get':function(){return I[a];}}),Object[k(0x161)](A,d,s);}:function(A,I,a,d){if(d===undefined)d=a;A[d]=I[a];}),__setModuleDefault=this&&this[a6e(0x135)]||(Object[a6e(0x13b)]?function(A,I){const x=a6e;Object[x(0x161)](A,'default',{'enumerable':!![],'value':I});}:function(A,I){A['default']=I;}),__importStar=this&&this['__importStar']||function(A){const o=a6e;if(A&&A[o(0x138)])return A;var I={};if(A!=null){for(var a in A)if(a!==o(0x15d)&&Object[o(0x137)]['hasOwnProperty']['call'](A,a))__createBinding(I,A,a);}return __setModuleDefault(I,A),I;},__importDefault=this&&this[a6e(0x16f)]||function(A){return A&&A['__esModule']?A:{'default':A};};Object[a6e(0x161)](exports,a6e(0x138),{'value':!![]}),exports[a6e(0x147)]=exports[a6e(0x166)]=exports[a6e(0x160)]=exports[a6e(0x148)]=exports['consoleFormat']=exports[a6e(0x13a)]=void 0x0;const chalk_1=__importDefault(require(a6e(0x13f))),_=__importStar(require(a6e(0x13c))),util=__importStar(require(a6e(0x140))),yaml=require(a6e(0x158)),columnify=require(a6e(0x16a));function printAsTable(A,I,a,d=![],s=0x0){const M=a6e;!d&&console['log'](''+chalk_1[M(0x15d)][M(0x15a)](I));function T(g){const N=M;return g===N(0x159)?g:g[N(0x16c)](N(0x159),'');}function V(g,u){const K=M;function L(t){const q=a6I,m=new Date(t);return m[q(0x14e)]()+'/'+m[q(0x162)]()+'/'+m['getFullYear']()+'\x0a'+m[q(0x14c)]()+':'+m[q(0x14a)]()+':'+m['getSeconds']();}const f=[K(0x171),'updatedat'];if(f[K(0x151)](u[K(0x153)]())&&_[K(0x141)](g)&&g[K(0x15b)]()[K(0x163)]===0xd)return L(Number(g));if(_[K(0x168)](g)){if(u!==K(0x159)&&u[K(0x151)](K(0x159)))return g?'x':'✔';return g?'✔':'x';}if(_[K(0x14d)](g))return util[K(0x14f)](g,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});return g;}if(_[M(0x16e)](A)){A['length']===0x0&&console[M(0x136)](M(0x170)+I[M(0x153)]()+'\x20found');const g=A[M(0x167)]((f,t)=>{const y=M,m={'i':t+s};return Object[y(0x155)](f)['forEach'](U=>{const D=y;(_[D(0x150)](a)||a[D(0x151)](U['toLowerCase']()))&&_['set'](m,T(U),V(f[U],U));}),m;}),u=_[M(0x15c)](Object['keys']((g===null||g===void 0x0?void 0x0:g[0x0])||[]))[M(0x143)]((f,t)=>{const l=M,m=U=>U!=='i'?U!==l(0x152)?0x0:0x1:0x2;return m(t)-m(f);}),L={'maxWidth':0x1e,'preserveNewLines':!![],'showHeaders':!d,'config':{'_id':{'maxWidth':0x5,'truncate':!![]},'i':{'showHeaders':![]}},'columns':u};console[M(0x136)](columnify(g,L));}else console['log'](A);}exports['printAsTable']=printAsTable;function consoleFormat(A,I){const n=a6e;if(_[n(0x145)](A)){const a=I?'\x20(HTTP\x20status:\x20'+I+')':'';return chalk_1['default'][n(0x16d)](n(0x139))+a;}if(!_[n(0x14d)](A))return A===null||A===void 0x0?void 0x0:A[n(0x15b)]();return util['inspect'](A,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});}exports[a6e(0x142)]=consoleFormat;const handleJsonOutput=(A,I)=>{const v=a6e,a=A===v(0x169);if(a)console[v(0x136)](JSON[v(0x13d)](I,null,'\x20'));};exports[a6e(0x148)]=handleJsonOutput;const handleYamlOutput=(A,I)=>{const X=a6e,a=A==='yaml'||A===X(0x154);if(a)console[X(0x136)](yaml['safeDump'](I));};exports[a6e(0x160)]=handleYamlOutput;const handleFormattedOutput=(A,I)=>{const a=A==='format';if(a)console['log'](consoleFormat(I));};function a6A(){const O=['The\x20request\x20was\x20completed\x20successfully','printAsTable','create','lodash','stringify','571737RIYunX','chalk','util','isFinite','consoleFormat','sort','312wvGFJo','isEmpty','2314400SIeayn','printResponse','handleJsonOutput','5315514LRslJB','getMinutes','getOwnPropertyDescriptor','getHours','isObjectLike','getDate','inspect','isUndefined','includes','internalId','toLowerCase','yml','keys','get','573077GRKMaY','js-yaml','disabled','bold','toString','clone','default','writable','63889PFaOxF','handleYamlOutput','defineProperty','getMonth','length','3337371RHcdUx','4316600kGerob','handleFormattedOutput','map','isBoolean','json','columnify','4AvwcvA','replace','green','isArrayLike','__importDefault','No\x20','createdat','__setModuleDefault','log','prototype','__esModule'];a6A=function(){return O;};return a6A();}function a6I(A,I){const a=a6A();return a6I=function(d,s){d=d-0x135;let T=a[d];return T;},a6I(A,I);}exports['handleFormattedOutput']=handleFormattedOutput;const printResponse=(A,I)=>{const Q=a6e;(0x0,exports[Q(0x148)])(A,I),(0x0,exports[Q(0x160)])(A,I),(0x0,exports[Q(0x166)])(A,I);};exports['printResponse']=printResponse;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a7h=a7I;(function(A,I){const j=a7I,a=A();while(!![]){try{const d=-parseInt(j(0x200))/0x1*(parseInt(j(0x213))/0x2)+-parseInt(j(0x202))/0x3*(parseInt(j(0x207))/0x4)+-parseInt(j(0x208))/0x5+parseInt(j(0x1f4))/0x6*(-parseInt(j(0x206))/0x7)+-parseInt(j(0x20a))/0x8+-parseInt(j(0x1f6))/0x9+parseInt(j(0x205))/0xa;if(d===I)break;else a['push'](a['shift']());}catch(s){a['push'](a['shift']());}}}(a7A,0xcaf09));var __importDefault=this&&this['__importDefault']||function(A){const z=a7I;return A&&A[z(0x20e)]?A:{'default':A};};Object[a7h(0x210)](exports,a7h(0x20e),{'value':!![]}),exports[a7h(0x1fe)]=exports[a7h(0x1ff)]=void 0x0;const chalk_1=__importDefault(require('chalk')),colored=(A,I)=>{return I===undefined?A:chalk_1['default'][I](A);},getAsciiChart=(A,I={})=>{const w=a7h,a=Array[w(0x1f3)](A[0x0])?A:[A];let d=typeof I[w(0x1f1)]!==w(0x216)?I[w(0x1f1)]:a[0x0][0x0],s=typeof I[w(0x219)]!==w(0x216)?I[w(0x219)]:a[0x0][0x0];for(let K=0x0;K<a[w(0x1fb)];K++){for(let D=0x0;D<a[K][w(0x1fb)];D++){d=Math['min'](d,a[K][D]),s=Math[w(0x219)](s,a[K][D]);}}let T=['┼','┤','╶','╴','─','╰','╭','╮','╯','│'],V=Math[w(0x217)](s-d),g=typeof I[w(0x211)]!=='undefined'?I['offset']:0x3,u=typeof I[w(0x20d)]!==w(0x216)?I['padding']:w(0x204),L=typeof I['height']!==w(0x216)?I['height']:V,f=typeof I[w(0x1fc)]!=='undefined'?I[w(0x1fc)]:[w(0x1fa),w(0x1f0),w(0x214),w(0x218),'black'],t=V!==0x0?L/V:0x1,m=Math[w(0x1f8)](d*t),U=Math[w(0x1f8)](s*t),S=Math['abs'](U-m),k=0x0;for(let l=0x0;l<a[w(0x1fb)];l++){k=Math[w(0x219)](k,a[l]['length']);}k=k+g;let e=typeof I[w(0x203)]!==w(0x216)?I[w(0x203)]:T,o=I[w(0x1fd)]!==undefined?I[w(0x1fd)]:function(n){const i=w;return(u+n[i(0x20c)](0x2)+I['unit'])[i(0x20f)](-u[i(0x1fb)]);},M=new Array(S+0x1);for(let n=0x0;n<=S;n++){M[n]=new Array(k);for(let v=0x0;v<k;v++){M[n][v]='\x20';}}for(let X=m;X<=U;++X){const Q=o(S>0x0?s-(X-m)*V/S:X,X-m);M[X-m][Math[w(0x219)](g-Q['length'],0x0)]=Q,M[X-m][g-0x1]=X==0x0?e[0x0]:e[0x1];}for(let O=0x0;O<a[w(0x1fb)];O++){let p=f[O%f[w(0x1fb)]],r=Math[w(0x1f8)](a[O][0x0]*t)-m;M[S-r][g-0x1]=colored(e[0x0],p);for(let H=0x0;H<a[O][w(0x1fb)]-0x1;H++){let P=Math[w(0x1f8)](a[O][H+0x0]*t)-m,R=Math[w(0x1f8)](a[O][H+0x1]*t)-m;if(P==R)M[S-P][H+g]=colored(e[0x4],p);else{M[S-R][H+g]=colored(P>R?e[0x5]:e[0x6],p),M[S-P][H+g]=colored(P>R?e[0x7]:e[0x8],p);let Z=Math[w(0x1f1)](P,R),B=Math[w(0x219)](P,R);for(let E=Z+0x1;E<B;E++){M[S-E][H+g]=colored(e[0x9],p);}}}}const {startTs:N,endTs:q}=I;if(N||q){const J=W=>{const A0=w;if(!W)return A0(0x215);const C=W[A0(0x201)](undefined,{'day':'2-digit','month':A0(0x1f5),'year':'2-digit'}),G=W['toLocaleTimeString'](undefined,{'hourCycle':A0(0x212)});return C+'\x20'+G;},b=J(q),Y=J(N),F=u[w(0x20f)](0x0,Math['max'](0x2,u[w(0x1fb)]-Y['length']/0x2+0x1)),c='\x20'[w(0x20b)](Math[w(0x219)](k-(u['length']+b[w(0x1fb)]/0x2),0x1));M[w(0x1f7)]([''+F+Y+c+b]),M[w(0x1f7)]([]);}return M[w(0x1f9)](W=>W[w(0x1f2)](''))[w(0x1f2)]('\x0a');};exports['getAsciiChart']=getAsciiChart;function a7I(A,I){const a=a7A();return a7I=function(d,s){d=d-0x1f0;let T=a[d];return T;},a7I(A,I);}const downSampleData=(A,I)=>{const A1=a7h,d=A['length'];if(I>=d||I===0x0)return A;const s=[];let T=0x0;const V=(d-0x2)/(I-0x2);let g=0x0,u,L,f,t;s[T++]=A[g];for(var m=0x0;m<I-0x2;m++){let o=0x0,M=0x0,N=Math[A1(0x209)]((m+0x1)*V)+0x1,q=Math[A1(0x209)]((m+0x2)*V)+0x1;q=q<d?q:d;var U=q-N;for(;N<q;N++){o+=A[N][0x0],M+=A[N][0x1];}o/=U,M/=U;var S=Math['floor'](m*V)+0x1,k=Math[A1(0x209)]((m+0x1)*V)+0x1,e=A[g][0x0],x=A[g][0x1];L=f=-0x1;for(;S<k;S++){f=Math[A1(0x217)]((e-o)*(A[S][0x1]-x)-(e-A[S][0x0])*(M-x))*0.5,f>L&&(L=f,u=A[S],t=S);}s[T++]=u,g=t;}return s[T++]=A[d-0x1],s;};exports['downSampleData']=downSampleData;function a7A(){const A2=['7358544gKkWfQ','push','round','map','blue','length','colors','format','downSampleData','getAsciiChart','3sInDWQ','toLocaleDateString','9spqZiV','symbols','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','66193830KMldik','14lCaZOm','1274324hGJRMl','5816385mxlAUM','floor','7973376VadlJA','repeat','toFixed','padding','__esModule','slice','defineProperty','offset','h24','925340OVQIOh','green','\x20\x20\x20','undefined','abs','grey','max','red','min','join','isArray','1400472UPwpIW','2-digit'];a7A=function(){return A2;};return a7A();}
|
package/dist/inquirer-helper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a8T=a8h;function a8w(){const wH=['service','\x27\x20already\x20exists.\x20Do\x20you\x20want\x20to\x20override\x20this\x20context\x20(y)\x20or\x20enter\x20a\x20new\x20name\x20(N)?','__importDefault','deleteWarningPrompt','askForJob','safeLoad','askForSubdomain','fullName','must\x20be\x20a\x20number,\x20is\x20','js-yaml','addEntry','fetchResourceList','job:\x20\x27','safeDump','token','SAVE','password','apply','not\x20completed','jobs','pagination-prompt','split','oneOf','subdomains','completedAt','__setModuleDefault','defineProperty','askForProject','pathVars','Something\x20unexpected\x20happened.','saveFile','1424WeKVgY','isNaN','\x20characters','example','job\x20runs','message','confirmationPrompt','value','.\x20This\x20is\x20irreversible.\x20Please\x20confirm!','backups','set','length','Do\x20you\x20want\x20to\x20add',',\x20supported\x20types:\x20[json|yaml|yml]','tokenPrompt','No,\x20repeat','\x20(startedAt:\x20','builds','template','max','askForSecret','isEmpty','__esModule','boolean','job','getType','Choose\x20the\x20','registerPrompt','Yes,\x20send','getInnerType','askForProjectScopedResourcePaginated','resultCache','isObject','askForBuild','then','choice','minimum','editor','askForResourcePaginated','13730FzJdEn','credentials','12336256DvkiPR','greenBright','opt','done','pipelines','restores','don\x27t\x20change','a\x20Northflank\x20resource','unshift','integer','./pagination/inquirer-pagination-prompt','\x20Example:\x20','repeat','includes','askForPipeline','cursor','prototype','fileName','logSinks','items','get','Unexpected\x20file\x20type:\x20','project','concat','underline','subdomain','askForVolume','Aborted.','hasOwnProperty','found','service:\x20\x27','8267693PpVhzN','prompt','apiClient','defaultPaginationPageSize','job\x20builds','ABORT','getPathString','secrets','input','askForService','elements','templateRuns','validate','InquirerHelper','slice','next','blueBright','toString','maximum','create','askForAddonBackup','Go\x20to\x20editor','ask','service\x20containers','pagination','getCurrentProjectName','contextProvider','minLength','No,\x20but\x20save\x20as\x20file','must\x20be\x20smaller\x20than\x20or\x20equal\x20to\x20','whiteBright','No\x20','__createBinding','Context\x20with\x20name\x20\x27','search-list','body','\x20characters,\x20is\x20','trim','Writing\x20configuration\x20failed:\x20','__awaiter','must\x20be\x20longer\x20than\x20or\x20equal\x20to\x20','askGeneric','to\x20use:','reset','askForTemplateRun','maxLength','string','confirm','tmpCmdPath','service\x20build','override','YES','secret','452655HlCaXv','startedAt','addons','stringify','properties','object','runs','editedResult','yellowBright','charAt','containers','bgGrey','./api-helpers','\x20type?','all-job-runs','propToType','\x20and\x20it\x20','545248OFfKrY','blue','rawObject','list','\x20(completedAt:\x20','askForResource','addon','job\x20containers','10xRCDsr','restore','askForCredentials','confirmation','writable','askForAddon','default','test','filter','map','values','services','must\x20be\x20shorter\x20than\x20or\x20equal\x20to\x20','\x20to\x20use:','addon:\x20\x27','editPayload','askForAddonRestore','throw','warning','for\x20this\x20','createdAt','1kmOGQo','find','loginPrompt','json','red','must\x20be\x20a\x20valid\x20non-empty\x20json\x20string','./utils','project:\x20\x27','REPEAT','Do\x20you\x20want\x20to\x20add\x20more','isUndefined','No\x20containers\x20found','isValidJSON','all-containers','push','bold','keys','log\x20sink','askForTemplate','call','pop','inquirer','Enter\x20the\x20','array','unset','name','Please\x20confirm\x20following\x20configuration:\x0a','\x20in\x20','askForContainer','type','join','green','setPathVars','chalk','askForDomain','assign','pattern','registryCredentials','retrievePayloadViaInteractiveCli','\x20(full\x20domain:\x20','6PpDLJd','templates','success','domain\x20(','description','Configuration\x20file\x20written\x20to\x20','main-context','has','What\x27s\x20the\x20','projects','isBoolean','Choose\x20the\x20login\x20token:','domains','writeFileSync','Should\x20it\x20be','8378541lHVnIp','askArrayEntry','1992406HdQizo','Template\x20id\x20not\x20provided.','data'];a8w=function(){return wH;};return a8w();}(function(w,h){const X=a8h,G=w();while(!![]){try{const P=-parseInt(X(0x24f))/0x1*(-parseInt(X(0x288))/0x2)+parseInt(X(0x221))/0x3+-parseInt(X(0x2aa))/0x4*(parseInt(X(0x2d1))/0x5)+parseInt(X(0x277))/0x6*(parseInt(X(0x2f2))/0x7)+-parseInt(X(0x2d3))/0x8+parseInt(X(0x286))/0x9+-parseInt(X(0x23a))/0xa*(-parseInt(X(0x232))/0xb);if(P===h)break;else G['push'](G['shift']());}catch(v){G['push'](G['shift']());}}}(a8w,0xc0a68));function a8h(w,h){const G=a8w();return a8h=function(P,v){P=P-0x1f0;let O=G[P];return O;},a8h(w,h);}var __createBinding=this&&this[a8T(0x20c)]||(Object['create']?function(w,h,G,P){const I=a8T;if(P===undefined)P=G;var v=Object['getOwnPropertyDescriptor'](h,G);(!v||('get'in v?!h['__esModule']:v[I(0x23e)]||v['configurable']))&&(v={'enumerable':!![],'get':function(){return h[G];}}),Object['defineProperty'](w,P,v);}:function(w,h,G,P){if(P===undefined)P=G;w[P]=h[G];}),__setModuleDefault=this&&this[a8T(0x2a4)]||(Object[a8T(0x1ff)]?function(w,h){Object['defineProperty'](w,'default',{'enumerable':!![],'value':h});}:function(w,h){w['default']=h;}),__importStar=this&&this['__importStar']||function(w){const k=a8T;if(w&&w['__esModule'])return w;var h={};if(w!=null){for(var G in w)if(G!==k(0x240)&&Object[k(0x2e3)][k(0x2ef)][k(0x262)](w,G))__createBinding(h,w,G);}return __setModuleDefault(h,w),h;},__awaiter=this&&this[a8T(0x213)]||function(w,h,G,v){function O(Z){return Z instanceof G?Z:new G(function(a){a(Z);});}return new(G||(G=Promise))(function(Z,a){const q=a8h;function l(A){const Y=a8h;try{U(v[Y(0x1fb)](A));}catch(D){a(D);}}function B(A){const x=a8h;try{U(v[x(0x24b)](A));}catch(D){a(D);}}function U(A){const b=a8h;A[b(0x2d6)]?Z(A[b(0x2b1)]):O(A[b(0x2b1)])[b(0x2cc)](l,B);}U((v=v[q(0x29c)](w,h||[]))[q(0x1fb)]());});},__importDefault=this&&this[a8T(0x28d)]||function(w){const f=a8T;return w&&w[f(0x2c0)]?w:{'default':w};};Object[a8T(0x2a5)](exports,'__esModule',{'value':!![]}),exports[a8T(0x1f9)]=void 0x0;const _=__importStar(require('lodash')),chalk_1=__importDefault(require(a8T(0x270))),fs=__importStar(require('fs')),utils_1=require(a8T(0x255)),api_helpers_1=require(a8T(0x22d)),inquirer_pagination_prompt_1=require(a8T(0x2dd)),inquirer=require(a8T(0x264)),inquirerSearchList=require('inquirer-search-list'),yaml=require(a8T(0x294));var ConfirmChoices;(function(w){const e=a8T;w[e(0x21f)]=e(0x2c6),w[e(0x257)]=e(0x2b9),w['EDIT']='No,\x20edit',w[e(0x29a)]=e(0x208),w['ABORT']='No,\x20abort';}(ConfirmChoices||(ConfirmChoices={})));class InquirerHelper{constructor(w){const i=a8T;this[i(0x2f4)]=w,this[i(0x2f5)]=0x32,this[i(0x249)]=h=>__awaiter(this,void 0x0,void 0x0,function*(){const u=i,{editedResult:G}=yield inquirer['prompt']([{'type':u(0x2cf),'name':u(0x228),'message':u(0x201),'default':yaml['safeDump'](h)}]);return yaml[u(0x290)](G);}),this[i(0x2a9)]=h=>__awaiter(this,void 0x0,void 0x0,function*(){const t=i,G=Z=>t(0x2e8)+Z+t(0x2b7);function P(){return __awaiter(this,void 0x0,void 0x0,function*(){const S=a8h;return inquirer[S(0x2f3)]([{'type':S(0x1f4),'name':S(0x2e4),'message':'Provide\x20a\x20file\x20path\x20to\x20write\x20the\x20configuration\x20to\x20(<name>.[json|yaml|yml])','validate':Z=>new RegExp('.*\x5c.(json|yaml|yml)$')[S(0x241)](Z)?!![]:G(Z)}]);});}const {fileName:v}=yield P(),O=v[t(0x1fd)]()[t(0x2a0)]('.')[t(0x263)]();try{switch(O){case t(0x252):(0x0,utils_1[t(0x279)])(t(0x27c)+v);return fs[t(0x284)](v,JSON[t(0x224)](h,null,'\x20\x20'));case'yaml':case'yml':(0x0,utils_1[t(0x279)])('Configuration\x20file\x20written\x20to\x20'+v);return fs['writeFileSync'](v,yaml[t(0x298)](h));default:(0x0,utils_1[t(0x24c)])(G(O));}}catch(Z){(0x0,utils_1['warning'])(t(0x212)+Z[t(0x2af)]);}return undefined;}),this['filter']=(h,G)=>P=>{const V=i,v=typeof P===V(0x21a)?P[V(0x211)]():P;return G===![]&&v==='don\x27t\x20change'?'':v;},this[i(0x1f8)]=(h,G,P)=>v=>{const C=i,O=[];if(v===''||v===C(0x2d9)){if(G!==![])O[C(0x25d)]('this\x20option\x20is\x20required,\x20please\x20answer');else return!![];}h['type']===C(0x21a)&&!_[C(0x259)](h['pattern'])&&O[C(0x25d)](new RegExp(h[C(0x273)])['test'](v)?!![]:'doesn\x27t\x20match\x20pattern\x20\x27'+h[C(0x273)]+'\x27');h[C(0x26c)]===C(0x21a)&&!_[C(0x259)](h['minLength'])&&O[C(0x25d)](v[C(0x2b5)]>=h[C(0x207)]?!![]:C(0x214)+h[C(0x207)]+'\x20characters,\x20is\x20'+v[C(0x2b5)]+C(0x2ac));h[C(0x26c)]===C(0x21a)&&!_[C(0x259)](h[C(0x219)])&&O[C(0x25d)](v[C(0x2b5)]<=h[C(0x219)]?!![]:C(0x246)+h['maxLength']+C(0x210)+v[C(0x2b5)]+C(0x2ac));P&&Number[C(0x2ab)](parseInt(v,0xa))&&O[C(0x25d)](C(0x293)+v);h[C(0x26c)]===C(0x2dc)&&!_['isUndefined'](h['minimum'])&&O['push'](v>=h[C(0x2ce)]?!![]:'must\x20be\x20bigger\x20than\x20or\x20equal\x20to\x20'+h[C(0x2ce)]);h[C(0x26c)]===C(0x2dc)&&!_[C(0x259)](h[C(0x1fe)])&&O['push'](v<=h[C(0x1fe)]?!![]:C(0x209)+h[C(0x1fe)]);if(h[C(0x26c)]===C(0x234)){const l=(0x0,utils_1[C(0x25b)])(v);O['push'](l===![]||_[C(0x2bf)](l)?C(0x254):!![]);}const Z=O[C(0x242)](B=>B!==!![]),a=(h===null||h===void 0x0?void 0x0:h[C(0x2ad)])?'\x0a'+chalk_1[C(0x240)][C(0x253)]('>>')+C(0x2de)+chalk_1[C(0x240)][C(0x20a)](JSON[C(0x224)](h[C(0x2ad)])):'';return Z['length']>0x0?Z[C(0x26d)](chalk_1['default'][C(0x2eb)](C(0x231)))+a:!![];},this['getPathString']=(h,G,P)=>{const M=i,v=h[h[M(0x2b5)]-0x1];function O(){const Q=M;return h[Q(0x1fa)](0x0,-0x1)['map'](l=>l[Q(0x22a)](0x0)['toUpperCase']()+l[Q(0x1fa)](0x1))[Q(0x26d)]('>');}const Z=h[M(0x2b5)]>0x1?chalk_1[M(0x240)][M(0x22c)][M(0x20a)](O())+':\x20':'',a=P?'\x20('+chalk_1[M(0x240)][M(0x233)](P)+')':'';return chalk_1[M(0x240)][M(0x217)](''+Z+G+'\x20'+chalk_1['default'][M(0x25e)][M(0x2d4)](v)+a+'?');},this[i(0x237)]=(h,G,P)=>__awaiter(this,void 0x0,void 0x0,function*(){const H=i;if(G[H(0x2b5)]<0x1){const Z=P?H(0x24d)+P:H(0x2f0);throw new Error(H(0x20b)+h+'\x20'+Z+'.');}const v='Choose\x20the\x20'+h+H(0x247),O=G[H(0x2b5)]>0x4?H(0x20e):H(0x235);return(yield inquirer['prompt']([{'type':O,'name':H(0x268),'message':v,'choices':G}]))['name'];}),this[i(0x2d0)]=(h,G,P)=>__awaiter(this,void 0x0,void 0x0,function*(){const n=i,{elements:v,nextCursor:O}=yield G();if(v[n(0x2b5)]<0x1){const l=P?n(0x24d)+P:n(0x2f0);throw new Error(n(0x20b)+h+'\x20'+l+'.');}const Z=n(0x2c4)+h+'\x20to\x20use:';if(O!==undefined){const B=({nextPageCursor:U})=>__awaiter(this,void 0x0,void 0x0,function*(){const r=n,A=yield G(U);return{'elements':A[r(0x1f6)],'nextPageCursor':A['nextCursor']};});return(yield inquirer[n(0x2f3)]([{'type':n(0x29f),'name':'name','message':Z,'choices':v,'nextPageCursor':O,'loadMore':B}]))[n(0x268)];}const a=v['length']>0x4?'search-list':n(0x235);return(yield inquirer[n(0x2f3)]([{'type':a,'name':n(0x268),'message':Z,'choices':v}]))[n(0x268)];}),this[i(0x215)]=(h,G)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const j=i,P=''+(G?'('+chalk_1[j(0x240)]['blue'](G)+')\x20':''),v=j(0x265)+chalk_1[j(0x240)]['green'](h)+'\x20'+P+j(0x216),O=this[j(0x1f8)]({'type':j(0x21a),'required':!![]});return(yield inquirer[j(0x2f3)]([{'type':j(0x1f4),'name':j(0x268),'message':v,'validate':O}]))[j(0x268)];}),this['askConfirm']=h=>__awaiter(this,void 0x0,void 0x0,function*(){const m=i;return(yield inquirer['prompt']([{'type':m(0x21b),'name':m(0x268),'message':h,'default':!![]}]))[m(0x268)];}),this[i(0x1f5)]=h=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const E=i,G=P=>v=>__awaiter(this,void 0x0,void 0x0,function*(){const y=a8h;var O;const Z=yield this['apiClient'][y(0x235)][y(0x245)]({'parameters':{'projectId':P},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':v}}),a=Z[y(0x28a)][y(0x245)][y(0x243)](l=>l['id']);return{'elements':a,'nextCursor':(O=Z[y(0x204)])===null||O===void 0x0?void 0x0:O['cursor']};});return this[E(0x2c8)]('service',G,h);}),this[i(0x261)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const g=i,h=G=>__awaiter(this,void 0x0,void 0x0,function*(){const K=a8h;var P;const v=yield this[K(0x2f4)][K(0x235)][K(0x278)]({'options':{'per_page':this[K(0x2f5)],'cursor':G}}),O=v[K(0x28a)]['templates'][K(0x243)](Z=>Z['id']);return{'elements':O,'nextCursor':(P=v[K(0x204)])===null||P===void 0x0?void 0x0:P['cursor']};});return this[g(0x2d0)](g(0x2bc),h);}),this[i(0x218)]=h=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const J=i;if(_[J(0x259)](h))throw new Error(J(0x289));const G=P=>__awaiter(this,void 0x0,void 0x0,function*(){const R=J;var v;let O=this[R(0x2f5)];const Z=yield this[R(0x2f4)]['list'][R(0x1f7)]({'parameters':{'templateId':h},'options':{'per_page':O,'cursor':P}}),a=Z['data'][R(0x1f7)][R(0x243)](l=>l['id']+R(0x2ba)+l[R(0x24e)]+')');return{'elements':a,'nextCursor':(v=Z[R(0x204)])===null||v===void 0x0?void 0x0:v['cursor']};});return this[J(0x2d0)]('template\x20run',G)[J(0x2cc)](P=>P['split']('\x20')[0x0]);}),this['askForLogSink']=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const z=i,h=G=>__awaiter(this,void 0x0,void 0x0,function*(){const N=a8h;var P;let v=this[N(0x2f5)];const O=yield this['apiClient'][N(0x235)][N(0x2e5)]({'options':{'per_page':v,'cursor':G}}),Z=O[N(0x28a)][N(0x2e5)][N(0x243)](a=>a['id']);return{'elements':Z,'nextCursor':(P=O[N(0x204)])===null||P===void 0x0?void 0x0:P['cursor']};});return this[z(0x2d0)](z(0x260),h);}),this[i(0x2e1)]=h=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const o=i,G=P=>v=>__awaiter(this,void 0x0,void 0x0,function*(){const F=a8h;var O;const Z=yield this[F(0x2f4)][F(0x235)][F(0x2d7)]({'parameters':{'projectId':P},'options':{'per_page':this[F(0x2f5)],'cursor':v}}),a=Z[F(0x28a)]['pipelines'][F(0x243)](l=>l['id']);return{'elements':a,'nextCursor':(O=Z[F(0x204)])===null||O===void 0x0?void 0x0:O[F(0x2e2)]};});return this[o(0x2c8)]('pipeline',G,h);}),this[i(0x28f)]=h=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const d=i,G=P=>v=>__awaiter(this,void 0x0,void 0x0,function*(){const L=a8h;var O;const Z=yield this['apiClient']['list']['jobs']({'parameters':{'projectId':P},'options':{'per_page':this[L(0x2f5)],'cursor':v}}),a=Z['data'][L(0x29e)][L(0x243)](l=>l['id']);return{'elements':a,'nextCursor':(O=Z[L(0x204)])===null||O===void 0x0?void 0x0:O[L(0x2e2)]};});return this['askForProjectScopedResourcePaginated'](d(0x2c2),G,h);}),this['askForJobRun']=(h,G,P=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const w0=i,v=w0(0x22f),O=Z=>a=>__awaiter(this,void 0x0,void 0x0,function*(){const w1=w0;var l;const B=yield this[w1(0x2f4)][w1(0x2e7)][w1(0x2c2)][w1(0x227)]({'parameters':{'projectId':Z,'jobId':h},'options':{'per_page':this[w1(0x2f5)],'cursor':a}}),U=B[w1(0x28a)][w1(0x227)][w1(0x243)](A=>A['id']+w1(0x2ba)+A[w1(0x222)]+')');return P&&U['unshift'](v),{'elements':U,'nextCursor':(l=B[w1(0x204)])===null||l===void 0x0?void 0x0:l['cursor']};});return this[w0(0x2c8)](w0(0x2ae),O,G,'job:\x20\x27'+h+'\x27')[w0(0x2cc)](Z=>{const w2=w0,a=Z[w2(0x2a0)]('\x20')[0x0];if(a===v)return undefined;return a;});}),this[i(0x2cb)]=(h,G,P,v=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const w4=i,O='all-builds';if(P!==undefined){const Z=a=>l=>__awaiter(this,void 0x0,void 0x0,function*(){const w3=a8h;var B;const U=yield this['apiClient'][w3(0x2e7)][w3(0x2c2)][w3(0x2bb)]({'parameters':{'projectId':a,'jobId':P},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':l}}),A=U['data'][w3(0x2bb)][w3(0x243)](D=>D['id']+w3(0x2ba)+D[w3(0x24e)]+')');return v&&A[w3(0x2db)](O),{'elements':A,'nextCursor':(B=U[w3(0x204)])===null||B===void 0x0?void 0x0:B[w3(0x2e2)]};});return this[w4(0x2c8)](w4(0x1f0),Z,h,w4(0x297)+P+'\x27')[w4(0x2cc)](a=>{const w5=w4,l=a[w5(0x2a0)]('\x20')[0x0];if(l===O)return undefined;return l;});}if(G!==undefined){const a=l=>B=>__awaiter(this,void 0x0,void 0x0,function*(){const w6=w4;var U;const A=yield this['apiClient'][w6(0x2e7)][w6(0x28b)][w6(0x2bb)]({'parameters':{'projectId':l,'serviceId':G},'options':{'per_page':this[w6(0x2f5)],'cursor':B}}),D=A[w6(0x28a)][w6(0x2bb)][w6(0x243)](p=>p['id']+w6(0x2ba)+p['createdAt']+')');if(v)D[w6(0x2db)](O);return{'elements':D,'nextCursor':(U=A[w6(0x204)])===null||U===void 0x0?void 0x0:U[w6(0x2e2)]};});return this[w4(0x2c8)](w4(0x21d),a,h,'service:\x20\x27'+P+'\x27')[w4(0x2cc)](l=>{const w7=w4,B=l[w7(0x2a0)]('\x20')[0x0];if(B===O)return undefined;return B;});}throw new Error('No\x20builds\x20found');}),this[i(0x26b)]=(h,G,P,v=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const w8=i,O=w8(0x25c);if(P!==undefined){const Z=a=>l=>__awaiter(this,void 0x0,void 0x0,function*(){const w9=w8;var B,U;const A=yield this['apiClient'][w9(0x2e7)][w9(0x2c2)]['containers']({'parameters':{'projectId':a,'jobId':P},'options':{'per_page':this[w9(0x2f5)],'cursor':l}}),D=(B=A[w9(0x28a)][w9(0x22b)])!==null&&B!==void 0x0?B:[],p=D===null||D===void 0x0?void 0x0:D[w9(0x243)](s=>s[w9(0x268)]+'\x20(startedAt:\x20'+s[w9(0x24e)]+')');return v&&p['unshift'](O),{'elements':p,'nextCursor':(U=A['pagination'])===null||U===void 0x0?void 0x0:U['cursor']};});return this['askForProjectScopedResourcePaginated'](w8(0x239),Z,h,'job:\x20\x27'+P+'\x27')[w8(0x2cc)](a=>{const ww=w8,l=a[ww(0x2a0)]('\x20')[0x0];if(l===O)return undefined;return l;});}if(G!==undefined){const a=l=>B=>__awaiter(this,void 0x0,void 0x0,function*(){const wh=w8;var U,A;const D=yield this['apiClient'][wh(0x2e7)][wh(0x28b)]['containers']({'parameters':{'projectId':l,'serviceId':G},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':B}}),p=(U=D[wh(0x28a)][wh(0x22b)])!==null&&U!==void 0x0?U:[],s=p[wh(0x243)](W=>W[wh(0x268)]+wh(0x2ba)+W['createdAt']+')');if(v)s===null||s===void 0x0?void 0x0:s[wh(0x2db)](O);return{'elements':s,'nextCursor':(A=D[wh(0x204)])===null||A===void 0x0?void 0x0:A[wh(0x2e2)]};});return this[w8(0x2c8)](w8(0x203),a,h,w8(0x2f1)+P+'\x27')[w8(0x2cc)](l=>{const wG=w8,B=l[wG(0x2a0)]('\x20')[0x0];if(B===O)return undefined;return B;});}throw new Error(w8(0x25a));}),this[i(0x23f)]=h=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const wv=i,G=P=>v=>__awaiter(this,void 0x0,void 0x0,function*(){const wP=a8h;var O;const Z=yield this[wP(0x2f4)][wP(0x235)]['addons']({'parameters':{'projectId':P},'options':{'per_page':this[wP(0x2f5)],'cursor':v}});return{'elements':Z[wP(0x28a)][wP(0x223)][wP(0x243)](a=>a['id']),'nextCursor':(O=Z['pagination'])===null||O===void 0x0?void 0x0:O[wP(0x2e2)]};});return this['askForProjectScopedResourcePaginated'](wv(0x238),G,h);}),this[i(0x200)]=(h,G)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const P=v=>O=>__awaiter(this,void 0x0,void 0x0,function*(){const wO=a8h;var Z;const a=yield this[wO(0x2f4)]['get'][wO(0x238)][wO(0x2b3)]({'parameters':{'projectId':v,'addonId':G},'options':{'per_page':this[wO(0x2f5)],'cursor':O}});return{'elements':a[wO(0x28a)][wO(0x2b3)][wO(0x243)](l=>l['id']+wO(0x236)+(l[wO(0x2a3)]||wO(0x29d))+')'),'nextCursor':(Z=a[wO(0x204)])===null||Z===void 0x0?void 0x0:Z['cursor']};});return this['askForProjectScopedResourcePaginated']('backups',P,h,'addon:\x20\x27'+G+'\x27')['then'](v=>v['split']('\x20')[0x0]);}),this[i(0x24a)]=(h,G,P)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const wa=i,v=O=>Z=>__awaiter(this,void 0x0,void 0x0,function*(){const wZ=a8h;var a;const l=yield this[wZ(0x2f4)][wZ(0x2e7)][wZ(0x238)]['restores']({'parameters':{'projectId':O,'addonId':G,'backupId':P},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':Z}});return{'elements':l[wZ(0x28a)][wZ(0x2d8)][wZ(0x243)](B=>B['id']+wZ(0x236)+(B['completedAt']||'not\x20completed')+')'),'nextCursor':(a=l['pagination'])===null||a===void 0x0?void 0x0:a['cursor']};});return this[wa(0x2c8)](wa(0x23b),v,h,wa(0x248)+G+'\x27')['then'](O=>O[wa(0x2a0)]('\x20')[0x0]);}),this[i(0x2ed)]=h=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const G=P=>__awaiter(this,void 0x0,void 0x0,function*(){const wl=a8h;return(yield this['apiClient'][wl(0x235)]['volumes']({'parameters':{'projectId':P}}))[wl(0x28a)][wl(0x243)](v=>v['id']);});return this['askForProjectScopedResource']('volume',G,h);}),this[i(0x2be)]=h=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const wU=i,G=P=>v=>__awaiter(this,void 0x0,void 0x0,function*(){const wB=a8h;var O;const Z=yield this[wB(0x2f4)][wB(0x235)][wB(0x1f3)]({'parameters':{'projectId':P},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':v}});return{'elements':Z[wB(0x28a)][wB(0x1f3)][wB(0x243)](a=>a['id']),'nextCursor':(O=Z['pagination'])===null||O===void 0x0?void 0x0:O['cursor']};});return this[wU(0x2c8)](wU(0x220),G,h);}),this[i(0x291)]=h=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const wA=i,G=yield this[wA(0x2f4)][wA(0x2e7)]['domain']({'parameters':{'domain':h}}),P=G[wA(0x28a)][wA(0x2a2)][wA(0x243)](O=>O[wA(0x268)]+wA(0x276)+O[wA(0x292)]+')'),v=wA(0x27a)+h+')';return this['askForResource'](wA(0x2ec),P,v)[wA(0x2cc)](O=>O['split']('\x20')[0x0]);}),this[i(0x28e)]=h=>__awaiter(this,void 0x0,void 0x0,function*(){const wD=i;return(yield inquirer[wD(0x2f3)]([{'type':wD(0x21b),'name':'confirmation','message':chalk_1[wD(0x240)][wD(0x229)]('WARNING:\x20You\x20are\x20about\x20to\x20delete\x20'+(h||wD(0x2da))+wD(0x2b2)),'default':![]}]))[wD(0x23d)];}),this[i(0x251)]=(h,G)=>__awaiter(this,void 0x0,void 0x0,function*(){const wp=i;_[wp(0x259)](h[wp(0x268)])&&(G['length']<=0x0?_[wp(0x2b4)](h,wp(0x268),wp(0x240)):yield(0x0,utils_1['retry'])(0xa)(()=>__awaiter(this,void 0x0,void 0x0,function*(){const ws=wp,{name:P}=yield inquirer[ws(0x2f3)]([{'type':ws(0x1f4),'name':ws(0x268),'message':'Choose\x20the\x20name\x20of\x20the\x20new\x20local\x20context:','default':ws(0x27d)}]);if(!h[ws(0x21e)]&&G[ws(0x250)](v=>v[ws(0x268)]===P)){const {c:v}=yield inquirer[ws(0x2f3)]([{'type':'confirm','name':'c','message':ws(0x20d)+P+ws(0x28c),'default':![]}]);if(v===![])throw new Error('Context\x20name\x20already\x20exists.');_['set'](h,ws(0x21e),!![]);}_[ws(0x2b4)](h,'name',P);})));if(_[wp(0x259)](h[wp(0x299)])){const P=yield this[wp(0x2b8)]();_[wp(0x2b4)](h,'token',P);}return h;}),this['tokenPrompt']=()=>__awaiter(this,void 0x0,void 0x0,function*(){const wW=i,{token:h}=yield inquirer[wW(0x2f3)]([{'type':wW(0x29b),'name':wW(0x299),'mask':'*','message':wW(0x282)}]);return h;}),inquirer[i(0x2c5)]('search-list',inquirerSearchList),inquirer[i(0x2c5)](i(0x29f),inquirer_pagination_prompt_1['DynamicReloadPaginationPrompt']);}[a8T(0x2b0)](w,h){return __awaiter(this,void 0x0,void 0x0,function*(){const wX=a8h,G=yaml[wX(0x298)](w),P=_[wX(0x2bd)](G[wX(0x2a0)]('\x0a')['map'](Z=>Z['length'])),v=chalk_1[wX(0x240)]['grey']('-'[wX(0x2df)](P)+'\x0a'),{confirm:O}=yield inquirer['prompt']([{'type':wX(0x235),'name':wX(0x21b),'message':''+chalk_1['default'][wX(0x25e)][wX(0x26e)](wX(0x269))+v+chalk_1[wX(0x240)][wX(0x1fc)](G)+v,'choices':Object[wX(0x244)](ConfirmChoices)}]);switch(O){case ConfirmChoices['YES']:return w;case ConfirmChoices[wX(0x1f1)]:throw new Error(wX(0x2ee));case ConfirmChoices[wX(0x257)]:return this['retrievePayloadViaInteractiveCli'](h);case ConfirmChoices['EDIT']:return this[wX(0x2b0)](yield this[wX(0x249)](w),h);case ConfirmChoices[wX(0x29a)]:yield this['saveFile'](w);return this[wX(0x2b0)](w,h);default:throw new Error(wX(0x2a8));}});}[a8T(0x275)](w,h){return __awaiter(this,void 0x0,void 0x0,function*(){const wT=a8h;if((h===null||h===void 0x0?void 0x0:h[wT(0x2c9)])!==undefined)this[wT(0x2c9)]=h===null||h===void 0x0?void 0x0:h['resultCache'];this[wT(0x21c)]=h===null||h===void 0x0?void 0x0:h['cmdPath'];const G={};return yield this[wT(0x230)]([],w[wT(0x2d5)][wT(0x20f)],G),this[wT(0x2c9)]=G,yield this['confirmationPrompt'](G,w);});}[a8T(0x230)](w,h,G,P){return __awaiter(this,void 0x0,void 0x0,function*(){const wI=a8h;let v;if(h[wI(0x2a1)]&&!_[wI(0x27e)](h,wI(0x225))){if(h[wI(0x2a1)][wI(0x2b5)]>0x1){const {choice:O}=yield inquirer[wI(0x2f3)]([{'type':'list','name':wI(0x2cd),'message':wI(0x27f)+(w[w[wI(0x2b5)]-0x1]||'')+wI(0x22e),'choices':h[wI(0x2a1)]['map'](Z=>{const wk=wI;var a;return(a=Z[wk(0x27b)])!==null&&a!==void 0x0?a:'??';})}]);v=yield this[wI(0x2c3)](w,h[wI(0x2a1)][wI(0x250)](Z=>Z[wI(0x27b)]===O),G,P);}else{const Z=h[wI(0x2a1)][0x0];_['set'](Z,wI(0x27b),h[wI(0x27b)]),v=yield this[wI(0x2c3)](w,Z,G,P);}v={};}else v=yield this[wI(0x2c3)](w,h,G,P);return v;});}['getInnerType'](w,h,G,P){var v;return __awaiter(this,void 0x0,void 0x0,function*(){const wY=a8h;if(P===![]){const {addEntry:a}=yield inquirer[wY(0x2f3)]([{'type':wY(0x21b),'name':'addEntry','message':this[wY(0x1f2)](h,wY(0x2b6),w===null||w===void 0x0?void 0x0:w[wY(0x27b)]),'default':![]}]);if(!a)return G;}const O=Object[wY(0x25f)]((v=w===null||w===void 0x0?void 0x0:w[wY(0x225)])!==null&&v!==void 0x0?v:[]),Z=w['required']||[];if(O[wY(0x2b5)]>0x0)for(const l of O){const B=h[wY(0x2ea)](l);if(h['length']>0x0&&!_[wY(0x27e)](G,h[wY(0x26d)]('.')))_[wY(0x2b4)](G,h[wY(0x26d)]('.'),{});yield this['propToType'](B,w['properties'][l],G,Z[wY(0x2e0)](l));}else yield this[wY(0x2c3)](h,Object['assign'](Object['assign']({},w),{'type':wY(0x234)}),G,P);return G;});}[a8T(0x287)](w,h,G,P){return __awaiter(this,void 0x0,void 0x0,function*(){const wx=a8h;if(h&&G)return!![];const v=h?wx(0x2b6):wx(0x258),{addEntry:O}=yield inquirer['prompt']([{'type':'confirm','name':wx(0x295),'message':this[wx(0x1f2)](w,v,h?P:undefined),'default':![]}]);return O;});}[a8T(0x2c3)](w,h,G,P){return __awaiter(this,void 0x0,void 0x0,function*(){const wb=a8h;let v;const O=w[wb(0x26d)]('.');switch(h===null||h===void 0x0?void 0x0:h[wb(0x26c)]){case wb(0x266):{let Z=!![];while(yield this[wb(0x287)](w,Z,P,h===null||h===void 0x0?void 0x0:h['description'])){const a=_[wb(0x2e7)](G,O);_[wb(0x267)](G,O),yield this['getType'](w,h[wb(0x2e6)],G);const l=_['get'](G,O);!_['isArray'](a)?_[wb(0x2b4)](G,O,[l]):(a[wb(0x25d)](l),_[wb(0x2b4)](G,O,a)),Z=![];}return v||[];}case wb(0x226):{return v=yield this[wb(0x2c7)](h,w,G,P),v;}case wb(0x234):v=(0x0,utils_1[wb(0x25b)])(yield this[wb(0x202)](w,h,P))||undefined;break;case wb(0x21a):case wb(0x2c1):case wb(0x2dc):default:v=yield this[wb(0x202)](w,h,P,G);break;}return!_['isUndefined'](v)&&_['set'](G,O,v),v;});}[a8T(0x202)](w,h,G,P){var v;return __awaiter(this,void 0x0,void 0x0,function*(){const wq=a8h,O=w[w['length']-0x1],{defaultValue:defaultValue=(v=h===null||h===void 0x0?void 0x0:h[wq(0x2ad)])!==null&&v!==void 0x0?v:h===null||h===void 0x0?void 0x0:h['default'],choices:choices=h===null||h===void 0x0?void 0x0:h['enum'],pagination:Z}=yield(0x0,api_helpers_1[wq(0x296)])(O,this[wq(0x2f4)],this[wq(0x21c)],P,this['pathVars'],w);let a=wq(0x1f4);if(!_[wq(0x259)](choices)&&choices['length']>0x0){if(Z!==undefined&&Z['nextPageCursor']!==undefined)a='pagination-prompt';else choices[wq(0x2b5)]>0x4&&typeof choices[0x0]===wq(0x21a)?a=wq(0x20e):a=wq(0x235);}else{if((h===null||h===void 0x0?void 0x0:h[wq(0x26c)])===wq(0x2c1))a=wq(0x21b);else{if((h===null||h===void 0x0?void 0x0:h['type'])===wq(0x2dc))a='input';else(h===null||h===void 0x0?void 0x0:h[wq(0x26c)])===wq(0x234)&&(a=wq(0x2cf));}}let l=G!==![]?!_[wq(0x2ca)](defaultValue)?defaultValue:JSON[wq(0x224)](defaultValue):_[wq(0x281)](defaultValue)?defaultValue:'don\x27t\x20change';if(choices)l=l['toString']();_[wq(0x27e)](this[wq(0x2c9)],w['join']('.'))&&(l=this[wq(0x2c9)][w[wq(0x26d)]('.')]);const B=choices&&G===![]?[wq(0x2d9),...choices]:choices,U=(h===null||h===void 0x0?void 0x0:h['type'])==='integer',A=Object[wq(0x272)]({'type':a,'name':'id','message':this['getQuestionString'](w,h),'choices':B,'default':l,'filter':this[wq(0x242)](a,G),'validate':this['validate'](h,G,U)},Z),D=(yield inquirer[wq(0x2f3)]([A]))['id'];if(D===wq(0x2d9)||D==='')return undefined;if(U)return parseInt(D,0xa);return D;});}['getQuestionString'](w,h){const wf=a8T,G=(h===null||h===void 0x0?void 0x0:h[wf(0x26c)])!==wf(0x2c1)?'What\x20do\x20you\x20want\x20to\x20use\x20as':wf(0x285);return this[wf(0x1f2)](w,G,h===null||h===void 0x0?void 0x0:h[wf(0x27b)]);}[a8T(0x2a6)](){return __awaiter(this,void 0x0,void 0x0,function*(){const wi=a8h,w=h=>__awaiter(this,void 0x0,void 0x0,function*(){const we=a8h;var G;const P=yield this[we(0x2f4)]['list'][we(0x280)]({'options':{'per_page':this[we(0x2f5)],'cursor':h}}),v=P[we(0x28a)][we(0x280)][we(0x243)](O=>O['id']);return{'elements':v,'nextCursor':(G=P[we(0x204)])===null||G===void 0x0?void 0x0:G[we(0x2e2)]};});return yield this[wi(0x2d0)](wi(0x2e9),w);});}['askForProjectScopedResource'](w,h,G,P){return __awaiter(this,void 0x0,void 0x0,function*(){const wu=a8h,v=G||this[wu(0x2f4)]['contextProvider'][wu(0x205)]();if(_['isUndefined'](v))throw new Error('Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.');const O=yield h(v);return yield this[wu(0x237)](w,O,(P?P+wu(0x26a):'')+'project:\x20\x27'+v+'\x27');});}['askForProjectScopedResourcePaginated'](w,h,G,P){return __awaiter(this,void 0x0,void 0x0,function*(){const wt=a8h,v=G||this['apiClient'][wt(0x206)][wt(0x205)]();if(_[wt(0x259)](v))throw new Error('Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.');const O=yield h(v);return yield this[wt(0x2d0)](w,O,(P?P+'\x20in\x20':'')+wt(0x256)+v+'\x27');});}[a8T(0x271)](){return __awaiter(this,void 0x0,void 0x0,function*(){const wV=a8h,w=h=>__awaiter(this,void 0x0,void 0x0,function*(){const wS=a8h;var G;const P=yield this[wS(0x2f4)][wS(0x235)][wS(0x283)]({'options':{'per_page':this[wS(0x2f5)],'cursor':h}});return{'elements':P[wS(0x28a)][wS(0x283)]['map'](v=>v[wS(0x268)]),'nextCursor':(G=P[wS(0x204)])===null||G===void 0x0?void 0x0:G[wS(0x2e2)]};});return this[wV(0x2d0)]('domain',w);});}[a8T(0x23c)](){return __awaiter(this,void 0x0,void 0x0,function*(){const wM=a8h,w=h=>__awaiter(this,void 0x0,void 0x0,function*(){const wC=a8h;var G;const P=yield this[wC(0x2f4)][wC(0x235)][wC(0x274)]({'options':{'per_page':this[wC(0x2f5)],'cursor':h}});return{'elements':P[wC(0x28a)][wC(0x2d2)][wC(0x243)](v=>v['id']),'nextCursor':(G=P[wC(0x204)])===null||G===void 0x0?void 0x0:G[wC(0x2e2)]};});return this[wM(0x2d0)](wM(0x2d2),w);});}[a8T(0x26f)](w){const wQ=a8T;this[wQ(0x2a7)]=w;}}exports[a8T(0x1f9)]=InquirerHelper;
|
|
1
|
+
'use strict';const a8x=a8I;(function(A,I){const e=a8I,a=A();while(!![]){try{const d=-parseInt(e(0x129))/0x1*(parseInt(e(0x1bf))/0x2)+-parseInt(e(0x14b))/0x3*(-parseInt(e(0x179))/0x4)+parseInt(e(0x187))/0x5*(parseInt(e(0x130))/0x6)+-parseInt(e(0x138))/0x7*(parseInt(e(0xd6))/0x8)+parseInt(e(0x1a6))/0x9*(parseInt(e(0x19b))/0xa)+parseInt(e(0x134))/0xb*(-parseInt(e(0xe4))/0xc)+parseInt(e(0x1b5))/0xd;if(d===I)break;else a['push'](a['shift']());}catch(s){a['push'](a['shift']());}}}(a8A,0x22b39));var __createBinding=this&&this[a8x(0x12e)]||(Object[a8x(0x141)]?function(A,I,a,d){const o=a8x;if(d===undefined)d=a;var s=Object[o(0x128)](I,a);(!s||(o(0x183)in s?!I[o(0x190)]:s[o(0x19c)]||s['configurable']))&&(s={'enumerable':!![],'get':function(){return I[a];}}),Object[o(0x155)](A,d,s);}:function(A,I,a,d){if(d===undefined)d=a;A[d]=I[a];}),__setModuleDefault=this&&this[a8x(0x111)]||(Object['create']?function(A,I){const M=a8x;Object[M(0x155)](A,M(0x14a),{'enumerable':!![],'value':I});}:function(A,I){const N=a8x;A[N(0x14a)]=I;}),__importStar=this&&this[a8x(0x13d)]||function(A){const q=a8x;if(A&&A[q(0x190)])return A;var I={};if(A!=null){for(var a in A)if(a!==q(0x14a)&&Object['prototype'][q(0x17f)][q(0x1c4)](A,a))__createBinding(I,A,a);}return __setModuleDefault(I,A),I;},__awaiter=this&&this[a8x(0x102)]||function(A,I,a,d){function s(T){return T instanceof a?T:new a(function(V){V(T);});}return new(a||(a=Promise))(function(T,V){const l=a8I;function g(f){const K=a8I;try{L(d[K(0x15a)](f));}catch(t){V(t);}}function u(f){const y=a8I;try{L(d[y(0x11b)](f));}catch(t){V(t);}}function L(f){const D=a8I;f[D(0x1ce)]?T(f['value']):s(f[D(0x11d)])['then'](g,u);}L((d=d[l(0xe3)](A,I||[]))[l(0x15a)]());});},__importDefault=this&&this[a8x(0xd1)]||function(A){const n=a8x;return A&&A[n(0x190)]?A:{'default':A};};function a8I(A,I){const a=a8A();return a8I=function(d,s){d=d-0xd1;let T=a[d];return T;},a8I(A,I);}Object[a8x(0x155)](exports,a8x(0x190),{'value':!![]}),exports[a8x(0x114)]=void 0x0;function a8A(){const AZ=['must\x20be\x20a\x20number,\x20is\x20','object','token','apply','750660yEEIqr','unshift','length','required','maxLength','input','retrievePayloadViaInteractiveCli','\x20and\x20it\x20','secrets','./pagination/inquirer-pagination-prompt','askForTemplate','isEmpty','pagination-prompt','domains','elements','Choose\x20the\x20name\x20of\x20the\x20new\x20local\x20context:','pop','Provide\x20a\x20file\x20path\x20to\x20write\x20the\x20configuration\x20to\x20(<name>.[json|yaml|yml])','log\x20sink','contextProvider','name','split','confirm','prompt','Do\x20you\x20want\x20to\x20add\x20more','startedAt','lodash','addon:\x20\x27','service','tokenPrompt','__awaiter','credentials','projects','stringify','fullName','domain','Context\x20name\x20already\x20exists.','confirmationPrompt','green','maximum','map','pathVars','jobs','blueBright','not\x20completed','__setModuleDefault','max','this\x20option\x20is\x20required,\x20please\x20answer','InquirerHelper','containers','\x20in\x20','Go\x20to\x20editor','includes','templateRuns','isValidJSON','throw','bold','value','minimum','yml','writeFileSync','No\x20builds\x20found','askForProjectScopedResourcePaginated','all-builds','registryCredentials','editPayload','cursor','values','getOwnPropertyDescriptor','79lPquIf','editor','filter','safeDump','getInnerType','__createBinding','\x27\x20already\x20exists.\x20Do\x20you\x20want\x20to\x20override\x20this\x20context\x20(y)\x20or\x20enter\x20a\x20new\x20name\x20(N)?','636jWVsBT','restores','password','askForContainer','33QODDdB','must\x20be\x20a\x20valid\x20non-empty\x20json\x20string','No,\x20repeat','subdomain','476LaciIe','\x20characters,\x20is\x20','isObject','boolean','don\x27t\x20change','__importStar','template\x20run','addEntry','main-context','create','assign','safeLoad','registerPrompt','must\x20be\x20longer\x20than\x20or\x20equal\x20to\x20','whiteBright','a\x20Northflank\x20resource','What\x20do\x20you\x20want\x20to\x20use\x20as','No,\x20but\x20save\x20as\x20file','default','19941WIJEsR','.\x20This\x20is\x20irreversible.\x20Please\x20confirm!','askForProjectScopedResource','charAt','tmpCmdPath','No,\x20edit','SAVE','body','message','templates','defineProperty','fileName','pagination','underline','reset','next','then','list','set','setPathVars','choice','integer','data',',\x20supported\x20types:\x20[json|yaml|yml]','override','pattern','Please\x20confirm\x20following\x20configuration:\x0a','askGeneric','askConfirm','nextCursor','getType','\x20(completedAt:\x20','description','service:\x20\x27','askForSubdomain','askForVolume','properties','string','service\x20containers','builds','isArray','propToType','askForPipeline','yaml','EDIT','blue','60wyqVhw','job\x20runs','yellowBright','array','YES','completedAt','hasOwnProperty','items','saveFile','search-list','get','addons','red','apiClient','3415qSrdRt','json','cmdPath','getCurrentProjectName','volume','Do\x20you\x20want\x20to\x20add','askForTemplateRun','example','toUpperCase','__esModule','askForProject','inquirer-search-list','type','defaultPaginationPageSize','Aborted.','Choose\x20the\x20login\x20token:','addon','must\x20be\x20bigger\x20than\x20or\x20equal\x20to\x20','getQuestionString','join','7690jGERVG','writable','restore','rawObject','askForService','ask','must\x20be\x20shorter\x20than\x20or\x20equal\x20to\x20','\x20type?','WARNING:\x20You\x20are\x20about\x20to\x20delete\x20','job\x20builds','askForResource','2538TJoYDc','Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.','greenBright','push','Should\x20it\x20be','unset','all-containers','template','REPEAT','job:\x20\x27','fetchResourceList','enum','retry','warning','keys','5130619HTGHTM','oneOf','\x20characters','\x20Example:\x20','Configuration\x20file\x20written\x20to\x20','resultCache','askArrayEntry','./utils','slice','isNaN','6044fzuXjc','to\x20use:','pipelines','find','js-yaml','call','confirmation','getPathString','ABORT','project','What\x27s\x20the\x20','askForAddonBackup','isBoolean','success','trim','done','has','secret','\x20(startedAt:\x20','__importDefault','services','Enter\x20the\x20','isUndefined','editedResult','25304RVNppI','createdAt','backups','deleteWarningPrompt','volumes','toString','askForResourcePaginated','repeat','minLength','job'];a8A=function(){return AZ;};return a8A();}const _=__importStar(require(a8x(0xfe))),chalk_1=__importDefault(require('chalk')),fs=__importStar(require('fs')),utils_1=require(a8x(0x1bc)),api_helpers_1=require('./api-helpers'),inquirer_pagination_prompt_1=require(a8x(0xed)),inquirer=require('inquirer'),inquirerSearchList=require(a8x(0x192)),yaml=require(a8x(0x1c3));var ConfirmChoices;(function(A){const v=a8x;A[v(0x17d)]='Yes,\x20send',A[v(0x1ae)]=v(0x136),A[v(0x177)]=v(0x150),A[v(0x151)]=v(0x149),A[v(0x1c7)]='No,\x20abort';}(ConfirmChoices||(ConfirmChoices={})));class InquirerHelper{constructor(A){const X=a8x;this[X(0x186)]=A,this[X(0x194)]=0x32,this[X(0x125)]=I=>__awaiter(this,void 0x0,void 0x0,function*(){const Q=X,{editedResult:a}=yield inquirer[Q(0xfb)]([{'type':Q(0x12a),'name':Q(0xd5),'message':Q(0x117),'default':yaml[Q(0x12c)](I)}]);return yaml[Q(0x143)](a);}),this[X(0x181)]=I=>__awaiter(this,void 0x0,void 0x0,function*(){const O=X,a=V=>'Unexpected\x20file\x20type:\x20'+V+O(0x162);function d(){return __awaiter(this,void 0x0,void 0x0,function*(){const p=a8I;return inquirer['prompt']([{'type':p(0xe9),'name':p(0x156),'message':p(0xf5),'validate':V=>new RegExp('.*\x5c.(json|yaml|yml)$')['test'](V)?!![]:a(V)}]);});}const {fileName:s}=yield d(),T=s[O(0xdb)]()[O(0xf9)]('.')[O(0xf4)]();try{switch(T){case O(0x188):(0x0,utils_1[O(0x1cc)])(O(0x1b9)+s);return fs[O(0x120)](s,JSON[O(0x105)](I,null,'\x20\x20'));case O(0x176):case O(0x11f):(0x0,utils_1[O(0x1cc)])(O(0x1b9)+s);return fs['writeFileSync'](s,yaml['safeDump'](I));default:(0x0,utils_1['warning'])(a(T));}}catch(V){(0x0,utils_1[O(0x1b3)])('Writing\x20configuration\x20failed:\x20'+V[O(0x153)]);}return undefined;}),this[X(0x12b)]=(I,a)=>d=>{const r=X,s=typeof d===r(0x170)?d[r(0x1cd)]():d;return a===![]&&s==='don\x27t\x20change'?'':s;},this['validate']=(I,a,d)=>s=>{const H=X,T=[];if(s===''||s===H(0x13c)){if(a!==![])T[H(0x1a9)](H(0x113));else return!![];}I[H(0x193)]===H(0x170)&&!_[H(0xd4)](I[H(0x164)])&&T[H(0x1a9)](new RegExp(I[H(0x164)])['test'](s)?!![]:'doesn\x27t\x20match\x20pattern\x20\x27'+I[H(0x164)]+'\x27');I[H(0x193)]===H(0x170)&&!_[H(0xd4)](I[H(0xde)])&&T[H(0x1a9)](s[H(0xe6)]>=I[H(0xde)]?!![]:H(0x145)+I[H(0xde)]+H(0x139)+s[H(0xe6)]+H(0x1b7));I[H(0x193)]===H(0x170)&&!_['isUndefined'](I['maxLength'])&&T[H(0x1a9)](s[H(0xe6)]<=I[H(0xe8)]?!![]:H(0x1a1)+I[H(0xe8)]+H(0x139)+s[H(0xe6)]+H(0x1b7));d&&Number[H(0x1be)](parseInt(s,0xa))&&T['push'](H(0xe0)+s);I[H(0x193)]===H(0x160)&&!_['isUndefined'](I['minimum'])&&T[H(0x1a9)](s>=I[H(0x11e)]?!![]:H(0x198)+I[H(0x11e)]);I[H(0x193)]===H(0x160)&&!_['isUndefined'](I['maximum'])&&T[H(0x1a9)](s<=I[H(0x10b)]?!![]:'must\x20be\x20smaller\x20than\x20or\x20equal\x20to\x20'+I[H(0x10b)]);if(I[H(0x193)]===H(0x19e)){const u=(0x0,utils_1[H(0x11a)])(s);T['push'](u===![]||_[H(0xef)](u)?H(0x135):!![]);}const V=T[H(0x12b)](L=>L!==!![]),g=(I===null||I===void 0x0?void 0x0:I['example'])?'\x0a'+chalk_1['default'][H(0x185)]('>>')+H(0x1b8)+chalk_1[H(0x14a)][H(0x146)](JSON[H(0x105)](I[H(0x18e)])):'';return V[H(0xe6)]>0x0?V['join'](chalk_1[H(0x14a)][H(0x158)](H(0xeb)))+g:!![];},this[X(0x1c6)]=(I,a,d)=>{const R=X,s=I[I['length']-0x1];function T(){const P=a8I;return I['slice'](0x0,-0x1)['map'](u=>u[P(0x14e)](0x0)[P(0x18f)]()+u[P(0x1bd)](0x1))[P(0x19a)]('>');}const V=I[R(0xe6)]>0x1?chalk_1['default']['bgGrey']['whiteBright'](T())+':\x20':'',g=d?'\x20('+chalk_1[R(0x14a)][R(0x178)](d)+')':'';return chalk_1[R(0x14a)][R(0x159)](''+V+a+'\x20'+chalk_1[R(0x14a)]['bold'][R(0x1a8)](s)+g+'?');},this[X(0x1a5)]=(I,a,d)=>__awaiter(this,void 0x0,void 0x0,function*(){const Z=X;if(a[Z(0xe6)]<0x1){const V=d?'for\x20this\x20'+d:'found';throw new Error('No\x20'+I+'\x20'+V+'.');}const s='Choose\x20the\x20'+I+'\x20to\x20use:',T=a[Z(0xe6)]>0x4?'search-list':'list';return(yield inquirer[Z(0xfb)]([{'type':T,'name':Z(0xf8),'message':s,'choices':a}]))[Z(0xf8)];}),this[X(0xdc)]=(I,a,d)=>__awaiter(this,void 0x0,void 0x0,function*(){const B=X,{elements:s,nextCursor:T}=yield a();if(s[B(0xe6)]<0x1){const u=d?'for\x20this\x20'+d:'found';throw new Error('No\x20'+I+'\x20'+u+'.');}const V='Choose\x20the\x20'+I+'\x20to\x20use:';if(T!==undefined){const L=({nextPageCursor:f})=>__awaiter(this,void 0x0,void 0x0,function*(){const E=B,t=yield a(f);return{'elements':t[E(0xf2)],'nextPageCursor':t[E(0x168)]};});return(yield inquirer['prompt']([{'type':B(0xf0),'name':B(0xf8),'message':V,'choices':s,'nextPageCursor':T,'loadMore':L}]))[B(0xf8)];}const g=s[B(0xe6)]>0x4?B(0x182):'list';return(yield inquirer['prompt']([{'type':g,'name':B(0xf8),'message':V,'choices':s}]))[B(0xf8)];}),this[X(0x166)]=(I,a)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const J=X,d=''+(a?'('+chalk_1[J(0x14a)][J(0x178)](a)+')\x20':''),s=J(0xd3)+chalk_1[J(0x14a)]['green'](I)+'\x20'+d+J(0x1c0),T=this['validate']({'type':J(0x170),'required':!![]});return(yield inquirer[J(0xfb)]([{'type':J(0xe9),'name':J(0xf8),'message':s,'validate':T}]))['name'];}),this[X(0x167)]=I=>__awaiter(this,void 0x0,void 0x0,function*(){const b=X;return(yield inquirer['prompt']([{'type':b(0xfa),'name':b(0xf8),'message':I,'default':!![]}]))[b(0xf8)];}),this[X(0x19f)]=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const F=X,a=d=>s=>__awaiter(this,void 0x0,void 0x0,function*(){const Y=a8I;var T;const V=yield this['apiClient'][Y(0x15c)][Y(0xd2)]({'parameters':{'projectId':d},'options':{'per_page':this[Y(0x194)],'cursor':s}}),g=V['data'][Y(0xd2)][Y(0x10c)](u=>u['id']);return{'elements':g,'nextCursor':(T=V[Y(0x157)])===null||T===void 0x0?void 0x0:T[Y(0x126)]};});return this[F(0x122)](F(0x100),a,I);}),this[X(0xee)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const C=X,I=a=>__awaiter(this,void 0x0,void 0x0,function*(){const W=a8I;var d;const s=yield this[W(0x186)][W(0x15c)][W(0x154)]({'options':{'per_page':this['defaultPaginationPageSize'],'cursor':a}}),T=s[W(0x161)][W(0x154)]['map'](V=>V['id']);return{'elements':T,'nextCursor':(d=s[W(0x157)])===null||d===void 0x0?void 0x0:d[W(0x126)]};});return this['askForResourcePaginated'](C(0x1ad),I);}),this[X(0x18d)]=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const G=X;if(_[G(0xd4)](I))throw new Error('Template\x20id\x20not\x20provided.');const a=d=>__awaiter(this,void 0x0,void 0x0,function*(){const j=G;var s;let T=this[j(0x194)];const V=yield this[j(0x186)][j(0x15c)][j(0x119)]({'parameters':{'templateId':I},'options':{'per_page':T,'cursor':d}}),g=V[j(0x161)][j(0x119)][j(0x10c)](u=>u['id']+'\x20(startedAt:\x20'+u['createdAt']+')');return{'elements':g,'nextCursor':(s=V[j(0x157)])===null||s===void 0x0?void 0x0:s['cursor']};});return this[G(0xdc)](G(0x13e),a)[G(0x15b)](d=>d[G(0xf9)]('\x20')[0x0]);}),this['askForLogSink']=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const h=X,I=a=>__awaiter(this,void 0x0,void 0x0,function*(){const z=a8I;var d;let s=this['defaultPaginationPageSize'];const T=yield this[z(0x186)][z(0x15c)]['logSinks']({'options':{'per_page':s,'cursor':a}}),V=T['data']['logSinks'][z(0x10c)](g=>g['id']);return{'elements':V,'nextCursor':(d=T[z(0x157)])===null||d===void 0x0?void 0x0:d[z(0x126)]};});return this[h(0xdc)](h(0xf6),I);}),this[X(0x175)]=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const i=X,a=d=>s=>__awaiter(this,void 0x0,void 0x0,function*(){const w=a8I;var T;const V=yield this[w(0x186)][w(0x15c)][w(0x1c1)]({'parameters':{'projectId':d},'options':{'per_page':this[w(0x194)],'cursor':s}}),g=V['data'][w(0x1c1)][w(0x10c)](u=>u['id']);return{'elements':g,'nextCursor':(T=V[w(0x157)])===null||T===void 0x0?void 0x0:T['cursor']};});return this[i(0x122)]('pipeline',a,I);}),this['askForJob']=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const A1=X,a=d=>s=>__awaiter(this,void 0x0,void 0x0,function*(){const A0=a8I;var T;const V=yield this[A0(0x186)][A0(0x15c)][A0(0x10e)]({'parameters':{'projectId':d},'options':{'per_page':this[A0(0x194)],'cursor':s}}),g=V['data'][A0(0x10e)]['map'](u=>u['id']);return{'elements':g,'nextCursor':(T=V['pagination'])===null||T===void 0x0?void 0x0:T[A0(0x126)]};});return this[A1(0x122)]('job',a,I);}),this['askForJobRun']=(I,a,d=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const A3=X,s='all-job-runs',T=V=>g=>__awaiter(this,void 0x0,void 0x0,function*(){const A2=a8I;var u;const L=yield this[A2(0x186)][A2(0x183)][A2(0xdf)]['runs']({'parameters':{'projectId':V,'jobId':I},'options':{'per_page':this[A2(0x194)],'cursor':g}}),f=L['data']['runs'][A2(0x10c)](t=>t['id']+A2(0x1d1)+t[A2(0xfd)]+')');return d&&f[A2(0xe5)](s),{'elements':f,'nextCursor':(u=L['pagination'])===null||u===void 0x0?void 0x0:u[A2(0x126)]};});return this[A3(0x122)](A3(0x17a),T,a,A3(0x1af)+I+'\x27')[A3(0x15b)](V=>{const A4=A3,g=V[A4(0xf9)]('\x20')[0x0];if(g===s)return undefined;return g;});}),this['askForBuild']=(I,a,d,s=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const A5=X,T=A5(0x123);if(d!==undefined){const V=g=>u=>__awaiter(this,void 0x0,void 0x0,function*(){const A6=A5;var L;const f=yield this[A6(0x186)][A6(0x183)][A6(0xdf)]['builds']({'parameters':{'projectId':g,'jobId':d},'options':{'per_page':this[A6(0x194)],'cursor':u}}),t=f['data'][A6(0x172)][A6(0x10c)](m=>m['id']+A6(0x1d1)+m[A6(0xd7)]+')');return s&&t[A6(0xe5)](T),{'elements':t,'nextCursor':(L=f[A6(0x157)])===null||L===void 0x0?void 0x0:L[A6(0x126)]};});return this[A5(0x122)](A5(0x1a4),V,I,'job:\x20\x27'+d+'\x27')[A5(0x15b)](g=>{const A7=A5,u=g[A7(0xf9)]('\x20')[0x0];if(u===T)return undefined;return u;});}if(a!==undefined){const g=u=>L=>__awaiter(this,void 0x0,void 0x0,function*(){const A8=A5;var f;const t=yield this[A8(0x186)][A8(0x183)][A8(0x100)]['builds']({'parameters':{'projectId':u,'serviceId':a},'options':{'per_page':this[A8(0x194)],'cursor':L}}),m=t[A8(0x161)]['builds'][A8(0x10c)](U=>U['id']+A8(0x1d1)+U[A8(0xd7)]+')');if(s)m[A8(0xe5)](T);return{'elements':m,'nextCursor':(f=t[A8(0x157)])===null||f===void 0x0?void 0x0:f[A8(0x126)]};});return this[A5(0x122)]('service\x20build',g,I,A5(0x16c)+d+'\x27')[A5(0x15b)](u=>{const L=u['split']('\x20')[0x0];if(L===T)return undefined;return L;});}throw new Error(A5(0x121));}),this[X(0x133)]=(I,a,d,s=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const A9=X,T=A9(0x1ac);if(d!==undefined){const V=g=>u=>__awaiter(this,void 0x0,void 0x0,function*(){const AA=A9;var L,f;const t=yield this[AA(0x186)][AA(0x183)][AA(0xdf)][AA(0x115)]({'parameters':{'projectId':g,'jobId':d},'options':{'per_page':this[AA(0x194)],'cursor':u}}),m=(L=t[AA(0x161)]['containers'])!==null&&L!==void 0x0?L:[],U=m===null||m===void 0x0?void 0x0:m[AA(0x10c)](S=>S[AA(0xf8)]+AA(0x1d1)+S[AA(0xd7)]+')');return s&&U[AA(0xe5)](T),{'elements':U,'nextCursor':(f=t['pagination'])===null||f===void 0x0?void 0x0:f[AA(0x126)]};});return this['askForProjectScopedResourcePaginated']('job\x20containers',V,I,'job:\x20\x27'+d+'\x27')[A9(0x15b)](g=>{const u=g['split']('\x20')[0x0];if(u===T)return undefined;return u;});}if(a!==undefined){const g=u=>L=>__awaiter(this,void 0x0,void 0x0,function*(){const AI=A9;var f,t;const m=yield this[AI(0x186)]['get']['service'][AI(0x115)]({'parameters':{'projectId':u,'serviceId':a},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':L}}),U=(f=m['data'][AI(0x115)])!==null&&f!==void 0x0?f:[],S=U[AI(0x10c)](k=>k[AI(0xf8)]+AI(0x1d1)+k[AI(0xd7)]+')');if(s)S===null||S===void 0x0?void 0x0:S['unshift'](T);return{'elements':S,'nextCursor':(t=m[AI(0x157)])===null||t===void 0x0?void 0x0:t[AI(0x126)]};});return this['askForProjectScopedResourcePaginated'](A9(0x171),g,I,A9(0x16c)+d+'\x27')[A9(0x15b)](u=>{const Aa=A9,L=u[Aa(0xf9)]('\x20')[0x0];if(L===T)return undefined;return L;});}throw new Error('No\x20containers\x20found');}),this['askForAddon']=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const As=X,a=d=>s=>__awaiter(this,void 0x0,void 0x0,function*(){const Ad=a8I;var T;const V=yield this[Ad(0x186)][Ad(0x15c)][Ad(0x184)]({'parameters':{'projectId':d},'options':{'per_page':this[Ad(0x194)],'cursor':s}});return{'elements':V[Ad(0x161)][Ad(0x184)]['map'](g=>g['id']),'nextCursor':(T=V[Ad(0x157)])===null||T===void 0x0?void 0x0:T[Ad(0x126)]};});return this[As(0x122)](As(0x197),a,I);}),this[X(0x1ca)]=(I,a)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const AV=X,d=s=>T=>__awaiter(this,void 0x0,void 0x0,function*(){const AT=a8I;var V;const g=yield this['apiClient'][AT(0x183)][AT(0x197)][AT(0xd8)]({'parameters':{'projectId':s,'addonId':a},'options':{'per_page':this[AT(0x194)],'cursor':T}});return{'elements':g[AT(0x161)][AT(0xd8)][AT(0x10c)](u=>u['id']+AT(0x16a)+(u[AT(0x17e)]||AT(0x110))+')'),'nextCursor':(V=g[AT(0x157)])===null||V===void 0x0?void 0x0:V[AT(0x126)]};});return this[AV(0x122)]('backups',d,I,AV(0xff)+a+'\x27')[AV(0x15b)](s=>s[AV(0xf9)]('\x20')[0x0]);}),this['askForAddonRestore']=(I,a,d)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Au=X,s=T=>V=>__awaiter(this,void 0x0,void 0x0,function*(){const Ag=a8I;var g;const u=yield this[Ag(0x186)][Ag(0x183)][Ag(0x197)]['restores']({'parameters':{'projectId':T,'addonId':a,'backupId':d},'options':{'per_page':this[Ag(0x194)],'cursor':V}});return{'elements':u['data'][Ag(0x131)][Ag(0x10c)](L=>L['id']+Ag(0x16a)+(L[Ag(0x17e)]||Ag(0x110))+')'),'nextCursor':(g=u[Ag(0x157)])===null||g===void 0x0?void 0x0:g['cursor']};});return this['askForProjectScopedResourcePaginated'](Au(0x19d),s,I,Au(0xff)+a+'\x27')[Au(0x15b)](T=>T[Au(0xf9)]('\x20')[0x0]);}),this[X(0x16e)]=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Af=X,a=d=>__awaiter(this,void 0x0,void 0x0,function*(){const AL=a8I;return(yield this['apiClient'][AL(0x15c)][AL(0xda)]({'parameters':{'projectId':d}}))[AL(0x161)]['map'](s=>s['id']);});return this['askForProjectScopedResource'](Af(0x18b),a,I);}),this['askForSecret']=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Am=X,a=d=>s=>__awaiter(this,void 0x0,void 0x0,function*(){const At=a8I;var T;const V=yield this[At(0x186)][At(0x15c)][At(0xec)]({'parameters':{'projectId':d},'options':{'per_page':this[At(0x194)],'cursor':s}});return{'elements':V['data'][At(0xec)][At(0x10c)](g=>g['id']),'nextCursor':(T=V[At(0x157)])===null||T===void 0x0?void 0x0:T[At(0x126)]};});return this[Am(0x122)](Am(0x1d0),a,I);}),this[X(0x16d)]=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const AU=X,a=yield this[AU(0x186)][AU(0x183)][AU(0x107)]({'parameters':{'domain':I}}),d=a[AU(0x161)]['subdomains'][AU(0x10c)](T=>T[AU(0xf8)]+'\x20(full\x20domain:\x20'+T[AU(0x106)]+')'),s='domain\x20('+I+')';return this[AU(0x1a5)](AU(0x137),d,s)[AU(0x15b)](T=>T[AU(0xf9)]('\x20')[0x0]);}),this[X(0xd9)]=I=>__awaiter(this,void 0x0,void 0x0,function*(){const AS=X;return(yield inquirer[AS(0xfb)]([{'type':AS(0xfa),'name':AS(0x1c5),'message':chalk_1[AS(0x14a)][AS(0x17b)](AS(0x1a3)+(I||AS(0x147))+AS(0x14c)),'default':![]}]))['confirmation'];}),this['loginPrompt']=(I,a)=>__awaiter(this,void 0x0,void 0x0,function*(){const Ak=X;_['isUndefined'](I['name'])&&(a[Ak(0xe6)]<=0x0?_[Ak(0x15d)](I,Ak(0xf8),Ak(0x14a)):yield(0x0,utils_1[Ak(0x1b2)])(0xa)(()=>__awaiter(this,void 0x0,void 0x0,function*(){const Ae=Ak,{name:d}=yield inquirer[Ae(0xfb)]([{'type':Ae(0xe9),'name':Ae(0xf8),'message':Ae(0xf3),'default':Ae(0x140)}]);if(!I['override']&&a[Ae(0x1c2)](s=>s[Ae(0xf8)]===d)){const {c:s}=yield inquirer[Ae(0xfb)]([{'type':'confirm','name':'c','message':'Context\x20with\x20name\x20\x27'+d+Ae(0x12f),'default':![]}]);if(s===![])throw new Error(Ae(0x108));_[Ae(0x15d)](I,Ae(0x163),!![]);}_[Ae(0x15d)](I,'name',d);})));if(_[Ak(0xd4)](I['token'])){const d=yield this[Ak(0x101)]();_[Ak(0x15d)](I,Ak(0xe2),d);}return I;}),this[X(0x101)]=()=>__awaiter(this,void 0x0,void 0x0,function*(){const Ax=X,{token:I}=yield inquirer['prompt']([{'type':Ax(0x132),'name':'token','mask':'*','message':Ax(0x196)}]);return I;}),inquirer[X(0x144)](X(0x182),inquirerSearchList),inquirer['registerPrompt'](X(0xf0),inquirer_pagination_prompt_1['DynamicReloadPaginationPrompt']);}[a8x(0x109)](A,I){return __awaiter(this,void 0x0,void 0x0,function*(){const Ao=a8I,a=yaml[Ao(0x12c)](A),d=_[Ao(0x112)](a[Ao(0xf9)]('\x0a')[Ao(0x10c)](V=>V['length'])),s=chalk_1['default']['grey']('-'[Ao(0xdd)](d)+'\x0a'),{confirm:T}=yield inquirer[Ao(0xfb)]([{'type':Ao(0x15c),'name':Ao(0xfa),'message':''+chalk_1['default'][Ao(0x11c)][Ao(0x10a)](Ao(0x165))+s+chalk_1[Ao(0x14a)][Ao(0x10f)](a)+s,'choices':Object[Ao(0x127)](ConfirmChoices)}]);switch(T){case ConfirmChoices[Ao(0x17d)]:return A;case ConfirmChoices[Ao(0x1c7)]:throw new Error(Ao(0x195));case ConfirmChoices[Ao(0x1ae)]:return this[Ao(0xea)](I);case ConfirmChoices[Ao(0x177)]:return this[Ao(0x109)](yield this[Ao(0x125)](A),I);case ConfirmChoices[Ao(0x151)]:yield this[Ao(0x181)](A);return this['confirmationPrompt'](A,I);default:throw new Error('Something\x20unexpected\x20happened.');}});}['retrievePayloadViaInteractiveCli'](A,I){return __awaiter(this,void 0x0,void 0x0,function*(){const AM=a8I;if((I===null||I===void 0x0?void 0x0:I[AM(0x1ba)])!==undefined)this[AM(0x1ba)]=I===null||I===void 0x0?void 0x0:I[AM(0x1ba)];this[AM(0x14f)]=I===null||I===void 0x0?void 0x0:I[AM(0x189)];const a={};return yield this[AM(0x174)]([],A['opt'][AM(0x152)],a),this[AM(0x1ba)]=a,yield this[AM(0x109)](a,A);});}[a8x(0x174)](A,I,a,d){return __awaiter(this,void 0x0,void 0x0,function*(){const AN=a8I;let s;if(I[AN(0x1b6)]&&!_[AN(0x1cf)](I,AN(0x16f))){if(I[AN(0x1b6)][AN(0xe6)]>0x1){const {choice:T}=yield inquirer[AN(0xfb)]([{'type':AN(0x15c),'name':AN(0x15f),'message':AN(0x1c9)+(A[A[AN(0xe6)]-0x1]||'')+AN(0x1a2),'choices':I[AN(0x1b6)][AN(0x10c)](V=>{const Aq=AN;var g;return(g=V[Aq(0x16b)])!==null&&g!==void 0x0?g:'??';})}]);s=yield this[AN(0x169)](A,I[AN(0x1b6)][AN(0x1c2)](V=>V[AN(0x16b)]===T),a,d);}else{const V=I[AN(0x1b6)][0x0];_[AN(0x15d)](V,AN(0x16b),I[AN(0x16b)]),s=yield this[AN(0x169)](A,V,a,d);}s={};}else s=yield this['getType'](A,I,a,d);return s;});}['getInnerType'](A,I,a,d){var s;return __awaiter(this,void 0x0,void 0x0,function*(){const AK=a8I;if(d===![]){const {addEntry:g}=yield inquirer[AK(0xfb)]([{'type':AK(0xfa),'name':AK(0x13f),'message':this[AK(0x1c6)](I,AK(0x18c),A===null||A===void 0x0?void 0x0:A['description']),'default':![]}]);if(!g)return a;}const T=Object[AK(0x1b4)]((s=A===null||A===void 0x0?void 0x0:A[AK(0x16f)])!==null&&s!==void 0x0?s:[]),V=A[AK(0xe7)]||[];if(T[AK(0xe6)]>0x0)for(const u of T){const L=I['concat'](u);if(I['length']>0x0&&!_[AK(0x1cf)](a,I['join']('.')))_[AK(0x15d)](a,I[AK(0x19a)]('.'),{});yield this['propToType'](L,A[AK(0x16f)][u],a,V[AK(0x118)](u));}else yield this[AK(0x169)](I,Object[AK(0x142)](Object[AK(0x142)]({},A),{'type':AK(0x19e)}),a,d);return a;});}['askArrayEntry'](A,I,a,d){return __awaiter(this,void 0x0,void 0x0,function*(){const Ay=a8I;if(I&&a)return!![];const s=I?Ay(0x18c):Ay(0xfc),{addEntry:T}=yield inquirer[Ay(0xfb)]([{'type':Ay(0xfa),'name':Ay(0x13f),'message':this[Ay(0x1c6)](A,s,I?d:undefined),'default':![]}]);return T;});}[a8x(0x169)](A,I,a,d){return __awaiter(this,void 0x0,void 0x0,function*(){const AD=a8I;let s;const T=A[AD(0x19a)]('.');switch(I===null||I===void 0x0?void 0x0:I[AD(0x193)]){case AD(0x17c):{let V=!![];while(yield this[AD(0x1bb)](A,V,d,I===null||I===void 0x0?void 0x0:I[AD(0x16b)])){const g=_[AD(0x183)](a,T);_[AD(0x1ab)](a,T),yield this[AD(0x169)](A,I[AD(0x180)],a);const u=_['get'](a,T);!_[AD(0x173)](g)?_['set'](a,T,[u]):(g[AD(0x1a9)](u),_[AD(0x15d)](a,T,g)),V=![];}return s||[];}case AD(0xe1):{return s=yield this[AD(0x12d)](I,A,a,d),s;}case AD(0x19e):s=(0x0,utils_1['isValidJSON'])(yield this[AD(0x1a0)](A,I,d))||undefined;break;case AD(0x170):case AD(0x13b):case AD(0x160):default:s=yield this[AD(0x1a0)](A,I,d,a);break;}return!_[AD(0xd4)](s)&&_['set'](a,T,s),s;});}[a8x(0x1a0)](A,I,a,d){var s;return __awaiter(this,void 0x0,void 0x0,function*(){const Al=a8I,T=A[A[Al(0xe6)]-0x1],{defaultValue:defaultValue=(s=I===null||I===void 0x0?void 0x0:I['example'])!==null&&s!==void 0x0?s:I===null||I===void 0x0?void 0x0:I[Al(0x14a)],choices:choices=I===null||I===void 0x0?void 0x0:I[Al(0x1b1)],pagination:V}=yield(0x0,api_helpers_1[Al(0x1b0)])(T,this[Al(0x186)],this['tmpCmdPath'],d,this[Al(0x10d)],A);let g=Al(0xe9);if(!_[Al(0xd4)](choices)&&choices['length']>0x0){if(V!==undefined&&V['nextPageCursor']!==undefined)g=Al(0xf0);else choices[Al(0xe6)]>0x4&&typeof choices[0x0]===Al(0x170)?g=Al(0x182):g=Al(0x15c);}else{if((I===null||I===void 0x0?void 0x0:I[Al(0x193)])===Al(0x13b))g=Al(0xfa);else{if((I===null||I===void 0x0?void 0x0:I[Al(0x193)])==='integer')g=Al(0xe9);else(I===null||I===void 0x0?void 0x0:I[Al(0x193)])===Al(0x19e)&&(g=Al(0x12a));}}let u=a!==![]?!_[Al(0x13a)](defaultValue)?defaultValue:JSON[Al(0x105)](defaultValue):_[Al(0x1cb)](defaultValue)?defaultValue:Al(0x13c);if(choices)u=u[Al(0xdb)]();_[Al(0x1cf)](this[Al(0x1ba)],A[Al(0x19a)]('.'))&&(u=this[Al(0x1ba)][A[Al(0x19a)]('.')]);const L=choices&&a===![]?[Al(0x13c),...choices]:choices,f=(I===null||I===void 0x0?void 0x0:I[Al(0x193)])===Al(0x160),t=Object[Al(0x142)]({'type':g,'name':'id','message':this[Al(0x199)](A,I),'choices':L,'default':u,'filter':this[Al(0x12b)](g,a),'validate':this['validate'](I,a,f)},V),m=(yield inquirer[Al(0xfb)]([t]))['id'];if(m===Al(0x13c)||m==='')return undefined;if(f)return parseInt(m,0xa);return m;});}[a8x(0x199)](A,I){const An=a8x,a=(I===null||I===void 0x0?void 0x0:I[An(0x193)])!=='boolean'?An(0x148):An(0x1aa);return this[An(0x1c6)](A,a,I===null||I===void 0x0?void 0x0:I['description']);}[a8x(0x191)](){return __awaiter(this,void 0x0,void 0x0,function*(){const AX=a8I,A=I=>__awaiter(this,void 0x0,void 0x0,function*(){const Av=a8I;var a;const d=yield this[Av(0x186)][Av(0x15c)][Av(0x104)]({'options':{'per_page':this['defaultPaginationPageSize'],'cursor':I}}),s=d[Av(0x161)][Av(0x104)]['map'](T=>T['id']);return{'elements':s,'nextCursor':(a=d[Av(0x157)])===null||a===void 0x0?void 0x0:a[Av(0x126)]};});return yield this[AX(0xdc)](AX(0x1c8),A);});}[a8x(0x14d)](A,I,a,d){return __awaiter(this,void 0x0,void 0x0,function*(){const AQ=a8I,s=a||this['apiClient'][AQ(0xf7)][AQ(0x18a)]();if(_['isUndefined'](s))throw new Error('Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.');const T=yield I(s);return yield this[AQ(0x1a5)](A,T,(d?d+AQ(0x116):'')+'project:\x20\x27'+s+'\x27');});}[a8x(0x122)](A,I,a,d){return __awaiter(this,void 0x0,void 0x0,function*(){const AO=a8I,s=a||this['apiClient']['contextProvider'][AO(0x18a)]();if(_[AO(0xd4)](s))throw new Error(AO(0x1a7));const T=yield I(s);return yield this[AO(0xdc)](A,T,(d?d+'\x20in\x20':'')+'project:\x20\x27'+s+'\x27');});}['askForDomain'](){return __awaiter(this,void 0x0,void 0x0,function*(){const Ar=a8I,A=I=>__awaiter(this,void 0x0,void 0x0,function*(){const Ap=a8I;var a;const d=yield this[Ap(0x186)][Ap(0x15c)][Ap(0xf1)]({'options':{'per_page':this['defaultPaginationPageSize'],'cursor':I}});return{'elements':d[Ap(0x161)][Ap(0xf1)][Ap(0x10c)](s=>s[Ap(0xf8)]),'nextCursor':(a=d[Ap(0x157)])===null||a===void 0x0?void 0x0:a[Ap(0x126)]};});return this[Ar(0xdc)](Ar(0x107),A);});}['askForCredentials'](){return __awaiter(this,void 0x0,void 0x0,function*(){const AP=a8I,A=I=>__awaiter(this,void 0x0,void 0x0,function*(){const AH=a8I;var a;const d=yield this['apiClient'][AH(0x15c)][AH(0x124)]({'options':{'per_page':this[AH(0x194)],'cursor':I}});return{'elements':d[AH(0x161)][AH(0x103)][AH(0x10c)](s=>s['id']),'nextCursor':(a=d[AH(0x157)])===null||a===void 0x0?void 0x0:a[AH(0x126)]};});return this[AP(0xdc)]('credentials',A);});}[a8x(0x15e)](A){const AR=a8x;this[AR(0x10d)]=A;}}exports[a8x(0x114)]=InquirerHelper;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a9K=a9I;(function(A,I){const q=a9I,a=A();while(!![]){try{const d=parseInt(q(0x186))/0x1*(parseInt(q(0x17a))/0x2)+-parseInt(q(0x174))/0x3+parseInt(q(0x170))/0x4+parseInt(q(0x172))/0x5*(-parseInt(q(0x167))/0x6)+parseInt(q(0x175))/0x7+parseInt(q(0x14e))/0x8+-parseInt(q(0x188))/0x9;if(d===I)break;else a['push'](a['shift']());}catch(s){a['push'](a['shift']());}}}(a9A,0xaaa44));var __createBinding=this&&this[a9K(0x15d)]||(Object[a9K(0x166)]?function(A,I,a,d){const y=a9K;if(d===undefined)d=a;var s=Object[y(0x180)](I,a);(!s||('get'in s?!I[y(0x18a)]:s[y(0x17d)]||s[y(0x152)]))&&(s={'enumerable':!![],'get':function(){return I[a];}}),Object[y(0x157)](A,d,s);}:function(A,I,a,d){if(d===undefined)d=a;A[d]=I[a];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a9K(0x166)]?function(A,I){const D=a9K;Object[D(0x157)](A,D(0x162),{'enumerable':!![],'value':I});}:function(A,I){const l=a9K;A[l(0x162)]=I;}),__importStar=this&&this[a9K(0x15b)]||function(A){const n=a9K;if(A&&A[n(0x18a)])return A;var I={};if(A!=null){for(var a in A)if(a!=='default'&&Object[n(0x17f)][n(0x163)][n(0x14b)](A,a))__createBinding(I,A,a);}return __setModuleDefault(I,A),I;},__awaiter=this&&this['__awaiter']||function(A,I,a,d){function s(T){return T instanceof a?T:new a(function(V){V(T);});}return new(a||(a=Promise))(function(T,V){const Q=a9I;function g(f){const v=a9I;try{L(d[v(0x184)](f));}catch(t){V(t);}}function u(f){try{L(d['throw'](f));}catch(t){V(t);}}function L(f){const X=a9I;f[X(0x164)]?T(f[X(0x169)]):s(f['value'])['then'](g,u);}L((d=d[Q(0x158)](A,I||[]))[Q(0x184)]());});},__importDefault=this&&this[a9K(0x16d)]||function(A){const O=a9K;return A&&A[O(0x18a)]?A:{'default':A};};Object['defineProperty'](exports,a9K(0x18a),{'value':!![]}),exports[a9K(0x16f)]=void 0x0;const ws_1=__importStar(require('ws')),open_1=__importDefault(require(a9K(0x171))),events_1=require(a9K(0x183));function a9I(A,I){const a=a9A();return a9I=function(d,s){d=d-0x14b;let T=a[d];return T;},a9I(A,I);}class NorthflankApiBrowserLogin extends events_1[a9K(0x160)]{constructor(A,I=!![]){const p=a9K;super(),this[p(0x177)]=A,this['openBrowser']=I,this[p(0x159)]='idle',this[p(0x150)]=()=>JSON[p(0x156)]({'type':p(0x155)});}[a9K(0x165)](){const r=a9K;var A;const I=this[r(0x177)][r(0x15a)](r(0x173),r(0x15f))[r(0x15a)]('http:',r(0x17c)),a=I+r(0x154),d=new ws_1[(r(0x162))](a),s=()=>__awaiter(this,void 0x0,void 0x0,function*(){const P=r;yield new Promise(V=>{const H=a9I;var g;(g=this[H(0x14f)])===null||g===void 0x0?void 0x0:g[H(0x161)](JSON[H(0x156)]({'type':H(0x187)}),()=>V());}),process[P(0x185)]();}),T=new Promise((V,g)=>{const R=r;var u,L,f;try{this['duplex']=(0x0,ws_1['createWebSocketStream'])(d),process['on'](R(0x15c),s);}catch(t){g(new Error('Failed\x20to\x20establish\x20connection\x20to\x20command\x20execution\x20proxy:\x20'+t[R(0x18b)]));}(u=this[R(0x14f)])===null||u===void 0x0?void 0x0:u['on'](R(0x181),m=>{const Z=R;var U;const S=JSON[Z(0x179)](m['toString']());switch(S===null||S===void 0x0?void 0x0:S['type']){case'init-ack':{const {loginPage:k}=S;if(k===undefined){this[Z(0x16a)](Z(0x182),g);return;}this[Z(0x151)]&&(0x0,open_1[Z(0x162)])(k)[Z(0x16e)](x=>{const o='Unable\x20to\x20open\x20browser:\x20'+x['message'];this['handleError'](o,g);});this[Z(0x168)](Z(0x16b),{'url':k});break;}case'login-success':{const {apiToken:x,contextName:o}=S;if(x===undefined){this['handleError']('Unexpected\x20response,\x20api\x20token\x20missing',g);return;}(U=this[Z(0x14f)])===null||U===void 0x0?void 0x0:U[Z(0x161)](),V({'token':x,'contextName':o}),this[Z(0x159)]='success';break;}case Z(0x176):{const M=Z(0x178)+(S===null||S===void 0x0?void 0x0:S['message']);this[Z(0x16a)](M,g);break;}default:{const N=Z(0x189)+JSON[Z(0x156)](S);this[Z(0x16a)](N,g);}}}),(L=this[R(0x14f)])===null||L===void 0x0?void 0x0:L['on'](R(0x17e),m=>{const B=R;this[B(0x16a)](B(0x153)+m[B(0x18b)],g);}),(f=this[R(0x14f)])===null||f===void 0x0?void 0x0:f['on'](R(0x161),()=>{const E=R;if(this[E(0x159)]===E(0x16c)){}else this[E(0x16a)](E(0x15e),g);});});return(A=this[r(0x14f)])===null||A===void 0x0?void 0x0:A[r(0x17b)](this[r(0x150)]()),this[r(0x159)]=r(0x155),T[r(0x14c)](()=>{const J=r;process[J(0x14d)]('SIGINT',s);});}[a9K(0x16a)](A,I){const b=a9K;var a,d;I?(a=this[b(0x14f)])===null||a===void 0x0?void 0x0:a['end'](()=>I(new Error(A))):(d=this[b(0x14f)])===null||d===void 0x0?void 0x0:d[b(0x161)](),this[b(0x159)]=b(0x17e);}}exports[a9K(0x16f)]=NorthflankApiBrowserLogin;function a9A(){const Y=['apply','status','replace','__importStar','SIGINT','__createBinding','Login\x20process\x20stopped\x20before\x20completed','wss:','EventEmitter','end','default','hasOwnProperty','done','startLogin','create','6168gBEvVx','emit','value','handleError','browser-opened','success','__importDefault','catch','NorthflankApiBrowserLogin','1241952vXjlkB','open','820nMBTkh','https:','3051150LDArBB','8010023agRFFB','login-failure','baseUrl','Failure\x20during\x20login:\x20','parse','2958vCtjfz','write','ws:','writable','error','prototype','getOwnPropertyDescriptor','data','Unexpected\x20response','events','next','exit','769bQRTBd','aborted','17569728etImAS','unable\x20to\x20parse\x20message:\x20','__esModule','message','call','finally','removeListener','9957232PrGffZ','duplex','initPackage','openBrowser','configurable','error\x20happened\x20during\x20browser\x20login:\x20','/v1/cli-login','init','stringify','defineProperty'];a9A=function(){return Y;};return a9A();}
|
package/dist/logs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a10o=a10h;function a10h(w,h){const G=a10w();return a10h=function(P,v){P=P-0x6b;let O=G[P];return O;},a10h(w,h);}(function(w,h){const R=a10h,G=w();while(!![]){try{const P=-parseInt(R(0x6f))/0x1+-parseInt(R(0xa1))/0x2*(parseInt(R(0x8a))/0x3)+-parseInt(R(0xfa))/0x4+-parseInt(R(0x75))/0x5*(parseInt(R(0xd5))/0x6)+parseInt(R(0x7a))/0x7*(-parseInt(R(0xc1))/0x8)+-parseInt(R(0xa9))/0x9+parseInt(R(0xe0))/0xa*(parseInt(R(0x6e))/0xb);if(P===h)break;else G['push'](G['shift']());}catch(v){G['push'](G['shift']());}}}(a10w,0x8b00e));function a10w(){const wh=['yaml','service','bold','warning','jobId','close','forward','__importDefault','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','tail','getLogsCommand','ApiClient','Option','Backup\x20to\x20get\x20logs\x20from','Restore\x20to\x20get\x20logs\x20from','askForContainer','Filter\x20log\x20lines\x20to\x20include\x20this\x20text','--restore\x20--restoreId\x20[restoreId]','58120KsupQr','log','getSeconds','--textIncludes\x20<text>','Only\x20two\x20of\x20\x27startTime\x27,\x20\x27endTime\x27\x20and\x20\x27duration\x27\x20can\x20be\x20set.','getFormatter','Project\x20for\x20logs','data','textNotIncludes','--project\x20--projectId\x20[projectId]','../utils','Number\x20of\x20lines\x20to\x20return.','json','yml','Filter\x20log\x20lines\x20to\x20not\x20include\x20this\x20text','addonId','assertContextExisting','logsApiClient','\x27Ctrl+C\x27','logs-received','102wzlXIf','backupId',',\x20backup\x20id\x20','forEach','askForProject','defaultDurationSeconds','./log-formatter','--regexNotIncludes\x20<regex>','valueOf','--regexIncludes\x20<regex>','@northflank/js-client','480KEvlqz','Id]','Build\x20to\x20get\x20logs\x20from','assign','textIncludes','chalk','toUpperCase','--run\x20--runId\x20[runId]','Get\x20logs\x20generated\x20before\x20this\x20time,\x20','\x20for\x20all\x20containers','then','option','regexIncludes','\x20of\x20','backward','Error\x20while\x20fetching\x20log\x20lines:\x20','askForAddon','setSeconds',',\x20duration:\x20','Log\x20session\x20ended','logTail','../formatting/console-format-helpers','askForAddonBackup','start','printInitInfo','error','4180080FBLQAo','askForService','tsHint','cursor','InquirerHelper','containerId','-l,\x20--lineLimit\x20[limit]','default','regexNotIncludes','1229822axHbKp','645539qfandf','Element\x20count\x20for\x20this\x20request\x20exceeds\x20the\x20line\x20limit,\x20output\x20was\x20truncated.\x20Cut\x20off\x20at\x20timestamp\x20','serviceId','__esModule','Get\x20log\x20for\x20the\x20specified\x20','--backup\x20--backupId\x20[backupId]','199025zHwSvg','--container\x20--containerId\x20[containerId]','charAt','getCurrentServiceName','formatLogLine','385vtgEeT','askForBuild','conflicts','choices','inquirerHelper','addOption','Filter\x20log\x20lines\x20to\x20match\x20this\x20regular\x20expression','CliLogs','length','--noDefaults','--textNotIncludes\x20<text>','toISOString','restoreId','getStandardLogCommand',',\x20from:\x20','details','213oNHbAk','customUserAgent','action','Container\x20to\x20exec\x20into\x20(logs\x20from\x20all\x20containers\x20will\x20be\x20shown\x20if\x20not\x20specified)','format','name','slice','next','\x20in\x20project\x20','logs','--duration\x20[duration]','apiContext','pagination','Error\x20while\x20tailing\x20log\x20lines:\x20','message','Output\x20formatting.\x20Will\x20use\x20advanced\x20formatting\x20by\x20default.','apiClient','askForAddonRestore','getCurrentProjectName','value','values','job','getCommand','26998BlCfJA','alias',',\x20to:\x20','-f,\x20--tail','parseDateInput','argParser','\x20seconds','Length\x20of\x20timespan\x20in\x20seconds.\x20Only\x20valid\x20if\x20not\x20both,\x20startTime\x20and\x20endTime\x20are\x20set','9647010KZQTGL','\x20--','stringify','../inquirer-helper','Direction\x20of\x20logs.\x20Ignored\x20when\x20tailing.','--startTime\x20<timestamp>'];a10w=function(){return wh;};return a10w();}var __awaiter=this&&this['__awaiter']||function(w,h,G,v){function O(Z){return Z instanceof G?Z:new G(function(a){a(Z);});}return new(G||(G=Promise))(function(Z,a){const F=a10h;function l(A){const N=a10h;try{U(v[N(0x91)](A));}catch(D){a(D);}}function B(A){try{U(v['throw'](A));}catch(D){a(D);}}function U(A){const z=a10h;A['done']?Z(A[z(0x9d)]):O(A['value'])[z(0xea)](l,B);}U((v=v['apply'](w,h||[]))[F(0x91)]());});},__importDefault=this&&this[a10o(0xb6)]||function(w){const L=a10o;return w&&w[L(0x72)]?w:{'default':w};};Object['defineProperty'](exports,a10o(0x72),{'value':!![]}),exports[a10o(0x81)]=void 0x0;const js_client_1=require(a10o(0xdf)),chalk_1=__importDefault(require(a10o(0xe5))),utils_1=require(a10o(0xcb)),inquirer_helper_1=require(a10o(0xac)),commander_1=require('commander'),console_format_helpers_1=require(a10o(0xf5)),log_formatter_1=require(a10o(0xdb));class CliLogs{constructor(w){const d=a10o;this[d(0x95)]=w,this[d(0xda)]=0x708,this[d(0x87)]=(h,G,P,v)=>{const w0=d,O=(0x0,utils_1[w0(0xa0)])(!![])[w0(0x8f)]((G?'build-':'')+w0(0x93))[w0(0xa2)]((G?'build-':'')+w0(0xc2))['description'](w0(0x73)+h)[w0(0xeb)](w0(0xca),w0(0xc7))['option']('--'+h+w0(0xaa)+h+'Id\x20['+h+w0(0xe1),h[w0(0x77)](0x0)[w0(0xe6)]()+h[w0(0x90)](0x1)+'\x20to\x20get\x20logs\x20from')[w0(0xeb)](w0(0x76),w0(0x8d));if(G)O[w0(0xeb)]('--build\x20--buildId\x20[buildId]',w0(0xe2));if(h==='job')O['option'](w0(0xe7),'Job\x20run\x20id,\x20example:\x20162b1977-6636-4000-929b-cc265b862ff0');if(P)O[w0(0xeb)](w0(0x74),w0(0xbc));if(v)O[w0(0xeb)](w0(0xc0),w0(0xbd));return O['option'](w0(0xa4),'Tail\x20will\x20stream\x20logs\x20in\x20real-time.\x20Session\x20will\x20be\x20kept\x20open.')[w0(0xeb)](w0(0x6b),w0(0xcc))[w0(0xeb)](w0(0xae),'Get\x20logs\x20generated\x20after\x20this\x20time,\x20'+utils_1['tsHint'],utils_1[w0(0xa5)])['addOption'](new commander_1[(w0(0xbb))]('--endTime\x20<timestamp>',w0(0xe8)+utils_1[w0(0xfc)])[w0(0xa6)](utils_1[w0(0xa5)])[w0(0x7c)](['tail']))[w0(0xeb)](w0(0x94),w0(0xa8))[w0(0x7f)](new commander_1[(w0(0xbb))]('-d,\x20--direction\x20<order>',w0(0xad))[w0(0x7d)]([w0(0xee),w0(0xb5)])[w0(0x7c)]([w0(0xb8)]))[w0(0x7f)](new commander_1[(w0(0xbb))](w0(0xc4),w0(0xbf))['conflicts']([w0(0xc9),'regexIncludes',w0(0x6d)]))[w0(0x7f)](new commander_1[(w0(0xbb))](w0(0x84),w0(0xcf))['conflicts']([w0(0xe4),w0(0xec),w0(0x6d)]))[w0(0x7f)](new commander_1[(w0(0xbb))](w0(0xde),w0(0x80))[w0(0x7c)]([w0(0xc9),'textIncludes',w0(0x6d)]))[w0(0x7f)](new commander_1[(w0(0xbb))](w0(0xdc),'Filter\x20log\x20lines\x20to\x20not\x20match\x20this\x20regular\x20expression')[w0(0x7c)]([w0(0xc9),w0(0xec),w0(0xe4)]))[w0(0xeb)](w0(0x83),w0(0xb7),![])[w0(0x7f)](new commander_1[(w0(0xbb))]('-o,\x20--output\x20[output]',w0(0x99))['choices'](Object[w0(0x9e)]([w0(0x8e),w0(0xcd),w0(0xaf)]))),O;},this[d(0xf8)]=(h,G,P,v)=>{const w1=d,{containerName:O,restoreId:Z,backupId:a,quiet:l,tail:B,startTime:U,endTime:A,duration:D}=v;if(l===!![])return;const p=B?'\x20(exit\x20with\x20'+chalk_1[w1(0x6c)][w1(0xb1)](w1(0xd3))+')':'',s=B?'\x20with\x20live-tailing':'',W=new Date(),X=U!==null&&U!==void 0x0?U:new Date(new Date((A!==null&&A!==void 0x0?A:W)[w1(0xdd)]())[w1(0xf1)]((A!==null&&A!==void 0x0?A:W)[w1(0xc3)]()-(D!==null&&D!==void 0x0?D:this[w1(0xda)]))),T=(A!==null&&A!==void 0x0?A:U!==undefined)?new Date(new Date(U[w1(0xdd)]())['setSeconds'](U[w1(0xc3)]()+(D!==null&&D!==void 0x0?D:this[w1(0xda)]))):W,I=a!==undefined,k=X&&!I?w1(0x88)+chalk_1['default'][w1(0xb1)](X['toISOString']()):'',Y=T&&!I?w1(0xa3)+chalk_1['default'][w1(0xb1)](T[w1(0x85)]()):'',x=D?w1(0xf2)+D+w1(0xa7):'',b=O?'\x20for\x20container\x20'+chalk_1['default'][w1(0xb1)](O):I?'':w1(0xe9),q=a?w1(0xd7)+a:'',f=Z?',\x20restore\x20id\x20'+Z:'',e=h+'\x20'+chalk_1['default'][w1(0xb1)](G)+q+f+w1(0x92)+chalk_1['default']['bold'](P),i=''+k+Y+x;console[w1(0xc2)]('>\x20Container\x20logs'+s+b+w1(0xed)+e+i+p+':');},this[d(0xc6)]=(h,G)=>(P,v)=>{const w2=d;if(!h){if(P[w2(0x82)]===0x0)console['log']('No\x20logs\x20found\x20for\x20this\x20query.\x20Make\x20sure\x20to\x20select\x20an\x20appropriate\x20time\x20window.');P[w2(0xd8)](O=>(0x0,log_formatter_1[w2(0x79)])(O,G));}else(0x0,console_format_helpers_1['printResponse'])(h,P);(v===null||v===void 0x0?void 0x0:v['hasNextPage'])&&(0x0,utils_1[w2(0xb2)])(w2(0x70)+v[w2(0xfd)]);},this[d(0x9a)]=new js_client_1[(d(0xba))](w,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[d(0x8b)]}),this[d(0xd2)]=this[d(0x9a)],this[d(0x7e)]=new inquirer_helper_1[(d(0xfe))](this[d(0x9a)]);}[a10o(0xb9)](w,h=![],G=![],P=![]){const w9=a10o,v=(U,A)=>__awaiter(this,void 0x0,void 0x0,function*(){const w3=a10h,D=A['noDefaults'],{apiContext:p,inquirerHelper:s}=this;switch(w){case'service':{const W=D?undefined:p[w3(0x78)]();return A[w3(0x71)]||W||(yield s[w3(0xfb)](U)());}case w3(0x9f):{const X=D?undefined:p['getCurrentJobName']();return A[w3(0xb3)]||X||(yield s['askForJob'](U)());}case'addon':{return A[w3(0xd0)]||(yield s[w3(0xf0)](U)());}}}),O=(U,A,D)=>__awaiter(this,void 0x0,void 0x0,function*(){const w4=a10h;if(h)return D['buildId']||(yield this['inquirerHelper'][w4(0x7b)](U,w===w4(0xb0)?A:undefined,w===w4(0x9f)?A:undefined,!![])());return undefined;}),Z=(U,A,D)=>__awaiter(this,void 0x0,void 0x0,function*(){const w5=a10h;if(G||P)return D[w5(0xd6)]||(yield this[w5(0x7e)][w5(0xf6)](U,A)());return undefined;}),a=(U,A,D,p)=>__awaiter(this,void 0x0,void 0x0,function*(){const w6=a10h;if(P)return p[w6(0x86)]||(yield this['inquirerHelper'][w6(0x9b)](U,A,D)());return undefined;}),l=(U,A,D)=>__awaiter(this,void 0x0,void 0x0,function*(){const w7=a10h;if(!h&&D[w7(0xff)]!==undefined){if(D[w7(0xff)]!==!![])return D[w7(0xff)];return yield this[w7(0x7e)][w7(0xbe)](U,w===w7(0xb0)?A:undefined,w===w7(0x9f)?A:undefined,!![])();}return undefined;}),B=(U,A,D)=>__awaiter(this,void 0x0,void 0x0,function*(){const w8=a10h;if(w==='job')return D['runId']||(yield this[w8(0x7e)]['askForJobRun'](A,U,!![])());return undefined;});return this[w9(0x87)](w,h,G,P)[w9(0x8c)](U=>__awaiter(this,void 0x0,void 0x0,function*(){const ww=w9,{noDefaults:A,projectId:D,quiet:p,tail:s,textIncludes:W,textNotIncludes:X,regexIncludes:T,regexNotIncludes:I,direction:k,lineLimit:Y,startTime:x,endTime:b,duration:q,output:f}=U;(0x0,utils_1[ww(0xd1)])(this['apiClient']);const {apiContext:e,inquirerHelper:i,logsApiClient:u}=this,t=A?undefined:e[ww(0x9c)](),S=D||t||(yield i[ww(0xd9)]()),V=yield v(S,U),C=yield O(S,V,U),M=yield Z(S,V,U),Q=yield a(S,V,M,U),H=yield B(S,V,U),n=yield l(S,V,U);if(x&&b&&q)throw new Error(ww(0xc5));const c={'projectId':S,'entityId':V},r={'containerName':n,'textIncludes':W,'textNotIncludes':X,'regexIncludes':T,'regexNotIncludes':I,'lineLimit':Y,'startTime':x,'duration':q,'runId':H,'buildId':C,'backupId':M,'restoreId':Q,'isBuild':h!==null&&h!==void 0x0?h:![]},j=P?'addonRestore':G?'addonBackup':w,m=Object[ww(0xe3)](Object[ww(0xe3)]({},r),{'endTime':b,'direction':k});if(!p&&f!==ww(0xaf)&&f!==ww(0xce)&&f!==ww(0xcd))this[ww(0xf8)](w,V,S,Object['assign'](Object[ww(0xe3)]({},m),U));const y=this[ww(0xc6)](f,W!==null&&W!==void 0x0?W:T);if(s){const E=yield u['logs'][ww(0xf4)](c,r,j);E['on'](ww(0xd4),y),E['on'](ww(0xf9),K=>(0x0,utils_1['error'])(ww(0x97)+K[ww(0x98)])),E['on'](ww(0xb4),()=>console['log'](ww(0xf3))),yield E[ww(0xf7)]();}else{const K=yield u[ww(0x93)]['logRange'](c,m,j);if(K[ww(0xf9)]){const g=K[ww(0xf9)][ww(0x89)],J=g?'\x0aDetails:\x20'+JSON[ww(0xab)](g,null,'\x20'):'';(0x0,utils_1[ww(0xf9)])(ww(0xef)+K[ww(0xf9)]['message']+J);}else y(K[ww(0xc8)],K[ww(0x96)]);}}));}}exports[a10o(0x81)]=CliLogs;
|
|
1
|
+
'use strict';const a10j=a10I;(function(A,I){const G=a10I,a=A();while(!![]){try{const d=-parseInt(G(0x122))/0x1+-parseInt(G(0xfa))/0x2+parseInt(G(0x179))/0x3+parseInt(G(0x100))/0x4*(-parseInt(G(0x124))/0x5)+-parseInt(G(0x108))/0x6+-parseInt(G(0xfb))/0x7+parseInt(G(0x12a))/0x8;if(d===I)break;else a['push'](a['shift']());}catch(s){a['push'](a['shift']());}}}(a10A,0xe89e1));var __awaiter=this&&this[a10j(0x109)]||function(A,I,a,d){function s(T){return T instanceof a?T:new a(function(V){V(T);});}return new(a||(a=Promise))(function(T,V){const w=a10I;function g(f){const z=a10I;try{L(d[z(0x151)](f));}catch(t){V(t);}}function u(f){try{L(d['throw'](f));}catch(t){V(t);}}function L(f){const h=a10I;f['done']?T(f[h(0x102)]):s(f[h(0x102)])[h(0xf7)](g,u);}L((d=d[w(0x155)](A,I||[]))[w(0x151)]());});},__importDefault=this&&this[a10j(0x117)]||function(A){return A&&A['__esModule']?A:{'default':A};};function a10I(A,I){const a=a10A();return a10I=function(d,s){d=d-0xf2;let T=a[d];return T;},a10I(A,I);}Object[a10j(0x13d)](exports,'__esModule',{'value':!![]}),exports['CliLogs']=void 0x0;const js_client_1=require('@northflank/js-client'),chalk_1=__importDefault(require(a10j(0xfd))),utils_1=require(a10j(0x126)),inquirer_helper_1=require(a10j(0x16f)),commander_1=require(a10j(0x105)),console_format_helpers_1=require('../formatting/console-format-helpers'),log_formatter_1=require(a10j(0x14c));function a10A(){const AI=['\x20with\x20live-tailing',',\x20from:\x20','./log-formatter','textNotIncludes','runId','LogType','Only\x20two\x20of\x20\x27startTime\x27,\x20\x27endTime\x27\x20and\x20\x27duration\x27\x20can\x20be\x20set.','next','\x20--','InquirerHelper','Backup\x20to\x20get\x20logs\x20from','apply','askForProject','askForJob','Get\x20log\x20for\x20the\x20specified\x20','\x20seconds','alias','\x20for\x20all\x20containers','No\x20logs\x20found\x20for\x20this\x20query.\x20Make\x20sure\x20to\x20select\x20an\x20appropriate\x20time\x20window.','getCommand','pagination','formatLogLine','getCurrentProjectName','values','Filter\x20log\x20lines\x20to\x20not\x20match\x20this\x20regular\x20expression','parseDateInput','getStandardLogCommand','serviceId','--noDefaults','argParser','action','format','Filter\x20log\x20lines\x20to\x20include\x20this\x20text','addonRestore','defaultDurationSeconds','getFormatter',',\x20restore\x20id\x20','../inquirer-helper','--textNotIncludes\x20<text>','length','getLogsCommand','noDefaults','--backup\x20--backupId\x20[backupId]','CliLogs','Build\x20to\x20get\x20logs\x20from','description','--restore\x20--restoreId\x20[restoreId]','5015037WKLNYp','Error\x20while\x20fetching\x20log\x20lines:\x20','toUpperCase','stringify','data','customUserAgent','Length\x20of\x20timespan\x20in\x20seconds.\x20Only\x20valid\x20if\x20not\x20both,\x20startTime\x20and\x20endTime\x20are\x20set','logTail','-d,\x20--direction\x20<order>','slice','--duration\x20[duration]','getCurrentServiceName','option','warning','then','yml','getCurrentJobName','2923374fspQwk','8532706RVsuuU','log','chalk','-t,\x20--types\x20<types...>','job','163288XgKmOl','tsHint','value','Element\x20count\x20for\x20this\x20request\x20exceeds\x20the\x20line\x20limit,\x20output\x20was\x20truncated.\x20Cut\x20off\x20at\x20timestamp\x20','\x20of\x20','commander','askForAddon','printInitInfo','10981050PoVJUG','__awaiter','yaml','inquirerHelper','--regexIncludes\x20<regex>','error','printResponse','askForBuild','containerId','assign','apiContext','Project\x20for\x20logs','askForAddonRestore','--endTime\x20<timestamp>','message','__importDefault','getSeconds','\x20to\x20get\x20logs\x20from','apiClient','--textIncludes\x20<text>','assertContextExisting','service',',\x20to:\x20','addon','charAt','close','1641285SDZVLV','Filter\x20log\x20lines\x20to\x20match\x20this\x20regular\x20expression','185OeOTHQ','regexNotIncludes','../utils','choices','conflicts','addonId','55549128AidLoI','Container\x20to\x20exec\x20into\x20(logs\x20from\x20all\x20containers\x20will\x20be\x20shown\x20if\x20not\x20specified)','name','Option','Output\x20formatting.\x20Will\x20use\x20advanced\x20formatting\x20by\x20default.','tail','setSeconds','Number\x20of\x20lines\x20to\x20return.','Error\x20while\x20tailing\x20log\x20lines:\x20','Direction\x20of\x20logs.\x20Ignored\x20when\x20tailing.','json','build-','regexIncludes',',\x20duration:\x20','--build\x20--buildId\x20[buildId]','hasNextPage','Id]','forEach','logRange','defineProperty','default','bold','textIncludes','\x20(exit\x20with\x20','logs','addOption','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','askForContainer','valueOf','>\x20Container\x20logs','-o,\x20--output\x20[output]','--run\x20--runId\x20[runId]'];a10A=function(){return AI;};return a10A();}class CliLogs{constructor(A){const i=a10j;this[i(0x112)]=A,this['defaultDurationSeconds']=0x708,this[i(0x164)]=(I,a,d,s)=>{const A0=i,T=(0x0,utils_1[A0(0x15d)])(!![])[A0(0x12c)]((a?A0(0x135):'')+A0(0x142))[A0(0x15a)]((a?A0(0x135):'')+A0(0xfc))[A0(0x177)](A0(0x158)+I)[A0(0xf5)]('--project\x20--projectId\x20[projectId]',A0(0x113))['option']('--'+I+A0(0x152)+I+'Id\x20['+I+A0(0x13a),I[A0(0x120)](0x0)[A0(0x17b)]()+I[A0(0xf2)](0x1)+A0(0x119))[A0(0xf5)]('--container\x20--containerId\x20[containerId]',A0(0x12b));if(a)T[A0(0xf5)](A0(0x138),A0(0x176));if(I===A0(0xff))T[A0(0xf5)](A0(0x149),'Job\x20run\x20id,\x20example:\x20162b1977-6636-4000-929b-cc265b862ff0');if(d)T[A0(0xf5)](A0(0x174),A0(0x154));if(s)T[A0(0xf5)](A0(0x178),'Restore\x20to\x20get\x20logs\x20from');return!a&&!d&&!s&&T[A0(0x143)](new commander_1[(A0(0x12d))](A0(0xfe),'Which\x20log\x20types\x20to\x20fetch')[A0(0x127)](Object[A0(0x161)](js_client_1[A0(0x14f)]))),T[A0(0xf5)]('-f,\x20--tail','Tail\x20will\x20stream\x20logs\x20in\x20real-time.\x20Session\x20will\x20be\x20kept\x20open.')[A0(0xf5)]('-l,\x20--lineLimit\x20[limit]',A0(0x131))['option']('--startTime\x20<timestamp>','Get\x20logs\x20generated\x20after\x20this\x20time,\x20'+utils_1[A0(0x101)],utils_1[A0(0x163)])[A0(0x143)](new commander_1[(A0(0x12d))](A0(0x115),'Get\x20logs\x20generated\x20before\x20this\x20time,\x20'+utils_1[A0(0x101)])[A0(0x167)](utils_1[A0(0x163)])[A0(0x128)]([A0(0x12f)]))['option'](A0(0xf3),A0(0x17f))[A0(0x143)](new commander_1[(A0(0x12d))](A0(0x181),A0(0x133))[A0(0x127)](['backward','forward'])[A0(0x128)]([A0(0x12f)]))[A0(0x143)](new commander_1['Option'](A0(0x11b),A0(0x16a))[A0(0x128)]([A0(0x14d),'regexIncludes','regexNotIncludes']))[A0(0x143)](new commander_1[(A0(0x12d))](A0(0x170),'Filter\x20log\x20lines\x20to\x20not\x20include\x20this\x20text')[A0(0x128)]([A0(0x140),A0(0x136),A0(0x125)]))[A0(0x143)](new commander_1[(A0(0x12d))](A0(0x10c),A0(0x123))[A0(0x128)]([A0(0x14d),'textIncludes',A0(0x125)]))[A0(0x143)](new commander_1[(A0(0x12d))]('--regexNotIncludes\x20<regex>',A0(0x162))[A0(0x128)](['textNotIncludes',A0(0x136),A0(0x140)]))[A0(0xf5)](A0(0x166),A0(0x144),![])[A0(0x143)](new commander_1[(A0(0x12d))](A0(0x148),A0(0x12e))[A0(0x127)](Object['values']([A0(0x169),A0(0x134),A0(0x10a)]))),T;},this[i(0x107)]=(I,a,d,s)=>{const A1=i,{containerName:T,restoreId:V,backupId:g,quiet:u,tail:L,startTime:f,endTime:t,duration:m}=s;if(u===!![])return;const U=L?A1(0x141)+chalk_1[A1(0x13e)][A1(0x13f)]('\x27Ctrl+C\x27')+')':'',S=L?A1(0x14a):'',k=new Date(),e=f!==null&&f!==void 0x0?f:new Date(new Date((t!==null&&t!==void 0x0?t:k)[A1(0x146)]())[A1(0x130)]((t!==null&&t!==void 0x0?t:k)[A1(0x118)]()-(m!==null&&m!==void 0x0?m:this['defaultDurationSeconds']))),x=(t!==null&&t!==void 0x0?t:f!==undefined)?new Date(new Date(f[A1(0x146)]())[A1(0x130)](f['getSeconds']()+(m!==null&&m!==void 0x0?m:this[A1(0x16c)]))):k,o=g!==undefined,M=e&&!o?A1(0x14b)+chalk_1[A1(0x13e)]['bold'](e['toISOString']()):'',N=x&&!o?A1(0x11e)+chalk_1[A1(0x13e)][A1(0x13f)](x['toISOString']()):'',q=m?A1(0x137)+m+A1(0x159):'',K=T?'\x20for\x20container\x20'+chalk_1[A1(0x13e)][A1(0x13f)](T):o?'':A1(0x15b),y=g?',\x20backup\x20id\x20'+g:'',D=V?A1(0x16e)+V:'',l=I+'\x20'+chalk_1[A1(0x13e)][A1(0x13f)](a)+y+D+'\x20in\x20project\x20'+chalk_1[A1(0x13e)]['bold'](d),n=''+M+N+q;console['log'](A1(0x147)+S+K+A1(0x104)+l+n+U+':');},this[i(0x16d)]=(I,a)=>(d,s)=>{const A2=i;if(!I){if(d[A2(0x171)]===0x0)console[A2(0xfc)](A2(0x15c));d[A2(0x13b)](T=>(0x0,log_formatter_1[A2(0x15f)])(T,a));}else(0x0,console_format_helpers_1[A2(0x10e)])(I,d);(s===null||s===void 0x0?void 0x0:s[A2(0x139)])&&(0x0,utils_1[A2(0xf6)])(A2(0x103)+s['cursor']);},this[i(0x11a)]=new js_client_1['ApiClient'](A,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[i(0x17e)]}),this['logsApiClient']=this[i(0x11a)],this[i(0x10b)]=new inquirer_helper_1[(i(0x153))](this[i(0x11a)]);}[a10j(0x172)](A,I=![],a=![],d=![]){const A9=a10j,s=(f,t)=>__awaiter(this,void 0x0,void 0x0,function*(){const A3=a10I,m=t[A3(0x173)],{apiContext:U,inquirerHelper:S}=this;switch(A){case A3(0x11d):{const k=m?undefined:U[A3(0xf4)]();return t[A3(0x165)]||k||(yield S['askForService'](f)());}case A3(0xff):{const e=m?undefined:U[A3(0xf9)]();return t['jobId']||e||(yield S[A3(0x157)](f)());}case A3(0x11f):{return t[A3(0x129)]||(yield S[A3(0x106)](f)());}}}),T=(f,t,m)=>__awaiter(this,void 0x0,void 0x0,function*(){const A4=a10I;if(I)return m['buildId']||(yield this['inquirerHelper'][A4(0x10f)](f,A===A4(0x11d)?t:undefined,A===A4(0xff)?t:undefined,!![])());return undefined;}),V=(f,t,m)=>__awaiter(this,void 0x0,void 0x0,function*(){const A5=a10I;if(a||d)return m['backupId']||(yield this[A5(0x10b)]['askForAddonBackup'](f,t)());return undefined;}),g=(f,t,m,U)=>__awaiter(this,void 0x0,void 0x0,function*(){const A6=a10I;if(d)return U['restoreId']||(yield this[A6(0x10b)][A6(0x114)](f,t,m)());return undefined;}),u=(f,t,m)=>__awaiter(this,void 0x0,void 0x0,function*(){const A7=a10I;if(!I&&m[A7(0x110)]!==undefined){if(m[A7(0x110)]!==!![])return m[A7(0x110)];return yield this[A7(0x10b)][A7(0x145)](f,A==='service'?t:undefined,A==='job'?t:undefined,!![])();}return undefined;}),L=(f,t,m)=>__awaiter(this,void 0x0,void 0x0,function*(){const A8=a10I;if(A===A8(0xff))return m[A8(0x14e)]||(yield this[A8(0x10b)]['askForJobRun'](t,f,!![])());return undefined;});return this[A9(0x164)](A,I,a,d)[A9(0x168)](f=>__awaiter(this,void 0x0,void 0x0,function*(){const AA=A9,{noDefaults:t,projectId:m,quiet:U,tail:S,types:k,textIncludes:e,textNotIncludes:x,regexIncludes:o,regexNotIncludes:M,direction:N,lineLimit:q,startTime:K,endTime:y,duration:D,output:l}=f;(0x0,utils_1[AA(0x11c)])(this[AA(0x11a)]);const {apiContext:n,inquirerHelper:v,logsApiClient:X}=this,Q=t?undefined:n[AA(0x160)](),O=m||Q||(yield v[AA(0x156)]()),p=yield s(O,f),r=yield T(O,p,f),H=yield V(O,p,f),P=yield g(O,p,H,f),R=yield L(O,p,f),Z=yield u(O,p,f);if(K&&y&&D)throw new Error(AA(0x150));const B={'projectId':O,'entityId':p},E={'containerName':Z,'types':k,'textIncludes':e,'textNotIncludes':x,'regexIncludes':o,'regexNotIncludes':M,'lineLimit':q,'startTime':K,'duration':D,'runId':R,'buildId':r,'backupId':H,'restoreId':P,'isBuild':I!==null&&I!==void 0x0?I:![]},J=d?AA(0x16b):a?'addonBackup':A,b=Object['assign'](Object[AA(0x111)]({},E),{'endTime':y,'direction':N});if(!U&&l!==AA(0x10a)&&l!==AA(0xf8)&&l!==AA(0x134))this['printInitInfo'](A,p,O,Object[AA(0x111)](Object['assign']({},b),f));const Y=this['getFormatter'](l,e!==null&&e!==void 0x0?e:o);if(S){const F=yield X[AA(0x142)][AA(0x180)](B,E,J);F['on']('logs-received',Y),F['on'](AA(0x10d),c=>(0x0,utils_1[AA(0x10d)])(AA(0x132)+c[AA(0x116)])),F['on'](AA(0x121),()=>console[AA(0xfc)]('Log\x20session\x20ended')),yield F['start']();}else{const c=yield X['logs'][AA(0x13c)](B,b,J);if(c[AA(0x10d)]){const W=c[AA(0x10d)]['details'],C=W?'\x0aDetails:\x20'+JSON[AA(0x17c)](W,null,'\x20'):'';(0x0,utils_1[AA(0x10d)])(AA(0x17a)+c[AA(0x10d)][AA(0x116)]+C);}else Y(c[AA(0x17d)],c[AA(0x15e)]);}}));}}exports[a10j(0x175)]=CliLogs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';const a11f=a11I;function a11I(A,I){const a=a11A();return a11I=function(d,s){d=d-0x14b;let T=a[d];return T;},a11I(A,I);}(function(A,I){const L=a11I,a=A();while(!![]){try{const d=-parseInt(L(0x154))/0x1*(-parseInt(L(0x157))/0x2)+-parseInt(L(0x169))/0x3+-parseInt(L(0x16c))/0x4+parseInt(L(0x15d))/0x5*(parseInt(L(0x14b))/0x6)+parseInt(L(0x158))/0x7+parseInt(L(0x15c))/0x8+-parseInt(L(0x15e))/0x9*(parseInt(L(0x152))/0xa);if(d===I)break;else a['push'](a['shift']());}catch(s){a['push'](a['shift']());}}}(a11A,0x96bf3));var __importDefault=this&&this[a11f(0x14d)]||function(A){const t=a11f;return A&&A[t(0x164)]?A:{'default':A};};Object[a11f(0x160)](exports,'__esModule',{'value':!![]}),exports[a11f(0x163)]=exports[a11f(0x14e)]=void 0x0;function a11A(){const S=['formatLogLine','__esModule','dim','gray','yellow','default','2820471WqIapH','reduce','red','2126980YCRMpo','631254diEGwE','\x20--\x20','__importDefault','defaultLogSyntax','color','toISOString','cyan','2020IuHLbI','green','66841ddRTjr','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','pattern','14nZEwfn','4696363LDfQaq','replace','bold','containerId','4524128kagNAx','25jrvhuI','6282fFDEEE','blue','defineProperty','log','grey'];a11A=function(){return S;};return a11A();}const chalk_1=__importDefault(require('chalk'));exports[a11f(0x14e)]=[{'color':a11f(0x162),'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':a11f(0x162),'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':a11f(0x162),'pattern':/[0-9]{4}\/[0-9]{2}\/[0-9]{2}/i},{'color':'grey','pattern':/\s\b([0-9]{2}:){1,2}[0-9]{2}\b\s/i},{'color':a11f(0x15a),'pattern':new RegExp(a11f(0x155),'i')},{'color':a11f(0x153),'pattern':/(?:\d{1,3}\.){3}\d{1,3}/i},{'color':a11f(0x153),'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':a11f(0x15f),'pattern':/\b(GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH)\b/},{'color':'greenBright','pattern':/\b(successful|success|completed|complete|done)\b/i},{'color':a11f(0x16b),'pattern':/\b(failed|fail|stderr|error|err)\b/i},{'color':a11f(0x166),'pattern':/\b(information|info|debug)\b/i},{'color':a11f(0x167),'pattern':/\b(warning|warn)\b/i},{'color':a11f(0x15f),'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}];const formatLogLine=(A,I)=>{const m=a11f,a=chalk_1[m(0x168)][m(0x165)](A['ts'][m(0x150)]()),d=chalk_1[m(0x168)][m(0x151)](A[m(0x15b)]),s=exports[m(0x14e)][m(0x16a)]((V,g)=>{const U=m;return V[U(0x159)](g[U(0x156)],u=>g[U(0x14f)]?chalk_1[U(0x168)][g[U(0x14f)]](u):chalk_1[U(0x168)][U(0x162)](u));},A[m(0x161)]),T=I?s[m(0x159)](new RegExp(I,'g'),V=>chalk_1[m(0x168)]['bold'](V)):s;console['log'](a+'\x20'+d+m(0x14c)+T);};exports['formatLogLine']=formatLogLine;
|