-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathshow.js
More file actions
23 lines (19 loc) · 745 Bytes
/
show.js
File metadata and controls
23 lines (19 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { getHostEnvName } from '../clients/server-env';
import apisConfig from '../config/services';
import msg from '../user_messages';
import { getValue } from '../services/cache-env';
import getHomeDir from '../home-dir';
import prettyJson from 'prettyjson';
export default async function(args) {
const serverEnv = getHostEnvName();
if (args.all || serverEnv !== 'production') {
console.log(prettyJson.render({ [msg.use.show(serverEnv)]: apisConfig }));
}
const developer = await getValue('developer');
if (developer) {
console.log(msg.login.complete(developer));
}
console.log(
`Home directory: \`${getHomeDir()}\` (customizable through SHOUTEM_CLI_HOME env variable, may require restart of terminal).`,
);
}