@faststore/core 2.2.45 → 2.2.46
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 +2 -2
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/cache/config.json +3 -3
- package/.next/cache/eslint/.cache_1gneedd +1 -1
- package/.next/cache/next-server.js.nft.json +1 -1
- 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/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +1 -1
- package/.next/routes-manifest.json +1 -1
- package/.next/server/chunks/350.js +56 -92
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.js.nft.json +1 -1
- package/.next/server/pages/500.js.nft.json +1 -1
- package/.next/server/pages/[...slug].js.nft.json +1 -1
- package/.next/server/pages/[slug]/p.js.nft.json +1 -1
- package/.next/server/pages/_app.js.nft.json +1 -1
- package/.next/server/pages/_error.js.nft.json +1 -1
- package/.next/server/pages/account.js.nft.json +1 -1
- package/.next/server/pages/api/graphql.js +61 -92
- package/.next/server/pages/checkout.js.nft.json +1 -1
- package/.next/server/pages/en-US/404.html +2 -2
- package/.next/server/pages/en-US/500.html +2 -2
- package/.next/server/pages/en-US/account.html +2 -2
- package/.next/server/pages/en-US/checkout.html +2 -2
- package/.next/server/pages/en-US/login.html +2 -2
- package/.next/server/pages/en-US/s.html +2 -2
- package/.next/server/pages/en-US.html +2 -2
- package/.next/server/pages/index.js.nft.json +1 -1
- package/.next/server/pages/login.js.nft.json +1 -1
- package/.next/server/pages/s.js.nft.json +1 -1
- package/.next/trace +80 -80
- package/.turbo/turbo-build.log +1 -1
- package/.turbo/turbo-test.log +10 -10
- package/package.json +3 -3
- package/src/pages/api/graphql.ts +4 -0
- package/src/server/index.ts +5 -2
- /package/.next/static/{yZT3-xw6wnppSjWwARSPZ → eV8jrpavA54yphVO28l8z}/_buildManifest.js +0 -0
- /package/.next/static/{yZT3-xw6wnppSjWwARSPZ → eV8jrpavA54yphVO28l8z}/_ssgManifest.js +0 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
$ yarn partytown & yarn generate && next build
|
|
2
|
-
$ faststore generate-graphql -c
|
|
3
2
|
$ partytown copylib ./public/~partytown
|
|
3
|
+
$ faststore generate-graphql -c
|
|
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.
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
$ jest
|
|
2
|
-
PASS test/server/index.test.ts (
|
|
2
|
+
PASS test/server/index.test.ts (21.603 s)
|
|
3
3
|
FastStore GraphQL Layer
|
|
4
4
|
@faststore/api
|
|
5
|
-
✓ should return a valid GraphQL schema (
|
|
6
|
-
✓ should return a valid GraphQL schema contain all expected types (
|
|
5
|
+
✓ should return a valid GraphQL schema (6 ms)
|
|
6
|
+
✓ should return a valid GraphQL schema contain all expected types (4 ms)
|
|
7
7
|
✓ should return a valid GraphQL schema contain all expected queries (1 ms)
|
|
8
|
-
✓ should return a valid GraphQL schema contain all expected mutations
|
|
8
|
+
✓ should return a valid GraphQL schema contain all expected mutations (1 ms)
|
|
9
9
|
VTEX API Extension
|
|
10
|
-
✓ getTypeDefsFromFolder function should return an Array (
|
|
10
|
+
✓ getTypeDefsFromFolder function should return an Array (6 ms)
|
|
11
11
|
Third Party API Extension
|
|
12
|
-
✓ getTypeDefsFromFolder function should return an Array (
|
|
12
|
+
✓ getTypeDefsFromFolder function should return an Array (4 ms)
|
|
13
13
|
Final Schema after merging
|
|
14
|
-
✓ should return a valid merged GraphQL schema (
|
|
14
|
+
✓ should return a valid merged GraphQL schema (24 ms)
|
|
15
15
|
Envelop
|
|
16
|
-
✓ should exist with its plugins (
|
|
17
|
-
✓ should handle options and execute (
|
|
16
|
+
✓ should exist with its plugins (28 ms)
|
|
17
|
+
✓ should handle options and execute (172 ms)
|
|
18
18
|
|
|
19
19
|
Test Suites: 1 passed, 1 total
|
|
20
20
|
Tests: 9 passed, 9 total
|
|
21
21
|
Snapshots: 0 total
|
|
22
|
-
Time:
|
|
22
|
+
Time: 21.683 s
|
|
23
23
|
Ran all test suites.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/core",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.46",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": "vtex/faststore",
|
|
6
6
|
"browserslist": "supports es6-module and not dead",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@envelop/graphql-jit": "^1.1.1",
|
|
38
38
|
"@envelop/parser-cache": "^2.2.0",
|
|
39
39
|
"@envelop/validation-cache": "^2.2.0",
|
|
40
|
-
"@faststore/api": "^2.2.
|
|
40
|
+
"@faststore/api": "^2.2.46",
|
|
41
41
|
"@faststore/components": "^2.2.45",
|
|
42
42
|
"@faststore/graphql-utils": "^2.2.45",
|
|
43
43
|
"@faststore/sdk": "^2.2.45",
|
|
@@ -123,5 +123,5 @@
|
|
|
123
123
|
"node": "18.19.0",
|
|
124
124
|
"yarn": "1.19.1"
|
|
125
125
|
},
|
|
126
|
-
"gitHead": "
|
|
126
|
+
"gitHead": "6534c30736a1914a98ba41e892504bfd2b5ebc44"
|
|
127
127
|
}
|
package/src/pages/api/graphql.ts
CHANGED
|
@@ -59,6 +59,10 @@ const handler: NextApiHandler = async (request, response) => {
|
|
|
59
59
|
? stringifyCacheControl(extensions.cacheControl)
|
|
60
60
|
: 'no-cache, no-store'
|
|
61
61
|
|
|
62
|
+
if (extensions.cookies.size > 0 && !hasErrors) {
|
|
63
|
+
response.setHeader('set-cookie', Array.from(extensions.cookies))
|
|
64
|
+
}
|
|
65
|
+
|
|
62
66
|
response.setHeader('cache-control', cacheControl)
|
|
63
67
|
response.setHeader('content-type', 'application/json')
|
|
64
68
|
response.send(JSON.stringify({ data, errors }))
|
package/src/server/index.ts
CHANGED
|
@@ -84,7 +84,7 @@ export const execute = async <V extends Maybe<{ [key: string]: unknown }>, D>(
|
|
|
84
84
|
): Promise<{
|
|
85
85
|
data: D
|
|
86
86
|
errors: unknown[]
|
|
87
|
-
extensions: { cacheControl?: CacheControl }
|
|
87
|
+
extensions: { cacheControl?: CacheControl; cookies: Set<string> | null }
|
|
88
88
|
}> => {
|
|
89
89
|
const { operationName, variables, query: maybeQuery } = options
|
|
90
90
|
const query = maybeQuery ?? persistedQueries.get(operationName)
|
|
@@ -114,6 +114,9 @@ export const execute = async <V extends Maybe<{ [key: string]: unknown }>, D>(
|
|
|
114
114
|
return {
|
|
115
115
|
data,
|
|
116
116
|
errors,
|
|
117
|
-
extensions: {
|
|
117
|
+
extensions: {
|
|
118
|
+
cookies: contextValue.storage.cookies,
|
|
119
|
+
cacheControl: contextValue.cacheControl,
|
|
120
|
+
},
|
|
118
121
|
}
|
|
119
122
|
}
|
|
File without changes
|
|
File without changes
|