@ossy/deployment-tools 0.0.32 → 0.0.33

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@ossy/deployment-tools",
3
- "version": "0.0.32",
3
+ "version": "0.0.33",
4
4
  "description": "Collection of scripts and tools to aid deployment of containers and static files",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -6,29 +6,32 @@ import {
6
6
  } from '@aws-sdk/client-sqs'
7
7
  import { DeploymentPlatform, ContainerDeploymentRequest } from 'types'
8
8
  import { AwsCredentialsClient } from 'aws-credentials-client'
9
- import { logInfo, logError } from 'log'
9
+ import { logInfo, logError, logDebug } from 'log'
10
10
 
11
11
  export class DeploymentQueueClient {
12
12
 
13
13
  static sendDeploymentRequest(deploymentPlatform: DeploymentPlatform, deploymentRequest: ContainerDeploymentRequest) {
14
- logInfo({ message: '[DeploymentQueueClient] Starting deployment sequence' })
14
+ logInfo({ message: '[DeploymentQueueClient] Starting deployment sequence' })
15
15
  return DeploymentQueueClient.createAwsSqsClient(deploymentPlatform)
16
16
  .then(sqsClient => {
17
17
 
18
- const command = new SendMessageCommand({
18
+ const sendMessageParams = {
19
19
  QueueUrl: deploymentPlatform.awsDeploymentSqsArn,
20
20
  MessageBody: JSON.stringify(deploymentRequest)
21
- })
21
+ }
22
+
23
+ logDebug({ message: '[DeploymentQueueClient] SendMessageCommand params', data: sendMessageParams })
24
+ const command = new SendMessageCommand(sendMessageParams)
22
25
 
23
26
  return sqsClient.send(command)
24
- .then(() => logInfo({ message: '[DeploymentQueueClient] Deployment request sent' }))
27
+ .then(() => logInfo({ message: '[DeploymentQueueClient] Deployment request sent' }))
25
28
  .catch(error => logError({ message: '[DeploymentQueueClient] Could not send deployment request', error }))
26
29
  })
27
30
 
28
31
  }
29
32
 
30
33
  static pollForDeploymentRequests(deploymentPlatform: DeploymentPlatform, handleDeploymentRequest: (deploymentRequest: ContainerDeploymentRequest) => Promise<void>) {
31
- logInfo({ message: '[DeploymentQueueClient] Starting polling for deployment requests' })
34
+ logInfo({ message: '[DeploymentQueueClient] Starting polling for deployment requests' })
32
35
  DeploymentQueueClient.createAwsSqsClient(deploymentPlatform).then(sqsClient => {
33
36
  const FIVE_MINUTES = 3000
34
37