Skip to content
This repository was archived by the owner on May 31, 2023. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ jobs:
cache-dependency-path: cdk/package-lock.json
- run: npm install
- run: npm run fmt:check
- run: npm run lint
- run: npm run build
- run: npm test
- run: npm run cdk synth
Expand Down
13 changes: 13 additions & 0 deletions cdk/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"env": {
"es2021": true
},
"extends": ["standard-with-typescript", "prettier"],
"overrides": [],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"project": ["tsconfig.json"]
},
"ignorePatterns": ["cdk.out"]
}
3 changes: 2 additions & 1 deletion cdk/bin/cdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ import "source-map-support/register";
import * as cdk from "aws-cdk-lib";
import { BeeSlackAppStack } from "../lib/bee-slack-app-stack";

const stage = process.env.STAGE || "dev";
const stage = process.env.STAGE ?? "dev";

if (stage !== "dev" && stage !== "prod") {
throw new Error("stage value is not supported.");
}

const app = new cdk.App();

// eslint-disable-line no-new
new BeeSlackAppStack(app, `BeeSlackAppStack-${stage}`, {
stage,
isProduction: stage === "prod",
Expand Down
9 changes: 2 additions & 7 deletions cdk/lib/bee-slack-app-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@ import { LambdaIntegration, RestApi } from "aws-cdk-lib/aws-apigateway";
import { AttributeType, Table } from "aws-cdk-lib/aws-dynamodb";
import { Runtime, Function, Code, Handler } from "aws-cdk-lib/aws-lambda";
import { LambdaDestination } from "aws-cdk-lib/aws-logs-destinations";
import {
StackProps,
Stack,
RemovalPolicy,
SecretValue,
Duration,
} from "aws-cdk-lib";
import { type StackProps } from "aws-cdk-lib";
import { Stack, RemovalPolicy, SecretValue, Duration } from "aws-cdk-lib";
import { Secret } from "aws-cdk-lib/aws-secretsmanager";
import { Construct } from "constructs";
import { join } from "path";
Expand Down
Loading