-
-
Notifications
You must be signed in to change notification settings - Fork 374
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
002f91e
commit 62297d4
Showing
4 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
index.mjs | ||
llrt | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import middy from '@middy/core' | ||
// import appconfigMiddleware from '@middy/appconfig' | ||
// import cloudwatchMetricsMiddleware from '@middy/cloudwatch-metrics' | ||
// import doNotWaitForEmptyEventLoopMiddleware from '@middy/do-not-wait-for-empty-event-loop' | ||
// import dynamodbMiddleware from '@middy/dynamodb' | ||
// import errorLoggerMiddleware from '@middy/error-logger' | ||
// import eventNormalizerMiddleware from '@middy/event-normalizer' | ||
// import httpContentEncodingMiddleware from '@middy/http-content-encoding' | ||
// import httpContentNegotiationMiddleware from '@middy/http-content-negotiation' | ||
// import httpCorsMiddleware from '@middy/http-cors' | ||
// import httpErrorHandlerMiddleware from '@middy/http-error-handler' | ||
// import httpEventNormalizerMiddleware from '@middy/http-event-normalizer' | ||
// TODO add in all | ||
|
||
const baseHandler = async (event, context, { signal }) => { | ||
return {} | ||
} | ||
export const handler = middy() | ||
// .use(appconfigMiddleware()) | ||
// .use(cloudwatchMetricsMiddleware()) | ||
// .use(doNotWaitForEmptyEventLoopMiddleware()) | ||
// .use(dynamodbMiddleware()) | ||
// .use(errorLoggerMiddleware()) | ||
// .use(validatorMiddleware()) | ||
.handler(baseHandler) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"name": "llrt", | ||
"version": "0.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"build": "esbuild index.js --platform=node --target=es2020 --format=esm --bundle --minify --external:@aws-sdk --external:@smithy --external:uuid --outfile=index.mjs", | ||
"test": "npm run build && ./llrt index.mjs", | ||
"download:ci": "curl -L https://github.com/awslabs/llrt/releases/download/v0.1.14-beta/llrt-linux-x64.zip | bsdtar -xvf - -C ./ && chmod +x llrt", | ||
"download:macos": "curl -L https://github.com/awslabs/llrt/releases/download/v0.1.14-beta/llrt-darwin-arm64.zip | bsdtar -xvf - -C ./ && chmod +x llrt" | ||
}, | ||
"author": "", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@middy/core": "file:../packages/core", | ||
"@middy/do-not-wait-for-empty-event-loop": "file:../packages/core", | ||
"@middy/validator": "file:../packages/core" | ||
}, | ||
"devDependencies": { | ||
"esbuild": "0.21.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters