@faststore/core 2.2.33 → 2.2.34

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 (158) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/.turbo/turbo-test.log +6 -6
  3. package/package.json +2 -2
  4. package/src/components/ThirdPartyScripts/GoogleTagManager.tsx +1 -1
  5. package/src/components/ThirdPartyScripts/ThirdPartyScripts.tsx +15 -9
  6. package/.next/BUILD_ID +0 -1
  7. package/.next/build-manifest.json +0 -126
  8. package/.next/cache/.tsbuildinfo +0 -1
  9. package/.next/cache/config.json +0 -7
  10. package/.next/cache/eslint/.cache_1gneedd +0 -1
  11. package/.next/cache/next-server.js.nft.json +0 -1
  12. package/.next/cache/webpack/client-production/0.pack +0 -0
  13. package/.next/cache/webpack/client-production/index.pack +0 -0
  14. package/.next/cache/webpack/server-production/0.pack +0 -0
  15. package/.next/cache/webpack/server-production/index.pack +0 -0
  16. package/.next/export-marker.json +0 -1
  17. package/.next/images-manifest.json +0 -1
  18. package/.next/next-server.js.nft.json +0 -1
  19. package/.next/package.json +0 -1
  20. package/.next/prerender-manifest.json +0 -1
  21. package/.next/react-loadable-manifest.json +0 -47
  22. package/.next/required-server-files.json +0 -1
  23. package/.next/routes-manifest.json +0 -1
  24. package/.next/server/chunks/117.js +0 -430
  25. package/.next/server/chunks/177.js +0 -125
  26. package/.next/server/chunks/183.js +0 -121
  27. package/.next/server/chunks/184.js +0 -61
  28. package/.next/server/chunks/289.js +0 -240
  29. package/.next/server/chunks/312.js +0 -678
  30. package/.next/server/chunks/350.js +0 -200
  31. package/.next/server/chunks/386.js +0 -200
  32. package/.next/server/chunks/390.js +0 -550
  33. package/.next/server/chunks/398.js +0 -610
  34. package/.next/server/chunks/52.js +0 -4007
  35. package/.next/server/chunks/53.js +0 -61
  36. package/.next/server/chunks/574.js +0 -145
  37. package/.next/server/chunks/576.js +0 -121
  38. package/.next/server/chunks/585.js +0 -640
  39. package/.next/server/chunks/676.js +0 -32
  40. package/.next/server/chunks/693.js +0 -58
  41. package/.next/server/chunks/732.js +0 -1880
  42. package/.next/server/chunks/74.js +0 -4066
  43. package/.next/server/chunks/779.js +0 -58
  44. package/.next/server/chunks/817.js +0 -4007
  45. package/.next/server/chunks/825.js +0 -4074
  46. package/.next/server/chunks/854.js +0 -72
  47. package/.next/server/chunks/859.js +0 -959
  48. package/.next/server/chunks/863.js +0 -111
  49. package/.next/server/chunks/979.js +0 -1303
  50. package/.next/server/chunks/98.js +0 -163
  51. package/.next/server/chunks/988.js +0 -211
  52. package/.next/server/chunks/font-manifest.json +0 -1
  53. package/.next/server/font-manifest.json +0 -1
  54. package/.next/server/middleware-build-manifest.js +0 -1
  55. package/.next/server/middleware-manifest.json +0 -6
  56. package/.next/server/middleware-react-loadable-manifest.js +0 -1
  57. package/.next/server/pages/404.js +0 -391
  58. package/.next/server/pages/404.js.nft.json +0 -1
  59. package/.next/server/pages/500.js +0 -395
  60. package/.next/server/pages/500.js.nft.json +0 -1
  61. package/.next/server/pages/[...slug].js +0 -1084
  62. package/.next/server/pages/[...slug].js.nft.json +0 -1
  63. package/.next/server/pages/[slug]/p.js +0 -2271
  64. package/.next/server/pages/[slug]/p.js.nft.json +0 -1
  65. package/.next/server/pages/_app.js +0 -287
  66. package/.next/server/pages/_app.js.nft.json +0 -1
  67. package/.next/server/pages/_document.js +0 -365
  68. package/.next/server/pages/_document.js.nft.json +0 -1
  69. package/.next/server/pages/_error.js +0 -164
  70. package/.next/server/pages/_error.js.nft.json +0 -1
  71. package/.next/server/pages/account.js +0 -370
  72. package/.next/server/pages/account.js.nft.json +0 -1
  73. package/.next/server/pages/api/graphql.js +0 -464
  74. package/.next/server/pages/api/graphql.js.nft.json +0 -1
  75. package/.next/server/pages/api/health/live.js +0 -31
  76. package/.next/server/pages/api/health/live.js.nft.json +0 -1
  77. package/.next/server/pages/api/health/ready.js +0 -31
  78. package/.next/server/pages/api/health/ready.js.nft.json +0 -1
  79. package/.next/server/pages/api/preview.js +0 -137
  80. package/.next/server/pages/api/preview.js.nft.json +0 -1
  81. package/.next/server/pages/checkout.js +0 -370
  82. package/.next/server/pages/checkout.js.nft.json +0 -1
  83. package/.next/server/pages/en-US/404.html +0 -81
  84. package/.next/server/pages/en-US/404.json +0 -1
  85. package/.next/server/pages/en-US/500.html +0 -81
  86. package/.next/server/pages/en-US/500.json +0 -1
  87. package/.next/server/pages/en-US/account.html +0 -81
  88. package/.next/server/pages/en-US/account.json +0 -1
  89. package/.next/server/pages/en-US/checkout.html +0 -81
  90. package/.next/server/pages/en-US/checkout.json +0 -1
  91. package/.next/server/pages/en-US/login.html +0 -81
  92. package/.next/server/pages/en-US/login.json +0 -1
  93. package/.next/server/pages/en-US/s.html +0 -81
  94. package/.next/server/pages/en-US/s.json +0 -1
  95. package/.next/server/pages/en-US.html +0 -90
  96. package/.next/server/pages/en-US.json +0 -1
  97. package/.next/server/pages/index.js +0 -439
  98. package/.next/server/pages/index.js.nft.json +0 -1
  99. package/.next/server/pages/login.js +0 -382
  100. package/.next/server/pages/login.js.nft.json +0 -1
  101. package/.next/server/pages/s.js +0 -554
  102. package/.next/server/pages/s.js.nft.json +0 -1
  103. package/.next/server/pages-manifest.json +0 -18
  104. package/.next/server/webpack-api-runtime.js +0 -229
  105. package/.next/server/webpack-runtime.js +0 -229
  106. package/.next/static/JRq4v3MrJM0drwdq94NMb/_buildManifest.js +0 -1
  107. package/.next/static/JRq4v3MrJM0drwdq94NMb/_ssgManifest.js +0 -1
  108. package/.next/static/chunks/251.1c79f06f2a2814b1.js +0 -1
  109. package/.next/static/chunks/386.d01e0db26c523f0f.js +0 -1
  110. package/.next/static/chunks/400-a09ccc622ec96daa.js +0 -1
  111. package/.next/static/chunks/469-7259b855711d4ad3.js +0 -1
  112. package/.next/static/chunks/574.70612be06fd1365f.js +0 -1
  113. package/.next/static/chunks/585.4c5d40fc6a72a611.js +0 -1
  114. package/.next/static/chunks/651.7142f31ce1e052b3.js +0 -1
  115. package/.next/static/chunks/741.52f7fb873418346f.js +0 -1
  116. package/.next/static/chunks/742-e32d18d91fe6f08b.js +0 -1
  117. package/.next/static/chunks/783-a67df4e98c1ac27b.js +0 -1
  118. package/.next/static/chunks/800.ee4f8b9622001e8c.js +0 -1
  119. package/.next/static/chunks/98.40c7e17d9de4eb8f.js +0 -1
  120. package/.next/static/chunks/988.afda042dd9ba11d1.js +0 -1
  121. package/.next/static/chunks/framework-dfd14d7ce6600b03.js +0 -1
  122. package/.next/static/chunks/main-e4e873ee741162eb.js +0 -1
  123. package/.next/static/chunks/pages/404-6763ce07878a1456.js +0 -1
  124. package/.next/static/chunks/pages/500-0f4374f30595d27c.js +0 -1
  125. package/.next/static/chunks/pages/[...slug]-111f89162eff5029.js +0 -1
  126. package/.next/static/chunks/pages/[slug]/p-46e7cb105136dc7a.js +0 -1
  127. package/.next/static/chunks/pages/_app-fea7ed14d8f4d0c6.js +0 -1
  128. package/.next/static/chunks/pages/_error-a7a0c1d9bfbb4f38.js +0 -1
  129. package/.next/static/chunks/pages/account-9eb6fab139286c66.js +0 -1
  130. package/.next/static/chunks/pages/checkout-7cd7b110c7cf2f10.js +0 -1
  131. package/.next/static/chunks/pages/index-3d5c756be5ce8fc7.js +0 -1
  132. package/.next/static/chunks/pages/login-5fd09e6402f47896.js +0 -1
  133. package/.next/static/chunks/pages/s-8e32a9b170819fa9.js +0 -1
  134. package/.next/static/chunks/polyfills-c67a75d1b6f99dc8.js +0 -1
  135. package/.next/static/chunks/webpack-4ccaf6613cbd7224.js +0 -1
  136. package/.next/static/css/29868543c76bc6fd.css +0 -1
  137. package/.next/static/css/527e334fa69cf40a.css +0 -1
  138. package/.next/static/css/5d1f64b61ea581f4.css +0 -1
  139. package/.next/static/css/6a7fdc5a21fbead5.css +0 -1
  140. package/.next/static/css/723835bce380750d.css +0 -1
  141. package/.next/static/css/a2eefb25a4608343.css +0 -1
  142. package/.next/static/css/cb7d1fcea42fab9c.css +0 -1
  143. package/.next/static/css/d7bbfbd552f407e9.css +0 -1
  144. package/.next/static/css/df588bb98c0b0ca6.css +0 -1
  145. package/.next/static/css/dfbdb0f27fd64782.css +0 -1
  146. package/.next/static/css/e84fc497732ea596.css +0 -1
  147. package/.next/trace +0 -78
  148. package/public/~partytown/debug/partytown-atomics.js +0 -556
  149. package/public/~partytown/debug/partytown-media.js +0 -374
  150. package/public/~partytown/debug/partytown-sandbox-sw.js +0 -543
  151. package/public/~partytown/debug/partytown-sw.js +0 -59
  152. package/public/~partytown/debug/partytown-ww-atomics.js +0 -1789
  153. package/public/~partytown/debug/partytown-ww-sw.js +0 -1781
  154. package/public/~partytown/debug/partytown.js +0 -72
  155. package/public/~partytown/partytown-atomics.js +0 -2
  156. package/public/~partytown/partytown-media.js +0 -2
  157. package/public/~partytown/partytown-sw.js +0 -2
  158. package/public/~partytown/partytown.js +0 -2
