@faststore/core 2.2.0-alpha.1 → 2.2.0-alpha.3

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 +2 -2
  2. package/.turbo/turbo-test.log +10 -10
  3. package/index.ts +2 -0
  4. package/package.json +5 -3
  5. package/src/components/sections/CrossSellingShelf/CrossSellingShelf.tsx +0 -1
  6. package/src/server/generator/schema.ts +2 -1
  7. package/.next/BUILD_ID +0 -1
  8. package/.next/build-manifest.json +0 -129
  9. package/.next/cache/.tsbuildinfo +0 -1
  10. package/.next/cache/config.json +0 -7
  11. package/.next/cache/eslint/.cache_1gneedd +0 -1
  12. package/.next/cache/next-server.js.nft.json +0 -1
  13. package/.next/cache/webpack/client-production/0.pack +0 -0
  14. package/.next/cache/webpack/client-production/index.pack +0 -0
  15. package/.next/cache/webpack/server-production/0.pack +0 -0
  16. package/.next/cache/webpack/server-production/index.pack +0 -0
  17. package/.next/export-marker.json +0 -1
  18. package/.next/images-manifest.json +0 -1
  19. package/.next/next-server.js.nft.json +0 -1
  20. package/.next/package.json +0 -1
  21. package/.next/prerender-manifest.json +0 -1
  22. package/.next/react-loadable-manifest.json +0 -44
  23. package/.next/required-server-files.json +0 -1
  24. package/.next/routes-manifest.json +0 -1
  25. package/.next/server/chunks/112.js +0 -2055
  26. package/.next/server/chunks/177.js +0 -120
  27. package/.next/server/chunks/183.js +0 -94
  28. package/.next/server/chunks/184.js +0 -61
  29. package/.next/server/chunks/186.js +0 -113
  30. package/.next/server/chunks/289.js +0 -242
  31. package/.next/server/chunks/312.js +0 -697
  32. package/.next/server/chunks/350.js +0 -200
  33. package/.next/server/chunks/483.js +0 -651
  34. package/.next/server/chunks/52.js +0 -4007
  35. package/.next/server/chunks/53.js +0 -61
  36. package/.next/server/chunks/530.js +0 -626
  37. package/.next/server/chunks/574.js +0 -126
  38. package/.next/server/chunks/576.js +0 -94
  39. package/.next/server/chunks/647.js +0 -433
  40. package/.next/server/chunks/676.js +0 -32
  41. package/.next/server/chunks/693.js +0 -58
  42. package/.next/server/chunks/71.js +0 -1296
  43. package/.next/server/chunks/74.js +0 -4062
  44. package/.next/server/chunks/753.js +0 -554
  45. package/.next/server/chunks/779.js +0 -58
  46. package/.next/server/chunks/817.js +0 -4007
  47. package/.next/server/chunks/825.js +0 -4039
  48. package/.next/server/chunks/854.js +0 -72
  49. package/.next/server/chunks/859.js +0 -959
  50. package/.next/server/chunks/98.js +0 -144
  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 -386
  58. package/.next/server/pages/404.js.nft.json +0 -1
  59. package/.next/server/pages/500.js +0 -388
  60. package/.next/server/pages/500.js.nft.json +0 -1
  61. package/.next/server/pages/[...slug].js +0 -1127
  62. package/.next/server/pages/[...slug].js.nft.json +0 -1
  63. package/.next/server/pages/[slug]/p.js +0 -2251
  64. package/.next/server/pages/[slug]/p.js.nft.json +0 -1
  65. package/.next/server/pages/_app.js +0 -280
  66. package/.next/server/pages/_app.js.nft.json +0 -1
  67. package/.next/server/pages/_document.js +0 -374
  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 -363
  72. package/.next/server/pages/account.js.nft.json +0 -1
  73. package/.next/server/pages/api/graphql.js +0 -450
  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 -148
  80. package/.next/server/pages/api/preview.js.nft.json +0 -1
  81. package/.next/server/pages/checkout.js +0 -363
  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 -81
  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 -368
  100. package/.next/server/pages/login.js.nft.json +0 -1
  101. package/.next/server/pages/s.js +0 -548
  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/chunks/148.3bb7e05cc5d1c1c4.js +0 -1
  107. package/.next/static/chunks/238-86838f629f3d0aa4.js +0 -1
  108. package/.next/static/chunks/243-ef9e49ef3df579c0.js +0 -1
  109. package/.next/static/chunks/530.848b014622932b93.js +0 -1
  110. package/.next/static/chunks/548-ab84e9e8b49413ab.js +0 -1
  111. package/.next/static/chunks/574.d13dd0afe15cd635.js +0 -1
  112. package/.next/static/chunks/651.7142f31ce1e052b3.js +0 -1
  113. package/.next/static/chunks/709.daf1eddebf1e7952.js +0 -1
  114. package/.next/static/chunks/738-67a288ca3569cdbb.js +0 -1
  115. package/.next/static/chunks/741.52f7fb873418346f.js +0 -1
  116. package/.next/static/chunks/932-33f45603c7d12a4b.js +0 -1
  117. package/.next/static/chunks/98.1632997dfd4d3a52.js +0 -1
  118. package/.next/static/chunks/988.d10040040cdfebbb.js +0 -1
  119. package/.next/static/chunks/framework-dfd14d7ce6600b03.js +0 -1
  120. package/.next/static/chunks/main-fd466221927468fd.js +0 -1
  121. package/.next/static/chunks/pages/404-af78f7cd1d3c1f60.js +0 -1
  122. package/.next/static/chunks/pages/500-f6346ca5f9dc4fef.js +0 -1
  123. package/.next/static/chunks/pages/[...slug]-362204c7e0b533cf.js +0 -1
  124. package/.next/static/chunks/pages/[slug]/p-885042c4b2b4f8ed.js +0 -1
  125. package/.next/static/chunks/pages/_app-6d0e6ab9a4dd8106.js +0 -1
  126. package/.next/static/chunks/pages/_error-a7a0c1d9bfbb4f38.js +0 -1
  127. package/.next/static/chunks/pages/account-05bd79fb78365e88.js +0 -1
  128. package/.next/static/chunks/pages/checkout-c973786e68f25a39.js +0 -1
  129. package/.next/static/chunks/pages/index-79b05b0071c02fff.js +0 -1
  130. package/.next/static/chunks/pages/login-8deb9243376b6aa1.js +0 -1
  131. package/.next/static/chunks/pages/s-e1bb00f8de6a386e.js +0 -1
  132. package/.next/static/chunks/polyfills-c67a75d1b6f99dc8.js +0 -1
  133. package/.next/static/chunks/webpack-88d120cefa1c4c09.js +0 -1
  134. package/.next/static/css/20e4a3a45cdd65f4.css +0 -1
  135. package/.next/static/css/4b7138899cd07c63.css +0 -1
  136. package/.next/static/css/527e334fa69cf40a.css +0 -1
  137. package/.next/static/css/6e1a7434f061d0ef.css +0 -1
  138. package/.next/static/css/9e76fef1c9ca89af.css +0 -1
  139. package/.next/static/css/a2eefb25a4608343.css +0 -1
  140. package/.next/static/css/cb7d1fcea42fab9c.css +0 -1
  141. package/.next/static/css/df588bb98c0b0ca6.css +0 -1
  142. package/.next/static/css/e3b039e8f5daf95f.css +0 -1
  143. package/.next/static/css/f0e2d1b8832e935d.css +0 -1
  144. package/.next/static/wPqgZ8bYrPY473PZzuIX_/_buildManifest.js +0 -1
  145. package/.next/static/wPqgZ8bYrPY473PZzuIX_/_ssgManifest.js +0 -1
  146. package/.next/trace +0 -80
  147. package/generate.sh +0 -71
  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,8 +1,8 @@
