@northflank/cli 0.9.5 → 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';function
|
|
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 a2D=a2f;(function(H,f){const c=a2f,l=H();while(!![]){try{const t=parseInt(c(0xad))/0x1*(parseInt(c(0x95))/0x2)+parseInt(c(0xa5))/0x3*(-parseInt(c(0xa4))/0x4)+-parseInt(c(0x9c))/0x5+-parseInt(c(0x9f))/0x6+-parseInt(c(0x8a))/0x7+parseInt(c(0x88))/0x8*(-parseInt(c(0x9b))/0x9)+parseInt(c(0xac))/0xa;if(t===f)break;else l['push'](l['shift']());}catch(b){l['push'](l['shift']());}}}(a2H,0x3651f));var __awaiter=this&&this[a2D(0x8e)]||function(H,f,l,t){function b(i){return i instanceof l?i:new l(function(n){n(i);});}return new(l||(l=Promise))(function(i,n){const E=a2f;function r(Y){const V=a2f;try{w(t[V(0x91)](Y));}catch(x){n(x);}}function q(Y){const e=a2f;try{w(t[e(0xa8)](Y));}catch(x){n(x);}}function w(Y){const O=a2f;Y[O(0x93)]?i(Y['value']):b(Y['value'])[O(0x8f)](r,q);}w((t=t[E(0x97)](H,f||[]))['next']());});},__importDefault=this&&this[a2D(0x90)]||function(H){return H&&H['__esModule']?H:{'default':H};};function a2f(H,f){const l=a2H();return a2f=function(t,b){t=t-0x88;let i=l[t];return i;},a2f(H,f);}Object[a2D(0xa3)](exports,a2D(0x96),{'value':!![]}),exports[a2D(0xa2)]=void 0x0;const chalk_1=__importDefault(require(a2D(0x9a))),utils_1=require(a2D(0x99));function a2H(){const k=['126CYoxZc','537300tJZyBd','keys','every','2434134NmrUlT','join','map','getCommandOverview','defineProperty','84UfIShL','11157CBkJRJ','description','bold','throw','length','commands','name','8479090KppsVT','1aEPZpn','slice','13104xYOIAB','--verbose','826259taAWIO','Print\x20command\x20descriptions','option','Prints\x20a\x20tree\x20view\x20of\x20all\x20available\x20commands','__awaiter','then','__importDefault','next','log','done','action','213606cygavn','__esModule','apply','getCommand','./utils','chalk'];a2H=function(){return k;};return a2H();}function getCommandOverview(H){const S=a2D;return(0x0,utils_1[S(0x98)])()[S(0xab)]('command-overview')[S(0xa6)](S(0x8d))[S(0x8c)](S(0x89),S(0x8b))[S(0x94)](f=>__awaiter(this,void 0x0,void 0x0,function*(){const {verbose:l}=f;function t(b,i){const A=a2f;var n;const r=(X,C=!![])=>C?chalk_1['default'][A(0xa7)]['green'](X['name']()):X[A(0xab)](),q=i[A(0xa9)]===0x0,w=b[A(0xaa)];let Y='';const x=w[A(0xa9)]===0x0,U=x||((n=Object[A(0x9d)](b===null||b===void 0x0?void 0x0:b['opts']()))===null||n===void 0x0?void 0x0:n[A(0xa9)])>0x0;!q&&(Y=w&&!x?'┬\x20':'─\x20');const m=l&&U&&b[A(0xa6)]()?':\x20'+b[A(0xa6)]():'';console[A(0x92)](''+i+Y+r(b,U)+m);let Q=i;if(!q){const X=i[A(0xae)](-0x2)==='└─';Q=i['slice'](0x0,-0x2)+(X?'\x20\x20':'│\x20');}const L=Q+'├─',B=Q+'└─',T=w[A(0x9e)](C=>C[A(0xaa)][A(0xa9)]===0x0);T&&!x&&!l?console[A(0x92)](B+'\x20'+w[A(0xa1)](C=>r(C))[A(0xa0)](',\x20')):w['forEach']((C,j)=>{t(C,w['length']-0x1===j?B:L);});}t(H,'');}));}exports[a2D(0xa2)]=getCommandOverview;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';const a3L=a3f;(function(H,f){const Q=a3f,l=H();while(!![]){try{const t=parseInt(Q(0x16a))/0x1+parseInt(Q(0x184))/0x2*(parseInt(Q(0x185))/0x3)+parseInt(Q(0x180))/0x4+-parseInt(Q(0x18d))/0x5*(parseInt(Q(0x199))/0x6)+-parseInt(Q(0x171))/0x7*(parseInt(Q(0x195))/0x8)+-parseInt(Q(0x18f))/0x9+parseInt(Q(0x17b))/0xa*(parseInt(Q(0x174))/0xb);if(t===f)break;else l['push'](l['shift']());}catch(b){l['push'](l['shift']());}}}(a3H,0xa81a8));var __createBinding=this&&this[a3L(0x19a)]||(Object['create']?function(H,f,l,t){const B=a3L;if(t===undefined)t=l;var b=Object[B(0x177)](f,l);(!b||('get'in b?!f[B(0x167)]:b[B(0x193)]||b[B(0x198)]))&&(b={'enumerable':!![],'get':function(){return f[l];}}),Object['defineProperty'](H,t,b);}:function(H,f,l,t){if(t===undefined)t=l;H[t]=f[l];}),__setModuleDefault=this&&this[a3L(0x16d)]||(Object['create']?function(H,f){const T=a3L;Object[T(0x183)](H,'default',{'enumerable':!![],'value':f});}:function(H,f){H['default']=f;}),__importStar=this&&this['__importStar']||function(H){const X=a3L;if(H&&H[X(0x167)])return H;var f={};if(H!=null){for(var l in H)if(l!==X(0x169)&&Object[X(0x16e)][X(0x17d)]['call'](H,l))__createBinding(f,H,l);}return __setModuleDefault(f,H),f;},__importDefault=this&&this[a3L(0x187)]||function(H){const C=a3L;return H&&H[C(0x167)]?H:{'default':H};};Object[a3L(0x183)](exports,a3L(0x167),{'value':!![]}),exports['consoleFormat']=exports['printAsTable']=void 0x0;const chalk_1=__importDefault(require('chalk')),_=__importStar(require(a3L(0x17a))),util=__importStar(require('util')),columnify=require(a3L(0x189));function printAsTable(H,f,l,t=![],b=0x0){const j=a3L;!t&&console[j(0x18c)](''+chalk_1['default'][j(0x170)](f));function i(r){const c=j;return r===c(0x190)?r:r['replace']('disabled','');}function n(r,q){const V=j;function w(x){const D=a3f,U=new Date(x);return U[D(0x175)]()+'/'+U['getMonth']()+'/'+U[D(0x182)]()+'\x0a'+U[D(0x191)]()+':'+U[D(0x17f)]()+':'+U[D(0x18e)]();}const Y=[V(0x173),V(0x166)];if(Y['includes'](q[V(0x196)]())&&_[V(0x194)](r)&&r[V(0x197)]()[V(0x179)]===0xd)return w(Number(r));if(_[V(0x16c)](r)){if(q!==V(0x190)&&q[V(0x181)](V(0x190)))return r?'x':'✔';return r?'✔':'x';}if(_[V(0x168)](r))return util[V(0x16f)](r,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});return r;}if(_[j(0x18a)](H)){H[j(0x179)]===0x0&&console[j(0x18c)](j(0x16b)+f[j(0x196)]()+j(0x17e));const r=H['map']((Y,x)=>{const e=j,U={'i':x+b};return Object[e(0x176)](Y)[e(0x178)](m=>{const O=e;(_[O(0x192)](l)||l['includes'](m[O(0x196)]()))&&_[O(0x17c)](U,i(m),n(Y[m],m));}),U;}),q=_[j(0x186)](Object[j(0x176)]((r===null||r===void 0x0?void 0x0:r[0x0])||[]))[j(0x165)]((Y,x)=>{const E=j,U=m=>m!=='i'?m!==E(0x188)?0x0:0x1:0x2;return U(x)-U(Y);}),w={'maxWidth':0x1e,'preserveNewLines':!![],'showHeaders':!t,'config':{'_id':{'maxWidth':0x5,'truncate':!![]},'i':{'showHeaders':![]}},'columns':q};console[j(0x18c)](columnify(r,w));}else console[j(0x18c)](H);}exports[a3L(0x172)]=printAsTable;function consoleFormat(H){const S=a3L;if(!_['isObjectLike'](H))return H===null||H===void 0x0?void 0x0:H[S(0x197)]();return util[S(0x16f)](H,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});}function a3f(H,f){const l=a3H();return a3f=function(t,b){t=t-0x165;let i=l[t];return i;},a3f(H,f);}function a3H(){const A=['15CTNhSU','getSeconds','6625476wfChkL','disabled','getHours','isUndefined','writable','isFinite','24unwvcr','toLowerCase','toString','configurable','2137284TqOekk','__createBinding','sort','updatedat','__esModule','isObjectLike','default','1011891sfcOyu','No\x20','isBoolean','__setModuleDefault','prototype','inspect','bold','2497621jjMQVP','printAsTable','createdat','44MjaYZY','getDate','keys','getOwnPropertyDescriptor','forEach','length','lodash','3583390YEtoRW','set','hasOwnProperty','\x20found','getMinutes','1232464YjmRVE','includes','getFullYear','defineProperty','28VIfbwj','173658LcYGOR','clone','__importDefault','internalId','columnify','isArrayLike','consoleFormat','log'];a3H=function(){return A;};return a3H();}exports[a3L(0x18b)]=consoleFormat;
|