@@ -1,6 +1,6 @@
1
1
  $ yarn partytown & yarn generate && next build
2
- $ partytown copylib ./public/~partytown
3
2
  $ faststore generate-graphql -c
3
+ $ partytown copylib ./public/~partytown
4
4
  Partytown lib copied to: /home/runner/work/faststore/faststore/packages/core/public/~partytown
5
5
  success - GraphQL schema, types, and optimizations successfully generated 🎉
6
6
  warn - You have enabled experimental feature (scrollRestoration) in next.config.js.
@@ -1,11 +1,11 @@
1
1
  $ tsdx test
2
2
  ts-jest[versions] (WARN) Version 29.1.0 of jest installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=25.0.0 <26.0.0). Please do not report issues in ts-jest if you are using unsupported versions.
3
3
  ts-jest[versions] (WARN) Version 4.9.4 of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=3.4.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions.
4
- PASS test/server/index.test.ts (13.202s)
4
+ PASS test/server/index.test.ts (6.476s)
5
5
  FastStore GraphQL Layer
6
6
  @faststore/api
7
7
  ✓ should return a valid GraphQL schema (5ms)
8
- ✓ should return a valid GraphQL schema contain all expected types (8ms)
8
+ ✓ should return a valid GraphQL schema contain all expected types (11ms)
9
9
  ✓ should return a valid GraphQL schema contain all expected queries (1ms)
