@itentialopensource/adapter-aws_cloudformation 0.1.4 → 0.2.3

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.
Files changed (84) hide show
  1. package/AUTH.md +53 -0
  2. package/BROKER.md +199 -0
  3. package/CALLS.md +620 -0
  4. package/CHANGELOG.md +6 -22
  5. package/CODE_OF_CONDUCT.md +12 -17
  6. package/CONTRIBUTING.md +3 -148
  7. package/ENHANCE.md +69 -0
  8. package/PROPERTIES.md +641 -0
  9. package/README.md +239 -507
  10. package/SUMMARY.md +9 -0
  11. package/TROUBLESHOOT.md +47 -0
  12. package/adapter.js +4031 -1143
  13. package/adapterBase.js +843 -397
  14. package/changelogs/CHANGELOG.md +48 -0
  15. package/entities/.generic/action.json +110 -5
  16. package/entities/.generic/schema.json +6 -1
  17. package/entities/.system/action.json +1 -1
  18. package/entities/Account/action.json +42 -0
  19. package/entities/Account/mockdatafiles/describePublisher-default.xml +6 -0
  20. package/entities/Account/mockdatafiles/registerPublisher-default.xml +6 -0
  21. package/entities/Account/schema.json +3 -1
  22. package/entities/ChangeSet/action.json +21 -0
  23. package/entities/ChangeSet/mockdatafiles/describeChangeSetHooks-default.xml +6 -0
  24. package/entities/ChangeSet/schema.json +2 -1
  25. package/entities/Organization/action.json +67 -0
  26. package/entities/Organization/mockdatafiles/activateOrganizationsAccess-default.xml +6 -0
  27. package/entities/Organization/mockdatafiles/deactivateOrganizationsAccess-default.xml +6 -0
  28. package/entities/Organization/mockdatafiles/describeOrganizationsAccess-default.xml +8 -0
  29. package/entities/Organization/schema.json +21 -0
  30. package/entities/Resource/action.json +21 -0
  31. package/entities/Resource/mockdatafiles/recordHandlerProgress-default.xml +6 -0
  32. package/entities/Resource/schema.json +2 -1
  33. package/entities/Stack/action.json +42 -0
  34. package/entities/Stack/mockdatafiles/importStacksToStackSet-default.xml +6 -0
  35. package/entities/Stack/mockdatafiles/rollbackStack-default.xml +6 -0
  36. package/entities/Stack/schema.json +3 -1
  37. package/entities/Type/action.json +126 -0
  38. package/entities/Type/mockdatafiles/activateType-default.xml +6 -0
  39. package/entities/Type/mockdatafiles/batchDescribeTypeConfigurations-default.xml +6 -0
  40. package/entities/Type/mockdatafiles/deactivateType-default.xml +6 -0
  41. package/entities/Type/mockdatafiles/publishType-default.xml +6 -0
  42. package/entities/Type/mockdatafiles/setTypeConfiguration-default.xml +6 -0
  43. package/entities/Type/mockdatafiles/testType-default.xml +6 -0
  44. package/entities/Type/schema.json +7 -1
  45. package/error.json +12 -0
  46. package/metadata.json +44 -0
  47. package/package.json +28 -23
  48. package/pronghorn.json +8808 -1451
  49. package/propertiesDecorators.json +14 -0
  50. package/propertiesSchema.json +844 -8
  51. package/refs?service=git-upload-pack +0 -0
  52. package/report/adapter-openapi.json +25034 -0
  53. package/report/adapter-openapi.yaml +22498 -0
  54. package/report/adapterInfo.json +10 -0
  55. package/report/updateReport1691507502657.json +120 -0
  56. package/report/updateReport1692202523445.json +120 -0
  57. package/report/updateReport1694461395239.json +120 -0
  58. package/report/updateReport1698420779793.json +120 -0
  59. package/sampleProperties.json +158 -6
  60. package/storage/metrics.json +1141 -0
  61. package/test/integration/adapterTestBasicGet.js +4 -6
  62. package/test/integration/adapterTestConnectivity.js +91 -42
  63. package/test/integration/adapterTestIntegration.js +541 -108
  64. package/test/unit/adapterBaseTestUnit.js +393 -310
  65. package/test/unit/adapterTestUnit.js +1272 -222
  66. package/utils/adapterInfo.js +206 -0
  67. package/utils/addAuth.js +94 -0
  68. package/utils/artifactize.js +1 -1
  69. package/utils/basicGet.js +1 -14
  70. package/utils/checkMigrate.js +1 -1
  71. package/utils/entitiesToDB.js +179 -0
  72. package/utils/findPath.js +1 -1
  73. package/utils/methodDocumentor.js +273 -0
  74. package/utils/modify.js +14 -16
  75. package/utils/packModificationScript.js +2 -2
  76. package/utils/patches2bundledDeps.js +90 -0
  77. package/utils/pre-commit.sh +5 -0
  78. package/utils/removeHooks.js +20 -0
  79. package/utils/taskMover.js +309 -0
  80. package/utils/tbScript.js +129 -53
  81. package/utils/tbUtils.js +152 -35
  82. package/utils/testRunner.js +17 -17
  83. package/utils/troubleshootingAdapter.js +10 -31
  84. package/workflows/README.md +0 -3
