@guardian/cdk 47.3.2 → 47.3.3

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.
@@ -1 +1 @@
1
- {"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../src/aspects/metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAG7C,qBAAa,QAAS,YAAW,OAAO;IACtC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;gBAGH,CAAC,EAAE,KAAK;IAQpB,KAAK,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI;CASrC"}
1
+ {"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../src/aspects/metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAG7C,qBAAa,QAAS,YAAW,OAAO;IACtC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;gBAGH,CAAC,EAAE,KAAK;IAapB,KAAK,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI;CASrC"}
@@ -8,7 +8,11 @@ class Metadata {
8
8
  this.stack = s;
9
9
  this.stack.templateOptions.metadata = {
10
10
  [constants_1.MetadataKeys.CONSTRUCTS_KEY]: [],
11
- [constants_1.MetadataKeys.VERSION]: constants_1.LibraryInfo.VERSION,
11
+ /*
12
+ `TrackingTag.Value` is a proxy to `LibraryInfo.VERSION`.
13
+ Intentionally using `TrackingTag.Value` so that the published mock can be used.
14
+ */
15
+ [constants_1.MetadataKeys.VERSION]: constants_1.TrackingTag.Value,
12
16
  };
13
17
  }
14
18
  visit(node) {
@@ -1 +1 @@
1
- {"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../src/aspects/metadata.ts"],"names":[],"mappings":";;;AAEA,4CAAyD;AAEzD,MAAa,QAAQ;IAGnB,iFAAiF;IACjF,YAAmB,CAAQ;QACzB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;QACf,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,QAAQ,GAAG;YACpC,CAAC,wBAAY,CAAC,cAAc,CAAC,EAAE,EAAE;YACjC,CAAC,wBAAY,CAAC,OAAO,CAAC,EAAE,uBAAW,CAAC,OAAO;SAC5C,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,IAAgB;QAC3B,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,QAAQ,CAAC;QACrD,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;QAEnC,+DAA+D;QAC/D,IAAI,QAAQ,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;YACpC,QAAQ,CAAC,wBAAY,CAAC,cAAc,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAChE;IACH,CAAC;CACF;AArBD,4BAqBC","sourcesContent":["import type { IAspect, Stack } from \"aws-cdk-lib\";\nimport type { IConstruct } from \"constructs\";\nimport { LibraryInfo, MetadataKeys } from \"../constants\";\n\nexport class Metadata implements IAspect {\n readonly stack: Stack;\n\n // eslint-disable-next-line custom-rules/valid-constructors -- doesn't apply here\n public constructor(s: Stack) {\n this.stack = s;\n this.stack.templateOptions.metadata = {\n [MetadataKeys.CONSTRUCTS_KEY]: [],\n [MetadataKeys.VERSION]: LibraryInfo.VERSION,\n };\n }\n\n public visit(node: IConstruct): void {\n const metadata = this.stack.templateOptions.metadata;\n const name = node.constructor.name;\n\n // We assume any construct named Gu* is part of our public API.\n if (metadata && name.startsWith(\"Gu\")) {\n (metadata[MetadataKeys.CONSTRUCTS_KEY] as string[]).push(name);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../src/aspects/metadata.ts"],"names":[],"mappings":";;;AAEA,4CAAyD;AAEzD,MAAa,QAAQ;IAGnB,iFAAiF;IACjF,YAAmB,CAAQ;QACzB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;QACf,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,QAAQ,GAAG;YACpC,CAAC,wBAAY,CAAC,cAAc,CAAC,EAAE,EAAE;YAEjC;;;eAGG;YACH,CAAC,wBAAY,CAAC,OAAO,CAAC,EAAE,uBAAW,CAAC,KAAK;SAC1C,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,IAAgB;QAC3B,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,QAAQ,CAAC;QACrD,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;QAEnC,+DAA+D;QAC/D,IAAI,QAAQ,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;YACpC,QAAQ,CAAC,wBAAY,CAAC,cAAc,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAChE;IACH,CAAC;CACF;AA1BD,4BA0BC","sourcesContent":["import type { IAspect, Stack } from \"aws-cdk-lib\";\nimport type { IConstruct } from \"constructs\";\nimport { MetadataKeys, TrackingTag } from \"../constants\";\n\nexport class Metadata implements IAspect {\n readonly stack: Stack;\n\n // eslint-disable-next-line custom-rules/valid-constructors -- doesn't apply here\n public constructor(s: Stack) {\n this.stack = s;\n this.stack.templateOptions.metadata = {\n [MetadataKeys.CONSTRUCTS_KEY]: [],\n\n /*\n `TrackingTag.Value` is a proxy to `LibraryInfo.VERSION`.\n Intentionally using `TrackingTag.Value` so that the published mock can be used.\n */\n [MetadataKeys.VERSION]: TrackingTag.Value,\n };\n }\n\n public visit(node: IConstruct): void {\n const metadata = this.stack.templateOptions.metadata;\n const name = node.constructor.name;\n\n // We assume any construct named Gu* is part of our public API.\n if (metadata && name.startsWith(\"Gu\")) {\n (metadata[MetadataKeys.CONSTRUCTS_KEY] as string[]).push(name);\n }\n }\n}\n"]}
@@ -6,7 +6,7 @@ const constants_1 = require("../../../constants");
6
6
  class GuParameter extends aws_cdk_lib_1.CfnParameter {
7
7
  constructor(scope, id, props) {
8
8
  super(scope, id, {
9
- ...(props.fromSSM && { default: "/$STAGE/$STACK/$APP/parameter" }),
9
+ ...(props.fromSSM && { default: "Add the SSM path as the default value e.g. /$stage/$stack/$app/$param" }),
10
10
  ...props,
11
11
  type: props.fromSSM ? `AWS::SSM::Parameter::Value<${props.type ?? "String"}>` : props.type,
12
12
  });
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../src/constructs/core/parameters/base.ts"],"names":[],"mappings":";;;AAAA,6CAA2C;AAE3C,kDAAkD;AAWlD,MAAa,WAAY,SAAQ,0BAAY;IAG3C,YAAY,KAAc,EAAE,EAAU,EAAE,KAAuB;QAC7D,KAAK,CAAC,KAAK,EAAE,EAAE,EAAE;YACf,GAAG,CAAC,KAAK,CAAC,OAAO,IAAI,EAAE,OAAO,EAAE,+BAA+B,EAAE,CAAC;YAClE,GAAG,KAAK;YACR,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,8BAA8B,KAAK,CAAC,IAAI,IAAI,QAAQ,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI;SAC3F,CAAC,CAAC;QAEH,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACf,CAAC;CACF;AAZD,kCAYC;AAED,MAAa,iBAAkB,SAAQ,WAAW;IAChD,YAAY,KAAc,EAAE,EAAU,EAAE,KAA6B;QACnE,KAAK,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,GAAG,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;IACjD,CAAC;CACF;AAJD,8CAIC;AAED,MAAa,cAAe,SAAQ,iBAAiB;IACnD,YAAY,KAAc,EAAE,EAAU,EAAE,KAA6B;QACnE,KAAK,CAAC,KAAK,EAAE,EAAE,EAAE;YACf,GAAG,KAAK;YACR,cAAc,EAAE,wBAAY,CAAC,GAAG;YAChC,qBAAqB,EAAE,8EAA8E;SACtG,CAAC,CAAC;IACL,CAAC;CACF;AARD,wCAQC","sourcesContent":["import { CfnParameter } from \"aws-cdk-lib\";\nimport type { CfnParameterProps } from \"aws-cdk-lib\";\nimport { RegexPattern } from \"../../../constants\";\nimport type { AppIdentity } from \"../identity\";\nimport type { GuStack } from \"../stack\";\n\nexport interface GuParameterProps extends CfnParameterProps {\n fromSSM?: boolean;\n}\n\nexport type GuNoTypeParameterProps = Omit<GuParameterProps, \"type\">;\nexport type GuNoTypeParameterPropsWithAppIdentity = Omit<GuParameterProps, \"type\"> & AppIdentity;\n\nexport class GuParameter extends CfnParameter {\n public readonly id: string;\n\n constructor(scope: GuStack, id: string, props: GuParameterProps) {\n super(scope, id, {\n ...(props.fromSSM && { default: \"/$STAGE/$STACK/$APP/parameter\" }),\n ...props,\n type: props.fromSSM ? `AWS::SSM::Parameter::Value<${props.type ?? \"String\"}>` : props.type,\n });\n\n this.id = id;\n }\n}\n\nexport class GuStringParameter extends GuParameter {\n constructor(scope: GuStack, id: string, props: GuNoTypeParameterProps) {\n super(scope, id, { ...props, type: \"String\" });\n }\n}\n\nexport class GuArnParameter extends GuStringParameter {\n constructor(scope: GuStack, id: string, props: GuNoTypeParameterProps) {\n super(scope, id, {\n ...props,\n allowedPattern: RegexPattern.ARN,\n constraintDescription: \"Must be a valid ARN, eg: arn:partition:service:region:account-id:resource-id\",\n });\n }\n}\n"]}
1
+ {"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../src/constructs/core/parameters/base.ts"],"names":[],"mappings":";;;AAAA,6CAA2C;AAE3C,kDAAkD;AAWlD,MAAa,WAAY,SAAQ,0BAAY;IAG3C,YAAY,KAAc,EAAE,EAAU,EAAE,KAAuB;QAC7D,KAAK,CAAC,KAAK,EAAE,EAAE,EAAE;YACf,GAAG,CAAC,KAAK,CAAC,OAAO,IAAI,EAAE,OAAO,EAAE,uEAAuE,EAAE,CAAC;YAC1G,GAAG,KAAK;YACR,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,8BAA8B,KAAK,CAAC,IAAI,IAAI,QAAQ,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI;SAC3F,CAAC,CAAC;QAEH,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACf,CAAC;CACF;AAZD,kCAYC;AAED,MAAa,iBAAkB,SAAQ,WAAW;IAChD,YAAY,KAAc,EAAE,EAAU,EAAE,KAA6B;QACnE,KAAK,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,GAAG,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;IACjD,CAAC;CACF;AAJD,8CAIC;AAED,MAAa,cAAe,SAAQ,iBAAiB;IACnD,YAAY,KAAc,EAAE,EAAU,EAAE,KAA6B;QACnE,KAAK,CAAC,KAAK,EAAE,EAAE,EAAE;YACf,GAAG,KAAK;YACR,cAAc,EAAE,wBAAY,CAAC,GAAG;YAChC,qBAAqB,EAAE,8EAA8E;SACtG,CAAC,CAAC;IACL,CAAC;CACF;AARD,wCAQC","sourcesContent":["import { CfnParameter } from \"aws-cdk-lib\";\nimport type { CfnParameterProps } from \"aws-cdk-lib\";\nimport { RegexPattern } from \"../../../constants\";\nimport type { AppIdentity } from \"../identity\";\nimport type { GuStack } from \"../stack\";\n\nexport interface GuParameterProps extends CfnParameterProps {\n fromSSM?: boolean;\n}\n\nexport type GuNoTypeParameterProps = Omit<GuParameterProps, \"type\">;\nexport type GuNoTypeParameterPropsWithAppIdentity = Omit<GuParameterProps, \"type\"> & AppIdentity;\n\nexport class GuParameter extends CfnParameter {\n public readonly id: string;\n\n constructor(scope: GuStack, id: string, props: GuParameterProps) {\n super(scope, id, {\n ...(props.fromSSM && { default: \"Add the SSM path as the default value e.g. /$stage/$stack/$app/$param\" }),\n ...props,\n type: props.fromSSM ? `AWS::SSM::Parameter::Value<${props.type ?? \"String\"}>` : props.type,\n });\n\n this.id = id;\n }\n}\n\nexport class GuStringParameter extends GuParameter {\n constructor(scope: GuStack, id: string, props: GuNoTypeParameterProps) {\n super(scope, id, { ...props, type: \"String\" });\n }\n}\n\nexport class GuArnParameter extends GuStringParameter {\n constructor(scope: GuStack, id: string, props: GuNoTypeParameterProps) {\n super(scope, id, {\n ...props,\n allowedPattern: RegexPattern.ARN,\n constraintDescription: \"Must be a valid ARN, eg: arn:partition:service:region:account-id:resource-id\",\n });\n }\n}\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@guardian/cdk",
3
3
  "description": "Generic Guardian flavoured AWS CDK components",
4
- "version": "47.3.2",
4
+ "version": "47.3.3",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
7
7
  "files": [