@faststore/core 3.99.0-dev.4 → 3.99.0-dev.5
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 +10 -10
- package/.turbo/turbo-test.log +8 -7
- package/CHANGELOG.md +6 -0
- 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 → T_jYtdcAXYxkLOxLasDa4}/_buildManifest.js +0 -0
- /package/.next/static/{ezu8OJFco4zOT-ZPSNxeP → T_jYtdcAXYxkLOxLasDa4}/_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.4 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.4 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.4 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.4 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.4 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.4 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.4 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
|
|
@@ -59,8 +59,8 @@ https://nextjs.org/telemetry
|
|
|
59
59
|
Collecting page data ...
|
|
60
60
|
Generating static pages (0/6) ...
|
|
61
61
|
|
|
62
62
|
Generating static pages (1/6)
|
|
63
|
-
|
|
64
63
|
Generating static pages (2/6)
|
|
65
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
|
+
|
|
66
66
|
Generating static pages (2/6)
|
|
67
67
|
|
|
68
68
|
Generating static pages (4/6)
|
|
69
69
|
|
|
70
70
|
✓ Generating static pages (6/6)
|
|
71
71
|
Finalizing page optimization ...
|
|
@@ -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,18 @@
|
|
|
1
1
|
|
|
2
|
-
> @faststore/core@3.99.0-dev.
|
|
2
|
+
> @faststore/core@3.99.0-dev.4 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 (11.101 s)
|
|
6
|
+
PASS test/utils/clearCookies.test.ts (10.671 s)
|
|
8
7
|
PASS test/server/cms/global.test.ts
|
|
8
|
+
PASS test/utils/cookieCacheBusting.test.ts (14.531 s)
|
|
9
9
|
PASS test/utils/validateSessionRefreshToken.test.ts
|
|
10
|
-
PASS test/server/cms/index.test.ts (
|
|
11
|
-
PASS test/server/index.test.ts (12.
|
|
10
|
+
PASS test/server/cms/index.test.ts (6.215 s)
|
|
11
|
+
PASS test/server/index.test.ts (12.984 s)
|
|
12
|
+
A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --detectOpenHandles to find leaks. Active timers can also cause this, ensure that .unref() was called on them.
|
|
12
13
|
|
|
13
14
|
Test Suites: 7 passed, 7 total
|
|
14
15
|
Tests: 58 passed, 58 total
|
|
15
16
|
Snapshots: 0 total
|
|
16
|
-
Time:
|
|
17
|
+
Time: 25.438 s
|
|
17
18
|
Ran all test suites.
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
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.5 (2026-05-04)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- 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))
|
|
11
|
+
|
|
6
12
|
# 3.99.0-dev.4 (2026-04-28)
|
|
7
13
|
|
|
8
14
|
### Bug Fixes
|
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.5",
|
|
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.5",
|
|
55
|
+
"@faststore/graphql-utils": "^3.99.0-dev.5",
|
|
56
|
+
"@faststore/lighthouse": "3.99.0-dev.5",
|
|
57
|
+
"@faststore/sdk": "3.99.0-dev.5",
|
|
58
|
+
"@faststore/ui": "3.99.0-dev.5",
|
|
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": "aae7a4fc1fe2b819b410d400f8b2ea70fedcdcfe"
|
|
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
|