@@ -167,6 +167,132 @@
167
167
  "mockFile": "mockdatafiles/setTypeDefaultVersion-default.xml"
168
168
  }
169
169
  ]
170
+ },
171
+ {
172
+ "name": "activateType",
173
+ "protocol": "REST",
174
+ "method": "GET",
175
+ "entitypath": "{base_path}/{version}?{query}",
176
+ "requestSchema": "schema.json",
177
+ "responseSchema": "schema.json",
178
+ "timeout": 0,
179
+ "sendEmpty": false,
180
+ "sendGetBody": false,
181
+ "requestDatatype": "URLENCODE",
182
+ "responseDatatype": "XML2JSON",
183
+ "headers": {},
184
+ "responseObjects": [
185
+ {
186
+ "type": "default",
187
+ "key": "",
188
+ "mockFile": "mockdatafiles/activateType-default.xml"
189
+ }
190
+ ]
191
+ },
192
+ {
193
+ "name": "batchDescribeTypeConfigurations",
194
+ "protocol": "REST",
195
+ "method": "GET",
196
+ "entitypath": "{base_path}/{version}?{query}",
197
+ "requestSchema": "schema.json",
198
+ "responseSchema": "schema.json",
199
+ "timeout": 0,
200
+ "sendEmpty": false,
201
+ "sendGetBody": false,
202
+ "requestDatatype": "URLENCODE",
203
+ "responseDatatype": "XML2JSON",
204
+ "headers": {},
205
+ "responseObjects": [
206
+ {
207
+ "type": "default",
208
+ "key": "",
209
+ "mockFile": "mockdatafiles/batchDescribeTypeConfigurations-default.xml"
210
+ }
211
+ ]
212
+ },
213
+ {
214
+ "name": "deactivateType",
215
+ "protocol": "REST",
216
+ "method": "GET",
217
+ "entitypath": "{base_path}/{version}?{query}",
218
+ "requestSchema": "schema.json",
219
+ "responseSchema": "schema.json",
220
+ "timeout": 0,
221
+ "sendEmpty": false,
222
+ "sendGetBody": false,
223
+ "requestDatatype": "URLENCODE",
224
+ "responseDatatype": "XML2JSON",
225
+ "headers": {},
226
+ "responseObjects": [
227
+ {
228
+ "type": "default",
229
+ "key": "",
230
+ "mockFile": "mockdatafiles/deactivateType-default.xml"
231
+ }
232
+ ]
233
+ },
234
+ {
235
+ "name": "publishType",
236
+ "protocol": "REST",
237
+ "method": "GET",
238
+ "entitypath": "{base_path}/{version}?{query}",
239
+ "requestSchema": "schema.json",
240
+ "responseSchema": "schema.json",
241
+ "timeout": 0,
242
+ "sendEmpty": false,
243
+ "sendGetBody": false,
244
+ "requestDatatype": "URLENCODE",
245
+ "responseDatatype": "XML2JSON",
246
+ "headers": {},
247
+ "responseObjects": [
248
+ {
249
+ "type": "default",
250
+ "key": "",
251
+ "mockFile": "mockdatafiles/publishType-default.xml"
252
+ }
253
+ ]
254
+ },
255
+ {
256
+ "name": "setTypeConfiguration",
257
+ "protocol": "REST",
258
+ "method": "GET",
259
+ "entitypath": "{base_path}/{version}?{query}",
260
+ "requestSchema": "schema.json",
261
+ "responseSchema": "schema.json",
262
+ "timeout": 0,
263
+ "sendEmpty": false,
264
+ "sendGetBody": false,
265
+ "requestDatatype": "URLENCODE",
266
+ "responseDatatype": "XML2JSON",
267
+ "headers": {},
268
+ "responseObjects": [
269
+ {
270
+ "type": "default",
271
+ "key": "",
272
+ "mockFile": "mockdatafiles/setTypeConfiguration-default.xml"
273
+ }
274
+ ]
275
+ },
276
+ {
277
+ "name": "testType",
278
+ "protocol": "REST",
279
+ "method": "GET",
280
+ "entitypath": "{base_path}/{version}?{query}",
281
+ "requestSchema": "schema.json",
282
+ "responseSchema": "schema.json",
283
+ "timeout": 0,
284
+ "sendEmpty": false,
285
+ "sendGetBody": false,
286
+ "requestDatatype": "URLENCODE",
287
+ "responseDatatype": "XML2JSON",
288
+ "headers": {},
289
+ "responseObjects": [
290
+ {
291
+ "type": "default",
292
+ "key": "",
293
+ "mockFile": "mockdatafiles/testType-default.xml"
294
+ }
295
+ ]
170
296
  }
