@faststore/core 3.0.22 → 3.0.24

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 (105) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +15 -15
  3. package/.next/cache/.tsbuildinfo +1 -1
  4. package/.next/cache/config.json +7 -0
  5. package/.next/cache/eslint/.cache_1gneedd +1 -0
  6. package/.next/cache/webpack/client-production/0.pack +0 -0
  7. package/.next/cache/webpack/client-production/index.pack +0 -0
  8. package/.next/cache/webpack/server-production/0.pack +0 -0
  9. package/.next/cache/webpack/server-production/index.pack +0 -0
  10. package/.next/next-minimal-server.js.nft.json +1 -1
  11. package/.next/next-server.js.nft.json +1 -1
  12. package/.next/prerender-manifest.js +1 -1
  13. package/.next/prerender-manifest.json +1 -1
  14. package/.next/required-server-files.json +1 -1
  15. package/.next/routes-manifest.json +1 -1
  16. package/.next/server/chunks/242.js +1 -1
  17. package/.next/server/chunks/498.js +1 -1
  18. package/.next/server/chunks/640.js +1 -1
  19. package/.next/server/chunks/997.js +1 -1
  20. package/.next/server/functions-config-manifest.json +1 -1
  21. package/.next/server/middleware-build-manifest.js +1 -1
  22. package/.next/server/pages/500.js +1 -1
  23. package/.next/server/pages/[slug]/p.js +1 -1
  24. package/.next/server/pages/api/graphql.js +1 -1
  25. package/.next/server/pages/api/preview.js +1 -1
  26. package/.next/server/pages/en-US/404.html +2 -2
  27. package/.next/server/pages/en-US/404.json +1 -1
  28. package/.next/server/pages/en-US/500.html +2 -2
  29. package/.next/server/pages/en-US/500.json +1 -1
  30. package/.next/server/pages/en-US/account.html +2 -2
  31. package/.next/server/pages/en-US/account.json +1 -1
  32. package/.next/server/pages/en-US/checkout.html +2 -2
  33. package/.next/server/pages/en-US/checkout.json +1 -1
  34. package/.next/server/pages/en-US/login.html +2 -2
  35. package/.next/server/pages/en-US/login.json +1 -1
  36. package/.next/server/pages/en-US/s.html +2 -2
  37. package/.next/server/pages/en-US/s.json +1 -1
  38. package/.next/server/pages/en-US.html +2 -2
  39. package/.next/server/pages/en-US.json +1 -1
  40. package/.next/server/pages-manifest.json +1 -1
  41. package/.next/static/{KHfUTI2LyBArHphiJspvQ → BDE9eB7mQJSFb7BXO3vSi}/_buildManifest.js +1 -1
  42. package/.next/static/chunks/pages/[slug]/p-be3f544bf3a14d18.js +1 -0
  43. package/.next/static/chunks/pages/{_app-ad8623e78bc5b766.js → _app-4df2b21628950d8a.js} +1 -1
  44. package/.next/static/chunks/{webpack-f3be21bc483182aa.js → webpack-b4a2fdf4ef127bb7.js} +1 -1
  45. package/.next/trace +91 -6
  46. package/.turbo/turbo-build.log +63 -0
  47. package/.turbo/turbo-lint.log +2 -0
  48. package/.turbo/turbo-test.log +23 -0
  49. package/@generated/graphql.ts +0 -12
  50. package/@generated/schema.graphql +0 -12
  51. package/faststore.config.default.js +1 -0
  52. package/package.json +10 -9
  53. package/src/pages/api/preview.ts +4 -1
  54. package/src/server/options.ts +1 -0
  55. package/.next/cache/eslint/.cache_ybd91x +0 -1
  56. package/.next/cache/webpack/client-development/0.pack.gz +0 -0
  57. package/.next/cache/webpack/client-development/1.pack.gz +0 -0
  58. package/.next/cache/webpack/client-development/10.pack.gz +0 -0
  59. package/.next/cache/webpack/client-development/11.pack.gz +0 -0
  60. package/.next/cache/webpack/client-development/2.pack.gz +0 -0
  61. package/.next/cache/webpack/client-development/3.pack.gz +0 -0
  62. package/.next/cache/webpack/client-development/4.pack.gz +0 -0
  63. package/.next/cache/webpack/client-development/5.pack.gz +0 -0
  64. package/.next/cache/webpack/client-development/6.pack.gz +0 -0
  65. package/.next/cache/webpack/client-development/7.pack.gz +0 -0
  66. package/.next/cache/webpack/client-development/8.pack.gz +0 -0
  67. package/.next/cache/webpack/client-development/9.pack.gz +0 -0
  68. package/.next/cache/webpack/client-development/index.pack.gz +0 -0
  69. package/.next/cache/webpack/client-development/index.pack.gz.old +0 -0
  70. package/.next/cache/webpack/client-production/1.pack +0 -0
  71. package/.next/cache/webpack/client-production/10.pack +0 -0
  72. package/.next/cache/webpack/client-production/2.pack +0 -0
  73. package/.next/cache/webpack/client-production/3.pack +0 -0
  74. package/.next/cache/webpack/client-production/4.pack +0 -0
  75. package/.next/cache/webpack/client-production/5.pack +0 -0
  76. package/.next/cache/webpack/client-production/6.pack +0 -0
  77. package/.next/cache/webpack/client-production/7.pack +0 -0
  78. package/.next/cache/webpack/client-production/8.pack +0 -0
  79. package/.next/cache/webpack/client-production/9.pack +0 -0
  80. package/.next/cache/webpack/client-production/index.pack.old +0 -0
  81. package/.next/cache/webpack/server-development/0.pack.gz +0 -0
  82. package/.next/cache/webpack/server-development/1.pack.gz +0 -0
  83. package/.next/cache/webpack/server-development/10.pack.gz +0 -0
  84. package/.next/cache/webpack/server-development/11.pack.gz +0 -0
  85. package/.next/cache/webpack/server-development/12.pack.gz +0 -0
  86. package/.next/cache/webpack/server-development/2.pack.gz +0 -0
  87. package/.next/cache/webpack/server-development/3.pack.gz +0 -0
  88. package/.next/cache/webpack/server-development/4.pack.gz +0 -0
  89. package/.next/cache/webpack/server-development/5.pack.gz +0 -0
  90. package/.next/cache/webpack/server-development/6.pack.gz +0 -0
  91. package/.next/cache/webpack/server-development/7.pack.gz +0 -0
  92. package/.next/cache/webpack/server-development/8.pack.gz +0 -0
  93. package/.next/cache/webpack/server-development/9.pack.gz +0 -0
  94. package/.next/cache/webpack/server-development/index.pack.gz +0 -0
  95. package/.next/cache/webpack/server-development/index.pack.gz.old +0 -0
  96. package/.next/cache/webpack/server-production/1.pack +0 -0
  97. package/.next/cache/webpack/server-production/2.pack +0 -0
  98. package/.next/cache/webpack/server-production/3.pack +0 -0
  99. package/.next/cache/webpack/server-production/4.pack +0 -0
  100. package/.next/cache/webpack/server-production/5.pack +0 -0
  101. package/.next/cache/webpack/server-production/6.pack +0 -0
  102. package/.next/cache/webpack/server-production/7.pack +0 -0
  103. package/.next/cache/webpack/server-production/index.pack.old +0 -0
  104. package/.next/static/chunks/pages/[slug]/p-5fb8fe2c80ec1608.js +0 -1
  105. /package/.next/static/{KHfUTI2LyBArHphiJspvQ → BDE9eB7mQJSFb7BXO3vSi}/_ssgManifest.js +0 -0
