@eui/tools 4.19.10 → 4.19.14

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
- 4.19.10
1
+ 4.19.14
package/CHANGELOG.md CHANGED
@@ -1,3 +1,39 @@
1
+ ## 4.19.14 (2022-02-22)
2
+
3
+ ##### Chores
4
+
5
+ * **other:**
6
+ * minor changes MWP-7583 [MWP-7583](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-7583) ([2a344a9d](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/2a344a9d5af0f60eedddf265c54acb54b76d4dfd))
7
+
8
+ * * *
9
+ * * *
10
+ ## 4.19.13 (2022-02-22)
11
+
12
+ ##### Chores
13
+
14
+ * **other:**
15
+ * added appTarget pipeline variable output for remote - EUI-4107 [EUI-4107](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4107) ([3b0a5c83](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/3b0a5c83c834a00ee9871ac4ab731c6cf29ab15f))
16
+
17
+ * * *
18
+ * * *
19
+ ## 4.19.12 (2022-02-22)
20
+
21
+ ##### Bug Fixes
22
+
23
+ * **other:**
24
+ * support to support/develop back merge issue - EUI-4107 [EUI-4107](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4107) ([3ffcbe18](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/3ffcbe188c9693817745fb817213b909bb564fba))
25
+
26
+ * * *
27
+ * * *
28
+ ## 4.19.11 (2022-02-21)
29
+
30
+ ##### Bug Fixes
31
+
32
+ * **other:**
33
+ * routes replacement wrong injection when ids is used - MWP-7941 [MWP-7941](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-7941) ([1716ddd3](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/1716ddd31a49cb5c9158454491b51685e038d070))
34
+
35
+ * * *
36
+ * * *
1
37
  ## 4.19.10 (2022-02-18)
2
38
 
3
39
  ##### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "4.19.10",
