@eui/tools 4.19.18 → 4.21.0

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.
Files changed (34) hide show
  1. package/.version.properties +1 -1
  2. package/CHANGELOG.md +27 -0
  3. package/package.json +1 -1
  4. package/sandbox.js +29 -8
  5. package/scripts/csdr/config/angular.js +287 -0
  6. package/scripts/csdr/config/global.js +8 -0
  7. package/scripts/csdr/init/resources/14.x/browserslistrc +6 -0
  8. package/scripts/csdr/init/resources/14.x/resolutions.json +5 -0
  9. package/scripts/csdr/install/build-package.js +1 -1
  10. package/scripts/csdr/install/common.js +5 -5
  11. package/scripts/csdr/install/composite-utils.js +2 -2
  12. package/scripts/csdr/install/local-dev.js +1 -1
  13. package/scripts/csdr/install/remote.js +1 -1
  14. package/scripts/csdr/metadata/common.js +21 -0
  15. package/scripts/csdr/metadata/package.js +12 -50
  16. package/scripts/csdr/release/package/common.js +5 -0
  17. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/app/app.module.ts +52 -0
  18. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/app/core/reducers/index.ts +40 -0
  19. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/config/global.ts +4 -0
  20. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/config/index.ts +8 -0
  21. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/config/modules.ts +4 -0
  22. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/environments/environment.dev.ts +9 -0
  23. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/environments/environment.prod.ts +9 -0
  24. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/environments/environment.ts +21 -0
  25. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/favicon.ico +0 -0
  26. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/karma.conf.js +7 -0
  27. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/main.ts +21 -0
  28. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/polyfills.ts +86 -0
  29. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/src/_generated/tst.ts +33 -0
  30. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/tsconfig.app.json +19 -0
  31. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/tsconfig.spec.json +9 -0
  32. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/tslint.json +17 -0
  33. package/scripts/utils/pre-build/injection/skeletons.js +3 -1
  34. package/scripts/utils/pre-build/projects.js +2 -0
@@ -1 +1 @@
1
- 4.19.18
1
+ 4.21.0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,30 @@
1
+ ## 4.21.0 (2022-03-15)
2
+
3
+ ##### New Features
4
+
5
+ * **other:**
6
+ * adapted for eUI14 csdr injections - EUI-5739 [EUI-5739](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-5739) ([e7e2db68](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/e7e2db689931ef9783e27b64313b3661bf7c05ec))
7
+
8
+ * * *
9
+ * * *
10
+ ## 4.20.0 (2022-03-14)
11
+
12
+ ##### New Features
13
+
14
+ * **other:**
15
+ * split devops-metadata and devops-metadata-locks usage to split commit - race conditions - EUI-4107 [EUI-4107](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4107) ([ffc3871b](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/ffc3871b107cb1a9e23d8172e78d89e76a039de0))
16
+
17
+ * * *
18
+ * * *
19
+ ## 4.19.19 (2022-03-10)
20
+
21
+ ##### Bug Fixes
22
+
23
+ * **other:**
24
+ * avoid snapshot fetch in TST and up composition for prevSnapshots releases - EUI-4107 [EUI-4107](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4107) ([2694274d](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/2694274d522c9361b430a557a04557b717080614))
25
+
26
+ * * *
27
+ * * *
1
28
  ## 4.19.18 (2022-03-09)
2
29
 
3
30
  ##### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "4.19.18",
