@faststore/core 3.0.12 → 3.0.13
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/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-minimal-server.js.nft.json +1 -1
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.js +1 -1
- package/.next/prerender-manifest.json +1 -1
- package/.next/routes-manifest.json +1 -1
- package/.next/server/functions-config-manifest.json +1 -1
- package/.next/server/middleware-build-manifest.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/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/en-US.json +1 -1
- package/.next/server/pages-manifest.json +1 -1
- package/.next/trace +91 -91
- package/.turbo/turbo-build.log +3 -1
- package/.turbo/turbo-test.log +7 -7
- package/package.json +4 -4
- package/src/sdk/graphql/prefetchQuery.ts +2 -3
- package/src/sdk/graphql/request.ts +3 -2
- package/src/sdk/graphql/useLazyQuery.ts +2 -3
- package/src/sdk/graphql/useQuery.ts +2 -3
- package/src/server/index.ts +2 -2
- package/tsconfig.json +2 -0
- /package/.next/static/{YyyfSkn4MlzCeIY09phdk → bcMMWaQUHRCjjoHG-aJw2}/_buildManifest.js +0 -0
- /package/.next/static/{YyyfSkn4MlzCeIY09phdk → bcMMWaQUHRCjjoHG-aJw2}/_ssgManifest.js +0 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
$ yarn partytown & yarn generate && next build
|
|
2
2
|
$ partytown copylib ./public/~partytown
|
|
3
|
-
Partytown lib copied to: /home/runner/work/faststore/faststore/packages/core/public/~partytown
|
|
4
3
|
$ faststore generate-graphql -c
|
|
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
|
⚠ No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
|
|
7
7
|
Attention: Next.js now collects completely anonymous telemetry regarding usage.
|
|
@@ -27,6 +27,8 @@ Browserslist: caniuse-lite is outdated. Please run:
|
|
|
27
27
|
Generating static pages (0/7) ...
|
|
28
28
|
|
|
29
29
|
Generating static pages (1/7)
|
|
30
30
|
|
|
31
31
|
Generating static pages (3/7)
|
|
32
|
+
warn - CustomIconsAlert not found. Add a new component for this section or remove it from the CMS
|
|
33
|
+
warn - SimpleAlert not found. Add a new component for this section or remove it from the CMS
|
|
32
34
|
|
|
33
35
|
Generating static pages (5/7)
|
|
34
36
|
|
|
35
37
|
✓ Generating static pages (7/7)
|
|
36
38
|
Finalizing page optimization ...
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
$ jest
|
|
2
|
-
PASS test/server/index.test.ts (21.
|
|
2
|
+
PASS test/server/index.test.ts (21.419 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 (8 ms)
|
|
6
|
+
✓ should return a valid GraphQL schema contain all expected types (7 ms)
|
|
7
7
|
✓ should return a valid GraphQL schema contain all expected queries (1 ms)
|
|
8
8
|
✓ should return a valid GraphQL schema contain all expected mutations (1 ms)
|
|
9
9
|
VTEX API Extension
|
|
@@ -11,13 +11,13 @@ PASS test/server/index.test.ts (21.304 s)
|
|
|
11
11
|
Third Party API Extension
|
|
12
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 (26 ms)
|
|
15
15
|
Envelop
|
|
16
|
-
✓ should exist with its plugins (
|
|
17
|
-
✓ should handle options and execute (
|
|
16
|
+
✓ should exist with its plugins (39 ms)
|
|
17
|
+
✓ should handle options and execute (329 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: 21.
|
|
22
|
+
Time: 21.518 s
|
|
23
23
|
Ran all test suites.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/core",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.13",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": "vtex/faststore",
|
|
6
6
|
"browserslist": "supports es6-module and not dead",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@envelop/validation-cache": "^2.2.0",
|
|
42
42
|
"@faststore/api": "^3.0.7",
|
|
43
43
|
"@faststore/components": "^3.0.7",
|
|
44
|
-
"@faststore/graphql-utils": "^3.0.
|
|
44
|
+
"@faststore/graphql-utils": "^3.0.13",
|
|
45
45
|
"@faststore/sdk": "^3.0.7",
|
|
46
46
|
"@faststore/ui": "^3.0.7",
|
|
47
47
|
"@graphql-codegen/cli": "^3.3.1",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@cypress/code-coverage": "^3.12.1",
|
|
85
85
|
"@envelop/testing": "^6.0.0",
|
|
86
|
-
"@faststore/cli": "^3.0.
|
|
86
|
+
"@faststore/cli": "^3.0.13",
|
|
87
87
|
"@faststore/eslint-config": "^3.0.7",
|
|
88
88
|
"@faststore/lighthouse": "^1.12.32",
|
|
89
89
|
"@lhci/cli": "^0.9.0",
|
|
@@ -128,5 +128,5 @@
|
|
|
128
128
|
"node": "18.19.0",
|
|
129
129
|
"yarn": "1.19.1"
|
|
130
130
|
},
|
|
131
|
-
"gitHead": "
|
|
131
|
+
"gitHead": "9ccaaa8c2e9e6b2c9f3c82ac3d52405e51ddd6a0"
|
|
132
132
|
}
|
|
@@ -3,11 +3,10 @@ import type { Cache } from 'swr'
|
|
|
3
3
|
|
|
4
4
|
import { request } from './request'
|
|
5
5
|
import { getKey } from './useQuery'
|
|
6
|
-
import type { RequestOptions } from './request'
|
|
7
|
-
import { TypedDocumentString } from '@generated/graphql'
|
|
6
|
+
import type { Operation, RequestOptions } from './request'
|
|
8
7
|
|
|
9
8
|
export const prefetchQuery = <Data, Variables = Record<string, unknown>>(
|
|
10
|
-
operation:
|
|
9
|
+
operation: Operation,
|
|
11
10
|
variables: Variables,
|
|
12
11
|
{ cache, ...options }: Partial<RequestOptions> & { cache: Cache }
|
|
13
12
|
) => {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { TypedDocumentString } from '@generated/graphql'
|
|
2
2
|
|
|
3
3
|
export type RequestOptions = Omit<BaseRequestOptions, 'operation' | 'variables'>
|
|
4
|
+
export type Operation = Pick<TypedDocumentString<any, any>, '__meta__'>
|
|
4
5
|
|
|
5
6
|
export interface GraphQLResponse<D = any> {
|
|
6
7
|
data: D
|
|
@@ -8,7 +9,7 @@ export interface GraphQLResponse<D = any> {
|
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
export interface BaseRequestOptions<V = any> {
|
|
11
|
-
operation:
|
|
12
|
+
operation: Operation
|
|
12
13
|
variables: V
|
|
13
14
|
fetchOptions?: RequestInit
|
|
14
15
|
}
|
|
@@ -20,7 +21,7 @@ const DEFAULT_HEADERS_BY_VERB: Record<string, Record<string, string>> = {
|
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
export const request = async <Query = unknown, Variables = unknown>(
|
|
23
|
-
operation:
|
|
24
|
+
operation: Operation,
|
|
24
25
|
variables: Variables,
|
|
25
26
|
options?: RequestOptions
|
|
26
27
|
) => {
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import useSWR from 'swr'
|
|
2
2
|
|
|
3
|
-
import { request } from './request'
|
|
3
|
+
import { type Operation, request } from './request'
|
|
4
4
|
import { DEFAULT_OPTIONS, getKey } from './useQuery'
|
|
5
5
|
import type { QueryOptions } from './useQuery'
|
|
6
|
-
import { TypedDocumentString } from '@generated/graphql'
|
|
7
6
|
|
|
8
7
|
export const useLazyQuery = <Data, Variables = Record<string, unknown>>(
|
|
9
|
-
operation:
|
|
8
|
+
operation: Operation,
|
|
10
9
|
variables: Variables,
|
|
11
10
|
options?: QueryOptions
|
|
12
11
|
) => {
|
|
@@ -2,8 +2,7 @@ import useSWR from 'swr'
|
|
|
2
2
|
import type { SWRConfiguration } from 'swr'
|
|
3
3
|
|
|
4
4
|
import { request } from './request'
|
|
5
|
-
import type { RequestOptions } from './request'
|
|
6
|
-
import { TypedDocumentString } from '@generated/graphql'
|
|
5
|
+
import type { Operation, RequestOptions } from './request'
|
|
7
6
|
|
|
8
7
|
export type QueryOptions = SWRConfiguration &
|
|
9
8
|
RequestOptions & { doNotRun?: boolean }
|
|
@@ -23,7 +22,7 @@ export const DEFAULT_OPTIONS = {
|
|
|
23
22
|
}
|
|
24
23
|
|
|
25
24
|
export const useQuery = <Data, Variables = Record<string, unknown>>(
|
|
26
|
-
operation:
|
|
25
|
+
operation: Operation,
|
|
27
26
|
variables: Variables,
|
|
28
27
|
options?: QueryOptions
|
|
29
28
|
) =>
|
package/src/server/index.ts
CHANGED
|
@@ -27,10 +27,10 @@ import vtexExtensionsResolvers from '../customizations/src/graphql/vtex/resolver
|
|
|
27
27
|
import thirdPartyResolvers from '../customizations/src/graphql/thirdParty/resolvers'
|
|
28
28
|
|
|
29
29
|
import { apiOptions } from './options'
|
|
30
|
-
import {
|
|
30
|
+
import { Operation } from '../sdk/graphql/request'
|
|
31
31
|
|
|
32
32
|
interface ExecuteOptions<V = Record<string, unknown>> {
|
|
33
|
-
operation:
|
|
33
|
+
operation: Operation
|
|
34
34
|
variables: V
|
|
35
35
|
query?: string | null
|
|
36
36
|
}
|
package/tsconfig.json
CHANGED
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
"paths": {
|
|
15
15
|
"src/*": ["src/*"],
|
|
16
16
|
"@generated/*": ["@generated/*"],
|
|
17
|
+
"@faststore/core": ["index.ts"],
|
|
18
|
+
"@faststore/core/api": ["api/index.ts"],
|
|
17
19
|
"@faststore/core/experimental": ["src/experimental/index.ts"]
|
|
18
20
|
},
|
|
19
21
|
"forceConsistentCasingInFileNames": true,
|
|
File without changes
|
|
File without changes
|