@maka/maka-cli 4.10.2 → 4.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/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/di.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/dkp.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/dsg.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/rbi.sub.cmd.js +1 -1
- package/bundle/obf/src/commands/aws/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/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/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 -0
- package/bundle/obf/src/generators/kits/auth/auth.generator.js +1 -0
- package/bundle/obf/src/generators/kits/auth/basic-meteor.auth.gen.js +1 -0
- package/bundle/obf/src/generators/kits/auth/provider.auth.gen.js +1 -0
- 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 -0
- 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/client/head.html +0 -3
- package/bundle/obf/src/templates/meteor/app/client/main.js +2 -0
- package/bundle/obf/src/templates/meteor/app/client/main.js.jsx +2 -0
- package/bundle/obf/src/templates/meteor/app/client/main.js.ts +2 -0
- package/bundle/obf/src/templates/meteor/app/client/main.js.tsx +2 -0
- package/bundle/obf/src/templates/meteor/app/imports/startup/client/index.js.jsx +5 -6
- package/bundle/obf/src/templates/meteor/app/imports/startup/client/index.js.tsx +5 -6
- package/bundle/obf/src/templates/meteor/app/imports/startup/client/routes.js.jsx +4 -3
- package/bundle/obf/src/templates/meteor/app/imports/startup/client/routes.js.tsx +4 -3
- package/bundle/obf/src/templates/meteor/app/imports/startup/lib/index.js.jsx +2 -2
- package/bundle/obf/src/templates/meteor/app/imports/startup/lib/index.js.tsx +2 -2
- package/bundle/obf/src/templates/meteor/app/imports/startup/lib/routes.js.jsx +4 -3
- package/bundle/obf/src/templates/meteor/app/imports/startup/lib/routes.js.tsx +4 -3
- package/bundle/obf/src/templates/meteor/app/imports/startup/server/index.js.jsx +1 -1
- package/bundle/obf/src/templates/meteor/app/imports/startup/server/index.js.tsx +1 -1
- package/bundle/obf/src/templates/meteor/app/lib/main.js +2 -0
- package/bundle/obf/src/templates/meteor/app/lib/main.js.jsx +2 -0
- package/bundle/obf/src/templates/meteor/app/lib/main.js.ts +2 -0
- package/bundle/obf/src/templates/meteor/app/lib/main.js.tsx +2 -0
- package/bundle/obf/src/templates/meteor/app/server/main.js +2 -0
- package/bundle/obf/src/templates/meteor/app/server/main.js.jsx +2 -0
- package/bundle/obf/src/templates/meteor/app/server/main.js.ts +2 -0
- package/bundle/obf/src/templates/meteor/app/server/main.js.tsx +2 -0
- package/bundle/obf/src/templates/meteor/config/settings.json +1 -1
- package/bundle/obf/src/templates/meteor/publish/publish.js +2 -2
- package/bundle/obf/src/templates/meteor/publish/publish.js.ts +3 -0
- package/bundle/obf/src/templates/react/kit/auth/provider/authentication-provider.js.jsx +281 -0
- package/bundle/obf/src/templates/react/kit/auth/provider/authentication-provider.js.tsx +318 -0
- package/bundle/obf/src/templates/react/kit/auth/service/meteor-auth-service.js.jsx +136 -0
- package/bundle/obf/src/templates/react/kit/auth/service/meteor-auth-service.js.tsx +136 -0
- package/bundle/obf/src/templates/react/kit/esri/map/basic-map.js.jsx +4 -2
- package/bundle/obf/src/templates/react/kit/esri/map/basic-map.js.tsx +5 -3
- package/bundle/obf/src/templates/react/kit/mui/auth/forgot-password/basic-forgot-password-page.js.jsx +32 -0
- package/bundle/obf/src/templates/react/kit/mui/auth/forgot-password/basic-forgot-password-page.js.tsx +31 -0
- package/bundle/obf/src/templates/react/kit/mui/auth/login/basic-login-page.js.jsx +51 -0
- package/bundle/obf/src/templates/react/kit/mui/auth/login/basic-login-page.js.tsx +52 -0
- package/bundle/obf/src/templates/react/kit/mui/auth/logout/basic-logout-page.js.jsx +24 -0
- package/bundle/obf/src/templates/react/kit/mui/auth/logout/basic-logout-page.js.tsx +24 -0
- package/bundle/obf/src/templates/react/kit/mui/auth/password-reset/basic-password-reset-page.js.jsx +34 -0
- package/bundle/obf/src/templates/react/kit/mui/auth/password-reset/basic-password-reset-page.js.tsx +34 -0
- package/bundle/obf/src/templates/react/kit/mui/auth/register/basic-register-page.js.jsx +32 -0
- package/bundle/obf/src/templates/react/kit/mui/auth/register/basic-register-page.js.tsx +32 -0
- package/bundle/obf/src/templates/react/kit/mui/frame/app-bars/basic-app-bar.js.jsx +5 -5
- package/bundle/obf/src/templates/react/kit/mui/frame/app-bars/basic-app-bar.js.tsx +4 -3
- package/bundle/obf/src/templates/react/kit/mui/frame/drawers/basic-drawer.js.jsx +7 -4
- package/bundle/obf/src/templates/react/kit/mui/frame/drawers/basic-drawer.js.tsx +5 -4
- package/bundle/obf/src/templates/react/kit/mui/frame/footers/basic-sticky-footer.js.jsx +41 -0
- package/bundle/obf/src/templates/react/kit/mui/frame/footers/basic-sticky-footer.js.tsx +41 -0
- package/bundle/obf/src/templates/service/eslint/eslintrc.json +22 -1
- 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
- package/bundle/obf/src/templates/meteor/publish/publish.js.jsx +0 -3
- package/bundle/obf/src/templates/meteor/publish/publish.js.tsx +0 -3
- package/bundle/obf/src/templates/meteor/publish/publish.ts +0 -3
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React, { useContext, useEffect } from 'react';
|
|
2
|
+
import { Container, Paper, Typography, TextField, Button, Grid, Link } from '@mui/material';
|
|
3
|
+
import { browserHistory } from 'react-router';
|
|
4
|
+
|
|
5
|
+
export const BasicLoginPage = () => {
|
|
6
|
+
const { currentUser, login } = useContext(AuthContext);
|
|
7
|
+
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
if (currentUser) {
|
|
10
|
+
browserHistory.push('/logout');
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
const handleLogin = async (event) => {
|
|
15
|
+
event.preventDefault();
|
|
16
|
+
const { email, password } = event.target;
|
|
17
|
+
const user = await login({ username: email.value, password: password.value });
|
|
18
|
+
|
|
19
|
+
if (user) {
|
|
20
|
+
browserHistory.push('/');
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<Container component="main" maxWidth="xs">
|
|
26
|
+
<Paper elevation={3} style={{ marginTop: '8vh', padding: '20px' }}>
|
|
27
|
+
<Typography component="h1" variant="h5">Sign in</Typography>
|
|
28
|
+
<form onSubmit={handleLogin}>
|
|
29
|
+
{/* Form Fields */}
|
|
30
|
+
<TextField id="email" type="email" label="Email Address*" fullWidth autoFocus margin="normal" />
|
|
31
|
+
<TextField id="password" label="Password*" type="password" fullWidth margin="normal" />
|
|
32
|
+
<Button type="submit" fullWidth variant="contained" color="primary" style={{ margin: '20px 0' }}>
|
|
33
|
+
Sign In
|
|
34
|
+
</Button>
|
|
35
|
+
<Grid container>
|
|
36
|
+
<Grid item xs>
|
|
37
|
+
<Link href="#" onClick={() => browserHistory.push('/forgot-password')} variant="body2">
|
|
38
|
+
Forgot password?
|
|
39
|
+
</Link>
|
|
40
|
+
</Grid>
|
|
41
|
+
<Grid item>
|
|
42
|
+
<Link href="#" onClick={() => browserHistory.push('/register')} variant="body2">
|
|
43
|
+
Don't have an account? Sign Up
|
|
44
|
+
</Link>
|
|
45
|
+
</Grid>
|
|
46
|
+
</Grid>
|
|
47
|
+
</form>
|
|
48
|
+
</Paper>
|
|
49
|
+
</Container>
|
|
50
|
+
);
|
|
51
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React, { useContext, useEffect } from 'react';
|
|
2
|
+
import { Container, Paper, Typography, TextField, Button, Grid, Link } from '@mui/material';
|
|
3
|
+
import { browserHistory } from 'react-router';
|
|
4
|
+
|
|
5
|
+
export const BasicLoginPage = () => {
|
|
6
|
+
const { currentUser, login } = useContext(AuthContext);
|
|
7
|
+
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
if (currentUser) {
|
|
10
|
+
browserHistory.push('/logout');
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
const handleLogin = async (event: React.FormEvent<HTMLFormElement>) => {
|
|
16
|
+
event.preventDefault();
|
|
17
|
+
const { email, password } = event.target;
|
|
18
|
+
const user = await login({ username: email.value, password: password.value });
|
|
19
|
+
|
|
20
|
+
if (user) {
|
|
21
|
+
browserHistory.push('/');
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<Container component="main" maxWidth="xs">
|
|
27
|
+
<Paper elevation={3} style={{ marginTop: '8vh', padding: '20px' }}>
|
|
28
|
+
<Typography component="h1" variant="h5">Sign in</Typography>
|
|
29
|
+
<form onSubmit={handleLogin}>
|
|
30
|
+
{/* Form Fields */}
|
|
31
|
+
<TextField id="email" type="email" label="Email Address*" fullWidth autoFocus margin="normal" />
|
|
32
|
+
<TextField id="password" label="Password*" type="password" fullWidth margin="normal" />
|
|
33
|
+
<Button type="submit" fullWidth variant="contained" color="primary" style={{ margin: '20px 0' }}>
|
|
34
|
+
Sign In
|
|
35
|
+
</Button>
|
|
36
|
+
<Grid container>
|
|
37
|
+
<Grid item xs>
|
|
38
|
+
<Link href="#" onClick={() => browserHistory.push('/forgot-password')} variant="body2">
|
|
39
|
+
Forgot password?
|
|
40
|
+
</Link>
|
|
41
|
+
</Grid>
|
|
42
|
+
<Grid item>
|
|
43
|
+
<Link href="#" onClick={() => browserHistory.push('/register')} variant="body2">
|
|
44
|
+
Don't have an account? Sign Up
|
|
45
|
+
</Link>
|
|
46
|
+
</Grid>
|
|
47
|
+
</Grid>
|
|
48
|
+
</form>
|
|
49
|
+
</Paper>
|
|
50
|
+
</Container>
|
|
51
|
+
);
|
|
52
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React, { useContext } from 'react';
|
|
2
|
+
import { Container, Paper, Button, Typography } from '@mui/material';
|
|
3
|
+
import { browserHistory } from 'react-router';
|
|
4
|
+
|
|
5
|
+
export const BasicLogoutPage = () => {
|
|
6
|
+
const { logout } = useContext(AuthContext);
|
|
7
|
+
|
|
8
|
+
const handleLogout = async (event) => {
|
|
9
|
+
event.preventDefault();
|
|
10
|
+
await logout();
|
|
11
|
+
browserHistory.push('/');
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<Container component="main" maxWidth="xs">
|
|
16
|
+
<Paper elevation={3} style={{ marginTop: '8vh', padding: '20px', textAlign: 'center' }}>
|
|
17
|
+
<Typography variant="h5">You are logged in</Typography>
|
|
18
|
+
<Button onClick={handleLogout} variant="contained" color="primary" style={{ marginTop: '20px' }}>
|
|
19
|
+
Logout
|
|
20
|
+
</Button>
|
|
21
|
+
</Paper>
|
|
22
|
+
</Container>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React, { useContext } from 'react';
|
|
2
|
+
import { Container, Paper, Button, Typography } from '@mui/material';
|
|
3
|
+
import { browserHistory } from 'react-router';
|
|
4
|
+
|
|
5
|
+
export const BasicLogoutPage = () => {
|
|
6
|
+
const { logout } = useContext(AuthContext);
|
|
7
|
+
|
|
8
|
+
const handleLogout = async (event: React.FormEvent<HTMLFormElement>) => {
|
|
9
|
+
event.preventDefault();
|
|
10
|
+
await logout();
|
|
11
|
+
browserHistory.push('/');
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<Container component="main" maxWidth="xs">
|
|
16
|
+
<Paper elevation={3} style={{ marginTop: '8vh', padding: '20px', textAlign: 'center' }}>
|
|
17
|
+
<Typography variant="h5">You are logged in</Typography>
|
|
18
|
+
<Button onClick={handleLogout} variant="contained" color="primary" style={{ marginTop: '20px' }}>
|
|
19
|
+
Logout
|
|
20
|
+
</Button>
|
|
21
|
+
</Paper>
|
|
22
|
+
</Container>
|
|
23
|
+
);
|
|
24
|
+
};
|
package/bundle/obf/src/templates/react/kit/mui/auth/password-reset/basic-password-reset-page.js.jsx
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React, { useContext } from 'react';
|
|
2
|
+
import { Container, Paper, Typography, TextField, Button } from '@mui/material';
|
|
3
|
+
import { browserHistory } from 'react-router';
|
|
4
|
+
|
|
5
|
+
export const BasicPasswordResetPage = (props) => {
|
|
6
|
+
const { params = {} } = props;
|
|
7
|
+
const { token } = params;
|
|
8
|
+
|
|
9
|
+
const { resetPassword } = useContext(AuthContext);
|
|
10
|
+
const handleSubmit = async (event) => {
|
|
11
|
+
event.preventDefault();
|
|
12
|
+
const { password } = event.target;
|
|
13
|
+
await resetPassword(token, password.value);
|
|
14
|
+
browserHistory.push('/');
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<Container component="main" maxWidth="xs">
|
|
19
|
+
<Paper elevation={3} style={{ marginTop: '8vh', padding: '20px' }}>
|
|
20
|
+
<Typography component="h1" variant="h5">Password Reset</Typography>
|
|
21
|
+
<form onSubmit={handleSubmit}>
|
|
22
|
+
{/* Form Field */}
|
|
23
|
+
<TextField id="password" label="Password*" type="password" fullWidth margin="normal" />
|
|
24
|
+
<Button type="submit" fullWidth variant="contained" color="primary" style={{ margin: '20px 0' }}>
|
|
25
|
+
Reset Password
|
|
26
|
+
</Button>
|
|
27
|
+
<Button onClick={() => browserHistory.push('/login')} fullWidth>
|
|
28
|
+
Back to Login
|
|
29
|
+
</Button>
|
|
30
|
+
</form>
|
|
31
|
+
</Paper>
|
|
32
|
+
</Container>
|
|
33
|
+
);
|
|
34
|
+
};
|
package/bundle/obf/src/templates/react/kit/mui/auth/password-reset/basic-password-reset-page.js.tsx
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React, { useContext } from 'react';
|
|
2
|
+
import { Container, Paper, Typography, TextField, Button } from '@mui/material';
|
|
3
|
+
import { browserHistory } from 'react-router';
|
|
4
|
+
|
|
5
|
+
export const BasicPasswordResetPage = (props) => {
|
|
6
|
+
const { params = {} } = props;
|
|
7
|
+
const { token } = params;
|
|
8
|
+
|
|
9
|
+
const { resetPassword } = useContext(AuthContext);
|
|
10
|
+
const handleSubmit = async (event) => {
|
|
11
|
+
event.preventDefault();
|
|
12
|
+
const { password } = event.target;
|
|
13
|
+
await resetPassword(token, password.value);
|
|
14
|
+
browserHistory.push('/');
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<Container component="main" maxWidth="xs">
|
|
19
|
+
<Paper elevation={3} style={{ marginTop: '8vh', padding: '20px' }}>
|
|
20
|
+
<Typography component="h1" variant="h5">Password Reset</Typography>
|
|
21
|
+
<form onSubmit={handleSubmit}>
|
|
22
|
+
{/* Form Field */}
|
|
23
|
+
<TextField id="password" label="Password*" type="password" fullWidth margin="normal" />
|
|
24
|
+
<Button type="submit" fullWidth variant="contained" color="primary" style={{ margin: '20px 0' }}>
|
|
25
|
+
Reset Password
|
|
26
|
+
</Button>
|
|
27
|
+
<Button onClick={() => browserHistory.push('/login')} fullWidth>
|
|
28
|
+
Back to Login
|
|
29
|
+
</Button>
|
|
30
|
+
</form>
|
|
31
|
+
</Paper>
|
|
32
|
+
</Container>
|
|
33
|
+
);
|
|
34
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React, { useContext } from 'react';
|
|
2
|
+
import { Container, Paper, Typography, TextField, Button, Link } from '@mui/material';
|
|
3
|
+
import { browserHistory } from 'react-router';
|
|
4
|
+
|
|
5
|
+
export const BasicRegisterPage = () => {
|
|
6
|
+
const { register } = useContext(AuthContext);
|
|
7
|
+
const handleSubmit = async (event) => {
|
|
8
|
+
event.preventDefault();
|
|
9
|
+
const { email, password } = event.target;
|
|
10
|
+
await register(email.value, password.value);
|
|
11
|
+
browserHistory.push('/');
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<Container component="main" maxWidth="xs">
|
|
16
|
+
<Paper elevation={3} style={{ marginTop: '8vh', padding: '20px' }}>
|
|
17
|
+
<Typography component="h1" variant="h5">Register</Typography>
|
|
18
|
+
<form onSubmit={handleSubmit}>
|
|
19
|
+
{/* Form Fields */}
|
|
20
|
+
<TextField id="email" type="email" label="Email*" fullWidth autoFocus margin="normal" />
|
|
21
|
+
<TextField id="password" label="Password*" type="password" fullWidth margin="normal" />
|
|
22
|
+
<Button type="submit" fullWidth variant="contained" color="primary" style={{ margin: '20px 0' }}>
|
|
23
|
+
Register
|
|
24
|
+
</Button>
|
|
25
|
+
<Link href="#" onClick={() => browserHistory.push('/login')} variant="body2">
|
|
26
|
+
Already have an account? Log in
|
|
27
|
+
</Link>
|
|
28
|
+
</form>
|
|
29
|
+
</Paper>
|
|
30
|
+
</Container>
|
|
31
|
+
);
|
|
32
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React, { useContext } from 'react';
|
|
2
|
+
import { Container, Paper, Typography, TextField, Button, Link } from '@mui/material';
|
|
3
|
+
import { browserHistory } from 'react-router';
|
|
4
|
+
|
|
5
|
+
export const BasicRegisterPage = () => {
|
|
6
|
+
const { register } = useContext(AuthContext);
|
|
7
|
+
const handleSubmit = async (event: React.FormEvent<HTMLFormElement>) => {
|
|
8
|
+
event.preventDefault();
|
|
9
|
+
const { email, password } = event.target;
|
|
10
|
+
await register(email.value, password.value);
|
|
11
|
+
browserHistory.push('/');
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<Container component="main" maxWidth="xs">
|
|
16
|
+
<Paper elevation={3} style={{ marginTop: '8vh', padding: '20px' }}>
|
|
17
|
+
<Typography component="h1" variant="h5">Register</Typography>
|
|
18
|
+
<form onSubmit={handleSubmit}>
|
|
19
|
+
{/* Form Fields */}
|
|
20
|
+
<TextField id="email" type="email" label="Email*" fullWidth autoFocus margin="normal" />
|
|
21
|
+
<TextField id="password" label="Password*" type="password" fullWidth margin="normal" />
|
|
22
|
+
<Button type="submit" fullWidth variant="contained" color="primary" style={{ margin: '20px 0' }}>
|
|
23
|
+
Register
|
|
24
|
+
</Button>
|
|
25
|
+
<Link href="#" onClick={() => browserHistory.push('/login')} variant="body2">
|
|
26
|
+
Already have an account? Log in
|
|
27
|
+
</Link>
|
|
28
|
+
</form>
|
|
29
|
+
</Paper>
|
|
30
|
+
</Container>
|
|
31
|
+
);
|
|
32
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import AppBar from '@mui/material/AppBar';
|
|
3
3
|
import Box from '@mui/material/Box';
|
|
4
4
|
import Toolbar from '@mui/material/Toolbar';
|
|
@@ -6,11 +6,11 @@ import Typography from '@mui/material/Typography';
|
|
|
6
6
|
import Button from '@mui/material/Button';
|
|
7
7
|
import IconButton from '@mui/material/IconButton';
|
|
8
8
|
import MenuIcon from '@mui/icons-material/Menu';
|
|
9
|
+
import { browserHistory } from 'react-router';
|
|
9
10
|
|
|
10
11
|
import { Session } from 'meteor/session';
|
|
11
12
|
|
|
12
13
|
function BasicAppBar() {
|
|
13
|
-
|
|
14
14
|
const handleDrawerToggle = () => {
|
|
15
15
|
Session.set('drawerOpen', !Session.get('drawerOpen'));
|
|
16
16
|
};
|
|
@@ -29,14 +29,14 @@ function BasicAppBar() {
|
|
|
29
29
|
>
|
|
30
30
|
<MenuIcon />
|
|
31
31
|
</IconButton>
|
|
32
|
-
<Typography variant="h6" component="div" sx={{ flexGrow: 1 }}>
|
|
32
|
+
<Typography onClick={() => browserHistory.push('/')} variant="h6" component="div" sx={{ flexGrow: 1, cursor: 'pointer' }}>
|
|
33
33
|
<%= name %>
|
|
34
34
|
</Typography>
|
|
35
|
-
<Button color="inherit">Login</Button>
|
|
35
|
+
<Button onClick={() => browserHistory.push('/login')} color="inherit">Login</Button>
|
|
36
36
|
</Toolbar>
|
|
37
37
|
</AppBar>
|
|
38
38
|
</Box>
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
export { BasicAppBar };
|
|
42
|
+
export { BasicAppBar };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import AppBar from '@mui/material/AppBar';
|
|
3
3
|
import Box from '@mui/material/Box';
|
|
4
4
|
import Toolbar from '@mui/material/Toolbar';
|
|
@@ -6,6 +6,7 @@ import Typography from '@mui/material/Typography';
|
|
|
6
6
|
import Button from '@mui/material/Button';
|
|
7
7
|
import IconButton from '@mui/material/IconButton';
|
|
8
8
|
import MenuIcon from '@mui/icons-material/Menu';
|
|
9
|
+
import { browserHistory } from 'react-router';
|
|
9
10
|
|
|
10
11
|
import { Session } from 'meteor/session';
|
|
11
12
|
function BasicAppBar() {
|
|
@@ -27,10 +28,10 @@ import { Session } from 'meteor/session';
|
|
|
27
28
|
>
|
|
28
29
|
<MenuIcon />
|
|
29
30
|
</IconButton>
|
|
30
|
-
<Typography variant="h6" component="div" sx={{ flexGrow: 1 }}>
|
|
31
|
+
<Typography onClick={() => browserHistory.push('/')} variant="h6" component="div" sx={{ flexGrow: 1, cursor: 'pointer' }}>
|
|
31
32
|
<%= name %>
|
|
32
33
|
</Typography>
|
|
33
|
-
<Button color="inherit">Login</Button>
|
|
34
|
+
<Button onClick={() => browserHistory.push('/login')} color="inherit">Login</Button>
|
|
34
35
|
</Toolbar>
|
|
35
36
|
</AppBar>
|
|
36
37
|
</Box>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Meteor } from 'meteor/meteor';
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
import Box from '@mui/material/Box';
|
|
@@ -15,16 +16,16 @@ import Toolbar from '@mui/material/Toolbar';
|
|
|
15
16
|
const drawerWidth = 240;
|
|
16
17
|
|
|
17
18
|
import { Session } from 'meteor/session';
|
|
18
|
-
import { useTracker } from 'meteor/react-
|
|
19
|
+
import { useTracker } from 'meteor/maka:react-tracker';
|
|
19
20
|
function BasicDrawer(props) {
|
|
20
21
|
|
|
21
22
|
const { drawerOpen } = useTracker(() => {
|
|
22
|
-
let
|
|
23
|
+
let drawerState = false;
|
|
23
24
|
if (Meteor.isClient) {
|
|
24
25
|
Meteor.subscribe('drawerState', { drawerOpen: Session.get('drawerOpen') });
|
|
25
|
-
|
|
26
|
+
drawerState = Session.get('drawerOpen');
|
|
26
27
|
}
|
|
27
|
-
return { drawerOpen }
|
|
28
|
+
return { drawerOpen: drawerState };
|
|
28
29
|
});
|
|
29
30
|
|
|
30
31
|
const { window } = props;
|
|
@@ -107,11 +108,13 @@ function BasicDrawer(props) {
|
|
|
107
108
|
);
|
|
108
109
|
}
|
|
109
110
|
|
|
111
|
+
|
|
110
112
|
BasicDrawer.propTypes = {
|
|
111
113
|
/**
|
|
112
114
|
* Injected by the documentation to work in an iframe.
|
|
113
115
|
* You won't need it on your project.
|
|
114
116
|
*/
|
|
117
|
+
// eslint-disable-next-line react/require-default-props
|
|
115
118
|
window: PropTypes.func,
|
|
116
119
|
};
|
|
117
120
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Meteor } from 'meteor/meteor';
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import Box from '@mui/material/Box';
|
|
3
4
|
import Divider from '@mui/material/Divider';
|
|
@@ -15,7 +16,7 @@ const drawerWidth = 240;
|
|
|
15
16
|
|
|
16
17
|
import { Meteor } from 'meteor/meteor';
|
|
17
18
|
import { Session } from 'meteor/session';
|
|
18
|
-
import { useTracker } from 'meteor/react-
|
|
19
|
+
import { useTracker } from 'meteor/maka:react-tracker';
|
|
19
20
|
interface Props {
|
|
20
21
|
/**
|
|
21
22
|
* Injected by the documentation to work in an iframe.
|
|
@@ -27,12 +28,12 @@ interface Props {
|
|
|
27
28
|
function BasicDrawer(props: Props) {
|
|
28
29
|
const { window } = props;
|
|
29
30
|
const { drawerOpen } = useTracker(() => {
|
|
30
|
-
let
|
|
31
|
+
let drawerState = false;
|
|
31
32
|
if (Meteor.isClient) {
|
|
32
33
|
Meteor.subscribe('drawerState', { drawerOpen: Session.get('drawerOpen') });
|
|
33
|
-
|
|
34
|
+
drawerState = Session.get('drawerOpen');
|
|
34
35
|
}
|
|
35
|
-
return { drawerOpen }
|
|
36
|
+
return { drawerOpen: drawerState };
|
|
36
37
|
});
|
|
37
38
|
|
|
38
39
|
const handleDrawerToggle = () => {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Box from '@mui/material/Box';
|
|
3
|
+
import Typography from '@mui/material/Typography';
|
|
4
|
+
import Container from '@mui/material/Container';
|
|
5
|
+
import Link from '@mui/material/Link';
|
|
6
|
+
function Copyright() {
|
|
7
|
+
return (
|
|
8
|
+
<Typography variant="body2" color="text.secondary">
|
|
9
|
+
{'Copyright © '}
|
|
10
|
+
<Link color="inherit" href="https://www.maka-cli.com">
|
|
11
|
+
<%= name %>
|
|
12
|
+
</Link>
|
|
13
|
+
{` ${new Date().getFullYear()}`}
|
|
14
|
+
</Typography>
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const BasicStickyFooter = () => {
|
|
19
|
+
return (
|
|
20
|
+
<Box
|
|
21
|
+
id="footer"
|
|
22
|
+
component="footer"
|
|
23
|
+
sx={{
|
|
24
|
+
py: 3,
|
|
25
|
+
px: 2,
|
|
26
|
+
mt: 'auto',
|
|
27
|
+
backgroundColor: (theme) =>
|
|
28
|
+
theme.palette.mode === 'light'
|
|
29
|
+
? theme.palette.grey[200]
|
|
30
|
+
: theme.palette.grey[800],
|
|
31
|
+
}}
|
|
32
|
+
>
|
|
33
|
+
<Container>
|
|
34
|
+
<Typography variant="body1">
|
|
35
|
+
Created by maka-cli
|
|
36
|
+
</Typography>
|
|
37
|
+
<Copyright />
|
|
38
|
+
</Container>
|
|
39
|
+
</Box>
|
|
40
|
+
);
|
|
41
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Box from '@mui/material/Box';
|
|
3
|
+
import Typography from '@mui/material/Typography';
|
|
4
|
+
import Container from '@mui/material/Container';
|
|
5
|
+
import Link from '@mui/material/Link';
|
|
6
|
+
function Copyright() {
|
|
7
|
+
return (
|
|
8
|
+
<Typography variant="body2" color="text.secondary">
|
|
9
|
+
{'Copyright © '}
|
|
10
|
+
<Link color="inherit" href="https://www.maka-cli.com">
|
|
11
|
+
<%= name %>
|
|
12
|
+
</Link>
|
|
13
|
+
{` ${new Date().getFullYear()}`}
|
|
14
|
+
</Typography>
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const BasicStickyFooter = () => {
|
|
19
|
+
return (
|
|
20
|
+
<Box
|
|
21
|
+
id="footer"
|
|
22
|
+
component="footer"
|
|
23
|
+
sx={{
|
|
24
|
+
py: 3,
|
|
25
|
+
px: 2,
|
|
26
|
+
mt: 'auto',
|
|
27
|
+
backgroundColor: (theme) =>
|
|
28
|
+
theme.palette.mode === 'light'
|
|
29
|
+
? theme.palette.grey[200]
|
|
30
|
+
: theme.palette.grey[800],
|
|
31
|
+
}}
|
|
32
|
+
>
|
|
33
|
+
<Container>
|
|
34
|
+
<Typography variant="body1">
|
|
35
|
+
Created by maka-cli
|
|
36
|
+
</Typography>
|
|
37
|
+
<Copyright />
|
|
38
|
+
</Container>
|
|
39
|
+
</Box>
|
|
40
|
+
);
|
|
41
|
+
};
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
"node": true
|
|
6
6
|
},
|
|
7
7
|
"extends": [
|
|
8
|
+
"airbnb",
|
|
8
9
|
"eslint:recommended",
|
|
9
10
|
"plugin:react/recommended"
|
|
10
11
|
],
|
|
@@ -19,7 +20,21 @@
|
|
|
19
20
|
"css"
|
|
20
21
|
],
|
|
21
22
|
"rules": {
|
|
22
|
-
"react/prop-types": "off"
|
|
23
|
+
"react/prop-types": "off",
|
|
24
|
+
"import/no-absolute-path": "off",
|
|
25
|
+
"func-style": "off",
|
|
26
|
+
"prefer-arrow-callback": "off",
|
|
27
|
+
"import/prefer-default-export": "off",
|
|
28
|
+
"import/extensions": "off",
|
|
29
|
+
"react/static-property-placement": "off",
|
|
30
|
+
"import/no-unresolved": "off",
|
|
31
|
+
"max-len": "off",
|
|
32
|
+
"react/no-unescaped-entities": "off",
|
|
33
|
+
"jsx-a11y/anchor-is-valid": "off",
|
|
34
|
+
"func-names": "off",
|
|
35
|
+
"react/destructuring-assignment": "off",
|
|
36
|
+
"react/jsx-no-useless-fragment": "off"
|
|
37
|
+
|
|
23
38
|
},
|
|
24
39
|
"ignorePatterns": ["**/*.css", "**/*.scss", "**/*.app-tests.*", "**/*.tests.*"],
|
|
25
40
|
"settings": {
|
|
@@ -28,6 +43,12 @@
|
|
|
28
43
|
"pragma": "React",
|
|
29
44
|
"fragment": "Fragment",
|
|
30
45
|
"version": "detect"
|
|
46
|
+
},
|
|
47
|
+
"import/resolver": {
|
|
48
|
+
"node": {
|
|
49
|
+
"paths": ["app"],
|
|
50
|
+
"extensions": [".js", ".jsx", ".ts", ".tsx"]
|
|
51
|
+
}
|
|
31
52
|
}
|
|
32
53
|
}
|
|
33
54
|
}
|
package/bundle/obf/src/tool.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a134L=a134d;(function(a,b){const I=a134d,c=a();while(!![]){try{const d=parseInt(I(0x1b5))/0x1+-parseInt(I(0x1dd))/0x2+parseInt(I(0x1c5))/0x3+-parseInt(I(0x1ed))/0x4+parseInt(I(0x1e5))/0x5+parseInt(I(0x1c7))/0x6+-parseInt(I(0x1b9))/0x7*(parseInt(I(0x1e2))/0x8);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a134c,0xaf185));const a134b=(function(){let a=!![];return function(b,c){const d=a?function(){const J=a134d;if(c){const e=c[J(0x1ce)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a134a=a134b(this,function(){const K=a134d;return a134a[K(0x1b8)]()['search'](K(0x1b0))[K(0x1b8)]()[K(0x1ff)](a134a)['search'](K(0x1b0));});a134a();import a134e from'path';function a134d(a,b){const c=a134c();return a134d=function(d,e){d=d-0x1ad;let f=c[d];return f;},a134d(a,b);}import a134f from'os';function a134c(){const a2=['find','options','proGenerators','user','findProjectDirectory','includes','.meteor','examples','1613364iRRWob','push','2927922lECRWM','aliases','ask','error','description','validateMeteorInstall','string','apply','Please\x20provide\x20a\x20resource\x20name:','Please\x20provide\x20a\x20value\x20for\x20','License\x20error,\x20you\x20may\x20need\x20to\x20re-login\x20or\x20delete\x20your\x20~/.meteor/.maka/global-config.json\x20file\x20to\x20regenerate\x20a\x20free\x20license.','isCommand','cwd','remapShortToLong','Invalid\x20argument:\x20','getShortName','charAt','\x20installed\x20to\x20use\x20this\x20command.','getMakaProjectConfig','parent','root','concat','552162rBQAHQ','engines','Please\x20choose\x20a\x20value\x20for\x20','Invalid\x20option:\x20','singleLicense','648BjojBY','formatToNamedParam','domainLicense','1958915MPoSsg','homedir','\x20version\x20','To\x20use\x20this\x20generator,\x20\x22','validateMakaSubscription','validateMakaProject','Please\x20choose\x20a\x20valid\x20value\x20for\x20','guest','699068eJiIvZ','roles','Invalid\x20value\x20for\x20','getPro','config','resourceName','docker','existsSync','length','validateUserIsLoggedIn','No\x20description\x20provided.','You\x20must\x20have\x20','fsi','Please\x20provide\x20a\x20valid\x20argument\x20for\x20','NIE','exit','Local','dir','constructor','join','every','keys','name','AppData','(((.+)+)+)+$','isPro','proCommands','match','validateEngines','66946htsjaz','shortDesc','list','toString','27349KHaPrj','platform','disableAuthCheck','env'];a134c=function(){return a2;};return a134c();}import a134g from'fs';const homeDir=a134f[a134L(0x1e6)]();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';import{UsageError}from'./error.js';export class Tool{[a134L(0x1f3)];[a134L(0x1f9)];[a134L(0x1be)];[a134L(0x1ae)];['parent'];['_handler'];constructor(){const M=a134L;this[M(0x1f3)]=new Docker(),this[M(0x1f9)]=new FSI();}[a134L(0x1d6)](a){const N=a134L;return a[N(0x1d7)](0x0);}[a134L(0x1d4)](a,b){const O=a134L,c=this[O(0x1e3)](b),d={...a};for(const e of c){const f=this[O(0x1d6)](e[O(0x1ae)]);a[f]&&(d[e[O(0x1ae)]]=a[f],delete d[f]);}return d;}[a134L(0x1e3)](a){const P=a134L;if(a[P(0x201)](b=>typeof b===P(0x1cd)))return a['map'](b=>({'name':b}));return a;}[a134L(0x1b3)](a){const Q=a134L,b=[this[Q(0x1ae)]][Q(0x1dc)](this['options'][Q(0x1c8)]||[]);return this[Q(0x1da)]&&b[Q(0x1c6)](this['parent']),b[Q(0x1c2)](a);}[a134L(0x1ea)](){const R=a134L,a=this[R(0x1f9)][R(0x1c1)]();return a!==![]?!![]:![];}async[a134L(0x1f6)](){const S=a134L,a=await this[S(0x1f9)][S(0x1f0)]();return a?.[S(0x1c0)]&&a?.[S(0x1c0)]!==S(0x1ec)?!![]:![];}[a134L(0x1cc)](){const T=a134L;let a=a134e[T(0x200)](homeDir,'.meteor');const b=process[T(0x1ba)]==='win32';if(b){a=a134e['join'](homeDir,T(0x1af),T(0x1fd),T(0x1c3));if(!a134g[T(0x1f4)](a))return![];}else{if(!a134g[T(0x1f4)](a))return![];}return!![];}[a134L(0x1b4)](a){const U=a134L,b=this[U(0x1f9)][U(0x1d9)](),c=b[U(0x1de)],d=Object[U(0x1ad)](a);if(d[U(0x1f5)]>0x0)for(const e of d){const f=c[e];if(f!==a[e]){Log[U(0x1ca)](U(0x1f8)+e+U(0x1e7)+a[e]+U(0x1d8));throw UsageError;}}}async['validateParams'](a,b,c){const V=a134L,{requiredOpts:d,validArgs:e,validOpts:f,noNeedResource:g}=c,h=Object[V(0x1ad)](b);if(h[V(0x1c2)](V(0x1f2))&&b[V(0x1f2)]===undefined&&!g){const m=await Actions['ask'](V(0x1cf));b['resourceName']=m;}let i=[],j=b;if(d){i=this['formatToNamedParam'](d),j=this[V(0x1d4)](b,i);if(i&&i?.[V(0x1f5)]>0x0)for(const n of i){const {name:o,values:p,regex:q}=n;if(!Object[V(0x1ad)](j)[V(0x1c2)](o)){if(o===V(0x1bc)){const r=this[V(0x1f9)]['getAppProjectConfigs'](),s=await Actions[V(0x1be)]({'type':V(0x1b7),'name':'env','message':'Please\x20choose\x20an\x20environment','choices':r});b[V(0x1bc)]=s['env'];}else{const t=p;if(t){const u=await Actions[V(0x1be)]({'type':V(0x1b7),'name':o,'message':V(0x1df)+o,'choices':p});b[o]=u[o];}else{if(q){const v=await Actions[V(0x1c9)](V(0x1d0)+o);if(v['match'](q))b[o]=v;else{Log[V(0x1ca)](V(0x1ef)+o+':\x20'+v);throw new UsageError();}}else{const w=await Actions[V(0x1c9)]('Please\x20provide\x20a\x20value\x20for\x20'+o);b[o]=w;}}}}else{const x=j[o];if(p&&!p[V(0x1c2)](x)){Log['error'](V(0x1ef)+o+':\x20'+x);throw new UsageError();}}}}let k=this[V(0x1e3)](f),l=b;if(k&&Object[V(0x1ad)](k)?.['length']>0x0){k=k['concat'](i||[]),k[V(0x1c6)]({'name':'resourceName','hidden':!![]}),k[V(0x1c6)]({'name':'help','boolFlag':!![]}),k[V(0x1c6)]({'name':V(0x1fe),'hidden':!![]}),k[V(0x1c6)]({'name':V(0x1d3),'hidden':!![]}),k[V(0x1c6)]({'name':V(0x1db),'hidden':!![]}),k[V(0x1c6)]({'name':V(0x1f1),'hidden':!![]}),l=this[V(0x1d4)](b,k);for(const y of k){const {name:z,values:A}=y,B=l[z];if(B!==undefined&&(!A||!A[V(0x1c2)](B))){const C=A;if(C){const D=await Actions['options']({'type':V(0x1b7),'name':z,'message':V(0x1eb)+z,'choices':A});l[z]=D[z];}}if(k[V(0x1f5)]>0x0)for(const E of Object[V(0x1ad)](l)){const F=k[V(0x1bd)](G=>G[V(0x1ae)]===E);if(!F){Log['error'](V(0x1e0)+E);throw new UsageError();}}}}if(e&&e?.[V(0x1f5)]>0x0)for(const G of e){if(!e[V(0x1c2)](G)){Log[V(0x1ca)](V(0x1d5)+G);const H=await Actions[V(0x1c9)](V(0x1fa)+G);a[a['indexOf'](G)]=H;}}return Object['assign'](j,l);}async[a134L(0x1e9)](a){const W=a134L;try{if(!a)return;const b=await this[W(0x1f9)][W(0x1f0)]();!b&&(Log[W(0x1ca)](W(0x1d1)),process[W(0x1fc)](0x1));const c=!b?.[W(0x1ee)][W(0x1c2)](W(0x1e1))&&!b?.[W(0x1ee)][W(0x1c2)](W(0x1e4));if(this[W(0x1d2)](a)){const d='To\x20use\x20this\x20command,\x20\x22'+a[W(0x1ae)]+'\x22,\x20please\x20upgrade\x20to\x20PRO\x20by\x20becoming\x20a\x20pateron\x20@\x20patreon.com/user?u=110174702,\x20then\x20issue:\x20\x27maka\x20login\x27';if(a['options'][W(0x1bb)])return;const f=b?.[W(0x1b2)][W(0x1c2)](a[W(0x1ae)])||b?.[W(0x1b2)]['includes'](a[W(0x1da)]||'')||this[W(0x1be)][W(0x1b1)];if(f&&c)throw d;}else{if(this['isGenerator'](a)){const g=b?.[W(0x1bf)]['includes'](a[W(0x1ae)])||b?.[W(0x1bf)][W(0x1c2)](a[W(0x1da)]||'');if(g&&c)throw W(0x1e8)+a[W(0x1ae)]+'\x22,\x20please\x20upgrade\x20to\x20PRO\x20by\x20becoming\x20a\x20pateron\x20@\x20patreon.com/user?u=110174702,\x20then\x20issue:\x20\x27maka\x20login\x27';}}}catch(h){Log[W(0x1ca)](h),process[W(0x1fc)](0x1);}}[a134L(0x1d2)](a){return'options'in a;}['isGenerator'](a){return!('options'in a);}[a134L(0x1cb)](){const X=a134L;return this[X(0x1be)]['description']||this[X(0x1be)][X(0x1b6)]||X(0x1f7);}[a134L(0x1b6)](){const Y=a134L;return this[Y(0x1be)]['shortDesc']||Y(0x1fb);}['usage'](){const Z=a134L;return this[Z(0x1be)]['usage']||'No\x20usage\x20provided.';}[a134L(0x1c4)](){const a0=a134L;return this[a0(0x1be)][a0(0x1c4)]||[];}['aliases'](){const a1=a134L;return this[a1(0x1be)][a1(0x1c8)]||'None';}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a135i=a135d;(function(a,b){const f=a135d,c=a();while(!![]){try{const d=parseInt(f(0x87))/0x1+parseInt(f(0x7e))/0x2+-parseInt(f(0x7a))/0x3*(parseInt(f(0x7f))/0x4)+parseInt(f(0x85))/0x5+parseInt(f(0x79))/0x6*(-parseInt(f(0x81))/0x7)+parseInt(f(0x82))/0x8+-parseInt(f(0x7d))/0x9;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a135c,0x6ee76));function a135c(){const l=['apply','toString','12XONBjC','33bHUzgc','constructor','search','5533533gASkZP','862632BBZzsE','239236uzCTVt','prompt','2480191JTQOgr','5848520zqbJag','input','(((.+)+)+)+$','2036120WMITJG','password','866019ttHFSS','answer','options','confirm','ask'];a135c=function(){return l;};return a135c();}const a135b=(function(){let a=!![];return function(b,c){const d=a?function(){const g=a135d;if(c){const e=c[g(0x77)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a135a=a135b(this,function(){const h=a135d;return a135a[h(0x78)]()[h(0x7c)](h(0x84))[h(0x78)]()[h(0x7b)](a135a)['search'](h(0x84));});function a135d(a,b){const c=a135c();return a135d=function(d,e){d=d-0x73;let f=c[d];return f;},a135d(a,b);}a135a();import a135e from'inquirer';export class Actions{static async[a135i(0x76)](a,b){const j=a135i,{answer:c}=await a135e[j(0x80)]({'type':b?j(0x86):j(0x83),'name':'answer','message':a});return c;}static async[a135i(0x75)](a,b=![]){const k=a135i,{answer:c}=await a135e[k(0x80)]({'type':k(0x75),'name':k(0x73),'message':a,'default':b});return c;}static async[a135i(0x74)](a){const b=await a135e['prompt'](a);return b;}}
|