@gem-sdk/pages 1.9.35 → 1.9.36
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.
|
@@ -49,7 +49,6 @@ const getFontFromGlobalStyle = (data)=>{
|
|
|
49
49
|
if (!data) return '';
|
|
50
50
|
try {
|
|
51
51
|
const globalStyle = JSON.parse(data);
|
|
52
|
-
console.log(9999, globalStyle);
|
|
53
52
|
const fonts = globalStyle?.font ?? {};
|
|
54
53
|
const font = Object.entries(fonts).map(([, value])=>{
|
|
55
54
|
return value;
|
|
@@ -2,9 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
var core = require('@gem-sdk/core');
|
|
4
4
|
|
|
5
|
+
const isStorefront = true;
|
|
5
6
|
const getFallbackV2 = async (fetcher, data)=>{
|
|
6
7
|
const isSample = !process.env.NEXT_PUBLIC_STOREFRONT_TOKEN;
|
|
7
|
-
const queries = data.map((v)=>core.prefetchQueries(v.data,
|
|
8
|
+
const queries = data.map((v)=>core.prefetchQueries(v.data, {
|
|
9
|
+
isSample,
|
|
10
|
+
isStorefront
|
|
11
|
+
})).flat();
|
|
8
12
|
const datas = await Promise.allSettled(queries.map(({ query , variables , func })=>{
|
|
9
13
|
if (func) {
|
|
10
14
|
return func(fetcher, variables);
|
|
@@ -47,7 +47,6 @@ const getFontFromGlobalStyle = (data)=>{
|
|
|
47
47
|
if (!data) return '';
|
|
48
48
|
try {
|
|
49
49
|
const globalStyle = JSON.parse(data);
|
|
50
|
-
console.log(9999, globalStyle);
|
|
51
50
|
const fonts = globalStyle?.font ?? {};
|
|
52
51
|
const font = Object.entries(fonts).map(([, value])=>{
|
|
53
52
|
return value;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { prefetchQueries } from '@gem-sdk/core';
|
|
2
2
|
|
|
3
|
+
const isStorefront = true;
|
|
3
4
|
const getFallbackV2 = async (fetcher, data)=>{
|
|
4
5
|
const isSample = !process.env.NEXT_PUBLIC_STOREFRONT_TOKEN;
|
|
5
|
-
const queries = data.map((v)=>prefetchQueries(v.data,
|
|
6
|
+
const queries = data.map((v)=>prefetchQueries(v.data, {
|
|
7
|
+
isSample,
|
|
8
|
+
isStorefront
|
|
9
|
+
})).flat();
|
|
6
10
|
const datas = await Promise.allSettled(queries.map(({ query , variables , func })=>{
|
|
7
11
|
if (func) {
|
|
8
12
|
return func(fetcher, variables);
|