2016-10-02 20:57:00 +00:00
|
|
|
import appJson from '../package.json';
|
2016-09-21 00:03:26 +00:00
|
|
|
|
2016-10-02 20:57:00 +00:00
|
|
|
export function getAppVersion () {
|
2016-09-21 00:03:26 +00:00
|
|
|
return appJson.version;
|
2016-10-02 20:57:00 +00:00
|
|
|
}
|
2016-09-21 00:03:26 +00:00
|
|
|
|
2016-10-02 20:57:00 +00:00
|
|
|
export function getAppLongName () {
|
2016-09-21 00:03:26 +00:00
|
|
|
return appJson.longName;
|
2016-10-02 20:57:00 +00:00
|
|
|
}
|
2016-09-21 00:03:26 +00:00
|
|
|
|
2016-10-02 20:57:00 +00:00
|
|
|
export function getAppName () {
|
2016-09-21 00:03:26 +00:00
|
|
|
return appJson.productName;
|
2016-10-02 20:57:00 +00:00
|
|
|
}
|
2016-09-21 00:03:26 +00:00
|
|
|
|
2016-10-21 17:20:36 +00:00
|
|
|
export function getAppPlatform () {
|
|
|
|
return process.platform;
|
|
|
|
}
|
|
|
|
|
|
|
|
export function getAppEnvironment () {
|
|
|
|
return process.env.INSOMNIA_ENV || 'unknown';
|
|
|
|
}
|
|
|
|
|
2016-10-02 20:57:00 +00:00
|
|
|
export function isMac () {
|
2016-10-21 17:20:36 +00:00
|
|
|
return getAppPlatform() === 'darwin';
|
2016-10-02 20:57:00 +00:00
|
|
|
}
|
2016-09-21 00:03:26 +00:00
|
|
|
|
2016-10-02 20:57:00 +00:00
|
|
|
export function isDevelopment () {
|
2016-10-21 17:20:36 +00:00
|
|
|
return getAppEnvironment() === 'development';
|
|
|
|
}
|
|
|
|
|
|
|
|
export function getClientString () {
|
|
|
|
return `${getAppEnvironment()}::${getAppPlatform()}::${getAppVersion()}`
|
2016-10-02 20:57:00 +00:00
|
|
|
}
|