@eui/tools 4.15.11 → 4.15.12

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 (59) hide show
  1. package/.version.properties +1 -1
  2. package/CHANGELOG.md +10 -0
  3. package/bin/eui-scripts.js +2 -0
  4. package/bin/scripts/build-package-sub.js +20 -0
  5. package/global.test.js +3 -3
  6. package/package.json +12 -16
  7. package/sandbox.js +3 -2
  8. package/scripts/csdr/cli/app.js +30 -3
  9. package/scripts/csdr/cli/skeletons/app-showcase-eui13/angular-config.json +33 -0
  10. package/scripts/csdr/cli/skeletons/app-showcase-eui13/dependencies-composite.json +5 -0
  11. package/scripts/csdr/cli/skeletons/app-showcase-eui13/gitignore_TO_REPLACE +50 -0
  12. package/scripts/csdr/cli/skeletons/app-showcase-eui13/package.json +6 -0
  13. package/scripts/csdr/cli/skeletons/app-showcase-eui13/scripts.json +3 -0
  14. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app-routing.module.ts +21 -0
  15. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app.component.html +26 -0
  16. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app.component.ts +19 -0
  17. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app.routes.ts +7 -0
  18. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home-routing.module.ts +15 -0
  19. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home.component.html +7 -0
  20. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home.component.ts +8 -0
  21. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home.module.ts +17 -0
  22. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/shared/shared.module.ts +15 -0
  23. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/assets/app-metadata.json +8 -0
  24. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/assets/config/env-json-config.json +41 -0
  25. package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/index.html +22 -0
  26. package/scripts/csdr/config/angular.js +213 -3
  27. package/scripts/csdr/config/global.js +16 -0
  28. package/scripts/csdr/install/common.js +26 -8
  29. package/scripts/csdr/jira/jira-utils.js +168 -168
  30. package/scripts/csdr/jira/update.js +150 -150
  31. package/scripts/csdr/metadata/app-envs.js +34 -33
  32. package/scripts/csdr/metadata/app-history.js +62 -61
  33. package/scripts/csdr/metadata/common.js +2 -2
  34. package/scripts/csdr/metadata/package-history.js +0 -1
  35. package/scripts/csdr/sync/sync-utils.js +6 -2
  36. package/scripts/utils/build/package/build-package-utils.js +45 -0
  37. package/scripts/utils/build/package/styles.js +106 -7
  38. package/scripts/utils/confluence-utils.js +126 -126
  39. package/scripts/utils/index.js +2 -2
  40. package/scripts/utils/pre-build/injection/app-sources-full-skeleton/src/_generated/favicon.ico +0 -0
  41. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/app/app.module.ts +52 -0
  42. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/app/core/reducers/index.ts +40 -0
  43. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/config/global.ts +4 -0
  44. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/config/index.ts +8 -0
  45. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/config/modules.ts +4 -0
  46. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/environments/environment.dev.ts +9 -0
  47. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/environments/environment.prod.ts +9 -0
  48. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/environments/environment.ts +21 -0
  49. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/favicon.ico +0 -0
  50. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/karma.conf.js +7 -0
  51. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/main.ts +21 -0
  52. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/polyfills.ts +86 -0
  53. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/tst.ts +33 -0
  54. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/tsconfig.app.json +19 -0
  55. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/tsconfig.spec.json +9 -0
  56. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/tslint.json +17 -0
  57. package/scripts/utils/pre-build/injection/skeletons.js +6 -2
  58. package/scripts/utils/pre-build/projects.js +5 -1
  59. package/scripts/utils/tools.js +13 -0
@@ -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
+ }
@@ -46,14 +46,18 @@ module.exports.injectCsdrSkeletonEuiShowcaseSources = (project) => {
46
46
  }
47
47
 
48
48
 
49
- module.exports.injectCsdrFullSkeletonSources = (project) => {
49
+ module.exports.injectCsdrFullSkeletonSources = (project, euiVersion) => {
50
50
 
51
51
  tools.logInfo(`Injecting CSDR full skeleton sources for : ${project.name}`);
52
52
 
53
53
  return Promise.resolve()
54
54
  .then(() => {
55
55
  // copying skeleton sources
56
- tools.copydir(path.join(__dirname, 'app-sources-full-skeleton'), project.folder, false);
56
+ if (euiVersion === '13.x') {
57
+ tools.copydir(path.join(__dirname, 'app-sources-full-skeleton-eui13'), project.folder, false);
58
+ } else {
59
+ tools.copydir(path.join(__dirname, 'app-sources-full-skeleton'), project.folder, false);
60
+ }
57
61
 
58
62
  // renaming tst.ts as it's conflicting with Jest... (TODO)
59
63
  tools.move(path.join(project.folder, 'src', '_generated', 'tst.ts'), path.join(project.folder, 'src', '_generated', 'test.ts'));
@@ -73,7 +73,11 @@ module.exports.preBuild = (project, envTarget, build) => {
73
73
  return injectionUtils.skeletons.injectCsdrSkeletonEuiShowcaseSources(project);
74
74
 
75
75
  } else if (project.csdrFullSkeleton) {
76
- return injectionUtils.skeletons.injectCsdrFullSkeletonSources(project);
76
+ if (project.build && project.build.euiVersion === '13.x') {
77
+ return injectionUtils.skeletons.injectCsdrFullSkeletonSources(project, '13.x');
78
+ } else {
79
+ return injectionUtils.skeletons.injectCsdrFullSkeletonSources(project);
80
+ }
77
81
  }
78
82
  })
79
83
 
@@ -584,6 +584,18 @@ function getFiles(parentPath) {
584
584
  return fs.readdirSync(parentPath).filter(f => fs.statSync(path.join(parentPath, f)).isFile());
585
585
  }
586
586
 
587
+ function getFilesGlob(from, fileGlob) {
588
+ return new Promise((resolve, reject) => {
589
+ glob(fileGlob, { cwd: from, nodir: true, follow: true, dot: true }, (err, files) => {
590
+ if (err) {
591
+ logError(err);
592
+ reject(err);
593
+ }
594
+ return resolve(files);
595
+ })
596
+ });
597
+ }
598
+
587
599
  function logBigTitle(text) {
588
600
  console.log('\n\n');
589
601
  console.log(
@@ -672,6 +684,7 @@ module.exports.getArgs = getArgs;
672
684
  module.exports.getXMLJsContent = getXMLJsContent;
673
685
  module.exports.getFolders = getFolders;
674
686
  module.exports.getFiles = getFiles;
687
+ module.exports.getFilesGlob = getFilesGlob;
675
688
  module.exports.logBigTitle = logBigTitle;
676
689
  module.exports.removeFilesExtension = removeFilesExtension;
677
690
  module.exports.splitNpmPkg = splitNpmPkg;