@ossy/deployment-tools 0.0.31 → 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/dist/index.js CHANGED
@@ -45550,12 +45550,8 @@ var TypeOfMessage;
45550
45550
  TypeOfMessage["Error"] = "ERROR";
45551
45551
  TypeOfMessage["Debug"] = "DEBUG";
45552
45552
  })(TypeOfMessage || (TypeOfMessage = {}));
45553
- const log = (...params) => {
45554
- console.log(...params);
45555
- };
45556
- function prefixTo(prefix, message) {
45557
- `[${prefix}]${message.startsWith('[') ? '' : ': '}`;
45558
- }
45553
+ const log = (...params) => { console.log(...params); };
45554
+ const prefixTo = (prefix, message) => `[${prefix}]${message.startsWith('[') ? '' : ': '}`;
45559
45555
  const logInfo = logInput => {
45560
45556
  const messagePrefix = prefixTo(TypeOfMessage.Info, logInput.message);
45561
45557
  log(`${messagePrefix}${logInput.message}`);
@@ -47977,6 +47973,7 @@ class AwsCredentialsClient {
47977
47973
  return core.getIDToken('sts.amazonaws.com')
47978
47974
  .then(webIdentityToken => {
47979
47975
  logInfo({ message: `[AwsCredentialsClient] Attempting to resolve aws credentials by assuming the role: ${awsRoleToAssume}` });
47976
+ logDebug({ message: '[AwsCredentialsClient] webIdentityToken', data: webIdentityToken });
47980
47977
  return stsClient.send(new client_sts_dist_cjs.AssumeRoleWithWebIdentityCommand({
47981
47978
  RoleArn: `arn:aws:iam::${awsAccountId}:role/${awsRoleToAssume}`,
47982
47979
  RoleSessionName: 'GitHubActions',
@@ -47984,12 +47981,15 @@ class AwsCredentialsClient {
47984
47981
  WebIdentityToken: webIdentityToken
47985
47982
  }));
47986
47983
  })
47987
- // .then(responseData => ({
47988
- // AccessKeyId: responseData.Credentials.AccessKeyId,
47989
- // SessionToken: responseData.Credentials.SessionToken,
47990
- // SecretAccessKey: responseData.Credentials.SecretAccessKey,
47991
- // }))
47992
- .then(responseData => responseData.Credentials)
47984
+ .then(responseData => ({
47985
+ AccessKeyId: responseData.Credentials.AccessKeyId,
47986
+ SessionToken: responseData.Credentials.SessionToken,
47987
+ SecretAccessKey: responseData.Credentials.SecretAccessKey,
47988
+ accessKeyId: responseData.Credentials.AccessKeyId,
47989
+ sessionToken: responseData.Credentials.SessionToken,
47990
+ secretAccessKey: responseData.Credentials.SecretAccessKey,
47991
+ }))
47992
+ // .then(responseData => responseData.Credentials)
47993
47993
  .then(data => {
47994
47994
  logDebug({ message: '[AwsCredentialsClient] AssumeRoleWithWebIdentityCommand responseData.Credentials', data });
47995
47995
  return data;
@@ -48010,10 +48010,12 @@ class DeploymentQueueClient {
48010
48010
  logInfo({ message: '[DeploymentQueueClient] Starting deployment sequence' });
48011
48011
  return DeploymentQueueClient.createAwsSqsClient(deploymentPlatform)
48012
48012
  .then(sqsClient => {
48013
- const command = new dist_cjs.SendMessageCommand({
48013
+ const sendMessageParams = {
48014
48014
  QueueUrl: deploymentPlatform.awsDeploymentSqsArn,
48015
48015
  MessageBody: JSON.stringify(deploymentRequest)
48016
- });
48016
+ };
48017
+ logDebug({ message: '[DeploymentQueueClient] SendMessageCommand params', data: sendMessageParams });
48018
+ const command = new dist_cjs.SendMessageCommand(sendMessageParams);
48017
48019
  return sqsClient.send(command)
48018
48020
  .then(() => logInfo({ message: '[DeploymentQueueClient] Deployment request sent' }))
48019
48021
  .catch(error => logError({ message: '[DeploymentQueueClient] Could not send deployment request', error }));