@graphcommerce/next-config 9.0.0-canary.56 → 9.0.0-canary.58
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 +55 -84
- package/__tests__/config/utils/__snapshots__/mergeEnvIntoConfig.ts.snap +1 -0
- package/__tests__/interceptors/findPlugins.ts +12 -0
- package/__tests__/interceptors/parseStructure.ts +80 -0
- package/dist/config/commands/exportConfig.js +1 -2
- package/dist/config/commands/generateConfig.js +1 -2
- package/dist/config/loadConfig.js +1 -2
- package/dist/config/utils/configToImportMeta.js +1 -2
- package/dist/config/utils/diff.js +1 -1
- package/dist/config/utils/exportConfigToEnv.js +1 -2
- package/dist/config/utils/mergeEnvIntoConfig.js +4 -4
- package/dist/config/utils/replaceConfigInString.js +1 -2
- package/dist/config/utils/rewriteLegacyEnv.js +1 -2
- package/dist/generated/config.js +9 -8
- package/dist/interceptors/Visitor.js +1 -1
- package/dist/interceptors/commands/codegenInterceptors.js +1 -2
- package/dist/interceptors/extractExports.js +2 -2
- package/dist/interceptors/findOriginalSource.js +1 -2
- package/dist/interceptors/findPlugins.js +1 -2
- package/dist/interceptors/generateInterceptor.js +8 -8
- package/dist/interceptors/generateInterceptors.js +1 -2
- package/dist/interceptors/parseStructure.js +11 -6
- package/dist/interceptors/swc.js +2 -3
- package/dist/interceptors/writeInterceptors.js +1 -2
- package/dist/utils/isMonorepo.js +1 -2
- package/dist/utils/resolveDependenciesSync.js +2 -3
- package/dist/withGraphCommerce.js +1 -2
- package/package.json +10 -11
- package/src/generated/config.ts +7 -0
- package/src/interceptors/Visitor.ts +1 -1
- package/src/interceptors/generateInterceptor.ts +1 -1
- package/src/interceptors/parseStructure.ts +11 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 9.0.0-canary.58
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#2330](https://github.com/graphcommerce-org/graphcommerce/pull/2330) [`5701e71`](https://github.com/graphcommerce-org/graphcommerce/commit/5701e71454ffb52880cd15c3341826d9502284d0) - Added support for boolean `ifConfig: ['customerXMagentoCacheIdDisable', true]` values in plugin configurations ([@paales](https://github.com/paales))
|
|
8
|
+
|
|
9
|
+
## 9.0.0-canary.57
|
|
10
|
+
|
|
3
11
|
## 9.0.0-canary.56
|
|
4
12
|
|
|
5
13
|
## 9.0.0-canary.55
|
|
@@ -24,13 +32,11 @@
|
|
|
24
32
|
|
|
25
33
|
### Minor Changes
|
|
26
34
|
|
|
27
|
-
- [#2313](https://github.com/graphcommerce-org/graphcommerce/pull/2313) [`511e75c`](https://github.com/graphcommerce-org/graphcommerce/commit/511e75c3f8c077e617ed17e5042796e2411f312f) - Add the customerNote field to the shipping and customer address forms
|
|
28
|
-
([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
|
|
35
|
+
- [#2313](https://github.com/graphcommerce-org/graphcommerce/pull/2313) [`511e75c`](https://github.com/graphcommerce-org/graphcommerce/commit/511e75c3f8c077e617ed17e5042796e2411f312f) - Add the customerNote field to the shipping and customer address forms ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
|
|
29
36
|
|
|
30
37
|
### Patch Changes
|
|
31
38
|
|
|
32
|
-
- [#2314](https://github.com/graphcommerce-org/graphcommerce/pull/2314) [`ccd218c`](https://github.com/graphcommerce-org/graphcommerce/commit/ccd218c827d8ba7e632fa40ed75ad63a38620275) - Solve an issue where interceptors were immediately deleted after generating
|
|
33
|
-
([@paales](https://github.com/paales))
|
|
39
|
+
- [#2314](https://github.com/graphcommerce-org/graphcommerce/pull/2314) [`ccd218c`](https://github.com/graphcommerce-org/graphcommerce/commit/ccd218c827d8ba7e632fa40ed75ad63a38620275) - Solve an issue where interceptors were immediately deleted after generating ([@paales](https://github.com/paales))
|
|
34
40
|
|
|
35
41
|
## 8.1.0-canary.45
|
|
36
42
|
|
|
@@ -44,16 +50,13 @@
|
|
|
44
50
|
|
|
45
51
|
### Patch Changes
|
|
46
52
|
|
|
47
|
-
- [#2242](https://github.com/graphcommerce-org/graphcommerce/pull/2242) [`a4cce76`](https://github.com/graphcommerce-org/graphcommerce/commit/a4cce76ca37af2bec604e953ada4bb11bd91f55d) - Add option to show an extended version of the pagination component. Configurable via the "productListPaginationVariant" key in your graphcommerce.config.js
|
|
48
|
-
COMPACT means: "< Page X of Y >"
|
|
49
|
-
EXTENDED means: "< 1 2 ... [5] ... 10 11 >" ([@FrankHarland](https://github.com/FrankHarland))
|
|
53
|
+
- [#2242](https://github.com/graphcommerce-org/graphcommerce/pull/2242) [`a4cce76`](https://github.com/graphcommerce-org/graphcommerce/commit/a4cce76ca37af2bec604e953ada4bb11bd91f55d) - Add option to show an extended version of the pagination component. Configurable via the "productListPaginationVariant" key in your graphcommerce.config.js COMPACT means: "< Page X of Y >" EXTENDED means: "< 1 2 ... [5] ... 10 11 >" ([@FrankHarland](https://github.com/FrankHarland))
|
|
50
54
|
|
|
51
55
|
## 8.1.0-canary.40
|
|
52
56
|
|
|
53
57
|
### Minor Changes
|
|
54
58
|
|
|
55
|
-
- [#2306](https://github.com/graphcommerce-org/graphcommerce/pull/2306) [`5e188e8`](https://github.com/graphcommerce-org/graphcommerce/commit/5e188e830dca4730c73830858f59a94e9d41ed12) - Add delete account functionality to the account section. Disabled by default and can be enabled through the config.
|
|
56
|
-
([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
|
|
59
|
+
- [#2306](https://github.com/graphcommerce-org/graphcommerce/pull/2306) [`5e188e8`](https://github.com/graphcommerce-org/graphcommerce/commit/5e188e830dca4730c73830858f59a94e9d41ed12) - Add delete account functionality to the account section. Disabled by default and can be enabled through the config. ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
|
|
57
60
|
|
|
58
61
|
## 8.1.0-canary.39
|
|
59
62
|
|
|
@@ -61,8 +64,7 @@
|
|
|
61
64
|
|
|
62
65
|
### Minor Changes
|
|
63
66
|
|
|
64
|
-
- [#2305](https://github.com/graphcommerce-org/graphcommerce/pull/2305) [`77e8297`](https://github.com/graphcommerce-org/graphcommerce/commit/77e82976816994336c616208a651cb18ce9ea270) - Add company and vat fields to shipping and billing forms
|
|
65
|
-
([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
|
|
67
|
+
- [#2305](https://github.com/graphcommerce-org/graphcommerce/pull/2305) [`77e8297`](https://github.com/graphcommerce-org/graphcommerce/commit/77e82976816994336c616208a651cb18ce9ea270) - Add company and vat fields to shipping and billing forms ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
|
|
66
68
|
|
|
67
69
|
## 8.1.0-canary.37
|
|
68
70
|
|
|
@@ -78,8 +80,7 @@
|
|
|
78
80
|
|
|
79
81
|
### Patch Changes
|
|
80
82
|
|
|
81
|
-
- [#2299](https://github.com/graphcommerce-org/graphcommerce/pull/2299) [`85d258a`](https://github.com/graphcommerce-org/graphcommerce/commit/85d258a0d1a48bb1b502cccba30a9844f2257814) - Solve an issue where an env variable wouldn't be coerced to a Number if a Config.graphqls value is defined as an Int/Float
|
|
82
|
-
([@paales](https://github.com/paales))
|
|
83
|
+
- [#2299](https://github.com/graphcommerce-org/graphcommerce/pull/2299) [`85d258a`](https://github.com/graphcommerce-org/graphcommerce/commit/85d258a0d1a48bb1b502cccba30a9844f2257814) - Solve an issue where an env variable wouldn't be coerced to a Number if a Config.graphqls value is defined as an Int/Float ([@paales](https://github.com/paales))
|
|
83
84
|
|
|
84
85
|
## 8.1.0-canary.31
|
|
85
86
|
|
|
@@ -91,8 +92,7 @@
|
|
|
91
92
|
|
|
92
93
|
### Patch Changes
|
|
93
94
|
|
|
94
|
-
- [#2292](https://github.com/graphcommerce-org/graphcommerce/pull/2292) [`6258adb`](https://github.com/graphcommerce-org/graphcommerce/commit/6258adbe294590ba52d3aaf65712cdc561f32c4c) - Be able to handle plugin runtime values values when parsing the source. Also, make sure parsed plugin sources do not return duplicate plugins.
|
|
95
|
-
([@paales](https://github.com/paales))
|
|
95
|
+
- [#2292](https://github.com/graphcommerce-org/graphcommerce/pull/2292) [`6258adb`](https://github.com/graphcommerce-org/graphcommerce/commit/6258adbe294590ba52d3aaf65712cdc561f32c4c) - Be able to handle plugin runtime values values when parsing the source. Also, make sure parsed plugin sources do not return duplicate plugins. ([@paales](https://github.com/paales))
|
|
96
96
|
|
|
97
97
|
## 8.1.0-canary.27
|
|
98
98
|
|
|
@@ -132,40 +132,31 @@
|
|
|
132
132
|
|
|
133
133
|
### Patch Changes
|
|
134
134
|
|
|
135
|
-
- [#2251](https://github.com/graphcommerce-org/graphcommerce/pull/2251) [`bc6a9b4`](https://github.com/graphcommerce-org/graphcommerce/commit/bc6a9b4a7e9769977e98449a418bb239f92ec544) - When creating a release PR, make sure it is created against the main branch so it can be directly merged.
|
|
136
|
-
([@paales](https://github.com/paales))
|
|
135
|
+
- [#2251](https://github.com/graphcommerce-org/graphcommerce/pull/2251) [`bc6a9b4`](https://github.com/graphcommerce-org/graphcommerce/commit/bc6a9b4a7e9769977e98449a418bb239f92ec544) - When creating a release PR, make sure it is created against the main branch so it can be directly merged. ([@paales](https://github.com/paales))
|
|
137
136
|
|
|
138
137
|
## 8.1.0-canary.9
|
|
139
138
|
|
|
140
139
|
### Patch Changes
|
|
141
140
|
|
|
142
|
-
- [#2223](https://github.com/graphcommerce-org/graphcommerce/pull/2223) [`4f7fe02`](https://github.com/graphcommerce-org/graphcommerce/commit/4f7fe02c6f0f017d7a52559df1972551eb0cba47) - Added robotsAllow to storefront config
|
|
143
|
-
([@bramvanderholst](https://github.com/bramvanderholst))
|
|
141
|
+
- [#2223](https://github.com/graphcommerce-org/graphcommerce/pull/2223) [`4f7fe02`](https://github.com/graphcommerce-org/graphcommerce/commit/4f7fe02c6f0f017d7a52559df1972551eb0cba47) - Added robotsAllow to storefront config ([@bramvanderholst](https://github.com/bramvanderholst))
|
|
144
142
|
|
|
145
143
|
## 8.1.0-canary.8
|
|
146
144
|
|
|
147
145
|
### Patch Changes
|
|
148
146
|
|
|
149
|
-
- [#2247](https://github.com/graphcommerce-org/graphcommerce/pull/2247) [`5153904`](https://github.com/graphcommerce-org/graphcommerce/commit/51539045cb3e14424141a65a1fd89216d3ee6fc2) - Added PRIVATE_ADDITIONAL_DEPENDENCIES to enable packages that we do not want to have in the examples directory but we do want to be able to demo.
|
|
150
|
-
([@paales](https://github.com/paales))
|
|
147
|
+
- [#2247](https://github.com/graphcommerce-org/graphcommerce/pull/2247) [`5153904`](https://github.com/graphcommerce-org/graphcommerce/commit/51539045cb3e14424141a65a1fd89216d3ee6fc2) - Added PRIVATE_ADDITIONAL_DEPENDENCIES to enable packages that we do not want to have in the examples directory but we do want to be able to demo. ([@paales](https://github.com/paales))
|
|
151
148
|
|
|
152
|
-
- [#2247](https://github.com/graphcommerce-org/graphcommerce/pull/2247) [`6831040`](https://github.com/graphcommerce-org/graphcommerce/commit/68310401448b7b42b53757db4a84de4a01e35aa2) - reduce bundlesize of @apollo/client
|
|
153
|
-
([@paales](https://github.com/paales))
|
|
149
|
+
- [#2247](https://github.com/graphcommerce-org/graphcommerce/pull/2247) [`6831040`](https://github.com/graphcommerce-org/graphcommerce/commit/68310401448b7b42b53757db4a84de4a01e35aa2) - reduce bundlesize of @apollo/client ([@paales](https://github.com/paales))
|
|
154
150
|
|
|
155
|
-
- [#2247](https://github.com/graphcommerce-org/graphcommerce/pull/2247) [`81c6c81`](https://github.com/graphcommerce-org/graphcommerce/commit/81c6c81e1b4a31df3c400a3ee4311bdf2b46a2b5) - Solved an issue where the plugins would be generated with the wrong path
|
|
156
|
-
([@paales](https://github.com/paales))
|
|
151
|
+
- [#2247](https://github.com/graphcommerce-org/graphcommerce/pull/2247) [`81c6c81`](https://github.com/graphcommerce-org/graphcommerce/commit/81c6c81e1b4a31df3c400a3ee4311bdf2b46a2b5) - Solved an issue where the plugins would be generated with the wrong path ([@paales](https://github.com/paales))
|
|
157
152
|
|
|
158
|
-
- [#2247](https://github.com/graphcommerce-org/graphcommerce/pull/2247) [`6831040`](https://github.com/graphcommerce-org/graphcommerce/commit/68310401448b7b42b53757db4a84de4a01e35aa2) - Suppress warning where a dependency is an expression, Added uglify-es and long as the dependencies couldn’t be found
|
|
159
|
-
([@paales](https://github.com/paales))
|
|
153
|
+
- [#2247](https://github.com/graphcommerce-org/graphcommerce/pull/2247) [`6831040`](https://github.com/graphcommerce-org/graphcommerce/commit/68310401448b7b42b53757db4a84de4a01e35aa2) - Suppress warning where a dependency is an expression, Added uglify-es and long as the dependencies couldn’t be found ([@paales](https://github.com/paales))
|
|
160
154
|
|
|
161
|
-
- [#2247](https://github.com/graphcommerce-org/graphcommerce/pull/2247) [`cfc0f4e`](https://github.com/graphcommerce-org/graphcommerce/commit/cfc0f4e015f3b3a7348b882eb7440222b3e26a07) - Make sure the interceptors are generated before the typecheck is ran.
|
|
162
|
-
([@paales](https://github.com/paales))
|
|
155
|
+
- [#2247](https://github.com/graphcommerce-org/graphcommerce/pull/2247) [`cfc0f4e`](https://github.com/graphcommerce-org/graphcommerce/commit/cfc0f4e015f3b3a7348b882eb7440222b3e26a07) - Make sure the interceptors are generated before the typecheck is ran. ([@paales](https://github.com/paales))
|
|
163
156
|
|
|
164
|
-
- [#2247](https://github.com/graphcommerce-org/graphcommerce/pull/2247) [`444e446`](https://github.com/graphcommerce-org/graphcommerce/commit/444e446a218cc9da3defb940a6d5cce0229ff845) - Added clear upgrade instructions for linguiLocale
|
|
165
|
-
([@paales](https://github.com/paales))
|
|
157
|
+
- [#2247](https://github.com/graphcommerce-org/graphcommerce/pull/2247) [`444e446`](https://github.com/graphcommerce-org/graphcommerce/commit/444e446a218cc9da3defb940a6d5cce0229ff845) - Added clear upgrade instructions for linguiLocale ([@paales](https://github.com/paales))
|
|
166
158
|
|
|
167
|
-
- [#2247](https://github.com/graphcommerce-org/graphcommerce/pull/2247) [`3f9d8f5`](https://github.com/graphcommerce-org/graphcommerce/commit/3f9d8f5ee9437fa90589ebd8ba8d1e790006b6ae) - Added better interceptor comments and link to original files
|
|
168
|
-
([@paales](https://github.com/paales))
|
|
159
|
+
- [#2247](https://github.com/graphcommerce-org/graphcommerce/pull/2247) [`3f9d8f5`](https://github.com/graphcommerce-org/graphcommerce/commit/3f9d8f5ee9437fa90589ebd8ba8d1e790006b6ae) - Added better interceptor comments and link to original files ([@paales](https://github.com/paales))
|
|
169
160
|
|
|
170
161
|
## 8.1.0-canary.7
|
|
171
162
|
|
|
@@ -195,17 +186,17 @@
|
|
|
195
186
|
5. We now support replace plugins (`type: 'replace'`), which allow you to replace the original component/function/const completely (and type checked of course).
|
|
196
187
|
|
|
197
188
|
```tsx
|
|
198
|
-
import { ProductPageNameProps } from
|
|
199
|
-
import { PluginConfig } from
|
|
189
|
+
import { ProductPageNameProps } from '@graphcommerce/magento-product'
|
|
190
|
+
import { PluginConfig } from '@graphcommerce/next-config'
|
|
200
191
|
|
|
201
192
|
export const config: PluginConfig = {
|
|
202
|
-
type:
|
|
203
|
-
module:
|
|
204
|
-
}
|
|
193
|
+
type: 'replace',
|
|
194
|
+
module: '@graphcommerce/magento-product',
|
|
195
|
+
}
|
|
205
196
|
|
|
206
197
|
export function ProductPageName(props: ProductPageNameProps) {
|
|
207
|
-
const { product } = props
|
|
208
|
-
return <div>REPLACEMENT {product.url_key}</div
|
|
198
|
+
const { product } = props
|
|
199
|
+
return <div>REPLACEMENT {product.url_key}</div>
|
|
209
200
|
}
|
|
210
201
|
```
|
|
211
202
|
|
|
@@ -215,10 +206,10 @@
|
|
|
215
206
|
|
|
216
207
|
```tsx
|
|
217
208
|
export const config: PluginConfig = {
|
|
218
|
-
type:
|
|
219
|
-
module:
|
|
220
|
-
ifConfig: [
|
|
221
|
-
}
|
|
209
|
+
type: 'replace',
|
|
210
|
+
module: '@graphcommerce/magento-product',
|
|
211
|
+
ifConfig: ['theme', 'my-theme'],
|
|
212
|
+
}
|
|
222
213
|
```
|
|
223
214
|
|
|
224
215
|
This allows you to support multiple builds with different plugins applied. For example one build with `GC_THEME=my-theme` and another with `GC_THEME=my-other-theme`. ([@paales](https://github.com/paales))
|
|
@@ -227,8 +218,7 @@
|
|
|
227
218
|
|
|
228
219
|
### Patch Changes
|
|
229
220
|
|
|
230
|
-
- [#2227](https://github.com/graphcommerce-org/graphcommerce/pull/2227) [`d597719`](https://github.com/graphcommerce-org/graphcommerce/commit/d597719baaabbe079660ac063fd021d871831511) - Added option to change sort order (ASC / DESC) for sort options (Name, price, position etc) on catalog and search pages.
|
|
231
|
-
([@FrankHarland](https://github.com/FrankHarland))
|
|
221
|
+
- [#2227](https://github.com/graphcommerce-org/graphcommerce/pull/2227) [`d597719`](https://github.com/graphcommerce-org/graphcommerce/commit/d597719baaabbe079660ac063fd021d871831511) - Added option to change sort order (ASC / DESC) for sort options (Name, price, position etc) on catalog and search pages. ([@FrankHarland](https://github.com/FrankHarland))
|
|
232
222
|
|
|
233
223
|
## 8.0.6-canary.3
|
|
234
224
|
|
|
@@ -236,29 +226,25 @@
|
|
|
236
226
|
|
|
237
227
|
### Patch Changes
|
|
238
228
|
|
|
239
|
-
- [#2234](https://github.com/graphcommerce-org/graphcommerce/pull/2234) [`0767bc4`](https://github.com/graphcommerce-org/graphcommerce/commit/0767bc40f7b596209f24ca4e745ff0441f3275c9) - Upgrade input components to no longer use muiRegister, which improves INP scores
|
|
240
|
-
([@FrankHarland](https://github.com/FrankHarland))
|
|
229
|
+
- [#2234](https://github.com/graphcommerce-org/graphcommerce/pull/2234) [`0767bc4`](https://github.com/graphcommerce-org/graphcommerce/commit/0767bc40f7b596209f24ca4e745ff0441f3275c9) - Upgrade input components to no longer use muiRegister, which improves INP scores ([@FrankHarland](https://github.com/FrankHarland))
|
|
241
230
|
|
|
242
231
|
## 8.0.6-canary.1
|
|
243
232
|
|
|
244
233
|
### Patch Changes
|
|
245
234
|
|
|
246
|
-
- [#2213](https://github.com/graphcommerce-org/graphcommerce/pull/2213) [`9b8349f`](https://github.com/graphcommerce-org/graphcommerce/commit/9b8349f0001a786f9b1666f050ae226316bd16f3) - Removed the ProductPage query from the examples directory as it isn't used anymore
|
|
247
|
-
([@paales](https://github.com/paales))
|
|
235
|
+
- [#2213](https://github.com/graphcommerce-org/graphcommerce/pull/2213) [`9b8349f`](https://github.com/graphcommerce-org/graphcommerce/commit/9b8349f0001a786f9b1666f050ae226316bd16f3) - Removed the ProductPage query from the examples directory as it isn't used anymore ([@paales](https://github.com/paales))
|
|
248
236
|
|
|
249
237
|
## 8.0.6-canary.0
|
|
250
238
|
|
|
251
239
|
### Patch Changes
|
|
252
240
|
|
|
253
|
-
- [#2196](https://github.com/graphcommerce-org/graphcommerce/pull/2196) [`84c50e4`](https://github.com/graphcommerce-org/graphcommerce/commit/84c50e49a1a7f154d4a8f4045c37e773e20283ad) - Allow Lingui to use linguiLocale with country identifiers like `en-us`, it would always load `en` in this case. Introced a new `useLocale` hook to use the correct locale string to use in Intl methods.
|
|
254
|
-
([@paales](https://github.com/paales))
|
|
241
|
+
- [#2196](https://github.com/graphcommerce-org/graphcommerce/pull/2196) [`84c50e4`](https://github.com/graphcommerce-org/graphcommerce/commit/84c50e49a1a7f154d4a8f4045c37e773e20283ad) - Allow Lingui to use linguiLocale with country identifiers like `en-us`, it would always load `en` in this case. Introced a new `useLocale` hook to use the correct locale string to use in Intl methods. ([@paales](https://github.com/paales))
|
|
255
242
|
|
|
256
243
|
## 8.0.5
|
|
257
244
|
|
|
258
245
|
### Patch Changes
|
|
259
246
|
|
|
260
|
-
- [#2236](https://github.com/graphcommerce-org/graphcommerce/pull/2236) [`1a20a34`](https://github.com/graphcommerce-org/graphcommerce/commit/1a20a34a8b55781ee3e88731b5e2623a85c64ccd) - Enable bundlePagesExternals for Vercel environments
|
|
261
|
-
([@paales](https://github.com/paales))
|
|
247
|
+
- [#2236](https://github.com/graphcommerce-org/graphcommerce/pull/2236) [`1a20a34`](https://github.com/graphcommerce-org/graphcommerce/commit/1a20a34a8b55781ee3e88731b5e2623a85c64ccd) - Enable bundlePagesExternals for Vercel environments ([@paales](https://github.com/paales))
|
|
262
248
|
|
|
263
249
|
## 8.0.5-canary.10
|
|
264
250
|
|
|
@@ -278,8 +264,7 @@
|
|
|
278
264
|
|
|
279
265
|
### Patch Changes
|
|
280
266
|
|
|
281
|
-
- [#2236](https://github.com/graphcommerce-org/graphcommerce/pull/2236) [`1a20a34`](https://github.com/graphcommerce-org/graphcommerce/commit/1a20a34a8b55781ee3e88731b5e2623a85c64ccd) - Enable bundlePagesExternals for Vercel environments
|
|
282
|
-
([@paales](https://github.com/paales))
|
|
267
|
+
- [#2236](https://github.com/graphcommerce-org/graphcommerce/pull/2236) [`1a20a34`](https://github.com/graphcommerce-org/graphcommerce/commit/1a20a34a8b55781ee3e88731b5e2623a85c64ccd) - Enable bundlePagesExternals for Vercel environments ([@paales](https://github.com/paales))
|
|
283
268
|
|
|
284
269
|
## 8.0.5-canary.2
|
|
285
270
|
|
|
@@ -335,37 +320,27 @@
|
|
|
335
320
|
|
|
336
321
|
### Minor Changes
|
|
337
322
|
|
|
338
|
-
- [#2113](https://github.com/graphcommerce-org/graphcommerce/pull/2113) [`437f467`](https://github.com/graphcommerce-org/graphcommerce/commit/437f467ce1bd9182954be753f1ce17056ab62e85) - Upgraded the graphcommerce repo to the yarn 4 package manager
|
|
339
|
-
([@paales](https://github.com/paales))
|
|
323
|
+
- [#2113](https://github.com/graphcommerce-org/graphcommerce/pull/2113) [`437f467`](https://github.com/graphcommerce-org/graphcommerce/commit/437f467ce1bd9182954be753f1ce17056ab62e85) - Upgraded the graphcommerce repo to the yarn 4 package manager ([@paales](https://github.com/paales))
|
|
340
324
|
|
|
341
325
|
### Patch Changes
|
|
342
326
|
|
|
343
|
-
- [#2156](https://github.com/graphcommerce-org/graphcommerce/pull/2156) [`69b816c`](https://github.com/graphcommerce-org/graphcommerce/commit/69b816cd739af2999ec2a5053f09b9bb10379c52) - Updated dependencies. Fixed trace-to-tree.mjs to debug build perf and added trace-to-event-format.mjs for compatibility with about://tracing.
|
|
344
|
-
([@paales](https://github.com/paales))
|
|
327
|
+
- [#2156](https://github.com/graphcommerce-org/graphcommerce/pull/2156) [`69b816c`](https://github.com/graphcommerce-org/graphcommerce/commit/69b816cd739af2999ec2a5053f09b9bb10379c52) - Updated dependencies. Fixed trace-to-tree.mjs to debug build perf and added trace-to-event-format.mjs for compatibility with about://tracing. ([@paales](https://github.com/paales))
|
|
345
328
|
|
|
346
|
-
- [#2078](https://github.com/graphcommerce-org/graphcommerce/pull/2078) [`5f409e6`](https://github.com/graphcommerce-org/graphcommerce/commit/5f409e617afae36d5c6224f3c6eb8d085fc2e84c) - Added @graphcommerce packages in node_modules to nextjs watch options
|
|
347
|
-
([@KMalkowski](https://github.com/KMalkowski))
|
|
329
|
+
- [#2078](https://github.com/graphcommerce-org/graphcommerce/pull/2078) [`5f409e6`](https://github.com/graphcommerce-org/graphcommerce/commit/5f409e617afae36d5c6224f3c6eb8d085fc2e84c) - Added @graphcommerce packages in node_modules to nextjs watch options ([@KMalkowski](https://github.com/KMalkowski))
|
|
348
330
|
|
|
349
|
-
- [#2129](https://github.com/graphcommerce-org/graphcommerce/pull/2129) [`dca4490`](https://github.com/graphcommerce-org/graphcommerce/commit/dca4490b97319e9d4117277719adef395ed1e7b4) - Created `./devcontainer/devcontainer.json` to automatically run Graphcommerce after opening Codespaces
|
|
350
|
-
([@action-simon](https://github.com/action-simon))
|
|
331
|
+
- [#2129](https://github.com/graphcommerce-org/graphcommerce/pull/2129) [`dca4490`](https://github.com/graphcommerce-org/graphcommerce/commit/dca4490b97319e9d4117277719adef395ed1e7b4) - Created `./devcontainer/devcontainer.json` to automatically run Graphcommerce after opening Codespaces ([@action-simon](https://github.com/action-simon))
|
|
351
332
|
|
|
352
|
-
- [#2113](https://github.com/graphcommerce-org/graphcommerce/pull/2113) [`6306182`](https://github.com/graphcommerce-org/graphcommerce/commit/6306182196321bdab509a8dcfe09eb00da10303a) - Moved all internal `@graphcommerce/*` dependencies to `peerDependencies` and resolve remaining peer dependency issues
|
|
353
|
-
([@paales](https://github.com/paales))
|
|
333
|
+
- [#2113](https://github.com/graphcommerce-org/graphcommerce/pull/2113) [`6306182`](https://github.com/graphcommerce-org/graphcommerce/commit/6306182196321bdab509a8dcfe09eb00da10303a) - Moved all internal `@graphcommerce/*` dependencies to `peerDependencies` and resolve remaining peer dependency issues ([@paales](https://github.com/paales))
|
|
354
334
|
|
|
355
|
-
- [`d267f19`](https://github.com/graphcommerce-org/graphcommerce/commit/d267f19d6ab85f7dc1088974b3fee6148a537c20) - Disable the pagination thumbnails
|
|
356
|
-
([@paales](https://github.com/paales))
|
|
335
|
+
- [`d267f19`](https://github.com/graphcommerce-org/graphcommerce/commit/d267f19d6ab85f7dc1088974b3fee6148a537c20) - Disable the pagination thumbnails ([@paales](https://github.com/paales))
|
|
357
336
|
|
|
358
|
-
- [#2172](https://github.com/graphcommerce-org/graphcommerce/pull/2172) [`279599e`](https://github.com/graphcommerce-org/graphcommerce/commit/279599e7a86bd96ea9e36065af3c367df9e02a63) - Updated examples in the documentation to reflect the changes made in GraphCommerce.
|
|
359
|
-
([@paales](https://github.com/paales))
|
|
337
|
+
- [#2172](https://github.com/graphcommerce-org/graphcommerce/pull/2172) [`279599e`](https://github.com/graphcommerce-org/graphcommerce/commit/279599e7a86bd96ea9e36065af3c367df9e02a63) - Updated examples in the documentation to reflect the changes made in GraphCommerce. ([@paales](https://github.com/paales))
|
|
360
338
|
|
|
361
|
-
- [#2116](https://github.com/graphcommerce-org/graphcommerce/pull/2116) [`e0e5e82`](https://github.com/graphcommerce-org/graphcommerce/commit/e0e5e82af36ca38a78fc031e0c680daaab5909ad) - Node.js version of gitpod updated to node 18
|
|
362
|
-
([@action-simon](https://github.com/action-simon))
|
|
339
|
+
- [#2116](https://github.com/graphcommerce-org/graphcommerce/pull/2116) [`e0e5e82`](https://github.com/graphcommerce-org/graphcommerce/commit/e0e5e82af36ca38a78fc031e0c680daaab5909ad) - Node.js version of gitpod updated to node 18 ([@action-simon](https://github.com/action-simon))
|
|
363
340
|
|
|
364
|
-
- [#2113](https://github.com/graphcommerce-org/graphcommerce/pull/2113) [`77b1bac`](https://github.com/graphcommerce-org/graphcommerce/commit/77b1bac4db9c903a29c3969823da663875408be0) - Upgraded to nextjs 14.0.2, and updated other related dependencies. Removed @mui/material/modern alias as that doesnt work in combination with nextjs 14.0.2.
|
|
365
|
-
([@paales](https://github.com/paales))
|
|
341
|
+
- [#2113](https://github.com/graphcommerce-org/graphcommerce/pull/2113) [`77b1bac`](https://github.com/graphcommerce-org/graphcommerce/commit/77b1bac4db9c903a29c3969823da663875408be0) - Upgraded to nextjs 14.0.2, and updated other related dependencies. Removed @mui/material/modern alias as that doesnt work in combination with nextjs 14.0.2. ([@paales](https://github.com/paales))
|
|
366
342
|
|
|
367
|
-
- [#2169](https://github.com/graphcommerce-org/graphcommerce/pull/2169) [`eab3f0b`](https://github.com/graphcommerce-org/graphcommerce/commit/eab3f0b0b459f5b6cc4e50d787ac1e8ae545b708) - Solve issue where a Hygraph DynamicRow conditions were missing fields in the OrCondition
|
|
368
|
-
([@Jessevdpoel](https://github.com/Jessevdpoel))
|
|
343
|
+
- [#2169](https://github.com/graphcommerce-org/graphcommerce/pull/2169) [`eab3f0b`](https://github.com/graphcommerce-org/graphcommerce/commit/eab3f0b0b459f5b6cc4e50d787ac1e8ae545b708) - Solve issue where a Hygraph DynamicRow conditions were missing fields in the OrCondition ([@Jessevdpoel](https://github.com/Jessevdpoel))
|
|
369
344
|
|
|
370
345
|
## 8.0.0-canary.100
|
|
371
346
|
|
|
@@ -383,15 +358,13 @@
|
|
|
383
358
|
|
|
384
359
|
### Patch Changes
|
|
385
360
|
|
|
386
|
-
- [#2169](https://github.com/graphcommerce-org/graphcommerce/pull/2169) [`eab3f0b`](https://github.com/graphcommerce-org/graphcommerce/commit/eab3f0b0b459f5b6cc4e50d787ac1e8ae545b708) - Solve issue where a Hygraph DynamicRow conditions were missing fields in the OrCondition
|
|
387
|
-
([@Jessevdpoel](https://github.com/Jessevdpoel))
|
|
361
|
+
- [#2169](https://github.com/graphcommerce-org/graphcommerce/pull/2169) [`eab3f0b`](https://github.com/graphcommerce-org/graphcommerce/commit/eab3f0b0b459f5b6cc4e50d787ac1e8ae545b708) - Solve issue where a Hygraph DynamicRow conditions were missing fields in the OrCondition ([@Jessevdpoel](https://github.com/Jessevdpoel))
|
|
388
362
|
|
|
389
363
|
## 8.0.0-canary.93
|
|
390
364
|
|
|
391
365
|
### Patch Changes
|
|
392
366
|
|
|
393
|
-
- [`d267f19`](https://github.com/graphcommerce-org/graphcommerce/commit/d267f19d6ab85f7dc1088974b3fee6148a537c20) - Disable the pagination thumbnails
|
|
394
|
-
([@paales](https://github.com/paales))
|
|
367
|
+
- [`d267f19`](https://github.com/graphcommerce-org/graphcommerce/commit/d267f19d6ab85f7dc1088974b3fee6148a537c20) - Disable the pagination thumbnails ([@paales](https://github.com/paales))
|
|
395
368
|
|
|
396
369
|
## 8.0.0-canary.92
|
|
397
370
|
|
|
@@ -399,8 +372,7 @@
|
|
|
399
372
|
|
|
400
373
|
### Patch Changes
|
|
401
374
|
|
|
402
|
-
- [#2172](https://github.com/graphcommerce-org/graphcommerce/pull/2172) [`279599e`](https://github.com/graphcommerce-org/graphcommerce/commit/279599e7a86bd96ea9e36065af3c367df9e02a63) - Updated documentation to reflect recent code changes
|
|
403
|
-
([@paales](https://github.com/paales))
|
|
375
|
+
- [#2172](https://github.com/graphcommerce-org/graphcommerce/pull/2172) [`279599e`](https://github.com/graphcommerce-org/graphcommerce/commit/279599e7a86bd96ea9e36065af3c367df9e02a63) - Updated documentation to reflect recent code changes ([@paales](https://github.com/paales))
|
|
404
376
|
|
|
405
377
|
## 8.0.0-canary.90
|
|
406
378
|
|
|
@@ -454,8 +426,7 @@
|
|
|
454
426
|
|
|
455
427
|
### Patch Changes
|
|
456
428
|
|
|
457
|
-
- [#2156](https://github.com/graphcommerce-org/graphcommerce/pull/2156) [`69b816c`](https://github.com/graphcommerce-org/graphcommerce/commit/69b816cd739af2999ec2a5053f09b9bb10379c52) - Updated dependencies. Fixed trace-to-tree.mjs to debug build perf and added trace-to-event-format.mjs for compatibility with about://tracing.
|
|
458
|
-
([@paales](https://github.com/paales))
|
|
429
|
+
- [#2156](https://github.com/graphcommerce-org/graphcommerce/pull/2156) [`69b816c`](https://github.com/graphcommerce-org/graphcommerce/commit/69b816cd739af2999ec2a5053f09b9bb10379c52) - Updated dependencies. Fixed trace-to-tree.mjs to debug build perf and added trace-to-event-format.mjs for compatibility with about://tracing. ([@paales](https://github.com/paales))
|
|
459
430
|
|
|
460
431
|
## 7.1.0-canary.65
|
|
461
432
|
|
|
@@ -40,6 +40,7 @@ exports[`traverses a schema and returns a list of env variables that match 1`] =
|
|
|
40
40
|
"GC_CUSTOMER_ADDRESS_NOTE_ENABLE",
|
|
41
41
|
"GC_CUSTOMER_COMPANY_FIELDS_ENABLE",
|
|
42
42
|
"GC_CUSTOMER_DELETE_ENABLED",
|
|
43
|
+
"GC_CUSTOMER_X_MAGENTO_CACHE_ID_DISABLE",
|
|
43
44
|
"GC_DATA_LAYER",
|
|
44
45
|
"GC_DATA_LAYER_CORE_WEB_VITALS",
|
|
45
46
|
"GC_DEBUG",
|
|
@@ -227,6 +227,18 @@ it('finds plugins', () => {
|
|
|
227
227
|
"targetModule": "@graphcommerce/graphql",
|
|
228
228
|
"type": "function",
|
|
229
229
|
},
|
|
230
|
+
{
|
|
231
|
+
"enabled": true,
|
|
232
|
+
"ifConfig": [
|
|
233
|
+
"customerXMagentoCacheIdDisable",
|
|
234
|
+
false,
|
|
235
|
+
],
|
|
236
|
+
"sourceExport": "GraphQLProvider",
|
|
237
|
+
"sourceModule": "@graphcommerce/magento-customer/plugins/XMagentoCacheIdGraphQLProvider",
|
|
238
|
+
"targetExport": "GraphQLProvider",
|
|
239
|
+
"targetModule": "@graphcommerce/graphql",
|
|
240
|
+
"type": "component",
|
|
241
|
+
},
|
|
230
242
|
{
|
|
231
243
|
"enabled": true,
|
|
232
244
|
"sourceExport": "GraphQLProvider",
|
|
@@ -206,3 +206,83 @@ export const Plugin = AddAdyenMethods
|
|
|
206
206
|
`)
|
|
207
207
|
expect(plugins[1]).toMatchInlineSnapshot(`undefined`)
|
|
208
208
|
})
|
|
209
|
+
|
|
210
|
+
it('correctly allows false value in the ifConfig', () => {
|
|
211
|
+
const src = `
|
|
212
|
+
import { PluginConfig, PluginProps } from '@graphcommerce/next-config'
|
|
213
|
+
import { xMagentoCacheIdHeader } from '../link/xMagentoCacheIdHeader'
|
|
214
|
+
import { GraphQLProviderProps } from '@graphcommerce/graphql'
|
|
215
|
+
|
|
216
|
+
export const config: PluginConfig = {
|
|
217
|
+
type: 'component',
|
|
218
|
+
module: '@graphcommerce/graphql',
|
|
219
|
+
ifConfig: ['customerXMagentoCacheIdDisable', false],
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export function GraphQLProvider(props: PluginProps<GraphQLProviderProps>) {
|
|
223
|
+
const { Prev, links = [], ...rest } = props
|
|
224
|
+
return <Prev {...rest} links={[...links, xMagentoCacheIdHeader]} />
|
|
225
|
+
}
|
|
226
|
+
`
|
|
227
|
+
const ast = parseSync(src)
|
|
228
|
+
|
|
229
|
+
expect(
|
|
230
|
+
parseStructure(ast, {} as GraphCommerceConfig, './plugins/MyReplace')[0].enabled,
|
|
231
|
+
).toBeTruthy()
|
|
232
|
+
|
|
233
|
+
expect(
|
|
234
|
+
parseStructure(
|
|
235
|
+
ast,
|
|
236
|
+
{ customerXMagentoCacheIdDisable: true } as GraphCommerceConfig,
|
|
237
|
+
'./plugins/MyReplace',
|
|
238
|
+
)[0].enabled,
|
|
239
|
+
).toBeFalsy()
|
|
240
|
+
|
|
241
|
+
expect(
|
|
242
|
+
parseStructure(
|
|
243
|
+
ast,
|
|
244
|
+
{ customerXMagentoCacheIdDisable: false } as GraphCommerceConfig,
|
|
245
|
+
'./plugins/MyReplace',
|
|
246
|
+
)[0].enabled,
|
|
247
|
+
).toBeTruthy()
|
|
248
|
+
})
|
|
249
|
+
|
|
250
|
+
it('correctly allows true value in the ifConfig', () => {
|
|
251
|
+
const src = `
|
|
252
|
+
import { PluginConfig, PluginProps } from '@graphcommerce/next-config'
|
|
253
|
+
import { xMagentoCacheIdHeader } from '../link/xMagentoCacheIdHeader'
|
|
254
|
+
import { GraphQLProviderProps } from '@graphcommerce/graphql'
|
|
255
|
+
|
|
256
|
+
export const config: PluginConfig = {
|
|
257
|
+
type: 'component',
|
|
258
|
+
module: '@graphcommerce/graphql',
|
|
259
|
+
ifConfig: ['customerXMagentoCacheIdDisable', true],
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export function GraphQLProvider(props: PluginProps<GraphQLProviderProps>) {
|
|
263
|
+
const { Prev, links = [], ...rest } = props
|
|
264
|
+
return <Prev {...rest} links={[...links, xMagentoCacheIdHeader]} />
|
|
265
|
+
}
|
|
266
|
+
`
|
|
267
|
+
const ast = parseSync(src)
|
|
268
|
+
|
|
269
|
+
expect(
|
|
270
|
+
parseStructure(ast, {} as GraphCommerceConfig, './plugins/MyReplace')[0].enabled,
|
|
271
|
+
).toBeFalsy()
|
|
272
|
+
|
|
273
|
+
expect(
|
|
274
|
+
parseStructure(
|
|
275
|
+
ast,
|
|
276
|
+
{ customerXMagentoCacheIdDisable: true } as GraphCommerceConfig,
|
|
277
|
+
'./plugins/MyReplace',
|
|
278
|
+
)[0].enabled,
|
|
279
|
+
).toBeTruthy()
|
|
280
|
+
|
|
281
|
+
expect(
|
|
282
|
+
parseStructure(
|
|
283
|
+
ast,
|
|
284
|
+
{ customerXMagentoCacheIdDisable: false } as GraphCommerceConfig,
|
|
285
|
+
'./plugins/MyReplace',
|
|
286
|
+
)[0].enabled,
|
|
287
|
+
).toBeFalsy()
|
|
288
|
+
})
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.exportConfig =
|
|
6
|
+
exports.exportConfig = exportConfig;
|
|
7
7
|
const loadConfig_1 = require("../loadConfig");
|
|
8
8
|
const exportConfigToEnv_1 = require("../utils/exportConfigToEnv");
|
|
9
9
|
const dotenv_1 = __importDefault(require("dotenv"));
|
|
@@ -14,4 +14,3 @@ async function exportConfig() {
|
|
|
14
14
|
// eslint-disable-next-line no-console
|
|
15
15
|
console.log((0, exportConfigToEnv_1.exportConfigToEnv)(conf));
|
|
16
16
|
}
|
|
17
|
-
exports.exportConfig = exportConfig;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.generateConfig =
|
|
6
|
+
exports.generateConfig = generateConfig;
|
|
7
7
|
const fs_1 = require("fs");
|
|
8
8
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
9
9
|
const cli_1 = require("@graphql-codegen/cli");
|
|
@@ -55,4 +55,3 @@ async function generateConfig() {
|
|
|
55
55
|
});
|
|
56
56
|
(0, fs_1.writeFileSync)(targetJs, result.code);
|
|
57
57
|
}
|
|
58
|
-
exports.generateConfig = generateConfig;
|
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.loadConfig =
|
|
17
|
+
exports.loadConfig = loadConfig;
|
|
18
18
|
/* eslint-disable no-console */
|
|
19
19
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
20
20
|
const cosmiconfig_1 = require("cosmiconfig");
|
|
@@ -60,4 +60,3 @@ function loadConfig(cwd) {
|
|
|
60
60
|
throw error;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
exports.loadConfig = loadConfig;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.configToImportMeta =
|
|
3
|
+
exports.configToImportMeta = configToImportMeta;
|
|
4
4
|
function flattenKeys(value, initialPathPrefix, stringify) {
|
|
5
5
|
// Is a scalar:
|
|
6
6
|
if (value === null || value === undefined || typeof value === 'number') {
|
|
@@ -37,4 +37,3 @@ function flattenKeys(value, initialPathPrefix, stringify) {
|
|
|
37
37
|
function configToImportMeta(config, path = 'import.meta.graphCommerce', stringify = true) {
|
|
38
38
|
return flattenKeys(config, path, stringify);
|
|
39
39
|
}
|
|
40
|
-
exports.configToImportMeta = configToImportMeta;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = diff;
|
|
3
4
|
function isObject(val) {
|
|
4
5
|
return typeof val === 'object' && val !== null;
|
|
5
6
|
}
|
|
@@ -30,4 +31,3 @@ function diff(item1, item2) {
|
|
|
30
31
|
}
|
|
31
32
|
return item2 === item1 ? undefined : item2;
|
|
32
33
|
}
|
|
33
|
-
exports.default = diff;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.exportConfigToEnv =
|
|
3
|
+
exports.exportConfigToEnv = exportConfigToEnv;
|
|
4
4
|
const mergeEnvIntoConfig_1 = require("./mergeEnvIntoConfig");
|
|
5
5
|
const fmt = (value) => {
|
|
6
6
|
let formattedValue = value;
|
|
@@ -29,4 +29,3 @@ function exportConfigToEnv(config) {
|
|
|
29
29
|
});
|
|
30
30
|
return env;
|
|
31
31
|
}
|
|
32
|
-
exports.exportConfigToEnv = exportConfigToEnv;
|
|
@@ -3,7 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.filterEnv = exports.dotNotation = exports.toEnvStr = void 0;
|
|
7
|
+
exports.configToEnvSchema = configToEnvSchema;
|
|
8
|
+
exports.mergeEnvIntoConfig = mergeEnvIntoConfig;
|
|
9
|
+
exports.formatAppliedEnv = formatAppliedEnv;
|
|
7
10
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
8
11
|
const utilities_1 = require("@apollo/client/utilities");
|
|
9
12
|
const chalk_1 = __importDefault(require("chalk"));
|
|
@@ -104,7 +107,6 @@ function configToEnvSchema(schema) {
|
|
|
104
107
|
walk(schema);
|
|
105
108
|
return [zod_1.z.object(envSchema), envToDot];
|
|
106
109
|
}
|
|
107
|
-
exports.configToEnvSchema = configToEnvSchema;
|
|
108
110
|
const filterEnv = (env) => Object.fromEntries(Object.entries(env).filter(([key]) => key.startsWith('GC_')));
|
|
109
111
|
exports.filterEnv = filterEnv;
|
|
110
112
|
function mergeEnvIntoConfig(schema, config, env) {
|
|
@@ -137,7 +139,6 @@ function mergeEnvIntoConfig(schema, config, env) {
|
|
|
137
139
|
});
|
|
138
140
|
return [newConfig, applyResult];
|
|
139
141
|
}
|
|
140
|
-
exports.mergeEnvIntoConfig = mergeEnvIntoConfig;
|
|
141
142
|
/**
|
|
142
143
|
* Prints the applied env variables to the console
|
|
143
144
|
*
|
|
@@ -183,4 +184,3 @@ function formatAppliedEnv(applyResult) {
|
|
|
183
184
|
header += ` - Loaded GraphCommerce env variables`;
|
|
184
185
|
return [header, ...lines].join('\n');
|
|
185
186
|
}
|
|
186
|
-
exports.formatAppliedEnv = formatAppliedEnv;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.replaceConfigInString =
|
|
3
|
+
exports.replaceConfigInString = replaceConfigInString;
|
|
4
4
|
const configToImportMeta_1 = require("./configToImportMeta");
|
|
5
5
|
function replaceConfigInString(str, config) {
|
|
6
6
|
let result = str;
|
|
@@ -10,4 +10,3 @@ function replaceConfigInString(str, config) {
|
|
|
10
10
|
});
|
|
11
11
|
return result;
|
|
12
12
|
}
|
|
13
|
-
exports.replaceConfigInString = replaceConfigInString;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.rewriteLegacyEnv =
|
|
6
|
+
exports.rewriteLegacyEnv = rewriteLegacyEnv;
|
|
7
7
|
const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
|
|
8
8
|
const mergeEnvIntoConfig_1 = require("./mergeEnvIntoConfig");
|
|
9
9
|
function rewriteLegacyEnv(schema, env, config = {}) {
|
|
@@ -113,4 +113,3 @@ function rewriteLegacyEnv(schema, env, config = {}) {
|
|
|
113
113
|
const [newConfig, envApplied] = (0, mergeEnvIntoConfig_1.mergeEnvIntoConfig)(schema, config, clonedEnv);
|
|
114
114
|
return [newConfig, [...applied, ...envApplied]];
|
|
115
115
|
}
|
|
116
|
-
exports.rewriteLegacyEnv = rewriteLegacyEnv;
|
package/dist/generated/config.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.SidebarGalleryPaginationVariantSchema = exports.ProductFiltersLayoutSchema = exports.PaginationVariantSchema = exports.CompareVariantSchema = exports.definedNonNullAnySchema = exports.isDefinedNonNullAny = void 0;
|
|
4
|
+
exports.DatalayerConfigSchema = DatalayerConfigSchema;
|
|
5
|
+
exports.GraphCommerceConfigSchema = GraphCommerceConfigSchema;
|
|
6
|
+
exports.GraphCommerceDebugConfigSchema = GraphCommerceDebugConfigSchema;
|
|
7
|
+
exports.GraphCommerceStorefrontConfigSchema = GraphCommerceStorefrontConfigSchema;
|
|
8
|
+
exports.MagentoConfigurableVariantValuesSchema = MagentoConfigurableVariantValuesSchema;
|
|
9
|
+
exports.RecentlyViewedProductsConfigSchema = RecentlyViewedProductsConfigSchema;
|
|
10
|
+
exports.SidebarGalleryConfigSchema = SidebarGalleryConfigSchema;
|
|
4
11
|
/* eslint-disable */
|
|
5
12
|
const zod_1 = require("zod");
|
|
6
13
|
const isDefinedNonNullAny = (v) => v !== undefined && v !== null;
|
|
@@ -15,7 +22,6 @@ function DatalayerConfigSchema() {
|
|
|
15
22
|
coreWebVitals: zod_1.z.boolean().nullish()
|
|
16
23
|
});
|
|
17
24
|
}
|
|
18
|
-
exports.DatalayerConfigSchema = DatalayerConfigSchema;
|
|
19
25
|
function GraphCommerceConfigSchema() {
|
|
20
26
|
return zod_1.z.object({
|
|
21
27
|
breadcrumbs: zod_1.z.boolean().default(false).nullish(),
|
|
@@ -30,6 +36,7 @@ function GraphCommerceConfigSchema() {
|
|
|
30
36
|
customerAddressNoteEnable: zod_1.z.boolean().nullish(),
|
|
31
37
|
customerCompanyFieldsEnable: zod_1.z.boolean().nullish(),
|
|
32
38
|
customerDeleteEnabled: zod_1.z.boolean().nullish(),
|
|
39
|
+
customerXMagentoCacheIdDisable: zod_1.z.boolean().nullish(),
|
|
33
40
|
dataLayer: DatalayerConfigSchema().nullish(),
|
|
34
41
|
debug: GraphCommerceDebugConfigSchema().nullish(),
|
|
35
42
|
demoMode: zod_1.z.boolean().default(true).nullish(),
|
|
@@ -58,7 +65,6 @@ function GraphCommerceConfigSchema() {
|
|
|
58
65
|
wishlistShowFeedbackMessage: zod_1.z.boolean().nullish()
|
|
59
66
|
});
|
|
60
67
|
}
|
|
61
|
-
exports.GraphCommerceConfigSchema = GraphCommerceConfigSchema;
|
|
62
68
|
function GraphCommerceDebugConfigSchema() {
|
|
63
69
|
return zod_1.z.object({
|
|
64
70
|
pluginStatus: zod_1.z.boolean().nullish(),
|
|
@@ -67,7 +73,6 @@ function GraphCommerceDebugConfigSchema() {
|
|
|
67
73
|
webpackDuplicatesPlugin: zod_1.z.boolean().nullish()
|
|
68
74
|
});
|
|
69
75
|
}
|
|
70
|
-
exports.GraphCommerceDebugConfigSchema = GraphCommerceDebugConfigSchema;
|
|
71
76
|
function GraphCommerceStorefrontConfigSchema() {
|
|
72
77
|
return zod_1.z.object({
|
|
73
78
|
canonicalBaseUrl: zod_1.z.string().nullish(),
|
|
@@ -85,7 +90,6 @@ function GraphCommerceStorefrontConfigSchema() {
|
|
|
85
90
|
robotsAllow: zod_1.z.boolean().nullish()
|
|
86
91
|
});
|
|
87
92
|
}
|
|
88
|
-
exports.GraphCommerceStorefrontConfigSchema = GraphCommerceStorefrontConfigSchema;
|
|
89
93
|
function MagentoConfigurableVariantValuesSchema() {
|
|
90
94
|
return zod_1.z.object({
|
|
91
95
|
content: zod_1.z.boolean().nullish(),
|
|
@@ -93,17 +97,14 @@ function MagentoConfigurableVariantValuesSchema() {
|
|
|
93
97
|
url: zod_1.z.boolean().nullish()
|
|
94
98
|
});
|
|
95
99
|
}
|
|
96
|
-
exports.MagentoConfigurableVariantValuesSchema = MagentoConfigurableVariantValuesSchema;
|
|
97
100
|
function RecentlyViewedProductsConfigSchema() {
|
|
98
101
|
return zod_1.z.object({
|
|
99
102
|
enabled: zod_1.z.boolean().nullish(),
|
|
100
103
|
maxCount: zod_1.z.number().nullish()
|
|
101
104
|
});
|
|
102
105
|
}
|
|
103
|
-
exports.RecentlyViewedProductsConfigSchema = RecentlyViewedProductsConfigSchema;
|
|
104
106
|
function SidebarGalleryConfigSchema() {
|
|
105
107
|
return zod_1.z.object({
|
|
106
108
|
paginationVariant: exports.SidebarGalleryPaginationVariantSchema.nullish()
|
|
107
109
|
});
|
|
108
110
|
}
|
|
109
|
-
exports.SidebarGalleryConfigSchema = SidebarGalleryConfigSchema;
|
|
@@ -595,7 +595,7 @@ class Visitor {
|
|
|
595
595
|
return n;
|
|
596
596
|
}
|
|
597
597
|
visitTsFnParameters(params) {
|
|
598
|
-
return params
|
|
598
|
+
return params?.map(this.visitTsFnParameter.bind(this));
|
|
599
599
|
}
|
|
600
600
|
visitTsFnParameter(n) {
|
|
601
601
|
n.typeAnnotation = this.visitTsTypeAnnotation(n.typeAnnotation);
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.codegenInterceptors =
|
|
6
|
+
exports.codegenInterceptors = codegenInterceptors;
|
|
7
7
|
const loadConfig_1 = require("../../config/loadConfig");
|
|
8
8
|
const resolveDependency_1 = require("../../utils/resolveDependency");
|
|
9
9
|
const findPlugins_1 = require("../findPlugins");
|
|
@@ -20,4 +20,3 @@ async function codegenInterceptors() {
|
|
|
20
20
|
// console.log('Generated interceptors in', generated - found, 'ms')
|
|
21
21
|
await (0, writeInterceptors_1.writeInterceptors)(generatedInterceptors);
|
|
22
22
|
}
|
|
23
|
-
exports.codegenInterceptors = codegenInterceptors;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.RUNTIME_VALUE = exports.UnsupportedValueError = exports.NoSuchDeclarationError = void 0;
|
|
4
|
+
exports.extractExports = extractExports;
|
|
4
5
|
class NoSuchDeclarationError extends Error {
|
|
5
6
|
}
|
|
6
7
|
exports.NoSuchDeclarationError = NoSuchDeclarationError;
|
|
@@ -201,4 +202,3 @@ function extractExports(module) {
|
|
|
201
202
|
}
|
|
202
203
|
return [exports, errors];
|
|
203
204
|
}
|
|
204
|
-
exports.extractExports = extractExports;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.findOriginalSource =
|
|
6
|
+
exports.findOriginalSource = findOriginalSource;
|
|
7
7
|
const path_1 = __importDefault(require("path"));
|
|
8
8
|
const swc_1 = require("./swc");
|
|
9
9
|
function parseAndFindExport(resolved, findExport, resolve) {
|
|
@@ -100,4 +100,3 @@ function findOriginalSource(plug, resolved, resolve) {
|
|
|
100
100
|
// cachedResults.set(cacheKey, newResolved)
|
|
101
101
|
return { resolved: newResolved, error: undefined };
|
|
102
102
|
}
|
|
103
|
-
exports.findOriginalSource = findOriginalSource;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.findPlugins =
|
|
6
|
+
exports.findPlugins = findPlugins;
|
|
7
7
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
8
8
|
const core_1 = require("@swc/core");
|
|
9
9
|
const chalk_1 = __importDefault(require("chalk"));
|
|
@@ -69,4 +69,3 @@ function findPlugins(config, cwd = process.cwd()) {
|
|
|
69
69
|
}
|
|
70
70
|
return [plugins, errors];
|
|
71
71
|
}
|
|
72
|
-
exports.findPlugins = findPlugins;
|
|
@@ -3,7 +3,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.SOURCE_END = exports.SOURCE_START = void 0;
|
|
7
|
+
exports.isPluginBaseConfig = isPluginBaseConfig;
|
|
8
|
+
exports.isReactPluginConfig = isReactPluginConfig;
|
|
9
|
+
exports.isMethodPluginConfig = isMethodPluginConfig;
|
|
10
|
+
exports.isReplacePluginConfig = isReplacePluginConfig;
|
|
11
|
+
exports.isPluginConfig = isPluginConfig;
|
|
12
|
+
exports.moveRelativeDown = moveRelativeDown;
|
|
13
|
+
exports.generateInterceptor = generateInterceptor;
|
|
7
14
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
8
15
|
const prettier_config_pwa_1 = __importDefault(require("@graphcommerce/prettier-config-pwa"));
|
|
9
16
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
@@ -16,29 +23,24 @@ function isPluginBaseConfig(plugin) {
|
|
|
16
23
|
typeof plugin.enabled === 'boolean' &&
|
|
17
24
|
typeof plugin.targetExport === 'string');
|
|
18
25
|
}
|
|
19
|
-
exports.isPluginBaseConfig = isPluginBaseConfig;
|
|
20
26
|
function isReactPluginConfig(plugin) {
|
|
21
27
|
if (!isPluginBaseConfig(plugin))
|
|
22
28
|
return false;
|
|
23
29
|
return plugin.type === 'component';
|
|
24
30
|
}
|
|
25
|
-
exports.isReactPluginConfig = isReactPluginConfig;
|
|
26
31
|
function isMethodPluginConfig(plugin) {
|
|
27
32
|
if (!isPluginBaseConfig(plugin))
|
|
28
33
|
return false;
|
|
29
34
|
return plugin.type === 'function';
|
|
30
35
|
}
|
|
31
|
-
exports.isMethodPluginConfig = isMethodPluginConfig;
|
|
32
36
|
function isReplacePluginConfig(plugin) {
|
|
33
37
|
if (!isPluginBaseConfig(plugin))
|
|
34
38
|
return false;
|
|
35
39
|
return plugin.type === 'replace';
|
|
36
40
|
}
|
|
37
|
-
exports.isReplacePluginConfig = isReplacePluginConfig;
|
|
38
41
|
function isPluginConfig(plugin) {
|
|
39
42
|
return isPluginBaseConfig(plugin);
|
|
40
43
|
}
|
|
41
|
-
exports.isPluginConfig = isPluginConfig;
|
|
42
44
|
exports.SOURCE_START = '/** Original source starts here (do not modify!): **/';
|
|
43
45
|
exports.SOURCE_END = '/** Original source ends here (do not modify!) **/';
|
|
44
46
|
const originalSuffix = 'Original';
|
|
@@ -61,7 +63,6 @@ function moveRelativeDown(plugins) {
|
|
|
61
63
|
return 0;
|
|
62
64
|
});
|
|
63
65
|
}
|
|
64
|
-
exports.moveRelativeDown = moveRelativeDown;
|
|
65
66
|
const generateIdentifyer = (s) => Math.abs(s.split('').reduce((a, b) => {
|
|
66
67
|
// eslint-disable-next-line no-param-reassign, no-bitwise
|
|
67
68
|
a = (a << 5) - a + b.charCodeAt(0);
|
|
@@ -214,4 +215,3 @@ async function generateInterceptor(interceptor, config, oldInterceptorSource) {
|
|
|
214
215
|
}
|
|
215
216
|
return { ...interceptor, template: templateFormatted };
|
|
216
217
|
}
|
|
217
|
-
exports.generateInterceptor = generateInterceptor;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.generateInterceptors =
|
|
6
|
+
exports.generateInterceptors = generateInterceptors;
|
|
7
7
|
const node_path_1 = __importDefault(require("node:path"));
|
|
8
8
|
const promises_1 = __importDefault(require("node:fs/promises"));
|
|
9
9
|
const findOriginalSource_1 = require("./findOriginalSource");
|
|
@@ -53,4 +53,3 @@ async function generateInterceptors(plugins, resolve, config, force) {
|
|
|
53
53
|
];
|
|
54
54
|
})));
|
|
55
55
|
}
|
|
56
|
-
exports.generateInterceptors = generateInterceptors;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.parseStructure =
|
|
6
|
+
exports.parseStructure = parseStructure;
|
|
7
7
|
const get_1 = __importDefault(require("lodash/get"));
|
|
8
8
|
const zod_1 = require("zod");
|
|
9
9
|
const extractExports_1 = require("./extractExports");
|
|
@@ -11,7 +11,7 @@ const pluginConfigParsed = zod_1.z.object({
|
|
|
11
11
|
type: zod_1.z.enum(['component', 'function', 'replace']),
|
|
12
12
|
module: zod_1.z.string(),
|
|
13
13
|
export: zod_1.z.string(),
|
|
14
|
-
ifConfig: zod_1.z.union([zod_1.z.string(), zod_1.z.tuple([zod_1.z.string(), zod_1.z.
|
|
14
|
+
ifConfig: zod_1.z.union([zod_1.z.string(), zod_1.z.tuple([zod_1.z.string(), zod_1.z.unknown()])]).optional(),
|
|
15
15
|
});
|
|
16
16
|
function nonNullable(value) {
|
|
17
17
|
return value !== null && value !== undefined;
|
|
@@ -51,9 +51,15 @@ function parseStructure(ast, gcConfig, sourceModule) {
|
|
|
51
51
|
}
|
|
52
52
|
let enabled = true;
|
|
53
53
|
if (parsed.data.ifConfig) {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
if (Array.isArray(parsed.data.ifConfig)) {
|
|
55
|
+
const isBoolean = typeof parsed.data.ifConfig[1] === 'boolean';
|
|
56
|
+
let confValue = (0, get_1.default)(gcConfig, parsed.data.ifConfig[0]);
|
|
57
|
+
confValue = isBoolean ? Boolean(confValue) : confValue;
|
|
58
|
+
enabled = confValue === parsed.data.ifConfig[1];
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
enabled = Boolean((0, get_1.default)(gcConfig, parsed.data.ifConfig));
|
|
62
|
+
}
|
|
57
63
|
}
|
|
58
64
|
const val = {
|
|
59
65
|
targetExport: exports.component || exports.func || parsed.data.export,
|
|
@@ -76,4 +82,3 @@ function parseStructure(ast, gcConfig, sourceModule) {
|
|
|
76
82
|
}, []);
|
|
77
83
|
return newPluginConfigs;
|
|
78
84
|
}
|
|
79
|
-
exports.parseStructure = parseStructure;
|
package/dist/interceptors/swc.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.parseSync = parseSync;
|
|
4
|
+
exports.printSync = printSync;
|
|
4
5
|
const core_1 = require("@swc/core");
|
|
5
6
|
function parseSync(src) {
|
|
6
7
|
return (0, core_1.parseSync)(src, {
|
|
@@ -9,8 +10,6 @@ function parseSync(src) {
|
|
|
9
10
|
comments: true,
|
|
10
11
|
});
|
|
11
12
|
}
|
|
12
|
-
exports.parseSync = parseSync;
|
|
13
13
|
function printSync(m) {
|
|
14
14
|
return (0, core_1.printSync)(m);
|
|
15
15
|
}
|
|
16
|
-
exports.printSync = printSync;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.writeInterceptors =
|
|
6
|
+
exports.writeInterceptors = writeInterceptors;
|
|
7
7
|
const promises_1 = __importDefault(require("node:fs/promises"));
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
9
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
@@ -42,4 +42,3 @@ async function writeInterceptors(interceptors, cwd = process.cwd()) {
|
|
|
42
42
|
await Promise.all(written);
|
|
43
43
|
await Promise.all(cleaned);
|
|
44
44
|
}
|
|
45
|
-
exports.writeInterceptors = writeInterceptors;
|
package/dist/utils/isMonorepo.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.isMonorepo =
|
|
6
|
+
exports.isMonorepo = isMonorepo;
|
|
7
7
|
const node_path_1 = __importDefault(require("node:path"));
|
|
8
8
|
function isMonorepo() {
|
|
9
9
|
const root = process.cwd();
|
|
@@ -11,4 +11,3 @@ function isMonorepo() {
|
|
|
11
11
|
const relativePath = node_path_1.default.join(node_path_1.default.relative(meshDir, root), '/');
|
|
12
12
|
return relativePath.startsWith(`..${node_path_1.default.sep}..${node_path_1.default.sep}examples`);
|
|
13
13
|
}
|
|
14
|
-
exports.isMonorepo = isMonorepo;
|
|
@@ -3,7 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.sortDependencies = sortDependencies;
|
|
7
|
+
exports.resolveDependenciesSync = resolveDependenciesSync;
|
|
7
8
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
8
9
|
const node_path_1 = __importDefault(require("node:path"));
|
|
9
10
|
const PackagesSort_1 = require("./PackagesSort");
|
|
@@ -50,7 +51,6 @@ function sortDependencies(dependencyStructure) {
|
|
|
50
51
|
const sortedKeys = [...sorter.sort().keys()];
|
|
51
52
|
return new Map(sortedKeys.map((key) => [key, dependencyStructure[key].dirName]));
|
|
52
53
|
}
|
|
53
|
-
exports.sortDependencies = sortDependencies;
|
|
54
54
|
/**
|
|
55
55
|
* This will return a list of all dependencies that have `graphcommerce` in the name, matching:
|
|
56
56
|
*
|
|
@@ -69,4 +69,3 @@ function resolveDependenciesSync(root = process.cwd()) {
|
|
|
69
69
|
resolveCache.set(root, sorted);
|
|
70
70
|
return sorted;
|
|
71
71
|
}
|
|
72
|
-
exports.resolveDependenciesSync = resolveDependenciesSync;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.withGraphCommerce =
|
|
6
|
+
exports.withGraphCommerce = withGraphCommerce;
|
|
7
7
|
const circular_dependency_plugin_1 = __importDefault(require("circular-dependency-plugin"));
|
|
8
8
|
const plugin_1 = require("inspectpack/plugin");
|
|
9
9
|
const webpack_1 = require("webpack");
|
|
@@ -160,4 +160,3 @@ function withGraphCommerce(nextConfig, cwd) {
|
|
|
160
160
|
},
|
|
161
161
|
};
|
|
162
162
|
}
|
|
163
|
-
exports.withGraphCommerce = withGraphCommerce;
|
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": "9.0.0-canary.
|
|
5
|
+
"version": "9.0.0-canary.58",
|
|
6
6
|
"type": "commonjs",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"types": "src/index.ts",
|
|
@@ -13,28 +13,27 @@
|
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@graphql-mesh/cli": "latest",
|
|
16
|
-
"@lingui/loader": "4.
|
|
17
|
-
"@lingui/swc-plugin": "4.0.
|
|
18
|
-
"@swc/core": "1.
|
|
19
|
-
"@swc/wasm-web": "^1.
|
|
16
|
+
"@lingui/loader": "4.11.2",
|
|
17
|
+
"@lingui/swc-plugin": "4.0.8",
|
|
18
|
+
"@swc/core": "1.6.13",
|
|
19
|
+
"@swc/wasm-web": "^1.6.7",
|
|
20
20
|
"circular-dependency-plugin": "^5.2.2",
|
|
21
|
-
"glob": "^10.
|
|
21
|
+
"glob": "^10.4.5",
|
|
22
22
|
"inspectpack": "^4.7.1",
|
|
23
23
|
"js-yaml-loader": "^1.2.2",
|
|
24
24
|
"lodash": "^4.17.21",
|
|
25
|
-
"woodpile": "^0.0.5",
|
|
26
25
|
"znv": "^0.4.0",
|
|
27
|
-
"zod": "^3.
|
|
26
|
+
"zod": "^3.23.8"
|
|
28
27
|
},
|
|
29
28
|
"devDependencies": {
|
|
30
29
|
"@types/circular-dependency-plugin": "^5.0.8",
|
|
31
|
-
"@types/lodash": "^4.
|
|
32
|
-
"typescript": "5.
|
|
30
|
+
"@types/lodash": "^4.17.7",
|
|
31
|
+
"typescript": "5.5.3"
|
|
33
32
|
},
|
|
34
33
|
"peerDependencies": {
|
|
35
34
|
"@lingui/macro": "^4.2.1",
|
|
36
35
|
"graphql": "^16",
|
|
37
36
|
"next": "*",
|
|
38
|
-
"webpack": "
|
|
37
|
+
"webpack": "~5.92.1"
|
|
39
38
|
}
|
|
40
39
|
}
|
package/src/generated/config.ts
CHANGED
|
@@ -169,6 +169,12 @@ export type GraphCommerceConfig = {
|
|
|
169
169
|
customerCompanyFieldsEnable?: InputMaybe<Scalars['Boolean']['input']>;
|
|
170
170
|
/** Enable customer account deletion through the account section */
|
|
171
171
|
customerDeleteEnabled?: InputMaybe<Scalars['Boolean']['input']>;
|
|
172
|
+
/**
|
|
173
|
+
* X-Magento-Cache-Id allows Varnish to cache requests that are made in the browser while users are logged in. For example the products query can now be cached for logged in users.
|
|
174
|
+
*
|
|
175
|
+
* This can be disabled when Varnish is running out of available memory.
|
|
176
|
+
*/
|
|
177
|
+
customerXMagentoCacheIdDisable?: InputMaybe<Scalars['Boolean']['input']>;
|
|
172
178
|
/** Datalayer config */
|
|
173
179
|
dataLayer?: InputMaybe<DatalayerConfig>;
|
|
174
180
|
/** Debug configuration for GraphCommerce */
|
|
@@ -498,6 +504,7 @@ export function GraphCommerceConfigSchema(): z.ZodObject<Properties<GraphCommerc
|
|
|
498
504
|
customerAddressNoteEnable: z.boolean().nullish(),
|
|
499
505
|
customerCompanyFieldsEnable: z.boolean().nullish(),
|
|
500
506
|
customerDeleteEnabled: z.boolean().nullish(),
|
|
507
|
+
customerXMagentoCacheIdDisable: z.boolean().nullish(),
|
|
501
508
|
dataLayer: DatalayerConfigSchema().nullish(),
|
|
502
509
|
debug: GraphCommerceDebugConfigSchema().nullish(),
|
|
503
510
|
demoMode: z.boolean().default(true).nullish(),
|
|
@@ -873,7 +873,7 @@ export class Visitor {
|
|
|
873
873
|
}
|
|
874
874
|
|
|
875
875
|
visitTsFnParameters(params: TsFnParameter[]): TsFnParameter[] {
|
|
876
|
-
return params
|
|
876
|
+
return params?.map(this.visitTsFnParameter.bind(this))
|
|
877
877
|
}
|
|
878
878
|
|
|
879
879
|
visitTsFnParameter(n: TsFnParameter): TsFnParameter {
|
|
@@ -14,7 +14,7 @@ type PluginBaseConfig = {
|
|
|
14
14
|
sourceModule: string
|
|
15
15
|
targetExport: string
|
|
16
16
|
enabled: boolean
|
|
17
|
-
ifConfig?: string | [string,
|
|
17
|
+
ifConfig?: string | [string, any]
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export function isPluginBaseConfig(plugin: Partial<PluginBaseConfig>): plugin is PluginBaseConfig {
|
|
@@ -9,7 +9,7 @@ const pluginConfigParsed = z.object({
|
|
|
9
9
|
type: z.enum(['component', 'function', 'replace']),
|
|
10
10
|
module: z.string(),
|
|
11
11
|
export: z.string(),
|
|
12
|
-
ifConfig: z.union([z.string(), z.tuple([z.string(), z.
|
|
12
|
+
ifConfig: z.union([z.string(), z.tuple([z.string(), z.unknown()])]).optional(),
|
|
13
13
|
})
|
|
14
14
|
|
|
15
15
|
function nonNullable<T>(value: T): value is NonNullable<T> {
|
|
@@ -62,10 +62,17 @@ export function parseStructure(ast: Module, gcConfig: GraphCommerceConfig, sourc
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
let enabled = true
|
|
65
|
+
|
|
65
66
|
if (parsed.data.ifConfig) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
if (Array.isArray(parsed.data.ifConfig)) {
|
|
68
|
+
const isBoolean = typeof parsed.data.ifConfig[1] === 'boolean'
|
|
69
|
+
let confValue = get(gcConfig, parsed.data.ifConfig[0])
|
|
70
|
+
confValue = isBoolean ? Boolean(confValue) : confValue
|
|
71
|
+
|
|
72
|
+
enabled = confValue === parsed.data.ifConfig[1]
|
|
73
|
+
} else {
|
|
74
|
+
enabled = Boolean(get(gcConfig, parsed.data.ifConfig))
|
|
75
|
+
}
|
|
69
76
|
}
|
|
70
77
|
|
|
71
78
|
const val: PluginConfig = {
|