@eui/tools 5.3.26 → 5.3.27

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
- 5.3.26
1
+ 5.3.27
package/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 5.3.27 (2022-06-29)
2
+
3
+ ##### Bug Fixes
4
+
5
+ * **other:**
6
+ * removed packages injection config injection for MWP - adapted default config injection for MWP - MWP-7700 [MWP-7700](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-7700) ([a9ae69f4](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/a9ae69f49558b66afbf6e3ce9395148c924023c0))
7
+
8
+ * * *
9
+ * * *
1
10
  ## 5.3.26 (2022-06-23)
2
11
 
3
12
  ##### Chores
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "5.3.26",
3
+ "version": "5.3.27",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
@@ -68,9 +68,9 @@ const injectConfig = (project) => {
68
68
  }
69
69
  })
70
70
 
71
- .then(() => {
72
- return injectPackagesConfig(project);
73
- })
71
+ // .then(() => {
72
+ // return injectPackagesConfig(project);
73
+ // })
74
74
 
75
75
  .catch((e) => {
76
76
  throw e;
@@ -78,129 +78,129 @@ const injectConfig = (project) => {
78
78
  }
79
79
 
80
80
 
81
- const injectPackagesConfig = (project) => {
82
- tools.logTitle('Injecting package config');
81
+ // const injectPackagesConfig = (project) => {
82
+ // tools.logTitle('Injecting package config');
83
83
 
84
- return Promise.resolve()
84
+ // return Promise.resolve()
85
85
 
86
- // fetching current project linked composite packages dependencies
87
- .then(() => {
88
- return installUtils.common.getLocalProjectDeps(project);
89
- })
86
+ // // fetching current project linked composite packages dependencies
87
+ // .then(() => {
88
+ // return installUtils.common.getLocalProjectDeps(project);
89
+ // })
90
90
 
91
91
 
92
- // remapping dependencies with package names
93
- .then((prjDeps) => {
92
+ // // remapping dependencies with package names
93
+ // .then((prjDeps) => {
94
94
 
95
- // gather only the locally installed projects,
96
- const localPackagesConfig = configUtils.packages.getPackages();
95
+ // // gather only the locally installed projects,
96
+ // const localPackagesConfig = configUtils.packages.getPackages();
97
97
 
98
- let localPackagesArray = [];
98
+ // let localPackagesArray = [];
99
99
 
100
- Object.keys(prjDeps).forEach((p) => {
101
- const filteredPackage = localPackagesConfig.filter((fp) => {
102
- // filtering from the current deps pkg
103
- return fp.npmPkg === p;
104
- })[0];
100
+ // Object.keys(prjDeps).forEach((p) => {
101
+ // const filteredPackage = localPackagesConfig.filter((fp) => {
102
+ // // filtering from the current deps pkg
103
+ // return fp.npmPkg === p;
104
+ // })[0];
105
105
 
106
- if (filteredPackage) localPackagesArray.push(filteredPackage.name);
107
- });
106
+ // if (filteredPackage) localPackagesArray.push(filteredPackage.name);
107
+ // });
108
108
 
109
109
 
110
110
 
111
- // gather the full CSDR packages from project dependencies
112
- const csdrPackagesConfig = configUtils.packages.getCsdrPackagesFull();
111
+ // // gather the full CSDR packages from project dependencies
112
+ // const csdrPackagesConfig = configUtils.packages.getCsdrPackagesFull();
113
113
 
114
- let csdrPackagesArray = [];
114
+ // let csdrPackagesArray = [];
115
115
 
116
- Object.keys(prjDeps).forEach((p) => {
117
- const filteredPackage = csdrPackagesConfig.filter((fp) => {
118
- // filtering from the current deps pkg; excluding the ones found locally
119
- return fp.npmPkg === p && !localPackagesArray.includes(fp.name);
120
- })[0];
116
+ // Object.keys(prjDeps).forEach((p) => {
117
+ // const filteredPackage = csdrPackagesConfig.filter((fp) => {
118
+ // // filtering from the current deps pkg; excluding the ones found locally
119
+ // return fp.npmPkg === p && !localPackagesArray.includes(fp.name);
120
+ // })[0];
121
121
 
122
- if (filteredPackage) csdrPackagesArray.push(filteredPackage.npmPkg);
123
- });
122
+ // if (filteredPackage) csdrPackagesArray.push(filteredPackage.npmPkg);
123
+ // });
124
124
 
125
125
 
126
- return {
127
- csdrPackages: csdrPackagesArray,
128
- localPackages: localPackagesArray,
129
- };
130
- })
126
+ // return {
127
+ // csdrPackages: csdrPackagesArray,
128
+ // localPackages: localPackagesArray,
129
+ // };
130
+ // })
131
131
 
132
132
 
133
- // checking filtered packages if config overrides is provided
134
- .then((filteredPackages) => {
133
+ // // checking filtered packages if config overrides is provided
134
+ // .then((filteredPackages) => {
135
135
 
136
- // checking installed packages
137
- filteredPackages.csdrPackages.forEach((p) => {
138
- const pkgPath = path.join(process.cwd(), 'node_modules', p);
139
- processPackageConfig(project, pkgPath);
140
- })
136
+ // // checking installed packages
137
+ // filteredPackages.csdrPackages.forEach((p) => {
138
+ // const pkgPath = path.join(process.cwd(), 'node_modules', p);
139
+ // processPackageConfig(project, pkgPath);
140
+ // })
141
141
 
142
- // checking local packages
143
- filteredPackages.localPackages.forEach((p) => {
144
- const pkgPath = path.join(process.cwd(), 'packages', p);
145
- processPackageConfig(project, pkgPath);
146
- })
142
+ // // checking local packages
143
+ // filteredPackages.localPackages.forEach((p) => {
144
+ // const pkgPath = path.join(process.cwd(), 'packages', p);
145
+ // processPackageConfig(project, pkgPath);
146
+ // })
147
147
 
148
- })
148
+ // })
149
149
 
150
150
 
151
- .catch((e) => {
152
- throw e;
153
- })
154
- }
151
+ // .catch((e) => {
152
+ // throw e;
153
+ // })
154
+ // }
155
155
 
156
- const processPackageConfig = (project, folder) => {
157
- const configPath = path.join(folder, 'assets', 'config');
158
- tools.logInfo(`checking ${configPath}`);
156
+ // const processPackageConfig = (project, folder) => {
157
+ // const configPath = path.join(folder, 'assets', 'config');
158
+ // tools.logInfo(`checking ${configPath}`);
159
159
 
160
- // checking if pkg contains overriden config
161
- if (!tools.isDirExists(configPath)) {
162
- tools.logWarning('not found...skipping');
160
+ // // checking if pkg contains overriden config
161
+ // if (!tools.isDirExists(configPath)) {
162
+ // tools.logWarning('not found...skipping');
163
163
 
164
- // processing the files found and mapping them to base config files
165
- } else {
166
- const configFiles = tools.getFiles(configPath);
167
- tools.logSuccess('OK, found config files : ');
168
- console.log(configFiles);
164
+ // // processing the files found and mapping them to base config files
165
+ // } else {
166
+ // const configFiles = tools.getFiles(configPath);
167
+ // tools.logSuccess('OK, found config files : ');
168
+ // console.log(configFiles);
169
169
 
170
- // checking if files maps the base config file
171
- const projectAssetsPath = path.join(process.cwd(), project.folder, 'src', 'assets');
172
- const baseConfigFiles = tools.getFiles(projectAssetsPath);
170
+ // // checking if files maps the base config file
171
+ // const projectAssetsPath = path.join(process.cwd(), project.folder, 'src', 'assets');
172
+ // const baseConfigFiles = tools.getFiles(projectAssetsPath);
173
173
 
174
- configFiles.forEach((f) => {
175
- if (!baseConfigFiles.includes(f)) {
176
- tools.logWarning(`${f} is not matching base config files`);
174
+ // configFiles.forEach((f) => {
175
+ // if (!baseConfigFiles.includes(f)) {
176
+ // tools.logWarning(`${f} is not matching base config files`);
177
177
 
178
- } else {
179
- tools.logSuccess(`${f} matched in base config files...processing`);
178
+ // } else {
179
+ // tools.logSuccess(`${f} matched in base config files...processing`);
180
180
 
181
- // fetching files content
182
- const configFileContent = tools.getJsonFileContent(path.join(configPath, f));
183
- const baseConfigFileContent = tools.getJsonFileContent(path.join(projectAssetsPath, f));
181
+ // // fetching files content
182
+ // const configFileContent = tools.getJsonFileContent(path.join(configPath, f));
183
+ // const baseConfigFileContent = tools.getJsonFileContent(path.join(projectAssetsPath, f));
184
184
 
185
- baseConfigFileContent.openIdConnect.apiGatewayServices = {
186
- ...baseConfigFileContent.openIdConnect.apiGatewayServices,
187
- ...configFileContent.apiGatewayServices
188
- };
185
+ // baseConfigFileContent.openIdConnect.apiGatewayServices = {
186
+ // ...baseConfigFileContent.openIdConnect.apiGatewayServices,
187
+ // ...configFileContent.apiGatewayServices
188
+ // };
189
189
 
190
- baseConfigFileContent.modules = {
191
- ...baseConfigFileContent.modules,
192
- ...configFileContent.modules
193
- };
190
+ // baseConfigFileContent.modules = {
191
+ // ...baseConfigFileContent.modules,
192
+ // ...configFileContent.modules
193
+ // };
194
194
 
195
- tools.writeJsonFileSync(path.join(projectAssetsPath, f), baseConfigFileContent);
195
+ // tools.writeJsonFileSync(path.join(projectAssetsPath, f), baseConfigFileContent);
196
196
 
197
- tools.logSuccess('OK => file processed');
198
- }
197
+ // tools.logSuccess('OK => file processed');
198
+ // }
199
199
 
200
- })
201
- }
202
- }
200
+ // })
201
+ // }
202
+ // }
203
203
 
204
204
 
205
205
  module.exports.injectConfig = injectConfig;
206
- module.exports.injectPackagesConfig = injectPackagesConfig;
206
+ // module.exports.injectPackagesConfig = injectPackagesConfig;
@@ -160,6 +160,9 @@ module.exports.injectAppConfig = (project, configEnvTarget) => {
160
160
  envFilePath = path.join(project.paths.angularPath, 'src/assets/config', `env-json-config-${configEnvTarget}.json`);
161
161
  }
162
162
 
163
+ if (project.build && project.build.customEnvJsonConfigInjection) {
164
+ return;
165
+ }
163
166
  if (!tools.isFileExists(envFilePath)) {
164
167
  tools.logError(`Cannot find environment config to inject : `);
165
168
  tools.logError(`${envFilePath} missing...`);