Back to home page

EIC code displayed by LXR

 
 

    


Warning, /firebird/packages/firebird-ng/api/src/lib/services/server-config.ts is written in an unsupported language. File is not indexed.

0001 /**
0002  * Firebird's server config shape and defaults.
0003  *
0004  * Loading, JSONC parsing and the SERVER config layer feed live in
0005  * `ServerConfigService` from `@dexvis/app-features`; `provideFirebird()`
0006  * installs `defaultFirebirdConfig` as its defaults. Read the typed config
0007  * through `ServerConfigService<ServerConfig>`.
0008  *
0009  * pyrobird rewrites `assets/config.jsonc` on the fly when it serves the app
0010  * (`servedByPyrobird`, `apiAvailable`, `apiBaseUrl`); a static deployment
0011  * serves the built file as is.
0012  */
0013 
0014 import type { ServerConfigBase } from '@dexvis/app-features';
0015 import type { DataCatalog } from '@dexvis/firebird-core';
0016 
0017 export interface ServerConfig extends ServerConfigBase {
0018   servedByPyrobird: boolean;
0019   apiAvailable: boolean;
0020   apiBaseUrl: string;
0021   logLevel: string;
0022   /** Server-provided config values: [{key, value}] entries. */
0023   configs: any[];
0024   /** Server-provided config values as a {key: value} map (pyrobird `userConfigs`). */
0025   userConfigs?: Record<string, unknown>;
0026   /** Datasets offered by the data selector (a `DataCatalog` object; pyrobird passes it through). */
0027   dataCatalog?: DataCatalog;
0028   /** Commands to run once the display is ready: command objects or 'type:arg' strings. */
0029   startupCommands?: Array<Record<string, unknown> | string>;
0030 }
0031 
0032 export const defaultFirebirdConfig: ServerConfig = {
0033   apiAvailable: false,
0034   apiBaseUrl: "",
0035   servedByPyrobird: false,
0036   logLevel: 'info',
0037   configs: []
0038 };