@faststore/core 3.88.0 → 3.88.2
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 +23 -23
- 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/9563.js +2 -2
- package/.next/server/chunks/9630.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 +2 -2
- package/.next/server/pages/en-US/404.html +1 -1
- package/.next/server/pages/en-US/500.html +1 -1
- package/.next/server/pages/en-US/checkout.html +1 -1
- package/.next/server/pages/en-US/login.html +1 -1
- package/.next/server/pages/en-US/s.html +1 -1
- package/.next/server/pages/en-US.html +1 -1
- package/.next/server/pages/pvt/account/orders/[id].js +1 -1
- package/.next/server/pages/pvt/account/orders.js +1 -1
- package/.next/server/pages/pvt/account/profile.js +1 -1
- package/.next/server/pages/pvt/account/security.js +1 -1
- package/.next/server/pages/pvt/account/user-details.js +1 -1
- package/.next/server/pages-manifest.json +1 -1
- package/.next/static/{JaRUyeLgqhw17hCxdW6B5 → 3hMkgoLg2nujbpkfnZNzT}/_buildManifest.js +1 -1
- package/.next/static/chunks/{2500.02f018a354c612fb.js → 2500.f0f7666c380f9501.js} +1 -1
- package/.next/static/chunks/{webpack-50869061879531a0.js → webpack-94be4e4289ec1a5e.js} +1 -1
- package/.next/static/css/fe0bcc13a2b68605.css +1 -0
- package/.next/trace +137 -137
- package/.turbo/turbo-build.log +8 -8
- package/.turbo/turbo-test.log +5 -5
- package/CHANGELOG.md +10 -0
- package/package.json +3 -3
- package/src/pages/pvt/account/orders/[id].tsx +2 -1
- package/src/pages/pvt/account/orders/index.tsx +3 -1
- package/src/pages/pvt/account/profile.tsx +3 -1
- package/src/pages/pvt/account/security.tsx +2 -1
- package/src/pages/pvt/account/user-details.tsx +3 -1
- package/src/utils/utilities.ts +8 -4
- package/.next/static/css/f63d693715093ed1.css +0 -1
- /package/.next/static/{JaRUyeLgqhw17hCxdW6B5 → 3hMkgoLg2nujbpkfnZNzT}/_ssgManifest.js +0 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
|
|
2
|
-
> @faststore/core@3.
|
|
2
|
+
> @faststore/core@3.88.1 prebuild /home/runner/work/faststore/faststore/packages/core
|
|
3
3
|
> na run partytown && na run generate
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @faststore/core@3.
|
|
6
|
+
> @faststore/core@3.88.1 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.
|
|
11
|
+
> @faststore/core@3.88.1 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.
|
|
15
|
+
> @faststore/core@3.88.1 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.
|
|
20
|
+
> @faststore/core@3.88.1 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
|
+
> @faststore/core@3.88.1 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.
|
|
44
|
+
> @faststore/core@3.88.1 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
|
|
@@ -109,7 +109,7 @@ Route (pages) Size First Load JS
|
|
|
109
109
|
├ chunks/framework-d514426edf885c68.js 45.4 kB
|
|
110
110
|
├ chunks/main-595f5e3b626b9fff.js 33.2 kB
|
|
111
111
|
├ chunks/pages/_app-8b7d8e9c9021b0cf.js 25 kB
|
|
112
|
-
├ chunks/webpack-
|
|
112
|
+
├ chunks/webpack-94be4e4289ec1a5e.js 3.85 kB
|
|
113
113
|
└ css/24a5e8f6808266fe.css 3.53 kB
|
|
114
114
|
|
|
115
115
|
λ (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.
|
|
2
|
+
> @faststore/core@3.88.1 test /home/runner/work/faststore/faststore/packages/core
|
|
3
3
|
> jest
|
|
4
4
|
|
|
5
|
-
PASS test/
|
|
6
|
-
PASS test/
|
|
5
|
+
PASS test/utils/multipleTemplates.test.ts (26.468 s)
|
|
6
|
+
PASS test/server/cms/global.test.ts (27.028 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.277 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.437 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.88.2](https://github.com/vtex/faststore/compare/v3.88.1...v3.88.2) (2025-09-19)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- improve error handling in user order query - SFS-2866 ([#3043](https://github.com/vtex/faststore/issues/3043)) ([efb9c08](https://github.com/vtex/faststore/commit/efb9c08a805e0ba9e5d49823b09be475ee1eee04))
|
|
11
|
+
|
|
12
|
+
## [3.88.1](https://github.com/vtex/faststore/compare/v3.88.0...v3.88.1) (2025-09-19)
|
|
13
|
+
|
|
14
|
+
**Note:** Version bump only for package @faststore/core
|
|
15
|
+
|
|
6
16
|
# [3.88.0](https://github.com/vtex/faststore/compare/v3.87.0...v3.88.0) (2025-09-18)
|
|
7
17
|
|
|
8
18
|
### Features
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/core",
|
|
3
|
-
"version": "3.88.
|
|
3
|
+
"version": "3.88.2",
|
|
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.88.2",
|
|
48
48
|
"@faststore/graphql-utils": "^3.81.0",
|
|
49
49
|
"@faststore/lighthouse": "^3.81.0",
|
|
50
50
|
"@faststore/sdk": "^3.85.0",
|
|
@@ -116,5 +116,5 @@
|
|
|
116
116
|
"ts-jest": "29.1.1",
|
|
117
117
|
"typescript": "5.3.2"
|
|
118
118
|
},
|
|
119
|
-
"gitHead": "
|
|
119
|
+
"gitHead": "c1fb778f2a06980df039b1b85ce6e94328addd53"
|
|
120
120
|
}
|
|
@@ -15,6 +15,7 @@ import type {
|
|
|
15
15
|
ServerOrderDetailsQueryQuery,
|
|
16
16
|
ServerOrderDetailsQueryQueryVariables,
|
|
17
17
|
} from '@generated/graphql'
|
|
18
|
+
import storeConfig from 'discovery.config'
|
|
18
19
|
import { getGlobalSectionsData } from 'src/components/cms/GlobalSections'
|
|
19
20
|
import { default as AfterSection } from 'src/customizations/src/myAccount/extensions/orders/[id]/after'
|
|
20
21
|
import { default as BeforeSection } from 'src/customizations/src/myAccount/extensions/orders/[id]/before'
|
|
@@ -24,7 +25,6 @@ import { execute } from 'src/server'
|
|
|
24
25
|
import { injectGlobalSections } from 'src/server/cms/global'
|
|
25
26
|
import { getMyAccountRedirect } from 'src/utils/myAccountRedirect'
|
|
26
27
|
import { extractStatusFromError } from 'src/utils/utilities'
|
|
27
|
-
import storeConfig from 'discovery.config'
|
|
28
28
|
|
|
29
29
|
const COMPONENTS: Record<string, ComponentType<any>> = {
|
|
30
30
|
...GLOBAL_COMPONENTS,
|
|
@@ -323,6 +323,7 @@ export const getServerSideProps: GetServerSideProps<
|
|
|
323
323
|
])
|
|
324
324
|
|
|
325
325
|
if (orderDetails.errors) {
|
|
326
|
+
console.error(...orderDetails.errors)
|
|
326
327
|
const status = extractStatusFromError(orderDetails.errors?.[0])
|
|
327
328
|
|
|
328
329
|
const isForbidden = status === 403 || status === 401
|
|
@@ -22,12 +22,12 @@ import { injectGlobalSections } from 'src/server/cms/global'
|
|
|
22
22
|
import { getMyAccountRedirect } from 'src/utils/myAccountRedirect'
|
|
23
23
|
import { groupOrderStatusByLabel } from 'src/utils/userOrderStatus'
|
|
24
24
|
|
|
25
|
+
import storeConfig from 'discovery.config'
|
|
25
26
|
import { MyAccountListOrders } from 'src/components/account/orders/MyAccountListOrders'
|
|
26
27
|
import { getIsRepresentative } from 'src/sdk/account/getIsRepresentative'
|
|
27
28
|
import { validateUser } from 'src/sdk/account/validateUser'
|
|
28
29
|
import PageProvider from 'src/sdk/overrides/PageProvider'
|
|
29
30
|
import { extractStatusFromError } from 'src/utils/utilities'
|
|
30
|
-
import storeConfig from 'discovery.config'
|
|
31
31
|
|
|
32
32
|
/* A list of components that can be used in the CMS. */
|
|
33
33
|
const COMPONENTS: Record<string, ComponentType<any>> = {
|
|
@@ -220,6 +220,8 @@ export const getServerSideProps: GetServerSideProps<
|
|
|
220
220
|
])
|
|
221
221
|
|
|
222
222
|
if (listOrders.errors) {
|
|
223
|
+
console.error(...listOrders.errors)
|
|
224
|
+
|
|
223
225
|
const status = extractStatusFromError(listOrders.errors[0])
|
|
224
226
|
const isForbidden = status === 403 || status === 401
|
|
225
227
|
|
|
@@ -26,9 +26,9 @@ import { validateUser } from 'src/sdk/account/validateUser'
|
|
|
26
26
|
import { injectGlobalSections } from 'src/server/cms/global'
|
|
27
27
|
import { getMyAccountRedirect } from 'src/utils/myAccountRedirect'
|
|
28
28
|
|
|
29
|
+
import storeConfig from 'discovery.config'
|
|
29
30
|
import PageProvider from 'src/sdk/overrides/PageProvider'
|
|
30
31
|
import { execute } from 'src/server'
|
|
31
|
-
import storeConfig from 'discovery.config'
|
|
32
32
|
|
|
33
33
|
/* A list of components that can be used in the CMS. */
|
|
34
34
|
const COMPONENTS: Record<string, ComponentType<any>> = {
|
|
@@ -132,6 +132,8 @@ export const getServerSideProps: GetServerSideProps<
|
|
|
132
132
|
])
|
|
133
133
|
|
|
134
134
|
if (profile.errors) {
|
|
135
|
+
console.error(...profile.errors)
|
|
136
|
+
|
|
135
137
|
const statusCode: number = (profile.errors[0] as any)?.extensions?.status
|
|
136
138
|
const destination: string =
|
|
137
139
|
statusCode === 403 ? '/pvt/account/403' : '/pvt/account/404'
|
|
@@ -29,8 +29,8 @@ import { getMyAccountRedirect } from 'src/utils/myAccountRedirect'
|
|
|
29
29
|
import { validateUser } from 'src/sdk/account/validateUser'
|
|
30
30
|
import PageProvider from 'src/sdk/overrides/PageProvider'
|
|
31
31
|
|
|
32
|
-
import { SecuritySection } from 'src/components/account/security'
|
|
33
32
|
import storeConfig from 'discovery.config'
|
|
33
|
+
import { SecuritySection } from 'src/components/account/security'
|
|
34
34
|
|
|
35
35
|
/* A list of components that can be used in the CMS. */
|
|
36
36
|
const COMPONENTS: Record<string, ComponentType<any>> = {
|
|
@@ -129,6 +129,7 @@ export const getServerSideProps: GetServerSideProps<
|
|
|
129
129
|
])
|
|
130
130
|
|
|
131
131
|
if (security.errors) {
|
|
132
|
+
console.error(...security.errors)
|
|
132
133
|
const statusCode: number = (security.errors[0] as any)?.extensions?.status
|
|
133
134
|
const destination: string =
|
|
134
135
|
statusCode === 403 ? '/pvt/account/403' : '/pvt/account/404'
|
|
@@ -15,6 +15,7 @@ import type {
|
|
|
15
15
|
ServerUserDetailsQueryQuery,
|
|
16
16
|
ServerUserDetailsQueryQueryVariables,
|
|
17
17
|
} from '@generated/graphql'
|
|
18
|
+
import storeConfig from 'discovery.config'
|
|
18
19
|
import MyAccountUserDetails from 'src/components/account/MyAccountUserDetails/MyAccountUserDetails'
|
|
19
20
|
import { default as AfterSection } from 'src/customizations/src/myAccount/extensions/user-details/after'
|
|
20
21
|
import { default as BeforeSection } from 'src/customizations/src/myAccount/extensions/user-details/before'
|
|
@@ -25,7 +26,6 @@ import PageProvider from 'src/sdk/overrides/PageProvider'
|
|
|
25
26
|
import { execute } from 'src/server'
|
|
26
27
|
import { injectGlobalSections } from 'src/server/cms/global'
|
|
27
28
|
import { getMyAccountRedirect } from 'src/utils/myAccountRedirect'
|
|
28
|
-
import storeConfig from 'discovery.config'
|
|
29
29
|
|
|
30
30
|
/* A list of components that can be used in the CMS. */
|
|
31
31
|
const COMPONENTS: Record<string, ComponentType<any>> = {
|
|
@@ -147,6 +147,8 @@ export const getServerSideProps: GetServerSideProps<
|
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
if (userDetails?.errors) {
|
|
150
|
+
console.error(...userDetails.errors)
|
|
151
|
+
|
|
150
152
|
const statusCode: number = (userDetails.errors[0] as any)?.extensions
|
|
151
153
|
?.status
|
|
152
154
|
const destination: string =
|
package/src/utils/utilities.ts
CHANGED
|
@@ -53,13 +53,17 @@ export function camelCaseToTitle(str: string): string {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
export function extractStatusFromError(error: any): number | undefined {
|
|
56
|
+
if (error?.extensions?.status) {
|
|
57
|
+
return error.extensions.status
|
|
58
|
+
}
|
|
59
|
+
|
|
56
60
|
if (!error?.message) return undefined
|
|
57
61
|
|
|
58
|
-
const
|
|
59
|
-
if (!
|
|
62
|
+
const matchMessage = error.message.match(/{.*}$/)
|
|
63
|
+
if (!matchMessage) return undefined
|
|
60
64
|
|
|
61
65
|
try {
|
|
62
|
-
const parsed = JSON.parse(
|
|
66
|
+
const parsed = JSON.parse(matchMessage[0])
|
|
63
67
|
|
|
64
68
|
if (parsed.status) {
|
|
65
69
|
return parsed.status
|
|
@@ -70,7 +74,7 @@ export function extractStatusFromError(error: any): number | undefined {
|
|
|
70
74
|
return inner.status
|
|
71
75
|
}
|
|
72
76
|
} catch {
|
|
73
|
-
console.error('Failed to parse error message:',
|
|
77
|
+
console.error('Failed to parse error message:', matchMessage[0])
|
|
74
78
|
}
|
|
75
79
|
|
|
76
80
|
return undefined
|