Constants.ts 934 B

123456789101112131415161718192021222324
  1. // bootstrap constants
  2. // after startup, these constants will be merged into core module constants
  3. // since they are used in both locations (see app/Constants.js)
  4. import { releaseChannel } from './buildInfo';
  5. import appSettings from './appSettings';
  6. const pak = require("../package.json")
  7. import * as path from "path"
  8. const settings = appSettings.getSettings();
  9. function capitalizeFirstLetter(s) {
  10. return s.charAt(0).toUpperCase() + s.slice(1);
  11. }
  12. export const APP_NAME = 'Lightcord' + (releaseChannel === 'stable' ? '' : capitalizeFirstLetter(releaseChannel));
  13. const APP_ID_BASE = 'com.squirrel';
  14. export const APP_ID = `${APP_ID_BASE}.${APP_NAME}.${APP_NAME}`;
  15. export const API_ENDPOINT = settings.get('API_ENDPOINT') || 'https://discord.com/api';
  16. export const UPDATE_ENDPOINT = settings.get('UPDATE_ENDPOINT') || API_ENDPOINT;
  17. export const mainAppDirname = path.join(__dirname, "..")
  18. export const version:string = pak.version