@northflank/cli 0.9.11 → 0.9.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-helpers.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/context/contextCommands.js +1 -1
- package/dist/defaults.js +1 -1
- package/dist/exec/index.js +1 -1
- package/dist/formatting/command-overview.js +1 -1
- package/dist/formatting/console-format-helpers.js +1 -1
- package/dist/formatting/terminal-chart.js +1 -1
- package/dist/inquirer-helper.js +1 -1
- package/dist/login/browser-login.js +1 -1
- package/dist/logs/index.js +1 -1
- package/dist/logs/log-formatter.js +1 -1
- package/dist/metrics/index.js +1 -1
- package/dist/pagination/inquirer-pagination-prompt.js +1 -1
- package/dist/port-forward/index.js +1 -1
- package/dist/utils.js +1 -1
- package/package.json +2 -2
package/dist/exec/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a4v=a4k;(function(H,k){const n=a4k,S=H();while(!![]){try{const W=parseInt(n(0x196))/0x1*(parseInt(n(0x1b0))/0x2)+-parseInt(n(0x1b1))/0x3+parseInt(n(0x1b2))/0x4+-parseInt(n(0x18b))/0x5+parseInt(n(0x1c9))/0x6*(parseInt(n(0x1be))/0x7)+-parseInt(n(0x1c7))/0x8+parseInt(n(0x19c))/0x9*(parseInt(n(0x1d3))/0xa);if(W===k)break;else S['push'](S['shift']());}catch(Z){S['push'](S['shift']());}}}(a4H,0x4061f));var __awaiter=this&&this[a4v(0x1c8)]||function(H,k,S,W){function Z(y){return y instanceof S?y:new S(function(O){O(y);});}return new(S||(S=Promise))(function(y,O){const c=a4k;function b(r){const N=a4k;try{j(W[N(0x1b9)](r));}catch(V){O(V);}}function h(r){const i=a4k;try{j(W[i(0x1c3)](r));}catch(V){O(V);}}function j(r){const o=a4k;r[o(0x1b3)]?y(r[o(0x194)]):Z(r[o(0x194)])[o(0x1cb)](b,h);}j((W=W[c(0x1d5)](H,k||[]))['next']());});},__importDefault=this&&this[a4v(0x1d9)]||function(H){const x=a4v;return H&&H[x(0x1da)]?H:{'default':H};};Object[a4v(0x1c5)](exports,a4v(0x1da),{'value':!![]}),exports[a4v(0x1c4)]=void 0x0;const js_client_1=require(a4v(0x183)),chalk_1=__importDefault(require('chalk')),utils_1=require(a4v(0x1ae)),inquirer_helper_1=require('../inquirer-helper');function a4H(){const T=['Run\x20command\x20with\x20this\x20user','askForService','alias','isTTY','\x20command\x20exec:\x20','next','success','service','waitForCommandResult','InquirerHelper','966WElLyB','status','emitKeypressEvents','--cmd\x20--command\x20[COMMAND]','askForProject','throw','CliExec','defineProperty','Unknown','3392312RrRedM','__awaiter','12786JqkxdM','shell\x20command\x20','then','Error\x20occured\x20during\x20','setRawMode','filter','exec','bold','ApiClient','none','181340hVNgfW','\x20to\x20exec\x20into','apply','assertContextExisting','keypress','--container\x20--containerId\x20[NAME]','__importDefault','__esModule','execJobSession',',\x20exit\x20code:\x20','with\x20user:','Command\x20completed\x20successfully,\x20exit\x20code:\x20','getCommand','Run\x20command\x20with\x20shell\x20(e.g.\x20bash,sh).\x20If\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','Command\x20to\x20execute,\x20if\x20--shell\x20option\x20is\x20present,\x20it\x20will\x20run\x20in\x20the\x20specified\x20shell,\x20otherwise','Success','Exec\x20','resizeTerminal','message','--user\x20[USER]','option','execCmd','stdOut','@northflank/js-client','\x27Ctrl+D\x27','apiClient','exitCode','readline','handleShellSession','execStartLog','without\x20shell','1369095mEsPoh','Id\x20[NAME]',',\x20details:\x20','error','log','stdout','addCommand','execServiceSession','getCurrentProjectName','value','resize','579wXNjes','with\x20shell\x20session','pipe','stdin','stdErr','\x20--','18nkVWvU','charAt','rows','stdIn','toUpperCase','getStandardExecCommand','getTerminalSize','slice','default','join','--group\x20[GROUP]','action','description','exit','Command\x20exec\x20for\x20the\x20specified\x20','name','job','warning','../utils','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','1528oJzXxg','270093oFZZJM','1115592AtVXEh','done'];a4H=function(){return T;};return a4H();}function a4k(H,k){const S=a4H();return a4k=function(W,Z){W=W-0x17e;let y=S[W];return y;},a4k(H,k);}class CliExec{constructor(H){const Y=a4v;this[Y(0x1a1)]=Z=>(0x0,utils_1['getCommand'])(!![])[Y(0x1ab)](Z)['description'](Y(0x1aa)+Z)['option']('--project\x20--projectId\x20[NAME]','Project\x20for\x20exec')[Y(0x180)]('--'+Z+Y(0x19b)+Z+Y(0x18c),Z[Y(0x19d)](0x0)[Y(0x1a0)]()+Z[Y(0x1a3)](0x1)+Y(0x1d4))[Y(0x180)](Y(0x1d8),'Container\x20to\x20exec\x20into\x20(random\x20container\x20will\x20be\x20chosen\x20if\x20not\x20specified)')[Y(0x180)]('--shell-cmd\x20[SHELL-CMD]',Y(0x1e0))[Y(0x180)](Y(0x17f),Y(0x1b4))['option'](Y(0x1a6),'Run\x20command\x20with\x20this\x20group')[Y(0x180)]('--noDefaults',Y(0x1af),![])[Y(0x180)](Y(0x1c1),Y(0x1e1)),this[Y(0x1a2)]=()=>({'columns':process[Y(0x190)]['columns'],'rows':process['stdout'][Y(0x19e)]}),this[Y(0x189)]=(Z,y,O,b,h,j,r,V)=>{const R=Y;if(V===!![])return;const f=b===R(0x1d2),M=f?R(0x18a):b===undefined?R(0x197):R(0x1ca)+chalk_1[R(0x1a4)]['greenBright'](b),C=h!==undefined?R(0x1dd)+h:'',z=j!==undefined?'with\x20group:'+j:'',G=r!==undefined?'with\x20command\x20\x27'+chalk_1['default']['greenBright'](r)+'\x27':'',d=[G,M,C,z][R(0x1ce)](U=>U!=='')[R(0x1a5)]('\x20'),e='(exit\x20with\x20two\x20quick\x20'+chalk_1[R(0x1a4)][R(0x1d0)](R(0x184))+')';console[R(0x18f)](R(0x1e3)+Z+'\x20'+chalk_1[R(0x1a4)][R(0x1d0)](y)+'\x20in\x20project\x20'+chalk_1[R(0x1a4)][R(0x1d0)](O)+'\x20'+d+'\x20'+e);},this[Y(0x188)]=(Z,y,O=![])=>__awaiter(this,void 0x0,void 0x0,function*(){const g=Y;var b,h;let j=![];try{if(process[g(0x199)]['isTTY']){const V=require(g(0x187));V[g(0x1c0)](process['stdin']),process[g(0x199)][g(0x1cd)](!![]),process[g(0x190)]['on'](g(0x195),()=>{const F=g;Z[F(0x1e4)](this['getTerminalSize']());}),process[g(0x199)]['on'](g(0x1d7),(f,M)=>{const A=g;M['sequence']==='\x04'&&(j?(process[A(0x199)][A(0x1cd)](![]),(0x0,utils_1[A(0x1ad)])('Received\x20Ctrl+D\x20twice,\x20exiting\x20shell\x20forcefully.'),process[A(0x1a9)]()):(j=!![],setTimeout(()=>j=![],0x190)));});}process[g(0x199)][g(0x198)](Z[g(0x19f)]),Z[g(0x19a)]['pipe'](process['stderr']),Z[g(0x182)]['pipe'](process[g(0x190)]),Z['on'](g(0x18e),f=>{const L=g;var M;(0x0,utils_1['error'])(L(0x1cc)+y+L(0x1b8)+((M=f[L(0x17e)])!==null&&M!==void 0x0?M:f)),process[L(0x199)][L(0x1b7)]&&process[L(0x199)]['setRawMode'](![]),process[L(0x1a9)](-0x1);});const r=yield Z[g(0x1bc)]();if(O!==!![]){const f=(b=r===null||r===void 0x0?void 0x0:r[g(0x1bf)])!==null&&b!==void 0x0?b:g(0x1c6),M=(h=r===null||r===void 0x0?void 0x0:r[g(0x186)])!==null&&h!==void 0x0?h:-0x1,C=(r===null||r===void 0x0?void 0x0:r[g(0x17e)])?g(0x18d)+r[g(0x17e)]:'';f===g(0x1e2)?(0x0,utils_1[g(0x1ba)])(g(0x1de)+M):(0x0,utils_1['warning'])('Command\x20didn\x27t\x20complete\x20successfully,\x20status:\x20'+f+g(0x1dc)+M+C);}return r;}finally{process[g(0x199)][g(0x1b7)]&&process['stdin']['setRawMode'](![]);}}),this[Y(0x185)]=new js_client_1[(Y(0x1d1))](H,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1['customUserAgent']});const k=new inquirer_helper_1[(Y(0x1bd))](this[Y(0x185)]);this[Y(0x181)]=(0x0,utils_1[Y(0x1df)])()[Y(0x1ab)]('command-exec')[Y(0x1b6)](Y(0x1cf))[Y(0x1a8)]('Command\x20execution\x20(exec)\x20for\x20Northflank\x20services\x20and\x20jobs.');const S=this[Y(0x1a1)](Y(0x1bb))[Y(0x1a7)](Z=>__awaiter(this,void 0x0,void 0x0,function*(){const s=Y,{noDefaults:y,projectId:O,serviceId:b,containerId:h,shellCmd:j,user:r,group:V,command:f,quiet:M}=Z;(0x0,utils_1['assertContextExisting'])(this[s(0x185)]);try{const C=y?undefined:H[s(0x193)](),z=O||C||(yield k[s(0x1c2)]()),G=y?undefined:H['getCurrentServiceName'](),d=b||G||(yield k[s(0x1b5)](z)()),m=j!==null&&j!==void 0x0?j:f!==undefined?'none':undefined;this[s(0x189)]('service',d,z,m,r,V,f,M);const U=process[s(0x190)]['columns'],K=process[s(0x190)][s(0x19e)],l={'projectId':z,'serviceId':d},J=yield this['apiClient'][s(0x1cf)][s(0x192)](l,{'containerName':h,'command':f,'shell':m,'user':r,'group':V,'ttyColumns':U,'ttyRows':K});yield this[s(0x188)](J,s(0x1bb),M);}catch(q){(0x0,utils_1[s(0x18e)])(''+q[s(0x17e)]);}finally{process['exit']();}})),W=this[Y(0x1a1)]('job')[Y(0x1a7)](Z=>__awaiter(this,void 0x0,void 0x0,function*(){const a=Y,{projectId:y,jobId:O,containerId:b,noDefaults:h,shellCmd:j,user:r,group:V,command:f,quiet:M}=Z;(0x0,utils_1[a(0x1d6)])(this[a(0x185)]);try{const C=h?undefined:H['getCurrentProjectName'](),z=y||C||(yield k['askForProject']()),G=O||(yield k['askForJob'](z)());this[a(0x189)](a(0x1ac),G,z,j,M);const {rows:d,columns:m}=this[a(0x1a2)](),U={'projectId':z,'jobId':G},K=yield this['apiClient'][a(0x1cf)][a(0x1db)](U,{'containerName':b,'command':f,'shell':j,'user':r,'group':V,'ttyColumns':m,'ttyRows':d});yield this['handleShellSession'](K,a(0x1ac),M);}catch(l){(0x0,utils_1[a(0x18e)])(''+l[a(0x17e)]);}finally{process[a(0x1a9)]();}}));this['execCmd'][Y(0x191)](S),this[Y(0x181)]['addCommand'](W);}}exports[a4v(0x1c4)]=CliExec;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a5l=a5k;(function(H,k){const K=a5k,S=H();while(!![]){try{const W=parseInt(K(0x114))/0x1+-parseInt(K(0x11d))/0x2*(-parseInt(K(0x113))/0x3)+parseInt(K(0x11f))/0x4+-parseInt(K(0x10f))/0x5+parseInt(K(0x127))/0x6+-parseInt(K(0x128))/0x7+parseInt(K(0x116))/0x8*(-parseInt(K(0x125))/0x9);if(W===k)break;else S['push'](S['shift']());}catch(Z){S['push'](S['shift']());}}}(a5H,0x6b91b));function a5H(){const i=['2047990yZHgny','option','throw','slice','278457AVZpus','724966pPmHBR','value','5218816KXTdAu','__awaiter','command-overview','done','__importDefault','commands','description','2ahrRrX','length','1810340SXcrtu','action','bold','join','name','log','9erRzSz','default','2464122hZJCLb','1249528TowKKR','opts','getCommandOverview','keys','getCommand','__esModule'];a5H=function(){return i;};return a5H();}var __awaiter=this&&this[a5l(0x117)]||function(H,k,S,W){function Z(y){return y instanceof S?y:new S(function(O){O(y);});}return new(S||(S=Promise))(function(y,O){function b(r){try{j(W['next'](r));}catch(V){O(V);}}function h(r){const J=a5k;try{j(W[J(0x111)](r));}catch(V){O(V);}}function j(r){const q=a5k;r[q(0x119)]?y(r[q(0x115)]):Z(r[q(0x115)])['then'](b,h);}j((W=W['apply'](H,k||[]))['next']());});},__importDefault=this&&this[a5l(0x11a)]||function(H){const n=a5l;return H&&H[n(0x12d)]?H:{'default':H};};Object['defineProperty'](exports,a5l(0x12d),{'value':!![]}),exports[a5l(0x12a)]=void 0x0;function a5k(H,k){const S=a5H();return a5k=function(W,Z){W=W-0x10f;let y=S[W];return y;},a5k(H,k);}const chalk_1=__importDefault(require('chalk')),utils_1=require('../utils');function getCommandOverview(H){const v=a5l;return(0x0,utils_1[v(0x12c)])()['name'](v(0x118))[v(0x11c)]('Prints\x20a\x20tree\x20view\x20of\x20all\x20available\x20commands')[v(0x110)]('--verbose','Print\x20command\x20descriptions')[v(0x120)](k=>__awaiter(this,void 0x0,void 0x0,function*(){const {verbose:S}=k;function W(Z,y){const N=a5k;var O;const b=(e,m=!![])=>m?chalk_1[N(0x126)][N(0x121)]['green'](e[N(0x123)]()):e[N(0x123)](),h=y[N(0x11e)]===0x0,j=Z[N(0x11b)];let r='';const V=j['length']===0x0,f=V||((O=Object[N(0x12b)](Z===null||Z===void 0x0?void 0x0:Z[N(0x129)]()))===null||O===void 0x0?void 0x0:O[N(0x11e)])>0x0;!h&&(r=j&&!V?'┬\x20':'─\x20');const M=S&&f&&Z['description']()?':\x20'+Z[N(0x11c)]():'';console[N(0x124)](''+y+r+b(Z,f)+M);let C=y;if(!h){const e=y[N(0x112)](-0x2)==='└─';C=y[N(0x112)](0x0,-0x2)+(e?'\x20\x20':'│\x20');}const z=C+'├─',G=C+'└─',d=j['every'](m=>m[N(0x11b)]['length']===0x0);d&&!V&&!S?console[N(0x124)](G+'\x20'+j['map'](m=>b(m))[N(0x122)](',\x20')):j['forEach']((m,U)=>{W(m,j['length']-0x1===U?G:z);});}W(H,'');}));}exports[a5l(0x12a)]=getCommandOverview;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a6z=a6k;function a6k(H,k){const S=a6H();return a6k=function(W,Z){W=W-0x158;let y=S[W];return y;},a6k(H,k);}(function(H,k){const C=a6k,S=H();while(!![]){try{const W=parseInt(C(0x15c))/0x1+-parseInt(C(0x175))/0x2+parseInt(C(0x184))/0x3*(-parseInt(C(0x179))/0x4)+parseInt(C(0x18d))/0x5+-parseInt(C(0x18f))/0x6+-parseInt(C(0x15e))/0x7*(parseInt(C(0x177))/0x8)+parseInt(C(0x186))/0x9;if(W===k)break;else S['push'](S['shift']());}catch(Z){S['push'](S['shift']());}}}(a6H,0x9d6ba));var __createBinding=this&&this[a6z(0x196)]||(Object['create']?function(H,S,W,Z){const G=a6z;if(Z===undefined)Z=W;var y=Object[G(0x17f)](S,W);(!y||(G(0x167)in y?!S[G(0x16c)]:y[G(0x172)]||y[G(0x185)]))&&(y={'enumerable':!![],'get':function(){return S[W];}}),Object[G(0x192)](H,Z,y);}:function(H,S,W,Z){if(Z===undefined)Z=W;H[Z]=S[W];}),__setModuleDefault=this&&this[a6z(0x16b)]||(Object[a6z(0x163)]?function(H,k){const d=a6z;Object['defineProperty'](H,d(0x180),{'enumerable':!![],'value':k});}:function(H,k){const e=a6z;H[e(0x180)]=k;}),__importStar=this&&this[a6z(0x190)]||function(H){const m=a6z;if(H&&H[m(0x16c)])return H;var S={};if(H!=null){for(var W in H)if(W!=='default'&&Object[m(0x16d)][m(0x164)][m(0x171)](H,W))__createBinding(S,H,W);}return __setModuleDefault(S,H),S;},__importDefault=this&&this['__importDefault']||function(H){const U=a6z;return H&&H[U(0x16c)]?H:{'default':H};};function a6H(){const Y=['__esModule','prototype','json','replace','lodash','call','writable','updatedat','isArrayLike','2544796ZTNnlQ','keys','16xbgKVU','chalk','87772lGqTwB','handleYamlOutput','yml','getSeconds','isBoolean','toLowerCase','getOwnPropertyDescriptor','default','sort','disabled','safeDump','114nYaaAQ','configurable','21825936lxjtWo','printAsTable','format','set','isFinite','printResponse','\x20(HTTP\x20status:\x20','5035820Fzcuuj','\x20found','850230sEmQXI','__importStar','handleFormattedOutput','defineProperty','length','consoleFormat','map','__createBinding','getMonth','inspect','isObjectLike','isEmpty','740889SoBpzd','toString','4481491aMdSSS','util','bold','green','includes','create','hasOwnProperty','columnify','internalId','get','log','js-yaml','handleJsonOutput','__setModuleDefault'];a6H=function(){return Y;};return a6H();}Object[a6z(0x192)](exports,a6z(0x16c),{'value':!![]}),exports[a6z(0x18b)]=exports['handleFormattedOutput']=exports[a6z(0x17a)]=exports['handleJsonOutput']=exports[a6z(0x194)]=exports[a6z(0x187)]=void 0x0;const chalk_1=__importDefault(require(a6z(0x178))),_=__importStar(require(a6z(0x170))),util=__importStar(require(a6z(0x15f))),yaml=require(a6z(0x169)),columnify=require(a6z(0x165));function printAsTable(H,k,S,W=![],Z=0x0){const K=a6z;!W&&console[K(0x168)](''+chalk_1[K(0x180)][K(0x160)](k));function y(b){const l=K;return b==='disabled'?b:b[l(0x16f)](l(0x182),'');}function O(b,h){const q=K;function j(V){const J=a6k,f=new Date(V);return f['getDate']()+'/'+f[J(0x158)]()+'/'+f['getFullYear']()+'\x0a'+f['getHours']()+':'+f['getMinutes']()+':'+f[J(0x17c)]();}const r=['createdat',q(0x173)];if(r[q(0x162)](h[q(0x17e)]())&&_[q(0x18a)](b)&&b[q(0x15d)]()[q(0x193)]===0xd)return j(Number(b));if(_[q(0x17d)](b)){if(h!=='disabled'&&h[q(0x162)]('disabled'))return b?'x':'✔';return b?'✔':'x';}if(_[q(0x15a)](b))return util[q(0x159)](b,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});return b;}if(_[K(0x174)](H)){H['length']===0x0&&console[K(0x168)]('No\x20'+k[K(0x17e)]()+K(0x18e));const b=H[K(0x195)]((r,V)=>{const f={'i':V+Z};return Object['keys'](r)['forEach'](M=>{const n=a6k;(_['isUndefined'](S)||S[n(0x162)](M[n(0x17e)]()))&&_[n(0x189)](f,y(M),O(r[M],M));}),f;}),h=_['clone'](Object[K(0x176)]((b===null||b===void 0x0?void 0x0:b[0x0])||[]))[K(0x181)]((r,V)=>{const v=K,f=M=>M!=='i'?M!==v(0x166)?0x0:0x1:0x2;return f(V)-f(r);}),j={'maxWidth':0x1e,'preserveNewLines':!![],'showHeaders':!W,'config':{'_id':{'maxWidth':0x5,'truncate':!![]},'i':{'showHeaders':![]}},'columns':h};console['log'](columnify(b,j));}else console[K(0x168)](H);}exports[a6z(0x187)]=printAsTable;function consoleFormat(H,k){const N=a6z;if(_[N(0x15b)](H)){const S=k?N(0x18c)+k+')':'';return chalk_1[N(0x180)][N(0x161)]('The\x20request\x20was\x20completed\x20successfully')+S;}if(!_['isObjectLike'](H))return H===null||H===void 0x0?void 0x0:H[N(0x15d)]();return util[N(0x159)](H,{'showHidden':![],'depth':null,'colors':!![],'compact':!![]});}exports['consoleFormat']=consoleFormat;const handleJsonOutput=(H,k)=>{const i=a6z,S=H===i(0x16e);if(S)console['log'](JSON['stringify'](k,null,'\x20'));};exports[a6z(0x16a)]=handleJsonOutput;const handleYamlOutput=(H,k)=>{const o=a6z,S=H==='yaml'||H===o(0x17b);if(S)console[o(0x168)](yaml[o(0x183)](k));};exports[a6z(0x17a)]=handleYamlOutput;const handleFormattedOutput=(H,k)=>{const c=a6z,S=H===c(0x188);if(S)console[c(0x168)](consoleFormat(k));};exports[a6z(0x191)]=handleFormattedOutput;const printResponse=(H,k)=>{const x=a6z;(0x0,exports[x(0x16a)])(H,k),(0x0,exports[x(0x17a)])(H,k),(0x0,exports[x(0x191)])(H,k);};exports['printResponse']=printResponse;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a7X=a7k;(function(H,k){const t=a7k,S=H();while(!![]){try{const W=-parseInt(t(0xf0))/0x1+parseInt(t(0x10d))/0x2+-parseInt(t(0xfc))/0x3+parseInt(t(0xfb))/0x4+parseInt(t(0xf3))/0x5+parseInt(t(0x100))/0x6*(-parseInt(t(0xed))/0x7)+-parseInt(t(0xf5))/0x8*(-parseInt(t(0x102))/0x9);if(W===k)break;else S['push'](S['shift']());}catch(Z){S['push'](S['shift']());}}}(a7H,0x9fa81));var __importDefault=this&&this['__importDefault']||function(H){const I=a7k;return H&&H[I(0x105)]?H:{'default':H};};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a7X(0xf4)]=exports[a7X(0xf2)]=void 0x0;const chalk_1=__importDefault(require('chalk')),colored=(H,k)=>{const H0=a7X;return k===undefined?H:chalk_1[H0(0xfd)][k](H);},getAsciiChart=(H,k={})=>{const H1=a7X,S=Array['isArray'](H[0x0])?H:[H];let W=typeof k[H1(0xf9)]!==H1(0x109)?k[H1(0xf9)]:S[0x0][0x0],Z=typeof k[H1(0xff)]!==H1(0x109)?k['max']:S[0x0][0x0];for(let J=0x0;J<S[H1(0x104)];J++){for(let q=0x0;q<S[J]['length'];q++){W=Math[H1(0xf9)](W,S[J][q]),Z=Math[H1(0xff)](Z,S[J][q]);}}let O=['┼','┤','╶','╴','─','╰','╭','╮','╯','│'],b=Math[H1(0xe9)](Z-W),h=typeof k[H1(0xfe)]!=='undefined'?k[H1(0xfe)]:0x3,r=typeof k[H1(0xfa)]!==H1(0x109)?k[H1(0xfa)]:H1(0x103),V=typeof k[H1(0xf7)]!==H1(0x109)?k[H1(0xf7)]:b,f=typeof k[H1(0x101)]!==H1(0x109)?k[H1(0x101)]:['blue','red',H1(0x10e),'grey',H1(0x10b)],M=b!==0x0?V/b:0x1,C=Math[H1(0x10a)](W*M),z=Math['round'](Z*M),G=Math['abs'](z-C),d=0x0;for(let n=0x0;n<S[H1(0x104)];n++){d=Math['max'](d,S[n][H1(0x104)]);}d=d+h;let e=typeof k['symbols']!==H1(0x109)?k['symbols']:O,m=k[H1(0xf6)]!==undefined?k[H1(0xf6)]:function(v){const H2=H1;return(r+v[H2(0xf8)](0x2)+k[H2(0xee)])[H2(0x108)](-r[H2(0x104)]);},U=new Array(G+0x1);for(let v=0x0;v<=G;v++){U[v]=new Array(d);for(let N=0x0;N<d;N++){U[v][N]='\x20';}}for(let o=C;o<=z;++o){const c=m(G>0x0?Z-(o-C)*b/G:o,o-C);U[o-C][Math[H1(0xff)](h-c[H1(0x104)],0x0)]=c,U[o-C][h-0x1]=o==0x0?e[0x0]:e[0x1];}for(let Y=0x0;Y<S[H1(0x104)];Y++){let R=f[Y%f[H1(0x104)]],g=Math[H1(0x10a)](S[Y][0x0]*M)-C;U[G-g][h-0x1]=colored(e[0x0],R);for(let F=0x0;F<S[Y]['length']-0x1;F++){let A=Math['round'](S[Y][F+0x0]*M)-C,L=Math[H1(0x10a)](S[Y][F+0x1]*M)-C;if(A==L)U[G-A][F+h]=colored(e[0x4],R);else{U[G-L][F+h]=colored(A>L?e[0x5]:e[0x6],R),U[G-A][F+h]=colored(A>L?e[0x7]:e[0x8],R);let s=Math['min'](A,L),a=Math['max'](A,L);for(let T=s+0x1;T<a;T++){U[G-T][F+h]=colored(e[0x9],R);}}}}const {startTs:K,endTs:l}=k;if(K||l){const Q=E=>{const H3=H1;if(!E)return H3(0x106);const D=E[H3(0xea)](undefined,{'day':'2-digit','month':H3(0xef),'year':H3(0xef)}),w=E[H3(0xec)](undefined,{'hourCycle':H3(0xeb)});return D+'\x20'+w;},u=Q(l),B=Q(K),p=r[H1(0x108)](0x0,Math[H1(0xff)](0x2,r[H1(0x104)]-B[H1(0x104)]/0x2+0x1)),P='\x20'['repeat'](Math[H1(0xff)](d-(r[H1(0x104)]+u[H1(0x104)]/0x2),0x1));U[H1(0xf1)]([''+p+B+P+u]),U[H1(0xf1)]([]);}return U[H1(0x10c)](E=>E[H1(0x107)](''))['join']('\x0a');};function a7H(){const H5=['abs','toLocaleDateString','h24','toLocaleTimeString','237629ciNjcX','unit','2-digit','1048567MNaJAj','push','getAsciiChart','3947480MKeviR','downSampleData','176UnjDev','format','height','toFixed','min','padding','4939804eiCzdZ','934065MderLv','default','offset','max','174yHeuRe','colors','281997jAMsOI','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','length','__esModule','\x20\x20\x20','join','slice','undefined','round','black','map','569130HAkhRf','green','floor'];a7H=function(){return H5;};return a7H();}function a7k(H,k){const S=a7H();return a7k=function(W,Z){W=W-0xe8;let y=S[W];return y;},a7k(H,k);}exports['getAsciiChart']=getAsciiChart;const downSampleData=(H,k)=>{const H4=a7X,S=H['length'];if(k>=S||k===0x0)return H;const W=[];let Z=0x0;const y=(S-0x2)/(k-0x2);let O=0x0,b,h,j,r;W[Z++]=H[O];for(var V=0x0;V<k-0x2;V++){let d=0x0,e=0x0,m=Math[H4(0xe8)]((V+0x1)*y)+0x1,U=Math[H4(0xe8)]((V+0x2)*y)+0x1;U=U<S?U:S;var f=U-m;for(;m<U;m++){d+=H[m][0x0],e+=H[m][0x1];}d/=f,e/=f;var M=Math[H4(0xe8)](V*y)+0x1,C=Math[H4(0xe8)]((V+0x1)*y)+0x1,z=H[O][0x0],G=H[O][0x1];h=j=-0x1;for(;M<C;M++){j=Math['abs']((z-d)*(H[M][0x1]-G)-(z-H[M][0x0])*(e-G))*0.5,j>h&&(h=j,b=H[M],r=M);}W[Z++]=b,O=r;}return W[Z++]=H[S-0x1],W;};exports[a7X(0xf4)]=downSampleData;
|
package/dist/inquirer-helper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a8T=a8h;function a8w(){const wH=['service','\x27\x20already\x20exists.\x20Do\x20you\x20want\x20to\x20override\x20this\x20context\x20(y)\x20or\x20enter\x20a\x20new\x20name\x20(N)?','__importDefault','deleteWarningPrompt','askForJob','safeLoad','askForSubdomain','fullName','must\x20be\x20a\x20number,\x20is\x20','js-yaml','addEntry','fetchResourceList','job:\x20\x27','safeDump','token','SAVE','password','apply','not\x20completed','jobs','pagination-prompt','split','oneOf','subdomains','completedAt','__setModuleDefault','defineProperty','askForProject','pathVars','Something\x20unexpected\x20happened.','saveFile','1424WeKVgY','isNaN','\x20characters','example','job\x20runs','message','confirmationPrompt','value','.\x20This\x20is\x20irreversible.\x20Please\x20confirm!','backups','set','length','Do\x20you\x20want\x20to\x20add',',\x20supported\x20types:\x20[json|yaml|yml]','tokenPrompt','No,\x20repeat','\x20(startedAt:\x20','builds','template','max','askForSecret','isEmpty','__esModule','boolean','job','getType','Choose\x20the\x20','registerPrompt','Yes,\x20send','getInnerType','askForProjectScopedResourcePaginated','resultCache','isObject','askForBuild','then','choice','minimum','editor','askForResourcePaginated','13730FzJdEn','credentials','12336256DvkiPR','greenBright','opt','done','pipelines','restores','don\x27t\x20change','a\x20Northflank\x20resource','unshift','integer','./pagination/inquirer-pagination-prompt','\x20Example:\x20','repeat','includes','askForPipeline','cursor','prototype','fileName','logSinks','items','get','Unexpected\x20file\x20type:\x20','project','concat','underline','subdomain','askForVolume','Aborted.','hasOwnProperty','found','service:\x20\x27','8267693PpVhzN','prompt','apiClient','defaultPaginationPageSize','job\x20builds','ABORT','getPathString','secrets','input','askForService','elements','templateRuns','validate','InquirerHelper','slice','next','blueBright','toString','maximum','create','askForAddonBackup','Go\x20to\x20editor','ask','service\x20containers','pagination','getCurrentProjectName','contextProvider','minLength','No,\x20but\x20save\x20as\x20file','must\x20be\x20smaller\x20than\x20or\x20equal\x20to\x20','whiteBright','No\x20','__createBinding','Context\x20with\x20name\x20\x27','search-list','body','\x20characters,\x20is\x20','trim','Writing\x20configuration\x20failed:\x20','__awaiter','must\x20be\x20longer\x20than\x20or\x20equal\x20to\x20','askGeneric','to\x20use:','reset','askForTemplateRun','maxLength','string','confirm','tmpCmdPath','service\x20build','override','YES','secret','452655HlCaXv','startedAt','addons','stringify','properties','object','runs','editedResult','yellowBright','charAt','containers','bgGrey','./api-helpers','\x20type?','all-job-runs','propToType','\x20and\x20it\x20','545248OFfKrY','blue','rawObject','list','\x20(completedAt:\x20','askForResource','addon','job\x20containers','10xRCDsr','restore','askForCredentials','confirmation','writable','askForAddon','default','test','filter','map','values','services','must\x20be\x20shorter\x20than\x20or\x20equal\x20to\x20','\x20to\x20use:','addon:\x20\x27','editPayload','askForAddonRestore','throw','warning','for\x20this\x20','createdAt','1kmOGQo','find','loginPrompt','json','red','must\x20be\x20a\x20valid\x20non-empty\x20json\x20string','./utils','project:\x20\x27','REPEAT','Do\x20you\x20want\x20to\x20add\x20more','isUndefined','No\x20containers\x20found','isValidJSON','all-containers','push','bold','keys','log\x20sink','askForTemplate','call','pop','inquirer','Enter\x20the\x20','array','unset','name','Please\x20confirm\x20following\x20configuration:\x0a','\x20in\x20','askForContainer','type','join','green','setPathVars','chalk','askForDomain','assign','pattern','registryCredentials','retrievePayloadViaInteractiveCli','\x20(full\x20domain:\x20','6PpDLJd','templates','success','domain\x20(','description','Configuration\x20file\x20written\x20to\x20','main-context','has','What\x27s\x20the\x20','projects','isBoolean','Choose\x20the\x20login\x20token:','domains','writeFileSync','Should\x20it\x20be','8378541lHVnIp','askArrayEntry','1992406HdQizo','Template\x20id\x20not\x20provided.','data'];a8w=function(){return wH;};return a8w();}(function(w,h){const X=a8h,G=w();while(!![]){try{const P=-parseInt(X(0x24f))/0x1*(-parseInt(X(0x288))/0x2)+parseInt(X(0x221))/0x3+-parseInt(X(0x2aa))/0x4*(parseInt(X(0x2d1))/0x5)+parseInt(X(0x277))/0x6*(parseInt(X(0x2f2))/0x7)+-parseInt(X(0x2d3))/0x8+parseInt(X(0x286))/0x9+-parseInt(X(0x23a))/0xa*(-parseInt(X(0x232))/0xb);if(P===h)break;else G['push'](G['shift']());}catch(v){G['push'](G['shift']());}}}(a8w,0xc0a68));function a8h(w,h){const G=a8w();return a8h=function(P,v){P=P-0x1f0;let O=G[P];return O;},a8h(w,h);}var __createBinding=this&&this[a8T(0x20c)]||(Object['create']?function(w,h,G,P){const I=a8T;if(P===undefined)P=G;var v=Object['getOwnPropertyDescriptor'](h,G);(!v||('get'in v?!h['__esModule']:v[I(0x23e)]||v['configurable']))&&(v={'enumerable':!![],'get':function(){return h[G];}}),Object['defineProperty'](w,P,v);}:function(w,h,G,P){if(P===undefined)P=G;w[P]=h[G];}),__setModuleDefault=this&&this[a8T(0x2a4)]||(Object[a8T(0x1ff)]?function(w,h){Object['defineProperty'](w,'default',{'enumerable':!![],'value':h});}:function(w,h){w['default']=h;}),__importStar=this&&this['__importStar']||function(w){const k=a8T;if(w&&w['__esModule'])return w;var h={};if(w!=null){for(var G in w)if(G!==k(0x240)&&Object[k(0x2e3)][k(0x2ef)][k(0x262)](w,G))__createBinding(h,w,G);}return __setModuleDefault(h,w),h;},__awaiter=this&&this[a8T(0x213)]||function(w,h,G,v){function O(Z){return Z instanceof G?Z:new G(function(a){a(Z);});}return new(G||(G=Promise))(function(Z,a){const q=a8h;function l(A){const Y=a8h;try{U(v[Y(0x1fb)](A));}catch(D){a(D);}}function B(A){const x=a8h;try{U(v[x(0x24b)](A));}catch(D){a(D);}}function U(A){const b=a8h;A[b(0x2d6)]?Z(A[b(0x2b1)]):O(A[b(0x2b1)])[b(0x2cc)](l,B);}U((v=v[q(0x29c)](w,h||[]))[q(0x1fb)]());});},__importDefault=this&&this[a8T(0x28d)]||function(w){const f=a8T;return w&&w[f(0x2c0)]?w:{'default':w};};Object[a8T(0x2a5)](exports,'__esModule',{'value':!![]}),exports[a8T(0x1f9)]=void 0x0;const _=__importStar(require('lodash')),chalk_1=__importDefault(require(a8T(0x270))),fs=__importStar(require('fs')),utils_1=require(a8T(0x255)),api_helpers_1=require(a8T(0x22d)),inquirer_pagination_prompt_1=require(a8T(0x2dd)),inquirer=require(a8T(0x264)),inquirerSearchList=require('inquirer-search-list'),yaml=require(a8T(0x294));var ConfirmChoices;(function(w){const e=a8T;w[e(0x21f)]=e(0x2c6),w[e(0x257)]=e(0x2b9),w['EDIT']='No,\x20edit',w[e(0x29a)]=e(0x208),w['ABORT']='No,\x20abort';}(ConfirmChoices||(ConfirmChoices={})));class InquirerHelper{constructor(w){const i=a8T;this[i(0x2f4)]=w,this[i(0x2f5)]=0x32,this[i(0x249)]=h=>__awaiter(this,void 0x0,void 0x0,function*(){const u=i,{editedResult:G}=yield inquirer['prompt']([{'type':u(0x2cf),'name':u(0x228),'message':u(0x201),'default':yaml['safeDump'](h)}]);return yaml[u(0x290)](G);}),this[i(0x2a9)]=h=>__awaiter(this,void 0x0,void 0x0,function*(){const t=i,G=Z=>t(0x2e8)+Z+t(0x2b7);function P(){return __awaiter(this,void 0x0,void 0x0,function*(){const S=a8h;return inquirer[S(0x2f3)]([{'type':S(0x1f4),'name':S(0x2e4),'message':'Provide\x20a\x20file\x20path\x20to\x20write\x20the\x20configuration\x20to\x20(<name>.[json|yaml|yml])','validate':Z=>new RegExp('.*\x5c.(json|yaml|yml)$')[S(0x241)](Z)?!![]:G(Z)}]);});}const {fileName:v}=yield P(),O=v[t(0x1fd)]()[t(0x2a0)]('.')[t(0x263)]();try{switch(O){case t(0x252):(0x0,utils_1[t(0x279)])(t(0x27c)+v);return fs[t(0x284)](v,JSON[t(0x224)](h,null,'\x20\x20'));case'yaml':case'yml':(0x0,utils_1[t(0x279)])('Configuration\x20file\x20written\x20to\x20'+v);return fs['writeFileSync'](v,yaml[t(0x298)](h));default:(0x0,utils_1[t(0x24c)])(G(O));}}catch(Z){(0x0,utils_1['warning'])(t(0x212)+Z[t(0x2af)]);}return undefined;}),this['filter']=(h,G)=>P=>{const V=i,v=typeof P===V(0x21a)?P[V(0x211)]():P;return G===![]&&v==='don\x27t\x20change'?'':v;},this[i(0x1f8)]=(h,G,P)=>v=>{const C=i,O=[];if(v===''||v===C(0x2d9)){if(G!==![])O[C(0x25d)]('this\x20option\x20is\x20required,\x20please\x20answer');else return!![];}h['type']===C(0x21a)&&!_[C(0x259)](h['pattern'])&&O[C(0x25d)](new RegExp(h[C(0x273)])['test'](v)?!![]:'doesn\x27t\x20match\x20pattern\x20\x27'+h[C(0x273)]+'\x27');h[C(0x26c)]===C(0x21a)&&!_[C(0x259)](h['minLength'])&&O[C(0x25d)](v[C(0x2b5)]>=h[C(0x207)]?!![]:C(0x214)+h[C(0x207)]+'\x20characters,\x20is\x20'+v[C(0x2b5)]+C(0x2ac));h[C(0x26c)]===C(0x21a)&&!_[C(0x259)](h[C(0x219)])&&O[C(0x25d)](v[C(0x2b5)]<=h[C(0x219)]?!![]:C(0x246)+h['maxLength']+C(0x210)+v[C(0x2b5)]+C(0x2ac));P&&Number[C(0x2ab)](parseInt(v,0xa))&&O[C(0x25d)](C(0x293)+v);h[C(0x26c)]===C(0x2dc)&&!_['isUndefined'](h['minimum'])&&O['push'](v>=h[C(0x2ce)]?!![]:'must\x20be\x20bigger\x20than\x20or\x20equal\x20to\x20'+h[C(0x2ce)]);h[C(0x26c)]===C(0x2dc)&&!_[C(0x259)](h[C(0x1fe)])&&O['push'](v<=h[C(0x1fe)]?!![]:C(0x209)+h[C(0x1fe)]);if(h[C(0x26c)]===C(0x234)){const l=(0x0,utils_1[C(0x25b)])(v);O['push'](l===![]||_[C(0x2bf)](l)?C(0x254):!![]);}const Z=O[C(0x242)](B=>B!==!![]),a=(h===null||h===void 0x0?void 0x0:h[C(0x2ad)])?'\x0a'+chalk_1[C(0x240)][C(0x253)]('>>')+C(0x2de)+chalk_1[C(0x240)][C(0x20a)](JSON[C(0x224)](h[C(0x2ad)])):'';return Z['length']>0x0?Z[C(0x26d)](chalk_1['default'][C(0x2eb)](C(0x231)))+a:!![];},this['getPathString']=(h,G,P)=>{const M=i,v=h[h[M(0x2b5)]-0x1];function O(){const Q=M;return h[Q(0x1fa)](0x0,-0x1)['map'](l=>l[Q(0x22a)](0x0)['toUpperCase']()+l[Q(0x1fa)](0x1))[Q(0x26d)]('>');}const Z=h[M(0x2b5)]>0x1?chalk_1[M(0x240)][M(0x22c)][M(0x20a)](O())+':\x20':'',a=P?'\x20('+chalk_1[M(0x240)][M(0x233)](P)+')':'';return chalk_1[M(0x240)][M(0x217)](''+Z+G+'\x20'+chalk_1['default'][M(0x25e)][M(0x2d4)](v)+a+'?');},this[i(0x237)]=(h,G,P)=>__awaiter(this,void 0x0,void 0x0,function*(){const H=i;if(G[H(0x2b5)]<0x1){const Z=P?H(0x24d)+P:H(0x2f0);throw new Error(H(0x20b)+h+'\x20'+Z+'.');}const v='Choose\x20the\x20'+h+H(0x247),O=G[H(0x2b5)]>0x4?H(0x20e):H(0x235);return(yield inquirer['prompt']([{'type':O,'name':H(0x268),'message':v,'choices':G}]))['name'];}),this[i(0x2d0)]=(h,G,P)=>__awaiter(this,void 0x0,void 0x0,function*(){const n=i,{elements:v,nextCursor:O}=yield G();if(v[n(0x2b5)]<0x1){const l=P?n(0x24d)+P:n(0x2f0);throw new Error(n(0x20b)+h+'\x20'+l+'.');}const Z=n(0x2c4)+h+'\x20to\x20use:';if(O!==undefined){const B=({nextPageCursor:U})=>__awaiter(this,void 0x0,void 0x0,function*(){const r=n,A=yield G(U);return{'elements':A[r(0x1f6)],'nextPageCursor':A['nextCursor']};});return(yield inquirer[n(0x2f3)]([{'type':n(0x29f),'name':'name','message':Z,'choices':v,'nextPageCursor':O,'loadMore':B}]))[n(0x268)];}const a=v['length']>0x4?'search-list':n(0x235);return(yield inquirer[n(0x2f3)]([{'type':a,'name':n(0x268),'message':Z,'choices':v}]))[n(0x268)];}),this[i(0x215)]=(h,G)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const j=i,P=''+(G?'('+chalk_1[j(0x240)]['blue'](G)+')\x20':''),v=j(0x265)+chalk_1[j(0x240)]['green'](h)+'\x20'+P+j(0x216),O=this[j(0x1f8)]({'type':j(0x21a),'required':!![]});return(yield inquirer[j(0x2f3)]([{'type':j(0x1f4),'name':j(0x268),'message':v,'validate':O}]))[j(0x268)];}),this['askConfirm']=h=>__awaiter(this,void 0x0,void 0x0,function*(){const m=i;return(yield inquirer['prompt']([{'type':m(0x21b),'name':m(0x268),'message':h,'default':!![]}]))[m(0x268)];}),this[i(0x1f5)]=h=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const E=i,G=P=>v=>__awaiter(this,void 0x0,void 0x0,function*(){const y=a8h;var O;const Z=yield this['apiClient'][y(0x235)][y(0x245)]({'parameters':{'projectId':P},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':v}}),a=Z[y(0x28a)][y(0x245)][y(0x243)](l=>l['id']);return{'elements':a,'nextCursor':(O=Z[y(0x204)])===null||O===void 0x0?void 0x0:O['cursor']};});return this[E(0x2c8)]('service',G,h);}),this[i(0x261)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const g=i,h=G=>__awaiter(this,void 0x0,void 0x0,function*(){const K=a8h;var P;const v=yield this[K(0x2f4)][K(0x235)][K(0x278)]({'options':{'per_page':this[K(0x2f5)],'cursor':G}}),O=v[K(0x28a)]['templates'][K(0x243)](Z=>Z['id']);return{'elements':O,'nextCursor':(P=v[K(0x204)])===null||P===void 0x0?void 0x0:P['cursor']};});return this[g(0x2d0)](g(0x2bc),h);}),this[i(0x218)]=h=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const J=i;if(_[J(0x259)](h))throw new Error(J(0x289));const G=P=>__awaiter(this,void 0x0,void 0x0,function*(){const R=J;var v;let O=this[R(0x2f5)];const Z=yield this[R(0x2f4)]['list'][R(0x1f7)]({'parameters':{'templateId':h},'options':{'per_page':O,'cursor':P}}),a=Z['data'][R(0x1f7)][R(0x243)](l=>l['id']+R(0x2ba)+l[R(0x24e)]+')');return{'elements':a,'nextCursor':(v=Z[R(0x204)])===null||v===void 0x0?void 0x0:v['cursor']};});return this[J(0x2d0)]('template\x20run',G)[J(0x2cc)](P=>P['split']('\x20')[0x0]);}),this['askForLogSink']=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const z=i,h=G=>__awaiter(this,void 0x0,void 0x0,function*(){const N=a8h;var P;let v=this[N(0x2f5)];const O=yield this['apiClient'][N(0x235)][N(0x2e5)]({'options':{'per_page':v,'cursor':G}}),Z=O[N(0x28a)][N(0x2e5)][N(0x243)](a=>a['id']);return{'elements':Z,'nextCursor':(P=O[N(0x204)])===null||P===void 0x0?void 0x0:P['cursor']};});return this[z(0x2d0)](z(0x260),h);}),this[i(0x2e1)]=h=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const o=i,G=P=>v=>__awaiter(this,void 0x0,void 0x0,function*(){const F=a8h;var O;const Z=yield this[F(0x2f4)][F(0x235)][F(0x2d7)]({'parameters':{'projectId':P},'options':{'per_page':this[F(0x2f5)],'cursor':v}}),a=Z[F(0x28a)]['pipelines'][F(0x243)](l=>l['id']);return{'elements':a,'nextCursor':(O=Z[F(0x204)])===null||O===void 0x0?void 0x0:O[F(0x2e2)]};});return this[o(0x2c8)]('pipeline',G,h);}),this[i(0x28f)]=h=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const d=i,G=P=>v=>__awaiter(this,void 0x0,void 0x0,function*(){const L=a8h;var O;const Z=yield this['apiClient']['list']['jobs']({'parameters':{'projectId':P},'options':{'per_page':this[L(0x2f5)],'cursor':v}}),a=Z['data'][L(0x29e)][L(0x243)](l=>l['id']);return{'elements':a,'nextCursor':(O=Z[L(0x204)])===null||O===void 0x0?void 0x0:O[L(0x2e2)]};});return this['askForProjectScopedResourcePaginated'](d(0x2c2),G,h);}),this['askForJobRun']=(h,G,P=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const w0=i,v=w0(0x22f),O=Z=>a=>__awaiter(this,void 0x0,void 0x0,function*(){const w1=w0;var l;const B=yield this[w1(0x2f4)][w1(0x2e7)][w1(0x2c2)][w1(0x227)]({'parameters':{'projectId':Z,'jobId':h},'options':{'per_page':this[w1(0x2f5)],'cursor':a}}),U=B[w1(0x28a)][w1(0x227)][w1(0x243)](A=>A['id']+w1(0x2ba)+A[w1(0x222)]+')');return P&&U['unshift'](v),{'elements':U,'nextCursor':(l=B[w1(0x204)])===null||l===void 0x0?void 0x0:l['cursor']};});return this[w0(0x2c8)](w0(0x2ae),O,G,'job:\x20\x27'+h+'\x27')[w0(0x2cc)](Z=>{const w2=w0,a=Z[w2(0x2a0)]('\x20')[0x0];if(a===v)return undefined;return a;});}),this[i(0x2cb)]=(h,G,P,v=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const w4=i,O='all-builds';if(P!==undefined){const Z=a=>l=>__awaiter(this,void 0x0,void 0x0,function*(){const w3=a8h;var B;const U=yield this['apiClient'][w3(0x2e7)][w3(0x2c2)][w3(0x2bb)]({'parameters':{'projectId':a,'jobId':P},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':l}}),A=U['data'][w3(0x2bb)][w3(0x243)](D=>D['id']+w3(0x2ba)+D[w3(0x24e)]+')');return v&&A[w3(0x2db)](O),{'elements':A,'nextCursor':(B=U[w3(0x204)])===null||B===void 0x0?void 0x0:B[w3(0x2e2)]};});return this[w4(0x2c8)](w4(0x1f0),Z,h,w4(0x297)+P+'\x27')[w4(0x2cc)](a=>{const w5=w4,l=a[w5(0x2a0)]('\x20')[0x0];if(l===O)return undefined;return l;});}if(G!==undefined){const a=l=>B=>__awaiter(this,void 0x0,void 0x0,function*(){const w6=w4;var U;const A=yield this['apiClient'][w6(0x2e7)][w6(0x28b)][w6(0x2bb)]({'parameters':{'projectId':l,'serviceId':G},'options':{'per_page':this[w6(0x2f5)],'cursor':B}}),D=A[w6(0x28a)][w6(0x2bb)][w6(0x243)](p=>p['id']+w6(0x2ba)+p['createdAt']+')');if(v)D[w6(0x2db)](O);return{'elements':D,'nextCursor':(U=A[w6(0x204)])===null||U===void 0x0?void 0x0:U[w6(0x2e2)]};});return this[w4(0x2c8)](w4(0x21d),a,h,'service:\x20\x27'+P+'\x27')[w4(0x2cc)](l=>{const w7=w4,B=l[w7(0x2a0)]('\x20')[0x0];if(B===O)return undefined;return B;});}throw new Error('No\x20builds\x20found');}),this[i(0x26b)]=(h,G,P,v=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const w8=i,O=w8(0x25c);if(P!==undefined){const Z=a=>l=>__awaiter(this,void 0x0,void 0x0,function*(){const w9=w8;var B,U;const A=yield this['apiClient'][w9(0x2e7)][w9(0x2c2)]['containers']({'parameters':{'projectId':a,'jobId':P},'options':{'per_page':this[w9(0x2f5)],'cursor':l}}),D=(B=A[w9(0x28a)][w9(0x22b)])!==null&&B!==void 0x0?B:[],p=D===null||D===void 0x0?void 0x0:D[w9(0x243)](s=>s[w9(0x268)]+'\x20(startedAt:\x20'+s[w9(0x24e)]+')');return v&&p['unshift'](O),{'elements':p,'nextCursor':(U=A['pagination'])===null||U===void 0x0?void 0x0:U['cursor']};});return this['askForProjectScopedResourcePaginated'](w8(0x239),Z,h,'job:\x20\x27'+P+'\x27')[w8(0x2cc)](a=>{const ww=w8,l=a[ww(0x2a0)]('\x20')[0x0];if(l===O)return undefined;return l;});}if(G!==undefined){const a=l=>B=>__awaiter(this,void 0x0,void 0x0,function*(){const wh=w8;var U,A;const D=yield this['apiClient'][wh(0x2e7)][wh(0x28b)]['containers']({'parameters':{'projectId':l,'serviceId':G},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':B}}),p=(U=D[wh(0x28a)][wh(0x22b)])!==null&&U!==void 0x0?U:[],s=p[wh(0x243)](W=>W[wh(0x268)]+wh(0x2ba)+W['createdAt']+')');if(v)s===null||s===void 0x0?void 0x0:s[wh(0x2db)](O);return{'elements':s,'nextCursor':(A=D[wh(0x204)])===null||A===void 0x0?void 0x0:A[wh(0x2e2)]};});return this[w8(0x2c8)](w8(0x203),a,h,w8(0x2f1)+P+'\x27')[w8(0x2cc)](l=>{const wG=w8,B=l[wG(0x2a0)]('\x20')[0x0];if(B===O)return undefined;return B;});}throw new Error(w8(0x25a));}),this[i(0x23f)]=h=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const wv=i,G=P=>v=>__awaiter(this,void 0x0,void 0x0,function*(){const wP=a8h;var O;const Z=yield this[wP(0x2f4)][wP(0x235)]['addons']({'parameters':{'projectId':P},'options':{'per_page':this[wP(0x2f5)],'cursor':v}});return{'elements':Z[wP(0x28a)][wP(0x223)][wP(0x243)](a=>a['id']),'nextCursor':(O=Z['pagination'])===null||O===void 0x0?void 0x0:O[wP(0x2e2)]};});return this['askForProjectScopedResourcePaginated'](wv(0x238),G,h);}),this[i(0x200)]=(h,G)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const P=v=>O=>__awaiter(this,void 0x0,void 0x0,function*(){const wO=a8h;var Z;const a=yield this[wO(0x2f4)]['get'][wO(0x238)][wO(0x2b3)]({'parameters':{'projectId':v,'addonId':G},'options':{'per_page':this[wO(0x2f5)],'cursor':O}});return{'elements':a[wO(0x28a)][wO(0x2b3)][wO(0x243)](l=>l['id']+wO(0x236)+(l[wO(0x2a3)]||wO(0x29d))+')'),'nextCursor':(Z=a[wO(0x204)])===null||Z===void 0x0?void 0x0:Z['cursor']};});return this['askForProjectScopedResourcePaginated']('backups',P,h,'addon:\x20\x27'+G+'\x27')['then'](v=>v['split']('\x20')[0x0]);}),this[i(0x24a)]=(h,G,P)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const wa=i,v=O=>Z=>__awaiter(this,void 0x0,void 0x0,function*(){const wZ=a8h;var a;const l=yield this[wZ(0x2f4)][wZ(0x2e7)][wZ(0x238)]['restores']({'parameters':{'projectId':O,'addonId':G,'backupId':P},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':Z}});return{'elements':l[wZ(0x28a)][wZ(0x2d8)][wZ(0x243)](B=>B['id']+wZ(0x236)+(B['completedAt']||'not\x20completed')+')'),'nextCursor':(a=l['pagination'])===null||a===void 0x0?void 0x0:a['cursor']};});return this[wa(0x2c8)](wa(0x23b),v,h,wa(0x248)+G+'\x27')['then'](O=>O[wa(0x2a0)]('\x20')[0x0]);}),this[i(0x2ed)]=h=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const G=P=>__awaiter(this,void 0x0,void 0x0,function*(){const wl=a8h;return(yield this['apiClient'][wl(0x235)]['volumes']({'parameters':{'projectId':P}}))[wl(0x28a)][wl(0x243)](v=>v['id']);});return this['askForProjectScopedResource']('volume',G,h);}),this[i(0x2be)]=h=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const wU=i,G=P=>v=>__awaiter(this,void 0x0,void 0x0,function*(){const wB=a8h;var O;const Z=yield this[wB(0x2f4)][wB(0x235)][wB(0x1f3)]({'parameters':{'projectId':P},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':v}});return{'elements':Z[wB(0x28a)][wB(0x1f3)][wB(0x243)](a=>a['id']),'nextCursor':(O=Z['pagination'])===null||O===void 0x0?void 0x0:O['cursor']};});return this[wU(0x2c8)](wU(0x220),G,h);}),this[i(0x291)]=h=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const wA=i,G=yield this[wA(0x2f4)][wA(0x2e7)]['domain']({'parameters':{'domain':h}}),P=G[wA(0x28a)][wA(0x2a2)][wA(0x243)](O=>O[wA(0x268)]+wA(0x276)+O[wA(0x292)]+')'),v=wA(0x27a)+h+')';return this['askForResource'](wA(0x2ec),P,v)[wA(0x2cc)](O=>O['split']('\x20')[0x0]);}),this[i(0x28e)]=h=>__awaiter(this,void 0x0,void 0x0,function*(){const wD=i;return(yield inquirer[wD(0x2f3)]([{'type':wD(0x21b),'name':'confirmation','message':chalk_1[wD(0x240)][wD(0x229)]('WARNING:\x20You\x20are\x20about\x20to\x20delete\x20'+(h||wD(0x2da))+wD(0x2b2)),'default':![]}]))[wD(0x23d)];}),this[i(0x251)]=(h,G)=>__awaiter(this,void 0x0,void 0x0,function*(){const wp=i;_[wp(0x259)](h[wp(0x268)])&&(G['length']<=0x0?_[wp(0x2b4)](h,wp(0x268),wp(0x240)):yield(0x0,utils_1['retry'])(0xa)(()=>__awaiter(this,void 0x0,void 0x0,function*(){const ws=wp,{name:P}=yield inquirer[ws(0x2f3)]([{'type':ws(0x1f4),'name':ws(0x268),'message':'Choose\x20the\x20name\x20of\x20the\x20new\x20local\x20context:','default':ws(0x27d)}]);if(!h[ws(0x21e)]&&G[ws(0x250)](v=>v[ws(0x268)]===P)){const {c:v}=yield inquirer[ws(0x2f3)]([{'type':'confirm','name':'c','message':ws(0x20d)+P+ws(0x28c),'default':![]}]);if(v===![])throw new Error('Context\x20name\x20already\x20exists.');_['set'](h,ws(0x21e),!![]);}_[ws(0x2b4)](h,'name',P);})));if(_[wp(0x259)](h[wp(0x299)])){const P=yield this[wp(0x2b8)]();_[wp(0x2b4)](h,'token',P);}return h;}),this['tokenPrompt']=()=>__awaiter(this,void 0x0,void 0x0,function*(){const wW=i,{token:h}=yield inquirer[wW(0x2f3)]([{'type':wW(0x29b),'name':wW(0x299),'mask':'*','message':wW(0x282)}]);return h;}),inquirer[i(0x2c5)]('search-list',inquirerSearchList),inquirer[i(0x2c5)](i(0x29f),inquirer_pagination_prompt_1['DynamicReloadPaginationPrompt']);}[a8T(0x2b0)](w,h){return __awaiter(this,void 0x0,void 0x0,function*(){const wX=a8h,G=yaml[wX(0x298)](w),P=_[wX(0x2bd)](G[wX(0x2a0)]('\x0a')['map'](Z=>Z['length'])),v=chalk_1[wX(0x240)]['grey']('-'[wX(0x2df)](P)+'\x0a'),{confirm:O}=yield inquirer['prompt']([{'type':wX(0x235),'name':wX(0x21b),'message':''+chalk_1['default'][wX(0x25e)][wX(0x26e)](wX(0x269))+v+chalk_1[wX(0x240)][wX(0x1fc)](G)+v,'choices':Object[wX(0x244)](ConfirmChoices)}]);switch(O){case ConfirmChoices['YES']:return w;case ConfirmChoices[wX(0x1f1)]:throw new Error(wX(0x2ee));case ConfirmChoices[wX(0x257)]:return this['retrievePayloadViaInteractiveCli'](h);case ConfirmChoices['EDIT']:return this[wX(0x2b0)](yield this[wX(0x249)](w),h);case ConfirmChoices[wX(0x29a)]:yield this['saveFile'](w);return this[wX(0x2b0)](w,h);default:throw new Error(wX(0x2a8));}});}[a8T(0x275)](w,h){return __awaiter(this,void 0x0,void 0x0,function*(){const wT=a8h;if((h===null||h===void 0x0?void 0x0:h[wT(0x2c9)])!==undefined)this[wT(0x2c9)]=h===null||h===void 0x0?void 0x0:h['resultCache'];this[wT(0x21c)]=h===null||h===void 0x0?void 0x0:h['cmdPath'];const G={};return yield this[wT(0x230)]([],w[wT(0x2d5)][wT(0x20f)],G),this[wT(0x2c9)]=G,yield this['confirmationPrompt'](G,w);});}[a8T(0x230)](w,h,G,P){return __awaiter(this,void 0x0,void 0x0,function*(){const wI=a8h;let v;if(h[wI(0x2a1)]&&!_[wI(0x27e)](h,wI(0x225))){if(h[wI(0x2a1)][wI(0x2b5)]>0x1){const {choice:O}=yield inquirer[wI(0x2f3)]([{'type':'list','name':wI(0x2cd),'message':wI(0x27f)+(w[w[wI(0x2b5)]-0x1]||'')+wI(0x22e),'choices':h[wI(0x2a1)]['map'](Z=>{const wk=wI;var a;return(a=Z[wk(0x27b)])!==null&&a!==void 0x0?a:'??';})}]);v=yield this[wI(0x2c3)](w,h[wI(0x2a1)][wI(0x250)](Z=>Z[wI(0x27b)]===O),G,P);}else{const Z=h[wI(0x2a1)][0x0];_['set'](Z,wI(0x27b),h[wI(0x27b)]),v=yield this[wI(0x2c3)](w,Z,G,P);}v={};}else v=yield this[wI(0x2c3)](w,h,G,P);return v;});}['getInnerType'](w,h,G,P){var v;return __awaiter(this,void 0x0,void 0x0,function*(){const wY=a8h;if(P===![]){const {addEntry:a}=yield inquirer[wY(0x2f3)]([{'type':wY(0x21b),'name':'addEntry','message':this[wY(0x1f2)](h,wY(0x2b6),w===null||w===void 0x0?void 0x0:w[wY(0x27b)]),'default':![]}]);if(!a)return G;}const O=Object[wY(0x25f)]((v=w===null||w===void 0x0?void 0x0:w[wY(0x225)])!==null&&v!==void 0x0?v:[]),Z=w['required']||[];if(O[wY(0x2b5)]>0x0)for(const l of O){const B=h[wY(0x2ea)](l);if(h['length']>0x0&&!_[wY(0x27e)](G,h[wY(0x26d)]('.')))_[wY(0x2b4)](G,h[wY(0x26d)]('.'),{});yield this['propToType'](B,w['properties'][l],G,Z[wY(0x2e0)](l));}else yield this[wY(0x2c3)](h,Object['assign'](Object['assign']({},w),{'type':wY(0x234)}),G,P);return G;});}[a8T(0x287)](w,h,G,P){return __awaiter(this,void 0x0,void 0x0,function*(){const wx=a8h;if(h&&G)return!![];const v=h?wx(0x2b6):wx(0x258),{addEntry:O}=yield inquirer['prompt']([{'type':'confirm','name':wx(0x295),'message':this[wx(0x1f2)](w,v,h?P:undefined),'default':![]}]);return O;});}[a8T(0x2c3)](w,h,G,P){return __awaiter(this,void 0x0,void 0x0,function*(){const wb=a8h;let v;const O=w[wb(0x26d)]('.');switch(h===null||h===void 0x0?void 0x0:h[wb(0x26c)]){case wb(0x266):{let Z=!![];while(yield this[wb(0x287)](w,Z,P,h===null||h===void 0x0?void 0x0:h['description'])){const a=_[wb(0x2e7)](G,O);_[wb(0x267)](G,O),yield this['getType'](w,h[wb(0x2e6)],G);const l=_['get'](G,O);!_['isArray'](a)?_[wb(0x2b4)](G,O,[l]):(a[wb(0x25d)](l),_[wb(0x2b4)](G,O,a)),Z=![];}return v||[];}case wb(0x226):{return v=yield this[wb(0x2c7)](h,w,G,P),v;}case wb(0x234):v=(0x0,utils_1[wb(0x25b)])(yield this[wb(0x202)](w,h,P))||undefined;break;case wb(0x21a):case wb(0x2c1):case wb(0x2dc):default:v=yield this[wb(0x202)](w,h,P,G);break;}return!_['isUndefined'](v)&&_['set'](G,O,v),v;});}[a8T(0x202)](w,h,G,P){var v;return __awaiter(this,void 0x0,void 0x0,function*(){const wq=a8h,O=w[w['length']-0x1],{defaultValue:defaultValue=(v=h===null||h===void 0x0?void 0x0:h[wq(0x2ad)])!==null&&v!==void 0x0?v:h===null||h===void 0x0?void 0x0:h['default'],choices:choices=h===null||h===void 0x0?void 0x0:h['enum'],pagination:Z}=yield(0x0,api_helpers_1[wq(0x296)])(O,this[wq(0x2f4)],this[wq(0x21c)],P,this['pathVars'],w);let a=wq(0x1f4);if(!_[wq(0x259)](choices)&&choices['length']>0x0){if(Z!==undefined&&Z['nextPageCursor']!==undefined)a='pagination-prompt';else choices[wq(0x2b5)]>0x4&&typeof choices[0x0]===wq(0x21a)?a=wq(0x20e):a=wq(0x235);}else{if((h===null||h===void 0x0?void 0x0:h[wq(0x26c)])===wq(0x2c1))a=wq(0x21b);else{if((h===null||h===void 0x0?void 0x0:h['type'])===wq(0x2dc))a='input';else(h===null||h===void 0x0?void 0x0:h[wq(0x26c)])===wq(0x234)&&(a=wq(0x2cf));}}let l=G!==![]?!_[wq(0x2ca)](defaultValue)?defaultValue:JSON[wq(0x224)](defaultValue):_[wq(0x281)](defaultValue)?defaultValue:'don\x27t\x20change';if(choices)l=l['toString']();_[wq(0x27e)](this[wq(0x2c9)],w['join']('.'))&&(l=this[wq(0x2c9)][w[wq(0x26d)]('.')]);const B=choices&&G===![]?[wq(0x2d9),...choices]:choices,U=(h===null||h===void 0x0?void 0x0:h['type'])==='integer',A=Object[wq(0x272)]({'type':a,'name':'id','message':this['getQuestionString'](w,h),'choices':B,'default':l,'filter':this[wq(0x242)](a,G),'validate':this['validate'](h,G,U)},Z),D=(yield inquirer[wq(0x2f3)]([A]))['id'];if(D===wq(0x2d9)||D==='')return undefined;if(U)return parseInt(D,0xa);return D;});}['getQuestionString'](w,h){const wf=a8T,G=(h===null||h===void 0x0?void 0x0:h[wf(0x26c)])!==wf(0x2c1)?'What\x20do\x20you\x20want\x20to\x20use\x20as':wf(0x285);return this[wf(0x1f2)](w,G,h===null||h===void 0x0?void 0x0:h[wf(0x27b)]);}[a8T(0x2a6)](){return __awaiter(this,void 0x0,void 0x0,function*(){const wi=a8h,w=h=>__awaiter(this,void 0x0,void 0x0,function*(){const we=a8h;var G;const P=yield this[we(0x2f4)]['list'][we(0x280)]({'options':{'per_page':this[we(0x2f5)],'cursor':h}}),v=P[we(0x28a)][we(0x280)][we(0x243)](O=>O['id']);return{'elements':v,'nextCursor':(G=P[we(0x204)])===null||G===void 0x0?void 0x0:G[we(0x2e2)]};});return yield this[wi(0x2d0)](wi(0x2e9),w);});}['askForProjectScopedResource'](w,h,G,P){return __awaiter(this,void 0x0,void 0x0,function*(){const wu=a8h,v=G||this[wu(0x2f4)]['contextProvider'][wu(0x205)]();if(_['isUndefined'](v))throw new Error('Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.');const O=yield h(v);return yield this[wu(0x237)](w,O,(P?P+wu(0x26a):'')+'project:\x20\x27'+v+'\x27');});}['askForProjectScopedResourcePaginated'](w,h,G,P){return __awaiter(this,void 0x0,void 0x0,function*(){const wt=a8h,v=G||this['apiClient'][wt(0x206)][wt(0x205)]();if(_[wt(0x259)](v))throw new Error('Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.');const O=yield h(v);return yield this[wt(0x2d0)](w,O,(P?P+'\x20in\x20':'')+wt(0x256)+v+'\x27');});}[a8T(0x271)](){return __awaiter(this,void 0x0,void 0x0,function*(){const wV=a8h,w=h=>__awaiter(this,void 0x0,void 0x0,function*(){const wS=a8h;var G;const P=yield this[wS(0x2f4)][wS(0x235)][wS(0x283)]({'options':{'per_page':this[wS(0x2f5)],'cursor':h}});return{'elements':P[wS(0x28a)][wS(0x283)]['map'](v=>v[wS(0x268)]),'nextCursor':(G=P[wS(0x204)])===null||G===void 0x0?void 0x0:G[wS(0x2e2)]};});return this[wV(0x2d0)]('domain',w);});}[a8T(0x23c)](){return __awaiter(this,void 0x0,void 0x0,function*(){const wM=a8h,w=h=>__awaiter(this,void 0x0,void 0x0,function*(){const wC=a8h;var G;const P=yield this[wC(0x2f4)][wC(0x235)][wC(0x274)]({'options':{'per_page':this[wC(0x2f5)],'cursor':h}});return{'elements':P[wC(0x28a)][wC(0x2d2)][wC(0x243)](v=>v['id']),'nextCursor':(G=P[wC(0x204)])===null||G===void 0x0?void 0x0:G[wC(0x2e2)]};});return this[wM(0x2d0)](wM(0x2d2),w);});}[a8T(0x26f)](w){const wQ=a8T;this[wQ(0x2a7)]=w;}}exports[a8T(0x1f9)]=InquirerHelper;
|
|
1
|
+
'use strict';const a8d=a8k;(function(H,k){const G=a8k,S=H();while(!![]){try{const W=-parseInt(G(0x224))/0x1+-parseInt(G(0x247))/0x2*(-parseInt(G(0x1e0))/0x3)+parseInt(G(0x240))/0x4*(parseInt(G(0x190))/0x5)+parseInt(G(0x1b4))/0x6*(parseInt(G(0x216))/0x7)+parseInt(G(0x1a1))/0x8+parseInt(G(0x20e))/0x9+-parseInt(G(0x1ed))/0xa;if(W===k)break;else S['push'](S['shift']());}catch(Z){S['push'](S['shift']());}}}(a8H,0xda7cd));function a8H(){const Hg=['credentials','SAVE','askForService','opt','name','success','pathVars','__createBinding','choice','isEmpty','includes','ask','.\x20This\x20is\x20irreversible.\x20Please\x20confirm!','underline','minLength','12vKFjVe','jobs','completedAt','value','getType','retrievePayloadViaInteractiveCli','Something\x20unexpected\x20happened.','body','askGeneric','isUndefined','DynamicReloadPaginationPrompt','What\x27s\x20the\x20','must\x20be\x20a\x20valid\x20non-empty\x20json\x20string','bold','throw','stringify','string','askForJobRun','example','services','\x20to\x20use:','service\x20containers','No,\x20edit','editedResult','containers','./pagination/inquirer-pagination-prompt','__importStar','askArrayEntry','projects','Choose\x20the\x20name\x20of\x20the\x20new\x20local\x20context:','nextPageCursor','password','yellowBright','Unexpected\x20file\x20type:\x20','this\x20option\x20is\x20required,\x20please\x20answer','toUpperCase','runs','main-context','propToType','REPEAT','No\x20','properties','askForSecret','askForAddonRestore','3128028lFsodn','askForLogSink','to\x20use:','Aborted.','addons','templates','subdomain','./api-helpers',',\x20supported\x20types:\x20[json|yaml|yml]','Do\x20you\x20want\x20to\x20add\x20more','deleteWarningPrompt','max','backups','24817140EaNseQ','don\x27t\x20change','grey','registerPrompt','call','red','type','isArray','Please\x20confirm\x20following\x20configuration:\x0a','data','\x20(full\x20domain:\x20','then','isNaN','__setModuleDefault','must\x20be\x20longer\x20than\x20or\x20equal\x20to\x20','defineProperty','a\x20Northflank\x20resource','enum','\x20characters,\x20is\x20','editor','retry','tmpCmdPath','Provide\x20a\x20file\x20path\x20to\x20write\x20the\x20configuration\x20to\x20(<name>.[json|yaml|yml])','secret','token','getInnerType','askForResourcePaginated','No\x20containers\x20found','minimum','InquirerHelper','join','all-builds','addEntry','1296882SOVdsI','__awaiter','askForContainer','integer','writable','\x20type?','object','editPayload','2288552osNFEC','Go\x20to\x20editor','domain\x20(','unshift','registryCredentials','askForResource','array','saveFile','cursor','YES','job:\x20\x27','getCurrentProjectName','maximum','createdAt','1003622lZsOCE','confirm','pagination-prompt','doesn\x27t\x20match\x20pattern\x20\x27','assign','input','oneOf','domains','reset','askForAddon','contextProvider','keys','found','safeDump','restores','map','getQuestionString','must\x20be\x20smaller\x20than\x20or\x20equal\x20to\x20','set','js-yaml','fetchResourceList','default','writeFileSync','concat','\x20in\x20','Should\x20it\x20be','secrets','pipeline','1548028Acpzku','items','prototype','askForBuild','search-list','safeLoad','tokenPrompt','2NfywOc','What\x20do\x20you\x20want\x20to\x20use\x20as','loginPrompt','pipelines','job\x20containers','description','askForJob','isObject','service:\x20\x27','No\x20builds\x20found','restore','confirmation','trim','Do\x20you\x20want\x20to\x20add','filter','blue','volume','pagination','templateRuns','must\x20be\x20bigger\x20than\x20or\x20equal\x20to\x20','for\x20this\x20','get','repeat','EDIT','job\x20builds','apiClient','find','No,\x20but\x20save\x20as\x20file','Configuration\x20file\x20written\x20to\x20','pattern','values','subdomains','isValidJSON','green','template\x20run','\x20(completedAt:\x20','confirmationPrompt','askForTemplateRun','has','fullName','No,\x20repeat','Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.','all-job-runs','builds','\x20characters','blueBright','required','must\x20be\x20shorter\x20than\x20or\x20equal\x20to\x20','getPathString','ABORT','Choose\x20the\x20login\x20token:','askForAddonBackup','must\x20be\x20a\x20number,\x20is\x20','maxLength','project','resultCache','__esModule','askForTemplate','Choose\x20the\x20','Enter\x20the\x20','test','addon','\x20(startedAt:\x20','greenBright','domain','volumes','length','lodash','list','Writing\x20configuration\x20failed:\x20','log\x20sink','service\x20build','askForProject','project:\x20\x27','job','not\x20completed','elements','fileName','job\x20runs','slice','rawObject','unset','askForVolume','isBoolean','configurable','toString','10maiTId','next','inquirer-search-list','boolean','askForProjectScopedResourcePaginated','push','prompt','whiteBright','create','addon:\x20\x27','logSinks','inquirer','validate','all-containers','pop','override','defaultPaginationPageSize','14124808XHlRnu','split','done','warning'];a8H=function(){return Hg;};return a8H();}var __createBinding=this&&this[a8d(0x1ac)]||(Object[a8d(0x198)]?function(H,S,W,Z){const e=a8d;if(Z===undefined)Z=W;var y=Object['getOwnPropertyDescriptor'](S,W);(!y||(e(0x25c)in y?!S[e(0x172)]:y[e(0x212)]||y[e(0x18e)]))&&(y={'enumerable':!![],'get':function(){return S[W];}}),Object[e(0x1fc)](H,Z,y);}:function(H,S,W,Z){if(Z===undefined)Z=W;H[Z]=S[W];}),__setModuleDefault=this&&this[a8d(0x1fa)]||(Object[a8d(0x198)]?function(H,k){const m=a8d;Object['defineProperty'](H,m(0x239),{'enumerable':!![],'value':k});}:function(H,k){const U=a8d;H[U(0x239)]=k;}),__importStar=this&&this[a8d(0x1ce)]||function(H){const K=a8d;if(H&&H[K(0x172)])return H;var S={};if(H!=null){for(var W in H)if(W!==K(0x239)&&Object[K(0x242)]['hasOwnProperty'][K(0x1f1)](H,W))__createBinding(S,H,W);}return __setModuleDefault(S,H),S;},__awaiter=this&&this[a8d(0x20f)]||function(H,k,S,W){function Z(y){return y instanceof S?y:new S(function(O){O(y);});}return new(S||(S=Promise))(function(y,O){const q=a8k;function b(r){try{j(W['next'](r));}catch(V){O(V);}}function h(r){const l=a8k;try{j(W[l(0x1c2)](r));}catch(V){O(V);}}function j(r){const J=a8k;r[J(0x1a3)]?y(r[J(0x1b7)]):Z(r[J(0x1b7)])[J(0x1f8)](b,h);}j((W=W['apply'](H,k||[]))[q(0x191)]());});},__importDefault=this&&this['__importDefault']||function(H){const n=a8d;return H&&H[n(0x172)]?H:{'default':H};};function a8k(H,k){const S=a8H();return a8k=function(W,Z){W=W-0x170;let y=S[W];return y;},a8k(H,k);}Object[a8d(0x1fc)](exports,a8d(0x172),{'value':!![]}),exports[a8d(0x20a)]=void 0x0;const _=__importStar(require(a8d(0x17d))),chalk_1=__importDefault(require('chalk')),fs=__importStar(require('fs')),utils_1=require('./utils'),api_helpers_1=require(a8d(0x1e7)),inquirer_pagination_prompt_1=require(a8d(0x1cd)),inquirer=require(a8d(0x19b)),inquirerSearchList=require(a8d(0x192)),yaml=require(a8d(0x237));var ConfirmChoices;(function(H){const v=a8d;H['YES']='Yes,\x20send',H[v(0x1db)]=v(0x26f),H[v(0x25e)]=v(0x1ca),H[v(0x1a6)]=v(0x262),H['ABORT']='No,\x20abort';}(ConfirmChoices||(ConfirmChoices={})));class InquirerHelper{constructor(H){const N=a8d;this['apiClient']=H,this[N(0x1a0)]=0x32,this[N(0x215)]=k=>__awaiter(this,void 0x0,void 0x0,function*(){const i=N,{editedResult:S}=yield inquirer[i(0x196)]([{'type':i(0x200),'name':i(0x1cb),'message':i(0x217),'default':yaml[i(0x231)](k)}]);return yaml[i(0x245)](S);}),this[N(0x21d)]=k=>__awaiter(this,void 0x0,void 0x0,function*(){const o=N,S=O=>o(0x1d5)+O+o(0x1e8);function W(){return __awaiter(this,void 0x0,void 0x0,function*(){const x=a8k;return inquirer['prompt']([{'type':x(0x229),'name':x(0x187),'message':x(0x203),'validate':O=>new RegExp('.*\x5c.(json|yaml|yml)$')[x(0x176)](O)?!![]:S(O)}]);});}const {fileName:Z}=yield W(),y=Z[o(0x18f)]()[o(0x1a2)]('.')[o(0x19e)]();try{switch(y){case'json':(0x0,utils_1['success'])(o(0x263)+Z);return fs[o(0x23a)](Z,JSON[o(0x1c3)](k,null,'\x20\x20'));case'yaml':case'yml':(0x0,utils_1[o(0x1aa)])(o(0x263)+Z);return fs[o(0x23a)](Z,yaml[o(0x231)](k));default:(0x0,utils_1[o(0x1a4)])(S(y));}}catch(O){(0x0,utils_1[o(0x1a4)])(o(0x17f)+O['message']);}return undefined;}),this[N(0x255)]=(k,S)=>W=>{const Y=N,Z=typeof W===Y(0x1c4)?W[Y(0x253)]():W;return S===![]&&Z==='don\x27t\x20change'?'':Z;},this['validate']=(k,S,W)=>Z=>{const R=N,y=[];if(Z===''||Z===R(0x1ee)){if(S!==![])y['push'](R(0x1d6));else return!![];}k[R(0x1f3)]===R(0x1c4)&&!_['isUndefined'](k[R(0x264)])&&y[R(0x195)](new RegExp(k[R(0x264)])[R(0x176)](Z)?!![]:R(0x227)+k[R(0x264)]+'\x27');k[R(0x1f3)]==='string'&&!_[R(0x1bd)](k[R(0x1b3)])&&y[R(0x195)](Z[R(0x17c)]>=k['minLength']?!![]:R(0x1fb)+k[R(0x1b3)]+R(0x1ff)+Z[R(0x17c)]+R(0x273));k[R(0x1f3)]===R(0x1c4)&&!_[R(0x1bd)](k[R(0x27c)])&&y[R(0x195)](Z[R(0x17c)]<=k[R(0x27c)]?!![]:R(0x276)+k['maxLength']+R(0x1ff)+Z[R(0x17c)]+R(0x273));W&&Number[R(0x1f9)](parseInt(Z,0xa))&&y['push'](R(0x27b)+Z);k[R(0x1f3)]==='integer'&&!_[R(0x1bd)](k[R(0x209)])&&y[R(0x195)](Z>=k[R(0x209)]?!![]:R(0x25a)+k[R(0x209)]);k['type']===R(0x211)&&!_['isUndefined'](k['maximum'])&&y[R(0x195)](Z<=k[R(0x222)]?!![]:R(0x235)+k['maximum']);if(k[R(0x1f3)]==='rawObject'){const h=(0x0,utils_1[R(0x267)])(Z);y[R(0x195)](h===![]||_[R(0x1ae)](h)?R(0x1c0):!![]);}const O=y['filter'](j=>j!==!![]),b=(k===null||k===void 0x0?void 0x0:k['example'])?'\x0a'+chalk_1['default'][R(0x1f2)]('>>')+'\x20Example:\x20'+chalk_1[R(0x239)][R(0x197)](JSON[R(0x1c3)](k[R(0x1c6)])):'';return O['length']>0x0?O[R(0x20b)](chalk_1[R(0x239)][R(0x1b2)]('\x20and\x20it\x20'))+b:!![];},this[N(0x277)]=(k,S,W)=>{const F=N,Z=k[k['length']-0x1];function y(){const g=a8k;return k[g(0x189)](0x0,-0x1)[g(0x233)](h=>h['charAt'](0x0)[g(0x1d7)]()+h[g(0x189)](0x1))[g(0x20b)]('>');}const O=k['length']>0x1?chalk_1[F(0x239)]['bgGrey']['whiteBright'](y())+':\x20':'',b=W?'\x20('+chalk_1[F(0x239)][F(0x256)](W)+')':'';return chalk_1['default'][F(0x22c)](''+O+S+'\x20'+chalk_1[F(0x239)][F(0x1c1)][F(0x179)](Z)+b+'?');},this[N(0x21b)]=(k,S,W)=>__awaiter(this,void 0x0,void 0x0,function*(){const A=N;if(S['length']<0x1){const O=W?A(0x25b)+W:A(0x230);throw new Error(A(0x1dc)+k+'\x20'+O+'.');}const Z=A(0x174)+k+A(0x1c8),y=S[A(0x17c)]>0x4?A(0x244):A(0x17e);return(yield inquirer[A(0x196)]([{'type':y,'name':'name','message':Z,'choices':S}]))['name'];}),this['askForResourcePaginated']=(k,S,W)=>__awaiter(this,void 0x0,void 0x0,function*(){const L=N,{elements:Z,nextCursor:y}=yield S();if(Z[L(0x17c)]<0x1){const h=W?L(0x25b)+W:L(0x230);throw new Error(L(0x1dc)+k+'\x20'+h+'.');}const O='Choose\x20the\x20'+k+L(0x1c8);if(y!==undefined){const j=({nextPageCursor:r})=>__awaiter(this,void 0x0,void 0x0,function*(){const s=L,V=yield S(r);return{'elements':V[s(0x186)],'nextPageCursor':V['nextCursor']};});return(yield inquirer[L(0x196)]([{'type':L(0x226),'name':L(0x1a9),'message':O,'choices':Z,'nextPageCursor':y,'loadMore':j}]))[L(0x1a9)];}const b=Z['length']>0x4?L(0x244):L(0x17e);return(yield inquirer[L(0x196)]([{'type':b,'name':L(0x1a9),'message':O,'choices':Z}]))[L(0x1a9)];}),this[N(0x1bc)]=(k,S)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const a=N,W=''+(S?'('+chalk_1['default'][a(0x256)](S)+')\x20':''),Z=a(0x175)+chalk_1[a(0x239)][a(0x268)](k)+'\x20'+W+a(0x1e2),y=this['validate']({'type':a(0x1c4),'required':!![]});return(yield inquirer[a(0x196)]([{'type':'input','name':'name','message':Z,'validate':y}]))[a(0x1a9)];}),this['askConfirm']=k=>__awaiter(this,void 0x0,void 0x0,function*(){const T=N;return(yield inquirer[T(0x196)]([{'type':T(0x225),'name':'name','message':k,'default':!![]}]))[T(0x1a9)];}),this[N(0x1a7)]=k=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const S=W=>Z=>__awaiter(this,void 0x0,void 0x0,function*(){const Q=a8k;var y;const O=yield this['apiClient'][Q(0x17e)][Q(0x1c7)]({'parameters':{'projectId':W},'options':{'per_page':this[Q(0x1a0)],'cursor':Z}}),b=O[Q(0x1f6)]['services'][Q(0x233)](h=>h['id']);return{'elements':b,'nextCursor':(y=O[Q(0x258)])===null||y===void 0x0?void 0x0:y[Q(0x21e)]};});return this['askForProjectScopedResourcePaginated']('service',S,k);}),this[N(0x173)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const B=N,k=S=>__awaiter(this,void 0x0,void 0x0,function*(){const u=a8k;var W;const Z=yield this[u(0x260)][u(0x17e)][u(0x1e5)]({'options':{'per_page':this[u(0x1a0)],'cursor':S}}),y=Z[u(0x1f6)][u(0x1e5)]['map'](O=>O['id']);return{'elements':y,'nextCursor':(W=Z[u(0x258)])===null||W===void 0x0?void 0x0:W[u(0x21e)]};});return this[B(0x207)]('template',k);}),this[N(0x26c)]=k=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const p=N;if(_[p(0x1bd)](k))throw new Error('Template\x20id\x20not\x20provided.');const S=W=>__awaiter(this,void 0x0,void 0x0,function*(){const P=p;var Z;let y=this[P(0x1a0)];const O=yield this[P(0x260)][P(0x17e)][P(0x259)]({'parameters':{'templateId':k},'options':{'per_page':y,'cursor':W}}),b=O[P(0x1f6)][P(0x259)][P(0x233)](h=>h['id']+'\x20(startedAt:\x20'+h[P(0x223)]+')');return{'elements':b,'nextCursor':(Z=O[P(0x258)])===null||Z===void 0x0?void 0x0:Z[P(0x21e)]};});return this[p(0x207)](p(0x269),S)[p(0x1f8)](W=>W['split']('\x20')[0x0]);}),this[N(0x1e1)]=()=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const D=N,k=S=>__awaiter(this,void 0x0,void 0x0,function*(){const E=a8k;var W;let Z=this['defaultPaginationPageSize'];const y=yield this['apiClient'][E(0x17e)][E(0x19a)]({'options':{'per_page':Z,'cursor':S}}),O=y[E(0x1f6)]['logSinks'][E(0x233)](b=>b['id']);return{'elements':O,'nextCursor':(W=y[E(0x258)])===null||W===void 0x0?void 0x0:W['cursor']};});return this['askForResourcePaginated'](D(0x180),k);}),this['askForPipeline']=k=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const t=N,S=W=>Z=>__awaiter(this,void 0x0,void 0x0,function*(){const w=a8k;var y;const O=yield this['apiClient'][w(0x17e)][w(0x24a)]({'parameters':{'projectId':W},'options':{'per_page':this[w(0x1a0)],'cursor':Z}}),b=O[w(0x1f6)][w(0x24a)][w(0x233)](h=>h['id']);return{'elements':b,'nextCursor':(y=O[w(0x258)])===null||y===void 0x0?void 0x0:y['cursor']};});return this[t(0x194)](t(0x23f),S,k);}),this[N(0x24d)]=k=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const X=N,S=W=>Z=>__awaiter(this,void 0x0,void 0x0,function*(){const I=a8k;var y;const O=yield this['apiClient'][I(0x17e)]['jobs']({'parameters':{'projectId':W},'options':{'per_page':this[I(0x1a0)],'cursor':Z}}),b=O[I(0x1f6)][I(0x1b5)][I(0x233)](h=>h['id']);return{'elements':b,'nextCursor':(y=O['pagination'])===null||y===void 0x0?void 0x0:y['cursor']};});return this[X(0x194)]('job',S,k);}),this[N(0x1c5)]=(k,S,W=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const H0=N,Z=H0(0x271),y=O=>b=>__awaiter(this,void 0x0,void 0x0,function*(){const H1=H0;var h;const j=yield this[H1(0x260)]['get'][H1(0x184)][H1(0x1d8)]({'parameters':{'projectId':O,'jobId':k},'options':{'per_page':this[H1(0x1a0)],'cursor':b}}),r=j[H1(0x1f6)][H1(0x1d8)][H1(0x233)](V=>V['id']+H1(0x178)+V['startedAt']+')');return W&&r['unshift'](Z),{'elements':r,'nextCursor':(h=j[H1(0x258)])===null||h===void 0x0?void 0x0:h['cursor']};});return this[H0(0x194)](H0(0x188),y,S,H0(0x220)+k+'\x27')['then'](O=>{const H2=H0,b=O[H2(0x1a2)]('\x20')[0x0];if(b===Z)return undefined;return b;});}),this[N(0x243)]=(k,S,W,Z=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const H3=N,y=H3(0x20c);if(W!==undefined){const O=b=>h=>__awaiter(this,void 0x0,void 0x0,function*(){const H4=H3;var j;const r=yield this[H4(0x260)][H4(0x25c)][H4(0x184)]['builds']({'parameters':{'projectId':b,'jobId':W},'options':{'per_page':this[H4(0x1a0)],'cursor':h}}),V=r[H4(0x1f6)]['builds'][H4(0x233)](f=>f['id']+H4(0x178)+f[H4(0x223)]+')');return Z&&V[H4(0x219)](y),{'elements':V,'nextCursor':(j=r['pagination'])===null||j===void 0x0?void 0x0:j[H4(0x21e)]};});return this[H3(0x194)](H3(0x25f),O,k,H3(0x220)+W+'\x27')[H3(0x1f8)](b=>{const h=b['split']('\x20')[0x0];if(h===y)return undefined;return h;});}if(S!==undefined){const b=h=>j=>__awaiter(this,void 0x0,void 0x0,function*(){const H5=H3;var r;const V=yield this[H5(0x260)]['get']['service'][H5(0x272)]({'parameters':{'projectId':h,'serviceId':S},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':j}}),f=V['data'][H5(0x272)][H5(0x233)](M=>M['id']+H5(0x178)+M[H5(0x223)]+')');if(Z)f['unshift'](y);return{'elements':f,'nextCursor':(r=V[H5(0x258)])===null||r===void 0x0?void 0x0:r['cursor']};});return this[H3(0x194)](H3(0x181),b,k,H3(0x24f)+W+'\x27')['then'](h=>{const H6=H3,r=h[H6(0x1a2)]('\x20')[0x0];if(r===y)return undefined;return r;});}throw new Error(H3(0x250));}),this[N(0x210)]=(k,S,W,Z=![])=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const H7=N,y=H7(0x19d);if(W!==undefined){const O=b=>h=>__awaiter(this,void 0x0,void 0x0,function*(){const H8=H7;var j,r;const V=yield this[H8(0x260)][H8(0x25c)][H8(0x184)]['containers']({'parameters':{'projectId':b,'jobId':W},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':h}}),f=(j=V['data'][H8(0x1cc)])!==null&&j!==void 0x0?j:[],M=f===null||f===void 0x0?void 0x0:f['map'](C=>C['name']+'\x20(startedAt:\x20'+C[H8(0x223)]+')');return Z&&M[H8(0x219)](y),{'elements':M,'nextCursor':(r=V[H8(0x258)])===null||r===void 0x0?void 0x0:r[H8(0x21e)]};});return this['askForProjectScopedResourcePaginated'](H7(0x24b),O,k,'job:\x20\x27'+W+'\x27')['then'](b=>{const H9=H7,h=b[H9(0x1a2)]('\x20')[0x0];if(h===y)return undefined;return h;});}if(S!==undefined){const b=h=>j=>__awaiter(this,void 0x0,void 0x0,function*(){const HH=H7;var r,V;const f=yield this['apiClient'][HH(0x25c)]['service'][HH(0x1cc)]({'parameters':{'projectId':h,'serviceId':S},'options':{'per_page':this[HH(0x1a0)],'cursor':j}}),M=(r=f[HH(0x1f6)][HH(0x1cc)])!==null&&r!==void 0x0?r:[],C=M['map'](z=>z['name']+'\x20(startedAt:\x20'+z[HH(0x223)]+')');if(Z)C===null||C===void 0x0?void 0x0:C['unshift'](y);return{'elements':C,'nextCursor':(V=f['pagination'])===null||V===void 0x0?void 0x0:V['cursor']};});return this[H7(0x194)](H7(0x1c9),b,k,'service:\x20\x27'+W+'\x27')[H7(0x1f8)](h=>{const Hk=H7,r=h[Hk(0x1a2)]('\x20')[0x0];if(r===y)return undefined;return r;});}throw new Error(H7(0x208));}),this[N(0x22d)]=k=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const HW=N,S=W=>Z=>__awaiter(this,void 0x0,void 0x0,function*(){const HS=a8k;var y;const O=yield this[HS(0x260)][HS(0x17e)][HS(0x1e4)]({'parameters':{'projectId':W},'options':{'per_page':this[HS(0x1a0)],'cursor':Z}});return{'elements':O[HS(0x1f6)][HS(0x1e4)]['map'](b=>b['id']),'nextCursor':(y=O[HS(0x258)])===null||y===void 0x0?void 0x0:y[HS(0x21e)]};});return this['askForProjectScopedResourcePaginated'](HW(0x177),S,k);}),this[N(0x27a)]=(k,S)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Hy=N,W=Z=>y=>__awaiter(this,void 0x0,void 0x0,function*(){const HZ=a8k;var O;const b=yield this['apiClient']['get']['addon']['backups']({'parameters':{'projectId':Z,'addonId':S},'options':{'per_page':this[HZ(0x1a0)],'cursor':y}});return{'elements':b[HZ(0x1f6)][HZ(0x1ec)][HZ(0x233)](h=>h['id']+HZ(0x26a)+(h[HZ(0x1b6)]||'not\x20completed')+')'),'nextCursor':(O=b[HZ(0x258)])===null||O===void 0x0?void 0x0:O[HZ(0x21e)]};});return this[Hy(0x194)](Hy(0x1ec),W,k,Hy(0x199)+S+'\x27')[Hy(0x1f8)](Z=>Z[Hy(0x1a2)]('\x20')[0x0]);}),this[N(0x1df)]=(k,S,W)=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Hb=N,Z=y=>O=>__awaiter(this,void 0x0,void 0x0,function*(){const HO=a8k;var b;const h=yield this[HO(0x260)][HO(0x25c)][HO(0x177)][HO(0x232)]({'parameters':{'projectId':y,'addonId':S,'backupId':W},'options':{'per_page':this[HO(0x1a0)],'cursor':O}});return{'elements':h[HO(0x1f6)][HO(0x232)]['map'](j=>j['id']+HO(0x26a)+(j[HO(0x1b6)]||HO(0x185))+')'),'nextCursor':(b=h[HO(0x258)])===null||b===void 0x0?void 0x0:b[HO(0x21e)]};});return this['askForProjectScopedResourcePaginated'](Hb(0x251),Z,k,Hb(0x199)+S+'\x27')[Hb(0x1f8)](y=>y[Hb(0x1a2)]('\x20')[0x0]);}),this[N(0x18c)]=k=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Hj=N,S=W=>__awaiter(this,void 0x0,void 0x0,function*(){const Hh=a8k;return(yield this[Hh(0x260)]['list'][Hh(0x17b)]({'parameters':{'projectId':W}}))[Hh(0x1f6)]['map'](Z=>Z['id']);});return this['askForProjectScopedResource'](Hj(0x257),S,k);}),this[N(0x1de)]=k=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const HV=N,S=W=>Z=>__awaiter(this,void 0x0,void 0x0,function*(){const Hr=a8k;var y;const O=yield this['apiClient'][Hr(0x17e)][Hr(0x23e)]({'parameters':{'projectId':W},'options':{'per_page':this['defaultPaginationPageSize'],'cursor':Z}});return{'elements':O[Hr(0x1f6)]['secrets'][Hr(0x233)](b=>b['id']),'nextCursor':(y=O['pagination'])===null||y===void 0x0?void 0x0:y[Hr(0x21e)]};});return this[HV(0x194)](HV(0x204),S,k);}),this['askForSubdomain']=k=>()=>__awaiter(this,void 0x0,void 0x0,function*(){const Hf=N,S=yield this[Hf(0x260)]['get'][Hf(0x17a)]({'parameters':{'domain':k}}),W=S[Hf(0x1f6)][Hf(0x266)][Hf(0x233)](y=>y['name']+Hf(0x1f7)+y[Hf(0x26e)]+')'),Z=Hf(0x218)+k+')';return this['askForResource'](Hf(0x1e6),W,Z)[Hf(0x1f8)](y=>y[Hf(0x1a2)]('\x20')[0x0]);}),this[N(0x1ea)]=k=>__awaiter(this,void 0x0,void 0x0,function*(){const HM=N;return(yield inquirer[HM(0x196)]([{'type':'confirm','name':HM(0x252),'message':chalk_1[HM(0x239)][HM(0x1d4)]('WARNING:\x20You\x20are\x20about\x20to\x20delete\x20'+(k||HM(0x1fd))+HM(0x1b1)),'default':![]}]))['confirmation'];}),this[N(0x249)]=(k,S)=>__awaiter(this,void 0x0,void 0x0,function*(){const HC=N;_[HC(0x1bd)](k[HC(0x1a9)])&&(S[HC(0x17c)]<=0x0?_[HC(0x236)](k,HC(0x1a9),HC(0x239)):yield(0x0,utils_1[HC(0x201)])(0xa)(()=>__awaiter(this,void 0x0,void 0x0,function*(){const HG=HC,{name:W}=yield inquirer['prompt']([{'type':'input','name':HG(0x1a9),'message':HG(0x1d1),'default':HG(0x1d9)}]);if(!k[HG(0x19f)]&&S[HG(0x261)](Z=>Z[HG(0x1a9)]===W)){const {c:Z}=yield inquirer[HG(0x196)]([{'type':HG(0x225),'name':'c','message':'Context\x20with\x20name\x20\x27'+W+'\x27\x20already\x20exists.\x20Do\x20you\x20want\x20to\x20override\x20this\x20context\x20(y)\x20or\x20enter\x20a\x20new\x20name\x20(N)?','default':![]}]);if(Z===![])throw new Error('Context\x20name\x20already\x20exists.');_['set'](k,HG(0x19f),!![]);}_[HG(0x236)](k,HG(0x1a9),W);})));if(_['isUndefined'](k[HC(0x205)])){const W=yield this[HC(0x246)]();_[HC(0x236)](k,HC(0x205),W);}return k;}),this[N(0x246)]=()=>__awaiter(this,void 0x0,void 0x0,function*(){const Hd=N,{token:k}=yield inquirer[Hd(0x196)]([{'type':Hd(0x1d3),'name':Hd(0x205),'mask':'*','message':Hd(0x279)}]);return k;}),inquirer[N(0x1f0)]('search-list',inquirerSearchList),inquirer[N(0x1f0)](N(0x226),inquirer_pagination_prompt_1[N(0x1be)]);}['confirmationPrompt'](H,k){return __awaiter(this,void 0x0,void 0x0,function*(){const He=a8k,S=yaml[He(0x231)](H),W=_[He(0x1eb)](S[He(0x1a2)]('\x0a')[He(0x233)](O=>O[He(0x17c)])),Z=chalk_1[He(0x239)][He(0x1ef)]('-'[He(0x25d)](W)+'\x0a'),{confirm:y}=yield inquirer[He(0x196)]([{'type':He(0x17e),'name':'confirm','message':''+chalk_1[He(0x239)]['bold'][He(0x268)](He(0x1f5))+Z+chalk_1[He(0x239)][He(0x274)](S)+Z,'choices':Object[He(0x265)](ConfirmChoices)}]);switch(y){case ConfirmChoices[He(0x21f)]:return H;case ConfirmChoices[He(0x278)]:throw new Error(He(0x1e3));case ConfirmChoices[He(0x1db)]:return this[He(0x1b9)](k);case ConfirmChoices['EDIT']:return this[He(0x26b)](yield this[He(0x215)](H),k);case ConfirmChoices[He(0x1a6)]:yield this[He(0x21d)](H);return this[He(0x26b)](H,k);default:throw new Error(He(0x1ba));}});}[a8d(0x1b9)](H,k){return __awaiter(this,void 0x0,void 0x0,function*(){const Hm=a8k;if((k===null||k===void 0x0?void 0x0:k[Hm(0x171)])!==undefined)this['resultCache']=k===null||k===void 0x0?void 0x0:k[Hm(0x171)];this[Hm(0x202)]=k===null||k===void 0x0?void 0x0:k['cmdPath'];const S={};return yield this[Hm(0x1da)]([],H[Hm(0x1a8)][Hm(0x1bb)],S),this[Hm(0x171)]=S,yield this[Hm(0x26b)](S,H);});}[a8d(0x1da)](H,k,S,W){return __awaiter(this,void 0x0,void 0x0,function*(){const HU=a8k;let Z;if(k[HU(0x22a)]&&!_['has'](k,HU(0x1dd))){if(k[HU(0x22a)][HU(0x17c)]>0x1){const {choice:y}=yield inquirer[HU(0x196)]([{'type':HU(0x17e),'name':HU(0x1ad),'message':HU(0x1bf)+(H[H[HU(0x17c)]-0x1]||'')+HU(0x213),'choices':k[HU(0x22a)][HU(0x233)](O=>{const HK=HU;var b;return(b=O[HK(0x24c)])!==null&&b!==void 0x0?b:'??';})}]);Z=yield this[HU(0x1b8)](H,k[HU(0x22a)][HU(0x261)](O=>O[HU(0x24c)]===y),S,W);}else{const O=k['oneOf'][0x0];_[HU(0x236)](O,HU(0x24c),k[HU(0x24c)]),Z=yield this[HU(0x1b8)](H,O,S,W);}Z={};}else Z=yield this[HU(0x1b8)](H,k,S,W);return Z;});}[a8d(0x206)](H,k,S,W){var Z;return __awaiter(this,void 0x0,void 0x0,function*(){const Hl=a8k;if(W===![]){const {addEntry:b}=yield inquirer['prompt']([{'type':Hl(0x225),'name':Hl(0x20d),'message':this[Hl(0x277)](k,'Do\x20you\x20want\x20to\x20add',H===null||H===void 0x0?void 0x0:H[Hl(0x24c)]),'default':![]}]);if(!b)return S;}const y=Object[Hl(0x22f)]((Z=H===null||H===void 0x0?void 0x0:H[Hl(0x1dd)])!==null&&Z!==void 0x0?Z:[]),O=H[Hl(0x275)]||[];if(y[Hl(0x17c)]>0x0)for(const h of y){const j=k[Hl(0x23b)](h);if(k[Hl(0x17c)]>0x0&&!_[Hl(0x26d)](S,k[Hl(0x20b)]('.')))_[Hl(0x236)](S,k[Hl(0x20b)]('.'),{});yield this[Hl(0x1da)](j,H['properties'][h],S,O[Hl(0x1af)](h));}else yield this['getType'](k,Object[Hl(0x228)](Object['assign']({},H),{'type':Hl(0x18a)}),S,W);return S;});}[a8d(0x1cf)](H,k,S,W){return __awaiter(this,void 0x0,void 0x0,function*(){const HJ=a8k;if(k&&S)return!![];const Z=k?HJ(0x254):HJ(0x1e9),{addEntry:y}=yield inquirer[HJ(0x196)]([{'type':'confirm','name':HJ(0x20d),'message':this['getPathString'](H,Z,k?W:undefined),'default':![]}]);return y;});}[a8d(0x1b8)](H,k,S,W){return __awaiter(this,void 0x0,void 0x0,function*(){const Hq=a8k;let Z;const y=H[Hq(0x20b)]('.');switch(k===null||k===void 0x0?void 0x0:k['type']){case Hq(0x21c):{let O=!![];while(yield this[Hq(0x1cf)](H,O,W,k===null||k===void 0x0?void 0x0:k[Hq(0x24c)])){const b=_[Hq(0x25c)](S,y);_[Hq(0x18b)](S,y),yield this[Hq(0x1b8)](H,k[Hq(0x241)],S);const h=_[Hq(0x25c)](S,y);!_[Hq(0x1f4)](b)?_[Hq(0x236)](S,y,[h]):(b[Hq(0x195)](h),_[Hq(0x236)](S,y,b)),O=![];}return Z||[];}case Hq(0x214):{return Z=yield this[Hq(0x206)](k,H,S,W),Z;}case'rawObject':Z=(0x0,utils_1[Hq(0x267)])(yield this['ask'](H,k,W))||undefined;break;case Hq(0x1c4):case Hq(0x193):case Hq(0x211):default:Z=yield this['ask'](H,k,W,S);break;}return!_[Hq(0x1bd)](Z)&&_[Hq(0x236)](S,y,Z),Z;});}[a8d(0x1b0)](H,k,S,W){var Z;return __awaiter(this,void 0x0,void 0x0,function*(){const Hn=a8k,y=H[H[Hn(0x17c)]-0x1],{defaultValue:defaultValue=(Z=k===null||k===void 0x0?void 0x0:k[Hn(0x1c6)])!==null&&Z!==void 0x0?Z:k===null||k===void 0x0?void 0x0:k['default'],choices:choices=k===null||k===void 0x0?void 0x0:k[Hn(0x1fe)],pagination:O}=yield(0x0,api_helpers_1[Hn(0x238)])(y,this[Hn(0x260)],this[Hn(0x202)],W,this[Hn(0x1ab)],H);let b='input';if(!_[Hn(0x1bd)](choices)&&choices[Hn(0x17c)]>0x0){if(O!==undefined&&O[Hn(0x1d2)]!==undefined)b=Hn(0x226);else choices[Hn(0x17c)]>0x4&&typeof choices[0x0]==='string'?b=Hn(0x244):b='list';}else{if((k===null||k===void 0x0?void 0x0:k[Hn(0x1f3)])==='boolean')b=Hn(0x225);else{if((k===null||k===void 0x0?void 0x0:k[Hn(0x1f3)])===Hn(0x211))b='input';else(k===null||k===void 0x0?void 0x0:k['type'])===Hn(0x18a)&&(b=Hn(0x200));}}let h=S!==![]?!_[Hn(0x24e)](defaultValue)?defaultValue:JSON[Hn(0x1c3)](defaultValue):_[Hn(0x18d)](defaultValue)?defaultValue:'don\x27t\x20change';if(choices)h=h[Hn(0x18f)]();_[Hn(0x26d)](this[Hn(0x171)],H[Hn(0x20b)]('.'))&&(h=this['resultCache'][H[Hn(0x20b)]('.')]);const j=choices&&S===![]?[Hn(0x1ee),...choices]:choices,r=(k===null||k===void 0x0?void 0x0:k['type'])===Hn(0x211),V=Object[Hn(0x228)]({'type':b,'name':'id','message':this[Hn(0x234)](H,k),'choices':j,'default':h,'filter':this[Hn(0x255)](b,S),'validate':this[Hn(0x19c)](k,S,r)},O),f=(yield inquirer[Hn(0x196)]([V]))['id'];if(f===Hn(0x1ee)||f==='')return undefined;if(r)return parseInt(f,0xa);return f;});}[a8d(0x234)](H,k){const Hv=a8d,S=(k===null||k===void 0x0?void 0x0:k['type'])!==Hv(0x193)?Hv(0x248):Hv(0x23d);return this[Hv(0x277)](H,S,k===null||k===void 0x0?void 0x0:k[Hv(0x24c)]);}[a8d(0x182)](){return __awaiter(this,void 0x0,void 0x0,function*(){const Hi=a8k,H=k=>__awaiter(this,void 0x0,void 0x0,function*(){const HN=a8k;var S;const W=yield this[HN(0x260)][HN(0x17e)][HN(0x1d0)]({'options':{'per_page':this[HN(0x1a0)],'cursor':k}}),Z=W['data'][HN(0x1d0)][HN(0x233)](y=>y['id']);return{'elements':Z,'nextCursor':(S=W[HN(0x258)])===null||S===void 0x0?void 0x0:S[HN(0x21e)]};});return yield this[Hi(0x207)](Hi(0x170),H);});}['askForProjectScopedResource'](H,k,S,W){return __awaiter(this,void 0x0,void 0x0,function*(){const Ho=a8k,Z=S||this['apiClient'][Ho(0x22e)][Ho(0x221)]();if(_[Ho(0x1bd)](Z))throw new Error(Ho(0x270));const y=yield k(Z);return yield this[Ho(0x21b)](H,y,(W?W+Ho(0x23c):'')+Ho(0x183)+Z+'\x27');});}[a8d(0x194)](H,k,S,W){return __awaiter(this,void 0x0,void 0x0,function*(){const Hc=a8k,Z=S||this[Hc(0x260)][Hc(0x22e)][Hc(0x221)]();if(_[Hc(0x1bd)](Z))throw new Error('Default\x20project\x20in\x20context\x20not\x20set\x20and\x20no\x20argument\x20provided.');const y=yield k(Z);return yield this[Hc(0x207)](H,y,(W?W+Hc(0x23c):'')+Hc(0x183)+Z+'\x27');});}['askForDomain'](){return __awaiter(this,void 0x0,void 0x0,function*(){const H=k=>__awaiter(this,void 0x0,void 0x0,function*(){const Hx=a8k;var S;const W=yield this[Hx(0x260)][Hx(0x17e)][Hx(0x22b)]({'options':{'per_page':this[Hx(0x1a0)],'cursor':k}});return{'elements':W['data']['domains'][Hx(0x233)](Z=>Z[Hx(0x1a9)]),'nextCursor':(S=W[Hx(0x258)])===null||S===void 0x0?void 0x0:S['cursor']};});return this['askForResourcePaginated']('domain',H);});}['askForCredentials'](){return __awaiter(this,void 0x0,void 0x0,function*(){const HR=a8k,H=k=>__awaiter(this,void 0x0,void 0x0,function*(){const HY=a8k;var S;const W=yield this[HY(0x260)][HY(0x17e)][HY(0x21a)]({'options':{'per_page':this[HY(0x1a0)],'cursor':k}});return{'elements':W[HY(0x1f6)][HY(0x1a5)][HY(0x233)](Z=>Z['id']),'nextCursor':(S=W['pagination'])===null||S===void 0x0?void 0x0:S[HY(0x21e)]};});return this[HR(0x207)]('credentials',H);});}['setPathVars'](H){this['pathVars']=H;}}exports[a8d(0x20a)]=InquirerHelper;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a9l=a9k;(function(H,k){const K=a9k,S=H();while(!![]){try{const W=parseInt(K(0x147))/0x1*(parseInt(K(0x115))/0x2)+-parseInt(K(0x112))/0x3*(-parseInt(K(0x14d))/0x4)+-parseInt(K(0x12d))/0x5*(parseInt(K(0x128))/0x6)+-parseInt(K(0x11e))/0x7+-parseInt(K(0x13c))/0x8+parseInt(K(0x12c))/0x9+parseInt(K(0x12a))/0xa;if(W===k)break;else S['push'](S['shift']());}catch(Z){S['push'](S['shift']());}}}(a9H,0xac8e1));var __createBinding=this&&this[a9l(0x125)]||(Object['create']?function(H,S,W,Z){const J=a9l;if(Z===undefined)Z=W;var y=Object['getOwnPropertyDescriptor'](S,W);(!y||(J(0x111)in y?!S[J(0x141)]:y[J(0x145)]||y['configurable']))&&(y={'enumerable':!![],'get':function(){return S[W];}}),Object[J(0x134)](H,Z,y);}:function(H,S,W,Z){if(Z===undefined)Z=W;H[Z]=S[W];}),__setModuleDefault=this&&this[a9l(0x127)]||(Object['create']?function(H,k){const q=a9l;Object[q(0x134)](H,q(0x129),{'enumerable':!![],'value':k});}:function(H,k){const n=a9l;H[n(0x129)]=k;}),__importStar=this&&this[a9l(0x12f)]||function(H){const v=a9l;if(H&&H[v(0x141)])return H;var S={};if(H!=null){for(var W in H)if(W!==v(0x129)&&Object['prototype']['hasOwnProperty'][v(0x11b)](H,W))__createBinding(S,H,W);}return __setModuleDefault(S,H),S;},__awaiter=this&&this['__awaiter']||function(H,k,S,W){function Z(y){return y instanceof S?y:new S(function(O){O(y);});}return new(S||(S=Promise))(function(y,O){const o=a9k;function b(r){const N=a9k;try{j(W[N(0x13b)](r));}catch(V){O(V);}}function h(r){try{j(W['throw'](r));}catch(V){O(V);}}function j(r){const i=a9k;r[i(0x143)]?y(r[i(0x12e)]):Z(r['value'])[i(0x144)](b,h);}j((W=W[o(0x135)](H,k||[]))[o(0x13b)]());});},__importDefault=this&&this[a9l(0x130)]||function(H){const c=a9l;return H&&H[c(0x141)]?H:{'default':H};};Object[a9l(0x134)](exports,a9l(0x141),{'value':!![]}),exports[a9l(0x146)]=void 0x0;const ws_1=__importStar(require('ws')),open_1=__importDefault(require(a9l(0x123))),events_1=require(a9l(0x138));class NorthflankApiBrowserLogin extends events_1['EventEmitter']{constructor(H,k=!![]){const x=a9l;super(),this['baseUrl']=H,this[x(0x148)]=k,this[x(0x139)]=x(0x117),this[x(0x120)]=()=>JSON[x(0x122)]({'type':'init'});}[a9l(0x140)](){const Y=a9l;var H;const k=this[Y(0x14e)][Y(0x133)](Y(0x142),Y(0x14b))[Y(0x133)](Y(0x118),Y(0x119)),S=k+'/v1/cli-login',W=new ws_1[(Y(0x129))](S),Z=()=>__awaiter(this,void 0x0,void 0x0,function*(){const g=Y;yield new Promise(O=>{const R=a9k;var b;(b=this[R(0x136)])===null||b===void 0x0?void 0x0:b[R(0x14f)](JSON[R(0x122)]({'type':R(0x14a)}),()=>O());}),process[g(0x13d)]();}),y=new Promise((O,b)=>{const F=Y;var h,j,r;try{this[F(0x136)]=(0x0,ws_1[F(0x11c)])(W),process['on'](F(0x13a),Z);}catch(V){b(new Error(F(0x13f)+V[F(0x137)]));}(h=this[F(0x136)])===null||h===void 0x0?void 0x0:h['on'](F(0x131),f=>{const A=F;var M;const C=JSON[A(0x150)](f[A(0x11a)]());switch(C===null||C===void 0x0?void 0x0:C[A(0x14c)]){case'init-ack':{const {loginPage:z}=C;if(z===undefined){this[A(0x149)](A(0x113),b);return;}this[A(0x148)]&&(0x0,open_1[A(0x129)])(z)[A(0x11f)](G=>{const L=A,d='Unable\x20to\x20open\x20browser:\x20'+G[L(0x137)];this[L(0x149)](d,b);});this[A(0x124)](A(0x11d),{'url':z});break;}case A(0x126):{const {apiToken:G,contextName:d}=C;if(G===undefined){this[A(0x149)]('Unexpected\x20response,\x20api\x20token\x20missing',b);return;}(M=this['duplex'])===null||M===void 0x0?void 0x0:M[A(0x14f)](),O({'token':G,'contextName':d}),this[A(0x139)]=A(0x116);break;}case'login-failure':{const m=A(0x114)+(C===null||C===void 0x0?void 0x0:C[A(0x137)]);this[A(0x149)](m,b);break;}default:{const U='unable\x20to\x20parse\x20message:\x20'+JSON[A(0x122)](C);this[A(0x149)](U,b);}}}),(j=this['duplex'])===null||j===void 0x0?void 0x0:j['on']('error',f=>{const s=F;this[s(0x149)]('error\x20happened\x20during\x20browser\x20login:\x20'+f['message'],b);}),(r=this[F(0x136)])===null||r===void 0x0?void 0x0:r['on'](F(0x14f),()=>{const a=F;if(this[a(0x139)]===a(0x116)){}else this[a(0x149)](a(0x12b),b);});});return(H=this['duplex'])===null||H===void 0x0?void 0x0:H[Y(0x13e)](this[Y(0x120)]()),this['status']=Y(0x121),y[Y(0x132)](()=>{const T=Y;process['removeListener'](T(0x13a),Z);});}[a9l(0x149)](H,k){const Q=a9l;var S,W;k?(S=this[Q(0x136)])===null||S===void 0x0?void 0x0:S[Q(0x14f)](()=>k(new Error(H))):(W=this[Q(0x136)])===null||W===void 0x0?void 0x0:W[Q(0x14f)](),this[Q(0x139)]='error';}}function a9k(H,k){const S=a9H();return a9k=function(W,Z){W=W-0x111;let y=S[W];return y;},a9k(H,k);}exports[a9l(0x146)]=NorthflankApiBrowserLogin;function a9H(){const u=['browser-opened','2203117ntslDX','catch','initPackage','init','stringify','open','emit','__createBinding','login-success','__setModuleDefault','6gKsCMo','default','12455130YfjosM','Login\x20process\x20stopped\x20before\x20completed','835830OqeXcz','944695zWNRNa','value','__importStar','__importDefault','data','finally','replace','defineProperty','apply','duplex','message','events','status','SIGINT','next','10165688Qqqeoi','exit','write','Failed\x20to\x20establish\x20connection\x20to\x20command\x20execution\x20proxy:\x20','startLogin','__esModule','https:','done','then','writable','NorthflankApiBrowserLogin','555TLGlus','openBrowser','handleError','aborted','wss:','type','3663152YIUYdZ','baseUrl','end','parse','get','3UqZgYo','Unexpected\x20response','Failure\x20during\x20login:\x20','818KxEltQ','success','idle','http:','ws:','toString','call','createWebSocketStream'];a9H=function(){return u;};return a9H();}
|
package/dist/logs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a10o=a10h;function a10h(w,h){const G=a10w();return a10h=function(P,v){P=P-0x6b;let O=G[P];return O;},a10h(w,h);}(function(w,h){const R=a10h,G=w();while(!![]){try{const P=-parseInt(R(0x6f))/0x1+-parseInt(R(0xa1))/0x2*(parseInt(R(0x8a))/0x3)+-parseInt(R(0xfa))/0x4+-parseInt(R(0x75))/0x5*(parseInt(R(0xd5))/0x6)+parseInt(R(0x7a))/0x7*(-parseInt(R(0xc1))/0x8)+-parseInt(R(0xa9))/0x9+parseInt(R(0xe0))/0xa*(parseInt(R(0x6e))/0xb);if(P===h)break;else G['push'](G['shift']());}catch(v){G['push'](G['shift']());}}}(a10w,0x8b00e));function a10w(){const wh=['yaml','service','bold','warning','jobId','close','forward','__importDefault','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','tail','getLogsCommand','ApiClient','Option','Backup\x20to\x20get\x20logs\x20from','Restore\x20to\x20get\x20logs\x20from','askForContainer','Filter\x20log\x20lines\x20to\x20include\x20this\x20text','--restore\x20--restoreId\x20[restoreId]','58120KsupQr','log','getSeconds','--textIncludes\x20<text>','Only\x20two\x20of\x20\x27startTime\x27,\x20\x27endTime\x27\x20and\x20\x27duration\x27\x20can\x20be\x20set.','getFormatter','Project\x20for\x20logs','data','textNotIncludes','--project\x20--projectId\x20[projectId]','../utils','Number\x20of\x20lines\x20to\x20return.','json','yml','Filter\x20log\x20lines\x20to\x20not\x20include\x20this\x20text','addonId','assertContextExisting','logsApiClient','\x27Ctrl+C\x27','logs-received','102wzlXIf','backupId',',\x20backup\x20id\x20','forEach','askForProject','defaultDurationSeconds','./log-formatter','--regexNotIncludes\x20<regex>','valueOf','--regexIncludes\x20<regex>','@northflank/js-client','480KEvlqz','Id]','Build\x20to\x20get\x20logs\x20from','assign','textIncludes','chalk','toUpperCase','--run\x20--runId\x20[runId]','Get\x20logs\x20generated\x20before\x20this\x20time,\x20','\x20for\x20all\x20containers','then','option','regexIncludes','\x20of\x20','backward','Error\x20while\x20fetching\x20log\x20lines:\x20','askForAddon','setSeconds',',\x20duration:\x20','Log\x20session\x20ended','logTail','../formatting/console-format-helpers','askForAddonBackup','start','printInitInfo','error','4180080FBLQAo','askForService','tsHint','cursor','InquirerHelper','containerId','-l,\x20--lineLimit\x20[limit]','default','regexNotIncludes','1229822axHbKp','645539qfandf','Element\x20count\x20for\x20this\x20request\x20exceeds\x20the\x20line\x20limit,\x20output\x20was\x20truncated.\x20Cut\x20off\x20at\x20timestamp\x20','serviceId','__esModule','Get\x20log\x20for\x20the\x20specified\x20','--backup\x20--backupId\x20[backupId]','199025zHwSvg','--container\x20--containerId\x20[containerId]','charAt','getCurrentServiceName','formatLogLine','385vtgEeT','askForBuild','conflicts','choices','inquirerHelper','addOption','Filter\x20log\x20lines\x20to\x20match\x20this\x20regular\x20expression','CliLogs','length','--noDefaults','--textNotIncludes\x20<text>','toISOString','restoreId','getStandardLogCommand',',\x20from:\x20','details','213oNHbAk','customUserAgent','action','Container\x20to\x20exec\x20into\x20(logs\x20from\x20all\x20containers\x20will\x20be\x20shown\x20if\x20not\x20specified)','format','name','slice','next','\x20in\x20project\x20','logs','--duration\x20[duration]','apiContext','pagination','Error\x20while\x20tailing\x20log\x20lines:\x20','message','Output\x20formatting.\x20Will\x20use\x20advanced\x20formatting\x20by\x20default.','apiClient','askForAddonRestore','getCurrentProjectName','value','values','job','getCommand','26998BlCfJA','alias',',\x20to:\x20','-f,\x20--tail','parseDateInput','argParser','\x20seconds','Length\x20of\x20timespan\x20in\x20seconds.\x20Only\x20valid\x20if\x20not\x20both,\x20startTime\x20and\x20endTime\x20are\x20set','9647010KZQTGL','\x20--','stringify','../inquirer-helper','Direction\x20of\x20logs.\x20Ignored\x20when\x20tailing.','--startTime\x20<timestamp>'];a10w=function(){return wh;};return a10w();}var __awaiter=this&&this['__awaiter']||function(w,h,G,v){function O(Z){return Z instanceof G?Z:new G(function(a){a(Z);});}return new(G||(G=Promise))(function(Z,a){const F=a10h;function l(A){const N=a10h;try{U(v[N(0x91)](A));}catch(D){a(D);}}function B(A){try{U(v['throw'](A));}catch(D){a(D);}}function U(A){const z=a10h;A['done']?Z(A[z(0x9d)]):O(A['value'])[z(0xea)](l,B);}U((v=v['apply'](w,h||[]))[F(0x91)]());});},__importDefault=this&&this[a10o(0xb6)]||function(w){const L=a10o;return w&&w[L(0x72)]?w:{'default':w};};Object['defineProperty'](exports,a10o(0x72),{'value':!![]}),exports[a10o(0x81)]=void 0x0;const js_client_1=require(a10o(0xdf)),chalk_1=__importDefault(require(a10o(0xe5))),utils_1=require(a10o(0xcb)),inquirer_helper_1=require(a10o(0xac)),commander_1=require('commander'),console_format_helpers_1=require(a10o(0xf5)),log_formatter_1=require(a10o(0xdb));class CliLogs{constructor(w){const d=a10o;this[d(0x95)]=w,this[d(0xda)]=0x708,this[d(0x87)]=(h,G,P,v)=>{const w0=d,O=(0x0,utils_1[w0(0xa0)])(!![])[w0(0x8f)]((G?'build-':'')+w0(0x93))[w0(0xa2)]((G?'build-':'')+w0(0xc2))['description'](w0(0x73)+h)[w0(0xeb)](w0(0xca),w0(0xc7))['option']('--'+h+w0(0xaa)+h+'Id\x20['+h+w0(0xe1),h[w0(0x77)](0x0)[w0(0xe6)]()+h[w0(0x90)](0x1)+'\x20to\x20get\x20logs\x20from')[w0(0xeb)](w0(0x76),w0(0x8d));if(G)O[w0(0xeb)]('--build\x20--buildId\x20[buildId]',w0(0xe2));if(h==='job')O['option'](w0(0xe7),'Job\x20run\x20id,\x20example:\x20162b1977-6636-4000-929b-cc265b862ff0');if(P)O[w0(0xeb)](w0(0x74),w0(0xbc));if(v)O[w0(0xeb)](w0(0xc0),w0(0xbd));return O['option'](w0(0xa4),'Tail\x20will\x20stream\x20logs\x20in\x20real-time.\x20Session\x20will\x20be\x20kept\x20open.')[w0(0xeb)](w0(0x6b),w0(0xcc))[w0(0xeb)](w0(0xae),'Get\x20logs\x20generated\x20after\x20this\x20time,\x20'+utils_1['tsHint'],utils_1[w0(0xa5)])['addOption'](new commander_1[(w0(0xbb))]('--endTime\x20<timestamp>',w0(0xe8)+utils_1[w0(0xfc)])[w0(0xa6)](utils_1[w0(0xa5)])[w0(0x7c)](['tail']))[w0(0xeb)](w0(0x94),w0(0xa8))[w0(0x7f)](new commander_1[(w0(0xbb))]('-d,\x20--direction\x20<order>',w0(0xad))[w0(0x7d)]([w0(0xee),w0(0xb5)])[w0(0x7c)]([w0(0xb8)]))[w0(0x7f)](new commander_1[(w0(0xbb))](w0(0xc4),w0(0xbf))['conflicts']([w0(0xc9),'regexIncludes',w0(0x6d)]))[w0(0x7f)](new commander_1[(w0(0xbb))](w0(0x84),w0(0xcf))['conflicts']([w0(0xe4),w0(0xec),w0(0x6d)]))[w0(0x7f)](new commander_1[(w0(0xbb))](w0(0xde),w0(0x80))[w0(0x7c)]([w0(0xc9),'textIncludes',w0(0x6d)]))[w0(0x7f)](new commander_1[(w0(0xbb))](w0(0xdc),'Filter\x20log\x20lines\x20to\x20not\x20match\x20this\x20regular\x20expression')[w0(0x7c)]([w0(0xc9),w0(0xec),w0(0xe4)]))[w0(0xeb)](w0(0x83),w0(0xb7),![])[w0(0x7f)](new commander_1[(w0(0xbb))]('-o,\x20--output\x20[output]',w0(0x99))['choices'](Object[w0(0x9e)]([w0(0x8e),w0(0xcd),w0(0xaf)]))),O;},this[d(0xf8)]=(h,G,P,v)=>{const w1=d,{containerName:O,restoreId:Z,backupId:a,quiet:l,tail:B,startTime:U,endTime:A,duration:D}=v;if(l===!![])return;const p=B?'\x20(exit\x20with\x20'+chalk_1[w1(0x6c)][w1(0xb1)](w1(0xd3))+')':'',s=B?'\x20with\x20live-tailing':'',W=new Date(),X=U!==null&&U!==void 0x0?U:new Date(new Date((A!==null&&A!==void 0x0?A:W)[w1(0xdd)]())[w1(0xf1)]((A!==null&&A!==void 0x0?A:W)[w1(0xc3)]()-(D!==null&&D!==void 0x0?D:this[w1(0xda)]))),T=(A!==null&&A!==void 0x0?A:U!==undefined)?new Date(new Date(U[w1(0xdd)]())['setSeconds'](U[w1(0xc3)]()+(D!==null&&D!==void 0x0?D:this[w1(0xda)]))):W,I=a!==undefined,k=X&&!I?w1(0x88)+chalk_1['default'][w1(0xb1)](X['toISOString']()):'',Y=T&&!I?w1(0xa3)+chalk_1['default'][w1(0xb1)](T[w1(0x85)]()):'',x=D?w1(0xf2)+D+w1(0xa7):'',b=O?'\x20for\x20container\x20'+chalk_1['default'][w1(0xb1)](O):I?'':w1(0xe9),q=a?w1(0xd7)+a:'',f=Z?',\x20restore\x20id\x20'+Z:'',e=h+'\x20'+chalk_1['default'][w1(0xb1)](G)+q+f+w1(0x92)+chalk_1['default']['bold'](P),i=''+k+Y+x;console[w1(0xc2)]('>\x20Container\x20logs'+s+b+w1(0xed)+e+i+p+':');},this[d(0xc6)]=(h,G)=>(P,v)=>{const w2=d;if(!h){if(P[w2(0x82)]===0x0)console['log']('No\x20logs\x20found\x20for\x20this\x20query.\x20Make\x20sure\x20to\x20select\x20an\x20appropriate\x20time\x20window.');P[w2(0xd8)](O=>(0x0,log_formatter_1[w2(0x79)])(O,G));}else(0x0,console_format_helpers_1['printResponse'])(h,P);(v===null||v===void 0x0?void 0x0:v['hasNextPage'])&&(0x0,utils_1[w2(0xb2)])(w2(0x70)+v[w2(0xfd)]);},this[d(0x9a)]=new js_client_1[(d(0xba))](w,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[d(0x8b)]}),this[d(0xd2)]=this[d(0x9a)],this[d(0x7e)]=new inquirer_helper_1[(d(0xfe))](this[d(0x9a)]);}[a10o(0xb9)](w,h=![],G=![],P=![]){const w9=a10o,v=(U,A)=>__awaiter(this,void 0x0,void 0x0,function*(){const w3=a10h,D=A['noDefaults'],{apiContext:p,inquirerHelper:s}=this;switch(w){case'service':{const W=D?undefined:p[w3(0x78)]();return A[w3(0x71)]||W||(yield s[w3(0xfb)](U)());}case w3(0x9f):{const X=D?undefined:p['getCurrentJobName']();return A[w3(0xb3)]||X||(yield s['askForJob'](U)());}case'addon':{return A[w3(0xd0)]||(yield s[w3(0xf0)](U)());}}}),O=(U,A,D)=>__awaiter(this,void 0x0,void 0x0,function*(){const w4=a10h;if(h)return D['buildId']||(yield this['inquirerHelper'][w4(0x7b)](U,w===w4(0xb0)?A:undefined,w===w4(0x9f)?A:undefined,!![])());return undefined;}),Z=(U,A,D)=>__awaiter(this,void 0x0,void 0x0,function*(){const w5=a10h;if(G||P)return D[w5(0xd6)]||(yield this[w5(0x7e)][w5(0xf6)](U,A)());return undefined;}),a=(U,A,D,p)=>__awaiter(this,void 0x0,void 0x0,function*(){const w6=a10h;if(P)return p[w6(0x86)]||(yield this['inquirerHelper'][w6(0x9b)](U,A,D)());return undefined;}),l=(U,A,D)=>__awaiter(this,void 0x0,void 0x0,function*(){const w7=a10h;if(!h&&D[w7(0xff)]!==undefined){if(D[w7(0xff)]!==!![])return D[w7(0xff)];return yield this[w7(0x7e)][w7(0xbe)](U,w===w7(0xb0)?A:undefined,w===w7(0x9f)?A:undefined,!![])();}return undefined;}),B=(U,A,D)=>__awaiter(this,void 0x0,void 0x0,function*(){const w8=a10h;if(w==='job')return D['runId']||(yield this[w8(0x7e)]['askForJobRun'](A,U,!![])());return undefined;});return this[w9(0x87)](w,h,G,P)[w9(0x8c)](U=>__awaiter(this,void 0x0,void 0x0,function*(){const ww=w9,{noDefaults:A,projectId:D,quiet:p,tail:s,textIncludes:W,textNotIncludes:X,regexIncludes:T,regexNotIncludes:I,direction:k,lineLimit:Y,startTime:x,endTime:b,duration:q,output:f}=U;(0x0,utils_1[ww(0xd1)])(this['apiClient']);const {apiContext:e,inquirerHelper:i,logsApiClient:u}=this,t=A?undefined:e[ww(0x9c)](),S=D||t||(yield i[ww(0xd9)]()),V=yield v(S,U),C=yield O(S,V,U),M=yield Z(S,V,U),Q=yield a(S,V,M,U),H=yield B(S,V,U),n=yield l(S,V,U);if(x&&b&&q)throw new Error(ww(0xc5));const c={'projectId':S,'entityId':V},r={'containerName':n,'textIncludes':W,'textNotIncludes':X,'regexIncludes':T,'regexNotIncludes':I,'lineLimit':Y,'startTime':x,'duration':q,'runId':H,'buildId':C,'backupId':M,'restoreId':Q,'isBuild':h!==null&&h!==void 0x0?h:![]},j=P?'addonRestore':G?'addonBackup':w,m=Object[ww(0xe3)](Object[ww(0xe3)]({},r),{'endTime':b,'direction':k});if(!p&&f!==ww(0xaf)&&f!==ww(0xce)&&f!==ww(0xcd))this[ww(0xf8)](w,V,S,Object['assign'](Object[ww(0xe3)]({},m),U));const y=this[ww(0xc6)](f,W!==null&&W!==void 0x0?W:T);if(s){const E=yield u['logs'][ww(0xf4)](c,r,j);E['on'](ww(0xd4),y),E['on'](ww(0xf9),K=>(0x0,utils_1['error'])(ww(0x97)+K[ww(0x98)])),E['on'](ww(0xb4),()=>console['log'](ww(0xf3))),yield E[ww(0xf7)]();}else{const K=yield u[ww(0x93)]['logRange'](c,m,j);if(K[ww(0xf9)]){const g=K[ww(0xf9)][ww(0x89)],J=g?'\x0aDetails:\x20'+JSON[ww(0xab)](g,null,'\x20'):'';(0x0,utils_1[ww(0xf9)])(ww(0xef)+K[ww(0xf9)]['message']+J);}else y(K[ww(0xc8)],K[ww(0x96)]);}}));}}exports[a10o(0x81)]=CliLogs;
|
|
1
|
+
'use strict';const a10X=a10k;(function(H,k){const P=a10k,S=H();while(!![]){try{const W=parseInt(P(0x101))/0x1+-parseInt(P(0x110))/0x2+-parseInt(P(0xf4))/0x3*(-parseInt(P(0x127))/0x4)+-parseInt(P(0xe8))/0x5+parseInt(P(0x12a))/0x6+parseInt(P(0x104))/0x7+-parseInt(P(0xf2))/0x8;if(W===k)break;else S['push'](S['shift']());}catch(Z){S['push'](S['shift']());}}}(a10H,0x81ac5));function a10k(H,k){const S=a10H();return a10k=function(W,Z){W=W-0xba;let y=S[W];return y;},a10k(H,k);}var __awaiter=this&&this['__awaiter']||function(H,k,S,W){function Z(y){return y instanceof S?y:new S(function(O){O(y);});}return new(S||(S=Promise))(function(y,O){const t=a10k;function b(r){const E=a10k;try{j(W[E(0xed)](r));}catch(V){O(V);}}function h(r){const D=a10k;try{j(W[D(0x14a)](r));}catch(V){O(V);}}function j(r){const w=a10k;r[w(0xfa)]?y(r[w(0x143)]):Z(r[w(0x143)])[w(0xd3)](b,h);}j((W=W[t(0x128)](H,k||[]))[t(0xed)]());});},__importDefault=this&&this['__importDefault']||function(H){const I=a10k;return H&&H[I(0xdf)]?H:{'default':H};};Object[a10X(0xc4)](exports,a10X(0xdf),{'value':!![]}),exports[a10X(0xd7)]=void 0x0;const js_client_1=require('@northflank/js-client'),chalk_1=__importDefault(require(a10X(0x14d))),utils_1=require(a10X(0x11d)),inquirer_helper_1=require('../inquirer-helper'),commander_1=require(a10X(0xbc)),console_format_helpers_1=require('../formatting/console-format-helpers'),log_formatter_1=require(a10X(0x10c));function a10H(){const HS=['tsHint','backupId','textNotIncludes','start','askForAddonRestore','inquirerHelper','Id]','4672235lIPeie','default','--textIncludes\x20<text>','build-','Get\x20log\x20for\x20the\x20specified\x20','next','>\x20Container\x20logs','-o,\x20--output\x20[output]','Get\x20logs\x20generated\x20after\x20this\x20time,\x20','close','3304752eFgsIL','message','772791rKOPqv','InquirerHelper','regexNotIncludes','option','Element\x20count\x20for\x20this\x20request\x20exceeds\x20the\x20line\x20limit,\x20output\x20was\x20truncated.\x20Cut\x20off\x20at\x20timestamp\x20','\x20(exit\x20with\x20','done','charAt','-d,\x20--direction\x20<order>','regexIncludes','length','--backup\x20--backupId\x20[backupId]','\x20to\x20get\x20logs\x20from','548720QeulzL','textIncludes','--textNotIncludes\x20<text>','7366485EZlRXD','--regexNotIncludes\x20<regex>','ApiClient','service','data','yml','parseDateInput','buildId','./log-formatter','Log\x20session\x20ended','Filter\x20log\x20lines\x20to\x20not\x20include\x20this\x20text','Only\x20two\x20of\x20\x27startTime\x27,\x20\x27endTime\x27\x20and\x20\x27duration\x27\x20can\x20be\x20set.','1435176cxaKIW','Get\x20logs\x20generated\x20before\x20this\x20time,\x20','Backup\x20to\x20get\x20logs\x20from','--project\x20--projectId\x20[projectId]','Error\x20while\x20tailing\x20log\x20lines:\x20','getSeconds','Job\x20run\x20id,\x20example:\x20162b1977-6636-4000-929b-cc265b862ff0','stringify',',\x20backup\x20id\x20','askForBuild','customUserAgent','error','forEach','../utils','logsApiClient','addonId','description','--regexIncludes\x20<regex>','Container\x20to\x20exec\x20into\x20(logs\x20from\x20all\x20containers\x20will\x20be\x20shown\x20if\x20not\x20specified)','name','forward','json','askForJobRun','8fhRFaO','apply','tail','2880006fAYpFW','runId','No\x20logs\x20found\x20for\x20this\x20query.\x20Make\x20sure\x20to\x20select\x20an\x20appropriate\x20time\x20window.','\x20with\x20live-tailing','Filter\x20log\x20lines\x20to\x20include\x20this\x20text','containerId','conflicts','--duration\x20[duration]','getStandardLogCommand','\x20for\x20all\x20containers','formatLogLine','askForProject','format','--restore\x20--restoreId\x20[restoreId]','addOption','toUpperCase','log','defaultDurationSeconds','\x0aDetails:\x20','Length\x20of\x20timespan\x20in\x20seconds.\x20Only\x20valid\x20if\x20not\x20both,\x20startTime\x20and\x20endTime\x20are\x20set','askForService','bold','Output\x20formatting.\x20Will\x20use\x20advanced\x20formatting\x20by\x20default.','job','addonBackup','value','cursor','slice','pagination','warning','Project\x20for\x20logs','getCommand','throw','getCurrentJobName','\x27Ctrl+C\x27','chalk','apiClient','logs','Option','askForContainer','commander','\x20seconds','action','Error\x20while\x20fetching\x20log\x20lines:\x20','toISOString','Don\x27t\x20use\x20context\x20default\x20values,\x20explicitly\x20use\x20options\x20or\x20ask.','askForJob','--run\x20--runId\x20[runId]','defineProperty','\x20in\x20project\x20','argParser','printInitInfo','Tail\x20will\x20stream\x20logs\x20in\x20real-time.\x20Session\x20will\x20be\x20kept\x20open.',',\x20duration:\x20','details','addon','apiContext','assertContextExisting','jobId',',\x20restore\x20id\x20','logTail','valueOf','getFormatter','then','\x20of\x20','\x20--','alias','CliLogs','printResponse','Build\x20to\x20get\x20logs\x20from','choices','\x20for\x20container\x20','askForAddonBackup',',\x20from:\x20','Direction\x20of\x20logs.\x20Ignored\x20when\x20tailing.','__esModule','assign'];a10H=function(){return HS;};return a10H();}class CliLogs{constructor(H){const H0=a10X;this[H0(0xcc)]=H,this[H0(0x13b)]=0x708,this[H0(0x132)]=(k,S,W,Z)=>{const H1=H0,y=(0x0,utils_1[H1(0x149)])(!![])[H1(0x123)]((S?H1(0xeb):'')+'logs')[H1(0xd6)]((S?H1(0xeb):'')+H1(0x13a))[H1(0x120)](H1(0xec)+k)[H1(0xf7)](H1(0x113),H1(0x148))[H1(0xf7)]('--'+k+H1(0xd5)+k+'Id\x20['+k+H1(0xe7),k[H1(0xfb)](0x0)[H1(0x139)]()+k[H1(0x145)](0x1)+H1(0x100))[H1(0xf7)]('--container\x20--containerId\x20[containerId]',H1(0x122));if(S)y[H1(0xf7)]('--build\x20--buildId\x20[buildId]',H1(0xd9));if(k==='job')y['option'](H1(0xc3),H1(0x116));if(W)y[H1(0xf7)](H1(0xff),H1(0x112));if(Z)y[H1(0xf7)](H1(0x137),'Restore\x20to\x20get\x20logs\x20from');return y[H1(0xf7)]('-f,\x20--tail',H1(0xc8))[H1(0xf7)]('-l,\x20--lineLimit\x20[limit]','Number\x20of\x20lines\x20to\x20return.')[H1(0xf7)]('--startTime\x20<timestamp>',H1(0xf0)+utils_1[H1(0xe1)],utils_1[H1(0x10a)])[H1(0x138)](new commander_1[(H1(0xba))]('--endTime\x20<timestamp>',H1(0x111)+utils_1[H1(0xe1)])[H1(0xc6)](utils_1[H1(0x10a)])[H1(0x130)]([H1(0x129)]))[H1(0xf7)](H1(0x131),H1(0x13d))[H1(0x138)](new commander_1[(H1(0xba))](H1(0xfc),H1(0xde))[H1(0xda)](['backward',H1(0x124)])[H1(0x130)]([H1(0x129)]))[H1(0x138)](new commander_1['Option'](H1(0xea),H1(0x12e))['conflicts']([H1(0xe3),H1(0xfd),'regexNotIncludes']))[H1(0x138)](new commander_1[(H1(0xba))](H1(0x103),H1(0x10e))[H1(0x130)](['textIncludes','regexIncludes','regexNotIncludes']))[H1(0x138)](new commander_1[(H1(0xba))](H1(0x121),'Filter\x20log\x20lines\x20to\x20match\x20this\x20regular\x20expression')[H1(0x130)]([H1(0xe3),H1(0x102),H1(0xf6)]))[H1(0x138)](new commander_1[(H1(0xba))](H1(0x105),'Filter\x20log\x20lines\x20to\x20not\x20match\x20this\x20regular\x20expression')[H1(0x130)]([H1(0xe3),H1(0xfd),H1(0x102)]))[H1(0xf7)]('--noDefaults',H1(0xc1),![])[H1(0x138)](new commander_1[(H1(0xba))](H1(0xef),H1(0x140))[H1(0xda)](Object['values']([H1(0x136),H1(0x125),'yaml']))),y;},this[H0(0xc7)]=(k,S,W,Z)=>{const H2=H0,{containerName:y,restoreId:O,backupId:b,quiet:h,tail:j,startTime:r,endTime:V,duration:f}=Z;if(h===!![])return;const M=j?H2(0xf9)+chalk_1[H2(0xe9)]['bold'](H2(0x14c))+')':'',C=j?H2(0x12d):'',z=new Date(),G=r!==null&&r!==void 0x0?r:new Date(new Date((V!==null&&V!==void 0x0?V:z)[H2(0xd1)]())['setSeconds']((V!==null&&V!==void 0x0?V:z)[H2(0x115)]()-(f!==null&&f!==void 0x0?f:this[H2(0x13b)]))),d=(V!==null&&V!==void 0x0?V:r!==undefined)?new Date(new Date(r[H2(0xd1)]())['setSeconds'](r['getSeconds']()+(f!==null&&f!==void 0x0?f:this[H2(0x13b)]))):z,e=b!==undefined,m=G&&!e?H2(0xdd)+chalk_1[H2(0xe9)][H2(0x13f)](G['toISOString']()):'',U=d&&!e?',\x20to:\x20'+chalk_1[H2(0xe9)]['bold'](d[H2(0xc0)]()):'',K=f?H2(0xc9)+f+H2(0xbd):'',l=y?H2(0xdb)+chalk_1[H2(0xe9)]['bold'](y):e?'':H2(0x133),J=b?H2(0x118)+b:'',q=O?H2(0xcf)+O:'',n=k+'\x20'+chalk_1[H2(0xe9)][H2(0x13f)](S)+J+q+H2(0xc5)+chalk_1[H2(0xe9)][H2(0x13f)](W),v=''+m+U+K;console['log'](H2(0xee)+C+l+H2(0xd4)+n+v+M+':');},this[H0(0xd2)]=(k,S)=>(W,Z)=>{const H3=H0;if(!k){if(W[H3(0xfe)]===0x0)console['log'](H3(0x12c));W[H3(0x11c)](y=>(0x0,log_formatter_1[H3(0x134)])(y,S));}else(0x0,console_format_helpers_1[H3(0xd8)])(k,W);(Z===null||Z===void 0x0?void 0x0:Z['hasNextPage'])&&(0x0,utils_1[H3(0x147)])(H3(0xf8)+Z[H3(0x144)]);},this[H0(0x14e)]=new js_client_1[(H0(0x106))](H,{'throwErrorOnHttpErrorCode':!![],'customUserAgent':utils_1[H0(0x11a)]}),this[H0(0x11e)]=this[H0(0x14e)],this[H0(0xe6)]=new inquirer_helper_1[(H0(0xf5))](this['apiClient']);}['getLogsCommand'](H,k=![],S=![],W=![]){const HH=a10X,Z=(r,V)=>__awaiter(this,void 0x0,void 0x0,function*(){const H4=a10k,f=V['noDefaults'],{apiContext:M,inquirerHelper:C}=this;switch(H){case'service':{const z=f?undefined:M['getCurrentServiceName']();return V['serviceId']||z||(yield C[H4(0x13e)](r)());}case H4(0x141):{const G=f?undefined:M[H4(0x14b)]();return V[H4(0xce)]||G||(yield C[H4(0xc2)](r)());}case H4(0xcb):{return V[H4(0x11f)]||(yield C['askForAddon'](r)());}}}),y=(r,V,f)=>__awaiter(this,void 0x0,void 0x0,function*(){const H5=a10k;if(k)return f[H5(0x10b)]||(yield this['inquirerHelper'][H5(0x119)](r,H===H5(0x107)?V:undefined,H===H5(0x141)?V:undefined,!![])());return undefined;}),O=(r,V,f)=>__awaiter(this,void 0x0,void 0x0,function*(){const H6=a10k;if(S||W)return f[H6(0xe2)]||(yield this['inquirerHelper'][H6(0xdc)](r,V)());return undefined;}),b=(r,V,f,M)=>__awaiter(this,void 0x0,void 0x0,function*(){const H7=a10k;if(W)return M['restoreId']||(yield this[H7(0xe6)][H7(0xe5)](r,V,f)());return undefined;}),h=(r,V,f)=>__awaiter(this,void 0x0,void 0x0,function*(){const H8=a10k;if(!k&&f[H8(0x12f)]!==undefined){if(f[H8(0x12f)]!==!![])return f['containerId'];return yield this[H8(0xe6)][H8(0xbb)](r,H===H8(0x107)?V:undefined,H===H8(0x141)?V:undefined,!![])();}return undefined;}),j=(r,V,f)=>__awaiter(this,void 0x0,void 0x0,function*(){const H9=a10k;if(H===H9(0x141))return f[H9(0x12b)]||(yield this[H9(0xe6)][H9(0x126)](V,r,!![])());return undefined;});return this[HH(0x132)](H,k,S,W)[HH(0xbe)](r=>__awaiter(this,void 0x0,void 0x0,function*(){const Hk=HH,{noDefaults:V,projectId:f,quiet:M,tail:C,textIncludes:z,textNotIncludes:G,regexIncludes:d,regexNotIncludes:e,direction:m,lineLimit:U,startTime:K,endTime:l,duration:J,output:q}=r;(0x0,utils_1[Hk(0xcd)])(this[Hk(0x14e)]);const {apiContext:n,inquirerHelper:v,logsApiClient:N}=this,i=V?undefined:n['getCurrentProjectName'](),o=f||i||(yield v[Hk(0x135)]()),c=yield Z(o,r),x=yield y(o,c,r),Y=yield O(o,c,r),R=yield b(o,c,Y,r),g=yield j(o,c,r),F=yield h(o,c,r);if(K&&l&&J)throw new Error(Hk(0x10f));const A={'projectId':o,'entityId':c},L={'containerName':F,'textIncludes':z,'textNotIncludes':G,'regexIncludes':d,'regexNotIncludes':e,'lineLimit':U,'startTime':K,'duration':J,'runId':g,'buildId':x,'backupId':Y,'restoreId':R,'isBuild':k!==null&&k!==void 0x0?k:![]},s=W?'addonRestore':S?Hk(0x142):H,a=Object[Hk(0xe0)](Object[Hk(0xe0)]({},L),{'endTime':l,'direction':m});if(!M&&q!=='yaml'&&q!==Hk(0x109)&&q!==Hk(0x125))this[Hk(0xc7)](H,c,o,Object[Hk(0xe0)](Object[Hk(0xe0)]({},a),r));const T=this[Hk(0xd2)](q,z!==null&&z!==void 0x0?z:d);if(C){const Q=yield N[Hk(0x14f)][Hk(0xd0)](A,L,s);Q['on']('logs-received',T),Q['on'](Hk(0x11b),u=>(0x0,utils_1['error'])(Hk(0x114)+u[Hk(0xf3)])),Q['on'](Hk(0xf1),()=>console[Hk(0x13a)](Hk(0x10d))),yield Q[Hk(0xe4)]();}else{const u=yield N[Hk(0x14f)]['logRange'](A,a,s);if(u[Hk(0x11b)]){const B=u[Hk(0x11b)][Hk(0xca)],p=B?Hk(0x13c)+JSON[Hk(0x117)](B,null,'\x20'):'';(0x0,utils_1['error'])(Hk(0xbf)+u[Hk(0x11b)][Hk(0xf3)]+p);}else T(u[Hk(0x108)],u[Hk(0x146)]);}}));}}exports[a10X(0xd7)]=CliLogs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function a11H(){const z=['reduce','171856lTChBr','35450ZkFfcU','21PvhUnT','formatLogLine','color','2177015lpYlUI','cyan','10mRkbQb','225vDhmUG','4mTXHcQ','red','379681kobKsA','__esModule','__importDefault','containerId','green','replace','default','211053pEGFaM','blue','pattern','346332XsUfPA','2579412OlnyPs','log','grey','36nUvGje','defineProperty','chalk','s\x08(?!mailto:)(?:(?:http|https|ftp)://)(?:\x5cS+(?::\x5cS*)?@)?(?:(?:(?:[1-9]\x5cd?|1\x5cd\x5cd|2[01]\x5cd|22[0-3])(?:\x5c.(?:1?\x5cd{1,2}|2[0-4]\x5cd|25[0-5])){2}(?:\x5c.(?:[0-9]\x5cd?|1\x5cd\x5cd|2[0-4]\x5cd|25[0-4]))|(?:(?:[a-z\x5cu00a1-\x5cuffff0-9]+-?)*[a-z\x5cu00a1-\x5cuffff0-9]+)(?:\x5c.(?:[a-z\x5cu00a1-\x5cuffff0-9]+-?)*[a-z\x5cu00a1-\x5cuffff0-9]+)*(?:\x5c.(?:[a-z\x5cu00a1-\x5cuffff]{2,})))|localhost)(?::\x5cd{2,5})?(?:(/|\x5c?|#)[^\x5cs]*)?\x08s','defaultLogSyntax'];a11H=function(){return z;};return a11H();}const a11V=a11k;function a11k(H,k){const S=a11H();return a11k=function(W,Z){W=W-0x1da;let y=S[W];return y;},a11k(H,k);}(function(H,k){const r=a11k,S=H();while(!![]){try{const W=parseInt(r(0x1e3))/0x1+-parseInt(r(0x1df))/0x2*(parseInt(r(0x1ea))/0x3)+parseInt(r(0x1e1))/0x4*(parseInt(r(0x1dd))/0x5)+parseInt(r(0x1ed))/0x6*(parseInt(r(0x1da))/0x7)+-parseInt(r(0x1f7))/0x8*(-parseInt(r(0x1e0))/0x9)+-parseInt(r(0x1f8))/0xa+-parseInt(r(0x1ee))/0xb*(parseInt(r(0x1f1))/0xc);if(W===k)break;else S['push'](S['shift']());}catch(Z){S['push'](S['shift']());}}}(a11H,0x71e5c));var __importDefault=this&&this[a11V(0x1e5)]||function(H){const f=a11V;return H&&H[f(0x1e4)]?H:{'default':H};};Object[a11V(0x1f2)](exports,a11V(0x1e4),{'value':!![]}),exports[a11V(0x1db)]=exports['defaultLogSyntax']=void 0x0;const chalk_1=__importDefault(require(a11V(0x1f3)));exports[a11V(0x1f5)]=[{'color':a11V(0x1f0),'pattern':/\[[0-9]{1,2}\/[a-z]{3}\/[0-9]{4}:[0-9]{2}:[0-9]{2}:[0-9]{2} \+[0-9]{4}\]/i},{'color':a11V(0x1f0),'pattern':/[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(.[0-9]+)?Z/i},{'color':a11V(0x1f0),'pattern':/[0-9]{4}\/[0-9]{2}\/[0-9]{2}/i},{'color':'grey','pattern':/\s\b([0-9]{2}:){1,2}[0-9]{2}\b\s/i},{'color':'bold','pattern':new RegExp(a11V(0x1f4),'i')},{'color':'green','pattern':/(?:\d{1,3}\.){3}\d{1,3}/i},{'color':a11V(0x1e7),'pattern':/(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))/},{'color':'blue','pattern':/\b(GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH)\b/},{'color':'greenBright','pattern':/\b(successful|success|completed|complete|done)\b/i},{'color':a11V(0x1e2),'pattern':/\b(failed|fail|stderr|error|err)\b/i},{'color':'gray','pattern':/\b(information|info|debug)\b/i},{'color':'yellow','pattern':/\b(warning|warn)\b/i},{'color':a11V(0x1eb),'pattern':/[0-9a-f]{64}/i},{'color':a11V(0x1eb),'pattern':/[0-9a-fA-F]{8}[-]?([0-9a-fA-F]{4}[-]?){3}[0-9a-fA-F]{12}/i}];const formatLogLine=(H,k)=>{const M=a11V,S=chalk_1[M(0x1e9)]['dim'](H['ts']['toISOString']()),W=chalk_1[M(0x1e9)][M(0x1de)](H[M(0x1e6)]),Z=exports[M(0x1f5)][M(0x1f6)]((O,h)=>{const C=M;return O['replace'](h[C(0x1ec)],j=>h[C(0x1dc)]?chalk_1[C(0x1e9)][h[C(0x1dc)]](j):chalk_1[C(0x1e9)][C(0x1f0)](j));},H['log']),y=k?Z[M(0x1e8)](new RegExp(k,'g'),O=>chalk_1[M(0x1e9)]['bold'](O)):Z;console[M(0x1ef)](S+'\x20'+W+'\x20--\x20'+y);};exports[a11V(0x1db)]=formatLogLine;
|