@@ -0,0 +1,63 @@
1
+ $ yarn partytown & yarn generate && next build
2
+ $ partytown copylib ./public/~partytown
3
+ $ faststore generate-graphql -c
4
+ Partytown lib copied to: /home/runner/work/faststore/faststore/packages/core/public/~partytown
5
+ success - GraphQL schema, types, and optimizations successfully generated 🎉
6
+ ⚠ No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
7
+ Attention: Next.js now collects completely anonymous telemetry regarding usage.
8
+ This information is used to shape Next.js' roadmap and prioritize features.
9
+ You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
10
+ https://nextjs.org/telemetry
11
+
12
+ Browserslist: caniuse-lite is outdated. Please run:
13
+ npx browserslist@latest --update-db
14
+ Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
15
+ Linting and checking validity of types ...
16
+ Browserslist: caniuse-lite is outdated. Please run:
17
+ npx browserslist@latest --update-db
18
+ Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
19
+ Creating an optimized production build ...
20
+ Disabled SWC as replacement for Babel because of custom Babel configuration ".babelrc.js" https://nextjs.org/docs/messages/swc-disabled
21
+ Using external babel configuration from /home/runner/work/faststore/faststore/packages/core/.babelrc.js
22
+ Browserslist: caniuse-lite is outdated. Please run:
23
+ npx update-browserslist-db@latest
24
+ Why you should do it regularly: https://github.com/browserslist/update-db#readme
25
+ ✓ Compiled successfully
26
+ Collecting page data ...
27
+ Generating static pages (0/7) ...
28
+
29
  Generating static pages (1/7)
