From 9144cc36b6b0fce4529998e2aaf2e004ff597d99 Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Tue, 3 Dec 2024 15:09:45 +0100 Subject: [PATCH] sync with recent code changes --- pages/aws/config/custom_overrides.mdx | 5 +---- pages/aws/config/overrides/converter.mdx | 2 +- pages/aws/contribute/local_run.mdx | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/pages/aws/config/custom_overrides.mdx b/pages/aws/config/custom_overrides.mdx index faac2ca..b873753 100644 --- a/pages/aws/config/custom_overrides.mdx +++ b/pages/aws/config/custom_overrides.mdx @@ -182,10 +182,10 @@ import type { APIGatewayProxyEventV2, APIGatewayProxyResultV2, } from "aws-lambda"; -import type { StreamCreator } from "@opennextjs/aws/http/openNextResponse.js"; import { Writable } from "node:stream"; import { WarmerEvent, WarmerResponse } from "@opennextjs/aws/adapters/warmer-function.js"; +import type { StreamCreator } from "@opennextjs/aws/types/open-next.js"; import type { WrapperHandler } from "@opennextjs/aws/types/overrides.js"; type AwsLambdaEvent = @@ -248,9 +248,6 @@ const handler: WrapperHandler = }, }); }, - onFinish: () => { - // Do nothing - }, }; const response = await handler(internalEvent, fakeStream); diff --git a/pages/aws/config/overrides/converter.mdx b/pages/aws/config/overrides/converter.mdx index ca2e624..8f1785f 100644 --- a/pages/aws/config/overrides/converter.mdx +++ b/pages/aws/config/overrides/converter.mdx @@ -5,5 +5,5 @@ If you want to better understand how to implement your own Converter, the easies Couple of things to note : - If you use a `StreamCreator` in your wrapper, you probably don't need to do anything in the `convertTo` function. - If used for the default, the image optimization, or one of the splitted server the internal types will be `InternalEvent` and `InternalResult` respectively. -- If used for the external middleware, the internal types will be `InternalEvent` and `InternalResult | MiddlewareOutputEvent` respectively. +- If used for the external middleware, the internal types will be `InternalEvent` and `InternalResult | MiddlewareResult` respectively. - For the other servers, look up their respective types in the codebase. \ No newline at end of file diff --git a/pages/aws/contribute/local_run.mdx b/pages/aws/contribute/local_run.mdx index f73d733..ec058eb 100644 --- a/pages/aws/contribute/local_run.mdx +++ b/pages/aws/contribute/local_run.mdx @@ -67,7 +67,7 @@ import express from 'express' import proxy from 'express-http-proxy' import { fork } from 'child_process' -import type { StreamCreator } from "@opennextjs/aws/http/openNextResponse.js"; +import type { StreamCreator } from "@opennextjs/aws/types/open-next.js"; import type { WrapperHandler } from "@opennextjs/aws/types/overrides.js"; const wrapper: WrapperHandler = async (handler, converter) => {