@northflank/cli 0.9.25 → 0.9.27
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/port-forward/index.js +1 -1
- package/dist/utils.js +1 -1
- package/package.json +5 -6
package/dist/exec/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function a4Y(){const Z=['customUserAgent','Command\x20to\x20execute.\x0aIf\x20--shell-cmd\x20option\x20such\x20as\x20\x27bash\x20-c\x27\x20is\x20present,\x20it\x20will\x20run\x20in\x20the\x20specified\x20shell.\x20Otherwise\x20the\x20command\x20will\x20run\x20without\x20a\x20shell.\x20If\x20no\x20command\x20is\x20provided,\x20an\x20interactive\x20session\x20with\x20stdin\x20and\x20tty\x20is\x20opened.','2kkXzed','1033074dtROpv','--noDefaults','672723YhJKbk','149508qRnGgn','execCmd','\x20to\x20exec\x20into','defineProperty','--shell-cmd\x20[SHELL-CMD]','apiClient','.\x0aExamples:\x0a\x20\x20Shell\x20session:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20northflank\x20exec\x20','command-exec','action','stdin','\x27Ctrl+D\x27','name','7ByoseP','getCurrentServiceName','Container\x20to\x20exec\x20into\x20(random\x20container\x20will\x20be\x20chosen\x20if\x20not\x20specified)','bold','2122504VpeZSy','\x0a\x20\x20Single\x20command,\x20no\x20shell:\x20\x20\x20\x20\x20northflank\x20exec\x20','greenBright','waitForCommandResult','setRawMode','101445uSUMWB','sequence','getCurrentProjectName','__awaiter','--container\x20--containerId\x20[NAME]','default','Command\x20completed\x20successfully,\x20exit\x20code:\x20','10fdClbY','121332aTtxlP','addCommand','3400YhunAt','--group\x20[GROUP]',',\x20details:\x20','getTerminalSize','message','../inquirer-helper','stdout','success','columns','handleShellSession','Command\x20didn\x27t\x20complete\x20successfully,\x20status:\x20','execStartLog','askForJob','../utils','__esModule','stderr','with\x20shell\x20session','pipe','__importDefault','\x20--','\x20--cmd\x20\x27date\x27\x0a\x20\x20Single\x20command,\x20custom\x20shell:\x20northflank\x20exec\x20','Command\x20exec\x20for\x20the\x20specified\x20','none','--cmd\x20--command\x20[COMMAND]','readline','emitKeypressEvents','assertContextExisting','Exec\x20','job','exit','value','Id\x20[NAME]','\x20in\x20project\x20',',\x20exit\x20code:\x20','throw','Project\x20for\x20exec','stdOut','service','execServiceSession','\x20command\x20exec:\x20','next','with\x20command\x20\x27','671vwYNIE','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','604ZhouVq','status','filter','stdErr','--project\x20--projectId\x20[NAME]','Received\x20Ctrl+D\x20twice,\x20exiting\x20shell\x20forcefully.','exec','Run\x20command\x20with\x20shell\x20(e.g.\x20\x27bash\x27,\x27sh\x27).\x0aIf\x20not\x20set\x20and\x20no\x20command\x20is\x20provided,\x20several\x20standard\x20shells\x20will\x20be\x20attempted.\x20If\x20not\x20set\x20and\x20a\x20command\x20is\x20provided,\x20the\x20command\x20will\x20run\x20without\x20shell.','askForProject','shell\x20command\x20','Unknown','rows','warning','option','Command\x20execution\x20(exec)\x20for\x20Northflank\x20services\x20and\x20jobs.','Run\x20command\x20with\x20this\x20user','getCommand','description','resize','getStandardExecCommand','toUpperCase','isTTY','error','ApiClient','\x20--shell-cmd\x20\x27sh\x27','stdIn','join','keypress','charAt'];a4Y=function(){return Z;};return a4Y();}const a4h=a4k;(function(Y,k){const w=a4k,X=Y();while(!![]){try{const B=-parseInt(w(0x17c))/0x1*(parseInt(w(0x163))/0x2)+-parseInt(w(0x184))/0x3+-parseInt(w(0x144))/0x4*(parseInt(w(0x186))/0x5)+-parseInt(w(0x164))/0x6+-parseInt(w(0x173))/0x7*(parseInt(w(0x177))/0x8)+parseInt(w(0x166))/0x9*(parseInt(w(0x183))/0xa)+-parseInt(w(0x142))/0xb*(-parseInt(w(0x167))/0xc);if(B===k)break;else X['push'](X['shift']());}catch(l){X['push'](X['shift']());}}}(a4Y,0x2546d));var __awaiter=this&&this[a4h(0x17f)]||function(Y,k,X,B){function l(S){return S instanceof X?S:new X(function(C){C(S);});}return new(X||(X=Promise))(function(S,C){function j(O){const g=a4k;try{e(B[g(0x140)](O));}catch(T){C(T);}}function o(O){const y=a4k;try{e(B[y(0x13a)](O));}catch(T){C(T);}}function e(O){const R=a4k;O['done']?S(O[R(0x136)]):l(O[R(0x136)])['then'](j,o);}e((B=B['apply'](Y,k||[]))['next']());});},__importDefault=this&&this[a4h(0x12a)]||function(Y){const q=a4h;return Y&&Y[q(0x126)]?Y:{'default':Y};};function a4k(Y,k){const X=a4Y();return a4k=function(B,l){B=B-0x119;let S=X[B];return S;},a4k(Y,k);}Object[a4h(0x16a)](exports,'__esModule',{'value':!![]}),exports['CliExec']=void 0x0;const js_client_1=require('@northflank/js-client'),chalk_1=__importDefault(require('chalk')),utils_1=require(a4h(0x125)),inquirer_helper_1=require(a4h(0x11d));class CliExec{constructor(Y,k){const U=a4h;this['getStandardExecCommand']=S=>(0x0,utils_1[U(0x154)])(!![])[U(0x172)](S)[U(0x155)](U(0x12d)+S+U(0x16d)+S+U(0x178)+S+U(0x12c)+S+'\x20--cmd\x20\x27\x22ls\x20-l\x20/usr\x22\x27\x20--shell-cmd\x20\x27bash\x20-c\x27\x0a\x20\x20Shell\x20session,\x20custom\x20shell:\x20\x20northflank\x20exec\x20'+S+U(0x15c))[U(0x151)](U(0x148),U(0x13b))[U(0x151)]('--'+S+U(0x12b)+S+U(0x137),S[U(0x160)](0x0)[U(0x158)]()+S['slice'](0x1)+U(0x169))[U(0x151)](U(0x180),U(0x175))[U(0x151)](U(0x16b),U(0x14b))['option']('--user\x20[USER]',U(0x153))[U(0x151)](U(0x119),'Run\x20command\x20with\x20this\x20group')[U(0x151)](U(0x165),U(0x143),![])[U(0x151)](U(0x12f),U(0x162)),this[U(0x11b)]=()=>({'columns':process[U(0x11e)][U(0x120)],'rows':process[U(0x11e)][U(0x14f)]}),this[U(0x123)]=(S,C,j,o,e,O,T,v)=>{const L=U;if(v===!![])return;const F=o==='none',x=F?'without\x20shell':o===undefined?L(0x128):L(0x14d)+chalk_1['default'][L(0x179)](o),t=e!==undefined?'with\x20user:'+e:'',Q=O!==undefined?'with\x20group:'+O:'',n=T!==undefined?L(0x141)+chalk_1[L(0x181)][L(0x179)](T)+'\x27':'',M=[n,x,t,Q][L(0x146)](d=>d!=='')[L(0x15e)]('\x20'),p='(exit\x20with\x20two\x20quick\x20'+chalk_1['default'][L(0x176)](L(0x171))+')';console['log'](L(0x133)+S+'\x20'+chalk_1['default'][L(0x176)](C)+L(0x138)+chalk_1[L(0x181)][L(0x176)](j)+'\x20'+M+'\x20'+p);},this['handleShellSession']=(S,C,j=![])=>__awaiter(this,void 0x0,void 0x0,function*(){const z=U;var o,e;let O=![];try{if(process[z(0x170)][z(0x159)]){const v=require(z(0x130));v[z(0x131)](process[z(0x170)]),process[z(0x170)][z(0x17b)](!![]),process[z(0x11e)]['on'](z(0x156),()=>{const A=z;S['resizeTerminal'](this[A(0x11b)]());}),process['stdin']['on'](z(0x15f),(F,x)=>{const D=z;x[D(0x17d)]==='\x04'&&(O?(process['stdin']['setRawMode'](![]),(0x0,utils_1[D(0x150)])(D(0x149)),process[D(0x135)]()):(O=!![],setTimeout(()=>O=![],0x190)));});}process[z(0x170)][z(0x129)](S[z(0x15d)]),S[z(0x147)][z(0x129)](process[z(0x127)]),S[z(0x13c)][z(0x129)](process[z(0x11e)]),S['on'](z(0x15a),F=>{const E=z;var x;(0x0,utils_1[E(0x15a)])('Error\x20occured\x20during\x20'+C+E(0x13f)+((x=F['message'])!==null&&x!==void 0x0?x:F)),process[E(0x170)]['isTTY']&&process['stdin'][E(0x17b)](![]),process['exit'](-0x1);});const T=yield S[z(0x17a)]();if(j!==!![]){const F=(o=T===null||T===void 0x0?void 0x0:T[z(0x145)])!==null&&o!==void 0x0?o:z(0x14e),x=(e=T===null||T===void 0x0?void 0x0:T['exitCode'])!==null&&e!==void 0x0?e:-0x1,t=(T===null||T===void 0x0?void 0x0:T['message'])?z(0x11a)+T[z(0x11c)]:'';F==='Success'?(0x0,utils_1[z(0x11f)])(z(0x182)+x):(0x0,utils_1[z(0x150)])(z(0x122)+F+z(0x139)+x+t);}return T;}finally{process[z(0x170)][z(0x159)]&&process[z(0x170)][z(0x17b)](![]);}}),this[U(0x16c)]=new js_client_1[(U(0x15b))](Y,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[U(0x161)],'agent':k});const X=new inquirer_helper_1['InquirerHelper'](this[U(0x16c)]);this[U(0x168)]=(0x0,utils_1[U(0x154)])()['name'](U(0x16e))['alias'](U(0x14a))['description'](U(0x152));const B=this[U(0x157)](U(0x13d))[U(0x16f)](S=>__awaiter(this,void 0x0,void 0x0,function*(){const b=U,{noDefaults:C,projectId:j,serviceId:o,containerId:O,shellCmd:T,user:v,group:F,command:x,quiet:t}=S;(0x0,utils_1['assertContextExisting'])(this['apiClient']);try{const Q=C?undefined:Y['getCurrentProjectName'](),n=j||Q||(yield X['askForProject']()),M=C?undefined:Y[b(0x174)](),p=o||M||(yield X['askForService'](n)()),d=T!==null&&T!==void 0x0?T:x!==undefined?b(0x12e):undefined;this[b(0x123)](b(0x13d),p,n,d,v,F,x,t);const P=process[b(0x11e)][b(0x120)],f=process[b(0x11e)][b(0x14f)],N={'projectId':n,'serviceId':p},K=yield this[b(0x16c)]['exec'][b(0x13e)](N,{'containerName':O,'command':x,'shell':d,'user':v,'group':F,'ttyColumns':P,'ttyRows':f});yield this[b(0x121)](K,'service',t);}catch(r){(0x0,utils_1[b(0x15a)])(''+r[b(0x11c)]);}finally{process[b(0x135)]();}})),l=this['getStandardExecCommand'](U(0x134))['action'](S=>__awaiter(this,void 0x0,void 0x0,function*(){const a=U,{projectId:C,jobId:j,containerId:o,noDefaults:O,shellCmd:T,user:v,group:F,command:x,quiet:t}=S;(0x0,utils_1[a(0x132)])(this[a(0x16c)]);try{const Q=O?undefined:Y[a(0x17e)](),n=C||Q||(yield X[a(0x14c)]()),M=j||(yield X[a(0x124)](n)());this[a(0x123)](a(0x134),M,n,T,t);const {rows:p,columns:d}=this[a(0x11b)](),P={'projectId':n,'jobId':M},f=yield this[a(0x16c)]['exec']['execJobSession'](P,{'containerName':o,'command':x,'shell':T,'user':v,'group':F,'ttyColumns':d,'ttyRows':p});yield this[a(0x121)](f,a(0x134),t);}catch(N){(0x0,utils_1[a(0x15a)])(''+N[a(0x11c)]);}finally{process[a(0x135)]();}}));this[U(0x168)]['addCommand'](B),this[U(0x168)][U(0x185)](l);}}exports['CliExec']=CliExec;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function a5k(Y,k){const X=a5Y();return a5k=function(B,l){B=B-0x1da;let S=X[B];return S;},a5k(Y,k);}const a5f=a5k;(function(Y,k){const P=a5k,X=Y();while(!![]){try{const B=-parseInt(P(0x1df))/0x1+parseInt(P(0x1dc))/0x2*(-parseInt(P(0x1e3))/0x3)+parseInt(P(0x1e4))/0x4+-parseInt(P(0x1fb))/0x5+-parseInt(P(0x1fc))/0x6+-parseInt(P(0x1f4))/0x7+parseInt(P(0x1e6))/0x8*(parseInt(P(0x1ed))/0x9);if(B===k)break;else X['push'](X['shift']());}catch(l){X['push'](X['shift']());}}}(a5Y,0xb8b0b));var __awaiter=this&&this[a5f(0x1e5)]||function(Y,k,X,B){function l(S){return S instanceof X?S:new X(function(C){C(S);});}return new(X||(X=Promise))(function(S,C){const r=a5k;function j(O){try{e(B['next'](O));}catch(T){C(T);}}function o(O){const N=a5k;try{e(B[N(0x1ee)](O));}catch(T){C(T);}}function e(O){const K=a5k;O[K(0x1dd)]?S(O[K(0x1f7)]):l(O['value'])[K(0x1f8)](j,o);}e((B=B['apply'](Y,k||[]))[r(0x1f0)]());});},__importDefault=this&&this['__importDefault']||function(Y){const w=a5f;return Y&&Y[w(0x1fe)]?Y:{'default':Y};};Object[a5f(0x1eb)](exports,a5f(0x1fe),{'value':!![]}),exports[a5f(0x1ec)]=void 0x0;const chalk_1=__importDefault(require(a5f(0x201))),utils_1=require(a5f(0x1f6));function a5Y(){const y=['forEach','description','chalk','keys','command-overview','8314KXRmfB','done','map','1383391UlovGl','commands','every','green','780aAgcHJ','2362744YvvVAx','__awaiter','1000UhbboY','length','Prints\x20a\x20tree\x20view\x20of\x20all\x20available\x20commands','default','--verbose','defineProperty','getCommandOverview','294741DVftjq','throw','Print\x20command\x20descriptions','next','join','log','getCommand','2998534ZicKxT','slice','../utils','value','then','name','opts','4957240NUXbxx','262794MPDBPo','option','__esModule'];a5Y=function(){return y;};return a5Y();}function getCommandOverview(Y){const h=a5f;return(0x0,utils_1[h(0x1f3)])()[h(0x1f9)](h(0x1db))[h(0x200)](h(0x1e8))[h(0x1fd)](h(0x1ea),h(0x1ef))['action'](k=>__awaiter(this,void 0x0,void 0x0,function*(){const {verbose:X}=k;function B(l,S){const g=a5k;var C;const j=(M,p=!![])=>p?chalk_1[g(0x1e9)]['bold'][g(0x1e2)](M[g(0x1f9)]()):M[g(0x1f9)](),o=S['length']===0x0,e=l[g(0x1e0)];let O='';const T=e[g(0x1e7)]===0x0,v=T||((C=Object[g(0x1da)](l===null||l===void 0x0?void 0x0:l[g(0x1fa)]()))===null||C===void 0x0?void 0x0:C[g(0x1e7)])>0x0;!o&&(O=e&&!T?'┬\x20':'─\x20');const F=X&&v&&l[g(0x200)]()?':\x20'+l[g(0x200)]():'';console[g(0x1f2)](''+S+O+j(l,v)+F);let x=S;if(!o){const M=S[g(0x1f5)](-0x2)==='└─';x=S[g(0x1f5)](0x0,-0x2)+(M?'\x20\x20':'│\x20');}const t=x+'├─',Q=x+'└─',n=e[g(0x1e1)](p=>p['commands'][g(0x1e7)]===0x0);n&&!T&&!X?console[g(0x1f2)](Q+'\x20'+e[g(0x1de)](p=>j(p))[g(0x1f1)](',\x20')):e[g(0x1ff)]((p,d)=>{B(p,e['length']-0x1===d?Q:t);});}B(Y,'');}));}exports['getCommandOverview']=getCommandOverview;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a6t=a6k;(function(Y,k){const x=a6k,X=Y();while(!![]){try{const B=parseInt(x(0x1ef))/0x1*(parseInt(x(0x1bb))/0x2)+parseInt(x(0x1d0))/0x3*(-parseInt(x(0x1c8))/0x4)+-parseInt(x(0x1d4))/0x5+-parseInt(x(0x1ca))/0x6+-parseInt(x(0x1df))/0x7*(parseInt(x(0x1dd))/0x8)+parseInt(x(0x1b8))/0x9*(-parseInt(x(0x1d9))/0xa)+-parseInt(x(0x1c0))/0xb*(-parseInt(x(0x1d2))/0xc);if(B===k)break;else X['push'](X['shift']());}catch(l){X['push'](X['shift']());}}}(a6Y,0x7200b));var __createBinding=this&&this[a6t(0x1e1)]||(Object[a6t(0x1bc)]?function(Y,X,B,l){const Q=a6t;if(l===undefined)l=B;var S=Object[Q(0x1cd)](X,B);(!S||('get'in S?!X[Q(0x1b5)]:S['writable']||S[Q(0x1cc)]))&&(S={'enumerable':!![],'get':function(){return X[B];}}),Object[Q(0x1bd)](Y,l,S);}:function(Y,X,B,l){if(l===undefined)l=B;Y[l]=X[B];}),__setModuleDefault=this&&this[a6t(0x1e8)]||(Object['create']?function(Y,k){Object['defineProperty'](Y,'default',{'enumerable':!![],'value':k});}:function(Y,k){const n=a6t;Y[n(0x1d8)]=k;}),__importStar=this&&this[a6t(0x1b6)]||function(Y){const M=a6t;if(Y&&Y['__esModule'])return Y;var X={};if(Y!=null){for(var B in Y)if(B!=='default'&&Object[M(0x1f1)][M(0x1be)][M(0x1ce)](Y,B))__createBinding(X,Y,B);}return __setModuleDefault(X,Y),X;},__importDefault=this&&this['__importDefault']||function(Y){const p=a6t;return Y&&Y[p(0x1b5)]?Y:{'default':Y};};Object['defineProperty'](exports,a6t(0x1b5),{'value':!![]}),exports[a6t(0x1d3)]=exports[a6t(0x1f2)]=exports[a6t(0x1f3)]=exports[a6t(0x1cf)]=exports[a6t(0x1c9)]=exports[a6t(0x1da)]=void 0x0;const chalk_1=__importDefault(require(a6t(0x1d1))),_=__importStar(require(a6t(0x1ee))),util=__importStar(require(a6t(0x1d6))),yaml=require(a6t(0x1e3)),columnify=require(a6t(0x1ed));function a6Y(){const q=['1497228Uyvxni','printResponse','3721060WCLpiL','clone','util','isEmpty','default','10gXHUHj','printAsTable','stringify','bold','16lbkbXO','getMonth','62699mGVXKb','disabled','__createBinding','updatedat','js-yaml','safeDump','yaml','log','set','__setModuleDefault','getMinutes','keys','sort','toString','columnify','lodash','7diuxkM','json','prototype','handleFormattedOutput','handleYamlOutput','isArrayLike','createdat','getSeconds','__esModule','__importStar','format','4901625FRbDMO','length','includes','19202ZdLXqX','create','defineProperty','hasOwnProperty','getDate','275PGPZlg','green','toLowerCase','isFinite','\x20(HTTP\x20status:\x20','yml','replace','isBoolean','3609772EmoZre','consoleFormat','3061698myAYpv','isObjectLike','configurable','getOwnPropertyDescriptor','call','handleJsonOutput','3atVLoC','chalk'];a6Y=function(){return q;};return a6Y();}function a6k(Y,k){const X=a6Y();return a6k=function(B,l){B=B-0x1b4;let S=X[B];return S;},a6k(Y,k);}function printAsTable(Y,k,X,B=![],l=0x0){const d=a6t;!B&&console[d(0x1e6)](''+chalk_1['default'][d(0x1dc)](k));function S(j){const P=d;return j===P(0x1e0)?j:j[P(0x1c6)](P(0x1e0),'');}function C(j,o){const N=d;function e(T){const f=a6k,v=new Date(T);return v[f(0x1bf)]()+'/'+v[f(0x1de)]()+'/'+v['getFullYear']()+'\x0a'+v['getHours']()+':'+v[f(0x1e9)]()+':'+v[f(0x1b4)]();}const O=[N(0x1f5),N(0x1e2)];if(O[N(0x1ba)](o[N(0x1c2)]())&&_[N(0x1c3)](j)&&j['toString']()[N(0x1b9)]===0xd)return e(Number(j));if(_[N(0x1c7)](j)){if(o!==N(0x1e0)&&o['includes']('disabled'))return j?'x':'✔';return j?'✔':'x';}if(_[N(0x1cb)](j))return util['inspect'](j,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});return j;}if(_[d(0x1f4)](Y)){Y[d(0x1b9)]===0x0&&console[d(0x1e6)]('No\x20'+k[d(0x1c2)]()+'\x20found');const j=Y['map']((O,T)=>{const K=d,v={'i':T+l};return Object[K(0x1ea)](O)['forEach'](F=>{const r=K;(_['isUndefined'](X)||X[r(0x1ba)](F[r(0x1c2)]()))&&_[r(0x1e7)](v,S(F),C(O[F],F));}),v;}),o=_[d(0x1d5)](Object[d(0x1ea)]((j===null||j===void 0x0?void 0x0:j[0x0])||[]))[d(0x1eb)]((O,T)=>{const v=F=>F!=='i'?F!=='internalId'?0x0:0x1:0x2;return v(T)-v(O);}),e={'maxWidth':0x1e,'preserveNewLines':!![],'showHeaders':!B,'config':{'_id':{'maxWidth':0x5,'truncate':!![]},'i':{'showHeaders':![]}},'columns':o};console[d(0x1e6)](columnify(j,e));}else console[d(0x1e6)](Y);}exports[a6t(0x1da)]=printAsTable;function consoleFormat(Y,k){const w=a6t;if(_[w(0x1d7)](Y)){const X=k?w(0x1c4)+k+')':'';return chalk_1['default'][w(0x1c1)]('The\x20request\x20was\x20completed\x20successfully')+X;}if(!_[w(0x1cb)](Y))return Y===null||Y===void 0x0?void 0x0:Y[w(0x1ec)]();return util['inspect'](Y,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});}exports[a6t(0x1c9)]=consoleFormat;const handleJsonOutput=(Y,k)=>{const h=a6t,X=Y===h(0x1f0);if(X)console[h(0x1e6)](JSON[h(0x1db)](k,null,'\x20'));};exports[a6t(0x1cf)]=handleJsonOutput;const handleYamlOutput=(Y,k)=>{const g=a6t,X=Y===g(0x1e5)||Y===g(0x1c5);if(X)console[g(0x1e6)](yaml[g(0x1e4)](k));};exports[a6t(0x1f3)]=handleYamlOutput;const handleFormattedOutput=(Y,k)=>{const y=a6t,X=Y===y(0x1b7);if(X)console[y(0x1e6)](consoleFormat(k));};exports[a6t(0x1f2)]=handleFormattedOutput;const printResponse=(Y,k)=>{const R=a6t;(0x0,exports[R(0x1cf)])(Y,k),(0x0,exports[R(0x1f3)])(Y,k),(0x0,exports[R(0x1f2)])(Y,k);};exports[a6t(0x1d3)]=printResponse;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a7i=a7k;(function(Y,k){const I=a7k,X=Y();while(!![]){try{const B=parseInt(I(0x16b))/0x1+parseInt(I(0x178))/0x2+parseInt(I(0x180))/0x3*(parseInt(I(0x17e))/0x4)+parseInt(I(0x161))/0x5*(-parseInt(I(0x17b))/0x6)+-parseInt(I(0x17f))/0x7+-parseInt(I(0x165))/0x8+parseInt(I(0x17c))/0x9*(parseInt(I(0x162))/0xa);if(B===k)break;else X['push'](X['shift']());}catch(l){X['push'](X['shift']());}}}(a7Y,0x95d2e));var __importDefault=this&&this['__importDefault']||function(Y){const u=a7k;return Y&&Y[u(0x172)]?Y:{'default':Y};};function a7k(Y,k){const X=a7Y();return a7k=function(B,l){B=B-0x15b;let S=X[B];return S;},a7k(Y,k);}Object[a7i(0x15e)](exports,a7i(0x172),{'value':!![]}),exports[a7i(0x171)]=exports[a7i(0x16f)]=void 0x0;const chalk_1=__importDefault(require(a7i(0x177))),colored=(Y,k)=>{return k===undefined?Y:chalk_1['default'][k](Y);},getAsciiChart=(Y,k={})=>{const W=a7i,X=Array[W(0x175)](Y[0x0])?Y:[Y];let B=typeof k[W(0x16a)]!==W(0x166)?k[W(0x16a)]:X[0x0][0x0],l=typeof k[W(0x16e)]!==W(0x166)?k[W(0x16e)]:X[0x0][0x0];for(let N=0x0;N<X[W(0x176)];N++){for(let K=0x0;K<X[N]['length'];K++){B=Math[W(0x16a)](B,X[N][K]),l=Math[W(0x16e)](l,X[N][K]);}}let S=['┼','┤','╶','╴','─','╰','╭','╮','╯','│'],C=Math['abs'](l-B),o=typeof k['offset']!==W(0x166)?k[W(0x181)]:0x3,e=typeof k[W(0x15b)]!==W(0x166)?k[W(0x15b)]:W(0x169),O=typeof k['height']!==W(0x166)?k[W(0x15c)]:C,T=typeof k[W(0x168)]!==W(0x166)?k['colors']:['blue','red',W(0x16c),W(0x167),'black'],v=C!==0x0?O/C:0x1,F=Math[W(0x17d)](B*v),t=Math[W(0x17d)](l*v),Q=Math[W(0x16d)](t-F),n=0x0;for(let r=0x0;r<X['length'];r++){n=Math[W(0x16e)](n,X[r][W(0x176)]);}n=n+o;let M=typeof k[W(0x174)]!==W(0x166)?k[W(0x174)]:S,p=k['format']!==undefined?k[W(0x164)]:function(w){const Y0=W;return(e+w['toFixed'](0x2)+k[Y0(0x170)])[Y0(0x160)](-e['length']);},d=new Array(Q+0x1);for(let w=0x0;w<=Q;w++){d[w]=new Array(n);for(let h=0x0;h<n;h++){d[w][h]='\x20';}}for(let g=F;g<=t;++g){const R=p(Q>0x0?l-(g-F)*C/Q:g,g-F);d[g-F][Math[W(0x16e)](o-R[W(0x176)],0x0)]=R,d[g-F][o-0x1]=g==0x0?M[0x0]:M[0x1];}for(let q=0x0;q<X[W(0x176)];q++){let U=T[q%T[W(0x176)]],L=Math[W(0x17d)](X[q][0x0]*v)-F;d[Q-L][o-0x1]=colored(M[0x0],U);for(let z=0x0;z<X[q][W(0x176)]-0x1;z++){let A=Math[W(0x17d)](X[q][z+0x0]*v)-F,D=Math[W(0x17d)](X[q][z+0x1]*v)-F;if(A==D)d[Q-A][z+o]=colored(M[0x4],U);else{d[Q-D][z+o]=colored(A>D?M[0x5]:M[0x6],U),d[Q-A][z+o]=colored(A>D?M[0x7]:M[0x8],U);let E=Math[W(0x16a)](A,D),b=Math[W(0x16e)](A,D);for(let a=E+0x1;a<b;a++){d[Q-a][z+o]=colored(M[0x9],U);}}}}const {startTs:P,endTs:f}=k;if(P||f){const Z=H=>{const Y1=W;if(!H)return Y1(0x179);const G=H['toLocaleDateString'](undefined,{'day':Y1(0x17a),'month':Y1(0x17a),'year':Y1(0x17a)}),s=H['toLocaleTimeString'](undefined,{'hourCycle':Y1(0x15f)});return G+'\x20'+s;},c=Z(f),V=Z(P),m=e[W(0x160)](0x0,Math[W(0x16e)](0x2,e[W(0x176)]-V['length']/0x2+0x1)),J='\x20'['repeat'](Math['max'](n-(e[W(0x176)]+c[W(0x176)]/0x2),0x1));d['push']([''+m+V+J+c]),d[W(0x173)]([]);}return d['map'](H=>H['join'](''))[W(0x163)]('\x0a');};function a7Y(){const Y3=['__esModule','push','symbols','isArray','length','chalk','2454168QAVUpr','\x20\x20\x20','2-digit','3324VRxsKc','1341yezdaE','round','44THfNLU','4167667SSnXxB','207219CmtmRl','offset','padding','height','floor','defineProperty','h24','slice','8140rGrJcj','62540RJpYEP','join','format','6753768KdCOAt','undefined','grey','colors','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','min','36459BaEdHb','green','abs','max','getAsciiChart','unit','downSampleData'];a7Y=function(){return Y3;};return a7Y();}exports[a7i(0x16f)]=getAsciiChart;const downSampleData=(Y,k)=>{const Y2=a7i,X=Y[Y2(0x176)];if(k>=X||k===0x0)return Y;const B=[];let l=0x0;const S=(X-0x2)/(k-0x2);let C=0x0,j,o,e,O;B[l++]=Y[C];for(var T=0x0;T<k-0x2;T++){let n=0x0,M=0x0,p=Math[Y2(0x15d)]((T+0x1)*S)+0x1,d=Math[Y2(0x15d)]((T+0x2)*S)+0x1;d=d<X?d:X;var v=d-p;for(;p<d;p++){n+=Y[p][0x0],M+=Y[p][0x1];}n/=v,M/=v;var F=Math[Y2(0x15d)](T*S)+0x1,x=Math[Y2(0x15d)]((T+0x1)*S)+0x1,t=Y[C][0x0],Q=Y[C][0x1];o=e=-0x1;for(;F<x;F++){e=Math['abs']((t-n)*(Y[F][0x1]-Q)-(t-Y[F][0x0])*(M-Q))*0.5,e>o&&(o=e,j=Y[F],O=F);}B[l++]=j,C=O;}return B[l++]=Y[X-0x1],B;};exports[a7i(0x171)]=downSampleData;
|
package/dist/inquirer-helper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a8o=a8e;(function(F,e){const w=a8e,G=F();while(!![]){try{const u=-parseInt(w(0x1c3))/0x1+-parseInt(w(0x264))/0x2+parseInt(w(0x1ce))/0x3*(parseInt(w(0x232))/0x4)+-parseInt(w(0x1bf))/0x5+parseInt(w(0x1e4))/0x6*(parseInt(w(0x26e))/0x7)+-parseInt(w(0x219))/0x8+parseInt(w(0x26d))/0x9;if(u===e)break;else G['push'](G['shift']());}catch(R){G['push'](G['shift']());}}}(a8F,0x3c018));var __createBinding=this&&this[a8o(0x27f)]||(Object[a8o(0x207)]?function(F,e,G,u){const i=a8o;if(u===undefined)u=G;var R=Object[i(0x281)](e,G);(!R||(i(0x276)in R?!e['__esModule']:R['writable']||R['configurable']))&&(R={'enumerable':!![],'get':function(){return e[G];}}),Object['defineProperty'](F,u,R);}:function(F,e,G,u){if(u===undefined)u=G;F[u]=e[G];}),__setModuleDefault=this&&this[a8o(0x23a)]||(Object['create']?function(F,e){const l=a8o;Object[l(0x229)](F,l(0x179),{'enumerable':!![],'value':e});}:function(F,e){const X=a8o;F[X(0x179)]=e;}),__importStar=this&&this[a8o(0x224)]||function(F){const h=a8o;if(F&&F[h(0x274)])return F;var e={};if(F!=null){for(var G in F)if(G!==h(0x179)&&Object[h(0x18d)][h(0x28b)]['call'](F,G))__createBinding(e,F,G);}return __setModuleDefault(e,F),e;},__awaiter=this&&this[a8o(0x1f1)]||function(F,e,G,u){function R(b){return b instanceof G?b:new G(function(W){W(b);});}return new(G||(G=Promise))(function(b,W){const r=a8e;function V(t){const d=a8e;try{m(u[d(0x1cd)](t));}catch(T){W(T);}}function a(t){const B=a8e;try{m(u[B(0x1a2)](t));}catch(T){W(T);}}function m(t){const x=a8e;t[x(0x1a6)]?b(t[x(0x251)]):R(t[x(0x251)])['then'](V,a);}m((u=u['apply'](F,e||[]))[r(0x1cd)]());});},__importDefault=this&&this[a8o(0x258)]||function(F){const k=a8o;return F&&F[k(0x274)]?F:{'default':F};};Object[a8o(0x229)](exports,a8o(0x274),{'value':!![]}),exports[a8o(0x1c4)]=void 0x0;const _=__importStar(require(a8o(0x1e3))),chalk_1=__importDefault(require(a8o(0x280))),fs=__importStar(require('fs')),utils_1=require(a8o(0x228)),api_helpers_1=require(a8o(0x234)),inquirer_pagination_prompt_1=require(a8o(0x24c)),inquirer=require(a8o(0x240)),inquirerSearchList=require(a8o(0x1fe)),yaml=require('js-yaml');var ConfirmChoices;function a8e(F,e){const G=a8F();return a8e=function(u,R){u=u-0x178;let b=G[u];return b;},a8e(F,e);}(function(F){const K=a8o;F['YES']='Yes,\x20send',F[K(0x19b)]=K(0x283),F[K(0x271)]=K(0x1d1),F['SAVE']=K(0x27a),F[K(0x1b7)]=K(0x1bb);}(ConfirmChoices||(ConfirmChoices={})));class InquirerHelper{constructor(F){const p=a8o;this[p(0x1f7)]=F,this[p(0x1f0)]=0x32,this[p(0x189)]=e=>__awaiter(this,void 0x0,void 0x0,function*(){const O=p,{editedResult:G}=yield inquirer['prompt']([{'type':O(0x1db),'name':O(0x220),'message':O(0x22b),'default':yaml[O(0x1a7)](e)}]);return yaml[O(0x17f)](G);}),this[p(0x1ca)]=e=>__awaiter(this,void 0x0,void 0x0,function*(){const D=p,G=W=>'Unexpected\x20file\x20type:\x20'+W+D(0x223);function u(){return __awaiter(this,void 0x0,void 0x0,function*(){const z=a8e;return inquirer[z(0x1b0)]([{'type':z(0x17d),'name':z(0x209),'message':'Provide\x20a\x20file\x20path\x20to\x20write\x20the\x20configuration\x20to\x20(<name>.[json|yaml|yml])','validate':W=>new RegExp(z(0x221))[z(0x1c2)](W)?!![]:G(W)}]);});}const {fileName:R}=yield u(),b=R[D(0x185)]()[D(0x260)]('.')[D(0x1d5)]();try{switch(b){case D(0x227):(0x0,utils_1[D(0x1c1)])(D(0x203)+R);return fs[D(0x1d8)](R,JSON[D(0x1af)](e,null,'\x20\x20'));case D(0x27b):case D(0x245):(0x0,utils_1[D(0x1c1)])(D(0x203)+R);return fs[D(0x1d8)](R,yaml[D(0x1a7)](e));default:(0x0,utils_1['warning'])(G(b));}}catch(W){(0x0,utils_1['warning'])(D(0x21e)+W[D(0x1fc)]);}return undefined;}),this['filter']=(e,G)=>u=>{const C=p,R=typeof u===C(0x1b1)?u[C(0x231)]():u;return G===![]&&R===C(0x252)?'':R;},this[p(0x237)]=(e,G,u)=>R=>{const N=p;if(this[N(0x1aa)]===!![])return!![];const b=[];if(R===''||R===N(0x252)){if(G!==![])b[N(0x253)]('this\x20option\x20is\x20required,\x20please\x20answer');else return!![];}e['type']===N(0x1b1)&&!_[N(0x266)](e[N(0x19a)])&&b[N(0x253)](new RegExp(e[N(0x19a)])['test'](R)?!![]:N(0x23c)+e[N(0x19a)]+'\x27');e[N(0x1d9)]===N(0x1b1)&&!_[N(0x266)](e[N(0x225)])&&b['push'](R['length']>=e[N(0x225)]?!![]:'must\x20be\x20longer\x20than\x20or\x20equal\x20to\x20'+e[N(0x225)]+'\x20characters,\x20is\x20'+R[N(0x196)]+'\x20characters');e[N(0x1d9)]==='string'&&!_[N(0x266)](e[N(0x211)])&&b[N(0x253)](R[N(0x196)]<=e['maxLength']?!![]:N(0x22a)+e['maxLength']+N(0x26f)+R[N(0x196)]+'\x20characters');u&&Number[N(0x204)](parseInt(R,0xa))&&b[N(0x253)]('must\x20be\x20a\x20number,\x20is\x20'+R);e[N(0x1d9)]==='integer'&&!_['isUndefined'](e[N(0x20a)])&&b[N(0x253)](R>=e[N(0x20a)]?!![]:N(0x1c9)+e[N(0x20a)]);e[N(0x1d9)]===N(0x1d4)&&!_[N(0x266)](e[N(0x288)])&&b[N(0x253)](R<=e['maximum']?!![]:N(0x1f4)+e['maximum']);if(e[N(0x1d9)]===N(0x1c0)){const a=(0x0,utils_1[N(0x218)])(R);b[N(0x253)](a===![]||_[N(0x216)](a)?N(0x20e):!![]);}const W=b['filter'](m=>m!==!![]),V=(e===null||e===void 0x0?void 0x0:e['example'])?'\x0a'+chalk_1['default'][N(0x24e)]('>>')+N(0x1b4)+chalk_1[N(0x179)][N(0x24f)](JSON['stringify'](e[N(0x20c)])):'';return W[N(0x196)]>0x0?W['join'](chalk_1[N(0x179)]['underline'](N(0x1a9)))+V:!![];},this[p(0x28f)]=(e,G,u)=>{const I=p,R=e[e[I(0x196)]-0x1];function b(){const Y=I;return e[Y(0x200)](0x0,-0x1)[Y(0x1b3)](a=>a[Y(0x1f9)](0x0)['toUpperCase']()+a[Y(0x200)](0x1))[Y(0x1a0)]('>');}const W=e[I(0x196)]>0x1?chalk_1[I(0x179)]['bgGrey'][I(0x24f)](b())+':\x20':'',V=u?'\x20('+chalk_1[I(0x179)][I(0x1bc)](u)+')':'';return chalk_1[I(0x179)][I(0x194)](''+W+G+'\x20'+chalk_1[I(0x179)][I(0x1cf)][I(0x1b6)](R)+V+'?');},this[p(0x26c)]=(e,G,u)=>__awaiter(this,void 0x0,void 0x0,function*(){const g=p;if(G[g(0x196)]<0x1){const W=u?'for\x20this\x20'+u:g(0x1d0);throw new Error(g(0x282)+e+'\x20'+W+'.');}const R='Choose\x20the\x20'+e+g(0x1e7),b=G[g(0x196)]>0x4?g(0x21b):'list';return(yield inquirer[g(0x1b0)]([{'type':b,'name':g(0x22d),'message':R,'choices':G}]))[g(0x22d)];}),this[p(0x17e)]=(e,G,u)=>__awaiter(this,void 0x0,void 0x0,function*(){const Q=p,{elements:R,nextCursor:b}=yield G();if(R[Q(0x196)]<0x1){const a=u?Q(0x1ff)+u:'found';throw new Error(Q(0x282)+e+'\x20'+a+'.');}const W=Q(0x191)+e+Q(0x1e7);if(b!==undefined){const m=({nextPageCursor:t})=>__awaiter(this,void 0x0,void 0x0,function*(){const S=Q,T=yield G(t);return{'elements':T['elements'],'nextPageCursor':T[S(0x1c7)]};});return(yield inquirer['prompt']([{'type':Q(0x222),'name':Q(0x22d),'message':W,'choices':R,'nextPageCursor':b,'loadMore':m}]))[Q(0x22d)];}const V=R['length']>0x4?Q(0x21b):Q(0x1fa);return(yield inquirer[Q(0x1b0)]([{'type':V,'name':Q(0x22d),'message':W,'choices':R}]))[Q(0x22d)];}),this['askGeneric']=(e,G)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const j=p,u=''+(G?'('+chalk_1[j(0x179)][j(0x1bc)](G)+')\x20':''),R=j(0x286)+chalk_1['default'][j(0x182)](e)+'\x20'+u+j(0x193),b=this[j(0x237)]({'type':j(0x1b1),'required':!![]});return(yield inquirer['prompt']([{'type':j(0x17d),'name':j(0x22d),'message':R,'validate':b}]))[j(0x22d)];}),this[p(0x212)]=e=>__awaiter(this,void 0x0,void 0x0,function*(){const q=p;return(yield inquirer[q(0x1b0)]([{'type':q(0x1f2),'name':q(0x22d),'message':e,'default':!![]}]))[q(0x22d)];}),this[p(0x1fb)]=e=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const H=p,G=u=>__awaiter(this,void 0x0,void 0x0,function*(){const f=a8e,R=yield this[f(0x1f7)]['list']['services']['all']({'parameters':{'projectId':u}}),b=R['data']['services']['map'](W=>W['id']);return b;});return this['askForProjectScopedResource'](H(0x1dc),G,e);}),this[p(0x238)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const y=p,e=G=>__awaiter(this,void 0x0,void 0x0,function*(){const s=a8e;var u;const R=yield this[s(0x1f7)][s(0x1fa)][s(0x188)]({'options':{'per_page':this[s(0x1f0)],'cursor':G}}),b=R[s(0x1c6)][s(0x188)][s(0x1b3)](W=>W['id']);return{'elements':b,'nextCursor':(u=R[s(0x242)])===null||u===void 0x0?void 0x0:u[s(0x255)]};});return this[y(0x17e)]('template',e);}),this[p(0x1da)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const J=p,e=G=>__awaiter(this,void 0x0,void 0x0,function*(){const E=a8e;var u,R,b;const W=yield this[E(0x1f7)][E(0x1fa)][E(0x19c)]({'options':{'per_page':this[E(0x1f0)],'cursor':G}}),V=(R=(u=W[E(0x1c6)]['tags'])===null||u===void 0x0?void 0x0:u['map'](a=>a['id']))!==null&&R!==void 0x0?R:[];return{'elements':V,'nextCursor':(b=W[E(0x242)])===null||b===void 0x0?void 0x0:b['cursor']};});return this[J(0x17e)](J(0x17a),e);}),this[p(0x1b9)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const M=p;var e;const G=yield this[M(0x1f7)]['list'][M(0x1a3)][M(0x257)]({}),u=(e=G[M(0x1c6)][M(0x1a3)][M(0x1b3)](R=>R['name']))!==null&&e!==void 0x0?e:[];return this['askForResource'](M(0x279),u);}),this[p(0x1f6)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const P=p,e=G=>__awaiter(this,void 0x0,void 0x0,function*(){const L=a8e;var u,R,b;const W=yield this[L(0x1f7)][L(0x1fa)]['cloud'][L(0x1f5)]({'options':{'per_page':this['defaultPaginationPageSize'],'cursor':G}}),V=(R=(u=W[L(0x1c6)][L(0x1f5)])===null||u===void 0x0?void 0x0:u[L(0x1b3)](a=>a['name']))!==null&&R!==void 0x0?R:[];return{'elements':V,'nextCursor':(b=W[L(0x242)])===null||b===void 0x0?void 0x0:b[L(0x255)]};});return this[P(0x17e)](P(0x18f),e);}),this[p(0x19f)]=e=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const U=p;if(_[U(0x266)](e))throw new Error(U(0x183));const G=u=>__awaiter(this,void 0x0,void 0x0,function*(){const F0=U;var R;let b=this[F0(0x1f0)];const W=yield this[F0(0x1f7)][F0(0x1fa)][F0(0x19e)]({'parameters':{'templateId':e},'options':{'per_page':b,'cursor':u}}),V=W['data']['templateRuns'][F0(0x1b3)](a=>a['id']+F0(0x1d3)+a[F0(0x1f8)]+')');return{'elements':V,'nextCursor':(R=W['pagination'])===null||R===void 0x0?void 0x0:R[F0(0x255)]};});return this[U(0x17e)]('template\x20run',G)[U(0x23b)](u=>u[U(0x260)]('\x20')[0x0]);}),this[p(0x1cc)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const F2=p,e=G=>__awaiter(this,void 0x0,void 0x0,function*(){const F1=a8e;var u;let R=this[F1(0x1f0)];const b=yield this['apiClient'][F1(0x1fa)][F1(0x259)]({'options':{'per_page':R,'cursor':G}}),W=b[F1(0x1c6)][F1(0x259)][F1(0x1b3)](V=>V['id']);return{'elements':W,'nextCursor':(u=b[F1(0x242)])===null||u===void 0x0?void 0x0:u['cursor']};});return this[F2(0x17e)]('log\x20sink',e);}),this[p(0x1e2)]=e=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const F4=p,G=u=>__awaiter(this,void 0x0,void 0x0,function*(){const F3=a8e,R=yield this[F3(0x1f7)][F3(0x1fa)][F3(0x195)][F3(0x257)]({'parameters':{'projectId':u}});return R[F3(0x1c6)][F3(0x195)][F3(0x1b3)](b=>b['id']);});return this[F4(0x25a)](F4(0x233),G,e);}),this[p(0x1e5)]=e=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const F6=p,G=u=>__awaiter(this,void 0x0,void 0x0,function*(){const F5=a8e,R=yield this['apiClient'][F5(0x1fa)]['jobs']['all']({'parameters':{'projectId':u}}),b=R[F5(0x1c6)][F5(0x22e)]['map'](W=>W['id']);return b;});return this[F6(0x25a)](F6(0x230),G,e);}),this[p(0x25e)]=(e,G,u=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const F7=p,R=F7(0x261),b=W=>V=>__awaiter(this,void 0x0,void 0x0,function*(){const F8=F7;var a;const m=yield this[F8(0x1f7)][F8(0x276)][F8(0x230)][F8(0x27d)]({'parameters':{'projectId':W,'jobId':e},'options':{'per_page':this[F8(0x1f0)],'cursor':V}}),t=m[F8(0x1c6)][F8(0x27d)][F8(0x1b3)](T=>T['id']+F8(0x1d3)+T[F8(0x1e0)]+')');return u&&t[F8(0x26b)](R),{'elements':t,'nextCursor':(a=m['pagination'])===null||a===void 0x0?void 0x0:a[F8(0x255)]};});return this['askForProjectScopedResourcePaginated']('job\x20runs',b,G,F7(0x1dd)+e+'\x27')['then'](W=>{const F9=F7,V=W[F9(0x260)]('\x20')[0x0];if(V===R)return undefined;return V;});}),this[p(0x1ad)]=(e,G,u,R=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const FF=p,b=FF(0x1c5);if(u!==undefined){const W=V=>a=>__awaiter(this,void 0x0,void 0x0,function*(){const Fe=FF;var m;const t=yield this[Fe(0x1f7)][Fe(0x276)][Fe(0x230)][Fe(0x201)]({'parameters':{'projectId':V,'jobId':u},'options':{'per_page':this[Fe(0x1f0)],'cursor':a}}),T=t[Fe(0x1c6)][Fe(0x201)][Fe(0x1b3)](Z=>Z['id']+Fe(0x1d3)+Z[Fe(0x1f8)]+')');return R&&T[Fe(0x26b)](b),{'elements':T,'nextCursor':(m=t['pagination'])===null||m===void 0x0?void 0x0:m['cursor']};});return this[FF(0x1d6)](FF(0x28c),W,e,FF(0x1dd)+u+'\x27')['then'](V=>{const FG=FF,a=V[FG(0x260)]('\x20')[0x0];if(a===b)return undefined;return a;});}if(G!==undefined){const V=a=>m=>__awaiter(this,void 0x0,void 0x0,function*(){const Fu=FF;var t;const T=yield this[Fu(0x1f7)][Fu(0x276)][Fu(0x1dc)][Fu(0x201)]({'parameters':{'projectId':a,'serviceId':G},'options':{'per_page':this[Fu(0x1f0)],'cursor':m}}),Z=T[Fu(0x1c6)][Fu(0x201)][Fu(0x1b3)](n=>n['id']+Fu(0x1d3)+n[Fu(0x1f8)]+')');if(R)Z[Fu(0x26b)](b);return{'elements':Z,'nextCursor':(t=T['pagination'])===null||t===void 0x0?void 0x0:t[Fu(0x255)]};});return this['askForProjectScopedResourcePaginated'](FF(0x1eb),V,e,FF(0x17c)+u+'\x27')[FF(0x23b)](a=>{const m=a['split']('\x20')[0x0];if(m===b)return undefined;return m;});}throw new Error(FF(0x1a8));}),this[p(0x1b5)]=(e,G,u,R=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const FR=p,b=FR(0x21d);if(u!==undefined){const W=V=>a=>__awaiter(this,void 0x0,void 0x0,function*(){const Fb=FR;var m,t;const T=yield this[Fb(0x1f7)][Fb(0x276)][Fb(0x230)][Fb(0x28d)]({'parameters':{'projectId':V,'jobId':u},'options':{'per_page':this[Fb(0x1f0)],'cursor':a}}),Z=(m=T[Fb(0x1c6)][Fb(0x28d)])!==null&&m!==void 0x0?m:[],n=Z===null||Z===void 0x0?void 0x0:Z['map'](v=>v[Fb(0x22d)]+'\x20(startedAt:\x20'+v[Fb(0x1f8)]+')');return R&&n['unshift'](b),{'elements':n,'nextCursor':(t=T[Fb(0x242)])===null||t===void 0x0?void 0x0:t[Fb(0x255)]};});return this[FR(0x1d6)]('job\x20containers',W,e,FR(0x1dd)+u+'\x27')[FR(0x23b)](V=>{const FW=FR,a=V[FW(0x260)]('\x20')[0x0];if(a===b)return undefined;return a;});}if(G!==undefined){const V=a=>m=>__awaiter(this,void 0x0,void 0x0,function*(){const FV=FR;var t,T;const Z=yield this['apiClient'][FV(0x276)]['service'][FV(0x28d)]({'parameters':{'projectId':a,'serviceId':G},'options':{'per_page':this[FV(0x1f0)],'cursor':m}}),n=(t=Z[FV(0x1c6)]['containers'])!==null&&t!==void 0x0?t:[],v=n[FV(0x1b3)](A=>A['name']+'\x20(startedAt:\x20'+A[FV(0x1f8)]+')');if(R)v===null||v===void 0x0?void 0x0:v[FV(0x26b)](b);return{'elements':v,'nextCursor':(T=Z['pagination'])===null||T===void 0x0?void 0x0:T[FV(0x255)]};});return this[FR(0x1d6)](FR(0x250),V,e,'service:\x20\x27'+u+'\x27')['then'](a=>{const Fa=FR,m=a[Fa(0x260)]('\x20')[0x0];if(m===b)return undefined;return m;});}throw new Error('No\x20containers\x20found');}),this[p(0x1d2)]=e=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Ft=p,G=u=>__awaiter(this,void 0x0,void 0x0,function*(){const Fm=a8e,R=yield this[Fm(0x1f7)][Fm(0x1fa)][Fm(0x248)][Fm(0x257)]({'parameters':{'projectId':u}});return R['data'][Fm(0x248)][Fm(0x1b3)](b=>b['id']);});return this[Ft(0x25a)](Ft(0x272),G,e);}),this[p(0x24a)]=(e,G)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const FZ=p,u=R=>b=>__awaiter(this,void 0x0,void 0x0,function*(){const FT=a8e;var W;const V=yield this['apiClient'][FT(0x276)][FT(0x272)]['backups']({'parameters':{'projectId':R,'addonId':G},'options':{'per_page':this[FT(0x1f0)],'cursor':b}});return{'elements':V[FT(0x1c6)][FT(0x278)][FT(0x1b3)](a=>a['id']+FT(0x1ed)+(a['completedAt']||FT(0x243))+')'),'nextCursor':(W=V[FT(0x242)])===null||W===void 0x0?void 0x0:W[FT(0x255)]};});return this[FZ(0x1d6)](FZ(0x278),u,e,FZ(0x1de)+G+'\x27')[FZ(0x23b)](R=>R[FZ(0x260)]('\x20')[0x0]);}),this[p(0x197)]=(e,G,u)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Fv=p,R=b=>W=>__awaiter(this,void 0x0,void 0x0,function*(){const Fn=a8e;var V;const a=yield this[Fn(0x1f7)][Fn(0x276)][Fn(0x272)]['backup'][Fn(0x1ec)]({'parameters':{'projectId':b,'addonId':G,'backupId':u},'options':{'per_page':this[Fn(0x1f0)],'cursor':W}});return{'elements':a[Fn(0x1c6)]['restores'][Fn(0x1b3)](m=>m['id']+'\x20(completedAt:\x20'+(m[Fn(0x1d7)]||Fn(0x243))+')'),'nextCursor':(V=a[Fn(0x242)])===null||V===void 0x0?void 0x0:V[Fn(0x255)]};});return this[Fv(0x1d6)](Fv(0x21f),R,e,Fv(0x1de)+G+'\x27')['then'](b=>b[Fv(0x260)]('\x20')[0x0]);}),this[p(0x28e)]=e=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Fw=p,G=u=>__awaiter(this,void 0x0,void 0x0,function*(){const FA=a8e;return(yield this[FA(0x1f7)][FA(0x1fa)][FA(0x1ac)]({'parameters':{'projectId':u}}))[FA(0x1c6)][FA(0x1b3)](R=>R['id']);});return this[Fw(0x25a)](Fw(0x239),G,e);}),this[p(0x21a)]=e=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Fi=p,G=u=>__awaiter(this,void 0x0,void 0x0,function*(){const Fo=a8e,R=yield this[Fo(0x1f7)][Fo(0x1fa)][Fo(0x1e9)]['all']({'parameters':{'projectId':u}});return R['data']['secrets'][Fo(0x1b3)](b=>b['id']);});return this[Fi(0x25a)]('secret',G,e);}),this[p(0x21c)]=e=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Fc=p,G=yield this[Fc(0x1f7)][Fc(0x276)][Fc(0x199)]({'parameters':{'domain':e}}),u=G[Fc(0x1c6)][Fc(0x289)][Fc(0x1b3)](b=>b[Fc(0x22d)]+Fc(0x217)+b['fullName']+')'),R='domain\x20('+e+')';return this[Fc(0x26c)](Fc(0x213),u,R)[Fc(0x23b)](b=>b[Fc(0x260)]('\x20')[0x0]);}),this[p(0x198)]=(e,G)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Fl=p,u=yield this[Fl(0x1f7)]['list']['subdomain'][Fl(0x20b)]({'parameters':{'domain':e,'subdomain':G}}),R=u[Fl(0x1c6)][Fl(0x28a)][Fl(0x1b3)](W=>''+W[Fl(0x254)]),b=Fl(0x23e)+e+Fl(0x1cb)+G+')';return this[Fl(0x26c)](Fl(0x1e8),R,b);}),this[p(0x181)]=e=>__awaiter(this,void 0x0,void 0x0,function*(){const FX=p;return(yield inquirer[FX(0x1b0)]([{'type':FX(0x1f2),'name':FX(0x25b),'message':chalk_1[FX(0x179)]['yellowBright'](FX(0x25f)+(e||FX(0x1e1))+FX(0x1a4)),'default':![]}]))[FX(0x25b)];}),this[p(0x20f)]=(e,G)=>__awaiter(this,void 0x0,void 0x0,function*(){const Fh=p;_['isUndefined'](e['name'])&&(G[Fh(0x196)]<=0x0?_[Fh(0x18b)](e,Fh(0x22d),Fh(0x179)):yield(0x0,utils_1[Fh(0x267)])(0xa)(()=>__awaiter(this,void 0x0,void 0x0,function*(){const Fd=Fh,{name:u}=yield inquirer[Fd(0x1b0)]([{'type':'input','name':Fd(0x22d),'message':Fd(0x277),'default':Fd(0x1e6)}]);if(!e[Fd(0x1ae)]&&G[Fd(0x180)](R=>R[Fd(0x22d)]===u)){const {c:R}=yield inquirer[Fd(0x1b0)]([{'type':Fd(0x1f2),'name':'c','message':'Context\x20with\x20name\x20\x27'+u+Fd(0x1a1),'default':![]}]);if(R===![])throw new Error(Fd(0x265));_[Fd(0x18b)](e,Fd(0x1ae),!![]);}_[Fd(0x18b)](e,Fd(0x22d),u);})));if(_['isUndefined'](e[Fh(0x22c)])){const u=yield this[Fh(0x210)]();_[Fh(0x18b)](e,Fh(0x22c),u);}return e;}),this['tokenPrompt']=()=>__awaiter(this,void 0x0,void 0x0,function*(){const FB=p,{token:e}=yield inquirer['prompt']([{'type':FB(0x208),'name':'token','mask':'*','message':FB(0x249)}]);return e;}),inquirer[p(0x20d)]('search-list',inquirerSearchList),inquirer[p(0x20d)]('pagination-prompt',inquirer_pagination_prompt_1[p(0x190)]);}[a8o(0x18c)](F,e){return __awaiter(this,void 0x0,void 0x0,function*(){const Fx=a8e,G=yaml[Fx(0x1a7)](F),u=_['max'](G[Fx(0x260)]('\x0a')[Fx(0x1b3)](W=>W[Fx(0x196)])),R=chalk_1[Fx(0x179)][Fx(0x178)]('-'['repeat'](u)+'\x0a'),{confirm:b}=yield inquirer[Fx(0x1b0)]([{'type':'list','name':Fx(0x1f2),'message':''+chalk_1[Fx(0x179)][Fx(0x1cf)][Fx(0x182)](Fx(0x285))+R+chalk_1[Fx(0x179)][Fx(0x244)](G)+R,'choices':Object[Fx(0x1b2)](ConfirmChoices)}]);switch(b){case ConfirmChoices[Fx(0x202)]:return F;case ConfirmChoices[Fx(0x1b7)]:throw new Error(Fx(0x1f3));case ConfirmChoices[Fx(0x19b)]:return this[Fx(0x1ea)](e);case ConfirmChoices[Fx(0x271)]:return this['confirmationPrompt'](yield this[Fx(0x189)](F),e);case ConfirmChoices[Fx(0x275)]:yield this[Fx(0x1ca)](F);return this['confirmationPrompt'](F,e);default:throw new Error(Fx(0x187));}});}['retrievePayloadViaInteractiveCli'](F,e){return __awaiter(this,void 0x0,void 0x0,function*(){const Fr=a8e;if((e===null||e===void 0x0?void 0x0:e[Fr(0x22f)])!==undefined)this[Fr(0x22f)]=e===null||e===void 0x0?void 0x0:e['resultCache'];this['tmpCmdPath']=e===null||e===void 0x0?void 0x0:e[Fr(0x270)],this[Fr(0x1aa)]=e===null||e===void 0x0?void 0x0:e[Fr(0x1aa)];const G={};return yield this[Fr(0x186)]([],F[Fr(0x184)][Fr(0x247)],G),this[Fr(0x22f)]=G,yield this[Fr(0x18c)](G,F);});}[a8o(0x186)](F,e,G,u){return __awaiter(this,void 0x0,void 0x0,function*(){const Fk=a8e;let R;if(e[Fk(0x263)]&&!_[Fk(0x25d)](e,Fk(0x1fd))){if(e[Fk(0x263)][Fk(0x196)]>0x1){const {choice:b}=yield inquirer[Fk(0x1b0)]([{'type':'list','name':Fk(0x284),'message':Fk(0x1ef)+(F[F[Fk(0x196)]-0x1]||'')+Fk(0x262),'choices':e[Fk(0x263)][Fk(0x1b3)](W=>{const FK=Fk;var V;return(V=W[FK(0x235)])!==null&&V!==void 0x0?V:'??';})}]);R=yield this[Fk(0x1ee)](F,e[Fk(0x263)][Fk(0x180)](W=>W[Fk(0x235)]===b),G,u);}else{const W=e[Fk(0x263)][0x0];_[Fk(0x18b)](W,Fk(0x235),e[Fk(0x235)]),R=yield this[Fk(0x1ee)](F,W,G,u);}R={};}else{if(e[Fk(0x26a)]&&!_[Fk(0x25d)](e,'properties')){if(e[Fk(0x26a)][Fk(0x196)]>0x1){const {choice:V}=yield inquirer['prompt']([{'type':'list','name':Fk(0x284),'message':Fk(0x1ef)+(F[F['length']-0x1]||'')+Fk(0x262),'choices':[...e[Fk(0x26a)]['map'](a=>{var m;return(m=a['description'])!==null&&m!==void 0x0?m:'??';}),Fk(0x252)]}]);V!==Fk(0x252)&&(R=yield this['getType'](F,e[Fk(0x26a)]['find'](a=>a['description']===V),G,u));}else{const a=e[Fk(0x26a)][0x0];_[Fk(0x18b)](a,'description',e['description']),R=yield this[Fk(0x1ee)](F,a,G,u);}R={};}else R=yield this[Fk(0x1ee)](F,e,G,u);}return R;});}[a8o(0x241)](F,e,G,u){var R;return __awaiter(this,void 0x0,void 0x0,function*(){const Fp=a8e;if(u===![]){const {addEntry:V}=yield inquirer[Fp(0x1b0)]([{'type':Fp(0x1f2),'name':'addEntry','message':this['getPathString'](e,'Do\x20you\x20want\x20to\x20add',F===null||F===void 0x0?void 0x0:F[Fp(0x235)]),'default':![]}]);if(!V)return G;}const b=Object[Fp(0x1be)]((R=F===null||F===void 0x0?void 0x0:F[Fp(0x1fd)])!==null&&R!==void 0x0?R:[]),W=F[Fp(0x1a5)]||[];if(b[Fp(0x196)]>0x0)for(const a of b){const m=e[Fp(0x268)](a);if(e[Fp(0x196)]>0x0&&!_[Fp(0x25d)](G,e[Fp(0x1a0)]('.')))_['set'](G,e[Fp(0x1a0)]('.'),{});yield this['propToType'](m,F[Fp(0x1fd)][a],G,W[Fp(0x236)](a));}else yield this['getType'](e,Object['assign'](Object[Fp(0x287)]({},F),{'type':Fp(0x1c0)}),G,u);return G;});}[a8o(0x1c8)](F,e,G,u){return __awaiter(this,void 0x0,void 0x0,function*(){const FO=a8e;if(e&&G)return!![];const R=e?FO(0x18a):FO(0x256),{addEntry:b}=yield inquirer[FO(0x1b0)]([{'type':FO(0x1f2),'name':'addEntry','message':this[FO(0x28f)](F,R,e?u:undefined),'default':![]}]);return b;});}[a8o(0x1ee)](F,e,G,u){return __awaiter(this,void 0x0,void 0x0,function*(){const FD=a8e;let R;const b=F[FD(0x1a0)]('.');switch(e===null||e===void 0x0?void 0x0:e[FD(0x1d9)]){case FD(0x1ab):{let W=!![];while(yield this[FD(0x1c8)](F,W,u,e===null||e===void 0x0?void 0x0:e[FD(0x235)])){const V=_[FD(0x276)](G,b);_['unset'](G,b),yield this[FD(0x1ee)](F,e['items'],G);const a=_[FD(0x276)](G,b);!_[FD(0x215)](V)?_[FD(0x18b)](G,b,[a]):(V[FD(0x253)](a),_[FD(0x18b)](G,b,V)),W=![];}return R||[];}case FD(0x1b8):{return R=yield this[FD(0x241)](e,F,G,u),R;}case FD(0x1c0):R=(0x0,utils_1[FD(0x218)])(yield this['ask'](F,e,u))||undefined;break;case FD(0x1b1):case FD(0x1df):case FD(0x1d4):default:R=yield this[FD(0x1ba)](F,e,u,G);break;}return!_['isUndefined'](R)&&_[FD(0x18b)](G,b,R),R;});}['ask'](F,e,G,u){var R;return __awaiter(this,void 0x0,void 0x0,function*(){const Fz=a8e,b=F[F[Fz(0x196)]-0x1],{defaultValue:defaultValue=(R=e===null||e===void 0x0?void 0x0:e[Fz(0x20c)])!==null&&R!==void 0x0?R:e===null||e===void 0x0?void 0x0:e[Fz(0x179)],choices:choices=e===null||e===void 0x0?void 0x0:e[Fz(0x192)],pagination:W}=yield(0x0,api_helpers_1['fetchResourceList'])(b,this['apiClient'],this['tmpCmdPath'],u,this[Fz(0x206)],F);let V=Fz(0x17d);if(!_['isUndefined'](choices)&&choices[Fz(0x196)]>0x0){if(W!==undefined&&W[Fz(0x269)]!==undefined)V=Fz(0x222);else choices['length']>0x4&&typeof choices[0x0]===Fz(0x1b1)?V=Fz(0x21b):V=Fz(0x1fa);}else{if((e===null||e===void 0x0?void 0x0:e[Fz(0x1d9)])===Fz(0x1df))V=Fz(0x1f2);else{if((e===null||e===void 0x0?void 0x0:e[Fz(0x1d9)])===Fz(0x1d4))V=Fz(0x17d);else(e===null||e===void 0x0?void 0x0:e['type'])===Fz(0x1c0)&&(V=Fz(0x1db));}}let a=G!==![]?!_[Fz(0x23f)](defaultValue)?defaultValue:JSON[Fz(0x1af)](defaultValue):_['isBoolean'](defaultValue)?defaultValue:Fz(0x252);if(choices)a=a[Fz(0x185)]();_[Fz(0x25d)](this[Fz(0x22f)],F['join']('.'))&&(a=this[Fz(0x22f)][F[Fz(0x1a0)]('.')]);const m=choices&&G===![]?['don\x27t\x20change',...choices]:choices,t=(e===null||e===void 0x0?void 0x0:e[Fz(0x1d9)])===Fz(0x1d4),T=Object[Fz(0x287)]({'type':V,'name':'id','message':this['getQuestionString'](F,e),'choices':m,'default':a,'filter':this[Fz(0x246)](V,G),'validate':this[Fz(0x237)](e,G,t)},W),Z=(yield inquirer[Fz(0x1b0)]([T]))['id'];if(Z===Fz(0x252)||Z==='')return undefined;if(t)return parseInt(Z,0xa);return Z;});}[a8o(0x24d)](F,e){const FC=a8o,G=(e===null||e===void 0x0?void 0x0:e['type'])!=='boolean'?FC(0x205):FC(0x27c);return this[FC(0x28f)](F,G,e===null||e===void 0x0?void 0x0:e[FC(0x235)]);}['askForProject'](){return __awaiter(this,void 0x0,void 0x0,function*(){const FN=a8e,F=yield this['apiClient'][FN(0x1fa)]['projects'][FN(0x257)]({})['then'](e=>e[FN(0x1c6)]['projects'][FN(0x1b3)](G=>G['id']));return yield this['askForResource']('project',F);});}[a8o(0x25a)](F,e,G,u){return __awaiter(this,void 0x0,void 0x0,function*(){const FI=a8e,R=G||this['apiClient'][FI(0x27e)][FI(0x19d)]();if(_[FI(0x266)](R))throw new Error(FI(0x25c));const b=yield e(R);return yield this[FI(0x26c)](F,b,(u?u+FI(0x18e):'')+'project:\x20\x27'+R+'\x27');});}['askForProjectScopedResourcePaginated'](F,e,G,u){return __awaiter(this,void 0x0,void 0x0,function*(){const FY=a8e,R=G||this[FY(0x1f7)]['contextProvider'][FY(0x19d)]();if(_['isUndefined'](R))throw new Error(FY(0x25c));const b=yield e(R);return yield this[FY(0x17e)](F,b,(u?u+'\x20in\x20':'')+FY(0x24b)+R+'\x27');});}[a8o(0x17b)](){return __awaiter(this,void 0x0,void 0x0,function*(){const Fg=a8e,F=yield this[Fg(0x1f7)][Fg(0x1fa)][Fg(0x273)][Fg(0x257)]({}),e=F[Fg(0x1c6)][Fg(0x273)]['map'](G=>G[Fg(0x22d)]);return this[Fg(0x26c)]('domain',e);});}[a8o(0x214)](){return __awaiter(this,void 0x0,void 0x0,function*(){const FQ=a8e,F=yield this[FQ(0x1f7)][FQ(0x1fa)][FQ(0x23d)][FQ(0x257)]({}),e=F[FQ(0x1c6)][FQ(0x226)][FQ(0x1b3)](G=>G['id']);return this[FQ(0x26c)](FQ(0x226),e);});}[a8o(0x1bd)](F){this['pathVars']=F;}}exports[a8o(0x1c4)]=InquirerHelper;function a8F(){const FS=['to\x20use:','reset','pipelines','length','askForAddonRestore','askForSubdomainPath','domain','pattern','REPEAT','tags','getCurrentProjectName','templateRuns','askForTemplateRun','join','\x27\x20already\x20exists.\x20Do\x20you\x20want\x20to\x20override\x20this\x20context\x20(y)\x20or\x20enter\x20a\x20new\x20name\x20(N)?','throw','backupDestinations','.\x20This\x20is\x20irreversible.\x20Please\x20confirm!','required','done','safeDump','No\x20builds\x20found','\x20and\x20it\x20','skipValidation','array','volumes','askForBuild','override','stringify','prompt','string','values','map','\x20Example:\x20','askForContainer','greenBright','ABORT','object','askForBackupDestination','ask','No,\x20abort','blue','setPathVars','keys','763485TNalHH','rawObject','success','test','158393RzdVsq','InquirerHelper','all-builds','data','nextCursor','askArrayEntry','must\x20be\x20bigger\x20than\x20or\x20equal\x20to\x20','saveFile','),\x20subdomain\x20(','askForLogSink','next','421206KkmvvR','bold','found','No,\x20edit','askForAddon','\x20(startedAt:\x20','integer','pop','askForProjectScopedResourcePaginated','completedAt','writeFileSync','type','askForTag','editor','service','job:\x20\x27','addon:\x20\x27','boolean','startedAt','a\x20Northflank\x20resource','askForPipeline','lodash','138786PNmwSa','askForJob','main-context','\x20to\x20use:','subdomainPath','secrets','retrievePayloadViaInteractiveCli','service\x20build','restores','\x20(completedAt:\x20','getType','What\x27s\x20the\x20','defaultPaginationPageSize','__awaiter','confirm','Aborted.','must\x20be\x20smaller\x20than\x20or\x20equal\x20to\x20','clusters','askForClusterId','apiClient','createdAt','charAt','list','askForService','message','properties','inquirer-search-list','for\x20this\x20','slice','builds','YES','Configuration\x20file\x20written\x20to\x20','isNaN','What\x20do\x20you\x20want\x20to\x20use\x20as','pathVars','create','password','fileName','minimum','path','example','registerPrompt','must\x20be\x20a\x20valid\x20non-empty\x20json\x20string','loginPrompt','tokenPrompt','maxLength','askConfirm','subdomain','askForCredentials','isArray','isEmpty','\x20(full\x20domain:\x20','isValidJSON','3837720hnhDoU','askForSecret','search-list','askForSubdomain','all-containers','Writing\x20configuration\x20failed:\x20','restore','editedResult','.*\x5c.(json|yaml|yml)$','pagination-prompt',',\x20supported\x20types:\x20[json|yaml|yml]','__importStar','minLength','credentials','json','./utils','defineProperty','must\x20be\x20shorter\x20than\x20or\x20equal\x20to\x20','Go\x20to\x20editor','token','name','jobs','resultCache','job','trim','12PYRAap','pipeline','./api-helpers','description','includes','validate','askForTemplate','volume','__setModuleDefault','then','doesn\x27t\x20match\x20pattern\x20\x27','registryCredentials','domain\x20(','isObject','inquirer','getInnerType','pagination','not\x20completed','blueBright','yml','filter','body','addons','Choose\x20the\x20login\x20token:','askForAddonBackup','project:\x20\x27','./pagination/inquirer-pagination-prompt','getQuestionString','red','whiteBright','service\x20containers','value','don\x27t\x20change','push','uri','cursor','Do\x20you\x20want\x20to\x20add\x20more','all','__importDefault','logSinks','askForProjectScopedResource','confirmation','Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.','has','askForJobRun','WARNING:\x20You\x20are\x20about\x20to\x20delete\x20','split','all-job-runs','\x20type?','oneOf','250200lwjDmW','Context\x20name\x20already\x20exists.','isUndefined','retry','concat','nextPageCursor','anyOf','unshift','askForResource','6456168qAoHoI','7krArlM','\x20characters,\x20is\x20','cmdPath','EDIT','addon','domains','__esModule','SAVE','get','Choose\x20the\x20name\x20of\x20the\x20new\x20local\x20context:','backups','backup\x20destination','No,\x20but\x20save\x20as\x20file','yaml','Should\x20it\x20be','runs','contextProvider','__createBinding','chalk','getOwnPropertyDescriptor','No\x20','No,\x20repeat','choice','Please\x20confirm\x20following\x20configuration:\x0a','Enter\x20the\x20','assign','maximum','subdomains','paths','hasOwnProperty','job\x20builds','containers','askForVolume','getPathString','grey','default','tag','askForDomain','service:\x20\x27','input','askForResourcePaginated','safeLoad','find','deleteWarningPrompt','green','Template\x20id\x20not\x20provided.','opt','toString','propToType','Something\x20unexpected\x20happened.','templates','editPayload','Do\x20you\x20want\x20to\x20add','set','confirmationPrompt','prototype','\x20in\x20','cluster\x20id','DynamicReloadPaginationPrompt','Choose\x20the\x20','enum'];a8F=function(){return FS;};return a8F();}
|
|
1
|
+
'use strict';const a8n=a8k;function a8k(Y,k){const X=a8Y();return a8k=function(B,l){B=B-0x1e1;let S=X[B];return S;},a8k(Y,k);}(function(Y,k){const Q=a8k,X=Y();while(!![]){try{const B=-parseInt(Q(0x211))/0x1+-parseInt(Q(0x257))/0x2*(-parseInt(Q(0x20f))/0x3)+parseInt(Q(0x253))/0x4*(-parseInt(Q(0x26b))/0x5)+parseInt(Q(0x27d))/0x6+parseInt(Q(0x2c6))/0x7*(parseInt(Q(0x2c0))/0x8)+-parseInt(Q(0x224))/0x9*(parseInt(Q(0x24a))/0xa)+parseInt(Q(0x2b2))/0xb*(parseInt(Q(0x23c))/0xc);if(B===k)break;else X['push'](X['shift']());}catch(l){X['push'](X['shift']());}}}(a8Y,0x901ae));function a8Y(){const YZ=['length','must\x20be\x20bigger\x20than\x20or\x20equal\x20to\x20','jobs','inquirer-search-list','Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.','subdomain','subdomains','createdAt','Unexpected\x20file\x20type:\x20','Choose\x20the\x20name\x20of\x20the\x20new\x20local\x20context:','bold','propToType','not\x20completed','getQuestionString','rawObject','backups','askForPipeline','nextPageCursor','filter','unshift','askForCredentials','./pagination/inquirer-pagination-prompt','InquirerHelper','search-list','No,\x20but\x20save\x20as\x20file','service:\x20\x27','split','Template\x20id\x20not\x20provided.','\x20in\x20','Writing\x20configuration\x20failed:\x20','templates','ABORT','yaml','all','create','boolean','3719694quAlRk','askForBackupDestination','token','input','then','askForAddonBackup','askForLogSink','pagination-prompt','No,\x20repeat','Provide\x20a\x20file\x20path\x20to\x20write\x20the\x20configuration\x20to\x20(<name>.[json|yaml|yml])','opt','throw','\x20(completedAt:\x20','maxLength','17592OGPVZF','backupDestinations','set','minLength','job\x20builds','reset','2653tdHvGm','pipelines','getInnerType','__setModuleDefault','secrets','volume','backup\x20destination','askArrayEntry','skipValidation','tmpCmdPath','\x20characters','isNaN','fullName','clusters','push','underline','green','must\x20be\x20smaller\x20than\x20or\x20equal\x20to\x20','resultCache','credentials','restore','No\x20','oneOf','addons','completedAt','chalk','containers','getCurrentProjectName','confirm','pipeline','apply','this\x20option\x20is\x20required,\x20please\x20answer','nextCursor','uri','deleteWarningPrompt','confirmation','\x20and\x20it\x20','pop','askForProjectScopedResourcePaginated','Something\x20unexpected\x20happened.','retry','concat','example','fileName','job\x20containers','defineProperty','must\x20be\x20a\x20number,\x20is\x20','No,\x20edit','template\x20run','askForAddonRestore','retrievePayloadViaInteractiveCli','service\x20containers','askForVolume','services','domain','startedAt','next','contextProvider','registryCredentials','askForSubdomainPath','trim','What\x27s\x20the\x20','service','getPathString','default','Aborted.','askForSecret','askForService','value','\x20(startedAt:\x20','editor','restores','__importStar','__importDefault','js-yaml','hasOwnProperty','builds','cmdPath','password','ask','setPathVars','enum','get','logSinks','Choose\x20the\x20','job:\x20\x27','join','isValidJSON','\x20(full\x20domain:\x20','tokenPrompt','editedResult','domain\x20(','addon:\x20\x27','whiteBright','writeFileSync','WARNING:\x20You\x20are\x20about\x20to\x20delete\x20','18141sDJPNx','getOwnPropertyDescriptor','918539jBYPZH','string','project','project:\x20\x27','__createBinding','blue','Enter\x20the\x20','isUndefined','.\x20This\x20is\x20irreversible.\x20Please\x20confirm!','found','properties','askForSubdomain','volumes','\x20characters,\x20is\x20','pagination','askForTag','red','Choose\x20the\x20login\x20token:','askForProjectScopedResource','6523353jqklnP','values','must\x20be\x20a\x20valid\x20non-empty\x20json\x20string','pattern','success','\x20to\x20use:','askForResourcePaginated','lodash','charAt','validate','greenBright','\x27\x20already\x20exists.\x20Do\x20you\x20want\x20to\x20override\x20this\x20context\x20(y)\x20or\x20enter\x20a\x20new\x20name\x20(N)?','cursor','test','prompt','No\x20builds\x20found','pathVars','to\x20use:','secret','array','DynamicReloadPaginationPrompt','find','path','type','72yVAGHq','list','saveFile','apiClient','Yes,\x20send','call','job','No,\x20abort','maximum','\x20type?','No\x20containers\x20found','isBoolean','integer','unset','10FeAKMO','isObject','all-containers','runs','__awaiter','map','askForResource','registerPrompt','safeDump','4DyIFFR','getType','subdomainPath','Should\x20it\x20be','6ifQJYd','json','must\x20be\x20longer\x20than\x20or\x20equal\x20to\x20','),\x20subdomain\x20(','domains','\x20Example:\x20','override','templateRuns','toString','Configuration\x20file\x20written\x20to\x20','__esModule','askForJob','includes','askForAddon','for\x20this\x20','stringify','addEntry','name','isArray','grey','3869345WIYGuJ','assign','REPEAT','inquirer','safeLoad','tags','defaultPaginationPageSize',',\x20supported\x20types:\x20[json|yaml|yml]','EDIT','data','askForJobRun','projects','description','configurable','Do\x20you\x20want\x20to\x20add','job\x20runs','doesn\x27t\x20match\x20pattern\x20\x27','SAVE','761958sdZhKp','has','don\x27t\x20change','askGeneric','yml','object','askForProject','anyOf','prototype','paths','addon','editPayload','warning','minimum','Context\x20with\x20name\x20\x27','all-builds','confirmationPrompt'];a8Y=function(){return YZ;};return a8Y();}var __createBinding=this&&this[a8n(0x215)]||(Object['create']?function(Y,X,B,l){const M=a8n;if(l===undefined)l=B;var S=Object[M(0x210)](X,B);(!S||(M(0x201)in S?!X['__esModule']:S['writable']||S[M(0x278)]))&&(S={'enumerable':!![],'get':function(){return X[B];}}),Object['defineProperty'](Y,l,S);}:function(Y,X,B,l){if(l===undefined)l=B;Y[l]=X[B];}),__setModuleDefault=this&&this[a8n(0x2c9)]||(Object[a8n(0x2b0)]?function(Y,k){const p=a8n;Object[p(0x2f3)](Y,p(0x1ef),{'enumerable':!![],'value':k});}:function(Y,k){const d=a8n;Y[d(0x1ef)]=k;}),__importStar=this&&this[a8n(0x1f7)]||function(Y){const P=a8n;if(Y&&Y[P(0x261)])return Y;var X={};if(Y!=null){for(var B in Y)if(B!==P(0x1ef)&&Object[P(0x285)][P(0x1fa)][P(0x241)](Y,B))__createBinding(X,Y,B);}return __setModuleDefault(X,Y),X;},__awaiter=this&&this[a8n(0x24e)]||function(Y,k,X,B){function l(S){return S instanceof X?S:new X(function(C){C(S);});}return new(X||(X=Promise))(function(S,C){const r=a8k;function j(O){const f=a8k;try{e(B[f(0x1e7)](O));}catch(T){C(T);}}function o(O){const N=a8k;try{e(B[N(0x2bd)](O));}catch(T){C(T);}}function e(O){const K=a8k;O['done']?S(O[K(0x1f3)]):l(O[K(0x1f3)])[K(0x2b6)](j,o);}e((B=B[r(0x2e4)](Y,k||[]))[r(0x1e7)]());});},__importDefault=this&&this[a8n(0x1f8)]||function(Y){const w=a8n;return Y&&Y[w(0x261)]?Y:{'default':Y};};Object[a8n(0x2f3)](exports,a8n(0x261),{'value':!![]}),exports[a8n(0x2a4)]=void 0x0;const _=__importStar(require(a8n(0x22b))),chalk_1=__importDefault(require(a8n(0x2df))),fs=__importStar(require('fs')),utils_1=require('./utils'),api_helpers_1=require('./api-helpers'),inquirer_pagination_prompt_1=require(a8n(0x2a3)),inquirer=require(a8n(0x26e)),inquirerSearchList=require(a8n(0x291)),yaml=require(a8n(0x1f9));var ConfirmChoices;(function(Y){const h=a8n;Y['YES']=h(0x240),Y[h(0x26d)]=h(0x2ba),Y[h(0x273)]=h(0x2f5),Y[h(0x27c)]=h(0x2a6),Y[h(0x2ad)]=h(0x243);}(ConfirmChoices||(ConfirmChoices={})));class InquirerHelper{constructor(Y){const g=a8n;this['apiClient']=Y,this[g(0x271)]=0x32,this['editPayload']=k=>__awaiter(this,void 0x0,void 0x0,function*(){const y=g,{editedResult:X}=yield inquirer['prompt']([{'type':'editor','name':y(0x209),'message':'Go\x20to\x20editor','default':yaml[y(0x252)](k)}]);return yaml[y(0x26f)](X);}),this['saveFile']=k=>__awaiter(this,void 0x0,void 0x0,function*(){const R=g,X=C=>R(0x296)+C+R(0x272);function B(){return __awaiter(this,void 0x0,void 0x0,function*(){const q=a8k;return inquirer[q(0x232)]([{'type':q(0x2b5),'name':q(0x2f1),'message':q(0x2bb),'validate':C=>new RegExp('.*\x5c.(json|yaml|yml)$')[q(0x231)](C)?!![]:X(C)}]);});}const {fileName:l}=yield B(),S=l['toString']()[R(0x2a8)]('.')[R(0x2eb)]();try{switch(S){case R(0x258):(0x0,utils_1[R(0x228)])(R(0x260)+l);return fs[R(0x20d)](l,JSON['stringify'](k,null,'\x20\x20'));case R(0x2ae):case R(0x281):(0x0,utils_1[R(0x228)])(R(0x260)+l);return fs[R(0x20d)](l,yaml[R(0x252)](k));default:(0x0,utils_1[R(0x289)])(X(S));}}catch(C){(0x0,utils_1[R(0x289)])(R(0x2ab)+C['message']);}return undefined;}),this[g(0x2a0)]=(k,X)=>B=>{const U=g,l=typeof B===U(0x212)?B[U(0x1eb)]():B;return X===![]&&l===U(0x27f)?'':l;},this['validate']=(k,X,B)=>l=>{const L=g;if(this[L(0x2ce)]===!![])return!![];const S=[];if(l===''||l===L(0x27f)){if(X!==![])S[L(0x2d4)](L(0x2e5));else return!![];}k[L(0x23b)]==='string'&&!_[L(0x218)](k[L(0x227)])&&S[L(0x2d4)](new RegExp(k['pattern'])['test'](l)?!![]:L(0x27b)+k[L(0x227)]+'\x27');k['type']==='string'&&!_[L(0x218)](k[L(0x2c3)])&&S['push'](l['length']>=k[L(0x2c3)]?!![]:L(0x259)+k[L(0x2c3)]+L(0x21e)+l['length']+L(0x2d0));k[L(0x23b)]==='string'&&!_[L(0x218)](k[L(0x2bf)])&&S[L(0x2d4)](l[L(0x28e)]<=k['maxLength']?!![]:'must\x20be\x20shorter\x20than\x20or\x20equal\x20to\x20'+k[L(0x2bf)]+L(0x21e)+l[L(0x28e)]+L(0x2d0));B&&Number[L(0x2d1)](parseInt(l,0xa))&&S[L(0x2d4)](L(0x2f4)+l);k[L(0x23b)]==='integer'&&!_['isUndefined'](k[L(0x28a)])&&S[L(0x2d4)](l>=k[L(0x28a)]?!![]:L(0x28f)+k['minimum']);k[L(0x23b)]===L(0x248)&&!_[L(0x218)](k[L(0x244)])&&S[L(0x2d4)](l<=k['maximum']?!![]:L(0x2d7)+k[L(0x244)]);if(k[L(0x23b)]===L(0x29c)){const o=(0x0,utils_1[L(0x206)])(l);S['push'](o===![]||_['isEmpty'](o)?L(0x226):!![]);}const C=S[L(0x2a0)](O=>O!==!![]),j=(k===null||k===void 0x0?void 0x0:k['example'])?'\x0a'+chalk_1[L(0x1ef)][L(0x221)]('>>')+L(0x25c)+chalk_1[L(0x1ef)]['whiteBright'](JSON['stringify'](k[L(0x2f0)])):'';return C['length']>0x0?C['join'](chalk_1[L(0x1ef)][L(0x2d5)](L(0x2ea)))+j:!![];},this[g(0x1ee)]=(k,X,B)=>{const z=g,l=k[k[z(0x28e)]-0x1];function S(){const A=z;return k['slice'](0x0,-0x1)[A(0x24f)](o=>o[A(0x22c)](0x0)['toUpperCase']()+o['slice'](0x1))[A(0x205)]('>');}const C=k[z(0x28e)]>0x1?chalk_1['default']['bgGrey'][z(0x20c)](S())+':\x20':'',j=B?'\x20('+chalk_1[z(0x1ef)][z(0x216)](B)+')':'';return chalk_1[z(0x1ef)][z(0x2c5)](''+C+X+'\x20'+chalk_1[z(0x1ef)]['bold'][z(0x22e)](l)+j+'?');},this['askForResource']=(k,X,B)=>__awaiter(this,void 0x0,void 0x0,function*(){const D=g;if(X[D(0x28e)]<0x1){const C=B?D(0x265)+B:D(0x21a);throw new Error(D(0x2db)+k+'\x20'+C+'.');}const l='Choose\x20the\x20'+k+'\x20to\x20use:',S=X['length']>0x4?D(0x2a5):'list';return(yield inquirer['prompt']([{'type':S,'name':D(0x268),'message':l,'choices':X}]))[D(0x268)];}),this['askForResourcePaginated']=(k,X,B)=>__awaiter(this,void 0x0,void 0x0,function*(){const E=g,{elements:l,nextCursor:S}=yield X();if(l[E(0x28e)]<0x1){const o=B?E(0x265)+B:E(0x21a);throw new Error(E(0x2db)+k+'\x20'+o+'.');}const C=E(0x203)+k+E(0x229);if(S!==undefined){const e=({nextPageCursor:O})=>__awaiter(this,void 0x0,void 0x0,function*(){const b=E,T=yield X(O);return{'elements':T['elements'],'nextPageCursor':T[b(0x2e6)]};});return(yield inquirer[E(0x232)]([{'type':'pagination-prompt','name':E(0x268),'message':C,'choices':l,'nextPageCursor':S,'loadMore':e}]))[E(0x268)];}const j=l[E(0x28e)]>0x4?'search-list':E(0x23d);return(yield inquirer[E(0x232)]([{'type':j,'name':E(0x268),'message':C,'choices':l}]))[E(0x268)];}),this[g(0x280)]=(k,X)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const a=g,B=''+(X?'('+chalk_1[a(0x1ef)][a(0x216)](X)+')\x20':''),l=a(0x217)+chalk_1['default'][a(0x2d6)](k)+'\x20'+B+a(0x235),S=this[a(0x22d)]({'type':a(0x212),'required':!![]});return(yield inquirer['prompt']([{'type':a(0x2b5),'name':a(0x268),'message':l,'validate':S}]))['name'];}),this['askConfirm']=k=>__awaiter(this,void 0x0,void 0x0,function*(){const Z=g;return(yield inquirer[Z(0x232)]([{'type':Z(0x2e2),'name':Z(0x268),'message':k,'default':!![]}]))['name'];}),this[g(0x1f2)]=k=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const m=g,X=B=>__awaiter(this,void 0x0,void 0x0,function*(){const V=a8k,l=yield this[V(0x23f)][V(0x23d)][V(0x1e4)][V(0x2af)]({'parameters':{'projectId':B}}),S=l['data']['services'][V(0x24f)](C=>C['id']);return S;});return this[m(0x223)]('service',X,k);}),this['askForTemplate']=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const H=g,k=X=>__awaiter(this,void 0x0,void 0x0,function*(){const J=a8k;var B;const l=yield this['apiClient'][J(0x23d)][J(0x2ac)]({'options':{'per_page':this[J(0x271)],'cursor':X}}),S=l[J(0x274)][J(0x2ac)]['map'](C=>C['id']);return{'elements':S,'nextCursor':(B=l[J(0x21f)])===null||B===void 0x0?void 0x0:B['cursor']};});return this[H(0x22a)]('template',k);}),this[g(0x220)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const s=g,k=X=>__awaiter(this,void 0x0,void 0x0,function*(){const G=a8k;var B,l,S;const C=yield this[G(0x23f)][G(0x23d)]['tags']({'options':{'per_page':this[G(0x271)],'cursor':X}}),j=(l=(B=C['data'][G(0x270)])===null||B===void 0x0?void 0x0:B[G(0x24f)](o=>o['id']))!==null&&l!==void 0x0?l:[];return{'elements':j,'nextCursor':(S=C['pagination'])===null||S===void 0x0?void 0x0:S['cursor']};});return this[s(0x22a)]('tag',k);}),this[g(0x2b3)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const I=g;var k;const X=yield this[I(0x23f)]['list']['backupDestinations'][I(0x2af)]({}),B=(k=X[I(0x274)][I(0x2c1)]['map'](l=>l['name']))!==null&&k!==void 0x0?k:[];return this['askForResource'](I(0x2cc),B);}),this['askForClusterId']=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const i=g,k=X=>__awaiter(this,void 0x0,void 0x0,function*(){const u=a8k;var B,l,S;const C=yield this[u(0x23f)][u(0x23d)]['cloud'][u(0x2d3)]({'options':{'per_page':this[u(0x271)],'cursor':X}}),j=(l=(B=C['data'][u(0x2d3)])===null||B===void 0x0?void 0x0:B[u(0x24f)](o=>o[u(0x268)]))!==null&&l!==void 0x0?l:[];return{'elements':j,'nextCursor':(S=C[u(0x21f)])===null||S===void 0x0?void 0x0:S[u(0x230)]};});return this[i(0x22a)]('cluster\x20id',k);}),this['askForTemplateRun']=k=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const W=g;if(_[W(0x218)](k))throw new Error(W(0x2a9));const X=B=>__awaiter(this,void 0x0,void 0x0,function*(){const Y0=W;var l;let S=this['defaultPaginationPageSize'];const C=yield this[Y0(0x23f)][Y0(0x23d)][Y0(0x25e)]({'parameters':{'templateId':k},'options':{'per_page':S,'cursor':B}}),j=C['data'][Y0(0x25e)][Y0(0x24f)](o=>o['id']+'\x20(startedAt:\x20'+o[Y0(0x295)]+')');return{'elements':j,'nextCursor':(l=C[Y0(0x21f)])===null||l===void 0x0?void 0x0:l[Y0(0x230)]};});return this[W(0x22a)](W(0x2f6),X)['then'](B=>B[W(0x2a8)]('\x20')[0x0]);}),this[g(0x2b8)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Y2=g,k=X=>__awaiter(this,void 0x0,void 0x0,function*(){const Y1=a8k;var B;let l=this['defaultPaginationPageSize'];const S=yield this[Y1(0x23f)]['list']['logSinks']({'options':{'per_page':l,'cursor':X}}),C=S[Y1(0x274)][Y1(0x202)][Y1(0x24f)](j=>j['id']);return{'elements':C,'nextCursor':(B=S[Y1(0x21f)])===null||B===void 0x0?void 0x0:B[Y1(0x230)]};});return this[Y2(0x22a)]('log\x20sink',k);}),this[g(0x29e)]=k=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Y4=g,X=B=>__awaiter(this,void 0x0,void 0x0,function*(){const Y3=a8k,l=yield this['apiClient'][Y3(0x23d)][Y3(0x2c7)]['all']({'parameters':{'projectId':B}});return l[Y3(0x274)][Y3(0x2c7)]['map'](S=>S['id']);});return this[Y4(0x223)](Y4(0x2e3),X,k);}),this[g(0x262)]=k=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Y6=g,X=B=>__awaiter(this,void 0x0,void 0x0,function*(){const Y5=a8k,l=yield this[Y5(0x23f)]['list'][Y5(0x290)][Y5(0x2af)]({'parameters':{'projectId':B}}),S=l[Y5(0x274)]['jobs'][Y5(0x24f)](C=>C['id']);return S;});return this['askForProjectScopedResource'](Y6(0x242),X,k);}),this[g(0x275)]=(k,X,B=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Y8=g,l='all-job-runs',S=C=>j=>__awaiter(this,void 0x0,void 0x0,function*(){const Y7=a8k;var o;const e=yield this[Y7(0x23f)][Y7(0x201)]['job'][Y7(0x24d)]({'parameters':{'projectId':C,'jobId':k},'options':{'per_page':this[Y7(0x271)],'cursor':j}}),O=e[Y7(0x274)]['runs']['map'](T=>T['id']+'\x20(startedAt:\x20'+T[Y7(0x1e6)]+')');return B&&O['unshift'](l),{'elements':O,'nextCursor':(o=e[Y7(0x21f)])===null||o===void 0x0?void 0x0:o[Y7(0x230)]};});return this[Y8(0x2ec)](Y8(0x27a),S,X,Y8(0x204)+k+'\x27')['then'](C=>{const Y9=Y8,o=C[Y9(0x2a8)]('\x20')[0x0];if(o===l)return undefined;return o;});}),this['askForBuild']=(k,X,B,l=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const YY=g,S=YY(0x28c);if(B!==undefined){const C=j=>o=>__awaiter(this,void 0x0,void 0x0,function*(){const Yk=YY;var e;const O=yield this[Yk(0x23f)][Yk(0x201)][Yk(0x242)]['builds']({'parameters':{'projectId':j,'jobId':B},'options':{'per_page':this[Yk(0x271)],'cursor':o}}),T=O['data'][Yk(0x1fb)][Yk(0x24f)](v=>v['id']+Yk(0x1f4)+v['createdAt']+')');return l&&T['unshift'](S),{'elements':T,'nextCursor':(e=O['pagination'])===null||e===void 0x0?void 0x0:e[Yk(0x230)]};});return this['askForProjectScopedResourcePaginated'](YY(0x2c4),C,k,YY(0x204)+B+'\x27')[YY(0x2b6)](o=>{const YX=YY,e=o[YX(0x2a8)]('\x20')[0x0];if(e===S)return undefined;return e;});}if(X!==undefined){const j=o=>e=>__awaiter(this,void 0x0,void 0x0,function*(){const YB=YY;var O;const T=yield this['apiClient'][YB(0x201)][YB(0x1ed)][YB(0x1fb)]({'parameters':{'projectId':o,'serviceId':X},'options':{'per_page':this[YB(0x271)],'cursor':e}}),v=T[YB(0x274)]['builds'][YB(0x24f)](F=>F['id']+YB(0x1f4)+F[YB(0x295)]+')');if(l)v[YB(0x2a1)](S);return{'elements':v,'nextCursor':(O=T[YB(0x21f)])===null||O===void 0x0?void 0x0:O['cursor']};});return this[YY(0x2ec)]('service\x20build',j,k,YY(0x2a7)+B+'\x27')['then'](o=>{const Yl=YY,e=o[Yl(0x2a8)]('\x20')[0x0];if(e===S)return undefined;return e;});}throw new Error(YY(0x233));}),this['askForContainer']=(k,X,B,l=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const YS=g,S=YS(0x24c);if(B!==undefined){const C=j=>o=>__awaiter(this,void 0x0,void 0x0,function*(){const YC=YS;var e,O;const T=yield this[YC(0x23f)][YC(0x201)]['job'][YC(0x2e0)]({'parameters':{'projectId':j,'jobId':B},'options':{'per_page':this[YC(0x271)],'cursor':o}}),v=(e=T[YC(0x274)]['containers'])!==null&&e!==void 0x0?e:[],F=v===null||v===void 0x0?void 0x0:v[YC(0x24f)](x=>x[YC(0x268)]+'\x20(startedAt:\x20'+x[YC(0x295)]+')');return l&&F[YC(0x2a1)](S),{'elements':F,'nextCursor':(O=T[YC(0x21f)])===null||O===void 0x0?void 0x0:O[YC(0x230)]};});return this[YS(0x2ec)](YS(0x2f2),C,k,YS(0x204)+B+'\x27')[YS(0x2b6)](o=>{const Yj=YS,e=o[Yj(0x2a8)]('\x20')[0x0];if(e===S)return undefined;return e;});}if(X!==undefined){const j=o=>e=>__awaiter(this,void 0x0,void 0x0,function*(){const Yo=YS;var O,T;const v=yield this[Yo(0x23f)]['get'][Yo(0x1ed)][Yo(0x2e0)]({'parameters':{'projectId':o,'serviceId':X},'options':{'per_page':this[Yo(0x271)],'cursor':e}}),F=(O=v[Yo(0x274)][Yo(0x2e0)])!==null&&O!==void 0x0?O:[],x=F[Yo(0x24f)](t=>t[Yo(0x268)]+Yo(0x1f4)+t[Yo(0x295)]+')');if(l)x===null||x===void 0x0?void 0x0:x[Yo(0x2a1)](S);return{'elements':x,'nextCursor':(T=v[Yo(0x21f)])===null||T===void 0x0?void 0x0:T[Yo(0x230)]};});return this['askForProjectScopedResourcePaginated'](YS(0x1e2),j,k,YS(0x2a7)+B+'\x27')[YS(0x2b6)](o=>{const Ye=YS,e=o[Ye(0x2a8)]('\x20')[0x0];if(e===S)return undefined;return e;});}throw new Error(YS(0x246));}),this[g(0x264)]=k=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const YT=g,X=B=>__awaiter(this,void 0x0,void 0x0,function*(){const YO=a8k,l=yield this[YO(0x23f)][YO(0x23d)][YO(0x2dd)][YO(0x2af)]({'parameters':{'projectId':B}});return l[YO(0x274)][YO(0x2dd)]['map'](S=>S['id']);});return this[YT(0x223)](YT(0x287),X,k);}),this[g(0x2b7)]=(k,X)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const YF=g,B=l=>S=>__awaiter(this,void 0x0,void 0x0,function*(){const Yv=a8k;var C;const j=yield this[Yv(0x23f)][Yv(0x201)][Yv(0x287)]['backups']({'parameters':{'projectId':l,'addonId':X},'options':{'per_page':this[Yv(0x271)],'cursor':S}});return{'elements':j[Yv(0x274)]['backups']['map'](o=>o['id']+Yv(0x2be)+(o[Yv(0x2de)]||Yv(0x29a))+')'),'nextCursor':(C=j[Yv(0x21f)])===null||C===void 0x0?void 0x0:C[Yv(0x230)]};});return this[YF(0x2ec)](YF(0x29d),B,k,YF(0x20b)+X+'\x27')[YF(0x2b6)](l=>l[YF(0x2a8)]('\x20')[0x0]);}),this[g(0x2f7)]=(k,X,B)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Yt=g,l=S=>C=>__awaiter(this,void 0x0,void 0x0,function*(){const Yx=a8k;var j;const o=yield this[Yx(0x23f)][Yx(0x201)][Yx(0x287)]['backup'][Yx(0x1f6)]({'parameters':{'projectId':S,'addonId':X,'backupId':B},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':C}});return{'elements':o[Yx(0x274)][Yx(0x1f6)]['map'](e=>e['id']+Yx(0x2be)+(e['completedAt']||Yx(0x29a))+')'),'nextCursor':(j=o['pagination'])===null||j===void 0x0?void 0x0:j[Yx(0x230)]};});return this[Yt(0x2ec)](Yt(0x2da),l,k,Yt(0x20b)+X+'\x27')['then'](S=>S['split']('\x20')[0x0]);}),this[g(0x1e3)]=k=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Yn=g,X=B=>__awaiter(this,void 0x0,void 0x0,function*(){const YQ=a8k;return(yield this[YQ(0x23f)][YQ(0x23d)][YQ(0x21d)]({'parameters':{'projectId':B}}))[YQ(0x274)]['map'](l=>l['id']);});return this[Yn(0x223)](Yn(0x2cb),X,k);}),this[g(0x1f1)]=k=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Yp=g,X=B=>__awaiter(this,void 0x0,void 0x0,function*(){const YM=a8k,l=yield this[YM(0x23f)][YM(0x23d)][YM(0x2ca)][YM(0x2af)]({'parameters':{'projectId':B}});return l[YM(0x274)][YM(0x2ca)][YM(0x24f)](S=>S['id']);});return this[Yp(0x223)](Yp(0x236),X,k);}),this[g(0x21c)]=k=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Yd=g,X=yield this[Yd(0x23f)][Yd(0x201)][Yd(0x1e5)]({'parameters':{'domain':k}}),B=X['data'][Yd(0x294)][Yd(0x24f)](S=>S[Yd(0x268)]+Yd(0x207)+S[Yd(0x2d2)]+')'),l=Yd(0x20a)+k+')';return this[Yd(0x250)](Yd(0x293),B,l)[Yd(0x2b6)](S=>S[Yd(0x2a8)]('\x20')[0x0]);}),this[g(0x1ea)]=(k,X)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const YP=g,B=yield this['apiClient'][YP(0x23d)]['subdomain'][YP(0x23a)]({'parameters':{'domain':k,'subdomain':X}}),l=B[YP(0x274)][YP(0x286)]['map'](C=>''+C[YP(0x2e7)]),S=YP(0x20a)+k+YP(0x25a)+X+')';return this['askForResource'](YP(0x255),l,S);}),this[g(0x2e8)]=k=>__awaiter(this,void 0x0,void 0x0,function*(){const Yf=g;return(yield inquirer['prompt']([{'type':Yf(0x2e2),'name':Yf(0x2e9),'message':chalk_1[Yf(0x1ef)]['yellowBright'](Yf(0x20e)+(k||'a\x20Northflank\x20resource')+Yf(0x219)),'default':![]}]))[Yf(0x2e9)];}),this['loginPrompt']=(k,X)=>__awaiter(this,void 0x0,void 0x0,function*(){const YN=g;_[YN(0x218)](k[YN(0x268)])&&(X[YN(0x28e)]<=0x0?_[YN(0x2c2)](k,YN(0x268),YN(0x1ef)):yield(0x0,utils_1[YN(0x2ee)])(0xa)(()=>__awaiter(this,void 0x0,void 0x0,function*(){const YK=YN,{name:B}=yield inquirer[YK(0x232)]([{'type':YK(0x2b5),'name':'name','message':YK(0x297),'default':'main-context'}]);if(!k['override']&&X[YK(0x239)](l=>l[YK(0x268)]===B)){const {c:l}=yield inquirer['prompt']([{'type':'confirm','name':'c','message':YK(0x28b)+B+YK(0x22f),'default':![]}]);if(l===![])throw new Error('Context\x20name\x20already\x20exists.');_[YK(0x2c2)](k,YK(0x25d),!![]);}_[YK(0x2c2)](k,YK(0x268),B);})));if(_[YN(0x218)](k[YN(0x2b4)])){const B=yield this[YN(0x208)]();_[YN(0x2c2)](k,'token',B);}return k;}),this[g(0x208)]=()=>__awaiter(this,void 0x0,void 0x0,function*(){const Yr=g,{token:k}=yield inquirer['prompt']([{'type':Yr(0x1fd),'name':Yr(0x2b4),'mask':'*','message':Yr(0x222)}]);return k;}),inquirer[g(0x251)](g(0x2a5),inquirerSearchList),inquirer[g(0x251)](g(0x2b9),inquirer_pagination_prompt_1[g(0x238)]);}[a8n(0x28d)](Y,k){return __awaiter(this,void 0x0,void 0x0,function*(){const Yw=a8k,X=yaml[Yw(0x252)](Y),B=_['max'](X['split']('\x0a')[Yw(0x24f)](C=>C[Yw(0x28e)])),l=chalk_1[Yw(0x1ef)][Yw(0x26a)]('-'['repeat'](B)+'\x0a'),{confirm:S}=yield inquirer[Yw(0x232)]([{'type':Yw(0x23d),'name':Yw(0x2e2),'message':''+chalk_1[Yw(0x1ef)][Yw(0x298)][Yw(0x2d6)]('Please\x20confirm\x20following\x20configuration:\x0a')+l+chalk_1[Yw(0x1ef)]['blueBright'](X)+l,'choices':Object[Yw(0x225)](ConfirmChoices)}]);switch(S){case ConfirmChoices['YES']:return Y;case ConfirmChoices['ABORT']:throw new Error(Yw(0x1f0));case ConfirmChoices[Yw(0x26d)]:return this[Yw(0x1e1)](k);case ConfirmChoices[Yw(0x273)]:return this[Yw(0x28d)](yield this[Yw(0x288)](Y),k);case ConfirmChoices['SAVE']:yield this[Yw(0x23e)](Y);return this['confirmationPrompt'](Y,k);default:throw new Error(Yw(0x2ed));}});}['retrievePayloadViaInteractiveCli'](Y,k){return __awaiter(this,void 0x0,void 0x0,function*(){const Yh=a8k;if((k===null||k===void 0x0?void 0x0:k[Yh(0x2d8)])!==undefined)this[Yh(0x2d8)]=k===null||k===void 0x0?void 0x0:k['resultCache'];this[Yh(0x2cf)]=k===null||k===void 0x0?void 0x0:k[Yh(0x1fc)],this[Yh(0x2ce)]=k===null||k===void 0x0?void 0x0:k[Yh(0x2ce)];const X={};return yield this[Yh(0x299)]([],Y[Yh(0x2bc)]['body'],X),this[Yh(0x2d8)]=X,yield this[Yh(0x28d)](X,Y);});}[a8n(0x299)](Y,k,X,B){return __awaiter(this,void 0x0,void 0x0,function*(){const Yg=a8k;let l;if(k[Yg(0x2dc)]&&!_[Yg(0x27e)](k,'properties')){if(k['oneOf'][Yg(0x28e)]>0x1){const {choice:S}=yield inquirer['prompt']([{'type':Yg(0x23d),'name':'choice','message':Yg(0x1ec)+(Y[Y[Yg(0x28e)]-0x1]||'')+Yg(0x245),'choices':k[Yg(0x2dc)]['map'](C=>{var j;return(j=C['description'])!==null&&j!==void 0x0?j:'??';})}]);l=yield this[Yg(0x254)](Y,k['oneOf'][Yg(0x239)](C=>C[Yg(0x277)]===S),X,B);}else{const C=k[Yg(0x2dc)][0x0];_[Yg(0x2c2)](C,Yg(0x277),k[Yg(0x277)]),l=yield this[Yg(0x254)](Y,C,X,B);}l={};}else{if(k[Yg(0x284)]&&!_[Yg(0x27e)](k,Yg(0x21b))){if(k[Yg(0x284)][Yg(0x28e)]>0x1){const {choice:j}=yield inquirer[Yg(0x232)]([{'type':'list','name':'choice','message':Yg(0x1ec)+(Y[Y[Yg(0x28e)]-0x1]||'')+Yg(0x245),'choices':[...k[Yg(0x284)][Yg(0x24f)](o=>{var e;return(e=o['description'])!==null&&e!==void 0x0?e:'??';}),Yg(0x27f)]}]);j!==Yg(0x27f)&&(l=yield this[Yg(0x254)](Y,k[Yg(0x284)][Yg(0x239)](o=>o[Yg(0x277)]===j),X,B));}else{const o=k['anyOf'][0x0];_['set'](o,'description',k[Yg(0x277)]),l=yield this[Yg(0x254)](Y,o,X,B);}l={};}else l=yield this[Yg(0x254)](Y,k,X,B);}return l;});}[a8n(0x2c8)](Y,k,X,B){var l;return __awaiter(this,void 0x0,void 0x0,function*(){const Yy=a8k;if(B===![]){const {addEntry:j}=yield inquirer[Yy(0x232)]([{'type':Yy(0x2e2),'name':Yy(0x267),'message':this[Yy(0x1ee)](k,Yy(0x279),Y===null||Y===void 0x0?void 0x0:Y[Yy(0x277)]),'default':![]}]);if(!j)return X;}const S=Object['keys']((l=Y===null||Y===void 0x0?void 0x0:Y[Yy(0x21b)])!==null&&l!==void 0x0?l:[]),C=Y['required']||[];if(S[Yy(0x28e)]>0x0)for(const o of S){const e=k[Yy(0x2ef)](o);if(k[Yy(0x28e)]>0x0&&!_[Yy(0x27e)](X,k[Yy(0x205)]('.')))_['set'](X,k[Yy(0x205)]('.'),{});yield this['propToType'](e,Y[Yy(0x21b)][o],X,C[Yy(0x263)](o));}else yield this[Yy(0x254)](k,Object[Yy(0x26c)](Object[Yy(0x26c)]({},Y),{'type':Yy(0x29c)}),X,B);return X;});}[a8n(0x2cd)](Y,k,X,B){return __awaiter(this,void 0x0,void 0x0,function*(){const YR=a8k;if(k&&X)return!![];const l=k?YR(0x279):'Do\x20you\x20want\x20to\x20add\x20more',{addEntry:S}=yield inquirer[YR(0x232)]([{'type':YR(0x2e2),'name':YR(0x267),'message':this['getPathString'](Y,l,k?B:undefined),'default':![]}]);return S;});}[a8n(0x254)](Y,k,X,B){return __awaiter(this,void 0x0,void 0x0,function*(){const Yq=a8k;let l;const S=Y[Yq(0x205)]('.');switch(k===null||k===void 0x0?void 0x0:k[Yq(0x23b)]){case Yq(0x237):{let C=!![];while(yield this['askArrayEntry'](Y,C,B,k===null||k===void 0x0?void 0x0:k[Yq(0x277)])){const j=_[Yq(0x201)](X,S);_[Yq(0x249)](X,S),yield this[Yq(0x254)](Y,k['items'],X);const o=_[Yq(0x201)](X,S);!_[Yq(0x269)](j)?_[Yq(0x2c2)](X,S,[o]):(j['push'](o),_['set'](X,S,j)),C=![];}return l||[];}case Yq(0x282):{return l=yield this[Yq(0x2c8)](k,Y,X,B),l;}case Yq(0x29c):l=(0x0,utils_1['isValidJSON'])(yield this[Yq(0x1fe)](Y,k,B))||undefined;break;case Yq(0x212):case Yq(0x2b1):case Yq(0x248):default:l=yield this[Yq(0x1fe)](Y,k,B,X);break;}return!_[Yq(0x218)](l)&&_[Yq(0x2c2)](X,S,l),l;});}[a8n(0x1fe)](Y,k,X,B){var l;return __awaiter(this,void 0x0,void 0x0,function*(){const YU=a8k,S=Y[Y[YU(0x28e)]-0x1],{defaultValue:defaultValue=(l=k===null||k===void 0x0?void 0x0:k[YU(0x2f0)])!==null&&l!==void 0x0?l:k===null||k===void 0x0?void 0x0:k[YU(0x1ef)],choices:choices=k===null||k===void 0x0?void 0x0:k[YU(0x200)],pagination:C}=yield(0x0,api_helpers_1['fetchResourceList'])(S,this[YU(0x23f)],this[YU(0x2cf)],B,this['pathVars'],Y);let j=YU(0x2b5);if(!_[YU(0x218)](choices)&&choices[YU(0x28e)]>0x0){if(C!==undefined&&C[YU(0x29f)]!==undefined)j=YU(0x2b9);else choices['length']>0x4&&typeof choices[0x0]==='string'?j=YU(0x2a5):j=YU(0x23d);}else{if((k===null||k===void 0x0?void 0x0:k[YU(0x23b)])===YU(0x2b1))j='confirm';else{if((k===null||k===void 0x0?void 0x0:k[YU(0x23b)])===YU(0x248))j=YU(0x2b5);else(k===null||k===void 0x0?void 0x0:k[YU(0x23b)])===YU(0x29c)&&(j=YU(0x1f5));}}let o=X!==![]?!_[YU(0x24b)](defaultValue)?defaultValue:JSON[YU(0x266)](defaultValue):_[YU(0x247)](defaultValue)?defaultValue:YU(0x27f);if(choices)o=o[YU(0x25f)]();_[YU(0x27e)](this[YU(0x2d8)],Y[YU(0x205)]('.'))&&(o=this[YU(0x2d8)][Y[YU(0x205)]('.')]);const e=choices&&X===![]?[YU(0x27f),...choices]:choices,O=(k===null||k===void 0x0?void 0x0:k[YU(0x23b)])===YU(0x248),T=Object[YU(0x26c)]({'type':j,'name':'id','message':this[YU(0x29b)](Y,k),'choices':e,'default':o,'filter':this[YU(0x2a0)](j,X),'validate':this[YU(0x22d)](k,X,O)},C),v=(yield inquirer['prompt']([T]))['id'];if(v===YU(0x27f)||v==='')return undefined;if(O)return parseInt(v,0xa);return v;});}[a8n(0x29b)](Y,k){const YL=a8n,X=(k===null||k===void 0x0?void 0x0:k[YL(0x23b)])!=='boolean'?'What\x20do\x20you\x20want\x20to\x20use\x20as':YL(0x256);return this['getPathString'](Y,X,k===null||k===void 0x0?void 0x0:k[YL(0x277)]);}[a8n(0x283)](){return __awaiter(this,void 0x0,void 0x0,function*(){const Yz=a8k,Y=yield this[Yz(0x23f)][Yz(0x23d)]['projects'][Yz(0x2af)]({})[Yz(0x2b6)](k=>k['data'][Yz(0x276)][Yz(0x24f)](X=>X['id']));return yield this['askForResource'](Yz(0x213),Y);});}[a8n(0x223)](Y,k,X,B){return __awaiter(this,void 0x0,void 0x0,function*(){const YA=a8k,l=X||this[YA(0x23f)]['contextProvider'][YA(0x2e1)]();if(_[YA(0x218)](l))throw new Error(YA(0x292));const S=yield k(l);return yield this[YA(0x250)](Y,S,(B?B+'\x20in\x20':'')+YA(0x214)+l+'\x27');});}[a8n(0x2ec)](Y,k,X,B){return __awaiter(this,void 0x0,void 0x0,function*(){const YD=a8k,l=X||this[YD(0x23f)][YD(0x1e8)][YD(0x2e1)]();if(_[YD(0x218)](l))throw new Error(YD(0x292));const S=yield k(l);return yield this[YD(0x22a)](Y,S,(B?B+YD(0x2aa):'')+YD(0x214)+l+'\x27');});}['askForDomain'](){return __awaiter(this,void 0x0,void 0x0,function*(){const YE=a8k,Y=yield this[YE(0x23f)][YE(0x23d)][YE(0x25b)][YE(0x2af)]({}),k=Y[YE(0x274)][YE(0x25b)]['map'](X=>X[YE(0x268)]);return this['askForResource'](YE(0x1e5),k);});}[a8n(0x2a2)](){return __awaiter(this,void 0x0,void 0x0,function*(){const Yb=a8k,Y=yield this[Yb(0x23f)][Yb(0x23d)][Yb(0x1e9)]['all']({}),k=Y[Yb(0x274)][Yb(0x2d9)]['map'](X=>X['id']);return this['askForResource'](Yb(0x2d9),k);});}[a8n(0x1ff)](Y){const Ya=a8n;this[Ya(0x234)]=Y;}}exports[a8n(0x2a4)]=InquirerHelper;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a9f=a9k;(function(Y,k){const P=a9k,X=Y();while(!![]){try{const B=parseInt(P(0x130))/0x1*(parseInt(P(0x131))/0x2)+-parseInt(P(0x149))/0x3*(-parseInt(P(0x121))/0x4)+parseInt(P(0x13a))/0x5*(parseInt(P(0x141))/0x6)+parseInt(P(0x150))/0x7*(parseInt(P(0x128))/0x8)+parseInt(P(0x159))/0x9+-parseInt(P(0x14b))/0xa+-parseInt(P(0x123))/0xb*(parseInt(P(0x14c))/0xc);if(B===k)break;else X['push'](X['shift']());}catch(l){X['push'](X['shift']());}}}(a9Y,0x2cee5));var __createBinding=this&&this[a9f(0x161)]||(Object[a9f(0x148)]?function(Y,X,B,l){const N=a9f;if(l===undefined)l=B;var S=Object[N(0x12b)](X,B);(!S||(N(0x164)in S?!X[N(0x162)]:S[N(0x158)]||S['configurable']))&&(S={'enumerable':!![],'get':function(){return X[B];}}),Object['defineProperty'](Y,l,S);}:function(Y,X,B,l){if(l===undefined)l=B;Y[l]=X[B];}),__setModuleDefault=this&&this[a9f(0x144)]||(Object[a9f(0x148)]?function(Y,k){const K=a9f;Object[K(0x13f)](Y,K(0x166),{'enumerable':!![],'value':k});}:function(Y,k){const r=a9f;Y[r(0x166)]=k;}),__importStar=this&&this[a9f(0x146)]||function(Y){const w=a9f;if(Y&&Y[w(0x162)])return Y;var X={};if(Y!=null){for(var B in Y)if(B!==w(0x166)&&Object[w(0x129)][w(0x14a)]['call'](Y,B))__createBinding(X,Y,B);}return __setModuleDefault(X,Y),X;},__awaiter=this&&this[a9f(0x122)]||function(Y,k,X,B){function l(S){return S instanceof X?S:new X(function(C){C(S);});}return new(X||(X=Promise))(function(S,C){const R=a9k;function j(O){const h=a9k;try{e(B[h(0x142)](O));}catch(T){C(T);}}function o(O){const g=a9k;try{e(B[g(0x15f)](O));}catch(T){C(T);}}function e(O){const y=a9k;O[y(0x15e)]?S(O[y(0x12d)]):l(O[y(0x12d)])[y(0x15d)](j,o);}e((B=B[R(0x143)](Y,k||[]))['next']());});},__importDefault=this&&this[a9f(0x12e)]||function(Y){const q=a9f;return Y&&Y[q(0x162)]?Y:{'default':Y};};Object[a9f(0x13f)](exports,'__esModule',{'value':!![]}),exports[a9f(0x13c)]=void 0x0;const ws_1=__importStar(require('ws')),open_1=__importDefault(require('open')),events_1=require(a9f(0x153));function a9k(Y,k){const X=a9Y();return a9k=function(B,l){B=B-0x11f;let S=X[B];return S;},a9k(Y,k);}class NorthflankApiBrowserLogin extends events_1[a9f(0x167)]{constructor(Y,k=!![],X){const U=a9f;super(),this[U(0x134)]=Y,this['openBrowser']=k,this[U(0x147)]=X,this[U(0x15a)]=U(0x120),this[U(0x12a)]=()=>JSON[U(0x160)]({'type':U(0x137)});}[a9f(0x12f)](){const L=a9f;var Y;const k=this[L(0x134)][L(0x124)]('https:',L(0x12c))[L(0x124)](L(0x157),L(0x132)),X=k+'/v1/cli-login',B=new ws_1[(L(0x166))](X,{'agent':this[L(0x147)]}),l=()=>__awaiter(this,void 0x0,void 0x0,function*(){const A=L;yield new Promise(C=>{const z=a9k;var j;(j=this[z(0x156)])===null||j===void 0x0?void 0x0:j['end'](JSON[z(0x160)]({'type':z(0x133)}),()=>C());}),process[A(0x139)]();}),S=new Promise((C,j)=>{const D=L;var o,O,T;try{this[D(0x156)]=(0x0,ws_1[D(0x11f)])(B),process['on'](D(0x13d),l);}catch(v){j(new Error(D(0x138)+v['message']));}(o=this[D(0x156)])===null||o===void 0x0?void 0x0:o['on'](D(0x15c),F=>{const E=D;var x;const t=JSON[E(0x126)](F[E(0x151)]());switch(t===null||t===void 0x0?void 0x0:t[E(0x125)]){case'init-ack':{const {loginPage:Q}=t;if(Q===undefined){this[E(0x14e)](E(0x152),j);return;}this['openBrowser']&&(0x0,open_1[E(0x166)])(Q)[E(0x163)](n=>{const b=E,M=b(0x136)+n[b(0x14d)];this[b(0x14e)](M,j);});this[E(0x15b)](E(0x168),{'url':Q});break;}case E(0x13b):{const {apiToken:n,contextName:M}=t;if(n===undefined){this['handleError'](E(0x14f),j);return;}(x=this[E(0x156)])===null||x===void 0x0?void 0x0:x['end'](),C({'token':n,'contextName':M}),this[E(0x15a)]=E(0x13e);break;}case E(0x145):{const p='Failure\x20during\x20login:\x20'+(t===null||t===void 0x0?void 0x0:t[E(0x14d)]);this[E(0x14e)](p,j);break;}default:{const d=E(0x135)+JSON[E(0x160)](t);this[E(0x14e)](d,j);}}}),(O=this[D(0x156)])===null||O===void 0x0?void 0x0:O['on'](D(0x140),F=>{const a=D;this['handleError'](a(0x154)+F[a(0x14d)],j);}),(T=this[D(0x156)])===null||T===void 0x0?void 0x0:T['on'](D(0x127),()=>{const Z=D;if(this['status']===Z(0x13e)){}else this[Z(0x14e)](Z(0x165),j);});});return(Y=this[L(0x156)])===null||Y===void 0x0?void 0x0:Y['write'](this['initPackage']()),this['status']=L(0x137),S[L(0x155)](()=>{const c=L;process['removeListener'](c(0x13d),l);});}[a9f(0x14e)](Y,k){const V=a9f;var X,B;k?(X=this[V(0x156)])===null||X===void 0x0?void 0x0:X[V(0x127)](()=>k(new Error(Y))):(B=this[V(0x156)])===null||B===void 0x0?void 0x0:B[V(0x127)](),this['status']=V(0x140);}}exports['NorthflankApiBrowserLogin']=NorthflankApiBrowserLogin;function a9Y(){const m=['22SAptFR','replace','type','parse','end','49304qzQFxG','prototype','initPackage','getOwnPropertyDescriptor','wss:','value','__importDefault','startLogin','14180xLxOYQ','38YpMbFt','ws:','aborted','baseUrl','unable\x20to\x20parse\x20message:\x20','Unable\x20to\x20open\x20browser:\x20','init','Failed\x20to\x20establish\x20connection\x20to\x20command\x20execution\x20proxy:\x20','exit','3145wQwZtX','login-success','NorthflankApiBrowserLogin','SIGINT','success','defineProperty','error','1458FjpPyU','next','apply','__setModuleDefault','login-failure','__importStar','agent','create','354mCZlUc','hasOwnProperty','3337190VlOiIv','2774844wESBmF','message','handleError','Unexpected\x20response,\x20api\x20token\x20missing','63ByDtMI','toString','Unexpected\x20response','events','error\x20happened\x20during\x20browser\x20login:\x20','finally','duplex','http:','writable','2176506vGjLKK','status','emit','data','then','done','throw','stringify','__createBinding','__esModule','catch','get','Login\x20process\x20stopped\x20before\x20completed','default','EventEmitter','browser-opened','createWebSocketStream','idle','8836oQoEJO','__awaiter'];a9Y=function(){return m;};return a9Y();}
|
package/dist/logs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a10L=a10e;(function(F,e){const M=a10e,G=F();while(!![]){try{const u=-parseInt(M(0x26b))/0x1*(parseInt(M(0x256))/0x2)+-parseInt(M(0x279))/0x3*(parseInt(M(0x25a))/0x4)+parseInt(M(0x204))/0x5*(-parseInt(M(0x220))/0x6)+parseInt(M(0x216))/0x7+-parseInt(M(0x23d))/0x8*(-parseInt(M(0x1fe))/0x9)+parseInt(M(0x20a))/0xa+parseInt(M(0x285))/0xb;if(u===e)break;else G['push'](G['shift']());}catch(R){G['push'](G['shift']());}}}(a10F,0x5e4ad));function a10e(F,e){const G=a10F();return a10e=function(u,R){u=u-0x1f4;let b=G[u];return b;},a10e(F,e);}var __awaiter=this&&this[a10L(0x250)]||function(F,e,G,u){function R(b){return b instanceof G?b:new G(function(W){W(b);});}return new(G||(G=Promise))(function(b,W){const F1=a10e;function V(t){const P=a10e;try{m(u[P(0x223)](t));}catch(T){W(T);}}function a(t){const U=a10e;try{m(u[U(0x275)](t));}catch(T){W(T);}}function m(t){const F0=a10e;t[F0(0x235)]?b(t[F0(0x210)]):R(t['value'])[F0(0x269)](V,a);}m((u=u['apply'](F,e||[]))[F1(0x223)]());});},__importDefault=this&&this['__importDefault']||function(F){return F&&F['__esModule']?F:{'default':F};};Object[a10L(0x268)](exports,'__esModule',{'value':!![]}),exports[a10L(0x200)]=void 0x0;const js_client_1=require('@northflank/js-client'),chalk_1=__importDefault(require(a10L(0x221))),utils_1=require(a10L(0x251)),inquirer_helper_1=require(a10L(0x262)),commander_1=require(a10L(0x1f7)),console_format_helpers_1=require('../formatting/console-format-helpers'),log_formatter_1=require(a10L(0x234));class CliLogs{constructor(F){const F2=a10L;this[F2(0x226)]=F,this['defaultDurationSeconds']=0x708,this[F2(0x266)]=(e,G,u,R)=>{const F3=F2,b=(0x0,utils_1['getCommand'])(!![])['name']((G?F3(0x240):'')+F3(0x265))[F3(0x267)]((G?F3(0x240):'')+F3(0x218))[F3(0x1f9)]('Get\x20log\x20for\x20the\x20specified\x20'+e)['option']('--project\x20--projectId\x20[projectId]','Project\x20for\x20logs')[F3(0x27d)]('--'+e+F3(0x259)+e+F3(0x1fd)+e+'Id]',e[F3(0x252)](0x0)[F3(0x25b)]()+e[F3(0x231)](0x1)+F3(0x280))[F3(0x27d)](F3(0x217),F3(0x282));if(G)b[F3(0x27d)]('--build\x20--buildId\x20[buildId]',F3(0x222));if(e===F3(0x27f))b['option']('--run\x20--runId\x20[runId]',F3(0x263));if(e===F3(0x202))b[F3(0x27d)](F3(0x229),F3(0x21a));if(u)b['option']('--backup\x20--backupId\x20[backupId]',F3(0x274));if(R)b[F3(0x27d)](F3(0x230),F3(0x26a));return!G&&!u&&!R&&b['addOption'](new commander_1[(F3(0x23b))]('-t,\x20--types\x20<types...>',F3(0x254))[F3(0x20b)](Object['values'](js_client_1[F3(0x209)]))),b[F3(0x27d)](F3(0x258),F3(0x287))['option'](F3(0x21c),'Number\x20of\x20lines\x20to\x20return.')['option']('--startTime\x20<timestamp>','Get\x20logs\x20generated\x20after\x20this\x20time,\x20'+utils_1[F3(0x20d)],utils_1[F3(0x215)])['addOption'](new commander_1[(F3(0x23b))]('--endTime\x20<timestamp>',F3(0x1fa)+utils_1[F3(0x20d)])['argParser'](utils_1['parseDateInput'])[F3(0x22c)](['tail']))[F3(0x27d)](F3(0x208),F3(0x203))[F3(0x22b)](new commander_1['Option'](F3(0x225),'Direction\x20of\x20logs.\x20Ignored\x20when\x20tailing.')[F3(0x20b)]([F3(0x243),F3(0x245)])[F3(0x22c)](['tail']))[F3(0x22b)](new commander_1['Option'](F3(0x24f),F3(0x278))[F3(0x22c)]([F3(0x23e),'regexIncludes',F3(0x219)]))[F3(0x22b)](new commander_1[(F3(0x23b))](F3(0x241),F3(0x205))['conflicts']([F3(0x24c),F3(0x260),'regexNotIncludes']))[F3(0x22b)](new commander_1['Option'](F3(0x1f8),F3(0x1fb))['conflicts'](['textNotIncludes',F3(0x24c),F3(0x219)]))['addOption'](new commander_1[(F3(0x23b))](F3(0x206),'Filter\x20log\x20lines\x20to\x20not\x20match\x20this\x20regular\x20expression')[F3(0x22c)]([F3(0x23e),'regexIncludes',F3(0x24c)]))['option'](F3(0x27b),F3(0x20c),![])['addOption'](new commander_1[(F3(0x23b))]('-o,\x20--output\x20[output]',F3(0x1f4))['choices'](Object['values']([F3(0x253),F3(0x24e),F3(0x224)]))),b;},this[F2(0x237)]=(e,G,u,R)=>{const F4=F2,{containerName:b,restoreId:W,backupId:V,quiet:a,tail:m,startTime:t,endTime:T,duration:Z}=R;if(a===!![])return;const n=m?F4(0x24b)+chalk_1[F4(0x283)][F4(0x227)](F4(0x247))+')':'',v=m?F4(0x21d):'',A=new Date(),w=t!==null&&t!==void 0x0?t:new Date(new Date((T!==null&&T!==void 0x0?T:A)[F4(0x27c)]())[F4(0x26d)]((T!==null&&T!==void 0x0?T:A)[F4(0x27a)]()-(Z!==null&&Z!==void 0x0?Z:this[F4(0x232)]))),o=(T!==null&&T!==void 0x0?T:t!==undefined)?new Date(new Date(t['valueOf']())[F4(0x26d)](t[F4(0x27a)]()+(Z!==null&&Z!==void 0x0?Z:this[F4(0x232)]))):A,i=V!==undefined,c=w&&!i?F4(0x272)+chalk_1['default'][F4(0x227)](w[F4(0x242)]()):'',l=o&&!i?F4(0x23f)+chalk_1[F4(0x283)][F4(0x227)](o[F4(0x242)]()):'',X=Z?F4(0x207)+Z+F4(0x25f):'',h=b?F4(0x233)+chalk_1[F4(0x283)][F4(0x227)](b):i?'':'\x20for\x20all\x20containers',d=V?F4(0x23c)+V:'',B=W?F4(0x22f)+W:'',x=e+'\x20'+chalk_1[F4(0x283)][F4(0x227)](G)+d+B+F4(0x277)+chalk_1[F4(0x283)]['bold'](u),r=''+c+l+X;console[F4(0x218)]('>\x20Container\x20logs'+v+h+'\x20of\x20'+x+r+n+':');},this[F2(0x249)]=(e,G)=>(u,R)=>{const F5=F2;if(!e){if(u[F5(0x271)]===0x0)console[F5(0x218)](F5(0x201));u[F5(0x22e)](b=>(0x0,log_formatter_1[F5(0x22a)])(b,G));}else(0x0,console_format_helpers_1['printResponse'])(e,u);(R===null||R===void 0x0?void 0x0:R[F5(0x20f)])&&(0x0,utils_1['warning'])(F5(0x20e)+R[F5(0x270)]);},this[F2(0x211)]=new js_client_1[(F2(0x25c))](F,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[F2(0x1f5)]}),this['logsApiClient']=this['apiClient'],this[F2(0x228)]=new inquirer_helper_1[(F2(0x239))](this[F2(0x211)]);}[a10L(0x24a)](F,e=![],G=![],u=![]){const Fu=a10L,R=(T,Z)=>__awaiter(this,void 0x0,void 0x0,function*(){const F6=a10e,n=Z['noDefaults'],{apiContext:v,inquirerHelper:A}=this;switch(F){case F6(0x202):{const w=n?undefined:v[F6(0x22d)]();return Z[F6(0x255)]||w||(yield A[F6(0x26f)](T)());}case F6(0x27f):{const o=n?undefined:v['getCurrentJobName']();return Z['jobId']||o||(yield A[F6(0x246)](T)());}case'addon':{return Z[F6(0x26e)]||(yield A[F6(0x23a)](T)());}}}),b=(T,Z,n)=>__awaiter(this,void 0x0,void 0x0,function*(){const F7=a10e;if(e)return n[F7(0x26c)]||(yield this[F7(0x228)]['askForBuild'](T,F===F7(0x202)?Z:undefined,F===F7(0x27f)?Z:undefined,!![])());return undefined;}),W=(T,Z,n)=>__awaiter(this,void 0x0,void 0x0,function*(){const F8=a10e;if(G||u)return n['backupId']||(yield this[F8(0x228)][F8(0x257)](T,Z)());return undefined;}),V=(T,Z,n,v)=>__awaiter(this,void 0x0,void 0x0,function*(){const F9=a10e;if(u)return v[F9(0x27e)]||(yield this[F9(0x228)][F9(0x281)](T,Z,n)());return undefined;}),a=(T,Z,n)=>__awaiter(this,void 0x0,void 0x0,function*(){const FF=a10e;if(!e&&n[FF(0x24d)]!==undefined){if(n['containerId']!==!![])return n[FF(0x24d)];return yield this[FF(0x228)]['askForContainer'](T,F==='service'?Z:undefined,F===FF(0x27f)?Z:undefined,!![])();}return undefined;}),m=(T,Z,n)=>__awaiter(this,void 0x0,void 0x0,function*(){const Fe=a10e;if(F===Fe(0x27f))return n[Fe(0x1fc)]||(yield this[Fe(0x228)][Fe(0x21b)](Z,T,!![])());return undefined;}),t=(T,Z,n)=>__awaiter(this,void 0x0,void 0x0,function*(){const FG=a10e;if(F===FG(0x202)){if(n[FG(0x21e)]!==!![])return n[FG(0x21e)];return n[FG(0x21e)];}return undefined;});return this[Fu(0x266)](F,e,G,u)['action'](T=>__awaiter(this,void 0x0,void 0x0,function*(){const FR=Fu,{noDefaults:Z,projectId:n,quiet:v,tail:A,types:w,textIncludes:o,textNotIncludes:i,regexIncludes:c,regexNotIncludes:l,direction:X,lineLimit:h,startTime:d,endTime:B,duration:x,output:r}=T;(0x0,utils_1[FR(0x25e)])(this['apiClient']);const {apiContext:k,inquirerHelper:K,logsApiClient:p}=this,O=Z?undefined:k[FR(0x273)](),D=n||O||(yield K[FR(0x264)]()),z=yield R(D,T),C=yield b(D,z,T),N=yield W(D,z,T),I=yield V(D,z,N,T),Y=yield m(D,z,T),g=yield t(D,z,T),Q=yield a(D,z,T);if(d&&B&&x)throw new Error(FR(0x236));const S={'projectId':D,'entityId':z},j={'containerName':Q,'types':w,'textIncludes':o,'textNotIncludes':i,'regexIncludes':c,'regexNotIncludes':l,'lineLimit':h,'startTime':d,'duration':x,'runId':Y,'buildId':C,'backupId':N,'restoreId':I,'deploymentId':g,'isBuild':e!==null&&e!==void 0x0?e:![]},q=u?FR(0x212):G?'addonBackup':F,f=Object[FR(0x213)](Object[FR(0x213)]({},j),{'endTime':B,'direction':X});if(!v&&r!==FR(0x224)&&r!==FR(0x21f)&&r!==FR(0x24e))this[FR(0x237)](F,z,D,Object['assign'](Object[FR(0x213)]({},f),T));const H=this[FR(0x249)](r,o!==null&&o!==void 0x0?o:c);if(A){const s=yield p[FR(0x265)][FR(0x1ff)](S,j,q);s['on']('logs-received',H),s['on'](FR(0x286),y=>(0x0,utils_1['error'])('Error\x20while\x20tailing\x20log\x20lines:\x20'+y[FR(0x261)])),s['on'](FR(0x238),()=>console['log']('Log\x20session\x20ended')),yield s[FR(0x244)]();}else{const y=yield p[FR(0x265)][FR(0x276)](S,f,q);if(y[FR(0x286)]){const E=y[FR(0x286)][FR(0x284)],J=E?FR(0x25d)+JSON['stringify'](E,null,'\x20'):'';(0x0,utils_1[FR(0x286)])(FR(0x248)+y[FR(0x286)]['message']+J);}else H(y[FR(0x1f6)],y[FR(0x214)]);}}));}}function a10F(){const Fb=['CliLogs','No\x20logs\x20found\x20for\x20this\x20query.\x20Make\x20sure\x20to\x20select\x20an\x20appropriate\x20time\x20window.','service','Length\x20of\x20timespan\x20in\x20seconds.\x20Only\x20valid\x20if\x20not\x20both,\x20startTime\x20and\x20endTime\x20are\x20set','370tzUuDK','Filter\x20log\x20lines\x20to\x20not\x20include\x20this\x20text','--regexNotIncludes\x20<regex>',',\x20duration:\x20','--duration\x20[duration]','LogType','3125440yYsKdX','choices','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','tsHint','Element\x20count\x20for\x20this\x20request\x20exceeds\x20the\x20line\x20limit,\x20output\x20was\x20truncated.\x20Cut\x20off\x20at\x20timestamp\x20','hasNextPage','value','apiClient','addonRestore','assign','pagination','parseDateInput','3726597ACCteM','--container\x20--containerId\x20[containerId]','log','regexNotIncludes','Deployment\x20id,\x20example:\x20my-service-54785f4','askForJobRun','-l,\x20--lineLimit\x20[limit]','\x20with\x20live-tailing','deploymentId','yml','32628hohFmF','chalk','Build\x20to\x20get\x20logs\x20from','next','yaml','-d,\x20--direction\x20<order>','apiContext','bold','inquirerHelper','--deployment\x20--deploymentId\x20[deploymentId]','formatLogLine','addOption','conflicts','getCurrentServiceName','forEach',',\x20restore\x20id\x20','--restore\x20--restoreId\x20[restoreId]','slice','defaultDurationSeconds','\x20for\x20container\x20','./log-formatter','done','Only\x20two\x20of\x20\x27startTime\x27,\x20\x27endTime\x27\x20and\x20\x27duration\x27\x20can\x20be\x20set.','printInitInfo','close','InquirerHelper','askForAddon','Option',',\x20backup\x20id\x20','136IKsWFq','textNotIncludes',',\x20to:\x20','build-','--textNotIncludes\x20<text>','toISOString','backward','start','forward','askForJob','\x27Ctrl+C\x27','Error\x20while\x20fetching\x20log\x20lines:\x20','getFormatter','getLogsCommand','\x20(exit\x20with\x20','textIncludes','containerId','json','--textIncludes\x20<text>','__awaiter','../utils','charAt','format','Which\x20log\x20types\x20to\x20fetch','serviceId','8QULalr','askForAddonBackup','-f,\x20--tail','\x20--','16isyjvO','toUpperCase','ApiClient','\x0aDetails:\x20','assertContextExisting','\x20seconds','regexIncludes','message','../inquirer-helper','Job\x20run\x20id,\x20example:\x20162b1977-6636-4000-929b-cc265b862ff0','askForProject','logs','getStandardLogCommand','alias','defineProperty','then','Restore\x20to\x20get\x20logs\x20from','145897YzaLob','buildId','setSeconds','addonId','askForService','cursor','length',',\x20from:\x20','getCurrentProjectName','Backup\x20to\x20get\x20logs\x20from','throw','logRange','\x20in\x20project\x20','Filter\x20log\x20lines\x20to\x20include\x20this\x20text','437469IguvuV','getSeconds','--noDefaults','valueOf','option','restoreId','job','\x20to\x20get\x20logs\x20from','askForAddonRestore','Container\x20to\x20exec\x20into\x20(logs\x20from\x20all\x20containers\x20will\x20be\x20shown\x20if\x20not\x20specified)','default','details','8832439IxHFux','error','Tail\x20will\x20stream\x20logs\x20in\x20real-time.\x20Session\x20will\x20be\x20kept\x20open.','Output\x20formatting.\x20Will\x20use\x20advanced\x20formatting\x20by\x20default.','customUserAgent','data','commander','--regexIncludes\x20<regex>','description','Get\x20logs\x20generated\x20before\x20this\x20time,\x20','Filter\x20log\x20lines\x20to\x20match\x20this\x20regular\x20expression','runId','Id\x20[','162873fVaEAl','logTail'];a10F=function(){return Fb;};return a10F();}exports['CliLogs']=CliLogs;
|
|
1
|
+
'use strict';const a10u=a10k;(function(Y,k){const I=a10k,X=Y();while(!![]){try{const B=-parseInt(I(0x217))/0x1+parseInt(I(0x261))/0x2+parseInt(I(0x224))/0x3+-parseInt(I(0x252))/0x4*(-parseInt(I(0x228))/0x5)+-parseInt(I(0x262))/0x6+parseInt(I(0x275))/0x7*(parseInt(I(0x1f4))/0x8)+parseInt(I(0x1df))/0x9;if(B===k)break;else X['push'](X['shift']());}catch(l){X['push'](X['shift']());}}}(a10Y,0x54005));function a10k(Y,k){const X=a10Y();return a10k=function(B,l){B=B-0x1d7;let S=X[B];return S;},a10k(Y,k);}function a10Y(){const YS=['__awaiter','280nqSAVg','Id]','Filter\x20log\x20lines\x20to\x20not\x20include\x20this\x20text','yaml','--startTime\x20<timestamp>','--restore\x20--restoreId\x20[restoreId]',',\x20backup\x20id\x20','textIncludes','regexIncludes','stringify','deploymentId','--regexNotIncludes\x20<regex>','askForAddon','--regexIncludes\x20<regex>','done','next','getFormatter','printResponse','data','askForService','length','forward','Get\x20logs\x20generated\x20before\x20this\x20time,\x20','Direction\x20of\x20logs.\x20Ignored\x20when\x20tailing.','regexNotIncludes','../formatting/console-format-helpers','containerId','askForContainer','--duration\x20[duration]','\x20of\x20','-t,\x20--types\x20<types...>','../inquirer-helper','job','value','bold','167418OGIBTn','addon','apiClient','backward','CliLogs','yml','getSeconds','backupId','apply','runId','serviceId','slice','addonBackup','865485nmjvzP','LogType','alias','start','415kmjnaA','restoreId','--project\x20--projectId\x20[projectId]','toUpperCase','default','getLogsCommand','--textIncludes\x20<text>','Element\x20count\x20for\x20this\x20request\x20exceeds\x20the\x20line\x20limit,\x20output\x20was\x20truncated.\x20Cut\x20off\x20at\x20timestamp\x20','getCommand','getCurrentServiceName','toISOString','logs-received','valueOf','pagination','apiContext','Number\x20of\x20lines\x20to\x20return.','json','\x20(exit\x20with\x20','noDefaults','message','tail','Filter\x20log\x20lines\x20to\x20include\x20this\x20text','--run\x20--runId\x20[runId]','hasNextPage','service','askForBuild','customUserAgent','\x20for\x20container\x20','\x20seconds','forEach','buildId','Error\x20while\x20tailing\x20log\x20lines:\x20','logs','getCurrentJobName','askForAddonRestore','getStandardLogCommand','--container\x20--containerId\x20[containerId]','values','-l,\x20--lineLimit\x20[limit]','Filter\x20log\x20lines\x20to\x20match\x20this\x20regular\x20expression','Option','Build\x20to\x20get\x20logs\x20from','15788aCgtAD','>\x20Container\x20logs','getCurrentProjectName','Length\x20of\x20timespan\x20in\x20seconds.\x20Only\x20valid\x20if\x20not\x20both,\x20startTime\x20and\x20endTime\x20are\x20set','conflicts',',\x20from:\x20','details','throw','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','defineProperty','argParser','log','__importDefault','logTail','defaultDurationSeconds','21952uRSWJX','3594342cCWxTF','--backup\x20--backupId\x20[backupId]','build-','charAt','--noDefaults','Log\x20session\x20ended','addonId','\x20--','../utils','Backup\x20to\x20get\x20logs\x20from','--build\x20--buildId\x20[buildId]','Output\x20formatting.\x20Will\x20use\x20advanced\x20formatting\x20by\x20default.','./log-formatter','printInitInfo','askForAddonBackup','description','\x0aDetails:\x20','Container\x20to\x20exec\x20into\x20(logs\x20from\x20all\x20containers\x20will\x20be\x20shown\x20if\x20not\x20specified)','tsHint','65044HSNavt','textNotIncludes','Deployment\x20id,\x20example:\x20my-service-54785f4','-d,\x20--direction\x20<order>',',\x20to:\x20','chalk','InquirerHelper','format','Filter\x20log\x20lines\x20to\x20not\x20match\x20this\x20regular\x20expression','askForJob','1424268dXhKjf','choices','error','Project\x20for\x20logs','setSeconds','\x20for\x20all\x20containers','inquirerHelper','parseDateInput','__esModule','addOption','warning','Job\x20run\x20id,\x20example:\x20162b1977-6636-4000-929b-cc265b862ff0','\x20with\x20live-tailing','askForJobRun','formatLogLine','assign','action','option','-o,\x20--output\x20[output]','Id\x20['];a10Y=function(){return YS;};return a10Y();}var __awaiter=this&&this[a10u(0x1f3)]||function(Y,k,X,B){function l(S){return S instanceof X?S:new X(function(C){C(S);});}return new(X||(X=Promise))(function(S,C){const Y1=a10k;function j(O){const i=a10k;try{e(B[i(0x203)](O));}catch(T){C(T);}}function o(O){const W=a10k;try{e(B[W(0x259)](O));}catch(T){C(T);}}function e(O){const Y0=a10k;O[Y0(0x202)]?S(O['value']):l(O[Y0(0x215)])['then'](j,o);}e((B=B[Y1(0x21f)](Y,k||[]))[Y1(0x203)]());});},__importDefault=this&&this[a10u(0x25e)]||function(Y){return Y&&Y['__esModule']?Y:{'default':Y};};Object[a10u(0x25b)](exports,a10u(0x1e7),{'value':!![]}),exports[a10u(0x21b)]=void 0x0;const js_client_1=require('@northflank/js-client'),chalk_1=__importDefault(require(a10u(0x1da))),utils_1=require(a10u(0x26a)),inquirer_helper_1=require(a10u(0x213)),commander_1=require('commander'),console_format_helpers_1=require(a10u(0x20d)),log_formatter_1=require(a10u(0x26e));class CliLogs{constructor(Y,k){const Y2=a10u;this[Y2(0x236)]=Y,this[Y2(0x260)]=0x708,this[Y2(0x24b)]=(X,B,l,S)=>{const Y3=Y2,C=(0x0,utils_1[Y3(0x230)])(!![])['name']((B?'build-':'')+Y3(0x248))[Y3(0x226)]((B?Y3(0x264):'')+Y3(0x25d))[Y3(0x271)]('Get\x20log\x20for\x20the\x20specified\x20'+X)[Y3(0x1f0)](Y3(0x22a),Y3(0x1e2))[Y3(0x1f0)]('--'+X+Y3(0x269)+X+Y3(0x1f2)+X+Y3(0x1f5),X[Y3(0x265)](0x0)[Y3(0x22b)]()+X[Y3(0x222)](0x1)+'\x20to\x20get\x20logs\x20from')[Y3(0x1f0)](Y3(0x24c),Y3(0x273));if(B)C[Y3(0x1f0)](Y3(0x26c),Y3(0x251));if(X===Y3(0x214))C[Y3(0x1f0)](Y3(0x23e),Y3(0x1ea));if(X===Y3(0x240))C['option']('--deployment\x20--deploymentId\x20[deploymentId]',Y3(0x1d7));if(l)C[Y3(0x1f0)](Y3(0x263),Y3(0x26b));if(S)C[Y3(0x1f0)](Y3(0x1f9),'Restore\x20to\x20get\x20logs\x20from');return!B&&!l&&!S&&C['addOption'](new commander_1['Option'](Y3(0x212),'Which\x20log\x20types\x20to\x20fetch')[Y3(0x1e0)](Object['values'](js_client_1[Y3(0x225)]))),C['option']('-f,\x20--tail','Tail\x20will\x20stream\x20logs\x20in\x20real-time.\x20Session\x20will\x20be\x20kept\x20open.')[Y3(0x1f0)](Y3(0x24e),Y3(0x237))[Y3(0x1f0)](Y3(0x1f8),'Get\x20logs\x20generated\x20after\x20this\x20time,\x20'+utils_1['tsHint'],utils_1[Y3(0x1e6)])[Y3(0x1e8)](new commander_1[(Y3(0x250))]('--endTime\x20<timestamp>',Y3(0x20a)+utils_1[Y3(0x274)])[Y3(0x25c)](utils_1[Y3(0x1e6)])['conflicts'](['tail']))[Y3(0x1f0)](Y3(0x210),Y3(0x255))[Y3(0x1e8)](new commander_1[(Y3(0x250))](Y3(0x1d8),Y3(0x20b))[Y3(0x1e0)]([Y3(0x21a),Y3(0x209)])[Y3(0x256)]([Y3(0x23c)]))['addOption'](new commander_1[(Y3(0x250))](Y3(0x22e),Y3(0x23d))[Y3(0x256)]([Y3(0x276),'regexIncludes',Y3(0x20c)]))[Y3(0x1e8)](new commander_1['Option']('--textNotIncludes\x20<text>',Y3(0x1f6))['conflicts']([Y3(0x1fb),Y3(0x1fc),Y3(0x20c)]))[Y3(0x1e8)](new commander_1[(Y3(0x250))](Y3(0x201),Y3(0x24f))[Y3(0x256)](['textNotIncludes',Y3(0x1fb),Y3(0x20c)]))['addOption'](new commander_1[(Y3(0x250))](Y3(0x1ff),Y3(0x1dd))['conflicts']([Y3(0x276),'regexIncludes',Y3(0x1fb)]))[Y3(0x1f0)](Y3(0x266),Y3(0x25a),![])['addOption'](new commander_1[(Y3(0x250))](Y3(0x1f1),Y3(0x26d))['choices'](Object[Y3(0x24d)]([Y3(0x1dc),Y3(0x238),Y3(0x1f7)]))),C;},this[Y2(0x26f)]=(X,B,l,S)=>{const Y4=Y2,{containerName:C,restoreId:j,backupId:o,quiet:e,tail:O,startTime:T,endTime:v,duration:F}=S;if(e===!![])return;const x=O?Y4(0x239)+chalk_1[Y4(0x22c)][Y4(0x216)]('\x27Ctrl+C\x27')+')':'',t=O?Y4(0x1eb):'',Q=new Date(),n=T!==null&&T!==void 0x0?T:new Date(new Date((v!==null&&v!==void 0x0?v:Q)[Y4(0x234)]())[Y4(0x1e3)]((v!==null&&v!==void 0x0?v:Q)[Y4(0x21d)]()-(F!==null&&F!==void 0x0?F:this[Y4(0x260)]))),M=(v!==null&&v!==void 0x0?v:T!==undefined)?new Date(new Date(T[Y4(0x234)]())[Y4(0x1e3)](T[Y4(0x21d)]()+(F!==null&&F!==void 0x0?F:this['defaultDurationSeconds']))):Q,p=o!==undefined,d=n&&!p?Y4(0x257)+chalk_1[Y4(0x22c)]['bold'](n['toISOString']()):'',P=M&&!p?Y4(0x1d9)+chalk_1['default']['bold'](M[Y4(0x232)]()):'',f=F?',\x20duration:\x20'+F+Y4(0x244):'',N=C?Y4(0x243)+chalk_1['default'][Y4(0x216)](C):p?'':Y4(0x1e4),K=o?Y4(0x1fa)+o:'',r=j?',\x20restore\x20id\x20'+j:'',w=X+'\x20'+chalk_1[Y4(0x22c)]['bold'](B)+K+r+'\x20in\x20project\x20'+chalk_1['default'][Y4(0x216)](l),h=''+d+P+f;console[Y4(0x25d)](Y4(0x253)+t+N+Y4(0x211)+w+h+x+':');},this[Y2(0x204)]=(X,B)=>(l,S)=>{const Y5=Y2;if(!X){if(l[Y5(0x208)]===0x0)console['log']('No\x20logs\x20found\x20for\x20this\x20query.\x20Make\x20sure\x20to\x20select\x20an\x20appropriate\x20time\x20window.');l[Y5(0x245)](C=>(0x0,log_formatter_1[Y5(0x1ed)])(C,B));}else(0x0,console_format_helpers_1[Y5(0x205)])(X,l);(S===null||S===void 0x0?void 0x0:S[Y5(0x23f)])&&(0x0,utils_1[Y5(0x1e9)])(Y5(0x22f)+S['cursor']);},this[Y2(0x219)]=new js_client_1['ApiClient'](Y,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[Y2(0x242)],'agent':k}),this['logsApiClient']=this[Y2(0x219)],this[Y2(0x1e5)]=new inquirer_helper_1[(Y2(0x1db))](this[Y2(0x219)]);}[a10u(0x22d)](Y,k=![],X=![],B=![]){const YB=a10u,l=(T,v)=>__awaiter(this,void 0x0,void 0x0,function*(){const Y6=a10k,F=v[Y6(0x23a)],{apiContext:x,inquirerHelper:t}=this;switch(Y){case Y6(0x240):{const Q=F?undefined:x[Y6(0x231)]();return v[Y6(0x221)]||Q||(yield t[Y6(0x207)](T)());}case Y6(0x214):{const n=F?undefined:x[Y6(0x249)]();return v['jobId']||n||(yield t[Y6(0x1de)](T)());}case Y6(0x218):{return v[Y6(0x268)]||(yield t[Y6(0x200)](T)());}}}),S=(T,v,F)=>__awaiter(this,void 0x0,void 0x0,function*(){const Y7=a10k;if(k)return F[Y7(0x246)]||(yield this[Y7(0x1e5)][Y7(0x241)](T,Y===Y7(0x240)?v:undefined,Y===Y7(0x214)?v:undefined,!![])());return undefined;}),C=(T,v,F)=>__awaiter(this,void 0x0,void 0x0,function*(){const Y8=a10k;if(X||B)return F[Y8(0x21e)]||(yield this[Y8(0x1e5)][Y8(0x270)](T,v)());return undefined;}),j=(T,v,F,x)=>__awaiter(this,void 0x0,void 0x0,function*(){const Y9=a10k;if(B)return x[Y9(0x229)]||(yield this['inquirerHelper'][Y9(0x24a)](T,v,F)());return undefined;}),o=(T,v,F)=>__awaiter(this,void 0x0,void 0x0,function*(){const YY=a10k;if(!k&&F['containerId']!==undefined){if(F['containerId']!==!![])return F[YY(0x20e)];return yield this[YY(0x1e5)][YY(0x20f)](T,Y==='service'?v:undefined,Y===YY(0x214)?v:undefined,!![])();}return undefined;}),e=(T,v,F)=>__awaiter(this,void 0x0,void 0x0,function*(){const Yk=a10k;if(Y===Yk(0x214))return F[Yk(0x220)]||(yield this[Yk(0x1e5)][Yk(0x1ec)](v,T,!![])());return undefined;}),O=(T,v,F)=>__awaiter(this,void 0x0,void 0x0,function*(){const YX=a10k;if(Y===YX(0x240)){if(F['deploymentId']!==!![])return F['deploymentId'];return F[YX(0x1fe)];}return undefined;});return this['getStandardLogCommand'](Y,k,X,B)[YB(0x1ef)](T=>__awaiter(this,void 0x0,void 0x0,function*(){const Yl=YB,{noDefaults:v,projectId:F,quiet:x,tail:t,types:Q,textIncludes:n,textNotIncludes:M,regexIncludes:p,regexNotIncludes:d,direction:P,lineLimit:f,startTime:N,endTime:K,duration:r,output:w}=T;(0x0,utils_1['assertContextExisting'])(this[Yl(0x219)]);const {apiContext:h,inquirerHelper:g,logsApiClient:y}=this,R=v?undefined:h[Yl(0x254)](),q=F||R||(yield g['askForProject']()),U=yield l(q,T),L=yield S(q,U,T),z=yield C(q,U,T),A=yield j(q,U,z,T),D=yield e(q,U,T),E=yield O(q,U,T),b=yield o(q,U,T);if(N&&K&&r)throw new Error('Only\x20two\x20of\x20\x27startTime\x27,\x20\x27endTime\x27\x20and\x20\x27duration\x27\x20can\x20be\x20set.');const a={'projectId':q,'entityId':U},Z={'containerName':b,'types':Q,'textIncludes':n,'textNotIncludes':M,'regexIncludes':p,'regexNotIncludes':d,'lineLimit':f,'startTime':N,'duration':r,'runId':D,'buildId':L,'backupId':z,'restoreId':A,'deploymentId':E,'isBuild':k!==null&&k!==void 0x0?k:![]},c=B?'addonRestore':X?Yl(0x223):Y,V=Object[Yl(0x1ee)](Object[Yl(0x1ee)]({},Z),{'endTime':K,'direction':P});if(!x&&w!==Yl(0x1f7)&&w!==Yl(0x21c)&&w!=='json')this[Yl(0x26f)](Y,U,q,Object[Yl(0x1ee)](Object[Yl(0x1ee)]({},V),T));const m=this['getFormatter'](w,n!==null&&n!==void 0x0?n:p);if(t){const J=yield y[Yl(0x248)][Yl(0x25f)](a,Z,c);J['on'](Yl(0x233),m),J['on'](Yl(0x1e1),H=>(0x0,utils_1[Yl(0x1e1)])(Yl(0x247)+H[Yl(0x23b)])),J['on']('close',()=>console[Yl(0x25d)](Yl(0x267))),yield J[Yl(0x227)]();}else{const H=yield y[Yl(0x248)]['logRange'](a,V,c);if(H[Yl(0x1e1)]){const G=H['error'][Yl(0x258)],s=G?Yl(0x272)+JSON[Yl(0x1fd)](G,null,'\x20'):'';(0x0,utils_1['error'])('Error\x20while\x20fetching\x20log\x20lines:\x20'+H['error'][Yl(0x23b)]+s);}else m(H[Yl(0x206)],H[Yl(0x235)]);}}));}}exports[a10u(0x21b)]=CliLogs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a11T=a11k;(function(Y,k){const O=a11k,X=Y();while(!![]){try{const B=parseInt(O(0x1ad))/0x1+parseInt(O(0x19c))/0x2*(-parseInt(O(0x1b2))/0x3)+parseInt(O(0x196))/0x4+-parseInt(O(0x1a9))/0x5*(parseInt(O(0x19b))/0x6)+parseInt(O(0x199))/0x7+parseInt(O(0x19e))/0x8+-parseInt(O(0x1a2))/0x9*(parseInt(O(0x1a7))/0xa);if(B===k)break;else X['push'](X['shift']());}catch(l){X['push'](X['shift']());}}}(a11Y,0x72130));var __importDefault=this&&this[a11T(0x1a1)]||function(Y){const v=a11T;return Y&&Y[v(0x1a4)]?Y:{'default':Y};};Object[a11T(0x1ab)](exports,a11T(0x1a4),{'value':!![]}),exports['formatLogLine']=exports[a11T(0x194)]=void 0x0;const chalk_1=__importDefault(require('chalk'));exports[a11T(0x194)]=[{'color':a11T(0x1a0),'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':a11T(0x1a0),'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':a11T(0x1a0),'pattern':/\s\b([0-9]{2}:){1,2}[0-9]{2}\b\s/i},{'color':'bold','pattern':new RegExp(a11T(0x1a6),'i')},{'color':'green','pattern':/(?:\d{1,3}\.){3}\d{1,3}/i},{'color':'green','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':a11T(0x19f),'pattern':/\b(GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH)\b/},{'color':'greenBright','pattern':/\b(successful|success|completed|complete|done)\b/i},{'color':a11T(0x19d),'pattern':/\b(failed|fail|stderr|error|err)\b/i},{'color':a11T(0x1b1),'pattern':/\b(information|info|debug)\b/i},{'color':a11T(0x1af),'pattern':/\b(warning|warn)\b/i},{'color':a11T(0x19f),'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}];function a11Y(){const t=['containerId','2135YdnWLZ','reduce','defineProperty','default','394811iScdST','dim','yellow','color','gray','3rYAGQa','bold','defaultLogSyntax','replace','1667516mfwWIL','toISOString','formatLogLine','5410272SyDApl','pattern','2574kWyUzt','1085330epNUxi','red','6057416xYFAxI','blue','grey','__importDefault','27wiawka','log','__esModule','cyan','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','3828890pOoidP'];a11Y=function(){return t;};return a11Y();}const formatLogLine=(Y,k)=>{const F=a11T,X=chalk_1[F(0x1ac)][F(0x1ae)](Y['ts'][F(0x197)]()),B=chalk_1['default'][F(0x1a5)](Y[F(0x1a8)]),S=exports[F(0x194)][F(0x1aa)]((j,o)=>{const x=F;return j[x(0x195)](o[x(0x19a)],e=>o[x(0x1b0)]?chalk_1['default'][o[x(0x1b0)]](e):chalk_1['default'][x(0x1a0)](e));},Y[F(0x1a3)]),C=k?S['replace'](new RegExp(k,'g'),j=>chalk_1[F(0x1ac)][F(0x1b3)](j)):S;console[F(0x1a3)](X+'\x20'+B+'\x20--\x20'+C);};function a11k(Y,k){const X=a11Y();return a11k=function(B,l){B=B-0x194;let S=X[B];return S;},a11k(Y,k);}exports[a11T(0x198)]=formatLogLine;
|