@northflank/cli 0.9.17 → 0.9.19
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/pagination/pagination-helper.js +1 -1
- package/dist/port-forward/index.js +1 -1
- package/dist/utils.js +1 -1
- package/package.json +2 -2
package/dist/exec/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a4o=a4I;(function(u,I){const R=a4I,a=u();while(!![]){try{const x=-parseInt(R(0x243))/0x1+-parseInt(R(0x221))/0x2*(parseInt(R(0x21b))/0x3)+parseInt(R(0x208))/0x4+-parseInt(R(0x202))/0x5*(-parseInt(R(0x21a))/0x6)+parseInt(R(0x1fe))/0x7*(-parseInt(R(0x226))/0x8)+-parseInt(R(0x250))/0x9*(-parseInt(R(0x1ec))/0xa)+parseInt(R(0x227))/0xb;if(x===I)break;else a['push'](a['shift']());}catch(D){a['push'](a['shift']());}}}(a4u,0x596b5));function a4u(){const S=['254352pCAmrx','stdout','setRawMode','with\x20shell\x20session','5aurMhj','resizeTerminal','slice','filter','execStartLog','warning','99848HTOtsI','status','getTerminalSize','assertContextExisting','handleShellSession','\x20to\x20exec\x20into','name','InquirerHelper','done','__importDefault','ApiClient','execJobSession','with\x20command\x20\x27','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','log','none','next','\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','4340706ytlWch','5667UGSEck','option','Received\x20Ctrl+D\x20twice,\x20exiting\x20shell\x20forcefully.','bold','Unknown','exitCode','398TSmiAZ','stdOut','getCommand','greenBright','without\x20shell','56WmsRxC','8566261NTCySW','stdin','getCurrentServiceName','Container\x20to\x20exec\x20into\x20(random\x20container\x20will\x20be\x20chosen\x20if\x20not\x20specified)','toUpperCase','--user\x20[USER]','Command\x20exec\x20for\x20the\x20specified\x20','Run\x20command\x20with\x20this\x20user','keypress','\x20in\x20project\x20','--container\x20--containerId\x20[NAME]','value','command-exec','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.','with\x20user:','isTTY','pipe','defineProperty','apply','exit','customUserAgent','sequence','columns','rows','join',',\x20details:\x20','Command\x20execution\x20(exec)\x20for\x20Northflank\x20services\x20and\x20jobs.','then','596530UdDWlL','description','Project\x20for\x20exec','exec','Run\x20command\x20with\x20this\x20group','execServiceSession','job','default','../utils','__esModule','throw','resize','addCommand','53910yqqjsJ','shell\x20command\x20','waitForCommandResult','--group\x20[GROUP]','.\x0aExamples:\x0a\x20\x20Shell\x20session:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20northflank\x20exec\x20','@northflank/js-client','action','execCmd','stdErr','error','--noDefaults','110lwQXvd','apiClient','getCurrentProjectName','alias','CliExec','stdIn','(exit\x20with\x20two\x20quick\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.','\x0a\x20\x20Single\x20command,\x20no\x20shell:\x20\x20\x20\x20\x20northflank\x20exec\x20','getStandardExecCommand','with\x20group:','--project\x20--projectId\x20[NAME]','emitKeypressEvents','success','\x20--','askForService','message','askForProject'];a4u=function(){return S;};return a4u();}var __awaiter=this&&this['__awaiter']||function(u,I,a,x){function D(K){return K instanceof a?K:new a(function(z){z(K);});}return new(a||(a=Promise))(function(K,z){const r=a4I;function H(p){const q=a4I;try{C(x[q(0x218)](p));}catch(b){z(b);}}function s(p){const c=a4I;try{C(x[c(0x24d)](p));}catch(b){z(b);}}function C(p){const M=a4I;p[M(0x210)]?K(p[M(0x232)]):D(p[M(0x232)])[M(0x242)](H,s);}C((x=x[r(0x239)](u,I||[]))[r(0x218)]());});},__importDefault=this&&this[a4o(0x211)]||function(u){const w=a4o;return u&&u[w(0x24c)]?u:{'default':u};};Object[a4o(0x238)](exports,a4o(0x24c),{'value':!![]}),exports[a4o(0x1f0)]=void 0x0;const js_client_1=require(a4o(0x1e6)),chalk_1=__importDefault(require('chalk')),utils_1=require(a4o(0x24b)),inquirer_helper_1=require('../inquirer-helper');function a4I(u,I){const a=a4u();return a4I=function(x,D){x=x-0x1e6;let K=a[x];return K;},a4I(u,I);}class CliExec{constructor(u){const h=a4o;this['getStandardExecCommand']=D=>(0x0,utils_1[h(0x223)])(!![])[h(0x20e)](D)['description'](h(0x22d)+D+h(0x254)+D+h(0x1f4)+D+'\x20--cmd\x20\x27date\x27\x0a\x20\x20Single\x20command,\x20custom\x20shell:\x20northflank\x20exec\x20'+D+h(0x219)+D+'\x20--shell-cmd\x20\x27sh\x27')[h(0x21c)](h(0x1f7),h(0x245))[h(0x21c)]('--'+D+h(0x1fa)+D+'Id\x20[NAME]',D['charAt'](0x0)[h(0x22b)]()+D[h(0x204)](0x1)+h(0x20d))[h(0x21c)](h(0x231),h(0x22a))[h(0x21c)]('--shell-cmd\x20[SHELL-CMD]',h(0x1f3))[h(0x21c)](h(0x22c),h(0x22e))[h(0x21c)](h(0x253),h(0x247))[h(0x21c)](h(0x1eb),h(0x215),![])[h(0x21c)]('--cmd\x20--command\x20[COMMAND]',h(0x234)),this[h(0x20a)]=()=>({'columns':process['stdout'][h(0x23d)],'rows':process['stdout']['rows']}),this[h(0x206)]=(D,K,z,H,s,C,p,b)=>{const W=h;if(b===!![])return;const i=H==='none',j=i?W(0x225):H===undefined?W(0x201):W(0x251)+chalk_1['default'][W(0x224)](H),A=s!==undefined?W(0x235)+s:'',F=C!==undefined?W(0x1f6)+C:'',X=p!==undefined?W(0x214)+chalk_1[W(0x24a)]['greenBright'](p)+'\x27':'',T=[X,j,A,F][W(0x205)](f=>f!=='')[W(0x23f)]('\x20'),E=W(0x1f2)+chalk_1[W(0x24a)][W(0x21e)]('\x27Ctrl+D\x27')+')';console[W(0x216)]('Exec\x20'+D+'\x20'+chalk_1[W(0x24a)]['bold'](K)+W(0x230)+chalk_1[W(0x24a)][W(0x21e)](z)+'\x20'+T+'\x20'+E);},this[h(0x20c)]=(D,K,z=![])=>__awaiter(this,void 0x0,void 0x0,function*(){const B=h;var H,s;let C=![];try{if(process[B(0x228)][B(0x236)]){const b=require('readline');b[B(0x1f8)](process[B(0x228)]),process[B(0x228)][B(0x200)](!![]),process[B(0x1ff)]['on'](B(0x24e),()=>{const J=B;D[J(0x203)](this[J(0x20a)]());}),process[B(0x228)]['on'](B(0x22f),(i,j)=>{const V=B;j[V(0x23c)]==='\x04'&&(C?(process[V(0x228)][V(0x200)](![]),(0x0,utils_1[V(0x207)])(V(0x21d)),process[V(0x23a)]()):(C=!![],setTimeout(()=>C=![],0x190)));});}process[B(0x228)][B(0x237)](D[B(0x1f1)]),D[B(0x1e9)][B(0x237)](process['stderr']),D[B(0x222)][B(0x237)](process['stdout']),D['on'](B(0x1ea),i=>{const y=B;var j;(0x0,utils_1[y(0x1ea)])('Error\x20occured\x20during\x20'+K+'\x20command\x20exec:\x20'+((j=i[y(0x1fc)])!==null&&j!==void 0x0?j:i)),process[y(0x228)][y(0x236)]&&process[y(0x228)][y(0x200)](![]),process[y(0x23a)](-0x1);});const p=yield D[B(0x252)]();if(z!==!![]){const i=(H=p===null||p===void 0x0?void 0x0:p[B(0x209)])!==null&&H!==void 0x0?H:B(0x21f),j=(s=p===null||p===void 0x0?void 0x0:p[B(0x220)])!==null&&s!==void 0x0?s:-0x1,A=(p===null||p===void 0x0?void 0x0:p[B(0x1fc)])?B(0x240)+p[B(0x1fc)]:'';i==='Success'?(0x0,utils_1[B(0x1f9)])('Command\x20completed\x20successfully,\x20exit\x20code:\x20'+j):(0x0,utils_1[B(0x207)])('Command\x20didn\x27t\x20complete\x20successfully,\x20status:\x20'+i+',\x20exit\x20code:\x20'+j+A);}return p;}finally{process[B(0x228)]['isTTY']&&process[B(0x228)]['setRawMode'](![]);}}),this['apiClient']=new js_client_1[(h(0x212))](u,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[h(0x23b)]});const I=new inquirer_helper_1[(h(0x20f))](this[h(0x1ed)]);this[h(0x1e8)]=(0x0,utils_1[h(0x223)])()[h(0x20e)](h(0x233))[h(0x1ef)](h(0x246))[h(0x244)](h(0x241));const a=this[h(0x1f5)]('service')[h(0x1e7)](D=>__awaiter(this,void 0x0,void 0x0,function*(){const e=h,{noDefaults:K,projectId:z,serviceId:H,containerId:s,shellCmd:C,user:p,group:b,command:i,quiet:j}=D;(0x0,utils_1[e(0x20b)])(this[e(0x1ed)]);try{const A=K?undefined:u['getCurrentProjectName'](),F=z||A||(yield I[e(0x1fd)]()),X=K?undefined:u[e(0x229)](),T=H||X||(yield I[e(0x1fb)](F)()),E=C!==null&&C!==void 0x0?C:i!==undefined?e(0x217):undefined;this['execStartLog']('service',T,F,E,p,b,i,j);const f=process[e(0x1ff)][e(0x23d)],N=process[e(0x1ff)][e(0x23e)],P={'projectId':F,'serviceId':T},m=yield this[e(0x1ed)][e(0x246)][e(0x248)](P,{'containerName':s,'command':i,'shell':E,'user':p,'group':b,'ttyColumns':f,'ttyRows':N});yield this['handleShellSession'](m,'service',j);}catch(k){(0x0,utils_1[e(0x1ea)])(''+k[e(0x1fc)]);}finally{process[e(0x23a)]();}})),x=this['getStandardExecCommand'](h(0x249))['action'](D=>__awaiter(this,void 0x0,void 0x0,function*(){const U=h,{projectId:K,jobId:z,containerId:H,noDefaults:s,shellCmd:C,user:p,group:b,command:i,quiet:j}=D;(0x0,utils_1[U(0x20b)])(this['apiClient']);try{const A=s?undefined:u[U(0x1ee)](),F=K||A||(yield I[U(0x1fd)]()),X=z||(yield I['askForJob'](F)());this[U(0x206)]('job',X,F,C,j);const {rows:T,columns:E}=this['getTerminalSize'](),f={'projectId':F,'jobId':X},N=yield this['apiClient'][U(0x246)][U(0x213)](f,{'containerName':H,'command':i,'shell':C,'user':p,'group':b,'ttyColumns':E,'ttyRows':T});yield this[U(0x20c)](N,U(0x249),j);}catch(P){(0x0,utils_1[U(0x1ea)])(''+P[U(0x1fc)]);}finally{process[U(0x23a)]();}}));this[h(0x1e8)][h(0x24f)](a),this[h(0x1e8)][h(0x24f)](x);}}exports[a4o(0x1f0)]=CliExec;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a5m=a5I;(function(u,I){const P=a5I,a=u();while(!![]){try{const x=-parseInt(P(0x165))/0x1+parseInt(P(0x17b))/0x2+-parseInt(P(0x177))/0x3+parseInt(P(0x180))/0x4*(parseInt(P(0x16c))/0x5)+-parseInt(P(0x182))/0x6+-parseInt(P(0x172))/0x7*(-parseInt(P(0x16a))/0x8)+parseInt(P(0x167))/0x9*(parseInt(P(0x169))/0xa);if(x===I)break;else a['push'](a['shift']());}catch(D){a['push'](a['shift']());}}}(a5u,0xb7551));function a5I(u,I){const a=a5u();return a5I=function(x,D){x=x-0x160;let K=a[x];return K;},a5I(u,I);}var __awaiter=this&&this[a5m(0x166)]||function(u,I,a,x){function D(K){return K instanceof a?K:new a(function(z){z(K);});}return new(a||(a=Promise))(function(K,z){const c=a5I;function H(p){const k=a5I;try{C(x[k(0x160)](p));}catch(b){z(b);}}function s(p){const R=a5I;try{C(x[R(0x171)](p));}catch(b){z(b);}}function C(p){const q=a5I;p['done']?K(p[q(0x178)]):D(p[q(0x178)])[q(0x181)](H,s);}C((x=x[c(0x174)](u,I||[]))[c(0x160)]());});},__importDefault=this&&this[a5m(0x17c)]||function(u){return u&&u['__esModule']?u:{'default':u};};Object[a5m(0x16f)](exports,a5m(0x17d),{'value':!![]}),exports['getCommandOverview']=void 0x0;const chalk_1=__importDefault(require(a5m(0x17a))),utils_1=require('../utils');function getCommandOverview(u){const M=a5m;return(0x0,utils_1[M(0x17f)])()['name'](M(0x163))['description']('Prints\x20a\x20tree\x20view\x20of\x20all\x20available\x20commands')[M(0x164)](M(0x16e),M(0x16b))['action'](I=>__awaiter(this,void 0x0,void 0x0,function*(){const {verbose:a}=I;function x(D,K){const r=a5I;var z;const H=(E,f=!![])=>f?chalk_1['default'][r(0x162)]['green'](E['name']()):E[r(0x183)](),s=K[r(0x179)]===0x0,C=D[r(0x173)];let p='';const b=C[r(0x179)]===0x0,i=b||((z=Object[r(0x175)](D===null||D===void 0x0?void 0x0:D[r(0x16d)]()))===null||z===void 0x0?void 0x0:z[r(0x179)])>0x0;!s&&(p=C&&!b?'┬\x20':'─\x20');const j=a&&i&&D['description']()?':\x20'+D[r(0x170)]():'';console['log'](''+K+p+H(D,i)+j);let A=K;if(!s){const E=K[r(0x161)](-0x2)==='└─';A=K[r(0x161)](0x0,-0x2)+(E?'\x20\x20':'│\x20');}const F=A+'├─',X=A+'└─',T=C[r(0x17e)](f=>f[r(0x173)]['length']===0x0);T&&!b&&!a?console['log'](X+'\x20'+C[r(0x176)](f=>H(f))[r(0x168)](',\x20')):C['forEach']((f,N)=>{x(f,C['length']-0x1===N?X:F);});}x(u,'');}));}exports['getCommandOverview']=getCommandOverview;function a5u(){const o=['4970vbJWwI','408IQCzli','Print\x20command\x20descriptions','6635ODGeQL','opts','--verbose','defineProperty','description','throw','137949cjKFbF','commands','apply','keys','map','2038398hvMGRY','value','length','chalk','822852ZtYLuc','__importDefault','__esModule','every','getCommand','16STTrEM','then','5335314tDdDHx','name','next','slice','bold','command-overview','option','1260648jUqzSU','__awaiter','39087nbWYUd','join'];a5u=function(){return o;};return a5u();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a6X=a6I;(function(u,I){const F=a6I,a=u();while(!![]){try{const x=-parseInt(F(0xcc))/0x1*(parseInt(F(0xfe))/0x2)+-parseInt(F(0xe9))/0x3*(parseInt(F(0xcd))/0x4)+-parseInt(F(0xe6))/0x5+-parseInt(F(0xd2))/0x6*(-parseInt(F(0xe5))/0x7)+-parseInt(F(0xd4))/0x8*(-parseInt(F(0xc2))/0x9)+parseInt(F(0xbd))/0xa*(parseInt(F(0xdd))/0xb)+parseInt(F(0xf8))/0xc*(parseInt(F(0xde))/0xd);if(x===I)break;else a['push'](a['shift']());}catch(D){a['push'](a['shift']());}}}(a6u,0xb189d));var __createBinding=this&&this[a6X(0xf2)]||(Object[a6X(0xcb)]?function(u,I,a,x){const T=a6X;if(x===undefined)x=a;var D=Object['getOwnPropertyDescriptor'](I,a);(!D||(T(0xc6)in D?!I[T(0xed)]:D['writable']||D[T(0xdc)]))&&(D={'enumerable':!![],'get':function(){return I[a];}}),Object['defineProperty'](u,x,D);}:function(u,I,a,x){if(x===undefined)x=a;u[x]=I[a];}),__setModuleDefault=this&&this[a6X(0xe0)]||(Object[a6X(0xcb)]?function(u,I){const E=a6X;Object[E(0xea)](u,'default',{'enumerable':!![],'value':I});}:function(u,I){const f=a6X;u[f(0xd0)]=I;}),__importStar=this&&this['__importStar']||function(u){const N=a6X;if(u&&u[N(0xed)])return u;var I={};if(u!=null){for(var a in u)if(a!==N(0xd0)&&Object[N(0xe3)][N(0xc7)][N(0xf6)](u,a))__createBinding(I,u,a);}return __setModuleDefault(I,u),I;},__importDefault=this&&this[a6X(0xda)]||function(u){const P=a6X;return u&&u[P(0xed)]?u:{'default':u};};Object[a6X(0xea)](exports,a6X(0xed),{'value':!![]}),exports['printResponse']=exports[a6X(0xce)]=exports[a6X(0xd6)]=exports[a6X(0xc3)]=exports[a6X(0xdf)]=exports[a6X(0xf7)]=void 0x0;const chalk_1=__importDefault(require('chalk')),_=__importStar(require(a6X(0xef))),util=__importStar(require(a6X(0xd7))),yaml=require(a6X(0xd5)),columnify=require('columnify');function printAsTable(u,I,a,x=![],D=0x0){const m=a6X;!x&&console[m(0xf3)](''+chalk_1['default'][m(0xbc)](I));function K(H){const k=m;return H===k(0xec)?H:H[k(0xe1)](k(0xec),'');}function z(H,s){const q=m;function C(b){const R=a6I,i=new Date(b);return i[R(0xd1)]()+'/'+i[R(0xca)]()+'/'+i[R(0xc0)]()+'\x0a'+i['getHours']()+':'+i['getMinutes']()+':'+i[R(0xdb)]();}const p=[q(0xbb),q(0xf5)];if(p[q(0xe8)](s['toLowerCase']())&&_[q(0xf0)](H)&&H[q(0xcf)]()[q(0xfc)]===0xd)return C(Number(H));if(_[q(0xd3)](H)){if(s!==q(0xec)&&s[q(0xe8)]('disabled'))return H?'x':'✔';return H?'✔':'x';}if(_['isObjectLike'](H))return util[q(0xe4)](H,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});return H;}if(_[m(0xe7)](u)){u[m(0xfc)]===0x0&&console[m(0xf3)](m(0xd9)+I[m(0xbf)]()+'\x20found');const H=u['map']((p,b)=>{const c=m,i={'i':b+D};return Object[c(0xc8)](p)[c(0xc5)](j=>{const M=c;(_[M(0xf1)](a)||a[M(0xe8)](j[M(0xbf)]()))&&_[M(0xfd)](i,K(j),z(p[j],j));}),i;}),s=_['clone'](Object['keys']((H===null||H===void 0x0?void 0x0:H[0x0])||[]))['sort']((p,i)=>{const r=m,j=A=>A!=='i'?A!==r(0xc4)?0x0:0x1:0x2;return j(i)-j(p);}),C={'maxWidth':0x1e,'preserveNewLines':!![],'showHeaders':!x,'config':{'_id':{'maxWidth':0x5,'truncate':!![]},'i':{'showHeaders':![]}},'columns':s};console[m(0xf3)](columnify(H,C));}else console[m(0xf3)](u);}exports['printAsTable']=printAsTable;function consoleFormat(u,I){const o=a6X;if(_[o(0xfa)](u)){const a=I?o(0xe2)+I+')':'';return chalk_1[o(0xd0)][o(0xbe)](o(0xf4))+a;}if(!_[o(0xfb)](u))return u===null||u===void 0x0?void 0x0:u[o(0xcf)]();return util[o(0xe4)](u,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});}function a6I(u,I){const a=a6u();return a6I=function(x,D){x=x-0xbb;let K=a[x];return K;},a6I(u,I);}exports[a6X(0xdf)]=consoleFormat;const handleJsonOutput=(u,I)=>{const w=a6X,a=u===w(0xf9);if(a)console['log'](JSON[w(0xd8)](I,null,'\x20'));};exports['handleJsonOutput']=handleJsonOutput;const handleYamlOutput=(u,I)=>{const h=a6X,a=u===h(0xc9)||u===h(0xc1);if(a)console[h(0xf3)](yaml[h(0xee)](I));};exports[a6X(0xd6)]=handleYamlOutput;const handleFormattedOutput=(u,I)=>{const W=a6X,a=u===W(0xeb);if(a)console['log'](consoleFormat(I));};exports[a6X(0xce)]=handleFormattedOutput;const printResponse=(u,I)=>{const B=a6X;(0x0,exports[B(0xc3)])(u,I),(0x0,exports[B(0xd6)])(u,I),(0x0,exports['handleFormattedOutput'])(u,I);};exports['printResponse']=printResponse;function a6u(){const J=['2103aRXVOB','defineProperty','format','disabled','__esModule','safeDump','lodash','isFinite','isUndefined','__createBinding','log','The\x20request\x20was\x20completed\x20successfully','updatedat','call','printAsTable','9037788kOklsl','json','isEmpty','isObjectLike','length','set','296vtHOMC','createdat','bold','10HnMLnV','green','toLowerCase','getFullYear','yml','258246zjPkKS','handleJsonOutput','internalId','forEach','get','hasOwnProperty','keys','yaml','getMonth','create','5666XyrHWo','6008BGjBZX','handleFormattedOutput','toString','default','getDate','5256bEhqby','isBoolean','312irCNWj','js-yaml','handleYamlOutput','util','stringify','No\x20','__importDefault','getSeconds','configurable','11566577RfgfUx','13Hntqxp','consoleFormat','__setModuleDefault','replace','\x20(HTTP\x20status:\x20','prototype','inspect','189FMQcpZ','1643535NLAIWL','isArrayLike','includes'];a6u=function(){return J;};return a6u();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a7t=a7I;(function(u,I){const v=a7I,a=u();while(!![]){try{const x=parseInt(v(0x128))/0x1*(-parseInt(v(0x124))/0x2)+parseInt(v(0x10f))/0x3+-parseInt(v(0x11d))/0x4*(-parseInt(v(0x118))/0x5)+-parseInt(v(0x116))/0x6+parseInt(v(0x101))/0x7*(parseInt(v(0x114))/0x8)+-parseInt(v(0x121))/0x9*(parseInt(v(0x103))/0xa)+-parseInt(v(0x11a))/0xb;if(x===I)break;else a['push'](a['shift']());}catch(D){a['push'](a['shift']());}}}(a7u,0x27689));function a7u(){const u5=['colors','max','2-digit','46074pxQfjn','default','12290iiIZnf','slice','repeat','map','symbols','h24','height','padding','undefined','green','push','__importDefault','564285NvKuOE','chalk','length','red','defineProperty','368rIAvIT','min','981444FnpXHs','grey','213215yVbPSq','__esModule','2377881OGziKu','isArray','format','8wUmAsl','abs','toLocaleDateString','offset','36ovJDuI','toLocaleTimeString','round','6YxSAZe','blue','join','toFixed','10025Cqowkd','floor'];a7u=function(){return u5;};return a7u();}var __importDefault=this&&this[a7t(0x10e)]||function(u){const Y=a7t;return u&&u[Y(0x119)]?u:{'default':u};};function a7I(u,I){const a=a7u();return a7I=function(x,D){x=x-0xfe;let K=a[x];return K;},a7I(u,I);}Object[a7t(0x113)](exports,a7t(0x119),{'value':!![]}),exports['downSampleData']=exports['getAsciiChart']=void 0x0;const chalk_1=__importDefault(require(a7t(0x110))),colored=(u,I)=>{const u0=a7t;return I===undefined?u:chalk_1[u0(0x102)][I](u);},getAsciiChart=(u,I={})=>{const u1=a7t,a=Array[u1(0x11b)](u[0x0])?u:[u];let D=typeof I[u1(0x115)]!==u1(0x10b)?I['min']:a[0x0][0x0],K=typeof I[u1(0xff)]!==u1(0x10b)?I[u1(0xff)]:a[0x0][0x0];for(let R=0x0;R<a[u1(0x111)];R++){for(let q=0x0;q<a[R][u1(0x111)];q++){D=Math[u1(0x115)](D,a[R][q]),K=Math[u1(0xff)](K,a[R][q]);}}let z=['┼','┤','╶','╴','─','╰','╭','╮','╯','│'],H=Math['abs'](K-D),s=typeof I[u1(0x120)]!==u1(0x10b)?I[u1(0x120)]:0x3,C=typeof I[u1(0x10a)]!==u1(0x10b)?I[u1(0x10a)]:'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',p=typeof I[u1(0x109)]!==u1(0x10b)?I[u1(0x109)]:H,b=typeof I[u1(0xfe)]!=='undefined'?I['colors']:[u1(0x125),u1(0x112),u1(0x10c),u1(0x117),'black'],A=H!==0x0?p/H:0x1,F=Math[u1(0x123)](D*A),X=Math[u1(0x123)](K*A),T=Math[u1(0x11e)](X-F),E=0x0;for(let c=0x0;c<a[u1(0x111)];c++){E=Math[u1(0xff)](E,a[c][u1(0x111)]);}E=E+s;let f=typeof I[u1(0x107)]!==u1(0x10b)?I[u1(0x107)]:z,N=I[u1(0x11c)]!==undefined?I[u1(0x11c)]:function(M){const u2=u1;return(C+M[u2(0x127)](0x2)+I['unit'])[u2(0x104)](-C['length']);},P=new Array(T+0x1);for(let M=0x0;M<=T;M++){P[M]=new Array(E);for(let r=0x0;r<E;r++){P[M][r]='\x20';}}for(let o=F;o<=X;++o){const w=N(T>0x0?K-(o-F)*H/T:o,o-F);P[o-F][Math[u1(0xff)](s-w['length'],0x0)]=w,P[o-F][s-0x1]=o==0x0?f[0x0]:f[0x1];}for(let h=0x0;h<a[u1(0x111)];h++){let W=b[h%b['length']],B=Math[u1(0x123)](a[h][0x0]*A)-F;P[T-B][s-0x1]=colored(f[0x0],W);for(let J=0x0;J<a[h][u1(0x111)]-0x1;J++){let V=Math[u1(0x123)](a[h][J+0x0]*A)-F,e=Math[u1(0x123)](a[h][J+0x1]*A)-F;if(V==e)P[T-V][J+s]=colored(f[0x4],W);else{P[T-e][J+s]=colored(V>e?f[0x5]:f[0x6],W),P[T-V][J+s]=colored(V>e?f[0x7]:f[0x8],W);let U=Math['min'](V,e),S=Math[u1(0xff)](V,e);for(let n=U+0x1;n<S;n++){P[T-n][J+s]=colored(f[0x9],W);}}}}const {startTs:m,endTs:k}=I;if(m||k){const L=O=>{const u3=u1;if(!O)return'\x20\x20\x20';const Q=O[u3(0x11f)](undefined,{'day':u3(0x100),'month':u3(0x100),'year':u3(0x100)}),d=O[u3(0x122)](undefined,{'hourCycle':u3(0x108)});return Q+'\x20'+d;},g=L(k),l=L(m),Z=C['slice'](0x0,Math[u1(0xff)](0x2,C[u1(0x111)]-l['length']/0x2+0x1)),G='\x20'[u1(0x105)](Math[u1(0xff)](E-(C[u1(0x111)]+g[u1(0x111)]/0x2),0x1));P[u1(0x10d)]([''+Z+l+G+g]),P[u1(0x10d)]([]);}return P[u1(0x106)](O=>O[u1(0x126)](''))[u1(0x126)]('\x0a');};exports['getAsciiChart']=getAsciiChart;const downSampleData=(u,I)=>{const u4=a7t,x=u[u4(0x111)];if(I>=x||I===0x0)return u;const D=[];let K=0x0;const z=(x-0x2)/(I-0x2);let H=0x0,s,C,p,b;D[K++]=u[H];for(var j=0x0;j<I-0x2;j++){let f=0x0,N=0x0,P=Math['floor']((j+0x1)*z)+0x1,m=Math[u4(0x129)]((j+0x2)*z)+0x1;m=m<x?m:x;var A=m-P;for(;P<m;P++){f+=u[P][0x0],N+=u[P][0x1];}f/=A,N/=A;var F=Math[u4(0x129)](j*z)+0x1,X=Math[u4(0x129)]((j+0x1)*z)+0x1,T=u[H][0x0],E=u[H][0x1];C=p=-0x1;for(;F<X;F++){p=Math[u4(0x11e)]((T-f)*(u[F][0x1]-E)-(T-u[F][0x0])*(N-E))*0.5,p>C&&(C=p,s=u[F],b=F);}D[K++]=s,H=b;}return D[K++]=u[x-0x1],D;};exports['downSampleData']=downSampleData;
|
package/dist/inquirer-helper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a8L=a8D;(function(C,D){const u=a8D,V=C();while(!![]){try{const Y=parseInt(u(0x1c4))/0x1*(parseInt(u(0x22c))/0x2)+-parseInt(u(0x24f))/0x3*(parseInt(u(0x1c9))/0x4)+-parseInt(u(0x220))/0x5+parseInt(u(0x214))/0x6+parseInt(u(0x1f3))/0x7+parseInt(u(0x215))/0x8*(-parseInt(u(0x197))/0x9)+parseInt(u(0x19d))/0xa;if(Y===D)break;else V['push'](V['shift']());}catch(e){V['push'](V['shift']());}}}(a8C,0xaad76));var __createBinding=this&&this[a8L(0x26a)]||(Object[a8L(0x1bb)]?function(C,D,V,Y){const v=a8L;if(Y===undefined)Y=V;var e=Object['getOwnPropertyDescriptor'](D,V);(!e||(v(0x218)in e?!D['__esModule']:e[v(0x1a0)]||e['configurable']))&&(e={'enumerable':!![],'get':function(){return D[V];}}),Object[v(0x1f7)](C,Y,e);}:function(C,D,V,Y){if(Y===undefined)Y=V;C[Y]=D[V];}),__setModuleDefault=this&&this[a8L(0x1e0)]||(Object[a8L(0x1bb)]?function(C,D){const k=a8L;Object[k(0x1f7)](C,k(0x258),{'enumerable':!![],'value':D});}:function(C,D){const s=a8L;C[s(0x258)]=D;}),__importStar=this&&this[a8L(0x200)]||function(C){const h=a8L;if(C&&C['__esModule'])return C;var D={};if(C!=null){for(var V in C)if(V!==h(0x258)&&Object[h(0x23c)][h(0x1b2)]['call'](C,V))__createBinding(D,C,V);}return __setModuleDefault(D,C),D;},__awaiter=this&&this['__awaiter']||function(C,D,V,Y){function e(T){return T instanceof V?T:new V(function(W){W(T);});}return new(V||(V=Promise))(function(T,W){const y=a8D;function f(i){const j=a8D;try{G(Y[j(0x19a)](i));}catch(I){W(I);}}function q(i){const U=a8D;try{G(Y[U(0x183)](i));}catch(I){W(I);}}function G(i){const t=a8D;i[t(0x187)]?T(i[t(0x194)]):e(i['value'])['then'](f,q);}G((Y=Y[y(0x231)](C,D||[]))[y(0x19a)]());});},__importDefault=this&&this[a8L(0x191)]||function(C){const Z=a8L;return C&&C[Z(0x1fc)]?C:{'default':C};};Object[a8L(0x1f7)](exports,a8L(0x1fc),{'value':!![]}),exports['InquirerHelper']=void 0x0;function a8C(){const Cw=['tag','No,\x20but\x20save\x20as\x20file','boolean','isUndefined','throw','maxLength','askForPipeline','this\x20option\x20is\x20required,\x20please\x20answer','done','Please\x20confirm\x20following\x20configuration:\x0a','green','Writing\x20configuration\x20failed:\x20','volume','retry','saveFile','set','confirmationPrompt','askForResource','__importDefault','\x20characters,\x20is\x20','getPathString','value','services','safeLoad','8795502uBhIBQ','service','Choose\x20the\x20login\x20token:','next','addons','items','1917570ShpidW','for\x20this\x20','builds','writable','password','What\x20do\x20you\x20want\x20to\x20use\x20as','isEmpty','editor','grey','No\x20','cursor','No,\x20abort',',\x20supported\x20types:\x20[json|yaml|yml]','getCurrentProjectName','keys','REPEAT','template','templateRuns','domains','addEntry','DynamicReloadPaginationPrompt','hasOwnProperty','must\x20be\x20shorter\x20than\x20or\x20equal\x20to\x20','pipelines','yellowBright','pagination','\x20and\x20it\x20','message','confirm','askConfirm','create','jobs','logSinks','charAt','uri','main-context','unshift','token','registryCredentials','248128TtQSFY','Aborted.','askArrayEntry','\x20characters','\x20(startedAt:\x20','368hyVYhD','search-list','askForAddonBackup','askForResourcePaginated','test','job','nextPageCursor','then','must\x20be\x20longer\x20than\x20or\x20equal\x20to\x20','InquirerHelper','enum','bgGrey','Configuration\x20file\x20written\x20to\x20','pathVars','runs','skipValidation','YES','oneOf','template\x20run','completedAt','askForBuild','repeat','toString','__setModuleDefault','Go\x20to\x20editor','addon','askForProject','isObject','tmpCmdPath','filter','trim','askForJobRun','askForCredentials','string','subdomain','integer','credentials','yaml','pop','),\x20subdomain\x20(','No,\x20repeat','project:\x20\x27','1507303UUnSQa','doesn\x27t\x20match\x20pattern\x20\x27','log\x20sink','bold','defineProperty','concat','slice','blue','object','__esModule','minLength','\x20to\x20use:','split','__importStar','contextProvider','inquirer','fullName','not\x20completed','all-job-runs','rawObject','No\x20builds\x20found','map','body','defaultPaginationPageSize','getQuestionString','opt','fetchResourceList','writeFileSync','path','max','don\x27t\x20change','askForDomain','askForTemplate','7664826QpccYj','8baSeyy','Choose\x20the\x20','projects','get','isArray','nextCursor','paths','greenBright','Should\x20it\x20be','js-yaml','retrievePayloadViaInteractiveCli','1104825exffJr','isNaN','createdAt','Provide\x20a\x20file\x20path\x20to\x20write\x20the\x20configuration\x20to\x20(<name>.[json|yaml|yml])','What\x27s\x20the\x20','confirmation','askForVolume','volumes','reset','No,\x20edit','askForAddonRestore','chalk','6zUMzfG','find','unset','type','has','apply','service:\x20\x27','override','minimum','EDIT','description','\x20type?','data','askForLogSink','red','.\x20This\x20is\x20irreversible.\x20Please\x20confirm!','prototype','maximum','input','askForProjectScopedResourcePaginated','underline','addon:\x20\x27','resultCache','askForSecret','choice','success','toUpperCase','\x20in\x20','askForAddon','stringify','tags','Do\x20you\x20want\x20to\x20add\x20more','\x20(full\x20domain:\x20','properties','whiteBright','17313cijwme','subdomains','values','includes','found','subdomainPath','list','example','\x20(completedAt:\x20','default','editPayload','askForSubdomainPath','service\x20containers','Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.','pattern','job:\x20\x27','project','registerPrompt','anyOf','templates','safeDump','service\x20build','warning','assign','prompt','SAVE','Unexpected\x20file\x20type:\x20','__createBinding','must\x20be\x20a\x20valid\x20non-empty\x20json\x20string','ABORT','WARNING:\x20You\x20are\x20about\x20to\x20delete\x20','isBoolean','join','apiClient','getType','a\x20Northflank\x20resource','isValidJSON','backups','tokenPrompt','pipeline','cmdPath','Template\x20id\x20not\x20provided.','name','deleteWarningPrompt','required','\x27\x20already\x20exists.\x20Do\x20you\x20want\x20to\x20override\x20this\x20context\x20(y)\x20or\x20enter\x20a\x20new\x20name\x20(N)?','Context\x20name\x20already\x20exists.','domain\x20(','push','validate','length','containers','propToType','Do\x20you\x20want\x20to\x20add','ask','askForTemplateRun','domain','pagination-prompt'];a8C=function(){return Cw;};return a8C();}function a8D(C,D){const V=a8C();return a8D=function(Y,e){Y=Y-0x164;let T=V[Y];return T;},a8D(C,D);}const _=__importStar(require('lodash')),chalk_1=__importDefault(require(a8L(0x22b))),fs=__importStar(require('fs')),utils_1=require('./utils'),api_helpers_1=require('./api-helpers'),inquirer_pagination_prompt_1=require('./pagination/inquirer-pagination-prompt'),inquirer=require(a8L(0x202)),inquirerSearchList=require('inquirer-search-list'),yaml=require(a8L(0x21e));var ConfirmChoices;(function(C){const X=a8L;C[X(0x1d9)]='Yes,\x20send',C[X(0x1ac)]=X(0x1f1),C[X(0x235)]=X(0x229),C[X(0x268)]=X(0x180),C['ABORT']=X(0x1a8);}(ConfirmChoices||(ConfirmChoices={})));class InquirerHelper{constructor(C){const p=a8L;this[p(0x166)]=C,this['defaultPaginationPageSize']=0x32,this[p(0x259)]=D=>__awaiter(this,void 0x0,void 0x0,function*(){const M=p,{editedResult:V}=yield inquirer[M(0x267)]([{'type':M(0x1a4),'name':'editedResult','message':M(0x1e1),'default':yaml['safeDump'](D)}]);return yaml[M(0x196)](V);}),this[p(0x18d)]=D=>__awaiter(this,void 0x0,void 0x0,function*(){const n=p,V=f=>n(0x269)+f+n(0x1a9);function Y(){return __awaiter(this,void 0x0,void 0x0,function*(){const r=a8D;return inquirer[r(0x267)]([{'type':'input','name':'fileName','message':r(0x223),'validate':f=>new RegExp('.*\x5c.(json|yaml|yml)$')[r(0x1cd)](f)?!![]:V(f)}]);});}const {fileName:T}=yield Y(),W=T[n(0x1df)]()[n(0x1ff)]('.')[n(0x1ef)]();try{switch(W){case'json':(0x0,utils_1[n(0x245)])(n(0x1d5)+T);return fs[n(0x20e)](T,JSON[n(0x249)](D,null,'\x20\x20'));case n(0x1ee):case'yml':(0x0,utils_1[n(0x245)])(n(0x1d5)+T);return fs[n(0x20e)](T,yaml['safeDump'](D));default:(0x0,utils_1[n(0x265)])(V(W));}}catch(f){(0x0,utils_1[n(0x265)])(n(0x18a)+f[n(0x1b8)]);}return undefined;}),this['filter']=(D,V)=>Y=>{const l=p,e=typeof Y===l(0x1ea)?Y[l(0x1e7)]():Y;return V===![]&&e===l(0x211)?'':e;},this[p(0x176)]=(D,V,Y)=>e=>{const b=p;if(this['skipValidation']===!![])return!![];const T=[];if(e===''||e===b(0x211)){if(V!==![])T['push'](b(0x186));else return!![];}D[b(0x22f)]==='string'&&!_[b(0x182)](D[b(0x25d)])&&T[b(0x175)](new RegExp(D[b(0x25d)])['test'](e)?!![]:b(0x1f4)+D[b(0x25d)]+'\x27');D[b(0x22f)]===b(0x1ea)&&!_[b(0x182)](D['minLength'])&&T[b(0x175)](e['length']>=D[b(0x1fd)]?!![]:b(0x1d1)+D[b(0x1fd)]+'\x20characters,\x20is\x20'+e[b(0x177)]+b(0x1c7));D[b(0x22f)]===b(0x1ea)&&!_['isUndefined'](D['maxLength'])&&T[b(0x175)](e[b(0x177)]<=D['maxLength']?!![]:b(0x1b3)+D[b(0x184)]+b(0x192)+e[b(0x177)]+b(0x1c7));Y&&Number[b(0x221)](parseInt(e,0xa))&&T[b(0x175)]('must\x20be\x20a\x20number,\x20is\x20'+e);D[b(0x22f)]===b(0x1ec)&&!_['isUndefined'](D['minimum'])&&T[b(0x175)](e>=D[b(0x234)]?!![]:'must\x20be\x20bigger\x20than\x20or\x20equal\x20to\x20'+D[b(0x234)]);D['type']===b(0x1ec)&&!_['isUndefined'](D[b(0x23d)])&&T['push'](e<=D['maximum']?!![]:'must\x20be\x20smaller\x20than\x20or\x20equal\x20to\x20'+D[b(0x23d)]);if(D[b(0x22f)]===b(0x206)){const q=(0x0,utils_1[b(0x169)])(e);T[b(0x175)](q===![]||_[b(0x1a3)](q)?b(0x26b):!![]);}const W=T[b(0x1e6)](G=>G!==!![]),f=(D===null||D===void 0x0?void 0x0:D['example'])?'\x0a'+chalk_1[b(0x258)][b(0x23a)]('>>')+'\x20Example:\x20'+chalk_1[b(0x258)]['whiteBright'](JSON['stringify'](D[b(0x256)])):'';return W[b(0x177)]>0x0?W[b(0x165)](chalk_1[b(0x258)][b(0x240)](b(0x1b7)))+f:!![];},this[p(0x193)]=(D,V,Y)=>{const g=p,e=D[D['length']-0x1];function T(){const P=a8D;return D['slice'](0x0,-0x1)[P(0x208)](q=>q[P(0x1be)](0x0)[P(0x246)]()+q[P(0x1f9)](0x1))[P(0x165)]('>');}const W=D['length']>0x1?chalk_1['default'][g(0x1d4)][g(0x24e)](T())+':\x20':'',f=Y?'\x20('+chalk_1[g(0x258)][g(0x1fa)](Y)+')':'';return chalk_1['default'][g(0x228)](''+W+V+'\x20'+chalk_1[g(0x258)][g(0x1f6)][g(0x21c)](e)+f+'?');},this[p(0x190)]=(D,V,Y)=>__awaiter(this,void 0x0,void 0x0,function*(){const E=p;if(V[E(0x177)]<0x1){const W=Y?E(0x19e)+Y:E(0x253);throw new Error(E(0x1a6)+D+'\x20'+W+'.');}const e='Choose\x20the\x20'+D+E(0x1fe),T=V[E(0x177)]>0x4?'search-list':E(0x255);return(yield inquirer['prompt']([{'type':T,'name':E(0x16f),'message':e,'choices':V}]))[E(0x16f)];}),this[p(0x1cc)]=(D,V,Y)=>__awaiter(this,void 0x0,void 0x0,function*(){const o=p,{elements:e,nextCursor:T}=yield V();if(e[o(0x177)]<0x1){const q=Y?'for\x20this\x20'+Y:'found';throw new Error('No\x20'+D+'\x20'+q+'.');}const W=o(0x216)+D+o(0x1fe);if(T!==undefined){const G=({nextPageCursor:i})=>__awaiter(this,void 0x0,void 0x0,function*(){const w=o,I=yield V(i);return{'elements':I['elements'],'nextPageCursor':I[w(0x21a)]};});return(yield inquirer['prompt']([{'type':o(0x17e),'name':o(0x16f),'message':W,'choices':e,'nextPageCursor':T,'loadMore':G}]))[o(0x16f)];}const f=e[o(0x177)]>0x4?'search-list':o(0x255);return(yield inquirer[o(0x267)]([{'type':f,'name':o(0x16f),'message':W,'choices':e}]))[o(0x16f)];}),this['askGeneric']=(D,V)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const A=p,Y=''+(V?'('+chalk_1[A(0x258)][A(0x1fa)](V)+')\x20':''),e='Enter\x20the\x20'+chalk_1[A(0x258)][A(0x189)](D)+'\x20'+Y+'to\x20use:',T=this[A(0x176)]({'type':A(0x1ea),'required':!![]});return(yield inquirer[A(0x267)]([{'type':'input','name':A(0x16f),'message':e,'validate':T}]))[A(0x16f)];}),this[p(0x1ba)]=D=>__awaiter(this,void 0x0,void 0x0,function*(){const N=p;return(yield inquirer[N(0x267)]([{'type':N(0x1b9),'name':'name','message':D,'default':!![]}]))[N(0x16f)];}),this['askForService']=D=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const B=p,V=Y=>e=>__awaiter(this,void 0x0,void 0x0,function*(){const S=a8D;var T;const W=yield this[S(0x166)][S(0x255)][S(0x195)]({'parameters':{'projectId':Y},'options':{'per_page':this[S(0x20a)],'cursor':e}}),f=W[S(0x238)][S(0x195)]['map'](q=>q['id']);return{'elements':f,'nextCursor':(T=W[S(0x1b6)])===null||T===void 0x0?void 0x0:T[S(0x1a7)]};});return this[B(0x23f)](B(0x198),V,D);}),this[p(0x213)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const K=p,D=V=>__awaiter(this,void 0x0,void 0x0,function*(){const H=a8D;var Y;const e=yield this['apiClient'][H(0x255)][H(0x262)]({'options':{'per_page':this['defaultPaginationPageSize'],'cursor':V}}),T=e[H(0x238)]['templates']['map'](W=>W['id']);return{'elements':T,'nextCursor':(Y=e['pagination'])===null||Y===void 0x0?void 0x0:Y[H(0x1a7)]};});return this[K(0x1cc)](K(0x1ad),D);}),this['askForTag']=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const O=p,D=V=>__awaiter(this,void 0x0,void 0x0,function*(){const d=a8D;var Y,e,T;const W=yield this['apiClient'][d(0x255)][d(0x24a)]({'options':{'per_page':this[d(0x20a)],'cursor':V}}),f=(e=(Y=W[d(0x238)][d(0x24a)])===null||Y===void 0x0?void 0x0:Y[d(0x208)](q=>q['id']))!==null&&e!==void 0x0?e:[];return{'elements':f,'nextCursor':(T=W['pagination'])===null||T===void 0x0?void 0x0:T[d(0x1a7)]};});return this[O(0x1cc)](O(0x17f),D);}),this[p(0x17c)]=D=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const F=p;if(_[F(0x182)](D))throw new Error(F(0x16e));const V=Y=>__awaiter(this,void 0x0,void 0x0,function*(){const a=F;var e;let T=this[a(0x20a)];const W=yield this[a(0x166)][a(0x255)]['templateRuns']({'parameters':{'templateId':D},'options':{'per_page':T,'cursor':Y}}),f=W[a(0x238)][a(0x1ae)]['map'](q=>q['id']+a(0x1c8)+q[a(0x222)]+')');return{'elements':f,'nextCursor':(e=W[a(0x1b6)])===null||e===void 0x0?void 0x0:e[a(0x1a7)]};});return this[F(0x1cc)](F(0x1db),V)['then'](Y=>Y[F(0x1ff)]('\x20')[0x0]);}),this[p(0x239)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const x=p,D=V=>__awaiter(this,void 0x0,void 0x0,function*(){const R=a8D;var Y;let e=this[R(0x20a)];const T=yield this[R(0x166)][R(0x255)][R(0x1bd)]({'options':{'per_page':e,'cursor':V}}),W=T[R(0x238)][R(0x1bd)][R(0x208)](f=>f['id']);return{'elements':W,'nextCursor':(Y=T[R(0x1b6)])===null||Y===void 0x0?void 0x0:Y[R(0x1a7)]};});return this[x(0x1cc)](x(0x1f5),D);}),this[p(0x185)]=D=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const C1=p,V=Y=>e=>__awaiter(this,void 0x0,void 0x0,function*(){const C0=a8D;var T;const W=yield this[C0(0x166)][C0(0x255)][C0(0x1b4)]({'parameters':{'projectId':Y},'options':{'per_page':this[C0(0x20a)],'cursor':e}}),f=W[C0(0x238)][C0(0x1b4)]['map'](q=>q['id']);return{'elements':f,'nextCursor':(T=W[C0(0x1b6)])===null||T===void 0x0?void 0x0:T[C0(0x1a7)]};});return this[C1(0x23f)](C1(0x16c),V,D);}),this['askForJob']=D=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const C3=p,V=Y=>e=>__awaiter(this,void 0x0,void 0x0,function*(){const C2=a8D;var T;const W=yield this[C2(0x166)][C2(0x255)][C2(0x1bc)]({'parameters':{'projectId':Y},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':e}}),f=W['data'][C2(0x1bc)]['map'](q=>q['id']);return{'elements':f,'nextCursor':(T=W['pagination'])===null||T===void 0x0?void 0x0:T[C2(0x1a7)]};});return this[C3(0x23f)](C3(0x1ce),V,D);}),this[p(0x1e8)]=(D,V,Y=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const C4=p,e=C4(0x205),T=W=>f=>__awaiter(this,void 0x0,void 0x0,function*(){const C5=C4;var q;const G=yield this[C5(0x166)][C5(0x218)]['job']['runs']({'parameters':{'projectId':W,'jobId':D},'options':{'per_page':this[C5(0x20a)],'cursor':f}}),i=G['data'][C5(0x1d7)]['map'](I=>I['id']+C5(0x1c8)+I['startedAt']+')');return Y&&i['unshift'](e),{'elements':i,'nextCursor':(q=G['pagination'])===null||q===void 0x0?void 0x0:q[C5(0x1a7)]};});return this['askForProjectScopedResourcePaginated']('job\x20runs',T,V,'job:\x20\x27'+D+'\x27')[C4(0x1d0)](W=>{const C6=C4,f=W[C6(0x1ff)]('\x20')[0x0];if(f===e)return undefined;return f;});}),this[p(0x1dd)]=(D,V,Y,e=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const C8=p,T='all-builds';if(Y!==undefined){const W=f=>q=>__awaiter(this,void 0x0,void 0x0,function*(){const C7=a8D;var G;const i=yield this['apiClient'][C7(0x218)][C7(0x1ce)][C7(0x19f)]({'parameters':{'projectId':f,'jobId':Y},'options':{'per_page':this[C7(0x20a)],'cursor':q}}),I=i['data'][C7(0x19f)][C7(0x208)](m=>m['id']+C7(0x1c8)+m['createdAt']+')');return e&&I[C7(0x1c1)](T),{'elements':I,'nextCursor':(G=i[C7(0x1b6)])===null||G===void 0x0?void 0x0:G[C7(0x1a7)]};});return this[C8(0x23f)]('job\x20builds',W,D,C8(0x25e)+Y+'\x27')[C8(0x1d0)](f=>{const q=f['split']('\x20')[0x0];if(q===T)return undefined;return q;});}if(V!==undefined){const f=q=>G=>__awaiter(this,void 0x0,void 0x0,function*(){const C9=C8;var i;const I=yield this[C9(0x166)][C9(0x218)][C9(0x198)][C9(0x19f)]({'parameters':{'projectId':q,'serviceId':V},'options':{'per_page':this[C9(0x20a)],'cursor':G}}),m=I[C9(0x238)][C9(0x19f)][C9(0x208)](Q=>Q['id']+C9(0x1c8)+Q[C9(0x222)]+')');if(e)m[C9(0x1c1)](T);return{'elements':m,'nextCursor':(i=I[C9(0x1b6)])===null||i===void 0x0?void 0x0:i[C9(0x1a7)]};});return this[C8(0x23f)](C8(0x264),f,D,C8(0x232)+Y+'\x27')[C8(0x1d0)](q=>{const G=q['split']('\x20')[0x0];if(G===T)return undefined;return G;});}throw new Error(C8(0x207));}),this['askForContainer']=(D,V,Y,e=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const CD=p,T='all-containers';if(Y!==undefined){const W=f=>q=>__awaiter(this,void 0x0,void 0x0,function*(){const CC=a8D;var G,i;const I=yield this[CC(0x166)][CC(0x218)][CC(0x1ce)][CC(0x178)]({'parameters':{'projectId':f,'jobId':Y},'options':{'per_page':this[CC(0x20a)],'cursor':q}}),m=(G=I[CC(0x238)]['containers'])!==null&&G!==void 0x0?G:[],Q=m===null||m===void 0x0?void 0x0:m[CC(0x208)](J=>J[CC(0x16f)]+CC(0x1c8)+J[CC(0x222)]+')');return e&&Q[CC(0x1c1)](T),{'elements':Q,'nextCursor':(i=I['pagination'])===null||i===void 0x0?void 0x0:i[CC(0x1a7)]};});return this[CD(0x23f)]('job\x20containers',W,D,'job:\x20\x27'+Y+'\x27')[CD(0x1d0)](f=>{const q=f['split']('\x20')[0x0];if(q===T)return undefined;return q;});}if(V!==undefined){const f=q=>G=>__awaiter(this,void 0x0,void 0x0,function*(){const CV=CD;var i,I;const m=yield this[CV(0x166)][CV(0x218)][CV(0x198)]['containers']({'parameters':{'projectId':q,'serviceId':V},'options':{'per_page':this[CV(0x20a)],'cursor':G}}),Q=(i=m[CV(0x238)][CV(0x178)])!==null&&i!==void 0x0?i:[],J=Q[CV(0x208)](z=>z[CV(0x16f)]+CV(0x1c8)+z[CV(0x222)]+')');if(e)J===null||J===void 0x0?void 0x0:J[CV(0x1c1)](T);return{'elements':J,'nextCursor':(I=m[CV(0x1b6)])===null||I===void 0x0?void 0x0:I[CV(0x1a7)]};});return this[CD(0x23f)](CD(0x25b),f,D,CD(0x232)+Y+'\x27')['then'](q=>{const CY=CD,G=q[CY(0x1ff)]('\x20')[0x0];if(G===T)return undefined;return G;});}throw new Error('No\x20containers\x20found');}),this[p(0x248)]=D=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const CT=p,V=Y=>e=>__awaiter(this,void 0x0,void 0x0,function*(){const Ce=a8D;var T;const W=yield this[Ce(0x166)][Ce(0x255)]['addons']({'parameters':{'projectId':Y},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':e}});return{'elements':W[Ce(0x238)][Ce(0x19b)][Ce(0x208)](f=>f['id']),'nextCursor':(T=W[Ce(0x1b6)])===null||T===void 0x0?void 0x0:T['cursor']};});return this[CT(0x23f)]('addon',V,D);}),this[p(0x1cb)]=(D,V)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Cf=p,Y=e=>T=>__awaiter(this,void 0x0,void 0x0,function*(){const CW=a8D;var W;const f=yield this[CW(0x166)][CW(0x218)][CW(0x1e2)][CW(0x16a)]({'parameters':{'projectId':e,'addonId':V},'options':{'per_page':this[CW(0x20a)],'cursor':T}});return{'elements':f[CW(0x238)]['backups'][CW(0x208)](q=>q['id']+CW(0x257)+(q['completedAt']||CW(0x204))+')'),'nextCursor':(W=f[CW(0x1b6)])===null||W===void 0x0?void 0x0:W['cursor']};});return this['askForProjectScopedResourcePaginated'](Cf(0x16a),Y,D,Cf(0x241)+V+'\x27')['then'](e=>e[Cf(0x1ff)]('\x20')[0x0]);}),this[p(0x22a)]=(D,V,Y)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const CG=p,e=T=>W=>__awaiter(this,void 0x0,void 0x0,function*(){const Cq=a8D;var f;const q=yield this[Cq(0x166)][Cq(0x218)]['addon']['restores']({'parameters':{'projectId':T,'addonId':V,'backupId':Y},'options':{'per_page':this[Cq(0x20a)],'cursor':W}});return{'elements':q[Cq(0x238)]['restores'][Cq(0x208)](G=>G['id']+'\x20(completedAt:\x20'+(G[Cq(0x1dc)]||Cq(0x204))+')'),'nextCursor':(f=q[Cq(0x1b6)])===null||f===void 0x0?void 0x0:f[Cq(0x1a7)]};});return this[CG(0x23f)]('restore',e,D,CG(0x241)+V+'\x27')['then'](T=>T[CG(0x1ff)]('\x20')[0x0]);}),this[p(0x226)]=D=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const CI=p,V=Y=>__awaiter(this,void 0x0,void 0x0,function*(){const Ci=a8D;return(yield this['apiClient']['list'][Ci(0x227)]({'parameters':{'projectId':Y}}))['data'][Ci(0x208)](e=>e['id']);});return this['askForProjectScopedResource'](CI(0x18b),V,D);}),this[p(0x243)]=D=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const V=Y=>e=>__awaiter(this,void 0x0,void 0x0,function*(){const Cm=a8D;var T;const W=yield this[Cm(0x166)][Cm(0x255)]['secrets']({'parameters':{'projectId':Y},'options':{'per_page':this[Cm(0x20a)],'cursor':e}});return{'elements':W[Cm(0x238)]['secrets'][Cm(0x208)](f=>f['id']),'nextCursor':(T=W[Cm(0x1b6)])===null||T===void 0x0?void 0x0:T[Cm(0x1a7)]};});return this['askForProjectScopedResourcePaginated']('secret',V,D);}),this['askForSubdomain']=D=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const CQ=p,V=yield this['apiClient'][CQ(0x218)][CQ(0x17d)]({'parameters':{'domain':D}}),Y=V[CQ(0x238)][CQ(0x250)][CQ(0x208)](T=>T[CQ(0x16f)]+CQ(0x24c)+T[CQ(0x203)]+')'),e=CQ(0x174)+D+')';return this[CQ(0x190)](CQ(0x1eb),Y,e)[CQ(0x1d0)](T=>T[CQ(0x1ff)]('\x20')[0x0]);}),this[p(0x25a)]=(D,V)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const CJ=p,Y=yield this[CJ(0x166)][CJ(0x255)]['subdomain'][CJ(0x20f)]({'parameters':{'domain':D,'subdomain':V}}),e=Y['data'][CJ(0x21b)]['map'](W=>''+W[CJ(0x1bf)]),T=CJ(0x174)+D+CJ(0x1f0)+V+')';return this[CJ(0x190)](CJ(0x254),e,T);}),this[p(0x170)]=D=>__awaiter(this,void 0x0,void 0x0,function*(){const Cz=p;return(yield inquirer['prompt']([{'type':Cz(0x1b9),'name':Cz(0x225),'message':chalk_1[Cz(0x258)][Cz(0x1b5)](Cz(0x26d)+(D||Cz(0x168))+Cz(0x23b)),'default':![]}]))['confirmation'];}),this['loginPrompt']=(D,V)=>__awaiter(this,void 0x0,void 0x0,function*(){const Cu=p;_['isUndefined'](D['name'])&&(V[Cu(0x177)]<=0x0?_[Cu(0x18e)](D,'name',Cu(0x258)):yield(0x0,utils_1[Cu(0x18c)])(0xa)(()=>__awaiter(this,void 0x0,void 0x0,function*(){const CL=Cu,{name:Y}=yield inquirer[CL(0x267)]([{'type':CL(0x23e),'name':CL(0x16f),'message':'Choose\x20the\x20name\x20of\x20the\x20new\x20local\x20context:','default':CL(0x1c0)}]);if(!D[CL(0x233)]&&V['find'](e=>e[CL(0x16f)]===Y)){const {c:e}=yield inquirer[CL(0x267)]([{'type':'confirm','name':'c','message':'Context\x20with\x20name\x20\x27'+Y+CL(0x172),'default':![]}]);if(e===![])throw new Error(CL(0x173));_['set'](D,CL(0x233),!![]);}_[CL(0x18e)](D,'name',Y);})));if(_[Cu(0x182)](D[Cu(0x1c2)])){const Y=yield this[Cu(0x16b)]();_[Cu(0x18e)](D,Cu(0x1c2),Y);}return D;}),this[p(0x16b)]=()=>__awaiter(this,void 0x0,void 0x0,function*(){const Cv=p,{token:D}=yield inquirer['prompt']([{'type':Cv(0x1a1),'name':Cv(0x1c2),'mask':'*','message':Cv(0x199)}]);return D;}),inquirer[p(0x260)]('search-list',inquirerSearchList),inquirer[p(0x260)](p(0x17e),inquirer_pagination_prompt_1[p(0x1b1)]);}[a8L(0x18f)](C,D){return __awaiter(this,void 0x0,void 0x0,function*(){const Ck=a8D,V=yaml[Ck(0x263)](C),Y=_[Ck(0x210)](V[Ck(0x1ff)]('\x0a')[Ck(0x208)](W=>W[Ck(0x177)])),e=chalk_1[Ck(0x258)][Ck(0x1a5)]('-'[Ck(0x1de)](Y)+'\x0a'),{confirm:T}=yield inquirer[Ck(0x267)]([{'type':Ck(0x255),'name':'confirm','message':''+chalk_1[Ck(0x258)]['bold'][Ck(0x189)](Ck(0x188))+e+chalk_1[Ck(0x258)]['blueBright'](V)+e,'choices':Object[Ck(0x251)](ConfirmChoices)}]);switch(T){case ConfirmChoices['YES']:return C;case ConfirmChoices[Ck(0x26c)]:throw new Error(Ck(0x1c5));case ConfirmChoices[Ck(0x1ac)]:return this[Ck(0x21f)](D);case ConfirmChoices[Ck(0x235)]:return this[Ck(0x18f)](yield this[Ck(0x259)](C),D);case ConfirmChoices[Ck(0x268)]:yield this[Ck(0x18d)](C);return this[Ck(0x18f)](C,D);default:throw new Error('Something\x20unexpected\x20happened.');}});}[a8L(0x21f)](C,D){return __awaiter(this,void 0x0,void 0x0,function*(){const Cs=a8D;if((D===null||D===void 0x0?void 0x0:D[Cs(0x242)])!==undefined)this[Cs(0x242)]=D===null||D===void 0x0?void 0x0:D[Cs(0x242)];this['tmpCmdPath']=D===null||D===void 0x0?void 0x0:D[Cs(0x16d)],this[Cs(0x1d8)]=D===null||D===void 0x0?void 0x0:D['skipValidation'];const V={};return yield this['propToType']([],C[Cs(0x20c)][Cs(0x209)],V),this[Cs(0x242)]=V,yield this[Cs(0x18f)](V,C);});}[a8L(0x179)](C,D,V,Y){return __awaiter(this,void 0x0,void 0x0,function*(){const Ch=a8D;let e;if(D[Ch(0x1da)]&&!_[Ch(0x230)](D,Ch(0x24d))){if(D[Ch(0x1da)][Ch(0x177)]>0x1){const {choice:T}=yield inquirer['prompt']([{'type':Ch(0x255),'name':'choice','message':Ch(0x224)+(C[C[Ch(0x177)]-0x1]||'')+Ch(0x237),'choices':D[Ch(0x1da)][Ch(0x208)](W=>{const Cj=Ch;var f;return(f=W[Cj(0x236)])!==null&&f!==void 0x0?f:'??';})}]);e=yield this[Ch(0x167)](C,D[Ch(0x1da)]['find'](W=>W[Ch(0x236)]===T),V,Y);}else{const W=D[Ch(0x1da)][0x0];_[Ch(0x18e)](W,Ch(0x236),D[Ch(0x236)]),e=yield this['getType'](C,W,V,Y);}e={};}else{if(D[Ch(0x261)]&&!_[Ch(0x230)](D,Ch(0x24d))){if(D[Ch(0x261)][Ch(0x177)]>0x1){const {choice:f}=yield inquirer[Ch(0x267)]([{'type':Ch(0x255),'name':Ch(0x244),'message':Ch(0x224)+(C[C[Ch(0x177)]-0x1]||'')+Ch(0x237),'choices':[...D['anyOf']['map'](q=>{const CU=Ch;var G;return(G=q[CU(0x236)])!==null&&G!==void 0x0?G:'??';}),Ch(0x211)]}]);f!==Ch(0x211)&&(e=yield this[Ch(0x167)](C,D[Ch(0x261)][Ch(0x22d)](q=>q[Ch(0x236)]===f),V,Y));}else{const q=D['anyOf'][0x0];_[Ch(0x18e)](q,Ch(0x236),D[Ch(0x236)]),e=yield this['getType'](C,q,V,Y);}e={};}else e=yield this[Ch(0x167)](C,D,V,Y);}return e;});}['getInnerType'](C,D,V,Y){var e;return __awaiter(this,void 0x0,void 0x0,function*(){const Ct=a8D;if(Y===![]){const {addEntry:f}=yield inquirer[Ct(0x267)]([{'type':Ct(0x1b9),'name':Ct(0x1b0),'message':this[Ct(0x193)](D,'Do\x20you\x20want\x20to\x20add',C===null||C===void 0x0?void 0x0:C[Ct(0x236)]),'default':![]}]);if(!f)return V;}const T=Object[Ct(0x1ab)]((e=C===null||C===void 0x0?void 0x0:C[Ct(0x24d)])!==null&&e!==void 0x0?e:[]),W=C[Ct(0x171)]||[];if(T[Ct(0x177)]>0x0)for(const q of T){const G=D[Ct(0x1f8)](q);if(D['length']>0x0&&!_[Ct(0x230)](V,D[Ct(0x165)]('.')))_['set'](V,D[Ct(0x165)]('.'),{});yield this[Ct(0x179)](G,C[Ct(0x24d)][q],V,W[Ct(0x252)](q));}else yield this[Ct(0x167)](D,Object['assign'](Object[Ct(0x266)]({},C),{'type':Ct(0x206)}),V,Y);return V;});}[a8L(0x1c6)](C,D,V,Y){return __awaiter(this,void 0x0,void 0x0,function*(){const Cy=a8D;if(D&&V)return!![];const e=D?Cy(0x17a):Cy(0x24b),{addEntry:T}=yield inquirer['prompt']([{'type':Cy(0x1b9),'name':Cy(0x1b0),'message':this[Cy(0x193)](C,e,D?Y:undefined),'default':![]}]);return T;});}[a8L(0x167)](C,D,V,Y){return __awaiter(this,void 0x0,void 0x0,function*(){const CZ=a8D;let e;const T=C['join']('.');switch(D===null||D===void 0x0?void 0x0:D[CZ(0x22f)]){case'array':{let W=!![];while(yield this[CZ(0x1c6)](C,W,Y,D===null||D===void 0x0?void 0x0:D[CZ(0x236)])){const f=_[CZ(0x218)](V,T);_[CZ(0x22e)](V,T),yield this['getType'](C,D[CZ(0x19c)],V);const q=_[CZ(0x218)](V,T);!_[CZ(0x219)](f)?_[CZ(0x18e)](V,T,[q]):(f['push'](q),_[CZ(0x18e)](V,T,f)),W=![];}return e||[];}case CZ(0x1fb):{return e=yield this['getInnerType'](D,C,V,Y),e;}case CZ(0x206):e=(0x0,utils_1[CZ(0x169)])(yield this['ask'](C,D,Y))||undefined;break;case CZ(0x1ea):case CZ(0x181):case CZ(0x1ec):default:e=yield this[CZ(0x17b)](C,D,Y,V);break;}return!_['isUndefined'](e)&&_[CZ(0x18e)](V,T,e),e;});}['ask'](C,D,V,Y){var e;return __awaiter(this,void 0x0,void 0x0,function*(){const CX=a8D,T=C[C[CX(0x177)]-0x1],{defaultValue:defaultValue=(e=D===null||D===void 0x0?void 0x0:D[CX(0x256)])!==null&&e!==void 0x0?e:D===null||D===void 0x0?void 0x0:D[CX(0x258)],choices:choices=D===null||D===void 0x0?void 0x0:D[CX(0x1d3)],pagination:W}=yield(0x0,api_helpers_1[CX(0x20d)])(T,this[CX(0x166)],this[CX(0x1e5)],Y,this[CX(0x1d6)],C);let f=CX(0x23e);if(!_['isUndefined'](choices)&&choices[CX(0x177)]>0x0){if(W!==undefined&&W[CX(0x1cf)]!==undefined)f=CX(0x17e);else choices[CX(0x177)]>0x4&&typeof choices[0x0]===CX(0x1ea)?f=CX(0x1ca):f=CX(0x255);}else{if((D===null||D===void 0x0?void 0x0:D[CX(0x22f)])===CX(0x181))f='confirm';else{if((D===null||D===void 0x0?void 0x0:D[CX(0x22f)])===CX(0x1ec))f=CX(0x23e);else(D===null||D===void 0x0?void 0x0:D[CX(0x22f)])===CX(0x206)&&(f=CX(0x1a4));}}let q=V!==![]?!_[CX(0x1e4)](defaultValue)?defaultValue:JSON['stringify'](defaultValue):_[CX(0x164)](defaultValue)?defaultValue:CX(0x211);if(choices)q=q[CX(0x1df)]();_[CX(0x230)](this[CX(0x242)],C[CX(0x165)]('.'))&&(q=this[CX(0x242)][C[CX(0x165)]('.')]);const G=choices&&V===![]?['don\x27t\x20change',...choices]:choices,i=(D===null||D===void 0x0?void 0x0:D[CX(0x22f)])===CX(0x1ec),I=Object[CX(0x266)]({'type':f,'name':'id','message':this[CX(0x20b)](C,D),'choices':G,'default':q,'filter':this[CX(0x1e6)](f,V),'validate':this[CX(0x176)](D,V,i)},W),m=(yield inquirer[CX(0x267)]([I]))['id'];if(m==='don\x27t\x20change'||m==='')return undefined;if(i)return parseInt(m,0xa);return m;});}[a8L(0x20b)](C,D){const Cp=a8L,V=(D===null||D===void 0x0?void 0x0:D['type'])!==Cp(0x181)?Cp(0x1a2):Cp(0x21d);return this['getPathString'](C,V,D===null||D===void 0x0?void 0x0:D[Cp(0x236)]);}[a8L(0x1e3)](){return __awaiter(this,void 0x0,void 0x0,function*(){const Cn=a8D,C=D=>__awaiter(this,void 0x0,void 0x0,function*(){const CM=a8D;var V;const Y=yield this['apiClient'][CM(0x255)][CM(0x217)]({'options':{'per_page':this[CM(0x20a)],'cursor':D}}),e=Y[CM(0x238)][CM(0x217)]['map'](T=>T['id']);return{'elements':e,'nextCursor':(V=Y[CM(0x1b6)])===null||V===void 0x0?void 0x0:V[CM(0x1a7)]};});return yield this[Cn(0x1cc)](Cn(0x25f),C);});}['askForProjectScopedResource'](C,D,V,Y){return __awaiter(this,void 0x0,void 0x0,function*(){const Cr=a8D,e=V||this[Cr(0x166)][Cr(0x201)][Cr(0x1aa)]();if(_[Cr(0x182)](e))throw new Error(Cr(0x25c));const T=yield D(e);return yield this['askForResource'](C,T,(Y?Y+Cr(0x247):'')+Cr(0x1f2)+e+'\x27');});}[a8L(0x23f)](C,D,V,Y){return __awaiter(this,void 0x0,void 0x0,function*(){const Cl=a8D,e=V||this[Cl(0x166)][Cl(0x201)]['getCurrentProjectName']();if(_[Cl(0x182)](e))throw new Error('Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.');const T=yield D(e);return yield this['askForResourcePaginated'](C,T,(Y?Y+'\x20in\x20':'')+Cl(0x1f2)+e+'\x27');});}[a8L(0x212)](){return __awaiter(this,void 0x0,void 0x0,function*(){const CP=a8D,C=D=>__awaiter(this,void 0x0,void 0x0,function*(){const Cb=a8D;var V;const Y=yield this[Cb(0x166)][Cb(0x255)][Cb(0x1af)]({'options':{'per_page':this[Cb(0x20a)],'cursor':D}});return{'elements':Y[Cb(0x238)]['domains'][Cb(0x208)](e=>e[Cb(0x16f)]),'nextCursor':(V=Y['pagination'])===null||V===void 0x0?void 0x0:V['cursor']};});return this[CP(0x1cc)](CP(0x17d),C);});}[a8L(0x1e9)](){return __awaiter(this,void 0x0,void 0x0,function*(){const CE=a8D,C=D=>__awaiter(this,void 0x0,void 0x0,function*(){const Cg=a8D;var V;const Y=yield this[Cg(0x166)][Cg(0x255)][Cg(0x1c3)]({'options':{'per_page':this[Cg(0x20a)],'cursor':D}});return{'elements':Y[Cg(0x238)][Cg(0x1ed)][Cg(0x208)](e=>e['id']),'nextCursor':(V=Y['pagination'])===null||V===void 0x0?void 0x0:V[Cg(0x1a7)]};});return this[CE(0x1cc)](CE(0x1ed),C);});}['setPathVars'](C){const Co=a8L;this[Co(0x1d6)]=C;}}exports[a8L(0x1d2)]=InquirerHelper;
|
|
1
|
+
'use strict';const a8T=a8I;function a8u(){const uy=['list','deleteWarningPrompt','for\x20this\x20','defaultPaginationPageSize','loginPrompt','secrets','secret','builds','oneOf','askForTag','isUndefined','cmdPath','512353rXZWEF','tmpCmdPath','tokenPrompt','121012BXbrVa','Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.','logSinks','addon','askForPipeline','askForResourcePaginated','No,\x20abort','paths','services','restore','confirmationPrompt','getQuestionString','call','registerPrompt','push','credentials','isObject','grey','askForCredentials','isValidJSON','service:\x20\x27','warning','includes','14KCIMWs','YES','search-list','__esModule','pattern','greenBright','filter','Do\x20you\x20want\x20to\x20add','askArrayEntry','ask','__awaiter','940VEBASs','askForTemplateRun','override','uri','yellowBright','confirmation','must\x20be\x20bigger\x20than\x20or\x20equal\x20to\x20','tag','type','apiClient','getType','Enter\x20the\x20','pop','password','cursor','to\x20use:','found','784DIaumk','\x20(full\x20domain:\x20','skipValidation','templates','./utils','subdomain','\x20(completedAt:\x20','isArray','runs','red','done','string','don\x27t\x20change','./api-helpers','getPathString','integer','subdomains','value','isBoolean','success','No,\x20edit','throw','containers','project','hasOwnProperty','chalk','length','No\x20','data','REPEAT','doesn\x27t\x20match\x20pattern\x20\x27','170RgqcDr','editor','askForProjectScopedResourcePaginated','askForJobRun','find','createdAt','Something\x20unexpected\x20happened.','Please\x20confirm\x20following\x20configuration:\x0a','choice','volumes','contextProvider','name','./pagination/inquirer-pagination-prompt','elements','retrievePayloadViaInteractiveCli','),\x20subdomain\x20(','this\x20option\x20is\x20required,\x20please\x20answer','SAVE','resultCache','service\x20build','not\x20completed','all-job-runs','No,\x20but\x20save\x20as\x20file','properties','toString','pipelines','repeat','.*\x5c.(json|yaml|yml)$','map','minLength','pagination-prompt','confirm','\x20type?','addon:\x20\x27','bgGrey','askGeneric','completedAt','get','maximum','example','default','configurable','isNaN','startedAt','blueBright','max','job:\x20\x27','safeLoad','Configuration\x20file\x20written\x20to\x20','askForContainer','token','.\x20This\x20is\x20irreversible.\x20Please\x20confirm!','jobs','enum','pathVars','values','input','__importDefault','2352456GJPLBE','__setModuleDefault','create','\x20and\x20it\x20','prompt','domain','domain\x20(','boolean','validate','charAt','WARNING:\x20You\x20are\x20about\x20to\x20delete\x20','lodash','Context\x20with\x20name\x20\x27','main-context','askForClusterId','all-builds','backup','backups','Should\x20it\x20be',',\x20supported\x20types:\x20[json|yaml|yml]','path','whiteBright','set','propToType','assign','InquirerHelper','test','description','inquirer','split','has','domains','askForProject','job','1556376hJRCqa','\x20characters,\x20is\x20','No\x20builds\x20found','restores','saveFile','minimum','Provide\x20a\x20file\x20path\x20to\x20write\x20the\x20configuration\x20to\x20(<name>.[json|yaml|yml])','templateRuns','askForTemplate','setPathVars','defineProperty','531bvDEvq','\x20to\x20use:','must\x20be\x20longer\x20than\x20or\x20equal\x20to\x20','blue','maxLength','must\x20be\x20a\x20valid\x20non-empty\x20json\x20string','getOwnPropertyDescriptor','unset','json','reset','then','anyOf','bold','unshift','a\x20Northflank\x20resource','askForService','clusters','__importStar','askForResource','Do\x20you\x20want\x20to\x20add\x20more','Go\x20to\x20editor','\x20characters','must\x20be\x20shorter\x20than\x20or\x20equal\x20to\x20','pipeline','apply','service','stringify','concat','\x27\x20already\x20exists.\x20Do\x20you\x20want\x20to\x20override\x20this\x20context\x20(y)\x20or\x20enter\x20a\x20new\x20name\x20(N)?','projects','askForSecret','green','askForAddonRestore','required','Choose\x20the\x20','\x20in\x20','writable','join','askForDomain','yaml','object','\x20Example:\x20','next','getInnerType','pagination','service\x20containers','underline','writeFileSync','ABORT','Choose\x20the\x20name\x20of\x20the\x20new\x20local\x20context:','prototype','No\x20containers\x20found','EDIT','editPayload','message','tags','1019510NklUuZ','addEntry','job\x20builds','\x20(startedAt:\x20','Template\x20id\x20not\x20provided.','js-yaml','Yes,\x20send','fileName','22715VUyfut'];a8u=function(){return uy;};return a8u();}(function(u,I){const X=a8I,a=u();while(!![]){try{const x=-parseInt(X(0x23c))/0x1+parseInt(X(0x227))/0x2+-parseInt(X(0x1c2))/0x3+-parseInt(X(0x23f))/0x4*(-parseInt(X(0x291))/0x5)+parseInt(X(0x1e4))/0x6*(parseInt(X(0x256))/0x7)+parseInt(X(0x272))/0x8*(-parseInt(X(0x1ef))/0x9)+parseInt(X(0x261))/0xa*(-parseInt(X(0x22f))/0xb);if(x===I)break;else a['push'](a['shift']());}catch(D){a['push'](a['shift']());}}}(a8u,0x88e70));var __createBinding=this&&this['__createBinding']||(Object[a8T(0x1c4)]?function(u,I,a,x){const E=a8T;if(x===undefined)x=a;var D=Object[E(0x1f5)](I,a);(!D||('get'in D?!I[E(0x259)]:D[E(0x213)]||D[E(0x1b1)]))&&(D={'enumerable':!![],'get':function(){return I[a];}}),Object[E(0x1ee)](u,x,D);}:function(u,I,a,x){if(x===undefined)x=a;u[x]=I[a];}),__setModuleDefault=this&&this[a8T(0x1c3)]||(Object[a8T(0x1c4)]?function(u,I){const f=a8T;Object['defineProperty'](u,f(0x1b0),{'enumerable':!![],'value':I});}:function(u,I){u['default']=I;}),__importStar=this&&this[a8T(0x200)]||function(u){const N=a8T;if(u&&u['__esModule'])return u;var I={};if(u!=null){for(var a in u)if(a!==N(0x1b0)&&Object[N(0x221)][N(0x28a)][N(0x24b)](u,a))__createBinding(I,u,a);}return __setModuleDefault(I,u),I;},__awaiter=this&&this[a8T(0x260)]||function(u,I,a,x){function D(K){return K instanceof a?K:new a(function(z){z(K);});}return new(a||(a=Promise))(function(K,z){const R=a8I;function H(p){const P=a8I;try{C(x[P(0x219)](p));}catch(b){z(b);}}function s(p){const m=a8I;try{C(x[m(0x287)](p));}catch(b){z(b);}}function C(p){const k=a8I;p[k(0x27c)]?K(p['value']):D(p[k(0x283)])[k(0x1f9)](H,s);}C((x=x[R(0x207)](u,I||[]))['next']());});},__importDefault=this&&this[a8T(0x1c1)]||function(u){const q=a8T;return u&&u[q(0x259)]?u:{'default':u};};function a8I(u,I){const a=a8u();return a8I=function(x,D){x=x-0x1a0;let K=a[x];return K;},a8I(u,I);}Object[a8T(0x1ee)](exports,'__esModule',{'value':!![]}),exports[a8T(0x1db)]=void 0x0;const _=__importStar(require(a8T(0x1cd))),chalk_1=__importDefault(require(a8T(0x28b))),fs=__importStar(require('fs')),utils_1=require(a8T(0x276)),api_helpers_1=require(a8T(0x27f)),inquirer_pagination_prompt_1=require(a8T(0x29d)),inquirer=require(a8T(0x1de)),inquirerSearchList=require('inquirer-search-list'),yaml=require(a8T(0x22c));var ConfirmChoices;(function(u){const M=a8T;u[M(0x257)]=M(0x22d),u[M(0x28f)]='No,\x20repeat',u[M(0x223)]=M(0x286),u[M(0x2a2)]=M(0x2a7),u[M(0x21f)]=M(0x245);}(ConfirmChoices||(ConfirmChoices={})));class InquirerHelper{constructor(u){const r=a8T;this[r(0x26a)]=u,this[r(0x233)]=0x32,this[r(0x224)]=I=>__awaiter(this,void 0x0,void 0x0,function*(){const o=r,{editedResult:a}=yield inquirer[o(0x1c6)]([{'type':'editor','name':'editedResult','message':o(0x203),'default':yaml['safeDump'](I)}]);return yaml[o(0x1b7)](a);}),this[r(0x1e8)]=I=>__awaiter(this,void 0x0,void 0x0,function*(){const w=r,a=z=>'Unexpected\x20file\x20type:\x20'+z+w(0x1d5);function x(){return __awaiter(this,void 0x0,void 0x0,function*(){const h=a8I;return inquirer[h(0x1c6)]([{'type':h(0x1c0),'name':h(0x22e),'message':h(0x1ea),'validate':z=>new RegExp(h(0x1a3))[h(0x1dc)](z)?!![]:a(z)}]);});}const {fileName:D}=yield x(),K=D[w(0x1a0)]()['split']('.')[w(0x26d)]();try{switch(K){case w(0x1f7):(0x0,utils_1[w(0x285)])(w(0x1b8)+D);return fs[w(0x21e)](D,JSON[w(0x209)](I,null,'\x20\x20'));case w(0x216):case'yml':(0x0,utils_1[w(0x285)])(w(0x1b8)+D);return fs[w(0x21e)](D,yaml['safeDump'](I));default:(0x0,utils_1[w(0x254)])(a(K));}}catch(z){(0x0,utils_1[w(0x254)])('Writing\x20configuration\x20failed:\x20'+z[w(0x225)]);}return undefined;}),this[r(0x25c)]=(I,a)=>x=>{const D=typeof x==='string'?x['trim']():x;return a===![]&&D==='don\x27t\x20change'?'':D;},this[r(0x1ca)]=(I,a,x)=>D=>{const W=r;if(this[W(0x274)]===!![])return!![];const K=[];if(D===''||D===W(0x27e)){if(a!==![])K[W(0x24d)](W(0x2a1));else return!![];}I[W(0x269)]===W(0x27d)&&!_[W(0x23a)](I[W(0x25a)])&&K['push'](new RegExp(I['pattern'])[W(0x1dc)](D)?!![]:W(0x290)+I[W(0x25a)]+'\x27');I[W(0x269)]===W(0x27d)&&!_[W(0x23a)](I['minLength'])&&K[W(0x24d)](D[W(0x28c)]>=I[W(0x1a5)]?!![]:W(0x1f1)+I[W(0x1a5)]+'\x20characters,\x20is\x20'+D[W(0x28c)]+W(0x204));I[W(0x269)]===W(0x27d)&&!_[W(0x23a)](I[W(0x1f3)])&&K['push'](D['length']<=I['maxLength']?!![]:W(0x205)+I[W(0x1f3)]+W(0x1e5)+D['length']+W(0x204));x&&Number[W(0x1b2)](parseInt(D,0xa))&&K[W(0x24d)]('must\x20be\x20a\x20number,\x20is\x20'+D);I[W(0x269)]===W(0x281)&&!_['isUndefined'](I[W(0x1e9)])&&K[W(0x24d)](D>=I[W(0x1e9)]?!![]:W(0x267)+I[W(0x1e9)]);I[W(0x269)]===W(0x281)&&!_[W(0x23a)](I['maximum'])&&K[W(0x24d)](D<=I[W(0x1ae)]?!![]:'must\x20be\x20smaller\x20than\x20or\x20equal\x20to\x20'+I[W(0x1ae)]);if(I['type']==='rawObject'){const s=(0x0,utils_1[W(0x252)])(D);K[W(0x24d)](s===![]||_['isEmpty'](s)?W(0x1f4):!![]);}const z=K[W(0x25c)](C=>C!==!![]),H=(I===null||I===void 0x0?void 0x0:I['example'])?'\x0a'+chalk_1['default'][W(0x27b)]('>>')+W(0x218)+chalk_1['default'][W(0x1d7)](JSON[W(0x209)](I[W(0x1af)])):'';return z[W(0x28c)]>0x0?z[W(0x214)](chalk_1[W(0x1b0)][W(0x21d)](W(0x1c5)))+H:!![];},this['getPathString']=(I,a,x)=>{const B=r,D=I[I[B(0x28c)]-0x1];function K(){const J=B;return I['slice'](0x0,-0x1)[J(0x1a4)](s=>s[J(0x1cb)](0x0)['toUpperCase']()+s['slice'](0x1))[J(0x214)]('>');}const z=I['length']>0x1?chalk_1[B(0x1b0)][B(0x1aa)][B(0x1d7)](K())+':\x20':'',H=x?'\x20('+chalk_1[B(0x1b0)][B(0x1f2)](x)+')':'';return chalk_1['default'][B(0x1f8)](''+z+a+'\x20'+chalk_1[B(0x1b0)][B(0x1fb)][B(0x25b)](D)+H+'?');},this['askForResource']=(I,a,x)=>__awaiter(this,void 0x0,void 0x0,function*(){const V=r;if(a['length']<0x1){const z=x?V(0x232)+x:V(0x271);throw new Error(V(0x28d)+I+'\x20'+z+'.');}const D=V(0x211)+I+'\x20to\x20use:',K=a[V(0x28c)]>0x4?V(0x258):V(0x230);return(yield inquirer['prompt']([{'type':K,'name':V(0x29c),'message':D,'choices':a}]))[V(0x29c)];}),this['askForResourcePaginated']=(I,a,x)=>__awaiter(this,void 0x0,void 0x0,function*(){const y=r,{elements:D,nextCursor:K}=yield a();if(D[y(0x28c)]<0x1){const s=x?y(0x232)+x:'found';throw new Error(y(0x28d)+I+'\x20'+s+'.');}const z=y(0x211)+I+y(0x1f0);if(K!==undefined){const C=({nextPageCursor:p})=>__awaiter(this,void 0x0,void 0x0,function*(){const e=y,b=yield a(p);return{'elements':b[e(0x29e)],'nextPageCursor':b['nextCursor']};});return(yield inquirer[y(0x1c6)]([{'type':y(0x1a6),'name':y(0x29c),'message':z,'choices':D,'nextPageCursor':K,'loadMore':C}]))[y(0x29c)];}const H=D[y(0x28c)]>0x4?y(0x258):y(0x230);return(yield inquirer[y(0x1c6)]([{'type':H,'name':y(0x29c),'message':z,'choices':D}]))[y(0x29c)];}),this[r(0x1ab)]=(I,a)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const U=r,x=''+(a?'('+chalk_1[U(0x1b0)][U(0x1f2)](a)+')\x20':''),D=U(0x26c)+chalk_1[U(0x1b0)]['green'](I)+'\x20'+x+U(0x270),K=this[U(0x1ca)]({'type':'string','required':!![]});return(yield inquirer['prompt']([{'type':'input','name':U(0x29c),'message':D,'validate':K}]))['name'];}),this['askConfirm']=I=>__awaiter(this,void 0x0,void 0x0,function*(){const S=r;return(yield inquirer[S(0x1c6)]([{'type':'confirm','name':'name','message':I,'default':!![]}]))[S(0x29c)];}),this[r(0x1fe)]=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const L=r,a=x=>D=>__awaiter(this,void 0x0,void 0x0,function*(){const n=a8I;var K;const z=yield this[n(0x26a)][n(0x230)][n(0x247)]({'parameters':{'projectId':x},'options':{'per_page':this[n(0x233)],'cursor':D}}),H=z[n(0x28e)]['services'][n(0x1a4)](s=>s['id']);return{'elements':H,'nextCursor':(K=z['pagination'])===null||K===void 0x0?void 0x0:K['cursor']};});return this[L(0x293)](L(0x208),a,I);}),this[r(0x1ec)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const l=r,I=a=>__awaiter(this,void 0x0,void 0x0,function*(){const g=a8I;var x;const D=yield this[g(0x26a)]['list'][g(0x275)]({'options':{'per_page':this[g(0x233)],'cursor':a}}),K=D[g(0x28e)][g(0x275)][g(0x1a4)](z=>z['id']);return{'elements':K,'nextCursor':(x=D[g(0x21b)])===null||x===void 0x0?void 0x0:x[g(0x26f)]};});return this[l(0x244)]('template',I);}),this[r(0x239)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const G=r,I=a=>__awaiter(this,void 0x0,void 0x0,function*(){const Z=a8I;var x,D,K;const z=yield this['apiClient'][Z(0x230)][Z(0x226)]({'options':{'per_page':this['defaultPaginationPageSize'],'cursor':a}}),H=(D=(x=z[Z(0x28e)][Z(0x226)])===null||x===void 0x0?void 0x0:x['map'](s=>s['id']))!==null&&D!==void 0x0?D:[];return{'elements':H,'nextCursor':(K=z[Z(0x21b)])===null||K===void 0x0?void 0x0:K[Z(0x26f)]};});return this[G(0x244)](G(0x268),I);}),this[r(0x1d0)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Q=r,I=a=>__awaiter(this,void 0x0,void 0x0,function*(){const O=a8I;var x,D,K;const z=yield this['apiClient'][O(0x230)]['cloud'][O(0x1ff)]({'options':{'per_page':this[O(0x233)],'cursor':a}}),H=(D=(x=z[O(0x28e)][O(0x1ff)])===null||x===void 0x0?void 0x0:x['map'](s=>s[O(0x29c)]))!==null&&D!==void 0x0?D:[];return{'elements':H,'nextCursor':(K=z[O(0x21b)])===null||K===void 0x0?void 0x0:K['cursor']};});return this[Q(0x244)]('cluster\x20id',I);}),this[r(0x262)]=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const d=r;if(_[d(0x23a)](I))throw new Error(d(0x22b));const a=x=>__awaiter(this,void 0x0,void 0x0,function*(){const v=d;var D;let K=this[v(0x233)];const z=yield this[v(0x26a)][v(0x230)]['templateRuns']({'parameters':{'templateId':I},'options':{'per_page':K,'cursor':x}}),H=z[v(0x28e)][v(0x1eb)][v(0x1a4)](s=>s['id']+v(0x22a)+s[v(0x296)]+')');return{'elements':H,'nextCursor':(D=z['pagination'])===null||D===void 0x0?void 0x0:D[v(0x26f)]};});return this[d(0x244)]('template\x20run',a)[d(0x1f9)](x=>x[d(0x1df)]('\x20')[0x0]);}),this['askForLogSink']=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Y=r,I=a=>__awaiter(this,void 0x0,void 0x0,function*(){const t=a8I;var x;let D=this['defaultPaginationPageSize'];const K=yield this[t(0x26a)][t(0x230)][t(0x241)]({'options':{'per_page':D,'cursor':a}}),z=K[t(0x28e)]['logSinks'][t(0x1a4)](H=>H['id']);return{'elements':z,'nextCursor':(x=K['pagination'])===null||x===void 0x0?void 0x0:x[t(0x26f)]};});return this[Y(0x244)]('log\x20sink',I);}),this[r(0x243)]=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const u1=r,a=x=>D=>__awaiter(this,void 0x0,void 0x0,function*(){const u0=a8I;var K;const z=yield this['apiClient']['list'][u0(0x1a1)]({'parameters':{'projectId':x},'options':{'per_page':this[u0(0x233)],'cursor':D}}),H=z[u0(0x28e)][u0(0x1a1)][u0(0x1a4)](s=>s['id']);return{'elements':H,'nextCursor':(K=z[u0(0x21b)])===null||K===void 0x0?void 0x0:K[u0(0x26f)]};});return this['askForProjectScopedResourcePaginated'](u1(0x206),a,I);}),this['askForJob']=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const u3=r,a=x=>D=>__awaiter(this,void 0x0,void 0x0,function*(){const u2=a8I;var K;const z=yield this[u2(0x26a)][u2(0x230)][u2(0x1bc)]({'parameters':{'projectId':x},'options':{'per_page':this[u2(0x233)],'cursor':D}}),H=z[u2(0x28e)][u2(0x1bc)][u2(0x1a4)](s=>s['id']);return{'elements':H,'nextCursor':(K=z[u2(0x21b)])===null||K===void 0x0?void 0x0:K['cursor']};});return this[u3(0x293)]('job',a,I);}),this[r(0x294)]=(I,a,x=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const u4=r,D=u4(0x2a6),K=z=>H=>__awaiter(this,void 0x0,void 0x0,function*(){const u5=u4;var s;const C=yield this[u5(0x26a)][u5(0x1ad)][u5(0x1e3)][u5(0x27a)]({'parameters':{'projectId':z,'jobId':I},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':H}}),p=C['data'][u5(0x27a)]['map'](b=>b['id']+u5(0x22a)+b[u5(0x1b3)]+')');return x&&p[u5(0x1fc)](D),{'elements':p,'nextCursor':(s=C[u5(0x21b)])===null||s===void 0x0?void 0x0:s[u5(0x26f)]};});return this[u4(0x293)]('job\x20runs',K,a,'job:\x20\x27'+I+'\x27')['then'](z=>{const u6=u4,H=z[u6(0x1df)]('\x20')[0x0];if(H===D)return undefined;return H;});}),this['askForBuild']=(I,a,x,D=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const u7=r,K=u7(0x1d1);if(x!==undefined){const z=H=>s=>__awaiter(this,void 0x0,void 0x0,function*(){const u8=u7;var C;const p=yield this[u8(0x26a)][u8(0x1ad)]['job'][u8(0x237)]({'parameters':{'projectId':H,'jobId':x},'options':{'per_page':this[u8(0x233)],'cursor':s}}),b=p['data']['builds'][u8(0x1a4)](i=>i['id']+u8(0x22a)+i[u8(0x296)]+')');return D&&b[u8(0x1fc)](K),{'elements':b,'nextCursor':(C=p['pagination'])===null||C===void 0x0?void 0x0:C['cursor']};});return this[u7(0x293)](u7(0x229),z,I,u7(0x1b6)+x+'\x27')['then'](H=>{const s=H['split']('\x20')[0x0];if(s===K)return undefined;return s;});}if(a!==undefined){const H=s=>C=>__awaiter(this,void 0x0,void 0x0,function*(){const u9=u7;var p;const b=yield this[u9(0x26a)][u9(0x1ad)][u9(0x208)]['builds']({'parameters':{'projectId':s,'serviceId':a},'options':{'per_page':this[u9(0x233)],'cursor':C}}),i=b[u9(0x28e)]['builds'][u9(0x1a4)](j=>j['id']+'\x20(startedAt:\x20'+j[u9(0x296)]+')');if(D)i[u9(0x1fc)](K);return{'elements':i,'nextCursor':(p=b[u9(0x21b)])===null||p===void 0x0?void 0x0:p['cursor']};});return this[u7(0x293)](u7(0x2a4),H,I,u7(0x253)+x+'\x27')[u7(0x1f9)](s=>{const C=s['split']('\x20')[0x0];if(C===K)return undefined;return C;});}throw new Error(u7(0x1e6));}),this[r(0x1b9)]=(I,a,x,D=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const uI=r,K='all-containers';if(x!==undefined){const z=H=>s=>__awaiter(this,void 0x0,void 0x0,function*(){const uu=a8I;var C,p;const b=yield this[uu(0x26a)]['get'][uu(0x1e3)]['containers']({'parameters':{'projectId':H,'jobId':x},'options':{'per_page':this[uu(0x233)],'cursor':s}}),i=(C=b[uu(0x28e)]['containers'])!==null&&C!==void 0x0?C:[],j=i===null||i===void 0x0?void 0x0:i['map'](A=>A[uu(0x29c)]+'\x20(startedAt:\x20'+A['createdAt']+')');return D&&j[uu(0x1fc)](K),{'elements':j,'nextCursor':(p=b[uu(0x21b)])===null||p===void 0x0?void 0x0:p[uu(0x26f)]};});return this[uI(0x293)]('job\x20containers',z,I,uI(0x1b6)+x+'\x27')['then'](H=>{const ua=uI,s=H[ua(0x1df)]('\x20')[0x0];if(s===K)return undefined;return s;});}if(a!==undefined){const H=s=>C=>__awaiter(this,void 0x0,void 0x0,function*(){const ux=uI;var p,b;const i=yield this[ux(0x26a)][ux(0x1ad)][ux(0x208)][ux(0x288)]({'parameters':{'projectId':s,'serviceId':a},'options':{'per_page':this[ux(0x233)],'cursor':C}}),j=(p=i[ux(0x28e)][ux(0x288)])!==null&&p!==void 0x0?p:[],A=j[ux(0x1a4)](F=>F[ux(0x29c)]+ux(0x22a)+F[ux(0x296)]+')');if(D)A===null||A===void 0x0?void 0x0:A[ux(0x1fc)](K);return{'elements':A,'nextCursor':(b=i[ux(0x21b)])===null||b===void 0x0?void 0x0:b[ux(0x26f)]};});return this[uI(0x293)](uI(0x21c),H,I,uI(0x253)+x+'\x27')['then'](s=>{const C=s['split']('\x20')[0x0];if(C===K)return undefined;return C;});}throw new Error(uI(0x222));}),this['askForAddon']=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const uK=r,a=x=>D=>__awaiter(this,void 0x0,void 0x0,function*(){const uD=a8I;var K;const z=yield this[uD(0x26a)][uD(0x230)]['addons']({'parameters':{'projectId':x},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':D}});return{'elements':z[uD(0x28e)]['addons'][uD(0x1a4)](H=>H['id']),'nextCursor':(K=z['pagination'])===null||K===void 0x0?void 0x0:K[uD(0x26f)]};});return this[uK(0x293)](uK(0x242),a,I);}),this['askForAddonBackup']=(I,a)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const uH=r,x=D=>K=>__awaiter(this,void 0x0,void 0x0,function*(){const uz=a8I;var z;const H=yield this[uz(0x26a)][uz(0x1ad)]['addon'][uz(0x1d3)]({'parameters':{'projectId':D,'addonId':a},'options':{'per_page':this[uz(0x233)],'cursor':K}});return{'elements':H[uz(0x28e)][uz(0x1d3)][uz(0x1a4)](s=>s['id']+uz(0x278)+(s[uz(0x1ac)]||uz(0x2a5))+')'),'nextCursor':(z=H[uz(0x21b)])===null||z===void 0x0?void 0x0:z[uz(0x26f)]};});return this[uH(0x293)]('backups',x,I,uH(0x1a9)+a+'\x27')['then'](D=>D[uH(0x1df)]('\x20')[0x0]);}),this[r(0x20f)]=(I,a,x)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const uC=r,D=K=>z=>__awaiter(this,void 0x0,void 0x0,function*(){const us=a8I;var H;const s=yield this[us(0x26a)][us(0x1ad)][us(0x242)][us(0x1d2)][us(0x1e7)]({'parameters':{'projectId':K,'addonId':a,'backupId':x},'options':{'per_page':this[us(0x233)],'cursor':z}});return{'elements':s[us(0x28e)][us(0x1e7)]['map'](C=>C['id']+us(0x278)+(C[us(0x1ac)]||'not\x20completed')+')'),'nextCursor':(H=s[us(0x21b)])===null||H===void 0x0?void 0x0:H[us(0x26f)]};});return this[uC(0x293)](uC(0x248),D,I,uC(0x1a9)+a+'\x27')[uC(0x1f9)](K=>K['split']('\x20')[0x0]);}),this['askForVolume']=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const a=x=>__awaiter(this,void 0x0,void 0x0,function*(){const up=a8I;return(yield this['apiClient'][up(0x230)][up(0x29a)]({'parameters':{'projectId':x}}))[up(0x28e)][up(0x1a4)](D=>D['id']);});return this['askForProjectScopedResource']('volume',a,I);}),this[r(0x20d)]=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const ui=r,a=x=>D=>__awaiter(this,void 0x0,void 0x0,function*(){const ub=a8I;var K;const z=yield this['apiClient'][ub(0x230)][ub(0x235)]({'parameters':{'projectId':x},'options':{'per_page':this[ub(0x233)],'cursor':D}});return{'elements':z[ub(0x28e)]['secrets'][ub(0x1a4)](H=>H['id']),'nextCursor':(K=z[ub(0x21b)])===null||K===void 0x0?void 0x0:K['cursor']};});return this[ui(0x293)](ui(0x236),a,I);}),this['askForSubdomain']=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const uj=r,a=yield this[uj(0x26a)]['get'][uj(0x1c7)]({'parameters':{'domain':I}}),x=a['data'][uj(0x282)][uj(0x1a4)](K=>K[uj(0x29c)]+uj(0x273)+K['fullName']+')'),D=uj(0x1c8)+I+')';return this['askForResource'](uj(0x277),x,D)[uj(0x1f9)](K=>K['split']('\x20')[0x0]);}),this['askForSubdomainPath']=(I,a)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const uA=r,x=yield this[uA(0x26a)][uA(0x230)][uA(0x277)][uA(0x1d6)]({'parameters':{'domain':I,'subdomain':a}}),D=x[uA(0x28e)][uA(0x246)][uA(0x1a4)](z=>''+z[uA(0x264)]),K=uA(0x1c8)+I+uA(0x2a0)+a+')';return this[uA(0x201)]('subdomainPath',D,K);}),this[r(0x231)]=I=>__awaiter(this,void 0x0,void 0x0,function*(){const uF=r;return(yield inquirer[uF(0x1c6)]([{'type':uF(0x1a7),'name':uF(0x266),'message':chalk_1[uF(0x1b0)][uF(0x265)](uF(0x1cc)+(I||uF(0x1fd))+uF(0x1bb)),'default':![]}]))[uF(0x266)];}),this[r(0x234)]=(I,a)=>__awaiter(this,void 0x0,void 0x0,function*(){const uX=r;_['isUndefined'](I[uX(0x29c)])&&(a[uX(0x28c)]<=0x0?_[uX(0x1d8)](I,'name',uX(0x1b0)):yield(0x0,utils_1['retry'])(0xa)(()=>__awaiter(this,void 0x0,void 0x0,function*(){const uT=uX,{name:x}=yield inquirer[uT(0x1c6)]([{'type':'input','name':'name','message':uT(0x220),'default':uT(0x1cf)}]);if(!I[uT(0x263)]&&a[uT(0x295)](D=>D[uT(0x29c)]===x)){const {c:D}=yield inquirer['prompt']([{'type':uT(0x1a7),'name':'c','message':uT(0x1ce)+x+uT(0x20b),'default':![]}]);if(D===![])throw new Error('Context\x20name\x20already\x20exists.');_['set'](I,uT(0x263),!![]);}_[uT(0x1d8)](I,uT(0x29c),x);})));if(_['isUndefined'](I[uX(0x1ba)])){const x=yield this[uX(0x23e)]();_['set'](I,'token',x);}return I;}),this[r(0x23e)]=()=>__awaiter(this,void 0x0,void 0x0,function*(){const uE=r,{token:I}=yield inquirer[uE(0x1c6)]([{'type':uE(0x26e),'name':uE(0x1ba),'mask':'*','message':'Choose\x20the\x20login\x20token:'}]);return I;}),inquirer['registerPrompt'](r(0x258),inquirerSearchList),inquirer[r(0x24c)]('pagination-prompt',inquirer_pagination_prompt_1['DynamicReloadPaginationPrompt']);}[a8T(0x249)](u,I){return __awaiter(this,void 0x0,void 0x0,function*(){const uf=a8I,a=yaml['safeDump'](u),x=_[uf(0x1b5)](a['split']('\x0a')[uf(0x1a4)](z=>z[uf(0x28c)])),D=chalk_1[uf(0x1b0)][uf(0x250)]('-'[uf(0x1a2)](x)+'\x0a'),{confirm:K}=yield inquirer['prompt']([{'type':uf(0x230),'name':uf(0x1a7),'message':''+chalk_1[uf(0x1b0)][uf(0x1fb)][uf(0x20e)](uf(0x298))+D+chalk_1[uf(0x1b0)][uf(0x1b4)](a)+D,'choices':Object[uf(0x1bf)](ConfirmChoices)}]);switch(K){case ConfirmChoices[uf(0x257)]:return u;case ConfirmChoices['ABORT']:throw new Error('Aborted.');case ConfirmChoices[uf(0x28f)]:return this[uf(0x29f)](I);case ConfirmChoices[uf(0x223)]:return this[uf(0x249)](yield this['editPayload'](u),I);case ConfirmChoices[uf(0x2a2)]:yield this[uf(0x1e8)](u);return this[uf(0x249)](u,I);default:throw new Error(uf(0x297));}});}[a8T(0x29f)](u,I){return __awaiter(this,void 0x0,void 0x0,function*(){const uN=a8I;if((I===null||I===void 0x0?void 0x0:I['resultCache'])!==undefined)this[uN(0x2a3)]=I===null||I===void 0x0?void 0x0:I[uN(0x2a3)];this[uN(0x23d)]=I===null||I===void 0x0?void 0x0:I[uN(0x23b)],this[uN(0x274)]=I===null||I===void 0x0?void 0x0:I[uN(0x274)];const a={};return yield this[uN(0x1d9)]([],u['opt']['body'],a),this['resultCache']=a,yield this['confirmationPrompt'](a,u);});}[a8T(0x1d9)](u,I,a,x){return __awaiter(this,void 0x0,void 0x0,function*(){const uP=a8I;let D;if(I['oneOf']&&!_['has'](I,'properties')){if(I[uP(0x238)]['length']>0x1){const {choice:K}=yield inquirer[uP(0x1c6)]([{'type':uP(0x230),'name':uP(0x299),'message':'What\x27s\x20the\x20'+(u[u[uP(0x28c)]-0x1]||'')+uP(0x1a8),'choices':I['oneOf'][uP(0x1a4)](z=>{const um=uP;var H;return(H=z[um(0x1dd)])!==null&&H!==void 0x0?H:'??';})}]);D=yield this['getType'](u,I['oneOf'][uP(0x295)](z=>z['description']===K),a,x);}else{const z=I[uP(0x238)][0x0];_[uP(0x1d8)](z,'description',I['description']),D=yield this[uP(0x26b)](u,z,a,x);}D={};}else{if(I[uP(0x1fa)]&&!_[uP(0x1e0)](I,uP(0x2a8))){if(I[uP(0x1fa)][uP(0x28c)]>0x1){const {choice:H}=yield inquirer[uP(0x1c6)]([{'type':'list','name':'choice','message':'What\x27s\x20the\x20'+(u[u[uP(0x28c)]-0x1]||'')+uP(0x1a8),'choices':[...I['anyOf']['map'](s=>{var C;return(C=s['description'])!==null&&C!==void 0x0?C:'??';}),uP(0x27e)]}]);H!==uP(0x27e)&&(D=yield this[uP(0x26b)](u,I[uP(0x1fa)][uP(0x295)](s=>s['description']===H),a,x));}else{const s=I['anyOf'][0x0];_['set'](s,'description',I['description']),D=yield this[uP(0x26b)](u,s,a,x);}D={};}else D=yield this[uP(0x26b)](u,I,a,x);}return D;});}[a8T(0x21a)](u,I,a,x){var D;return __awaiter(this,void 0x0,void 0x0,function*(){const uk=a8I;if(x===![]){const {addEntry:H}=yield inquirer[uk(0x1c6)]([{'type':uk(0x1a7),'name':uk(0x228),'message':this[uk(0x280)](I,uk(0x25d),u===null||u===void 0x0?void 0x0:u[uk(0x1dd)]),'default':![]}]);if(!H)return a;}const K=Object['keys']((D=u===null||u===void 0x0?void 0x0:u['properties'])!==null&&D!==void 0x0?D:[]),z=u[uk(0x210)]||[];if(K[uk(0x28c)]>0x0)for(const s of K){const C=I[uk(0x20a)](s);if(I['length']>0x0&&!_['has'](a,I[uk(0x214)]('.')))_[uk(0x1d8)](a,I[uk(0x214)]('.'),{});yield this[uk(0x1d9)](C,u[uk(0x2a8)][s],a,z[uk(0x255)](s));}else yield this['getType'](I,Object[uk(0x1da)](Object['assign']({},u),{'type':'rawObject'}),a,x);return a;});}[a8T(0x25e)](u,I,a,x){return __awaiter(this,void 0x0,void 0x0,function*(){const uR=a8I;if(I&&a)return!![];const D=I?'Do\x20you\x20want\x20to\x20add':uR(0x202),{addEntry:K}=yield inquirer[uR(0x1c6)]([{'type':'confirm','name':uR(0x228),'message':this['getPathString'](u,D,I?x:undefined),'default':![]}]);return K;});}[a8T(0x26b)](u,I,a,x){return __awaiter(this,void 0x0,void 0x0,function*(){const uq=a8I;let D;const K=u[uq(0x214)]('.');switch(I===null||I===void 0x0?void 0x0:I[uq(0x269)]){case'array':{let z=!![];while(yield this['askArrayEntry'](u,z,x,I===null||I===void 0x0?void 0x0:I[uq(0x1dd)])){const H=_[uq(0x1ad)](a,K);_[uq(0x1f6)](a,K),yield this[uq(0x26b)](u,I['items'],a);const s=_[uq(0x1ad)](a,K);!_[uq(0x279)](H)?_['set'](a,K,[s]):(H['push'](s),_[uq(0x1d8)](a,K,H)),z=![];}return D||[];}case uq(0x217):{return D=yield this[uq(0x21a)](I,u,a,x),D;}case'rawObject':D=(0x0,utils_1[uq(0x252)])(yield this[uq(0x25f)](u,I,x))||undefined;break;case uq(0x27d):case'boolean':case'integer':default:D=yield this[uq(0x25f)](u,I,x,a);break;}return!_['isUndefined'](D)&&_[uq(0x1d8)](a,K,D),D;});}[a8T(0x25f)](u,I,a,x){var D;return __awaiter(this,void 0x0,void 0x0,function*(){const uc=a8I,K=u[u[uc(0x28c)]-0x1],{defaultValue:defaultValue=(D=I===null||I===void 0x0?void 0x0:I[uc(0x1af)])!==null&&D!==void 0x0?D:I===null||I===void 0x0?void 0x0:I[uc(0x1b0)],choices:choices=I===null||I===void 0x0?void 0x0:I[uc(0x1bd)],pagination:z}=yield(0x0,api_helpers_1['fetchResourceList'])(K,this['apiClient'],this[uc(0x23d)],x,this[uc(0x1be)],u);let H=uc(0x1c0);if(!_[uc(0x23a)](choices)&&choices[uc(0x28c)]>0x0){if(z!==undefined&&z['nextPageCursor']!==undefined)H=uc(0x1a6);else choices['length']>0x4&&typeof choices[0x0]===uc(0x27d)?H='search-list':H=uc(0x230);}else{if((I===null||I===void 0x0?void 0x0:I[uc(0x269)])===uc(0x1c9))H=uc(0x1a7);else{if((I===null||I===void 0x0?void 0x0:I[uc(0x269)])===uc(0x281))H=uc(0x1c0);else(I===null||I===void 0x0?void 0x0:I[uc(0x269)])==='rawObject'&&(H=uc(0x292));}}let s=a!==![]?!_[uc(0x24f)](defaultValue)?defaultValue:JSON[uc(0x209)](defaultValue):_[uc(0x284)](defaultValue)?defaultValue:uc(0x27e);if(choices)s=s[uc(0x1a0)]();_[uc(0x1e0)](this[uc(0x2a3)],u[uc(0x214)]('.'))&&(s=this['resultCache'][u[uc(0x214)]('.')]);const C=choices&&a===![]?[uc(0x27e),...choices]:choices,p=(I===null||I===void 0x0?void 0x0:I[uc(0x269)])===uc(0x281),b=Object['assign']({'type':H,'name':'id','message':this[uc(0x24a)](u,I),'choices':C,'default':s,'filter':this[uc(0x25c)](H,a),'validate':this[uc(0x1ca)](I,a,p)},z),i=(yield inquirer[uc(0x1c6)]([b]))['id'];if(i==='don\x27t\x20change'||i==='')return undefined;if(p)return parseInt(i,0xa);return i;});}['getQuestionString'](u,I){const uM=a8T,a=(I===null||I===void 0x0?void 0x0:I['type'])!==uM(0x1c9)?'What\x20do\x20you\x20want\x20to\x20use\x20as':uM(0x1d4);return this[uM(0x280)](u,a,I===null||I===void 0x0?void 0x0:I['description']);}[a8T(0x1e2)](){return __awaiter(this,void 0x0,void 0x0,function*(){const uo=a8I,u=I=>__awaiter(this,void 0x0,void 0x0,function*(){const ur=a8I;var a;const x=yield this['apiClient'][ur(0x230)]['projects']({'options':{'per_page':this['defaultPaginationPageSize'],'cursor':I}}),D=x[ur(0x28e)][ur(0x20c)]['map'](K=>K['id']);return{'elements':D,'nextCursor':(a=x[ur(0x21b)])===null||a===void 0x0?void 0x0:a[ur(0x26f)]};});return yield this[uo(0x244)](uo(0x289),u);});}['askForProjectScopedResource'](u,I,a,x){return __awaiter(this,void 0x0,void 0x0,function*(){const uw=a8I,D=a||this[uw(0x26a)][uw(0x29b)]['getCurrentProjectName']();if(_['isUndefined'](D))throw new Error(uw(0x240));const K=yield I(D);return yield this[uw(0x201)](u,K,(x?x+uw(0x212):'')+'project:\x20\x27'+D+'\x27');});}[a8T(0x293)](u,I,a,x){return __awaiter(this,void 0x0,void 0x0,function*(){const uh=a8I,D=a||this[uh(0x26a)]['contextProvider']['getCurrentProjectName']();if(_[uh(0x23a)](D))throw new Error(uh(0x240));const K=yield I(D);return yield this[uh(0x244)](u,K,(x?x+uh(0x212):'')+'project:\x20\x27'+D+'\x27');});}[a8T(0x215)](){return __awaiter(this,void 0x0,void 0x0,function*(){const uB=a8I,u=I=>__awaiter(this,void 0x0,void 0x0,function*(){const uW=a8I;var a;const x=yield this[uW(0x26a)]['list'][uW(0x1e1)]({'options':{'per_page':this['defaultPaginationPageSize'],'cursor':I}});return{'elements':x['data']['domains'][uW(0x1a4)](D=>D[uW(0x29c)]),'nextCursor':(a=x[uW(0x21b)])===null||a===void 0x0?void 0x0:a[uW(0x26f)]};});return this[uB(0x244)](uB(0x1c7),u);});}[a8T(0x251)](){return __awaiter(this,void 0x0,void 0x0,function*(){const uV=a8I,u=I=>__awaiter(this,void 0x0,void 0x0,function*(){const uJ=a8I;var a;const x=yield this[uJ(0x26a)][uJ(0x230)]['registryCredentials']({'options':{'per_page':this[uJ(0x233)],'cursor':I}});return{'elements':x[uJ(0x28e)][uJ(0x24e)][uJ(0x1a4)](D=>D['id']),'nextCursor':(a=x[uJ(0x21b)])===null||a===void 0x0?void 0x0:a[uJ(0x26f)]};});return this[uV(0x244)](uV(0x24e),u);});}[a8T(0x1ed)](u){this['pathVars']=u;}}exports['InquirerHelper']=InquirerHelper;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a9P=a9I;(function(u,I){const N=a9I,a=u();while(!![]){try{const x=parseInt(N(0x1d8))/0x1*(parseInt(N(0x1c6))/0x2)+parseInt(N(0x1fc))/0x3+parseInt(N(0x1c3))/0x4*(parseInt(N(0x1fa))/0x5)+-parseInt(N(0x1f9))/0x6+-parseInt(N(0x1d0))/0x7+-parseInt(N(0x1e5))/0x8+parseInt(N(0x1df))/0x9*(parseInt(N(0x1eb))/0xa);if(x===I)break;else a['push'](a['shift']());}catch(D){a['push'](a['shift']());}}}(a9u,0xbca61));var __createBinding=this&&this[a9P(0x1c2)]||(Object[a9P(0x1ef)]?function(u,I,a,x){const m=a9P;if(x===undefined)x=a;var D=Object['getOwnPropertyDescriptor'](I,a);(!D||('get'in D?!I[m(0x1c9)]:D['writable']||D[m(0x1e1)]))&&(D={'enumerable':!![],'get':function(){return I[a];}}),Object[m(0x1d3)](u,x,D);}:function(u,I,a,x){if(x===undefined)x=a;u[x]=I[a];}),__setModuleDefault=this&&this[a9P(0x1f0)]||(Object['create']?function(u,I){const k=a9P;Object[k(0x1d3)](u,k(0x1c5),{'enumerable':!![],'value':I});}:function(u,I){const R=a9P;u[R(0x1c5)]=I;}),__importStar=this&&this['__importStar']||function(u){const q=a9P;if(u&&u['__esModule'])return u;var I={};if(u!=null){for(var a in u)if(a!==q(0x1c5)&&Object['prototype'][q(0x1ea)]['call'](u,a))__createBinding(I,u,a);}return __setModuleDefault(I,u),I;},__awaiter=this&&this['__awaiter']||function(u,I,a,x){function D(K){return K instanceof a?K:new a(function(z){z(K);});}return new(a||(a=Promise))(function(K,z){const o=a9I;function H(p){const c=a9I;try{C(x[c(0x1d9)](p));}catch(b){z(b);}}function s(p){const M=a9I;try{C(x[M(0x1f1)](p));}catch(b){z(b);}}function C(p){const r=a9I;p[r(0x1da)]?K(p[r(0x1fb)]):D(p['value'])['then'](H,s);}C((x=x[o(0x1cd)](u,I||[]))[o(0x1d9)]());});},__importDefault=this&&this['__importDefault']||function(u){const w=a9P;return u&&u[w(0x1c9)]?u:{'default':u};};function a9u(){const L=['login-success','events','hasOwnProperty','10iSgBwV','EventEmitter','success','ws:','create','__setModuleDefault','throw','catch','message','error\x20happened\x20during\x20browser\x20login:\x20','Unable\x20to\x20open\x20browser:\x20','baseUrl','toString','type','2234076hcyoTR','10caKqff','value','1185591byDrGi','__createBinding','1007296xlcwwA','status','default','2230882quMQAB','error','duplex','__esModule','Unexpected\x20response','login-failure','createWebSocketStream','apply','https:','emit','9141958HVPEdm','browser-opened','http:','defineProperty','SIGINT','idle','write','init','1TFiqkW','next','done','data','exit','handleError','openBrowser','13110165IciXdI','parse','configurable','init-ack','NorthflankApiBrowserLogin','stringify','8159408mAhkNA','end','Login\x20process\x20stopped\x20before\x20completed'];a9u=function(){return L;};return a9u();}Object[a9P(0x1d3)](exports,a9P(0x1c9),{'value':!![]}),exports[a9P(0x1e3)]=void 0x0;const ws_1=__importStar(require('ws')),open_1=__importDefault(require('open')),events_1=require(a9P(0x1e9));class NorthflankApiBrowserLogin extends events_1[a9P(0x1ec)]{constructor(u,I=!![]){const h=a9P;super(),this[h(0x1f6)]=u,this[h(0x1de)]=I,this[h(0x1c4)]=h(0x1d5),this['initPackage']=()=>JSON['stringify']({'type':'init'});}['startLogin'](){const W=a9P;var u;const I=this[W(0x1f6)]['replace'](W(0x1ce),'wss:')['replace'](W(0x1d2),W(0x1ee)),a=I+'/v1/cli-login',x=new ws_1[(W(0x1c5))](a),D=()=>__awaiter(this,void 0x0,void 0x0,function*(){const J=W;yield new Promise(z=>{const B=a9I;var H;(H=this[B(0x1c8)])===null||H===void 0x0?void 0x0:H[B(0x1e6)](JSON[B(0x1e4)]({'type':'aborted'}),()=>z());}),process[J(0x1dc)]();}),K=new Promise((z,H)=>{const V=W;var s,C,p;try{this[V(0x1c8)]=(0x0,ws_1[V(0x1cc)])(x),process['on'](V(0x1d4),D);}catch(b){H(new Error('Failed\x20to\x20establish\x20connection\x20to\x20command\x20execution\x20proxy:\x20'+b[V(0x1f3)]));}(s=this[V(0x1c8)])===null||s===void 0x0?void 0x0:s['on'](V(0x1db),i=>{const y=V;var j;const A=JSON[y(0x1e0)](i[y(0x1f7)]());switch(A===null||A===void 0x0?void 0x0:A[y(0x1f8)]){case y(0x1e2):{const {loginPage:F}=A;if(F===undefined){this[y(0x1dd)](y(0x1ca),H);return;}this['openBrowser']&&(0x0,open_1[y(0x1c5)])(F)[y(0x1f2)](X=>{const e=y,T=e(0x1f5)+X[e(0x1f3)];this['handleError'](T,H);});this[y(0x1cf)](y(0x1d1),{'url':F});break;}case y(0x1e8):{const {apiToken:X,contextName:T}=A;if(X===undefined){this[y(0x1dd)]('Unexpected\x20response,\x20api\x20token\x20missing',H);return;}(j=this[y(0x1c8)])===null||j===void 0x0?void 0x0:j[y(0x1e6)](),z({'token':X,'contextName':T}),this[y(0x1c4)]=y(0x1ed);break;}case y(0x1cb):{const E='Failure\x20during\x20login:\x20'+(A===null||A===void 0x0?void 0x0:A[y(0x1f3)]);this[y(0x1dd)](E,H);break;}default:{const f='unable\x20to\x20parse\x20message:\x20'+JSON['stringify'](A);this['handleError'](f,H);}}}),(C=this['duplex'])===null||C===void 0x0?void 0x0:C['on'](V(0x1c7),i=>{const U=V;this[U(0x1dd)](U(0x1f4)+i[U(0x1f3)],H);}),(p=this[V(0x1c8)])===null||p===void 0x0?void 0x0:p['on'](V(0x1e6),()=>{const S=V;if(this[S(0x1c4)]===S(0x1ed)){}else this[S(0x1dd)](S(0x1e7),H);});});return(u=this[W(0x1c8)])===null||u===void 0x0?void 0x0:u[W(0x1d6)](this['initPackage']()),this[W(0x1c4)]=W(0x1d7),K['finally'](()=>{process['removeListener']('SIGINT',D);});}[a9P(0x1dd)](u,I){const n=a9P;var a,x;I?(a=this[n(0x1c8)])===null||a===void 0x0?void 0x0:a[n(0x1e6)](()=>I(new Error(u))):(x=this['duplex'])===null||x===void 0x0?void 0x0:x[n(0x1e6)](),this[n(0x1c4)]=n(0x1c7);}}function a9I(u,I){const a=a9u();return a9I=function(x,D){x=x-0x1c2;let K=a[x];return K;},a9I(u,I);}exports[a9P(0x1e3)]=NorthflankApiBrowserLogin;
|
package/dist/logs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a10a=a10D;(function(C,D){const F=a10D,V=C();while(!![]){try{const Y=-parseInt(F(0x1a3))/0x1+parseInt(F(0x191))/0x2+parseInt(F(0x19c))/0x3+parseInt(F(0x1a8))/0x4*(parseInt(F(0x1ef))/0x5)+-parseInt(F(0x161))/0x6+parseInt(F(0x1a0))/0x7*(-parseInt(F(0x1da))/0x8)+parseInt(F(0x171))/0x9*(parseInt(F(0x1ee))/0xa);if(Y===D)break;else V['push'](V['shift']());}catch(e){V['push'](V['shift']());}}}(a10C,0x4d378));var __awaiter=this&&this[a10a(0x187)]||function(C,D,V,Y){function e(T){return T instanceof V?T:new V(function(W){W(T);});}return new(V||(V=Promise))(function(T,W){const C1=a10D;function f(i){const R=a10D;try{G(Y[R(0x169)](i));}catch(I){W(I);}}function q(i){const x=a10D;try{G(Y[x(0x1c3)](i));}catch(I){W(I);}}function G(i){const C0=a10D;i[C0(0x197)]?T(i[C0(0x1e2)]):e(i[C0(0x1e2)])[C0(0x1e1)](f,q);}G((Y=Y[C1(0x15d)](C,D||[]))[C1(0x169)]());});},__importDefault=this&&this[a10a(0x177)]||function(C){const C2=a10a;return C&&C[C2(0x1db)]?C:{'default':C};};function a10C(){const CT=['--noDefaults','askForJobRun','CliLogs','regexIncludes','__awaiter','option','getCurrentProjectName','choices','askForBuild',',\x20restore\x20id\x20','-d,\x20--direction\x20<order>','-l,\x20--lineLimit\x20[limit]','job','--deployment\x20--deploymentId\x20[deploymentId]','31184kavJBZ','./log-formatter','../inquirer-helper','\x20(exit\x20with\x20','backupId','Error\x20while\x20tailing\x20log\x20lines:\x20','done','alias','description','getFormatter','data','956754SnhNgs','getCurrentServiceName','tsHint','toUpperCase','4011749WgngCU','build-','--restore\x20--restoreId\x20[restoreId]','314298NvjDhd','parseDateInput','warning','defaultDurationSeconds','logs','214712WombwS','yml','conflicts','--textNotIncludes\x20<text>','cursor','Get\x20logs\x20generated\x20before\x20this\x20time,\x20','Restore\x20to\x20get\x20logs\x20from','textIncludes','setSeconds','../utils','-t,\x20--types\x20<types...>','Deployment\x20id,\x20example:\x20my-service-54785f4','apiContext','logs-received','getCommand','getLogsCommand','Log\x20session\x20ended','Error\x20while\x20fetching\x20log\x20lines:\x20','containerId','logTail','Job\x20run\x20id,\x20example:\x20162b1977-6636-4000-929b-cc265b862ff0','Only\x20two\x20of\x20\x27startTime\x27,\x20\x27endTime\x27\x20and\x20\x27duration\x27\x20can\x20be\x20set.','noDefaults','bold','argParser','formatLogLine','\x20seconds','throw',',\x20backup\x20id\x20','buildId','valueOf','printInitInfo','serviceId','--project\x20--projectId\x20[projectId]','inquirerHelper','Which\x20log\x20types\x20to\x20fetch','\x20to\x20get\x20logs\x20from','stringify','Filter\x20log\x20lines\x20to\x20not\x20include\x20this\x20text','logRange','name','askForProject','forward','details','getSeconds','No\x20logs\x20found\x20for\x20this\x20query.\x20Make\x20sure\x20to\x20select\x20an\x20appropriate\x20time\x20window.','Build\x20to\x20get\x20logs\x20from','regexNotIncludes','message','askForAddon','8JkxFou','__esModule',',\x20from:\x20','deploymentId','yaml','log','close','then','value','getCurrentJobName','length','hasNextPage','addonBackup','\x20in\x20project\x20','Id\x20[','values','printResponse','forEach','\x20of\x20','error','70WGxCMz','25gwMDAa','json','start','defineProperty','Number\x20of\x20lines\x20to\x20return.','-f,\x20--tail','Filter\x20log\x20lines\x20to\x20not\x20match\x20this\x20regular\x20expression','toISOString','apply','charAt','logsApiClient','commander','981774FWjyZC','LogType','assign','askForService','\x20for\x20container\x20','--backup\x20--backupId\x20[backupId]','addOption','action','next','Length\x20of\x20timespan\x20in\x20seconds.\x20Only\x20valid\x20if\x20not\x20both,\x20startTime\x20and\x20endTime\x20are\x20set','tail','ApiClient','-o,\x20--output\x20[output]','askForContainer','Option','--textIncludes\x20<text>','982818nKgRbj','\x20with\x20live-tailing','apiClient','../formatting/console-format-helpers','service','--build\x20--buildId\x20[buildId]','__importDefault','--regexIncludes\x20<regex>','--container\x20--containerId\x20[containerId]','textNotIncludes','@northflank/js-client','default','addon','\x20for\x20all\x20containers','getStandardLogCommand','customUserAgent','addonId',',\x20to:\x20'];a10C=function(){return CT;};return a10C();}Object[a10a(0x1f2)](exports,a10a(0x1db),{'value':!![]}),exports[a10a(0x185)]=void 0x0;function a10D(C,D){const V=a10C();return a10D=function(Y,e){Y=Y-0x15a;let T=V[Y];return T;},a10D(C,D);}const js_client_1=require(a10a(0x17b)),chalk_1=__importDefault(require('chalk')),utils_1=require(a10a(0x1b1)),inquirer_helper_1=require(a10a(0x193)),commander_1=require(a10a(0x160)),console_format_helpers_1=require(a10a(0x174)),log_formatter_1=require(a10a(0x192));class CliLogs{constructor(C){const C3=a10a;this[C3(0x1b4)]=C,this[C3(0x1a6)]=0x708,this[C3(0x17f)]=(D,V,Y,e)=>{const C4=C3,T=(0x0,utils_1[C4(0x1b6)])(!![])[C4(0x1d0)]((V?C4(0x1a1):'')+C4(0x1a7))[C4(0x198)]((V?C4(0x1a1):'')+C4(0x1df))[C4(0x199)]('Get\x20log\x20for\x20the\x20specified\x20'+D)['option'](C4(0x1c9),'Project\x20for\x20logs')['option']('--'+D+'\x20--'+D+C4(0x1e8)+D+'Id]',D[C4(0x15e)](0x0)[C4(0x19f)]()+D['slice'](0x1)+C4(0x1cc))[C4(0x188)](C4(0x179),'Container\x20to\x20exec\x20into\x20(logs\x20from\x20all\x20containers\x20will\x20be\x20shown\x20if\x20not\x20specified)');if(V)T[C4(0x188)](C4(0x176),C4(0x1d6));if(D==='job')T['option']('--run\x20--runId\x20[runId]',C4(0x1bc));if(D===C4(0x175))T[C4(0x188)](C4(0x190),C4(0x1b3));if(Y)T[C4(0x188)](C4(0x166),'Backup\x20to\x20get\x20logs\x20from');if(e)T['option'](C4(0x1a2),C4(0x1ae));return!V&&!Y&&!e&&T[C4(0x167)](new commander_1[(C4(0x16f))](C4(0x1b2),C4(0x1cb))[C4(0x18a)](Object[C4(0x1e9)](js_client_1[C4(0x162)]))),T[C4(0x188)](C4(0x15a),'Tail\x20will\x20stream\x20logs\x20in\x20real-time.\x20Session\x20will\x20be\x20kept\x20open.')[C4(0x188)](C4(0x18e),C4(0x1f3))['option']('--startTime\x20<timestamp>','Get\x20logs\x20generated\x20after\x20this\x20time,\x20'+utils_1['tsHint'],utils_1[C4(0x1a4)])['addOption'](new commander_1['Option']('--endTime\x20<timestamp>',C4(0x1ad)+utils_1[C4(0x19e)])[C4(0x1c0)](utils_1[C4(0x1a4)])[C4(0x1aa)]([C4(0x16b)]))[C4(0x188)]('--duration\x20[duration]',C4(0x16a))[C4(0x167)](new commander_1[(C4(0x16f))](C4(0x18d),'Direction\x20of\x20logs.\x20Ignored\x20when\x20tailing.')[C4(0x18a)](['backward',C4(0x1d2)])[C4(0x1aa)]([C4(0x16b)]))[C4(0x167)](new commander_1['Option'](C4(0x170),'Filter\x20log\x20lines\x20to\x20include\x20this\x20text')[C4(0x1aa)]([C4(0x17a),C4(0x186),C4(0x1d7)]))[C4(0x167)](new commander_1[(C4(0x16f))](C4(0x1ab),C4(0x1ce))[C4(0x1aa)]([C4(0x1af),C4(0x186),C4(0x1d7)]))[C4(0x167)](new commander_1[(C4(0x16f))](C4(0x178),'Filter\x20log\x20lines\x20to\x20match\x20this\x20regular\x20expression')[C4(0x1aa)]([C4(0x17a),C4(0x1af),C4(0x1d7)]))[C4(0x167)](new commander_1['Option']('--regexNotIncludes\x20<regex>',C4(0x15b))[C4(0x1aa)]([C4(0x17a),C4(0x186),C4(0x1af)]))['option'](C4(0x183),'Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.',![])[C4(0x167)](new commander_1[(C4(0x16f))](C4(0x16d),'Output\x20formatting.\x20Will\x20use\x20advanced\x20formatting\x20by\x20default.')[C4(0x18a)](Object[C4(0x1e9)](['format',C4(0x1f0),C4(0x1de)]))),T;},this[C3(0x1c7)]=(D,V,Y,e)=>{const C5=C3,{containerName:T,restoreId:W,backupId:f,quiet:q,tail:G,startTime:i,endTime:I,duration:m}=e;if(q===!![])return;const Q=G?C5(0x194)+chalk_1[C5(0x17c)][C5(0x1bf)]('\x27Ctrl+C\x27')+')':'',J=G?C5(0x172):'',z=new Date(),u=i!==null&&i!==void 0x0?i:new Date(new Date((I!==null&&I!==void 0x0?I:z)[C5(0x1c6)]())[C5(0x1b0)]((I!==null&&I!==void 0x0?I:z)[C5(0x1d4)]()-(m!==null&&m!==void 0x0?m:this['defaultDurationSeconds']))),L=(I!==null&&I!==void 0x0?I:i!==undefined)?new Date(new Date(i[C5(0x1c6)]())[C5(0x1b0)](i[C5(0x1d4)]()+(m!==null&&m!==void 0x0?m:this[C5(0x1a6)]))):z,v=f!==undefined,k=u&&!v?C5(0x1dc)+chalk_1[C5(0x17c)][C5(0x1bf)](u[C5(0x15c)]()):'',s=L&&!v?C5(0x182)+chalk_1[C5(0x17c)]['bold'](L[C5(0x15c)]()):'',h=m?',\x20duration:\x20'+m+C5(0x1c2):'',j=T?C5(0x165)+chalk_1[C5(0x17c)]['bold'](T):v?'':C5(0x17e),U=f?C5(0x1c4)+f:'',t=W?C5(0x18c)+W:'',y=D+'\x20'+chalk_1[C5(0x17c)][C5(0x1bf)](V)+U+t+C5(0x1e7)+chalk_1[C5(0x17c)][C5(0x1bf)](Y),Z=''+k+s+h;console[C5(0x1df)]('>\x20Container\x20logs'+J+j+C5(0x1ec)+y+Z+Q+':');},this[C3(0x19a)]=(D,V)=>(Y,e)=>{const C6=C3;if(!D){if(Y[C6(0x1e4)]===0x0)console[C6(0x1df)](C6(0x1d5));Y[C6(0x1eb)](T=>(0x0,log_formatter_1[C6(0x1c1)])(T,V));}else(0x0,console_format_helpers_1[C6(0x1ea)])(D,Y);(e===null||e===void 0x0?void 0x0:e[C6(0x1e5)])&&(0x0,utils_1[C6(0x1a5)])('Element\x20count\x20for\x20this\x20request\x20exceeds\x20the\x20line\x20limit,\x20output\x20was\x20truncated.\x20Cut\x20off\x20at\x20timestamp\x20'+e[C6(0x1ac)]);},this[C3(0x173)]=new js_client_1[(C3(0x16c))](C,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[C3(0x180)]}),this[C3(0x15f)]=this[C3(0x173)],this['inquirerHelper']=new inquirer_helper_1['InquirerHelper'](this[C3(0x173)]);}[a10a(0x1b7)](C,D=![],V=![],Y=![]){const CY=a10a,e=(I,m)=>__awaiter(this,void 0x0,void 0x0,function*(){const C7=a10D,Q=m[C7(0x1be)],{apiContext:J,inquirerHelper:z}=this;switch(C){case C7(0x175):{const u=Q?undefined:J[C7(0x19d)]();return m[C7(0x1c8)]||u||(yield z[C7(0x164)](I)());}case C7(0x18f):{const L=Q?undefined:J[C7(0x1e3)]();return m['jobId']||L||(yield z['askForJob'](I)());}case C7(0x17d):{return m[C7(0x181)]||(yield z[C7(0x1d9)](I)());}}}),T=(I,m,Q)=>__awaiter(this,void 0x0,void 0x0,function*(){const C8=a10D;if(D)return Q[C8(0x1c5)]||(yield this[C8(0x1ca)][C8(0x18b)](I,C==='service'?m:undefined,C===C8(0x18f)?m:undefined,!![])());return undefined;}),W=(I,m,Q)=>__awaiter(this,void 0x0,void 0x0,function*(){const C9=a10D;if(V||Y)return Q[C9(0x195)]||(yield this['inquirerHelper']['askForAddonBackup'](I,m)());return undefined;}),f=(I,m,Q,J)=>__awaiter(this,void 0x0,void 0x0,function*(){if(Y)return J['restoreId']||(yield this['inquirerHelper']['askForAddonRestore'](I,m,Q)());return undefined;}),q=(I,m,Q)=>__awaiter(this,void 0x0,void 0x0,function*(){const CC=a10D;if(!D&&Q[CC(0x1ba)]!==undefined){if(Q[CC(0x1ba)]!==!![])return Q['containerId'];return yield this['inquirerHelper'][CC(0x16e)](I,C===CC(0x175)?m:undefined,C===CC(0x18f)?m:undefined,!![])();}return undefined;}),G=(I,m,Q)=>__awaiter(this,void 0x0,void 0x0,function*(){const CD=a10D;if(C==='job')return Q['runId']||(yield this[CD(0x1ca)][CD(0x184)](m,I,!![])());return undefined;}),i=(I,m,Q)=>__awaiter(this,void 0x0,void 0x0,function*(){const CV=a10D;if(C===CV(0x175)){if(Q[CV(0x1dd)]!==!![])return Q[CV(0x1dd)];return Q[CV(0x1dd)];}return undefined;});return this[CY(0x17f)](C,D,V,Y)[CY(0x168)](I=>__awaiter(this,void 0x0,void 0x0,function*(){const Ce=CY,{noDefaults:m,projectId:Q,quiet:J,tail:z,types:u,textIncludes:L,textNotIncludes:v,regexIncludes:k,regexNotIncludes:s,direction:h,lineLimit:j,startTime:U,endTime:t,duration:y,output:Z}=I;(0x0,utils_1['assertContextExisting'])(this['apiClient']);const {apiContext:X,inquirerHelper:p,logsApiClient:M}=this,n=m?undefined:X[Ce(0x189)](),r=Q||n||(yield p[Ce(0x1d1)]()),l=yield e(r,I),b=yield T(r,l,I),P=yield W(r,l,I),g=yield f(r,l,P,I),E=yield G(r,l,I),o=yield i(r,l,I),w=yield q(r,l,I);if(U&&t&&y)throw new Error(Ce(0x1bd));const A={'projectId':r,'entityId':l},N={'containerName':w,'types':u,'textIncludes':L,'textNotIncludes':v,'regexIncludes':k,'regexNotIncludes':s,'lineLimit':j,'startTime':U,'duration':y,'runId':E,'buildId':b,'backupId':P,'restoreId':g,'deploymentId':o,'isBuild':D!==null&&D!==void 0x0?D:![]},S=Y?'addonRestore':V?Ce(0x1e6):C,B=Object[Ce(0x163)](Object[Ce(0x163)]({},N),{'endTime':t,'direction':h});if(!J&&Z!==Ce(0x1de)&&Z!==Ce(0x1a9)&&Z!==Ce(0x1f0))this[Ce(0x1c7)](C,l,r,Object['assign'](Object[Ce(0x163)]({},B),I));const H=this[Ce(0x19a)](Z,L!==null&&L!==void 0x0?L:k);if(z){const K=yield M[Ce(0x1a7)][Ce(0x1bb)](A,N,S);K['on'](Ce(0x1b5),H),K['on']('error',c=>(0x0,utils_1[Ce(0x1ed)])(Ce(0x196)+c[Ce(0x1d8)])),K['on'](Ce(0x1e0),()=>console['log'](Ce(0x1b8))),yield K[Ce(0x1f1)]();}else{const c=yield M['logs'][Ce(0x1cf)](A,B,S);if(c[Ce(0x1ed)]){const d=c['error'][Ce(0x1d3)],O=d?'\x0aDetails:\x20'+JSON[Ce(0x1cd)](d,null,'\x20'):'';(0x0,utils_1[Ce(0x1ed)])(Ce(0x1b9)+c[Ce(0x1ed)]['message']+O);}else H(c[Ce(0x19b)],c['pagination']);}}));}}exports[a10a(0x185)]=CliLogs;
|
|
1
|
+
'use strict';function a10u(){const uD=['--container\x20--containerId\x20[containerId]','Element\x20count\x20for\x20this\x20request\x20exceeds\x20the\x20line\x20limit,\x20output\x20was\x20truncated.\x20Cut\x20off\x20at\x20timestamp\x20','Get\x20logs\x20generated\x20before\x20this\x20time,\x20','default','getCommand','Id]','Deployment\x20id,\x20example:\x20my-service-54785f4','tsHint','askForAddonBackup','Number\x20of\x20lines\x20to\x20return.','3023616kqoeHw','askForAddon','Filter\x20log\x20lines\x20to\x20match\x20this\x20regular\x20expression','\x20(exit\x20with\x20','warning','-f,\x20--tail','--textNotIncludes\x20<text>','__esModule','./log-formatter','Error\x20while\x20fetching\x20log\x20lines:\x20',',\x20from:\x20','--regexNotIncludes\x20<regex>','908210haAYOZ','close',',\x20restore\x20id\x20','4iXEvDB','textIncludes','inquirerHelper','Length\x20of\x20timespan\x20in\x20seconds.\x20Only\x20valid\x20if\x20not\x20both,\x20startTime\x20and\x20endTime\x20are\x20set','description','data','done','cursor','assign','Log\x20session\x20ended','--project\x20--projectId\x20[projectId]','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','ApiClient','addonRestore','defineProperty','Which\x20log\x20types\x20to\x20fetch','logs-received','Filter\x20log\x20lines\x20to\x20not\x20match\x20this\x20regular\x20expression','job','chalk','5omNJqu','buildId','defaultDurationSeconds','json','commander','\x20seconds','alias','askForAddonRestore','formatLogLine','addonBackup','addOption','../inquirer-helper','Id\x20[','choices','--restore\x20--restoreId\x20[restoreId]','getCurrentJobName','error','regexNotIncludes','askForService','Backup\x20to\x20get\x20logs\x20from','yaml','767706NjmVla','logRange','7344qedBNP','parseDateInput','printInitInfo','../utils','addonId','Get\x20logs\x20generated\x20after\x20this\x20time,\x20','Option','noDefaults','getCurrentServiceName','Filter\x20log\x20lines\x20to\x20include\x20this\x20text','restoreId','\x20--','message','textNotIncludes','1121276dECsTk','apply','stringify','conflicts','assertContextExisting','No\x20logs\x20found\x20for\x20this\x20query.\x20Make\x20sure\x20to\x20select\x20an\x20appropriate\x20time\x20window.','tail','\x20in\x20project\x20','Build\x20to\x20get\x20logs\x20from','yml','Project\x20for\x20logs','argParser','hasNextPage','-d,\x20--direction\x20<order>','getStandardLogCommand','Job\x20run\x20id,\x20example:\x20162b1977-6636-4000-929b-cc265b862ff0','Tail\x20will\x20stream\x20logs\x20in\x20real-time.\x20Session\x20will\x20be\x20kept\x20open.','Error\x20while\x20tailing\x20log\x20lines:\x20','../formatting/console-format-helpers','action','service','value','logTail','customUserAgent','log','--duration\x20[duration]','askForBuild','2443Tilbtj','InquirerHelper','Filter\x20log\x20lines\x20to\x20not\x20include\x20this\x20text','Restore\x20to\x20get\x20logs\x20from','-l,\x20--lineLimit\x20[limit]','__importDefault','setSeconds',',\x20duration:\x20','printResponse','backward','Container\x20to\x20exec\x20into\x20(logs\x20from\x20all\x20containers\x20will\x20be\x20shown\x20if\x20not\x20specified)','261204iNjCUR','@northflank/js-client','Get\x20log\x20for\x20the\x20specified\x20','apiClient','>\x20Container\x20logs','Output\x20formatting.\x20Will\x20use\x20advanced\x20formatting\x20by\x20default.','slice','9IgjatZ','--textIncludes\x20<text>','runId','bold','option','containerId','getSeconds','--endTime\x20<timestamp>','apiContext','\x20to\x20get\x20logs\x20from','317796PePKbP','build-','values','next','regexIncludes','logs','-o,\x20--output\x20[output]','then','CliLogs','getLogsCommand','\x20for\x20all\x20containers','44eiICSW','throw','Direction\x20of\x20logs.\x20Ignored\x20when\x20tailing.','--build\x20--buildId\x20[buildId]','backupId','deploymentId','format','valueOf','charAt','--regexIncludes\x20<regex>'];a10u=function(){return uD;};return a10u();}const a10u0=a10I;(function(u,I){const d=a10I,a=u();while(!![]){try{const x=-parseInt(d(0x15e))/0x1+parseInt(d(0x18c))/0x2*(-parseInt(d(0x1b5))/0x3)+parseInt(d(0x1c5))/0x4*(parseInt(d(0x1a0))/0x5)+parseInt(d(0x17d))/0x6+parseInt(d(0x1e0))/0x7*(parseInt(d(0x1b7))/0x8)+parseInt(d(0x154))/0x9*(parseInt(d(0x189))/0xa)+parseInt(d(0x169))/0xb*(parseInt(d(0x1eb))/0xc);if(x===I)break;else a['push'](a['shift']());}catch(D){a['push'](a['shift']());}}}(a10u,0x6e93e));var __awaiter=this&&this['__awaiter']||function(u,I,a,x){function D(K){return K instanceof a?K:new a(function(z){z(K);});}return new(a||(a=Promise))(function(K,z){const Y=a10I;function H(p){try{C(x['next'](p));}catch(b){z(b);}}function s(p){const v=a10I;try{C(x[v(0x16a)](p));}catch(b){z(b);}}function C(p){const t=a10I;p[t(0x192)]?K(p[t(0x1da)]):D(p[t(0x1da)])[t(0x165)](H,s);}C((x=x[Y(0x1c6)](u,I||[]))[Y(0x161)]());});},__importDefault=this&&this[a10u0(0x1e5)]||function(u){return u&&u['__esModule']?u:{'default':u};};Object[a10u0(0x19a)](exports,a10u0(0x184),{'value':!![]}),exports[a10u0(0x166)]=void 0x0;function a10I(u,I){const a=a10u();return a10I=function(x,D){x=x-0x150;let K=a[x];return K;},a10I(u,I);}const js_client_1=require(a10u0(0x1ec)),chalk_1=__importDefault(require(a10u0(0x19f))),utils_1=require(a10u0(0x1ba)),inquirer_helper_1=require(a10u0(0x1ab)),commander_1=require(a10u0(0x1a4)),console_format_helpers_1=require(a10u0(0x1d7)),log_formatter_1=require(a10u0(0x185));class CliLogs{constructor(u){const u1=a10u0;this[u1(0x15c)]=u,this['defaultDurationSeconds']=0x708,this[u1(0x1d3)]=(I,a,x,D)=>{const u2=u1,K=(0x0,utils_1[u2(0x177)])(!![])['name']((a?u2(0x15f):'')+u2(0x163))[u2(0x1a6)]((a?u2(0x15f):'')+u2(0x1dd))[u2(0x190)](u2(0x1ed)+I)[u2(0x158)](u2(0x196),u2(0x1cf))['option']('--'+I+u2(0x1c2)+I+u2(0x1ac)+I+u2(0x178),I[u2(0x171)](0x0)['toUpperCase']()+I[u2(0x153)](0x1)+u2(0x15d))[u2(0x158)](u2(0x173),u2(0x1ea));if(a)K[u2(0x158)](u2(0x16c),u2(0x1cd));if(I===u2(0x19e))K['option']('--run\x20--runId\x20[runId]',u2(0x1d4));if(I===u2(0x1d9))K['option']('--deployment\x20--deploymentId\x20[deploymentId]',u2(0x179));if(x)K[u2(0x158)]('--backup\x20--backupId\x20[backupId]',u2(0x1b3));if(D)K[u2(0x158)](u2(0x1ae),u2(0x1e3));return!a&&!x&&!D&&K[u2(0x1aa)](new commander_1[(u2(0x1bd))]('-t,\x20--types\x20<types...>',u2(0x19b))[u2(0x1ad)](Object[u2(0x160)](js_client_1['LogType']))),K['option'](u2(0x182),u2(0x1d5))[u2(0x158)](u2(0x1e4),u2(0x17c))[u2(0x158)]('--startTime\x20<timestamp>',u2(0x1bc)+utils_1[u2(0x17a)],utils_1[u2(0x1b8)])['addOption'](new commander_1['Option'](u2(0x15b),u2(0x175)+utils_1[u2(0x17a)])[u2(0x1d0)](utils_1[u2(0x1b8)])[u2(0x1c8)]([u2(0x1cb)]))[u2(0x158)](u2(0x1de),u2(0x18f))[u2(0x1aa)](new commander_1[(u2(0x1bd))](u2(0x1d2),u2(0x16b))[u2(0x1ad)]([u2(0x1e9),'forward'])[u2(0x1c8)](['tail']))[u2(0x1aa)](new commander_1[(u2(0x1bd))](u2(0x155),u2(0x1c0))[u2(0x1c8)]([u2(0x1c4),u2(0x162),u2(0x1b1)]))[u2(0x1aa)](new commander_1[(u2(0x1bd))](u2(0x183),u2(0x1e2))[u2(0x1c8)]([u2(0x18d),'regexIncludes',u2(0x1b1)]))['addOption'](new commander_1[(u2(0x1bd))](u2(0x172),u2(0x17f))[u2(0x1c8)]([u2(0x1c4),u2(0x18d),'regexNotIncludes']))['addOption'](new commander_1['Option'](u2(0x188),u2(0x19d))[u2(0x1c8)]([u2(0x1c4),u2(0x162),u2(0x18d)]))[u2(0x158)]('--noDefaults',u2(0x197),![])[u2(0x1aa)](new commander_1[(u2(0x1bd))](u2(0x164),u2(0x152))['choices'](Object[u2(0x160)]([u2(0x16f),u2(0x1a3),u2(0x1b4)]))),K;},this[u1(0x1b9)]=(I,a,x,D)=>{const u3=u1,{containerName:K,restoreId:z,backupId:H,quiet:s,tail:C,startTime:p,endTime:b,duration:i}=D;if(s===!![])return;const j=C?u3(0x180)+chalk_1['default'][u3(0x157)]('\x27Ctrl+C\x27')+')':'',A=C?'\x20with\x20live-tailing':'',F=new Date(),X=p!==null&&p!==void 0x0?p:new Date(new Date((b!==null&&b!==void 0x0?b:F)['valueOf']())[u3(0x1e6)]((b!==null&&b!==void 0x0?b:F)[u3(0x15a)]()-(i!==null&&i!==void 0x0?i:this[u3(0x1a2)]))),T=(b!==null&&b!==void 0x0?b:p!==undefined)?new Date(new Date(p[u3(0x170)]())['setSeconds'](p['getSeconds']()+(i!==null&&i!==void 0x0?i:this['defaultDurationSeconds']))):F,E=H!==undefined,f=X&&!E?u3(0x187)+chalk_1[u3(0x176)]['bold'](X['toISOString']()):'',N=T&&!E?',\x20to:\x20'+chalk_1[u3(0x176)][u3(0x157)](T['toISOString']()):'',P=i?u3(0x1e7)+i+u3(0x1a5):'',m=K?'\x20for\x20container\x20'+chalk_1[u3(0x176)][u3(0x157)](K):E?'':u3(0x168),k=H?',\x20backup\x20id\x20'+H:'',R=z?u3(0x18b)+z:'',q=I+'\x20'+chalk_1[u3(0x176)]['bold'](a)+k+R+u3(0x1cc)+chalk_1[u3(0x176)][u3(0x157)](x),c=''+f+N+P;console[u3(0x1dd)](u3(0x151)+A+m+'\x20of\x20'+q+c+j+':');},this['getFormatter']=(I,a)=>(x,D)=>{const u4=u1;if(!I){if(x['length']===0x0)console[u4(0x1dd)](u4(0x1ca));x['forEach'](K=>(0x0,log_formatter_1[u4(0x1a8)])(K,a));}else(0x0,console_format_helpers_1[u4(0x1e8)])(I,x);(D===null||D===void 0x0?void 0x0:D[u4(0x1d1)])&&(0x0,utils_1[u4(0x181)])(u4(0x174)+D[u4(0x193)]);},this[u1(0x150)]=new js_client_1[(u1(0x198))](u,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[u1(0x1dc)]}),this['logsApiClient']=this['apiClient'],this[u1(0x18e)]=new inquirer_helper_1[(u1(0x1e1))](this['apiClient']);}[a10u0(0x167)](u,I=![],a=![],x=![]){const ua=a10u0,D=(b,i)=>__awaiter(this,void 0x0,void 0x0,function*(){const u5=a10I,j=i[u5(0x1be)],{apiContext:A,inquirerHelper:F}=this;switch(u){case u5(0x1d9):{const X=j?undefined:A[u5(0x1bf)]();return i['serviceId']||X||(yield F[u5(0x1b2)](b)());}case u5(0x19e):{const T=j?undefined:A[u5(0x1af)]();return i['jobId']||T||(yield F['askForJob'](b)());}case'addon':{return i[u5(0x1bb)]||(yield F[u5(0x17e)](b)());}}}),K=(b,i,j)=>__awaiter(this,void 0x0,void 0x0,function*(){const u6=a10I;if(I)return j[u6(0x1a1)]||(yield this['inquirerHelper'][u6(0x1df)](b,u===u6(0x1d9)?i:undefined,u===u6(0x19e)?i:undefined,!![])());return undefined;}),z=(b,i,j)=>__awaiter(this,void 0x0,void 0x0,function*(){const u7=a10I;if(a||x)return j[u7(0x16d)]||(yield this[u7(0x18e)][u7(0x17b)](b,i)());return undefined;}),H=(b,i,j,A)=>__awaiter(this,void 0x0,void 0x0,function*(){const u8=a10I;if(x)return A[u8(0x1c1)]||(yield this[u8(0x18e)][u8(0x1a7)](b,i,j)());return undefined;}),s=(b,i,j)=>__awaiter(this,void 0x0,void 0x0,function*(){const u9=a10I;if(!I&&j[u9(0x159)]!==undefined){if(j[u9(0x159)]!==!![])return j[u9(0x159)];return yield this[u9(0x18e)]['askForContainer'](b,u===u9(0x1d9)?i:undefined,u==='job'?i:undefined,!![])();}return undefined;}),C=(b,i,j)=>__awaiter(this,void 0x0,void 0x0,function*(){const uu=a10I;if(u==='job')return j[uu(0x156)]||(yield this['inquirerHelper']['askForJobRun'](i,b,!![])());return undefined;}),p=(b,i,j)=>__awaiter(this,void 0x0,void 0x0,function*(){const uI=a10I;if(u===uI(0x1d9)){if(j[uI(0x16e)]!==!![])return j[uI(0x16e)];return j['deploymentId'];}return undefined;});return this[ua(0x1d3)](u,I,a,x)[ua(0x1d8)](b=>__awaiter(this,void 0x0,void 0x0,function*(){const ux=ua,{noDefaults:i,projectId:j,quiet:A,tail:F,types:X,textIncludes:T,textNotIncludes:E,regexIncludes:f,regexNotIncludes:N,direction:P,lineLimit:m,startTime:k,endTime:R,duration:q,output:c}=b;(0x0,utils_1[ux(0x1c9)])(this[ux(0x150)]);const {apiContext:M,inquirerHelper:r,logsApiClient:o}=this,w=i?undefined:M['getCurrentProjectName'](),h=j||w||(yield r['askForProject']()),W=yield D(h,b),B=yield K(h,W,b),J=yield z(h,W,b),V=yield H(h,W,J,b),y=yield C(h,W,b),e=yield p(h,W,b),U=yield s(h,W,b);if(k&&R&&q)throw new Error('Only\x20two\x20of\x20\x27startTime\x27,\x20\x27endTime\x27\x20and\x20\x27duration\x27\x20can\x20be\x20set.');const S={'projectId':h,'entityId':W},n={'containerName':U,'types':X,'textIncludes':T,'textNotIncludes':E,'regexIncludes':f,'regexNotIncludes':N,'lineLimit':m,'startTime':k,'duration':q,'runId':y,'buildId':B,'backupId':J,'restoreId':V,'deploymentId':e,'isBuild':I!==null&&I!==void 0x0?I:![]},L=x?ux(0x199):a?ux(0x1a9):u,g=Object[ux(0x194)](Object[ux(0x194)]({},n),{'endTime':R,'direction':P});if(!A&&c!==ux(0x1b4)&&c!==ux(0x1ce)&&c!==ux(0x1a3))this[ux(0x1b9)](u,W,h,Object[ux(0x194)](Object[ux(0x194)]({},g),b));const l=this['getFormatter'](c,T!==null&&T!==void 0x0?T:f);if(F){const Z=yield o[ux(0x163)][ux(0x1db)](S,n,L);Z['on'](ux(0x19c),l),Z['on'](ux(0x1b0),G=>(0x0,utils_1[ux(0x1b0)])(ux(0x1d6)+G[ux(0x1c3)])),Z['on'](ux(0x18a),()=>console['log'](ux(0x195))),yield Z['start']();}else{const G=yield o[ux(0x163)][ux(0x1b6)](S,g,L);if(G[ux(0x1b0)]){const O=G[ux(0x1b0)]['details'],Q=O?'\x0aDetails:\x20'+JSON[ux(0x1c7)](O,null,'\x20'):'';(0x0,utils_1['error'])(ux(0x186)+G[ux(0x1b0)][ux(0x1c3)]+Q);}else l(G[ux(0x191)],G['pagination']);}}));}}exports[a10u0(0x166)]=CliLogs;
|