@itentialopensource/adapter-slack 2.6.2 → 3.0.0
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
package/adapter.js
CHANGED
|
@@ -15,13 +15,13 @@ const path = require('path');
|
|
|
15
15
|
const AdapterBaseCl = require(path.join(__dirname, 'adapterBase.js'));
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* This is the adapter/interface into
|
|
18
|
+
* This is the adapter/interface into Slack
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
21
|
/* GENERAL ADAPTER FUNCTIONS */
|
|
22
|
-
class
|
|
22
|
+
class Slack extends AdapterBaseCl {
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* Slack Adapter
|
|
25
25
|
* @constructor
|
|
26
26
|
*/
|
|
27
27
|
/* Working on changing the way we do Emit methods due to size and time constrainsts
|
|
@@ -10723,4 +10723,4 @@ class Slacktest extends AdapterBaseCl {
|
|
|
10723
10723
|
}
|
|
10724
10724
|
}
|
|
10725
10725
|
|
|
10726
|
-
module.exports =
|
|
10726
|
+
module.exports = Slack;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itentialopensource/adapter-slack",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "This adapter integrates with system Slack",
|
|
5
5
|
"main": "adapter.js",
|
|
6
6
|
"systemName": "Slack",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"author": "Itential",
|
|
56
56
|
"homepage": "https://gitlab.com/itentialopensource/adapters/notification-messaging/adapter-slack#readme",
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@itentialopensource/adapter-utils": "^4.
|
|
58
|
+
"@itentialopensource/adapter-utils": "^4.48.7",
|
|
59
59
|
"ajv": "^6.12.0",
|
|
60
60
|
"axios": "^0.21.0",
|
|
61
61
|
"commander": "^2.20.0",
|
package/pronghorn.json
CHANGED
|
Binary file
|
package/sampleProperties.json
CHANGED
|
@@ -58,7 +58,7 @@ global.pronghornProps = {
|
|
|
58
58
|
adapterProps: {
|
|
59
59
|
adapters: [{
|
|
60
60
|
id: 'Test-slack',
|
|
61
|
-
type: '
|
|
61
|
+
type: 'Slack',
|
|
62
62
|
properties: samProps
|
|
63
63
|
}]
|
|
64
64
|
}
|
|
@@ -234,12 +234,12 @@ function saveMockData(entityName, actionName, descriptor, responseData) {
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
// require the adapter that we are going to be using
|
|
237
|
-
const
|
|
237
|
+
const Slack = require('../../adapter');
|
|
238
238
|
|
|
239
239
|
// begin the testing - these should be pretty well defined between the describe and the it!
|
|
240
240
|
describe('[integration] Slack Adapter Test', () => {
|
|
241
241
|
describe('Slack Class Tests', () => {
|
|
242
|
-
const a = new
|
|
242
|
+
const a = new Slack(
|
|
243
243
|
pronghornProps.adapterProps.adapters[0].id,
|
|
244
244
|
pronghornProps.adapterProps.adapters[0].properties
|
|
245
245
|
);
|
|
@@ -54,7 +54,7 @@ global.pronghornProps = {
|
|
|
54
54
|
adapterProps: {
|
|
55
55
|
adapters: [{
|
|
56
56
|
id: 'Test-slack',
|
|
57
|
-
type: '
|
|
57
|
+
type: 'Slack',
|
|
58
58
|
properties: samProps
|
|
59
59
|
}]
|
|
60
60
|
}
|
|
@@ -116,7 +116,7 @@ function runErrorAsserts(data, error, code, origin, displayStr) {
|
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
// require the adapter that we are going to be using
|
|
119
|
-
const
|
|
119
|
+
const Slack = require('../../adapter');
|
|
120
120
|
|
|
121
121
|
// delete the .DS_Store directory in entities -- otherwise this will cause errors
|
|
122
122
|
const dirPath = path.join(__dirname, '../../entities/.DS_Store');
|
|
@@ -132,7 +132,7 @@ if (fs.existsSync(dirPath)) {
|
|
|
132
132
|
// begin the testing - these should be pretty well defined between the describe and the it!
|
|
133
133
|
describe('[unit] Slack Adapter Test', () => {
|
|
134
134
|
describe('Slack Class Tests', () => {
|
|
135
|
-
const a = new
|
|
135
|
+
const a = new Slack(
|
|
136
136
|
pronghornProps.adapterProps.adapters[0].id,
|
|
137
137
|
pronghornProps.adapterProps.adapters[0].properties
|
|
138
138
|
);
|
|
@@ -363,7 +363,7 @@ describe('[unit] Slack Adapter Test', () => {
|
|
|
363
363
|
const pronghornDotJson = require('../../pronghorn.json');
|
|
364
364
|
assert.notEqual(-1, pronghornDotJson.id.indexOf('slack'));
|
|
365
365
|
assert.equal('Adapter', pronghornDotJson.type);
|
|
366
|
-
assert.equal('
|
|
366
|
+
assert.equal('Slack', pronghornDotJson.export);
|
|
367
367
|
assert.equal('Slack', pronghornDotJson.title);
|
|
368
368
|
assert.equal('adapter.js', pronghornDotJson.src);
|
|
369
369
|
done();
|
|
@@ -729,7 +729,7 @@ describe('[unit] Slack Adapter Test', () => {
|
|
|
729
729
|
try {
|
|
730
730
|
const sampleDotJson = require('../../sampleProperties.json');
|
|
731
731
|
assert.notEqual(-1, sampleDotJson.id.indexOf('slack'));
|
|
732
|
-
assert.equal('
|
|
732
|
+
assert.equal('Slack', sampleDotJson.type);
|
|
733
733
|
assert.notEqual(undefined, sampleDotJson.properties);
|
|
734
734
|
assert.notEqual(null, sampleDotJson.properties);
|
|
735
735
|
assert.notEqual('', sampleDotJson.properties);
|