@eui/tools 6.12.37 → 6.12.39

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 (51) hide show
  1. package/.version.properties +1 -1
  2. package/CHANGELOG.md +18 -0
  3. package/package.json +1 -1
  4. package/sandbox.js +13 -5
  5. package/scripts/csdr/config/angular.js +6 -13
  6. package/scripts/csdr/init/remotes/17.x/base/angular.json +87 -0
  7. package/scripts/csdr/init/remotes/17.x/base/browserslist +6 -0
  8. package/scripts/csdr/init/remotes/17.x/base/package.json_TO_REPLACE +10 -0
  9. package/scripts/csdr/init/remotes/17.x/base/tsconfig.app.json +24 -0
  10. package/scripts/csdr/init/remotes/17.x/base/yarn.lock +14275 -0
  11. package/scripts/csdr/init/remotes/17.x/full/common/app/eui-components.ts +9 -0
  12. package/scripts/csdr/init/remotes/17.x/full/common/app/fallback.component.ts +11 -0
  13. package/scripts/csdr/init/remotes/17.x/full/common/app/module.component.ts +91 -0
  14. package/scripts/csdr/init/remotes/17.x/full/common/app/module.ts +96 -0
  15. package/scripts/csdr/init/remotes/17.x/full/common/app/reducers/custom-route-serializer.ts +28 -0
  16. package/scripts/csdr/init/remotes/17.x/full/common/app/reducers/index.ts +42 -0
  17. package/scripts/csdr/init/remotes/17.x/full/common/app/routing.module.ts +34 -0
  18. package/scripts/csdr/init/remotes/17.x/full/common/assets/.gitkeep +0 -0
  19. package/scripts/csdr/init/remotes/17.x/full/common/config/global.ts +54 -0
  20. package/scripts/csdr/init/remotes/17.x/full/common/config/index.ts +10 -0
  21. package/scripts/csdr/init/remotes/17.x/full/common/config/modules.ts +3 -0
  22. package/scripts/csdr/init/remotes/17.x/full/common/environments/environment.prod.ts +3 -0
  23. package/scripts/csdr/init/remotes/17.x/full/common/environments/environment.ts +3 -0
  24. package/scripts/csdr/init/remotes/17.x/full/common/favicon.ico +0 -0
  25. package/scripts/csdr/init/remotes/17.x/full/common/index.html +10 -0
  26. package/scripts/csdr/init/remotes/17.x/full/common/main.ts +11 -0
  27. package/scripts/csdr/init/remotes/17.x/full/common/polyfills.ts +88 -0
  28. package/scripts/csdr/init/remotes/17.x/full/common/test.ts +20 -0
  29. package/scripts/csdr/init/remotes/17.x/full/options/ag-grid/main.ts +17 -0
  30. package/scripts/csdr/init/remotes/17.x/full/options/all-locales/config/global.ts +122 -0
  31. package/scripts/csdr/init/remotes/17.x/full/options/definitions/dynamic-forms.json +4 -0
  32. package/scripts/csdr/init/remotes/17.x/full/options/definitions/dynatrace.json +4 -0
  33. package/scripts/csdr/init/remotes/17.x/full/options/definitions/participant.json +3 -0
  34. package/scripts/csdr/init/remotes/17.x/full/options/definitions/user-reducers.json +3 -0
  35. package/scripts/csdr/init/remotes/17.x/full/options/definitions/zipkin.json +5 -0
  36. package/scripts/csdr/init/remotes/17.x/full/options/participant/app/module.component.ts +94 -0
  37. package/scripts/csdr/init/remotes/17.x/full/options/participant/app/routing.module.ts +26 -0
  38. package/scripts/csdr/init/remotes/17.x/full/options/participant/config/index.ts +10 -0
  39. package/scripts/csdr/init/remotes/17.x/full/options/user-reducers/app/reducers/index.ts +66 -0
  40. package/scripts/csdr/init/repos.js +0 -1
  41. package/scripts/csdr/init/resources/17.x/browserslistrc +6 -0
  42. package/scripts/csdr/init/resources/17.x/resolutions.json +5 -0
  43. package/scripts/csdr/init/resources/17.x/yarn.lock +13395 -0
  44. package/scripts/csdr/metadata/stats.js +1 -0
  45. package/scripts/utils/build/package/build-package-utils.js +1 -1
  46. package/scripts/utils/build/package/styles.js +2 -1
  47. package/scripts/utils/git-utils.js +10 -0
  48. package/scripts/utils/pre-build/injection/skeletons.js +1 -1
  49. package/scripts/utils/pre-build/projects.js +2 -0
  50. package/scripts/utils/pre-build/routes-replacement/routes-replacement.js +22 -15
  51. package/scripts/utils/tools.js +1 -1
