@ndlib/ndlib-cdk2 1.0.36 → 1.0.38

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/README.md CHANGED
@@ -113,7 +113,7 @@ if(props.slackChannelId){
113
113
  // messageText: 'example of additional message text', // optional
114
114
  slackChannelId: props.slackChannelId,
115
115
  slackChannelName: props.slackChannelName,
116
- // slackNotifyTopicArn: 'some valid topic arn', // optional, defaults to: Fn.importValue('slack-pipeline-status-notify:TopicArn')
116
+ slackNotifyTopicArn: 'some valid topic arn',
117
117
  })
118
118
  }
119
119
  ```
@@ -424,8 +424,8 @@ import { Topic } from 'aws-cdk-lib/aws-sns'
424
424
 
425
425
  ...
426
426
  // Create a Topic
427
- const importedSlackNotifyTopicArn = Fn.importValue(props.slackNotifyTopicOutput)
428
- const approvalTopic = Topic.fromTopicArn(this, 'SlackTopicFromArn', importedSlackNotifyTopicArn)
427
+ const slackNotifyTopicArn = StringParameter.valueForStringParameter(this, props.slackNotifyTopicArnParameterPath)
428
+ const approvalTopic = Topic.fromTopicArn(this, 'SlackTopicFromArn', slackNotifyTopicArn)
429
429
 
430
430
  // Call the SlackIntegratedManualApproval
431
431
  const approveTestStackAction = new SlackIntegratedManualApproval({
package/lib/https-alb.js CHANGED
@@ -23,7 +23,7 @@ class HttpsAlb extends aws_cdk_lib_1.aws_elasticloadbalancingv2.ApplicationLoadB
23
23
  open: true,
24
24
  port: 443,
25
25
  protocol: aws_cdk_lib_1.aws_elasticloadbalancingv2.ApplicationProtocol.HTTPS,
26
- sslPolicy: aws_cdk_lib_1.aws_elasticloadbalancingv2.SslPolicy.TLS13_EXT2,
26
+ sslPolicy: aws_cdk_lib_1.aws_elasticloadbalancingv2.SslPolicy.TLS13_RES,
27
27
  });
28
28
  this.defaultListener.addAction('Default404', { action: aws_cdk_lib_1.aws_elasticloadbalancingv2.ListenerAction.fixedResponse(404) });
29
29
  // Adding an output of the dns name for convenience when looking at this
@@ -20,12 +20,12 @@
20
20
  "node": ">=22.0.0"
21
21
  },
22
22
  "devDependencies": {
23
- "@aws-sdk/client-codepipeline": "^3.835.0",
24
- "@aws-sdk/client-ssm": "^3.835.0"
23
+ "@aws-sdk/client-codepipeline": "^3.840.0",
24
+ "@aws-sdk/client-ssm": "^3.840.0"
25
25
  },
26
26
  "dependencies": {
27
- "@aws-sdk/client-codepipeline": "^3.835.0",
28
- "@aws-sdk/client-ssm": "^3.835.0",
27
+ "@aws-sdk/client-codepipeline": "^3.840.0",
28
+ "@aws-sdk/client-ssm": "^3.840.0",
29
29
  "glob": "^11.0.3",
30
30
  "multimatch": "5.0.0",
31
31
  "cross-spawn": "^7.0.6"
@@ -5,7 +5,7 @@ export interface ISlackPipelineStatusNotificationsProps extends StackProps {
5
5
  readonly messageText?: string;
6
6
  readonly slackChannelId: string;
7
7
  readonly slackChannelName?: string;
8
- readonly slackNotifyTopicArn?: string;
8
+ readonly slackNotifyTopicArn: string;
9
9
  }
10
10
  export interface ISlackPipelineStatusNotificationsData {
11
11
  eventInfo: string;
@@ -11,8 +11,7 @@ class SlackPipelineStatusNotifications extends constructs_1.Construct {
11
11
  const pipelineName = aws_cdk_lib_1.aws_events.EventField.fromPath('$.detail.pipeline');
12
12
  const pipelineState = aws_cdk_lib_1.aws_events.EventField.fromPath('$.detail.state');
13
13
  const pipelineBaseUrl = aws_cdk_lib_1.Fn.sub('https://${AWS::Region}.console.aws.amazon.com/codepipeline/home?region=${AWS::Region}#/view/');
14
- // eslint-disable-next-line max-len
15
- const testStackApprovalTopic = aws_sns_1.Topic.fromTopicArn(this, 'SlackTopicFromArn', props.slackNotifyTopicArn || aws_cdk_lib_1.Fn.importValue('slack-pipeline-status-notify:TopicArn'));
14
+ const testStackApprovalTopic = aws_sns_1.Topic.fromTopicArn(this, 'SlackTopicFromArn', props.slackNotifyTopicArn);
16
15
  const SlackPipelineStatusNotificationsData = {
17
16
  eventInfo: eventInfo,
18
17
  messageText: props.messageText,
@@ -30,7 +30,8 @@ export interface ISourceWatcherProps {
30
30
  /**
31
31
  * Stack name for aws-github-webhook. Needed in order to create a webhook on targetRepo.
32
32
  */
33
- readonly webhookResourceStackName: string;
33
+ readonly webhookResourceStackName?: string;
34
+ readonly webhookResourceArnParameterPath?: string;
34
35
  }
35
36
  export declare class SourceWatcher extends Construct {
36
37
  /**
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SourceWatcher = void 0;
4
4
  const aws_cdk_lib_1 = require("aws-cdk-lib");
5
5
  const constructs_1 = require("constructs");
6
+ const aws_ssm_1 = require("aws-cdk-lib/aws-ssm");
6
7
  const path = require("path");
7
8
  class SourceWatcher extends constructs_1.Construct {
8
9
  constructor(scope, id, props) {
@@ -55,8 +56,18 @@ class SourceWatcher extends constructs_1.Construct {
55
56
  handler: this.lambdaFunction,
56
57
  proxy: true,
57
58
  });
59
+ // Added the following code to get the WebhookLambdaArn from either a parameter store path or a stack name. (Used to be only from stack name)
60
+ let githubWebhookLambdaArn = '';
61
+ if (props.webhookResourceArnParameterPath) {
62
+ githubWebhookLambdaArn = aws_ssm_1.StringParameter.valueForStringParameter(this, props.webhookResourceArnParameterPath);
63
+ }
64
+ if (!githubWebhookLambdaArn && props.webhookResourceStackName) {
65
+ githubWebhookLambdaArn = aws_cdk_lib_1.Fn.importValue(`${props.webhookResourceStackName}:LambdaArn`);
66
+ }
67
+ if (!githubWebhookLambdaArn) {
68
+ throw new Error('You must provide a webhookResourceArnParameterPath or webhookResourceStackName to create a GitHub webhook.');
69
+ }
58
70
  // Finally, create the Webhook on GitHub to route push events to the API!
59
- const githubWebhookLambdaArn = aws_cdk_lib_1.Fn.importValue(`${props.webhookResourceStackName}:LambdaArn`);
60
71
  const webhookLambda = aws_cdk_lib_1.aws_lambda.Function.fromFunctionAttributes(this, 'GithubWebhookLambda', {
61
72
  functionArn: githubWebhookLambdaArn,
62
73
  skipPermissions: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndlib/ndlib-cdk2",
3
- "version": "1.0.36",
3
+ "version": "1.0.38",
4
4
  "description": "Reusable CDK2 modules used within Hesburgh Libraries of Notre Dame",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -37,24 +37,24 @@
37
37
  },
38
38
  "homepage": "https://github.com/ndlibrary/ndlib-cdk2#readme",
39
39
  "peerDependencies": {
40
- "aws-cdk-lib": "^2.202.0"
40
+ "aws-cdk-lib": "^2.206.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/jest": "^29.5.14",
44
- "@types/node": "^24.0.4",
45
- "@typescript-eslint/eslint-plugin": "^8.35.0",
46
- "@typescript-eslint/parser": "^8.35.0",
44
+ "@types/node": "^24.0.11",
45
+ "@typescript-eslint/eslint-plugin": "^8.36.0",
46
+ "@typescript-eslint/parser": "^8.36.0",
47
47
  "aws-sdk-client-mock": "^4.1.0",
48
- "eslint": "^9.29.0",
48
+ "eslint": "^9.30.1",
49
49
  "eslint-plugin-import": "^2.32.0",
50
- "eslint-plugin-jest": "^20.0.1",
51
- "eslint-plugin-n": "^17.20.0",
50
+ "eslint-plugin-jest": "^29.0.1",
51
+ "eslint-plugin-n": "^17.21.0",
52
52
  "eslint-plugin-node": "^11.1.0",
53
53
  "eslint-plugin-promise": "^7.2.1",
54
54
  "github-changes": "^2.0.3",
55
55
  "jest": "^29.7.0",
56
56
  "jest-mock": "^30.0.2",
57
- "prettier": "^3.6.1",
57
+ "prettier": "^3.6.2",
58
58
  "ts-jest": "^29.4.0",
59
59
  "tsc-watch": "^7.1.1",
60
60
  "typescript": "^5.8.3"
@@ -63,7 +63,7 @@
63
63
  "lib/**/*"
64
64
  ],
65
65
  "dependencies": {
66
- "aws-cdk-lib": "^2.202.0",
66
+ "aws-cdk-lib": "^2.206.0",
67
67
  "constructs": "^10.4.2"
68
68
  },
69
69
  "workspaces": [