@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.
Files changed (175) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +94 -0
  3. package/dist/adapters/binary.d.ts +1 -0
  4. package/dist/adapters/binary.js +63 -0
  5. package/dist/adapters/cache.d.ts +96 -0
  6. package/dist/adapters/cache.js +278 -0
  7. package/dist/adapters/config/index.d.ts +27 -0
  8. package/dist/adapters/config/index.js +21 -0
  9. package/dist/adapters/config/util.d.ts +28 -0
  10. package/dist/adapters/config/util.js +84 -0
  11. package/dist/adapters/dynamo-provider.d.ts +8 -0
  12. package/dist/adapters/dynamo-provider.js +42 -0
  13. package/dist/adapters/edge-adapter.d.ts +8 -0
  14. package/dist/adapters/edge-adapter.js +54 -0
  15. package/dist/adapters/image-optimization-adapter.d.ts +4 -0
  16. package/dist/adapters/image-optimization-adapter.js +193 -0
  17. package/dist/adapters/logger.d.ts +13 -0
  18. package/dist/adapters/logger.js +51 -0
  19. package/dist/adapters/middleware.d.ts +5 -0
  20. package/dist/adapters/middleware.js +84 -0
  21. package/dist/adapters/plugins/14.1/util.d.ts +1 -0
  22. package/dist/adapters/plugins/14.1/util.js +29 -0
  23. package/dist/adapters/plugins/image-optimization/image-optimization.d.ts +11 -0
  24. package/dist/adapters/plugins/image-optimization/image-optimization.js +14 -0
  25. package/dist/adapters/plugins/image-optimization/image-optimization.replacement.d.ts +11 -0
  26. package/dist/adapters/plugins/image-optimization/image-optimization.replacement.js +22 -0
  27. package/dist/adapters/plugins/without-routing/requestHandler.d.ts +2 -0
  28. package/dist/adapters/plugins/without-routing/requestHandler.js +10 -0
  29. package/dist/adapters/revalidate.d.ts +9 -0
  30. package/dist/adapters/revalidate.js +71 -0
  31. package/dist/adapters/server-adapter.d.ts +4 -0
  32. package/dist/adapters/server-adapter.js +27 -0
  33. package/dist/adapters/util.d.ts +10 -0
  34. package/dist/adapters/util.js +28 -0
  35. package/dist/adapters/warmer-function.d.ts +12 -0
  36. package/dist/adapters/warmer-function.js +80 -0
  37. package/dist/build/bundleNextServer.d.ts +1 -0
  38. package/dist/build/bundleNextServer.js +87 -0
  39. package/dist/build/compileConfig.d.ts +3 -0
  40. package/dist/build/compileConfig.js +64 -0
  41. package/dist/build/copyTracedFiles.d.ts +1 -0
  42. package/dist/build/copyTracedFiles.js +207 -0
  43. package/dist/build/createServerBundle.d.ts +3 -0
  44. package/dist/build/createServerBundle.js +228 -0
  45. package/dist/build/edge/createEdgeBundle.d.ts +20 -0
  46. package/dist/build/edge/createEdgeBundle.js +149 -0
  47. package/dist/build/generateOutput.d.ts +2 -0
  48. package/dist/build/generateOutput.js +239 -0
  49. package/dist/build/helper.d.ts +33 -0
  50. package/dist/build/helper.js +193 -0
  51. package/dist/build/patch/patchedAsyncStorage.d.ts +5 -0
  52. package/dist/build/patch/patchedAsyncStorage.js +16 -0
  53. package/dist/build/validateConfig.d.ts +2 -0
  54. package/dist/build/validateConfig.js +76 -0
  55. package/dist/build.d.ts +7 -0
  56. package/dist/build.js +533 -0
  57. package/dist/cache/incremental/s3-lite.d.ts +3 -0
  58. package/dist/cache/incremental/s3-lite.js +72 -0
  59. package/dist/cache/incremental/s3.d.ts +3 -0
  60. package/dist/cache/incremental/s3.js +44 -0
  61. package/dist/cache/incremental/types.d.ts +34 -0
  62. package/dist/cache/incremental/types.js +1 -0
  63. package/dist/cache/next-types.d.ts +62 -0
  64. package/dist/cache/next-types.js +1 -0
  65. package/dist/cache/tag/constants.d.ts +2 -0
  66. package/dist/cache/tag/constants.js +17 -0
  67. package/dist/cache/tag/dynamodb-lite.d.ts +3 -0
  68. package/dist/cache/tag/dynamodb-lite.js +174 -0
  69. package/dist/cache/tag/dynamodb.d.ts +3 -0
  70. package/dist/cache/tag/dynamodb.js +129 -0
  71. package/dist/cache/tag/types.d.ts +11 -0
  72. package/dist/cache/tag/types.js +1 -0
  73. package/dist/converters/aws-apigw-v1.d.ts +3 -0
  74. package/dist/converters/aws-apigw-v1.js +89 -0
  75. package/dist/converters/aws-apigw-v2.d.ts +3 -0
  76. package/dist/converters/aws-apigw-v2.js +99 -0
  77. package/dist/converters/aws-cloudfront.d.ts +3 -0
  78. package/dist/converters/aws-cloudfront.js +170 -0
  79. package/dist/converters/dummy.d.ts +7 -0
  80. package/dist/converters/dummy.js +16 -0
  81. package/dist/converters/edge.d.ts +6 -0
  82. package/dist/converters/edge.js +88 -0
  83. package/dist/converters/node.d.ts +3 -0
  84. package/dist/converters/node.js +45 -0
  85. package/dist/converters/sqs-revalidate.d.ts +4 -0
  86. package/dist/converters/sqs-revalidate.js +22 -0
  87. package/dist/converters/utils.d.ts +1 -0
  88. package/dist/converters/utils.js +9 -0
  89. package/dist/core/createGenericHandler.d.ts +11 -0
  90. package/dist/core/createGenericHandler.js +16 -0
  91. package/dist/core/createMainHandler.d.ts +18 -0
  92. package/dist/core/createMainHandler.js +24 -0
  93. package/dist/core/edgeFunctionHandler.d.ts +54 -0
  94. package/dist/core/edgeFunctionHandler.js +21 -0
  95. package/dist/core/patchAsyncStorage.d.ts +1 -0
  96. package/dist/core/patchAsyncStorage.js +16 -0
  97. package/dist/core/requestHandler.d.ts +3 -0
  98. package/dist/core/requestHandler.js +162 -0
  99. package/dist/core/require-hooks.d.ts +3 -0
  100. package/dist/core/require-hooks.js +102 -0
  101. package/dist/core/resolve.d.ts +31 -0
  102. package/dist/core/resolve.js +81 -0
  103. package/dist/core/routing/cacheInterceptor.d.ts +2 -0
  104. package/dist/core/routing/cacheInterceptor.js +162 -0
  105. package/dist/core/routing/i18n/accept-header.d.ts +1 -0
  106. package/dist/core/routing/i18n/accept-header.js +101 -0
  107. package/dist/core/routing/i18n/index.d.ts +2 -0
  108. package/dist/core/routing/i18n/index.js +36 -0
  109. package/dist/core/routing/matcher.d.ts +25 -0
  110. package/dist/core/routing/matcher.js +294 -0
  111. package/dist/core/routing/middleware.d.ts +7 -0
  112. package/dist/core/routing/middleware.js +167 -0
  113. package/dist/core/routing/util.d.ts +105 -0
  114. package/dist/core/routing/util.js +415 -0
  115. package/dist/core/routingHandler.d.ts +8 -0
  116. package/dist/core/routingHandler.js +127 -0
  117. package/dist/core/util.d.ts +5 -0
  118. package/dist/core/util.js +84 -0
  119. package/dist/helpers/withCloudflare.d.ts +65 -0
  120. package/dist/helpers/withCloudflare.js +58 -0
  121. package/dist/helpers/withSST.d.ts +54 -0
  122. package/dist/helpers/withSST.js +28 -0
  123. package/dist/http/index.d.ts +2 -0
  124. package/dist/http/index.js +4 -0
  125. package/dist/http/openNextResponse.d.ts +78 -0
  126. package/dist/http/openNextResponse.js +281 -0
  127. package/dist/http/request.d.ts +12 -0
  128. package/dist/http/request.js +35 -0
  129. package/dist/http/util.d.ts +4 -0
  130. package/dist/http/util.js +34 -0
  131. package/dist/index.d.ts +2 -0
  132. package/dist/index.js +37 -0
  133. package/dist/logger.d.ts +12 -0
  134. package/dist/logger.js +13 -0
  135. package/dist/minimize-js.d.ts +1 -0
  136. package/dist/minimize-js.js +101 -0
  137. package/dist/overrides/imageLoader/host.d.ts +3 -0
  138. package/dist/overrides/imageLoader/host.js +29 -0
  139. package/dist/overrides/imageLoader/s3.d.ts +3 -0
  140. package/dist/overrides/imageLoader/s3.js +33 -0
  141. package/dist/plugins/edge.d.ts +15 -0
  142. package/dist/plugins/edge.js +157 -0
  143. package/dist/plugins/replacement.d.ts +42 -0
  144. package/dist/plugins/replacement.js +74 -0
  145. package/dist/plugins/resolve.d.ts +18 -0
  146. package/dist/plugins/resolve.js +45 -0
  147. package/dist/queue/sqs-lite.d.ts +3 -0
  148. package/dist/queue/sqs-lite.js +52 -0
  149. package/dist/queue/sqs.d.ts +3 -0
  150. package/dist/queue/sqs.js +20 -0
  151. package/dist/queue/types.d.ts +12 -0
  152. package/dist/queue/types.js +1 -0
  153. package/dist/types/aws-lambda.d.ts +22 -0
  154. package/dist/types/aws-lambda.js +1 -0
  155. package/dist/types/next-types.d.ts +155 -0
  156. package/dist/types/next-types.js +2 -0
  157. package/dist/types/open-next.d.ts +303 -0
  158. package/dist/types/open-next.js +1 -0
  159. package/dist/utils/error.d.ts +23 -0
  160. package/dist/utils/error.js +32 -0
  161. package/dist/utils/fetch.d.ts +2 -0
  162. package/dist/utils/fetch.js +23 -0
  163. package/dist/utils/promise.d.ts +18 -0
  164. package/dist/utils/promise.js +48 -0
  165. package/dist/utils/stream.d.ts +5 -0
  166. package/dist/utils/stream.js +30 -0
  167. package/dist/wrappers/aws-lambda-streaming.d.ts +7 -0
  168. package/dist/wrappers/aws-lambda-streaming.js +88 -0
  169. package/dist/wrappers/aws-lambda.d.ts +7 -0
  170. package/dist/wrappers/aws-lambda.js +39 -0
  171. package/dist/wrappers/cloudflare.d.ts +11 -0
  172. package/dist/wrappers/cloudflare.js +20 -0
  173. package/dist/wrappers/node.d.ts +7 -0
  174. package/dist/wrappers/node.js +57 -0
  175. package/package.json +66 -0
