@northflank/cli 0.9.1 → 0.9.2

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.
@@ -1 +1 @@
1
- 'use strict';const a6B=a6f;(function(y,f){const q=a6f,a=y();while(!![]){try{const b=parseInt(q(0x11c))/0x1*(-parseInt(q(0x12e))/0x2)+-parseInt(q(0x13e))/0x3+parseInt(q(0x122))/0x4*(parseInt(q(0x13c))/0x5)+-parseInt(q(0x114))/0x6+parseInt(q(0xf6))/0x7+-parseInt(q(0xf2))/0x8+parseInt(q(0xfc))/0x9*(parseInt(q(0x112))/0xa);if(b===f)break;else a['push'](a['shift']());}catch(I){a['push'](a['shift']());}}}(a6y,0x6d4bd));var __awaiter=this&&this['__awaiter']||function(y,f,a,b){function I(G){return G instanceof a?G:new a(function(T){T(G);});}return new(a||(a=Promise))(function(G,T){const V=a6f;function u(F){const p=a6f;try{Z(b[p(0xf3)](F));}catch(d){T(d);}}function t(F){const Y=a6f;try{Z(b[Y(0x13a)](F));}catch(d){T(d);}}function Z(F){const A=a6f;F['done']?G(F[A(0x111)]):I(F[A(0x111)])[A(0x13b)](u,t);}Z((b=b[V(0x106)](y,f||[]))[V(0xf3)]());});},__importDefault=this&&this[a6B(0x123)]||function(y){const S=a6B;return y&&y[S(0xf8)]?y:{'default':y};};Object[a6B(0xeb)](exports,a6B(0xf8),{'value':!![]}),exports[a6B(0xf5)]=void 0x0;function a6y(){const N=['925FbkHSc','alias','2496693VRGbFu','--group\x20[GROUP]','greenBright','name','stdin','pipe','askForService','action','resize','getCurrentProjectName','Run\x20command\x20with\x20this\x20group','columns','message','\x20command\x20exec:\x20','stdOut','addCommand','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','defineProperty','askForJob','setRawMode','stdout','--user\x20[USER]','exit','default','6232384uWSuPq','next','with\x20command\x20\x27','CliExec','5232185YRIkaq','job','__esModule','execServiceSession','stdIn','ApiClient','24966lZvluw','execJobSession','Unknown','getCommand','exec','error','with\x20shell\x20session','isTTY','customUserAgent','apiClient','apply','../inquirer-helper','stdErr','@northflank/js-client','Id\x20[NAME]','getStandardExecCommand','description','bold','rows','Container\x20to\x20exec\x20into\x20(random\x20container\x20will\x20be\x20chosen\x20if\x20not\x20specified)','log','value','3020upZRae','with\x20user:','1467870rCeeVe','--noDefaults','status','execCmd','none','option','shell\x20command\x20','Command\x20exec\x20for\x20the\x20specified\x20','22897bJFdnv','getTerminalSize','Run\x20command\x20with\x20this\x20user','(exit\x20with\x20\x27Ctrl+D\x27)','without\x20shell','exitCode','16028LsMYZt','__importDefault','askForProject','join','service','Command\x20didn\x27t\x20complete\x20successfully,\x20status:\x20','Error\x20occured\x20during\x20','--shell-cmd\x20[SHELL-CMD]','stderr','Command\x20execution\x20(exec)\x20for\x20Northflank\x20services\x20and\x20jobs.','filter','warning','2QPxSWS','\x20to\x20exec\x20into','Project\x20for\x20exec','../utils','Run\x20command\x20with\x20shell\x20(e.g.\x20bash,sh).\x20If\x20not\x20set\x20and\x20no\x20command\x20is\x20provided,\x20several\x20standard\x20shells\x20will\x20be\x20attempted.\x20If\x20not\x20set\x20and\x20a\x20command\x20is\x20provided,\x20the\x20command\x20will\x20run\x20without\x20shell','waitForCommandResult','--cmd\x20--command\x20[COMMAND]','assertContextExisting','handleShellSession','command-exec','--project\x20--projectId\x20[NAME]','charAt','throw','then'];a6y=function(){return N;};return a6y();}function a6f(y,f){const a=a6y();return a6f=function(b,I){b=b-0xeb;let G=a[b];return G;},a6f(y,f);}const js_client_1=require(a6B(0x109)),chalk_1=__importDefault(require('chalk')),utils_1=require(a6B(0x131)),inquirer_helper_1=require(a6B(0x107));class CliExec{constructor(y){const n=a6B;this['getStandardExecCommand']=I=>(0x0,utils_1[n(0xff)])(!![])[n(0x141)](I)[n(0x10c)](n(0x11b)+I)[n(0x119)](n(0x138),n(0x130))[n(0x119)]('--'+I+'\x20--'+I+n(0x10a),I[n(0x139)](0x0)['toUpperCase']()+I['slice'](0x1)+n(0x12f))['option']('--container\x20--containerId\x20[NAME]',n(0x10f))['option'](n(0x129),n(0x132))['option'](n(0xef),n(0x11e))[n(0x119)](n(0x13f),n(0x148))[n(0x119)](n(0x115),n(0x14e),![])[n(0x119)](n(0x134),'Command\x20to\x20execute,\x20if\x20--shell\x20option\x20is\x20present,\x20it\x20will\x20run\x20in\x20the\x20specified\x20shell,\x20otherwise'),this[n(0x11d)]=()=>({'columns':process[n(0xee)]['columns'],'rows':process[n(0xee)][n(0x10e)]}),this['execStartLog']=(I,G,T,u,t,Z,F,d)=>{const e=n;if(d===!![])return;const R=u===e(0x118),s=R?e(0x120):u===undefined?e(0x102):e(0x11a)+chalk_1[e(0xf1)]['greenBright'](u),j=t!==undefined?e(0x113)+t:'',U=Z!==undefined?'with\x20group:'+Z:'',g=F!==undefined?e(0xf4)+chalk_1[e(0xf1)][e(0x140)](F)+'\x27':'',o=[g,s,j,U][e(0x12c)](i=>i!=='')[e(0x125)]('\x20'),r=e(0x11f);console[e(0x110)]('Exec\x20'+I+'\x20'+chalk_1['default'][e(0x10d)](G)+'\x20in\x20project\x20'+chalk_1[e(0xf1)][e(0x10d)](T)+'\x20'+o+'\x20'+r);},this[n(0x136)]=(I,G,T=![])=>__awaiter(this,void 0x0,void 0x0,function*(){const J=n;var u,t;try{process[J(0x142)]['isTTY']&&(process[J(0x142)]['setRawMode'](!![]),process['stdout']['on'](J(0x146),()=>{const X=J;I['resizeTerminal'](this[X(0x11d)]());}));process[J(0x142)][J(0x143)](I[J(0xfa)]),I[J(0x108)]['pipe'](process[J(0x12a)]),I[J(0x14c)][J(0x143)](process[J(0xee)]),I['on'](J(0x101),F=>{const M=J;var d;(0x0,utils_1[M(0x101)])(M(0x128)+G+M(0x14b)+((d=F[M(0x14a)])!==null&&d!==void 0x0?d:F)),process[M(0x142)][M(0x103)]&&process['stdin'][M(0xed)](![]),process['exit'](-0x1);});const Z=yield I[J(0x133)]();if(T!==!![]){const F=(u=Z===null||Z===void 0x0?void 0x0:Z[J(0x116)])!==null&&u!==void 0x0?u:J(0xfe),d=(t=Z===null||Z===void 0x0?void 0x0:Z[J(0x121)])!==null&&t!==void 0x0?t:-0x1,R=(Z===null||Z===void 0x0?void 0x0:Z[J(0x14a)])?',\x20details:\x20'+Z[J(0x14a)]:'';F==='Success'?(0x0,utils_1['success'])('Command\x20completed\x20successfully,\x20exit\x20code:\x20'+d):(0x0,utils_1[J(0x12d)])(J(0x127)+F+',\x20exit\x20code:\x20'+d+R);}return Z;}finally{process[J(0x142)][J(0x103)]&&process[J(0x142)][J(0xed)](![]);}}),this[n(0x105)]=new js_client_1[(n(0xfb))](y,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[n(0x104)]});const f=new inquirer_helper_1['InquirerHelper'](this['apiClient']);this[n(0x117)]=(0x0,utils_1[n(0xff)])()['name'](n(0x137))[n(0x13d)](n(0x100))[n(0x10c)](n(0x12b));const a=this[n(0x10b)](n(0x126))['action'](I=>__awaiter(this,void 0x0,void 0x0,function*(){const c=n,{noDefaults:G,projectId:T,serviceId:u,containerId:t,shellCmd:Z,user:F,group:d,command:R,quiet:s}=I;(0x0,utils_1[c(0x135)])(this[c(0x105)]);try{const j=G?undefined:y[c(0x147)](),U=T||j||(yield f[c(0x124)]()),g=G?undefined:y['getCurrentServiceName'](),o=u||g||(yield f[c(0x144)](U)()),r=Z!==null&&Z!==void 0x0?Z:R!==undefined?c(0x118):undefined;this['execStartLog'](c(0x126),o,U,r,F,d,R,s);const i=process[c(0xee)][c(0x149)],l=process[c(0xee)][c(0x10e)],H={'projectId':U,'serviceId':o},v=yield this[c(0x105)][c(0x100)][c(0xf9)](H,{'containerName':t,'command':R,'shell':r,'user':F,'group':d,'ttyColumns':i,'ttyRows':l});yield this[c(0x136)](v,c(0x126),s);}catch(P){(0x0,utils_1['error'])(''+P[c(0x14a)]);}finally{process[c(0xf0)]();}})),b=this['getStandardExecCommand']('job')[n(0x145)](I=>__awaiter(this,void 0x0,void 0x0,function*(){const C=n,{projectId:G,jobId:T,containerId:u,noDefaults:t,shellCmd:Z,user:F,group:d,command:R,quiet:s}=I;(0x0,utils_1[C(0x135)])(this[C(0x105)]);try{const j=t?undefined:y[C(0x147)](),U=G||j||(yield f[C(0x124)]()),g=T||(yield f[C(0xec)](U)());this['execStartLog'](C(0xf7),g,U,Z,s);const {rows:o,columns:r}=this[C(0x11d)](),i={'projectId':U,'jobId':g},l=yield this[C(0x105)][C(0x100)][C(0xfd)](i,{'containerName':u,'command':R,'shell':Z,'user':F,'group':d,'ttyColumns':r,'ttyRows':o});yield this[C(0x136)](l,C(0xf7),s);}catch(H){(0x0,utils_1['error'])(''+H[C(0x14a)]);}finally{process['exit']();}}));this[n(0x117)][n(0x14d)](a),this['execCmd'][n(0x14d)](b);}}exports[a6B(0xf5)]=CliExec;
1
+ 'use strict';const a6Y=a6p;function a6i(){const S=['__awaiter','without\x20shell','238830ksKcOX','value','columns','__esModule','job','stderr','with\x20user:','none','message','Run\x20command\x20with\x20this\x20group','--user\x20[USER]','pipe','--noDefaults','Command\x20didn\x27t\x20complete\x20successfully,\x20status:\x20','execStartLog','\x20--','exit','@northflank/js-client','../inquirer-helper','Run\x20command\x20with\x20shell\x20(e.g.\x20bash,sh).\x20If\x20not\x20set\x20and\x20no\x20command\x20is\x20provided,\x20several\x20standard\x20shells\x20will\x20be\x20attempted.\x20If\x20not\x20set\x20and\x20a\x20command\x20is\x20provided,\x20the\x20command\x20will\x20run\x20without\x20shell','handleShellSession','default','Command\x20execution\x20(exec)\x20for\x20Northflank\x20services\x20and\x20jobs.','command-exec','getStandardExecCommand','Error\x20occured\x20during\x20','getCurrentServiceName',',\x20details:\x20','Run\x20command\x20with\x20this\x20user','Container\x20to\x20exec\x20into\x20(random\x20container\x20will\x20be\x20chosen\x20if\x20not\x20specified)','then','option','306xxIceb','slice','addCommand','waitForCommandResult','error','chalk','with\x20command\x20\x27','done','Unknown','1702216ovFIFb','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','rows','with\x20group:','bold','CliExec','\x20to\x20exec\x20into','action','askForProject','69011VVAbOr','askForService','exitCode',',\x20exit\x20code:\x20','getCommand','23498222gUiLTa','success','42nFfRwE','Id\x20[NAME]','stdout','Command\x20exec\x20for\x20the\x20specified\x20','--container\x20--containerId\x20[NAME]','5330610SZEvDi','charAt','106108nrkPuU','with\x20shell\x20session','\x20command\x20exec:\x20','getTerminalSize','7xkLcgh','exec','__importDefault','next','setRawMode','--cmd\x20--command\x20[COMMAND]','service','toUpperCase','--group\x20[GROUP]','4MgphDX','apiClient','getCurrentProjectName','stdOut','Exec\x20','Command\x20completed\x20successfully,\x20exit\x20code:\x20','\x20in\x20project\x20','apply','1830540OIPNOV','isTTY','defineProperty','name','greenBright','log','Project\x20for\x20exec','execCmd','stdin','ApiClient','askForJob','warning','InquirerHelper','assertContextExisting'];a6i=function(){return S;};return a6i();}(function(i,p){const J=a6p,B=i();while(!![]){try{const H=parseInt(J(0x1d4))/0x1*(parseInt(J(0x1ef))/0x2)+-parseInt(J(0x1db))/0x3*(parseInt(J(0x1e2))/0x4)+-parseInt(J(0x1e0))/0x5+-parseInt(J(0x1f7))/0x6*(-parseInt(J(0x1e6))/0x7)+parseInt(J(0x1cb))/0x8+parseInt(J(0x1c2))/0x9*(-parseInt(J(0x1a2))/0xa)+parseInt(J(0x1d9))/0xb;if(H===p)break;else B['push'](B['shift']());}catch(j){B['push'](B['shift']());}}}(a6i,0x84769));var __awaiter=this&&this[a6Y(0x1a0)]||function(i,p,B,H){function j(l){return l instanceof B?l:new B(function(a){a(l);});}return new(B||(B=Promise))(function(l,a){const M=a6p;function D(E){try{L(H['next'](E));}catch(C){a(C);}}function f(E){try{L(H['throw'](E));}catch(C){a(C);}}function L(E){const k=a6p;E[k(0x1c9)]?l(E[k(0x1a3)]):j(E[k(0x1a3)])[k(0x1c0)](D,f);}L((H=H[M(0x1f6)](i,p||[]))[M(0x1e9)]());});},__importDefault=this&&this[a6Y(0x1e8)]||function(i){const F=a6Y;return i&&i[F(0x1a5)]?i:{'default':i};};Object[a6Y(0x194)](exports,'__esModule',{'value':!![]}),exports[a6Y(0x1d0)]=void 0x0;function a6p(i,p){const B=a6i();return a6p=function(H,j){H=H-0x193;let l=B[H];return l;},a6p(i,p);}const js_client_1=require(a6Y(0x1b3)),chalk_1=__importDefault(require(a6Y(0x1c7))),utils_1=require('../utils'),inquirer_helper_1=require(a6Y(0x1b4));class CliExec{constructor(i){const q=a6Y;this['getStandardExecCommand']=j=>(0x0,utils_1[q(0x1d8)])(!![])[q(0x195)](j)['description'](q(0x1de)+j)[q(0x1c1)]('--project\x20--projectId\x20[NAME]',q(0x198))[q(0x1c1)]('--'+j+q(0x1b1)+j+q(0x1dc),j[q(0x1e1)](0x0)[q(0x1ed)]()+j[q(0x1c3)](0x1)+q(0x1d1))[q(0x1c1)](q(0x1df),q(0x1bf))[q(0x1c1)]('--shell-cmd\x20[SHELL-CMD]',q(0x1b5))[q(0x1c1)](q(0x1ac),q(0x1be))['option'](q(0x1ee),q(0x1ab))[q(0x1c1)](q(0x1ae),q(0x1cc),![])[q(0x1c1)](q(0x1eb),'Command\x20to\x20execute,\x20if\x20--shell\x20option\x20is\x20present,\x20it\x20will\x20run\x20in\x20the\x20specified\x20shell,\x20otherwise'),this[q(0x1e5)]=()=>({'columns':process[q(0x1dd)][q(0x1a4)],'rows':process[q(0x1dd)][q(0x1cd)]}),this[q(0x1b0)]=(j,l,a,D,f,L,E,C)=>{const g=q;if(C===!![])return;const v=D==='none',O=v?g(0x1a1):D===undefined?g(0x1e3):'shell\x20command\x20'+chalk_1['default'][g(0x196)](D),Q=f!==undefined?g(0x1a8)+f:'',U=L!==undefined?g(0x1ce)+L:'',e=E!==undefined?g(0x1c8)+chalk_1[g(0x1b7)][g(0x196)](E)+'\x27':'',G=[e,O,Q,U]['filter'](b=>b!=='')['join']('\x20'),x='(exit\x20with\x20\x27Ctrl+D\x27)';console[g(0x197)](g(0x1f3)+j+'\x20'+chalk_1[g(0x1b7)][g(0x1cf)](l)+g(0x1f5)+chalk_1[g(0x1b7)]['bold'](a)+'\x20'+G+'\x20'+x);},this[q(0x1b6)]=(j,l,a=![])=>__awaiter(this,void 0x0,void 0x0,function*(){const r=q;var D,f;try{process[r(0x19a)]['isTTY']&&(process[r(0x19a)][r(0x1ea)](!![]),process[r(0x1dd)]['on']('resize',()=>{const W=r;j['resizeTerminal'](this[W(0x1e5)]());}));process[r(0x19a)]['pipe'](j['stdIn']),j['stdErr'][r(0x1ad)](process[r(0x1a7)]),j[r(0x1f2)][r(0x1ad)](process[r(0x1dd)]),j['on'](r(0x1c6),E=>{const R=r;var C;(0x0,utils_1[R(0x1c6)])(R(0x1bb)+l+R(0x1e4)+((C=E[R(0x1aa)])!==null&&C!==void 0x0?C:E)),process['stdin'][R(0x193)]&&process['stdin'][R(0x1ea)](![]),process[R(0x1b2)](-0x1);});const L=yield j[r(0x1c5)]();if(a!==!![]){const E=(D=L===null||L===void 0x0?void 0x0:L['status'])!==null&&D!==void 0x0?D:r(0x1ca),C=(f=L===null||L===void 0x0?void 0x0:L[r(0x1d6)])!==null&&f!==void 0x0?f:-0x1,v=(L===null||L===void 0x0?void 0x0:L[r(0x1aa)])?r(0x1bd)+L[r(0x1aa)]:'';E==='Success'?(0x0,utils_1[r(0x1da)])(r(0x1f4)+C):(0x0,utils_1[r(0x19d)])(r(0x1af)+E+r(0x1d7)+C+v);}return L;}finally{process[r(0x19a)][r(0x193)]&&process['stdin']['setRawMode'](![]);}}),this[q(0x1f0)]=new js_client_1[(q(0x19b))](i,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1['customUserAgent']});const p=new inquirer_helper_1[(q(0x19e))](this[q(0x1f0)]);this[q(0x199)]=(0x0,utils_1[q(0x1d8)])()[q(0x195)](q(0x1b9))['alias']('exec')['description'](q(0x1b8));const B=this[q(0x1ba)]('service')[q(0x1d2)](j=>__awaiter(this,void 0x0,void 0x0,function*(){const n=q,{noDefaults:l,projectId:a,serviceId:D,containerId:f,shellCmd:L,user:E,group:C,command:v,quiet:O}=j;(0x0,utils_1['assertContextExisting'])(this[n(0x1f0)]);try{const Q=l?undefined:i['getCurrentProjectName'](),U=a||Q||(yield p[n(0x1d3)]()),G=l?undefined:i[n(0x1bc)](),x=D||G||(yield p[n(0x1d5)](U)()),b=L!==null&&L!==void 0x0?L:v!==undefined?n(0x1a9):undefined;this[n(0x1b0)]('service',x,U,b,E,C,v,O);const w=process[n(0x1dd)][n(0x1a4)],X=process[n(0x1dd)][n(0x1cd)],K={'projectId':U,'serviceId':x},N=yield this['apiClient'][n(0x1e7)]['execServiceSession'](K,{'containerName':f,'command':v,'shell':b,'user':E,'group':C,'ttyColumns':w,'ttyRows':X});yield this[n(0x1b6)](N,n(0x1ec),O);}catch(m){(0x0,utils_1[n(0x1c6)])(''+m[n(0x1aa)]);}finally{process[n(0x1b2)]();}})),H=this[q(0x1ba)]('job')[q(0x1d2)](j=>__awaiter(this,void 0x0,void 0x0,function*(){const s=q,{projectId:l,jobId:a,containerId:D,noDefaults:f,shellCmd:L,user:E,group:C,command:v,quiet:O}=j;(0x0,utils_1[s(0x19f)])(this[s(0x1f0)]);try{const Q=f?undefined:i[s(0x1f1)](),U=l||Q||(yield p[s(0x1d3)]()),G=a||(yield p[s(0x19c)](U)());this['execStartLog'](s(0x1a6),G,U,L,O);const {rows:x,columns:b}=this['getTerminalSize'](),w={'projectId':U,'jobId':G},X=yield this['apiClient'][s(0x1e7)]['execJobSession'](w,{'containerName':D,'command':v,'shell':L,'user':E,'group':C,'ttyColumns':b,'ttyRows':x});yield this[s(0x1b6)](X,s(0x1a6),O);}catch(K){(0x0,utils_1['error'])(''+K['message']);}finally{process['exit']();}}));this['execCmd'][q(0x1c4)](B),this['execCmd'][q(0x1c4)](H);}}exports[a6Y(0x1d0)]=CliExec;
@@ -1 +1 @@
1
- 'use strict';function a7y(){const ys=['nextCursor','23184788ROcTAg','doesn\x27t\x20match\x20pattern\x20\x27','whiteBright','isNaN','value','jobs','askForJob','askForSubdomain','found','inquirer-search-list','getCurrentProjectName','ABORT','\x27\x20already\x20exists.\x20Do\x20you\x20want\x20to\x20override\x20this\x20context\x20(y)\x20or\x20enter\x20a\x20new\x20name\x20(N)?','example','stringify','credentials','blueBright','10286460qlVqqE','isEmpty','grey','builds','volume','isObject','pattern','minLength','confirmationPrompt','token','isArray','Please\x20confirm\x20following\x20configuration:\x0a','has','set','job\x20build','resultCache','don\x27t\x20change','registerPrompt','unset','askForResource','REPEAT','required','nextPageCursor','14moMUOm','retry','defaultPaginationPageSize','oneOf','Choose\x20the\x20name\x20of\x20the\x20new\x20local\x20context:','deleteWarningPrompt','rawObject','confirmation','apply','get','safeDump','must\x20be\x20a\x20number,\x20is\x20','toUpperCase','102qTMLqF','prompt','job','createdAt','defineProperty','trim','YES','getOwnPropertyDescriptor','message','project:\x20\x27','join','98755WMmqKp','566424ZlcjbK','__importStar','__awaiter','Aborted.',',\x20supported\x20types:\x20[json|yaml|yml]','writeFileSync','assign','then','fullName','prototype','askForResourcePaginated','data','What\x27s\x20the\x20','keys','override','\x20(full\x20domain:\x20','88QkemZv','search-list','\x20type?','Choose\x20the\x20login\x20token:','find','default','services','SAVE','askForProjectScopedResource','2820321IyMQhq','service','lodash','create','description','properties','.*\x5c.(json|yaml|yml)$','Configuration\x20file\x20written\x20to\x20','fileName','yellowBright','askForBuild','\x20characters,\x20is\x20','projects','completedAt','confirm','isValidJSON','test','editedResult','name','green','choice','askGeneric','this\x20option\x20is\x20required,\x20please\x20answer','hasOwnProperty','subdomain','InquirerHelper','chalk','minimum','Writing\x20configuration\x20failed:\x20','next','retrievePayloadViaInteractiveCli','volumes','pop','./utils','inquirer','editPayload','must\x20be\x20bigger\x20than\x20or\x20equal\x20to\x20','tokenPrompt','type','getPathString','body','isBoolean','isUndefined','askForService','askForDomain','WARNING:\x20You\x20are\x20about\x20to\x20delete\x20','\x20in\x20','warning','\x20(startedAt:\x20','includes','success','Choose\x20the\x20','pagination-prompt','No\x20builds\x20found','input','maximum','addon','split','Do\x20you\x20want\x20to\x20add','askConfirm','getQuestionString','Context\x20name\x20already\x20exists.','project','to\x20use:','getInnerType','No\x20','must\x20be\x20shorter\x20than\x20or\x20equal\x20to\x20','askForSecret','domains','yaml','addons','slice','boolean','getType','pagination','Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.','map','./api-helpers','271028aVvadY','askForProject','repeat','__esModule','done','underline','39nhMowK','\x20to\x20use:','domain','Unexpected\x20file\x20type:\x20','for\x20this\x20','push','ask','concat','writable','__importDefault','EDIT','safeLoad','red','runs','No,\x20edit','list','object','DynamicReloadPaginationPrompt','saveFile','No,\x20but\x20save\x20as\x20file','filter','secrets','integer','subdomains','yml','toString','call','maxLength','askForProjectScopedResourcePaginated','js-yaml','must\x20be\x20a\x20valid\x20non-empty\x20json\x20string','backups','domain\x20(','secret','__setModuleDefault','loginPrompt','string','pathVars','No,\x20abort','must\x20be\x20smaller\x20than\x20or\x20equal\x20to\x20','Enter\x20the\x20','askForCredentials','length','Something\x20unexpected\x20happened.','propToType','__createBinding','opt','bold','No,\x20repeat','editor','4911ErBcUS','\x20and\x20it\x20','cursor','elements','apiClient','enum','job:\x20\x27','cmdPath','askArrayEntry'];a7y=function(){return ys;};return a7y();}const a7j=a7f;(function(y,f){const s=a7f,a=y();while(!![]){try{const b=parseInt(s(0xd4))/0x1*(parseInt(s(0x12f))/0x2)+-parseInt(s(0xa2))/0x3*(-parseInt(s(0x9c))/0x4)+-parseInt(s(0x11e))/0x5*(-parseInt(s(0x113))/0x6)+-parseInt(s(0x106))/0x7*(-parseInt(s(0x11f))/0x8)+parseInt(s(0x138))/0x9+parseInt(s(0xef))/0xa+-parseInt(s(0xde))/0xb;if(b===f)break;else a['push'](a['shift']());}catch(I){a['push'](a['shift']());}}}(a7y,0xc569d));var __createBinding=this&&this[a7j(0xcf)]||(Object[a7j(0x13b)]?function(y,f,a,b){const U=a7j;if(b===undefined)b=a;var I=Object[U(0x11a)](f,a);(!I||(U(0x10f)in I?!f[U(0x9f)]:I[U(0xaa)]||I['configurable']))&&(I={'enumerable':!![],'get':function(){return f[a];}}),Object['defineProperty'](y,b,I);}:function(y,f,a,b){if(b===undefined)b=a;y[b]=f[a];}),__setModuleDefault=this&&this[a7j(0xc4)]||(Object['create']?function(y,f){const g=a7j;Object[g(0x117)](y,g(0x134),{'enumerable':!![],'value':f});}:function(y,f){const o=a7j;y[o(0x134)]=f;}),__importStar=this&&this[a7j(0x120)]||function(y){const r=a7j;if(y&&y[r(0x9f)])return y;var f={};if(y!=null){for(var a in y)if(a!=='default'&&Object[r(0x128)][r(0x14f)][r(0xbc)](y,a))__createBinding(f,y,a);}return __setModuleDefault(f,y),f;},__awaiter=this&&this[a7j(0x121)]||function(y,f,a,b){function I(G){return G instanceof a?G:new a(function(T){T(G);});}return new(a||(a=Promise))(function(G,T){const H=a7f;function u(F){const i=a7f;try{Z(b[i(0x6b)](F));}catch(d){T(d);}}function t(F){try{Z(b['throw'](F));}catch(d){T(d);}}function Z(F){const l=a7f;F[l(0xa0)]?G(F[l(0xe2)]):I(F[l(0xe2)])[l(0x126)](u,t);}Z((b=b[H(0x10e)](y,f||[]))['next']());});},__importDefault=this&&this[a7j(0xab)]||function(y){const v=a7j;return y&&y[v(0x9f)]?y:{'default':y};};Object[a7j(0x117)](exports,a7j(0x9f),{'value':!![]}),exports['InquirerHelper']=void 0x0;const _=__importStar(require(a7j(0x13a))),chalk_1=__importDefault(require(a7j(0x68))),fs=__importStar(require('fs')),utils_1=require(a7j(0x6f)),api_helpers_1=require(a7j(0x9b)),inquirer_pagination_prompt_1=require('./pagination/inquirer-pagination-prompt'),inquirer=require(a7j(0x70)),inquirerSearchList=require(a7j(0xe7)),yaml=require(a7j(0xbf));var ConfirmChoices;function a7f(y,f){const a=a7y();return a7f=function(b,I){b=b-0x68;let G=a[b];return G;},a7f(y,f);}(function(y){const P=a7j;y[P(0x119)]='Yes,\x20send',y[P(0x103)]=P(0xd2),y[P(0xac)]=P(0xb0),y['SAVE']=P(0xb5),y['ABORT']=P(0xc8);}(ConfirmChoices||(ConfirmChoices={})));class InquirerHelper{constructor(y){const q=a7j;this[q(0xd8)]=y,this[q(0x108)]=0x32,this[q(0x71)]=f=>__awaiter(this,void 0x0,void 0x0,function*(){const p=q,{editedResult:a}=yield inquirer[p(0x114)]([{'type':p(0xd3),'name':p(0x149),'message':'Go\x20to\x20editor','default':yaml[p(0x110)](f)}]);return yaml[p(0xad)](a);}),this[q(0xb4)]=f=>__awaiter(this,void 0x0,void 0x0,function*(){const Y=q,a=T=>Y(0xa5)+T+Y(0x123);function b(){return __awaiter(this,void 0x0,void 0x0,function*(){const A=a7f;return inquirer['prompt']([{'type':A(0x84),'name':A(0x140),'message':'Provide\x20a\x20file\x20path\x20to\x20write\x20the\x20configuration\x20to\x20(<name>.[json|yaml|yml])','validate':T=>new RegExp(A(0x13e))[A(0x148)](T)?!![]:a(T)}]);});}const {fileName:I}=yield b(),G=I[Y(0xbb)]()[Y(0x87)]('.')[Y(0x6e)]();try{switch(G){case'json':(0x0,utils_1[Y(0x80)])('Configuration\x20file\x20written\x20to\x20'+I);return fs[Y(0x124)](I,JSON[Y(0xec)](f,null,'\x20\x20'));case Y(0x93):case Y(0xba):(0x0,utils_1[Y(0x80)])(Y(0x13f)+I);return fs[Y(0x124)](I,yaml[Y(0x110)](f));default:(0x0,utils_1[Y(0x7d)])(a(G));}}catch(T){(0x0,utils_1['warning'])(Y(0x6a)+T[Y(0x11b)]);}return undefined;}),this[q(0xb6)]=(f,a)=>b=>{const V=q,I=typeof b===V(0xc6)?b[V(0x118)]():b;return a===![]&&I===V(0xff)?'':I;},this['validate']=(f,a,b)=>I=>{const B=q,G=[];if(I===''||I===B(0xff)){if(a!==![])G[B(0xa7)](B(0x14e));else return!![];}f[B(0x74)]===B(0xc6)&&!_[B(0x78)](f[B(0xf5)])&&G['push'](new RegExp(f['pattern'])[B(0x148)](I)?!![]:B(0xdf)+f[B(0xf5)]+'\x27');f[B(0x74)]==='string'&&!_[B(0x78)](f[B(0xf6)])&&G[B(0xa7)](I[B(0xcc)]>=f[B(0xf6)]?!![]:'must\x20be\x20longer\x20than\x20or\x20equal\x20to\x20'+f['minLength']+B(0x143)+I[B(0xcc)]+'\x20characters');f['type']===B(0xc6)&&!_[B(0x78)](f[B(0xbd)])&&G['push'](I[B(0xcc)]<=f[B(0xbd)]?!![]:B(0x90)+f['maxLength']+B(0x143)+I[B(0xcc)]+'\x20characters');b&&Number[B(0xe1)](parseInt(I,0xa))&&G[B(0xa7)](B(0x111)+I);f[B(0x74)]===B(0xb8)&&!_['isUndefined'](f[B(0x69)])&&G[B(0xa7)](I>=f[B(0x69)]?!![]:B(0x72)+f[B(0x69)]);f[B(0x74)]===B(0xb8)&&!_[B(0x78)](f[B(0x85)])&&G[B(0xa7)](I<=f[B(0x85)]?!![]:B(0xc9)+f[B(0x85)]);if(f['type']===B(0x10c)){const t=(0x0,utils_1[B(0x147)])(I);G[B(0xa7)](t===![]||_[B(0xf0)](t)?B(0xc0):!![]);}const T=G[B(0xb6)](Z=>Z!==!![]),u=(f===null||f===void 0x0?void 0x0:f[B(0xeb)])?'\x0a'+chalk_1['default'][B(0xae)]('>>')+'\x20Example:\x20'+chalk_1['default']['whiteBright'](JSON[B(0xec)](f[B(0xeb)])):'';return T[B(0xcc)]>0x0?T[B(0x11d)](chalk_1[B(0x134)][B(0xa1)](B(0xd5)))+u:!![];},this[q(0x75)]=(f,a,b)=>{const S=q,I=f[f[S(0xcc)]-0x1];function G(){const n=S;return f['slice'](0x0,-0x1)[n(0x9a)](t=>t['charAt'](0x0)[n(0x112)]()+t[n(0x95)](0x1))['join']('>');}const T=f[S(0xcc)]>0x1?chalk_1[S(0x134)]['bgGrey'][S(0xe0)](G())+':\x20':'',u=b?'\x20('+chalk_1[S(0x134)]['blue'](b)+')':'';return chalk_1[S(0x134)]['reset'](''+T+a+'\x20'+chalk_1[S(0x134)]['bold']['greenBright'](I)+u+'?');},this[q(0x102)]=(f,a,b)=>__awaiter(this,void 0x0,void 0x0,function*(){const e=q;if(a[e(0xcc)]<0x1){const T=b?e(0xa6)+b:e(0xe6);throw new Error(e(0x8f)+f+'\x20'+T+'.');}const I=e(0x81)+f+e(0xa3),G=a[e(0xcc)]>0x4?'search-list':e(0xb1);return(yield inquirer[e(0x114)]([{'type':G,'name':e(0x14a),'message':I,'choices':a}]))[e(0x14a)];}),this[q(0x129)]=(f,a,b)=>__awaiter(this,void 0x0,void 0x0,function*(){const J=q,{elements:I,nextCursor:G}=yield a();if(I[J(0xcc)]<0x1){const t=b?J(0xa6)+b:J(0xe6);throw new Error('No\x20'+f+'\x20'+t+'.');}const T='Choose\x20the\x20'+f+J(0xa3);if(G!==undefined){const Z=({nextPageCursor:F})=>__awaiter(this,void 0x0,void 0x0,function*(){const X=J,d=yield a(F);return{'elements':d[X(0xd7)],'nextPageCursor':d[X(0xdd)]};});return(yield inquirer[J(0x114)]([{'type':J(0x82),'name':J(0x14a),'message':T,'choices':I,'nextPageCursor':G,'loadMore':Z}]))[J(0x14a)];}const u=I[J(0xcc)]>0x4?J(0x130):J(0xb1);return(yield inquirer[J(0x114)]([{'type':u,'name':J(0x14a),'message':T,'choices':I}]))[J(0x14a)];}),this[q(0x14d)]=(f,a)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const M=q,b=''+(a?'('+chalk_1[M(0x134)]['blue'](a)+')\x20':''),I=M(0xca)+chalk_1[M(0x134)][M(0x14b)](f)+'\x20'+b+M(0x8d),G=this['validate']({'type':M(0xc6),'required':!![]});return(yield inquirer['prompt']([{'type':M(0x84),'name':M(0x14a),'message':I,'validate':G}]))[M(0x14a)];}),this[q(0x89)]=f=>__awaiter(this,void 0x0,void 0x0,function*(){const C=q;return(yield inquirer[C(0x114)]([{'type':C(0x146),'name':'name','message':f,'default':!![]}]))[C(0x14a)];}),this[q(0x79)]=f=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const K=q,a=b=>I=>__awaiter(this,void 0x0,void 0x0,function*(){const N=a7f;var G;const T=yield this[N(0xd8)][N(0xb1)][N(0x135)]({'parameters':{'projectId':b},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':I}}),u=T[N(0x12a)][N(0x135)][N(0x9a)](t=>t['id']);return{'elements':u,'nextCursor':(G=T[N(0x98)])===null||G===void 0x0?void 0x0:G[N(0xd6)]};});return this[K(0xbe)](K(0x139),a,f);}),this[q(0xe4)]=f=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const O=q,a=b=>I=>__awaiter(this,void 0x0,void 0x0,function*(){const x=a7f;var G;const T=yield this['apiClient']['list'][x(0xe3)]({'parameters':{'projectId':b},'options':{'per_page':this[x(0x108)],'cursor':I}}),u=T[x(0x12a)][x(0xe3)][x(0x9a)](t=>t['id']);return{'elements':u,'nextCursor':(G=T['pagination'])===null||G===void 0x0?void 0x0:G[x(0xd6)]};});return this[O(0xbe)]('job',a,f);}),this['askForJobRun']=(f,a)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const W=q,b=I=>G=>__awaiter(this,void 0x0,void 0x0,function*(){const Q=a7f;var T;const u=yield this[Q(0xd8)][Q(0x10f)][Q(0x115)]['runs']({'parameters':{'projectId':I,'jobId':f},'options':{'per_page':this[Q(0x108)],'cursor':G}}),t=u['data'][Q(0xaf)][Q(0x9a)](Z=>Z['id']+Q(0x7e)+Z['startedAt']+')');return{'elements':t,'nextCursor':(T=u[Q(0x98)])===null||T===void 0x0?void 0x0:T[Q(0xd6)]};});return this[W(0xbe)]('job\x20runs',b,a,W(0xda)+f+'\x27')[W(0x126)](I=>I['split']('\x20')[0x0]);}),this[q(0x142)]=(f,a,b)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const w=q;if(b!==undefined){const I=G=>T=>__awaiter(this,void 0x0,void 0x0,function*(){const k=a7f;var u;const t=yield this['apiClient']['get'][k(0x115)][k(0xf2)]({'parameters':{'projectId':G,'jobId':b},'options':{'per_page':this[k(0x108)],'cursor':T}});return{'elements':t[k(0x12a)][k(0xf2)][k(0x9a)](Z=>Z['id']+k(0x7e)+Z['createdAt']+')'),'nextCursor':(u=t[k(0x98)])===null||u===void 0x0?void 0x0:u['cursor']};});return this[w(0xbe)]('job\x20builds',I,f,w(0xda)+b+'\x27')[w(0x126)](G=>G['split']('\x20')[0x0]);}if(a!==undefined){const G=T=>u=>__awaiter(this,void 0x0,void 0x0,function*(){const m=w;var t;const Z=yield this['apiClient'][m(0x10f)][m(0x139)][m(0xf2)]({'parameters':{'projectId':T,'serviceId':a},'options':{'per_page':this[m(0x108)],'cursor':u}});return{'elements':Z[m(0x12a)][m(0xf2)][m(0x9a)](F=>F['id']+m(0x7e)+F[m(0x116)]+')'),'nextCursor':(t=Z[m(0x98)])===null||t===void 0x0?void 0x0:t[m(0xd6)]};});return this[w(0xbe)](w(0xfd),G,f,'service:\x20\x27'+b+'\x27')[w(0x126)](T=>T[w(0x87)]('\x20')[0x0]);}throw new Error(w(0x83));}),this['askForAddon']=f=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const z=q,a=b=>I=>__awaiter(this,void 0x0,void 0x0,function*(){const E=a7f;var G;const T=yield this[E(0xd8)][E(0xb1)][E(0x94)]({'parameters':{'projectId':b},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':I}});return{'elements':T[E(0x12a)]['addons']['map'](u=>u['id']),'nextCursor':(G=T[E(0x98)])===null||G===void 0x0?void 0x0:G[E(0xd6)]};});return this[z(0xbe)](z(0x86),a,f);}),this['askForAddonBackup']=(f,a)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const h=q,b=I=>G=>__awaiter(this,void 0x0,void 0x0,function*(){const L=a7f;var T;const u=yield this[L(0xd8)][L(0x10f)][L(0x86)]['backups']({'parameters':{'projectId':I,'addonId':a},'options':{'per_page':this[L(0x108)],'cursor':G}});return{'elements':u['data'][L(0xc1)]['map'](t=>t['id']+'\x20(completedAt:\x20'+(t[L(0x145)]||'not\x20completed')+')'),'nextCursor':(T=u[L(0x98)])===null||T===void 0x0?void 0x0:T[L(0xd6)]};});return this[h(0xbe)](h(0xc1),b,f,'addon:\x20\x27'+a+'\x27')[h(0x126)](I=>I['split']('\x20')[0x0]);}),this['askForVolume']=f=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const y0=q,a=b=>__awaiter(this,void 0x0,void 0x0,function*(){const D=a7f;return(yield this[D(0xd8)][D(0xb1)][D(0x6d)]({'parameters':{'projectId':b}}))[D(0x12a)][D(0x9a)](I=>I['id']);});return this[y0(0x137)](y0(0xf3),a,f);}),this[q(0x91)]=f=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const y2=q,a=b=>I=>__awaiter(this,void 0x0,void 0x0,function*(){const y1=a7f;var G;const T=yield this[y1(0xd8)]['list']['secrets']({'parameters':{'projectId':b},'options':{'per_page':this[y1(0x108)],'cursor':I}});return{'elements':T['data'][y1(0xb7)]['map'](u=>u['id']),'nextCursor':(G=T[y1(0x98)])===null||G===void 0x0?void 0x0:G[y1(0xd6)]};});return this[y2(0xbe)](y2(0xc3),a,f);}),this[q(0xe5)]=f=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const y3=q,a=yield this[y3(0xd8)][y3(0x10f)][y3(0xa4)]({'parameters':{'domain':f}}),b=a[y3(0x12a)][y3(0xb9)]['map'](G=>G[y3(0x14a)]+y3(0x12e)+G[y3(0x127)]+')'),I=y3(0xc2)+f+')';return this[y3(0x102)](y3(0x150),b,I)[y3(0x126)](G=>G[y3(0x87)]('\x20')[0x0]);}),this[q(0x10b)]=f=>__awaiter(this,void 0x0,void 0x0,function*(){const y4=q;return(yield inquirer[y4(0x114)]([{'type':'confirm','name':y4(0x10d),'message':chalk_1[y4(0x134)][y4(0x141)](y4(0x7b)+(f||'a\x20Northflank\x20resource')+'.\x20This\x20is\x20irreversible.\x20Please\x20confirm!'),'default':![]}]))[y4(0x10d)];}),this[q(0xc5)]=(f,a)=>__awaiter(this,void 0x0,void 0x0,function*(){const y5=q;_['isUndefined'](f[y5(0x14a)])&&(a['length']<=0x0?_[y5(0xfc)](f,y5(0x14a),y5(0x134)):yield(0x0,utils_1[y5(0x107)])(0xa)(()=>__awaiter(this,void 0x0,void 0x0,function*(){const y6=y5,{name:b}=yield inquirer[y6(0x114)]([{'type':y6(0x84),'name':y6(0x14a),'message':y6(0x10a),'default':'main-context'}]);if(!f['override']&&a['find'](I=>I[y6(0x14a)]===b)){const {c:I}=yield inquirer[y6(0x114)]([{'type':y6(0x146),'name':'c','message':'Context\x20with\x20name\x20\x27'+b+y6(0xea),'default':![]}]);if(I===![])throw new Error(y6(0x8b));_['set'](f,y6(0x12d),!![]);}_[y6(0xfc)](f,y6(0x14a),b);})));if(_[y5(0x78)](f['token'])){const b=yield this[y5(0x73)]();_['set'](f,'token',b);}return f;}),this[q(0x73)]=()=>__awaiter(this,void 0x0,void 0x0,function*(){const y7=q,{token:f}=yield inquirer['prompt']([{'type':'password','name':y7(0xf8),'mask':'*','message':y7(0x132)}]);return f;}),inquirer[q(0x100)](q(0x130),inquirerSearchList),inquirer[q(0x100)](q(0x82),inquirer_pagination_prompt_1[q(0xb3)]);}[a7j(0xf7)](y,f){return __awaiter(this,void 0x0,void 0x0,function*(){const y8=a7f,a=yaml['safeDump'](y),b=_['max'](a[y8(0x87)]('\x0a')[y8(0x9a)](T=>T['length'])),I=chalk_1[y8(0x134)][y8(0xf1)]('-'[y8(0x9e)](b)+'\x0a'),{confirm:G}=yield inquirer[y8(0x114)]([{'type':y8(0xb1),'name':y8(0x146),'message':''+chalk_1['default'][y8(0xd1)][y8(0x14b)](y8(0xfa))+I+chalk_1[y8(0x134)][y8(0xee)](a)+I,'choices':Object['values'](ConfirmChoices)}]);switch(G){case ConfirmChoices['YES']:return y;case ConfirmChoices[y8(0xe9)]:throw new Error(y8(0x122));case ConfirmChoices[y8(0x103)]:return this[y8(0x6c)](f);case ConfirmChoices[y8(0xac)]:return this['confirmationPrompt'](yield this[y8(0x71)](y),f);case ConfirmChoices[y8(0x136)]:yield this['saveFile'](y);return this[y8(0xf7)](y,f);default:throw new Error(y8(0xcd));}});}['retrievePayloadViaInteractiveCli'](y,f){return __awaiter(this,void 0x0,void 0x0,function*(){const y9=a7f;if((f===null||f===void 0x0?void 0x0:f[y9(0xfe)])!==undefined)this[y9(0xfe)]=f===null||f===void 0x0?void 0x0:f[y9(0xfe)];this['tmpCmdPath']=f===null||f===void 0x0?void 0x0:f[y9(0xdb)];const a={};return yield this['propToType']([],y[y9(0xd0)][y9(0x76)],a),this[y9(0xfe)]=a,yield this[y9(0xf7)](a,y);});}[a7j(0xce)](y,f,a,b){return __awaiter(this,void 0x0,void 0x0,function*(){const yy=a7f;let I;if(f[yy(0x109)]&&!_[yy(0xfb)](f,'properties')){if(f[yy(0x109)][yy(0xcc)]>0x1){const {choice:G}=yield inquirer[yy(0x114)]([{'type':'list','name':yy(0x14c),'message':yy(0x12b)+(y[y['length']-0x1]||'')+yy(0x131),'choices':f['oneOf'][yy(0x9a)](T=>T['description'])}]);I=yield this[yy(0x97)](y,f[yy(0x109)][yy(0x133)](T=>T['description']===G),a,b);}else{const T=f['oneOf'][0x0];_[yy(0xfc)](T,yy(0x13c),f['description']),I=yield this[yy(0x97)](y,T,a,b);}I={};}else I=yield this[yy(0x97)](y,f,a,b);return I;});}[a7j(0x8e)](y,f,a,b){var I;return __awaiter(this,void 0x0,void 0x0,function*(){const yf=a7f;if(b===![]){const {addEntry:u}=yield inquirer[yf(0x114)]([{'type':yf(0x146),'name':'addEntry','message':this[yf(0x75)](f,'Do\x20you\x20want\x20to\x20add',y===null||y===void 0x0?void 0x0:y[yf(0x13c)]),'default':![]}]);if(!u)return a;}const G=Object[yf(0x12c)]((I=y===null||y===void 0x0?void 0x0:y[yf(0x13d)])!==null&&I!==void 0x0?I:[]),T=y[yf(0x104)]||[];if(G[yf(0xcc)]>0x0)for(const t of G){const Z=f[yf(0xa9)](t);if(f['length']>0x0&&!_[yf(0xfb)](a,f['join']('.')))_['set'](a,f[yf(0x11d)]('.'),{});yield this[yf(0xce)](Z,y[yf(0x13d)][t],a,T[yf(0x7f)](t));}else yield this[yf(0x97)](f,Object[yf(0x125)](Object[yf(0x125)]({},y),{'type':'rawObject'}),a,b);return a;});}[a7j(0xdc)](y,f,a,b){return __awaiter(this,void 0x0,void 0x0,function*(){const ya=a7f;if(f&&a)return!![];const I=f?ya(0x88):'Do\x20you\x20want\x20to\x20add\x20more',{addEntry:G}=yield inquirer[ya(0x114)]([{'type':ya(0x146),'name':'addEntry','message':this[ya(0x75)](y,I,f?b:undefined),'default':![]}]);return G;});}[a7j(0x97)](y,f,a,b){return __awaiter(this,void 0x0,void 0x0,function*(){const yb=a7f;let I;const G=y[yb(0x11d)]('.');switch(f===null||f===void 0x0?void 0x0:f[yb(0x74)]){case'array':{let T=!![];while(yield this[yb(0xdc)](y,T,b,f===null||f===void 0x0?void 0x0:f['description'])){const u=_[yb(0x10f)](a,G);_[yb(0x101)](a,G),yield this[yb(0x97)](y,f['items'],a);const t=_[yb(0x10f)](a,G);!_[yb(0xf9)](u)?_['set'](a,G,[t]):(u[yb(0xa7)](t),_[yb(0xfc)](a,G,u)),T=![];}return I||[];}case yb(0xb2):{return I=yield this[yb(0x8e)](f,y,a,b),I;}case yb(0x10c):I=(0x0,utils_1[yb(0x147)])(yield this[yb(0xa8)](y,f,b))||undefined;break;case'string':case yb(0x96):case'integer':default:I=yield this['ask'](y,f,b,a);break;}return!_[yb(0x78)](I)&&_[yb(0xfc)](a,G,I),I;});}[a7j(0xa8)](y,f,a,b){var I;return __awaiter(this,void 0x0,void 0x0,function*(){const yI=a7f,G=y[y['length']-0x1],{defaultValue:defaultValue=(I=f===null||f===void 0x0?void 0x0:f[yI(0xeb)])!==null&&I!==void 0x0?I:f===null||f===void 0x0?void 0x0:f[yI(0x134)],choices:choices=f===null||f===void 0x0?void 0x0:f[yI(0xd9)],pagination:T}=yield(0x0,api_helpers_1['fetchResourceList'])(G,this['apiClient'],this['tmpCmdPath'],b,this[yI(0xc7)],y);let u='input';if(!_['isUndefined'](choices)&&choices[yI(0xcc)]>0x0){if(T!==undefined&&T[yI(0x105)]!==undefined)u=yI(0x82);else choices[yI(0xcc)]>0x4&&typeof choices[0x0]==='string'?u=yI(0x130):u=yI(0xb1);}else{if((f===null||f===void 0x0?void 0x0:f[yI(0x74)])===yI(0x96))u=yI(0x146);else{if((f===null||f===void 0x0?void 0x0:f['type'])===yI(0xb8))u=yI(0x84);else(f===null||f===void 0x0?void 0x0:f[yI(0x74)])===yI(0x10c)&&(u=yI(0xd3));}}let t=a!==![]?!_[yI(0xf4)](defaultValue)?defaultValue:JSON[yI(0xec)](defaultValue):_[yI(0x77)](defaultValue)?defaultValue:yI(0xff);if(choices)t=t['toString']();_[yI(0xfb)](this[yI(0xfe)],y[yI(0x11d)]('.'))&&(t=this['resultCache'][y['join']('.')]);const Z=choices&&a===![]?[yI(0xff),...choices]:choices,F=(f===null||f===void 0x0?void 0x0:f[yI(0x74)])==='integer',d=Object[yI(0x125)]({'type':u,'name':'id','message':this[yI(0x8a)](y,f),'choices':Z,'default':t,'filter':this[yI(0xb6)](u,a),'validate':this['validate'](f,a,F)},T),R=(yield inquirer[yI(0x114)]([d]))['id'];if(R===yI(0xff)||R==='')return undefined;if(F)return parseInt(R,0xa);return R;});}[a7j(0x8a)](y,f){const yG=a7j,a=(f===null||f===void 0x0?void 0x0:f[yG(0x74)])!==yG(0x96)?'What\x20do\x20you\x20want\x20to\x20use\x20as':'Should\x20it\x20be';return this['getPathString'](y,a,f===null||f===void 0x0?void 0x0:f['description']);}[a7j(0x9d)](){return __awaiter(this,void 0x0,void 0x0,function*(){const yu=a7f,y=f=>__awaiter(this,void 0x0,void 0x0,function*(){const yT=a7f;var a;const b=yield this[yT(0xd8)][yT(0xb1)][yT(0x144)]({'options':{'per_page':this[yT(0x108)],'cursor':f}}),I=b[yT(0x12a)][yT(0x144)][yT(0x9a)](G=>G['id']);return{'elements':I,'nextCursor':(a=b['pagination'])===null||a===void 0x0?void 0x0:a['cursor']};});return yield this['askForResourcePaginated'](yu(0x8c),y);});}[a7j(0x137)](y,f,a,b){return __awaiter(this,void 0x0,void 0x0,function*(){const yt=a7f,I=a||this[yt(0xd8)]['contextProvider'][yt(0xe8)]();if(_['isUndefined'](I))throw new Error(yt(0x99));const G=yield f(I);return yield this[yt(0x102)](y,G,(b?b+yt(0x7c):'')+yt(0x11c)+I+'\x27');});}[a7j(0xbe)](y,f,a,b){return __awaiter(this,void 0x0,void 0x0,function*(){const yZ=a7f,I=a||this[yZ(0xd8)]['contextProvider'][yZ(0xe8)]();if(_[yZ(0x78)](I))throw new Error(yZ(0x99));const G=yield f(I);return yield this[yZ(0x129)](y,G,(b?b+yZ(0x7c):'')+yZ(0x11c)+I+'\x27');});}[a7j(0x7a)](){return __awaiter(this,void 0x0,void 0x0,function*(){const yF=a7f,y=yield this['apiClient']['list'][yF(0x92)]({}),f=y[yF(0x12a)]['domains'][yF(0x9a)](a=>a[yF(0x14a)]);return this[yF(0x102)](yF(0xa4),f);});}[a7j(0xcb)](){return __awaiter(this,void 0x0,void 0x0,function*(){const yd=a7f,y=yield this[yd(0xd8)][yd(0xb1)]['registries']({}),f=y[yd(0x12a)][yd(0xed)][yd(0x9a)](a=>a['id']);return this[yd(0x102)]('credentials',f);});}['setPathVars'](y){const yR=a7j;this[yR(0xc7)]=y;}}exports[a7j(0x151)]=InquirerHelper;
1
+ 'use strict';const a7Q=a7p;(function(i,p){const O=a7p,B=i();while(!![]){try{const H=parseInt(O(0x145))/0x1+-parseInt(O(0x194))/0x2+parseInt(O(0xec))/0x3*(-parseInt(O(0xf8))/0x4)+parseInt(O(0x137))/0x5+parseInt(O(0x165))/0x6+-parseInt(O(0x17b))/0x7*(-parseInt(O(0x138))/0x8)+-parseInt(O(0x15b))/0x9;if(H===p)break;else B['push'](B['shift']());}catch(j){B['push'](B['shift']());}}}(a7i,0x1eebf));var __createBinding=this&&this[a7Q(0x14b)]||(Object[a7Q(0x19e)]?function(i,p,B,H){const U=a7Q;if(H===undefined)H=B;var j=Object[U(0x169)](p,B);(!j||(U(0x161)in j?!p['__esModule']:j['writable']||j[U(0x14e)]))&&(j={'enumerable':!![],'get':function(){return p[B];}}),Object['defineProperty'](i,H,j);}:function(i,p,B,H){if(H===undefined)H=B;i[H]=p[B];}),__setModuleDefault=this&&this[a7Q(0x115)]||(Object['create']?function(i,p){const e=a7Q;Object[e(0x142)](i,'default',{'enumerable':!![],'value':p});}:function(i,p){const G=a7Q;i[G(0x13d)]=p;}),__importStar=this&&this[a7Q(0xe0)]||function(i){const x=a7Q;if(i&&i[x(0xde)])return i;var p={};if(i!=null){for(var B in i)if(B!=='default'&&Object[x(0x1a8)][x(0x191)]['call'](i,B))__createBinding(p,i,B);}return __setModuleDefault(p,i),p;},__awaiter=this&&this[a7Q(0x1a5)]||function(i,p,B,H){function j(l){return l instanceof B?l:new B(function(a){a(l);});}return new(B||(B=Promise))(function(l,a){function D(E){const b=a7p;try{L(H[b(0xdd)](E));}catch(C){a(C);}}function f(E){try{L(H['throw'](E));}catch(C){a(C);}}function L(E){const w=a7p;E[w(0xf6)]?l(E[w(0x187)]):j(E[w(0x187)])[w(0x146)](D,f);}L((H=H['apply'](i,p||[]))['next']());});},__importDefault=this&&this[a7Q(0x12f)]||function(i){const X=a7Q;return i&&i[X(0xde)]?i:{'default':i};};function a7i(){const iv=['isArray','__setModuleDefault','chalk','found','reset','Enter\x20the\x20','retry','safeLoad','registries','maxLength','createdAt','validate','runs','\x20in\x20','Yes,\x20send','Should\x20it\x20be','SAVE','array','No\x20builds\x20found','\x20characters,\x20is\x20','domains','has','jobs','\x20characters','DynamicReloadPaginationPrompt','toString','Do\x20you\x20want\x20to\x20add\x20more','__importDefault','integer','blue','askForProjectScopedResource','WARNING:\x20You\x20are\x20about\x20to\x20delete\x20','pattern','service','saveFile','1064365ziVhWp','8FpgKYV','askForDomain','minimum','startedAt','doesn\x27t\x20match\x20pattern\x20\x27','default','stringify','push','./pagination/inquirer-pagination-prompt','ask','defineProperty','pagination-prompt','retrievePayloadViaInteractiveCli','69585VdghxT','then','resultCache','YES','confirmationPrompt','domain','__createBinding','token','grey','configurable','maximum','split','charAt','editor','subdomains','secret','confirm','success','job:\x20\x27','addons','credentials','\x27\x20already\x20exists.\x20Do\x20you\x20want\x20to\x20override\x20this\x20context\x20(y)\x20or\x20enter\x20a\x20new\x20name\x20(N)?','1662561MPgaaC','project','main-context','Do\x20you\x20want\x20to\x20add','askForService','safeDump','get','Choose\x20the\x20name\x20of\x20the\x20new\x20local\x20context:','Unexpected\x20file\x20type:\x20','\x20to\x20use:','1096794AEJsOJ','pathVars','Configuration\x20file\x20written\x20to\x20','items','getOwnPropertyDescriptor','askForResourcePaginated','a\x20Northflank\x20resource','this\x20option\x20is\x20required,\x20please\x20answer','getType','minLength','apiClient','must\x20be\x20bigger\x20than\x20or\x20equal\x20to\x20','must\x20be\x20longer\x20than\x20or\x20equal\x20to\x20','green','.*\x5c.(json|yaml|yml)$','EDIT','fetchResourceList','map','name','whiteBright','filter','max','963494UVPoTF','concat','includes','body','must\x20be\x20smaller\x20than\x20or\x20equal\x20to\x20','askForBuild','underline','defaultPaginationPageSize','isUndefined','values','getInnerType','askForProject','value','prompt','length','ABORT','isNaN','greenBright','don\x27t\x20change','InquirerHelper','fileName','getCurrentProjectName','hasOwnProperty','Context\x20with\x20name\x20\x27','unset','417790DpTxph','object','\x20(startedAt:\x20','askForResource','tokenPrompt','toUpperCase','What\x27s\x20the\x20','registerPrompt','builds','type','create','addon','bold','getQuestionString','addEntry','propToType','nextCursor','__awaiter','rawObject','getPathString','prototype','find','editPayload','Provide\x20a\x20file\x20path\x20to\x20write\x20the\x20configuration\x20to\x20(<name>.[json|yaml|yml])','description','askForProjectScopedResourcePaginated','js-yaml','domain\x20(','assign','set','job\x20build','job\x20runs','must\x20be\x20a\x20number,\x20is\x20','isObject','test','search-list','askForVolume','isEmpty','No,\x20edit','slice','projects','blueBright','loginPrompt','What\x20do\x20you\x20want\x20to\x20use\x20as','confirmation','for\x20this\x20','string','next','__esModule','askForJobRun','__importStar','trim','boolean','askArrayEntry','example','must\x20be\x20shorter\x20than\x20or\x20equal\x20to\x20','yml','oneOf','writeFileSync','isBoolean','yellowBright','pagination','540VEdRow','askForCredentials','required','volumes',',\x20supported\x20types:\x20[json|yaml|yml]','backups','No\x20','No,\x20repeat','Choose\x20the\x20login\x20token:','warning','done','join','1836KkKjSv','service:\x20\x27','to\x20use:','fullName','services','Choose\x20the\x20','project:\x20\x27','Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.','REPEAT','deleteWarningPrompt','data','secrets','askConfirm','askForSubdomain','askForJob','job','Aborted.','job\x20builds','list','contextProvider','askGeneric','Writing\x20configuration\x20failed:\x20','cursor','password','input','No,\x20abort','isValidJSON','elements'];a7i=function(){return iv;};return a7i();}Object[a7Q(0x142)](exports,a7Q(0xde),{'value':!![]}),exports[a7Q(0x18e)]=void 0x0;function a7p(i,p){const B=a7i();return a7p=function(H,j){H=H-0xc8;let l=B[H];return l;},a7p(i,p);}const _=__importStar(require('lodash')),chalk_1=__importDefault(require(a7Q(0x116))),fs=__importStar(require('fs')),utils_1=require('./utils'),api_helpers_1=require('./api-helpers'),inquirer_pagination_prompt_1=require(a7Q(0x140)),inquirer=require('inquirer'),inquirerSearchList=require('inquirer-search-list'),yaml=require(a7Q(0xc8));var ConfirmChoices;(function(i){const K=a7Q;i[K(0x148)]=K(0x122),i[K(0x100)]=K(0xf3),i[K(0x174)]=K(0xd4),i[K(0x124)]='No,\x20but\x20save\x20as\x20file',i[K(0x18a)]=K(0x111);}(ConfirmChoices||(ConfirmChoices={})));class InquirerHelper{constructor(i){const N=a7Q;this[N(0x16f)]=i,this[N(0x182)]=0x32,this[N(0x1aa)]=p=>__awaiter(this,void 0x0,void 0x0,function*(){const m=N,{editedResult:B}=yield inquirer[m(0x188)]([{'type':'editor','name':'editedResult','message':'Go\x20to\x20editor','default':yaml['safeDump'](p)}]);return yaml[m(0x11b)](B);}),this[N(0x136)]=p=>__awaiter(this,void 0x0,void 0x0,function*(){const J=N,B=a=>J(0x163)+a+J(0xf0);function H(){return __awaiter(this,void 0x0,void 0x0,function*(){const Y=a7p;return inquirer[Y(0x188)]([{'type':Y(0x110),'name':Y(0x18f),'message':Y(0x1ab),'validate':a=>new RegExp(Y(0x173))['test'](a)?!![]:B(a)}]);});}const {fileName:j}=yield H(),l=j[J(0x12d)]()[J(0x150)]('.')['pop']();try{switch(l){case'json':(0x0,utils_1[J(0x156)])(J(0x167)+j);return fs['writeFileSync'](j,JSON[J(0x13e)](p,null,'\x20\x20'));case'yaml':case J(0xe6):(0x0,utils_1[J(0x156)])(J(0x167)+j);return fs[J(0xe8)](j,yaml[J(0x160)](p));default:(0x0,utils_1[J(0xf5)])(B(l));}}catch(a){(0x0,utils_1[J(0xf5)])(J(0x10d)+a['message']);}return undefined;}),this[N(0x179)]=(p,B)=>H=>{const k=N,j=typeof H===k(0xdc)?H[k(0xe1)]():H;return B===![]&&j==='don\x27t\x20change'?'':j;},this[N(0x11f)]=(p,B,H)=>j=>{const M=N,l=[];if(j===''||j===M(0x18d)){if(B!==![])l[M(0x13f)](M(0x16c));else return!![];}p[M(0x19d)]===M(0xdc)&&!_['isUndefined'](p[M(0x134)])&&l[M(0x13f)](new RegExp(p[M(0x134)])[M(0xd0)](j)?!![]:M(0x13c)+p[M(0x134)]+'\x27');p[M(0x19d)]===M(0xdc)&&!_[M(0x183)](p[M(0x16e)])&&l[M(0x13f)](j['length']>=p[M(0x16e)]?!![]:M(0x171)+p[M(0x16e)]+M(0x127)+j[M(0x189)]+M(0x12b));p['type']===M(0xdc)&&!_[M(0x183)](p[M(0x11d)])&&l[M(0x13f)](j[M(0x189)]<=p[M(0x11d)]?!![]:M(0xe5)+p['maxLength']+M(0x127)+j['length']+'\x20characters');H&&Number[M(0x18b)](parseInt(j,0xa))&&l[M(0x13f)](M(0xce)+j);p[M(0x19d)]===M(0x130)&&!_['isUndefined'](p['minimum'])&&l['push'](j>=p['minimum']?!![]:M(0x170)+p[M(0x13a)]);p['type']===M(0x130)&&!_[M(0x183)](p[M(0x14f)])&&l[M(0x13f)](j<=p[M(0x14f)]?!![]:M(0x17f)+p[M(0x14f)]);if(p[M(0x19d)]==='rawObject'){const f=(0x0,utils_1[M(0x112)])(j);l[M(0x13f)](f===![]||_[M(0xd3)](f)?'must\x20be\x20a\x20valid\x20non-empty\x20json\x20string':!![]);}const a=l[M(0x179)](L=>L!==!![]),D=(p===null||p===void 0x0?void 0x0:p[M(0xe4)])?'\x0a'+chalk_1[M(0x13d)]['red']('>>')+'\x20Example:\x20'+chalk_1[M(0x13d)][M(0x178)](JSON[M(0x13e)](p[M(0xe4)])):'';return a[M(0x189)]>0x0?a[M(0xf7)](chalk_1['default'][M(0x181)]('\x20and\x20it\x20'))+D:!![];},this[N(0x1a7)]=(p,B,H)=>{const F=N,j=p[p[F(0x189)]-0x1];function l(){const q=F;return p[q(0xd5)](0x0,-0x1)['map'](f=>f[q(0x151)](0x0)[q(0x199)]()+f[q(0xd5)](0x1))[q(0xf7)]('>');}const a=p[F(0x189)]>0x1?chalk_1[F(0x13d)]['bgGrey'][F(0x178)](l())+':\x20':'',D=H?'\x20('+chalk_1[F(0x13d)][F(0x131)](H)+')':'';return chalk_1['default'][F(0x118)](''+a+B+'\x20'+chalk_1[F(0x13d)][F(0x1a0)][F(0x18c)](j)+D+'?');},this[N(0x197)]=(p,B,H)=>__awaiter(this,void 0x0,void 0x0,function*(){const g=N;if(B[g(0x189)]<0x1){const a=H?g(0xdb)+H:g(0x117);throw new Error(g(0xf2)+p+'\x20'+a+'.');}const j=g(0xfd)+p+'\x20to\x20use:',l=B[g(0x189)]>0x4?g(0xd1):g(0x10a);return(yield inquirer[g(0x188)]([{'type':l,'name':g(0x177),'message':j,'choices':B}]))[g(0x177)];}),this[N(0x16a)]=(p,B,H)=>__awaiter(this,void 0x0,void 0x0,function*(){const r=N,{elements:j,nextCursor:l}=yield B();if(j[r(0x189)]<0x1){const f=H?r(0xdb)+H:r(0x117);throw new Error('No\x20'+p+'\x20'+f+'.');}const a=r(0xfd)+p+r(0x164);if(l!==undefined){const L=({nextPageCursor:E})=>__awaiter(this,void 0x0,void 0x0,function*(){const W=r,C=yield B(E);return{'elements':C[W(0x113)],'nextPageCursor':C[W(0x1a4)]};});return(yield inquirer[r(0x188)]([{'type':r(0x143),'name':r(0x177),'message':a,'choices':j,'nextPageCursor':l,'loadMore':L}]))[r(0x177)];}const D=j[r(0x189)]>0x4?r(0xd1):r(0x10a);return(yield inquirer[r(0x188)]([{'type':D,'name':r(0x177),'message':a,'choices':j}]))['name'];}),this[N(0x10c)]=(p,B)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const R=N,H=''+(B?'('+chalk_1[R(0x13d)][R(0x131)](B)+')\x20':''),j=R(0x119)+chalk_1[R(0x13d)][R(0x172)](p)+'\x20'+H+R(0xfa),l=this[R(0x11f)]({'type':R(0xdc),'required':!![]});return(yield inquirer[R(0x188)]([{'type':R(0x110),'name':R(0x177),'message':j,'validate':l}]))['name'];}),this[N(0x104)]=p=>__awaiter(this,void 0x0,void 0x0,function*(){const n=N;return(yield inquirer[n(0x188)]([{'type':n(0x155),'name':n(0x177),'message':p,'default':!![]}]))[n(0x177)];}),this[N(0x15f)]=p=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const S=N,B=H=>j=>__awaiter(this,void 0x0,void 0x0,function*(){const s=a7p;var l;const a=yield this[s(0x16f)]['list'][s(0xfc)]({'parameters':{'projectId':H},'options':{'per_page':this[s(0x182)],'cursor':j}}),D=a['data'][s(0xfc)]['map'](f=>f['id']);return{'elements':D,'nextCursor':(l=a[s(0xeb)])===null||l===void 0x0?void 0x0:l[s(0x10e)]};});return this[S(0x1ad)](S(0x135),B,p);}),this[N(0x106)]=p=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const V=N,B=H=>j=>__awaiter(this,void 0x0,void 0x0,function*(){const T=a7p;var l;const a=yield this[T(0x16f)]['list'][T(0x12a)]({'parameters':{'projectId':H},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':j}}),D=a[T(0x102)][T(0x12a)][T(0x176)](f=>f['id']);return{'elements':D,'nextCursor':(l=a[T(0xeb)])===null||l===void 0x0?void 0x0:l['cursor']};});return this['askForProjectScopedResourcePaginated'](V(0x107),B,p);}),this[N(0xdf)]=(p,B)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const o=N,H=j=>l=>__awaiter(this,void 0x0,void 0x0,function*(){const I=a7p;var a;const D=yield this['apiClient'][I(0x161)][I(0x107)]['runs']({'parameters':{'projectId':j,'jobId':p},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':l}}),f=D['data'][I(0x120)][I(0x176)](L=>L['id']+I(0x196)+L[I(0x13b)]+')');return{'elements':f,'nextCursor':(a=D[I(0xeb)])===null||a===void 0x0?void 0x0:a[I(0x10e)]};});return this[o(0x1ad)](o(0xcd),H,B,'job:\x20\x27'+p+'\x27')[o(0x146)](l=>l['split']('\x20')[0x0]);}),this[N(0x180)]=(p,B,H)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const u=N;if(H!==undefined){const j=l=>a=>__awaiter(this,void 0x0,void 0x0,function*(){const y=a7p;var D;const f=yield this[y(0x16f)][y(0x161)][y(0x107)][y(0x19c)]({'parameters':{'projectId':l,'jobId':H},'options':{'per_page':this[y(0x182)],'cursor':a}});return{'elements':f['data']['builds'][y(0x176)](L=>L['id']+y(0x196)+L['createdAt']+')'),'nextCursor':(D=f[y(0xeb)])===null||D===void 0x0?void 0x0:D[y(0x10e)]};});return this[u(0x1ad)](u(0x109),j,p,u(0x157)+H+'\x27')[u(0x146)](l=>l[u(0x150)]('\x20')[0x0]);}if(B!==undefined){const l=a=>D=>__awaiter(this,void 0x0,void 0x0,function*(){const A=u;var f;const L=yield this[A(0x16f)][A(0x161)][A(0x135)][A(0x19c)]({'parameters':{'projectId':a,'serviceId':B},'options':{'per_page':this[A(0x182)],'cursor':D}});return{'elements':L[A(0x102)]['builds'][A(0x176)](E=>E['id']+A(0x196)+E[A(0x11e)]+')'),'nextCursor':(f=L[A(0xeb)])===null||f===void 0x0?void 0x0:f[A(0x10e)]};});return this[u(0x1ad)](u(0xcc),l,p,u(0xf9)+H+'\x27')['then'](a=>a['split']('\x20')[0x0]);}throw new Error(u(0x126));}),this['askForAddon']=p=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const h=N,B=H=>j=>__awaiter(this,void 0x0,void 0x0,function*(){const Z=a7p;var l;const a=yield this['apiClient'][Z(0x10a)][Z(0x158)]({'parameters':{'projectId':H},'options':{'per_page':this[Z(0x182)],'cursor':j}});return{'elements':a[Z(0x102)][Z(0x158)][Z(0x176)](D=>D['id']),'nextCursor':(l=a[Z(0xeb)])===null||l===void 0x0?void 0x0:l[Z(0x10e)]};});return this[h(0x1ad)](h(0x19f),B,p);}),this['askForAddonBackup']=(p,B)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const d=N,H=j=>l=>__awaiter(this,void 0x0,void 0x0,function*(){const P=a7p;var a;const D=yield this['apiClient'][P(0x161)]['addon'][P(0xf1)]({'parameters':{'projectId':j,'addonId':B},'options':{'per_page':this[P(0x182)],'cursor':l}});return{'elements':D[P(0x102)]['backups'][P(0x176)](f=>f['id']+'\x20(completedAt:\x20'+(f['completedAt']||'not\x20completed')+')'),'nextCursor':(a=D[P(0xeb)])===null||a===void 0x0?void 0x0:a['cursor']};});return this[d(0x1ad)]('backups',H,p,'addon:\x20\x27'+B+'\x27')[d(0x146)](l=>l[d(0x150)]('\x20')[0x0]);}),this[N(0xd2)]=p=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const B=H=>__awaiter(this,void 0x0,void 0x0,function*(){const z=a7p;return(yield this['apiClient'][z(0x10a)][z(0xef)]({'parameters':{'projectId':H}}))[z(0x102)][z(0x176)](j=>j['id']);});return this['askForProjectScopedResource']('volume',B,p);}),this['askForSecret']=p=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const i0=N,B=H=>j=>__awaiter(this,void 0x0,void 0x0,function*(){const t=a7p;var l;const a=yield this[t(0x16f)][t(0x10a)][t(0x103)]({'parameters':{'projectId':H},'options':{'per_page':this[t(0x182)],'cursor':j}});return{'elements':a[t(0x102)][t(0x103)][t(0x176)](D=>D['id']),'nextCursor':(l=a['pagination'])===null||l===void 0x0?void 0x0:l[t(0x10e)]};});return this[i0(0x1ad)](i0(0x154),B,p);}),this[N(0x105)]=p=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const i1=N,B=yield this['apiClient'][i1(0x161)]['domain']({'parameters':{'domain':p}}),H=B[i1(0x102)][i1(0x153)][i1(0x176)](l=>l['name']+'\x20(full\x20domain:\x20'+l[i1(0xfb)]+')'),j=i1(0xc9)+p+')';return this[i1(0x197)]('subdomain',H,j)[i1(0x146)](l=>l[i1(0x150)]('\x20')[0x0]);}),this[N(0x101)]=p=>__awaiter(this,void 0x0,void 0x0,function*(){const i2=N;return(yield inquirer[i2(0x188)]([{'type':'confirm','name':i2(0xda),'message':chalk_1['default'][i2(0xea)](i2(0x133)+(p||i2(0x16b))+'.\x20This\x20is\x20irreversible.\x20Please\x20confirm!'),'default':![]}]))[i2(0xda)];}),this[N(0xd8)]=(p,B)=>__awaiter(this,void 0x0,void 0x0,function*(){const i3=N;_[i3(0x183)](p[i3(0x177)])&&(B['length']<=0x0?_[i3(0xcb)](p,i3(0x177),i3(0x13d)):yield(0x0,utils_1[i3(0x11a)])(0xa)(()=>__awaiter(this,void 0x0,void 0x0,function*(){const i4=i3,{name:H}=yield inquirer[i4(0x188)]([{'type':'input','name':i4(0x177),'message':i4(0x162),'default':i4(0x15d)}]);if(!p['override']&&B[i4(0x1a9)](j=>j['name']===H)){const {c:j}=yield inquirer[i4(0x188)]([{'type':'confirm','name':'c','message':i4(0x192)+H+i4(0x15a),'default':![]}]);if(j===![])throw new Error('Context\x20name\x20already\x20exists.');_[i4(0xcb)](p,'override',!![]);}_[i4(0xcb)](p,'name',H);})));if(_[i3(0x183)](p[i3(0x14c)])){const H=yield this['tokenPrompt']();_[i3(0xcb)](p,i3(0x14c),H);}return p;}),this[N(0x198)]=()=>__awaiter(this,void 0x0,void 0x0,function*(){const i5=N,{token:p}=yield inquirer[i5(0x188)]([{'type':i5(0x10f),'name':i5(0x14c),'mask':'*','message':i5(0xf4)}]);return p;}),inquirer[N(0x19b)]('search-list',inquirerSearchList),inquirer[N(0x19b)]('pagination-prompt',inquirer_pagination_prompt_1[N(0x12c)]);}[a7Q(0x149)](i,p){return __awaiter(this,void 0x0,void 0x0,function*(){const i6=a7p,B=yaml[i6(0x160)](i),H=_[i6(0x17a)](B['split']('\x0a')['map'](a=>a[i6(0x189)])),j=chalk_1[i6(0x13d)][i6(0x14d)]('-'['repeat'](H)+'\x0a'),{confirm:l}=yield inquirer[i6(0x188)]([{'type':i6(0x10a),'name':i6(0x155),'message':''+chalk_1[i6(0x13d)][i6(0x1a0)][i6(0x172)]('Please\x20confirm\x20following\x20configuration:\x0a')+j+chalk_1[i6(0x13d)][i6(0xd7)](B)+j,'choices':Object[i6(0x184)](ConfirmChoices)}]);switch(l){case ConfirmChoices[i6(0x148)]:return i;case ConfirmChoices[i6(0x18a)]:throw new Error(i6(0x108));case ConfirmChoices[i6(0x100)]:return this[i6(0x144)](p);case ConfirmChoices[i6(0x174)]:return this['confirmationPrompt'](yield this['editPayload'](i),p);case ConfirmChoices[i6(0x124)]:yield this[i6(0x136)](i);return this['confirmationPrompt'](i,p);default:throw new Error('Something\x20unexpected\x20happened.');}});}[a7Q(0x144)](i,p){return __awaiter(this,void 0x0,void 0x0,function*(){const i7=a7p;if((p===null||p===void 0x0?void 0x0:p[i7(0x147)])!==undefined)this['resultCache']=p===null||p===void 0x0?void 0x0:p['resultCache'];this['tmpCmdPath']=p===null||p===void 0x0?void 0x0:p['cmdPath'];const B={};return yield this[i7(0x1a3)]([],i['opt'][i7(0x17e)],B),this[i7(0x147)]=B,yield this['confirmationPrompt'](B,i);});}[a7Q(0x1a3)](i,p,B,H){return __awaiter(this,void 0x0,void 0x0,function*(){const i8=a7p;let j;if(p[i8(0xe7)]&&!_[i8(0x129)](p,'properties')){if(p[i8(0xe7)]['length']>0x1){const {choice:l}=yield inquirer[i8(0x188)]([{'type':i8(0x10a),'name':'choice','message':i8(0x19a)+(i[i[i8(0x189)]-0x1]||'')+'\x20type?','choices':p[i8(0xe7)][i8(0x176)](a=>a[i8(0x1ac)])}]);j=yield this[i8(0x16d)](i,p[i8(0xe7)][i8(0x1a9)](a=>a[i8(0x1ac)]===l),B,H);}else{const a=p[i8(0xe7)][0x0];_[i8(0xcb)](a,i8(0x1ac),p[i8(0x1ac)]),j=yield this[i8(0x16d)](i,a,B,H);}j={};}else j=yield this['getType'](i,p,B,H);return j;});}[a7Q(0x185)](i,p,B,H){var j;return __awaiter(this,void 0x0,void 0x0,function*(){const i9=a7p;if(H===![]){const {addEntry:D}=yield inquirer['prompt']([{'type':i9(0x155),'name':i9(0x1a2),'message':this[i9(0x1a7)](p,i9(0x15e),i===null||i===void 0x0?void 0x0:i[i9(0x1ac)]),'default':![]}]);if(!D)return B;}const l=Object['keys']((j=i===null||i===void 0x0?void 0x0:i['properties'])!==null&&j!==void 0x0?j:[]),a=i[i9(0xee)]||[];if(l[i9(0x189)]>0x0)for(const f of l){const L=p[i9(0x17c)](f);if(p['length']>0x0&&!_[i9(0x129)](B,p[i9(0xf7)]('.')))_['set'](B,p[i9(0xf7)]('.'),{});yield this[i9(0x1a3)](L,i['properties'][f],B,a[i9(0x17d)](f));}else yield this['getType'](p,Object[i9(0xca)](Object[i9(0xca)]({},i),{'type':i9(0x1a6)}),B,H);return B;});}[a7Q(0xe3)](i,p,B,H){return __awaiter(this,void 0x0,void 0x0,function*(){const ii=a7p;if(p&&B)return!![];const j=p?ii(0x15e):ii(0x12e),{addEntry:l}=yield inquirer[ii(0x188)]([{'type':'confirm','name':ii(0x1a2),'message':this['getPathString'](i,j,p?H:undefined),'default':![]}]);return l;});}[a7Q(0x16d)](i,p,B,H){return __awaiter(this,void 0x0,void 0x0,function*(){const ip=a7p;let j;const l=i[ip(0xf7)]('.');switch(p===null||p===void 0x0?void 0x0:p[ip(0x19d)]){case ip(0x125):{let a=!![];while(yield this[ip(0xe3)](i,a,H,p===null||p===void 0x0?void 0x0:p['description'])){const D=_[ip(0x161)](B,l);_[ip(0x193)](B,l),yield this[ip(0x16d)](i,p[ip(0x168)],B);const f=_[ip(0x161)](B,l);!_[ip(0x114)](D)?_['set'](B,l,[f]):(D[ip(0x13f)](f),_[ip(0xcb)](B,l,D)),a=![];}return j||[];}case ip(0x195):{return j=yield this[ip(0x185)](p,i,B,H),j;}case'rawObject':j=(0x0,utils_1['isValidJSON'])(yield this[ip(0x141)](i,p,H))||undefined;break;case'string':case ip(0xe2):case ip(0x130):default:j=yield this[ip(0x141)](i,p,H,B);break;}return!_[ip(0x183)](j)&&_[ip(0xcb)](B,l,j),j;});}['ask'](i,p,B,H){var j;return __awaiter(this,void 0x0,void 0x0,function*(){const iB=a7p,l=i[i[iB(0x189)]-0x1],{defaultValue:defaultValue=(j=p===null||p===void 0x0?void 0x0:p[iB(0xe4)])!==null&&j!==void 0x0?j:p===null||p===void 0x0?void 0x0:p['default'],choices:choices=p===null||p===void 0x0?void 0x0:p['enum'],pagination:a}=yield(0x0,api_helpers_1[iB(0x175)])(l,this[iB(0x16f)],this['tmpCmdPath'],H,this['pathVars'],i);let D=iB(0x110);if(!_[iB(0x183)](choices)&&choices[iB(0x189)]>0x0){if(a!==undefined&&a['nextPageCursor']!==undefined)D='pagination-prompt';else choices[iB(0x189)]>0x4&&typeof choices[0x0]==='string'?D='search-list':D=iB(0x10a);}else{if((p===null||p===void 0x0?void 0x0:p[iB(0x19d)])===iB(0xe2))D=iB(0x155);else{if((p===null||p===void 0x0?void 0x0:p[iB(0x19d)])===iB(0x130))D=iB(0x110);else(p===null||p===void 0x0?void 0x0:p[iB(0x19d)])===iB(0x1a6)&&(D=iB(0x152));}}let f=B!==![]?!_[iB(0xcf)](defaultValue)?defaultValue:JSON[iB(0x13e)](defaultValue):_[iB(0xe9)](defaultValue)?defaultValue:iB(0x18d);if(choices)f=f[iB(0x12d)]();_[iB(0x129)](this[iB(0x147)],i['join']('.'))&&(f=this['resultCache'][i[iB(0xf7)]('.')]);const L=choices&&B===![]?[iB(0x18d),...choices]:choices,E=(p===null||p===void 0x0?void 0x0:p[iB(0x19d)])===iB(0x130),C=Object[iB(0xca)]({'type':D,'name':'id','message':this[iB(0x1a1)](i,p),'choices':L,'default':f,'filter':this[iB(0x179)](D,B),'validate':this['validate'](p,B,E)},a),v=(yield inquirer['prompt']([C]))['id'];if(v===iB(0x18d)||v==='')return undefined;if(E)return parseInt(v,0xa);return v;});}['getQuestionString'](i,p){const iH=a7Q,B=(p===null||p===void 0x0?void 0x0:p['type'])!==iH(0xe2)?iH(0xd9):iH(0x123);return this[iH(0x1a7)](i,B,p===null||p===void 0x0?void 0x0:p['description']);}[a7Q(0x186)](){return __awaiter(this,void 0x0,void 0x0,function*(){const il=a7p,i=p=>__awaiter(this,void 0x0,void 0x0,function*(){const ij=a7p;var B;const H=yield this[ij(0x16f)][ij(0x10a)][ij(0xd6)]({'options':{'per_page':this[ij(0x182)],'cursor':p}}),j=H[ij(0x102)][ij(0xd6)][ij(0x176)](l=>l['id']);return{'elements':j,'nextCursor':(B=H[ij(0xeb)])===null||B===void 0x0?void 0x0:B[ij(0x10e)]};});return yield this['askForResourcePaginated'](il(0x15c),i);});}[a7Q(0x132)](i,p,B,H){return __awaiter(this,void 0x0,void 0x0,function*(){const ia=a7p,j=B||this['apiClient'][ia(0x10b)][ia(0x190)]();if(_['isUndefined'](j))throw new Error('Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.');const l=yield p(j);return yield this['askForResource'](i,l,(H?H+ia(0x121):'')+'project:\x20\x27'+j+'\x27');});}['askForProjectScopedResourcePaginated'](i,p,B,H){return __awaiter(this,void 0x0,void 0x0,function*(){const iD=a7p,j=B||this[iD(0x16f)][iD(0x10b)][iD(0x190)]();if(_[iD(0x183)](j))throw new Error(iD(0xff));const l=yield p(j);return yield this['askForResourcePaginated'](i,l,(H?H+iD(0x121):'')+iD(0xfe)+j+'\x27');});}[a7Q(0x139)](){return __awaiter(this,void 0x0,void 0x0,function*(){const iL=a7p,i=yield this['apiClient'][iL(0x10a)][iL(0x128)]({}),p=i[iL(0x102)]['domains']['map'](B=>B['name']);return this[iL(0x197)](iL(0x14a),p);});}[a7Q(0xed)](){return __awaiter(this,void 0x0,void 0x0,function*(){const iE=a7p,i=yield this[iE(0x16f)][iE(0x10a)][iE(0x11c)]({}),p=i[iE(0x102)][iE(0x159)][iE(0x176)](B=>B['id']);return this[iE(0x197)]('credentials',p);});}['setPathVars'](i){const iC=a7Q;this[iC(0x166)]=i;}}exports[a7Q(0x18e)]=InquirerHelper;
@@ -1 +1 @@
1
- 'use strict';function a8y(){const x=['1155128pSRSns','45GjCsrd','removeListener','getOwnPropertyDescriptor','status','__importDefault','Failure\x20during\x20login:\x20','browser-opened','8hcFKkR','success','Unexpected\x20response','baseUrl','done','78430AHJbVI','defineProperty','__setModuleDefault','login-success','__esModule','Failed\x20to\x20establish\x20connection\x20to\x20command\x20execution\x20proxy:\x20','1317uWLHxO','throw','initPackage','init-ack','prototype','replace','1007470SeLDxt','init','EventEmitter','type','stringify','get','113940spmIKS','__importStar','ws:','error','data','NorthflankApiBrowserLogin','message','create','Unable\x20to\x20open\x20browser:\x20','Unexpected\x20response,\x20api\x20token\x20missing','duplex','__awaiter','open','hasOwnProperty','parse','end','33offOsI','next','writable','SIGINT','208PIdVih','write','8617FHRCjp','unable\x20to\x20parse\x20message:\x20','/v1/cli-login','createWebSocketStream','emit','openBrowser','events','http:','finally','default','421178wtdHuL','toString','idle','https:','aborted','2082SuurJV','handleError','__createBinding'];a8y=function(){return x;};return a8y();}const a8H=a8f;(function(y,f){const l=a8f,a=y();while(!![]){try{const b=-parseInt(l(0x150))/0x1+parseInt(l(0x144))/0x2*(-parseInt(l(0x16b))/0x3)+-parseInt(l(0x160))/0x4*(parseInt(l(0x165))/0x5)+-parseInt(l(0x155))/0x6*(-parseInt(l(0x146))/0x7)+-parseInt(l(0x158))/0x8+parseInt(l(0x159))/0x9*(parseInt(l(0x12a))/0xa)+-parseInt(l(0x140))/0xb*(parseInt(l(0x130))/0xc);if(b===f)break;else a['push'](a['shift']());}catch(I){a['push'](a['shift']());}}}(a8y,0x3f6e2));var __createBinding=this&&this[a8H(0x157)]||(Object[a8H(0x137)]?function(y,f,a,b){const v=a8H;if(b===undefined)b=a;var I=Object[v(0x15b)](f,a);(!I||(v(0x12f)in I?!f[v(0x169)]:I[v(0x142)]||I['configurable']))&&(I={'enumerable':!![],'get':function(){return f[a];}}),Object['defineProperty'](y,b,I);}:function(y,f,a,b){if(b===undefined)b=a;y[b]=f[a];}),__setModuleDefault=this&&this[a8H(0x167)]||(Object['create']?function(y,f){const P=a8H;Object[P(0x166)](y,P(0x14f),{'enumerable':!![],'value':f});}:function(y,f){y['default']=f;}),__importStar=this&&this[a8H(0x131)]||function(y){const q=a8H;if(y&&y[q(0x169)])return y;var f={};if(y!=null){for(var a in y)if(a!=='default'&&Object[q(0x16f)][q(0x13d)]['call'](y,a))__createBinding(f,y,a);}return __setModuleDefault(f,y),f;},__awaiter=this&&this[a8H(0x13b)]||function(y,f,a,b){function I(G){return G instanceof a?G:new a(function(T){T(G);});}return new(a||(a=Promise))(function(G,T){const V=a8f;function u(F){const p=a8f;try{Z(b[p(0x141)](F));}catch(d){T(d);}}function t(F){const Y=a8f;try{Z(b[Y(0x16c)](F));}catch(d){T(d);}}function Z(F){const A=a8f;F[A(0x164)]?G(F['value']):I(F['value'])['then'](u,t);}Z((b=b['apply'](y,f||[]))[V(0x141)]());});},__importDefault=this&&this[a8H(0x15d)]||function(y){const B=a8H;return y&&y[B(0x169)]?y:{'default':y};};function a8f(y,f){const a=a8y();return a8f=function(b,I){b=b-0x129;let G=a[b];return G;},a8f(y,f);}Object[a8H(0x166)](exports,a8H(0x169),{'value':!![]}),exports[a8H(0x135)]=void 0x0;const ws_1=__importStar(require('ws')),open_1=__importDefault(require(a8H(0x13c))),events_1=require(a8H(0x14c));class NorthflankApiBrowserLogin extends events_1[a8H(0x12c)]{constructor(y,f=!![]){const S=a8H;super(),this[S(0x163)]=y,this[S(0x14b)]=f,this['status']=S(0x152),this[S(0x16d)]=()=>JSON[S(0x12e)]({'type':S(0x12b)});}['startLogin'](){const n=a8H;var y;const f=this[n(0x163)][n(0x129)](n(0x153),'wss:')[n(0x129)](n(0x14d),n(0x132)),a=f+n(0x148),b=new ws_1['default'](a),I=()=>__awaiter(this,void 0x0,void 0x0,function*(){yield new Promise(T=>{const e=a8f;var u;(u=this[e(0x13a)])===null||u===void 0x0?void 0x0:u[e(0x13f)](JSON['stringify']({'type':e(0x154)}),()=>T());}),process['exit']();}),G=new Promise((T,u)=>{const J=n;var t,Z,F;try{this[J(0x13a)]=(0x0,ws_1[J(0x149)])(b),process['on'](J(0x143),I);}catch(d){u(new Error(J(0x16a)+d[J(0x136)]));}(t=this[J(0x13a)])===null||t===void 0x0?void 0x0:t['on'](J(0x134),R=>{const X=J;var s;const j=JSON[X(0x13e)](R[X(0x151)]());switch(j===null||j===void 0x0?void 0x0:j[X(0x12d)]){case X(0x16e):{const {loginPage:U}=j;if(U===undefined){this[X(0x156)](X(0x162),u);return;}this['openBrowser']&&(0x0,open_1[X(0x14f)])(U)['catch'](g=>{const M=X,o=M(0x138)+g[M(0x136)];this[M(0x156)](o,u);});this[X(0x14a)](X(0x15f),{'url':U});break;}case X(0x168):{const {apiToken:g,contextName:o}=j;if(g===undefined){this[X(0x156)](X(0x139),u);return;}(s=this[X(0x13a)])===null||s===void 0x0?void 0x0:s[X(0x13f)](),T({'token':g,'contextName':o}),this[X(0x15c)]=X(0x161);break;}case'login-failure':{const r=X(0x15e)+(j===null||j===void 0x0?void 0x0:j['message']);this[X(0x156)](r,u);break;}default:{const i=X(0x147)+JSON['stringify'](j);this[X(0x156)](i,u);}}}),(Z=this[J(0x13a)])===null||Z===void 0x0?void 0x0:Z['on'](J(0x133),R=>{const c=J;this[c(0x156)]('error\x20happened\x20during\x20browser\x20login:\x20'+R[c(0x136)],u);}),(F=this['duplex'])===null||F===void 0x0?void 0x0:F['on'](J(0x13f),()=>{const C=J;if(this[C(0x15c)]===C(0x161)){}else this['handleError']('Login\x20process\x20stopped\x20before\x20completed',u);});});return(y=this[n(0x13a)])===null||y===void 0x0?void 0x0:y[n(0x145)](this[n(0x16d)]()),this[n(0x15c)]='init',G[n(0x14e)](()=>{const N=n;process[N(0x15a)]('SIGINT',I);});}[a8H(0x156)](y,f){const K=a8H;var a,b;f?(a=this[K(0x13a)])===null||a===void 0x0?void 0x0:a[K(0x13f)](()=>f(new Error(y))):(b=this[K(0x13a)])===null||b===void 0x0?void 0x0:b['end'](),this[K(0x15c)]=K(0x133);}}exports[a8H(0x135)]=NorthflankApiBrowserLogin;
1
+ 'use strict';const a8K=a8p;(function(i,p){const X=a8p,B=i();while(!![]){try{const H=parseInt(X(0x1b5))/0x1*(-parseInt(X(0x195))/0x2)+-parseInt(X(0x1be))/0x3*(-parseInt(X(0x1cb))/0x4)+-parseInt(X(0x192))/0x5*(-parseInt(X(0x18f))/0x6)+parseInt(X(0x1c7))/0x7+parseInt(X(0x1ca))/0x8+-parseInt(X(0x18c))/0x9*(parseInt(X(0x1b4))/0xa)+-parseInt(X(0x197))/0xb*(parseInt(X(0x199))/0xc);if(H===p)break;else B['push'](B['shift']());}catch(j){B['push'](B['shift']());}}}(a8i,0x68b7b));var __createBinding=this&&this[a8K(0x191)]||(Object['create']?function(i,p,B,H){const N=a8K;if(H===undefined)H=B;var j=Object[N(0x1b1)](p,B);(!j||('get'in j?!p[N(0x1b6)]:j[N(0x19a)]||j[N(0x18d)]))&&(j={'enumerable':!![],'get':function(){return p[B];}}),Object[N(0x1bf)](i,H,j);}:function(i,p,B,H){if(H===undefined)H=B;i[H]=p[B];}),__setModuleDefault=this&&this[a8K(0x1bd)]||(Object['create']?function(i,p){const m=a8K;Object[m(0x1bf)](i,m(0x1cd),{'enumerable':!![],'value':p});}:function(i,p){const J=a8K;i[J(0x1cd)]=p;}),__importStar=this&&this['__importStar']||function(i){const Y=a8K;if(i&&i[Y(0x1b6)])return i;var p={};if(i!=null){for(var B in i)if(B!==Y(0x1cd)&&Object[Y(0x19f)][Y(0x1a7)]['call'](i,B))__createBinding(p,i,B);}return __setModuleDefault(p,i),p;},__awaiter=this&&this[a8K(0x19b)]||function(i,p,B,H){function j(l){return l instanceof B?l:new B(function(a){a(l);});}return new(B||(B=Promise))(function(l,a){const F=a8p;function D(E){try{L(H['next'](E));}catch(C){a(C);}}function f(E){const k=a8p;try{L(H[k(0x198)](E));}catch(C){a(C);}}function L(E){const M=a8p;E[M(0x1a8)]?l(E[M(0x1c4)]):j(E['value'])['then'](D,f);}L((H=H[F(0x1a3)](i,p||[]))[F(0x1cc)]());});},__importDefault=this&&this[a8K(0x1c2)]||function(i){const q=a8K;return i&&i[q(0x1b6)]?i:{'default':i};};Object[a8K(0x1bf)](exports,'__esModule',{'value':!![]}),exports['NorthflankApiBrowserLogin']=void 0x0;function a8p(i,p){const B=a8i();return a8p=function(H,j){H=H-0x18c;let l=B[H];return l;},a8p(i,p);}const ws_1=__importStar(require('ws')),open_1=__importDefault(require(a8K(0x1ac))),events_1=require(a8K(0x1ae));class NorthflankApiBrowserLogin extends events_1['EventEmitter']{constructor(i,p=!![]){const g=a8K;super(),this[g(0x1b0)]=i,this[g(0x1a2)]=p,this[g(0x1a4)]='idle',this[g(0x1b3)]=()=>JSON[g(0x19c)]({'type':'init'});}[a8K(0x1b2)](){const r=a8K;var i;const p=this['baseUrl'][r(0x18e)](r(0x1c1),r(0x19e))['replace'](r(0x190),'ws:'),B=p+r(0x1ba),H=new ws_1[(r(0x1cd))](B),j=()=>__awaiter(this,void 0x0,void 0x0,function*(){const R=r;yield new Promise(a=>{const W=a8p;var D;(D=this[W(0x1a6)])===null||D===void 0x0?void 0x0:D[W(0x1b9)](JSON[W(0x19c)]({'type':W(0x1c8)}),()=>a());}),process[R(0x1c3)]();}),l=new Promise((a,D)=>{const n=r;var f,L,E;try{this[n(0x1a6)]=(0x0,ws_1['createWebSocketStream'])(H),process['on']('SIGINT',j);}catch(C){D(new Error('Failed\x20to\x20establish\x20connection\x20to\x20command\x20execution\x20proxy:\x20'+C[n(0x19d)]));}(f=this[n(0x1a6)])===null||f===void 0x0?void 0x0:f['on'](n(0x1a9),v=>{const s=n;var O;const Q=JSON['parse'](v[s(0x1c9)]());switch(Q===null||Q===void 0x0?void 0x0:Q['type']){case s(0x1b7):{const {loginPage:U}=Q;if(U===undefined){this[s(0x1aa)]('Unexpected\x20response',D);return;}this[s(0x1a2)]&&(0x0,open_1[s(0x1cd)])(U)[s(0x1c0)](G=>{const S=s,x=S(0x1c5)+G[S(0x19d)];this[S(0x1aa)](x,D);});this[s(0x1ab)](s(0x1af),{'url':U});break;}case'login-success':{const {apiToken:G,contextName:x}=Q;if(G===undefined){this[s(0x1aa)](s(0x1bb),D);return;}(O=this['duplex'])===null||O===void 0x0?void 0x0:O[s(0x1b9)](),a({'token':G,'contextName':x}),this[s(0x1a4)]=s(0x1ad);break;}case s(0x1c6):{const b='Failure\x20during\x20login:\x20'+(Q===null||Q===void 0x0?void 0x0:Q['message']);this[s(0x1aa)](b,D);break;}default:{const w=s(0x1a5)+JSON[s(0x19c)](Q);this[s(0x1aa)](w,D);}}}),(L=this[n(0x1a6)])===null||L===void 0x0?void 0x0:L['on'](n(0x1a1),v=>{const T=n;this['handleError'](T(0x1bc)+v[T(0x19d)],D);}),(E=this[n(0x1a6)])===null||E===void 0x0?void 0x0:E['on']('end',()=>{const V=n;if(this[V(0x1a4)]===V(0x1ad)){}else this[V(0x1aa)](V(0x1a0),D);});});return(i=this[r(0x1a6)])===null||i===void 0x0?void 0x0:i[r(0x196)](this[r(0x1b3)]()),this['status']=r(0x194),l['finally'](()=>{const I=r;process[I(0x193)](I(0x1b8),j);});}[a8K(0x1aa)](i,p){const o=a8K;var B,H;p?(B=this[o(0x1a6)])===null||B===void 0x0?void 0x0:B[o(0x1b9)](()=>p(new Error(i))):(H=this['duplex'])===null||H===void 0x0?void 0x0:H[o(0x1b9)](),this['status']=o(0x1a1);}}function a8i(){const y=['http:','__createBinding','1349605vNhiMS','removeListener','init','36796FypKUn','write','9333577TnELOb','throw','12LYiFqE','writable','__awaiter','stringify','message','wss:','prototype','Login\x20process\x20stopped\x20before\x20completed','error','openBrowser','apply','status','unable\x20to\x20parse\x20message:\x20','duplex','hasOwnProperty','done','data','handleError','emit','open','success','events','browser-opened','baseUrl','getOwnPropertyDescriptor','startLogin','initPackage','220HusamR','44CtKzsZ','__esModule','init-ack','SIGINT','end','/v1/cli-login','Unexpected\x20response,\x20api\x20token\x20missing','error\x20happened\x20during\x20browser\x20login:\x20','__setModuleDefault','6aJnock','defineProperty','catch','https:','__importDefault','exit','value','Unable\x20to\x20open\x20browser:\x20','login-failure','3476179vBuycx','aborted','toString','5806176SXLqSM','1330136tWDMFZ','next','default','249651oMuhVy','configurable','replace','18kSVjFD'];a8i=function(){return y;};return a8i();}exports['NorthflankApiBrowserLogin']=NorthflankApiBrowserLogin;
@@ -1 +1 @@
1
- 'use strict';const a9g=a9f;function a9y(){const P=['opt','loop','down','choices','name','8wCVpbW','onDownKey','push','4RAWgrT','chalk','6486WADqWN','57515821tceVVS','3545301ZYeKDq','default','9VobqzF','realLength','reloadText','nextPageCursor','length','__importDefault','..\x20Load\x20more\x20options\x20..','6923orCFLE','next','dir\x20must\x20be\x20up\x20or\x20down','defineProperty','loading','1467210aUsYBN','loadMore','__esModule','111702ioHknw','render','DynamicReloadPaginationPrompt','pagOpt','5823730EQuyIs','selected','handleDynamicPageLoad','value','\x20Loading\x20more\x20options','8009376cZUBdS'];a9y=function(){return P;};return a9y();}(function(y,f){const R=a9f,a=y();while(!![]){try{const b=-parseInt(R(0x1d6))/0x1*(parseInt(R(0x1e5))/0x2)+-parseInt(R(0x1c5))/0x3*(parseInt(R(0x1c1))/0x4)+-parseInt(R(0x1d3))/0x5+-parseInt(R(0x1c3))/0x6*(parseInt(R(0x1ce))/0x7)+-parseInt(R(0x1df))/0x8+-parseInt(R(0x1c7))/0x9*(parseInt(R(0x1da))/0xa)+parseInt(R(0x1c4))/0xb;if(b===f)break;else a['push'](a['shift']());}catch(I){a['push'](a['shift']());}}}(a9y,0x9fad8));var __awaiter=this&&this['__awaiter']||function(y,f,a,b){function I(G){return G instanceof a?G:new a(function(T){T(G);});}return new(a||(a=Promise))(function(G,T){const U=a9f;function u(F){const s=a9f;try{Z(b[s(0x1cf)](F));}catch(d){T(d);}}function t(F){try{Z(b['throw'](F));}catch(d){T(d);}}function Z(F){const j=a9f;F['done']?G(F[j(0x1dd)]):I(F[j(0x1dd)])['then'](u,t);}Z((b=b['apply'](y,f||[]))[U(0x1cf)]());});},__importDefault=this&&this[a9g(0x1cc)]||function(y){return y&&y['__esModule']?y:{'default':y};};Object[a9g(0x1d1)](exports,a9g(0x1d5),{'value':!![]}),exports[a9g(0x1d8)]=void 0x0;const list_1=__importDefault(require('inquirer/lib/prompts/list')),choice_1=__importDefault(require('inquirer/lib/objects/choice')),chalk_1=__importDefault(require(a9g(0x1c2)));function incrementListIndex(y,f,a){const o=a9g,b=a[o(0x1e3)][o(0x1c8)],I=o(0x1e1)in a?Boolean(a[o(0x1e1)]):!![];if(f==='up'){if(y>0x0)return y-0x1;return I?b-0x1:y;}if(f===o(0x1e2)){if(y<b-0x1)return y+0x1;return I?0x0:y;}throw new Error(o(0x1d0));}class DynamicReloadPaginationPrompt extends list_1['default']{constructor(y,f,b){const r=a9g;super(y,f,b),this[r(0x1c9)]=chalk_1[r(0x1c6)]['italic'](r(0x1cd)),this[r(0x1d2)]=![],this[r(0x1d9)]=this[r(0x1e0)],this[r(0x1ca)]=this[r(0x1d9)][r(0x1ca)],this[r(0x1ca)]!==undefined&&this['opt'][r(0x1e3)][r(0x1c0)](new choice_1['default'](this[r(0x1c9)],this[r(0x1c9)]));}['onUpKey'](){const i=a9g;if(this['loading'])return;this[i(0x1db)]=incrementListIndex(this[i(0x1db)],'up',this[i(0x1e0)]),this['render']();}[a9g(0x1bf)](){return __awaiter(this,void 0x0,void 0x0,function*(){const l=a9f;if(this[l(0x1d2)])return;this[l(0x1db)]=incrementListIndex(this[l(0x1db)],l(0x1e2),this[l(0x1e0)]),yield this[l(0x1dc)](),this[l(0x1d7)]();});}[a9g(0x1dc)](){return __awaiter(this,void 0x0,void 0x0,function*(){const H=a9f;if(this[H(0x1db)]>=this['opt'][H(0x1e3)][H(0x1cb)]-0x1){if(this['nextPageCursor']===undefined)return;this[H(0x1d2)]=!![];let y=0x0;const f=setInterval(()=>{const v=H,G=['⠋','⠙','⠹','⠸','⠼','⠴','⠦','⠧','⠇','⠏'],T=chalk_1[v(0x1c6)]['italic'](G[y%G[v(0x1cb)]]+v(0x1de));this[v(0x1e0)][v(0x1e3)]['choices'][this['selected']][v(0x1e4)]=''+T,y+=0x1,this[v(0x1d7)]();},0x50),{elements:a,nextPageCursor:b}=yield this[H(0x1d9)][H(0x1d4)]({'nextPageCursor':this[H(0x1ca)]})['catch'](()=>({'elements':[],'nextPageCursor':undefined}));this[H(0x1ca)]=b;const I=a['map'](G=>new choice_1['default'](G,G));this[H(0x1e0)][H(0x1e3)]['choices']['splice'](this[H(0x1db)],0x1),this['opt']['choices']['push'](...I),b!==undefined&&this[H(0x1e0)][H(0x1e3)][H(0x1c0)](new choice_1[(H(0x1c6))](this['reloadText'],this['reloadText'])),clearInterval(f),this[H(0x1d2)]=![];}});}}function a9f(y,f){const a=a9y();return a9f=function(b,I){b=b-0x1bf;let G=a[b];return G;},a9f(y,f);}exports[a9g(0x1d8)]=DynamicReloadPaginationPrompt;
1
+ 'use strict';const a9x=a9p;(function(i,p){const v=a9p,B=i();while(!![]){try{const H=-parseInt(v(0x9f))/0x1+parseInt(v(0x7f))/0x2*(parseInt(v(0x9b))/0x3)+parseInt(v(0x79))/0x4+parseInt(v(0x84))/0x5+parseInt(v(0x7a))/0x6*(-parseInt(v(0x99))/0x7)+parseInt(v(0xa0))/0x8+parseInt(v(0x87))/0x9*(-parseInt(v(0x88))/0xa);if(H===p)break;else B['push'](B['shift']());}catch(j){B['push'](B['shift']());}}}(a9i,0x22cdb));function a9p(i,p){const B=a9i();return a9p=function(H,j){H=H-0x78;let l=B[H];return l;},a9p(i,p);}var __awaiter=this&&this['__awaiter']||function(i,p,B,H){function j(l){return l instanceof B?l:new B(function(a){a(l);});}return new(B||(B=Promise))(function(l,a){const e=a9p;function D(E){const O=a9p;try{L(H[O(0x86)](E));}catch(C){a(C);}}function f(E){const Q=a9p;try{L(H[Q(0x8c)](E));}catch(C){a(C);}}function L(E){const U=a9p;E[U(0x96)]?l(E['value']):j(E[U(0x82)])['then'](D,f);}L((H=H[e(0x91)](i,p||[]))['next']());});},__importDefault=this&&this['__importDefault']||function(i){const G=a9p;return i&&i[G(0x7b)]?i:{'default':i};};Object['defineProperty'](exports,a9x(0x7b),{'value':!![]}),exports[a9x(0x7d)]=void 0x0;function a9i(){const J=['length','dir\x20must\x20be\x20up\x20or\x20down','2121pbuuJY','selected','422535jYnSBI','catch','italic','down','214573rsslgb','644056PYCokl','pagOpt','1015388ieaMJC','708xsoLsw','__esModule','nextPageCursor','DynamicReloadPaginationPrompt','name','2EFEufZ','reloadText','loading','value','\x20Loading\x20more\x20options','625370vocotf','push','next','9iSESVU','2073910jldIYp','opt','loop','inquirer/lib/objects/choice','throw','choices','default','splice','loadMore','apply','render','onUpKey','inquirer/lib/prompts/list','handleDynamicPageLoad','done'];a9i=function(){return J;};return a9i();}const list_1=__importDefault(require(a9x(0x94))),choice_1=__importDefault(require(a9x(0x8b))),chalk_1=__importDefault(require('chalk'));function incrementListIndex(i,p,B){const b=a9x,H=B[b(0x8d)]['realLength'],j=b(0x8a)in B?Boolean(B[b(0x8a)]):!![];if(p==='up'){if(i>0x0)return i-0x1;return j?H-0x1:i;}if(p===b(0x9e)){if(i<H-0x1)return i+0x1;return j?0x0:i;}throw new Error(b(0x98));}class DynamicReloadPaginationPrompt extends list_1[a9x(0x8e)]{constructor(i,p,B){const w=a9x;super(i,p,B),this[w(0x80)]=chalk_1[w(0x8e)][w(0x9d)]('..\x20Load\x20more\x20options\x20..'),this[w(0x81)]=![],this[w(0x78)]=this['opt'],this['nextPageCursor']=this[w(0x78)][w(0x7c)],this[w(0x7c)]!==undefined&&this['opt']['choices']['push'](new choice_1['default'](this['reloadText'],this[w(0x80)]));}[a9x(0x93)](){const X=a9x;if(this[X(0x81)])return;this[X(0x9a)]=incrementListIndex(this[X(0x9a)],'up',this[X(0x89)]),this[X(0x92)]();}['onDownKey'](){return __awaiter(this,void 0x0,void 0x0,function*(){const K=a9p;if(this[K(0x81)])return;this[K(0x9a)]=incrementListIndex(this[K(0x9a)],K(0x9e),this[K(0x89)]),yield this[K(0x95)](),this[K(0x92)]();});}['handleDynamicPageLoad'](){return __awaiter(this,void 0x0,void 0x0,function*(){const N=a9p;if(this[N(0x9a)]>=this[N(0x89)][N(0x8d)][N(0x97)]-0x1){if(this[N(0x7c)]===undefined)return;this[N(0x81)]=!![];let p=0x0;const B=setInterval(()=>{const m=N,a=['⠋','⠙','⠹','⠸','⠼','⠴','⠦','⠧','⠇','⠏'],D=chalk_1['default'][m(0x9d)](a[p%a[m(0x97)]]+m(0x83));this['opt'][m(0x8d)]['choices'][this[m(0x9a)]][m(0x7e)]=''+D,p+=0x1,this[m(0x92)]();},0x50),{elements:H,nextPageCursor:j}=yield this[N(0x78)][N(0x90)]({'nextPageCursor':this[N(0x7c)]})[N(0x9c)](()=>({'elements':[],'nextPageCursor':undefined}));this[N(0x7c)]=j;const l=H['map'](a=>new choice_1[(N(0x8e))](a,a));this['opt'][N(0x8d)][N(0x8d)][N(0x8f)](this[N(0x9a)],0x1),this[N(0x89)]['choices'][N(0x85)](...l),j!==undefined&&this[N(0x89)]['choices'][N(0x85)](new choice_1[(N(0x8e))](this[N(0x80)],this['reloadText'])),clearInterval(B),this['loading']=![];}});}}exports[a9x(0x7d)]=DynamicReloadPaginationPrompt;
@@ -1 +1 @@
1
- 'use strict';const a10U=a10f;(function(y,f){const j=a10f,a=y();while(!![]){try{const b=-parseInt(j(0x116))/0x1*(parseInt(j(0x149))/0x2)+parseInt(j(0x13c))/0x3+parseInt(j(0x156))/0x4+parseInt(j(0x161))/0x5*(-parseInt(j(0x139))/0x6)+parseInt(j(0x159))/0x7*(-parseInt(j(0x146))/0x8)+-parseInt(j(0x14b))/0x9+-parseInt(j(0x140))/0xa*(-parseInt(j(0x16b))/0xb);if(b===f)break;else a['push'](a['shift']());}catch(I){a['push'](a['shift']());}}}(a10y,0x33f75));var __awaiter=this&&this[a10U(0x13a)]||function(y,f,a,b){function I(G){return G instanceof a?G:new a(function(T){T(G);});}return new(a||(a=Promise))(function(G,T){const i=a10f;function u(F){const g=a10f;try{Z(b[g(0x138)](F));}catch(d){T(d);}}function t(F){const o=a10f;try{Z(b[o(0x135)](F));}catch(d){T(d);}}function Z(F){const r=a10f;F['done']?G(F[r(0x119)]):I(F[r(0x119)])[r(0x150)](u,t);}Z((b=b[i(0x12b)](y,f||[]))[i(0x138)]());});},__importDefault=this&&this[a10U(0x166)]||function(y){const l=a10U;return y&&y[l(0x113)]?y:{'default':y};};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a10U(0x12c)]=void 0x0;const js_client_1=require(a10U(0x164)),chalk_1=__importDefault(require(a10U(0x167))),utils_1=require(a10U(0x12a)),inquirer_helper_1=require(a10U(0x14d));class CliPortForward{constructor(y){const H=a10U;this[H(0x16e)]=H(0x148),this[H(0x13b)]=new js_client_1['ApiClient'](y,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[H(0x128)]});const f=new inquirer_helper_1[(H(0x162))](this['apiClient']);this['portFwdCmd']=(0x0,utils_1['getCommand'])()[H(0x168)]('forward')[H(0x15a)]('fwd')[H(0x14e)](H(0x127));const a=(0x0,utils_1['getCommand'])(!![])['name']('all')[H(0x14e)](H(0x11c))['option'](H(0x16a),'project\x20for\x20forwarding')[H(0x121)](H(0x154),this[H(0x16e)],![])[H(0x11a)](({noDefaults:G,projectId:T})=>__awaiter(this,void 0x0,void 0x0,function*(){const v=H;(0x0,utils_1['assertContextExisting'])(this[v(0x13b)]);const u=this['getProxyForwarder'](),t=G?undefined:y[v(0x158)](),Z=T||t||(yield f[v(0x136)]());try{const {services:F,addons:d}=yield u[v(0x15c)]({'projectId':Z},![]);F['length']+d[v(0x152)]<=0x0?(0x0,utils_1[v(0x142)])(v(0x11e)+chalk_1[v(0x11b)][v(0x15d)](Z)):(console['log'](v(0x153)+chalk_1[v(0x11b)][v(0x12f)]['bold'](F[v(0x152)]+v(0x11f))+v(0x123)+chalk_1['default'][v(0x12f)][v(0x15d)](d[v(0x152)]+v(0x14c))+v(0x15e)+chalk_1[v(0x11b)]['bold'](Z)),yield Promise['all']([...F,...d]));}catch(R){(0x0,utils_1[v(0x13d)])(v(0x143)+R[v(0x130)]);}})),b=(0x0,utils_1[H(0x163)])(!![])[H(0x168)](H(0x12d))['description']('Port-forwarding\x20for\x20the\x20specified\x20service')[H(0x121)]('--project\x20--projectId\x20[NAME]','Project\x20for\x20forwarding')[H(0x121)](H(0x120),H(0x134))['option'](H(0x154),this[H(0x16e)],![])[H(0x11a)](({noDefaults:G,projectId:T,serviceId:u})=>__awaiter(this,void 0x0,void 0x0,function*(){const P=H;(0x0,utils_1[P(0x160)])(this[P(0x13b)]);const t=this['getProxyForwarder'](),Z=G?undefined:y[P(0x158)](),F=T||Z||(yield f[P(0x136)]()),d=G?undefined:y['getCurrentServiceName'](),R=u||d||(yield f[P(0x133)](F)());console[P(0x169)]('Forwarding\x20service\x20'+chalk_1[P(0x11b)][P(0x15d)](R)+P(0x15e)+chalk_1[P(0x11b)]['bold'](F));try{yield t['forwardService']({'projectId':F,'serviceId':R},![]);}catch(s){(0x0,utils_1[P(0x13d)])(P(0x143)+s[P(0x130)]);}})),I=(0x0,utils_1['getCommand'])(!![])[H(0x168)](H(0x144))[H(0x14e)](H(0x137))[H(0x121)]('--project\x20--projectId\x20[NAME]','Project\x20for\x20forwarding')[H(0x121)](H(0x129),'Addon\x20to\x20forward')[H(0x121)](H(0x154),this['noDefaultsText'],![])[H(0x11a)](({projectId:G,addonId:T,noDefaults:u})=>__awaiter(this,void 0x0,void 0x0,function*(){const q=H;(0x0,utils_1[q(0x160)])(this['apiClient']);const t=u?undefined:y[q(0x158)](),Z=G||t||(yield f[q(0x136)]()),F=T||(yield f['askForAddon'](Z)());console[q(0x169)](q(0x117)+chalk_1[q(0x11b)]['bold'](F)+q(0x15e)+chalk_1[q(0x11b)][q(0x15d)](Z));const d=this[q(0x13e)]();try{yield d[q(0x118)]({'projectId':Z,'addonId':F},![]);}catch(R){(0x0,utils_1[q(0x13d)])(q(0x143)+R[q(0x130)]);}}));this[H(0x12e)][H(0x11d)](a),this[H(0x12e)][H(0x11d)](b),this[H(0x12e)]['addCommand'](I);}[a10U(0x13e)](){const p=a10U,y=this[p(0x13b)]['forwarding'],f=y[p(0x125)]();if(f[p(0x13d)])throw new Error(f[p(0x130)]);return y['on'](p(0x115),(a,b)=>{const Y=p,I=chalk_1[Y(0x11b)][Y(0x15b)][Y(0x15d)](b[Y(0x16c)]+'\x20\x27'+b['id']+'\x27'),G=b[Y(0x165)]===Y(0x131)?Y(0x14f):'';(0x0,utils_1[Y(0x155)])(Y(0x157)+I+Y(0x124)+b[Y(0x147)]+':'+b['port']+'\x20('+b['protocol']+Y(0x14a)),b['hostnames'][Y(0x126)](T=>{const A=Y;(0x0,utils_1['success'])('\x20\x20'+G+T+':'+b[A(0x151)]);}),(0x0,utils_1[Y(0x155)])('');}),y['on'](p(0x16d),(a,b)=>{const V=p,I=chalk_1['default'][V(0x15b)][V(0x15d)](b['type']+'\x20\x27'+b['id']+'\x27');(0x0,utils_1['warning'])(V(0x114)+b['address']+':'+b[V(0x151)]+'\x20to\x20'+I+V(0x145)),b['hostnames'][V(0x126)](G=>{const B=V;(0x0,utils_1[B(0x142)])('\x20\x20'+G+':'+b['port']);}),(0x0,utils_1[V(0x142)])('');}),y['on'](p(0x122),(a,b,I)=>{const S=p;(0x0,utils_1[S(0x142)])(S(0x132)+b[S(0x147)]+':'+b[S(0x151)]+'\x27:\x20\x22'+(I===null||I===void 0x0?void 0x0:I[S(0x130)])+'\x22');}),process['on'](p(0x141),()=>__awaiter(this,void 0x0,void 0x0,function*(){const n=p;try{yield y['stop']();}catch(a){(0x0,utils_1['error'])(n(0x13f)+a[n(0x130)]);}finally{process[n(0x15f)]();}})),y;}}exports[a10U(0x12c)]=CliPortForward;function a10f(y,f){const a=a10y();return a10f=function(b,I){b=b-0x113;let G=a[b];return G;},a10f(y,f);}function a10y(){const e=['Failed:\x20','addon','\x20for\x20these\x20hostnames:','8VWMNPc','address','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','84746HkqJHk',')\x20with\x20these\x20hostnames:','3105324Blorog','\x20addon\x20ports','../inquirer-helper','description','http://','then','port','length','Forwarding\x20','--noDefaults','success','1413008vEuyMq','Exposing\x20','getCurrentProjectName','2096423yLyUFv','alias','greenBright','forwardProject','bold','\x20in\x20project\x20','exit','assertContextExisting','28315DimhMp','InquirerHelper','getCommand','@northflank/js-client','protocol','__importDefault','chalk','name','log','--project\x20--projectId\x20[NAME]','506ZzlxUh','type','tunnel-close','noDefaultsText','__esModule','Stop\x20forwarding\x20traffic\x20from\x20','tunnel-open','7RbhIDH','Forwarding\x20addon\x20','forwardAddon','value','action','default','Port-forwarding\x20for\x20all\x20services\x20and\x20addons\x20in\x20the\x20given\x20project','addCommand','No\x20services\x20and\x20addons\x20to\x20forward\x20found\x20in\x20project\x20','\x20service\x20ports','--service\x20--serviceId\x20[NAME]','option','connection-error','\x20and\x20','\x20on\x20','canExecuteWithHostnames','forEach','Port-forwarding\x20for\x20Northflank\x20services\x20and\x20addons.','customUserAgent','--addon\x20--addonId\x20[NAME]','../utils','apply','CliPortForward','service','portFwdCmd','green','message','HTTP','Connection\x20error\x20occurred\x20when\x20forwarding\x20\x27','askForService','Service\x20to\x20forward','throw','askForProject','Port-forwarding\x20for\x20the\x20specified\x20addon','next','186zFxIee','__awaiter','apiClient','643866ogzWSa','error','getProxyForwarder','Cleaning\x20up\x20open\x20connections\x20failed:\x20','165580zKtxgl','SIGINT','warning'];a10y=function(){return e;};return a10y();}
1
+ 'use strict';function a10p(i,p){const B=a10i();return a10p=function(H,j){H=H-0x6d;let l=B[H];return l;},a10p(i,p);}const a10U=a10p;function a10i(){const g=['../utils','\x27:\x20\x22','next','green','option','address','greenBright','value','getCurrentServiceName','askForAddon','bold','20562xdvKXl','getCommand','forwardAddon','project\x20for\x20forwarding','SIGINT','forwarding','@northflank/js-client','InquirerHelper','protocol','ApiClient','then',')\x20with\x20these\x20hostnames:','askForProject','exit','forwardProject','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','port','870cNdQvh','\x20on\x20','service','Service\x20to\x20forward','\x20and\x20','throw','warning','customUserAgent','Connection\x20error\x20occurred\x20when\x20forwarding\x20\x27','Port-forwarding\x20for\x20the\x20specified\x20addon','--noDefaults','description','\x20in\x20project\x20','assertContextExisting','313014BXNNpT','forEach','action','http://','20850880yCyxqW','alias','881163yLHjaQ','56sHzmEL','../inquirer-helper','noDefaultsText','apiClient','1393mbaUND','done','Failed:\x20','__awaiter','type','portFwdCmd','defineProperty','Forwarding\x20','__esModule','addon','success','getProxyForwarder','message','1276eANraw','name','Stop\x20forwarding\x20traffic\x20from\x20','default','637388FObuiA','\x20for\x20these\x20hostnames:','stop','2167380fscOzv','--project\x20--projectId\x20[NAME]','error','apply','getCurrentProjectName','HTTP','Forwarding\x20addon\x20','\x20to\x20','log','askForService','Project\x20for\x20forwarding','length','chalk','addCommand','No\x20services\x20and\x20addons\x20to\x20forward\x20found\x20in\x20project\x20','fwd','\x20service\x20ports','tunnel-open','\x20addon\x20ports','Addon\x20to\x20forward','Port-forwarding\x20for\x20all\x20services\x20and\x20addons\x20in\x20the\x20given\x20project'];a10i=function(){return g;};return a10i();}(function(i,p){const Q=a10p,B=i();while(!![]){try{const H=parseInt(Q(0x8b))/0x1+parseInt(Q(0x6f))/0x2+parseInt(Q(0xbf))/0x3*(-parseInt(Q(0x87))/0x4)+parseInt(Q(0x8e))/0x5+-parseInt(Q(0xae))/0x6*(-parseInt(Q(0x7a))/0x7)+-parseInt(Q(0x76))/0x8*(-parseInt(Q(0x75))/0x9)+-parseInt(Q(0x73))/0xa;if(H===p)break;else B['push'](B['shift']());}catch(j){B['push'](B['shift']());}}}(a10i,0x65d47));var __awaiter=this&&this[a10U(0x7d)]||function(i,p,B,H){function j(l){return l instanceof B?l:new B(function(a){a(l);});}return new(B||(B=Promise))(function(l,a){const b=a10p;function D(E){const e=a10p;try{L(H[e(0xa5)](E));}catch(C){a(C);}}function f(E){const G=a10p;try{L(H[G(0xc4)](E));}catch(C){a(C);}}function L(E){const x=a10p;E[x(0x7b)]?l(E[x(0xaa)]):j(E['value'])[x(0xb8)](D,f);}L((H=H[b(0x91)](i,p||[]))[b(0xa5)]());});},__importDefault=this&&this['__importDefault']||function(i){const w=a10U;return i&&i[w(0x82)]?i:{'default':i};};Object[a10U(0x80)](exports,a10U(0x82),{'value':!![]}),exports['CliPortForward']=void 0x0;const js_client_1=require(a10U(0xb4)),chalk_1=__importDefault(require(a10U(0x9a))),utils_1=require(a10U(0xa3)),inquirer_helper_1=require(a10U(0x77));class CliPortForward{constructor(i){const X=a10U;this[X(0x78)]=X(0xbd),this[X(0x79)]=new js_client_1[(X(0xb7))](i,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[X(0xc6)]});const p=new inquirer_helper_1[(X(0xb5))](this[X(0x79)]);this[X(0x7f)]=(0x0,utils_1[X(0xaf)])()[X(0x88)]('forward')[X(0x74)](X(0x9d))[X(0xca)]('Port-forwarding\x20for\x20Northflank\x20services\x20and\x20addons.');const B=(0x0,utils_1[X(0xaf)])(!![])[X(0x88)]('all')[X(0xca)](X(0xa2))[X(0xa7)](X(0x8f),X(0xb1))['option'](X(0xc9),this['noDefaultsText'],![])['action'](({noDefaults:l,projectId:a})=>__awaiter(this,void 0x0,void 0x0,function*(){const K=X;(0x0,utils_1[K(0x6e)])(this[K(0x79)]);const D=this[K(0x85)](),f=l?undefined:i[K(0x92)](),L=a||f||(yield p[K(0xba)]());try{const {services:E,addons:C}=yield D[K(0xbc)]({'projectId':L},![]);E[K(0x99)]+C[K(0x99)]<=0x0?(0x0,utils_1[K(0xc5)])(K(0x9c)+chalk_1[K(0x8a)]['bold'](L)):(console['log'](K(0x81)+chalk_1[K(0x8a)][K(0xa6)][K(0xad)](E[K(0x99)]+K(0x9e))+K(0xc3)+chalk_1['default'][K(0xa6)][K(0xad)](C['length']+K(0xa0))+'\x20in\x20project\x20'+chalk_1['default']['bold'](L)),yield Promise['all']([...E,...C]));}catch(v){(0x0,utils_1[K(0x90)])(K(0x7c)+v[K(0x86)]);}})),H=(0x0,utils_1[X(0xaf)])(!![])[X(0x88)](X(0xc1))[X(0xca)]('Port-forwarding\x20for\x20the\x20specified\x20service')[X(0xa7)](X(0x8f),X(0x98))[X(0xa7)]('--service\x20--serviceId\x20[NAME]',X(0xc2))[X(0xa7)]('--noDefaults',this[X(0x78)],![])[X(0x71)](({noDefaults:l,projectId:a,serviceId:D})=>__awaiter(this,void 0x0,void 0x0,function*(){const N=X;(0x0,utils_1['assertContextExisting'])(this[N(0x79)]);const f=this[N(0x85)](),L=l?undefined:i[N(0x92)](),E=a||L||(yield p[N(0xba)]()),C=l?undefined:i[N(0xab)](),v=D||C||(yield p[N(0x97)](E)());console[N(0x96)]('Forwarding\x20service\x20'+chalk_1['default']['bold'](v)+N(0x6d)+chalk_1[N(0x8a)][N(0xad)](E));try{yield f['forwardService']({'projectId':E,'serviceId':v},![]);}catch(O){(0x0,utils_1['error'])(N(0x7c)+O[N(0x86)]);}})),j=(0x0,utils_1[X(0xaf)])(!![])['name'](X(0x83))[X(0xca)](X(0xc8))[X(0xa7)](X(0x8f),X(0x98))[X(0xa7)]('--addon\x20--addonId\x20[NAME]',X(0xa1))[X(0xa7)](X(0xc9),this[X(0x78)],![])[X(0x71)](({projectId:l,addonId:a,noDefaults:D})=>__awaiter(this,void 0x0,void 0x0,function*(){const m=X;(0x0,utils_1[m(0x6e)])(this[m(0x79)]);const f=D?undefined:i['getCurrentProjectName'](),L=l||f||(yield p[m(0xba)]()),E=a||(yield p[m(0xac)](L)());console[m(0x96)](m(0x94)+chalk_1[m(0x8a)][m(0xad)](E)+m(0x6d)+chalk_1[m(0x8a)][m(0xad)](L));const C=this[m(0x85)]();try{yield C[m(0xb0)]({'projectId':L,'addonId':E},![]);}catch(v){(0x0,utils_1['error'])(m(0x7c)+v[m(0x86)]);}}));this[X(0x7f)][X(0x9b)](B),this[X(0x7f)]['addCommand'](H),this[X(0x7f)][X(0x9b)](j);}[a10U(0x85)](){const J=a10U,i=this[J(0x79)][J(0xb3)],p=i['canExecuteWithHostnames']();if(p['error'])throw new Error(p[J(0x86)]);return i['on'](J(0x9f),(B,H)=>{const Y=J,j=chalk_1[Y(0x8a)]['greenBright'][Y(0xad)](H[Y(0x7e)]+'\x20\x27'+H['id']+'\x27'),l=H[Y(0xb6)]===Y(0x93)?Y(0x72):'';(0x0,utils_1['success'])('Exposing\x20'+j+Y(0xc0)+H['address']+':'+H[Y(0xbe)]+'\x20('+H[Y(0xb6)]+Y(0xb9)),H['hostnames'][Y(0x70)](a=>{const k=Y;(0x0,utils_1[k(0x84)])('\x20\x20'+l+a+':'+H[k(0xbe)]);}),(0x0,utils_1['success'])('');}),i['on']('tunnel-close',(B,H)=>{const M=J,j=chalk_1[M(0x8a)][M(0xa9)][M(0xad)](H[M(0x7e)]+'\x20\x27'+H['id']+'\x27');(0x0,utils_1['warning'])(M(0x89)+H['address']+':'+H[M(0xbe)]+M(0x95)+j+M(0x8c)),H['hostnames'][M(0x70)](l=>{(0x0,utils_1['warning'])('\x20\x20'+l+':'+H['port']);}),(0x0,utils_1[M(0xc5)])('');}),i['on']('connection-error',(B,H,j)=>{const F=J;(0x0,utils_1['warning'])(F(0xc7)+H[F(0xa8)]+':'+H[F(0xbe)]+F(0xa4)+(j===null||j===void 0x0?void 0x0:j[F(0x86)])+'\x22');}),process['on'](J(0xb2),()=>__awaiter(this,void 0x0,void 0x0,function*(){const q=J;try{yield i[q(0x8d)]();}catch(B){(0x0,utils_1[q(0x90)])('Cleaning\x20up\x20open\x20connections\x20failed:\x20'+B[q(0x86)]);}finally{process[q(0xbb)]();}})),i;}}exports['CliPortForward']=CliPortForward;
package/dist/utils.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a11s=a11f;(function(y,f){const R=a11f,a=y();while(!![]){try{const b=parseInt(R(0xae))/0x1+-parseInt(R(0xc9))/0x2*(-parseInt(R(0xa6))/0x3)+-parseInt(R(0xc8))/0x4+-parseInt(R(0xa3))/0x5*(parseInt(R(0xe8))/0x6)+-parseInt(R(0xab))/0x7*(-parseInt(R(0xaf))/0x8)+parseInt(R(0xc3))/0x9+-parseInt(R(0xc5))/0xa*(-parseInt(R(0xc0))/0xb);if(b===f)break;else a['push'](a['shift']());}catch(I){a['push'](a['shift']());}}}(a11y,0x20347));var __awaiter=this&&this[a11s(0xb8)]||function(y,f,a,b){function I(G){return G instanceof a?G:new a(function(T){T(G);});}return new(a||(a=Promise))(function(G,T){const g=a11f;function u(F){const j=a11f;try{Z(b[j(0xb7)](F));}catch(d){T(d);}}function t(F){try{Z(b['throw'](F));}catch(d){T(d);}}function Z(F){const U=a11f;F[U(0xd5)]?G(F[U(0xa7)]):I(F[U(0xa7)])[U(0xdb)](u,t);}Z((b=b[g(0xc1)](y,f||[]))[g(0xb7)]());});},__importDefault=this&&this[a11s(0xe3)]||function(y){const o=a11s;return y&&y[o(0xa5)]?y:{'default':y};};function a11f(y,f){const a=a11y();return a11f=function(b,I){b=b-0xa2;let G=a[b];return G;},a11f(y,f);}Object[a11s(0xbc)](exports,'__esModule',{'value':!![]}),exports['assertContextExisting']=exports[a11s(0xd1)]=exports['asyncSequential']=exports[a11s(0xbd)]=exports[a11s(0xbe)]=exports[a11s(0xe2)]=exports['warning']=exports[a11s(0xb5)]=exports['checkUpdate']=exports[a11s(0xda)]=void 0x0;const node_fetch_1=__importDefault(require(a11s(0xd0))),chalk_1=__importDefault(require('chalk')),commander_1=require(a11s(0xa4)),pgk=require(a11s(0xea));exports[a11s(0xda)]=a11s(0xd7)+(pgk===null||pgk===void 0x0?void 0x0:pgk[a11s(0xb0)]);function checkUpdate(y){return __awaiter(this,void 0x0,void 0x0,function*(){const i=a11f;function f(a,b){const r=a11f,I=new Date(Number(a));return I['setDate'](I[r(0xac)]()+b),I;}try{if(f(y[i(0xa9)](),0x1)>new Date())return;const a=pgk[i(0xb0)],{name:b}=pgk;if(!a)return;const I=i(0xaa)+b+i(0xe1),G=yield(0x0,node_fetch_1[i(0xcf)])(I,{'method':i(0xe9),'timeout':0x1388}),T=(yield G[i(0xe4)]())['version'];needsUpdate(a,T)&&warning(i(0xc4)+a+i(0xb1)+T+'.'+(i(0xcb)+b+'\x20-g\x27\x20or\x20\x27yarn\x20global\x20add\x20'+b+'\x27\x20**')),yield y[i(0xd9)](new Date());}catch(u){}});}exports[a11s(0xbb)]=checkUpdate;function needsUpdate(y,f){const l=a11s,a=/(\.0+)+$/,b=y[l(0xc6)](a,'')['split']('.'),I=f[l(0xc6)](a,'')[l(0xb2)]('.');for(let G=0x0;G<Math[l(0xc7)](b['length'],I[l(0xe0)]);G+=0x1){const T=parseInt(I[G],0xa)-parseInt(b[G],0xa);if(T>0x0)return!![];if(T<0x0)return![];}return I[l(0xe0)]>b[l(0xe0)];}function error(y){const H=a11s;console[H(0xb5)](chalk_1[H(0xcf)][H(0xca)](H(0xc2)+y));}exports[a11s(0xb5)]=error;function warning(y){const v=a11s;console[v(0xb5)](chalk_1[v(0xcf)][v(0xbf)](''+y));}exports[a11s(0xe5)]=warning;function success(y){const P=a11s;console[P(0xcd)](chalk_1[P(0xcf)][P(0xdf)](''+y));}exports[a11s(0xe2)]=success;function a11y(){const V=['/latest','success','__importDefault','json','warning','Verbose\x20output','No\x20API\x20URL\x20present\x20in\x20context.\x20Create\x20new\x20context\x20with\x20\x27northflank\x20login\x27','546CClWqb','GET','../package.json','No\x20token\x20in\x20CLI\x20context.\x20Add\x20token\x20with\x20\x27northflank\x20set-token\x27','6560rCAhnW','commander','__esModule','9tZqWoM','value','reduce','getLastUpdateCheck','https://registry.npmjs.org/','7EAKqML','getDate','resolve','60451whzbit','528376pYhRYP','version',',\x20the\x20latest\x20version\x20of\x20the\x20cli\x20is\x20','split','storeOptionsAsProperties','allowUnknownOption','error','No\x20CLI\x20context\x20present.\x20Create\x20context\x20with\x20\x27northflank\x20login\x27','next','__awaiter','getCurrentBaseUrl','option','checkUpdate','defineProperty','retry','getCommand','yellow','25069ZnqYlN','apply','Failed:\x20','689184MEsXaz','**\x20You\x27re\x20running\x20on\x20version\x20','400NqbqTh','replace','min','185308fgJunG','2264PVwyOU','redBright','\x20Consider\x20updating\x20using\x20\x27npm\x20i\x20','getCurrentToken','log','parse','default','node-fetch','isValidJSON','allowExcessArguments','--quiet','enablePositionalOptions','done','contextProvider','northflank-cli/','getCurrentContext','setLastUpdateCheck','customUserAgent','then','--verbose','asyncSequential','Command','green','length'];a11y=function(){return V;};return a11y();}function getCommand(y=![]){const q=a11s,f=new commander_1[(q(0xde))]();return f[q(0xb3)](![]),f[q(0xb4)](![]),f[q(0xd2)](![]),f[q(0xd4)](!![]),y&&(f[q(0xba)](q(0xdc),q(0xe6),![]),f[q(0xba)](q(0xd3),'No\x20console\x20output',![])),f;}exports[a11s(0xbe)]=getCommand;const retry=(y,f=0x32)=>a=>{let b=y;const I=()=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){try{return yield a();}catch(G){if(b<=0x0)throw G;return b-=0x1,yield new Promise(T=>setTimeout(()=>T(),f)),I();}});return I();};exports['retry']=retry;const asyncSequential=(y,f)=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){const p=a11s,a=Promise[p(0xad)]([]);return y[p(0xa8)]((b,I)=>b[p(0xdb)](G=>f(I)[p(0xdb)](T=>{return G['push'](T),G;})),a);});exports[a11s(0xdd)]=asyncSequential;function isValidJSON(y){const Y=a11s;try{return JSON[Y(0xce)](y);}catch(f){return![];}}exports['isValidJSON']=isValidJSON;function assertContextExisting(y){const A=a11s;if(y['contextProvider'][A(0xd8)]()===undefined)throw new Error(A(0xb6));if(y[A(0xd6)][A(0xb9)]()===undefined)throw new Error(A(0xe7));if(y[A(0xd6)][A(0xcc)]()===undefined)throw new Error(A(0xa2));}exports['assertContextExisting']=assertContextExisting;
1
+ 'use strict';const a11O=a11p;(function(i,p){const v=a11p,B=i();while(!![]){try{const H=parseInt(v(0x14c))/0x1+-parseInt(v(0x154))/0x2+parseInt(v(0x11c))/0x3+parseInt(v(0x122))/0x4+-parseInt(v(0x14d))/0x5+parseInt(v(0x14b))/0x6*(parseInt(v(0x150))/0x7)+parseInt(v(0x141))/0x8;if(H===p)break;else B['push'](B['shift']());}catch(j){B['push'](B['shift']());}}}(a11i,0x9cca6));var __awaiter=this&&this[a11O(0x155)]||function(i,p,B,H){function j(l){return l instanceof B?l:new B(function(a){a(l);});}return new(B||(B=Promise))(function(l,a){const e=a11p;function D(E){try{L(H['next'](E));}catch(C){a(C);}}function f(E){const Q=a11p;try{L(H[Q(0x130)](E));}catch(C){a(C);}}function L(E){const U=a11p;E[U(0x14e)]?l(E[U(0x140)]):j(E[U(0x140)])['then'](D,f);}L((H=H[e(0x125)](i,p||[]))[e(0x128)]());});},__importDefault=this&&this['__importDefault']||function(i){const G=a11O;return i&&i[G(0x129)]?i:{'default':i};};Object[a11O(0x12e)](exports,a11O(0x129),{'value':!![]}),exports[a11O(0x158)]=exports[a11O(0x156)]=exports[a11O(0x15b)]=exports[a11O(0x11b)]=exports[a11O(0x147)]=exports[a11O(0x136)]=exports[a11O(0x157)]=exports[a11O(0x132)]=exports['checkUpdate']=exports[a11O(0x11e)]=void 0x0;const node_fetch_1=__importDefault(require('node-fetch')),chalk_1=__importDefault(require(a11O(0x13b))),commander_1=require(a11O(0x135)),pgk=require(a11O(0x142));exports[a11O(0x11e)]=a11O(0x15c)+(pgk===null||pgk===void 0x0?void 0x0:pgk[a11O(0x148)]);function checkUpdate(i){return __awaiter(this,void 0x0,void 0x0,function*(){const b=a11p;function p(B,H){const x=a11p,j=new Date(Number(B));return j['setDate'](j[x(0x153)]()+H),j;}try{if(p(i['getLastUpdateCheck'](),0x1)>new Date())return;const B=pgk['version'],{name:H}=pgk;if(!B)return;const j='https://registry.npmjs.org/'+H+'/latest',l=yield(0x0,node_fetch_1[b(0x146)])(j,{'method':b(0x13c),'timeout':0x1388}),a=(yield l[b(0x127)]())[b(0x148)];needsUpdate(B,a)&&warning('**\x20You\x27re\x20running\x20on\x20version\x20'+B+b(0x121)+a+'.'+(b(0x13e)+H+'\x20-g\x27\x20or\x20\x27yarn\x20global\x20add\x20'+H+'\x27\x20**')),yield i[b(0x149)](new Date());}catch(D){}});}exports[a11O(0x124)]=checkUpdate;function needsUpdate(p,B){const w=a11O,H=/(\.0+)+$/,j=p[w(0x144)](H,'')['split']('.'),l=B[w(0x144)](H,'')[w(0x13f)]('.');for(let a=0x0;a<Math['min'](j['length'],l[w(0x126)]);a+=0x1){const D=parseInt(l[a],0xa)-parseInt(j[a],0xa);if(D>0x0)return!![];if(D<0x0)return![];}return l[w(0x126)]>j[w(0x126)];}function error(i){const X=a11O;console['error'](chalk_1[X(0x146)][X(0x15a)](X(0x12f)+i));}exports[a11O(0x132)]=error;function warning(i){const K=a11O;console[K(0x132)](chalk_1['default'][K(0x13a)](''+i));}exports[a11O(0x157)]=warning;function success(i){const N=a11O;console[N(0x143)](chalk_1[N(0x146)][N(0x11f)](''+i));}exports[a11O(0x136)]=success;function getCommand(i=![]){const m=a11O,p=new commander_1[(m(0x13d))]();return p[m(0x138)](![]),p[m(0x123)](![]),p[m(0x12b)](![]),p[m(0x139)](!![]),i&&(p[m(0x11d)](m(0x152),m(0x134),![]),p[m(0x11d)](m(0x12a),m(0x120),![])),p;}exports[a11O(0x147)]=getCommand;function a11p(i,p){const B=a11i();return a11p=function(H,j){H=H-0x11b;let l=B[H];return l;},a11p(i,p);}const retry=(i,p=0x32)=>B=>{let H=i;const j=()=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){try{return yield B();}catch(l){if(H<=0x0)throw l;return H-=0x1,yield new Promise(a=>setTimeout(()=>a(),p)),j();}});return j();};exports['retry']=retry;const asyncSequential=(i,p)=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){const J=a11O,B=Promise[J(0x14a)]([]);return i[J(0x159)]((H,j)=>H[J(0x133)](l=>p(j)[J(0x133)](a=>{const Y=J;return l[Y(0x131)](a),l;})),B);});function a11i(){const F=['warning','assertContextExisting','reduce','redBright','asyncSequential','northflank-cli/','retry','2026200lkufRp','option','customUserAgent','green','No\x20console\x20output',',\x20the\x20latest\x20version\x20of\x20the\x20cli\x20is\x20','1869732fjZOfd','allowUnknownOption','checkUpdate','apply','length','json','next','__esModule','--quiet','allowExcessArguments','getCurrentToken','parse','defineProperty','Failed:\x20','throw','push','error','then','Verbose\x20output','commander','success','No\x20API\x20URL\x20present\x20in\x20context.\x20Create\x20new\x20context\x20with\x20\x27northflank\x20login\x27','storeOptionsAsProperties','enablePositionalOptions','yellow','chalk','GET','Command','\x20Consider\x20updating\x20using\x20\x27npm\x20i\x20','split','value','4717784apLwtG','../package.json','log','replace','getCurrentBaseUrl','default','getCommand','version','setLastUpdateCheck','resolve','73776AFvRTt','391504ObMlTz','4436245GEFWUG','done','getCurrentContext','77hNNGDn','contextProvider','--verbose','getDate','1459706VievYq','__awaiter','isValidJSON'];a11i=function(){return F;};return a11i();}exports[a11O(0x15b)]=asyncSequential;function isValidJSON(i){const k=a11O;try{return JSON[k(0x12d)](i);}catch(p){return![];}}exports['isValidJSON']=isValidJSON;function assertContextExisting(i){const M=a11O;if(i[M(0x151)][M(0x14f)]()===undefined)throw new Error('No\x20CLI\x20context\x20present.\x20Create\x20context\x20with\x20\x27northflank\x20login\x27');if(i['contextProvider'][M(0x145)]()===undefined)throw new Error(M(0x137));if(i[M(0x151)][M(0x12c)]()===undefined)throw new Error('No\x20token\x20in\x20CLI\x20context.\x20Add\x20token\x20with\x20\x27northflank\x20set-token\x27');}exports[a11O(0x158)]=assertContextExisting;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@northflank/cli",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
4
4
  "author": "Marco Suter",
5
5
  "description": "Provides a command-line interface to the Northflank platform.",
6
6
  "homepage": "https://www.northflank.com",