10
10
  ✓ should return a valid GraphQL schema contain all expected mutations (1ms)
11
11
  VTEX API Extension
@@ -13,13 +13,13 @@ PASS test/server/index.test.ts (13.202s)
13
13
  Third Party API Extension
14
14
  ✓ getTypeDefsFromFolder function should return an Array (5ms)
15
15
  Final Schema after merging
16
- ✓ should return a valid merged GraphQL schema (26ms)
16
+ ✓ should return a valid merged GraphQL schema (27ms)
17
17
  Envelop
18
- ✓ should exist with its plugins (24ms)
19
- ✓ should handle options and execute (506ms)
18
+ ✓ should exist with its plugins (25ms)
19
+ ✓ should handle options and execute (565ms)
20
20
 
21
21
  Test Suites: 1 passed, 1 total
22
22
  Tests: 9 passed, 9 total
23
23
  Snapshots: 0 total
24
- Time: 13.901s
24
+ Time: 6.914s
25
25
  Ran all test suites.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/core",
3
- "version": "2.2.33",
3
+ "version": "2.2.34",
4
4
  "license": "MIT",
5
5
  "browserslist": "supports es6-module and not dead",
6
6
  "exports": {
@@ -118,5 +118,5 @@
118
118
  "msw": {
119
119
  "workerDirectory": "public"
120
120
  },
121
- "gitHead": "3ef3bacdc55e2a9719398e5920a564b231a86bc5"
121
+ "gitHead": "14de9d6ca625bace0d31fb577843aa4dcb784064"
122
122
  }
