@defra-fish/connectors-lib 1.68.0 → 1.69.0-rc.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/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@defra-fish/connectors-lib",
3
- "version": "1.68.0",
3
+ "version": "1.69.0-rc.0",
4
4
  "description": "Shared connectors",
5
5
  "type": "module",
6
6
  "engines": {
7
- "node": ">=20"
7
+ "node": ">=22"
8
8
  },
9
9
  "keywords": [
10
10
  "rod",
@@ -39,6 +39,7 @@
39
39
  "@aws-sdk/client-s3": "3.779.0",
40
40
  "@aws-sdk/client-secrets-manager": "3.777.0",
41
41
  "@aws-sdk/client-sqs": "3.777.0",
42
+ "@aws-sdk/client-ssm": "3.777.0",
42
43
  "@aws-sdk/lib-dynamodb": "3.778.0",
43
44
  "debug": "4.3.3",
44
45
  "http-status-codes": "2.3.0",
@@ -46,5 +47,5 @@
46
47
  "node-fetch": "2.7.0",
47
48
  "redlock": "4.2.0"
48
49
  },
49
- "gitHead": "06c0080280b167f83b426a645e187c819390de4b"
50
+ "gitHead": "e9eb67926528361d45ad630df84da2ad47723b97"
50
51
  }
@@ -55,6 +55,7 @@ describe.each`
55
55
  ${'s3'} | ${'S3Client'} | ${'s3'} | ${'2006-03-01'}
56
56
  ${'secretsManager'} | ${'SecretsManager'} | ${'secretsManager'} | ${'2017-10-17'}
57
57
  ${'docClient'} | ${'DynamoDBDocument'} | ${'dynamodb'} | ${'2012-08-10'}
58
+ ${'systemsManager'} | ${'SSMClient'} | ${'systemsManager'} | ${'2014-11-06'}
58
59
  `('AWS connectors for $clientName', ({ name, clientName, configName, expectedAPIVersion }) => {
59
60
  beforeAll(() => {
60
61
  createDocumentClient.mockImplementation(options => {
package/src/aws.js CHANGED
@@ -4,6 +4,7 @@ import { DynamoDB } from '@aws-sdk/client-dynamodb'
4
4
  import { SQS } from '@aws-sdk/client-sqs'
5
5
  import { S3Client, ListObjectsV2Command, GetObjectCommand } from '@aws-sdk/client-s3'
6
6
  import { SecretsManager } from '@aws-sdk/client-secrets-manager'
7
+ import { SSMClient } from '@aws-sdk/client-ssm'
7
8
 
8
9
  export default function () {
9
10
  return {
@@ -40,6 +41,13 @@ export default function () {
40
41
  endpoint: Config.aws.secretsManager.endpoint
41
42
  })
42
43
  }),
44
+ systemsManager: new SSMClient({
45
+ apiVersion: '2014-11-06',
46
+ region: 'eu-west-2',
47
+ ...(Config.aws.systemsManager.endpoint && {
48
+ endpoint: Config.aws.systemsManager.endpoint
49
+ })
50
+ }),
43
51
  ListObjectsV2Command,
44
52
  GetObjectCommand
45
53
  }
package/src/config.js CHANGED
@@ -12,6 +12,9 @@ export default {
12
12
  },
13
13
  secretsManager: {
14
14
  endpoint: process.env.AWS_SECRETS_MANAGER_ENDPOINT
15
+ },
16
+ systemsManager: {
17
+ endpoint: process.env.AWS_SYSTEMS_MANAGER_ENDPOINT
15
18
  }
16
19
  }
17
20
  }