@northflank/cli 0.9.26 → 0.10.1
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 +2 -2
- package/dist/context/contextCommands.js +1 -1
- package/dist/copy/index.js +1 -0
- package/dist/defaults.js +1 -1
- package/dist/exec/index.js +1 -1
- package/dist/formatting/command-overview.js +1 -1
- package/dist/formatting/console-format-helpers.js +1 -1
- package/dist/formatting/terminal-chart.js +1 -1
- package/dist/inquirer-helper.js +1 -1
- package/dist/login/browser-login.js +1 -1
- package/dist/logs/index.js +1 -1
- package/dist/logs/log-formatter.js +1 -1
- package/dist/metrics/index.js +1 -1
- package/dist/pagination/inquirer-pagination-prompt.js +1 -1
- package/dist/port-forward/index.js +1 -1
- package/dist/utils.js +1 -1
- package/package.json +16 -4
package/dist/exec/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a5I=a5E;(function(c,E){const A=a5E,S=c();while(!![]){try{const X=-parseInt(A(0x1a7))/0x1*(-parseInt(A(0x1cd))/0x2)+parseInt(A(0x1e9))/0x3*(-parseInt(A(0x1a3))/0x4)+parseInt(A(0x1df))/0x5+-parseInt(A(0x1e0))/0x6*(parseInt(A(0x1f0))/0x7)+-parseInt(A(0x1f3))/0x8*(-parseInt(A(0x203))/0x9)+parseInt(A(0x1f2))/0xa+-parseInt(A(0x20d))/0xb*(parseInt(A(0x1d9))/0xc);if(X===E)break;else S['push'](S['shift']());}catch(u){S['push'](S['shift']());}}}(a5c,0x6d204));function a5E(c,E){const S=a5c();return a5E=function(X,u){X=X-0x1a2;let Y=S[X];return Y;},a5E(c,E);}var __awaiter=this&&this[a5I(0x1c3)]||function(c,E,S,X){function u(Y){return Y instanceof S?Y:new S(function(R){R(Y);});}return new(S||(S=Promise))(function(Y,R){const N=a5E;function d(p){const T=a5E;try{U(X[T(0x1cb)](p));}catch(q){R(q);}}function w(p){const M=a5E;try{U(X[M(0x1fa)](p));}catch(q){R(q);}}function U(p){const m=a5E;p[m(0x1af)]?Y(p[m(0x1d6)]):u(p[m(0x1d6)])[m(0x1ef)](d,w);}U((X=X[N(0x1b7)](c,E||[]))[N(0x1cb)]());});},__importDefault=this&&this['__importDefault']||function(c){const z=a5I;return c&&c[z(0x205)]?c:{'default':c};};Object[a5I(0x202)](exports,a5I(0x205),{'value':!![]}),exports[a5I(0x214)]=void 0x0;const js_client_1=require(a5I(0x207)),chalk_1=__importDefault(require(a5I(0x1ff))),utils_1=require(a5I(0x1b9)),inquirer_helper_1=require(a5I(0x20c));class CliExec{constructor(c,E){const J=a5I;this['getStandardExecCommand']=Y=>(0x0,utils_1['getCommand'])(!![])[J(0x217)](Y)[J(0x1ad)](J(0x20a)+Y+'.\x0aExamples:\x0a\x20\x20Shell\x20session:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20northflank\x20exec\x20'+Y+J(0x20e)+Y+J(0x209)+Y+J(0x1ed)+Y+J(0x1a6))[J(0x1f8)]('--project\x20--projectId\x20[NAME]',J(0x1d7))['option']('--'+Y+'\x20--'+Y+J(0x1dd),Y[J(0x1dc)](0x0)[J(0x1d1)]()+Y['slice'](0x1)+'\x20to\x20exec\x20into')[J(0x1f8)](J(0x1fb),J(0x1ab))['option'](J(0x1c0),J(0x1bc))[J(0x1f8)](J(0x1a8),J(0x1c7))[J(0x1f8)](J(0x1e3),J(0x1aa))['option'](J(0x1ca),J(0x201),![])[J(0x1f8)](J(0x1e8),J(0x1e2)),this[J(0x208)]=()=>({'columns':process[J(0x20f)]['columns'],'rows':process[J(0x20f)][J(0x1f7)]}),this[J(0x1f4)]=(Y,R,d,w,P,U,p,q)=>{const O=J;if(q===!![])return;const B=w===O(0x1f6),V=B?'without\x20shell':w===undefined?'with\x20shell\x20session':'shell\x20command\x20'+chalk_1[O(0x1cc)]['greenBright'](w),g=P!==undefined?O(0x1c6)+P:'',r=U!==undefined?O(0x1a5)+U:'',H=p!==undefined?O(0x1b0)+chalk_1['default']['greenBright'](p)+'\x27':'',f=[H,V,g,r][O(0x1bd)](K=>K!=='')['join']('\x20'),Z=O(0x1a2)+chalk_1[O(0x1cc)][O(0x1d3)](O(0x1b2))+')';console[O(0x1ee)](O(0x1e1)+Y+'\x20'+chalk_1['default'][O(0x1d3)](R)+O(0x1fe)+chalk_1[O(0x1cc)][O(0x1d3)](d)+'\x20'+f+'\x20'+Z);},this[J(0x1bb)]=(Y,R,d=![])=>__awaiter(this,void 0x0,void 0x0,function*(){const C=J;var w,P;let U=![];try{if(process[C(0x216)][C(0x210)]){const q=require(C(0x1f5));q[C(0x1d5)](process[C(0x216)]),process[C(0x216)]['setRawMode'](!![]),process[C(0x20f)]['on'](C(0x1b1),()=>{const k=C;Y[k(0x1eb)](this[k(0x208)]());}),process[C(0x216)]['on'](C(0x1c2),(B,V)=>{const o=C;V[o(0x213)]==='\x04'&&(U?(process[o(0x216)][o(0x1b5)](![]),(0x0,utils_1['warning'])(o(0x1c8)),process[o(0x1d0)]()):(U=!![],setTimeout(()=>U=![],0x190)));});}process[C(0x216)]['pipe'](Y['stdIn']),Y[C(0x1c4)][C(0x1d8)](process[C(0x1fd)]),Y[C(0x1cf)][C(0x1d8)](process[C(0x20f)]),Y['on']('error',B=>{const y=C;var V;(0x0,utils_1[y(0x1a9)])(y(0x1e7)+R+y(0x215)+((V=B[y(0x1db)])!==null&&V!==void 0x0?V:B)),process[y(0x216)][y(0x210)]&&process[y(0x216)][y(0x1b5)](![]),process[y(0x1d0)](-0x1);});const p=yield Y[C(0x204)]();if(d!==!![]){const B=(w=p===null||p===void 0x0?void 0x0:p[C(0x1c9)])!==null&&w!==void 0x0?w:C(0x1ec),V=(P=p===null||p===void 0x0?void 0x0:p[C(0x1c1)])!==null&&P!==void 0x0?P:-0x1,g=(p===null||p===void 0x0?void 0x0:p[C(0x1db)])?C(0x206)+p['message']:'';B==='Success'?(0x0,utils_1['success'])(C(0x1b3)+V):(0x0,utils_1[C(0x1b8)])(C(0x1ea)+B+C(0x1b6)+V+g);}return p;}finally{process['stdin'][C(0x210)]&&process['stdin'][C(0x1b5)](![]);}}),this[J(0x1b4)]=new js_client_1[(J(0x1de))](c,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[J(0x1fc)],'agent':E});const S=new inquirer_helper_1[(J(0x1a4))](this[J(0x1b4)]);this[J(0x1f9)]=(0x0,utils_1[J(0x1e6)])()['name'](J(0x1ce))[J(0x1c5)]('exec')[J(0x1ad)](J(0x20b));const X=this[J(0x1da)](J(0x1ba))[J(0x1d4)](Y=>__awaiter(this,void 0x0,void 0x0,function*(){const e=J,{noDefaults:R,projectId:d,serviceId:w,containerId:P,shellCmd:U,user:p,group:q,command:B,quiet:V}=Y;(0x0,utils_1[e(0x1bf)])(this['apiClient']);try{const g=R?undefined:c[e(0x1ac)](),r=d||g||(yield S[e(0x1be)]()),H=R?undefined:c['getCurrentServiceName'](),f=w||H||(yield S[e(0x211)](r)()),Z=U!==null&&U!==void 0x0?U:B!==undefined?e(0x1f6):undefined;this[e(0x1f4)](e(0x1ba),f,r,Z,p,q,B,V);const K=process['stdout'][e(0x212)],t=process[e(0x20f)]['rows'],G={'projectId':r,'serviceId':f},b=yield this['apiClient']['exec'][e(0x200)](G,{'containerName':P,'command':B,'shell':Z,'user':p,'group':q,'ttyColumns':K,'ttyRows':t});yield this[e(0x1bb)](b,'service',V);}catch(l){(0x0,utils_1[e(0x1a9)])(''+l[e(0x1db)]);}finally{process[e(0x1d0)]();}})),u=this[J(0x1da)](J(0x1e4))['action'](Y=>__awaiter(this,void 0x0,void 0x0,function*(){const D=J,{projectId:R,jobId:d,containerId:w,noDefaults:P,shellCmd:U,user:p,group:q,command:B,quiet:V}=Y;(0x0,utils_1['assertContextExisting'])(this['apiClient']);try{const g=P?undefined:c[D(0x1ac)](),r=R||g||(yield S['askForProject']()),H=d||(yield S[D(0x1e5)](r)());this[D(0x1f4)](D(0x1e4),H,r,U,V);const {rows:f,columns:Z}=this[D(0x208)](),K={'projectId':r,'jobId':H},t=yield this[D(0x1b4)][D(0x1d2)][D(0x1f1)](K,{'containerName':w,'command':B,'shell':U,'user':p,'group':q,'ttyColumns':Z,'ttyRows':f});yield this[D(0x1bb)](t,'job',V);}catch(G){(0x0,utils_1[D(0x1a9)])(''+G[D(0x1db)]);}finally{process[D(0x1d0)]();}}));this[J(0x1f9)]['addCommand'](X),this[J(0x1f9)][J(0x1ae)](u);}}exports[a5I(0x214)]=CliExec;function a5c(){const x=['sequence','CliExec','\x20command\x20exec:\x20','stdin','name','(exit\x20with\x20two\x20quick\x20','19256EiIRQI','InquirerHelper','with\x20group:','\x20--shell-cmd\x20\x27sh\x27','2BiPclV','--user\x20[USER]','error','Run\x20command\x20with\x20this\x20group','Container\x20to\x20exec\x20into\x20(random\x20container\x20will\x20be\x20chosen\x20if\x20not\x20specified)','getCurrentProjectName','description','addCommand','done','with\x20command\x20\x27','resize','\x27Ctrl+D\x27','Command\x20completed\x20successfully,\x20exit\x20code:\x20','apiClient','setRawMode',',\x20exit\x20code:\x20','apply','warning','../utils','service','handleShellSession','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.','filter','askForProject','assertContextExisting','--shell-cmd\x20[SHELL-CMD]','exitCode','keypress','__awaiter','stdErr','alias','with\x20user:','Run\x20command\x20with\x20this\x20user','Received\x20Ctrl+D\x20twice,\x20exiting\x20shell\x20forcefully.','status','--noDefaults','next','default','278724veackZ','command-exec','stdOut','exit','toUpperCase','exec','bold','action','emitKeypressEvents','value','Project\x20for\x20exec','pipe','192468xdFFLm','getStandardExecCommand','message','charAt','Id\x20[NAME]','ApiClient','4102245YnmNhk','150kIbxlj','Exec\x20','Command\x20to\x20execute.\x0aIf\x20--shell-cmd\x20option\x20such\x20as\x20\x27bash\x20-c\x27\x20is\x20present,\x20it\x20will\x20run\x20in\x20the\x20specified\x20shell.\x20Otherwise\x20the\x20command\x20will\x20run\x20without\x20a\x20shell.\x20If\x20no\x20command\x20is\x20provided,\x20an\x20interactive\x20session\x20with\x20stdin\x20and\x20tty\x20is\x20opened.','--group\x20[GROUP]','job','askForJob','getCommand','Error\x20occured\x20during\x20','--cmd\x20--command\x20[COMMAND]','471fSBXou','Command\x20didn\x27t\x20complete\x20successfully,\x20status:\x20','resizeTerminal','Unknown','\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','log','then','33873pBloEY','execJobSession','8858270vJtBbA','839024qdHgWQ','execStartLog','readline','none','rows','option','execCmd','throw','--container\x20--containerId\x20[NAME]','customUserAgent','stderr','\x20in\x20project\x20','chalk','execServiceSession','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','defineProperty','63lYeVbt','waitForCommandResult','__esModule',',\x20details:\x20','@northflank/js-client','getTerminalSize','\x20--cmd\x20\x27date\x27\x0a\x20\x20Single\x20command,\x20custom\x20shell:\x20northflank\x20exec\x20','Command\x20exec\x20for\x20the\x20specified\x20','Command\x20execution\x20(exec)\x20for\x20Northflank\x20services\x20and\x20jobs.','../inquirer-helper','957DawkiR','\x0a\x20\x20Single\x20command,\x20no\x20shell:\x20\x20\x20\x20\x20northflank\x20exec\x20','stdout','isTTY','askForService','columns'];a5c=function(){return x;};return a5c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a6T=a6E;(function(c,E){const t=a6E,S=c();while(!![]){try{const X=parseInt(t(0x1aa))/0x1+-parseInt(t(0x1ad))/0x2*(parseInt(t(0x1c3))/0x3)+parseInt(t(0x1b8))/0x4+-parseInt(t(0x1c5))/0x5*(parseInt(t(0x1ac))/0x6)+-parseInt(t(0x1bc))/0x7*(parseInt(t(0x1a1))/0x8)+-parseInt(t(0x1c6))/0x9+parseInt(t(0x1b4))/0xa*(-parseInt(t(0x1a9))/0xb);if(X===E)break;else S['push'](S['shift']());}catch(u){S['push'](S['shift']());}}}(a6c,0x3fe84));var __awaiter=this&&this['__awaiter']||function(c,E,S,X){function u(Y){return Y instanceof S?Y:new S(function(R){R(Y);});}return new(S||(S=Promise))(function(Y,R){const A=a6E;function d(p){const G=a6E;try{U(X[G(0x1bf)](p));}catch(q){R(q);}}function w(p){const b=a6E;try{U(X[b(0x1b0)](p));}catch(q){R(q);}}function U(p){const l=a6E;p[l(0x1bd)]?Y(p[l(0x1a6)]):u(p['value'])[l(0x1b6)](d,w);}U((X=X[A(0x1af)](c,E||[]))[A(0x1bf)]());});},__importDefault=this&&this['__importDefault']||function(c){const I=a6E;return c&&c[I(0x1a7)]?c:{'default':c};};Object[a6T(0x1b1)](exports,a6T(0x1a7),{'value':!![]}),exports[a6T(0x1ab)]=void 0x0;function a6E(c,E){const S=a6c();return a6E=function(X,u){X=X-0x1a1;let Y=S[X];return Y;},a6E(c,E);}const chalk_1=__importDefault(require('chalk')),utils_1=require(a6T(0x1c1));function getCommandOverview(c){const M=a6T;return(0x0,utils_1[M(0x1a5)])()[M(0x1b7)](M(0x1c0))['description'](M(0x1b9))[M(0x1b2)](M(0x1c7),M(0x1a4))[M(0x1b3)](E=>__awaiter(this,void 0x0,void 0x0,function*(){const {verbose:S}=E;function X(u,Y){const m=a6E;var R;const d=(f,Z=!![])=>Z?chalk_1[m(0x1a2)]['bold'][m(0x1a8)](f[m(0x1b7)]()):f[m(0x1b7)](),w=Y[m(0x1ba)]===0x0,P=u[m(0x1c8)];let U='';const p=P[m(0x1ba)]===0x0,q=p||((R=Object[m(0x1ae)](u===null||u===void 0x0?void 0x0:u[m(0x1c4)]()))===null||R===void 0x0?void 0x0:R[m(0x1ba)])>0x0;!w&&(U=P&&!p?'┬\x20':'─\x20');const B=S&&q&&u[m(0x1c9)]()?':\x20'+u[m(0x1c9)]():'';console[m(0x1c2)](''+Y+U+d(u,q)+B);let V=Y;if(!w){const f=Y['slice'](-0x2)==='└─';V=Y['slice'](0x0,-0x2)+(f?'\x20\x20':'│\x20');}const g=V+'├─',r=V+'└─',H=P[m(0x1bb)](Z=>Z[m(0x1c8)][m(0x1ba)]===0x0);H&&!p&&!S?console[m(0x1c2)](r+'\x20'+P[m(0x1a3)](Z=>d(Z))[m(0x1be)](',\x20')):P[m(0x1b5)]((Z,K)=>{const N=m;X(Z,P[N(0x1ba)]-0x1===K?r:g);});}X(c,'');}));}function a6c(){const z=['getCommand','value','__esModule','green','11eXVfGh','417520JCPIFf','getCommandOverview','180HVpPDr','766gYXEZA','keys','apply','throw','defineProperty','option','action','502010reYKON','forEach','then','name','1759048KgqsgH','Prints\x20a\x20tree\x20view\x20of\x20all\x20available\x20commands','length','every','7MCeHTQ','done','join','next','command-overview','../utils','log','333jsLMeM','opts','22030YPkTft','1538883MmEgyF','--verbose','commands','description','1597096NTkanl','default','map','Print\x20command\x20descriptions'];a6c=function(){return z;};return a6c();}exports[a6T(0x1ab)]=getCommandOverview;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a7g=a7E;(function(c,E){const V=a7E,S=c();while(!![]){try{const X=-parseInt(V(0x72))/0x1*(-parseInt(V(0xa1))/0x2)+parseInt(V(0xa8))/0x3+-parseInt(V(0x6e))/0x4+-parseInt(V(0x6c))/0x5*(parseInt(V(0x9a))/0x6)+-parseInt(V(0x76))/0x7*(-parseInt(V(0x7a))/0x8)+-parseInt(V(0x8e))/0x9+parseInt(V(0x7f))/0xa*(parseInt(V(0x94))/0xb);if(X===E)break;else S['push'](S['shift']());}catch(u){S['push'](S['shift']());}}}(a7c,0xa0a8b));var __createBinding=this&&this[a7g(0x86)]||(Object[a7g(0x79)]?function(c,E,S,X){const r=a7g;if(X===undefined)X=S;var u=Object['getOwnPropertyDescriptor'](E,S);(!u||(r(0x81)in u?!E[r(0x75)]:u[r(0x73)]||u[r(0x69)]))&&(u={'enumerable':!![],'get':function(){return E[S];}}),Object[r(0x96)](c,X,u);}:function(c,E,S,X){if(X===undefined)X=S;c[X]=E[S];}),__setModuleDefault=this&&this[a7g(0xa2)]||(Object[a7g(0x79)]?function(c,E){const H=a7g;Object[H(0x96)](c,'default',{'enumerable':!![],'value':E});}:function(c,E){c['default']=E;}),__importStar=this&&this['__importStar']||function(c){const f=a7g;if(c&&c[f(0x75)])return c;var E={};if(c!=null){for(var S in c)if(S!=='default'&&Object['prototype'][f(0x74)][f(0x7e)](c,S))__createBinding(E,c,S);}return __setModuleDefault(E,c),E;},__importDefault=this&&this[a7g(0x80)]||function(c){const Z=a7g;return c&&c[Z(0x75)]?c:{'default':c};};Object[a7g(0x96)](exports,a7g(0x75),{'value':!![]}),exports['printResponse']=exports[a7g(0x87)]=exports[a7g(0x6b)]=exports[a7g(0x8a)]=exports[a7g(0x77)]=exports['printAsTable']=void 0x0;const chalk_1=__importDefault(require(a7g(0x99))),_=__importStar(require(a7g(0x88))),util=__importStar(require(a7g(0x98))),yaml=require(a7g(0x7b)),columnify=require(a7g(0x8f));function a7E(c,E){const S=a7c();return a7E=function(X,u){X=X-0x68;let Y=S[X];return Y;},a7E(c,E);}function printAsTable(c,E,S,X=![],u=0x0){const K=a7g;!X&&console[K(0x95)](''+chalk_1[K(0xa6)]['bold'](E));function Y(d){return d==='disabled'?d:d['replace']('disabled','');}function R(d,w){const G=K;function P(p){const t=a7E,q=new Date(p);return q[t(0x9c)]()+'/'+q['getMonth']()+'/'+q[t(0x9b)]()+'\x0a'+q[t(0x82)]()+':'+q[t(0x9f)]()+':'+q['getSeconds']();}const U=[G(0x85),G(0x6d)];if(U[G(0xa5)](w['toLowerCase']())&&_[G(0x70)](d)&&d[G(0x89)]()['length']===0xd)return P(Number(d));if(_[G(0x9d)](d)){if(w!==G(0x8b)&&w[G(0xa5)]('disabled'))return d?'x':'✔';return d?'✔':'x';}if(_['isObjectLike'](d))return util[G(0x6a)](d,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});return d;}if(_[K(0x84)](c)){c['length']===0x0&&console[K(0x95)](K(0x91)+E['toLowerCase']()+K(0x78));const d=c['map']((U,p)=>{const b=K,q={'i':p+u};return Object['keys'](U)[b(0x9e)](B=>{const l=b;(_[l(0x8d)](S)||S['includes'](B[l(0x6f)]()))&&_[l(0xa3)](q,Y(B),R(U[B],B));}),q;}),w=_[K(0x92)](Object['keys']((d===null||d===void 0x0?void 0x0:d[0x0])||[]))[K(0xa4)]((U,p)=>{const A=K,q=B=>B!=='i'?B!==A(0x83)?0x0:0x1:0x2;return q(p)-q(U);}),P={'maxWidth':0x1e,'preserveNewLines':!![],'showHeaders':!X,'config':{'_id':{'maxWidth':0x5,'truncate':!![]},'i':{'showHeaders':![]}},'columns':w};console[K(0x95)](columnify(d,P));}else console[K(0x95)](c);}exports[a7g(0x7c)]=printAsTable;function consoleFormat(c,E){const I=a7g;if(_[I(0xa0)](c)){const S=E?'\x20(HTTP\x20status:\x20'+E+')':'';return chalk_1[I(0xa6)][I(0x97)]('The\x20request\x20was\x20completed\x20successfully')+S;}if(!_[I(0xa7)](c))return c===null||c===void 0x0?void 0x0:c[I(0x89)]();return util[I(0x6a)](c,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});}exports['consoleFormat']=consoleFormat;const handleJsonOutput=(c,E)=>{const T=a7g,S=c===T(0x7d);if(S)console['log'](JSON[T(0x8c)](E,null,'\x20'));};exports[a7g(0x8a)]=handleJsonOutput;const handleYamlOutput=(c,E)=>{const M=a7g,S=c===M(0x71)||c==='yml';if(S)console[M(0x95)](yaml[M(0x90)](E));};exports[a7g(0x6b)]=handleYamlOutput;const handleFormattedOutput=(c,E)=>{const m=a7g,S=c===m(0x93);if(S)console[m(0x95)](consoleFormat(E));};exports['handleFormattedOutput']=handleFormattedOutput;const printResponse=(c,E)=>{const N=a7g;(0x0,exports[N(0x8a)])(c,E),(0x0,exports['handleYamlOutput'])(c,E),(0x0,exports[N(0x87)])(c,E);};exports[a7g(0x68)]=printResponse;function a7c(){const z=['__importDefault','get','getHours','internalId','isArrayLike','createdat','__createBinding','handleFormattedOutput','lodash','toString','handleJsonOutput','disabled','stringify','isUndefined','3430980xQhKSX','columnify','safeDump','No\x20','clone','format','187WleAOy','log','defineProperty','green','util','chalk','6nsDKtD','getFullYear','getDate','isBoolean','forEach','getMinutes','isEmpty','8GLXfwy','__setModuleDefault','set','sort','includes','default','isObjectLike','3213384GdcQoC','printResponse','configurable','inspect','handleYamlOutput','5769140klPvNM','updatedat','667268KZZOqC','toLowerCase','isFinite','yaml','169751tklMzP','writable','hasOwnProperty','__esModule','580853MjLEZT','consoleFormat','\x20found','create','8uxDcyU','js-yaml','printAsTable','json','call','309890kvjcor'];a7c=function(){return z;};return a7c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a8F=a8E;(function(c,E){const W=a8E,S=c();while(!![]){try{const X=-parseInt(W(0x13f))/0x1*(-parseInt(W(0x149))/0x2)+parseInt(W(0x13b))/0x3+parseInt(W(0x14a))/0x4+-parseInt(W(0x152))/0x5+-parseInt(W(0x153))/0x6+parseInt(W(0x147))/0x7*(parseInt(W(0x156))/0x8)+-parseInt(W(0x12f))/0x9;if(X===E)break;else S['push'](S['shift']());}catch(u){S['push'](S['shift']());}}}(a8c,0x36803));function a8c(){const c4=['max','default','push','1607598EnFeJD','green','grey','slice','symbols','offset','blue','floor','defineProperty','abs','downSampleData','2-digit','1254684RlTtEE','format','__esModule','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','1qDsdOx','round','toLocaleDateString','map','__importDefault','padding','h24','repeat','7bhgJYN','length','48846xFebxl','517544eqENCk','colors','height','join','getAsciiChart','toLocaleTimeString','toFixed','red','492655EJqSjx','2583600PxDpIb','unit','undefined','2871608KdMpxk','min'];a8c=function(){return c4;};return a8c();}var __importDefault=this&&this[a8F(0x143)]||function(c){const i=a8F;return c&&c[i(0x13d)]?c:{'default':c};};Object[a8F(0x137)](exports,a8F(0x13d),{'value':!![]}),exports[a8F(0x139)]=exports[a8F(0x14e)]=void 0x0;function a8E(c,E){const S=a8c();return a8E=function(X,u){X=X-0x12b;let Y=S[X];return Y;},a8E(c,E);}const chalk_1=__importDefault(require('chalk')),colored=(c,E)=>{const v=a8F;return E===undefined?c:chalk_1[v(0x12d)][E](c);},getAsciiChart=(c,E={})=>{const c0=a8F,S=Array['isArray'](c[0x0])?c:[c];let X=typeof E[c0(0x12b)]!==c0(0x155)?E['min']:S[0x0][0x0],u=typeof E['max']!==c0(0x155)?E[c0(0x12c)]:S[0x0][0x0];for(let t=0x0;t<S[c0(0x148)];t++){for(let G=0x0;G<S[t][c0(0x148)];G++){X=Math['min'](X,S[t][G]),u=Math[c0(0x12c)](u,S[t][G]);}}let Y=['┼','┤','╶','╴','─','╰','╭','╮','╯','│'],R=Math[c0(0x138)](u-X),d=typeof E[c0(0x134)]!==c0(0x155)?E[c0(0x134)]:0x3,w=typeof E[c0(0x144)]!==c0(0x155)?E[c0(0x144)]:c0(0x13e),P=typeof E['height']!==c0(0x155)?E[c0(0x14c)]:R,U=typeof E['colors']!==c0(0x155)?E[c0(0x14b)]:[c0(0x135),c0(0x151),c0(0x130),c0(0x131),'black'],p=R!==0x0?P/R:0x1,q=Math[c0(0x140)](X*p),B=Math[c0(0x140)](u*p),V=Math[c0(0x138)](B-q),g=0x0;for(let b=0x0;b<S[c0(0x148)];b++){g=Math['max'](g,S[b][c0(0x148)]);}g=g+d;let r=typeof E[c0(0x133)]!==c0(0x155)?E[c0(0x133)]:Y,H=E[c0(0x13c)]!==undefined?E[c0(0x13c)]:function(l){const c1=c0;return(w+l[c1(0x150)](0x2)+E[c1(0x154)])[c1(0x132)](-w[c1(0x148)]);},f=new Array(V+0x1);for(let l=0x0;l<=V;l++){f[l]=new Array(g);for(let A=0x0;A<g;A++){f[l][A]='\x20';}}for(let I=q;I<=B;++I){const T=H(V>0x0?u-(I-q)*R/V:I,I-q);f[I-q][Math['max'](d-T[c0(0x148)],0x0)]=T,f[I-q][d-0x1]=I==0x0?r[0x0]:r[0x1];}for(let M=0x0;M<S[c0(0x148)];M++){let m=U[M%U['length']],N=Math[c0(0x140)](S[M][0x0]*p)-q;f[V-N][d-0x1]=colored(r[0x0],m);for(let z=0x0;z<S[M][c0(0x148)]-0x1;z++){let J=Math[c0(0x140)](S[M][z+0x0]*p)-q,O=Math['round'](S[M][z+0x1]*p)-q;if(J==O)f[V-J][z+d]=colored(r[0x4],m);else{f[V-O][z+d]=colored(J>O?r[0x5]:r[0x6],m),f[V-J][z+d]=colored(J>O?r[0x7]:r[0x8],m);let C=Math[c0(0x12b)](J,O),k=Math[c0(0x12c)](J,O);for(let o=C+0x1;o<k;o++){f[V-o][z+d]=colored(r[0x9],m);}}}}const {startTs:Z,endTs:K}=E;if(Z||K){const e=a=>{const c2=c0;if(!a)return'\x20\x20\x20';const Q=a[c2(0x141)](undefined,{'day':c2(0x13a),'month':c2(0x13a),'year':'2-digit'}),L=a[c2(0x14f)](undefined,{'hourCycle':c2(0x145)});return Q+'\x20'+L;},D=e(K),h=e(Z),n=w[c0(0x132)](0x0,Math[c0(0x12c)](0x2,w[c0(0x148)]-h['length']/0x2+0x1)),s='\x20'[c0(0x146)](Math[c0(0x12c)](g-(w[c0(0x148)]+D['length']/0x2),0x1));f['push']([''+n+h+s+D]),f[c0(0x12e)]([]);}return f[c0(0x142)](a=>a[c0(0x14d)](''))[c0(0x14d)]('\x0a');};exports[a8F(0x14e)]=getAsciiChart;const downSampleData=(c,E)=>{const c3=a8F,S=c['length'];if(E>=S||E===0x0)return c;const X=[];let u=0x0;const Y=(S-0x2)/(E-0x2);let R=0x0,d,w,P,U;X[u++]=c[R];for(var p=0x0;p<E-0x2;p++){let H=0x0,f=0x0,Z=Math[c3(0x136)]((p+0x1)*Y)+0x1,K=Math[c3(0x136)]((p+0x2)*Y)+0x1;K=K<S?K:S;var q=K-Z;for(;Z<K;Z++){H+=c[Z][0x0],f+=c[Z][0x1];}H/=q,f/=q;var B=Math[c3(0x136)](p*Y)+0x1,V=Math['floor']((p+0x1)*Y)+0x1,g=c[R][0x0],r=c[R][0x1];w=P=-0x1;for(;B<V;B++){P=Math[c3(0x138)]((g-H)*(c[B][0x1]-r)-(g-c[B][0x0])*(f-r))*0.5,P>w&&(w=P,d=c[B],U=B);}X[u++]=d,R=U;}return X[u++]=c[S-0x1],X;};exports['downSampleData']=downSampleData;
|
package/dist/inquirer-helper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a8a=a8v;(function(T,v){const Y=a8v,W=T();while(!![]){try{const l=parseInt(Y(0x21b))/0x1+-parseInt(Y(0x1c2))/0x2*(-parseInt(Y(0x224))/0x3)+parseInt(Y(0x223))/0x4*(-parseInt(Y(0x1e7))/0x5)+-parseInt(Y(0x211))/0x6*(-parseInt(Y(0x22e))/0x7)+-parseInt(Y(0x2b4))/0x8+-parseInt(Y(0x1d5))/0x9+parseInt(Y(0x246))/0xa;if(l===v)break;else W['push'](W['shift']());}catch(N){W['push'](W['shift']());}}}(a8T,0x688b3));function a8v(T,v){const W=a8T();return a8v=function(l,N){l=l-0x1a6;let y=W[l];return y;},a8v(T,v);}var __createBinding=this&&this[a8a(0x238)]||(Object[a8a(0x2b5)]?function(T,v,W,l){const G=a8a;if(l===undefined)l=W;var N=Object[G(0x242)](v,W);(!N||(G(0x1be)in N?!v['__esModule']:N[G(0x1ab)]||N['configurable']))&&(N={'enumerable':!![],'get':function(){return v[W];}}),Object[G(0x269)](T,l,N);}:function(T,v,W,l){if(l===undefined)l=W;T[l]=v[W];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a8a(0x2b5)]?function(T,W){const H=a8a;Object[H(0x269)](T,H(0x1c1),{'enumerable':!![],'value':W});}:function(T,W){T['default']=W;}),__importStar=this&&this[a8a(0x247)]||function(T){const A=a8a;if(T&&T['__esModule'])return T;var v={};if(T!=null){for(var W in T)if(W!==A(0x1c1)&&Object[A(0x213)][A(0x215)][A(0x229)](T,W))__createBinding(v,T,W);}return __setModuleDefault(v,T),v;},__awaiter=this&&this[a8a(0x1f7)]||function(T,v,W,l){function N(y){return y instanceof W?y:new W(function(D){D(y);});}return new(W||(W=Promise))(function(y,D){const K=a8v;function w(U){const m=a8v;try{I(l[m(0x230)](U));}catch(k){D(k);}}function e(U){const g=a8v;try{I(l[g(0x1ae)](U));}catch(k){D(k);}}function I(U){const F=a8v;U['done']?y(U[F(0x289)]):N(U[F(0x289)])[F(0x22f)](w,e);}I((l=l[K(0x2a4)](T,v||[]))['next']());});},__importDefault=this&&this[a8a(0x249)]||function(T){const t=a8a;return T&&T[t(0x25c)]?T:{'default':T};};Object['defineProperty'](exports,a8a(0x25c),{'value':!![]}),exports[a8a(0x2af)]=void 0x0;const _=__importStar(require(a8a(0x1b4))),chalk_1=__importDefault(require('chalk')),fs=__importStar(require('fs')),utils_1=require(a8a(0x1a7)),api_helpers_1=require('./api-helpers'),inquirer_pagination_prompt_1=require(a8a(0x1ad)),inquirer=require(a8a(0x2aa)),inquirerSearchList=require(a8a(0x292)),yaml=require(a8a(0x1ba));var ConfirmChoices;(function(T){const C=a8a;T[C(0x1b2)]=C(0x1f9),T['REPEAT']=C(0x2b6),T[C(0x256)]=C(0x27b),T['SAVE']='No,\x20but\x20save\x20as\x20file',T['ABORT']=C(0x1d0);}(ConfirmChoices||(ConfirmChoices={})));function a8T(){const TZ=['secrets','tokenPrompt','items','resultCache','askForTemplate','Configuration\x20file\x20written\x20to\x20','No\x20','must\x20be\x20a\x20number,\x20is\x20','type','yaml','completedAt','Do\x20you\x20want\x20to\x20add','\x20(completedAt:\x20','required','all','deleteWarningPrompt','No\x20builds\x20found','doesn\x27t\x20match\x20pattern\x20\x27','boolean','677142UbgfTL','fetchResourceList','prototype','all-containers','hasOwnProperty','split','askGeneric','blueBright','editedResult','bold','833872RXyWlW','opt','runs','for\x20this\x20','getCurrentProjectName','main-context','volumes','token','4ZNywQF','3OzCqaK','Something\x20unexpected\x20happened.','Template\x20id\x20not\x20provided.','body','template','call','askForClusterId','Should\x20it\x20be','pathVars','volume','7bWsrQK','then','next','service\x20containers','registerPrompt','isEmpty','askForTag','example','clusters','templates','__createBinding','object','isArray','search-list','don\x27t\x20change','createdAt','templateRuns','secret','askForAddonBackup','projects','getOwnPropertyDescriptor','saveFile','to\x20use:','job\x20builds','2121740meJiFc','__importStar','builds','__importDefault','yellowBright','askForService','anyOf','test','assign','grey','askForVolume','isObject','project','tags','Please\x20confirm\x20following\x20configuration:\x0a','map','EDIT','properties','message','addon','array','getInnerType','__esModule','includes','jobs','paths','Enter\x20the\x20','ask','Choose\x20the\x20','this\x20option\x20is\x20required,\x20please\x20answer','json','safeLoad','yml','job','editor','defineProperty','askArrayEntry','maxLength','DynamicReloadPaginationPrompt','askForResourcePaginated','Aborted.','data','REPEAT','isNaN','retry','tag','underline','ABORT','push','writeFileSync','must\x20be\x20shorter\x20than\x20or\x20equal\x20to\x20','confirmationPrompt','prompt','No,\x20edit','\x20characters','reset','defaultPaginationPageSize','pagination','list','WARNING:\x20You\x20are\x20about\x20to\x20delete\x20','addons','charAt','nextPageCursor','pagination-prompt','confirm','domain\x20(','Choose\x20the\x20name\x20of\x20the\x20new\x20local\x20context:','value','\x20in\x20','integer','Provide\x20a\x20file\x20path\x20to\x20write\x20the\x20configuration\x20to\x20(<name>.[json|yaml|yml])','nextCursor','minLength','\x20(startedAt:\x20','choice','job:\x20\x27','inquirer-search-list','not\x20completed','registryCredentials','askForPipeline','loginPrompt','What\x27s\x20the\x20','whiteBright','password','Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.','slice','containers','askForLogSink','pipelines','.*\x5c.(json|yaml|yml)$','maximum','backups','Go\x20to\x20editor','bgGrey','apply','red','getQuestionString','warning','askForProjectScopedResourcePaginated','find','inquirer','askForResource','job\x20runs','addEntry','\x27\x20already\x20exists.\x20Do\x20you\x20want\x20to\x20override\x20this\x20context\x20(y)\x20or\x20enter\x20a\x20new\x20name\x20(N)?','InquirerHelper','enum','propToType','max','skipValidation','3593528MeqJlC','create','No,\x20repeat','.\x20This\x20is\x20irreversible.\x20Please\x20confirm!','stringify','askForSubdomainPath','name','all-job-runs','cloud','service','apiClient','./utils','rawObject','\x20(full\x20domain:\x20','askForTemplateRun','writable','askForAddonRestore','./pagination/inquirer-pagination-prompt','throw','editPayload','input','has','YES','log\x20sink','lodash','filter','addon:\x20\x27','backupDestinations','\x20characters,\x20is\x20','isUndefined','js-yaml','domain','setPathVars','join','get','toString','template\x20run','default','1520200qYrgPN','service:\x20\x27','string','override','getPathString','logSinks','description','length','getType','pipeline','safeDump','success','askForSubdomain','contextProvider','No,\x20abort','a\x20Northflank\x20resource','Choose\x20the\x20login\x20token:','values','oneOf','4923504uWGVhE',',\x20supported\x20types:\x20[json|yaml|yml]','tmpCmdPath','backup\x20destination','elements','confirmation','green','No\x20containers\x20found','must\x20be\x20bigger\x20than\x20or\x20equal\x20to\x20','job\x20containers','minimum','credentials','services','askForSecret','restores','validate','cluster\x20id','unshift','2472725mULzKC','),\x20subdomain\x20(','uri','cursor','askForBuild','Context\x20name\x20already\x20exists.','Do\x20you\x20want\x20to\x20add\x20more','all-builds','fullName','blue','\x20type?','isValidJSON','subdomain','set','Writing\x20configuration\x20failed:\x20','subdomains','__awaiter','Context\x20with\x20name\x20\x27','Yes,\x20send','What\x20do\x20you\x20want\x20to\x20use\x20as','askForProjectScopedResource','repeat','pattern'];a8T=function(){return TZ;};return a8T();}class InquirerHelper{constructor(T){const b=a8a;this[b(0x1a6)]=T,this[b(0x27e)]=0x32,this[b(0x1af)]=v=>__awaiter(this,void 0x0,void 0x0,function*(){const P=b,{editedResult:W}=yield inquirer[P(0x27a)]([{'type':P(0x268),'name':P(0x219),'message':P(0x2a2),'default':yaml[P(0x1cc)](v)}]);return yaml[P(0x265)](W);}),this[b(0x243)]=v=>__awaiter(this,void 0x0,void 0x0,function*(){const z=b,W=D=>'Unexpected\x20file\x20type:\x20'+D+z(0x1d6);function l(){return __awaiter(this,void 0x0,void 0x0,function*(){const O=a8v;return inquirer[O(0x27a)]([{'type':O(0x1b0),'name':'fileName','message':O(0x28c),'validate':D=>new RegExp(O(0x29f))[O(0x24d)](D)?!![]:W(D)}]);});}const {fileName:N}=yield l(),y=N[z(0x1bf)]()[z(0x216)]('.')['pop']();try{switch(y){case z(0x264):(0x0,utils_1[z(0x1cd)])(z(0x203)+N);return fs[z(0x277)](N,JSON[z(0x2b8)](v,null,'\x20\x20'));case z(0x207):case z(0x266):(0x0,utils_1[z(0x1cd)])(z(0x203)+N);return fs['writeFileSync'](N,yaml[z(0x1cc)](v));default:(0x0,utils_1[z(0x2a7)])(W(y));}}catch(D){(0x0,utils_1[z(0x2a7)])(z(0x1f5)+D[z(0x258)]);}return undefined;}),this[b(0x1b5)]=(v,W)=>l=>{const J=b,N=typeof l===J(0x1c4)?l['trim']():l;return W===![]&&N===J(0x23c)?'':N;},this[b(0x1e4)]=(v,W,l)=>N=>{const S=b;if(this[S(0x2b3)]===!![])return!![];const y=[];if(N===''||N===S(0x23c)){if(W!==![])y[S(0x276)](S(0x263));else return!![];}v[S(0x206)]==='string'&&!_[S(0x1b9)](v[S(0x1fd)])&&y['push'](new RegExp(v['pattern'])[S(0x24d)](N)?!![]:S(0x20f)+v[S(0x1fd)]+'\x27');v['type']===S(0x1c4)&&!_[S(0x1b9)](v[S(0x28e)])&&y[S(0x276)](N[S(0x1c9)]>=v['minLength']?!![]:'must\x20be\x20longer\x20than\x20or\x20equal\x20to\x20'+v[S(0x28e)]+S(0x1b8)+N[S(0x1c9)]+'\x20characters');v[S(0x206)]===S(0x1c4)&&!_['isUndefined'](v[S(0x26b)])&&y[S(0x276)](N[S(0x1c9)]<=v[S(0x26b)]?!![]:S(0x278)+v[S(0x26b)]+S(0x1b8)+N[S(0x1c9)]+S(0x27c));l&&Number[S(0x271)](parseInt(N,0xa))&&y[S(0x276)](S(0x205)+N);v[S(0x206)]===S(0x28b)&&!_['isUndefined'](v[S(0x1df)])&&y[S(0x276)](N>=v[S(0x1df)]?!![]:S(0x1dd)+v[S(0x1df)]);v['type']==='integer'&&!_[S(0x1b9)](v[S(0x2a0)])&&y[S(0x276)](N<=v[S(0x2a0)]?!![]:'must\x20be\x20smaller\x20than\x20or\x20equal\x20to\x20'+v[S(0x2a0)]);if(v[S(0x206)]==='rawObject'){const e=(0x0,utils_1[S(0x1f2)])(N);y[S(0x276)](e===![]||_[S(0x233)](e)?'must\x20be\x20a\x20valid\x20non-empty\x20json\x20string':!![]);}const D=y[S(0x1b5)](I=>I!==!![]),w=(v===null||v===void 0x0?void 0x0:v[S(0x235)])?'\x0a'+chalk_1['default'][S(0x2a5)]('>>')+'\x20Example:\x20'+chalk_1[S(0x1c1)][S(0x298)](JSON['stringify'](v['example'])):'';return D[S(0x1c9)]>0x0?D['join'](chalk_1[S(0x1c1)][S(0x274)]('\x20and\x20it\x20'))+w:!![];},this['getPathString']=(v,W,l)=>{const h=b,N=v[v['length']-0x1];function y(){const d=a8v;return v[d(0x29b)](0x0,-0x1)[d(0x255)](e=>e[d(0x283)](0x0)['toUpperCase']()+e[d(0x29b)](0x1))['join']('>');}const D=v[h(0x1c9)]>0x1?chalk_1[h(0x1c1)][h(0x2a3)][h(0x298)](y())+':\x20':'',w=l?'\x20('+chalk_1[h(0x1c1)][h(0x1f0)](l)+')':'';return chalk_1[h(0x1c1)][h(0x27d)](''+D+W+'\x20'+chalk_1[h(0x1c1)][h(0x21a)]['greenBright'](N)+w+'?');},this[b(0x2ab)]=(v,W,l)=>__awaiter(this,void 0x0,void 0x0,function*(){const E=b;if(W[E(0x1c9)]<0x1){const D=l?E(0x21e)+l:'found';throw new Error(E(0x204)+v+'\x20'+D+'.');}const N=E(0x262)+v+'\x20to\x20use:',y=W[E(0x1c9)]>0x4?E(0x23b):E(0x280);return(yield inquirer['prompt']([{'type':y,'name':E(0x2ba),'message':N,'choices':W}]))['name'];}),this[b(0x26d)]=(v,W,l)=>__awaiter(this,void 0x0,void 0x0,function*(){const i=b,{elements:N,nextCursor:y}=yield W();if(N['length']<0x1){const e=l?i(0x21e)+l:'found';throw new Error(i(0x204)+v+'\x20'+e+'.');}const D=i(0x262)+v+'\x20to\x20use:';if(y!==undefined){const I=({nextPageCursor:U})=>__awaiter(this,void 0x0,void 0x0,function*(){const M=i,k=yield W(U);return{'elements':k[M(0x1d9)],'nextPageCursor':k[M(0x28d)]};});return(yield inquirer['prompt']([{'type':'pagination-prompt','name':i(0x2ba),'message':D,'choices':N,'nextPageCursor':y,'loadMore':I}]))['name'];}const w=N[i(0x1c9)]>0x4?'search-list':i(0x280);return(yield inquirer['prompt']([{'type':w,'name':i(0x2ba),'message':D,'choices':N}]))['name'];}),this[b(0x217)]=(v,W)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const p=b,l=''+(W?'('+chalk_1[p(0x1c1)]['blue'](W)+')\x20':''),N=p(0x260)+chalk_1[p(0x1c1)][p(0x1db)](v)+'\x20'+l+p(0x244),y=this[p(0x1e4)]({'type':p(0x1c4),'required':!![]});return(yield inquirer[p(0x27a)]([{'type':p(0x1b0),'name':p(0x2ba),'message':N,'validate':y}]))[p(0x2ba)];}),this['askConfirm']=v=>__awaiter(this,void 0x0,void 0x0,function*(){const Z=b;return(yield inquirer['prompt']([{'type':Z(0x286),'name':Z(0x2ba),'message':v,'default':!![]}]))['name'];}),this[b(0x24b)]=v=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const R=b,W=l=>__awaiter(this,void 0x0,void 0x0,function*(){const r=a8v,N=yield this[r(0x1a6)][r(0x280)][r(0x1e1)][r(0x20c)]({'parameters':{'projectId':l}}),y=N[r(0x26f)][r(0x1e1)][r(0x255)](D=>D['id']);return y;});return this[R(0x1fb)]('service',W,v);}),this[b(0x202)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const X=b,v=W=>__awaiter(this,void 0x0,void 0x0,function*(){const f=a8v;var l;const N=yield this[f(0x1a6)]['list'][f(0x237)]({'options':{'per_page':this[f(0x27e)],'cursor':W}}),y=N[f(0x26f)][f(0x237)][f(0x255)](D=>D['id']);return{'elements':y,'nextCursor':(l=N['pagination'])===null||l===void 0x0?void 0x0:l['cursor']};});return this['askForResourcePaginated'](X(0x228),v);}),this[b(0x234)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const n=b,v=W=>__awaiter(this,void 0x0,void 0x0,function*(){const V=a8v;var l,N,y;const D=yield this['apiClient'][V(0x280)][V(0x253)]({'options':{'per_page':this[V(0x27e)],'cursor':W}}),w=(N=(l=D[V(0x26f)][V(0x253)])===null||l===void 0x0?void 0x0:l[V(0x255)](e=>e['id']))!==null&&N!==void 0x0?N:[];return{'elements':w,'nextCursor':(y=D['pagination'])===null||y===void 0x0?void 0x0:y[V(0x1ea)]};});return this[n(0x26d)](n(0x273),v);}),this['askForBackupDestination']=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Q=b;var v;const W=yield this['apiClient']['list'][Q(0x1b7)][Q(0x20c)]({}),l=(v=W[Q(0x26f)]['backupDestinations']['map'](N=>N[Q(0x2ba)]))!==null&&v!==void 0x0?v:[];return this[Q(0x2ab)](Q(0x1d8),l);}),this[b(0x22a)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const u=b,v=W=>__awaiter(this,void 0x0,void 0x0,function*(){const j=a8v;var l,N,y;const D=yield this[j(0x1a6)][j(0x280)][j(0x2bc)][j(0x236)]({'options':{'per_page':this[j(0x27e)],'cursor':W}}),w=(N=(l=D[j(0x26f)][j(0x236)])===null||l===void 0x0?void 0x0:l[j(0x255)](e=>e['name']))!==null&&N!==void 0x0?N:[];return{'elements':w,'nextCursor':(y=D['pagination'])===null||y===void 0x0?void 0x0:y[j(0x1ea)]};});return this['askForResourcePaginated'](u(0x1e5),v);}),this[b(0x1aa)]=v=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const q=b;if(_[q(0x1b9)](v))throw new Error(q(0x226));const W=l=>__awaiter(this,void 0x0,void 0x0,function*(){const L=q;var N;let y=this[L(0x27e)];const D=yield this[L(0x1a6)][L(0x280)][L(0x23e)]({'parameters':{'templateId':v},'options':{'per_page':y,'cursor':l}}),w=D[L(0x26f)][L(0x23e)][L(0x255)](e=>e['id']+L(0x28f)+e[L(0x23d)]+')');return{'elements':w,'nextCursor':(N=D['pagination'])===null||N===void 0x0?void 0x0:N['cursor']};});return this[q(0x26d)](q(0x1c0),W)['then'](l=>l[q(0x216)]('\x20')[0x0]);}),this[b(0x29d)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const T1=b,v=W=>__awaiter(this,void 0x0,void 0x0,function*(){const T0=a8v;var l;let N=this[T0(0x27e)];const y=yield this['apiClient']['list'][T0(0x1c7)]({'options':{'per_page':N,'cursor':W}}),D=y[T0(0x26f)][T0(0x1c7)]['map'](w=>w['id']);return{'elements':D,'nextCursor':(l=y[T0(0x27f)])===null||l===void 0x0?void 0x0:l['cursor']};});return this[T1(0x26d)](T1(0x1b3),v);}),this[b(0x295)]=v=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const T3=b,W=l=>__awaiter(this,void 0x0,void 0x0,function*(){const T2=a8v,N=yield this[T2(0x1a6)][T2(0x280)][T2(0x29e)][T2(0x20c)]({'parameters':{'projectId':l}});return N['data'][T2(0x29e)]['map'](y=>y['id']);});return this[T3(0x1fb)](T3(0x1cb),W,v);}),this['askForJob']=v=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const T5=b,W=l=>__awaiter(this,void 0x0,void 0x0,function*(){const T4=a8v,N=yield this[T4(0x1a6)]['list'][T4(0x25e)][T4(0x20c)]({'parameters':{'projectId':l}}),y=N['data'][T4(0x25e)][T4(0x255)](D=>D['id']);return y;});return this['askForProjectScopedResource'](T5(0x267),W,v);}),this['askForJobRun']=(v,W,l=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const T6=b,N=T6(0x2bb),y=D=>w=>__awaiter(this,void 0x0,void 0x0,function*(){const T7=T6;var e;const I=yield this[T7(0x1a6)][T7(0x1be)]['job'][T7(0x21d)]({'parameters':{'projectId':D,'jobId':v},'options':{'per_page':this[T7(0x27e)],'cursor':w}}),U=I[T7(0x26f)][T7(0x21d)][T7(0x255)](k=>k['id']+T7(0x28f)+k['startedAt']+')');return l&&U[T7(0x1e6)](N),{'elements':U,'nextCursor':(e=I[T7(0x27f)])===null||e===void 0x0?void 0x0:e[T7(0x1ea)]};});return this[T6(0x2a8)](T6(0x2ac),y,W,'job:\x20\x27'+v+'\x27')[T6(0x22f)](D=>{const w=D['split']('\x20')[0x0];if(w===N)return undefined;return w;});}),this[b(0x1eb)]=(v,W,l,N=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const T8=b,y=T8(0x1ee);if(l!==undefined){const D=w=>e=>__awaiter(this,void 0x0,void 0x0,function*(){const T9=T8;var I;const U=yield this[T9(0x1a6)]['get'][T9(0x267)][T9(0x248)]({'parameters':{'projectId':w,'jobId':l},'options':{'per_page':this[T9(0x27e)],'cursor':e}}),k=U[T9(0x26f)][T9(0x248)][T9(0x255)](x=>x['id']+'\x20(startedAt:\x20'+x[T9(0x23d)]+')');return N&&k[T9(0x1e6)](y),{'elements':k,'nextCursor':(I=U[T9(0x27f)])===null||I===void 0x0?void 0x0:I[T9(0x1ea)]};});return this[T8(0x2a8)](T8(0x245),D,v,T8(0x291)+l+'\x27')['then'](w=>{const TT=T8,e=w[TT(0x216)]('\x20')[0x0];if(e===y)return undefined;return e;});}if(W!==undefined){const w=e=>I=>__awaiter(this,void 0x0,void 0x0,function*(){const Tv=T8;var U;const k=yield this[Tv(0x1a6)][Tv(0x1be)][Tv(0x2bd)]['builds']({'parameters':{'projectId':e,'serviceId':W},'options':{'per_page':this[Tv(0x27e)],'cursor':I}}),x=k[Tv(0x26f)][Tv(0x248)][Tv(0x255)](B=>B['id']+Tv(0x28f)+B[Tv(0x23d)]+')');if(N)x[Tv(0x1e6)](y);return{'elements':x,'nextCursor':(U=k[Tv(0x27f)])===null||U===void 0x0?void 0x0:U['cursor']};});return this[T8(0x2a8)]('service\x20build',w,v,'service:\x20\x27'+l+'\x27')[T8(0x22f)](e=>{const TW=T8,I=e[TW(0x216)]('\x20')[0x0];if(I===y)return undefined;return I;});}throw new Error(T8(0x20e));}),this['askForContainer']=(v,W,l,N=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Tl=b,y=Tl(0x214);if(l!==undefined){const D=w=>e=>__awaiter(this,void 0x0,void 0x0,function*(){const TN=Tl;var I,U;const k=yield this['apiClient']['get'][TN(0x267)][TN(0x29c)]({'parameters':{'projectId':w,'jobId':l},'options':{'per_page':this[TN(0x27e)],'cursor':e}}),x=(I=k[TN(0x26f)]['containers'])!==null&&I!==void 0x0?I:[],B=x===null||x===void 0x0?void 0x0:x[TN(0x255)](o=>o[TN(0x2ba)]+TN(0x28f)+o[TN(0x23d)]+')');return N&&B[TN(0x1e6)](y),{'elements':B,'nextCursor':(U=k[TN(0x27f)])===null||U===void 0x0?void 0x0:U['cursor']};});return this[Tl(0x2a8)](Tl(0x1de),D,v,'job:\x20\x27'+l+'\x27')['then'](w=>{const Ty=Tl,e=w[Ty(0x216)]('\x20')[0x0];if(e===y)return undefined;return e;});}if(W!==undefined){const w=e=>I=>__awaiter(this,void 0x0,void 0x0,function*(){const TD=Tl;var U,k;const x=yield this[TD(0x1a6)][TD(0x1be)][TD(0x2bd)][TD(0x29c)]({'parameters':{'projectId':e,'serviceId':W},'options':{'per_page':this[TD(0x27e)],'cursor':I}}),B=(U=x['data'][TD(0x29c)])!==null&&U!==void 0x0?U:[],o=B[TD(0x255)](s=>s[TD(0x2ba)]+'\x20(startedAt:\x20'+s[TD(0x23d)]+')');if(N)o===null||o===void 0x0?void 0x0:o[TD(0x1e6)](y);return{'elements':o,'nextCursor':(k=x['pagination'])===null||k===void 0x0?void 0x0:k['cursor']};});return this[Tl(0x2a8)](Tl(0x231),w,v,Tl(0x1c3)+l+'\x27')[Tl(0x22f)](e=>{const Tw=Tl,I=e[Tw(0x216)]('\x20')[0x0];if(I===y)return undefined;return I;});}throw new Error(Tl(0x1dc));}),this['askForAddon']=v=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const TI=b,W=l=>__awaiter(this,void 0x0,void 0x0,function*(){const Te=a8v,N=yield this[Te(0x1a6)][Te(0x280)][Te(0x282)][Te(0x20c)]({'parameters':{'projectId':l}});return N[Te(0x26f)][Te(0x282)]['map'](y=>y['id']);});return this[TI(0x1fb)](TI(0x259),W,v);}),this[b(0x240)]=(v,W)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Tk=b,l=N=>y=>__awaiter(this,void 0x0,void 0x0,function*(){const TU=a8v;var D;const w=yield this[TU(0x1a6)]['get']['addon'][TU(0x2a1)]({'parameters':{'projectId':N,'addonId':W},'options':{'per_page':this[TU(0x27e)],'cursor':y}});return{'elements':w[TU(0x26f)][TU(0x2a1)][TU(0x255)](e=>e['id']+TU(0x20a)+(e[TU(0x208)]||TU(0x293))+')'),'nextCursor':(D=w[TU(0x27f)])===null||D===void 0x0?void 0x0:D['cursor']};});return this[Tk(0x2a8)](Tk(0x2a1),l,v,'addon:\x20\x27'+W+'\x27')[Tk(0x22f)](N=>N[Tk(0x216)]('\x20')[0x0]);}),this[b(0x1ac)]=(v,W,l)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const TB=b,N=y=>D=>__awaiter(this,void 0x0,void 0x0,function*(){const Tx=a8v;var w;const e=yield this[Tx(0x1a6)][Tx(0x1be)][Tx(0x259)]['backup'][Tx(0x1e3)]({'parameters':{'projectId':y,'addonId':W,'backupId':l},'options':{'per_page':this[Tx(0x27e)],'cursor':D}});return{'elements':e['data'][Tx(0x1e3)][Tx(0x255)](I=>I['id']+Tx(0x20a)+(I[Tx(0x208)]||Tx(0x293))+')'),'nextCursor':(w=e[Tx(0x27f)])===null||w===void 0x0?void 0x0:w[Tx(0x1ea)]};});return this[TB(0x2a8)]('restore',N,v,TB(0x1b6)+W+'\x27')['then'](y=>y['split']('\x20')[0x0]);}),this[b(0x250)]=v=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Ts=b,W=l=>__awaiter(this,void 0x0,void 0x0,function*(){const To=a8v;return(yield this['apiClient'][To(0x280)][To(0x221)]({'parameters':{'projectId':l}}))[To(0x26f)][To(0x255)](N=>N['id']);});return this[Ts(0x1fb)](Ts(0x22d),W,v);}),this[b(0x1e2)]=v=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Ta=b,W=l=>__awaiter(this,void 0x0,void 0x0,function*(){const TY=a8v,N=yield this[TY(0x1a6)]['list'][TY(0x1fe)][TY(0x20c)]({'parameters':{'projectId':l}});return N[TY(0x26f)][TY(0x1fe)][TY(0x255)](y=>y['id']);});return this[Ta(0x1fb)](Ta(0x23f),W,v);}),this[b(0x1ce)]=v=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const TG=b,W=yield this['apiClient']['get'][TG(0x1bb)]({'parameters':{'domain':v}}),l=W['data'][TG(0x1f6)][TG(0x255)](y=>y[TG(0x2ba)]+TG(0x1a9)+y[TG(0x1ef)]+')'),N=TG(0x287)+v+')';return this['askForResource']('subdomain',l,N)[TG(0x22f)](y=>y[TG(0x216)]('\x20')[0x0]);}),this[b(0x2b9)]=(v,W)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const TH=b,l=yield this[TH(0x1a6)][TH(0x280)][TH(0x1f3)]['path']({'parameters':{'domain':v,'subdomain':W}}),N=l[TH(0x26f)][TH(0x25f)]['map'](D=>''+D[TH(0x1e9)]),y=TH(0x287)+v+TH(0x1e8)+W+')';return this[TH(0x2ab)]('subdomainPath',N,y);}),this[b(0x20d)]=v=>__awaiter(this,void 0x0,void 0x0,function*(){const TA=b;return(yield inquirer['prompt']([{'type':TA(0x286),'name':TA(0x1da),'message':chalk_1['default'][TA(0x24a)](TA(0x281)+(v||TA(0x1d1))+TA(0x2b7)),'default':![]}]))[TA(0x1da)];}),this[b(0x296)]=(v,W)=>__awaiter(this,void 0x0,void 0x0,function*(){const Tm=b;_[Tm(0x1b9)](v[Tm(0x2ba)])&&(W[Tm(0x1c9)]<=0x0?_[Tm(0x1f4)](v,Tm(0x2ba),Tm(0x1c1)):yield(0x0,utils_1[Tm(0x272)])(0xa)(()=>__awaiter(this,void 0x0,void 0x0,function*(){const Tg=Tm,{name:l}=yield inquirer[Tg(0x27a)]([{'type':'input','name':Tg(0x2ba),'message':Tg(0x288),'default':Tg(0x220)}]);if(!v[Tg(0x1c5)]&&W[Tg(0x2a9)](N=>N['name']===l)){const {c:N}=yield inquirer['prompt']([{'type':Tg(0x286),'name':'c','message':Tg(0x1f8)+l+Tg(0x2ae),'default':![]}]);if(N===![])throw new Error(Tg(0x1ec));_[Tg(0x1f4)](v,'override',!![]);}_['set'](v,Tg(0x2ba),l);})));if(_[Tm(0x1b9)](v['token'])){const l=yield this[Tm(0x1ff)]();_[Tm(0x1f4)](v,'token',l);}return v;}),this[b(0x1ff)]=()=>__awaiter(this,void 0x0,void 0x0,function*(){const TF=b,{token:v}=yield inquirer[TF(0x27a)]([{'type':TF(0x299),'name':TF(0x222),'mask':'*','message':TF(0x1d2)}]);return v;}),inquirer[b(0x232)](b(0x23b),inquirerSearchList),inquirer['registerPrompt'](b(0x285),inquirer_pagination_prompt_1[b(0x26c)]);}[a8a(0x279)](T,v){return __awaiter(this,void 0x0,void 0x0,function*(){const TK=a8v,W=yaml[TK(0x1cc)](T),l=_[TK(0x2b2)](W[TK(0x216)]('\x0a')['map'](D=>D[TK(0x1c9)])),N=chalk_1['default'][TK(0x24f)]('-'[TK(0x1fc)](l)+'\x0a'),{confirm:y}=yield inquirer[TK(0x27a)]([{'type':TK(0x280),'name':TK(0x286),'message':''+chalk_1[TK(0x1c1)][TK(0x21a)][TK(0x1db)](TK(0x254))+N+chalk_1[TK(0x1c1)][TK(0x218)](W)+N,'choices':Object[TK(0x1d3)](ConfirmChoices)}]);switch(y){case ConfirmChoices[TK(0x1b2)]:return T;case ConfirmChoices[TK(0x275)]:throw new Error(TK(0x26e));case ConfirmChoices[TK(0x270)]:return this['retrievePayloadViaInteractiveCli'](v);case ConfirmChoices['EDIT']:return this[TK(0x279)](yield this[TK(0x1af)](T),v);case ConfirmChoices['SAVE']:yield this[TK(0x243)](T);return this[TK(0x279)](T,v);default:throw new Error(TK(0x225));}});}['retrievePayloadViaInteractiveCli'](T,v){return __awaiter(this,void 0x0,void 0x0,function*(){const Tt=a8v;if((v===null||v===void 0x0?void 0x0:v[Tt(0x201)])!==undefined)this[Tt(0x201)]=v===null||v===void 0x0?void 0x0:v[Tt(0x201)];this[Tt(0x1d7)]=v===null||v===void 0x0?void 0x0:v['cmdPath'],this[Tt(0x2b3)]=v===null||v===void 0x0?void 0x0:v[Tt(0x2b3)];const W={};return yield this[Tt(0x2b1)]([],T[Tt(0x21c)][Tt(0x227)],W),this['resultCache']=W,yield this[Tt(0x279)](W,T);});}[a8a(0x2b1)](T,v,W,l){return __awaiter(this,void 0x0,void 0x0,function*(){const TC=a8v;let N;if(v[TC(0x1d4)]&&!_[TC(0x1b1)](v,'properties')){if(v[TC(0x1d4)]['length']>0x1){const {choice:y}=yield inquirer['prompt']([{'type':TC(0x280),'name':TC(0x290),'message':TC(0x297)+(T[T[TC(0x1c9)]-0x1]||'')+TC(0x1f1),'choices':v[TC(0x1d4)][TC(0x255)](D=>{const Tb=TC;var w;return(w=D[Tb(0x1c8)])!==null&&w!==void 0x0?w:'??';})}]);N=yield this['getType'](T,v[TC(0x1d4)][TC(0x2a9)](D=>D[TC(0x1c8)]===y),W,l);}else{const D=v[TC(0x1d4)][0x0];_[TC(0x1f4)](D,TC(0x1c8),v[TC(0x1c8)]),N=yield this[TC(0x1ca)](T,D,W,l);}N={};}else{if(v[TC(0x24c)]&&!_[TC(0x1b1)](v,TC(0x257))){if(v[TC(0x24c)][TC(0x1c9)]>0x1){const {choice:w}=yield inquirer[TC(0x27a)]([{'type':TC(0x280),'name':'choice','message':TC(0x297)+(T[T[TC(0x1c9)]-0x1]||'')+TC(0x1f1),'choices':[...v['anyOf']['map'](e=>{const TP=TC;var I;return(I=e[TP(0x1c8)])!==null&&I!==void 0x0?I:'??';}),'don\x27t\x20change']}]);w!=='don\x27t\x20change'&&(N=yield this[TC(0x1ca)](T,v[TC(0x24c)][TC(0x2a9)](e=>e[TC(0x1c8)]===w),W,l));}else{const e=v[TC(0x24c)][0x0];_[TC(0x1f4)](e,'description',v['description']),N=yield this['getType'](T,e,W,l);}N={};}else N=yield this['getType'](T,v,W,l);}return N;});}[a8a(0x25b)](T,v,W,l){var N;return __awaiter(this,void 0x0,void 0x0,function*(){const Tz=a8v;if(l===![]){const {addEntry:w}=yield inquirer[Tz(0x27a)]([{'type':Tz(0x286),'name':Tz(0x2ad),'message':this[Tz(0x1c6)](v,Tz(0x209),T===null||T===void 0x0?void 0x0:T[Tz(0x1c8)]),'default':![]}]);if(!w)return W;}const y=Object['keys']((N=T===null||T===void 0x0?void 0x0:T[Tz(0x257)])!==null&&N!==void 0x0?N:[]),D=T[Tz(0x20b)]||[];if(y[Tz(0x1c9)]>0x0)for(const e of y){const I=v['concat'](e);if(v[Tz(0x1c9)]>0x0&&!_[Tz(0x1b1)](W,v[Tz(0x1bd)]('.')))_['set'](W,v['join']('.'),{});yield this[Tz(0x2b1)](I,T[Tz(0x257)][e],W,D[Tz(0x25d)](e));}else yield this[Tz(0x1ca)](v,Object[Tz(0x24e)](Object['assign']({},T),{'type':Tz(0x1a8)}),W,l);return W;});}[a8a(0x26a)](T,v,W,l){return __awaiter(this,void 0x0,void 0x0,function*(){const Tc=a8v;if(v&&W)return!![];const N=v?Tc(0x209):Tc(0x1ed),{addEntry:y}=yield inquirer[Tc(0x27a)]([{'type':Tc(0x286),'name':Tc(0x2ad),'message':this['getPathString'](T,N,v?l:undefined),'default':![]}]);return y;});}[a8a(0x1ca)](T,v,W,l){return __awaiter(this,void 0x0,void 0x0,function*(){const TO=a8v;let N;const y=T['join']('.');switch(v===null||v===void 0x0?void 0x0:v[TO(0x206)]){case TO(0x25a):{let D=!![];while(yield this[TO(0x26a)](T,D,l,v===null||v===void 0x0?void 0x0:v[TO(0x1c8)])){const w=_[TO(0x1be)](W,y);_['unset'](W,y),yield this['getType'](T,v[TO(0x200)],W);const e=_['get'](W,y);!_[TO(0x23a)](w)?_['set'](W,y,[e]):(w['push'](e),_[TO(0x1f4)](W,y,w)),D=![];}return N||[];}case TO(0x239):{return N=yield this['getInnerType'](v,T,W,l),N;}case TO(0x1a8):N=(0x0,utils_1[TO(0x1f2)])(yield this[TO(0x261)](T,v,l))||undefined;break;case'string':case'boolean':case'integer':default:N=yield this['ask'](T,v,l,W);break;}return!_[TO(0x1b9)](N)&&_[TO(0x1f4)](W,y,N),N;});}[a8a(0x261)](T,v,W,l){var N;return __awaiter(this,void 0x0,void 0x0,function*(){const TJ=a8v,y=T[T[TJ(0x1c9)]-0x1],{defaultValue:defaultValue=(N=v===null||v===void 0x0?void 0x0:v[TJ(0x235)])!==null&&N!==void 0x0?N:v===null||v===void 0x0?void 0x0:v['default'],choices:choices=v===null||v===void 0x0?void 0x0:v[TJ(0x2b0)],pagination:D}=yield(0x0,api_helpers_1[TJ(0x212)])(y,this[TJ(0x1a6)],this[TJ(0x1d7)],l,this['pathVars'],T);let w=TJ(0x1b0);if(!_['isUndefined'](choices)&&choices['length']>0x0){if(D!==undefined&&D[TJ(0x284)]!==undefined)w=TJ(0x285);else choices['length']>0x4&&typeof choices[0x0]===TJ(0x1c4)?w=TJ(0x23b):w=TJ(0x280);}else{if((v===null||v===void 0x0?void 0x0:v[TJ(0x206)])===TJ(0x210))w='confirm';else{if((v===null||v===void 0x0?void 0x0:v['type'])===TJ(0x28b))w=TJ(0x1b0);else(v===null||v===void 0x0?void 0x0:v[TJ(0x206)])===TJ(0x1a8)&&(w=TJ(0x268));}}let e=W!==![]?!_[TJ(0x251)](defaultValue)?defaultValue:JSON[TJ(0x2b8)](defaultValue):_['isBoolean'](defaultValue)?defaultValue:TJ(0x23c);if(choices)e=e[TJ(0x1bf)]();_[TJ(0x1b1)](this['resultCache'],T[TJ(0x1bd)]('.'))&&(e=this[TJ(0x201)][T['join']('.')]);const I=choices&&W===![]?[TJ(0x23c),...choices]:choices,U=(v===null||v===void 0x0?void 0x0:v['type'])===TJ(0x28b),k=Object[TJ(0x24e)]({'type':w,'name':'id','message':this[TJ(0x2a6)](T,v),'choices':I,'default':e,'filter':this[TJ(0x1b5)](w,W),'validate':this[TJ(0x1e4)](v,W,U)},D),x=(yield inquirer[TJ(0x27a)]([k]))['id'];if(x==='don\x27t\x20change'||x==='')return undefined;if(U)return parseInt(x,0xa);return x;});}[a8a(0x2a6)](T,v){const TS=a8a,W=(v===null||v===void 0x0?void 0x0:v[TS(0x206)])!==TS(0x210)?TS(0x1fa):TS(0x22b);return this['getPathString'](T,W,v===null||v===void 0x0?void 0x0:v[TS(0x1c8)]);}['askForProject'](){return __awaiter(this,void 0x0,void 0x0,function*(){const Td=a8v,T=yield this[Td(0x1a6)][Td(0x280)][Td(0x241)]['all']({})[Td(0x22f)](v=>v['data'][Td(0x241)][Td(0x255)](W=>W['id']));return yield this[Td(0x2ab)](Td(0x252),T);});}[a8a(0x1fb)](T,v,W,l){return __awaiter(this,void 0x0,void 0x0,function*(){const Th=a8v,N=W||this[Th(0x1a6)][Th(0x1cf)]['getCurrentProjectName']();if(_[Th(0x1b9)](N))throw new Error(Th(0x29a));const y=yield v(N);return yield this[Th(0x2ab)](T,y,(l?l+Th(0x28a):'')+'project:\x20\x27'+N+'\x27');});}['askForProjectScopedResourcePaginated'](T,v,W,l){return __awaiter(this,void 0x0,void 0x0,function*(){const TE=a8v,N=W||this[TE(0x1a6)]['contextProvider'][TE(0x21f)]();if(_['isUndefined'](N))throw new Error(TE(0x29a));const y=yield v(N);return yield this['askForResourcePaginated'](T,y,(l?l+'\x20in\x20':'')+'project:\x20\x27'+N+'\x27');});}['askForDomain'](){return __awaiter(this,void 0x0,void 0x0,function*(){const Ti=a8v,T=yield this[Ti(0x1a6)][Ti(0x280)]['domains'][Ti(0x20c)]({}),v=T[Ti(0x26f)]['domains'][Ti(0x255)](W=>W[Ti(0x2ba)]);return this[Ti(0x2ab)](Ti(0x1bb),v);});}['askForCredentials'](){return __awaiter(this,void 0x0,void 0x0,function*(){const TM=a8v,T=yield this[TM(0x1a6)][TM(0x280)][TM(0x294)][TM(0x20c)]({}),v=T[TM(0x26f)]['credentials'][TM(0x255)](W=>W['id']);return this[TM(0x2ab)](TM(0x1e0),v);});}[a8a(0x1bc)](T){const Tp=a8a;this[Tp(0x22c)]=T;}}exports[a8a(0x2af)]=InquirerHelper;
|
|
1
|
+
'use strict';const a9f=a9E;(function(E,S){const H=a9E,X=E();while(!![]){try{const u=-parseInt(H(0x271))/0x1+parseInt(H(0x1fe))/0x2+parseInt(H(0x298))/0x3+-parseInt(H(0x278))/0x4*(-parseInt(H(0x24b))/0x5)+parseInt(H(0x2ba))/0x6+parseInt(H(0x205))/0x7*(parseInt(H(0x1f3))/0x8)+-parseInt(H(0x1fa))/0x9;if(u===S)break;else X['push'](X['shift']());}catch(Y){X['push'](X['shift']());}}}(a9c,0xe57ea));var __createBinding=this&&this[a9f(0x249)]||(Object[a9f(0x2a6)]?function(E,S,X,u){const Z=a9f;if(u===undefined)u=X;var Y=Object[Z(0x2b8)](S,X);(!Y||('get'in Y?!S['__esModule']:Y[Z(0x215)]||Y[Z(0x22b)]))&&(Y={'enumerable':!![],'get':function(){return S[X];}}),Object[Z(0x2b5)](E,u,Y);}:function(E,S,X,u){if(u===undefined)u=X;E[u]=S[X];}),__setModuleDefault=this&&this[a9f(0x1d0)]||(Object[a9f(0x2a6)]?function(E,S){const K=a9f;Object[K(0x2b5)](E,'default',{'enumerable':!![],'value':S});}:function(E,S){const t=a9f;E[t(0x1f7)]=S;}),__importStar=this&&this['__importStar']||function(E){const G=a9f;if(E&&E[G(0x1f0)])return E;var S={};if(E!=null){for(var X in E)if(X!==G(0x1f7)&&Object[G(0x20e)]['hasOwnProperty'][G(0x25a)](E,X))__createBinding(S,E,X);}return __setModuleDefault(S,E),S;},__awaiter=this&&this['__awaiter']||function(E,S,X,u){function Y(R){return R instanceof X?R:new X(function(d){d(R);});}return new(X||(X=Promise))(function(R,d){const I=a9E;function w(q){const b=a9E;try{p(u[b(0x285)](q));}catch(B){d(B);}}function U(q){const l=a9E;try{p(u[l(0x1c1)](q));}catch(B){d(B);}}function p(q){const A=a9E;q[A(0x234)]?R(q[A(0x239)]):Y(q[A(0x239)])[A(0x27e)](w,U);}p((u=u[I(0x269)](E,S||[]))['next']());});},__importDefault=this&&this[a9f(0x236)]||function(E){return E&&E['__esModule']?E:{'default':E};};function a9c(){const cD=['Context\x20name\x20already\x20exists.','not\x20completed','input','Aborted.','addon:\x20\x27','project:\x20\x27','pipelines','askForTemplate','yaml','registerPrompt','retry','apply','ask','askForAddonRestore','boolean','volume','validate','getInnerType','project','1852653wQgJQa','must\x20be\x20bigger\x20than\x20or\x20equal\x20to\x20','override','chalk','nextPageCursor','service\x20containers','prompt','124VrAwZI','set','blue','toString','js-yaml','includes','then','unset','askForProjectScopedResourcePaginated','confirm','domain','opt','askForResourcePaginated','next','templateRuns','main-context','services','Something\x20unexpected\x20happened.','.*\x5c.(json|yaml|yml)$','askArrayEntry','containers','maximum','tokenPrompt','Choose\x20the\x20','WARNING:\x20You\x20are\x20about\x20to\x20delete\x20','jobs','editedResult','No,\x20repeat','get','./pagination/inquirer-pagination-prompt','No,\x20edit','saveFile','3413844cnPaik','for\x20this\x20','don\x27t\x20change','object','slice','askForTemplateRun','minimum','must\x20be\x20smaller\x20than\x20or\x20equal\x20to\x20','filter','addons','underline','length','oneOf','test','create','fetchResourceList','EDIT','red','loginPrompt','safeDump','has','job:\x20\x27','No,\x20abort','credentials','backups','askForCredentials','template\x20run','\x20Example:\x20','a\x20Northflank\x20resource','defineProperty','safeLoad','whiteBright','getOwnPropertyDescriptor','service:\x20\x27','10943802iHToOd','\x20(full\x20domain:\x20','pathVars','addEntry','properties','must\x20be\x20shorter\x20than\x20or\x20equal\x20to\x20','REPEAT','editor','minLength','ABORT','retrievePayloadViaInteractiveCli','\x20type?','getCurrentProjectName','map','./api-helpers','Provide\x20a\x20file\x20path\x20to\x20write\x20the\x20configuration\x20to\x20(<name>.[json|yaml|yml])','tmpCmdPath','templates','yml','service\x20build','\x20characters','anyOf','nextCursor','askForAddonBackup','assign','job','isArray','logSinks','bold','pagination-prompt','throw','subdomain','No\x20','description','Go\x20to\x20editor','\x20(completedAt:\x20','yellowBright','pipeline','Do\x20you\x20want\x20to\x20add\x20more','\x20(startedAt:\x20','askForResource','\x27\x20already\x20exists.\x20Do\x20you\x20want\x20to\x20override\x20this\x20context\x20(y)\x20or\x20enter\x20a\x20new\x20name\x20(N)?','name','inquirer-search-list','unshift','__setModuleDefault','reset','askForClusterId','find','deleteWarningPrompt','message','clusters','\x20and\x20it\x20','choice','backup\x20destination','apiClient','tag','search-list','isUndefined','builds','doesn\x27t\x20match\x20pattern\x20\x27','\x20in\x20','getQuestionString','backup','askForProjectScopedResource','confirmationPrompt','askForDomain','all-builds','askForSubdomain','Template\x20id\x20not\x20provided.','lodash','No\x20containers\x20found','Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.','addon','SAVE','max','createdAt','__esModule','subdomains','bgGrey','4424FEYsVg','integer','domain\x20(','blueBright','default','maxLength','token','24705918YOeSBb','greenBright','example','.\x20This\x20is\x20irreversible.\x20Please\x20confirm!','1100792oCCaFC','isValidJSON','all','pattern','cursor','array','pagination','12229HbEsPB','askForJobRun','must\x20be\x20longer\x20than\x20or\x20equal\x20to\x20','askForAddon','type','projects','askForVolume','resultCache','runs','prototype','Enter\x20the\x20','all-containers','uri','askForPipeline','YES','charAt','writable','editPayload','\x20characters,\x20is\x20','cmdPath','askForLogSink','stringify','success','volumes','askForProject','DynamicReloadPaginationPrompt','push','propToType','Yes,\x20send','askGeneric','Do\x20you\x20want\x20to\x20add','password','askConfirm','required','getPathString','pop','askForBuild','string','configurable','json','skipValidation','backupDestinations','service','template','askForSecret','join','askForService','done','list','__importDefault','all-job-runs','elements','value','What\x27s\x20the\x20','trim','job\x20runs','completedAt','tags','warning','values','writeFileSync','startedAt','Choose\x20the\x20login\x20token:','registryCredentials','contextProvider','data','restores','\x20to\x20use:','__createBinding','defaultPaginationPageSize','170865LrjvpV','setPathVars','confirmation','rawObject','getType','secret','Should\x20it\x20be','secrets','./utils','green','subdomainPath','grey','split','isBoolean','must\x20be\x20a\x20valid\x20non-empty\x20json\x20string','call','found','keys','askForBackupDestination'];a9c=function(){return cD;};return a9c();}Object[a9f(0x2b5)](exports,a9f(0x1f0),{'value':!![]}),exports['InquirerHelper']=void 0x0;const _=__importStar(require(a9f(0x1e9))),chalk_1=__importDefault(require(a9f(0x274))),fs=__importStar(require('fs')),utils_1=require(a9f(0x253)),api_helpers_1=require(a9f(0x1b1)),inquirer_pagination_prompt_1=require(a9f(0x295)),inquirer=require('inquirer'),inquirerSearchList=require(a9f(0x1ce)),yaml=require(a9f(0x27c));function a9E(c,E){const S=a9c();return a9E=function(X,u){X=X-0x1ae;let Y=S[X];return Y;},a9E(c,E);}var ConfirmChoices;(function(E){const T=a9f;E[T(0x213)]=T(0x221),E[T(0x2c0)]=T(0x293),E[T(0x2a8)]=T(0x296),E[T(0x1ed)]='No,\x20but\x20save\x20as\x20file',E[T(0x2c3)]=T(0x2ae);}(ConfirmChoices||(ConfirmChoices={})));class InquirerHelper{constructor(E){const M=a9f;this[M(0x1da)]=E,this['defaultPaginationPageSize']=0x32,this[M(0x216)]=S=>__awaiter(this,void 0x0,void 0x0,function*(){const m=M,{editedResult:X}=yield inquirer[m(0x277)]([{'type':'editor','name':m(0x292),'message':m(0x1c5),'default':yaml[m(0x2ab)](S)}]);return yaml[m(0x2b6)](X);}),this[M(0x297)]=S=>__awaiter(this,void 0x0,void 0x0,function*(){const z=M,X=d=>'Unexpected\x20file\x20type:\x20'+d+',\x20supported\x20types:\x20[json|yaml|yml]';function u(){return __awaiter(this,void 0x0,void 0x0,function*(){const N=a9E;return inquirer[N(0x277)]([{'type':N(0x260),'name':'fileName','message':N(0x1b2),'validate':d=>new RegExp(N(0x28a))[N(0x2a5)](d)?!![]:X(d)}]);});}const {fileName:Y}=yield u(),R=Y[z(0x27b)]()[z(0x257)]('.')[z(0x228)]();try{switch(R){case z(0x22c):(0x0,utils_1['success'])('Configuration\x20file\x20written\x20to\x20'+Y);return fs[z(0x241)](Y,JSON['stringify'](S,null,'\x20\x20'));case z(0x266):case z(0x1b5):(0x0,utils_1[z(0x21b)])('Configuration\x20file\x20written\x20to\x20'+Y);return fs[z(0x241)](Y,yaml[z(0x2ab)](S));default:(0x0,utils_1[z(0x23f)])(X(R));}}catch(d){(0x0,utils_1['warning'])('Writing\x20configuration\x20failed:\x20'+d[z(0x1d5)]);}return undefined;}),this['filter']=(S,X)=>u=>{const J=M,Y=typeof u==='string'?u[J(0x23b)]():u;return X===![]&&Y==='don\x27t\x20change'?'':Y;},this['validate']=(S,X,u)=>Y=>{const O=M;if(this[O(0x22d)]===!![])return!![];const R=[];if(Y===''||Y===O(0x29a)){if(X!==![])R[O(0x21f)]('this\x20option\x20is\x20required,\x20please\x20answer');else return!![];}S[O(0x209)]===O(0x22a)&&!_[O(0x1dd)](S[O(0x201)])&&R[O(0x21f)](new RegExp(S['pattern'])[O(0x2a5)](Y)?!![]:O(0x1df)+S[O(0x201)]+'\x27');S[O(0x209)]==='string'&&!_[O(0x1dd)](S[O(0x2c2)])&&R['push'](Y[O(0x2a3)]>=S[O(0x2c2)]?!![]:O(0x207)+S[O(0x2c2)]+O(0x217)+Y[O(0x2a3)]+'\x20characters');S[O(0x209)]==='string'&&!_[O(0x1dd)](S[O(0x1f8)])&&R[O(0x21f)](Y[O(0x2a3)]<=S[O(0x1f8)]?!![]:O(0x2bf)+S[O(0x1f8)]+'\x20characters,\x20is\x20'+Y[O(0x2a3)]+O(0x1b7));u&&Number['isNaN'](parseInt(Y,0xa))&&R[O(0x21f)]('must\x20be\x20a\x20number,\x20is\x20'+Y);S[O(0x209)]===O(0x1f4)&&!_[O(0x1dd)](S['minimum'])&&R[O(0x21f)](Y>=S[O(0x29e)]?!![]:O(0x272)+S[O(0x29e)]);S[O(0x209)]===O(0x1f4)&&!_[O(0x1dd)](S[O(0x28d)])&&R['push'](Y<=S[O(0x28d)]?!![]:O(0x29f)+S['maximum']);if(S[O(0x209)]===O(0x24e)){const P=(0x0,utils_1[O(0x1ff)])(Y);R['push'](P===![]||_['isEmpty'](P)?O(0x259):!![]);}const d=R[O(0x2a0)](U=>U!==!![]),w=(S===null||S===void 0x0?void 0x0:S[O(0x1fc)])?'\x0a'+chalk_1[O(0x1f7)][O(0x2a9)]('>>')+O(0x2b3)+chalk_1[O(0x1f7)]['whiteBright'](JSON['stringify'](S[O(0x1fc)])):'';return d['length']>0x0?d['join'](chalk_1[O(0x1f7)][O(0x2a2)](O(0x1d7)))+w:!![];},this[M(0x227)]=(S,X,u)=>{const C=M,Y=S[S[C(0x2a3)]-0x1];function R(){const k=C;return S[k(0x29c)](0x0,-0x1)['map'](P=>P[k(0x214)](0x0)['toUpperCase']()+P['slice'](0x1))[k(0x232)]('>');}const d=S[C(0x2a3)]>0x1?chalk_1[C(0x1f7)][C(0x1f2)][C(0x2b7)](R())+':\x20':'',w=u?'\x20('+chalk_1[C(0x1f7)]['blue'](u)+')':'';return chalk_1[C(0x1f7)][C(0x1d1)](''+d+X+'\x20'+chalk_1[C(0x1f7)][C(0x1bf)][C(0x1fb)](Y)+w+'?');},this[M(0x1cb)]=(S,X,u)=>__awaiter(this,void 0x0,void 0x0,function*(){const o=M;if(X[o(0x2a3)]<0x1){const d=u?o(0x299)+u:o(0x25b);throw new Error(o(0x1c3)+S+'\x20'+d+'.');}const Y=o(0x28f)+S+o(0x248),R=X[o(0x2a3)]>0x4?o(0x1dc):o(0x235);return(yield inquirer[o(0x277)]([{'type':R,'name':'name','message':Y,'choices':X}]))[o(0x1cd)];}),this[M(0x284)]=(S,X,u)=>__awaiter(this,void 0x0,void 0x0,function*(){const y=M,{elements:Y,nextCursor:R}=yield X();if(Y['length']<0x1){const P=u?y(0x299)+u:y(0x25b);throw new Error(y(0x1c3)+S+'\x20'+P+'.');}const d=y(0x28f)+S+y(0x248);if(R!==undefined){const U=({nextPageCursor:p})=>__awaiter(this,void 0x0,void 0x0,function*(){const e=y,q=yield X(p);return{'elements':q[e(0x238)],'nextPageCursor':q[e(0x1b9)]};});return(yield inquirer[y(0x277)]([{'type':'pagination-prompt','name':y(0x1cd),'message':d,'choices':Y,'nextPageCursor':R,'loadMore':U}]))[y(0x1cd)];}const w=Y[y(0x2a3)]>0x4?y(0x1dc):y(0x235);return(yield inquirer[y(0x277)]([{'type':w,'name':y(0x1cd),'message':d,'choices':Y}]))['name'];}),this[M(0x222)]=(S,X)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const D=M,u=''+(X?'('+chalk_1['default'][D(0x27a)](X)+')\x20':''),Y=D(0x20f)+chalk_1['default'][D(0x254)](S)+'\x20'+u+'to\x20use:',R=this[D(0x26e)]({'type':'string','required':!![]});return(yield inquirer[D(0x277)]([{'type':D(0x260),'name':D(0x1cd),'message':Y,'validate':R}]))[D(0x1cd)];}),this[M(0x225)]=S=>__awaiter(this,void 0x0,void 0x0,function*(){const x=M;return(yield inquirer[x(0x277)]([{'type':x(0x281),'name':x(0x1cd),'message':S,'default':!![]}]))['name'];}),this[M(0x233)]=S=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const n=M,X=u=>__awaiter(this,void 0x0,void 0x0,function*(){const h=a9E,Y=yield this[h(0x1da)]['list'][h(0x288)][h(0x200)]({'parameters':{'projectId':u}}),R=Y['data'][h(0x288)][h(0x1b0)](d=>d['id']);return R;});return this[n(0x1e3)](n(0x22f),X,S);}),this[M(0x265)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const j=M,S=X=>__awaiter(this,void 0x0,void 0x0,function*(){const s=a9E;var u;const Y=yield this[s(0x1da)]['list'][s(0x1b4)]({'options':{'per_page':this[s(0x24a)],'cursor':X}}),R=Y[s(0x246)][s(0x1b4)][s(0x1b0)](d=>d['id']);return{'elements':R,'nextCursor':(u=Y[s(0x204)])===null||u===void 0x0?void 0x0:u['cursor']};});return this[j(0x284)](j(0x230),S);}),this['askForTag']=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Q=M,S=X=>__awaiter(this,void 0x0,void 0x0,function*(){const a=a9E;var u,Y,R;const d=yield this[a(0x1da)][a(0x235)][a(0x23e)]({'options':{'per_page':this[a(0x24a)],'cursor':X}}),w=(Y=(u=d[a(0x246)][a(0x23e)])===null||u===void 0x0?void 0x0:u[a(0x1b0)](P=>P['id']))!==null&&Y!==void 0x0?Y:[];return{'elements':w,'nextCursor':(R=d[a(0x204)])===null||R===void 0x0?void 0x0:R[a(0x202)]};});return this[Q(0x284)](Q(0x1db),S);}),this[M(0x25d)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const L=M;var S;const X=yield this[L(0x1da)][L(0x235)][L(0x22e)][L(0x200)]({}),u=(S=X[L(0x246)][L(0x22e)][L(0x1b0)](Y=>Y['name']))!==null&&S!==void 0x0?S:[];return this['askForResource'](L(0x1d9),u);}),this[M(0x1d2)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const F=M,S=X=>__awaiter(this,void 0x0,void 0x0,function*(){const W=a9E;var u,Y,R;const d=yield this[W(0x1da)][W(0x235)]['cloud'][W(0x1d6)]({'options':{'per_page':this[W(0x24a)],'cursor':X}}),w=(Y=(u=d[W(0x246)]['clusters'])===null||u===void 0x0?void 0x0:u[W(0x1b0)](P=>P['name']))!==null&&Y!==void 0x0?Y:[];return{'elements':w,'nextCursor':(R=d[W(0x204)])===null||R===void 0x0?void 0x0:R[W(0x202)]};});return this[F(0x284)]('cluster\x20id',S);}),this[M(0x29d)]=S=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const i=M;if(_['isUndefined'](S))throw new Error(i(0x1e8));const X=u=>__awaiter(this,void 0x0,void 0x0,function*(){const v=i;var Y;let R=this['defaultPaginationPageSize'];const d=yield this[v(0x1da)][v(0x235)][v(0x286)]({'parameters':{'templateId':S},'options':{'per_page':R,'cursor':u}}),w=d[v(0x246)][v(0x286)][v(0x1b0)](P=>P['id']+v(0x1ca)+P[v(0x1ef)]+')');return{'elements':w,'nextCursor':(Y=d[v(0x204)])===null||Y===void 0x0?void 0x0:Y['cursor']};});return this[i(0x284)](i(0x2b2),X)[i(0x27e)](u=>u['split']('\x20')[0x0]);}),this[M(0x219)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const c1=M,S=X=>__awaiter(this,void 0x0,void 0x0,function*(){const c0=a9E;var u;let Y=this[c0(0x24a)];const R=yield this[c0(0x1da)]['list']['logSinks']({'options':{'per_page':Y,'cursor':X}}),d=R['data'][c0(0x1be)][c0(0x1b0)](w=>w['id']);return{'elements':d,'nextCursor':(u=R[c0(0x204)])===null||u===void 0x0?void 0x0:u[c0(0x202)]};});return this[c1(0x284)]('log\x20sink',S);}),this[M(0x212)]=S=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const c3=M,X=u=>__awaiter(this,void 0x0,void 0x0,function*(){const c2=a9E,Y=yield this[c2(0x1da)][c2(0x235)][c2(0x264)]['all']({'parameters':{'projectId':u}});return Y[c2(0x246)][c2(0x264)]['map'](R=>R['id']);});return this[c3(0x1e3)](c3(0x1c8),X,S);}),this['askForJob']=S=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const c5=M,X=u=>__awaiter(this,void 0x0,void 0x0,function*(){const c4=a9E,Y=yield this[c4(0x1da)][c4(0x235)]['jobs'][c4(0x200)]({'parameters':{'projectId':u}}),R=Y['data'][c4(0x291)][c4(0x1b0)](d=>d['id']);return R;});return this[c5(0x1e3)]('job',X,S);}),this[M(0x206)]=(S,X,u=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const c6=M,Y=c6(0x237),R=d=>w=>__awaiter(this,void 0x0,void 0x0,function*(){const c7=c6;var P;const U=yield this[c7(0x1da)]['get'][c7(0x1bc)][c7(0x20d)]({'parameters':{'projectId':d,'jobId':S},'options':{'per_page':this[c7(0x24a)],'cursor':w}}),p=U[c7(0x246)]['runs'][c7(0x1b0)](q=>q['id']+c7(0x1ca)+q[c7(0x242)]+')');return u&&p['unshift'](Y),{'elements':p,'nextCursor':(P=U[c7(0x204)])===null||P===void 0x0?void 0x0:P[c7(0x202)]};});return this[c6(0x280)](c6(0x23c),R,X,'job:\x20\x27'+S+'\x27')[c6(0x27e)](d=>{const c8=c6,w=d[c8(0x257)]('\x20')[0x0];if(w===Y)return undefined;return w;});}),this[M(0x229)]=(S,X,u,Y=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const c9=M,R=c9(0x1e6);if(u!==undefined){const d=w=>P=>__awaiter(this,void 0x0,void 0x0,function*(){const cc=c9;var U;const p=yield this[cc(0x1da)][cc(0x294)][cc(0x1bc)][cc(0x1de)]({'parameters':{'projectId':w,'jobId':u},'options':{'per_page':this[cc(0x24a)],'cursor':P}}),q=p['data'][cc(0x1de)][cc(0x1b0)](B=>B['id']+'\x20(startedAt:\x20'+B[cc(0x1ef)]+')');return Y&&q[cc(0x1cf)](R),{'elements':q,'nextCursor':(U=p[cc(0x204)])===null||U===void 0x0?void 0x0:U[cc(0x202)]};});return this[c9(0x280)]('job\x20builds',d,S,c9(0x2ad)+u+'\x27')[c9(0x27e)](w=>{const cE=c9,P=w[cE(0x257)]('\x20')[0x0];if(P===R)return undefined;return P;});}if(X!==undefined){const w=P=>U=>__awaiter(this,void 0x0,void 0x0,function*(){const cS=c9;var p;const q=yield this[cS(0x1da)]['get'][cS(0x22f)]['builds']({'parameters':{'projectId':P,'serviceId':X},'options':{'per_page':this[cS(0x24a)],'cursor':U}}),B=q[cS(0x246)][cS(0x1de)]['map'](V=>V['id']+cS(0x1ca)+V[cS(0x1ef)]+')');if(Y)B['unshift'](R);return{'elements':B,'nextCursor':(p=q[cS(0x204)])===null||p===void 0x0?void 0x0:p[cS(0x202)]};});return this[c9(0x280)](c9(0x1b6),w,S,c9(0x2b9)+u+'\x27')[c9(0x27e)](P=>{const cX=c9,U=P[cX(0x257)]('\x20')[0x0];if(U===R)return undefined;return U;});}throw new Error('No\x20builds\x20found');}),this['askForContainer']=(S,X,u,Y=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const cu=M,R=cu(0x210);if(u!==undefined){const d=w=>P=>__awaiter(this,void 0x0,void 0x0,function*(){const cY=cu;var U,p;const q=yield this[cY(0x1da)]['get'][cY(0x1bc)][cY(0x28c)]({'parameters':{'projectId':w,'jobId':u},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':P}}),B=(U=q[cY(0x246)][cY(0x28c)])!==null&&U!==void 0x0?U:[],V=B===null||B===void 0x0?void 0x0:B['map'](g=>g['name']+'\x20(startedAt:\x20'+g['createdAt']+')');return Y&&V[cY(0x1cf)](R),{'elements':V,'nextCursor':(p=q['pagination'])===null||p===void 0x0?void 0x0:p[cY(0x202)]};});return this[cu(0x280)]('job\x20containers',d,S,cu(0x2ad)+u+'\x27')[cu(0x27e)](w=>{const P=w['split']('\x20')[0x0];if(P===R)return undefined;return P;});}if(X!==undefined){const w=P=>U=>__awaiter(this,void 0x0,void 0x0,function*(){const cR=cu;var p,q;const B=yield this[cR(0x1da)][cR(0x294)][cR(0x22f)][cR(0x28c)]({'parameters':{'projectId':P,'serviceId':X},'options':{'per_page':this[cR(0x24a)],'cursor':U}}),V=(p=B['data']['containers'])!==null&&p!==void 0x0?p:[],g=V[cR(0x1b0)](r=>r['name']+cR(0x1ca)+r[cR(0x1ef)]+')');if(Y)g===null||g===void 0x0?void 0x0:g[cR(0x1cf)](R);return{'elements':g,'nextCursor':(q=B['pagination'])===null||q===void 0x0?void 0x0:q['cursor']};});return this[cu(0x280)](cu(0x276),w,S,'service:\x20\x27'+u+'\x27')[cu(0x27e)](P=>{const U=P['split']('\x20')[0x0];if(U===R)return undefined;return U;});}throw new Error(cu(0x1ea));}),this[M(0x208)]=S=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const cw=M,X=u=>__awaiter(this,void 0x0,void 0x0,function*(){const cd=a9E,Y=yield this['apiClient']['list'][cd(0x2a1)][cd(0x200)]({'parameters':{'projectId':u}});return Y[cd(0x246)]['addons'][cd(0x1b0)](R=>R['id']);});return this[cw(0x1e3)](cw(0x1ec),X,S);}),this[M(0x1ba)]=(S,X)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const cU=M,u=Y=>R=>__awaiter(this,void 0x0,void 0x0,function*(){const cP=a9E;var d;const w=yield this[cP(0x1da)]['get'][cP(0x1ec)][cP(0x2b0)]({'parameters':{'projectId':Y,'addonId':X},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':R}});return{'elements':w[cP(0x246)][cP(0x2b0)][cP(0x1b0)](P=>P['id']+cP(0x1c6)+(P[cP(0x23d)]||cP(0x25f))+')'),'nextCursor':(d=w['pagination'])===null||d===void 0x0?void 0x0:d['cursor']};});return this[cU(0x280)](cU(0x2b0),u,S,cU(0x262)+X+'\x27')[cU(0x27e)](Y=>Y['split']('\x20')[0x0]);}),this[M(0x26b)]=(S,X,u)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const cq=M,Y=R=>d=>__awaiter(this,void 0x0,void 0x0,function*(){const cp=a9E;var w;const P=yield this[cp(0x1da)]['get'][cp(0x1ec)][cp(0x1e2)][cp(0x247)]({'parameters':{'projectId':R,'addonId':X,'backupId':u},'options':{'per_page':this[cp(0x24a)],'cursor':d}});return{'elements':P[cp(0x246)][cp(0x247)][cp(0x1b0)](U=>U['id']+'\x20(completedAt:\x20'+(U[cp(0x23d)]||cp(0x25f))+')'),'nextCursor':(w=P[cp(0x204)])===null||w===void 0x0?void 0x0:w['cursor']};});return this['askForProjectScopedResourcePaginated']('restore',Y,S,'addon:\x20\x27'+X+'\x27')[cq(0x27e)](R=>R[cq(0x257)]('\x20')[0x0]);}),this[M(0x20b)]=S=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const cV=M,X=u=>__awaiter(this,void 0x0,void 0x0,function*(){const cB=a9E;return(yield this[cB(0x1da)]['list'][cB(0x21c)]({'parameters':{'projectId':u}}))['data']['map'](Y=>Y['id']);});return this[cV(0x1e3)](cV(0x26d),X,S);}),this[M(0x231)]=S=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const cr=M,X=u=>__awaiter(this,void 0x0,void 0x0,function*(){const cg=a9E,Y=yield this[cg(0x1da)][cg(0x235)][cg(0x252)][cg(0x200)]({'parameters':{'projectId':u}});return Y['data'][cg(0x252)][cg(0x1b0)](R=>R['id']);});return this[cr(0x1e3)](cr(0x250),X,S);}),this[M(0x1e7)]=S=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const cH=M,X=yield this[cH(0x1da)]['get'][cH(0x282)]({'parameters':{'domain':S}}),u=X['data'][cH(0x1f1)]['map'](R=>R['name']+cH(0x2bb)+R['fullName']+')'),Y=cH(0x1f5)+S+')';return this['askForResource'](cH(0x1c2),u,Y)[cH(0x27e)](R=>R['split']('\x20')[0x0]);}),this['askForSubdomainPath']=(S,X)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const cf=M,u=yield this[cf(0x1da)]['list'][cf(0x1c2)]['path']({'parameters':{'domain':S,'subdomain':X}}),Y=u[cf(0x246)]['paths'][cf(0x1b0)](w=>''+w[cf(0x211)]),R=cf(0x1f5)+S+'),\x20subdomain\x20('+X+')';return this['askForResource'](cf(0x255),Y,R);}),this[M(0x1d4)]=S=>__awaiter(this,void 0x0,void 0x0,function*(){const cZ=M;return(yield inquirer[cZ(0x277)]([{'type':cZ(0x281),'name':cZ(0x24d),'message':chalk_1[cZ(0x1f7)][cZ(0x1c7)](cZ(0x290)+(S||cZ(0x2b4))+cZ(0x1fd)),'default':![]}]))['confirmation'];}),this[M(0x2aa)]=(S,X)=>__awaiter(this,void 0x0,void 0x0,function*(){const cK=M;_[cK(0x1dd)](S['name'])&&(X['length']<=0x0?_[cK(0x279)](S,cK(0x1cd),cK(0x1f7)):yield(0x0,utils_1[cK(0x268)])(0xa)(()=>__awaiter(this,void 0x0,void 0x0,function*(){const ct=cK,{name:u}=yield inquirer[ct(0x277)]([{'type':ct(0x260),'name':ct(0x1cd),'message':'Choose\x20the\x20name\x20of\x20the\x20new\x20local\x20context:','default':ct(0x287)}]);if(!S[ct(0x273)]&&X[ct(0x1d3)](Y=>Y[ct(0x1cd)]===u)){const {c:Y}=yield inquirer[ct(0x277)]([{'type':ct(0x281),'name':'c','message':'Context\x20with\x20name\x20\x27'+u+ct(0x1cc),'default':![]}]);if(Y===![])throw new Error(ct(0x25e));_['set'](S,ct(0x273),!![]);}_[ct(0x279)](S,ct(0x1cd),u);})));if(_['isUndefined'](S[cK(0x1f9)])){const u=yield this['tokenPrompt']();_[cK(0x279)](S,cK(0x1f9),u);}return S;}),this[M(0x28e)]=()=>__awaiter(this,void 0x0,void 0x0,function*(){const cG=M,{token:S}=yield inquirer[cG(0x277)]([{'type':cG(0x224),'name':cG(0x1f9),'mask':'*','message':cG(0x243)}]);return S;}),inquirer[M(0x267)]('search-list',inquirerSearchList),inquirer[M(0x267)](M(0x1c0),inquirer_pagination_prompt_1[M(0x21e)]);}[a9f(0x1e4)](E,S){return __awaiter(this,void 0x0,void 0x0,function*(){const cb=a9E,X=yaml[cb(0x2ab)](E),u=_[cb(0x1ee)](X[cb(0x257)]('\x0a')[cb(0x1b0)](d=>d[cb(0x2a3)])),Y=chalk_1['default'][cb(0x256)]('-'['repeat'](u)+'\x0a'),{confirm:R}=yield inquirer['prompt']([{'type':'list','name':cb(0x281),'message':''+chalk_1[cb(0x1f7)][cb(0x1bf)][cb(0x254)]('Please\x20confirm\x20following\x20configuration:\x0a')+Y+chalk_1['default'][cb(0x1f6)](X)+Y,'choices':Object[cb(0x240)](ConfirmChoices)}]);switch(R){case ConfirmChoices[cb(0x213)]:return E;case ConfirmChoices[cb(0x2c3)]:throw new Error(cb(0x261));case ConfirmChoices[cb(0x2c0)]:return this[cb(0x2c4)](S);case ConfirmChoices[cb(0x2a8)]:return this[cb(0x1e4)](yield this['editPayload'](E),S);case ConfirmChoices['SAVE']:yield this[cb(0x297)](E);return this[cb(0x1e4)](E,S);default:throw new Error(cb(0x289));}});}[a9f(0x2c4)](E,S){return __awaiter(this,void 0x0,void 0x0,function*(){const cl=a9E;if((S===null||S===void 0x0?void 0x0:S[cl(0x20c)])!==undefined)this[cl(0x20c)]=S===null||S===void 0x0?void 0x0:S[cl(0x20c)];this['tmpCmdPath']=S===null||S===void 0x0?void 0x0:S[cl(0x218)],this[cl(0x22d)]=S===null||S===void 0x0?void 0x0:S['skipValidation'];const X={};return yield this[cl(0x220)]([],E[cl(0x283)]['body'],X),this[cl(0x20c)]=X,yield this['confirmationPrompt'](X,E);});}['propToType'](E,S,X,u){return __awaiter(this,void 0x0,void 0x0,function*(){const cA=a9E;let Y;if(S[cA(0x2a4)]&&!_[cA(0x2ac)](S,cA(0x2be))){if(S[cA(0x2a4)][cA(0x2a3)]>0x1){const {choice:R}=yield inquirer[cA(0x277)]([{'type':'list','name':cA(0x1d8),'message':'What\x27s\x20the\x20'+(E[E['length']-0x1]||'')+cA(0x1ae),'choices':S[cA(0x2a4)][cA(0x1b0)](d=>{const cI=cA;var w;return(w=d[cI(0x1c4)])!==null&&w!==void 0x0?w:'??';})}]);Y=yield this[cA(0x24f)](E,S['oneOf'][cA(0x1d3)](d=>d[cA(0x1c4)]===R),X,u);}else{const d=S[cA(0x2a4)][0x0];_['set'](d,cA(0x1c4),S['description']),Y=yield this[cA(0x24f)](E,d,X,u);}Y={};}else{if(S[cA(0x1b8)]&&!_[cA(0x2ac)](S,cA(0x2be))){if(S[cA(0x1b8)][cA(0x2a3)]>0x1){const {choice:w}=yield inquirer[cA(0x277)]([{'type':cA(0x235),'name':cA(0x1d8),'message':cA(0x23a)+(E[E[cA(0x2a3)]-0x1]||'')+cA(0x1ae),'choices':[...S[cA(0x1b8)][cA(0x1b0)](P=>{const cT=cA;var U;return(U=P[cT(0x1c4)])!==null&&U!==void 0x0?U:'??';}),cA(0x29a)]}]);w!==cA(0x29a)&&(Y=yield this[cA(0x24f)](E,S[cA(0x1b8)][cA(0x1d3)](P=>P[cA(0x1c4)]===w),X,u));}else{const P=S['anyOf'][0x0];_[cA(0x279)](P,cA(0x1c4),S['description']),Y=yield this[cA(0x24f)](E,P,X,u);}Y={};}else Y=yield this[cA(0x24f)](E,S,X,u);}return Y;});}['getInnerType'](E,S,X,u){var Y;return __awaiter(this,void 0x0,void 0x0,function*(){const cM=a9E;if(u===![]){const {addEntry:w}=yield inquirer['prompt']([{'type':'confirm','name':cM(0x2bd),'message':this[cM(0x227)](S,cM(0x223),E===null||E===void 0x0?void 0x0:E[cM(0x1c4)]),'default':![]}]);if(!w)return X;}const R=Object[cM(0x25c)]((Y=E===null||E===void 0x0?void 0x0:E[cM(0x2be)])!==null&&Y!==void 0x0?Y:[]),d=E[cM(0x226)]||[];if(R[cM(0x2a3)]>0x0)for(const P of R){const U=S['concat'](P);if(S[cM(0x2a3)]>0x0&&!_[cM(0x2ac)](X,S[cM(0x232)]('.')))_[cM(0x279)](X,S['join']('.'),{});yield this[cM(0x220)](U,E[cM(0x2be)][P],X,d[cM(0x27d)](P));}else yield this[cM(0x24f)](S,Object['assign'](Object[cM(0x1bb)]({},E),{'type':cM(0x24e)}),X,u);return X;});}[a9f(0x28b)](E,S,X,u){return __awaiter(this,void 0x0,void 0x0,function*(){const cm=a9E;if(S&&X)return!![];const Y=S?'Do\x20you\x20want\x20to\x20add':cm(0x1c9),{addEntry:R}=yield inquirer[cm(0x277)]([{'type':cm(0x281),'name':cm(0x2bd),'message':this[cm(0x227)](E,Y,S?u:undefined),'default':![]}]);return R;});}[a9f(0x24f)](E,S,X,u){return __awaiter(this,void 0x0,void 0x0,function*(){const cN=a9E;let Y;const R=E[cN(0x232)]('.');switch(S===null||S===void 0x0?void 0x0:S[cN(0x209)]){case cN(0x203):{let d=!![];while(yield this[cN(0x28b)](E,d,u,S===null||S===void 0x0?void 0x0:S[cN(0x1c4)])){const w=_['get'](X,R);_[cN(0x27f)](X,R),yield this[cN(0x24f)](E,S['items'],X);const P=_[cN(0x294)](X,R);!_[cN(0x1bd)](w)?_[cN(0x279)](X,R,[P]):(w[cN(0x21f)](P),_[cN(0x279)](X,R,w)),d=![];}return Y||[];}case cN(0x29b):{return Y=yield this[cN(0x26f)](S,E,X,u),Y;}case'rawObject':Y=(0x0,utils_1[cN(0x1ff)])(yield this[cN(0x26a)](E,S,u))||undefined;break;case cN(0x22a):case cN(0x26c):case'integer':default:Y=yield this[cN(0x26a)](E,S,u,X);break;}return!_['isUndefined'](Y)&&_[cN(0x279)](X,R,Y),Y;});}[a9f(0x26a)](E,S,X,u){var Y;return __awaiter(this,void 0x0,void 0x0,function*(){const cz=a9E,R=E[E[cz(0x2a3)]-0x1],{defaultValue:defaultValue=(Y=S===null||S===void 0x0?void 0x0:S[cz(0x1fc)])!==null&&Y!==void 0x0?Y:S===null||S===void 0x0?void 0x0:S[cz(0x1f7)],choices:choices=S===null||S===void 0x0?void 0x0:S['enum'],pagination:d}=yield(0x0,api_helpers_1[cz(0x2a7)])(R,this[cz(0x1da)],this[cz(0x1b3)],u,this[cz(0x2bc)],E);let w=cz(0x260);if(!_['isUndefined'](choices)&&choices[cz(0x2a3)]>0x0){if(d!==undefined&&d[cz(0x275)]!==undefined)w=cz(0x1c0);else choices['length']>0x4&&typeof choices[0x0]==='string'?w=cz(0x1dc):w=cz(0x235);}else{if((S===null||S===void 0x0?void 0x0:S[cz(0x209)])===cz(0x26c))w=cz(0x281);else{if((S===null||S===void 0x0?void 0x0:S[cz(0x209)])===cz(0x1f4))w=cz(0x260);else(S===null||S===void 0x0?void 0x0:S['type'])===cz(0x24e)&&(w=cz(0x2c1));}}let P=X!==![]?!_['isObject'](defaultValue)?defaultValue:JSON[cz(0x21a)](defaultValue):_[cz(0x258)](defaultValue)?defaultValue:'don\x27t\x20change';if(choices)P=P[cz(0x27b)]();_[cz(0x2ac)](this[cz(0x20c)],E[cz(0x232)]('.'))&&(P=this[cz(0x20c)][E[cz(0x232)]('.')]);const U=choices&&X===![]?[cz(0x29a),...choices]:choices,p=(S===null||S===void 0x0?void 0x0:S[cz(0x209)])===cz(0x1f4),q=Object[cz(0x1bb)]({'type':w,'name':'id','message':this[cz(0x1e1)](E,S),'choices':U,'default':P,'filter':this['filter'](w,X),'validate':this[cz(0x26e)](S,X,p)},d),B=(yield inquirer[cz(0x277)]([q]))['id'];if(B===cz(0x29a)||B==='')return undefined;if(p)return parseInt(B,0xa);return B;});}[a9f(0x1e1)](E,S){const cJ=a9f,X=(S===null||S===void 0x0?void 0x0:S[cJ(0x209)])!==cJ(0x26c)?'What\x20do\x20you\x20want\x20to\x20use\x20as':cJ(0x251);return this['getPathString'](E,X,S===null||S===void 0x0?void 0x0:S['description']);}[a9f(0x21d)](){return __awaiter(this,void 0x0,void 0x0,function*(){const cO=a9E,E=yield this[cO(0x1da)]['list'][cO(0x20a)]['all']({})['then'](S=>S[cO(0x246)]['projects'][cO(0x1b0)](X=>X['id']));return yield this[cO(0x1cb)](cO(0x270),E);});}[a9f(0x1e3)](E,S,X,u){return __awaiter(this,void 0x0,void 0x0,function*(){const cC=a9E,Y=X||this[cC(0x1da)][cC(0x245)][cC(0x1af)]();if(_['isUndefined'](Y))throw new Error(cC(0x1eb));const R=yield S(Y);return yield this[cC(0x1cb)](E,R,(u?u+cC(0x1e0):'')+cC(0x263)+Y+'\x27');});}[a9f(0x280)](E,S,X,u){return __awaiter(this,void 0x0,void 0x0,function*(){const ck=a9E,Y=X||this['apiClient'][ck(0x245)][ck(0x1af)]();if(_[ck(0x1dd)](Y))throw new Error(ck(0x1eb));const R=yield S(Y);return yield this[ck(0x284)](E,R,(u?u+ck(0x1e0):'')+ck(0x263)+Y+'\x27');});}[a9f(0x1e5)](){return __awaiter(this,void 0x0,void 0x0,function*(){const co=a9E,E=yield this[co(0x1da)]['list']['domains'][co(0x200)]({}),S=E['data']['domains'][co(0x1b0)](X=>X['name']);return this[co(0x1cb)](co(0x282),S);});}[a9f(0x2b1)](){return __awaiter(this,void 0x0,void 0x0,function*(){const cy=a9E,E=yield this[cy(0x1da)][cy(0x235)][cy(0x244)][cy(0x200)]({}),S=E[cy(0x246)]['credentials'][cy(0x1b0)](X=>X['id']);return this['askForResource'](cy(0x2af),S);});}[a9f(0x24c)](E){const ce=a9f;this[ce(0x2bc)]=E;}}exports['InquirerHelper']=InquirerHelper;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a10t=a10E;(function(c,E){const K=a10E,S=c();while(!![]){try{const X=-parseInt(K(0xb4))/0x1*(parseInt(K(0xaa))/0x2)+parseInt(K(0xc4))/0x3*(parseInt(K(0x9f))/0x4)+-parseInt(K(0xc7))/0x5+parseInt(K(0x9b))/0x6*(parseInt(K(0xc8))/0x7)+-parseInt(K(0x89))/0x8*(parseInt(K(0x9c))/0x9)+parseInt(K(0x87))/0xa*(-parseInt(K(0xa1))/0xb)+parseInt(K(0x9d))/0xc;if(X===E)break;else S['push'](S['shift']());}catch(u){S['push'](S['shift']());}}}(a10c,0x9ae82));function a10c(){const n=['NorthflankApiBrowserLogin','removeListener','3554QkaCvk','error','error\x20happened\x20during\x20browser\x20login:\x20','exit','data','end','SIGINT','Failure\x20during\x20login:\x20','login-success','startLogin','open','type','done','ws:','call','message','18kBNYoc','replace','handleError','2219305WUvhKN','613291GRDmDz','idle','apply','__importStar','EventEmitter','createWebSocketStream','write','6104180gOxIHp','Login\x20process\x20stopped\x20before\x20completed','3664PSflyk','catch','duplex','Failed\x20to\x20establish\x20connection\x20to\x20command\x20execution\x20proxy:\x20','init-ack','parse','events','default','configurable','wss:','throw','aborted','__importDefault','initPackage','prototype','__setModuleDefault','agent','next','18KrUtbX','14220FwKqna','27442488zbiBOx','openBrowser','722940EAnRrI','writable','22knePbc','emit','Unable\x20to\x20open\x20browser:\x20','baseUrl','__esModule','success','stringify','getOwnPropertyDescriptor','init','344UbDCet','toString','status','Unexpected\x20response,\x20api\x20token\x20missing','login-failure','defineProperty','finally','create'];a10c=function(){return n;};return a10c();}var __createBinding=this&&this['__createBinding']||(Object[a10t(0xb1)]?function(c,E,S,X){const G=a10t;if(X===undefined)X=S;var u=Object[G(0xa8)](E,S);(!u||('get'in u?!E[G(0xa5)]:u[G(0xa0)]||u[G(0x91)]))&&(u={'enumerable':!![],'get':function(){return E[S];}}),Object['defineProperty'](c,X,u);}:function(c,E,S,X){if(X===undefined)X=S;c[X]=E[S];}),__setModuleDefault=this&&this[a10t(0x98)]||(Object['create']?function(c,E){const b=a10t;Object[b(0xaf)](c,b(0x90),{'enumerable':!![],'value':E});}:function(c,E){const l=a10t;c[l(0x90)]=E;}),__importStar=this&&this[a10t(0xcb)]||function(c){const A=a10t;if(c&&c[A(0xa5)])return c;var E={};if(c!=null){for(var S in c)if(S!==A(0x90)&&Object[A(0x97)]['hasOwnProperty'][A(0xc2)](c,S))__createBinding(E,c,S);}return __setModuleDefault(E,c),E;},__awaiter=this&&this['__awaiter']||function(c,E,S,X){function u(Y){return Y instanceof S?Y:new S(function(R){R(Y);});}return new(S||(S=Promise))(function(Y,R){const m=a10E;function d(p){const I=a10E;try{U(X[I(0x9a)](p));}catch(q){R(q);}}function w(p){const T=a10E;try{U(X[T(0x93)](p));}catch(q){R(q);}}function U(p){const M=a10E;p[M(0xc0)]?Y(p['value']):u(p['value'])['then'](d,w);}U((X=X[m(0xca)](c,E||[]))['next']());});},__importDefault=this&&this[a10t(0x95)]||function(c){const N=a10t;return c&&c[N(0xa5)]?c:{'default':c};};Object['defineProperty'](exports,a10t(0xa5),{'value':!![]}),exports[a10t(0xb2)]=void 0x0;const ws_1=__importStar(require('ws')),open_1=__importDefault(require(a10t(0xbe))),events_1=require(a10t(0x8f));function a10E(c,E){const S=a10c();return a10E=function(X,u){X=X-0x87;let Y=S[X];return Y;},a10E(c,E);}class NorthflankApiBrowserLogin extends events_1[a10t(0xcc)]{constructor(c,E=!![],S){const z=a10t;super(),this[z(0xa4)]=c,this['openBrowser']=E,this[z(0x99)]=S,this[z(0xac)]=z(0xc9),this[z(0x96)]=()=>JSON[z(0xa7)]({'type':z(0xa9)});}[a10t(0xbd)](){const J=a10t;var c;const E=this[J(0xa4)][J(0xc5)]('https:',J(0x92))[J(0xc5)]('http:',J(0xc1)),S=E+'/v1/cli-login',X=new ws_1[(J(0x90))](S,{'agent':this['agent']}),u=()=>__awaiter(this,void 0x0,void 0x0,function*(){const C=J;yield new Promise(R=>{const O=a10E;var d;(d=this['duplex'])===null||d===void 0x0?void 0x0:d[O(0xb9)](JSON['stringify']({'type':O(0x94)}),()=>R());}),process[C(0xb7)]();}),Y=new Promise((R,d)=>{const k=J;var w,P,U;try{this[k(0x8b)]=(0x0,ws_1[k(0xcd)])(X),process['on'](k(0xba),u);}catch(p){d(new Error(k(0x8c)+p[k(0xc3)]));}(w=this[k(0x8b)])===null||w===void 0x0?void 0x0:w['on'](k(0xb8),q=>{const o=k;var B;const V=JSON[o(0x8e)](q[o(0xab)]());switch(V===null||V===void 0x0?void 0x0:V[o(0xbf)]){case o(0x8d):{const {loginPage:g}=V;if(g===undefined){this[o(0xc6)]('Unexpected\x20response',d);return;}this[o(0x9e)]&&(0x0,open_1[o(0x90)])(g)[o(0x8a)](r=>{const y=o,H=y(0xa3)+r[y(0xc3)];this[y(0xc6)](H,d);});this[o(0xa2)]('browser-opened',{'url':g});break;}case o(0xbc):{const {apiToken:r,contextName:H}=V;if(r===undefined){this['handleError'](o(0xad),d);return;}(B=this[o(0x8b)])===null||B===void 0x0?void 0x0:B[o(0xb9)](),R({'token':r,'contextName':H}),this['status']=o(0xa6);break;}case o(0xae):{const f=o(0xbb)+(V===null||V===void 0x0?void 0x0:V[o(0xc3)]);this[o(0xc6)](f,d);break;}default:{const Z='unable\x20to\x20parse\x20message:\x20'+JSON[o(0xa7)](V);this['handleError'](Z,d);}}}),(P=this['duplex'])===null||P===void 0x0?void 0x0:P['on'](k(0xb5),q=>{const e=k;this['handleError'](e(0xb6)+q[e(0xc3)],d);}),(U=this[k(0x8b)])===null||U===void 0x0?void 0x0:U['on'](k(0xb9),()=>{const D=k;if(this[D(0xac)]==='success'){}else this[D(0xc6)](D(0x88),d);});});return(c=this['duplex'])===null||c===void 0x0?void 0x0:c[J(0xce)](this[J(0x96)]()),this[J(0xac)]=J(0xa9),Y[J(0xb0)](()=>{const x=J;process[x(0xb3)](x(0xba),u);});}[a10t(0xc6)](c,E){const h=a10t;var S,X;E?(S=this[h(0x8b)])===null||S===void 0x0?void 0x0:S[h(0xb9)](()=>E(new Error(c))):(X=this['duplex'])===null||X===void 0x0?void 0x0:X[h(0xb9)](),this[h(0xac)]=h(0xb5);}}exports['NorthflankApiBrowserLogin']=NorthflankApiBrowserLogin;
|
package/dist/logs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a10u=a10v;(function(T,v){const j=a10v,W=T();while(!![]){try{const l=parseInt(j(0x1c9))/0x1+-parseInt(j(0x1f8))/0x2+parseInt(j(0x198))/0x3*(parseInt(j(0x1e3))/0x4)+parseInt(j(0x192))/0x5+parseInt(j(0x1b8))/0x6*(parseInt(j(0x18b))/0x7)+parseInt(j(0x17d))/0x8+-parseInt(j(0x1fa))/0x9;if(l===v)break;else W['push'](W['shift']());}catch(N){W['push'](W['shift']());}}}(a10T,0x75d6f));var __awaiter=this&&this[a10u(0x1cd)]||function(T,v,W,l){function N(y){return y instanceof W?y:new W(function(D){D(y);});}return new(W||(W=Promise))(function(y,D){const T0=a10v;function w(U){const q=a10v;try{I(l[q(0x203)](U));}catch(k){D(k);}}function e(U){try{I(l['throw'](U));}catch(k){D(k);}}function I(U){const L=a10v;U[L(0x207)]?y(U[L(0x193)]):N(U[L(0x193)])['then'](w,e);}I((l=l[T0(0x1e6)](T,v||[]))[T0(0x203)]());});},__importDefault=this&&this[a10u(0x190)]||function(T){const T1=a10u;return T&&T[T1(0x1c7)]?T:{'default':T};};function a10T(){const Ty=['jobId','--backup\x20--backupId\x20[backupId]','941577lLrMeD','runId','--noDefaults','Filter\x20log\x20lines\x20to\x20not\x20include\x20this\x20text','parseDateInput','__importDefault','tail','302125FAbXxK','value','CliLogs','Restore\x20to\x20get\x20logs\x20from','regexNotIncludes','serviceId','294HEvsrJ','--restore\x20--restoreId\x20[restoreId]','getLogsCommand','askForBuild','defineProperty','bold','--textNotIncludes\x20<text>','charAt','\x20with\x20live-tailing','addonRestore','addOption','Log\x20session\x20ended','values','Container\x20to\x20exec\x20into\x20(logs\x20from\x20all\x20containers\x20will\x20be\x20shown\x20if\x20not\x20specified)','inquirerHelper','\x0aDetails:\x20','job','Only\x20two\x20of\x20\x27startTime\x27,\x20\x27endTime\x27\x20and\x20\x27duration\x27\x20can\x20be\x20set.','choices','--build\x20--buildId\x20[buildId]','Output\x20formatting.\x20Will\x20use\x20advanced\x20formatting\x20by\x20default.','../inquirer-helper','LogType','getCurrentJobName','addonBackup','log','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','pagination','error','slice','Number\x20of\x20lines\x20to\x20return.','InquirerHelper','24ZaVuBG','argParser','Id\x20[','forward','-o,\x20--output\x20[output]','toUpperCase','Id]','close','\x27Ctrl+C\x27','option','--textIncludes\x20<text>','\x20for\x20all\x20containers','Get\x20logs\x20generated\x20before\x20this\x20time,\x20','@northflank/js-client','>\x20Container\x20logs','__esModule','noDefaults','758101hoxLup','askForAddonBackup','backupId','conflicts','__awaiter','assertContextExisting','\x20in\x20project\x20','textNotIncludes',',\x20backup\x20id\x20','Job\x20run\x20id,\x20example:\x20162b1977-6636-4000-929b-cc265b862ff0','Option','chalk','printResponse','--startTime\x20<timestamp>','askForAddon',',\x20to:\x20','Get\x20logs\x20generated\x20after\x20this\x20time,\x20','\x20(exit\x20with\x20','Get\x20log\x20for\x20the\x20specified\x20','\x20seconds','length','askForService','commander','formatLogLine','../formatting/console-format-helpers','containerId','30868ymefiO','getSeconds','logTail','apply','start','warning','buildId','ApiClient',',\x20restore\x20id\x20','\x20for\x20container\x20','message','format','deploymentId','askForJob',',\x20from:\x20','details','Filter\x20log\x20lines\x20to\x20not\x20match\x20this\x20regular\x20expression','-d,\x20--direction\x20<order>','logsApiClient','getCommand','yaml','476504bNKpGF','getCurrentProjectName','16028064cyeGlD','service','textIncludes','askForContainer','Length\x20of\x20timespan\x20in\x20seconds.\x20Only\x20valid\x20if\x20not\x20both,\x20startTime\x20and\x20endTime\x20are\x20set','Tail\x20will\x20stream\x20logs\x20in\x20real-time.\x20Session\x20will\x20be\x20kept\x20open.','--duration\x20[duration]','json','--regexNotIncludes\x20<regex>','next','setSeconds','printInitInfo','askForJobRun','done','logs','-f,\x20--tail','--deployment\x20--deploymentId\x20[deploymentId]','getFormatter','-t,\x20--types\x20<types...>','Direction\x20of\x20logs.\x20Ignored\x20when\x20tailing.','defaultDurationSeconds','apiClient','Filter\x20log\x20lines\x20to\x20match\x20this\x20regular\x20expression','assign','restoreId','Filter\x20log\x20lines\x20to\x20include\x20this\x20text',',\x20duration:\x20','yml','regexIncludes','--container\x20--containerId\x20[containerId]','name','stringify','getStandardLogCommand','Which\x20log\x20types\x20to\x20fetch','valueOf','Project\x20for\x20logs','3111864CBDSxe','No\x20logs\x20found\x20for\x20this\x20query.\x20Make\x20sure\x20to\x20select\x20an\x20appropriate\x20time\x20window.','tsHint','customUserAgent','default','description','Error\x20while\x20tailing\x20log\x20lines:\x20','toISOString','Element\x20count\x20for\x20this\x20request\x20exceeds\x20the\x20line\x20limit,\x20output\x20was\x20truncated.\x20Cut\x20off\x20at\x20timestamp\x20','\x20--','askForAddonRestore','alias'];a10T=function(){return Ty;};return a10T();}function a10v(T,v){const W=a10T();return a10v=function(l,N){l=l-0x16a;let y=W[l];return y;},a10v(T,v);}Object[a10u(0x19c)](exports,a10u(0x1c7),{'value':!![]}),exports[a10u(0x194)]=void 0x0;const js_client_1=require(a10u(0x1c5)),chalk_1=__importDefault(require(a10u(0x1d4))),utils_1=require('../utils'),inquirer_helper_1=require(a10u(0x1ad)),commander_1=require(a10u(0x1df)),console_format_helpers_1=require(a10u(0x1e1)),log_formatter_1=require('./log-formatter');class CliLogs{constructor(T){const T2=a10u;this['apiContext']=T,this[T2(0x16d)]=0x708,this[T2(0x179)]=(v,W,l,N)=>{const T3=T2,y=(0x0,utils_1[T3(0x1f6)])(!![])[T3(0x177)]((W?'build-':'')+T3(0x208))[T3(0x188)]((W?'build-':'')+T3(0x1b1))[T3(0x182)](T3(0x1db)+v)[T3(0x1c1)]('--project\x20--projectId\x20[projectId]',T3(0x17c))['option']('--'+v+T3(0x186)+v+T3(0x1ba)+v+T3(0x1be),v[T3(0x19f)](0x0)[T3(0x1bd)]()+v[T3(0x1b5)](0x1)+'\x20to\x20get\x20logs\x20from')['option'](T3(0x176),T3(0x1a5));if(W)y[T3(0x1c1)](T3(0x1ab),'Build\x20to\x20get\x20logs\x20from');if(v===T3(0x1a8))y[T3(0x1c1)]('--run\x20--runId\x20[runId]',T3(0x1d2));if(v===T3(0x1fb))y[T3(0x1c1)](T3(0x20a),'Deployment\x20id,\x20example:\x20my-service-54785f4');if(l)y['option'](T3(0x18a),'Backup\x20to\x20get\x20logs\x20from');if(N)y[T3(0x1c1)](T3(0x199),T3(0x195));return!W&&!l&&!N&&y[T3(0x1a2)](new commander_1['Option'](T3(0x16b),T3(0x17a))[T3(0x1aa)](Object[T3(0x1a4)](js_client_1[T3(0x1ae)]))),y['option'](T3(0x209),T3(0x1ff))[T3(0x1c1)]('-l,\x20--lineLimit\x20[limit]',T3(0x1b6))[T3(0x1c1)](T3(0x1d6),T3(0x1d9)+utils_1[T3(0x17f)],utils_1[T3(0x18f)])[T3(0x1a2)](new commander_1[(T3(0x1d3))]('--endTime\x20<timestamp>',T3(0x1c4)+utils_1[T3(0x17f)])[T3(0x1b9)](utils_1[T3(0x18f)])[T3(0x1cc)]([T3(0x191)]))[T3(0x1c1)](T3(0x200),T3(0x1fe))['addOption'](new commander_1[(T3(0x1d3))](T3(0x1f4),T3(0x16c))[T3(0x1aa)](['backward',T3(0x1bb)])[T3(0x1cc)](['tail']))[T3(0x1a2)](new commander_1['Option'](T3(0x1c2),T3(0x172))[T3(0x1cc)]([T3(0x1d0),T3(0x175),T3(0x196)]))[T3(0x1a2)](new commander_1[(T3(0x1d3))](T3(0x19e),T3(0x18e))[T3(0x1cc)]([T3(0x1fc),T3(0x175),T3(0x196)]))['addOption'](new commander_1['Option']('--regexIncludes\x20<regex>',T3(0x16f))[T3(0x1cc)]([T3(0x1d0),T3(0x1fc),T3(0x196)]))[T3(0x1a2)](new commander_1[(T3(0x1d3))](T3(0x202),T3(0x1f3))[T3(0x1cc)]([T3(0x1d0),'regexIncludes',T3(0x1fc)]))['option'](T3(0x18d),T3(0x1b2),![])[T3(0x1a2)](new commander_1[(T3(0x1d3))](T3(0x1bc),T3(0x1ac))[T3(0x1aa)](Object[T3(0x1a4)]([T3(0x1ee),T3(0x201),T3(0x1f7)]))),y;},this[T2(0x205)]=(v,W,l,N)=>{const T4=T2,{containerName:y,restoreId:D,backupId:w,quiet:e,tail:I,startTime:U,endTime:k,duration:x}=N;if(e===!![])return;const B=I?T4(0x1da)+chalk_1[T4(0x181)][T4(0x19d)](T4(0x1c0))+')':'',o=I?T4(0x1a0):'',s=new Date(),Y=U!==null&&U!==void 0x0?U:new Date(new Date((k!==null&&k!==void 0x0?k:s)[T4(0x17b)]())[T4(0x204)]((k!==null&&k!==void 0x0?k:s)['getSeconds']()-(x!==null&&x!==void 0x0?x:this[T4(0x16d)]))),a=(k!==null&&k!==void 0x0?k:U!==undefined)?new Date(new Date(U[T4(0x17b)]())['setSeconds'](U[T4(0x1e4)]()+(x!==null&&x!==void 0x0?x:this[T4(0x16d)]))):s,G=w!==undefined,H=Y&&!G?T4(0x1f1)+chalk_1['default'][T4(0x19d)](Y[T4(0x184)]()):'',A=a&&!G?T4(0x1d8)+chalk_1[T4(0x181)]['bold'](a[T4(0x184)]()):'',m=x?T4(0x173)+x+T4(0x1dc):'',g=y?T4(0x1ec)+chalk_1[T4(0x181)]['bold'](y):G?'':T4(0x1c3),F=w?T4(0x1d1)+w:'',K=D?T4(0x1eb)+D:'',t=v+'\x20'+chalk_1[T4(0x181)]['bold'](W)+F+K+T4(0x1cf)+chalk_1['default'][T4(0x19d)](l),C=''+H+A+m;console[T4(0x1b1)](T4(0x1c6)+o+g+'\x20of\x20'+t+C+B+':');},this['getFormatter']=(v,W)=>(l,N)=>{const T5=T2;if(!v){if(l[T5(0x1dd)]===0x0)console['log'](T5(0x17e));l['forEach'](y=>(0x0,log_formatter_1[T5(0x1e0)])(y,W));}else(0x0,console_format_helpers_1[T5(0x1d5)])(v,l);(N===null||N===void 0x0?void 0x0:N['hasNextPage'])&&(0x0,utils_1[T5(0x1e8)])(T5(0x185)+N['cursor']);},this[T2(0x16e)]=new js_client_1[(T2(0x1ea))](T,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[T2(0x180)]}),this[T2(0x1f5)]=this[T2(0x16e)],this[T2(0x1a6)]=new inquirer_helper_1[(T2(0x1b7))](this[T2(0x16e)]);}[a10u(0x19a)](T,v=![],W=![],l=![]){const Tl=a10u,N=(k,x)=>__awaiter(this,void 0x0,void 0x0,function*(){const T6=a10v,B=x[T6(0x1c8)],{apiContext:o,inquirerHelper:s}=this;switch(T){case T6(0x1fb):{const Y=B?undefined:o['getCurrentServiceName']();return x[T6(0x197)]||Y||(yield s[T6(0x1de)](k)());}case T6(0x1a8):{const a=B?undefined:o[T6(0x1af)]();return x[T6(0x189)]||a||(yield s[T6(0x1f0)](k)());}case'addon':{return x['addonId']||(yield s[T6(0x1d7)](k)());}}}),y=(k,x,B)=>__awaiter(this,void 0x0,void 0x0,function*(){const T7=a10v;if(v)return B[T7(0x1e9)]||(yield this['inquirerHelper'][T7(0x19b)](k,T===T7(0x1fb)?x:undefined,T===T7(0x1a8)?x:undefined,!![])());return undefined;}),D=(k,x,B)=>__awaiter(this,void 0x0,void 0x0,function*(){const T8=a10v;if(W||l)return B[T8(0x1cb)]||(yield this['inquirerHelper'][T8(0x1ca)](k,x)());return undefined;}),w=(k,x,B,o)=>__awaiter(this,void 0x0,void 0x0,function*(){const T9=a10v;if(l)return o[T9(0x171)]||(yield this['inquirerHelper'][T9(0x187)](k,x,B)());return undefined;}),e=(k,x,B)=>__awaiter(this,void 0x0,void 0x0,function*(){const TT=a10v;if(!v&&B[TT(0x1e2)]!==undefined){if(B['containerId']!==!![])return B[TT(0x1e2)];return yield this['inquirerHelper'][TT(0x1fd)](k,T==='service'?x:undefined,T===TT(0x1a8)?x:undefined,!![])();}return undefined;}),I=(k,x,B)=>__awaiter(this,void 0x0,void 0x0,function*(){const Tv=a10v;if(T==='job')return B[Tv(0x18c)]||(yield this[Tv(0x1a6)][Tv(0x206)](x,k,!![])());return undefined;}),U=(k,x,B)=>__awaiter(this,void 0x0,void 0x0,function*(){const TW=a10v;if(T==='service'){if(B[TW(0x1ef)]!==!![])return B[TW(0x1ef)];return B[TW(0x1ef)];}return undefined;});return this[Tl(0x179)](T,v,W,l)['action'](k=>__awaiter(this,void 0x0,void 0x0,function*(){const TN=Tl,{noDefaults:x,projectId:B,quiet:o,tail:s,types:Y,textIncludes:a,textNotIncludes:G,regexIncludes:H,regexNotIncludes:A,direction:m,lineLimit:g,startTime:F,endTime:K,duration:t,output:C}=k;(0x0,utils_1[TN(0x1ce)])(this[TN(0x16e)]);const {apiContext:b,inquirerHelper:P,logsApiClient:z}=this,c=x?undefined:b[TN(0x1f9)](),O=B||c||(yield P['askForProject']()),J=yield N(O,k),S=yield y(O,J,k),d=yield D(O,J,k),h=yield w(O,J,d,k),E=yield I(O,J,k),i=yield U(O,J,k),M=yield e(O,J,k);if(F&&K&&t)throw new Error(TN(0x1a9));const p={'projectId':O,'entityId':J},Z={'containerName':M,'types':Y,'textIncludes':a,'textNotIncludes':G,'regexIncludes':H,'regexNotIncludes':A,'lineLimit':g,'startTime':F,'duration':t,'runId':E,'buildId':S,'backupId':d,'restoreId':h,'deploymentId':i,'isBuild':v!==null&&v!==void 0x0?v:![]},r=l?TN(0x1a1):W?TN(0x1b0):T,R=Object[TN(0x170)](Object[TN(0x170)]({},Z),{'endTime':K,'direction':m});if(!o&&C!=='yaml'&&C!==TN(0x174)&&C!==TN(0x201))this[TN(0x205)](T,J,O,Object['assign'](Object['assign']({},R),k));const f=this[TN(0x16a)](C,a!==null&&a!==void 0x0?a:H);if(s){const X=yield z[TN(0x208)][TN(0x1e5)](p,Z,r);X['on']('logs-received',f),X['on'](TN(0x1b4),V=>(0x0,utils_1[TN(0x1b4)])(TN(0x183)+V[TN(0x1ed)])),X['on'](TN(0x1bf),()=>console['log'](TN(0x1a3))),yield X[TN(0x1e7)]();}else{const V=yield z['logs']['logRange'](p,R,r);if(V[TN(0x1b4)]){const n=V[TN(0x1b4)][TN(0x1f2)],Q=n?TN(0x1a7)+JSON[TN(0x178)](n,null,'\x20'):'';(0x0,utils_1[TN(0x1b4)])('Error\x20while\x20fetching\x20log\x20lines:\x20'+V[TN(0x1b4)]['message']+Q);}else f(V['data'],V[TN(0x1b3)]);}}));}}exports['CliLogs']=CliLogs;
|
|
1
|
+
'use strict';const a11F=a11E;(function(c,E){const W=a11E,S=c();while(!![]){try{const X=parseInt(W(0x13f))/0x1+parseInt(W(0x161))/0x2*(parseInt(W(0x163))/0x3)+-parseInt(W(0x1ae))/0x4+-parseInt(W(0x133))/0x5*(parseInt(W(0x182))/0x6)+parseInt(W(0x1a9))/0x7+-parseInt(W(0x19f))/0x8+parseInt(W(0x178))/0x9*(parseInt(W(0x1b7))/0xa);if(X===E)break;else S['push'](S['shift']());}catch(u){S['push'](S['shift']());}}}(a11c,0x543c4));var __awaiter=this&&this[a11F(0x146)]||function(c,E,S,X){function u(Y){return Y instanceof S?Y:new S(function(R){R(Y);});}return new(S||(S=Promise))(function(Y,R){const c0=a11E;function d(p){const i=a11E;try{U(X[i(0x174)](p));}catch(q){R(q);}}function w(p){try{U(X['throw'](p));}catch(q){R(q);}}function U(p){const v=a11E;p[v(0x15c)]?Y(p[v(0x17e)]):u(p[v(0x17e)])[v(0x149)](d,w);}U((X=X['apply'](c,E||[]))[c0(0x174)]());});},__importDefault=this&&this[a11F(0x1bb)]||function(c){const c1=a11F;return c&&c[c1(0x19e)]?c:{'default':c};};Object['defineProperty'](exports,a11F(0x19e),{'value':!![]}),exports[a11F(0x177)]=void 0x0;function a11c(){const cY=['>\x20Container\x20logs','Filter\x20log\x20lines\x20to\x20not\x20match\x20this\x20regular\x20expression','build-','Id]','\x20(exit\x20with\x20','getStandardLogCommand','--textIncludes\x20<text>','getSeconds','Length\x20of\x20timespan\x20in\x20seconds.\x20Only\x20valid\x20if\x20not\x20both,\x20startTime\x20and\x20endTime\x20are\x20set','inquirerHelper','charAt','Restore\x20to\x20get\x20logs\x20from','customUserAgent','next','--startTime\x20<timestamp>','runId','CliLogs','65187VMVfNy','--backup\x20--backupId\x20[backupId]','deploymentId','\x27Ctrl+C\x27','values','--project\x20--projectId\x20[projectId]','value','data','json','forEach','41550TtjjVd','\x20for\x20all\x20containers','getLogsCommand','Project\x20for\x20logs','-d,\x20--direction\x20<order>','logRange','@northflank/js-client','option','start','Which\x20log\x20types\x20to\x20fetch','getCurrentProjectName','addonRestore','Number\x20of\x20lines\x20to\x20return.','logsApiClient','Tail\x20will\x20stream\x20logs\x20in\x20real-time.\x20Session\x20will\x20be\x20kept\x20open.','../inquirer-helper','-o,\x20--output\x20[output]','setSeconds','parseDateInput','Get\x20logs\x20generated\x20before\x20this\x20time,\x20','../utils','logs','tail','printInitInfo','textIncludes','printResponse','restoreId','Direction\x20of\x20logs.\x20Ignored\x20when\x20tailing.','__esModule','3490848nppBRs','Error\x20while\x20fetching\x20log\x20lines:\x20','--build\x20--buildId\x20[buildId]','--run\x20--runId\x20[runId]','--container\x20--containerId\x20[containerId]','\x20of\x20','containerId','buildId',',\x20to:\x20','Error\x20while\x20tailing\x20log\x20lines:\x20','4694746zDqfhm','askForContainer','tsHint','addonBackup','getFormatter','491412vATAGI','\x20for\x20container\x20','Get\x20logs\x20generated\x20after\x20this\x20time,\x20','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','regexNotIncludes','hasNextPage','textNotIncludes','Filter\x20log\x20lines\x20to\x20match\x20this\x20regular\x20expression','askForJobRun','250ROQXCc','--restore\x20--restoreId\x20[restoreId]','forward','Output\x20formatting.\x20Will\x20use\x20advanced\x20formatting\x20by\x20default.','__importDefault','Only\x20two\x20of\x20\x27startTime\x27,\x20\x27endTime\x27\x20and\x20\x27duration\x27\x20can\x20be\x20set.','askForAddonRestore','yaml','commander','default','logTail','--regexNotIncludes\x20<regex>','service','valueOf','Element\x20count\x20for\x20this\x20request\x20exceeds\x20the\x20line\x20limit,\x20output\x20was\x20truncated.\x20Cut\x20off\x20at\x20timestamp\x20','addOption',',\x20restore\x20id\x20','Backup\x20to\x20get\x20logs\x20from','\x0aDetails:\x20','length','-l,\x20--lineLimit\x20[limit]','Job\x20run\x20id,\x20example:\x20162b1977-6636-4000-929b-cc265b862ff0','Get\x20log\x20for\x20the\x20specified\x20','close','error','375GNVaPa','apiClient','details','log','LogType','askForBuild','regexIncludes','addon','\x20seconds','askForJob','-t,\x20--types\x20<types...>','slice','571526dpelMD','Container\x20to\x20exec\x20into\x20(logs\x20from\x20all\x20containers\x20will\x20be\x20shown\x20if\x20not\x20specified)','askForAddonBackup','argParser','\x20--','format','yml','__awaiter','conflicts','job','then','\x20with\x20live-tailing','bold','--noDefaults','--deployment\x20--deploymentId\x20[deploymentId]','--textNotIncludes\x20<text>','cursor','Build\x20to\x20get\x20logs\x20from','assign','addonId','chalk','defaultDurationSeconds','askForProject','--endTime\x20<timestamp>','getCurrentJobName','choices','description','Option','askForService','done','InquirerHelper','noDefaults','toISOString','backward','666gGtITa','Deployment\x20id,\x20example:\x20my-service-54785f4','3eUXtem','-f,\x20--tail','warning',',\x20from:\x20'];a11c=function(){return cY;};return a11c();}const js_client_1=require(a11F(0x188)),chalk_1=__importDefault(require(a11F(0x153))),utils_1=require(a11F(0x196)),inquirer_helper_1=require(a11F(0x191)),commander_1=require(a11F(0x1bf)),console_format_helpers_1=require('../formatting/console-format-helpers'),log_formatter_1=require('./log-formatter');class CliLogs{constructor(c,E){const c2=a11F;this['apiContext']=c,this[c2(0x154)]=0x708,this[c2(0x16c)]=(S,X,u,Y)=>{const c3=c2,R=(0x0,utils_1['getCommand'])(!![])['name']((X?c3(0x169):'')+c3(0x197))['alias']((X?c3(0x169):'')+c3(0x136))[c3(0x159)](c3(0x130)+S)[c3(0x189)](c3(0x17d),c3(0x185))[c3(0x189)]('--'+S+c3(0x143)+S+'Id\x20['+S+c3(0x16a),S[c3(0x171)](0x0)['toUpperCase']()+S[c3(0x13e)](0x1)+'\x20to\x20get\x20logs\x20from')[c3(0x189)](c3(0x1a3),c3(0x140));if(X)R[c3(0x189)](c3(0x1a1),c3(0x150));if(S==='job')R[c3(0x189)](c3(0x1a2),c3(0x12f));if(S===c3(0x1c3))R['option'](c3(0x14d),c3(0x162));if(u)R[c3(0x189)](c3(0x179),c3(0x12b));if(Y)R[c3(0x189)](c3(0x1b8),c3(0x172));return!X&&!u&&!Y&&R['addOption'](new commander_1[(c3(0x15a))](c3(0x13d),c3(0x18b))[c3(0x158)](Object[c3(0x17c)](js_client_1[c3(0x137)]))),R[c3(0x189)](c3(0x164),c3(0x190))[c3(0x189)](c3(0x12e),c3(0x18e))[c3(0x189)](c3(0x175),c3(0x1b0)+utils_1[c3(0x1ab)],utils_1[c3(0x194)])[c3(0x129)](new commander_1[(c3(0x15a))](c3(0x156),c3(0x195)+utils_1[c3(0x1ab)])[c3(0x142)](utils_1[c3(0x194)])[c3(0x147)]([c3(0x198)]))[c3(0x189)]('--duration\x20[duration]',c3(0x16f))['addOption'](new commander_1['Option'](c3(0x186),c3(0x19d))['choices']([c3(0x160),c3(0x1b9)])[c3(0x147)]([c3(0x198)]))['addOption'](new commander_1[(c3(0x15a))](c3(0x16d),'Filter\x20log\x20lines\x20to\x20include\x20this\x20text')[c3(0x147)]([c3(0x1b4),c3(0x139),c3(0x1b2)]))['addOption'](new commander_1[(c3(0x15a))](c3(0x14e),'Filter\x20log\x20lines\x20to\x20not\x20include\x20this\x20text')['conflicts'](['textIncludes',c3(0x139),c3(0x1b2)]))[c3(0x129)](new commander_1[(c3(0x15a))]('--regexIncludes\x20<regex>',c3(0x1b5))[c3(0x147)]([c3(0x1b4),'textIncludes','regexNotIncludes']))['addOption'](new commander_1['Option'](c3(0x1c2),c3(0x168))[c3(0x147)]([c3(0x1b4),c3(0x139),c3(0x19a)]))['option'](c3(0x14c),c3(0x1b1),![])['addOption'](new commander_1[(c3(0x15a))](c3(0x192),c3(0x1ba))[c3(0x158)](Object[c3(0x17c)]([c3(0x144),c3(0x180),'yaml']))),R;},this[c2(0x199)]=(S,X,u,Y)=>{const c4=c2,{containerName:R,restoreId:d,backupId:w,quiet:P,tail:U,startTime:p,endTime:q,duration:B}=Y;if(P===!![])return;const V=U?c4(0x16b)+chalk_1[c4(0x1c0)]['bold'](c4(0x17b))+')':'',g=U?c4(0x14a):'',r=new Date(),H=p!==null&&p!==void 0x0?p:new Date(new Date((q!==null&&q!==void 0x0?q:r)[c4(0x1c4)]())[c4(0x193)]((q!==null&&q!==void 0x0?q:r)[c4(0x16e)]()-(B!==null&&B!==void 0x0?B:this[c4(0x154)]))),f=(q!==null&&q!==void 0x0?q:p!==undefined)?new Date(new Date(p[c4(0x1c4)]())['setSeconds'](p[c4(0x16e)]()+(B!==null&&B!==void 0x0?B:this[c4(0x154)]))):r,Z=w!==undefined,K=H&&!Z?c4(0x166)+chalk_1[c4(0x1c0)][c4(0x14b)](H[c4(0x15f)]()):'',t=f&&!Z?c4(0x1a7)+chalk_1[c4(0x1c0)]['bold'](f[c4(0x15f)]()):'',G=B?',\x20duration:\x20'+B+c4(0x13b):'',b=R?c4(0x1af)+chalk_1[c4(0x1c0)][c4(0x14b)](R):Z?'':c4(0x183),l=w?',\x20backup\x20id\x20'+w:'',A=d?c4(0x12a)+d:'',I=S+'\x20'+chalk_1[c4(0x1c0)][c4(0x14b)](X)+l+A+'\x20in\x20project\x20'+chalk_1[c4(0x1c0)][c4(0x14b)](u),T=''+K+t+G;console[c4(0x136)](c4(0x167)+g+b+c4(0x1a4)+I+T+V+':');},this[c2(0x1ad)]=(S,X)=>(u,Y)=>{const c5=c2;if(!S){if(u[c5(0x12d)]===0x0)console[c5(0x136)]('No\x20logs\x20found\x20for\x20this\x20query.\x20Make\x20sure\x20to\x20select\x20an\x20appropriate\x20time\x20window.');u[c5(0x181)](R=>(0x0,log_formatter_1['formatLogLine'])(R,X));}else(0x0,console_format_helpers_1[c5(0x19b)])(S,u);(Y===null||Y===void 0x0?void 0x0:Y[c5(0x1b3)])&&(0x0,utils_1[c5(0x165)])(c5(0x128)+Y[c5(0x14f)]);},this[c2(0x134)]=new js_client_1['ApiClient'](c,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[c2(0x173)],'agent':E}),this[c2(0x18f)]=this[c2(0x134)],this[c2(0x170)]=new inquirer_helper_1[(c2(0x15d))](this[c2(0x134)]);}[a11F(0x184)](c,E=![],S=![],X=![]){const cX=a11F,u=(p,q)=>__awaiter(this,void 0x0,void 0x0,function*(){const c6=a11E,B=q[c6(0x15e)],{apiContext:V,inquirerHelper:g}=this;switch(c){case c6(0x1c3):{const r=B?undefined:V['getCurrentServiceName']();return q['serviceId']||r||(yield g[c6(0x15b)](p)());}case c6(0x148):{const H=B?undefined:V[c6(0x157)]();return q['jobId']||H||(yield g[c6(0x13c)](p)());}case c6(0x13a):{return q[c6(0x152)]||(yield g['askForAddon'](p)());}}}),Y=(p,q,B)=>__awaiter(this,void 0x0,void 0x0,function*(){const c7=a11E;if(E)return B[c7(0x1a6)]||(yield this[c7(0x170)][c7(0x138)](p,c===c7(0x1c3)?q:undefined,c===c7(0x148)?q:undefined,!![])());return undefined;}),R=(p,q,B)=>__awaiter(this,void 0x0,void 0x0,function*(){const c8=a11E;if(S||X)return B['backupId']||(yield this[c8(0x170)][c8(0x141)](p,q)());return undefined;}),d=(p,q,B,V)=>__awaiter(this,void 0x0,void 0x0,function*(){const c9=a11E;if(X)return V[c9(0x19c)]||(yield this[c9(0x170)][c9(0x1bd)](p,q,B)());return undefined;}),w=(p,q,B)=>__awaiter(this,void 0x0,void 0x0,function*(){const cc=a11E;if(!E&&B[cc(0x1a5)]!==undefined){if(B[cc(0x1a5)]!==!![])return B[cc(0x1a5)];return yield this['inquirerHelper'][cc(0x1aa)](p,c==='service'?q:undefined,c===cc(0x148)?q:undefined,!![])();}return undefined;}),P=(p,q,B)=>__awaiter(this,void 0x0,void 0x0,function*(){const cE=a11E;if(c==='job')return B[cE(0x176)]||(yield this[cE(0x170)][cE(0x1b6)](q,p,!![])());return undefined;}),U=(p,q,B)=>__awaiter(this,void 0x0,void 0x0,function*(){const cS=a11E;if(c===cS(0x1c3)){if(B[cS(0x17a)]!==!![])return B[cS(0x17a)];return B[cS(0x17a)];}return undefined;});return this[cX(0x16c)](c,E,S,X)['action'](p=>__awaiter(this,void 0x0,void 0x0,function*(){const cu=cX,{noDefaults:q,projectId:B,quiet:V,tail:g,types:r,textIncludes:H,textNotIncludes:f,regexIncludes:Z,regexNotIncludes:K,direction:t,lineLimit:G,startTime:b,endTime:l,duration:A,output:I}=p;(0x0,utils_1['assertContextExisting'])(this[cu(0x134)]);const {apiContext:T,inquirerHelper:M,logsApiClient:m}=this,N=q?undefined:T[cu(0x18c)](),z=B||N||(yield M[cu(0x155)]()),J=yield u(z,p),O=yield Y(z,J,p),C=yield R(z,J,p),k=yield d(z,J,C,p),o=yield P(z,J,p),y=yield U(z,J,p),e=yield w(z,J,p);if(b&&l&&A)throw new Error(cu(0x1bc));const D={'projectId':z,'entityId':J},x={'containerName':e,'types':r,'textIncludes':H,'textNotIncludes':f,'regexIncludes':Z,'regexNotIncludes':K,'lineLimit':G,'startTime':b,'duration':A,'runId':o,'buildId':O,'backupId':C,'restoreId':k,'deploymentId':y,'isBuild':E!==null&&E!==void 0x0?E:![]},h=X?cu(0x18d):S?cu(0x1ac):c,n=Object['assign'](Object['assign']({},x),{'endTime':l,'direction':t});if(!V&&I!==cu(0x1be)&&I!==cu(0x145)&&I!=='json')this[cu(0x199)](c,J,z,Object[cu(0x151)](Object['assign']({},n),p));const s=this['getFormatter'](I,H!==null&&H!==void 0x0?H:Z);if(g){const j=yield m['logs'][cu(0x1c1)](D,x,h);j['on']('logs-received',s),j['on']('error',a=>(0x0,utils_1[cu(0x132)])(cu(0x1a8)+a['message'])),j['on'](cu(0x131),()=>console['log']('Log\x20session\x20ended')),yield j[cu(0x18a)]();}else{const a=yield m[cu(0x197)][cu(0x187)](D,n,h);if(a['error']){const Q=a[cu(0x132)][cu(0x135)],L=Q?cu(0x12c)+JSON['stringify'](Q,null,'\x20'):'';(0x0,utils_1[cu(0x132)])(cu(0x1a0)+a[cu(0x132)]['message']+L);}else s(a[cu(0x17f)],a['pagination']);}}));}}function a11E(c,E){const S=a11c();return a11E=function(X,u){X=X-0x128;let Y=S[X];return Y;},a11E(c,E);}exports['CliLogs']=CliLogs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function a12E(c,E){const S=a12c();return a12E=function(X,u){X=X-0x139;let Y=S[X];return Y;},a12E(c,E);}const a12U=a12E;(function(c,E){const P=a12E,S=c();while(!![]){try{const X=parseInt(P(0x156))/0x1*(-parseInt(P(0x153))/0x2)+-parseInt(P(0x140))/0x3*(parseInt(P(0x144))/0x4)+-parseInt(P(0x13a))/0x5+parseInt(P(0x13d))/0x6*(parseInt(P(0x13b))/0x7)+-parseInt(P(0x142))/0x8+parseInt(P(0x149))/0x9*(-parseInt(P(0x141))/0xa)+parseInt(P(0x159))/0xb;if(X===E)break;else S['push'](S['shift']());}catch(u){S['push'](S['shift']());}}}(a12c,0xd5973));var __importDefault=this&&this[a12U(0x157)]||function(c){const p=a12U;return c&&c[p(0x146)]?c:{'default':c};};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a12U(0x147)]=exports['defaultLogSyntax']=void 0x0;const chalk_1=__importDefault(require(a12U(0x14f)));function a12c(){const V=['8430WiLZIL','11562304UqoMWi','green','243876aQZVZN','yellow','__esModule','formatLogLine','dim','1872BikSqQ','default','gray','red','replace','grey','chalk','greenBright','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','blue','14BxtYcp','bold','containerId','237266YMgISf','__importDefault','defaultLogSyntax','58638195tpehOx','log','2066750PwObmV','7833rlmFtv','toISOString','4746nuLCUi','color','reduce','81PyIMzf'];a12c=function(){return V;};return a12c();}exports[a12U(0x158)]=[{'color':a12U(0x14e),'pattern':/\[[0-9]{1,2}\/[a-z]{3}\/[0-9]{4}:[0-9]{2}:[0-9]{2}:[0-9]{2} \+[0-9]{4}\]/i},{'color':'grey','pattern':/[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(.[0-9]+)?Z/i},{'color':a12U(0x14e),'pattern':/[0-9]{4}\/[0-9]{2}\/[0-9]{2}/i},{'color':a12U(0x14e),'pattern':/\s\b([0-9]{2}:){1,2}[0-9]{2}\b\s/i},{'color':a12U(0x154),'pattern':new RegExp(a12U(0x151),'i')},{'color':a12U(0x143),'pattern':/(?:\d{1,3}\.){3}\d{1,3}/i},{'color':'green','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':a12U(0x152),'pattern':/\b(GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH)\b/},{'color':a12U(0x150),'pattern':/\b(successful|success|completed|complete|done)\b/i},{'color':a12U(0x14c),'pattern':/\b(failed|fail|stderr|error|err)\b/i},{'color':a12U(0x14b),'pattern':/\b(information|info|debug)\b/i},{'color':a12U(0x145),'pattern':/\b(warning|warn)\b/i},{'color':'blue','pattern':/[0-9a-f]{64}/i},{'color':a12U(0x152),'pattern':/[0-9a-fA-F]{8}[-]?([0-9a-fA-F]{4}[-]?){3}[0-9a-fA-F]{12}/i}];const formatLogLine=(c,E)=>{const q=a12U,S=chalk_1[q(0x14a)][q(0x148)](c['ts'][q(0x13c)]()),X=chalk_1[q(0x14a)]['cyan'](c[q(0x155)]),u=exports[q(0x158)][q(0x13f)]((R,d)=>{const B=q;return R['replace'](d['pattern'],w=>d[B(0x13e)]?chalk_1[B(0x14a)][d[B(0x13e)]](w):chalk_1[B(0x14a)][B(0x14e)](w));},c[q(0x139)]),Y=E?u[q(0x14d)](new RegExp(E,'g'),R=>chalk_1[q(0x14a)][q(0x154)](R)):u;console[q(0x139)](S+'\x20'+X+'\x20--\x20'+Y);};exports['formatLogLine']=formatLogLine;
|