@faststore/core 3.40.1 → 3.41.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/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +14 -14
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/cache/config.json +3 -3
- package/.next/cache/webpack/client-production/0.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/prerender-manifest.js +1 -1
- package/.next/prerender-manifest.json +1 -1
- package/.next/react-loadable-manifest.json +1 -1
- package/.next/routes-manifest.json +1 -1
- package/.next/server/chunks/8112.js +1 -1
- package/.next/server/functions-config-manifest.json +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/api/graphql.js +1 -1
- package/.next/server/pages/en-US/404.html +2 -2
- package/.next/server/pages/en-US/404.json +1 -1
- package/.next/server/pages/en-US/500.html +2 -2
- package/.next/server/pages/en-US/500.json +1 -1
- package/.next/server/pages/en-US/checkout.html +2 -2
- package/.next/server/pages/en-US/checkout.json +1 -1
- package/.next/server/pages/en-US/login.html +2 -2
- package/.next/server/pages/en-US/login.json +1 -1
- package/.next/server/pages/en-US/s.html +2 -2
- package/.next/server/pages/en-US/s.json +1 -1
- package/.next/server/pages/en-US.html +2 -2
- package/.next/server/pages/en-US.json +1 -1
- package/.next/server/pages-manifest.json +1 -1
- package/.next/static/chunks/{1552.b5a073e7ac834965.js → 1552.e7cece605fc2e1cd.js} +1 -1
- package/.next/static/chunks/{webpack-d82a33f39ac106fc.js → webpack-071462ed32bcb285.js} +1 -1
- package/.next/trace +109 -109
- package/.turbo/turbo-build.log +14 -8
- package/.turbo/turbo-test.log +5 -5
- package/CHANGELOG.md +10 -0
- package/package.json +3 -3
- package/src/pages/api/graphql.ts +34 -28
- /package/.next/static/{MgoJX22s4GHxsmeOB5LUO → r-9GyV_CmJtAtUefXgQmI}/_buildManifest.js +0 -0
- /package/.next/static/{MgoJX22s4GHxsmeOB5LUO → r-9GyV_CmJtAtUefXgQmI}/_ssgManifest.js +0 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
|
|
2
|
-
> @faststore/core@3.40.
|
|
2
|
+
> @faststore/core@3.40.2 prebuild /home/runner/work/faststore/faststore/packages/core
|
|
3
3
|
> na run partytown && na run generate
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @faststore/core@3.40.
|
|
6
|
+
> @faststore/core@3.40.2 partytown /home/runner/work/faststore/faststore/packages/core
|
|
7
7
|
> partytown copylib ./public/~partytown
|
|
8
8
|
|
|
9
9
|
Partytown lib copied to: /home/runner/work/faststore/faststore/packages/core/public/~partytown
|
|
10
10
|
|
|
11
|
-
> @faststore/core@3.40.
|
|
11
|
+
> @faststore/core@3.40.2 generate /home/runner/work/faststore/faststore/packages/core
|
|
12
12
|
> na run generate:schema && na run generate:codegen && na run format:generated
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
> @faststore/core@3.40.
|
|
15
|
+
> @faststore/core@3.40.2 generate:schema /home/runner/work/faststore/faststore/packages/core
|
|
16
16
|
> tsx src/server/generator/generateGraphQLSchemaFile.ts
|
|
17
17
|
|
|
18
18
|
Schema GraphQL file generated successfully
|
|
19
19
|
|
|
20
|
-
> @faststore/core@3.40.
|
|
20
|
+
> @faststore/core@3.40.2 generate:codegen /home/runner/work/faststore/faststore/packages/core
|
|
21
21
|
> graphql-codegen
|
|
22
22
|
|
|
23
23
|
[STARTED] Parse Configuration
|
|
@@ -37,11 +37,11 @@ Running lifecycle hook "afterStart" scripts...
|
|
|
37
37
|
[CLI] Loading Documents
|
|
38
38
|
[CLI] Generating output
|
|
39
39
|
|
|
40
|
-
> @faststore/core@3.40.
|
|
40
|
+
> @faststore/core@3.40.2 format:generated /home/runner/work/faststore/faststore/packages/core
|
|
41
41
|
> prettier --write "@generated/**/*.{ts,js,tsx,jsx,json}" --loglevel error
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
> @faststore/core@3.40.
|
|
44
|
+
> @faststore/core@3.40.2 build /home/runner/work/faststore/faststore/packages/core
|
|
45
45
|
> next build
|
|
46
46
|
|
|
47
47
|
⚠ No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
|
|
@@ -58,10 +58,16 @@ https://nextjs.org/telemetry
|
|
|
58
58
|
✓ Compiled successfully
|
|
59
59
|
Collecting page data ...
|
|
60
60
|
Generating static pages (0/6) ...
|
|
61
|
+
RegionPopover not found. Add a new component for this section or remove it from the CMS
|
|
61
62
|
|
|
62
63
|
Generating static pages (1/6)
|
|
63
64
|
Warning: Dynamic Content not found for the page: home. Refer to the Dynamic Content documentation at https://developers.vtex.com/docs/guides/faststore/dynamic-content-overview for mapping the page and the corresponding data-fetching function.
|
|
65
|
+
RegionPopover not found. Add a new component for this section or remove it from the CMS
|
|
64
66
|
|
|
65
67
|
Generating static pages (2/6)
|
|
68
|
+
RegionPopover not found. Add a new component for this section or remove it from the CMS
|
|
69
|
+
RegionPopover not found. Add a new component for this section or remove it from the CMS
|
|
66
70
|
|
|
67
71
|
Generating static pages (4/6)
|
|
72
|
+
RegionPopover not found. Add a new component for this section or remove it from the CMS
|
|
73
|
+
RegionPopover not found. Add a new component for this section or remove it from the CMS
|
|
68
74
|
|
|
69
75
|
✓ Generating static pages (6/6)
|
|
70
76
|
Finalizing page optimization ...
|
|
71
77
|
Collecting build traces ...
|
|
@@ -91,7 +97,7 @@ Route (pages) Size First Load JS
|
|
|
91
97
|
├ chunks/framework-807b0f81cbc129f0.js 45.4 kB
|
|
92
98
|
├ chunks/main-5569625b3fdd6741.js 33.1 kB
|
|
93
99
|
├ chunks/pages/_app-012e51403727ae6a.js 10.4 kB
|
|
94
|
-
├ chunks/webpack-
|
|
100
|
+
├ chunks/webpack-071462ed32bcb285.js 3.59 kB
|
|
95
101
|
└ css/0a57ee6c7a57788c.css 3.49 kB
|
|
96
102
|
|
|
97
103
|
λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
|
|
2
|
-
> @faststore/core@3.40.
|
|
2
|
+
> @faststore/core@3.40.2 test /home/runner/work/faststore/faststore/packages/core
|
|
3
3
|
> jest
|
|
4
4
|
|
|
5
|
-
PASS test/server/cms/global.test.ts (23.
|
|
6
|
-
PASS test/utils/multipleTemplates.test.ts (
|
|
5
|
+
PASS test/server/cms/global.test.ts (23.861 s)
|
|
6
|
+
PASS test/utils/multipleTemplates.test.ts (25.289 s)
|
|
7
7
|
PASS test/server/cms/index.test.ts
|
|
8
|
-
PASS test/server/index.test.ts (
|
|
8
|
+
PASS test/server/index.test.ts (30.588 s)
|
|
9
9
|
|
|
10
10
|
Test Suites: 4 passed, 4 total
|
|
11
11
|
Tests: 22 passed, 22 total
|
|
12
12
|
Snapshots: 0 total
|
|
13
|
-
Time:
|
|
13
|
+
Time: 31.718 s
|
|
14
14
|
Ran all test suites.
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.41.0](https://github.com/vtex/faststore/compare/v3.40.2...v3.41.0) (2025-04-15)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @faststore/core
|
|
9
|
+
|
|
10
|
+
## [3.40.2](https://github.com/vtex/faststore/compare/v3.40.1...v3.40.2) (2025-04-15)
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- handle invalid requests in `parseRequest` function ([#2790](https://github.com/vtex/faststore/issues/2790)) ([fca3c26](https://github.com/vtex/faststore/commit/fca3c265ecd4d9390775da9d6be014d9b26f40d1))
|
|
15
|
+
|
|
6
16
|
## [3.40.1](https://github.com/vtex/faststore/compare/v3.40.0...v3.40.1) (2025-04-14)
|
|
7
17
|
|
|
8
18
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.41.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": "vtex/faststore",
|
|
6
6
|
"browserslist": "supports es6-module and not dead",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@envelop/graphql-jit": "^8.0.3",
|
|
45
45
|
"@envelop/parser-cache": "^6.0.2",
|
|
46
46
|
"@envelop/validation-cache": "^6.0.2",
|
|
47
|
-
"@faststore/api": "^3.
|
|
47
|
+
"@faststore/api": "^3.41.0",
|
|
48
48
|
"@faststore/components": "^3.38.3",
|
|
49
49
|
"@faststore/graphql-utils": "^3.38.3",
|
|
50
50
|
"@faststore/lighthouse": "^3.38.3",
|
|
@@ -105,5 +105,5 @@
|
|
|
105
105
|
"ts-jest": "29.1.1",
|
|
106
106
|
"typescript": "5.3.2"
|
|
107
107
|
},
|
|
108
|
-
"gitHead": "
|
|
108
|
+
"gitHead": "028265cb2623c0e8de59718e79b6fbd0332abdf9"
|
|
109
109
|
}
|
package/src/pages/api/graphql.ts
CHANGED
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
} from '@faststore/api'
|
|
6
6
|
import type { NextApiHandler, NextApiRequest } from 'next'
|
|
7
7
|
|
|
8
|
-
import { execute } from '../../server'
|
|
9
8
|
import discoveryConfig from 'discovery.config'
|
|
9
|
+
import { execute } from '../../server'
|
|
10
10
|
|
|
11
11
|
const ONE_MINUTE = 60
|
|
12
12
|
|
|
@@ -30,32 +30,38 @@ const replaceSetCookieDomain = (request: NextApiRequest, setCookie: string) => {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
const parseRequest = (request: NextApiRequest) => {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
33
|
+
try {
|
|
34
|
+
const { operationName, operationHash, variables, query } =
|
|
35
|
+
request.method === 'POST'
|
|
36
|
+
? request.body
|
|
37
|
+
: {
|
|
38
|
+
operationName: request.query.operationName,
|
|
39
|
+
operationHash: request.query.operationHash,
|
|
40
|
+
variables: JSON.parse(
|
|
41
|
+
typeof request.query.variables === 'string'
|
|
42
|
+
? request.query.variables
|
|
43
|
+
: ''
|
|
44
|
+
),
|
|
45
|
+
query: undefined,
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return {
|
|
49
|
+
operation: {
|
|
50
|
+
__meta__: {
|
|
51
|
+
operationName,
|
|
52
|
+
operationHash,
|
|
53
|
+
},
|
|
52
54
|
},
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
variables,
|
|
56
|
+
// Do not allow queries in production, only for devMode so we can use graphql tools
|
|
57
|
+
// like introspection etc. In production, we only accept known queries for better
|
|
58
|
+
// security
|
|
59
|
+
query: process.env.NODE_ENV !== 'production' ? query : undefined,
|
|
60
|
+
}
|
|
61
|
+
} catch (error) {
|
|
62
|
+
throw new BadRequestError(
|
|
63
|
+
`Invalid request. Please check the request. ${error}`
|
|
64
|
+
)
|
|
59
65
|
}
|
|
60
66
|
}
|
|
61
67
|
|
|
@@ -66,9 +72,9 @@ const handler: NextApiHandler = async (request, response) => {
|
|
|
66
72
|
return
|
|
67
73
|
}
|
|
68
74
|
|
|
69
|
-
const { operation, variables, query } = parseRequest(request)
|
|
70
|
-
|
|
71
75
|
try {
|
|
76
|
+
const { operation, variables, query } = parseRequest(request)
|
|
77
|
+
|
|
72
78
|
const { data, errors, extensions } = await execute(
|
|
73
79
|
{
|
|
74
80
|
operation,
|
|
File without changes
|
|
File without changes
|