Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Katafalkas support nested stacks #384

Merged
merged 13 commits into from
Sep 18, 2020
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [4.2.3] - 2020-09-18

### Changed
- Added support for using CloudFormation nested stacks. Thank you @Katafalkas ([#235](https://github.com/amplify-education/serverless-domain-manager/pull/235))

## [4.2.2] - 2020-09-16

### Changed
Expand All @@ -12,7 +17,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [4.2.1] - 2020-09-16

### Changed
- Added support for using CloudFormation Fn::ImportValue. Thank you @sampsasaarela ([#220](https://github.com/amplify-education/serverless-domain-manager/pull/220)), @rddimon ([#380](https://github.com/amplify-education/serverless-domain-manager/pull/380))
- Added support for using CloudFormation Fn::ImportValue. Thank you @sampsasaarela ([#220](https://github.com/amplify-education/serverless-domain-manager/pull/220))

## [4.2.0] - 2020-07-14

Expand Down
122 changes: 45 additions & 77 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "serverless-domain-manager",
"version": "4.2.2",
"version": "4.2.3",
"engines": {
"node": ">=4.0"
},
Expand Down Expand Up @@ -36,7 +36,7 @@
"*.js",
"*.ts",
"*.json",
"dist"
"dist/**/*.js"
],
"nyc": {
"extension": [
Expand All @@ -47,7 +47,7 @@
"@types/chai": "^4.2.12",
"@types/chai-spies": "^1.0.2",
"@types/mocha": "^5.2.7",
"@types/node": "^12.12.58",
"@types/node": "^12.12.62",
"aws-sdk-mock": "^1.7.0",
"chai": "^3.5.0",
"chai-spies": "^1.0.0",
Expand All @@ -59,6 +59,7 @@
"request": "^2.88.2",
"request-promise-native": "^1.0.9",
"serverless": "^1.83.0",
"serverless-plugin-split-stacks": "^1.9.3",
"shelljs": "^0.8.4",
"ts-node": "^8.10.2",
"tslint": "^5.20.1",
Expand All @@ -67,7 +68,7 @@
"wrappy": "^1.0.2"
},
"dependencies": {
"aws-sdk": "^2.752.0",
"aws-sdk": "^2.755.0",
"chalk": "^2.4.2"
}
}
34 changes: 33 additions & 1 deletion src/Globals.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ServerlessInstance, ServerlessOptions } from "./types";
import {ServerlessInstance, ServerlessOptions} from "./types";

export default class Globals {

Expand All @@ -20,4 +20,36 @@ export default class Globals {
tls_1_0: "TLS_1_0",
tls_1_2: "TLS_1_2",
};

/**
* Logs error message
* @param message: message to be printed
* @param domain: domain name
* @param debug: if true then show log only if SLS_DEBUG enabled on else anytime
*/
public static logError(message: any, domain?: string, debug?: boolean): void {
debug = debug === undefined ? true : debug;
const canLog = debug && process.env.SLS_DEBUG || !debug;
if (canLog) {
Globals.serverless.cli.log(
`Error: ${domain ? domain + ": " : ""} ${message}`, "Serverless Domain Manager",
);
}
}

/**
* Logs info message
* @param message: message to be printed
* @param domain: domain name
* @param debug: if true then show log only if SLS_DEBUG enabled on else anytime
*/
public static logInfo(message: any, domain?: string, debug?: boolean): void {
debug = debug === undefined ? true : debug;
const canLog = debug && process.env.SLS_DEBUG || !debug;
if (canLog) {
Globals.serverless.cli.log(
`Info: ${domain ? domain + ": " : ""} ${message}`, "Serverless Domain Manager",
);
}
}
}