@magmamath/frontend-config 1.0.14 → 1.0.16-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +31 -3
- package/dist/index.d.ts +31 -3
- package/dist/index.js +482 -157
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +482 -157
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -34,10 +34,12 @@ declare enum Platform {
|
|
|
34
34
|
STUDENTS_WEB = "STUDENTS",
|
|
35
35
|
TEACHERS_WEB = "TEACHERS",
|
|
36
36
|
DISTRICT_DASHBOARD = "DISTRICT",
|
|
37
|
-
AUTH_WEB = "AUTH_WEB"
|
|
37
|
+
AUTH_WEB = "AUTH_WEB",
|
|
38
|
+
WEB_ADMIN = "WEB_ADMIN"
|
|
38
39
|
}
|
|
39
40
|
declare enum Environment {
|
|
40
41
|
MARS = "MARS",
|
|
42
|
+
VENUS = "VENUS",
|
|
41
43
|
PROD = "PROD"
|
|
42
44
|
}
|
|
43
45
|
declare enum PlatformBuildTarget {
|
|
@@ -171,9 +173,21 @@ type DistrictCommon = {
|
|
|
171
173
|
CLARITY_PROJECT_ID: string;
|
|
172
174
|
PROBLEM_IMAGE_SIZE_LIMIT: number;
|
|
173
175
|
};
|
|
176
|
+
type RegionSpecificWebAdminVars = {
|
|
177
|
+
API_URL: string;
|
|
178
|
+
CDN_HOST: string;
|
|
179
|
+
STUDENTS_WEB_URL: string;
|
|
180
|
+
DISTRICT_WEB_URL: string;
|
|
181
|
+
TEACHERS_WEB_URL: string;
|
|
182
|
+
};
|
|
183
|
+
type WebAdminCommon = {
|
|
184
|
+
MARS_URL: string;
|
|
185
|
+
PROD_URL: string;
|
|
186
|
+
};
|
|
174
187
|
type StudentsWebVars = RegionSpecificVars & StudentsWebCommon;
|
|
175
188
|
type TeachersWebVars = RegionSpecificVars & TeachersWebCommon;
|
|
176
189
|
type DistrictDashboardVars = Omit<RegionSpecificVars, 'SOCKET_URL'> & DistrictCommon;
|
|
190
|
+
type WebAdminVars = RegionSpecificWebAdminVars & WebAdminCommon;
|
|
177
191
|
type AuthWebBaseVars = Omit<RegionSpecificVars, 'CDN_HOST' | 'LOGGLY_TAG' | 'SOCKET_URL'> & {
|
|
178
192
|
TOS_URL: string;
|
|
179
193
|
CLARITY_PROJECT_ID: string;
|
|
@@ -216,6 +230,11 @@ type EnvPreset = Readonly<{
|
|
|
216
230
|
[key in Environment]: AuthWebVars<SSO_US>;
|
|
217
231
|
};
|
|
218
232
|
};
|
|
233
|
+
[Platform.WEB_ADMIN]: {
|
|
234
|
+
[key in Locale]: {
|
|
235
|
+
[key in Environment]: WebAdminVars;
|
|
236
|
+
};
|
|
237
|
+
};
|
|
219
238
|
}>;
|
|
220
239
|
type EnvironmentVars<P extends Platform> = EnvPreset[P][Locale][Environment];
|
|
221
240
|
|
|
@@ -382,7 +401,15 @@ type LocalePreset = {
|
|
|
382
401
|
[key in Locale]: DistrictLocaleConfig;
|
|
383
402
|
};
|
|
384
403
|
[Platform.AUTH_WEB]: {
|
|
385
|
-
[
|
|
404
|
+
[Locale.CA]: AuthWebLocaleConfig<SSO_US>;
|
|
405
|
+
[Locale.DE]: AuthWebLocaleConfig<SSO_DE>;
|
|
406
|
+
[Locale.GB]: AuthWebLocaleConfig<SSO_UK>;
|
|
407
|
+
[Locale.SCT]: AuthWebLocaleConfig<SSO_UK>;
|
|
408
|
+
[Locale.SE]: AuthWebLocaleConfig<SSO_SE>;
|
|
409
|
+
[Locale.US]: AuthWebLocaleConfig<SSO_US>;
|
|
410
|
+
};
|
|
411
|
+
[Platform.WEB_ADMIN]: {
|
|
412
|
+
[key in Locale]: {};
|
|
386
413
|
};
|
|
387
414
|
};
|
|
388
415
|
type LocaleConfig<P extends Platform> = LocalePreset[P][Locale];
|
|
@@ -432,9 +459,10 @@ declare class AppConfigManager<P extends Platform> {
|
|
|
432
459
|
[Locale.SE]: { [key in Environment]: AuthWebVars<SSO_SE>; };
|
|
433
460
|
[Locale.US]: { [key in Environment]: AuthWebVars<SSO_US>; };
|
|
434
461
|
};
|
|
462
|
+
WEB_ADMIN: { [key in Locale]: { [key_1 in Environment]: WebAdminVars; }; };
|
|
435
463
|
}>;
|
|
436
464
|
localePreset: LocalePreset;
|
|
437
465
|
};
|
|
438
466
|
}
|
|
439
467
|
|
|
440
|
-
export { AppConfigManager, type AuthWebVars, DateFormat, DateLocale, type DistrictCommon, type DistrictDashboardVars, type EnvPreset, Environment, type EnvironmentVars, Locale, LoginSource, MatrixMode, Platform, PlatformBuildTarget, type RegionSpecificVars, SSO, type SSOConfig, Source, type StudentsWebCommon, type StudentsWebVars, type TeachersWebCommon, type TeachersWebVars, buildTargetToEnvironment };
|
|
468
|
+
export { AppConfigManager, type AuthWebVars, DateFormat, DateLocale, type DistrictCommon, type DistrictDashboardVars, type EnvPreset, Environment, type EnvironmentVars, Locale, LoginSource, MatrixMode, Platform, PlatformBuildTarget, type RegionSpecificVars, type RegionSpecificWebAdminVars, SSO, type SSOConfig, Source, type StudentsWebCommon, type StudentsWebVars, type TeachersWebCommon, type TeachersWebVars, type WebAdminCommon, type WebAdminVars, buildTargetToEnvironment };
|
package/dist/index.d.ts
CHANGED
|
@@ -34,10 +34,12 @@ declare enum Platform {
|
|
|
34
34
|
STUDENTS_WEB = "STUDENTS",
|
|
35
35
|
TEACHERS_WEB = "TEACHERS",
|
|
36
36
|
DISTRICT_DASHBOARD = "DISTRICT",
|
|
37
|
-
AUTH_WEB = "AUTH_WEB"
|
|
37
|
+
AUTH_WEB = "AUTH_WEB",
|
|
38
|
+
WEB_ADMIN = "WEB_ADMIN"
|
|
38
39
|
}
|
|
39
40
|
declare enum Environment {
|
|
40
41
|
MARS = "MARS",
|
|
42
|
+
VENUS = "VENUS",
|
|
41
43
|
PROD = "PROD"
|
|
42
44
|
}
|
|
43
45
|
declare enum PlatformBuildTarget {
|
|
@@ -171,9 +173,21 @@ type DistrictCommon = {
|
|
|
171
173
|
CLARITY_PROJECT_ID: string;
|
|
172
174
|
PROBLEM_IMAGE_SIZE_LIMIT: number;
|
|
173
175
|
};
|
|
176
|
+
type RegionSpecificWebAdminVars = {
|
|
177
|
+
API_URL: string;
|
|
178
|
+
CDN_HOST: string;
|
|
179
|
+
STUDENTS_WEB_URL: string;
|
|
180
|
+
DISTRICT_WEB_URL: string;
|
|
181
|
+
TEACHERS_WEB_URL: string;
|
|
182
|
+
};
|
|
183
|
+
type WebAdminCommon = {
|
|
184
|
+
MARS_URL: string;
|
|
185
|
+
PROD_URL: string;
|
|
186
|
+
};
|
|
174
187
|
type StudentsWebVars = RegionSpecificVars & StudentsWebCommon;
|
|
175
188
|
type TeachersWebVars = RegionSpecificVars & TeachersWebCommon;
|
|
176
189
|
type DistrictDashboardVars = Omit<RegionSpecificVars, 'SOCKET_URL'> & DistrictCommon;
|
|
190
|
+
type WebAdminVars = RegionSpecificWebAdminVars & WebAdminCommon;
|
|
177
191
|
type AuthWebBaseVars = Omit<RegionSpecificVars, 'CDN_HOST' | 'LOGGLY_TAG' | 'SOCKET_URL'> & {
|
|
178
192
|
TOS_URL: string;
|
|
179
193
|
CLARITY_PROJECT_ID: string;
|
|
@@ -216,6 +230,11 @@ type EnvPreset = Readonly<{
|
|
|
216
230
|
[key in Environment]: AuthWebVars<SSO_US>;
|
|
217
231
|
};
|
|
218
232
|
};
|
|
233
|
+
[Platform.WEB_ADMIN]: {
|
|
234
|
+
[key in Locale]: {
|
|
235
|
+
[key in Environment]: WebAdminVars;
|
|
236
|
+
};
|
|
237
|
+
};
|
|
219
238
|
}>;
|
|
220
239
|
type EnvironmentVars<P extends Platform> = EnvPreset[P][Locale][Environment];
|
|
221
240
|
|
|
@@ -382,7 +401,15 @@ type LocalePreset = {
|
|
|
382
401
|
[key in Locale]: DistrictLocaleConfig;
|
|
383
402
|
};
|
|
384
403
|
[Platform.AUTH_WEB]: {
|
|
385
|
-
[
|
|
404
|
+
[Locale.CA]: AuthWebLocaleConfig<SSO_US>;
|
|
405
|
+
[Locale.DE]: AuthWebLocaleConfig<SSO_DE>;
|
|
406
|
+
[Locale.GB]: AuthWebLocaleConfig<SSO_UK>;
|
|
407
|
+
[Locale.SCT]: AuthWebLocaleConfig<SSO_UK>;
|
|
408
|
+
[Locale.SE]: AuthWebLocaleConfig<SSO_SE>;
|
|
409
|
+
[Locale.US]: AuthWebLocaleConfig<SSO_US>;
|
|
410
|
+
};
|
|
411
|
+
[Platform.WEB_ADMIN]: {
|
|
412
|
+
[key in Locale]: {};
|
|
386
413
|
};
|
|
387
414
|
};
|
|
388
415
|
type LocaleConfig<P extends Platform> = LocalePreset[P][Locale];
|
|
@@ -432,9 +459,10 @@ declare class AppConfigManager<P extends Platform> {
|
|
|
432
459
|
[Locale.SE]: { [key in Environment]: AuthWebVars<SSO_SE>; };
|
|
433
460
|
[Locale.US]: { [key in Environment]: AuthWebVars<SSO_US>; };
|
|
434
461
|
};
|
|
462
|
+
WEB_ADMIN: { [key in Locale]: { [key_1 in Environment]: WebAdminVars; }; };
|
|
435
463
|
}>;
|
|
436
464
|
localePreset: LocalePreset;
|
|
437
465
|
};
|
|
438
466
|
}
|
|
439
467
|
|
|
440
|
-
export { AppConfigManager, type AuthWebVars, DateFormat, DateLocale, type DistrictCommon, type DistrictDashboardVars, type EnvPreset, Environment, type EnvironmentVars, Locale, LoginSource, MatrixMode, Platform, PlatformBuildTarget, type RegionSpecificVars, SSO, type SSOConfig, Source, type StudentsWebCommon, type StudentsWebVars, type TeachersWebCommon, type TeachersWebVars, buildTargetToEnvironment };
|
|
468
|
+
export { AppConfigManager, type AuthWebVars, DateFormat, DateLocale, type DistrictCommon, type DistrictDashboardVars, type EnvPreset, Environment, type EnvironmentVars, Locale, LoginSource, MatrixMode, Platform, PlatformBuildTarget, type RegionSpecificVars, type RegionSpecificWebAdminVars, SSO, type SSOConfig, Source, type StudentsWebCommon, type StudentsWebVars, type TeachersWebCommon, type TeachersWebVars, type WebAdminCommon, type WebAdminVars, buildTargetToEnvironment };
|