@itentialopensource/adapter-aws_lambda 0.1.1 → 0.2.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/.eslintignore +0 -1
- package/.jshintrc +3 -0
- package/PROPERTIES.md +16 -1
- package/TAB1.md +8 -0
- package/TAB2.md +328 -0
- package/adapterBase.js +38 -0
- package/package.json +5 -5
- package/propertiesDecorators.json +4 -0
- package/propertiesSchema.json +167 -37
- package/report/auto-adapter-openapi.json +3130 -0
- package/report/updateReport1764796649497.json +120 -0
- package/sampleProperties.json +4 -1
- package/test/unit/adapterBaseTestUnit.js +11 -9
- package/test/unit/adapterTestUnit.js +11 -1
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
{
|
|
2
|
+
"errors": [],
|
|
3
|
+
"statistics": [
|
|
4
|
+
{
|
|
5
|
+
"owner": "errorJson",
|
|
6
|
+
"description": "New adapter errors available for use",
|
|
7
|
+
"value": 0
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"owner": "errorJson",
|
|
11
|
+
"description": "Adapter errors no longer available for use",
|
|
12
|
+
"value": 0
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"owner": "errorJson",
|
|
16
|
+
"description": "Adapter errors that have been updated (e.g. recommendation changes)",
|
|
17
|
+
"value": 31
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"owner": "packageJson",
|
|
21
|
+
"description": "Number of production dependencies",
|
|
22
|
+
"value": 15
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"owner": "packageJson",
|
|
26
|
+
"description": "Number of development dependencies",
|
|
27
|
+
"value": 6
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"owner": "packageJson",
|
|
31
|
+
"description": "Number of npm scripts",
|
|
32
|
+
"value": 17
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"owner": "packageJson",
|
|
36
|
+
"description": "Runtime Library dependency",
|
|
37
|
+
"value": "6.0.2"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"owner": "propertiesSchemaJson",
|
|
41
|
+
"description": "Adapter properties defined in the propertiesSchema file",
|
|
42
|
+
"value": 82
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"owner": "markdown",
|
|
46
|
+
"description": "Number of lines in the README.md",
|
|
47
|
+
"value": 345
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"owner": "markdown",
|
|
51
|
+
"description": "Number of lines in the SUMMARY.md",
|
|
52
|
+
"value": 9
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"owner": "markdown",
|
|
56
|
+
"description": "Number of lines in the PROPERTIES.md",
|
|
57
|
+
"value": 677
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"owner": "markdown",
|
|
61
|
+
"description": "Number of lines in the TROUBLESHOOT.md",
|
|
62
|
+
"value": 57
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"owner": "markdown",
|
|
66
|
+
"description": "Number of lines in the ENHANCE.md",
|
|
67
|
+
"value": 70
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"owner": "markdown",
|
|
71
|
+
"description": "Number of lines in the BROKER.md",
|
|
72
|
+
"value": 70
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"owner": "unitTestJS",
|
|
76
|
+
"description": "Number of lines of code in unit tests",
|
|
77
|
+
"value": 3953
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"owner": "unitTestJS",
|
|
81
|
+
"description": "Number of unit tests",
|
|
82
|
+
"value": 233
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"owner": "integrationTestJS",
|
|
86
|
+
"description": "Number of lines of code in integration tests",
|
|
87
|
+
"value": 2104
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"owner": "integrationTestJS",
|
|
91
|
+
"description": "Number of integration tests",
|
|
92
|
+
"value": 73
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"owner": "staticFile",
|
|
96
|
+
"description": "Number of lines of code in adapterBase.js",
|
|
97
|
+
"value": 1527
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"owner": "staticFile",
|
|
101
|
+
"description": "Number of static files added",
|
|
102
|
+
"value": 37
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"owner": "Overall",
|
|
106
|
+
"description": "Total lines of Code",
|
|
107
|
+
"value": 7584
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"owner": "Overall",
|
|
111
|
+
"description": "Total Tests",
|
|
112
|
+
"value": 306
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"owner": "Overall",
|
|
116
|
+
"description": "Total Files",
|
|
117
|
+
"value": 6
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}
|
package/sampleProperties.json
CHANGED
|
@@ -28,6 +28,9 @@
|
|
|
28
28
|
"client_id": "",
|
|
29
29
|
"client_secret": "",
|
|
30
30
|
"grant_type": "",
|
|
31
|
+
"auth_request_datatype": "",
|
|
32
|
+
"auth_response_datatype": "",
|
|
33
|
+
"token_response_placement": "",
|
|
31
34
|
"sensitive": [],
|
|
32
35
|
"sso": {
|
|
33
36
|
"protocol": "",
|
|
@@ -271,4 +274,4 @@
|
|
|
271
274
|
"brokers": [],
|
|
272
275
|
"logLevel": "none",
|
|
273
276
|
"timeout": 120000
|
|
274
|
-
}
|
|
277
|
+
}
|
|
@@ -387,7 +387,7 @@ describe('[unit] Adapter Base Test', () => {
|
|
|
387
387
|
'healthCheck', 'iapActivateTasks', 'iapDeactivateTasks', 'iapExpandedGenericAdapterRequest', 'iapFindAdapterPath', 'iapGetAdapterInventory', 'iapGetAdapterQueue',
|
|
388
388
|
'iapGetAdapterWorkflowFunctions', 'iapGetDeviceCount', 'iapGetDeviceCountAuth', 'iapMoveAdapterEntitiesToDB', 'iapPopulateEntityCache', 'iapRetrieveEntitiesCache',
|
|
389
389
|
'iapRunAdapterBasicGet', 'iapRunAdapterConnectivity', 'iapRunAdapterHealthcheck', 'iapRunAdapterLint', 'iapRunAdapterTests', 'iapSuspendAdapter', 'iapTroubleshootAdapter',
|
|
390
|
-
'iapUnsuspendAdapter', 'iapUpdateAdapterConfiguration', 'isAlive', 'isAliveAuth', 'refreshProperties', 'addListener', 'emit', 'eventNames', 'getMaxListeners',
|
|
390
|
+
'iapUnsuspendAdapter', 'iapUpdateAdapterConfiguration', 'isAlive', 'isAliveAuth', 'parseIapMetadata', 'refreshProperties', 'addListener', 'emit', 'eventNames', 'getMaxListeners',
|
|
391
391
|
'listenerCount', 'listeners', 'off', 'on', 'once', 'prependListener', 'prependOnceListener', 'rawListeners', 'removeAllListeners', 'removeListener', 'setMaxListeners'];
|
|
392
392
|
try {
|
|
393
393
|
const expectedFunctions = a.getAllFunctions();
|
|
@@ -956,14 +956,16 @@ describe('[unit] Adapter Base Test', () => {
|
|
|
956
956
|
});
|
|
957
957
|
it('should get information for all of the requests currently in the queue', (done) => {
|
|
958
958
|
try {
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
959
|
+
a.iapGetAdapterQueue((data, error) => {
|
|
960
|
+
try {
|
|
961
|
+
assert.notEqual(null, data);
|
|
962
|
+
assert.equal(0, data.length);
|
|
963
|
+
done();
|
|
964
|
+
} catch (err) {
|
|
965
|
+
log.error(`Test Failure: ${err}`);
|
|
966
|
+
done(err);
|
|
967
|
+
}
|
|
968
|
+
});
|
|
967
969
|
} catch (error) {
|
|
968
970
|
log.error(`Adapter Exception: ${error}`);
|
|
969
971
|
done(error);
|
|
@@ -245,6 +245,7 @@ describe('[unit] Aws_lambda Adapter Test', () => {
|
|
|
245
245
|
assert.notEqual(undefined, packageDotJson.scripts);
|
|
246
246
|
assert.notEqual(null, packageDotJson.scripts);
|
|
247
247
|
assert.notEqual('', packageDotJson.scripts);
|
|
248
|
+
assert.equal('node utils/setup.js', packageDotJson.scripts.preinstall);
|
|
248
249
|
assert.equal('node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js', packageDotJson.scripts.lint);
|
|
249
250
|
assert.equal('node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js --quiet', packageDotJson.scripts['lint:errors']);
|
|
250
251
|
assert.equal('mocha test/unit/adapterBaseTestUnit.js --LOG=error', packageDotJson.scripts['test:baseunit']);
|
|
@@ -263,6 +264,9 @@ describe('[unit] Aws_lambda Adapter Test', () => {
|
|
|
263
264
|
assert.notEqual(undefined, packageDotJson.repository);
|
|
264
265
|
assert.notEqual(null, packageDotJson.repository);
|
|
265
266
|
assert.notEqual('', packageDotJson.repository);
|
|
267
|
+
assert.equal('git', packageDotJson.repository.type);
|
|
268
|
+
assert.equal('git@gitlab.com:itentialopensource/adapters/', packageDotJson.repository.url.substring(0, 43));
|
|
269
|
+
assert.equal('https://gitlab.com/itentialopensource/adapters/', packageDotJson.homepage.substring(0, 47));
|
|
266
270
|
done();
|
|
267
271
|
} catch (error) {
|
|
268
272
|
log.error(`Test Failure: ${error}`);
|
|
@@ -276,7 +280,7 @@ describe('[unit] Aws_lambda Adapter Test', () => {
|
|
|
276
280
|
assert.notEqual(null, packageDotJson.dependencies);
|
|
277
281
|
assert.notEqual('', packageDotJson.dependencies);
|
|
278
282
|
assert.equal('8.17.1', packageDotJson.dependencies.ajv);
|
|
279
|
-
assert.equal('1.12.
|
|
283
|
+
assert.equal('1.12.2', packageDotJson.dependencies.axios);
|
|
280
284
|
assert.equal('11.1.0', packageDotJson.dependencies.commander);
|
|
281
285
|
assert.equal('11.3.0', packageDotJson.dependencies['fs-extra']);
|
|
282
286
|
assert.equal('10.8.2', packageDotJson.dependencies.mocha);
|
|
@@ -575,6 +579,9 @@ describe('[unit] Aws_lambda Adapter Test', () => {
|
|
|
575
579
|
assert.equal('string', propertiesDotJson.definitions.authentication.properties.client_id.type);
|
|
576
580
|
assert.equal('string', propertiesDotJson.definitions.authentication.properties.client_secret.type);
|
|
577
581
|
assert.equal('string', propertiesDotJson.definitions.authentication.properties.grant_type.type);
|
|
582
|
+
assert.equal('string', propertiesDotJson.definitions.authentication.properties.auth_request_datatype.type);
|
|
583
|
+
assert.equal('string', propertiesDotJson.definitions.authentication.properties.auth_response_datatype.type);
|
|
584
|
+
assert.equal('string', propertiesDotJson.definitions.authentication.properties.token_response_placement.type);
|
|
578
585
|
assert.notEqual(undefined, propertiesDotJson.definitions.ssl);
|
|
579
586
|
assert.notEqual(null, propertiesDotJson.definitions.ssl);
|
|
580
587
|
assert.notEqual('', propertiesDotJson.definitions.ssl);
|
|
@@ -765,6 +772,9 @@ describe('[unit] Aws_lambda Adapter Test', () => {
|
|
|
765
772
|
assert.notEqual(undefined, sampleDotJson.properties.authentication.client_id);
|
|
766
773
|
assert.notEqual(undefined, sampleDotJson.properties.authentication.client_secret);
|
|
767
774
|
assert.notEqual(undefined, sampleDotJson.properties.authentication.grant_type);
|
|
775
|
+
assert.notEqual(undefined, sampleDotJson.properties.authentication.auth_request_datatype);
|
|
776
|
+
assert.notEqual(undefined, sampleDotJson.properties.authentication.auth_response_datatype);
|
|
777
|
+
assert.notEqual(undefined, sampleDotJson.properties.authentication.token_response_placement);
|
|
768
778
|
assert.notEqual(undefined, sampleDotJson.properties.ssl);
|
|
769
779
|
assert.notEqual(null, sampleDotJson.properties.ssl);
|
|
770
780
|
assert.notEqual('', sampleDotJson.properties.ssl);
|