@graphcommerce/next-config 6.2.0-canary.40 → 6.2.0-canary.42

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
@@ -1,5 +1,13 @@
1
1
  # Change Log
2
2
 
3
+ ## 6.2.0-canary.42
4
+
5
+ ## 6.2.0-canary.41
6
+
7
+ ### Patch Changes
8
+
9
+ - [#1960](https://github.com/graphcommerce-org/graphcommerce/pull/1960) [`86e14569b`](https://github.com/graphcommerce-org/graphcommerce/commit/86e14569b1f68f73be7f93b614e36b382c5debff) - Updated to the latest release of GraphQL codegen and solve compatibility issues with our own generator ([@paales](https://github.com/paales))
10
+
3
11
  ## 6.2.0-canary.40
4
12
 
5
13
  ## 6.2.0-canary.39
@@ -29,7 +29,7 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
29
29
  "GC_CANONICAL_BASE_URL",
30
30
  "GC_CART_DISPLAY_PRICES_INCL_TAX",
31
31
  "GC_COMPARE",
32
- "GC_COMPARE_CHECKBOX",
32
+ "GC_COMPARE_VARIANT",
33
33
  "GC_CUSTOMER_REQUIRE_EMAIL_CONFIRMATION",
34
34
  "GC_DEBUG",
35
35
  "GC_DEBUG_PLUGIN_STATUS",
@@ -53,7 +53,6 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
53
53
  "GC_STOREFRONT_0",
54
54
  "GC_STOREFRONT_0_CANONICAL_BASE_URL",
55
55
  "GC_STOREFRONT_0_CART_DISPLAY_PRICES_INCL_TAX",
56
- "GC_STOREFRONT_0_COMPARE_CHECKBOX",
57
56
  "GC_STOREFRONT_0_DEFAULT_LOCALE",
58
57
  "GC_STOREFRONT_0_DOMAIN",
59
58
  "GC_STOREFRONT_0_GOOGLE_ANALYTICS_ID",
@@ -87,7 +86,6 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
87
86
  "GC_STOREFRONT_1",
88
87
  "GC_STOREFRONT_1_CANONICAL_BASE_URL",
89
88
  "GC_STOREFRONT_1_CART_DISPLAY_PRICES_INCL_TAX",
90
- "GC_STOREFRONT_1_COMPARE_CHECKBOX",
91
89
  "GC_STOREFRONT_1_DEFAULT_LOCALE",
92
90
  "GC_STOREFRONT_1_DOMAIN",
93
91
  "GC_STOREFRONT_1_GOOGLE_ANALYTICS_ID",
@@ -121,7 +119,6 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
121
119
  "GC_STOREFRONT_2",
122
120
  "GC_STOREFRONT_2_CANONICAL_BASE_URL",
123
121
  "GC_STOREFRONT_2_CART_DISPLAY_PRICES_INCL_TAX",
124
- "GC_STOREFRONT_2_COMPARE_CHECKBOX",
125
122
  "GC_STOREFRONT_2_DEFAULT_LOCALE",
126
123
  "GC_STOREFRONT_2_DOMAIN",
127
124
  "GC_STOREFRONT_2_GOOGLE_ANALYTICS_ID",
@@ -155,7 +152,6 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
155
152
  "GC_STOREFRONT_3",
156
153
  "GC_STOREFRONT_3_CANONICAL_BASE_URL",
157
154
  "GC_STOREFRONT_3_CART_DISPLAY_PRICES_INCL_TAX",
158
- "GC_STOREFRONT_3_COMPARE_CHECKBOX",
159
155
  "GC_STOREFRONT_3_DEFAULT_LOCALE",
160
156
  "GC_STOREFRONT_3_DOMAIN",
161
157
  "GC_STOREFRONT_3_GOOGLE_ANALYTICS_ID",
@@ -189,7 +185,6 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
189
185
  "GC_STOREFRONT_4",
190
186
  "GC_STOREFRONT_4_CANONICAL_BASE_URL",
191
187
  "GC_STOREFRONT_4_CART_DISPLAY_PRICES_INCL_TAX",
192
- "GC_STOREFRONT_4_COMPARE_CHECKBOX",
193
188
  "GC_STOREFRONT_4_DEFAULT_LOCALE",
194
189
  "GC_STOREFRONT_4_DOMAIN",
195
190
  "GC_STOREFRONT_4_GOOGLE_ANALYTICS_ID",
@@ -223,7 +218,6 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
223
218
  "GC_STOREFRONT_5",
224
219
  "GC_STOREFRONT_5_CANONICAL_BASE_URL",
225
220
  "GC_STOREFRONT_5_CART_DISPLAY_PRICES_INCL_TAX",
226
- "GC_STOREFRONT_5_COMPARE_CHECKBOX",
227
221
  "GC_STOREFRONT_5_DEFAULT_LOCALE",
228
222
  "GC_STOREFRONT_5_DOMAIN",
229
223
  "GC_STOREFRONT_5_GOOGLE_ANALYTICS_ID",
@@ -257,7 +251,6 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
257
251
  "GC_STOREFRONT_6",
258
252
  "GC_STOREFRONT_6_CANONICAL_BASE_URL",
259
253
  "GC_STOREFRONT_6_CART_DISPLAY_PRICES_INCL_TAX",
260
- "GC_STOREFRONT_6_COMPARE_CHECKBOX",
261
254
  "GC_STOREFRONT_6_DEFAULT_LOCALE",
262
255
  "GC_STOREFRONT_6_DOMAIN",
263
256
  "GC_STOREFRONT_6_GOOGLE_ANALYTICS_ID",
@@ -291,7 +284,6 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
291
284
  "GC_STOREFRONT_7",
292
285
  "GC_STOREFRONT_7_CANONICAL_BASE_URL",
293
286
  "GC_STOREFRONT_7_CART_DISPLAY_PRICES_INCL_TAX",
294
- "GC_STOREFRONT_7_COMPARE_CHECKBOX",
295
287
  "GC_STOREFRONT_7_DEFAULT_LOCALE",
296
288
  "GC_STOREFRONT_7_DOMAIN",
297
289
  "GC_STOREFRONT_7_GOOGLE_ANALYTICS_ID",
@@ -325,7 +317,6 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
325
317
  "GC_STOREFRONT_8",
326
318
  "GC_STOREFRONT_8_CANONICAL_BASE_URL",
327
319
  "GC_STOREFRONT_8_CART_DISPLAY_PRICES_INCL_TAX",
328
- "GC_STOREFRONT_8_COMPARE_CHECKBOX",
329
320
  "GC_STOREFRONT_8_DEFAULT_LOCALE",
330
321
  "GC_STOREFRONT_8_DOMAIN",
331
322
  "GC_STOREFRONT_8_GOOGLE_ANALYTICS_ID",
@@ -359,7 +350,6 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
359
350
  "GC_STOREFRONT_9",
360
351
  "GC_STOREFRONT_9_CANONICAL_BASE_URL",
361
352
  "GC_STOREFRONT_9_CART_DISPLAY_PRICES_INCL_TAX",
362
- "GC_STOREFRONT_9_COMPARE_CHECKBOX",
363
353
  "GC_STOREFRONT_9_DEFAULT_LOCALE",
364
354
  "GC_STOREFRONT_9_DOMAIN",
365
355
  "GC_STOREFRONT_9_GOOGLE_ANALYTICS_ID",
@@ -393,7 +383,6 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
393
383
  "GC_STOREFRONT_10",
394
384
  "GC_STOREFRONT_10_CANONICAL_BASE_URL",
395
385
  "GC_STOREFRONT_10_CART_DISPLAY_PRICES_INCL_TAX",
396
- "GC_STOREFRONT_10_COMPARE_CHECKBOX",
397
386
  "GC_STOREFRONT_10_DEFAULT_LOCALE",
398
387
  "GC_STOREFRONT_10_DOMAIN",
399
388
  "GC_STOREFRONT_10_GOOGLE_ANALYTICS_ID",
@@ -427,7 +416,6 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
427
416
  "GC_STOREFRONT_11",
428
417
  "GC_STOREFRONT_11_CANONICAL_BASE_URL",
429
418
  "GC_STOREFRONT_11_CART_DISPLAY_PRICES_INCL_TAX",
430
- "GC_STOREFRONT_11_COMPARE_CHECKBOX",
431
419
  "GC_STOREFRONT_11_DEFAULT_LOCALE",
432
420
  "GC_STOREFRONT_11_DOMAIN",
433
421
  "GC_STOREFRONT_11_GOOGLE_ANALYTICS_ID",
@@ -461,7 +449,6 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
461
449
  "GC_STOREFRONT_12",
462
450
  "GC_STOREFRONT_12_CANONICAL_BASE_URL",
463
451
  "GC_STOREFRONT_12_CART_DISPLAY_PRICES_INCL_TAX",
464
- "GC_STOREFRONT_12_COMPARE_CHECKBOX",
465
452
  "GC_STOREFRONT_12_DEFAULT_LOCALE",
466
453
  "GC_STOREFRONT_12_DOMAIN",
467
454
  "GC_STOREFRONT_12_GOOGLE_ANALYTICS_ID",
@@ -495,7 +482,6 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
495
482
  "GC_STOREFRONT_13",
496
483
  "GC_STOREFRONT_13_CANONICAL_BASE_URL",
497
484
  "GC_STOREFRONT_13_CART_DISPLAY_PRICES_INCL_TAX",
498
- "GC_STOREFRONT_13_COMPARE_CHECKBOX",
499
485
  "GC_STOREFRONT_13_DEFAULT_LOCALE",
500
486
  "GC_STOREFRONT_13_DOMAIN",
501
487
  "GC_STOREFRONT_13_GOOGLE_ANALYTICS_ID",
@@ -529,7 +515,6 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
529
515
  "GC_STOREFRONT_14",
530
516
  "GC_STOREFRONT_14_CANONICAL_BASE_URL",
531
517
  "GC_STOREFRONT_14_CART_DISPLAY_PRICES_INCL_TAX",
532
- "GC_STOREFRONT_14_COMPARE_CHECKBOX",
533
518
  "GC_STOREFRONT_14_DEFAULT_LOCALE",
534
519
  "GC_STOREFRONT_14_DOMAIN",
535
520
  "GC_STOREFRONT_14_GOOGLE_ANALYTICS_ID",
@@ -563,7 +548,6 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
563
548
  "GC_STOREFRONT_15",
564
549
  "GC_STOREFRONT_15_CANONICAL_BASE_URL",
565
550
  "GC_STOREFRONT_15_CART_DISPLAY_PRICES_INCL_TAX",
566
- "GC_STOREFRONT_15_COMPARE_CHECKBOX",
567
551
  "GC_STOREFRONT_15_DEFAULT_LOCALE",
568
552
  "GC_STOREFRONT_15_DOMAIN",
569
553
  "GC_STOREFRONT_15_GOOGLE_ANALYTICS_ID",
@@ -597,7 +581,6 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
597
581
  "GC_STOREFRONT_16",
598
582
  "GC_STOREFRONT_16_CANONICAL_BASE_URL",
599
583
  "GC_STOREFRONT_16_CART_DISPLAY_PRICES_INCL_TAX",
600
- "GC_STOREFRONT_16_COMPARE_CHECKBOX",
601
584
  "GC_STOREFRONT_16_DEFAULT_LOCALE",
602
585
  "GC_STOREFRONT_16_DOMAIN",
603
586
  "GC_STOREFRONT_16_GOOGLE_ANALYTICS_ID",
@@ -631,7 +614,6 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
631
614
  "GC_STOREFRONT_17",
632
615
  "GC_STOREFRONT_17_CANONICAL_BASE_URL",
633
616
  "GC_STOREFRONT_17_CART_DISPLAY_PRICES_INCL_TAX",
634
- "GC_STOREFRONT_17_COMPARE_CHECKBOX",
635
617
  "GC_STOREFRONT_17_DEFAULT_LOCALE",
636
618
  "GC_STOREFRONT_17_DOMAIN",
637
619
  "GC_STOREFRONT_17_GOOGLE_ANALYTICS_ID",
@@ -665,7 +647,6 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
665
647
  "GC_STOREFRONT_18",
666
648
  "GC_STOREFRONT_18_CANONICAL_BASE_URL",
667
649
  "GC_STOREFRONT_18_CART_DISPLAY_PRICES_INCL_TAX",
668
- "GC_STOREFRONT_18_COMPARE_CHECKBOX",
669
650
  "GC_STOREFRONT_18_DEFAULT_LOCALE",
670
651
  "GC_STOREFRONT_18_DOMAIN",
671
652
  "GC_STOREFRONT_18_GOOGLE_ANALYTICS_ID",
@@ -699,7 +680,6 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
699
680
  "GC_STOREFRONT_19",
700
681
  "GC_STOREFRONT_19_CANONICAL_BASE_URL",
701
682
  "GC_STOREFRONT_19_CART_DISPLAY_PRICES_INCL_TAX",
702
- "GC_STOREFRONT_19_COMPARE_CHECKBOX",
703
683
  "GC_STOREFRONT_19_DEFAULT_LOCALE",
704
684
  "GC_STOREFRONT_19_DOMAIN",
705
685
  "GC_STOREFRONT_19_GOOGLE_ANALYTICS_ID",
@@ -733,7 +713,6 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
733
713
  "GC_STOREFRONT_20",
734
714
  "GC_STOREFRONT_20_CANONICAL_BASE_URL",
735
715
  "GC_STOREFRONT_20_CART_DISPLAY_PRICES_INCL_TAX",
736
- "GC_STOREFRONT_20_COMPARE_CHECKBOX",
737
716
  "GC_STOREFRONT_20_DEFAULT_LOCALE",
738
717
  "GC_STOREFRONT_20_DOMAIN",
739
718
  "GC_STOREFRONT_20_GOOGLE_ANALYTICS_ID",
@@ -25,6 +25,7 @@ async function generateConfig() {
25
25
  content: '/* eslint-disable */',
26
26
  schema: 'zod',
27
27
  notAllowEmptyString: true,
28
+ strictScalars: true,
28
29
  enumsAsTypes: true,
29
30
  scalarSchemas: {
30
31
  Domain: 'z.string()',
@@ -53,8 +53,9 @@ function withGraphCommerce(nextConfig, cwd) {
53
53
  return {
54
54
  ...nextConfig,
55
55
  experimental: {
56
- enableUndici: true,
57
56
  ...nextConfig.experimental,
57
+ scrollRestoration: true,
58
+ swcPlugins: [...(nextConfig.experimental?.swcPlugins ?? []), ['@lingui/swc-plugin', {}]],
58
59
  },
59
60
  i18n: {
60
61
  defaultLocale: storefront.find((locale) => locale.defaultLocale)?.locale ?? storefront[0].locale,
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": "6.2.0-canary.40",
5
+ "version": "6.2.0-canary.42",
6
6
  "type": "commonjs",
7
7
  "main": "dist/index.js",
8
8
  "types": "src/index.ts",
@@ -13,8 +13,9 @@
13
13
  },
14
14
  "dependencies": {
15
15
  "@graphql-mesh/cli": "latest",
16
- "@lingui/loader": "3.17.2",
17
- "@swc/core": "1.3.39",
16
+ "@lingui/loader": "4.2.1",
17
+ "@swc/core": "1.3.62",
18
+ "@lingui/swc-plugin": "^4.0.2",
18
19
  "circular-dependency-plugin": "^5.2.2",
19
20
  "inspectpack": "^4.7.1",
20
21
  "js-yaml-loader": "^1.2.2",
@@ -26,7 +27,7 @@
26
27
  "@types/circular-dependency-plugin": "^5.0.5",
27
28
  "@types/cli-table": "^0.3.1",
28
29
  "@types/lodash": "^4.14.191",
29
- "typescript": "4.9.5"
30
+ "typescript": "5.1.3"
30
31
  },
31
32
  "peerDependencies": {
32
33
  "next": "^13.2.0",
@@ -27,6 +27,7 @@ export async function generateConfig() {
27
27
  content: '/* eslint-disable */',
28
28
  schema: 'zod',
29
29
  notAllowEmptyString: true,
30
+ strictScalars: true,
30
31
  enumsAsTypes: true,
31
32
  scalarSchemas: {
32
33
  Domain: 'z.string()',
@@ -5,13 +5,15 @@ export type InputMaybe<T> = Maybe<T>;
5
5
  export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
6
6
  export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
7
7
  export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
8
+ export type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };
9
+ export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
8
10
  /** All built-in and custom scalars, mapped to their actual values */
9
11
  export type Scalars = {
10
- ID: string;
11
- String: string;
12
- Boolean: boolean;
13
- Int: number;
14
- Float: number;
12
+ ID: { input: string | number; output: string; }
13
+ String: { input: string; output: string; }
14
+ Boolean: { input: boolean; output: boolean; }
15
+ Int: { input: number; output: number; }
16
+ Float: { input: number; output: number; }
15
17
  };
16
18
 
17
19
  export type CompareVariant =
@@ -104,15 +106,15 @@ export type GraphCommerceConfig = {
104
106
  * - https://example.com/en
105
107
  * - https://example.com/en-US
106
108
  */
107
- canonicalBaseUrl: Scalars['String'];
109
+ canonicalBaseUrl: Scalars['String']['input'];
108
110
  /**
109
111
  * Due to a limitation of the GraphQL API it is not possible to determine if a cart should be displayed including or excluding tax.
110
112
  *
111
113
  * When Magento's StoreConfig adds this value, this can be replaced.
112
114
  */
113
- cartDisplayPricesInclTax?: InputMaybe<Scalars['Boolean']>;
115
+ cartDisplayPricesInclTax?: InputMaybe<Scalars['Boolean']['input']>;
114
116
  /** Use compare functionality */
115
- compare?: InputMaybe<Scalars['Boolean']>;
117
+ compare?: InputMaybe<Scalars['Boolean']['input']>;
116
118
  /**
117
119
  * By default the compare feature is denoted with a 'compare ICON' (2 arrows facing one another).
118
120
  * This may be fine for experienced users, but for more clarity it's also possible to present the compare feature as a CHECKBOX accompanied by the 'Compare' label
@@ -125,7 +127,7 @@ export type GraphCommerceConfig = {
125
127
  * This value should match Magento 2's configuration value for
126
128
  * `customer/create_account/confirm` and should be removed once we can query
127
129
  */
128
- customerRequireEmailConfirmation?: InputMaybe<Scalars['Boolean']>;
130
+ customerRequireEmailConfirmation?: InputMaybe<Scalars['Boolean']['input']>;
129
131
  /** Debug configuration for GraphCommerce */
130
132
  debug?: InputMaybe<GraphCommerceDebugConfig>;
131
133
  /**
@@ -135,7 +137,7 @@ export type GraphCommerceConfig = {
135
137
  * - Adds "dominant_color" attribute swatches to the product list items.
136
138
  * - Creates a big list items in the product list.
137
139
  */
138
- demoMode?: InputMaybe<Scalars['Boolean']>;
140
+ demoMode?: InputMaybe<Scalars['Boolean']['input']>;
139
141
  /**
140
142
  * See https://support.google.com/analytics/answer/9539598?hl=en
141
143
  *
@@ -143,7 +145,7 @@ export type GraphCommerceConfig = {
143
145
  *
144
146
  * To override the value for a specific locale, configure in i18n config.
145
147
  */
146
- googleAnalyticsId?: InputMaybe<Scalars['String']>;
148
+ googleAnalyticsId?: InputMaybe<Scalars['String']['input']>;
147
149
  /**
148
150
  * Google reCAPTCHA site key.
149
151
  * When using reCAPTCHA, this value is required, even if you are configuring different values for each locale.
@@ -153,13 +155,13 @@ export type GraphCommerceConfig = {
153
155
  * The secret key should be added in the Magento admin panel (Stores > Configuration > Security > Google ReCAPTCHA Storefront > reCAPTCHA v3 Invisible)
154
156
  * ReCAPTCHA can then be enabled/disabled for the different forms, separately (Stores > Configuration > Security > Google ReCAPTCHA Storefront > Storefront)
155
157
  */
156
- googleRecaptchaKey?: InputMaybe<Scalars['String']>;
158
+ googleRecaptchaKey?: InputMaybe<Scalars['String']['input']>;
157
159
  /**
158
160
  * The Google Tagmanager ID to be used on the site.
159
161
  *
160
162
  * This value is required even if you are configuring different values for each locale.
161
163
  */
162
- googleTagmanagerId?: InputMaybe<Scalars['String']>;
164
+ googleTagmanagerId?: InputMaybe<Scalars['String']['input']>;
163
165
  /**
164
166
  * The HyGraph endpoint.
165
167
  *
@@ -167,7 +169,7 @@ export type GraphCommerceConfig = {
167
169
  *
168
170
  * Project settings -> API Access -> High Performance Read-only Content API
169
171
  */
170
- hygraphEndpoint: Scalars['String'];
172
+ hygraphEndpoint: Scalars['String']['input'];
171
173
  /**
172
174
  * Content API. **Only used for migrations.**
173
175
  *
@@ -175,7 +177,7 @@ export type GraphCommerceConfig = {
175
177
  *
176
178
  * Project settings -> API Access -> Content API
177
179
  */
178
- hygraphWriteAccessEndpoint?: InputMaybe<Scalars['String']>;
180
+ hygraphWriteAccessEndpoint?: InputMaybe<Scalars['String']['input']>;
179
181
  /**
180
182
  * Hygraph Management SDK Authorization Token. **Only used for migrations.**
181
183
  *
@@ -201,7 +203,7 @@ export type GraphCommerceConfig = {
201
203
  * yarn graphcommerce hygraph-migrate
202
204
  * ```
203
205
  */
204
- hygraphWriteAccessToken?: InputMaybe<Scalars['String']>;
206
+ hygraphWriteAccessToken?: InputMaybe<Scalars['String']['input']>;
205
207
  /**
206
208
  * On older versions of GraphCommerce products would use a product type specific route.
207
209
  *
@@ -209,57 +211,57 @@ export type GraphCommerceConfig = {
209
211
  *
210
212
  * @deprecated Will be removed in a future version. [migration](../upgrading/graphcommerce-5-to-6.md#product-routing-changes)
211
213
  */
212
- legacyProductRoute?: InputMaybe<Scalars['Boolean']>;
214
+ legacyProductRoute?: InputMaybe<Scalars['Boolean']['input']>;
213
215
  /** Limit the static generation of SSG when building */
214
- limitSsg?: InputMaybe<Scalars['Boolean']>;
216
+ limitSsg?: InputMaybe<Scalars['Boolean']['input']>;
215
217
  /**
216
218
  * GraphQL Magento endpoint.
217
219
  *
218
220
  * Examples:
219
221
  * - https://magento2.test/graphql
220
222
  */
221
- magentoEndpoint: Scalars['String'];
223
+ magentoEndpoint: Scalars['String']['input'];
222
224
  /** To enable next.js' preview mode, configure the secret you'd like to use. */
223
- previewSecret?: InputMaybe<Scalars['String']>;
225
+ previewSecret?: InputMaybe<Scalars['String']['input']>;
224
226
  /**
225
227
  * Product filters with better UI for mobile and desktop.
226
228
  *
227
229
  * @experimental This is an experimental feature and may change in the future.
228
230
  */
229
- productFiltersPro?: InputMaybe<Scalars['Boolean']>;
231
+ productFiltersPro?: InputMaybe<Scalars['Boolean']['input']>;
230
232
  /**
231
233
  * By default we route products to /p/[url] but you can change this to /product/[url] if you wish.
232
234
  *
233
235
  * Default: '/p/'
234
236
  * Example: '/product/'
235
237
  */
236
- productRoute?: InputMaybe<Scalars['String']>;
238
+ productRoute?: InputMaybe<Scalars['String']['input']>;
237
239
  /**
238
240
  * Allow the site to be indexed by search engines.
239
241
  * If false, the robots.txt file will be set to disallow all.
240
242
  */
241
- robotsAllow?: InputMaybe<Scalars['Boolean']>;
243
+ robotsAllow?: InputMaybe<Scalars['Boolean']['input']>;
242
244
  /** All storefront configuration for the project */
243
245
  storefront: Array<GraphCommerceStorefrontConfig>;
244
246
  /** Hide the wishlist functionality for guests. */
245
- wishlistHideForGuests?: InputMaybe<Scalars['Boolean']>;
247
+ wishlistHideForGuests?: InputMaybe<Scalars['Boolean']['input']>;
246
248
  /** Ignores whether a product is already in the wishlist, makes the toggle an add only. */
247
- wishlistIgnoreProductWishlistStatus?: InputMaybe<Scalars['Boolean']>;
249
+ wishlistIgnoreProductWishlistStatus?: InputMaybe<Scalars['Boolean']['input']>;
248
250
  /** Show a message when the product is added to the wishlist. */
249
- wishlistShowFeedbackMessage?: InputMaybe<Scalars['Boolean']>;
251
+ wishlistShowFeedbackMessage?: InputMaybe<Scalars['Boolean']['input']>;
250
252
  };
251
253
 
252
254
  /** Debug configuration for GraphCommerce */
253
255
  export type GraphCommerceDebugConfig = {
254
256
  /** Reports which plugins are enabled or disabled. */
255
- pluginStatus?: InputMaybe<Scalars['Boolean']>;
257
+ pluginStatus?: InputMaybe<Scalars['Boolean']['input']>;
256
258
  /**
257
259
  * Cyclic dependencies can cause memory issues and other strange bugs.
258
260
  * This plugin will warn you when it detects a cyclic dependency.
259
261
  *
260
262
  * When running into memory issues, it can be useful to enable this plugin.
261
263
  */
262
- webpackCircularDependencyPlugin?: InputMaybe<Scalars['Boolean']>;
264
+ webpackCircularDependencyPlugin?: InputMaybe<Scalars['Boolean']['input']>;
263
265
  /**
264
266
  * When updating packages it can happen that the same package is included with different versions in the same project.
265
267
  *
@@ -267,7 +269,7 @@ export type GraphCommerceDebugConfig = {
267
269
  * - The same package is included multiple times in the bundle, increasing the bundle size.
268
270
  * - The Typescript types of the package are not compatible with each other, causing Typescript errors.
269
271
  */
270
- webpackDuplicatesPlugin?: InputMaybe<Scalars['Boolean']>;
272
+ webpackDuplicatesPlugin?: InputMaybe<Scalars['Boolean']['input']>;
271
273
  };
272
274
 
273
275
  /** All storefront configuration for the project */
@@ -280,33 +282,33 @@ export type GraphCommerceStorefrontConfig = {
280
282
  * - https://example.com/en
281
283
  * - https://example.com/en-US
282
284
  */
283
- canonicalBaseUrl?: InputMaybe<Scalars['String']>;
285
+ canonicalBaseUrl?: InputMaybe<Scalars['String']['input']>;
284
286
  /** Due to a limitation of the GraphQL API it is not possible to determine if a cart should be displayed including or excluding tax. */
285
- cartDisplayPricesInclTax?: InputMaybe<Scalars['Boolean']>;
287
+ cartDisplayPricesInclTax?: InputMaybe<Scalars['Boolean']['input']>;
286
288
  /**
287
289
  * There can only be one entry with defaultLocale set to true.
288
290
  * - If there are more, the first one is used.
289
291
  * - If there is none, the first entry is used.
290
292
  */
291
- defaultLocale?: InputMaybe<Scalars['Boolean']>;
293
+ defaultLocale?: InputMaybe<Scalars['Boolean']['input']>;
292
294
  /** Domain configuration, must be a domain https://tools.ietf.org/html/rfc3986 */
293
- domain?: InputMaybe<Scalars['String']>;
295
+ domain?: InputMaybe<Scalars['String']['input']>;
294
296
  /**
295
297
  * Configure different Google Analytics IDs for different locales.
296
298
  *
297
299
  * To disable for a specific locale, set the value to null.
298
300
  */
299
- googleAnalyticsId?: InputMaybe<Scalars['String']>;
301
+ googleAnalyticsId?: InputMaybe<Scalars['String']['input']>;
300
302
  /** Locale specific google reCAPTCHA key. */
301
- googleRecaptchaKey?: InputMaybe<Scalars['String']>;
303
+ googleRecaptchaKey?: InputMaybe<Scalars['String']['input']>;
302
304
  /** The Google Tagmanager ID to be used per locale. */
303
- googleTagmanagerId?: InputMaybe<Scalars['String']>;
305
+ googleTagmanagerId?: InputMaybe<Scalars['String']['input']>;
304
306
  /** Add a gcms-locales header to make sure queries return in a certain language, can be an array to define fallbacks. */
305
- hygraphLocales?: InputMaybe<Array<Scalars['String']>>;
307
+ hygraphLocales?: InputMaybe<Array<Scalars['String']['input']>>;
306
308
  /** Specify a custom locale for to load translations. */
307
- linguiLocale?: InputMaybe<Scalars['String']>;
309
+ linguiLocale?: InputMaybe<Scalars['String']['input']>;
308
310
  /** Must be a locale string https://www.unicode.org/reports/tr35/tr35-59/tr35.html#Identifiers */
309
- locale: Scalars['String'];
311
+ locale: Scalars['String']['input'];
310
312
  /**
311
313
  * Magento store code.
312
314
  *
@@ -317,7 +319,7 @@ export type GraphCommerceStorefrontConfig = {
317
319
  * - en-us
318
320
  * - b2b-us
319
321
  */
320
- magentoStoreCode: Scalars['String'];
322
+ magentoStoreCode: Scalars['String']['input'];
321
323
  };
322
324
 
323
325
 
@@ -334,7 +336,7 @@ export const definedNonNullAnySchema = z.any().refine((v) => isDefinedNonNullAny
334
336
  export const CompareVariantSchema = z.enum(['CHECKBOX', 'ICON']);
335
337
 
336
338
  export function GraphCommerceConfigSchema(): z.ZodObject<Properties<GraphCommerceConfig>> {
337
- return z.object<Properties<GraphCommerceConfig>>({
339
+ return z.object({
338
340
  canonicalBaseUrl: z.string().min(1),
339
341
  cartDisplayPricesInclTax: z.boolean().nullish(),
340
342
  compare: z.boolean().nullish(),
@@ -363,7 +365,7 @@ export function GraphCommerceConfigSchema(): z.ZodObject<Properties<GraphCommerc
363
365
  }
364
366
 
365
367
  export function GraphCommerceDebugConfigSchema(): z.ZodObject<Properties<GraphCommerceDebugConfig>> {
366
- return z.object<Properties<GraphCommerceDebugConfig>>({
368
+ return z.object({
367
369
  pluginStatus: z.boolean().nullish(),
368
370
  webpackCircularDependencyPlugin: z.boolean().nullish(),
369
371
  webpackDuplicatesPlugin: z.boolean().nullish()
@@ -371,7 +373,7 @@ export function GraphCommerceDebugConfigSchema(): z.ZodObject<Properties<GraphCo
371
373
  }
372
374
 
373
375
  export function GraphCommerceStorefrontConfigSchema(): z.ZodObject<Properties<GraphCommerceStorefrontConfig>> {
374
- return z.object<Properties<GraphCommerceStorefrontConfig>>({
376
+ return z.object({
375
377
  canonicalBaseUrl: z.string().nullish(),
376
378
  cartDisplayPricesInclTax: z.boolean().nullish(),
377
379
  defaultLocale: z.boolean().nullish(),
@@ -61,8 +61,9 @@ export function withGraphCommerce(nextConfig: NextConfig, cwd: string): NextConf
61
61
  return {
62
62
  ...nextConfig,
63
63
  experimental: {
64
- enableUndici: true,
65
64
  ...nextConfig.experimental,
65
+ scrollRestoration: true,
66
+ swcPlugins: [...(nextConfig.experimental?.swcPlugins ?? []), ['@lingui/swc-plugin', {}]],
66
67
  },
67
68
  i18n: {
68
69
  defaultLocale: