@northflank/cli 0.9.18 → 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 a8b=a8I;(function(V,I){const T=a8I,v=V();while(!![]){try{const j=-parseInt(T(0x1f1))/0x1*(parseInt(T(0x221))/0x2)+parseInt(T(0x1be))/0x3+-parseInt(T(0x1de))/0x4+parseInt(T(0x1d2))/0x5*(-parseInt(T(0x212))/0x6)+parseInt(T(0x21a))/0x7*(parseInt(T(0x1ce))/0x8)+-parseInt(T(0x1d9))/0x9*(parseInt(T(0x274))/0xa)+-parseInt(T(0x22a))/0xb*(-parseInt(T(0x18e))/0xc);if(j===I)break;else v['push'](v['shift']());}catch(U){v['push'](v['shift']());}}}(a8V,0xdd59f));var __createBinding=this&&this[a8b(0x1e9)]||(Object[a8b(0x1dc)]?function(V,I,v,j){const M=a8b;if(j===undefined)j=v;var U=Object[M(0x20f)](I,v);(!U||('get'in U?!I[M(0x1ad)]:U[M(0x1a7)]||U[M(0x288)]))&&(U={'enumerable':!![],'get':function(){return I[v];}}),Object['defineProperty'](V,j,U);}:function(V,I,v,j){if(j===undefined)j=v;V[j]=I[v];}),__setModuleDefault=this&&this[a8b(0x284)]||(Object[a8b(0x1dc)]?function(V,I){Object['defineProperty'](V,'default',{'enumerable':!![],'value':I});}:function(V,I){V['default']=I;}),__importStar=this&&this[a8b(0x24e)]||function(V){const X=a8b;if(V&&V['__esModule'])return V;var I={};if(V!=null){for(var v in V)if(v!==X(0x1c3)&&Object['prototype'][X(0x266)][X(0x20d)](V,v))__createBinding(I,V,v);}return __setModuleDefault(I,V),I;},__awaiter=this&&this[a8b(0x1f7)]||function(V,I,v,j){function U(l){return l instanceof v?l:new v(function(x){x(l);});}return new(v||(v=Promise))(function(l,x){const G=a8I;function N(z){const E=a8I;try{D(j[E(0x1fe)](z));}catch(B){x(B);}}function e(z){try{D(j['throw'](z));}catch(B){x(B);}}function D(z){const f=a8I;z[f(0x1d1)]?l(z[f(0x27a)]):U(z[f(0x27a)])[f(0x1db)](N,e);}D((j=j[G(0x1c7)](V,I||[]))[G(0x1fe)]());});},__importDefault=this&&this[a8b(0x202)]||function(V){const P=a8b;return V&&V[P(0x1ad)]?V:{'default':V};};Object[a8b(0x22e)](exports,a8b(0x1ad),{'value':!![]}),exports['InquirerHelper']=void 0x0;const _=__importStar(require(a8b(0x22b))),chalk_1=__importDefault(require(a8b(0x25a))),fs=__importStar(require('fs')),utils_1=require(a8b(0x239)),api_helpers_1=require('./api-helpers'),inquirer_pagination_prompt_1=require(a8b(0x1c9)),inquirer=require(a8b(0x1a4)),inquirerSearchList=require(a8b(0x1ff)),yaml=require('js-yaml');var ConfirmChoices;(function(V){const a=a8b;V[a(0x1e2)]='Yes,\x20send',V[a(0x26b)]=a(0x1fb),V['EDIT']=a(0x1c4),V[a(0x1f5)]='No,\x20but\x20save\x20as\x20file',V['ABORT']=a(0x23b);}(ConfirmChoices||(ConfirmChoices={})));class InquirerHelper{constructor(V){const s=a8b;this[s(0x236)]=V,this['defaultPaginationPageSize']=0x32,this['editPayload']=I=>__awaiter(this,void 0x0,void 0x0,function*(){const d=s,{editedResult:v}=yield inquirer[d(0x265)]([{'type':d(0x201),'name':d(0x22f),'message':d(0x206),'default':yaml[d(0x197)](I)}]);return yaml[d(0x207)](v);}),this[s(0x21f)]=I=>__awaiter(this,void 0x0,void 0x0,function*(){const R=s,v=x=>'Unexpected\x20file\x20type:\x20'+x+',\x20supported\x20types:\x20[json|yaml|yml]';function j(){return __awaiter(this,void 0x0,void 0x0,function*(){const t=a8I;return inquirer[t(0x265)]([{'type':t(0x20b),'name':t(0x1af),'message':'Provide\x20a\x20file\x20path\x20to\x20write\x20the\x20configuration\x20to\x20(<name>.[json|yaml|yml])','validate':x=>new RegExp('.*\x5c.(json|yaml|yml)$')['test'](x)?!![]:v(x)}]);});}const {fileName:U}=yield j(),l=U[R(0x23f)]()[R(0x28d)]('.')[R(0x18d)]();try{switch(l){case R(0x18c):(0x0,utils_1[R(0x1d7)])(R(0x1d4)+U);return fs[R(0x285)](U,JSON[R(0x226)](I,null,'\x20\x20'));case'yaml':case R(0x278):(0x0,utils_1[R(0x1d7)])('Configuration\x20file\x20written\x20to\x20'+U);return fs[R(0x285)](U,yaml[R(0x197)](I));default:(0x0,utils_1[R(0x1e8)])(v(l));}}catch(x){(0x0,utils_1[R(0x1e8)])(R(0x1b0)+x['message']);}return undefined;}),this[s(0x1eb)]=(I,v)=>j=>{const u=s,U=typeof j===u(0x21b)?j['trim']():j;return v===![]&&U===u(0x1ea)?'':U;},this[s(0x28e)]=(I,v,j)=>U=>{const n=s;if(this['skipValidation']===!![])return!![];const l=[];if(U===''||U==='don\x27t\x20change'){if(v!==![])l['push'](n(0x1b6));else return!![];}I['type']===n(0x21b)&&!_[n(0x1ed)](I[n(0x1ef)])&&l[n(0x218)](new RegExp(I[n(0x1ef)])['test'](U)?!![]:n(0x1b2)+I[n(0x1ef)]+'\x27');I['type']===n(0x21b)&&!_['isUndefined'](I[n(0x19f)])&&l['push'](U[n(0x257)]>=I[n(0x19f)]?!![]:'must\x20be\x20longer\x20than\x20or\x20equal\x20to\x20'+I['minLength']+n(0x259)+U[n(0x257)]+'\x20characters');I['type']===n(0x21b)&&!_['isUndefined'](I[n(0x1cb)])&&l[n(0x218)](U[n(0x257)]<=I[n(0x1cb)]?!![]:'must\x20be\x20shorter\x20than\x20or\x20equal\x20to\x20'+I['maxLength']+n(0x259)+U[n(0x257)]+n(0x1df));j&&Number[n(0x1d6)](parseInt(U,0xa))&&l[n(0x218)]('must\x20be\x20a\x20number,\x20is\x20'+U);I[n(0x25d)]===n(0x281)&&!_[n(0x1ed)](I['minimum'])&&l[n(0x218)](U>=I[n(0x1c1)]?!![]:n(0x262)+I[n(0x1c1)]);I[n(0x25d)]===n(0x281)&&!_[n(0x1ed)](I[n(0x1cf)])&&l[n(0x218)](U<=I[n(0x1cf)]?!![]:n(0x25f)+I[n(0x1cf)]);if(I[n(0x25d)]==='rawObject'){const e=(0x0,utils_1[n(0x19d)])(U);l[n(0x218)](e===![]||_[n(0x1f6)](e)?n(0x233):!![]);}const x=l[n(0x1eb)](D=>D!==!![]),N=(I===null||I===void 0x0?void 0x0:I['example'])?'\x0a'+chalk_1[n(0x1c3)][n(0x251)]('>>')+n(0x1d5)+chalk_1['default'][n(0x1d8)](JSON[n(0x226)](I[n(0x27f)])):'';return x[n(0x257)]>0x0?x[n(0x227)](chalk_1[n(0x1c3)][n(0x275)](n(0x219)))+N:!![];},this[s(0x1ca)]=(I,v,j)=>{const q=s,U=I[I[q(0x257)]-0x1];function l(){const J=q;return I[J(0x20a)](0x0,-0x1)[J(0x1e5)](e=>e['charAt'](0x0)[J(0x19e)]()+e['slice'](0x1))['join']('>');}const x=I[q(0x257)]>0x1?chalk_1['default']['bgGrey'][q(0x1d8)](l())+':\x20':'',N=j?'\x20('+chalk_1[q(0x1c3)]['blue'](j)+')':'';return chalk_1[q(0x1c3)][q(0x246)](''+x+v+'\x20'+chalk_1['default'][q(0x240)][q(0x21c)](U)+N+'?');},this[s(0x1fd)]=(I,v,j)=>__awaiter(this,void 0x0,void 0x0,function*(){const L=s;if(v[L(0x257)]<0x1){const x=j?L(0x217)+j:L(0x271);throw new Error(L(0x25c)+I+'\x20'+x+'.');}const U=L(0x1ac)+I+L(0x283),l=v[L(0x257)]>0x4?L(0x1ae):L(0x232);return(yield inquirer[L(0x265)]([{'type':l,'name':L(0x1f8),'message':U,'choices':v}]))[L(0x1f8)];}),this[s(0x1f4)]=(I,v,j)=>__awaiter(this,void 0x0,void 0x0,function*(){const Z=s,{elements:U,nextCursor:l}=yield v();if(U['length']<0x1){const e=j?Z(0x217)+j:Z(0x271);throw new Error(Z(0x25c)+I+'\x20'+e+'.');}const x=Z(0x1ac)+I+Z(0x283);if(l!==undefined){const D=({nextPageCursor:z})=>__awaiter(this,void 0x0,void 0x0,function*(){const S=Z,B=yield v(z);return{'elements':B[S(0x28c)],'nextPageCursor':B[S(0x268)]};});return(yield inquirer[Z(0x265)]([{'type':Z(0x24a),'name':Z(0x1f8),'message':x,'choices':U,'nextPageCursor':l,'loadMore':D}]))[Z(0x1f8)];}const N=U[Z(0x257)]>0x4?'search-list':Z(0x232);return(yield inquirer['prompt']([{'type':N,'name':Z(0x1f8),'message':x,'choices':U}]))[Z(0x1f8)];}),this[s(0x26f)]=(I,v)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const h=s,j=''+(v?'('+chalk_1['default'][h(0x270)](v)+')\x20':''),U='Enter\x20the\x20'+chalk_1[h(0x1c3)]['green'](I)+'\x20'+j+h(0x19a),l=this['validate']({'type':h(0x21b),'required':!![]});return(yield inquirer[h(0x265)]([{'type':h(0x20b),'name':h(0x1f8),'message':U,'validate':l}]))['name'];}),this['askConfirm']=I=>__awaiter(this,void 0x0,void 0x0,function*(){const Q=s;return(yield inquirer[Q(0x265)]([{'type':'confirm','name':'name','message':I,'default':!![]}]))[Q(0x1f8)];}),this[s(0x214)]=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const W=s,v=j=>U=>__awaiter(this,void 0x0,void 0x0,function*(){const F=a8I;var l;const x=yield this[F(0x236)][F(0x232)][F(0x258)]({'parameters':{'projectId':j},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':U}}),N=x[F(0x1cc)][F(0x258)]['map'](e=>e['id']);return{'elements':N,'nextCursor':(l=x['pagination'])===null||l===void 0x0?void 0x0:l['cursor']};});return this['askForProjectScopedResourcePaginated'](W(0x198),v,I);}),this[s(0x27d)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const p=s,I=v=>__awaiter(this,void 0x0,void 0x0,function*(){const y=a8I;var j;const U=yield this[y(0x236)]['list'][y(0x18b)]({'options':{'per_page':this[y(0x26a)],'cursor':v}}),l=U['data'][y(0x18b)]['map'](x=>x['id']);return{'elements':l,'nextCursor':(j=U[y(0x1ab)])===null||j===void 0x0?void 0x0:j[y(0x286)]};});return this[p(0x1f4)](p(0x277),I);}),this[s(0x24d)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const K=s,I=v=>__awaiter(this,void 0x0,void 0x0,function*(){const g=a8I;var j,U,l;const x=yield this['apiClient'][g(0x232)]['tags']({'options':{'per_page':this['defaultPaginationPageSize'],'cursor':v}}),N=(U=(j=x[g(0x1cc)][g(0x1cd)])===null||j===void 0x0?void 0x0:j['map'](e=>e['id']))!==null&&U!==void 0x0?U:[];return{'elements':N,'nextCursor':(l=x['pagination'])===null||l===void 0x0?void 0x0:l[g(0x286)]};});return this[K(0x1f4)](K(0x1d3),I);}),this[s(0x260)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const k=s,I=v=>__awaiter(this,void 0x0,void 0x0,function*(){const C=a8I;var j,U,l;const x=yield this['apiClient'][C(0x232)]['cloud'][C(0x25e)]({'options':{'per_page':this[C(0x26a)],'cursor':v}}),N=(U=(j=x[C(0x1cc)][C(0x25e)])===null||j===void 0x0?void 0x0:j['map'](e=>e[C(0x1f8)]))!==null&&U!==void 0x0?U:[];return{'elements':N,'nextCursor':(l=x['pagination'])===null||l===void 0x0?void 0x0:l['cursor']};});return this[k(0x1f4)]('cluster\x20id',I);}),this['askForTemplateRun']=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const O=s;if(_[O(0x1ed)](I))throw new Error(O(0x1c2));const v=j=>__awaiter(this,void 0x0,void 0x0,function*(){const w=O;var U;let l=this[w(0x26a)];const x=yield this['apiClient'][w(0x232)]['templateRuns']({'parameters':{'templateId':I},'options':{'per_page':l,'cursor':j}}),N=x[w(0x1cc)][w(0x1a0)][w(0x1e5)](e=>e['id']+w(0x252)+e['createdAt']+')');return{'elements':N,'nextCursor':(U=x[w(0x1ab)])===null||U===void 0x0?void 0x0:U[w(0x286)]};});return this[O(0x1f4)](O(0x272),v)[O(0x1db)](U=>U[O(0x28d)]('\x20')[0x0]);}),this[s(0x263)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const m=s,I=v=>__awaiter(this,void 0x0,void 0x0,function*(){const A=a8I;var j;let U=this['defaultPaginationPageSize'];const l=yield this[A(0x236)][A(0x232)][A(0x235)]({'options':{'per_page':U,'cursor':v}}),x=l[A(0x1cc)]['logSinks']['map'](N=>N['id']);return{'elements':x,'nextCursor':(j=l[A(0x1ab)])===null||j===void 0x0?void 0x0:j[A(0x286)]};});return this[m(0x1f4)](m(0x1f3),I);}),this['askForPipeline']=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const V0=s,v=j=>U=>__awaiter(this,void 0x0,void 0x0,function*(){const r=a8I;var l;const x=yield this['apiClient'][r(0x232)][r(0x208)]({'parameters':{'projectId':j},'options':{'per_page':this[r(0x26a)],'cursor':U}}),N=x[r(0x1cc)][r(0x208)][r(0x1e5)](e=>e['id']);return{'elements':N,'nextCursor':(l=x[r(0x1ab)])===null||l===void 0x0?void 0x0:l['cursor']};});return this[V0(0x1bb)]('pipeline',v,I);}),this[s(0x26d)]=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const V2=s,v=j=>U=>__awaiter(this,void 0x0,void 0x0,function*(){const V1=a8I;var l;const x=yield this[V1(0x236)][V1(0x232)][V1(0x264)]({'parameters':{'projectId':j},'options':{'per_page':this[V1(0x26a)],'cursor':U}}),N=x[V1(0x1cc)]['jobs'][V1(0x1e5)](e=>e['id']);return{'elements':N,'nextCursor':(l=x[V1(0x1ab)])===null||l===void 0x0?void 0x0:l[V1(0x286)]};});return this[V2(0x1bb)]('job',v,I);}),this['askForJobRun']=(I,v,j=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const V4=s,U='all-job-runs',l=x=>N=>__awaiter(this,void 0x0,void 0x0,function*(){const V3=a8I;var e;const D=yield this[V3(0x236)][V3(0x26e)][V3(0x229)][V3(0x28f)]({'parameters':{'projectId':x,'jobId':I},'options':{'per_page':this[V3(0x26a)],'cursor':N}}),z=D[V3(0x1cc)][V3(0x28f)][V3(0x1e5)](B=>B['id']+V3(0x252)+B['startedAt']+')');return j&&z[V3(0x23e)](U),{'elements':z,'nextCursor':(e=D['pagination'])===null||e===void 0x0?void 0x0:e['cursor']};});return this[V4(0x1bb)](V4(0x192),l,v,V4(0x1c0)+I+'\x27')[V4(0x1db)](x=>{const V5=V4,N=x[V5(0x28d)]('\x20')[0x0];if(N===U)return undefined;return N;});}),this[s(0x289)]=(I,v,j,U=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const V6=s,l=V6(0x279);if(j!==undefined){const x=N=>e=>__awaiter(this,void 0x0,void 0x0,function*(){const V7=V6;var D;const z=yield this[V7(0x236)][V7(0x26e)]['job'][V7(0x1e7)]({'parameters':{'projectId':N,'jobId':j},'options':{'per_page':this[V7(0x26a)],'cursor':e}}),B=z[V7(0x1cc)][V7(0x1e7)][V7(0x1e5)](Y=>Y['id']+'\x20(startedAt:\x20'+Y[V7(0x1a8)]+')');return U&&B[V7(0x23e)](l),{'elements':B,'nextCursor':(D=z['pagination'])===null||D===void 0x0?void 0x0:D[V7(0x286)]};});return this['askForProjectScopedResourcePaginated']('job\x20builds',x,I,'job:\x20\x27'+j+'\x27')[V6(0x1db)](N=>{const V8=V6,e=N[V8(0x28d)]('\x20')[0x0];if(e===l)return undefined;return e;});}if(v!==undefined){const N=e=>D=>__awaiter(this,void 0x0,void 0x0,function*(){const V9=V6;var z;const B=yield this[V9(0x236)][V9(0x26e)][V9(0x198)][V9(0x1e7)]({'parameters':{'projectId':e,'serviceId':v},'options':{'per_page':this[V9(0x26a)],'cursor':D}}),Y=B['data'][V9(0x1e7)][V9(0x1e5)](i=>i['id']+V9(0x252)+i[V9(0x1a8)]+')');if(U)Y['unshift'](l);return{'elements':Y,'nextCursor':(z=B[V9(0x1ab)])===null||z===void 0x0?void 0x0:z[V9(0x286)]};});return this[V6(0x1bb)]('service\x20build',N,I,'service:\x20\x27'+j+'\x27')[V6(0x1db)](e=>{const VV=V6,D=e[VV(0x28d)]('\x20')[0x0];if(D===l)return undefined;return D;});}throw new Error(V6(0x19c));}),this['askForContainer']=(I,v,j,U=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const VI=s,l=VI(0x1e0);if(j!==undefined){const x=N=>e=>__awaiter(this,void 0x0,void 0x0,function*(){const Vv=VI;var D,z;const B=yield this['apiClient']['get']['job'][Vv(0x1bd)]({'parameters':{'projectId':N,'jobId':j},'options':{'per_page':this[Vv(0x26a)],'cursor':e}}),Y=(D=B[Vv(0x1cc)][Vv(0x1bd)])!==null&&D!==void 0x0?D:[],i=Y===null||Y===void 0x0?void 0x0:Y[Vv(0x1e5)](o=>o[Vv(0x1f8)]+Vv(0x252)+o[Vv(0x1a8)]+')');return U&&i['unshift'](l),{'elements':i,'nextCursor':(z=B['pagination'])===null||z===void 0x0?void 0x0:z[Vv(0x286)]};});return this['askForProjectScopedResourcePaginated'](VI(0x24b),x,I,'job:\x20\x27'+j+'\x27')[VI(0x1db)](N=>{const Vj=VI,e=N[Vj(0x28d)]('\x20')[0x0];if(e===l)return undefined;return e;});}if(v!==undefined){const N=e=>D=>__awaiter(this,void 0x0,void 0x0,function*(){const VU=VI;var z,B;const Y=yield this[VU(0x236)][VU(0x26e)][VU(0x198)][VU(0x1bd)]({'parameters':{'projectId':e,'serviceId':v},'options':{'per_page':this[VU(0x26a)],'cursor':D}}),i=(z=Y['data'][VU(0x1bd)])!==null&&z!==void 0x0?z:[],o=i[VU(0x1e5)](H=>H['name']+VU(0x252)+H[VU(0x1a8)]+')');if(U)o===null||o===void 0x0?void 0x0:o[VU(0x23e)](l);return{'elements':o,'nextCursor':(B=Y['pagination'])===null||B===void 0x0?void 0x0:B[VU(0x286)]};});return this[VI(0x1bb)]('service\x20containers',N,I,VI(0x282)+j+'\x27')[VI(0x1db)](e=>{const Vl=VI,D=e[Vl(0x28d)]('\x20')[0x0];if(D===l)return undefined;return D;});}throw new Error(VI(0x211));}),this[s(0x28b)]=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const VN=s,v=j=>U=>__awaiter(this,void 0x0,void 0x0,function*(){const Vx=a8I;var l;const x=yield this['apiClient'][Vx(0x232)][Vx(0x28a)]({'parameters':{'projectId':j},'options':{'per_page':this[Vx(0x26a)],'cursor':U}});return{'elements':x['data'][Vx(0x28a)]['map'](N=>N['id']),'nextCursor':(l=x[Vx(0x1ab)])===null||l===void 0x0?void 0x0:l[Vx(0x286)]};});return this[VN(0x1bb)](VN(0x243),v,I);}),this[s(0x1e1)]=(I,v)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const VD=s,j=U=>l=>__awaiter(this,void 0x0,void 0x0,function*(){const Ve=a8I;var x;const N=yield this['apiClient'][Ve(0x26e)][Ve(0x243)][Ve(0x242)]({'parameters':{'projectId':U,'addonId':v},'options':{'per_page':this[Ve(0x26a)],'cursor':l}});return{'elements':N['data'][Ve(0x242)]['map'](e=>e['id']+Ve(0x1bc)+(e[Ve(0x256)]||Ve(0x1e4))+')'),'nextCursor':(x=N[Ve(0x1ab)])===null||x===void 0x0?void 0x0:x['cursor']};});return this[VD(0x1bb)](VD(0x242),j,I,VD(0x21d)+v+'\x27')[VD(0x1db)](U=>U[VD(0x28d)]('\x20')[0x0]);}),this['askForAddonRestore']=(I,v,j)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const VB=s,U=l=>x=>__awaiter(this,void 0x0,void 0x0,function*(){const Vz=a8I;var N;const e=yield this[Vz(0x236)][Vz(0x26e)]['addon'][Vz(0x225)]({'parameters':{'projectId':l,'addonId':v,'backupId':j},'options':{'per_page':this[Vz(0x26a)],'cursor':x}});return{'elements':e['data'][Vz(0x225)][Vz(0x1e5)](D=>D['id']+Vz(0x1bc)+(D['completedAt']||Vz(0x1e4))+')'),'nextCursor':(N=e['pagination'])===null||N===void 0x0?void 0x0:N[Vz(0x286)]};});return this[VB(0x1bb)](VB(0x19b),U,I,VB(0x21d)+v+'\x27')[VB(0x1db)](l=>l['split']('\x20')[0x0]);}),this['askForVolume']=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Vi=s,v=j=>__awaiter(this,void 0x0,void 0x0,function*(){const VY=a8I;return(yield this['apiClient'][VY(0x232)][VY(0x247)]({'parameters':{'projectId':j}}))['data'][VY(0x1e5)](U=>U['id']);});return this[Vi(0x27b)]('volume',v,I);}),this[s(0x205)]=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const VH=s,v=j=>U=>__awaiter(this,void 0x0,void 0x0,function*(){const Vo=a8I;var l;const x=yield this['apiClient'][Vo(0x232)][Vo(0x21e)]({'parameters':{'projectId':j},'options':{'per_page':this[Vo(0x26a)],'cursor':U}});return{'elements':x[Vo(0x1cc)]['secrets'][Vo(0x1e5)](N=>N['id']),'nextCursor':(l=x[Vo(0x1ab)])===null||l===void 0x0?void 0x0:l[Vo(0x286)]};});return this[VH(0x1bb)](VH(0x23c),v,I);}),this[s(0x280)]=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const VT=s,v=yield this[VT(0x236)][VT(0x26e)][VT(0x1a6)]({'parameters':{'domain':I}}),j=v[VT(0x1cc)]['subdomains'][VT(0x1e5)](l=>l[VT(0x1f8)]+VT(0x1a9)+l[VT(0x222)]+')'),U='domain\x20('+I+')';return this[VT(0x1fd)]('subdomain',j,U)[VT(0x1db)](l=>l[VT(0x28d)]('\x20')[0x0]);}),this['askForSubdomainPath']=(I,v)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Vb=s,j=yield this[Vb(0x236)][Vb(0x232)]['subdomain']['path']({'parameters':{'domain':I,'subdomain':v}}),U=j[Vb(0x1cc)]['paths'][Vb(0x1e5)](x=>''+x[Vb(0x220)]),l=Vb(0x1c5)+I+Vb(0x253)+v+')';return this[Vb(0x1fd)](Vb(0x1ee),U,l);}),this['deleteWarningPrompt']=I=>__awaiter(this,void 0x0,void 0x0,function*(){const VM=s;return(yield inquirer[VM(0x265)]([{'type':VM(0x250),'name':VM(0x261),'message':chalk_1[VM(0x1c3)][VM(0x1ec)](VM(0x193)+(I||VM(0x1f9))+'.\x20This\x20is\x20irreversible.\x20Please\x20confirm!'),'default':![]}]))[VM(0x261)];}),this[s(0x1b8)]=(I,v)=>__awaiter(this,void 0x0,void 0x0,function*(){const VX=s;_[VX(0x1ed)](I[VX(0x1f8)])&&(v['length']<=0x0?_[VX(0x1b1)](I,VX(0x1f8),VX(0x1c3)):yield(0x0,utils_1[VX(0x244)])(0xa)(()=>__awaiter(this,void 0x0,void 0x0,function*(){const VE=VX,{name:j}=yield inquirer['prompt']([{'type':VE(0x20b),'name':VE(0x1f8),'message':VE(0x1f2),'default':'main-context'}]);if(!I[VE(0x1bf)]&&v['find'](U=>U[VE(0x1f8)]===j)){const {c:U}=yield inquirer[VE(0x265)]([{'type':'confirm','name':'c','message':VE(0x237)+j+'\x27\x20already\x20exists.\x20Do\x20you\x20want\x20to\x20override\x20this\x20context\x20(y)\x20or\x20enter\x20a\x20new\x20name\x20(N)?','default':![]}]);if(U===![])throw new Error('Context\x20name\x20already\x20exists.');_[VE(0x1b1)](I,VE(0x1bf),!![]);}_['set'](I,VE(0x1f8),j);})));if(_[VX(0x1ed)](I[VX(0x196)])){const j=yield this[VX(0x24c)]();_[VX(0x1b1)](I,VX(0x196),j);}return I;}),this['tokenPrompt']=()=>__awaiter(this,void 0x0,void 0x0,function*(){const Vf=s,{token:I}=yield inquirer[Vf(0x265)]([{'type':Vf(0x20c),'name':Vf(0x196),'mask':'*','message':Vf(0x1ba)}]);return I;}),inquirer[s(0x25b)](s(0x1ae),inquirerSearchList),inquirer['registerPrompt'](s(0x24a),inquirer_pagination_prompt_1[s(0x22c)]);}['confirmationPrompt'](V,I){return __awaiter(this,void 0x0,void 0x0,function*(){const VG=a8I,v=yaml[VG(0x197)](V),j=_[VG(0x1aa)](v[VG(0x28d)]('\x0a')[VG(0x1e5)](x=>x[VG(0x257)])),U=chalk_1[VG(0x1c3)][VG(0x1b5)]('-'[VG(0x195)](j)+'\x0a'),{confirm:l}=yield inquirer[VG(0x265)]([{'type':VG(0x232),'name':'confirm','message':''+chalk_1[VG(0x1c3)]['bold']['green'](VG(0x1e6))+U+chalk_1[VG(0x1c3)][VG(0x210)](v)+U,'choices':Object[VG(0x255)](ConfirmChoices)}]);switch(l){case ConfirmChoices[VG(0x1e2)]:return V;case ConfirmChoices[VG(0x26c)]:throw new Error('Aborted.');case ConfirmChoices[VG(0x26b)]:return this[VG(0x190)](I);case ConfirmChoices[VG(0x20e)]:return this[VG(0x228)](yield this[VG(0x22d)](V),I);case ConfirmChoices['SAVE']:yield this[VG(0x21f)](V);return this['confirmationPrompt'](V,I);default:throw new Error(VG(0x1c6));}});}[a8b(0x190)](V,I){return __awaiter(this,void 0x0,void 0x0,function*(){const VP=a8I;if((I===null||I===void 0x0?void 0x0:I[VP(0x249)])!==undefined)this[VP(0x249)]=I===null||I===void 0x0?void 0x0:I[VP(0x249)];this['tmpCmdPath']=I===null||I===void 0x0?void 0x0:I[VP(0x241)],this[VP(0x1b4)]=I===null||I===void 0x0?void 0x0:I[VP(0x1b4)];const v={};return yield this['propToType']([],V[VP(0x27e)]['body'],v),this[VP(0x249)]=v,yield this[VP(0x228)](v,V);});}[a8b(0x1b3)](V,I,v,j){return __awaiter(this,void 0x0,void 0x0,function*(){const Va=a8I;let U;if(I['oneOf']&&!_[Va(0x1d0)](I,Va(0x1a2))){if(I[Va(0x1a1)][Va(0x257)]>0x1){const {choice:l}=yield inquirer[Va(0x265)]([{'type':Va(0x232),'name':Va(0x213),'message':Va(0x223)+(V[V[Va(0x257)]-0x1]||'')+Va(0x215),'choices':I[Va(0x1a1)]['map'](x=>{const Vs=Va;var N;return(N=x[Vs(0x269)])!==null&&N!==void 0x0?N:'??';})}]);U=yield this[Va(0x1f0)](V,I[Va(0x1a1)][Va(0x287)](x=>x[Va(0x269)]===l),v,j);}else{const x=I['oneOf'][0x0];_['set'](x,Va(0x269),I[Va(0x269)]),U=yield this['getType'](V,x,v,j);}U={};}else{if(I[Va(0x1dd)]&&!_[Va(0x1d0)](I,Va(0x1a2))){if(I['anyOf']['length']>0x1){const {choice:N}=yield inquirer[Va(0x265)]([{'type':Va(0x232),'name':Va(0x213),'message':Va(0x223)+(V[V['length']-0x1]||'')+Va(0x215),'choices':[...I['anyOf']['map'](e=>{var D;return(D=e['description'])!==null&&D!==void 0x0?D:'??';}),'don\x27t\x20change']}]);N!==Va(0x1ea)&&(U=yield this[Va(0x1f0)](V,I['anyOf'][Va(0x287)](e=>e[Va(0x269)]===N),v,j));}else{const e=I[Va(0x1dd)][0x0];_[Va(0x1b1)](e,Va(0x269),I['description']),U=yield this[Va(0x1f0)](V,e,v,j);}U={};}else U=yield this[Va(0x1f0)](V,I,v,j);}return U;});}[a8b(0x245)](V,I,v,j){var U;return __awaiter(this,void 0x0,void 0x0,function*(){const Vd=a8I;if(j===![]){const {addEntry:N}=yield inquirer[Vd(0x265)]([{'type':Vd(0x250),'name':Vd(0x1b9),'message':this['getPathString'](I,Vd(0x1a5),V===null||V===void 0x0?void 0x0:V['description']),'default':![]}]);if(!N)return v;}const l=Object['keys']((U=V===null||V===void 0x0?void 0x0:V['properties'])!==null&&U!==void 0x0?U:[]),x=V[Vd(0x209)]||[];if(l[Vd(0x257)]>0x0)for(const e of l){const D=I[Vd(0x23a)](e);if(I['length']>0x0&&!_[Vd(0x1d0)](v,I[Vd(0x227)]('.')))_[Vd(0x1b1)](v,I[Vd(0x227)]('.'),{});yield this[Vd(0x1b3)](D,V[Vd(0x1a2)][e],v,x['includes'](e));}else yield this[Vd(0x1f0)](I,Object[Vd(0x1b7)](Object[Vd(0x1b7)]({},V),{'type':'rawObject'}),v,j);return v;});}['askArrayEntry'](V,I,v,j){return __awaiter(this,void 0x0,void 0x0,function*(){const Vt=a8I;if(I&&v)return!![];const U=I?'Do\x20you\x20want\x20to\x20add':'Do\x20you\x20want\x20to\x20add\x20more',{addEntry:l}=yield inquirer['prompt']([{'type':Vt(0x250),'name':Vt(0x1b9),'message':this['getPathString'](V,U,I?j:undefined),'default':![]}]);return l;});}['getType'](V,I,v,j){return __awaiter(this,void 0x0,void 0x0,function*(){const VR=a8I;let U;const l=V[VR(0x227)]('.');switch(I===null||I===void 0x0?void 0x0:I[VR(0x25d)]){case VR(0x216):{let x=!![];while(yield this[VR(0x230)](V,x,j,I===null||I===void 0x0?void 0x0:I[VR(0x269)])){const N=_[VR(0x26e)](v,l);_['unset'](v,l),yield this['getType'](V,I[VR(0x267)],v);const e=_[VR(0x26e)](v,l);!_[VR(0x1fc)](N)?_[VR(0x1b1)](v,l,[e]):(N[VR(0x218)](e),_['set'](v,l,N)),x=![];}return U||[];}case VR(0x234):{return U=yield this[VR(0x245)](I,V,v,j),U;}case VR(0x1c8):U=(0x0,utils_1[VR(0x19d)])(yield this[VR(0x23d)](V,I,j))||undefined;break;case VR(0x21b):case VR(0x238):case VR(0x281):default:U=yield this[VR(0x23d)](V,I,j,v);break;}return!_['isUndefined'](U)&&_[VR(0x1b1)](v,l,U),U;});}[a8b(0x23d)](V,I,v,j){var U;return __awaiter(this,void 0x0,void 0x0,function*(){const Vu=a8I,l=V[V['length']-0x1],{defaultValue:defaultValue=(U=I===null||I===void 0x0?void 0x0:I[Vu(0x27f)])!==null&&U!==void 0x0?U:I===null||I===void 0x0?void 0x0:I[Vu(0x1c3)],choices:choices=I===null||I===void 0x0?void 0x0:I['enum'],pagination:x}=yield(0x0,api_helpers_1['fetchResourceList'])(l,this[Vu(0x236)],this[Vu(0x1e3)],j,this['pathVars'],V);let N=Vu(0x20b);if(!_[Vu(0x1ed)](choices)&&choices[Vu(0x257)]>0x0){if(x!==undefined&&x[Vu(0x204)]!==undefined)N='pagination-prompt';else choices[Vu(0x257)]>0x4&&typeof choices[0x0]===Vu(0x21b)?N=Vu(0x1ae):N=Vu(0x232);}else{if((I===null||I===void 0x0?void 0x0:I[Vu(0x25d)])===Vu(0x238))N=Vu(0x250);else{if((I===null||I===void 0x0?void 0x0:I[Vu(0x25d)])===Vu(0x281))N='input';else(I===null||I===void 0x0?void 0x0:I[Vu(0x25d)])===Vu(0x1c8)&&(N=Vu(0x201));}}let e=v!==![]?!_[Vu(0x27c)](defaultValue)?defaultValue:JSON[Vu(0x226)](defaultValue):_[Vu(0x24f)](defaultValue)?defaultValue:Vu(0x1ea);if(choices)e=e[Vu(0x23f)]();_[Vu(0x1d0)](this['resultCache'],V[Vu(0x227)]('.'))&&(e=this[Vu(0x249)][V[Vu(0x227)]('.')]);const D=choices&&v===![]?[Vu(0x1ea),...choices]:choices,z=(I===null||I===void 0x0?void 0x0:I[Vu(0x25d)])===Vu(0x281),B=Object[Vu(0x1b7)]({'type':N,'name':'id','message':this[Vu(0x224)](V,I),'choices':D,'default':e,'filter':this[Vu(0x1eb)](N,v),'validate':this[Vu(0x28e)](I,v,z)},x),Y=(yield inquirer[Vu(0x265)]([B]))['id'];if(Y===Vu(0x1ea)||Y==='')return undefined;if(z)return parseInt(Y,0xa);return Y;});}[a8b(0x224)](V,I){const Vn=a8b,v=(I===null||I===void 0x0?void 0x0:I[Vn(0x25d)])!==Vn(0x238)?Vn(0x1fa):'Should\x20it\x20be';return this[Vn(0x1ca)](V,v,I===null||I===void 0x0?void 0x0:I['description']);}[a8b(0x254)](){return __awaiter(this,void 0x0,void 0x0,function*(){const VJ=a8I,V=I=>__awaiter(this,void 0x0,void 0x0,function*(){const Vq=a8I;var v;const j=yield this[Vq(0x236)][Vq(0x232)]['projects']({'options':{'per_page':this[Vq(0x26a)],'cursor':I}}),U=j[Vq(0x1cc)][Vq(0x203)][Vq(0x1e5)](l=>l['id']);return{'elements':U,'nextCursor':(v=j[Vq(0x1ab)])===null||v===void 0x0?void 0x0:v['cursor']};});return yield this[VJ(0x1f4)]('project',V);});}['askForProjectScopedResource'](V,I,v,j){return __awaiter(this,void 0x0,void 0x0,function*(){const VL=a8I,U=v||this['apiClient'][VL(0x200)][VL(0x1da)]();if(_[VL(0x1ed)](U))throw new Error('Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.');const l=yield I(U);return yield this[VL(0x1fd)](V,l,(j?j+VL(0x273):'')+VL(0x248)+U+'\x27');});}[a8b(0x1bb)](V,I,v,j){return __awaiter(this,void 0x0,void 0x0,function*(){const VZ=a8I,U=v||this[VZ(0x236)]['contextProvider']['getCurrentProjectName']();if(_[VZ(0x1ed)](U))throw new Error('Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.');const l=yield I(U);return yield this[VZ(0x1f4)](V,l,(j?j+'\x20in\x20':'')+VZ(0x248)+U+'\x27');});}[a8b(0x276)](){return __awaiter(this,void 0x0,void 0x0,function*(){const Vh=a8I,V=I=>__awaiter(this,void 0x0,void 0x0,function*(){const VS=a8I;var v;const j=yield this['apiClient'][VS(0x232)][VS(0x194)]({'options':{'per_page':this[VS(0x26a)],'cursor':I}});return{'elements':j['data']['domains'][VS(0x1e5)](U=>U[VS(0x1f8)]),'nextCursor':(v=j[VS(0x1ab)])===null||v===void 0x0?void 0x0:v[VS(0x286)]};});return this[Vh(0x1f4)]('domain',V);});}['askForCredentials'](){return __awaiter(this,void 0x0,void 0x0,function*(){const VF=a8I,V=I=>__awaiter(this,void 0x0,void 0x0,function*(){const VQ=a8I;var v;const j=yield this['apiClient'][VQ(0x232)][VQ(0x231)]({'options':{'per_page':this[VQ(0x26a)],'cursor':I}});return{'elements':j[VQ(0x1cc)][VQ(0x18f)][VQ(0x1e5)](U=>U['id']),'nextCursor':(v=j[VQ(0x1ab)])===null||v===void 0x0?void 0x0:v[VQ(0x286)]};});return this[VF(0x1f4)](VF(0x18f),V);});}[a8b(0x1a3)](V){const VW=a8b;this[VW(0x191)]=V;}}function a8I(V,I){const v=a8V();return a8I=function(j,U){j=j-0x18b;let l=v[j];return l;},a8I(V,I);}function a8V(){const Vy=['slice','input','password','call','EDIT','getOwnPropertyDescriptor','blueBright','No\x20containers\x20found','120yMiyMh','choice','askForService','\x20type?','array','for\x20this\x20','push','\x20and\x20it\x20','21iYiLqM','string','greenBright','addon:\x20\x27','secrets','saveFile','uri','462878buUfvR','fullName','What\x27s\x20the\x20','getQuestionString','restores','stringify','join','confirmationPrompt','job','77KYrrxG','lodash','DynamicReloadPaginationPrompt','editPayload','defineProperty','editedResult','askArrayEntry','registryCredentials','list','must\x20be\x20a\x20valid\x20non-empty\x20json\x20string','object','logSinks','apiClient','Context\x20with\x20name\x20\x27','boolean','./utils','concat','No,\x20abort','secret','ask','unshift','toString','bold','cmdPath','backups','addon','retry','getInnerType','reset','volumes','project:\x20\x27','resultCache','pagination-prompt','job\x20containers','tokenPrompt','askForTag','__importStar','isBoolean','confirm','red','\x20(startedAt:\x20','),\x20subdomain\x20(','askForProject','values','completedAt','length','services','\x20characters,\x20is\x20','chalk','registerPrompt','No\x20','type','clusters','must\x20be\x20smaller\x20than\x20or\x20equal\x20to\x20','askForClusterId','confirmation','must\x20be\x20bigger\x20than\x20or\x20equal\x20to\x20','askForLogSink','jobs','prompt','hasOwnProperty','items','nextCursor','description','defaultPaginationPageSize','REPEAT','ABORT','askForJob','get','askGeneric','blue','found','template\x20run','\x20in\x20','10xPOLkj','underline','askForDomain','template','yml','all-builds','value','askForProjectScopedResource','isObject','askForTemplate','opt','example','askForSubdomain','integer','service:\x20\x27','\x20to\x20use:','__setModuleDefault','writeFileSync','cursor','find','configurable','askForBuild','addons','askForAddon','elements','split','validate','runs','templates','json','pop','2435556IBRvPk','credentials','retrievePayloadViaInteractiveCli','pathVars','job\x20runs','WARNING:\x20You\x20are\x20about\x20to\x20delete\x20','domains','repeat','token','safeDump','service','InquirerHelper','to\x20use:','restore','No\x20builds\x20found','isValidJSON','toUpperCase','minLength','templateRuns','oneOf','properties','setPathVars','inquirer','Do\x20you\x20want\x20to\x20add','domain','writable','createdAt','\x20(full\x20domain:\x20','max','pagination','Choose\x20the\x20','__esModule','search-list','fileName','Writing\x20configuration\x20failed:\x20','set','doesn\x27t\x20match\x20pattern\x20\x27','propToType','skipValidation','grey','this\x20option\x20is\x20required,\x20please\x20answer','assign','loginPrompt','addEntry','Choose\x20the\x20login\x20token:','askForProjectScopedResourcePaginated','\x20(completedAt:\x20','containers','4939293SWJTQn','override','job:\x20\x27','minimum','Template\x20id\x20not\x20provided.','default','No,\x20edit','domain\x20(','Something\x20unexpected\x20happened.','apply','rawObject','./pagination/inquirer-pagination-prompt','getPathString','maxLength','data','tags','4244216wtaCGp','maximum','has','done','325275UkPCxG','tag','Configuration\x20file\x20written\x20to\x20','\x20Example:\x20','isNaN','success','whiteBright','9949113LIUYGn','getCurrentProjectName','then','create','anyOf','4456408WMLUPs','\x20characters','all-containers','askForAddonBackup','YES','tmpCmdPath','not\x20completed','map','Please\x20confirm\x20following\x20configuration:\x0a','builds','warning','__createBinding','don\x27t\x20change','filter','yellowBright','isUndefined','subdomainPath','pattern','getType','1KqWekt','Choose\x20the\x20name\x20of\x20the\x20new\x20local\x20context:','log\x20sink','askForResourcePaginated','SAVE','isEmpty','__awaiter','name','a\x20Northflank\x20resource','What\x20do\x20you\x20want\x20to\x20use\x20as','No,\x20repeat','isArray','askForResource','next','inquirer-search-list','contextProvider','editor','__importDefault','projects','nextPageCursor','askForSecret','Go\x20to\x20editor','safeLoad','pipelines','required'];a8V=function(){return Vy;};return a8V();}exports[a8b(0x199)]=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';const
|
|
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 a10V0=a10I;(function(V,I){const w=a10I,v=V();while(!![]){try{const j=-parseInt(w(0x225))/0x1*(parseInt(w(0x230))/0x2)+parseInt(w(0x20c))/0x3*(parseInt(w(0x254))/0x4)+parseInt(w(0x268))/0x5*(-parseInt(w(0x20b))/0x6)+-parseInt(w(0x21e))/0x7+parseInt(w(0x20e))/0x8+-parseInt(w(0x213))/0x9*(-parseInt(w(0x264))/0xa)+-parseInt(w(0x266))/0xb;if(j===I)break;else v['push'](v['shift']());}catch(U){v['push'](v['shift']());}}}(a10V,0xa2627));function a10I(V,I){const v=a10V();return a10I=function(j,U){j=j-0x1e9;let l=v[j];return l;},a10I(V,I);}var __awaiter=this&&this['__awaiter']||function(V,I,v,j){function U(l){return l instanceof v?l:new v(function(x){x(l);});}return new(v||(v=Promise))(function(l,x){const r=a10I;function N(z){const A=a10I;try{D(j[A(0x1ff)](z));}catch(B){x(B);}}function e(z){try{D(j['throw'](z));}catch(B){x(B);}}function D(z){const m=a10I;z['done']?l(z[m(0x203)]):U(z[m(0x203)])[m(0x21a)](N,e);}D((j=j['apply'](V,I||[]))[r(0x1ff)]());});},__importDefault=this&&this[a10V0(0x22e)]||function(V){const V1=a10V0;return V&&V[V1(0x25d)]?V:{'default':V};};Object[a10V0(0x1f1)](exports,'__esModule',{'value':!![]}),exports[a10V0(0x1f6)]=void 0x0;const js_client_1=require(a10V0(0x234)),chalk_1=__importDefault(require(a10V0(0x1eb))),utils_1=require(a10V0(0x26e)),inquirer_helper_1=require('../inquirer-helper'),commander_1=require(a10V0(0x261)),console_format_helpers_1=require(a10V0(0x27d)),log_formatter_1=require(a10V0(0x215));function a10V(){const Vl=['--regexNotIncludes\x20<regex>','askForProject','description','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','tail','askForService','\x0aDetails:\x20','next','yml','Error\x20while\x20tailing\x20log\x20lines:\x20','service','value','backupId','askForBuild','getLogsCommand','setSeconds','restoreId','--container\x20--containerId\x20[containerId]','forward','66frGnih','48EbvAGH','start','272648mzeKJo','name','ApiClient','printInitInfo','askForJobRun','11671173jFOAqA','choices','./log-formatter','conflicts','noDefaults','\x20for\x20all\x20containers','Get\x20logs\x20generated\x20before\x20this\x20time,\x20','then','\x20--','values','logs','350903pzsWsh','>\x20Container\x20logs','addOption','Direction\x20of\x20logs.\x20Ignored\x20when\x20tailing.','length','Project\x20for\x20logs','alias','10lJOJgX','Which\x20log\x20types\x20to\x20fetch','yaml','apiClient','getStandardLogCommand','-o,\x20--output\x20[output]','json','Deployment\x20id,\x20example:\x20my-service-54785f4','Filter\x20log\x20lines\x20to\x20not\x20match\x20this\x20regular\x20expression','__importDefault','option','73054vuuKSM','forEach','Length\x20of\x20timespan\x20in\x20seconds.\x20Only\x20valid\x20if\x20not\x20both,\x20startTime\x20and\x20endTime\x20are\x20set','--startTime\x20<timestamp>','@northflank/js-client','build-','logs-received','regexIncludes','inquirerHelper','Backup\x20to\x20get\x20logs\x20from','close','Log\x20session\x20ended','Container\x20to\x20exec\x20into\x20(logs\x20from\x20all\x20containers\x20will\x20be\x20shown\x20if\x20not\x20specified)','askForAddonRestore','--textIncludes\x20<text>','-d,\x20--direction\x20<order>','getSeconds','addon','charAt','parseDateInput','logsApiClient','toISOString','--build\x20--buildId\x20[buildId]','Get\x20log\x20for\x20the\x20specified\x20','No\x20logs\x20found\x20for\x20this\x20query.\x20Make\x20sure\x20to\x20select\x20an\x20appropriate\x20time\x20window.','getCurrentJobName','\x20for\x20container\x20','getCommand','--endTime\x20<timestamp>','textNotIncludes','job','askForJob','getCurrentProjectName','-f,\x20--tail','runId','addonRestore','33636FjIGpv','apiContext','deploymentId','backward','textIncludes','\x20seconds','tsHint','hasNextPage','stringify','__esModule','defaultDurationSeconds','serviceId','Filter\x20log\x20lines\x20to\x20match\x20this\x20regular\x20expression','commander','--run\x20--runId\x20[runId]','containerId','10UoxurE','askForContainer','3935833IhKynX','warning','12315miVLdq','default','Id]','Tail\x20will\x20stream\x20logs\x20in\x20real-time.\x20Session\x20will\x20be\x20kept\x20open.','format','addonBackup','../utils','Output\x20formatting.\x20Will\x20use\x20advanced\x20formatting\x20by\x20default.','Element\x20count\x20for\x20this\x20request\x20exceeds\x20the\x20line\x20limit,\x20output\x20was\x20truncated.\x20Cut\x20off\x20at\x20timestamp\x20','error','valueOf','cursor','argParser','regexNotIncludes',',\x20duration:\x20','getFormatter','Option','message','-l,\x20--lineLimit\x20[limit]','--restore\x20--restoreId\x20[restoreId]','\x20to\x20get\x20logs\x20from','../formatting/console-format-helpers','Error\x20while\x20fetching\x20log\x20lines:\x20','\x20of\x20','--duration\x20[duration]','LogType','chalk','Id\x20[','log',',\x20backup\x20id\x20','assign','logRange','defineProperty','--noDefaults',',\x20restore\x20id\x20','bold','--deployment\x20--deploymentId\x20[deploymentId]','CliLogs','action'];a10V=function(){return Vl;};return a10V();}class CliLogs{constructor(V){const V2=a10V0;this[V2(0x255)]=V,this[V2(0x25e)]=0x708,this[V2(0x229)]=(I,v,j,U)=>{const V3=V2,l=(0x0,utils_1[V3(0x24b)])(!![])[V3(0x20f)]((v?'build-':'')+V3(0x21d))[V3(0x224)]((v?V3(0x235):'')+V3(0x1ed))[V3(0x1fa)](V3(0x247)+I)['option']('--project\x20--projectId\x20[projectId]',V3(0x223))[V3(0x22f)]('--'+I+V3(0x21b)+I+V3(0x1ec)+I+V3(0x26a),I[V3(0x242)](0x0)['toUpperCase']()+I['slice'](0x1)+V3(0x27c))[V3(0x22f)](V3(0x209),V3(0x23c));if(v)l[V3(0x22f)](V3(0x246),'Build\x20to\x20get\x20logs\x20from');if(I===V3(0x24e))l[V3(0x22f)](V3(0x262),'Job\x20run\x20id,\x20example:\x20162b1977-6636-4000-929b-cc265b862ff0');if(I===V3(0x202))l['option'](V3(0x1f5),V3(0x22c));if(j)l[V3(0x22f)]('--backup\x20--backupId\x20[backupId]',V3(0x239));if(U)l[V3(0x22f)](V3(0x27b),'Restore\x20to\x20get\x20logs\x20from');return!v&&!j&&!U&&l[V3(0x220)](new commander_1[(V3(0x278))]('-t,\x20--types\x20<types...>',V3(0x226))[V3(0x214)](Object[V3(0x21c)](js_client_1[V3(0x1ea)]))),l[V3(0x22f)](V3(0x251),V3(0x26b))[V3(0x22f)](V3(0x27a),'Number\x20of\x20lines\x20to\x20return.')[V3(0x22f)](V3(0x233),'Get\x20logs\x20generated\x20after\x20this\x20time,\x20'+utils_1[V3(0x25a)],utils_1[V3(0x243)])[V3(0x220)](new commander_1[(V3(0x278))](V3(0x24c),V3(0x219)+utils_1[V3(0x25a)])[V3(0x274)](utils_1[V3(0x243)])['conflicts']([V3(0x1fc)]))[V3(0x22f)](V3(0x1e9),V3(0x232))[V3(0x220)](new commander_1['Option'](V3(0x23f),V3(0x221))['choices']([V3(0x257),V3(0x20a)])[V3(0x216)]([V3(0x1fc)]))[V3(0x220)](new commander_1[(V3(0x278))](V3(0x23e),'Filter\x20log\x20lines\x20to\x20include\x20this\x20text')[V3(0x216)](['textNotIncludes',V3(0x237),V3(0x275)]))[V3(0x220)](new commander_1[(V3(0x278))]('--textNotIncludes\x20<text>','Filter\x20log\x20lines\x20to\x20not\x20include\x20this\x20text')[V3(0x216)]([V3(0x258),V3(0x237),V3(0x275)]))[V3(0x220)](new commander_1['Option']('--regexIncludes\x20<regex>',V3(0x260))[V3(0x216)]([V3(0x24d),V3(0x258),V3(0x275)]))[V3(0x220)](new commander_1[(V3(0x278))](V3(0x1f8),V3(0x22d))[V3(0x216)](['textNotIncludes',V3(0x237),'textIncludes']))[V3(0x22f)](V3(0x1f2),V3(0x1fb),![])[V3(0x220)](new commander_1['Option'](V3(0x22a),V3(0x26f))[V3(0x214)](Object[V3(0x21c)]([V3(0x26c),V3(0x22b),V3(0x227)]))),l;},this[V2(0x211)]=(I,v,j,U)=>{const V4=V2,{containerName:l,restoreId:x,backupId:N,quiet:e,tail:D,startTime:z,endTime:B,duration:Y}=U;if(e===!![])return;const i=D?'\x20(exit\x20with\x20'+chalk_1[V4(0x269)][V4(0x1f4)]('\x27Ctrl+C\x27')+')':'',o=D?'\x20with\x20live-tailing':'',H=new Date(),T=z!==null&&z!==void 0x0?z:new Date(new Date((B!==null&&B!==void 0x0?B:H)[V4(0x272)]())[V4(0x207)]((B!==null&&B!==void 0x0?B:H)['getSeconds']()-(Y!==null&&Y!==void 0x0?Y:this[V4(0x25e)]))),b=(B!==null&&B!==void 0x0?B:z!==undefined)?new Date(new Date(z['valueOf']())[V4(0x207)](z[V4(0x240)]()+(Y!==null&&Y!==void 0x0?Y:this[V4(0x25e)]))):H,M=N!==undefined,X=T&&!M?',\x20from:\x20'+chalk_1[V4(0x269)][V4(0x1f4)](T[V4(0x245)]()):'',E=b&&!M?',\x20to:\x20'+chalk_1[V4(0x269)][V4(0x1f4)](b[V4(0x245)]()):'',f=Y?V4(0x276)+Y+V4(0x259):'',G=l?V4(0x24a)+chalk_1[V4(0x269)][V4(0x1f4)](l):M?'':V4(0x218),P=N?V4(0x1ee)+N:'',a=x?V4(0x1f3)+x:'',s=I+'\x20'+chalk_1[V4(0x269)][V4(0x1f4)](v)+P+a+'\x20in\x20project\x20'+chalk_1[V4(0x269)][V4(0x1f4)](j),d=''+X+E+f;console[V4(0x1ed)](V4(0x21f)+o+G+V4(0x27f)+s+d+i+':');},this[V2(0x277)]=(I,v)=>(j,U)=>{const V5=V2;if(!I){if(j[V5(0x222)]===0x0)console[V5(0x1ed)](V5(0x248));j[V5(0x231)](x=>(0x0,log_formatter_1['formatLogLine'])(x,v));}else(0x0,console_format_helpers_1['printResponse'])(I,j);(U===null||U===void 0x0?void 0x0:U[V5(0x25b)])&&(0x0,utils_1[V5(0x267)])(V5(0x270)+U[V5(0x273)]);},this[V2(0x228)]=new js_client_1[(V2(0x210))](V,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1['customUserAgent']}),this[V2(0x244)]=this[V2(0x228)],this[V2(0x238)]=new inquirer_helper_1['InquirerHelper'](this[V2(0x228)]);}[a10V0(0x206)](V,I=![],v=![],j=![]){const Vj=a10V0,U=(B,Y)=>__awaiter(this,void 0x0,void 0x0,function*(){const V6=a10I,i=Y[V6(0x217)],{apiContext:o,inquirerHelper:H}=this;switch(V){case V6(0x202):{const T=i?undefined:o['getCurrentServiceName']();return Y[V6(0x25f)]||T||(yield H[V6(0x1fd)](B)());}case V6(0x24e):{const b=i?undefined:o[V6(0x249)]();return Y['jobId']||b||(yield H[V6(0x24f)](B)());}case V6(0x241):{return Y['addonId']||(yield H['askForAddon'](B)());}}}),l=(B,Y,i)=>__awaiter(this,void 0x0,void 0x0,function*(){const V7=a10I;if(I)return i['buildId']||(yield this[V7(0x238)][V7(0x205)](B,V===V7(0x202)?Y:undefined,V===V7(0x24e)?Y:undefined,!![])());return undefined;}),x=(B,Y,i)=>__awaiter(this,void 0x0,void 0x0,function*(){const V8=a10I;if(v||j)return i[V8(0x204)]||(yield this[V8(0x238)]['askForAddonBackup'](B,Y)());return undefined;}),N=(B,Y,i,o)=>__awaiter(this,void 0x0,void 0x0,function*(){const V9=a10I;if(j)return o[V9(0x208)]||(yield this[V9(0x238)][V9(0x23d)](B,Y,i)());return undefined;}),e=(B,Y,i)=>__awaiter(this,void 0x0,void 0x0,function*(){const VV=a10I;if(!I&&i[VV(0x263)]!==undefined){if(i[VV(0x263)]!==!![])return i[VV(0x263)];return yield this[VV(0x238)][VV(0x265)](B,V===VV(0x202)?Y:undefined,V===VV(0x24e)?Y:undefined,!![])();}return undefined;}),D=(B,Y,i)=>__awaiter(this,void 0x0,void 0x0,function*(){const VI=a10I;if(V===VI(0x24e))return i[VI(0x252)]||(yield this[VI(0x238)][VI(0x212)](Y,B,!![])());return undefined;}),z=(B,Y,i)=>__awaiter(this,void 0x0,void 0x0,function*(){const Vv=a10I;if(V===Vv(0x202)){if(i['deploymentId']!==!![])return i[Vv(0x256)];return i[Vv(0x256)];}return undefined;});return this[Vj(0x229)](V,I,v,j)[Vj(0x1f7)](B=>__awaiter(this,void 0x0,void 0x0,function*(){const VU=Vj,{noDefaults:Y,projectId:i,quiet:o,tail:H,types:T,textIncludes:b,textNotIncludes:M,regexIncludes:X,regexNotIncludes:E,direction:f,lineLimit:G,startTime:P,endTime:a,duration:s,output:d}=B;(0x0,utils_1['assertContextExisting'])(this[VU(0x228)]);const {apiContext:t,inquirerHelper:R,logsApiClient:u}=this,n=Y?undefined:t[VU(0x250)](),q=i||n||(yield R[VU(0x1f9)]()),J=yield U(q,B),L=yield l(q,J,B),Z=yield x(q,J,B),S=yield N(q,J,Z,B),h=yield D(q,J,B),Q=yield z(q,J,B),F=yield e(q,J,B);if(P&&a&&s)throw new Error('Only\x20two\x20of\x20\x27startTime\x27,\x20\x27endTime\x27\x20and\x20\x27duration\x27\x20can\x20be\x20set.');const W={'projectId':q,'entityId':J},y={'containerName':F,'types':T,'textIncludes':b,'textNotIncludes':M,'regexIncludes':X,'regexNotIncludes':E,'lineLimit':G,'startTime':P,'duration':s,'runId':h,'buildId':L,'backupId':Z,'restoreId':S,'deploymentId':Q,'isBuild':I!==null&&I!==void 0x0?I:![]},p=j?VU(0x253):v?VU(0x26d):V,c=Object[VU(0x1ef)](Object[VU(0x1ef)]({},y),{'endTime':a,'direction':f});if(!o&&d!==VU(0x227)&&d!==VU(0x200)&&d!==VU(0x22b))this['printInitInfo'](V,J,q,Object[VU(0x1ef)](Object[VU(0x1ef)]({},c),B));const g=this[VU(0x277)](d,b!==null&&b!==void 0x0?b:X);if(H){const K=yield u['logs']['logTail'](W,y,p);K['on'](VU(0x236),g),K['on'](VU(0x271),C=>(0x0,utils_1['error'])(VU(0x201)+C[VU(0x279)])),K['on'](VU(0x23a),()=>console[VU(0x1ed)](VU(0x23b))),yield K[VU(0x20d)]();}else{const C=yield u[VU(0x21d)][VU(0x1f0)](W,c,p);if(C[VU(0x271)]){const k=C[VU(0x271)]['details'],O=k?VU(0x1fe)+JSON[VU(0x25c)](k,null,'\x20'):'';(0x0,utils_1['error'])(VU(0x27e)+C[VU(0x271)][VU(0x279)]+O);}else g(C['data'],C['pagination']);}}));}}exports[a10V0(0x1f6)]=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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a11p=a11I;(function(u,I){const C=a11I,a=u();while(!![]){try{const x=parseInt(C(0x102))/0x1+-parseInt(C(0x119))/0x2*(-parseInt(C(0x108))/0x3)+-parseInt(C(0xff))/0x4*(parseInt(C(0x11b))/0x5)+-parseInt(C(0x107))/0x6*(parseInt(C(0x118))/0x7)+parseInt(C(0xfc))/0x8+parseInt(C(0x10c))/0x9+-parseInt(C(0xfe))/0xa;if(x===I)break;else a['push'](a['shift']());}catch(D){a['push'](a['shift']());}}}(a11u,0xcbe6f));function a11I(u,I){const a=a11u();return a11I=function(x,D){x=x-0xfb;let K=a[x];return K;},a11I(u,I);}var __importDefault=this&&this[a11p(0x10e)]||function(u){const b=a11p;return u&&u[b(0x106)]?u:{'default':u};};Object[a11p(0x104)](exports,a11p(0x106),{'value':!![]}),exports[a11p(0x110)]=exports[a11p(0x10b)]=void 0x0;const chalk_1=__importDefault(require(a11p(0x114)));exports[a11p(0x10b)]=[{'color':a11p(0x10a),'pattern':/\[[0-9]{1,2}\/[a-z]{3}\/[0-9]{4}:[0-9]{2}:[0-9]{2}:[0-9]{2} \+[0-9]{4}\]/i},{'color':a11p(0x10a),'pattern':/[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(.[0-9]+)?Z/i},{'color':'grey','pattern':/[0-9]{4}\/[0-9]{2}\/[0-9]{2}/i},{'color':'grey','pattern':/\s\b([0-9]{2}:){1,2}[0-9]{2}\b\s/i},{'color':a11p(0x11c),'pattern':new RegExp(a11p(0x100),'i')},{'color':'green','pattern':/(?:\d{1,3}\.){3}\d{1,3}/i},{'color':a11p(0x111),'pattern':/(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))/},{'color':a11p(0x105),'pattern':/\b(GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH)\b/},{'color':a11p(0x101),'pattern':/\b(successful|success|completed|complete|done)\b/i},{'color':a11p(0x11d),'pattern':/\b(failed|fail|stderr|error|err)\b/i},{'color':'gray','pattern':/\b(information|info|debug)\b/i},{'color':a11p(0x115),'pattern':/\b(warning|warn)\b/i},{'color':a11p(0x105),'pattern':/[0-9a-f]{64}/i},{'color':a11p(0x105),'pattern':/[0-9a-fA-F]{8}[-]?([0-9a-fA-F]{4}[-]?){3}[0-9a-fA-F]{12}/i}];const formatLogLine=(u,I)=>{const i=a11p,a=chalk_1[i(0xfb)][i(0x117)](u['ts'][i(0x112)]()),x=chalk_1[i(0xfb)][i(0x116)](u[i(0x11a)]),D=exports[i(0x10b)][i(0xfd)]((z,H)=>{const j=i;return z[j(0x103)](H[j(0x109)],s=>H[j(0x10f)]?chalk_1[j(0xfb)][H['color']](s):chalk_1[j(0xfb)][j(0x10a)](s));},u['log']),K=I?D[i(0x103)](new RegExp(I,'g'),z=>chalk_1[i(0xfb)][i(0x11c)](z)):D;console[i(0x10d)](a+'\x20'+x+i(0x113)+K);};exports['formatLogLine']=formatLogLine;function a11u(){const A=['18KWSdXR','containerId','8395Fsuaap','bold','red','default','9807192zxPrAo','reduce','11846060UIzhAm','2324eIwewi','s\x08(?!mailto:)(?:(?:http|https|ftp)://)(?:\x5cS+(?::\x5cS*)?@)?(?:(?:(?:[1-9]\x5cd?|1\x5cd\x5cd|2[01]\x5cd|22[0-3])(?:\x5c.(?:1?\x5cd{1,2}|2[0-4]\x5cd|25[0-5])){2}(?:\x5c.(?:[0-9]\x5cd?|1\x5cd\x5cd|2[0-4]\x5cd|25[0-4]))|(?:(?:[a-z\x5cu00a1-\x5cuffff0-9]+-?)*[a-z\x5cu00a1-\x5cuffff0-9]+)(?:\x5c.(?:[a-z\x5cu00a1-\x5cuffff0-9]+-?)*[a-z\x5cu00a1-\x5cuffff0-9]+)*(?:\x5c.(?:[a-z\x5cu00a1-\x5cuffff]{2,})))|localhost)(?::\x5cd{2,5})?(?:(/|\x5c?|#)[^\x5cs]*)?\x08s','greenBright','778446nJWwhc','replace','defineProperty','blue','__esModule','18ADNtws','35961kSJsMm','pattern','grey','defaultLogSyntax','7997139OhPCxi','log','__importDefault','color','formatLogLine','green','toISOString','\x20--\x20','chalk','yellow','cyan','dim','12859lNBpUH'];a11u=function(){return A;};return a11u();}
|