Skip to content

Commit

Permalink
change target dir
Browse files Browse the repository at this point in the history
  • Loading branch information
marjisound committed Jan 22, 2024
1 parent 5bf721a commit 7f141b8
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/api-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ jobs:
- packages/cdk/cdk.out/TranscriptionService-CODE.template.json
- packages/cdk/cdk.out/TranscriptionService-PROD.template.json
api:
- packages/cdk/api.zip
- packages/api/target/api.zip
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nodejs 20.11.0
20.11.0
5 changes: 5 additions & 0 deletions packages/api/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# dependencies
node_modules/

./dist
./target
2 changes: 1 addition & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"build": "esbuild --bundle --platform=node --target=node20 --outfile=dist/index.js index.ts",
"package": "cd dist; zip -qr ../../cdk/api.zip ./*"
"package": "cd dist; mkdir -p ../target; zip -qr ../target/api.zip ./*"
},
"keywords": [],
"author": "",
Expand Down
18 changes: 18 additions & 0 deletions packages/cdk/lib/transcription-service.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,27 @@
import type { GuStackProps } from "@guardian/cdk/lib/constructs/core";
import { GuStack } from "@guardian/cdk/lib/constructs/core";
import { GuApiLambda } from "@guardian/cdk";

Check failure on line 3 in packages/cdk/lib/transcription-service.ts

View workflow job for this annotation

GitHub Actions / ci

`@guardian/cdk` import should occur before type import of `@guardian/cdk/lib/constructs/core`
import type { App } from "aws-cdk-lib";
import { Runtime } from "aws-cdk-lib/aws-lambda";

export class TranscriptionService extends GuStack {
constructor(scope: App, id: string, props: GuStackProps) {
super(scope, id, props);

const APP_NAME = "transcription-service";

new GuApiLambda(this, "transcription-service-api", {
fileName: "api.zip",
handler: "index.js",
runtime: Runtime.NODEJS_20_X,
monitoringConfiguration: {
noMonitoring: true,
},
app: APP_NAME,
api: {
id: "my-api",
description: "...",
},
});
}
}

0 comments on commit 7f141b8

Please sign in to comment.