@graphcommerce/next-config 8.1.0-canary.2 → 8.1.0-canary.5

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.
Files changed (44) hide show
  1. package/CHANGELOG.md +133 -1
  2. package/Config.graphqls +4 -2
  3. package/__tests__/config/utils/__snapshots__/mergeEnvIntoConfig.ts.snap +19 -2
  4. package/__tests__/config/utils/replaceConfigInString.ts +4 -0
  5. package/__tests__/interceptors/findPlugins.ts +473 -113
  6. package/__tests__/interceptors/generateInterceptors.ts +610 -322
  7. package/__tests__/interceptors/parseStructure.ts +158 -0
  8. package/__tests__/interceptors/writeInterceptors.ts +23 -14
  9. package/__tests__/utils/resolveDependenciesSync.ts +28 -25
  10. package/dist/config/commands/generateConfig.js +5 -2
  11. package/dist/config/demoConfig.js +19 -4
  12. package/dist/generated/config.js +8 -1
  13. package/dist/interceptors/InterceptorPlugin.js +70 -25
  14. package/dist/interceptors/RenameVisitor.js +19 -0
  15. package/dist/interceptors/Visitor.js +1418 -0
  16. package/dist/interceptors/extractExports.js +201 -0
  17. package/dist/interceptors/findOriginalSource.js +87 -0
  18. package/dist/interceptors/findPlugins.js +21 -53
  19. package/dist/interceptors/generateInterceptor.js +200 -0
  20. package/dist/interceptors/generateInterceptors.js +38 -179
  21. package/dist/interceptors/parseStructure.js +71 -0
  22. package/dist/interceptors/swc.js +16 -0
  23. package/dist/interceptors/writeInterceptors.js +19 -10
  24. package/dist/utils/resolveDependency.js +27 -5
  25. package/dist/withGraphCommerce.js +2 -1
  26. package/package.json +4 -1
  27. package/src/config/commands/generateConfig.ts +5 -2
  28. package/src/config/demoConfig.ts +19 -4
  29. package/src/config/index.ts +4 -2
  30. package/src/generated/config.ts +25 -3
  31. package/src/index.ts +16 -6
  32. package/src/interceptors/InterceptorPlugin.ts +90 -32
  33. package/src/interceptors/RenameVisitor.ts +17 -0
  34. package/src/interceptors/Visitor.ts +1847 -0
  35. package/src/interceptors/extractExports.ts +230 -0
  36. package/src/interceptors/findOriginalSource.ts +105 -0
  37. package/src/interceptors/findPlugins.ts +36 -87
  38. package/src/interceptors/generateInterceptor.ts +271 -0
  39. package/src/interceptors/generateInterceptors.ts +67 -237
  40. package/src/interceptors/parseStructure.ts +82 -0
  41. package/src/interceptors/swc.ts +13 -0
  42. package/src/interceptors/writeInterceptors.ts +26 -10
  43. package/src/utils/resolveDependency.ts +51 -12
  44. package/src/withGraphCommerce.ts +2 -1
