* fix: allow local cmd without exiting process * fix: improves cli experience * fix: allow running link with --develop * test: adds snapshot testing of error logs * chore: cleanup * feat(medusa-cli): new command (#320) * adds: new command * fix: creates command for easy project setup * chore: deps * chore: deps * fix: loggin * fix: logging * fix: adds cli as dependency in core * fix: consolidates CLI in medusa * fix: use project deps medusa bin * fix: use project deps medusa bin * fix: use cli path * fix: new command setup db + env vars * fix: new command with db seed * fix: cleanup
21 lines
433 B
JavaScript
21 lines
433 B
JavaScript
const ConfigStore = require("configstore")
|
|
|
|
let config
|
|
|
|
module.exports = {
|
|
getToken: function() {
|
|
if (!config) {
|
|
config = new ConfigStore(`medusa`, {}, { globalConfigPath: true })
|
|
}
|
|
|
|
return config.get("cloud.login_token")
|
|
},
|
|
setToken: function(token) {
|
|
if (!config) {
|
|
config = new ConfigStore(`medusa`, {}, { globalConfigPath: true })
|
|
}
|
|
|
|
return config.set("cloud.login_token", token)
|
|
},
|
|
}
|