-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathsettings.ts
More file actions
80 lines (74 loc) · 1.47 KB
/
settings.ts
File metadata and controls
80 lines (74 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import { config, version } from '../cli.config.js';
/**
* Get version from package.json
*/
export function getVersion(): string {
return version;
}
export interface InstallerConfig {
model: string;
doctorModel: string;
workos: {
clientId: string;
authkitDomain: string;
llmGatewayUrl: string;
};
telemetry: {
enabled: boolean;
eventName: string;
};
proxy: {
refreshThresholdMs: number;
};
nodeVersion: string;
logging: {
debugMode: boolean;
};
documentation: {
workosDocsUrl: string;
dashboardUrl: string;
issuesUrl: string;
};
frameworks: {
[key: string]: {
port: number;
callbackPath: string;
};
};
legacy: {
oauthPort: number;
};
branding: {
showAsciiArt: boolean;
asciiArt: string;
compactAsciiArt: string;
useCompact: boolean;
};
}
/**
* Get config
*/
export function getConfig(): InstallerConfig {
return config;
}
/**
* Get the CLI auth client ID.
* Env var overrides config default.
*/
export function getCliAuthClientId(): string {
return config.workos.clientId;
}
/**
* Get the AuthKit domain.
* Env var overrides config default.
*/
export function getAuthkitDomain(): string {
return process.env.WORKOS_AUTHKIT_DOMAIN || config.workos.authkitDomain;
}
/**
* Get the LLM gateway URL.
* Env var overrides config default.
*/
export function getLlmGatewayUrl(): string {
return process.env.WORKOS_LLM_GATEWAY_URL || config.workos.llmGatewayUrl;
}