MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / CloudAppConfig

Class CloudAppConfig

console/src/config/AppConfig.ts:100–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100export class CloudAppConfig implements IBaseAppConfig {
101 mode = "cloud" as const;
102 authMode: CloudAuthMode = "Frontegg" as const;
103
104 #isBrowser = getIsBrowser();
105
106 consoleUrl = getConsoleUrl(this.#isBrowser);
107
108 // The URL base path of the console i.e. "internal-console". This is used for impersonation
109 // where we need the URL to have 'internal-console' at the base of the path.
110 impersonationBasePath = buildConstants.basename;
111
112 // The current cloud stack e.g. "local" or "production".
113 currentStack = getCurrentStack({
114 hostname: this.consoleUrl.hostname,
115 isBrowser: this.#isBrowser,
116 });
117
118 // Frontegg API URL for the current environment.
119 fronteggUrl = getFronteggUrl(this.currentStack);
120
121 // Region and environment details used during user organization impersonation.
122 // Value is null during normal console usage
123 impersonation = getImpersonatedEnvironment(
124 this.consoleUrl.host,
125 buildConstants,
126 );
127
128 // Whether the current environment is being impersonated.
129 isImpersonating = Boolean(this.impersonation);
130
131 #consoleEnvironment = getConsoleEnvironment({
132 hostname: this.consoleUrl.hostname,
133 isImpersonating: this.isImpersonating,
134 });
135
136 // The global API URL for Materialize Cloud.
137 cloudGlobalApiUrl = getCloudGlobalApiUrl({
138 stack: this.currentStack,
139 isImpersonation: this.isImpersonating,
140 });
141
142 // The launchDarkly key for the current environment.
143 launchDarklyKey = getLaunchDarklyKey(this.#consoleEnvironment);
144
145 // The Sentry configuration for the current environment.
146 sentryConfig: SentryConfig = {
147 dsn: "https://13c8b3a8d1e547c9b9493de997b04337@o561021.ingest.sentry.io/5699757",
148 environment: this.currentStack,
149 release: buildConstants.sentryRelease,
150 };
151
152 // The Segment API key for the current environment.
153 segmentApiKey = getSegmentApiKey({
154 consoleEnv: this.#consoleEnvironment,
155 isImpersonating: this.isImpersonating,
156 });
157

Callers

nothing calls this directly

Calls 15

getCurrentStackFunction · 0.90
getFronteggUrlFunction · 0.90
getConsoleEnvironmentFunction · 0.90
getCloudGlobalApiUrlFunction · 0.90
getLaunchDarklyKeyFunction · 0.90
getSegmentApiKeyFunction · 0.90
getStripePromiseFunction · 0.90
getCloudRegionsFunction · 0.90
getEnvironmentdConfigFunction · 0.90
getEnvironmentdSchemeFunction · 0.90

Tested by

no test coverage detected