@eui/tools 6.17.1 → 6.19.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/.version.properties +1 -1
- package/CHANGELOG.md +25 -0
- package/package.json +1 -1
- package/scripts/csdr/config/angular.js +15 -3
- package/scripts/csdr/config/config-skeletons.js +48 -22
- package/scripts/csdr/config/global.js +27 -7
- package/scripts/csdr/config/packages.js +7 -1
- package/scripts/csdr/config/register.js +10 -2
- package/scripts/csdr/config/remotes.js +21 -3
- package/scripts/csdr/config/sync.js +5 -2
- package/scripts/csdr/init/packages.js +1 -0
- package/scripts/csdr/init/remotes/18.x/base/angular.esbuild.json +62 -71
- package/scripts/csdr/init/remotes/18.x/base/tsconfig.app.json +35 -22
- package/scripts/csdr/init/remotes/18.x/full/common/app/fallback.component.ts +2 -1
- package/scripts/csdr/init/remotes/18.x/full/common/app/module.component.ts +20 -27
- package/scripts/csdr/init/remotes/18.x/full/options/participant/app/module.component.ts +25 -33
- package/scripts/csdr/metadata/package-utils.js +8 -1
- package/scripts/csdr/sync/sync-utils.js +6 -1
package/.version.properties
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6.
|
|
1
|
+
6.19.0
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
## 6.19.0 (2024-07-25)
|
|
2
|
+
|
|
3
|
+
##### Chores
|
|
4
|
+
|
|
5
|
+
* **other:**
|
|
6
|
+
* adapted wrong path check ([95030187](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/9503018748e091defe17bb186a740bdd9bc9d768))
|
|
7
|
+
##### New Features
|
|
8
|
+
|
|
9
|
+
* **other:**
|
|
10
|
+
* adapted to new config for baep standalone portal - adjusted esbuild for proxied configurations - EUI-9788 [EUI-9788](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-9788) ([cf062fc3](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/cf062fc35fda5423fcf136e556779d7c4012a77d))
|
|
11
|
+
|
|
12
|
+
* * *
|
|
13
|
+
* * *
|
|
14
|
+
## 6.18.0 (2024-07-24)
|
|
15
|
+
|
|
16
|
+
##### New Features
|
|
17
|
+
|
|
18
|
+
* **remotes:**
|
|
19
|
+
* minor change MWP-11061 [MWP-11061](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-11061) ([e7168ead](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/e7168ead5b2a841773d570efb1ed7de3e756d921))
|
|
20
|
+
* enable zoneless for esbuild builds MWP-11061 [MWP-11061](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-11061) ([df766769](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/df766769d4498b4d83fbdf259bd185b47e9ac364))
|
|
21
|
+
* tweak components to make them OnPush MWP-11061 [MWP-11061](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-11061) ([50040270](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/5004027099447f321dafc74f0a634eafc20cc7f6))
|
|
22
|
+
* tweak the config in order to see if remotes-build using esbuild are fine. These changes work fine with webpack! [MWP-11061](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-11061) ([15d905d6](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/15d905d62d964f26840409775d9f80f26402816d))
|
|
23
|
+
|
|
24
|
+
* * *
|
|
25
|
+
* * *
|
|
1
26
|
## 6.17.1 (2024-07-19)
|
|
2
27
|
|
|
3
28
|
##### Chores
|
package/package.json
CHANGED
|
@@ -26,9 +26,11 @@ const {
|
|
|
26
26
|
angularProjectDefFullSkeletonV17esbuild,
|
|
27
27
|
angularProjectDefConfiguration,
|
|
28
28
|
angularProjectDefConfigurationHost,
|
|
29
|
+
angularProjectDefConfigurationHostEsbuild,
|
|
29
30
|
angularProjectDefConfigurationLight,
|
|
30
31
|
angularProjectDefConfigurationOptimized,
|
|
31
32
|
angularProjectDefConfigurationOptimizedHost,
|
|
33
|
+
angularProjectDefConfigurationOptimizedHostEsbuild,
|
|
32
34
|
angularProjectDefConfigurationOptimizedLight,
|
|
33
35
|
angularPackageDef,
|
|
34
36
|
angularPackageSubEntryDef,
|
|
@@ -321,8 +323,13 @@ module.exports.registerAngularProjectDef = (project, build = false, element = fa
|
|
|
321
323
|
} else {
|
|
322
324
|
tools.logInfo('Injecting angular configuration file replacement');
|
|
323
325
|
if (project.host) {
|
|
324
|
-
|
|
325
|
-
|
|
326
|
+
if (packageEuiVersionNumber >= 18) {
|
|
327
|
+
configurationDef = JSON.stringify(angularProjectDefConfigurationHostEsbuild);
|
|
328
|
+
configurationDefOptimized = JSON.stringify(angularProjectDefConfigurationOptimizedHostEsbuild);
|
|
329
|
+
} else {
|
|
330
|
+
configurationDef = JSON.stringify(angularProjectDefConfigurationHost);
|
|
331
|
+
configurationDefOptimized = JSON.stringify(angularProjectDefConfigurationOptimizedHost);
|
|
332
|
+
}
|
|
326
333
|
} else {
|
|
327
334
|
configurationDef = JSON.stringify(angularProjectDefConfiguration);
|
|
328
335
|
configurationDefOptimized = JSON.stringify(angularProjectDefConfigurationOptimized);
|
|
@@ -393,7 +400,12 @@ module.exports.registerModulePaths = (pkg, isReset) => {
|
|
|
393
400
|
const fileDev = path.join(process.cwd(), 'tsconfig.json');
|
|
394
401
|
const fileBuild = path.join(process.cwd(), 'tsconfig.build.json');
|
|
395
402
|
const fileBuildSpec = path.join(process.cwd(), 'tsconfig.build.spec.json');
|
|
396
|
-
|
|
403
|
+
let defFile;
|
|
404
|
+
if (tools.isDirExists(path.join(process.cwd(), '.config'))) {
|
|
405
|
+
defFile = path.join(process.cwd(), '.config', '.euirc-apps.json');
|
|
406
|
+
} else {
|
|
407
|
+
defFile = path.join(process.cwd(), '.csdr', '.euirc-csdr-apps.json');
|
|
408
|
+
}
|
|
397
409
|
|
|
398
410
|
if ((!tools.isFileExists(fileBuild) || isReset) && !tools.isFileExists(defFile)) {
|
|
399
411
|
tools.copy(fileDev, fileBuild);
|
|
@@ -1496,18 +1496,18 @@ module.exports.angularProjectDefFullSkeletonV17esbuild = {
|
|
|
1496
1496
|
"serve": {
|
|
1497
1497
|
"builder": "@angular-devkit/build-angular:dev-server",
|
|
1498
1498
|
"options": {
|
|
1499
|
-
"
|
|
1499
|
+
"buildTarget": "@project.name@:build"
|
|
1500
1500
|
},
|
|
1501
1501
|
"configurations": {
|
|
1502
1502
|
"proxy-mock": {
|
|
1503
|
-
"
|
|
1503
|
+
"buildTarget": "@project.name@:build",
|
|
1504
1504
|
"proxyConfig": "apps/@project.name@/proxy-mock.conf.json"
|
|
1505
1505
|
},
|
|
1506
1506
|
"production": {
|
|
1507
|
-
"
|
|
1507
|
+
"buildTarget": "@project.name@:build:production"
|
|
1508
1508
|
},
|
|
1509
1509
|
"development": {
|
|
1510
|
-
"
|
|
1510
|
+
"buildTarget": "@project.name@:build:development"
|
|
1511
1511
|
}
|
|
1512
1512
|
},
|
|
1513
1513
|
"defaultConfiguration": "development"
|
|
@@ -1560,6 +1560,49 @@ module.exports.angularProjectDefConfigurationHost = {
|
|
|
1560
1560
|
"namedChunks": true
|
|
1561
1561
|
};
|
|
1562
1562
|
|
|
1563
|
+
module.exports.angularProjectDefConfigurationOptimizedHost = {
|
|
1564
|
+
"optimization": true,
|
|
1565
|
+
"outputHashing": "all",
|
|
1566
|
+
"sourceMap": false,
|
|
1567
|
+
"extractCss": true,
|
|
1568
|
+
"namedChunks": true,
|
|
1569
|
+
"aot": true,
|
|
1570
|
+
"extractLicenses": true,
|
|
1571
|
+
"vendorChunk": false,
|
|
1572
|
+
"buildOptimizer": true,
|
|
1573
|
+
"budgets": [
|
|
1574
|
+
{
|
|
1575
|
+
"type": "initial",
|
|
1576
|
+
"maximumWarning": "2mb",
|
|
1577
|
+
"maximumError": "8mb"
|
|
1578
|
+
}
|
|
1579
|
+
]
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
module.exports.angularProjectDefConfigurationHostEsbuild = {
|
|
1583
|
+
"optimization": false,
|
|
1584
|
+
"extractLicenses": false,
|
|
1585
|
+
"sourceMap": true,
|
|
1586
|
+
"namedChunks": true
|
|
1587
|
+
};
|
|
1588
|
+
|
|
1589
|
+
module.exports.angularProjectDefConfigurationOptimizedHostEsbuild = {
|
|
1590
|
+
"optimization": true,
|
|
1591
|
+
"outputHashing": "all",
|
|
1592
|
+
"sourceMap": false,
|
|
1593
|
+
"extractCss": true,
|
|
1594
|
+
"namedChunks": true,
|
|
1595
|
+
"aot": true,
|
|
1596
|
+
"extractLicenses": true,
|
|
1597
|
+
"budgets": [
|
|
1598
|
+
{
|
|
1599
|
+
"type": "initial",
|
|
1600
|
+
"maximumWarning": "2mb",
|
|
1601
|
+
"maximumError": "8mb"
|
|
1602
|
+
}
|
|
1603
|
+
]
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1563
1606
|
|
|
1564
1607
|
module.exports.angularProjectDefConfigurationLight = {
|
|
1565
1608
|
"buildOptimizer": false,
|
|
@@ -1618,24 +1661,7 @@ module.exports.angularProjectDefConfigurationOptimized = {
|
|
|
1618
1661
|
]
|
|
1619
1662
|
}
|
|
1620
1663
|
|
|
1621
|
-
|
|
1622
|
-
"optimization": true,
|
|
1623
|
-
"outputHashing": "all",
|
|
1624
|
-
"sourceMap": false,
|
|
1625
|
-
"extractCss": true,
|
|
1626
|
-
"namedChunks": true,
|
|
1627
|
-
"aot": true,
|
|
1628
|
-
"extractLicenses": true,
|
|
1629
|
-
"vendorChunk": false,
|
|
1630
|
-
"buildOptimizer": true,
|
|
1631
|
-
"budgets": [
|
|
1632
|
-
{
|
|
1633
|
-
"type": "initial",
|
|
1634
|
-
"maximumWarning": "2mb",
|
|
1635
|
-
"maximumError": "8mb"
|
|
1636
|
-
}
|
|
1637
|
-
]
|
|
1638
|
-
}
|
|
1664
|
+
|
|
1639
1665
|
|
|
1640
1666
|
|
|
1641
1667
|
|
|
@@ -13,10 +13,20 @@ const innerProjects = require('./projects');
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
module.exports.getCsdrConfig = (full = true) => {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
let globalConfig, appsConfig, packagesConfig, remotesConfig;
|
|
17
|
+
|
|
18
|
+
if (tools.isDirExists(path.join(process.cwd(), '.config'))) {
|
|
19
|
+
globalConfig = require(path.join(process.cwd(), '.config', '.euirc-config.json'));
|
|
20
|
+
appsConfig = require(path.join(process.cwd(), '.config', '.euirc-apps.json'));
|
|
21
|
+
packagesConfig = require(path.join(process.cwd(), '.config', '.euirc-packages.json'));
|
|
22
|
+
remotesConfig = require(path.join(process.cwd(), '.config', '.euirc-remotes.json'));
|
|
23
|
+
|
|
24
|
+
} else {
|
|
25
|
+
globalConfig = require(path.join(process.cwd(), '.csdr', '.euirc-csdr-config.json'));
|
|
26
|
+
appsConfig = require(path.join(process.cwd(), '.csdr', '.euirc-csdr-apps.json'));
|
|
27
|
+
packagesConfig = require(path.join(process.cwd(), '.csdr', '.euirc-csdr-packages.json'));
|
|
28
|
+
remotesConfig = require(path.join(process.cwd(), '.csdr', '.euirc-csdr-remotes.json'));
|
|
29
|
+
}
|
|
20
30
|
|
|
21
31
|
const config = globalConfig;
|
|
22
32
|
|
|
@@ -147,9 +157,13 @@ const getConfig = module.exports.getConfig = () => {
|
|
|
147
157
|
let configFile;
|
|
148
158
|
let isCsdr;
|
|
149
159
|
|
|
150
|
-
if (tools.isDirExists(path.join(process.cwd(), '.csdr'))) {
|
|
151
|
-
configFile = path.join(process.cwd(), '.csdr', '.euirc.json');
|
|
160
|
+
if (tools.isDirExists(path.join(process.cwd(), '.csdr')) || tools.isDirExists(path.join(process.cwd(), '.config'))) {
|
|
152
161
|
isCsdr = true;
|
|
162
|
+
if (tools.isDirExists(path.join(process.cwd(), '.csdr'))) {
|
|
163
|
+
configFile = path.join(process.cwd(), '.csdr', '.euirc.json');
|
|
164
|
+
} else {
|
|
165
|
+
configFile = path.join(process.cwd(), '.config', '.euirc.json');
|
|
166
|
+
}
|
|
153
167
|
} else {
|
|
154
168
|
configFile = path.join(process.cwd(), '.euirc.json');
|
|
155
169
|
isCsdr = false;
|
|
@@ -174,7 +188,13 @@ module.exports.updateConfig = (args = { project, projects, packages, packagesBra
|
|
|
174
188
|
tools.logInfo('Updating euirc config');
|
|
175
189
|
console.log(args);
|
|
176
190
|
|
|
177
|
-
|
|
191
|
+
let configFile;
|
|
192
|
+
|
|
193
|
+
if (tools.isDirExists(path.join(process.cwd(), '.config'))) {
|
|
194
|
+
configFile = path.join(process.cwd(), '.config', '.euirc.json');
|
|
195
|
+
} else {
|
|
196
|
+
configFile = path.join(process.cwd(), '.csdr', '.euirc.json');
|
|
197
|
+
}
|
|
178
198
|
|
|
179
199
|
let newConfig = {};
|
|
180
200
|
|
|
@@ -244,7 +244,13 @@ module.exports.getRemotePackages = () => {
|
|
|
244
244
|
};
|
|
245
245
|
|
|
246
246
|
module.exports.isRemote = (pkgName) => {
|
|
247
|
-
|
|
247
|
+
let packagesConfig;
|
|
248
|
+
|
|
249
|
+
if (tools.isDirExists(path.join(process.cwd(), '.config'))) {
|
|
250
|
+
packagesConfig = require(path.join(process.cwd(), '.config', '.euirc-packages.json'));
|
|
251
|
+
} else {
|
|
252
|
+
packagesConfig = require(path.join(process.cwd(), '.csdr', '.euirc-csdr-packages.json'));
|
|
253
|
+
}
|
|
248
254
|
const packageConfig = packagesConfig[pkgName];
|
|
249
255
|
|
|
250
256
|
if (packageConfig) {
|
|
@@ -92,9 +92,17 @@ module.exports.registerCsdrPackage = (pkg, rootPkgScope, rootPkgName, euiVersion
|
|
|
92
92
|
|
|
93
93
|
let file;
|
|
94
94
|
if (isRemote) {
|
|
95
|
-
|
|
95
|
+
if (tools.isDirExists(path.join(process.cwd(), '.config'))) {
|
|
96
|
+
file = path.join(process.cwd(), '.config', '.euirc-remotes.json');
|
|
97
|
+
} else {
|
|
98
|
+
file = path.join(process.cwd(), '.csdr', '.euirc-csdr-remotes.json');
|
|
99
|
+
}
|
|
96
100
|
} else {
|
|
97
|
-
|
|
101
|
+
if (tools.isDirExists(path.join(process.cwd(), '.config'))) {
|
|
102
|
+
file = path.join(process.cwd(), '.config', '.euirc-packages.json');
|
|
103
|
+
} else {
|
|
104
|
+
file = path.join(process.cwd(), '.csdr', '.euirc-csdr-packages.json');
|
|
105
|
+
}
|
|
98
106
|
}
|
|
99
107
|
|
|
100
108
|
const moduleJson = JSON.parse(replaceModule);
|
|
@@ -18,7 +18,12 @@ module.exports.getRemote = (remoteName) => {
|
|
|
18
18
|
remoteName = tools.getArgs().root;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
let remotesConfig;
|
|
22
|
+
if (tools.isDirExists(path.join(process.cwd(), '.config'))) {
|
|
23
|
+
remotesConfig = require(path.join(process.cwd(), '.config', '.euirc-remotes.json'));
|
|
24
|
+
} else {
|
|
25
|
+
remotesConfig = require(path.join(process.cwd(), '.csdr', '.euirc-csdr-remotes.json'));
|
|
26
|
+
}
|
|
22
27
|
const remoteConfig = remotesConfig[remoteName];
|
|
23
28
|
|
|
24
29
|
const configOptions = configUtils.global.getConfigOptions();
|
|
@@ -71,7 +76,14 @@ module.exports.getRemote = (remoteName) => {
|
|
|
71
76
|
|
|
72
77
|
|
|
73
78
|
module.exports.isVirtualRemote = (remoteName) => {
|
|
74
|
-
|
|
79
|
+
let remotesConfig;
|
|
80
|
+
console.log(tools.isDirExists())
|
|
81
|
+
if (tools.isDirExists(path.join(process.cwd(), '.config'))) {
|
|
82
|
+
remotesConfig = require(path.join(process.cwd(), '.config', '.euirc-remotes.json'));
|
|
83
|
+
} else {
|
|
84
|
+
remotesConfig = require(path.join(process.cwd(), '.csdr', '.euirc-csdr-remotes.json'));
|
|
85
|
+
}
|
|
86
|
+
|
|
75
87
|
const remoteConfig = remotesConfig[remoteName];
|
|
76
88
|
|
|
77
89
|
return remoteConfig !== undefined;
|
|
@@ -111,7 +123,13 @@ module.exports.getCsdrRemotes = (hostName, euiVersion) => {
|
|
|
111
123
|
tools.logInfo(`--- for euiVersion: ${euiVersion}`);
|
|
112
124
|
}
|
|
113
125
|
|
|
114
|
-
|
|
126
|
+
let remotesConfig;
|
|
127
|
+
if (tools.isDirExists(path.join(process.cwd(), '.config'))) {
|
|
128
|
+
remotesConfig = require(path.join(process.cwd(), '.config', '.euirc-remotes.json'));
|
|
129
|
+
} else {
|
|
130
|
+
remotesConfig = require(path.join(process.cwd(), '.csdr', '.euirc-csdr-remotes.json'));
|
|
131
|
+
}
|
|
132
|
+
|
|
115
133
|
let remotesArray = Object.keys(remotesConfig).map((r) => {
|
|
116
134
|
const remote = remotesConfig[r];
|
|
117
135
|
remote.name = r;
|
|
@@ -74,6 +74,9 @@ module.exports.run = () => {
|
|
|
74
74
|
packages: pkgFolders,
|
|
75
75
|
remotes: remoteFolders
|
|
76
76
|
};
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
if (tools.isDirExists(path.join(process.cwd(), '.config'))) {
|
|
78
|
+
tools.writeJsonFileSync(path.join(process.cwd(), '.config', '.euirc.json'), config);
|
|
79
|
+
} else {
|
|
80
|
+
tools.writeJsonFileSync(path.join(process.cwd(), '.csdr', '.euirc.json'), config);
|
|
81
|
+
}
|
|
79
82
|
}
|
|
@@ -83,6 +83,7 @@ module.exports.cloneHostPackage = (projectName) => {
|
|
|
83
83
|
|
|
84
84
|
return Promise.resolve()
|
|
85
85
|
.then(() => {
|
|
86
|
+
tools.logInfo(`Fetching host package info : ${project.hostPackage}`);
|
|
86
87
|
pkg = configUtils.packages.getPackageByNpmPkg(project.hostPackage, true);
|
|
87
88
|
if (!pkg) {
|
|
88
89
|
throw new Error('Invalid host package provided / unknown to CSDR config');
|
|
@@ -3,80 +3,71 @@
|
|
|
3
3
|
"version": 1,
|
|
4
4
|
"newProjectRoot": "apps",
|
|
5
5
|
"projects": {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
6
|
+
"@remote.name@": {
|
|
7
|
+
"root": ".",
|
|
8
|
+
"sourceRoot": "src",
|
|
9
|
+
"projectType": "application",
|
|
10
|
+
"prefix": "app",
|
|
11
|
+
"schematics": {},
|
|
12
|
+
"architect": {
|
|
13
|
+
"build": {
|
|
14
|
+
"builder": "@angular-devkit/build-angular:application",
|
|
15
|
+
"options": {
|
|
16
|
+
"outputPath": "dist",
|
|
17
|
+
"index": "src/index.html",
|
|
18
|
+
"browser": "src/main.ts",
|
|
19
|
+
"polyfills": [
|
|
20
|
+
],
|
|
21
|
+
"tsConfig": "tsconfig.app.json",
|
|
22
|
+
"scripts": [
|
|
23
|
+
],
|
|
24
|
+
"assets": [
|
|
25
|
+
"src/assets",
|
|
26
|
+
{
|
|
27
|
+
"glob": "**/*",
|
|
28
|
+
"input": "node_modules/@eui/core/assets/",
|
|
29
|
+
"output": "./assets"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"glob": "**/*",
|
|
33
|
+
"input": "node_modules/@eui/styles/dist/assets/",
|
|
34
|
+
"output": "./assets"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"styles": [
|
|
38
|
+
"node_modules/@eui/styles/dist/styles/eui.css",
|
|
39
|
+
"node_modules/@eui/styles/dist/styles/eui-extra-utilities.css",
|
|
40
|
+
"node_modules/@eui/styles/dist/styles/eui-legacy-bootstrap.css",
|
|
41
|
+
"node_modules/@eui/styles/dist/styles/eui-legacy-icons-font.css",
|
|
42
|
+
"node_modules/@eui/styles/dist/styles/eui-legacy-utilities.css"
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
"configurations": {
|
|
46
|
+
"development": {
|
|
47
|
+
"optimization": false,
|
|
48
|
+
"extractLicenses": false,
|
|
49
|
+
"sourceMap": false,
|
|
50
|
+
"namedChunks": true
|
|
51
|
+
},
|
|
52
|
+
"production": {
|
|
53
|
+
"fileReplacements": [
|
|
54
|
+
{
|
|
55
|
+
"replace": "src/environments/environment.ts",
|
|
56
|
+
"with": "src/environments/environment.prod.ts"
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"outputHashing": "none",
|
|
60
|
+
"sourceMap": false
|
|
61
|
+
},
|
|
62
|
+
"serve-dist": {
|
|
63
|
+
"outputPath": "serve-dist"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
40
66
|
}
|
|
41
|
-
],
|
|
42
|
-
"styles": [
|
|
43
|
-
"node_modules/@eui/styles/dist/styles/eui.css",
|
|
44
|
-
"node_modules/@eui/styles/dist/styles/eui-extra-utilities.css",
|
|
45
|
-
"node_modules/@eui/styles/dist/styles/eui-legacy-bootstrap.css",
|
|
46
|
-
"node_modules/@eui/styles/dist/styles/eui-legacy-icons-font.css",
|
|
47
|
-
"node_modules/@eui/styles/dist/styles/eui-legacy-utilities.css"
|
|
48
|
-
]
|
|
49
|
-
},
|
|
50
|
-
"configurations": {
|
|
51
|
-
"development": {
|
|
52
|
-
"optimization": false,
|
|
53
|
-
"extractLicenses": false,
|
|
54
|
-
"sourceMap": false,
|
|
55
|
-
"namedChunks": true
|
|
56
|
-
},
|
|
57
|
-
"production": {
|
|
58
|
-
"fileReplacements": [
|
|
59
|
-
{
|
|
60
|
-
"replace": "src/environments/environment.ts",
|
|
61
|
-
"with": "src/environments/environment.prod.ts"
|
|
62
|
-
}
|
|
63
|
-
],
|
|
64
|
-
"optimization": true,
|
|
65
|
-
"outputHashing": "all",
|
|
66
|
-
"sourceMap": false,
|
|
67
|
-
"namedChunks": false,
|
|
68
|
-
"aot": true,
|
|
69
|
-
"extractLicenses": true
|
|
70
|
-
},
|
|
71
|
-
"serve-dist": {
|
|
72
|
-
"outputPath": "serve-dist"
|
|
73
|
-
}
|
|
74
67
|
}
|
|
75
|
-
}
|
|
76
68
|
}
|
|
77
|
-
}
|
|
78
69
|
},
|
|
79
70
|
"cli": {
|
|
80
|
-
|
|
71
|
+
"analytics": false
|
|
81
72
|
}
|
|
82
|
-
|
|
73
|
+
}
|
|
@@ -1,24 +1,37 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
2
|
+
"extends": "../../tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "./out-tsc/app",
|
|
5
|
+
"target": "ES2022",
|
|
6
|
+
"module": "ES2022",
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"declaration": false,
|
|
10
|
+
"experimentalDecorators": true,
|
|
11
|
+
"moduleResolution": "bundler",
|
|
12
|
+
"importHelpers": true,
|
|
13
|
+
"sourceMap": true,
|
|
14
|
+
"lib": [
|
|
15
|
+
"ES2022",
|
|
16
|
+
"dom"
|
|
17
|
+
],
|
|
18
|
+
"types": [
|
|
19
|
+
"node"
|
|
20
|
+
],
|
|
21
|
+
"paths": {
|
|
22
|
+
"os": [
|
|
23
|
+
"./node_modules/empty-module/index.js"
|
|
24
|
+
],
|
|
25
|
+
"node-fetch": [
|
|
26
|
+
"./node_modules/empty-module/index.js"
|
|
27
|
+
],
|
|
28
|
+
"zipkin": [
|
|
29
|
+
"./node_modules/zipkin/dist/zipkin.js"
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"exclude": [
|
|
34
|
+
"src/test.ts",
|
|
35
|
+
"**/*.spec.ts"
|
|
36
|
+
]
|
|
24
37
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Component } from '@angular/core';
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
2
|
|
|
3
3
|
@Component({
|
|
4
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4
5
|
template: `
|
|
5
6
|
<eui-block-content [isBlocked]="true">
|
|
6
7
|
<div style="height: 100%"></div>
|
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChangeDetectionStrategy, Component, ElementRef, inject, OnDestroy, OnInit, signal } from '@angular/core';
|
|
2
2
|
|
|
3
3
|
import { Subscription } from 'rxjs';
|
|
4
4
|
import { first } from 'rxjs/operators';
|
|
5
5
|
|
|
6
6
|
import { CONFIG_TOKEN } from '@eui/core';
|
|
7
|
-
import {
|
|
7
|
+
import { ElementLifeCycleService, ElementSetupService } from '@csdr/integration/element';
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
Loading = 'loading',
|
|
11
|
-
Loaded = 'loaded',
|
|
12
|
-
Error = 'error',
|
|
13
|
-
}
|
|
9
|
+
type StatusType = 'Loading' | 'Loaded' | 'Failed';
|
|
14
10
|
|
|
15
11
|
@Component({
|
|
12
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
16
13
|
template: `
|
|
17
|
-
|
|
18
|
-
<div style="height: 100%"></div>
|
|
19
|
-
</eui-block-content>
|
|
20
|
-
<ng-container *ngIf="moduleStatus === ElementStatus.Loaded">
|
|
14
|
+
@if (status() === 'Loaded') {
|
|
21
15
|
<router-outlet></router-outlet>
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
}
|
|
17
|
+
@if (status() === 'Loading') {
|
|
18
|
+
<eui-block-content [isBlocked]="true">
|
|
19
|
+
<div style="height: 100%"></div>
|
|
20
|
+
</eui-block-content>
|
|
21
|
+
}
|
|
22
|
+
@if (status() === 'Failed') {
|
|
24
23
|
<div class="error-container">
|
|
25
24
|
<div>
|
|
26
25
|
<h1>Translations or user data for this module failed to load.</h1>
|
|
@@ -30,8 +29,7 @@ enum ElementStatus {
|
|
|
30
29
|
</button>
|
|
31
30
|
</div>
|
|
32
31
|
</div>
|
|
33
|
-
|
|
34
|
-
`,
|
|
32
|
+
}`,
|
|
35
33
|
styles: [`
|
|
36
34
|
.error-container {
|
|
37
35
|
width: 50vw;
|
|
@@ -48,10 +46,9 @@ enum ElementStatus {
|
|
|
48
46
|
`],
|
|
49
47
|
})
|
|
50
48
|
export class ModuleComponent implements OnInit, OnDestroy {
|
|
51
|
-
|
|
52
|
-
moduleStatus: ElementStatus;
|
|
49
|
+
status = signal<StatusType | undefined>(undefined);
|
|
53
50
|
|
|
54
|
-
private initSubscription: Subscription;
|
|
51
|
+
private initSubscription: Subscription | undefined = undefined;
|
|
55
52
|
|
|
56
53
|
private elRef = inject(ElementRef);
|
|
57
54
|
private config = inject(CONFIG_TOKEN);
|
|
@@ -69,8 +66,8 @@ export class ModuleComponent implements OnInit, OnDestroy {
|
|
|
69
66
|
this.elementLifeCycleService.cleanup();
|
|
70
67
|
}
|
|
71
68
|
|
|
72
|
-
|
|
73
|
-
this.
|
|
69
|
+
loadData() {
|
|
70
|
+
this.status.set('Loading');
|
|
74
71
|
try {
|
|
75
72
|
this.initSubscription?.unsubscribe();
|
|
76
73
|
|
|
@@ -79,19 +76,15 @@ export class ModuleComponent implements OnInit, OnDestroy {
|
|
|
79
76
|
.pipe(first())
|
|
80
77
|
.subscribe((loadStatus: { success: boolean; error?: string }) => {
|
|
81
78
|
if (!loadStatus.success) {
|
|
82
|
-
this.
|
|
79
|
+
this.status.set('Failed');
|
|
83
80
|
console.error(`[ELEMENT: ${this.config.global.elementName}] `, loadStatus.error);
|
|
84
81
|
} else {
|
|
85
|
-
this.
|
|
82
|
+
this.status.set('Loaded');
|
|
86
83
|
}
|
|
87
84
|
});
|
|
88
85
|
} catch (e) {
|
|
89
86
|
console.log(e);
|
|
90
|
-
this.
|
|
87
|
+
this.status.set('Failed');
|
|
91
88
|
}
|
|
92
89
|
}
|
|
93
|
-
|
|
94
|
-
private setStatus(status: ElementStatus) {
|
|
95
|
-
this.moduleStatus = status;
|
|
96
|
-
}
|
|
97
90
|
}
|
|
@@ -1,37 +1,35 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChangeDetectionStrategy, Component, ElementRef, inject, OnDestroy, OnInit, signal } from '@angular/core';
|
|
2
2
|
|
|
3
3
|
import { Subscription } from 'rxjs';
|
|
4
4
|
import { first } from 'rxjs/operators';
|
|
5
5
|
|
|
6
6
|
import { CONFIG_TOKEN } from '@eui/core';
|
|
7
|
-
import {
|
|
7
|
+
import { ElementLifeCycleService, ElementSetupService } from '@csdr/integration/element';
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
Loading = 'loading',
|
|
11
|
-
Loaded = 'loaded',
|
|
12
|
-
Error = 'error',
|
|
13
|
-
}
|
|
9
|
+
type StatusType = 'Loading' | 'Loaded' | 'Failed';
|
|
14
10
|
|
|
15
11
|
@Component({
|
|
12
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
16
13
|
template: `
|
|
17
|
-
|
|
18
|
-
<div style="height: 100%"></div>
|
|
19
|
-
</eui-block-content>
|
|
20
|
-
<ng-container *ngIf="moduleStatus === ElementStatus.Loaded">
|
|
14
|
+
@if (status() === 'Loaded') {
|
|
21
15
|
<!-- BLOCK_CONTAINER_PLACEHOLDER -->
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
}
|
|
17
|
+
@if (status() === 'Loading') {
|
|
18
|
+
<eui-block-content [isBlocked]="true">
|
|
19
|
+
<div style="height: 100%"></div>
|
|
20
|
+
</eui-block-content>
|
|
21
|
+
}
|
|
22
|
+
@if (status() === 'Failed') {
|
|
24
23
|
<div class="error-container">
|
|
25
24
|
<div>
|
|
26
25
|
<h1>Translations or user data for this module failed to load.</h1>
|
|
27
26
|
<p>Do you want to try again?</p>
|
|
28
27
|
<button euiButton euiPrimary (click)="loadData()">
|
|
29
|
-
<span euiLabel>{{
|
|
28
|
+
<span euiLabel>{{ 'global.RELOAD' | translate }}</span>
|
|
30
29
|
</button>
|
|
31
30
|
</div>
|
|
32
31
|
</div>
|
|
33
|
-
|
|
34
|
-
`,
|
|
32
|
+
}`,
|
|
35
33
|
styles: [`
|
|
36
34
|
.error-container {
|
|
37
35
|
width: 50vw;
|
|
@@ -48,18 +46,16 @@ enum ElementStatus {
|
|
|
48
46
|
`],
|
|
49
47
|
})
|
|
50
48
|
export class ModuleComponent implements OnInit, OnDestroy {
|
|
51
|
-
|
|
52
|
-
moduleStatus: ElementStatus;
|
|
49
|
+
status = signal<StatusType | undefined>(undefined);
|
|
53
50
|
|
|
54
51
|
block: any;
|
|
55
52
|
|
|
56
|
-
private initSubscription: Subscription;
|
|
53
|
+
private initSubscription: Subscription | undefined = undefined;
|
|
57
54
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
55
|
+
private elRef = inject(ElementRef);
|
|
56
|
+
private config = inject(CONFIG_TOKEN);
|
|
57
|
+
private elementLifeCycleService = inject(ElementLifeCycleService);
|
|
58
|
+
private elementSetupService = inject(ElementSetupService);
|
|
63
59
|
|
|
64
60
|
ngOnInit() {
|
|
65
61
|
this.block = this.elRef.nativeElement.block;
|
|
@@ -73,8 +69,8 @@ export class ModuleComponent implements OnInit, OnDestroy {
|
|
|
73
69
|
this.elementLifeCycleService.cleanup();
|
|
74
70
|
}
|
|
75
71
|
|
|
76
|
-
|
|
77
|
-
this.
|
|
72
|
+
loadData() {
|
|
73
|
+
this.status.set('Loading');
|
|
78
74
|
try {
|
|
79
75
|
this.initSubscription?.unsubscribe();
|
|
80
76
|
|
|
@@ -83,19 +79,15 @@ export class ModuleComponent implements OnInit, OnDestroy {
|
|
|
83
79
|
.pipe(first())
|
|
84
80
|
.subscribe((loadStatus: { success: boolean, error?: string }) => {
|
|
85
81
|
if (!loadStatus.success) {
|
|
86
|
-
this.
|
|
82
|
+
this.status.set('Failed');
|
|
87
83
|
console.error(`[ELEMENT: ${this.config.global.elementName}] `, loadStatus.error);
|
|
88
84
|
} else {
|
|
89
|
-
this.
|
|
85
|
+
this.status.set('Loaded');
|
|
90
86
|
}
|
|
91
87
|
});
|
|
92
88
|
} catch (e) {
|
|
93
89
|
console.log(e);
|
|
94
|
-
this.
|
|
90
|
+
this.status.set('Failed');
|
|
95
91
|
}
|
|
96
92
|
}
|
|
97
|
-
|
|
98
|
-
private setStatus(status: ElementStatus) {
|
|
99
|
-
this.moduleStatus = status;
|
|
100
|
-
}
|
|
101
93
|
}
|
|
@@ -25,10 +25,17 @@ const getPackageVersions = (module.exports.getPackageVersions = (pkg) => {
|
|
|
25
25
|
} catch(e) {
|
|
26
26
|
npmOutput = e.stdout;
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
// console.log(npmOutput);
|
|
29
29
|
|
|
30
30
|
let versions = [];
|
|
31
31
|
|
|
32
|
+
if (!npmOutput) {
|
|
33
|
+
tools.logWarning('Cannot find version of pkg - package is probably not published yet');
|
|
34
|
+
return versions;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const json = JSON.parse(npmOutput);
|
|
38
|
+
|
|
32
39
|
if (json.error) {
|
|
33
40
|
tools.logWarning('Error detected while trying to fetch the pkg version');
|
|
34
41
|
console.log(json.error);
|
|
@@ -17,7 +17,12 @@ module.exports.sync = () => {
|
|
|
17
17
|
return Promise.resolve()
|
|
18
18
|
.then(() => {
|
|
19
19
|
tools.logInfo('Resetting package.json');
|
|
20
|
-
|
|
20
|
+
|
|
21
|
+
if (tools.isDirExists(path.join(process.cwd(), '.config'))) {
|
|
22
|
+
return tools.copy(path.join(process.cwd(), '.config', 'package.json.reset'), path.join(process.cwd(), 'package.json'));
|
|
23
|
+
} else {
|
|
24
|
+
return tools.copy(path.join(process.cwd(), '.csdr', 'package.json.reset'), path.join(process.cwd(), 'package.json'));
|
|
25
|
+
}
|
|
21
26
|
})
|
|
22
27
|
.then(() => {
|
|
23
28
|
tools.logInfo('Removing yarn.lock');
|