@eui/tools 4.17.6 → 4.17.10

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.17.6
1
+ 4.17.10
package/CHANGELOG.md CHANGED
@@ -1,3 +1,40 @@
1
+ ## 4.17.10 (2021-12-07)
2
+
3
+ ##### Chores
4
+
5
+ * **other:**
6
+ * adapted externals injection for extra route remapping for rfs swap on TRN/PROD - EUI-4107 [EUI-4107](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4107) ([da46c778](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/da46c778d9be029c888541fe943d0883657c9fac))
7
+ * translations management MWP-7583 [MWP-7583](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-7583) ([e1b07c0b](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/e1b07c0bc37957990be5df7c25fa7ffaa98f23cd))
8
+
9
+ * * *
10
+ * * *
11
+ ## 4.17.9 (2021-12-06)
12
+
13
+ ##### Chores
14
+
15
+ * **other:**
16
+ * disable style lint for v13 apps - EUI-4107 [EUI-4107](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4107) ([9f925fdd](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/9f925fdd3ae8e401045fe8979545dbfdb66181a2))
17
+
18
+ * * *
19
+ * * *
20
+ ## 4.17.8 (2021-12-02)
21
+
22
+ ##### Chores
23
+
24
+ * **other:**
25
+ * added back yarn.lock removal on sync - add devops-metadata sync feature to prevent new package overlap and merge issues - EUI-4107 [EUI-4107](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4107) ([f115a19f](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/f115a19f31b3d473576a122405d45e0c4f83bc83))
26
+
27
+ * * *
28
+ * * *
29
+ ## 4.17.7 (2021-12-02)
30
+
31
+ ##### Chores
32
+
33
+ * **other:**
34
+ * updated handlebars to 4.7.7 in v13 resolutions - enabled back UI auditing - fixed teams display on init - EUI-4107 [EUI-4107](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4107) ([bd101f2d](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/bd101f2d6466308c21bd4bdc57a504a5cdc810a6))
35
+
36
+ * * *
37
+ * * *
1
38
  ## 4.17.6 (2021-11-30)
2
39
 
3
40
  ##### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "4.17.6",
3
+ "version": "4.17.10",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
package/sandbox.js CHANGED
@@ -15,6 +15,7 @@ const compositeUtils = require('./scripts/csdr/install/composite-utils');
15
15
  const installUtils = require('./scripts/csdr/install/install-utils');
16
16
  const notificationUtils = require('./scripts/utils/notification/notification-utils');
17
17
 
18
+
18
19
  // console.log(configUtils.packages.getPackages());
19
20
  // console.log(configUtils.packages.getPackage('eui-tools'));
20
21
 
