@maka/maka-cli 4.5.12 → 4.5.14
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/bundle/obf/package.json +1 -1
- package/bundle/obf/src/command.js +1 -1
- package/bundle/obf/src/commands/_index.js +1 -1
- package/bundle/obf/src/commands/aws/_index.js +1 -1
- package/bundle/obf/src/commands/aws/aws.command.js +1 -1
- package/bundle/obf/src/commands/aws/ci.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/ckp.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/csg.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/di.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/dkp.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/dsg.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/rbi.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/rkp.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/sth.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/ti.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/build/_index.js +1 -1
- package/bundle/obf/src/commands/build/build.js +1 -1
- package/bundle/obf/src/commands/build/docker.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/create.js +1 -1
- package/bundle/obf/src/commands/debug.js +1 -1
- package/bundle/obf/src/commands/deploy.js +1 -1
- package/bundle/obf/src/commands/game/_index.js +1 -1
- package/bundle/obf/src/commands/game/battleship.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/game/play.command.js +1 -1
- package/bundle/obf/src/commands/game/pong.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/game/snake.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/game/tetris.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/generate.js +1 -1
- package/bundle/obf/src/commands/get/_index.js +1 -1
- package/bundle/obf/src/commands/get/get.command.js +1 -1
- package/bundle/obf/src/commands/get/global.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/get/local.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/get/whoami.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/help.js +1 -1
- package/bundle/obf/src/commands/jsdoc.js +1 -1
- package/bundle/obf/src/commands/lint.js +1 -1
- package/bundle/obf/src/commands/login.js +1 -1
- package/bundle/obf/src/commands/logout.js +1 -1
- package/bundle/obf/src/commands/logs.js +1 -1
- package/bundle/obf/src/commands/maka.cmd.js +1 -1
- package/bundle/obf/src/commands/murder.js +1 -1
- package/bundle/obf/src/commands/proxy.js +1 -1
- package/bundle/obf/src/commands/reconfig.js +1 -1
- package/bundle/obf/src/commands/run/_index.js +1 -1
- package/bundle/obf/src/commands/run/docker.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/run/run.command.js +1 -1
- package/bundle/obf/src/commands/set/_index.js +1 -1
- package/bundle/obf/src/commands/set/global.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/set/local.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/set/set.command.js +1 -1
- package/bundle/obf/src/commands/ssh.js +1 -1
- package/bundle/obf/src/commands/ssl.js +1 -1
- package/bundle/obf/src/commands/test.js +1 -1
- package/bundle/obf/src/commands/version.js +1 -1
- package/bundle/obf/src/error.js +1 -1
- package/bundle/obf/src/generator.js +1 -1
- package/bundle/obf/src/generators/_index.js +1 -1
- package/bundle/obf/src/generators/api.js +1 -1
- package/bundle/obf/src/generators/collection.js +1 -1
- package/bundle/obf/src/generators/component.js +1 -1
- package/bundle/obf/src/generators/config.js +1 -1
- package/bundle/obf/src/generators/dbc.js +1 -1
- package/bundle/obf/src/generators/dockerfile.js +1 -1
- package/bundle/obf/src/generators/hook.js +1 -1
- package/bundle/obf/src/generators/kit.js +1 -1
- package/bundle/obf/src/generators/layout.js +1 -1
- package/bundle/obf/src/generators/maka.gen.js +1 -1
- package/bundle/obf/src/generators/methods.js +1 -1
- package/bundle/obf/src/generators/package.js +1 -1
- package/bundle/obf/src/generators/page.js +1 -1
- package/bundle/obf/src/generators/publish.js +1 -1
- package/bundle/obf/src/generators/route.js +1 -1
- package/bundle/obf/src/generators/service.js +1 -1
- package/bundle/obf/src/generators/services/_index.js +1 -1
- package/bundle/obf/src/generators/services/openssl.js +1 -1
- package/bundle/obf/src/generators/services/translation.js +1 -1
- package/bundle/obf/src/maka.js +1 -1
- package/bundle/obf/src/templates/meteor/app/server/helmet-csp.js +2 -2
- package/bundle/obf/src/templates/meteor/app/server/helmet-csp.js.jsx +2 -2
- package/bundle/obf/src/templates/meteor/app/server/helmet-csp.js.ts +2 -2
- package/bundle/obf/src/templates/meteor/app/server/helmet-csp.js.tsx +2 -2
- package/bundle/obf/src/tool.js +1 -1
- package/bundle/obf/src/tools/actions/actions.class.js +1 -1
- package/bundle/obf/src/tools/aws/aws.class.js +1 -1
- package/bundle/obf/src/tools/aws/aws.interfaces.js +1 -1
- package/bundle/obf/src/tools/docker/docker.class.js +1 -1
- package/bundle/obf/src/tools/docker/docker.interfaces.js +1 -1
- package/bundle/obf/src/tools/fsi/fsi.class.js +1 -1
- package/bundle/obf/src/tools/fsi/fsi.interfaces.js +1 -1
- package/bundle/obf/src/tools/https/https.class.js +1 -1
- package/bundle/obf/src/tools/https/https.interface.js +1 -1
- package/bundle/obf/src/tools/log/log.class.js +1 -1
- package/bundle/obf/src/tools/log/log.interfaces.js +1 -1
- package/bundle/obf/src/tools/spawn-async/spawn-async.class.js +1 -1
- package/bundle/obf/src/tools/spawn-async/spawn-async.interfaces.js +1 -1
- package/bundle/obf/src/tools/ssh/ssh.class.js +1 -1
- package/bundle/obf/src/tools/ssh/ssh.interfaces.js +1 -1
- package/bundle/obf/src/tools/ssl/ssl.class.js +1 -1
- package/package.json +1 -1
package/bundle/obf/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maka/maka-cli",
|
|
3
3
|
"//": "NOTE: don't forget to update version.ts and fsi.class.ts",
|
|
4
|
-
"version": "4.5.
|
|
4
|
+
"version": "4.5.14",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"summary": "A command line tool for scaffolding Meteor 2.x applications using either React.",
|
|
7
7
|
"description": "A command line tool for scaffolding Meteor 2.x applications using React.",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a0c(){const E=['556587AEBwVF','validateMeteorInstall','92zveNUF','maxArgLength','runSubCommand','90Qjcwnr','length','You\x20must\x20be\x20in\x20an\x20maka\x20project\x20to\x20run\x20this\x20command','parent','_commands','Command.create\x20requires\x20a\x20handler\x20function!','Too\x20many\x20arguments','420629IEJSKC','match','murder','proCommands','apply','tableList','5255TEuLSf','usage','addCommand\x20requires\x20a\x20Command\x20instance','forEach','\x22,\x20please\x20upgrade\x20to\x20the\x20professional\x20version\x20of\x20Maka-CLI\x20@\x20www.maka-cli.com,\x20then\x20issue:\x20\x27maka\x20login\x27','push','domainLicense','name','shortDesc','Command\x20requires\x20a\x20name','mustHaveMeteorInstalled','3420936hCqMei','singleLicense','558276plJdEC','60CIuiGN','validateMakaSubscription','error','21rpOGZy','Alias','Command\x20not\x20found','50xkLTKP','includes','run','roles','(((.+)+)+)+$','maxOptsLength','invoke','findCommand','help','Description','number','54904ihkDVi','validateMakaProject','mustBeInMakaProject','addCommand','Too\x20many\x20options','play','Too\x20few\x20options','Name','options','function','join','keys','There\x20is\x20no\x20Meteor\x20application\x20here','call','Command\x20requires\x20a\x20handler\x20function','To\x20use\x20these\x20pro\x20flags,\x20\x22','assign','To\x20use\x20this\x20command,\x20\x22','Meteor\x20could\x20not\x20be\x20found\x20or\x20it\x20is\x20not\x20installed\x20correctly','find','split','minArgLength','fsi','search','exit','getPro','generate','minOptsLength','_handler','2118965ZzbXjF','toString','Too\x20few\x20arguments','bright','splice','header','findSubCommand','Command.create\x20requires\x20some\x20options!','constructor','create','notice','disableAuthCheck'];a0c=function(){return E;};return a0c();}const a0s=a0d;(function(a,b){const p=a0d,c=a();while(!![]){try{const d=parseInt(p(0x170))/0x1*(parseInt(p(0x160))/0x2)+parseInt(p(0x163))/0x3*(-parseInt(p(0x135))/0x4)+parseInt(p(0x152))/0x5+parseInt(p(0x17d))/0x6*(parseInt(p(0x127))/0x7)+-parseInt(p(0x17b))/0x8+-parseInt(p(0x15e))/0x9*(-parseInt(p(0x12a))/0xa)+parseInt(p(0x16a))/0xb*(-parseInt(p(0x17e))/0xc);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a0c,0x36834));const a0b=(function(){let a=!![];return function(b,c){const d=a?function(){const q=a0d;if(c){const e=c[q(0x16e)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a0a=a0b(this,function(){const r=a0d;return a0a['toString']()[r(0x14c)](r(0x12e))[r(0x153)]()[r(0x15a)](a0a)['search'](r(0x12e));});a0a();import a0e from'cli-table';import a0f from'./commands/maka.cmd.js';import{Log}from'./tools/log/log.class.js';function a0d(a,b){const c=a0c();return a0d=function(d,e){d=d-0x126;let f=c[d];return f;},a0d(a,b);}import{Tool}from'./tool.js';import{UsageError,UsageErrorWithSubs,MustBeInProjectError,NoMeteorAppFoundError,NoMeteorFoundError}from'./error.js';let _prevCmd='';export class Command extends Tool{[a0s(0x13d)];[a0s(0x167)];constructor(a,b){const t=a0s;super();if(!a)throw new Error('Command\x20requires\x20first\x20param\x20to\x20be\x20an\x20object');if(!a['name'])throw new Error(t(0x179));if(typeof b!==t(0x13e))throw new Error(t(0x143));this['options']=Object[t(0x145)]({},a),this['name']=this[t(0x13d)][t(0x177)],this[t(0x167)]=[],this[t(0x151)]=b['bind'](this);}static[a0s(0x15b)](a,b,c){const u=a0s;if(!a)throw new Error(u(0x159));if(typeof b!==u(0x13e))throw new Error(u(0x168));const d=new Command(a,b);return c=c||a0f,Object[u(0x145)](d,{'parent':c?.[u(0x13d)]?.[u(0x177)]}),c[u(0x138)](d),d;}['addCommand'](a){const v=a0s;if(!(a instanceof Command))throw new Error(v(0x172));this['_commands'][v(0x175)](a);}async[a0s(0x17f)](a,b){const w=a0s,c=this[w(0x131)](a[0x0]);if(c){const d=c?.[w(0x177)]||a[0x0],e=c?.[w(0x166)]||'',f=c?.[w(0x13d)];if(f[w(0x15d)])return;const g=a[0x0],h=Object[w(0x140)](b),i=await this[w(0x14b)]['getPro']();!i&&(Log[w(0x126)]('License\x20error,\x20you\x20may\x20need\x20to\x20re-login\x20or\x20delete\x20your\x20~/.maka/global-config.json\x20file\x20to\x20regenerate\x20a\x20free\x20license.'),process[w(0x14d)](0x1));const j=i?.[w(0x16d)][w(0x12b)](d)||i?.['proCommands'][w(0x12b)](e),k=i?.[w(0x12d)][w(0x12b)](w(0x17c))||i?.[w(0x12d)][w(0x12b)](w(0x176)),l=!k;if(j&&l)throw w(0x146)+a[0x0]+'\x22,\x20please\x20upgrade\x20to\x20the\x20professional\x20version\x20of\x20Maka-CLI\x20@\x20www.maka-cli.com,\x20then\x20issue:\x20\x27maka\x20login\x27';if(h['length']>0x0){const m=i?.['proFlags']['filter'](n=>h[w(0x12b)](n));if(m&&m[w(0x164)]>0x0&&l)throw w(0x144)+m?.[w(0x13f)](',\x20')+'\x22,\x20please\x20upgrade\x20to\x20the\x20professional\x20version\x20of\x20Maka-CLI\x20@\x20www.maka-cli.com,\x20then\x20issue:\x20\x27maka\x20login\x27';}if(g==='deploy'){const n=await this[w(0x14b)][w(0x14e)](),o=n?.['proCommands'][w(0x12b)](a[0x0]+'\x20'+a[0x1]);if(o&&l)throw'To\x20use\x20this\x20command,\x20\x22'+a[0x0]+w(0x174);}}}async[a0s(0x12c)](a,b){const x=a0s;try{a=a||[],b=b||{};try{await this[x(0x17f)](a,b);}catch(c){Log[x(0x126)](c),process[x(0x14d)](0x0);}await this[x(0x130)](a,b);}catch(d){process[x(0x14d)](0x1);}}async['invoke'](a,b){const y=a0s,{usage:usage='',description:description='',shortDesc:c,examples:examples=[],isRoot:isRoot=![],requiredOpts:requiredOpts=[],validOpts:d}=this[y(0x13d)];try{if(this[y(0x13d)][y(0x177)]!==y(0x14f)){if(!isRoot){const f=(a[0x0]===_prevCmd||a[y(0x164)]===0x0)&&this[y(0x167)][y(0x164)]>=0x0;if(f&&b[y(0x132)]){if(this[y(0x167)]['length']>0x0)throw new UsageErrorWithSubs();throw new UsageError();}if(!b[y(0x132)]){if(this[y(0x13d)][y(0x137)]){const g=this[y(0x136)]();if(!g)throw new MustBeInProjectError();}if(this['options'][y(0x17a)]){const h=this[y(0x15f)]();if(!h)throw new NoMeteorFoundError();}if(typeof this[y(0x13d)][y(0x14a)]==='number'){if(a[y(0x164)]<this[y(0x13d)][y(0x14a)]){Log[y(0x126)](y(0x154));throw new UsageError();}}if(typeof this[y(0x13d)]['maxArgLength']===y(0x134)){if(a[y(0x164)]>=this[y(0x13d)][y(0x161)]){Log[y(0x126)](y(0x169));throw new UsageError();}}if(typeof this[y(0x13d)][y(0x150)]===y(0x134)){if(Object[y(0x140)](b)[y(0x164)]<this[y(0x13d)]['minOptsLength']){Log[y(0x126)](y(0x13b));throw new UsageError();}}if(typeof this[y(0x13d)][y(0x12f)]===y(0x134)){if(Object[y(0x140)](b)[y(0x164)]>=this[y(0x13d)][y(0x12f)]){Log[y(0x126)](y(0x139));throw new UsageError();}}}}this['validateParams'](a,b,this[y(0x13d)]),_prevCmd=a[0x0];}await this[y(0x151)][y(0x142)](this,a,b);}catch(i){Log[y(0x171)](description,examples,usage,c,requiredOpts,d);if(i instanceof UsageErrorWithSubs)Log[y(0x15c)]('Sub-Commands:'),this[y(0x16f)](this[y(0x167)]),Log[y(0x157)]('Use\x20--help\x20for\x20any\x20sub-command\x20for\x20details');else{if(i instanceof MustBeInProjectError)Log['error'](y(0x165));else{if(i instanceof NoMeteorFoundError)Log[y(0x126)](y(0x147)),Log[y(0x15c)]('Please\x20run\x20\x22maka\x20install\x20meteor\x22');else{if(i instanceof NoMeteorAppFoundError)Log[y(0x126)](y(0x141));else throw i;}}}process['exit'](0x1);}}[a0s(0x16f)](a){const z=a0s,b=new a0e({});b[z(0x175)]([z(0x13c),z(0x128),z(0x133)]),a['sort']()[z(0x173)](c=>{const A=z;c[A(0x177)]!==A(0x16c)&&c['name']!==A(0x13a)&&b['push']([c[A(0x177)],c['aliases'](),c[A(0x178)]()]);}),Log[z(0x155)](b[z(0x153)]());}[a0s(0x131)](a){const B=a0s;return this[B(0x167)][B(0x148)](b=>b[B(0x16b)](a));}[a0s(0x158)](a){const C=a0s,b=a?.[C(0x149)](':');if(b)return a=b[0x0],this[C(0x131)](a);else return;}async[a0s(0x162)](a,b,c){const D=a0s;try{const d=a[D(0x149)](':');a=d[0x0];const f=d[0x1];f&&b[D(0x156)](0x0,0x0,f);const g=this[D(0x131)](a);if(g)await g[D(0x12c)](b,c);else throw D(0x129);}catch(h){throw Log[D(0x126)](h);}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(a,b){var f=a1d,c=a();while(!![]){try{var d=parseInt(f(
|
|
1
|
+
(function(a,b){var f=a1d,c=a();while(!![]){try{var d=parseInt(f(0xb4))/0x1*(-parseInt(f(0xb6))/0x2)+-parseInt(f(0xaa))/0x3+parseInt(f(0xb3))/0x4*(-parseInt(f(0xb5))/0x5)+-parseInt(f(0xb0))/0x6*(-parseInt(f(0xae))/0x7)+parseInt(f(0xab))/0x8+parseInt(f(0xb1))/0x9*(parseInt(f(0xb2))/0xa)+-parseInt(f(0xa9))/0xb*(-parseInt(f(0xa8))/0xc);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a1c,0xb47cb));var a1b=(function(){var a=!![];return function(b,c){var d=a?function(){if(c){var e=c['apply'](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a1a=a1b(this,function(){var g=a1d;return a1a['toString']()[g(0xad)](g(0xaf))[g(0xac)]()['constructor'](a1a)[g(0xad)](g(0xaf));});a1a();import'./aws/_index.js';function a1c(){var h=['626MQecIW','12VMmPRr','7025315xaTQYv','219066xEcIMp','6735400vRSLcv','toString','search','125881RLvvLt','(((.+)+)+)+$','156VqiSJK','153HgvuNC','230190eAOPkM','8nWDdZb','1460OdxrhL','2675485MqNzgN'];a1c=function(){return h;};return a1c();}import'./set/_index.js';import'./get/_index.js';import'./game/_index.js';import'./build/_index.js';import'./run/_index.js';import'./create.js';import'./debug.js';function a1d(a,b){var c=a1c();return a1d=function(d,e){d=d-0xa8;var f=c[d];return f;},a1d(a,b);}import'./deploy.js';import'./generate.js';import'./help.js';import'./login.js';import'./logout.js';import'./logs.js';import'./maka.cmd.js';import'./reconfig.js';import'./ssh.js';import'./ssl.js';import'./test.js';import'./version.js';import'./murder.js';import'./proxy.js';import'./lint.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(a,b){var f=a2d,c=a();while(!![]){try{var d
|
|
1
|
+
(function(a,b){var f=a2d,c=a();while(!![]){try{var d=parseInt(f(0x1d4))/0x1+-parseInt(f(0x1da))/0x2+-parseInt(f(0x1d0))/0x3*(parseInt(f(0x1d8))/0x4)+parseInt(f(0x1db))/0x5*(-parseInt(f(0x1d6))/0x6)+-parseInt(f(0x1d2))/0x7*(parseInt(f(0x1ce))/0x8)+parseInt(f(0x1d9))/0x9+parseInt(f(0x1d7))/0xa;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a2c,0x21ae4));function a2c(){var i=['search','203ZumZyt','constructor','251435moZSkO','(((.+)+)+)+$','867588LZJPMp','3238630xoKkEu','352588tzlsLk','619713PmhEJu','26874cAYDxA','5ZBaEUX','apply','23096kklwBd','toString','9ujDAGj'];a2c=function(){return i;};return a2c();}var a2b=(function(){var a=!![];return function(b,c){var d=a?function(){var g=a2d;if(c){var e=c[g(0x1dc)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a2a=a2b(this,function(){var h=a2d;return a2a[h(0x1cf)]()[h(0x1d1)](h(0x1d5))['toString']()[h(0x1d3)](a2a)[h(0x1d1)](h(0x1d5));});a2a();import'./aws.command.js';import'./ci.sub.cmd.js';import'./ckp.sub.cmd.js';import'./csg.sub.cmd.js';import'./di.sub.cmd.js';function a2d(a,b){var c=a2c();return a2d=function(d,e){d=d-0x1ce;var f=c[d];return f;},a2d(a,b);}import'./dkp.sub.cmd.js';import'./rbi.sub.cmd.js';import'./sth.sub.cmd.js';import'./ti.sub.cmd.js';import'./dsg.sub.cmd.js';import'./rkp.sub.cmd.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a3i=a3d;(function(a,b){const f=a3d,c=a();while(!![]){try{const d
|
|
1
|
+
const a3i=a3d;(function(a,b){const f=a3d,c=a();while(!![]){try{const d=parseInt(f(0xb4))/0x1+parseInt(f(0xbb))/0x2+parseInt(f(0xc1))/0x3*(-parseInt(f(0xb8))/0x4)+-parseInt(f(0xc0))/0x5+parseInt(f(0xba))/0x6*(parseInt(f(0xb7))/0x7)+-parseInt(f(0xb5))/0x8+parseInt(f(0xbd))/0x9;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a3c,0xe261d));const a3b=(function(){let a=!![];return function(b,c){const d=a?function(){const g=a3d;if(c){const e=c[g(0xc2)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a3a=a3b(this,function(){const h=a3d;return a3a[h(0xbe)]()[h(0xc4)](h(0xb9))[h(0xbe)]()[h(0xb2)](a3a)[h(0xc4)]('(((.+)+)+)+$');});a3a();import{Command}from'../../command.js';import{Log}from'../../tools/log/log.class.js';function a3d(a,b){const c=a3c();return a3d=function(d,e){d=d-0xb2;let f=c[d];return f;},a3d(a,b);}import{UsageErrorWithSubs}from'../../error.js';const AWSCommand=Command['create']({'name':'aws','usage':a3i(0xb3),'minArgLength':0x1,'maxArgLength':0x2,'validOpts':[],'shortDesc':a3i(0xbf),'description':'\x0a\x20\x20Create,\x20view,\x20terminate\x20EC2\x20instances,\x20assign\x20key-pairs,\x20set\x20host\x20IPs,\x20and\x20more.\x0a\x0a\x20\x20This\x20command\x20currently\x20requires\x20AWS\x20CLI\x20to\x20be\x20installed.\x0a\x20\x20https://aws.amazon.com/cli/\x0a\x20\x20'},async function(a,b){const j=a3i,c=a[0x0],d=this['findSubCommand'](c);if(d)this[j(0xc3)](c,a,b);else{Log[j(0xb6)](j(0xbc));throw new UsageErrorWithSubs();}});function a3c(){const k=['Manage\x20EC2\x20instances,\x20VPC\x20Security\x20groups,\x20and\x20Key\x20Pairs','9010800oyypdd','165039IUkYGx','apply','runSubCommand','search','constructor','maka\x20aws:<sub-command>','395402iRGofy','12575656srmEKX','error','791hofWqr','36iwVcED','(((.+)+)+)+$','93102UvyxHy','643200MsAEvT','Sub\x20Command\x20not\x20found','20934648tYPIvL','toString'];a3c=function(){return k;};return a3c();}export default AWSCommand;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a4ah=a4d;(function(a,b){const ae=a4d,c=a();while(!![]){try{const d=parseInt(ae(0x183))/0x1+-parseInt(ae(0x1b3))/0x2+parseInt(ae(0x1a5))/0x3+parseInt(ae(0x1ce))/0x4*(-parseInt(ae(0x1d3))/0x5)+parseInt(ae(0x187))/0x6*(-parseInt(ae(0x195))/0x7)+parseInt(ae(0x180))/0x8+parseInt(ae(0x17b))/0x9;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a4c,0x1ae51));const a4b=(function(){let a=!![];return function(b,c){const d=a?function(){const af=a4d;if(c){const e=c[af(0x19c)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a4a=a4b(this,function(){const ag=a4d;return a4a[ag(0x19a)]()['search'](ag(0x190))[ag(0x19a)]()[ag(0x1d0)](a4a)[ag(0x1a1)]('(((.+)+)+)+$');});a4a();import a4e from'./aws.command.js';function a4d(a,b){const c=a4c();return a4d=function(d,e){d=d-0x16f;let f=c[d];return f;},a4d(a,b);}import{execSync}from'child_process';import a4f from'path';import a4g from'fs';import{Actions}from'../../tools/actions/actions.class.js';import{AWS}from'../../tools/aws/aws.class.js';function a4c(){const au=['22,80,443','\x20AMIID:\x20','\x20SUBNETID:\x20','\x20:\x20','Please\x20choose\x20a\x20subnet\x20ID\x20to\x20assign\x20the\x20instance\x20to:\x20[0]\x20','\x20CIDR:\x20','split','What\x20instance\x20type\x20would\x20you\x20like?\x20[t3.micro]','amazon','alias','getConfigPath','date','ABORTED!\x20No\x20instance\x20has\x20been\x20created!','\x20DESCRIPTION:\x20','chooseVPC','createFile','Setting\x20the\x20key-pair\x20to:\x20','Please\x20choose\x20an\x20AMI\x20ID\x20to\x20assign\x20the\x20instance\x20to:\x20[0]\x20','User\x20Data:','fsi','\x20AZONE:\x20','string','getTime','10896UlrsQN','Would\x20you\x20like\x20to\x20include\x20user\x20data?','constructor','unlinkSync','getConfigFromShorthand','380UMJrhF','maka-cli','createKeyPair','Create\x20new\x20AWS\x20instance','You\x20must\x20have\x20a\x20key-pair.\x20\x20Please\x20run\x20\x22maka\x20aws\x20create-key-pair\x20--env\x20<env-name>\x22\x20to\x20generate\x20a\x20new\x20key','Run\x20\x22maka\x20aws:set-host\x22\x20to\x20configure\x20your\x20ssh.json\x20file','number','Creating\x20user\x20data\x20file\x20in\x20','Setting\x20SG\x20ID\x20to:\x20','*\x22\x20\x22Name=root-device-type,Values=ebs\x22\x20\x22Name=description,Values=*Ubuntu?\x20??.??\x20LTS?\x20amd64\x20bionic\x20image*\x22\x20--query\x20\x22Images[*].{Desc:Description,ID:ImageId,alias:ImageOwnerAlias}\x22','Desc','sort','forEach','success','\x22\x20--query\x20\x22Subnets[*].{subnet:CidrBlock}\x22','574380mqblGJ','getSecurityGroups','That\x20was\x20not\x20an\x20id\x20in\x20the\x20list.','name','sgId','1501712PbwURK','ImageID:','Remove\x20the\x20keypair\x20','21526GTLARh','bright','confirm','parse','24JVoTnP','maka\x20aws:ci\x20--env\x20prod','\x20SGID:\x20','\x0a\x20\x20Walk\x20through\x20a\x20list\x20of\x20questions\x20that\x20will\x20properly\x20provision\x20a\x20new\x20EC2\x0a\x20\x20instance.\x0a\x0a\x20\x20Once\x20created,\x20you\x20will\x20begin\x20to\x20be\x20billed\x20for\x20the\x20resource!\x0a\x20\x20','ID:\x20','Ready\x20to\x20create\x20instance?\x20NOTE:\x20You\x20WILL\x20be\x20billed\x20for\x20this\x20instance\x20by\x20AWS.','ec2create','**\x20Available\x20Subnets\x20**','aws\x20ec2\x20describe-subnets\x20--filter\x20\x22Name=subnet-id,Values=','(((.+)+)+)+$','aws\x20ec2\x20describe-subnets\x20--query\x20\x22Subnets[*].{subnetId:SubnetId,cider:CidrBlock,az:AvailabilityZone}\x22','EC2\x20Name:\x20[','maka\x20aws:create-instance\x20<opts>','create-instance','28007NIBluP','Instance\x20Count:\x20','subnetId','amiId','Name','toString','Key-Pair:\x20','apply','build\x20on\x20','error','readFileSync','desc','search','**\x20Available\x20key-pairs\x20**','ec2createSG','No\x20instance\x20has\x20been\x20created.','529185LUxApw','Instance\x20created!\x20\x20NOTE:\x20You\x20are\x20now\x20being\x20billed\x20for\x20this\x20EC2.','Remove\x20the\x20security\x20group\x20','Security\x20Group:\x20','env','notice','exit','\x20SG\x20NAME:\x20','Please\x20choose\x20a\x20SG\x20to\x20assign\x20the\x20instance\x20to:\x20[','environment','ask','Would\x20you\x20like\x20to\x20create\x20a\x20new\x20security\x20group?','user-data','push','232532ohDWoK','log','Setting\x20Subnet\x20ID\x20to\x20','subnet'];a4c=function(){return au;};return a4c();}import{Command}from'../../command.js';import{Log}from'../../tools/log/log.class.js';import{FSI}from'../../tools/fsi/fsi.class.js';Command['create']({'name':a4ah(0x194),'aliases':['ci'],'usage':a4ah(0x193),'examples':['maka\x20aws:create-instance\x20--env\x20dev',a4ah(0x188)],'mustBeInMakaProject':!![],'requiredOpts':['env'],'validOpts':[],'minArgLength':0x1,'maxArgLength':0x2,'shortDesc':a4ah(0x16f),'description':a4ah(0x18a)},async function(a,b){const ai=a4ah;try{const c=this[ai(0x1ca)]['getProjectConfig'](),d=new AWS(),f=new FSI(),{appName:g}=c,h=this[ai(0x1ca)][ai(0x1d2)](b[ai(0x1a9)]),i=this[ai(0x1ca)][ai(0x1c1)](h),j=g+'-'+h,k=await Actions[ai(0x1af)](ai(0x192)+j+']\x20')||j;let l='',m='',n='',o='',p='';const q=await Actions[ai(0x185)]('Would\x20you\x20like\x20to\x20make\x20a\x20new\x20PEM\x20key?',!![]);let r='',s='';if(q){const {keyName:y,filePath:z}=await d[ai(0x1d5)]({'env':h});r=y,s=z,Log[ai(0x179)](ai(0x1c7)+r);}else try{Log[ai(0x1aa)](ai(0x1a2));const A=r?r:k,B=await d['ec2describeKeys']({'suggestion':A}),C=await Actions['ask']('Please\x20choose\x20a\x20key\x20to\x20use:\x20')||'-1';if(parseInt(C)<0x0){Log[ai(0x19e)](ai(0x170)),Log[ai(0x1aa)](ai(0x1a4));return;}B?.[ai(0x178)](function(D){const aj=ai;parseInt(C)===D['id']&&(r=D[aj(0x17e)],Log[aj(0x179)](aj(0x1c7)+r));});}catch(D){Log[ai(0x19e)](D);}l=await d[ai(0x1c5)]();const t=await Actions[ai(0x185)](ai(0x1b0),!![]);let u;if(t){const E=l===''?await d[ai(0x1c5)]():l;u=await Actions[ai(0x1af)]('Security\x20Group\x20Name:\x20['+k+']')||k;const F=await Actions[ai(0x1af)]('Comma\x20separated\x20list\x20of\x20ports\x20[22,80,443]:\x20')||ai(0x1b7),G=F[ai(0x1bd)](',');await d[ai(0x1a3)]({'description':'Web\x20App','name':u,'vpcId':E,'sgPorts':G});}u=k;try{const {listIndexId:H,createdSgId:I,sgList:J}=await d[ai(0x17c)](u);if(I===''){Log[ai(0x1aa)]('**\x20Available\x20Security\x20Groups\x20**'),J['forEach'](function(L){const ak=ai;L[ak(0x17e)]===u?Log[ak(0x1aa)]('ID:\x20'+L['id']+ak(0x1ac)+L[ak(0x17e)]+ak(0x189)+L[ak(0x17f)]):Log[ak(0x184)](ak(0x18b)+L['id']+ak(0x1ac)+L['name']+ak(0x189)+L['sgId']);});const K=await Actions['ask'](ai(0x1ad)+H+']\x20')||H[ai(0x19a)]();J[ai(0x178)](function(L){const al=ai;L['id']===parseInt(K)&&(m=L[al(0x17f)],Log[al(0x179)](al(0x174)+m+'\x0a'));});}else m=I,Log['success']('Setting\x20SG\x20ID\x20to:\x20'+m+'\x0a');if(m==='')throw Log[ai(0x19e)](ai(0x17d));}catch(L){Log[ai(0x19e)](L);}try{const M=0x7e6;Log[ai(0x1aa)]('**\x20Available\x20AMIs\x20**');const N=execSync('aws\x20ec2\x20describe-images\x20--filters\x20\x22Name=description,Values=*LTS*\x22\x20\x22Name=name,Values=*server*\x22\x20\x22Name=name,Values=*ubuntu*\x22\x20\x22Name=creation-date,Values=*'+M+ai(0x175))['toString'](),O=JSON[ai(0x186)](N),P=[],Q=[];O['forEach'](function(S){const am=ai;if(S[am(0x1c0)]===am(0x1bf)){const T=S[am(0x176)][am(0x1bd)](am(0x19d))[0x1];P[am(0x1b2)]({'amiId':S['ID'],'desc':S[am(0x176)],'date':T});}}),P[ai(0x177)](function(S,T){const an=ai;return new Date(T[an(0x1c2)])[an(0x1cd)]()-new Date(S[an(0x1c2)])[an(0x1cd)]();}),P[ai(0x178)](function(S,T){const ao=ai;Q[ao(0x1b2)]({'id':T,'amiId':S[ao(0x198)],'desc':S['desc']});}),Q['forEach'](function(S){const ap=ai;console[ap(0x1b4)](ap(0x18b)+S['id']+ap(0x1b8)+S['amiId']+ap(0x1c4)+S[ap(0x1a0)]);});const R=await Actions[ai(0x1af)](ai(0x1c8))||'0';Q[ai(0x178)](function(S){const aq=ai;S['id']===parseInt(R)&&(n=S[aq(0x198)],Log[aq(0x179)]('Setting\x20AMI\x20ID\x20to\x20'+n+aq(0x1ba)+S[aq(0x1a0)]));});if(n==='')throw Log[ai(0x19e)]('That\x20was\x20not\x20an\x20id\x20in\x20the\x20list.');}catch(S){Log[ai(0x19e)](S);}try{Log[ai(0x1aa)](ai(0x18e));const T=execSync(ai(0x191))[ai(0x19a)](),U=JSON[ai(0x186)](T),V=[];U[ai(0x178)](function(X,Y){const ar=ai;V[ar(0x1b2)]({'id':Y,'cidr':X['cider'],'az':X['az'],'subnetId':X['subnetId']});}),V['forEach'](function(X){const as=ai;console[as(0x1b4)](as(0x18b)+X['id']+as(0x1bc)+X['cidr']+as(0x1cb)+X['az']+as(0x1b9)+X[as(0x197)]);});const W=await Actions[ai(0x1af)](ai(0x1bb))||'0';V[ai(0x178)](function(X){const at=ai;X['id']===parseInt(W)&&(p=X[at(0x197)],Log[at(0x179)](at(0x1b5)+p));});if(p==='')throw Log['error'](ai(0x17d));}catch(X){Log['error'](X);}const v=0x1,w=0x1;try{const Y=await Actions['ask']('How\x20many\x20instances\x20do\x20you\x20want\x20to\x20create\x20(min:max)?\x20[1:1]\x20')||'1:1',Z=Y[ai(0x1bd)](':')[0x0],a0=Y[ai(0x1bd)](':')[0x1];typeof parseInt(Z)==='number'&&typeof parseInt(a0)===ai(0x172)&&Log[ai(0x179)]('Setting\x20the\x20number\x20of\x20instances\x20to:\x20'+Z+':'+a0);}catch(a1){Log[ai(0x19e)](a1);}try{const a2=await Actions[ai(0x1af)](ai(0x1be))||'t3.micro';typeof a2===ai(0x1cc)&&(o=a2);}catch(a3){Log['error'](a3);}let x;try{const a4=await Actions[ai(0x185)](ai(0x1cf),![]);a4&&(x=a4f['join'](i,ai(0x1b1)),Log['notice'](ai(0x173)+x),await this[ai(0x1ca)][ai(0x1c6)]({'filePath':x,'data':''}),await Actions[ai(0x185)]('Please\x20modify\x20and\x20save\x20the\x20user-data\x20file.\x20\x20Ready\x20to\x20continue?'));}catch(a5){Log['error'](a5);}try{const a6=JSON[ai(0x186)](execSync(ai(0x18f)+p+ai(0x17a))[ai(0x19a)]())[0x0][ai(0x1b6)];Log[ai(0x1aa)](ai(0x181)+n),Log[ai(0x1aa)](ai(0x196)+v+':'+w),Log[ai(0x1aa)]('Instace\x20Type:\x20'+o),Log['notice'](ai(0x19b)+r),Log[ai(0x1aa)](ai(0x1a8)+m),Log['notice']('Subnet:\x20'+a6);if(x){Log[ai(0x1aa)](ai(0x1c9)+x);const a8=a4g[ai(0x19f)](x);Log[ai(0x1aa)](a8);}const a7=await Actions['confirm'](ai(0x18c));if(a7){const a9=await d[ai(0x18d)]({'imageId':n,'minCount':v,'maxCount':w,'type':o,'key':r,'sgIds':m,'subnet':p,'tags':[{'Key':'created-by','Value':ai(0x1d4)},{'Key':ai(0x1ae),'Value':h},{'Key':ai(0x199),'Value':k}],...x&&{'userData':x}});a9&&(Log[ai(0x179)](ai(0x1a6)),Log[ai(0x184)](ai(0x171)));}else{Log[ai(0x1aa)](ai(0x1c3));const aa=await Actions[ai(0x185)](ai(0x182)+r+'\x20?',!![]);aa&&(d['deleteKeyPair'](r),f['isFile'](s)&&a4g[ai(0x1d1)](s));const ab=await Actions[ai(0x185)](ai(0x1a7)+m+'\x20?',!![]);ab&&d['deleteSecurityGroup'](m);}}catch(ac){console[ai(0x1b4)](ac),Log[ai(0x19e)](ac);}}catch(ad){console[ai(0x19e)](ad),process[ai(0x1ab)](0x0);}},a4e);
|
|
1
|
+
const a4ag=a4d;function a4d(a,b){const c=a4c();return a4d=function(d,e){d=d-0x11f;let f=c[d];return f;},a4d(a,b);}(function(a,b){const ae=a4d,c=a();while(!![]){try{const d=-parseInt(ae(0x17b))/0x1+-parseInt(ae(0x147))/0x2+parseInt(ae(0x185))/0x3*(parseInt(ae(0x15c))/0x4)+parseInt(ae(0x136))/0x5*(-parseInt(ae(0x13c))/0x6)+-parseInt(ae(0x17f))/0x7*(parseInt(ae(0x172))/0x8)+parseInt(ae(0x145))/0x9*(parseInt(ae(0x121))/0xa)+-parseInt(ae(0x13b))/0xb*(-parseInt(ae(0x129))/0xc);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a4c,0x4e821));const a4b=(function(){let a=!![];return function(b,c){const d=a?function(){if(c){const e=c['apply'](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a4a=a4b(this,function(){const af=a4d;return a4a[af(0x126)]()['search'](af(0x130))[af(0x126)]()['constructor'](a4a)[af(0x173)]('(((.+)+)+)+$');});a4a();import a4e from'./aws.command.js';import{execSync}from'child_process';import a4f from'path';import a4g from'fs';function a4c(){const at=['split','Instance\x20created!\x20\x20NOTE:\x20You\x20are\x20now\x20being\x20billed\x20for\x20this\x20EC2.','Ready\x20to\x20create\x20instance?\x20NOTE:\x20You\x20WILL\x20be\x20billed\x20for\x20this\x20instance\x20by\x20AWS.','252421jygyws','ID:\x20','unlinkSync','env','7pbgAIj','1:1','Comma\x20separated\x20list\x20of\x20ports\x20[22,80,443]:\x20','Web\x20App','Desc','aws\x20ec2\x20describe-subnets\x20--query\x20\x22Subnets[*].{subnetId:SubnetId,cider:CidrBlock,az:AvailabilityZone}\x22','228BhlaoO','\x20:\x20','Would\x20you\x20like\x20to\x20make\x20a\x20new\x20PEM\x20key?','Instance\x20Count:\x20','Create\x20new\x20AWS\x20instance','Remove\x20the\x20security\x20group\x20','string','environment','date','60USogOb','\x0a\x20\x20Walk\x20through\x20a\x20list\x20of\x20questions\x20that\x20will\x20properly\x20provision\x20a\x20new\x20EC2\x0a\x20\x20instance.\x0a\x0a\x20\x20Once\x20created,\x20you\x20will\x20begin\x20to\x20be\x20billed\x20for\x20the\x20resource!\x0a\x20\x20','**\x20Available\x20AMIs\x20**','ec2createSG','\x20SGID:\x20','toString','log','Key-Pair:\x20','8076hhpIME','ABORTED!\x20No\x20instance\x20has\x20been\x20created!','Subnet:\x20','notice','\x20DESCRIPTION:\x20','Run\x20\x22maka\x20aws:set-host\x22\x20to\x20configure\x20your\x20ssh.json\x20file','desc','(((.+)+)+)+$','cider','bright','Remove\x20the\x20keypair\x20','amazon','parse','10XXSgxT','Please\x20choose\x20an\x20AMI\x20ID\x20to\x20assign\x20the\x20instance\x20to:\x20[0]\x20','sort','deleteKeyPair','exit','10483wlVyRZ','1179498gayLqg','Setting\x20the\x20number\x20of\x20instances\x20to:\x20','success','ImageID:','How\x20many\x20instances\x20do\x20you\x20want\x20to\x20create\x20(min:max)?\x20[1:1]\x20','Would\x20you\x20like\x20to\x20create\x20a\x20new\x20security\x20group?','You\x20must\x20have\x20a\x20key-pair.\x20\x20Please\x20run\x20\x22maka\x20aws\x20create-key-pair\x20--env\x20<env-name>\x22\x20to\x20generate\x20a\x20new\x20key','Setting\x20AMI\x20ID\x20to\x20','Would\x20you\x20like\x20to\x20include\x20user\x20data?','220122XfUSpm','Security\x20Group:\x20','296180voYgNL','t3.micro','deleteSecurityGroup','*\x22\x20\x22Name=root-device-type,Values=ebs\x22\x20\x22Name=description,Values=*Ubuntu?\x20??.??\x20LTS?\x20amd64\x20bionic\x20image*\x22\x20--query\x20\x22Images[*].{Desc:Description,ID:ImageId,alias:ImageOwnerAlias}\x22','maka\x20aws:create-instance\x20--env\x20dev','error','\x20AZONE:\x20','Name','Security\x20Group\x20Name:\x20[','No\x20instance\x20has\x20been\x20created.','Setting\x20SG\x20ID\x20to:\x20','22,80,443','createKeyPair','ec2describeKeys','\x20SG\x20NAME:\x20','created-by','alias','maka\x20aws:create-instance\x20<opts>','Setting\x20the\x20key-pair\x20to:\x20','confirm','ask','27532yfxyze','getProjectConfig','sgId','push','That\x20was\x20not\x20an\x20id\x20in\x20the\x20list.','Creating\x20user\x20data\x20file\x20in\x20','number','name','subnetId','Please\x20choose\x20a\x20key\x20to\x20use:\x20','Please\x20choose\x20a\x20subnet\x20ID\x20to\x20assign\x20the\x20instance\x20to:\x20[0]\x20','readFileSync','ec2create','amiId','getConfigFromShorthand','fsi','cidr','getTime','user-data','build\x20on\x20','Setting\x20Subnet\x20ID\x20to\x20','\x20SUBNETID:\x20','1567832AtoOri','search','join','\x22\x20--query\x20\x22Subnets[*].{subnet:CidrBlock}\x22','forEach','chooseVPC'];a4c=function(){return at;};return a4c();}import{Actions}from'../../tools/actions/actions.class.js';import{AWS}from'../../tools/aws/aws.class.js';import{Command}from'../../command.js';import{Log}from'../../tools/log/log.class.js';import{FSI}from'../../tools/fsi/fsi.class.js';Command['create']({'name':'create-instance','aliases':['ci'],'usage':a4ag(0x158),'examples':[a4ag(0x14b),'maka\x20aws:ci\x20--env\x20prod'],'mustBeInMakaProject':!![],'requiredOpts':[a4ag(0x17e)],'validOpts':[],'minArgLength':0x1,'maxArgLength':0x2,'shortDesc':a4ag(0x189),'description':a4ag(0x122)},async function(a,b){const ah=a4ag;try{const c=this[ah(0x16b)][ah(0x15d)](),d=new AWS(),f=new FSI(),{appName:g}=c,h=this[ah(0x16b)][ah(0x16a)](b[ah(0x17e)]),i=this[ah(0x16b)]['getConfigPath'](h),j=g+'-'+h,k=await Actions['ask']('EC2\x20Name:\x20['+j+']\x20')||j;let l='',m='',n='',o='',p='';const q=await Actions[ah(0x15a)](ah(0x187),!![]);let r='',s='';if(q){const {keyName:y,filePath:z}=await d[ah(0x153)]({'env':h});r=y,s=z,Log[ah(0x13e)](ah(0x159)+r);}else try{Log[ah(0x12c)]('**\x20Available\x20key-pairs\x20**');const A=r?r:k,B=await d[ah(0x154)]({'suggestion':A}),C=await Actions['ask'](ah(0x165))||'-1';if(parseInt(C)<0x0){Log[ah(0x14c)](ah(0x142)),Log[ah(0x12c)](ah(0x150));return;}B?.['forEach'](function(D){const ai=ah;parseInt(C)===D['id']&&(r=D[ai(0x163)],Log['success'](ai(0x159)+r));});}catch(D){Log[ah(0x14c)](D);}l=await d['chooseVPC']();const t=await Actions[ah(0x15a)](ah(0x141),!![]);let u;if(t){const E=l===''?await d[ah(0x177)]():l;u=await Actions[ah(0x15b)](ah(0x14f)+k+']')||k;const F=await Actions['ask'](ah(0x181))||ah(0x152),G=F['split'](',');await d[ah(0x124)]({'description':ah(0x182),'name':u,'vpcId':E,'sgPorts':G});}u=k;try{const {listIndexId:H,createdSgId:I,sgList:J}=await d['getSecurityGroups'](u);if(I===''){Log[ah(0x12c)]('**\x20Available\x20Security\x20Groups\x20**'),J['forEach'](function(L){const aj=ah;L[aj(0x163)]===u?Log[aj(0x12c)](aj(0x17c)+L['id']+aj(0x155)+L[aj(0x163)]+aj(0x125)+L['sgId']):Log[aj(0x132)]('ID:\x20'+L['id']+aj(0x155)+L[aj(0x163)]+aj(0x125)+L[aj(0x15e)]);});const K=await Actions[ah(0x15b)]('Please\x20choose\x20a\x20SG\x20to\x20assign\x20the\x20instance\x20to:\x20['+H+']\x20')||H[ah(0x126)]();J[ah(0x176)](function(L){const ak=ah;L['id']===parseInt(K)&&(m=L['sgId'],Log['success'](ak(0x151)+m+'\x0a'));});}else m=I,Log[ah(0x13e)](ah(0x151)+m+'\x0a');if(m==='')throw Log[ah(0x14c)](ah(0x160));}catch(L){Log[ah(0x14c)](L);}try{const M=0x7e6;Log[ah(0x12c)](ah(0x123));const N=execSync('aws\x20ec2\x20describe-images\x20--filters\x20\x22Name=description,Values=*LTS*\x22\x20\x22Name=name,Values=*server*\x22\x20\x22Name=name,Values=*ubuntu*\x22\x20\x22Name=creation-date,Values=*'+M+ah(0x14a))[ah(0x126)](),O=JSON[ah(0x135)](N),P=[],Q=[];O[ah(0x176)](function(S){const al=ah;if(S[al(0x157)]===al(0x134)){const T=S[al(0x183)][al(0x178)](al(0x16f))[0x1];P[al(0x15f)]({'amiId':S['ID'],'desc':S[al(0x183)],'date':T});}}),P[ah(0x138)](function(S,T){const am=ah;return new Date(T[am(0x120)])[am(0x16d)]()-new Date(S[am(0x120)])['getTime']();}),P['forEach'](function(S,T){const an=ah;Q['push']({'id':T,'amiId':S['amiId'],'desc':S[an(0x12f)]});}),Q[ah(0x176)](function(S){const ao=ah;console[ao(0x127)](ao(0x17c)+S['id']+'\x20AMIID:\x20'+S[ao(0x169)]+ao(0x12d)+S[ao(0x12f)]);});const R=await Actions[ah(0x15b)](ah(0x137))||'0';Q[ah(0x176)](function(S){const ap=ah;S['id']===parseInt(R)&&(n=S['amiId'],Log[ap(0x13e)](ap(0x143)+n+ap(0x186)+S[ap(0x12f)]));});if(n==='')throw Log[ah(0x14c)](ah(0x160));}catch(S){Log[ah(0x14c)](S);}try{Log[ah(0x12c)]('**\x20Available\x20Subnets\x20**');const T=execSync(ah(0x184))[ah(0x126)](),U=JSON[ah(0x135)](T),V=[];U[ah(0x176)](function(X,Y){const aq=ah;V[aq(0x15f)]({'id':Y,'cidr':X[aq(0x131)],'az':X['az'],'subnetId':X[aq(0x164)]});}),V[ah(0x176)](function(X){const ar=ah;console['log'](ar(0x17c)+X['id']+'\x20CIDR:\x20'+X[ar(0x16c)]+ar(0x14d)+X['az']+ar(0x171)+X[ar(0x164)]);});const W=await Actions[ah(0x15b)](ah(0x166))||'0';V['forEach'](function(X){const as=ah;X['id']===parseInt(W)&&(p=X[as(0x164)],Log[as(0x13e)](as(0x170)+p));});if(p==='')throw Log[ah(0x14c)](ah(0x160));}catch(X){Log['error'](X);}const v=0x1,w=0x1;try{const Y=await Actions[ah(0x15b)](ah(0x140))||ah(0x180),Z=Y[ah(0x178)](':')[0x0],a0=Y[ah(0x178)](':')[0x1];typeof parseInt(Z)===ah(0x162)&&typeof parseInt(a0)===ah(0x162)&&Log['success'](ah(0x13d)+Z+':'+a0);}catch(a1){Log[ah(0x14c)](a1);}try{const a2=await Actions['ask']('What\x20instance\x20type\x20would\x20you\x20like?\x20[t3.micro]')||ah(0x148);typeof a2===ah(0x18b)&&(o=a2);}catch(a3){Log[ah(0x14c)](a3);}let x;try{const a4=await Actions[ah(0x15a)](ah(0x144),![]);a4&&(x=a4f[ah(0x174)](i,ah(0x16e)),Log['notice'](ah(0x161)+x),await this[ah(0x16b)]['createFile']({'filePath':x,'data':''}),await Actions[ah(0x15a)]('Please\x20modify\x20and\x20save\x20the\x20user-data\x20file.\x20\x20Ready\x20to\x20continue?'));}catch(a5){Log[ah(0x14c)](a5);}try{const a6=JSON[ah(0x135)](execSync('aws\x20ec2\x20describe-subnets\x20--filter\x20\x22Name=subnet-id,Values='+p+ah(0x175))[ah(0x126)]())[0x0]['subnet'];Log['notice'](ah(0x13f)+n),Log['notice'](ah(0x188)+v+':'+w),Log['notice']('Instace\x20Type:\x20'+o),Log['notice'](ah(0x128)+r),Log['notice'](ah(0x146)+m),Log[ah(0x12c)](ah(0x12b)+a6);if(x){Log[ah(0x12c)]('User\x20Data:'+x);const a8=a4g[ah(0x167)](x);Log['notice'](a8);}const a7=await Actions[ah(0x15a)](ah(0x17a));if(a7){const a9=await d[ah(0x168)]({'imageId':n,'minCount':v,'maxCount':w,'type':o,'key':r,'sgIds':m,'subnet':p,'tags':[{'Key':ah(0x156),'Value':'maka-cli'},{'Key':ah(0x11f),'Value':h},{'Key':ah(0x14e),'Value':k}],...x&&{'userData':x}});a9&&(Log[ah(0x13e)](ah(0x179)),Log[ah(0x132)](ah(0x12e)));}else{Log[ah(0x12c)](ah(0x12a));const aa=await Actions[ah(0x15a)](ah(0x133)+r+'\x20?',!![]);aa&&(d[ah(0x139)](r),f['isFile'](s)&&a4g[ah(0x17d)](s));const ab=await Actions[ah(0x15a)](ah(0x18a)+m+'\x20?',!![]);ab&&d[ah(0x149)](m);}}catch(ac){console[ah(0x127)](ac),Log[ah(0x14c)](ac);}}catch(ad){console['error'](ad),process[ah(0x13a)](0x0);}},a4e);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a5j=a5d;(function(a,b){const g=a5d,c=a();while(!![]){try{const d=parseInt(g(
|
|
1
|
+
const a5j=a5d;(function(a,b){const g=a5d,c=a();while(!![]){try{const d=parseInt(g(0x192))/0x1*(parseInt(g(0x197))/0x2)+parseInt(g(0x19c))/0x3+-parseInt(g(0x198))/0x4+-parseInt(g(0x191))/0x5*(-parseInt(g(0x194))/0x6)+parseInt(g(0x189))/0x7+parseInt(g(0x199))/0x8*(-parseInt(g(0x19e))/0x9)+parseInt(g(0x19f))/0xa*(-parseInt(g(0x188))/0xb);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a5c,0x268df));function a5c(){const l=['maka\x20aws:create-key-pair\x20--env\x20prod','apply','835116jlSPUz','error','1126917VfaQjb','250970EdJNoY','fsi','create','22njCKeH','1440544FydFnE','maka\x20aws:create-key-pair\x20<opts>','env','exit','constructor','ckp','search','createKeyPair','499505RPYIYq','1BpbSXg','toString','6sivpam','(((.+)+)+)+$','create-key-pair','310462CXyBCa','1123028wBLWEF','16HXEfIe'];a5c=function(){return l;};return a5c();}const a5b=(function(){let a=!![];return function(b,c){const d=a?function(){const h=a5d;if(c){const e=c[h(0x19b)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a5a=a5b(this,function(){const i=a5d;return a5a[i(0x193)]()[i(0x18f)](i(0x195))[i(0x193)]()[i(0x18d)](a5a)[i(0x18f)]('(((.+)+)+)+$');});a5a();function a5d(a,b){const c=a5c();return a5d=function(d,e){d=d-0x188;let f=c[d];return f;},a5d(a,b);}import a5e from'./aws.command.js';import{Command}from'../../command.js';import{AWS}from'../../tools/aws/aws.class.js';Command[a5j(0x1a1)]({'name':a5j(0x196),'aliases':[a5j(0x18e)],'usage':a5j(0x18a),'examples':[a5j(0x19a),'maka\x20aws:ckp\x20--env\x20prod'],'mustBeInMakaProject':!![],'requiredOpts':[a5j(0x18b)],'validOpts':[],'minArgLength':0x1,'maxArgLength':0x2,'shortDesc':'Create\x20a\x20Key\x20Pair\x20for\x20AWS\x20an\x20EC2\x20instance','description':'\x0a\x0a\x20\x20In\x20AWS,\x20follow\x20a\x20few\x20questions\x20to\x20create\x20a\x20new\x20Key\x20Pair.\x0a\x20\x20The\x20public\x20key\x20is\x20stored\x20in\x20AWS\x20while\x20the\x20private\x20key\x20is\x20saved\x0a\x20\x20to\x20the\x20_keys\x20directory\x20for\x20the\x20envronment\x20(--env)\x20provided.\x0a\x0a\x20\x20This\x20key\x20cannot\x20be\x20replaced\x20(without\x20support\x20from\x20AWS),\x20and\x20should\x20be\x0a\x20\x20kept\x20safe.\x0a\x0a\x20\x20Maka\x20automatically\x20ignores\x20the\x20_keys\x20directory,\x20so\x20it\x20will\x20not\x20be\x0a\x20\x20stored\x20in\x20version\x20control\x20by\x20default.\x20You\x20may\x20change\x20this\x20in\x20the\x0a\x20\x20.gitignore\x20file\x20at\x20the\x20root\x20of\x20this\x20project,\x20but\x20it\x27s\x20not\x20recommended.\x0a\x20\x20'},async function(a,b){const k=a5j;try{const c=new AWS(),d=this[k(0x1a0)]['getConfigFromShorthand'](b[k(0x18b)]);c[k(0x190)]({'env':d});}catch(f){console[k(0x19d)](f),process[k(0x18c)](0x0);}},a5e);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a6p=a6d;(function(a,b){const m=a6d,c=a();while(!![]){try{const d=parseInt(m(
|
|
1
|
+
const a6p=a6d;(function(a,b){const m=a6d,c=a();while(!![]){try{const d=parseInt(m(0xb5))/0x1+-parseInt(m(0xb6))/0x2*(parseInt(m(0xb1))/0x3)+parseInt(m(0xa6))/0x4*(parseInt(m(0x9d))/0x5)+-parseInt(m(0xb3))/0x6*(parseInt(m(0xb4))/0x7)+-parseInt(m(0xbb))/0x8+-parseInt(m(0xa0))/0x9*(parseInt(m(0xa4))/0xa)+parseInt(m(0x9a))/0xb;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a6c,0x71142));const a6b=(function(){let a=!![];return function(b,c){const d=a?function(){const n=a6d;if(c){const e=c[n(0x9b)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a6a=a6b(this,function(){const o=a6d;return a6a[o(0xb9)]()[o(0xb0)](o(0xad))[o(0xb9)]()[o(0x9c)](a6a)[o(0xb0)](o(0xad));});a6a();import a6e from'./aws.command.js';import{Command}from'../../command.js';function a6d(a,b){const c=a6c();return a6d=function(d,e){d=d-0x97;let f=c[d];return f;},a6d(a,b);}import{Actions}from'../../tools/actions/actions.class.js';import{AWS}from'../../tools/aws/aws.class.js';import{Log}from'../../tools/log/log.class.js';function a6c(){const s=['ec2createSG','split','search','6zPKWFo','chooseVPC','1326jaMPIP','16373beIBsT','703221iXEMEp','672990XYDVhy','create-security-group','forEach','toString','22,80,443','6570568cpSOWU','error','match','getProjectConfig','exit','18896988NbHqpF','apply','constructor','61595KbaxNl','fsi','create','1959723SFMbuI','Security\x20Group\x20Name:\x20[','Web\x20App','\x0a\x20\x20Create\x20a\x20secuirty\x20group\x20on\x20a\x20Virtual\x20Private\x20Cloud\x20(VPC)\x20which\x0a\x20\x20can\x20be\x20used\x20with\x20a\x20new\x20EC2\x20instance.\x0a\x20\x20','10mUvmkv','Create\x20a\x20new\x20secuirty\x20group\x20in\x20a\x20VPC\x20for\x20an\x20EC2','88QZbdzq','maka\x20aws\x20create-security-group','ask','maka\x20aws:csg','List\x20is\x20not\x20all\x20numbers','Comma\x20separated\x20list\x20of\x20ports\x20[22,80,443]:\x20','maka\x20aws:create-secuirty-group','(((.+)+)+)+$'];a6c=function(){return s;};return a6c();}Command[a6p(0x9f)]({'name':a6p(0xb7),'aliases':['csg'],'usage':a6p(0xa7),'validOpts':[],'minArgLength':0x1,'maxArgLength':0x2,'shortDesc':a6p(0xa5),'description':a6p(0xa3),'examples':[a6p(0xac),a6p(0xa9)]},async function(a,b){const q=a6p;try{const c=new AWS(),d=this[q(0x9e)][q(0x98)](),{appName:f}=d,g=await c[q(0xb2)](),h=b['name']?b['name']:''+f,i=await Actions[q(0xa8)](q(0xa1)+h+']')||h,j=await Actions[q(0xa8)](q(0xab))||q(0xba),k=j[q(0xaf)](',');k[q(0xb8)](l=>{const r=q;if(!l[r(0x97)](/^\d+$/))throw r(0xaa);}),await c[q(0xae)]({'description':q(0xa2),'name':i,'vpcId':g,'sgPorts':k});}catch(l){Log[q(0xbc)](l),process[q(0x99)](0x1);}},a6e);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a7c(){const j=['90kKqjvM','\x0a\x20\x20List\x20all\x20EC2\x20instances\x20that\x20have\x20been\x20created\x20with\x20\x22maka\x20aws:ci\x22\x20associated\x0a\x20\x20with\x20the\x20logged\x20in\x20AWS-CLI\x20account.\x0a\x0a\x20\x20Will\x20pull\x20back\x20the\x20instance\x20ID,\x20state,\x20and\x20IP\x20addresses.\x0a\x20\x20Ex:\x0a\x0a\x20\x20ID:\x200\x20NAME:\x20<NAME>\x20ENV:\x20production\x20STATUS:\x20running\x20INSTANCE_ID:\x20i-xxx\x20PUB_IP:\x20x.x.x.x\x20PRIV_IP:\x20y.y.y.y\x0a\x20\x20','maka\x20aws:describe-instances','31926vJOGwY','335swWDnM','ec2describeInstances','(((.+)+)+)+$','search','toString','438104kGvgjt','5847uNbrNa','7FPxWSA','12RuUbWC','1731917LJODhG','219970jtESTJ','maka\x20aws:di','describe-instances','642228qxJkEm','exit','create','2322624uaUNCc','error','62JRVyIW'];a7c=function(){return j;};return a7c();}const a7h=a7d;function a7d(a,b){const c=a7c();return a7d=function(d,e){d=d-0x72;let f=c[d];return f;},a7d(a,b);}(function(a,b){const f=a7d,c=a();while(!![]){try{const d=-parseInt(f(0x7b))/0x1*(-parseInt(f(0x87))/0x2)+-parseInt(f(0x82))/0x3+parseInt(f(0x7a))/0x4+parseInt(f(0x75))/0x5*(parseInt(f(0x74))/0x6)+parseInt(f(0x7c))/0x7*(-parseInt(f(0x85))/0x8)+-parseInt(f(0x88))/0x9*(-parseInt(f(0x7f))/0xa)+parseInt(f(0x7e))/0xb*(-parseInt(f(0x7d))/0xc);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a7c,0x32261));const a7b=(function(){let a=!![];return function(b,c){const d=a?function(){if(c){const e=c['apply'](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a7a=a7b(this,function(){const g=a7d;return a7a[g(0x79)]()['search'](g(0x77))[g(0x79)]()['constructor'](a7a)[g(0x78)]('(((.+)+)+)+$');});a7a();import a7e from'./aws.command.js';import{Command}from'../../command.js';import{AWS}from'../../tools/aws/aws.class.js';Command[a7h(0x84)]({'name':a7h(0x81),'aliases':['di'],'usage':a7h(0x73),'validOpts':[],'minArgLength':0x1,'maxArgLength':0x2,'shortDesc':'Get\x20EC2\x20instances\x20created\x20by\x20Maka-CLI','examples':['maka\x20aws:describe-instances',a7h(0x80)],'description':a7h(0x72)},async function(){const i=a7h;try{const a=new AWS();a[i(0x76)]();}catch(b){console[i(0x86)](b),process[i(0x83)](0x0);}},a7e);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a8i=a8d;(function(a,b){const f=a8d,c=a();while(!![]){try{const d=-parseInt(f(0x7c))/0x1+parseInt(f(0x8a))/0x2+-parseInt(f(0x86))/0x3*(parseInt(f(0x89))/0x4)+parseInt(f(0x7d))/0x5+-parseInt(f(0x8c))/0x6+-parseInt(f(0x8f))/0x7+parseInt(f(0x82))/0x8;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a8c,0x3b602));const a8b=(function(){let a=!![];return function(b,c){const d=a?function(){const g=a8d;if(c){const e=c[g(0x81)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a8a=a8b(this,function(){const h=a8d;return a8a[h(0x87)]()[h(0x83)](h(0x85))[h(0x87)]()[h(0x80)](a8a)[h(0x83)]('(((.+)+)+)+$');});function a8d(a,b){const c=a8c();return a8d=function(d,e){d=d-0x7b;let f=c[d];return f;},a8d(a,b);}a8a();import a8e from'./aws.command.js';function a8c(){const k=['create','1216500twCfch','describe-key-pairs','maka\x20aws:describe-key-pairs','1267098jduQFx','dkp','258097YbWMNU','662590mUQUSv','maka\x20aws:dkp','List\x20the\x20current\x20public\x20keys\x20stored\x20in\x20AWS','constructor','apply','7301992eRuomB','search','error','(((.+)+)+)+$','1617AwCdKw','toString','ec2describeKeys','2348PFsfFm','312378ZJPsCo'];a8c=function(){return k;};return a8c();}import{Command}from'../../command.js';import{AWS}from'../../tools/aws/aws.class.js';Command[a8i(0x8b)]({'name':a8i(0x8d),'aliases':[a8i(0x7b)],'usage':a8i(0x8e),'validOpts':[],'minArgLength':0x1,'maxArgLength':0x2,'shortDesc':a8i(0x7f),'examples':[a8i(0x8e),a8i(0x7e)]},async function(){const j=a8i;try{const a=new AWS();a[j(0x88)]();}catch(b){console[j(0x84)](b),process['exit'](0x0);}},a8e);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a9o=a9d;
|
|
1
|
+
const a9o=a9d;(function(a,b){const l=a9d,c=a();while(!![]){try{const d=parseInt(l(0x140))/0x1+parseInt(l(0x14b))/0x2+parseInt(l(0x150))/0x3+parseInt(l(0x137))/0x4+-parseInt(l(0x153))/0x5+-parseInt(l(0x152))/0x6*(parseInt(l(0x145))/0x7)+-parseInt(l(0x15c))/0x8;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a9c,0x90ddd));function a9c(){const s=['3252984luwQIj','delete-security-group','getSecurityGroups','sgId','toString','success','getProjectConfig','dsg','\x20could\x20impact\x20other\x20instances\x20that\x20are\x20using\x20it.\x20\x20Are\x20you\x20sure?','1087060LTDXRT','Deleting\x20a\x20','ID:\x20','appName','Delete\x20a\x20security\x20group\x20on\x20a\x20VPC','42YvCqoX','isMakaProject','maka\x20aws:delete-sg','\x20SGID:\x20','maka\x20aws:dsg','bright','1161712dyIxPb','constructor','includes','\x20SG\x20NAME:\x20','apply','1925139vXxfbU','search','427962lykaFK','5682130HIfxCa','forEach','exit','notice','error','create','deleteSecurityGroup','Not\x20deleting\x20secuirty\x20group','(((.+)+)+)+$','7720912PIrUin','Please\x20choose\x20a\x20SG\x20ID\x20to\x20delete:','name','confirm'];a9c=function(){return s;};return a9c();}const a9b=(function(){let a=!![];return function(b,c){const d=a?function(){const m=a9d;if(c){const e=c[m(0x14f)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a9a=a9b(this,function(){const n=a9d;return a9a[n(0x13b)]()[n(0x151)](n(0x15b))[n(0x13b)]()[n(0x14c)](a9a)[n(0x151)](n(0x15b));});function a9d(a,b){const c=a9c();return a9d=function(d,e){d=d-0x135;let f=c[d];return f;},a9d(a,b);}a9a();import a9e from'./aws.command.js';import{Command}from'../../command.js';import{Log}from'../../tools/log/log.class.js';import{FSI}from'../../tools/fsi/fsi.class.js';import{AWS}from'../../tools/aws/aws.class.js';import{Actions}from'../../tools/actions/actions.class.js';Command[a9o(0x158)]({'name':a9o(0x138),'aliases':[a9o(0x13e)],'usage':'maka\x20aws:delete-sg','validOpts':[],'minArgLength':0x1,'maxArgLength':0x2,'shortDesc':a9o(0x144),'examples':[a9o(0x147),a9o(0x149)]},async function(){const p=a9o;try{const a=new AWS(),b=new FSI(),c=b[p(0x146)]();let d='';if(c){const j=b[p(0x13d)]();d=j[p(0x143)];}const {sgList:f}=await a[p(0x139)]();f[p(0x154)](function(k){const q=p;c&&k[q(0x135)][q(0x14d)](d)?Log[q(0x156)](q(0x142)+k['id']+'\x20SG\x20NAME:\x20'+k[q(0x135)]+q(0x148)+k['sgId']):Log[q(0x14a)](q(0x142)+k['id']+q(0x14e)+k['name']+q(0x148)+k[q(0x13a)]);});let g='';const h=await Actions['ask'](p(0x15d));f[p(0x154)](function(k){const r=p;k['id']===parseInt(h)&&(g=k[r(0x13a)]);});if(!g)throw Log[p(0x157)]('That\x20was\x20not\x20an\x20id\x20in\x20the\x20list.');const i=await Actions[p(0x136)](p(0x141)+g+p(0x13f),![]);i?(await a[p(0x159)](g),Log[p(0x13c)]('Deleted\x20'+g)):Log[p(0x157)](p(0x15a)),process[p(0x155)](0x0);}catch(k){process[p(0x155)](0x1);}},a9e);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a10c(){const j=['(((.+)+)+)+$','ec2rebootInstance','3526985QZUBzf','maka\x20aws:reboot-instance','instanceId','[!!]\x20You\x20are\x20about\x20to\x20reboot\x20instance:\x20','reboot-instance','status','Reboot\x20an\x20EC2\x20instance','3098brKrkx','3069CPMBja','chooseInstance','confirm','toString','7851180ofLEjr','You\x20have\x20aborted\x20the\x20reboot.\x20\x20The\x20instance:\x20','2545623JxJniH','280dVTpzU','search','There\x20are\x20no\x20instances\x20in\x20a\x20state\x20that\x20can\x20be\x20rebooted;\x20either\x20they\x20are\x20spinning\x20up,\x20or\x20are\x20already\x20terminated.','145194DAZQBM','name','create','rbi','6141096znjYWj','maka\x20aws:rbi','66296edjtwy','90gfmzSr','running','exit','\x20is\x20still\x20running.','error','constructor'];a10c=function(){return j;};return a10c();}const a10h=a10d;(function(a,b){const f=a10d,c=a();while(!![]){try{const d=parseInt(f(0xa6))/0x1+parseInt(f(0xb6))/0x2*(-parseInt(f(0xb7))/0x3)+-parseInt(f(0xa4))/0x4+-parseInt(f(0xaf))/0x5+parseInt(f(0x9a))/0x6+-parseInt(f(0xa0))/0x7*(-parseInt(f(0x9d))/0x8)+parseInt(f(0x9c))/0x9*(parseInt(f(0xa7))/0xa);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a10c,0xc8781));const a10b=(function(){let a=!![];return function(b,c){const d=a?function(){if(c){const e=c['apply'](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a10a=a10b(this,function(){const g=a10d;return a10a[g(0x99)]()[g(0x9e)](g(0xad))[g(0x99)]()[g(0xac)](a10a)[g(0x9e)](g(0xad));});a10a();import a10e from'./aws.command.js';import{Command}from'../../command.js';function a10d(a,b){const c=a10c();return a10d=function(d,e){d=d-0x97;let f=c[d];return f;},a10d(a,b);}import{AWS}from'../../tools/aws/aws.class.js';import{Actions}from'../../tools/actions/actions.class.js';import{Log}from'../../tools/log/log.class.js';Command[a10h(0xa2)]({'name':a10h(0xb3),'aliases':[a10h(0xa3)],'usage':a10h(0xb0),'validOpts':[],'minArgLength':0x1,'maxArgLength':0x2,'shortDesc':a10h(0xb5),'examples':[a10h(0xb0),a10h(0xa5)]},async function(){const i=a10h;try{const a=new AWS(),b=await a[i(0x97)]();if(b?.[i(0xb4)]===i(0xa8)){const c=await Actions[i(0x98)](i(0xb2)+b[i(0xa1)]+'\x20Ready?');c&&b[i(0xb1)]?a[i(0xae)]({'instanceId':b[i(0xb1)]}):Log[i(0xab)](i(0x9b)+b[i(0xa1)]+i(0xaa));}else Log[i(0xab)](i(0x9f));}catch(d){console[i(0xab)](d),process[i(0xa9)](0x0);}},a10e);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a11c(){const n=['Deleted\x20','4435efGgzt','(((.+)+)+)+$','\x20could\x20impact\x20other\x20instances\x20that\x20are\x20using\x20it.\x20\x20Are\x20you\x20sure?','333598wIAiNi','199533jzhzLF','881848VrrvzS','error','144kDjSuP','name','maka\x20aws:remove-key-pair','confirm','That\x20was\x20not\x20an\x20id\x20in\x20the\x20list.','maka\x20aws:rkp','3228szshnS','ask','\x0a\x20\x20After\x20being\x20show\x20a\x20list\x20of\x20available\x20key\x20pairs,\x20provide\x20the\x20name\x0a\x20\x20of\x20the\x20key\x20pair\x20that\x20you\x27d\x20like\x20to\x20delete.\x0a\x0a\x20\x20This\x20cannot\x20be\x20undone!\x0a\x20\x20','create','230409jXphiO','search','apply','deleteKeyPair','1068450plYlXb','rkp','Please\x20choose\x20a\x20key\x20to\x20delete:','Choose\x20from\x20your\x20list\x20of\x20public\x20keys\x20to\x20delete','3038896LbEOCF','exit'];a11c=function(){return n;};return a11c();}const a11k=a11d;(function(a,b){const h=a11d,c=a();while(!![]){try{const d=-parseInt(h(0xec))/0x1+-parseInt(h(0xeb))/0x2+parseInt(h(0xe1))/0x3+-parseInt(h(0xed))/0x4+-parseInt(h(0xe8))/0x5*(-parseInt(h(0xf5))/0x6)+-parseInt(h(0xe5))/0x7+parseInt(h(0xef))/0x8*(parseInt(h(0xdd))/0x9);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a11c,0x42b64));const a11b=(function(){let a=!![];return function(b,c){const d=a?function(){const i=a11d;if(c){const e=c[i(0xdf)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a11a=a11b(this,function(){const j=a11d;return a11a['toString']()[j(0xde)](j(0xe9))['toString']()['constructor'](a11a)[j(0xde)](j(0xe9));});a11a();import a11e from'./aws.command.js';function a11d(a,b){const c=a11c();return a11d=function(d,e){d=d-0xdb;let f=c[d];return f;},a11d(a,b);}import{Command}from'../../command.js';import{AWS}from'../../tools/aws/aws.class.js';import{Actions}from'../../tools/actions/actions.class.js';import{Log}from'../../tools/log/log.class.js';Command[a11k(0xdc)]({'name':'remove-key-pair','aliases':[a11k(0xe2)],'usage':a11k(0xf1),'validOpts':[],'minArgLength':0x1,'maxArgLength':0x2,'shortDesc':a11k(0xe4),'description':a11k(0xdb),'examples':[a11k(0xf1),a11k(0xf4)]},async function(){const l=a11k;try{const a=new AWS(),b=await a['ec2describeKeys']();let c;const d=await Actions[l(0xf6)](l(0xe3));b?.['forEach'](function(g){const m=l;g['id']===parseInt(d)&&(c=g[m(0xf0)]);});if(!c)throw Log['error'](l(0xf3));const f=await Actions[l(0xf2)]('Deleting\x20a\x20'+c+l(0xea),![]);f?(a[l(0xe0)](c),Log['success'](l(0xe7)+c)):Log[l(0xee)]('Not\x20deleting\x20keypair'),process['exit'](0x0);}catch(g){process[l(0xe6)](0x1);}},a11e);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a12n=a12d;(function(a,b){const l=a12d,c=a();while(!![]){try{const d=parseInt(l(0x145))/0x1+parseInt(l(0x148))/0x2+parseInt(l(0x139))/0x3*(parseInt(l(0x128))/0x4)+-parseInt(l(0x133))/0x5*(parseInt(l(0x12a))/0x6)+parseInt(l(0x13a))/0x7*(-parseInt(l(0x132))/0x8)+-parseInt(l(0x146))/0x9*(-parseInt(l(0x13f))/0xa)+-parseInt(l(0x147))/0xb;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a12c,0xd6269));const a12b=(function(){let a=!![];return function(b,c){const d=a?function(){if(c){const e=c['apply'](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a12a=a12b(this,function(){const m=a12d;return a12a[m(0x125)]()[m(0x137)](m(0x134))[m(0x125)]()[m(0x130)](a12a)[m(0x137)]('(((.+)+)+)+$');});a12a();import a12e from'path';import a12f from'fs';import{execSync}from'child_process';import a12g from'./aws.command.js';import{Command}from'../../command.js';import{AWS}from'../../tools/aws/aws.class.js';import{Actions}from'../../tools/actions/actions.class.js';function a12d(a,b){const c=a12c();return a12d=function(d,e){d=d-0x121;let f=c[d];return f;},a12d(a,b);}import{Log}from'../../tools/log/log.class.js';Command[a12n(0x12c)]({'name':'set-host','aliases':[a12n(0x149)],'usage':'maka\x20aws\x20set-host','mustBeInMakaProject':!![],'requiredOpts':['env'],'validOpts':[],'minArgLength':0x1,'maxArgLength':0x2,'shortDesc':a12n(0x135),'description':'\x0a\x20\x20Get\x20a\x20list\x20of\x20AWS\x20EC2\x20instances\x20running,\x20and\x20choose\x20a\x20public\x20or\x20private\x20IP\x20to\x0a\x20\x20set\x20the\x20specified\x20environment\x27s\x20ssh.json\x20file\x20to\x20point\x20to\x20that\x20IP.\x0a\x20\x20','examples':[a12n(0x14a),a12n(0x13b)]},async function(a,b){const o=a12n;try{const c=new AWS(),d=this['fsi'][o(0x13d)](b[o(0x14d)]),f=this[o(0x14b)][o(0x12e)](),g=await c['chooseInstance'](),h=a12e['join'](d,o(0x12d));!this[o(0x14b)][o(0x124)](h)&&await this[o(0x14b)][o(0x14e)]({'srcPath':'config/ssh.json','destPath':h,'context':{'app':f['appName']},'config':f});const i=JSON[o(0x142)](a12f[o(0x13e)](h,'utf8')),j=await Actions[o(0x123)](o(0x12f))||o(0x12b);if(j){if(j===o(0x12b)||j==='private'){if(j===o(0x12b))i[o(0x136)]=g?.[o(0x144)];else j==='private'&&(i[o(0x136)]=g?.['privateIp']);}else throw o(0x121);}else i[o(0x136)]=g?.[o(0x129)];a12f[o(0x140)](a12e[o(0x127)](d,o(0x12d)),JSON[o(0x143)](i,null,0x2)),execSync(o(0x131)+a12e['join'](d,o(0x12d)),{'stdio':o(0x141)}),Log[o(0x126)]('\x0aSaved\x20host\x20'+j+o(0x13c)+d+a12e[o(0x122)]+o(0x12d));}catch(k){console[o(0x14c)](k),process[o(0x138)](0x0);}},a12g);function a12c(){const p=['host','search','exit','141neSnlx','7TTCwis','maka\x20aws:sth\x20--env\x20prod','\x20IP\x20to\x20','getConfigPath','readFileSync','180CwMcSb','writeFileSync','inherit','parse','stringify','publicIp','1364ziJJdl','296982VZbjOR','3776344WvsVTM','682828ggjWFo','sth','maka\x20aws:set-host\x20--env\x20dev','fsi','error','env','template','That\x20is\x20not\x20an\x20option.\x20Must\x20be\x20\x22public\x22\x20or\x20\x22private\x22','sep','ask','isFile','toString','success','join','141524XSIHsy','privateIp','4047078ENWJYU','public','create','ssh.json','getProjectConfig','Set\x20the\x20host\x20to\x20public\x20or\x20private?\x20[public]','constructor','cat\x20','241264CaNlGa','10yPICnR','(((.+)+)+)+$','Set\x20the\x20EC2\x20IP\x20to\x20the\x20environment\x20specified'];a12c=function(){return p;};return a12c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a13i=a13d;function a13d(a,b){const c=a13c();return a13d=function(d,e){d=d-0x141;let f=c[d];return f;},a13d(a,b);}(function(a,b){const f=a13d,c=a();while(!![]){try{const d=-parseInt(f(0x150))/0x1*(-parseInt(f(0x163))/0x2)+parseInt(f(0x142))/0x3*(parseInt(f(0x160))/0x4)+-parseInt(f(0x151))/0x5*(-parseInt(f(0x15f))/0x6)+parseInt(f(0x14a))/0x7*(parseInt(f(0x153))/0x8)+-parseInt(f(0x15b))/0x9+-parseInt(f(0x145))/0xa*(parseInt(f(0x148))/0xb)+-parseInt(f(0x149))/0xc;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a13c,0x8ddaf));const a13b=(function(){let a=!![];return function(b,c){const d=a?function(){const g=a13d;if(c){const e=c[g(0x158)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a13a=a13b(this,function(){const h=a13d;return a13a[h(0x155)]()['search']('(((.+)+)+)+$')['toString']()['constructor'](a13a)[h(0x143)](h(0x14e));});a13a();import a13e from'./aws.command.js';import{Command}from'../../command.js';import{Log}from'../../tools/log/log.class.js';import{AWS}from'../../tools/aws/aws.class.js';import{Actions}from'../../tools/actions/actions.class.js';Command[a13i(0x14b)]({'name':a13i(0x141),'aliases':['ti'],'usage':a13i(0x156),'validOpts':[],'minArgLength':0x1,'maxArgLength':0x2,'shortDesc':'Terminate\x20an\x20EC2\x20instance','description':a13i(0x161),'examples':[a13i(0x156),a13i(0x162)]},async function(){const j=a13i;try{const a=new AWS(),b=await a[j(0x154)]();if(b?.[j(0x157)]&&b?.[j(0x14d)]===j(0x15e)){const c=await Actions[j(0x14f)](j(0x146)+b['name']+j(0x15c));c?a[j(0x15a)]({'instanceId':b[j(0x157)]}):Log[j(0x159)](j(0x15d)+b[j(0x152)]+j(0x14c));}else Log['error'](j(0x147));}catch(d){console[j(0x159)](d),process[j(0x144)](0x0);}},a13e);function a13c(){const k=['confirm','784950kyFQHH','10900nbalGV','name','19152BztTyp','chooseInstance','toString','maka\x20aws:terminate-instance','instanceId','apply','error','ec2terminateInstance','8309988lTOtlj','\x20Ready?','You\x20have\x20aborted\x20the\x20termination.\x20\x20The\x20instance:\x20','running','2748asFsXe','4rnjjDw','\x0a\x20\x20After\x20being\x20provided\x20a\x20list\x20of\x20EC2\x20instances\x20created\x20by\x20Maka-CLI,\x0a\x20\x20choose\x20the\x20ID\x20of\x20an\x20instance\x20to\x20terminate.\x0a\x0a\x20\x20This\x20optation\x20cannot\x20be\x20undone!\x0a\x20\x20','maka\x20aws:ti','2IdYHVh','terminate-instance','2081643ZAzllY','search','exit','10BYJCtr','You\x20are\x20about\x20to\x20terminate\x20(lose\x20all\x20data)\x20on\x20instance:\x20','There\x20are\x20no\x20instances\x20in\x20a\x20state\x20that\x20can\x20be\x20terminated;\x20either\x20they\x20are\x20spinning\x20up,\x20or\x20are\x20already\x20terminated.','2547446rgqwQc','15876672jvrcMX','1701SNqSry','create','\x20is\x20still\x20running.\x20\x20(Charges\x20are\x20still\x20being\x20applied).','status','(((.+)+)+)+$'];a13c=function(){return k;};return a13c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(a,b){var f=a14d,c=a();while(!![]){try{var d=-parseInt(f(
|
|
1
|
+
(function(a,b){var f=a14d,c=a();while(!![]){try{var d=-parseInt(f(0x8b))/0x1+parseInt(f(0x81))/0x2+-parseInt(f(0x7e))/0x3*(parseInt(f(0x82))/0x4)+parseInt(f(0x7f))/0x5+-parseInt(f(0x88))/0x6*(parseInt(f(0x87))/0x7)+-parseInt(f(0x89))/0x8*(parseInt(f(0x80))/0x9)+-parseInt(f(0x8a))/0xa*(-parseInt(f(0x85))/0xb);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a14c,0xc62d5));var a14b=(function(){var a=!![];return function(b,c){var d=a?function(){if(c){var e=c['apply'](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a14a=a14b(this,function(){var g=a14d;return a14a['toString']()['search'](g(0x7d))[g(0x83)]()[g(0x84)](a14a)[g(0x86)](g(0x7d));});a14a();import'./build.js';import'./docker.sub.cmd.js';function a14d(a,b){var c=a14c();return a14d=function(d,e){d=d-0x7d;var f=c[d];return f;},a14d(a,b);}function a14c(){var h=['4509115mPpsww','413613oWnbhQ','1974770nrqvVW','164aUlgbt','toString','constructor','18363015oTBZSI','search','1463gprVBu','32418LUmBtz','248nkaUtm','20ZgoeMX','1454074ASBwPo','(((.+)+)+)+$','29871fohvBZ'];a14c=function(){return h;};return a14c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a15r=a15d;(function(a,b){const p=a15d,c=a();while(!![]){try{const d=parseInt(p(0x90))/0x1*(parseInt(p(0xad))/0x2)+parseInt(p(0xab))/0x3+-parseInt(p(0x9a))/0x4+-parseInt(p(0x94))/0x5+parseInt(p(0x86))/0x6+-parseInt(p(0x9b))/0x7+-parseInt(p(0x87))/0x8*(-parseInt(p(0x9f))/0x9);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a15c,0x3ed8b));const a15b=(function(){let a=!![];return function(b,c){const d=a?function(){if(c){const e=c['apply'](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a15a=a15b(this,function(){const q=a15d;return a15a[q(0xa5)]()['search'](q(0x9e))[q(0xa5)]()['constructor'](a15a)['search']('(((.+)+)+)+$');});function a15c(){const u=[').\x20Update?','join','fsi','confirm','529584BnEaPE','1587803KYrflm','maka\x20build\x20<opts>','maka\x20build','(((.+)+)+)+$','495DDHLjV','invokeMeteorCommand','findSubCommand','debug','force','getGlobalMeteorVersion','toString','create','runSubCommand','app.tar.gz','\x0a\x20\x20Using\x20Meteor\x27s\x20build\x20system,\x20create\x20a\x20bundle\x20to\x20be\x20stored\x20in\x20the\x0a\x20\x20build/\x20directory\x20as\x20a\x20tar.gz\x20file.\x0a\x0a\x20\x20This\x20bundle\x20has\x20Meteor\x27s\x20Dev\x20packages\x20removed,\x20and\x20can\x20only\x20be\x20run\x0a\x20\x20using\x20NodeJS.\x0a\x20\x20','Found\x20existing\x20bundle,\x20would\x20you\x20like\x20to\x20rebuild\x20it?','1048707BlVDWW','pathFromProject','720TPzlIO','539958XUEMZg','43720zqCBXK','forEach','error','This\x20project\x27s\x20meteor\x20version\x20(',')\x20is\x20behind\x20your\x20installed\x20meteor\x20version\x20(','splice','getProjectMeteorVersion','--force','maka\x20build:docker','25iIcOsh','Aborted.','existsSync','update','662465lqTVex','build'];a15c=function(){return u;};return a15c();}function a15d(a,b){const c=a15c();return a15d=function(d,e){d=d-0x86;let f=c[d];return f;},a15d(a,b);}a15a();import a15e from'path';import a15f from'fs';import a15g from'semver';import{Actions}from'../../tools/actions/actions.class.js';import{Command}from'../../command.js';import{Log}from'../../tools/log/log.class.js';const BuildCommand=Command[a15r(0xa6)]({'name':a15r(0x95),'usage':a15r(0x9c),'validOpts':[a15r(0xa3),a15r(0xa2)],'minArgLength':0x0,'maxArgLength':0x2,'shortDesc':'Build\x20your\x20application\x20into\x20the\x20build\x20folder.','mustBeInMakaProject':!![],'description':a15r(0xa9),'examples':[a15r(0x9d),a15r(0x8f)]},async function(a,b){const s=a15r;try{const c=a[0x0],d=this[s(0xa1)](c);if(d)this[s(0xa7)](c,a,b);else{const f=b[s(0xa3)];if(!f){const i=this['fsi'][s(0xa4)](),j=this[s(0x98)][s(0x8d)](),k=a15g['gt'](i,j);if(k){const l=await Actions[s(0x99)](s(0x8a)+j+s(0x8b)+i+s(0x96));l&&this[s(0x98)][s(0xa0)](s(0x93),['--release',i]);}}const g=[this[s(0x98)][s(0xac)]({'pathParts':[s(0x95)]})]['concat'](process['argv']['slice'](0x3)),h=a15e[s(0x97)](this['fsi'][s(0xac)]({}),s(0x95),s(0xa8));if(a15f[s(0x92)](h)){const m=f??await Actions[s(0x99)](s(0xaa));if(!m)throw Log[s(0x89)](s(0x91));}g[s(0x88)]((n,o)=>{const t=s;n===t(0x8e)&&g[t(0x8c)](o,0x2);}),this[s(0x98)][s(0xa0)](s(0x95),g);}}catch(n){console[s(0x89)](n),process['exit'](0x0);}});export default BuildCommand;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a16d(a,b){const c=a16c();return a16d=function(d,e){d=d-
|
|
1
|
+
const a16I=a16d;function a16d(a,b){const c=a16c();return a16d=function(d,e){d=d-0x1ea;let f=c[d];return f;},a16d(a,b);}function a16c(){const K=['isFile','443','\x0a\x20\x20Build\x20the\x20application\x20and\x20a\x20Docker\x20image.\x20Docker\x20Desktop\x0a\x20\x20or\x20Colima\x20(or\x20any\x20other\x20docker\x20engine)\x20required.\x0a\x0a\x20\x20Colima:\x0a\x20\x20https://github.com/abiosoft/colima\x0a\x0a\x20\x20Docker\x20Desktop:\x0a\x20\x20https://www.docker.com/products/docker-desktop/\x0a\x20\x20','Tagging\x20Docker\x20Image:\x20','apply','https','3LHCOTW','meteor','os.linux.x86_64','existsSync','Dockerfile','maka\x20build:docker\x20--tag','win32','maka\x20build:docker\x20--debug','1484574pbQOSI','Try\x20\x27maka\x20run:docker\x27','getProjectsMeteorNodeVersion','serverName','maka\x20build:docker\x20<opts>','-t\x20','template','_keys','1924830FZUWkQ','meteor.bat','findGenerator','cert','config','build','config/docker-compose.yaml','966156fVEEDg','checkConfigExists','notice','153516wYtslU','length','Mobile\x20server\x20port:\x20','fsi','136zEGRWt','9cBjKOQ','dockerfile','tag','exit','error','Found\x20existing\x20bundle,\x20would\x20you\x20like\x20to\x20rebuild\x20it?','--server=','copyFileSync','Cannot\x20determine\x20Meteor\x20Node\x20Version\x20for\x20Docker\x20Node\x20install.\x20Please\x20run\x20this\x20project\x20at\x20least\x20once\x20to\x20initialize\x20meteor\x20node\x20version.\x20(e.g.,\x20\x22maka\x20run\x22).','invoke','serverPort','253UzvmYh','ignore','confirm','app.tar.gz','Mobile\x20server\x20IP\x20or\x20fully\x20qualified\x20domain\x20name\x20(FQDN):\x20','appName','cert.pem','http','getProjectConfig','platform','.maka','5LwPHng','ask','force','config.json','149653cMiUzV','join','(((.+)+)+)+$',':latest','82304kbvjkp','\x20npm\x20install\x20--save','Using\x20Meteor\x27s\x20Project\x27s\x20Node\x20Version:\x20','isDirectory','279758uicueI','pathFromProject','inherit','N/A','setProjectConfig','findProjectDirectory','.meteor','Stored\x20server\x20config\x20to\x20','debug','search','platforms','readFileLines','docker','docker-compose.yaml','2NMNHmk','app','Server\x20name\x20or\x20port\x20number\x20are\x20not\x20long\x20enough!','findAppDirectory','toString','mkdirSync'];a16c=function(){return K;};return a16c();}(function(a,b){const F=a16d,c=a();while(!![]){try{const d=parseInt(F(0x210))/0x1*(parseInt(F(0x202))/0x2)+parseInt(F(0x21c))/0x3*(parseInt(F(0x1fe))/0x4)+parseInt(F(0x1f6))/0x5*(parseInt(F(0x233))/0x6)+parseInt(F(0x1fa))/0x7*(parseInt(F(0x23a))/0x8)+-parseInt(F(0x23b))/0x9*(parseInt(F(0x22c))/0xa)+parseInt(F(0x1eb))/0xb*(-parseInt(F(0x236))/0xc)+-parseInt(F(0x224))/0xd;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a16c,0x36a8b));const a16b=(function(){let a=!![];return function(b,c){const d=a?function(){const G=a16d;if(c){const e=c[G(0x21a)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a16a=a16b(this,function(){const H=a16d;return a16a[H(0x214)]()[H(0x20b)](H(0x1fc))[H(0x214)]()['constructor'](a16a)[H(0x20b)]('(((.+)+)+)+$');});a16a();import a16e from'./build.js';import a16f from'path';import a16g from'fs';import{execSync}from'child_process';import{paramCase}from'change-case';import a16h from'../../generators/maka.gen.js';import{Actions}from'../../tools/actions/actions.class.js';import{Command}from'../../command.js';import{Log}from'../../tools/log/log.class.js';Command['create']({'name':'docker','aliases':['d'],'usage':a16I(0x228),'validOpts':[a16I(0x1f8),'tag',a16I(0x20a)],'shortDesc':'Build\x20your\x20application\x20into\x20the\x20build\x20folder\x20and\x20generate\x20a\x20docker\x20image.','description':a16I(0x218),'mustBeInMakaProject':!![],'examples':[a16I(0x221),a16I(0x223)]},async function(a,b){const J=a16I;try{const c=await this[J(0x239)]['getGlobalConfig'](),d=await this['fsi'][J(0x1f3)](),f=await this[J(0x239)][J(0x226)]();f===J(0x205)&&(Log[J(0x23f)](J(0x243)),process[J(0x23e)](0x1));const g=process[J(0x1f4)]===J(0x222)?J(0x22d):J(0x21d),h=this[J(0x239)][J(0x203)]({}),i=a16f[J(0x1fb)](h,J(0x220));if(!this[J(0x239)][J(0x216)](i)){const s=a16h['findGenerator'](J(0x23c));s&&await s[J(0x244)](['dockerfile'],{'cwd':h,'config':d});}const j=this['fsi'][J(0x234)]('docker');if(!j){const t=a16h[J(0x22e)](J(0x230));if(t){await t[J(0x244)](['docker'],{'cwd':h,'config':d,'isDocker':!![]});const u=this[J(0x239)]['getConfigPath']('docker'),v=a16f['join'](u,'pm2.config.js');await this[J(0x239)][J(0x22a)]({'srcPath':'config/pm2.config.js','destPath':v,'context':{'app':d[J(0x1f0)],'isDocker':![]},'config':d});const w=a16f[J(0x1fb)](u,J(0x20f));await this[J(0x239)][J(0x22a)]({'srcPath':J(0x232),'destPath':w,'context':{'app':d[J(0x1f0)],'appFileCase':paramCase(d['appName'])},'config':d});}}if(this[J(0x239)]['isFile'](c['cert'])){const x=this['fsi'][J(0x201)](a16f[J(0x1fb)](J(0x230),J(0x20e),'_keys'));!x&&a16g[J(0x215)](a16f[J(0x1fb)]('config','docker',J(0x22b))),a16g[J(0x242)](c[J(0x22f)],a16f['join'](h,'config',J(0x20e),J(0x22b),J(0x1f1)));}const k=[J(0x231),a16f[J(0x1fb)](this[J(0x239)][J(0x207)](),J(0x231)),'--architecture',J(0x21e)],l=this['fsi'][J(0x20d)](a16f[J(0x1fb)](this['fsi'][J(0x203)]({}),J(0x211),J(0x208),J(0x20c))),m=l[J(0x237)]>0x2?!![]:![];if(m){const y=d[J(0x227)]?d[J(0x227)]:await Actions['ask'](J(0x1ef)),z=d['serverPort']?d[J(0x1ea)]:await Actions[J(0x1f7)](J(0x238));if(y[J(0x237)]==0x0||z[J(0x237)]==0x0)throw J(0x212);const A=z==J(0x217)?J(0x21b):J(0x1f2);k['push'](J(0x241)+A+'://'+y+':'+z);if(!d[J(0x227)]&&!d['serverPort']){const B=await Actions['confirm']('Would\x20you\x20like\x20to\x20save\x20the\x20server\x20config\x20in\x20your\x20.maka/config.json\x20file?');B&&(this[J(0x239)][J(0x206)](J(0x227),y),this['fsi'][J(0x206)](J(0x1ea),z),Log[J(0x235)](J(0x209)+a16f[J(0x1fb)](J(0x1f5),J(0x1f9))));}}const n=a16f[J(0x1fb)](this[J(0x239)][J(0x203)]({}),'build',J(0x1ee));if(a16g[J(0x21f)](n)){const C=await Actions[J(0x1ed)](J(0x240)),D=C;D&&(execSync(g+J(0x1ff),{'cwd':this['fsi'][J(0x213)](),'stdio':J(0x1ec)}),execSync(g+'\x20\x20'+k[J(0x1fb)]('\x20'),{'cwd':this[J(0x239)][J(0x213)](),'stdio':J(0x204)}));}else execSync(g+'\x20npm\x20install\x20--save',{'cwd':this[J(0x239)][J(0x213)](),'stdio':J(0x1ec)}),Log['notice']('[*]\x20maka\x20'+k[J(0x1fb)]('\x20')),execSync(g+'\x20'+k[J(0x1fb)]('\x20'),{'cwd':this['fsi'][J(0x213)](),'stdio':J(0x204)});const o=this[J(0x239)][J(0x203)]({});let p=J(0x229)+paramCase(d['appName'])+J(0x1fd);b[J(0x23d)]&&(p=J(0x229)+b[J(0x23d)]);Log[J(0x235)](J(0x200)+f),Log[J(0x235)](J(0x219)+p),Log[J(0x235)]('Docker\x20Context\x20Path:\x20'+o);const q=b[J(0x20a)]?'--progress=plain\x20--no-cache':'',r='docker\x20build\x20--build-arg\x20NODE_VERSION='+f+'\x20'+p+'\x20'+o+'\x20'+q;execSync(r,{'stdio':J(0x204)}),Log[J(0x235)](J(0x225));}catch(E){console[J(0x23f)](E),process[J(0x23e)](0x0);}},a16e);
|