@faststore/core 3.99.0-dev.4 → 3.99.0-dev.6
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 +3 -3
- 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/routes-manifest.json +1 -1
- package/.next/server/chunks/1741.js +1 -1
- package/.next/server/chunks/8971.js +1 -1
- package/.next/server/functions-config-manifest.json +1 -1
- package/.next/server/middleware-build-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/500.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-manifest.json +1 -1
- package/.next/static/chunks/pages/{_app-87b58cddac61876b.js → _app-ec4b3e60344d1bab.js} +1 -1
- package/.next/trace +143 -143
- package/.turbo/turbo-build.log +9 -9
- package/.turbo/turbo-test.log +7 -7
- package/CHANGELOG.md +12 -0
- package/cms/faststore/base.jsonc +2 -11
- package/cms/faststore/schema.json +2 -11
- package/package.json +7 -7
- package/src/pages/api/graphql.ts +4 -0
- package/src/sdk/session/index.ts +10 -1
- /package/.next/static/{ezu8OJFco4zOT-ZPSNxeP → E6vDVpmPbHZyXs0FMUMNj}/_buildManifest.js +0 -0
- /package/.next/static/{ezu8OJFco4zOT-ZPSNxeP → E6vDVpmPbHZyXs0FMUMNj}/_ssgManifest.js +0 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
|
|
2
|
-
> @faststore/core@3.99.0-dev.
|
|
2
|
+
> @faststore/core@3.99.0-dev.5 prebuild /home/runner/work/faststore/faststore/packages/core
|
|
3
3
|
> na run partytown && na run generate
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @faststore/core@3.99.0-dev.
|
|
6
|
+
> @faststore/core@3.99.0-dev.5 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.99.0-dev.
|
|
11
|
+
> @faststore/core@3.99.0-dev.5 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.99.0-dev.
|
|
15
|
+
> @faststore/core@3.99.0-dev.5 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.99.0-dev.
|
|
20
|
+
> @faststore/core@3.99.0-dev.5 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.99.0-dev.
|
|
40
|
+
> @faststore/core@3.99.0-dev.5 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.99.0-dev.
|
|
44
|
+
> @faststore/core@3.99.0-dev.5 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
|
|
@@ -71,7 +71,7 @@ Route (pages) Size First Load JS
|
|
|
71
71
|
├ └ css/02259c549b2179f2.css 3.1 kB
|
|
72
72
|
├ /_app 0 B 109 kB
|
|
73
73
|
├ ● /[...slug] 2.55 kB 175 kB
|
|
74
|
-
├ ● /[slug]/p 97.3 kB
|
|
74
|
+
├ ● /[slug]/p 97.3 kB 256 kB
|
|
75
75
|
├ ├ css/e68c313e4ce2fd1b.css 6.34 kB
|
|
76
76
|
├ └ css/9b4c21dcd3bc4a17.css 16.7 kB
|
|
77
77
|
├ ○ /404 1.58 kB 160 kB
|
|
@@ -103,7 +103,7 @@ Route (pages) Size First Load JS
|
|
|
103
103
|
+ First Load JS shared by all 118 kB
|
|
104
104
|
├ chunks/framework-d514426edf885c68.js 45.4 kB
|
|
105
105
|
├ chunks/main-edeb2c6a5c48bb3f.js 33.2 kB
|
|
106
|
-
├ chunks/pages/_app-
|
|
106
|
+
├ chunks/pages/_app-ec4b3e60344d1bab.js 26.6 kB
|
|
107
107
|
├ chunks/webpack-da79ff7bed51ca28.js 3.88 kB
|
|
108
108
|
└ css/8a513f4b536b0ab0.css 9.18 kB
|
|
109
109
|
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
|
|
2
|
-
> @faststore/core@3.99.0-dev.
|
|
2
|
+
> @faststore/core@3.99.0-dev.5 test /home/runner/work/faststore/faststore/packages/core
|
|
3
3
|
> jest
|
|
4
4
|
|
|
5
|
-
PASS test/utils/multipleTemplates.test.ts (
|
|
6
|
-
PASS test/utils/clearCookies.test.ts (
|
|
7
|
-
PASS test/utils/cookieCacheBusting.test.ts (15.41 s)
|
|
5
|
+
PASS test/utils/multipleTemplates.test.ts (12.521 s)
|
|
6
|
+
PASS test/utils/clearCookies.test.ts (11.582 s)
|
|
8
7
|
PASS test/server/cms/global.test.ts
|
|
8
|
+
PASS test/utils/cookieCacheBusting.test.ts (14.543 s)
|
|
9
9
|
PASS test/utils/validateSessionRefreshToken.test.ts
|
|
10
|
-
PASS test/server/cms/index.test.ts (5.
|
|
11
|
-
PASS test/server/index.test.ts (
|
|
10
|
+
PASS test/server/cms/index.test.ts (5.661 s)
|
|
11
|
+
PASS test/server/index.test.ts (13.021 s)
|
|
12
12
|
|
|
13
13
|
Test Suites: 7 passed, 7 total
|
|
14
14
|
Tests: 58 passed, 58 total
|
|
15
15
|
Snapshots: 0 total
|
|
16
|
-
Time:
|
|
16
|
+
Time: 26.826 s
|
|
17
17
|
Ran all test suites.
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
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.99.0-dev.6 (2026-05-04)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- Base CMS schema ([#3290](https://github.com/vtex/faststore/issues/3290)) ([3455e89](https://github.com/vtex/faststore/commit/3455e89295e197f4bd18c0b5f84d7b01c0d67009))
|
|
11
|
+
|
|
12
|
+
# 3.99.0-dev.5 (2026-05-04)
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
- Enhance session validation logic to skip token refresh in local … ([#3285](https://github.com/vtex/faststore/issues/3285)) ([41a330a](https://github.com/vtex/faststore/commit/41a330a9704a29369141e6e78b1f6d01e5a2e1a5))
|
|
17
|
+
|
|
6
18
|
# 3.99.0-dev.4 (2026-04-28)
|
|
7
19
|
|
|
8
20
|
### Bug Fixes
|
package/cms/faststore/base.jsonc
CHANGED
|
@@ -12,17 +12,8 @@
|
|
|
12
12
|
// Every component schema must extend this base schema.
|
|
13
13
|
"base-component": {
|
|
14
14
|
"type": "object",
|
|
15
|
-
"required": [
|
|
16
|
-
"properties": {
|
|
17
|
-
"$componentKey": {
|
|
18
|
-
"type": "string",
|
|
19
|
-
"description": "Unique identifier for the component"
|
|
20
|
-
},
|
|
21
|
-
"$componentTitle": {
|
|
22
|
-
"type": "string",
|
|
23
|
-
"description": "Display title for the component"
|
|
24
|
-
}
|
|
25
|
-
}
|
|
15
|
+
"required": [],
|
|
16
|
+
"properties": {}
|
|
26
17
|
},
|
|
27
18
|
"base-page-template": {
|
|
28
19
|
"type": "object",
|
|
@@ -3804,17 +3804,8 @@
|
|
|
3804
3804
|
"$defs": {
|
|
3805
3805
|
"base-component": {
|
|
3806
3806
|
"type": "object",
|
|
3807
|
-
"required": [
|
|
3808
|
-
"properties": {
|
|
3809
|
-
"$componentKey": {
|
|
3810
|
-
"type": "string",
|
|
3811
|
-
"description": "Unique identifier for the component"
|
|
3812
|
-
},
|
|
3813
|
-
"$componentTitle": {
|
|
3814
|
-
"type": "string",
|
|
3815
|
-
"description": "Display title for the component"
|
|
3816
|
-
}
|
|
3817
|
-
}
|
|
3807
|
+
"required": [],
|
|
3808
|
+
"properties": {}
|
|
3818
3809
|
},
|
|
3819
3810
|
"base-page-template": {
|
|
3820
3811
|
"type": "object",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/core",
|
|
3
|
-
"version": "3.99.0-dev.
|
|
3
|
+
"version": "3.99.0-dev.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -51,11 +51,11 @@
|
|
|
51
51
|
"@envelop/graphql-jit": "^8.0.3",
|
|
52
52
|
"@envelop/parser-cache": "^6.0.2",
|
|
53
53
|
"@envelop/validation-cache": "^6.0.2",
|
|
54
|
-
"@faststore/api": "3.99.0-dev.
|
|
55
|
-
"@faststore/graphql-utils": "^3.99.0-dev.
|
|
56
|
-
"@faststore/lighthouse": "3.99.0-dev.
|
|
57
|
-
"@faststore/sdk": "3.99.0-dev.
|
|
58
|
-
"@faststore/ui": "3.99.0-dev.
|
|
54
|
+
"@faststore/api": "3.99.0-dev.6",
|
|
55
|
+
"@faststore/graphql-utils": "^3.99.0-dev.6",
|
|
56
|
+
"@faststore/lighthouse": "3.99.0-dev.6",
|
|
57
|
+
"@faststore/sdk": "3.99.0-dev.6",
|
|
58
|
+
"@faststore/ui": "3.99.0-dev.6",
|
|
59
59
|
"@graphql-codegen/cli": "5.0.2",
|
|
60
60
|
"@graphql-codegen/client-preset": "4.2.6",
|
|
61
61
|
"@graphql-codegen/typescript": "4.0.7",
|
|
@@ -124,5 +124,5 @@
|
|
|
124
124
|
"ts-jest": "29.1.1",
|
|
125
125
|
"typescript": "5.3.2"
|
|
126
126
|
},
|
|
127
|
-
"gitHead": "
|
|
127
|
+
"gitHead": "652dbb0b7ebed2aef72e772287f9f0525142ad0c"
|
|
128
128
|
}
|
package/src/pages/api/graphql.ts
CHANGED
|
@@ -161,7 +161,11 @@ const handler: NextApiHandler = async (request, response) => {
|
|
|
161
161
|
// value is used to cache bust the request if there is a VtexIdclientAutCookie
|
|
162
162
|
const { operation, variables, query, v: value } = parseRequest(request)
|
|
163
163
|
|
|
164
|
+
const hostname = request.headers.host?.split(':')[0]
|
|
165
|
+
const isLocal = hostname === 'localhost' || hostname === '127.0.0.1'
|
|
166
|
+
|
|
164
167
|
if (
|
|
168
|
+
!isLocal &&
|
|
165
169
|
operation.__meta__.operationName === 'ValidateSession' &&
|
|
166
170
|
discoveryConfig.experimental?.refreshToken
|
|
167
171
|
) {
|
package/src/sdk/session/index.ts
CHANGED
|
@@ -19,6 +19,11 @@ import { createValidationStore, useStore } from '../useStore'
|
|
|
19
19
|
import { getPostalCode } from '../userLocation/index'
|
|
20
20
|
import { RELOAD_AFTER_LOGOUT_KEY, SESSION_READY_KEY } from './storageKeys'
|
|
21
21
|
|
|
22
|
+
const isLocalEnvironment = (): boolean =>
|
|
23
|
+
typeof window !== 'undefined' &&
|
|
24
|
+
(window.location.hostname === 'localhost' ||
|
|
25
|
+
window.location.hostname === '127.0.0.1')
|
|
26
|
+
|
|
22
27
|
const isReloadAfterLogoutPending = (): boolean => {
|
|
23
28
|
try {
|
|
24
29
|
return (
|
|
@@ -120,7 +125,9 @@ export const validateSession = async (session: Session) => {
|
|
|
120
125
|
// If the refreshToken is enabled and the refreshAfter is expired, refresh the token.
|
|
121
126
|
// On success, continue to the validation flow with the refreshed session.
|
|
122
127
|
// On failure (logoutAndClearSession already triggered), bail out.
|
|
128
|
+
// Skipped in local environments where the refresh token infrastructure is unavailable.
|
|
123
129
|
if (
|
|
130
|
+
!isLocalEnvironment() &&
|
|
124
131
|
storeConfig.experimental?.refreshToken &&
|
|
125
132
|
isRefreshAfterExpired(session)
|
|
126
133
|
) {
|
|
@@ -173,7 +180,9 @@ export const validateSession = async (session: Session) => {
|
|
|
173
180
|
return data.validateSession
|
|
174
181
|
} catch (error) {
|
|
175
182
|
const shouldRefreshToken =
|
|
176
|
-
|
|
183
|
+
!isLocalEnvironment() &&
|
|
184
|
+
error?.status === 401 &&
|
|
185
|
+
storeConfig.experimental?.refreshToken
|
|
177
186
|
|
|
178
187
|
if (shouldRefreshToken) {
|
|
179
188
|
const refreshed = await handleRefreshToken(session)
|
|
File without changes
|
|
File without changes
|