3
+ "version": "4.21.0",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
package/sandbox.js CHANGED
@@ -631,13 +631,7 @@ const translationUtils = require('./scripts/utils/pre-build/translations/transla
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
634
 
639
- // return compositeUtils.getDeps(prj, 'TST');
640
- // })
641
635
 
642
636
 
643
637
 
@@ -667,8 +661,35 @@ const translationUtils = require('./scripts/utils/pre-build/translations/transla
667
661
 
668
662
 
669
663
 
664
+ // return Promise.resolve()
665
+ // .then(() => {
666
+ // const pkg = configUtils.packages.getPackage('eui', true);
667
+ // console.log(pkg);
668
+ // })
669
+
670
+ // return Promise.resolve()
671
+ // .then(() => {
672
+ // const pkg = configUtils.packages.getPackageByNpmPkg('@csdr/core', true);
673
+ // console.log(pkg);
674
+ // const versions = metadataUtils.package.getPackageVersions(pkg);
675
+
676
+ // console.log(
677
+ // versions.filter((v) => {
678
+ // return v.version.split('.')[0] === '1'
679
+ // }).splice(-1)[0]
680
+ // );
681
+ // })
682
+
683
+ // return Promise.resolve()
684
+ // .then(() => {
685
+ // const prjName = 'my-workplace';
686
+ // const prj = configUtils.projects.getCsdrProject(prjName);
687
+
688
+ // return compositeUtils.getDeps(prj, 'DEV');
689
+ // })
690
+
670
691
  return Promise.resolve()
671
692
  .then(() => {
672
- const pkg = configUtils.packages.getPackage('eui', true);
673
- console.log(pkg);
693
+ const configOptions = configUtils.global.getConfigOptions();
694
+ console.log(configOptions);
674
695
  })
@@ -344,6 +344,130 @@ const angularProjectDefV13 = {
344
344
  }
345
345
  };
346
346
 
347
+
348
+ const angularProjectDefV14 = {
349
+ "root": "",
350
+ "sourceRoot": "apps/@project.name@/src",
351
+ "projectType": "application",
352
+ "prefix": "app",
353
+ "schematics": {
354
+ "@schematics/angular:component": {
355
+ "style": "scss"
356
+ },
357
+ "@schematics/angular:application": {
358
+ "strict": true
359
+ }
360
+ },
361
+ "architect": {
362
+ "build": {
363
+ "builder": "@angular-devkit/build-angular:browser",
364
+ "options": {
365
+ "outputPath": "apps/@project.name@/dist",
366
+ "index": "apps/@project.name@/src/index.html",
367
+ "main": "apps/@project.name@/src/main.ts",
368
+ "polyfills": "apps/@project.name@/src/polyfills.ts",
369
+ "tsConfig": "apps/@project.name@/tsconfig.app.json",
370
+ "assets": [
371
+ "apps/@project.name@/src/favicon.ico",
372
+ "apps/@project.name@/src/assets",
373
+ {
374
+ "glob": "**/*",
375
+ "input": "node_modules/@eui/core/assets/",
376
+ "output": "./assets"
377
+ }
378
+ ],
379
+ "styles": [
380
+ ]
381
+ },
382
+ "configurations": {
383
+ "production": {
384
+ "fileReplacements": [
385
+ {
386
+ "replace": "apps/@project.name@/src/environments/environment.ts",
387
+ "with": "apps/@project.name@/src/environments/environment.prod.ts"
388
+ }
389
+ ],
390
+ "optimization": false,
391
+ "outputHashing": "all",
392
+ "sourceMap": false,
393
+ "namedChunks": true,
394
+ "aot": true,
395
+ "extractLicenses": true,
396
+ "vendorChunk": false,
397
+ "buildOptimizer": false,
398
+ "budgets": [
399
+ {
400
+ "type": "initial",
401
+ "maximumWarning": "2mb",
402
+ "maximumError": "6mb"
403
+ }
404
+ ]
405
+ },
406
+ "production-optimized": {
407
+ "fileReplacements": [
408
+ {
409
+ "replace": "apps/@project.name@/src/environments/environment.ts",
410
+ "with": "apps/@project.name@/src/environments/environment.prod.ts"
411
+ }
412
+ ],
413
+ "optimization": {
414
+ "scripts": true,
415
+ "styles": {
416
+ "minify": false,
417
+ "inlineCritical": true
418
+ },
419
+ "fonts": true
420
+ },
421
+ "outputHashing": "all",
422
+ "sourceMap": false,
423
+ "namedChunks": true,
424
+ "aot": true,
425
+ "extractLicenses": true,
426
+ "vendorChunk": false,
427
+ "buildOptimizer": true,
428
+ "budgets": [
429
+ {
430
+ "type": "initial",
431
+ "maximumWarning": "2mb",
432
+ "maximumError": "6mb"
433
+ }
434
+ ]
435
+ },
436
+ "development": {
437
+ "buildOptimizer": false,
438
+ "optimization": false,
439
+ "vendorChunk": true,
440
+ "extractLicenses": false,
441
+ "sourceMap": true,
442
+ "namedChunks": true
443
+ }
444
+ },
445
+ "defaultConfiguration": "production"
446
+ },
447
+ "serve": {
448
+ "builder": "@angular-devkit/build-angular:dev-server",
449
+ "options": {
450
+ "browserTarget": "@project.name@:build"
451
+ },
452
+ "configurations": {
453
+ "proxy-mock": {
454
+ "browserTarget": "@project.name@:build",
455
+ "proxyConfig": "apps/@project.name@/proxy-mock.conf.json"
456
+ },
457
+ "production": {
458
+ "browserTarget": "@project.name@:build:production"
459
+ },
460
+ "development": {
461
+ "browserTarget": "@project.name@:build:development"
462
+ }
463
+ },
464
+ "defaultConfiguration": "development"
465
+ }
466
+ }
467
+ };
468
+
469
+
470
+
347
471
  const angularProjectLightDef = {
348
472
  "root": "",
349
473
  "sourceRoot": "apps/@project.name@/src",
@@ -679,6 +803,129 @@ const angularProjectDefFullSkeletonV13 = {
679
803
  }
680
804
  };
681
805
 
806
+ const angularProjectDefFullSkeletonV14 = {
807
+ "root": "",
808
+ "sourceRoot": "apps/@project.name@/src",
809
+ "projectType": "application",
810
+ "prefix": "app",
811
+ "schematics": {
812
+ "@schematics/angular:component": {
813
+ "style": "scss"
814
+ },
815
+ "@schematics/angular:application": {
816
+ "strict": true
817
+ }
818
+ },
819
+ "architect": {
820
+ "build": {
821
+ "builder": "@angular-devkit/build-angular:browser",
822
+ "options": {
823
+ "outputPath": "apps/@project.name@/dist",
824
+ "index": "apps/@project.name@/src/index.html",
825
+ "main": "apps/@project.name@/src/_generated/main.ts",
826
+ "polyfills": "apps/@project.name@/src/_generated/polyfills.ts",
827
+ "tsConfig": "apps/@project.name@/tsconfig.app.json",
828
+ "assets": [
829
+ "apps/@project.name@/src/favicon.ico",
830
+ "apps/@project.name@/src/assets",
831
+ {
832
+ "glob": "**/*",
833
+ "input": "node_modules/@eui/core/assets/",
834
+ "output": "./assets"
835
+ }
836
+ ],
837
+ "styles": [
838
+ ]
839
+ },
840
+ "configurations": {
841
+ "production": {
842
+ "fileReplacements": [
843
+ {
844
+ "replace": "apps/@project.name@/src/_generated/environments/environment.ts",
845
+ "with": "apps/@project.name@/src/_generated/environments/environment.prod.ts"
846
+ }
847
+ ],
848
+ "optimization": false,
849
+ "outputHashing": "all",
850
+ "sourceMap": false,
851
+ "namedChunks": true,
852
+ "aot": true,
853
+ "extractLicenses": true,
854
+ "vendorChunk": false,
855
+ "buildOptimizer": false,
856
+ "budgets": [
857
+ {
858
+ "type": "initial",
859
+ "maximumWarning": "2mb",
860
+ "maximumError": "6mb"
861
+ }
862
+ ]
863
+ },
864
+ "production-optimized-no-openid": {
865
+ "fileReplacements": [
866
+ {
867
+ "replace": "apps/@project.name@/src/_generated/environments/environment.ts",
868
+ "with": "apps/@project.name@/src/_generated/environments/environment.prod.ts"
869
+ }
870
+ ],
871
+ "optimization": {
872
+ "scripts": true,
873
+ "styles": {
874
+ "minify": false,
875
+ "inlineCritical": true
876
+ },
877
+ "fonts": true
878
+ },
879
+ "outputHashing": "all",
880
+ "sourceMap": false,
881
+ "namedChunks": true,
882
+ "aot": true,
883
+ "extractLicenses": true,
884
+ "vendorChunk": false,
885
+ "buildOptimizer": true,
886
+ "budgets": [
887
+ {
888
+ "type": "initial",
889
+ "maximumWarning": "2mb",
890
+ "maximumError": "6mb"
891
+ }
892
+ ]
893
+ },
894
+ "development": {
895
+ "buildOptimizer": false,
896
+ "optimization": false,
897
+ "vendorChunk": true,
898
+ "extractLicenses": false,
899
+ "sourceMap": true,
900
+ "namedChunks": true
901
+ }
902
+ },
903
+ "defaultConfiguration": "production"
904
+ },
905
+ "serve": {
906
+ "builder": "@angular-devkit/build-angular:dev-server",
907
+ "options": {
908
+ "browserTarget": "@project.name@:build"
909
+ },
910
+ "configurations": {
911
+ "proxy-mock": {
912
+ "browserTarget": "@project.name@:build",
913
+ "proxyConfig": "apps/@project.name@/proxy-mock.conf.json"
914
+ },
915
+ "production": {
916
+ "browserTarget": "@project.name@:build:production"
917
+ },
918
+ "development": {
919
+ "browserTarget": "@project.name@:build:development"
920
+ }
921
+ },
922
+ "defaultConfiguration": "development"
923
+ }
924
+ }
925
+ };
926
+
927
+
928
+
682
929
 
683
930
 
684
931
  const angularProjectDefConfiguration = {
@@ -829,6 +1076,38 @@ const angularPackageDefV13 = {
829
1076
  };
830
1077
 
831
1078
 
1079
+ const angularPackageDefV14 = {
1080
+ "root": "@path@/@module.name@",
1081
+ "sourceRoot": "@path@/@module.name@@srcRoot@",
1082
+ "projectType": "library",
1083
+ "prefix": "lib",
1084
+ "architect": {
1085
+ "build": {
1086
+ "builder": "@angular-devkit/build-angular:ng-packagr",
1087
+ "options": {
1088
+ "tsConfig": "@path@/@module.name@/tsconfig.lib.json",
1089
+ "project": "@path@/@module.name@/ng-package.json"
1090
+ },
1091
+ "configurations": {
1092
+ "production": {
1093
+ "tsConfig": "@path@/@module.name@/tsconfig.lib.prod.json"
1094
+ }
1095
+ }
1096
+ },
1097
+ "test": {
1098
+ "builder": "@angular-devkit/build-angular:karma",
1099
+ "options": {
1100
+ "main": "@path@/@module.name@@srcRoot@@srcRootTesting@/test.ts",
1101
+ "tsConfig": "@path@/@module.name@/tsconfig.spec.json",
1102
+ "karmaConfig": "@path@/@module.name@/karma.conf.js"
1103
+ }
1104
+ }
1105
+ }
1106
+ };
1107
+
1108
+
1109
+
1110
+
832
1111
  const angularElementProjectDef = {
833
1112
  "root": "@module.name@/",
834
1113
  "sourceRoot": "@module.name@/src",
@@ -973,6 +1252,10 @@ module.exports.registerAngularPackage = (pkg, isReset) => {
973
1252
  if (pkg.build && pkg.build.euiVersion === '13.x') {
974
1253
  projectDef = JSON.stringify(angularPackageDefV13);
975
1254
  }
1255
+ if (pkg.build && pkg.build.euiVersion === '14.x') {
1256
+ projectDef = JSON.stringify(angularPackageDefV14);
1257
+ }
1258
+
976
1259
 
977
1260
  let srcRoot = '/src', srcRootTesting = '';
978
1261
  if (pkg.build && typeof pkg.build.srcRootDefault === 'boolean' && pkg.build.srcRootDefault === false) {
@@ -1043,6 +1326,8 @@ module.exports.registerAngularProjectDef = (project, build = false) => {
1043
1326
  if (project.csdrFullSkeleton) {
1044
1327
  if (project.build && project.build.euiVersion === '13.x') {
1045
1328
  projectDef = JSON.stringify(angularProjectDefFullSkeletonV13);
1329
+ } else if (project.build && project.build.euiVersion === '14.x') {
1330
+ projectDef = JSON.stringify(angularProjectDefFullSkeletonV14);
1046
1331
  } else {
1047
1332
  projectDef = JSON.stringify(angularProjectDefFullSkeleton);
1048
1333
  }
@@ -1050,6 +1335,8 @@ module.exports.registerAngularProjectDef = (project, build = false) => {
1050
1335
  } else {
1051
1336
  if (project.build && project.build.euiVersion === '13.x') {
1052
1337
  projectDef = JSON.stringify(angularProjectDefV13);
1338
+ } else if (project.build && project.build.euiVersion === '14.x') {
1339
+ projectDef = JSON.stringify(angularProjectDefV14);
1053
1340
  } else {
1054
1341
  if (project.build && project.build.csdrFileReplacement === true) {
1055
1342
  projectDef = JSON.stringify(angularProjectLightDef);
@@ -210,7 +210,9 @@ module.exports.getConfigOptions = () => {
210
210
 
211
211
  let configOptions = {
212
212
  DEVOPS_METADATA_REPOSITORY: null,
213
+ DEVOPS_METADATA_LOCKS_REPOSITORY: null,
213
214
  DEVOPS_METADATA_PATH: null,
215
+ DEVOPS_METADATA_LOCKS_PATH: null,
214
216
  DEVOPS_METADATA_JSON: '.devops-metadata.json',
215
217
  DEVOPS_CONFIG_JSON: '.devops-config.json',
216
218
  ISSUES_MANAGER_HOST: null,
@@ -234,6 +236,12 @@ module.exports.getConfigOptions = () => {
234
236
  if (devopsMetadata.folder) {
235
237
  configOptions.DEVOPS_METADATA_PATH = path.join(process.cwd(), devopsMetadata.folder);
236
238
  }
239
+ if (devopsMetadata.locksRepository) {
240
+ configOptions.DEVOPS_METADATA_LOCKS_REPOSITORY = devopsMetadata.locksRepository;
241
+ }
242
+ if (devopsMetadata.locksFolder) {
243
+ configOptions.DEVOPS_METADATA_LOCKS_PATH = path.join(process.cwd(), devopsMetadata.locksFolder);
244
+ }
237
245
  }
238
246
 
239
247
  // getting issues manager options
@@ -0,0 +1,6 @@
1
+ last 1 Chrome version
2
+ last 1 Firefox version
3
+ last 2 Edge major versions
4
+ last 2 Safari major versions
5
+ last 2 iOS major versions
6
+ Firefox ESR
@@ -0,0 +1,5 @@
1
+ {
2
+ "@types/node": ">=14.14.10",
3
+ "https-proxy-agent": ">=2.2.3",
4
+ "mem": ">=4.3.0 <=8.1.1"
5
+ }
@@ -63,7 +63,7 @@ module.exports.install = (prj, pkg, isMaster) => {
63
63
  })
64
64
 
65
65
  .then((depsMetadata) => {
66
- return innerCommon.getRemappedDeps(depsMetadata, localPkgCompositeDeps);
66
+ return innerCommon.getRemappedDeps(depsMetadata, localPkgCompositeDeps, false);
67
67
  })
68
68
 
69
69
  .then((remappedLocalPkgCompositeDeps) => {
@@ -72,7 +72,7 @@ const executeInstall = (cwdPath) => {
72
72
  }
73
73
 
74
74
 
75
- const getRemappedDeps = (pkgDeps, pkgDefaultDeps) => {
75
+ const getRemappedDeps = (pkgDeps, pkgDefaultDeps, isMaster) => {
76
76
 
77
77
  return Promise.resolve()
78
78
  .then(() => {
@@ -114,7 +114,7 @@ const getRemappedDeps = (pkgDeps, pkgDefaultDeps) => {
114
114
  })
115
115
 
116
116
  .then((remappedDeps) => {
117
- return getResolvedCarretDeps(remappedDeps);
117
+ return getResolvedCarretDeps(remappedDeps, isMaster);
118
118
  })
119
119
 
120
120
 
@@ -127,7 +127,7 @@ const getRemappedDeps = (pkgDeps, pkgDefaultDeps) => {
127
127
 
128
128
 
129
129
 
130
- const getResolvedCarretDeps = (deps) => {
130
+ const getResolvedCarretDeps = (deps, isMaster) => {
131
131
  tools.logTitle('Resolving carret for next version packages');
132
132
 
133
133
  tools.logInfo('processing dependencies : ');
@@ -148,7 +148,7 @@ const getResolvedCarretDeps = (deps) => {
148
148
  const pkg = configUtils.packages.getPackageByNpmPkg(npmPkg, true);
149
149
 
150
150
  // getting last major version from metadata history for pkg found
151
- const lastMajorVersion = metadataUtils.package.getLastMajorVersion(pkg, version.substr(1).split('.')[0]);
151
+ const lastMajorVersion = metadataUtils.package.getLastMajorVersion(pkg, version.substr(1).split('.')[0], isMaster);
152
152
 
153
153
  if (lastMajorVersion) {
154
154
  tools.logInfo(`--version found : ${lastMajorVersion}`);
@@ -275,7 +275,7 @@ const getLocalPackagesCompositeDepsRemapped = () => {
275
275
  .then((depsMetadata) => {
276
276
  const compositeDeps = getLocalPackagesCompositeDeps();
277
277
 
278
- return getRemappedDeps(depsMetadata, compositeDeps);
278
+ return getRemappedDeps(depsMetadata, compositeDeps, false);
279
279
  })
280
280
 
281
281
  .then((remappedDeps) => {
@@ -104,7 +104,7 @@ const getDeps_DEV = (prj, prjDeps) => {
104
104
 
105
105
  // Re-mapping the dependencies found against their max "carret" versions found in the base dependencies defs in the project
106
106
  .then((pkgDeps) => {
107
- return innerCommon.getRemappedDeps(pkgDeps, prjDeps);
107
+ return innerCommon.getRemappedDeps(pkgDeps, prjDeps, false);
108
108
  })
109
109
 
110
110
  .catch((e) => {
@@ -131,7 +131,7 @@ const getDeps_TST = (prj, prjDeps) => {
131
131
 
132
132
  // Re-mapping the dependencies found against their max "carret" versions found in the base dependencies defs in the project
133
133
  .then((pkgDeps) => {
134
- return innerCommon.getRemappedDeps(pkgDeps, prjDeps);
134
+ return innerCommon.getRemappedDeps(pkgDeps, prjDeps, true);
135
135
  })
136
136
 
137
137
  .catch((e) => {
@@ -85,7 +85,7 @@ module.exports.install = (pkg) => {
85
85
  tools.logInfo('Packages composite deps found : ');
86
86
  console.log(packagesCompositeDeps);
87
87
 
88
- return innerCommon.getRemappedDeps(depsMetadata, configDeps);
88
+ return innerCommon.getRemappedDeps(depsMetadata, configDeps, false);
89
89
  })
90
90
 
91
91
 
@@ -156,7 +156,7 @@ const getDeps = (pkg, isMaster, envTarget = null) => {
156
156
  // if (envTarget) {
157
157
  // }
158
158
 
159
- return innerCommon.getRemappedDeps(depsMetadata, { ...depsBase, ...depsComposite});
159
+ return innerCommon.getRemappedDeps(depsMetadata, { ...depsBase, ...depsComposite}, isMaster || envTarget !== null);
160
160
  })
161
161
 
162
162
  .catch((e) => {
@@ -37,6 +37,27 @@ module.exports.cloneMetadataRepo = () => {
37
37
  }
38
38
 
39
39
 
40
+ module.exports.cloneMetadataLocksRepo = () => {
41
+ const configOptions = configUtils.global.getConfigOptions();
42
+
43
+ tools.logTitle('Cloning devops metadata locks repo');
44
+
45
+ if (dryRun || skipClone) {
46
+ tools.logInfo('DRY-RUN: cloning skipped');
47
+ return Promise.resolve();
48
+
49
+ } else {
50
+ return Promise.resolve()
51
+ .then(() => {
52
+ return gitUtils.cloneRepo(configOptions.DEVOPS_METADATA_LOCKS_REPOSITORY, configOptions.DEVOPS_METADATA_LOCKS_PATH, false, true);
53
+ })
54
+ .catch((e) => {
55
+ throw e;
56
+ })
57
+ }
58
+ }
59
+
60
+
40
61
  module.exports.getDevopsMetadata = () => {
41
62
  const configOptions = configUtils.global.getConfigOptions();
42
63
  const DEVOPS_METADATA_PATH = configOptions.DEVOPS_METADATA_PATH;
@@ -459,68 +459,30 @@ module.exports.getPackageVersionsLatest = (pkg) => {
459
459
  }
460
460
 
461
461
 
462
- module.exports.getPackageVersionsByMajor = (pkg, major) => {
462
+ module.exports.getPackageVersionsByMajor = (pkg, major, isMaster) => {
463
463
  const pkgVersions = this.getPackageVersions(pkg);
464
464
 
465
465
  if (pkgVersions) {
466
466
  return pkgVersions.filter((v) => {
467
467
  return (v.version.split('.')[0] === major && v.version.indexOf('snapshot') === -1) ||
468
468
  (v.version.split('.')[0] === major && pkg.build && pkg.build.isNextMajorSnapshotAllowed) ||
469
- (v.version.split('.')[0] === major && pkg.build && pkg.build.supportSnapshotBranch);
469
+ (v.version.split('.')[0] === major && pkg.build && pkg.build.supportSnapshotBranch) ||
470
+ (v.version.split('.')[0] === major && v.version.indexOf('snapshot') === -1 && isMaster);
470
471
  })
471
472
  }
472
473
  }
473
474
 
474
- module.exports.getLastMajorVersion = (pkg, major) => {
475
- const pkgVersionsMajor = this.getPackageVersionsByMajor(pkg, major);
475
+ module.exports.getLastMajorVersion = (pkg, major, isMaster) => {
476
+ const pkgVersionsMajor = this.getPackageVersionsByMajor(pkg, major, isMaster);
476
477
 
477
478
  if (pkgVersionsMajor && pkgVersionsMajor.length !== 0) {
478
479
  return pkgVersionsMajor.splice(-1)[0].version;
479
480
  }
480
481
  }
481
482
 
482
- module.exports.devopsMetadataToTable = (metadata) => {
483
- tools.logTitle('Generating table from metadata...');
484
-
485
- var content = '';
486
-
487
- content += '<h3>Latest packages status</h3>';
488
- content += '<table><thead><tr>';
489
- content += '<th>PACKAGE</th>';
490
- content += '<th>VERSION</th>';
491
- content += '<th>DATE</th>';
492
- content += '<th>STATUS</th>';
493
- content += '</tr></thead>';
494
- content += '<tbody>';
495
- tools.sortArray(metadata.packages, 'name').forEach((item) => {
496
- content += '<tr>';
497
- content += `<td>${item.name}</td><td>${item.version}</td><td>${item.date}</td><td>${item.status}</td>`
498
- content += '</tr>';
499
- })
500
- content += '</tbody>';
501
- content += '</table>';
502
-
503
- if (metadata.packagesLatestTag && metadata.packagesLatestTag.length !== 0) {
504
- content += '<h3>Latest package tags</h3>';
505
- content += '<table><thead><tr>';
506
- content += '<th>PACKAGE</th>';
507
- content += '<th>VERSION</th>';
508
- content += '<th>DATE</th>';
509
- // content+= '<th>STATUS</th>';
510
- content += '</tr></thead>';
511
- content += '<tbody>';
512
- tools.sortArray(metadata.packagesLatestTag, 'name').forEach((item) => {
513
- content += '<tr>';
514
- content += `<td>${item.name}</td><td>${item.version}</td><td>${item.date}</td>`
515
- content += '</tr>';
516
- })
517
- content += '</tbody>';
518
- content += '</table>';
519
- }
520
483
 
521
- tools.logSuccess();
522
- return content;
523
- }
484
+
485
+
524
486
 
525
487
 
526
488
 
@@ -531,7 +493,7 @@ module.exports.lockPackage = (pkg) => {
531
493
  .then(() => {
532
494
 
533
495
  const configOptions = configUtils.global.getConfigOptions();
534
- const pkgLockFile = path.join(configOptions.DEVOPS_METADATA_PATH, `${pkg.name}-lock.json`);
496
+ const pkgLockFile = path.join(configOptions.DEVOPS_METADATA_LOCKS_PATH, `${pkg.name}-lock.json`);
535
497
 
536
498
  const lockContent = {
537
499
  locked: true,
@@ -545,7 +507,7 @@ module.exports.lockPackage = (pkg) => {
545
507
  return gitUtils.commitAndPush(
546
508
  'master',
547
509
  `chore: locking ${pkg.name}`,
548
- configOptions.DEVOPS_METADATA_PATH
510
+ configOptions.DEVOPS_METADATA_LOCKS_PATH
549
511
  );
550
512
  }
551
513
  })
@@ -564,7 +526,7 @@ module.exports.unlockPackage = (pkg) => {
564
526
  .then(() => {
565
527
 
566
528
  const configOptions = configUtils.global.getConfigOptions();
567
- const pkgLockFile = path.join(configOptions.DEVOPS_METADATA_PATH, `${pkg.name}-lock.json`);
529
+ const pkgLockFile = path.join(configOptions.DEVOPS_METADATA_LOCKS_PATH, `${pkg.name}-lock.json`);
568
530
 
569
531
  tools.remove(pkgLockFile);
570
532
 
@@ -573,7 +535,7 @@ module.exports.unlockPackage = (pkg) => {
573
535
  return gitUtils.commitAndPush(
574
536
  'master',
575
537
  `chore: unlocking ${pkg.name}`,
576
- configOptions.DEVOPS_METADATA_PATH
538
+ configOptions.DEVOPS_METADATA_LOCKS_PATH
577
539
  );
578
540
  }
579
541
  })
@@ -586,7 +548,7 @@ module.exports.unlockPackage = (pkg) => {
586
548
 
587
549
  module.exports.isPackageLocked = (pkg) => {
588
550
  const configOptions = configUtils.global.getConfigOptions();
589
- const pkgLockFile = path.join(configOptions.DEVOPS_METADATA_PATH, `${pkg.name}-lock.json`);
551
+ const pkgLockFile = path.join(configOptions.DEVOPS_METADATA_LOCKS_PATH, `${pkg.name}-lock.json`);
590
552
 
591
553
  if (dryRun) return false;
592
554
 
@@ -82,6 +82,11 @@ module.exports.init = (pkg) => {
82
82
  return metadataUtils.common.cloneMetadataRepo();
83
83
  })
84
84
 
85
+ // CLONE METADATA LOCKS REPO
86
+ .then(() => {
87
+ return metadataUtils.common.cloneMetadataLocksRepo();
88
+ })
89
+
85
90
  // REMOVE YARN.LOCK
86
91
  .then(() => {
87
92
  utils.tools.logInfo('Removing yarn.lock');
@@ -0,0 +1,52 @@
1
+ // ANGULAR & 3rd PARTIES
2
+ import { NgModule } from '@angular/core';
3
+ import { BrowserModule } from '@angular/platform-browser';
4
+ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
5
+ import { HttpClientModule } from '@angular/common/http';
6
+ import { StoreModule } from '@ngrx/store';
7
+ import { EffectsModule } from '@ngrx/effects';
8
+ import { StoreDevtoolsModule } from '@ngrx/store-devtools';
9
+ import { TranslateModule } from '@ngx-translate/core';
10
+
11
+ // eUI IMPORTS
12
+ import {
13
+ CoreModule, CoreModuleEffects, translateConfig, EUI_CONFIG_TOKEN,
14
+ } from '@eui/core';
15
+ import { EuiAllModule } from '@eui/components';
16
+
17
+ import { appConfig } from '../config/index';
18
+ import { environment } from '../environments/environment';
19
+
20
+ // APP ROUTES & ROOT COMPONENTS
21
+ import { AppRoutingModule } from '../../app/app-routing.module';
22
+ import { AppComponent } from '../../app/app.component';
23
+
24
+ import { TOKEN, reducerProvider, metaReducers } from './core/reducers/index';
25
+
26
+ // APP ROOT MODULE
27
+ @NgModule({
28
+ imports: [
29
+ BrowserModule,
30
+ BrowserAnimationsModule,
31
+ HttpClientModule,
32
+ StoreModule.forRoot(TOKEN, { metaReducers }),
33
+ StoreDevtoolsModule.instrument({ name: 'CSDR App', maxAge: 150, logOnly: environment.production }),
34
+ EffectsModule.forRoot([...CoreModuleEffects]),
35
+ TranslateModule.forRoot(translateConfig),
36
+ CoreModule.forRoot(),
37
+ AppRoutingModule,
38
+ EuiAllModule,
39
+ ],
40
+ declarations: [
41
+ AppComponent,
42
+ ],
43
+ providers: [
44
+ { provide: EUI_CONFIG_TOKEN, useValue: { appConfig: appConfig, environment: environment } },
45
+ reducerProvider,
46
+ ],
47
+ bootstrap: [
48
+ AppComponent,
49
+ ],
50
+ })
51
+ export class AppModule {
52
+ }
@@ -0,0 +1,40 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ import { ActionReducer, ActionReducerMap, combineReducers, MetaReducer } from '@ngrx/store';
3
+ import * as fromRouter from '@ngrx/router-store';
4
+ import { storeFreeze } from 'ngrx-store-freeze';
5
+ import { reducers as coreReducers, CoreState, localStorageSync } from '@eui/core';
6
+
7
+ export interface AppState extends CoreState {
8
+ router: fromRouter.RouterReducerState<any>;
9
+ }
10
+
11
+ // -----------------
12
+ // ------------ AOT
13
+ export const TOKEN = new InjectionToken<any>('AppReducers');
14
+
15
+ export function getReducers(): ActionReducerMap<AppState, any> {
16
+ return {
17
+ router: fromRouter.routerReducer,
18
+ ...coreReducers,
19
+ };
20
+ }
21
+
22
+ export const reducerProvider = [
23
+ { provide: TOKEN, useFactory: getReducers },
24
+ ];
25
+
26
+ // console.log all actions
27
+ export function logger(reducer: ActionReducer<AppState>): ActionReducer<AppState> {
28
+ return (state, action) => {
29
+ const result = reducer(state, action);
30
+ console.groupCollapsed(action.type);
31
+ console.log('prev state', state);
32
+ console.log('action', action);
33
+ console.log('next state', result);
34
+ console.groupEnd();
35
+
36
+ return result;
37
+ };
38
+ }
39
+
40
+ export const metaReducers: MetaReducer<AppState>[] = [logger, localStorageSync, storeFreeze];
@@ -0,0 +1,4 @@
1
+ import { GlobalConfig } from '@eui/core';
2
+
3
+ export const GLOBAL: GlobalConfig = {
4
+ };
@@ -0,0 +1,8 @@
1
+ import { EuiAppConfig } from '@eui/core';
2
+ import { GLOBAL } from './global';
3
+ import { MODULES } from './modules';
4
+
5
+ export const appConfig: EuiAppConfig = {
6
+ global: GLOBAL,
7
+ modules: MODULES,
8
+ };
@@ -0,0 +1,4 @@
1
+ import { ModulesConfig } from '@eui/core';
2
+
3
+ export const MODULES: ModulesConfig = {
4
+ };
@@ -0,0 +1,9 @@
1
+ // activated by running :
2
+ // npm run build -- --configuration=dev
3
+ // OR
4
+ // npm run build-dev
5
+
6
+ export const environment = {
7
+ production: false,
8
+ enableDevToolRedux: true,
9
+ };
@@ -0,0 +1,9 @@
1
+ import { EuiEnvConfig } from '@eui/core';
2
+
3
+ export const environment: EuiEnvConfig = {
4
+ production: true,
5
+ enableDevToolRedux: false,
6
+ envDynamicConfig: {
7
+ uri: 'assets/config/env-json-config.json',
8
+ },
9
+ };
@@ -0,0 +1,21 @@
1
+ // used by serve / when no configuration is provided on the build script
2
+ // run npm run build
3
+
4
+ import { EuiEnvConfig } from '@eui/core';
5
+
6
+ export const environment: EuiEnvConfig = {
7
+ production: false,
8
+ enableDevToolRedux: true,
9
+ envDynamicConfig: {
10
+ uri: 'assets/config/env-json-config.json',
11
+ },
12
+ };
13
+
14
+ /*
15
+ * For easier debugging in development mode, you can import the following file
16
+ * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
17
+ *
18
+ * This import should be commented out in production mode because it will have a negative impact
19
+ * on performance if an error is thrown.
20
+ */
21
+ // import 'zone.js/dist/zone-error'; // Included with Angular CLI.
@@ -0,0 +1,7 @@
1
+ const karmaConfig = require('@eui/tools/karma/karma.conf');
2
+
3
+ module.exports = function (config) {
4
+ config.set(
5
+ karmaConfig.get(config)
6
+ );
7
+ }
@@ -0,0 +1,21 @@
1
+ import { enableProdMode } from '@angular/core';
2
+ import { preInitApp } from '@eui/core';
3
+ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
4
+
5
+ import { AppModule } from './app/app.module';
6
+ import { environment } from './environments/environment';
7
+ import { ApplicationRef } from '@angular/core';
8
+ import { enableDebugTools } from '@angular/platform-browser';
9
+
10
+ if (environment.production) {
11
+ enableProdMode();
12
+ }
13
+ preInitApp(environment).then(() => {
14
+ platformBrowserDynamic().bootstrapModule(AppModule)
15
+ .then(moduleRef => {
16
+ const applicationRef = moduleRef.injector.get(ApplicationRef);
17
+ const componentRef = applicationRef.components[0];
18
+ enableDebugTools(componentRef);
19
+ })
20
+ .catch(err => console.log(err));
21
+ });
@@ -0,0 +1,86 @@
1
+ /**
2
+ * This file includes polyfills needed by Angular and is loaded before the app.
3
+ * You can add your own extra polyfills to this file.
4
+ *
5
+ * This file is divided into 2 sections:
6
+ * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
7
+ * 2. Application imports. Files imported after ZoneJS that should be loaded before your main
8
+ * file.
9
+ *
10
+ * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
11
+ * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
12
+ * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
13
+ *
14
+ * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
15
+ */
16
+
17
+ /***************************************************************************************************
18
+ * BROWSER POLYFILLS
19
+ */
20
+
21
+ /** IE9, IE10 and IE11 requires all of the following polyfills. **/
22
+ // import 'core-js/es6/symbol';
23
+ // import 'core-js/es6/object';
24
+ // import 'core-js/es6/function';
25
+ // import 'core-js/es6/parse-int';
26
+ // import 'core-js/es6/parse-float';
27
+ // import 'core-js/es6/number';
28
+ // import 'core-js/es6/math';
29
+ // import 'core-js/es6/string';
30
+ // import 'core-js/es6/date';
31
+ // import 'core-js/es6/array';
32
+ // import 'core-js/es6/regexp';
33
+ // import 'core-js/es6/map';
34
+ // import 'core-js/es6/weak-map';
35
+ // import 'core-js/es6/set';
36
+
37
+ /** IE10 and IE11 requires the following for NgClass support on SVG elements */
38
+ // import 'classlist.js'; // Run `npm install --save classlist.js`.
39
+
40
+ /** IE10 and IE11 requires the following for the Reflect API. */
41
+ // import 'core-js/es6/reflect';
42
+
43
+ /** Evergreen browsers require these. **/
44
+ // Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
45
+ // import 'core-js/es7/reflect';
46
+
47
+ /**
48
+ * Web Animations `@angular/platform-browser/animations`
49
+ * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
50
+ * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
51
+ **/
52
+ // import 'web-animations-js'; // Run `npm install --save web-animations-js`.
53
+
54
+ /**
55
+ * By default, zone.js will patch all possible macroTask and DomEvents
56
+ * user can disable parts of macroTask/DomEvents patch by setting following flags
57
+ */
58
+
59
+ // (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
60
+ // (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
61
+ // (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
62
+
63
+ /*
64
+ * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
65
+ * with the following flag, it will bypass `zone.js` patch for IE/Edge
66
+ */
67
+ // (window as any).__Zone_enable_cross_context_check = true;
68
+
69
+ /***************************************************************************************************
70
+ * Zone JS is required by default for Angular itself.
71
+ */
72
+ import 'zone.js/dist/zone'; // Included with Angular CLI.
73
+
74
+ /***************************************************************************************************
75
+ * APPLICATION IMPORTS
76
+ */
77
+
78
+ /**
79
+ * Date, currency, decimal and percent pipes.
80
+ * Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10
81
+ */
82
+ // import 'intl'; // Run `npm install --save intl`.
83
+ /**
84
+ * Need to import at least one locale-data with intl.
85
+ */
86
+ // import 'intl/locale-data/jsonp/en';
@@ -0,0 +1,33 @@
1
+ // This file is required by karma.conf.js and loads recursively all the .spec and framework files
2
+
3
+ import 'zone.js/dist/long-stack-trace-zone';
4
+ import 'zone.js/dist/proxy.js';
5
+ import 'zone.js/dist/sync-test';
6
+ import 'zone.js/dist/jasmine-patch';
7
+ import 'zone.js/dist/async-test';
8
+ import 'zone.js/dist/fake-async-test';
9
+ import { APP_BASE_HREF } from '@angular/common';
10
+ import { getTestBed } from '@angular/core/testing';
11
+ import {
12
+ BrowserDynamicTestingModule,
13
+ platformBrowserDynamicTesting,
14
+ } from '@angular/platform-browser-dynamic/testing';
15
+
16
+ // Unfortunately there's no typing for the `__karma__` variable. Just declare it as any.
17
+ declare const __karma__: any;
18
+ declare const require: any;
19
+
20
+ // Prevent Karma from running prematurely.
21
+ __karma__.loaded = function () {};
22
+
23
+ // First, initialize the Angular testing environment.
24
+ getTestBed().initTestEnvironment(
25
+ BrowserDynamicTestingModule,
26
+ platformBrowserDynamicTesting([{ provide: APP_BASE_HREF, useValue: '/' }]),
27
+ );
28
+ // Then we find all the tests.
29
+ const context = require.context('./', true, /\.spec\.ts$/);
30
+ // And load the modules.
31
+ context.keys().map(context);
32
+ // Finally, start Karma to run the tests.
33
+ __karma__.start();
@@ -0,0 +1,19 @@
1
+ {
2
+ "extends": "../../tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "./dist",
5
+ "types": [],
6
+ "module": "ESNext",
7
+ "target": "ES2016",
8
+ "lib": ["es2020", "dom"]
9
+ },
10
+ "exclude": [
11
+ "test.ts",
12
+ "**/*.spec.ts",
13
+ "_todo/**/*.ts",
14
+ "**/_todo/**/*.ts",
15
+ "src/assets/samples/**/*.ts",
16
+ "dist/assets/samples/**/*.ts"
17
+ ],
18
+ "include": ["**/*.ts"]
19
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "../../tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "./dist",
5
+ "types": ["jasmine", "node"]
6
+ },
7
+ "files": ["src/test.ts", "src/polyfills.ts"],
8
+ "include": ["**/*.spec.ts", "**/*.d.ts"]
9
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "extends": "../../tslint.json",
3
+ "rules": {
4
+ "directive-selector": [
5
+ true,
6
+ "attribute",
7
+ "app",
8
+ "camelCase"
9
+ ],
10
+ "component-selector": [
11
+ true,
12
+ "element",
13
+ "app",
14
+ "kebab-case"
15
+ ]
16
+ }
17
+ }
@@ -48,13 +48,15 @@ module.exports.injectCsdrSkeletonEuiShowcaseSources = (project) => {
48
48
 
49
49
  module.exports.injectCsdrFullSkeletonSources = (project, euiVersion) => {
50
50
 
51
- tools.logInfo(`Injecting CSDR full skeleton sources for : ${project.name}`);
51
+ tools.logInfo(`Injecting CSDR full skeleton sources for : ${project.name} - eUI version : ${euiVersion}`);
52
52
 
53
53
  return Promise.resolve()
54
54
  .then(() => {
55
55
  // copying skeleton sources
56
56
  if (euiVersion === '13.x') {
57
57
  tools.copydir(path.join(__dirname, 'app-sources-full-skeleton-eui13'), project.folder, false);
58
+ } else if (euiVersion === '14.x') {
59
+ tools.copydir(path.join(__dirname, 'app-sources-full-skeleton-eui14'), project.folder, false);
58
60
  } else {
59
61
  tools.copydir(path.join(__dirname, 'app-sources-full-skeleton'), project.folder, false);
60
62
  }
@@ -75,6 +75,8 @@ module.exports.preBuild = (project, envTarget, build, configEnvTarget) => {
75
75
  } else if (project.csdrFullSkeleton) {
76
76
  if (project.build && project.build.euiVersion === '13.x') {
77
77
  return injectionUtils.skeletons.injectCsdrFullSkeletonSources(project, '13.x');
78
+ } else if (project.build && project.build.euiVersion === '14.x') {
79
+ return injectionUtils.skeletons.injectCsdrFullSkeletonSources(project, '14.x');
78
80
  } else {
79
81
  return injectionUtils.skeletons.injectCsdrFullSkeletonSources(project);
80
82
  }