@rxap/plugin-angular 19.2.0-dev.4 → 19.2.0-dev.6
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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [19.2.0-dev.6](https://gitlab.com/rxap/packages/compare/@rxap/plugin-angular@19.2.0-dev.5...@rxap/plugin-angular@19.2.0-dev.6) (2024-06-25)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @rxap/plugin-angular
|
|
9
|
+
|
|
10
|
+
# [19.2.0-dev.5](https://gitlab.com/rxap/packages/compare/@rxap/plugin-angular@19.2.0-dev.4...@rxap/plugin-angular@19.2.0-dev.5) (2024-06-25)
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- use MinimalLayout for mfe hosts ([5a0b053](https://gitlab.com/rxap/packages/commit/5a0b05352ebf206c4987b6507be94616a11d90df))
|
|
15
|
+
|
|
6
16
|
# [19.2.0-dev.4](https://gitlab.com/rxap/packages/compare/@rxap/plugin-angular@19.2.0-dev.3...@rxap/plugin-angular@19.2.0-dev.4) (2024-06-21)
|
|
7
17
|
|
|
8
18
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "19.2.0-dev.
|
|
2
|
+
"version": "19.2.0-dev.6",
|
|
3
3
|
"name": "@rxap/plugin-angular",
|
|
4
4
|
"license": "GPL-3.0-or-later",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@nx/angular": "19.3.0",
|
|
7
7
|
"@nx/devkit": "19.3.0",
|
|
8
|
-
"@rxap/plugin-application": "^19.0.4-dev.
|
|
9
|
-
"@rxap/plugin-library": "^19.3.0-dev.
|
|
10
|
-
"@rxap/plugin-localazy": "^19.0.3-dev.
|
|
11
|
-
"@rxap/plugin-utilities": "^19.0.4-dev.
|
|
12
|
-
"@rxap/ts-morph": "^1.4.1-dev.
|
|
8
|
+
"@rxap/plugin-application": "^19.0.4-dev.4",
|
|
9
|
+
"@rxap/plugin-library": "^19.3.0-dev.3",
|
|
10
|
+
"@rxap/plugin-localazy": "^19.0.3-dev.4",
|
|
11
|
+
"@rxap/plugin-utilities": "^19.0.4-dev.4",
|
|
12
|
+
"@rxap/ts-morph": "^1.4.1-dev.3",
|
|
13
13
|
"@rxap/utilities": "^16.2.4-dev.1",
|
|
14
|
-
"@rxap/workspace-ts-morph": "^19.1.1-dev.
|
|
15
|
-
"@rxap/workspace-utilities": "^19.3.0-dev.
|
|
14
|
+
"@rxap/workspace-ts-morph": "^19.1.1-dev.5",
|
|
15
|
+
"@rxap/workspace-utilities": "^19.3.0-dev.3",
|
|
16
16
|
"colors": "1.4.0",
|
|
17
17
|
"semver": "7.5.3",
|
|
18
18
|
"tailwindcss": "^3.4.4",
|
|
@@ -54,6 +54,6 @@
|
|
|
54
54
|
},
|
|
55
55
|
"schematics": "./generators.json",
|
|
56
56
|
"type": "commonjs",
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "14fbce47d37ec82f9e608848cba8a194a6829775",
|
|
58
58
|
"main": "./src/index.js"
|
|
59
59
|
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`generateMonolithic() should generate a monolithic application configuration 1`] = `
|
|
4
|
+
[
|
|
5
|
+
"app.navigation.ts",
|
|
6
|
+
"app.routes.ts",
|
|
7
|
+
"layout.routes.ts",
|
|
8
|
+
]
|
|
9
|
+
`;
|
|
10
|
+
|
|
11
|
+
exports[`generateMonolithic() should generate a monolithic application configuration 2`] = `
|
|
12
|
+
"import { Route } from '@angular/router';
|
|
13
|
+
import { STATUS_CHECK_ROUTE } from '@rxap/ngx-status-check';
|
|
14
|
+
|
|
15
|
+
export const appRoutes: Route[] = [{
|
|
16
|
+
path: '',
|
|
17
|
+
loadChildren: () => import('./layout.routes')
|
|
18
|
+
}, STATUS_CHECK_ROUTE,{
|
|
19
|
+
path: '**',
|
|
20
|
+
redirectTo: ''
|
|
21
|
+
}];
|
|
22
|
+
|
|
23
|
+
export default appRoutes;
|
|
24
|
+
"
|
|
25
|
+
`;
|
|
26
|
+
|
|
27
|
+
exports[`generateMonolithic() should generate a monolithic application configuration 3`] = `
|
|
28
|
+
"import { provideLayout, withNavigationConfig, widthDefaultHeaderComponent, LayoutComponent } from '@rxap/layout';
|
|
29
|
+
import { StatusCheckGuard } from '@rxap/ngx-status-check';
|
|
30
|
+
import { APP_NAVIGATION } from './app.navigation';
|
|
31
|
+
import { Route } from '@angular/router';
|
|
32
|
+
|
|
33
|
+
export const ROUTES: Route[] = [
|
|
34
|
+
{
|
|
35
|
+
path: '',
|
|
36
|
+
component: LayoutComponent,
|
|
37
|
+
children: [
|
|
38
|
+
{
|
|
39
|
+
path: '**',
|
|
40
|
+
redirectTo: ''
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
providers: [
|
|
44
|
+
provideLayout(
|
|
45
|
+
withNavigationConfig(APP_NAVIGATION),
|
|
46
|
+
widthDefaultHeaderComponent(),
|
|
47
|
+
)
|
|
48
|
+
],
|
|
49
|
+
canActivateChild: [StatusCheckGuard]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
path: '**',
|
|
53
|
+
redirectTo: ''
|
|
54
|
+
}
|
|
55
|
+
];
|
|
56
|
+
|
|
57
|
+
export default ROUTES;
|
|
58
|
+
"
|
|
59
|
+
`;
|
|
60
|
+
|
|
61
|
+
exports[`generateMonolithic() should generate a monolithic application configuration 4`] = `
|
|
62
|
+
"import { NavigationWithInserts, RXAP_NAVIGATION_CONFIG } from '@rxap/layout';
|
|
63
|
+
|
|
64
|
+
export const APP_NAVIGATION: () => NavigationWithInserts = () => [];
|
|
65
|
+
export const APP_NAVIGATION_PROVIDER = {
|
|
66
|
+
provide: RXAP_NAVIGATION_CONFIG,
|
|
67
|
+
useValue: APP_NAVIGATION
|
|
68
|
+
};
|
|
69
|
+
"
|
|
70
|
+
`;
|
|
71
|
+
|
|
72
|
+
exports[`generateMonolithic() should use MinimalLayoutComponent and no navigation when moduleFederation is host 1`] = `
|
|
73
|
+
[
|
|
74
|
+
"app.navigation.ts",
|
|
75
|
+
"app.routes.ts",
|
|
76
|
+
"layout.routes.ts",
|
|
77
|
+
]
|
|
78
|
+
`;
|
|
79
|
+
|
|
80
|
+
exports[`generateMonolithic() should use MinimalLayoutComponent and no navigation when moduleFederation is host 2`] = `
|
|
81
|
+
"import { Route } from '@angular/router';
|
|
82
|
+
import { STATUS_CHECK_ROUTE } from '@rxap/ngx-status-check';
|
|
83
|
+
|
|
84
|
+
export const appRoutes: Route[] = [{
|
|
85
|
+
path: '',
|
|
86
|
+
loadChildren: () => import('./layout.routes')
|
|
87
|
+
}, STATUS_CHECK_ROUTE,{
|
|
88
|
+
path: '**',
|
|
89
|
+
redirectTo: ''
|
|
90
|
+
}];
|
|
91
|
+
|
|
92
|
+
export default appRoutes;
|
|
93
|
+
"
|
|
94
|
+
`;
|
|
95
|
+
|
|
96
|
+
exports[`generateMonolithic() should use MinimalLayoutComponent and no navigation when moduleFederation is host 3`] = `
|
|
97
|
+
"import { provideLayout, widthDefaultHeaderComponent, MinimalLayoutComponent } from '@rxap/layout';
|
|
98
|
+
import { StatusCheckGuard } from '@rxap/ngx-status-check';
|
|
99
|
+
import { Route } from '@angular/router';
|
|
100
|
+
|
|
101
|
+
export const ROUTES: Route[] = [
|
|
102
|
+
{
|
|
103
|
+
path: '',
|
|
104
|
+
component: MinimalLayoutComponent,
|
|
105
|
+
children: [
|
|
106
|
+
{
|
|
107
|
+
path: '**',
|
|
108
|
+
redirectTo: ''
|
|
109
|
+
}
|
|
110
|
+
],
|
|
111
|
+
providers: [
|
|
112
|
+
provideLayout(
|
|
113
|
+
widthDefaultHeaderComponent(),
|
|
114
|
+
)
|
|
115
|
+
],
|
|
116
|
+
canActivateChild: [StatusCheckGuard]
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
path: '**',
|
|
120
|
+
redirectTo: ''
|
|
121
|
+
}
|
|
122
|
+
];
|
|
123
|
+
|
|
124
|
+
export default ROUTES;
|
|
125
|
+
"
|
|
126
|
+
`;
|
|
127
|
+
|
|
128
|
+
exports[`generateMonolithic() should use MinimalLayoutComponent and no navigation when moduleFederation is host 4`] = `
|
|
129
|
+
"import { NavigationWithInserts, RXAP_NAVIGATION_CONFIG } from '@rxap/layout';
|
|
130
|
+
|
|
131
|
+
export const APP_NAVIGATION: () => NavigationWithInserts = () => [];
|
|
132
|
+
export const APP_NAVIGATION_PROVIDER = {
|
|
133
|
+
provide: RXAP_NAVIGATION_CONFIG,
|
|
134
|
+
useValue: APP_NAVIGATION
|
|
135
|
+
};
|
|
136
|
+
"
|
|
137
|
+
`;
|
|
@@ -18,7 +18,10 @@ function generateMonolithic(tree, projectName, project, options) {
|
|
|
18
18
|
project: projectName,
|
|
19
19
|
}, (_, [appSourceFile, layoutSourceFile, navigationSourceFile]) => {
|
|
20
20
|
var _a;
|
|
21
|
-
(0, ts_morph_1.CoerceLayoutRoutes)(layoutSourceFile
|
|
21
|
+
(0, ts_morph_1.CoerceLayoutRoutes)(layoutSourceFile, {
|
|
22
|
+
component: options.moduleFederation === 'host' ? 'MinimalLayoutComponent' : 'LayoutComponent',
|
|
23
|
+
withNavigation: options.moduleFederation !== 'host',
|
|
24
|
+
});
|
|
22
25
|
(0, ts_morph_1.CoerceAppRoutes)(appSourceFile, {
|
|
23
26
|
itemList: [
|
|
24
27
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-monolithic.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/angular/src/generators/init-application/generate-monolithic.ts"],"names":[],"mappings":";;;AAIA,6CAIwB;AACxB,iEAA0E;AAC1E,mEAAuD;AACvD,+BAA4B;AAG5B,SAAgB,kBAAkB,CAAC,IAAU,EAAE,WAAmB,EAAE,OAA6B,EAAE,OAAuC;IAExI,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,6CAA8C,WAAY,EAAE,CAAC,CAAC;IAChF,CAAC;IAED,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAA,WAAI,EAAC,OAAO,CAAC,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC;QACjE,IAAI,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC;YAC5B,IAAA,gCAAU,EAAC,IAAI,EAAE,IAAA,WAAI,EAAC,OAAO,CAAC,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,CAAE,EAAE,IAAI,CAAC,CAAC;QACjG,CAAC;IACH,CAAC;IAED,IAAA,mDAA8B,EAAC,IAAI,EAAE;QACnC,OAAO,EAAE,WAAW;KACrB,EAAE,CAAC,CAAC,EAAE,CAAE,aAAa,EAAE,gBAAgB,EAAE,oBAAoB,CAAE,EAAE,EAAE;;QAClE,IAAA,6BAAkB,EAAC,gBAAgB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"generate-monolithic.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/angular/src/generators/init-application/generate-monolithic.ts"],"names":[],"mappings":";;;AAIA,6CAIwB;AACxB,iEAA0E;AAC1E,mEAAuD;AACvD,+BAA4B;AAG5B,SAAgB,kBAAkB,CAAC,IAAU,EAAE,WAAmB,EAAE,OAA6B,EAAE,OAAuC;IAExI,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,6CAA8C,WAAY,EAAE,CAAC,CAAC;IAChF,CAAC;IAED,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAA,WA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