@eui/tools 4.15.11 → 4.16.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 (88) hide show
  1. package/.version.properties +1 -1
  2. package/CHANGELOG.md +45 -0
  3. package/bin/eui-scripts.js +6 -6
  4. package/bin/scripts/build-package-sub.js +20 -0
  5. package/bin/scripts/version.js +12 -0
  6. package/global.test.js +2 -5
  7. package/package.json +16 -20
  8. package/sandbox.js +10 -2
  9. package/scripts/csdr/cli/app.js +30 -3
  10. package/scripts/csdr/cli/skeletons/app-showcase-eui13/angular-config.json +33 -0
  11. package/scripts/csdr/cli/skeletons/app-showcase-eui13/dependencies-composite.json +5 -0
  12. package/scripts/csdr/cli/skeletons/app-showcase-eui13/gitignore_TO_REPLACE +50 -0
  13. package/scripts/csdr/cli/skeletons/app-showcase-eui13/package.json +6 -0
  14. package/scripts/csdr/cli/skeletons/app-showcase-eui13/scripts.json +3 -0
  15. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app-routing.module.ts +21 -0
  16. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app.component.html +26 -0
  17. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app.component.ts +19 -0
  18. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app.routes.ts +7 -0
  19. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home-routing.module.ts +15 -0
  20. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home.component.html +7 -0
  21. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home.component.ts +8 -0
  22. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home.module.ts +17 -0
  23. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/shared/shared.module.ts +15 -0
  24. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/assets/app-metadata.json +8 -0
  25. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/assets/config/env-json-config.json +41 -0
  26. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/index.html +22 -0
  27. package/scripts/csdr/config/angular.js +213 -3
  28. package/scripts/csdr/config/global.js +16 -0
  29. package/scripts/csdr/config/packages.js +28 -0
  30. package/scripts/csdr/init/init-utils.js +37 -0
  31. package/scripts/csdr/init/init.js +6 -0
  32. package/scripts/csdr/init/resources/13.x/resolutions.json +15 -0
  33. package/scripts/csdr/install/build-package.js +0 -84
  34. package/scripts/csdr/install/common.js +10 -8
  35. package/scripts/csdr/jira/jira-utils.js +168 -168
  36. package/scripts/csdr/jira/update.js +150 -150
  37. package/scripts/csdr/metadata/app-envs.js +34 -33
  38. package/scripts/csdr/metadata/app-history.js +62 -61
  39. package/scripts/csdr/metadata/app.js +3 -3
  40. package/scripts/csdr/metadata/common.js +2 -2
  41. package/scripts/csdr/metadata/package-history.js +0 -1
  42. package/scripts/csdr/release/app/release-app.js +3 -0
  43. package/scripts/csdr/release/package/backend.js +26 -0
  44. package/scripts/csdr/release/package/common.js +1 -1
  45. package/scripts/csdr/release/package/release-package.js +8 -0
  46. package/scripts/csdr/release/package/ui.js +83 -1
  47. package/scripts/csdr/sync/sync-utils.js +13 -6
  48. package/scripts/csdr/version/package.js +2 -1
  49. package/scripts/utils/build/app/build-app-utils.js +2 -2
  50. package/scripts/utils/build/package/angular.js +4 -4
  51. package/scripts/utils/build/package/build-package-utils.js +50 -1
  52. package/scripts/utils/build/package/element.js +5 -16
  53. package/scripts/utils/build/package/styles.js +100 -7
  54. package/scripts/utils/confluence-utils.js +126 -126
  55. package/scripts/utils/index.js +2 -2
  56. package/scripts/utils/notification/common.js +5 -0
  57. package/scripts/utils/notification/mail-utils.js +3 -0
  58. package/scripts/utils/notification/mailstack.js +3 -5
  59. package/scripts/utils/notification/package.js +0 -2
  60. package/scripts/utils/notification/slack-utils.js +6 -7
  61. package/scripts/utils/pre-build/injection/app-sources-full-skeleton/src/_generated/favicon.ico +0 -0
  62. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/app/app.module.ts +52 -0
  63. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/app/core/reducers/index.ts +40 -0
  64. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/config/global.ts +4 -0
  65. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/config/index.ts +8 -0
  66. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/config/modules.ts +4 -0
  67. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/environments/environment.dev.ts +9 -0
  68. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/environments/environment.prod.ts +9 -0
  69. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/environments/environment.ts +21 -0
  70. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/favicon.ico +0 -0
  71. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/karma.conf.js +7 -0
  72. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/main.ts +21 -0
  73. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/polyfills.ts +86 -0
  74. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/tst.ts +33 -0
  75. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/tsconfig.app.json +19 -0
  76. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/tsconfig.spec.json +9 -0
  77. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/tslint.json +17 -0
  78. package/scripts/utils/pre-build/injection/config.js +29 -30
  79. package/scripts/utils/pre-build/injection/externals.js +6 -0
  80. package/scripts/utils/pre-build/injection/skeletons.js +6 -2
  81. package/scripts/utils/pre-build/projects.js +5 -1
  82. package/scripts/utils/serve/app.js +6 -3
  83. package/scripts/utils/tools.js +370 -283
  84. package/bin/scripts/csdr-jira-update.js +0 -12
  85. package/bin/scripts/csdr-migrate-package.js +0 -17
  86. package/bin/scripts/e2e-app.js +0 -62
  87. package/scripts/migration/eui8-migration.js +0 -94
  88. package/scripts/migration/migrate-utils.js +0 -191
