@eui/tools 6.19.0 → 6.19.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.
@@ -1 +1 @@
1
- 6.19.0
1
+ 6.19.1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 6.19.1 (2024-07-26)
2
+
3
+ ##### Chores
4
+
5
+ * **other:**
6
+ * 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))
7
+
8
+ * * *
9
+ * * *
1
10
  ## 6.19.0 (2024-07-25)
2
11
 
3
12
  ##### Chores
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "6.19.0",
3
+ "version": "6.19.1",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
@@ -28,9 +28,8 @@ new Vue({
28
28
  { label: "Frontend UI package or remote", value: "frontend" },
29
29
  ],
30
30
  frontendVersions: [
31
- { label: "15.x", value: "15" },
32
- { label: "16.x", value: "16" },
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: "16",
47
+ pkgFrontendVersion: "17",
49
48
  pkgFrontendType: "default",
50
49
  pkgScope: "@zzz",
51
50
  pkgName: "my-package",
@@ -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
  }
@@ -29,7 +29,8 @@ module.exports.CONFIG_OPTIONS = {
29
29
  pkgFrontendVersion: {
30
30
  EUI15: '15',
31
31
  EUI16: '16',
32
- EUI17: '17'
32
+ EUI17: '17',
33
+ EUI18: '18'
33
34
  }
34
35
  }
35
36
 
@@ -57,7 +57,12 @@ const generateRemote = (args = constants.DEFAULT_CONFIG) => {
57
57
 
58
58
  const configOptions = configUtils.global.getConfigOptions();
59
59
 
60
- const remoteConfigTargetPath = path.join(configOptions.CSDR_REMOTES_CONFIG_PATH , 'assets', args.fullName);
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,6 @@
1
+ {
2
+ "styles": [
3
+ "node_modules/@eui/styles/dist/styles/eui.css",
4
+ "node_modules/@eui/styles/dist/styles/eui-utilities.css"
5
+ ]
6
+ }
@@ -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 configOptions = configUtils.global.getConfigOptions();
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
- return cloneRemotesConfig();
76
+ if (tools.isDirExists(path.join(process.cwd(), '.csdr'))) {
77
+ return cloneRemotesConfig();
78
+ }
73
79
  }
74
80
  })
75
81