Skip to content

Commit

Permalink
fix cdk deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerschloesser committed Feb 22, 2024
1 parent ef7c2b4 commit b55fc05
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 34 deletions.
1 change: 0 additions & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion packages/cdk/cdk.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"app": "npx ts-node --prefer-ts-exts src/index.ts"
"app": "node --no-warnings --loader ts-node/esm src/index.ts"
}
2 changes: 1 addition & 1 deletion packages/cdk/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@hrs-website/cdk",
"version": "0.1.0",
"type": "module",
"scripts": {
"deploy": "cdk deploy"
},
"devDependencies": {
"@types/node": "^20.11.4",
"ts-node": "^10.9.2",
"typescript": "^5.3.3"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/cdk/src/cdk-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { Construct } from 'constructs'
import {
WEBPACK_MANIFEST_FILE_NAME,
getDefaultRootObject,
} from './webpack-manifest'
} from './webpack-manifest.js'

const DIST_PATH = '../app/dist'

Expand Down
13 changes: 1 addition & 12 deletions packages/cdk/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/usr/bin/env node
import 'source-map-support/register'
import * as cdk from 'aws-cdk-lib'
import { CdkStack } from './cdk-stack'
import { CdkStack } from './cdk-stack.js'

const stage = process.env.STAGE?.toLowerCase()
if (!stage) {
Expand All @@ -17,14 +15,5 @@ function capitalize(str: string) {

const app = new cdk.App()
new CdkStack(app, `OrgHaitianRelief${capitalize(stage)}`, {
/* If you don't specify 'env', this stack will be environment-agnostic.
* Account/Region-dependent features and context lookups will not work,
* but a single synthesized template can be deployed anywhere. */
/* Uncomment the next line to specialize this stack for the AWS Account
* and Region that are implied by the current CLI configuration. */
// env: { account: process.env.CDK_DEFAULT_ACCOUNT, region: process.env.CDK_DEFAULT_REGION },
/* Uncomment the next line if you know exactly what Account and Region you
* want to deploy the stack to. */
env: { account: '063257577013', region: 'us-east-1' },
/* For more information, see https://docs.aws.amazon.com/cdk/latest/guide/environments.html */
})
29 changes: 11 additions & 18 deletions packages/cdk/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
{
"compilerOptions": {
"target": "ES2018",
"module": "commonjs",
"lib": ["es2018"],
"declaration": true,
"target": "es2022",
"module": "nodenext",
"moduleResolution": "nodenext",
"sourceMap": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"noImplicitThis": true,
"alwaysStrict": true,
"noUnusedLocals": false,
"noUnusedParameters": false,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": false,
"inlineSourceMap": true,
"inlineSources": true,
"experimentalDecorators": true,
"strictPropertyInitialization": false,
"typeRoots": ["./node_modules/@types"]
"skipLibCheck": true,
"noUncheckedIndexedAccess": true
},
"exclude": ["node_modules", "cdk.out"]
"ts-node": {
"esm": true
}
}

0 comments on commit b55fc05

Please sign in to comment.