@graphcommerce/next-config 7.0.0-canary.13 → 7.0.0
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 +258 -2
- package/__tests__/config/utils/__snapshots__/mergeEnvIntoConfig.ts.snap +1 -22
- package/__tests__/interceptors/writeInterceptors.ts +5 -2
- package/__tests__/utils/packageRoots.ts +35 -0
- package/dist/config/commands/exportConfig.js +1 -0
- package/dist/config/commands/generateConfig.js +1 -0
- package/dist/config/demoConfig.js +4 -0
- package/dist/config/loadConfig.js +1 -0
- package/dist/config/utils/exportConfigToEnv.js +3 -0
- package/dist/config/utils/rewriteLegacyEnv.js +1 -1
- package/dist/generated/config.js +14 -1
- package/dist/index.js +2 -0
- package/dist/interceptors/InterceptorPlugin.js +2 -0
- package/dist/interceptors/findPlugins.js +1 -0
- package/dist/runtimeCachingOptimizations.js +28 -0
- package/dist/utils/packageRoots.js +31 -0
- package/dist/withGraphCommerce.js +6 -11
- package/package.json +8 -6
- package/src/config/commands/exportConfig.ts +1 -0
- package/src/config/commands/generateConfig.ts +1 -0
- package/src/config/demoConfig.ts +9 -1
- package/src/config/loadConfig.ts +2 -1
- package/src/config/utils/exportConfigToEnv.ts +5 -1
- package/src/config/utils/mergeEnvIntoConfig.ts +8 -5
- package/src/config/utils/rewriteLegacyEnv.ts +1 -1
- package/src/generated/config.ts +119 -45
- package/src/index.ts +8 -2
- package/src/interceptors/InterceptorPlugin.ts +2 -0
- package/src/interceptors/findPlugins.ts +1 -0
- package/src/interceptors/generateInterceptors.ts +1 -1
- package/src/runtimeCachingOptimizations.ts +27 -0
- package/src/utils/packageRoots.ts +35 -0
- package/src/withGraphCommerce.ts +6 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,264 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
## 7.0.0
|
|
3
|
+
## 7.0.0
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`e55d8c390`](https://github.com/graphcommerce-org/graphcommerce/commit/e55d8c390d90b4bb7bab11c6a99027ac72bd7e3e) - Created a new sidebar layout system, can be configured with productFiltersLayout in the graphcommerce.config.js ([@paales](https://github.com/paales))
|
|
8
|
+
|
|
9
|
+
### Minor Changes
|
|
10
|
+
|
|
11
|
+
- [#1988](https://github.com/graphcommerce-org/graphcommerce/pull/1988) [`af8e0d176`](https://github.com/graphcommerce-org/graphcommerce/commit/af8e0d176af8197a0c13b9a29b438cb54cc29ce4) - Multi website with multiple duplicates locales support. Use website suffixes like `en-us-website1` and `en-us-website2` as the locale declaration. ([@hnsr](https://github.com/hnsr))
|
|
12
|
+
|
|
13
|
+
- [#1915](https://github.com/graphcommerce-org/graphcommerce/pull/1915) [`f4a8c3881`](https://github.com/graphcommerce-org/graphcommerce/commit/f4a8c388183e17c52e7f66536c5448749f494d7f) - Added the ability to create function-plugins for usage in non-component areas and hooks ([@paales](https://github.com/paales))
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#2034](https://github.com/graphcommerce-org/graphcommerce/pull/2034) [`6fca47484`](https://github.com/graphcommerce-org/graphcommerce/commit/6fca474847fe52f004a6ac0abbd88492512b46ad) - Pre-resolve the customFetch in mesh config, so that it works with the new mesh version. ([@paales](https://github.com/paales))
|
|
18
|
+
|
|
19
|
+
- [#1925](https://github.com/graphcommerce-org/graphcommerce/pull/1925) [`2b595bf13`](https://github.com/graphcommerce-org/graphcommerce/commit/2b595bf13f3725a77661586cce021ce8d4791558) - Fixed bug for type error in `demoConfig.ts`. All storefront config values in the demo config are now optional. ([@mikekeehnen](https://github.com/mikekeehnen))
|
|
20
|
+
|
|
21
|
+
- [#1924](https://github.com/graphcommerce-org/graphcommerce/pull/1924) [`04581f619`](https://github.com/graphcommerce-org/graphcommerce/commit/04581f619c609f2f6ca5268ee5effb6a1db3f0eb) - Use the latest branch from graphql-mesh so that all versions are in sync ([@paales](https://github.com/paales))
|
|
22
|
+
|
|
23
|
+
- [#1936](https://github.com/graphcommerce-org/graphcommerce/pull/1936) [`2869ac874`](https://github.com/graphcommerce-org/graphcommerce/commit/2869ac87401d5f00f41cfc9d976fd2c2b23ffac3) - Added redirect for /customer/account so links in (transactional) emails function properly ([@bramvanderholst](https://github.com/bramvanderholst))
|
|
24
|
+
|
|
25
|
+
- [#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))
|
|
26
|
+
|
|
27
|
+
- [#2030](https://github.com/graphcommerce-org/graphcommerce/pull/2030) [`15939ca62`](https://github.com/graphcommerce-org/graphcommerce/commit/15939ca62021c28f7d60382c65927aed15c1ac84) - next-pwa dependency change and next-image caching optimalization ([@mikekeehnen](https://github.com/mikekeehnen))
|
|
28
|
+
|
|
29
|
+
- [#1982](https://github.com/graphcommerce-org/graphcommerce/pull/1982) [`e1fab2f6d`](https://github.com/graphcommerce-org/graphcommerce/commit/e1fab2f6d8f57d0488d8a915596d5c19cb7718e6) - Better detection what the package roots are when a custom node_modules directory is used ([@paales](https://github.com/paales))
|
|
30
|
+
|
|
31
|
+
- [#1959](https://github.com/graphcommerce-org/graphcommerce/pull/1959) [`d0809b132`](https://github.com/graphcommerce-org/graphcommerce/commit/d0809b132a0e4cbdfeb86164f6c16a89ebecd987) - Added support for default values in the Config.graphqls files for the documentation ([@JoshuaS98](https://github.com/JoshuaS98))
|
|
32
|
+
|
|
33
|
+
## 6.2.0-canary.98
|
|
34
|
+
|
|
35
|
+
## 6.2.0-canary.97
|
|
36
|
+
|
|
37
|
+
## 6.2.0-canary.96
|
|
38
|
+
|
|
39
|
+
## 6.2.0-canary.95
|
|
40
|
+
|
|
41
|
+
### Patch Changes
|
|
42
|
+
|
|
43
|
+
- [#2030](https://github.com/graphcommerce-org/graphcommerce/pull/2030) [`15939ca62`](https://github.com/graphcommerce-org/graphcommerce/commit/15939ca62021c28f7d60382c65927aed15c1ac84) - next-pwa dependency change and next-image caching optimalization ([@mikekeehnen](https://github.com/mikekeehnen))
|
|
44
|
+
|
|
45
|
+
## 6.2.0-canary.94
|
|
46
|
+
|
|
47
|
+
## 6.2.0-canary.93
|
|
48
|
+
|
|
49
|
+
### Patch Changes
|
|
50
|
+
|
|
51
|
+
- [#2038](https://github.com/graphcommerce-org/graphcommerce/pull/2038) [`9b872e6f1`](https://github.com/graphcommerce-org/graphcommerce/commit/9b872e6f11a83cd13f8bbe00ad911c410bcd5b65) - Updated dependencies ([@paales](https://github.com/paales))
|
|
52
|
+
|
|
53
|
+
## 6.2.0-canary.92
|
|
54
|
+
|
|
55
|
+
## 6.2.0-canary.91
|
|
56
|
+
|
|
57
|
+
## 6.2.0-canary.90
|
|
58
|
+
|
|
59
|
+
### Patch Changes
|
|
60
|
+
|
|
61
|
+
- [#2034](https://github.com/graphcommerce-org/graphcommerce/pull/2034) [`6fca47484`](https://github.com/graphcommerce-org/graphcommerce/commit/6fca474847fe52f004a6ac0abbd88492512b46ad) - Pre-resolve the customFetch in mesh config ([@paales](https://github.com/paales))
|
|
62
|
+
|
|
63
|
+
## 6.2.0-canary.89
|
|
64
|
+
|
|
65
|
+
## 6.2.0-canary.88
|
|
66
|
+
|
|
67
|
+
## 6.2.0-canary.87
|
|
68
|
+
|
|
69
|
+
### Patch Changes
|
|
70
|
+
|
|
71
|
+
- [#2022](https://github.com/graphcommerce-org/graphcommerce/pull/2022) [`0495db84d`](https://github.com/graphcommerce-org/graphcommerce/commit/0495db84d1d450750bd74b94a379b4e7764a5753) - add documentation for the GraphCommerceStorefrontConfig gallery option. ([@carlocarels90](https://github.com/carlocarels90))
|
|
72
|
+
|
|
73
|
+
## 6.2.0-canary.86
|
|
74
|
+
|
|
75
|
+
## 6.2.0-canary.85
|
|
76
|
+
|
|
77
|
+
## 6.2.0-canary.84
|
|
78
|
+
|
|
79
|
+
### Patch Changes
|
|
80
|
+
|
|
81
|
+
- [#2024](https://github.com/graphcommerce-org/graphcommerce/pull/2024) [`1ae747e85`](https://github.com/graphcommerce-org/graphcommerce/commit/1ae747e85faab75168718cb5ea930111d3223cc4) - Hot reloading didn't work because of a broken lingui version ([@paales](https://github.com/paales))
|
|
82
|
+
|
|
83
|
+
## 6.2.0-canary.83
|
|
84
|
+
|
|
85
|
+
## 6.2.0-canary.82
|
|
86
|
+
|
|
87
|
+
## 6.2.0-canary.81
|
|
88
|
+
|
|
89
|
+
## 6.2.0-canary.80
|
|
90
|
+
|
|
91
|
+
## 6.2.0-canary.79
|
|
92
|
+
|
|
93
|
+
## 6.2.0-canary.78
|
|
94
|
+
|
|
95
|
+
### Minor Changes
|
|
96
|
+
|
|
97
|
+
- [#1988](https://github.com/graphcommerce-org/graphcommerce/pull/1988) [`af8e0d176`](https://github.com/graphcommerce-org/graphcommerce/commit/af8e0d176af8197a0c13b9a29b438cb54cc29ce4) - Multi website with multiple duplicates locales support. Use `en-us-website1`, `en-us-website2` as the locale declaration. ([@hnsr](https://github.com/hnsr))
|
|
98
|
+
|
|
99
|
+
## 6.2.0-canary.77
|
|
100
|
+
|
|
101
|
+
## 6.2.0-canary.76
|
|
102
|
+
|
|
103
|
+
## 6.2.0-canary.75
|
|
104
|
+
|
|
105
|
+
## 6.2.0-canary.74
|
|
106
|
+
|
|
107
|
+
## 6.2.0-canary.73
|
|
108
|
+
|
|
109
|
+
## 6.2.0-canary.72
|
|
110
|
+
|
|
111
|
+
## 6.2.0-canary.71
|
|
112
|
+
|
|
113
|
+
## 6.2.0-canary.70
|
|
114
|
+
|
|
115
|
+
## 6.2.0-canary.69
|
|
116
|
+
|
|
117
|
+
## 6.2.0-canary.68
|
|
118
|
+
|
|
119
|
+
## 6.2.0-canary.67
|
|
120
|
+
|
|
121
|
+
### Patch Changes
|
|
122
|
+
|
|
123
|
+
- [#2002](https://github.com/graphcommerce-org/graphcommerce/pull/2002) [`1234bb61f`](https://github.com/graphcommerce-org/graphcommerce/commit/1234bb61f8332da8a9e4dd7262b0c70beaed8c91) - Updated next and apollo/client ([@paales](https://github.com/paales))
|
|
124
|
+
|
|
125
|
+
## 6.2.0-canary.66
|
|
126
|
+
|
|
127
|
+
## 6.2.0-canary.65
|
|
128
|
+
|
|
129
|
+
## 6.2.0-canary.64
|
|
130
|
+
|
|
131
|
+
## 6.2.0-canary.63
|
|
132
|
+
|
|
133
|
+
## 6.2.0-canary.62
|
|
134
|
+
|
|
135
|
+
## 6.2.0-canary.61
|
|
136
|
+
|
|
137
|
+
## 6.2.0-canary.60
|
|
138
|
+
|
|
139
|
+
## 6.2.0-canary.59
|
|
140
|
+
|
|
141
|
+
## 6.2.0-canary.58
|
|
142
|
+
|
|
143
|
+
## 6.2.0-canary.57
|
|
144
|
+
|
|
145
|
+
### Patch Changes
|
|
146
|
+
|
|
147
|
+
- [#1982](https://github.com/graphcommerce-org/graphcommerce/pull/1982) [`e1fab2f6d`](https://github.com/graphcommerce-org/graphcommerce/commit/e1fab2f6d8f57d0488d8a915596d5c19cb7718e6) - Better detection what the package roots are when a custom node_modules directory is used ([@paales](https://github.com/paales))
|
|
148
|
+
|
|
149
|
+
## 6.2.0-canary.56
|
|
150
|
+
|
|
151
|
+
## 6.2.0-canary.55
|
|
152
|
+
|
|
153
|
+
## 6.2.0-canary.54
|
|
154
|
+
|
|
155
|
+
## 6.2.0-canary.53
|
|
156
|
+
|
|
157
|
+
## 6.2.0-canary.52
|
|
158
|
+
|
|
159
|
+
## 6.2.0-canary.51
|
|
160
|
+
|
|
161
|
+
## 6.2.0-canary.50
|
|
162
|
+
|
|
163
|
+
### Minor Changes
|
|
164
|
+
|
|
165
|
+
- [`e55d8c390`](https://github.com/graphcommerce-org/graphcommerce/commit/e55d8c390d90b4bb7bab11c6a99027ac72bd7e3e) - Created a new sidebar layout system, can be configured with productFiltersLayout in the graphcommerce.config.js ([@paales](https://github.com/paales))
|
|
166
|
+
|
|
167
|
+
## 6.2.0-canary.49
|
|
168
|
+
|
|
169
|
+
### Patch Changes
|
|
170
|
+
|
|
171
|
+
- [#1959](https://github.com/graphcommerce-org/graphcommerce/pull/1959) [`d0809b132`](https://github.com/graphcommerce-org/graphcommerce/commit/d0809b132a0e4cbdfeb86164f6c16a89ebecd987) - Added support for default values in the Config.graphqls files for the documentation ([@JoshuaS98](https://github.com/JoshuaS98))
|
|
172
|
+
|
|
173
|
+
## 6.2.0-canary.48
|
|
174
|
+
|
|
175
|
+
## 6.2.0-canary.47
|
|
176
|
+
|
|
177
|
+
## 6.2.0-canary.46
|
|
178
|
+
|
|
179
|
+
## 6.2.0-canary.45
|
|
180
|
+
|
|
181
|
+
## 6.2.0-canary.44
|
|
182
|
+
|
|
183
|
+
## 6.2.0-canary.43
|
|
184
|
+
|
|
185
|
+
## 6.2.0-canary.42
|
|
186
|
+
|
|
187
|
+
## 6.2.0-canary.41
|
|
188
|
+
|
|
189
|
+
### Patch Changes
|
|
190
|
+
|
|
191
|
+
- [#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))
|
|
192
|
+
|
|
193
|
+
## 6.2.0-canary.40
|
|
194
|
+
|
|
195
|
+
## 6.2.0-canary.39
|
|
196
|
+
|
|
197
|
+
## 6.2.0-canary.38
|
|
198
|
+
|
|
199
|
+
## 6.2.0-canary.37
|
|
200
|
+
|
|
201
|
+
## 6.2.0-canary.36
|
|
202
|
+
|
|
203
|
+
## 6.2.0-canary.35
|
|
204
|
+
|
|
205
|
+
## 6.2.0-canary.34
|
|
206
|
+
|
|
207
|
+
## 6.2.0-canary.33
|
|
208
|
+
|
|
209
|
+
## 6.2.0-canary.32
|
|
210
|
+
|
|
211
|
+
## 6.2.0-canary.31
|
|
212
|
+
|
|
213
|
+
## 6.2.0-canary.30
|
|
214
|
+
|
|
215
|
+
## 6.2.0-canary.29
|
|
216
|
+
|
|
217
|
+
## 6.2.0-canary.28
|
|
218
|
+
|
|
219
|
+
## 6.2.0-canary.27
|
|
220
|
+
|
|
221
|
+
## 6.2.0-canary.26
|
|
222
|
+
|
|
223
|
+
## 6.2.0-canary.25
|
|
224
|
+
|
|
225
|
+
## 6.2.0-canary.24
|
|
226
|
+
|
|
227
|
+
## 6.2.0-canary.23
|
|
228
|
+
|
|
229
|
+
## 6.2.0-canary.22
|
|
230
|
+
|
|
231
|
+
## 6.2.0-canary.21
|
|
232
|
+
|
|
233
|
+
## 6.2.0-canary.20
|
|
234
|
+
|
|
235
|
+
### Patch Changes
|
|
236
|
+
|
|
237
|
+
- [#1928](https://github.com/graphcommerce-org/graphcommerce/pull/1928) [`09d6a7abd`](https://github.com/graphcommerce-org/graphcommerce/commit/09d6a7abdf44c04a37f59432e9fc0c0722e6df76) - Added number to config value formatter, so Graphcommerce config accepts number values. ([@mikekeehnen](https://github.com/mikekeehnen))
|
|
238
|
+
|
|
239
|
+
## 6.2.0-canary.19
|
|
240
|
+
|
|
241
|
+
## 6.2.0-canary.18
|
|
242
|
+
|
|
243
|
+
## 6.2.0-canary.17
|
|
244
|
+
|
|
245
|
+
## 6.2.0-canary.16
|
|
246
|
+
|
|
247
|
+
## 6.2.0-canary.15
|
|
248
|
+
|
|
249
|
+
## 6.2.0-canary.14
|
|
250
|
+
|
|
251
|
+
### Patch Changes
|
|
252
|
+
|
|
253
|
+
- [#1925](https://github.com/graphcommerce-org/graphcommerce/pull/1925) [`2b595bf13`](https://github.com/graphcommerce-org/graphcommerce/commit/2b595bf13f3725a77661586cce021ce8d4791558) - Fixed bug for type error in `demoConfig.ts`. All storefront config values in the demo config are now optional. ([@mikekeehnen](https://github.com/mikekeehnen))
|
|
254
|
+
|
|
255
|
+
## 6.2.0-canary.13
|
|
256
|
+
|
|
257
|
+
### Patch Changes
|
|
258
|
+
|
|
259
|
+
- [#1924](https://github.com/graphcommerce-org/graphcommerce/pull/1924) [`04581f619`](https://github.com/graphcommerce-org/graphcommerce/commit/04581f619c609f2f6ca5268ee5effb6a1db3f0eb) - Use the latest branch from graphql-mesh so that all versions are in sync ([@paales](https://github.com/paales))
|
|
260
|
+
|
|
261
|
+
## 6.2.0-canary.12
|
|
6
262
|
|
|
7
263
|
## 6.2.0-canary.11
|
|
8
264
|
|
|
@@ -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
|
-
"
|
|
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",
|
|
@@ -1,32 +1,35 @@
|
|
|
1
1
|
import { generateInterceptors } from '../../src/interceptors/generateInterceptors'
|
|
2
|
-
import { writeInterceptors } from '../../src/interceptors/writeInterceptors'
|
|
3
2
|
import { resolveDependency } from '../../src/utils/resolveDependency'
|
|
4
3
|
|
|
5
4
|
const projectRoot = `${process.cwd()}/examples/magento-graphcms`
|
|
6
5
|
|
|
7
6
|
it('writes all interceptors to disk', () => {
|
|
8
7
|
const resolve = resolveDependency(projectRoot)
|
|
9
|
-
|
|
8
|
+
generateInterceptors(
|
|
10
9
|
[
|
|
11
10
|
{
|
|
12
11
|
component: 'PaymentMethodContextProvider',
|
|
13
12
|
exported: '@graphcommerce/magento-cart-payment-method',
|
|
14
13
|
plugin: '@graphcommerce/mollie-magento-payment/plugins/AddMollieMethods',
|
|
14
|
+
enabled: true,
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
component: 'PaymentMethodContextProvider',
|
|
18
18
|
exported: '@graphcommerce/magento-cart-payment-method',
|
|
19
19
|
plugin: '@graphcommerce/magento-payment-braintree/plugins/AddBraintreeMethods',
|
|
20
|
+
enabled: true,
|
|
20
21
|
},
|
|
21
22
|
{
|
|
22
23
|
component: 'PaymentMethodContextProvider',
|
|
23
24
|
exported: '@graphcommerce/magento-cart-payment-method',
|
|
24
25
|
plugin: '@graphcommerce/magento-payment-included/plugins/AddIncludedMethods',
|
|
26
|
+
enabled: true,
|
|
25
27
|
},
|
|
26
28
|
{
|
|
27
29
|
component: 'PaymentMethodContextProvider',
|
|
28
30
|
exported: '@graphcommerce/magento-cart-payment-method',
|
|
29
31
|
plugin: '@graphcommerce/magento-payment-paypal/plugins/AddPaypalMethods',
|
|
32
|
+
enabled: true,
|
|
30
33
|
},
|
|
31
34
|
],
|
|
32
35
|
resolve,
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { packageRoots } from '../../src/utils/packageRoots'
|
|
2
|
+
|
|
3
|
+
describe('packageRoots', () => {
|
|
4
|
+
it('should simplify all common paths', () => {
|
|
5
|
+
const paths = [
|
|
6
|
+
'../../packages/cli',
|
|
7
|
+
'../../packages/hygraph-cli',
|
|
8
|
+
'../../packagesDev/next-config',
|
|
9
|
+
'../../packagesDev/next-la',
|
|
10
|
+
'../../../layers/paketo-buildpacks_yarn-install/build-modules/node_modules/@graphcommerce/magento-cart-items',
|
|
11
|
+
'../../../layers/paketo-buildpacks_yarn-install/build-modules/node_modules/@graphcommerce/magento-product',
|
|
12
|
+
// ... (rest of your paths)
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
const expectedRoots = [
|
|
16
|
+
'../../packages',
|
|
17
|
+
'../../packagesDev',
|
|
18
|
+
'../../../layers/paketo-buildpacks_yarn-install/build-modules/node_modules/@graphcommerce',
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
const roots = packageRoots(paths)
|
|
22
|
+
|
|
23
|
+
// Expect roots to be an array
|
|
24
|
+
expect(Array.isArray(roots)).toBe(true)
|
|
25
|
+
|
|
26
|
+
// Expect the roots array to be equal to expectedRoots
|
|
27
|
+
expect(expectedRoots).toEqual(roots)
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
it('should return an empty array for no common roots', () => {
|
|
31
|
+
const paths = ['../a/b', '../c/d']
|
|
32
|
+
const roots = packageRoots(paths)
|
|
33
|
+
expect(roots).toEqual([])
|
|
34
|
+
})
|
|
35
|
+
})
|
|
@@ -6,6 +6,7 @@ const exportConfigToEnv_1 = require("../utils/exportConfigToEnv");
|
|
|
6
6
|
// eslint-disable-next-line @typescript-eslint/require-await
|
|
7
7
|
async function exportConfig() {
|
|
8
8
|
const conf = (0, loadConfig_1.loadConfig)(process.cwd());
|
|
9
|
+
// eslint-disable-next-line no-console
|
|
9
10
|
console.log((0, exportConfigToEnv_1.exportConfigToEnv)(conf));
|
|
10
11
|
}
|
|
11
12
|
exports.exportConfig = exportConfig;
|
|
@@ -19,8 +19,12 @@ exports.demoConfig = {
|
|
|
19
19
|
{ locale: 'en-ca', magentoStoreCode: 'en_CA' },
|
|
20
20
|
],
|
|
21
21
|
productFiltersPro: true,
|
|
22
|
+
productFiltersLayout: 'DEFAULT',
|
|
23
|
+
compareVariant: 'ICON',
|
|
22
24
|
robotsAllow: false,
|
|
23
25
|
demoMode: true,
|
|
24
26
|
limitSsg: true,
|
|
25
27
|
compare: true,
|
|
28
|
+
configurableVariantForSimple: true,
|
|
29
|
+
configurableVariantValues: { url: true, content: true, gallery: true },
|
|
26
30
|
};
|
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.loadConfig = void 0;
|
|
18
|
+
/* eslint-disable no-console */
|
|
18
19
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
19
20
|
const cosmiconfig_1 = require("cosmiconfig");
|
|
20
21
|
const config_1 = require("../generated/config");
|
|
@@ -10,6 +10,9 @@ const fmt = (value) => {
|
|
|
10
10
|
if (typeof formattedValue === 'object') {
|
|
11
11
|
formattedValue = JSON.stringify(formattedValue);
|
|
12
12
|
}
|
|
13
|
+
if (typeof formattedValue === 'number') {
|
|
14
|
+
formattedValue = String(formattedValue);
|
|
15
|
+
}
|
|
13
16
|
return formattedValue;
|
|
14
17
|
};
|
|
15
18
|
function exportConfigToEnv(config) {
|
|
@@ -84,7 +84,7 @@ function rewriteLegacyEnv(schema, env, config = {}) {
|
|
|
84
84
|
config.storefront = [];
|
|
85
85
|
config.storefront.forEach((storefront, index) => {
|
|
86
86
|
if (!inclTax.includes(storefront.locale))
|
|
87
|
-
return
|
|
87
|
+
return;
|
|
88
88
|
clonedEnv[`GC_STOREFRONT_${index}_CART_DISPLAY_PRICES_INCL_TAX`] = '1';
|
|
89
89
|
});
|
|
90
90
|
applied.push({
|
package/dist/generated/config.js
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GraphCommerceStorefrontConfigSchema = exports.GraphCommerceDebugConfigSchema = exports.GraphCommerceConfigSchema = exports.CompareVariantSchema = exports.definedNonNullAnySchema = exports.isDefinedNonNullAny = void 0;
|
|
3
|
+
exports.MagentoConfigurableVariantValuesSchema = exports.GraphCommerceStorefrontConfigSchema = exports.GraphCommerceDebugConfigSchema = exports.GraphCommerceConfigSchema = 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.ProductFiltersLayoutSchema = zod_1.z.enum(['DEFAULT', 'SIDEBAR']);
|
|
10
11
|
function GraphCommerceConfigSchema() {
|
|
11
12
|
return zod_1.z.object({
|
|
12
13
|
canonicalBaseUrl: zod_1.z.string().min(1),
|
|
13
14
|
cartDisplayPricesInclTax: zod_1.z.boolean().nullish(),
|
|
14
15
|
compare: zod_1.z.boolean().nullish(),
|
|
15
16
|
compareVariant: exports.CompareVariantSchema.nullish(),
|
|
17
|
+
configurableVariantForSimple: zod_1.z.boolean().nullish(),
|
|
18
|
+
configurableVariantValues: MagentoConfigurableVariantValuesSchema().nullish(),
|
|
16
19
|
customerRequireEmailConfirmation: zod_1.z.boolean().nullish(),
|
|
17
20
|
debug: GraphCommerceDebugConfigSchema().nullish(),
|
|
18
21
|
demoMode: zod_1.z.boolean().nullish(),
|
|
@@ -20,12 +23,14 @@ function GraphCommerceConfigSchema() {
|
|
|
20
23
|
googleRecaptchaKey: zod_1.z.string().nullish(),
|
|
21
24
|
googleTagmanagerId: zod_1.z.string().nullish(),
|
|
22
25
|
hygraphEndpoint: zod_1.z.string().min(1),
|
|
26
|
+
hygraphProjectId: zod_1.z.string().nullish(),
|
|
23
27
|
hygraphWriteAccessEndpoint: zod_1.z.string().nullish(),
|
|
24
28
|
hygraphWriteAccessToken: zod_1.z.string().nullish(),
|
|
25
29
|
legacyProductRoute: zod_1.z.boolean().nullish(),
|
|
26
30
|
limitSsg: zod_1.z.boolean().nullish(),
|
|
27
31
|
magentoEndpoint: zod_1.z.string().min(1),
|
|
28
32
|
previewSecret: zod_1.z.string().nullish(),
|
|
33
|
+
productFiltersLayout: exports.ProductFiltersLayoutSchema.nullish(),
|
|
29
34
|
productFiltersPro: zod_1.z.boolean().nullish(),
|
|
30
35
|
productRoute: zod_1.z.string().nullish(),
|
|
31
36
|
robotsAllow: zod_1.z.boolean().nullish(),
|
|
@@ -60,3 +65,11 @@ function GraphCommerceStorefrontConfigSchema() {
|
|
|
60
65
|
});
|
|
61
66
|
}
|
|
62
67
|
exports.GraphCommerceStorefrontConfigSchema = GraphCommerceStorefrontConfigSchema;
|
|
68
|
+
function MagentoConfigurableVariantValuesSchema() {
|
|
69
|
+
return zod_1.z.object({
|
|
70
|
+
content: zod_1.z.boolean().nullish(),
|
|
71
|
+
gallery: zod_1.z.boolean().nullish(),
|
|
72
|
+
url: zod_1.z.boolean().nullish()
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
exports.MagentoConfigurableVariantValuesSchema = MagentoConfigurableVariantValuesSchema;
|
package/dist/index.js
CHANGED
|
@@ -16,6 +16,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./utils/isMonorepo"), exports);
|
|
18
18
|
__exportStar(require("./utils/resolveDependenciesSync"), exports);
|
|
19
|
+
__exportStar(require("./utils/packageRoots"), exports);
|
|
19
20
|
__exportStar(require("./withGraphCommerce"), exports);
|
|
20
21
|
__exportStar(require("./generated/config"), exports);
|
|
21
22
|
__exportStar(require("./config"), exports);
|
|
23
|
+
__exportStar(require("./runtimeCachingOptimizations"), exports);
|
|
@@ -13,6 +13,7 @@ class InterceptorPlugin {
|
|
|
13
13
|
constructor(config) {
|
|
14
14
|
this.config = config;
|
|
15
15
|
this.resolveDependency = (0, resolveDependency_1.resolveDependency)();
|
|
16
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
16
17
|
const [plugins, errors] = (0, findPlugins_1.findPlugins)(this.config);
|
|
17
18
|
this.interceptors = (0, generateInterceptors_1.generateInterceptors)(plugins, this.resolveDependency, this.config.debug);
|
|
18
19
|
this.interceptorByDepependency = Object.fromEntries(Object.values(this.interceptors).map((i) => [i.dependency, i]));
|
|
@@ -22,6 +23,7 @@ class InterceptorPlugin {
|
|
|
22
23
|
const logger = compiler.getInfrastructureLogger('InterceptorPlugin');
|
|
23
24
|
// After the compilation has succeeded we watch all possible plugin locations.
|
|
24
25
|
compiler.hooks.afterCompile.tap('InterceptorPlugin', (compilation) => {
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
25
27
|
const [plugins, errors] = (0, findPlugins_1.findPlugins)(this.config);
|
|
26
28
|
plugins.forEach((p) => {
|
|
27
29
|
const absoluteFilePath = `${path_1.default.join(process.cwd(), this.resolveDependency(p.plugin).fromRoot)}.tsx`;
|