1
1
  $ yarn partytown & yarn generate && next build
2
+ $ faststore generate-graphql -c
2
3
  $ partytown copylib ./public/~partytown
3
- $ ./generate.sh
4
4
  Partytown lib copied to: /home/runner/work/faststore/faststore/packages/core/public/~partytown
5
- GraphQL schema, types, and optimizations successfully generated 🎉
5
+ success - GraphQL schema, types, and optimizations successfully generated 🎉
6
6
  warn - No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
7
7
  Attention: Next.js now collects completely anonymous telemetry regarding usage.
8
8
  This information is used to shape Next.js' roadmap and prioritize features.
@@ -1,25 +1,25 @@
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 (18.977s)
4
+ PASS test/server/index.test.ts (7.999s)
5
5
  FastStore GraphQL Layer
6
6
  @faststore/api
7
- ✓ should return a valid GraphQL schema (18ms)
8
- ✓ should return a valid GraphQL schema contain all expected types (62ms)
9
- ✓ should return a valid GraphQL schema contain all expected queries (1ms)
7
+ ✓ should return a valid GraphQL schema (6ms)
8
+ ✓ should return a valid GraphQL schema contain all expected types (13ms)
9
+ ✓ should return a valid GraphQL schema contain all expected queries (2ms)
10
10
  ✓ should return a valid GraphQL schema contain all expected mutations