171
297
  ]
172
298
  }
@@ -0,0 +1,6 @@
1
+ <ActivateTypeResponse xmlns="http://internal.amazon.com/coral/com.amazonaws.maestro.service.v20160713/">
2
+ <ActivateTypeResult>
3
+ </ActivateTypeResult>
4
+ <ResponseMetadata>
5
+ </ResponseMetadata>
6
+ </ActivateTypeResponse>
@@ -0,0 +1,6 @@
1
+ <BatchDescribeTypeConfigurationsResponse xmlns="http://internal.amazon.com/coral/com.amazonaws.maestro.service.v20160713/">
2
+ <BatchDescribeTypeConfigurationsResult>
3
+ </BatchDescribeTypeConfigurationsResult>
4
+ <ResponseMetadata>
5
+ </ResponseMetadata>
6
+ </BatchDescribeTypeConfigurationsResponse>
@@ -0,0 +1,6 @@
1
+ <DeactivateTypeResponse xmlns="http://internal.amazon.com/coral/com.amazonaws.maestro.service.v20160713/">
2
+ <DeactivateTypeResult>
3
+ </DeactivateTypeResult>
4
+ <ResponseMetadata>
5
+ </ResponseMetadata>
6
+ </DeactivateTypeResponse>
@@ -0,0 +1,6 @@
1
+ <PublishTypeResponse xmlns="http://internal.amazon.com/coral/com.amazonaws.maestro.service.v20160713/">
2
+ <PublishTypeResult>
3
+ </PublishTypeResult>
4
+ <ResponseMetadata>
5
+ </ResponseMetadata>
6
+ </PublishTypeResponse>
@@ -0,0 +1,6 @@
1
+ <SetTypeConfigurationResponse xmlns="http://internal.amazon.com/coral/com.amazonaws.maestro.service.v20160713/">
2
+ <SetTypeConfigurationResult>
3
+ </SetTypeConfigurationResult>
4
+ <ResponseMetadata>
5
+ </ResponseMetadata>
6
+ </SetTypeConfigurationResponse>
@@ -0,0 +1,6 @@
1
+ <TestTypeResponse xmlns="http://internal.amazon.com/coral/com.amazonaws.maestro.service.v20160713/">
2
+ <TestTypeResult>
3
+ </TestTypeResult>
4
+ <ResponseMetadata>
5
+ </ResponseMetadata>
6
+ </TestTypeResponse>
@@ -17,7 +17,13 @@
17
17
  "registerType",
