@byaga/cdk-patterns 0.9.0 → 0.9.1

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.
@@ -3,5 +3,6 @@ export interface IStackArguments extends StackProps {
3
3
  stage: string;
4
4
  project: string;
5
5
  owner: string;
6
+ region: string;
6
7
  }
7
8
  export default IStackArguments;
@@ -4,6 +4,7 @@ import { IGrantable } from "aws-cdk-lib/aws-iam";
4
4
  import { IKey } from "aws-cdk-lib/aws-kms";
5
5
  interface SsmParameterOptions {
6
6
  decryptWithKey?: IKey;
7
+ parameterGroup?: string;
7
8
  }
8
9
  export declare class SsmParameter {
9
10
  parameterName: string;
@@ -12,7 +12,7 @@ class SsmParameter {
12
12
  constructor(stack, name, options) {
13
13
  if (name[0] !== '/')
14
14
  name = '/' + name;
15
- this.parameterName = `/${stack.name}${name}`;
15
+ this.parameterName = `/${options?.parameterGroup ?? stack.name}${name}`;
16
16
  this.parameterArn = `arn:aws:ssm:${stack.region}:${stack.account}:parameter${this.parameterName}`;
17
17
  this._stack = stack;
18
18
  this.decryptWithKey = options?.decryptWithKey;
@@ -90,7 +90,7 @@ class StaticWebSite {
90
90
  return {
91
91
  customOriginSource: {
92
92
  domainName: domainName,
93
- originPath: stack.stage,
93
+ originPath: `/${stack.stage}`,
94
94
  originProtocolPolicy: aws_cloudfront_1.OriginProtocolPolicy.HTTPS_ONLY
95
95
  },
96
96
  behaviors: [{
@@ -108,13 +108,9 @@ class StaticWebSite {
108
108
  "X-Trace-Id",
109
109
  "X-Span-Id",
110
110
  "X-Correlation-Id",
111
- 'Referrer',
112
111
  'Referer',
113
- 'Host',
114
112
  "User-Agent",
115
113
  "Accept-Language",
116
- "Cache-Control",
117
- 'X-Viewer-Country',
118
114
  'Content-Type',
119
115
  'Content-Length'
120
116
  ]
@@ -36,7 +36,6 @@ function emptyDirSync(parentFolder, options) {
36
36
  .forEach((file) => {
37
37
  try {
38
38
  fse.removeSync(file.fullpath());
39
- console.log('Deleted file:', file.fullpath());
40
39
  }
41
40
  catch (err) {
42
41
  console.error('Error deleting file:', err);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byaga/cdk-patterns",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "description": "Collection of common patterns used when making AWS CloudFormation templates using CDK",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",