11
11
  VTEX API Extension
12
- ✓ getTypeDefsFromFolder function should return an Array (13ms)
12
+ ✓ getTypeDefsFromFolder function should return an Array (6ms)
13
13
  Third Party API Extension
14
- ✓ getTypeDefsFromFolder function should return an Array (16ms)
14
+ ✓ getTypeDefsFromFolder function should return an Array (6ms)
15
15
  Final Schema after merging
16
- ✓ should return a valid merged GraphQL schema (87ms)
16
+ ✓ should return a valid merged GraphQL schema (31ms)
17
17
  Envelop
18
- ✓ should exist with its plugins (109ms)
19
- ✓ should handle options and execute (184ms)
18
+ ✓ should exist with its plugins (38ms)
19
+ ✓ should handle options and execute (126ms)
20
20
 
21
21
  Test Suites: 1 passed, 1 total
22
22
  Tests: 9 passed, 9 total
23
23
  Snapshots: 0 total
24
- Time: 20.045s
24
+ Time: 8.583s
25
25
  Ran all test suites.
package/index.ts CHANGED
@@ -13,3 +13,5 @@ export type {
13
13
  PLPContext,
14
14
  SearchPageContext,
15
15
  } from './src/sdk/overrides/PageProvider'
16
+
17
+ export { useProductsQuery } from './src/sdk/product/useProductsQuery'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/core",
3
- "version": "2.2.0-alpha.1",
3
+ "version": "2.2.0-alpha.3",
4
4
  "license": "MIT",
5
5
  "browserslist": "supports es6-module and not dead",
6
6
  "exports": {
@@ -8,7 +8,8 @@
8
8
  },
