@maka/maka-cli 4.0.88 → 4.1.0

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.
Files changed (103) hide show
  1. package/dist/command.js +1 -1
  2. package/dist/commands/_index.js +1 -1
  3. package/dist/commands/aws/_index.js +1 -1
  4. package/dist/commands/aws/aws.command.js +1 -1
  5. package/dist/commands/aws/ci.sub.cmd.js +1 -1
  6. package/dist/commands/aws/ckp.sub.cmd.js +1 -1
  7. package/dist/commands/aws/csg.sub.cmd.js +1 -1
  8. package/dist/commands/aws/di.sub.cmd.js +1 -1
  9. package/dist/commands/aws/dks.sub.cmd.js +1 -1
  10. package/dist/commands/aws/rbi.sub.cmd.js +1 -1
  11. package/dist/commands/aws/sth.sub.cmd.js +1 -1
  12. package/dist/commands/aws/ti.sub.cmd.js +1 -1
  13. package/dist/commands/build/_index.js +1 -1
  14. package/dist/commands/build/build.js +1 -1
  15. package/dist/commands/build/docker.sub.cmd.js +1 -1
  16. package/dist/commands/create.js +1 -1
  17. package/dist/commands/debug.js +1 -1
  18. package/dist/commands/deploy.js +1 -1
  19. package/dist/commands/game/_index.js +1 -1
  20. package/dist/commands/game/battleship.sub.cmd.js +1 -1
  21. package/dist/commands/game/play.command.js +1 -1
  22. package/dist/commands/game/pong.sub.cmd.js +1 -1
  23. package/dist/commands/game/snake.sub.cmd.js +1 -1
  24. package/dist/commands/game/tetris.sub.cmd.js +1 -1
  25. package/dist/commands/generate.js +1 -1
  26. package/dist/commands/get/_index.js +1 -1
  27. package/dist/commands/get/get.command.js +1 -1
  28. package/dist/commands/get/global.sub.cmd.js +1 -1
  29. package/dist/commands/get/local.sub.cmd.js +1 -1
  30. package/dist/commands/help.js +1 -1
  31. package/dist/commands/install.js +1 -1
  32. package/dist/commands/jsdoc.js +1 -1
  33. package/dist/commands/login.js +1 -1
  34. package/dist/commands/logout.js +1 -1
  35. package/dist/commands/logs.js +1 -1
  36. package/dist/commands/maka.cmd.js +1 -1
  37. package/dist/commands/murder.js +1 -1
  38. package/dist/commands/reconfig.js +1 -1
  39. package/dist/commands/run.js +1 -1
  40. package/dist/commands/set/_index.js +1 -1
  41. package/dist/commands/set/global.sub.cmd.js +1 -1
  42. package/dist/commands/set/local.sub.cmd.js +1 -1
  43. package/dist/commands/set/set.command.js +1 -1
  44. package/dist/commands/ssh.js +1 -1
  45. package/dist/commands/ssl.js +1 -1
  46. package/dist/commands/test.js +1 -1
  47. package/dist/commands/version.js +1 -1
  48. package/dist/error.js +1 -1
  49. package/dist/generator.js +1 -1
  50. package/dist/generators/_index.js +1 -1
  51. package/dist/generators/api.js +1 -1
  52. package/dist/generators/collection.js +1 -1
  53. package/dist/generators/component.js +1 -1
  54. package/dist/generators/config.js +1 -1
  55. package/dist/generators/dbc.js +1 -1
  56. package/dist/generators/dockerfile.js +1 -1
  57. package/dist/generators/hook.js +1 -1
  58. package/dist/generators/kit.js +1 -1
  59. package/dist/generators/layout.js +1 -1
  60. package/dist/generators/maka.gen.js +1 -1
  61. package/dist/generators/methods.js +1 -1
  62. package/dist/generators/package.js +1 -1
  63. package/dist/generators/page.js +1 -1
  64. package/dist/generators/publish.js +1 -1
  65. package/dist/generators/route.js +1 -1
  66. package/dist/generators/scaffold.js +1 -1
  67. package/dist/generators/service.js +1 -1
  68. package/dist/generators/services/_index.js +1 -0
  69. package/dist/generators/services/translation.js +1 -0
  70. package/dist/maka.js +1 -1
  71. package/dist/templates/meteor/app/imports/startup/client/index.js.jsx +2 -1
  72. package/dist/templates/meteor/app/imports/startup/client/index.js.tsx +2 -1
  73. package/dist/templates/meteor/app/imports/startup/lib/index.js.jsx +1 -0
  74. package/dist/templates/meteor/app/imports/startup/lib/index.js.tsx +1 -0
  75. package/dist/templates/react/component/component.js.jsx +7 -4
  76. package/dist/templates/react/component/component.js.tsx +8 -5
  77. package/dist/templates/react/hook/hook.js.jsx +6 -3
  78. package/dist/templates/react/hook/hook.js.tsx +5 -3
  79. package/dist/templates/service/i18n/i18n.js +33 -0
  80. package/dist/templates/service/i18n/i18n.js.ts +33 -0
  81. package/dist/templates/service/i18n/index.js +0 -0
  82. package/dist/templates/service/i18n/index.js.jsx +0 -0
  83. package/dist/templates/service/i18n/locales.js +3 -0
  84. package/dist/templates/service/i18n/locales.js.ts +3 -0
  85. package/dist/tool.js +1 -1
  86. package/dist/tools/actions/actions.class.js +1 -1
  87. package/dist/tools/actions/actions.test.js +1 -1
  88. package/dist/tools/aws/aws.class.js +1 -1
  89. package/dist/tools/aws/aws.interfaces.js +1 -1
  90. package/dist/tools/docker/docker.class.js +1 -1
  91. package/dist/tools/docker/docker.interfaces.js +1 -1
  92. package/dist/tools/fsi/fsi.class.js +1 -1
  93. package/dist/tools/fsi/fsi.interfaces.js +1 -1
  94. package/dist/tools/https/https.class.js +1 -1
  95. package/dist/tools/https/https.interface.js +1 -1
  96. package/dist/tools/log/log.class.js +1 -1
  97. package/dist/tools/log/log.interfaces.js +1 -1
  98. package/dist/tools/spawn-async/spawn-async.class.js +1 -1
  99. package/dist/tools/spawn-async/spawn-async.interfaces.js +1 -1
  100. package/dist/tools/ssh/ssh.class.js +1 -1
  101. package/dist/tools/ssh/ssh.interfaces.js +1 -1
  102. package/dist/tools/ssl/ssl.class.js +1 -1
  103. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ function a68d(a,b){const c=a68c();return a68d=function(d,e){d=d-0x185;let f=c[d];return f;},a68d(a,b);}const a68G=a68d;(function(a,b){const E=a68d,c=a();while(!![]){try{const d=parseInt(E(0x1c2))/0x1+-parseInt(E(0x19b))/0x2+parseInt(E(0x1b4))/0x3*(-parseInt(E(0x197))/0x4)+parseInt(E(0x198))/0x5+-parseInt(E(0x195))/0x6+-parseInt(E(0x18b))/0x7+parseInt(E(0x1b8))/0x8;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a68c,0x40ae3));const a68b=(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;};}()),a68a=a68b(this,function(){const F=a68d;return a68a[F(0x1c4)]()[F(0x1b6)]('(((.+)+)+)+$')[F(0x1c4)]()[F(0x1ab)](a68a)[F(0x1b6)](F(0x1a6));});a68a();import{Generator}from'../../generator.js';function a68c(){const J=['lang','installNpmPackage','template','i18n/i18n.js','(((.+)+)+)+$','lib','fsi','i18next\x20i18next-browser-languagedetector\x20react-i18next','yzIFn','constructor','features.withTranslations','ssr','startup','injectAtBeginningOfFile','import\x20\x27../lib/services/translations/i18n\x27;\x0a','Generate\x20a\x20new\x20locale\x20translation','XposS','hzsVk','1115295govSIM','i18n.js','search','engines','9352000jhQSSj','warn','i18n/index.js','error','maka\x20{generate,\x20g}:translation\x20--lang=<language>','findProjectDirectory','default\x20as\x20','isFile','sVIeB','client','514248fmcOPb','grep','toString','maka\x20g:translation\x20--lang=de','index.js','findAppDirectory','service','.js','pathFromApp','OdyWK','server','2110206lNzSoe','rewriteDestinationPathForEngine','i18next','setProjectConfig','root','locales','maka\x20g:translation\x20--lang=fr','appName','injectAtEndOfFile','import\x20\x27../lib/services/translations/i18n\x27;','1959294aKbPkJ','export\x20{\x20default\x20as\x20','4nlCkLe','103890PeczGB','exit','true','878646hTKGUH','translations','imports','readFileSync','services','i18n/locales.js','withValue'];a68c=function(){return J;};return a68c();}import{Log}from'../../tools/log/log.class.js';import a68u from'fs';Generator['create']({'name':'translation','usage':a68G(0x1bc),'description':a68G(0x1b1),'noResource':!![],'examples':['maka\x20g:translation\x20--lang=en\x20(default)',a68G(0x191),a68G(0x1c5)]},function(a,b){const H=a68G;try{const c=this[H(0x1a8)]['getProjectConfig'](),d=this['fsi']['getGlobalConfig'](),f=this[H(0x1a8)][H(0x1bd)](),g=this[H(0x1a8)][H(0x185)]();this['fsi'][H(0x1a1)](c,()=>{const I=H;try{!b[I(0x1a2)]&&(b[I(0x1a2)]='en');if(!b[I(0x18f)]&&!this[I(0x1a8)]['checkNpmPackage'](I(0x18d))){if(I(0x189)===I(0x1aa)){!e&&this[I(0x1a8)][I(0x1af)]({'filePath':i,'content':I(0x1b0)});const v=this[I(0x1a8)][I(0x188)]({'pathParts':[I(0x19d),I(0x1ae),'server',I(0x1c6)]}),w=this[I(0x1a8)][I(0x18c)]({'pathParts':[v],'config':g}),x=this[I(0x1a8)][I(0x1c3)](h[I(0x19e)](w)[I(0x1c4)](),'import\x20\x27../lib/services/translations/i18n\x27;')[0x0]&&!![];!x&&this[I(0x1a8)]['injectAtBeginningOfFile']({'filePath':w,'content':I(0x1b0)});}else Log[I(0x1b9)]('Verifying\x20npm\x20package\x20requirements:\x20i18next\x20...'),this[I(0x1a8)][I(0x1a3)](I(0x1a9),{'cwd':g}),this[I(0x1a8)][I(0x18e)](I(0x1ac),!![]);}const h=this[I(0x1a8)][I(0x188)]({'pathParts':[I(0x19d),'startup',I(0x1c1),I(0x1c6)]}),i=this[I(0x1a8)][I(0x18c)]({'pathParts':[h],'config':c}),j=this[I(0x1a8)][I(0x1c3)](a68u[I(0x19e)](i)[I(0x1c4)](),I(0x194))[0x0]&&!![];if(c['engines'][I(0x1ad)]===I(0x19a)){!j&&('HlqZo'!=='HlqZo'?this[I(0x1a8)][I(0x1a4)]({'srcPath':I(0x1ba),'destPath':d,'framework':'service','context':e,'config':f}):this[I(0x1a8)][I(0x1af)]({'filePath':i,'content':'import\x20\x27../lib/services/translations/i18n\x27;\x0a'}));const v=this[I(0x1a8)][I(0x188)]({'pathParts':[I(0x19d),I(0x1ae),I(0x18a),I(0x1c6)]}),w=this[I(0x1a8)]['rewriteDestinationPathForEngine']({'pathParts':[v],'config':c}),x=this[I(0x1a8)][I(0x1c3)](a68u['readFileSync'](w)[I(0x1c4)](),I(0x194))[0x0]&&!![];!x&&this[I(0x1a8)]['injectAtBeginningOfFile']({'filePath':w,'content':I(0x1b0)});}else{if('LfdRp'==='LfdRp')!j&&this[I(0x1a8)][I(0x1af)]({'filePath':i,'content':I(0x1b0)});else return c[I(0x1c4)]()[I(0x1b6)](I(0x1a6))[I(0x1c4)]()['constructor'](d)[I(0x1b6)]('(((.+)+)+)+$');}let k={'app':d[I(0x192)],'config':c};const l=this[I(0x1a8)]['pathFromApp']({'pathParts':[I(0x19d),I(0x1ae),I(0x1a7),I(0x19f),I(0x19c),I(0x1b5)]}),m=this[I(0x1a8)][I(0x1bf)](this[I(0x1a8)]['rewriteDestinationPathForEngine']({'pathParts':[l],'config':c}));!m&&('Gncdf'===I(0x1b2)?this[I(0x1a8)][I(0x1a4)]({'srcPath':I(0x1a0),'destPath':d,'framework':I(0x186),'context':e,'config':f}):this[I(0x1a8)][I(0x1a4)]({'srcPath':I(0x1a5),'destPath':l,'framework':I(0x186),'context':k,'config':c}));const n=this[I(0x1a8)]['pathFromApp']({'pathParts':[I(0x19d),I(0x1ae),I(0x1a7),I(0x19f),I(0x19c),I(0x190),b[I(0x1a2)]+I(0x187)]}),o=this[I(0x1a8)][I(0x18c)]({'pathParts':[n],'config':c}),p=this[I(0x1a8)][I(0x1bf)](o);!p?'Zkrbz'!=='Zkrbz'?!c&&this[I(0x1a8)]['injectAtBeginningOfFile']({'filePath':e,'content':I(0x1b0)}):this[I(0x1a8)][I(0x1a4)]({'srcPath':I(0x1a0),'destPath':n,'framework':I(0x186),'context':k,'config':c}):Log[I(0x1b9)]('Locale\x20already\x20defined:\x20'+o);const q=this['fsi'][I(0x188)]({'pathParts':[I(0x19d),I(0x1ae),I(0x1a7),I(0x19f),'translations',I(0x190),'index.'+c[I(0x1b7)]['js']]}),r=this['fsi'][I(0x18c)]({'pathParts':[q],'config':c}),s=this[I(0x1a8)][I(0x1bf)](r);!s&&this[I(0x1a8)][I(0x1a4)]({'srcPath':I(0x1ba),'destPath':q,'framework':I(0x186),'context':k,'config':c});const t=this[I(0x1a8)][I(0x1c3)](a68u[I(0x19e)](q)[I(0x1c4)](),I(0x1be)+b[I(0x1a2)])[0x0]&&!![];!t?this[I(0x1a8)][I(0x193)]({'filePath':q,'content':I(0x196)+b[I(0x1a2)]+'\x20}\x20from\x20\x27./'+b[I(0x1a2)]+'\x27;'}):Log[I(0x1b9)]('Locale\x20already\x20exported:\x20'+q);}catch(C){I(0x1c0)===I(0x1b3)?this[I(0x1a8)][I(0x1af)]({'filePath':b,'content':I(0x1b0)}):(Log[I(0x1bb)](C),process[I(0x199)](0x1));}});}catch(h){Log[H(0x1bb)](h),process[H(0x199)](0x1);}});
