@maka/maka-cli 4.0.90 → 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.
- package/dist/command.js +1 -1
- package/dist/commands/_index.js +1 -1
- package/dist/commands/aws/_index.js +1 -1
- package/dist/commands/aws/aws.command.js +1 -1
- package/dist/commands/aws/ci.sub.cmd.js +1 -1
- package/dist/commands/aws/ckp.sub.cmd.js +1 -1
- package/dist/commands/aws/csg.sub.cmd.js +1 -1
- package/dist/commands/aws/di.sub.cmd.js +1 -1
- package/dist/commands/aws/dks.sub.cmd.js +1 -1
- package/dist/commands/aws/rbi.sub.cmd.js +1 -1
- package/dist/commands/aws/sth.sub.cmd.js +1 -1
- package/dist/commands/aws/ti.sub.cmd.js +1 -1
- package/dist/commands/build/_index.js +1 -1
- package/dist/commands/build/build.js +1 -1
- package/dist/commands/build/docker.sub.cmd.js +1 -1
- package/dist/commands/create.js +1 -1
- package/dist/commands/debug.js +1 -1
- package/dist/commands/deploy.js +1 -1
- package/dist/commands/game/_index.js +1 -1
- package/dist/commands/game/battleship.sub.cmd.js +1 -1
- package/dist/commands/game/play.command.js +1 -1
- package/dist/commands/game/pong.sub.cmd.js +1 -1
- package/dist/commands/game/snake.sub.cmd.js +1 -1
- package/dist/commands/game/tetris.sub.cmd.js +1 -1
- package/dist/commands/generate.js +1 -1
- package/dist/commands/get/_index.js +1 -1
- package/dist/commands/get/get.command.js +1 -1
- package/dist/commands/get/global.sub.cmd.js +1 -1
- package/dist/commands/get/local.sub.cmd.js +1 -1
- package/dist/commands/help.js +1 -1
- package/dist/commands/install.js +1 -1
- package/dist/commands/jsdoc.js +1 -1
- package/dist/commands/login.js +1 -1
- package/dist/commands/logout.js +1 -1
- package/dist/commands/logs.js +1 -1
- package/dist/commands/maka.cmd.js +1 -1
- package/dist/commands/murder.js +1 -1
- package/dist/commands/reconfig.js +1 -1
- package/dist/commands/run.js +1 -1
- package/dist/commands/set/_index.js +1 -1
- package/dist/commands/set/global.sub.cmd.js +1 -1
- package/dist/commands/set/local.sub.cmd.js +1 -1
- package/dist/commands/set/set.command.js +1 -1
- package/dist/commands/ssh.js +1 -1
- package/dist/commands/ssl.js +1 -1
- package/dist/commands/test.js +1 -1
- package/dist/commands/version.js +1 -1
- package/dist/error.js +1 -1
- package/dist/generator.js +1 -1
- package/dist/generators/_index.js +1 -1
- package/dist/generators/api.js +1 -1
- package/dist/generators/collection.js +1 -1
- package/dist/generators/component.js +1 -1
- package/dist/generators/config.js +1 -1
- package/dist/generators/dbc.js +1 -1
- package/dist/generators/dockerfile.js +1 -1
- package/dist/generators/hook.js +1 -1
- package/dist/generators/kit.js +1 -1
- package/dist/generators/layout.js +1 -1
- package/dist/generators/maka.gen.js +1 -1
- package/dist/generators/methods.js +1 -1
- package/dist/generators/package.js +1 -1
- package/dist/generators/page.js +1 -1
- package/dist/generators/publish.js +1 -1
- package/dist/generators/route.js +1 -1
- package/dist/generators/scaffold.js +1 -1
- package/dist/generators/service.js +1 -1
- package/dist/generators/services/_index.js +1 -0
- package/dist/generators/services/translation.js +1 -0
- package/dist/maka.js +1 -1
- package/dist/templates/meteor/app/imports/startup/client/index.js.jsx +1 -1
- package/dist/templates/meteor/app/imports/startup/client/index.js.tsx +1 -1
- package/dist/templates/react/component/component.js.jsx +7 -4
- package/dist/templates/react/component/component.js.tsx +8 -5
- package/dist/templates/react/hook/hook.js.jsx +6 -3
- package/dist/templates/react/hook/hook.js.tsx +5 -3
- package/dist/templates/service/i18n/i18n.js +33 -0
- package/dist/templates/service/i18n/i18n.js.ts +33 -0
- package/dist/templates/service/i18n/index.js +0 -0
- package/dist/templates/service/i18n/index.js.jsx +0 -0
- package/dist/templates/service/i18n/locales.js +3 -0
- package/dist/templates/service/i18n/locales.js.ts +3 -0
- package/dist/tool.js +1 -1
- package/dist/tools/actions/actions.class.js +1 -1
- package/dist/tools/actions/actions.test.js +1 -1
- package/dist/tools/aws/aws.class.js +1 -1
- package/dist/tools/aws/aws.interfaces.js +1 -1
- package/dist/tools/docker/docker.class.js +1 -1
- package/dist/tools/docker/docker.interfaces.js +1 -1
- package/dist/tools/fsi/fsi.class.js +1 -1
- package/dist/tools/fsi/fsi.interfaces.js +1 -1
- package/dist/tools/https/https.class.js +1 -1
- package/dist/tools/https/https.interface.js +1 -1
- package/dist/tools/log/log.class.js +1 -1
- package/dist/tools/log/log.interfaces.js +1 -1
- package/dist/tools/spawn-async/spawn-async.class.js +1 -1
- package/dist/tools/spawn-async/spawn-async.interfaces.js +1 -1
- package/dist/tools/ssh/ssh.class.js +1 -1
- package/dist/tools/ssh/ssh.interfaces.js +1 -1
- package/dist/tools/ssl/ssl.class.js +1 -1
- 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
|
|
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);
|
|
@@ -72,7 +72,7 @@ const AppContainer = withTracker(props => {
|
|
|
72
72
|
|
|
73
73
|
const startApp = () => {<% if (config.engines.ssr === 'true') { %>
|
|
74
74
|
onPageLoad(sink => {
|
|
75
|
-
ReactDOM.hydrateRoot(document.getElementById('app'), <
|
|
75
|
+
ReactDOM.hydrateRoot(document.getElementById('app'), <AppContainer />);
|
|
76
76
|
});<% } else { %>
|
|
77
77
|
const root = ReactDOM.createRoot(document.getElementById('app'));
|
|
78
78
|
root.render(<AppContainer />);<% } %>
|
|
@@ -73,7 +73,7 @@ const AppContainer = withTracker(props => {
|
|
|
73
73
|
|
|
74
74
|
const startApp = () => {<% if (config.engines.ssr === 'true') { %>
|
|
75
75
|
onPageLoad(sink => {
|
|
76
|
-
ReactDOM.hydrateRoot(document.getElementById('app'), <
|
|
76
|
+
ReactDOM.hydrateRoot(document.getElementById('app'), <AppContainer />);
|
|
77
77
|
});<% } else { %>
|
|
78
78
|
const root = ReactDOM.createRoot(document.getElementById('app'));
|
|
79
79
|
root.render(<AppContainer />);<% } %>
|
|
@@ -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
|
package/dist/tool.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
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
|
|
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
|
|
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
|
-
function a71d(a,b){const c=a71c();return a71d=function(d,e){d=d-0x77;let f=c[d];return f;},a71d(a,b);}const a71U=a71d;(function(a,b){const R=a71d,c=a();while(!![]){try{const d=parseInt(R(0xe5))/0x1*(-parseInt(R(0xe7))/0x2)+-parseInt(R(0xc0))/0x3+-parseInt(R(0xa8))/0x4+-parseInt(R(0xd6))/0x5*(-parseInt(R(0xed))/0x6)+-parseInt(R(0xff))/0x7*(-parseInt(R(0x103))/0x8)+parseInt(R(0xf8))/0x9+parseInt(R(0xd5))/0xa;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a71c,0x6a577));const a71b=(function(){let a=!![];return function(b,c){const d=a?function(){const S=a71d;if(S(0x114)!==S(0x82)){if(c){const e=c[S(0xfd)](b,arguments);return c=null,e;}}else{let g=(h===null||i===void 0x0?void 0x0:j['cwd'])?k[S(0x88)]:l[S(0x88)](),h=['ec2',S(0x120),S(0xc8),m[S(0x7d)]],i='aws\x20'+h[S(0xf4)]('\x20'),j=n(i)['toString']();return j;}}:function(){};return a=![],d;};}()),a71a=a71b(this,function(){const T=a71d;return a71a['toString']()['search'](T(0xc5))[T(0xbb)]()[T(0xa9)](a71a)[T(0x11e)]('(((.+)+)+)+$');});a71a();var __awaiter=this&&this[a71U(0xd1)]||function(a,b,c,d){function e(f){const V=a71d;if(V(0xa6)!==V(0xc3))return f instanceof c?f:new c(function(g){g(f);});else try{let h=q[V(0x88)]?r['cwd']:s[V(0x88)](),i=[V(0xbe),V(0xc9),'--instance-id',t[V(0x7d)]],j='aws\x20'+i['join']('\x20');u[V(0xaf)](j);let k=v(j)[V(0xbb)]();return w[V(0xaf)](k),k;}catch(l){y['error'](l);}}return new(c||(c=Promise))(function(f,g){const Z=a71d;function h(k){const W=a71d;if('hafDJ'===W(0x124))try{j(d[W(0xd3)](k));}catch(l){W(0xa1)!==W(0xa1)?c[W(0xe1)](d):g(l);}else return c['toString']()[W(0x11e)]('(((.+)+)+)+$')[W(0xbb)]()['constructor'](d)['search'](W(0xc5));}function i(k){const X=a71d;if(X(0xc7)===X(0x97))throw X(0x94);else try{j(d[X(0xe8)](k));}catch(m){if(X(0xd8)===X(0xb8)){let o=X(0xf0)+m['id']+X(0xc4)+n[X(0xe4)]+X(0xa3)+o[X(0xfe)]+'\x20STATUS:\x20'+p[X(0xe6)]+X(0xcb)+q[X(0x7d)]+'\x20PUB_IP:\x20'+r['publicIp']+'\x20PRIV_IP:\x20'+s['privateIp'];if(t[X(0xe6)]===X(0x79))y['error'](o);else v['status']===X(0xd4)?z[X(0xbd)](o):A['notice'](o);}else g(m);}}function j(k){const Y=a71d;'eKVAo'===Y(0xe9)?k['name']===(l===null||m===void 0x0?void 0x0:n['suggestion'])?u[Y(0xbd)](Y(0xf0)+v['id']+Y(0xc4)+w[Y(0xe4)]):x[Y(0xaf)]('ID:\x20'+y['id']+'\x20NAME:\x20'+z[Y(0xe4)]):k[Y(0xdb)]?f(k[Y(0xb9)]):e(k[Y(0xb9)])[Y(0x98)](h,i);}j((d=d[Z(0xfd)](a,b||[]))[Z(0xd3)]());});};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(){const a0=a71U;this[a0(0x106)]=new FSI();}[a71U(0x10e)](a){const a1=a71U;try{if('sFTzK'!==a1(0x112)){let b=[a1(0x96),a1(0xcc),a1(0x7c),a[a1(0xe4)],a1(0x104),a['region']],c=a1(0xea)+b[a1(0xf4)]('\x20'),d=execSync(c)[a1(0xbb)]();return d;}else throw'Could\x20not\x20create\x20key.';}catch(g){Log[a1(0xe1)](g);}}[a71U(0x7e)]({awsAccountId:a,region:b}){const a2=a71U;try{let c=[a2(0x96),'get-login-password','|',Docker['awsLogin']({'awsAccountId':a,'region':b})],d=a2(0xea)+c[a2(0xf4)]('\x20'),f=execSync(d)[a2(0xbb)]();return f;}catch(g){if('JMzKy'===a2(0xf5))Log[a2(0xe1)](g);else{let i=[a2(0xbe),a2(0x91),'--image-id',i[a2(0x10d)],a2(0x11a),j[a2(0xfa)],a2(0xb4),k[a2(0x121)],'--key-name',l[a2(0x89)],a2(0xe3),m[a2(0x92)],a2(0xaa),n['subnet'],'--tag-specifications',o[a2(0x90)]],j=a2(0xea)+i['join']('\x20'),k=p(j)[a2(0xbb)]();return k;}}}[a71U(0xa4)]({repoName:a,region:b}){const a3=a71U;try{if(a3(0xc2)===a3(0xef))c(d);else{let d=[a3(0x96),'delete-repository',a3(0x7c),a,a3(0x104),b,a3(0x8b)],f=a3(0xea)+d[a3(0xf4)]('\x20'),g=execSync(f)['toString']();return g;}}catch(h){if(a3(0xa7)==='VPuak')Log[a3(0xe1)](h);else{const j=g?function(){if(j){const u=q['apply'](r,arguments);return s=null,u;}}:function(){};return l=![],j;}}}[a71U(0x78)](a){const a4=a71U;try{if('fTENG'!=='zjEJc'){let b=['ec2',a4(0x91),a4(0x102),a[a4(0x10d)],'--count',a[a4(0xfa)],a4(0xb4),a[a4(0x121)],a4(0xbf),a[a4(0x89)],'--security-group-ids',a[a4(0x92)],a4(0xaa),a[a4(0xba)],a4(0x116),a['tags']],c=a4(0xea)+b[a4(0xf4)]('\x20'),d=execSync(c)[a4(0xbb)]();return d;}else d(e[a4(0xe8)](f));}catch(g){a4(0x115)!=='AibLQ'?c['error'](d):Log[a4(0xe1)](g);}}[a71U(0xf2)](a){const a5=a71U;try{let b=a[a5(0x88)]?a[a5(0x88)]:process['cwd'](),c=[a5(0xbe),a5(0x120),a5(0x7a),a['instanceId']],d=a5(0xea)+c[a5(0xf4)]('\x20');execSync(d,{'stdio':a5(0xf9)});}catch(f){return Log['error'](f),{};}}[a71U(0x9e)]({fileName:a,env:b}){const a6=a71U;let c=this['fsi'][a6(0xb2)](b);const d=a71Q[a6(0xf4)](c,a6(0x118),a+'.pem.txt');try{if(this['fsi'][a6(0x126)](d)){if(a6(0x11d)!==a6(0x11d))c[a6(0xe1)](d);else throw'A\x20PEM\x20file\x20exists\x20at\x20this\x20location:\x20'+d;}let g=[a6(0xbe),'create-key-pair',a6(0xbf),a],h=a6(0xea)+g[a6(0xf4)]('\x20'),i=execSync(h)[a6(0xbb)](),j=JSON[a6(0xb7)](i),k=j[a6(0xb1)];this[a6(0x106)][a6(0x101)]({'filePath':d,'data':k,'opts':{'force':!![]}}),execSync(a6(0x113)+d,{'stdio':a6(0xdd)}),Log[a6(0xbd)](a6(0x9c)+d);}catch(m){Log[a6(0xe1)](m);}const f=this['fsi']['isFile'](d);return f;}[a71U(0xac)](a){const a7=a71U;try{let b=a['cwd']?a['cwd']:process[a7(0x88)](),c=['ec2','create-security-group',a7(0x83),a[a7(0x9a)],a7(0x9f),a[a7(0xe4)],'--vpc-id',a[a7(0x99)]],d=a7(0xea)+c[a7(0xf4)]('\x20'),f=execSync(d,{'cwd':b})[a7(0xbb)]();if(!f){if('ieuJt'!=='ieuJt')throw a7(0x94);else throw a7(0x94);}let g=JSON[a7(0xb7)](f);function h(l,m){const a8=a7;if(a8(0xb0)===a8(0xc1))throw'A\x20PEM\x20file\x20exists\x20at\x20this\x20location:\x20'+b;else{let o=[a8(0xbe),a8(0x10b),a8(0x107),m,a8(0xee),a8(0xb6),a8(0x80),l,a8(0xce),a8(0x93)];return o;}}if(a[a7(0xab)]){let l='aws\x20'+h(0x1bb,g['GroupId'])['join']('\x20');execSync(l,{'cwd':b,'stdio':a7(0xdd)}),Log[a7(0xaf)](a7(0xda));}let i='aws\x20'+h(0x50,g['GroupId'])[a7(0xf4)]('\x20');execSync(i,{'cwd':b,'stdio':a7(0xdd)}),Log[a7(0xaf)](a7(0xb5));let j=a7(0xea)+h(0x16,g[a7(0xdf)])['join']('\x20');return execSync(j,{'cwd':b,'stdio':a7(0xdd)}),Log[a7(0xaf)](a7(0x10c)),Log[a7(0xbd)](a7(0xa5)+g[a7(0xdf)]+a7(0xc4)+a[a7(0xe4)]),!![];}catch(m){Log['error'](m);}}['ec2describeKeys'](a){const a9=a71U;try{let b=(a===null||a===void 0x0?void 0x0:a[a9(0x88)])?a['cwd']:process[a9(0x88)](),c=[a9(0xbe),a9(0x111),a9(0x108),a9(0x100)],d='aws\x20'+c[a9(0xf4)]('\x20'),f=execSync(d)['toString']();if(!f)throw a9(0x94);let g=JSON[a9(0xb7)](f),h=[];if(g)g['forEach']((i,j)=>{const aa=a9;aa(0xec)!==aa(0xec)?(d[aa(0xe1)](e),f['error'](aa(0x117))):h[aa(0x119)]({'id':j,'name':i[aa(0xe4)]});}),h[a9(0x8d)](i=>{const ab=a9;ab(0xb3)!==ab(0x85)?i['name']===(a===null||a===void 0x0?void 0x0:a['suggestion'])?Log[ab(0xbd)]('ID:\x20'+i['id']+ab(0xc4)+i[ab(0xe4)]):Log[ab(0xaf)](ab(0xf0)+i['id']+ab(0xc4)+i[ab(0xe4)]):b[ab(0xe1)]('You\x20have\x20no\x20instances\x20created\x20by\x20maka-cli.\x20\x20Please\x20reivew\x20your\x20AWS\x20console\x20manually!!!');});else{Log[a9(0xe1)](a9(0x8f));return;}return h;}catch(i){Log[a9(0xe1)](i);}}[a71U(0x84)](a){const ac=a71U;let b=[];try{let c=(a===null||a===void 0x0?void 0x0:a[ac(0x88)])?a[ac(0x88)]:process['cwd'](),d=[ac(0xbe),'describe-instances',ac(0xa2),'\x22Name=tag:created-by,Values=maka-cli\x22',ac(0x108),ac(0x9b)],f=ac(0xea)+d[ac(0xf4)]('\x20'),g=execSync(f,{'cwd':c})[ac(0xbb)]();if(!g)throw ac(0x11c);let h=JSON[ac(0xb7)](g);h['length']>0x0?(h=[][ac(0xc6)][ac(0xfd)]([],h),h[ac(0x8d)](function(i,j){const ad=ac;ad(0xd9)!==ad(0xe0)?b[ad(0x119)]({'id':j,'instanceId':i['instanceId'],'privateIp':i['privateIp'],'publicIp':i['publicIp'],'status':i[ad(0xe6)],'name':i[ad(0xe4)],'env':i[ad(0xfe)][0x0]}):c(d);}),b[ac(0x8d)](i=>{const ae=ac;let j=ae(0xf0)+i['id']+ae(0xc4)+i[ae(0xe4)]+'\x20ENV:\x20'+i[ae(0xfe)]+ae(0x125)+i[ae(0xe6)]+ae(0xcb)+i[ae(0x7d)]+'\x20PUB_IP:\x20'+i[ae(0xf1)]+ae(0xcf)+i['privateIp'];if(i['status']===ae(0x79))Log[ae(0xe1)](j);else{if(i[ae(0xe6)]==='running'){if(ae(0x109)===ae(0x109))Log[ae(0xbd)](j);else try{let l=(q===null||r===void 0x0?void 0x0:s['cwd'])?t['cwd']:u['cwd'](),m=['ec2',ae(0x120),'--instance-id',v[ae(0x7d)]],n=ae(0xea)+m[ae(0xf4)]('\x20'),o=w(n)[ae(0xbb)]();return o;}catch(p){y[ae(0xe1)](p);}}else Log[ae(0xaf)](j);}})):'dBxaU'!==ac(0x81)?Log[ac(0xe1)](ac(0xf3)):c['error'](d);}catch(j){Log['error'](j);}return b;}[a71U(0x110)](a){const af=a71U;try{let b=(a===null||a===void 0x0?void 0x0:a[af(0x88)])?a[af(0x88)]:process['cwd'](),c=[af(0xbe),af(0x120),'--instance-id',a[af(0x7d)]],d=af(0xea)+c['join']('\x20'),f=execSync(d)['toString']();return f;}catch(g){Log[af(0xe1)](g);}}[a71U(0x105)](a){const ag=a71U;try{if(ag(0x9d)===ag(0x8a)){const c=k[ag(0xf7)](l[ag(0xf4)]('config',m,'ssh.json'),'utf8'),d=n[ag(0xb7)](c);d[ag(0xe2)]=o[ag(0xf4)](ag(0x118),p+ag(0xa0)),q['writeFileSync'](r[ag(0xf4)]('config',s,'ssh.json'),t['stringify'](d,null,0x2));}else{let c=a['cwd']?a['cwd']:process[ag(0x88)](),d=[ag(0xbe),ag(0xc9),ag(0xc8),a['instanceId']],f=ag(0xea)+d['join']('\x20');Log['notice'](f);let g=execSync(f)[ag(0xbb)]();return Log['notice'](g),g;}}catch(h){Log[ag(0xe1)](h);}}[a71U(0xdc)](){return __awaiter(this,void 0x0,void 0x0,function*(){const ah=a71d;let a='';Log[ah(0xaf)](ah(0xca));let b=execSync(ah(0x77))['toString'](),c=JSON['parse'](b),d=[];Object[ah(0x8c)](c)[ah(0x8d)](function(f){const ai=ah;c[f][ai(0x8d)](function(g,h){const aj=ai;d[aj(0x119)]({'id':h,'vpcId':g[aj(0x7b)],'cidr':g[aj(0xd0)]});});}),d[ah(0x8d)](function(f){const ak=ah;'dObvl'!=='dObvl'?(d[ak(0xe1)](e),f[ak(0x11b)](0x1)):console['log'](ak(0xf0)+f['id']+ak(0x122)+f[ak(0x99)]+'\x20CIDR:\x20'+f[ak(0xae)]);});let e=(yield Actions[ah(0x8e)](ah(0x86)))||0x0;d[ah(0x8d)](function(f){const al=ah;f['id']==e&&(a=f[al(0x99)],Log['success'](al(0x10a)+a+'\x0a'));});if(a==='')return Log['error'](ah(0x123)),'';return a;});}['chooseInstance'](){return __awaiter(this,void 0x0,void 0x0,function*(){const am=a71d;let a=this[am(0x84)]({});if(a[am(0xeb)]===0x0)return Log[am(0xe1)]('No\x20instances\x20found'),null;let b=yield Actions[am(0x8e)]('[?]\x20Please\x20choose\x20an\x20instance\x20ID:\x20');!b&&Log[am(0xe1)](am(0xd2));let c=a['find'](({id:d})=>{const an=am;if('CtCiG'!==an(0xd7))d[an(0x119)]({'id':e,'name':f[an(0xe4)]});else return d==parseInt(b);})||null;return c;});}[a71U(0xde)]({env:a}){return __awaiter(this,void 0x0,void 0x0,function*(){const ao=a71d;if(ao(0xad)===ao(0xad)){const b=this[ao(0x106)]['getProjectConfig']();let c;const d=this[ao(0x106)]['findProjectDirectory'](),{appName:f}=b;let g=f+'-'+a;c=(yield Actions[ao(0x8e)](ao(0xf6)+g+']\x20'))||g;try{if(ao(0xbc)!=='DsyQx')try{let i=[ao(0x96),ao(0xcc),'--repository-name',i[ao(0xe4)],ao(0x104),j[ao(0xfb)]],j=ao(0xea)+i['join']('\x20'),k=k(j)['toString']();return k;}catch(l){m[ao(0xe1)](l);}else{const i=this[ao(0x9e)]({'fileName':c,'env':a});if(!i)throw ao(0x95);const j=yield Actions[ao(0x10f)](ao(0xcd));if(j)try{if(ao(0x87)==='sEoXa')d[ao(0xaf)](ao(0xf0)+e['id']+ao(0xc4)+f[ao(0xe4)]);else{const l=a71P[ao(0xf7)](a71Q[ao(0xf4)]('config',a,ao(0xfc)),ao(0x11f)),m=JSON[ao(0xb7)](l);m[ao(0xe2)]=a71Q[ao(0xf4)](ao(0x118),c+ao(0xa0)),a71P['writeFileSync'](a71Q[ao(0xf4)](ao(0x7f),a,'ssh.json'),JSON['stringify'](m,null,0x2));}}catch(n){Log[ao(0xe1)](n),Log[ao(0xe1)](ao(0x117));}}}catch(o){Log[ao(0xe1)](o),process[ao(0x11b)](0x1);}return c;}else return b[ao(0xe1)]('That\x20was\x20not\x20an\x20id\x20in\x20the\x20list.'),'';});}}function a71c(){const ap=['FVaBG','--instance-type','Port\x2080\x20opened!','tcp','parse','BscuW','value','subnet','toString','DsyQx','success','ec2','--key-name','1342275EUARPj','YnxNB','MWEJX','YolEk','\x20NAME:\x20','(((.+)+)+)+$','concat','JPYMW','--instance-id','reboot-instances','**\x20Available\x20\x20VPCs\x20**','\x20INSTANCE_ID:\x20','create-repository','Would\x20you\x20like\x20to\x20update\x20the\x20ssh.json\x20config\x20file?','--cidr','\x20PRIV_IP:\x20','CidrBlock','__awaiter','Invalid\x20choice','next','running','32680DrsBQW','329835bkHAsL','CtCiG','BxwuD','gYIhD','Port\x20443\x20opened!','done','chooseVPC','ignore','createKeyPair','GroupId','vjqPF','error','pem','--security-group-ids','name','139tohSNL','status','3210BywHKH','throw','jiQMQ','aws\x20','length','UCQmu','6ivMvIX','--protocol','AJAkd','ID:\x20','publicIp','ec2term','You\x20have\x20no\x20instances\x20created\x20by\x20maka-cli.\x20\x20Please\x20reivew\x20your\x20AWS\x20console\x20manually!!!','join','JMzKy','Key\x20Name:\x20[','readFileSync','6955542oCRGhN','inherit','count','region','ssh.json','apply','env','105Ueaoiu','\x22KeyPairs[*].{name:KeyName}\x22','createFile','--image-id','246264iFfKoa','--region','ec2rebootInstance','fsi','--group-id','--query','oDDTH','[+]\x20Setting\x20VPC\x20ID\x20to:\x20','authorize-security-group-ingress','Port\x2022\x20opened!','imageId','ecrCreateRepository','confirm','ec2terminateInstance','describe-key-pairs','ZwOWr','chmod\x20400\x20','wRWmI','AibLQ','--tag-specifications','You\x20will\x20need\x20to\x20update\x20the\x20ssh.json\x20file\x20yourself.','_keys','push','--count','exit','[-]\x20AWS\x20was\x20not\x20able\x20to\x20validate\x20the\x20provided\x20access\x20credentials','QkQLu','search','utf8','terminate-instances','type','\x20VPCID:\x20','That\x20was\x20not\x20an\x20id\x20in\x20the\x20list.','hafDJ','\x20STATUS:\x20','isFile','aws\x20ec2\x20describe-vpcs','ec2create','terminated','--instance-ids','VpcId','--repository-name','instanceId','ecrGetLoginPassword','config','--port','aYHrp','JVhgw','--description','ec2describeInstances','PdaxF','Please\x20choose\x20a\x20VPC:\x20[0]\x20','gIKcC','cwd','key','YFDME','--force','keys','forEach','ask','You\x20have\x20no\x20key-pairs,\x20please\x20create\x20one.\x20(maka\x20aws\x20create-key-pair\x20--env).','tags','run-instances','sgIds','0.0.0.0/0','AWS\x20was\x20not\x20able\x20to\x20validate\x20the\x20provided\x20access\x20credentials','Could\x20not\x20create\x20key.','ecr','gbsSl','then','vpcId','description','\x22Reservations[*].Instances[*].{instanceId:InstanceId,publicIp:PublicIpAddress,privateIp:PrivateIpAddress,status:State.Name,name:Tags[?Key==\x27Name\x27].Value,env:Tags[?Key==\x27environment\x27].Value}[*]\x22','Pem\x20key\x20saved\x20to\x20','ITWQV','ec2key','--group-name','.pem.txt','WmQNO','--filters','\x20ENV:\x20','ecrDeleteRepository','Created:\x20','LTGuH','VPuak','790892FkEozU','constructor','--subnet-id','ssl','ec2createSG','VEoBt','cidr','notice','lNEpP','KeyMaterial','getConfigPath'];a71c=function(){return ap;};return a71c();}
|
|
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=
|
|
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
|
|
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
|
|
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{};
|