9
9
  "scripts": {
10
10
  "generate:schema": "tsx src/server/generator/generateGraphQLSchemaFile.ts",
11
- "generate": "./generate.sh",
11
+ "generate:codegen": "graphql-codegen",
12
+ "generate": "faststore generate-graphql -c",
12
13
  "build": "yarn partytown & yarn generate && next build",
13
14
  "dev": "yarn partytown & yarn generate && next dev",
14
15
  "clean": "rm -r .next",
@@ -78,6 +79,7 @@
78
79
  "devDependencies": {
79
80
  "@cypress/code-coverage": "^3.9.10",
80
81
  "@envelop/testing": "^6.0.0",
82
+ "@faststore/cli": "^2.2.0-alpha.3",
81
83
  "@faststore/eslint-config": "^2.2.0-alpha.1",
82
84
  "@faststore/lighthouse": "^1.12.32",
83
85
  "@lhci/cli": "^0.9.0",
@@ -125,5 +127,5 @@
125
127
  "msw": {
126
128
  "workerDirectory": "public"
127
129
  },
128
- "gitHead": "6eff908883fa54cb72d548b12a610490df833804"
130
+ "gitHead": "3f6a1bf0ab1c6cc7804c4f8752bf82457e8aad67"
129
131
  }
@@ -2,7 +2,6 @@ import { useMemo } from 'react'
2
2
 
3
3
  import UIProductShelf from 'src/components/ui/ProductShelf'
4
4
  import { useInView } from 'react-intersection-observer'
5
- import { useProductsQuery } from 'src/sdk/product/useProductsQuery'
6
5
  import { usePDP } from 'src/sdk/overrides/PageProvider'
7
6
  import styles from '../ProductShelf/section.module.scss'
8
7
  import Section from '../Section'
@@ -1,3 +1,4 @@
1
+ import path from 'path'
1
2
  import { writeFileSync } from 'fs-extra'
2
3
  import { getSchema, getTypeDefs } from '@faststore/api'
3
4
  import { printSchemaWithDirectives } from '@graphql-tools/utils'
@@ -69,7 +70,7 @@ export const getMergedSchema = (): GraphQLSchema =>
69
70
  export function writeGraphqlSchemaFile(apiSchema: GraphQLSchema) {
70
71
  try {
71
72
  writeFileSync(
72
- [process.cwd(), '@generated', 'graphql', 'schema.graphql'].join('/'),
73
+ path.join(process.cwd(), '@generated', 'graphql', 'schema.graphql'),
73
74
  printSchemaWithDirectives(apiSchema)
74
75
  )
75
76
 
package/.next/BUILD_ID DELETED
@@ -1 +0,0 @@
1
- wPqgZ8bYrPY473PZzuIX_
@@ -1,129 +0,0 @@
1
- {
2
- "polyfillFiles": [
3
- "static/chunks/polyfills-c67a75d1b6f99dc8.js"
4
- ],
5
- "devFiles": [],
6
- "ampDevFiles": [],
7
- "lowPriorityFiles": [
8
- "static/wPqgZ8bYrPY473PZzuIX_/_buildManifest.js",
9
- "static/wPqgZ8bYrPY473PZzuIX_/_ssgManifest.js"
10
- ],
11
- "rootMainFiles": [],
12
- "pages": {
13
- "/": [
14
- "static/chunks/webpack-88d120cefa1c4c09.js",
15
- "static/chunks/framework-dfd14d7ce6600b03.js",
16
- "static/chunks/main-fd466221927468fd.js",
17
- "static/chunks/738-67a288ca3569cdbb.js",
18
- "static/chunks/548-ab84e9e8b49413ab.js",
19
- "static/css/e3b039e8f5daf95f.css",
20
- "static/chunks/243-ef9e49ef3df579c0.js",
21
- "static/css/20e4a3a45cdd65f4.css",
22
- "static/chunks/238-86838f629f3d0aa4.js",
23
- "static/css/a2eefb25a4608343.css",
24
- "static/chunks/pages/index-79b05b0071c02fff.js"
25
- ],
26
- "/404": [
27
- "static/chunks/webpack-88d120cefa1c4c09.js",
28
- "static/chunks/framework-dfd14d7ce6600b03.js",
29
- "static/chunks/main-fd466221927468fd.js",
30
- "static/chunks/738-67a288ca3569cdbb.js",
31
- "static/css/e3b039e8f5daf95f.css",
32
- "static/chunks/243-ef9e49ef3df579c0.js",
33
- "static/css/df588bb98c0b0ca6.css",
34
- "static/chunks/pages/404-af78f7cd1d3c1f60.js"
35
- ],
36
- "/500": [
37
- "static/chunks/webpack-88d120cefa1c4c09.js",
38
- "static/chunks/framework-dfd14d7ce6600b03.js",
39
- "static/chunks/main-fd466221927468fd.js",
40
- "static/chunks/738-67a288ca3569cdbb.js",
41
- "static/css/e3b039e8f5daf95f.css",
42
- "static/chunks/243-ef9e49ef3df579c0.js",
43
- "static/css/df588bb98c0b0ca6.css",
44
- "static/chunks/pages/500-f6346ca5f9dc4fef.js"
45
- ],
46
- "/[...slug]": [
47
- "static/chunks/webpack-88d120cefa1c4c09.js",
48
- "static/chunks/framework-dfd14d7ce6600b03.js",
49
- "static/chunks/main-fd466221927468fd.js",
50
- "static/chunks/738-67a288ca3569cdbb.js",
51
- "static/chunks/548-ab84e9e8b49413ab.js",
52
- "static/css/e3b039e8f5daf95f.css",
53
- "static/chunks/243-ef9e49ef3df579c0.js",
54
- "static/css/20e4a3a45cdd65f4.css",
55
- "static/chunks/238-86838f629f3d0aa4.js",
56
- "static/css/f0e2d1b8832e935d.css",
57
- "static/chunks/932-33f45603c7d12a4b.js",
58
- "static/css/a2eefb25a4608343.css",
59
- "static/css/527e334fa69cf40a.css",
60
- "static/chunks/pages/[...slug]-362204c7e0b533cf.js"
61
- ],
62
- "/[slug]/p": [
63
- "static/chunks/webpack-88d120cefa1c4c09.js",
64
- "static/chunks/framework-dfd14d7ce6600b03.js",
65
- "static/chunks/main-fd466221927468fd.js",
66
- "static/chunks/738-67a288ca3569cdbb.js",
67
- "static/chunks/548-ab84e9e8b49413ab.js",
68
- "static/css/e3b039e8f5daf95f.css",
69
- "static/chunks/243-ef9e49ef3df579c0.js",
70
- "static/css/20e4a3a45cdd65f4.css",
71
- "static/chunks/238-86838f629f3d0aa4.js",
72
- "static/css/4b7138899cd07c63.css",
73
- "static/chunks/pages/[slug]/p-885042c4b2b4f8ed.js"
74
- ],
75
- "/_app": [
76
- "static/chunks/webpack-88d120cefa1c4c09.js",
77
- "static/chunks/framework-dfd14d7ce6600b03.js",
78
- "static/chunks/main-fd466221927468fd.js",
79
- "static/css/9e76fef1c9ca89af.css",
80
- "static/chunks/pages/_app-6d0e6ab9a4dd8106.js"
81
- ],
82
- "/_error": [
83
- "static/chunks/webpack-88d120cefa1c4c09.js",
84
- "static/chunks/framework-dfd14d7ce6600b03.js",
85
- "static/chunks/main-fd466221927468fd.js",
86
- "static/chunks/pages/_error-a7a0c1d9bfbb4f38.js"
87
- ],
88
- "/account": [
89
- "static/chunks/webpack-88d120cefa1c4c09.js",
90
- "static/chunks/framework-dfd14d7ce6600b03.js",
91
- "static/chunks/main-fd466221927468fd.js",
92
- "static/chunks/738-67a288ca3569cdbb.js",
93
- "static/css/e3b039e8f5daf95f.css",
94
- "static/chunks/243-ef9e49ef3df579c0.js",
95
- "static/chunks/pages/account-05bd79fb78365e88.js"
96
- ],
97
- "/checkout": [
98
- "static/chunks/webpack-88d120cefa1c4c09.js",
99
- "static/chunks/framework-dfd14d7ce6600b03.js",
100
- "static/chunks/main-fd466221927468fd.js",
101
- "static/chunks/738-67a288ca3569cdbb.js",
102
- "static/css/e3b039e8f5daf95f.css",
103
- "static/chunks/243-ef9e49ef3df579c0.js",
104
- "static/chunks/pages/checkout-c973786e68f25a39.js"
105
- ],
106
- "/login": [
107
- "static/chunks/webpack-88d120cefa1c4c09.js",
108
- "static/chunks/framework-dfd14d7ce6600b03.js",
109
- "static/chunks/main-fd466221927468fd.js",
110
- "static/chunks/738-67a288ca3569cdbb.js",
111
- "static/css/e3b039e8f5daf95f.css",
112
- "static/chunks/243-ef9e49ef3df579c0.js",
113
- "static/css/df588bb98c0b0ca6.css",
114
- "static/chunks/pages/login-8deb9243376b6aa1.js"
115
- ],
116
- "/s": [
117
- "static/chunks/webpack-88d120cefa1c4c09.js",
118
- "static/chunks/framework-dfd14d7ce6600b03.js",
119
- "static/chunks/main-fd466221927468fd.js",
120
- "static/chunks/738-67a288ca3569cdbb.js",
121
- "static/css/e3b039e8f5daf95f.css",
122
- "static/chunks/243-ef9e49ef3df579c0.js",
123
- "static/css/f0e2d1b8832e935d.css",
124
- "static/chunks/932-33f45603c7d12a4b.js",
125
- "static/chunks/pages/s-e1bb00f8de6a386e.js"
126
- ]
127
- },
128
- "ampFirstPages": []
129
- }