@eui/tools 4.18.9 → 4.19.3
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 +1 -1
- package/CHANGELOG.md +36 -0
- package/package.json +1 -1
- package/sandbox.js +16 -4
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/src/dummy.spec.ts.TO_REPLACE +5 -0
- package/scripts/csdr/cli/skeletons/package/frontend-option-route/src/lib/components/cmp1/cmp1.component.html +1 -0
- package/scripts/csdr/cli/skeletons/package/frontend-option-route/src/lib/components/cmp1/cmp1.component.spec.ts.TO_REPLACE +25 -0
- package/scripts/csdr/cli/skeletons/package/frontend-option-route/src/lib/components/cmp1/cmp1.component.ts +14 -0
- package/scripts/csdr/config/angular.js +240 -1
- package/scripts/csdr/install/remote.js +3 -3
- package/scripts/csdr/metadata/package.js +25 -2
- package/scripts/csdr/release/app/release-app.js +5 -2
- package/scripts/csdr/release/package/common.js +13 -4
- package/scripts/csdr/release/package/release-package.js +3 -3
- package/scripts/csdr/version/package.js +13 -9
- package/scripts/utils/build/app/build-app-utils.js +9 -8
- package/scripts/utils/git-utils.js +42 -0
- package/scripts/utils/pre-build/injection/externals.js +52 -1
- package/scripts/utils/pre-build/projects.js +4 -4
- package/scripts/utils/serve/app.js +2 -2
- package/scripts/utils/tools.js +0 -2
package/.version.properties
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
4.
|
|
1
|
+
4.19.3
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,39 @@
|
|
|
1
|
+
## 4.19.3 (2022-02-02)
|
|
2
|
+
|
|
3
|
+
##### Chores
|
|
4
|
+
|
|
5
|
+
* **other:**
|
|
6
|
+
* added pathsMapping replacement for v10 remotes config - EUI-4107 [EUI-4107](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4107) ([6e5651cf](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/6e5651cfcf2533ced316b5e04650d65f88520185))
|
|
7
|
+
|
|
8
|
+
* * *
|
|
9
|
+
* * *
|
|
10
|
+
## 4.19.2 (2022-01-25)
|
|
11
|
+
|
|
12
|
+
##### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **other:**
|
|
15
|
+
* hotfix pipeline metadata issues - added missing v10 pkg skeleton files - EUI-4107 [EUI-4107](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4107) ([bb59cdbf](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/bb59cdbf98e13cca49017c6268318c4573bd73b4))
|
|
16
|
+
|
|
17
|
+
* * *
|
|
18
|
+
* * *
|
|
19
|
+
## 4.19.1 (2022-01-21)
|
|
20
|
+
|
|
21
|
+
##### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* **other:**
|
|
24
|
+
* csdr v13 app config skeleton - EUI-4107 [EUI-4107](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4107) ([876f5336](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/876f5336f186d3bb245f132b0269ad38d72a1314))
|
|
25
|
+
|
|
26
|
+
* * *
|
|
27
|
+
* * *
|
|
28
|
+
## 4.19.0 (2022-01-21)
|
|
29
|
+
|
|
30
|
+
##### New Features
|
|
31
|
+
|
|
32
|
+
* **other:**
|
|
33
|
+
* enabled hotfix branching - added configEnvTarget as pipeline parameter - enhance support/develop flow - EUI-4107 [EUI-4107](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4107) ([69d420ed](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/69d420ed77ecd8947ad4801ce2da1ce9e23c1c50))
|
|
34
|
+
|
|
35
|
+
* * *
|
|
36
|
+
* * *
|
|
1
37
|
## 4.18.9 (2022-01-17)
|
|
2
38
|
|
|
3
39
|
##### Chores
|
package/package.json
CHANGED
package/sandbox.js
CHANGED
|
@@ -631,10 +631,22 @@ const notificationUtils = require('./scripts/utils/notification/notification-uti
|
|
|
631
631
|
// tools.logBanner('this is the content of the banner');
|
|
632
632
|
// })
|
|
633
633
|
|
|
634
|
+
// return Promise.resolve()
|
|
635
|
+
// .then(() => {
|
|
636
|
+
// const prjName = 'eui-showcase-ux';
|
|
637
|
+
// const prj = configUtils.projects.getCsdrProject(prjName);
|
|
638
|
+
|
|
639
|
+
// return compositeUtils.getDeps(prj, 'TST');
|
|
640
|
+
// })
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
const prjName = 'my-workplace';
|
|
644
|
+
const prj = configUtils.projects.getCsdrProject(prjName);
|
|
645
|
+
|
|
634
646
|
return Promise.resolve()
|
|
647
|
+
// .then(() => {
|
|
648
|
+
// return injectionUtils.externals.injectExternalAppSources(prj);
|
|
649
|
+
// })
|
|
635
650
|
.then(() => {
|
|
636
|
-
|
|
637
|
-
const prj = configUtils.projects.getCsdrProject(prjName);
|
|
638
|
-
|
|
639
|
-
return compositeUtils.getDeps(prj, 'TST');
|
|
651
|
+
return injectionUtils.externals.remapRoutesByEnvConfig(prj, 'DEV', true);
|
|
640
652
|
})
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Hello from <strong>@module.name@-cmp1</strong>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { Cmp1Component } from './cmp1.component';
|
|
4
|
+
|
|
5
|
+
describe('ModuleComponent', () => {
|
|
6
|
+
let component: Cmp1Component;
|
|
7
|
+
let fixture: ComponentFixture<Cmp1Component>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async(() => {
|
|
10
|
+
TestBed.configureTestingModule({
|
|
11
|
+
declarations: [Cmp1Component],
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
}));
|
|
15
|
+
|
|
16
|
+
beforeEach(() => {
|
|
17
|
+
fixture = TestBed.createComponent(Cmp1Component);
|
|
18
|
+
component = fixture.componentInstance;
|
|
19
|
+
fixture.detectChanges();
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('should create', () => {
|
|
23
|
+
expect(component).toBeTruthy();
|
|
24
|
+
});
|
|
25
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Component, OnInit } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Component({
|
|
4
|
+
selector: '@module.scope.string@-cmp1-component',
|
|
5
|
+
templateUrl: './cmp1.component.html',
|
|
6
|
+
})
|
|
7
|
+
export class Cmp1Component implements OnInit {
|
|
8
|
+
|
|
9
|
+
constructor() { }
|
|
10
|
+
|
|
11
|
+
ngOnInit() {
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
}
|
|
@@ -223,6 +223,237 @@ const angularProjectDef = {
|
|
|
223
223
|
}
|
|
224
224
|
};
|
|
225
225
|
|
|
226
|
+
const angularProjectDefV13 = {
|
|
227
|
+
"root": "",
|
|
228
|
+
"sourceRoot": "apps/@project.name@/src",
|
|
229
|
+
"projectType": "application",
|
|
230
|
+
"prefix": "app",
|
|
231
|
+
"schematics": {
|
|
232
|
+
"@schematics/angular:component": {
|
|
233
|
+
"style": "scss"
|
|
234
|
+
},
|
|
235
|
+
"@schematics/angular:application": {
|
|
236
|
+
"strict": true
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
"architect": {
|
|
240
|
+
"build": {
|
|
241
|
+
"builder": "@angular-devkit/build-angular:browser",
|
|
242
|
+
"options": {
|
|
243
|
+
"outputPath": "apps/@project.name@/dist",
|
|
244
|
+
"index": "apps/@project.name@/src/index.html",
|
|
245
|
+
"main": "apps/@project.name@/src/main.ts",
|
|
246
|
+
"polyfills": "apps/@project.name@/src/polyfills.ts",
|
|
247
|
+
"tsConfig": "apps/@project.name@/tsconfig.app.json",
|
|
248
|
+
"assets": [
|
|
249
|
+
"apps/@project.name@/src/favicon.ico",
|
|
250
|
+
"apps/@project.name@/src/assets",
|
|
251
|
+
{
|
|
252
|
+
"glob": "**/*",
|
|
253
|
+
"input": "node_modules/@eui/core/assets/",
|
|
254
|
+
"output": "./assets"
|
|
255
|
+
}
|
|
256
|
+
],
|
|
257
|
+
"styles": [
|
|
258
|
+
]
|
|
259
|
+
},
|
|
260
|
+
"configurations": {
|
|
261
|
+
"production": {
|
|
262
|
+
"fileReplacements": [
|
|
263
|
+
{
|
|
264
|
+
"replace": "apps/@project.name@/src/environments/environment.ts",
|
|
265
|
+
"with": "apps/@project.name@/src/environments/environment.prod.ts"
|
|
266
|
+
}
|
|
267
|
+
],
|
|
268
|
+
"optimization": false,
|
|
269
|
+
"outputHashing": "all",
|
|
270
|
+
"sourceMap": false,
|
|
271
|
+
"namedChunks": true,
|
|
272
|
+
"aot": true,
|
|
273
|
+
"extractLicenses": true,
|
|
274
|
+
"vendorChunk": false,
|
|
275
|
+
"buildOptimizer": false,
|
|
276
|
+
"budgets": [
|
|
277
|
+
{
|
|
278
|
+
"type": "initial",
|
|
279
|
+
"maximumWarning": "2mb",
|
|
280
|
+
"maximumError": "6mb"
|
|
281
|
+
}
|
|
282
|
+
]
|
|
283
|
+
},
|
|
284
|
+
"production-optimized": {
|
|
285
|
+
"fileReplacements": [
|
|
286
|
+
{
|
|
287
|
+
"replace": "apps/@project.name@/src/environments/environment.ts",
|
|
288
|
+
"with": "apps/@project.name@/src/environments/environment.prod.ts"
|
|
289
|
+
}
|
|
290
|
+
],
|
|
291
|
+
"optimization": {
|
|
292
|
+
"scripts": true,
|
|
293
|
+
"styles": {
|
|
294
|
+
"minify": false,
|
|
295
|
+
"inlineCritical": true
|
|
296
|
+
},
|
|
297
|
+
"fonts": true
|
|
298
|
+
},
|
|
299
|
+
"outputHashing": "all",
|
|
300
|
+
"sourceMap": false,
|
|
301
|
+
"namedChunks": true,
|
|
302
|
+
"aot": true,
|
|
303
|
+
"extractLicenses": true,
|
|
304
|
+
"vendorChunk": false,
|
|
305
|
+
"buildOptimizer": true,
|
|
306
|
+
"budgets": [
|
|
307
|
+
{
|
|
308
|
+
"type": "initial",
|
|
309
|
+
"maximumWarning": "2mb",
|
|
310
|
+
"maximumError": "6mb"
|
|
311
|
+
}
|
|
312
|
+
]
|
|
313
|
+
},
|
|
314
|
+
"development": {
|
|
315
|
+
"buildOptimizer": false,
|
|
316
|
+
"optimization": false,
|
|
317
|
+
"vendorChunk": true,
|
|
318
|
+
"extractLicenses": false,
|
|
319
|
+
"sourceMap": true,
|
|
320
|
+
"namedChunks": true
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
"defaultConfiguration": "production"
|
|
324
|
+
},
|
|
325
|
+
"serve": {
|
|
326
|
+
"builder": "@angular-devkit/build-angular:dev-server",
|
|
327
|
+
"options": {
|
|
328
|
+
"browserTarget": "@project.name@:build"
|
|
329
|
+
},
|
|
330
|
+
"configurations": {
|
|
331
|
+
"proxy-mock": {
|
|
332
|
+
"browserTarget": "@project.name@:build",
|
|
333
|
+
"proxyConfig": "apps/@project.name@/proxy-mock.conf.json"
|
|
334
|
+
},
|
|
335
|
+
"production": {
|
|
336
|
+
"browserTarget": "@project.name@:build:production"
|
|
337
|
+
},
|
|
338
|
+
"development": {
|
|
339
|
+
"browserTarget": "@project.name@:build:development"
|
|
340
|
+
}
|
|
341
|
+
},
|
|
342
|
+
"defaultConfiguration": "development"
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
};
|
|
346
|
+
|
|
347
|
+
const angularProjectLightDef = {
|
|
348
|
+
"root": "",
|
|
349
|
+
"sourceRoot": "apps/@project.name@/src",
|
|
350
|
+
"projectType": "application",
|
|
351
|
+
"prefix": "app",
|
|
352
|
+
"schematics": {
|
|
353
|
+
"@schematics/angular:component": {
|
|
354
|
+
"styleext": "scss"
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
"architect": {
|
|
358
|
+
"build": {
|
|
359
|
+
"builder": "ngx-build-plus:build",
|
|
360
|
+
"options": {
|
|
361
|
+
"outputPath": "apps/@project.name@/dist",
|
|
362
|
+
"index": "apps/@project.name@/src/index.html",
|
|
363
|
+
"main": "apps/@project.name@/src/main.ts",
|
|
364
|
+
"polyfills": "apps/@project.name@/src/polyfills.ts",
|
|
365
|
+
"tsConfig": "apps/@project.name@/tsconfig.app.json",
|
|
366
|
+
"assets": [
|
|
367
|
+
"apps/@project.name@/src/favicon.ico",
|
|
368
|
+
"apps/@project.name@/src/assets",
|
|
369
|
+
{
|
|
370
|
+
"glob": "**/*",
|
|
371
|
+
"input": "node_modules/@eui/core/assets/",
|
|
372
|
+
"output": "./assets"
|
|
373
|
+
}
|
|
374
|
+
],
|
|
375
|
+
"styles": [
|
|
376
|
+
"node_modules/@eui/styles/dist/assets/fonts/webfont/Roboto/Roboto.css",
|
|
377
|
+
"node_modules/@eui/styles/dist/styles/eui-primeng.css",
|
|
378
|
+
"node_modules/@eui/styles/dist/styles/eui.css",
|
|
379
|
+
"node_modules/@eui/styles/dist/styles/eui-shell-extended.css",
|
|
380
|
+
"apps/@project.name@/src/styles.scss"
|
|
381
|
+
]
|
|
382
|
+
},
|
|
383
|
+
"configurations": {
|
|
384
|
+
"production": {
|
|
385
|
+
"fileReplacements": [
|
|
386
|
+
{
|
|
387
|
+
"replace": "apps/@project.name@/src/environments/environment.ts",
|
|
388
|
+
"with": "apps/@project.name@/src/environments/environment.prod.ts"
|
|
389
|
+
},
|
|
390
|
+
],
|
|
391
|
+
"optimization": false,
|
|
392
|
+
"outputHashing": "all",
|
|
393
|
+
"sourceMap": false,
|
|
394
|
+
"extractCss": true,
|
|
395
|
+
"namedChunks": true,
|
|
396
|
+
"aot": true,
|
|
397
|
+
"extractLicenses": true,
|
|
398
|
+
"vendorChunk": false,
|
|
399
|
+
"buildOptimizer": false,
|
|
400
|
+
"budgets": [
|
|
401
|
+
{
|
|
402
|
+
"type": "initial",
|
|
403
|
+
"maximumWarning": "2mb",
|
|
404
|
+
"maximumError": "7mb"
|
|
405
|
+
}
|
|
406
|
+
]
|
|
407
|
+
},
|
|
408
|
+
"production-optimized": {
|
|
409
|
+
"fileReplacements": [
|
|
410
|
+
{
|
|
411
|
+
"replace": "apps/@project.name@/src/environments/environment.ts",
|
|
412
|
+
"with": "apps/@project.name@/src/environments/environment.prod.ts"
|
|
413
|
+
},
|
|
414
|
+
],
|
|
415
|
+
"optimization": true,
|
|
416
|
+
"outputHashing": "all",
|
|
417
|
+
"sourceMap": false,
|
|
418
|
+
"extractCss": true,
|
|
419
|
+
"namedChunks": true,
|
|
420
|
+
"aot": true,
|
|
421
|
+
"extractLicenses": true,
|
|
422
|
+
"vendorChunk": false,
|
|
423
|
+
"buildOptimizer": true,
|
|
424
|
+
"budgets": [
|
|
425
|
+
{
|
|
426
|
+
"type": "initial",
|
|
427
|
+
"maximumWarning": "2mb",
|
|
428
|
+
"maximumError": "7mb"
|
|
429
|
+
}
|
|
430
|
+
]
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
},
|
|
434
|
+
"serve": {
|
|
435
|
+
"builder": "@angular-devkit/build-angular:dev-server",
|
|
436
|
+
"options": {
|
|
437
|
+
"browserTarget": "@project.name@:build"
|
|
438
|
+
},
|
|
439
|
+
"configurations": {
|
|
440
|
+
"proxy-mock": {
|
|
441
|
+
"browserTarget": "@project.name@:build",
|
|
442
|
+
"proxyConfig": "apps/@project.name@/proxy-mock.conf.json"
|
|
443
|
+
},
|
|
444
|
+
"production": {
|
|
445
|
+
"browserTarget": "@project.name@:build:production"
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
};
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
|
|
226
457
|
|
|
227
458
|
const angularProjectDefFullSkeleton = {
|
|
228
459
|
"root": "",
|
|
@@ -817,7 +1048,15 @@ module.exports.registerAngularProjectDef = (project, build = false) => {
|
|
|
817
1048
|
}
|
|
818
1049
|
|
|
819
1050
|
} else {
|
|
820
|
-
|
|
1051
|
+
if (project.build && project.build.euiVersion === '13.x') {
|
|
1052
|
+
projectDef = JSON.stringify(angularProjectDefV13);
|
|
1053
|
+
} else {
|
|
1054
|
+
if (project.build && project.build.csdrFileReplacement === true) {
|
|
1055
|
+
projectDef = JSON.stringify(angularProjectLightDef);
|
|
1056
|
+
} else {
|
|
1057
|
+
projectDef = JSON.stringify(angularProjectDef);
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
821
1060
|
}
|
|
822
1061
|
let replaceProject = tools.replaceAll(projectDef, '@project.name@', project.name);
|
|
823
1062
|
replaceProject = JSON.parse(replaceProject);
|
|
@@ -152,9 +152,9 @@ const getDeps = (pkg, isMaster, envTarget = null) => {
|
|
|
152
152
|
depsComposite = tools.getJsonFileContent(depsCompositeJsonFile);
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
}
|
|
155
|
+
// TODO - handle dependencies composite per environment => one bamboo plan for each envs to be defined
|
|
156
|
+
// if (envTarget) {
|
|
157
|
+
// }
|
|
158
158
|
|
|
159
159
|
return innerCommon.getRemappedDeps(depsMetadata, { ...depsBase, ...depsComposite});
|
|
160
160
|
})
|
|
@@ -57,7 +57,7 @@ module.exports.getPackagesDeps = (depsType) => {
|
|
|
57
57
|
|
|
58
58
|
|
|
59
59
|
module.exports.storeMetadata = (
|
|
60
|
-
pkg, pkgVersion, pkgMetadata, isSnapshot, isMaster, isSupportBranch, isNextBranch, isSupportSnapshotBranch,
|
|
60
|
+
pkg, pkgVersion, pkgMetadata, isSnapshot, isMaster, isSupportBranch, isNextBranch, isSupportSnapshotBranch, isHotfixBranch,
|
|
61
61
|
pkgCompositeDeps, duration,
|
|
62
62
|
) => {
|
|
63
63
|
|
|
@@ -83,6 +83,7 @@ module.exports.storeMetadata = (
|
|
|
83
83
|
var packagesPrevTag = [];
|
|
84
84
|
var packagesNextTag = [];
|
|
85
85
|
var packagesPrevSnapshotsTag = [];
|
|
86
|
+
var packagesHotfixTag = [0];
|
|
86
87
|
|
|
87
88
|
if (tools.isFileExists(metadataFile)) {
|
|
88
89
|
metadata = require(metadataFile);
|
|
@@ -91,6 +92,7 @@ module.exports.storeMetadata = (
|
|
|
91
92
|
packagesPrevTag = metadata.packagesPrevTag;
|
|
92
93
|
packagesNextTag = metadata.packagesNextTag;
|
|
93
94
|
packagesPrevSnapshotsTag = metadata.packagesPrevSnapshotsTag;
|
|
95
|
+
packagesHotfixTag = metadata.packages.packagesHotfixTag;
|
|
94
96
|
}
|
|
95
97
|
|
|
96
98
|
const newPackage = {
|
|
@@ -209,11 +211,30 @@ module.exports.storeMetadata = (
|
|
|
209
211
|
}
|
|
210
212
|
}
|
|
211
213
|
|
|
214
|
+
if (isHotfixBranch) {
|
|
215
|
+
var pkgIdxHOTFIX;
|
|
216
|
+
if (packagesHotfixTag) {
|
|
217
|
+
pkgIdxHOTFIX = packagesHotfixTag.findIndex(item => item.name === pkg.name);
|
|
218
|
+
} else {
|
|
219
|
+
pkgIdxHOTFIX = -1;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
if (pkgIdxHOTFIX > -1) {
|
|
223
|
+
packagesHotfixTag[pkgIdxHOTFIX] = newPackage;
|
|
224
|
+
} else {
|
|
225
|
+
if (!packagesHotfixTag) {
|
|
226
|
+
packagesHotfixTag = [];
|
|
227
|
+
}
|
|
228
|
+
packagesHotfixTag.push(newPackage);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
212
232
|
metadata.packages = packages;
|
|
213
233
|
metadata.packagesLatestTag = packagesLatestTag;
|
|
214
234
|
metadata.packagesPrevTag = packagesPrevTag;
|
|
215
235
|
metadata.packagesNextTag = packagesNextTag;
|
|
216
236
|
metadata.packagesPrevSnapshotsTag = packagesPrevSnapshotsTag;
|
|
237
|
+
metadata.packagesHotfixTag = packagesHotfixTag;
|
|
217
238
|
|
|
218
239
|
if (!dryRun) {
|
|
219
240
|
tools.writeJsonFileSync(metadataFile, metadata);
|
|
@@ -381,6 +402,7 @@ module.exports.storeMetadataAssets = (pkg, pkgCompositeDeps) => {
|
|
|
381
402
|
return Promise.resolve()
|
|
382
403
|
.then(() => {
|
|
383
404
|
const pkgMetadataFile = path.join(pkg.paths.pkgBuild, 'bundles', 'package-metadata.json');
|
|
405
|
+
const pkgMetadataRootFile = path.join(pkg.paths.pkgDirectory, 'package-metadata.json');
|
|
384
406
|
|
|
385
407
|
const pkgMetadata = {
|
|
386
408
|
dependencies: pkgCompositeDeps
|
|
@@ -390,7 +412,8 @@ module.exports.storeMetadataAssets = (pkg, pkgCompositeDeps) => {
|
|
|
390
412
|
console.log(pkgMetadata);
|
|
391
413
|
|
|
392
414
|
if (!dryRun) {
|
|
393
|
-
|
|
415
|
+
tools.writeJsonFileSync(pkgMetadataFile, pkgMetadata);
|
|
416
|
+
tools.writeJsonFileSync(pkgMetadataRootFile, pkgMetadata);
|
|
394
417
|
}
|
|
395
418
|
})
|
|
396
419
|
|
|
@@ -20,7 +20,7 @@ module.exports.run = () => {
|
|
|
20
20
|
const project = configUtils.projects.getProject();
|
|
21
21
|
|
|
22
22
|
// fetching command parameters
|
|
23
|
-
var { branch, dryRun, envTarget, compositeType } = utils.tools.getArgs();
|
|
23
|
+
var { branch, dryRun, envTarget, compositeType, configEnvTarget } = utils.tools.getArgs();
|
|
24
24
|
|
|
25
25
|
// checking branch and envTarget types
|
|
26
26
|
if (branch && typeof (branch) === 'boolean') {
|
|
@@ -29,6 +29,9 @@ module.exports.run = () => {
|
|
|
29
29
|
if (envTarget && typeof (envTarget) === 'boolean') {
|
|
30
30
|
envTarget = null;
|
|
31
31
|
}
|
|
32
|
+
if (configEnvTarget && typeof (configEnvTarget) === 'boolean') {
|
|
33
|
+
configEnvTarget = null;
|
|
34
|
+
}
|
|
32
35
|
|
|
33
36
|
// globals
|
|
34
37
|
if (!branch && !envTarget) {
|
|
@@ -258,7 +261,7 @@ module.exports.run = () => {
|
|
|
258
261
|
// BUILD ANGULAR APPLICATION
|
|
259
262
|
// *****************************************************************
|
|
260
263
|
.then(() => {
|
|
261
|
-
return utils.buildApp.angular(envTarget, (isSnapshot || isSupportSnapshotBranch), newVersion);
|
|
264
|
+
return utils.buildApp.angular(envTarget, (isSnapshot || isSupportSnapshotBranch), newVersion, configEnvTarget);
|
|
262
265
|
})
|
|
263
266
|
|
|
264
267
|
|
|
@@ -21,7 +21,8 @@ module.exports.getBranches = () => {
|
|
|
21
21
|
const isMaster = (branch === 'master');
|
|
22
22
|
const isSupportSnapshot = (!isMaster && !isSnapshot && branch.indexOf('support/develop') > -1);
|
|
23
23
|
const isSupport = (!isMaster && !isSnapshot && !isSupportSnapshot && branch.indexOf('support/') > -1);
|
|
24
|
-
const
|
|
24
|
+
const isHotfix = (!isMaster && !isSnapshot && !isSupportSnapshot && !isSupport && branch.indexOf('hotfix/') > -1);
|
|
25
|
+
const isNext = (!isMaster && !isSnapshot && !isSupport && !isSupportSnapshot && !isHotfix && branch.indexOf('next/') > -1);
|
|
25
26
|
|
|
26
27
|
return {
|
|
27
28
|
isSupport: isSupport,
|
|
@@ -29,6 +30,7 @@ module.exports.getBranches = () => {
|
|
|
29
30
|
isNext: isNext,
|
|
30
31
|
isSnapshot: isSnapshot,
|
|
31
32
|
isMaster: isMaster,
|
|
33
|
+
isHotfix: isHotfix,
|
|
32
34
|
branch: branch
|
|
33
35
|
}
|
|
34
36
|
}
|
|
@@ -178,7 +180,7 @@ module.exports.updateVersion = (pkg, pkgMetadata) => {
|
|
|
178
180
|
|
|
179
181
|
// GET NEW VERSION from VALID commits found in metadata
|
|
180
182
|
.then(() => {
|
|
181
|
-
return versionUtils.package.getNewVersion(pkg, pkgMetadata.commits, (branches.isSnapshot || branches.isSupportSnapshot), branches.isNext, branches.isSupport);
|
|
183
|
+
return versionUtils.package.getNewVersion(pkg, pkgMetadata.commits, (branches.isSnapshot || branches.isSupportSnapshot), branches.isNext, branches.isSupport, branches.isHotfix);
|
|
182
184
|
})
|
|
183
185
|
|
|
184
186
|
|
|
@@ -187,7 +189,7 @@ module.exports.updateVersion = (pkg, pkgMetadata) => {
|
|
|
187
189
|
newVersion = version;
|
|
188
190
|
|
|
189
191
|
if (!dryRun) {
|
|
190
|
-
return versionUtils.package.updateVersion(pkg, version, (branches.isSnapshot || branches.isSupportSnapshot), branches.isNext, branches.isSupport);
|
|
192
|
+
return versionUtils.package.updateVersion(pkg, version, (branches.isSnapshot || branches.isSupportSnapshot), branches.isNext, branches.isSupport, branches.isHotfix);
|
|
191
193
|
}
|
|
192
194
|
})
|
|
193
195
|
|
|
@@ -304,6 +306,13 @@ module.exports.runGitOperations = (pkg, version) => {
|
|
|
304
306
|
}
|
|
305
307
|
})
|
|
306
308
|
|
|
309
|
+
// MERGE BACK ON support/develop for support release for package that has a support/develop branch active
|
|
310
|
+
.then(() => {
|
|
311
|
+
if (branches.isSupport && pkg.build && pkg.build.supportDevelopBranch) {
|
|
312
|
+
return utils.git.mergeSupportToSupportDevelop(pkg, pkg.paths.pkgDirectory, branches.branch, pkg.build.supportDevelopBranch);
|
|
313
|
+
}
|
|
314
|
+
})
|
|
315
|
+
|
|
307
316
|
.catch((e) => {
|
|
308
317
|
throw e;
|
|
309
318
|
})
|
|
@@ -318,7 +327,7 @@ module.exports.storeMetadata = (pkg, version, pkgMetadata, pkgCompositeDeps, dur
|
|
|
318
327
|
.then(() => {
|
|
319
328
|
return metadataUtils.package.storeMetadata(
|
|
320
329
|
pkg, version, pkgMetadata,
|
|
321
|
-
branches.isSnapshot, branches.isMaster, branches.isSupport, branches.isNext, branches.isSupportSnapshot,
|
|
330
|
+
branches.isSnapshot, branches.isMaster, branches.isSupport, branches.isNext, branches.isSupportSnapshot, branches.isHotfix,
|
|
322
331
|
pkgCompositeDeps,
|
|
323
332
|
duration
|
|
324
333
|
);
|
|
@@ -82,13 +82,13 @@ module.exports.run = () => {
|
|
|
82
82
|
// INSTALL dependencies by type
|
|
83
83
|
.then(() => {
|
|
84
84
|
if (pkg.remote) {
|
|
85
|
-
return innerRemote.install(pkg, branches.isMaster, envTarget);
|
|
85
|
+
return innerRemote.install(pkg, branches.isMaster || branches.isHotfix || branches.isSupport, envTarget);
|
|
86
86
|
|
|
87
87
|
} else if (pkg.backend) {
|
|
88
|
-
return innerBackend.install(pkg, branches.isMaster);
|
|
88
|
+
return innerBackend.install(pkg, branches.isMaster || branches.isHotfix || branches.isSupport);
|
|
89
89
|
|
|
90
90
|
} else {
|
|
91
|
-
return innerUi.install(pkg, branches.isMaster);
|
|
91
|
+
return innerUi.install(pkg, branches.isMaster || branches.isHotfix || branches.isSupport);
|
|
92
92
|
}
|
|
93
93
|
})
|
|
94
94
|
.then((compositeDeps) => {
|
|
@@ -62,7 +62,7 @@ const getCurrentVersion = (pkg) => {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
|
|
65
|
-
const writePackageJsonCore = (newVersion, folder, isSnapshot, isNextBranch, isSupportBranch) => {
|
|
65
|
+
const writePackageJsonCore = (newVersion, folder, isSnapshot, isNextBranch, isSupportBranch, isHotfixBranch) => {
|
|
66
66
|
return Promise.resolve()
|
|
67
67
|
.then(() => {
|
|
68
68
|
const pkgJsonFile = path.resolve(folder, 'package.json');
|
|
@@ -91,7 +91,7 @@ const writePackageJsonCore = (newVersion, folder, isSnapshot, isNextBranch, isSu
|
|
|
91
91
|
})
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
const writePackageJson = (pkg, newVersion, isSnapshot, isNextBranch, isSupportBranch) => {
|
|
94
|
+
const writePackageJson = (pkg, newVersion, isSnapshot, isNextBranch, isSupportBranch, isHotfixBranch) => {
|
|
95
95
|
return Promise.resolve()
|
|
96
96
|
.then(() => {
|
|
97
97
|
tools.logTitle('updating package version');
|
|
@@ -99,11 +99,11 @@ const writePackageJson = (pkg, newVersion, isSnapshot, isNextBranch, isSupportBr
|
|
|
99
99
|
if (!pkg.parent) {
|
|
100
100
|
return Promise.resolve()
|
|
101
101
|
.then(() => {
|
|
102
|
-
return writePackageJsonCore(newVersion, pkg.paths.pkgDirectory, isSnapshot, isNextBranch, isSupportBranch);
|
|
102
|
+
return writePackageJsonCore(newVersion, pkg.paths.pkgDirectory, isSnapshot, isNextBranch, isSupportBranch, isHotfixBranch);
|
|
103
103
|
})
|
|
104
104
|
.then(() => {
|
|
105
105
|
if (!pkg.element && !pkg.config) {
|
|
106
|
-
return writePackageJsonCore(newVersion, pkg.paths.pkgPublish, isSnapshot, isNextBranch, isSupportBranch);
|
|
106
|
+
return writePackageJsonCore(newVersion, pkg.paths.pkgPublish, isSnapshot, isNextBranch, isSupportBranch, isHotfixBranch);
|
|
107
107
|
}
|
|
108
108
|
})
|
|
109
109
|
.catch((e) => {
|
|
@@ -113,7 +113,7 @@ const writePackageJson = (pkg, newVersion, isSnapshot, isNextBranch, isSupportBr
|
|
|
113
113
|
} else {
|
|
114
114
|
return Promise.resolve()
|
|
115
115
|
.then(() => {
|
|
116
|
-
return writePackageJsonCore(newVersion, pkg.paths.pkgDirectory, isSnapshot, isNextBranch, isSupportBranch);
|
|
116
|
+
return writePackageJsonCore(newVersion, pkg.paths.pkgDirectory, isSnapshot, isNextBranch, isSupportBranch, isHotfixBranch);
|
|
117
117
|
})
|
|
118
118
|
.then(() => {
|
|
119
119
|
let linkedPackages = Object.keys(pkg.packages)
|
|
@@ -128,7 +128,7 @@ const writePackageJson = (pkg, newVersion, isSnapshot, isNextBranch, isSupportBr
|
|
|
128
128
|
.then((linkedPackages) => Promise.resolve().then(() => {
|
|
129
129
|
return linkedPackages.reduce((promise, pkg) => {
|
|
130
130
|
return promise.then(() => (
|
|
131
|
-
writePackageJsonCore(newVersion, pkg.paths.pkgPublish, isSnapshot, isNextBranch, isSupportBranch)
|
|
131
|
+
writePackageJsonCore(newVersion, pkg.paths.pkgPublish, isSnapshot, isNextBranch, isSupportBranch, isHotfixBranch)
|
|
132
132
|
));
|
|
133
133
|
}, Promise.resolve());
|
|
134
134
|
}))
|
|
@@ -188,7 +188,7 @@ const writePomXml = (pkg, newVersion, isSnapshot, isForceTimestamp = true) => {
|
|
|
188
188
|
|
|
189
189
|
// PUBLIC METHODS
|
|
190
190
|
|
|
191
|
-
module.exports.getNewVersion = (pkg, commits, isSnapshot, isNextBranch, isSupportBranch) => {
|
|
191
|
+
module.exports.getNewVersion = (pkg, commits, isSnapshot, isNextBranch, isSupportBranch, isHotfixBranch) => {
|
|
192
192
|
return Promise.resolve()
|
|
193
193
|
.then(() => {
|
|
194
194
|
return getCurrentVersion(pkg);
|
|
@@ -264,6 +264,10 @@ module.exports.getNewVersion = (pkg, commits, isSnapshot, isNextBranch, isSuppor
|
|
|
264
264
|
newVersion = semver.inc(currentVersion, 'prerelease');
|
|
265
265
|
}
|
|
266
266
|
|
|
267
|
+
if (isHotfixBranch) {
|
|
268
|
+
newVersion = semver.inc(currentVersion, 'prerelease');
|
|
269
|
+
}
|
|
270
|
+
|
|
267
271
|
tools.logSuccess('new version generated : ' + newVersion);
|
|
268
272
|
|
|
269
273
|
return newVersion;
|
|
@@ -274,11 +278,11 @@ module.exports.getNewVersion = (pkg, commits, isSnapshot, isNextBranch, isSuppor
|
|
|
274
278
|
}
|
|
275
279
|
|
|
276
280
|
|
|
277
|
-
module.exports.updateVersion = (pkg, newVersion, isSnapshot, isNextBranch, isSupportBranch) => {
|
|
281
|
+
module.exports.updateVersion = (pkg, newVersion, isSnapshot, isNextBranch, isSupportBranch, isHotfixBranch) => {
|
|
278
282
|
if (pkg.backend) {
|
|
279
283
|
return writePomXml(pkg, newVersion, isSnapshot);
|
|
280
284
|
}
|
|
281
285
|
else {
|
|
282
|
-
return writePackageJson(pkg, newVersion, isSnapshot, isNextBranch, isSupportBranch);
|
|
286
|
+
return writePackageJson(pkg, newVersion, isSnapshot, isNextBranch, isSupportBranch, isHotfixBranch);
|
|
283
287
|
}
|
|
284
288
|
}
|
|
@@ -13,7 +13,7 @@ const preBuildUtils = require('../../pre-build/pre-build-utils');
|
|
|
13
13
|
let {
|
|
14
14
|
skipLint, skipTest, skipCompile, configuration, baseHref,
|
|
15
15
|
watch, dryRun, maxSpaceSize, statsJson, extraWebpackConfig, ci,
|
|
16
|
-
deployUrl, sourceMap
|
|
16
|
+
deployUrl, sourceMap, configEnvTarget
|
|
17
17
|
} = tools.getArgs();
|
|
18
18
|
|
|
19
19
|
|
|
@@ -33,12 +33,18 @@ const getProjectInfos = () => {
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
module.exports.angular = (envTarget, isSnapshot, version) => {
|
|
36
|
+
module.exports.angular = (envTarget, isSnapshot, version, configEnvTargetIn) => {
|
|
37
37
|
|
|
38
38
|
const ng = path.resolve(process.cwd(), 'node_modules', '@angular', 'cli', 'bin', 'ng');
|
|
39
39
|
|
|
40
40
|
const currentProject = getProjectInfos();
|
|
41
41
|
|
|
42
|
+
// checking if configEnvTarget is passed as param, if not take the global script param
|
|
43
|
+
// as this angular build method can be called in stand-alone (outside of CSDR pipeline flow)
|
|
44
|
+
if (configEnvTargetIn) {
|
|
45
|
+
configEnvTarget = configEnvTargetIn;
|
|
46
|
+
}
|
|
47
|
+
|
|
42
48
|
// getting param from project config
|
|
43
49
|
if (currentProject.build) {
|
|
44
50
|
if (currentProject.build.skipLint) {
|
|
@@ -66,7 +72,7 @@ module.exports.angular = (envTarget, isSnapshot, version) => {
|
|
|
66
72
|
})
|
|
67
73
|
|
|
68
74
|
.then(() => {
|
|
69
|
-
return preBuildUtils.projects.preBuild(currentProject, envTarget, true);
|
|
75
|
+
return preBuildUtils.projects.preBuild(currentProject, envTarget, true, configEnvTarget);
|
|
70
76
|
})
|
|
71
77
|
|
|
72
78
|
.then(() => {
|
|
@@ -88,11 +94,6 @@ module.exports.angular = (envTarget, isSnapshot, version) => {
|
|
|
88
94
|
if (!skipLint) {
|
|
89
95
|
tools.logSuccess();
|
|
90
96
|
}
|
|
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
|
-
// }
|
|
96
97
|
})
|
|
97
98
|
|
|
98
99
|
|
|
@@ -7,6 +7,7 @@ const semver = require('semver');
|
|
|
7
7
|
// LOCAL
|
|
8
8
|
const tools = require('./tools');
|
|
9
9
|
const configUtils = require('../csdr/config/config-utils');
|
|
10
|
+
const { getPackageConfig } = require('./notification/config');
|
|
10
11
|
// const versionUtils = require('./version-utils');
|
|
11
12
|
|
|
12
13
|
// FETCH ARGS
|
|
@@ -225,10 +226,50 @@ const mergeMasterToDevelop = (pkg, folder, version) => {
|
|
|
225
226
|
})
|
|
226
227
|
}
|
|
227
228
|
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
const mergeSupportToSupportDevelop = (pkg, folder, supportBranch, supportDevelopBranch) => {
|
|
233
|
+
if (!supportDevelopBranch) {
|
|
234
|
+
tools.logWarning('supportDevelopBranch not found in package config...skipping');
|
|
235
|
+
return Promise.resolve();
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
tools.logTitle(`Merge back on ${supportDevelopBranch}`);
|
|
239
|
+
tools.logInfo(`Merging release changes into ${supportDevelopBranch} branch...`);
|
|
240
|
+
|
|
241
|
+
if (dryRun) {
|
|
242
|
+
tools.logInfo('DRY-RUN: skipping merge support to supportDevelop');
|
|
243
|
+
return Promise.resolve();
|
|
244
|
+
|
|
245
|
+
} else {
|
|
228
246
|
|
|
247
|
+
if (pkg && pkg.build && pkg.build.masterBranchOnly) {
|
|
248
|
+
tools.logInfo('Merge skipped project config set to master branch only');
|
|
249
|
+
return Promise.resolve();
|
|
250
|
+
|
|
251
|
+
} else {
|
|
252
|
+
return Promise.resolve()
|
|
253
|
+
.then(() => {
|
|
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 });
|
|
257
|
+
execa.shellSync(`git merge -X theirs ${supportBranch}`, { cwd: folder });
|
|
258
|
+
execa.shellSync(`git push origin ${supportDevelopBranch}`, { cwd: folder });
|
|
259
|
+
execa.shellSync(`git checkout ${supportBranch}`, { cwd: folder });
|
|
260
|
+
})
|
|
261
|
+
.then(() => {
|
|
262
|
+
tools.logSuccess();
|
|
263
|
+
})
|
|
264
|
+
.catch((e) => {
|
|
265
|
+
throw new Error(`Error trying merging ${supportBranch} to ${supportDevelopBranch} on ${folder}`);
|
|
266
|
+
})
|
|
267
|
+
}
|
|
268
|
+
}
|
|
229
269
|
}
|
|
230
270
|
|
|
231
271
|
|
|
272
|
+
|
|
232
273
|
const getGitHost = (externalRepo) => {
|
|
233
274
|
const config = configUtils.global.getConfig();
|
|
234
275
|
|
|
@@ -338,6 +379,7 @@ module.exports.hasCommitsSinceLastTag = hasCommitsSinceLastTag;
|
|
|
338
379
|
module.exports.commitAndPush = commitAndPush;
|
|
339
380
|
module.exports.tagVersion = tagVersion;
|
|
340
381
|
module.exports.mergeMasterToDevelop = mergeMasterToDevelop;
|
|
382
|
+
module.exports.mergeSupportToSupportDevelop = mergeSupportToSupportDevelop;
|
|
341
383
|
module.exports.cloneRepo = cloneRepo;
|
|
342
384
|
module.exports.checkout = checkout;
|
|
343
385
|
module.exports.getLastCommitAuthor = getLastCommitAuthor;
|
|
@@ -256,11 +256,14 @@ module.exports.remapRoutesByEnvConfig = (project, envTarget, build) => {
|
|
|
256
256
|
|
|
257
257
|
// get routes file content and replace tokens
|
|
258
258
|
routesRemapping.forEach((route) => {
|
|
259
|
-
tools.logInfo(
|
|
259
|
+
tools.logInfo(`\nchecking replacement for : ${JSON.stringify(route)}`);
|
|
260
260
|
const tokenToSearch = `./features/${route.featureModule}-lib.module#Module`;
|
|
261
|
+
tools.logInfo(`Searching token : ${tokenToSearch}`);
|
|
261
262
|
if (routesFileContent.indexOf(tokenToSearch) > -1) {
|
|
262
263
|
tools.logInfo(`token ${tokenToSearch} found...replacing by ${route.routeModuleDef}`);
|
|
263
264
|
routesFileContent = tools.replaceAll(routesFileContent, tokenToSearch, route.routeModuleDef);
|
|
265
|
+
} else {
|
|
266
|
+
tools.logWarning(`token ${tokenToSearch} NOT FOUND`);
|
|
264
267
|
}
|
|
265
268
|
})
|
|
266
269
|
|
|
@@ -277,6 +280,54 @@ module.exports.remapRoutesByEnvConfig = (project, envTarget, build) => {
|
|
|
277
280
|
if (routesFileContent.indexOf(tokenToSearch) > -1) {
|
|
278
281
|
tools.logInfo(`token ${tokenToSearch} found...replacing by ${route.updatedRoute}`);
|
|
279
282
|
routesFileContent = tools.replaceAll(routesFileContent, tokenToSearch, route.updatedRoute);
|
|
283
|
+
} else {
|
|
284
|
+
tools.logWarning(`token ${tokenToSearch} NOT FOUND`);
|
|
285
|
+
}
|
|
286
|
+
})
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
// checking paths mapping (new method for v10 remotes)
|
|
290
|
+
const pathsMapping = config.pathsMapping;
|
|
291
|
+
if (!pathsMapping) {
|
|
292
|
+
tools.logWarning('No pathsMapping found in current config...skipping');
|
|
293
|
+
|
|
294
|
+
} else {
|
|
295
|
+
tools.logInfo('Paths mappings for v10 remotes activation');
|
|
296
|
+
pathsMapping.forEach((pathMapping) => {
|
|
297
|
+
tools.logInfo(`Checking path: ${pathMapping.path}`);
|
|
298
|
+
const placeholderToSearch = `// ${pathMapping.path}-placeholder`;
|
|
299
|
+
|
|
300
|
+
if (routesFileContent.indexOf(placeholderToSearch) > -1) {
|
|
301
|
+
tools.logInfo(`path placeholder: "${placeholderToSearch}" found...replacing`);
|
|
302
|
+
|
|
303
|
+
let placeholderContent = '';
|
|
304
|
+
if (pathMapping.data) {
|
|
305
|
+
placeholderContent += 'data:{';
|
|
306
|
+
if (pathMapping.data.featureName) {
|
|
307
|
+
placeholderContent += `featureName: "${pathMapping.data.featureName}"`;
|
|
308
|
+
}
|
|
309
|
+
if (pathMapping.data.moduleId) {
|
|
310
|
+
placeholderContent += `, moduleId: "${pathMapping.data.moduleId}"`;
|
|
311
|
+
}
|
|
312
|
+
if (pathMapping.data.elementTag) {
|
|
313
|
+
placeholderContent += `, elementTag: "${pathMapping.data.elementTag}"`;
|
|
314
|
+
}
|
|
315
|
+
if (pathMapping.data.iframe) {
|
|
316
|
+
placeholderContent += `, iframe: ${pathMapping.data.iframe}`;
|
|
317
|
+
}
|
|
318
|
+
placeholderContent += '}';
|
|
319
|
+
}
|
|
320
|
+
if (pathMapping.loadChildren) {
|
|
321
|
+
placeholderContent += `, loadChildren: "${pathMapping.loadChildren}"`;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
tools.logInfo('Generated content for route: ');
|
|
325
|
+
console.log(placeholderContent);
|
|
326
|
+
|
|
327
|
+
routesFileContent = tools.replaceAll(routesFileContent, placeholderToSearch, placeholderContent);
|
|
328
|
+
|
|
329
|
+
} else {
|
|
330
|
+
tools.logWarning(`token ${placeholderToSearch} NOT FOUND`);
|
|
280
331
|
}
|
|
281
332
|
})
|
|
282
333
|
}
|
|
@@ -9,10 +9,10 @@ const translationUtils = require('./translations/translation-utils');
|
|
|
9
9
|
|
|
10
10
|
const configUtils = require('../../csdr/config/config-utils');
|
|
11
11
|
|
|
12
|
-
let {
|
|
12
|
+
let { openid } = tools.getArgs();
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
module.exports.preBuild = (project, envTarget, build) => {
|
|
15
|
+
module.exports.preBuild = (project, envTarget, build, configEnvTarget) => {
|
|
16
16
|
|
|
17
17
|
return Promise.resolve()
|
|
18
18
|
|
|
@@ -111,7 +111,7 @@ module.exports.preBuild = (project, envTarget, build) => {
|
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
if (configEnvTarget) {
|
|
114
|
-
return this.injectAppConfig(project, configEnvTarget
|
|
114
|
+
return this.injectAppConfig(project, configEnvTarget);
|
|
115
115
|
}
|
|
116
116
|
})
|
|
117
117
|
|
|
@@ -122,7 +122,7 @@ module.exports.preBuild = (project, envTarget, build) => {
|
|
|
122
122
|
|
|
123
123
|
|
|
124
124
|
|
|
125
|
-
module.exports.injectAppConfig = (project, configEnvTarget
|
|
125
|
+
module.exports.injectAppConfig = (project, configEnvTarget) => {
|
|
126
126
|
return Promise.resolve()
|
|
127
127
|
.then(() => {
|
|
128
128
|
tools.logInfo(`Executing configuration replacement for : ${configEnvTarget} environment`);
|
|
@@ -10,7 +10,7 @@ const configUtils = require('../../csdr/config/config-utils');
|
|
|
10
10
|
|
|
11
11
|
module.exports.serve = () => {
|
|
12
12
|
|
|
13
|
-
let { configuration, baseHref, host, proxyConfig, maxSpaceSize, port, disableHostCheck, open, debug } = tools.getArgs();
|
|
13
|
+
let { configuration, baseHref, host, proxyConfig, maxSpaceSize, port, disableHostCheck, open, debug, configEnvTarget } = tools.getArgs();
|
|
14
14
|
|
|
15
15
|
const prj = configUtils.projects.getProject();
|
|
16
16
|
|
|
@@ -38,7 +38,7 @@ module.exports.serve = () => {
|
|
|
38
38
|
})
|
|
39
39
|
|
|
40
40
|
.then(() => {
|
|
41
|
-
return preBuildUtils.projects.preBuild(prj, configuration, false);
|
|
41
|
+
return preBuildUtils.projects.preBuild(prj, configuration, false, configEnvTarget);
|
|
42
42
|
})
|
|
43
43
|
|
|
44
44
|
|
package/scripts/utils/tools.js
CHANGED
|
@@ -565,8 +565,6 @@ function getSysConfig() {
|
|
|
565
565
|
infos.httpsProxy = execSync('npm config get https-proxy').toString().trim();
|
|
566
566
|
const registry = execSync('npm config get registry').toString().trim();
|
|
567
567
|
|
|
568
|
-
infos.isRegistryEcDevops = registry.indexOf('ecdevops.eu') >= 0;
|
|
569
|
-
|
|
570
568
|
logSuccess();
|
|
571
569
|
|
|
572
570
|
return infos;
|