@@ -3,7 +3,7 @@ interface Props {
3
3
  dataLayerName?: string
4
4
  }
5
5
 
6
- const GTM_DEBUG_QUERY_STRING = 'gtm_debug'
6
+ export const GTM_DEBUG_QUERY_STRING = 'gtm_debug'
7
7
 
8
8
  const useSnippet = (opts: Props & { partytownScript: boolean }) => `${
9
9
  opts.partytownScript ? '!' : ''
@@ -1,11 +1,9 @@
1
1
  import { Partytown } from '@builder.io/partytown/react'
2
2
  import OverrideComponents from 'src/customizations/src/GlobalOverrides'
3
3
  import storeConfig from '../../../faststore.config'
4
- import GoogleTagManager from './GoogleTagManager'
4
+ import GoogleTagManager, { GTM_DEBUG_QUERY_STRING } from './GoogleTagManager'
5
5
  import VTEX from './vtex'
6
6
 
7
- const isString = (obj: unknown): obj is string => typeof obj === 'string'
8
-
9
7
  const gtmContainerId = storeConfig.analytics?.gtmContainerId
10
8
 
11
9
  const includeGTM = typeof gtmContainerId === 'string'
@@ -20,18 +18,26 @@ if (process.env.NODE_ENV === 'development' && !includeGTM) {
20
18
  function ThirdPartyScripts() {
21
19
  const forwards = []
22
20
  if (includeVTEX) forwards.push('sendrc', 'vtexaf')
23
- if (includeGTM) forwards.push('dataLayer.push')
24
21
 
25
22
  return (
26
23
  <>
24
+ {/* We're setting the partytown config (forward property) dynamically based on the gtm_debug query string
25
+ * This helps users see the GTM events properly when using GTM preview. All it does is NOT forward dataLayer.push
26
+ * calls to partytown when the gtm_debug query string is present.
27
+ *
28
+ * This is not done in the component because the window var is not available yet.
29
+ */}
30
+ <script
31
+ dangerouslySetInnerHTML={{
32
+ __html: `var partytown={forward:[...${JSON.stringify(
33
+ forwards
34
+ )},!window.location.search.includes('${GTM_DEBUG_QUERY_STRING}=')&&${includeGTM}?'dataLayer.push':null].filter(Boolean)}`,
35
+ }}
36
+ />
27
37
  {includeGTM && <GoogleTagManager containerId={gtmContainerId} />}
28
38
  {includeVTEX && <VTEX />}
29
39
  <OverrideComponents.ThirdPartyScripts />
30
- <Partytown
31
- key="partytown"
32
- // Variables to forward to from main to worker
33
- forward={forwards}
34
- />
40
+ <Partytown key="partytown" />
35
41
  </>
36
42
  )
37
43
  }
package/.next/BUILD_ID DELETED
@@ -1 +0,0 @@
1
- JRq4v3MrJM0drwdq94NMb
@@ -1,126 +0,0 @@
1
- {
2
- "polyfillFiles": [
3
- "static/chunks/polyfills-c67a75d1b6f99dc8.js"
4
- ],
5
- "devFiles": [],
6
- "ampDevFiles": [],
7
- "lowPriorityFiles": [
8
- "static/JRq4v3MrJM0drwdq94NMb/_buildManifest.js",
9
- "static/JRq4v3MrJM0drwdq94NMb/_ssgManifest.js"
10
- ],
11
- "rootMainFiles": [],
12
- "pages": {
13
- "/": [
14
- "static/chunks/webpack-4ccaf6613cbd7224.js",
15
- "static/chunks/framework-dfd14d7ce6600b03.js",
16
- "static/chunks/main-e4e873ee741162eb.js",
17
- "static/chunks/742-e32d18d91fe6f08b.js",
18
- "static/css/29868543c76bc6fd.css",
19
- "static/chunks/469-7259b855711d4ad3.js",
20
- "static/css/dfbdb0f27fd64782.css",
21
- "static/chunks/783-a67df4e98c1ac27b.js",
22
- "static/css/a2eefb25a4608343.css",
23
- "static/chunks/pages/index-3d5c756be5ce8fc7.js"
24
- ],
25
- "/404": [
26
- "static/chunks/webpack-4ccaf6613cbd7224.js",
27
- "static/chunks/framework-dfd14d7ce6600b03.js",
28
- "static/chunks/main-e4e873ee741162eb.js",
29
- "static/chunks/742-e32d18d91fe6f08b.js",
30
- "static/css/29868543c76bc6fd.css",
31
- "static/chunks/469-7259b855711d4ad3.js",
32
- "static/css/df588bb98c0b0ca6.css",
33
- "static/chunks/pages/404-6763ce07878a1456.js"
34
- ],
35
- "/500": [
36
- "static/chunks/webpack-4ccaf6613cbd7224.js",
37
- "static/chunks/framework-dfd14d7ce6600b03.js",
38
- "static/chunks/main-e4e873ee741162eb.js",
39
- "static/chunks/742-e32d18d91fe6f08b.js",
40
- "static/css/29868543c76bc6fd.css",
41
- "static/chunks/469-7259b855711d4ad3.js",
42
- "static/css/df588bb98c0b0ca6.css",
43
- "static/chunks/pages/500-0f4374f30595d27c.js"
44
- ],
45
- "/[...slug]": [
46
- "static/chunks/webpack-4ccaf6613cbd7224.js",
47
- "static/chunks/framework-dfd14d7ce6600b03.js",
48
- "static/chunks/main-e4e873ee741162eb.js",
49
- "static/chunks/742-e32d18d91fe6f08b.js",
50
- "static/css/29868543c76bc6fd.css",
51
- "static/chunks/469-7259b855711d4ad3.js",
52
- "static/css/dfbdb0f27fd64782.css",
53
- "static/chunks/783-a67df4e98c1ac27b.js",
54
- "static/css/723835bce380750d.css",
55
- "static/chunks/400-a09ccc622ec96daa.js",
56
- "static/css/a2eefb25a4608343.css",
57
- "static/css/527e334fa69cf40a.css",
58
- "static/chunks/pages/[...slug]-111f89162eff5029.js"
59
- ],
60
- "/[slug]/p": [
61
- "static/chunks/webpack-4ccaf6613cbd7224.js",
62
- "static/chunks/framework-dfd14d7ce6600b03.js",
63
- "static/chunks/main-e4e873ee741162eb.js",
64
- "static/chunks/742-e32d18d91fe6f08b.js",
65
- "static/css/29868543c76bc6fd.css",
66
- "static/chunks/469-7259b855711d4ad3.js",
67
- "static/css/dfbdb0f27fd64782.css",
68
- "static/chunks/783-a67df4e98c1ac27b.js",
69
- "static/css/d7bbfbd552f407e9.css",
70
- "static/chunks/pages/[slug]/p-46e7cb105136dc7a.js"
71
- ],
72
- "/_app": [
73
- "static/chunks/webpack-4ccaf6613cbd7224.js",
74
- "static/chunks/framework-dfd14d7ce6600b03.js",
75
- "static/chunks/main-e4e873ee741162eb.js",
76
- "static/css/5d1f64b61ea581f4.css",
77
- "static/chunks/pages/_app-fea7ed14d8f4d0c6.js"
78
- ],
79
- "/_error": [
80
- "static/chunks/webpack-4ccaf6613cbd7224.js",
81
- "static/chunks/framework-dfd14d7ce6600b03.js",
82
- "static/chunks/main-e4e873ee741162eb.js",
83
- "static/chunks/pages/_error-a7a0c1d9bfbb4f38.js"
84
- ],
85
- "/account": [
86
- "static/chunks/webpack-4ccaf6613cbd7224.js",
87
- "static/chunks/framework-dfd14d7ce6600b03.js",
88
- "static/chunks/main-e4e873ee741162eb.js",
89
- "static/chunks/742-e32d18d91fe6f08b.js",
90
- "static/css/29868543c76bc6fd.css",
91
- "static/chunks/469-7259b855711d4ad3.js",
92
- "static/chunks/pages/account-9eb6fab139286c66.js"
93
- ],
94
- "/checkout": [
95
- "static/chunks/webpack-4ccaf6613cbd7224.js",
96
- "static/chunks/framework-dfd14d7ce6600b03.js",
97
- "static/chunks/main-e4e873ee741162eb.js",
98
- "static/chunks/742-e32d18d91fe6f08b.js",
99
- "static/css/29868543c76bc6fd.css",
100
- "static/chunks/469-7259b855711d4ad3.js",
101
- "static/chunks/pages/checkout-7cd7b110c7cf2f10.js"
102
- ],
103
- "/login": [
104
- "static/chunks/webpack-4ccaf6613cbd7224.js",
105
- "static/chunks/framework-dfd14d7ce6600b03.js",
106
- "static/chunks/main-e4e873ee741162eb.js",
107
- "static/chunks/742-e32d18d91fe6f08b.js",
108
- "static/css/29868543c76bc6fd.css",
109
- "static/chunks/469-7259b855711d4ad3.js",
110
- "static/css/df588bb98c0b0ca6.css",
111
- "static/chunks/pages/login-5fd09e6402f47896.js"
112
- ],
113
- "/s": [
114
- "static/chunks/webpack-4ccaf6613cbd7224.js",
115
- "static/chunks/framework-dfd14d7ce6600b03.js",
116
- "static/chunks/main-e4e873ee741162eb.js",
117
- "static/chunks/742-e32d18d91fe6f08b.js",
118
- "static/css/29868543c76bc6fd.css",
119
- "static/chunks/469-7259b855711d4ad3.js",
120
- "static/css/723835bce380750d.css",
121
- "static/chunks/400-a09ccc622ec96daa.js",
122
- "static/chunks/pages/s-8e32a9b170819fa9.js"
123
- ]
124
- },
125
- "ampFirstPages": []
126
- }