@maka/maka-cli 4.13.20 → 5.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/obf/package.json +1 -1
- package/bundle/obf/src/command.js +1 -1
- package/bundle/obf/src/commands/_index.js +1 -1
- package/bundle/obf/src/commands/ai.js +1 -1
- package/bundle/obf/src/commands/aws/_index.js +1 -1
- package/bundle/obf/src/commands/aws/aws.command.js +1 -1
- package/bundle/obf/src/commands/aws/cecr.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/chz.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/ci.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/ckp.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/csg.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/decr.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/di.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/dkp.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/dsg.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/lecr.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/rbi.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/rdn.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/rkp.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/sth.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/ti.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/build/_index.js +1 -1
- package/bundle/obf/src/commands/build/build.js +1 -1
- package/bundle/obf/src/commands/build/docker.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/create.js +1 -1
- package/bundle/obf/src/commands/debug.js +1 -1
- package/bundle/obf/src/commands/deploy/_index.js +1 -1
- package/bundle/obf/src/commands/deploy/deploy.command.js +1 -1
- package/bundle/obf/src/commands/deploy/galaxy.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/deploy/ubuntu.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/game/_index.js +1 -1
- package/bundle/obf/src/commands/game/battleship.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/game/play.command.js +1 -1
- package/bundle/obf/src/commands/game/pong.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/game/sideQuest/commands/command.js +1 -1
- package/bundle/obf/src/commands/game/sideQuest/commands/drop.js +1 -1
- package/bundle/obf/src/commands/game/sideQuest/commands/equip.js +1 -1
- package/bundle/obf/src/commands/game/sideQuest/commands/go.js +1 -1
- package/bundle/obf/src/commands/game/sideQuest/commands/lock.js +1 -1
- package/bundle/obf/src/commands/game/sideQuest/commands/look.js +1 -1
- package/bundle/obf/src/commands/game/sideQuest/commands/say.js +1 -1
- package/bundle/obf/src/commands/game/sideQuest/commands/search.js +1 -1
- package/bundle/obf/src/commands/game/sideQuest/commands/solve.js +1 -1
- package/bundle/obf/src/commands/game/sideQuest/commands/take.js +1 -1
- package/bundle/obf/src/commands/game/sideQuest/commands/unequip.js +1 -1
- package/bundle/obf/src/commands/game/sideQuest/commands/unlock.js +1 -1
- package/bundle/obf/src/commands/game/sideQuest/commands/use.js +1 -1
- package/bundle/obf/src/commands/game/sideQuest/factories/commandF.js +1 -1
- package/bundle/obf/src/commands/game/sideQuest/factories/roomsF.js +1 -1
- package/bundle/obf/src/commands/game/sideQuest/game.js +1 -1
- package/bundle/obf/src/commands/game/sideQuest/models/_index.js +1 -1
- package/bundle/obf/src/commands/game/sideQuest/models/door.js +1 -1
- package/bundle/obf/src/commands/game/sideQuest/models/inventory.js +1 -1
- package/bundle/obf/src/commands/game/sideQuest/models/item.js +1 -1
- package/bundle/obf/src/commands/game/sideQuest/models/npc.js +1 -1
- package/bundle/obf/src/commands/game/sideQuest/models/player.js +1 -1
- package/bundle/obf/src/commands/game/sideQuest/models/puzzle.js +1 -1
- package/bundle/obf/src/commands/game/sideQuest/models/room.js +1 -1
- package/bundle/obf/src/commands/game/sideQuest/models/scene.js +1 -1
- package/bundle/obf/src/commands/game/sideQuest/scenes/items.js +1 -1
- package/bundle/obf/src/commands/game/sideQuest/scenes/rooms.js +1 -1
- package/bundle/obf/src/commands/game/sideQuest/types/abstracts.js +1 -1
- package/bundle/obf/src/commands/game/sideQuest/types/enums.js +1 -1
- package/bundle/obf/src/commands/game/sideQuest/types/interfaces.js +1 -1
- package/bundle/obf/src/commands/game/sideQuest/types/types.js +1 -1
- package/bundle/obf/src/commands/game/sideQuest/ui.js +1 -1
- package/bundle/obf/src/commands/game/sideQuest/utilities/logger.js +1 -1
- package/bundle/obf/src/commands/game/sideQuest.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/game/snake.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/game/tetris.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/generate.js +1 -1
- package/bundle/obf/src/commands/get/_index.js +1 -1
- package/bundle/obf/src/commands/get/get.command.js +1 -1
- package/bundle/obf/src/commands/get/global.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/get/local.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/get/whoami.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/help.js +1 -1
- package/bundle/obf/src/commands/install.js +1 -1
- package/bundle/obf/src/commands/jsdoc.js +1 -1
- package/bundle/obf/src/commands/lint.js +1 -1
- package/bundle/obf/src/commands/login.js +1 -1
- package/bundle/obf/src/commands/logout.js +1 -1
- package/bundle/obf/src/commands/logs.js +1 -1
- package/bundle/obf/src/commands/maka.cmd.js +1 -1
- package/bundle/obf/src/commands/murder.js +1 -1
- package/bundle/obf/src/commands/patreon.js +1 -1
- package/bundle/obf/src/commands/profile.js +1 -1
- package/bundle/obf/src/commands/proxy.js +1 -1
- package/bundle/obf/src/commands/reconfig.js +1 -1
- package/bundle/obf/src/commands/register.js +1 -1
- package/bundle/obf/src/commands/run/_index.js +1 -1
- package/bundle/obf/src/commands/run/docker.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/run/run.command.js +1 -1
- package/bundle/obf/src/commands/set/_index.js +1 -1
- package/bundle/obf/src/commands/set/global.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/set/local.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/set/set.command.js +1 -1
- package/bundle/obf/src/commands/ssh.js +1 -1
- package/bundle/obf/src/commands/ssl.js +1 -1
- package/bundle/obf/src/commands/test.js +1 -1
- package/bundle/obf/src/commands/undo.js +1 -1
- package/bundle/obf/src/commands/version.js +1 -1
- package/bundle/obf/src/error.js +1 -1
- package/bundle/obf/src/exec.js +1 -1
- package/bundle/obf/src/generator.js +1 -1
- package/bundle/obf/src/generators/_index.js +1 -1
- package/bundle/obf/src/generators/api.js +1 -1
- package/bundle/obf/src/generators/aws/_index.js +1 -1
- package/bundle/obf/src/generators/aws/aws.js +1 -1
- package/bundle/obf/src/generators/aws/cloudformation/_index.js +1 -1
- package/bundle/obf/src/generators/aws/cloudformation/cloudformation.js +1 -1
- package/bundle/obf/src/generators/aws/cloudformation/create-ec2-instance.cf.gen.js +1 -1
- package/bundle/obf/src/generators/collection.js +1 -1
- package/bundle/obf/src/generators/component.js +1 -1
- package/bundle/obf/src/generators/config.js +1 -1
- package/bundle/obf/src/generators/dbc.js +1 -1
- package/bundle/obf/src/generators/dockerfile.js +1 -1
- package/bundle/obf/src/generators/hook.js +1 -1
- package/bundle/obf/src/generators/kits/_index.js +1 -1
- package/bundle/obf/src/generators/kits/auth/_index.js +1 -1
- package/bundle/obf/src/generators/kits/auth/auth.generator.js +1 -1
- package/bundle/obf/src/generators/kits/auth/basic-meteor.auth.gen.js +1 -1
- package/bundle/obf/src/generators/kits/auth/provider.auth.gen.js +1 -1
- package/bundle/obf/src/generators/kits/esri/_index.js +1 -1
- package/bundle/obf/src/generators/kits/esri/esri.generator.js +1 -1
- package/bundle/obf/src/generators/kits/esri/map.esri.gen.js +1 -1
- package/bundle/obf/src/generators/kits/kit.js +1 -1
- package/bundle/obf/src/generators/kits/mui/_index.js +1 -1
- package/bundle/obf/src/generators/kits/mui/auth.mui.gen.js +1 -1
- package/bundle/obf/src/generators/kits/mui/frame.mui.gen.js +1 -1
- package/bundle/obf/src/generators/kits/mui/mui.generator.js +1 -1
- package/bundle/obf/src/generators/layout.js +1 -1
- package/bundle/obf/src/generators/maka.gen.js +1 -1
- package/bundle/obf/src/generators/methods.js +1 -1
- package/bundle/obf/src/generators/package.js +1 -1
- package/bundle/obf/src/generators/page.js +1 -1
- package/bundle/obf/src/generators/publish.js +1 -1
- package/bundle/obf/src/generators/route.js +1 -1
- package/bundle/obf/src/generators/service.js +1 -1
- package/bundle/obf/src/generators/services/_index.js +1 -1
- package/bundle/obf/src/generators/services/openssl.js +1 -1
- package/bundle/obf/src/generators/services/translation.js +1 -1
- package/bundle/obf/src/maka.js +1 -1
- package/bundle/obf/src/templates/meteor/app/imports/startup/client/index.js.jsx +5 -4
- package/bundle/obf/src/templates/meteor/app/imports/startup/client/index.js.tsx +5 -4
- package/bundle/obf/src/templates/meteor/app/imports/startup/client/routes.js.jsx +24 -43
- package/bundle/obf/src/templates/meteor/app/imports/startup/client/routes.js.tsx +25 -44
- package/bundle/obf/src/templates/meteor/app/imports/startup/lib/index.js.jsx +0 -1
- package/bundle/obf/src/templates/meteor/app/imports/startup/lib/index.js.tsx +0 -1
- package/bundle/obf/src/templates/meteor/app/imports/startup/lib/routes.js.jsx +24 -43
- package/bundle/obf/src/templates/meteor/app/imports/startup/lib/routes.js.tsx +25 -44
- package/bundle/obf/src/templates/meteor/app/imports/startup/server/index.js.jsx +2 -2
- package/bundle/obf/src/templates/meteor/app/imports/startup/server/index.js.tsx +2 -2
- package/bundle/obf/src/templates/react/component/component.js.jsx +4 -1
- package/bundle/obf/src/templates/react/component/component.js.tsx +4 -1
- package/bundle/obf/src/templates/react/hook/hook.js.jsx +4 -2
- package/bundle/obf/src/templates/react/hook/hook.js.tsx +4 -1
- package/bundle/obf/src/templates/react/route/route.js.jsx +2 -5
- package/bundle/obf/src/templates/react/route/route.js.tsx +2 -5
- package/bundle/obf/src/tool.js +1 -1
- package/bundle/obf/src/tools/actions/actions.class.js +1 -1
- package/bundle/obf/src/tools/aws/aws.class.js +1 -1
- package/bundle/obf/src/tools/aws/aws.interfaces.js +1 -1
- package/bundle/obf/src/tools/docker/docker.class.js +1 -1
- package/bundle/obf/src/tools/docker/docker.interfaces.js +1 -1
- package/bundle/obf/src/tools/fsi/fsi.class.js +1 -1
- package/bundle/obf/src/tools/fsi/fsi.interfaces.js +1 -1
- package/bundle/obf/src/tools/https/https.class.js +1 -1
- package/bundle/obf/src/tools/https/https.interface.js +1 -1
- package/bundle/obf/src/tools/log/log.class.js +1 -1
- package/bundle/obf/src/tools/log/log.interfaces.js +1 -1
- package/bundle/obf/src/tools/options/options.class.js +1 -1
- package/bundle/obf/src/tools/progress/progress.class.js +1 -1
- package/bundle/obf/src/tools/spawn-async/spawn-async.class.js +1 -1
- package/bundle/obf/src/tools/spawn-async/spawn-async.interfaces.js +1 -1
- package/bundle/obf/src/tools/ssh/ssh.class.js +1 -1
- package/bundle/obf/src/tools/ssh/ssh.interfaces.js +1 -1
- package/bundle/obf/src/tools/ssl/ssl.class.js +1 -1
- package/package.json +1 -1
|
@@ -1,49 +1,30 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Router, Route,
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* The React Router client and server side routing definitions.
|
|
6
|
-
* @namespace Common.Routes
|
|
7
|
-
* @desc This is the main definition for the react router.
|
|
8
|
-
*/
|
|
9
|
-
|
|
2
|
+
import { BrowserRouter as Router, Routes, Route, Navigate, Outlet } from 'react-router-dom';
|
|
10
3
|
import * as Component from './templates';
|
|
11
4
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
<Router history={ history }>
|
|
35
|
-
{privateRoutes}
|
|
36
|
-
{publicRoutes}
|
|
37
|
-
</Router>
|
|
38
|
-
);
|
|
39
|
-
const PublicRoutes = ({ history }) => (
|
|
40
|
-
<Router history={ history }>
|
|
41
|
-
{publicRoutes}
|
|
5
|
+
// Dummy authentication function
|
|
6
|
+
const useAuth = () => {
|
|
7
|
+
const user = { loggedIn: false }; // Toggle `loggedIn` to simulate auth status
|
|
8
|
+
return { user };
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
// Private route wrapper
|
|
12
|
+
const PrivateRoute = () => {
|
|
13
|
+
const { user } = useAuth();
|
|
14
|
+
return user.loggedIn ? <Outlet/> : <Navigate to="/login" />;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const AppRoutes = () => (
|
|
18
|
+
<Router>
|
|
19
|
+
<Routes>
|
|
20
|
+
<Route path="/" element={<Component.MainLayout />}>
|
|
21
|
+
<Route index element={<Component.Home />} />
|
|
22
|
+
<Route path="*" element={<Component.NotFound />} />
|
|
23
|
+
<Route element={<PrivateRoute />}>
|
|
24
|
+
</Route>
|
|
25
|
+
</Route>
|
|
26
|
+
</Routes>
|
|
42
27
|
</Router>
|
|
43
28
|
);
|
|
44
|
-
const Routes = ({ history }) => {
|
|
45
|
-
let currentUser = null;
|
|
46
|
-
return (currentUser) ? <PrivateRoutes history={history}/> : <PublicRoutes history={history}/>
|
|
47
|
-
}
|
|
48
29
|
|
|
49
|
-
export default
|
|
30
|
+
export default AppRoutes;
|
|
@@ -1,49 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Router, Route,
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* The React Router client and server side routing definitions.
|
|
6
|
-
* @namespace Common.Routes
|
|
7
|
-
* @desc This is the main definition for the react router.
|
|
8
|
-
*/
|
|
9
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BrowserRouter as Router, Routes, Route, Navigate, Outlet } from 'react-router-dom';
|
|
10
3
|
import * as Component from './templates';
|
|
11
4
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
<Router history={ history }>
|
|
35
|
-
{privateRoutes}
|
|
36
|
-
{publicRoutes}
|
|
37
|
-
</Router>
|
|
38
|
-
);
|
|
39
|
-
const PublicRoutes = ({ history }) => (
|
|
40
|
-
<Router history={ history }>
|
|
41
|
-
{publicRoutes}
|
|
5
|
+
// Dummy authentication function
|
|
6
|
+
const useAuth = () => {
|
|
7
|
+
const user = { loggedIn: false }; // Toggle `loggedIn` to simulate auth status
|
|
8
|
+
return { user };
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
// Private route wrapper
|
|
12
|
+
const PrivateRoute = () => {
|
|
13
|
+
const { user } = useAuth();
|
|
14
|
+
return user.loggedIn ? <Outlet/> : <Navigate to="/login" />;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const AppRoutes = () => (
|
|
18
|
+
<Router>
|
|
19
|
+
<Routes>
|
|
20
|
+
<Route path="/" element={<Component.MainLayout />}>
|
|
21
|
+
<Route index element={<Component.Home />} />
|
|
22
|
+
<Route path="*" element={<Component.NotFound />} />
|
|
23
|
+
<Route element={<PrivateRoute />}>
|
|
24
|
+
</Route>
|
|
25
|
+
</Route>
|
|
26
|
+
</Routes>
|
|
42
27
|
</Router>
|
|
43
28
|
);
|
|
44
|
-
const Routes = ({ history }) => {
|
|
45
|
-
let currentUser = null;
|
|
46
|
-
return (currentUser) ? <PrivateRoutes history={history}/> : <PublicRoutes history={history}/>
|
|
47
|
-
}
|
|
48
29
|
|
|
49
|
-
export default
|
|
30
|
+
export default AppRoutes;
|
|
@@ -58,7 +58,7 @@ if (typeList.length > 0 && resolverList.length > 0) {
|
|
|
58
58
|
}<% } %>
|
|
59
59
|
<% if (config.engines.ssr === 'true') { %>
|
|
60
60
|
/************* SSR Code ********************/
|
|
61
|
-
import
|
|
61
|
+
import AppRoutes from '../lib/routes';
|
|
62
62
|
import React from 'react';
|
|
63
63
|
import { renderToStaticMarkup } from 'react-dom/server';
|
|
64
64
|
import { onPageLoad } from 'meteor/server-render';
|
|
@@ -100,7 +100,7 @@ onPageLoad((sink) => {
|
|
|
100
100
|
<StaticRouter
|
|
101
101
|
location={props.location}
|
|
102
102
|
context={{}}>
|
|
103
|
-
<
|
|
103
|
+
<AppRoutes history={history}/>
|
|
104
104
|
</StaticRouter>
|
|
105
105
|
);<% if (config.engines.theme === 'material') { if (config.engines.graphql === 'apollo') { %>
|
|
106
106
|
renderToStringWithData(
|
|
@@ -58,7 +58,7 @@ if (typeList.length > 0 && resolverList.length > 0) {
|
|
|
58
58
|
}<% } %>
|
|
59
59
|
<% if (config.engines.ssr === 'true') { %>
|
|
60
60
|
/************* SSR Code ********************/
|
|
61
|
-
import
|
|
61
|
+
import AppRoutes from '../lib/routes';
|
|
62
62
|
import * as React from 'react';
|
|
63
63
|
import { renderToStaticMarkup } from 'react-dom/server';
|
|
64
64
|
import { onPageLoad } from 'meteor/server-render';
|
|
@@ -100,7 +100,7 @@ onPageLoad((sink) => {
|
|
|
100
100
|
<StaticRouter
|
|
101
101
|
location={props.location}
|
|
102
102
|
context={{}}>
|
|
103
|
-
<
|
|
103
|
+
<AppRoutes history={history}/>
|
|
104
104
|
</StaticRouter>
|
|
105
105
|
);<% if (config.engines.theme === 'material') { if (config.engines.graphql === 'apollo') { %>
|
|
106
106
|
renderToStringWithData(
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React, { Component } from 'react';<% if (withTranslations) { %>
|
|
2
2
|
import { withTranslation } from 'react-i18next';<% } %>
|
|
3
|
+
<% if (isLayout) { %>
|
|
4
|
+
import { Outlet } from 'react-router-dom';
|
|
5
|
+
<% }%>
|
|
3
6
|
|
|
4
7
|
class <%= className %> extends Component {
|
|
5
8
|
/**
|
|
@@ -42,7 +45,7 @@ class <%= className %> extends Component {
|
|
|
42
45
|
const { t } = this.props;<% } %>
|
|
43
46
|
return (
|
|
44
47
|
<div id="<%= cssCaseName %>">
|
|
45
|
-
<% if (isLayout) {
|
|
48
|
+
<% if (isLayout) { %><Outlet/><% } else if (withTranslations) { %><h2>{t('example', { page: '<%= myPath %>' } )}</h2><% } else { %><h2>Find me in <%= myPath %></h2><% } %>
|
|
46
49
|
</div>
|
|
47
50
|
);
|
|
48
51
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';<% if (withTranslations) { %>
|
|
2
2
|
import { withTranslation } from 'react-i18next';<% } %>
|
|
3
|
+
<% if (isLayout) { %>
|
|
4
|
+
import { Outlet } from 'react-router-dom';
|
|
5
|
+
<% }%>
|
|
3
6
|
|
|
4
7
|
interface I<%= className %> {
|
|
5
8
|
props: object;
|
|
@@ -47,7 +50,7 @@ class <%= className %> extends React.Component<I<%= className %>> {
|
|
|
47
50
|
const { t } = this.props;<% } %>
|
|
48
51
|
return (
|
|
49
52
|
<div id="<%= cssCaseName %>">
|
|
50
|
-
<% if (isLayout) {
|
|
53
|
+
<% if (isLayout) { %><Outlet/><% } else if (withTranslations) { %><h2>{t('example', { page: '<%= myPath %>' } )}</h2><% } else { %><h2>Find me in <%= myPath %></h2><% } %>
|
|
51
54
|
</div>
|
|
52
55
|
);
|
|
53
56
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React, { useState } from 'react'<%if (withTranslations) { %>
|
|
2
2
|
import { useTranslation } from 'react-i18next';<% } %>
|
|
3
|
-
|
|
3
|
+
<% if (isLayout) { %>
|
|
4
|
+
import { Outlet } from 'react-router-dom';
|
|
5
|
+
<% }%>
|
|
4
6
|
|
|
5
7
|
function <%= className %>(props) {
|
|
6
8
|
<% if(graphql === 'apollo') { %>
|
|
@@ -9,7 +11,7 @@ function <%= className %>(props) {
|
|
|
9
11
|
|
|
10
12
|
return (
|
|
11
13
|
<div id="<%= cssCaseName %>">
|
|
12
|
-
<% if (isLayout) {
|
|
14
|
+
<% if (isLayout) { %><Outlet /><% } else if (withTranslations) { %><h2>{t('example', { page: '<%= myPath %>' } )}</h2><% } else { %><h2>Find me in <%= myPath %></h2><% } %>
|
|
13
15
|
</div>
|
|
14
16
|
);
|
|
15
17
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';<%if (withTranslations) { %>
|
|
2
2
|
import { useTranslation } from 'react-i18next';<% } %>
|
|
3
|
+
<% if (isLayout) { %>
|
|
4
|
+
import { Outlet } from 'react-router-dom';
|
|
5
|
+
<% }%>
|
|
3
6
|
|
|
4
7
|
function <%= className %>(props) {
|
|
5
8
|
<% if (withTranslations) { %>
|
|
@@ -7,7 +10,7 @@ function <%= className %>(props) {
|
|
|
7
10
|
|
|
8
11
|
return (
|
|
9
12
|
<div id="<%= cssCaseName %>">
|
|
10
|
-
<% if (isLayout) {
|
|
13
|
+
<% if (isLayout) { %><Outlet/><% } else if (withTranslations) { %><h2>{t('example', { page: '<%= myPath %>' } )}</h2><% } else { %><h2>Find me in <%= myPath %></h2><% } %>
|
|
11
14
|
</div>
|
|
12
15
|
);
|
|
13
16
|
}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
<% if (client === 'vanilla') { %>if (this.window.location.pathname === '<%= url %>') {
|
|
2
2
|
import <%= camelCaseName %>Page from '/imports/ui/pages/<%= fileCase %>/<%= fileCase %>';
|
|
3
3
|
}<% } else { %>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
<IndexRoute component={Component.<%= templateName %>}/>
|
|
7
|
-
</Route>
|
|
8
|
-
<% if (newForm) { %>);<% } %><% } %>
|
|
4
|
+
<Route path="<%= url %>" element={Component.<%= templateName %>}/>
|
|
5
|
+
<% } %>
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
<% if (client === 'vanilla') { %>if (this.window.location.pathname === '<%= url %>') {
|
|
2
2
|
import <%= camelCaseName %>Page from '/imports/ui/pages/<%= fileCase %>/<%= fileCase %>';
|
|
3
3
|
}<% } else { %>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
<IndexRoute component={Component.<%= templateName %>}/>
|
|
7
|
-
</Route>
|
|
8
|
-
<% if (newForm) { %>);<% } %><% } %>
|
|
4
|
+
<Route path="<%= url %>" element={Component.<%= templateName %>}/>
|
|
5
|
+
<% } %>
|
package/bundle/obf/src/tool.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a143L=a143d;(function(a,b){const I=a143d,c=a();while(!![]){try{const d
|
|
1
|
+
const a143L=a143d;(function(a,b){const I=a143d,c=a();while(!![]){try{const d=parseInt(I(0xd0))/0x1+parseInt(I(0xcd))/0x2*(-parseInt(I(0x10f))/0x3)+parseInt(I(0xcc))/0x4+parseInt(I(0x109))/0x5+-parseInt(I(0xc2))/0x6*(parseInt(I(0x100))/0x7)+parseInt(I(0xe0))/0x8*(-parseInt(I(0xc3))/0x9)+parseInt(I(0xe4))/0xa;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a143c,0xe5888));const a143b=(function(){let a=!![];return function(b,c){const d=a?function(){const J=a143d;if(c){const e=c[J(0x101)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a143a=a143b(this,function(){const K=a143d;return a143a[K(0xcb)]()[K(0xe8)](K(0x10c))[K(0xcb)]()[K(0xfa)](a143a)['search'](K(0x10c));});a143a();import a143e from'path';import a143f from'os';import a143g from'fs';const homeDir=a143f[a143L(0xd1)]();import{Docker}from'./tools/docker/docker.class.js';import{FSI}from'./tools/fsi/fsi.class.js';import{Log}from'./tools/log/log.class.js';import{Actions}from'./tools/actions/actions.class.js';function a143d(a,b){const c=a143c();return a143d=function(d,e){d=d-0xbb;let f=c[d];return f;},a143d(a,b);}function a143c(){const a5=['getMakaProjectConfig','remapShortToLong','533384CwNSRR','includes','Local','resourceName','18991220tTStHS','docker','parent','Please\x20provide\x20a\x20valid\x20argument\x20for\x20','search','experimental','.meteor','\x20version\x20','domainLicense','aliases','indexOf','getAppProjectConfigs','formatToNamedParam','config','Invalid\x20value\x20for\x20','error','roles','guest','getPro','validateEngines','Please\x20choose\x20a\x20valid\x20value\x20for\x20','length','constructor','validateMeteorInstall','fsi','join','description','exit','262017cUIglg','apply','Please\x20provide\x20a\x20value\x20for\x20','validateMakaProject','NIE','ask','Please\x20provide\x20a\x20resource\x20name:','win32','dir','5189300OYgPeK','charAt','help','(((.+)+)+)+$','existsSync','isCommand','156BmZloc','isGenerator','find','No\x20usage\x20provided.','push','No\x20description\x20provided.','name','map','AppData','\x22,\x20please\x20upgrade\x20to\x20PRO\x20by\x20becoming\x20a\x20pateron\x20@\x20patreon.com/user?u=110174702,\x20then\x20issue:\x20\x27maka\x20login\x27','keys','234DkkLzq','36kkfXkB','proCommands','shortDesc','You\x20must\x20have\x20','_handler','concat','isPro','options','toString','1168212mnIZDl','60178EGxuuy','validateUserIsLoggedIn','validateMakaSubscription','1002262AMzebg','homedir','usage','user','env','match','Invalid\x20argument:\x20','Please\x20choose\x20an\x20environment','\x20installed\x20to\x20use\x20this\x20command.','To\x20use\x20this\x20command,\x20\x22','string','list','singleLicense','local'];a143c=function(){return a5;};return a143c();}import{UsageError}from'./error.js';export class Tool{[a143L(0xe5)];[a143L(0xfc)];[a143L(0xca)];[a143L(0xbd)];[a143L(0xe6)];[a143L(0xc7)];constructor(){const M=a143L;this[M(0xe5)]=new Docker(),this['fsi']=new FSI();}['getShortName'](a){const N=a143L;return a[N(0x10a)](0x0);}[a143L(0xdf)](a,b){const O=a143L,c=this[O(0xf0)](b),d={...a};for(const e of c){const f=this['getShortName'](e['name']);a[f]&&(d[e[O(0xbd)]]=a[f],delete d[f]);}return d;}['formatToNamedParam'](a){const P=a143L;if(a['every'](b=>typeof b===P(0xda)))return a[P(0xbe)](b=>({'name':b}));return a;}[a143L(0xd5)](a){const Q=a143L,b=[this[Q(0xbd)]][Q(0xc8)](this[Q(0xca)][Q(0xed)]||[]);return this[Q(0xe6)]&&b[Q(0xbb)](this[Q(0xe6)]),b[Q(0xe1)](a);}[a143L(0x103)](){const R=a143L,a=this[R(0xfc)]['findProjectDirectory']();return a!==![]?!![]:![];}async[a143L(0xce)](){const S=a143L,a=await this[S(0xfc)]['getPro']();return a?.[S(0xd3)]&&a?.[S(0xd3)]!==S(0xf5)?!![]:![];}[a143L(0xfb)](){const T=a143L,a=process['platform']===T(0x107);if(a){if(!a143g['existsSync'](a143e[T(0xfd)](homeDir,T(0xbf),T(0xe2),T(0xea))))return![];}else{if(!a143g[T(0x10d)](a143e[T(0xfd)](homeDir,'.meteor')))return![];}return!![];}[a143L(0xf7)](a){const U=a143L,b=this[U(0xfc)][U(0xde)](),c=b['engines'],d=Object[U(0xc1)](a);if(d[U(0xf9)]>0x0)for(const e of d){const f=c[e];if(f!==a[e]){Log['error'](U(0xc6)+e+U(0xeb)+a[e]+U(0xd8));throw UsageError;}}}async['validateParams'](a,b,c){const V=a143L,{requiredOpts:d,validArgs:e,validOpts:f,noNeedResource:g}=c,h=Object[V(0xc1)](b);if(h[V(0xe1)]('resourceName')&&b[V(0xe3)]===undefined&&!g){const m=await Actions['ask'](V(0x106));b[V(0xe3)]=m;}let i=[],j=b;if(d){i=this[V(0xf0)](d),j=this[V(0xdf)](b,i);if(i&&i?.['length']>0x0)for(const n of i){const {name:o,values:p,regex:q}=n;if(!Object[V(0xc1)](j)[V(0xe1)](o)){if(o===V(0xd4)){const r=this[V(0xfc)][V(0xef)]()['filter'](t=>t!==V(0xdd));r[V(0xf9)]===0x0&&(Log[V(0xf3)]('This\x20command\x20needs\x20a\x20higher\x20environment\x20to\x20run\x20(other\x20than\x20local).\x20Please\x20create\x20a\x20new\x20environment;\x20`maka\x20g:config\x20development`'),process[V(0xff)](0x1));const s=await Actions[V(0xca)]({'type':V(0xdb),'name':V(0xd4),'message':V(0xd7),'choices':r});b[V(0xd4)]=s[V(0xd4)];}else{const t=p;if(t){const u=await Actions[V(0xca)]({'type':V(0xdb),'name':o,'message':'Please\x20choose\x20a\x20value\x20for\x20'+o,'choices':p});b[o]=u[o];}else{if(q){const v=await Actions[V(0x105)]('Please\x20provide\x20a\x20value\x20for\x20'+o);if(v[V(0xd5)](q))b[o]=v;else{Log['error']('Invalid\x20value\x20for\x20'+o+':\x20'+v);throw new UsageError();}}else{const w=await Actions[V(0x105)](V(0x102)+o);b[o]=w;}}}}else{const x=j[o];if(p&&!p['includes'](x)){Log[V(0xf3)](V(0xf2)+o+':\x20'+x);throw new UsageError();}}}}let k=this[V(0xf0)](f),l=b;if(k&&Object[V(0xc1)](k)?.[V(0xf9)]>0x0){k=k[V(0xc8)](i||[]),k[V(0xbb)]({'name':V(0xe3),'hidden':!![]}),k[V(0xbb)]({'name':V(0x10b),'boolFlag':!![]}),k[V(0xbb)]({'name':V(0x108),'hidden':!![]}),k[V(0xbb)]({'name':'cwd','hidden':!![]}),k[V(0xbb)]({'name':'root','hidden':!![]}),k[V(0xbb)]({'name':V(0xf1),'hidden':!![]}),l=this[V(0xdf)](b,k);for(const y of k){const {name:z,values:A}=y,B=l[z];if(B!==undefined&&(!A||!A[V(0xe1)](B))){const C=A;if(C){const D=await Actions[V(0xca)]({'type':V(0xdb),'name':z,'message':V(0xf8)+z,'choices':A});l[z]=D[z];}}if(k[V(0xf9)]>0x0)for(const E of Object['keys'](l)){const F=k[V(0x111)](G=>G['name']===E);if(!F){Log[V(0xf3)]('Invalid\x20option:\x20'+E);throw new UsageError();}}}}if(e&&e?.[V(0xf9)]>0x0)for(const G of e){if(!e['includes'](G)){Log['error'](V(0xd6)+G);const H=await Actions[V(0x105)](V(0xe7)+G);a[a[V(0xee)](G)]=H;}}return Object['assign'](j,l);}async[a143L(0xcf)](a){const W=a143L;try{if(!a)return;const b=await this[W(0xfc)][W(0xf6)]();!b&&(Log['error']('License\x20error,\x20you\x20may\x20need\x20to\x20re-login\x20or\x20delete\x20your\x20~/.meteor/.maka/global-config.json\x20file\x20to\x20regenerate\x20a\x20free\x20license.'),process['exit'](0x1));const c=!b?.['roles'][W(0xe1)](W(0xdc))&&!b?.[W(0xf4)][W(0xe1)](W(0xec));if(this[W(0x10e)](a)){const d=W(0xd9)+a['name']+W(0xc0);if(a[W(0xca)]['disableAuthCheck'])return;const f=b?.['proCommands']['includes'](a[W(0xbd)])||b?.[W(0xc4)][W(0xe1)](a[W(0xe6)]||'')||this[W(0xca)][W(0xc9)];if(f&&c)throw d;}else{if(this[W(0x110)](a)){const g=b?.['proGenerators']['includes'](a['name'])||b?.['proGenerators']['includes'](a[W(0xe6)]||'');if(g&&c)throw'To\x20use\x20this\x20generator,\x20\x22'+a[W(0xbd)]+W(0xc0);}}}catch(h){Log['error'](h),process[W(0xff)](0x1);}}[a143L(0x10e)](a){const X=a143L;return X(0xca)in a;}[a143L(0x110)](a){const Y=a143L;return!(Y(0xca)in a);}[a143L(0xfe)](){const Z=a143L;return this[Z(0xca)]['description']||this[Z(0xca)][Z(0xc5)]||Z(0xbc);}[a143L(0xc5)](){const a0=a143L;return this['options'][a0(0xc5)]||a0(0x104);}[a143L(0xd2)](){const a1=a143L;return this[a1(0xca)]['usage']||a1(0x112);}['examples'](){const a2=a143L;return this[a2(0xca)]['examples']||[];}[a143L(0xed)](){const a3=a143L;return this[a3(0xca)]['aliases']||'None';}['experimental'](){const a4=a143L;return this[a4(0xca)][a4(0xe9)]||![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a144d(a,b){const c=a144c();return a144d=function(d,e){d=d-0xbc;let f=c[d];return f;},a144d(a,b);}const a144j=a144d;(function(a,b){const f=a144d,c=a();while(!![]){try{const d=-parseInt(f(0xbf))/0x1+parseInt(f(0xc1))/0x2+-parseInt(f(0xcb))/0x3+-parseInt(f(0xc9))/0x4+parseInt(f(0xc4))/0x5+-parseInt(f(0xcd))/0x6*(parseInt(f(0xca))/0x7)+parseInt(f(0xc2))/0x8*(parseInt(f(0xc6))/0x9);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a144c,0x1e04d));const a144b=(function(){let a=!![];return function(b,c){const d=a?function(){const g=a144d;if(c){const e=c[g(0xbe)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a144a=a144b(this,function(){const h=a144d;return a144a[h(0xbd)]()[h(0xc0)](h(0xcc))[h(0xbd)]()[h(0xbc)](a144a)[h(0xc0)]('(((.+)+)+)+$');});a144a();function a144c(){const m=['(((.+)+)+)+$','6IAHXZZ','constructor','toString','apply','27226vbjktV','search','382836LfKaxw','6136DsZMZh','prompt','903300cGlyIw','confirm','2061vVwNuU','answer','password','957544kIhemz','36092QpCmza','458988YyHCuE'];a144c=function(){return m;};return a144c();}import a144e from'inquirer';export class Actions{static async['ask'](a,b){const i=a144d,{answer:c}=await a144e[i(0xc3)]({'type':b?i(0xc8):'input','name':'answer','message':a});return c;}static async[a144j(0xc5)](a,b=![]){const k=a144j,{answer:c}=await a144e[k(0xc3)]({'type':k(0xc5),'name':k(0xc7),'message':a,'default':b});return c;}static async['options'](a){const l=a144j,b=await a144e[l(0xc3)](a);return b;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a145v=a145d;(function(a,b){const p=a145d,c=a();while(!![]){try{const d=parseInt(p(0x16c))/0x1+-parseInt(p(0x15e))/0x2+parseInt(p(0x12e))/0x3+parseInt(p(0xe9))/0x4+parseInt(p(0xcb))/0x5+parseInt(p(0xd2))/0x6*(-parseInt(p(0x132))/0x7)+parseInt(p(0xae))/0x8*(-parseInt(p(0xbd))/0x9);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a145c,0x2a41c));const a145b=(function(){let a=!![];return function(b,c){const d=a?function(){const q=a145d;if(c){const e=c[q(0x11c)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a145a=a145b(this,function(){const r=a145d;return a145a[r(0x156)]()[r(0x106)](r(0x119))[r(0x156)]()[r(0x176)](a145a)[r(0x106)](r(0x119));});function a145c(){const a8=['userData','find','ec2create','listAvailableAMIs',',\x20Name:\x20','15138lFyOqr','split','warn','\x20SGID:\x20','log','getSubnetCidr','Created:\x20','description','type','That\x20was\x20not\x20an\x20id\x20in\x20the\x20list.','subnet-id','\x20SG\x20NAME:\x20','Failed\x20to\x20create\x20repository\x20in\x20','now','1265560OnkZmI','image-type','map','instance','You\x20will\x20need\x20to\x20update\x20the\x20ssh.json\x20file\x20yourself.','There\x20was\x20an\x20error\x20registering\x20the\x20domain\x20name','CidrBlock','34290ZseEtJ','\x20:\x20','withSpinner','Pem\x20key\x20saved\x20to\x20','Value','AVAILABLE','vpcId','environment','authorizationToken','subnetId','race','\x20to\x20','utf8','ap-south-2','Processing\x20','name','sgIds','Hosted\x20zone\x20created\x20successfully!','terminated','.pem.txt','template','slice','$response','1376296cFQOAf','root-device-type','sgId','ID:\x20','ingressRule','createKeyPairEC2Key','listHostedZonesByName','listAllEcrRepositories','cidr','eu-central-1','Authorization\x20data\x20is\x20empty','readFileSync','nextToken','CreationDate','us-east-2','HostedZones',',\x20URI:\x20','GroupId','send','getSecurityGroups','instanceId','config/ssh.json','chmod\x20400\x20','Failed\x20to\x20decode\x20password\x20from\x20authorization\x20token','\x22\x20created\x20successfully\x20in\x20','isFile','tags','join','Description','search','virtualization-type','chooseVPC','from','reason','Please\x20choose\x20a\x20SG\x20to\x20assign\x20the\x20instance\x20to:\x20[','Availability','statusCode','Canonical*Ubuntu*20.04*','\x20VPCID:\x20','\x20NAME:\x20','ap-southeast-3','message','machine','_keys','\x27\x20has\x20been\x20registered\x20successfully.','architecture','getMakaProjectConfig','Prices','(((.+)+)+)+$','Canonical*Ubuntu*18.04*','status','apply','\x20ENV:\x20','us-west-2','No\x20subnets\x20found.','Timeout\x20while\x20processing\x20','getTime','registerDomain','\x20DESCRIPTION:\x20','UPSERT','maka-cli','date','trim','**\x20Available\x20Security\x20Groups\x20**','suggestion','eu-south-1','ca-west-1','Setting\x20SG\x20ID\x20to:\x20','file://','351633xdlQon','ca-central-1','\x20Status\x20Code:\x20','stringify','196UKiiIy','bright','eu-west-3','ecrCreateRepository','filter','No\x20suitable\x20images\x20found\x20within\x20the\x20last\x2030\x20days.','region','RegistrationPrice','repositoryUri','createKeyPair','us-west-1','You\x20have\x20no\x20key-pairs,\x20please\x20create\x20one.\x20(maka\x20aws\x20create-key-pair\x20--env).','\x20INSTANCE_ID:\x20','ssh.json','Instances','ImageId','Setting\x20AMI\x20ID\x20to\x20','us-east-1','notice','Repository\x20\x22','No\x20instances\x20found','sgPorts','0.0.0.0/0','minCount','Successfully\x20linked\x20EC2\x20instance\x20','me-central-1','ap-east-1','desc','Please\x20choose\x20an\x20AMI\x20ID\x20to\x20assign\x20the\x20instance\x20to:\x20[0]\x20','Please\x20choose\x20a\x20VPC:\x20[0]\x20','KeyName','\x20AZONE:\x20','changeResourceRecordSets','ignore','ask','KeyMaterial','toString','$metadata','listAvailableSubnets','...','Error\x20fetching\x20domain\x20pricing:','linkEC2ToRoute53','repositories','\x20opened!','374444lTmNOF','SubnetId','AvailabilityZone','deleteKeyPair','privateIp','The\x20domain\x20\x27','pem','/dev/sdh','Error\x20creating\x20hosted\x20zone','success','Error\x20generating\x20key\x20pair','No\x20ECR\x20repositories\x20found\x20across\x20all\x20specified\x20regions.','length','x86_64','255023QhUduO','includes','amiId','[?]\x20Please\x20choose\x20an\x20instance\x20ID:\x20','\x20PUB_IP:\x20','confirm','Invalid\x20choice','authorizationData','**\x20Available\x20\x20VPCs\x20**','No\x20credentials\x20returned\x20from\x20AWS\x20ECR','constructor','\x20Error\x20Rason:\x20','Subnets','\x20CIDR:\x20','Final\x20list\x20of\x20ECR\x20repositories:','il-central-1','forEach','No\x20images\x20found.','\x20SUBNETID:\x20','Instance\x20rebooted!','ap-south-1','exit','ec2rebootInstance','\x20AMIID:\x20','info','AWS\x20was\x20not\x20able\x20to\x20validate\x20the\x20provided\x20access\x20credentials','timeout','Setting\x20Subnet\x20ID\x20to\x20','createFile','tcp','Failed\x20in\x20','key','VpcId','Please\x20choose\x20a\x20subnet\x20ID\x20to\x20assign\x20the\x20instance\x20to:\x20[0]\x20','env','eu-south-2','concat','deleteSecurityGroup','Port\x20','parse','ec2describeInstances','Region:\x20','push','error','ap-southeast-1','ebs','2136OiEpnM','config','ap-northeast-2','uri','[+]\x20Setting\x20VPC\x20ID\x20to:\x20','fsi','repositoryName','publicIp','UserData','eu-central-2'];a145c=function(){return a8;};return a145c();}a145a();import a145e from'fs';import a145f from'path';function a145d(a,b){const c=a145c();return a145d=function(d,e){d=d-0x8c;let f=c[d];return f;},a145d(a,b);}import{execSync}from'child_process';import{Actions}from'../actions/actions.class.js';import{Log}from'../log/log.class.js';import{FSI}from'../fsi/fsi.class.js';import{EC2Client,DescribeInstancesCommand,RunInstancesCommand,TerminateInstancesCommand,CreateKeyPairCommand,AuthorizeSecurityGroupIngressCommand,CreateSecurityGroupCommand,RebootInstancesCommand,DescribeVpcsCommand,DescribeKeyPairsCommand,DeleteKeyPairCommand,DescribeSecurityGroupsCommand,DeleteSecurityGroupCommand,DescribeImagesCommand,DescribeSubnetsCommand}from'@aws-sdk/client-ec2';import{ECRClient,CreateRepositoryCommand,DeleteRepositoryCommand,GetAuthorizationTokenCommand,DescribeRepositoriesCommand}from'@aws-sdk/client-ecr';import{Route53,Route53Client,CreateHostedZoneCommand}from'@aws-sdk/client-route-53';import{Route53Domains,CheckDomainAvailabilityCommand,RegisterDomainCommand,ListPricesCommand}from'@aws-sdk/client-route-53-domains';const client=new EC2Client({}),route53Client=new Route53Client({}),route53=new Route53({}),route53Domains=new Route53Domains({});export class AWS{['fsi'];constructor(){this['fsi']=new FSI();}async['chooseSecurityGroup'](a){const s=a145d;try{const {listIndexId:b,createdSgId:c,sgList:d}=await this[s(0xfc)](a);let f='';if(c===''){Log[s(0x144)](s(0x128)),d['forEach'](function(h){const t=s;h[t(0xe1)]===a?Log[t(0x144)]('ID:\x20'+h['id']+t(0xc8)+h[t(0xe1)]+'\x20SGID:\x20'+h['sgId']):Log[t(0x133)]('ID:\x20'+h['id']+t(0xc8)+h[t(0xe1)]+t(0xc0)+h['sgId']);});const g=await Actions[s(0x154)](s(0x10b)+b+']\x20')||b[s(0x156)]();d[s(0x90)](function(h){const u=s;h['id']===parseInt(g)&&(f=h['sgId'],Log['success'](u(0x12c)+f+'\x0a'));});}else f=c,Log['success'](s(0x12c)+f+'\x0a');if(f==='')throw new Error(s(0xc6));return f;}catch(h){Log['error'](h);throw h;}}async[a145v(0xbb)](){const w=a145v;let a='';try{const b=new EC2Client({}),c={'Filters':[{'Name':w(0x116),'Values':[w(0x16b)]},{'Name':w(0x107),'Values':['hvm']},{'Name':w(0xea),'Values':[w(0xad)]},{'Name':'state','Values':['available']},{'Name':w(0xcc),'Values':[w(0x113)]},{'Name':w(0xc4),'Values':[w(0x11a),w(0x10e)]}]},d=new DescribeImagesCommand(c),{Images:f}=await b[w(0xfb)](d);if(f&&f[w(0x16a)]>0x0){const g=new Date(),h=new Date(g['getTime']()-0x1e*0x18*0x3c*0x3c*0x3e8),i=f[w(0x136)](j=>j[w(0xf6)]&&!j[w(0x105)]?.[w(0x16d)]('UNSUPPORTED')&&new Date(j[w(0xf6)])>h)[w(0xcd)](j=>({'amiId':j[w(0x141)],'desc':j[w(0x105)],'date':j[w(0xf6)]}));if(i['length']>0x0){i['sort']((n,o)=>new Date(o[w(0x126)])[w(0x121)]()-new Date(n['date'])[w(0x121)]());const j=i[w(0xe7)](0x0,0x4),k=j[w(0xcd)]((n,o)=>({'id':o,'amiId':n['amiId'],'desc':n['desc']}));k[w(0x90)](n=>{const x=w;Log[x(0x133)](x(0xec)+n['id']+x(0x97)+n[x(0x16e)]+x(0x123)+n[x(0x14d)]);});const l=await Actions[w(0x154)](w(0x14e))||'0',m=k[w(0xb9)](n=>n['id']===parseInt(l));if(m)a=m[w(0x16e)],Log[w(0x167)](w(0x142)+a+w(0xd3)+m['desc']);else throw Log[w(0xab)]('That\x20was\x20not\x20an\x20id\x20in\x20the\x20list.');}else throw Log[w(0xab)](w(0x137));}else throw Log['error'](w(0x91));}catch(n){Log[w(0xab)](n);}return a;}async[a145v(0x158)](){const y=a145v;let a='';try{const b=new EC2Client({}),c={},d=new DescribeSubnetsCommand(c),{Subnets:f}=await b[y(0xfb)](d);if(f&&f[y(0x16a)]>0x0){const g=f[y(0xcd)]((j,k)=>({'id':k,'cidr':j['CidrBlock'],'az':j[y(0x160)],'subnetId':j[y(0x15f)]}));g['forEach'](j=>{const z=y;Log['bright']('ID:\x20'+j['id']+z(0x8d)+j[z(0xf1)]+z(0x151)+j['az']+z(0x92)+j[z(0xdb)]);});const h=await Actions[y(0x154)](y(0xa1))||'0',i=g[y(0xb9)](j=>j['id']===parseInt(h));if(i)a=i[y(0xdb)],Log[y(0x167)](y(0x9b)+a);else throw Log[y(0xab)]('That\x20was\x20not\x20an\x20id\x20in\x20the\x20list.');}else throw Log[y(0xab)](y(0x11f));}catch(j){Log[y(0xab)](j);}return a;}async[a145v(0xc2)](a){const A=a145v;try{const b=new EC2Client({}),c={'Filters':[{'Name':A(0xc7),'Values':[a]}]},d=new DescribeSubnetsCommand(c),e=await b[A(0xfb)](d);return e[A(0x8c)]&&e[A(0x8c)]['length']>0x0?e[A(0x8c)][0x0][A(0xd1)]||'':'';}catch(f){return Log[A(0xab)](f),'';}}async[a145v(0x135)](a){const B=a145v;try{const b=new ECRClient({'region':a['region']}),c={'repositoryName':a[B(0xe1)]},d=new CreateRepositoryCommand(c),f=await b['send'](d);return Log[B(0x167)](B(0x145)+a[B(0xe1)]+B(0x101)+a[B(0x138)]+'.'),f;}catch(g){Log['error'](B(0xc9)+a[B(0x138)]+':\x20'+g);throw g;}}async[a145v(0xf0)](a){const C=a145v,b=[C(0x143),C(0xf7),C(0x13c),C(0x11e),C(0x94),'ap-northeast-3',C(0xb0),C(0xac),'ap-southeast-2','ap-northeast-1',C(0x12f),C(0xf2),'eu-west-1','eu-west-2',C(0x134),'eu-north-1','sa-east-1','af-south-1',C(0x14c),C(0xdf),C(0x111),'ap-southeast-4',C(0x12b),C(0x12a),C(0xa3),C(0xb7),'me-south-1',C(0x14b),C(0x8f)],c=[C(0x143),C(0xf7),C(0x13c),C(0x11e)],d=a==='all'?b:a?a[C(0xbe)](','):c;let f=[];const g=Log[C(0xd4)]();for(const h of d){g['start'](C(0xe0)+h[C(0x127)]()+C(0x159));const i=new ECRClient({'region':h[C(0x127)]()});try{let j=undefined;do{const k=await Promise[C(0xdc)]([i[C(0xfb)](new DescribeRepositoriesCommand({'nextToken':j})),new Promise(l=>setTimeout(()=>l('timeout'),0x7d0))]);if(k===C(0x9a)){Log['warn'](C(0x120)+h[C(0x127)]()+'.');break;}else k[C(0x15c)]&&k['repositories'][C(0x16a)]>0x0&&(f=f[C(0xa4)](k[C(0x15c)][C(0xcd)](l=>({'name':l[C(0xb4)],'uri':l[C(0x13a)],'region':h[C(0x127)]()}))));j=k[C(0xf5)];}while(j);}catch(l){Log[C(0xab)](C(0x9e)+h['trim']()+':\x20'+l[C(0x112)]);}finally{g['stop']();}}return f['length']>0x0?(console[C(0xc1)](),Log[C(0x167)](C(0x8e)),f[C(0x90)](m=>{const D=C;Log[D(0x98)](D(0xa9)+m[D(0x138)]+D(0xbc)+m[D(0xe1)]+D(0xf9)+m[D(0xb1)]);})):Log[C(0xbf)](C(0x169)),f;}async['route53CreateHostedZone'](a){const E=a145v;try{const b={'CallerReference':''+Date[E(0xca)](),'Name':a},c=new CreateHostedZoneCommand(b);await route53Client[E(0xfb)](c),Log[E(0x167)](E(0xe3));}catch(d){Log[E(0xab)](E(0x166)),console['error'](d);}}async[a145v(0x122)](a,b,c,d){const F=a145v;try{const e={'DomainName':b,'DurationInYears':c,'AutoRenew':d,'AdminContact':a,'RegistrantContact':a,'TechContact':a},f=new RegisterDomainCommand(e);await route53[F(0xfb)](f),Log[F(0x144)](F(0x163)+b+F(0x115));}catch(g){Log[F(0xab)](F(0xd0)),Log['warn']('From\x20AWS:'),console['error'](F(0x130)+g[F(0xe8)][F(0x10d)]),console[F(0xab)](F(0x177)+g[F(0xe8)][F(0x10a)]);}}async['checkDomainAvailability'](a){const G=a145v,b={'DomainName':a},c=new CheckDomainAvailabilityCommand(b),d=await route53Domains[G(0xfb)](c),e=d[G(0x10c)]===G(0xd7);if(e){const f=a[G(0xbe)]('.')['pop'](),g={'MaxItems':0x1,'Tld':f};try{const h=new ListPricesCommand(g),i=await route53Domains[G(0xfb)](h);if(i&&i[G(0x118)]&&i['Prices'][0x0]?.[G(0x139)]){const j=i[G(0x118)][0x0][G(0x139)];return{'available':e,'cost':j};}}catch(k){console[G(0xab)](G(0x15a),k);}}return{'available':e};}async[a145v(0x15b)](a,b,c){const H=a145v;try{const d=await route53[H(0xef)]({'DNSName':c});if(!d?.[H(0xf8)])throw Log[H(0xab)]('Could\x20not\x20find\x20hosted\x20zone');const e=d?.['HostedZones'][0x0]['Id'],f={'ChangeBatch':{'Changes':[{'Action':H(0x124),'ResourceRecordSet':{'Name':c,'Type':'A','TTL':0x12c,'ResourceRecords':[{'Value':b}]}}]},'HostedZoneId':e};await route53[H(0x152)](f),Log[H(0x144)](H(0x14a)+a+H(0xdd)+c);}catch(g){console[H(0xab)]('Error\x20linking\x20EC2\x20to\x20Route\x2053:',g);}}async['getEcrLoginPassword']({awsAccountId:a,region:b}){const I=a145v,c=new ECRClient({'region':b});try{const d=new GetAuthorizationTokenCommand({'registryIds':[a]}),f=await c[I(0xfb)](d);if(!f[I(0x173)]||f[I(0x173)][I(0x16a)]===0x0)throw new Error(I(0xf3));const g=f[I(0x173)][0x0];if(!g[I(0xda)])throw new Error('Authorization\x20token\x20is\x20missing');const h=g[I(0xda)];if(!h)throw new Error(I(0x175));const i=Buffer[I(0x109)](h,'base64')[I(0x156)](),j=i['split'](':')[0x1];if(!j)throw new Error(I(0x100));return j;}catch(k){Log[I(0xab)](k);throw k;}}async['ecrDeleteRepository']({repoName:a,region:b}){const J=a145v,c=new ECRClient({'region':b});try{const d=new DeleteRepositoryCommand({'repositoryName':a,'force':!![]}),f=await c[J(0xfb)](d);return f;}catch(g){Log[J(0xab)](g);throw g;}}async[a145v(0xba)](a){const K=a145v;try{const b={'BlockDeviceMappings':[{'DeviceName':K(0x165),'Ebs':{'VolumeSize':0x64}}],'ImageId':a['imageId'],'InstanceType':a[K(0xc5)],'KeyName':a[K(0x9f)],'MaxCount':a['maxCount'],'MinCount':a[K(0x149)],'SecurityGroupIds':a[K(0xe2)][K(0xbe)](','),'SubnetId':a['subnet'],'TagSpecifications':[{'ResourceType':K(0xce),'Tags':a[K(0x103)]}]};a['userData']&&(b[K(0xb6)]=K(0x12d)+a[K(0xb8)]);const c=new RunInstancesCommand(b),d=await client['send'](c);return d;}catch(f){Log[K(0xab)](f);}}async['ec2terminateInstance'](a){const L=a145v;try{const b={'InstanceIds':[a[L(0xfd)]]},c=new TerminateInstancesCommand(b),d=await client[L(0xfb)](c);return d;}catch(f){return Log[L(0xab)](f),{};}}async['createKeyPairEC2Key']({keyName:a,env:b}){const M=a145v,c=this[M(0xb3)]['getAppConfigPath'](b),d=a145f['join'](c,M(0x114),a+'.pem.txt');try{const f={'KeyName':a},g=new CreateKeyPairCommand(f),h=await client[M(0xfb)](g),i=h[M(0x155)];if(i){await this[M(0xb3)][M(0x9c)]({'filePath':d,'data':i}),execSync(M(0xff)+d,{'stdio':M(0x153)});const j=this[M(0xb3)][M(0x102)](d);if(j)return Log[M(0x167)](M(0xd5)+d),{'keyName':a,'filePath':d};else throw new Error('Error\x20saving\x20pem\x20file,\x20aborting');}else throw new Error(M(0x168));}catch(k){Log[M(0xab)](k),process[M(0x95)](0x1);}}async['ingressRule']({port:a,groupId:b}){const N=a145v,c={'GroupId':b,'IpPermissions':[{'FromPort':a,'IpProtocol':N(0x9d),'IpRanges':[{'CidrIp':N(0x148),'Description':''}],'ToPort':a}]},d=new AuthorizeSecurityGroupIngressCommand(c);return Log[N(0x144)](N(0xa6)+a+N(0x15d)),await client[N(0xfb)](d);}async['ec2createSG'](a){const O=a145v;try{a[O(0xc4)]===''&&(a['description']=await Actions[O(0x154)]('Description:')||'Web\x20App');const b={'Description':a[O(0xc4)],'GroupName':a[O(0xe1)],'VpcId':a[O(0xd8)]},c=new CreateSecurityGroupCommand(b),d=await client[O(0xfb)](c),{GroupId:f}=d;if(!d)throw new Error(O(0x99));f&&a[O(0x147)][O(0x90)](g=>{const P=O;this[P(0xed)]({'port':parseInt(g),'groupId':f});}),Log[O(0x167)](O(0xc3)+f+'\x20NAME:\x20'+a[O(0xe1)]);}catch(g){return Log['error'](g),![];}return!![];}async['ec2describeKeys'](a){const Q=a145v,b=[];try{const c={},d=new DescribeKeyPairsCommand(c),f=await client['send'](d);if(!f)throw Q(0x99);const {KeyPairs:g}=f;g?(g?.['forEach']((h,i)=>{const R=Q;h[R(0x150)]&&b[R(0xaa)]({'id':i,'name':h[R(0x150)]});}),b[Q(0x16a)]>0x0&&b[Q(0x90)](h=>{const S=Q;h[S(0xe1)]===a?.[S(0x129)]?Log[S(0x167)]('ID:\x20'+h['id']+S(0x110)+h[S(0xe1)]):Log[S(0x144)]('ID:\x20'+h['id']+'\x20NAME:\x20'+h['name']);})):Log['error'](Q(0x13d));}catch(h){Log[Q(0xab)](h);}return b;}async[a145v(0x161)](a){const T=a145v;try{const b={'KeyName':a},c=new DeleteKeyPairCommand(b);await client[T(0xfb)](c);}catch(d){Log['error'](d),process[T(0x95)](0x1);}}async[a145v(0xa8)](){const U=a145v,a=[];try{const b={'Filters':[{'Name':'tag:created-by','Values':[U(0x125)]}]},c=new DescribeInstancesCommand(b),d=await client[U(0xfb)](c);d['Reservations']?.[U(0x90)]((f,g)=>{const V=U;if(f?.[V(0x140)]){const {InstanceId:h,PublicIpAddress:i,PrivateIpAddress:j,State:k,KeyName:l,Tags:m}=f['Instances'][0x0],n=m?.[V(0xb9)](({Key:o})=>o===V(0xd9));a[V(0xaa)]({'id':g,'instanceId':h,'privateIp':j,'publicIp':i,'status':k?.['Name'],'name':l,'env':n?.[V(0xd6)]});}}),a[U(0x16a)]>0x0?a[U(0x90)](f=>{const W=U,g='ID:\x20'+f['id']+W(0x110)+f[W(0xe1)]+W(0x11d)+f[W(0xa2)]+'\x20STATUS:\x20'+f['status']+W(0x13e)+f[W(0xfd)]+W(0x170)+f[W(0xb5)]+'\x20PRIV_IP:\x20'+f[W(0x162)];if(f['status']===W(0xe4))Log[W(0xab)](g);else f[W(0x11b)]==='running'?Log[W(0x167)](g):Log[W(0x144)](g);}):Log['error']('You\x20have\x20no\x20instances\x20created\x20by\x20maka-cli.\x20\x20Please\x20reivew\x20your\x20AWS\x20console\x20manually!!!');}catch(f){Log[U(0xab)](f);}return a;}async[a145v(0x96)](a){const X=a145v;try{const b={'InstanceIds':[a[X(0xfd)]]},c=new RebootInstancesCommand(b),d=await client[X(0xfb)](c);return d[X(0x157)]['httpStatusCode']===0xc8&&Log['success'](X(0x93)),d;}catch(f){Log[X(0xab)](f);}}async[a145v(0x108)](){const Y=a145v;let a='';Log[Y(0x144)](Y(0x174));const b=new DescribeVpcsCommand({}),c=await client[Y(0xfb)](b),{Vpcs:d}=c,e=[];d&&d[Y(0x90)]((g,h)=>{const Z=Y;g[Z(0xa0)]&&g['CidrBlock']&&e[Z(0xaa)]({'id':h,'vpcId':g[Z(0xa0)],'cidr':g[Z(0xd1)]});});e[Y(0x90)](function(g){const a0=Y;console[a0(0xc1)](a0(0xec)+g['id']+a0(0x10f)+g[a0(0xd8)]+a0(0x8d)+g[a0(0xf1)]);});const f=await Actions[Y(0x154)](Y(0x14f))||0x0;e['forEach'](function(g){const a1=Y;g['id']==f&&(a=g[a1(0xd8)],Log[a1(0x167)](a1(0xb2)+a+'\x0a'));});if(a==='')return Log[Y(0xab)]('That\x20was\x20not\x20an\x20id\x20in\x20the\x20list.'),'';return a;}async['chooseInstance'](){const a2=a145v,a=await this[a2(0xa8)]();if(a['length']===0x0)return Log['error'](a2(0x146)),null;const b=await Actions[a2(0x154)](a2(0x16f));!b&&(Log[a2(0xab)](a2(0x172)),process[a2(0x95)](0x0));const c=a[a2(0xb9)](({id:d})=>{return d==parseInt(b);})||null;return c;}async[a145v(0x13b)]({env:a}){const a3=a145v,b=this[a3(0xb3)][a3(0x117)](),{appName:c}=b,d=c+'-'+a,f=await Actions[a3(0x154)]('Key\x20Name:\x20['+d+']\x20')||d,{filePath:g}=await this[a3(0xee)]({'keyName':f,'env':a});try{const h=await Actions[a3(0x171)]('Would\x20you\x20like\x20to\x20update\x20the\x20ssh.json\x20config\x20file?',!![]);if(h)try{const i=a145f['join'](a3(0xaf),a,a3(0x13f));!this[a3(0xb3)][a3(0x102)](i)&&await this[a3(0xb3)][a3(0xe6)]({'srcPath':a3(0xfe),'destPath':i,'context':{'app':f}});const j=a145e[a3(0xf4)](a145f[a3(0x104)](a3(0xaf),a,a3(0x13f)),a3(0xde)),k=JSON[a3(0xa7)](j);k[a3(0x164)]=a145f[a3(0x104)](a3(0x114),f+a3(0xe5)),a145e['writeFileSync'](a145f['join']('config',a,a3(0x13f)),JSON[a3(0x131)](k,null,0x2));}catch(l){Log[a3(0xab)](l),Log[a3(0xab)](a3(0xcf));}}catch(m){Log[a3(0xab)](m),process[a3(0x95)](0x1);}return{'keyName':f,'filePath':g};}async['getSecurityGroups'](a){const a4=a145v,b=[],c={},d=new DescribeSecurityGroupsCommand(c),e=await client[a4(0xfb)](d),{SecurityGroups:f}=e;f&&f['forEach'](function(i,j){const a5=a4;i['GroupName']&&i['GroupId']&&b[a5(0xaa)]({'id':j,'name':i['GroupName'],'sgId':i[a5(0xfa)]});});let g='',h=0x0;return b[a4(0x90)](function(i){const a6=a4;i[a6(0xe1)]===a&&(g=i[a6(0xeb)],h=i['id']);}),{'sgList':b,'createdSgId':g,'listIndexId':h};}async[a145v(0xa5)](a){const a7=a145v;try{const b={'GroupId':a},c=new DeleteSecurityGroupCommand(b);await client[a7(0xfb)](c);}catch(d){Log['error'](d),process[a7(0x95)](0x1);}}}
|
|
1
|
+
const a145s=a145d;(function(a,b){const p=a145d,c=a();while(!![]){try{const d=parseInt(p(0x168))/0x1+-parseInt(p(0x118))/0x2*(parseInt(p(0x1e8))/0x3)+-parseInt(p(0x1da))/0x4*(-parseInt(p(0x16a))/0x5)+parseInt(p(0x10b))/0x6+-parseInt(p(0x1de))/0x7+-parseInt(p(0x12e))/0x8+parseInt(p(0x15c))/0x9*(-parseInt(p(0x109))/0xa);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a145c,0xd4782));const a145b=(function(){let a=!![];return function(b,c){const d=a?function(){const q=a145d;if(c){const e=c[q(0x195)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a145a=a145b(this,function(){const r=a145d;return a145a[r(0x14c)]()[r(0x191)](r(0x1a0))[r(0x14c)]()['constructor'](a145a)['search'](r(0x1a0));});a145a();import a145e from'fs';import a145f from'path';import{execSync}from'child_process';import{Actions}from'../actions/actions.class.js';import{Log}from'../log/log.class.js';function a145d(a,b){const c=a145c();return a145d=function(d,e){d=d-0xfd;let f=c[d];return f;},a145d(a,b);}import{FSI}from'../fsi/fsi.class.js';function a145c(){const a9=['Name','Please\x20choose\x20a\x20SG\x20to\x20assign\x20the\x20instance\x20to:\x20[','ca-west-1','getSecurityGroups','eu-north-1','\x20Status\x20Code:\x20','Error\x20generating\x20key\x20pair','x86_64','deleteKeyPair','The\x20domain\x20\x27','chmod\x20400\x20','desc','Repository\x20\x22','**\x20Available\x20\x20VPCs\x20**','authorizationData','Subnets','From\x20AWS:','eu-central-1','sort','key','ImageId','Authorization\x20token\x20is\x20missing','subnetId','\x20to\x20','Error\x20creating\x20hosted\x20zone','ID:\x20','Invalid\x20choice','\x20SGID:\x20','KeyName','toString','maxCount','Value','me-central-1','Error\x20saving\x20pem\x20file,\x20aborting','trim','ssh.json','CidrBlock','error','sa-east-1','join','GroupId','vpcId','name','UNSUPPORTED',',\x20Name:\x20','8424jVyBTY','timeout','date','.pem.txt','filter','length','checkDomainAvailability','Error\x20fetching\x20domain\x20pricing:','UPSERT','/dev/sdh','Please\x20choose\x20a\x20subnet\x20ID\x20to\x20assign\x20the\x20instance\x20to:\x20[0]\x20','terminated','1146775ngpFTA','ca-central-1','335YDWmxq','writeFileSync','...','Could\x20not\x20find\x20hosted\x20zone','pop','eu-west-3','includes','slice','push','Failed\x20to\x20decode\x20password\x20from\x20authorization\x20token','Successfully\x20linked\x20EC2\x20instance\x20','createFile','ec2rebootInstance','\x20STATUS:\x20','all','\x20AMIID:\x20','af-south-1','region','forEach','withSpinner','status','Canonical*Ubuntu*20.04*','\x20Error\x20Rason:\x20','\x20AZONE:\x20','chooseInstance','minCount','machine','sgId','sgIds','\x20PRIV_IP:\x20','Setting\x20Subnet\x20ID\x20to\x20','Pem\x20key\x20saved\x20to\x20','utf8','**\x20Available\x20Security\x20Groups\x20**','getTime','\x22\x20created\x20successfully\x20in\x20','Setting\x20AMI\x20ID\x20to\x20','getMakaProjectConfig','\x20INSTANCE_ID:\x20','search','changeResourceRecordSets','available','ap-east-1','apply','ap-south-2','warn','ap-northeast-1','Authorization\x20data\x20is\x20empty','bright','fsi','hvm','il-central-1','SubnetId','Would\x20you\x20like\x20to\x20update\x20the\x20ssh.json\x20config\x20file?','(((.+)+)+)+$','info','file://','subnet','us-east-1','$response','[?]\x20Please\x20choose\x20an\x20instance\x20ID:\x20','\x20DESCRIPTION:\x20','ingressRule','success','listAllEcrRepositories','VpcId','No\x20images\x20found.','\x20:\x20','confirm','Final\x20list\x20of\x20ECR\x20repositories:','us-east-2','root-device-type','No\x20suitable\x20images\x20found\x20within\x20the\x20last\x2030\x20days.','us-west-1','\x20PUB_IP:\x20','httpStatusCode','chooseVPC','ap-south-1','Key\x20Name:\x20[','getEcrLoginPassword','me-south-1','image-type','Timeout\x20while\x20processing\x20','maka-cli','parse','Description','You\x20have\x20no\x20key-pairs,\x20please\x20create\x20one.\x20(maka\x20aws\x20create-key-pair\x20--env).','description','config/ssh.json','repositoryUri','Created:\x20','\x20CIDR:\x20','Please\x20choose\x20a\x20VPC:\x20[0]\x20','ecrDeleteRepository','UserData','No\x20subnets\x20found.','$metadata','repositories','map','Prices','notice','tags','tcp','Failed\x20to\x20create\x20repository\x20in\x20','config','us-west-2','RegistrationPrice','running','privateIp','No\x20credentials\x20returned\x20from\x20AWS\x20ECR','amiId','split','37792AYOmFT','\x20ENV:\x20','type','ec2create','6328637WfPEGT','log','ask','stringify','ap-southeast-1','Port\x20','GroupName','exit','_keys','template','3FWWgyC','linkEC2ToRoute53','KeyMaterial','userData','ap-northeast-3','Description:','AWS\x20was\x20not\x20able\x20to\x20validate\x20the\x20provided\x20access\x20credentials','readFileSync','AvailabilityZone','Setting\x20SG\x20ID\x20to:\x20','Hosted\x20zone\x20created\x20successfully!','ap-northeast-2','authorizationToken','send','2100MtRieh','Web\x20App','4180278sFGNnQ','Failed\x20in\x20','pem','\x20NAME:\x20','Instances','deleteSecurityGroup','subnet-id','You\x20will\x20need\x20to\x20update\x20the\x20ssh.json\x20file\x20yourself.','cidr','createKeyPairEC2Key','chooseSecurityGroup','find','listAvailableSubnets','431402XgteCA','That\x20was\x20not\x20an\x20id\x20in\x20the\x20list.','state','CreationDate','isFile','createKeyPair','\x20SUBNETID:\x20','from','Availability','publicIp','\x20VPCID:\x20','reason','sgPorts','HostedZones','AVAILABLE','repositoryName','You\x20have\x20no\x20instances\x20created\x20by\x20maka-cli.\x20\x20Please\x20reivew\x20your\x20AWS\x20console\x20manually!!!','imageId','eu-west-2','0.0.0.0/0',',\x20URI:\x20','instanceId','2319024HPpAlL'];a145c=function(){return a9;};return a145c();}import{EC2Client,DescribeInstancesCommand,RunInstancesCommand,TerminateInstancesCommand,CreateKeyPairCommand,AuthorizeSecurityGroupIngressCommand,CreateSecurityGroupCommand,RebootInstancesCommand,DescribeVpcsCommand,DescribeKeyPairsCommand,DeleteKeyPairCommand,DescribeSecurityGroupsCommand,DeleteSecurityGroupCommand,DescribeImagesCommand,DescribeSubnetsCommand}from'@aws-sdk/client-ec2';import{ECRClient,CreateRepositoryCommand,DeleteRepositoryCommand,GetAuthorizationTokenCommand,DescribeRepositoriesCommand}from'@aws-sdk/client-ecr';import{Route53,Route53Client,CreateHostedZoneCommand}from'@aws-sdk/client-route-53';import{Route53Domains,CheckDomainAvailabilityCommand,RegisterDomainCommand,ListPricesCommand}from'@aws-sdk/client-route-53-domains';const client=new EC2Client({}),route53Client=new Route53Client({}),route53=new Route53({}),route53Domains=new Route53Domains({});export class AWS{[a145s(0x19b)];constructor(){const t=a145s;this[t(0x19b)]=new FSI();}async[a145s(0x115)](a){const u=a145s;try{const {listIndexId:b,createdSgId:c,sgList:d}=await this['getSecurityGroups'](a);let f='';if(c===''){Log[u(0x1ce)](u(0x18b)),d[u(0x17c)](function(h){const v=u;h[v(0x159)]===a?Log[v(0x1ce)]('ID:\x20'+h['id']+'\x20SG\x20NAME:\x20'+h['name']+v(0x14a)+h[v(0x185)]):Log[v(0x19a)](v(0x148)+h['id']+'\x20SG\x20NAME:\x20'+h['name']+v(0x14a)+h[v(0x185)]);});const g=await Actions[u(0x1e0)](u(0x130)+b+']\x20')||b[u(0x14c)]();d['forEach'](function(h){const w=u;h['id']===parseInt(g)&&(f=h[w(0x185)],Log['success'](w(0x104)+f+'\x0a'));});}else f=c,Log[u(0x1a9)](u(0x104)+f+'\x0a');if(f==='')throw new Error(u(0x119));return f;}catch(h){Log[u(0x154)](h);throw h;}}async['listAvailableAMIs'](){const x=a145s;let a='';try{const b=new EC2Client({}),c={'Filters':[{'Name':'architecture','Values':[x(0x136)]},{'Name':'virtualization-type','Values':[x(0x19c)]},{'Name':x(0x1b1),'Values':['ebs']},{'Name':x(0x11a),'Values':[x(0x193)]},{'Name':x(0x1bb),'Values':[x(0x184)]},{'Name':'description','Values':['Canonical*Ubuntu*18.04*',x(0x17f)]}]},d=new DescribeImagesCommand(c),{Images:f}=await b[x(0x108)](d);if(f&&f[x(0x161)]>0x0){const g=new Date(),h=new Date(g[x(0x18c)]()-0x1e*0x18*0x3c*0x3c*0x3e8),i=f[x(0x160)](j=>j[x(0x11b)]&&!j[x(0x1bf)]?.[x(0x170)](x(0x15a))&&new Date(j[x(0x11b)])>h)[x(0x1cc)](j=>({'amiId':j[x(0x143)],'desc':j[x(0x1bf)],'date':j['CreationDate']}));if(i['length']>0x0){i[x(0x141)]((n,o)=>new Date(o[x(0x15e)])[x(0x18c)]()-new Date(n[x(0x15e)])[x(0x18c)]());const j=i[x(0x171)](0x0,0x4),k=j[x(0x1cc)]((n,o)=>({'id':o,'amiId':n[x(0x1d8)],'desc':n[x(0x13a)]}));k[x(0x17c)](n=>{const y=x;Log[y(0x19a)]('ID:\x20'+n['id']+y(0x179)+n[y(0x1d8)]+y(0x1a7)+n[y(0x13a)]);});const l=await Actions[x(0x1e0)]('Please\x20choose\x20an\x20AMI\x20ID\x20to\x20assign\x20the\x20instance\x20to:\x20[0]\x20')||'0',m=k[x(0x116)](n=>n['id']===parseInt(l));if(m)a=m['amiId'],Log['success'](x(0x18e)+a+x(0x1ad)+m[x(0x13a)]);else throw Log[x(0x154)](x(0x119));}else throw Log[x(0x154)](x(0x1b2));}else throw Log[x(0x154)](x(0x1ac));}catch(n){Log[x(0x154)](n);}return a;}async[a145s(0x117)](){const z=a145s;let a='';try{const b=new EC2Client({}),c={},d=new DescribeSubnetsCommand(c),{Subnets:f}=await b['send'](d);if(f&&f[z(0x161)]>0x0){const g=f[z(0x1cc)]((j,k)=>({'id':k,'cidr':j['CidrBlock'],'az':j[z(0x103)],'subnetId':j[z(0x19e)]}));g[z(0x17c)](j=>{const A=z;Log[A(0x19a)](A(0x148)+j['id']+A(0x1c5)+j[A(0x113)]+A(0x181)+j['az']+A(0x11e)+j[A(0x145)]);});const h=await Actions[z(0x1e0)](z(0x166))||'0',i=g['find'](j=>j['id']===parseInt(h));if(i)a=i[z(0x145)],Log['success'](z(0x188)+a);else throw Log[z(0x154)](z(0x119));}else throw Log['error'](z(0x1c9));}catch(j){Log[z(0x154)](j);}return a;}async['getSubnetCidr'](a){const B=a145s;try{const b=new EC2Client({}),c={'Filters':[{'Name':B(0x111),'Values':[a]}]},d=new DescribeSubnetsCommand(c),e=await b[B(0x108)](d);return e[B(0x13e)]&&e[B(0x13e)][B(0x161)]>0x0?e[B(0x13e)][0x0][B(0x153)]||'':'';}catch(f){return Log['error'](f),'';}}async['ecrCreateRepository'](a){const C=a145s;try{const b=new ECRClient({'region':a[C(0x17b)]}),c={'repositoryName':a[C(0x159)]},d=new CreateRepositoryCommand(c),f=await b[C(0x108)](d);return Log[C(0x1a9)](C(0x13b)+a[C(0x159)]+C(0x18d)+a[C(0x17b)]+'.'),f;}catch(g){Log[C(0x154)](C(0x1d1)+a['region']+':\x20'+g);throw g;}}async[a145s(0x1aa)](a){const D=a145s,b=['us-east-1','us-east-2',D(0x1b3),D(0x1d3),D(0x1b7),D(0xff),D(0x106),D(0x1e2),'ap-southeast-2',D(0x198),D(0x169),D(0x140),'eu-west-1',D(0x12a),D(0x16f),D(0x133),D(0x155),D(0x17a),D(0x194),D(0x196),'ap-southeast-3','ap-southeast-4',D(0x131),'eu-south-1','eu-south-2','eu-central-2',D(0x1ba),D(0x14f),D(0x19d)],c=[D(0x1a4),D(0x1b0),D(0x1b3),D(0x1d3)],d=a===D(0x178)?b:a?a[D(0x1d9)](','):c;let f=[];const g=Log[D(0x17d)]();for(const h of d){g['start']('Processing\x20'+h[D(0x151)]()+D(0x16c));const i=new ECRClient({'region':h['trim']()});try{let j=undefined;do{const k=await Promise['race']([i['send'](new DescribeRepositoriesCommand({'nextToken':j})),new Promise(l=>setTimeout(()=>l(D(0x15d)),0x7d0))]);if(k==='timeout'){Log[D(0x197)](D(0x1bc)+h[D(0x151)]()+'.');break;}else k['repositories']&&k[D(0x1cb)]['length']>0x0&&(f=f['concat'](k[D(0x1cb)]['map'](l=>({'name':l[D(0x127)],'uri':l[D(0x1c3)],'region':h['trim']()}))));j=k['nextToken'];}while(j);}catch(l){Log['error'](D(0x10c)+h['trim']()+':\x20'+l['message']);}finally{g['stop']();}}return f[D(0x161)]>0x0?(console[D(0x1df)](),Log[D(0x1a9)](D(0x1af)),f[D(0x17c)](m=>{const E=D;Log[E(0x1a1)]('Region:\x20'+m[E(0x17b)]+E(0x15b)+m[E(0x159)]+E(0x12c)+m['uri']);})):Log[D(0x197)]('No\x20ECR\x20repositories\x20found\x20across\x20all\x20specified\x20regions.'),f;}async['route53CreateHostedZone'](a){const F=a145s;try{const b={'CallerReference':''+Date['now'](),'Name':a},c=new CreateHostedZoneCommand(b);await route53Client['send'](c),Log['success'](F(0x105));}catch(d){Log['error'](F(0x147)),console['error'](d);}}async['registerDomain'](a,b,c,d){const G=a145s;try{const e={'DomainName':b,'DurationInYears':c,'AutoRenew':d,'AdminContact':a,'RegistrantContact':a,'TechContact':a},f=new RegisterDomainCommand(e);await route53[G(0x108)](f),Log[G(0x1ce)](G(0x138)+b+'\x27\x20has\x20been\x20registered\x20successfully.');}catch(g){Log[G(0x154)]('There\x20was\x20an\x20error\x20registering\x20the\x20domain\x20name'),Log[G(0x197)](G(0x13f)),console['error'](G(0x134)+g[G(0x1a5)]['statusCode']),console['error'](G(0x180)+g[G(0x1a5)][G(0x123)]);}}async[a145s(0x162)](a){const H=a145s,b={'DomainName':a},c=new CheckDomainAvailabilityCommand(b),d=await route53Domains[H(0x108)](c),e=d[H(0x120)]===H(0x126);if(e){const f=a[H(0x1d9)]('.')[H(0x16e)](),g={'MaxItems':0x1,'Tld':f};try{const h=new ListPricesCommand(g),i=await route53Domains[H(0x108)](h);if(i&&i['Prices']&&i[H(0x1cd)][0x0]?.[H(0x1d4)]){const j=i['Prices'][0x0][H(0x1d4)];return{'available':e,'cost':j};}}catch(k){console[H(0x154)](H(0x163),k);}}return{'available':e};}async[a145s(0x1e9)](a,b,c){const I=a145s;try{const d=await route53['listHostedZonesByName']({'DNSName':c});if(!d?.['HostedZones'])throw Log[I(0x154)](I(0x16d));const e=d?.[I(0x125)][0x0]['Id'],f={'ChangeBatch':{'Changes':[{'Action':I(0x164),'ResourceRecordSet':{'Name':c,'Type':'A','TTL':0x12c,'ResourceRecords':[{'Value':b}]}}]},'HostedZoneId':e};await route53[I(0x192)](f),Log[I(0x1ce)](I(0x174)+a+I(0x146)+c);}catch(g){console[I(0x154)]('Error\x20linking\x20EC2\x20to\x20Route\x2053:',g);}}async[a145s(0x1b9)]({awsAccountId:a,region:b}){const J=a145s,c=new ECRClient({'region':b});try{const d=new GetAuthorizationTokenCommand({'registryIds':[a]}),f=await c['send'](d);if(!f['authorizationData']||f['authorizationData'][J(0x161)]===0x0)throw new Error(J(0x199));const g=f[J(0x13d)][0x0];if(!g[J(0x107)])throw new Error(J(0x144));const h=g['authorizationToken'];if(!h)throw new Error(J(0x1d7));const i=Buffer[J(0x11f)](h,'base64')['toString'](),j=i['split'](':')[0x1];if(!j)throw new Error(J(0x173));return j;}catch(k){Log[J(0x154)](k);throw k;}}async[a145s(0x1c7)]({repoName:a,region:b}){const K=a145s,c=new ECRClient({'region':b});try{const d=new DeleteRepositoryCommand({'repositoryName':a,'force':!![]}),f=await c[K(0x108)](d);return f;}catch(g){Log[K(0x154)](g);throw g;}}async[a145s(0x1dd)](a){const L=a145s;try{const b={'BlockDeviceMappings':[{'DeviceName':L(0x165),'Ebs':{'VolumeSize':0x64}}],'ImageId':a[L(0x129)],'InstanceType':a[L(0x1dc)],'KeyName':a[L(0x142)],'MaxCount':a[L(0x14d)],'MinCount':a[L(0x183)],'SecurityGroupIds':a[L(0x186)]['split'](','),'SubnetId':a[L(0x1a3)],'TagSpecifications':[{'ResourceType':'instance','Tags':a[L(0x1cf)]}]};a[L(0xfe)]&&(b[L(0x1c8)]=L(0x1a2)+a[L(0xfe)]);const c=new RunInstancesCommand(b),d=await client[L(0x108)](c);return d;}catch(f){Log[L(0x154)](f);}}async['ec2terminateInstance'](a){const M=a145s;try{const b={'InstanceIds':[a[M(0x12d)]]},c=new TerminateInstancesCommand(b),d=await client[M(0x108)](c);return d;}catch(f){return Log[M(0x154)](f),{};}}async['createKeyPairEC2Key']({keyName:a,env:b}){const N=a145s,c=this[N(0x19b)]['getAppConfigPath'](b),d=a145f[N(0x156)](c,'_keys',a+N(0x15f));try{const f={'KeyName':a},g=new CreateKeyPairCommand(f),h=await client['send'](g),i=h[N(0xfd)];if(i){await this[N(0x19b)][N(0x175)]({'filePath':d,'data':i}),execSync(N(0x139)+d,{'stdio':'ignore'});const j=this[N(0x19b)][N(0x11c)](d);if(j)return Log[N(0x1a9)](N(0x189)+d),{'keyName':a,'filePath':d};else throw new Error(N(0x150));}else throw new Error(N(0x135));}catch(k){Log[N(0x154)](k),process[N(0x1e5)](0x1);}}async[a145s(0x1a8)]({port:a,groupId:b}){const O=a145s,c={'GroupId':b,'IpPermissions':[{'FromPort':a,'IpProtocol':O(0x1d0),'IpRanges':[{'CidrIp':O(0x12b),'Description':''}],'ToPort':a}]},d=new AuthorizeSecurityGroupIngressCommand(c);return Log[O(0x1ce)](O(0x1e3)+a+'\x20opened!'),await client[O(0x108)](d);}async['ec2createSG'](a){const P=a145s;try{a[P(0x1c1)]===''&&(a['description']=await Actions[P(0x1e0)](P(0x100))||P(0x10a));const b={'Description':a[P(0x1c1)],'GroupName':a[P(0x159)],'VpcId':a[P(0x158)]},c=new CreateSecurityGroupCommand(b),d=await client[P(0x108)](c),{GroupId:f}=d;if(!d)throw new Error(P(0x101));f&&a[P(0x124)][P(0x17c)](g=>{const Q=P;this[Q(0x1a8)]({'port':parseInt(g),'groupId':f});}),Log[P(0x1a9)](P(0x1c4)+f+'\x20NAME:\x20'+a[P(0x159)]);}catch(g){return Log[P(0x154)](g),![];}return!![];}async['ec2describeKeys'](a){const R=a145s,b=[];try{const c={},d=new DescribeKeyPairsCommand(c),f=await client[R(0x108)](d);if(!f)throw R(0x101);const {KeyPairs:g}=f;g?(g?.[R(0x17c)]((h,i)=>{const S=R;h[S(0x14b)]&&b[S(0x172)]({'id':i,'name':h[S(0x14b)]});}),b[R(0x161)]>0x0&&b[R(0x17c)](h=>{const T=R;h[T(0x159)]===a?.['suggestion']?Log[T(0x1a9)](T(0x148)+h['id']+T(0x10e)+h['name']):Log[T(0x1ce)](T(0x148)+h['id']+T(0x10e)+h[T(0x159)]);})):Log[R(0x154)](R(0x1c0));}catch(h){Log[R(0x154)](h);}return b;}async[a145s(0x137)](a){const U=a145s;try{const b={'KeyName':a},c=new DeleteKeyPairCommand(b);await client[U(0x108)](c);}catch(d){Log[U(0x154)](d),process[U(0x1e5)](0x1);}}async['ec2describeInstances'](){const V=a145s,a=[];try{const b={'Filters':[{'Name':'tag:created-by','Values':[V(0x1bd)]}]},c=new DescribeInstancesCommand(b),d=await client[V(0x108)](c);d['Reservations']?.[V(0x17c)]((f,g)=>{const W=V;if(f?.[W(0x10f)]){const {InstanceId:h,PublicIpAddress:i,PrivateIpAddress:j,State:k,KeyName:l,Tags:m}=f[W(0x10f)][0x0],n=m?.[W(0x116)](({Key:o})=>o==='environment');a[W(0x172)]({'id':g,'instanceId':h,'privateIp':j,'publicIp':i,'status':k?.[W(0x12f)],'name':l,'env':n?.[W(0x14e)]});}}),a[V(0x161)]>0x0?a['forEach'](f=>{const X=V,g=X(0x148)+f['id']+X(0x10e)+f['name']+X(0x1db)+f['env']+X(0x177)+f['status']+X(0x190)+f['instanceId']+X(0x1b4)+f[X(0x121)]+X(0x187)+f[X(0x1d6)];if(f[X(0x17e)]===X(0x167))Log[X(0x154)](g);else f['status']===X(0x1d5)?Log[X(0x1a9)](g):Log[X(0x1ce)](g);}):Log[V(0x154)](V(0x128));}catch(f){Log[V(0x154)](f);}return a;}async[a145s(0x176)](a){const Y=a145s;try{const b={'InstanceIds':[a[Y(0x12d)]]},c=new RebootInstancesCommand(b),d=await client[Y(0x108)](c);return d[Y(0x1ca)][Y(0x1b5)]===0xc8&&Log[Y(0x1a9)]('Instance\x20rebooted!'),d;}catch(f){Log[Y(0x154)](f);}}async[a145s(0x1b6)](){const Z=a145s;let a='';Log[Z(0x1ce)](Z(0x13c));const b=new DescribeVpcsCommand({}),c=await client[Z(0x108)](b),{Vpcs:d}=c,e=[];d&&d[Z(0x17c)]((g,h)=>{const a0=Z;g['VpcId']&&g[a0(0x153)]&&e[a0(0x172)]({'id':h,'vpcId':g[a0(0x1ab)],'cidr':g[a0(0x153)]});});e[Z(0x17c)](function(g){const a1=Z;console[a1(0x1df)]('ID:\x20'+g['id']+a1(0x122)+g[a1(0x158)]+a1(0x1c5)+g[a1(0x113)]);});const f=await Actions[Z(0x1e0)](Z(0x1c6))||0x0;e[Z(0x17c)](function(g){const a2=Z;g['id']==f&&(a=g[a2(0x158)],Log[a2(0x1a9)]('[+]\x20Setting\x20VPC\x20ID\x20to:\x20'+a+'\x0a'));});if(a==='')return Log[Z(0x154)](Z(0x119)),'';return a;}async[a145s(0x182)](){const a3=a145s,a=await this['ec2describeInstances']();if(a[a3(0x161)]===0x0)return Log[a3(0x154)]('No\x20instances\x20found'),null;const b=await Actions[a3(0x1e0)](a3(0x1a6));!b&&(Log[a3(0x154)](a3(0x149)),process[a3(0x1e5)](0x0));const c=a[a3(0x116)](({id:d})=>{return d==parseInt(b);})||null;return c;}async[a145s(0x11d)]({env:a}){const a4=a145s,b=this['fsi'][a4(0x18f)](),{appName:c}=b,d=c+'-'+a,f=await Actions[a4(0x1e0)](a4(0x1b8)+d+']\x20')||d,{filePath:g}=await this[a4(0x114)]({'keyName':f,'env':a});try{const h=await Actions[a4(0x1ae)](a4(0x19f),!![]);if(h)try{const i=a145f[a4(0x156)](a4(0x1d2),a,a4(0x152));!this['fsi'][a4(0x11c)](i)&&await this[a4(0x19b)][a4(0x1e7)]({'srcPath':a4(0x1c2),'destPath':i,'context':{'app':f}});const j=a145e[a4(0x102)](a145f[a4(0x156)]('config',a,a4(0x152)),a4(0x18a)),k=JSON[a4(0x1be)](j);k[a4(0x10d)]=a145f[a4(0x156)](a4(0x1e6),f+a4(0x15f)),a145e[a4(0x16b)](a145f[a4(0x156)](a4(0x1d2),a,a4(0x152)),JSON[a4(0x1e1)](k,null,0x2));}catch(l){Log[a4(0x154)](l),Log[a4(0x154)](a4(0x112));}}catch(m){Log[a4(0x154)](m),process['exit'](0x1);}return{'keyName':f,'filePath':g};}async[a145s(0x132)](a){const a5=a145s,b=[],c={},d=new DescribeSecurityGroupsCommand(c),e=await client[a5(0x108)](d),{SecurityGroups:f}=e;f&&f[a5(0x17c)](function(i,j){const a6=a5;i[a6(0x1e4)]&&i[a6(0x157)]&&b['push']({'id':j,'name':i[a6(0x1e4)],'sgId':i[a6(0x157)]});});let g='',h=0x0;return b['forEach'](function(i){const a7=a5;i['name']===a&&(g=i[a7(0x185)],h=i['id']);}),{'sgList':b,'createdSgId':g,'listIndexId':h};}async[a145s(0x110)](a){const a8=a145s;try{const b={'GroupId':a},c=new DeleteSecurityGroupCommand(b);await client['send'](c);}catch(d){Log['error'](d),process[a8(0x1e5)](0x1);}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(a,b){var k=a146d,c=a();while(!![]){try{var d
|
|
1
|
+
(function(a,b){var k=a146d,c=a();while(!![]){try{var d=parseInt(k(0xd6))/0x1+-parseInt(k(0xd7))/0x2+parseInt(k(0xd2))/0x3*(-parseInt(k(0xcb))/0x4)+-parseInt(k(0xd3))/0x5+parseInt(k(0xcc))/0x6*(parseInt(k(0xcd))/0x7)+parseInt(k(0xd8))/0x8+parseInt(k(0xd1))/0x9*(-parseInt(k(0xca))/0xa);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a146c,0x882aa));export var CountryCode;function a146c(){var n=['3347406bUHsru','162573uwEjnC','844730lSAlkM','toString','constructor','604714gBhzEQ','1654740puGIBe','6457288OCCesV','10KUBcRj','28VNMUAs','300bddZGi','125083xXRLaj','(((.+)+)+)+$','search','apply'];a146c=function(){return n;};return a146c();}function a146d(a,b){var c=a146c();return a146d=function(d,e){d=d-0xca;var f=c[d];return f;},a146d(a,b);}(function(c){var d=(function(){var f=!![];return function(g,h){var i=f?function(){var l=a146d;if(h){var j=h[l(0xd0)](g,arguments);return h=null,j;}}:function(){};return f=![],i;};}()),e=d(this,function(){var m=a146d;return e[m(0xd4)]()[m(0xcf)]('(((.+)+)+)+$')[m(0xd4)]()[m(0xd5)](e)['search'](m(0xce));});e(),c['AC']='AC',c['AD']='AD',c['AE']='AE',c['AF']='AF',c['AG']='AG',c['AI']='AI',c['AL']='AL',c['AM']='AM',c['AN']='AN',c['AO']='AO',c['AQ']='AQ',c['AR']='AR',c['AS']='AS',c['AT']='AT',c['AU']='AU',c['AW']='AW',c['AX']='AX',c['AZ']='AZ',c['BA']='BA',c['BB']='BB',c['BD']='BD',c['BE']='BE',c['BF']='BF',c['BG']='BG',c['BH']='BH',c['BI']='BI',c['BJ']='BJ',c['BL']='BL',c['BM']='BM',c['BN']='BN',c['BO']='BO',c['BQ']='BQ',c['BR']='BR',c['BS']='BS',c['BT']='BT',c['BV']='BV',c['BW']='BW',c['BY']='BY',c['BZ']='BZ',c['CA']='CA',c['CC']='CC',c['CD']='CD',c['CF']='CF',c['CG']='CG',c['CH']='CH',c['CI']='CI',c['CK']='CK',c['CL']='CL',c['CM']='CM',c['CN']='CN',c['CO']='CO',c['CR']='CR',c['CU']='CU',c['CV']='CV',c['CW']='CW',c['CX']='CX',c['CY']='CY',c['CZ']='CZ',c['DE']='DE',c['DJ']='DJ',c['DK']='DK',c['DM']='DM',c['DO']='DO',c['DZ']='DZ',c['EC']='EC',c['EE']='EE',c['EG']='EG',c['EH']='EH',c['ER']='ER',c['ES']='ES',c['ET']='ET',c['FI']='FI',c['FJ']='FJ',c['FK']='FK',c['FM']='FM',c['FO']='FO',c['FR']='FR',c['GA']='GA',c['GB']='GB',c['GD']='GD',c['GE']='GE',c['GF']='GF',c['GG']='GG',c['GH']='GH',c['GI']='GI',c['GL']='GL',c['GM']='GM',c['GN']='GN',c['GP']='GP',c['GQ']='GQ',c['GR']='GR',c['GS']='GS',c['GT']='GT',c['GU']='GU',c['GW']='GW',c['GY']='GY',c['HK']='HK',c['HM']='HM',c['HN']='HN',c['HR']='HR',c['HT']='HT',c['HU']='HU',c['ID']='ID',c['IE']='IE',c['IL']='IL',c['IM']='IM',c['IN']='IN',c['IO']='IO',c['IQ']='IQ',c['IR']='IR',c['IS']='IS',c['IT']='IT',c['JE']='JE',c['JM']='JM',c['JO']='JO',c['JP']='JP',c['KE']='KE',c['KG']='KG',c['KH']='KH',c['KI']='KI',c['KM']='KM',c['KN']='KN',c['KP']='KP',c['KR']='KR',c['KW']='KW',c['KY']='KY',c['KZ']='KZ',c['LA']='LA',c['LB']='LB',c['LC']='LC',c['LI']='LI',c['LK']='LK',c['LR']='LR',c['LS']='LS',c['LT']='LT',c['LU']='LU',c['LV']='LV',c['LY']='LY',c['MA']='MA',c['MC']='MC',c['MD']='MD',c['ME']='ME',c['MF']='MF',c['MG']='MG',c['MH']='MH',c['MK']='MK',c['ML']='ML',c['MM']='MM',c['MN']='MN',c['MO']='MO',c['MP']='MP',c['MQ']='MQ',c['MR']='MR',c['MS']='MS',c['MT']='MT',c['MU']='MU',c['MV']='MV',c['MW']='MW',c['MX']='MX',c['MY']='MY',c['MZ']='MZ',c['NA']='NA',c['NC']='NC',c['NE']='NE',c['NF']='NF',c['NG']='NG',c['NI']='NI',c['NL']='NL',c['NO']='NO',c['NP']='NP',c['NR']='NR',c['NU']='NU',c['NZ']='NZ',c['OM']='OM',c['PA']='PA',c['PE']='PE',c['PF']='PF',c['PG']='PG',c['PH']='PH',c['PK']='PK',c['PL']='PL',c['PM']='PM',c['PN']='PN',c['PR']='PR',c['PS']='PS',c['PT']='PT',c['PW']='PW',c['PY']='PY',c['QA']='QA',c['RE']='RE',c['RO']='RO',c['RS']='RS',c['RU']='RU',c['RW']='RW',c['SA']='SA',c['SB']='SB',c['SC']='SC',c['SD']='SD',c['SE']='SE',c['SG']='SG',c['SH']='SH',c['SI']='SI',c['SJ']='SJ',c['SK']='SK',c['SL']='SL',c['SM']='SM',c['SN']='SN',c['SO']='SO',c['SR']='SR',c['SS']='SS',c['ST']='ST',c['SV']='SV',c['SX']='SX',c['SY']='SY',c['SZ']='SZ',c['TC']='TC',c['TD']='TD',c['TF']='TF',c['TG']='TG',c['TH']='TH',c['TJ']='TJ',c['TK']='TK',c['TL']='TL',c['TM']='TM',c['TN']='TN',c['TO']='TO',c['TP']='TP',c['TR']='TR',c['TT']='TT',c['TV']='TV',c['TW']='TW',c['TZ']='TZ',c['UA']='UA',c['UG']='UG',c['US']='US',c['UY']='UY',c['UZ']='UZ',c['VA']='VA',c['VC']='VC',c['VE']='VE',c['VG']='VG',c['VI']='VI',c['VN']='VN',c['VU']='VU',c['WF']='WF',c['WS']='WS',c['YE']='YE',c['YT']='YT',c['ZA']='ZA',c['ZM']='ZM',c['ZW']='ZW';}(CountryCode||(CountryCode={})));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a147d(a,b){const c=a147c();return a147d=function(d,e){d=d-
|
|
1
|
+
const a147l=a147d;function a147d(a,b){const c=a147c();return a147d=function(d,e){d=d-0x128;let f=c[d];return f;},a147d(a,b);}(function(a,b){const j=a147d,c=a();while(!![]){try{const d=parseInt(j(0x137))/0x1+-parseInt(j(0x128))/0x2*(parseInt(j(0x13b))/0x3)+parseInt(j(0x13a))/0x4*(parseInt(j(0x135))/0x5)+-parseInt(j(0x140))/0x6*(-parseInt(j(0x12b))/0x7)+parseInt(j(0x133))/0x8*(-parseInt(j(0x12d))/0x9)+parseInt(j(0x131))/0xa+-parseInt(j(0x12c))/0xb*(parseInt(j(0x130))/0xc);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a147c,0xe2012));const a147b=(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;};}()),a147a=a147b(this,function(){const k=a147d;return a147a['toString']()[k(0x13d)](k(0x136))['toString']()[k(0x13f)](a147a)[k(0x13d)](k(0x136));});function a147c(){const p=['4556226PkGaAP','pushImage','2080438UHubMy','docker\x20','.amazonaws.com','7drYQvB','6988586ptAcIA','202167oDEeJO','join','error','36dEVdSd','17911670bBztQo','inherit','8kLTyPr','tag','12020whXKUP','(((.+)+)+)+$','1298160mbVUNH','toString','.dkr.ecr.','76ycsXad','3hWLJoW','\x20|\x20docker\x20login\x20--username\x20AWS\x20--password-stdin\x20','search','.amazonaws.com/','constructor'];a147c=function(){return p;};return a147c();}a147a();import{execSync}from'child_process';import{Log}from'../log/log.class.js';export class Docker{static[a147l(0x134)]({imageName:a,awsAccountId:b,region:c,repoName:d}){const m=a147l;try{const f=[m(0x134),a,b+'.dkr.ecr.'+c+m(0x13e)+d],g=m(0x129)+f[m(0x12e)]('\x20'),h=execSync(g,{'stdio':m(0x132)})[m(0x138)]();return h;}catch(i){return Log[m(0x12f)](i),'';}}static['awsLogin']({awsAccountId:a,region:b,password:c}){const n=a147l;try{const d='echo\x20'+c+n(0x13c)+a+n(0x139)+b+n(0x12a);return execSync(d,{'stdio':n(0x132)}),d;}catch(f){return Log[n(0x12f)](f),'';}}static[a147l(0x141)]({awsAccountId:a,region:b,repoName:c}){const o=a147l;try{const d=['push',a+o(0x139)+b+'.amazonaws.com/'+c],f=o(0x129)+d[o(0x12e)]('\x20'),g=execSync(f,{'stdio':o(0x132)})[o(0x138)]();return g;}catch(h){return Log[o(0x12f)](h),'';}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(a,b){var f=a148d,c=a();while(!![]){try{var d
|
|
1
|
+
(function(a,b){var f=a148d,c=a();while(!![]){try{var d=parseInt(f(0x119))/0x1+-parseInt(f(0x116))/0x2*(-parseInt(f(0x10e))/0x3)+parseInt(f(0x111))/0x4+parseInt(f(0x114))/0x5+-parseInt(f(0x10f))/0x6*(parseInt(f(0x11b))/0x7)+parseInt(f(0x112))/0x8*(parseInt(f(0x118))/0x9)+-parseInt(f(0x11a))/0xa*(parseInt(f(0x115))/0xb);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a148c,0xc3d82));function a148d(a,b){var c=a148c();return a148d=function(d,e){d=d-0x10d;var f=c[d];return f;},a148d(a,b);}function a148c(){var h=['550125IDbvgp','176fGAiBV','124heBzfv','(((.+)+)+)+$','9oNIdyb','420511EBxnrB','1148770sRLRrw','21rgKVHV','toString','1467qjrUlN','264570LMWfyY','search','6032728JDUPMK','5627672ZAOWQb','constructor'];a148c=function(){return h;};return a148c();}var a148b=(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;};}()),a148a=a148b(this,function(){var g=a148d;return a148a['toString']()[g(0x110)](g(0x117))[g(0x10d)]()[g(0x113)](a148a)[g(0x110)](g(0x117));});a148a();export{};
|