30
+
1
31
  Generating static pages (3/7)
32
+
2
33
  Generating static pages (5/7)
34
+
3
35
  ✓ Generating static pages (7/7)
36
+ Finalizing page optimization ...
37
+ Collecting build traces ...
38
+
39
+ Route (pages) Size First Load JS
40
+ ┌ ● / 3.36 kB 143 kB
41
+ ├ └ css/d586715f4f707df4.css 6.56 kB
42
+ ├ /_app 0 B 93.4 kB
43
+ ├ ● /[...slug] 4.47 kB 155 kB
44
+ ├ └ css/4c4d90eb8cb1d2b7.css 7 kB
45
+ ├ ● /[slug]/p 11.1 kB 151 kB
46
+ ├ └ css/96e3fddf695d6aa9.css 11.3 kB
47
+ ├ ○ /404 1.47 kB 126 kB
48
+ ├ ● /500 1.47 kB 126 kB
49
+ ├ ● /account 676 B 126 kB
50
+ ├ λ /api/graphql 0 B 93.4 kB
51
+ ├ λ /api/health/live 0 B 93.4 kB
52
+ ├ λ /api/health/ready 0 B 93.4 kB
53
+ ├ λ /api/preview 0 B 93.4 kB
54
+ ├ ● /checkout 662 B 126 kB
55
+ ├ ● /login 1.58 kB 127 kB
56
+ └ ● /s 4.66 kB 141 kB
57
+ + First Load JS shared by all 96.5 kB
58
+ ├ chunks/framework-8e279965036b6169.js 45.4 kB
59
+ ├ chunks/main-6f63f6746cc029db.js 33.1 kB
60
+ ├ chunks/pages/_app-4df2b21628950d8a.js 12.6 kB
61
+ ├ chunks/webpack-b4a2fdf4ef127bb7.js 2.45 kB
62
+ └ css/5d1f64b61ea581f4.css 3.05 kB
63
+
64
+ λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
65
+ ○ (Static) automatically rendered as static HTML (uses no initial props)
66
+ ● (SSG) automatically generated as static HTML + JSON (uses getStaticProps)
67
+
@@ -0,0 +1,2 @@
1
+ $ next lint
2
+ ✔ No ESLint warnings or errors
@@ -0,0 +1,23 @@
1
+ $ jest
2
+ PASS test/server/index.test.ts (24.185 s)
3
+ FastStore GraphQL Layer
4
+ @faststore/api
5
+ ✓ should return a valid GraphQL schema (9 ms)
6
+ ✓ should return a valid GraphQL schema contain all expected types (11 ms)
7
+ ✓ should return a valid GraphQL schema contain all expected queries (1 ms)
8
+ ✓ should return a valid GraphQL schema contain all expected mutations (1 ms)
9
+ VTEX API Extension
10
+ ✓ getTypeDefsFromFolder function should return an Array (25 ms)
11
+ Third Party API Extension
12
+ ✓ getTypeDefsFromFolder function should return an Array (12 ms)
13
+ Final Schema after merging
14
+ ✓ should return a valid merged GraphQL schema (40 ms)
15
+ Envelop
16
+ ✓ should exist with its plugins (25 ms)
17
+ ✓ should handle options and execute (129 ms)
18
+
19
+ Test Suites: 1 passed, 1 total
20
+ Tests: 9 passed, 9 total
21
+ Snapshots: 0 total
22
+ Time: 24.263 s
23
+ Ran all test suites.
@@ -629,18 +629,6 @@ export type StoreAggregateRating = {
629
629
  reviewCount: Scalars['Int']['output']
630
630
  }
631
631
 
632
- /** Attribute of a given product. */
633
- export type StoreAttribute = {
634
- /** Attribute id. */
635
- id: Scalars['String']['output']
636
- /** Attribute name. */
637
- name: Scalars['String']['output']
638
- /** Attribute value. */
639
- value: Scalars['String']['output']
640
- /** Attribute visibility. */
641
- visible: Scalars['Boolean']['output']
642
- }
643
-
644
632
  /** information about the author of a product review or rating. */
