@certik/serverless-api 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 1.0.5
2
+
3
+ - fixed cors preflight
4
+
1
5
  # 1.0.4
2
6
 
3
7
  - fixed entrypoint routes loading
package/entrypoint.js CHANGED
@@ -7,9 +7,7 @@ import pathModule from "node:path";
7
7
  import { getRoutes } from "./lib/routes.js";
8
8
 
9
9
  export const handler = async (event, context) => {
10
- const routes = await getRoutes(
11
- pathModule.resolve("routes"),
12
- );
10
+ const routes = await getRoutes(pathModule.resolve("routes"));
13
11
 
14
12
  const currentRoute = routes.find((route) => {
15
13
  return (
@@ -43,6 +41,7 @@ export const handler = async (event, context) => {
43
41
  {
44
42
  ...event,
45
43
  body,
44
+ isBase64Encoded: false,
46
45
  },
47
46
  context,
48
47
  );
package/lib/cors.js CHANGED
@@ -3,6 +3,8 @@ export function corsPreflight() {
3
3
  name: "cors-preflight",
4
4
  path: "/{proxy+}",
5
5
  method: "OPTIONS",
6
+ timeout: 10,
7
+ memorySize: 128,
6
8
  handler: async () => {
7
9
  return {
8
10
  body: "",
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "author": "CertiK Engineering",
5
5
  "type": "module",
6
6
  "main": "index.js",
7
- "version": "1.0.4",
7
+ "version": "1.0.5",
8
8
  "scripts": {
9
9
  "start": "doppler run -- nodemon start-dev.js",
10
10
  "lint": "eslint lib test routes *.js",