@ossy/deployment-tools 0.0.29 → 0.0.30

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.29",
3
+ "version": "0.0.30",
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,7 +6,8 @@ import {
6
6
  ContainerDeploymentRequest,
7
7
  DeploymentTemplate,
8
8
  ContainerDeploymentTemplate,
9
- SupportedDeploymentTypes
9
+ SupportedDeploymentTypes,
10
+ SupportedRegions
10
11
  } from 'types'
11
12
  import { CaddyClient } from './caddy-client'
12
13
  import { DockerClient } from './docker-client'
@@ -125,7 +126,8 @@ export class DeploymentPlatformClient {
125
126
  ciInternalServerPort: 3000,
126
127
  ciServerName: 'ci-client',
127
128
  ciDockerNetworkName: 'deployment-tools',
128
- // awsRoleToAssume: 'github-ci-role',
129
+ awsRegion: SupportedRegions.North,
130
+ // awsRoleToAssume: 'github-ci-role', //todo: find a way to have this a a default value and still keep the same logic when resolving aws credentials
129
131
  ...deploymentPlatform
130
132
  }
131
133
  }
@@ -11,7 +11,7 @@ import { log } from 'log'
11
11
  export class DeploymentQueueClient {
12
12
 
13
13
  static sendDeploymentRequest(deploymentPlatform: DeploymentPlatform, deploymentRequest: ContainerDeploymentRequest) {
14
- log({ type: 'info', message: '[DeploymentQueueClient] Sending deployment request...' })
14
+ log({ type: 'info', message: '[DeploymentQueueClient] Starting deployment sequence' })
15
15
  return DeploymentQueueClient.createAwsSqsClient(deploymentPlatform)
16
16
  .then(sqsClient => {
17
17
 
package/src/log/index.ts CHANGED
@@ -7,5 +7,5 @@ interface LogInput {
7
7
  export const log = ({ type, message, error }: LogInput = { type: 'info', message: '' }) => {
8
8
  const messagePrefix = `[${type.toUpperCase()}]${message.startsWith('[') ? '' : ': '}`
9
9
  console.log(`${messagePrefix}${message}`)
10
- error && console.log('[Reason]:', error)
10
+ error && console.log('\n[Reason]:', error, '\n')
11
11
  }
@@ -3,7 +3,7 @@ export interface DeploymentPlatformTemplate {
3
3
  domain: string;
4
4
  supportedDeploymentTypes: SupportedDeploymentTypes[];
5
5
  supportedEnvironments: SupportedEnvironments[];
6
- awsRegion: string;
6
+ awsRegion?: string;
7
7
  awsAccountId: string;
8
8
  awsKeyPairName?: string;
9
9
  awsRoleToAssume?: string;