18
18
  "deregisterType",
19
19
  "listTypeVersions",
20
- "setTypeDefaultVersion"
20
+ "setTypeDefaultVersion",
21
+ "activateType",
22
+ "batchDescribeTypeConfigurations",
23
+ "deactivateType",
24
+ "publishType",
25
+ "setTypeConfiguration",
26
+ "testType"
21
27
  ],
22
28
  "external_name": "ph_request_type"
23
29
  }
package/error.json CHANGED
@@ -96,6 +96,12 @@
96
96
  "displayString": "Invalid properties: $VARIABLE$",
97
97
  "recommendation": "Verify the properties for the adapter"
98
98
  },
99
+ {
100
+ "key": "Missing Properties",
101
+ "icode": "AD.306",
102
+ "displayString": "Property $VARIABLE$ is required",
103
+ "recommendation": "Please provide the required property"
104
+ },
99
105
  {
100
106
  "key": "Query Not Translated",
101
107
  "icode": "AD.310",
@@ -168,6 +174,12 @@
168
174
  "displayString": "Failure response received for $VARIABLE$",
169
175
  "recommendation": "Check the reason for failure in the stack trace"
170
176
  },
177
+ {
178
+ "key": "Suspended Adapter",
179
+ "icode": "AD.600",
180
+ "displayString": "Adapter is suspended",
181
+ "recommendation": "Check if external system is functional and unsuspend if appropriate"
182
+ },
171
183
  {
172
184
  "key": "Caught Exception",
173
185
  "icode": "AD.900",
package/metadata.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "adapter-aws_cloudformation",
3
+ "vendor": "aws",
4
+ "product": "cloudformation",
5
+ "webName": "Itential integration with AWS Cloud Formation",
6
+ "osVersion": [],
7
+ "apiVersions": [],
8
+ "iapVersions": [
9
+ "2021.1.x",
10
+ "2021.2.x",
11
+ "2022.1.x",
12
+ "2023.1.x"
13
+ ],
14
+ "method": "REST API",
15
+ "type": "Adapter",
16
+ "example": "",
17
+ "domains": [],
18
+ "tags": [],
19
+ "deprecated": {
20
+ "isDeprecated": false
21
+ },
22
+ "brokerSince": "",
23
+ "documentation": {
24
+ "storeLink": "",
25
+ "npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-aws_cloudformation",
26
+ "repoLink": "https://gitlab.com/itentialopensource/adapters/cloud/adapter-aws_cloudformation.git",
27
+ "docLink": "https://docs.itential.com/opensource/docs/aws-cloudformation",
28
+ "faqLink": "https://docs.itential.com/opensource/docs/troubleshooting-an-adapter",
29
+ "contributeLink": "https://gitlab.com/itentialopensource/adapters/contributing-guide",
30
+ "issueLink": "https://itential.atlassian.net/servicedesk/customer/portals",
31
+ "webLink": "https://www.itential.com/adapters/aws-cloudformation/",
32
+ "vendorLink": "",
33
+ "productLink": "",
34
+ "apiLinks": []
35
+ },
36
+ "relatedItems": {
37
+ "adapters": [],
38
+ "integrations": [],
39
+ "ecosystemApplications": [],
40
+ "workflowProjects": [],
41
+ "transformationProjects": [],
42
+ "exampleProjects": []
43
+ }
44
+ }
package/package.json CHANGED
@@ -1,13 +1,15 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-aws_cloudformation",
3
- "version": "0.1.4",
3
+ "version": "0.2.3",
4
4
  "description": "This adapter integrates with system described as: Aws_cloudformation.",
5
5
  "main": "adapter.js",
