Skip to content

The open-source AI receptionist for businesses. Answers every call, books the appointment and hands over to a person when needed. You own the code and the data.

1.1 KB
Raw Blame
// The server this build opens and what it was built with (scripts/build.mjs puts the values in at build time).
import { app } from 'electron'

const isPackaged = () => app.isPackaged
declare const __LINEDESK_SERVER__: string
declare const __LINEDESK_UPDATES__: boolean
declare const __LINEDESK_E2E__: boolean

/** A test build of CI (LINEDESK_DESKTOP_E2E=1 at build time): never shipped. */
export const E2E_BUILD = __LINEDESK_E2E__

/**
 * The server's origin: Linedesk Cloud unless the build was made for another (LINEDESK_APP_URL at build time, as for
 * the mobile app). LINEDESK_DESKTOP_SERVER at start overrides it only in development and test builds: a shipped app
 * never trusts another server (security review of LIN-903, L2).
 */
const override = (!isPackaged() || __LINEDESK_E2E__) && process.env.LINEDESK_DESKTOP_SERVER
export const SERVER = new URL(override || __LINEDESK_SERVER__).origin

/** Automatic updates are built in but off until Linedesk publishes desktop releases (LINEDESK_DESKTOP_UPDATES=1). */
export const UPDATES_ON = __LINEDESK_UPDATES__

export const APP_ID = 'ai.linedesk.desktop'