ac-support-connector 1.0.5 → 1.0.7

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.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,25 @@
1
1
 
2
+ ## [1.0.7](https://github.com/admiralcloud/ac-support-connector/compare/v1.0.6..v1.0.7) (2025-03-30 14:32:39)
3
+
4
+
5
+ ### Bug Fix
6
+
7
+ * **Connector:** Allow parameter SUPPORT_CHECK_PROJECT for support check | MP | [a1def330f0cbe5ffbe91e2eb54b92fac5a273a13](https://github.com/admiralcloud/ac-support-connector/commit/a1def330f0cbe5ffbe91e2eb54b92fac5a273a13)
8
+ With SUPPORT_CHECK_PROJECT you can define the project for the support check
9
+ Related issues:
10
+
11
+ ## [1.0.6](https://github.com/admiralcloud/ac-support-connector/compare/v1.0.5..v1.0.6) (2025-03-30 13:21:21)
12
+
13
+
14
+ ### Bug Fix
15
+
16
+ * **Connector:** Add test function | MP | [90c57fb9a72e59a0a596d85df5e3ff0ce091ec42](https://github.com/admiralcloud/ac-support-connector/commit/90c57fb9a72e59a0a596d85df5e3ff0ce091ec42)
17
+ Add function to test/check support connector in embedding app.
18
+ Related issues:
19
+ * **Connector:** Package updates | MP | [b1429d173e39444c68e1e5528613ab3c3f2328d5](https://github.com/admiralcloud/ac-support-connector/commit/b1429d173e39444c68e1e5528613ab3c3f2328d5)
20
+ Package updates
21
+ Related issues:
22
+
2
23
  ## [1.0.5](https://github.com/admiralcloud/ac-support-connector/compare/v1.0.4..v1.0.5) (2025-03-04 09:10:51)
3
24
 
4
25
 
package/README.md CHANGED
@@ -76,6 +76,34 @@ NOTE: If instanceId and service are set during init, they will be automatically
76
76
 
77
77
  ```
78
78
 
79
+ # Test Support Connector
80
+ Every app using this connector should test that the proceess is working as expected using a built-in check routine.
81
+
82
+ ```
83
+ export SUPPORT_CHECK=teams
84
+ OR
85
+ export SUPPORT_CHECK=jsm
86
+
87
+ // OPTIONAL, you can define a project for teams (channel) or jsm (service desk ID)
88
+ export SUPPORT_CHECK_PROJECT=myChannel (for teams)
89
+
90
+ // Then run the app
91
+ node server.js
92
+ ```
93
+
94
+ Event better, add it Makefile like this:
95
+
96
+ ```
97
+ // Makefile
98
+
99
+ test-supportConnector:
100
+ SUPPORT_CHECK=teams node server.js
101
+ ```
102
+ Then run "make test-supportConnector"
103
+
104
+ A test message will be created and sent into the channel. The message will have a unique identifier and the test will exit the app.
105
+
106
+
79
107
  # Parameters
80
108
  ## Init
81
109
  |Parameter|Type|Usage|
package/index.js CHANGED
@@ -41,6 +41,29 @@ module.exports = {
41
41
  }
42
42
  }
43
43
  this.acsqs = new ACSQS(sqsParams)
44
+ // you can start your app with ENV variable SUPPORT_CHECK (teams OR jsm) to send a test message and exit
45
+ // this process should be used at least once a year to make sure warning messages are sent and received properly
46
+ if (process.env.SUPPORT_CHECK) {
47
+ const identifier = Math.random().toString(36).substring(2)
48
+ const ticket = {
49
+ platforms: [process.env.SUPPORT_CHECK],
50
+ subject: 'SupportConnector | SupportCheck | TestMessage',
51
+ reporter: 'DevOps',
52
+ message: [{
53
+ type: 'text',
54
+ content: `This is a random test message to show that support connector is working for this service | ${identifier}`
55
+ }]
56
+ }
57
+ if (process.env.SUPPORT_CHECK_PROJECT) {
58
+ ticket.message.push({
59
+ type: 'project',
60
+ content: process.env.SUPPORT_CHECK_PROJECT
61
+ })
62
+ }
63
+ await this.createMessage(ticket)
64
+ console.warn(`Test Message ${identifier} sent`)
65
+ process.exit(0)
66
+ }
44
67
  }
45
68
  },
46
69
 
package/package.json CHANGED
@@ -3,19 +3,19 @@
3
3
  "author": "Mark Poepping (https://www.admiralcloud.com)",
4
4
  "license": "MIT",
5
5
  "repository": "admiralcloud/ac-support-connector",
6
- "version": "1.0.5",
6
+ "version": "1.0.7",
7
7
  "dependencies": {
8
- "@aws-sdk/client-sts": "^3.758.0",
8
+ "@aws-sdk/client-sts": "^3.777.0",
9
9
  "ac-sqs": "^3.0.0",
10
10
  "node-cache": "^5.1.2"
11
11
  },
12
12
  "devDependencies": {
13
13
  "ac-semantic-release": "^0.4.5",
14
14
  "chai": "^4.5.0",
15
- "eslint": "^9.21.0",
15
+ "eslint": "^9.23.0",
16
16
  "expect": "^29.7.0",
17
- "ioredis": "^5.5.0",
18
- "mocha": "^10.8.2"
17
+ "ioredis": "^5.6.0",
18
+ "mocha": "^11.1.0"
19
19
  },
20
20
  "scripts": {
21
21
  "test": "NODE_ENV=test mocha --reporter spec || :"