@@ -326,6 +326,130 @@ const angularProjectDefFullSkeleton = {
326
326
  }
327
327
  };
328
328
 
329
+
330
+ const angularProjectDefFullSkeletonV13 = {
331
+ "root": "",
332
+ "sourceRoot": "apps/@project.name@/src",
333
+ "projectType": "application",
334
+ "prefix": "app",
335
+ "schematics": {
336
+ "@schematics/angular:component": {
337
+ "style": "scss"
338
+ },
339
+ "@schematics/angular:application": {
340
+ "strict": true
341
+ }
342
+ },
343
+ "architect": {
344
+ "build": {
345
+ "builder": "@angular-devkit/build-angular:browser",
346
+ "options": {
347
+ "outputPath": "apps/@project.name@/dist",
348
+ "index": "apps/@project.name@/src/index.html",
349
+ "main": "apps/@project.name@/src/_generated/main.ts",
350
+ "polyfills": "apps/@project.name@/src/_generated/polyfills.ts",
351
+ "tsConfig": "apps/@project.name@/tsconfig.app.json",
352
+ "assets": [
353
+ "apps/@project.name@/src/favicon.ico",
354
+ "apps/@project.name@/src/assets",
355
+ {
356
+ "glob": "**/*",
357
+ "input": "node_modules/@eui/core/assets/",
358
+ "output": "./assets"
359
+ }
360
+ ],
361
+ "styles": [
362
+ ]
363
+ },
364
+ "configurations": {
365
+ "production": {
366
+ "fileReplacements": [
367
+ {
368
+ "replace": "apps/@project.name@/src/_generated/environments/environment.ts",
369
+ "with": "apps/@project.name@/src/_generated/environments/environment.prod.ts"
370
+ }
371
+ ],
372
+ "optimization": false,
373
+ "outputHashing": "all",
374
+ "sourceMap": false,
375
+ "namedChunks": true,
376
+ "aot": true,
377
+ "extractLicenses": true,
378
+ "vendorChunk": false,
379
+ "buildOptimizer": false,
380
+ "budgets": [
381
+ {
382
+ "type": "initial",
383
+ "maximumWarning": "2mb",
384
+ "maximumError": "6mb"
385
+ }
386
+ ]
387
+ },
388
+ "production-optimized-no-openid": {
389
+ "fileReplacements": [
390
+ {
391
+ "replace": "apps/@project.name@/src/_generated/environments/environment.ts",
392
+ "with": "apps/@project.name@/src/_generated/environments/environment.prod.ts"
393
+ }
394
+ ],
395
+ "optimization": {
396
+ "scripts": true,
397
+ "styles": {
398
+ "minify": false,
399
+ "inlineCritical": true
400
+ },
401
+ "fonts": true
402
+ },
403
+ "outputHashing": "all",
404
+ "sourceMap": false,
405
+ "namedChunks": true,
406
+ "aot": true,
407
+ "extractLicenses": true,
408
+ "vendorChunk": false,
409
+ "buildOptimizer": true,
410
+ "budgets": [
411
+ {
412
+ "type": "initial",
413
+ "maximumWarning": "2mb",
414
+ "maximumError": "6mb"
415
+ }
416
+ ]
417
+ },
418
+ "development": {
419
+ "buildOptimizer": false,
420
+ "optimization": false,
421
+ "vendorChunk": true,
422
+ "extractLicenses": false,
423
+ "sourceMap": true,
424
+ "namedChunks": true
425
+ }
426
+ },
427
+ "defaultConfiguration": "production"
428
+ },
429
+ "serve": {
430
+ "builder": "@angular-devkit/build-angular:dev-server",
431
+ "options": {
432
+ "browserTarget": "@project.name@:build"
433
+ },
434
+ "configurations": {
435
+ "proxy-mock": {
436
+ "browserTarget": "@project.name@:build",
437
+ "proxyConfig": "apps/@project.name@/proxy-mock.conf.json"
438
+ },
439
+ "production": {
440
+ "browserTarget": "@project.name@:build:production"
441
+ },
442
+ "development": {
443
+ "browserTarget": "@project.name@:build:development"
444
+ }
445
+ },
446
+ "defaultConfiguration": "development"
447
+ }
448
+ }
449
+ };
450
+
451
+
452
+
329
453
  const angularProjectDefConfiguration = {
330
454
  "fileReplacements": [
331
455
  {
@@ -422,6 +546,58 @@ const angularPackageDef = {
422
546
  }
423
547
  };
424
548
 
549
+ const angularPackageSubEntryDef = {
550
+ "root": "packages/eui/packages/components/@subEntry.path@",
551
+ "sourceRoot": "packages/eui/packages/components/@subEntry.path@",
552
+ "projectType": "library",
553
+ "prefix": "lib",
554
+ "architect": {
555
+ "build": {
556
+ "builder": "@angular-devkit/build-angular:ng-packagr",
557
+ "options": {
558
+ "tsConfig": "packages/eui/packages/components/tsconfig.lib.json",
559
+ "project": "packages/eui/packages/components/@subEntry.path@/package.json"
560
+ },
561
+ "configurations": {
562
+ "production": {
563
+ "tsConfig": "packages/eui/packages/components/tsconfig.lib.json"
564
+ }
565
+ }
566
+ }
567
+ }
568
+ };
569
+
570
+
571
+ const angularPackageDefV13 = {
572
+ "root": "@path@/@module.name@",
573
+ "sourceRoot": "@path@/@module.name@@srcRoot@",
574
+ "projectType": "library",
575
+ "prefix": "lib",
576
+ "architect": {
577
+ "build": {
578
+ "builder": "@angular-devkit/build-angular:ng-packagr",
579
+ "options": {
580
+ "tsConfig": "@path@/@module.name@/tsconfig.lib.json",
581
+ "project": "@path@/@module.name@/ng-package.json"
582
+ },
583
+ "configurations": {
584
+ "production": {
585
+ "tsConfig": "@path@/@module.name@/tsconfig.lib.prod.json"
586
+ }
587
+ }
588
+ },
589
+ "test": {
590
+ "builder": "@angular-devkit/build-angular:karma",
591
+ "options": {
592
+ "main": "@path@/@module.name@@srcRoot@@srcRootTesting@/test.ts",
593
+ "tsConfig": "@path@/@module.name@/tsconfig.spec.json",
594
+ "karmaConfig": "@path@/@module.name@/karma.conf.js"
595
+ }
596
+ }
597
+ }
598
+ };
599
+
600
+
425
601
  const angularElementProjectDef = {
426
602
  "root": "@module.name@/",
427
603
  "sourceRoot": "@module.name@/src",
@@ -560,11 +736,40 @@ module.exports.registerAngularPackage = (pkg, isReset) => {
560
736
  pathBase = 'packages/' + pkg.parentPkg + '/packages';
561
737
  }
562
738
 
563
- const projectDef = JSON.stringify(angularPackageDef);
739
+ let projectDef = JSON.stringify(angularPackageDef);
740
+
741
+ if (pkg.build && pkg.build.euiVersion === '13.x') {
742
+ projectDef = JSON.stringify(angularPackageDefV13);
743
+ }
744
+
745
+ let srcRoot = '/src', srcRootTesting = '';
746
+ if (pkg.build && typeof pkg.build.srcRootDefault === 'boolean' && pkg.build.srcRootDefault === false) {
747
+ srcRoot = '';
748
+ srcRootTesting = '/testing'
749
+ }
750
+
564
751
  const replaceModule = tools.replaceAll(projectDef, '@module.name@', pkg.folder || pkg.name);
565
752
  const replacePath = tools.replaceAll(replaceModule, '@path@', pathBase);
753
+ const replaceSrcRoot = tools.replaceAll(replacePath, '@srcRoot@', srcRoot);
754
+ const replaceSrcRootTesting = tools.replaceAll(replaceSrcRoot, '@srcRootTesting@', srcRootTesting);
755
+
756
+ jsonFile['projects'][pkg.name] = JSON.parse(replaceSrcRootTesting);
757
+
758
+ tools.writeJsonFileSync(file, jsonFile);
759
+ }
566
760
 
567
- jsonFile['projects'][pkg.name] = JSON.parse(replacePath);
761
+
762
+ module.exports.registerAngularPackageSubEntry = (subEntryName, subEntryPath) => {
763
+ const file = path.join(process.cwd(), 'angular.json');
764
+ const jsonFile = require(file);
765
+
766
+ let projectDef = JSON.stringify(angularPackageSubEntryDef);
767
+
768
+ const replacePath = tools.replaceAll(projectDef, '@subEntry.path@', subEntryPath);
769
+
770
+ jsonFile['projects'][subEntryName] = JSON.parse(replacePath);
771
+
772
+ console.log(jsonFile['projects'][subEntryName]);
568
773
 
569
774
  tools.writeJsonFileSync(file, jsonFile);
570
775
  }
@@ -626,7 +831,12 @@ module.exports.registerAngularProjectDef = (project, build = false) => {
626
831
  tools.logInfo('Processing angular config...');
627
832
  let projectDef;
628
833
  if (project.csdrFullSkeleton) {
629
- projectDef = JSON.stringify(angularProjectDefFullSkeleton);
834
+ if (project.build && project.build.euiVersion === '13.x') {
835
+ projectDef = JSON.stringify(angularProjectDefFullSkeletonV13);
836
+ } else {
837
+ projectDef = JSON.stringify(angularProjectDefFullSkeleton);
838
+ }
839
+
630
840
  } else {
631
841
  projectDef = JSON.stringify(angularProjectDef);
632
842
  }
@@ -20,6 +20,14 @@ module.exports.getCsdrConfig = (full = true) => {
20
20
 
21
21
  Object.keys(appsConfig).forEach((p) => {
22
22
  config.projects[p] = appsConfig[p];
23
+
24
+ // checking if package has config override in its own folder
25
+ const prjCsdrConfig = path.join(process.cwd(), 'apps', p, '.csdr-config.json');
26
+
27
+ if (tools.isFileExists(prjCsdrConfig)) {
28
+ const prjCsdrConfigJson = require(prjCsdrConfig);
29
+ config.projects[p] = prjCsdrConfigJson;
30
+ }
23
31
  })
24
32
 
25
33
  Object.keys(packagesConfig).forEach((p) => {
@@ -96,6 +104,14 @@ const getGeneratedConfig = (euircBaseFile) => {
96
104
  // remapping projects against csdr projects config
97
105
  configContent.projects.forEach((p) => {
98
106
  genConfig.projects[p] = globalConfig.projects[p];
107
+
108
+ // checking if project has config override in its own folder
109
+ const prjCsdrConfig = path.join(process.cwd(), 'apps', p, '.csdr-config.json');
110
+
111
+ if (tools.isFileExists(prjCsdrConfig)) {
112
+ const prjCsdrConfigJson = require(prjCsdrConfig);
113
+ genConfig.projects[p] = prjCsdrConfigJson;
114
+ }
99
115
  })
100
116
 
101
117
  // remapping projects against csdr packages config
@@ -6,6 +6,7 @@ const fs = require('fs');
6
6
 
7
7
  // LOCAL
8
8
  const tools = require('../../utils/tools');
9
+ const configUtils = require('./config-utils');
9
10
 
10
11
  // INNER MODULES
11
12
  const innerGlobal = require('./global');
@@ -233,3 +234,30 @@ module.exports.getDepGraph = () => {
233
234
 
234
235
  return graph;
235
236
  }
237
+
238
+
239
+ module.exports.getLocalPackagesEuiVersion = () => {
240
+ tools.logInfo('getting local installed eUI version...');
241
+
242
+ const pkgs = configUtils.packages.getPackages();
243
+ let versionsFound = [];
244
+
245
+ pkgs.forEach((p) => {
246
+ if (p.parent !== true && p.tsPackage !== false) {
247
+
248
+ let version = 'DEFAULT';
249
+
250
+ if (p.build) {
251
+ if (p.build.euiVersion) {
252
+ version = p.build.euiVersion;
253
+ }
254
+ }
255
+ tools.logInfo(`checking ${p.name} - version found : ${version}`);
256
+ versionsFound.push(version);
257
+ }
258
+ })
259
+
260
+ versionsFound = tools.removeArrayDuplicates(versionsFound);
261
+
262
+ return versionsFound;
263
+ }
@@ -171,3 +171,40 @@ module.exports.importExtraTsConfig = () => {
171
171
  throw e;
172
172
  })
173
173
  }
174
+
175
+
176
+ module.exports.processLocalEuiVersions = () => {
177
+ tools.logTitle('Processing injections for local installed eUI versions if needed');
178
+
179
+ return Promise.resolve()
180
+ .then(() => {
181
+ const euiVersionsLocal = configUtils.packages.getLocalPackagesEuiVersion();
182
+
183
+ if (euiVersionsLocal.length > 1) {
184
+ throw new Error('MULTIPLE_LOCAL_EUI_VERSIONS_FOUND');
185
+ }
186
+
187
+ const euiVersion = euiVersionsLocal[0];
188
+
189
+ if (euiVersion === 'DEFAULT') {
190
+ tools.logInfo('Default eUI version found, taking default resolutions..skipping');
191
+
192
+ } else {
193
+ const rootPackageJsonFile = path.join(process.cwd(), 'package.json');
194
+ const rootPackageJson = require(rootPackageJsonFile);
195
+
196
+ const resolutionsJsonFile = path.join(__dirname, 'resources', euiVersion, 'resolutions.json');
197
+ const resolutionsJson = require(resolutionsJsonFile);
198
+
199
+ tools.logInfo('Injecting resolutions content');
200
+ console.log(resolutionsJson);
201
+ rootPackageJson.resolutions = resolutionsJson;
202
+
203
+ tools.logInfo('Updating root package.json');
204
+ tools.writeJsonFileSync(rootPackageJsonFile, rootPackageJson);
205
+ }
206
+ })
207
+ .catch((e) => {
208
+ throw e;
209
+ })
210
+ }
@@ -77,6 +77,12 @@ module.exports.init = () => {
77
77
  return initUtils.importPackages(finalResponse);
78
78
  })
79
79
 
80
+ // adapt and inject particular root data/config for eUI version detected on project
81
+ // if multiple versions of eUI are detected on the same project, an exception is thrown
82
+ .then(() => {
83
+ return initUtils.processLocalEuiVersions();
84
+ })
85
+
80
86
  // Install deps based on current config generated => take last know snapshots
81
87
  .then(() => {
82
88
  // this is only executed for local dev installation,
@@ -0,0 +1,15 @@
1
+ {
2
+ "lodash": ">=4.17.21",
3
+ "handlebars": ">=4.5.3",
4
+ "mem": ">=4.3.0 <=8.1.1",
5
+ "https-proxy-agent": ">=2.2.3",
6
+ "minimatch": ">=3.0.4",
7
+ "acorn-globals": ">=6.0.0",
8
+ "open": ">=7.0.3",
9
+ "dot-prop": ">=5.2.0",
10
+ "serialize-javascript": ">=3.1.0",
11
+ "socket.io": ">=2.4.0",
12
+ "ssri": ">=8.0.1",
13
+ "@types/node": ">=14.14.10",
14
+ "hosted-git-info": ">=3.0.8"
15
+ }
@@ -100,87 +100,3 @@ module.exports.install = (prj, pkg, isMaster) => {
100
100
  throw e;
101
101
  })
102
102
  }
103
-
104
-
105
-
106
-
107
-
108
-
109
- module.exports.checkDeps = (pkg) => {
110
- tools.logTitle('Checking package internal dependencies');
111
-
112
- return Promise.resolve()
113
- .then(() => {
114
- var depsFound = [];
115
- var files = glob.sync('**/*.ts', { cwd: pkg.paths.pkgLibFolder, nodir: true, follow: true, dot: true });
116
- files.forEach(file => {
117
- const filePath = path.join(pkg.paths.pkgLibFolder, file);
118
- const fileContent = tools.getFileContent(filePath);
119
- var regex = /@cc\/|@mywp\/|@opsys\/|@sfc\//gi, result, indices = [];
120
- while ( (result = regex.exec(fileContent)) ) {
121
- indices.push(result.index);
122
- }
123
- if (indices.length !== 0) {
124
- // tools.logInfo(`Number of occurences found : ${indices.length}`);
125
- indices.forEach((i) => {
126
- const endPos = fileContent.substr(i, 40).indexOf("'");
127
- const dep = fileContent.substr(i, endPos);
128
- if (endPos > -1) {
129
- // tools.logInfo(`dep found on : ${dep}`);
130
- depsFound.push(dep);
131
-
132
- } else {
133
- tools.logInfo(`Potential wrong import detected on file : ${file}`);
134
- const subContent = fileContent.substr(i, 40);
135
- const detectMultiSlashes = subContent.match(/\//g);
136
- if (detectMultiSlashes.length > 0) {
137
- tools.logError('Multislashes on import : ');
138
- console.log(subContent);
139
- }
140
- }
141
- })
142
- }
143
- });
144
- depsFound = tools.removeArrayDuplicates(depsFound);
145
- tools.logWarning(`Dependencies found : ${depsFound.length}`);
146
- console.log(depsFound);
147
-
148
- return depsFound;
149
- })
150
-
151
- .then((depsFound) => {
152
- var depsLevel;
153
-
154
- switch(true) {
155
- case (depsFound.length === 1):
156
- depsLevel = 'LOW (1)';
157
- break;
158
- case (depsFound.length > 1 && depsFound.length <= 3):
159
- depsLevel = 'MEDIUM (between 1 and 3)';
160
- break;
161
- case (depsFound.length > 3 && depsFound.length <= 5):
162
- depsLevel = 'HIGH (between 3 and 5)';
163
- break;
164
- case (depsFound.length > 5):
165
- depsLevel = 'VERY HIGH (>5)';
166
- break;
167
- default:
168
- depsLevel = 'NONE';
169
- }
170
-
171
- var message = `Internal dependencies detected : ${depsFound.length} - deps level: ${depsLevel}\n`;
172
- message += depsFound.join('\n');
173
-
174
-
175
- return notificationUtils.package.sendPackageMessage({
176
- package: pkg,
177
- text: message
178
- });
179
- })
180
-
181
- .catch((e) => {
182
- console.log(e);
183
- })
184
-
185
- }
186
-
@@ -199,7 +199,9 @@ const getLocalPackagesDeps = () => {
199
199
  const pdeps = Object.keys(pkgDeps)
200
200
  .reduce((acc, k) => {
201
201
  if (k.indexOf('@eui') !== -1 ) {
202
- if (k.indexOf('@eui/ecl') !== -1) {
202
+ if (k.indexOf('@eui/ecl') !== -1 ||
203
+ k.indexOf('@eui/styles-base') !== -1
204
+ ) {
203
205
  acc[k] = pkgDeps[k];
204
206
  }
205
207
  } else {
@@ -218,14 +220,14 @@ const getLocalPackagesDeps = () => {
218
220
  const getLocalPackageCompositeDeps = (pkg) => {
219
221
  let pkgJsonFile;
220
222
 
221
- if (pkg.parent) {
222
- return {};
223
+ if (pkg.child) {
224
+ pkgJsonFile = path.join(process.cwd(), 'packages', pkg.parentPkg, 'packages', pkg.folder || pkg.name, 'dependencies-composite.json');
223
225
  } else {
224
- if (pkg.child) {
225
- pkgJsonFile = path.join(process.cwd(), 'packages', pkg.parentPkg, 'packages', pkg.folder || pkg.name, 'dependencies-composite.json');
226
- } else {
227
- pkgJsonFile = path.join(process.cwd(), 'packages', pkg.name, 'dependencies-composite.json');
228
- }
226
+ pkgJsonFile = path.join(process.cwd(), 'packages', pkg.name, 'dependencies-composite.json');
227
+ }
228
+
229
+ if (tools.isFileExists(pkgJsonFile)) {
230
+ console.log(`found ${pkgJsonFile}, parsing...`);
229
231
  }
230
232
 
231
233
  return tools.getJsonFileContent(pkgJsonFile) || {};