@genesislcap/blank-app-seed 3.41.2 → 4.0.0-prerelease.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/.genx/package.json +1 -1
- package/.genx/versions.json +3 -3
- package/CHANGELOG.md +99 -41
- package/client-tmp/angular/angular.json +3 -0
- package/client-tmp/angular/src/app/app.component.ts +12 -6
- package/client-tmp/angular/src/app/guards/auth.guard.ts +1 -1
- package/client-tmp/angular/src/app/layouts/default/default.layout.html +1 -0
- package/client-tmp/angular/src/app/layouts/default/default.layout.ts +6 -2
- package/client-tmp/angular/src/app/services/route.service.ts +2 -2
- package/client-tmp/angular/src/app/share/foundation-auth.ts +29 -15
- package/client-tmp/angular/src/proxy.conf.json +12 -0
- package/client-tmp/react/src/layouts/default/DefaultLayout.tsx +7 -0
- package/client-tmp/react/src/pages/AuthPage/AuthPage.tsx +1 -1
- package/client-tmp/react/src/share/foundation-login.ts +29 -15
- package/client-tmp/react/webpack.config.js +15 -1
- package/client-tmp/web-components/package.json +4 -1
- package/client-tmp/web-components/src/routes/config.ts +36 -81
- package/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/gradlew +12 -9
- package/gradlew.bat +12 -10
- package/package.json +1 -1
- package/server/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/server/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/server/gradlew +12 -9
- package/server/gradlew.bat +12 -10
- package/server/{{appName}}-app/src/main/genesis/scripts/genesis-router.kts +13 -0
- package/client-tmp/angular/src/app/share/foundation-login.ts +0 -45
package/.genx/package.json
CHANGED
package/.genx/versions.json
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,80 +1,138 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [
|
|
3
|
+
## [4.0.0-prerelease.1](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.18...v4.0.0-prerelease.1) (2025-03-25)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ⚠ BREAKING CHANGES
|
|
7
|
+
|
|
8
|
+
* **deps:** update Gradle to version 8.10.2 (#443)
|
|
9
|
+
* **deps:** update Gradle to version 8.10.2
|
|
10
|
+
|
|
11
|
+
### Build System
|
|
12
|
+
|
|
13
|
+
* **deps:** update Gradle to version 8.10.2 d6db442
|
|
14
|
+
* **deps:** update Gradle to version 8.10.2 (#443) d36be4d
|
|
15
|
+
|
|
16
|
+
## [3.40.0-prerelease.18](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.17...v3.40.0-prerelease.18) (2025-03-24)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* updating server version information for Auth [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) 4f91206
|
|
22
|
+
|
|
23
|
+
## [3.40.0-prerelease.17](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.16...v3.40.0-prerelease.17) (2025-03-24)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
* updating server version information for GSF [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) df42df6
|
|
29
|
+
|
|
30
|
+
## [3.40.0-prerelease.16](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.15...v3.40.0-prerelease.16) (2025-03-20)
|
|
4
31
|
|
|
5
32
|
|
|
6
33
|
### Bug Fixes
|
|
7
34
|
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* react and angular router fix (#439) 6c7a4da
|
|
11
|
-
* react router fixes 1fd1742
|
|
35
|
+
* automated dependency version update [skip-ci] [PSD-9](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/9) e5e0be7
|
|
36
|
+
* automated dependency version update [skip-ci] [PSD-9](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/9) (#441) f5ef40a
|
|
12
37
|
|
|
13
|
-
## [3.
|
|
38
|
+
## [3.40.0-prerelease.15](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.14...v3.40.0-prerelease.15) (2025-03-19)
|
|
14
39
|
|
|
15
40
|
|
|
16
41
|
### Bug Fixes
|
|
17
42
|
|
|
18
|
-
*
|
|
19
|
-
*
|
|
43
|
+
* automated dependency version update [skip-ci] [PSD-9](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/9) 915104f
|
|
44
|
+
* automated dependency version update [skip-ci] [PSD-9](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/9) (#440) b5d9c20
|
|
20
45
|
|
|
21
|
-
## [3.
|
|
46
|
+
## [3.40.0-prerelease.14](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.13...v3.40.0-prerelease.14) (2025-03-06)
|
|
22
47
|
|
|
23
48
|
|
|
24
49
|
### Features
|
|
25
50
|
|
|
26
51
|
* bump GSF to 8.9 [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) (#436) 1295e2b
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
* use foundation-auth as default login [FUI-2196](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/2196) (#427) b8c1d13
|
|
30
|
-
* use public path for navigation when available [FUI-2071](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/2071) (#410) 5e6c1af
|
|
52
|
+
|
|
53
|
+
## [3.40.0-prerelease.13](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.12...v3.40.0-prerelease.13) (2025-03-04)
|
|
31
54
|
|
|
32
55
|
|
|
33
56
|
### Bug Fixes
|
|
34
57
|
|
|
35
58
|
* automated dependency version update [skip-ci] [PSD-9](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/9) 7229060
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
* revert changes 65040e4
|
|
43
|
-
* revert changes from 8.9 (#430) 4133d7e, closes FUI-2196 PSD-9
|
|
44
|
-
* update versions build trigger f8783d3
|
|
59
|
+
|
|
60
|
+
## [3.40.0-prerelease.12](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.11...v3.40.0-prerelease.12) (2025-03-03)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
### Bug Fixes
|
|
64
|
+
|
|
45
65
|
* updating server version information for Auth [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) e897283
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
* updating server version information for Auth [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) 266dfd6
|
|
66
|
+
|
|
67
|
+
## [3.40.0-prerelease.11](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.10...v3.40.0-prerelease.11) (2025-03-03)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
### Bug Fixes
|
|
71
|
+
|
|
53
72
|
* updating server version information for GSF [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) 520e1bb
|
|
73
|
+
|
|
74
|
+
## [3.40.0-prerelease.10](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.9...v3.40.0-prerelease.10) (2025-03-03)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
### Bug Fixes
|
|
78
|
+
|
|
79
|
+
* update versions build trigger f8783d3
|
|
80
|
+
|
|
81
|
+
## [3.40.0-prerelease.9](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.8...v3.40.0-prerelease.9) (2025-02-20)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
### Bug Fixes
|
|
85
|
+
|
|
86
|
+
* updating server version information for Auth [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) d5fd0da
|
|
87
|
+
|
|
88
|
+
## [3.40.0-prerelease.8](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.7...v3.40.0-prerelease.8) (2025-02-20)
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
### Bug Fixes
|
|
92
|
+
|
|
54
93
|
* updating server version information for GSF [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) 0772186
|
|
94
|
+
|
|
95
|
+
## [3.40.0-prerelease.7](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.6...v3.40.0-prerelease.7) (2025-02-20)
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
### Bug Fixes
|
|
99
|
+
|
|
100
|
+
* updating server version information for Auth [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) eb67c93
|
|
101
|
+
|
|
102
|
+
## [3.40.0-prerelease.6](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.5...v3.40.0-prerelease.6) (2025-02-20)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
### Bug Fixes
|
|
106
|
+
|
|
55
107
|
* updating server version information for GSF [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) ff4366b
|
|
56
|
-
* updating server version information for GSF [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) 6f4446a
|
|
57
|
-
* updating server version information for GSF [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) f4b429c
|
|
58
|
-
* updating server version information for GSF [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) 7dc3ae2
|
|
59
|
-
* updating server version information for GSF [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) e95345c
|
|
60
|
-
* updating server version information for GSF [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) bcff53d
|
|
61
|
-
* updating server version information for GSF [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) 1992fef
|
|
62
|
-
* updating server version information for GSF [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) 9decda0
|
|
63
|
-
* updating server version information for GSF [PSD-0](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/0) b63f98e
|
|
64
108
|
|
|
65
|
-
## [3.40.
|
|
109
|
+
## [3.40.0-prerelease.5](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.4...v3.40.0-prerelease.5) (2025-02-14)
|
|
66
110
|
|
|
67
111
|
|
|
68
112
|
### Bug Fixes
|
|
69
113
|
|
|
70
|
-
*
|
|
114
|
+
* automated dependency version update [skip-ci] [PSD-9](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/9) (#431) c2eb359
|
|
115
|
+
|
|
116
|
+
## [3.40.0-prerelease.4](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.3...v3.40.0-prerelease.4) (2025-02-14)
|
|
71
117
|
|
|
72
|
-
|
|
118
|
+
|
|
119
|
+
### Bug Fixes
|
|
120
|
+
|
|
121
|
+
* include auth in config [FUI-2196](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/2196) 1c549d5
|
|
122
|
+
|
|
123
|
+
## [3.40.0-prerelease.3](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.2...v3.40.0-prerelease.3) (2025-02-14)
|
|
73
124
|
|
|
74
125
|
|
|
75
126
|
### Features
|
|
76
127
|
|
|
77
|
-
*
|
|
128
|
+
* use foundation-auth as default login [FUI-2196](https://github.com/genesiscommunitysuccess/blank-app-seed/issues/2196) (#427) abd0c48
|
|
129
|
+
|
|
130
|
+
## [3.40.0-prerelease.2](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.40.0-prerelease.1...v3.40.0-prerelease.2) (2025-02-07)
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
### Bug Fixes
|
|
134
|
+
|
|
135
|
+
* revert changes 65040e4
|
|
78
136
|
|
|
79
137
|
## [3.39.4](https://github.com/genesiscommunitysuccess/blank-app-seed/compare/v3.39.3...v3.39.4) (2025-01-16)
|
|
80
138
|
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { AfterViewInit, Component, ElementRef, OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { Router, NavigationEnd } from '@angular/router';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
3
|
+
import { Connect } from '@genesislcap/foundation-comms';
|
|
4
|
+
import { customEventFactory, registerStylesTarget } from '../pbc/utils';
|
|
5
|
+
import { configureFoundationAuth } from './share/foundation-auth';
|
|
6
6
|
import { registerComponents } from './share/genesis-components';
|
|
7
7
|
import { getStore } from './store';
|
|
8
|
-
import {
|
|
8
|
+
import type { LayoutComponentName } from './types/layout';
|
|
9
|
+
import getLayoutNameByRoute from './utils/getLayoutNameByRoute';
|
|
9
10
|
{{#if FDC3.channels.length}}
|
|
10
11
|
import { listenToChannel, onFDC3Ready } from './utils';
|
|
11
12
|
{{/if}}
|
|
@@ -20,12 +21,17 @@ export class AppComponent implements OnInit, OnDestroy, AfterViewInit {
|
|
|
20
21
|
title = '{{capitalCase appName}}';
|
|
21
22
|
store = getStore();
|
|
22
23
|
|
|
24
|
+
// @ts-ignore
|
|
25
|
+
@Connect connect: Connect;
|
|
26
|
+
|
|
23
27
|
constructor(
|
|
24
28
|
private el: ElementRef,
|
|
25
29
|
router: Router,
|
|
26
30
|
) {
|
|
27
|
-
|
|
28
|
-
|
|
31
|
+
// @ts-ignore
|
|
32
|
+
configureFoundationAuth({ router, connectService: this.connect });
|
|
33
|
+
|
|
34
|
+
|
|
29
35
|
// Set layout componet based on route
|
|
30
36
|
router.events.subscribe((event: any) => {
|
|
31
37
|
if (event instanceof NavigationEnd) {
|
|
@@ -9,7 +9,7 @@ export class AuthGuard extends PermissionsGuard {
|
|
|
9
9
|
override async canActivate(): Promise<boolean> {
|
|
10
10
|
if (!this.user.isAuthenticated) {
|
|
11
11
|
this.user.trackPath();
|
|
12
|
-
this.router.navigate([`/${AUTH_PATH}`]);
|
|
12
|
+
await this.router.navigate([`/${AUTH_PATH}`]);
|
|
13
13
|
return false;
|
|
14
14
|
}
|
|
15
15
|
return true;
|
|
@@ -29,11 +29,15 @@ export class DefaultLayoutComponent extends BaseLayout implements AfterViewInit
|
|
|
29
29
|
configureDesignSystem(this.designSystemProviderElement.nativeElement, designTokens);
|
|
30
30
|
registerStylesTarget(this.el.nativeElement, 'layout');
|
|
31
31
|
}
|
|
32
|
-
|
|
32
|
+
|
|
33
33
|
navigateAngular = (path: string) => {
|
|
34
34
|
this.router.navigate([path]);
|
|
35
35
|
};
|
|
36
|
-
|
|
36
|
+
|
|
37
|
+
onLogout = () => {
|
|
38
|
+
this.router.navigate(['/login']);
|
|
39
|
+
};
|
|
40
|
+
|
|
37
41
|
onLuminanceToogle = (): void => {
|
|
38
42
|
baseLayerLuminance.setValueFor(
|
|
39
43
|
this.designSystemProviderElement.nativeElement,
|
|
@@ -39,7 +39,7 @@ export class RouteService {
|
|
|
39
39
|
navItems: [
|
|
40
40
|
{
|
|
41
41
|
navId: 'header',
|
|
42
|
-
title: '{{#if this.title}}{{this.title}}{{else}}{{this.name}}{{/if}}',
|
|
42
|
+
title: '{{#if this.title}}{{capitalCase this.title}}{{else}}{{this.name}}{{/if}}',
|
|
43
43
|
icon: {
|
|
44
44
|
name: '{{this.icon}}',
|
|
45
45
|
variant: 'solid',
|
|
@@ -53,7 +53,7 @@ export class RouteService {
|
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* @privateRemarks
|
|
56
|
-
* The shell has access to context, so it's possible for it to return a pre-mapped framework variant of routes.
|
|
56
|
+
* The shell has access to context, so it's possible for it to return a pre-mapped framework variant of routes.
|
|
57
57
|
* In this iteration we're doing it inline, given the angular version may move and here we know the shape we need.
|
|
58
58
|
*/
|
|
59
59
|
pbcRoutes(): Routes {
|
|
@@ -1,20 +1,34 @@
|
|
|
1
|
-
// import { configure } from '@genesislcap/foundation-auth/config';
|
|
2
1
|
import type { Router } from '@angular/router';
|
|
2
|
+
import { configure, defaultAuthConfig } from '@genesislcap/foundation-auth/config';
|
|
3
|
+
import type { Connect } from '@genesislcap/foundation-comms';
|
|
4
|
+
import { getUser } from '@genesislcap/foundation-user';
|
|
5
|
+
import { GENESIS_SOCKET_URL } from '@genesislcap/foundation-utils';
|
|
6
|
+
import { AUTH_PATH } from '../app.config';
|
|
3
7
|
|
|
4
8
|
/**
|
|
5
9
|
* Configure the micro frontend
|
|
6
10
|
*/
|
|
7
|
-
export const configureFoundationAuth = ({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
11
|
+
export const configureFoundationAuth = ({ router, connectService,}: { router: Router; connectService: Connect; }) => {
|
|
12
|
+
const baseElement = document.querySelector('base');
|
|
13
|
+
const basePath = baseElement?.getAttribute('href') || '';
|
|
14
|
+
|
|
15
|
+
configure({
|
|
16
|
+
name: 'client-app-login',
|
|
17
|
+
omitRoutes: ['request-account', 'forgot-password'],
|
|
18
|
+
fields: {
|
|
19
|
+
...defaultAuthConfig.fields,
|
|
20
|
+
username: {
|
|
21
|
+
...defaultAuthConfig.fields.username,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
hostPath: basePath + AUTH_PATH,
|
|
25
|
+
postLoginRedirect: async () => {
|
|
26
|
+
const url = GENESIS_SOCKET_URL;
|
|
27
|
+
await connectService.connect(url);
|
|
28
|
+
|
|
29
|
+
const lastPath = getUser().lastPath()?.replace(basePath, '');
|
|
30
|
+
|
|
31
|
+
router.navigate([lastPath ?? '{{kebabCase routes.[0].name}}']);
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
};
|
|
@@ -9,6 +9,8 @@ import styles from './DefaultLayout.module.css';
|
|
|
9
9
|
import PBCElementsRenderer from '@/pbc/elementsRenderer';
|
|
10
10
|
import * as designTokens from '@/styles/design-tokens.json';
|
|
11
11
|
import { useRoutesContext } from '@/store/RoutesContext';
|
|
12
|
+
import { connectService } from '@/services/connect.service.ts';
|
|
13
|
+
import { getUser } from '@genesislcap/foundation-user';
|
|
12
14
|
import { AUTH_PATH } from '@/config';
|
|
13
15
|
|
|
14
16
|
interface DefaultLayoutProps {
|
|
@@ -43,6 +45,11 @@ const DefaultLayout: React.FC<DefaultLayoutProps> = ({ children }) => {
|
|
|
43
45
|
}
|
|
44
46
|
};
|
|
45
47
|
|
|
48
|
+
if (!connectService.isConnected()) {
|
|
49
|
+
getUser().trackPath();
|
|
50
|
+
navigate(`/${AUTH_PATH}`)
|
|
51
|
+
}
|
|
52
|
+
|
|
46
53
|
useEffect(() => {
|
|
47
54
|
if (designSystemProviderRef.current) {
|
|
48
55
|
configureDesignSystem(designSystemProviderRef.current, designTokens);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, {useEffect} from 'react';
|
|
2
2
|
import './AuthPage.css';
|
|
3
3
|
import { configureFoundationLogin } from "@/share/foundation-login.ts";
|
|
4
|
-
import { useNavigate } from
|
|
4
|
+
import { useNavigate } from "react-router";
|
|
5
5
|
|
|
6
6
|
const AuthPage: React.FC = () => {
|
|
7
7
|
const navigate = useNavigate();
|
|
@@ -1,23 +1,37 @@
|
|
|
1
|
-
import {configure,
|
|
2
|
-
import {
|
|
1
|
+
import { configure, defaultAuthConfig } from '@genesislcap/foundation-auth/config';
|
|
2
|
+
import { getUser } from '@genesislcap/foundation-user';
|
|
3
3
|
import { AUTH_PATH } from '@/config';
|
|
4
|
+
import { GENESIS_SOCKET_URL } from '@genesislcap/foundation-utils';
|
|
5
|
+
import { Connect } from '@genesislcap/foundation-comms';
|
|
6
|
+
import { DI } from '@genesislcap/web-core';
|
|
7
|
+
import type { NavigateFunction } from 'react-router';
|
|
4
8
|
|
|
5
9
|
/**
|
|
6
10
|
* Configure the micro frontend
|
|
7
11
|
*/
|
|
8
|
-
export const configureFoundationLogin = ({
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
export const configureFoundationLogin = ({navigate}: { navigate: NavigateFunction}) => {
|
|
13
|
+
const baseElement = document.querySelector('base');
|
|
14
|
+
const basePath = baseElement?.getAttribute('href') || '';
|
|
15
|
+
const connect = DI.getOrCreateDOMContainer().get(Connect);
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
configure({
|
|
19
|
+
name: 'client-app-login',
|
|
20
|
+
omitRoutes: ['request-account', 'forgot-password'],
|
|
21
|
+
fields: {
|
|
22
|
+
...defaultAuthConfig.fields,
|
|
23
|
+
username: {
|
|
24
|
+
...defaultAuthConfig.fields.username,
|
|
25
|
+
},
|
|
17
26
|
},
|
|
18
|
-
|
|
27
|
+
hostPath: basePath + AUTH_PATH,
|
|
28
|
+
postLoginRedirect: async () => {
|
|
29
|
+
const url = GENESIS_SOCKET_URL;
|
|
30
|
+
await connect.connect(url);
|
|
19
31
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
32
|
+
const redirectUrl = '/{{kebabCase routes.[0].name}}';
|
|
33
|
+
navigate(redirectUrl);
|
|
34
|
+
},
|
|
35
|
+
})
|
|
23
36
|
}
|
|
37
|
+
|
|
@@ -7,7 +7,7 @@ module.exports = (env, argv) => {
|
|
|
7
7
|
const https = process.env.HTTPS === 'true';
|
|
8
8
|
const open = !(process.env.NO_OPEN === 'true');
|
|
9
9
|
const environmentFile = mode === 'production'
|
|
10
|
-
? 'environment.prod.ts'
|
|
10
|
+
? 'environment.prod.ts'
|
|
11
11
|
: 'environment.ts';
|
|
12
12
|
const environmentPath = resolve(__dirname, 'src/environments', environmentFile);
|
|
13
13
|
|
|
@@ -76,6 +76,20 @@ module.exports = (env, argv) => {
|
|
|
76
76
|
],
|
|
77
77
|
devServer: {
|
|
78
78
|
server: https ? 'https' : 'http',
|
|
79
|
+
proxy: [
|
|
80
|
+
{
|
|
81
|
+
context: "/sm",
|
|
82
|
+
"target": "{{apiHost}}",
|
|
83
|
+
"secure": false,
|
|
84
|
+
"pathRewrite": {"^/sm": ""},
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
context: "/gwf",
|
|
88
|
+
"target": "{{apiHost}}",
|
|
89
|
+
"secure": false,
|
|
90
|
+
"ws": true
|
|
91
|
+
}
|
|
92
|
+
],
|
|
79
93
|
open,
|
|
80
94
|
static: {
|
|
81
95
|
directory: join(__dirname, 'public'),
|
|
@@ -89,6 +89,7 @@
|
|
|
89
89
|
"lint-staged": "^12.4.1"
|
|
90
90
|
},
|
|
91
91
|
"dependencies": {
|
|
92
|
+
"@genesislcap/foundation-auth": "{{versions.UI}}",
|
|
92
93
|
"@genesislcap/foundation-comms": "{{versions.UI}}",
|
|
93
94
|
"@genesislcap/foundation-entity-management": "{{versions.UI}}",
|
|
94
95
|
"@genesislcap/foundation-events": "{{versions.UI}}",
|
|
@@ -117,6 +118,7 @@
|
|
|
117
118
|
"tslib": "^2.3.1"
|
|
118
119
|
},
|
|
119
120
|
"overrides": {
|
|
121
|
+
"@genesislcap/foundation-auth": "{{versions.UI}}",
|
|
120
122
|
"@genesislcap/foundation-comms": "{{versions.UI}}",
|
|
121
123
|
"@genesislcap/foundation-entity-management": "{{versions.UI}}",
|
|
122
124
|
"@genesislcap/foundation-events": "{{versions.UI}}",
|
|
@@ -139,6 +141,7 @@
|
|
|
139
141
|
"@genesislcap/g2plot-chart": "{{versions.UI}}",
|
|
140
142
|
"@genesislcap/rapid-design-system": "{{versions.UI}}",
|
|
141
143
|
"@genesislcap/rapid-grid-pro": "{{versions.UI}}",
|
|
142
|
-
"@genesislcap/web-core": "{{versions.UI}}"
|
|
144
|
+
"@genesislcap/web-core": "{{versions.UI}}",
|
|
145
|
+
"typescript": "5.6.3"
|
|
143
146
|
}
|
|
144
147
|
}
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { getUser, navigateTo } from '@genesislcap/foundation-auth';
|
|
2
|
+
import { Auth, Connect } from '@genesislcap/foundation-comms';
|
|
3
3
|
import { FoundationRouterConfiguration } from '@genesislcap/foundation-ui';
|
|
4
|
-
import { PUBLIC_PATH } from '@genesislcap/foundation-utils';
|
|
5
|
-
import { NavigationPhase, optional, Route } from '@genesislcap/web-core';
|
|
4
|
+
import { GENESIS_SOCKET_URL, PUBLIC_PATH } from '@genesislcap/foundation-utils';
|
|
6
5
|
import { defaultLayout, loginLayout } from '../layouts';
|
|
7
|
-
import { logger } from '../utils';
|
|
8
|
-
{{#each routes}}
|
|
9
|
-
import { {{pascalCase this.name}} } from './{{kebabCase this.name}}/{{kebabCase this.name}}';
|
|
10
|
-
{{/each}}
|
|
11
6
|
import { NotFound } from './not-found/not-found';
|
|
12
7
|
import { defaultNotPermittedRoute, NotPermitted } from './not-permitted/not-permitted';
|
|
13
8
|
import { LoginSettings } from './types';
|
|
9
|
+
{{#each routes}}
|
|
10
|
+
import { {{pascalCase this.name}} } from './{{kebabCase this.name}}/{{kebabCase this.name}}';
|
|
11
|
+
{{/each}}
|
|
14
12
|
|
|
15
13
|
// eslint-disable-next-line
|
|
16
14
|
declare var ENABLE_SSO: string;
|
|
@@ -29,17 +27,13 @@ const ssoSettings =
|
|
|
29
27
|
const publicPath = typeof PUBLIC_PATH !== 'undefined' ? PUBLIC_PATH : '';
|
|
30
28
|
|
|
31
29
|
export class MainRouterConfig extends FoundationRouterConfiguration<LoginSettings> {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
@Session private session: Session,
|
|
35
|
-
@optional(LoginConfig)
|
|
36
|
-
private loginConfig: LoginConfig = { ...defaultLoginConfig, autoAuth: true, autoConnect: true },
|
|
37
|
-
) {
|
|
38
|
-
super();
|
|
39
|
-
}
|
|
30
|
+
@Connect private connect: Connect;
|
|
31
|
+
@Auth private auth: Auth;
|
|
40
32
|
|
|
41
33
|
async configure() {
|
|
42
34
|
this.configureAnalytics();
|
|
35
|
+
this.configureRoutePermittedChecks();
|
|
36
|
+
this.configureFallbackRouteDefinition();
|
|
43
37
|
this.title = '{{capitalCase appName}}';
|
|
44
38
|
this.defaultLayout = defaultLayout;
|
|
45
39
|
|
|
@@ -52,22 +46,31 @@ export class MainRouterConfig extends FoundationRouterConfiguration<LoginSetting
|
|
|
52
46
|
name: 'login',
|
|
53
47
|
title: 'Login',
|
|
54
48
|
element: async () => {
|
|
55
|
-
const { configure,
|
|
56
|
-
|
|
57
|
-
'@genesislcap/foundation-login'
|
|
49
|
+
const { configure, defaultAuthConfig } = await import(
|
|
50
|
+
'@genesislcap/foundation-auth/config'
|
|
58
51
|
);
|
|
59
|
-
configure(
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
52
|
+
return configure({
|
|
53
|
+
omitRoutes: ['request-account', 'forgot-password'],
|
|
54
|
+
fields: {
|
|
55
|
+
...defaultAuthConfig.fields,
|
|
56
|
+
username: {
|
|
57
|
+
...defaultAuthConfig.fields.username,
|
|
58
|
+
pattern: '^[a-zA-Z0-9.@_:-]*$',
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
hostPath: this.loginPath,
|
|
62
|
+
postLoginRedirect: async () => {
|
|
63
|
+
await this.connect.connect(GENESIS_SOCKET_URL);
|
|
64
|
+
navigateTo(getUser().lastPath() ?? publicPath + '{{kebabCase routes.[0].name}}');
|
|
65
|
+
},
|
|
66
|
+
postLogoutRedirect: () => {
|
|
67
|
+
if (this.connect.isConnected) {
|
|
68
|
+
this.connect.disconnect();
|
|
69
|
+
}
|
|
70
|
+
defaultAuthConfig.postLogoutRedirect();
|
|
71
|
+
},
|
|
63
72
|
...ssoSettings,
|
|
64
73
|
});
|
|
65
|
-
return define({
|
|
66
|
-
name: `{{rootElement}}-login`,
|
|
67
|
-
/**
|
|
68
|
-
* You can augment the template and styles here when needed.
|
|
69
|
-
*/
|
|
70
|
-
});
|
|
71
74
|
},
|
|
72
75
|
layout: loginLayout,
|
|
73
76
|
settings: { public: true },
|
|
@@ -103,70 +106,22 @@ export class MainRouterConfig extends FoundationRouterConfiguration<LoginSetting
|
|
|
103
106
|
{{/each}}
|
|
104
107
|
);
|
|
105
108
|
|
|
106
|
-
/**
|
|
107
|
-
* Example of a FallbackRouteDefinition
|
|
108
|
-
*/
|
|
109
|
-
this.routes.fallback(() =>
|
|
110
|
-
this.auth.isLoggedIn ? { redirect: 'not-found' } : { redirect: authPath },
|
|
111
|
-
);
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Example of a NavigationContributor
|
|
115
|
-
*/
|
|
116
109
|
this.contributors.push({
|
|
117
110
|
navigate: async (phase) => {
|
|
118
111
|
const settings = phase.route.settings;
|
|
119
112
|
|
|
120
113
|
/**
|
|
121
|
-
* If
|
|
114
|
+
* If the route is public or the user is authenticated don't block
|
|
122
115
|
*/
|
|
123
|
-
if (settings
|
|
116
|
+
if (settings?.public || this.user.isAuthenticated) {
|
|
124
117
|
return;
|
|
125
118
|
}
|
|
126
119
|
|
|
127
120
|
/**
|
|
128
|
-
*
|
|
121
|
+
* Otherwise route them to login
|
|
129
122
|
*/
|
|
130
|
-
|
|
131
|
-
this.redirectIfNotPermitted(settings, phase);
|
|
132
|
-
return;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* If allowAutoAuth and session is valid try to connect+auto-login
|
|
137
|
-
*/
|
|
138
|
-
if (this.loginConfig.autoAuth && (await this.reAuthFromSession(settings, phase))) {
|
|
139
|
-
return;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Otherwise route them somewhere, like to a login
|
|
144
|
-
*/
|
|
145
|
-
phase.cancel(() => {
|
|
146
|
-
this.session.captureReturnUrl();
|
|
147
|
-
Route.name.replace(phase.router, authPath);
|
|
148
|
-
});
|
|
123
|
+
this.navigationPhaseLoginRedirect(phase);
|
|
149
124
|
},
|
|
150
125
|
});
|
|
151
126
|
}
|
|
152
|
-
|
|
153
|
-
private async reAuthFromSession(settings: LoginSettings, phase: NavigationPhase) {
|
|
154
|
-
return this.auth.reAuthFromSession().then((authenticated) => {
|
|
155
|
-
logger.info(`reAuthFromSession. authenticated: ${authenticated}`);
|
|
156
|
-
if (authenticated) {
|
|
157
|
-
this.redirectIfNotPermitted(settings, phase);
|
|
158
|
-
}
|
|
159
|
-
return authenticated;
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
private redirectIfNotPermitted(settings: LoginSettings, phase: NavigationPhase) {
|
|
164
|
-
const { path } = phase.route.endpoint;
|
|
165
|
-
if (settings?.isPermitted && !settings.isPermitted()) {
|
|
166
|
-
logger.warn(`Not permitted - Redirecting URL from ${path} to ${defaultNotPermittedRoute}.`);
|
|
167
|
-
phase.cancel(() => {
|
|
168
|
-
Route.name.replace(phase.router, defaultNotPermittedRoute);
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
127
|
}
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
distributionBase=GRADLE_USER_HOME
|
|
2
2
|
distributionPath=wrapper/dists
|
|
3
|
-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.
|
|
3
|
+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
|
|
4
4
|
networkTimeout=10000
|
|
5
5
|
validateDistributionUrl=true
|
|
6
6
|
zipStoreBase=GRADLE_USER_HOME
|
package/gradlew
CHANGED
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
# See the License for the specific language governing permissions and
|
|
16
16
|
# limitations under the License.
|
|
17
17
|
#
|
|
18
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
19
|
+
#
|
|
18
20
|
|
|
19
21
|
##############################################################################
|
|
20
22
|
#
|
|
@@ -55,7 +57,7 @@
|
|
|
55
57
|
# Darwin, MinGW, and NonStop.
|
|
56
58
|
#
|
|
57
59
|
# (3) This script is generated from the Groovy template
|
|
58
|
-
# https://github.com/gradle/gradle/blob/HEAD/
|
|
60
|
+
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
|
59
61
|
# within the Gradle project.
|
|
60
62
|
#
|
|
61
63
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
|
@@ -84,7 +86,8 @@ done
|
|
|
84
86
|
# shellcheck disable=SC2034
|
|
85
87
|
APP_BASE_NAME=${0##*/}
|
|
86
88
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
|
87
|
-
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null &&
|
|
89
|
+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
|
90
|
+
' "$PWD" ) || exit
|
|
88
91
|
|
|
89
92
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
|
90
93
|
MAX_FD=maximum
|
|
@@ -145,7 +148,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
|
|
145
148
|
case $MAX_FD in #(
|
|
146
149
|
max*)
|
|
147
150
|
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
|
148
|
-
# shellcheck disable=SC3045
|
|
151
|
+
# shellcheck disable=SC2039,SC3045
|
|
149
152
|
MAX_FD=$( ulimit -H -n ) ||
|
|
150
153
|
warn "Could not query maximum file descriptor limit"
|
|
151
154
|
esac
|
|
@@ -153,7 +156,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
|
|
153
156
|
'' | soft) :;; #(
|
|
154
157
|
*)
|
|
155
158
|
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
|
156
|
-
# shellcheck disable=SC3045
|
|
159
|
+
# shellcheck disable=SC2039,SC3045
|
|
157
160
|
ulimit -n "$MAX_FD" ||
|
|
158
161
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
|
159
162
|
esac
|
|
@@ -202,11 +205,11 @@ fi
|
|
|
202
205
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
203
206
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|
204
207
|
|
|
205
|
-
# Collect all arguments for the java command
|
|
206
|
-
# *
|
|
207
|
-
#
|
|
208
|
-
#
|
|
209
|
-
#
|
|
208
|
+
# Collect all arguments for the java command:
|
|
209
|
+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
|
210
|
+
# and any embedded shellness will be escaped.
|
|
211
|
+
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
|
212
|
+
# treated as '${Hostname}' itself on the command line.
|
|
210
213
|
|
|
211
214
|
set -- \
|
|
212
215
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
package/gradlew.bat
CHANGED
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
@rem See the License for the specific language governing permissions and
|
|
14
14
|
@rem limitations under the License.
|
|
15
15
|
@rem
|
|
16
|
+
@rem SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
@rem
|
|
16
18
|
|
|
17
19
|
@if "%DEBUG%"=="" @echo off
|
|
18
20
|
@rem ##########################################################################
|
|
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
|
|
|
43
45
|
%JAVA_EXE% -version >NUL 2>&1
|
|
44
46
|
if %ERRORLEVEL% equ 0 goto execute
|
|
45
47
|
|
|
46
|
-
echo.
|
|
47
|
-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
|
48
|
-
echo.
|
|
49
|
-
echo Please set the JAVA_HOME variable in your environment to match the
|
|
50
|
-
echo location of your Java installation.
|
|
48
|
+
echo. 1>&2
|
|
49
|
+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
|
50
|
+
echo. 1>&2
|
|
51
|
+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
|
52
|
+
echo location of your Java installation. 1>&2
|
|
51
53
|
|
|
52
54
|
goto fail
|
|
53
55
|
|
|
@@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
|
|
57
59
|
|
|
58
60
|
if exist "%JAVA_EXE%" goto execute
|
|
59
61
|
|
|
60
|
-
echo.
|
|
61
|
-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
|
62
|
-
echo.
|
|
63
|
-
echo Please set the JAVA_HOME variable in your environment to match the
|
|
64
|
-
echo location of your Java installation.
|
|
62
|
+
echo. 1>&2
|
|
63
|
+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
|
64
|
+
echo. 1>&2
|
|
65
|
+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
|
66
|
+
echo location of your Java installation. 1>&2
|
|
65
67
|
|
|
66
68
|
goto fail
|
|
67
69
|
|
package/package.json
CHANGED
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
distributionBase=GRADLE_USER_HOME
|
|
2
2
|
distributionPath=wrapper/dists
|
|
3
|
-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.
|
|
3
|
+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
|
|
4
4
|
networkTimeout=10000
|
|
5
5
|
validateDistributionUrl=true
|
|
6
6
|
zipStoreBase=GRADLE_USER_HOME
|
package/server/gradlew
CHANGED
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
# See the License for the specific language governing permissions and
|
|
16
16
|
# limitations under the License.
|
|
17
17
|
#
|
|
18
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
19
|
+
#
|
|
18
20
|
|
|
19
21
|
##############################################################################
|
|
20
22
|
#
|
|
@@ -55,7 +57,7 @@
|
|
|
55
57
|
# Darwin, MinGW, and NonStop.
|
|
56
58
|
#
|
|
57
59
|
# (3) This script is generated from the Groovy template
|
|
58
|
-
# https://github.com/gradle/gradle/blob/HEAD/
|
|
60
|
+
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
|
59
61
|
# within the Gradle project.
|
|
60
62
|
#
|
|
61
63
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
|
@@ -84,7 +86,8 @@ done
|
|
|
84
86
|
# shellcheck disable=SC2034
|
|
85
87
|
APP_BASE_NAME=${0##*/}
|
|
86
88
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
|
87
|
-
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null &&
|
|
89
|
+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
|
90
|
+
' "$PWD" ) || exit
|
|
88
91
|
|
|
89
92
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
|
90
93
|
MAX_FD=maximum
|
|
@@ -145,7 +148,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
|
|
145
148
|
case $MAX_FD in #(
|
|
146
149
|
max*)
|
|
147
150
|
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
|
148
|
-
# shellcheck disable=SC3045
|
|
151
|
+
# shellcheck disable=SC2039,SC3045
|
|
149
152
|
MAX_FD=$( ulimit -H -n ) ||
|
|
150
153
|
warn "Could not query maximum file descriptor limit"
|
|
151
154
|
esac
|
|
@@ -153,7 +156,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
|
|
153
156
|
'' | soft) :;; #(
|
|
154
157
|
*)
|
|
155
158
|
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
|
156
|
-
# shellcheck disable=SC3045
|
|
159
|
+
# shellcheck disable=SC2039,SC3045
|
|
157
160
|
ulimit -n "$MAX_FD" ||
|
|
158
161
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
|
159
162
|
esac
|
|
@@ -202,11 +205,11 @@ fi
|
|
|
202
205
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
203
206
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|
204
207
|
|
|
205
|
-
# Collect all arguments for the java command
|
|
206
|
-
# *
|
|
207
|
-
#
|
|
208
|
-
#
|
|
209
|
-
#
|
|
208
|
+
# Collect all arguments for the java command:
|
|
209
|
+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
|
210
|
+
# and any embedded shellness will be escaped.
|
|
211
|
+
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
|
212
|
+
# treated as '${Hostname}' itself on the command line.
|
|
210
213
|
|
|
211
214
|
set -- \
|
|
212
215
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
package/server/gradlew.bat
CHANGED
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
@rem See the License for the specific language governing permissions and
|
|
14
14
|
@rem limitations under the License.
|
|
15
15
|
@rem
|
|
16
|
+
@rem SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
@rem
|
|
16
18
|
|
|
17
19
|
@if "%DEBUG%"=="" @echo off
|
|
18
20
|
@rem ##########################################################################
|
|
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
|
|
|
43
45
|
%JAVA_EXE% -version >NUL 2>&1
|
|
44
46
|
if %ERRORLEVEL% equ 0 goto execute
|
|
45
47
|
|
|
46
|
-
echo.
|
|
47
|
-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
|
48
|
-
echo.
|
|
49
|
-
echo Please set the JAVA_HOME variable in your environment to match the
|
|
50
|
-
echo location of your Java installation.
|
|
48
|
+
echo. 1>&2
|
|
49
|
+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
|
50
|
+
echo. 1>&2
|
|
51
|
+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
|
52
|
+
echo location of your Java installation. 1>&2
|
|
51
53
|
|
|
52
54
|
goto fail
|
|
53
55
|
|
|
@@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
|
|
57
59
|
|
|
58
60
|
if exist "%JAVA_EXE%" goto execute
|
|
59
61
|
|
|
60
|
-
echo.
|
|
61
|
-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
|
62
|
-
echo.
|
|
63
|
-
echo Please set the JAVA_HOME variable in your environment to match the
|
|
64
|
-
echo location of your Java installation.
|
|
62
|
+
echo. 1>&2
|
|
63
|
+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
|
64
|
+
echo. 1>&2
|
|
65
|
+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
|
66
|
+
echo location of your Java installation. 1>&2
|
|
65
67
|
|
|
66
68
|
goto fail
|
|
67
69
|
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import {configure, define} from '@genesislcap/foundation-login';
|
|
2
|
-
import type { Router } from '@angular/router';
|
|
3
|
-
import { getUser } from '@genesislcap/foundation-user';
|
|
4
|
-
import { css, DI } from '@genesislcap/web-core';
|
|
5
|
-
import { AUTH_PATH } from '../app.config';
|
|
6
|
-
import logo from '../../assets/logo.svg';
|
|
7
|
-
|
|
8
|
-
// eslint-disable-next-line
|
|
9
|
-
declare var ENABLE_SSO: boolean;
|
|
10
|
-
|
|
11
|
-
const ssoSettings =
|
|
12
|
-
typeof ENABLE_SSO !== 'undefined' && ENABLE_SSO === true
|
|
13
|
-
? {
|
|
14
|
-
autoAuth: true,
|
|
15
|
-
sso: {
|
|
16
|
-
toggled: true,
|
|
17
|
-
identityProvidersPath: 'sso/list',
|
|
18
|
-
},
|
|
19
|
-
}
|
|
20
|
-
: {};
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Configure the micro frontend
|
|
24
|
-
*/
|
|
25
|
-
export const configureFoundationLogin = ({
|
|
26
|
-
router,
|
|
27
|
-
}: {
|
|
28
|
-
router: Router;
|
|
29
|
-
}) => {
|
|
30
|
-
configure(DI.getOrCreateDOMContainer(), {
|
|
31
|
-
autoConnect: true,
|
|
32
|
-
hostPath: AUTH_PATH,
|
|
33
|
-
redirectHandler: () => {
|
|
34
|
-
router.navigate(['{{kebabCase routes.[0].name}}'])
|
|
35
|
-
},
|
|
36
|
-
...ssoSettings,
|
|
37
|
-
logo: css `
|
|
38
|
-
content: url("${logo}");
|
|
39
|
-
`,
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
return define({
|
|
43
|
-
name: `client-app-login`,
|
|
44
|
-
});
|
|
45
|
-
}
|