645
633
  export type StoreAuthor = {
646
634
  /** Author name. */
@@ -51,18 +51,6 @@ type StoreAggregateRating {
51
51
  reviewCount: Int!
52
52
  }
53
53
 
54
- """Attribute of a given product."""
55
- type StoreAttribute {
56
- """Attribute id."""
57
- id: String!
58
- """Attribute name."""
59
- name: String!
60
- """Attribute value."""
61
- value: String!
62
- """Attribute visibility."""
63
- visible: Boolean!
64
- }
65
-
66
54
  """information about the author of a product review or rating."""
67
55
  type StoreAuthor {
68
56
  """Author name."""
@@ -16,6 +16,7 @@ module.exports = {
16
16
  api: {
17
17
  storeId: 'storeframework',
18
18
  workspace: 'master',
19
+ subDomainPrefix: ['www'],
19
20
  environment: 'vtexcommercestable',
20
21
  hideUnavailableItems: false,
21
22
  incrementAddress: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/core",
3
- "version": "3.0.22",
3
+ "version": "3.0.24",
4
4
  "license": "MIT",
5
5
  "repository": "vtex/faststore",
6
6
  "browserslist": "supports es6-module and not dead",
@@ -39,11 +39,11 @@
39
39
  "@envelop/graphql-jit": "^1.1.1",
40
40
  "@envelop/parser-cache": "^2.2.0",
41
41
  "@envelop/validation-cache": "^2.2.0",
42
- "@faststore/api": "^3.0.21",
43
- "@faststore/components": "^3.0.7",
44
- "@faststore/graphql-utils": "^3.0.13",
45
- "@faststore/sdk": "^3.0.7",
46
- "@faststore/ui": "^3.0.7",
42
+ "@faststore/api": "^3.0.24",
43
+ "@faststore/components": "^3.0.24",
44
+ "@faststore/graphql-utils": "^3.0.24",
45
+ "@faststore/sdk": "^3.0.24",
46
+ "@faststore/ui": "^3.0.24",
47
47
  "@graphql-codegen/cli": "^3.3.1",
48
48
  "@graphql-codegen/client-preset": "^4.1.0",
49
49
  "@graphql-codegen/typescript": "^3.0.4",
@@ -83,8 +83,8 @@
83
83
  "devDependencies": {
84
84
  "@cypress/code-coverage": "^3.12.1",
85
85
  "@envelop/testing": "^6.0.0",
86
- "@faststore/cli": "^3.0.22",
87
- "@faststore/eslint-config": "^3.0.7",
86
+ "@faststore/cli": "^3.0.24",
87
+ "@faststore/eslint-config": "^3.0.24",
88
88
  "@faststore/lighthouse": "^1.12.32",
89
89
  "@lhci/cli": "^0.9.0",
90
90
  "@testing-library/cypress": "^10.0.1",
@@ -127,5 +127,6 @@
127
127
  "volta": {
128
128
  "node": "18.19.0",
129
129
  "yarn": "1.19.1"
130
- }
130
+ },
131
+ "gitHead": "1cbf5056e2fd6d1b3e85268f585709c59ec9f63f"
131
132
  }
@@ -50,7 +50,10 @@ const handler: NextApiHandler = async (req, res) => {
50
50
  }
51
51
 
52
52
  // Enable Preview Mode by setting the cookies
53
- res.setPreviewData(locator, { maxAge: 3600 })
53
+ res.setPreviewData(locator, {
54
+ maxAge: 3600,
55
+ path: (page.settings as Settings)?.seo?.slug,
56
+ })
54
57
 
55
58
  // Redirect to the path from the fetched locator
56
59
  if (previewRedirects[locator.contentType]) {
@@ -6,6 +6,7 @@ export const apiOptions: APIOptions = {
6
6
  platform: storeConfig.platform as APIOptions['platform'],
7
7
  account: storeConfig.api.storeId,
8
8
  environment: storeConfig.api.environment as APIOptions['environment'],
9
+ subDomainPrefix: storeConfig.api.subDomainPrefix,
9
10
  hideUnavailableItems: storeConfig.api.hideUnavailableItems,
10
11
  incrementAddress: storeConfig.api.incrementAddress,
11
12
  channel: storeConfig.session.channel,