@builder.io/sdk-react-nextjs 0.5.4 → 0.5.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.
@@ -3,5 +3,7 @@ import { init } from './init';
3
3
  export function getPreviewContent(searchParams) {
4
4
  init();
5
5
  const id = getIdFromSearchParams(searchParams);
6
- return typeof id === 'string' ? globalThis._BUILDER_PREVIEW_LRU_CACHE.get(id) : undefined;
6
+ return typeof id === 'string'
7
+ ? globalThis._BUILDER_PREVIEW_LRU_CACHE.get(id)
8
+ : undefined;
7
9
  }
@@ -9,7 +9,7 @@ export function init() {
9
9
  globalThis._BUILDER_PREVIEW_LRU_CACHE = new LRUCache({
10
10
  max: 500,
11
11
  // how long to live in ms
12
- ttl: 1000 * 60 * 5
12
+ ttl: 1000 * 60 * 5,
13
13
  });
14
14
  }
15
15
  }
@@ -1,5 +1,5 @@
1
1
  import type { BuilderContent } from '../../types/builder-content';
2
- export declare function postPreviewContent({ key, value }: {
2
+ export declare function postPreviewContent({ key, value, }: {
3
3
  key: string;
4
4
  value: BuilderContent;
5
5
  }): Promise<{
@@ -1,9 +1,7 @@
1
1
  'use server';
2
2
  import { init } from './init';
3
- export async function postPreviewContent({ key, value }) {
3
+ export async function postPreviewContent({ key, value, }) {
4
4
  init();
5
5
  globalThis._BUILDER_PREVIEW_LRU_CACHE.set(key, value);
6
- return {
7
- [key]: value
8
- };
6
+ return { [key]: value };
9
7
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@builder.io/sdk-react-nextjs",
3
3
  "description": "Builder.io SDK for React",
4
- "version": "0.5.4",
4
+ "version": "0.5.5",
5
5
  "files": [
6
6
  "dist"
7
7
  ],