@eui/tools 6.9.0 → 6.9.1

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.
@@ -1 +1 @@
1
- 6.9.0
1
+ 6.9.1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ ## 6.9.1 (2023-03-14)
2
+
3
+ ##### Chores
4
+
5
+ * **other:**
6
+ * updated default eslintrc.json for frontend package - MWP-9204 [MWP-9204](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-9204) ([aeef19ac](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/aeef19aca049fc2c42b3296413399360216f1dbf))
7
+ ##### Bug Fixes
8
+
9
+ * **other:**
10
+ * invalid JSON payload when error occured for MS Teams notification - EUI-7146 [EUI-7146](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-7146) ([c7322366](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/c7322366c56178f11d085dc175ceee79adb930e0))
11
+
12
+ * * *
13
+ * * *
1
14
  ## 6.9.0 (2023-03-11)
2
15
 
3
16
  ##### New Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "6.9.0",
3
+ "version": "6.9.1",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
@@ -1,9 +1,13 @@
1
1
  {
2
- "extends": "../../.eslintrc.json",
2
+ "extends": "../../.eslintrc.mwp.json",
3
3
  "ignorePatterns": [
4
4
  "!**/*",
5
5
  "**/*.d.ts",
6
- "dist"
6
+ "dist",
7
+ "test",
8
+ "coverage",
9
+ "externals",
10
+ "legacy"
7
11
  ],
8
12
  "overrides": [
9
13
  {
@@ -11,14 +15,17 @@
11
15
  "*.ts"
12
16
  ],
13
17
  "parserOptions": {
14
- "createDefaultProgram": true
18
+ "project": [
19
+ "packages/@module.full.name@/tsconfig.lib.json",
20
+ "packages/@module.full.name@/tsconfig.spec.json"
21
+ ]
15
22
  },
16
23
  "rules": {
17
24
  "@angular-eslint/component-selector": [
18
25
  "error",
19
26
  {
20
27
  "type": "element",
21
- "prefix": "@module.scope.string@",
28
+ "prefix": ["@module.scope-name@"],
22
29
  "style": "kebab-case"
23
30
  }
24
31
  ],
@@ -26,54 +33,11 @@
26
33
  "error",
27
34
  {
28
35
  "type": "attribute",
29
- "prefix": "@module.scope.string@",
36
+ "prefix": ["@module.scope-name@"],
30
37
  "style": "camelCase"
31
38
  }
32
- ],
33
- "@typescript-eslint/ban-ts-comment": "off",
34
- "@typescript-eslint/ban-types": "error",
35
- "@typescript-eslint/consistent-type-definitions": "off",
36
- "@typescript-eslint/dot-notation": "off",
37
- "@typescript-eslint/explicit-member-accessibility": [
38
- "off",
39
- {
40
- "accessibility": "explicit"
41
- }
42
- ],
43
- "@typescript-eslint/no-inferrable-types": "off",
44
- "@typescript-eslint/no-unused-vars": "off",
45
- "@typescript-eslint/no-var-requires": "error",
46
- "@typescript-eslint/require-await": "error",
47
- "id-blacklist": "off",
48
- "id-match": "off",
49
- "max-len": [
50
- "error",
51
- {
52
- "code": 160
53
- }
54
- ],
55
- "no-duplicate-case": "error",
56
- "no-duplicate-imports": "off",
57
- "no-invalid-this": "error",
58
- "no-multiple-empty-lines": [
59
- "error",
60
- {
61
- "max": 1
62
- }
63
- ],
64
- "no-new-func": "error",
65
- "no-template-curly-in-string": "error",
66
- "no-underscore-dangle": "off",
67
- "no-var": "off",
68
- "prefer-const": "off",
69
- "comma-dangle": "off"
39
+ ]
70
40
  }
71
- },
72
- {
73
- "files": [
74
- "*.html"
75
- ],
76
- "rules": {}
77
41
  }
78
42
  ]
79
43
  }
@@ -5,7 +5,7 @@ import 'zone.js/dist/zone-testing';
5
5
  import { getTestBed } from '@angular/core/testing';
6
6
  import {
7
7
  BrowserDynamicTestingModule,
8
- platformBrowserDynamicTesting
8
+ platformBrowserDynamicTesting,
9
9
  } from '@angular/platform-browser-dynamic/testing';
10
10
 
11
11
  declare const require: any;
@@ -13,7 +13,7 @@ declare const require: any;
13
13
  // First, initialize the Angular testing environment.
14
14
  getTestBed().initTestEnvironment(
15
15
  BrowserDynamicTestingModule,
16
- platformBrowserDynamicTesting()
16
+ platformBrowserDynamicTesting(),
17
17
  );
18
18
  // Then we find all the tests.
19
19
  const context = require.context('./', true, /\.spec\.ts$/);
@@ -89,7 +89,9 @@ module.exports.getMessage = (options) => {
89
89
 
90
90
  default:
91
91
  message.detailTitle = 'GENERAL ERROR!';
92
- message.detailTextArray.push(options.exception);
92
+ try {
93
+ message.detailTextArray = options.exception.stack.split('\n');
94
+ } catch (e) {};
93
95
  };
94
96
 
95
97
  message.detailText = message.detailTextArray.join('\n');
@@ -96,7 +96,7 @@ const createPayload = (messageContent) => {
96
96
  "startGroup": true,
97
97
  "activityTitle": finalMessage.detailTitle
98
98
  });
99
- exceptionDetails.forEach((exd) => {
99
+ exceptionDetails.slice(0, 2).forEach((exd) => {
100
100
  sections.push({
101
101
  "activityText": exd
102
102
  });
@@ -137,7 +137,7 @@ module.exports.sendMessage = (config, messageContent) => {
137
137
  const payload = createPayload(messageContent);
138
138
 
139
139
  if (debug) {
140
- console.log(messageContent);
140
+ console.log(JSON.stringify(messageContent, null, 2));
141
141
  console.log(JSON.parse(JSON.stringify(payload, null, 2)));
142
142
  }
143
143