@@ -7,6 +7,10 @@ it('finds plugins', () => {
7
7
  const fakeconfig = {
8
8
  googleRecaptchaKey: '123',
9
9
  googleAnalyticsId: '123',
10
+ // demoMode: true,
11
+ debug: {
12
+ pluginStatus: true,
13
+ },
10
14
  } as GraphCommerceConfig
11
15
 
12
16
  const [plugins, errors] = findPlugins(fakeconfig, projectRoot)
@@ -18,232 +22,588 @@ it('finds plugins', () => {
18
22
  expect(enabled).toMatchInlineSnapshot(`
19
23
  [
20
24
  {
21
- "component": "AddProductsToCartForm",
22
25
  "enabled": true,
23
- "exported": "@graphcommerce/magento-product",
24
26
  "ifConfig": "googleAnalyticsId",
25
- "plugin": "@graphcommerce/googleanalytics/plugins/GaAddProductsToCartForm",
27
+ "sourceExport": "plugin",
28
+ "sourceModule": "./@graphcommerce/googleanalytics/plugins/gtagEvent",
29
+ "targetExport": "sendEvent",
30
+ "targetModule": "@graphcommerce/google-datalayer/api/sendEvent",
31
+ "type": "function",
26
32
  },
27
33
  {
28
- "component": "CartStartCheckout",
29
34
  "enabled": true,
30
- "exported": "@graphcommerce/magento-cart",
31
35
  "ifConfig": "googleAnalyticsId",
32
- "plugin": "@graphcommerce/googleanalytics/plugins/GaCartStartCheckout",
36
+ "sourceExport": "Plugin",
37
+ "sourceModule": "./@graphcommerce/googleanalytics/plugins/GaFramerNextPages",
38
+ "targetExport": "FramerNextPages",
39
+ "targetModule": "@graphcommerce/framer-next-pages",
40
+ "type": "component",
33
41
  },
34
42
  {
35
- "component": "CartStartCheckoutLinkOrButton",
36
43
  "enabled": true,
37
- "exported": "@graphcommerce/magento-cart",
38
- "ifConfig": "googleAnalyticsId",
39
- "plugin": "@graphcommerce/googleanalytics/plugins/GaCartStartCheckoutLinkOrButton",
44
+ "ifConfig": "googleRecaptchaKey",
45
+ "sourceExport": "Plugin",
46
+ "sourceModule": "./@graphcommerce/googlerecaptcha/plugins/GrecaptchaGraphQLProvider",
47
+ "targetExport": "GraphQLProvider",
48
+ "targetModule": "@graphcommerce/graphql",
49
+ "type": "component",
40
50
  },
41
51
  {
42
- "component": "FramerNextPages",
43
52
  "enabled": true,
44
- "exported": "@graphcommerce/framer-next-pages",
45
- "ifConfig": "googleAnalyticsId",
46
- "plugin": "@graphcommerce/googleanalytics/plugins/GaFramerNextPages",
53
+ "ifConfig": "googleRecaptchaKey",
54
+ "sourceExport": "Plugin",
55
+ "sourceModule": "./@graphcommerce/googlerecaptcha/plugins/GrecaptchaApolloErrorSnackbar",
56
+ "targetExport": "ApolloErrorSnackbar",
57
+ "targetModule": "@graphcommerce/ecommerce-ui",
58
+ "type": "component",
47
59
  },
48
60
  {
49
- "component": "PaymentMethodButton",
50
61
  "enabled": true,
51
- "exported": "@graphcommerce/magento-cart-payment-method",
52
- "ifConfig": "googleAnalyticsId",
53
- "plugin": "@graphcommerce/googleanalytics/plugins/GaPaymentMethodButton",
62
+ "ifConfig": "googleRecaptchaKey",
63
+ "sourceExport": "Plugin",
64
+ "sourceModule": "./@graphcommerce/googlerecaptcha/plugins/GrecaptchaApolloErrorFullPage",
65
+ "targetExport": "ApolloErrorFullPage",
66
+ "targetModule": "@graphcommerce/ecommerce-ui",
67
+ "type": "component",
54
68
  },
55
69
  {
56
- "component": "PaymentMethodContextProvider",
57
70
  "enabled": true,
58
- "exported": "@graphcommerce/magento-cart-payment-method",
59
- "ifConfig": "googleAnalyticsId",
60
- "plugin": "@graphcommerce/googleanalytics/plugins/GaPaymentMethodContextProvider",
71
+ "ifConfig": "googleRecaptchaKey",
72
+ "sourceExport": "Plugin",
73
+ "sourceModule": "./@graphcommerce/googlerecaptcha/plugins/GrecaptchaApolloErrorAlert",
74
+ "targetExport": "ApolloErrorAlert",
75
+ "targetModule": "@graphcommerce/ecommerce-ui",
76
+ "type": "component",
61
77
  },
62
78
  {
63
- "component": "ProductListItem",
64
79
  "enabled": true,
65
- "exported": "@graphcommerce/magento-product",
66
- "ifConfig": "googleAnalyticsId",
67
- "plugin": "@graphcommerce/googleanalytics/plugins/GaProductListItem",
80
+ "sourceExport": "Plugin",
81
+ "sourceModule": "./@graphcommerce/google-datalayer/plugins/GoogleDatalayerViewItem",
82
+ "targetExport": "ProductPageMeta",
83
+ "targetModule": "@graphcommerce/magento-product",
84
+ "type": "component",
68
85
  },
69
86
  {
70
- "component": "ProductListItemsBase",
71
87
  "enabled": true,
72
- "exported": "@graphcommerce/magento-product",
73
- "ifConfig": "googleAnalyticsId",
74
- "plugin": "@graphcommerce/googleanalytics/plugins/GaProductListItemsBase",
88
+ "sourceExport": "Plugin",
89
+ "sourceModule": "./@graphcommerce/google-datalayer/plugins/GoogleDatalayerUpdateItemQuantity",
90
+ "targetExport": "UpdateItemQuantity",
91
+ "targetModule": "@graphcommerce/magento-cart-items/components/UpdateItemQuantity/UpdateItemQuantity",
92
+ "type": "component",
75
93
  },
76
94
  {
77
- "component": "RemoveItemFromCartFab",
78
95
  "enabled": true,
79
- "exported": "@graphcommerce/magento-cart-items/RemoveItemFromCart/RemoveItemFromCartFab",
80
- "ifConfig": "googleAnalyticsId",
81
- "plugin": "@graphcommerce/googleanalytics/plugins/GaRemoveItemFromCart",
96
+ "sourceExport": "Plugin",
97
+ "sourceModule": "./@graphcommerce/google-datalayer/plugins/GoogleDatalayerShippingMethodForm",
98
+ "targetExport": "ShippingMethodForm",
99
+ "targetModule": "@graphcommerce/magento-cart-shipping-method",
100
+ "type": "component",
82
101
  },
83
102
  {
84
- "component": "ShippingMethodForm",
85
103
  "enabled": true,
86
- "exported": "@graphcommerce/magento-cart-shipping-method",
87
- "ifConfig": "googleAnalyticsId",
88
- "plugin": "@graphcommerce/googleanalytics/plugins/GaShippingMethodForm",
104
+ "sourceExport": "Plugin",
105
+ "sourceModule": "./@graphcommerce/google-datalayer/plugins/GoogleDatalayerShippingMethodForm",
106
+ "targetExport": "ShippingMethodForm",
107
+ "targetModule": "@graphcommerce/magento-cart-shipping-method",
108
+ "type": "component",
89
109
  },
90
110
  {
91
- "component": "UpdateItemQuantity",
92
111
  "enabled": true,
93
- "exported": "@graphcommerce/magento-cart-items/UpdateItemQuantity/UpdateItemQuantity",
94
- "ifConfig": "googleAnalyticsId",
95
- "plugin": "@graphcommerce/googleanalytics/plugins/GaUpdateItemQuantity",
112
+ "sourceExport": "Plugin",
113
+ "sourceModule": "./@graphcommerce/google-datalayer/plugins/GoogleDatalayerRemoveItemFromCartFab",
114
+ "targetExport": "RemoveItemFromCartFab",
115
+ "targetModule": "@graphcommerce/magento-cart-items/components/RemoveItemFromCart/RemoveItemFromCartFab",
116
+ "type": "component",
96
117
  },
97
118
  {
98
- "component": "ProductPageMeta",
99
119
  "enabled": true,
100
- "exported": "@graphcommerce/magento-product",
101
- "ifConfig": "googleAnalyticsId",
102
- "plugin": "@graphcommerce/googleanalytics/plugins/GaViewItem",
120
+ "sourceExport": "Plugin",
121
+ "sourceModule": "./@graphcommerce/google-datalayer/plugins/GoogleDatalayerRemoveItemFromCartFab",
122
+ "targetExport": "RemoveItemFromCartFab",
123
+ "targetModule": "@graphcommerce/magento-cart-items/components/RemoveItemFromCart/RemoveItemFromCartFab",
124
+ "type": "component",
103
125
  },
104
126
  {
105
- "component": "ApolloErrorAlert",
106
127
  "enabled": true,
107
- "exported": "@graphcommerce/ecommerce-ui",
108
- "ifConfig": "googleRecaptchaKey",
109
- "plugin": "@graphcommerce/googlerecaptcha/plugins/GrecaptchaApolloErrorAlert",
128
+ "sourceExport": "Plugin",
129
+ "sourceModule": "./@graphcommerce/google-datalayer/plugins/GoogleDatalayerRemoveItemFromCart",
130
+ "targetExport": "RemoveItemFromCart",
131
+ "targetModule": "@graphcommerce/magento-cart-items/components/RemoveItemFromCart/RemoveItemFromCart",
132
+ "type": "component",
110
133
  },
111
134
  {
112
- "component": "ApolloErrorFullPage",
113
135
  "enabled": true,
114
- "exported": "@graphcommerce/ecommerce-ui",
115
- "ifConfig": "googleRecaptchaKey",
116
- "plugin": "@graphcommerce/googlerecaptcha/plugins/GrecaptchaApolloErrorFullPage",
136
+ "sourceExport": "Plugin",
137
+ "sourceModule": "./@graphcommerce/google-datalayer/plugins/GoogleDatalayerRemoveItemFromCart",
138
+ "targetExport": "RemoveItemFromCart",
139
+ "targetModule": "@graphcommerce/magento-cart-items/components/RemoveItemFromCart/RemoveItemFromCart",
140
+ "type": "component",
117
141
  },
118
142
  {
119
- "component": "ApolloErrorSnackbar",
120
143
  "enabled": true,
121
- "exported": "@graphcommerce/ecommerce-ui",
122
- "ifConfig": "googleRecaptchaKey",
123
- "plugin": "@graphcommerce/googlerecaptcha/plugins/GrecaptchaApolloErrorSnackbar",
144
+ "sourceExport": "Plugin",
145
+ "sourceModule": "./@graphcommerce/google-datalayer/plugins/GoogleDatalayerProductListItemsBase",
146
+ "targetExport": "ProductListItemsBase",
147
+ "targetModule": "@graphcommerce/magento-product",
148
+ "type": "component",
124
149
  },
125
150
  {
126
- "component": "GraphQLProvider",
127
151
  "enabled": true,
128
- "exported": "@graphcommerce/graphql",
129
- "ifConfig": "googleRecaptchaKey",
130
- "plugin": "@graphcommerce/googlerecaptcha/plugins/GrecaptchaGraphQLProvider",
152
+ "sourceExport": "Plugin",
153
+ "sourceModule": "./@graphcommerce/google-datalayer/plugins/GoogleDatalayerProductListItemsBase",
154
+ "targetExport": "ProductListItemsBase",
155
+ "targetModule": "@graphcommerce/magento-product",
156
+ "type": "component",
157
+ },
158
+ {
159
+ "enabled": true,
160
+ "sourceExport": "Plugin",
161
+ "sourceModule": "./@graphcommerce/google-datalayer/plugins/GoogleDatalayerProductListItem",
162
+ "targetExport": "ProductListItem",
163
+ "targetModule": "@graphcommerce/magento-product",
164
+ "type": "component",
165
+ },
166
+ {
167
+ "enabled": true,
168
+ "sourceExport": "Plugin",
169
+ "sourceModule": "./@graphcommerce/google-datalayer/plugins/GoogleDatalayerPaymentMethodContextProvider",
170
+ "targetExport": "PaymentMethodContextProvider",
171
+ "targetModule": "@graphcommerce/magento-cart-payment-method",
172
+ "type": "component",
173
+ },
174
+ {
175
+ "enabled": true,
176
+ "sourceExport": "Plugin",
177
+ "sourceModule": "./@graphcommerce/google-datalayer/plugins/GoogleDatalayerPaymentMethodButton",
178
+ "targetExport": "PaymentMethodButton",
179
+ "targetModule": "@graphcommerce/magento-cart-payment-method",
180
+ "type": "component",
181
+ },
182
+ {
183
+ "enabled": true,
184
+ "sourceExport": "Plugin",
185
+ "sourceModule": "./@graphcommerce/google-datalayer/plugins/GoogleDatalayerCartStartCheckoutLinkOrButton",
186
+ "targetExport": "CartStartCheckoutLinkOrButton",
187
+ "targetModule": "@graphcommerce/magento-cart",
188
+ "type": "component",
189
+ },
190
+ {
191
+ "enabled": true,
192
+ "sourceExport": "Plugin",
193
+ "sourceModule": "./@graphcommerce/google-datalayer/plugins/GoogleDatalayerCartStartCheckoutLinkOrButton",
194
+ "targetExport": "CartStartCheckoutLinkOrButton",
195
+ "targetModule": "@graphcommerce/magento-cart",
196
+ "type": "component",
131
197
  },
132
198
  {
133
199
  "enabled": true,
134
- "exported": "@graphcommerce/graphql/config",
135
- "func": "graphqlConfig",
136
- "plugin": "@graphcommerce/graphcms-ui/plugins/hygraphGraphqlConfig",
200
+ "sourceExport": "Plugin",
201
+ "sourceModule": "./@graphcommerce/google-datalayer/plugins/GoogleDatalayerCartStartCheckout",
202
+ "targetExport": "CartStartCheckout",
203
+ "targetModule": "@graphcommerce/magento-cart",
204
+ "type": "component",
137
205
  },
138
206
  {
139
- "component": "PaymentMethodContextProvider",
140
207
  "enabled": true,
141
- "exported": "@graphcommerce/magento-cart-payment-method",
142
- "plugin": "@graphcommerce/magento-payment-included/plugins/AddIncludedMethods",
208
+ "sourceExport": "Plugin",
209
+ "sourceModule": "./@graphcommerce/google-datalayer/plugins/GoogleDatalayerCartStartCheckout",
210
+ "targetExport": "CartStartCheckout",
211
+ "targetModule": "@graphcommerce/magento-cart",
212
+ "type": "component",
143
213
  },
144
214
  {
145
- "component": "GraphQLProvider",
146
215
  "enabled": true,
147
- "exported": "@graphcommerce/graphql",
148
- "plugin": "@graphcommerce/magento-wishlist/plugins/MagentoWishlistGraphqlProvider",
216
+ "sourceExport": "Plugin",
217
+ "sourceModule": "./@graphcommerce/google-datalayer/plugins/GoogleDatalayerAddProductsToCartForm",
218
+ "targetExport": "AddProductsToCartForm",
219
+ "targetModule": "@graphcommerce/magento-product",
220
+ "type": "component",
149
221
  },
150
222
  {
151
- "component": "GraphQLProvider",
152
223
  "enabled": true,
153
- "exported": "@graphcommerce/graphql",
154
- "plugin": "@graphcommerce/magento-cart/plugins/MagentoCartGraphqlProvider",
224
+ "sourceExport": "plugin",
225
+ "sourceModule": "./@graphcommerce/graphcms-ui/plugins/hygraphGraphqlConfig",
226
+ "targetExport": "graphqlConfig",
227
+ "targetModule": "@graphcommerce/graphql",
228
+ "type": "function",
155
229
  },
156
230
  {
157
- "component": "GraphQLProvider",
158
231
  "enabled": true,
159
- "exported": "@graphcommerce/graphql",
160
- "plugin": "@graphcommerce/magento-customer/plugins/MagentoCustomerGraphqlProvider",
232
+ "sourceExport": "plugin",
233
+ "sourceModule": "./@graphcommerce/hygraph-dynamic-rows/plugins/hygraphDynamicRowsPageContent",
234
+ "targetExport": "hygraphPageContent",
235
+ "targetModule": "@graphcommerce/graphcms-ui",
236
+ "type": "function",
161
237
  },
162
238
  {
163
239
  "enabled": true,
164
- "exported": "@graphcommerce/graphql/config",
165
- "func": "graphqlConfig",
166
- "plugin": "@graphcommerce/magento-store/plugins/magentoStoreGraphqlConfig",
240
+ "sourceExport": "plugin",
241
+ "sourceModule": "./@graphcommerce/magento-cart/plugins/useSignInFormMergeCart",
242
+ "targetExport": "useSignInForm",
243
+ "targetModule": "@graphcommerce/magento-customer",
244
+ "type": "function",
167
245
  },
168
246
  {
169
247
  "enabled": true,
170
- "exported": "@graphcommerce/graphql/config",
171
- "func": "graphqlConfig",
172
- "plugin": "@graphcommerce/magento-graphql/plugins/magentoGraphqlConfig",
248
+ "sourceExport": "Plugin",
249
+ "sourceModule": "./@graphcommerce/magento-cart/plugins/MagentoCartGraphqlProvider",
250
+ "targetExport": "GraphQLProvider",
251
+ "targetModule": "@graphcommerce/graphql",
252
+ "type": "component",
253
+ },
254
+ {
255
+ "enabled": true,
256
+ "sourceExport": "Plugin",
257
+ "sourceModule": "./@graphcommerce/magento-customer/plugins/MagentoCustomerGraphqlProvider",
258
+ "targetExport": "GraphQLProvider",
259
+ "targetModule": "@graphcommerce/graphql",
260
+ "type": "component",
261
+ },
262
+ {
263
+ "enabled": true,
264
+ "sourceExport": "plugin",
265
+ "sourceModule": "./@graphcommerce/magento-graphql/plugins/magentoGraphqlConfig",
266
+ "targetExport": "graphqlConfig",
267
+ "targetModule": "@graphcommerce/graphql/config",
268
+ "type": "function",
269
+ },
270
+ {
271
+ "enabled": true,
272
+ "sourceExport": "Plugin",
273
+ "sourceModule": "./@graphcommerce/magento-payment-included/plugins/AddIncludedMethods",
274
+ "targetExport": "PaymentMethodContextProvider",
275
+ "targetModule": "@graphcommerce/magento-cart-payment-method",
276
+ "type": "component",
277
+ },
278
+ {
279
+ "enabled": true,
280
+ "sourceExport": "Plugin",
281
+ "sourceModule": "./@graphcommerce/magento-product-bundle/plugins/BundleCartItemActionCard",
282
+ "targetExport": "CartItemActionCard",
283
+ "targetModule": "@graphcommerce/magento-cart-items",
284
+ "type": "component",
285
+ },
286
+ {
287
+ "enabled": true,
288
+ "sourceExport": "Plugin",
289
+ "sourceModule": "./@graphcommerce/magento-product-bundle/plugins/BundleCartItemActionCard",
290
+ "targetExport": "CartItemActionCard",
291
+ "targetModule": "@graphcommerce/magento-cart-items",
292
+ "type": "component",
293
+ },
294
+ {
295
+ "enabled": true,
296
+ "sourceExport": "Plugin",
297
+ "sourceModule": "./@graphcommerce/magento-product-configurable/plugins/ConfigurableCartItemActionCard",
298
+ "targetExport": "CartItemActionCard",
299
+ "targetModule": "@graphcommerce/magento-cart-items",
300
+ "type": "component",
301
+ },
302
+ {
303
+ "enabled": true,
304
+ "sourceExport": "Plugin",
305
+ "sourceModule": "./@graphcommerce/magento-product-configurable/plugins/ConfigurableCartItemActionCard",
306
+ "targetExport": "CartItemActionCard",
307
+ "targetModule": "@graphcommerce/magento-cart-items",
308
+ "type": "component",
309
+ },
310
+ {
311
+ "enabled": true,
312
+ "sourceExport": "Plugin",
313
+ "sourceModule": "./@graphcommerce/magento-product-configurable/plugins/ConfigurableProductPage/ConfigurableProductPagePriceTiers",
314
+ "targetExport": "ProductPagePriceTiers",
315
+ "targetModule": "@graphcommerce/magento-product",
316
+ "type": "component",
317
+ },
318
+ {
319
+ "enabled": true,
320
+ "sourceExport": "Plugin",
321
+ "sourceModule": "./@graphcommerce/magento-product-configurable/plugins/ConfigurableProductPage/ConfigurableProductPagePrice",
322
+ "targetExport": "ProductPagePrice",
323
+ "targetModule": "@graphcommerce/magento-product",
324
+ "type": "component",
325
+ },
326
+ {
327
+ "enabled": true,
328
+ "sourceExport": "Plugin",
329
+ "sourceModule": "./@graphcommerce/magento-product-configurable/plugins/ConfigurableProductPage/ConfigurableProductPageGallery",
330
+ "targetExport": "ProductPageGallery",
331
+ "targetModule": "@graphcommerce/magento-product",
332
+ "type": "component",
333
+ },
334
+ {
335
+ "enabled": true,
336
+ "sourceExport": "Plugin",
337
+ "sourceModule": "./@graphcommerce/magento-product-simple/plugins/SimpleCartItemActionCard",
338
+ "targetExport": "CartItemActionCard",
339
+ "targetModule": "@graphcommerce/magento-cart-items",
340
+ "type": "component",
341
+ },
342
+ {
343
+ "enabled": true,
344
+ "sourceExport": "Plugin",
345
+ "sourceModule": "./@graphcommerce/magento-product-simple/plugins/SimpleCartItemActionCard",
346
+ "targetExport": "CartItemActionCard",
347
+ "targetModule": "@graphcommerce/magento-cart-items",
348
+ "type": "component",
349
+ },
350
+ {
351
+ "enabled": true,
352
+ "sourceExport": "Plugin",
353
+ "sourceModule": "./@graphcommerce/magento-product-virtual/plugins/VirtualCartItemActionCard",
354
+ "targetExport": "CartItemActionCard",
355
+ "targetModule": "@graphcommerce/magento-cart-items",
356
+ "type": "component",
357
+ },
358
+ {
359
+ "enabled": true,
360
+ "sourceExport": "Plugin",
361
+ "sourceModule": "./@graphcommerce/magento-product-virtual/plugins/VirtualCartItemActionCard",
362
+ "targetExport": "CartItemActionCard",
363
+ "targetModule": "@graphcommerce/magento-cart-items",
364
+ "type": "component",
365
+ },
366
+ {
367
+ "enabled": true,
368
+ "sourceExport": "graphqlConfig",
369
+ "sourceModule": "./@graphcommerce/magento-store/plugins/magentoStoreGraphqlConfig",
370
+ "targetExport": "graphqlConfig",
371
+ "targetModule": "@graphcommerce/graphql",
372
+ "type": "function",
373
+ },
374
+ {
375
+ "enabled": true,
376
+ "sourceExport": "Plugin",
377
+ "sourceModule": "./@graphcommerce/magento-wishlist/plugins/WishlistProductAddToCartFormPlugin",
378
+ "targetExport": "AddProductsToCartForm",
379
+ "targetModule": "@graphcommerce/magento-product",
380
+ "type": "component",
381
+ },
382
+ {
383
+ "enabled": true,
384
+ "sourceExport": "Plugin",
385
+ "sourceModule": "./@graphcommerce/magento-wishlist/plugins/ConfigurableWishlistItemActionCard",
386
+ "targetExport": "WishlistItemActionCard",
387
+ "targetModule": "@graphcommerce/magento-wishlist",
388
+ "type": "component",
389
+ },
390
+ {
391
+ "enabled": true,
392
+ "sourceExport": "Plugin",
393
+ "sourceModule": "./@graphcommerce/magento-wishlist/plugins/BundleWishlistItemActionCard",
394
+ "targetExport": "WishlistItemActionCard",
395
+ "targetModule": "@graphcommerce/magento-wishlist",
396
+ "type": "component",
397
+ },
398
+ {
399
+ "enabled": true,
400
+ "sourceExport": "Plugin",
401
+ "sourceModule": "./@graphcommerce/magento-wishlist/plugins/BundleWishlistItemActionCard",
402
+ "targetExport": "WishlistItemActionCard",
403
+ "targetModule": "@graphcommerce/magento-wishlist",
404
+ "type": "component",
173
405
  },
174
406
  ]
175
407
  `)
176
408
  expect(disabled).toMatchInlineSnapshot(`
177
409
  [
178
410
  {
179
- "component": "AddProductsToCartForm",
180
411
  "enabled": false,
181
- "exported": "@graphcommerce/magento-product",
182
412
  "ifConfig": "demoMode",
183
- "plugin": "./plugins/EnableCrosssellsPlugin",
413
+ "sourceExport": "AddProductsToCartForm",
414
+ "sourceModule": "././plugins/EnableCrosssellsPlugin",
415
+ "targetExport": "AddProductsToCartForm",
416
+ "targetModule": "@graphcommerce/magento-product",
417
+ "type": "component",
418
+ },
419
+ {
420
+ "enabled": false,
421
+ "ifConfig": "demoMode",
422
+ "sourceExport": "Plugin",
423
+ "sourceModule": "./@graphcommerce/demo-magento-graphcommerce/plugins/demo/DemoRowLinks",
424
+ "targetExport": "RowLinks",
425
+ "targetModule": "@graphcommerce/next-ui",
426
+ "type": "component",
427
+ },
428
+ {
429
+ "enabled": false,
430
+ "ifConfig": "demoMode",
431
+ "sourceExport": "Plugin",
432
+ "sourceModule": "./@graphcommerce/demo-magento-graphcommerce/plugins/demo/DemoRecentlyViewedProducts",
433
+ "targetExport": "RecentlyViewedProducts",
434
+ "targetModule": "@graphcommerce/magento-recently-viewed-products",
435
+ "type": "component",
184
436
  },
185
437
  {
186
- "component": "ProductListItem",
187
438
  "enabled": false,
188
- "exported": "@graphcommerce/magento-product",
189
439
  "ifConfig": "demoMode",
190
- "plugin": "@graphcommerce/demo-magento-graphcommerce/plugins/demo/DemoProductListItem",
440
+ "sourceExport": "Plugin",
441
+ "sourceModule": "./@graphcommerce/demo-magento-graphcommerce/plugins/demo/DemoProductListItemsBase",
442
+ "targetExport": "ProductListItemsBase",
443
+ "targetModule": "@graphcommerce/magento-product",
444
+ "type": "component",
191
445
  },
192
446
  {
193
- "component": "ProductListItemConfigurable",
194
447
  "enabled": false,
195
- "exported": "@graphcommerce/magento-product-configurable",
196
448
  "ifConfig": "demoMode",
197
- "plugin": "@graphcommerce/demo-magento-graphcommerce/plugins/demo/DemoProductListItemConfigurable",
449
+ "sourceExport": "Plugin",
450
+ "sourceModule": "./@graphcommerce/demo-magento-graphcommerce/plugins/demo/DemoProductListItemsBase",
451
+ "targetExport": "ProductListItemsBase",
452
+ "targetModule": "@graphcommerce/magento-product",
453
+ "type": "component",
198
454
  },
199
455
  {
200
- "component": "ProductListItemsBase",
201
456
  "enabled": false,
202
- "exported": "@graphcommerce/magento-product",
203
457
  "ifConfig": "demoMode",
204
- "plugin": "@graphcommerce/demo-magento-graphcommerce/plugins/demo/DemoProductListItemsBase",
458
+ "sourceExport": "Plugin",
459
+ "sourceModule": "./@graphcommerce/demo-magento-graphcommerce/plugins/demo/DemoProductListItemConfigurable",
460
+ "targetExport": "ProductListItemConfigurable",
461
+ "targetModule": "@graphcommerce/magento-product-configurable",
462
+ "type": "component",
205
463
  },
206
464
  {
207
- "component": "RowLinks",
208
465
  "enabled": false,
209
- "exported": "@graphcommerce/next-ui/Row/RowLinks/RowLinks",
210
466
  "ifConfig": "demoMode",
211
- "plugin": "@graphcommerce/demo-magento-graphcommerce/plugins/demo/DemoRowLinks",
467
+ "sourceExport": "Plugin",
468
+ "sourceModule": "./@graphcommerce/demo-magento-graphcommerce/plugins/demo/DemoProductListItem",
469
+ "targetExport": "ProductListItem",
470
+ "targetModule": "@graphcommerce/magento-product",
471
+ "type": "component",
472
+ },
473
+ {
474
+ "enabled": false,
475
+ "ifConfig": "googleTagmanagerId",
476
+ "sourceExport": "plugin",
477
+ "sourceModule": "./@graphcommerce/googletagmanager/plugins/tagmanagerEvent",
478
+ "targetExport": "sendEvent",
479
+ "targetModule": "@graphcommerce/google-datalayer/api/sendEvent",
480
+ "type": "function",
212
481
  },
213
482
  {
214
- "component": "FramerNextPages",
215
483
  "enabled": false,
216
- "exported": "@graphcommerce/framer-next-pages",
217
484
  "ifConfig": "googleTagmanagerId",
218
- "plugin": "@graphcommerce/googletagmanager/plugins/GtagFramerNextPages",
485
+ "sourceExport": "Plugin",
486
+ "sourceModule": "./@graphcommerce/googletagmanager/plugins/GtagFramerNextPages",
487
+ "targetExport": "FramerNextPages",
488
+ "targetModule": "@graphcommerce/framer-next-pages",
489
+ "type": "component",
490
+ },
491
+ {
492
+ "enabled": false,
493
+ "ifConfig": "dataLayer.coreWebVitals",
494
+ "sourceExport": "Plugin",
495
+ "sourceModule": "./@graphcommerce/google-datalayer/plugins/GoogleDatalayerWebVitals",
496
+ "targetExport": "FramerNextPages",
497
+ "targetModule": "@graphcommerce/framer-next-pages",
498
+ "type": "component",
219
499
  },
220
500
  {
221
- "component": "CartFab",
222
501
  "enabled": false,
223
- "exported": "@graphcommerce/magento-cart",
224
502
  "ifConfig": "compare",
225
- "plugin": "@graphcommerce/magento-compare/plugins/AddCompareFabNextToCart",
503
+ "sourceExport": "Plugin",
504
+ "sourceModule": "./@graphcommerce/magento-compare/plugins/CompareAbleProductListItem",
505
+ "targetExport": "ProductListItem",
506
+ "targetModule": "@graphcommerce/magento-product",
507
+ "type": "component",
226
508
  },
227
509
  {
228
- "component": "ProductPageAddToCartActionsRow",
229
510
  "enabled": false,
230
- "exported": "@graphcommerce/magento-product",
231
511
  "ifConfig": "compare",
232
- "plugin": "@graphcommerce/magento-compare/plugins/AddCompareToProductPage",
512
+ "sourceExport": "Plugin",
513
+ "sourceModule": "./@graphcommerce/magento-compare/plugins/AddCompareTypePolicies",
514
+ "targetExport": "GraphQLProvider",
515
+ "targetModule": "@graphcommerce/graphql",
516
+ "type": "component",
233
517
  },
234
518
  {
235
- "component": "GraphQLProvider",
236
519
  "enabled": false,
237
- "exported": "@graphcommerce/graphql",
238
520
  "ifConfig": "compare",
239
- "plugin": "@graphcommerce/magento-compare/plugins/AddCompareTypePolicies",
521
+ "sourceExport": "Plugin",
522
+ "sourceModule": "./@graphcommerce/magento-compare/plugins/AddCompareToProductPage",
523
+ "targetExport": "ProductPageAddToCartActionsRow",
524
+ "targetModule": "@graphcommerce/magento-product",
525
+ "type": "component",
240
526
  },
241
527
  {
242
- "component": "ProductListItem",
243
528
  "enabled": false,
244
- "exported": "@graphcommerce/magento-product",
245
529
  "ifConfig": "compare",
246
- "plugin": "@graphcommerce/magento-compare/plugins/CompareAbleProductListItem",
530
+ "sourceExport": "Plugin",
531
+ "sourceModule": "./@graphcommerce/magento-compare/plugins/AddCompareFabNextToCart",
532
+ "targetExport": "CartFab",
533
+ "targetModule": "@graphcommerce/magento-cart",
534
+ "type": "component",
535
+ },
536
+ {
537
+ "enabled": false,
538
+ "ifConfig": "debug.sessions",
539
+ "sourceExport": "Plugin",
540
+ "sourceModule": "./@graphcommerce/magento-customer/plugins/SessionDebuggerPlugin",
541
+ "targetExport": "FramerNextPages",
542
+ "targetModule": "@graphcommerce/framer-next-pages",
543
+ "type": "component",
544
+ },
545
+ {
546
+ "enabled": false,
547
+ "ifConfig": "configurableVariantValues.content",
548
+ "sourceExport": "Plugin",
549
+ "sourceModule": "./@graphcommerce/magento-product-configurable/plugins/ConfigurableProductPage/ConfigurableProductShortDescription",
550
+ "targetExport": "ProductShortDescription",
551
+ "targetModule": "@graphcommerce/magento-product",
552
+ "type": "component",
553
+ },
554
+ {
555
+ "enabled": false,
556
+ "ifConfig": "configurableVariantValues.content",
557
+ "sourceExport": "Plugin",
558
+ "sourceModule": "./@graphcommerce/magento-product-configurable/plugins/ConfigurableProductPage/ConfigurableProductPageName",
559
+ "targetExport": "ProductPageName",
560
+ "targetModule": "@graphcommerce/magento-product",
561
+ "type": "component",
562
+ },
563
+ {
564
+ "enabled": false,
565
+ "ifConfig": "configurableVariantValues.url",
566
+ "sourceExport": "Plugin",
567
+ "sourceModule": "./@graphcommerce/magento-product-configurable/plugins/ConfigurableProductPage/ConfigurableProductPageMeta",
568
+ "targetExport": "ProductPageMeta",
569
+ "targetModule": "@graphcommerce/magento-product",
570
+ "type": "component",
571
+ },
572
+ {
573
+ "enabled": false,
574
+ "ifConfig": "configurableVariantValues.content",
575
+ "sourceExport": "Plugin",
576
+ "sourceModule": "./@graphcommerce/magento-product-configurable/plugins/ConfigurableProductPage/ConfigurableProductPageJsonLd",
577
+ "targetExport": "ProductPageJsonLd",
578
+ "targetModule": "@graphcommerce/magento-product",
579
+ "type": "component",
580
+ },
581
+ {
582
+ "enabled": false,
583
+ "ifConfig": "configurableVariantValues.content",
584
+ "sourceExport": "Plugin",
585
+ "sourceModule": "./@graphcommerce/magento-product-configurable/plugins/ConfigurableProductPage/ConfigurableProductPageDescription",
586
+ "targetExport": "ProductPageDescription",
587
+ "targetModule": "@graphcommerce/magento-product",
588
+ "type": "component",
589
+ },
590
+ {
591
+ "enabled": false,
592
+ "ifConfig": "configurableVariantValues.content",
593
+ "sourceExport": "Plugin",
594
+ "sourceModule": "./@graphcommerce/magento-product-configurable/plugins/ConfigurableProductPage/ConfigurableProductPageDescription",
595
+ "targetExport": "ProductPageDescription",
596
+ "targetModule": "@graphcommerce/magento-product",
597
+ "type": "component",
598
+ },
599
+ {
600
+ "enabled": false,
601
+ "ifConfig": "recentlyViewedProducts.enabled",
602
+ "sourceExport": "Plugin",
603
+ "sourceModule": "./@graphcommerce/magento-recently-viewed-products/plugins/RegisterProductAsRecentlyViewed",
604
+ "targetExport": "ProductPageMeta",
605
+ "targetModule": "@graphcommerce/magento-product",
606
+ "type": "component",
247
607
  },
248
608
  ]
249
609
  `)