ac-support-connector 1.0.5 → 1.0.6

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,16 @@
1
1
 
2
+ ## [1.0.6](https://github.com/admiralcloud/ac-support-connector/compare/v1.0.5..v1.0.6) (2025-03-30 13:21:21)
3
+
4
+
5
+ ### Bug Fix
6
+
7
+ * **Connector:** Add test function | MP | [90c57fb9a72e59a0a596d85df5e3ff0ce091ec42](https://github.com/admiralcloud/ac-support-connector/commit/90c57fb9a72e59a0a596d85df5e3ff0ce091ec42)
8
+ Add function to test/check support connector in embedding app.
9
+ Related issues:
10
+ * **Connector:** Package updates | MP | [b1429d173e39444c68e1e5528613ab3c3f2328d5](https://github.com/admiralcloud/ac-support-connector/commit/b1429d173e39444c68e1e5528613ab3c3f2328d5)
11
+ Package updates
12
+ Related issues:
13
+
2
14
  ## [1.0.5](https://github.com/admiralcloud/ac-support-connector/compare/v1.0.4..v1.0.5) (2025-03-04 09:10:51)
3
15
 
4
16
 
package/README.md CHANGED
@@ -76,6 +76,31 @@ 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
+ // Then run the app
88
+ node server.js
89
+ ```
90
+
91
+ Event better, add it Makefile like this:
92
+
93
+ ```
94
+ // Makefile
95
+
96
+ test-supportConnector:
97
+ SUPPORT_CHECK=teams node server.js
98
+ ```
99
+ Then run "make test-supportConnector"
100
+
101
+ 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.
102
+
103
+
79
104
  # Parameters
80
105
  ## Init
81
106
  |Parameter|Type|Usage|
package/index.js CHANGED
@@ -41,6 +41,21 @@ 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
+ text: `This is a random test message to show that support connector is working for this service | ${identifier}`,
52
+ reporter: 'DevOps',
53
+ level: 'error' // optional, if none is set, the level is info
54
+ }
55
+ await this.createMessage(ticket)
56
+ console.warn(`Test Message ${identifier} sent`)
57
+ process.exit(0)
58
+ }
44
59
  }
45
60
  },
46
61
 
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.6",
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 || :"