@@ -0,0 +1,193 @@
1
+ import fs from "node:fs";
2
+ import { createRequire as topLevelCreateRequire } from "node:module";
3
+ import path from "node:path";
4
+ import url from "node:url";
5
+ import { build as buildAsync, buildSync, } from "esbuild";
6
+ import logger from "../logger.js";
7
+ const require = topLevelCreateRequire(import.meta.url);
8
+ const __dirname = url.fileURLToPath(new URL(".", import.meta.url));
9
+ export function normalizeOptions(config, root) {
10
+ const appPath = path.join(process.cwd(), config.appPath || ".");
11
+ const buildOutputPath = path.join(process.cwd(), config.buildOutputPath || ".");
12
+ const outputDir = path.join(buildOutputPath, ".open-next");
13
+ let appPackageJsonPath;
14
+ if (config.packageJsonPath) {
15
+ const _pkgPath = path.join(process.cwd(), config.packageJsonPath);
16
+ appPackageJsonPath = _pkgPath.endsWith("package.json")
17
+ ? _pkgPath
18
+ : path.join(_pkgPath, "./package.json");
19
+ }
20
+ else {
21
+ appPackageJsonPath = findNextPackageJsonPath(appPath, root);
22
+ }
23
+ return {
24
+ openNextVersion: getOpenNextVersion(),
25
+ nextVersion: getNextVersion(appPath),
26
+ appPackageJsonPath,
27
+ appPath,
28
+ appBuildOutputPath: buildOutputPath,
29
+ appPublicPath: path.join(appPath, "public"),
30
+ outputDir,
31
+ tempDir: path.join(outputDir, ".build"),
32
+ debug: Boolean(process.env.OPEN_NEXT_DEBUG) ?? false,
33
+ monorepoRoot: root,
34
+ };
35
+ }
36
+ function findNextPackageJsonPath(appPath, root) {
37
+ // This is needed for the case where the app is a single-version monorepo and the package.json is in the root of the monorepo
38
+ return fs.existsSync(path.join(appPath, "./package.json"))
39
+ ? path.join(appPath, "./package.json")
40
+ : path.join(root, "./package.json");
41
+ }
42
+ export function esbuildSync(esbuildOptions, options) {
43
+ const { openNextVersion, debug } = options;
44
+ const result = buildSync({
45
+ target: "esnext",
46
+ format: "esm",
47
+ platform: "node",
48
+ bundle: true,
49
+ minify: debug ? false : true,
50
+ mainFields: ["module", "main"],
51
+ sourcemap: debug ? "inline" : false,
52
+ sourcesContent: false,
53
+ ...esbuildOptions,
54
+ external: ["./open-next.config.mjs", ...(esbuildOptions.external ?? [])],
55
+ banner: {
56
+ ...esbuildOptions.banner,
57
+ js: [
58
+ esbuildOptions.banner?.js || "",
59
+ `globalThis.openNextDebug = ${debug};`,
60
+ `globalThis.openNextVersion = "${openNextVersion}";`,
61
+ ].join(""),
62
+ },
63
+ });
64
+ if (result.errors.length > 0) {
65
+ result.errors.forEach((error) => logger.error(error));
66
+ throw new Error(`There was a problem bundling ${esbuildOptions.entryPoints[0]}.`);
67
+ }
68
+ }
69
+ export async function esbuildAsync(esbuildOptions, options) {
70
+ const { openNextVersion, debug } = options;
71
+ const result = await buildAsync({
72
+ target: "esnext",
73
+ format: "esm",
74
+ platform: "node",
75
+ bundle: true,
76
+ minify: debug ? false : true,
77
+ mainFields: ["module", "main"],
78
+ sourcemap: debug ? "inline" : false,
79
+ sourcesContent: false,
80
+ ...esbuildOptions,
81
+ external: [
82
+ ...(esbuildOptions.external ?? []),
83
+ "next",
84
+ "./open-next.config.mjs",
85
+ ],
86
+ banner: {
87
+ ...esbuildOptions.banner,
88
+ js: [
89
+ esbuildOptions.banner?.js || "",
90
+ `globalThis.openNextDebug = ${debug};`,
91
+ `globalThis.openNextVersion = "${openNextVersion}";`,
92
+ ].join(""),
93
+ },
94
+ });
95
+ if (result.errors.length > 0) {
96
+ result.errors.forEach((error) => logger.error(error));
97
+ throw new Error(`There was a problem bundling ${esbuildOptions.entryPoints[0]}.`);
98
+ }
99
+ }
100
+ export function removeFiles(root, conditionFn, searchingDir = "") {
101
+ traverseFiles(root, conditionFn, (filePath) => fs.rmSync(filePath, { force: true }), searchingDir);
102
+ }
103
+ /**
104
+ * Recursively traverse files in a directory and call `callbackFn` when `conditionFn` returns true
105
+ * @param root - Root directory to search
106
+ * @param conditionFn - Called to determine if `callbackFn` should be called
107
+ * @param callbackFn - Called when `conditionFn` returns true
108
+ * @param searchingDir - Directory to search (used for recursion)
109
+ */
110
+ export function traverseFiles(root, conditionFn, callbackFn, searchingDir = "") {
111
+ fs.readdirSync(path.join(root, searchingDir)).forEach((file) => {
112
+ const filePath = path.join(root, searchingDir, file);
113
+ if (fs.statSync(filePath).isDirectory()) {
114
+ traverseFiles(root, conditionFn, callbackFn, path.join(searchingDir, file));
115
+ return;
116
+ }
117
+ if (conditionFn(path.join(searchingDir, file))) {
118
+ callbackFn(filePath);
119
+ }
120
+ });
121
+ }
122
+ export function getHtmlPages(dotNextPath) {
123
+ // Get a list of HTML pages
124
+ //
125
+ // sample return value:
126
+ // Set([
127
+ // '404.html',
128
+ // 'csr.html',
129
+ // 'image-html-tag.html',
130
+ // ])
131
+ const manifestPath = path.join(dotNextPath, ".next/server/pages-manifest.json");
132
+ const manifest = fs.readFileSync(manifestPath, "utf-8");
133
+ return Object.entries(JSON.parse(manifest))
134
+ .filter(([_, value]) => value.endsWith(".html"))
135
+ .map(([_, value]) => value.replace(/^pages\//, ""))
136
+ .reduce((acc, page) => {
137
+ acc.add(page);
138
+ return acc;
139
+ }, new Set());
140
+ }
141
+ export function getBuildId(dotNextPath) {
142
+ return fs
143
+ .readFileSync(path.join(dotNextPath, ".next/BUILD_ID"), "utf-8")
144
+ .trim();
145
+ }
146
+ export function getOpenNextVersion() {
147
+ return require(path.join(__dirname, "../../package.json")).version;
148
+ }
149
+ export function getNextVersion(appPath) {
150
+ // We cannot just require("next/package.json") because it could be executed in a different directory
151
+ const nextPackageJsonPath = require.resolve("next/package.json", {
152
+ paths: [appPath],
153
+ });
154
+ const version = require(nextPackageJsonPath)?.version;
155
+ if (!version) {
156
+ throw new Error("Failed to find Next version");
157
+ }
158
+ // Drop the -canary.n suffix
159
+ return version.split("-")[0];
160
+ }
161
+ export function compareSemver(v1, v2) {
162
+ if (v1 === "latest")
163
+ return 1;
164
+ if (/^[^\d]/.test(v1)) {
165
+ v1 = v1.substring(1);
166
+ }
167
+ if (/^[^\d]/.test(v2)) {
168
+ v2 = v2.substring(1);
169
+ }
170
+ const [major1, minor1, patch1] = v1.split(".").map(Number);
171
+ const [major2, minor2, patch2] = v2.split(".").map(Number);
172
+ if (major1 !== major2)
173
+ return major1 - major2;
174
+ if (minor1 !== minor2)
175
+ return minor1 - minor2;
176
+ return patch1 - patch2;
177
+ }
178
+ export function copyOpenNextConfig(tempDir, outputPath, isEdge = false) {
179
+ // Copy open-next.config.mjs
180
+ fs.copyFileSync(path.join(tempDir, isEdge ? "open-next.config.edge.mjs" : "open-next.config.mjs"), path.join(outputPath, "open-next.config.mjs"));
181
+ }
182
+ export function copyEnvFile(appPath, packagePath, outputPath) {
183
+ const baseAppPath = path.join(appPath, ".next/standalone", packagePath);
184
+ const baseOutputPath = path.join(outputPath, packagePath);
185
+ const envPath = path.join(baseAppPath, ".env");
186
+ if (fs.existsSync(envPath)) {
187
+ fs.copyFileSync(envPath, path.join(baseOutputPath, ".env"));
188
+ }
189
+ const envProdPath = path.join(baseAppPath, ".env.production");
190
+ if (fs.existsSync(envProdPath)) {
191
+ fs.copyFileSync(envProdPath, path.join(baseOutputPath, ".env.production"));
192
+ }
193
+ }
@@ -0,0 +1,5 @@
1
+ declare const asyncStorage: any;
2
+ declare const staticGenerationAsyncStorage: {
3
+ run: (store: any, cb: any, ...args: any[]) => any;
4
+ getStore: () => any;
5
+ };
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ //@ts-nocheck
3
+ const asyncStorage = require("next/dist/client/components/static-generation-async-storage.external.original");
4
+ const staticGenerationAsyncStorage = {
5
+ run: (store, cb, ...args) => asyncStorage.staticGenerationAsyncStorage.run(store, cb, ...args),
6
+ getStore: () => {
7
+ const store = asyncStorage.staticGenerationAsyncStorage.getStore();
8
+ if (store) {
9
+ store.isOnDemandRevalidate =
10
+ store.isOnDemandRevalidate &&
11
+ !globalThis.__als.getStore().isISRRevalidation;
12
+ }
13
+ return store;
14
+ },
15
+ };
16
+ exports.staticGenerationAsyncStorage = staticGenerationAsyncStorage;
@@ -0,0 +1,2 @@
1
+ import { OpenNextConfig } from "../types/open-next";
2
+ export declare function validateConfig(config: OpenNextConfig): void;
@@ -0,0 +1,76 @@
1
+ import logger from "../logger.js";
2
+ const compatibilityMatrix = {
3
+ "aws-lambda": [
4
+ "aws-apigw-v1",
5
+ "aws-apigw-v2",
6
+ "aws-cloudfront",
7
+ "sqs-revalidate",
8
+ ],
9
+ "aws-lambda-streaming": ["aws-apigw-v2"],
10
+ cloudflare: ["edge"],
11
+ node: ["node"],
12
+ };
13
+ function validateFunctionOptions(fnOptions) {
14
+ if (fnOptions.runtime === "edge" && fnOptions.experimentalBundledNextServer) {
15
+ logger.warn("experimentalBundledNextServer has no effect for edge functions");
16
+ }
17
+ const wrapper = typeof fnOptions.override?.wrapper === "string"
18
+ ? fnOptions.override.wrapper
19
+ : "aws-lambda";
20
+ const converter = typeof fnOptions.override?.converter === "string"
21
+ ? fnOptions.override.converter
22
+ : "aws-apigw-v2";
23
+ if (fnOptions.override?.generateDockerfile &&
24
+ converter !== "node" &&
25
+ wrapper !== "node") {
26
+ logger.warn("You've specified generateDockerfile without node converter and wrapper. Without custom converter and wrapper the dockerfile will not work");
27
+ }
28
+ if (converter === "aws-cloudfront" && fnOptions.placement !== "global") {
29
+ logger.warn("You've specified aws-cloudfront converter without global placement. This may not generate the correct output");
30
+ }
31
+ const isCustomWrapper = typeof fnOptions.override?.wrapper === "function";
32
+ const isCustomConverter = typeof fnOptions.override?.converter === "function";
33
+ // Check if the wrapper and converter are compatible
34
+ // Only check if using one of the included converters or wrapper
35
+ if (!compatibilityMatrix[wrapper].includes(converter) &&
36
+ !isCustomWrapper &&
37
+ !isCustomConverter) {
38
+ logger.error(`Wrapper ${wrapper} and converter ${converter} are not compatible. For the wrapper ${wrapper} you should only use the following converters: ${compatibilityMatrix[wrapper].join(", ")}`);
39
+ }
40
+ }
41
+ function validateSplittedFunctionOptions(fnOptions, name) {
42
+ validateFunctionOptions(fnOptions);
43
+ if (fnOptions.routes.length === 0) {
44
+ throw new Error(`Splitted function ${name} must have at least one route`);
45
+ }
46
+ // Check if the routes are properly formated
47
+ fnOptions.routes.forEach((route) => {
48
+ if (!route.startsWith("app/") && !route.startsWith("pages/")) {
49
+ throw new Error(`Route ${route} in function ${name} is not a valid route. It should starts with app/ or pages/ depending on if you use page or app router`);
50
+ }
51
+ });
52
+ if (fnOptions.runtime === "edge" && fnOptions.routes.length > 1) {
53
+ throw new Error(`Edge function ${name} can only have one route`);
54
+ }
55
+ }
56
+ export function validateConfig(config) {
57
+ validateFunctionOptions(config.default);
58
+ Object.entries(config.functions ?? {}).forEach(([name, fnOptions]) => {
59
+ validateSplittedFunctionOptions(fnOptions, name);
60
+ });
61
+ if (config.dangerous?.disableIncrementalCache) {
62
+ logger.warn("You've disabled incremental cache. This means that ISR and SSG will not work.");
63
+ }
64
+ if (config.dangerous?.disableTagCache) {
65
+ logger.warn(`You've disabled tag cache.
66
+ This means that revalidatePath and revalidateTag from next/cache will not work.
67
+ It is safe to disable if you only use page router`);
68
+ }
69
+ validateFunctionOptions(config.imageOptimization ?? {});
70
+ validateFunctionOptions(config.middleware ?? {});
71
+ //@ts-expect-error - Revalidate custom wrapper type is different
72
+ validateFunctionOptions(config.revalidate ?? {});
73
+ //@ts-expect-error - Warmer custom wrapper type is different
74
+ validateFunctionOptions(config.warmer ?? {});
75
+ validateFunctionOptions(config.initializationFunction ?? {});
76
+ }
@@ -0,0 +1,7 @@
1
+ export type PublicFiles = {
2
+ files: string[];
3
+ };
4
+ export declare function build(openNextConfigPath?: string, nodeExternals?: string): Promise<void>;
5
+ /***************************/
6
+ /***************************/
7
+ export declare function compileCache(format?: "cjs" | "esm"): string;