@northflank/cli 0.9.3 → 0.9.4

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=a6C;(function(n,C){const N=a6C,k=n();while(!![]){try{const H=parseInt(N(0x184))/0x1+parseInt(N(0x1ad))/0x2+parseInt(N(0x1bc))/0x3*(-parseInt(N(0x1c3))/0x4)+parseInt(N(0x1a6))/0x5+parseInt(N(0x1d7))/0x6+parseInt(N(0x194))/0x7+parseInt(N(0x1d4))/0x8*(-parseInt(N(0x1c9))/0x9);if(H===C)break;else k['push'](k['shift']());}catch(R){k['push'](k['shift']());}}}(a6n,0x4c75c));var __awaiter=this&&this['__awaiter']||function(n,C,k,H){function R(W){return W instanceof k?W:new k(function(i){i(W);});}return new(k||(k=Promise))(function(W,i){const c=a6C;function t(y){const X=a6C;try{M(H[X(0x1b2)](y));}catch(T){i(T);}}function r(y){const E=a6C;try{M(H[E(0x1d8)](y));}catch(T){i(T);}}function M(y){const g=a6C;y[g(0x1c0)]?W(y['value']):R(y[g(0x18a)])[g(0x1a7)](t,r);}M((H=H[c(0x1cc)](n,C||[]))[c(0x1b2)]());});},__importDefault=this&&this[a6b(0x1cf)]||function(n){const L=a6b;return n&&n[L(0x1b7)]?n:{'default':n};};Object[a6b(0x1b5)](exports,a6b(0x1b7),{'value':!![]}),exports[a6b(0x1b4)]=void 0x0;function a6n(){const Y=['--cmd\x20--command\x20[COMMAND]','job','exit','success','execStartLog','Container\x20to\x20exec\x20into\x20(random\x20container\x20will\x20be\x20chosen\x20if\x20not\x20specified)','with\x20user:','log','exec','action','addCommand','Command\x20execution\x20(exec)\x20for\x20Northflank\x20services\x20and\x20jobs.','rows','with\x20shell\x20session','stdErr','message','440155Imwxhw','then','../utils','execJobSession','handleShellSession','getCurrentProjectName','Run\x20command\x20with\x20this\x20user','1019538DOsAkq','askForService','../inquirer-helper','stderr','customUserAgent','next','warning','CliExec','defineProperty','Command\x20exec\x20for\x20the\x20specified\x20','__esModule','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','Id\x20[NAME]','default','service','1532577OaeKvJ','description','assertContextExisting','without\x20shell','done','Error\x20occured\x20during\x20','greenBright','4lGNHyh','execServiceSession','--container\x20--containerId\x20[NAME]','bold','askForJob',',\x20details:\x20','369ZxtclM','stdOut','waitForCommandResult','apply','toUpperCase','alias','__importDefault','name','chalk','Unknown',',\x20exit\x20code:\x20','146136TyVAZQ','getStandardExecCommand','charAt','1708662AgNWgB','throw','isTTY','--user\x20[USER]','error','option','Success','none','setRawMode','Command\x20to\x20execute,\x20if\x20--shell\x20option\x20is\x20present,\x20it\x20will\x20run\x20in\x20the\x20specified\x20shell,\x20otherwise','askForProject','Command\x20completed\x20successfully,\x20exit\x20code:\x20','pipe','status','Run\x20command\x20with\x20this\x20group','334780kLiqes','(exit\x20with\x20\x27Ctrl+D\x27)','stdout','columns','apiClient','\x20in\x20project\x20','value','stdin','ApiClient','resizeTerminal','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','@northflank/js-client','slice','execCmd','getTerminalSize','Project\x20for\x20exec','2489403FgyABd','\x20to\x20exec\x20into'];a6n=function(){return Y;};return a6n();}const js_client_1=require(a6b(0x18f)),chalk_1=__importDefault(require(a6b(0x1d1))),utils_1=require(a6b(0x1a8)),inquirer_helper_1=require(a6b(0x1af));class CliExec{constructor(n){const G=a6b;this[G(0x1d5)]=R=>(0x0,utils_1['getCommand'])(!![])[G(0x1d0)](R)[G(0x1bd)](G(0x1b6)+R)[G(0x1dc)]('--project\x20--projectId\x20[NAME]',G(0x193))['option']('--'+R+'\x20--'+R+G(0x1b9),R[G(0x1d6)](0x0)[G(0x1cd)]()+R[G(0x190)](0x1)+G(0x195))[G(0x1dc)](G(0x1c5),G(0x19b))[G(0x1dc)]('--shell-cmd\x20[SHELL-CMD]',G(0x1b8))[G(0x1dc)](G(0x1da),G(0x1ac))[G(0x1dc)]('--group\x20[GROUP]',G(0x183))[G(0x1dc)]('--noDefaults',G(0x18e),![])[G(0x1dc)](G(0x196),G(0x17e)),this[G(0x192)]=()=>({'columns':process[G(0x186)]['columns'],'rows':process[G(0x186)][G(0x1a2)]}),this[G(0x19a)]=(R,W,i,t,r,M,y,T)=>{const Z=G;if(T===!![])return;const V=t==='none',j=V?Z(0x1bf):t===undefined?Z(0x1a3):'shell\x20command\x20'+chalk_1[Z(0x1ba)][Z(0x1c2)](t),U=r!==undefined?Z(0x19c)+r:'',h=M!==undefined?'with\x20group:'+M:'',o=y!==undefined?'with\x20command\x20\x27'+chalk_1[Z(0x1ba)]['greenBright'](y)+'\x27':'',A=[o,j,U,h]['filter'](Q=>Q!=='')['join']('\x20'),d=Z(0x185);console[Z(0x19d)]('Exec\x20'+R+'\x20'+chalk_1[Z(0x1ba)]['bold'](W)+Z(0x189)+chalk_1[Z(0x1ba)][Z(0x1c6)](i)+'\x20'+A+'\x20'+d);},this[G(0x1aa)]=(R,W,i=![])=>__awaiter(this,void 0x0,void 0x0,function*(){const q=G;var t,r;try{process['stdin']['isTTY']&&(process[q(0x18b)][q(0x17d)](!![]),process['stdout']['on']('resize',()=>{const w=q;R[w(0x18d)](this[w(0x192)]());}));process[q(0x18b)]['pipe'](R['stdIn']),R[q(0x1a4)]['pipe'](process[q(0x1b0)]),R[q(0x1ca)][q(0x181)](process[q(0x186)]),R['on'](q(0x1db),y=>{const O=q;var T;(0x0,utils_1[O(0x1db)])(O(0x1c1)+W+'\x20command\x20exec:\x20'+((T=y[O(0x1a5)])!==null&&T!==void 0x0?T:y)),process[O(0x18b)][O(0x1d9)]&&process[O(0x18b)][O(0x17d)](![]),process[O(0x198)](-0x1);});const M=yield R[q(0x1cb)]();if(i!==!![]){const y=(t=M===null||M===void 0x0?void 0x0:M[q(0x182)])!==null&&t!==void 0x0?t:q(0x1d2),T=(r=M===null||M===void 0x0?void 0x0:M['exitCode'])!==null&&r!==void 0x0?r:-0x1,V=(M===null||M===void 0x0?void 0x0:M[q(0x1a5)])?q(0x1c8)+M[q(0x1a5)]:'';y===q(0x1dd)?(0x0,utils_1[q(0x199)])(q(0x180)+T):(0x0,utils_1[q(0x1b3)])('Command\x20didn\x27t\x20complete\x20successfully,\x20status:\x20'+y+q(0x1d3)+T+V);}return M;}finally{process[q(0x18b)][q(0x1d9)]&&process[q(0x18b)]['setRawMode'](![]);}}),this['apiClient']=new js_client_1[(G(0x18c))](n,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[G(0x1b1)]});const C=new inquirer_helper_1['InquirerHelper'](this[G(0x188)]);this['execCmd']=(0x0,utils_1['getCommand'])()[G(0x1d0)]('command-exec')[G(0x1ce)](G(0x19e))['description'](G(0x1a1));const k=this['getStandardExecCommand']('service')[G(0x19f)](R=>__awaiter(this,void 0x0,void 0x0,function*(){const F=G,{noDefaults:W,projectId:i,serviceId:t,containerId:r,shellCmd:M,user:y,group:T,command:V,quiet:j}=R;(0x0,utils_1[F(0x1be)])(this[F(0x188)]);try{const U=W?undefined:n[F(0x1ab)](),h=i||U||(yield C[F(0x17f)]()),o=W?undefined:n['getCurrentServiceName'](),A=t||o||(yield C[F(0x1ae)](h)()),d=M!==null&&M!==void 0x0?M:V!==undefined?F(0x1de):undefined;this[F(0x19a)]('service',A,h,d,y,T,V,j);const Q=process['stdout'][F(0x187)],l=process['stdout'][F(0x1a2)],K={'projectId':h,'serviceId':A},m=yield this[F(0x188)][F(0x19e)][F(0x1c4)](K,{'containerName':r,'command':V,'shell':d,'user':y,'group':T,'ttyColumns':Q,'ttyRows':l});yield this[F(0x1aa)](m,F(0x1bb),j);}catch(a){(0x0,utils_1['error'])(''+a[F(0x1a5)]);}finally{process[F(0x198)]();}})),H=this[G(0x1d5)](G(0x197))['action'](R=>__awaiter(this,void 0x0,void 0x0,function*(){const D=G,{projectId:W,jobId:i,containerId:t,noDefaults:r,shellCmd:M,user:y,group:T,command:V,quiet:j}=R;(0x0,utils_1[D(0x1be)])(this[D(0x188)]);try{const U=r?undefined:n[D(0x1ab)](),h=W||U||(yield C[D(0x17f)]()),o=i||(yield C[D(0x1c7)](h)());this[D(0x19a)](D(0x197),o,h,M,j);const {rows:A,columns:d}=this[D(0x192)](),Q={'projectId':h,'jobId':o},l=yield this[D(0x188)][D(0x19e)][D(0x1a9)](Q,{'containerName':t,'command':V,'shell':M,'user':y,'group':T,'ttyColumns':d,'ttyRows':A});yield this[D(0x1aa)](l,'job',j);}catch(K){(0x0,utils_1[D(0x1db)])(''+K[D(0x1a5)]);}finally{process[D(0x198)]();}}));this[G(0x191)][G(0x1a0)](k),this['execCmd'][G(0x1a0)](H);}}function a6C(n,C){const k=a6n();return a6C=function(H,R){H=H-0x17d;let W=k[H];return W;},a6C(n,C);}exports[a6b(0x1b4)]=CliExec;
1
+ 'use strict';const a6E=a6G;(function(l,G){const r=a6G,s=l();while(!![]){try{const I=-parseInt(r(0x1aa))/0x1+parseInt(r(0x155))/0x2*(-parseInt(r(0x194))/0x3)+-parseInt(r(0x15e))/0x4+-parseInt(r(0x19b))/0x5+parseInt(r(0x18b))/0x6*(parseInt(r(0x1a7))/0x7)+parseInt(r(0x162))/0x8*(parseInt(r(0x187))/0x9)+-parseInt(r(0x16d))/0xa*(-parseInt(r(0x18a))/0xb);if(I===G)break;else s['push'](s['shift']());}catch(z){s['push'](s['shift']());}}}(a6l,0xa4d1a));var __awaiter=this&&this[a6E(0x164)]||function(l,G,s,I){function z(X){return X instanceof s?X:new s(function(N){N(X);});}return new(s||(s=Promise))(function(X,N){const e=a6G;function A(p){try{n(I['next'](p));}catch(m){N(m);}}function a(p){const V=a6G;try{n(I[V(0x178)](p));}catch(m){N(m);}}function n(p){const M=a6G;p[M(0x18d)]?X(p[M(0x14e)]):z(p[M(0x14e)])[M(0x190)](A,a);}n((I=I[e(0x18f)](l,G||[]))['next']());});},__importDefault=this&&this[a6E(0x1a9)]||function(l){const w=a6E;return l&&l[w(0x1b1)]?l:{'default':l};};Object[a6E(0x19e)](exports,a6E(0x1b1),{'value':!![]}),exports[a6E(0x161)]=void 0x0;const js_client_1=require(a6E(0x188)),chalk_1=__importDefault(require(a6E(0x17f))),utils_1=require(a6E(0x1a1)),inquirer_helper_1=require(a6E(0x158));function a6G(l,G){const s=a6l();return a6G=function(I,z){I=I-0x14c;let X=s[I];return X;},a6G(l,G);}class CliExec{constructor(l){const q=a6E;this['getStandardExecCommand']=z=>(0x0,utils_1['getCommand'])(!![])[q(0x15a)](z)[q(0x159)](q(0x1a0)+z)[q(0x1a8)]('--project\x20--projectId\x20[NAME]',q(0x184))[q(0x1a8)]('--'+z+q(0x199)+z+'Id\x20[NAME]',z['charAt'](0x0)[q(0x177)]()+z[q(0x15c)](0x1)+q(0x163))[q(0x1a8)]('--container\x20--containerId\x20[NAME]',q(0x152))[q(0x1a8)]('--shell-cmd\x20[SHELL-CMD]',q(0x18c))[q(0x1a8)](q(0x1a6),'Run\x20command\x20with\x20this\x20user')['option'](q(0x19c),q(0x14c))[q(0x1a8)](q(0x17d),q(0x185),![])[q(0x1a8)](q(0x183),q(0x153)),this[q(0x19d)]=()=>({'columns':process['stdout']['columns'],'rows':process[q(0x170)][q(0x166)]}),this[q(0x1ac)]=(z,X,N,A,a,n,p,m)=>{const O=q;if(m===!![])return;const D=A===O(0x182),o=D?O(0x15b):A===undefined?O(0x1b0):'shell\x20command\x20'+chalk_1[O(0x14d)][O(0x16a)](A),T=a!==undefined?O(0x16b)+a:'',d=n!==undefined?'with\x20group:'+n:'',W=p!==undefined?O(0x160)+chalk_1[O(0x14d)]['greenBright'](p)+'\x27':'',B=[W,o,T,d][O(0x17e)](y=>y!=='')['join']('\x20'),R=O(0x198);console[O(0x173)](O(0x19a)+z+'\x20'+chalk_1[O(0x14d)][O(0x17c)](X)+'\x20in\x20project\x20'+chalk_1[O(0x14d)][O(0x17c)](N)+'\x20'+B+'\x20'+R);},this[q(0x169)]=(z,X,N=![])=>__awaiter(this,void 0x0,void 0x0,function*(){const U=q;var A,a;try{process[U(0x186)][U(0x165)]&&(process[U(0x186)][U(0x181)](!![]),process[U(0x170)]['on'](U(0x180),()=>{const Z=U;z[Z(0x172)](this[Z(0x19d)]());}));process[U(0x186)][U(0x176)](z[U(0x16f)]),z[U(0x191)]['pipe'](process[U(0x1af)]),z[U(0x174)][U(0x176)](process[U(0x170)]),z['on'](U(0x154),p=>{const v=U;var m;(0x0,utils_1[v(0x154)])(v(0x1a5)+X+v(0x175)+((m=p[v(0x15d)])!==null&&m!==void 0x0?m:p)),process[v(0x186)]['isTTY']&&process['stdin'][v(0x181)](![]),process[v(0x167)](-0x1);});const n=yield z['waitForCommandResult']();if(N!==!![]){const p=(A=n===null||n===void 0x0?void 0x0:n['status'])!==null&&A!==void 0x0?A:'Unknown',m=(a=n===null||n===void 0x0?void 0x0:n[U(0x150)])!==null&&a!==void 0x0?a:-0x1,D=(n===null||n===void 0x0?void 0x0:n[U(0x15d)])?U(0x157)+n[U(0x15d)]:'';p===U(0x196)?(0x0,utils_1[U(0x19f)])(U(0x16e)+m):(0x0,utils_1[U(0x14f)])(U(0x179)+p+U(0x189)+m+D);}return n;}finally{process[U(0x186)]['isTTY']&&process[U(0x186)][U(0x181)](![]);}}),this[q(0x18e)]=new js_client_1['ApiClient'](l,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1['customUserAgent']});const G=new inquirer_helper_1[(q(0x1a2))](this[q(0x18e)]);this['execCmd']=(0x0,utils_1['getCommand'])()['name'](q(0x15f))['alias'](q(0x171))[q(0x159)](q(0x192));const s=this[q(0x17b)](q(0x151))[q(0x195)](z=>__awaiter(this,void 0x0,void 0x0,function*(){const S=q,{noDefaults:X,projectId:N,serviceId:A,containerId:a,shellCmd:n,user:p,group:m,command:D,quiet:o}=z;(0x0,utils_1[S(0x17a)])(this[S(0x18e)]);try{const T=X?undefined:l['getCurrentProjectName'](),d=N||T||(yield G[S(0x168)]()),W=X?undefined:l[S(0x1a3)](),B=A||W||(yield G[S(0x197)](d)()),R=n!==null&&n!==void 0x0?n:D!==undefined?S(0x182):undefined;this[S(0x1ac)](S(0x151),B,d,R,p,m,D,o);const y=process[S(0x170)][S(0x193)],K=process[S(0x170)][S(0x166)],i={'projectId':d,'serviceId':B},J=yield this[S(0x18e)][S(0x171)][S(0x16c)](i,{'containerName':a,'command':D,'shell':R,'user':p,'group':m,'ttyColumns':y,'ttyRows':K});yield this[S(0x169)](J,S(0x151),o);}catch(Q){(0x0,utils_1[S(0x154)])(''+Q[S(0x15d)]);}finally{process[S(0x167)]();}})),I=this['getStandardExecCommand']('job')['action'](z=>__awaiter(this,void 0x0,void 0x0,function*(){const g=q,{projectId:X,jobId:N,containerId:A,noDefaults:a,shellCmd:n,user:p,group:m,command:D,quiet:o}=z;(0x0,utils_1[g(0x17a)])(this[g(0x18e)]);try{const T=a?undefined:l[g(0x156)](),d=X||T||(yield G[g(0x168)]()),W=N||(yield G['askForJob'](d)());this['execStartLog']('job',W,d,n,o);const {rows:B,columns:R}=this['getTerminalSize'](),y={'projectId':d,'jobId':W},K=yield this['apiClient'][g(0x171)][g(0x1ae)](y,{'containerName':A,'command':D,'shell':n,'user':p,'group':m,'ttyColumns':R,'ttyRows':B});yield this[g(0x169)](K,g(0x1ab),o);}catch(i){(0x0,utils_1[g(0x154)])(''+i[g(0x15d)]);}finally{process['exit']();}}));this[q(0x1a4)]['addCommand'](s),this[q(0x1a4)][q(0x1ad)](I);}}exports[a6E(0x161)]=CliExec;function a6l(){const j=['Project\x20for\x20exec','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','stdin','18wVbQPt','@northflank/js-client',',\x20exit\x20code:\x20','55HdBBQn','12htNXsk','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','done','apiClient','apply','then','stdErr','Command\x20execution\x20(exec)\x20for\x20Northflank\x20services\x20and\x20jobs.','columns','367899ngmrmX','action','Success','askForService','(exit\x20with\x20\x27Ctrl+D\x27)','\x20--','Exec\x20','477590msVZxZ','--group\x20[GROUP]','getTerminalSize','defineProperty','success','Command\x20exec\x20for\x20the\x20specified\x20','../utils','InquirerHelper','getCurrentServiceName','execCmd','Error\x20occured\x20during\x20','--user\x20[USER]','4226285UqFbDT','option','__importDefault','315689XRmfeD','job','execStartLog','addCommand','execJobSession','stderr','with\x20shell\x20session','__esModule','Run\x20command\x20with\x20this\x20group','default','value','warning','exitCode','service','Container\x20to\x20exec\x20into\x20(random\x20container\x20will\x20be\x20chosen\x20if\x20not\x20specified)','Command\x20to\x20execute,\x20if\x20--shell\x20option\x20is\x20present,\x20it\x20will\x20run\x20in\x20the\x20specified\x20shell,\x20otherwise','error','4DPTYzD','getCurrentProjectName',',\x20details:\x20','../inquirer-helper','description','name','without\x20shell','slice','message','4180008dzUuEC','command-exec','with\x20command\x20\x27','CliExec','3038032vOoABQ','\x20to\x20exec\x20into','__awaiter','isTTY','rows','exit','askForProject','handleShellSession','greenBright','with\x20user:','execServiceSession','819110TBJzCz','Command\x20completed\x20successfully,\x20exit\x20code:\x20','stdIn','stdout','exec','resizeTerminal','log','stdOut','\x20command\x20exec:\x20','pipe','toUpperCase','throw','Command\x20didn\x27t\x20complete\x20successfully,\x20status:\x20','assertContextExisting','getStandardExecCommand','bold','--noDefaults','filter','chalk','resize','setRawMode','none','--cmd\x20--command\x20[COMMAND]'];a6l=function(){return j;};return a6l();}
@@ -1 +1 @@
1
- 'use strict';const a7U=a7C;(function(n,C){const j=a7C,k=n();while(!![]){try{const H=parseInt(j(0x1f3))/0x1+parseInt(j(0x1fa))/0x2+-parseInt(j(0x274))/0x3*(parseInt(j(0x22e))/0x4)+-parseInt(j(0x212))/0x5*(parseInt(j(0x24e))/0x6)+-parseInt(j(0x20f))/0x7+parseInt(j(0x272))/0x8+parseInt(j(0x202))/0x9*(parseInt(j(0x197))/0xa);if(H===C)break;else k['push'](k['shift']());}catch(R){k['push'](k['shift']());}}}(a7n,0xf0dfe));var __createBinding=this&&this['__createBinding']||(Object[a7U(0x23c)]?function(n,C,H,R){const h=a7U;if(R===undefined)R=H;var W=Object['getOwnPropertyDescriptor'](C,H);(!W||(h(0x23f)in W?!C[h(0x18d)]:W[h(0x1a2)]||W[h(0x20b)]))&&(W={'enumerable':!![],'get':function(){return C[H];}}),Object[h(0x1ba)](n,R,W);}:function(n,C,H,R){if(R===undefined)R=H;n[R]=C[H];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(n,C){const o=a7U;Object[o(0x1ba)](n,o(0x1ec),{'enumerable':!![],'value':C});}:function(n,C){const A=a7U;n[A(0x1ec)]=C;}),__importStar=this&&this[a7U(0x247)]||function(n){const d=a7U;if(n&&n[d(0x18d)])return n;var C={};if(n!=null){for(var H in n)if(H!==d(0x1ec)&&Object[d(0x269)][d(0x203)][d(0x23b)](n,H))__createBinding(C,n,H);}return __setModuleDefault(C,n),C;},__awaiter=this&&this[a7U(0x240)]||function(n,C,k,H){function R(W){return W instanceof k?W:new k(function(i){i(W);});}return new(k||(k=Promise))(function(W,i){const m=a7C;function t(y){const Q=a7C;try{M(H[Q(0x20e)](y));}catch(T){i(T);}}function r(y){const l=a7C;try{M(H[l(0x195)](y));}catch(T){i(T);}}function M(y){const K=a7C;y[K(0x243)]?W(y['value']):R(y[K(0x280)])[K(0x234)](t,r);}M((H=H[m(0x261)](n,C||[]))['next']());});},__importDefault=this&&this[a7U(0x1ea)]||function(n){const a=a7U;return n&&n[a(0x18d)]?n:{'default':n};};function a7n(){const nl=['getType','Choose\x20the\x20name\x20of\x20the\x20new\x20local\x20context:','description','editor','Choose\x20the\x20','editPayload','\x27\x20already\x20exists.\x20Do\x20you\x20want\x20to\x20override\x20this\x20context\x20(y)\x20or\x20enter\x20a\x20new\x20name\x20(N)?','join','values','chalk','pagination-prompt','askForBuild','this\x20option\x20is\x20required,\x20please\x20answer','for\x20this\x20','askForTemplateRun','subdomains','blue','askGeneric','REPEAT','whiteBright','5260708MgfhpI','must\x20be\x20shorter\x20than\x20or\x20equal\x20to\x20','askForJobRun','slice','Aborted.','\x20type?','then','yml','length','integer','templateRuns','isNaN','keys','call','create','repeat','ABORT','get','__awaiter','includes','confirmation','done','askForLogSink','example','enum','__importStar','filter','lodash','domain','defaultPaginationPageSize','askForSecret','prompt','2898sOOTCR','propToType','credentials','WARNING:\x20You\x20are\x20about\x20to\x20delete\x20','askForResourcePaginated','Should\x20it\x20be','pathVars','Choose\x20the\x20login\x20token:','retry','project:\x20\x27','set','safeDump','No\x20','template\x20run','Please\x20confirm\x20following\x20configuration:\x0a','password','\x20characters,\x20is\x20','underline','message','apply','No,\x20abort','getPathString','isArray','job\x20builds','max','isBoolean','trim','prototype','What\x20do\x20you\x20want\x20to\x20use\x20as','job\x20build','validate','toUpperCase','retrievePayloadViaInteractiveCli','must\x20be\x20longer\x20than\x20or\x20equal\x20to\x20','askForResource','json','8415408WGhisC','.*\x5c.(json|yaml|yml)$','3iHeyBw','job:\x20\x27','./api-helpers','addons','\x20and\x20it\x20','backups','./utils','EDIT','cmdPath','getInnerType','.\x20This\x20is\x20irreversible.\x20Please\x20confirm!','Provide\x20a\x20file\x20path\x20to\x20write\x20the\x20configuration\x20to\x20(<name>.[json|yaml|yml])','value','stringify','No,\x20edit','project','map','__esModule','confirmationPrompt','grey','push','Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.','contextProvider','domain\x20(','assign','throw','items','10XWtcjd','list','logSinks','unset','maximum','properties','must\x20be\x20a\x20valid\x20non-empty\x20json\x20string','test','getCurrentProjectName','askForDomain','maxLength','writable','createdAt','nextPageCursor','search-list','addEntry','service:\x20\x27','volume','askForProjectScopedResource','askForVolume','service','inquirer','Yes,\x20send','tmpCmdPath','Do\x20you\x20want\x20to\x20add','fullName','YES','askForService','runs','Template\x20id\x20not\x20provided.','name','string','writeFileSync','data','startedAt','defineProperty','subdomain','apiClient','nextCursor','askArrayEntry','volumes','getQuestionString','bold','builds','deleteWarningPrompt','split','\x20(startedAt:\x20','opt','override','SAVE','success','isUndefined','tokenPrompt','Something\x20unexpected\x20happened.','don\x27t\x20change','services','minimum','bgGrey','yaml','completedAt','minLength','saveFile','registerPrompt','log\x20sink','\x20(full\x20domain:\x20','rawObject','greenBright','job','inquirer-search-list','a\x20Northflank\x20resource','askForProject','Enter\x20the\x20','Configuration\x20file\x20written\x20to\x20','ask','secret','cursor','templates','warning','to\x20use:','\x20characters','registries','isValidJSON','pop','__importDefault','No,\x20but\x20save\x20as\x20file','default','found','Context\x20name\x20already\x20exists.',',\x20supported\x20types:\x20[json|yaml|yml]','askForAddon','askForJob','domains','1460477dARfoA','main-context','secrets','\x20Example:\x20','isEmpty','pagination','Writing\x20configuration\x20failed:\x20','1061920DpuzDI','type','No,\x20repeat','doesn\x27t\x20match\x20pattern\x20\x27','yellowBright','js-yaml','has','resultCache','11061009IzwkRT','hasOwnProperty','fetchResourceList','template','not\x20completed','jobs','editedResult','safeLoad','oneOf','configurable','green','askForProjectScopedResourcePaginated','next','11423874wCpcJa','toString','must\x20be\x20smaller\x20than\x20or\x20equal\x20to\x20','3505sKsKOD','confirm','boolean','elements','token','input','\x20in\x20','\x20to\x20use:'];a7n=function(){return nl;};return a7n();}Object[a7U(0x1ba)](exports,a7U(0x18d),{'value':!![]}),exports['InquirerHelper']=void 0x0;const _=__importStar(require(a7U(0x249))),chalk_1=__importDefault(require(a7U(0x223))),fs=__importStar(require('fs')),utils_1=require(a7U(0x27a)),api_helpers_1=require(a7U(0x276)),inquirer_pagination_prompt_1=require('./pagination/inquirer-pagination-prompt'),inquirer=require(a7U(0x1ac)),inquirerSearchList=require(a7U(0x1db)),yaml=require(a7U(0x1ff));var ConfirmChoices;(function(n){const N=a7U;n['YES']=N(0x1ad),n[N(0x22c)]=N(0x1fc),n[N(0x27b)]=N(0x282),n[N(0x1c8)]=N(0x1eb),n[N(0x23e)]=N(0x262);}(ConfirmChoices||(ConfirmChoices={})));function a7C(n,C){const k=a7n();return a7C=function(H,R){H=H-0x18b;let W=k[H];return W;},a7C(n,C);}class InquirerHelper{constructor(n){const X=a7U;this[X(0x1bc)]=n,this['defaultPaginationPageSize']=0x32,this['editPayload']=C=>__awaiter(this,void 0x0,void 0x0,function*(){const E=X,{editedResult:k}=yield inquirer[E(0x24d)]([{'type':E(0x21d),'name':E(0x208),'message':'Go\x20to\x20editor','default':yaml[E(0x259)](C)}]);return yaml[E(0x209)](k);}),this['saveFile']=C=>__awaiter(this,void 0x0,void 0x0,function*(){const g=X,k=i=>'Unexpected\x20file\x20type:\x20'+i+g(0x1ef);function H(){return __awaiter(this,void 0x0,void 0x0,function*(){const b=a7C;return inquirer[b(0x24d)]([{'type':b(0x217),'name':'fileName','message':b(0x27f),'validate':i=>new RegExp(b(0x273))[b(0x19e)](i)?!![]:k(i)}]);});}const {fileName:R}=yield H(),W=R[g(0x210)]()['split']('.')[g(0x1e9)]();try{switch(W){case g(0x271):(0x0,utils_1[g(0x1c9)])(g(0x1df)+R);return fs['writeFileSync'](R,JSON['stringify'](C,null,'\x20\x20'));case g(0x1d1):case g(0x235):(0x0,utils_1[g(0x1c9)])(g(0x1df)+R);return fs[g(0x1b7)](R,yaml[g(0x259)](C));default:(0x0,utils_1[g(0x1e4)])(k(W));}}catch(i){(0x0,utils_1[g(0x1e4)])(g(0x1f9)+i[g(0x260)]);}return undefined;}),this['filter']=(C,k)=>H=>{const L=X,R=typeof H===L(0x1b6)?H[L(0x268)]():H;return k===![]&&R==='don\x27t\x20change'?'':R;},this['validate']=(C,k,H)=>R=>{const G=X,W=[];if(R===''||R===G(0x1cd)){if(k!==![])W[G(0x190)](G(0x226));else return!![];}C[G(0x1fb)]==='string'&&!_[G(0x1ca)](C['pattern'])&&W['push'](new RegExp(C['pattern'])[G(0x19e)](R)?!![]:G(0x1fd)+C['pattern']+'\x27');C['type']===G(0x1b6)&&!_['isUndefined'](C[G(0x1d3)])&&W[G(0x190)](R[G(0x236)]>=C['minLength']?!![]:G(0x26f)+C[G(0x1d3)]+G(0x25e)+R['length']+G(0x1e6));C['type']===G(0x1b6)&&!_[G(0x1ca)](C[G(0x1a1)])&&W[G(0x190)](R['length']<=C[G(0x1a1)]?!![]:G(0x22f)+C[G(0x1a1)]+G(0x25e)+R[G(0x236)]+G(0x1e6));H&&Number[G(0x239)](parseInt(R,0xa))&&W[G(0x190)]('must\x20be\x20a\x20number,\x20is\x20'+R);C[G(0x1fb)]===G(0x237)&&!_[G(0x1ca)](C[G(0x1cf)])&&W[G(0x190)](R>=C[G(0x1cf)]?!![]:'must\x20be\x20bigger\x20than\x20or\x20equal\x20to\x20'+C[G(0x1cf)]);C['type']===G(0x237)&&!_[G(0x1ca)](C[G(0x19b)])&&W[G(0x190)](R<=C[G(0x19b)]?!![]:G(0x211)+C[G(0x19b)]);if(C[G(0x1fb)]==='rawObject'){const r=(0x0,utils_1[G(0x1e8)])(R);W[G(0x190)](r===![]||_[G(0x1f7)](r)?G(0x19d):!![]);}const i=W[G(0x248)](M=>M!==!![]),t=(C===null||C===void 0x0?void 0x0:C[G(0x245)])?'\x0a'+chalk_1['default']['red']('>>')+G(0x1f6)+chalk_1[G(0x1ec)][G(0x22d)](JSON[G(0x281)](C[G(0x245)])):'';return i['length']>0x0?i['join'](chalk_1[G(0x1ec)][G(0x25f)](G(0x278)))+t:!![];},this[X(0x263)]=(C,k,H)=>{const q=X,R=C[C['length']-0x1];function W(){const Z=a7C;return C[Z(0x231)](0x0,-0x1)['map'](r=>r['charAt'](0x0)[Z(0x26d)]()+r[Z(0x231)](0x1))['join']('>');}const i=C[q(0x236)]>0x1?chalk_1[q(0x1ec)][q(0x1d0)][q(0x22d)](W())+':\x20':'',t=H?'\x20('+chalk_1[q(0x1ec)][q(0x22a)](H)+')':'';return chalk_1[q(0x1ec)]['reset'](''+i+k+'\x20'+chalk_1['default'][q(0x1c1)][q(0x1d9)](R)+t+'?');},this[X(0x270)]=(C,k,H)=>__awaiter(this,void 0x0,void 0x0,function*(){const w=X;if(k[w(0x236)]<0x1){const i=H?'for\x20this\x20'+H:w(0x1ed);throw new Error(w(0x25a)+C+'\x20'+i+'.');}const R=w(0x21e)+C+w(0x219),W=k[w(0x236)]>0x4?w(0x1a5):w(0x198);return(yield inquirer[w(0x24d)]([{'type':W,'name':'name','message':R,'choices':k}]))[w(0x1b5)];}),this[X(0x252)]=(C,k,H)=>__awaiter(this,void 0x0,void 0x0,function*(){const O=X,{elements:R,nextCursor:W}=yield k();if(R[O(0x236)]<0x1){const r=H?O(0x227)+H:O(0x1ed);throw new Error(O(0x25a)+C+'\x20'+r+'.');}const i=O(0x21e)+C+O(0x219);if(W!==undefined){const M=({nextPageCursor:y})=>__awaiter(this,void 0x0,void 0x0,function*(){const F=O,T=yield k(y);return{'elements':T[F(0x215)],'nextPageCursor':T[F(0x1bd)]};});return(yield inquirer[O(0x24d)]([{'type':'pagination-prompt','name':O(0x1b5),'message':i,'choices':R,'nextPageCursor':W,'loadMore':M}]))['name'];}const t=R[O(0x236)]>0x4?O(0x1a5):O(0x198);return(yield inquirer['prompt']([{'type':t,'name':'name','message':i,'choices':R}]))['name'];}),this[X(0x22b)]=(C,k)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const D=X,H=''+(k?'('+chalk_1[D(0x1ec)][D(0x22a)](k)+')\x20':''),R=D(0x1de)+chalk_1['default'][D(0x20c)](C)+'\x20'+H+D(0x1e5),W=this[D(0x26c)]({'type':'string','required':!![]});return(yield inquirer[D(0x24d)]([{'type':'input','name':'name','message':R,'validate':W}]))[D(0x1b5)];}),this['askConfirm']=C=>__awaiter(this,void 0x0,void 0x0,function*(){const Y=X;return(yield inquirer[Y(0x24d)]([{'type':Y(0x213),'name':Y(0x1b5),'message':C,'default':!![]}]))[Y(0x1b5)];}),this[X(0x1b2)]=C=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const x=X,k=H=>R=>__awaiter(this,void 0x0,void 0x0,function*(){const S=a7C;var W;const i=yield this['apiClient'][S(0x198)][S(0x1ce)]({'parameters':{'projectId':H},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':R}}),t=i[S(0x1b8)][S(0x1ce)][S(0x18c)](r=>r['id']);return{'elements':t,'nextCursor':(W=i[S(0x1f8)])===null||W===void 0x0?void 0x0:W[S(0x1e2)]};});return this[x(0x20d)](x(0x1ab),k,C);}),this['askForTemplate']=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const z=X,C=k=>__awaiter(this,void 0x0,void 0x0,function*(){const J=a7C;var H;const R=yield this[J(0x1bc)][J(0x198)][J(0x1e3)]({'options':{'per_page':this['defaultPaginationPageSize'],'cursor':k}}),W=R['data'][J(0x1e3)][J(0x18c)](i=>i['id']);return{'elements':W,'nextCursor':(H=R[J(0x1f8)])===null||H===void 0x0?void 0x0:H[J(0x1e2)]};});return this['askForResourcePaginated'](z(0x205),C);}),this[X(0x228)]=C=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const u=X;if(_[u(0x1ca)](C))throw new Error(u(0x1b4));const k=H=>__awaiter(this,void 0x0,void 0x0,function*(){const f=u;var R;let W=this[f(0x24b)];const i=yield this[f(0x1bc)][f(0x198)][f(0x238)]({'parameters':{'templateId':C},'options':{'per_page':W,'cursor':H}}),t=i[f(0x1b8)][f(0x238)][f(0x18c)](r=>r['id']+f(0x1c5)+r[f(0x1a3)]+')');return{'elements':t,'nextCursor':(R=i[f(0x1f8)])===null||R===void 0x0?void 0x0:R[f(0x1e2)]};});return this[u(0x252)](u(0x25b),k)[u(0x234)](H=>H[u(0x1c4)]('\x20')[0x0]);}),this[X(0x244)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const e=X,C=k=>__awaiter(this,void 0x0,void 0x0,function*(){const B=a7C;var H;let R=this[B(0x24b)];const W=yield this['apiClient'][B(0x198)][B(0x199)]({'options':{'per_page':R,'cursor':k}}),i=W[B(0x1b8)]['logSinks']['map'](t=>t['id']);return{'elements':i,'nextCursor':(H=W[B(0x1f8)])===null||H===void 0x0?void 0x0:H['cursor']};});return this['askForResourcePaginated'](e(0x1d6),C);}),this[X(0x1f1)]=C=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const P=X,k=H=>R=>__awaiter(this,void 0x0,void 0x0,function*(){const v=a7C;var W;const i=yield this['apiClient'][v(0x198)][v(0x207)]({'parameters':{'projectId':H},'options':{'per_page':this[v(0x24b)],'cursor':R}}),t=i[v(0x1b8)]['jobs'][v(0x18c)](r=>r['id']);return{'elements':t,'nextCursor':(W=i[v(0x1f8)])===null||W===void 0x0?void 0x0:W[v(0x1e2)]};});return this['askForProjectScopedResourcePaginated'](P(0x1da),k,C);}),this[X(0x230)]=(C,k)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const s=X,H=R=>W=>__awaiter(this,void 0x0,void 0x0,function*(){const I=a7C;var i;const t=yield this[I(0x1bc)]['get'][I(0x1da)][I(0x1b3)]({'parameters':{'projectId':R,'jobId':C},'options':{'per_page':this[I(0x24b)],'cursor':W}}),r=t['data']['runs'][I(0x18c)](M=>M['id']+I(0x1c5)+M[I(0x1b9)]+')');return{'elements':r,'nextCursor':(i=t[I(0x1f8)])===null||i===void 0x0?void 0x0:i[I(0x1e2)]};});return this['askForProjectScopedResourcePaginated']('job\x20runs',H,k,s(0x275)+C+'\x27')[s(0x234)](R=>R[s(0x1c4)]('\x20')[0x0]);}),this[X(0x225)]=(C,k,H)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const n0=X;if(H!==undefined){const R=W=>i=>__awaiter(this,void 0x0,void 0x0,function*(){const p=a7C;var t;const r=yield this[p(0x1bc)][p(0x23f)][p(0x1da)][p(0x1c2)]({'parameters':{'projectId':W,'jobId':H},'options':{'per_page':this[p(0x24b)],'cursor':i}});return{'elements':r['data']['builds'][p(0x18c)](M=>M['id']+p(0x1c5)+M['createdAt']+')'),'nextCursor':(t=r[p(0x1f8)])===null||t===void 0x0?void 0x0:t[p(0x1e2)]};});return this['askForProjectScopedResourcePaginated'](n0(0x265),R,C,n0(0x275)+H+'\x27')['then'](W=>W['split']('\x20')[0x0]);}if(k!==undefined){const W=i=>t=>__awaiter(this,void 0x0,void 0x0,function*(){const n1=n0;var r;const M=yield this[n1(0x1bc)][n1(0x23f)][n1(0x1ab)]['builds']({'parameters':{'projectId':i,'serviceId':k},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':t}});return{'elements':M['data']['builds'][n1(0x18c)](y=>y['id']+n1(0x1c5)+y['createdAt']+')'),'nextCursor':(r=M[n1(0x1f8)])===null||r===void 0x0?void 0x0:r[n1(0x1e2)]};});return this[n0(0x20d)](n0(0x26b),W,C,n0(0x1a7)+H+'\x27')[n0(0x234)](i=>i[n0(0x1c4)]('\x20')[0x0]);}throw new Error('No\x20builds\x20found');}),this[X(0x1f0)]=C=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const n3=X,k=H=>R=>__awaiter(this,void 0x0,void 0x0,function*(){const n2=a7C;var W;const i=yield this[n2(0x1bc)][n2(0x198)]['addons']({'parameters':{'projectId':H},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':R}});return{'elements':i['data'][n2(0x277)][n2(0x18c)](t=>t['id']),'nextCursor':(W=i[n2(0x1f8)])===null||W===void 0x0?void 0x0:W['cursor']};});return this[n3(0x20d)]('addon',k,C);}),this['askForAddonBackup']=(C,k)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const n5=X,H=R=>W=>__awaiter(this,void 0x0,void 0x0,function*(){const n4=a7C;var i;const t=yield this['apiClient']['get']['addon'][n4(0x279)]({'parameters':{'projectId':R,'addonId':k},'options':{'per_page':this[n4(0x24b)],'cursor':W}});return{'elements':t['data'][n4(0x279)][n4(0x18c)](r=>r['id']+'\x20(completedAt:\x20'+(r[n4(0x1d2)]||n4(0x206))+')'),'nextCursor':(i=t[n4(0x1f8)])===null||i===void 0x0?void 0x0:i[n4(0x1e2)]};});return this[n5(0x20d)](n5(0x279),H,C,'addon:\x20\x27'+k+'\x27')[n5(0x234)](R=>R[n5(0x1c4)]('\x20')[0x0]);}),this[X(0x1aa)]=C=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const n7=X,k=H=>__awaiter(this,void 0x0,void 0x0,function*(){const n6=a7C;return(yield this[n6(0x1bc)][n6(0x198)][n6(0x1bf)]({'parameters':{'projectId':H}}))[n6(0x1b8)][n6(0x18c)](R=>R['id']);});return this[n7(0x1a9)](n7(0x1a8),k,C);}),this[X(0x24c)]=C=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const n9=X,k=H=>R=>__awaiter(this,void 0x0,void 0x0,function*(){const n8=a7C;var W;const i=yield this[n8(0x1bc)][n8(0x198)]['secrets']({'parameters':{'projectId':H},'options':{'per_page':this[n8(0x24b)],'cursor':R}});return{'elements':i[n8(0x1b8)][n8(0x1f5)][n8(0x18c)](t=>t['id']),'nextCursor':(W=i[n8(0x1f8)])===null||W===void 0x0?void 0x0:W['cursor']};});return this[n9(0x20d)](n9(0x1e1),k,C);}),this['askForSubdomain']=C=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const nn=X,k=yield this[nn(0x1bc)]['get'][nn(0x24a)]({'parameters':{'domain':C}}),H=k[nn(0x1b8)][nn(0x229)][nn(0x18c)](W=>W[nn(0x1b5)]+nn(0x1d7)+W[nn(0x1b0)]+')'),R=nn(0x193)+C+')';return this['askForResource'](nn(0x1bb),H,R)['then'](W=>W['split']('\x20')[0x0]);}),this[X(0x1c3)]=C=>__awaiter(this,void 0x0,void 0x0,function*(){const nC=X;return(yield inquirer['prompt']([{'type':nC(0x213),'name':nC(0x242),'message':chalk_1[nC(0x1ec)][nC(0x1fe)](nC(0x251)+(C||nC(0x1dc))+nC(0x27e)),'default':![]}]))[nC(0x242)];}),this['loginPrompt']=(C,k)=>__awaiter(this,void 0x0,void 0x0,function*(){const nk=X;_[nk(0x1ca)](C['name'])&&(k['length']<=0x0?_[nk(0x258)](C,nk(0x1b5),nk(0x1ec)):yield(0x0,utils_1[nk(0x256)])(0xa)(()=>__awaiter(this,void 0x0,void 0x0,function*(){const nH=nk,{name:H}=yield inquirer['prompt']([{'type':nH(0x217),'name':nH(0x1b5),'message':nH(0x21b),'default':nH(0x1f4)}]);if(!C[nH(0x1c7)]&&k['find'](R=>R[nH(0x1b5)]===H)){const {c:R}=yield inquirer[nH(0x24d)]([{'type':nH(0x213),'name':'c','message':'Context\x20with\x20name\x20\x27'+H+nH(0x220),'default':![]}]);if(R===![])throw new Error(nH(0x1ee));_[nH(0x258)](C,'override',!![]);}_[nH(0x258)](C,nH(0x1b5),H);})));if(_[nk(0x1ca)](C['token'])){const H=yield this[nk(0x1cb)]();_[nk(0x258)](C,nk(0x216),H);}return C;}),this[X(0x1cb)]=()=>__awaiter(this,void 0x0,void 0x0,function*(){const nR=X,{token:C}=yield inquirer['prompt']([{'type':nR(0x25d),'name':nR(0x216),'mask':'*','message':nR(0x255)}]);return C;}),inquirer[X(0x1d5)]('search-list',inquirerSearchList),inquirer['registerPrompt'](X(0x224),inquirer_pagination_prompt_1['DynamicReloadPaginationPrompt']);}['confirmationPrompt'](n,C){return __awaiter(this,void 0x0,void 0x0,function*(){const nW=a7C,k=yaml[nW(0x259)](n),H=_[nW(0x266)](k[nW(0x1c4)]('\x0a')[nW(0x18c)](i=>i[nW(0x236)])),R=chalk_1[nW(0x1ec)][nW(0x18f)]('-'[nW(0x23d)](H)+'\x0a'),{confirm:W}=yield inquirer['prompt']([{'type':'list','name':nW(0x213),'message':''+chalk_1[nW(0x1ec)][nW(0x1c1)][nW(0x20c)](nW(0x25c))+R+chalk_1[nW(0x1ec)]['blueBright'](k)+R,'choices':Object[nW(0x222)](ConfirmChoices)}]);switch(W){case ConfirmChoices[nW(0x1b1)]:return n;case ConfirmChoices[nW(0x23e)]:throw new Error(nW(0x232));case ConfirmChoices[nW(0x22c)]:return this[nW(0x26e)](C);case ConfirmChoices[nW(0x27b)]:return this[nW(0x18e)](yield this[nW(0x21f)](n),C);case ConfirmChoices[nW(0x1c8)]:yield this[nW(0x1d4)](n);return this[nW(0x18e)](n,C);default:throw new Error(nW(0x1cc));}});}[a7U(0x26e)](n,C){return __awaiter(this,void 0x0,void 0x0,function*(){const ni=a7C;if((C===null||C===void 0x0?void 0x0:C[ni(0x201)])!==undefined)this['resultCache']=C===null||C===void 0x0?void 0x0:C['resultCache'];this[ni(0x1ae)]=C===null||C===void 0x0?void 0x0:C[ni(0x27c)];const k={};return yield this[ni(0x24f)]([],n[ni(0x1c6)]['body'],k),this[ni(0x201)]=k,yield this[ni(0x18e)](k,n);});}[a7U(0x24f)](n,C,k,H){return __awaiter(this,void 0x0,void 0x0,function*(){const nt=a7C;let R;if(C[nt(0x20a)]&&!_[nt(0x200)](C,nt(0x19c))){if(C['oneOf']['length']>0x1){const {choice:W}=yield inquirer[nt(0x24d)]([{'type':nt(0x198),'name':'choice','message':'What\x27s\x20the\x20'+(n[n[nt(0x236)]-0x1]||'')+nt(0x233),'choices':C['oneOf'][nt(0x18c)](i=>{var t;return(t=i['description'])!==null&&t!==void 0x0?t:'??';})}]);R=yield this[nt(0x21a)](n,C[nt(0x20a)]['find'](i=>i[nt(0x21c)]===W),k,H);}else{const i=C[nt(0x20a)][0x0];_['set'](i,'description',C[nt(0x21c)]),R=yield this[nt(0x21a)](n,i,k,H);}R={};}else R=yield this['getType'](n,C,k,H);return R;});}[a7U(0x27d)](n,C,k,H){var R;return __awaiter(this,void 0x0,void 0x0,function*(){const nr=a7C;if(H===![]){const {addEntry:t}=yield inquirer['prompt']([{'type':nr(0x213),'name':nr(0x1a6),'message':this[nr(0x263)](C,nr(0x1af),n===null||n===void 0x0?void 0x0:n['description']),'default':![]}]);if(!t)return k;}const W=Object[nr(0x23a)]((R=n===null||n===void 0x0?void 0x0:n[nr(0x19c)])!==null&&R!==void 0x0?R:[]),i=n['required']||[];if(W['length']>0x0)for(const r of W){const M=C['concat'](r);if(C['length']>0x0&&!_['has'](k,C[nr(0x221)]('.')))_[nr(0x258)](k,C['join']('.'),{});yield this[nr(0x24f)](M,n[nr(0x19c)][r],k,i[nr(0x241)](r));}else yield this['getType'](C,Object[nr(0x194)](Object[nr(0x194)]({},n),{'type':'rawObject'}),k,H);return k;});}[a7U(0x1be)](n,C,k,H){return __awaiter(this,void 0x0,void 0x0,function*(){const nM=a7C;if(C&&k)return!![];const R=C?nM(0x1af):'Do\x20you\x20want\x20to\x20add\x20more',{addEntry:W}=yield inquirer[nM(0x24d)]([{'type':nM(0x213),'name':'addEntry','message':this[nM(0x263)](n,R,C?H:undefined),'default':![]}]);return W;});}['getType'](n,C,k,H){return __awaiter(this,void 0x0,void 0x0,function*(){const ny=a7C;let R;const W=n['join']('.');switch(C===null||C===void 0x0?void 0x0:C[ny(0x1fb)]){case'array':{let i=!![];while(yield this[ny(0x1be)](n,i,H,C===null||C===void 0x0?void 0x0:C[ny(0x21c)])){const t=_['get'](k,W);_[ny(0x19a)](k,W),yield this['getType'](n,C[ny(0x196)],k);const r=_[ny(0x23f)](k,W);!_[ny(0x264)](t)?_['set'](k,W,[r]):(t[ny(0x190)](r),_[ny(0x258)](k,W,t)),i=![];}return R||[];}case'object':{return R=yield this[ny(0x27d)](C,n,k,H),R;}case ny(0x1d8):R=(0x0,utils_1[ny(0x1e8)])(yield this['ask'](n,C,H))||undefined;break;case ny(0x1b6):case ny(0x214):case'integer':default:R=yield this['ask'](n,C,H,k);break;}return!_[ny(0x1ca)](R)&&_[ny(0x258)](k,W,R),R;});}[a7U(0x1e0)](n,C,k,H){var R;return __awaiter(this,void 0x0,void 0x0,function*(){const nT=a7C,W=n[n[nT(0x236)]-0x1],{defaultValue:defaultValue=(R=C===null||C===void 0x0?void 0x0:C[nT(0x245)])!==null&&R!==void 0x0?R:C===null||C===void 0x0?void 0x0:C[nT(0x1ec)],choices:choices=C===null||C===void 0x0?void 0x0:C[nT(0x246)],pagination:i}=yield(0x0,api_helpers_1[nT(0x204)])(W,this['apiClient'],this[nT(0x1ae)],H,this['pathVars'],n);let t=nT(0x217);if(!_[nT(0x1ca)](choices)&&choices['length']>0x0){if(i!==undefined&&i[nT(0x1a4)]!==undefined)t=nT(0x224);else choices[nT(0x236)]>0x4&&typeof choices[0x0]===nT(0x1b6)?t=nT(0x1a5):t=nT(0x198);}else{if((C===null||C===void 0x0?void 0x0:C[nT(0x1fb)])===nT(0x214))t=nT(0x213);else{if((C===null||C===void 0x0?void 0x0:C[nT(0x1fb)])==='integer')t=nT(0x217);else(C===null||C===void 0x0?void 0x0:C[nT(0x1fb)])===nT(0x1d8)&&(t=nT(0x21d));}}let r=k!==![]?!_['isObject'](defaultValue)?defaultValue:JSON['stringify'](defaultValue):_[nT(0x267)](defaultValue)?defaultValue:nT(0x1cd);if(choices)r=r['toString']();_[nT(0x200)](this['resultCache'],n['join']('.'))&&(r=this[nT(0x201)][n[nT(0x221)]('.')]);const M=choices&&k===![]?[nT(0x1cd),...choices]:choices,y=(C===null||C===void 0x0?void 0x0:C['type'])==='integer',T=Object['assign']({'type':t,'name':'id','message':this[nT(0x1c0)](n,C),'choices':M,'default':r,'filter':this[nT(0x248)](t,k),'validate':this['validate'](C,k,y)},i),V=(yield inquirer[nT(0x24d)]([T]))['id'];if(V===nT(0x1cd)||V==='')return undefined;if(y)return parseInt(V,0xa);return V;});}[a7U(0x1c0)](n,C){const nV=a7U,k=(C===null||C===void 0x0?void 0x0:C[nV(0x1fb)])!==nV(0x214)?nV(0x26a):nV(0x253);return this[nV(0x263)](n,k,C===null||C===void 0x0?void 0x0:C[nV(0x21c)]);}[a7U(0x1dd)](){return __awaiter(this,void 0x0,void 0x0,function*(){const nU=a7C,n=C=>__awaiter(this,void 0x0,void 0x0,function*(){const nj=a7C;var k;const H=yield this[nj(0x1bc)][nj(0x198)]['projects']({'options':{'per_page':this[nj(0x24b)],'cursor':C}}),R=H['data']['projects'][nj(0x18c)](W=>W['id']);return{'elements':R,'nextCursor':(k=H[nj(0x1f8)])===null||k===void 0x0?void 0x0:k[nj(0x1e2)]};});return yield this[nU(0x252)](nU(0x18b),n);});}[a7U(0x1a9)](n,C,k,H){return __awaiter(this,void 0x0,void 0x0,function*(){const nh=a7C,R=k||this[nh(0x1bc)][nh(0x192)][nh(0x19f)]();if(_['isUndefined'](R))throw new Error(nh(0x191));const W=yield C(R);return yield this[nh(0x270)](n,W,(H?H+nh(0x218):'')+nh(0x257)+R+'\x27');});}[a7U(0x20d)](n,C,k,H){return __awaiter(this,void 0x0,void 0x0,function*(){const no=a7C,R=k||this[no(0x1bc)]['contextProvider'][no(0x19f)]();if(_[no(0x1ca)](R))throw new Error('Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.');const W=yield C(R);return yield this[no(0x252)](n,W,(H?H+'\x20in\x20':'')+'project:\x20\x27'+R+'\x27');});}[a7U(0x1a0)](){return __awaiter(this,void 0x0,void 0x0,function*(){const nA=a7C,n=yield this[nA(0x1bc)][nA(0x198)][nA(0x1f2)]({}),C=n[nA(0x1b8)][nA(0x1f2)][nA(0x18c)](k=>k[nA(0x1b5)]);return this[nA(0x270)](nA(0x24a),C);});}['askForCredentials'](){return __awaiter(this,void 0x0,void 0x0,function*(){const nd=a7C,n=yield this[nd(0x1bc)][nd(0x198)][nd(0x1e7)]({}),C=n['data'][nd(0x250)][nd(0x18c)](k=>k['id']);return this[nd(0x270)](nd(0x250),C);});}['setPathVars'](n){const nQ=a7U;this[nQ(0x254)]=n;}}exports['InquirerHelper']=InquirerHelper;
1
+ 'use strict';const a7T=a7G;(function(l,G){const o=a7G,s=l();while(!![]){try{const I=parseInt(o(0x1df))/0x1+parseInt(o(0x1c8))/0x2+-parseInt(o(0x247))/0x3*(-parseInt(o(0x1f9))/0x4)+-parseInt(o(0x26e))/0x5+-parseInt(o(0x1d7))/0x6+-parseInt(o(0x258))/0x7*(-parseInt(o(0x1b6))/0x8)+-parseInt(o(0x1c5))/0x9*(parseInt(o(0x1a3))/0xa);if(I===G)break;else s['push'](s['shift']());}catch(z){s['push'](s['shift']());}}}(a7l,0xb51c4));var __createBinding=this&&this[a7T(0x238)]||(Object['create']?function(l,G,s,I){const d=a7T;if(I===undefined)I=s;var z=Object[d(0x1b4)](G,s);(!z||('get'in z?!G['__esModule']:z['writable']||z[d(0x216)]))&&(z={'enumerable':!![],'get':function(){return G[s];}}),Object[d(0x215)](l,I,z);}:function(l,G,s,I){if(I===undefined)I=s;l[I]=G[s];}),__setModuleDefault=this&&this[a7T(0x20e)]||(Object[a7T(0x19e)]?function(l,G){const W=a7T;Object[W(0x215)](l,W(0x212),{'enumerable':!![],'value':G});}:function(l,G){const B=a7T;l[B(0x212)]=G;}),__importStar=this&&this[a7T(0x219)]||function(l){const R=a7T;if(l&&l[R(0x1b3)])return l;var G={};if(l!=null){for(var s in l)if(s!==R(0x212)&&Object[R(0x26d)][R(0x277)][R(0x285)](l,s))__createBinding(G,l,s);}return __setModuleDefault(G,l),G;},__awaiter=this&&this[a7T(0x1d1)]||function(l,G,s,I){function z(X){return X instanceof s?X:new s(function(N){N(X);});}return new(s||(s=Promise))(function(X,N){const J=a7G;function A(p){const y=a7G;try{n(I[y(0x250)](p));}catch(m){N(m);}}function a(p){const K=a7G;try{n(I[K(0x23e)](p));}catch(m){N(m);}}function n(p){const i=a7G;p[i(0x18d)]?X(p[i(0x1d6)]):z(p[i(0x1d6)])['then'](A,a);}n((I=I[J(0x1d8)](l,G||[]))[J(0x250)]());});},__importDefault=this&&this[a7T(0x23f)]||function(l){const Q=a7T;return l&&l[Q(0x1b3)]?l:{'default':l};};Object[a7T(0x215)](exports,a7T(0x1b3),{'value':!![]}),exports['InquirerHelper']=void 0x0;const _=__importStar(require(a7T(0x1f3))),chalk_1=__importDefault(require(a7T(0x23b))),fs=__importStar(require('fs')),utils_1=require(a7T(0x1f4)),api_helpers_1=require(a7T(0x209)),inquirer_pagination_prompt_1=require(a7T(0x1ce)),inquirer=require(a7T(0x24f)),inquirerSearchList=require('inquirer-search-list'),yaml=require('js-yaml');function a7l(){const lR=['default','askForResource','ask','defineProperty','configurable','must\x20be\x20bigger\x20than\x20or\x20equal\x20to\x20','No\x20builds\x20found','__importStar','Unexpected\x20file\x20type:\x20','whiteBright','type','toUpperCase','saveFile','No,\x20but\x20save\x20as\x20file','Writing\x20configuration\x20failed:\x20','Something\x20unexpected\x20happened.','nextPageCursor','bgGrey','secret','domains','volume','backups','message','job\x20runs','What\x27s\x20the\x20','askForProjectScopedResource','addon:\x20\x27','Please\x20confirm\x20following\x20configuration:\x0a','must\x20be\x20a\x20number,\x20is\x20','split','\x20and\x20it\x20','builds','max','service','has','required','job','logSinks','__createBinding','project','askForJobRun','chalk','askArrayEntry','must\x20be\x20smaller\x20than\x20or\x20equal\x20to\x20','throw','__importDefault','.*\x5c.(json|yaml|yml)$','concat','\x20characters,\x20is\x20','Go\x20to\x20editor','array','confirmation','Choose\x20the\x20name\x20of\x20the\x20new\x20local\x20context:','3309087bQMXxr','askForProjectScopedResourcePaginated','Aborted.','writeFileSync','charAt','No,\x20repeat','then','json','inquirer','next','\x20characters','warning','credentials','Choose\x20the\x20login\x20token:','to\x20use:','EDIT','isObject','3045875GrvlqU','get','DynamicReloadPaginationPrompt','domain\x20(','loginPrompt','success','length','addons','jobs','\x20type?','SAVE','pagination','What\x20do\x20you\x20want\x20to\x20use\x20as','project:\x20\x27','askForSubdomain','isEmpty','don\x27t\x20change','must\x20be\x20shorter\x20than\x20or\x20equal\x20to\x20','description','boolean','must\x20be\x20a\x20valid\x20non-empty\x20json\x20string','prototype','2344130JglYXz','askForDomain','askForBuild','Configuration\x20file\x20written\x20to\x20','retry','object','bold',',\x20supported\x20types:\x20[json|yaml|yml]','blue','hasOwnProperty','createdAt','unset','resultCache','items','WARNING:\x20You\x20are\x20about\x20to\x20delete\x20','greenBright','getPathString','cmdPath','filter','editPayload','editedResult','reset','yellowBright','call','for\x20this\x20','data','this\x20option\x20is\x20required,\x20please\x20answer','done','assign','template\x20run','pop','values','isValidJSON','yaml','toString','body','No\x20','nextCursor','subdomains','projects','\x20to\x20use:','askForLogSink','pathVars','\x20(startedAt:\x20','create','\x20in\x20','No,\x20edit','rawObject','askForJob','70PpgnLc','cursor','list','slice','getInnerType','addEntry','askForResourcePaginated','minimum','Choose\x20the\x20','find','askGeneric','templates','isBoolean','fetchResourceList','templateRuns','red','__esModule','getOwnPropertyDescriptor','YES','16CmZJrw','Yes,\x20send','maxLength','repeat','defaultPaginationPageSize','domain','tmpCmdPath','safeLoad','getCurrentProjectName','runs','confirmationPrompt','askForProject','tokenPrompt','job\x20builds','\x20(completedAt:\x20','2272383QgocMs','doesn\x27t\x20match\x20pattern\x20\x27','getType','1085966HOmlLD','isUndefined','main-context','string','Context\x20name\x20already\x20exists.','name','./pagination/inquirer-pagination-prompt','setPathVars','isNaN','__awaiter','example','password','askConfirm','addon','value','1529046KDPmhW','apply','.\x20This\x20is\x20irreversible.\x20Please\x20confirm!','pattern','trim','propToType','getQuestionString','integer','716642iRqHRS','test','deleteWarningPrompt','set','keys','join','job:\x20\x27','\x20(full\x20domain:\x20','minLength','askForVolume','token','search-list','override','grey','services','askForAddon','completedAt','isArray','prompt','askForTemplateRun','lodash','./utils','REPEAT','ABORT','Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.','Provide\x20a\x20file\x20path\x20to\x20write\x20the\x20configuration\x20to\x20(<name>.[json|yaml|yml])','4AsbfRj','No,\x20abort','green','Template\x20id\x20not\x20provided.','opt','Context\x20with\x20name\x20\x27','push','\x27\x20already\x20exists.\x20Do\x20you\x20want\x20to\x20override\x20this\x20context\x20(y)\x20or\x20enter\x20a\x20new\x20name\x20(N)?','volumes','retrievePayloadViaInteractiveCli','validate','pagination-prompt','map','askForTemplate','editor','askForAddonBackup','./api-helpers','apiClient','properties','confirm','input','__setModuleDefault','oneOf','maximum','\x20Example:\x20'];a7l=function(){return lR;};return a7l();}var ConfirmChoices;(function(l){const r=a7T;l[r(0x1b5)]=r(0x1b7),l[r(0x1f5)]=r(0x24c),l[r(0x256)]=r(0x1a0),l[r(0x262)]=r(0x21f),l[r(0x1f6)]=r(0x1fa);}(ConfirmChoices||(ConfirmChoices={})));function a7G(l,G){const s=a7l();return a7G=function(I,z){I=I-0x18d;let X=s[I];return X;},a7G(l,G);}class InquirerHelper{constructor(l){const E=a7T;this['apiClient']=l,this[E(0x1ba)]=0x32,this['editPayload']=G=>__awaiter(this,void 0x0,void 0x0,function*(){const V=E,{editedResult:s}=yield inquirer[V(0x1f1)]([{'type':V(0x207),'name':V(0x282),'message':V(0x243),'default':yaml['safeDump'](G)}]);return yaml[V(0x1bd)](s);}),this[E(0x21e)]=G=>__awaiter(this,void 0x0,void 0x0,function*(){const M=E,s=N=>M(0x21a)+N+M(0x275);function I(){return __awaiter(this,void 0x0,void 0x0,function*(){const e=a7G;return inquirer['prompt']([{'type':e(0x20d),'name':'fileName','message':e(0x1f8),'validate':N=>new RegExp(e(0x240))[e(0x1e0)](N)?!![]:s(N)}]);});}const {fileName:z}=yield I(),X=z[M(0x194)]()[M(0x22f)]('.')[M(0x190)]();try{switch(X){case M(0x24e):(0x0,utils_1['success'])(M(0x271)+z);return fs[M(0x24a)](z,JSON['stringify'](G,null,'\x20\x20'));case M(0x193):case'yml':(0x0,utils_1[M(0x25d)])(M(0x271)+z);return fs[M(0x24a)](z,yaml['safeDump'](G));default:(0x0,utils_1['warning'])(s(X));}}catch(N){(0x0,utils_1[M(0x252)])(M(0x220)+N[M(0x228)]);}return undefined;}),this[E(0x280)]=(G,s)=>I=>{const w=E,z=typeof I==='string'?I[w(0x1db)]():I;return s===![]&&z===w(0x268)?'':z;},this['validate']=(G,s,I)=>z=>{const q=E,X=[];if(z===''||z===q(0x268)){if(s!==![])X[q(0x1ff)](q(0x288));else return!![];}G[q(0x21c)]===q(0x1cb)&&!_[q(0x1c9)](G[q(0x1da)])&&X[q(0x1ff)](new RegExp(G[q(0x1da)])['test'](z)?!![]:q(0x1c6)+G[q(0x1da)]+'\x27');G[q(0x21c)]===q(0x1cb)&&!_[q(0x1c9)](G[q(0x1e7)])&&X[q(0x1ff)](z[q(0x25e)]>=G[q(0x1e7)]?!![]:'must\x20be\x20longer\x20than\x20or\x20equal\x20to\x20'+G['minLength']+q(0x242)+z['length']+q(0x251));G[q(0x21c)]==='string'&&!_[q(0x1c9)](G[q(0x1b8)])&&X[q(0x1ff)](z[q(0x25e)]<=G['maxLength']?!![]:q(0x269)+G['maxLength']+q(0x242)+z[q(0x25e)]+'\x20characters');I&&Number[q(0x1d0)](parseInt(z,0xa))&&X[q(0x1ff)](q(0x22e)+z);G[q(0x21c)]===q(0x1de)&&!_[q(0x1c9)](G[q(0x1aa)])&&X[q(0x1ff)](z>=G['minimum']?!![]:q(0x217)+G[q(0x1aa)]);G[q(0x21c)]===q(0x1de)&&!_[q(0x1c9)](G[q(0x210)])&&X['push'](z<=G[q(0x210)]?!![]:q(0x23d)+G['maximum']);if(G[q(0x21c)]===q(0x1a1)){const a=(0x0,utils_1[q(0x192)])(z);X[q(0x1ff)](a===![]||_[q(0x267)](a)?q(0x26c):!![]);}const N=X['filter'](n=>n!==!![]),A=(G===null||G===void 0x0?void 0x0:G[q(0x1d2)])?'\x0a'+chalk_1[q(0x212)][q(0x1b2)]('>>')+q(0x211)+chalk_1['default'][q(0x21b)](JSON['stringify'](G['example'])):'';return N['length']>0x0?N['join'](chalk_1[q(0x212)]['underline'](q(0x230)))+A:!![];},this[E(0x27e)]=(G,s,I)=>{const O=E,z=G[G[O(0x25e)]-0x1];function X(){const U=O;return G['slice'](0x0,-0x1)[U(0x205)](a=>a[U(0x24b)](0x0)[U(0x21d)]()+a[U(0x1a6)](0x1))[U(0x1e4)]('>');}const N=G['length']>0x1?chalk_1[O(0x212)][O(0x223)][O(0x21b)](X())+':\x20':'',A=I?'\x20('+chalk_1[O(0x212)][O(0x276)](I)+')':'';return chalk_1[O(0x212)][O(0x283)](''+N+s+'\x20'+chalk_1[O(0x212)][O(0x274)][O(0x27d)](z)+A+'?');},this[E(0x213)]=(G,s,I)=>__awaiter(this,void 0x0,void 0x0,function*(){const Z=E;if(s['length']<0x1){const N=I?Z(0x286)+I:'found';throw new Error('No\x20'+G+'\x20'+N+'.');}const z=Z(0x1ab)+G+Z(0x19a),X=s[Z(0x25e)]>0x4?Z(0x1ea):Z(0x1a5);return(yield inquirer['prompt']([{'type':X,'name':Z(0x1cd),'message':z,'choices':s}]))['name'];}),this[E(0x1a9)]=(G,s,I)=>__awaiter(this,void 0x0,void 0x0,function*(){const v=E,{elements:z,nextCursor:X}=yield s();if(z[v(0x25e)]<0x1){const a=I?v(0x286)+I:'found';throw new Error(v(0x196)+G+'\x20'+a+'.');}const N=v(0x1ab)+G+v(0x19a);if(X!==undefined){const n=({nextPageCursor:p})=>__awaiter(this,void 0x0,void 0x0,function*(){const S=v,m=yield s(p);return{'elements':m['elements'],'nextPageCursor':m[S(0x197)]};});return(yield inquirer[v(0x1f1)]([{'type':v(0x204),'name':v(0x1cd),'message':N,'choices':z,'nextPageCursor':X,'loadMore':n}]))['name'];}const A=z['length']>0x4?v(0x1ea):v(0x1a5);return(yield inquirer[v(0x1f1)]([{'type':A,'name':v(0x1cd),'message':N,'choices':z}]))[v(0x1cd)];}),this[E(0x1ad)]=(G,s)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const g=E,I=''+(s?'('+chalk_1[g(0x212)]['blue'](s)+')\x20':''),z='Enter\x20the\x20'+chalk_1['default'][g(0x1fb)](G)+'\x20'+I+g(0x255),X=this[g(0x203)]({'type':'string','required':!![]});return(yield inquirer[g(0x1f1)]([{'type':g(0x20d),'name':g(0x1cd),'message':z,'validate':X}]))['name'];}),this[E(0x1d4)]=G=>__awaiter(this,void 0x0,void 0x0,function*(){const j=E;return(yield inquirer['prompt']([{'type':j(0x20c),'name':j(0x1cd),'message':G,'default':!![]}]))[j(0x1cd)];}),this['askForService']=G=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const f=E,s=I=>z=>__awaiter(this,void 0x0,void 0x0,function*(){const C=a7G;var X;const N=yield this['apiClient'][C(0x1a5)][C(0x1ed)]({'parameters':{'projectId':I},'options':{'per_page':this[C(0x1ba)],'cursor':z}}),A=N[C(0x287)]['services'][C(0x205)](a=>a['id']);return{'elements':A,'nextCursor':(X=N[C(0x263)])===null||X===void 0x0?void 0x0:X[C(0x1a4)]};});return this[f(0x248)](f(0x233),s,G);}),this[E(0x206)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const G=s=>__awaiter(this,void 0x0,void 0x0,function*(){const h=a7G;var I;const z=yield this[h(0x20a)][h(0x1a5)][h(0x1ae)]({'options':{'per_page':this['defaultPaginationPageSize'],'cursor':s}}),X=z[h(0x287)]['templates'][h(0x205)](N=>N['id']);return{'elements':X,'nextCursor':(I=z[h(0x263)])===null||I===void 0x0?void 0x0:I[h(0x1a4)]};});return this['askForResourcePaginated']('template',G);}),this[E(0x1f2)]=G=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const F=E;if(_[F(0x1c9)](G))throw new Error(F(0x1fc));const s=I=>__awaiter(this,void 0x0,void 0x0,function*(){const P=F;var z;let X=this[P(0x1ba)];const N=yield this['apiClient'][P(0x1a5)][P(0x1b1)]({'parameters':{'templateId':G},'options':{'per_page':X,'cursor':I}}),A=N[P(0x287)][P(0x1b1)]['map'](a=>a['id']+'\x20(startedAt:\x20'+a['createdAt']+')');return{'elements':A,'nextCursor':(z=N['pagination'])===null||z===void 0x0?void 0x0:z[P(0x1a4)]};});return this[F(0x1a9)](F(0x18f),s)[F(0x24d)](I=>I[F(0x22f)]('\x20')[0x0]);}),this[E(0x19b)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const G=s=>__awaiter(this,void 0x0,void 0x0,function*(){const L=a7G;var I;let z=this['defaultPaginationPageSize'];const X=yield this['apiClient']['list'][L(0x237)]({'options':{'per_page':z,'cursor':s}}),N=X[L(0x287)]['logSinks'][L(0x205)](A=>A['id']);return{'elements':N,'nextCursor':(I=X[L(0x263)])===null||I===void 0x0?void 0x0:I[L(0x1a4)]};});return this['askForResourcePaginated']('log\x20sink',G);}),this[E(0x1a2)]=G=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Y=E,s=I=>z=>__awaiter(this,void 0x0,void 0x0,function*(){const k=a7G;var X;const N=yield this['apiClient'][k(0x1a5)][k(0x260)]({'parameters':{'projectId':I},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':z}}),A=N[k(0x287)][k(0x260)][k(0x205)](a=>a['id']);return{'elements':A,'nextCursor':(X=N[k(0x263)])===null||X===void 0x0?void 0x0:X[k(0x1a4)]};});return this['askForProjectScopedResourcePaginated'](Y(0x236),s,G);}),this[E(0x23a)]=(G,s)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const u=E,I=z=>X=>__awaiter(this,void 0x0,void 0x0,function*(){const x=a7G;var N;const A=yield this['apiClient'][x(0x259)][x(0x236)][x(0x1bf)]({'parameters':{'projectId':z,'jobId':G},'options':{'per_page':this[x(0x1ba)],'cursor':X}}),a=A[x(0x287)][x(0x1bf)][x(0x205)](n=>n['id']+x(0x19d)+n['startedAt']+')');return{'elements':a,'nextCursor':(N=A[x(0x263)])===null||N===void 0x0?void 0x0:N[x(0x1a4)]};});return this[u(0x248)](u(0x229),I,s,u(0x1e5)+G+'\x27')['then'](z=>z[u(0x22f)]('\x20')[0x0]);}),this[E(0x270)]=(G,s,I)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const t=E;if(I!==undefined){const z=X=>N=>__awaiter(this,void 0x0,void 0x0,function*(){const b=a7G;var A;const a=yield this[b(0x20a)]['get'][b(0x236)][b(0x231)]({'parameters':{'projectId':X,'jobId':I},'options':{'per_page':this[b(0x1ba)],'cursor':N}});return{'elements':a[b(0x287)][b(0x231)][b(0x205)](n=>n['id']+b(0x19d)+n[b(0x278)]+')'),'nextCursor':(A=a[b(0x263)])===null||A===void 0x0?void 0x0:A['cursor']};});return this[t(0x248)](t(0x1c3),z,G,t(0x1e5)+I+'\x27')['then'](X=>X['split']('\x20')[0x0]);}if(s!==undefined){const X=N=>A=>__awaiter(this,void 0x0,void 0x0,function*(){const H=t;var a;const n=yield this['apiClient'][H(0x259)]['service']['builds']({'parameters':{'projectId':N,'serviceId':s},'options':{'per_page':this[H(0x1ba)],'cursor':A}});return{'elements':n[H(0x287)][H(0x231)][H(0x205)](p=>p['id']+H(0x19d)+p[H(0x278)]+')'),'nextCursor':(a=n[H(0x263)])===null||a===void 0x0?void 0x0:a[H(0x1a4)]};});return this[t(0x248)]('job\x20build',X,G,'service:\x20\x27'+I+'\x27')[t(0x24d)](N=>N['split']('\x20')[0x0]);}throw new Error(t(0x218));}),this[E(0x1ee)]=G=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const l1=E,s=I=>z=>__awaiter(this,void 0x0,void 0x0,function*(){const l0=a7G;var X;const N=yield this['apiClient'][l0(0x1a5)][l0(0x25f)]({'parameters':{'projectId':I},'options':{'per_page':this[l0(0x1ba)],'cursor':z}});return{'elements':N[l0(0x287)][l0(0x25f)]['map'](A=>A['id']),'nextCursor':(X=N[l0(0x263)])===null||X===void 0x0?void 0x0:X['cursor']};});return this[l1(0x248)](l1(0x1d5),s,G);}),this[E(0x208)]=(G,s)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const l3=E,I=z=>X=>__awaiter(this,void 0x0,void 0x0,function*(){const l2=a7G;var N;const A=yield this[l2(0x20a)][l2(0x259)][l2(0x1d5)]['backups']({'parameters':{'projectId':z,'addonId':s},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':X}});return{'elements':A['data'][l2(0x227)][l2(0x205)](a=>a['id']+l2(0x1c4)+(a[l2(0x1ef)]||'not\x20completed')+')'),'nextCursor':(N=A[l2(0x263)])===null||N===void 0x0?void 0x0:N['cursor']};});return this[l3(0x248)]('backups',I,G,l3(0x22c)+s+'\x27')['then'](z=>z['split']('\x20')[0x0]);}),this[E(0x1e8)]=G=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const l5=E,s=I=>__awaiter(this,void 0x0,void 0x0,function*(){const l4=a7G;return(yield this['apiClient'][l4(0x1a5)][l4(0x201)]({'parameters':{'projectId':I}}))[l4(0x287)][l4(0x205)](z=>z['id']);});return this[l5(0x22b)](l5(0x226),s,G);}),this['askForSecret']=G=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const l7=E,s=I=>z=>__awaiter(this,void 0x0,void 0x0,function*(){const l6=a7G;var X;const N=yield this[l6(0x20a)][l6(0x1a5)]['secrets']({'parameters':{'projectId':I},'options':{'per_page':this[l6(0x1ba)],'cursor':z}});return{'elements':N[l6(0x287)]['secrets'][l6(0x205)](A=>A['id']),'nextCursor':(X=N[l6(0x263)])===null||X===void 0x0?void 0x0:X[l6(0x1a4)]};});return this[l7(0x248)](l7(0x224),s,G);}),this[E(0x266)]=G=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const l8=E,s=yield this[l8(0x20a)][l8(0x259)][l8(0x1bb)]({'parameters':{'domain':G}}),I=s[l8(0x287)][l8(0x198)][l8(0x205)](X=>X['name']+l8(0x1e6)+X['fullName']+')'),z=l8(0x25b)+G+')';return this['askForResource']('subdomain',I,z)['then'](X=>X[l8(0x22f)]('\x20')[0x0]);}),this[E(0x1e1)]=G=>__awaiter(this,void 0x0,void 0x0,function*(){const l9=E;return(yield inquirer['prompt']([{'type':'confirm','name':l9(0x245),'message':chalk_1[l9(0x212)][l9(0x284)](l9(0x27c)+(G||'a\x20Northflank\x20resource')+l9(0x1d9)),'default':![]}]))[l9(0x245)];}),this[E(0x25c)]=(G,s)=>__awaiter(this,void 0x0,void 0x0,function*(){const ll=E;_[ll(0x1c9)](G[ll(0x1cd)])&&(s[ll(0x25e)]<=0x0?_[ll(0x1e2)](G,ll(0x1cd),ll(0x212)):yield(0x0,utils_1[ll(0x272)])(0xa)(()=>__awaiter(this,void 0x0,void 0x0,function*(){const lG=ll,{name:I}=yield inquirer[lG(0x1f1)]([{'type':lG(0x20d),'name':lG(0x1cd),'message':lG(0x246),'default':lG(0x1ca)}]);if(!G[lG(0x1eb)]&&s[lG(0x1ac)](z=>z[lG(0x1cd)]===I)){const {c:z}=yield inquirer[lG(0x1f1)]([{'type':lG(0x20c),'name':'c','message':lG(0x1fe)+I+lG(0x200),'default':![]}]);if(z===![])throw new Error(lG(0x1cc));_[lG(0x1e2)](G,lG(0x1eb),!![]);}_['set'](G,lG(0x1cd),I);})));if(_[ll(0x1c9)](G[ll(0x1e9)])){const I=yield this[ll(0x1c2)]();_['set'](G,'token',I);}return G;}),this[E(0x1c2)]=()=>__awaiter(this,void 0x0,void 0x0,function*(){const ls=E,{token:G}=yield inquirer[ls(0x1f1)]([{'type':ls(0x1d3),'name':ls(0x1e9),'mask':'*','message':ls(0x254)}]);return G;}),inquirer['registerPrompt'](E(0x1ea),inquirerSearchList),inquirer['registerPrompt'](E(0x204),inquirer_pagination_prompt_1[E(0x25a)]);}[a7T(0x1c0)](l,G){return __awaiter(this,void 0x0,void 0x0,function*(){const lI=a7G,s=yaml['safeDump'](l),I=_[lI(0x232)](s[lI(0x22f)]('\x0a')['map'](N=>N[lI(0x25e)])),z=chalk_1['default'][lI(0x1ec)]('-'[lI(0x1b9)](I)+'\x0a'),{confirm:X}=yield inquirer[lI(0x1f1)]([{'type':lI(0x1a5),'name':'confirm','message':''+chalk_1['default'][lI(0x274)][lI(0x1fb)](lI(0x22d))+z+chalk_1[lI(0x212)]['blueBright'](s)+z,'choices':Object[lI(0x191)](ConfirmChoices)}]);switch(X){case ConfirmChoices['YES']:return l;case ConfirmChoices['ABORT']:throw new Error(lI(0x249));case ConfirmChoices[lI(0x1f5)]:return this['retrievePayloadViaInteractiveCli'](G);case ConfirmChoices[lI(0x256)]:return this[lI(0x1c0)](yield this[lI(0x281)](l),G);case ConfirmChoices[lI(0x262)]:yield this['saveFile'](l);return this[lI(0x1c0)](l,G);default:throw new Error(lI(0x221));}});}[a7T(0x202)](l,G){return __awaiter(this,void 0x0,void 0x0,function*(){const lz=a7G;if((G===null||G===void 0x0?void 0x0:G[lz(0x27a)])!==undefined)this[lz(0x27a)]=G===null||G===void 0x0?void 0x0:G[lz(0x27a)];this['tmpCmdPath']=G===null||G===void 0x0?void 0x0:G[lz(0x27f)];const s={};return yield this['propToType']([],l[lz(0x1fd)][lz(0x195)],s),this[lz(0x27a)]=s,yield this['confirmationPrompt'](s,l);});}[a7T(0x1dc)](l,G,s,I){return __awaiter(this,void 0x0,void 0x0,function*(){const lX=a7G;let z;if(G[lX(0x20f)]&&!_[lX(0x234)](G,'properties')){if(G[lX(0x20f)][lX(0x25e)]>0x1){const {choice:X}=yield inquirer[lX(0x1f1)]([{'type':lX(0x1a5),'name':'choice','message':lX(0x22a)+(l[l[lX(0x25e)]-0x1]||'')+lX(0x261),'choices':G[lX(0x20f)][lX(0x205)](N=>{var A;return(A=N['description'])!==null&&A!==void 0x0?A:'??';})}]);z=yield this[lX(0x1c7)](l,G['oneOf'][lX(0x1ac)](N=>N[lX(0x26a)]===X),s,I);}else{const N=G['oneOf'][0x0];_[lX(0x1e2)](N,'description',G[lX(0x26a)]),z=yield this[lX(0x1c7)](l,N,s,I);}z={};}else z=yield this[lX(0x1c7)](l,G,s,I);return z;});}[a7T(0x1a7)](l,G,s,I){var z;return __awaiter(this,void 0x0,void 0x0,function*(){const lN=a7G;if(I===![]){const {addEntry:A}=yield inquirer['prompt']([{'type':lN(0x20c),'name':lN(0x1a8),'message':this[lN(0x27e)](G,'Do\x20you\x20want\x20to\x20add',l===null||l===void 0x0?void 0x0:l[lN(0x26a)]),'default':![]}]);if(!A)return s;}const X=Object[lN(0x1e3)]((z=l===null||l===void 0x0?void 0x0:l[lN(0x20b)])!==null&&z!==void 0x0?z:[]),N=l[lN(0x235)]||[];if(X[lN(0x25e)]>0x0)for(const a of X){const n=G[lN(0x241)](a);if(G[lN(0x25e)]>0x0&&!_['has'](s,G['join']('.')))_[lN(0x1e2)](s,G[lN(0x1e4)]('.'),{});yield this['propToType'](n,l[lN(0x20b)][a],s,N['includes'](a));}else yield this['getType'](G,Object['assign'](Object[lN(0x18e)]({},l),{'type':lN(0x1a1)}),s,I);return s;});}[a7T(0x23c)](l,G,s,I){return __awaiter(this,void 0x0,void 0x0,function*(){const lA=a7G;if(G&&s)return!![];const z=G?'Do\x20you\x20want\x20to\x20add':'Do\x20you\x20want\x20to\x20add\x20more',{addEntry:X}=yield inquirer[lA(0x1f1)]([{'type':'confirm','name':lA(0x1a8),'message':this['getPathString'](l,z,G?I:undefined),'default':![]}]);return X;});}['getType'](l,G,s,I){return __awaiter(this,void 0x0,void 0x0,function*(){const la=a7G;let z;const X=l['join']('.');switch(G===null||G===void 0x0?void 0x0:G['type']){case la(0x244):{let N=!![];while(yield this[la(0x23c)](l,N,I,G===null||G===void 0x0?void 0x0:G['description'])){const A=_[la(0x259)](s,X);_[la(0x279)](s,X),yield this['getType'](l,G[la(0x27b)],s);const a=_[la(0x259)](s,X);!_[la(0x1f0)](A)?_[la(0x1e2)](s,X,[a]):(A[la(0x1ff)](a),_['set'](s,X,A)),N=![];}return z||[];}case la(0x273):{return z=yield this['getInnerType'](G,l,s,I),z;}case'rawObject':z=(0x0,utils_1[la(0x192)])(yield this[la(0x214)](l,G,I))||undefined;break;case la(0x1cb):case'boolean':case la(0x1de):default:z=yield this[la(0x214)](l,G,I,s);break;}return!_[la(0x1c9)](z)&&_['set'](s,X,z),z;});}['ask'](l,G,s,I){var z;return __awaiter(this,void 0x0,void 0x0,function*(){const ln=a7G,X=l[l[ln(0x25e)]-0x1],{defaultValue:defaultValue=(z=G===null||G===void 0x0?void 0x0:G[ln(0x1d2)])!==null&&z!==void 0x0?z:G===null||G===void 0x0?void 0x0:G['default'],choices:choices=G===null||G===void 0x0?void 0x0:G['enum'],pagination:N}=yield(0x0,api_helpers_1[ln(0x1b0)])(X,this[ln(0x20a)],this[ln(0x1bc)],I,this[ln(0x19c)],l);let A=ln(0x20d);if(!_[ln(0x1c9)](choices)&&choices['length']>0x0){if(N!==undefined&&N[ln(0x222)]!==undefined)A=ln(0x204);else choices['length']>0x4&&typeof choices[0x0]===ln(0x1cb)?A=ln(0x1ea):A=ln(0x1a5);}else{if((G===null||G===void 0x0?void 0x0:G[ln(0x21c)])===ln(0x26b))A=ln(0x20c);else{if((G===null||G===void 0x0?void 0x0:G[ln(0x21c)])===ln(0x1de))A=ln(0x20d);else(G===null||G===void 0x0?void 0x0:G['type'])==='rawObject'&&(A=ln(0x207));}}let a=s!==![]?!_[ln(0x257)](defaultValue)?defaultValue:JSON['stringify'](defaultValue):_[ln(0x1af)](defaultValue)?defaultValue:ln(0x268);if(choices)a=a['toString']();_[ln(0x234)](this[ln(0x27a)],l[ln(0x1e4)]('.'))&&(a=this[ln(0x27a)][l[ln(0x1e4)]('.')]);const n=choices&&s===![]?['don\x27t\x20change',...choices]:choices,p=(G===null||G===void 0x0?void 0x0:G[ln(0x21c)])==='integer',m=Object[ln(0x18e)]({'type':A,'name':'id','message':this[ln(0x1dd)](l,G),'choices':n,'default':a,'filter':this[ln(0x280)](A,s),'validate':this[ln(0x203)](G,s,p)},N),D=(yield inquirer[ln(0x1f1)]([m]))['id'];if(D===ln(0x268)||D==='')return undefined;if(p)return parseInt(D,0xa);return D;});}[a7T(0x1dd)](l,G){const lp=a7T,s=(G===null||G===void 0x0?void 0x0:G[lp(0x21c)])!=='boolean'?lp(0x264):'Should\x20it\x20be';return this[lp(0x27e)](l,s,G===null||G===void 0x0?void 0x0:G[lp(0x26a)]);}[a7T(0x1c1)](){return __awaiter(this,void 0x0,void 0x0,function*(){const lD=a7G,l=G=>__awaiter(this,void 0x0,void 0x0,function*(){const lm=a7G;var s;const I=yield this['apiClient'][lm(0x1a5)][lm(0x199)]({'options':{'per_page':this[lm(0x1ba)],'cursor':G}}),z=I[lm(0x287)][lm(0x199)]['map'](X=>X['id']);return{'elements':z,'nextCursor':(s=I[lm(0x263)])===null||s===void 0x0?void 0x0:s[lm(0x1a4)]};});return yield this[lD(0x1a9)](lD(0x239),l);});}[a7T(0x22b)](l,G,s,I){return __awaiter(this,void 0x0,void 0x0,function*(){const lo=a7G,z=s||this[lo(0x20a)]['contextProvider'][lo(0x1be)]();if(_['isUndefined'](z))throw new Error('Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.');const X=yield G(z);return yield this[lo(0x213)](l,X,(I?I+lo(0x19f):'')+lo(0x265)+z+'\x27');});}['askForProjectScopedResourcePaginated'](l,G,s,I){return __awaiter(this,void 0x0,void 0x0,function*(){const lT=a7G,z=s||this['apiClient']['contextProvider']['getCurrentProjectName']();if(_[lT(0x1c9)](z))throw new Error(lT(0x1f7));const X=yield G(z);return yield this['askForResourcePaginated'](l,X,(I?I+lT(0x19f):'')+lT(0x265)+z+'\x27');});}[a7T(0x26f)](){return __awaiter(this,void 0x0,void 0x0,function*(){const ld=a7G,l=yield this[ld(0x20a)]['list'][ld(0x225)]({}),G=l['data']['domains'][ld(0x205)](s=>s[ld(0x1cd)]);return this['askForResource'](ld(0x1bb),G);});}['askForCredentials'](){return __awaiter(this,void 0x0,void 0x0,function*(){const lW=a7G,l=yield this[lW(0x20a)][lW(0x1a5)]['registries']({}),G=l[lW(0x287)][lW(0x253)][lW(0x205)](s=>s['id']);return this[lW(0x213)](lW(0x253),G);});}[a7T(0x1cf)](l){const lB=a7T;this[lB(0x19c)]=l;}}exports['InquirerHelper']=InquirerHelper;
@@ -1 +1 @@
1
- 'use strict';const a8K=a8C;function a8C(n,C){const k=a8n();return a8C=function(H,R){H=H-0x117;let W=k[H];return W;},a8C(n,C);}(function(n,C){const l=a8C,k=n();while(!![]){try{const H=parseInt(l(0x13c))/0x1+-parseInt(l(0x149))/0x2+parseInt(l(0x11d))/0x3+-parseInt(l(0x14c))/0x4+parseInt(l(0x13e))/0x5*(-parseInt(l(0x14d))/0x6)+-parseInt(l(0x14e))/0x7*(parseInt(l(0x118))/0x8)+parseInt(l(0x152))/0x9;if(H===C)break;else k['push'](k['shift']());}catch(R){k['push'](k['shift']());}}}(a8n,0x9da44));var __createBinding=this&&this[a8K(0x156)]||(Object[a8K(0x157)]?function(n,C,H,R){const m=a8K;if(R===undefined)R=H;var W=Object[m(0x155)](C,H);(!W||('get'in W?!C[m(0x150)]:W[m(0x11b)]||W[m(0x13a)]))&&(W={'enumerable':!![],'get':function(){return C[H];}}),Object[m(0x123)](n,R,W);}:function(n,C,H,R){if(R===undefined)R=H;n[R]=C[H];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(n,C){const a=a8K;Object[a(0x123)](n,a(0x148),{'enumerable':!![],'value':C});}:function(n,C){const N=a8K;n[N(0x148)]=C;}),__importStar=this&&this[a8K(0x12b)]||function(n){const X=a8K;if(n&&n[X(0x150)])return n;var C={};if(n!=null){for(var H in n)if(H!==X(0x148)&&Object[X(0x124)]['hasOwnProperty'][X(0x12d)](n,H))__createBinding(C,n,H);}return __setModuleDefault(C,n),C;},__awaiter=this&&this[a8K(0x143)]||function(n,C,k,H){function R(W){return W instanceof k?W:new k(function(i){i(W);});}return new(k||(k=Promise))(function(W,i){const c=a8C;function t(y){const E=a8C;try{M(H[E(0x128)](y));}catch(T){i(T);}}function r(y){try{M(H['throw'](y));}catch(T){i(T);}}function M(y){const g=a8C;y[g(0x153)]?W(y[g(0x154)]):R(y[g(0x154)])['then'](t,r);}M((H=H[c(0x138)](n,C||[]))['next']());});},__importDefault=this&&this[a8K(0x139)]||function(n){return n&&n['__esModule']?n:{'default':n};};function a8n(){const S=['Failure\x20during\x20login:\x20','init','apply','__importDefault','configurable','finally','94487nmzRYe','unable\x20to\x20parse\x20message:\x20','820sQEUtl','open','data','end','stringify','__awaiter','login-success','catch','initPackage','Failed\x20to\x20establish\x20connection\x20to\x20command\x20execution\x20proxy:\x20','default','290458yaqKBt','message','wss:','580420DxYNAL','27942mQlOHo','35xXKWue','SIGINT','__esModule','EventEmitter','18091989daukHk','done','value','getOwnPropertyDescriptor','__createBinding','create','init-ack','1978696UjpTPb','baseUrl','status','writable','aborted','2495277uAsIse','replace','Unable\x20to\x20open\x20browser:\x20','http:','NorthflankApiBrowserLogin','handleError','defineProperty','prototype','success','error','openBrowser','next','/v1/cli-login','idle','__importStar','type','call','Unexpected\x20response','startLogin','duplex','emit','removeListener','createWebSocketStream','error\x20happened\x20during\x20browser\x20login:\x20','ws:'];a8n=function(){return S;};return a8n();}Object[a8K(0x123)](exports,'__esModule',{'value':!![]}),exports[a8K(0x121)]=void 0x0;const ws_1=__importStar(require('ws')),open_1=__importDefault(require(a8K(0x13f))),events_1=require('events');class NorthflankApiBrowserLogin extends events_1[a8K(0x151)]{constructor(n,C=!![]){const b=a8K;super(),this[b(0x119)]=n,this[b(0x127)]=C,this[b(0x11a)]=b(0x12a),this[b(0x146)]=()=>JSON[b(0x142)]({'type':b(0x137)});}[a8K(0x12f)](){const L=a8K;var n;const C=this[L(0x119)][L(0x11e)]('https:',L(0x14b))[L(0x11e)](L(0x120),L(0x135)),k=C+L(0x129),H=new ws_1['default'](k),R=()=>__awaiter(this,void 0x0,void 0x0,function*(){yield new Promise(i=>{const G=a8C;var t;(t=this[G(0x130)])===null||t===void 0x0?void 0x0:t[G(0x141)](JSON[G(0x142)]({'type':G(0x11c)}),()=>i());}),process['exit']();}),W=new Promise((i,t)=>{const Z=L;var r,M,y;try{this[Z(0x130)]=(0x0,ws_1[Z(0x133)])(H),process['on'](Z(0x14f),R);}catch(T){t(new Error(Z(0x147)+T[Z(0x14a)]));}(r=this[Z(0x130)])===null||r===void 0x0?void 0x0:r['on'](Z(0x140),V=>{const q=Z;var j;const U=JSON['parse'](V['toString']());switch(U===null||U===void 0x0?void 0x0:U[q(0x12c)]){case q(0x117):{const {loginPage:h}=U;if(h===undefined){this['handleError'](q(0x12e),t);return;}this[q(0x127)]&&(0x0,open_1[q(0x148)])(h)[q(0x145)](o=>{const w=q,A=w(0x11f)+o['message'];this[w(0x122)](A,t);});this[q(0x131)]('browser-opened',{'url':h});break;}case q(0x144):{const {apiToken:o,contextName:A}=U;if(o===undefined){this[q(0x122)]('Unexpected\x20response,\x20api\x20token\x20missing',t);return;}(j=this['duplex'])===null||j===void 0x0?void 0x0:j[q(0x141)](),i({'token':o,'contextName':A}),this[q(0x11a)]='success';break;}case'login-failure':{const d=q(0x136)+(U===null||U===void 0x0?void 0x0:U['message']);this[q(0x122)](d,t);break;}default:{const Q=q(0x13d)+JSON['stringify'](U);this[q(0x122)](Q,t);}}}),(M=this[Z(0x130)])===null||M===void 0x0?void 0x0:M['on']('error',V=>{const O=Z;this[O(0x122)](O(0x134)+V[O(0x14a)],t);}),(y=this['duplex'])===null||y===void 0x0?void 0x0:y['on'](Z(0x141),()=>{const F=Z;if(this[F(0x11a)]===F(0x125)){}else this[F(0x122)]('Login\x20process\x20stopped\x20before\x20completed',t);});});return(n=this[L(0x130)])===null||n===void 0x0?void 0x0:n['write'](this['initPackage']()),this[L(0x11a)]=L(0x137),W[L(0x13b)](()=>{const D=L;process[D(0x132)](D(0x14f),R);});}[a8K(0x122)](n,C){const Y=a8K;var k,H;C?(k=this['duplex'])===null||k===void 0x0?void 0x0:k['end'](()=>C(new Error(n))):(H=this[Y(0x130)])===null||H===void 0x0?void 0x0:H[Y(0x141)](),this[Y(0x11a)]=Y(0x126);}}exports[a8K(0x121)]=NorthflankApiBrowserLogin;
1
+ 'use strict';const a8i=a8G;function a8l(){const P=['SIGINT','call','20XEPfmo','__importDefault','createWebSocketStream','Unexpected\x20response','aborted','6879645LQodAX','4474360pdVkoj','getOwnPropertyDescriptor','removeListener','stringify','then','NorthflankApiBrowserLogin','events','success','hasOwnProperty','6831544FjslGv','throw','parse','http:','Unable\x20to\x20open\x20browser:\x20','96qLHDaP','unable\x20to\x20parse\x20message:\x20','startLogin','create','value','init','configurable','emit','idle','wss:','75jKYWdu','4884fVorVH','EventEmitter','initPackage','handleError','Failure\x20during\x20login:\x20','error','__createBinding','baseUrl','message','write','login-success','type','end','6458023ukWMZg','apply','https:','prototype','get','openBrowser','6906ItIUpE','exit','1563fDeBlf','next','replace','data','default','finally','/v1/cli-login','__esModule','17164sVtKYi','defineProperty','status','__awaiter','duplex','login-failure'];a8l=function(){return P;};return a8l();}(function(l,G){const K=a8G,s=l();while(!![]){try{const I=parseInt(K(0x1cb))/0x1*(parseInt(K(0x1df))/0x2)+parseInt(K(0x1e1))/0x3*(parseInt(K(0x1cc))/0x4)+parseInt(K(0x1b3))/0x5+-parseInt(K(0x1c1))/0x6*(parseInt(K(0x1e9))/0x7)+-parseInt(K(0x1bc))/0x8+parseInt(K(0x1f6))/0x9+-parseInt(K(0x1f1))/0xa*(parseInt(K(0x1d9))/0xb);if(I===G)break;else s['push'](s['shift']());}catch(z){s['push'](s['shift']());}}}(a8l,0x76e78));function a8G(l,G){const s=a8l();return a8G=function(I,z){I=I-0x1b3;let X=s[I];return X;},a8G(l,G);}var __createBinding=this&&this[a8i(0x1d2)]||(Object[a8i(0x1c4)]?function(l,G,s,I){const J=a8i;if(I===undefined)I=s;var z=Object[J(0x1b4)](G,s);(!z||(J(0x1dd)in z?!G['__esModule']:z['writable']||z[J(0x1c7)]))&&(z={'enumerable':!![],'get':function(){return G[s];}}),Object['defineProperty'](l,I,z);}:function(l,G,s,I){if(I===undefined)I=s;l[I]=G[s];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a8i(0x1c4)]?function(l,G){const Q=a8i;Object[Q(0x1ea)](l,Q(0x1e5),{'enumerable':!![],'value':G});}:function(l,G){const r=a8i;l[r(0x1e5)]=G;}),__importStar=this&&this['__importStar']||function(l){const E=a8i;if(l&&l['__esModule'])return l;var G={};if(l!=null){for(var s in l)if(s!==E(0x1e5)&&Object[E(0x1dc)][E(0x1bb)][E(0x1f0)](l,s))__createBinding(G,l,s);}return __setModuleDefault(G,l),G;},__awaiter=this&&this[a8i(0x1ec)]||function(l,G,s,I){function z(X){return X instanceof s?X:new s(function(N){N(X);});}return new(s||(s=Promise))(function(X,N){const w=a8G;function A(p){const V=a8G;try{n(I[V(0x1e2)](p));}catch(m){N(m);}}function a(p){const M=a8G;try{n(I[M(0x1bd)](p));}catch(m){N(m);}}function n(p){const e=a8G;p['done']?X(p[e(0x1c5)]):z(p[e(0x1c5)])[e(0x1b7)](A,a);}n((I=I[w(0x1da)](l,G||[]))[w(0x1e2)]());});},__importDefault=this&&this[a8i(0x1f2)]||function(l){const q=a8i;return l&&l[q(0x1e8)]?l:{'default':l};};Object[a8i(0x1ea)](exports,a8i(0x1e8),{'value':!![]}),exports[a8i(0x1b8)]=void 0x0;const ws_1=__importStar(require('ws')),open_1=__importDefault(require('open')),events_1=require(a8i(0x1b9));class NorthflankApiBrowserLogin extends events_1[a8i(0x1cd)]{constructor(l,G=!![]){const O=a8i;super(),this[O(0x1d3)]=l,this['openBrowser']=G,this[O(0x1eb)]=O(0x1c9),this[O(0x1ce)]=()=>JSON[O(0x1b6)]({'type':'init'});}[a8i(0x1c3)](){const U=a8i;var l;const G=this[U(0x1d3)][U(0x1e3)](U(0x1db),U(0x1ca))['replace'](U(0x1bf),'ws:'),s=G+U(0x1e7),I=new ws_1[(U(0x1e5))](s),z=()=>__awaiter(this,void 0x0,void 0x0,function*(){const v=U;yield new Promise(N=>{const Z=a8G;var A;(A=this[Z(0x1ed)])===null||A===void 0x0?void 0x0:A[Z(0x1d8)](JSON[Z(0x1b6)]({'type':Z(0x1f5)}),()=>N());}),process[v(0x1e0)]();}),X=new Promise((N,A)=>{const S=U;var a,n,p;try{this[S(0x1ed)]=(0x0,ws_1[S(0x1f3)])(I),process['on']('SIGINT',z);}catch(m){A(new Error('Failed\x20to\x20establish\x20connection\x20to\x20command\x20execution\x20proxy:\x20'+m[S(0x1d4)]));}(a=this[S(0x1ed)])===null||a===void 0x0?void 0x0:a['on'](S(0x1e4),D=>{const g=S;var o;const T=JSON[g(0x1be)](D['toString']());switch(T===null||T===void 0x0?void 0x0:T[g(0x1d7)]){case'init-ack':{const {loginPage:d}=T;if(d===undefined){this[g(0x1cf)](g(0x1f4),A);return;}this[g(0x1de)]&&(0x0,open_1[g(0x1e5)])(d)['catch'](W=>{const j=g,B=j(0x1c0)+W[j(0x1d4)];this[j(0x1cf)](B,A);});this[g(0x1c8)]('browser-opened',{'url':d});break;}case g(0x1d6):{const {apiToken:W,contextName:B}=T;if(W===undefined){this[g(0x1cf)]('Unexpected\x20response,\x20api\x20token\x20missing',A);return;}(o=this[g(0x1ed)])===null||o===void 0x0?void 0x0:o[g(0x1d8)](),N({'token':W,'contextName':B}),this[g(0x1eb)]='success';break;}case g(0x1ee):{const R=g(0x1d0)+(T===null||T===void 0x0?void 0x0:T[g(0x1d4)]);this[g(0x1cf)](R,A);break;}default:{const y=g(0x1c2)+JSON[g(0x1b6)](T);this[g(0x1cf)](y,A);}}}),(n=this[S(0x1ed)])===null||n===void 0x0?void 0x0:n['on'](S(0x1d1),D=>{const C=S;this['handleError']('error\x20happened\x20during\x20browser\x20login:\x20'+D[C(0x1d4)],A);}),(p=this[S(0x1ed)])===null||p===void 0x0?void 0x0:p['on'](S(0x1d8),()=>{const f=S;if(this[f(0x1eb)]===f(0x1ba)){}else this[f(0x1cf)]('Login\x20process\x20stopped\x20before\x20completed',A);});});return(l=this['duplex'])===null||l===void 0x0?void 0x0:l[U(0x1d5)](this[U(0x1ce)]()),this[U(0x1eb)]=U(0x1c6),X[U(0x1e6)](()=>{const h=U;process[h(0x1b5)](h(0x1ef),z);});}[a8i(0x1cf)](l,G){const F=a8i;var s,I;G?(s=this[F(0x1ed)])===null||s===void 0x0?void 0x0:s[F(0x1d8)](()=>G(new Error(l))):(I=this['duplex'])===null||I===void 0x0?void 0x0:I['end'](),this[F(0x1eb)]=F(0x1d1);}}exports[a8i(0x1b8)]=NorthflankApiBrowserLogin;
@@ -1 +1 @@
1
- 'use strict';const a9A=a9C;function a9n(){const N=['loadMore','down','359964oXxKAp','1918788pXzJwK','640872Ldqtti','__esModule','reloadText','realLength','opt','5mxczqy','handleDynamicPageLoad','inquirer/lib/objects/choice','italic','default','..\x20Load\x20more\x20options\x20..','2578542fRhBVK','selected','19774250uXgYBU','inquirer/lib/prompts/list','DynamicReloadPaginationPrompt','then','done','8jMqxqr','__importDefault','nextPageCursor','render','choices','splice','1205328NGCdBw','8696793NXWHsh','push','length','map','pagOpt','catch','apply','loading','chalk','throw','defineProperty','next','loop','9xDojcP'];a9n=function(){return N;};return a9n();}(function(n,C){const V=a9C,k=n();while(!![]){try{const H=parseInt(V(0xb3))/0x1+-parseInt(V(0xa2))/0x2+-parseInt(V(0xb0))/0x3*(-parseInt(V(0xb4))/0x4)+parseInt(V(0xba))/0x5*(parseInt(V(0x95))/0x6)+-parseInt(V(0xa3))/0x7*(-parseInt(V(0x9c))/0x8)+-parseInt(V(0xb5))/0x9+-parseInt(V(0x97))/0xa;if(H===C)break;else k['push'](k['shift']());}catch(R){k['push'](k['shift']());}}}(a9n,0xc82ca));function a9C(n,C){const k=a9n();return a9C=function(H,R){H=H-0x92;let W=k[H];return W;},a9C(n,C);}var __awaiter=this&&this['__awaiter']||function(n,C,k,H){function R(W){return W instanceof k?W:new k(function(i){i(W);});}return new(k||(k=Promise))(function(W,i){const o=a9C;function t(y){const j=a9C;try{M(H[j(0xae)](y));}catch(T){i(T);}}function r(y){const U=a9C;try{M(H[U(0xac)](y));}catch(T){i(T);}}function M(y){const h=a9C;y[h(0x9b)]?W(y['value']):R(y['value'])[h(0x9a)](t,r);}M((H=H[o(0xa9)](n,C||[]))['next']());});},__importDefault=this&&this[a9A(0x9d)]||function(n){return n&&n['__esModule']?n:{'default':n};};Object[a9A(0xad)](exports,a9A(0xb6),{'value':!![]}),exports[a9A(0x99)]=void 0x0;const list_1=__importDefault(require(a9A(0x98))),choice_1=__importDefault(require(a9A(0xbc))),chalk_1=__importDefault(require(a9A(0xab)));function incrementListIndex(n,C,k){const d=a9A,H=k['choices'][d(0xb8)],R=d(0xaf)in k?Boolean(k[d(0xaf)]):!![];if(C==='up'){if(n>0x0)return n-0x1;return R?H-0x1:n;}if(C==='down'){if(n<H-0x1)return n+0x1;return R?0x0:n;}throw new Error('dir\x20must\x20be\x20up\x20or\x20down');}class DynamicReloadPaginationPrompt extends list_1[a9A(0x93)]{constructor(n,C,k){const Q=a9A;super(n,C,k),this[Q(0xb7)]=chalk_1[Q(0x93)][Q(0x92)](Q(0x94)),this[Q(0xaa)]=![],this[Q(0xa7)]=this['opt'],this['nextPageCursor']=this['pagOpt']['nextPageCursor'],this[Q(0x9e)]!==undefined&&this[Q(0xb9)][Q(0xa0)][Q(0xa4)](new choice_1[(Q(0x93))](this[Q(0xb7)],this[Q(0xb7)]));}['onUpKey'](){const l=a9A;if(this[l(0xaa)])return;this['selected']=incrementListIndex(this[l(0x96)],'up',this['opt']),this[l(0x9f)]();}['onDownKey'](){return __awaiter(this,void 0x0,void 0x0,function*(){const K=a9C;if(this[K(0xaa)])return;this[K(0x96)]=incrementListIndex(this[K(0x96)],K(0xb2),this['opt']),yield this[K(0xbb)](),this[K(0x9f)]();});}[a9A(0xbb)](){return __awaiter(this,void 0x0,void 0x0,function*(){const m=a9C;if(this[m(0x96)]>=this['opt']['choices'][m(0xa5)]-0x1){if(this[m(0x9e)]===undefined)return;this[m(0xaa)]=!![];let n=0x0;const C=setInterval(()=>{const a=m,W=['⠋','⠙','⠹','⠸','⠼','⠴','⠦','⠧','⠇','⠏'],t=chalk_1[a(0x93)][a(0x92)](W[n%W['length']]+'\x20Loading\x20more\x20options');this[a(0xb9)][a(0xa0)][a(0xa0)][this['selected']]['name']=''+t,n+=0x1,this['render']();},0x50),{elements:k,nextPageCursor:H}=yield this[m(0xa7)][m(0xb1)]({'nextPageCursor':this[m(0x9e)]})[m(0xa8)](()=>({'elements':[],'nextPageCursor':undefined}));this[m(0x9e)]=H;const R=k[m(0xa6)](W=>new choice_1[(m(0x93))](W,W));this[m(0xb9)][m(0xa0)][m(0xa0)][m(0xa1)](this['selected'],0x1),this[m(0xb9)]['choices']['push'](...R),H!==undefined&&this[m(0xb9)]['choices'][m(0xa4)](new choice_1[(m(0x93))](this[m(0xb7)],this[m(0xb7)])),clearInterval(C),this['loading']=![];}});}}exports['DynamicReloadPaginationPrompt']=DynamicReloadPaginationPrompt;
1
+ 'use strict';const a9o=a9G;(function(l,G){const D=a9G,s=l();while(!![]){try{const I=-parseInt(D(0x12d))/0x1*(-parseInt(D(0x131))/0x2)+-parseInt(D(0x135))/0x3+-parseInt(D(0x117))/0x4+parseInt(D(0x11c))/0x5*(-parseInt(D(0x126))/0x6)+parseInt(D(0x129))/0x7+parseInt(D(0x123))/0x8+parseInt(D(0x13b))/0x9;if(I===G)break;else s['push'](s['shift']());}catch(z){s['push'](s['shift']());}}}(a9l,0x1e462));var __awaiter=this&&this[a9o(0x130)]||function(l,G,s,I){function z(X){return X instanceof s?X:new s(function(N){N(X);});}return new(s||(s=Promise))(function(X,N){const W=a9G;function A(p){try{n(I['next'](p));}catch(m){N(m);}}function a(p){const T=a9G;try{n(I[T(0x133)](p));}catch(m){N(m);}}function n(p){const d=a9G;p['done']?X(p['value']):z(p[d(0x12b)])['then'](A,a);}n((I=I[W(0x128)](l,G||[]))[W(0x125)]());});},__importDefault=this&&this['__importDefault']||function(l){const B=a9o;return l&&l[B(0x11f)]?l:{'default':l};};Object[a9o(0x137)](exports,'__esModule',{'value':!![]}),exports[a9o(0x134)]=void 0x0;const list_1=__importDefault(require('inquirer/lib/prompts/list')),choice_1=__importDefault(require('inquirer/lib/objects/choice')),chalk_1=__importDefault(require(a9o(0x13c)));function incrementListIndex(l,G,s){const R=a9o,I=s[R(0x13a)][R(0x138)],z='loop'in s?Boolean(s[R(0x11b)]):!![];if(G==='up'){if(l>0x0)return l-0x1;return z?I-0x1:l;}if(G===R(0x139)){if(l<I-0x1)return l+0x1;return z?0x0:l;}throw new Error(R(0x121));}function a9l(){const r=['__esModule','italic','dir\x20must\x20be\x20up\x20or\x20down','\x20Loading\x20more\x20options','1979592ZiMNCT','splice','next','6MHXfXK','onUpKey','apply','372120CTIyKQ','loading','value','default','65129qZrFhr','length','reloadText','__awaiter','4skJuoX','selected','throw','DynamicReloadPaginationPrompt','288390HtUJgx','pagOpt','defineProperty','realLength','down','choices','1446633cvHyBj','chalk','push','catch','677820DlEDfN','opt','..\x20Load\x20more\x20options\x20..','render','loop','1010085FPrdSw','map','nextPageCursor'];a9l=function(){return r;};return a9l();}function a9G(l,G){const s=a9l();return a9G=function(I,z){I=I-0x117;let X=s[I];return X;},a9G(l,G);}class DynamicReloadPaginationPrompt extends list_1[a9o(0x12c)]{constructor(l,G,s){const y=a9o;super(l,G,s),this[y(0x12f)]=chalk_1[y(0x12c)][y(0x120)](y(0x119)),this[y(0x12a)]=![],this['pagOpt']=this[y(0x118)],this[y(0x11e)]=this[y(0x136)][y(0x11e)],this[y(0x11e)]!==undefined&&this[y(0x118)]['choices'][y(0x13d)](new choice_1['default'](this[y(0x12f)],this[y(0x12f)]));}[a9o(0x127)](){const K=a9o;if(this[K(0x12a)])return;this[K(0x132)]=incrementListIndex(this[K(0x132)],'up',this[K(0x118)]),this[K(0x11a)]();}['onDownKey'](){return __awaiter(this,void 0x0,void 0x0,function*(){const i=a9G;if(this[i(0x12a)])return;this[i(0x132)]=incrementListIndex(this[i(0x132)],i(0x139),this[i(0x118)]),yield this['handleDynamicPageLoad'](),this[i(0x11a)]();});}['handleDynamicPageLoad'](){return __awaiter(this,void 0x0,void 0x0,function*(){const J=a9G;if(this[J(0x132)]>=this[J(0x118)][J(0x13a)][J(0x12e)]-0x1){if(this[J(0x11e)]===undefined)return;this[J(0x12a)]=!![];let l=0x0;const G=setInterval(()=>{const Q=J,X=['⠋','⠙','⠹','⠸','⠼','⠴','⠦','⠧','⠇','⠏'],N=chalk_1[Q(0x12c)][Q(0x120)](X[l%X[Q(0x12e)]]+Q(0x122));this[Q(0x118)][Q(0x13a)][Q(0x13a)][this[Q(0x132)]]['name']=''+N,l+=0x1,this[Q(0x11a)]();},0x50),{elements:s,nextPageCursor:I}=yield this[J(0x136)]['loadMore']({'nextPageCursor':this[J(0x11e)]})[J(0x13e)](()=>({'elements':[],'nextPageCursor':undefined}));this[J(0x11e)]=I;const z=s[J(0x11d)](X=>new choice_1[(J(0x12c))](X,X));this[J(0x118)]['choices']['choices'][J(0x124)](this[J(0x132)],0x1),this['opt'][J(0x13a)][J(0x13d)](...z),I!==undefined&&this[J(0x118)][J(0x13a)][J(0x13d)](new choice_1[(J(0x12c))](this['reloadText'],this['reloadText'])),clearInterval(G),this['loading']=![];}});}}exports['DynamicReloadPaginationPrompt']=DynamicReloadPaginationPrompt;
@@ -1 +1 @@
1
- 'use strict';function a10C(n,C){const k=a10n();return a10C=function(H,R){H=H-0xb8;let W=k[H];return W;},a10C(n,C);}const a10h=a10C;(function(n,C){const U=a10C,k=n();while(!![]){try{const H=parseInt(U(0xb9))/0x1+-parseInt(U(0xdf))/0x2+parseInt(U(0xbf))/0x3*(parseInt(U(0xdd))/0x4)+-parseInt(U(0xec))/0x5*(-parseInt(U(0xe3))/0x6)+parseInt(U(0xd4))/0x7+parseInt(U(0xe9))/0x8*(parseInt(U(0xfe))/0x9)+-parseInt(U(0xfc))/0xa;if(H===C)break;else k['push'](k['shift']());}catch(R){k['push'](k['shift']());}}}(a10n,0x4204e));function a10n(){const Z=['198lygOjD','fwd','addon','value','Forwarding\x20addon\x20','apiClient','Service\x20to\x20forward','type','\x20on\x20','then','length','message','apply','success','protocol','--noDefaults','\x20addon\x20ports','63539kZTLMj','\x20to\x20','option','\x20and\x20','name','addCommand','15VnUWGP','askForAddon','forEach','throw','Port-forwarding\x20for\x20Northflank\x20services\x20and\x20addons.','forwarding','defineProperty','__esModule','greenBright','connection-error','green','address','port','portFwdCmd','getCommand','done','Port-forwarding\x20for\x20the\x20specified\x20addon','askForProject','getCurrentProjectName','CliPortForward','service','878626ecacck','canExecuteWithHostnames','noDefaultsText','@northflank/js-client','SIGINT','Failed:\x20','all','hostnames','action','386024wbgxTZ','tunnel-open','833520knmHqu','\x20for\x20these\x20hostnames:','alias','\x20in\x20project\x20','6CfGJPj','../inquirer-helper','getProxyForwarder','bold','__awaiter','InquirerHelper','25048SuGEHl','forward','Project\x20for\x20forwarding','1329980Fvydvq','Exposing\x20','error','assertContextExisting','getCurrentServiceName','description','log','customUserAgent','ApiClient','next','forwardProject','warning','--addon\x20--addonId\x20[NAME]','default','\x20service\x20ports','--project\x20--projectId\x20[NAME]','3192910ULbLEl','\x27:\x20\x22'];a10n=function(){return Z;};return a10n();}var __awaiter=this&&this[a10h(0xe7)]||function(n,C,k,H){function R(W){return W instanceof k?W:new k(function(i){i(W);});}return new(k||(k=Promise))(function(W,i){const Q=a10C;function t(y){const o=a10C;try{M(H[o(0xf5)](y));}catch(T){i(T);}}function r(y){const A=a10C;try{M(H[A(0xc2)](y));}catch(T){i(T);}}function M(y){const d=a10C;y[d(0xce)]?W(y[d(0x101)]):R(y[d(0x101)])[d(0x107)](t,r);}M((H=H[Q(0x10a)](n,C||[]))[Q(0xf5)]());});},__importDefault=this&&this['__importDefault']||function(n){const l=a10h;return n&&n[l(0xc6)]?n:{'default':n};};Object[a10h(0xc5)](exports,a10h(0xc6),{'value':!![]}),exports[a10h(0xd2)]=void 0x0;const js_client_1=require(a10h(0xd7)),chalk_1=__importDefault(require('chalk')),utils_1=require('../utils'),inquirer_helper_1=require(a10h(0xe4));class CliPortForward{constructor(n){const K=a10h;this[K(0xd6)]='Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.',this[K(0x103)]=new js_client_1[(K(0xf4))](n,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[K(0xf3)]});const C=new inquirer_helper_1[(K(0xe8))](this[K(0x103)]);this[K(0xcc)]=(0x0,utils_1['getCommand'])()[K(0xbd)](K(0xea))[K(0xe1)](K(0xff))[K(0xf1)](K(0xc3));const k=(0x0,utils_1[K(0xcd)])(!![])[K(0xbd)](K(0xda))[K(0xf1)]('Port-forwarding\x20for\x20all\x20services\x20and\x20addons\x20in\x20the\x20given\x20project')['option'](K(0xfb),'project\x20for\x20forwarding')['option'](K(0x10d),this[K(0xd6)],![])['action'](({noDefaults:W,projectId:i})=>__awaiter(this,void 0x0,void 0x0,function*(){const m=K;(0x0,utils_1['assertContextExisting'])(this[m(0x103)]);const t=this[m(0xe5)](),r=W?undefined:n[m(0xd1)](),M=i||r||(yield C['askForProject']());try{const {services:y,addons:T}=yield t[m(0xf6)]({'projectId':M},![]);y['length']+T['length']<=0x0?(0x0,utils_1['warning'])('No\x20services\x20and\x20addons\x20to\x20forward\x20found\x20in\x20project\x20'+chalk_1[m(0xf9)][m(0xe6)](M)):(console[m(0xf2)]('Forwarding\x20'+chalk_1[m(0xf9)][m(0xc9)]['bold'](y[m(0x108)]+m(0xfa))+m(0xbc)+chalk_1[m(0xf9)][m(0xc9)]['bold'](T[m(0x108)]+m(0xb8))+m(0xe2)+chalk_1[m(0xf9)][m(0xe6)](M)),yield Promise['all']([...y,...T]));}catch(V){(0x0,utils_1[m(0xee)])(m(0xd9)+V[m(0x109)]);}})),H=(0x0,utils_1[K(0xcd)])(!![])['name'](K(0xd3))[K(0xf1)]('Port-forwarding\x20for\x20the\x20specified\x20service')[K(0xbb)](K(0xfb),'Project\x20for\x20forwarding')[K(0xbb)]('--service\x20--serviceId\x20[NAME]',K(0x104))[K(0xbb)](K(0x10d),this['noDefaultsText'],![])[K(0xdc)](({noDefaults:W,projectId:i,serviceId:t})=>__awaiter(this,void 0x0,void 0x0,function*(){const a=K;(0x0,utils_1[a(0xef)])(this[a(0x103)]);const r=this[a(0xe5)](),M=W?undefined:n['getCurrentProjectName'](),y=i||M||(yield C[a(0xd0)]()),T=W?undefined:n[a(0xf0)](),V=t||T||(yield C['askForService'](y)());console[a(0xf2)]('Forwarding\x20service\x20'+chalk_1[a(0xf9)][a(0xe6)](V)+'\x20in\x20project\x20'+chalk_1[a(0xf9)]['bold'](y));try{yield r['forwardService']({'projectId':y,'serviceId':V},![]);}catch(j){(0x0,utils_1['error'])('Failed:\x20'+j[a(0x109)]);}})),R=(0x0,utils_1[K(0xcd)])(!![])[K(0xbd)](K(0x100))[K(0xf1)](K(0xcf))[K(0xbb)](K(0xfb),K(0xeb))[K(0xbb)](K(0xf8),'Addon\x20to\x20forward')[K(0xbb)](K(0x10d),this[K(0xd6)],![])['action'](({projectId:W,addonId:i,noDefaults:t})=>__awaiter(this,void 0x0,void 0x0,function*(){const N=K;(0x0,utils_1[N(0xef)])(this['apiClient']);const r=t?undefined:n['getCurrentProjectName'](),M=W||r||(yield C[N(0xd0)]()),y=i||(yield C[N(0xc0)](M)());console[N(0xf2)](N(0x102)+chalk_1[N(0xf9)][N(0xe6)](y)+N(0xe2)+chalk_1[N(0xf9)][N(0xe6)](M));const T=this[N(0xe5)]();try{yield T['forwardAddon']({'projectId':M,'addonId':y},![]);}catch(V){(0x0,utils_1[N(0xee)])(N(0xd9)+V['message']);}}));this[K(0xcc)][K(0xbe)](k),this['portFwdCmd']['addCommand'](H),this['portFwdCmd'][K(0xbe)](R);}[a10h(0xe5)](){const X=a10h,n=this['apiClient'][X(0xc4)],C=n[X(0xd5)]();if(C[X(0xee)])throw new Error(C[X(0x109)]);return n['on'](X(0xde),(k,H)=>{const E=X,R=chalk_1[E(0xf9)][E(0xc7)][E(0xe6)](H[E(0x105)]+'\x20\x27'+H['id']+'\x27'),W=H[E(0x10c)]==='HTTP'?'http://':'';(0x0,utils_1[E(0x10b)])(E(0xed)+R+E(0x106)+H[E(0xca)]+':'+H[E(0xcb)]+'\x20('+H[E(0x10c)]+')\x20with\x20these\x20hostnames:'),H[E(0xdb)][E(0xc1)](i=>{const g=E;(0x0,utils_1['success'])('\x20\x20'+W+i+':'+H[g(0xcb)]);}),(0x0,utils_1[E(0x10b)])('');}),n['on']('tunnel-close',(k,H)=>{const c=X,R=chalk_1[c(0xf9)][c(0xc7)]['bold'](H['type']+'\x20\x27'+H['id']+'\x27');(0x0,utils_1[c(0xf7)])('Stop\x20forwarding\x20traffic\x20from\x20'+H['address']+':'+H[c(0xcb)]+c(0xba)+R+c(0xe0)),H['hostnames']['forEach'](W=>{const b=c;(0x0,utils_1['warning'])('\x20\x20'+W+':'+H[b(0xcb)]);}),(0x0,utils_1[c(0xf7)])('');}),n['on'](X(0xc8),(k,H,R)=>{const L=X;(0x0,utils_1['warning'])('Connection\x20error\x20occurred\x20when\x20forwarding\x20\x27'+H[L(0xca)]+':'+H[L(0xcb)]+L(0xfd)+(R===null||R===void 0x0?void 0x0:R['message'])+'\x22');}),process['on'](X(0xd8),()=>__awaiter(this,void 0x0,void 0x0,function*(){const G=X;try{yield n['stop']();}catch(k){(0x0,utils_1[G(0xee)])('Cleaning\x20up\x20open\x20connections\x20failed:\x20'+k[G(0x109)]);}finally{process['exit']();}})),n;}}exports[a10h(0xd2)]=CliPortForward;
1
+ 'use strict';const a10W=a10G;(function(l,G){const d=a10G,s=l();while(!![]){try{const I=parseInt(d(0xe2))/0x1+parseInt(d(0x10f))/0x2+parseInt(d(0x119))/0x3*(parseInt(d(0xf6))/0x4)+-parseInt(d(0xcf))/0x5*(parseInt(d(0xbb))/0x6)+parseInt(d(0x11f))/0x7*(parseInt(d(0xdb))/0x8)+parseInt(d(0xd3))/0x9*(parseInt(d(0x108))/0xa)+parseInt(d(0x122))/0xb*(-parseInt(d(0x111))/0xc);if(I===G)break;else s['push'](s['shift']());}catch(z){s['push'](s['shift']());}}}(a10l,0xaa0ab));var __createBinding=this&&this[a10W(0xd2)]||(Object[a10W(0x11c)]?function(l,G,s,I){const B=a10W;if(I===undefined)I=s;var z=Object[B(0xb8)](G,s);(!z||('get'in z?!G[B(0xf4)]:z[B(0xd4)]||z[B(0xc9)]))&&(z={'enumerable':!![],'get':function(){return G[s];}}),Object[B(0xc5)](l,I,z);}:function(l,G,s,I){if(I===undefined)I=s;l[I]=G[s];}),__setModuleDefault=this&&this[a10W(0xf7)]||(Object[a10W(0x11c)]?function(l,G){Object['defineProperty'](l,'default',{'enumerable':!![],'value':G});}:function(l,G){const R=a10W;l[R(0xfb)]=G;}),__importStar=this&&this[a10W(0x113)]||function(l){const y=a10W;if(l&&l[y(0xf4)])return l;var G={};if(l!=null){for(var s in l)if(s!==y(0xfb)&&Object[y(0xfd)][y(0x12b)][y(0xc2)](l,s))__createBinding(G,l,s);}return __setModuleDefault(G,l),G;},__awaiter=this&&this['__awaiter']||function(l,G,s,I){function z(X){return X instanceof s?X:new s(function(N){N(X);});}return new(s||(s=Promise))(function(X,N){const Q=a10G;function A(p){const K=a10G;try{n(I[K(0xec)](p));}catch(m){N(m);}}function a(p){const i=a10G;try{n(I[i(0x128)](p));}catch(m){N(m);}}function n(p){const J=a10G;p['done']?X(p[J(0x10a)]):z(p['value'])[J(0x12d)](A,a);}n((I=I[Q(0x109)](l,G||[]))[Q(0xec)]());});},__importDefault=this&&this['__importDefault']||function(l){const r=a10W;return l&&l[r(0xf4)]?l:{'default':l};};function a10G(l,G){const s=a10l();return a10G=function(I,z){I=I-0xb5;let X=s[I];return X;},a10G(l,G);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a10W(0xcd)]=void 0x0;function a10l(){const g=['Port-forwarding\x20for\x20Northflank\x20services\x20and\x20addons.','__importStar','description','forwardAddon','message','project\x20for\x20forwarding','\x20with\x20these\x20hostnames:','6471ecPxOg','protocol','No\x20services\x20and\x20addons\x20to\x20forward\x20found\x20in\x20project\x20','create','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','port','8713873fqyvlB','http://','all','286gAnffs','assertContextExisting','hostnames','addCommand','fwd','Port-forwarding\x20for\x20the\x20specified\x20addon','throw','getCurrentServiceName','canExecuteWithHostnames','hasOwnProperty','--skipHostnames','then','\x20\x20Running\x20on\x20macOS\x20in\x20','green','chalk','../inquirer-helper','getOwnPropertyDescriptor','forwardProject','noDefaultsText','5882454gWzVNf','Service\x20to\x20forward','platform','\x20mode:\x20the\x20locally\x20forwarded\x20port\x20differs\x20from\x20the\x20actual\x20port\x20on\x20your\x20','getCommand','warning','apiClient','call','customUserAgent','@northflank/js-client','defineProperty','getCurrentProjectName','stop','name','configurable','\x20for\x20these\x20hostnames:','ApiClient','Forwarding\x20service\x20','CliPortForward','type','5PrcNTV','Only\x20expose\x20on\x20IP\x20address,\x20not\x20on\x20hostnames.\x20With\x20this\x20option,\x20no\x20root\x20permissions\x20are\x20required.','Port-forwarding\x20for\x20the\x20specified\x20service','__createBinding','414qLICoK','writable','forward','bold','Project\x20for\x20forwarding','win32','--noDefaults','\x20in\x20project\x20','8YjpsYY','askForProject','alias','darwin','addon','askForAddon','address','1293721lTgveT','--service\x20--serviceId\x20[NAME]','tunnel-close','\x20to\x20','\x20on\x20','getProxyForwarder','SIGINT','option','C:/Windows/System32/drivers/etc/hosts','--project\x20--projectId\x20[NAME]','next','length','join','\x20addon\x20ports','skipHostnamesText','Failed:\x20','log','InquirerHelper','__esModule','action','1700EdCftq','__setModuleDefault','Stop\x20forwarding\x20traffic\x20from\x20','error','\x20and\x20','default','tunnel-open','prototype','\x20\x20If\x20you\x20have\x20added\x20entries\x20to\x20your\x20hosts\x20file,\x20it\x20is\x20recommended\x20to\x20remove\x20them\x20again\x20now.','\x20mode.\x20If\x20hostname\x20forwarding\x20is\x20required,\x20remove\x20','service','Connection\x20error\x20occurred\x20when\x20forwarding\x20\x27','\x20service\x20ports','Forwarding\x20','forEach','HTTP','--addon\x20--addonId\x20[NAME]','Forwarding\x20addon\x20','251450yQkUac','apply','value','success','askForService','portFwdCmd','/etc/hosts','1679926PNgmWu','\x20\x20\x20\x20\x20\x20\x20\x20\x20','1742316BpyMQP'];a10l=function(){return g;};return a10l();}const js_client_1=require(a10W(0xc4)),chalk_1=__importDefault(require(a10W(0xb6))),utils_1=require('../utils'),inquirer_helper_1=require(a10W(0xb7)),os=__importStar(require('os'));class CliPortForward{constructor(l){const E=a10W;this['noDefaultsText']=E(0x11d),this[E(0xf0)]=E(0xd0),this[E(0xc1)]=new js_client_1[(E(0xcb))](l,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[E(0xc3)]});const G=new inquirer_helper_1[(E(0xf3))](this[E(0xc1)]);this[E(0x10d)]=(0x0,utils_1[E(0xbf)])()[E(0xc8)](E(0xd5))[E(0xdd)](E(0x126))[E(0x114)](E(0x112));const s=(0x0,utils_1[E(0xbf)])(!![])['name']('all')[E(0x114)]('Port-forwarding\x20for\x20all\x20services\x20and\x20addons\x20in\x20the\x20given\x20project')[E(0xe9)](E(0xeb),E(0x117))[E(0xe9)](E(0xd9),this[E(0xba)],![])[E(0xe9)](E(0x12c),this[E(0xf0)],![])['action'](({noDefaults:X,projectId:N,skipHostnames:A})=>__awaiter(this,void 0x0,void 0x0,function*(){const V=E;(0x0,utils_1[V(0x123)])(this[V(0xc1)]);const a=this[V(0xe7)](A),n=X?undefined:l[V(0xc6)](),p=N||n||(yield G[V(0xdc)]());try{const {services:m,addons:D}=yield a[V(0xb9)]({'projectId':p},A);m['length']+D[V(0xed)]<=0x0?(0x0,utils_1[V(0xc0)])(V(0x11b)+chalk_1['default'][V(0xd6)](p)):(console[V(0xf2)](V(0x103)+chalk_1[V(0xfb)]['green'][V(0xd6)](m['length']+V(0x102))+V(0xfa)+chalk_1['default'][V(0xb5)][V(0xd6)](D[V(0xed)]+V(0xef))+'\x20in\x20project\x20'+chalk_1[V(0xfb)][V(0xd6)](p)),yield Promise[V(0x121)]([...m,...D]));}catch(o){(0x0,utils_1[V(0xf9)])(V(0xf1)+o[V(0x116)]);}})),I=(0x0,utils_1[E(0xbf)])(!![])[E(0xc8)](E(0x100))[E(0x114)](E(0xd1))[E(0xe9)](E(0xeb),E(0xd7))[E(0xe9)](E(0xe3),E(0xbc))[E(0xe9)]('--noDefaults',this[E(0xba)],![])['option'](E(0x12c),this[E(0xf0)],![])[E(0xf5)](({noDefaults:X,projectId:N,serviceId:A,skipHostnames:a})=>__awaiter(this,void 0x0,void 0x0,function*(){const M=E;(0x0,utils_1[M(0x123)])(this['apiClient']);const n=this[M(0xe7)](a),p=X?undefined:l[M(0xc6)](),m=N||p||(yield G[M(0xdc)]()),D=X?undefined:l[M(0x129)](),o=A||D||(yield G[M(0x10c)](m)());console[M(0xf2)](M(0xcc)+chalk_1['default'][M(0xd6)](o)+M(0xda)+chalk_1['default'][M(0xd6)](m));try{yield n['forwardService']({'projectId':m,'serviceId':o},a);}catch(T){(0x0,utils_1[M(0xf9)])('Failed:\x20'+T[M(0x116)]);}})),z=(0x0,utils_1['getCommand'])(!![])['name'](E(0xdf))['description'](E(0x127))[E(0xe9)](E(0xeb),E(0xd7))['option'](E(0x106),'Addon\x20to\x20forward')[E(0xe9)]('--skipHostnames',this[E(0xf0)],![])[E(0xf5)](({noDefaults:X,projectId:N,addonId:A,skipHostnames:a})=>__awaiter(this,void 0x0,void 0x0,function*(){const e=E;(0x0,utils_1[e(0x123)])(this[e(0xc1)]);const n=this[e(0xe7)](a),p=X?undefined:l[e(0xc6)](),m=N||p||(yield G[e(0xdc)]()),D=A||(yield G[e(0xe0)](m)());console[e(0xf2)](e(0x107)+chalk_1['default'][e(0xd6)](D)+e(0xda)+chalk_1[e(0xfb)][e(0xd6)](m));try{yield n[e(0x115)]({'projectId':m,'addonId':D},a);}catch(o){(0x0,utils_1[e(0xf9)])(e(0xf1)+o[e(0x116)]);}}));this['portFwdCmd'][E(0x125)](s),this[E(0x10d)][E(0x125)](I),this[E(0x10d)]['addCommand'](z);}['getProxyForwarder'](l=![]){const w=a10W,G=this['apiClient']['forwarding'];if(!l){const s=G[w(0x12a)]();if(s[w(0xf9)])throw new Error(s[w(0x116)]);}return G['on'](w(0xfc),(I,z)=>{const q=w,X=chalk_1[q(0xfb)]['greenBright'][q(0xd6)](z[q(0xce)]+'\x20\x27'+z['id']+'\x27'),N=z[q(0x124)]['length']>0x0,A=''+(!l?q(0x118):'.'),a=z['protocol']===q(0x105)?q(0x120):'';(0x0,utils_1['success'])('Exposing\x20'+X+q(0xe6)+z[q(0xe1)]+':'+z[q(0x11e)]+'\x20('+z[q(0x11a)]+')'+A);if(!l)z[q(0x124)][q(0x104)](n=>{const O=q;(0x0,utils_1[O(0x10b)])('\x20\x20'+a+n+':'+z[O(0x11e)]);});else{if(N){const n=process[q(0xbd)]===q(0xd8),p=os[q(0xbd)]()===q(0xde),m=n?q(0xea):q(0x10e),D=chalk_1[q(0xfb)]['bold']('skipHostnames'),o=p?q(0x12e)+D+q(0xbe)+z['type']+'.':undefined;let T='\x20\x20Running\x20in\x20'+D+q(0xff)+'--skipHostnames'+'\x20flag\x20or\x20manually\x20append\x20following\x20entry\x20to\x20your\x20hosts\x20file\x20('+m+'):';if(o!==undefined)(0x0,utils_1[q(0xc0)])(o);(0x0,utils_1['warning'])(T),console[q(0xf2)](z['address']+q(0x110)+z[q(0x124)][q(0xee)]('\x20'));}}(0x0,utils_1[q(0x10b)])('');}),G['on'](w(0xe4),(I,z)=>{const U=w,X=chalk_1['default']['greenBright'][U(0xd6)](z[U(0xce)]+'\x20\x27'+z['id']+'\x27'),N=z[U(0x124)][U(0xed)]>0x0,A=''+(!l?U(0xca):'.');(0x0,utils_1[U(0xc0)])(U(0xf8)+z['address']+':'+z[U(0x11e)]+U(0xe5)+X+A);if(!l)z['hostnames'][U(0x104)](a=>{const Z=U;(0x0,utils_1[Z(0xc0)])('\x20\x20'+a+':'+z['port']);});else N&&(0x0,utils_1['warning'])(U(0xfe));(0x0,utils_1['warning'])('');}),G['on']('connection-error',(I,z,X)=>{const v=w;(0x0,utils_1[v(0xc0)])(v(0x101)+z[v(0xe1)]+':'+z['port']+'\x27:\x20\x22'+(X===null||X===void 0x0?void 0x0:X[v(0x116)])+'\x22');}),process['on'](w(0xe8),()=>__awaiter(this,void 0x0,void 0x0,function*(){const S=w;try{yield G[S(0xc7)]();}catch(I){(0x0,utils_1[S(0xf9)])('Cleaning\x20up\x20open\x20connections\x20failed:\x20'+I['message']);}finally{process['exit']();}})),G;}}exports['CliPortForward']=CliPortForward;
package/dist/utils.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const a11A=a11C;(function(n,C){const V=a11C,k=n();while(!![]){try{const H=parseInt(V(0x1a2))/0x1*(parseInt(V(0x1ae))/0x2)+-parseInt(V(0x1a5))/0x3+parseInt(V(0x1a7))/0x4*(parseInt(V(0x18d))/0x5)+parseInt(V(0x1c4))/0x6+-parseInt(V(0x1b3))/0x7+parseInt(V(0x18b))/0x8+-parseInt(V(0x1bf))/0x9;if(H===C)break;else k['push'](k['shift']());}catch(R){k['push'](k['shift']());}}}(a11n,0x242e7));var __awaiter=this&&this['__awaiter']||function(n,C,k,H){function R(W){return W instanceof k?W:new k(function(i){i(W);});}return new(k||(k=Promise))(function(W,i){const o=a11C;function t(y){const j=a11C;try{M(H[j(0x1a6)](y));}catch(T){i(T);}}function r(y){const U=a11C;try{M(H[U(0x19d)](y));}catch(T){i(T);}}function M(y){const h=a11C;y[h(0x18c)]?W(y[h(0x190)]):R(y[h(0x190)])[h(0x18e)](t,r);}M((H=H['apply'](n,C||[]))[o(0x1a6)]());});},__importDefault=this&&this[a11A(0x1a4)]||function(n){return n&&n['__esModule']?n:{'default':n};};Object[a11A(0x1c3)](exports,a11A(0x1a8),{'value':!![]}),exports[a11A(0x1c5)]=exports[a11A(0x1b6)]=exports[a11A(0x1b7)]=exports[a11A(0x197)]=exports[a11A(0x1ac)]=exports['success']=exports['warning']=exports[a11A(0x192)]=exports[a11A(0x1b0)]=exports[a11A(0x1af)]=void 0x0;const node_fetch_1=__importDefault(require('node-fetch')),chalk_1=__importDefault(require(a11A(0x19a))),commander_1=require(a11A(0x199)),pgk=require(a11A(0x19c));function a11C(n,C){const k=a11n();return a11C=function(H,R){H=H-0x18a;let W=k[H];return W;},a11C(n,C);}exports[a11A(0x1af)]=a11A(0x198)+(pgk===null||pgk===void 0x0?void 0x0:pgk[a11A(0x18f)]);function checkUpdate(n){return __awaiter(this,void 0x0,void 0x0,function*(){const Q=a11C;function C(k,H){const d=a11C,R=new Date(Number(k));return R[d(0x1b1)](R[d(0x1bc)]()+H),R;}try{if(C(n[Q(0x1a1)](),0x1)>new Date())return;const k=pgk[Q(0x18f)],{name:H}=pgk;if(!k)return;const R='https://registry.npmjs.org/'+H+'/latest',W=yield(0x0,node_fetch_1[Q(0x194)])(R,{'method':Q(0x19e),'timeout':0x1388}),i=(yield W[Q(0x1ab)]())[Q(0x18f)];needsUpdate(k,i)&&warning(Q(0x1bd)+k+Q(0x196)+i+'.'+('\x20Consider\x20updating\x20using\x20\x27npm\x20i\x20'+H+'\x20-g\x27\x20or\x20\x27yarn\x20global\x20add\x20'+H+Q(0x1aa))),yield n[Q(0x1c1)](new Date());}catch(t){}});}exports[a11A(0x1b0)]=checkUpdate;function a11n(){const g=['default','getCurrentToken',',\x20the\x20latest\x20version\x20of\x20the\x20cli\x20is\x20','retry','northflank-cli/','commander','chalk','warning','../package.json','throw','GET','No\x20console\x20output','parse','getLastUpdateCheck','1TvSgvL','storeOptionsAsProperties','__importDefault','796095kppYEa','next','337196kzxLie','__esModule','Verbose\x20output','\x27\x20**','json','getCommand','getCurrentContext','443018TnQHis','customUserAgent','checkUpdate','setDate','resolve','867041RxmGlp','getCurrentBaseUrl','No\x20token\x20in\x20CLI\x20context.\x20Add\x20token\x20with\x20\x27northflank\x20set-token\x27','isValidJSON','asyncSequential','No\x20CLI\x20context\x20present.\x20Create\x20context\x20with\x20\x27northflank\x20login\x27','min','length','green','getDate','**\x20You\x27re\x20running\x20on\x20version\x20','No\x20API\x20URL\x20present\x20in\x20context.\x20Create\x20new\x20context\x20with\x20\x27northflank\x20login\x27','818703UPWUMb','Command','setLastUpdateCheck','contextProvider','defineProperty','906480flPeQR','assertContextExisting','option','1372048svkqki','done','5JYbaWP','then','version','value','split','error','allowExcessArguments'];a11n=function(){return g;};return a11n();}function needsUpdate(n,C){const l=a11A,k=/(\.0+)+$/,H=n['replace'](k,'')[l(0x191)]('.'),R=C['replace'](k,'')[l(0x191)]('.');for(let W=0x0;W<Math[l(0x1b9)](H[l(0x1ba)],R[l(0x1ba)]);W+=0x1){const t=parseInt(R[W],0xa)-parseInt(H[W],0xa);if(t>0x0)return!![];if(t<0x0)return![];}return R[l(0x1ba)]>H['length'];}function error(n){const K=a11A;console[K(0x192)](chalk_1['default']['redBright']('Failed:\x20'+n));}exports[a11A(0x192)]=error;function warning(n){console['error'](chalk_1['default']['yellow'](''+n));}exports[a11A(0x19b)]=warning;function success(n){const m=a11A;console['log'](chalk_1[m(0x194)][m(0x1bb)](''+n));}exports['success']=success;function getCommand(n=![]){const a=a11A,C=new commander_1[(a(0x1c0))]();return C[a(0x1a3)](![]),C['allowUnknownOption'](![]),C[a(0x193)](![]),C['enablePositionalOptions'](!![]),n&&(C['option']('--verbose',a(0x1a9),![]),C[a(0x18a)]('--quiet',a(0x19f),![])),C;}exports[a11A(0x1ac)]=getCommand;const retry=(n,C=0x32)=>k=>{let H=n;const R=()=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){try{return yield k();}catch(W){if(H<=0x0)throw W;return H-=0x1,yield new Promise(i=>setTimeout(()=>i(),C)),R();}});return R();};exports[a11A(0x197)]=retry;const asyncSequential=(n,C)=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){const N=a11A,k=Promise[N(0x1b2)]([]);return n['reduce']((H,R)=>H[N(0x18e)](W=>C(R)[N(0x18e)](i=>{return W['push'](i),W;})),k);});exports[a11A(0x1b7)]=asyncSequential;function isValidJSON(n){const X=a11A;try{return JSON[X(0x1a0)](n);}catch(C){return![];}}exports['isValidJSON']=isValidJSON;function assertContextExisting(n){const E=a11A;if(n[E(0x1c2)][E(0x1ad)]()===undefined)throw new Error(E(0x1b8));if(n[E(0x1c2)][E(0x1b4)]()===undefined)throw new Error(E(0x1be));if(n[E(0x1c2)][E(0x195)]()===undefined)throw new Error(E(0x1b5));}exports['assertContextExisting']=assertContextExisting;
1
+ 'use strict';const a11o=a11G;(function(l,G){const D=a11G,s=l();while(!![]){try{const I=parseInt(D(0xdb))/0x1*(-parseInt(D(0xf7))/0x2)+-parseInt(D(0xe5))/0x3+-parseInt(D(0xd0))/0x4+-parseInt(D(0xed))/0x5+-parseInt(D(0xdf))/0x6+-parseInt(D(0xef))/0x7*(-parseInt(D(0x102))/0x8)+parseInt(D(0xc8))/0x9*(parseInt(D(0xdd))/0xa);if(I===G)break;else s['push'](s['shift']());}catch(z){s['push'](s['shift']());}}}(a11l,0x70c62));var __awaiter=this&&this[a11o(0xcf)]||function(l,G,s,I){function z(X){return X instanceof s?X:new s(function(N){N(X);});}return new(s||(s=Promise))(function(X,N){const B=a11G;function A(p){const T=a11G;try{n(I[T(0x104)](p));}catch(m){N(m);}}function a(p){const d=a11G;try{n(I[d(0x100)](p));}catch(m){N(m);}}function n(p){const W=a11G;p[W(0x103)]?X(p['value']):z(p['value'])[W(0x107)](A,a);}n((I=I[B(0xd3)](l,G||[]))['next']());});},__importDefault=this&&this[a11o(0xe8)]||function(l){const R=a11o;return l&&l[R(0x101)]?l:{'default':l};};Object[a11o(0xee)](exports,'__esModule',{'value':!![]}),exports[a11o(0xeb)]=exports[a11o(0xce)]=exports[a11o(0xe9)]=exports['retry']=exports[a11o(0xcd)]=exports['success']=exports['warning']=exports[a11o(0xcb)]=exports['checkUpdate']=exports['customUserAgent']=void 0x0;const node_fetch_1=__importDefault(require('node-fetch')),chalk_1=__importDefault(require(a11o(0xca))),commander_1=require(a11o(0xf8)),pgk=require(a11o(0xf5));exports[a11o(0xfd)]=a11o(0xea)+(pgk===null||pgk===void 0x0?void 0x0:pgk[a11o(0xe6)]);function checkUpdate(l){return __awaiter(this,void 0x0,void 0x0,function*(){const K=a11G;function G(s,I){const y=a11G,z=new Date(Number(s));return z['setDate'](z[y(0xfa)]()+I),z;}try{if(G(l[K(0xcc)](),0x1)>new Date())return;const s=pgk[K(0xe6)],{name:I}=pgk;if(!s)return;const z=K(0xfb)+I+K(0xc6),X=yield(0x0,node_fetch_1[K(0xe0)])(z,{'method':K(0xde),'timeout':0x1388}),N=(yield X['json']())[K(0xe6)];needsUpdate(s,N)&&warning(K(0xec)+s+K(0xff)+N+'.'+(K(0xfc)+I+K(0xf4)+I+K(0xf6))),yield l[K(0xc4)](new Date());}catch(A){}});}exports[a11o(0xe2)]=checkUpdate;function needsUpdate(l,G){const i=a11o,s=/(\.0+)+$/,I=l[i(0xe3)](s,'')[i(0x108)]('.'),z=G[i(0xe3)](s,'')[i(0x108)]('.');for(let X=0x0;X<Math[i(0xc3)](I[i(0x106)],z[i(0x106)]);X+=0x1){const N=parseInt(z[X],0xa)-parseInt(I[X],0xa);if(N>0x0)return!![];if(N<0x0)return![];}return z[i(0x106)]>I[i(0x106)];}function error(l){const J=a11o;console[J(0xcb)](chalk_1[J(0xe0)][J(0xdc)](J(0xe7)+l));}exports['error']=error;function a11l(){const w=['retry','checkUpdate','replace','option','577230mNtRKf','version','Failed:\x20','__importDefault','asyncSequential','northflank-cli/','assertContextExisting','**\x20You\x27re\x20running\x20on\x20version\x20','1028840oMymNe','defineProperty','238eQqhLQ','allowExcessArguments','Command','enablePositionalOptions','getCurrentBaseUrl','\x20-g\x27\x20or\x20\x27yarn\x20global\x20add\x20','../package.json','\x27\x20**','1038822mspliO','commander','warning','getDate','https://registry.npmjs.org/','\x20Consider\x20updating\x20using\x20\x27npm\x20i\x20','customUserAgent','--verbose',',\x20the\x20latest\x20version\x20of\x20the\x20cli\x20is\x20','throw','__esModule','197480uSdwCq','done','next','storeOptionsAsProperties','length','then','split','min','setLastUpdateCheck','reduce','/latest','contextProvider','579996VQZdNi','No\x20API\x20URL\x20present\x20in\x20context.\x20Create\x20new\x20context\x20with\x20\x27northflank\x20login\x27','chalk','error','getLastUpdateCheck','getCommand','isValidJSON','__awaiter','2154724LfbWgO','No\x20CLI\x20context\x20present.\x20Create\x20context\x20with\x20\x27northflank\x20login\x27','log','apply','parse','No\x20console\x20output','green','No\x20token\x20in\x20CLI\x20context.\x20Add\x20token\x20with\x20\x27northflank\x20set-token\x27','getCurrentToken','yellow','success','1JRwoSA','redBright','210zvTXpn','GET','1646532roqxUD','default'];a11l=function(){return w;};return a11l();}function warning(l){const Q=a11o;console[Q(0xcb)](chalk_1[Q(0xe0)][Q(0xd9)](''+l));}exports[a11o(0xf9)]=warning;function success(l){const r=a11o;console[r(0xd2)](chalk_1['default'][r(0xd6)](''+l));}exports[a11o(0xda)]=success;function getCommand(l=![]){const E=a11o,G=new commander_1[(E(0xf1))]();return G[E(0x105)](![]),G['allowUnknownOption'](![]),G[E(0xf0)](![]),G[E(0xf2)](!![]),l&&(G[E(0xe4)](E(0xfe),'Verbose\x20output',![]),G[E(0xe4)]('--quiet',E(0xd5),![])),G;}exports[a11o(0xcd)]=getCommand;const retry=(l,G=0x32)=>s=>{let I=l;const z=()=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){try{return yield s();}catch(X){if(I<=0x0)throw X;return I-=0x1,yield new Promise(N=>setTimeout(()=>N(),G)),z();}});return z();};exports[a11o(0xe1)]=retry;const asyncSequential=(l,G)=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){const V=a11o,s=Promise['resolve']([]);return l[V(0xc5)]((I,z)=>I[V(0x107)](X=>G(z)[V(0x107)](N=>{return X['push'](N),X;})),s);});exports[a11o(0xe9)]=asyncSequential;function isValidJSON(l){const M=a11o;try{return JSON[M(0xd4)](l);}catch(G){return![];}}exports['isValidJSON']=isValidJSON;function assertContextExisting(l){const e=a11o;if(l[e(0xc7)]['getCurrentContext']()===undefined)throw new Error(e(0xd1));if(l['contextProvider'][e(0xf3)]()===undefined)throw new Error(e(0xc9));if(l[e(0xc7)][e(0xd8)]()===undefined)throw new Error(e(0xd7));}function a11G(l,G){const s=a11l();return a11G=function(I,z){I=I-0xc3;let X=s[I];return X;},a11G(l,G);}exports['assertContextExisting']=assertContextExisting;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@northflank/cli",
3
- "version": "0.9.3",
3
+ "version": "0.9.4",
4
4
  "author": "Marco Suter",
5
5
  "description": "Provides a command-line interface to the Northflank platform.",
6
6
  "homepage": "https://www.northflank.com",
@@ -26,7 +26,7 @@
26
26
  "LICENSE"
27
27
  ],
28
28
  "dependencies": {
29
- "@northflank/js-client": "0.7.1",
29
+ "@northflank/js-client": "0.7.2",
30
30
  "ajv": "8.6.3",
31
31
  "bufferutil": "^4.0.7",
32
32
  "chalk": "~4.1.0",