@builder.io/sdk-solid 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.
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function getPreviewContent(searchParams) {
|
|
4
|
-
init();
|
|
5
|
-
const id = getIdFromSearchParams(searchParams);
|
|
6
|
-
return typeof id === "string" ? globalThis._BUILDER_PREVIEW_LRU_CACHE.get(id) : void 0;
|
|
1
|
+
function getPreviewContent(_searchParams) {
|
|
2
|
+
return void 0;
|
|
7
3
|
}
|
|
8
4
|
export { getPreviewContent }
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { logger } from "../logger";
|
|
2
|
-
const getIdFromSearchParams = searchParams => {
|
|
3
|
-
const previewedModel = searchParams.get("preview");
|
|
4
|
-
const previewedId = searchParams.get("overrides." + previewedModel);
|
|
5
|
-
if (!previewedId) {
|
|
6
|
-
logger.warn("No previewed ID found in search params.");
|
|
7
|
-
}
|
|
8
|
-
return previewedId;
|
|
9
|
-
};
|
|
10
|
-
export { getIdFromSearchParams }
|
|
@@ -18,15 +18,11 @@ var __async = (__this, __arguments, generator) => {
|
|
|
18
18
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
19
19
|
});
|
|
20
20
|
};
|
|
21
|
-
"use server";
|
|
22
|
-
import { init } from "./init";
|
|
23
21
|
function postPreviewContent(_0) {
|
|
24
22
|
return __async(this, arguments, function* ({
|
|
25
23
|
key,
|
|
26
24
|
value
|
|
27
25
|
}) {
|
|
28
|
-
init();
|
|
29
|
-
globalThis._BUILDER_PREVIEW_LRU_CACHE.set(key, value);
|
|
30
26
|
return {
|
|
31
27
|
[key]: value
|
|
32
28
|
};
|