@graphcommerce/next-config 8.0.4 → 8.0.5-canary.1
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 +4 -0
- package/dist/generated/config.js +5 -6
- package/package.json +1 -1
- package/src/generated/config.ts +9 -16
package/CHANGELOG.md
CHANGED
package/dist/generated/config.js
CHANGED
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SidebarGalleryConfigSchema = exports.RecentlyViewedProductsConfigSchema = exports.MagentoConfigurableVariantValuesSchema = exports.GraphCommerceStorefrontConfigSchema = exports.GraphCommerceDebugConfigSchema = exports.GraphCommerceConfigSchema = exports.
|
|
3
|
+
exports.SidebarGalleryConfigSchema = exports.RecentlyViewedProductsConfigSchema = exports.MagentoConfigurableVariantValuesSchema = exports.GraphCommerceStorefrontConfigSchema = exports.GraphCommerceDebugConfigSchema = exports.GraphCommerceConfigSchema = exports.DatalayerConfigSchema = exports.SidebarGalleryPaginationVariantSchema = exports.ProductFiltersLayoutSchema = exports.CompareVariantSchema = exports.definedNonNullAnySchema = exports.isDefinedNonNullAny = void 0;
|
|
4
4
|
/* eslint-disable */
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
const isDefinedNonNullAny = (v) => v !== undefined && v !== null;
|
|
7
7
|
exports.isDefinedNonNullAny = isDefinedNonNullAny;
|
|
8
8
|
exports.definedNonNullAnySchema = zod_1.z.any().refine((v) => (0, exports.isDefinedNonNullAny)(v));
|
|
9
9
|
exports.CompareVariantSchema = zod_1.z.enum(['CHECKBOX', 'ICON']);
|
|
10
|
-
exports.EventFormatSchema = zod_1.z.enum(['GA3', 'GA4']);
|
|
11
10
|
exports.ProductFiltersLayoutSchema = zod_1.z.enum(['DEFAULT', 'SIDEBAR']);
|
|
12
11
|
exports.SidebarGalleryPaginationVariantSchema = zod_1.z.enum(['DOTS', 'THUMBNAILS_BOTTOM']);
|
|
13
|
-
function
|
|
12
|
+
function DatalayerConfigSchema() {
|
|
14
13
|
return zod_1.z.object({
|
|
15
|
-
|
|
14
|
+
coreWebVitals: zod_1.z.boolean().nullish()
|
|
16
15
|
});
|
|
17
16
|
}
|
|
18
|
-
exports.
|
|
17
|
+
exports.DatalayerConfigSchema = DatalayerConfigSchema;
|
|
19
18
|
function GraphCommerceConfigSchema() {
|
|
20
19
|
return zod_1.z.object({
|
|
21
|
-
analytics: AnalyticsConfigSchema().nullish(),
|
|
22
20
|
canonicalBaseUrl: zod_1.z.string().min(1),
|
|
23
21
|
cartDisplayPricesInclTax: zod_1.z.boolean().nullish(),
|
|
24
22
|
compare: zod_1.z.boolean().nullish(),
|
|
@@ -28,6 +26,7 @@ function GraphCommerceConfigSchema() {
|
|
|
28
26
|
crossSellsHideCartItems: zod_1.z.boolean().nullish(),
|
|
29
27
|
crossSellsRedirectItems: zod_1.z.boolean().nullish(),
|
|
30
28
|
customerRequireEmailConfirmation: zod_1.z.boolean().nullish(),
|
|
29
|
+
dataLayer: DatalayerConfigSchema().nullish(),
|
|
31
30
|
debug: GraphCommerceDebugConfigSchema().nullish(),
|
|
32
31
|
demoMode: zod_1.z.boolean().nullish(),
|
|
33
32
|
enableGuestCheckoutLogin: zod_1.z.boolean().nullish(),
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/next-config",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "8.0.
|
|
5
|
+
"version": "8.0.5-canary.1",
|
|
6
6
|
"type": "commonjs",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"types": "src/index.ts",
|
package/src/generated/config.ts
CHANGED
|
@@ -16,20 +16,15 @@ export type Scalars = {
|
|
|
16
16
|
Float: { input: number; output: number; }
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
/** AnalyticsConfig will contain all configuration values for the analytics in GraphCommerce. */
|
|
20
|
-
export type AnalyticsConfig = {
|
|
21
|
-
/** eventFormat contains the list of fired and formatted events */
|
|
22
|
-
eventFormat?: InputMaybe<Array<EventFormat>>;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
19
|
export type CompareVariant =
|
|
26
20
|
| 'CHECKBOX'
|
|
27
21
|
| 'ICON';
|
|
28
22
|
|
|
29
|
-
/**
|
|
30
|
-
export type
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
/** GoogleDatalayerConfig to allow enabling certain aspects of the datalayer */
|
|
24
|
+
export type DatalayerConfig = {
|
|
25
|
+
/** Enable core web vitals tracking for GraphCommerce */
|
|
26
|
+
coreWebVitals?: InputMaybe<Scalars['Boolean']['input']>;
|
|
27
|
+
};
|
|
33
28
|
|
|
34
29
|
/**
|
|
35
30
|
* # GraphCommerce configuration system
|
|
@@ -109,7 +104,6 @@ export type EventFormat =
|
|
|
109
104
|
* Below is a list of all possible configurations that can be set by GraphCommerce.
|
|
110
105
|
*/
|
|
111
106
|
export type GraphCommerceConfig = {
|
|
112
|
-
analytics?: InputMaybe<AnalyticsConfig>;
|
|
113
107
|
/**
|
|
114
108
|
* The canonical base URL is used for SEO purposes.
|
|
115
109
|
*
|
|
@@ -171,6 +165,7 @@ export type GraphCommerceConfig = {
|
|
|
171
165
|
* `customer/create_account/confirm` and should be removed once we can query
|
|
172
166
|
*/
|
|
173
167
|
customerRequireEmailConfirmation?: InputMaybe<Scalars['Boolean']['input']>;
|
|
168
|
+
dataLayer?: InputMaybe<DatalayerConfig>;
|
|
174
169
|
/** Debug configuration for GraphCommerce */
|
|
175
170
|
debug?: InputMaybe<GraphCommerceDebugConfig>;
|
|
176
171
|
/**
|
|
@@ -440,21 +435,18 @@ export const definedNonNullAnySchema = z.any().refine((v) => isDefinedNonNullAny
|
|
|
440
435
|
|
|
441
436
|
export const CompareVariantSchema = z.enum(['CHECKBOX', 'ICON']);
|
|
442
437
|
|
|
443
|
-
export const EventFormatSchema = z.enum(['GA3', 'GA4']);
|
|
444
|
-
|
|
445
438
|
export const ProductFiltersLayoutSchema = z.enum(['DEFAULT', 'SIDEBAR']);
|
|
446
439
|
|
|
447
440
|
export const SidebarGalleryPaginationVariantSchema = z.enum(['DOTS', 'THUMBNAILS_BOTTOM']);
|
|
448
441
|
|
|
449
|
-
export function
|
|
442
|
+
export function DatalayerConfigSchema(): z.ZodObject<Properties<DatalayerConfig>> {
|
|
450
443
|
return z.object({
|
|
451
|
-
|
|
444
|
+
coreWebVitals: z.boolean().nullish()
|
|
452
445
|
})
|
|
453
446
|
}
|
|
454
447
|
|
|
455
448
|
export function GraphCommerceConfigSchema(): z.ZodObject<Properties<GraphCommerceConfig>> {
|
|
456
449
|
return z.object({
|
|
457
|
-
analytics: AnalyticsConfigSchema().nullish(),
|
|
458
450
|
canonicalBaseUrl: z.string().min(1),
|
|
459
451
|
cartDisplayPricesInclTax: z.boolean().nullish(),
|
|
460
452
|
compare: z.boolean().nullish(),
|
|
@@ -464,6 +456,7 @@ export function GraphCommerceConfigSchema(): z.ZodObject<Properties<GraphCommerc
|
|
|
464
456
|
crossSellsHideCartItems: z.boolean().nullish(),
|
|
465
457
|
crossSellsRedirectItems: z.boolean().nullish(),
|
|
466
458
|
customerRequireEmailConfirmation: z.boolean().nullish(),
|
|
459
|
+
dataLayer: DatalayerConfigSchema().nullish(),
|
|
467
460
|
debug: GraphCommerceDebugConfigSchema().nullish(),
|
|
468
461
|
demoMode: z.boolean().nullish(),
|
|
469
462
|
enableGuestCheckoutLogin: z.boolean().nullish(),
|