@digitaldefiance/express-suite-starter 4.25.6 → 4.25.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitaldefiance/express-suite-starter",
3
- "version": "4.25.6",
3
+ "version": "4.25.8",
4
4
  "license": "MIT",
5
5
  "bin": {
6
6
  "create-express-suite": "./dist/src/cli.js"
@@ -0,0 +1,19 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>{{siteTitle}}</title>
6
+ <base href="/" />
7
+
8
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
9
+ <link rel="icon" type="image/x-icon" href="/favicon.ico" />
10
+ <link rel="stylesheet" href="/src/styles.scss" />
11
+ <script>
12
+ window.APP_CONFIG = window.APP_CONFIG || {};
13
+ </script>
14
+ </head>
15
+ <body>
16
+ <div id="root"></div>
17
+ <script type="module" src="/src/main.tsx"></script>
18
+ </body>
19
+ </html>
@@ -26,7 +26,19 @@ const getApiBaseUrl = () => {
26
26
  return environment.apiUrl;
27
27
  };
28
28
 
29
+ const getEmailDomain = () => {
30
+ if (
31
+ typeof window !== 'undefined' &&
32
+ (window as any).APP_CONFIG &&
33
+ (window as any).APP_CONFIG.emailDomain
34
+ ) {
35
+ return (window as any).APP_CONFIG.emailDomain;
36
+ }
37
+ return environment.emailDomain;
38
+ };
39
+
29
40
  const API_BASE_URL = getApiBaseUrl();
41
+ const EMAIL_DOMAIN = getEmailDomain();
30
42
 
31
43
  const AuthProviderWithNavigation: FC<{ children: React.ReactNode }> = ({
32
44
  children,
@@ -52,6 +64,7 @@ const AuthProviderWithNavigation: FC<{ children: React.ReactNode }> = ({
52
64
  <AuthProvider
53
65
  baseUrl={API_BASE_URL}
54
66
  constants={AppConstants}
67
+ emailDomain={EMAIL_DOMAIN}
55
68
  eciesConfig={EciesConfig}
56
69
  onLogout={handleLogout}
57
70
  >
@@ -13,4 +13,5 @@ export const environment: IEnvironment = {
13
13
  siteUrl: server ?? 'https://{{hostname}}',
14
14
  apiUrl:
15
15
  server !== undefined ? `${server}/api` : 'https://{{hostname}}/api',
16
+ emailDomain: '{{hostname}}',
16
17
  };
@@ -12,4 +12,5 @@ export const environment: IEnvironment = {
12
12
  production: false,
13
13
  siteUrl: server ?? 'http://localhost:3000',
14
14
  apiUrl: server !== undefined ? `${server}/api` : 'http://localhost:3000/api',
15
+ emailDomain: 'localhost.localdomain',
15
16
  };
@@ -2,4 +2,5 @@ export interface IEnvironment {
2
2
  production: boolean;
3
3
  siteUrl: string;
4
4
  apiUrl: string;
5
+ emailDomain: string;
5
6
  }