@eui/tools 6.3.16 → 6.3.18
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
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6.3.
|
|
1
|
+
6.3.18
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## 6.3.18 (2023-02-06)
|
|
2
|
+
|
|
3
|
+
##### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **other:**
|
|
6
|
+
* wrong function call - MWP-9204 [MWP-9204](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-9204) ([79ee451a](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/79ee451adedd0ed360757061ea79dee90fb6ade4))
|
|
7
|
+
|
|
8
|
+
* * *
|
|
9
|
+
* * *
|
|
10
|
+
## 6.3.17 (2023-02-06)
|
|
11
|
+
|
|
12
|
+
##### Chores
|
|
13
|
+
|
|
14
|
+
* **other:**
|
|
15
|
+
* added custom env script injection for MWP CDN - EUI-7035 [EUI-7035](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-7035) ([b38f15fb](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/b38f15fb3c89f29065280d9b4d165cf27d8a258b))
|
|
16
|
+
|
|
17
|
+
* * *
|
|
18
|
+
* * *
|
|
1
19
|
## 6.3.16 (2023-02-02)
|
|
2
20
|
|
|
3
21
|
##### Bug Fixes
|
package/package.json
CHANGED
|
@@ -329,33 +329,13 @@ module.exports.generateProjectDistributionFile = (project, isSnapshot, envTarget
|
|
|
329
329
|
bucketName = project.build.distribution.bucketNameSnapshot;
|
|
330
330
|
}
|
|
331
331
|
|
|
332
|
+
// if bucket has been defined for specific envTarget
|
|
332
333
|
if (envTarget) {
|
|
333
|
-
if (
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
bucketName = project.build.distribution.bucketNameTst;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
if (envTarget === 'INT' && project.build.distribution.bucketNameInt) {
|
|
342
|
-
bucketName = project.build.distribution.bucketNameInt;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
if (envTarget === 'ACC' && project.build.distribution.bucketNameAcc) {
|
|
346
|
-
bucketName = project.build.distribution.bucketNameAcc;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
if (envTarget === 'DLT' && project.build.distribution.bucketNameDlt) {
|
|
350
|
-
bucketName = project.build.distribution.bucketNameDlt;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
if (envTarget === 'TRN' && project.build.distribution.bucketNameTrn) {
|
|
354
|
-
bucketName = project.build.distribution.bucketNameTrn;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
if (envTarget === 'PROD' && project.build.distribution.bucketNameProd) {
|
|
358
|
-
bucketName = project.build.distribution.bucketNameProd;
|
|
334
|
+
if (project.build.distribution.envs) {
|
|
335
|
+
const envBucketName = project.build.distribution.envs[envTarget.toLowerCase()];
|
|
336
|
+
if (envBucketName) {
|
|
337
|
+
bucketName = envBucketName;
|
|
338
|
+
}
|
|
359
339
|
}
|
|
360
340
|
}
|
|
361
341
|
}
|
|
@@ -126,10 +126,22 @@ module.exports.preBuild = (project, envTarget, build, configEnvTarget) => {
|
|
|
126
126
|
}
|
|
127
127
|
tools.logSuccess();
|
|
128
128
|
}
|
|
129
|
+
})
|
|
130
|
+
|
|
129
131
|
|
|
132
|
+
// injection config based on configEnvTarget (for openid files replacement)
|
|
133
|
+
.then(() => {
|
|
130
134
|
return this.injectAppConfig(project, configEnvTarget);
|
|
131
135
|
})
|
|
132
136
|
|
|
137
|
+
|
|
138
|
+
// processing custom script injection if enabled in project config
|
|
139
|
+
.then(() => {
|
|
140
|
+
return this.processCustomEnvScriptInjection(project, envTarget);
|
|
141
|
+
})
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
// checking if project as own pre-build.js script defined, and executing it
|
|
133
145
|
.then(() => {
|
|
134
146
|
const prebuildScript = path.join(project.paths.rootPath, 'pre-build.js');
|
|
135
147
|
|
|
@@ -149,7 +161,6 @@ module.exports.preBuild = (project, envTarget, build, configEnvTarget) => {
|
|
|
149
161
|
}
|
|
150
162
|
|
|
151
163
|
|
|
152
|
-
|
|
153
164
|
module.exports.injectAppConfig = (project, configEnvTarget) => {
|
|
154
165
|
return Promise.resolve()
|
|
155
166
|
.then(() => {
|
|
@@ -200,6 +211,43 @@ module.exports.injectAppConfig = (project, configEnvTarget) => {
|
|
|
200
211
|
}
|
|
201
212
|
|
|
202
213
|
|
|
214
|
+
module.exports.processCustomEnvScriptInjection = (project, envTarget) => {
|
|
215
|
+
return Promise.resolve()
|
|
216
|
+
.then(() => {
|
|
217
|
+
if (project.build && project.build.customEnvScriptInjection) {
|
|
218
|
+
tools.logInfo(`Processing custom script injection for ${project.name} - envTarget: ${envTarget}`);
|
|
219
|
+
|
|
220
|
+
const scriptName = project.build.customEnvScriptInjection[(envTarget.toLowerCase())];
|
|
221
|
+
if (!scriptName) {
|
|
222
|
+
tools.logWarning('Unable to find script replacement definition for envTarget...skipping');
|
|
223
|
+
return;
|
|
224
|
+
|
|
225
|
+
} else {
|
|
226
|
+
tools.logInfo(`Script to replace : ${scriptName}`);
|
|
227
|
+
const injectedScript = `<script type="text/javascript" src="${scriptName}" crossorigin="anonymous"></script>`;
|
|
228
|
+
const placeholderToReplace = '<!-- CUSTOM SCRIPT INJECTION PLACEHOLDER -->';
|
|
229
|
+
const fileToReplace = path.join(project.paths.angularPath, 'src', 'index.html');
|
|
230
|
+
|
|
231
|
+
if (tools.isFileExists(fileToReplace)) {
|
|
232
|
+
return tools.replaceInFile(
|
|
233
|
+
fileToReplace,
|
|
234
|
+
placeholderToReplace,
|
|
235
|
+
injectedScript
|
|
236
|
+
);
|
|
237
|
+
|
|
238
|
+
} else {
|
|
239
|
+
tools.logWarning(`Source replacement file does not exist : ${fileToReplace}`);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
})
|
|
244
|
+
|
|
245
|
+
.catch((e) => {
|
|
246
|
+
throw e;
|
|
247
|
+
})
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
|
|
203
251
|
module.exports.processSvgAssets = (project) => {
|
|
204
252
|
return Promise.resolve()
|
|
205
253
|
.then(() => {
|