6
- "wizardVersion": "2.43.12",
7
- "engineVersion": "1.58.3",
6
+ "wizardVersion": "2.44.7",
7
+ "engineVersion": "1.67.10",
8
+ "adapterType": "http",
8
9
  "scripts": {
9
10
  "artifactize": "npm i && node utils/packModificationScript.js",
10
11
  "preinstall": "node utils/setup.js",
12
+ "deinstall": "node utils/removeHooks.js",
11
13
  "lint": "node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js",
12
14
  "lint:errors": "node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js --quiet",
13
15
  "test:baseunit": "mocha test/unit/adapterBaseTestUnit.js --LOG=error",
@@ -15,17 +17,17 @@
15
17
  "test:integration": "mocha test/integration/adapterTestIntegration.js --LOG=error",
16
18
  "test:cover": "nyc --reporter html --reporter text mocha --reporter dot test/*",
17
19
  "test": "npm run test:baseunit && npm run test:unit && npm run test:integration",
18
- "adapter:install": "node utils/tbScript.js install",
20
+ "adapter:install": "npm i && node utils/tbScript.js install",
19
21
  "adapter:checkMigrate": "node utils/checkMigrate.js",
20
22
  "adapter:findPath": "node utils/findPath.js",
21
23
  "adapter:migrate": "node utils/modify.js -m",
22
24
  "adapter:update": "node utils/modify.js -u",
23
25
  "adapter:revert": "node utils/modify.js -r",
24
- "troubleshoot": "node utils/tbScript.js",
26
+ "troubleshoot": "node utils/tbScript.js troubleshoot",
25
27
  "healthcheck": "node utils/tbScript.js healthcheck",
26
28
  "basicget": "node utils/tbScript.js basicget",
27
29
  "connectivity": "node utils/tbScript.js connectivity",
28
- "deploy": "npm publish --registry=http://registry.npmjs.org --access=public",
30
+ "deploy": "npm publish --registry=https://registry.npmjs.org --access=public",
29
31
  "build": "npm run deploy"
30
32
  },
31
33
  "keywords": [
@@ -53,29 +55,32 @@
53
55
  "author": "Itential",
54
56
  "homepage": "https://gitlab.com/itentialopensource/adapters/cloud/adapter-aws_cloudformation#readme",
55
57
  "dependencies": {
56
- "@itentialopensource/adapter-utils": "^4.39.1",
57
- "ajv": "^6.12.0",
58
+ "@itentialopensource/adapter-utils": "^5.3.2",
59
+ "acorn": "^8.10.0",
60
+ "ajv": "^8.12.0",
58
61
  "aws4": "^1.9.0",
59
- "axios": "^0.21.0",
60
- "commander": "^2.20.0",
61
- "fs-extra": "^8.1.0",
62
- "jssha": "^2.3.1",
63
- "mocha": "^8.1.1",
62
+ "axios": "^1.4.0",
63
+ "commander": "^11.0.0",
64
+ "dns-lookup-promise": "^1.0.4",
65
+ "fs-extra": "^11.1.1",
66
+ "json-query": "^2.2.2",
67
+ "mocha": "^10.2.0",
64
68
  "mocha-param": "^2.0.1",
65
- "network-diagnostics": "^0.5.3",
69
+ "mongodb": "^4.16.0",
66
70
  "nyc": "^15.1.0",
71
+ "ping": "^0.4.4",
72
+ "prompts": "^2.4.2",
67
73
  "readline-sync": "^1.4.10",
68
- "semver": "^7.3.2",
69
- "winston": "^3.3.3"
74
+ "semver": "^7.5.3",
75
+ "winston": "^3.9.0"
70
76
  },
71
77
  "devDependencies": {
72
- "chai": "^4.2.0",
73
- "eslint": "^7.2.0",
74
- "eslint-config-airbnb-base": "^14.2.0",
75
- "eslint-plugin-import": "^2.21.2",
76
- "eslint-plugin-json": "^2.1.1",
77
- "package-json-validator": "^0.6.3",
78
- "testdouble": "^3.16.1"
78
+ "chai": "^4.3.7",
79
+ "eslint": "^8.44.0",
80
+ "eslint-config-airbnb-base": "^15.0.0",
81
+ "eslint-plugin-import": "^2.27.5",
82
+ "eslint-plugin-json": "^3.1.0",
83
+ "testdouble": "^3.18.0"
79
84
  },
80
85
  "private": false
81
86
  }