Skip to content

Commit 2730076

Browse files
committed
Fix ts errors
1 parent 03d7764 commit 2730076

File tree

3 files changed

+3077
-9
lines changed

3 files changed

+3077
-9
lines changed

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
"prepare": "docker-compose run --rm serverless npm rebuild"
55
},
66
"devDependencies": {
7-
"@types/node": "^7.0.0",
8-
"@types/aws-lambda": "^0.0.10",
9-
"ava": "^0.17.0",
10-
"serverless-plugin-typescript": "^0.2.0"
7+
"@types/aws-lambda": "^0.0.15",
8+
"@types/node": "^8.0.16",
9+
"ava": "^0.21.0",
10+
"serverless-plugin-typescript": "^1.0.0"
1111
},
1212
"dependencies": {
1313
"aws-sdk": "^2.7.27",
14-
"lambda-helpers": "^0.1.0",
15-
"sharp": "^0.17.1",
1614
"graphql-request": "^1.1.2",
15+
"lambda-helpers": "^0.2.1",
16+
"sharp": "^0.18.2",
1717
"source-map-support": "^0.4.15"
1818
}
1919
}

src/handler.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ export default callbackRuntime(async (event: APIGatewayEvent) => {
1616

1717
try {
1818
// log projectId of projects using the old API version
19-
const client = new GraphQLClient(process.env.GRAPHCOOL_ENDPOINT, {
19+
const client = new GraphQLClient(process.env['GRAPHCOOL_ENDPOINT']!, {
2020
headers: {
21-
Authorization: `Bearer ${process.env.GRAPHCOOL_PAT}`,
21+
Authorization: `Bearer ${process.env['GRAPHCOOL_PAT']}`,
2222
}
2323
})
2424

@@ -51,7 +51,7 @@ export default callbackRuntime(async (event: APIGatewayEvent) => {
5151
const {projectId, fileSecret, crop, resize} = params!
5252

5353
const options = {
54-
Bucket: process.env.BUCKET_NAME,
54+
Bucket: process.env['BUCKET_NAME']!,
5555
Key: `${projectId}/${fileSecret}`,
5656
}
5757

0 commit comments

Comments
 (0)