@@ -120,10 +121,10 @@ const notificationUtils = require('./scripts/utils/notification/notification-uti
120
121
  // return initUtils.meta.init();
121
122
  // })
122
123
 
123
- return Promise.resolve()
124
- .then(() => {
125
- return metadataUtils.stats.run();
126
- })
124
+ // return Promise.resolve()
125
+ // .then(() => {
126
+ // return metadataUtils.stats.run();
127
+ // })
127
128
 
128
129
  // return Promise.resolve()
129
130
  // .then(() => {
@@ -630,3 +631,10 @@ return Promise.resolve()
630
631
  // tools.logBanner('this is the content of the banner');
631
632
  // })
632
633
 
634
+ return Promise.resolve()
635
+ .then(() => {
636
+ const prjName = 'my-workplace';
637
+ const prj = configUtils.projects.getCsdrProject(prjName);
638
+
639
+ return injectionUtils.externals.remapRoutesByEnvConfig(prj, 'TRN', true);
640
+ })
@@ -50,7 +50,7 @@ module.exports.audit = (pkg) => {
50
50
  .then(() => {
51
51
  return Promise.resolve()
52
52
  .then(() => {
53
- return execa.shellSync('yarn audit --level moderate', { cwd: process.cwd(), stdio: 'inherit' });
53
+ return execa.shellSync('yarn audit --level high', { cwd: process.cwd(), stdio: 'inherit' });
54
54
  })
55
55
  .catch((e) => {}) // it can fail
56
56
  })
@@ -61,7 +61,7 @@ module.exports.audit = (pkg) => {
61
61
  .then(() => {
62
62
  const auditFile = path.join(process.cwd(), 'audit.json');
63
63
  tools.logInfo(`Creating audit file`)
64
- return execa.shellSync(`yarn audit --level moderate --json > ${auditFile}`, { cwd: process.cwd(), stdio: 'inherit' });
64
+ return execa.shellSync(`yarn audit --level high --json > ${auditFile}`, { cwd: process.cwd(), stdio: 'inherit' });
65
65
  })
66
66
  .then(() => {
67
67
  tools.logSuccess();
@@ -1,9 +1,10 @@
1
1
  import { Component, OnInit, Inject } from '@angular/core';
2
2
  import { Router } from '@angular/router';
3
3
 
4
- import { ELEMENT_ROUTER_TOKEN, IRouterService } from '@csdr/integration';
4
+ import { take } from 'rxjs/operators';
5
5
 
6
- import { CONFIG_TOKEN, I18nService, UxAppShellService } from '@eui/core';
6
+ import { CONFIG_TOKEN, I18nService, UserService } from '@eui/core';
7
+ import { ELEMENT_ROUTER_TOKEN, IRouterService, initialization } from '@csdr/integration';
7
8
 
8
9
  import { appConfig } from '../config/index';
9
10
 
@@ -15,9 +16,23 @@ enum ElementStatus {
15
16
 
16
17
  @Component({
17
18
  template: `
19
+ <eui-block-content *ngIf="moduleStatus === ElementStatus.Loading" [isBlocked]="true">
20
+ <div style="height: 100%"></div>
21
+ </eui-block-content>
18
22
  <ng-container *ngIf="moduleStatus === ElementStatus.Loaded">
19
23
  <router-outlet></router-outlet>
20
24
  </ng-container>
25
+ <ng-container *ngIf="moduleStatus === ElementStatus.Error">
26
+ <div class="error-container">
27
+ <div>
28
+ <h1>Translations or user data for this module failed to load.</h1>
29
+ <p>Do you want to try again?</p>
30
+ <button euiButton euiPrimary (click)="loadData()">
31
+ <span euiLabel>{{ 'global.RELOAD' | translate }}</span>
32
+ </button>
33
+ </div>
34
+ </div>
35
+ </ng-container>
21
36
  `,
22
37
  styles: [`
23
38
  .error-container {
@@ -42,27 +57,31 @@ export class ModuleComponent implements OnInit {
42
57
  @Inject(ELEMENT_ROUTER_TOKEN) private routerService: IRouterService,
43
58
  @Inject(CONFIG_TOKEN) public config: any,
44
59
  private i18nService: I18nService,
45
- private uxAppShellService: UxAppShellService) {
46
- console.log(this.uxAppShellService.isGrowlSticky);
60
+ private userService: UserService) {
47
61
  }
48
62
 
49
63
  public ngOnInit() {
50
64
  this.router.navigate([this.routerService.getUrl()], { replaceUrl: true });
51
- this.loadTranslations();
65
+ this.loadData();
52
66
  }
53
67
 
54
- private loadTranslations() {
68
+ private loadData() {
55
69
  this.setStatus(ElementStatus.Loading);
56
- this.i18nService
57
- .init({ activeLang: 'en' })
58
- .subscribe(s => {
59
- // TODO: timeout is needed for right
60
- // top select element items which
61
- // are not translated.
62
- //
63
- // eUI init method needs to be checked
64
- setTimeout(() => this.setStatus(ElementStatus.Loaded), 500);
65
- });
70
+ try {
71
+ initialization(this.i18nService, this.userService)
72
+ .pipe(take(1))
73
+ .subscribe((loadStatus: { success: boolean, error?: string }) => {
74
+ if (!loadStatus.success) {
75
+ this.setStatus(ElementStatus.Error);
76
+ console.error(`[ELEMENT: ${appConfig.global.elementName}] `, loadStatus.error);
77
+ } else {
78
+ this.setStatus(ElementStatus.Loaded);
79
+ }
80
+ });
81
+ } catch (e) {
82
+ console.log(e);
83
+ this.setStatus(ElementStatus.Error);
84
+ }
66
85
  }
67
86
 
68
87
  private setStatus(status: ElementStatus) {
@@ -1,3 +1,4 @@
1
+ import { DOCUMENT } from '@angular/common';
1
2
  import { NgModule, Injector, NgZone, PLATFORM_ID } from '@angular/core';
2
3
  import { BrowserModule } from '@angular/platform-browser';
3
4
  import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
@@ -11,7 +12,7 @@ import { EffectsModule } from '@ngrx/effects';
11
12
  import { StoreRouterConnectingModule } from '@ngrx/router-store';
12
13
  import { StoreDevtoolsModule } from '@ngrx/store-devtools';
13
14
 
14
- import { TranslateModule } from '@ngx-translate/core';
15
+ import { TranslateModule, TranslateService } from '@ngx-translate/core';
15
16
 
16
17
  import {
17
18
  CachePreventionInterceptor,
@@ -21,14 +22,22 @@ import {
21
22
  CsrfPreventionInterceptor,
22
23
  EUI_CONFIG_TOKEN,
23
24
  EuLoginSessionTimeoutHandlingInterceptor,
25
+ GLOBAL_CONFIG_TOKEN,
24
26
  I18nService,
27
+ LogService,
25
28
  OpenIdConnectInterceptor,
29
+ StorageService,
26
30
  StoreService,
27
31
  translateConfig,
28
32
  UserService,
29
33
  UxAppShellService,
30
34
  } from '@eui/core';
31
- import { PushNotificationsService } from '@csdr/core';
35
+ import {
36
+ EuiBlockContentComponentModule,
37
+ EuiButtonModule,
38
+ EuiLabelModule,
39
+ } from '@eui/components-next';
40
+ import { LanguageInterceptor, PushNotificationsService } from '@csdr/core';
32
41
  // TODO[REMOTE-SETUP] uncomment if zipkin is used
33
42
  // import { TRACE_LOCAL_SERVICE_NAME, ZipkinHttpInterceptor, ZipkinTraceManager } from '@csdr/zipkin-tracing';
34
43
 
@@ -42,11 +51,14 @@ import { appConfig } from '../config';
42
51
  // import { TaskMgrCommonModule } from '@cc/task-manager';
43
52
  import {
44
53
  ELEMENT_ROUTER_TOKEN,
45
- PushNotificationMapping,
54
+ I18N_SERVICE_HOST_TOKEN,
55
+ I18nServiceMapping,
56
+ PUSH_NOTIFICATION_SERVICE_HOST_TOKEN,
57
+ PushNotificationServiceMapping,
46
58
  USER_SERVICE_HOST_TOKEN,
47
- UserMapping,
48
- UX_SERVICE_HOST_TOKEN,
59
+ UserServiceMapping,
49
60
  UX_APP_SHELL_SERVICE_HOST_TOKEN,
61
+ UX_SERVICE_HOST_TOKEN,
50
62
  UxAppShellServiceMapping,
51
63
  } from '@csdr/integration';
52
64
  import { RoutingModule } from './routing.module';
@@ -70,6 +82,10 @@ export function openidConnectInterceptorFactory(config) {
70
82
 
71
83
  CoreModule.forRoot(),
72
84
 
85
+ EuiBlockContentComponentModule,
86
+ EuiButtonModule,
87
+ EuiLabelModule,
88
+
73
89
  // TODO[REMOTE-SETUP] adapt to wrapped package import
74
90
  // TaskMgrCommonModule,
75
91
  RoutingModule,
@@ -87,6 +103,13 @@ export function openidConnectInterceptorFactory(config) {
87
103
  provide: EUI_CONFIG_TOKEN,
88
104
  useValue: { appConfig: { ...appConfig, ...environment }, environment },
89
105
  },
106
+ // TODO[REMOTE-SETUP] uncomment if LanguageInterceptor is used
107
+ // {
108
+ // provide: HTTP_INTERCEPTORS,
109
+ // useClass: LanguageInterceptor,
110
+ // deps: [CONFIG_TOKEN, StorageService],
111
+ // multi: true,
112
+ // },
90
113
  {
91
114
  provide: HTTP_INTERCEPTORS,
92
115
  useClass: CorsSecurityInterceptor,
@@ -122,18 +145,36 @@ export function openidConnectInterceptorFactory(config) {
122
145
  // },
123
146
 
124
147
  // used in the el-mappers
148
+ { provide: I18N_SERVICE_HOST_TOKEN, useFactory: () => window['PROVIDERS']['I18nService'] },
149
+ { provide: PUSH_NOTIFICATION_SERVICE_HOST_TOKEN, useFactory: () => window['PROVIDERS']['PushNotificationsService'] },
125
150
  { provide: USER_SERVICE_HOST_TOKEN, useFactory: () => window['PROVIDERS']['UserService'] },
126
151
  { provide: UX_SERVICE_HOST_TOKEN, useFactory: () => window['PROVIDERS']['UxService'] },
127
152
  { provide: UX_APP_SHELL_SERVICE_HOST_TOKEN, useFactory: () => window['PROVIDERS']['UxAppShellService'] },
153
+ // TODO[REMOTE-SETUP] uncomment if LanguageInterceptor or StorageService is used
154
+ // { provide: StorageService, useFactory: () => window['PROVIDERS']['StorageService'] },
128
155
 
156
+ {
157
+ provide: I18nService,
158
+ useFactory: (
159
+ config: any,
160
+ translateService: TranslateService,
161
+ logService: LogService,
162
+ store: StoreService,
163
+ document: Document,
164
+ hostI18nService: any) => new I18nServiceMapping(
165
+ config, translateService, logService, store, document, hostI18nService),
166
+ deps: [GLOBAL_CONFIG_TOKEN, TranslateService, LogService, StoreService, DOCUMENT, I18N_SERVICE_HOST_TOKEN],
167
+ },
129
168
  {
130
169
  provide: PushNotificationsService,
131
- useFactory: (zone: NgZone) => new PushNotificationMapping(zone, window['PROVIDERS']['PushNotificationsService']),
132
- deps: [NgZone],
170
+ useFactory: (
171
+ zone: NgZone,
172
+ hostPushNotificationService: any) => new PushNotificationServiceMapping(zone, hostPushNotificationService),
173
+ deps: [NgZone, PUSH_NOTIFICATION_SERVICE_HOST_TOKEN],
133
174
  },
134
175
  {
135
176
  provide: UserService,
136
- useFactory: (storeService: StoreService, hostUserService: any) => new UserMapping(storeService, hostUserService),
177
+ useFactory: (storeService: StoreService, hostUserService: any) => new UserServiceMapping(storeService, hostUserService),
137
178
  deps: [StoreService, USER_SERVICE_HOST_TOKEN],
138
179
  },
139
180
  {
@@ -147,7 +188,7 @@ export function openidConnectInterceptorFactory(config) {
147
188
  iI18nService: I18nService,
148
189
  hostUxService: any,
149
190
  hostUxAppShellService: any) => new UxAppShellServiceMapping(
150
- config, http, platformId, router, storeService, iI18nService, hostUxService, hostUxAppShellService),
191
+ config, http, platformId, router, storeService, iI18nService, hostUxService, hostUxAppShellService),
151
192
  deps: [CONFIG_TOKEN, HttpClient, PLATFORM_ID, Router, StoreService, I18nService,
152
193
  UX_SERVICE_HOST_TOKEN, UX_APP_SHELL_SERVICE_HOST_TOKEN],
153
194
  },
@@ -17,7 +17,9 @@ module.exports.start = () => {
17
17
  type: "list",
18
18
  name: "project",
19
19
  message: "Which app / project do you work on?",
20
- choices: csdrProjects.map(p => ({ name: p.name, value: p.name }))
20
+ choices: csdrProjects.filter((p) => {
21
+ return p.initListVisible === true;
22
+ }).map(p => ({ name: p.name, value: p.name }))
21
23
  });
22
24
 
23
25
  const answersTeam = await inquirer.prompt({
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "lodash": ">=4.17.21",
3
- "handlebars": ">=4.5.3",
3
+ "handlebars": ">=4.7.7",
4
4
  "mem": ">=4.3.0 <=8.1.1",
5
5
  "https-proxy-agent": ">=2.2.3",
6
6
  "minimatch": ">=3.0.4",
@@ -596,3 +596,99 @@ module.exports.isPackageLocked = (pkg) => {
596
596
 
597
597
  return false;
598
598
  }
599
+
600
+
601
+
602
+ module.exports.syncDevopsMetadata = () => {
603
+ return Promise.resolve()
604
+ .then(() => {
605
+ const pkgsObject = configUtils.packages.getCsdrPackages();
606
+ const pkgs = Object.keys(pkgsObject);
607
+
608
+ const metadataFile = path.join(process.cwd(), 'packages', 'devops-metadata', '.devops-metadata.json');
609
+ const metadata = require(metadataFile);
610
+
611
+ let packages = metadata.packages;
612
+ let packagesLatestTag = metadata.packagesLatestTag;
613
+ let packagesNextTag = metadata.packagesNextTag;
614
+ let packagesPrevTag = metadata.packagesPrevTag;
615
+ let packagesPrevSnapshotsTag = metadata.packagesPrevSnapshotsTag;
616
+
617
+ const getMissingPackages = (inArray) => {
618
+ let outArray = [];
619
+
620
+ pkgs.forEach((p) => {
621
+ const pkgIdx = inArray.findIndex(item => item.name === p);
622
+ if (pkgIdx === -1) {
623
+ outArray.push(p);
624
+ }
625
+ });
626
+
627
+ return outArray;
628
+ }
629
+
630
+ const addPackages = (inArray, pkgsToAdd) => {
631
+ const outArray = inArray;
632
+ pkgsToAdd.forEach((p) => {
633
+ outArray.push({
634
+ name: p,
635
+ version: null,
636
+ date: require('moment')(new Date()).format("YYYYMMDD-HH:mm"),
637
+ status: 'INITIALIZED',
638
+ npmPkg: null
639
+ });
640
+ })
641
+
642
+ return outArray;
643
+ }
644
+
645
+ console.log('processing packages');
646
+ let packagesToAdd = [] = getMissingPackages(packages);
647
+ let packagesLatestTagToAdd = [] = getMissingPackages(packagesLatestTag);
648
+ let packagesNextTagToAdd = [] = getMissingPackages(packagesNextTag);
649
+ let packagesPrevTagToAdd = [] = getMissingPackages(packagesPrevTag);
650
+ let packagesPrevSnapshotsTagToAdd = [] = getMissingPackages(packagesPrevSnapshotsTag);
651
+
652
+ console.log(packagesToAdd.length);
653
+ console.log(packagesLatestTagToAdd.length);
654
+ console.log(packagesNextTagToAdd.length);
655
+ console.log(packagesPrevTagToAdd.length);
656
+ console.log(packagesPrevSnapshotsTagToAdd.length);
657
+
658
+ console.log(`packages before : ${packages.length}`);
659
+ packages = addPackages(packages, packagesToAdd);
660
+ console.log(`packages after : ${packages.length}`);
661
+
662
+ console.log(`packages before : ${packagesLatestTag.length}`);
663
+ packagesLatestTag = addPackages(packagesLatestTag, packagesLatestTagToAdd);
664
+ console.log(`packages after : ${packagesLatestTag.length}`);
665
+
666
+ console.log(`packages before : ${packagesNextTag.length}`);
667
+ packagesNextTag = addPackages(packagesNextTag, packagesNextTagToAdd);
668
+ console.log(`packages after : ${packagesNextTag.length}`);
669
+
670
+ console.log(`packages before : ${packagesPrevTag.length}`);
671
+ packagesPrevTag = addPackages(packagesPrevTag, packagesPrevTagToAdd);
672
+ console.log(`packages after : ${packagesPrevTag.length}`);
673
+
674
+ console.log(`packages before : ${packagesPrevSnapshotsTag.length}`);
675
+ packagesPrevSnapshotsTag = addPackages(packagesPrevSnapshotsTag, packagesPrevSnapshotsTagToAdd);
676
+ console.log(`packages after : ${packagesPrevSnapshotsTag.length}`);
677
+
678
+ metadata.packages = packages;
679
+ metadata.packagesLatestTag = packagesLatestTag;
680
+ metadata.packagesPrevTag = packagesPrevTag;
681
+ metadata.packagesNextTag = packagesNextTag;
682
+ metadata.packagesPrevSnapshotsTag = packagesPrevSnapshotsTag;
683
+
684
+ if (!dryRun) {
685
+ tools.writeJsonFileSync(metadataFile, metadata);
686
+ } else {
687
+ tools.logInfo(`Write metadata on ${metadataFile}`);
688
+ }
689
+ })
690
+
691
+ .catch((e) => {
692
+ throw e;
693
+ })
694
+ }
@@ -32,9 +32,9 @@ module.exports.install = (pkg, isMaster) => {
32
32
 
33
33
 
34
34
  // AUDIT DEPENDENCIES
35
- // .then(() => {
36
- // return auditUtils.audit(pkg);
37
- // })
35
+ .then(() => {
36
+ return auditUtils.audit(pkg);
37
+ })
38
38
 
39
39
 
40
40
  .catch((e) => {
@@ -16,10 +16,10 @@ module.exports.sync = () => {
16
16
  tools.logInfo('Resetting package.json');
17
17
  return tools.copy(path.join(process.cwd(), '.csdr', 'package.json.reset'), path.join(process.cwd(), 'package.json'));
18
18
  })
19
- // .then(() => {
20
- // tools.logInfo('Removing yarn.lock');
21
- // return tools.remove(path.join(process.cwd(), 'yarn.lock'));
22
- // })
19
+ .then(() => {
20
+ tools.logInfo('Removing yarn.lock');
21
+ return tools.remove(path.join(process.cwd(), 'yarn.lock'));
22
+ })
23
23
  .then(() => {
24
24
  tools.logSuccess();
25
25
  })
@@ -88,10 +88,11 @@ module.exports.angular = (envTarget, isSnapshot, version) => {
88
88
  if (!skipLint) {
89
89
  tools.logSuccess();
90
90
  }
91
- if (!skipLint) {
92
- tools.logInfo(`Styles Linting application...`);
93
- return tools.runScript(`stylelint **/*.scss`, currentProject.paths.angularPath);
94
- }
91
+ // temporary disable for v13 apps
92
+ // if (!skipLint) {
93
+ // tools.logInfo(`Styles Linting application...`);
94
+ // return tools.runScript(`stylelint **/*.scss`, currentProject.paths.angularPath);
95
+ // }
95
96
  })
96
97
 
97
98
 
@@ -252,16 +252,35 @@ module.exports.remapRoutesByEnvConfig = (project, envTarget, build) => {
252
252
  return;
253
253
  }
254
254
 
255
- // get routes file content and replace tokens
256
255
  let routesFileContent = tools.getFileContent(routesFilePath);
256
+
257
+ // get routes file content and replace tokens
257
258
  routesRemapping.forEach((route) => {
258
259
  tools.logInfo(`checking replacement for : ${JSON.stringify(route)}`);
259
260
  const tokenToSearch = `./features/${route.featureModule}-lib.module#Module`;
260
261
  if (routesFileContent.indexOf(tokenToSearch) > -1) {
261
- tools.logInfo(`token ${tokenToSearch} found...replacing`);
262
+ tools.logInfo(`token ${tokenToSearch} found...replacing by ${route.routeModuleDef}`);
262
263
  routesFileContent = tools.replaceAll(routesFileContent, tokenToSearch, route.routeModuleDef);
263
264
  }
264
265
  })
266
+
267
+ // extra physical routes remapping
268
+ const extraRoutesRemapping = config.extraRoutesRemapping;
269
+ if (!extraRoutesRemapping) {
270
+ tools.logWarning('No extra routes remapping found in current config...skipping');
271
+
272
+ } else {
273
+ tools.logInfo('Extra routes remapping');
274
+ extraRoutesRemapping.forEach((route) => {
275
+ tools.logInfo(`checking replacement ${JSON.stringify(route)}`);
276
+ const tokenToSearch = route.currentRoute;
277
+ if (routesFileContent.indexOf(tokenToSearch) > -1) {
278
+ tools.logInfo(`token ${tokenToSearch} found...replacing by ${route.updatedRoute}`);
279
+ routesFileContent = tools.replaceAll(routesFileContent, tokenToSearch, route.updatedRoute);
280
+ }
281
+ })
282
+ }
283
+
265
284
  return tools.writeFileContent(routesFilePath, routesFileContent);
266
285
  })
267
286
  .then(() => {