UNPKG

@northflank/cli

Version:

Provides a command-line interface to the Northflank platform.

1 lines 3.45 kB
function a12j(X,j){const V=a12X();return a12j=function(H,O){H=H-0x1b0;let F=V[H];return F;},a12j(X,j);}const a12B=a12j;(function(X,j){const C=a12j,V=X();while(!![]){try{const H=parseInt(C(0x1c9))/0x1*(parseInt(C(0x1b7))/0x2)+parseInt(C(0x1c2))/0x3+-parseInt(C(0x1be))/0x4*(-parseInt(C(0x1b4))/0x5)+parseInt(C(0x1c1))/0x6*(parseInt(C(0x1c7))/0x7)+-parseInt(C(0x1b1))/0x8*(parseInt(C(0x1ba))/0x9)+parseInt(C(0x1c6))/0xa+-parseInt(C(0x1c8))/0xb*(parseInt(C(0x1bc))/0xc);if(H===j)break;else V['push'](V['shift']());}catch(O){V['push'](V['shift']());}}}(a12X,0x368c7));function a12X(){const y=['pattern','156720eXObsw','283818TkrGGY','bold','log','containerId','4364660IFUXdW','70QKoSlP','4506667ddPGCv','9928PBONup','\x20--\x20','replace','blue','8LWpZWE','green','color','5xfZmXR','yellow','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','2FBTanP','dim','reduce','2797857SFzgXH','cyan','12NMThZr','red','567204waPJni','grey'];a12X=function(){return y;};return a12X();}import a12V from'chalk';export const defaultLogSyntax=[{'color':a12B(0x1bf),'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':a12B(0x1bf),'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':a12B(0x1bf),'pattern':/\s\b([0-9]{2}:){1,2}[0-9]{2}\b\s/i},{'color':a12B(0x1c3),'pattern':new RegExp(a12B(0x1b6),'i')},{'color':a12B(0x1b2),'pattern':/(?:\d{1,3}\.){3}\d{1,3}/i},{'color':a12B(0x1b2),'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':a12B(0x1b0),'pattern':/\b(GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH)\b/},{'color':'greenBright','pattern':/\b(successful|success|completed|complete|done)\b/i},{'color':a12B(0x1bd),'pattern':/\b(failed|fail|stderr|error|err)\b/i},{'color':'gray','pattern':/\b(information|info|debug)\b/i},{'color':a12B(0x1b5),'pattern':/\b(warning|warn)\b/i},{'color':a12B(0x1b0),'pattern':/[0-9a-f]{64}/i},{'color':'blue','pattern':/[0-9a-fA-F]{8}[-]?([0-9a-fA-F]{4}[-]?){3}[0-9a-fA-F]{12}/i}];export const formatLogLine=(X,j)=>{const s=a12B,V=a12V[s(0x1b8)](X['ts']['toISOString']()),H=a12V[s(0x1bb)](X[s(0x1c5)]),O=defaultLogSyntax[s(0x1b9)]((h,P)=>{const S=s;return h[S(0x1cb)](P[S(0x1c0)],o=>P['color']?a12V[P[S(0x1b3)]](o):a12V['grey'](o));},X[s(0x1c4)]),F=j?O['replace'](new RegExp(j,'g'),h=>a12V[s(0x1c3)](h)):O;console[s(0x1c4)](V+'\x20'+H+s(0x1ca)+F);};