Skip to content

Commit ab7466f

Browse files
authored
fix: add correct typing to tagCache in initializationFunction (#745)
* fix correct typing in initializationFunction * add tagCache to compileTagCacheProvider * changeset
1 parent 5b314b1 commit ab7466f

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

.changeset/stale-walls-sin.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@opennextjs/aws": patch
3+
---
4+
5+
fix: tagCache in initializationFunction
6+
7+
Add correct typing to tagCache in initializationFunction and also adds it to the `overrides` in `compileTagCacheProvider` function.

packages/open-next/src/build/compileTagCacheProvider.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export async function compileTagCacheProvider(
2525
overrides: {
2626
converter: overrides?.converter ?? "dummy",
2727
wrapper: overrides?.wrapper,
28+
tagCache: options.config.initializationFunction?.tagCache,
2829
},
2930
}),
3031
],

packages/open-next/src/types/open-next.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ export interface OpenNextConfig {
404404
* Supports only node runtime
405405
*/
406406
initializationFunction?: DefaultFunctionOptions & {
407-
tagCache?: "dynamodb" | LazyLoadedOverride<TagCache>;
407+
tagCache?: IncludedTagCache | LazyLoadedOverride<TagCache>;
408408
};
409409

410410
/**

0 commit comments

Comments
 (0)