@@ -467,6 +467,7 @@ module.exports.getRemoteAllStats = () => {
467
467
  })
468
468
  .then(() => {
469
469
  let remotesArray = [
470
+ ...configUtils.remotes.getCsdrRemotesArray('my-workplace', '17.x'),
470
471
  ...configUtils.remotes.getCsdrRemotesArray('my-workplace', '16.x'),
471
472
  ...configUtils.remotes.getCsdrRemotesArray('my-workplace', '15.x'),
472
473
  ];
@@ -217,7 +217,7 @@ module.exports.buildSubEntry = (pkg, subEntry) => {
217
217
  .then(() => {
218
218
  let packageEuiVersion = configUtils.packages.getPackageEuiVersion(pkg);
219
219
 
220
- if (packageEuiVersion === '15.x' || packageEuiVersion === '16.x') {
220
+ if (packageEuiVersion === '15.x' || packageEuiVersion === '16.x' || packageEuiVersion === '17.x') {
221
221
  const { skipTest } = tools.getArgs();
222
222
 
223
223
  if (!skipTest) {
@@ -180,7 +180,8 @@ const compileSassFile = (pkg, folder, filename, isNodeSassTildeImporterActive) =
180
180
  pkg.build.euiVersion === '13.x' ||
181
181
  pkg.build.euiVersion === '14.x' ||
182
182
  pkg.build.euiVersion === '15.x' ||
183
- pkg.build.euiVersion === '16.x'
183
+ pkg.build.euiVersion === '16.x' ||
184
+ pkg.build.euiVersion === '17.x'
184
185
  )) {
185
186
  return compileSassFileDartSass(folder, filename);
186
187
 
@@ -268,6 +268,11 @@ const getGitHost = (externalRepo) => {
268
268
 
269
269
 
270
270
  const cloneRepo = (repoUri, folder, forced = false, shallow = false, externalRepo = false) => {
271
+ if (!repoUri) {
272
+ tools.logWarning('Repository not set -- bypassing clone...');
273
+ return;
274
+ }
275
+
271
276
  return Promise.resolve()
272
277
  .then(() => {
273
278
  if (tools.isDirExists(folder) && forced) {
@@ -346,6 +351,11 @@ const checkout = (branch, folder, shallow = false) => {
346
351
 
347
352
 
348
353
  const cloneAndCheckout = (repoUri, folder, branch, forced, shallow) => {
354
+ if (!repoUri) {
355
+ tools.logWarning('Repository set to false -- clone deactivated');
356
+ return;
357
+ }
358
+
349
359
  tools.logInfo(`cloning ${repoUri} in ${folder} on branch ${branch}`);
350
360
 
351
361
  return Promise.resolve()
@@ -56,7 +56,7 @@ module.exports.injectCsdrFullSkeletonSources = (project, euiVersion) => {
56
56
  // copying skeleton sources
57
57
  if (euiVersion === '13.x') {
58
58
  tools.copydir(path.join(__dirname, 'app-sources-full-skeleton-eui13'), project.folder, false);
59
- } else if (euiVersion === '14.x' || euiVersion === '15.x' || euiVersion === '16.x') {
59
+ } else if (euiVersion === '14.x' || euiVersion === '15.x' || euiVersion === '16.x' || euiVersion === '17.x') {
60
60
  tools.copydir(path.join(__dirname, 'app-sources-full-skeleton-eui14'), project.folder, false);
61
61
  } else {
62
62
  tools.copydir(path.join(__dirname, 'app-sources-full-skeleton'), project.folder, false);
@@ -76,6 +76,8 @@ module.exports.preBuild = (project, envTarget, build, configEnvTarget) => {
76
76
  return injectionUtils.skeletons.injectCsdrFullSkeletonSources(project, '15.x');
77
77
  } else if (project.build && project.build.euiVersion === '16.x') {
78
78
  return injectionUtils.skeletons.injectCsdrFullSkeletonSources(project, '16.x');
79
+ } else if (project.build && project.build.euiVersion === '17.x') {
80
+ return injectionUtils.skeletons.injectCsdrFullSkeletonSources(project, '17.x');
79
81
  } else {
80
82
  return injectionUtils.skeletons.injectCsdrFullSkeletonSources(project);
81
83
  }
@@ -112,10 +112,11 @@ const injectRoutesConfig = (project) => {
112
112
  tools.logInfo(`${routesConfigPath} - injecting in ${project.paths.assetsPath}`);
113
113
  tools.copydir(routesConfigPath, project.paths.assetsPath);
114
114
 
115
- const workspacesConfigPath = path.join(pkgAssetsPath, project.externalRoutesSources.workspacesConfigAssetsPath);
116
- tools.logInfo(`${workspacesConfigPath} - injecting in ${project.paths.assetsPath}`);
117
- tools.copydir(workspacesConfigPath, project.paths.assetsPath);
118
-
115
+ if (project.externalRoutesSources.workspacesConfigAssetsPath) {
116
+ const workspacesConfigPath = path.join(pkgAssetsPath, project.externalRoutesSources.workspacesConfigAssetsPath);
117
+ tools.logInfo(`${workspacesConfigPath} - injecting in ${project.paths.assetsPath}`);
118
+ tools.copydir(workspacesConfigPath, project.paths.assetsPath);
119
+ }
119
120
  };
120
121
 
121
122
 
@@ -501,7 +502,11 @@ const generateLinks = (project, routes, envTargetFinal) => {
501
502
  const routeDefsBaseFilename = 'route-defs-base.json';
502
503
  const routeDefsBaseJSON = require(path.join(project.paths.assetsPath, routeDefsBaseFilename));
503
504
  const workspaceDefsBaseFilename = 'workspace-defs-base.json';
504
- const workspaceDefsBaseJSON = require(path.join(project.paths.assetsPath, workspaceDefsBaseFilename));
505
+
506
+ let workspaceDefsBaseJSON;
507
+ if (tools.isFileExists(path.join(project.paths.assetsPath, workspaceDefsBaseFilename))) {
508
+ workspaceDefsBaseJSON = require(path.join(project.paths.assetsPath, workspaceDefsBaseFilename));
509
+ }
505
510
 
506
511
  const getRouteMenuDef = (link) => {
507
512
  let routeDef = null;
@@ -565,18 +570,20 @@ const generateLinks = (project, routes, envTargetFinal) => {
565
570
 
566
571
  // Combining workspaces definitions with base links definitions
567
572
 
568
- workspaceDefsBaseJSON.forEach((wp) => {
569
- if (wp.baseLinkDefs) {
570
- wp.baseLinkDefs.forEach((wpLink) => {
571
- workspaceLinks.push({
572
- ...wpLink,
573
- workspace: wp.id
573
+ if (workspaceDefsBaseJSON) {
574
+ workspaceDefsBaseJSON.forEach((wp) => {
575
+ if (wp.baseLinkDefs) {
576
+ wp.baseLinkDefs.forEach((wpLink) => {
577
+ workspaceLinks.push({
578
+ ...wpLink,
579
+ workspace: wp.id
580
+ });
574
581
  });
575
- });
576
- }
577
- });
582
+ }
583
+ });
578
584
 
579
- tools.logInfo(`Workspaces links generated : ${workspaceLinks.length}`);
585
+ tools.logInfo(`Workspaces links generated : ${workspaceLinks.length}`);
586
+ }
580
587
 
581
588
  const globalLinks = [
582
589
  ...routeDefsBaseLinksJSON,
@@ -763,7 +763,7 @@ const log = (msg, type) => {
763
763
  if (type === 4) {
764
764
  prefix = figures.pointer.repeat(6);
765
765
  msgContent = `\n${currentDateTime} - ${prefix} ${msg}\n`;
766
- console.info(chalk.keyword('orange')(msgContent));
766
+ console.info(chalk.keyword('yellow')(msgContent));
767
767
  }
768
768
  if (type === 5) {
769
769
  prefix = figures.star.repeat(3);