@faststore/core 2.2.45 → 2.2.47
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 +11 -11
- 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/chunks/74.js +7 -12
- 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 +3 -3
- 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/static/{yZT3-xw6wnppSjWwARSPZ → C1Stv9_fCj_6TDRi78GGL}/_buildManifest.js +1 -1
- package/.next/static/chunks/{469-7259b855711d4ad3.js → 469-1925f9bd1c82e92b.js} +1 -1
- package/.next/trace +80 -80
- package/.turbo/turbo-test.log +8 -8
- package/package.json +3 -3
- package/src/components/ui/Button/ButtonSignIn/ButtonSignIn.tsx +1 -5
- package/src/pages/api/graphql.ts +4 -0
- package/src/server/index.ts +5 -2
- /package/.next/static/{yZT3-xw6wnppSjWwARSPZ → C1Stv9_fCj_6TDRi78GGL}/_ssgManifest.js +0 -0
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.547 s)
|
|
3
3
|
FastStore GraphQL Layer
|
|
4
4
|
@faststore/api
|
|
5
|
-
✓ should return a valid GraphQL schema (
|
|
5
|
+
✓ should return a valid GraphQL schema (11 ms)
|
|
6
6
|
✓ should return a valid GraphQL schema contain all expected types (11 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 (10 ms)
|
|
11
11
|
Third Party API Extension
|
|
12
|
-
✓ getTypeDefsFromFolder function should return an Array (
|
|
12
|
+
✓ getTypeDefsFromFolder function should return an Array (7 ms)
|
|
13
13
|
Final Schema after merging
|
|
14
14
|
✓ should return a valid merged GraphQL schema (56 ms)
|
|
15
15
|
Envelop
|
|
16
|
-
✓ should exist with its plugins (
|
|
17
|
-
✓ should handle options and execute (
|
|
16
|
+
✓ should exist with its plugins (131 ms)
|
|
17
|
+
✓ should handle options and execute (205 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.665 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.47",
|
|
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": "377bbc395c4af2ee501250ce6da57c5cf2b23ce0"
|
|
127
127
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Icon, LinkButton } from '@faststore/ui'
|
|
2
2
|
|
|
3
3
|
import { useSession } from 'src/sdk/session'
|
|
4
|
-
import { useCart } from '../../../../sdk/cart/index'
|
|
5
4
|
|
|
6
5
|
const ButtonSignIn = ({
|
|
7
6
|
label,
|
|
@@ -12,15 +11,12 @@ const ButtonSignIn = ({
|
|
|
12
11
|
myAccountLabel: string
|
|
13
12
|
icon: { alt: string; icon: string }
|
|
14
13
|
}) => {
|
|
15
|
-
const { id } = useCart()
|
|
16
14
|
const { person } = useSession()
|
|
17
15
|
|
|
18
16
|
return (
|
|
19
17
|
<LinkButton
|
|
20
18
|
data-fs-button-signin-link
|
|
21
|
-
href={
|
|
22
|
-
person?.id ? `/account?orderFormId=${id}` : `/login?orderFormId=${id}`
|
|
23
|
-
}
|
|
19
|
+
href={person?.id ? `/account` : `/login`}
|
|
24
20
|
className="text__title-mini"
|
|
25
21
|
aria-label={alt}
|
|
26
22
|
variant="tertiary"
|
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
|