@northflank/cli 0.9.18 → 0.9.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-helpers.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/context/contextCommands.js +1 -1
- package/dist/defaults.js +1 -1
- package/dist/exec/index.js +1 -1
- package/dist/formatting/command-overview.js +1 -1
- package/dist/formatting/console-format-helpers.js +1 -1
- package/dist/formatting/terminal-chart.js +1 -1
- package/dist/inquirer-helper.js +1 -1
- package/dist/login/browser-login.js +1 -1
- package/dist/logs/index.js +1 -1
- package/dist/logs/log-formatter.js +1 -1
- package/dist/metrics/index.js +1 -1
- package/dist/pagination/inquirer-pagination-prompt.js +1 -1
- package/dist/pagination/pagination-helper.js +1 -1
- package/dist/port-forward/index.js +1 -1
- package/dist/utils.js +1 -1
- package/package.json +1 -1
package/dist/exec/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a4k=a4J;(function(Z,J){const d=a4J,z=Z();while(!![]){try{const P=-parseInt(d(0x78))/0x1+parseInt(d(0xcf))/0x2+-parseInt(d(0xbd))/0x3*(-parseInt(d(0xbf))/0x4)+parseInt(d(0xaf))/0x5*(parseInt(d(0x87))/0x6)+-parseInt(d(0xc1))/0x7+-parseInt(d(0x8c))/0x8*(parseInt(d(0x84))/0x9)+parseInt(d(0xc0))/0xa;if(P===J)break;else z['push'](z['shift']());}catch(B){z['push'](z['shift']());}}}(a4Z,0xa205a));function a4Z(){const f=['Command\x20completed\x20successfully,\x20exit\x20code:\x20','action','then','\x20to\x20exec\x20into','askForProject','greenBright','log','--user\x20[USER]','with\x20user:','\x20in\x20project\x20','__esModule','throw','setRawMode','readline','description','--cmd\x20--command\x20[COMMAND]','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.','with\x20group:','Run\x20command\x20with\x20this\x20group','1820SYwoFS','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.','Container\x20to\x20exec\x20into\x20(random\x20container\x20will\x20be\x20chosen\x20if\x20not\x20specified)','toUpperCase','apply','stdout','default','error','sequence','join','message','shell\x20command\x20','InquirerHelper','chalk','566103YekaWx','exitCode','12LVmoPe','890940VCWmiL','1314502Mugcpk','getCurrentProjectName','@northflank/js-client','Id\x20[NAME]','getTerminalSize','charAt','resizeTerminal','exec','emitKeypressEvents','name','apiClient','getCommand','--group\x20[GROUP]','customUserAgent','52224PyAjyR','askForService','rows','execStartLog','bold','\x20--cmd\x20\x27date\x27\x0a\x20\x20Single\x20command,\x20custom\x20shell:\x20northflank\x20exec\x20','defineProperty','execCmd','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','pipe','addCommand','execJobSession','exit','command-exec','columns','__awaiter','--container\x20--containerId\x20[NAME]','job','Project\x20for\x20exec','Received\x20Ctrl+D\x20twice,\x20exiting\x20shell\x20forcefully.','service','value','\x0a\x20\x20Single\x20command,\x20no\x20shell:\x20\x20\x20\x20\x20northflank\x20exec\x20','95557pZMGxF','stdin','Unknown','Exec\x20','isTTY','Command\x20execution\x20(exec)\x20for\x20Northflank\x20services\x20and\x20jobs.','Command\x20exec\x20for\x20the\x20specified\x20','stderr','Success','none','Error\x20occured\x20during\x20','keypress','576GXzbHd','\x27Ctrl+D\x27','getStandardExecCommand','9462cZSCuc','status','execServiceSession','stdOut','next','38544vjHquF','without\x20shell','warning','__importDefault','handleShellSession','../utils','option','--shell-cmd\x20[SHELL-CMD]','waitForCommandResult','with\x20shell\x20session','with\x20command\x20\x27','assertContextExisting','\x20--','ApiClient','getCurrentServiceName','askForJob'];a4Z=function(){return f;};return a4Z();}var __awaiter=this&&this[a4k(0xde)]||function(Z,J,z,B){function U(s){return s instanceof z?s:new z(function(A){A(s);});}return new(z||(z=Promise))(function(s,A){const X=a4J;function n(v){try{C(B['next'](v));}catch(o){A(o);}}function F(v){const N=a4J;try{C(B[N(0xa7)](v));}catch(o){A(o);}}function C(v){const W=a4J;v['done']?s(v[W(0x76)]):U(v['value'])[W(0x9e)](n,F);}C((B=B[X(0xb3)](Z,J||[]))[X(0x8b)]());});},__importDefault=this&&this[a4k(0x8f)]||function(Z){return Z&&Z['__esModule']?Z:{'default':Z};};Object[a4k(0xd5)](exports,a4k(0xa6),{'value':!![]}),exports['CliExec']=void 0x0;function a4J(Z,J){const z=a4Z();return a4J=function(P,B){P=P-0x72;let U=z[P];return U;},a4J(Z,J);}const js_client_1=require(a4k(0xc3)),chalk_1=__importDefault(require(a4k(0xbc))),utils_1=require(a4k(0x91)),inquirer_helper_1=require('../inquirer-helper');class CliExec{constructor(Z){const D=a4k;this[D(0x86)]=B=>(0x0,utils_1[D(0xcc)])(!![])[D(0xca)](B)[D(0xaa)](D(0x7e)+B+'.\x0aExamples:\x0a\x20\x20Shell\x20session:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20northflank\x20exec\x20'+B+D(0x77)+B+D(0xd4)+B+'\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'+B+'\x20--shell-cmd\x20\x27sh\x27')[D(0x92)]('--project\x20--projectId\x20[NAME]',D(0x73))[D(0x92)]('--'+B+D(0x98)+B+D(0xc4),B[D(0xc6)](0x0)[D(0xb2)]()+B['slice'](0x1)+D(0x9f))[D(0x92)](D(0xdf),D(0xb1))[D(0x92)](D(0x93),D(0xac))[D(0x92)](D(0xa3),'Run\x20command\x20with\x20this\x20user')['option'](D(0xcd),D(0xae))[D(0x92)]('--noDefaults',D(0xd7),![])['option'](D(0xab),D(0xb0)),this[D(0xc5)]=()=>({'columns':process[D(0xb4)][D(0xdd)],'rows':process[D(0xb4)][D(0xd1)]}),this['execStartLog']=(B,U,s,A,n,F,C,v)=>{const q=D;if(v===!![])return;const o=A===q(0x81),j=o?q(0x8d):A===undefined?q(0x95):q(0xba)+chalk_1[q(0xb5)][q(0xa1)](A),V=n!==undefined?q(0xa4)+n:'',i=F!==undefined?q(0xad)+F:'',p=C!==undefined?q(0x96)+chalk_1[q(0xb5)][q(0xa1)](C)+'\x27':'',S=[p,j,V,i]['filter'](g=>g!=='')[q(0xb8)]('\x20'),e='(exit\x20with\x20two\x20quick\x20'+chalk_1[q(0xb5)][q(0xd3)](q(0x85))+')';console[q(0xa2)](q(0x7b)+B+'\x20'+chalk_1['default'][q(0xd3)](U)+q(0xa5)+chalk_1[q(0xb5)]['bold'](s)+'\x20'+S+'\x20'+e);},this[D(0x90)]=(B,U,s=![])=>__awaiter(this,void 0x0,void 0x0,function*(){const y=D;var A,n;let F=![];try{if(process['stdin'][y(0x7c)]){const v=require(y(0xa9));v[y(0xc9)](process[y(0x79)]),process[y(0x79)][y(0xa8)](!![]),process[y(0xb4)]['on']('resize',()=>{const O=y;B[O(0xc7)](this[O(0xc5)]());}),process[y(0x79)]['on'](y(0x83),(o,j)=>{const G=y;j[G(0xb7)]==='\x04'&&(F?(process[G(0x79)][G(0xa8)](![]),(0x0,utils_1['warning'])(G(0x74)),process[G(0xdb)]()):(F=!![],setTimeout(()=>F=![],0x190)));});}process[y(0x79)][y(0xd8)](B['stdIn']),B['stdErr'][y(0xd8)](process[y(0x7f)]),B[y(0x8a)][y(0xd8)](process[y(0xb4)]),B['on'](y(0xb6),o=>{const K=y;var j;(0x0,utils_1['error'])(K(0x82)+U+'\x20command\x20exec:\x20'+((j=o[K(0xb9)])!==null&&j!==void 0x0?j:o)),process[K(0x79)][K(0x7c)]&&process['stdin'][K(0xa8)](![]),process['exit'](-0x1);});const C=yield B[y(0x94)]();if(s!==!![]){const o=(A=C===null||C===void 0x0?void 0x0:C[y(0x88)])!==null&&A!==void 0x0?A:y(0x7a),j=(n=C===null||C===void 0x0?void 0x0:C[y(0xbe)])!==null&&n!==void 0x0?n:-0x1,V=(C===null||C===void 0x0?void 0x0:C['message'])?',\x20details:\x20'+C[y(0xb9)]:'';o===y(0x80)?(0x0,utils_1['success'])(y(0x9c)+j):(0x0,utils_1[y(0x8e)])('Command\x20didn\x27t\x20complete\x20successfully,\x20status:\x20'+o+',\x20exit\x20code:\x20'+j+V);}return C;}finally{process[y(0x79)][y(0x7c)]&&process['stdin']['setRawMode'](![]);}}),this[D(0xcb)]=new js_client_1[(D(0x99))](Z,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[D(0xce)]});const J=new inquirer_helper_1[(D(0xbb))](this[D(0xcb)]);this[D(0xd6)]=(0x0,utils_1[D(0xcc)])()[D(0xca)](D(0xdc))['alias'](D(0xc8))[D(0xaa)](D(0x7d));const z=this[D(0x86)](D(0x75))[D(0x9d)](B=>__awaiter(this,void 0x0,void 0x0,function*(){const l=D,{noDefaults:U,projectId:s,serviceId:A,containerId:n,shellCmd:F,user:C,group:v,command:o,quiet:j}=B;(0x0,utils_1[l(0x97)])(this[l(0xcb)]);try{const V=U?undefined:Z[l(0xc2)](),i=s||V||(yield J[l(0xa0)]()),p=U?undefined:Z[l(0x9a)](),S=A||p||(yield J[l(0xd0)](i)()),g=F!==null&&F!==void 0x0?F:o!==undefined?'none':undefined;this[l(0xd2)]('service',S,i,g,C,v,o,j);const I=process[l(0xb4)][l(0xdd)],m=process['stdout'][l(0xd1)],L={'projectId':i,'serviceId':S},M=yield this['apiClient'][l(0xc8)][l(0x89)](L,{'containerName':n,'command':o,'shell':g,'user':C,'group':v,'ttyColumns':I,'ttyRows':m});yield this['handleShellSession'](M,'service',j);}catch(x){(0x0,utils_1[l(0xb6)])(''+x[l(0xb9)]);}finally{process['exit']();}})),P=this[D(0x86)]('job')['action'](B=>__awaiter(this,void 0x0,void 0x0,function*(){const b=D,{projectId:U,jobId:s,containerId:A,noDefaults:n,shellCmd:F,user:C,group:v,command:o,quiet:j}=B;(0x0,utils_1[b(0x97)])(this['apiClient']);try{const V=n?undefined:Z[b(0xc2)](),i=U||V||(yield J[b(0xa0)]()),p=s||(yield J[b(0x9b)](i)());this['execStartLog'](b(0x72),p,i,F,j);const {rows:S,columns:g}=this[b(0xc5)](),I={'projectId':i,'jobId':p},m=yield this[b(0xcb)][b(0xc8)][b(0xda)](I,{'containerName':A,'command':o,'shell':F,'user':C,'group':v,'ttyColumns':g,'ttyRows':S});yield this[b(0x90)](m,b(0x72),j);}catch(L){(0x0,utils_1[b(0xb6)])(''+L[b(0xb9)]);}finally{process[b(0xdb)]();}}));this[D(0xd6)]['addCommand'](z),this['execCmd'][D(0xd9)](P);}}exports['CliExec']=CliExec;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a5L=a5J;(function(Z,J){const m=a5J,z=Z();while(!![]){try{const P=parseInt(m(0xbc))/0x1*(parseInt(m(0xbe))/0x2)+-parseInt(m(0xb5))/0x3+parseInt(m(0xb6))/0x4*(-parseInt(m(0xb7))/0x5)+-parseInt(m(0xa0))/0x6*(-parseInt(m(0xba))/0x7)+-parseInt(m(0xb1))/0x8+parseInt(m(0xa9))/0x9*(parseInt(m(0xa5))/0xa)+-parseInt(m(0xad))/0xb;if(P===J)break;else z['push'](z['shift']());}catch(B){z['push'](z['shift']());}}}(a5Z,0x5dcdb));var __awaiter=this&&this[a5L(0xa8)]||function(Z,J,z,B){function U(s){return s instanceof z?s:new z(function(A){A(s);});}return new(z||(z=Promise))(function(s,A){function n(v){const M=a5J;try{C(B[M(0xa7)](v));}catch(o){A(o);}}function F(v){const x=a5J;try{C(B[x(0xc5)](v));}catch(o){A(o);}}function C(v){const d=a5J;v[d(0xc3)]?s(v['value']):U(v[d(0xbf)])[d(0xb8)](n,F);}C((B=B['apply'](Z,J||[]))['next']());});},__importDefault=this&&this[a5L(0xaa)]||function(Z){const k=a5L;return Z&&Z[k(0xbd)]?Z:{'default':Z};};Object['defineProperty'](exports,a5L(0xbd),{'value':!![]}),exports['getCommandOverview']=void 0x0;const chalk_1=__importDefault(require(a5L(0xa6))),utils_1=require('../utils');function getCommandOverview(Z){const N=a5L;return(0x0,utils_1[N(0xaf)])()[N(0xae)](N(0xb0))['description'](N(0xa1))['option'](N(0xc2),N(0xa2))[N(0xbb)](J=>__awaiter(this,void 0x0,void 0x0,function*(){const {verbose:z}=J;function P(B,U){const W=a5J;var s;const A=(e,g=!![])=>g?chalk_1[W(0xc0)][W(0xab)]['green'](e[W(0xae)]()):e[W(0xae)](),n=U['length']===0x0,F=B[W(0xa4)];let C='';const v=F[W(0xa3)]===0x0,o=v||((s=Object[W(0xc1)](B===null||B===void 0x0?void 0x0:B[W(0xac)]()))===null||s===void 0x0?void 0x0:s['length'])>0x0;!n&&(C=F&&!v?'┬\x20':'─\x20');const j=z&&o&&B['description']()?':\x20'+B[W(0xb4)]():'';console[W(0xb9)](''+U+C+A(B,o)+j);let V=U;if(!n){const e=U[W(0xc4)](-0x2)==='└─';V=U[W(0xc4)](0x0,-0x2)+(e?'\x20\x20':'│\x20');}const i=V+'├─',p=V+'└─',S=F[W(0xb3)](g=>g[W(0xa4)]['length']===0x0);S&&!v&&!z?console[W(0xb9)](p+'\x20'+F['map'](g=>A(g))[W(0xb2)](',\x20')):F['forEach']((g,I)=>{const X=W;P(g,F[X(0xa3)]-0x1===I?p:i);});}P(Z,'');}));}function a5J(Z,J){const z=a5Z();return a5J=function(P,B){P=P-0xa0;let U=z[P];return U;},a5J(Z,J);}exports['getCommandOverview']=getCommandOverview;function a5Z(){const D=['1973872NKdGrs','join','every','description','925554PcqsXX','4pilRLQ','66335uUxOnN','then','log','7IUhOWP','action','30MMqhxY','__esModule','32542EEOLbj','value','default','keys','--verbose','done','slice','throw','3254226DdJYyg','Prints\x20a\x20tree\x20view\x20of\x20all\x20available\x20commands','Print\x20command\x20descriptions','length','commands','1553280mLVuao','chalk','next','__awaiter','9qfdBTy','__importDefault','bold','opts','2564001lDarsk','name','getCommand','command-overview'];a5Z=function(){return D;};return a5Z();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function a6J(Z,J){const z=a6Z();return a6J=function(P,B){P=P-0x1da;let U=z[P];return U;},a6J(Z,J);}const a6i=a6J;(function(Z,J){const V=a6J,z=Z();while(!![]){try{const P=parseInt(V(0x1fe))/0x1*(-parseInt(V(0x205))/0x2)+-parseInt(V(0x202))/0x3+-parseInt(V(0x216))/0x4+parseInt(V(0x1f4))/0x5*(-parseInt(V(0x210))/0x6)+-parseInt(V(0x1eb))/0x7+-parseInt(V(0x20e))/0x8*(parseInt(V(0x209))/0x9)+parseInt(V(0x208))/0xa*(parseInt(V(0x204))/0xb);if(P===J)break;else z['push'](z['shift']());}catch(B){z['push'](z['shift']());}}}(a6Z,0x273bf));var __createBinding=this&&this[a6i(0x1e0)]||(Object[a6i(0x1fa)]?function(Z,J,z,P){const p=a6i;if(P===undefined)P=z;var B=Object[p(0x1ff)](J,z);(!B||(p(0x1e6)in B?!J[p(0x1ed)]:B['writable']||B[p(0x1fc)]))&&(B={'enumerable':!![],'get':function(){return J[z];}}),Object[p(0x1e5)](Z,P,B);}:function(Z,J,z,P){if(P===undefined)P=z;Z[P]=J[z];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a6i(0x1fa)]?function(Z,J){const S=a6i;Object[S(0x1e5)](Z,S(0x1e9),{'enumerable':!![],'value':J});}:function(Z,J){Z['default']=J;}),__importStar=this&&this[a6i(0x1db)]||function(Z){const e=a6i;if(Z&&Z['__esModule'])return Z;var J={};if(Z!=null){for(var z in Z)if(z!==e(0x1e9)&&Object[e(0x214)][e(0x1dd)]['call'](Z,z))__createBinding(J,Z,z);}return __setModuleDefault(J,Z),J;},__importDefault=this&&this[a6i(0x1e4)]||function(Z){const g=a6i;return Z&&Z[g(0x1ed)]?Z:{'default':Z};};Object['defineProperty'](exports,a6i(0x1ed),{'value':!![]}),exports[a6i(0x217)]=exports['handleFormattedOutput']=exports[a6i(0x1e2)]=exports['handleJsonOutput']=exports[a6i(0x20c)]=exports[a6i(0x1fd)]=void 0x0;const chalk_1=__importDefault(require(a6i(0x203))),_=__importStar(require(a6i(0x218))),util=__importStar(require(a6i(0x206))),yaml=require('js-yaml'),columnify=require(a6i(0x1ea));function printAsTable(Z,J,z,P=![],B=0x0){const I=a6i;!P&&console['log'](''+chalk_1[I(0x1e9)][I(0x215)](J));function U(A){const m=I;return A===m(0x1de)?A:A[m(0x1fb)](m(0x1de),'');}function s(A,n){const M=I;function F(v){const L=a6J,o=new Date(v);return o[L(0x1f3)]()+'/'+o[L(0x20f)]()+'/'+o[L(0x1f9)]()+'\x0a'+o['getHours']()+':'+o[L(0x219)]()+':'+o[L(0x1f7)]();}const C=['createdat','updatedat'];if(C['includes'](n[M(0x1ee)]())&&_[M(0x211)](A)&&A[M(0x1e3)]()[M(0x1f1)]===0xd)return F(Number(A));if(_['isBoolean'](A)){if(n!==M(0x1de)&&n[M(0x213)](M(0x1de)))return A?'x':'✔';return A?'✔':'x';}if(_[M(0x201)](A))return util[M(0x1f6)](A,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});return A;}if(_['isArrayLike'](Z)){Z[I(0x1f1)]===0x0&&console[I(0x207)]('No\x20'+J[I(0x1ee)]()+I(0x1f5));const A=Z[I(0x1ef)]((C,v)=>{const x=I,o={'i':v+B};return Object['keys'](C)[x(0x1f0)](j=>{const d=x;(_['isUndefined'](z)||z[d(0x213)](j[d(0x1ee)]()))&&_[d(0x1e8)](o,U(j),s(C[j],j));}),o;}),n=_['clone'](Object[I(0x20b)]((A===null||A===void 0x0?void 0x0:A[0x0])||[]))[I(0x1f2)]((C,v)=>{const k=I,o=j=>j!=='i'?j!==k(0x20a)?0x0:0x1:0x2;return o(v)-o(C);}),F={'maxWidth':0x1e,'preserveNewLines':!![],'showHeaders':!P,'config':{'_id':{'maxWidth':0x5,'truncate':!![]},'i':{'showHeaders':![]}},'columns':n};console[I(0x207)](columnify(A,F));}else console[I(0x207)](Z);}exports[a6i(0x1fd)]=printAsTable;function consoleFormat(Z,J){const N=a6i;if(_[N(0x20d)](Z)){const z=J?N(0x1e7)+J+')':'';return chalk_1[N(0x1e9)][N(0x1dc)](N(0x200))+z;}if(!_[N(0x201)](Z))return Z===null||Z===void 0x0?void 0x0:Z[N(0x1e3)]();return util[N(0x1f6)](Z,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});}exports['consoleFormat']=consoleFormat;const handleJsonOutput=(Z,J)=>{const W=a6i,z=Z===W(0x1e1);if(z)console[W(0x207)](JSON['stringify'](J,null,'\x20'));};function a6Z(){const y=['hasOwnProperty','disabled','handleFormattedOutput','__createBinding','json','handleYamlOutput','toString','__importDefault','defineProperty','get','\x20(HTTP\x20status:\x20','set','default','columnify','1574601ywyMuM','yaml','__esModule','toLowerCase','map','forEach','length','sort','getDate','605ShWIzn','\x20found','inspect','getSeconds','handleJsonOutput','getFullYear','create','replace','configurable','printAsTable','2SURclH','getOwnPropertyDescriptor','The\x20request\x20was\x20completed\x20successfully','isObjectLike','32064NwZCGL','chalk','121FtVpNj','111394VBjNQp','util','log','944200OwtfjF','27GRlcsD','internalId','keys','consoleFormat','isEmpty','808264LcuBgv','getMonth','10866FrFOKW','isFinite','format','includes','prototype','bold','34648Vtgbib','printResponse','lodash','getMinutes','safeDump','__importStar','green'];a6Z=function(){return y;};return a6Z();}exports['handleJsonOutput']=handleJsonOutput;const handleYamlOutput=(Z,J)=>{const X=a6i,z=Z===X(0x1ec)||Z==='yml';if(z)console[X(0x207)](yaml[X(0x1da)](J));};exports[a6i(0x1e2)]=handleYamlOutput;const handleFormattedOutput=(Z,J)=>{const D=a6i,z=Z===D(0x212);if(z)console[D(0x207)](consoleFormat(J));};exports[a6i(0x1df)]=handleFormattedOutput;const printResponse=(Z,J)=>{const q=a6i;(0x0,exports[q(0x1f8)])(Z,J),(0x0,exports[q(0x1e2)])(Z,J),(0x0,exports[q(0x1df)])(Z,J);};exports[a6i(0x217)]=printResponse;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a7Y=a7J;(function(Z,J){const H=a7J,z=Z();while(!![]){try{const P=-parseInt(H(0x193))/0x1+-parseInt(H(0x1a8))/0x2+-parseInt(H(0x1af))/0x3+parseInt(H(0x18f))/0x4*(parseInt(H(0x195))/0x5)+parseInt(H(0x1b5))/0x6+-parseInt(H(0x1b2))/0x7*(-parseInt(H(0x1a1))/0x8)+-parseInt(H(0x19e))/0x9;if(P===J)break;else z['push'](z['shift']());}catch(B){z['push'](z['shift']());}}}(a7Z,0x7c76a));function a7J(Z,J){const z=a7Z();return a7J=function(P,B){P=P-0x18f;let U=z[P];return U;},a7J(Z,J);}var __importDefault=this&&this[a7Y(0x1b6)]||function(Z){return Z&&Z['__esModule']?Z:{'default':Z};};Object['defineProperty'](exports,a7Y(0x190),{'value':!![]}),exports[a7Y(0x19f)]=exports['getAsciiChart']=void 0x0;function a7Z(){const Z4=['toLocaleTimeString','27212ZogikS','__esModule','padding','getAsciiChart','234122iAMFQn','round','365vtyDVE','default','symbols','undefined','repeat','red','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','slice','height','462294GpIDBF','downSampleData','grey','1240cGJYBI','2-digit','\x20\x20\x20','colors','abs','push','offset','338000njxSsu','toLocaleDateString','max','unit','green','floor','map','1257426XZdgnd','join','toFixed','4417WEWxUj','length','min','4734048lNVliQ','__importDefault'];a7Z=function(){return Z4;};return a7Z();}const chalk_1=__importDefault(require('chalk')),colored=(Z,J)=>{const E=a7Y;return J===undefined?Z:chalk_1[E(0x196)][J](Z);},getAsciiChart=(Z,J={})=>{const Z0=a7Y,z=Array['isArray'](Z[0x0])?Z:[Z];let P=typeof J['min']!==Z0(0x198)?J[Z0(0x1b4)]:z[0x0][0x0],B=typeof J[Z0(0x1aa)]!==Z0(0x198)?J['max']:z[0x0][0x0];for(let M=0x0;M<z[Z0(0x1b3)];M++){for(let d=0x0;d<z[M]['length'];d++){P=Math[Z0(0x1b4)](P,z[M][d]),B=Math[Z0(0x1aa)](B,z[M][d]);}}let U=['┼','┤','╶','╴','─','╰','╭','╮','╯','│'],s=Math[Z0(0x1a5)](B-P),A=typeof J[Z0(0x1a7)]!==Z0(0x198)?J[Z0(0x1a7)]:0x3,n=typeof J[Z0(0x191)]!=='undefined'?J[Z0(0x191)]:Z0(0x19b),F=typeof J['height']!=='undefined'?J[Z0(0x19d)]:s,C=typeof J['colors']!==Z0(0x198)?J[Z0(0x1a4)]:['blue',Z0(0x19a),Z0(0x1ac),Z0(0x1a0),'black'],v=s!==0x0?F/s:0x1,o=Math[Z0(0x194)](P*v),V=Math['round'](B*v),p=Math[Z0(0x1a5)](V-o),S=0x0;for(let k=0x0;k<z['length'];k++){S=Math[Z0(0x1aa)](S,z[k][Z0(0x1b3)]);}S=S+A;let e=typeof J['symbols']!==Z0(0x198)?J[Z0(0x197)]:U,g=J['format']!==undefined?J['format']:function(N){const Z1=Z0;return(n+N[Z1(0x1b1)](0x2)+J[Z1(0x1ab)])[Z1(0x19c)](-n[Z1(0x1b3)]);},I=new Array(p+0x1);for(let N=0x0;N<=p;N++){I[N]=new Array(S);for(let W=0x0;W<S;W++){I[N][W]='\x20';}}for(let X=o;X<=V;++X){const D=g(p>0x0?B-(X-o)*s/p:X,X-o);I[X-o][Math[Z0(0x1aa)](A-D[Z0(0x1b3)],0x0)]=D,I[X-o][A-0x1]=X==0x0?e[0x0]:e[0x1];}for(let q=0x0;q<z[Z0(0x1b3)];q++){let O=C[q%C[Z0(0x1b3)]],G=Math['round'](z[q][0x0]*v)-o;I[p-G][A-0x1]=colored(e[0x0],O);for(let K=0x0;K<z[q][Z0(0x1b3)]-0x1;K++){let l=Math[Z0(0x194)](z[q][K+0x0]*v)-o,b=Math[Z0(0x194)](z[q][K+0x1]*v)-o;if(l==b)I[p-l][K+A]=colored(e[0x4],O);else{I[p-b][K+A]=colored(l>b?e[0x5]:e[0x6],O),I[p-l][K+A]=colored(l>b?e[0x7]:e[0x8],O);let f=Math[Z0(0x1b4)](l,b),r=Math[Z0(0x1aa)](l,b);for(let w=f+0x1;w<r;w++){I[p-w][K+A]=colored(e[0x9],O);}}}}const {startTs:m,endTs:L}=J;if(m||L){const Q=h=>{const Z2=Z0;if(!h)return Z2(0x1a3);const a=h[Z2(0x1a9)](undefined,{'day':Z2(0x1a2),'month':Z2(0x1a2),'year':Z2(0x1a2)}),u=h[Z2(0x1b7)](undefined,{'hourCycle':'h24'});return a+'\x20'+u;},T=Q(L),c=Q(m),t=n['slice'](0x0,Math[Z0(0x1aa)](0x2,n['length']-c[Z0(0x1b3)]/0x2+0x1)),R='\x20'[Z0(0x199)](Math[Z0(0x1aa)](S-(n[Z0(0x1b3)]+T[Z0(0x1b3)]/0x2),0x1));I[Z0(0x1a6)]([''+t+c+R+T]),I[Z0(0x1a6)]([]);}return I[Z0(0x1ae)](h=>h['join'](''))[Z0(0x1b0)]('\x0a');};exports[a7Y(0x192)]=getAsciiChart;const downSampleData=(Z,J)=>{const Z3=a7Y,z=Z[Z3(0x1b3)];if(J>=z||J===0x0)return Z;const P=[];let B=0x0;const U=(z-0x2)/(J-0x2);let s=0x0,A,n,F,C;P[B++]=Z[s];for(var v=0x0;v<J-0x2;v++){let e=0x0,g=0x0,I=Math[Z3(0x1ad)]((v+0x1)*U)+0x1,m=Math[Z3(0x1ad)]((v+0x2)*U)+0x1;m=m<z?m:z;var o=m-I;for(;I<m;I++){e+=Z[I][0x0],g+=Z[I][0x1];}e/=o,g/=o;var j=Math['floor'](v*U)+0x1,V=Math[Z3(0x1ad)]((v+0x1)*U)+0x1,p=Z[s][0x0],S=Z[s][0x1];n=F=-0x1;for(;j<V;j++){F=Math[Z3(0x1a5)]((p-e)*(Z[j][0x1]-S)-(p-Z[j][0x0])*(g-S))*0.5,F>n&&(n=F,A=Z[j],C=j);}P[B++]=A,s=C;}return P[B++]=Z[z-0x1],P;};exports[a7Y(0x19f)]=downSampleData;
|
package/dist/inquirer-helper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a8b=a8I;(function(V,I){const T=a8I,v=V();while(!![]){try{const j=-parseInt(T(0x1f1))/0x1*(parseInt(T(0x221))/0x2)+parseInt(T(0x1be))/0x3+-parseInt(T(0x1de))/0x4+parseInt(T(0x1d2))/0x5*(-parseInt(T(0x212))/0x6)+parseInt(T(0x21a))/0x7*(parseInt(T(0x1ce))/0x8)+-parseInt(T(0x1d9))/0x9*(parseInt(T(0x274))/0xa)+-parseInt(T(0x22a))/0xb*(-parseInt(T(0x18e))/0xc);if(j===I)break;else v['push'](v['shift']());}catch(U){v['push'](v['shift']());}}}(a8V,0xdd59f));var __createBinding=this&&this[a8b(0x1e9)]||(Object[a8b(0x1dc)]?function(V,I,v,j){const M=a8b;if(j===undefined)j=v;var U=Object[M(0x20f)](I,v);(!U||('get'in U?!I[M(0x1ad)]:U[M(0x1a7)]||U[M(0x288)]))&&(U={'enumerable':!![],'get':function(){return I[v];}}),Object['defineProperty'](V,j,U);}:function(V,I,v,j){if(j===undefined)j=v;V[j]=I[v];}),__setModuleDefault=this&&this[a8b(0x284)]||(Object[a8b(0x1dc)]?function(V,I){Object['defineProperty'](V,'default',{'enumerable':!![],'value':I});}:function(V,I){V['default']=I;}),__importStar=this&&this[a8b(0x24e)]||function(V){const X=a8b;if(V&&V['__esModule'])return V;var I={};if(V!=null){for(var v in V)if(v!==X(0x1c3)&&Object['prototype'][X(0x266)][X(0x20d)](V,v))__createBinding(I,V,v);}return __setModuleDefault(I,V),I;},__awaiter=this&&this[a8b(0x1f7)]||function(V,I,v,j){function U(l){return l instanceof v?l:new v(function(x){x(l);});}return new(v||(v=Promise))(function(l,x){const G=a8I;function N(z){const E=a8I;try{D(j[E(0x1fe)](z));}catch(B){x(B);}}function e(z){try{D(j['throw'](z));}catch(B){x(B);}}function D(z){const f=a8I;z[f(0x1d1)]?l(z[f(0x27a)]):U(z[f(0x27a)])[f(0x1db)](N,e);}D((j=j[G(0x1c7)](V,I||[]))[G(0x1fe)]());});},__importDefault=this&&this[a8b(0x202)]||function(V){const P=a8b;return V&&V[P(0x1ad)]?V:{'default':V};};Object[a8b(0x22e)](exports,a8b(0x1ad),{'value':!![]}),exports['InquirerHelper']=void 0x0;const _=__importStar(require(a8b(0x22b))),chalk_1=__importDefault(require(a8b(0x25a))),fs=__importStar(require('fs')),utils_1=require(a8b(0x239)),api_helpers_1=require('./api-helpers'),inquirer_pagination_prompt_1=require(a8b(0x1c9)),inquirer=require(a8b(0x1a4)),inquirerSearchList=require(a8b(0x1ff)),yaml=require('js-yaml');var ConfirmChoices;(function(V){const a=a8b;V[a(0x1e2)]='Yes,\x20send',V[a(0x26b)]=a(0x1fb),V['EDIT']=a(0x1c4),V[a(0x1f5)]='No,\x20but\x20save\x20as\x20file',V['ABORT']=a(0x23b);}(ConfirmChoices||(ConfirmChoices={})));class InquirerHelper{constructor(V){const s=a8b;this[s(0x236)]=V,this['defaultPaginationPageSize']=0x32,this['editPayload']=I=>__awaiter(this,void 0x0,void 0x0,function*(){const d=s,{editedResult:v}=yield inquirer[d(0x265)]([{'type':d(0x201),'name':d(0x22f),'message':d(0x206),'default':yaml[d(0x197)](I)}]);return yaml[d(0x207)](v);}),this[s(0x21f)]=I=>__awaiter(this,void 0x0,void 0x0,function*(){const R=s,v=x=>'Unexpected\x20file\x20type:\x20'+x+',\x20supported\x20types:\x20[json|yaml|yml]';function j(){return __awaiter(this,void 0x0,void 0x0,function*(){const t=a8I;return inquirer[t(0x265)]([{'type':t(0x20b),'name':t(0x1af),'message':'Provide\x20a\x20file\x20path\x20to\x20write\x20the\x20configuration\x20to\x20(<name>.[json|yaml|yml])','validate':x=>new RegExp('.*\x5c.(json|yaml|yml)$')['test'](x)?!![]:v(x)}]);});}const {fileName:U}=yield j(),l=U[R(0x23f)]()[R(0x28d)]('.')[R(0x18d)]();try{switch(l){case R(0x18c):(0x0,utils_1[R(0x1d7)])(R(0x1d4)+U);return fs[R(0x285)](U,JSON[R(0x226)](I,null,'\x20\x20'));case'yaml':case R(0x278):(0x0,utils_1[R(0x1d7)])('Configuration\x20file\x20written\x20to\x20'+U);return fs[R(0x285)](U,yaml[R(0x197)](I));default:(0x0,utils_1[R(0x1e8)])(v(l));}}catch(x){(0x0,utils_1[R(0x1e8)])(R(0x1b0)+x['message']);}return undefined;}),this[s(0x1eb)]=(I,v)=>j=>{const u=s,U=typeof j===u(0x21b)?j['trim']():j;return v===![]&&U===u(0x1ea)?'':U;},this[s(0x28e)]=(I,v,j)=>U=>{const n=s;if(this['skipValidation']===!![])return!![];const l=[];if(U===''||U==='don\x27t\x20change'){if(v!==![])l['push'](n(0x1b6));else return!![];}I['type']===n(0x21b)&&!_[n(0x1ed)](I[n(0x1ef)])&&l[n(0x218)](new RegExp(I[n(0x1ef)])['test'](U)?!![]:n(0x1b2)+I[n(0x1ef)]+'\x27');I['type']===n(0x21b)&&!_['isUndefined'](I[n(0x19f)])&&l['push'](U[n(0x257)]>=I[n(0x19f)]?!![]:'must\x20be\x20longer\x20than\x20or\x20equal\x20to\x20'+I['minLength']+n(0x259)+U[n(0x257)]+'\x20characters');I['type']===n(0x21b)&&!_['isUndefined'](I[n(0x1cb)])&&l[n(0x218)](U[n(0x257)]<=I[n(0x1cb)]?!![]:'must\x20be\x20shorter\x20than\x20or\x20equal\x20to\x20'+I['maxLength']+n(0x259)+U[n(0x257)]+n(0x1df));j&&Number[n(0x1d6)](parseInt(U,0xa))&&l[n(0x218)]('must\x20be\x20a\x20number,\x20is\x20'+U);I[n(0x25d)]===n(0x281)&&!_[n(0x1ed)](I['minimum'])&&l[n(0x218)](U>=I[n(0x1c1)]?!![]:n(0x262)+I[n(0x1c1)]);I[n(0x25d)]===n(0x281)&&!_[n(0x1ed)](I[n(0x1cf)])&&l[n(0x218)](U<=I[n(0x1cf)]?!![]:n(0x25f)+I[n(0x1cf)]);if(I[n(0x25d)]==='rawObject'){const e=(0x0,utils_1[n(0x19d)])(U);l[n(0x218)](e===![]||_[n(0x1f6)](e)?n(0x233):!![]);}const x=l[n(0x1eb)](D=>D!==!![]),N=(I===null||I===void 0x0?void 0x0:I['example'])?'\x0a'+chalk_1[n(0x1c3)][n(0x251)]('>>')+n(0x1d5)+chalk_1['default'][n(0x1d8)](JSON[n(0x226)](I[n(0x27f)])):'';return x[n(0x257)]>0x0?x[n(0x227)](chalk_1[n(0x1c3)][n(0x275)](n(0x219)))+N:!![];},this[s(0x1ca)]=(I,v,j)=>{const q=s,U=I[I[q(0x257)]-0x1];function l(){const J=q;return I[J(0x20a)](0x0,-0x1)[J(0x1e5)](e=>e['charAt'](0x0)[J(0x19e)]()+e['slice'](0x1))['join']('>');}const x=I[q(0x257)]>0x1?chalk_1['default']['bgGrey'][q(0x1d8)](l())+':\x20':'',N=j?'\x20('+chalk_1[q(0x1c3)]['blue'](j)+')':'';return chalk_1[q(0x1c3)][q(0x246)](''+x+v+'\x20'+chalk_1['default'][q(0x240)][q(0x21c)](U)+N+'?');},this[s(0x1fd)]=(I,v,j)=>__awaiter(this,void 0x0,void 0x0,function*(){const L=s;if(v[L(0x257)]<0x1){const x=j?L(0x217)+j:L(0x271);throw new Error(L(0x25c)+I+'\x20'+x+'.');}const U=L(0x1ac)+I+L(0x283),l=v[L(0x257)]>0x4?L(0x1ae):L(0x232);return(yield inquirer[L(0x265)]([{'type':l,'name':L(0x1f8),'message':U,'choices':v}]))[L(0x1f8)];}),this[s(0x1f4)]=(I,v,j)=>__awaiter(this,void 0x0,void 0x0,function*(){const Z=s,{elements:U,nextCursor:l}=yield v();if(U['length']<0x1){const e=j?Z(0x217)+j:Z(0x271);throw new Error(Z(0x25c)+I+'\x20'+e+'.');}const x=Z(0x1ac)+I+Z(0x283);if(l!==undefined){const D=({nextPageCursor:z})=>__awaiter(this,void 0x0,void 0x0,function*(){const S=Z,B=yield v(z);return{'elements':B[S(0x28c)],'nextPageCursor':B[S(0x268)]};});return(yield inquirer[Z(0x265)]([{'type':Z(0x24a),'name':Z(0x1f8),'message':x,'choices':U,'nextPageCursor':l,'loadMore':D}]))[Z(0x1f8)];}const N=U[Z(0x257)]>0x4?'search-list':Z(0x232);return(yield inquirer['prompt']([{'type':N,'name':Z(0x1f8),'message':x,'choices':U}]))[Z(0x1f8)];}),this[s(0x26f)]=(I,v)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const h=s,j=''+(v?'('+chalk_1['default'][h(0x270)](v)+')\x20':''),U='Enter\x20the\x20'+chalk_1[h(0x1c3)]['green'](I)+'\x20'+j+h(0x19a),l=this['validate']({'type':h(0x21b),'required':!![]});return(yield inquirer[h(0x265)]([{'type':h(0x20b),'name':h(0x1f8),'message':U,'validate':l}]))['name'];}),this['askConfirm']=I=>__awaiter(this,void 0x0,void 0x0,function*(){const Q=s;return(yield inquirer[Q(0x265)]([{'type':'confirm','name':'name','message':I,'default':!![]}]))[Q(0x1f8)];}),this[s(0x214)]=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const W=s,v=j=>U=>__awaiter(this,void 0x0,void 0x0,function*(){const F=a8I;var l;const x=yield this[F(0x236)][F(0x232)][F(0x258)]({'parameters':{'projectId':j},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':U}}),N=x[F(0x1cc)][F(0x258)]['map'](e=>e['id']);return{'elements':N,'nextCursor':(l=x['pagination'])===null||l===void 0x0?void 0x0:l['cursor']};});return this['askForProjectScopedResourcePaginated'](W(0x198),v,I);}),this[s(0x27d)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const p=s,I=v=>__awaiter(this,void 0x0,void 0x0,function*(){const y=a8I;var j;const U=yield this[y(0x236)]['list'][y(0x18b)]({'options':{'per_page':this[y(0x26a)],'cursor':v}}),l=U['data'][y(0x18b)]['map'](x=>x['id']);return{'elements':l,'nextCursor':(j=U[y(0x1ab)])===null||j===void 0x0?void 0x0:j[y(0x286)]};});return this[p(0x1f4)](p(0x277),I);}),this[s(0x24d)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const K=s,I=v=>__awaiter(this,void 0x0,void 0x0,function*(){const g=a8I;var j,U,l;const x=yield this['apiClient'][g(0x232)]['tags']({'options':{'per_page':this['defaultPaginationPageSize'],'cursor':v}}),N=(U=(j=x[g(0x1cc)][g(0x1cd)])===null||j===void 0x0?void 0x0:j['map'](e=>e['id']))!==null&&U!==void 0x0?U:[];return{'elements':N,'nextCursor':(l=x['pagination'])===null||l===void 0x0?void 0x0:l[g(0x286)]};});return this[K(0x1f4)](K(0x1d3),I);}),this[s(0x260)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const k=s,I=v=>__awaiter(this,void 0x0,void 0x0,function*(){const C=a8I;var j,U,l;const x=yield this['apiClient'][C(0x232)]['cloud'][C(0x25e)]({'options':{'per_page':this[C(0x26a)],'cursor':v}}),N=(U=(j=x[C(0x1cc)][C(0x25e)])===null||j===void 0x0?void 0x0:j['map'](e=>e[C(0x1f8)]))!==null&&U!==void 0x0?U:[];return{'elements':N,'nextCursor':(l=x['pagination'])===null||l===void 0x0?void 0x0:l['cursor']};});return this[k(0x1f4)]('cluster\x20id',I);}),this['askForTemplateRun']=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const O=s;if(_[O(0x1ed)](I))throw new Error(O(0x1c2));const v=j=>__awaiter(this,void 0x0,void 0x0,function*(){const w=O;var U;let l=this[w(0x26a)];const x=yield this['apiClient'][w(0x232)]['templateRuns']({'parameters':{'templateId':I},'options':{'per_page':l,'cursor':j}}),N=x[w(0x1cc)][w(0x1a0)][w(0x1e5)](e=>e['id']+w(0x252)+e['createdAt']+')');return{'elements':N,'nextCursor':(U=x[w(0x1ab)])===null||U===void 0x0?void 0x0:U[w(0x286)]};});return this[O(0x1f4)](O(0x272),v)[O(0x1db)](U=>U[O(0x28d)]('\x20')[0x0]);}),this[s(0x263)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const m=s,I=v=>__awaiter(this,void 0x0,void 0x0,function*(){const A=a8I;var j;let U=this['defaultPaginationPageSize'];const l=yield this[A(0x236)][A(0x232)][A(0x235)]({'options':{'per_page':U,'cursor':v}}),x=l[A(0x1cc)]['logSinks']['map'](N=>N['id']);return{'elements':x,'nextCursor':(j=l[A(0x1ab)])===null||j===void 0x0?void 0x0:j[A(0x286)]};});return this[m(0x1f4)](m(0x1f3),I);}),this['askForPipeline']=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const V0=s,v=j=>U=>__awaiter(this,void 0x0,void 0x0,function*(){const r=a8I;var l;const x=yield this['apiClient'][r(0x232)][r(0x208)]({'parameters':{'projectId':j},'options':{'per_page':this[r(0x26a)],'cursor':U}}),N=x[r(0x1cc)][r(0x208)][r(0x1e5)](e=>e['id']);return{'elements':N,'nextCursor':(l=x[r(0x1ab)])===null||l===void 0x0?void 0x0:l['cursor']};});return this[V0(0x1bb)]('pipeline',v,I);}),this[s(0x26d)]=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const V2=s,v=j=>U=>__awaiter(this,void 0x0,void 0x0,function*(){const V1=a8I;var l;const x=yield this[V1(0x236)][V1(0x232)][V1(0x264)]({'parameters':{'projectId':j},'options':{'per_page':this[V1(0x26a)],'cursor':U}}),N=x[V1(0x1cc)]['jobs'][V1(0x1e5)](e=>e['id']);return{'elements':N,'nextCursor':(l=x[V1(0x1ab)])===null||l===void 0x0?void 0x0:l[V1(0x286)]};});return this[V2(0x1bb)]('job',v,I);}),this['askForJobRun']=(I,v,j=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const V4=s,U='all-job-runs',l=x=>N=>__awaiter(this,void 0x0,void 0x0,function*(){const V3=a8I;var e;const D=yield this[V3(0x236)][V3(0x26e)][V3(0x229)][V3(0x28f)]({'parameters':{'projectId':x,'jobId':I},'options':{'per_page':this[V3(0x26a)],'cursor':N}}),z=D[V3(0x1cc)][V3(0x28f)][V3(0x1e5)](B=>B['id']+V3(0x252)+B['startedAt']+')');return j&&z[V3(0x23e)](U),{'elements':z,'nextCursor':(e=D['pagination'])===null||e===void 0x0?void 0x0:e['cursor']};});return this[V4(0x1bb)](V4(0x192),l,v,V4(0x1c0)+I+'\x27')[V4(0x1db)](x=>{const V5=V4,N=x[V5(0x28d)]('\x20')[0x0];if(N===U)return undefined;return N;});}),this[s(0x289)]=(I,v,j,U=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const V6=s,l=V6(0x279);if(j!==undefined){const x=N=>e=>__awaiter(this,void 0x0,void 0x0,function*(){const V7=V6;var D;const z=yield this[V7(0x236)][V7(0x26e)]['job'][V7(0x1e7)]({'parameters':{'projectId':N,'jobId':j},'options':{'per_page':this[V7(0x26a)],'cursor':e}}),B=z[V7(0x1cc)][V7(0x1e7)][V7(0x1e5)](Y=>Y['id']+'\x20(startedAt:\x20'+Y[V7(0x1a8)]+')');return U&&B[V7(0x23e)](l),{'elements':B,'nextCursor':(D=z['pagination'])===null||D===void 0x0?void 0x0:D[V7(0x286)]};});return this['askForProjectScopedResourcePaginated']('job\x20builds',x,I,'job:\x20\x27'+j+'\x27')[V6(0x1db)](N=>{const V8=V6,e=N[V8(0x28d)]('\x20')[0x0];if(e===l)return undefined;return e;});}if(v!==undefined){const N=e=>D=>__awaiter(this,void 0x0,void 0x0,function*(){const V9=V6;var z;const B=yield this[V9(0x236)][V9(0x26e)][V9(0x198)][V9(0x1e7)]({'parameters':{'projectId':e,'serviceId':v},'options':{'per_page':this[V9(0x26a)],'cursor':D}}),Y=B['data'][V9(0x1e7)][V9(0x1e5)](i=>i['id']+V9(0x252)+i[V9(0x1a8)]+')');if(U)Y['unshift'](l);return{'elements':Y,'nextCursor':(z=B[V9(0x1ab)])===null||z===void 0x0?void 0x0:z[V9(0x286)]};});return this[V6(0x1bb)]('service\x20build',N,I,'service:\x20\x27'+j+'\x27')[V6(0x1db)](e=>{const VV=V6,D=e[VV(0x28d)]('\x20')[0x0];if(D===l)return undefined;return D;});}throw new Error(V6(0x19c));}),this['askForContainer']=(I,v,j,U=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const VI=s,l=VI(0x1e0);if(j!==undefined){const x=N=>e=>__awaiter(this,void 0x0,void 0x0,function*(){const Vv=VI;var D,z;const B=yield this['apiClient']['get']['job'][Vv(0x1bd)]({'parameters':{'projectId':N,'jobId':j},'options':{'per_page':this[Vv(0x26a)],'cursor':e}}),Y=(D=B[Vv(0x1cc)][Vv(0x1bd)])!==null&&D!==void 0x0?D:[],i=Y===null||Y===void 0x0?void 0x0:Y[Vv(0x1e5)](o=>o[Vv(0x1f8)]+Vv(0x252)+o[Vv(0x1a8)]+')');return U&&i['unshift'](l),{'elements':i,'nextCursor':(z=B['pagination'])===null||z===void 0x0?void 0x0:z[Vv(0x286)]};});return this['askForProjectScopedResourcePaginated'](VI(0x24b),x,I,'job:\x20\x27'+j+'\x27')[VI(0x1db)](N=>{const Vj=VI,e=N[Vj(0x28d)]('\x20')[0x0];if(e===l)return undefined;return e;});}if(v!==undefined){const N=e=>D=>__awaiter(this,void 0x0,void 0x0,function*(){const VU=VI;var z,B;const Y=yield this[VU(0x236)][VU(0x26e)][VU(0x198)][VU(0x1bd)]({'parameters':{'projectId':e,'serviceId':v},'options':{'per_page':this[VU(0x26a)],'cursor':D}}),i=(z=Y['data'][VU(0x1bd)])!==null&&z!==void 0x0?z:[],o=i[VU(0x1e5)](H=>H['name']+VU(0x252)+H[VU(0x1a8)]+')');if(U)o===null||o===void 0x0?void 0x0:o[VU(0x23e)](l);return{'elements':o,'nextCursor':(B=Y['pagination'])===null||B===void 0x0?void 0x0:B[VU(0x286)]};});return this[VI(0x1bb)]('service\x20containers',N,I,VI(0x282)+j+'\x27')[VI(0x1db)](e=>{const Vl=VI,D=e[Vl(0x28d)]('\x20')[0x0];if(D===l)return undefined;return D;});}throw new Error(VI(0x211));}),this[s(0x28b)]=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const VN=s,v=j=>U=>__awaiter(this,void 0x0,void 0x0,function*(){const Vx=a8I;var l;const x=yield this['apiClient'][Vx(0x232)][Vx(0x28a)]({'parameters':{'projectId':j},'options':{'per_page':this[Vx(0x26a)],'cursor':U}});return{'elements':x['data'][Vx(0x28a)]['map'](N=>N['id']),'nextCursor':(l=x[Vx(0x1ab)])===null||l===void 0x0?void 0x0:l[Vx(0x286)]};});return this[VN(0x1bb)](VN(0x243),v,I);}),this[s(0x1e1)]=(I,v)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const VD=s,j=U=>l=>__awaiter(this,void 0x0,void 0x0,function*(){const Ve=a8I;var x;const N=yield this['apiClient'][Ve(0x26e)][Ve(0x243)][Ve(0x242)]({'parameters':{'projectId':U,'addonId':v},'options':{'per_page':this[Ve(0x26a)],'cursor':l}});return{'elements':N['data'][Ve(0x242)]['map'](e=>e['id']+Ve(0x1bc)+(e[Ve(0x256)]||Ve(0x1e4))+')'),'nextCursor':(x=N[Ve(0x1ab)])===null||x===void 0x0?void 0x0:x['cursor']};});return this[VD(0x1bb)](VD(0x242),j,I,VD(0x21d)+v+'\x27')[VD(0x1db)](U=>U[VD(0x28d)]('\x20')[0x0]);}),this['askForAddonRestore']=(I,v,j)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const VB=s,U=l=>x=>__awaiter(this,void 0x0,void 0x0,function*(){const Vz=a8I;var N;const e=yield this[Vz(0x236)][Vz(0x26e)]['addon'][Vz(0x225)]({'parameters':{'projectId':l,'addonId':v,'backupId':j},'options':{'per_page':this[Vz(0x26a)],'cursor':x}});return{'elements':e['data'][Vz(0x225)][Vz(0x1e5)](D=>D['id']+Vz(0x1bc)+(D['completedAt']||Vz(0x1e4))+')'),'nextCursor':(N=e['pagination'])===null||N===void 0x0?void 0x0:N[Vz(0x286)]};});return this[VB(0x1bb)](VB(0x19b),U,I,VB(0x21d)+v+'\x27')[VB(0x1db)](l=>l['split']('\x20')[0x0]);}),this['askForVolume']=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Vi=s,v=j=>__awaiter(this,void 0x0,void 0x0,function*(){const VY=a8I;return(yield this['apiClient'][VY(0x232)][VY(0x247)]({'parameters':{'projectId':j}}))['data'][VY(0x1e5)](U=>U['id']);});return this[Vi(0x27b)]('volume',v,I);}),this[s(0x205)]=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const VH=s,v=j=>U=>__awaiter(this,void 0x0,void 0x0,function*(){const Vo=a8I;var l;const x=yield this['apiClient'][Vo(0x232)][Vo(0x21e)]({'parameters':{'projectId':j},'options':{'per_page':this[Vo(0x26a)],'cursor':U}});return{'elements':x[Vo(0x1cc)]['secrets'][Vo(0x1e5)](N=>N['id']),'nextCursor':(l=x[Vo(0x1ab)])===null||l===void 0x0?void 0x0:l[Vo(0x286)]};});return this[VH(0x1bb)](VH(0x23c),v,I);}),this[s(0x280)]=I=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const VT=s,v=yield this[VT(0x236)][VT(0x26e)][VT(0x1a6)]({'parameters':{'domain':I}}),j=v[VT(0x1cc)]['subdomains'][VT(0x1e5)](l=>l[VT(0x1f8)]+VT(0x1a9)+l[VT(0x222)]+')'),U='domain\x20('+I+')';return this[VT(0x1fd)]('subdomain',j,U)[VT(0x1db)](l=>l[VT(0x28d)]('\x20')[0x0]);}),this['askForSubdomainPath']=(I,v)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Vb=s,j=yield this[Vb(0x236)][Vb(0x232)]['subdomain']['path']({'parameters':{'domain':I,'subdomain':v}}),U=j[Vb(0x1cc)]['paths'][Vb(0x1e5)](x=>''+x[Vb(0x220)]),l=Vb(0x1c5)+I+Vb(0x253)+v+')';return this[Vb(0x1fd)](Vb(0x1ee),U,l);}),this['deleteWarningPrompt']=I=>__awaiter(this,void 0x0,void 0x0,function*(){const VM=s;return(yield inquirer[VM(0x265)]([{'type':VM(0x250),'name':VM(0x261),'message':chalk_1[VM(0x1c3)][VM(0x1ec)](VM(0x193)+(I||VM(0x1f9))+'.\x20This\x20is\x20irreversible.\x20Please\x20confirm!'),'default':![]}]))[VM(0x261)];}),this[s(0x1b8)]=(I,v)=>__awaiter(this,void 0x0,void 0x0,function*(){const VX=s;_[VX(0x1ed)](I[VX(0x1f8)])&&(v['length']<=0x0?_[VX(0x1b1)](I,VX(0x1f8),VX(0x1c3)):yield(0x0,utils_1[VX(0x244)])(0xa)(()=>__awaiter(this,void 0x0,void 0x0,function*(){const VE=VX,{name:j}=yield inquirer['prompt']([{'type':VE(0x20b),'name':VE(0x1f8),'message':VE(0x1f2),'default':'main-context'}]);if(!I[VE(0x1bf)]&&v['find'](U=>U[VE(0x1f8)]===j)){const {c:U}=yield inquirer[VE(0x265)]([{'type':'confirm','name':'c','message':VE(0x237)+j+'\x27\x20already\x20exists.\x20Do\x20you\x20want\x20to\x20override\x20this\x20context\x20(y)\x20or\x20enter\x20a\x20new\x20name\x20(N)?','default':![]}]);if(U===![])throw new Error('Context\x20name\x20already\x20exists.');_[VE(0x1b1)](I,VE(0x1bf),!![]);}_['set'](I,VE(0x1f8),j);})));if(_[VX(0x1ed)](I[VX(0x196)])){const j=yield this[VX(0x24c)]();_[VX(0x1b1)](I,VX(0x196),j);}return I;}),this['tokenPrompt']=()=>__awaiter(this,void 0x0,void 0x0,function*(){const Vf=s,{token:I}=yield inquirer[Vf(0x265)]([{'type':Vf(0x20c),'name':Vf(0x196),'mask':'*','message':Vf(0x1ba)}]);return I;}),inquirer[s(0x25b)](s(0x1ae),inquirerSearchList),inquirer['registerPrompt'](s(0x24a),inquirer_pagination_prompt_1[s(0x22c)]);}['confirmationPrompt'](V,I){return __awaiter(this,void 0x0,void 0x0,function*(){const VG=a8I,v=yaml[VG(0x197)](V),j=_[VG(0x1aa)](v[VG(0x28d)]('\x0a')[VG(0x1e5)](x=>x[VG(0x257)])),U=chalk_1[VG(0x1c3)][VG(0x1b5)]('-'[VG(0x195)](j)+'\x0a'),{confirm:l}=yield inquirer[VG(0x265)]([{'type':VG(0x232),'name':'confirm','message':''+chalk_1[VG(0x1c3)]['bold']['green'](VG(0x1e6))+U+chalk_1[VG(0x1c3)][VG(0x210)](v)+U,'choices':Object[VG(0x255)](ConfirmChoices)}]);switch(l){case ConfirmChoices[VG(0x1e2)]:return V;case ConfirmChoices[VG(0x26c)]:throw new Error('Aborted.');case ConfirmChoices[VG(0x26b)]:return this[VG(0x190)](I);case ConfirmChoices[VG(0x20e)]:return this[VG(0x228)](yield this[VG(0x22d)](V),I);case ConfirmChoices['SAVE']:yield this[VG(0x21f)](V);return this['confirmationPrompt'](V,I);default:throw new Error(VG(0x1c6));}});}[a8b(0x190)](V,I){return __awaiter(this,void 0x0,void 0x0,function*(){const VP=a8I;if((I===null||I===void 0x0?void 0x0:I[VP(0x249)])!==undefined)this[VP(0x249)]=I===null||I===void 0x0?void 0x0:I[VP(0x249)];this['tmpCmdPath']=I===null||I===void 0x0?void 0x0:I[VP(0x241)],this[VP(0x1b4)]=I===null||I===void 0x0?void 0x0:I[VP(0x1b4)];const v={};return yield this['propToType']([],V[VP(0x27e)]['body'],v),this[VP(0x249)]=v,yield this[VP(0x228)](v,V);});}[a8b(0x1b3)](V,I,v,j){return __awaiter(this,void 0x0,void 0x0,function*(){const Va=a8I;let U;if(I['oneOf']&&!_[Va(0x1d0)](I,Va(0x1a2))){if(I[Va(0x1a1)][Va(0x257)]>0x1){const {choice:l}=yield inquirer[Va(0x265)]([{'type':Va(0x232),'name':Va(0x213),'message':Va(0x223)+(V[V[Va(0x257)]-0x1]||'')+Va(0x215),'choices':I[Va(0x1a1)]['map'](x=>{const Vs=Va;var N;return(N=x[Vs(0x269)])!==null&&N!==void 0x0?N:'??';})}]);U=yield this[Va(0x1f0)](V,I[Va(0x1a1)][Va(0x287)](x=>x[Va(0x269)]===l),v,j);}else{const x=I['oneOf'][0x0];_['set'](x,Va(0x269),I[Va(0x269)]),U=yield this['getType'](V,x,v,j);}U={};}else{if(I[Va(0x1dd)]&&!_[Va(0x1d0)](I,Va(0x1a2))){if(I['anyOf']['length']>0x1){const {choice:N}=yield inquirer[Va(0x265)]([{'type':Va(0x232),'name':Va(0x213),'message':Va(0x223)+(V[V['length']-0x1]||'')+Va(0x215),'choices':[...I['anyOf']['map'](e=>{var D;return(D=e['description'])!==null&&D!==void 0x0?D:'??';}),'don\x27t\x20change']}]);N!==Va(0x1ea)&&(U=yield this[Va(0x1f0)](V,I['anyOf'][Va(0x287)](e=>e[Va(0x269)]===N),v,j));}else{const e=I[Va(0x1dd)][0x0];_[Va(0x1b1)](e,Va(0x269),I['description']),U=yield this[Va(0x1f0)](V,e,v,j);}U={};}else U=yield this[Va(0x1f0)](V,I,v,j);}return U;});}[a8b(0x245)](V,I,v,j){var U;return __awaiter(this,void 0x0,void 0x0,function*(){const Vd=a8I;if(j===![]){const {addEntry:N}=yield inquirer[Vd(0x265)]([{'type':Vd(0x250),'name':Vd(0x1b9),'message':this['getPathString'](I,Vd(0x1a5),V===null||V===void 0x0?void 0x0:V['description']),'default':![]}]);if(!N)return v;}const l=Object['keys']((U=V===null||V===void 0x0?void 0x0:V['properties'])!==null&&U!==void 0x0?U:[]),x=V[Vd(0x209)]||[];if(l[Vd(0x257)]>0x0)for(const e of l){const D=I[Vd(0x23a)](e);if(I['length']>0x0&&!_[Vd(0x1d0)](v,I[Vd(0x227)]('.')))_[Vd(0x1b1)](v,I[Vd(0x227)]('.'),{});yield this[Vd(0x1b3)](D,V[Vd(0x1a2)][e],v,x['includes'](e));}else yield this[Vd(0x1f0)](I,Object[Vd(0x1b7)](Object[Vd(0x1b7)]({},V),{'type':'rawObject'}),v,j);return v;});}['askArrayEntry'](V,I,v,j){return __awaiter(this,void 0x0,void 0x0,function*(){const Vt=a8I;if(I&&v)return!![];const U=I?'Do\x20you\x20want\x20to\x20add':'Do\x20you\x20want\x20to\x20add\x20more',{addEntry:l}=yield inquirer['prompt']([{'type':Vt(0x250),'name':Vt(0x1b9),'message':this['getPathString'](V,U,I?j:undefined),'default':![]}]);return l;});}['getType'](V,I,v,j){return __awaiter(this,void 0x0,void 0x0,function*(){const VR=a8I;let U;const l=V[VR(0x227)]('.');switch(I===null||I===void 0x0?void 0x0:I[VR(0x25d)]){case VR(0x216):{let x=!![];while(yield this[VR(0x230)](V,x,j,I===null||I===void 0x0?void 0x0:I[VR(0x269)])){const N=_[VR(0x26e)](v,l);_['unset'](v,l),yield this['getType'](V,I[VR(0x267)],v);const e=_[VR(0x26e)](v,l);!_[VR(0x1fc)](N)?_[VR(0x1b1)](v,l,[e]):(N[VR(0x218)](e),_['set'](v,l,N)),x=![];}return U||[];}case VR(0x234):{return U=yield this[VR(0x245)](I,V,v,j),U;}case VR(0x1c8):U=(0x0,utils_1[VR(0x19d)])(yield this[VR(0x23d)](V,I,j))||undefined;break;case VR(0x21b):case VR(0x238):case VR(0x281):default:U=yield this[VR(0x23d)](V,I,j,v);break;}return!_['isUndefined'](U)&&_[VR(0x1b1)](v,l,U),U;});}[a8b(0x23d)](V,I,v,j){var U;return __awaiter(this,void 0x0,void 0x0,function*(){const Vu=a8I,l=V[V['length']-0x1],{defaultValue:defaultValue=(U=I===null||I===void 0x0?void 0x0:I[Vu(0x27f)])!==null&&U!==void 0x0?U:I===null||I===void 0x0?void 0x0:I[Vu(0x1c3)],choices:choices=I===null||I===void 0x0?void 0x0:I['enum'],pagination:x}=yield(0x0,api_helpers_1['fetchResourceList'])(l,this[Vu(0x236)],this[Vu(0x1e3)],j,this['pathVars'],V);let N=Vu(0x20b);if(!_[Vu(0x1ed)](choices)&&choices[Vu(0x257)]>0x0){if(x!==undefined&&x[Vu(0x204)]!==undefined)N='pagination-prompt';else choices[Vu(0x257)]>0x4&&typeof choices[0x0]===Vu(0x21b)?N=Vu(0x1ae):N=Vu(0x232);}else{if((I===null||I===void 0x0?void 0x0:I[Vu(0x25d)])===Vu(0x238))N=Vu(0x250);else{if((I===null||I===void 0x0?void 0x0:I[Vu(0x25d)])===Vu(0x281))N='input';else(I===null||I===void 0x0?void 0x0:I[Vu(0x25d)])===Vu(0x1c8)&&(N=Vu(0x201));}}let e=v!==![]?!_[Vu(0x27c)](defaultValue)?defaultValue:JSON[Vu(0x226)](defaultValue):_[Vu(0x24f)](defaultValue)?defaultValue:Vu(0x1ea);if(choices)e=e[Vu(0x23f)]();_[Vu(0x1d0)](this['resultCache'],V[Vu(0x227)]('.'))&&(e=this[Vu(0x249)][V[Vu(0x227)]('.')]);const D=choices&&v===![]?[Vu(0x1ea),...choices]:choices,z=(I===null||I===void 0x0?void 0x0:I[Vu(0x25d)])===Vu(0x281),B=Object[Vu(0x1b7)]({'type':N,'name':'id','message':this[Vu(0x224)](V,I),'choices':D,'default':e,'filter':this[Vu(0x1eb)](N,v),'validate':this[Vu(0x28e)](I,v,z)},x),Y=(yield inquirer[Vu(0x265)]([B]))['id'];if(Y===Vu(0x1ea)||Y==='')return undefined;if(z)return parseInt(Y,0xa);return Y;});}[a8b(0x224)](V,I){const Vn=a8b,v=(I===null||I===void 0x0?void 0x0:I[Vn(0x25d)])!==Vn(0x238)?Vn(0x1fa):'Should\x20it\x20be';return this[Vn(0x1ca)](V,v,I===null||I===void 0x0?void 0x0:I['description']);}[a8b(0x254)](){return __awaiter(this,void 0x0,void 0x0,function*(){const VJ=a8I,V=I=>__awaiter(this,void 0x0,void 0x0,function*(){const Vq=a8I;var v;const j=yield this[Vq(0x236)][Vq(0x232)]['projects']({'options':{'per_page':this[Vq(0x26a)],'cursor':I}}),U=j[Vq(0x1cc)][Vq(0x203)][Vq(0x1e5)](l=>l['id']);return{'elements':U,'nextCursor':(v=j[Vq(0x1ab)])===null||v===void 0x0?void 0x0:v['cursor']};});return yield this[VJ(0x1f4)]('project',V);});}['askForProjectScopedResource'](V,I,v,j){return __awaiter(this,void 0x0,void 0x0,function*(){const VL=a8I,U=v||this['apiClient'][VL(0x200)][VL(0x1da)]();if(_[VL(0x1ed)](U))throw new Error('Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.');const l=yield I(U);return yield this[VL(0x1fd)](V,l,(j?j+VL(0x273):'')+VL(0x248)+U+'\x27');});}[a8b(0x1bb)](V,I,v,j){return __awaiter(this,void 0x0,void 0x0,function*(){const VZ=a8I,U=v||this[VZ(0x236)]['contextProvider']['getCurrentProjectName']();if(_[VZ(0x1ed)](U))throw new Error('Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.');const l=yield I(U);return yield this[VZ(0x1f4)](V,l,(j?j+'\x20in\x20':'')+VZ(0x248)+U+'\x27');});}[a8b(0x276)](){return __awaiter(this,void 0x0,void 0x0,function*(){const Vh=a8I,V=I=>__awaiter(this,void 0x0,void 0x0,function*(){const VS=a8I;var v;const j=yield this['apiClient'][VS(0x232)][VS(0x194)]({'options':{'per_page':this[VS(0x26a)],'cursor':I}});return{'elements':j['data']['domains'][VS(0x1e5)](U=>U[VS(0x1f8)]),'nextCursor':(v=j[VS(0x1ab)])===null||v===void 0x0?void 0x0:v[VS(0x286)]};});return this[Vh(0x1f4)]('domain',V);});}['askForCredentials'](){return __awaiter(this,void 0x0,void 0x0,function*(){const VF=a8I,V=I=>__awaiter(this,void 0x0,void 0x0,function*(){const VQ=a8I;var v;const j=yield this['apiClient'][VQ(0x232)][VQ(0x231)]({'options':{'per_page':this[VQ(0x26a)],'cursor':I}});return{'elements':j[VQ(0x1cc)][VQ(0x18f)][VQ(0x1e5)](U=>U['id']),'nextCursor':(v=j[VQ(0x1ab)])===null||v===void 0x0?void 0x0:v[VQ(0x286)]};});return this[VF(0x1f4)](VF(0x18f),V);});}[a8b(0x1a3)](V){const VW=a8b;this[VW(0x191)]=V;}}function a8I(V,I){const v=a8V();return a8I=function(j,U){j=j-0x18b;let l=v[j];return l;},a8I(V,I);}function a8V(){const Vy=['slice','input','password','call','EDIT','getOwnPropertyDescriptor','blueBright','No\x20containers\x20found','120yMiyMh','choice','askForService','\x20type?','array','for\x20this\x20','push','\x20and\x20it\x20','21iYiLqM','string','greenBright','addon:\x20\x27','secrets','saveFile','uri','462878buUfvR','fullName','What\x27s\x20the\x20','getQuestionString','restores','stringify','join','confirmationPrompt','job','77KYrrxG','lodash','DynamicReloadPaginationPrompt','editPayload','defineProperty','editedResult','askArrayEntry','registryCredentials','list','must\x20be\x20a\x20valid\x20non-empty\x20json\x20string','object','logSinks','apiClient','Context\x20with\x20name\x20\x27','boolean','./utils','concat','No,\x20abort','secret','ask','unshift','toString','bold','cmdPath','backups','addon','retry','getInnerType','reset','volumes','project:\x20\x27','resultCache','pagination-prompt','job\x20containers','tokenPrompt','askForTag','__importStar','isBoolean','confirm','red','\x20(startedAt:\x20','),\x20subdomain\x20(','askForProject','values','completedAt','length','services','\x20characters,\x20is\x20','chalk','registerPrompt','No\x20','type','clusters','must\x20be\x20smaller\x20than\x20or\x20equal\x20to\x20','askForClusterId','confirmation','must\x20be\x20bigger\x20than\x20or\x20equal\x20to\x20','askForLogSink','jobs','prompt','hasOwnProperty','items','nextCursor','description','defaultPaginationPageSize','REPEAT','ABORT','askForJob','get','askGeneric','blue','found','template\x20run','\x20in\x20','10xPOLkj','underline','askForDomain','template','yml','all-builds','value','askForProjectScopedResource','isObject','askForTemplate','opt','example','askForSubdomain','integer','service:\x20\x27','\x20to\x20use:','__setModuleDefault','writeFileSync','cursor','find','configurable','askForBuild','addons','askForAddon','elements','split','validate','runs','templates','json','pop','2435556IBRvPk','credentials','retrievePayloadViaInteractiveCli','pathVars','job\x20runs','WARNING:\x20You\x20are\x20about\x20to\x20delete\x20','domains','repeat','token','safeDump','service','InquirerHelper','to\x20use:','restore','No\x20builds\x20found','isValidJSON','toUpperCase','minLength','templateRuns','oneOf','properties','setPathVars','inquirer','Do\x20you\x20want\x20to\x20add','domain','writable','createdAt','\x20(full\x20domain:\x20','max','pagination','Choose\x20the\x20','__esModule','search-list','fileName','Writing\x20configuration\x20failed:\x20','set','doesn\x27t\x20match\x20pattern\x20\x27','propToType','skipValidation','grey','this\x20option\x20is\x20required,\x20please\x20answer','assign','loginPrompt','addEntry','Choose\x20the\x20login\x20token:','askForProjectScopedResourcePaginated','\x20(completedAt:\x20','containers','4939293SWJTQn','override','job:\x20\x27','minimum','Template\x20id\x20not\x20provided.','default','No,\x20edit','domain\x20(','Something\x20unexpected\x20happened.','apply','rawObject','./pagination/inquirer-pagination-prompt','getPathString','maxLength','data','tags','4244216wtaCGp','maximum','has','done','325275UkPCxG','tag','Configuration\x20file\x20written\x20to\x20','\x20Example:\x20','isNaN','success','whiteBright','9949113LIUYGn','getCurrentProjectName','then','create','anyOf','4456408WMLUPs','\x20characters','all-containers','askForAddonBackup','YES','tmpCmdPath','not\x20completed','map','Please\x20confirm\x20following\x20configuration:\x0a','builds','warning','__createBinding','don\x27t\x20change','filter','yellowBright','isUndefined','subdomainPath','pattern','getType','1KqWekt','Choose\x20the\x20name\x20of\x20the\x20new\x20local\x20context:','log\x20sink','askForResourcePaginated','SAVE','isEmpty','__awaiter','name','a\x20Northflank\x20resource','What\x20do\x20you\x20want\x20to\x20use\x20as','No,\x20repeat','isArray','askForResource','next','inquirer-search-list','contextProvider','editor','__importDefault','projects','nextPageCursor','askForSecret','Go\x20to\x20editor','safeLoad','pipelines','required'];a8V=function(){return Vy;};return a8V();}exports[a8b(0x199)]=InquirerHelper;
|
|
1
|
+
'use strict';const a8S=a8J;function a8J(Z,J){const z=a8Z();return a8J=function(P,B){P=P-0xdb;let U=z[P];return U;},a8J(Z,J);}(function(Z,J){const p=a8J,z=Z();while(!![]){try{const P=parseInt(p(0xf0))/0x1*(-parseInt(p(0x188))/0x2)+parseInt(p(0x140))/0x3*(parseInt(p(0x168))/0x4)+parseInt(p(0x1b4))/0x5*(parseInt(p(0x166))/0x6)+parseInt(p(0x101))/0x7*(-parseInt(p(0x103))/0x8)+-parseInt(p(0xec))/0x9+parseInt(p(0x184))/0xa*(-parseInt(p(0x16a))/0xb)+-parseInt(p(0x19c))/0xc;if(P===J)break;else z['push'](z['shift']());}catch(B){z['push'](z['shift']());}}}(a8Z,0x5f6e9));var __createBinding=this&&this['__createBinding']||(Object[a8S(0x1b3)]?function(Z,J,z,P){const e=a8S;if(P===undefined)P=z;var B=Object['getOwnPropertyDescriptor'](J,z);(!B||('get'in B?!J['__esModule']:B[e(0xf1)]||B[e(0x1bf)]))&&(B={'enumerable':!![],'get':function(){return J[z];}}),Object[e(0x149)](Z,P,B);}:function(Z,J,z,P){if(P===undefined)P=z;Z[P]=J[z];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a8S(0x1b3)]?function(Z,J){const g=a8S;Object[g(0x149)](Z,'default',{'enumerable':!![],'value':J});}:function(Z,J){Z['default']=J;}),__importStar=this&&this['__importStar']||function(Z){const I=a8S;if(Z&&Z[I(0x17b)])return Z;var J={};if(Z!=null){for(var z in Z)if(z!==I(0x15a)&&Object[I(0x1e3)][I(0x145)][I(0x121)](Z,z))__createBinding(J,Z,z);}return __setModuleDefault(J,Z),J;},__awaiter=this&&this['__awaiter']||function(Z,J,z,B){function U(s){return s instanceof z?s:new z(function(A){A(s);});}return new(z||(z=Promise))(function(s,A){const M=a8J;function n(v){const m=a8J;try{C(B[m(0x179)](v));}catch(o){A(o);}}function F(v){try{C(B['throw'](v));}catch(o){A(o);}}function C(v){const L=a8J;v[L(0x1a0)]?s(v[L(0x1a7)]):U(v[L(0x1a7)])[L(0x1d5)](n,F);}C((B=B['apply'](Z,J||[]))[M(0x179)]());});},__importDefault=this&&this['__importDefault']||function(Z){const x=a8S;return Z&&Z[x(0x17b)]?Z:{'default':Z};};Object[a8S(0x149)](exports,'__esModule',{'value':!![]}),exports[a8S(0xfa)]=void 0x0;const _=__importStar(require(a8S(0x1a5))),chalk_1=__importDefault(require(a8S(0x18e))),fs=__importStar(require('fs')),utils_1=require(a8S(0x1c9)),api_helpers_1=require(a8S(0x1bc)),inquirer_pagination_prompt_1=require(a8S(0x112)),inquirer=require(a8S(0x1b8)),inquirerSearchList=require(a8S(0x11b)),yaml=require(a8S(0x123));var ConfirmChoices;(function(Z){const d=a8S;Z[d(0x126)]='Yes,\x20send',Z[d(0x13f)]=d(0x124),Z[d(0x1a8)]=d(0x189),Z[d(0x18c)]=d(0x1de),Z[d(0x10a)]='No,\x20abort';}(ConfirmChoices||(ConfirmChoices={})));class InquirerHelper{constructor(Z){const N=a8S;this['apiClient']=Z,this['defaultPaginationPageSize']=0x32,this['editPayload']=J=>__awaiter(this,void 0x0,void 0x0,function*(){const k=a8J,{editedResult:z}=yield inquirer['prompt']([{'type':k(0x16d),'name':k(0x186),'message':k(0x1e2),'default':yaml[k(0xfc)](J)}]);return yaml['safeLoad'](z);}),this[N(0xde)]=J=>__awaiter(this,void 0x0,void 0x0,function*(){const W=N,z=s=>W(0x172)+s+W(0x195);function P(){return __awaiter(this,void 0x0,void 0x0,function*(){const X=a8J;return inquirer['prompt']([{'type':X(0x10e),'name':X(0x14b),'message':X(0x11c),'validate':s=>new RegExp(X(0x150))['test'](s)?!![]:z(s)}]);});}const {fileName:B}=yield P(),U=B[W(0xdb)]()['split']('.')[W(0x11a)]();try{switch(U){case'json':(0x0,utils_1['success'])(W(0x18d)+B);return fs[W(0x1ed)](B,JSON[W(0x11e)](J,null,'\x20\x20'));case W(0x135):case'yml':(0x0,utils_1[W(0x1a9)])(W(0x18d)+B);return fs[W(0x1ed)](B,yaml[W(0xfc)](J));default:(0x0,utils_1[W(0x1ce)])(z(U));}}catch(s){(0x0,utils_1['warning'])(W(0x136)+s[W(0x1cf)]);}return undefined;}),this[N(0x1e7)]=(J,z)=>P=>{const D=N,B=typeof P===D(0x10c)?P[D(0x11f)]():P;return z===![]&&B===D(0x157)?'':B;},this[N(0x138)]=(J,z,P)=>B=>{const q=N;if(this['skipValidation']===!![])return!![];const U=[];if(B===''||B==='don\x27t\x20change'){if(z!==![])U[q(0x13c)](q(0x178));else return!![];}J[q(0x1da)]===q(0x10c)&&!_[q(0x109)](J[q(0x16e)])&&U[q(0x13c)](new RegExp(J['pattern'])[q(0x169)](B)?!![]:q(0x1b0)+J[q(0x16e)]+'\x27');J[q(0x1da)]===q(0x10c)&&!_[q(0x109)](J[q(0x16b)])&&U[q(0x13c)](B[q(0xeb)]>=J[q(0x16b)]?!![]:q(0x1eb)+J[q(0x16b)]+q(0x1a6)+B['length']+q(0xf4));J[q(0x1da)]===q(0x10c)&&!_[q(0x109)](J[q(0x12b)])&&U[q(0x13c)](B[q(0xeb)]<=J[q(0x12b)]?!![]:q(0x1ef)+J[q(0x12b)]+q(0x1a6)+B[q(0xeb)]+q(0xf4));P&&Number[q(0x1a3)](parseInt(B,0xa))&&U[q(0x13c)](q(0x114)+B);J[q(0x1da)]===q(0x19d)&&!_['isUndefined'](J[q(0x15f)])&&U[q(0x13c)](B>=J[q(0x15f)]?!![]:'must\x20be\x20bigger\x20than\x20or\x20equal\x20to\x20'+J[q(0x15f)]);J[q(0x1da)]===q(0x19d)&&!_[q(0x109)](J[q(0x128)])&&U[q(0x13c)](B<=J[q(0x128)]?!![]:q(0xf7)+J[q(0x128)]);if(J['type']===q(0x1d7)){const n=(0x0,utils_1[q(0x1b7)])(B);U[q(0x13c)](n===![]||_[q(0x160)](n)?'must\x20be\x20a\x20valid\x20non-empty\x20json\x20string':!![]);}const s=U[q(0x1e7)](F=>F!==!![]),A=(J===null||J===void 0x0?void 0x0:J[q(0x147)])?'\x0a'+chalk_1[q(0x15a)][q(0x1d0)]('>>')+q(0xee)+chalk_1[q(0x15a)]['whiteBright'](JSON[q(0x11e)](J[q(0x147)])):'';return s[q(0xeb)]>0x0?s[q(0x104)](chalk_1['default'][q(0x1af)](q(0x14f)))+A:!![];},this[N(0x148)]=(J,z,P)=>{const y=N,B=J[J[y(0xeb)]-0x1];function U(){const O=y;return J[O(0x16f)](0x0,-0x1)[O(0xef)](n=>n[O(0x191)](0x0)['toUpperCase']()+n[O(0x16f)](0x1))['join']('>');}const s=J[y(0xeb)]>0x1?chalk_1[y(0x15a)]['bgGrey'][y(0x155)](U())+':\x20':'',A=P?'\x20('+chalk_1[y(0x15a)]['blue'](P)+')':'';return chalk_1[y(0x15a)][y(0x1c1)](''+s+z+'\x20'+chalk_1[y(0x15a)][y(0x170)][y(0x14a)](B)+A+'?');},this[N(0xf9)]=(J,z,P)=>__awaiter(this,void 0x0,void 0x0,function*(){const G=N;if(z[G(0xeb)]<0x1){const s=P?G(0x1c8)+P:'found';throw new Error('No\x20'+J+'\x20'+s+'.');}const B=G(0x161)+J+G(0x159),U=z[G(0xeb)]>0x4?G(0x15e):G(0x176);return(yield inquirer[G(0x17e)]([{'type':U,'name':G(0x1cc),'message':B,'choices':z}]))[G(0x1cc)];}),this[N(0x1e6)]=(J,z,P)=>__awaiter(this,void 0x0,void 0x0,function*(){const K=N,{elements:B,nextCursor:U}=yield z();if(B[K(0xeb)]<0x1){const n=P?K(0x1c8)+P:K(0x133);throw new Error(K(0x1d3)+J+'\x20'+n+'.');}const s='Choose\x20the\x20'+J+'\x20to\x20use:';if(U!==undefined){const F=({nextPageCursor:C})=>__awaiter(this,void 0x0,void 0x0,function*(){const l=K,v=yield z(C);return{'elements':v[l(0x163)],'nextPageCursor':v[l(0x1b5)]};});return(yield inquirer['prompt']([{'type':K(0x19a),'name':'name','message':s,'choices':B,'nextPageCursor':U,'loadMore':F}]))[K(0x1cc)];}const A=B[K(0xeb)]>0x4?'search-list':'list';return(yield inquirer['prompt']([{'type':A,'name':'name','message':s,'choices':B}]))[K(0x1cc)];}),this[N(0x19f)]=(J,z)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const b=N,P=''+(z?'('+chalk_1[b(0x15a)][b(0x1dc)](z)+')\x20':''),B=b(0x13a)+chalk_1[b(0x15a)][b(0x1bb)](J)+'\x20'+P+b(0x1db),U=this[b(0x138)]({'type':'string','required':!![]});return(yield inquirer[b(0x17e)]([{'type':b(0x10e),'name':'name','message':B,'validate':U}]))['name'];}),this[N(0x162)]=J=>__awaiter(this,void 0x0,void 0x0,function*(){const f=N;return(yield inquirer[f(0x17e)]([{'type':f(0xf6),'name':f(0x1cc),'message':J,'default':!![]}]))['name'];}),this[N(0x1e0)]=J=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const w=N,z=P=>B=>__awaiter(this,void 0x0,void 0x0,function*(){const r=a8J;var U;const s=yield this[r(0x110)][r(0x176)]['services']({'parameters':{'projectId':P},'options':{'per_page':this[r(0x1aa)],'cursor':B}}),A=s['data']['services'][r(0xef)](n=>n['id']);return{'elements':A,'nextCursor':(U=s['pagination'])===null||U===void 0x0?void 0x0:U[r(0x113)]};});return this[w(0x192)]('service',z,J);}),this[N(0x153)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const J=z=>__awaiter(this,void 0x0,void 0x0,function*(){const Q=a8J;var P;const B=yield this['apiClient']['list'][Q(0x154)]({'options':{'per_page':this[Q(0x1aa)],'cursor':z}}),U=B[Q(0x1dd)][Q(0x154)][Q(0xef)](s=>s['id']);return{'elements':U,'nextCursor':(P=B['pagination'])===null||P===void 0x0?void 0x0:P['cursor']};});return this['askForResourcePaginated']('template',J);}),this[N(0x1ba)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const t=N,J=z=>__awaiter(this,void 0x0,void 0x0,function*(){const T=a8J;var P,B,U;const s=yield this['apiClient'][T(0x176)][T(0x1a1)]({'options':{'per_page':this[T(0x1aa)],'cursor':z}}),A=(B=(P=s[T(0x1dd)][T(0x1a1)])===null||P===void 0x0?void 0x0:P['map'](n=>n['id']))!==null&&B!==void 0x0?B:[];return{'elements':A,'nextCursor':(U=s[T(0xdc)])===null||U===void 0x0?void 0x0:U[T(0x113)]};});return this[t(0x1e6)](t(0xff),J);}),this[N(0x139)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const h=N,J=z=>__awaiter(this,void 0x0,void 0x0,function*(){const R=a8J;var P,B,U;const s=yield this[R(0x110)][R(0x176)]['cloud'][R(0x196)]({'options':{'per_page':this[R(0x1aa)],'cursor':z}}),A=(B=(P=s[R(0x1dd)][R(0x196)])===null||P===void 0x0?void 0x0:P['map'](n=>n['name']))!==null&&B!==void 0x0?B:[];return{'elements':A,'nextCursor':(U=s[R(0xdc)])===null||U===void 0x0?void 0x0:U[R(0x113)]};});return this[h(0x1e6)]('cluster\x20id',J);}),this[N(0x14c)]=J=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const a=N;if(_[a(0x109)](J))throw new Error(a(0x1e4));const z=P=>__awaiter(this,void 0x0,void 0x0,function*(){const u=a;var B;let U=this[u(0x1aa)];const s=yield this[u(0x110)][u(0x176)]['templateRuns']({'parameters':{'templateId':J},'options':{'per_page':U,'cursor':P}}),A=s[u(0x1dd)]['templateRuns']['map'](n=>n['id']+u(0x1b6)+n[u(0x151)]+')');return{'elements':A,'nextCursor':(B=s[u(0xdc)])===null||B===void 0x0?void 0x0:B['cursor']};});return this[a(0x1e6)](a(0x13e),z)[a(0x1d5)](P=>P['split']('\x20')[0x0]);}),this[N(0x132)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const J=z=>__awaiter(this,void 0x0,void 0x0,function*(){const H=a8J;var P;let B=this[H(0x1aa)];const U=yield this['apiClient']['list'][H(0x115)]({'options':{'per_page':B,'cursor':z}}),s=U[H(0x1dd)]['logSinks'][H(0xef)](A=>A['id']);return{'elements':s,'nextCursor':(P=U['pagination'])===null||P===void 0x0?void 0x0:P['cursor']};});return this['askForResourcePaginated']('log\x20sink',J);}),this[N(0x164)]=J=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const E=N,z=P=>B=>__awaiter(this,void 0x0,void 0x0,function*(){const Y=a8J;var U;const s=yield this['apiClient'][Y(0x176)][Y(0x143)]({'parameters':{'projectId':P},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':B}}),A=s['data'][Y(0x143)][Y(0xef)](n=>n['id']);return{'elements':A,'nextCursor':(U=s[Y(0xdc)])===null||U===void 0x0?void 0x0:U[Y(0x113)]};});return this['askForProjectScopedResourcePaginated'](E(0xe4),z,J);}),this['askForJob']=J=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Z1=N,z=P=>B=>__awaiter(this,void 0x0,void 0x0,function*(){const Z0=a8J;var U;const s=yield this[Z0(0x110)][Z0(0x176)][Z0(0x152)]({'parameters':{'projectId':P},'options':{'per_page':this[Z0(0x1aa)],'cursor':B}}),A=s['data'][Z0(0x152)]['map'](n=>n['id']);return{'elements':A,'nextCursor':(U=s['pagination'])===null||U===void 0x0?void 0x0:U[Z0(0x113)]};});return this[Z1(0x192)](Z1(0x1ad),z,J);}),this[N(0x10b)]=(J,z,P=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Z2=N,B=Z2(0xe3),U=s=>A=>__awaiter(this,void 0x0,void 0x0,function*(){const Z3=Z2;var n;const F=yield this[Z3(0x110)]['get']['job'][Z3(0x18f)]({'parameters':{'projectId':s,'jobId':J},'options':{'per_page':this[Z3(0x1aa)],'cursor':A}}),C=F[Z3(0x1dd)]['runs'][Z3(0xef)](v=>v['id']+Z3(0x1b6)+v[Z3(0x1ec)]+')');return P&&C[Z3(0x144)](B),{'elements':C,'nextCursor':(n=F['pagination'])===null||n===void 0x0?void 0x0:n[Z3(0x113)]};});return this[Z2(0x192)](Z2(0x1b1),U,z,Z2(0x182)+J+'\x27')[Z2(0x1d5)](s=>{const Z4=Z2,A=s[Z4(0xe1)]('\x20')[0x0];if(A===B)return undefined;return A;});}),this[N(0x1cb)]=(J,z,P,B=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Z5=N,U=Z5(0xea);if(P!==undefined){const s=A=>n=>__awaiter(this,void 0x0,void 0x0,function*(){const Z6=Z5;var F;const C=yield this[Z6(0x110)][Z6(0xe7)]['job'][Z6(0x156)]({'parameters':{'projectId':A,'jobId':P},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':n}}),v=C[Z6(0x1dd)][Z6(0x156)][Z6(0xef)](o=>o['id']+'\x20(startedAt:\x20'+o[Z6(0x151)]+')');return B&&v[Z6(0x144)](U),{'elements':v,'nextCursor':(F=C['pagination'])===null||F===void 0x0?void 0x0:F[Z6(0x113)]};});return this[Z5(0x192)](Z5(0x119),s,J,'job:\x20\x27'+P+'\x27')[Z5(0x1d5)](A=>{const n=A['split']('\x20')[0x0];if(n===U)return undefined;return n;});}if(z!==undefined){const A=n=>F=>__awaiter(this,void 0x0,void 0x0,function*(){const Z7=Z5;var C;const v=yield this[Z7(0x110)][Z7(0xe7)][Z7(0xfe)]['builds']({'parameters':{'projectId':n,'serviceId':z},'options':{'per_page':this[Z7(0x1aa)],'cursor':F}}),o=v[Z7(0x1dd)][Z7(0x156)][Z7(0xef)](j=>j['id']+Z7(0x1b6)+j[Z7(0x151)]+')');if(B)o[Z7(0x144)](U);return{'elements':o,'nextCursor':(C=v[Z7(0xdc)])===null||C===void 0x0?void 0x0:C[Z7(0x113)]};});return this[Z5(0x192)](Z5(0xed),A,J,'service:\x20\x27'+P+'\x27')[Z5(0x1d5)](n=>{const Z8=Z5,F=n[Z8(0xe1)]('\x20')[0x0];if(F===U)return undefined;return F;});}throw new Error(Z5(0x17d));}),this[N(0x18b)]=(J,z,P,B=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Z9=N,U=Z9(0xe8);if(P!==undefined){const s=A=>n=>__awaiter(this,void 0x0,void 0x0,function*(){const ZZ=Z9;var F,C;const v=yield this[ZZ(0x110)][ZZ(0xe7)][ZZ(0x1ad)][ZZ(0x108)]({'parameters':{'projectId':A,'jobId':P},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':n}}),o=(F=v[ZZ(0x1dd)][ZZ(0x108)])!==null&&F!==void 0x0?F:[],j=o===null||o===void 0x0?void 0x0:o['map'](V=>V[ZZ(0x1cc)]+'\x20(startedAt:\x20'+V[ZZ(0x151)]+')');return B&&j[ZZ(0x144)](U),{'elements':j,'nextCursor':(C=v['pagination'])===null||C===void 0x0?void 0x0:C[ZZ(0x113)]};});return this[Z9(0x192)](Z9(0x146),s,J,Z9(0x182)+P+'\x27')[Z9(0x1d5)](A=>{const ZJ=Z9,n=A[ZJ(0xe1)]('\x20')[0x0];if(n===U)return undefined;return n;});}if(z!==undefined){const A=n=>F=>__awaiter(this,void 0x0,void 0x0,function*(){const Zz=Z9;var C,v;const o=yield this[Zz(0x110)][Zz(0xe7)][Zz(0xfe)][Zz(0x108)]({'parameters':{'projectId':n,'serviceId':z},'options':{'per_page':this[Zz(0x1aa)],'cursor':F}}),j=(C=o[Zz(0x1dd)][Zz(0x108)])!==null&&C!==void 0x0?C:[],V=j['map'](i=>i[Zz(0x1cc)]+Zz(0x1b6)+i['createdAt']+')');if(B)V===null||V===void 0x0?void 0x0:V[Zz(0x144)](U);return{'elements':V,'nextCursor':(v=o['pagination'])===null||v===void 0x0?void 0x0:v[Zz(0x113)]};});return this[Z9(0x192)](Z9(0x187),A,J,Z9(0x181)+P+'\x27')[Z9(0x1d5)](n=>{const ZP=Z9,F=n[ZP(0xe1)]('\x20')[0x0];if(F===U)return undefined;return F;});}throw new Error(Z9(0x1ca));}),this[N(0x1e5)]=J=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const ZU=N,z=P=>B=>__awaiter(this,void 0x0,void 0x0,function*(){const ZB=a8J;var U;const s=yield this['apiClient'][ZB(0x176)]['addons']({'parameters':{'projectId':P},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':B}});return{'elements':s[ZB(0x1dd)]['addons'][ZB(0xef)](A=>A['id']),'nextCursor':(U=s[ZB(0xdc)])===null||U===void 0x0?void 0x0:U['cursor']};});return this[ZU(0x192)]('addon',z,J);}),this[N(0x177)]=(J,z)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const ZA=N,P=B=>U=>__awaiter(this,void 0x0,void 0x0,function*(){const Zs=a8J;var s;const A=yield this[Zs(0x110)][Zs(0xe7)][Zs(0x183)][Zs(0x1ee)]({'parameters':{'projectId':B,'addonId':z},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':U}});return{'elements':A[Zs(0x1dd)]['backups'][Zs(0xef)](n=>n['id']+Zs(0x13d)+(n[Zs(0x12c)]||Zs(0x19e))+')'),'nextCursor':(s=A[Zs(0xdc)])===null||s===void 0x0?void 0x0:s[Zs(0x113)]};});return this[ZA(0x192)](ZA(0x1ee),P,J,ZA(0x105)+z+'\x27')[ZA(0x1d5)](B=>B['split']('\x20')[0x0]);}),this[N(0xf3)]=(J,z,P)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const ZF=N,B=U=>s=>__awaiter(this,void 0x0,void 0x0,function*(){const Zn=a8J;var A;const n=yield this[Zn(0x110)]['get'][Zn(0x183)][Zn(0x117)]({'parameters':{'projectId':U,'addonId':z,'backupId':P},'options':{'per_page':this[Zn(0x1aa)],'cursor':s}});return{'elements':n[Zn(0x1dd)]['restores'][Zn(0xef)](F=>F['id']+Zn(0x13d)+(F[Zn(0x12c)]||Zn(0x19e))+')'),'nextCursor':(A=n[Zn(0xdc)])===null||A===void 0x0?void 0x0:A['cursor']};});return this[ZF(0x192)]('restore',B,J,'addon:\x20\x27'+z+'\x27')['then'](U=>U['split']('\x20')[0x0]);}),this[N(0x111)]=J=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Zv=N,z=P=>__awaiter(this,void 0x0,void 0x0,function*(){const ZC=a8J;return(yield this['apiClient'][ZC(0x176)][ZC(0x190)]({'parameters':{'projectId':P}}))[ZC(0x1dd)]['map'](B=>B['id']);});return this['askForProjectScopedResource'](Zv(0xfd),z,J);}),this[N(0x116)]=J=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Zj=N,z=P=>B=>__awaiter(this,void 0x0,void 0x0,function*(){const Zo=a8J;var U;const s=yield this['apiClient'][Zo(0x176)][Zo(0x199)]({'parameters':{'projectId':P},'options':{'per_page':this[Zo(0x1aa)],'cursor':B}});return{'elements':s[Zo(0x1dd)]['secrets'][Zo(0xef)](A=>A['id']),'nextCursor':(U=s[Zo(0xdc)])===null||U===void 0x0?void 0x0:U['cursor']};});return this[Zj(0x192)](Zj(0x1a4),z,J);}),this[N(0x17a)]=J=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const ZV=N,z=yield this[ZV(0x110)][ZV(0xe7)][ZV(0x1bd)]({'parameters':{'domain':J}}),P=z[ZV(0x1dd)][ZV(0x127)][ZV(0xef)](U=>U[ZV(0x1cc)]+ZV(0x1e8)+U['fullName']+')'),B=ZV(0x1d6)+J+')';return this[ZV(0xf9)](ZV(0x1c6),P,B)[ZV(0x1d5)](U=>U[ZV(0xe1)]('\x20')[0x0]);}),this['askForSubdomainPath']=(J,z)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Zi=N,P=yield this[Zi(0x110)]['list'][Zi(0x1c6)][Zi(0x1ab)]({'parameters':{'domain':J,'subdomain':z}}),B=P['data'][Zi(0x15c)][Zi(0xef)](s=>''+s['uri']),U='domain\x20('+J+'),\x20subdomain\x20('+z+')';return this[Zi(0xf9)](Zi(0xdf),B,U);}),this[N(0x1d9)]=J=>__awaiter(this,void 0x0,void 0x0,function*(){const Zp=N;return(yield inquirer[Zp(0x17e)]([{'type':'confirm','name':Zp(0x12e),'message':chalk_1[Zp(0x15a)][Zp(0x19b)](Zp(0x129)+(J||Zp(0x1c3))+'.\x20This\x20is\x20irreversible.\x20Please\x20confirm!'),'default':![]}]))[Zp(0x12e)];}),this[N(0x125)]=(J,z)=>__awaiter(this,void 0x0,void 0x0,function*(){const ZS=N;_[ZS(0x109)](J[ZS(0x1cc)])&&(z['length']<=0x0?_[ZS(0x1c2)](J,ZS(0x1cc),ZS(0x15a)):yield(0x0,utils_1[ZS(0x1b9)])(0xa)(()=>__awaiter(this,void 0x0,void 0x0,function*(){const Ze=ZS,{name:P}=yield inquirer[Ze(0x17e)]([{'type':Ze(0x10e),'name':'name','message':Ze(0x12d),'default':'main-context'}]);if(!J['override']&&z['find'](B=>B[Ze(0x1cc)]===P)){const {c:B}=yield inquirer[Ze(0x17e)]([{'type':Ze(0xf6),'name':'c','message':Ze(0x180)+P+Ze(0xfb),'default':![]}]);if(B===![])throw new Error(Ze(0x130));_['set'](J,'override',!![]);}_[Ze(0x1c2)](J,Ze(0x1cc),P);})));if(_[ZS(0x109)](J[ZS(0x11d)])){const P=yield this[ZS(0x137)]();_[ZS(0x1c2)](J,ZS(0x11d),P);}return J;}),this[N(0x137)]=()=>__awaiter(this,void 0x0,void 0x0,function*(){const Zg=N,{token:J}=yield inquirer[Zg(0x17e)]([{'type':Zg(0x167),'name':Zg(0x11d),'mask':'*','message':Zg(0x15d)}]);return J;}),inquirer[N(0xdd)](N(0x15e),inquirerSearchList),inquirer[N(0xdd)](N(0x19a),inquirer_pagination_prompt_1[N(0x1c7)]);}['confirmationPrompt'](Z,J){return __awaiter(this,void 0x0,void 0x0,function*(){const ZI=a8J,z=yaml[ZI(0xfc)](Z),P=_[ZI(0x141)](z[ZI(0xe1)]('\x0a')[ZI(0xef)](s=>s[ZI(0xeb)])),B=chalk_1[ZI(0x15a)][ZI(0x13b)]('-'[ZI(0x122)](P)+'\x0a'),{confirm:U}=yield inquirer[ZI(0x17e)]([{'type':ZI(0x176),'name':ZI(0xf6),'message':''+chalk_1[ZI(0x15a)][ZI(0x170)][ZI(0x1bb)](ZI(0x1d2))+B+chalk_1[ZI(0x15a)][ZI(0x198)](z)+B,'choices':Object[ZI(0x1ae)](ConfirmChoices)}]);switch(U){case ConfirmChoices[ZI(0x126)]:return Z;case ConfirmChoices[ZI(0x10a)]:throw new Error(ZI(0x1e1));case ConfirmChoices[ZI(0x13f)]:return this['retrievePayloadViaInteractiveCli'](J);case ConfirmChoices[ZI(0x1a8)]:return this['confirmationPrompt'](yield this[ZI(0x1a2)](Z),J);case ConfirmChoices['SAVE']:yield this[ZI(0xde)](Z);return this[ZI(0x185)](Z,J);default:throw new Error(ZI(0x12a));}});}[a8S(0x100)](Z,J){return __awaiter(this,void 0x0,void 0x0,function*(){const Zm=a8J;if((J===null||J===void 0x0?void 0x0:J[Zm(0x1cd)])!==undefined)this[Zm(0x1cd)]=J===null||J===void 0x0?void 0x0:J['resultCache'];this[Zm(0x1e9)]=J===null||J===void 0x0?void 0x0:J[Zm(0x158)],this[Zm(0x1f0)]=J===null||J===void 0x0?void 0x0:J[Zm(0x1f0)];const z={};return yield this[Zm(0xe6)]([],Z[Zm(0x1df)][Zm(0x14e)],z),this['resultCache']=z,yield this[Zm(0x185)](z,Z);});}[a8S(0xe6)](Z,J,z,P){return __awaiter(this,void 0x0,void 0x0,function*(){const ZL=a8J;let B;if(J[ZL(0xf8)]&&!_['has'](J,ZL(0x1be))){if(J['oneOf'][ZL(0xeb)]>0x1){const {choice:U}=yield inquirer[ZL(0x17e)]([{'type':ZL(0x176),'name':ZL(0x173),'message':ZL(0xe2)+(Z[Z['length']-0x1]||'')+ZL(0x1b2),'choices':J[ZL(0xf8)][ZL(0xef)](s=>{const ZM=ZL;var A;return(A=s[ZM(0x15b)])!==null&&A!==void 0x0?A:'??';})}]);B=yield this[ZL(0x1d8)](Z,J[ZL(0xf8)][ZL(0x134)](s=>s[ZL(0x15b)]===U),z,P);}else{const s=J[ZL(0xf8)][0x0];_['set'](s,ZL(0x15b),J[ZL(0x15b)]),B=yield this[ZL(0x1d8)](Z,s,z,P);}B={};}else{if(J[ZL(0x10d)]&&!_[ZL(0x16c)](J,ZL(0x1be))){if(J[ZL(0x10d)][ZL(0xeb)]>0x1){const {choice:A}=yield inquirer[ZL(0x17e)]([{'type':ZL(0x176),'name':ZL(0x173),'message':ZL(0xe2)+(Z[Z[ZL(0xeb)]-0x1]||'')+'\x20type?','choices':[...J[ZL(0x10d)]['map'](n=>{var F;return(F=n['description'])!==null&&F!==void 0x0?F:'??';}),ZL(0x157)]}]);A!==ZL(0x157)&&(B=yield this[ZL(0x1d8)](Z,J['anyOf'][ZL(0x134)](n=>n[ZL(0x15b)]===A),z,P));}else{const n=J[ZL(0x10d)][0x0];_[ZL(0x1c2)](n,ZL(0x15b),J['description']),B=yield this[ZL(0x1d8)](Z,n,z,P);}B={};}else B=yield this[ZL(0x1d8)](Z,J,z,P);}return B;});}[a8S(0x12f)](Z,J,z,P){var B;return __awaiter(this,void 0x0,void 0x0,function*(){const Zx=a8J;if(P===![]){const {addEntry:A}=yield inquirer[Zx(0x17e)]([{'type':Zx(0xf6),'name':Zx(0x1d1),'message':this[Zx(0x148)](J,'Do\x20you\x20want\x20to\x20add',Z===null||Z===void 0x0?void 0x0:Z[Zx(0x15b)]),'default':![]}]);if(!A)return z;}const U=Object[Zx(0x1ea)]((B=Z===null||Z===void 0x0?void 0x0:Z['properties'])!==null&&B!==void 0x0?B:[]),s=Z['required']||[];if(U[Zx(0xeb)]>0x0)for(const n of U){const F=J[Zx(0xf2)](n);if(J[Zx(0xeb)]>0x0&&!_['has'](z,J[Zx(0x104)]('.')))_[Zx(0x1c2)](z,J[Zx(0x104)]('.'),{});yield this[Zx(0xe6)](F,Z['properties'][n],z,s[Zx(0x1c0)](n));}else yield this[Zx(0x1d8)](J,Object[Zx(0x1c5)](Object[Zx(0x1c5)]({},Z),{'type':Zx(0x1d7)}),z,P);return z;});}[a8S(0x18a)](Z,J,z,P){return __awaiter(this,void 0x0,void 0x0,function*(){const Zd=a8J;if(J&&z)return!![];const B=J?Zd(0x174):Zd(0x1c4),{addEntry:U}=yield inquirer[Zd(0x17e)]([{'type':'confirm','name':'addEntry','message':this['getPathString'](Z,B,J?P:undefined),'default':![]}]);return U;});}['getType'](Z,J,z,P){return __awaiter(this,void 0x0,void 0x0,function*(){const Zk=a8J;let B;const U=Z[Zk(0x104)]('.');switch(J===null||J===void 0x0?void 0x0:J['type']){case Zk(0x1d4):{let s=!![];while(yield this[Zk(0x18a)](Z,s,P,J===null||J===void 0x0?void 0x0:J[Zk(0x15b)])){const A=_[Zk(0xe7)](z,U);_['unset'](z,U),yield this[Zk(0x1d8)](Z,J[Zk(0x120)],z);const n=_[Zk(0xe7)](z,U);!_['isArray'](A)?_[Zk(0x1c2)](z,U,[n]):(A[Zk(0x13c)](n),_[Zk(0x1c2)](z,U,A)),s=![];}return B||[];}case'object':{return B=yield this[Zk(0x12f)](J,Z,z,P),B;}case Zk(0x1d7):B=(0x0,utils_1[Zk(0x1b7)])(yield this['ask'](Z,J,P))||undefined;break;case Zk(0x10c):case Zk(0xf5):case Zk(0x19d):default:B=yield this[Zk(0x107)](Z,J,P,z);break;}return!_[Zk(0x109)](B)&&_[Zk(0x1c2)](z,U,B),B;});}[a8S(0x107)](Z,J,z,P){var B;return __awaiter(this,void 0x0,void 0x0,function*(){const ZN=a8J,U=Z[Z[ZN(0xeb)]-0x1],{defaultValue:defaultValue=(B=J===null||J===void 0x0?void 0x0:J[ZN(0x147)])!==null&&B!==void 0x0?B:J===null||J===void 0x0?void 0x0:J['default'],choices:choices=J===null||J===void 0x0?void 0x0:J[ZN(0x17c)],pagination:s}=yield(0x0,api_helpers_1[ZN(0x14d)])(U,this[ZN(0x110)],this['tmpCmdPath'],P,this[ZN(0x194)],Z);let A=ZN(0x10e);if(!_[ZN(0x109)](choices)&&choices[ZN(0xeb)]>0x0){if(s!==undefined&&s[ZN(0x171)]!==undefined)A=ZN(0x19a);else choices[ZN(0xeb)]>0x4&&typeof choices[0x0]===ZN(0x10c)?A='search-list':A=ZN(0x176);}else{if((J===null||J===void 0x0?void 0x0:J[ZN(0x1da)])===ZN(0xf5))A='confirm';else{if((J===null||J===void 0x0?void 0x0:J[ZN(0x1da)])===ZN(0x19d))A=ZN(0x10e);else(J===null||J===void 0x0?void 0x0:J[ZN(0x1da)])==='rawObject'&&(A='editor');}}let n=z!==![]?!_[ZN(0xe9)](defaultValue)?defaultValue:JSON[ZN(0x11e)](defaultValue):_[ZN(0x118)](defaultValue)?defaultValue:'don\x27t\x20change';if(choices)n=n[ZN(0xdb)]();_[ZN(0x16c)](this[ZN(0x1cd)],Z[ZN(0x104)]('.'))&&(n=this[ZN(0x1cd)][Z['join']('.')]);const F=choices&&z===![]?[ZN(0x157),...choices]:choices,C=(J===null||J===void 0x0?void 0x0:J[ZN(0x1da)])===ZN(0x19d),v=Object[ZN(0x1c5)]({'type':A,'name':'id','message':this['getQuestionString'](Z,J),'choices':F,'default':n,'filter':this[ZN(0x1e7)](A,z),'validate':this['validate'](J,z,C)},s),o=(yield inquirer[ZN(0x17e)]([v]))['id'];if(o===ZN(0x157)||o==='')return undefined;if(C)return parseInt(o,0xa);return o;});}[a8S(0x17f)](Z,J){const ZW=a8S,z=(J===null||J===void 0x0?void 0x0:J[ZW(0x1da)])!=='boolean'?ZW(0x1ac):'Should\x20it\x20be';return this['getPathString'](Z,z,J===null||J===void 0x0?void 0x0:J['description']);}[a8S(0xe5)](){return __awaiter(this,void 0x0,void 0x0,function*(){const ZD=a8J,Z=J=>__awaiter(this,void 0x0,void 0x0,function*(){const ZX=a8J;var z;const P=yield this[ZX(0x110)]['list'][ZX(0x193)]({'options':{'per_page':this['defaultPaginationPageSize'],'cursor':J}}),B=P[ZX(0x1dd)]['projects'][ZX(0xef)](U=>U['id']);return{'elements':B,'nextCursor':(z=P[ZX(0xdc)])===null||z===void 0x0?void 0x0:z['cursor']};});return yield this['askForResourcePaginated'](ZD(0x165),Z);});}['askForProjectScopedResource'](Z,J,z,P){return __awaiter(this,void 0x0,void 0x0,function*(){const Zq=a8J,B=z||this['apiClient']['contextProvider'][Zq(0x102)]();if(_['isUndefined'](B))throw new Error(Zq(0x10f));const U=yield J(B);return yield this[Zq(0xf9)](Z,U,(P?P+Zq(0x142):'')+Zq(0x131)+B+'\x27');});}[a8S(0x192)](Z,J,z,P){return __awaiter(this,void 0x0,void 0x0,function*(){const Zy=a8J,B=z||this['apiClient'][Zy(0x175)][Zy(0x102)]();if(_[Zy(0x109)](B))throw new Error(Zy(0x10f));const U=yield J(B);return yield this['askForResourcePaginated'](Z,U,(P?P+Zy(0x142):'')+Zy(0x131)+B+'\x27');});}['askForDomain'](){return __awaiter(this,void 0x0,void 0x0,function*(){const ZG=a8J,Z=J=>__awaiter(this,void 0x0,void 0x0,function*(){const ZO=a8J;var z;const P=yield this[ZO(0x110)][ZO(0x176)][ZO(0x106)]({'options':{'per_page':this[ZO(0x1aa)],'cursor':J}});return{'elements':P['data'][ZO(0x106)][ZO(0xef)](B=>B[ZO(0x1cc)]),'nextCursor':(z=P[ZO(0xdc)])===null||z===void 0x0?void 0x0:z[ZO(0x113)]};});return this[ZG(0x1e6)](ZG(0x1bd),Z);});}[a8S(0xe0)](){return __awaiter(this,void 0x0,void 0x0,function*(){const Zl=a8J,Z=J=>__awaiter(this,void 0x0,void 0x0,function*(){const ZK=a8J;var z;const P=yield this[ZK(0x110)][ZK(0x176)]['registryCredentials']({'options':{'per_page':this[ZK(0x1aa)],'cursor':J}});return{'elements':P[ZK(0x1dd)]['credentials']['map'](B=>B['id']),'nextCursor':(z=P['pagination'])===null||z===void 0x0?void 0x0:z[ZK(0x113)]};});return this[Zl(0x1e6)]('credentials',Z);});}[a8S(0x197)](Z){const Zb=a8S;this[Zb(0x194)]=Z;}}exports[a8S(0xfa)]=InquirerHelper;function a8Z(){const Zf=['What\x27s\x20the\x20','all-job-runs','pipeline','askForProject','propToType','get','all-containers','isObject','all-builds','length','1676943UaVcsm','service\x20build','\x20Example:\x20','map','1URCPma','writable','concat','askForAddonRestore','\x20characters','boolean','confirm','must\x20be\x20smaller\x20than\x20or\x20equal\x20to\x20','oneOf','askForResource','InquirerHelper','\x27\x20already\x20exists.\x20Do\x20you\x20want\x20to\x20override\x20this\x20context\x20(y)\x20or\x20enter\x20a\x20new\x20name\x20(N)?','safeDump','volume','service','tag','retrievePayloadViaInteractiveCli','14coEgyr','getCurrentProjectName','71248VGbbbe','join','addon:\x20\x27','domains','ask','containers','isUndefined','ABORT','askForJobRun','string','anyOf','input','Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.','apiClient','askForVolume','./pagination/inquirer-pagination-prompt','cursor','must\x20be\x20a\x20number,\x20is\x20','logSinks','askForSecret','restores','isBoolean','job\x20builds','pop','inquirer-search-list','Provide\x20a\x20file\x20path\x20to\x20write\x20the\x20configuration\x20to\x20(<name>.[json|yaml|yml])','token','stringify','trim','items','call','repeat','js-yaml','No,\x20repeat','loginPrompt','YES','subdomains','maximum','WARNING:\x20You\x20are\x20about\x20to\x20delete\x20','Something\x20unexpected\x20happened.','maxLength','completedAt','Choose\x20the\x20name\x20of\x20the\x20new\x20local\x20context:','confirmation','getInnerType','Context\x20name\x20already\x20exists.','project:\x20\x27','askForLogSink','found','find','yaml','Writing\x20configuration\x20failed:\x20','tokenPrompt','validate','askForClusterId','Enter\x20the\x20','grey','push','\x20(completedAt:\x20','template\x20run','REPEAT','3EfauVb','max','\x20in\x20','pipelines','unshift','hasOwnProperty','job\x20containers','example','getPathString','defineProperty','greenBright','fileName','askForTemplateRun','fetchResourceList','body','\x20and\x20it\x20','.*\x5c.(json|yaml|yml)$','createdAt','jobs','askForTemplate','templates','whiteBright','builds','don\x27t\x20change','cmdPath','\x20to\x20use:','default','description','paths','Choose\x20the\x20login\x20token:','search-list','minimum','isEmpty','Choose\x20the\x20','askConfirm','elements','askForPipeline','project','132INetAm','password','3057884ErQTWV','test','174559aHRkoK','minLength','has','editor','pattern','slice','bold','nextPageCursor','Unexpected\x20file\x20type:\x20','choice','Do\x20you\x20want\x20to\x20add','contextProvider','list','askForAddonBackup','this\x20option\x20is\x20required,\x20please\x20answer','next','askForSubdomain','__esModule','enum','No\x20builds\x20found','prompt','getQuestionString','Context\x20with\x20name\x20\x27','service:\x20\x27','job:\x20\x27','addon','280YsSOOZ','confirmationPrompt','editedResult','service\x20containers','332546enRiyA','No,\x20edit','askArrayEntry','askForContainer','SAVE','Configuration\x20file\x20written\x20to\x20','chalk','runs','volumes','charAt','askForProjectScopedResourcePaginated','projects','pathVars',',\x20supported\x20types:\x20[json|yaml|yml]','clusters','setPathVars','blueBright','secrets','pagination-prompt','yellowBright','3692352CCQVYG','integer','not\x20completed','askGeneric','done','tags','editPayload','isNaN','secret','lodash','\x20characters,\x20is\x20','value','EDIT','success','defaultPaginationPageSize','path','What\x20do\x20you\x20want\x20to\x20use\x20as','job','values','underline','doesn\x27t\x20match\x20pattern\x20\x27','job\x20runs','\x20type?','create','170195GYWATC','nextCursor','\x20(startedAt:\x20','isValidJSON','inquirer','retry','askForTag','green','./api-helpers','domain','properties','configurable','includes','reset','set','a\x20Northflank\x20resource','Do\x20you\x20want\x20to\x20add\x20more','assign','subdomain','DynamicReloadPaginationPrompt','for\x20this\x20','./utils','No\x20containers\x20found','askForBuild','name','resultCache','warning','message','red','addEntry','Please\x20confirm\x20following\x20configuration:\x0a','No\x20','array','then','domain\x20(','rawObject','getType','deleteWarningPrompt','type','to\x20use:','blue','data','No,\x20but\x20save\x20as\x20file','opt','askForService','Aborted.','Go\x20to\x20editor','prototype','Template\x20id\x20not\x20provided.','askForAddon','askForResourcePaginated','filter','\x20(full\x20domain:\x20','tmpCmdPath','keys','must\x20be\x20longer\x20than\x20or\x20equal\x20to\x20','startedAt','writeFileSync','backups','must\x20be\x20shorter\x20than\x20or\x20equal\x20to\x20','skipValidation','toString','pagination','registerPrompt','saveFile','subdomainPath','askForCredentials','split'];a8Z=function(){return Zf;};return a8Z();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a9L=a9J;function a9Z(){const f=['create','message','EventEmitter','catch','397966gMYyrr','error','emit','Unexpected\x20response,\x20api\x20token\x20missing','login-failure','done','8xPqgCM','default','stringify','Failure\x20during\x20login:\x20','hasOwnProperty','call','aborted','4914041EAicGq','18042hchWNy','3822133QhXjDo','defineProperty','startLogin','4042130QnpcLL','next','baseUrl','login-success','toString','NorthflankApiBrowserLogin','data','SIGINT','init','handleError','value','13xXwWeL','3CuGWIk','configurable','Failed\x20to\x20establish\x20connection\x20to\x20command\x20execution\x20proxy:\x20','initPackage','Login\x20process\x20stopped\x20before\x20completed','removeListener','Unexpected\x20response','success','type','12354060jJirwZ','status','__createBinding','replace','finally','801484GQMIjR','getOwnPropertyDescriptor','ws:','3AvtPik','end','570BhUIqS','then','write','9RZBmFz','__esModule','parse','writable','https:','open','duplex','init-ack','/v1/cli-login','wss:','__importStar','error\x20happened\x20during\x20browser\x20login:\x20'];a9Z=function(){return f;};return a9Z();}(function(Z,J){const m=a9J,z=Z();while(!![]){try{const P=parseInt(m(0x165))/0x1*(-parseInt(m(0x147))/0x2)+-parseInt(m(0x132))/0x3*(-parseInt(m(0x12f))/0x4)+parseInt(m(0x134))/0x5*(parseInt(m(0x155))/0x6)+-parseInt(m(0x156))/0x7*(-parseInt(m(0x14d))/0x8)+parseInt(m(0x137))/0x9*(parseInt(m(0x159))/0xa)+parseInt(m(0x154))/0xb+parseInt(m(0x12a))/0xc*(-parseInt(m(0x164))/0xd);if(P===J)break;else z['push'](z['shift']());}catch(B){z['push'](z['shift']());}}}(a9Z,0x4c94e));var __createBinding=this&&this[a9L(0x12c)]||(Object[a9L(0x143)]?function(Z,J,z,P){const M=a9L;if(P===undefined)P=z;var B=Object[M(0x130)](J,z);(!B||('get'in B?!J[M(0x138)]:B[M(0x13a)]||B[M(0x166)]))&&(B={'enumerable':!![],'get':function(){return J[z];}}),Object[M(0x157)](Z,P,B);}:function(Z,J,z,P){if(P===undefined)P=z;Z[P]=J[z];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(Z,J){Object['defineProperty'](Z,'default',{'enumerable':!![],'value':J});}:function(Z,J){Z['default']=J;}),__importStar=this&&this[a9L(0x141)]||function(Z){const x=a9L;if(Z&&Z['__esModule'])return Z;var J={};if(Z!=null){for(var z in Z)if(z!==x(0x14e)&&Object['prototype'][x(0x151)][x(0x152)](Z,z))__createBinding(J,Z,z);}return __setModuleDefault(J,Z),J;},__awaiter=this&&this['__awaiter']||function(Z,J,z,B){function U(s){return s instanceof z?s:new z(function(A){A(s);});}return new(z||(z=Promise))(function(s,A){function n(v){const d=a9J;try{C(B[d(0x15a)](v));}catch(o){A(o);}}function F(v){try{C(B['throw'](v));}catch(o){A(o);}}function C(v){const k=a9J;v[k(0x14c)]?s(v[k(0x163)]):U(v[k(0x163)])[k(0x135)](n,F);}C((B=B['apply'](Z,J||[]))['next']());});},__importDefault=this&&this['__importDefault']||function(Z){const N=a9L;return Z&&Z[N(0x138)]?Z:{'default':Z};};Object['defineProperty'](exports,a9L(0x138),{'value':!![]}),exports[a9L(0x15e)]=void 0x0;function a9J(Z,J){const z=a9Z();return a9J=function(P,B){P=P-0x123;let U=z[P];return U;},a9J(Z,J);}const ws_1=__importStar(require('ws')),open_1=__importDefault(require(a9L(0x13c))),events_1=require('events');class NorthflankApiBrowserLogin extends events_1[a9L(0x145)]{constructor(Z,J=!![]){const W=a9L;super(),this[W(0x15b)]=Z,this['openBrowser']=J,this[W(0x12b)]='idle',this[W(0x124)]=()=>JSON[W(0x14f)]({'type':'init'});}[a9L(0x158)](){const X=a9L;var Z;const J=this['baseUrl'][X(0x12d)](X(0x13b),X(0x140))[X(0x12d)]('http:',X(0x131)),z=J+X(0x13f),P=new ws_1[(X(0x14e))](z),B=()=>__awaiter(this,void 0x0,void 0x0,function*(){yield new Promise(s=>{const D=a9J;var A;(A=this['duplex'])===null||A===void 0x0?void 0x0:A[D(0x133)](JSON['stringify']({'type':D(0x153)}),()=>s());}),process['exit']();}),U=new Promise((s,A)=>{const q=X;var n,F,C;try{this[q(0x13d)]=(0x0,ws_1['createWebSocketStream'])(P),process['on'](q(0x160),B);}catch(v){A(new Error(q(0x123)+v[q(0x144)]));}(n=this[q(0x13d)])===null||n===void 0x0?void 0x0:n['on'](q(0x15f),o=>{const y=q;var j;const V=JSON[y(0x139)](o[y(0x15d)]());switch(V===null||V===void 0x0?void 0x0:V[y(0x129)]){case y(0x13e):{const {loginPage:i}=V;if(i===undefined){this['handleError'](y(0x127),A);return;}this['openBrowser']&&(0x0,open_1[y(0x14e)])(i)[y(0x146)](p=>{const O=y,S='Unable\x20to\x20open\x20browser:\x20'+p['message'];this[O(0x162)](S,A);});this[y(0x149)]('browser-opened',{'url':i});break;}case y(0x15c):{const {apiToken:p,contextName:S}=V;if(p===undefined){this[y(0x162)](y(0x14a),A);return;}(j=this[y(0x13d)])===null||j===void 0x0?void 0x0:j[y(0x133)](),s({'token':p,'contextName':S}),this[y(0x12b)]='success';break;}case y(0x14b):{const g=y(0x150)+(V===null||V===void 0x0?void 0x0:V[y(0x144)]);this[y(0x162)](g,A);break;}default:{const I='unable\x20to\x20parse\x20message:\x20'+JSON[y(0x14f)](V);this['handleError'](I,A);}}}),(F=this[q(0x13d)])===null||F===void 0x0?void 0x0:F['on'](q(0x148),o=>{const G=q;this[G(0x162)](G(0x142)+o[G(0x144)],A);}),(C=this[q(0x13d)])===null||C===void 0x0?void 0x0:C['on'](q(0x133),()=>{const K=q;if(this['status']===K(0x128)){}else this[K(0x162)](K(0x125),A);});});return(Z=this['duplex'])===null||Z===void 0x0?void 0x0:Z[X(0x136)](this[X(0x124)]()),this[X(0x12b)]=X(0x161),U[X(0x12e)](()=>{const l=X;process[l(0x126)](l(0x160),B);});}[a9L(0x162)](Z,J){const b=a9L;var z,P;J?(z=this['duplex'])===null||z===void 0x0?void 0x0:z[b(0x133)](()=>J(new Error(Z))):(P=this['duplex'])===null||P===void 0x0?void 0x0:P[b(0x133)](),this['status']='error';}}exports[a9L(0x15e)]=NorthflankApiBrowserLogin;
|
package/dist/logs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a10V0=a10I;(function(V,I){const w=a10I,v=V();while(!![]){try{const j=-parseInt(w(0x225))/0x1*(parseInt(w(0x230))/0x2)+parseInt(w(0x20c))/0x3*(parseInt(w(0x254))/0x4)+parseInt(w(0x268))/0x5*(-parseInt(w(0x20b))/0x6)+-parseInt(w(0x21e))/0x7+parseInt(w(0x20e))/0x8+-parseInt(w(0x213))/0x9*(-parseInt(w(0x264))/0xa)+-parseInt(w(0x266))/0xb;if(j===I)break;else v['push'](v['shift']());}catch(U){v['push'](v['shift']());}}}(a10V,0xa2627));function a10I(V,I){const v=a10V();return a10I=function(j,U){j=j-0x1e9;let l=v[j];return l;},a10I(V,I);}var __awaiter=this&&this['__awaiter']||function(V,I,v,j){function U(l){return l instanceof v?l:new v(function(x){x(l);});}return new(v||(v=Promise))(function(l,x){const r=a10I;function N(z){const A=a10I;try{D(j[A(0x1ff)](z));}catch(B){x(B);}}function e(z){try{D(j['throw'](z));}catch(B){x(B);}}function D(z){const m=a10I;z['done']?l(z[m(0x203)]):U(z[m(0x203)])[m(0x21a)](N,e);}D((j=j['apply'](V,I||[]))[r(0x1ff)]());});},__importDefault=this&&this[a10V0(0x22e)]||function(V){const V1=a10V0;return V&&V[V1(0x25d)]?V:{'default':V};};Object[a10V0(0x1f1)](exports,'__esModule',{'value':!![]}),exports[a10V0(0x1f6)]=void 0x0;const js_client_1=require(a10V0(0x234)),chalk_1=__importDefault(require(a10V0(0x1eb))),utils_1=require(a10V0(0x26e)),inquirer_helper_1=require('../inquirer-helper'),commander_1=require(a10V0(0x261)),console_format_helpers_1=require(a10V0(0x27d)),log_formatter_1=require(a10V0(0x215));function a10V(){const Vl=['--regexNotIncludes\x20<regex>','askForProject','description','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','tail','askForService','\x0aDetails:\x20','next','yml','Error\x20while\x20tailing\x20log\x20lines:\x20','service','value','backupId','askForBuild','getLogsCommand','setSeconds','restoreId','--container\x20--containerId\x20[containerId]','forward','66frGnih','48EbvAGH','start','272648mzeKJo','name','ApiClient','printInitInfo','askForJobRun','11671173jFOAqA','choices','./log-formatter','conflicts','noDefaults','\x20for\x20all\x20containers','Get\x20logs\x20generated\x20before\x20this\x20time,\x20','then','\x20--','values','logs','350903pzsWsh','>\x20Container\x20logs','addOption','Direction\x20of\x20logs.\x20Ignored\x20when\x20tailing.','length','Project\x20for\x20logs','alias','10lJOJgX','Which\x20log\x20types\x20to\x20fetch','yaml','apiClient','getStandardLogCommand','-o,\x20--output\x20[output]','json','Deployment\x20id,\x20example:\x20my-service-54785f4','Filter\x20log\x20lines\x20to\x20not\x20match\x20this\x20regular\x20expression','__importDefault','option','73054vuuKSM','forEach','Length\x20of\x20timespan\x20in\x20seconds.\x20Only\x20valid\x20if\x20not\x20both,\x20startTime\x20and\x20endTime\x20are\x20set','--startTime\x20<timestamp>','@northflank/js-client','build-','logs-received','regexIncludes','inquirerHelper','Backup\x20to\x20get\x20logs\x20from','close','Log\x20session\x20ended','Container\x20to\x20exec\x20into\x20(logs\x20from\x20all\x20containers\x20will\x20be\x20shown\x20if\x20not\x20specified)','askForAddonRestore','--textIncludes\x20<text>','-d,\x20--direction\x20<order>','getSeconds','addon','charAt','parseDateInput','logsApiClient','toISOString','--build\x20--buildId\x20[buildId]','Get\x20log\x20for\x20the\x20specified\x20','No\x20logs\x20found\x20for\x20this\x20query.\x20Make\x20sure\x20to\x20select\x20an\x20appropriate\x20time\x20window.','getCurrentJobName','\x20for\x20container\x20','getCommand','--endTime\x20<timestamp>','textNotIncludes','job','askForJob','getCurrentProjectName','-f,\x20--tail','runId','addonRestore','33636FjIGpv','apiContext','deploymentId','backward','textIncludes','\x20seconds','tsHint','hasNextPage','stringify','__esModule','defaultDurationSeconds','serviceId','Filter\x20log\x20lines\x20to\x20match\x20this\x20regular\x20expression','commander','--run\x20--runId\x20[runId]','containerId','10UoxurE','askForContainer','3935833IhKynX','warning','12315miVLdq','default','Id]','Tail\x20will\x20stream\x20logs\x20in\x20real-time.\x20Session\x20will\x20be\x20kept\x20open.','format','addonBackup','../utils','Output\x20formatting.\x20Will\x20use\x20advanced\x20formatting\x20by\x20default.','Element\x20count\x20for\x20this\x20request\x20exceeds\x20the\x20line\x20limit,\x20output\x20was\x20truncated.\x20Cut\x20off\x20at\x20timestamp\x20','error','valueOf','cursor','argParser','regexNotIncludes',',\x20duration:\x20','getFormatter','Option','message','-l,\x20--lineLimit\x20[limit]','--restore\x20--restoreId\x20[restoreId]','\x20to\x20get\x20logs\x20from','../formatting/console-format-helpers','Error\x20while\x20fetching\x20log\x20lines:\x20','\x20of\x20','--duration\x20[duration]','LogType','chalk','Id\x20[','log',',\x20backup\x20id\x20','assign','logRange','defineProperty','--noDefaults',',\x20restore\x20id\x20','bold','--deployment\x20--deploymentId\x20[deploymentId]','CliLogs','action'];a10V=function(){return Vl;};return a10V();}class CliLogs{constructor(V){const V2=a10V0;this[V2(0x255)]=V,this[V2(0x25e)]=0x708,this[V2(0x229)]=(I,v,j,U)=>{const V3=V2,l=(0x0,utils_1[V3(0x24b)])(!![])[V3(0x20f)]((v?'build-':'')+V3(0x21d))[V3(0x224)]((v?V3(0x235):'')+V3(0x1ed))[V3(0x1fa)](V3(0x247)+I)['option']('--project\x20--projectId\x20[projectId]',V3(0x223))[V3(0x22f)]('--'+I+V3(0x21b)+I+V3(0x1ec)+I+V3(0x26a),I[V3(0x242)](0x0)['toUpperCase']()+I['slice'](0x1)+V3(0x27c))[V3(0x22f)](V3(0x209),V3(0x23c));if(v)l[V3(0x22f)](V3(0x246),'Build\x20to\x20get\x20logs\x20from');if(I===V3(0x24e))l[V3(0x22f)](V3(0x262),'Job\x20run\x20id,\x20example:\x20162b1977-6636-4000-929b-cc265b862ff0');if(I===V3(0x202))l['option'](V3(0x1f5),V3(0x22c));if(j)l[V3(0x22f)]('--backup\x20--backupId\x20[backupId]',V3(0x239));if(U)l[V3(0x22f)](V3(0x27b),'Restore\x20to\x20get\x20logs\x20from');return!v&&!j&&!U&&l[V3(0x220)](new commander_1[(V3(0x278))]('-t,\x20--types\x20<types...>',V3(0x226))[V3(0x214)](Object[V3(0x21c)](js_client_1[V3(0x1ea)]))),l[V3(0x22f)](V3(0x251),V3(0x26b))[V3(0x22f)](V3(0x27a),'Number\x20of\x20lines\x20to\x20return.')[V3(0x22f)](V3(0x233),'Get\x20logs\x20generated\x20after\x20this\x20time,\x20'+utils_1[V3(0x25a)],utils_1[V3(0x243)])[V3(0x220)](new commander_1[(V3(0x278))](V3(0x24c),V3(0x219)+utils_1[V3(0x25a)])[V3(0x274)](utils_1[V3(0x243)])['conflicts']([V3(0x1fc)]))[V3(0x22f)](V3(0x1e9),V3(0x232))[V3(0x220)](new commander_1['Option'](V3(0x23f),V3(0x221))['choices']([V3(0x257),V3(0x20a)])[V3(0x216)]([V3(0x1fc)]))[V3(0x220)](new commander_1[(V3(0x278))](V3(0x23e),'Filter\x20log\x20lines\x20to\x20include\x20this\x20text')[V3(0x216)](['textNotIncludes',V3(0x237),V3(0x275)]))[V3(0x220)](new commander_1[(V3(0x278))]('--textNotIncludes\x20<text>','Filter\x20log\x20lines\x20to\x20not\x20include\x20this\x20text')[V3(0x216)]([V3(0x258),V3(0x237),V3(0x275)]))[V3(0x220)](new commander_1['Option']('--regexIncludes\x20<regex>',V3(0x260))[V3(0x216)]([V3(0x24d),V3(0x258),V3(0x275)]))[V3(0x220)](new commander_1[(V3(0x278))](V3(0x1f8),V3(0x22d))[V3(0x216)](['textNotIncludes',V3(0x237),'textIncludes']))[V3(0x22f)](V3(0x1f2),V3(0x1fb),![])[V3(0x220)](new commander_1['Option'](V3(0x22a),V3(0x26f))[V3(0x214)](Object[V3(0x21c)]([V3(0x26c),V3(0x22b),V3(0x227)]))),l;},this[V2(0x211)]=(I,v,j,U)=>{const V4=V2,{containerName:l,restoreId:x,backupId:N,quiet:e,tail:D,startTime:z,endTime:B,duration:Y}=U;if(e===!![])return;const i=D?'\x20(exit\x20with\x20'+chalk_1[V4(0x269)][V4(0x1f4)]('\x27Ctrl+C\x27')+')':'',o=D?'\x20with\x20live-tailing':'',H=new Date(),T=z!==null&&z!==void 0x0?z:new Date(new Date((B!==null&&B!==void 0x0?B:H)[V4(0x272)]())[V4(0x207)]((B!==null&&B!==void 0x0?B:H)['getSeconds']()-(Y!==null&&Y!==void 0x0?Y:this[V4(0x25e)]))),b=(B!==null&&B!==void 0x0?B:z!==undefined)?new Date(new Date(z['valueOf']())[V4(0x207)](z[V4(0x240)]()+(Y!==null&&Y!==void 0x0?Y:this[V4(0x25e)]))):H,M=N!==undefined,X=T&&!M?',\x20from:\x20'+chalk_1[V4(0x269)][V4(0x1f4)](T[V4(0x245)]()):'',E=b&&!M?',\x20to:\x20'+chalk_1[V4(0x269)][V4(0x1f4)](b[V4(0x245)]()):'',f=Y?V4(0x276)+Y+V4(0x259):'',G=l?V4(0x24a)+chalk_1[V4(0x269)][V4(0x1f4)](l):M?'':V4(0x218),P=N?V4(0x1ee)+N:'',a=x?V4(0x1f3)+x:'',s=I+'\x20'+chalk_1[V4(0x269)][V4(0x1f4)](v)+P+a+'\x20in\x20project\x20'+chalk_1[V4(0x269)][V4(0x1f4)](j),d=''+X+E+f;console[V4(0x1ed)](V4(0x21f)+o+G+V4(0x27f)+s+d+i+':');},this[V2(0x277)]=(I,v)=>(j,U)=>{const V5=V2;if(!I){if(j[V5(0x222)]===0x0)console[V5(0x1ed)](V5(0x248));j[V5(0x231)](x=>(0x0,log_formatter_1['formatLogLine'])(x,v));}else(0x0,console_format_helpers_1['printResponse'])(I,j);(U===null||U===void 0x0?void 0x0:U[V5(0x25b)])&&(0x0,utils_1[V5(0x267)])(V5(0x270)+U[V5(0x273)]);},this[V2(0x228)]=new js_client_1[(V2(0x210))](V,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1['customUserAgent']}),this[V2(0x244)]=this[V2(0x228)],this[V2(0x238)]=new inquirer_helper_1['InquirerHelper'](this[V2(0x228)]);}[a10V0(0x206)](V,I=![],v=![],j=![]){const Vj=a10V0,U=(B,Y)=>__awaiter(this,void 0x0,void 0x0,function*(){const V6=a10I,i=Y[V6(0x217)],{apiContext:o,inquirerHelper:H}=this;switch(V){case V6(0x202):{const T=i?undefined:o['getCurrentServiceName']();return Y[V6(0x25f)]||T||(yield H[V6(0x1fd)](B)());}case V6(0x24e):{const b=i?undefined:o[V6(0x249)]();return Y['jobId']||b||(yield H[V6(0x24f)](B)());}case V6(0x241):{return Y['addonId']||(yield H['askForAddon'](B)());}}}),l=(B,Y,i)=>__awaiter(this,void 0x0,void 0x0,function*(){const V7=a10I;if(I)return i['buildId']||(yield this[V7(0x238)][V7(0x205)](B,V===V7(0x202)?Y:undefined,V===V7(0x24e)?Y:undefined,!![])());return undefined;}),x=(B,Y,i)=>__awaiter(this,void 0x0,void 0x0,function*(){const V8=a10I;if(v||j)return i[V8(0x204)]||(yield this[V8(0x238)]['askForAddonBackup'](B,Y)());return undefined;}),N=(B,Y,i,o)=>__awaiter(this,void 0x0,void 0x0,function*(){const V9=a10I;if(j)return o[V9(0x208)]||(yield this[V9(0x238)][V9(0x23d)](B,Y,i)());return undefined;}),e=(B,Y,i)=>__awaiter(this,void 0x0,void 0x0,function*(){const VV=a10I;if(!I&&i[VV(0x263)]!==undefined){if(i[VV(0x263)]!==!![])return i[VV(0x263)];return yield this[VV(0x238)][VV(0x265)](B,V===VV(0x202)?Y:undefined,V===VV(0x24e)?Y:undefined,!![])();}return undefined;}),D=(B,Y,i)=>__awaiter(this,void 0x0,void 0x0,function*(){const VI=a10I;if(V===VI(0x24e))return i[VI(0x252)]||(yield this[VI(0x238)][VI(0x212)](Y,B,!![])());return undefined;}),z=(B,Y,i)=>__awaiter(this,void 0x0,void 0x0,function*(){const Vv=a10I;if(V===Vv(0x202)){if(i['deploymentId']!==!![])return i[Vv(0x256)];return i[Vv(0x256)];}return undefined;});return this[Vj(0x229)](V,I,v,j)[Vj(0x1f7)](B=>__awaiter(this,void 0x0,void 0x0,function*(){const VU=Vj,{noDefaults:Y,projectId:i,quiet:o,tail:H,types:T,textIncludes:b,textNotIncludes:M,regexIncludes:X,regexNotIncludes:E,direction:f,lineLimit:G,startTime:P,endTime:a,duration:s,output:d}=B;(0x0,utils_1['assertContextExisting'])(this[VU(0x228)]);const {apiContext:t,inquirerHelper:R,logsApiClient:u}=this,n=Y?undefined:t[VU(0x250)](),q=i||n||(yield R[VU(0x1f9)]()),J=yield U(q,B),L=yield l(q,J,B),Z=yield x(q,J,B),S=yield N(q,J,Z,B),h=yield D(q,J,B),Q=yield z(q,J,B),F=yield e(q,J,B);if(P&&a&&s)throw new Error('Only\x20two\x20of\x20\x27startTime\x27,\x20\x27endTime\x27\x20and\x20\x27duration\x27\x20can\x20be\x20set.');const W={'projectId':q,'entityId':J},y={'containerName':F,'types':T,'textIncludes':b,'textNotIncludes':M,'regexIncludes':X,'regexNotIncludes':E,'lineLimit':G,'startTime':P,'duration':s,'runId':h,'buildId':L,'backupId':Z,'restoreId':S,'deploymentId':Q,'isBuild':I!==null&&I!==void 0x0?I:![]},p=j?VU(0x253):v?VU(0x26d):V,c=Object[VU(0x1ef)](Object[VU(0x1ef)]({},y),{'endTime':a,'direction':f});if(!o&&d!==VU(0x227)&&d!==VU(0x200)&&d!==VU(0x22b))this['printInitInfo'](V,J,q,Object[VU(0x1ef)](Object[VU(0x1ef)]({},c),B));const g=this[VU(0x277)](d,b!==null&&b!==void 0x0?b:X);if(H){const K=yield u['logs']['logTail'](W,y,p);K['on'](VU(0x236),g),K['on'](VU(0x271),C=>(0x0,utils_1['error'])(VU(0x201)+C[VU(0x279)])),K['on'](VU(0x23a),()=>console[VU(0x1ed)](VU(0x23b))),yield K[VU(0x20d)]();}else{const C=yield u[VU(0x21d)][VU(0x1f0)](W,c,p);if(C[VU(0x271)]){const k=C[VU(0x271)]['details'],O=k?VU(0x1fe)+JSON[VU(0x25c)](k,null,'\x20'):'';(0x0,utils_1['error'])(VU(0x27e)+C[VU(0x271)][VU(0x279)]+O);}else g(C['data'],C['pagination']);}}));}}exports[a10V0(0x1f6)]=CliLogs;
|
|
1
|
+
'use strict';const a10H=a10J;(function(Z,J){const u=a10J,z=Z();while(!![]){try{const P=parseInt(u(0x13a))/0x1+parseInt(u(0xc4))/0x2*(parseInt(u(0x115))/0x3)+-parseInt(u(0xde))/0x4+parseInt(u(0x125))/0x5+-parseInt(u(0xb2))/0x6*(-parseInt(u(0xf4))/0x7)+parseInt(u(0xca))/0x8+-parseInt(u(0x107))/0x9;if(P===J)break;else z['push'](z['shift']());}catch(B){z['push'](z['shift']());}}}(a10Z,0xbe5b6));function a10Z(){const Zs=['defaultDurationSeconds','throw','valueOf','runId','\x20for\x20container\x20','logs','containerId','__awaiter','askForAddonRestore','Element\x20count\x20for\x20this\x20request\x20exceeds\x20the\x20line\x20limit,\x20output\x20was\x20truncated.\x20Cut\x20off\x20at\x20timestamp\x20','1081437JZDoIc','description','getCurrentJobName','logsApiClient','askForAddon','__importDefault','getCommand','json','--duration\x20[duration]','logRange','Filter\x20log\x20lines\x20to\x20match\x20this\x20regular\x20expression','addonRestore','job','getStandardLogCommand','__esModule','--deployment\x20--deploymentId\x20[deploymentId]','--project\x20--projectId\x20[projectId]','Project\x20for\x20logs','alias','3574980Szxglu','logs-received','assign','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','Id\x20[','-t,\x20--types\x20<types...>','format','values','textIncludes','Deployment\x20id,\x20example:\x20my-service-54785f4','stringify','--run\x20--runId\x20[runId]','charAt','askForContainer','21zCgQRm','--noDefaults','askForBuild','Output\x20formatting.\x20Will\x20use\x20advanced\x20formatting\x20by\x20default.','choices','message','addon',',\x20to:\x20','parseDateInput','name','--textNotIncludes\x20<text>','askForProject','done','restoreId','\x27Ctrl+C\x27','regexNotIncludes','1495565CkYlFV','service','--textIncludes\x20<text>','chalk','\x20of\x20','data','customUserAgent','printResponse','Backup\x20to\x20get\x20logs\x20from','./log-formatter','cursor','build-','next',',\x20from:\x20','printInitInfo','toISOString','>\x20Container\x20logs','Number\x20of\x20lines\x20to\x20return.','conflicts','warning','apply','405734OPRFbB',',\x20restore\x20id\x20','--endTime\x20<timestamp>','--build\x20--buildId\x20[buildId]','Only\x20two\x20of\x20\x27startTime\x27,\x20\x27endTime\x27\x20and\x20\x27duration\x27\x20can\x20be\x20set.','commander','option','Error\x20while\x20tailing\x20log\x20lines:\x20','forward','\x20with\x20live-tailing','Container\x20to\x20exec\x20into\x20(logs\x20from\x20all\x20containers\x20will\x20be\x20shown\x20if\x20not\x20specified)','Job\x20run\x20id,\x20example:\x20162b1977-6636-4000-929b-cc265b862ff0','serviceId','addonId','noDefaults','apiClient','../utils','tsHint','6PqbgQY','argParser','-d,\x20--direction\x20<order>','deploymentId','\x20--','Tail\x20will\x20stream\x20logs\x20in\x20real-time.\x20Session\x20will\x20be\x20kept\x20open.','log',',\x20backup\x20id\x20','askForAddonBackup','default','Filter\x20log\x20lines\x20to\x20not\x20include\x20this\x20text','hasNextPage','details','askForService','close','logTail','slice','bold','96010bVaAyp','\x20in\x20project\x20','Get\x20logs\x20generated\x20before\x20this\x20time,\x20','getCurrentServiceName','getSeconds','--startTime\x20<timestamp>','7791816nDctfA','../formatting/console-format-helpers','Option','Filter\x20log\x20lines\x20to\x20include\x20this\x20text','error','textNotIncludes','addOption','regexIncludes','Get\x20log\x20for\x20the\x20specified\x20','CliLogs','action','yaml','getFormatter','\x20(exit\x20with\x20','\x20for\x20all\x20containers','Build\x20to\x20get\x20logs\x20from','setSeconds','addonBackup','inquirerHelper','-o,\x20--output\x20[output]','3969712BaVdIb','-f,\x20--tail','assertContextExisting','--container\x20--containerId\x20[containerId]','forEach','--regexIncludes\x20<regex>','backupId','-l,\x20--lineLimit\x20[limit]','ApiClient','Id]','value','../inquirer-helper'];a10Z=function(){return Zs;};return a10Z();}var __awaiter=this&&this[a10H(0xf1)]||function(Z,J,z,B){function U(s){return s instanceof z?s:new z(function(A){A(s);});}return new(z||(z=Promise))(function(s,A){const Z1=a10J;function n(v){const Y=a10J;try{C(B[Y(0x131)](v));}catch(o){A(o);}}function F(v){const E=a10J;try{C(B[E(0xeb)](v));}catch(o){A(o);}}function C(v){const Z0=a10J;v[Z0(0x121)]?s(v[Z0(0xe8)]):U(v['value'])['then'](n,F);}C((B=B[Z1(0x139)](Z,J||[]))[Z1(0x131)]());});},__importDefault=this&&this[a10H(0xf9)]||function(Z){const Z2=a10H;return Z&&Z[Z2(0x102)]?Z:{'default':Z};};function a10J(Z,J){const z=a10Z();return a10J=function(P,B){P=P-0xa8;let U=z[P];return U;},a10J(Z,J);}Object['defineProperty'](exports,a10H(0x102),{'value':!![]}),exports[a10H(0xd3)]=void 0x0;const js_client_1=require('@northflank/js-client'),chalk_1=__importDefault(require(a10H(0x128))),utils_1=require(a10H(0xb0)),inquirer_helper_1=require(a10H(0xe9)),commander_1=require(a10H(0x13f)),console_format_helpers_1=require(a10H(0xcb)),log_formatter_1=require(a10H(0x12e));class CliLogs{constructor(Z){const Z3=a10H;this['apiContext']=Z,this[Z3(0xea)]=0x708,this[Z3(0x101)]=(J,z,P,B)=>{const Z4=Z3,U=(0x0,utils_1[Z4(0xfa)])(!![])[Z4(0x11e)]((z?Z4(0x130):'')+'logs')[Z4(0x106)]((z?'build-':'')+Z4(0xb8))[Z4(0xf5)](Z4(0xd2)+J)[Z4(0x140)](Z4(0x104),Z4(0x105))[Z4(0x140)]('--'+J+Z4(0xb6)+J+Z4(0x10b)+J+Z4(0xe7),J[Z4(0x113)](0x0)['toUpperCase']()+J[Z4(0xc2)](0x1)+'\x20to\x20get\x20logs\x20from')[Z4(0x140)](Z4(0xe1),Z4(0xaa));if(z)U['option'](Z4(0x13d),Z4(0xd9));if(J==='job')U['option'](Z4(0x112),Z4(0xab));if(J===Z4(0x126))U[Z4(0x140)](Z4(0x103),Z4(0x110));if(P)U[Z4(0x140)]('--backup\x20--backupId\x20[backupId]',Z4(0x12d));if(B)U[Z4(0x140)]('--restore\x20--restoreId\x20[restoreId]','Restore\x20to\x20get\x20logs\x20from');return!z&&!P&&!B&&U[Z4(0xd0)](new commander_1[(Z4(0xcc))](Z4(0x10c),'Which\x20log\x20types\x20to\x20fetch')[Z4(0x119)](Object[Z4(0x10e)](js_client_1['LogType']))),U[Z4(0x140)](Z4(0xdf),Z4(0xb7))[Z4(0x140)](Z4(0xe5),Z4(0x136))[Z4(0x140)](Z4(0xc9),'Get\x20logs\x20generated\x20after\x20this\x20time,\x20'+utils_1[Z4(0xb1)],utils_1[Z4(0x11d)])[Z4(0xd0)](new commander_1[(Z4(0xcc))](Z4(0x13c),Z4(0xc6)+utils_1['tsHint'])[Z4(0xb3)](utils_1[Z4(0x11d)])[Z4(0x137)](['tail']))[Z4(0x140)](Z4(0xfc),'Length\x20of\x20timespan\x20in\x20seconds.\x20Only\x20valid\x20if\x20not\x20both,\x20startTime\x20and\x20endTime\x20are\x20set')['addOption'](new commander_1['Option'](Z4(0xb4),'Direction\x20of\x20logs.\x20Ignored\x20when\x20tailing.')[Z4(0x119)](['backward',Z4(0xa8)])[Z4(0x137)](['tail']))['addOption'](new commander_1[(Z4(0xcc))](Z4(0x127),Z4(0xcd))[Z4(0x137)](['textNotIncludes',Z4(0xd1),'regexNotIncludes']))[Z4(0xd0)](new commander_1[(Z4(0xcc))](Z4(0x11f),Z4(0xbc))['conflicts']([Z4(0x10f),Z4(0xd1),'regexNotIncludes']))[Z4(0xd0)](new commander_1[(Z4(0xcc))](Z4(0xe3),Z4(0xfe))['conflicts']([Z4(0xcf),Z4(0x10f),Z4(0x124)]))['addOption'](new commander_1[(Z4(0xcc))]('--regexNotIncludes\x20<regex>','Filter\x20log\x20lines\x20to\x20not\x20match\x20this\x20regular\x20expression')[Z4(0x137)](['textNotIncludes',Z4(0xd1),'textIncludes']))[Z4(0x140)](Z4(0x116),Z4(0x10a),![])[Z4(0xd0)](new commander_1[(Z4(0xcc))](Z4(0xdd),Z4(0x118))[Z4(0x119)](Object['values']([Z4(0x10d),'json',Z4(0xd5)]))),U;},this[Z3(0x133)]=(J,z,P,B)=>{const Z5=Z3,{containerName:U,restoreId:s,backupId:A,quiet:n,tail:F,startTime:C,endTime:v,duration:o}=B;if(n===!![])return;const j=F?Z5(0xd7)+chalk_1['default']['bold'](Z5(0x123))+')':'',V=F?Z5(0xa9):'',i=new Date(),p=C!==null&&C!==void 0x0?C:new Date(new Date((v!==null&&v!==void 0x0?v:i)[Z5(0xec)]())['setSeconds']((v!==null&&v!==void 0x0?v:i)[Z5(0xc8)]()-(o!==null&&o!==void 0x0?o:this['defaultDurationSeconds']))),S=(v!==null&&v!==void 0x0?v:C!==undefined)?new Date(new Date(C[Z5(0xec)]())[Z5(0xda)](C[Z5(0xc8)]()+(o!==null&&o!==void 0x0?o:this[Z5(0xea)]))):i,e=A!==undefined,g=p&&!e?Z5(0x132)+chalk_1[Z5(0xbb)][Z5(0xc3)](p['toISOString']()):'',I=S&&!e?Z5(0x11c)+chalk_1[Z5(0xbb)][Z5(0xc3)](S[Z5(0x134)]()):'',m=o?',\x20duration:\x20'+o+'\x20seconds':'',L=U?Z5(0xee)+chalk_1[Z5(0xbb)][Z5(0xc3)](U):e?'':Z5(0xd8),M=A?Z5(0xb9)+A:'',x=s?Z5(0x13b)+s:'',d=J+'\x20'+chalk_1[Z5(0xbb)]['bold'](z)+M+x+Z5(0xc5)+chalk_1[Z5(0xbb)][Z5(0xc3)](P),k=''+g+I+m;console[Z5(0xb8)](Z5(0x135)+V+L+Z5(0x129)+d+k+j+':');},this['getFormatter']=(J,z)=>(P,B)=>{const Z6=Z3;if(!J){if(P['length']===0x0)console[Z6(0xb8)]('No\x20logs\x20found\x20for\x20this\x20query.\x20Make\x20sure\x20to\x20select\x20an\x20appropriate\x20time\x20window.');P[Z6(0xe2)](U=>(0x0,log_formatter_1['formatLogLine'])(U,z));}else(0x0,console_format_helpers_1[Z6(0x12c)])(J,P);(B===null||B===void 0x0?void 0x0:B[Z6(0xbd)])&&(0x0,utils_1[Z6(0x138)])(Z6(0xf3)+B[Z6(0x12f)]);},this[Z3(0xaf)]=new js_client_1[(Z3(0xe6))](Z,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[Z3(0x12b)]}),this[Z3(0xf7)]=this[Z3(0xaf)],this[Z3(0xdc)]=new inquirer_helper_1['InquirerHelper'](this[Z3(0xaf)]);}['getLogsCommand'](Z,J=![],z=![],P=![]){const ZB=a10H,B=(v,o)=>__awaiter(this,void 0x0,void 0x0,function*(){const Z7=a10J,j=o[Z7(0xae)],{apiContext:V,inquirerHelper:i}=this;switch(Z){case Z7(0x126):{const p=j?undefined:V[Z7(0xc7)]();return o[Z7(0xac)]||p||(yield i[Z7(0xbf)](v)());}case Z7(0x100):{const S=j?undefined:V[Z7(0xf6)]();return o['jobId']||S||(yield i['askForJob'](v)());}case Z7(0x11b):{return o[Z7(0xad)]||(yield i[Z7(0xf8)](v)());}}}),U=(v,o,j)=>__awaiter(this,void 0x0,void 0x0,function*(){const Z8=a10J;if(J)return j['buildId']||(yield this['inquirerHelper'][Z8(0x117)](v,Z==='service'?o:undefined,Z===Z8(0x100)?o:undefined,!![])());return undefined;}),s=(v,o,j)=>__awaiter(this,void 0x0,void 0x0,function*(){const Z9=a10J;if(z||P)return j[Z9(0xe4)]||(yield this[Z9(0xdc)][Z9(0xba)](v,o)());return undefined;}),A=(v,o,j,V)=>__awaiter(this,void 0x0,void 0x0,function*(){const ZZ=a10J;if(P)return V[ZZ(0x122)]||(yield this[ZZ(0xdc)][ZZ(0xf2)](v,o,j)());return undefined;}),n=(v,o,j)=>__awaiter(this,void 0x0,void 0x0,function*(){const ZJ=a10J;if(!J&&j[ZJ(0xf0)]!==undefined){if(j[ZJ(0xf0)]!==!![])return j[ZJ(0xf0)];return yield this[ZJ(0xdc)][ZJ(0x114)](v,Z===ZJ(0x126)?o:undefined,Z===ZJ(0x100)?o:undefined,!![])();}return undefined;}),F=(v,o,j)=>__awaiter(this,void 0x0,void 0x0,function*(){const Zz=a10J;if(Z===Zz(0x100))return j[Zz(0xed)]||(yield this['inquirerHelper']['askForJobRun'](o,v,!![])());return undefined;}),C=(v,o,j)=>__awaiter(this,void 0x0,void 0x0,function*(){const ZP=a10J;if(Z===ZP(0x126)){if(j[ZP(0xb5)]!==!![])return j[ZP(0xb5)];return j[ZP(0xb5)];}return undefined;});return this[ZB(0x101)](Z,J,z,P)[ZB(0xd4)](v=>__awaiter(this,void 0x0,void 0x0,function*(){const ZU=ZB,{noDefaults:o,projectId:j,quiet:V,tail:i,types:p,textIncludes:S,textNotIncludes:e,regexIncludes:g,regexNotIncludes:I,direction:m,lineLimit:L,startTime:M,endTime:x,duration:d,output:k}=v;(0x0,utils_1[ZU(0xe0)])(this[ZU(0xaf)]);const {apiContext:N,inquirerHelper:W,logsApiClient:X}=this,D=o?undefined:N['getCurrentProjectName'](),q=j||D||(yield W[ZU(0x120)]()),y=yield B(q,v),O=yield U(q,y,v),G=yield s(q,y,v),K=yield A(q,y,G,v),l=yield F(q,y,v),b=yield C(q,y,v),f=yield n(q,y,v);if(M&&x&&d)throw new Error(ZU(0x13e));const r={'projectId':q,'entityId':y},w={'containerName':f,'types':p,'textIncludes':S,'textNotIncludes':e,'regexIncludes':g,'regexNotIncludes':I,'lineLimit':L,'startTime':M,'duration':d,'runId':l,'buildId':O,'backupId':G,'restoreId':K,'deploymentId':b,'isBuild':J!==null&&J!==void 0x0?J:![]},Q=P?ZU(0xff):z?ZU(0xdb):Z,T=Object[ZU(0x109)](Object[ZU(0x109)]({},w),{'endTime':x,'direction':m});if(!V&&k!==ZU(0xd5)&&k!=='yml'&&k!==ZU(0xfb))this[ZU(0x133)](Z,y,q,Object['assign'](Object[ZU(0x109)]({},T),v));const c=this[ZU(0xd6)](k,S!==null&&S!==void 0x0?S:g);if(i){const t=yield X['logs'][ZU(0xc1)](r,w,Q);t['on'](ZU(0x108),c),t['on'](ZU(0xce),R=>(0x0,utils_1[ZU(0xce)])(ZU(0x141)+R[ZU(0x11a)])),t['on'](ZU(0xc0),()=>console[ZU(0xb8)]('Log\x20session\x20ended')),yield t['start']();}else{const R=yield X[ZU(0xef)][ZU(0xfd)](r,T,Q);if(R[ZU(0xce)]){const h=R[ZU(0xce)][ZU(0xbe)],a=h?'\x0aDetails:\x20'+JSON[ZU(0x111)](h,null,'\x20'):'';(0x0,utils_1[ZU(0xce)])('Error\x20while\x20fetching\x20log\x20lines:\x20'+R['error'][ZU(0x11a)]+a);}else c(R[ZU(0x12a)],R['pagination']);}}));}}exports['CliLogs']=CliLogs;
|