package/dist/maka.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node --experimental-modules --no-warnings --experimental-json-modules
2
- const a67C=a67d;(function(a,b){const z=a67d,c=a();while(!![]){try{const d=-parseInt(z(0x1e6))/0x1+parseInt(z(0x1e5))/0x2+parseInt(z(0x1f8))/0x3+-parseInt(z(0x1fc))/0x4*(parseInt(z(0x1e7))/0x5)+parseInt(z(0x1f0))/0x6+parseInt(z(0x1e9))/0x7*(-parseInt(z(0x1e3))/0x8)+parseInt(z(0x1f2))/0x9*(parseInt(z(0x1ed))/0xa);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a67c,0xb72c4));const a67b=(function(){let a=!![];return function(b,c){const d=a?function(){const A=a67d;if(c){const e=c[A(0x1f9)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a67a=a67b(this,function(){const B=a67d;return a67a[B(0x1ef)]()['search'](B(0x1ec))[B(0x1ef)]()['constructor'](a67a)[B(0x1ee)](B(0x1ec));});a67a();import a67u from'minimist';import a67v from'os';import a67w from'path';import a67x from'humps';import a67y from'./commands/maka.cmd.js';import'./commands/_index.js';import'./generators/_index.js';import{fileURLToPath}from'url';function a67c(){const D=['153210IEKXhg','search','toString','7425732lpgWTq','MAKA_COMMAND_PATH','135BxwArI','floor','slice','argv','--max-old-space-size=','env','834093uwmVtM','apply','stringify','camelizeKeys','172TKLtUQ','847816bOqagF','totalmem','2062466YzWmcf','434974cVOyCX','111115TNEbel','url','42ppgPZj','dirname','parse','(((.+)+)+)+$'];a67c=function(){return D;};return a67c();}const __filename=fileURLToPath(import.meta[a67C(0x1e8)]),__dirname=a67w[a67C(0x1ea)](__filename);global[a67C(0x1f1)]=__dirname;let total_memory=a67v[a67C(0x1e4)](),total_mem_in_kb=total_memory/0x400,total_mem_in_mb=total_mem_in_kb/0x400;total_mem_in_mb=Math[a67C(0x1f3)](total_mem_in_mb),process[a67C(0x1f7)]['TOOL_NODE_FLAGS']=a67C(0x1f6)+total_mem_in_mb;const argv=a67u(process[a67C(0x1f5)][a67C(0x1f4)](0x2)),args=argv['_'],deepCopyArgv=JSON[a67C(0x1eb)](JSON[a67C(0x1fa)](argv));function a67d(a,b){const c=a67c();return a67d=function(d,e){d=d-0x1e3;let f=c[d];return f;},a67d(a,b);}delete deepCopyArgv['_'];const opts=a67x[a67C(0x1fb)](deepCopyArgv);a67y['run'](args,opts);
2
+ const a69C=a69d;(function(a,b){const z=a69d,c=a();while(!![]){try{const d=-parseInt(z(0xa3))/0x1+parseInt(z(0xab))/0x2+-parseInt(z(0xa6))/0x3*(-parseInt(z(0xaf))/0x4)+-parseInt(z(0xae))/0x5+-parseInt(z(0x9a))/0x6+parseInt(z(0xb0))/0x7+parseInt(z(0x9e))/0x8;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a69c,0x780f4));const a69b=(function(){let a=!![];return function(b,c){const d=a?function(){const A=a69d;if(c){const e=c[A(0x9d)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a69a=a69b(this,function(){const B=a69d;return a69a['toString']()[B(0xad)](B(0xac))[B(0xb1)]()[B(0xa8)](a69a)['search'](B(0xac));});a69a();import a69u from'minimist';import a69v from'os';import a69w from'path';function a69d(a,b){const c=a69c();return a69d=function(d,e){d=d-0x9a;let f=c[d];return f;},a69d(a,b);}import a69x from'humps';import a69y from'./commands/maka.cmd.js';import'./commands/_index.js';import'./generators/_index.js';import{fileURLToPath}from'url';function a69c(){const D=['dirname','floor','apply','5869864KPHuXu','--max-old-space-size=','env','parse','MAKA_COMMAND_PATH','468921PWuyAu','camelizeKeys','TOOL_NODE_FLAGS','41766fClfKZ','stringify','constructor','argv','url','207380HvxhVI','(((.+)+)+)+$','search','3046505YwtzLb','92SCaiPy','5421549jDJBpO','toString','totalmem','2172900JKvyxl'];a69c=function(){return D;};return a69c();}const __filename=fileURLToPath(import.meta[a69C(0xaa)]),__dirname=a69w[a69C(0x9b)](__filename);global[a69C(0xa2)]=__dirname;let total_memory=a69v[a69C(0xb2)](),total_mem_in_kb=total_memory/0x400,total_mem_in_mb=total_mem_in_kb/0x400;total_mem_in_mb=Math[a69C(0x9c)](total_mem_in_mb),process[a69C(0xa0)][a69C(0xa5)]=a69C(0x9f)+total_mem_in_mb;const argv=a69u(process[a69C(0xa9)]['slice'](0x2)),args=argv['_'],deepCopyArgv=JSON[a69C(0xa1)](JSON[a69C(0xa7)](argv));delete deepCopyArgv['_'];const opts=a69x[a69C(0xa4)](deepCopyArgv);a69y['run'](args,opts);
@@ -40,6 +40,7 @@ import { ThemeProvider } from '@mui/material/styles';
40
40
  import { theme } from '../lib/index';<% } else { %>
41
41
  // Material UI Theme config using default mui.
42
42
  import { ThemeProvider, createTheme, responsiveFontSizes } from '@mui/material/styles';
43
+ // https://mui.com/material-ui/customization/default-theme/
43
44
  let theme = createTheme({
44
45
  typography: {
45
46
  useNextVariants: true,
@@ -71,7 +72,7 @@ const AppContainer = withTracker(props => {
71
72
 
72
73
  const startApp = () => {<% if (config.engines.ssr === 'true') { %>
73
74
  onPageLoad(sink => {
74
- ReactDOM.hydrateRoot(document.getElementById('app'), <App />);
75
+ ReactDOM.hydrateRoot(document.getElementById('app'), <AppContainer />);
75
76
  });<% } else { %>
76
77
  const root = ReactDOM.createRoot(document.getElementById('app'));
77
78
  root.render(<AppContainer />);<% } %>
@@ -41,6 +41,7 @@ import { ThemeProvider } from '@mui/material/styles';
41
41
  import { theme } from '../lib/index';<% } else { %>
42
42
  // Material UI Theme config using default mui.
43
43
  import { ThemeProvider, createTheme, responsiveFontSizes } from '@mui/material/styles';
44
+ // https://mui.com/material-ui/customization/default-theme/
44
45
  let theme = createTheme({
45
46
  typography: {
46
47
  useNextVariants: true,
@@ -72,7 +73,7 @@ const AppContainer = withTracker(props => {
72
73
 
73
74
  const startApp = () => {<% if (config.engines.ssr === 'true') { %>
74
75
  onPageLoad(sink => {
75
- ReactDOM.hydrateRoot(document.getElementById('app'), <App />);
76
+ ReactDOM.hydrateRoot(document.getElementById('app'), <AppContainer />);
76
77
  });<% } else { %>
77
78
  const root = ReactDOM.createRoot(document.getElementById('app'));
78
79
  root.render(<AppContainer />);<% } %>
@@ -1,6 +1,7 @@
1
1
  /** @namespace Common */<% if (config.engines.theme === 'material' && config.engines.ssr === 'true') { %>
2
2
  // Material UI Theme config using roboto typefont and default mui.
3
3
  import { createTheme, responsiveFontSizes } from '@mui/material/styles';
4
+ // https://mui.com/material-ui/customization/default-theme/
4
5
  let theme = createTheme({
5
6
  typography: {
6
7
  useNextVariants: true,
@@ -1,6 +1,7 @@
1
1
  /** @namespace Common */<% if (config.engines.theme === 'material' && config.engines.ssr === 'true') { %>
2
2
  // Material UI Theme config using roboto typefont and default mui.
3
3
  import { createTheme, responsiveFontSizes } from '@mui/material/styles';
4
+ // https://mui.com/material-ui/customization/default-theme/
4
5
  let theme = createTheme({
5
6
  typography: {
6
7
  useNextVariants: true,
@@ -7,8 +7,9 @@ import { gql } from '@apollo/client';
7
7
  import { graphql } from '@apollo/client/react/hoc';<% } %><% if (theme === 'material' ) { %>
8
8
  // https://material-ui.com/styles/basics/#higher-order-component-api
9
9
  import { withStyles } from '@mui/styles';
10
+ const styles = (theme) => { };<% } %><% if (withTranslations) { %>
11
+ import { withTranslation } from 'react-i18next';<% } %>
10
12
 
11
- const styles = (theme) => { };<% } %>
12
13
  class <%= className %>Component extends Component {
13
14
  /**
14
15
  * Define types for your props for stability.
@@ -46,10 +47,11 @@ class <%= className %>Component extends Component {
46
47
  /**
47
48
  * This is the main render method, and will rerun anytime either this.state or this.props is changed.
48
49
  */
49
- render() {
50
+ render() {<% if (withTranslations) { %>
51
+ const { t } = this.props;<% } %>
50
52
  return (
51
53
  <div id="<%= cssCaseName %>-component">
52
- <% if (isLayout) { %>{ this.props.children }<% } else { %><h2>Find me in <%= myPath %></h2><% } %>
54
+ <% if (isLayout) { %>{ this.props.children }<% } else if (withTranslations) { %><h2>{t('example', { page: '<%= myPath %>' } )}</h2><% } else { %><h2>Find me in <%= myPath %></h2><% } %>
53
55
  </div>
54
56
  );
55
57
  }
@@ -58,7 +60,8 @@ class <%= className %>Component extends Component {
58
60
  const <%= className %> = compose(
59
61
  withTracker(() => {}),<% if(graphql === 'apollo') { %>
60
62
  //graphql(gql`query Todos { todos }`, { variables: {/* input */} }),<% } %><% if(theme === 'material') { %>
61
- withStyles(styles),<% } %>
63
+ withStyles(styles),<% } %><% if (withTranslations) { %>
64
+ withTranslation(),<% } %>
62
65
  )(<%= className %>Component);
63
66
 
64
67
  export { <%= className %> };
@@ -7,13 +7,14 @@ import { gql } from '@apollo/client';
7
7
  import { graphql } from '@apollo/client/react/hoc';<% } %><% if (theme === 'material' ) { %>
8
8
  // https://material-ui.com/styles/basics/#higher-order-component-api
9
9
  import { withStyles } from '@mui/styles';
10
+ const styles = (theme) => { };<% } %><% if (withTranslations) { %>
11
+ import { withTranslation } from 'react-i18next';<% } %>
10
12
 
11
- const styles = (theme) => { return {} };<% } %>
12
13
  interface I<%= className %> {
13
14
  props: object;
14
15
  state: object;
15
16
  }
16
- class <%= className %>Component extends React.Component<I<%= className %>%>> {
17
+ class <%= className %>Component extends React.Component<I<%= className %>> {
17
18
  public state: object;
18
19
 
19
20
  /**
@@ -51,10 +52,11 @@ class <%= className %>Component extends React.Component<I<%= className %>%>> {
51
52
  /**
52
53
  * This is the main render method, and will rerun anytime either this.state or this.props is changed.
53
54
  */
54
- render() {
55
+ render() {<% if (withTranslations) { %>
56
+ const { t } = this.props;<% } %>
55
57
  return (
56
58
  <div id="<%= cssCaseName %>-component">
57
- <% if (isLayout) { %>{ this.props.children }<% } else { %><h2>Find me in <%= myPath %></h2><% } %>
59
+ <% if (isLayout) { %>{ this.props.children }<% } else if (withTranslations) { %><h2>{t('example', { page: '<%= myPath %>' } )}</h2><% } else { %><h2>Find me in <%= myPath %></h2><% } %>
58
60
  </div>
59
61
  );
60
62
  }
@@ -63,7 +65,8 @@ class <%= className %>Component extends React.Component<I<%= className %>%>> {
63
65
  const <%= className %> = compose(
64
66
  withTracker(() => {}),<% if(graphql === 'apollo') { %>
65
67
  //graphql(gql`query Todos { todos }`, { variables: {/* input */} }),<% } %><% if(theme === 'material') { %>
66
- withStyles(styles),<% } %>
68
+ withStyles(styles),<% } %><% if (withTranslations) { %>
69
+ withTranslation(),<% } %>
67
70
  )(<%= className %>Component);
68
71
 
69
72
  export { <%= className %> };
@@ -5,7 +5,9 @@ import { useTracker } from 'meteor/react-meteor-data';<% if(graphql === 'apollo'
5
5
  import { useQuery, gql } from '@apollo/client';<% } %><% if (theme === 'material' ) { %>
6
6
  // https://material-ui.com/styles/basics/#higher-order-component-api
7
7
  import { makeStyles } from '@mui/styles';
8
- const useStyles = makeStyles((theme) => ({}));<% } %>
8
+ const useStyles = makeStyles((theme) => ({}));<% } %><%if (withTranslations) { %>
9
+ import { useTranslation } from 'react-i18next';<% } %>
10
+
9
11
 
10
12
  function <%= className %>(props) {
11
13
  /*const { userId } = useTracker(() => {
@@ -13,11 +15,12 @@ function <%= className %>(props) {
13
15
  return { userId }
14
16
  });*/<% if(graphql === 'apollo') { %>
15
17
  //const { loading, error, data } = useQuery(gql`query Todos { todos }`, { variables: {/* input */} }); <% } %><% if (theme === 'material') { %>
16
- const classes = useStyles();<% } %>
18
+ const classes = useStyles();<% } %><% if (withTranslations) { %>
19
+ const { t } = useTranslation();<% } %>
17
20
 
18
21
  return (
19
22
  <div>
20
- <% if (isLayout) { %>{ props.children }<% } else { %><h2>Find me in <%= myPath %></h2><% } %>
23
+ <% if (isLayout) { %>{ props.children }<% } else if (withTranslations) { %><h2>{t('example', { page: '<%= myPath %>' } )}</h2><% } else { %><h2>Find me in <%= myPath %></h2><% } %>
21
24
  </div>
22
25
  );
23
26
  }
@@ -5,7 +5,8 @@ import { useTracker } from 'meteor/react-meteor-data';<% if(graphql === 'apollo'
5
5
  import { useQuery, gql } from '@apollo/client';<% } %><% if (theme === 'material' ) { %>
6
6
  // https://material-ui.com/styles/basics/#higher-order-component-api
7
7
  import { makeStyles } from '@mui/styles';
8
- const useStyles = makeStyles((theme) => ({});<% } %>
8
+ const useStyles = makeStyles((theme) => ({}));<% } %><%if (withTranslations) { %>
9
+ import { useTranslation } from 'react-i18next';<% } %>
9
10
 
10
11
  function <%= className %>(props) {
11
12
  /*const { userId } = useTracker(() => {
@@ -13,11 +14,12 @@ function <%= className %>(props) {
13
14
  return { userId }
14
15
  });*/<% if(graphql === 'apollo') { %>
15
16
  // const { loading, error, data } = useQuery(gql`query Todos { todos }`, { variables: {/* input */} }); <% } %><% if (theme === 'material') { %>
16
- const classes = useStyles();<% } %>
17
+ const classes = useStyles();<% } %><% if (withTranslations) { %>
18
+ const { t } = useTranslation();<% } %>
17
19
 
18
20
  return (
19
21
  <div>
20
- <% if (isLayout) { %>{ props.children }<% } else { %><h2>Find me in <%= myPath %></h2><% } %>
22
+ <% if (isLayout) { %>{ props.children }<% } else if (withTranslations) { %><h2>{t('example', { page: '<%= myPath %>' } )}</h2><% } else { %><h2>Find me in <%= myPath %></h2><% } %>
21
23
  </div>
22
24
  );
23
25
  }
@@ -0,0 +1,33 @@
1
+ import i18n from 'i18next';
2
+ import { initReactI18next } from 'react-i18next';
3
+ import LanguageDetector from 'i18next-browser-languagedetector';
4
+ import * as resources from './locales'
5
+
6
+ i18n
7
+ // detect user language
8
+ // learn more: https://github.com/i18next/i18next-browser-languageDetector
9
+ .use(LanguageDetector)
10
+ // pass the i18n instance to react-i18next.
11
+ .use(initReactI18next)
12
+ // init i18next
13
+ // for all options read: https://www.i18next.com/overview/configuration-options
14
+ .init({
15
+ debug: false,
16
+ fallbackLng: 'en',
17
+ interpolation: {
18
+ escapeValue: false, // not needed for react as it escapes by default
19
+ },
20
+ resources: {
21
+ ...Object.entries(resources).reduce(
22
+ (acc, [key, value]) => ({
23
+ ...acc,
24
+ [key]: {
25
+ translation: value,
26
+ },
27
+ }),
28
+ {},
29
+ ),
30
+ },
31
+ });
32
+
33
+ export default i18n;
@@ -0,0 +1,33 @@
1
+ import i18n from 'i18next';
2
+ import { initReactI18next } from 'react-i18next';
3
+ import LanguageDetector from 'i18next-browser-languagedetector';
4
+ import * as resources from './locales'
5
+
6
+ i18n
7
+ // detect user language
8
+ // learn more: https://github.com/i18next/i18next-browser-languageDetector
9
+ .use(LanguageDetector)
10
+ // pass the i18n instance to react-i18next.
11
+ .use(initReactI18next)
12
+ // init i18next
13
+ // for all options read: https://www.i18next.com/overview/configuration-options
14
+ .init({
15
+ debug: false,
16
+ fallbackLng: 'en',
17
+ interpolation: {
18
+ escapeValue: false, // not needed for react as it escapes by default
19
+ },
20
+ resources: {
21
+ ...Object.entries(resources).reduce(
22
+ (acc, [key, value]) => ({
23
+ ...acc,
24
+ [key]: {
25
+ translation: value,
26
+ },
27
+ }),
28
+ {},
29
+ ),
30
+ },
31
+ });
32
+
33
+ export default i18n;
File without changes
File without changes
@@ -0,0 +1,3 @@
1
+ export default {
2
+ example: 'Find me in {{page}}'
3
+ }
@@ -0,0 +1,3 @@
1
+ export default {
2
+ example: 'Find me in {{page}}'
3
+ }
package/dist/tool.js CHANGED
@@ -1 +1 @@
1
- function a68d(a,b){var c=a68c();return a68d=function(d,e){d=d-0x82;var f=c[d];return f;},a68d(a,b);}(function(a,b){var u=a68d,c=a();while(!![]){try{var d=parseInt(u(0x87))/0x1+parseInt(u(0x90))/0x2*(-parseInt(u(0x89))/0x3)+-parseInt(u(0x8a))/0x4*(-parseInt(u(0x8e))/0x5)+-parseInt(u(0x8c))/0x6*(-parseInt(u(0x8b))/0x7)+parseInt(u(0x86))/0x8+parseInt(u(0x91))/0x9+-parseInt(u(0x8d))/0xa;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a68c,0x8c802));var a68b=(function(){var a=!![];return function(b,c){var d=a?function(){var v=a68d;if(c){var e=c[v(0x85)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a68a=a68b(this,function(){var w=a68d;return a68a[w(0x92)]()[w(0x8f)]('(((.+)+)+)+$')[w(0x92)]()[w(0x88)](a68a)[w(0x8f)](w(0x82));});a68a();import{Docker}from'./tools/docker/docker.class.js';function a68c(){var y=['760nAoPpv','search','98IFKxLZ','4183362OolZRM','toString','(((.+)+)+)+$','docker','fsi','apply','9205840ZePTIV','977671QRtZIU','constructor','5208lZYJsx','23708BMCHDZ','700nYLMnR','2832UFHJvG','28807690lVeIMr'];a68c=function(){return y;};return a68c();}import{FSI}from'./tools/fsi/fsi.class.js';export class Tool{constructor(){var x=a68d;this[x(0x83)]=new Docker(),this[x(0x84)]=new FSI();}}
1
+ (function(a,b){var u=a70d,c=a();while(!![]){try{var d=parseInt(u(0x8e))/0x1*(parseInt(u(0x91))/0x2)+parseInt(u(0x8c))/0x3+parseInt(u(0x84))/0x4*(parseInt(u(0x8f))/0x5)+-parseInt(u(0x94))/0x6*(parseInt(u(0x90))/0x7)+-parseInt(u(0x8b))/0x8*(-parseInt(u(0x86))/0x9)+-parseInt(u(0x96))/0xa*(-parseInt(u(0x92))/0xb)+parseInt(u(0x87))/0xc*(-parseInt(u(0x97))/0xd);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a70c,0xbc80c));var a70b=(function(){var a=!![];return function(b,c){var d=a?function(){var v=a70d;if(v(0x95)!=='rARlW'){if(c){if('LnIBb'!=='LnIBb'){var h=d[v(0x88)](e,arguments);return f=null,h;}else{var e=c['apply'](b,arguments);return c=null,e;}}}else return c[v(0x89)]()[v(0x85)](v(0x8a))['toString']()[v(0x8d)](d)[v(0x85)](v(0x8a));}:function(){};return a=![],d;};}()),a70a=a70b(this,function(){var w=a70d;return a70a['toString']()['search'](w(0x8a))[w(0x89)]()[w(0x8d)](a70a)[w(0x85)]('(((.+)+)+)+$');});a70a();import{Docker}from'./tools/docker/docker.class.js';import{FSI}from'./tools/fsi/fsi.class.js';function a70d(a,b){var c=a70c();return a70d=function(d,e){d=d-0x84;var f=c[d];return f;},a70d(a,b);}function a70c(){var y=['13AnnjRa','118472LYOGNC','search','18ybZVEW','24334332FLRRNY','apply','toString','(((.+)+)+)+$','6151504MagfKH','1937940KhRFPA','constructor','1fwwuqk','125VyeiqA','35asGnFb','185254uXLvJV','42097bNrKoN','fsi','779298kkScza','iMrLg','1130JgADOG'];a70c=function(){return y;};return a70c();}export class Tool{constructor(){var x=a70d;this['docker']=new Docker(),this[x(0x93)]=new FSI();}}
@@ -1 +1 @@
1
- const a69D=a69d;(function(a,b){const v=a69d,c=a();while(!![]){try{const d=-parseInt(v(0x1de))/0x1*(parseInt(v(0x1cd))/0x2)+-parseInt(v(0x1c3))/0x3*(-parseInt(v(0x1c4))/0x4)+-parseInt(v(0x1d2))/0x5*(parseInt(v(0x1ca))/0x6)+-parseInt(v(0x1d4))/0x7*(-parseInt(v(0x1e4))/0x8)+-parseInt(v(0x1c7))/0x9+parseInt(v(0x1c6))/0xa*(parseInt(v(0x1e3))/0xb)+parseInt(v(0x1c5))/0xc;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a69c,0xaee95));function a69c(){const H=['TBvZk','answer','constructor','then','value','hwmLQ','OPnCN','HWHmv','throw','1rzXLBn','GQmBm','next','mXQxI','password','429605icnVMu','32nDbaHc','6141UEePsT','20KNZOjn','15464268HuesFD','230JfqJFe','4386654nrwSQQ','confirm','search','12KbOSeu','prompt','toString','2096504uUrOjj','bXMSw','ask','apply','done','368975iWfTYg','(((.+)+)+)+$','354368UGJjdg'];a69c=function(){return H;};return a69c();}const a69b=(function(){let a=!![];return function(b,c){const d=a?function(){const w=a69d;if(w(0x1d5)==='TBvZk'){if(c){if(w(0x1dc)!==w(0x1dc))c(d);else{const f=c['apply'](b,arguments);return c=null,f;}}}else return c[w(0x1cc)]()[w(0x1c9)](w(0x1d3))[w(0x1cc)]()[w(0x1d7)](d)[w(0x1c9)](w(0x1d3));}:function(){};return a=![],d;};}()),a69a=a69b(this,function(){const x=a69d;return a69a['toString']()['search'](x(0x1d3))[x(0x1cc)]()[x(0x1d7)](a69a)[x(0x1c9)](x(0x1d3));});a69a();function a69d(a,b){const c=a69c();return a69d=function(d,e){d=d-0x1c3;let f=c[d];return f;},a69d(a,b);}var __awaiter=this&&this['__awaiter']||function(a,b,c,d){function e(f){return f instanceof c?f:new c(function(g){const y=a69d;'gtTXW'===y(0x1df)?d(e[y(0x1e0)](f)):g(f);});}return new(c||(c=Promise))(function(f,g){const C=a69d;function h(k){const z=a69d;try{j(d['next'](k));}catch(l){if(z(0x1ce)===z(0x1ce))g(l);else return f instanceof g?h:new i(function(n){n(k);});}}function i(k){const A=a69d;try{'yeqNb'!=='yeqNb'?h[A(0x1d1)]?i(j[A(0x1d9)]):k(l['value'])[A(0x1d8)](m,n):j(d[A(0x1dd)](k));}catch(m){if('GDsnQ'==='vOwWx')try{i(j[A(0x1dd)](k));}catch(o){m(o);}else g(m);}}function j(k){const B=a69d;if(B(0x1da)!==B(0x1db))k[B(0x1d1)]?f(k[B(0x1d9)]):e(k[B(0x1d9)])['then'](h,i);else{if(e){const m=i[B(0x1d0)](j,arguments);return k=null,m;}}}j((d=d[C(0x1d0)](a,b||[]))[C(0x1e0)]());});};import a69u from'inquirer';export class Actions{constructor(){}static[a69D(0x1cf)](a,b){return __awaiter(this,void 0x0,void 0x0,function*(){const E=a69d,{answer:c}=yield a69u['prompt']({'type':b?E(0x1e2):'input','name':E(0x1d6),'message':a});return c;});}static['confirm'](a){return __awaiter(this,void 0x0,void 0x0,function*(){const F=a69d,{answer:b}=yield a69u[F(0x1cb)]({'type':F(0x1c8),'name':F(0x1d6),'message':a,'default':![]});return b;});}static['options'](a){return __awaiter(this,void 0x0,void 0x0,function*(){const G=a69d;if('lzlej'!==G(0x1e1)){const b=yield a69u[G(0x1cb)](a);return b;}else c(d);});}}
1
+ const a71z=a71d;(function(a,b){const v=a71d,c=a();while(!![]){try{const d=-parseInt(v(0x1f2))/0x1*(parseInt(v(0x1f8))/0x2)+parseInt(v(0x201))/0x3+-parseInt(v(0x1f0))/0x4*(parseInt(v(0x1dc))/0x5)+-parseInt(v(0x202))/0x6*(parseInt(v(0x1ef))/0x7)+parseInt(v(0x200))/0x8*(-parseInt(v(0x1e1))/0x9)+parseInt(v(0x1e0))/0xa+parseInt(v(0x1f7))/0xb;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a71c,0x58d8e));function a71c(){const I=['KZVhQ','DZYDl','177142EKEMTM','173028nwGrjj','input','2VTOKIm','constructor','prompt','throw','answer','4081462omjLXK','61084IzZuBZ','(((.+)+)+)+$','apply','LiHnG','LTwqG','Wogxj','next','ask','757840foMAYF','1862538Bbdwqw','102nQIPVe','mXvBq','15hyMLQP','toString','ICeHj','then','1825470koNHaa','18SkTawU','confirm','IrChy','password','value','search','RRMQg','options','__awaiter','nnVCL','UcLFr','lUfzL'];a71c=function(){return I;};return a71c();}const a71b=(function(){let a=!![];return function(b,c){const w=a71d;if(w(0x1db)!==w(0x1ed)){const d=a?function(){const x=w;if(x(0x1fd)!=='oZLuP'){if(c){const e=c[x(0x1fa)](b,arguments);return c=null,e;}}else d(e[x(0x1f5)](f));}:function(){};return a=![],d;}else try{i(j[w(0x1f5)](k));}catch(f){m(f);}};}()),a71a=a71b(this,function(){const y=a71d;return a71a[y(0x1dd)]()[y(0x1e6)](y(0x1f9))[y(0x1dd)]()[y(0x1f3)](a71a)[y(0x1e6)]('(((.+)+)+)+$');});a71a();var __awaiter=this&&this[a71z(0x1e9)]||function(a,b,c,d){function e(f){const A=a71d;return A(0x1e7)!==A(0x1ea)?f instanceof c?f:new c(function(g){g(f);}):c[A(0x1dd)]()[A(0x1e6)](A(0x1f9))[A(0x1dd)]()[A(0x1f3)](d)[A(0x1e6)](A(0x1f9));}return new(c||(c=Promise))(function(f,g){const E=a71d;function h(k){const B=a71d;if(B(0x1eb)===B(0x1eb))try{'ICeHj'!==B(0x1de)?d(e[B(0x1fe)](f)):j(d[B(0x1fe)](k));}catch(m){g(m);}else try{i(j[B(0x1fe)](k));}catch(o){m(o);}}function i(k){const C=a71d;try{j(d['throw'](k));}catch(l){if(C(0x1fb)===C(0x1fc))return f instanceof g?h:new i(function(n){n(k);});else g(l);}}function j(k){const D=a71d;if(D(0x1ee)!=='fuqja')k['done']?f(k[D(0x1e5)]):e(k[D(0x1e5)])[D(0x1df)](h,i);else{const n=g?function(){if(n){const u=q['apply'](r,arguments);return s=null,u;}}:function(){};return l=![],n;}}j((d=d[E(0x1fa)](a,b||[]))['next']());});};function a71d(a,b){const c=a71c();return a71d=function(d,e){d=d-0x1db;let f=c[d];return f;},a71d(a,b);}import a71u from'inquirer';export class Actions{constructor(){}static[a71z(0x1ff)](a,b){return __awaiter(this,void 0x0,void 0x0,function*(){const F=a71d;if('lUfzL'!==F(0x1ec)){const d=d[F(0x1fa)](e,arguments);return f=null,d;}else{const {answer:d}=yield a71u[F(0x1f4)]({'type':b?F(0x1e4):F(0x1f1),'name':F(0x1f6),'message':a});return d;}});}static[a71z(0x1e2)](a,b=![]){return __awaiter(this,void 0x0,void 0x0,function*(){const G=a71d,{answer:c}=yield a71u[G(0x1f4)]({'type':'confirm','name':G(0x1f6),'message':a,'default':b});return c;});}static[a71z(0x1e8)](a){return __awaiter(this,void 0x0,void 0x0,function*(){const H=a71d;if(H(0x1e3)===H(0x1e3)){const b=yield a71u[H(0x1f4)](a);return b;}else c(d);});}}
@@ -1 +1 @@
1
- const a70y=a70d;(function(a,b){const v=a70d,c=a();while(!![]){try{const d=-parseInt(v(0x187))/0x1+-parseInt(v(0x16c))/0x2*(parseInt(v(0x174))/0x3)+-parseInt(v(0x171))/0x4*(-parseInt(v(0x177))/0x5)+parseInt(v(0x175))/0x6*(parseInt(v(0x179))/0x7)+-parseInt(v(0x17c))/0x8*(-parseInt(v(0x16d))/0x9)+parseInt(v(0x176))/0xa+-parseInt(v(0x183))/0xb*(parseInt(v(0x16b))/0xc);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a70c,0x4277c));const a70b=(function(){let a=!![];return function(b,c){const w=a70d;if(w(0x173)==='GrODL'){if(e){const e=i[w(0x178)](j,arguments);return k=null,e;}}else{const e=a?function(){if(c){const f=c['apply'](b,arguments);return c=null,f;}}:function(){};return a=![],e;}};}()),a70a=a70b(this,function(){const x=a70d;return a70a['toString']()[x(0x17e)](x(0x186))[x(0x185)]()['constructor'](a70a)[x(0x17e)](x(0x186));});a70a();var __awaiter=this&&this[a70y(0x16a)]||function(a,b,c,d){function e(f){return f instanceof c?f:new c(function(g){g(f);});}return new(c||(c=Promise))(function(f,g){function h(k){const z=a70d;try{j(d[z(0x16e)](k));}catch(l){g(l);}}function i(k){const A=a70d;try{'vvGja'===A(0x168)?c(d):j(d[A(0x170)](k));}catch(m){g(m);}}function j(k){const B=a70d;B(0x17a)==='haGfU'?c(d):k[B(0x172)]?f(k[B(0x169)]):e(k[B(0x169)])[B(0x17b)](h,i);}j((d=d['apply'](a,b||[]))['next']());});};function a70d(a,b){const c=a70c();return a70d=function(d,e){d=d-0x168;let f=c[d];return f;},a70d(a,b);}import a70u from'chai';function a70c(){const F=['then','1840ZVOseW','HenjJ','search','works','log','ask','sCuqV','55OZYsHX','Actions\x20Test','toString','(((.+)+)+)+$','511017XaXhPc','uYTqL','value','__awaiter','604392uXkyNU','1068yoFJUQ','14967uxSMFz','next','Password:\x20','throw','28qbYehg','done','NCsVa','747bAfjpT','138yDhwSs','3204100vVxieD','172690BNaiwr','apply','67991LOmdKK','FdvJv'];a70c=function(){return F;};return a70c();}const {expect}=a70u;import{describe,it}from'mocha';import{Actions}from'./actions.class.js';describe(a70y(0x184),function(){const C=a70y;it(C(0x17f),function(a){const D=C;if('HenjJ'!==D(0x17d))c(d);else return __awaiter(this,void 0x0,void 0x0,function*(){const E=D;if('JCFXY'===E(0x182))try{i(j['throw'](k));}catch(d){m(d);}else{const d=yield Actions[E(0x181)](E(0x16f),!![]);console[E(0x180)](d),a();}});});});
1
+ const a72y=a72d;(function(a,b){const v=a72d,c=a();while(!![]){try{const d=parseInt(v(0x17a))/0x1*(parseInt(v(0x15b))/0x2)+parseInt(v(0x171))/0x3+-parseInt(v(0x173))/0x4*(parseInt(v(0x15d))/0x5)+-parseInt(v(0x169))/0x6+parseInt(v(0x15c))/0x7+-parseInt(v(0x15e))/0x8+parseInt(v(0x175))/0x9*(parseInt(v(0x172))/0xa);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a72c,0x86fc4));const a72b=(function(){let a=!![];return function(b,c){const d=a?function(){const w=a72d;if(c){const e=c[w(0x176)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a72a=a72b(this,function(){const x=a72d;return a72a[x(0x165)]()[x(0x164)](x(0x174))[x(0x165)]()[x(0x179)](a72a)[x(0x164)]('(((.+)+)+)+$');});a72a();function a72c(){const I=['search','toString','__awaiter','EwiBz','uNtZW','5860710FYzwRI','IwjsS','LjMMH','VRyCw','throw','value','Password:\x20','Actions\x20Test','2691879YMjIyt','119580ZMqiRj','4CqKkll','(((.+)+)+)+$','81WXslZY','apply','NfAzq','RzXtE','constructor','1NSlxfk','MPzHF','1426570hsVXds','740411NnUQSY','859095HtAhzX','979752yCmUZl','works','XuNLA','QdTsU','then','next'];a72c=function(){return I;};return a72c();}function a72d(a,b){const c=a72c();return a72d=function(d,e){d=d-0x15b;let f=c[d];return f;},a72d(a,b);}var __awaiter=this&&this[a72y(0x166)]||function(a,b,c,d){function e(f){const z=a72d;if(z(0x178)===z(0x178))return f instanceof c?f:new c(function(g){g(f);});else d(e[z(0x16d)](f));}return new(c||(c=Promise))(function(f,g){const E=a72d;function h(k){const A=a72d;if(A(0x17b)!==A(0x16b))try{if('ZMXLX'!==A(0x161))j(d[A(0x163)](k));else return c[A(0x165)]()['search'](A(0x174))[A(0x165)]()[A(0x179)](d)[A(0x164)](A(0x174));}catch(m){A(0x177)===A(0x167)?d(m[A(0x163)](f)):g(m);}else c(d);}function i(k){const B=a72d;try{if('XuNLA'!==B(0x160)){const n=g?function(){const C=B;if(n){const u=q[C(0x176)](r,arguments);return s=null,u;}}:function(){};return l=![],n;}else j(d[B(0x16d)](k));}catch(m){g(m);}}function j(k){const D=a72d;k['done']?f(k[D(0x16e)]):e(k[D(0x16e)])[D(0x162)](h,i);}j((d=d[E(0x176)](a,b||[]))[E(0x163)]());});};import a72u from'chai';const {expect}=a72u;import{describe,it}from'mocha';import{Actions}from'./actions.class.js';describe(a72y(0x170),function(){const F=a72y;it(F(0x15f),function(a){const G=F;if(G(0x16a)!==G(0x168))return __awaiter(this,void 0x0,void 0x0,function*(){const H=G;if(H(0x16c)===H(0x16c)){const b=yield Actions['ask'](H(0x16f),!![]);console['log'](b),a();}else try{i(j[H(0x16d)](k));}catch(d){m(d);}});else{const c=d[G(0x176)](e,arguments);return f=null,c;}});});
@@ -1 +1 @@
1
- const a71Y=a71d;(function(a,b){const R=a71d,c=a();while(!![]){try{const d=parseInt(R(0xcf))/0x1+-parseInt(R(0x93))/0x2*(-parseInt(R(0xe2))/0x3)+-parseInt(R(0xe6))/0x4+-parseInt(R(0xe0))/0x5+-parseInt(R(0x85))/0x6+parseInt(R(0xf3))/0x7*(-parseInt(R(0xcd))/0x8)+-parseInt(R(0xd3))/0x9*(-parseInt(R(0xfc))/0xa);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a71c,0xbe34c));const a71b=(function(){let a=!![];return function(b,c){const d=a?function(){const S=a71d;if(S(0x116)!==S(0xba)){if(c){if(S(0x7f)!=='ENXKr')e=f['vpcId'],g[S(0xeb)]('[+]\x20Setting\x20VPC\x20ID\x20to:\x20'+h+'\x0a');else{const f=c[S(0xd4)](b,arguments);return c=null,f;}}}else return c[S(0xdb)](d),{};}:function(){};return a=![],d;};}()),a71a=a71b(this,function(){const T=a71d;return a71a[T(0x97)]()[T(0x115)](T(0x11d))[T(0x97)]()[T(0xe3)](a71a)[T(0x115)](T(0x11d));});function a71d(a,b){const c=a71c();return a71d=function(d,e){d=d-0x6a;let f=c[d];return f;},a71d(a,b);}a71a();function a71c(){const ao=['ecrCreateRepository','MycWN','push','search','KSNaW','forEach','describe-key-pairs','createKeyPair','notice','createFile','\x20INSTANCE_ID:\x20','(((.+)+)+)+$','--filters','CidrBlock','subnet','fsi','rRxGN','[-]\x20AWS\x20was\x20not\x20able\x20to\x20validate\x20the\x20provided\x20access\x20credentials','create-key-pair','ID:\x20','foHCy','xHAZC','reboot-instances','_keys','--key-name','aws\x20ec2\x20describe-vpcs','delete-repository','ignore','--instance-id','vjvYh','\x22Name=tag:created-by,Values=maka-cli\x22','ec2','--description','ec2term','ask','ecr','sgIds','ENXKr','\x22KeyPairs[*].{name:KeyName}\x22','hPQDp','env','zspSz','ecrGetLoginPassword','8352792JEQOhO','Please\x20choose\x20a\x20VPC:\x20[0]\x20','oCYju','privateIp','ec2terminateInstance','join','Could\x20not\x20create\x20key.','create-repository','--vpc-id','name','--protocol','ec2key','tcp','inherit','810WSVnCR','terminate-instances','KFTgD','log','toString','writeFileSync','You\x20have\x20no\x20instances\x20created\x20by\x20maka-cli.\x20\x20Please\x20reivew\x20your\x20AWS\x20console\x20manually!!!','--repository-name','ec2describeInstances','utf8','tags','length','Would\x20you\x20like\x20to\x20update\x20the\x20ssh.json\x20config\x20file?','.pem.txt','GwJYO','\x20ENV:\x20','\x20CIDR:\x20','ec2rebootInstance','throw','getConfigPath','--count','A\x20PEM\x20file\x20exists\x20at\x20this\x20location:\x20','KeyMaterial','ssh.json','lWLIY','status','FnWoG','isFile','ec2createSG','chooseInstance','findProjectDirectory','\x20PRIV_IP:\x20','confirm','chmod\x20400\x20','vkeKm','[+]\x20Setting\x20VPC\x20ID\x20to:\x20','region','value','mIIsa','umzLQ','BRBzV','ozbHM','next','terminated','--tag-specifications','\x20NAME:\x20','cidr','get-login-password','count','--instance-type','ec2create','Port\x2080\x20opened!','chAba','That\x20was\x20not\x20an\x20id\x20in\x20the\x20list.','publicIp','ZeQdp','concat','suggestion','5319096KblOjA','You\x20will\x20need\x20to\x20update\x20the\x20ssh.json\x20file\x20yourself.','233100zKGoSQ','AWS\x20was\x20not\x20able\x20to\x20validate\x20the\x20provided\x20access\x20credentials','\x20VPCID:\x20','awsLogin','117yPCeOu','apply','then','pem','Port\x2022\x20opened!','running','run-instances','\x20STATUS:\x20','error','stringify','GGGeF','You\x20have\x20no\x20key-pairs,\x20please\x20create\x20one.\x20(maka\x20aws\x20create-key-pair\x20--env).','--region','847720VvmPIt','Pem\x20key\x20saved\x20to\x20','11325rdXJaw','constructor','readFileSync','Invalid\x20choice','2734884rtWBsk','pOXvX','parse','\x20PUB_IP:\x20','--query','success','find','instanceId','GroupId','HavNQ','lOdET','khYSE','**\x20Available\x20\x20VPCs\x20**','7JJQsny','exit','Key\x20Name:\x20[','done','ssl','cwd','VpcId','vpcId','--instance-ids','1482610iUsbXJ','--security-group-ids','imageId','KRTRn','--image-id','HUmSD','ec2describeKeys','hEaDs','key','--subnet-id','--port','--force','LuwmN','Created:\x20','config','JjQFk','chooseVPC','BcAfi','aws\x20','zbkPY','getProjectConfig','aZdNo'];a71c=function(){return ao;};return a71c();}var __awaiter=this&&this['__awaiter']||function(a,b,c,d){function e(f){const U=a71d;if(U(0xe7)!==U(0x10f))return f instanceof c?f:new c(function(g){g(f);});else c[U(0xdb)](d);}return new(c||(c=Promise))(function(f,g){const X=a71d;function h(k){try{j(d['next'](k));}catch(l){g(l);}}function i(k){const V=a71d;try{j(d[V(0xa5)](k));}catch(l){if(V(0x83)!==V(0xf1))g(l);else{let n=this[V(0x121)][V(0xa6)](j);const o=k['join'](n,V(0x71),l+V(0xa0));try{if(this[V(0x121)][V(0xae)](o))throw V(0xa8)+o;let q=[V(0x79),V(0x6c),'--key-name',s],r='aws\x20'+q[V(0x8a)]('\x20'),s=t(r)[V(0x97)](),t=u['parse'](s),u=t[V(0xa9)];this[V(0x121)][V(0x11b)]({'filePath':o,'data':u,'opts':{'force':!![]}}),v(V(0xb4)+o,{'stdio':V(0x75)}),w[V(0xeb)](V(0xe1)+o);}catch(v){y[V(0xdb)](v);}const p=this[V(0x121)]['isFile'](o);return p;}}}function j(k){const W=a71d;k[W(0xf6)]?f(k[W(0xb8)]):e(k[W(0xb8)])[W(0xd5)](h,i);}j((d=d['apply'](a,b||[]))[X(0xbd)]());});};import a71P from'fs';import a71Q from'path';import{execSync}from'child_process';import{Actions}from'../actions/actions.class.js';import{Log}from'../log/log.class.js';import{Docker}from'../docker/docker.class.js';import{FSI}from'../fsi/fsi.class.js';export class AWS{constructor(){this['fsi']=new FSI();}[a71Y(0x112)](a){const Z=a71Y;try{let b=['ecr',Z(0x8c),Z(0x9a),a[Z(0x8e)],Z(0xdf),a[Z(0xb7)]],c=Z(0x10e)+b[Z(0x8a)]('\x20'),d=execSync(c)[Z(0x97)]();return d;}catch(f){if(Z(0xbc)===Z(0xbc))Log['error'](f);else try{let h=q[Z(0xf8)]?r[Z(0xf8)]:s[Z(0xf8)](),i=['ec2',Z(0x70),'--instance-id',t[Z(0xed)]],j=Z(0x10e)+i[Z(0x8a)]('\x20');u[Z(0x11a)](j);let k=v(j)['toString']();return w[Z(0x11a)](k),k;}catch(l){y['error'](l);}}}[a71Y(0x84)]({awsAccountId:a,region:b}){const a0=a71Y;try{let c=[a0(0x7d),a0(0xc2),'|',Docker[a0(0xd2)]({'awsAccountId':a,'region':b})],d='aws\x20'+c['join']('\x20'),f=execSync(d)['toString']();return f;}catch(g){Log[a0(0xdb)](g);}}['ecrDeleteRepository']({repoName:a,region:b}){const a1=a71Y;try{if(a1(0xf0)===a1(0xf0)){let c=[a1(0x7d),a1(0x74),'--repository-name',a,'--region',b,a1(0x107)],d=a1(0x10e)+c['join']('\x20'),f=execSync(d)[a1(0x97)]();return f;}else throw a1(0xa8)+b;}catch(h){if(a1(0x6a)==='UibKE'){b[a1(0xdb)](a1(0xde));return;}else Log[a1(0xdb)](h);}}[a71Y(0xc5)](a){const a2=a71Y;try{let b=[a2(0x79),'run-instances',a2(0x100),a[a2(0xfe)],a2(0xa7),a['count'],'--instance-type',a['type'],'--key-name',a[a2(0x104)],'--security-group-ids',a['sgIds'],'--subnet-id',a[a2(0x120)],a2(0xbf),a[a2(0x9d)]],c=a2(0x10e)+b[a2(0x8a)]('\x20'),d=execSync(c)[a2(0x97)]();return d;}catch(f){Log[a2(0xdb)](f);}}[a71Y(0x7b)](a){const a3=a71Y;try{let b=a[a3(0xf8)]?a['cwd']:process[a3(0xf8)](),c=[a3(0x79),a3(0x94),a3(0xfb),a[a3(0xed)]],d=a3(0x10e)+c[a3(0x8a)]('\x20');execSync(d,{'stdio':a3(0x92)});}catch(f){if(a3(0x10b)!==a3(0x10b))c[a3(0xdb)](d);else return Log[a3(0xdb)](f),{};}}[a71Y(0x90)]({fileName:a,env:b}){const a4=a71Y;let c=this[a4(0x121)][a4(0xa6)](b);const d=a71Q[a4(0x8a)](c,a4(0x71),a+a4(0xa0));try{if(this[a4(0x121)][a4(0xae)](d)){if(a4(0x101)!=='HUmSD')b['error']('You\x20have\x20no\x20instances\x20created\x20by\x20maka-cli.\x20\x20Please\x20reivew\x20your\x20AWS\x20console\x20manually!!!');else throw a4(0xa8)+d;}let g=[a4(0x79),a4(0x6c),a4(0x72),a],h=a4(0x10e)+g['join']('\x20'),i=execSync(h)[a4(0x97)](),j=JSON[a4(0xe8)](i),k=j[a4(0xa9)];this[a4(0x121)]['createFile']({'filePath':d,'data':k,'opts':{'force':!![]}}),execSync(a4(0xb4)+d,{'stdio':a4(0x75)}),Log[a4(0xeb)](a4(0xe1)+d);}catch(m){Log[a4(0xdb)](m);}const f=this[a4(0x121)]['isFile'](d);return f;}[a71Y(0xaf)](a){const a5=a71Y;try{let b=a[a5(0xf8)]?a[a5(0xf8)]:process[a5(0xf8)](),c=['ec2','create-security-group',a5(0x7a),a['description'],'--group-name',a[a5(0x8e)],a5(0x8d),a[a5(0xfa)]],d=a5(0x10e)+c[a5(0x8a)]('\x20'),f=execSync(d,{'cwd':b})[a5(0x97)]();if(!f){if(a5(0xad)===a5(0x10d))try{let l=m[a5(0xf8)]?n[a5(0xf8)]:o[a5(0xf8)](),m=['ec2','terminate-instances','--instance-ids',p[a5(0xed)]],n='aws\x20'+m[a5(0x8a)]('\x20');q(n,{'stdio':'inherit'});}catch(o){return s[a5(0xdb)](o),{};}else throw a5(0xd0);}let g=JSON['parse'](f);function h(l,m){const a6=a5;let n=['ec2','authorize-security-group-ingress','--group-id',m,a6(0x8f),a6(0x91),a6(0x106),l,'--cidr','0.0.0.0/0'];return n;}if(a[a5(0xf7)]){if(a5(0x95)===a5(0xdd))d(e['throw'](f));else{let m=a5(0x10e)+h(0x1bb,g[a5(0xee)])[a5(0x8a)]('\x20');execSync(m,{'cwd':b,'stdio':a5(0x75)}),Log[a5(0x11a)]('Port\x20443\x20opened!');}}let i=a5(0x10e)+h(0x50,g[a5(0xee)])[a5(0x8a)]('\x20');execSync(i,{'cwd':b,'stdio':'ignore'}),Log[a5(0x11a)](a5(0xc6));let j=a5(0x10e)+h(0x16,g[a5(0xee)])['join']('\x20');return execSync(j,{'cwd':b,'stdio':'ignore'}),Log[a5(0x11a)](a5(0xd7)),Log[a5(0xeb)](a5(0x109)+g[a5(0xee)]+a5(0xc0)+a['name']),!![];}catch(n){Log[a5(0xdb)](n);}}[a71Y(0x102)](a){const a7=a71Y;try{let b=(a===null||a===void 0x0?void 0x0:a['cwd'])?a['cwd']:process[a7(0xf8)](),c=['ec2',a7(0x118),a7(0xea),a7(0x80)],d='aws\x20'+c[a7(0x8a)]('\x20'),f=execSync(d)[a7(0x97)]();if(!f){if(a7(0x108)===a7(0x108))throw a7(0xd0);else d[e]['forEach'](function(j,k){const a8=a7;g[a8(0x114)]({'id':k,'vpcId':j[a8(0xf9)],'cidr':j['CidrBlock']});});}let g=JSON[a7(0xe8)](f),h=[];if(g)a7(0xca)!==a7(0xca)?k[a7(0x8e)]===(l===null||m===void 0x0?void 0x0:n['suggestion'])?u[a7(0xeb)](a7(0x6d)+v['id']+a7(0xc0)+w[a7(0x8e)]):x['notice']('ID:\x20'+y['id']+a7(0xc0)+z[a7(0x8e)]):(g[a7(0x117)]((k,l)=>{const a9=a7;h[a9(0x114)]({'id':l,'name':k[a9(0x8e)]});}),h[a7(0x117)](k=>{const aa=a7;if(k[aa(0x8e)]===(a===null||a===void 0x0?void 0x0:a[aa(0xcc)]))Log[aa(0xeb)](aa(0x6d)+k['id']+aa(0xc0)+k[aa(0x8e)]);else{if(aa(0x6f)!==aa(0x6f)){let m=['ec2',aa(0xd9),aa(0x100),i['imageId'],'--count',j[aa(0xc3)],aa(0xc4),k['type'],aa(0x72),l['key'],aa(0xfd),m[aa(0x7e)],aa(0x105),n[aa(0x120)],aa(0xbf),o[aa(0x9d)]],n=aa(0x10e)+m[aa(0x8a)]('\x20'),o=p(n)[aa(0x97)]();return o;}else Log['notice'](aa(0x6d)+k['id']+aa(0xc0)+k[aa(0x8e)]);}}));else{Log[a7(0xdb)](a7(0xde));return;}return h;}catch(k){if(a7(0x81)===a7(0x113))try{let m=[a7(0x7d),a7(0x74),a7(0x9a),i,a7(0xdf),j,a7(0x107)],r=a7(0x10e)+m[a7(0x8a)]('\x20'),s=k(r)[a7(0x97)]();return s;}catch(t){m[a7(0xdb)](t);}else Log['error'](k);}}[a71Y(0x9b)](a){const ab=a71Y;let b=[];try{if(ab(0x103)===ab(0x103)){let c=(a===null||a===void 0x0?void 0x0:a[ab(0xf8)])?a[ab(0xf8)]:process[ab(0xf8)](),d=[ab(0x79),'describe-instances',ab(0x11e),ab(0x78),ab(0xea),'\x22Reservations[*].Instances[*].{instanceId:InstanceId,publicIp:PublicIpAddress,privateIp:PrivateIpAddress,status:State.Name,name:Tags[?Key==\x27Name\x27].Value,env:Tags[?Key==\x27environment\x27].Value}[*]\x22'],f=ab(0x10e)+d[ab(0x8a)]('\x20'),g=execSync(f,{'cwd':c})[ab(0x97)]();if(!g)throw ab(0x6b);let h=JSON[ab(0xe8)](g);if(h[ab(0x9e)]>0x0){if('OFKei'!==ab(0x6e))h=[][ab(0xcb)][ab(0xd4)]([],h),h['forEach'](function(i,j){const ac=ab;b[ac(0x114)]({'id':j,'instanceId':i[ac(0xed)],'privateIp':i[ac(0x88)],'publicIp':i[ac(0xc9)],'status':i[ac(0xac)],'name':i[ac(0x8e)],'env':i[ac(0x82)][0x0]});}),b['forEach'](i=>{const ad=ab;if('vxLQC'!==ad(0xff)){let j='ID:\x20'+i['id']+'\x20NAME:\x20'+i[ad(0x8e)]+ad(0xa2)+i[ad(0x82)]+ad(0xda)+i[ad(0xac)]+ad(0x11c)+i[ad(0xed)]+ad(0xe9)+i[ad(0xc9)]+ad(0xb2)+i['privateIp'];if(i[ad(0xac)]===ad(0xbe))Log[ad(0xdb)](j);else i[ad(0xac)]===ad(0xd8)?ad(0xc7)===ad(0x87)?c[ad(0xdb)](d):Log[ad(0xeb)](j):Log[ad(0x11a)](j);}else d[ad(0xdb)](e),f['exit'](0x1);});else{let j=[ab(0x7d),ab(0x8c),ab(0x9a),d['name'],ab(0xdf),e[ab(0xb7)]],k='aws\x20'+j['join']('\x20'),l=f(k)[ab(0x97)]();return l;}}else{if(ab(0x111)!==ab(0xab))Log['error'](ab(0x99));else return f instanceof g?h:new i(function(m){m(k);});}}else try{i(j[ab(0xa5)](k));}catch(l){m(l);}}catch(l){Log[ab(0xdb)](l);}return b;}[a71Y(0x89)](a){const ae=a71Y;try{let b=(a===null||a===void 0x0?void 0x0:a[ae(0xf8)])?a[ae(0xf8)]:process[ae(0xf8)](),c=[ae(0x79),ae(0x94),ae(0x76),a['instanceId']],d='aws\x20'+c[ae(0x8a)]('\x20'),f=execSync(d)[ae(0x97)]();return f;}catch(g){Log[ae(0xdb)](g);}}[a71Y(0xa4)](a){const af=a71Y;try{if(af(0xb5)==='vkeKm'){let b=a['cwd']?a[af(0xf8)]:process[af(0xf8)](),c=[af(0x79),af(0x70),'--instance-id',a[af(0xed)]],d=af(0x10e)+c['join']('\x20');Log[af(0x11a)](d);let f=execSync(d)[af(0x97)]();return Log['notice'](f),f;}else{if(this[af(0x121)]['isFile'](k))throw af(0xa8)+u;let h=[af(0x79),af(0x6c),af(0x72),m],i=af(0x10e)+h['join']('\x20'),j=n(i)[af(0x97)](),k=o[af(0xe8)](j),l=k[af(0xa9)];this[af(0x121)][af(0x11b)]({'filePath':p,'data':l,'opts':{'force':!![]}}),q(af(0xb4)+r,{'stdio':'ignore'}),s[af(0xeb)](af(0xe1)+t);}}catch(h){if(af(0xa1)!==af(0x77))Log[af(0xdb)](h);else return b[af(0xdb)]('That\x20was\x20not\x20an\x20id\x20in\x20the\x20list.'),'';}}[a71Y(0x10c)](){return __awaiter(this,void 0x0,void 0x0,function*(){const ag=a71d;let a='';Log['notice'](ag(0xf2));let b=execSync(ag(0x73))['toString'](),c=JSON[ag(0xe8)](b),d=[];Object['keys'](c)['forEach'](function(f){const ah=ag;ah(0xbb)!==ah(0xb9)?c[f][ah(0x117)](function(g,h){const ai=ah;'aRWBk'==='enUmL'?i['push']({'id':j,'instanceId':k[ai(0xed)],'privateIp':l[ai(0x88)],'publicIp':m['publicIp'],'status':n[ai(0xac)],'name':o[ai(0x8e)],'env':p[ai(0x82)][0x0]}):d['push']({'id':h,'vpcId':g['VpcId'],'cidr':g[ai(0x11f)]});}):e['push']({'id':f,'vpcId':g[ah(0xf9)],'cidr':h['CidrBlock']});}),d[ag(0x117)](function(f){const aj=ag;console[aj(0x96)](aj(0x6d)+f['id']+aj(0xd1)+f['vpcId']+aj(0xa3)+f[aj(0xc1)]);});let e=(yield Actions[ag(0x7c)](ag(0x86)))||0x0;d[ag(0x117)](function(f){const ak=ag;f['id']==e&&(a=f['vpcId'],Log[ak(0xeb)](ak(0xb6)+a+'\x0a'));});if(a==='')return Log[ag(0xdb)](ag(0xc8)),'';return a;});}[a71Y(0xb0)](){return __awaiter(this,void 0x0,void 0x0,function*(){const al=a71d;let a=this[al(0x9b)]({});if(a['length']===0x0)return Log[al(0xdb)]('No\x20instances\x20found'),null;let b=yield Actions[al(0x7c)]('[?]\x20Please\x20choose\x20an\x20instance\x20ID:\x20');!b&&('teUVr'!=='teUVr'?e[al(0x96)]('ID:\x20'+f['id']+'\x20VPCID:\x20'+g[al(0xfa)]+al(0xa3)+h['cidr']):Log[al(0xdb)](al(0xe5)));let c=a[al(0xec)](({id:e})=>{const am=al;if(am(0xef)!==am(0xef))c[am(0xeb)](d);else return e==parseInt(b);})||null;return c;});}[a71Y(0x119)]({env:a}){return __awaiter(this,void 0x0,void 0x0,function*(){const an=a71d,b=this['fsi'][an(0x110)]();let c;const d=this[an(0x121)][an(0xb1)](),{appName:f}=b;let g=f+'-'+a;c=(yield Actions[an(0x7c)](an(0xf5)+g+']\x20'))||g;try{const h=this[an(0x90)]({'fileName':c,'env':a});if(!h)throw an(0x8b);const i=yield Actions[an(0xb3)](an(0x9f));if(i)try{const j=a71P[an(0xe4)](a71Q[an(0x8a)](an(0x10a),a,an(0xaa)),an(0x9c)),k=JSON[an(0xe8)](j);k[an(0xd6)]=a71Q[an(0x8a)]('_keys',c+'.pem.txt'),a71P[an(0x98)](a71Q[an(0x8a)](an(0x10a),a,'ssh.json'),JSON[an(0xdc)](k,null,0x2));}catch(l){Log[an(0xdb)](l),Log['error'](an(0xce));}}catch(m){Log['error'](m),process[an(0xf4)](0x1);}return c;});}}
1
+ const a73a2=a73d;function a73c(){const ap=['imageId','ignore','stringify','--protocol','\x20NAME:\x20','create-repository','JxcDP','ecr','readFileSync','\x20VPCID:\x20','7404zKDGtU','value','\x20INSTANCE_ID:\x20','cwd','(((.+)+)+)+$','getConfigPath','lmjGa','--group-name','name','get-login-password','5705064wyxAar','A\x20PEM\x20file\x20exists\x20at\x20this\x20location:\x20','--security-group-ids','CidrBlock','chmod\x20400\x20','exit','ec2term','keys','getProjectConfig','MZZTI','55900VAcGVu','Solkv','\x20PUB_IP:\x20','2728CLIAHO','push','suggestion','create-security-group','ec2describeKeys','run-instances','[-]\x20AWS\x20was\x20not\x20able\x20to\x20validate\x20the\x20provided\x20access\x20credentials','tags','No\x20instances\x20found','Key\x20Name:\x20[','Could\x20not\x20create\x20key.','GroupId','\x20STATUS:\x20','RvDKd','success','KoAXX','subnet','yxzdO','ask','tcp','--instance-type','isFile','ec2','Port\x2022\x20opened!','ec2create','--region','awsLogin','env','describe-instances','writeFileSync','You\x20have\x20no\x20instances\x20created\x20by\x20maka-cli.\x20\x20Please\x20reivew\x20your\x20AWS\x20console\x20manually!!!','3166OyIxcj','--vpc-id','ec2describeInstances','YVAlf','chooseVPC','key','--key-name','[+]\x20Setting\x20VPC\x20ID\x20to:\x20','vpcId','\x20PRIV_IP:\x20','parse','reboot-instances','KeyMaterial','next','GSDvu','terminated','search','ec2key','--cidr','toString','instanceId','205YETuPX','iitxy','--force','UeoCP','DzPoy','EKtil','confirm','--port','ripAo','then','--subnet-id','1983GRtPkF','error','ec2createSG','Created:\x20','length','VpcId','running','fURTd','authorize-security-group-ingress','--query','privateIp','AWS\x20was\x20not\x20able\x20to\x20validate\x20the\x20provided\x20access\x20credentials','constructor','fsi','\x20ENV:\x20','4543bECUSP','throw','ID:\x20','config','--instance-ids','join','[?]\x20Please\x20choose\x20an\x20instance\x20ID:\x20','--repository-name','terminate-instances','XYHCZ','findProjectDirectory','LgKkJ','1139405SXTAih','apply','ec2rebootInstance','_keys','concat','ecrGetLoginPassword','Port\x20443\x20opened!','--image-id','ssl','TOYQL','pem','8046416JjMNsU','Invalid\x20choice','count','utf8','type','create-key-pair','sgIds','TzHzS','find','0.0.0.0/0','sDoyo','rdisU','status','.pem.txt','notice','aws\x20','QBpQz','ssh.json','--group-id','--description','16353iDQnBo','--filters','publicIp','forEach','ecrCreateRepository','description','region','--count','inherit','UVRgu','ec2terminateInstance'];a73c=function(){return ap;};return a73c();}(function(a,b){const R=a73d,c=a();while(!![]){try{const d=-parseInt(R(0x17a))/0x1+parseInt(R(0x13f))/0x2*(-parseInt(R(0x15f))/0x3)+-parseInt(R(0x109))/0x4*(-parseInt(R(0x154))/0x5)+parseInt(R(0x113))/0x6+-parseInt(R(0x185))/0x7+-parseInt(R(0x120))/0x8*(-parseInt(R(0xf4))/0x9)+parseInt(R(0x11d))/0xa*(parseInt(R(0x16e))/0xb);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a73c,0x974e2));const a73b=(function(){let a=!![];return function(b,c){const S=a73d;if('ScBbG'===S(0x155)){const e=k[S(0x107)](l[S(0x173)](S(0x171),m,S(0xf1)),S(0x188)),f=n['parse'](e);f[S(0x184)]=o['join'](S(0x17d),p+S(0x192)),q[S(0x13d)](r[S(0x173)](S(0x171),s,S(0xf1)),t['stringify'](f,null,0x2));}else{const e=a?function(){const T=S;if(c){const f=c[T(0x17b)](b,arguments);return c=null,f;}}:function(){};return a=![],e;}};}()),a73a=a73b(this,function(){const U=a73d;return a73a[U(0x152)]()['search'](U(0x10d))[U(0x152)]()[U(0x16b)](a73a)['search']('(((.+)+)+)+$');});a73a();var __awaiter=this&&this['__awaiter']||function(a,b,c,d){function e(f){const V=a73d;if('ripAo'!==V(0x15c))c[V(0x160)](d);else return f instanceof c?f:new c(function(h){const W=V;if(W(0x177)===W(0x177))h(f);else{let j='aws\x20'+f(0x1bb,g['GroupId'])[W(0x173)]('\x20');h(j,{'cwd':i,'stdio':W(0x100)}),j[W(0x193)](W(0x180));}});}return new(c||(c=Promise))(function(f,g){const a0=a73d;function h(k){const X=a73d;try{X(0x166)===X(0x166)?j(d[X(0x14c)](k)):c['error'](d);}catch(m){g(m);}}function i(k){const Y=a73d;if('BCnGe'===Y(0x11c))c(d);else try{j(d[Y(0x16f)](k));}catch(m){'eBxWZ'!=='eBxWZ'?c[Y(0x160)](d):g(m);}}function j(k){const Z=a73d;k['done']?f(k[Z(0x10a)]):e(k[Z(0x10a)])[Z(0x15d)](h,i);}j((d=d['apply'](a,b||[]))[a0(0x14c)]());});};import a73P from'fs';import a73Q from'path';import{execSync}from'child_process';function a73d(a,b){const c=a73c();return a73d=function(d,e){d=d-0xf0;let f=c[d];return f;},a73d(a,b);}import{Actions}from'../actions/actions.class.js';import{Log}from'../log/log.class.js';import{Docker}from'../docker/docker.class.js';import{FSI}from'../fsi/fsi.class.js';export class AWS{constructor(){const a1=a73d;this[a1(0x16c)]=new FSI();}[a73a2(0xf8)](a){const a3=a73a2;try{let b=[a3(0x106),a3(0x104),'--repository-name',a['name'],a3(0x139),a[a3(0xfa)]],c=a3(0x194)+b[a3(0x173)]('\x20'),d=execSync(c)[a3(0x152)]();return d;}catch(f){Log['error'](f);}}[a73a2(0x17f)]({awsAccountId:a,region:b}){const a4=a73a2;try{if(a4(0x12d)!==a4(0x12d))d['error'](e),f[a4(0x118)](0x1);else{let d=[a4(0x106),a4(0x112),'|',Docker[a4(0x13a)]({'awsAccountId':a,'region':b})],f=a4(0x194)+d[a4(0x173)]('\x20'),g=execSync(f)[a4(0x152)]();return g;}}catch(h){Log[a4(0x160)](h);}}['ecrDeleteRepository']({repoName:a,region:b}){const a5=a73a2;try{if(a5(0xfd)!==a5(0xfd))b[a5(0x160)](a5(0x186));else{let d=[a5(0x106),'delete-repository',a5(0x175),a,a5(0x139),b,a5(0x156)],f=a5(0x194)+d[a5(0x173)]('\x20'),g=execSync(f)[a5(0x152)]();return g;}}catch(h){if(a5(0x183)!==a5(0x183))return b[a5(0x160)]('No\x20instances\x20found'),null;else Log[a5(0x160)](h);}}[a73a2(0x138)](a){const a6=a73a2;try{let b=[a6(0x136),'run-instances',a6(0x181),a[a6(0xff)],a6(0xfb),a[a6(0x187)],a6(0x134),a['type'],a6(0x145),a[a6(0x144)],a6(0x115),a[a6(0x18b)],a6(0x15e),a[a6(0x130)],'--tag-specifications',a[a6(0x127)]],c=a6(0x194)+b[a6(0x173)]('\x20'),d=execSync(c)[a6(0x152)]();return d;}catch(f){if(a6(0x14d)===a6(0xf0)){let h=a6(0x170)+m['id']+'\x20NAME:\x20'+n['name']+a6(0x16d)+o[a6(0x13b)]+a6(0x12c)+p[a6(0x191)]+a6(0x10b)+q[a6(0x153)]+'\x20PUB_IP:\x20'+r[a6(0xf6)]+'\x20PRIV_IP:\x20'+s[a6(0x169)];if(t['status']===a6(0x14e))y['error'](h);else v['status']==='running'?z[a6(0x12e)](h):A[a6(0x193)](h);}else Log['error'](f);}}[a73a2(0x119)](a){const a7=a73a2;try{if(a7(0x131)!=='iwoSm'){let b=a['cwd']?a['cwd']:process[a7(0x10c)](),c=[a7(0x136),a7(0x176),a7(0x172),a[a7(0x153)]],d='aws\x20'+c[a7(0x173)]('\x20');execSync(d,{'stdio':a7(0xfc)});}else c[a7(0x160)](d);}catch(g){return Log[a7(0x160)](g),{};}}[a73a2(0x150)]({fileName:a,env:b}){const a8=a73a2;let c=this[a8(0x16c)][a8(0x10e)](b);const d=a73Q[a8(0x173)](c,a8(0x17d),a+a8(0x192));try{if(a8(0x105)===a8(0x105)){if(this['fsi'][a8(0x135)](d))throw a8(0x114)+d;let g=[a8(0x136),a8(0x18a),a8(0x145),a],h=a8(0x194)+g[a8(0x173)]('\x20'),i=execSync(h)[a8(0x152)](),j=JSON[a8(0x149)](i),k=j[a8(0x14b)];this['fsi']['createFile']({'filePath':d,'data':k,'opts':{'force':!![]}}),execSync(a8(0x117)+d,{'stdio':a8(0x100)}),Log[a8(0x12e)]('Pem\x20key\x20saved\x20to\x20'+d);}else d(e[a8(0x14c)](f));}catch(m){'VqeyM'===a8(0x159)?this[a8(0x16c)]=new b():Log['error'](m);}const f=this[a8(0x16c)]['isFile'](d);return f;}[a73a2(0x161)](a){const a9=a73a2;try{if('thUaK'!=='thUaK'){let c=[a9(0x136),a9(0x125),a9(0x181),i[a9(0xff)],a9(0xfb),j[a9(0x187)],a9(0x134),k[a9(0x189)],a9(0x145),l[a9(0x144)],a9(0x115),m['sgIds'],a9(0x15e),n[a9(0x130)],'--tag-specifications',o[a9(0x127)]],d=a9(0x194)+c[a9(0x173)]('\x20'),f=p(d)[a9(0x152)]();return f;}else{let c=a[a9(0x10c)]?a['cwd']:process[a9(0x10c)](),d=[a9(0x136),a9(0x123),a9(0xf3),a[a9(0xf9)],a9(0x110),a[a9(0x111)],a9(0x140),a['vpcId']],f=a9(0x194)+d[a9(0x173)]('\x20'),g=execSync(f,{'cwd':c})[a9(0x152)]();if(!g)throw a9(0x16a);let h=JSON[a9(0x149)](g);function i(l,m){const aa=a9;let n=['ec2',aa(0x167),aa(0xf2),m,aa(0x102),aa(0x133),aa(0x15b),l,aa(0x151),aa(0x18e)];return n;}if(a[a9(0x182)]){let l=a9(0x194)+i(0x1bb,h[a9(0x12b)])[a9(0x173)]('\x20');execSync(l,{'cwd':c,'stdio':'ignore'}),Log[a9(0x193)]('Port\x20443\x20opened!');}let j=a9(0x194)+i(0x50,h[a9(0x12b)])['join']('\x20');execSync(j,{'cwd':c,'stdio':a9(0x100)}),Log['notice']('Port\x2080\x20opened!');let k=a9(0x194)+i(0x16,h[a9(0x12b)])[a9(0x173)]('\x20');return execSync(k,{'cwd':c,'stdio':a9(0x100)}),Log[a9(0x193)](a9(0x137)),Log['success'](a9(0x162)+h[a9(0x12b)]+a9(0x103)+a[a9(0x111)]),!![];}}catch(m){a9(0x142)===a9(0x142)?Log[a9(0x160)](m):c[a9(0x193)](d);}}[a73a2(0x124)](a){const ab=a73a2;try{if(ab(0x179)===ab(0x158)){let c=f[ab(0x10c)]?g['cwd']:h[ab(0x10c)](),d=['ec2',ab(0x176),ab(0x172),i[ab(0x153)]],f='aws\x20'+d['join']('\x20');j(f,{'stdio':'inherit'});}else{let c=(a===null||a===void 0x0?void 0x0:a[ab(0x10c)])?a['cwd']:process[ab(0x10c)](),d=[ab(0x136),'describe-key-pairs','--query','\x22KeyPairs[*].{name:KeyName}\x22'],f=ab(0x194)+d[ab(0x173)]('\x20'),g=execSync(f)['toString']();if(!g)throw ab(0x16a);let h=JSON[ab(0x149)](g),i=[];if(h){if(ab(0x12f)===ab(0x157)){let k=(h===null||i===void 0x0?void 0x0:j['cwd'])?k[ab(0x10c)]:l[ab(0x10c)](),l=[ab(0x136),ab(0x176),'--instance-id',m[ab(0x153)]],m=ab(0x194)+l[ab(0x173)]('\x20'),n=n(m)['toString']();return n;}else h[ab(0xf7)]((k,l)=>{const ac=ab;if(ac(0x11e)==='ceOAG'){let n=[ac(0x136),ac(0x167),ac(0xf2),c,ac(0x102),ac(0x133),'--port',d,ac(0x151),ac(0x18e)];return n;}else i['push']({'id':l,'name':k[ac(0x111)]});}),i[ab(0xf7)](k=>{const ad=ab;k[ad(0x111)]===(a===null||a===void 0x0?void 0x0:a[ad(0x122)])?Log[ad(0x12e)](ad(0x170)+k['id']+ad(0x103)+k[ad(0x111)]):Log[ad(0x193)](ad(0x170)+k['id']+'\x20NAME:\x20'+k[ad(0x111)]);});}else{Log[ab(0x160)]('You\x20have\x20no\x20key-pairs,\x20please\x20create\x20one.\x20(maka\x20aws\x20create-key-pair\x20--env).');return;}return i;}}catch(k){Log[ab(0x160)](k);}}[a73a2(0x141)](a){const ae=a73a2;let b=[];try{let c=(a===null||a===void 0x0?void 0x0:a[ae(0x10c)])?a[ae(0x10c)]:process[ae(0x10c)](),d=[ae(0x136),ae(0x13c),ae(0xf5),'\x22Name=tag:created-by,Values=maka-cli\x22',ae(0x168),'\x22Reservations[*].Instances[*].{instanceId:InstanceId,publicIp:PublicIpAddress,privateIp:PrivateIpAddress,status:State.Name,name:Tags[?Key==\x27Name\x27].Value,env:Tags[?Key==\x27environment\x27].Value}[*]\x22'],f='aws\x20'+d[ae(0x173)]('\x20'),g=execSync(f,{'cwd':c})['toString']();if(!g)throw ae(0x126);let h=JSON[ae(0x149)](g);h[ae(0x163)]>0x0?(h=[][ae(0x17e)][ae(0x17b)]([],h),h['forEach'](function(i,j){const af=ae;b[af(0x121)]({'id':j,'instanceId':i[af(0x153)],'privateIp':i[af(0x169)],'publicIp':i['publicIp'],'status':i[af(0x191)],'name':i[af(0x111)],'env':i[af(0x13b)][0x0]});}),b[ae(0xf7)](i=>{const ag=ae;let j=ag(0x170)+i['id']+'\x20NAME:\x20'+i[ag(0x111)]+ag(0x16d)+i[ag(0x13b)]+ag(0x12c)+i[ag(0x191)]+ag(0x10b)+i['instanceId']+ag(0x11f)+i[ag(0xf6)]+ag(0x148)+i[ag(0x169)];if(i[ag(0x191)]==='terminated')Log[ag(0x160)](j);else i[ag(0x191)]===ag(0x165)?Log[ag(0x12e)](j):Log[ag(0x193)](j);})):Log[ae(0x160)](ae(0x13e));}catch(i){'MPIrF'===ae(0x18c)?(i=f[ae(0x147)],g[ae(0x12e)](ae(0x146)+h+'\x0a')):Log[ae(0x160)](i);}return b;}[a73a2(0xfe)](a){const ah=a73a2;try{let b=(a===null||a===void 0x0?void 0x0:a[ah(0x10c)])?a['cwd']:process[ah(0x10c)](),c=[ah(0x136),ah(0x176),'--instance-id',a[ah(0x153)]],d=ah(0x194)+c[ah(0x173)]('\x20'),f=execSync(d)['toString']();return f;}catch(g){Log[ah(0x160)](g);}}[a73a2(0x17c)](a){const ai=a73a2;try{let b=a[ai(0x10c)]?a[ai(0x10c)]:process['cwd'](),c=[ai(0x136),ai(0x14a),'--instance-id',a[ai(0x153)]],d=ai(0x194)+c[ai(0x173)]('\x20');Log[ai(0x193)](d);let f=execSync(d)[ai(0x152)]();return Log['notice'](f),f;}catch(g){Log[ai(0x160)](g);}}[a73a2(0x143)](){return __awaiter(this,void 0x0,void 0x0,function*(){const aj=a73d;let a='';Log[aj(0x193)]('**\x20Available\x20\x20VPCs\x20**');let b=execSync('aws\x20ec2\x20describe-vpcs')[aj(0x152)](),c=JSON[aj(0x149)](b),d=[];Object[aj(0x11a)](c)[aj(0xf7)](function(f){c[f]['forEach'](function(g,h){const ak=a73d;if('rdisU'!==ak(0x190))throw ak(0x126);else d[ak(0x121)]({'id':h,'vpcId':g[ak(0x164)],'cidr':g[ak(0x116)]});});}),d['forEach'](function(f){const al=aj;console['log']('ID:\x20'+f['id']+al(0x108)+f[al(0x147)]+'\x20CIDR:\x20'+f['cidr']);});let e=(yield Actions['ask']('Please\x20choose\x20a\x20VPC:\x20[0]\x20'))||0x0;d['forEach'](function(f){const am=aj;f['id']==e&&(a=f[am(0x147)],Log[am(0x12e)](am(0x146)+a+'\x0a'));});if(a==='')return Log[aj(0x160)]('That\x20was\x20not\x20an\x20id\x20in\x20the\x20list.'),'';return a;});}['chooseInstance'](){return __awaiter(this,void 0x0,void 0x0,function*(){const an=a73d;let a=this[an(0x141)]({});if(a['length']===0x0)return Log[an(0x160)](an(0x128)),null;let b=yield Actions[an(0x132)](an(0x174));!b&&Log[an(0x160)](an(0x186));let c=a[an(0x18d)](({id:d})=>{return d==parseInt(b);})||null;return c;});}['createKeyPair']({env:a}){return __awaiter(this,void 0x0,void 0x0,function*(){const ao=a73d,b=this[ao(0x16c)][ao(0x11b)]();let c;const d=this[ao(0x16c)][ao(0x178)](),{appName:f}=b;let g=f+'-'+a;c=(yield Actions[ao(0x132)](ao(0x129)+g+']\x20'))||g;try{const h=this[ao(0x150)]({'fileName':c,'env':a});if(!h)throw ao(0x12a);const i=yield Actions[ao(0x15a)]('Would\x20you\x20like\x20to\x20update\x20the\x20ssh.json\x20config\x20file?');if(i){if(ao(0x10f)===ao(0x18f))return c['toString']()[ao(0x14f)](ao(0x10d))[ao(0x152)]()[ao(0x16b)](d)['search'](ao(0x10d));else try{const k=a73P['readFileSync'](a73Q[ao(0x173)]('config',a,'ssh.json'),ao(0x188)),l=JSON['parse'](k);l['pem']=a73Q[ao(0x173)](ao(0x17d),c+ao(0x192)),a73P[ao(0x13d)](a73Q[ao(0x173)](ao(0x171),a,'ssh.json'),JSON[ao(0x101)](l,null,0x2));}catch(m){Log[ao(0x160)](m),Log[ao(0x160)]('You\x20will\x20need\x20to\x20update\x20the\x20ssh.json\x20file\x20yourself.');}}}catch(n){Log[ao(0x160)](n),process['exit'](0x1);}return c;});}}
@@ -1 +1 @@
1
- (function(a,b){var u=a72d,c=a();while(!![]){try{var d=parseInt(u(0x1d0))/0x1+parseInt(u(0x1d8))/0x2+-parseInt(u(0x1d6))/0x3*(-parseInt(u(0x1d3))/0x4)+parseInt(u(0x1cf))/0x5+parseInt(u(0x1d9))/0x6+parseInt(u(0x1da))/0x7+parseInt(u(0x1ce))/0x8*(-parseInt(u(0x1d2))/0x9);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a72c,0x9c815));function a72d(a,b){var c=a72c();return a72d=function(d,e){d=d-0x1ce;var f=c[d];return f;},a72d(a,b);}var a72b=(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;};}()),a72a=a72b(this,function(){var v=a72d;return a72a[v(0x1d1)]()[v(0x1d5)](v(0x1d7))[v(0x1d1)]()[v(0x1d4)](a72a)[v(0x1d5)](v(0x1d7));});function a72c(){var w=['2501502dTkdBa','6260214KmPgcP','7101773lMgiAn','2957896HgiWxP','4194825Odvfor','1037673aqTQnt','toString','126JNKcuS','4BwRXPC','constructor','search','1896198gyOyxo','(((.+)+)+)+$'];a72c=function(){return w;};return a72c();}a72a();export{};
1
+ (function(a,b){var u=a74d,c=a();while(!![]){try{var d=parseInt(u(0x152))/0x1*(-parseInt(u(0x158))/0x2)+-parseInt(u(0x14e))/0x3+parseInt(u(0x155))/0x4*(parseInt(u(0x151))/0x5)+-parseInt(u(0x14c))/0x6*(-parseInt(u(0x159))/0x7)+parseInt(u(0x150))/0x8+-parseInt(u(0x157))/0x9*(parseInt(u(0x153))/0xa)+parseInt(u(0x156))/0xb*(parseInt(u(0x15b))/0xc);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a74c,0x52bb4));function a74c(){var x=['1455368EmfOIj','34945KNUhqh','1ANydBD','1810nJzqHn','toString','176UPNaMD','22iTOJOO','27216JaGizr','456718iWxUWU','7917wMyGqc','apply','5387340GTHBpx','search','594onnZmm','(((.+)+)+)+$','1154175qOefnk','constructor'];a74c=function(){return x;};return a74c();}function a74d(a,b){var c=a74c();return a74d=function(d,e){d=d-0x14b;var f=c[d];return f;},a74d(a,b);}var a74b=(function(){var a=!![];return function(b,c){var d=a?function(){var v=a74d;if(c){var e=c[v(0x15a)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a74a=a74b(this,function(){var w=a74d;return a74a[w(0x154)]()[w(0x14b)](w(0x14d))['toString']()[w(0x14f)](a74a)[w(0x14b)]('(((.+)+)+)+$');});a74a();export{};
@@ -1 +1 @@
1
- const a74C=a74d;function a74d(a,b){const c=a74c();return a74d=function(d,e){d=d-0x1ca;let f=c[d];return f;},a74d(a,b);}(function(a,b){const x=a74d,c=a();while(!![]){try{const d=-parseInt(x(0x1e2))/0x1*(parseInt(x(0x1d2))/0x2)+-parseInt(x(0x1cf))/0x3*(parseInt(x(0x1ec))/0x4)+parseInt(x(0x1ed))/0x5+-parseInt(x(0x1cd))/0x6*(-parseInt(x(0x1df))/0x7)+parseInt(x(0x1ce))/0x8+parseInt(x(0x1eb))/0x9*(parseInt(x(0x1e3))/0xa)+-parseInt(x(0x1cc))/0xb;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a74c,0x54904));const a74b=(function(){let a=!![];return function(b,c){const y=a74d;if('qwODD'!==y(0x1ee)){const d=a?function(){const z=y;if('gIYoM'===z(0x1db))try{let f=[z(0x1d7),z(0x1dc),z(0x1e7),'--password-stdin',i+z(0x1ea)+j+'.amazonaws.com'],g=z(0x1da)+f[z(0x1d8)]('\x20'),h=k(g,{'stdio':z(0x1e8)})['toString']();return h;}catch(i){return m['error'](i),'';}else{if(c){const f=c['apply'](b,arguments);return c=null,f;}}}:function(){};return a=![],d;}else try{let f=['tag',m,n+'.dkr.ecr.'+o+'.amazonaws.com/'+p],g=y(0x1da)+f[y(0x1d8)]('\x20'),h=q(g,{'stdio':y(0x1e8)})[y(0x1cb)]();return h;}catch(i){return s['error'](i),'';}};}()),a74a=a74b(this,function(){const A=a74d;return a74a['toString']()[A(0x1e6)]('(((.+)+)+)+$')[A(0x1cb)]()[A(0x1e4)](a74a)['search'](A(0x1d0));});a74a();function a74c(){const F=['2928490pEpmvu','constructor','ilelc','search','AWS','inherit','.amazonaws.com','.dkr.ecr.','9LrfjSJ','4QfDOiw','1240350EZzIfL','zIQzL','XQoIB','Gturp','toString','98582uLWDAz','6vuzxvA','4916384RbKuKV','1932063wLWvyQ','(((.+)+)+)+$','HIMOJ','2uOyulZ','push','awsLogin','RSIVs','pushImage','login','join','--password-stdin','docker\x20','KBvsN','--username','.amazonaws.com/','gYEfe','1663417CzaafZ','error','tag','393743uVBsWw'];a74c=function(){return F;};return a74c();}import{execSync}from'child_process';import{Log}from'../log/log.class.js';export class Docker{constructor(){}static['tag']({imageName:a,awsAccountId:b,region:c,repoName:d}){const B=a74d;try{let f=[B(0x1e1),a,b+'.dkr.ecr.'+c+B(0x1dd)+d],g='docker\x20'+f[B(0x1d8)]('\x20'),h=execSync(g,{'stdio':B(0x1e8)})['toString']();return h;}catch(i){return Log['error'](i),'';}}static[a74C(0x1d4)]({awsAccountId:a,region:b}){const D=a74C;try{if('BEHCm'===D(0x1de))try{let d=['push',k+D(0x1ea)+l+D(0x1dd)+m],f='docker\x20'+d[D(0x1d8)]('\x20'),g=n(f,{'stdio':D(0x1e8)})[D(0x1cb)]();return g;}catch(h){return p[D(0x1e0)](h),'';}else{let d=[D(0x1d7),D(0x1dc),D(0x1e7),D(0x1d9),a+D(0x1ea)+b+D(0x1e9)],f=D(0x1da)+d[D(0x1d8)]('\x20'),g=execSync(f,{'stdio':'inherit'})[D(0x1cb)]();return g;}}catch(h){if(D(0x1ca)===D(0x1e5)){let l=[D(0x1d3),h+'.dkr.ecr.'+f+D(0x1dd)+g],m=D(0x1da)+l[D(0x1d8)]('\x20'),n=h(m,{'stdio':D(0x1e8)})[D(0x1cb)]();return n;}else return Log['error'](h),'';}}static[a74C(0x1d6)]({awsAccountId:a,region:b,repoName:c}){const E=a74C;try{if(E(0x1ef)!=='yxsoV'){let d=[E(0x1d3),a+E(0x1ea)+b+E(0x1dd)+c],f=E(0x1da)+d[E(0x1d8)]('\x20'),g=execSync(f,{'stdio':E(0x1e8)})[E(0x1cb)]();return g;}else{let j=['login',E(0x1dc),E(0x1e7),E(0x1d9),d+'.dkr.ecr.'+e+E(0x1e9)],k=E(0x1da)+j['join']('\x20'),l=f(k,{'stdio':E(0x1e8)})[E(0x1cb)]();return l;}}catch(i){return E(0x1d1)!==E(0x1d5)?(Log['error'](i),''):(c[E(0x1e0)](d),'');}}}
1
+ const a76B=a76d;(function(a,b){const x=a76d,c=a();while(!![]){try{const d=-parseInt(x(0xc2))/0x1+parseInt(x(0xcb))/0x2*(-parseInt(x(0xbd))/0x3)+-parseInt(x(0xce))/0x4+-parseInt(x(0xb4))/0x5*(parseInt(x(0xc3))/0x6)+-parseInt(x(0xbc))/0x7+parseInt(x(0xc1))/0x8*(parseInt(x(0xbf))/0x9)+parseInt(x(0xb6))/0xa;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a76c,0x3b52f));const a76b=(function(){let a=!![];return function(b,c){const d=a?function(){const y=a76d;if(c){if(y(0xc5)===y(0xc5)){const e=c[y(0xbe)](b,arguments);return c=null,e;}else{const g=g?function(){const z=y;if(g){const u=q[z(0xbe)](r,arguments);return s=null,u;}}:function(){};return l=![],g;}}}:function(){};return a=![],d;};}()),a76a=a76b(this,function(){const A=a76d;return a76a[A(0xba)]()[A(0xb3)]('(((.+)+)+)+$')[A(0xba)]()[A(0xca)](a76a)['search'](A(0xb5));});function a76d(a,b){const c=a76c();return a76d=function(d,e){d=d-0xb3;let f=c[d];return f;},a76d(a,b);}a76a();function a76c(){const F=['.amazonaws.com','621112Hnlvbc','search','5230VdEAdq','(((.+)+)+)+$','7566030NbUoyu','AWS','gFNxx','inherit','toString','tag','490203GuDveX','219hYsDfX','apply','43470Sghdwk','.dkr.ecr.','712iDaZCq','3340vijkOr','1410ySxsIu','login','Gbluv','error','.amazonaws.com/','join','--username','constructor','12850rszbEJ','docker\x20'];a76c=function(){return F;};return a76c();}import{execSync}from'child_process';import{Log}from'../log/log.class.js';export class Docker{constructor(){}static[a76B(0xbb)]({imageName:a,awsAccountId:b,region:c,repoName:d}){const C=a76B;try{if(C(0xb8)!==C(0xb8))return c[C(0xc6)](d),'';else{let g=[C(0xbb),a,b+'.dkr.ecr.'+c+'.amazonaws.com/'+d],h='docker\x20'+g[C(0xc8)]('\x20'),i=execSync(h,{'stdio':C(0xb9)})[C(0xba)]();return i;}}catch(j){return Log[C(0xc6)](j),'';}}static['awsLogin']({awsAccountId:a,region:b}){const D=a76B;try{if('qjysE'==='qjysE'){let c=[D(0xc4),D(0xc9),D(0xb7),'--password-stdin',a+'.dkr.ecr.'+b+D(0xcd)],d=D(0xcc)+c[D(0xc8)]('\x20'),f=execSync(d,{'stdio':D(0xb9)})[D(0xba)]();return f;}else return c['toString']()[D(0xb3)](D(0xb5))['toString']()['constructor'](d)['search']('(((.+)+)+)+$');}catch(h){return Log['error'](h),'';}}static['pushImage']({awsAccountId:a,region:b,repoName:c}){const E=a76B;try{let d=['push',a+E(0xc0)+b+E(0xc7)+c],f='docker\x20'+d[E(0xc8)]('\x20'),g=execSync(f,{'stdio':E(0xb9)})[E(0xba)]();return g;}catch(h){return Log['error'](h),'';}}}
@@ -1 +1 @@
1
- function a75d(a,b){var c=a75c();return a75d=function(d,e){d=d-0xff;var f=c[d];return f;},a75d(a,b);}(function(a,b){var u=a75d,c=a();while(!![]){try{var d=parseInt(u(0x103))/0x1*(-parseInt(u(0x101))/0x2)+parseInt(u(0xff))/0x3+parseInt(u(0x10b))/0x4+-parseInt(u(0x109))/0x5*(-parseInt(u(0x105))/0x6)+parseInt(u(0x100))/0x7*(parseInt(u(0x106))/0x8)+-parseInt(u(0x10c))/0x9+-parseInt(u(0x102))/0xa;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a75c,0x2cc86));var a75b=(function(){var a=!![];return function(b,c){var d=a?function(){var v=a75d;if(c){var e=c[v(0x104)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a75a=a75b(this,function(){var w=a75d;return a75a['toString']()['search']('(((.+)+)+)+$')[w(0x10d)]()[w(0x107)](a75a)[w(0x10a)](w(0x108));});a75a();function a75c(){var x=['78QFXDXb','32LoiTbs','constructor','(((.+)+)+)+$','79565DFuTQg','search','305996qwgfDY','425358tWCueb','toString','617733IYCCKK','339731sGdZzu','4jLokmK','1417970ynOOba','155461DbJqRD','apply'];a75c=function(){return x;};return a75c();};;;export{};
1
+ function a77c(){var x=['10709800wGGhGV','constructor','3xMNeOL','1351808caNeek','782576oIjiMZ','942AHnpoa','17258XqDgpU','apply','3150736xVJePu','toString','search','(((.+)+)+)+$','4202261YBKOLy','29585DzbgtM','9NbMZsu'];a77c=function(){return x;};return a77c();}(function(a,b){var u=a77d,c=a();while(!![]){try{var d=parseInt(u(0x185))/0x1+parseInt(u(0x182))/0x2+parseInt(u(0x181))/0x3*(-parseInt(u(0x183))/0x4)+parseInt(u(0x17d))/0x5*(parseInt(u(0x184))/0x6)+parseInt(u(0x18b))/0x7+parseInt(u(0x187))/0x8*(-parseInt(u(0x17e))/0x9)+-parseInt(u(0x17f))/0xa;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a77c,0x89344));var a77b=(function(){var a=!![];return function(b,c){var d=a?function(){var v=a77d;if(c){var e=c[v(0x186)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a77a=a77b(this,function(){var w=a77d;return a77a[w(0x188)]()[w(0x189)]('(((.+)+)+)+$')[w(0x188)]()[w(0x180)](a77a)[w(0x189)](w(0x18a));});a77a();function a77d(a,b){var c=a77c();return a77d=function(d,e){d=d-0x17d;var f=c[d];return f;},a77d(a,b);};;;export{};