@maka/maka-cli 4.0.84 → 4.0.87
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/maka.js +1 -1
- package/dist/templates/meteor/app/client/head.html +0 -11
- package/dist/templates/meteor/app/client/main.js +12 -0
- package/dist/templates/meteor/app/client/main.js.jsx +12 -0
- package/dist/templates/meteor/app/client/main.js.ts +12 -0
- package/dist/templates/meteor/app/client/main.js.tsx +12 -0
- package/dist/templates/meteor/app/imports/startup/client/routes.js.jsx +2 -2
- package/dist/templates/meteor/app/imports/startup/client/routes.js.tsx +2 -2
- package/dist/templates/meteor/app/imports/startup/lib/routes.js.jsx +3 -3
- package/dist/templates/meteor/app/imports/startup/lib/routes.js.tsx +3 -3
- package/dist/templates/meteor/app/meteor.d.ts +13 -13
- package/dist/templates/meteor/app/server/helmet-csp.js +150 -0
- package/dist/templates/meteor/app/server/helmet-csp.js.jsx +150 -0
- package/dist/templates/meteor/app/server/helmet-csp.js.ts +150 -0
- package/dist/templates/meteor/app/server/helmet-csp.js.tsx +150 -0
- package/dist/templates/meteor/app/server/main.js +7 -2
- package/dist/templates/meteor/app/server/main.js.jsx +6 -1
- package/dist/templates/meteor/app/server/main.js.ts +6 -1
- package/dist/templates/meteor/app/server/main.js.tsx +5 -0
- package/dist/templates/meteor/app/tsconfig.json +3 -1
- package/dist/templates/meteor/config/settings.json +2 -1
- package/dist/templates/react/component/component.js.tsx +6 -5
- package/dist/templates/react/test/test.js.tsx +2 -1
- 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 +4 -1
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Content Security Policy (CSP)
|
|
3
|
+
* https://guide.meteor.com/security.html#httpheaders
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/* global __meteor_runtime_config__ */
|
|
7
|
+
import { Meteor } from 'meteor/meteor'
|
|
8
|
+
import { WebApp } from 'meteor/webapp'
|
|
9
|
+
import { Autoupdate } from 'meteor/autoupdate'
|
|
10
|
+
import crypto from 'crypto'
|
|
11
|
+
|
|
12
|
+
const self = '\'self\''
|
|
13
|
+
const data = 'data:'
|
|
14
|
+
const unsafeEval = '\'unsafe-eval\''
|
|
15
|
+
const unsafeInline = '\'unsafe-inline\''
|
|
16
|
+
const allowedOrigins = Meteor.settings.extraAllowedOrigins;
|
|
17
|
+
|
|
18
|
+
// create the default connect source for our current domain in
|
|
19
|
+
// a multi-protocol compatible way (http/ws or https/wss)
|
|
20
|
+
const url = Meteor.absoluteUrl()
|
|
21
|
+
const domain = url.replace(/http(s)*:\/\//, '').replace(/\/$/, '')
|
|
22
|
+
const s = url.match(/(?!=http)s(?=:\/\/)/) ? 's' : ''
|
|
23
|
+
const usesHttps = s.length > 0
|
|
24
|
+
const connectSrc = [
|
|
25
|
+
self,
|
|
26
|
+
`http${s}://${domain}`,
|
|
27
|
+
`ws${s}://${domain}`
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
// Prepare runtime config for generating the sha256 hash
|
|
31
|
+
// It is important, that the hash meets exactly the hash of the
|
|
32
|
+
// script in the client bundle.
|
|
33
|
+
// Otherwise the app would not be able to start, since the runtimeConfigScript
|
|
34
|
+
// is rejected __meteor_runtime_config__ is not available, causing
|
|
35
|
+
// a cascade of follow-up errors.
|
|
36
|
+
const runtimeConfig = Object.assign(__meteor_runtime_config__, Autoupdate, {
|
|
37
|
+
// the following lines may depend on, whether you called Accounts.config
|
|
38
|
+
// and whether your Meteor app is a "newer" version
|
|
39
|
+
accountsConfigCalled: true,
|
|
40
|
+
isModern: true
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
// add client versions to __meteor_runtime_config__
|
|
44
|
+
Object.keys(WebApp.clientPrograms).forEach(arch => {
|
|
45
|
+
__meteor_runtime_config__.versions[arch] = {
|
|
46
|
+
version: Autoupdate.autoupdateVersion || WebApp.clientPrograms[arch].version(),
|
|
47
|
+
versionRefreshable: Autoupdate.autoupdateVersion || WebApp.clientPrograms[arch].versionRefreshable(),
|
|
48
|
+
versionNonRefreshable: Autoupdate.autoupdateVersion || WebApp.clientPrograms[arch].versionNonRefreshable(),
|
|
49
|
+
// comment the following line if you use Meteor < 2.0
|
|
50
|
+
versionReplaceable: Autoupdate.autoupdateVersion || WebApp.clientPrograms[arch].versionReplaceable()
|
|
51
|
+
}
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
const runtimeConfigScript = `__meteor_runtime_config__ = JSON.parse(decodeURIComponent("${encodeURIComponent(JSON.stringify(runtimeConfig))}"))`
|
|
55
|
+
const runtimeConfigHash = crypto.createHash('sha256').update(runtimeConfigScript).digest('base64')
|
|
56
|
+
|
|
57
|
+
const helmetOptions = {
|
|
58
|
+
crossOriginResourcePolicy: { policy: "cross-origin" },
|
|
59
|
+
crossOriginOpenerPolicy: { policy: "same-origin-allow-popups" },
|
|
60
|
+
crossOriginResourcePolicy: { policy: "cross-origin" },
|
|
61
|
+
//If you want to embed something like an iframe, set to false
|
|
62
|
+
crossOriginEmbedderPolicy: true,
|
|
63
|
+
contentSecurityPolicy: {
|
|
64
|
+
blockAllMixedContent: false,
|
|
65
|
+
directives: {
|
|
66
|
+
defaultSrc: [self].concat(allowedOrigins),
|
|
67
|
+
scriptSrc: [
|
|
68
|
+
self,
|
|
69
|
+
// Remove / comment out unsafeEval if you do not use dynamic imports
|
|
70
|
+
// to tighten security. However, if you use dynamic imports this line
|
|
71
|
+
// must be kept in order to make them work.
|
|
72
|
+
unsafeEval,
|
|
73
|
+
`'sha256-${runtimeConfigHash}'`
|
|
74
|
+
].concat(allowedOrigins),
|
|
75
|
+
childSrc: [self].concat(allowedOrigins),
|
|
76
|
+
// If you have external apps, that should be allowed as sources for
|
|
77
|
+
// connections or images, your should add them here
|
|
78
|
+
// Call helmetOptions() without args if you have no external sources
|
|
79
|
+
// Note, that this is just an example and you may configure this to your needs
|
|
80
|
+
connectSrc: connectSrc.concat(allowedOrigins),
|
|
81
|
+
fontSrc: [self, data].concat(allowedOrigins),
|
|
82
|
+
formAction: [self].concat(allowedOrigins),
|
|
83
|
+
frameAncestors: [self].concat(allowedOrigins),
|
|
84
|
+
frameSrc: [self].concat(allowedOrigins),
|
|
85
|
+
// This is an example to show, that we can define to show images only
|
|
86
|
+
// from our self, browser data/blob and a defined set of hosts.
|
|
87
|
+
// Configure to your needs.
|
|
88
|
+
imgSrc: [self, data, 'blob:'].concat(allowedOrigins),
|
|
89
|
+
manifestSrc: [self].concat(allowedOrigins),
|
|
90
|
+
mediaSrc: [self].concat(allowedOrigins),
|
|
91
|
+
objectSrc: [self].concat(allowedOrigins),
|
|
92
|
+
// these are just examples, configure to your needs, see
|
|
93
|
+
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/sandbox
|
|
94
|
+
sandbox: [
|
|
95
|
+
// allow-downloads-without-user-activation // experimental
|
|
96
|
+
'allow-forms',
|
|
97
|
+
'allow-modals',
|
|
98
|
+
// 'allow-orientation-lock',
|
|
99
|
+
// 'allow-pointer-lock',
|
|
100
|
+
// 'allow-popups',
|
|
101
|
+
// 'allow-popups-to-escape-sandbox',
|
|
102
|
+
// 'allow-presentation',
|
|
103
|
+
'allow-same-origin',
|
|
104
|
+
'allow-scripts',
|
|
105
|
+
// 'allow-storage-access-by-user-activation ', // experimental
|
|
106
|
+
// 'allow-top-navigation',
|
|
107
|
+
// 'allow-top-navigation-by-user-activation'
|
|
108
|
+
],
|
|
109
|
+
styleSrc: [self, unsafeInline].concat(allowedOrigins),
|
|
110
|
+
workerSrc: [self, 'blob:'].concat(allowedOrigins)
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
// see the helmet documentation to get a better understanding of
|
|
114
|
+
// the following configurations and settings
|
|
115
|
+
strictTransportSecurity: {
|
|
116
|
+
maxAge: 15552000,
|
|
117
|
+
includeSubDomains: true,
|
|
118
|
+
preload: false
|
|
119
|
+
},
|
|
120
|
+
referrerPolicy: {
|
|
121
|
+
policy: 'no-referrer'
|
|
122
|
+
},
|
|
123
|
+
expectCt: {
|
|
124
|
+
enforce: true,
|
|
125
|
+
maxAge: 604800
|
|
126
|
+
},
|
|
127
|
+
frameguard: {
|
|
128
|
+
action: 'sameorigin'
|
|
129
|
+
},
|
|
130
|
+
dnsPrefetchControl: {
|
|
131
|
+
allow: false
|
|
132
|
+
},
|
|
133
|
+
permittedCrossDomainPolicies: {
|
|
134
|
+
permittedPolicies: 'none'
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
// We assume, that we are working on a localhost when there is no https
|
|
139
|
+
// connection available.
|
|
140
|
+
// Run your project with --production flag to simulate script-src hashing
|
|
141
|
+
if (!usesHttps && Meteor.isDevelopment) {
|
|
142
|
+
delete helmetOptions.contentSecurityPolicy.blockAllMixedContent;
|
|
143
|
+
helmetOptions.contentSecurityPolicy.directives.scriptSrc = [
|
|
144
|
+
self,
|
|
145
|
+
unsafeEval,
|
|
146
|
+
unsafeInline,
|
|
147
|
+
];
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export default helmetOptions;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import { WebApp } from 'meteor/webapp';
|
|
2
|
-
|
|
3
|
-
import '
|
|
2
|
+
import helmet from "helmet";
|
|
3
|
+
import helmetOptions from './helmet-csp';
|
|
4
|
+
|
|
5
|
+
WebApp.connectHandlers.use(helmet(helmetOptions));
|
|
6
|
+
WebApp.addHtmlAttributeHook(() => ({ lang: Meteor.settings.language }));
|
|
7
|
+
|
|
8
|
+
import '/imports/startup/server/index';
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import { WebApp } from 'meteor/webapp';
|
|
2
|
+
import helmet from "helmet";
|
|
3
|
+
import helmetOptions from './helmet-csp';
|
|
4
|
+
|
|
5
|
+
WebApp.connectHandlers.use(helmet(helmetOptions));
|
|
2
6
|
WebApp.addHtmlAttributeHook(() => ({ lang: Meteor.settings.language }));
|
|
3
|
-
|
|
7
|
+
|
|
8
|
+
import '/imports/startup/server/index';
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import { WebApp } from 'meteor/webapp';
|
|
2
|
+
import helmet from "helmet";
|
|
3
|
+
import helmetOptions from './helmet-csp';
|
|
4
|
+
|
|
5
|
+
WebApp.connectHandlers.use(helmet(helmetOptions));
|
|
2
6
|
WebApp.addHtmlAttributeHook(() => ({ lang: Meteor.settings.language }));
|
|
3
|
-
|
|
7
|
+
|
|
8
|
+
import '/imports/startup/server/index';
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import { WebApp } from 'meteor/webapp';
|
|
2
|
+
import helmet from "helmet";
|
|
3
|
+
import helmetOptions from './helmet-csp';
|
|
4
|
+
|
|
5
|
+
WebApp.connectHandlers.use(helmet(helmetOptions));
|
|
2
6
|
WebApp.addHtmlAttributeHook(() => ({ lang: Meteor.settings.language }));
|
|
7
|
+
|
|
3
8
|
import '/imports/startup/server/index';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
"target": "es6",
|
|
4
|
+
"types": [ "meteor" ],
|
|
4
5
|
"module": "commonjs",
|
|
5
6
|
"moduleResolution": "node",
|
|
6
7
|
"alwaysStrict": true,
|
|
@@ -14,7 +15,8 @@
|
|
|
14
15
|
"include": [
|
|
15
16
|
"client/**/*",
|
|
16
17
|
"lib/**/*",
|
|
17
|
-
"server/**/*"
|
|
18
|
+
"server/**/*",
|
|
19
|
+
"imports/**/*"
|
|
18
20
|
],
|
|
19
21
|
"exclude": [
|
|
20
22
|
".meteor",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { compose } from 'ramda'; // https://ramdajs.com/docs/#compose
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';// https://github.com/meteor/react-packages/tree/master/packages/react-meteor-data#withtrackerreactivefn-higher-order-component
|
|
3
|
+
import * as PropTypes from 'prop-types';// https://github.com/meteor/react-packages/tree/master/packages/react-meteor-data#withtrackerreactivefn-higher-order-component
|
|
4
4
|
import { withTracker } from 'meteor/react-meteor-data';<% if(graphql === 'apollo') { %>
|
|
5
5
|
import { gql } from '@apollo/client';
|
|
6
6
|
// https://www.apollographql.com/docs/react/api/react/hoc/#graphqlquery-configcomponent
|
|
@@ -8,12 +8,14 @@ import { graphql } from '@apollo/client/react/hoc';<% } %><% if (theme === 'mate
|
|
|
8
8
|
// https://material-ui.com/styles/basics/#higher-order-component-api
|
|
9
9
|
import { withStyles } from '@mui/styles';
|
|
10
10
|
|
|
11
|
-
const styles = (theme) => { };<% } %>
|
|
11
|
+
const styles = (theme) => { return {} };<% } %>
|
|
12
12
|
interface I<%= className %> {
|
|
13
13
|
props: object;
|
|
14
14
|
state: object;
|
|
15
15
|
}
|
|
16
|
-
class <%= className %>Component extends Component<I<%= className
|
|
16
|
+
class <%= className %>Component extends React.Component<I<%= className %>%>> {
|
|
17
|
+
public state: object;
|
|
18
|
+
|
|
17
19
|
/**
|
|
18
20
|
* Define types for your props for stability.
|
|
19
21
|
*/
|
|
@@ -29,9 +31,8 @@ class <%= className %>Component extends Component<I<%= className %>%> {
|
|
|
29
31
|
* Setup the component. Best practices are to keep this light,
|
|
30
32
|
* and offload complex behavior to methods.
|
|
31
33
|
*/
|
|
32
|
-
constructor(props:
|
|
34
|
+
constructor(props: I<%= className %>) {
|
|
33
35
|
super(props);
|
|
34
|
-
this.state = {};
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
/**
|
|
@@ -4,7 +4,7 @@ import React from 'react';
|
|
|
4
4
|
import { render, unmountComponentAtNode } from "react-dom";
|
|
5
5
|
import { act } from "react-dom/test-utils";
|
|
6
6
|
|
|
7
|
-
if (Meteor.isClient) {<% if(graphql === 'apollo' { %>
|
|
7
|
+
if (Meteor.isClient) {<% if(graphql === 'apollo') { %>
|
|
8
8
|
import { MockedProvider } from '@apollo/react-testing';
|
|
9
9
|
import gql from 'graphql-tag';
|
|
10
10
|
const mocks = [
|
|
@@ -49,6 +49,7 @@ if (Meteor.isClient) {<% if(graphql === 'apollo' { %>
|
|
|
49
49
|
);<% } else { %>
|
|
50
50
|
render(<<%= className %>/>, container);<% } %>
|
|
51
51
|
});
|
|
52
|
+
|
|
52
53
|
expect(container.textContent).toBe(<% if (isLayout) { %>""<% } else { %>"Find me in <%= myPath %>"<% } %>);
|
|
53
54
|
});
|
|
54
55
|
});
|
package/dist/tool.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(a,b){var
|
|
1
|
+
(function(a,b){var u=a68d,c=a();while(!![]){try{var d=-parseInt(u(0xe1))/0x1+-parseInt(u(0xdc))/0x2*(-parseInt(u(0xd3))/0x3)+-parseInt(u(0xd1))/0x4+-parseInt(u(0xd5))/0x5+parseInt(u(0xe0))/0x6*(-parseInt(u(0xd6))/0x7)+-parseInt(u(0xd7))/0x8+parseInt(u(0xd2))/0x9;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a68c,0x6ce3a));var a68b=(function(){var a=!![];return function(b,c){var d=a?function(){var v=a68d;if(c){if(v(0xdd)!==v(0xde)){var e=c[v(0xd4)](b,arguments);return c=null,e;}else{var h=d[v(0xd4)](e,arguments);return f=null,h;}}}:function(){};return a=![],d;};}()),a68a=a68b(this,function(){var w=a68d;return a68a['toString']()['search'](w(0xda))[w(0xdb)]()[w(0xd0)](a68a)[w(0xd9)](w(0xda));});a68a();function a68d(a,b){var c=a68c();return a68d=function(d,e){d=d-0xd0;var f=c[d];return f;},a68d(a,b);}function a68c(){var y=['132548owhXTO','eWTax','qpmHL','fsi','48JPurcI','63890SuCXFk','constructor','494672lVKfGw','6755346sdabDS','24ztUhtH','apply','142405qDHRBw','18718THtzNI','4778760ETukHQ','docker','search','(((.+)+)+)+$','toString'];a68c=function(){return y;};return a68c();}import{Docker}from'./tools/docker/docker.class.js';import{FSI}from'./tools/fsi/fsi.class.js';export class Tool{constructor(){var x=a68d;this[x(0xd8)]=new Docker(),this[x(0xdf)]=new FSI();}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a69A=a69d;(function(a,b){const v=a69d,c=a();while(!![]){try{const d=-parseInt(v(0x17a))/0x1+-parseInt(v(0x177))/0x2*(parseInt(v(0x172))/0x3)+-parseInt(v(0x16b))/0x4+-parseInt(v(0x168))/0x5+parseInt(v(0x16c))/0x6*(parseInt(v(0x173))/0x7)+-parseInt(v(0x174))/0x8+-parseInt(v(0x160))/0x9*(-parseInt(v(0x176))/0xa);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a69c,0x74b08));function a69c(){const K=['753qYBcOE','852523CWNMxP','3892080SdqhzO','done','19470SxRBoH','550JKdNFf','ItyPJ','QCcXP','858312IQUBDS','rjpMY','ask','fhPLO','__awaiter','search','prompt','answer','NOFfI','apply','8865xQuwVb','zMIoZ','JJDQE','value','next','YqCxI','then','confirm','2738390loQFcp','toString','constructor','836176dyUqqX','36GfHGqg','throw','vdluK','Idkrp','input','(((.+)+)+)+$'];a69c=function(){return K;};return a69c();}const a69b=(function(){let a=!![];return function(b,c){const w=a69d;if(w(0x15e)!==w(0x179)){const d=a?function(){const x=w;if('XrHfo'==='XrHfo'){if(c){const e=c[x(0x15f)](b,arguments);return c=null,e;}}else try{i(j[x(0x16d)](k));}catch(g){m(g);}}:function(){};return a=![],d;}else{const f=g?function(){const y=w;if(f){const u=q[y(0x15f)](r,arguments);return s=null,u;}}:function(){};return l=![],f;}};}()),a69a=a69b(this,function(){const z=a69d;return a69a[z(0x169)]()[z(0x17f)](z(0x171))[z(0x169)]()[z(0x16a)](a69a)[z(0x17f)](z(0x171));});function a69d(a,b){const c=a69c();return a69d=function(d,e){d=d-0x15e;let f=c[d];return f;},a69d(a,b);}a69a();var __awaiter=this&&this[a69A(0x17e)]||function(a,b,c,d){function e(f){const B=a69d;if(B(0x161)!==B(0x161))c(d);else return f instanceof c?f:new c(function(h){const C=B;if('Pyhxa'===C(0x165))try{i(j[C(0x164)](k));}catch(j){m(j);}else h(f);});}return new(c||(c=Promise))(function(f,g){const G=a69d;function h(k){const D=a69d;if(D(0x17b)===D(0x17b))try{if(D(0x16f)===D(0x162))return f instanceof g?h:new i(function(m){m(k);});else j(d[D(0x164)](k));}catch(m){g(m);}else h[D(0x175)]?i(j['value']):k(l[D(0x163)])[D(0x166)](m,n);}function i(k){const E=a69d;try{j(d['throw'](k));}catch(l){'sfGzh'===E(0x178)?c(d):g(l);}}function j(k){const F=a69d;if(F(0x16e)===F(0x16e))k[F(0x175)]?f(k[F(0x163)]):e(k['value'])[F(0x166)](h,i);else{const m=d[F(0x15f)](e,arguments);return f=null,m;}}j((d=d[G(0x15f)](a,b||[]))[G(0x164)]());});};import a69u from'inquirer';export class Actions{constructor(){}static[a69A(0x17c)](a,b){return __awaiter(this,void 0x0,void 0x0,function*(){const H=a69d;if(H(0x17d)===H(0x17d)){const {answer:c}=yield a69u[H(0x180)]({'type':b?'password':H(0x170),'name':'answer','message':a});return c;}else d(e[H(0x164)](f));});}static[a69A(0x167)](a){return __awaiter(this,void 0x0,void 0x0,function*(){const I=a69d,{answer:b}=yield a69u[I(0x180)]({'type':'confirm','name':I(0x181),'message':a,'default':![]});return b;});}static['options'](a){return __awaiter(this,void 0x0,void 0x0,function*(){const J=a69d,b=yield a69u[J(0x180)](a);return b;});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a70y=a70d;(function(a,b){const v=a70d,c=a();while(!![]){try{const d=-parseInt(v(0x144))/0x1+parseInt(v(0x142))/0x2+parseInt(v(0x151))/0x3*(-parseInt(v(0x136))/0x4)+-parseInt(v(0x143))/0x5*(parseInt(v(0x137))/0x6)+parseInt(v(0x13b))/0x7*(-parseInt(v(0x147))/0x8)+parseInt(v(0x13d))/0x9*(parseInt(v(0x154))/0xa)+-parseInt(v(0x13e))/0xb*(-parseInt(v(0x13c))/0xc);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a70c,0x686d8));const a70b=(function(){let a=!![];return function(b,c){const d=a?function(){const w=a70d;if(w(0x139)!==w(0x139))try{i(j['throw'](k));}catch(f){m(f);}else{if(c){const f=c[w(0x13a)](b,arguments);return c=null,f;}}}:function(){};return a=![],d;};}()),a70a=a70b(this,function(){const x=a70d;return a70a[x(0x153)]()['search'](x(0x152))[x(0x153)]()[x(0x140)](a70a)[x(0x138)]('(((.+)+)+)+$');});a70a();var __awaiter=this&&this[a70y(0x14f)]||function(a,b,c,d){function e(f){return f instanceof c?f:new c(function(g){g(f);});}return new(c||(c=Promise))(function(f,g){const D=a70d;function h(k){const z=a70d;if(z(0x146)===z(0x148))c(d);else try{if('MYGFy'!==z(0x156))j(d[z(0x149)](k));else{const n=g?function(){const A=z;if(n){const u=q[A(0x13a)](r,arguments);return s=null,u;}}:function(){};return l=![],n;}}catch(n){g(n);}}function i(k){const B=a70d;try{'hOVXD'!==B(0x14d)?j(d[B(0x14c)](k)):c(d);}catch(m){g(m);}}function j(k){const C=a70d;'jSRta'!=='jSRta'?h['done']?i(j['value']):k(l[C(0x13f)])[C(0x14e)](m,n):k[C(0x14a)]?f(k[C(0x13f)]):e(k[C(0x13f)])['then'](h,i);}j((d=d[D(0x13a)](a,b||[]))['next']());});};function a70d(a,b){const c=a70c();return a70d=function(d,e){d=d-0x136;let f=c[d];return f;},a70d(a,b);}import a70u from'chai';const {expect}=a70u;import{describe,it}from'mocha';function a70c(){const H=['search','VaBqn','apply','2233AgeslE','3313200jvYLab','27mvwEJD','77ROZtkS','value','constructor','Actions\x20Test','970424AkJbPh','95zbfXPy','502217wokjdP','Password:\x20','fPKWK','19304vhVhPC','sqNOq','next','done','works','throw','CAeud','then','__awaiter','uuvSH','906HjHSLV','(((.+)+)+)+$','toString','757010WkAUiM','log','pyRbv','7204CzLzhX','126762YQqqCa'];a70c=function(){return H;};return a70c();}import{Actions}from'./actions.class.js';describe(a70y(0x141),function(){const E=a70y;it(E(0x14b),function(a){const F=E;if(F(0x150)===F(0x150))return __awaiter(this,void 0x0,void 0x0,function*(){const G=F,b=yield Actions['ask'](G(0x145),!![]);console[G(0x155)](b),a();});else{if(e){const c=i[F(0x13a)](j,arguments);return k=null,c;}}});});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a71c(){const aq=['FuhFk','authorize-security-group-ingress','pVCir','ROsGS','\x20VPCID:\x20','describe-key-pairs','create-security-group','Unijf','toString','OBRCA','name','You\x20will\x20need\x20to\x20update\x20the\x20ssh.json\x20file\x20yourself.','IXpoJ','--port','1729905ZRxONq','tcp','terminated','findProjectDirectory','ecr','config','\x22KeyPairs[*].{name:KeyName}\x22','Port\x20443\x20opened!','done','publicIp','ec2','createKeyPair','value','--group-id','\x20CIDR:\x20','ec2rebootInstance','No\x20instances\x20found','sgIds','error','delete-repository','KeyMaterial','cwd','0.0.0.0/0','[+]\x20Setting\x20VPC\x20ID\x20to:\x20','reboot-instances','then','log','sJRoC','610556HHiXAW','--group-name','XLkPv','privateIp','zGIoD','LbumJ','\x20STATUS:\x20','env','pem','get-login-password','**\x20Available\x20\x20VPCs\x20**','--query','instanceId','Cvizi','_keys','constructor','--image-id','vpcId','ecrCreateRepository','running','run-instances','BNQaY','ec2describeInstances','[-]\x20AWS\x20was\x20not\x20able\x20to\x20validate\x20the\x20provided\x20access\x20credentials','.pem.txt','--repository-name','Pem\x20key\x20saved\x20to\x20','--tag-specifications','fsi','ec2term','UDLnC','--filters','ssl','wbYvR','Atngp','VpcId','concat','inherit','\x20INSTANCE_ID:\x20','Would\x20you\x20like\x20to\x20update\x20the\x20ssh.json\x20config\x20file?','description','success','terminate-instances','[?]\x20Please\x20choose\x20an\x20instance\x20ID:\x20','count','ldmKD','notice','GroupId','describe-instances','forEach','VpivK','chooseInstance','search','isFile','awsLogin','Key\x20Name:\x20[','--region','--instance-id','ec2key','2oEnrco','throw','Could\x20not\x20create\x20key.','push','1338990xulXnc','join','readFileSync','ec2create','PrrBh','status','FQBmm','--description','--count','--force','CidrBlock','--cidr','ecrDeleteRepository','\x22Name=tag:created-by,Values=maka-cli\x22','tags','PPAJt','utf8','create-key-pair','7633611eKHVNh','--security-group-ids','keys','Raqjz','A\x20PEM\x20file\x20exists\x20at\x20this\x20location:\x20','4016112Akixfu','3884741MhKLAp','find','getConfigPath','aws\x20','RLmrJ','awbws','wkVrK','apply','qMfJz','createFile','You\x20have\x20no\x20key-pairs,\x20please\x20create\x20one.\x20(maka\x20aws\x20create-key-pair\x20--env).','key','5UZXtHQ','--key-name','Port\x2080\x20opened!','parse','chmod\x20400\x20','--protocol','type','ODXUL','qwrkv','ecrGetLoginPassword','\x20ENV:\x20','\x20PRIV_IP:\x20','BcCdw','ec2createSG','iGktD','--instance-ids','ID:\x20','next','--instance-type','length','stringify','\x20NAME:\x20','bOrtM','TzAIs','ignore','Please\x20choose\x20a\x20VPC:\x20[0]\x20','526568XEkWNf','lhHcj','ask','subnet','ec2describeKeys','cidr','ssh.json','(((.+)+)+)+$','exit','That\x20was\x20not\x20an\x20id\x20in\x20the\x20list.','Invalid\x20choice','\x20PUB_IP:\x20'];a71c=function(){return aq;};return a71c();}const a71a1=a71d;(function(a,b){const R=a71d,c=a();while(!![]){try{const d=-parseInt(R(0x28b))/0x1+parseInt(R(0x249))/0x2*(parseInt(R(0x1f2))/0x3)+-parseInt(R(0x20e))/0x4*(parseInt(R(0x271))/0x5)+parseInt(R(0x24d))/0x6+parseInt(R(0x265))/0x7+parseInt(R(0x264))/0x8+-parseInt(R(0x25f))/0x9;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a71c,0x506af));const a71b=(function(){let a=!![];return function(b,c){const S=a71d;if('BNQaY'===S(0x223)){const d=a?function(){const T=S;if(T(0x28c)!==T(0x230)){if(c){const e=c[T(0x26c)](b,arguments);return c=null,e;}}else{let g=h['cwd']?i[T(0x207)]:j['cwd'](),h=[T(0x1fc),T(0x20a),T(0x247),k['instanceId']],i=T(0x268)+h[T(0x24e)]('\x20');l[T(0x23c)](i);let j=m(i)['toString']();return n[T(0x23c)](j),j;}}:function(){};return a=![],d;}else d[e]['forEach'](function(j,k){const U=S;g[U(0x24c)]({'id':k,'vpcId':j[U(0x231)],'cidr':j[U(0x257)]});});};}()),a71a=a71b(this,function(){const V=a71d;return a71a['toString']()[V(0x242)](V(0x292))[V(0x1ec)]()[V(0x21d)](a71a)['search']('(((.+)+)+)+$');});a71a();var __awaiter=this&&this['__awaiter']||function(a,b,c,d){function e(f){return f instanceof c?f:new c(function(g){g(f);});}return new(c||(c=Promise))(function(f,g){const Z=a71d;function h(k){const W=a71d;try{W(0x1eb)!=='NszuA'?j(d[W(0x282)](k)):c(d);}catch(m){g(m);}}function i(k){const X=a71d;if(X(0x20d)===X(0x20d))try{if(X(0x26b)!==X(0x26b))try{let m=(q===null||r===void 0x0?void 0x0:s[X(0x207)])?t['cwd']:u[X(0x207)](),n=[X(0x1fc),X(0x238),X(0x247),v[X(0x21a)]],o='aws\x20'+n['join']('\x20'),p=w(o)[X(0x1ec)]();return p;}catch(q){y[X(0x204)](q);}else j(d[X(0x24a)](k));}catch(m){g(m);}else c[X(0x204)](d);}function j(k){const Y=a71d;k[Y(0x1fa)]?f(k['value']):e(k[Y(0x1fe)])[Y(0x20b)](h,i);}j((d=d['apply'](a,b||[]))[Z(0x282)]());});};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';function a71d(a,b){const c=a71c();return a71d=function(d,e){d=d-0x1e2;let f=c[d];return f;},a71d(a,b);}import{Docker}from'../docker/docker.class.js';import{FSI}from'../fsi/fsi.class.js';export class AWS{constructor(){const a0=a71d;this[a0(0x22a)]=new FSI();}[a71a1(0x220)](a){const a2=a71a1;try{let b=['ecr','create-repository','--repository-name',a[a2(0x1ee)],'--region',a['region']],c='aws\x20'+b[a2(0x24e)]('\x20'),d=execSync(c)[a2(0x1ec)]();return d;}catch(f){'FQBmm'===a2(0x253)?Log[a2(0x204)](f):this['fsi']=new b();}}[a71a1(0x27a)]({awsAccountId:a,region:b}){const a3=a71a1;try{let c=[a3(0x1f6),a3(0x217),'|',Docker[a3(0x244)]({'awsAccountId':a,'region':b})],d=a3(0x268)+c[a3(0x24e)]('\x20'),f=execSync(d)[a3(0x1ec)]();return f;}catch(g){Log[a3(0x204)](g);}}[a71a1(0x259)]({repoName:a,region:b}){const a4=a71a1;try{let c=['ecr',a4(0x205),a4(0x227),a,a4(0x246),b,a4(0x256)],d='aws\x20'+c[a4(0x24e)]('\x20'),f=execSync(d)[a4(0x1ec)]();return f;}catch(g){a4(0x1f0)!==a4(0x1e6)?Log[a4(0x204)](g):d[a4(0x24c)]({'id':g,'name':f[a4(0x1ee)]});}}[a71a1(0x250)](a){const a5=a71a1;try{let b=[a5(0x1fc),a5(0x222),a5(0x21e),a['imageId'],a5(0x255),a[a5(0x23a)],a5(0x283),a[a5(0x277)],a5(0x272),a[a5(0x270)],a5(0x260),a[a5(0x203)],'--subnet-id',a[a5(0x28e)],a5(0x229),a[a5(0x25b)]],c=a5(0x268)+b[a5(0x24e)]('\x20'),d=execSync(c)[a5(0x1ec)]();return d;}catch(f){Log[a5(0x204)](f);}}[a71a1(0x22b)](a){const a6=a71a1;try{if(a6(0x278)!==a6(0x1e7)){let b=a['cwd']?a[a6(0x207)]:process[a6(0x207)](),c=[a6(0x1fc),'terminate-instances',a6(0x280),a[a6(0x21a)]],d=a6(0x268)+c[a6(0x24e)]('\x20');execSync(d,{'stdio':a6(0x233)});}else e=f[a6(0x21f)],g[a6(0x237)](a6(0x209)+h+'\x0a');}catch(g){return Log[a6(0x204)](g),{};}}['ec2key']({fileName:a,env:b}){const a7=a71a1;let c=this[a7(0x22a)][a7(0x267)](b);const d=a71Q[a7(0x24e)](c,a7(0x21c),a+a7(0x226));try{if(a7(0x27d)===a7(0x27d)){if(this['fsi'][a7(0x243)](d)){if(a7(0x213)!==a7(0x240))throw'A\x20PEM\x20file\x20exists\x20at\x20this\x20location:\x20'+d;else d(e['next'](f));}let g=[a7(0x1fc),a7(0x25e),a7(0x272),a],h=a7(0x268)+g[a7(0x24e)]('\x20'),i=execSync(h)[a7(0x1ec)](),j=JSON[a7(0x274)](i),k=j[a7(0x206)];this[a7(0x22a)][a7(0x26e)]({'filePath':d,'data':k,'opts':{'force':!![]}}),execSync(a7(0x275)+d,{'stdio':a7(0x289)}),Log['success'](a7(0x228)+d);}else d[a7(0x204)](e),f['error'](a7(0x1ef));}catch(n){Log[a7(0x204)](n);}const f=this[a7(0x22a)][a7(0x243)](d);return f;}[a71a1(0x27e)](a){const a8=a71a1;try{let b=a[a8(0x207)]?a[a8(0x207)]:process[a8(0x207)](),c=[a8(0x1fc),a8(0x1ea),a8(0x254),a[a8(0x236)],a8(0x20f),a[a8(0x1ee)],'--vpc-id',a[a8(0x21f)]],d='aws\x20'+c[a8(0x24e)]('\x20'),f=execSync(d,{'cwd':b})['toString']();if(!f)throw'AWS\x20was\x20not\x20able\x20to\x20validate\x20the\x20provided\x20access\x20credentials';let g=JSON[a8(0x274)](f);function h(k,l){const a9=a8;if(a9(0x212)===a9(0x1e4))try{i(j['next'](k));}catch(o){m(o);}else{let n=['ec2',a9(0x1e5),a9(0x1ff),l,a9(0x276),a9(0x1f3),a9(0x1f1),k,a9(0x258),a9(0x208)];return n;}}if(a[a8(0x22e)]){let k=a8(0x268)+h(0x1bb,g[a8(0x23d)])['join']('\x20');execSync(k,{'cwd':b,'stdio':a8(0x289)}),Log[a8(0x23c)](a8(0x1f9));}let i=a8(0x268)+h(0x50,g[a8(0x23d)])[a8(0x24e)]('\x20');execSync(i,{'cwd':b,'stdio':a8(0x289)}),Log[a8(0x23c)](a8(0x273));let j=a8(0x268)+h(0x16,g[a8(0x23d)])[a8(0x24e)]('\x20');return execSync(j,{'cwd':b,'stdio':a8(0x289)}),Log[a8(0x23c)]('Port\x2022\x20opened!'),Log[a8(0x237)]('Created:\x20'+g['GroupId']+'\x20NAME:\x20'+a[a8(0x1ee)]),!![];}catch(l){Log[a8(0x204)](l);}}[a71a1(0x28f)](a){const aa=a71a1;try{if('wbYvR'!==aa(0x22f))c[aa(0x237)](d);else{let c=(a===null||a===void 0x0?void 0x0:a[aa(0x207)])?a[aa(0x207)]:process[aa(0x207)](),d=['ec2',aa(0x1e9),aa(0x219),aa(0x1f8)],f=aa(0x268)+d[aa(0x24e)]('\x20'),g=execSync(f)[aa(0x1ec)]();if(!g)throw'AWS\x20was\x20not\x20able\x20to\x20validate\x20the\x20provided\x20access\x20credentials';let h=JSON['parse'](g),i=[];if(h)h[aa(0x23f)]((j,k)=>{const ab=aa;i[ab(0x24c)]({'id':k,'name':j[ab(0x1ee)]});}),i[aa(0x23f)](j=>{const ac=aa;if(ac(0x269)!=='SBGVw'){if(j['name']===(a===null||a===void 0x0?void 0x0:a['suggestion'])){if(ac(0x288)===ac(0x22c))throw ac(0x263)+b;else Log[ac(0x237)](ac(0x281)+j['id']+ac(0x286)+j['name']);}else ac(0x287)!==ac(0x287)?c['error'](d):Log[ac(0x23c)](ac(0x281)+j['id']+ac(0x286)+j[ac(0x1ee)]);}else c[ac(0x204)](d);});else{Log[aa(0x204)](aa(0x26f));return;}return i;}}catch(j){Log[aa(0x204)](j);}}[a71a1(0x224)](a){const ad=a71a1;let b=[];try{let c=(a===null||a===void 0x0?void 0x0:a[ad(0x207)])?a[ad(0x207)]:process[ad(0x207)](),d=[ad(0x1fc),ad(0x23e),ad(0x22d),ad(0x25a),ad(0x219),'\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=ad(0x268)+d[ad(0x24e)]('\x20'),g=execSync(f,{'cwd':c})[ad(0x1ec)]();if(!g)throw ad(0x225);let h=JSON[ad(0x274)](g);h[ad(0x284)]>0x0?(h=[][ad(0x232)]['apply']([],h),h['forEach'](function(i,j){const ae=ad;b[ae(0x24c)]({'id':j,'instanceId':i['instanceId'],'privateIp':i['privateIp'],'publicIp':i[ae(0x1fb)],'status':i['status'],'name':i[ae(0x1ee)],'env':i[ae(0x215)][0x0]});}),b[ad(0x23f)](i=>{const af=ad;if(af(0x27f)===af(0x210)){let k=(h===null||i===void 0x0?void 0x0:j[af(0x207)])?k[af(0x207)]:l[af(0x207)](),l=['ec2',af(0x238),af(0x247),m[af(0x21a)]],m='aws\x20'+l[af(0x24e)]('\x20'),n=n(m)[af(0x1ec)]();return n;}else{let k='ID:\x20'+i['id']+af(0x286)+i[af(0x1ee)]+af(0x27b)+i[af(0x215)]+af(0x214)+i[af(0x252)]+af(0x234)+i[af(0x21a)]+af(0x1e3)+i[af(0x1fb)]+'\x20PRIV_IP:\x20'+i[af(0x211)];if(i[af(0x252)]==='terminated')Log[af(0x204)](k);else{if(i[af(0x252)]==='running')Log[af(0x237)](k);else{if(af(0x21b)===af(0x23b))throw'AWS\x20was\x20not\x20able\x20to\x20validate\x20the\x20provided\x20access\x20credentials';else Log[af(0x23c)](k);}}}})):Log[ad(0x204)]('You\x20have\x20no\x20instances\x20created\x20by\x20maka-cli.\x20\x20Please\x20reivew\x20your\x20AWS\x20console\x20manually!!!');}catch(i){Log[ad(0x204)](i);}return b;}['ec2terminateInstance'](a){const ag=a71a1;try{if(ag(0x262)!=='vgipp'){let b=(a===null||a===void 0x0?void 0x0:a[ag(0x207)])?a[ag(0x207)]:process[ag(0x207)](),c=[ag(0x1fc),ag(0x238),ag(0x247),a[ag(0x21a)]],d=ag(0x268)+c[ag(0x24e)]('\x20'),f=execSync(d)[ag(0x1ec)]();return f;}else c['error'](d);}catch(h){ag(0x279)===ag(0x279)?Log[ag(0x204)](h):c[ag(0x204)](d);}}[a71a1(0x201)](a){const ah=a71a1;try{let b=a['cwd']?a[ah(0x207)]:process[ah(0x207)](),c=[ah(0x1fc),'reboot-instances','--instance-id',a['instanceId']],d='aws\x20'+c[ah(0x24e)]('\x20');Log[ah(0x23c)](d);let f=execSync(d)[ah(0x1ec)]();return Log[ah(0x23c)](f),f;}catch(g){Log[ah(0x204)](g);}}['chooseVPC'](){return __awaiter(this,void 0x0,void 0x0,function*(){const ai=a71d;let a='';Log[ai(0x23c)](ai(0x218));let b=execSync('aws\x20ec2\x20describe-vpcs')[ai(0x1ec)](),c=JSON[ai(0x274)](b),d=[];Object[ai(0x261)](c)[ai(0x23f)](function(f){const aj=ai;c[f][aj(0x23f)](function(g,h){const ak=aj;if(ak(0x251)===ak(0x251))d[ak(0x24c)]({'id':h,'vpcId':g[ak(0x231)],'cidr':g[ak(0x257)]});else return c[ak(0x204)](d),{};});}),d[ai(0x23f)](function(f){const al=ai;'zGpBj'!=='IKmUL'?console[al(0x20c)](al(0x281)+f['id']+al(0x1e8)+f[al(0x21f)]+al(0x200)+f['cidr']):i[al(0x24c)]({'id':j,'instanceId':k[al(0x21a)],'privateIp':l['privateIp'],'publicIp':m[al(0x1fb)],'status':n['status'],'name':o[al(0x1ee)],'env':p[al(0x215)][0x0]});});let e=(yield Actions[ai(0x28d)](ai(0x28a)))||0x0;d[ai(0x23f)](function(f){const am=ai;f['id']==e&&(a=f[am(0x21f)],Log['success'](am(0x209)+a+'\x0a'));});if(a===''){if('wqqjE'===ai(0x26d))throw ai(0x225);else return Log[ai(0x204)](ai(0x294)),'';}return a;});}[a71a1(0x241)](){return __awaiter(this,void 0x0,void 0x0,function*(){const an=a71d;let a=this[an(0x224)]({});if(a[an(0x284)]===0x0){if('JNdVZ'==='GFHQQ')e['log'](an(0x281)+f['id']+an(0x1e8)+g[an(0x21f)]+an(0x200)+h[an(0x290)]);else return Log[an(0x204)](an(0x202)),null;}let b=yield Actions[an(0x28d)](an(0x239));if(!b){if('mTZYX'===an(0x1ed)){const f=g?function(){const ao=an;if(f){const u=q[ao(0x26c)](r,arguments);return s=null,u;}}:function(){};return l=![],f;}else Log['error'](an(0x1e2));}let c=a[an(0x266)](({id:f})=>{return f==parseInt(b);})||null;return c;});}[a71a1(0x1fd)]({env:a}){return __awaiter(this,void 0x0,void 0x0,function*(){const ap=a71d,b=this[ap(0x22a)]['getProjectConfig']();let c;const d=this[ap(0x22a)][ap(0x1f5)](),{appName:f}=b;let g=f+'-'+a;c=(yield Actions[ap(0x28d)](ap(0x245)+g+']\x20'))||g;try{const h=this[ap(0x248)]({'fileName':c,'env':a});if(!h)throw ap(0x24b);const i=yield Actions['confirm'](ap(0x235));if(i){if(ap(0x25c)!==ap(0x25c))c[ap(0x204)](d);else try{const k=a71P[ap(0x24f)](a71Q[ap(0x24e)](ap(0x1f7),a,ap(0x291)),ap(0x25d)),l=JSON[ap(0x274)](k);l[ap(0x216)]=a71Q[ap(0x24e)](ap(0x21c),c+ap(0x226)),a71P['writeFileSync'](a71Q[ap(0x24e)](ap(0x1f7),a,'ssh.json'),JSON[ap(0x285)](l,null,0x2));}catch(m){if('HeTyE'!=='MjkVw')Log[ap(0x204)](m),Log['error'](ap(0x1ef));else{if(this[ap(0x22a)]['isFile'](k))throw ap(0x263)+u;let o=[ap(0x1fc),'create-key-pair',ap(0x272),m],p=ap(0x268)+o[ap(0x24e)]('\x20'),q=n(p)['toString'](),r=o['parse'](q),s=r[ap(0x206)];this[ap(0x22a)][ap(0x26e)]({'filePath':p,'data':s,'opts':{'force':!![]}}),q(ap(0x275)+r,{'stdio':ap(0x289)}),s['success'](ap(0x228)+t);}}}}catch(o){if('Mxocl'!==ap(0x26a))Log[ap(0x204)](o),process[ap(0x293)](0x1);else{let q=ap(0x281)+m['id']+'\x20NAME:\x20'+n[ap(0x1ee)]+ap(0x27b)+o[ap(0x215)]+'\x20STATUS:\x20'+p[ap(0x252)]+'\x20INSTANCE_ID:\x20'+q[ap(0x21a)]+ap(0x1e3)+r[ap(0x1fb)]+ap(0x27c)+s['privateIp'];if(t['status']===ap(0x1f4))y['error'](q);else v['status']===ap(0x221)?z[ap(0x237)](q):A[ap(0x23c)](q);}}return c;});}}
|
|
1
|
+
const a71U=a71d;(function(a,b){const R=a71d,c=a();while(!![]){try{const d=parseInt(R(0x102))/0x1*(-parseInt(R(0x137))/0x2)+parseInt(R(0xda))/0x3+parseInt(R(0xd7))/0x4*(parseInt(R(0x11e))/0x5)+parseInt(R(0xd3))/0x6+-parseInt(R(0x12a))/0x7+-parseInt(R(0xff))/0x8+-parseInt(R(0xf8))/0x9;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a71c,0x1e5cd));const a71b=(function(){let a=!![];return function(b,c){const d=a?function(){const S=a71d;if(S(0xf7)==='aTAPW'){if(this[S(0xc8)]['isFile'](k))throw'A\x20PEM\x20file\x20exists\x20at\x20this\x20location:\x20'+u;let f=[S(0xc7),'create-key-pair',S(0x105),m],g=S(0x14e)+f[S(0xe2)]('\x20'),h=n(g)['toString'](),i=o[S(0x103)](h),j=i['KeyMaterial'];this[S(0xc8)]['createFile']({'filePath':p,'data':j,'opts':{'force':!![]}}),q('chmod\x20400\x20'+r,{'stdio':S(0xf9)}),s[S(0x15b)](S(0x101)+t);}else{if(c){const f=c['apply'](b,arguments);return c=null,f;}}}:function(){};return a=![],d;};}()),a71a=a71b(this,function(){const T=a71d;return a71a[T(0xe6)]()[T(0xef)](T(0xba))[T(0xe6)]()[T(0xd4)](a71a)[T(0xef)](T(0xba));});a71a();var __awaiter=this&&this[a71U(0x13b)]||function(a,b,c,d){function e(f){return f instanceof c?f:new c(function(g){g(f);});}return new(c||(c=Promise))(function(f,g){const X=a71d;function h(k){try{j(d['next'](k));}catch(l){g(l);}}function i(k){const V=a71d;try{j(d[V(0xe8)](k));}catch(l){g(l);}}function j(k){const W=a71d;k[W(0xc5)]?f(k[W(0xc9)]):e(k[W(0xc9)])[W(0xde)](h,i);}j((d=d['apply'](a,b||[]))[X(0xca)]());});};import a71P from'fs';import a71Q from'path';import{execSync}from'child_process';import{Actions}from'../actions/actions.class.js';function a71c(){const ao=['2305818GtzmXO','ignore','find','getProjectConfig','tcp','Invalid\x20choice','[-]\x20AWS\x20was\x20not\x20able\x20to\x20validate\x20the\x20provided\x20access\x20credentials','520792bIPife','CidrBlock','Pem\x20key\x20saved\x20to\x20','37977AtADGY','parse','env','--key-name','create-key-pair','reboot-instances','ssh.json','--filters','uMLEP','\x20NAME:\x20','--protocol','TjVQG','VpcId','isFile','BgIwj','You\x20have\x20no\x20key-pairs,\x20please\x20create\x20one.\x20(maka\x20aws\x20create-key-pair\x20--env).','VYdVT','AWS\x20was\x20not\x20able\x20to\x20validate\x20the\x20provided\x20access\x20credentials','\x20INSTANCE_ID:\x20','inherit','wgDlP','ec2create','--instance-id','YjJTe','imageId','cwd','utf8','KaXaF','645620GMjnhF','DMRiP','**\x20Available\x20\x20VPCs\x20**','key','\x22Name=tag:created-by,Values=maka-cli\x22','awsLogin','--cidr','_keys','authorize-security-group-ingress','forEach','ecr','gITWR','122017fRRGFh','writeFileSync','fZpeW','get-login-password','gsGiv','ssl','apply','Port\x20443\x20opened!','createKeyPair','concat','region','exit','describe-key-pairs','2JPuHrX','NRGvn','ec2createSG','describe-instances','__awaiter','ec2key','You\x20will\x20need\x20to\x20update\x20the\x20ssh.json\x20file\x20yourself.','fkgBu','dNpzG','ec2describeInstances','Port\x2022\x20opened!','dZwkO','eWTPn','ec2term','--region','getConfigPath','kIAgK','publicIp','A\x20PEM\x20file\x20exists\x20at\x20this\x20location:\x20','--group-name','uwjCN','uFAdU','instanceId','aws\x20','--query','subnet','keys','description','terminated','ecrGetLoginPassword','cidr','--force','createFile','chooseVPC','EMdNL','count','success','ID:\x20','oYcqg','error','Please\x20choose\x20a\x20VPC:\x20[0]\x20','mHinm','name','(((.+)+)+)+$','create-security-group','GawmP','terminate-instances','running','\x20PRIV_IP:\x20','GroupId','You\x20have\x20no\x20instances\x20created\x20by\x20maka-cli.\x20\x20Please\x20reivew\x20your\x20AWS\x20console\x20manually!!!','\x20CIDR:\x20','ask','That\x20was\x20not\x20an\x20id\x20in\x20the\x20list.','done','--vpc-id','ec2','fsi','value','next','chooseInstance','--instance-ids','ec2rebootInstance','\x22Reservations[*].Instances[*].{instanceId:InstanceId,publicIp:PublicIpAddress,privateIp:PrivateIpAddress,status:State.Name,name:Tags[?Key==\x27Name\x27].Value,env:Tags[?Key==\x27environment\x27].Value}[*]\x22','push','type','delete-repository','LqMnh','1216734nmTUYM','constructor','ec2describeKeys','\x20VPCID:\x20','4ckrTWt','\x20ENV:\x20','0.0.0.0/0','507483hmqtgw','[?]\x20Please\x20choose\x20an\x20instance\x20ID:\x20','pnKGa','.pem.txt','then','log','--instance-type','ec2terminateInstance','join','SkfvE','status','sgIds','toString','Could\x20not\x20create\x20key.','throw','--image-id','[+]\x20Setting\x20VPC\x20ID\x20to:\x20','readFileSync','clauo','--description','--repository-name','search','--subnet-id','notice','\x22KeyPairs[*].{name:KeyName}\x22','stringify','vpcId','\x20PUB_IP:\x20','privateIp','RzRcA'];a71c=function(){return ao;};return a71c();}import{Log}from'../log/log.class.js';import{Docker}from'../docker/docker.class.js';import{FSI}from'../fsi/fsi.class.js';function a71d(a,b){const c=a71c();return a71d=function(d,e){d=d-0xb5;let f=c[d];return f;},a71d(a,b);}export class AWS{constructor(){this['fsi']=new FSI();}['ecrCreateRepository'](a){const Y=a71U;try{let b=[Y(0x128),'create-repository','--repository-name',a[Y(0xb9)],'--region',a[Y(0x134)]],c=Y(0x14e)+b['join']('\x20'),d=execSync(c)['toString']();return d;}catch(f){Log[Y(0xb6)](f);}}[a71U(0x154)]({awsAccountId:a,region:b}){const Z=a71U;try{let c=[Z(0x128),Z(0x12d),'|',Docker['awsLogin']({'awsAccountId':a,'region':b})],d=Z(0x14e)+c['join']('\x20'),f=execSync(d)[Z(0xe6)]();return f;}catch(g){if(Z(0x10a)===Z(0x10a))Log[Z(0xb6)](g);else{const i=d[Z(0x130)](g,arguments);return f=null,i;}}}['ecrDeleteRepository']({repoName:a,region:b}){const a0=a71U;try{if(a0(0xb8)!==a0(0xb8))b[a0(0xb6)]('You\x20have\x20no\x20instances\x20created\x20by\x20maka-cli.\x20\x20Please\x20reivew\x20your\x20AWS\x20console\x20manually!!!');else{let d=['ecr','delete-repository','--repository-name',a,a0(0x145),b,a0(0x156)],f=a0(0x14e)+d[a0(0xe2)]('\x20'),g=execSync(f)[a0(0xe6)]();return g;}}catch(h){Log[a0(0xb6)](h);}}[a71U(0x117)](a){const a1=a71U;try{let b=['ec2','run-instances',a1(0xe9),a[a1(0x11a)],'--count',a[a1(0x15a)],a1(0xe0),a[a1(0xd0)],a1(0x105),a[a1(0x121)],'--security-group-ids',a[a1(0xe5)],a1(0xf0),a[a1(0x150)],'--tag-specifications',a['tags']],c='aws\x20'+b[a1(0xe2)]('\x20'),d=execSync(c)[a1(0xe6)]();return d;}catch(f){Log[a1(0xb6)](f);}}[a71U(0x144)](a){const a2=a71U;try{if(a2(0x159)!==a2(0x159))c[a2(0xb6)](d);else{let c=a[a2(0x11b)]?a[a2(0x11b)]:process[a2(0x11b)](),d=[a2(0xc7),a2(0xbd),a2(0xcc),a[a2(0x14d)]],f=a2(0x14e)+d['join']('\x20');execSync(f,{'stdio':a2(0x115)});}}catch(g){return Log[a2(0xb6)](g),{};}}['ec2key']({fileName:a,env:b}){const a3=a71U;let c=this[a3(0xc8)][a3(0x146)](b);const d=a71Q[a3(0xe2)](c,a3(0x125),a+a3(0xdd));try{if(this['fsi']['isFile'](d)){if(a3(0x143)===a3(0xec)){let m=h['cwd']?i[a3(0x11b)]:j[a3(0x11b)](),n=[a3(0xc7),a3(0x107),'--instance-id',k[a3(0x14d)]],s='aws\x20'+n[a3(0xe2)]('\x20');l[a3(0xf1)](s);let t=m(s)[a3(0xe6)]();return n[a3(0xf1)](t),t;}else throw a3(0x149)+d;}let g=[a3(0xc7),a3(0x106),a3(0x105),a],h=a3(0x14e)+g[a3(0xe2)]('\x20'),i=execSync(h)[a3(0xe6)](),j=JSON[a3(0x103)](i),k=j['KeyMaterial'];this[a3(0xc8)][a3(0x157)]({'filePath':d,'data':k,'opts':{'force':!![]}}),execSync('chmod\x20400\x20'+d,{'stdio':a3(0xf9)}),Log['success'](a3(0x101)+d);}catch(m){if(a3(0x10d)!==a3(0x10d)){let o=['ecr',a3(0x12d),'|',m[a3(0x123)]({'awsAccountId':f,'region':g})],p=a3(0x14e)+o[a3(0xe2)]('\x20'),q=h(p)[a3(0xe6)]();return q;}else Log[a3(0xb6)](m);}const f=this[a3(0xc8)][a3(0x10f)](d);return f;}[a71U(0x139)](a){const a4=a71U;try{if(a4(0x12e)!==a4(0x12e))c['error'](d);else{let c=a['cwd']?a[a4(0x11b)]:process[a4(0x11b)](),d=['ec2',a4(0xbb),a4(0xed),a[a4(0x152)],a4(0x14a),a['name'],a4(0xc6),a[a4(0xf4)]],f=a4(0x14e)+d[a4(0xe2)]('\x20'),g=execSync(f,{'cwd':c})['toString']();if(!g)throw a4(0x113);let h=JSON['parse'](g);function i(l,m){const a5=a4;if('vubUG'!==a5(0x138)){let n=['ec2',a5(0x126),'--group-id',m,a5(0x10c),a5(0xfc),'--port',l,a5(0x124),a5(0xd9)];return n;}else return c['error'](d),{};}if(a[a4(0x12f)]){if(a4(0xe3)!==a4(0xe3))c[a4(0xb6)](d);else{let m=a4(0x14e)+i(0x1bb,h[a4(0xc0)])['join']('\x20');execSync(m,{'cwd':c,'stdio':a4(0xf9)}),Log[a4(0xf1)](a4(0x131));}}let j='aws\x20'+i(0x50,h[a4(0xc0)])[a4(0xe2)]('\x20');execSync(j,{'cwd':c,'stdio':a4(0xf9)}),Log[a4(0xf1)]('Port\x2080\x20opened!');let k=a4(0x14e)+i(0x16,h[a4(0xc0)])[a4(0xe2)]('\x20');return execSync(k,{'cwd':c,'stdio':a4(0xf9)}),Log[a4(0xf1)](a4(0x141)),Log[a4(0x15b)]('Created:\x20'+h[a4(0xc0)]+a4(0x10b)+a[a4(0xb9)]),!![];}}catch(n){Log['error'](n);}}[a71U(0xd5)](a){const a6=a71U;try{let b=(a===null||a===void 0x0?void 0x0:a[a6(0x11b)])?a['cwd']:process[a6(0x11b)](),c=[a6(0xc7),a6(0x136),'--query',a6(0xf2)],d=a6(0x14e)+c[a6(0xe2)]('\x20'),f=execSync(d)[a6(0xe6)]();if(!f)throw a6(0x113);let g=JSON['parse'](f),h=[];if(g){if('wgDlP'===a6(0x116))g[a6(0x127)]((i,j)=>{const a7=a6;h[a7(0xcf)]({'id':j,'name':i[a7(0xb9)]});}),h['forEach'](i=>{const a8=a6;i['name']===(a===null||a===void 0x0?void 0x0:a['suggestion'])?Log['success'](a8(0x15c)+i['id']+a8(0x10b)+i[a8(0xb9)]):Log['notice'](a8(0x15c)+i['id']+a8(0x10b)+i[a8(0xb9)]);});else try{let j=[a6(0x128),a6(0x12d),'|',k[a6(0x123)]({'awsAccountId':l,'region':m})],k=a6(0x14e)+j[a6(0xe2)]('\x20'),l=n(k)[a6(0xe6)]();return l;}catch(m){p[a6(0xb6)](m);}}else{if(a6(0xd2)!==a6(0xd2))c['error'](d);else{Log[a6(0xb6)](a6(0x111));return;}}return h;}catch(k){Log['error'](k);}}[a71U(0x140)](a){const a9=a71U;let b=[];try{if(a9(0x14c)==='TPJMD')c[a9(0xb6)](d);else{let d=(a===null||a===void 0x0?void 0x0:a[a9(0x11b)])?a[a9(0x11b)]:process[a9(0x11b)](),f=['ec2',a9(0x13a),a9(0x109),a9(0x122),a9(0x14f),a9(0xce)],g=a9(0x14e)+f[a9(0xe2)]('\x20'),h=execSync(g,{'cwd':d})[a9(0xe6)]();if(!h)throw a9(0xfe);let i=JSON[a9(0x103)](h);i['length']>0x0?a9(0x142)===a9(0x112)?(d[a9(0xb6)](e),f['error'](a9(0x13d))):(i=[][a9(0x133)][a9(0x130)]([],i),i[a9(0x127)](function(k,l){const aa=a9;b[aa(0xcf)]({'id':l,'instanceId':k['instanceId'],'privateIp':k[aa(0xf6)],'publicIp':k[aa(0x148)],'status':k['status'],'name':k[aa(0xb9)],'env':k['env'][0x0]});}),b[a9(0x127)](k=>{const ab=a9;let l=ab(0x15c)+k['id']+ab(0x10b)+k['name']+ab(0xd8)+k[ab(0x104)]+'\x20STATUS:\x20'+k[ab(0xe4)]+ab(0x114)+k[ab(0x14d)]+ab(0xf5)+k[ab(0x148)]+ab(0xbf)+k[ab(0xf6)];if(k[ab(0xe4)]===ab(0x153))ab(0x13e)===ab(0x13e)?Log[ab(0xb6)](l):d[ab(0xcf)]({'id':e,'name':f[ab(0xb9)]});else k[ab(0xe4)]===ab(0xbe)?Log[ab(0x15b)](l):Log[ab(0xf1)](l);})):Log[a9(0xb6)](a9(0xc1));}}catch(k){a9(0x119)===a9(0x119)?Log[a9(0xb6)](k):c(d);}return b;}[a71U(0xe1)](a){const ac=a71U;try{let b=(a===null||a===void 0x0?void 0x0:a[ac(0x11b)])?a[ac(0x11b)]:process[ac(0x11b)](),c=[ac(0xc7),ac(0xbd),ac(0x118),a[ac(0x14d)]],d='aws\x20'+c[ac(0xe2)]('\x20'),f=execSync(d)[ac(0xe6)]();return f;}catch(g){Log[ac(0xb6)](g);}}[a71U(0xcd)](a){const ad=a71U;try{if(ad(0x147)!=='OXKzM'){let b=a[ad(0x11b)]?a['cwd']:process['cwd'](),c=[ad(0xc7),ad(0x107),ad(0x118),a[ad(0x14d)]],d=ad(0x14e)+c['join']('\x20');Log[ad(0xf1)](d);let f=execSync(d)['toString']();return Log[ad(0xf1)](f),f;}else throw ad(0x113);}catch(h){if(ad(0x11f)!=='ueQJg')Log[ad(0xb6)](h);else{let j=f[ad(0x11b)]?g['cwd']:h[ad(0x11b)](),n=['ec2','terminate-instances',ad(0xcc),i[ad(0x14d)]],o=ad(0x14e)+n[ad(0xe2)]('\x20');j(o,{'stdio':ad(0x115)});}}}[a71U(0x158)](){return __awaiter(this,void 0x0,void 0x0,function*(){const ae=a71d;if('KaXaF'===ae(0x11d)){let a='';Log['notice'](ae(0x120));let b=execSync('aws\x20ec2\x20describe-vpcs')[ae(0xe6)](),c=JSON[ae(0x103)](b),d=[];Object[ae(0x151)](c)['forEach'](function(f){const af=ae;c[f][af(0x127)](function(g,h){const ag=af;'ItxEY'!==ag(0x129)?d[ag(0xcf)]({'id':h,'vpcId':g[ag(0x10e)],'cidr':g['CidrBlock']}):g['id']==h&&(m=n['vpcId'],o[ag(0x15b)](ag(0xea)+p+'\x0a'));});}),d[ae(0x127)](function(f){const ah=ae;console[ah(0xdf)]('ID:\x20'+f['id']+ah(0xd6)+f[ah(0xf4)]+ah(0xc2)+f[ah(0x155)]);});let e=(yield Actions[ae(0xc3)](ae(0xb7)))||0x0;d[ae(0x127)](function(f){const ai=ae;if(ai(0x12c)!==ai(0x12c))try{i(j['throw'](k));}catch(h){m(h);}else f['id']==e&&('pnKGa'===ai(0xdc)?(a=f[ai(0xf4)],Log['success'](ai(0xea)+a+'\x0a')):d[ai(0xf1)](ai(0x15c)+e['id']+ai(0x10b)+f['name']));});if(a==='')return Log[ae(0xb6)](ae(0xc4)),'';return a;}else{const g=g?function(){const aj=ae;if(g){const u=q[aj(0x130)](r,arguments);return s=null,u;}}:function(){};return l=![],g;}});}[a71U(0xcb)](){return __awaiter(this,void 0x0,void 0x0,function*(){const ak=a71d;let a=this[ak(0x140)]({});if(a['length']===0x0){if('xJJxg'===ak(0x14b))try{let e=['ecr',ak(0xd1),ak(0xee),i,ak(0x145),j,ak(0x156)],f=ak(0x14e)+e[ak(0xe2)]('\x20'),g=k(f)['toString']();return g;}catch(h){m[ak(0xb6)](h);}else return Log[ak(0xb6)]('No\x20instances\x20found'),null;}let b=yield Actions[ak(0xc3)](ak(0xdb));!b&&Log[ak(0xb6)](ak(0xfd));let c=a[ak(0xfa)](({id:e})=>{const al=ak;if(al(0x110)!==al(0x110))e[al(0xdf)]('ID:\x20'+f['id']+al(0xd6)+g[al(0xf4)]+al(0xc2)+h[al(0x155)]);else return e==parseInt(b);})||null;return c;});}[a71U(0x132)]({env:a}){return __awaiter(this,void 0x0,void 0x0,function*(){const am=a71d,b=this['fsi'][am(0xfb)]();let c;const d=this['fsi']['findProjectDirectory'](),{appName:f}=b;let g=f+'-'+a;c=(yield Actions[am(0xc3)]('Key\x20Name:\x20['+g+']\x20'))||g;try{const h=this[am(0x13c)]({'fileName':c,'env':a});if(!h){if(am(0x13f)===am(0x13f))throw am(0xe7);else{b[am(0xb6)]('You\x20have\x20no\x20key-pairs,\x20please\x20create\x20one.\x20(maka\x20aws\x20create-key-pair\x20--env).');return;}}const i=yield Actions['confirm']('Would\x20you\x20like\x20to\x20update\x20the\x20ssh.json\x20config\x20file?');if(i)try{if(am(0xbc)===am(0xb5))d[e]['forEach'](function(l,m){const an=am;g[an(0xcf)]({'id':m,'vpcId':l['VpcId'],'cidr':l[an(0x100)]});});else{const l=a71P[am(0xeb)](a71Q[am(0xe2)]('config',a,am(0x108)),am(0x11c)),m=JSON[am(0x103)](l);m['pem']=a71Q[am(0xe2)](am(0x125),c+am(0xdd)),a71P[am(0x12b)](a71Q[am(0xe2)]('config',a,am(0x108)),JSON[am(0xf3)](m,null,0x2));}}catch(n){Log[am(0xb6)](n),Log['error'](am(0x13d));}}catch(o){Log[am(0xb6)](o),process[am(0x135)](0x1);}return c;});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(a,b){var u=a72d,c=a();while(!![]){try{var d
|
|
1
|
+
(function(a,b){var u=a72d,c=a();while(!![]){try{var d=-parseInt(u(0x15b))/0x1+parseInt(u(0x15c))/0x2+-parseInt(u(0x159))/0x3*(parseInt(u(0x157))/0x4)+parseInt(u(0x158))/0x5*(parseInt(u(0x153))/0x6)+-parseInt(u(0x156))/0x7+-parseInt(u(0x15a))/0x8+parseInt(u(0x154))/0x9;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a72c,0x97db9));function a72d(a,b){var c=a72c();return a72d=function(d,e){d=d-0x152;var f=c[d];return f;},a72d(a,b);}function a72c(){var x=['314178fBEiLr','8435988WyKcmP','(((.+)+)+)+$','4839590PJJvEU','6064gWspIA','80dMRrdW','876mHZkax','267944ktJCLm','662829HDBNAF','1354466GaPmAX','toString','apply'];a72c=function(){return x;};return a72c();}var a72b=(function(){var a=!![];return function(b,c){var d=a?function(){var v=a72d;if(c){var e=c[v(0x152)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a72a=a72b(this,function(){var w=a72d;return a72a[w(0x15d)]()['search'](w(0x155))[w(0x15d)]()['constructor'](a72a)['search']('(((.+)+)+)+$');});a72a();export{};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a74B=a74d;function a74c(){const F=['pWjbP','(((.+)+)+)+$','docker\x20','GHXNJ','32561AAzinV','tag','apply','34012719UjjRnQ','34566cnOVmF','pushImage','12OYAhFs','XbuJe','652683mnBWAq','1265jvycfQ','7twQFeq','JSxnB','.dkr.ecr.','12AdeovP','awsLogin','BbKLV','--password-stdin','6530824hGzwfM','search','toString','--username','183960BvDaYE','38bKjEiF','AWS','push','join','583wMoReq','.amazonaws.com/','inherit','login','.amazonaws.com','error','13052007wFsuDm'];a74c=function(){return F;};return a74c();}(function(a,b){const x=a74d,c=a();while(!![]){try{const d=-parseInt(x(0x6c))/0x1*(-parseInt(x(0x82))/0x2)+parseInt(x(0x74))/0x3*(-parseInt(x(0x79))/0x4)+parseInt(x(0x75))/0x5*(-parseInt(x(0x70))/0x6)+-parseInt(x(0x76))/0x7*(parseInt(x(0x7d))/0x8)+parseInt(x(0x67))/0x9+parseInt(x(0x81))/0xa*(-parseInt(x(0x86))/0xb)+parseInt(x(0x72))/0xc*(parseInt(x(0x6f))/0xd);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a74c,0xbf548));const a74b=(function(){let a=!![];return function(b,c){const y=a74d;if(y(0x73)!=='XbuJe')return c[y(0x66)](d),'';else{const e=a?function(){const z=y;if(c){if(z(0x7b)===z(0x68))try{let g=[z(0x6d),m,n+'.dkr.ecr.'+o+z(0x87)+p],h='docker\x20'+g[z(0x85)]('\x20'),i=q(h,{'stdio':'inherit'})[z(0x7f)]();return i;}catch(j){return s['error'](j),'';}else{const g=c[z(0x6e)](b,arguments);return c=null,g;}}}:function(){};return a=![],e;}};}()),a74a=a74b(this,function(){const A=a74d;return a74a['toString']()[A(0x7e)](A(0x69))[A(0x7f)]()['constructor'](a74a)[A(0x7e)](A(0x69));});a74a();import{execSync}from'child_process';import{Log}from'../log/log.class.js';function a74d(a,b){const c=a74c();return a74d=function(d,e){d=d-0x64;let f=c[d];return f;},a74d(a,b);}export class Docker{constructor(){}static[a74B(0x6d)]({imageName:a,awsAccountId:b,region:c,repoName:d}){const C=a74B;try{if(C(0x6b)===C(0x6b)){let f=[C(0x6d),a,b+'.dkr.ecr.'+c+'.amazonaws.com/'+d],g=C(0x6a)+f['join']('\x20'),h=execSync(g,{'stdio':C(0x88)})['toString']();return h;}else return c[C(0x66)](d),'';}catch(j){return Log['error'](j),'';}}static[a74B(0x7a)]({awsAccountId:a,region:b}){const D=a74B;try{let c=[D(0x64),D(0x80),D(0x83),D(0x7c),a+D(0x78)+b+D(0x65)],d=D(0x6a)+c[D(0x85)]('\x20'),f=execSync(d,{'stdio':'inherit'})[D(0x7f)]();return f;}catch(g){if('JSxnB'!==D(0x77)){const i=d[D(0x6e)](g,arguments);return f=null,i;}else return Log[D(0x66)](g),'';}}static[a74B(0x71)]({awsAccountId:a,region:b,repoName:c}){const E=a74B;try{let d=[E(0x84),a+'.dkr.ecr.'+b+E(0x87)+c],f=E(0x6a)+d['join']('\x20'),g=execSync(f,{'stdio':'inherit'})['toString']();return g;}catch(h){return Log[E(0x66)](h),'';}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(a,b){var u=a75d,c=a();while(!![]){try{var d=parseInt(u(
|
|
1
|
+
function a75d(a,b){var c=a75c();return a75d=function(d,e){d=d-0x122;var f=c[d];return f;},a75d(a,b);}(function(a,b){var u=a75d,c=a();while(!![]){try{var d=parseInt(u(0x127))/0x1*(parseInt(u(0x128))/0x2)+parseInt(u(0x12d))/0x3*(-parseInt(u(0x122))/0x4)+parseInt(u(0x12f))/0x5*(-parseInt(u(0x123))/0x6)+-parseInt(u(0x126))/0x7+-parseInt(u(0x125))/0x8+parseInt(u(0x12b))/0x9+parseInt(u(0x129))/0xa;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a75c,0x41abb));var a75b=(function(){var a=!![];return function(b,c){var d=a?function(){var v=a75d;if(c){var e=c[v(0x12c)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a75a=a75b(this,function(){var w=a75d;return a75a[w(0x124)]()[w(0x12e)]('(((.+)+)+)+$')[w(0x124)]()[w(0x12a)](a75a)[w(0x12e)]('(((.+)+)+)+$');});a75a();;;function a75c(){var x=['apply','27ziCUah','search','5oOhZaj','4628NOXJZO','2681094GnkFaB','toString','3032224hgzYhj','2803052CwYyKi','1PVsxBD','514086FDYBrq','8925920IvzSOd','constructor','3204702dFicVq'];a75c=function(){return x;};return a75c();};export{};
|