3
+ "version": "4.19.14",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
package/sandbox.js CHANGED
@@ -659,8 +659,16 @@ const translationUtils = require('./scripts/utils/pre-build/translations/transla
659
659
 
660
660
 
661
661
 
662
+ // return Promise.resolve()
663
+ // .then(() => {
664
+ // const pkg = configUtils.packages.getPackage('opsys-result-quality-management-eui10-remote-el-ui', true);
665
+ // return translationUtils.elements.generate('eui,opsys', pkg)
666
+ // })
667
+
668
+
669
+
662
670
  return Promise.resolve()
663
671
  .then(() => {
664
- const pkg = configUtils.packages.getPackage('opsys-result-quality-management-eui10-remote-el-ui', true);
665
- return translationUtils.elements.generate('eui,opsys', pkg)
672
+ const pkg = configUtils.packages.getPackage('eui', true);
673
+ console.log(pkg);
666
674
  })
@@ -0,0 +1,11 @@
1
+ import { Component } from '@angular/core';
2
+
3
+ @Component({
4
+ template: `
5
+ <eui-block-content [isBlocked]="true">
6
+ <div style="height: 100%"></div>
7
+ </eui-block-content>
8
+ `,
9
+ })
10
+ export class FallbackComponent{
11
+ }
@@ -61,7 +61,7 @@ export class ModuleComponent implements OnInit {
61
61
  }
62
62
 
63
63
  public ngOnInit() {
64
- this.router.navigate([this.routerService.getUrl()], { replaceUrl: true });
64
+ this.router.navigateByUrl(this.routerService.getUrl(), { replaceUrl: true });
65
65
  this.loadData();
66
66
  }
67
67
 
@@ -64,6 +64,7 @@ import {
64
64
  } from '@csdr/integration';
65
65
  import { RoutingModule } from './routing.module';
66
66
 
67
+ import { FallbackComponent } from './fallback.component';
67
68
  import { ModuleComponent } from './module.component';
68
69
 
69
70
  export function openidConnectInterceptorFactory(config) {
@@ -92,9 +93,11 @@ export function openidConnectInterceptorFactory(config) {
92
93
  RoutingModule,
93
94
  ],
94
95
  declarations: [
96
+ FallbackComponent,
95
97
  ModuleComponent,
96
98
  ],
97
99
  entryComponents: [
100
+ FallbackComponent,
98
101
  ModuleComponent,
99
102
  ],
100
103
  providers: [
@@ -8,15 +8,17 @@ import { CCRoute, ELEMENT_ROUTER_TOKEN, IRouterService } from '@csdr/integration
8
8
  // TODO[REMOTE-SETUP] adapt to wrapped package import
9
9
  // import { routes } from '@cc/task-manager';
10
10
  import { appConfig } from '../config/index';
11
+ import { FallbackComponent } from './fallback.component';
11
12
  import { ModuleComponent } from './module.component';
12
13
 
13
14
  const prefixedRoutes: Routes = [
15
+ { path: '', component: ModuleComponent },
14
16
  {
15
17
  path: appConfig.global.baseUrl,
16
18
  // TODO[REMOTE-SETUP] adapt to wrapped package import
17
19
  // children: routes,
18
20
  },
19
- { path: '**', component: ModuleComponent },
21
+ { path: '**', component: FallbackComponent },
20
22
  ];
21
23
 
22
24
  // @dynamic
@@ -44,6 +44,7 @@ module.exports.getEnvTarget = () => {
44
44
 
45
45
 
46
46
  module.exports.init = (pkg) => {
47
+ utils.tools.logBanner('INIT');
47
48
 
48
49
  const branches = this.getBranches();
49
50
 
@@ -91,6 +92,8 @@ module.exports.init = (pkg) => {
91
92
 
92
93
 
93
94
  module.exports.preReleaseChecks = (pkg) => {
95
+ utils.tools.logBanner('PRE-RELEASE checks');
96
+
94
97
  return Promise.resolve()
95
98
 
96
99
  // GET AND CHECK DEVOPS CONFIG
@@ -121,6 +124,8 @@ module.exports.preReleaseChecks = (pkg) => {
121
124
 
122
125
 
123
126
  module.exports.commitMetadataChecks = (pkg) => {
127
+ utils.tools.logBanner('Commit metadata checks');
128
+
124
129
  utils.tools.logTitle('Checking package commit metadata');
125
130
  let pkgMetadata;
126
131
 
@@ -155,6 +160,8 @@ module.exports.commitMetadataChecks = (pkg) => {
155
160
 
156
161
 
157
162
  module.exports.preBuild = (pkg) => {
163
+ utils.tools.logBanner('PRE-BUILD');
164
+
158
165
  return Promise.resolve()
159
166
  .then(() => {
160
167
  return utils.buildPackage.preBuild(pkg);
@@ -169,6 +176,7 @@ module.exports.preBuild = (pkg) => {
169
176
 
170
177
 
171
178
  module.exports.updateVersion = (pkg, pkgMetadata) => {
179
+ utils.tools.logBanner('UPDATE VERSION');
172
180
 
173
181
  // getting branch flags
174
182
  const branches = this.getBranches();
@@ -207,6 +215,8 @@ module.exports.updateVersion = (pkg, pkgMetadata) => {
207
215
 
208
216
 
209
217
  module.exports.generateChangelog = (pkg, version, pkgMetadata) => {
218
+ utils.tools.logBanner('GENERATE CHANGELOG');
219
+
210
220
  return Promise.resolve()
211
221
 
212
222
  // GENERATE CHANGELOG
@@ -241,6 +251,8 @@ module.exports.generateChangelog = (pkg, version, pkgMetadata) => {
241
251
 
242
252
 
243
253
  module.exports.postBuild = (pkg, version) => {
254
+ utils.tools.logBanner('POST BUILD');
255
+
244
256
  return Promise.resolve()
245
257
  // all packages
246
258
  .then(() => {
@@ -262,6 +274,8 @@ module.exports.postBuild = (pkg, version) => {
262
274
 
263
275
 
264
276
  module.exports.storeMetadataAssets = (pkg, pkgCompositeDeps) => {
277
+ utils.tools.logBanner('STORE METADATA ASSETS');
278
+
265
279
  return Promise.resolve()
266
280
  .then(() => {
267
281
  if (pkg.remote) {
@@ -275,8 +289,10 @@ module.exports.storeMetadataAssets = (pkg, pkgCompositeDeps) => {
275
289
  }
276
290
 
277
291
  module.exports.runGitOperations = (pkg, version) => {
292
+ utils.tools.logBanner('RUN GIT OPERATIONS');
278
293
 
279
294
  const branches = this.getBranches();
295
+ console.log(branches);
280
296
 
281
297
  return Promise.resolve()
282
298
  // COMMIT and PUSH UPDATED FILES ON PACKAGE REPOSITORY
@@ -302,14 +318,16 @@ module.exports.runGitOperations = (pkg, version) => {
302
318
  // MERGE BACK ON DEVELOP for MASTER / LATEST RELEASE
303
319
  .then(() => {
304
320
  if (branches.isMaster) {
321
+ utils.tools.logInfo('Branch is master merge back to develop');
305
322
  return utils.git.mergeMasterToDevelop(pkg, pkg.paths.pkgDirectory, version);
306
323
  }
307
324
  })
308
325
 
309
326
  // MERGE BACK ON support/develop for support release for package that has a support/develop branch active
310
327
  .then(() => {
311
- if (branches.isSupport && pkg.build && pkg.build.supportDevelopBranch) {
312
- return utils.git.mergeSupportToSupportDevelop(pkg, pkg.paths.pkgDirectory, branches.branch, pkg.build.supportDevelopBranch);
328
+ if (branches.isSupport && pkg.build && pkg.build.supportSnapshotBranch) {
329
+ utils.tools.logInfo('Branch is support / supportSnapshotBranch config detected');
330
+ return utils.git.mergeSupportToSupportDevelop(pkg, pkg.paths.pkgDirectory, branches.branch, pkg.build.supportSnapshotBranch);
313
331
  }
314
332
  })
315
333
 
@@ -321,6 +339,8 @@ module.exports.runGitOperations = (pkg, version) => {
321
339
 
322
340
 
323
341
  module.exports.storeMetadata = (pkg, version, pkgMetadata, pkgCompositeDeps, duration) => {
342
+ utils.tools.logBanner('STORE METADATA');
343
+
324
344
  const branches = this.getBranches();
325
345
 
326
346
  return Promise.resolve()
@@ -339,7 +359,44 @@ module.exports.storeMetadata = (pkg, version, pkgMetadata, pkgCompositeDeps, dur
339
359
  }
340
360
 
341
361
 
362
+ module.exports.exportPipelineVariables = (pkg) => {
363
+ utils.tools.logBanner('EXPORT PIPELINE VARIABLES');
364
+
365
+ return Promise.resolve()
366
+ .then(() => {
367
+ if (pkg.remote) {
368
+ utils.tools.logTitle('Exporting pkg remote variables');
369
+
370
+ utils.tools.logInfo('Exporting APP_TARGET');
371
+
372
+ let appTarget = 'MWP_ONLY';
373
+
374
+ if (pkg.build && pkg.build.appTarget) {
375
+ appTarget = pkg.build.appTarget;
376
+ }
377
+
378
+ utils.tools.logInfo(`appTarget generated : ${appTarget}`);
379
+
380
+ if (dryRun) {
381
+ utils.tools.logWarning('dryRun...skipping export');
382
+ } else {
383
+ utils.tools.logInfo('Exporting appTarget variable');
384
+ return utils.pipeline.setVariables(pkg.paths.rootDirectory, `export APP_TARGET=${pkg.build.appTarget}\n`);
385
+ }
386
+ }
387
+ })
388
+
389
+ .catch((e) => {
390
+ throw e;
391
+ })
392
+ }
393
+
394
+
395
+
396
+
342
397
  module.exports.generateDiffReport = (pkg, newVersion) => {
398
+ utils.tools.logBanner('GENERATE DIFF REPORT');
399
+
343
400
  const branches = this.getBranches();
344
401
 
345
402
  return Promise.resolve()
@@ -375,6 +432,8 @@ module.exports.generateDiffReport = (pkg, newVersion) => {
375
432
 
376
433
 
377
434
  module.exports.sendSuccessNotification = (pkg, version, pkgMetadata) => {
435
+ utils.tools.logBanner('SEND SUCCESS NOTIFICATION');
436
+
378
437
  return Promise.resolve()
379
438
  .then(() => {
380
439
  utils.tools.logTitle('Sending slack success');
@@ -410,6 +469,8 @@ module.exports.sendSuccessNotification = (pkg, version, pkgMetadata) => {
410
469
 
411
470
 
412
471
  module.exports.sendErrorNotification = (pkg, exception, pkgMetadata) => {
472
+ utils.tools.logBanner('SEND ERROR NOTIFICATION');
473
+
413
474
  // console.log(pkgMetadata);
414
475
 
415
476
  return Promise.resolve()
@@ -173,6 +173,12 @@ module.exports.run = () => {
173
173
  })
174
174
 
175
175
 
176
+ // EXPORT ADDITIONAL PIPELINE VARIABLES
177
+ .then(() => {
178
+ return innerCommon.exportPipelineVariables(pkg);
179
+ })
180
+
181
+
176
182
  // SEND SUCCESS NOTIFICATION
177
183
  .then(() => {
178
184
  return innerCommon.sendSuccessNotification(pkg, newVersion, pkgMetadata)
@@ -229,14 +229,14 @@ const mergeMasterToDevelop = (pkg, folder, version) => {
229
229
  }
230
230
 
231
231
 
232
- const mergeSupportToSupportDevelop = (pkg, folder, supportBranch, supportDevelopBranch) => {
233
- if (!supportDevelopBranch) {
234
- tools.logWarning('supportDevelopBranch not found in package config...skipping');
232
+ const mergeSupportToSupportDevelop = (pkg, folder, supportBranch, supportSnapshotBranch) => {
233
+ if (!supportSnapshotBranch) {
234
+ tools.logWarning('supportSnapshotBranch not found in package config...skipping');
235
235
  return Promise.resolve();
236
236
  }
237
237
 
238
- tools.logTitle(`Merge back on ${supportDevelopBranch}`);
239
- tools.logInfo(`Merging release changes into ${supportDevelopBranch} branch...`);
238
+ tools.logTitle(`Merge back on ${supportSnapshotBranch}`);
239
+ tools.logInfo(`Merging release changes into ${supportSnapshotBranch} branch...`);
240
240
 
241
241
  if (dryRun) {
242
242
  tools.logInfo('DRY-RUN: skipping merge support to supportDevelop');
@@ -252,17 +252,17 @@ const mergeSupportToSupportDevelop = (pkg, folder, supportBranch, supportDevelop
252
252
  return Promise.resolve()
253
253
  .then(() => {
254
254
  execa.shellSync(`git fetch origin`, { cwd: folder });
255
- execa.shellSync(`git checkout ${supportDevelopBranch}`, { cwd: folder });
256
- execa.shellSync(`git merge origin/${supportDevelopBranch}`, { cwd: folder });
255
+ execa.shellSync(`git checkout ${supportSnapshotBranch}`, { cwd: folder });
256
+ execa.shellSync(`git merge origin/${supportSnapshotBranch}`, { cwd: folder });
257
257
  execa.shellSync(`git merge -X theirs ${supportBranch}`, { cwd: folder });
258
- execa.shellSync(`git push origin ${supportDevelopBranch}`, { cwd: folder });
258
+ execa.shellSync(`git push origin ${supportSnapshotBranch}`, { cwd: folder });
259
259
  execa.shellSync(`git checkout ${supportBranch}`, { cwd: folder });
260
260
  })
261
261
  .then(() => {
262
262
  tools.logSuccess();
263
263
  })
264
264
  .catch((e) => {
265
- throw new Error(`Error trying merging ${supportBranch} to ${supportDevelopBranch} on ${folder}`);
265
+ throw new Error(`Error trying merging ${supportBranch} to ${supportSnapshotBranch} on ${folder}`);
266
266
  })
267
267
  }
268
268
  }
@@ -218,7 +218,7 @@ const replaceRoutes = (project, envTarget, build, routesFileContent) => {
218
218
  routeContent += ` id: '${route.data.id}',\n`;
219
219
  }
220
220
  if (route.data.ids) {
221
- routeContent += ` ids: '${route.data.ids}',\n`;
221
+ routeContent += ` ids: ${route.data.ids},\n`;
222
222
  }
223
223
  if (route.data.featureName) {
224
224
  routeContent += ` featureName: '${route.data.featureName}',\n`;