@eui/tools 6.19.0 → 6.19.2
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 +18 -0
- package/package.json +1 -1
- package/scripts/app/public/package-init.js +3 -4
- package/scripts/app/server.js +1 -0
- package/scripts/csdr/cli/constants.js +2 -1
- package/scripts/csdr/cli/package-build-frontend.js +6 -1
- package/scripts/csdr/cli/package.js +4 -0
- package/scripts/csdr/cli/skeletons/virtual-remote/18.x/angular-config.json +6 -0
- package/scripts/csdr/cli/skeletons/virtual-remote/18.x/dependencies.json +21 -0
- package/scripts/csdr/config/global.js +1 -1
- package/scripts/csdr/config/register.js +1 -1
- package/scripts/csdr/config/remotes.js +9 -7
- package/scripts/csdr/init/remotes.js +7 -1
- package/scripts/utils/pre-build/injection/config.js +5 -4
- package/scripts/utils/pre-build/injection/externals.js +14 -2
package/.version.properties
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6.19.
|
|
1
|
+
6.19.2
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## 6.19.2 (2024-07-26)
|
|
2
|
+
|
|
3
|
+
##### Chores
|
|
4
|
+
|
|
5
|
+
* **other:**
|
|
6
|
+
* add option for injection of host sources for api config and mock - EUI-9788 [EUI-9788](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-9788) ([ec2b5075](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/ec2b50755fba6d0b4b085b0621870ba508880a2d))
|
|
7
|
+
|
|
8
|
+
* * *
|
|
9
|
+
* * *
|
|
10
|
+
## 6.19.1 (2024-07-26)
|
|
11
|
+
|
|
12
|
+
##### Chores
|
|
13
|
+
|
|
14
|
+
* **other:**
|
|
15
|
+
* adapted package init and generateRemote for external portal config - EUI-9788 [EUI-9788](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-9788) ([6bbf7b3a](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/6bbf7b3a25677be4e7e83aacb948378f4a24e5d8))
|
|
16
|
+
|
|
17
|
+
* * *
|
|
18
|
+
* * *
|
|
1
19
|
## 6.19.0 (2024-07-25)
|
|
2
20
|
|
|
3
21
|
##### Chores
|
package/package.json
CHANGED
|
@@ -28,9 +28,8 @@ new Vue({
|
|
|
28
28
|
{ label: "Frontend UI package or remote", value: "frontend" },
|
|
29
29
|
],
|
|
30
30
|
frontendVersions: [
|
|
31
|
-
{ label: "
|
|
32
|
-
{ label: "
|
|
33
|
-
{ label: "17.x", value: "17" }
|
|
31
|
+
{ label: "17.x", value: "17" },
|
|
32
|
+
{ label: "18.x", value: "18" }
|
|
34
33
|
],
|
|
35
34
|
frontendTypes: [
|
|
36
35
|
{ label: "default UI package", value: "default" },
|
|
@@ -45,7 +44,7 @@ new Vue({
|
|
|
45
44
|
getDefaultParams() {
|
|
46
45
|
return {
|
|
47
46
|
pkgType: "frontend",
|
|
48
|
-
pkgFrontendVersion: "
|
|
47
|
+
pkgFrontendVersion: "17",
|
|
49
48
|
pkgFrontendType: "default",
|
|
50
49
|
pkgScope: "@zzz",
|
|
51
50
|
pkgName: "my-package",
|
package/scripts/app/server.js
CHANGED
|
@@ -29,6 +29,7 @@ app.listen(app.get('port'), () => {
|
|
|
29
29
|
open('http://localhost:3000/stats.html');
|
|
30
30
|
} else if (packageInit) {
|
|
31
31
|
open('http://localhost:3000/package-init.html');
|
|
32
|
+
console.log('open your browser at : http://localhost:3000/package-init.html');
|
|
32
33
|
} else {
|
|
33
34
|
open('http://localhost:3000');
|
|
34
35
|
}
|
|
@@ -57,7 +57,12 @@ const generateRemote = (args = constants.DEFAULT_CONFIG) => {
|
|
|
57
57
|
|
|
58
58
|
const configOptions = configUtils.global.getConfigOptions();
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
let remoteConfigTargetPath;
|
|
61
|
+
if (tools.isDirExists(path.join(process.cwd(), '.config'))) {
|
|
62
|
+
remoteConfigTargetPath = path.join(configOptions.CSDR_REMOTES_CONFIG_PATH , args.fullName);
|
|
63
|
+
} else {
|
|
64
|
+
remoteConfigTargetPath = path.join(configOptions.CSDR_REMOTES_CONFIG_PATH , 'assets', args.fullName);
|
|
65
|
+
}
|
|
61
66
|
|
|
62
67
|
return Promise.resolve()
|
|
63
68
|
// INIT and cleanup
|
|
@@ -39,6 +39,10 @@ const generateArgs = (args) => {
|
|
|
39
39
|
} else if (args.pkgFrontendVersion === constants.CONFIG_OPTIONS.pkgFrontendVersion.EUI17) {
|
|
40
40
|
fullName += '-eui17-remote-el-ui';
|
|
41
41
|
npmPkgName = `${args.pkgScope}/${args.pkgName}-eui17-remote-el`;
|
|
42
|
+
|
|
43
|
+
} else if (args.pkgFrontendVersion === constants.CONFIG_OPTIONS.pkgFrontendVersion.EUI18) {
|
|
44
|
+
fullName += '-eui18-remote-el-ui';
|
|
45
|
+
npmPkgName = `${args.pkgScope}/${args.pkgName}-eui18-remote-el`;
|
|
42
46
|
}
|
|
43
47
|
}
|
|
44
48
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"base": {
|
|
3
|
+
},
|
|
4
|
+
"composite": {
|
|
5
|
+
"@eui/deps-base": "^18.0.0",
|
|
6
|
+
"@module.scope@/@module.name@": "^1.0.0",
|
|
7
|
+
"@mywp/shared": "^6.0.0",
|
|
8
|
+
"@csdr/core": "^6.0.0",
|
|
9
|
+
"@csdr/integration": "^5.0.0"
|
|
10
|
+
},
|
|
11
|
+
"INT": {
|
|
12
|
+
},
|
|
13
|
+
"ACC": {
|
|
14
|
+
},
|
|
15
|
+
"DLT": {
|
|
16
|
+
},
|
|
17
|
+
"TRN": {
|
|
18
|
+
},
|
|
19
|
+
"PROD": {
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -19,7 +19,7 @@ module.exports.getCsdrConfig = (full = true) => {
|
|
|
19
19
|
globalConfig = require(path.join(process.cwd(), '.config', '.euirc-config.json'));
|
|
20
20
|
appsConfig = require(path.join(process.cwd(), '.config', '.euirc-apps.json'));
|
|
21
21
|
packagesConfig = require(path.join(process.cwd(), '.config', '.euirc-packages.json'));
|
|
22
|
-
remotesConfig = require(path.join(process.cwd(), '.config', '.euirc-remotes.json'));
|
|
22
|
+
remotesConfig = require(path.join(process.cwd(), '.config', 'remotes', '.euirc-remotes.json'));
|
|
23
23
|
|
|
24
24
|
} else {
|
|
25
25
|
globalConfig = require(path.join(process.cwd(), '.csdr', '.euirc-csdr-config.json'));
|
|
@@ -93,7 +93,7 @@ module.exports.registerCsdrPackage = (pkg, rootPkgScope, rootPkgName, euiVersion
|
|
|
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');
|
|
96
|
+
file = path.join(process.cwd(), '.config', 'remotes', '.euirc-remotes.json');
|
|
97
97
|
} else {
|
|
98
98
|
file = path.join(process.cwd(), '.csdr', '.euirc-csdr-remotes.json');
|
|
99
99
|
}
|
|
@@ -18,17 +18,19 @@ module.exports.getRemote = (remoteName) => {
|
|
|
18
18
|
remoteName = tools.getArgs().root;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
const configOptions = configUtils.global.getConfigOptions();
|
|
22
|
+
|
|
21
23
|
let remotesConfig;
|
|
24
|
+
let remotePath;
|
|
22
25
|
if (tools.isDirExists(path.join(process.cwd(), '.config'))) {
|
|
23
|
-
remotesConfig = require(path.join(process.cwd(), '.config', '.euirc-remotes.json'));
|
|
26
|
+
remotesConfig = require(path.join(process.cwd(), '.config', 'remotes', '.euirc-remotes.json'));
|
|
27
|
+
remotePath = path.join(configOptions.CSDR_REMOTES_CONFIG_PATH , remoteName);
|
|
24
28
|
} else {
|
|
25
29
|
remotesConfig = require(path.join(process.cwd(), '.csdr', '.euirc-csdr-remotes.json'));
|
|
30
|
+
remotePath = path.join(configOptions.CSDR_REMOTES_CONFIG_PATH , 'assets', remoteName);
|
|
26
31
|
}
|
|
27
|
-
const remoteConfig = remotesConfig[remoteName];
|
|
28
32
|
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
const remotePath = path.join(configOptions.CSDR_REMOTES_CONFIG_PATH , 'assets', remoteName);
|
|
33
|
+
const remoteConfig = remotesConfig[remoteName];
|
|
32
34
|
|
|
33
35
|
if (!tools.isDirExists(remotePath)) {
|
|
34
36
|
throw new Error(`Remote ${remoteName} cannot be found in the remotes global config - check ${configOptions.CSDR_REMOTES_CONFIG_PATH} for available remotes`);
|
|
@@ -79,7 +81,7 @@ module.exports.isVirtualRemote = (remoteName) => {
|
|
|
79
81
|
let remotesConfig;
|
|
80
82
|
console.log(tools.isDirExists())
|
|
81
83
|
if (tools.isDirExists(path.join(process.cwd(), '.config'))) {
|
|
82
|
-
remotesConfig = require(path.join(process.cwd(), '.config', '.euirc-remotes.json'));
|
|
84
|
+
remotesConfig = require(path.join(process.cwd(), '.config', 'remotes', '.euirc-remotes.json'));
|
|
83
85
|
} else {
|
|
84
86
|
remotesConfig = require(path.join(process.cwd(), '.csdr', '.euirc-csdr-remotes.json'));
|
|
85
87
|
}
|
|
@@ -125,7 +127,7 @@ module.exports.getCsdrRemotes = (hostName, euiVersion) => {
|
|
|
125
127
|
|
|
126
128
|
let remotesConfig;
|
|
127
129
|
if (tools.isDirExists(path.join(process.cwd(), '.config'))) {
|
|
128
|
-
remotesConfig = require(path.join(process.cwd(), '.config', '.euirc-remotes.json'));
|
|
130
|
+
remotesConfig = require(path.join(process.cwd(), '.config', 'remotes', '.euirc-remotes.json'));
|
|
129
131
|
} else {
|
|
130
132
|
remotesConfig = require(path.join(process.cwd(), '.csdr', '.euirc-csdr-remotes.json'));
|
|
131
133
|
}
|
|
@@ -14,6 +14,10 @@ const { skipReset } = tools.getArgs();
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
module.exports.initRemotesConfig = () => {
|
|
17
|
+
if (tools.isDirExists(path.join(process.cwd(), '.config'))) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
|
|
17
21
|
return Promise.resolve()
|
|
18
22
|
.then(() => {
|
|
19
23
|
const pkg = configUtils.packages.getPackageByNpmPkg('@csdr/remotes-config', true);
|
|
@@ -69,7 +73,9 @@ module.exports.generateVirtualRemote = (remoteName, cloneRemote = true) => {
|
|
|
69
73
|
// clone remotes config if first init
|
|
70
74
|
.then(() => {
|
|
71
75
|
if (cloneRemote) {
|
|
72
|
-
|
|
76
|
+
if (tools.isDirExists(path.join(process.cwd(), '.csdr'))) {
|
|
77
|
+
return cloneRemotesConfig();
|
|
78
|
+
}
|
|
73
79
|
}
|
|
74
80
|
})
|
|
75
81
|
|
|
@@ -25,7 +25,7 @@ const configUtils = require('../../../csdr/config/config-utils');
|
|
|
25
25
|
|
|
26
26
|
/* PRIVATE METHODS */
|
|
27
27
|
|
|
28
|
-
const injectConfigCore = (project, npmPkg) => {
|
|
28
|
+
const injectConfigCore = (project, npmPkg, folder = 'assets') => {
|
|
29
29
|
// check if package is locally cloned
|
|
30
30
|
const localPackage = configUtils.packages.getPackages().filter((p) => {
|
|
31
31
|
return p.npmPkg === npmPkg
|
|
@@ -37,13 +37,13 @@ const injectConfigCore = (project, npmPkg) => {
|
|
|
37
37
|
|
|
38
38
|
// if local package is found
|
|
39
39
|
if (localPackage) {
|
|
40
|
-
pkgAssetsPath = path.join(process.cwd(), 'packages', localPackage.name,
|
|
40
|
+
pkgAssetsPath = path.join(process.cwd(), 'packages', localPackage.name, folder);
|
|
41
41
|
|
|
42
42
|
// if not sources are taken from the npm package def in node_modules
|
|
43
43
|
} else {
|
|
44
44
|
const npmPkgScope = npmPkg.substr(0, npmPkg.indexOf('/'));
|
|
45
45
|
const npmPkgName = npmPkg.substr(npmPkg.indexOf('/') + 1);
|
|
46
|
-
pkgAssetsPath = path.join(process.cwd(), 'node_modules', npmPkgScope, npmPkgName,
|
|
46
|
+
pkgAssetsPath = path.join(process.cwd(), 'node_modules', npmPkgScope, npmPkgName, folder);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
if (!tools.isDirExists(pkgAssetsPath)) {
|
|
@@ -83,7 +83,8 @@ module.exports.injectConfig = (project) => {
|
|
|
83
83
|
|
|
84
84
|
// single config/npm package defined
|
|
85
85
|
} else {
|
|
86
|
-
|
|
86
|
+
console.log(project.config.folder)
|
|
87
|
+
injectConfigCore(project, project.config.npmPkg, project.config.folder);
|
|
87
88
|
}
|
|
88
89
|
})
|
|
89
90
|
|
|
@@ -387,11 +387,23 @@ module.exports.injectExternalMock = (project) => {
|
|
|
387
387
|
|
|
388
388
|
return Promise.resolve()
|
|
389
389
|
.then(() => {
|
|
390
|
-
if (!
|
|
390
|
+
if (!project.mock) {
|
|
391
391
|
tools.logInfo('No external mock setup...skipping')
|
|
392
392
|
|
|
393
393
|
} else {
|
|
394
|
-
|
|
394
|
+
if (project.mock.npmPkg && project.mock.folder) {
|
|
395
|
+
const localPackage = configUtils.packages.getPackages().filter((p) => {
|
|
396
|
+
return p.npmPkg === project.mock.npmPkg
|
|
397
|
+
})[0];
|
|
398
|
+
|
|
399
|
+
tools.copydir(
|
|
400
|
+
path.join(process.cwd(), 'packages', localPackage.name, project.mock.folder),
|
|
401
|
+
path.join(process.cwd(), project.folder, 'mock')
|
|
402
|
+
);
|
|
403
|
+
|
|
404
|
+
} else {
|
|
405
|
+
return gitUtils.cloneRepo(project.mock.repository, project.mock.folder, false, true);
|
|
406
|
+
}
|
|
395
407
|
}
|
|
396
408
|
})
|
|
397
409
|
|