@opennextjs/aws 3.1.4
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/LICENSE +21 -0
- package/README.md +94 -0
- package/dist/adapters/binary.d.ts +1 -0
- package/dist/adapters/binary.js +63 -0
- package/dist/adapters/cache.d.ts +96 -0
- package/dist/adapters/cache.js +278 -0
- package/dist/adapters/config/index.d.ts +27 -0
- package/dist/adapters/config/index.js +21 -0
- package/dist/adapters/config/util.d.ts +28 -0
- package/dist/adapters/config/util.js +84 -0
- package/dist/adapters/dynamo-provider.d.ts +8 -0
- package/dist/adapters/dynamo-provider.js +42 -0
- package/dist/adapters/edge-adapter.d.ts +8 -0
- package/dist/adapters/edge-adapter.js +54 -0
- package/dist/adapters/image-optimization-adapter.d.ts +4 -0
- package/dist/adapters/image-optimization-adapter.js +193 -0
- package/dist/adapters/logger.d.ts +13 -0
- package/dist/adapters/logger.js +51 -0
- package/dist/adapters/middleware.d.ts +5 -0
- package/dist/adapters/middleware.js +84 -0
- package/dist/adapters/plugins/14.1/util.d.ts +1 -0
- package/dist/adapters/plugins/14.1/util.js +29 -0
- package/dist/adapters/plugins/image-optimization/image-optimization.d.ts +11 -0
- package/dist/adapters/plugins/image-optimization/image-optimization.js +14 -0
- package/dist/adapters/plugins/image-optimization/image-optimization.replacement.d.ts +11 -0
- package/dist/adapters/plugins/image-optimization/image-optimization.replacement.js +22 -0
- package/dist/adapters/plugins/without-routing/requestHandler.d.ts +2 -0
- package/dist/adapters/plugins/without-routing/requestHandler.js +10 -0
- package/dist/adapters/revalidate.d.ts +9 -0
- package/dist/adapters/revalidate.js +71 -0
- package/dist/adapters/server-adapter.d.ts +4 -0
- package/dist/adapters/server-adapter.js +27 -0
- package/dist/adapters/util.d.ts +10 -0
- package/dist/adapters/util.js +28 -0
- package/dist/adapters/warmer-function.d.ts +12 -0
- package/dist/adapters/warmer-function.js +80 -0
- package/dist/build/bundleNextServer.d.ts +1 -0
- package/dist/build/bundleNextServer.js +87 -0
- package/dist/build/compileConfig.d.ts +3 -0
- package/dist/build/compileConfig.js +64 -0
- package/dist/build/copyTracedFiles.d.ts +1 -0
- package/dist/build/copyTracedFiles.js +207 -0
- package/dist/build/createServerBundle.d.ts +3 -0
- package/dist/build/createServerBundle.js +228 -0
- package/dist/build/edge/createEdgeBundle.d.ts +20 -0
- package/dist/build/edge/createEdgeBundle.js +149 -0
- package/dist/build/generateOutput.d.ts +2 -0
- package/dist/build/generateOutput.js +239 -0
- package/dist/build/helper.d.ts +33 -0
- package/dist/build/helper.js +193 -0
- package/dist/build/patch/patchedAsyncStorage.d.ts +5 -0
- package/dist/build/patch/patchedAsyncStorage.js +16 -0
- package/dist/build/validateConfig.d.ts +2 -0
- package/dist/build/validateConfig.js +76 -0
- package/dist/build.d.ts +7 -0
- package/dist/build.js +533 -0
- package/dist/cache/incremental/s3-lite.d.ts +3 -0
- package/dist/cache/incremental/s3-lite.js +72 -0
- package/dist/cache/incremental/s3.d.ts +3 -0
- package/dist/cache/incremental/s3.js +44 -0
- package/dist/cache/incremental/types.d.ts +34 -0
- package/dist/cache/incremental/types.js +1 -0
- package/dist/cache/next-types.d.ts +62 -0
- package/dist/cache/next-types.js +1 -0
- package/dist/cache/tag/constants.d.ts +2 -0
- package/dist/cache/tag/constants.js +17 -0
- package/dist/cache/tag/dynamodb-lite.d.ts +3 -0
- package/dist/cache/tag/dynamodb-lite.js +174 -0
- package/dist/cache/tag/dynamodb.d.ts +3 -0
- package/dist/cache/tag/dynamodb.js +129 -0
- package/dist/cache/tag/types.d.ts +11 -0
- package/dist/cache/tag/types.js +1 -0
- package/dist/converters/aws-apigw-v1.d.ts +3 -0
- package/dist/converters/aws-apigw-v1.js +89 -0
- package/dist/converters/aws-apigw-v2.d.ts +3 -0
- package/dist/converters/aws-apigw-v2.js +99 -0
- package/dist/converters/aws-cloudfront.d.ts +3 -0
- package/dist/converters/aws-cloudfront.js +170 -0
- package/dist/converters/dummy.d.ts +7 -0
- package/dist/converters/dummy.js +16 -0
- package/dist/converters/edge.d.ts +6 -0
- package/dist/converters/edge.js +88 -0
- package/dist/converters/node.d.ts +3 -0
- package/dist/converters/node.js +45 -0
- package/dist/converters/sqs-revalidate.d.ts +4 -0
- package/dist/converters/sqs-revalidate.js +22 -0
- package/dist/converters/utils.d.ts +1 -0
- package/dist/converters/utils.js +9 -0
- package/dist/core/createGenericHandler.d.ts +11 -0
- package/dist/core/createGenericHandler.js +16 -0
- package/dist/core/createMainHandler.d.ts +18 -0
- package/dist/core/createMainHandler.js +24 -0
- package/dist/core/edgeFunctionHandler.d.ts +54 -0
- package/dist/core/edgeFunctionHandler.js +21 -0
- package/dist/core/patchAsyncStorage.d.ts +1 -0
- package/dist/core/patchAsyncStorage.js +16 -0
- package/dist/core/requestHandler.d.ts +3 -0
- package/dist/core/requestHandler.js +162 -0
- package/dist/core/require-hooks.d.ts +3 -0
- package/dist/core/require-hooks.js +102 -0
- package/dist/core/resolve.d.ts +31 -0
- package/dist/core/resolve.js +81 -0
- package/dist/core/routing/cacheInterceptor.d.ts +2 -0
- package/dist/core/routing/cacheInterceptor.js +162 -0
- package/dist/core/routing/i18n/accept-header.d.ts +1 -0
- package/dist/core/routing/i18n/accept-header.js +101 -0
- package/dist/core/routing/i18n/index.d.ts +2 -0
- package/dist/core/routing/i18n/index.js +36 -0
- package/dist/core/routing/matcher.d.ts +25 -0
- package/dist/core/routing/matcher.js +294 -0
- package/dist/core/routing/middleware.d.ts +7 -0
- package/dist/core/routing/middleware.js +167 -0
- package/dist/core/routing/util.d.ts +105 -0
- package/dist/core/routing/util.js +415 -0
- package/dist/core/routingHandler.d.ts +8 -0
- package/dist/core/routingHandler.js +127 -0
- package/dist/core/util.d.ts +5 -0
- package/dist/core/util.js +84 -0
- package/dist/helpers/withCloudflare.d.ts +65 -0
- package/dist/helpers/withCloudflare.js +58 -0
- package/dist/helpers/withSST.d.ts +54 -0
- package/dist/helpers/withSST.js +28 -0
- package/dist/http/index.d.ts +2 -0
- package/dist/http/index.js +4 -0
- package/dist/http/openNextResponse.d.ts +78 -0
- package/dist/http/openNextResponse.js +281 -0
- package/dist/http/request.d.ts +12 -0
- package/dist/http/request.js +35 -0
- package/dist/http/util.d.ts +4 -0
- package/dist/http/util.js +34 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +37 -0
- package/dist/logger.d.ts +12 -0
- package/dist/logger.js +13 -0
- package/dist/minimize-js.d.ts +1 -0
- package/dist/minimize-js.js +101 -0
- package/dist/overrides/imageLoader/host.d.ts +3 -0
- package/dist/overrides/imageLoader/host.js +29 -0
- package/dist/overrides/imageLoader/s3.d.ts +3 -0
- package/dist/overrides/imageLoader/s3.js +33 -0
- package/dist/plugins/edge.d.ts +15 -0
- package/dist/plugins/edge.js +157 -0
- package/dist/plugins/replacement.d.ts +42 -0
- package/dist/plugins/replacement.js +74 -0
- package/dist/plugins/resolve.d.ts +18 -0
- package/dist/plugins/resolve.js +45 -0
- package/dist/queue/sqs-lite.d.ts +3 -0
- package/dist/queue/sqs-lite.js +52 -0
- package/dist/queue/sqs.d.ts +3 -0
- package/dist/queue/sqs.js +20 -0
- package/dist/queue/types.d.ts +12 -0
- package/dist/queue/types.js +1 -0
- package/dist/types/aws-lambda.d.ts +22 -0
- package/dist/types/aws-lambda.js +1 -0
- package/dist/types/next-types.d.ts +155 -0
- package/dist/types/next-types.js +2 -0
- package/dist/types/open-next.d.ts +303 -0
- package/dist/types/open-next.js +1 -0
- package/dist/utils/error.d.ts +23 -0
- package/dist/utils/error.js +32 -0
- package/dist/utils/fetch.d.ts +2 -0
- package/dist/utils/fetch.js +23 -0
- package/dist/utils/promise.d.ts +18 -0
- package/dist/utils/promise.js +48 -0
- package/dist/utils/stream.d.ts +5 -0
- package/dist/utils/stream.js +30 -0
- package/dist/wrappers/aws-lambda-streaming.d.ts +7 -0
- package/dist/wrappers/aws-lambda-streaming.js +88 -0
- package/dist/wrappers/aws-lambda.d.ts +7 -0
- package/dist/wrappers/aws-lambda.js +39 -0
- package/dist/wrappers/cloudflare.d.ts +11 -0
- package/dist/wrappers/cloudflare.js +20 -0
- package/dist/wrappers/node.d.ts +7 -0
- package/dist/wrappers/node.js +57 -0
- package/package.json +66 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Readable } from "node:stream";
|
|
2
|
+
export function fromReadableStream(stream, base64) {
|
|
3
|
+
const reader = stream.getReader();
|
|
4
|
+
const chunks = [];
|
|
5
|
+
return new Promise((resolve, reject) => {
|
|
6
|
+
function pump() {
|
|
7
|
+
reader
|
|
8
|
+
.read()
|
|
9
|
+
.then(({ done, value }) => {
|
|
10
|
+
if (done) {
|
|
11
|
+
resolve(Buffer.concat(chunks).toString(base64 ? "base64" : "utf8"));
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
chunks.push(value);
|
|
15
|
+
pump();
|
|
16
|
+
})
|
|
17
|
+
.catch(reject);
|
|
18
|
+
}
|
|
19
|
+
pump();
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
export function toReadableStream(value, isBase64) {
|
|
23
|
+
return Readable.toWeb(Readable.from(Buffer.from(value, isBase64 ? "base64" : "utf8")));
|
|
24
|
+
}
|
|
25
|
+
export function emptyReadableStream() {
|
|
26
|
+
if (process.env.OPEN_NEXT_FORCE_NON_EMPTY_RESPONSE === "true") {
|
|
27
|
+
return Readable.toWeb(Readable.from([Buffer.from("SOMETHING")]));
|
|
28
|
+
}
|
|
29
|
+
return Readable.toWeb(Readable.from([]));
|
|
30
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { WrapperHandler } from "../types/open-next";
|
|
2
|
+
declare const _default: {
|
|
3
|
+
wrapper: WrapperHandler<import("../types/open-next").InternalEvent, import("../types/open-next").InternalResult>;
|
|
4
|
+
name: string;
|
|
5
|
+
supportStreaming: boolean;
|
|
6
|
+
};
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { Readable } from "node:stream";
|
|
2
|
+
import zlib from "node:zlib";
|
|
3
|
+
import { debug, error } from "../adapters/logger";
|
|
4
|
+
function formatWarmerResponse(event) {
|
|
5
|
+
const result = new Promise((resolve) => {
|
|
6
|
+
setTimeout(() => {
|
|
7
|
+
resolve({ serverId, type: "warmer" });
|
|
8
|
+
}, event.delay);
|
|
9
|
+
});
|
|
10
|
+
return result;
|
|
11
|
+
}
|
|
12
|
+
const handler = async (handler, converter) => awslambda.streamifyResponse(async (event, responseStream, context) => {
|
|
13
|
+
context.callbackWaitsForEmptyEventLoop = false;
|
|
14
|
+
if ("type" in event) {
|
|
15
|
+
const result = await formatWarmerResponse(event);
|
|
16
|
+
responseStream.end(Buffer.from(JSON.stringify(result)), "utf-8");
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const internalEvent = await converter.convertFrom(event);
|
|
20
|
+
//Handle compression
|
|
21
|
+
const acceptEncoding = internalEvent.headers["Accept-Encoding"] ??
|
|
22
|
+
internalEvent.headers["accept-encoding"] ??
|
|
23
|
+
"";
|
|
24
|
+
let contentEncoding;
|
|
25
|
+
let compressedStream;
|
|
26
|
+
responseStream.on("error", (err) => {
|
|
27
|
+
error(err);
|
|
28
|
+
responseStream.end();
|
|
29
|
+
});
|
|
30
|
+
if (acceptEncoding.includes("br")) {
|
|
31
|
+
contentEncoding = "br";
|
|
32
|
+
compressedStream = zlib.createBrotliCompress({
|
|
33
|
+
flush: zlib.constants.BROTLI_OPERATION_FLUSH,
|
|
34
|
+
finishFlush: zlib.constants.BROTLI_OPERATION_FINISH,
|
|
35
|
+
});
|
|
36
|
+
compressedStream.pipe(responseStream);
|
|
37
|
+
}
|
|
38
|
+
else if (acceptEncoding.includes("gzip")) {
|
|
39
|
+
contentEncoding = "gzip";
|
|
40
|
+
compressedStream = zlib.createGzip({
|
|
41
|
+
flush: zlib.constants.Z_SYNC_FLUSH,
|
|
42
|
+
});
|
|
43
|
+
compressedStream.pipe(responseStream);
|
|
44
|
+
}
|
|
45
|
+
else if (acceptEncoding.includes("deflate")) {
|
|
46
|
+
contentEncoding = "deflate";
|
|
47
|
+
compressedStream = zlib.createDeflate({
|
|
48
|
+
flush: zlib.constants.Z_SYNC_FLUSH,
|
|
49
|
+
});
|
|
50
|
+
compressedStream.pipe(responseStream);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
contentEncoding = "identity";
|
|
54
|
+
compressedStream = responseStream;
|
|
55
|
+
}
|
|
56
|
+
const streamCreator = {
|
|
57
|
+
writeHeaders: (_prelude) => {
|
|
58
|
+
_prelude.headers["content-encoding"] = contentEncoding;
|
|
59
|
+
responseStream.setContentType("application/vnd.awslambda.http-integration-response");
|
|
60
|
+
_prelude.headers["content-encoding"] = contentEncoding;
|
|
61
|
+
const prelude = JSON.stringify(_prelude);
|
|
62
|
+
responseStream.write(prelude);
|
|
63
|
+
responseStream.write(new Uint8Array(8));
|
|
64
|
+
return compressedStream ?? responseStream;
|
|
65
|
+
},
|
|
66
|
+
onWrite: () => {
|
|
67
|
+
// _hasWriten = true;
|
|
68
|
+
},
|
|
69
|
+
onFinish: () => { },
|
|
70
|
+
};
|
|
71
|
+
const response = await handler(internalEvent, streamCreator);
|
|
72
|
+
const isUsingEdge = globalThis.isEdgeRuntime ?? false;
|
|
73
|
+
if (isUsingEdge) {
|
|
74
|
+
debug("Headers has not been set, we must be in the edge runtime");
|
|
75
|
+
const stream = streamCreator.writeHeaders({
|
|
76
|
+
statusCode: response.statusCode,
|
|
77
|
+
headers: response.headers,
|
|
78
|
+
cookies: [],
|
|
79
|
+
});
|
|
80
|
+
Readable.fromWeb(response.body).pipe(stream);
|
|
81
|
+
}
|
|
82
|
+
// return converter.convertTo(response);
|
|
83
|
+
});
|
|
84
|
+
export default {
|
|
85
|
+
wrapper: handler,
|
|
86
|
+
name: "aws-lambda-streaming",
|
|
87
|
+
supportStreaming: true,
|
|
88
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { WrapperHandler } from "../types/open-next";
|
|
2
|
+
declare const _default: {
|
|
3
|
+
wrapper: WrapperHandler<import("../types/open-next").InternalEvent, import("../types/open-next").InternalResult>;
|
|
4
|
+
name: string;
|
|
5
|
+
supportStreaming: boolean;
|
|
6
|
+
};
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Writable } from "node:stream";
|
|
2
|
+
function formatWarmerResponse(event) {
|
|
3
|
+
return new Promise((resolve) => {
|
|
4
|
+
setTimeout(() => {
|
|
5
|
+
resolve({ serverId, type: "warmer" });
|
|
6
|
+
}, event.delay);
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
const handler = async (handler, converter) => async (event) => {
|
|
10
|
+
// Handle warmer event
|
|
11
|
+
if ("type" in event) {
|
|
12
|
+
return formatWarmerResponse(event);
|
|
13
|
+
}
|
|
14
|
+
const internalEvent = await converter.convertFrom(event);
|
|
15
|
+
//TODO: create a simple reproduction and open an issue in the node repo
|
|
16
|
+
//This is a workaround, there is an issue in node that causes node to crash silently if the OpenNextNodeResponse stream is not consumed
|
|
17
|
+
//This does not happen everytime, it's probably caused by suspended component in ssr (either via <Suspense> or loading.tsx)
|
|
18
|
+
//Everyone that wish to create their own wrapper without a StreamCreator should implement this workaround
|
|
19
|
+
//This is not necessary if the underlying handler does not use OpenNextNodeResponse (At the moment, OpenNextNodeResponse is used by the node runtime servers and the image server)
|
|
20
|
+
const fakeStream = {
|
|
21
|
+
writeHeaders: () => {
|
|
22
|
+
return new Writable({
|
|
23
|
+
write: (_chunk, _encoding, callback) => {
|
|
24
|
+
callback();
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
},
|
|
28
|
+
onFinish: () => {
|
|
29
|
+
// Do nothing
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
const response = await handler(internalEvent, fakeStream);
|
|
33
|
+
return converter.convertTo(response, event);
|
|
34
|
+
};
|
|
35
|
+
export default {
|
|
36
|
+
wrapper: handler,
|
|
37
|
+
name: "aws-lambda",
|
|
38
|
+
supportStreaming: false,
|
|
39
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { InternalEvent, InternalResult, WrapperHandler } from "../types/open-next";
|
|
2
|
+
import { MiddlewareOutputEvent } from "../core/routingHandler";
|
|
3
|
+
declare const _default: {
|
|
4
|
+
wrapper: WrapperHandler<InternalEvent, InternalResult | ({
|
|
5
|
+
type: "middleware";
|
|
6
|
+
} & MiddlewareOutputEvent)>;
|
|
7
|
+
name: string;
|
|
8
|
+
supportStreaming: boolean;
|
|
9
|
+
edgeRuntime: boolean;
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const handler = async (handler, converter) => async (event, env) => {
|
|
2
|
+
globalThis.process = process;
|
|
3
|
+
// Set the environment variables
|
|
4
|
+
// Cloudlare suggests to not override the process.env object but instead apply the values to it
|
|
5
|
+
for (const [key, value] of Object.entries(env)) {
|
|
6
|
+
if (typeof value === "string") {
|
|
7
|
+
process.env[key] = value;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
const internalEvent = await converter.convertFrom(event);
|
|
11
|
+
const response = await handler(internalEvent);
|
|
12
|
+
const result = await converter.convertTo(response);
|
|
13
|
+
return result;
|
|
14
|
+
};
|
|
15
|
+
export default {
|
|
16
|
+
wrapper: handler,
|
|
17
|
+
name: "cloudflare",
|
|
18
|
+
supportStreaming: true,
|
|
19
|
+
edgeRuntime: true,
|
|
20
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { WrapperHandler } from "../types/open-next";
|
|
2
|
+
declare const _default: {
|
|
3
|
+
wrapper: WrapperHandler<import("../types/open-next").InternalEvent, import("../types/open-next").InternalResult>;
|
|
4
|
+
name: string;
|
|
5
|
+
supportStreaming: boolean;
|
|
6
|
+
};
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { createServer } from "node:http";
|
|
2
|
+
import { debug, error } from "../adapters/logger";
|
|
3
|
+
const wrapper = async (handler, converter) => {
|
|
4
|
+
const server = createServer(async (req, res) => {
|
|
5
|
+
const internalEvent = await converter.convertFrom(req);
|
|
6
|
+
const _res = {
|
|
7
|
+
writeHeaders: (prelude) => {
|
|
8
|
+
res.setHeader("Set-Cookie", prelude.cookies);
|
|
9
|
+
res.writeHead(prelude.statusCode, prelude.headers);
|
|
10
|
+
res.flushHeaders();
|
|
11
|
+
res.uncork();
|
|
12
|
+
return res;
|
|
13
|
+
},
|
|
14
|
+
onFinish: () => {
|
|
15
|
+
// Is it necessary to do something here?
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
if (internalEvent.rawPath === "/__health") {
|
|
19
|
+
res.writeHead(200, {
|
|
20
|
+
"Content-Type": "text/plain",
|
|
21
|
+
});
|
|
22
|
+
res.end("OK");
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
await handler(internalEvent, _res);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
await new Promise((resolve) => {
|
|
29
|
+
server.on("listening", () => {
|
|
30
|
+
const cleanup = (code) => {
|
|
31
|
+
debug(`Closing server`);
|
|
32
|
+
server.close(() => {
|
|
33
|
+
debug(`Server closed`);
|
|
34
|
+
process.exit(code);
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
console.log(`Listening on port ${process.env.PORT ?? "3000"}`);
|
|
38
|
+
debug(`Open Next version: ${process.env.OPEN_NEXT_VERSION}`);
|
|
39
|
+
process.on("exit", (code) => cleanup(code));
|
|
40
|
+
process.on("SIGINT", () => cleanup(0));
|
|
41
|
+
process.on("SIGTERM", () => cleanup(0));
|
|
42
|
+
resolve();
|
|
43
|
+
});
|
|
44
|
+
server.listen(parseInt(process.env.PORT ?? "3000", 10));
|
|
45
|
+
});
|
|
46
|
+
server.on("error", (err) => {
|
|
47
|
+
error(err);
|
|
48
|
+
});
|
|
49
|
+
return () => {
|
|
50
|
+
server.close();
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
export default {
|
|
54
|
+
wrapper,
|
|
55
|
+
name: "node",
|
|
56
|
+
supportStreaming: true,
|
|
57
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"publishConfig": {
|
|
3
|
+
"access": "public"
|
|
4
|
+
},
|
|
5
|
+
"name": "@opennextjs/aws",
|
|
6
|
+
"version": "3.1.4",
|
|
7
|
+
"bin": {
|
|
8
|
+
"open-next": "./dist/index.js",
|
|
9
|
+
"@opennextjs/aws": "./dist/index.js"
|
|
10
|
+
},
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"type": "module",
|
|
13
|
+
"description": "Open source Next.js serverless adapter",
|
|
14
|
+
"homepage": "https://open-next.js.org",
|
|
15
|
+
"main": "./dist/index.js",
|
|
16
|
+
"exports": {
|
|
17
|
+
"./*": "./dist/*"
|
|
18
|
+
},
|
|
19
|
+
"typesVersions": {
|
|
20
|
+
"*": {
|
|
21
|
+
"*": [
|
|
22
|
+
"dist/*"
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"keywords": [],
|
|
27
|
+
"author": "",
|
|
28
|
+
"files": [
|
|
29
|
+
"dist",
|
|
30
|
+
"assets",
|
|
31
|
+
"README.md"
|
|
32
|
+
],
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@aws-sdk/client-dynamodb": "^3.398.0",
|
|
35
|
+
"@aws-sdk/client-lambda": "^3.398.0",
|
|
36
|
+
"@aws-sdk/client-s3": "^3.398.0",
|
|
37
|
+
"@aws-sdk/client-sqs": "^3.398.0",
|
|
38
|
+
"@esbuild-plugins/node-resolve": "0.2.2",
|
|
39
|
+
"@node-minify/core": "^8.0.6",
|
|
40
|
+
"@node-minify/terser": "^8.0.6",
|
|
41
|
+
"@tsconfig/node18": "^1.0.1",
|
|
42
|
+
"aws4fetch": "^1.0.18",
|
|
43
|
+
"chalk": "^5.3.0",
|
|
44
|
+
"esbuild": "0.19.2",
|
|
45
|
+
"path-to-regexp": "^6.3.0",
|
|
46
|
+
"promise.series": "^0.2.0",
|
|
47
|
+
"urlpattern-polyfill": "^10.0.0"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@types/aws-lambda": "^8.10.109",
|
|
51
|
+
"@types/node": "^18.16.1",
|
|
52
|
+
"tsc-alias": "^1.8.8",
|
|
53
|
+
"typescript": "^4.9.3"
|
|
54
|
+
},
|
|
55
|
+
"bugs": {
|
|
56
|
+
"url": "https://github.com/sst/open-next/issues"
|
|
57
|
+
},
|
|
58
|
+
"repository": {
|
|
59
|
+
"type": "git",
|
|
60
|
+
"url": "git+https://github.com/sst/open-next.git"
|
|
61
|
+
},
|
|
62
|
+
"scripts": {
|
|
63
|
+
"build": "tsc && tsc-alias",
|
|
64
|
+
"dev": "tsc -w"
|
|
65
|
+
}
|
|
66
|
+
}
|