@northflank/cli 0.9.4 → 0.9.6-beta.0
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 -0
- package/dist/formatting/console-format-helpers.js +1 -0
- package/dist/formatting/terminal-chart.js +1 -0
- package/dist/inquirer-helper.js +1 -1
- package/dist/login/browser-login.js +1 -1
- package/dist/logs/index.js +1 -0
- package/dist/logs/log-formatter.js +1 -0
- package/dist/metrics/index.js +1 -0
- package/dist/pagination/inquirer-pagination-prompt.js +1 -1
- package/dist/port-forward/index.js +1 -1
- package/dist/utils.js +1 -1
- package/package.json +3 -3
- package/dist/command-overview.js +0 -1
- package/dist/console-format-helpers.js +0 -1
package/dist/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a15F=a15M;function a15M(N,M){const V=a15N();return a15M=function(L,k){L=L-0x109;let R=V[L];return R;},a15M(N,M);}(function(N,M){const p=a15M,V=N();while(!![]){try{const L=-parseInt(p(0x11a))/0x1*(parseInt(p(0x12d))/0x2)+parseInt(p(0x12b))/0x3*(parseInt(p(0x11b))/0x4)+-parseInt(p(0x11f))/0x5+-parseInt(p(0x120))/0x6*(-parseInt(p(0x12c))/0x7)+-parseInt(p(0x144))/0x8+-parseInt(p(0x13b))/0x9+-parseInt(p(0x113))/0xa*(-parseInt(p(0x118))/0xb);if(L===M)break;else V['push'](V['shift']());}catch(k){V['push'](V['shift']());}}}(a15N,0xac78e));var __awaiter=this&&this[a15F(0x136)]||function(N,M,V,L){function k(R){return R instanceof V?R:new V(function(r){r(R);});}return new(V||(V=Promise))(function(R,r){function Q(X){const S=a15M;try{h(L[S(0x121)](X));}catch(u){r(u);}}function z(X){try{h(L['throw'](X));}catch(u){r(u);}}function h(X){const b=a15M;X[b(0x10f)]?R(X[b(0x147)]):k(X[b(0x147)])[b(0x149)](Q,z);}h((L=L['apply'](N,M||[]))['next']());});},__importDefault=this&&this[a15F(0x11e)]||function(N){const s=a15F;return N&&N[s(0x14d)]?N:{'default':N};};Object[a15F(0x115)](exports,a15F(0x14d),{'value':!![]}),exports[a15F(0x133)]=exports[a15F(0x153)]=exports[a15F(0x131)]=exports[a15F(0x10e)]=exports[a15F(0x145)]=exports[a15F(0x117)]=exports[a15F(0x12e)]=exports[a15F(0x122)]=exports[a15F(0x137)]=exports[a15F(0x141)]=exports[a15F(0x13a)]=exports[a15F(0x114)]=void 0x0;const node_fetch_1=__importDefault(require('node-fetch')),chalk_1=__importDefault(require(a15F(0x142))),commander_1=require(a15F(0x12a)),pgk=require(a15F(0x119));exports[a15F(0x114)]='northflank-cli/'+(pgk===null||pgk===void 0x0?void 0x0:pgk[a15F(0x14a)]);function checkUpdate(N){return __awaiter(this,void 0x0,void 0x0,function*(){const c=a15M;function M(V,L){const y=a15M,k=new Date(Number(V));return k[y(0x12f)](k[y(0x13d)]()+L),k;}try{if(M(N['getLastUpdateCheck'](),0x1)>new Date())return;const V=pgk[c(0x14a)],{name:L}=pgk;if(!V)return;const k=c(0x10d)+L+c(0x140),R=yield(0x0,node_fetch_1[c(0x11d)])(k,{'method':c(0x151),'timeout':0x1388}),r=(yield R[c(0x150)]())[c(0x14a)];needsUpdate(V,r)&&warning('**\x20You\x27re\x20running\x20on\x20version\x20'+V+c(0x128)+r+'.'+(c(0x130)+L+c(0x152)+L+c(0x13e))),yield N[c(0x14e)](new Date());}catch(Q){}});}exports[a15F(0x13a)]=checkUpdate;function needsUpdate(N,M){const T=a15F,V=/(\.0+)+$/,L=N[T(0x138)](V,'')[T(0x13c)]('.'),k=M[T(0x138)](V,'')[T(0x13c)]('.');for(let R=0x0;R<Math['min'](L[T(0x110)],k[T(0x110)]);R+=0x1){const r=parseInt(k[R],0xa)-parseInt(L[R],0xa);if(r>0x0)return!![];if(r<0x0)return![];}return k[T(0x110)]>L[T(0x110)];}function error(N){const U=a15F;console[U(0x141)](chalk_1[U(0x11d)]['redBright'](U(0x13f)+N));}exports[a15F(0x141)]=error;function warning(N){const Z=a15F;console[Z(0x141)](chalk_1[Z(0x11d)][Z(0x148)](''+N));}exports['warning']=warning;function success(N){const n=a15F;console[n(0x125)](chalk_1['default'][n(0x134)](''+N));}exports[a15F(0x122)]=success;function getCommand(N=![]){const I=a15F,M=new commander_1[(I(0x127))]();return M['storeOptionsAsProperties'](![]),M[I(0x14c)](![]),M['allowExcessArguments'](![]),M['enablePositionalOptions'](!![]),N&&(M[I(0x10a)](I(0x146),I(0x111),![]),M['option'](I(0x14f),I(0x112),![])),M;}exports[a15F(0x12e)]=getCommand;const retry=(N,M=0x32)=>V=>{let L=N;const k=()=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){try{return yield V();}catch(R){if(L<=0x0)throw R;return L-=0x1,yield new Promise(Q=>setTimeout(()=>Q(),M)),k();}});return k();};exports[a15F(0x117)]=retry;const asyncSequential=(N,M)=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){const d=a15F,V=Promise['resolve']([]);return N[d(0x10c)]((L,k)=>L[d(0x149)](R=>M(k)[d(0x149)](Q=>{const v=d;return R[v(0x132)](Q),R;})),V);});exports[a15F(0x145)]=asyncSequential;function isValidJSON(N){const a=a15F;try{return JSON[a(0x123)](N);}catch(M){return![];}}exports['isValidJSON']=isValidJSON;function assertContextExisting(N){const l=a15F;if(N['contextProvider'][l(0x11c)]()===undefined)throw new Error(l(0x139));if(N[l(0x129)][l(0x14b)]()===undefined)throw new Error(l(0x124));if(N[l(0x129)]['getCurrentToken']()===undefined)throw new Error(l(0x109));}exports[a15F(0x131)]=assertContextExisting;const parseDateInput=N=>{const o=a15F;try{let M=new Date(N);if(isNaN(M[o(0x10b)]())){const V=N[o(0x110)]===0xd?N/0x3e8:N,L=new Date(0x0);L[o(0x135)](V);if(isNaN(L['getTime']()))throw new Error();return L;}return M;}catch(k){throw new Error(o(0x126)+N+o(0x116));}};function a15N(){const t=['error','chalk','example:\x202020-02-02T02:02:02Z\x20(date\x20string)\x20or\x201580608922\x20(unix\x20ts)','2896760mZRuNu','asyncSequential','--verbose','value','yellow','then','version','getCurrentBaseUrl','allowUnknownOption','__esModule','setLastUpdateCheck','--quiet','json','GET','\x20-g\x27\x20or\x20\x27yarn\x20global\x20add\x20','parseDateInput','No\x20token\x20in\x20CLI\x20context.\x20Add\x20token\x20with\x20\x27northflank\x20set-token\x27','option','getTime','reduce','https://registry.npmjs.org/','isValidJSON','done','length','Verbose\x20output','No\x20console\x20output','10TmZmtZ','customUserAgent','defineProperty',',\x20expected\x20valid\x20date\x20string\x20(example:\x202020-02-02T02:02:02Z)\x20or\x20unix\x20timestamp\x20(example\x201580608922)','retry','15907947eFVzeA','../package.json','1377132sZLXNe','250076KixNsr','getCurrentContext','default','__importDefault','40290MbZwRn','1182jymosT','next','success','parse','No\x20API\x20URL\x20present\x20in\x20context.\x20Create\x20new\x20context\x20with\x20\x27northflank\x20login\x27','log','Invalid\x20date\x20received:\x20','Command',',\x20the\x20latest\x20version\x20of\x20the\x20cli\x20is\x20','contextProvider','commander','21hKdxyl','43603PKqUlt','2znfUNE','getCommand','setDate','\x20Consider\x20updating\x20using\x20\x27npm\x20i\x20','assertContextExisting','push','tsHint','green','setUTCSeconds','__awaiter','warning','replace','No\x20CLI\x20context\x20present.\x20Create\x20context\x20with\x20\x27northflank\x20login\x27','checkUpdate','5914728sEdSNj','split','getDate','\x27\x20**','Failed:\x20','/latest'];a15N=function(){return t;};return a15N();}exports[a15F(0x153)]=parseDateInput,exports[a15F(0x133)]=a15F(0x143);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@northflank/cli",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.6-beta.0",
|
|
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,12 +26,12 @@
|
|
|
26
26
|
"LICENSE"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@northflank/js-client": "0.7.
|
|
29
|
+
"@northflank/js-client": "0.7.4-beta.0",
|
|
30
30
|
"ajv": "8.6.3",
|
|
31
31
|
"bufferutil": "^4.0.7",
|
|
32
32
|
"chalk": "~4.1.0",
|
|
33
33
|
"columnify": "^1.5.4",
|
|
34
|
-
"commander": "
|
|
34
|
+
"commander": "10.0.0",
|
|
35
35
|
"inquirer": "7.3.3",
|
|
36
36
|
"inquirer-search-list": "^1.2.6",
|
|
37
37
|
"js-yaml": "^3.14.0",
|
package/dist/command-overview.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';const a2E=a2G;(function(l,G){const i=a2G,s=l();while(!![]){try{const I=parseInt(i(0x1d9))/0x1+parseInt(i(0x1dd))/0x2*(-parseInt(i(0x1da))/0x3)+parseInt(i(0x1f4))/0x4*(-parseInt(i(0x1ec))/0x5)+-parseInt(i(0x1f3))/0x6+parseInt(i(0x1e5))/0x7*(-parseInt(i(0x1de))/0x8)+-parseInt(i(0x1f7))/0x9+parseInt(i(0x1e0))/0xa;if(I===G)break;else s['push'](s['shift']());}catch(z){s['push'](s['shift']());}}}(a2l,0x8eb2b));var __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 r=a2G;function A(p){try{n(I['next'](p));}catch(m){N(m);}}function a(p){const J=a2G;try{n(I[J(0x1e3)](p));}catch(m){N(m);}}function n(p){const Q=a2G;p['done']?X(p[Q(0x1e7)]):z(p[Q(0x1e7)])[Q(0x1fe)](A,a);}n((I=I[r(0x1e2)](l,G||[]))[r(0x1fd)]());});},__importDefault=this&&this[a2E(0x1ef)]||function(l){return l&&l['__esModule']?l:{'default':l};};function a2G(l,G){const s=a2l();return a2G=function(I,z){I=I-0x1d8;let X=s[I];return X;},a2G(l,G);}Object[a2E(0x1db)](exports,a2E(0x1ea),{'value':!![]}),exports['getCommandOverview']=void 0x0;const chalk_1=__importDefault(require(a2E(0x1f5))),utils_1=require(a2E(0x1df));function getCommandOverview(l){const V=a2E;return(0x0,utils_1[V(0x1dc)])()[V(0x1f0)](V(0x1e4))['description'](V(0x1d8))['option'](V(0x1f1),V(0x1e6))['action'](G=>__awaiter(this,void 0x0,void 0x0,function*(){const {verbose:s}=G;function I(z,X){const M=a2G;var N;const A=(R,y=!![])=>y?chalk_1[M(0x1f8)][M(0x1fb)][M(0x1f2)](R[M(0x1f0)]()):R[M(0x1f0)](),a=X[M(0x1e9)]===0x0,n=z[M(0x1f9)];let p='';const m=n['length']===0x0,D=m||((N=Object[M(0x1eb)](z===null||z===void 0x0?void 0x0:z[M(0x1fc)]()))===null||N===void 0x0?void 0x0:N[M(0x1e9)])>0x0;!a&&(p=n&&!m?'┬\x20':'─\x20');const o=s&&D&&z[M(0x1ee)]()?':\x20'+z[M(0x1ee)]():'';console['log'](''+X+p+A(z,D)+o);let T=X;if(!a){const R=X[M(0x1e8)](-0x2)==='└─';T=X[M(0x1e8)](0x0,-0x2)+(R?'\x20\x20':'│\x20');}const d=T+'├─',W=T+'└─',B=n[M(0x1f6)](y=>y[M(0x1f9)][M(0x1e9)]===0x0);B&&!m&&!s?console[M(0x1fa)](W+'\x20'+n['map'](y=>A(y))[M(0x1ed)](',\x20')):n[M(0x1e1)]((y,K)=>{const e=M;I(y,n[e(0x1e9)]-0x1===K?W:d);});}I(l,'');}));}function a2l(){const w=['green','3494676EqWDDN','3080732isubAo','chalk','every','8200485jSRsrU','default','commands','log','bold','opts','next','then','Prints\x20a\x20tree\x20view\x20of\x20all\x20available\x20commands','546499yKPbUl','3nXpzpF','defineProperty','getCommand','599314aLegLy','80EWslwq','./utils','29816130CTIUtU','forEach','apply','throw','command-overview','266119MevUMe','Print\x20command\x20descriptions','value','slice','length','__esModule','keys','5sYnXTq','join','description','__importDefault','name','--verbose'];a2l=function(){return w;};return a2l();}exports['getCommandOverview']=getCommandOverview;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';const a3d=a3G;(function(l,G){const T=a3G,s=l();while(!![]){try{const I=-parseInt(T(0x1f0))/0x1*(-parseInt(T(0x1ef))/0x2)+-parseInt(T(0x1f1))/0x3*(-parseInt(T(0x20e))/0x4)+-parseInt(T(0x1e8))/0x5+-parseInt(T(0x20f))/0x6+-parseInt(T(0x209))/0x7*(-parseInt(T(0x207))/0x8)+parseInt(T(0x202))/0x9+-parseInt(T(0x1fc))/0xa;if(I===G)break;else s['push'](s['shift']());}catch(z){s['push'](s['shift']());}}}(a3l,0x820ab));function a3l(){const w=['forEach','set','__importDefault','disabled','create','createdat','length','configurable','default','17704880PmVzrm','includes','printAsTable','getMinutes','internalId','__createBinding','6136236awnFbf','lodash','chalk','toString','log','8NRPTZp','__setModuleDefault','5709452zDzRLd','getMonth','sort','getHours','defineProperty','1109588HIBiqe','998484MMfUpO','isObjectLike','prototype','isArrayLike','isBoolean','clone','call','toLowerCase','__esModule','__importStar','getDate','31570hnWhpN','inspect','getFullYear','isUndefined','isFinite','map','consoleFormat','44dkaVWA','31865NyrOoc','3OqdfHL','getSeconds'];a3l=function(){return w;};return a3l();}var __createBinding=this&&this[a3d(0x201)]||(Object[a3d(0x1f7)]?function(l,G,s,I){const W=a3d;if(I===undefined)I=s;var z=Object['getOwnPropertyDescriptor'](G,s);(!z||('get'in z?!G['__esModule']:z['writable']||z[W(0x1fa)]))&&(z={'enumerable':!![],'get':function(){return G[s];}}),Object[W(0x20d)](l,I,z);}:function(l,G,s,I){if(I===undefined)I=s;l[I]=G[s];}),__setModuleDefault=this&&this[a3d(0x208)]||(Object['create']?function(l,G){const B=a3d;Object[B(0x20d)](l,B(0x1fb),{'enumerable':!![],'value':G});}:function(l,G){const R=a3d;l[R(0x1fb)]=G;}),__importStar=this&&this[a3d(0x1e6)]||function(l){const y=a3d;if(l&&l[y(0x1e5)])return l;var G={};if(l!=null){for(var s in l)if(s!==y(0x1fb)&&Object[y(0x1df)]['hasOwnProperty'][y(0x1e3)](l,s))__createBinding(G,l,s);}return __setModuleDefault(G,l),G;},__importDefault=this&&this[a3d(0x1f5)]||function(l){const K=a3d;return l&&l[K(0x1e5)]?l:{'default':l};};Object['defineProperty'](exports,a3d(0x1e5),{'value':!![]}),exports[a3d(0x1ee)]=exports[a3d(0x1fe)]=void 0x0;const chalk_1=__importDefault(require(a3d(0x204))),_=__importStar(require(a3d(0x203))),util=__importStar(require('util')),columnify=require('columnify');function a3G(l,G){const s=a3l();return a3G=function(I,z){I=I-0x1de;let X=s[I];return X;},a3G(l,G);}function printAsTable(l,G,s,I=![],z=0x0){const i=a3d;!I&&console[i(0x206)](''+chalk_1['default']['bold'](G));function X(A){const J=i;return A==='disabled'?A:A['replace'](J(0x1f6),'');}function N(A,a){const r=i;function n(m){const Q=a3G,D=new Date(m);return D[Q(0x1e7)]()+'/'+D[Q(0x20a)]()+'/'+D[Q(0x1ea)]()+'\x0a'+D[Q(0x20c)]()+':'+D[Q(0x1ff)]()+':'+D[Q(0x1f2)]();}const p=[r(0x1f8),'updatedat'];if(p[r(0x1fd)](a[r(0x1e4)]())&&_[r(0x1ec)](A)&&A['toString']()[r(0x1f9)]===0xd)return n(Number(A));if(_[r(0x1e1)](A)){if(a!==r(0x1f6)&&a[r(0x1fd)](r(0x1f6)))return A?'x':'✔';return A?'✔':'x';}if(_[r(0x1de)](A))return util[r(0x1e9)](A,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});return A;}if(_[i(0x1e0)](l)){l[i(0x1f9)]===0x0&&console[i(0x206)]('No\x20'+G[i(0x1e4)]()+'\x20found');const A=l[i(0x1ed)]((p,m)=>{const E=i,D={'i':m+z};return Object['keys'](p)[E(0x1f3)](o=>{const V=E;(_[V(0x1eb)](s)||s[V(0x1fd)](o[V(0x1e4)]()))&&_[V(0x1f4)](D,X(o),N(p[o],o));}),D;}),a=_[i(0x1e2)](Object['keys']((A===null||A===void 0x0?void 0x0:A[0x0])||[]))[i(0x20b)]((p,m)=>{const M=i,D=o=>o!=='i'?o!==M(0x200)?0x0:0x1:0x2;return D(m)-D(p);}),n={'maxWidth':0x1e,'preserveNewLines':!![],'showHeaders':!I,'config':{'_id':{'maxWidth':0x5,'truncate':!![]},'i':{'showHeaders':![]}},'columns':a};console[i(0x206)](columnify(A,n));}else console[i(0x206)](l);}exports[a3d(0x1fe)]=printAsTable;function consoleFormat(l){const e=a3d;if(!_[e(0x1de)](l))return l===null||l===void 0x0?void 0x0:l[e(0x205)]();return util[e(0x1e9)](l,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});}exports['consoleFormat']=consoleFormat;
|