@northflank/cli 0.9.15 → 0.9.16
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 -3
package/dist/exec/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a4D=a4o;(function(w,o){const x=a4o,C=w();while(!![]){try{const R=-parseInt(x(0x154))/0x1+parseInt(x(0x162))/0x2+-parseInt(x(0x185))/0x3*(parseInt(x(0x14a))/0x4)+-parseInt(x(0x141))/0x5+-parseInt(x(0x12e))/0x6+parseInt(x(0x14f))/0x7+parseInt(x(0x158))/0x8*(parseInt(x(0x190))/0x9);if(R===o)break;else C['push'](C['shift']());}catch(M){C['push'](C['shift']());}}}(a4w,0x6c7ff));function a4o(w,o){const C=a4w();return a4o=function(R,M){R=R-0x129;let I=C[R];return I;},a4o(w,o);}var __awaiter=this&&this[a4D(0x189)]||function(w,o,C,R){function M(I){return I instanceof C?I:new C(function(l){l(I);});}return new(C||(C=Promise))(function(I,l){const N=a4o;function a(F){const t=a4o;try{e(R[t(0x12b)](F));}catch(Q){l(Q);}}function H(F){const g=a4o;try{e(R[g(0x18c)](F));}catch(Q){l(Q);}}function e(F){const h=a4o;F['done']?I(F['value']):M(F[h(0x156)])[h(0x179)](a,H);}e((R=R[N(0x151)](w,o||[]))['next']());});},__importDefault=this&&this['__importDefault']||function(w){const T=a4D;return w&&w[T(0x150)]?w:{'default':w};};Object[a4D(0x178)](exports,'__esModule',{'value':!![]}),exports[a4D(0x191)]=void 0x0;function a4w(){const S=['join','execCmd','without\x20shell','Command\x20exec\x20for\x20the\x20specified\x20','Command\x20to\x20execute.\x0aIf\x20--shell-cmd\x20option\x20such\x20as\x20\x27bash\x20-c\x27\x20is\x20present,\x20it\x20will\x20run\x20in\x20the\x20specified\x20shell.\x20Otherwise\x20the\x20command\x20will\x20run\x20without\x20a\x20shell.\x20If\x20no\x20command\x20is\x20provided,\x20an\x20interactive\x20session\x20with\x20stdin\x20and\x20tty\x20is\x20opened.','assertContextExisting','none',',\x20details:\x20','defineProperty','then','bold','.\x0aExamples:\x0a\x20\x20Shell\x20session:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20northflank\x20exec\x20','getCurrentProjectName','isTTY','waitForCommandResult','getTerminalSize','../inquirer-helper','@northflank/js-client','exitCode','exec','--container\x20--containerId\x20[NAME]','411esGWQF','status','exit','\x20to\x20exec\x20into','__awaiter','resizeTerminal','getStandardExecCommand','throw','greenBright','command-exec','charAt','263178osNFJu','CliExec','customUserAgent','filter','action','\x20in\x20project\x20','execServiceSession','stdIn','Container\x20to\x20exec\x20into\x20(random\x20container\x20will\x20be\x20chosen\x20if\x20not\x20specified)','execStartLog','service','next','with\x20shell\x20session','columns','3658446gPRYzi','getCommand','Command\x20execution\x20(exec)\x20for\x20Northflank\x20services\x20and\x20jobs.','execJobSession','pipe','with\x20command\x20\x27','toUpperCase','success','\x20--','stdout','getCurrentServiceName','option','Id\x20[NAME]','alias','Project\x20for\x20exec','warning','--shell-cmd\x20[SHELL-CMD]','stdin','--cmd\x20--command\x20[COMMAND]','1868240qRCIEv','askForJob','slice','../utils','Run\x20command\x20with\x20this\x20group','keypress','askForProject','chalk','InquirerHelper','2372LdXUsi','shell\x20command\x20','Run\x20command\x20with\x20shell\x20(e.g.\x20\x27bash\x27,\x27sh\x27).\x0aIf\x20not\x20set\x20and\x20no\x20command\x20is\x20provided,\x20several\x20standard\x20shells\x20will\x20be\x20attempted.\x20If\x20not\x20set\x20and\x20a\x20command\x20is\x20provided,\x20the\x20command\x20will\x20run\x20without\x20shell.','setRawMode','description','1942311SrdvMu','__esModule','apply','emitKeypressEvents','apiClient','677099vPzPeF','with\x20group:','value','resize','488pvJsCQ','job','message','askForService','with\x20user:','--group\x20[GROUP]','log','\x20command\x20exec:\x20','--user\x20[USER]','sequence','249818IrINLu','\x20--cmd\x20\x27date\x27\x0a\x20\x20Single\x20command,\x20custom\x20shell:\x20northflank\x20exec\x20','name',',\x20exit\x20code:\x20','(exit\x20with\x20two\x20quick\x20','handleShellSession','error','\x20--shell-cmd\x20\x27sh\x27','Run\x20command\x20with\x20this\x20user','stderr','rows','readline','addCommand','default'];a4w=function(){return S;};return a4w();}const js_client_1=require(a4D(0x181)),chalk_1=__importDefault(require(a4D(0x148))),utils_1=require(a4D(0x144)),inquirer_helper_1=require(a4D(0x180));class CliExec{constructor(w){const s=a4D;this[s(0x18b)]=M=>(0x0,utils_1[s(0x12f)])(!![])[s(0x164)](M)[s(0x14e)](s(0x173)+M+s(0x17b)+M+'\x0a\x20\x20Single\x20command,\x20no\x20shell:\x20\x20\x20\x20\x20northflank\x20exec\x20'+M+s(0x163)+M+'\x20--cmd\x20\x27\x22ls\x20-l\x20/usr\x22\x27\x20--shell-cmd\x20\x27bash\x20-c\x27\x0a\x20\x20Shell\x20session,\x20custom\x20shell:\x20\x20northflank\x20exec\x20'+M+s(0x169))[s(0x139)]('--project\x20--projectId\x20[NAME]',s(0x13c))[s(0x139)]('--'+M+s(0x136)+M+s(0x13a),M[s(0x18f)](0x0)[s(0x134)]()+M[s(0x143)](0x1)+s(0x188))['option'](s(0x184),s(0x198))[s(0x139)](s(0x13e),s(0x14c))['option'](s(0x160),s(0x16a))[s(0x139)](s(0x15d),s(0x145))[s(0x139)]('--noDefaults','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.',![])[s(0x139)](s(0x140),s(0x174)),this[s(0x17f)]=()=>({'columns':process['stdout'][s(0x12d)],'rows':process[s(0x137)][s(0x16c)]}),this['execStartLog']=(M,I,l,a,H,e,F,Q)=>{const d=s;if(Q===!![])return;const L=a===d(0x176),z=L?d(0x172):a===undefined?d(0x12c):d(0x14b)+chalk_1[d(0x16f)][d(0x18d)](a),i=H!==undefined?d(0x15c)+H:'',q=e!==undefined?d(0x155)+e:'',m=F!==undefined?d(0x133)+chalk_1[d(0x16f)][d(0x18d)](F)+'\x27':'',k=[m,z,i,q][d(0x193)](n=>n!=='')[d(0x170)]('\x20'),K=d(0x166)+chalk_1[d(0x16f)][d(0x17a)]('\x27Ctrl+D\x27')+')';console[d(0x15e)]('Exec\x20'+M+'\x20'+chalk_1[d(0x16f)][d(0x17a)](I)+d(0x195)+chalk_1['default'][d(0x17a)](l)+'\x20'+k+'\x20'+K);},this[s(0x167)]=(M,I,l=![])=>__awaiter(this,void 0x0,void 0x0,function*(){const p=s;var a,H;let e=![];try{if(process[p(0x13f)]['isTTY']){const Q=require(p(0x16d));Q[p(0x152)](process[p(0x13f)]),process['stdin'][p(0x14d)](!![]),process[p(0x137)]['on'](p(0x157),()=>{const E=p;M[E(0x18a)](this[E(0x17f)]());}),process[p(0x13f)]['on'](p(0x146),(L,z)=>{const j=p;z[j(0x161)]==='\x04'&&(e?(process[j(0x13f)][j(0x14d)](![]),(0x0,utils_1[j(0x13d)])('Received\x20Ctrl+D\x20twice,\x20exiting\x20shell\x20forcefully.'),process[j(0x187)]()):(e=!![],setTimeout(()=>e=![],0x190)));});}process['stdin'][p(0x132)](M[p(0x197)]),M['stdErr'][p(0x132)](process[p(0x16b)]),M['stdOut']['pipe'](process['stdout']),M['on'](p(0x168),L=>{const X=p;var z;(0x0,utils_1['error'])('Error\x20occured\x20during\x20'+I+X(0x15f)+((z=L[X(0x15a)])!==null&&z!==void 0x0?z:L)),process['stdin']['isTTY']&&process[X(0x13f)]['setRawMode'](![]),process['exit'](-0x1);});const F=yield M[p(0x17e)]();if(l!==!![]){const L=(a=F===null||F===void 0x0?void 0x0:F[p(0x186)])!==null&&a!==void 0x0?a:'Unknown',z=(H=F===null||F===void 0x0?void 0x0:F[p(0x182)])!==null&&H!==void 0x0?H:-0x1,i=(F===null||F===void 0x0?void 0x0:F[p(0x15a)])?p(0x177)+F[p(0x15a)]:'';L==='Success'?(0x0,utils_1[p(0x135)])('Command\x20completed\x20successfully,\x20exit\x20code:\x20'+z):(0x0,utils_1['warning'])('Command\x20didn\x27t\x20complete\x20successfully,\x20status:\x20'+L+p(0x165)+z+i);}return F;}finally{process['stdin'][p(0x17d)]&&process[p(0x13f)][p(0x14d)](![]);}}),this['apiClient']=new js_client_1['ApiClient'](w,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[s(0x192)]});const o=new inquirer_helper_1[(s(0x149))](this[s(0x153)]);this[s(0x171)]=(0x0,utils_1[s(0x12f)])()[s(0x164)](s(0x18e))[s(0x13b)]('exec')[s(0x14e)](s(0x130));const C=this['getStandardExecCommand'](s(0x12a))[s(0x194)](M=>__awaiter(this,void 0x0,void 0x0,function*(){const b=s,{noDefaults:I,projectId:l,serviceId:a,containerId:H,shellCmd:F,user:Q,group:L,command:z,quiet:i}=M;(0x0,utils_1[b(0x175)])(this['apiClient']);try{const q=I?undefined:w[b(0x17c)](),m=l||q||(yield o['askForProject']()),k=I?undefined:w[b(0x138)](),K=a||k||(yield o[b(0x15b)](m)()),n=F!==null&&F!==void 0x0?F:z!==undefined?b(0x176):undefined;this['execStartLog'](b(0x12a),K,m,n,Q,L,z,i);const W=process[b(0x137)]['columns'],O=process['stdout'][b(0x16c)],r={'projectId':m,'serviceId':K},c=yield this['apiClient']['exec'][b(0x196)](r,{'containerName':H,'command':z,'shell':n,'user':Q,'group':L,'ttyColumns':W,'ttyRows':O});yield this['handleShellSession'](c,b(0x12a),i);}catch(A){(0x0,utils_1['error'])(''+A[b(0x15a)]);}finally{process['exit']();}})),R=this[s(0x18b)](s(0x159))[s(0x194)](M=>__awaiter(this,void 0x0,void 0x0,function*(){const u=s,{projectId:I,jobId:l,containerId:a,noDefaults:H,shellCmd:F,user:Q,group:L,command:z,quiet:i}=M;(0x0,utils_1[u(0x175)])(this[u(0x153)]);try{const q=H?undefined:w[u(0x17c)](),m=I||q||(yield o[u(0x147)]()),k=l||(yield o[u(0x142)](m)());this[u(0x129)](u(0x159),k,m,F,i);const {rows:K,columns:n}=this[u(0x17f)](),W={'projectId':m,'jobId':k},O=yield this[u(0x153)][u(0x183)][u(0x131)](W,{'containerName':a,'command':z,'shell':F,'user':Q,'group':L,'ttyColumns':n,'ttyRows':K});yield this[u(0x167)](O,u(0x159),i);}catch(r){(0x0,utils_1[u(0x168)])(''+r[u(0x15a)]);}finally{process[u(0x187)]();}}));this[s(0x171)]['addCommand'](C),this[s(0x171)][s(0x16e)](R);}}exports[a4D(0x191)]=CliExec;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a5r=a5o;(function(w,o){const O=a5o,C=w();while(!![]){try{const R=-parseInt(O(0x101))/0x1*(-parseInt(O(0xe9))/0x2)+parseInt(O(0x103))/0x3+parseInt(O(0xe5))/0x4+-parseInt(O(0xe7))/0x5+-parseInt(O(0x108))/0x6*(-parseInt(O(0xe4))/0x7)+-parseInt(O(0xf8))/0x8+parseInt(O(0xfd))/0x9;if(R===o)break;else C['push'](C['shift']());}catch(M){C['push'](C['shift']());}}}(a5w,0x4c622));function a5o(w,o){const C=a5w();return a5o=function(R,M){R=R-0xe4;let I=C[R];return I;},a5o(w,o);}var __awaiter=this&&this[a5r(0x106)]||function(w,o,C,R){function M(I){return I instanceof C?I:new C(function(l){l(I);});}return new(C||(C=Promise))(function(I,l){const x=a5o;function a(F){try{e(R['next'](F));}catch(Q){l(Q);}}function H(F){const c=a5o;try{e(R[c(0x105)](F));}catch(Q){l(Q);}}function e(F){const A=a5o;F['done']?I(F[A(0xf6)]):M(F[A(0xf6)])[A(0xeb)](a,H);}e((R=R[x(0x102)](w,o||[]))[x(0xfb)]());});},__importDefault=this&&this['__importDefault']||function(w){const D=a5r;return w&&w[D(0xea)]?w:{'default':w};};Object[a5r(0x104)](exports,a5r(0xea),{'value':!![]}),exports[a5r(0xf1)]=void 0x0;const chalk_1=__importDefault(require('chalk')),utils_1=require(a5r(0xf3));function getCommandOverview(w){const t=a5r;return(0x0,utils_1[t(0x100)])()[t(0xef)](t(0x107))[t(0xff)](t(0xfa))[t(0xf5)](t(0xfc),t(0xf4))['action'](o=>__awaiter(this,void 0x0,void 0x0,function*(){const {verbose:C}=o;function R(M,I){const g=a5o;var l;const a=(K,n=!![])=>n?chalk_1[g(0xe6)][g(0xec)][g(0xf9)](K[g(0xef)]()):K[g(0xef)](),H=I[g(0xf7)]===0x0,e=M[g(0xfe)];let F='';const Q=e['length']===0x0,L=Q||((l=Object['keys'](M===null||M===void 0x0?void 0x0:M[g(0xed)]()))===null||l===void 0x0?void 0x0:l[g(0xf7)])>0x0;!H&&(F=e&&!Q?'┬\x20':'─\x20');const z=C&&L&&M['description']()?':\x20'+M[g(0xff)]():'';console[g(0xf2)](''+I+F+a(M,L)+z);let i=I;if(!H){const K=I[g(0xe8)](-0x2)==='└─';i=I[g(0xe8)](0x0,-0x2)+(K?'\x20\x20':'│\x20');}const q=i+'├─',m=i+'└─',k=e['every'](n=>n[g(0xfe)][g(0xf7)]===0x0);k&&!Q&&!C?console[g(0xf2)](m+'\x20'+e[g(0xf0)](n=>a(n))['join'](',\x20')):e[g(0xee)]((n,W)=>{const h=g;R(n,e[h(0xf7)]-0x1===W?m:q);});}R(w,'');}));}function a5w(){const N=['__awaiter','command-overview','1146PobEfL','10171rTfSri','69172GRnFAv','default','1993795jQAQih','slice','2suXwrg','__esModule','then','bold','opts','forEach','name','map','getCommandOverview','log','../utils','Print\x20command\x20descriptions','option','value','length','2263944kLJqlT','green','Prints\x20a\x20tree\x20view\x20of\x20all\x20available\x20commands','next','--verbose','1344285fEZLpj','commands','description','getCommand','379439sMRqaX','apply','512994zxbGpp','defineProperty','throw'];a5w=function(){return N;};return a5w();}exports[a5r(0xf1)]=getCommandOverview;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a6q=a6o;(function(w,o){const i=a6o,C=w();while(!![]){try{const R=-parseInt(i(0x1de))/0x1*(parseInt(i(0x1b8))/0x2)+parseInt(i(0x1e3))/0x3+-parseInt(i(0x1f0))/0x4+parseInt(i(0x1ef))/0x5*(-parseInt(i(0x1d4))/0x6)+parseInt(i(0x1e5))/0x7*(parseInt(i(0x1e0))/0x8)+parseInt(i(0x1df))/0x9*(-parseInt(i(0x1cc))/0xa)+-parseInt(i(0x1ee))/0xb*(-parseInt(i(0x1cf))/0xc);if(R===o)break;else C['push'](C['shift']());}catch(M){C['push'](C['shift']());}}}(a6w,0x45832));var __createBinding=this&&this[a6q(0x1c1)]||(Object[a6q(0x1d5)]?function(w,C,R,M){const m=a6q;if(M===undefined)M=R;var I=Object[m(0x1eb)](C,R);(!I||(m(0x1bc)in I?!C[m(0x1b9)]:I[m(0x1bb)]||I[m(0x1c0)]))&&(I={'enumerable':!![],'get':function(){return C[R];}}),Object[m(0x1ea)](w,M,I);}:function(w,C,R,M){if(M===undefined)M=R;w[M]=C[R];}),__setModuleDefault=this&&this[a6q(0x1b7)]||(Object['create']?function(w,C){const k=a6q;Object['defineProperty'](w,k(0x1dc),{'enumerable':!![],'value':C});}:function(w,C){const K=a6q;w[K(0x1dc)]=C;}),__importStar=this&&this[a6q(0x1f2)]||function(w){const n=a6q;if(w&&w[n(0x1b9)])return w;var o={};if(w!=null){for(var C in w)if(C!==n(0x1dc)&&Object['prototype']['hasOwnProperty'][n(0x1c5)](w,C))__createBinding(o,w,C);}return __setModuleDefault(o,w),o;},__importDefault=this&&this[a6q(0x1d8)]||function(w){const W=a6q;return w&&w[W(0x1b9)]?w:{'default':w};};Object['defineProperty'](exports,a6q(0x1b9),{'value':!![]}),exports['printResponse']=exports[a6q(0x1da)]=exports[a6q(0x1d7)]=exports[a6q(0x1ec)]=exports[a6q(0x1ca)]=exports[a6q(0x1f1)]=void 0x0;const chalk_1=__importDefault(require(a6q(0x1cd))),_=__importStar(require(a6q(0x1ed))),util=__importStar(require(a6q(0x1f4))),yaml=require(a6q(0x1bf)),columnify=require(a6q(0x1c8));function a6o(w,o){const C=a6w();return a6o=function(R,M){R=R-0x1b5;let I=C[R];return I;},a6o(w,o);}function printAsTable(w,o,C,R=![],M=0x0){const O=a6q;!R&&console[O(0x1f5)](''+chalk_1['default'][O(0x1ba)](o));function I(a){const r=O;return a===r(0x1e4)?a:a[r(0x1c7)]('disabled','');}function l(a,H){const A=O;function e(Q){const c=a6o,L=new Date(Q);return L[c(0x1d3)]()+'/'+L[c(0x1f7)]()+'/'+L[c(0x1e9)]()+'\x0a'+L['getHours']()+':'+L['getMinutes']()+':'+L[c(0x1e2)]();}const F=[A(0x1d0),'updatedat'];if(F[A(0x1b6)](H[A(0x1e8)]())&&_[A(0x1bd)](a)&&a[A(0x1ce)]()[A(0x1db)]===0xd)return e(Number(a));if(_[A(0x1d9)](a)){if(H!==A(0x1e4)&&H[A(0x1b6)](A(0x1e4)))return a?'x':'✔';return a?'✔':'x';}if(_[A(0x1c6)](a))return util[A(0x1f8)](a,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});return a;}if(_['isArrayLike'](w)){w[O(0x1db)]===0x0&&console[O(0x1f5)](O(0x1dd)+o['toLowerCase']()+O(0x1c9));const a=w[O(0x1be)]((F,Q)=>{const x=O,L={'i':Q+M};return Object['keys'](F)[x(0x1d6)](z=>{const D=x;(_[D(0x1c3)](C)||C[D(0x1b6)](z[D(0x1e8)]()))&&_['set'](L,I(z),l(F[z],z));}),L;}),H=_[O(0x1c2)](Object[O(0x1d1)]((a===null||a===void 0x0?void 0x0:a[0x0])||[]))[O(0x1e6)]((F,Q)=>{const L=z=>z!=='i'?z!=='internalId'?0x0:0x1:0x2;return L(Q)-L(F);}),e={'maxWidth':0x1e,'preserveNewLines':!![],'showHeaders':!R,'config':{'_id':{'maxWidth':0x5,'truncate':!![]},'i':{'showHeaders':![]}},'columns':H};console[O(0x1f5)](columnify(a,e));}else console[O(0x1f5)](w);}exports[a6q(0x1f1)]=printAsTable;function consoleFormat(w,o){const t=a6q;if(_[t(0x1e7)](w)){const C=o?t(0x1cb)+o+')':'';return chalk_1[t(0x1dc)][t(0x1e1)]('The\x20request\x20was\x20completed\x20successfully')+C;}if(!_[t(0x1c6)](w))return w===null||w===void 0x0?void 0x0:w['toString']();return util[t(0x1f8)](w,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});}exports[a6q(0x1ca)]=consoleFormat;function a6w(){const s=['length','default','No\x20','1snGCTi','69948NwREQr','3560zUvXrE','green','getSeconds','1423533QJKPkf','disabled','343PbjCxW','sort','isEmpty','toLowerCase','getFullYear','defineProperty','getOwnPropertyDescriptor','handleJsonOutput','lodash','111661gHtMBh','5MLLzqy','1341248MOryjH','printAsTable','__importStar','printResponse','util','log','stringify','getMonth','inspect','format','json','yaml','includes','__setModuleDefault','903410LGpoQy','__esModule','bold','writable','get','isFinite','map','js-yaml','configurable','__createBinding','clone','isUndefined','safeDump','call','isObjectLike','replace','columnify','\x20found','consoleFormat','\x20(HTTP\x20status:\x20','670UqkvwX','chalk','toString','1572LMAzWG','createdat','keys','yml','getDate','1401804skrqJP','create','forEach','handleYamlOutput','__importDefault','isBoolean','handleFormattedOutput'];a6w=function(){return s;};return a6w();}const handleJsonOutput=(w,o)=>{const g=a6q,C=w===g(0x1fa);if(C)console[g(0x1f5)](JSON[g(0x1f6)](o,null,'\x20'));};exports[a6q(0x1ec)]=handleJsonOutput;const handleYamlOutput=(w,o)=>{const h=a6q,C=w===h(0x1b5)||w===h(0x1d2);if(C)console['log'](yaml[h(0x1c4)](o));};exports['handleYamlOutput']=handleYamlOutput;const handleFormattedOutput=(w,o)=>{const N=a6q,C=w===N(0x1f9);if(C)console[N(0x1f5)](consoleFormat(o));};exports['handleFormattedOutput']=handleFormattedOutput;const printResponse=(w,o)=>{const T=a6q;(0x0,exports['handleJsonOutput'])(w,o),(0x0,exports[T(0x1d7)])(w,o),(0x0,exports['handleFormattedOutput'])(w,o);};exports[a6q(0x1f3)]=printResponse;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a7J=a7o;(function(w,o){const B=a7o,C=w();while(!![]){try{const R=parseInt(B(0x158))/0x1+parseInt(B(0x156))/0x2+parseInt(B(0x150))/0x3+-parseInt(B(0x152))/0x4*(-parseInt(B(0x169))/0x5)+parseInt(B(0x155))/0x6+parseInt(B(0x15b))/0x7*(parseInt(B(0x146))/0x8)+-parseInt(B(0x159))/0x9;if(R===o)break;else C['push'](C['shift']());}catch(M){C['push'](C['shift']());}}}(a7w,0xb4191));var __importDefault=this&&this[a7J(0x162)]||function(w){const Y=a7J;return w&&w[Y(0x16b)]?w:{'default':w};};Object[a7J(0x149)](exports,a7J(0x16b),{'value':!![]}),exports[a7J(0x15a)]=exports['getAsciiChart']=void 0x0;const chalk_1=__importDefault(require(a7J(0x160))),colored=(w,o)=>{return o===undefined?w:chalk_1['default'][o](w);},getAsciiChart=(w,o={})=>{const w0=a7J,C=Array['isArray'](w[0x0])?w:[w];let R=typeof o['min']!=='undefined'?o[w0(0x144)]:C[0x0][0x0],M=typeof o['max']!==w0(0x141)?o[w0(0x165)]:C[0x0][0x0];for(let r=0x0;r<C[w0(0x14b)];r++){for(let c=0x0;c<C[r][w0(0x14b)];c++){R=Math['min'](R,C[r][c]),M=Math[w0(0x165)](M,C[r][c]);}}let I=['┼','┤','╶','╴','─','╰','╭','╮','╯','│'],l=Math[w0(0x157)](M-R),a=typeof o[w0(0x164)]!==w0(0x141)?o[w0(0x164)]:0x3,H=typeof o[w0(0x145)]!==w0(0x141)?o[w0(0x145)]:w0(0x15c),e=typeof o[w0(0x166)]!==w0(0x141)?o[w0(0x166)]:l,F=typeof o[w0(0x167)]!=='undefined'?o['colors']:[w0(0x15f),w0(0x168),w0(0x151),w0(0x140),w0(0x16a)],Q=l!==0x0?e/l:0x1,L=Math[w0(0x147)](R*Q),z=Math['round'](M*Q),q=Math['abs'](z-L),m=0x0;for(let A=0x0;A<C['length'];A++){m=Math[w0(0x165)](m,C[A][w0(0x14b)]);}m=m+a;let k=typeof o['symbols']!==w0(0x141)?o[w0(0x154)]:I,K=o[w0(0x15e)]!==undefined?o[w0(0x15e)]:function(D){const w1=w0;return(H+D[w1(0x143)](0x2)+o[w1(0x15d)])[w1(0x14c)](-H['length']);},n=new Array(q+0x1);for(let D=0x0;D<=q;D++){n[D]=new Array(m);for(let t=0x0;t<m;t++){n[D][t]='\x20';}}for(let g=L;g<=z;++g){const h=K(q>0x0?M-(g-L)*l/q:g,g-L);n[g-L][Math[w0(0x165)](a-h[w0(0x14b)],0x0)]=h,n[g-L][a-0x1]=g==0x0?k[0x0]:k[0x1];}for(let N=0x0;N<C['length'];N++){let T=F[N%F[w0(0x14b)]],s=Math[w0(0x147)](C[N][0x0]*Q)-L;n[q-s][a-0x1]=colored(k[0x0],T);for(let d=0x0;d<C[N]['length']-0x1;d++){let p=Math[w0(0x147)](C[N][d+0x0]*Q)-L,E=Math[w0(0x147)](C[N][d+0x1]*Q)-L;if(p==E)n[q-p][d+a]=colored(k[0x4],T);else{n[q-E][d+a]=colored(p>E?k[0x5]:k[0x6],T),n[q-p][d+a]=colored(p>E?k[0x7]:k[0x8],T);let X=Math[w0(0x144)](p,E),b=Math['max'](p,E);for(let u=X+0x1;u<b;u++){n[q-u][d+a]=colored(k[0x9],T);}}}}const {startTs:W,endTs:O}=o;if(W||O){const S=U=>{const w2=w0;if(!U)return w2(0x161);const v=U[w2(0x163)](undefined,{'day':w2(0x14f),'month':'2-digit','year':'2-digit'}),P=U['toLocaleTimeString'](undefined,{'hourCycle':w2(0x142)});return v+'\x20'+P;},V=S(O),f=S(W),Z=H[w0(0x14c)](0x0,Math['max'](0x2,H['length']-f['length']/0x2+0x1)),G='\x20'[w0(0x14a)](Math[w0(0x165)](m-(H[w0(0x14b)]+V['length']/0x2),0x1));n[w0(0x14d)]([''+Z+f+G+V]),n[w0(0x14d)]([]);}return n['map'](U=>U[w0(0x148)](''))[w0(0x148)]('\x0a');};exports[a7J(0x14e)]=getAsciiChart;const downSampleData=(w,o)=>{const w3=a7J,C=w[w3(0x14b)];if(o>=C||o===0x0)return w;const R=[];let M=0x0;const I=(C-0x2)/(o-0x2);let l=0x0,H,e,F,Q;R[M++]=w[l];for(var L=0x0;L<o-0x2;L++){let n=0x0,W=0x0,O=Math[w3(0x153)]((L+0x1)*I)+0x1,r=Math[w3(0x153)]((L+0x2)*I)+0x1;r=r<C?r:C;var z=r-O;for(;O<r;O++){n+=w[O][0x0],W+=w[O][0x1];}n/=z,W/=z;var q=Math[w3(0x153)](L*I)+0x1,m=Math[w3(0x153)]((L+0x1)*I)+0x1,k=w[l][0x0],K=w[l][0x1];e=F=-0x1;for(;q<m;q++){F=Math[w3(0x157)]((k-n)*(w[q][0x1]-K)-(k-w[q][0x0])*(W-K))*0.5,F>e&&(e=F,H=w[q],Q=q);}R[M++]=H,l=Q;}return R[M++]=w[C-0x1],R;};exports[a7J(0x15a)]=downSampleData;function a7o(w,o){const C=a7w();return a7o=function(R,M){R=R-0x140;let I=C[R];return I;},a7o(w,o);}function a7w(){const w4=['round','join','defineProperty','repeat','length','slice','push','getAsciiChart','2-digit','1771869fqKnxe','green','110756GuMyMi','floor','symbols','814674GFTXUq','1536650llASAo','abs','674834XBJAOu','17226783iuBINm','downSampleData','7jnVjsf','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','unit','format','blue','chalk','\x20\x20\x20','__importDefault','toLocaleDateString','offset','max','height','colors','red','65kgjHqL','black','__esModule','grey','undefined','h24','toFixed','min','padding','978000xlWKcR'];a7w=function(){return w4;};return a7w();}
|
package/dist/inquirer-helper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function a8Q(){const Qu=['pagination-prompt','isObject','getPathString','join','1012449LNTQqH','token','domains','job:\x20\x27','./utils','split','must\x20be\x20bigger\x20than\x20or\x20equal\x20to\x20','startedAt','setPathVars','No,\x20but\x20save\x20as\x20file','template\x20run','registryCredentials','tmpCmdPath','No,\x20repeat','max','services','backups','\x20(startedAt:\x20','volumes','logSinks','isBoolean','\x20characters,\x20is\x20','success','Writing\x20configuration\x20failed:\x20','blue','then','yaml','apiClient','projects','stringify','inquirer-search-list','safeLoad','domain\x20(','confirmationPrompt','isValidJSON','ask','askForService','.\x20This\x20is\x20irreversible.\x20Please\x20confirm!','6698590YGSuSu','must\x20be\x20longer\x20than\x20or\x20equal\x20to\x20','__awaiter','anyOf','defineProperty','getOwnPropertyDescriptor','boolean','create','isUndefined','SAVE','askArrayEntry','Go\x20to\x20editor','InquirerHelper','job\x20runs','list','askConfirm','Template\x20id\x20not\x20provided.','templates','askForLogSink','builds','yellowBright','don\x27t\x20change','No\x20containers\x20found','unshift','main-context','override','all-builds','value','getQuestionString','Please\x20confirm\x20following\x20configuration:\x0a','\x20type?','minimum','Choose\x20the\x20','uri','pathVars','Provide\x20a\x20file\x20path\x20to\x20write\x20the\x20configuration\x20to\x20(<name>.[json|yaml|yml])','configurable','\x20(completedAt:\x20','askForSubdomainPath','askForProjectScopedResource','Configuration\x20file\x20written\x20to\x20','\x20and\x20it\x20','must\x20be\x20a\x20valid\x20non-empty\x20json\x20string','volume','doesn\x27t\x20match\x20pattern\x20\x27','properties','__esModule','js-yaml','password','containers','__importDefault','__createBinding','map','validate','charAt','log\x20sink','filter','subdomain','What\x27s\x20the\x20','bgGrey','isNaN','runs','Do\x20you\x20want\x20to\x20add','default','askForSecret','job\x20builds','yml','greenBright','No,\x20edit','pattern','./api-helpers','chalk','example','credentials','askForJob','confirm','path','service\x20containers','Yes,\x20send','trim','69114KhzRfe','test','Should\x20it\x20be','find','for\x20this\x20','Aborted.','not\x20completed','No\x20','613112Eqotay','askForVolume','getType','73773QcgtIl','6GaZWER','askGeneric','Choose\x20the\x20name\x20of\x20the\x20new\x20local\x20context:','safeDump','must\x20be\x20shorter\x20than\x20or\x20equal\x20to\x20','askForAddonRestore','\x20characters','prototype','REPEAT','askForSubdomain','nextPageCursor','warning','items','toUpperCase','all-containers','askForPipeline','service:\x20\x27','bold','confirmation','propToType','subdomains','must\x20be\x20a\x20number,\x20is\x20','createdAt','contextProvider','registerPrompt','isEmpty','templateRuns','533715OGkaUF','\x20to\x20use:','has','subdomainPath','YES','service','keys','askForJobRun','job','push','body','askForTemplateRun','addon','oneOf','retrievePayloadViaInteractiveCli','askForResource','181215hcrEPy','maximum','values','done','paths','all-job-runs','length','message','found','assign','isArray','slice','resultCache','project:\x20\x27','),\x20subdomain\x20(','log','Context\x20name\x20already\x20exists.','Do\x20you\x20want\x20to\x20add\x20more','string','apply','pipelines','repeat','hasOwnProperty','toString','askForProjectScopedResourcePaginated','cmdPath','blueBright','choice','restores','askForContainer','integer','get','addons','pagination','description','cursor','underline','call','throw','fileName','DynamicReloadPaginationPrompt','input','editPayload','176ZjgVpY','rawObject','minLength','jobs','red','editedResult','data','getInnerType','Enter\x20the\x20','a\x20Northflank\x20resource','80mXMaVu','getCurrentProjectName','__setModuleDefault','pipeline','concat','Unexpected\x20file\x20type:\x20','askForResourcePaginated','deleteWarningPrompt','secrets','maxLength','tokenPrompt','writeFileSync','inquirer','\x20in\x20',',\x20supported\x20types:\x20[json|yaml|yml]','No,\x20abort','type','askForProject','prompt','object','search-list','whiteBright','set','ABORT','addEntry','No\x20builds\x20found','defaultPaginationPageSize','name','__importStar'];a8Q=function(){return Qu;};return a8Q();}const a8O=a8L;(function(Q,L){const g=a8L,z=Q();while(!![]){try{const A=-parseInt(g(0x270))/0x1*(-parseInt(g(0x271))/0x2)+parseInt(g(0x1ef))/0x3+-parseInt(g(0x26d))/0x4+parseInt(g(0x1ce))/0x5*(parseInt(g(0x265))/0x6)+-parseInt(g(0x189))/0x7+-parseInt(g(0x1c4))/0x8*(-parseInt(g(0x199))/0x9)+-parseInt(g(0x215))/0xa;if(A===L)break;else z['push'](z['shift']());}catch(b){z['push'](z['shift']());}}}(a8Q,0x45fe6));var __createBinding=this&&this[a8O(0x248)]||(Object[a8O(0x21c)]?function(Q,L,z,A){const Y=a8O;if(A===undefined)A=z;var b=Object[Y(0x21a)](L,z);(!b||('get'in b?!L[Y(0x243)]:b['writable']||b[Y(0x239)]))&&(b={'enumerable':!![],'get':function(){return L[z];}}),Object[Y(0x219)](Q,A,b);}:function(Q,L,z,A){if(A===undefined)A=z;Q[A]=L[z];}),__setModuleDefault=this&&this[a8O(0x1d0)]||(Object['create']?function(Q,L){const j=a8O;Object[j(0x219)](Q,'default',{'enumerable':!![],'value':L});}:function(Q,L){const B=a8O;Q[B(0x254)]=L;}),__importStar=this&&this[a8O(0x1ea)]||function(Q){const l=a8O;if(Q&&Q[l(0x243)])return Q;var L={};if(Q!=null){for(var z in Q)if(z!==l(0x254)&&Object[l(0x278)][l(0x1af)][l(0x1be)](Q,z))__createBinding(L,Q,z);}return __setModuleDefault(L,Q),L;},__awaiter=this&&this[a8O(0x217)]||function(Q,L,z,A){function b(M){return M instanceof z?M:new z(function(S){S(M);});}return new(z||(z=Promise))(function(M,S){const E=a8L;function k(Z){try{q(A['next'](Z));}catch(V){S(V);}}function i(Z){const o=a8L;try{q(A[o(0x1bf)](Z));}catch(V){S(V);}}function q(Z){const r=a8L;Z[r(0x19c)]?M(Z['value']):b(Z[r(0x230)])[r(0x208)](k,i);}q((A=A[E(0x1ac)](Q,L||[]))['next']());});},__importDefault=this&&this[a8O(0x247)]||function(Q){return Q&&Q['__esModule']?Q:{'default':Q};};Object[a8O(0x219)](exports,a8O(0x243),{'value':!![]}),exports['InquirerHelper']=void 0x0;const _=__importStar(require('lodash')),chalk_1=__importDefault(require(a8O(0x25c))),fs=__importStar(require('fs')),utils_1=require(a8O(0x1f3)),api_helpers_1=require(a8O(0x25b)),inquirer_pagination_prompt_1=require('./pagination/inquirer-pagination-prompt'),inquirer=require(a8O(0x1da)),inquirerSearchList=require(a8O(0x20d)),yaml=require(a8O(0x244));var ConfirmChoices;(function(Q){const N=a8O;Q[N(0x18d)]=N(0x263),Q[N(0x279)]=N(0x1fc),Q['EDIT']=N(0x259),Q['SAVE']=N(0x1f8),Q['ABORT']=N(0x1dd);}(ConfirmChoices||(ConfirmChoices={})));class InquirerHelper{constructor(Q){const T=a8O;this[T(0x20a)]=Q,this[T(0x1e8)]=0x32,this[T(0x1c3)]=L=>__awaiter(this,void 0x0,void 0x0,function*(){const v=T,{editedResult:z}=yield inquirer[v(0x1e0)]([{'type':'editor','name':v(0x1c9),'message':v(0x220),'default':yaml[v(0x274)](L)}]);return yaml[v(0x20e)](z);}),this['saveFile']=L=>__awaiter(this,void 0x0,void 0x0,function*(){const h=T,z=S=>h(0x1d3)+S+h(0x1dc);function A(){return __awaiter(this,void 0x0,void 0x0,function*(){const C=a8L;return inquirer[C(0x1e0)]([{'type':'input','name':C(0x1c0),'message':C(0x238),'validate':S=>new RegExp('.*\x5c.(json|yaml|yml)$')[C(0x266)](S)?!![]:z(S)}]);});}const {fileName:b}=yield A(),M=b['toString']()[h(0x1f4)]('.')['pop']();try{switch(M){case'json':(0x0,utils_1[h(0x205)])(h(0x23d)+b);return fs[h(0x1d9)](b,JSON[h(0x20c)](L,null,'\x20\x20'));case h(0x209):case h(0x257):(0x0,utils_1['success'])(h(0x23d)+b);return fs[h(0x1d9)](b,yaml['safeDump'](L));default:(0x0,utils_1[h(0x27c)])(z(M));}}catch(S){(0x0,utils_1[h(0x27c)])(h(0x206)+S[h(0x1a0)]);}return undefined;}),this[T(0x24d)]=(L,z)=>A=>{const W=T,b=typeof A===W(0x1ab)?A[W(0x264)]():A;return z===![]&&b==='don\x27t\x20change'?'':b;},this['validate']=(L,z,A)=>b=>{const w=T,M=[];if(b===''||b===w(0x22a)){if(z!==![])M[w(0x192)]('this\x20option\x20is\x20required,\x20please\x20answer');else return!![];}L[w(0x1de)]===w(0x1ab)&&!_[w(0x21d)](L[w(0x25a)])&&(console[w(0x1a8)](L[w(0x25a)]),console['log'](b),M[w(0x192)](new RegExp(L[w(0x25a)])[w(0x266)](b)?!![]:w(0x241)+L[w(0x25a)]+'\x27'));L['type']===w(0x1ab)&&!_['isUndefined'](L[w(0x1c6)])&&M[w(0x192)](b[w(0x19f)]>=L['minLength']?!![]:w(0x216)+L[w(0x1c6)]+w(0x204)+b['length']+w(0x277));L[w(0x1de)]===w(0x1ab)&&!_[w(0x21d)](L['maxLength'])&&M[w(0x192)](b[w(0x19f)]<=L[w(0x1d7)]?!![]:w(0x275)+L[w(0x1d7)]+w(0x204)+b[w(0x19f)]+w(0x277));A&&Number[w(0x251)](parseInt(b,0xa))&&M[w(0x192)](w(0x286)+b);L[w(0x1de)]===w(0x1b7)&&!_[w(0x21d)](L[w(0x234)])&&M[w(0x192)](b>=L[w(0x234)]?!![]:w(0x1f5)+L[w(0x234)]);L['type']===w(0x1b7)&&!_['isUndefined'](L[w(0x19a)])&&M[w(0x192)](b<=L[w(0x19a)]?!![]:'must\x20be\x20smaller\x20than\x20or\x20equal\x20to\x20'+L[w(0x19a)]);if(L[w(0x1de)]===w(0x1c5)){const i=(0x0,utils_1[w(0x211)])(b);M['push'](i===![]||_[w(0x187)](i)?w(0x23f):!![]);}const S=M['filter'](q=>q!==!![]),k=(L===null||L===void 0x0?void 0x0:L[w(0x25d)])?'\x0a'+chalk_1[w(0x254)][w(0x1c8)]('>>')+'\x20Example:\x20'+chalk_1[w(0x254)][w(0x1e3)](JSON[w(0x20c)](L[w(0x25d)])):'';return S[w(0x19f)]>0x0?S[w(0x1ee)](chalk_1[w(0x254)][w(0x1bd)](w(0x23e)))+k:!![];},this[T(0x1ed)]=(L,z,A)=>{const H=T,b=L[L[H(0x19f)]-0x1];function M(){const x=H;return L[x(0x1a4)](0x0,-0x1)['map'](i=>i[x(0x24b)](0x0)[x(0x27e)]()+i[x(0x1a4)](0x1))['join']('>');}const S=L[H(0x19f)]>0x1?chalk_1[H(0x254)][H(0x250)][H(0x1e3)](M())+':\x20':'',k=A?'\x20('+chalk_1[H(0x254)][H(0x207)](A)+')':'';return chalk_1[H(0x254)]['reset'](''+S+z+'\x20'+chalk_1[H(0x254)][H(0x282)][H(0x258)](b)+k+'?');},this[T(0x198)]=(L,z,A)=>__awaiter(this,void 0x0,void 0x0,function*(){const J=T;if(z[J(0x19f)]<0x1){const S=A?J(0x269)+A:J(0x1a1);throw new Error(J(0x26c)+L+'\x20'+S+'.');}const b=J(0x235)+L+J(0x18a),M=z[J(0x19f)]>0x4?J(0x1e2):'list';return(yield inquirer[J(0x1e0)]([{'type':M,'name':'name','message':b,'choices':z}]))[J(0x1e9)];}),this[T(0x1d4)]=(L,z,A)=>__awaiter(this,void 0x0,void 0x0,function*(){const u=T,{elements:b,nextCursor:M}=yield z();if(b[u(0x19f)]<0x1){const i=A?'for\x20this\x20'+A:u(0x1a1);throw new Error(u(0x26c)+L+'\x20'+i+'.');}const S=u(0x235)+L+u(0x18a);if(M!==undefined){const q=({nextPageCursor:Z})=>__awaiter(this,void 0x0,void 0x0,function*(){const V=yield z(Z);return{'elements':V['elements'],'nextPageCursor':V['nextCursor']};});return(yield inquirer[u(0x1e0)]([{'type':'pagination-prompt','name':'name','message':S,'choices':b,'nextPageCursor':M,'loadMore':q}]))['name'];}const k=b[u(0x19f)]>0x4?'search-list':'list';return(yield inquirer[u(0x1e0)]([{'type':k,'name':u(0x1e9),'message':S,'choices':b}]))[u(0x1e9)];}),this[T(0x272)]=(L,z)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const n=T,A=''+(z?'('+chalk_1[n(0x254)][n(0x207)](z)+')\x20':''),b=n(0x1cc)+chalk_1[n(0x254)]['green'](L)+'\x20'+A+'to\x20use:',M=this['validate']({'type':n(0x1ab),'required':!![]});return(yield inquirer[n(0x1e0)]([{'type':n(0x1c2),'name':'name','message':b,'validate':M}]))['name'];}),this[T(0x224)]=L=>__awaiter(this,void 0x0,void 0x0,function*(){const R=T;return(yield inquirer[R(0x1e0)]([{'type':R(0x260),'name':R(0x1e9),'message':L,'default':!![]}]))[R(0x1e9)];}),this[T(0x213)]=L=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const F=T,z=A=>b=>__awaiter(this,void 0x0,void 0x0,function*(){const m=a8L;var M;const S=yield this['apiClient'][m(0x223)][m(0x1fe)]({'parameters':{'projectId':A},'options':{'per_page':this[m(0x1e8)],'cursor':b}}),k=S[m(0x1ca)]['services'][m(0x249)](i=>i['id']);return{'elements':k,'nextCursor':(M=S[m(0x1ba)])===null||M===void 0x0?void 0x0:M['cursor']};});return this[F(0x1b1)](F(0x18e),z,L);}),this['askForTemplate']=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const f=T,L=z=>__awaiter(this,void 0x0,void 0x0,function*(){const t=a8L;var A;const b=yield this[t(0x20a)][t(0x223)][t(0x226)]({'options':{'per_page':this[t(0x1e8)],'cursor':z}}),M=b[t(0x1ca)][t(0x226)]['map'](S=>S['id']);return{'elements':M,'nextCursor':(A=b['pagination'])===null||A===void 0x0?void 0x0:A['cursor']};});return this[f(0x1d4)]('template',L);}),this[T(0x194)]=L=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const K=T;if(_['isUndefined'](L))throw new Error(K(0x225));const z=A=>__awaiter(this,void 0x0,void 0x0,function*(){const D=K;var b;let M=this[D(0x1e8)];const S=yield this[D(0x20a)][D(0x223)][D(0x188)]({'parameters':{'templateId':L},'options':{'per_page':M,'cursor':A}}),k=S[D(0x1ca)][D(0x188)][D(0x249)](i=>i['id']+D(0x200)+i[D(0x287)]+')');return{'elements':k,'nextCursor':(b=S[D(0x1ba)])===null||b===void 0x0?void 0x0:b['cursor']};});return this[K(0x1d4)](K(0x1f9),z)['then'](A=>A[K(0x1f4)]('\x20')[0x0]);}),this[T(0x227)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const p=T,L=z=>__awaiter(this,void 0x0,void 0x0,function*(){const U=a8L;var A;let b=this[U(0x1e8)];const M=yield this[U(0x20a)][U(0x223)][U(0x202)]({'options':{'per_page':b,'cursor':z}}),S=M['data'][U(0x202)][U(0x249)](k=>k['id']);return{'elements':S,'nextCursor':(A=M[U(0x1ba)])===null||A===void 0x0?void 0x0:A[U(0x1bc)]};});return this[p(0x1d4)](p(0x24c),L);}),this[T(0x280)]=L=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const s=T,z=A=>b=>__awaiter(this,void 0x0,void 0x0,function*(){const e=a8L;var M;const S=yield this['apiClient'][e(0x223)][e(0x1ad)]({'parameters':{'projectId':A},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':b}}),k=S[e(0x1ca)][e(0x1ad)]['map'](i=>i['id']);return{'elements':k,'nextCursor':(M=S[e(0x1ba)])===null||M===void 0x0?void 0x0:M[e(0x1bc)]};});return this[s(0x1b1)](s(0x1d1),z,L);}),this[T(0x25f)]=L=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const P=T,z=A=>b=>__awaiter(this,void 0x0,void 0x0,function*(){const X=a8L;var M;const S=yield this['apiClient'][X(0x223)][X(0x1c7)]({'parameters':{'projectId':A},'options':{'per_page':this[X(0x1e8)],'cursor':b}}),k=S[X(0x1ca)]['jobs']['map'](i=>i['id']);return{'elements':k,'nextCursor':(M=S[X(0x1ba)])===null||M===void 0x0?void 0x0:M[X(0x1bc)]};});return this['askForProjectScopedResourcePaginated'](P(0x191),z,L);}),this[T(0x190)]=(L,z,A=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const y=T,b=y(0x19e),M=S=>k=>__awaiter(this,void 0x0,void 0x0,function*(){const Q0=y;var i;const q=yield this[Q0(0x20a)][Q0(0x1b8)]['job']['runs']({'parameters':{'projectId':S,'jobId':L},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':k}}),Z=q[Q0(0x1ca)][Q0(0x252)]['map'](V=>V['id']+'\x20(startedAt:\x20'+V[Q0(0x1f6)]+')');return A&&Z[Q0(0x22c)](b),{'elements':Z,'nextCursor':(i=q[Q0(0x1ba)])===null||i===void 0x0?void 0x0:i[Q0(0x1bc)]};});return this[y(0x1b1)](y(0x222),M,z,y(0x1f2)+L+'\x27')['then'](S=>{const k=S['split']('\x20')[0x0];if(k===b)return undefined;return k;});}),this['askForBuild']=(L,z,A,b=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Q1=T,M=Q1(0x22f);if(A!==undefined){const S=k=>i=>__awaiter(this,void 0x0,void 0x0,function*(){const Q2=Q1;var q;const Z=yield this[Q2(0x20a)][Q2(0x1b8)][Q2(0x191)][Q2(0x228)]({'parameters':{'projectId':k,'jobId':A},'options':{'per_page':this[Q2(0x1e8)],'cursor':i}}),V=Z[Q2(0x1ca)]['builds']['map'](d=>d['id']+Q2(0x200)+d[Q2(0x287)]+')');return b&&V[Q2(0x22c)](M),{'elements':V,'nextCursor':(q=Z[Q2(0x1ba)])===null||q===void 0x0?void 0x0:q['cursor']};});return this[Q1(0x1b1)](Q1(0x256),S,L,'job:\x20\x27'+A+'\x27')[Q1(0x208)](k=>{const Q3=Q1,i=k[Q3(0x1f4)]('\x20')[0x0];if(i===M)return undefined;return i;});}if(z!==undefined){const k=i=>q=>__awaiter(this,void 0x0,void 0x0,function*(){const Q4=Q1;var Z;const V=yield this[Q4(0x20a)][Q4(0x1b8)][Q4(0x18e)][Q4(0x228)]({'parameters':{'projectId':i,'serviceId':z},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':q}}),d=V[Q4(0x1ca)][Q4(0x228)][Q4(0x249)](a=>a['id']+Q4(0x200)+a[Q4(0x287)]+')');if(b)d[Q4(0x22c)](M);return{'elements':d,'nextCursor':(Z=V[Q4(0x1ba)])===null||Z===void 0x0?void 0x0:Z['cursor']};});return this[Q1(0x1b1)]('service\x20build',k,L,Q1(0x281)+A+'\x27')[Q1(0x208)](i=>{const Q5=Q1,q=i[Q5(0x1f4)]('\x20')[0x0];if(q===M)return undefined;return q;});}throw new Error(Q1(0x1e7));}),this[T(0x1b6)]=(L,z,A,b=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Q6=T,M=Q6(0x27f);if(A!==undefined){const S=k=>i=>__awaiter(this,void 0x0,void 0x0,function*(){const Q7=Q6;var q,Z;const V=yield this[Q7(0x20a)][Q7(0x1b8)][Q7(0x191)][Q7(0x246)]({'parameters':{'projectId':k,'jobId':A},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':i}}),d=(q=V[Q7(0x1ca)][Q7(0x246)])!==null&&q!==void 0x0?q:[],a=d===null||d===void 0x0?void 0x0:d[Q7(0x249)](G=>G['name']+Q7(0x200)+G[Q7(0x287)]+')');return b&&a[Q7(0x22c)](M),{'elements':a,'nextCursor':(Z=V[Q7(0x1ba)])===null||Z===void 0x0?void 0x0:Z[Q7(0x1bc)]};});return this[Q6(0x1b1)]('job\x20containers',S,L,Q6(0x1f2)+A+'\x27')[Q6(0x208)](k=>{const Q8=Q6,i=k[Q8(0x1f4)]('\x20')[0x0];if(i===M)return undefined;return i;});}if(z!==undefined){const k=i=>q=>__awaiter(this,void 0x0,void 0x0,function*(){const Q9=Q6;var Z,V;const d=yield this[Q9(0x20a)][Q9(0x1b8)][Q9(0x18e)][Q9(0x246)]({'parameters':{'projectId':i,'serviceId':z},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':q}}),a=(Z=d[Q9(0x1ca)][Q9(0x246)])!==null&&Z!==void 0x0?Z:[],G=a[Q9(0x249)](I=>I[Q9(0x1e9)]+'\x20(startedAt:\x20'+I[Q9(0x287)]+')');if(b)G===null||G===void 0x0?void 0x0:G[Q9(0x22c)](M);return{'elements':G,'nextCursor':(V=d[Q9(0x1ba)])===null||V===void 0x0?void 0x0:V['cursor']};});return this['askForProjectScopedResourcePaginated'](Q6(0x262),k,L,Q6(0x281)+A+'\x27')[Q6(0x208)](i=>{const QQ=Q6,q=i[QQ(0x1f4)]('\x20')[0x0];if(q===M)return undefined;return q;});}throw new Error(Q6(0x22b));}),this['askForAddon']=L=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Qz=T,z=A=>b=>__awaiter(this,void 0x0,void 0x0,function*(){const QL=a8L;var M;const S=yield this['apiClient'][QL(0x223)][QL(0x1b9)]({'parameters':{'projectId':A},'options':{'per_page':this[QL(0x1e8)],'cursor':b}});return{'elements':S['data']['addons']['map'](k=>k['id']),'nextCursor':(M=S[QL(0x1ba)])===null||M===void 0x0?void 0x0:M['cursor']};});return this[Qz(0x1b1)]('addon',z,L);}),this['askForAddonBackup']=(L,z)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Qb=T,A=b=>M=>__awaiter(this,void 0x0,void 0x0,function*(){const QA=a8L;var S;const k=yield this[QA(0x20a)][QA(0x1b8)][QA(0x195)][QA(0x1ff)]({'parameters':{'projectId':b,'addonId':z},'options':{'per_page':this[QA(0x1e8)],'cursor':M}});return{'elements':k['data']['backups']['map'](i=>i['id']+QA(0x23a)+(i['completedAt']||QA(0x26b))+')'),'nextCursor':(S=k[QA(0x1ba)])===null||S===void 0x0?void 0x0:S[QA(0x1bc)]};});return this['askForProjectScopedResourcePaginated'](Qb(0x1ff),A,L,'addon:\x20\x27'+z+'\x27')[Qb(0x208)](b=>b[Qb(0x1f4)]('\x20')[0x0]);}),this[T(0x276)]=(L,z,A)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const QS=T,b=M=>S=>__awaiter(this,void 0x0,void 0x0,function*(){const QM=a8L;var k;const i=yield this['apiClient']['get'][QM(0x195)][QM(0x1b5)]({'parameters':{'projectId':M,'addonId':z,'backupId':A},'options':{'per_page':this[QM(0x1e8)],'cursor':S}});return{'elements':i['data'][QM(0x1b5)][QM(0x249)](q=>q['id']+QM(0x23a)+(q['completedAt']||QM(0x26b))+')'),'nextCursor':(k=i['pagination'])===null||k===void 0x0?void 0x0:k['cursor']};});return this[QS(0x1b1)]('restore',b,L,'addon:\x20\x27'+z+'\x27')[QS(0x208)](M=>M[QS(0x1f4)]('\x20')[0x0]);}),this[T(0x26e)]=L=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Qi=T,z=A=>__awaiter(this,void 0x0,void 0x0,function*(){const Qk=a8L;return(yield this[Qk(0x20a)][Qk(0x223)][Qk(0x201)]({'parameters':{'projectId':A}}))[Qk(0x1ca)]['map'](b=>b['id']);});return this['askForProjectScopedResource'](Qi(0x240),z,L);}),this[T(0x255)]=L=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const QZ=T,z=A=>b=>__awaiter(this,void 0x0,void 0x0,function*(){const Qq=a8L;var M;const S=yield this[Qq(0x20a)][Qq(0x223)][Qq(0x1d6)]({'parameters':{'projectId':A},'options':{'per_page':this[Qq(0x1e8)],'cursor':b}});return{'elements':S[Qq(0x1ca)]['secrets']['map'](k=>k['id']),'nextCursor':(M=S['pagination'])===null||M===void 0x0?void 0x0:M[Qq(0x1bc)]};});return this[QZ(0x1b1)]('secret',z,L);}),this[T(0x27a)]=L=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const QV=T,z=yield this['apiClient']['get']['domain']({'parameters':{'domain':L}}),A=z['data'][QV(0x285)][QV(0x249)](M=>M[QV(0x1e9)]+'\x20(full\x20domain:\x20'+M['fullName']+')'),b=QV(0x20f)+L+')';return this[QV(0x198)](QV(0x24e),A,b)[QV(0x208)](M=>M[QV(0x1f4)]('\x20')[0x0]);}),this[T(0x23b)]=(L,z)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Qd=T,A=yield this['apiClient'][Qd(0x223)][Qd(0x24e)][Qd(0x261)]({'parameters':{'domain':L,'subdomain':z}}),b=A['data'][Qd(0x19d)][Qd(0x249)](S=>''+S[Qd(0x236)]),M=Qd(0x20f)+L+Qd(0x1a7)+z+')';return this[Qd(0x198)](Qd(0x18c),b,M);}),this[T(0x1d5)]=L=>__awaiter(this,void 0x0,void 0x0,function*(){const Qa=T;return(yield inquirer['prompt']([{'type':Qa(0x260),'name':Qa(0x283),'message':chalk_1[Qa(0x254)][Qa(0x229)]('WARNING:\x20You\x20are\x20about\x20to\x20delete\x20'+(L||Qa(0x1cd))+Qa(0x214)),'default':![]}]))['confirmation'];}),this['loginPrompt']=(L,z)=>__awaiter(this,void 0x0,void 0x0,function*(){const QG=T;_[QG(0x21d)](L['name'])&&(z[QG(0x19f)]<=0x0?_['set'](L,'name',QG(0x254)):yield(0x0,utils_1['retry'])(0xa)(()=>__awaiter(this,void 0x0,void 0x0,function*(){const QI=QG,{name:A}=yield inquirer[QI(0x1e0)]([{'type':QI(0x1c2),'name':QI(0x1e9),'message':QI(0x273),'default':QI(0x22d)}]);if(!L['override']&&z[QI(0x268)](b=>b[QI(0x1e9)]===A)){const {c:b}=yield inquirer[QI(0x1e0)]([{'type':'confirm','name':'c','message':'Context\x20with\x20name\x20\x27'+A+'\x27\x20already\x20exists.\x20Do\x20you\x20want\x20to\x20override\x20this\x20context\x20(y)\x20or\x20enter\x20a\x20new\x20name\x20(N)?','default':![]}]);if(b===![])throw new Error(QI(0x1a9));_[QI(0x1e4)](L,QI(0x22e),!![]);}_[QI(0x1e4)](L,'name',A);})));if(_[QG(0x21d)](L['token'])){const A=yield this['tokenPrompt']();_[QG(0x1e4)](L,QG(0x1f0),A);}return L;}),this[T(0x1d8)]=()=>__awaiter(this,void 0x0,void 0x0,function*(){const Qg=T,{token:L}=yield inquirer['prompt']([{'type':Qg(0x245),'name':Qg(0x1f0),'mask':'*','message':'Choose\x20the\x20login\x20token:'}]);return L;}),inquirer[T(0x186)](T(0x1e2),inquirerSearchList),inquirer[T(0x186)](T(0x1eb),inquirer_pagination_prompt_1[T(0x1c1)]);}[a8O(0x210)](Q,L){return __awaiter(this,void 0x0,void 0x0,function*(){const QO=a8L,z=yaml['safeDump'](Q),A=_[QO(0x1fd)](z[QO(0x1f4)]('\x0a')[QO(0x249)](S=>S[QO(0x19f)])),b=chalk_1[QO(0x254)]['grey']('-'[QO(0x1ae)](A)+'\x0a'),{confirm:M}=yield inquirer[QO(0x1e0)]([{'type':QO(0x223),'name':QO(0x260),'message':''+chalk_1[QO(0x254)][QO(0x282)]['green'](QO(0x232))+b+chalk_1[QO(0x254)][QO(0x1b3)](z)+b,'choices':Object[QO(0x19b)](ConfirmChoices)}]);switch(M){case ConfirmChoices[QO(0x18d)]:return Q;case ConfirmChoices[QO(0x1e5)]:throw new Error(QO(0x26a));case ConfirmChoices[QO(0x279)]:return this['retrievePayloadViaInteractiveCli'](L);case ConfirmChoices['EDIT']:return this[QO(0x210)](yield this['editPayload'](Q),L);case ConfirmChoices[QO(0x21e)]:yield this['saveFile'](Q);return this[QO(0x210)](Q,L);default:throw new Error('Something\x20unexpected\x20happened.');}});}[a8O(0x197)](Q,L){return __awaiter(this,void 0x0,void 0x0,function*(){const QY=a8L;if((L===null||L===void 0x0?void 0x0:L['resultCache'])!==undefined)this['resultCache']=L===null||L===void 0x0?void 0x0:L[QY(0x1a5)];this[QY(0x1fb)]=L===null||L===void 0x0?void 0x0:L[QY(0x1b2)];const z={};return yield this[QY(0x284)]([],Q['opt'][QY(0x193)],z),this[QY(0x1a5)]=z,yield this[QY(0x210)](z,Q);});}[a8O(0x284)](Q,L,z,A){return __awaiter(this,void 0x0,void 0x0,function*(){const Qj=a8L;let b;if(L[Qj(0x196)]&&!_[Qj(0x18b)](L,Qj(0x242))){if(L[Qj(0x196)]['length']>0x1){const {choice:M}=yield inquirer[Qj(0x1e0)]([{'type':'list','name':Qj(0x1b4),'message':Qj(0x24f)+(Q[Q['length']-0x1]||'')+Qj(0x233),'choices':L['oneOf']['map'](S=>{const QB=Qj;var k;return(k=S[QB(0x1bb)])!==null&&k!==void 0x0?k:'??';})}]);b=yield this[Qj(0x26f)](Q,L[Qj(0x196)][Qj(0x268)](S=>S['description']===M),z,A);}else{const S=L[Qj(0x196)][0x0];_[Qj(0x1e4)](S,Qj(0x1bb),L[Qj(0x1bb)]),b=yield this[Qj(0x26f)](Q,S,z,A);}b={};}else{if(L[Qj(0x218)]&&!_[Qj(0x18b)](L,'properties')){if(L[Qj(0x218)][Qj(0x19f)]>0x1){const {choice:k}=yield inquirer[Qj(0x1e0)]([{'type':'list','name':'choice','message':Qj(0x24f)+(Q[Q[Qj(0x19f)]-0x1]||'')+Qj(0x233),'choices':[...L['anyOf'][Qj(0x249)](i=>{const Ql=Qj;var q;return(q=i[Ql(0x1bb)])!==null&&q!==void 0x0?q:'??';}),'don\x27t\x20change']}]);k!==Qj(0x22a)&&(b=yield this[Qj(0x26f)](Q,L[Qj(0x218)][Qj(0x268)](i=>i[Qj(0x1bb)]===k),z,A));}else{const i=L['anyOf'][0x0];_[Qj(0x1e4)](i,Qj(0x1bb),L[Qj(0x1bb)]),b=yield this['getType'](Q,i,z,A);}b={};}else b=yield this[Qj(0x26f)](Q,L,z,A);}return b;});}[a8O(0x1cb)](Q,L,z,A){var b;return __awaiter(this,void 0x0,void 0x0,function*(){const Qo=a8L;if(A===![]){const {addEntry:k}=yield inquirer[Qo(0x1e0)]([{'type':Qo(0x260),'name':Qo(0x1e6),'message':this['getPathString'](L,Qo(0x253),Q===null||Q===void 0x0?void 0x0:Q[Qo(0x1bb)]),'default':![]}]);if(!k)return z;}const M=Object[Qo(0x18f)]((b=Q===null||Q===void 0x0?void 0x0:Q['properties'])!==null&&b!==void 0x0?b:[]),S=Q['required']||[];if(M['length']>0x0)for(const i of M){const q=L[Qo(0x1d2)](i);if(L[Qo(0x19f)]>0x0&&!_['has'](z,L[Qo(0x1ee)]('.')))_[Qo(0x1e4)](z,L[Qo(0x1ee)]('.'),{});yield this[Qo(0x284)](q,Q['properties'][i],z,S['includes'](i));}else yield this[Qo(0x26f)](L,Object[Qo(0x1a2)](Object[Qo(0x1a2)]({},Q),{'type':Qo(0x1c5)}),z,A);return z;});}[a8O(0x21f)](Q,L,z,A){return __awaiter(this,void 0x0,void 0x0,function*(){const Qr=a8L;if(L&&z)return!![];const b=L?Qr(0x253):Qr(0x1aa),{addEntry:M}=yield inquirer['prompt']([{'type':'confirm','name':Qr(0x1e6),'message':this[Qr(0x1ed)](Q,b,L?A:undefined),'default':![]}]);return M;});}[a8O(0x26f)](Q,L,z,A){return __awaiter(this,void 0x0,void 0x0,function*(){const QE=a8L;let b;const M=Q['join']('.');switch(L===null||L===void 0x0?void 0x0:L[QE(0x1de)]){case'array':{let S=!![];while(yield this['askArrayEntry'](Q,S,A,L===null||L===void 0x0?void 0x0:L[QE(0x1bb)])){const k=_[QE(0x1b8)](z,M);_['unset'](z,M),yield this['getType'](Q,L[QE(0x27d)],z);const i=_[QE(0x1b8)](z,M);!_[QE(0x1a3)](k)?_[QE(0x1e4)](z,M,[i]):(k[QE(0x192)](i),_[QE(0x1e4)](z,M,k)),S=![];}return b||[];}case QE(0x1e1):{return b=yield this[QE(0x1cb)](L,Q,z,A),b;}case QE(0x1c5):b=(0x0,utils_1[QE(0x211)])(yield this[QE(0x212)](Q,L,A))||undefined;break;case'string':case QE(0x21b):case QE(0x1b7):default:b=yield this[QE(0x212)](Q,L,A,z);break;}return!_['isUndefined'](b)&&_['set'](z,M,b),b;});}['ask'](Q,L,z,A){var b;return __awaiter(this,void 0x0,void 0x0,function*(){const QN=a8L,M=Q[Q[QN(0x19f)]-0x1],{defaultValue:defaultValue=(b=L===null||L===void 0x0?void 0x0:L[QN(0x25d)])!==null&&b!==void 0x0?b:L===null||L===void 0x0?void 0x0:L['default'],choices:choices=L===null||L===void 0x0?void 0x0:L['enum'],pagination:S}=yield(0x0,api_helpers_1['fetchResourceList'])(M,this['apiClient'],this['tmpCmdPath'],A,this[QN(0x237)],Q);let k='input';if(!_[QN(0x21d)](choices)&&choices[QN(0x19f)]>0x0){if(S!==undefined&&S[QN(0x27b)]!==undefined)k=QN(0x1eb);else choices[QN(0x19f)]>0x4&&typeof choices[0x0]===QN(0x1ab)?k=QN(0x1e2):k=QN(0x223);}else{if((L===null||L===void 0x0?void 0x0:L[QN(0x1de)])===QN(0x21b))k=QN(0x260);else{if((L===null||L===void 0x0?void 0x0:L[QN(0x1de)])===QN(0x1b7))k='input';else(L===null||L===void 0x0?void 0x0:L[QN(0x1de)])==='rawObject'&&(k='editor');}}let i=z!==![]?!_[QN(0x1ec)](defaultValue)?defaultValue:JSON[QN(0x20c)](defaultValue):_[QN(0x203)](defaultValue)?defaultValue:'don\x27t\x20change';if(choices)i=i[QN(0x1b0)]();_[QN(0x18b)](this[QN(0x1a5)],Q[QN(0x1ee)]('.'))&&(i=this[QN(0x1a5)][Q['join']('.')]);const q=choices&&z===![]?[QN(0x22a),...choices]:choices,Z=(L===null||L===void 0x0?void 0x0:L['type'])===QN(0x1b7),V=Object[QN(0x1a2)]({'type':k,'name':'id','message':this[QN(0x231)](Q,L),'choices':q,'default':i,'filter':this[QN(0x24d)](k,z),'validate':this[QN(0x24a)](L,z,Z)},S),d=(yield inquirer[QN(0x1e0)]([V]))['id'];if(d===QN(0x22a)||d==='')return undefined;if(Z)return parseInt(d,0xa);return d;});}[a8O(0x231)](Q,L){const QT=a8O,z=(L===null||L===void 0x0?void 0x0:L['type'])!==QT(0x21b)?'What\x20do\x20you\x20want\x20to\x20use\x20as':QT(0x267);return this[QT(0x1ed)](Q,z,L===null||L===void 0x0?void 0x0:L['description']);}[a8O(0x1df)](){return __awaiter(this,void 0x0,void 0x0,function*(){const Qh=a8L,Q=L=>__awaiter(this,void 0x0,void 0x0,function*(){const Qv=a8L;var z;const A=yield this[Qv(0x20a)][Qv(0x223)][Qv(0x20b)]({'options':{'per_page':this[Qv(0x1e8)],'cursor':L}}),b=A['data'][Qv(0x20b)]['map'](M=>M['id']);return{'elements':b,'nextCursor':(z=A['pagination'])===null||z===void 0x0?void 0x0:z['cursor']};});return yield this[Qh(0x1d4)]('project',Q);});}[a8O(0x23c)](Q,L,z,A){return __awaiter(this,void 0x0,void 0x0,function*(){const QC=a8L,b=z||this[QC(0x20a)][QC(0x288)][QC(0x1cf)]();if(_['isUndefined'](b))throw new Error('Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.');const M=yield L(b);return yield this['askForResource'](Q,M,(A?A+QC(0x1db):'')+QC(0x1a6)+b+'\x27');});}[a8O(0x1b1)](Q,L,z,A){return __awaiter(this,void 0x0,void 0x0,function*(){const QW=a8L,b=z||this[QW(0x20a)][QW(0x288)][QW(0x1cf)]();if(_[QW(0x21d)](b))throw new Error('Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.');const M=yield L(b);return yield this['askForResourcePaginated'](Q,M,(A?A+QW(0x1db):'')+QW(0x1a6)+b+'\x27');});}['askForDomain'](){return __awaiter(this,void 0x0,void 0x0,function*(){const Q=L=>__awaiter(this,void 0x0,void 0x0,function*(){const Qw=a8L;var z;const A=yield this[Qw(0x20a)][Qw(0x223)][Qw(0x1f1)]({'options':{'per_page':this[Qw(0x1e8)],'cursor':L}});return{'elements':A[Qw(0x1ca)][Qw(0x1f1)]['map'](b=>b[Qw(0x1e9)]),'nextCursor':(z=A[Qw(0x1ba)])===null||z===void 0x0?void 0x0:z[Qw(0x1bc)]};});return this['askForResourcePaginated']('domain',Q);});}['askForCredentials'](){return __awaiter(this,void 0x0,void 0x0,function*(){const Qx=a8L,Q=L=>__awaiter(this,void 0x0,void 0x0,function*(){const QH=a8L;var z;const A=yield this[QH(0x20a)]['list'][QH(0x1fa)]({'options':{'per_page':this[QH(0x1e8)],'cursor':L}});return{'elements':A[QH(0x1ca)][QH(0x25e)]['map'](b=>b['id']),'nextCursor':(z=A[QH(0x1ba)])===null||z===void 0x0?void 0x0:z[QH(0x1bc)]};});return this[Qx(0x1d4)]('credentials',Q);});}[a8O(0x1f7)](Q){const QJ=a8O;this[QJ(0x237)]=Q;}}function a8L(Q,L){const z=a8Q();return a8L=function(A,b){A=A-0x186;let M=z[A];return M;},a8L(Q,L);}exports[a8O(0x221)]=InquirerHelper;
|
|
1
|
+
'use strict';function a8w(){const wb=['builds','askForSubdomain','__esModule','askForTag','main-context','data','\x20(startedAt:\x20','red','tokenPrompt','propToType','editPayload','Template\x20id\x20not\x20provided.','throw','array','askForJobRun','getOwnPropertyDescriptor','integer','credentials','494918ZspSek','join','__awaiter','writable','length','default','\x20characters,\x20is\x20','chalk','fileName','must\x20be\x20shorter\x20than\x20or\x20equal\x20to\x20','inquirer-search-list','Yes,\x20send','Configuration\x20file\x20written\x20to\x20','retrievePayloadViaInteractiveCli','job\x20builds','assign','retry','pathVars','toUpperCase','toString','confirmationPrompt','inquirer','1233117IfgsZA','WARNING:\x20You\x20are\x20about\x20to\x20delete\x20','defaultPaginationPageSize','YES','subdomains','Writing\x20configuration\x20failed:\x20','No,\x20repeat','bold','js-yaml','askForTemplateRun','warning','./pagination/inquirer-pagination-prompt','apiClient','choice','name','templates','includes','pipelines','askForCredentials','askConfirm','restore','slice','concat','getCurrentProjectName','askForAddonBackup','askForDomain','values','yaml','backups','__importStar','cmdPath','boolean','1227666CFGusc','set','keys','defineProperty','askGeneric','askForResource','done','pagination-prompt','reset','Choose\x20the\x20login\x20token:','askForProjectScopedResourcePaginated','1071628ufrhor','all-job-runs','editedResult','InquirerHelper','split','pattern','greenBright','job:\x20\x27','askForLogSink','get','type','rawObject','askForSubdomainPath','tag','service\x20containers','volumes','filter','hasOwnProperty','token','string','project:\x20\x27','max','volume','No,\x20edit','minimum','find','addon:\x20\x27','jobs','override','Provide\x20a\x20file\x20path\x20to\x20write\x20the\x20configuration\x20to\x20(<name>.[json|yaml|yml])','\x20(completedAt:\x20','getQuestionString','domain\x20(','job\x20containers','Enter\x20the\x20','registerPrompt','anyOf','maximum','services','map','\x20(full\x20domain:\x20','askForProjectScopedResource','askForBuild','don\x27t\x20change','domains','addons','description','domain','minLength','green','doesn\x27t\x20match\x20pattern\x20\x27','confirm','fetchResourceList','properties','7pbosbf','Do\x20you\x20want\x20to\x20add\x20more','\x20in\x20','configurable','What\x27s\x20the\x20','charAt','REPEAT','1306484BWiQHs','getInnerType','isValidJSON','secrets','input','ask','__createBinding','pop','isUndefined','blue','body','oneOf','whiteBright','yml','apply','stringify','repeat','example','logSinks','pagination','push','isBoolean','containers','saveFile','json','safeDump','\x20and\x20it\x20','addon','message','lodash','contextProvider','templateRuns','tmpCmdPath','2057820zDAQCV','call','trim','askForResourcePaginated','What\x20do\x20you\x20want\x20to\x20use\x20as','password','prompt','Please\x20confirm\x20following\x20configuration:\x0a','ABORT','DynamicReloadPaginationPrompt','service:\x20\x27','must\x20be\x20a\x20valid\x20non-empty\x20json\x20string','SAVE','service','askForSecret','__importDefault','for\x20this\x20','EDIT','Choose\x20the\x20','subdomain','Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.','value','\x20to\x20use:','askForContainer','prototype','No,\x20abort','projects','runs',',\x20supported\x20types:\x20[json|yaml|yml]','resultCache','uri','isEmpty','\x20characters','confirmation','yellowBright','template\x20run','object','getPathString','tags','to\x20use:','unshift','path','validate','Choose\x20the\x20name\x20of\x20the\x20new\x20local\x20context:','has','list','addEntry','836880OiGaKX','skipValidation','No\x20','blueBright','all-containers','64moxiRT','writeFileSync','cursor','No,\x20but\x20save\x20as\x20file','nextCursor','job\x20runs','Aborted.','must\x20be\x20longer\x20than\x20or\x20equal\x20to\x20','Go\x20to\x20editor','Context\x20with\x20name\x20\x27','No\x20builds\x20found','underline','success','maxLength','getType','template','Should\x20it\x20be','Do\x20you\x20want\x20to\x20add','isArray','Context\x20name\x20already\x20exists.','restores','__setModuleDefault','editor','project','askForProject','test','not\x20completed','job','search-list','found','then','askArrayEntry','./api-helpers','createdAt','\x20type?'];a8w=function(){return wb;};return a8w();}const a8k=a8o;(function(w,o){const m=a8o,C=w();while(!![]){try{const R=-parseInt(m(0xc9))/0x1+-parseInt(m(0x147))/0x2+parseInt(m(0xff))/0x3+-parseInt(m(0x10a))/0x4+parseInt(m(0x168))/0x5+parseInt(m(0x197))/0x6*(-parseInt(m(0x140))/0x7)+parseInt(m(0x19c))/0x8*(parseInt(m(0xdf))/0x9);if(R===o)break;else C['push'](C['shift']());}catch(M){C['push'](C['shift']());}}}(a8w,0x5837f));var __createBinding=this&&this[a8k(0x14d)]||(Object['create']?function(w,C,R,M){const K=a8k;if(M===undefined)M=R;var I=Object[K(0xc6)](C,R);(!I||('get'in I?!C[K(0xb9)]:I[K(0xcc)]||I[K(0x143)]))&&(I={'enumerable':!![],'get':function(){return C[R];}}),Object[K(0x102)](w,M,I);}:function(w,C,R,M){if(M===undefined)M=R;w[M]=C[R];}),__setModuleDefault=this&&this[a8k(0xa9)]||(Object['create']?function(w,C){const n=a8k;Object[n(0x102)](w,'default',{'enumerable':!![],'value':C});}:function(w,C){const W=a8k;w[W(0xce)]=C;}),__importStar=this&&this[a8k(0xfc)]||function(w){const O=a8k;if(w&&w[O(0xb9)])return w;var o={};if(w!=null){for(var C in w)if(C!=='default'&&Object[O(0x180)][O(0x11b)][O(0x169)](w,C))__createBinding(o,w,C);}return __setModuleDefault(o,w),o;},__awaiter=this&&this[a8k(0xcb)]||function(w,o,C,R){function M(I){return I instanceof C?I:new C(function(l){l(I);});}return new(C||(C=Promise))(function(I,l){const x=a8o;function a(F){try{e(R['next'](F));}catch(Q){l(Q);}}function H(F){const r=a8o;try{e(R[r(0xc3)](F));}catch(Q){l(Q);}}function e(F){const A=a8o;F[A(0x105)]?I(F[A(0x17d)]):M(F[A(0x17d)])[A(0xb2)](a,H);}e((R=R[x(0x155)](w,o||[]))['next']());});},__importDefault=this&&this[a8k(0x177)]||function(w){const D=a8k;return w&&w[D(0xb9)]?w:{'default':w};};Object[a8k(0x102)](exports,'__esModule',{'value':!![]}),exports[a8k(0x10d)]=void 0x0;const _=__importStar(require(a8k(0x164))),chalk_1=__importDefault(require(a8k(0xd0))),fs=__importStar(require('fs')),utils_1=require('./utils'),api_helpers_1=require(a8k(0xb4)),inquirer_pagination_prompt_1=require(a8k(0xea)),inquirer=require(a8k(0xde)),inquirerSearchList=require(a8k(0xd3)),yaml=require(a8k(0xe7));function a8o(w,o){const C=a8w();return a8o=function(R,M){R=R-0x9a;let I=C[R];return I;},a8o(w,o);}var ConfirmChoices;(function(w){const t=a8k;w['YES']=t(0xd4),w[t(0x146)]=t(0xe5),w[t(0x179)]=t(0x121),w[t(0x174)]=t(0x19f),w['ABORT']=t(0x181);}(ConfirmChoices||(ConfirmChoices={})));class InquirerHelper{constructor(w){const g=a8k;this[g(0xeb)]=w,this[g(0xe1)]=0x32,this['editPayload']=o=>__awaiter(this,void 0x0,void 0x0,function*(){const h=g,{editedResult:C}=yield inquirer['prompt']([{'type':h(0xaa),'name':h(0x10c),'message':h(0x9c),'default':yaml[h(0x160)](o)}]);return yaml['safeLoad'](C);}),this['saveFile']=o=>__awaiter(this,void 0x0,void 0x0,function*(){const N=g,C=l=>'Unexpected\x20file\x20type:\x20'+l+N(0x184);function R(){return __awaiter(this,void 0x0,void 0x0,function*(){const T=a8o;return inquirer[T(0x16e)]([{'type':'input','name':T(0xd1),'message':T(0x127),'validate':l=>new RegExp('.*\x5c.(json|yaml|yml)$')[T(0xad)](l)?!![]:C(l)}]);});}const {fileName:M}=yield R(),I=M[N(0xdc)]()[N(0x10e)]('.')[N(0x14e)]();try{switch(I){case N(0x15f):(0x0,utils_1[N(0xa0)])(N(0xd5)+M);return fs[N(0x19d)](M,JSON['stringify'](o,null,'\x20\x20'));case N(0xfa):case N(0x154):(0x0,utils_1['success'])(N(0xd5)+M);return fs[N(0x19d)](M,yaml['safeDump'](o));default:(0x0,utils_1['warning'])(C(I));}}catch(l){(0x0,utils_1[N(0xe9)])(N(0xe4)+l[N(0x163)]);}return undefined;}),this[g(0x11a)]=(o,C)=>R=>{const s=g,M=typeof R===s(0x11d)?R[s(0x16a)]():R;return C===![]&&M==='don\x27t\x20change'?'':M;},this['validate']=(o,C,R)=>M=>{const d=g;if(this[d(0x198)]===!![])return!![];const I=[];if(M===''||M===d(0x135)){if(C!==![])I[d(0x15b)]('this\x20option\x20is\x20required,\x20please\x20answer');else return!![];}o[d(0x114)]===d(0x11d)&&!_[d(0x14f)](o[d(0x10f)])&&I[d(0x15b)](new RegExp(o[d(0x10f)])[d(0xad)](M)?!![]:d(0x13c)+o[d(0x10f)]+'\x27');o[d(0x114)]===d(0x11d)&&!_[d(0x14f)](o[d(0x13a)])&&I[d(0x15b)](M[d(0xcd)]>=o[d(0x13a)]?!![]:d(0x9b)+o['minLength']+'\x20characters,\x20is\x20'+M[d(0xcd)]+d(0x188));o[d(0x114)]===d(0x11d)&&!_[d(0x14f)](o['maxLength'])&&I['push'](M[d(0xcd)]<=o[d(0xa1)]?!![]:d(0xd2)+o['maxLength']+d(0xcf)+M[d(0xcd)]+'\x20characters');R&&Number['isNaN'](parseInt(M,0xa))&&I['push']('must\x20be\x20a\x20number,\x20is\x20'+M);o[d(0x114)]==='integer'&&!_[d(0x14f)](o[d(0x122)])&&I['push'](M>=o[d(0x122)]?!![]:'must\x20be\x20bigger\x20than\x20or\x20equal\x20to\x20'+o[d(0x122)]);o['type']==='integer'&&!_[d(0x14f)](o[d(0x12f)])&&I[d(0x15b)](M<=o['maximum']?!![]:'must\x20be\x20smaller\x20than\x20or\x20equal\x20to\x20'+o[d(0x12f)]);if(o[d(0x114)]===d(0x115)){const H=(0x0,utils_1[d(0x149)])(M);I[d(0x15b)](H===![]||_[d(0x187)](H)?d(0x173):!![]);}const l=I[d(0x11a)](F=>F!==!![]),a=(o===null||o===void 0x0?void 0x0:o[d(0x158)])?'\x0a'+chalk_1['default'][d(0xbe)]('>>')+'\x20Example:\x20'+chalk_1[d(0xce)][d(0x153)](JSON[d(0x156)](o['example'])):'';return l[d(0xcd)]>0x0?l[d(0xca)](chalk_1[d(0xce)][d(0x9f)](d(0x161)))+a:!![];},this[g(0x18d)]=(o,C,R)=>{const p=g,M=o[o[p(0xcd)]-0x1];function I(){const E=p;return o[E(0xf4)](0x0,-0x1)[E(0x131)](H=>H[E(0x145)](0x0)[E(0xdb)]()+H['slice'](0x1))[E(0xca)]('>');}const l=o['length']>0x1?chalk_1[p(0xce)]['bgGrey'][p(0x153)](I())+':\x20':'',a=R?'\x20('+chalk_1[p(0xce)][p(0x150)](R)+')':'';return chalk_1['default'][p(0x107)](''+l+C+'\x20'+chalk_1['default'][p(0xe6)][p(0x110)](M)+a+'?');},this['askForResource']=(o,C,R)=>__awaiter(this,void 0x0,void 0x0,function*(){const j=g;if(C['length']<0x1){const l=R?j(0x178)+R:j(0xb1);throw new Error(j(0x199)+o+'\x20'+l+'.');}const M=j(0x17a)+o+'\x20to\x20use:',I=C[j(0xcd)]>0x4?j(0xb0):j(0x195);return(yield inquirer[j(0x16e)]([{'type':I,'name':j(0xed),'message':M,'choices':C}]))['name'];}),this[g(0x16b)]=(o,C,R)=>__awaiter(this,void 0x0,void 0x0,function*(){const X=g,{elements:M,nextCursor:I}=yield C();if(M[X(0xcd)]<0x1){const H=R?'for\x20this\x20'+R:X(0xb1);throw new Error(X(0x199)+o+'\x20'+H+'.');}const l='Choose\x20the\x20'+o+X(0x17e);if(I!==undefined){const e=({nextPageCursor:F})=>__awaiter(this,void 0x0,void 0x0,function*(){const b=X,Q=yield C(F);return{'elements':Q['elements'],'nextPageCursor':Q[b(0x1a0)]};});return(yield inquirer[X(0x16e)]([{'type':'pagination-prompt','name':X(0xed),'message':l,'choices':M,'nextPageCursor':I,'loadMore':e}]))[X(0xed)];}const a=M[X(0xcd)]>0x4?'search-list':X(0x195);return(yield inquirer[X(0x16e)]([{'type':a,'name':'name','message':l,'choices':M}]))['name'];}),this[g(0x103)]=(o,C)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const u=g,R=''+(C?'('+chalk_1[u(0xce)][u(0x150)](C)+')\x20':''),M=u(0x12c)+chalk_1[u(0xce)][u(0x13b)](o)+'\x20'+R+u(0x18f),I=this[u(0x192)]({'type':u(0x11d),'required':!![]});return(yield inquirer['prompt']([{'type':u(0x14b),'name':u(0xed),'message':M,'validate':I}]))[u(0xed)];}),this[g(0xf2)]=o=>__awaiter(this,void 0x0,void 0x0,function*(){const S=g;return(yield inquirer[S(0x16e)]([{'type':S(0x13d),'name':S(0xed),'message':o,'default':!![]}]))[S(0xed)];}),this['askForService']=o=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const f=g,C=R=>M=>__awaiter(this,void 0x0,void 0x0,function*(){const V=a8o;var I;const l=yield this[V(0xeb)][V(0x195)][V(0x130)]({'parameters':{'projectId':R},'options':{'per_page':this[V(0xe1)],'cursor':M}}),a=l[V(0xbc)][V(0x130)][V(0x131)](H=>H['id']);return{'elements':a,'nextCursor':(I=l[V(0x15a)])===null||I===void 0x0?void 0x0:I[V(0x19e)]};});return this[f(0x109)](f(0x175),C,o);}),this['askForTemplate']=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const G=g,o=C=>__awaiter(this,void 0x0,void 0x0,function*(){const Z=a8o;var R;const M=yield this[Z(0xeb)][Z(0x195)]['templates']({'options':{'per_page':this[Z(0xe1)],'cursor':C}}),I=M[Z(0xbc)][Z(0xee)][Z(0x131)](l=>l['id']);return{'elements':I,'nextCursor':(R=M[Z(0x15a)])===null||R===void 0x0?void 0x0:R[Z(0x19e)]};});return this['askForResourcePaginated'](G(0xa3),o);}),this[g(0xba)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const v=g,o=C=>__awaiter(this,void 0x0,void 0x0,function*(){const U=a8o;var R,M,I;const l=yield this[U(0xeb)][U(0x195)][U(0x18e)]({'options':{'per_page':this[U(0xe1)],'cursor':C}}),a=(M=(R=l[U(0xbc)][U(0x18e)])===null||R===void 0x0?void 0x0:R[U(0x131)](H=>H['id']))!==null&&M!==void 0x0?M:[];return{'elements':a,'nextCursor':(I=l[U(0x15a)])===null||I===void 0x0?void 0x0:I[U(0x19e)]};});return this[v(0x16b)](v(0x117),o);}),this[g(0xe8)]=o=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const y=g;if(_[y(0x14f)](o))throw new Error(y(0xc2));const C=R=>__awaiter(this,void 0x0,void 0x0,function*(){const P=y;var M;let I=this[P(0xe1)];const l=yield this['apiClient']['list']['templateRuns']({'parameters':{'templateId':o},'options':{'per_page':I,'cursor':R}}),a=l[P(0xbc)][P(0x166)][P(0x131)](H=>H['id']+'\x20(startedAt:\x20'+H[P(0xb5)]+')');return{'elements':a,'nextCursor':(M=l['pagination'])===null||M===void 0x0?void 0x0:M[P(0x19e)]};});return this[y(0x16b)](y(0x18b),C)[y(0xb2)](R=>R[y(0x10e)]('\x20')[0x0]);}),this[g(0x112)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const J=g,o=C=>__awaiter(this,void 0x0,void 0x0,function*(){const B=a8o;var R;let M=this[B(0xe1)];const I=yield this[B(0xeb)]['list'][B(0x159)]({'options':{'per_page':M,'cursor':C}}),l=I[B(0xbc)][B(0x159)]['map'](a=>a['id']);return{'elements':l,'nextCursor':(R=I['pagination'])===null||R===void 0x0?void 0x0:R[B(0x19e)]};});return this[J(0x16b)]('log\x20sink',o);}),this['askForPipeline']=o=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const w0=g,C=R=>M=>__awaiter(this,void 0x0,void 0x0,function*(){const Y=a8o;var I;const l=yield this[Y(0xeb)][Y(0x195)][Y(0xf0)]({'parameters':{'projectId':R},'options':{'per_page':this[Y(0xe1)],'cursor':M}}),a=l[Y(0xbc)]['pipelines'][Y(0x131)](H=>H['id']);return{'elements':a,'nextCursor':(I=l[Y(0x15a)])===null||I===void 0x0?void 0x0:I['cursor']};});return this[w0(0x109)]('pipeline',C,o);}),this['askForJob']=o=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const w2=g,C=R=>M=>__awaiter(this,void 0x0,void 0x0,function*(){const w1=a8o;var I;const l=yield this[w1(0xeb)][w1(0x195)][w1(0x125)]({'parameters':{'projectId':R},'options':{'per_page':this[w1(0xe1)],'cursor':M}}),a=l[w1(0xbc)][w1(0x125)]['map'](H=>H['id']);return{'elements':a,'nextCursor':(I=l[w1(0x15a)])===null||I===void 0x0?void 0x0:I['cursor']};});return this['askForProjectScopedResourcePaginated'](w2(0xaf),C,o);}),this[g(0xc5)]=(o,C,R=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const w3=g,M=w3(0x10b),I=l=>a=>__awaiter(this,void 0x0,void 0x0,function*(){const w4=w3;var H;const e=yield this[w4(0xeb)]['get'][w4(0xaf)][w4(0x183)]({'parameters':{'projectId':l,'jobId':o},'options':{'per_page':this[w4(0xe1)],'cursor':a}}),F=e['data'][w4(0x183)][w4(0x131)](Q=>Q['id']+w4(0xbd)+Q['startedAt']+')');return R&&F[w4(0x190)](M),{'elements':F,'nextCursor':(H=e[w4(0x15a)])===null||H===void 0x0?void 0x0:H[w4(0x19e)]};});return this[w3(0x109)](w3(0x1a1),I,C,w3(0x111)+o+'\x27')[w3(0xb2)](l=>{const w5=w3,a=l[w5(0x10e)]('\x20')[0x0];if(a===M)return undefined;return a;});}),this[g(0x134)]=(o,C,R,M=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const w7=g,I='all-builds';if(R!==undefined){const l=a=>H=>__awaiter(this,void 0x0,void 0x0,function*(){const w6=a8o;var e;const F=yield this['apiClient'][w6(0x113)][w6(0xaf)][w6(0xb7)]({'parameters':{'projectId':a,'jobId':R},'options':{'per_page':this[w6(0xe1)],'cursor':H}}),Q=F[w6(0xbc)][w6(0xb7)][w6(0x131)](L=>L['id']+w6(0xbd)+L['createdAt']+')');return M&&Q[w6(0x190)](I),{'elements':Q,'nextCursor':(e=F[w6(0x15a)])===null||e===void 0x0?void 0x0:e[w6(0x19e)]};});return this[w7(0x109)](w7(0xd7),l,o,'job:\x20\x27'+R+'\x27')['then'](a=>{const w8=w7,H=a[w8(0x10e)]('\x20')[0x0];if(H===I)return undefined;return H;});}if(C!==undefined){const a=H=>e=>__awaiter(this,void 0x0,void 0x0,function*(){const w9=w7;var F;const Q=yield this[w9(0xeb)][w9(0x113)]['service'][w9(0xb7)]({'parameters':{'projectId':H,'serviceId':C},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':e}}),L=Q[w9(0xbc)][w9(0xb7)][w9(0x131)](z=>z['id']+w9(0xbd)+z['createdAt']+')');if(M)L[w9(0x190)](I);return{'elements':L,'nextCursor':(F=Q[w9(0x15a)])===null||F===void 0x0?void 0x0:F['cursor']};});return this['askForProjectScopedResourcePaginated']('service\x20build',a,o,w7(0x172)+R+'\x27')[w7(0xb2)](H=>{const e=H['split']('\x20')[0x0];if(e===I)return undefined;return e;});}throw new Error(w7(0x9e));}),this[g(0x17f)]=(o,C,R,M=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const ww=g,I=ww(0x19b);if(R!==undefined){const l=a=>H=>__awaiter(this,void 0x0,void 0x0,function*(){const wo=ww;var e,F;const Q=yield this['apiClient'][wo(0x113)]['job'][wo(0x15d)]({'parameters':{'projectId':a,'jobId':R},'options':{'per_page':this[wo(0xe1)],'cursor':H}}),L=(e=Q[wo(0xbc)][wo(0x15d)])!==null&&e!==void 0x0?e:[],z=L===null||L===void 0x0?void 0x0:L[wo(0x131)](i=>i[wo(0xed)]+wo(0xbd)+i[wo(0xb5)]+')');return M&&z['unshift'](I),{'elements':z,'nextCursor':(F=Q[wo(0x15a)])===null||F===void 0x0?void 0x0:F['cursor']};});return this['askForProjectScopedResourcePaginated'](ww(0x12b),l,o,ww(0x111)+R+'\x27')[ww(0xb2)](a=>{const wC=ww,H=a[wC(0x10e)]('\x20')[0x0];if(H===I)return undefined;return H;});}if(C!==undefined){const a=H=>e=>__awaiter(this,void 0x0,void 0x0,function*(){const wR=ww;var F,Q;const L=yield this['apiClient'][wR(0x113)][wR(0x175)]['containers']({'parameters':{'projectId':H,'serviceId':C},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':e}}),z=(F=L[wR(0xbc)]['containers'])!==null&&F!==void 0x0?F:[],i=z['map'](q=>q[wR(0xed)]+wR(0xbd)+q[wR(0xb5)]+')');if(M)i===null||i===void 0x0?void 0x0:i['unshift'](I);return{'elements':i,'nextCursor':(Q=L['pagination'])===null||Q===void 0x0?void 0x0:Q[wR(0x19e)]};});return this['askForProjectScopedResourcePaginated'](ww(0x118),a,o,ww(0x172)+R+'\x27')[ww(0xb2)](H=>{const wM=ww,e=H[wM(0x10e)]('\x20')[0x0];if(e===I)return undefined;return e;});}throw new Error('No\x20containers\x20found');}),this['askForAddon']=o=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const wl=g,C=R=>M=>__awaiter(this,void 0x0,void 0x0,function*(){const wI=a8o;var I;const l=yield this[wI(0xeb)][wI(0x195)][wI(0x137)]({'parameters':{'projectId':R},'options':{'per_page':this[wI(0xe1)],'cursor':M}});return{'elements':l[wI(0xbc)][wI(0x137)]['map'](a=>a['id']),'nextCursor':(I=l[wI(0x15a)])===null||I===void 0x0?void 0x0:I['cursor']};});return this[wl(0x109)]('addon',C,o);}),this[g(0xf7)]=(o,C)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const wH=g,R=M=>I=>__awaiter(this,void 0x0,void 0x0,function*(){const wa=a8o;var l;const a=yield this[wa(0xeb)][wa(0x113)]['addon']['backups']({'parameters':{'projectId':M,'addonId':C},'options':{'per_page':this[wa(0xe1)],'cursor':I}});return{'elements':a[wa(0xbc)][wa(0xfb)]['map'](H=>H['id']+'\x20(completedAt:\x20'+(H['completedAt']||wa(0xae))+')'),'nextCursor':(l=a[wa(0x15a)])===null||l===void 0x0?void 0x0:l[wa(0x19e)]};});return this[wH(0x109)]('backups',R,o,wH(0x124)+C+'\x27')[wH(0xb2)](M=>M[wH(0x10e)]('\x20')[0x0]);}),this['askForAddonRestore']=(o,C,R)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const wF=g,M=I=>l=>__awaiter(this,void 0x0,void 0x0,function*(){const we=a8o;var a;const H=yield this['apiClient'][we(0x113)][we(0x162)][we(0xa8)]({'parameters':{'projectId':I,'addonId':C,'backupId':R},'options':{'per_page':this[we(0xe1)],'cursor':l}});return{'elements':H[we(0xbc)][we(0xa8)][we(0x131)](e=>e['id']+we(0x128)+(e['completedAt']||we(0xae))+')'),'nextCursor':(a=H[we(0x15a)])===null||a===void 0x0?void 0x0:a[we(0x19e)]};});return this[wF(0x109)](wF(0xf3),M,o,'addon:\x20\x27'+C+'\x27')[wF(0xb2)](I=>I['split']('\x20')[0x0]);}),this['askForVolume']=o=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const wL=g,C=R=>__awaiter(this,void 0x0,void 0x0,function*(){const wQ=a8o;return(yield this['apiClient'][wQ(0x195)][wQ(0x119)]({'parameters':{'projectId':R}}))[wQ(0xbc)][wQ(0x131)](M=>M['id']);});return this[wL(0x133)](wL(0x120),C,o);}),this[g(0x176)]=o=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const C=R=>M=>__awaiter(this,void 0x0,void 0x0,function*(){const wz=a8o;var I;const l=yield this[wz(0xeb)][wz(0x195)][wz(0x14a)]({'parameters':{'projectId':R},'options':{'per_page':this[wz(0xe1)],'cursor':M}});return{'elements':l['data'][wz(0x14a)][wz(0x131)](a=>a['id']),'nextCursor':(I=l['pagination'])===null||I===void 0x0?void 0x0:I[wz(0x19e)]};});return this['askForProjectScopedResourcePaginated']('secret',C,o);}),this[g(0xb8)]=o=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const wi=g,C=yield this[wi(0xeb)][wi(0x113)][wi(0x139)]({'parameters':{'domain':o}}),R=C[wi(0xbc)][wi(0xe3)][wi(0x131)](I=>I[wi(0xed)]+wi(0x132)+I['fullName']+')'),M='domain\x20('+o+')';return this['askForResource']('subdomain',R,M)[wi(0xb2)](I=>I[wi(0x10e)]('\x20')[0x0]);}),this[g(0x116)]=(o,C)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const wq=g,R=yield this['apiClient'][wq(0x195)][wq(0x17b)][wq(0x191)]({'parameters':{'domain':o,'subdomain':C}}),M=R[wq(0xbc)]['paths']['map'](l=>''+l[wq(0x186)]),I=wq(0x12a)+o+'),\x20subdomain\x20('+C+')';return this[wq(0x104)]('subdomainPath',M,I);}),this['deleteWarningPrompt']=o=>__awaiter(this,void 0x0,void 0x0,function*(){const wm=g;return(yield inquirer['prompt']([{'type':'confirm','name':'confirmation','message':chalk_1[wm(0xce)][wm(0x18a)](wm(0xe0)+(o||'a\x20Northflank\x20resource')+'.\x20This\x20is\x20irreversible.\x20Please\x20confirm!'),'default':![]}]))[wm(0x189)];}),this['loginPrompt']=(o,C)=>__awaiter(this,void 0x0,void 0x0,function*(){const wk=g;_['isUndefined'](o[wk(0xed)])&&(C[wk(0xcd)]<=0x0?_[wk(0x100)](o,wk(0xed),'default'):yield(0x0,utils_1[wk(0xd9)])(0xa)(()=>__awaiter(this,void 0x0,void 0x0,function*(){const wK=wk,{name:R}=yield inquirer[wK(0x16e)]([{'type':wK(0x14b),'name':wK(0xed),'message':wK(0x193),'default':wK(0xbb)}]);if(!o[wK(0x126)]&&C[wK(0x123)](M=>M['name']===R)){const {c:M}=yield inquirer[wK(0x16e)]([{'type':wK(0x13d),'name':'c','message':wK(0x9d)+R+'\x27\x20already\x20exists.\x20Do\x20you\x20want\x20to\x20override\x20this\x20context\x20(y)\x20or\x20enter\x20a\x20new\x20name\x20(N)?','default':![]}]);if(M===![])throw new Error(wK(0xa7));_[wK(0x100)](o,wK(0x126),!![]);}_[wK(0x100)](o,wK(0xed),R);})));if(_[wk(0x14f)](o[wk(0x11c)])){const R=yield this[wk(0xbf)]();_[wk(0x100)](o,'token',R);}return o;}),this['tokenPrompt']=()=>__awaiter(this,void 0x0,void 0x0,function*(){const wn=g,{token:o}=yield inquirer['prompt']([{'type':wn(0x16d),'name':wn(0x11c),'mask':'*','message':wn(0x108)}]);return o;}),inquirer[g(0x12d)]('search-list',inquirerSearchList),inquirer[g(0x12d)](g(0x106),inquirer_pagination_prompt_1[g(0x171)]);}[a8k(0xdd)](w,o){return __awaiter(this,void 0x0,void 0x0,function*(){const wW=a8o,C=yaml[wW(0x160)](w),R=_[wW(0x11f)](C['split']('\x0a')['map'](a=>a[wW(0xcd)])),M=chalk_1['default']['grey']('-'[wW(0x157)](R)+'\x0a'),{confirm:I}=yield inquirer[wW(0x16e)]([{'type':wW(0x195),'name':wW(0x13d),'message':''+chalk_1[wW(0xce)]['bold'][wW(0x13b)](wW(0x16f))+M+chalk_1[wW(0xce)][wW(0x19a)](C)+M,'choices':Object[wW(0xf9)](ConfirmChoices)}]);switch(I){case ConfirmChoices[wW(0xe2)]:return w;case ConfirmChoices[wW(0x170)]:throw new Error(wW(0x9a));case ConfirmChoices['REPEAT']:return this['retrievePayloadViaInteractiveCli'](o);case ConfirmChoices[wW(0x179)]:return this['confirmationPrompt'](yield this[wW(0xc1)](w),o);case ConfirmChoices['SAVE']:yield this[wW(0x15e)](w);return this[wW(0xdd)](w,o);default:throw new Error('Something\x20unexpected\x20happened.');}});}[a8k(0xd6)](w,o){return __awaiter(this,void 0x0,void 0x0,function*(){const wO=a8o;if((o===null||o===void 0x0?void 0x0:o[wO(0x185)])!==undefined)this[wO(0x185)]=o===null||o===void 0x0?void 0x0:o[wO(0x185)];this[wO(0x167)]=o===null||o===void 0x0?void 0x0:o[wO(0xfd)],this[wO(0x198)]=o===null||o===void 0x0?void 0x0:o[wO(0x198)];const C={};return yield this[wO(0xc0)]([],w['opt'][wO(0x151)],C),this[wO(0x185)]=C,yield this[wO(0xdd)](C,w);});}[a8k(0xc0)](w,o,C,R){return __awaiter(this,void 0x0,void 0x0,function*(){const wr=a8o;let M;if(o[wr(0x152)]&&!_[wr(0x194)](o,wr(0x13f))){if(o[wr(0x152)][wr(0xcd)]>0x1){const {choice:I}=yield inquirer['prompt']([{'type':wr(0x195),'name':wr(0xec),'message':wr(0x144)+(w[w[wr(0xcd)]-0x1]||'')+wr(0xb6),'choices':o[wr(0x152)]['map'](l=>{const wc=wr;var a;return(a=l[wc(0x138)])!==null&&a!==void 0x0?a:'??';})}]);M=yield this['getType'](w,o[wr(0x152)][wr(0x123)](l=>l[wr(0x138)]===I),C,R);}else{const l=o[wr(0x152)][0x0];_[wr(0x100)](l,wr(0x138),o[wr(0x138)]),M=yield this[wr(0xa2)](w,l,C,R);}M={};}else{if(o[wr(0x12e)]&&!_['has'](o,'properties')){if(o[wr(0x12e)][wr(0xcd)]>0x1){const {choice:a}=yield inquirer[wr(0x16e)]([{'type':wr(0x195),'name':wr(0xec),'message':wr(0x144)+(w[w['length']-0x1]||'')+wr(0xb6),'choices':[...o['anyOf'][wr(0x131)](H=>{const wA=wr;var e;return(e=H[wA(0x138)])!==null&&e!==void 0x0?e:'??';}),'don\x27t\x20change']}]);a!=='don\x27t\x20change'&&(M=yield this[wr(0xa2)](w,o[wr(0x12e)]['find'](H=>H[wr(0x138)]===a),C,R));}else{const H=o[wr(0x12e)][0x0];_['set'](H,'description',o['description']),M=yield this[wr(0xa2)](w,H,C,R);}M={};}else M=yield this[wr(0xa2)](w,o,C,R);}return M;});}[a8k(0x148)](w,o,C,R){var M;return __awaiter(this,void 0x0,void 0x0,function*(){const wx=a8o;if(R===![]){const {addEntry:a}=yield inquirer[wx(0x16e)]([{'type':wx(0x13d),'name':wx(0x196),'message':this[wx(0x18d)](o,wx(0xa5),w===null||w===void 0x0?void 0x0:w[wx(0x138)]),'default':![]}]);if(!a)return C;}const I=Object[wx(0x101)]((M=w===null||w===void 0x0?void 0x0:w[wx(0x13f)])!==null&&M!==void 0x0?M:[]),l=w['required']||[];if(I['length']>0x0)for(const H of I){const e=o[wx(0xf5)](H);if(o[wx(0xcd)]>0x0&&!_[wx(0x194)](C,o[wx(0xca)]('.')))_[wx(0x100)](C,o[wx(0xca)]('.'),{});yield this[wx(0xc0)](e,w[wx(0x13f)][H],C,l[wx(0xef)](H));}else yield this[wx(0xa2)](o,Object[wx(0xd8)](Object['assign']({},w),{'type':wx(0x115)}),C,R);return C;});}[a8k(0xb3)](w,o,C,R){return __awaiter(this,void 0x0,void 0x0,function*(){const wD=a8o;if(o&&C)return!![];const M=o?'Do\x20you\x20want\x20to\x20add':wD(0x141),{addEntry:I}=yield inquirer[wD(0x16e)]([{'type':wD(0x13d),'name':wD(0x196),'message':this[wD(0x18d)](w,M,o?R:undefined),'default':![]}]);return I;});}[a8k(0xa2)](w,o,C,R){return __awaiter(this,void 0x0,void 0x0,function*(){const wt=a8o;let M;const I=w[wt(0xca)]('.');switch(o===null||o===void 0x0?void 0x0:o[wt(0x114)]){case wt(0xc4):{let l=!![];while(yield this['askArrayEntry'](w,l,R,o===null||o===void 0x0?void 0x0:o[wt(0x138)])){const a=_[wt(0x113)](C,I);_['unset'](C,I),yield this[wt(0xa2)](w,o['items'],C);const H=_[wt(0x113)](C,I);!_[wt(0xa6)](a)?_[wt(0x100)](C,I,[H]):(a[wt(0x15b)](H),_[wt(0x100)](C,I,a)),l=![];}return M||[];}case wt(0x18c):{return M=yield this['getInnerType'](o,w,C,R),M;}case'rawObject':M=(0x0,utils_1[wt(0x149)])(yield this['ask'](w,o,R))||undefined;break;case wt(0x11d):case wt(0xfe):case wt(0xc7):default:M=yield this[wt(0x14c)](w,o,R,C);break;}return!_['isUndefined'](M)&&_[wt(0x100)](C,I,M),M;});}[a8k(0x14c)](w,o,C,R){var M;return __awaiter(this,void 0x0,void 0x0,function*(){const wg=a8o,I=w[w['length']-0x1],{defaultValue:defaultValue=(M=o===null||o===void 0x0?void 0x0:o['example'])!==null&&M!==void 0x0?M:o===null||o===void 0x0?void 0x0:o[wg(0xce)],choices:choices=o===null||o===void 0x0?void 0x0:o['enum'],pagination:l}=yield(0x0,api_helpers_1[wg(0x13e)])(I,this['apiClient'],this[wg(0x167)],R,this[wg(0xda)],w);let a=wg(0x14b);if(!_[wg(0x14f)](choices)&&choices[wg(0xcd)]>0x0){if(l!==undefined&&l['nextPageCursor']!==undefined)a='pagination-prompt';else choices[wg(0xcd)]>0x4&&typeof choices[0x0]==='string'?a=wg(0xb0):a=wg(0x195);}else{if((o===null||o===void 0x0?void 0x0:o[wg(0x114)])===wg(0xfe))a=wg(0x13d);else{if((o===null||o===void 0x0?void 0x0:o[wg(0x114)])===wg(0xc7))a=wg(0x14b);else(o===null||o===void 0x0?void 0x0:o['type'])===wg(0x115)&&(a=wg(0xaa));}}let H=C!==![]?!_['isObject'](defaultValue)?defaultValue:JSON[wg(0x156)](defaultValue):_[wg(0x15c)](defaultValue)?defaultValue:wg(0x135);if(choices)H=H[wg(0xdc)]();_['has'](this[wg(0x185)],w[wg(0xca)]('.'))&&(H=this['resultCache'][w[wg(0xca)]('.')]);const e=choices&&C===![]?[wg(0x135),...choices]:choices,F=(o===null||o===void 0x0?void 0x0:o['type'])===wg(0xc7),Q=Object[wg(0xd8)]({'type':a,'name':'id','message':this['getQuestionString'](w,o),'choices':e,'default':H,'filter':this[wg(0x11a)](a,C),'validate':this[wg(0x192)](o,C,F)},l),L=(yield inquirer[wg(0x16e)]([Q]))['id'];if(L===wg(0x135)||L==='')return undefined;if(F)return parseInt(L,0xa);return L;});}[a8k(0x129)](w,o){const wh=a8k,C=(o===null||o===void 0x0?void 0x0:o[wh(0x114)])!==wh(0xfe)?wh(0x16c):wh(0xa4);return this['getPathString'](w,C,o===null||o===void 0x0?void 0x0:o[wh(0x138)]);}[a8k(0xac)](){return __awaiter(this,void 0x0,void 0x0,function*(){const wT=a8o,w=o=>__awaiter(this,void 0x0,void 0x0,function*(){const wN=a8o;var C;const R=yield this[wN(0xeb)][wN(0x195)][wN(0x182)]({'options':{'per_page':this[wN(0xe1)],'cursor':o}}),M=R[wN(0xbc)]['projects']['map'](I=>I['id']);return{'elements':M,'nextCursor':(C=R[wN(0x15a)])===null||C===void 0x0?void 0x0:C[wN(0x19e)]};});return yield this[wT(0x16b)](wT(0xab),w);});}['askForProjectScopedResource'](w,o,C,R){return __awaiter(this,void 0x0,void 0x0,function*(){const ws=a8o,M=C||this['apiClient'][ws(0x165)]['getCurrentProjectName']();if(_[ws(0x14f)](M))throw new Error(ws(0x17c));const I=yield o(M);return yield this[ws(0x104)](w,I,(R?R+ws(0x142):'')+ws(0x11e)+M+'\x27');});}[a8k(0x109)](w,o,C,R){return __awaiter(this,void 0x0,void 0x0,function*(){const wd=a8o,M=C||this['apiClient']['contextProvider'][wd(0xf6)]();if(_[wd(0x14f)](M))throw new Error(wd(0x17c));const I=yield o(M);return yield this[wd(0x16b)](w,I,(R?R+wd(0x142):'')+wd(0x11e)+M+'\x27');});}[a8k(0xf8)](){return __awaiter(this,void 0x0,void 0x0,function*(){const wE=a8o,w=o=>__awaiter(this,void 0x0,void 0x0,function*(){const wp=a8o;var C;const R=yield this[wp(0xeb)][wp(0x195)]['domains']({'options':{'per_page':this['defaultPaginationPageSize'],'cursor':o}});return{'elements':R[wp(0xbc)][wp(0x136)][wp(0x131)](M=>M[wp(0xed)]),'nextCursor':(C=R[wp(0x15a)])===null||C===void 0x0?void 0x0:C['cursor']};});return this[wE(0x16b)](wE(0x139),w);});}[a8k(0xf1)](){return __awaiter(this,void 0x0,void 0x0,function*(){const wX=a8o,w=o=>__awaiter(this,void 0x0,void 0x0,function*(){const wj=a8o;var C;const R=yield this['apiClient'][wj(0x195)]['registryCredentials']({'options':{'per_page':this[wj(0xe1)],'cursor':o}});return{'elements':R[wj(0xbc)][wj(0xc8)][wj(0x131)](M=>M['id']),'nextCursor':(C=R['pagination'])===null||C===void 0x0?void 0x0:C[wj(0x19e)]};});return this[wX(0x16b)](wX(0xc8),w);});}['setPathVars'](w){this['pathVars']=w;}}exports[a8k(0x10d)]=InquirerHelper;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a9r=a9o;(function(w,o){const O=a9o,C=w();while(!![]){try{const R=parseInt(O(0x194))/0x1*(parseInt(O(0x1a9))/0x2)+parseInt(O(0x1b4))/0x3*(parseInt(O(0x191))/0x4)+parseInt(O(0x1c1))/0x5+parseInt(O(0x1ac))/0x6+parseInt(O(0x1bf))/0x7+parseInt(O(0x17d))/0x8+parseInt(O(0x17b))/0x9*(-parseInt(O(0x1b8))/0xa);if(R===o)break;else C['push'](C['shift']());}catch(M){C['push'](C['shift']());}}}(a9w,0x82976));function a9w(){const Z=['login-success','6201608blKADk','create','value','message','Unexpected\x20response','__awaiter','baseUrl','status','finally','duplex','parse','toString','https:','aborted','startLogin','Failed\x20to\x20establish\x20connection\x20to\x20command\x20execution\x20proxy:\x20','replace','events','type','defineProperty','4gGiYaW','default','initPackage','23677cJBLBY','data','idle','getOwnPropertyDescriptor','configurable','handleError','writable','SIGINT','hasOwnProperty','then','apply','init','write','exit','Unable\x20to\x20open\x20browser:\x20','wss:','unable\x20to\x20parse\x20message:\x20','emit','init-ack','end','openBrowser','6GNYcTp','__setModuleDefault','next','4486740EXqlpQ','http:','__esModule','browser-opened','Unexpected\x20response,\x20api\x20token\x20missing','__importDefault','error\x20happened\x20during\x20browser\x20login:\x20','catch','1141347RCCwzP','NorthflankApiBrowserLogin','__createBinding','error','3175990fZiobu','throw','success','Failure\x20during\x20login:\x20','open','stringify','removeListener','3518361dnfmhO','prototype','2993000kiKOrz','ws:','72PTahFr'];a9w=function(){return Z;};return a9w();}var __createBinding=this&&this[a9r(0x1b6)]||(Object[a9r(0x17e)]?function(w,C,R,M){const c=a9r;if(M===undefined)M=R;var I=Object[c(0x197)](C,R);(!I||('get'in I?!C[c(0x1ae)]:I[c(0x19a)]||I[c(0x198)]))&&(I={'enumerable':!![],'get':function(){return C[R];}}),Object[c(0x190)](w,M,I);}:function(w,C,R,M){if(M===undefined)M=R;w[M]=C[R];}),__setModuleDefault=this&&this[a9r(0x1aa)]||(Object[a9r(0x17e)]?function(w,C){const A=a9r;Object[A(0x190)](w,'default',{'enumerable':!![],'value':C});}:function(w,C){const x=a9r;w[x(0x192)]=C;}),__importStar=this&&this['__importStar']||function(w){const D=a9r;if(w&&w[D(0x1ae)])return w;var o={};if(w!=null){for(var C in w)if(C!==D(0x192)&&Object[D(0x1c0)][D(0x19c)]['call'](w,C))__createBinding(o,w,C);}return __setModuleDefault(o,w),o;},__awaiter=this&&this[a9r(0x182)]||function(w,o,C,R){function M(I){return I instanceof C?I:new C(function(l){l(I);});}return new(C||(C=Promise))(function(I,l){const N=a9o;function a(F){const t=a9o;try{e(R[t(0x1ab)](F));}catch(Q){l(Q);}}function H(F){const g=a9o;try{e(R[g(0x1b9)](F));}catch(Q){l(Q);}}function e(F){const h=a9o;F['done']?I(F[h(0x17f)]):M(F[h(0x17f)])[h(0x19d)](a,H);}e((R=R[N(0x19e)](w,o||[]))[N(0x1ab)]());});},__importDefault=this&&this[a9r(0x1b1)]||function(w){const T=a9r;return w&&w[T(0x1ae)]?w:{'default':w};};function a9o(w,o){const C=a9w();return a9o=function(R,M){R=R-0x17a;let I=C[R];return I;},a9o(w,o);}Object[a9r(0x190)](exports,'__esModule',{'value':!![]}),exports['NorthflankApiBrowserLogin']=void 0x0;const ws_1=__importStar(require('ws')),open_1=__importDefault(require(a9r(0x1bc))),events_1=require(a9r(0x18e));class NorthflankApiBrowserLogin extends events_1['EventEmitter']{constructor(w,o=!![]){const s=a9r;super(),this[s(0x183)]=w,this[s(0x1a8)]=o,this[s(0x184)]=s(0x196),this[s(0x193)]=()=>JSON[s(0x1bd)]({'type':s(0x19f)});}[a9r(0x18b)](){const d=a9r;var w;const o=this['baseUrl'][d(0x18d)](d(0x189),d(0x1a3))[d(0x18d)](d(0x1ad),d(0x17a)),C=o+'/v1/cli-login',R=new ws_1[(d(0x192))](C),M=()=>__awaiter(this,void 0x0,void 0x0,function*(){const E=d;yield new Promise(l=>{const p=a9o;var a;(a=this['duplex'])===null||a===void 0x0?void 0x0:a[p(0x1a7)](JSON['stringify']({'type':p(0x18a)}),()=>l());}),process[E(0x1a1)]();}),I=new Promise((l,a)=>{const j=d;var H,F,Q;try{this[j(0x186)]=(0x0,ws_1['createWebSocketStream'])(R),process['on'](j(0x19b),M);}catch(L){a(new Error(j(0x18c)+L[j(0x180)]));}(H=this['duplex'])===null||H===void 0x0?void 0x0:H['on'](j(0x195),z=>{const X=j;var i;const q=JSON[X(0x187)](z[X(0x188)]());switch(q===null||q===void 0x0?void 0x0:q[X(0x18f)]){case X(0x1a6):{const {loginPage:m}=q;if(m===undefined){this['handleError'](X(0x181),a);return;}this['openBrowser']&&(0x0,open_1['default'])(m)[X(0x1b3)](k=>{const b=X,K=b(0x1a2)+k[b(0x180)];this[b(0x199)](K,a);});this[X(0x1a5)](X(0x1af),{'url':m});break;}case X(0x17c):{const {apiToken:k,contextName:K}=q;if(k===undefined){this[X(0x199)](X(0x1b0),a);return;}(i=this[X(0x186)])===null||i===void 0x0?void 0x0:i[X(0x1a7)](),l({'token':k,'contextName':K}),this[X(0x184)]=X(0x1ba);break;}case'login-failure':{const n=X(0x1bb)+(q===null||q===void 0x0?void 0x0:q['message']);this['handleError'](n,a);break;}default:{const W=X(0x1a4)+JSON[X(0x1bd)](q);this[X(0x199)](W,a);}}}),(F=this['duplex'])===null||F===void 0x0?void 0x0:F['on'](j(0x1b7),z=>{const u=j;this[u(0x199)](u(0x1b2)+z['message'],a);}),(Q=this['duplex'])===null||Q===void 0x0?void 0x0:Q['on'](j(0x1a7),()=>{const S=j;if(this[S(0x184)]===S(0x1ba)){}else this['handleError']('Login\x20process\x20stopped\x20before\x20completed',a);});});return(w=this['duplex'])===null||w===void 0x0?void 0x0:w[d(0x1a0)](this[d(0x193)]()),this[d(0x184)]=d(0x19f),I[d(0x185)](()=>{const V=d;process[V(0x1be)]('SIGINT',M);});}[a9r(0x199)](w,o){const f=a9r;var C,R;o?(C=this[f(0x186)])===null||C===void 0x0?void 0x0:C[f(0x1a7)](()=>o(new Error(w))):(R=this['duplex'])===null||R===void 0x0?void 0x0:R[f(0x1a7)](),this[f(0x184)]='error';}}exports[a9r(0x1b5)]=NorthflankApiBrowserLogin;
|
package/dist/logs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a10y=a10L;(function(Q,L){const p=a10L,z=Q();while(!![]){try{const A=parseInt(p(0x154))/0x1+parseInt(p(0x14f))/0x2*(-parseInt(p(0x177))/0x3)+-parseInt(p(0x168))/0x4+parseInt(p(0x198))/0x5*(-parseInt(p(0x18a))/0x6)+-parseInt(p(0x189))/0x7+-parseInt(p(0x157))/0x8*(-parseInt(p(0x17b))/0x9)+parseInt(p(0x193))/0xa;if(A===L)break;else z['push'](z['shift']());}catch(b){z['push'](z['shift']());}}}(a10Q,0xed210));function a10L(Q,L){const z=a10Q();return a10L=function(A,b){A=A-0x11d;let M=z[A];return M;},a10L(Q,L);}var __awaiter=this&&this['__awaiter']||function(Q,L,z,A){function b(M){return M instanceof z?M:new z(function(S){S(M);});}return new(z||(z=Promise))(function(M,S){const P=a10L;function k(Z){const e=a10L;try{q(A[e(0x173)](Z));}catch(V){S(V);}}function i(Z){const s=a10L;try{q(A[s(0x141)](Z));}catch(V){S(V);}}function q(Z){const X=a10L;Z[X(0x1ad)]?M(Z['value']):b(Z[X(0x196)])[X(0x16e)](k,i);}q((A=A[P(0x181)](Q,L||[]))['next']());});},__importDefault=this&&this[a10y(0x191)]||function(Q){const Q0=a10y;return Q&&Q[Q0(0x158)]?Q:{'default':Q};};Object[a10y(0x122)](exports,'__esModule',{'value':!![]}),exports['CliLogs']=void 0x0;const js_client_1=require(a10y(0x133)),chalk_1=__importDefault(require(a10y(0x18c))),utils_1=require(a10y(0x123)),inquirer_helper_1=require(a10y(0x145)),commander_1=require(a10y(0x169)),console_format_helpers_1=require(a10y(0x1b5)),log_formatter_1=require('./log-formatter');function a10Q(){const QA=['getCommand','\x20for\x20container\x20','runId','apply','printInitInfo','ApiClient','Element\x20count\x20for\x20this\x20request\x20exceeds\x20the\x20line\x20limit,\x20output\x20was\x20truncated.\x20Cut\x20off\x20at\x20timestamp\x20','getSeconds','--noDefaults','Length\x20of\x20timespan\x20in\x20seconds.\x20Only\x20valid\x20if\x20not\x20both,\x20startTime\x20and\x20endTime\x20are\x20set','Option','4696888gBSCVU','375678ZfSVrt','close','chalk','CliLogs','Restore\x20to\x20get\x20logs\x20from','\x20(exit\x20with\x20','--restore\x20--restoreId\x20[restoreId]','__importDefault','Filter\x20log\x20lines\x20to\x20not\x20match\x20this\x20regular\x20expression','18031460TslMiM','regexNotIncludes','defaultDurationSeconds','value','getCurrentProjectName','95BXizwT','--build\x20--buildId\x20[buildId]','Build\x20to\x20get\x20logs\x20from','pagination','jobId','textNotIncludes','assign','askForAddonBackup','LogType','setSeconds','default','yml','logsApiClient','logRange','buildId','formatLogLine','Error\x20while\x20fetching\x20log\x20lines:\x20','\x20with\x20live-tailing','>\x20Container\x20logs','addonId','length','done','Get\x20logs\x20generated\x20after\x20this\x20time,\x20','getCurrentServiceName','backward','Id]','InquirerHelper',',\x20to:\x20','--regexIncludes\x20<regex>','../formatting/console-format-helpers',',\x20restore\x20id\x20','tsHint','details','serviceId','apiClient','choices','tail','addon','\x20to\x20get\x20logs\x20from','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','start','-d,\x20--direction\x20<order>','defineProperty','../utils','name','Output\x20formatting.\x20Will\x20use\x20advanced\x20formatting\x20by\x20default.','containerId','askForJob','toISOString','stringify','noDefaults','Get\x20log\x20for\x20the\x20specified\x20','Job\x20run\x20id,\x20example:\x20162b1977-6636-4000-929b-cc265b862ff0','askForAddonRestore','addonBackup','\x20in\x20project\x20','format','values','cursor','@northflank/js-client','No\x20logs\x20found\x20for\x20this\x20query.\x20Make\x20sure\x20to\x20select\x20an\x20appropriate\x20time\x20window.','--backup\x20--backupId\x20[backupId]','slice','askForProject','--regexNotIncludes\x20<regex>','backupId','Number\x20of\x20lines\x20to\x20return.','toUpperCase','build-','alias','Tail\x20will\x20stream\x20logs\x20in\x20real-time.\x20Session\x20will\x20be\x20kept\x20open.',',\x20duration:\x20','--textIncludes\x20<text>','throw','error','warning','parseDateInput','../inquirer-helper','askForContainer','service','textIncludes','inquirerHelper','conflicts','assertContextExisting',',\x20backup\x20id\x20','getStandardLogCommand','Container\x20to\x20exec\x20into\x20(logs\x20from\x20all\x20containers\x20will\x20be\x20shown\x20if\x20not\x20specified)','2FlMuSx','\x20seconds','description','Log\x20session\x20ended','--run\x20--runId\x20[runId]','1716367DqgXxP','log','hasNextPage','56XTsYjv','__esModule','logs','apiContext','bold','Id\x20[','askForService','argParser','-t,\x20--types\x20<types...>','customUserAgent','addonRestore','job','yaml','--duration\x20[duration]','logTail','Direction\x20of\x20logs.\x20Ignored\x20when\x20tailing.','--startTime\x20<timestamp>','7204580zapxOI','commander','data','regexIncludes','message','getFormatter','then','--container\x20--containerId\x20[containerId]','printResponse','--project\x20--projectId\x20[projectId]','--endTime\x20<timestamp>','next','json','askForJobRun','-f,\x20--tail','1605228vWTCeb','\x0aDetails:\x20','option','addOption','2119653wudeWo','action','forEach'];a10Q=function(){return QA;};return a10Q();}class CliLogs{constructor(Q){const Q1=a10y;this[Q1(0x15a)]=Q,this[Q1(0x195)]=0x708,this[Q1(0x14d)]=(L,z,A,b)=>{const Q2=Q1,M=(0x0,utils_1[Q2(0x17e)])(!![])[Q2(0x124)]((z?'build-':'')+Q2(0x159))[Q2(0x13d)]((z?Q2(0x13c):'')+Q2(0x155))[Q2(0x151)](Q2(0x12b)+L)['option'](Q2(0x171),'Project\x20for\x20logs')['option']('--'+L+'\x20--'+L+Q2(0x15c)+L+Q2(0x1b1),L['charAt'](0x0)[Q2(0x13b)]()+L[Q2(0x136)](0x1)+Q2(0x11e))['option'](Q2(0x16f),Q2(0x14e));if(z)M['option'](Q2(0x199),Q2(0x19a));if(L===Q2(0x162))M['option'](Q2(0x153),Q2(0x12c));if(A)M['option'](Q2(0x135),'Backup\x20to\x20get\x20logs\x20from');if(b)M['option'](Q2(0x190),Q2(0x18e));return!z&&!A&&!b&&M[Q2(0x17a)](new commander_1[(Q2(0x188))](Q2(0x15f),'Which\x20log\x20types\x20to\x20fetch')[Q2(0x1bb)](Object[Q2(0x131)](js_client_1[Q2(0x1a0)]))),M['option'](Q2(0x176),Q2(0x13e))[Q2(0x179)]('-l,\x20--lineLimit\x20[limit]',Q2(0x13a))[Q2(0x179)](Q2(0x167),Q2(0x1ae)+utils_1[Q2(0x1b7)],utils_1[Q2(0x144)])[Q2(0x17a)](new commander_1[(Q2(0x188))](Q2(0x172),'Get\x20logs\x20generated\x20before\x20this\x20time,\x20'+utils_1[Q2(0x1b7)])[Q2(0x15e)](utils_1[Q2(0x144)])[Q2(0x14a)]([Q2(0x1bc)]))[Q2(0x179)](Q2(0x164),Q2(0x187))['addOption'](new commander_1[(Q2(0x188))](Q2(0x121),Q2(0x166))[Q2(0x1bb)]([Q2(0x1b0),'forward'])['conflicts']([Q2(0x1bc)]))[Q2(0x17a)](new commander_1['Option'](Q2(0x140),'Filter\x20log\x20lines\x20to\x20include\x20this\x20text')[Q2(0x14a)]([Q2(0x19d),Q2(0x16b),Q2(0x194)]))[Q2(0x17a)](new commander_1['Option']('--textNotIncludes\x20<text>','Filter\x20log\x20lines\x20to\x20not\x20include\x20this\x20text')[Q2(0x14a)]([Q2(0x148),'regexIncludes',Q2(0x194)]))['addOption'](new commander_1['Option'](Q2(0x1b4),'Filter\x20log\x20lines\x20to\x20match\x20this\x20regular\x20expression')[Q2(0x14a)]([Q2(0x19d),Q2(0x148),Q2(0x194)]))[Q2(0x17a)](new commander_1[(Q2(0x188))](Q2(0x138),Q2(0x192))['conflicts']([Q2(0x19d),Q2(0x16b),Q2(0x148)]))[Q2(0x179)](Q2(0x186),Q2(0x11f),![])[Q2(0x17a)](new commander_1[(Q2(0x188))]('-o,\x20--output\x20[output]',Q2(0x125))['choices'](Object[Q2(0x131)]([Q2(0x130),Q2(0x174),Q2(0x163)]))),M;},this[Q1(0x182)]=(L,z,A,b)=>{const Q3=Q1,{containerName:M,restoreId:S,backupId:k,quiet:i,tail:q,startTime:Z,endTime:V,duration:d}=b;if(i===!![])return;const a=q?Q3(0x18f)+chalk_1['default'][Q3(0x15b)]('\x27Ctrl+C\x27')+')':'',G=q?Q3(0x1a9):'',I=new Date(),g=Z!==null&&Z!==void 0x0?Z:new Date(new Date((V!==null&&V!==void 0x0?V:I)['valueOf']())[Q3(0x1a1)]((V!==null&&V!==void 0x0?V:I)[Q3(0x185)]()-(d!==null&&d!==void 0x0?d:this[Q3(0x195)]))),O=(V!==null&&V!==void 0x0?V:Z!==undefined)?new Date(new Date(Z['valueOf']())[Q3(0x1a1)](Z[Q3(0x185)]()+(d!==null&&d!==void 0x0?d:this[Q3(0x195)]))):I,Y=k!==undefined,j=g&&!Y?',\x20from:\x20'+chalk_1[Q3(0x1a2)][Q3(0x15b)](g[Q3(0x128)]()):'',B=O&&!Y?Q3(0x1b3)+chalk_1['default'][Q3(0x15b)](O['toISOString']()):'',l=d?Q3(0x13f)+d+Q3(0x150):'',o=M?Q3(0x17f)+chalk_1[Q3(0x1a2)][Q3(0x15b)](M):Y?'':'\x20for\x20all\x20containers',r=k?Q3(0x14c)+k:'',E=S?Q3(0x1b6)+S:'',N=L+'\x20'+chalk_1[Q3(0x1a2)]['bold'](z)+r+E+Q3(0x12f)+chalk_1[Q3(0x1a2)][Q3(0x15b)](A),T=''+j+B+l;console[Q3(0x155)](Q3(0x1aa)+G+o+'\x20of\x20'+N+T+a+':');},this[Q1(0x16d)]=(L,z)=>(A,b)=>{const Q4=Q1;if(!L){if(A[Q4(0x1ac)]===0x0)console[Q4(0x155)](Q4(0x134));A[Q4(0x17d)](M=>(0x0,log_formatter_1[Q4(0x1a7)])(M,z));}else(0x0,console_format_helpers_1[Q4(0x170)])(L,A);(b===null||b===void 0x0?void 0x0:b[Q4(0x156)])&&(0x0,utils_1[Q4(0x143)])(Q4(0x184)+b[Q4(0x132)]);},this[Q1(0x1ba)]=new js_client_1[(Q1(0x183))](Q,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[Q1(0x160)]}),this[Q1(0x1a4)]=this['apiClient'],this[Q1(0x149)]=new inquirer_helper_1[(Q1(0x1b2))](this[Q1(0x1ba)]);}['getLogsCommand'](Q,L=![],z=![],A=![]){const QL=a10y,b=(Z,V)=>__awaiter(this,void 0x0,void 0x0,function*(){const Q5=a10L,d=V[Q5(0x12a)],{apiContext:a,inquirerHelper:G}=this;switch(Q){case Q5(0x147):{const I=d?undefined:a[Q5(0x1af)]();return V[Q5(0x1b9)]||I||(yield G[Q5(0x15d)](Z)());}case Q5(0x162):{const g=d?undefined:a['getCurrentJobName']();return V[Q5(0x19c)]||g||(yield G[Q5(0x127)](Z)());}case Q5(0x11d):{return V[Q5(0x1ab)]||(yield G['askForAddon'](Z)());}}}),M=(Z,V,d)=>__awaiter(this,void 0x0,void 0x0,function*(){const Q6=a10L;if(L)return d[Q6(0x1a6)]||(yield this[Q6(0x149)]['askForBuild'](Z,Q==='service'?V:undefined,Q===Q6(0x162)?V:undefined,!![])());return undefined;}),S=(Z,V,d)=>__awaiter(this,void 0x0,void 0x0,function*(){const Q7=a10L;if(z||A)return d[Q7(0x139)]||(yield this[Q7(0x149)][Q7(0x19f)](Z,V)());return undefined;}),k=(Z,V,d,a)=>__awaiter(this,void 0x0,void 0x0,function*(){const Q8=a10L;if(A)return a['restoreId']||(yield this[Q8(0x149)][Q8(0x12d)](Z,V,d)());return undefined;}),i=(Z,V,d)=>__awaiter(this,void 0x0,void 0x0,function*(){const Q9=a10L;if(!L&&d[Q9(0x126)]!==undefined){if(d[Q9(0x126)]!==!![])return d[Q9(0x126)];return yield this[Q9(0x149)][Q9(0x146)](Z,Q===Q9(0x147)?V:undefined,Q===Q9(0x162)?V:undefined,!![])();}return undefined;}),q=(Z,V,d)=>__awaiter(this,void 0x0,void 0x0,function*(){const QQ=a10L;if(Q===QQ(0x162))return d[QQ(0x180)]||(yield this[QQ(0x149)][QQ(0x175)](V,Z,!![])());return undefined;});return this[QL(0x14d)](Q,L,z,A)[QL(0x17c)](Z=>__awaiter(this,void 0x0,void 0x0,function*(){const Qz=QL,{noDefaults:V,projectId:d,quiet:a,tail:G,types:I,textIncludes:g,textNotIncludes:O,regexIncludes:Y,regexNotIncludes:j,direction:B,lineLimit:l,startTime:o,endTime:r,duration:E,output:N}=Z;(0x0,utils_1[Qz(0x14b)])(this[Qz(0x1ba)]);const {apiContext:T,inquirerHelper:v,logsApiClient:h}=this,C=V?undefined:T[Qz(0x197)](),W=d||C||(yield v[Qz(0x137)]()),w=yield b(W,Z),H=yield M(W,w,Z),x=yield S(W,w,Z),J=yield k(W,w,x,Z),u=yield q(W,w,Z),n=yield i(W,w,Z);if(o&&r&&E)throw new Error('Only\x20two\x20of\x20\x27startTime\x27,\x20\x27endTime\x27\x20and\x20\x27duration\x27\x20can\x20be\x20set.');const R={'projectId':W,'entityId':w},m={'containerName':n,'types':I,'textIncludes':g,'textNotIncludes':O,'regexIncludes':Y,'regexNotIncludes':j,'lineLimit':l,'startTime':o,'duration':E,'runId':u,'buildId':H,'backupId':x,'restoreId':J,'isBuild':L!==null&&L!==void 0x0?L:![]},F=A?Qz(0x161):z?Qz(0x12e):Q,t=Object[Qz(0x19e)](Object[Qz(0x19e)]({},m),{'endTime':r,'direction':B});if(!a&&N!==Qz(0x163)&&N!==Qz(0x1a3)&&N!==Qz(0x174))this[Qz(0x182)](Q,w,W,Object[Qz(0x19e)](Object['assign']({},t),Z));const f=this[Qz(0x16d)](N,g!==null&&g!==void 0x0?g:Y);if(G){const K=yield h[Qz(0x159)][Qz(0x165)](R,m,F);K['on']('logs-received',f),K['on'](Qz(0x142),D=>(0x0,utils_1[Qz(0x142)])('Error\x20while\x20tailing\x20log\x20lines:\x20'+D[Qz(0x16c)])),K['on'](Qz(0x18b),()=>console[Qz(0x155)](Qz(0x152))),yield K[Qz(0x120)]();}else{const D=yield h[Qz(0x159)][Qz(0x1a5)](R,t,F);if(D[Qz(0x142)]){const c=D['error'][Qz(0x1b8)],U=c?Qz(0x178)+JSON[Qz(0x129)](c,null,'\x20'):'';(0x0,utils_1[Qz(0x142)])(Qz(0x1a8)+D[Qz(0x142)][Qz(0x16c)]+U);}else f(D[Qz(0x16a)],D[Qz(0x19b)]);}}));}}exports[a10y(0x18d)]=CliLogs;
|
|
1
|
+
'use strict';const a10y=a10o;function a10o(w,o){const C=a10w();return a10o=function(R,M){R=R-0x19e;let I=C[R];return I;},a10o(w,o);}(function(w,o){const v=a10o,C=w();while(!![]){try{const R=parseInt(v(0x231))/0x1+parseInt(v(0x22d))/0x2*(parseInt(v(0x1c1))/0x3)+parseInt(v(0x1b6))/0x4*(-parseInt(v(0x1dd))/0x5)+-parseInt(v(0x1e5))/0x6*(-parseInt(v(0x233))/0x7)+-parseInt(v(0x21a))/0x8*(-parseInt(v(0x1e6))/0x9)+-parseInt(v(0x1ec))/0xa+-parseInt(v(0x20d))/0xb*(parseInt(v(0x1be))/0xc);if(R===o)break;else C['push'](C['shift']());}catch(M){C['push'](C['shift']());}}}(a10w,0x71339));var __awaiter=this&&this[a10y(0x1d3)]||function(w,o,C,R){function M(I){return I instanceof C?I:new C(function(l){l(I);});}return new(C||(C=Promise))(function(I,l){const J=a10o;function a(F){try{e(R['next'](F));}catch(Q){l(Q);}}function H(F){const P=a10o;try{e(R[P(0x1f0)](F));}catch(Q){l(Q);}}function e(F){const B=a10o;F[B(0x1ca)]?I(F[B(0x230)]):M(F[B(0x230)])['then'](a,H);}e((R=R[J(0x1db)](w,o||[]))['next']());});},__importDefault=this&&this[a10y(0x204)]||function(w){const Y=a10y;return w&&w[Y(0x1d7)]?w:{'default':w};};function a10w(){const wo=['toISOString','askForAddonRestore',',\x20from:\x20','@northflank/js-client',',\x20to:\x20','15520xvGVvM','\x0aDetails:\x20','defaultDurationSeconds','addonBackup','Get\x20logs\x20generated\x20before\x20this\x20time,\x20','getCurrentServiceName','./log-formatter','\x20to\x20get\x20logs\x20from','Output\x20formatting.\x20Will\x20use\x20advanced\x20formatting\x20by\x20default.','conflicts','\x20--','backward','restoreId','values','job','--endTime\x20<timestamp>','askForJobRun','>\x20Container\x20logs','parseDateInput','26ZOMsKz','getSeconds',',\x20duration:\x20','value','864202BwOFVD','-t,\x20--types\x20<types...>','1595783VgKuMS','Project\x20for\x20logs','--duration\x20[duration]','addon','alias','assign','yaml','serviceId','printResponse','../utils','jobId','logsApiClient','Id]','Length\x20of\x20timespan\x20in\x20seconds.\x20Only\x20valid\x20if\x20not\x20both,\x20startTime\x20and\x20endTime\x20are\x20set','textIncludes','json','--textIncludes\x20<text>','format','InquirerHelper','-f,\x20--tail','details','printInitInfo','No\x20logs\x20found\x20for\x20this\x20query.\x20Make\x20sure\x20to\x20select\x20an\x20appropriate\x20time\x20window.','--restore\x20--restoreId\x20[restoreId]','Number\x20of\x20lines\x20to\x20return.','Only\x20two\x20of\x20\x27startTime\x27,\x20\x27endTime\x27\x20and\x20\x27duration\x27\x20can\x20be\x20set.','172pZJwiD','apiContext','regexIncludes','\x20for\x20all\x20containers','addOption','textNotIncludes','Backup\x20to\x20get\x20logs\x20from','forEach','60ZdXoAM','defineProperty','logs','77841qYoowa','option','runId','askForAddonBackup','askForJob','service','getCommand','getStandardLogCommand','pagination','done','CliLogs','name','Id\x20[','commander','--container\x20--containerId\x20[containerId]','backupId','tsHint','getLogsCommand','__awaiter','error','hasNextPage',',\x20backup\x20id\x20','__esModule','Element\x20count\x20for\x20this\x20request\x20exceeds\x20the\x20line\x20limit,\x20output\x20was\x20truncated.\x20Cut\x20off\x20at\x20timestamp\x20','length','forward','apply','\x20seconds','38490DKwkXv','Which\x20log\x20types\x20to\x20fetch','start','slice','ApiClient','customUserAgent','bold','--run\x20--runId\x20[runId]','6mJDYQl','576JxpjkR','logTail','Restore\x20to\x20get\x20logs\x20from','formatLogLine','description','\x20of\x20','1263500VcWwzJ','yml','../inquirer-helper','Log\x20session\x20ended','throw','regexNotIncludes','tail','--build\x20--buildId\x20[buildId]','containerId','--project\x20--projectId\x20[projectId]','LogType','default','-o,\x20--output\x20[output]','message','--regexNotIncludes\x20<regex>','--backup\x20--backupId\x20[backupId]','choices','noDefaults','close','getCurrentJobName','log','valueOf','getFormatter','getCurrentProjectName','__importDefault','--regexIncludes\x20<regex>','\x20for\x20container\x20','inquirerHelper','askForAddon','setSeconds','Option','Filter\x20log\x20lines\x20to\x20not\x20match\x20this\x20regular\x20expression','toUpperCase','1391731xWSzkt','assertContextExisting','\x20with\x20live-tailing','-l,\x20--lineLimit\x20[limit]','Build\x20to\x20get\x20logs\x20from','--noDefaults','Job\x20run\x20id,\x20example:\x20162b1977-6636-4000-929b-cc265b862ff0','build-'];a10w=function(){return wo;};return a10w();}Object[a10y(0x1bf)](exports,a10y(0x1d7),{'value':!![]}),exports['CliLogs']=void 0x0;const js_client_1=require(a10y(0x218)),chalk_1=__importDefault(require('chalk')),utils_1=require(a10y(0x1a5)),inquirer_helper_1=require(a10y(0x1ee)),commander_1=require(a10y(0x1ce)),console_format_helpers_1=require('../formatting/console-format-helpers'),log_formatter_1=require(a10y(0x220));class CliLogs{constructor(w){const w0=a10y;this[w0(0x1b7)]=w,this[w0(0x21c)]=0x708,this[w0(0x1c8)]=(o,C,R,M)=>{const w1=w0,I=(0x0,utils_1[w1(0x1c7)])(!![])[w1(0x1cc)]((C?'build-':'')+w1(0x1c0))[w1(0x1a0)]((C?w1(0x214):'')+w1(0x200))[w1(0x1ea)]('Get\x20log\x20for\x20the\x20specified\x20'+o)[w1(0x1c2)](w1(0x1f5),w1(0x234))[w1(0x1c2)]('--'+o+w1(0x224)+o+w1(0x1cd)+o+w1(0x1a8),o['charAt'](0x0)[w1(0x20c)]()+o[w1(0x1e0)](0x1)+w1(0x221))[w1(0x1c2)](w1(0x1cf),'Container\x20to\x20exec\x20into\x20(logs\x20from\x20all\x20containers\x20will\x20be\x20shown\x20if\x20not\x20specified)');if(C)I['option'](w1(0x1f3),w1(0x211));if(o===w1(0x228))I[w1(0x1c2)](w1(0x1e4),w1(0x213));if(R)I[w1(0x1c2)](w1(0x1fb),w1(0x1bc));if(M)I[w1(0x1c2)](w1(0x1b3),w1(0x1e8));return!C&&!R&&!M&&I[w1(0x1ba)](new commander_1['Option'](w1(0x232),w1(0x1de))[w1(0x1fc)](Object['values'](js_client_1[w1(0x1f6)]))),I[w1(0x1c2)](w1(0x1af),'Tail\x20will\x20stream\x20logs\x20in\x20real-time.\x20Session\x20will\x20be\x20kept\x20open.')[w1(0x1c2)](w1(0x210),w1(0x1b4))[w1(0x1c2)]('--startTime\x20<timestamp>','Get\x20logs\x20generated\x20after\x20this\x20time,\x20'+utils_1[w1(0x1d1)],utils_1[w1(0x22c)])['addOption'](new commander_1['Option'](w1(0x229),w1(0x21e)+utils_1[w1(0x1d1)])['argParser'](utils_1['parseDateInput'])[w1(0x223)]([w1(0x1f2)]))[w1(0x1c2)](w1(0x19e),w1(0x1a9))['addOption'](new commander_1[(w1(0x20a))]('-d,\x20--direction\x20<order>','Direction\x20of\x20logs.\x20Ignored\x20when\x20tailing.')[w1(0x1fc)]([w1(0x225),w1(0x1da)])[w1(0x223)]([w1(0x1f2)]))[w1(0x1ba)](new commander_1['Option'](w1(0x1ac),'Filter\x20log\x20lines\x20to\x20include\x20this\x20text')[w1(0x223)]([w1(0x1bb),'regexIncludes',w1(0x1f1)]))[w1(0x1ba)](new commander_1[(w1(0x20a))]('--textNotIncludes\x20<text>','Filter\x20log\x20lines\x20to\x20not\x20include\x20this\x20text')[w1(0x223)]([w1(0x1aa),w1(0x1b8),'regexNotIncludes']))[w1(0x1ba)](new commander_1[(w1(0x20a))](w1(0x205),'Filter\x20log\x20lines\x20to\x20match\x20this\x20regular\x20expression')[w1(0x223)]([w1(0x1bb),w1(0x1aa),'regexNotIncludes']))[w1(0x1ba)](new commander_1[(w1(0x20a))](w1(0x1fa),w1(0x20b))[w1(0x223)]([w1(0x1bb),w1(0x1b8),w1(0x1aa)]))[w1(0x1c2)](w1(0x212),'Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.',![])['addOption'](new commander_1['Option'](w1(0x1f8),w1(0x222))[w1(0x1fc)](Object[w1(0x227)]([w1(0x1ad),w1(0x1ab),w1(0x1a2)]))),I;},this[w0(0x1b1)]=(o,C,R,M)=>{const w2=w0,{containerName:I,restoreId:l,backupId:a,quiet:H,tail:e,startTime:F,endTime:Q,duration:L}=M;if(H===!![])return;const z=e?'\x20(exit\x20with\x20'+chalk_1['default'][w2(0x1e3)]('\x27Ctrl+C\x27')+')':'',i=e?w2(0x20f):'',q=new Date(),m=F!==null&&F!==void 0x0?F:new Date(new Date((Q!==null&&Q!==void 0x0?Q:q)[w2(0x201)]())['setSeconds']((Q!==null&&Q!==void 0x0?Q:q)['getSeconds']()-(L!==null&&L!==void 0x0?L:this[w2(0x21c)]))),k=(Q!==null&&Q!==void 0x0?Q:F!==undefined)?new Date(new Date(F[w2(0x201)]())[w2(0x209)](F[w2(0x22e)]()+(L!==null&&L!==void 0x0?L:this[w2(0x21c)]))):q,K=a!==undefined,n=m&&!K?w2(0x217)+chalk_1['default'][w2(0x1e3)](m[w2(0x215)]()):'',W=k&&!K?w2(0x219)+chalk_1[w2(0x1f7)]['bold'](k[w2(0x215)]()):'',O=L?w2(0x22f)+L+w2(0x1dc):'',r=I?w2(0x206)+chalk_1['default']['bold'](I):K?'':w2(0x1b9),c=a?w2(0x1d6)+a:'',A=l?',\x20restore\x20id\x20'+l:'',x=o+'\x20'+chalk_1[w2(0x1f7)][w2(0x1e3)](C)+c+A+'\x20in\x20project\x20'+chalk_1[w2(0x1f7)]['bold'](R),D=''+n+W+O;console[w2(0x200)](w2(0x22b)+i+r+w2(0x1eb)+x+D+z+':');},this[w0(0x202)]=(o,C)=>(R,M)=>{const w3=w0;if(!o){if(R[w3(0x1d9)]===0x0)console[w3(0x200)](w3(0x1b2));R[w3(0x1bd)](I=>(0x0,log_formatter_1[w3(0x1e9)])(I,C));}else(0x0,console_format_helpers_1[w3(0x1a4)])(o,R);(M===null||M===void 0x0?void 0x0:M[w3(0x1d5)])&&(0x0,utils_1['warning'])(w3(0x1d8)+M['cursor']);},this['apiClient']=new js_client_1[(w0(0x1e1))](w,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[w0(0x1e2)]}),this[w0(0x1a7)]=this['apiClient'],this[w0(0x207)]=new inquirer_helper_1[(w0(0x1ae))](this['apiClient']);}[a10y(0x1d2)](w,o=![],C=![],R=![]){const M=(F,Q)=>__awaiter(this,void 0x0,void 0x0,function*(){const w4=a10o,L=Q[w4(0x1fd)],{apiContext:z,inquirerHelper:i}=this;switch(w){case w4(0x1c6):{const q=L?undefined:z[w4(0x21f)]();return Q[w4(0x1a3)]||q||(yield i['askForService'](F)());}case w4(0x228):{const m=L?undefined:z[w4(0x1ff)]();return Q[w4(0x1a6)]||m||(yield i[w4(0x1c5)](F)());}case w4(0x19f):{return Q['addonId']||(yield i[w4(0x208)](F)());}}}),I=(F,Q,L)=>__awaiter(this,void 0x0,void 0x0,function*(){const w5=a10o;if(o)return L['buildId']||(yield this[w5(0x207)]['askForBuild'](F,w===w5(0x1c6)?Q:undefined,w===w5(0x228)?Q:undefined,!![])());return undefined;}),l=(F,Q,L)=>__awaiter(this,void 0x0,void 0x0,function*(){const w6=a10o;if(C||R)return L[w6(0x1d0)]||(yield this['inquirerHelper'][w6(0x1c4)](F,Q)());return undefined;}),a=(F,Q,L,z)=>__awaiter(this,void 0x0,void 0x0,function*(){const w7=a10o;if(R)return z[w7(0x226)]||(yield this[w7(0x207)][w7(0x216)](F,Q,L)());return undefined;}),H=(F,Q,L)=>__awaiter(this,void 0x0,void 0x0,function*(){const w8=a10o;if(!o&&L[w8(0x1f4)]!==undefined){if(L['containerId']!==!![])return L[w8(0x1f4)];return yield this['inquirerHelper']['askForContainer'](F,w==='service'?Q:undefined,w===w8(0x228)?Q:undefined,!![])();}return undefined;}),e=(F,Q,L)=>__awaiter(this,void 0x0,void 0x0,function*(){const w9=a10o;if(w==='job')return L[w9(0x1c3)]||(yield this[w9(0x207)][w9(0x22a)](Q,F,!![])());return undefined;});return this['getStandardLogCommand'](w,o,C,R)['action'](F=>__awaiter(this,void 0x0,void 0x0,function*(){const ww=a10o,{noDefaults:Q,projectId:L,quiet:z,tail:i,types:q,textIncludes:m,textNotIncludes:k,regexIncludes:K,regexNotIncludes:n,direction:W,lineLimit:O,startTime:r,endTime:c,duration:A,output:x}=F;(0x0,utils_1[ww(0x20e)])(this['apiClient']);const {apiContext:D,inquirerHelper:t,logsApiClient:g}=this,h=Q?undefined:D[ww(0x203)](),N=L||h||(yield t['askForProject']()),T=yield M(N,F),s=yield I(N,T,F),d=yield l(N,T,F),p=yield a(N,T,d,F),E=yield e(N,T,F),j=yield H(N,T,F);if(r&&c&&A)throw new Error(ww(0x1b5));const X={'projectId':N,'entityId':T},b={'containerName':j,'types':q,'textIncludes':m,'textNotIncludes':k,'regexIncludes':K,'regexNotIncludes':n,'lineLimit':O,'startTime':r,'duration':A,'runId':E,'buildId':s,'backupId':d,'restoreId':p,'isBuild':o!==null&&o!==void 0x0?o:![]},u=R?'addonRestore':C?ww(0x21d):w,S=Object[ww(0x1a1)](Object['assign']({},b),{'endTime':c,'direction':W});if(!z&&x!==ww(0x1a2)&&x!==ww(0x1ed)&&x!==ww(0x1ab))this[ww(0x1b1)](w,T,N,Object['assign'](Object[ww(0x1a1)]({},S),F));const V=this[ww(0x202)](x,m!==null&&m!==void 0x0?m:K);if(i){const f=yield g[ww(0x1c0)][ww(0x1e7)](X,b,u);f['on']('logs-received',V),f['on'](ww(0x1d4),Z=>(0x0,utils_1[ww(0x1d4)])('Error\x20while\x20tailing\x20log\x20lines:\x20'+Z[ww(0x1f9)])),f['on'](ww(0x1fe),()=>console['log'](ww(0x1ef))),yield f[ww(0x1df)]();}else{const Z=yield g[ww(0x1c0)]['logRange'](X,S,u);if(Z[ww(0x1d4)]){const G=Z[ww(0x1d4)][ww(0x1b0)],U=G?ww(0x21b)+JSON['stringify'](G,null,'\x20'):'';(0x0,utils_1[ww(0x1d4)])('Error\x20while\x20fetching\x20log\x20lines:\x20'+Z[ww(0x1d4)][ww(0x1f9)]+U);}else V(Z['data'],Z[ww(0x1c9)]);}}));}}exports[a10y(0x1cb)]=CliLogs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a11L=a11o;function a11w(){const m=['yellow','greenBright','green','1062320SfPMFh','replace','bold','grey','\x20--\x20','1868334WuviBX','8iPdHOe','default','__esModule','log','14800690eRxpTC','blue','defaultLogSyntax','defineProperty','1FBiMkQ','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','2344265CywCTC','706671oDAVsv','dim','pattern','1028944QaSyzw','__importDefault','3074706swMWFN','formatLogLine','5eeFMgQ','reduce','toISOString'];a11w=function(){return m;};return a11w();}(function(w,o){const Q=a11o,C=w();while(!![]){try{const R=parseInt(Q(0x187))/0x1*(parseInt(Q(0x16f))/0x2)+-parseInt(Q(0x16c))/0x3+-parseInt(Q(0x179))/0x4+parseInt(Q(0x173))/0x5*(-parseInt(Q(0x17e))/0x6)+-parseInt(Q(0x16b))/0x7*(parseInt(Q(0x17f))/0x8)+-parseInt(Q(0x171))/0x9+parseInt(Q(0x183))/0xa;if(R===o)break;else C['push'](C['shift']());}catch(M){C['push'](C['shift']());}}}(a11w,0x7b68e));function a11o(w,o){const C=a11w();return a11o=function(R,M){R=R-0x16b;let I=C[R];return I;},a11o(w,o);}var __importDefault=this&&this[a11L(0x170)]||function(w){const z=a11L;return w&&w[z(0x181)]?w:{'default':w};};Object[a11L(0x186)](exports,a11L(0x181),{'value':!![]}),exports[a11L(0x172)]=exports['defaultLogSyntax']=void 0x0;const chalk_1=__importDefault(require('chalk'));exports[a11L(0x185)]=[{'color':a11L(0x17c),'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':a11L(0x17c),'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':a11L(0x17c),'pattern':/[0-9]{4}\/[0-9]{2}\/[0-9]{2}/i},{'color':a11L(0x17c),'pattern':/\s\b([0-9]{2}:){1,2}[0-9]{2}\b\s/i},{'color':a11L(0x17b),'pattern':new RegExp(a11L(0x188),'i')},{'color':a11L(0x178),'pattern':/(?:\d{1,3}\.){3}\d{1,3}/i},{'color':a11L(0x178),'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':a11L(0x184),'pattern':/\b(GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH)\b/},{'color':a11L(0x177),'pattern':/\b(successful|success|completed|complete|done)\b/i},{'color':'red','pattern':/\b(failed|fail|stderr|error|err)\b/i},{'color':'gray','pattern':/\b(information|info|debug)\b/i},{'color':a11L(0x176),'pattern':/\b(warning|warn)\b/i},{'color':'blue','pattern':/[0-9a-f]{64}/i},{'color':a11L(0x184),'pattern':/[0-9a-fA-F]{8}[-]?([0-9a-fA-F]{4}[-]?){3}[0-9a-fA-F]{12}/i}];const formatLogLine=(w,o)=>{const i=a11L,C=chalk_1['default'][i(0x16d)](w['ts'][i(0x175)]()),R=chalk_1[i(0x180)]['cyan'](w['containerId']),M=exports[i(0x185)][i(0x174)]((H,e)=>{const q=i;return H['replace'](e[q(0x16e)],F=>e['color']?chalk_1[q(0x180)][e['color']](F):chalk_1[q(0x180)][q(0x17c)](F));},w['log']),I=o?M[i(0x17a)](new RegExp(o,'g'),a=>chalk_1[i(0x180)][i(0x17b)](a)):M;console[i(0x182)](C+'\x20'+R+i(0x17d)+I);};exports[a11L(0x172)]=formatLogLine;
|