@rxap/plugin-angular 16.2.0-dev.8 → 16.2.0
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 +105 -0
- package/README.md +15 -1
- package/generators.json +10 -0
- package/package.json +27 -22
- package/src/generators/convert-to-buildable-library/generator.d.ts +4 -0
- package/src/generators/convert-to-buildable-library/generator.js +89 -0
- package/src/generators/convert-to-buildable-library/generator.js.map +1 -0
- package/src/generators/convert-to-buildable-library/schema.d.ts +3 -0
- package/src/generators/convert-to-buildable-library/schema.json +12 -0
- package/src/generators/init/generator.js +4 -0
- package/src/generators/init/generator.js.map +1 -1
- package/src/generators/init/schema.d.ts +1 -0
- package/src/generators/init/schema.json +4 -0
- package/src/generators/init-application/coerce-project.d.ts +4 -0
- package/src/generators/init-application/coerce-project.js +53 -0
- package/src/generators/init-application/coerce-project.js.map +1 -0
- package/src/generators/init-application/files/mfe-remote/Dockerfile +29 -0
- package/src/generators/init-application/files/mfe-remote/index.html.template +165 -0
- package/src/generators/init-application/files/root/favicon.ico +0 -0
- package/src/generators/init-application/files/root/styles.scss.template +3 -0
- package/src/generators/init-application/files/shared/ngsw-config.json +11 -1
- package/src/generators/init-application/files/styles/_fonts.scss +2 -0
- package/src/generators/init-application/generate-monolithic.js +2 -7
- package/src/generators/init-application/generate-monolithic.js.map +1 -1
- package/src/generators/init-application/generator.js +326 -73
- package/src/generators/init-application/generator.js.map +1 -1
- package/src/generators/init-application/schema.d.ts +12 -0
- package/src/generators/init-application/schema.json +54 -26
- package/src/generators/init-component/generator.d.ts +4 -0
- package/src/generators/init-component/generator.js +71 -0
- package/src/generators/init-component/generator.js.map +1 -0
- package/src/generators/init-component/index.d.ts +2 -0
- package/src/generators/init-component/index.js +7 -0
- package/src/generators/init-component/index.js.map +1 -0
- package/src/generators/init-component/schema.d.ts +25 -0
- package/src/generators/init-component/schema.json +141 -0
- package/src/generators/init-feature/generator.js +5 -1
- package/src/generators/init-feature/generator.js.map +1 -1
- package/src/generators/init-feature/schema.d.ts +2 -1
- package/src/generators/init-feature/schema.json +4 -0
- package/src/generators/init-feature-library/generator.d.ts +4 -0
- package/src/generators/init-feature-library/generator.js +12 -0
- package/src/generators/init-feature-library/generator.js.map +1 -0
- package/src/generators/init-feature-library/schema.d.ts +10 -0
- package/src/generators/init-feature-library/schema.json +222 -0
- package/src/generators/init-library/generator.js +67 -54
- package/src/generators/init-library/generator.js.map +1 -1
- package/src/generators/init-library/schema.d.ts +1 -1
- package/src/generators/init-library/schema.json +182 -150
- package/src/lib/coerce-test-setup.d.ts +2 -0
- package/src/lib/coerce-test-setup.js +40 -0
- package/src/lib/coerce-test-setup.js.map +1 -0
- package/src/generators/init-application/files/shared/assets/custom.svg +0 -1
- /package/src/generators/init-application/files/{monolithic → mfe-remote}/styles.scss.template +0 -0
- /package/src/generators/init-application/files/{monolithic → root}/index.html.template +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,111 @@
|
|
|
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
|
+
# [16.2.0](https://gitlab.com/rxap/packages/compare/@rxap/plugin-angular@16.2.0-dev.19...@rxap/plugin-angular@16.2.0) (2024-04-17)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @rxap/plugin-angular
|
|
9
|
+
|
|
10
|
+
# [16.2.0-dev.19](https://gitlab.com/rxap/packages/compare/@rxap/plugin-angular@16.2.0-dev.18...@rxap/plugin-angular@16.2.0-dev.19) (2024-04-16)
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- add serve-static target for incremental build ([6804e64](https://gitlab.com/rxap/packages/commit/6804e64c5373b4a35146eadc571cf8559e7e79e7))
|
|
15
|
+
|
|
16
|
+
# [16.2.0-dev.18](https://gitlab.com/rxap/packages/compare/@rxap/plugin-angular@16.2.0-dev.17...@rxap/plugin-angular@16.2.0-dev.18) (2024-04-16)
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
- use regex to check for existing imports ([f87a5a0](https://gitlab.com/rxap/packages/commit/f87a5a074cabb78f4bc4ded42cac3aae07d2e63e))
|
|
21
|
+
|
|
22
|
+
# [16.2.0-dev.17](https://gitlab.com/rxap/packages/compare/@rxap/plugin-angular@16.2.0-dev.16...@rxap/plugin-angular@16.2.0-dev.17) (2024-04-16)
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
- ensure the package json of buildable libs has private set to true ([ab19af4](https://gitlab.com/rxap/packages/commit/ab19af4f6d88456b33d7230a756f689f29a51770))
|
|
27
|
+
- resolve schema issue ([7ee6c3b](https://gitlab.com/rxap/packages/commit/7ee6c3b5d762c3125ef0462e5b76f78f945a189f))
|
|
28
|
+
- set default style to scss ([8ad40bf](https://gitlab.com/rxap/packages/commit/8ad40bf77a5041f42f2db13db4266fe8d1327a2a))
|
|
29
|
+
|
|
30
|
+
### Features
|
|
31
|
+
|
|
32
|
+
- add convert-to-buildable-library generator ([86e45d0](https://gitlab.com/rxap/packages/commit/86e45d0221bb1fbe35ecd1c79ddcea277edaf8fd))
|
|
33
|
+
- add incremental build option ([d26a938](https://gitlab.com/rxap/packages/commit/d26a938c7006822d50674e59d14ee3c1c0a9e5af))
|
|
34
|
+
|
|
35
|
+
# [16.2.0-dev.16](https://gitlab.com/rxap/packages/compare/@rxap/plugin-angular@16.2.0-dev.15...@rxap/plugin-angular@16.2.0-dev.16) (2024-04-15)
|
|
36
|
+
|
|
37
|
+
### Bug Fixes
|
|
38
|
+
|
|
39
|
+
- update tailwind and ng package check for buildable libraries ([9fcda25](https://gitlab.com/rxap/packages/commit/9fcda25dc5661f37a79b19adae3801ce774775c4))
|
|
40
|
+
|
|
41
|
+
# [16.2.0-dev.15](https://gitlab.com/rxap/packages/compare/@rxap/plugin-angular@16.2.0-dev.14...@rxap/plugin-angular@16.2.0-dev.15) (2024-04-12)
|
|
42
|
+
|
|
43
|
+
### Bug Fixes
|
|
44
|
+
|
|
45
|
+
- add index and scss files if not updated ([2a0d639](https://gitlab.com/rxap/packages/commit/2a0d639814d389ab3eb18601b88cdbe684228452))
|
|
46
|
+
- coerce the test setup file ([e30586b](https://gitlab.com/rxap/packages/commit/e30586b7f616d9f9e95b167ccbb10e4c9aebee94))
|
|
47
|
+
- preserve custom directory ([deecebb](https://gitlab.com/rxap/packages/commit/deecebbf21a796c327b5721dd7ce07e20038d4ad))
|
|
48
|
+
- use correct component path prefixes and option defaults ([4594d6a](https://gitlab.com/rxap/packages/commit/4594d6a1cbde8cdb52c8e73072a7a2ea67c77d7b))
|
|
49
|
+
|
|
50
|
+
### Features
|
|
51
|
+
|
|
52
|
+
- add init-component generator ([a023d64](https://gitlab.com/rxap/packages/commit/a023d6402b09cf049b82f70a4a1a1e0c2a1671ae))
|
|
53
|
+
- support option --skip-docker ([38341fc](https://gitlab.com/rxap/packages/commit/38341fcc50d2c705251630f6933ebd81829ed6f3))
|
|
54
|
+
|
|
55
|
+
# [16.2.0-dev.14](https://gitlab.com/rxap/packages/compare/@rxap/plugin-angular@16.2.0-dev.13...@rxap/plugin-angular@16.2.0-dev.14) (2024-04-10)
|
|
56
|
+
|
|
57
|
+
### Bug Fixes
|
|
58
|
+
|
|
59
|
+
- add stories and cy files to is config exclude ([d80af1b](https://gitlab.com/rxap/packages/commit/d80af1b770521cbab4a975e0140e5575c87a5f42))
|
|
60
|
+
- detected layout children array by component name ([0ca7179](https://gitlab.com/rxap/packages/commit/0ca7179bd81e3cbb7922eaca440de0fe18f460d6))
|
|
61
|
+
|
|
62
|
+
### Features
|
|
63
|
+
|
|
64
|
+
- add format files ([672c753](https://gitlab.com/rxap/packages/commit/672c7533b8b0248d19c9dc2ad4a203c482cfd9ae))
|
|
65
|
+
- add layoutRoutePath and standaloneImport options ([8ae83ff](https://gitlab.com/rxap/packages/commit/8ae83ff71d3793130df5e10f24113be6b1d791fd))
|
|
66
|
+
|
|
67
|
+
# [16.2.0-dev.13](https://gitlab.com/rxap/packages/compare/@rxap/plugin-angular@16.2.0-dev.12...@rxap/plugin-angular@16.2.0-dev.13) (2024-04-10)
|
|
68
|
+
|
|
69
|
+
### Bug Fixes
|
|
70
|
+
|
|
71
|
+
- check if entry component exists ([8f17628](https://gitlab.com/rxap/packages/commit/8f17628b790ccd3dca67f0fd88986126402e6fe1))
|
|
72
|
+
|
|
73
|
+
# [16.2.0-dev.12](https://gitlab.com/rxap/packages/compare/@rxap/plugin-angular@16.2.0-dev.11...@rxap/plugin-angular@16.2.0-dev.12) (2024-04-10)
|
|
74
|
+
|
|
75
|
+
### Bug Fixes
|
|
76
|
+
|
|
77
|
+
- add module federation tags to project ([fa1463f](https://gitlab.com/rxap/packages/commit/fa1463f9619eff98ab7bd3079bf1d7f722c77a41))
|
|
78
|
+
|
|
79
|
+
# [16.2.0-dev.11](https://gitlab.com/rxap/packages/compare/@rxap/plugin-angular@16.2.0-dev.10...@rxap/plugin-angular@16.2.0-dev.11) (2024-04-10)
|
|
80
|
+
|
|
81
|
+
### Bug Fixes
|
|
82
|
+
|
|
83
|
+
- add default files ([6fda47c](https://gitlab.com/rxap/packages/commit/6fda47c4cced3c736cc417022c96aaec617e9c31))
|
|
84
|
+
- add mfe remote dockerfile ([14214b0](https://gitlab.com/rxap/packages/commit/14214b0af43ebab65f1a44256a0dc07d8b5a7aa2))
|
|
85
|
+
- cleanup tsconfig paths ([2b6bf97](https://gitlab.com/rxap/packages/commit/2b6bf97d267569e322cb4808d86ed260d7fdcd89))
|
|
86
|
+
- only add localazy file if required ([9949bb2](https://gitlab.com/rxap/packages/commit/9949bb2b17cb976af449d85d3818b2773e47677c))
|
|
87
|
+
- use inline setup ([ec4b29f](https://gitlab.com/rxap/packages/commit/ec4b29f06431f9f8ffc05c0d4828cfd2546c0e3f))
|
|
88
|
+
- use utility function ([290ddbc](https://gitlab.com/rxap/packages/commit/290ddbcca380838c5e771ffe9f51e31a67e6ef1e))
|
|
89
|
+
|
|
90
|
+
### Features
|
|
91
|
+
|
|
92
|
+
- support coerce project ([c30defc](https://gitlab.com/rxap/packages/commit/c30defc08b09117d7b4b3931a372a1fd316d1b89))
|
|
93
|
+
- support module federation for remote ([266db9d](https://gitlab.com/rxap/packages/commit/266db9df0a2e3a0b446e218eb0ae8682f497b17c))
|
|
94
|
+
|
|
95
|
+
# [16.2.0-dev.10](https://gitlab.com/rxap/packages/compare/@rxap/plugin-angular@16.2.0-dev.9...@rxap/plugin-angular@16.2.0-dev.10) (2024-04-09)
|
|
96
|
+
|
|
97
|
+
### Bug Fixes
|
|
98
|
+
|
|
99
|
+
- add mfe defaults ([36cb0dc](https://gitlab.com/rxap/packages/commit/36cb0dc08d90e352070d23ebaf71f1a41e11e3a9))
|
|
100
|
+
|
|
101
|
+
### Features
|
|
102
|
+
|
|
103
|
+
- cleanup module federation application ([f04eac3](https://gitlab.com/rxap/packages/commit/f04eac34f463908b4d7670e6ab50f5989e41d495))
|
|
104
|
+
|
|
105
|
+
# [16.2.0-dev.9](https://gitlab.com/rxap/packages/compare/@rxap/plugin-angular@16.2.0-dev.8...@rxap/plugin-angular@16.2.0-dev.9) (2024-04-09)
|
|
106
|
+
|
|
107
|
+
### Features
|
|
108
|
+
|
|
109
|
+
- support module federation ([ae6aaa7](https://gitlab.com/rxap/packages/commit/ae6aaa734d95001c1b469c06fcfbe5e5ad01ee5c))
|
|
110
|
+
|
|
6
111
|
# [16.2.0-dev.8](https://gitlab.com/rxap/packages/compare/@rxap/plugin-angular@16.2.0-dev.7...@rxap/plugin-angular@16.2.0-dev.8) (2024-04-09)
|
|
7
112
|
|
|
8
113
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ yarn add @rxap/plugin-angular
|
|
|
19
19
|
```
|
|
20
20
|
**Install peer dependencies:**
|
|
21
21
|
```bash
|
|
22
|
-
yarn add @nx/angular@^16.10.0 @nx/devkit@^16.10.0 @rxap/plugin-application@^16.2.0
|
|
22
|
+
yarn add @nx/angular@^16.10.0 @nx/devkit@^16.10.0 @rxap/plugin-application@^16.2.0 @rxap/plugin-gitlab-ci@^16.2.0 @rxap/plugin-library@^16.1.0 @rxap/plugin-localazy@^16.1.1 @rxap/plugin-utilities@^16.2.0 @rxap/ts-morph@^1.1.0 @rxap/utilities@^16.1.0 @rxap/workspace-ts-morph@^16.1.0 @rxap/workspace-utilities@^16.1.0 nx@^16.10.0 ts-morph@^18.0.0 tslib@2.6.2
|
|
23
23
|
```
|
|
24
24
|
**Execute the init generator:**
|
|
25
25
|
```bash
|
|
@@ -69,6 +69,13 @@ yarn nx g @rxap/plugin-angular:schematic
|
|
|
69
69
|
yarn nx g @rxap/plugin-angular:init-feature
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
+
## init-component
|
|
73
|
+
> init-component generator
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
yarn nx g @rxap/plugin-angular:init-component
|
|
77
|
+
```
|
|
78
|
+
|
|
72
79
|
## init
|
|
73
80
|
> init generator
|
|
74
81
|
|
|
@@ -110,6 +117,13 @@ yarn nx g @rxap/plugin-angular:schematic
|
|
|
110
117
|
```bash
|
|
111
118
|
yarn nx g @rxap/plugin-angular:init-feature
|
|
112
119
|
```
|
|
120
|
+
|
|
121
|
+
## init-component
|
|
122
|
+
> init-component generator
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
yarn nx g @rxap/plugin-angular:init-component
|
|
126
|
+
```
|
|
113
127
|
# Executors
|
|
114
128
|
|
|
115
129
|
## tailwind
|
package/generators.json
CHANGED
|
@@ -29,6 +29,11 @@
|
|
|
29
29
|
"factory": "./src/generators/init-feature/generator",
|
|
30
30
|
"schema": "./src/generators/init-feature/schema.json",
|
|
31
31
|
"description": "init-feature generator"
|
|
32
|
+
},
|
|
33
|
+
"init-component": {
|
|
34
|
+
"factory": "./src/generators/init-component/generator",
|
|
35
|
+
"schema": "./src/generators/init-component/schema.json",
|
|
36
|
+
"description": "init-component generator"
|
|
32
37
|
}
|
|
33
38
|
},
|
|
34
39
|
"schematics": {
|
|
@@ -61,6 +66,11 @@
|
|
|
61
66
|
"factory": "./src/generators/init-feature/index",
|
|
62
67
|
"schema": "./src/generators/init-feature/schema.json",
|
|
63
68
|
"description": "init-feature generator"
|
|
69
|
+
},
|
|
70
|
+
"init-component": {
|
|
71
|
+
"factory": "./src/generators/init-component/index",
|
|
72
|
+
"schema": "./src/generators/init-component/schema.json",
|
|
73
|
+
"description": "init-component generator"
|
|
64
74
|
}
|
|
65
75
|
}
|
|
66
76
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "16.2.0
|
|
2
|
+
"version": "16.2.0",
|
|
3
3
|
"name": "@rxap/plugin-angular",
|
|
4
4
|
"license": "GPL-3.0-or-later",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@apidevtools/json-schema-ref-parser": "9.0.9",
|
|
7
|
+
"@nx/devkit": "16.10.0",
|
|
7
8
|
"colors": "1.4.0",
|
|
8
9
|
"fs-extra": "11.1.1",
|
|
9
10
|
"glob": "10.3.10",
|
|
@@ -17,20 +18,20 @@
|
|
|
17
18
|
"peerDependencies": {
|
|
18
19
|
"@nx/angular": "^16.10.0",
|
|
19
20
|
"@nx/devkit": "^16.10.0",
|
|
20
|
-
"@rxap/plugin-application": "^16.2.0
|
|
21
|
-
"@rxap/plugin-
|
|
22
|
-
"@rxap/plugin-library": "^16.1.0
|
|
23
|
-
"@rxap/plugin-localazy": "^16.1.1
|
|
24
|
-
"@rxap/plugin-utilities": "^16.2.0
|
|
25
|
-
"@rxap/ts-morph": "^1.1.0
|
|
26
|
-
"@rxap/utilities": "^16.1.0
|
|
27
|
-
"@rxap/workspace-ts-morph": "^16.1.0
|
|
28
|
-
"@rxap/workspace-utilities": "^16.1.0
|
|
21
|
+
"@rxap/plugin-application": "^16.2.0",
|
|
22
|
+
"@rxap/plugin-gitlab-ci": "^16.2.0",
|
|
23
|
+
"@rxap/plugin-library": "^16.1.0",
|
|
24
|
+
"@rxap/plugin-localazy": "^16.1.1",
|
|
25
|
+
"@rxap/plugin-utilities": "^16.2.0",
|
|
26
|
+
"@rxap/ts-morph": "^1.1.0",
|
|
27
|
+
"@rxap/utilities": "^16.1.0",
|
|
28
|
+
"@rxap/workspace-ts-morph": "^16.1.0",
|
|
29
|
+
"@rxap/workspace-utilities": "^16.1.0",
|
|
29
30
|
"nx": "^16.10.0",
|
|
30
31
|
"ts-morph": "^18.0.0",
|
|
31
32
|
"tslib": "2.6.2",
|
|
32
|
-
"@rxap/generator-ts-morph": "1.0.2
|
|
33
|
-
"@rxap/node-utilities": "1.2.0
|
|
33
|
+
"@rxap/generator-ts-morph": "1.0.2",
|
|
34
|
+
"@rxap/node-utilities": "1.2.0"
|
|
34
35
|
},
|
|
35
36
|
"author": {
|
|
36
37
|
"name": "Merzough Münker",
|
|
@@ -64,23 +65,27 @@
|
|
|
64
65
|
},
|
|
65
66
|
{
|
|
66
67
|
"package": "@rxap/plugin-application",
|
|
67
|
-
"version": "16.2.0
|
|
68
|
+
"version": "16.2.0"
|
|
68
69
|
},
|
|
69
70
|
{
|
|
70
71
|
"package": "@rxap/plugin-docker",
|
|
71
|
-
"version": "16.1.0-dev.
|
|
72
|
+
"version": "16.1.0-dev.12"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"package": "@rxap/plugin-gitlab-ci",
|
|
76
|
+
"version": "16.2.0"
|
|
72
77
|
},
|
|
73
78
|
{
|
|
74
79
|
"package": "@rxap/plugin-library",
|
|
75
|
-
"version": "16.1.0
|
|
80
|
+
"version": "16.1.0"
|
|
76
81
|
},
|
|
77
82
|
{
|
|
78
83
|
"package": "@rxap/plugin-localazy",
|
|
79
|
-
"version": "16.1.1
|
|
84
|
+
"version": "16.1.1"
|
|
80
85
|
},
|
|
81
86
|
{
|
|
82
87
|
"package": "@rxap/plugin-utilities",
|
|
83
|
-
"version": "16.2.0
|
|
88
|
+
"version": "16.2.0"
|
|
84
89
|
},
|
|
85
90
|
{
|
|
86
91
|
"package": "@rxap/schematics-ts-morph",
|
|
@@ -88,19 +93,19 @@
|
|
|
88
93
|
},
|
|
89
94
|
{
|
|
90
95
|
"package": "@rxap/ts-morph",
|
|
91
|
-
"version": "1.1.0
|
|
96
|
+
"version": "1.1.0"
|
|
92
97
|
},
|
|
93
98
|
{
|
|
94
99
|
"package": "@rxap/utilities",
|
|
95
|
-
"version": "16.1.0
|
|
100
|
+
"version": "16.1.0"
|
|
96
101
|
},
|
|
97
102
|
{
|
|
98
103
|
"package": "@rxap/workspace-ts-morph",
|
|
99
|
-
"version": "16.1.0
|
|
104
|
+
"version": "16.1.0"
|
|
100
105
|
},
|
|
101
106
|
{
|
|
102
107
|
"package": "@rxap/workspace-utilities",
|
|
103
|
-
"version": "16.1.0
|
|
108
|
+
"version": "16.1.0"
|
|
104
109
|
}
|
|
105
110
|
]
|
|
106
111
|
},
|
|
@@ -115,6 +120,6 @@
|
|
|
115
120
|
},
|
|
116
121
|
"schematics": "./generators.json",
|
|
117
122
|
"type": "commonjs",
|
|
118
|
-
"gitHead": "
|
|
123
|
+
"gitHead": "28add49b88a526653de396861c299d74489d9d82",
|
|
119
124
|
"main": "./src/index.js"
|
|
120
125
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Tree } from '@nx/devkit';
|
|
2
|
+
import { ConvertToBuildableLibraryGeneratorSchema } from './schema';
|
|
3
|
+
export declare function convertToBuildableLibraryGenerator(tree: Tree, options: ConvertToBuildableLibraryGeneratorSchema): Promise<void>;
|
|
4
|
+
export default convertToBuildableLibraryGenerator;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.convertToBuildableLibraryGenerator = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
const utilities_1 = require("@rxap/utilities");
|
|
7
|
+
const workspace_utilities_1 = require("@rxap/workspace-utilities");
|
|
8
|
+
const path_1 = require("path");
|
|
9
|
+
const generator_1 = require("../init-library/generator");
|
|
10
|
+
function convertToBuildableLibraryGenerator(tree, options) {
|
|
11
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
12
|
+
if (!(0, workspace_utilities_1.HasProject)(tree, options.project)) {
|
|
13
|
+
throw new Error(`Project ${options.project} not found`);
|
|
14
|
+
}
|
|
15
|
+
yield (0, workspace_utilities_1.AddPackageJsonDevDependency)(tree, 'postcss', '^8.3.6', { soft: true });
|
|
16
|
+
yield (0, workspace_utilities_1.AddPackageJsonDevDependency)(tree, 'postcss-import', '~14.1.0', { soft: true });
|
|
17
|
+
yield (0, workspace_utilities_1.AddPackageJsonDevDependency)(tree, 'postcss-preset-env', '~7.5.0', { soft: true });
|
|
18
|
+
yield (0, workspace_utilities_1.AddPackageJsonDevDependency)(tree, 'postcss-url', '~10.1.3', { soft: true });
|
|
19
|
+
const projectRoot = (0, workspace_utilities_1.GetProjectRoot)(tree, options.project);
|
|
20
|
+
const toRoot = (0, path_1.relative)(projectRoot, '/');
|
|
21
|
+
const project = (0, devkit_1.readProjectConfiguration)(tree, options.project);
|
|
22
|
+
(0, workspace_utilities_1.CoerceTarget)(project, 'build', {
|
|
23
|
+
executor: '@nx/angular:ng-packagr-lite',
|
|
24
|
+
outputs: [
|
|
25
|
+
'{workspaceRoot}/dist/{projectRoot}',
|
|
26
|
+
],
|
|
27
|
+
options: {
|
|
28
|
+
project: 'angular/components/ng-package.json',
|
|
29
|
+
},
|
|
30
|
+
configurations: {
|
|
31
|
+
production: {
|
|
32
|
+
tsConfig: 'angular/components/tsconfig.lib.prod.json',
|
|
33
|
+
},
|
|
34
|
+
development: {
|
|
35
|
+
tsConfig: 'angular/components/tsconfig.lib.json',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
defaultConfiguration: 'production',
|
|
39
|
+
});
|
|
40
|
+
(0, workspace_utilities_1.UpdateJsonFile)(tree, ngPackage => {
|
|
41
|
+
var _a, _b;
|
|
42
|
+
ngPackage.$schema = (0, path_1.join)(toRoot, 'node_modules/ng-packagr/ng-package.schema.json');
|
|
43
|
+
(_a = ngPackage.lib) !== null && _a !== void 0 ? _a : (ngPackage.lib = {});
|
|
44
|
+
ngPackage.lib.entryFile = 'src/index.ts';
|
|
45
|
+
(_b = ngPackage.dist) !== null && _b !== void 0 ? _b : (ngPackage.dist = (0, path_1.join)(toRoot, 'dist', projectRoot));
|
|
46
|
+
}, (0, path_1.join)(projectRoot, 'ng-package.json'), { create: true });
|
|
47
|
+
(0, workspace_utilities_1.UpdateProjectPackageJson)(tree, (packageJson) => {
|
|
48
|
+
var _a, _b;
|
|
49
|
+
packageJson.name = options.project;
|
|
50
|
+
packageJson.private = true;
|
|
51
|
+
(_a = packageJson.peerDependencies) !== null && _a !== void 0 ? _a : (packageJson.peerDependencies = {});
|
|
52
|
+
(_b = packageJson.dependencies) !== null && _b !== void 0 ? _b : (packageJson.dependencies = {});
|
|
53
|
+
packageJson.dependencies['tslib'] = '^2.3.0';
|
|
54
|
+
packageJson.sideEffects = false;
|
|
55
|
+
packageJson.version = '0.0.0';
|
|
56
|
+
}, {
|
|
57
|
+
projectName: options.project,
|
|
58
|
+
create: true,
|
|
59
|
+
});
|
|
60
|
+
(0, workspace_utilities_1.UpdateJsonFile)(tree, eslintrc => {
|
|
61
|
+
(0, utilities_1.CoerceArrayItems)(eslintrc.overrides, [
|
|
62
|
+
{
|
|
63
|
+
files: [
|
|
64
|
+
'*.json',
|
|
65
|
+
],
|
|
66
|
+
parser: 'jsonc-eslint-parser',
|
|
67
|
+
rules: {
|
|
68
|
+
'@nx/dependency-checks': 'error',
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
], (a, b) => a.parser === b.parser && (0, utilities_1.equals)(a.files, b.files));
|
|
72
|
+
}, (0, path_1.join)(projectRoot, '.eslintrc.json'));
|
|
73
|
+
(0, workspace_utilities_1.UpdateProjectTsConfigJson)(tree, (tsConfig) => {
|
|
74
|
+
var _a, _b, _c;
|
|
75
|
+
var _d;
|
|
76
|
+
tsConfig.extends = './tsconfig.lib.json';
|
|
77
|
+
(_a = tsConfig.compilerOptions) !== null && _a !== void 0 ? _a : (tsConfig.compilerOptions = {});
|
|
78
|
+
(_b = (_d = tsConfig.compilerOptions).declarationMap) !== null && _b !== void 0 ? _b : (_d.declarationMap = false);
|
|
79
|
+
(_c = tsConfig.angularCompilerOptions) !== null && _c !== void 0 ? _c : (tsConfig.angularCompilerOptions = {});
|
|
80
|
+
}, {
|
|
81
|
+
project: options.project,
|
|
82
|
+
infix: 'lib.prod',
|
|
83
|
+
});
|
|
84
|
+
yield (0, generator_1.default)(tree, { project: options.project });
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
exports.convertToBuildableLibraryGenerator = convertToBuildableLibraryGenerator;
|
|
88
|
+
exports.default = convertToBuildableLibraryGenerator;
|
|
89
|
+
//# sourceMappingURL=generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/angular/src/generators/convert-to-buildable-library/generator.ts"],"names":[],"mappings":";;;;AAAA,uCAGoB;AACpB,+CAGyB;AACzB,mEAQmC;AACnC,+BAGc;AACd,yDAA6D;AAG7D,SAAsB,kCAAkC,CACtD,IAAU,EACV,OAAiD;;QAEjD,IAAI,CAAC,IAAA,gCAAU,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE;YACtC,MAAM,IAAI,KAAK,CAAC,WAAY,OAAO,CAAC,OAAQ,YAAY,CAAC,CAAC;SAC3D;QAED,MAAM,IAAA,iDAA2B,EAAC,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QAC7E,MAAM,IAAA,iDAA2B,EAAC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yB,EAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,EAAE;;;YAC3C,QAAQ,CAAC,OAAO,GAAG,qBAAqB,CAAC;YACzC,MAAA,QAAQ,CAAC,eAAe,oCAAxB,QAAQ,CAAC,eAAe,GAAK,EAAE,EAAC;YAChC,YAAA,QAAQ,CAAC,eAAe,EAAC,cAAc,uCAAd,cAAc,GAAK,KAAK,EAAC;YAClD,MAAA,QAAQ,CAAC,sBAAsB,oCAA/B,QAAQ,CAAC,sBAAsB,GAAK,EAAE,EAAC;QACzC,CAAC,EAAE;YACD,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,KAAK,EAAE,UAAU;SAClB,CAAC,CAAC;QAEH,MAAM,IAAA,mBAAoB,EAAC,IAAI,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;IAEjE,CAAC;CAAA;AAnFD,gFAmFC;AAED,kBAAe,kCAAkC,CAAC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.initGenerator = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
6
|
const utilities_1 = require("@rxap/utilities");
|
|
6
7
|
const workspace_utilities_1 = require("@rxap/workspace-utilities");
|
|
7
8
|
const generator_1 = require("../init-library/generator");
|
|
@@ -40,6 +41,9 @@ function initGenerator(tree, options) {
|
|
|
40
41
|
},
|
|
41
42
|
indexExport: false,
|
|
42
43
|
});
|
|
44
|
+
if (!options.skipFormat) {
|
|
45
|
+
yield (0, devkit_1.formatFiles)(tree);
|
|
46
|
+
}
|
|
43
47
|
});
|
|
44
48
|
}
|
|
45
49
|
exports.initGenerator = initGenerator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/angular/src/generators/init/generator.ts"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/angular/src/generators/init/generator.ts"],"names":[],"mappings":";;;;AAAA,uCAGoB;AACpB,+CAAmD;AACnD,mEAA4E;AAC5E,yDAA6D;AAG7D,SAAsB,aAAa,CAAC,IAAU,EAAE,OAA4B;;QAC1E,OAAO,CAAC,GAAG,CAAC,yBAAyB,EAAE,OAAO,CAAC,CAAC;QAEhD,IAAA,qDAA+B,EAC7B,IAAI,EACJ,GAAG,EACH,sBAAsB,EACtB,MAAM,EACN,IAAA,4BAAgB,EAAC,OAAO,EAAE,CAAE,UAAU,EAAE,WAAW,EAAE,cAAc,CAAE,CAAC,CACvE,CAAC;QAEF,MAAM,IAAA,mBAAoB,EAAC,IAAI,EAAE;YAC/B,QAAQ,EAAE;gBACR,YAAY;gBACZ,OAAO;gBACP,UAAU;gBACV,QAAQ;aACT;YACD,MAAM,EAAE;gBACN,SAAS,EAAE,SAAS;gBACpB,WAAW,EAAE,IAAI;aAClB;YACD,WAAW,EAAE,KAAK;SACnB,CAAC,CAAC;QAEH,MAAM,IAAA,mBAAoB,EAAC,IAAI,EAAE;YAC/B,QAAQ,EAAE;gBACR,SAAS;gBACT,cAAc;gBACd,OAAO;gBACP,YAAY;gBACZ,QAAQ;gBACR,UAAU;gBACV,uBAAuB;gBACvB,SAAS;gBACT,WAAW;gBACX,mBAAmB;aACpB;YACD,MAAM,EAAE;gBACN,SAAS,EAAE,SAAS;aACrB;YACD,WAAW,EAAE,KAAK;SACnB,CAAC,CAAC;QAEH,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YACvB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;SACzB;IAEH,CAAC;CAAA;AAhDD,sCAgDC;AAED,kBAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Tree } from '@nx/devkit';
|
|
2
|
+
import { InitApplicationGeneratorSchema } from './schema';
|
|
3
|
+
export declare function CoerceProjects(tree: Tree, options: InitApplicationGeneratorSchema): Promise<void>;
|
|
4
|
+
export declare function CoerceProject(tree: Tree, projectName: string, options: InitApplicationGeneratorSchema): Promise<void>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CoerceProject = exports.CoerceProjects = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const generators_1 = require("@nx/angular/generators");
|
|
6
|
+
const workspace_utilities_1 = require("@rxap/workspace-utilities");
|
|
7
|
+
function CoerceProjects(tree, options) {
|
|
8
|
+
var _a;
|
|
9
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
10
|
+
if (!options.coerce) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
for (const projectName of (_a = options.projects) !== null && _a !== void 0 ? _a : []) {
|
|
14
|
+
if (!(0, workspace_utilities_1.HasProject)(tree, projectName)) {
|
|
15
|
+
yield CoerceProject(tree, projectName, options);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
exports.CoerceProjects = CoerceProjects;
|
|
21
|
+
function CoerceProject(tree, projectName, options) {
|
|
22
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
if ((0, workspace_utilities_1.HasProject)(tree, projectName)) {
|
|
24
|
+
console.log(`Project ${projectName} already exists`);
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
let directory = 'user-interface';
|
|
28
|
+
if (projectName.includes('-feature-')) {
|
|
29
|
+
directory += '/feature';
|
|
30
|
+
}
|
|
31
|
+
directory += `/${projectName.replace('user-interface-', '').replace('feature-', '')}`;
|
|
32
|
+
const formOptions = typeof options.coerce === 'object' ? options.coerce : {};
|
|
33
|
+
if (options.moduleFederation) {
|
|
34
|
+
if (options.moduleFederation === 'host') {
|
|
35
|
+
const defaultOptions = (0, workspace_utilities_1.GetDefaultGeneratorOptions)(tree, '@nx/angular:host');
|
|
36
|
+
const schema = Object.assign(Object.assign(Object.assign(Object.assign({ style: 'scss', inlineStyle: false, inlineTemplate: false, skipTests: false, skipFormat: false, skipPackageJson: false, unitTestRunner: generators_1.UnitTestRunner.Jest, e2eTestRunner: generators_1.E2eTestRunner.None, linter: 'eslint', strict: true, standaloneConfig: true }, defaultOptions), { directory }), formOptions), { name: projectName, dynamic: true, projectNameAndRootFormat: 'as-provided' });
|
|
37
|
+
yield (0, generators_1.host)(tree, schema);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
const defaultOptions = (0, workspace_utilities_1.GetDefaultGeneratorOptions)(tree, '@nx/angular:remote');
|
|
41
|
+
const schema = Object.assign(Object.assign(Object.assign(Object.assign({ style: 'scss', inlineStyle: false, inlineTemplate: false, skipTests: false, skipFormat: false, skipPackageJson: false, unitTestRunner: generators_1.UnitTestRunner.Jest, e2eTestRunner: generators_1.E2eTestRunner.None, linter: 'eslint', strict: true, standaloneConfig: true }, defaultOptions), { directory }), formOptions), { host: options.host, name: projectName, projectNameAndRootFormat: 'as-provided' });
|
|
42
|
+
yield (0, generators_1.remote)(tree, schema);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
const defaultOptions = (0, workspace_utilities_1.GetDefaultGeneratorOptions)(tree, '@nx/angular:application');
|
|
47
|
+
const schema = Object.assign(Object.assign(Object.assign(Object.assign({ style: 'scss', routing: true, inlineStyle: false, inlineTemplate: false, skipTests: false, skipFormat: false, skipPackageJson: false, unitTestRunner: generators_1.UnitTestRunner.Jest, e2eTestRunner: generators_1.E2eTestRunner.None, linter: 'eslint', strict: true, standaloneConfig: true, minimal: true }, defaultOptions), { directory }), formOptions), { name: projectName, projectNameAndRootFormat: 'as-provided' });
|
|
48
|
+
yield (0, generators_1.applicationGenerator)(tree, schema);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
exports.CoerceProject = CoerceProject;
|
|
53
|
+
//# sourceMappingURL=coerce-project.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coerce-project.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/angular/src/generators/init-application/coerce-project.ts"],"names":[],"mappings":";;;;AAAA,uDAMgC;AAKhC,mEAGmC;AAGnC,SAAsB,cAAc,CAAC,IAAU,EAAE,OAAuC;;;QAEtF,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;YACnB,OAAO;SACR;QAED,KAAK,MAAM,WAAW,IAAI,MAAA,OAAO,CAAC,QAAQ,mCAAI,EAAE,EAAE;YAEhD,IAAI,CAAC,IAAA,gCAAU,EAAC,IAAI,EAAE,WAAW,CAAC,EAAE;gBAElC,MAAM,aAAa,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;aAEjD;SAEF;;CAEF;AAhBD,wCAgBC;AAED,SAAsB,aAAa,CAAC,IAAU,EAAE,WAAmB,EAAE,OAAuC;;QAE1G,IAAI,IAAA,gCAAU,EAAC,IAAI,EAAE,WAAW,CAAC,EAAE;YACjC,OAAO,CAAC,GAAG,CAAC,WAAY,WAAY,iBAAiB,CAAC,CAAC;YACvD,OAAO;SACR;QAED,IAAI,SAAS,GAAG,gBAAgB,CAAC;QACjC,IAAI,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE;YACrC,SAAS,IAAI,UAAU,CAAC;SACzB;QACD,SAAS,IAAI,IAAK,WAAW,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAE,EAAE,CAAC;QAExF,MAAM,WAAW,GAAQ,OAAO,OAAO,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;QAElF,IAAI,OAAO,CAAC,gBAAgB,EAAE;YAE5B,IAAI,OAAO,CAAC,gBAAgB,KAAK,MAAM,EA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B,EAA6C,IAAI,EAAE,yBAAyB,CAAC,CAAC;YAC/H,MAAM,MAAM,6DACV,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,IAAI,EACb,WAAW,EAAE,KAAK,EAClB,cAAc,EAAE,KAAK,EACrB,SAAS,EAAE,KAAK,EAChB,UAAU,EAAE,KAAK,EACjB,eAAe,EAAE,KAAK,EACtB,cAAc,EAAE,2BAAc,CAAC,IAAI,EACnC,aAAa,EAAE,0BAAa,CAAC,IAAI,EACjC,MAAM,EAAE,QAAQ,EAChB,MAAM,EAAE,IAAI,EACZ,gBAAgB,EAAE,IAAI,EACtB,OAAO,EAAE,IAAI,IACV,cAAc,KACjB,SAAS,KACN,WAAW,KACd,IAAI,EAAE,WAAW,EACjB,wBAAwB,EAAE,aAAa,GACxC,CAAC;YACF,MAAM,IAAA,iCAA2B,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;SACjD;IAEH,CAAC;CAAA;AAxFD,sCAwFC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
FROM registry.gitlab.com/rxap/docker/nginx:alpine
|
|
2
|
+
|
|
3
|
+
ARG PROJECT_NAME
|
|
4
|
+
ARG RELEASE
|
|
5
|
+
|
|
6
|
+
RUN if [ -z "$PROJECT_NAME" ]; then exit 1; fi
|
|
7
|
+
RUN if [ -z "$RELEASE" ]; then exit 1; fi
|
|
8
|
+
|
|
9
|
+
ENV TRAEFIK_SERVICE_NAME=$PROJECT_NAME
|
|
10
|
+
|
|
11
|
+
ENV TRAEFIK_ROUTER_NAME=$PROJECT_NAME
|
|
12
|
+
ENV TRAEFIK_ROUTER_PRIORITY=15
|
|
13
|
+
|
|
14
|
+
ENV TREAFIK_HEALTH_CHECK_INTERVAL=60s
|
|
15
|
+
ENV TREAFIK_HEALTH_CHECK_TIMEOUT=10s
|
|
16
|
+
ENV TREAFIK_HEALTH_CHECK_PATH=/index.html
|
|
17
|
+
|
|
18
|
+
LABEL traefik.enable=true
|
|
19
|
+
|
|
20
|
+
LABEL traefik.http.services.$TRAEFIK_SERVICE_NAME.loadbalancer.healthCheck.path=$TREAFIK_HEALTH_CHECK_PATH
|
|
21
|
+
LABEL traefik.http.services.$TRAEFIK_SERVICE_NAME.loadbalancer.healthCheck.interval=$TREAFIK_HEALTH_CHECK_INTERVAL
|
|
22
|
+
LABEL traefik.http.services.$TRAEFIK_SERVICE_NAME.loadbalancer.healthCheck.timeout=$TREAFIK_HEALTH_CHECK_TIMEOUT
|
|
23
|
+
LABEL traefik.http.services.$TRAEFIK_SERVICE_NAME.loadbalancer.server.port=80
|
|
24
|
+
|
|
25
|
+
LABEL traefik.http.routers.$TRAEFIK_ROUTER_NAME.rule=PathPrefix(`__mfe/${RELEASE}/${PROJECT_NAME}`)
|
|
26
|
+
LABEL traefik.http.routers.$TRAEFIK_ROUTER_NAME.priority=$TRAEFIK_ROUTER_PRIORITY
|
|
27
|
+
LABEL traefik.http.routers.$TRAEFIK_ROUTER_NAME.service=$TRAEFIK_SERVICE_NAME
|
|
28
|
+
|
|
29
|
+
COPY . /usr/share/nginx/html
|