@northflank/cli 0.9.17 → 0.9.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-helpers.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/context/contextCommands.js +1 -1
- package/dist/defaults.js +1 -1
- package/dist/exec/index.js +1 -1
- package/dist/formatting/command-overview.js +1 -1
- package/dist/formatting/console-format-helpers.js +1 -1
- package/dist/formatting/terminal-chart.js +1 -1
- package/dist/inquirer-helper.js +1 -1
- package/dist/login/browser-login.js +1 -1
- package/dist/logs/index.js +1 -1
- package/dist/logs/log-formatter.js +1 -1
- package/dist/metrics/index.js +1 -1
- package/dist/pagination/inquirer-pagination-prompt.js +1 -1
- package/dist/pagination/pagination-helper.js +1 -1
- package/dist/port-forward/index.js +1 -1
- package/dist/utils.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a11I
|
|
1
|
+
'use strict';const a11p=a11I;(function(u,I){const C=a11I,a=u();while(!![]){try{const x=parseInt(C(0x102))/0x1+-parseInt(C(0x119))/0x2*(-parseInt(C(0x108))/0x3)+-parseInt(C(0xff))/0x4*(parseInt(C(0x11b))/0x5)+-parseInt(C(0x107))/0x6*(parseInt(C(0x118))/0x7)+parseInt(C(0xfc))/0x8+parseInt(C(0x10c))/0x9+-parseInt(C(0xfe))/0xa;if(x===I)break;else a['push'](a['shift']());}catch(D){a['push'](a['shift']());}}}(a11u,0xcbe6f));function a11I(u,I){const a=a11u();return a11I=function(x,D){x=x-0xfb;let K=a[x];return K;},a11I(u,I);}var __importDefault=this&&this[a11p(0x10e)]||function(u){const b=a11p;return u&&u[b(0x106)]?u:{'default':u};};Object[a11p(0x104)](exports,a11p(0x106),{'value':!![]}),exports[a11p(0x110)]=exports[a11p(0x10b)]=void 0x0;const chalk_1=__importDefault(require(a11p(0x114)));exports[a11p(0x10b)]=[{'color':a11p(0x10a),'pattern':/\[[0-9]{1,2}\/[a-z]{3}\/[0-9]{4}:[0-9]{2}:[0-9]{2}:[0-9]{2} \+[0-9]{4}\]/i},{'color':a11p(0x10a),'pattern':/[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(.[0-9]+)?Z/i},{'color':'grey','pattern':/[0-9]{4}\/[0-9]{2}\/[0-9]{2}/i},{'color':'grey','pattern':/\s\b([0-9]{2}:){1,2}[0-9]{2}\b\s/i},{'color':a11p(0x11c),'pattern':new RegExp(a11p(0x100),'i')},{'color':'green','pattern':/(?:\d{1,3}\.){3}\d{1,3}/i},{'color':a11p(0x111),'pattern':/(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))/},{'color':a11p(0x105),'pattern':/\b(GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH)\b/},{'color':a11p(0x101),'pattern':/\b(successful|success|completed|complete|done)\b/i},{'color':a11p(0x11d),'pattern':/\b(failed|fail|stderr|error|err)\b/i},{'color':'gray','pattern':/\b(information|info|debug)\b/i},{'color':a11p(0x115),'pattern':/\b(warning|warn)\b/i},{'color':a11p(0x105),'pattern':/[0-9a-f]{64}/i},{'color':a11p(0x105),'pattern':/[0-9a-fA-F]{8}[-]?([0-9a-fA-F]{4}[-]?){3}[0-9a-fA-F]{12}/i}];const formatLogLine=(u,I)=>{const i=a11p,a=chalk_1[i(0xfb)][i(0x117)](u['ts'][i(0x112)]()),x=chalk_1[i(0xfb)][i(0x116)](u[i(0x11a)]),D=exports[i(0x10b)][i(0xfd)]((z,H)=>{const j=i;return z[j(0x103)](H[j(0x109)],s=>H[j(0x10f)]?chalk_1[j(0xfb)][H['color']](s):chalk_1[j(0xfb)][j(0x10a)](s));},u['log']),K=I?D[i(0x103)](new RegExp(I,'g'),z=>chalk_1[i(0xfb)][i(0x11c)](z)):D;console[i(0x10d)](a+'\x20'+x+i(0x113)+K);};exports['formatLogLine']=formatLogLine;function a11u(){const A=['18KWSdXR','containerId','8395Fsuaap','bold','red','default','9807192zxPrAo','reduce','11846060UIzhAm','2324eIwewi','s\x08(?!mailto:)(?:(?:http|https|ftp)://)(?:\x5cS+(?::\x5cS*)?@)?(?:(?:(?:[1-9]\x5cd?|1\x5cd\x5cd|2[01]\x5cd|22[0-3])(?:\x5c.(?:1?\x5cd{1,2}|2[0-4]\x5cd|25[0-5])){2}(?:\x5c.(?:[0-9]\x5cd?|1\x5cd\x5cd|2[0-4]\x5cd|25[0-4]))|(?:(?:[a-z\x5cu00a1-\x5cuffff0-9]+-?)*[a-z\x5cu00a1-\x5cuffff0-9]+)(?:\x5c.(?:[a-z\x5cu00a1-\x5cuffff0-9]+-?)*[a-z\x5cu00a1-\x5cuffff0-9]+)*(?:\x5c.(?:[a-z\x5cu00a1-\x5cuffff]{2,})))|localhost)(?::\x5cd{2,5})?(?:(/|\x5c?|#)[^\x5cs]*)?\x08s','greenBright','778446nJWwhc','replace','defineProperty','blue','__esModule','18ADNtws','35961kSJsMm','pattern','grey','defaultLogSyntax','7997139OhPCxi','log','__importDefault','color','formatLogLine','green','toISOString','\x20--\x20','chalk','yellow','cyan','dim','12859lNBpUH'];a11u=function(){return A;};return a11u();}
|
package/dist/metrics/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a12P=a12D;(function(C,D){const b=a12D,V=C();while(!![]){try{const Y=-parseInt(b(0x11d))/0x1+parseInt(b(0xf5))/0x2*(-parseInt(b(0x95))/0x3)+-parseInt(b(0x96))/0x4+parseInt(b(0xc2))/0x5*(-parseInt(b(0xeb))/0x6)+-parseInt(b(0xc8))/0x7*(-parseInt(b(0xd1))/0x8)+parseInt(b(0xba))/0x9*(-parseInt(b(0xc3))/0xa)+-parseInt(b(0x11b))/0xb*(-parseInt(b(0xe3))/0xc);if(Y===D)break;else V['push'](V['shift']());}catch(e){V['push'](V['shift']());}}}(a12C,0x78ecb));function a12D(C,D){const V=a12C();return a12D=function(Y,e){Y=Y-0x82;let T=V[Y];return T;},a12D(C,D);}var __awaiter=this&&this[a12P(0x90)]||function(C,D,V,Y){function e(T){return T instanceof V?T:new V(function(W){W(T);});}return new(V||(V=Promise))(function(T,W){const o=a12D;function f(i){try{G(Y['next'](i));}catch(I){W(I);}}function q(i){const g=a12D;try{G(Y[g(0xfc)](i));}catch(I){W(I);}}function G(i){const E=a12D;i[E(0xfd)]?T(i[E(0x9f)]):e(i['value'])[E(0xb9)](f,q);}G((Y=Y[o(0x10e)](C,D||[]))[o(0xa8)]());});},__importDefault=this&&this[a12P(0xda)]||function(C){const w=a12P;return C&&C[w(0xc1)]?C:{'default':C};};Object[a12P(0xd5)](exports,a12P(0xc1),{'value':!![]}),exports[a12P(0xe1)]=void 0x0;const js_client_1=require(a12P(0xe7)),utils_1=require(a12P(0xbe)),inquirer_helper_1=require('../inquirer-helper'),commander_1=require(a12P(0xf9)),terminal_chart_1=require('../formatting/terminal-chart'),console_format_helpers_1=require('../formatting/console-format-helpers'),chalk_1=__importDefault(require('chalk'));class CliMetrics{constructor(C){const A=a12P;this[A(0xb5)]=C,this['refreshInterval']=0x2710,this[A(0xdc)]=(D,V)=>{const N=A,Y=(0x0,utils_1[N(0xe2)])(!![])[N(0x99)]((V?'build-':'')+N(0x93))['alias']((V?N(0xd0):'')+'metric')[N(0x8f)](N(0xfb)+D)[N(0x8c)](N(0xcd),N(0x9e))[N(0x8c)]('--'+D+N(0x102)+D+N(0xf4),D[N(0xd4)](0x0)[N(0xd8)]()+D[N(0xa4)](0x1)+N(0xc6))['option'](N(0x110),N(0x10a))[N(0x8c)](N(0x9d),'Get\x20metrics\x20after\x20this\x20timestamp,\x20'+utils_1[N(0xbc)],utils_1['parseDateInput'])['option'](N(0xdb),'Get\x20metrics\x20before\x20this\x20timestamp,\x20'+utils_1[N(0xbc)],utils_1[N(0x10c)])['option'](N(0xb2),N(0xab))[N(0x115)](new commander_1[(N(0x9b))](N(0x104),N(0xe4))[N(0xac)](Object['values'](['format',N(0x83),N(0x98)])))[N(0x115)](new commander_1[(N(0x9b))]('-t,\x20--metricTypes\x20<metricTypes...>',N(0xb7))[N(0xac)](Object['values'](js_client_1['MetricType'])))[N(0x115)](new commander_1[(N(0x9b))](N(0x92),N(0x100)+utils_1[N(0xbc)])[N(0x103)](utils_1[N(0x10c)])[N(0xc9)]([N(0xff),N(0x8b)]))['option']('--noDefaults',N(0x105),![])['addOption'](new commander_1[(N(0x9b))](N(0x104),N(0xe4))[N(0xac)](Object[N(0x10b)]([N(0xa3),N(0x83),'yaml'])));if(V)Y['option']('--build\x20--buildId\x20[buildId]',N(0xa9));if(D===N(0x111))Y['option'](N(0xee),N(0x116));if(D==='service')Y[N(0x8c)](N(0xa0),N(0x8d));return Y;},this['printMetricsGraph']=(D,V)=>{return Y=>{const S=a12D,e=Object[S(0xf3)](Y)[S(0xd2)](T=>{const B=S,{values:W,metricInfo:f}=Y[T],{metricUnit:q,metricResolution:G}=f;return W[B(0xe6)](i=>{const H=B;var I,m;const {metadata:Q,data:J}=i,z=V?(V===null||V===void 0x0?void 0x0:V[H(0xcf)]())>new Date()[H(0xcf)]()?new Date():V:undefined,u=new Date((I=J===null||J===void 0x0?void 0x0:J[0x0])===null||I===void 0x0?void 0x0:I['ts']),L=new Date((m=J===null||J===void 0x0?void 0x0:J[J[H(0xed)]-0x1])===null||m===void 0x0?void 0x0:m['ts']),v=this['getPaddingDataStart'](D,u,G),k=this['getPaddingDataEnd'](z,L,G),s=[...v,...J,...k],h=s[H(0xe6)](M=>[new Date(M['ts'])['valueOf'](),Number(M['value'])])['filter'](M=>!Number[H(0xce)](M[0x0])),j=Math[H(0x108)](Math[H(0xc5)](process['stdout'][H(0xbf)]-0xa,0xa),0x64),U=Math[H(0x108)](Math[H(0xc5)](process['stdout'][H(0xde)]-0x9,0xa),0xf),t=q===H(0xaf)?0x64:undefined,y=q===H(0xaf)?'%':q,Z=(0x0,terminal_chart_1[H(0x8a)])(h,j),X=Z[H(0xe6)](M=>M[0x1]),p={'min':0x0,'height':U,'max':t,'unit':y,'startTs':D!==null&&D!==void 0x0?D:u,'endTs':z!==null&&z!==void 0x0?z:L};return{'dataSeries':X,'metadata':Q,'chartOpts':p,'metricInfo':f};});})[S(0xb4)]();if(e[S(0xed)]===0x0)(0x0,utils_1[S(0xe8)])(S(0xe0));else e[S(0xf6)](T=>{const K=S,{dataSeries:W,metadata:f,chartOpts:q,metricInfo:G}=T,{containerId:i,volumeId:I}=f,m=I?',\x20volume:\x20'+I:'';console[K(0x89)](G['metricId']+K(0x9a)+chalk_1[K(0xcb)][K(0xb6)](i)+m),console[K(0x89)]((0x0,terminal_chart_1[K(0x88)])(W,q));});};},this['printMetricsTable']=(D,V,Y)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const c=A;try{const T=yield this[c(0x8e)]['metrics'][c(0xd3)](D,V,Y);console[c(0x118)]();if(T['error'])(0x0,utils_1[c(0xa1)])(c(0xfe)+T[c(0xa1)]['message']);else this[c(0x10d)](T[c(0xa7)]);}catch(W){console[c(0x118)](),(0x0,utils_1[c(0xa1)])(c(0xfe)+W['message']);}}),this[A(0xd7)]=D=>{const d=A;if(D[d(0xa1)]){const V=JSON['stringify'](D[d(0xa1)]['details']);throw new Error('Error\x20while\x20fetching\x20metrics\x20entries:\x20'+D[d(0xa1)][d(0x82)]+'\x20'+V);}},this[A(0x112)]=(D,V,Y,e,T)=>{const O=A;if(T===!![])return;const {metricTypes:W,endTime:f,startTime:q,duration:G,containerId:i}=e,I=q?',\x20from:\x20'+q[O(0xbb)]():'',m=f?O(0x94)+f[O(0xbb)]():'',Q=G?O(0xec)+G+O(0xea):'',J=i?O(0xa5)+chalk_1[O(0xcb)][O(0xb6)](i):O(0x9c),z=D+'\x20'+chalk_1['default']['bold'](V)+O(0xf8)+chalk_1['default']['bold'](Y),u=''+I+m+Q,L=W?O(0xa2)+(W===null||W===void 0x0?void 0x0:W[O(0xf2)](',')):'';console[O(0x89)](O(0x101)+J+O(0xbd)+z+L+u);},this[A(0x97)]=new js_client_1[(A(0xe5))](C,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[A(0x107)]}),this[A(0x8e)]=this['apiClient'],this[A(0x10f)]=new inquirer_helper_1[(A(0xef))](this[A(0x97)]);}['getMetricsCommand'](C,D=![]){const C1=a12P,V=(f,q)=>__awaiter(this,void 0x0,void 0x0,function*(){const F=a12D,G=q[F(0x84)],{apiContext:i,inquirerHelper:I}=this;switch(C){case F(0x85):{const m=G?undefined:i[F(0x106)]();return q[F(0xad)]||m||(yield I[F(0xc7)](f)());}case F(0x111):{const Q=G?undefined:i[F(0x106)]();return q[F(0xcc)]||Q||(yield I[F(0xf0)](f)());}case'addon':{const J=G?undefined:i['getCurrentServiceName']();return q[F(0xaa)]||J||(yield I['askForAddon'](f)());}}}),Y=(f,q,G)=>__awaiter(this,void 0x0,void 0x0,function*(){const a=a12D;if(D)return G[a(0x119)]||(yield this['inquirerHelper'][a(0xf7)](f,C==='service'?q:undefined,C===a(0x111)?q:undefined,!![])());return undefined;}),e=(f,q,G)=>__awaiter(this,void 0x0,void 0x0,function*(){const R=a12D;if(!D&&G[R(0x11c)]!==undefined){if(G[R(0x11c)]!==!![])return G[R(0x11c)];return yield this['inquirerHelper'][R(0xf1)](f,C==='service'?q:undefined,C===R(0x111)?q:undefined,!![])();}return undefined;}),T=(f,q,G)=>__awaiter(this,void 0x0,void 0x0,function*(){const x=a12D;if(C==='job')return G['runId']||(yield this[x(0x10f)][x(0xb8)](q,f,!![])());return undefined;}),W=(f,q,G)=>__awaiter(this,void 0x0,void 0x0,function*(){const C0=a12D;if(C===C0(0x85)){if(G['deploymentId']!==!![])return G[C0(0xc4)];return G[C0(0xc4)];}return undefined;});return this[C1(0xdc)](C,D)['action'](f=>__awaiter(this,void 0x0,void 0x0,function*(){const C2=C1,{noDefaults:q,projectId:G,duration:i,timestamp:I,output:m,startTime:Q,endTime:J,metricTypes:z,quiet:u}=f;(0x0,utils_1[C2(0xb3)])(this[C2(0x97)]);if(Q&&J&&i)throw new Error(C2(0xfa));const {apiContext:L,inquirerHelper:v,metricsApiClient:k}=this,s=q?undefined:L[C2(0xd9)](),h=G||s||(yield v['askForProject']()),j=yield V(h,f),U=yield Y(h,j,f),t=yield T(h,j,f),y=yield W(h,j,f),Z=yield e(h,j,f),X={'projectId':h,'entityId':j},p={'containerName':Z,'startTime':Q,'endTime':J,'duration':i,'timestamp':I,'metricTypes':z,'runId':t,'buildId':U,'deploymentId':y,'isBuild':D!==null&&D!==void 0x0?D:![]},M=!(Q||J||i);if(!u&&m!=='yaml'&&m!==C2(0xb0)&&m!==C2(0x83))this['printInitInfo'](C,j,h,p,u);if(M){if(m!==undefined){const n=yield k[C2(0x93)]['metricsSingle'](X,p,C);this[C2(0xd7)](n),(0x0,console_format_helpers_1[C2(0xd6)])(m,n['data']);}else[...Array(process[C2(0x91)][C2(0xde)]-0x1)][C2(0xf6)]((r,l)=>l===0x0?console[C2(0x89)]('Fetching\x20data..'):console['log']()),yield this[C2(0x113)](X,p,C)(),setInterval(this[C2(0x113)](X,p,C),this[C2(0x114)]),yield new Promise(l=>setTimeout(l,this['refreshInterval']*0x64));}else{const r=yield k['metrics'][C2(0xe9)](X,p,C);this[C2(0xd7)](r),m!==undefined?(0x0,console_format_helpers_1['printResponse'])(m,r[C2(0xa7)]):this[C2(0x11a)](Q,J!==null&&J!==void 0x0?J:new Date())(r[C2(0xa7)]);}process['exit']();}));}[a12P(0x10d)](C){const C5=a12P,D=(e,T)=>{const C3=a12D;if(!(T===null||T===void 0x0?void 0x0:T[C3(0x9f)]))C3(0xdd);const W=e[C3(0x109)]===C3(0xaf)?'%':e['metricUnit'];return''+Number(T===null||T===void 0x0?void 0x0:T['value'])[C3(0xa6)](0x3)+W;},V=e=>{const C4=a12D;if(!(e===null||e===void 0x0?void 0x0:e['ts']))C4(0xdd);return e['ts']['toTimeString']()[C4(0xc0)]('\x20')[0x0];},Y={};Object[C5(0xf3)](C)[C5(0xf6)](e=>{const C6=C5,{values:T,metricInfo:W}=C[e];return T[C6(0xf6)](f=>{const C7=C6;var q,G;const i=f[C7(0x87)][C7(0x11c)];Object[C7(0x11e)](Y,{[i]:Object['assign'](Object[C7(0x11e)]({},Y===null||Y===void 0x0?void 0x0:Y[i]),{[C7(0xca)]:V((q=f['data'])===null||q===void 0x0?void 0x0:q[0x0]),'containerId':i,[W[C7(0xb1)]]:D(W,(G=f[C7(0xa7)])===null||G===void 0x0?void 0x0:G[0x0])})});});}),(0x0,console_format_helpers_1[C5(0xae)])(Object[C5(0x10b)](Y),'Metrics\x20overview');}[a12P(0x86)](C,D,V){const C8=a12P,Y=W=>new Date(W[C8(0xcf)]()-e),e=V*0x3e8;if(!C)return[];if(!D)return[];if(Y(D)[C8(0xcf)]()<C[C8(0xcf)]())return[];const T=[{'ts':Y(D),'value':0x0}];while(Y(T[T[C8(0xed)]-0x1]['ts'])[C8(0xcf)]()<=C[C8(0xcf)]()){T[C8(0x117)]({'ts':Y(T[T['length']-0x1]['ts']),'value':0x0});}return T;}[a12P(0xdf)](C,D,V){const C9=a12P,Y=W=>new Date(W['getTime']()+e),e=V*0x3e8;if(!C)return[];if(!D)return[];if(Y(D)[C9(0xcf)]()>C[C9(0xcf)]())return[];const T=[{'ts':Y(D),'value':0x0}];while(Y(T[T[C9(0xed)]-0x1]['ts'])[C9(0xcf)]()<=C['getTime']()){T['push']({'ts':Y(T[T['length']-0x1]['ts']),'value':0x0});}return T;}}exports[a12P(0xe1)]=CliMetrics;function a12C(){const CC=['--container\x20--containerId\x20[NAME]','job','printInitInfo','printMetricsTable','refreshInterval','addOption','Job\x20run\x20id,\x20example:\x20162b1977-6636-4000-929b-cc265b862ff0','unshift','clear','buildId','printMetricsGraph','11ctrAQx','containerId','660447rdscWl','assign','message','json','noDefaults','service','getPaddingDataStart','metadata','getAsciiChart','log','downSampleData','endTime','option','Deployment\x20id,\x20example:\x20my-service-54785f4','metricsApiClient','description','__awaiter','stdout','--timestamp\x20[timestamp]','metrics',',\x20to:\x20','174GafZxB','3903548vscaqA','apiClient','yaml','name','\x20for\x20container:\x20','Option','all\x20containers','--startTime\x20<timestamp>','Project\x20for\x20logs','value','--deployment\x20--deploymentId\x20[deploymentId]','error',',\x20metric\x20types:\x20','format','slice','container\x20','toFixed','data','next','Build\x20to\x20get\x20logs\x20from','addonId','Length\x20of\x20timespan\x20in\x20seconds.\x20Only\x20valid\x20if\x20not\x20both,\x20startTime\x20and\x20endTime\x20are\x20set','choices','serviceId','printAsTable','pct','yml','metricId','--duration\x20[duration]','assertContextExisting','flat','apiContext','bold','Which\x20metric\x20type\x20to\x20fetch','askForJobRun','then','27CcfyFg','toISOString','tsHint','\x20of\x20','../utils','columns','split','__esModule','20arwVSQ','397950tnIpwM','deploymentId','max','\x20to\x20get\x20logs\x20from','askForService','28Tfyavg','conflicts','time','default','jobId','--project\x20--projectId\x20[NAME]','isNaN','getTime','build-','277896uZQxBU','flatMap','metricsSingle','charAt','defineProperty','printResponse','handleError','toUpperCase','getCurrentProjectName','__importDefault','--endTime\x20<timestamp>','getStandardMetricsCommand','N/A','rows','getPaddingDataEnd','No\x20metrics\x20found\x20for\x20this\x20query','CliMetrics','getCommand','31801416HASFdu','Output\x20formatting.\x20Will\x20use\x20advanced\x20formatting\x20by\x20default.','ApiClient','map','@northflank/js-client','warning','metricsRange','\x20seconds','309768xJYyWB',',\x20duration:\x20','length','--run\x20--runId\x20[runId]','InquirerHelper','askForJob','askForContainer','join','keys','Id\x20[NAME]','11432IBAumz','forEach','askForBuild','\x20in\x20project\x20','commander','Only\x20two\x20of\x20\x27startTime\x27,\x20\x27endTime\x27\x20and\x20\x27duration\x27\x20can\x20be\x20set.','Get\x20metrics\x20for\x20the\x20specified\x20','throw','done','Error\x20while\x20fetching\x20metrics\x20entries:\x20','startTime','Get\x20metrics\x20at\x20this\x20exact\x20timestamp,\x20if\x20no\x20timestamp\x20set\x20most\x20recent\x20time\x20is\x20used.\x20','Metrics\x20for\x20','\x20--','argParser','-o,\x20--output\x20[output]','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','getCurrentServiceName','customUserAgent','min','metricUnit','Container\x20to\x20exec\x20into\x20(logs\x20from\x20all\x20containers\x20will\x20be\x20shown\x20if\x20not\x20specified)','values','parseDateInput','printMetricsSingle','apply','inquirerHelper'];a12C=function(){return CC;};return a12C();}
|
|
1
|
+
'use strict';const a12J=a12I;function a12I(u,I){const a=a12u();return a12I=function(x,D){x=x-0xe5;let K=a[x];return K;},a12I(u,I);}(function(u,I){const B=a12I,a=u();while(!![]){try{const x=-parseInt(B(0x158))/0x1+parseInt(B(0x10b))/0x2+-parseInt(B(0xe5))/0x3+parseInt(B(0x134))/0x4*(parseInt(B(0x105))/0x5)+parseInt(B(0x135))/0x6*(-parseInt(B(0xed))/0x7)+parseInt(B(0x16d))/0x8*(-parseInt(B(0x123))/0x9)+-parseInt(B(0x147))/0xa*(-parseInt(B(0x10f))/0xb);if(x===I)break;else a['push'](a['shift']());}catch(D){a['push'](a['shift']());}}}(a12u,0x50652));var __awaiter=this&&this[a12J(0x15a)]||function(u,I,a,x){function D(K){return K instanceof a?K:new a(function(z){z(K);});}return new(a||(a=Promise))(function(K,z){const U=a12I;function H(p){const V=a12I;try{C(x[V(0xea)](p));}catch(b){z(b);}}function s(p){const y=a12I;try{C(x[y(0x156)](p));}catch(b){z(b);}}function C(p){const e=a12I;p['done']?K(p[e(0xfc)]):D(p[e(0xfc)])['then'](H,s);}C((x=x[U(0x16f)](u,I||[]))['next']());});},__importDefault=this&&this[a12J(0x144)]||function(u){return u&&u['__esModule']?u:{'default':u};};Object['defineProperty'](exports,a12J(0xee),{'value':!![]}),exports[a12J(0x138)]=void 0x0;const js_client_1=require(a12J(0x112)),utils_1=require(a12J(0x101)),inquirer_helper_1=require(a12J(0x116)),commander_1=require(a12J(0x172)),terminal_chart_1=require(a12J(0x143)),console_format_helpers_1=require('../formatting/console-format-helpers'),chalk_1=__importDefault(require(a12J(0xf9)));function a12u(){const u9=['askForAddon','pct','alias','containerId','Container\x20to\x20exec\x20into\x20(logs\x20from\x20all\x20containers\x20will\x20be\x20shown\x20if\x20not\x20specified)','getCurrentProjectName','chalk','startTime','description','value','getAsciiChart','clear','askForBuild','getMetricsCommand','../utils',',\x20from:\x20','InquirerHelper','error','565uDyyrw','parseDateInput','argParser','Which\x20metric\x20type\x20to\x20fetch','getStandardMetricsCommand','conflicts','507836sYXfWG','details','Get\x20metrics\x20for\x20the\x20specified\x20','noDefaults','66awhPJl','--build\x20--buildId\x20[buildId]',',\x20to:\x20','@northflank/js-client',',\x20volume:\x20','-o,\x20--output\x20[output]','-t,\x20--metricTypes\x20<metricTypes...>','../inquirer-helper','printMetricsSingle','handleError','tsHint','warning','yaml','No\x20metrics\x20found\x20for\x20this\x20query','Deployment\x20id,\x20example:\x20my-service-54785f4','min','ApiClient','N/A','deploymentId','log','198UurZuL','assign','option','getPaddingDataEnd','Get\x20metrics\x20after\x20this\x20timestamp,\x20','Error\x20while\x20fetching\x20metrics\x20entries:\x20','forEach','getTime','printResponse','length','\x20for\x20container:\x20','askForProject','flat','map','stdout','printInitInfo','data','3756WvdWDc','151302KlacRR','isNaN','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','CliMetrics','message','Metrics\x20overview','job','\x20to\x20get\x20logs\x20from','downSampleData','printMetricsTable','split','printMetricsGraph','metricsRange','bold','../formatting/terminal-chart','__importDefault','service','toTimeString','1147610zCJtOK','inquirerHelper','customUserAgent','Id\x20[NAME]','--noDefaults','default','Only\x20two\x20of\x20\x27startTime\x27,\x20\x27endTime\x27\x20and\x20\x27duration\x27\x20can\x20be\x20set.','values','toUpperCase','getCurrentServiceName','MetricType','format','json','metrics','Project\x20for\x20logs','throw','toISOString','206731OMLDmo','addOption','__awaiter','apiClient','askForContainer','build-','--timestamp\x20[timestamp]','metadata','Get\x20metrics\x20at\x20this\x20exact\x20timestamp,\x20if\x20no\x20timestamp\x20set\x20most\x20recent\x20time\x20is\x20used.\x20','metricUnit','flatMap','--endTime\x20<timestamp>','\x20--','Fetching\x20data..','all\x20containers','Option','columns','--container\x20--containerId\x20[NAME]','metricsApiClient','printAsTable','toFixed','22624pvcXzV','Length\x20of\x20timespan\x20in\x20seconds.\x20Only\x20valid\x20if\x20not\x20both,\x20startTime\x20and\x20endTime\x20are\x20set','apply','push','rows','commander','metricId','metricsSingle','addonId','metric','670179VaXHMF','\x20seconds','Output\x20formatting.\x20Will\x20use\x20advanced\x20formatting\x20by\x20default.','choices','yml','next','getPaddingDataStart','askForJob','63tyLAVX','__esModule','\x20in\x20project\x20','--project\x20--projectId\x20[NAME]','refreshInterval','stringify'];a12u=function(){return u9;};return a12u();}class CliMetrics{constructor(u){const S=a12J;this['apiContext']=u,this[S(0xf1)]=0x2710,this['getStandardMetricsCommand']=(I,a)=>{const n=S,x=(0x0,utils_1['getCommand'])(!![])['name']((a?'build-':'')+n(0x154))[n(0xf5)]((a?n(0x15d):'')+n(0x176))[n(0xfb)](n(0x10d)+I)[n(0x125)](n(0xf0),n(0x155))[n(0x125)]('--'+I+n(0x164)+I+n(0x14a),I['charAt'](0x0)[n(0x14f)]()+I['slice'](0x1)+n(0x13c))[n(0x125)](n(0x169),n(0xf7))['option']('--startTime\x20<timestamp>',n(0x127)+utils_1['tsHint'],utils_1['parseDateInput'])['option'](n(0x163),'Get\x20metrics\x20before\x20this\x20timestamp,\x20'+utils_1['tsHint'],utils_1[n(0x106)])['option']('--duration\x20[duration]',n(0x16e))[n(0x159)](new commander_1[(n(0x167))](n(0x114),n(0xe7))[n(0xe8)](Object['values']([n(0x152),n(0x153),'yaml'])))[n(0x159)](new commander_1[(n(0x167))](n(0x115),n(0x108))[n(0xe8)](Object['values'](js_client_1[n(0x151)])))[n(0x159)](new commander_1[(n(0x167))](n(0x15e),n(0x160)+utils_1[n(0x119)])[n(0x107)](utils_1[n(0x106)])[n(0x10a)]([n(0xfa),'endTime']))[n(0x125)](n(0x14b),n(0x137),![])[n(0x159)](new commander_1[(n(0x167))](n(0x114),'Output\x20formatting.\x20Will\x20use\x20advanced\x20formatting\x20by\x20default.')[n(0xe8)](Object[n(0x14e)](['format',n(0x153),n(0x11b)])));if(a)x[n(0x125)](n(0x110),'Build\x20to\x20get\x20logs\x20from');if(I==='job')x[n(0x125)]('--run\x20--runId\x20[runId]','Job\x20run\x20id,\x20example:\x20162b1977-6636-4000-929b-cc265b862ff0');if(I==='service')x[n(0x125)]('--deployment\x20--deploymentId\x20[deploymentId]',n(0x11d));return x;},this['printMetricsGraph']=(I,a)=>{return x=>{const L=a12I,D=Object['keys'](x)[L(0x162)](K=>{const {values:z,metricInfo:H}=x[K],{metricUnit:s,metricResolution:C}=H;return z['map'](p=>{const g=a12I;var b,i;const {metadata:j,data:A}=p,F=a?(a===null||a===void 0x0?void 0x0:a[g(0x12a)]())>new Date()['getTime']()?new Date():a:undefined,X=new Date((b=A===null||A===void 0x0?void 0x0:A[0x0])===null||b===void 0x0?void 0x0:b['ts']),T=new Date((i=A===null||A===void 0x0?void 0x0:A[A[g(0x12c)]-0x1])===null||i===void 0x0?void 0x0:i['ts']),E=this['getPaddingDataStart'](I,X,C),f=this[g(0x126)](F,T,C),N=[...E,...A,...f],P=N[g(0x130)](o=>[new Date(o['ts'])['valueOf'](),Number(o['value'])])['filter'](o=>!Number[g(0x136)](o[0x0])),m=Math[g(0x11e)](Math['max'](process[g(0x131)][g(0x168)]-0xa,0xa),0x64),k=Math[g(0x11e)](Math['max'](process[g(0x131)]['rows']-0x9,0xa),0xf),R=s===g(0xf4)?0x64:undefined,q=s===g(0xf4)?'%':s,c=(0x0,terminal_chart_1[g(0x13d)])(P,m),M=c[g(0x130)](o=>o[0x1]),r={'min':0x0,'height':k,'max':R,'unit':q,'startTs':I!==null&&I!==void 0x0?I:X,'endTs':F!==null&&F!==void 0x0?F:T};return{'dataSeries':M,'metadata':j,'chartOpts':r,'metricInfo':H};});})[L(0x12f)]();if(D[L(0x12c)]===0x0)(0x0,utils_1[L(0x11a)])(L(0x11c));else D['forEach'](K=>{const l=L,{dataSeries:z,metadata:H,chartOpts:s,metricInfo:C}=K,{containerId:p,volumeId:b}=H,i=b?l(0x113)+b:'';console[l(0x122)](C['metricId']+l(0x12d)+chalk_1['default'][l(0x142)](p)+i),console[l(0x122)]((0x0,terminal_chart_1[l(0xfd)])(z,s));});};},this[S(0x13e)]=(I,a,x)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Z=S;try{const D=yield this[Z(0x16a)][Z(0x154)][Z(0x174)](I,a,x);console[Z(0xfe)]();if(D[Z(0x104)])(0x0,utils_1['error'])(Z(0x128)+D[Z(0x104)][Z(0x139)]);else this['printMetricsSingle'](D[Z(0x133)]);}catch(K){console['clear'](),(0x0,utils_1[Z(0x104)])(Z(0x128)+K[Z(0x139)]);}}),this[S(0x118)]=I=>{const G=S;if(I[G(0x104)]){const a=JSON[G(0xf2)](I[G(0x104)][G(0x10c)]);throw new Error(G(0x128)+I[G(0x104)]['message']+'\x20'+a);}},this[S(0x132)]=(I,a,x,D,K)=>{const O=S;if(K===!![])return;const {metricTypes:z,endTime:H,startTime:s,duration:C,containerId:p}=D,b=s?O(0x102)+s[O(0x157)]():'',i=H?O(0x111)+H[O(0x157)]():'',j=C?',\x20duration:\x20'+C+O(0xe6):'',A=p?'container\x20'+chalk_1['default'][O(0x142)](p):O(0x166),F=I+'\x20'+chalk_1[O(0x14c)][O(0x142)](a)+O(0xef)+chalk_1[O(0x14c)]['bold'](x),X=''+b+i+j,T=z?',\x20metric\x20types:\x20'+(z===null||z===void 0x0?void 0x0:z['join'](',')):'';console[O(0x122)]('Metrics\x20for\x20'+A+'\x20of\x20'+F+T+X);},this[S(0x15b)]=new js_client_1[(S(0x11f))](u,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[S(0x149)]}),this[S(0x16a)]=this['apiClient'],this[S(0x148)]=new inquirer_helper_1[(S(0x103))](this['apiClient']);}[a12J(0x100)](u,I=![]){const u0=a12J,a=(H,s)=>__awaiter(this,void 0x0,void 0x0,function*(){const Q=a12I,C=s[Q(0x10e)],{apiContext:p,inquirerHelper:b}=this;switch(u){case Q(0x145):{const i=C?undefined:p[Q(0x150)]();return s['serviceId']||i||(yield b['askForService'](H)());}case Q(0x13b):{const j=C?undefined:p[Q(0x150)]();return s['jobId']||j||(yield b[Q(0xec)](H)());}case'addon':{const A=C?undefined:p['getCurrentServiceName']();return s[Q(0x175)]||A||(yield b[Q(0xf3)](H)());}}}),x=(H,s,C)=>__awaiter(this,void 0x0,void 0x0,function*(){const d=a12I;if(I)return C['buildId']||(yield this[d(0x148)][d(0xff)](H,u===d(0x145)?s:undefined,u===d(0x13b)?s:undefined,!![])());return undefined;}),D=(H,s,C)=>__awaiter(this,void 0x0,void 0x0,function*(){const v=a12I;if(!I&&C['containerId']!==undefined){if(C[v(0xf6)]!==!![])return C[v(0xf6)];return yield this[v(0x148)][v(0x15c)](H,u===v(0x145)?s:undefined,u===v(0x13b)?s:undefined,!![])();}return undefined;}),K=(H,s,C)=>__awaiter(this,void 0x0,void 0x0,function*(){const t=a12I;if(u===t(0x13b))return C['runId']||(yield this['inquirerHelper']['askForJobRun'](s,H,!![])());return undefined;}),z=(H,s,C)=>__awaiter(this,void 0x0,void 0x0,function*(){const Y=a12I;if(u===Y(0x145)){if(C[Y(0x121)]!==!![])return C[Y(0x121)];return C[Y(0x121)];}return undefined;});return this[u0(0x109)](u,I)['action'](H=>__awaiter(this,void 0x0,void 0x0,function*(){const u1=u0,{noDefaults:s,projectId:C,duration:p,timestamp:b,output:i,startTime:j,endTime:A,metricTypes:F,quiet:X}=H;(0x0,utils_1['assertContextExisting'])(this['apiClient']);if(j&&A&&p)throw new Error(u1(0x14d));const {apiContext:T,inquirerHelper:E,metricsApiClient:f}=this,N=s?undefined:T[u1(0xf8)](),P=C||N||(yield E[u1(0x12e)]()),m=yield a(P,H),k=yield x(P,m,H),R=yield K(P,m,H),q=yield z(P,m,H),c=yield D(P,m,H),M={'projectId':P,'entityId':m},r={'containerName':c,'startTime':j,'endTime':A,'duration':p,'timestamp':b,'metricTypes':F,'runId':R,'buildId':k,'deploymentId':q,'isBuild':I!==null&&I!==void 0x0?I:![]},o=!(j||A||p);if(!X&&i!==u1(0x11b)&&i!==u1(0xe9)&&i!==u1(0x153))this[u1(0x132)](u,m,P,r,X);if(o){if(i!==undefined){const w=yield f[u1(0x154)]['metricsSingle'](M,r,u);this[u1(0x118)](w),(0x0,console_format_helpers_1[u1(0x12b)])(i,w[u1(0x133)]);}else[...Array(process[u1(0x131)][u1(0x171)]-0x1)]['forEach']((h,W)=>W===0x0?console[u1(0x122)](u1(0x165)):console['log']()),yield this[u1(0x13e)](M,r,u)(),setInterval(this[u1(0x13e)](M,r,u),this[u1(0xf1)]),yield new Promise(h=>setTimeout(h,this[u1(0xf1)]*0x64));}else{const h=yield f['metrics'][u1(0x141)](M,r,u);this['handleError'](h),i!==undefined?(0x0,console_format_helpers_1[u1(0x12b)])(i,h['data']):this[u1(0x140)](j,A!==null&&A!==void 0x0?A:new Date())(h[u1(0x133)]);}process['exit']();}));}[a12J(0x117)](u){const u6=a12J,I=(D,K)=>{const u2=a12I;if(!(K===null||K===void 0x0?void 0x0:K[u2(0xfc)]))'N/A';const z=D[u2(0x161)]===u2(0xf4)?'%':D[u2(0x161)];return''+Number(K===null||K===void 0x0?void 0x0:K[u2(0xfc)])[u2(0x16c)](0x3)+z;},a=D=>{const u3=a12I;if(!(D===null||D===void 0x0?void 0x0:D['ts']))u3(0x120);return D['ts'][u3(0x146)]()[u3(0x13f)]('\x20')[0x0];},x={};Object['keys'](u)['forEach'](D=>{const u4=a12I,{values:K,metricInfo:z}=u[D];return K[u4(0x129)](H=>{const u5=u4;var s,C;const p=H[u5(0x15f)][u5(0xf6)];Object[u5(0x124)](x,{[p]:Object['assign'](Object[u5(0x124)]({},x===null||x===void 0x0?void 0x0:x[p]),{['time']:a((s=H[u5(0x133)])===null||s===void 0x0?void 0x0:s[0x0]),'containerId':p,[z[u5(0x173)]]:I(z,(C=H[u5(0x133)])===null||C===void 0x0?void 0x0:C[0x0])})});});}),(0x0,console_format_helpers_1[u6(0x16b)])(Object[u6(0x14e)](x),u6(0x13a));}[a12J(0xeb)](u,I,a){const u7=a12J,x=z=>new Date(z[u7(0x12a)]()-D),D=a*0x3e8;if(!u)return[];if(!I)return[];if(x(I)[u7(0x12a)]()<u['getTime']())return[];const K=[{'ts':x(I),'value':0x0}];while(x(K[K[u7(0x12c)]-0x1]['ts'])[u7(0x12a)]()<=u[u7(0x12a)]()){K['unshift']({'ts':x(K[K[u7(0x12c)]-0x1]['ts']),'value':0x0});}return K;}[a12J(0x126)](u,I,a){const u8=a12J,x=z=>new Date(z['getTime']()+D),D=a*0x3e8;if(!u)return[];if(!I)return[];if(x(I)[u8(0x12a)]()>u['getTime']())return[];const K=[{'ts':x(I),'value':0x0}];while(x(K[K['length']-0x1]['ts'])[u8(0x12a)]()<=u['getTime']()){K[u8(0x170)]({'ts':x(K[K[u8(0x12c)]-0x1]['ts']),'value':0x0});}return K;}}exports[a12J(0x138)]=CliMetrics;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a13T=a13I;(function(u,I){const i=a13I,a=u();while(!![]){try{const x=-parseInt(i(0xba))/0x1*(parseInt(i(0xb5))/0x2)+parseInt(i(0xa1))/0x3*(-parseInt(i(0x95))/0x4)+parseInt(i(0xaa))/0x5+parseInt(i(0xa9))/0x6*(-parseInt(i(0xa0))/0x7)+parseInt(i(0xa2))/0x8+parseInt(i(0x90))/0x9*(parseInt(i(0xb1))/0xa)+parseInt(i(0xa4))/0xb*(parseInt(i(0x94))/0xc);if(x===I)break;else a['push'](a['shift']());}catch(D){a['push'](a['shift']());}}}(a13u,0x2305a));function a13u(){const q=['down','3563967XhFRhb','__esModule','nextPageCursor','loadMore','loading','858qpHZYw','536680QTwkpx','..\x20Load\x20more\x20options\x20..','apply','choices','default','map','onDownKey','3200mPNhNo','defineProperty','catch','handleDynamicPageLoad','50tcyHpi','throw','italic','selected','__importDefault','6733XxBOQn','inquirer/lib/objects/choice','\x20Loading\x20more\x20options','5922pWegVw','chalk','reloadText','length','12xYsAeZ','8200cHxOyU','value','render','opt','pagOpt','loop','then','name','realLength','push','next','11739CEIpDf','261kVAWcZ','704344uVgpWR'];a13u=function(){return q;};return a13u();}function a13I(u,I){const a=a13u();return a13I=function(x,D){x=x-0x90;let K=a[x];return K;},a13I(u,I);}var __awaiter=this&&this['__awaiter']||function(u,I,a,x){function D(K){return K instanceof a?K:new a(function(z){z(K);});}return new(a||(a=Promise))(function(K,z){const X=a13I;function H(p){const j=a13I;try{C(x[j(0x9f)](p));}catch(b){z(b);}}function s(p){const A=a13I;try{C(x[A(0xb6)](p));}catch(b){z(b);}}function C(p){const F=a13I;p['done']?K(p[F(0x96)]):D(p[F(0x96)])[F(0x9b)](H,s);}C((x=x[X(0xac)](u,I||[]))[X(0x9f)]());});},__importDefault=this&&this[a13T(0xb9)]||function(u){const E=a13T;return u&&u[E(0xa5)]?u:{'default':u};};Object[a13T(0xb2)](exports,'__esModule',{'value':!![]}),exports['DynamicReloadPaginationPrompt']=void 0x0;const list_1=__importDefault(require('inquirer/lib/prompts/list')),choice_1=__importDefault(require(a13T(0xbb))),chalk_1=__importDefault(require(a13T(0x91)));function incrementListIndex(u,I,a){const f=a13T,x=a['choices'][f(0x9d)],D=f(0x9a)in a?Boolean(a[f(0x9a)]):!![];if(I==='up'){if(u>0x0)return u-0x1;return D?x-0x1:u;}if(I===f(0xa3)){if(u<x-0x1)return u+0x1;return D?0x0:u;}throw new Error('dir\x20must\x20be\x20up\x20or\x20down');}class DynamicReloadPaginationPrompt extends list_1['default']{constructor(u,I,x){const N=a13T;super(u,I,x),this[N(0x92)]=chalk_1[N(0xae)]['italic'](N(0xab)),this[N(0xa8)]=![],this[N(0x99)]=this['opt'],this[N(0xa6)]=this['pagOpt'][N(0xa6)],this[N(0xa6)]!==undefined&&this[N(0x98)][N(0xad)][N(0x9e)](new choice_1[(N(0xae))](this[N(0x92)],this[N(0x92)]));}['onUpKey'](){const P=a13T;if(this['loading'])return;this[P(0xb8)]=incrementListIndex(this[P(0xb8)],'up',this['opt']),this[P(0x97)]();}[a13T(0xb0)](){return __awaiter(this,void 0x0,void 0x0,function*(){const m=a13I;if(this[m(0xa8)])return;this[m(0xb8)]=incrementListIndex(this['selected'],m(0xa3),this[m(0x98)]),yield this[m(0xb4)](),this[m(0x97)]();});}[a13T(0xb4)](){return __awaiter(this,void 0x0,void 0x0,function*(){const k=a13I;if(this[k(0xb8)]>=this[k(0x98)][k(0xad)][k(0x93)]-0x1){if(this[k(0xa6)]===undefined)return;this[k(0xa8)]=!![];let u=0x0;const I=setInterval(()=>{const R=k,K=['⠋','⠙','⠹','⠸','⠼','⠴','⠦','⠧','⠇','⠏'],z=chalk_1[R(0xae)][R(0xb7)](K[u%K['length']]+R(0xbc));this[R(0x98)][R(0xad)][R(0xad)][this[R(0xb8)]][R(0x9c)]=''+z,u+=0x1,this[R(0x97)]();},0x50),{elements:a,nextPageCursor:x}=yield this[k(0x99)][k(0xa7)]({'nextPageCursor':this['nextPageCursor']})[k(0xb3)](()=>({'elements':[],'nextPageCursor':undefined}));this[k(0xa6)]=x;const D=a[k(0xaf)](K=>new choice_1[(k(0xae))](K,K));this[k(0x98)][k(0xad)]['choices']['splice'](this[k(0xb8)],0x1),this['opt']['choices'][k(0x9e)](...D),x!==undefined&&this[k(0x98)][k(0xad)]['push'](new choice_1[(k(0xae))](this[k(0x92)],this[k(0x92)])),clearInterval(I),this['loading']=![];}});}}exports['DynamicReloadPaginationPrompt']=DynamicReloadPaginationPrompt;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a14u=
|
|
1
|
+
'use strict';function a14I(u,I){const a=a14u();return a14I=function(x,D){x=x-0x69;let K=a[x];return K;},a14I(u,I);}const a14j=a14I;(function(u,I){const i=a14I,a=u();while(!![]){try{const x=parseInt(i(0x6a))/0x1*(parseInt(i(0x76))/0x2)+-parseInt(i(0x8d))/0x3*(parseInt(i(0x71))/0x4)+-parseInt(i(0x85))/0x5*(-parseInt(i(0x75))/0x6)+parseInt(i(0x88))/0x7*(-parseInt(i(0x72))/0x8)+parseInt(i(0x86))/0x9*(parseInt(i(0x8c))/0xa)+-parseInt(i(0x7b))/0xb+-parseInt(i(0x70))/0xc;if(x===I)break;else a['push'](a['shift']());}catch(D){a['push'](a['shift']());}}}(a14u,0x28cca));var __awaiter=this&&this[a14j(0x73)]||function(u,I,a,x){function D(K){return K instanceof a?K:new a(function(z){z(K);});}return new(a||(a=Promise))(function(K,z){const X=a14I;function H(p){try{C(x['next'](p));}catch(b){z(b);}}function s(p){const A=a14I;try{C(x[A(0x6e)](p));}catch(b){z(b);}}function C(p){const F=a14I;p[F(0x7c)]?K(p[F(0x77)]):D(p['value'])[F(0x74)](H,s);}C((x=x[X(0x69)](u,I||[]))[X(0x6f)]());});};Object[a14j(0x91)](exports,a14j(0x8a),{'value':!![]}),exports[a14j(0x6d)]=void 0x0;class PaginationHelper{constructor(u,I,a,x){const T=a14j;this['endpoint']=u,this[T(0x83)]=I,this['options']=a,this[T(0x7e)]=x,this[T(0x7f)]=null,this[T(0x7a)]=0x0,this['hasNext']=()=>this[T(0x7f)]!==undefined;}get[a14j(0x8b)](){const E=a14j;return this[E(0x7a)];}['getNext'](){var u,I;return __awaiter(this,void 0x0,void 0x0,function*(){const f=a14I,{data:a,request:x,error:D,pagination:K,rawResponse:z}=yield this['endpoint'][f(0x79)]({'parameters':this[f(0x83)],'options':Object[f(0x82)](Object[f(0x82)]({},this[f(0x84)]),{'cursor':(u=this[f(0x7f)])!==null&&u!==void 0x0?u:undefined}),'data':this[f(0x7e)]});return this[f(0x7f)]=K===null||K===void 0x0?void 0x0:K['cursor'],this[f(0x7a)]+=(I=K===null||K===void 0x0?void 0x0:K[f(0x87)])!==null&&I!==void 0x0?I:0x0,{'data':a,'request':x,'error':D,'pagination':K,'rawResponse':z};});}[a14j(0x6b)](){var u,I;return __awaiter(this,void 0x0,void 0x0,function*(){const N=a14I,a=[];while(this[N(0x89)]()){const x=yield this[N(0x81)]();if(x[N(0x90)])return x;a[N(0x7d)](x);}return{'data':a['map'](D=>{const P=N,K=Object[P(0x6c)](D[P(0x8f)]);if(K[P(0x8e)]===0x1)return D[P(0x8f)][K[0x0]];return D[P(0x8f)];})['flat'](),'request':(u=a[0x0])===null||u===void 0x0?void 0x0:u[N(0x80)],'rawResponse':(I=a[0x0])===null||I===void 0x0?void 0x0:I[N(0x78)]};});}}function a14u(){const m=['done','push','payload','cursor','request','getNext','assign','parameters','options','1483005Qtlsqy','1503lafKJQ','count','28dIlxxN','hasNext','__esModule','currentOffset','15200EvXOVh','6YLgKXD','length','data','error','defineProperty','apply','314817ROfoRK','getAll','keys','PaginationHelper','throw','next','1173288tSKfKb','298492EZgKug','416792uONzwF','__awaiter','then','6ViOUqK','2CKauoG','value','rawResponse','call','_currentOffset','2670008rFXyrP'];a14u=function(){return m;};return a14u();}exports['PaginationHelper']=PaginationHelper;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function a15C(){const R=['2385624PeWudy','defineProperty','stop','--noDefaults','__importDefault','CliPortForward','--skipHostnames','Please\x20ensure\x20the\x20','getCommand','configurable','46672SknHKn','default','get','\x20with\x20these\x20hostnames:','protocol','with\x20hostname:\x20','addon','C:/Windows/System32/drivers/etc/hosts','330774IPlNwu','Stop\x20forwarding\x20traffic\x20from\x20','create','\x20mode.\x20If\x20hostname\x20forwarding\x20is\x20required,\x20remove\x20','call','__esModule','writable','bold','connection-error','platform','\x20and\x20','\x20flag\x20or\x20manually\x20append\x20following\x20entry\x20to\x20your\x20hosts\x20file\x20(','forwardAddon','../inquirer-helper','42HWFcPJ','forwardService','\x20with\x20multiple\x20ports:','ApiClient','1913382FjwKoh','all','map','forwardProject','option','\x27:\x20\x22','value','Failed:\x20','type','join','\x20is\x20exposed\x20on\x20','\x20service\x20ports','Running\x20in\x20','hosts','--service\x20--serviceId\x20[NAME]','noDefaultsText','../utils','Forwarding\x20addon\x20','@northflank/js-client','\x20in\x20project\x20','description','Addon\x20to\x20forward','success','forEach','log','\x20is\x20exposed\x20with\x20multiple\x20','Port-forwarding\x20for\x20the\x20specified\x20service','\x20is\x20running\x20and\x20reachable.','2840310VgCFtN','capitalize','assertContextExisting','flatMap','HTTP','askForAddon','--addon\x20--addonId\x20[NAME]','__setModuleDefault','win32','\x20to\x20','Only\x20expose\x20on\x20IP\x20address,\x20not\x20on\x20hostnames.\x20With\x20this\x20option,\x20no\x20root\x20permissions\x20are\x20required.','__importStar','\x20\x20-\x20port\x20','askForProject','Port-forwarding\x20for\x20the\x20specified\x20addon','fwd','getCurrentProjectName','addCommand','darwin','Cleaning\x20up\x20open\x20connections\x20failed:\x20','uniq','skipHostnamesText','customUserAgent','\x20\x20\x20No\x20running\x20container\x20found\x20for\x20','--project\x20--projectId\x20[NAME]','flat','Service\x20to\x20forward','25WTIXLH','error','then','message','done','portName','apply','filter','Running\x20on\x20macOS\x20in\x20','Project\x20for\x20forwarding','printForwardingInfo','warning','entries','printHostsFileHint','name','lodash','forwarding','canExecuteWithHostnames','address','No\x20services\x20and\x20addons\x20to\x20forward\x20found\x20in\x20project\x20','next','InquirerHelper','exit','forward','__createBinding','hostnames','\x20addon\x20ports','data','portFwdCmd','repeat','Connection\x20error\x20occurred\x20when\x20forwarding\x20\x27','Forwarding\x20','Addons:','hasOwnProperty','Error\x20occured\x20while\x20trying\x20to\x20forward\x20','tunnel-close','apiClient','getCurrentServiceName','2SIofju','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','length','chalk','project\x20for\x20forwarding','service','\x20-\x20','alias','data.id','158218GaUIWZ','action','531342Xpgccl','getProxyForwarder','port','uniqBy','green'];a15C=function(){return R;};return a15C();}const a15y=a15D;(function(C,D){const t=a15D,V=C();while(!![]){try{const Y=parseInt(t(0x106))/0x1+parseInt(t(0xfd))/0x2*(-parseInt(t(0x77))/0x3)+-parseInt(t(0x86))/0x4*(-parseInt(t(0xd7))/0x5)+parseInt(t(0x8e))/0x6*(parseInt(t(0x9c))/0x7)+parseInt(t(0x7c))/0x8+-parseInt(t(0xa0))/0x9+-parseInt(t(0xbc))/0xa;if(Y===D)break;else V['push'](V['shift']());}catch(e){V['push'](V['shift']());}}}(a15C,0x29f10));var __createBinding=this&&this[a15y(0xef)]||(Object[a15y(0x90)]?function(C,D,V,Y){const Z=a15y;if(Y===undefined)Y=V;var e=Object['getOwnPropertyDescriptor'](D,V);(!e||(Z(0x88)in e?!D[Z(0x93)]:e[Z(0x94)]||e[Z(0x85)]))&&(e={'enumerable':!![],'get':function(){return D[V];}}),Object['defineProperty'](C,Y,e);}:function(C,D,V,Y){if(Y===undefined)Y=V;C[Y]=D[V];}),__setModuleDefault=this&&this[a15y(0xc3)]||(Object[a15y(0x90)]?function(C,D){const X=a15y;Object[X(0x7d)](C,'default',{'enumerable':!![],'value':D});}:function(C,D){C['default']=D;}),__importStar=this&&this[a15y(0xc7)]||function(C){const p=a15y;if(C&&C[p(0x93)])return C;var D={};if(C!=null){for(var V in C)if(V!=='default'&&Object['prototype'][p(0xf8)][p(0x92)](C,V))__createBinding(D,C,V);}return __setModuleDefault(D,C),D;},__awaiter=this&&this['__awaiter']||function(C,D,V,Y){function e(T){return T instanceof V?T:new V(function(W){W(T);});}return new(V||(V=Promise))(function(T,W){const n=a15D;function f(i){try{G(Y['next'](i));}catch(I){W(I);}}function q(i){try{G(Y['throw'](i));}catch(I){W(I);}}function G(i){const M=a15D;i[M(0xdb)]?T(i[M(0xa6)]):e(i['value'])[M(0xd9)](f,q);}G((Y=Y[n(0xdd)](C,D||[]))[n(0xeb)]());});},__importDefault=this&&this[a15y(0x80)]||function(C){const r=a15y;return C&&C[r(0x93)]?C:{'default':C};};function a15D(C,D){const V=a15C();return a15D=function(Y,e){Y=Y-0x76;let T=V[Y];return T;},a15D(C,D);}Object[a15y(0x7d)](exports,a15y(0x93),{'value':!![]}),exports[a15y(0x81)]=void 0x0;const js_client_1=require(a15y(0xb2)),chalk_1=__importDefault(require(a15y(0x100))),utils_1=require(a15y(0xb0)),inquirer_helper_1=require(a15y(0x9b)),os=__importStar(require('os')),lodash_1=require(a15y(0xe6)),{EOL}=require('os');class CliPortForward{constructor(C){const l=a15y;this[l(0xaf)]=l(0xfe),this['skipHostnamesText']=l(0xc6),this[l(0xfb)]=new js_client_1[(l(0x9f))](C,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[l(0xd2)]});const D=new inquirer_helper_1[(l(0xec))](this[l(0xfb)]);this['portFwdCmd']=(0x0,utils_1[l(0x84)])()[l(0xe5)](l(0xee))[l(0x104)](l(0xcb))[l(0xb4)]('Port-forwarding\x20for\x20Northflank\x20services\x20and\x20addons.');const V=(0x0,utils_1['getCommand'])(!![])['name'](l(0xa1))['description']('Port-forwarding\x20for\x20all\x20services\x20and\x20addons\x20in\x20the\x20given\x20project')[l(0xa4)](l(0xd4),l(0x101))['option'](l(0x7f),this['noDefaultsText'],![])[l(0xa4)](l(0x82),this[l(0xd1)],![])[l(0x76)](({noDefaults:T,projectId:W,skipHostnames:f})=>__awaiter(this,void 0x0,void 0x0,function*(){const b=l;(0x0,utils_1['assertContextExisting'])(this[b(0xfb)]);const q=this[b(0x78)](f),G=T?undefined:C[b(0xcc)](),i=W||G||(yield D[b(0xc9)]());try{const {services:I,addons:m}=yield q[b(0xa3)]({'projectId':i},f);if(I[b(0xff)]+m['length']<=0x0)(0x0,utils_1[b(0xe2)])(b(0xea)+chalk_1['default'][b(0x95)](i));else{const Q=I[b(0xde)](u=>u[b(0xff)]>0x0)[b(0xff)],J=m[b(0xde)](u=>u['length']>0x0)[b(0xff)],z='\x20in\x20project\x20'+chalk_1[b(0x87)][b(0x95)](i);console[b(0xb8)](b(0xf6)+chalk_1[b(0x87)][b(0x7b)][b(0x95)](Q+b(0xab))+b(0x98)+chalk_1[b(0x87)][b(0x7b)][b(0x95)](J+b(0xf1))+z),console[b(0xb8)](),console[b(0xb8)](chalk_1[b(0x87)][b(0x95)]('Services:')),I[b(0xb7)](u=>{const P=b;if(u[P(0xff)]>=0x1&&!u[0x0][P(0xd8)])this['printForwardingInfo'](u,{'type':P(0x102),'name':u[0x0][P(0xf2)]['id']},f);}),console[b(0xb8)](chalk_1[b(0x87)][b(0x95)](b(0xf7))),m['forEach'](u=>{const g=b;if(u['length']>=0x1&&!u[0x0][g(0xd8)])this[g(0xe1)](u,{'type':g(0x8c),'name':u[0x0][g(0xf2)]['id']},f);}),this[b(0xe4)]([...I[b(0xd5)](),...m[b(0xd5)]()],f);}}catch(u){(0x0,utils_1[b(0xd8)])(b(0xa7)+u[b(0xda)]);}})),Y=(0x0,utils_1['getCommand'])(!![])[l(0xe5)]('service')[l(0xb4)](l(0xba))['option'](l(0xd4),l(0xe0))['option'](l(0xae),l(0xd6))[l(0xa4)](l(0x7f),this[l(0xaf)],![])[l(0xa4)]('--skipHostnames',this[l(0xd1)],![])[l(0x76)](({noDefaults:T,projectId:W,serviceId:f,skipHostnames:q})=>__awaiter(this,void 0x0,void 0x0,function*(){const E=l;(0x0,utils_1['assertContextExisting'])(this[E(0xfb)]);const G=this[E(0x78)](q),i=T?undefined:C[E(0xcc)](),I=W||i||(yield D[E(0xc9)]()),m=T?undefined:C[E(0xfc)](),Q=f||m||(yield D['askForService'](I)());console['log']('Forwarding\x20service\x20'+chalk_1[E(0x87)]['bold'](Q)+E(0xb3)+chalk_1[E(0x87)][E(0x95)](I));try{const J=yield G[E(0x9d)]({'projectId':I,'serviceId':Q},q);this[E(0xe1)](J,{'name':Q,'type':'service'},q),this[E(0xe4)](J,q);}catch(z){(0x0,utils_1[E(0xd8)])(E(0xa7)+z[E(0xda)]);}})),e=(0x0,utils_1[l(0x84)])(!![])['name']('addon')[l(0xb4)](l(0xca))[l(0xa4)](l(0xd4),l(0xe0))[l(0xa4)](l(0xc2),l(0xb5))[l(0xa4)](l(0x82),this[l(0xd1)],![])[l(0x76)](({noDefaults:T,projectId:W,addonId:f,skipHostnames:q})=>__awaiter(this,void 0x0,void 0x0,function*(){const o=l;(0x0,utils_1[o(0xbe)])(this[o(0xfb)]);const G=this[o(0x78)](q),i=T?undefined:C[o(0xcc)](),I=W||i||(yield D['askForProject']()),m=f||(yield D[o(0xc1)](I)());console['log'](o(0xb1)+chalk_1[o(0x87)][o(0x95)](m)+o(0xb3)+chalk_1[o(0x87)]['bold'](I));try{const Q={'projectId':I,'addonId':m},J=yield G[o(0x9a)](Q,q);this[o(0xe1)](J,{'name':m,'type':o(0x8c)},q),this['printHostsFileHint'](J,q);}catch(z){(0x0,utils_1[o(0xd8)])(o(0xa7)+z['message']);}}));this[l(0xf3)][l(0xcd)](V),this[l(0xf3)][l(0xcd)](Y),this[l(0xf3)][l(0xcd)](e);}[a15y(0x78)](C=![]){const w=a15y,D=this[w(0xfb)][w(0xe7)];if(!C){const V=D[w(0xe8)]();if(V['error'])throw new Error(V[w(0xda)]);}return D['on'](w(0xfa),(Y,e)=>{const A=w,T=chalk_1[A(0x87)]['bold'](e[A(0xa8)]+'\x20\x27'+e['id']+'\x27'),W=e[A(0xf0)][A(0xff)]>0x0;(0x0,utils_1['warning'])(A(0x8f)+e['address']+':'+e['port']+A(0xc5)+T),C&&W&&(0x0,utils_1[A(0xe2)])('\x20\x20If\x20you\x20have\x20added\x20entries\x20to\x20your\x20hosts\x20file,\x20it\x20is\x20recommended\x20to\x20remove\x20them\x20again\x20now.');}),D['on'](w(0x96),(Y,e,T)=>{const N=w;(0x0,utils_1[N(0xe2)])(N(0xf5)+e[N(0xe9)]+':'+e[N(0x79)]+N(0xa5)+(T===null||T===void 0x0?void 0x0:T[N(0xda)])+'\x22');}),process['on']('SIGINT',()=>__awaiter(this,void 0x0,void 0x0,function*(){const S=w;try{yield D[S(0x7e)]();}catch(Y){(0x0,utils_1[S(0xd8)])(S(0xcf)+Y[S(0xda)]);}finally{process[S(0xed)]();}})),D;}[a15y(0xe1)](C,D,V=![]){const B=a15y,{type:Y,name:e}=D;if(C[B(0xff)]<=0x0){const q=B(0x83)+D[B(0xa8)]+B(0xbb);(0x0,utils_1[B(0xe2)])(B(0xd3)+Y+'\x20'+chalk_1[B(0x87)]['bold'](e)+'.\x20'+q);return;}const T=(0x0,lodash_1['groupBy'])(C,B(0x105)),W=G=>'\x20('+(G[B(0xdc)]?G[B(0xdc)]+B(0x103):'')+G[B(0x8a)]+')';function f(G,i=0x2){const H=B;if(!V){const I=G[H(0x8a)]===H(0xc0)?'http://':'';G['hostnames'][H(0xb7)](m=>{const K=H;console[K(0xb8)]((0x0,lodash_1[K(0xf4)])('\x20',i)+'-\x20'+I+m+':'+G[K(0x79)]);});}}Object[B(0xe3)](T)[B(0xb7)](([G,i])=>{const c=B;var I,m;const Q='>\x20'+(0x0,lodash_1[c(0xbd)])(Y)+'\x20\x27'+chalk_1[c(0x87)]['greenBright'][c(0x95)](G)+'\x27';if(Y===c(0x8c)){if(i[c(0xff)]===0x1){const J=i[0x0];if(J[c(0xd8)]){(0x0,utils_1[c(0xd8)])(c(0xf9)+G+':\x20'+J[c(0xd8)][c(0xda)]);return;}const z=J['data'],u=!V?'\x20'+chalk_1[c(0x87)]['reset'](c(0x8b)+z['hostnames']['join'](',')):'';(0x0,utils_1[c(0xb6)])(Q+c(0xaa)+z['address']+':'+z[c(0x79)]+W(z)+u);}else{const L=(0x0,lodash_1[c(0x7a)])(i,v=>{const d=c;var k,s;return(s=(k=v===null||v===void 0x0?void 0x0:v[d(0xf2)])===null||k===void 0x0?void 0x0:k[d(0xf0)])===null||s===void 0x0?void 0x0:s[d(0xa9)](',');})['length']>0x1;(0x0,utils_1[c(0xb6)])(Q+c(0xb9)+(L?c(0xad):'ports')+':'),i[c(0xb7)](v=>{const O=c;if(v['error']){(0x0,utils_1[O(0xd8)])(O(0xf9)+G+':\x20'+v[O(0xd8)][O(0xda)]);return;}const k=v[O(0xf2)],s=!V?',\x20hostname:\x20'+k[O(0xf0)][O(0xa9)](','):'';console[O(0xb8)]('\x20\x20-\x20Address:\x20'+k[O(0xe9)]+':'+k[O(0x79)]+W(k)+s);});}}if(Y===c(0x102)){if(i[c(0xff)]===0x1){const v=i[0x0];if(v['error']){(0x0,utils_1[c(0xd8)])('Error\x20occured\x20while\x20trying\x20to\x20forward\x20'+G+':\x20'+v[c(0xd8)][c(0xda)]);return;}const k=v[c(0xf2)],s=!V?c(0x89):':',h=k[c(0xe9)]+':'+k['port']+W(k);(0x0,utils_1['success'])(Q+c(0xaa)+h+s),f(k);}else(0x0,utils_1[c(0xb6)])(Q+'\x20is\x20exposed\x20on\x20'+((m=(I=i[0x0])===null||I===void 0x0?void 0x0:I[c(0xf2)])===null||m===void 0x0?void 0x0:m[c(0xe9)])+c(0x9e)),i[c(0xb7)](j=>{const F=c;if(j[F(0xd8)]){(0x0,utils_1[F(0xd8)])(F(0xf9)+G+':\x20'+j['error']['message']);return;}const U=j['data'];(0x0,utils_1['success'])(F(0xc8)+U[F(0x79)]+W(U)),f(U,0x4);});}});}[a15y(0xe4)](C,D=![]){const a=a15y;if(D){const V=C[a(0xbf)](i=>i[a(0xf2)])[a(0xde)](i=>i!==undefined),Y=(process===null||process===void 0x0?void 0x0:process[a(0x97)])===a(0xc4),e=os[a(0x97)]()===a(0xce),T=Y?a(0x8d):'/etc/hosts',W=chalk_1[a(0x87)][a(0x95)]('skipHostnames'),f=e?EOL+a(0xdf)+W+'\x20mode:\x20the\x20locally\x20forwarded\x20port\x20differs\x20from\x20the\x20actual\x20port\x20on\x20the\x20forwarded\x20service/addon.':undefined;let q=a(0xac)+W+a(0x91)+'--skipHostnames'+a(0x99)+T+'):';f!==undefined&&(0x0,utils_1[a(0xe2)])(f!==null&&f!==void 0x0?f:'');(0x0,utils_1[a(0xe2)])(q);const G=V[a(0xa2)](i=>i[a(0xe9)]+'\x20\x20\x20\x20\x20\x20\x20\x20\x20'+i['hostnames'][a(0xa9)]('\x20'));console['log']((0x0,lodash_1[a(0xd0)])(G)[a(0xa9)](EOL)),console[a(0xb8)]();}}}exports[a15y(0x81)]=CliPortForward;
|
|
1
|
+
'use strict';const a15q=a15I;(function(u,I){const R=a15I,a=u();while(!![]){try{const x=parseInt(R(0x174))/0x1+-parseInt(R(0x175))/0x2+parseInt(R(0x1b8))/0x3*(-parseInt(R(0x1a3))/0x4)+-parseInt(R(0x170))/0x5+-parseInt(R(0x1db))/0x6+-parseInt(R(0x165))/0x7*(parseInt(R(0x1d5))/0x8)+parseInt(R(0x169))/0x9;if(x===I)break;else a['push'](a['shift']());}catch(D){a['push'](a['shift']());}}}(a15u,0xbdecd));function a15I(u,I){const a=a15u();return a15I=function(x,D){x=x-0x15e;let K=a[x];return K;},a15I(u,I);}var __createBinding=this&&this[a15q(0x162)]||(Object[a15q(0x1d1)]?function(u,I,a,x){const c=a15q;if(x===undefined)x=a;var D=Object[c(0x1a5)](I,a);(!D||('get'in D?!I[c(0x16a)]:D['writable']||D[c(0x186)]))&&(D={'enumerable':!![],'get':function(){return I[a];}}),Object['defineProperty'](u,x,D);}:function(u,I,a,x){if(x===undefined)x=a;u[x]=I[a];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a15q(0x1d1)]?function(u,I){const M=a15q;Object[M(0x164)](u,M(0x1b1),{'enumerable':!![],'value':I});}:function(u,I){const r=a15q;u[r(0x1b1)]=I;}),__importStar=this&&this[a15q(0x19b)]||function(u){const o=a15q;if(u&&u[o(0x16a)])return u;var I={};if(u!=null){for(var a in u)if(a!==o(0x1b1)&&Object['prototype'][o(0x1ac)][o(0x1e3)](u,a))__createBinding(I,u,a);}return __setModuleDefault(I,u),I;},__awaiter=this&&this[a15q(0x1af)]||function(u,I,a,x){function D(K){return K instanceof a?K:new a(function(z){z(K);});}return new(a||(a=Promise))(function(K,z){const W=a15I;function H(p){const w=a15I;try{C(x[w(0x188)](p));}catch(b){z(b);}}function s(p){try{C(x['throw'](p));}catch(b){z(b);}}function C(p){const h=a15I;p['done']?K(p[h(0x1b0)]):D(p[h(0x1b0)])[h(0x1c6)](H,s);}C((x=x[W(0x1d0)](u,I||[]))[W(0x188)]());});},__importDefault=this&&this[a15q(0x1c8)]||function(u){const B=a15q;return u&&u[B(0x16a)]?u:{'default':u};};Object['defineProperty'](exports,a15q(0x16a),{'value':!![]}),exports[a15q(0x1d9)]=void 0x0;const js_client_1=require(a15q(0x1a8)),chalk_1=__importDefault(require(a15q(0x1b5))),utils_1=require(a15q(0x1c0)),inquirer_helper_1=require(a15q(0x173)),os=__importStar(require('os')),lodash_1=require(a15q(0x18f)),{EOL}=require('os');function a15u(){const u0=['addon','groupBy','__importStar','error','getCommand','portName','map','portFwdCmd','Running\x20in\x20','all','8xdKyCu','Port-forwarding\x20for\x20all\x20services\x20and\x20addons\x20in\x20the\x20given\x20project','getOwnPropertyDescriptor','Port-forwarding\x20for\x20Northflank\x20services\x20and\x20addons.','Connection\x20error\x20occurred\x20when\x20forwarding\x20\x27','@northflank/js-client','Error\x20occured\x20while\x20trying\x20to\x20forward\x20','--service\x20--serviceId\x20[NAME]','alias','hasOwnProperty','type','apiClient','__awaiter','value','default','description','\x20mode:\x20the\x20locally\x20forwarded\x20port\x20differs\x20from\x20the\x20actual\x20port\x20on\x20the\x20forwarded\x20service/addon.','project\x20for\x20forwarding','chalk','warning','\x20flag\x20or\x20manually\x20append\x20following\x20entry\x20to\x20your\x20hosts\x20file\x20(','406707azKHeW','reset','log','--addon\x20--addonId\x20[NAME]','HTTP','askForService','tunnel-close','greenBright','../utils','darwin','\x20with\x20these\x20hostnames:','\x20is\x20exposed\x20with\x20multiple\x20','exit','hostnames','then','win32','__importDefault','\x20\x20-\x20port\x20','length','printHostsFileHint','SIGINT','flatMap','with\x20hostname:\x20','\x20\x20\x20No\x20running\x20container\x20found\x20for\x20','apply','create','capitalize','addCommand','--skipHostnames','9111064rkUAQt','repeat','No\x20services\x20and\x20addons\x20to\x20forward\x20found\x20in\x20project\x20','Project\x20for\x20forwarding','CliPortForward','action','3989046QJrwLz','forwardAddon','platform','\x20in\x20project\x20','Service\x20to\x20forward','service','port','\x20\x20-\x20Address:\x20','call','stop','Addon\x20to\x20forward','bold','Failed:\x20','Forwarding\x20service\x20','Please\x20ensure\x20the\x20','Port-forwarding\x20for\x20the\x20specified\x20addon','__createBinding','\x20mode.\x20If\x20hostname\x20forwarding\x20is\x20required,\x20remove\x20','defineProperty','7woVLdp','Port-forwarding\x20for\x20the\x20specified\x20service','ApiClient','uniq','32772402nPVumI','__esModule','noDefaultsText','Services:','flat','skipHostnamesText','join','1314995eWerLA','\x20and\x20','assertContextExisting','../inquirer-helper','859583oChSyT','2770334QZrUqN',',\x20hostname:\x20','http://','filter','forward','\x27:\x20\x22','option','\x20-\x20','forEach','C:/Windows/System32/drivers/etc/hosts','success','protocol','data.id','\x20addon\x20ports','name','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','\x20is\x20exposed\x20on\x20','configurable','askForProject','next','getCurrentProjectName','message','hosts','green','printForwardingInfo','--project\x20--projectId\x20[NAME]','lodash','canExecuteWithHostnames','getProxyForwarder','Forwarding\x20','getCurrentServiceName','--noDefaults','data','address','entries','\x20is\x20running\x20and\x20reachable.'];a15u=function(){return u0;};return a15u();}class CliPortForward{constructor(u){const J=a15q;this[J(0x16b)]=J(0x184),this[J(0x16e)]='Only\x20expose\x20on\x20IP\x20address,\x20not\x20on\x20hostnames.\x20With\x20this\x20option,\x20no\x20root\x20permissions\x20are\x20required.',this[J(0x1ae)]=new js_client_1[(J(0x167))](u,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1['customUserAgent']});const I=new inquirer_helper_1['InquirerHelper'](this[J(0x1ae)]);this[J(0x1a0)]=(0x0,utils_1[J(0x19d)])()[J(0x183)](J(0x179))[J(0x1ab)]('fwd')[J(0x1b2)](J(0x1a6));const a=(0x0,utils_1[J(0x19d)])(!![])['name'](J(0x1a2))[J(0x1b2)](J(0x1a4))[J(0x17b)](J(0x18e),J(0x1b4))['option'](J(0x194),this[J(0x16b)],![])[J(0x17b)](J(0x1d4),this[J(0x16e)],![])['action'](({noDefaults:K,projectId:z,skipHostnames:H})=>__awaiter(this,void 0x0,void 0x0,function*(){const V=J;(0x0,utils_1[V(0x172)])(this[V(0x1ae)]);const s=this[V(0x191)](H),C=K?undefined:u[V(0x189)](),p=z||C||(yield I[V(0x187)]());try{const {services:b,addons:i}=yield s['forwardProject']({'projectId':p},H);if(b['length']+i['length']<=0x0)(0x0,utils_1['warning'])(V(0x1d7)+chalk_1[V(0x1b1)]['bold'](p));else{const j=b[V(0x178)](X=>X[V(0x1ca)]>0x0)[V(0x1ca)],A=i['filter'](X=>X['length']>0x0)[V(0x1ca)],F=V(0x1de)+chalk_1['default']['bold'](p);console['log'](V(0x192)+chalk_1['default'][V(0x18c)][V(0x1e6)](j+'\x20service\x20ports')+V(0x171)+chalk_1[V(0x1b1)][V(0x18c)][V(0x1e6)](A+V(0x182))+F),console[V(0x1ba)](),console[V(0x1ba)](chalk_1[V(0x1b1)][V(0x1e6)](V(0x16c))),b[V(0x17d)](X=>{const y=V;if(X['length']>=0x1&&!X[0x0][y(0x19c)])this[y(0x18d)](X,{'type':y(0x1e0),'name':X[0x0]['data']['id']},H);}),console[V(0x1ba)](chalk_1[V(0x1b1)][V(0x1e6)]('Addons:')),i[V(0x17d)](X=>{const e=V;if(X['length']>=0x1&&!X[0x0][e(0x19c)])this[e(0x18d)](X,{'type':e(0x199),'name':X[0x0][e(0x195)]['id']},H);}),this['printHostsFileHint']([...b['flat'](),...i[V(0x16d)]()],H);}}catch(X){(0x0,utils_1['error'])(V(0x15e)+X[V(0x18a)]);}})),x=(0x0,utils_1[J(0x19d)])(!![])[J(0x183)](J(0x1e0))['description'](J(0x166))[J(0x17b)](J(0x18e),J(0x1d8))[J(0x17b)](J(0x1aa),J(0x1df))[J(0x17b)](J(0x194),this[J(0x16b)],![])['option'](J(0x1d4),this[J(0x16e)],![])[J(0x1da)](({noDefaults:K,projectId:z,serviceId:H,skipHostnames:s})=>__awaiter(this,void 0x0,void 0x0,function*(){const U=J;(0x0,utils_1['assertContextExisting'])(this[U(0x1ae)]);const C=this[U(0x191)](s),p=K?undefined:u['getCurrentProjectName'](),b=z||p||(yield I['askForProject']()),i=K?undefined:u[U(0x193)](),j=H||i||(yield I[U(0x1bd)](b)());console['log'](U(0x15f)+chalk_1['default'][U(0x1e6)](j)+U(0x1de)+chalk_1['default'][U(0x1e6)](b));try{const A=yield C['forwardService']({'projectId':b,'serviceId':j},s);this['printForwardingInfo'](A,{'name':j,'type':U(0x1e0)},s),this[U(0x1cb)](A,s);}catch(F){(0x0,utils_1[U(0x19c)])(U(0x15e)+F[U(0x18a)]);}})),D=(0x0,utils_1[J(0x19d)])(!![])[J(0x183)](J(0x199))[J(0x1b2)](J(0x161))[J(0x17b)](J(0x18e),J(0x1d8))[J(0x17b)](J(0x1bb),J(0x1e5))[J(0x17b)](J(0x1d4),this[J(0x16e)],![])[J(0x1da)](({noDefaults:K,projectId:z,addonId:H,skipHostnames:s})=>__awaiter(this,void 0x0,void 0x0,function*(){const S=J;(0x0,utils_1[S(0x172)])(this['apiClient']);const C=this['getProxyForwarder'](s),p=K?undefined:u['getCurrentProjectName'](),b=z||p||(yield I[S(0x187)]()),i=H||(yield I['askForAddon'](b)());console[S(0x1ba)]('Forwarding\x20addon\x20'+chalk_1[S(0x1b1)][S(0x1e6)](i)+S(0x1de)+chalk_1[S(0x1b1)][S(0x1e6)](b));try{const j={'projectId':b,'addonId':i},A=yield C[S(0x1dc)](j,s);this[S(0x18d)](A,{'name':i,'type':S(0x199)},s),this[S(0x1cb)](A,s);}catch(F){(0x0,utils_1[S(0x19c)])(S(0x15e)+F[S(0x18a)]);}}));this['portFwdCmd'][J(0x1d3)](a),this['portFwdCmd']['addCommand'](x),this['portFwdCmd']['addCommand'](D);}[a15q(0x191)](u=![]){const n=a15q,I=this['apiClient']['forwarding'];if(!u){const a=I[n(0x190)]();if(a[n(0x19c)])throw new Error(a[n(0x18a)]);}return I['on'](n(0x1be),(x,D)=>{const L=n,K=chalk_1[L(0x1b1)]['bold'](D[L(0x1ad)]+'\x20\x27'+D['id']+'\x27'),z=D['hostnames'][L(0x1ca)]>0x0;(0x0,utils_1[L(0x1b6)])('Stop\x20forwarding\x20traffic\x20from\x20'+D[L(0x196)]+':'+D[L(0x1e1)]+'\x20to\x20'+K),u&&z&&(0x0,utils_1[L(0x1b6)])('\x20\x20If\x20you\x20have\x20added\x20entries\x20to\x20your\x20hosts\x20file,\x20it\x20is\x20recommended\x20to\x20remove\x20them\x20again\x20now.');}),I['on']('connection-error',(x,D,K)=>{const g=n;(0x0,utils_1[g(0x1b6)])(g(0x1a7)+D['address']+':'+D['port']+g(0x17a)+(K===null||K===void 0x0?void 0x0:K[g(0x18a)])+'\x22');}),process['on'](n(0x1cc),()=>__awaiter(this,void 0x0,void 0x0,function*(){const l=n;try{yield I[l(0x1e4)]();}catch(x){(0x0,utils_1[l(0x19c)])('Cleaning\x20up\x20open\x20connections\x20failed:\x20'+x[l(0x18a)]);}finally{process[l(0x1c4)]();}})),I;}[a15q(0x18d)](u,I,a=![]){const Z=a15q,{type:x,name:D}=I;if(u[Z(0x1ca)]<=0x0){const s=Z(0x160)+I[Z(0x1ad)]+Z(0x198);(0x0,utils_1['warning'])(Z(0x1cf)+x+'\x20'+chalk_1[Z(0x1b1)][Z(0x1e6)](D)+'.\x20'+s);return;}const K=(0x0,lodash_1[Z(0x19a)])(u,Z(0x181)),z=C=>'\x20('+(C[Z(0x19e)]?C[Z(0x19e)]+Z(0x17c):'')+C[Z(0x180)]+')';function H(C,p=0x2){const G=Z;if(!a){const b=C[G(0x180)]===G(0x1bc)?G(0x177):'';C[G(0x1c5)][G(0x17d)](i=>{const O=G;console[O(0x1ba)]((0x0,lodash_1[O(0x1d6)])('\x20',p)+'-\x20'+b+i+':'+C['port']);});}}Object[Z(0x197)](K)['forEach'](([C,p])=>{const Q=Z;var b,i;const j='>\x20'+(0x0,lodash_1[Q(0x1d2)])(x)+'\x20\x27'+chalk_1[Q(0x1b1)][Q(0x1bf)][Q(0x1e6)](C)+'\x27';if(x===Q(0x199)){if(p[Q(0x1ca)]===0x1){const A=p[0x0];if(A[Q(0x19c)]){(0x0,utils_1[Q(0x19c)])('Error\x20occured\x20while\x20trying\x20to\x20forward\x20'+C+':\x20'+A[Q(0x19c)][Q(0x18a)]);return;}const F=A['data'],X=!a?'\x20'+chalk_1['default'][Q(0x1b9)](Q(0x1ce)+F[Q(0x1c5)][Q(0x16f)](',')):'';(0x0,utils_1['success'])(j+Q(0x185)+F[Q(0x196)]+':'+F[Q(0x1e1)]+z(F)+X);}else{const T=(0x0,lodash_1['uniqBy'])(p,E=>{const d=Q;var f,N;return(N=(f=E===null||E===void 0x0?void 0x0:E['data'])===null||f===void 0x0?void 0x0:f['hostnames'])===null||N===void 0x0?void 0x0:N[d(0x16f)](',');})[Q(0x1ca)]>0x1;(0x0,utils_1[Q(0x17f)])(j+Q(0x1c3)+(T?Q(0x18b):'ports')+':'),p[Q(0x17d)](E=>{const v=Q;if(E[v(0x19c)]){(0x0,utils_1[v(0x19c)])(v(0x1a9)+C+':\x20'+E[v(0x19c)][v(0x18a)]);return;}const f=E['data'],N=!a?v(0x176)+f['hostnames'][v(0x16f)](','):'';console['log'](v(0x1e2)+f[v(0x196)]+':'+f['port']+z(f)+N);});}}if(x===Q(0x1e0)){if(p[Q(0x1ca)]===0x1){const E=p[0x0];if(E[Q(0x19c)]){(0x0,utils_1[Q(0x19c)])(Q(0x1a9)+C+':\x20'+E['error'][Q(0x18a)]);return;}const f=E['data'],N=!a?Q(0x1c2):':',P=f[Q(0x196)]+':'+f[Q(0x1e1)]+z(f);(0x0,utils_1['success'])(j+'\x20is\x20exposed\x20on\x20'+P+N),H(f);}else(0x0,utils_1['success'])(j+Q(0x185)+((i=(b=p[0x0])===null||b===void 0x0?void 0x0:b[Q(0x195)])===null||i===void 0x0?void 0x0:i['address'])+'\x20with\x20multiple\x20ports:'),p[Q(0x17d)](m=>{const t=Q;if(m[t(0x19c)]){(0x0,utils_1[t(0x19c)])(t(0x1a9)+C+':\x20'+m['error'][t(0x18a)]);return;}const k=m['data'];(0x0,utils_1[t(0x17f)])(t(0x1c9)+k[t(0x1e1)]+z(k)),H(k,0x4);});}});}[a15q(0x1cb)](u,I=![]){const Y=a15q;if(I){const a=u[Y(0x1cd)](p=>p['data'])[Y(0x178)](p=>p!==undefined),x=(process===null||process===void 0x0?void 0x0:process[Y(0x1dd)])===Y(0x1c7),D=os['platform']()===Y(0x1c1),K=x?Y(0x17e):'/etc/hosts',z=chalk_1['default']['bold']('skipHostnames'),H=D?EOL+'Running\x20on\x20macOS\x20in\x20'+z+Y(0x1b3):undefined;let s=Y(0x1a1)+z+Y(0x163)+'--skipHostnames'+Y(0x1b7)+K+'):';H!==undefined&&(0x0,utils_1[Y(0x1b6)])(H!==null&&H!==void 0x0?H:'');(0x0,utils_1[Y(0x1b6)])(s);const C=a[Y(0x19f)](p=>p[Y(0x196)]+'\x20\x20\x20\x20\x20\x20\x20\x20\x20'+p[Y(0x1c5)]['join']('\x20'));console[Y(0x1ba)]((0x0,lodash_1[Y(0x168)])(C)[Y(0x16f)](EOL)),console[Y(0x1ba)]();}}}exports[a15q(0x1d9)]=CliPortForward;
|
package/dist/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a16E=a16I;(function(u,I){const i=a16I,a=u();while(!![]){try{const x=-parseInt(i(0x1a0))/0x1+parseInt(i(0x1c1))/0x2*(-parseInt(i(0x1d4))/0x3)+parseInt(i(0x1c6))/0x4+-parseInt(i(0x198))/0x5+parseInt(i(0x1dd))/0x6+parseInt(i(0x1bd))/0x7+parseInt(i(0x19e))/0x8*(parseInt(i(0x1a7))/0x9);if(x===I)break;else a['push'](a['shift']());}catch(D){a['push'](a['shift']());}}}(a16u,0x9f92d));var __awaiter=this&&this['__awaiter']||function(u,I,a,x){function D(K){return K instanceof a?K:new a(function(z){z(K);});}return new(a||(a=Promise))(function(K,z){const X=a16I;function H(p){const j=a16I;try{C(x[j(0x1c0)](p));}catch(b){z(b);}}function s(p){const A=a16I;try{C(x[A(0x1b9)](p));}catch(b){z(b);}}function C(p){const F=a16I;p[F(0x1d8)]?K(p[F(0x1c3)]):D(p[F(0x1c3)])['then'](H,s);}C((x=x[X(0x1b4)](u,I||[]))[X(0x1c0)]());});},__importDefault=this&&this['__importDefault']||function(u){const T=a16I;return u&&u[T(0x1d7)]?u:{'default':u};};Object[a16E(0x1aa)](exports,'__esModule',{'value':!![]}),exports[a16E(0x1cf)]=exports[a16E(0x1d3)]=exports[a16E(0x1de)]=exports[a16E(0x1b2)]=exports['asyncSequential']=exports[a16E(0x1a6)]=exports[a16E(0x1d5)]=exports['success']=exports['warning']=exports[a16E(0x1a9)]=exports[a16E(0x1c7)]=exports[a16E(0x194)]=void 0x0;const node_fetch_1=__importDefault(require(a16E(0x1ba))),chalk_1=__importDefault(require(a16E(0x1d0))),commander_1=require(a16E(0x1da)),pgk=require(a16E(0x196));exports[a16E(0x194)]=a16E(0x19c)+(pgk===null||pgk===void 0x0?void 0x0:pgk[a16E(0x1a1)]);function checkUpdate(u){return __awaiter(this,void 0x0,void 0x0,function*(){const N=a16I;function I(a,x){const f=a16I,D=new Date(Number(a));return D[f(0x19d)](D['getDate']()+x),D;}try{if(I(u['getLastUpdateCheck'](),0x1)>new Date())return;const a=pgk[N(0x1a1)],{name:x}=pgk;if(!a)return;const D='https://registry.npmjs.org/'+x+N(0x1b0),K=yield(0x0,node_fetch_1[N(0x1d2)])(D,{'method':N(0x1cc),'timeout':0x1388}),z=(yield K[N(0x1db)]())[N(0x1a1)];needsUpdate(a,z)&&warning('**\x20You\x27re\x20running\x20on\x20version\x20'+a+N(0x1b5)+z+'.'+(N(0x1bb)+x+N(0x1b1)+x+N(0x1df))),yield u[N(0x1c8)](new Date());}catch(H){}});}exports['checkUpdate']=checkUpdate;function needsUpdate(u,I){const P=a16E,a=/(\.0+)+$/,x=u[P(0x19f)](a,'')[P(0x1bf)]('.'),D=I[P(0x19f)](a,'')[P(0x1bf)]('.');for(let K=0x0;K<Math[P(0x195)](x[P(0x1ac)],D[P(0x1ac)]);K+=0x1){const z=parseInt(D[K],0xa)-parseInt(x[K],0xa);if(z>0x0)return!![];if(z<0x0)return![];}return D[P(0x1ac)]>x['length'];}function error(u){const m=a16E;console['error'](chalk_1[m(0x1d2)][m(0x1d9)](m(0x1c9)+u));}exports['error']=error;function warning(u){const k=a16E;console[k(0x1a9)](chalk_1[k(0x1d2)][k(0x1a8)](''+u));}exports[a16E(0x1a5)]=warning;function success(u){const R=a16E;console[R(0x1a4)](chalk_1[R(0x1d2)][R(0x1ce)](''+u));}exports[a16E(0x19a)]=success;function getCommand(u=![]){const q=a16E,I=new commander_1[(q(0x1b6))]();return I['helpOption'](undefined,q(0x1e0)),I[q(0x1a2)](![]),I[q(0x1dc)](![]),I['allowUnknownOption'](![]),I['allowExcessArguments'](![]),I['enablePositionalOptions'](!![]),u&&(I[q(0x1ca)](q(0x1e1),q(0x1b8),![]),I[q(0x1ca)](q(0x1d1),q(0x1b3),![]),I[q(0x1ca)](q(0x1ae),q(0x199),![])),I;}exports['getCommand']=getCommand;const retry=(u,I=0x32)=>a=>{let x=u;const D=()=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){try{return yield a();}catch(K){if(x<=0x0)throw K;return x-=0x1,yield new Promise(z=>setTimeout(()=>z(),I)),D();}});return D();};exports['retry']=retry;const asyncSequential=(u,I)=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){const c=a16E,a=Promise['resolve']([]);return u[c(0x1b7)]((x,D)=>x[c(0x1cb)](K=>I(D)[c(0x1cb)](z=>{const M=c;return K[M(0x1c2)](z),K;})),a);});function a16I(u,I){const a=a16u();return a16I=function(x,D){x=x-0x194;let K=a[x];return K;},a16I(u,I);}exports[a16E(0x1d6)]=asyncSequential;function isValidJSON(u){const r=a16E;try{return JSON[r(0x197)](u);}catch(I){return![];}}exports[a16E(0x1b2)]=isValidJSON;function assertContextExisting(u){const o=a16E;if(u[o(0x1ab)][o(0x1ad)]()===undefined)throw new Error(o(0x1a3));if(u[o(0x1ab)][o(0x19b)]()===undefined)throw new Error(o(0x1cd));if(u['contextProvider']['getCurrentToken']()===undefined)throw new Error(o(0x1c4));}function a16u(){const h=['Verbose\x20output','throw','node-fetch','\x20Consider\x20updating\x20using\x20\x27npm\x20i\x20','getTime','5138560RDUQAh','setUTCSeconds','split','next','702IkUSsp','push','value','No\x20token\x20in\x20CLI\x20context.\x20Add\x20token\x20with\x20\x27northflank\x20set-token\x27','example:\x202020-02-02T02:02:02Z\x20(date\x20string)\x20or\x201580608922\x20(unix\x20ts)','1834748uxOYbW','checkUpdate','setLastUpdateCheck','Failed:\x20','option','then','GET','No\x20API\x20URL\x20present\x20in\x20context.\x20Create\x20new\x20context\x20with\x20\x27northflank\x20login\x27','green','tsHint','chalk','--quiet','default','parseDateInput','702ZpAtTP','getCommand','asyncSequential','__esModule','done','redBright','commander','json','storeOptionsAsProperties','107082GlgTOR','assertContextExisting','\x27\x20**','Display\x20help\x20for\x20command','--verbose','customUserAgent','min','../package.json','parse','1337150LrRVNK','Do\x20not\x20validate\x20input\x20fields\x20on\x20client\x20side','success','getCurrentBaseUrl','northflank-cli/','setDate','16GzHCbR','replace','1217925CwFqJM','version','addHelpCommand','No\x20CLI\x20context\x20present.\x20Create\x20context\x20with\x20\x27northflank\x20login\x27','log','warning','retry','4547196sniXhD','yellow','error','defineProperty','contextProvider','length','getCurrentContext','--skipValidation',',\x20expected\x20valid\x20date\x20string\x20(example:\x202020-02-02T02:02:02Z)\x20or\x20unix\x20timestamp\x20(example\x201580608922)','/latest','\x20-g\x27\x20or\x20\x27yarn\x20global\x20add\x20','isValidJSON','No\x20console\x20output','apply',',\x20the\x20latest\x20version\x20of\x20the\x20cli\x20is\x20','Command','reduce'];a16u=function(){return h;};return a16u();}exports[a16E(0x1de)]=assertContextExisting;const parseDateInput=u=>{const w=a16E;try{let I=new Date(u);if(isNaN(I[w(0x1bc)]())){const a=u[w(0x1ac)]===0xd?u/0x3e8:u,x=new Date(0x0);x[w(0x1be)](a);if(isNaN(x[w(0x1bc)]()))throw new Error();return x;}return I;}catch(D){throw new Error('Invalid\x20date\x20received:\x20'+u+w(0x1af));}};exports['parseDateInput']=parseDateInput,exports[a16E(0x1cf)]=a16E(0x1c5);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@northflank/cli",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.19",
|
|
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.
|
|
29
|
+
"@northflank/js-client": "0.7.20",
|
|
30
30
|
"bufferutil": "^4.0.7",
|
|
31
31
|
"chalk": "~4.1.0",
|
|
32
32
|
"columnify": "^1.5.4",
|