@faststore/core 3.0.116 → 3.0.118
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 +34 -34
- 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/chunks/202.js +1 -1
- package/.next/server/chunks/350.js +1 -1
- package/.next/server/chunks/371.js +1 -0
- package/.next/server/chunks/430.js +1 -0
- package/.next/server/chunks/484.js +1 -1
- package/.next/server/chunks/485.js +1 -1
- package/.next/server/chunks/646.js +6 -2
- package/.next/server/chunks/82.js +2 -2
- package/.next/server/chunks/933.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.js +1 -1
- package/.next/server/pages/404.js.nft.json +1 -1
- package/.next/server/pages/500.js +1 -1
- package/.next/server/pages/500.js.nft.json +1 -1
- package/.next/server/pages/[...slug].js +1 -1
- package/.next/server/pages/[...slug].js.nft.json +1 -1
- package/.next/server/pages/[slug]/p.js +1 -1
- package/.next/server/pages/[slug]/p.js.nft.json +1 -1
- package/.next/server/pages/_app.js +1 -1
- package/.next/server/pages/_app.js.nft.json +1 -1
- package/.next/server/pages/_document.js +1 -1
- package/.next/server/pages/_document.js.nft.json +1 -1
- package/.next/server/pages/_error.js +1 -1
- package/.next/server/pages/_error.js.nft.json +1 -1
- package/.next/server/pages/account.js +1 -1
- package/.next/server/pages/account.js.nft.json +1 -1
- package/.next/server/pages/api/graphql.js +1 -1
- package/.next/server/pages/api/graphql.js.nft.json +1 -1
- package/.next/server/pages/api/health/live.js.nft.json +1 -1
- package/.next/server/pages/api/health/ready.js.nft.json +1 -1
- package/.next/server/pages/api/preview.js +1 -1
- package/.next/server/pages/api/preview.js.nft.json +1 -1
- package/.next/server/pages/checkout.js +1 -1
- package/.next/server/pages/checkout.js.nft.json +1 -1
- 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/account.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 +2 -2
- package/.next/server/pages/index.js +1 -1
- package/.next/server/pages/index.js.nft.json +1 -1
- package/.next/server/pages/login.js +1 -1
- package/.next/server/pages/login.js.nft.json +1 -1
- package/.next/server/pages/s.js +1 -1
- package/.next/server/pages/s.js.nft.json +1 -1
- package/.next/server/pages-manifest.json +1 -1
- package/.next/static/azXamietm77CYoDT9c8-j/_buildManifest.js +1 -0
- package/.next/static/chunks/{202.a21c6de815ba3b75.js → 202.adc31e548eafb936.js} +1 -1
- package/.next/static/chunks/{484.0c9f9b5defb5904d.js → 484.3e4d0dcb4c646a45.js} +1 -1
- package/.next/static/chunks/661-64696c6b69aad0cd.js +1 -0
- package/.next/static/chunks/968-c54b14bfbaa726e6.js +1 -0
- package/.next/static/chunks/pages/{[...slug]-dd7f247ab9486429.js → [...slug]-7f74f18dc0f1f1a9.js} +1 -1
- package/.next/static/chunks/pages/[slug]/{p-e7077156f76f4cef.js → p-646405f4438699b5.js} +1 -1
- package/.next/static/chunks/pages/{_app-5d553d859f2f0ef5.js → _app-2eec5df0e9035cf0.js} +1 -1
- package/.next/static/chunks/pages/{account-e7b06039b653381d.js → account-8931b40009337c51.js} +1 -1
- package/.next/static/chunks/pages/{checkout-996d898a57d037a0.js → checkout-1bffb8877653059e.js} +1 -1
- package/.next/static/chunks/pages/{index-d7ef84d142b53200.js → index-54d1ee40f5fcc0a0.js} +1 -1
- package/.next/static/chunks/pages/{login-b82e639bfe6d70ce.js → login-65d3c7a8402a4da5.js} +1 -1
- package/.next/static/chunks/pages/{s-5f2e23d107382a98.js → s-64e04e229bb07366.js} +1 -1
- package/.next/static/chunks/webpack-5b0bd69e10af14e4.js +1 -0
- package/.next/trace +95 -95
- package/.turbo/turbo-build.log +28 -8
- package/.turbo/turbo-test.log +4 -4
- package/@generated/gql.ts +2 -2
- package/@generated/graphql.ts +25 -2
- package/@generated/persisted-documents.json +2 -2
- package/@generated/schema.graphql +16 -0
- package/README.md +4 -4
- package/cypress/global.js +1 -1
- package/cypress/integration/a11y.test.js +1 -1
- package/cypress/integration/analytics.test.js +1 -1
- package/cypress/integration/cart.test.js +1 -1
- package/cypress/integration/plp.test.js +1 -1
- package/cypress/integration/search.test.js +1 -1
- package/cypress/integration/seo.test.js +1 -1
- package/{faststore.config.default.js → discovery.config.default.js} +1 -0
- package/discovery.config.js +17 -0
- package/lighthouserc.js +1 -1
- package/next-seo.config.ts +1 -1
- package/next.config.js +1 -1
- package/package.json +3 -3
- package/src/components/ThirdPartyScripts/ThirdPartyScripts.tsx +2 -2
- package/src/components/ThirdPartyScripts/vtex.tsx +1 -1
- package/src/components/cms/GlobalSections.tsx +1 -1
- package/src/components/product/ProductCard/ProductCard.tsx +15 -0
- package/src/components/templates/LandingPage/LandingPage.tsx +1 -1
- package/src/components/templates/ProductListingPage/ProductListingPage.tsx +1 -1
- package/src/components/ui/Image/loader.ts +1 -1
- package/src/pages/[...slug].tsx +1 -1
- package/src/pages/[slug]/p.tsx +1 -1
- package/src/pages/_document.tsx +1 -1
- package/src/pages/account.tsx +1 -1
- package/src/pages/api/preview.ts +1 -1
- package/src/pages/checkout.tsx +1 -1
- package/src/pages/index.tsx +1 -1
- package/src/pages/login.tsx +1 -1
- package/src/pages/s.tsx +1 -1
- package/src/sdk/analytics/index.tsx +1 -1
- package/src/sdk/analytics/platform/vtex/search.ts +1 -1
- package/src/sdk/cart/index.ts +1 -1
- package/src/sdk/cart/useCheckoutButton.ts +1 -1
- package/src/sdk/session/index.ts +1 -1
- package/src/server/cms/index.ts +1 -1
- package/src/server/cms/pdp.ts +1 -1
- package/src/server/cms/plp.ts +1 -1
- package/src/server/options.ts +2 -1
- package/test/server/index.test.ts +1 -1
- package/.next/server/chunks/498.js +0 -1
- package/.next/server/chunks/997.js +0 -1
- package/.next/static/KTDlBYjCu5WzIPGoRYTKn/_buildManifest.js +0 -1
- package/.next/static/chunks/661-37d224da8cd18a0d.js +0 -1
- package/.next/static/chunks/968-2833bd4b4774c583.js +0 -1
- package/.next/static/chunks/webpack-8883d8523b03e385.js +0 -1
- package/faststore.config.js +0 -11
- /package/.next/static/{KTDlBYjCu5WzIPGoRYTKn → azXamietm77CYoDT9c8-j}/_ssgManifest.js +0 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -33,12 +33,32 @@ https://nextjs.org/telemetry
|
|
|
33
33
|
Creating an optimized production build ...
|
|
34
34
|
Disabled SWC as replacement for Babel because of custom Babel configuration ".babelrc.js" https://nextjs.org/docs/messages/swc-disabled
|
|
35
35
|
Using external babel configuration from /home/runner/work/faststore/faststore/packages/core/.babelrc.js
|
|
36
|
-
|
|
36
|
+
⚠ Compiled with warnings
|
|
37
|
+
|
|
38
|
+
./discovery.config.js
|
|
39
|
+
Module not found: Can't resolve './src/customizations/discovery.config' in '/home/runner/work/faststore/faststore/packages/core'
|
|
40
|
+
|
|
41
|
+
Import trace for requested module:
|
|
42
|
+
./discovery.config.js
|
|
43
|
+
|
|
44
|
+
./discovery.config.js
|
|
45
|
+
Module not found: Can't resolve './src/customizations/discovery.config' in '/home/runner/work/faststore/faststore/packages/core'
|
|
46
|
+
|
|
47
|
+
Import trace for requested module:
|
|
48
|
+
./discovery.config.js
|
|
49
|
+
|
|
50
|
+
./discovery.config.js
|
|
51
|
+
Module not found: Can't resolve './src/customizations/discovery.config' in '/home/runner/work/faststore/faststore/packages/core'
|
|
52
|
+
|
|
53
|
+
Import trace for requested module:
|
|
54
|
+
./discovery.config.js
|
|
55
|
+
./src/pages/api/preview.ts
|
|
56
|
+
|
|
37
57
|
Collecting page data ...
|
|
38
58
|
Generating static pages (0/7) ...
|
|
39
59
|
|
|
40
60
|
Generating static pages (1/7)
|
|
41
|
-
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.
|
|
42
61
|
|
|
43
62
|
Generating static pages (3/7)
|
|
63
|
+
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.
|
|
44
64
|
|
|
45
65
|
Generating static pages (5/7)
|
|
46
66
|
|
|
47
67
|
✓ Generating static pages (7/7)
|
|
48
68
|
Finalizing page optimization ...
|
|
@@ -54,19 +74,19 @@ Route (pages) Size First Load JS
|
|
|
54
74
|
├ └ css/fbd711b9f5abf105.css 9.57 kB
|
|
55
75
|
├ ○ /404 1.28 kB 126 kB
|
|
56
76
|
├ ● /500 1.29 kB 126 kB
|
|
57
|
-
├ ● /account
|
|
77
|
+
├ ● /account 676 B 126 kB
|
|
58
78
|
├ λ /api/graphql 0 B 90.7 kB
|
|
59
79
|
├ λ /api/health/live 0 B 90.7 kB
|
|
60
80
|
├ λ /api/health/ready 0 B 90.7 kB
|
|
61
81
|
├ λ /api/preview 0 B 90.7 kB
|
|
62
|
-
├ ● /checkout
|
|
63
|
-
├ ● /login 1.4 kB
|
|
82
|
+
├ ● /checkout 661 B 126 kB
|
|
83
|
+
├ ● /login 1.4 kB 127 kB
|
|
64
84
|
└ ● /s 2.22 kB 154 kB
|
|
65
|
-
+ First Load JS shared by all 93.
|
|
85
|
+
+ First Load JS shared by all 93.8 kB
|
|
66
86
|
├ chunks/framework-8e279965036b6169.js 45.4 kB
|
|
67
87
|
├ chunks/main-029f1328cfee9686.js 33.1 kB
|
|
68
|
-
├ chunks/pages/_app-
|
|
69
|
-
├ chunks/webpack-
|
|
88
|
+
├ chunks/pages/_app-2eec5df0e9035cf0.js 9.91 kB
|
|
89
|
+
├ chunks/webpack-5b0bd69e10af14e4.js 2.38 kB
|
|
70
90
|
└ css/ee0556daedda6306.css 3.07 kB
|
|
71
91
|
|
|
72
92
|
λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
$ jest
|
|
2
|
-
PASS test/utils/multipleTemplates.test.ts (36.
|
|
3
|
-
PASS test/server/cms/index.test.ts (
|
|
4
|
-
PASS test/server/index.test.ts (40.
|
|
2
|
+
PASS test/utils/multipleTemplates.test.ts (36.293 s)
|
|
3
|
+
PASS test/server/cms/index.test.ts (36.35 s)
|
|
4
|
+
PASS test/server/index.test.ts (40.192 s)
|
|
5
5
|
|
|
6
6
|
Test Suites: 3 passed, 3 total
|
|
7
7
|
Tests: 19 passed, 19 total
|
|
8
8
|
Snapshots: 0 total
|
|
9
|
-
Time: 41.
|
|
9
|
+
Time: 41.454 s
|
|
10
10
|
Ran all test suites.
|
package/@generated/gql.ts
CHANGED
|
@@ -12,7 +12,7 @@ import * as types from './graphql'
|
|
|
12
12
|
* Therefore it is highly recommended to use the babel or swc plugin for production.
|
|
13
13
|
*/
|
|
14
14
|
const documents = {
|
|
15
|
-
'\n fragment ProductSummary_product on StoreProduct {\n id: productID\n slug\n sku\n brand {\n brandName: name\n }\n name\n gtin\n\n isVariantOf {\n productGroupID\n name\n }\n\n image {\n url\n alternateName\n }\n\n brand {\n name\n }\n\n offers {\n lowPrice\n lowPriceWithTaxes\n offers {\n availability\n price\n listPrice\n listPriceWithTaxes\n quantity\n seller {\n identifier\n }\n }\n }\n\n additionalProperty {\n propertyID\n name\n value\n valueReference\n }\n }\n':
|
|
15
|
+
'\n fragment ProductSummary_product on StoreProduct {\n id: productID\n slug\n sku\n brand {\n brandName: name\n }\n name\n gtin\n\n isVariantOf {\n productGroupID\n name\n }\n\n image {\n url\n alternateName\n }\n\n brand {\n name\n }\n\n offers {\n lowPrice\n lowPriceWithTaxes\n offers {\n availability\n price\n listPrice\n listPriceWithTaxes\n quantity\n seller {\n identifier\n }\n }\n }\n\n additionalProperty {\n propertyID\n name\n value\n valueReference\n }\n\n advertisement {\n adId\n adResponseId\n }\n }\n':
|
|
16
16
|
types.ProductSummary_ProductFragmentDoc,
|
|
17
17
|
'\n fragment Filter_facets on StoreFacet {\n ... on StoreFacetRange {\n key\n label\n\n min {\n selected\n absolute\n }\n\n max {\n selected\n absolute\n }\n\n __typename\n }\n ... on StoreFacetBoolean {\n key\n label\n values {\n label\n value\n selected\n quantity\n }\n\n __typename\n }\n }\n':
|
|
18
18
|
types.Filter_FacetsFragmentDoc,
|
|
@@ -62,7 +62,7 @@ const documents = {
|
|
|
62
62
|
* The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
63
63
|
*/
|
|
64
64
|
export function gql(
|
|
65
|
-
source: '\n fragment ProductSummary_product on StoreProduct {\n id: productID\n slug\n sku\n brand {\n brandName: name\n }\n name\n gtin\n\n isVariantOf {\n productGroupID\n name\n }\n\n image {\n url\n alternateName\n }\n\n brand {\n name\n }\n\n offers {\n lowPrice\n lowPriceWithTaxes\n offers {\n availability\n price\n listPrice\n listPriceWithTaxes\n quantity\n seller {\n identifier\n }\n }\n }\n\n additionalProperty {\n propertyID\n name\n value\n valueReference\n }\n }\n'
|
|
65
|
+
source: '\n fragment ProductSummary_product on StoreProduct {\n id: productID\n slug\n sku\n brand {\n brandName: name\n }\n name\n gtin\n\n isVariantOf {\n productGroupID\n name\n }\n\n image {\n url\n alternateName\n }\n\n brand {\n name\n }\n\n offers {\n lowPrice\n lowPriceWithTaxes\n offers {\n availability\n price\n listPrice\n listPriceWithTaxes\n quantity\n seller {\n identifier\n }\n }\n }\n\n additionalProperty {\n propertyID\n name\n value\n valueReference\n }\n\n advertisement {\n adId\n adResponseId\n }\n }\n'
|
|
66
66
|
): typeof import('./graphql').ProductSummary_ProductFragmentDoc
|
|
67
67
|
/**
|
|
68
68
|
* The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
package/@generated/graphql.ts
CHANGED
|
@@ -116,6 +116,20 @@ export type Address = {
|
|
|
116
116
|
street: Maybe<Scalars['String']['output']>
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
+
/** Advertisement information about a specific product in a campaign */
|
|
120
|
+
export type Advertisement = {
|
|
121
|
+
/** Cost of the action, usually Cost Per Click. */
|
|
122
|
+
actionCost: Scalars['Float']['output']
|
|
123
|
+
/** Advertiser ID of the product. */
|
|
124
|
+
adId: Scalars['String']['output']
|
|
125
|
+
/** Advertiser Request ID. */
|
|
126
|
+
adRequestId: Scalars['String']['output']
|
|
127
|
+
/** Advertiser Response ID. */
|
|
128
|
+
adResponseId: Scalars['String']['output']
|
|
129
|
+
/** Campaign ID. */
|
|
130
|
+
campaignId: Scalars['String']['output']
|
|
131
|
+
}
|
|
132
|
+
|
|
119
133
|
export type AvailableDeliveryWindows = {
|
|
120
134
|
/** Available delivery window end date in UTC */
|
|
121
135
|
endDateUtc: Maybe<Scalars['String']['output']>
|
|
@@ -901,6 +915,8 @@ export type StorePerson = {
|
|
|
901
915
|
export type StoreProduct = {
|
|
902
916
|
/** Array of additional properties. */
|
|
903
917
|
additionalProperty: Array<StorePropertyValue>
|
|
918
|
+
/** Advertisement information about the product. */
|
|
919
|
+
advertisement: Maybe<Advertisement>
|
|
904
920
|
/** Aggregate ratings data. */
|
|
905
921
|
aggregateRating: StoreAggregateRating
|
|
906
922
|
/** Product brand. */
|
|
@@ -1123,6 +1139,7 @@ export type ProductSummary_ProductFragment = {
|
|
|
1123
1139
|
value: any
|
|
1124
1140
|
valueReference: any
|
|
1125
1141
|
}>
|
|
1142
|
+
advertisement: { adId: string; adResponseId: string } | null
|
|
1126
1143
|
}
|
|
1127
1144
|
|
|
1128
1145
|
type Filter_Facets_StoreFacetBoolean_Fragment = {
|
|
@@ -1433,6 +1450,7 @@ export type ClientManyProductsQueryQuery = {
|
|
|
1433
1450
|
value: any
|
|
1434
1451
|
valueReference: any
|
|
1435
1452
|
}>
|
|
1453
|
+
advertisement: { adId: string; adResponseId: string } | null
|
|
1436
1454
|
}
|
|
1437
1455
|
}>
|
|
1438
1456
|
}
|
|
@@ -1560,6 +1578,7 @@ export type ClientSearchSuggestionsQueryQuery = {
|
|
|
1560
1578
|
value: any
|
|
1561
1579
|
valueReference: any
|
|
1562
1580
|
}>
|
|
1581
|
+
advertisement: { adId: string; adResponseId: string } | null
|
|
1563
1582
|
}>
|
|
1564
1583
|
}
|
|
1565
1584
|
products: { pageInfo: { totalCount: number } }
|
|
@@ -1690,6 +1709,10 @@ export const ProductSummary_ProductFragmentDoc = new TypedDocumentString(
|
|
|
1690
1709
|
value
|
|
1691
1710
|
valueReference
|
|
1692
1711
|
}
|
|
1712
|
+
advertisement {
|
|
1713
|
+
adId
|
|
1714
|
+
adResponseId
|
|
1715
|
+
}
|
|
1693
1716
|
}
|
|
1694
1717
|
`,
|
|
1695
1718
|
{ fragmentName: 'ProductSummary_product' }
|
|
@@ -2051,7 +2074,7 @@ export const SubscribeToNewsletterDocument = {
|
|
|
2051
2074
|
export const ClientManyProductsQueryDocument = {
|
|
2052
2075
|
__meta__: {
|
|
2053
2076
|
operationName: 'ClientManyProductsQuery',
|
|
2054
|
-
operationHash: '
|
|
2077
|
+
operationHash: 'ad2eb78cfccb9dbd5a9f2d1e150cc70fea5da99a',
|
|
2055
2078
|
},
|
|
2056
2079
|
} as unknown as TypedDocumentString<
|
|
2057
2080
|
ClientManyProductsQueryQuery,
|
|
@@ -2078,7 +2101,7 @@ export const ClientProductQueryDocument = {
|
|
|
2078
2101
|
export const ClientSearchSuggestionsQueryDocument = {
|
|
2079
2102
|
__meta__: {
|
|
2080
2103
|
operationName: 'ClientSearchSuggestionsQuery',
|
|
2081
|
-
operationHash: '
|
|
2104
|
+
operationHash: '4d9f934764d8578aea08673b8ba57e8bf738f534',
|
|
2082
2105
|
},
|
|
2083
2106
|
} as unknown as TypedDocumentString<
|
|
2084
2107
|
ClientSearchSuggestionsQueryQuery,
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
"46103bee661405bde706d72126fdbf9b0a0c9e6e": "fragment CartProductItem on StoreProduct { additionalProperty { name propertyID value valueReference } brand { name } gtin image { alternateName url } isVariantOf { name productGroupID skuVariants { activeVariations availableVariations slugsMap } } name sku unitMultiplier } fragment ProductDetailsFragment_product on StoreProduct { additionalProperty { name propertyID value valueReference } brand { name } description gtin image { alternateName url } isVariantOf { name productGroupID skuVariants { activeVariations availableVariations slugsMap } } name offers { lowPrice lowPriceWithTaxes offers { availability listPrice listPriceWithTaxes price priceWithTaxes seller { identifier } } } id: productID sku unitMultiplier ...CartProductItem } fragment ServerProduct on Query { product(locator: $locator) { id: productID } } query ServerProductQuery($locator: [IStoreSelectedFacet!]!) { product(locator: $locator) { brand { name } breadcrumbList { itemListElement { item name position } } description gtin image { alternateName url } isVariantOf { productGroupID } name offers { highPrice lowPrice lowPriceWithTaxes offers { availability itemCondition price priceCurrency priceValidUntil seller { identifier } } priceCurrency } id: productID releaseDate seo { canonical description title } sku ...ProductDetailsFragment_product } ...ServerProduct }",
|
|
4
4
|
"324471076994dca94a47adcaf1c6b8f7896e1b4f": "fragment CartItem on StoreOffer { itemOffered { ...CartProductItem } listPrice listPriceWithTaxes price priceWithTaxes quantity seller { identifier } } fragment CartMessage on StoreCartMessage { status text } fragment CartProductItem on StoreProduct { additionalProperty { name propertyID value valueReference } brand { name } gtin image { alternateName url } isVariantOf { name productGroupID skuVariants { activeVariations availableVariations slugsMap } } name sku unitMultiplier } mutation ValidateCartMutation($cart: IStoreCart!, $session: IStoreSession!) { validateCart(cart: $cart, session: $session) { messages { ...CartMessage } order { acceptedOffer { ...CartItem } orderNumber } } }",
|
|
5
5
|
"feb7005103a859e2bc8cf2360d568806fd88deba": "mutation SubscribeToNewsletter($data: IPersonNewsletter!) { subscribeToNewsletter(data: $data) { id } }",
|
|
6
|
-
"
|
|
6
|
+
"ad2eb78cfccb9dbd5a9f2d1e150cc70fea5da99a": "fragment ClientManyProducts on Query { search( first: $first after: $after sort: $sort term: $term selectedFacets: $selectedFacets ) { products { pageInfo { totalCount } } } } fragment ProductSummary_product on StoreProduct { additionalProperty { name propertyID value valueReference } advertisement { adId adResponseId } brand { brandName: name } brand { name } gtin image { alternateName url } isVariantOf { name productGroupID } name offers { lowPrice lowPriceWithTaxes offers { availability listPrice listPriceWithTaxes price quantity seller { identifier } } } id: productID sku slug } query ClientManyProductsQuery($after: String, $first: Int!, $selectedFacets: [IStoreSelectedFacet!]!, $sort: StoreSort!, $term: String!) { search( first: $first after: $after sort: $sort term: $term selectedFacets: $selectedFacets ) { products { edges { node { ...ProductSummary_product } } pageInfo { totalCount } } } ...ClientManyProducts }",
|
|
7
7
|
"177fe68cb385737b0901fc9e105f0a4813e18a20": "fragment ClientProductGallery on Query { search( first: $first after: $after sort: $sort term: $term selectedFacets: $selectedFacets ) { products { pageInfo { totalCount } } } } fragment Filter_facets on StoreFacet { ... on StoreFacetBoolean { __typename key label values { label quantity selected value } } ... on StoreFacetRange { __typename key label max { absolute selected } min { absolute selected } } } fragment SearchEvent_metadata on SearchMetadata { isTermMisspelled logicalOperator } query ClientProductGalleryQuery($after: String!, $first: Int!, $selectedFacets: [IStoreSelectedFacet!]!, $sort: StoreSort!, $term: String!) { redirect(term: $term, selectedFacets: $selectedFacets) { url } search( first: $first after: $after sort: $sort term: $term selectedFacets: $selectedFacets ) { facets { ...Filter_facets } metadata { ...SearchEvent_metadata } products { pageInfo { totalCount } } } ...ClientProductGallery }",
|
|
8
8
|
"7d121ef8d4dc99174e64e4429a9b977b8bbebed8": "fragment CartProductItem on StoreProduct { additionalProperty { name propertyID value valueReference } brand { name } gtin image { alternateName url } isVariantOf { name productGroupID skuVariants { activeVariations availableVariations slugsMap } } name sku unitMultiplier } fragment ClientProduct on Query { product(locator: $locator) { id: productID } } fragment ProductDetailsFragment_product on StoreProduct { additionalProperty { name propertyID value valueReference } brand { name } description gtin image { alternateName url } isVariantOf { name productGroupID skuVariants { activeVariations availableVariations slugsMap } } name offers { lowPrice lowPriceWithTaxes offers { availability listPrice listPriceWithTaxes price priceWithTaxes seller { identifier } } } id: productID sku unitMultiplier ...CartProductItem } query ClientProductQuery($locator: [IStoreSelectedFacet!]!) { product(locator: $locator) { ...ProductDetailsFragment_product } ...ClientProduct }",
|
|
9
|
-
"
|
|
9
|
+
"4d9f934764d8578aea08673b8ba57e8bf738f534": "fragment ClientSearchSuggestions on Query { search(first: 5, term: $term, selectedFacets: $selectedFacets) { suggestions { terms { value } } } } fragment ProductSummary_product on StoreProduct { additionalProperty { name propertyID value valueReference } advertisement { adId adResponseId } brand { brandName: name } brand { name } gtin image { alternateName url } isVariantOf { name productGroupID } name offers { lowPrice lowPriceWithTaxes offers { availability listPrice listPriceWithTaxes price quantity seller { identifier } } } id: productID sku slug } fragment SearchEvent_metadata on SearchMetadata { isTermMisspelled logicalOperator } query ClientSearchSuggestionsQuery($selectedFacets: [IStoreSelectedFacet!], $term: String!) { search(first: 5, term: $term, selectedFacets: $selectedFacets) { metadata { ...SearchEvent_metadata } products { pageInfo { totalCount } } suggestions { products { ...ProductSummary_product } terms { value } } } ...ClientSearchSuggestions }",
|
|
10
10
|
"e2385b0f11726d0068f96548f57a8dd441c064e3": "fragment ClientTopSearchSuggestions on Query { search(first: 5, term: $term, selectedFacets: $selectedFacets) { suggestions { terms { value } } } } query ClientTopSearchSuggestionsQuery($selectedFacets: [IStoreSelectedFacet!], $term: String!) { search(first: 5, term: $term, selectedFacets: $selectedFacets) { suggestions { terms { value } } } ...ClientTopSearchSuggestions }",
|
|
11
11
|
"5696202828f9275216a445e316ebf516f168c506": "mutation ValidateSession($search: String!, $session: IStoreSession!) { validateSession(session: $session, search: $search) { addressType channel country currency { code symbol } deliveryMode { deliveryChannel deliveryMethod deliveryWindow { endDate startDate } } geoCoordinates { latitude longitude } locale person { email familyName givenName id } postalCode } }",
|
|
12
12
|
"d6667f1de2a26b94b9b55f4b25d7d823f82635a0": "fragment ClientShippingSimulation on Query { shipping(items: $items, postalCode: $postalCode, country: $country) { address { city } } } query ClientShippingSimulationQuery($country: String!, $items: [IShippingItem!]!, $postalCode: String!) { shipping(items: $items, postalCode: $postalCode, country: $country) { address { city neighborhood state } logisticsInfo { slas { availableDeliveryWindows { endDateUtc listPrice price startDateUtc } carrier localizedEstimates price shippingEstimate } } } ...ClientShippingSimulation }"
|
|
@@ -29,6 +29,20 @@ type Address {
|
|
|
29
29
|
geoCoordinates: [Float]
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
"""Advertisement information about a specific product in a campaign"""
|
|
33
|
+
type Advertisement {
|
|
34
|
+
"""Advertiser ID of the product."""
|
|
35
|
+
adId: String!
|
|
36
|
+
"""Campaign ID."""
|
|
37
|
+
campaignId: String!
|
|
38
|
+
"""Cost of the action, usually Cost Per Click."""
|
|
39
|
+
actionCost: Float!
|
|
40
|
+
"""Advertiser Request ID."""
|
|
41
|
+
adRequestId: String!
|
|
42
|
+
"""Advertiser Response ID."""
|
|
43
|
+
adResponseId: String!
|
|
44
|
+
}
|
|
45
|
+
|
|
32
46
|
"""Aggregate offer information, for a given SKU that is available to be fulfilled by multiple sellers."""
|
|
33
47
|
type StoreAggregateOffer {
|
|
34
48
|
"""Highest price among all sellers."""
|
|
@@ -382,6 +396,8 @@ type StoreProduct {
|
|
|
382
396
|
releaseDate: String!
|
|
383
397
|
"""Sku Unit Multiplier"""
|
|
384
398
|
unitMultiplier: Float
|
|
399
|
+
"""Advertisement information about the product."""
|
|
400
|
+
advertisement: Advertisement
|
|
385
401
|
}
|
|
386
402
|
|
|
387
403
|
"""Product input. Products are variants within product groups, equivalent to VTEX [SKUs](https://help.vtex.com/en/tutorial/what-is-an-sku--1K75s4RXAQyOuGUYKMM68u#). For example, you may have a **Shirt** product group with associated products such as **Blue shirt size L**, **Green shirt size XL** and so on."""
|
package/README.md
CHANGED
|
@@ -56,8 +56,8 @@ A quick look at the top-level files and directories you'll see in a this NextJS
|
|
|
56
56
|
├── codegen.ts
|
|
57
57
|
├── cypress
|
|
58
58
|
├── cypress.config.ts
|
|
59
|
-
├──
|
|
60
|
-
├──
|
|
59
|
+
├── discovery.config.default.js
|
|
60
|
+
├── discovery.config.js
|
|
61
61
|
├── index.ts
|
|
62
62
|
├── jest.config.js
|
|
63
63
|
├── LICENSE
|
|
@@ -88,7 +88,7 @@ A quick look at the top-level files and directories you'll see in a this NextJS
|
|
|
88
88
|
|
|
89
89
|
7. **`tsconfig.json`**: The configuration file for the typescript compiler. This will statically analyze your code for errors and bugs before releasing them into production
|
|
90
90
|
|
|
91
|
-
8. **`
|
|
91
|
+
8. **`discovery.config.default.js`**: Configure your e-commerce platform, default sales channel etc.
|
|
92
92
|
|
|
93
93
|
9. **`@generated`**: Where TypeScript typings are generated for your GraphQL queries. You can use these files for strongly typing your App
|
|
94
94
|
|
|
@@ -196,7 +196,7 @@ The `cms/faststore` contains the `content-types.json` and `sections.json` files.
|
|
|
196
196
|
|
|
197
197
|
### CMS configs
|
|
198
198
|
|
|
199
|
-
It's possible to change the CMS tenant and workspace at `
|
|
199
|
+
It's possible to change the CMS tenant and workspace at `discovery.config.default.js`.
|
|
200
200
|
|
|
201
201
|
## 🎓 Learning the Frameworks
|
|
202
202
|
|
package/cypress/global.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* TODO: Improve structured data validaton by actually using schema.org's schemas
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { cypress, storeUrl } from '../../
|
|
9
|
+
import { cypress, storeUrl } from '../../discovery.config'
|
|
10
10
|
import { options } from '../global'
|
|
11
11
|
|
|
12
12
|
const { pages } = cypress
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const defaultConfig = require('./discovery.config.default')
|
|
2
|
+
const deepmerge = require('deepmerge')
|
|
3
|
+
|
|
4
|
+
let starterConfig
|
|
5
|
+
|
|
6
|
+
try {
|
|
7
|
+
starterConfig = require('./src/customizations/discovery.config')
|
|
8
|
+
} catch (e) {
|
|
9
|
+
starterConfig = require('./src/customizations/faststore.config')
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @type {typeof defaultConfig & Record<string, any>}
|
|
14
|
+
* */
|
|
15
|
+
const finalConfig = deepmerge(defaultConfig, starterConfig)
|
|
16
|
+
|
|
17
|
+
module.exports = finalConfig
|
package/lighthouserc.js
CHANGED
package/next-seo.config.ts
CHANGED
package/next.config.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/core",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.118",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": "vtex/faststore",
|
|
6
6
|
"browserslist": "supports es6-module and not dead",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@envelop/graphql-jit": "^1.1.1",
|
|
44
44
|
"@envelop/parser-cache": "^2.2.0",
|
|
45
45
|
"@envelop/validation-cache": "^2.2.0",
|
|
46
|
-
"@faststore/api": "^3.0.
|
|
46
|
+
"@faststore/api": "^3.0.117",
|
|
47
47
|
"@faststore/components": "^3.0.116",
|
|
48
48
|
"@faststore/graphql-utils": "^3.0.116",
|
|
49
49
|
"@faststore/lighthouse": "^3.0.116",
|
|
@@ -128,5 +128,5 @@
|
|
|
128
128
|
"node": "18.19.0",
|
|
129
129
|
"yarn": "1.19.1"
|
|
130
130
|
},
|
|
131
|
-
"gitHead": "
|
|
131
|
+
"gitHead": "9fc28dcd54860b270049321fc338fe7f93efeb15"
|
|
132
132
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Partytown } from '@builder.io/partytown/react'
|
|
2
|
+
import storeConfig from 'discovery.config'
|
|
2
3
|
import OverrideComponents from 'src/customizations/src/GlobalOverrides'
|
|
3
|
-
import storeConfig from '../../../faststore.config'
|
|
4
4
|
import GoogleTagManager, { GTM_DEBUG_QUERY_STRING } from './GoogleTagManager'
|
|
5
5
|
import VTEX from './vtex'
|
|
6
6
|
|
|
@@ -11,7 +11,7 @@ const includeVTEX = storeConfig.platform === 'vtex'
|
|
|
11
11
|
|
|
12
12
|
if (process.env.NODE_ENV === 'development' && !includeGTM) {
|
|
13
13
|
console.warn(
|
|
14
|
-
'No GTM container id found. Check the analytics section on your
|
|
14
|
+
'No GTM container id found. Check the analytics section on your discovery.config.js file for enhanced observability of your store.'
|
|
15
15
|
)
|
|
16
16
|
}
|
|
17
17
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Locator, Section } from '@vtex/client-cms'
|
|
2
|
-
import storeConfig from '
|
|
2
|
+
import storeConfig from 'discovery.config'
|
|
3
3
|
import type { ComponentType } from 'react'
|
|
4
4
|
import { PropsWithChildren } from 'react'
|
|
5
5
|
import CUSTOM_COMPONENTS from 'src/customizations/src/components'
|
|
@@ -77,6 +77,7 @@ function ProductCard({
|
|
|
77
77
|
sku,
|
|
78
78
|
isVariantOf: { name },
|
|
79
79
|
image: [img],
|
|
80
|
+
advertisement,
|
|
80
81
|
offers: {
|
|
81
82
|
lowPrice,
|
|
82
83
|
lowPriceWithTaxes,
|
|
@@ -106,12 +107,21 @@ function ProductCard({
|
|
|
106
107
|
|
|
107
108
|
const hasDiscount = spotPrice <= listPrice
|
|
108
109
|
|
|
110
|
+
const advertisementDataAttributes = advertisement
|
|
111
|
+
? {
|
|
112
|
+
'data-van-res-id': advertisement.adResponseId,
|
|
113
|
+
'data-van-aid': advertisement.adId,
|
|
114
|
+
'data-van-prod-name': name,
|
|
115
|
+
}
|
|
116
|
+
: {}
|
|
117
|
+
|
|
109
118
|
return (
|
|
110
119
|
<UIProductCard
|
|
111
120
|
outOfStock={outOfStock}
|
|
112
121
|
bordered={bordered}
|
|
113
122
|
variant={variant}
|
|
114
123
|
data-fs-product-card-sku={sku}
|
|
124
|
+
{...advertisementDataAttributes}
|
|
115
125
|
{...otherProps}
|
|
116
126
|
>
|
|
117
127
|
<UIProductCardImage aspectRatio={aspectRatio}>
|
|
@@ -189,6 +199,11 @@ export const fragment = gql(`
|
|
|
189
199
|
value
|
|
190
200
|
valueReference
|
|
191
201
|
}
|
|
202
|
+
|
|
203
|
+
advertisement {
|
|
204
|
+
adId
|
|
205
|
+
adResponseId
|
|
206
|
+
}
|
|
192
207
|
}
|
|
193
208
|
`)
|
|
194
209
|
|
|
@@ -17,7 +17,7 @@ import PageProvider from 'src/sdk/overrides/PageProvider'
|
|
|
17
17
|
import type { PageContentType } from 'src/server/cms'
|
|
18
18
|
import { getPage } from 'src/server/cms'
|
|
19
19
|
|
|
20
|
-
import storeConfig from '
|
|
20
|
+
import storeConfig from 'discovery.config'
|
|
21
21
|
|
|
22
22
|
/* A list of components that can be used in the CMS. */
|
|
23
23
|
const COMPONENTS: Record<string, ComponentType<any>> = {
|
|
@@ -14,7 +14,7 @@ import { useApplySearchState } from 'src/sdk/search/state'
|
|
|
14
14
|
|
|
15
15
|
import { PLPContentType } from 'src/server/cms/plp'
|
|
16
16
|
|
|
17
|
-
import storeConfig from '../../../../
|
|
17
|
+
import storeConfig from '../../../../discovery.config'
|
|
18
18
|
import ProductListing from './ProductListing'
|
|
19
19
|
|
|
20
20
|
export type ProductListingPageProps = {
|
package/src/pages/[...slug].tsx
CHANGED
package/src/pages/[slug]/p.tsx
CHANGED
|
@@ -24,7 +24,7 @@ import CUSTOM_COMPONENTS from 'src/customizations/src/components'
|
|
|
24
24
|
import { useSession } from 'src/sdk/session'
|
|
25
25
|
import { execute } from 'src/server'
|
|
26
26
|
|
|
27
|
-
import storeConfig from '
|
|
27
|
+
import storeConfig from 'discovery.config'
|
|
28
28
|
import GlobalSections, {
|
|
29
29
|
GlobalSectionsData,
|
|
30
30
|
getGlobalSectionsData,
|
package/src/pages/_document.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Head, Html, Main, NextScript } from 'next/document'
|
|
2
|
-
import storeConfig from '../../
|
|
2
|
+
import storeConfig from '../../discovery.config'
|
|
3
3
|
|
|
4
4
|
import ThirdPartyScripts from 'src/components/ThirdPartyScripts'
|
|
5
5
|
import { WebFonts } from 'src/customizations/src/GlobalOverrides'
|
package/src/pages/account.tsx
CHANGED
package/src/pages/api/preview.ts
CHANGED
package/src/pages/checkout.tsx
CHANGED
package/src/pages/index.tsx
CHANGED
|
@@ -21,7 +21,7 @@ import GlobalSections, {
|
|
|
21
21
|
} from 'src/components/cms/GlobalSections'
|
|
22
22
|
import PageProvider from 'src/sdk/overrides/PageProvider'
|
|
23
23
|
import { getDynamicContent } from 'src/utils/dynamicContent'
|
|
24
|
-
import storeConfig from '../../
|
|
24
|
+
import storeConfig from '../../discovery.config'
|
|
25
25
|
|
|
26
26
|
/* A list of components that can be used in the CMS. */
|
|
27
27
|
const COMPONENTS: Record<string, ComponentType<any>> = {
|
package/src/pages/login.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import { useEffect } from 'react'
|
|
|
2
2
|
import { NextSeo } from 'next-seo'
|
|
3
3
|
import type { ComponentType } from 'react'
|
|
4
4
|
|
|
5
|
-
import storeConfig from '../../
|
|
5
|
+
import storeConfig from '../../discovery.config'
|
|
6
6
|
import GlobalSections, {
|
|
7
7
|
GlobalSectionsData,
|
|
8
8
|
getGlobalSectionsData,
|
package/src/pages/s.tsx
CHANGED
|
@@ -15,7 +15,7 @@ import { ITEMS_PER_PAGE } from 'src/constants'
|
|
|
15
15
|
import { useApplySearchState } from 'src/sdk/search/state'
|
|
16
16
|
|
|
17
17
|
import { Locator } from '@vtex/client-cms'
|
|
18
|
-
import storeConfig from '
|
|
18
|
+
import storeConfig from 'discovery.config'
|
|
19
19
|
import GlobalSections, {
|
|
20
20
|
getGlobalSectionsData,
|
|
21
21
|
GlobalSectionsData,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AnalyticsEvent } from '@faststore/sdk'
|
|
2
2
|
import { useAnalyticsEvent } from '@faststore/sdk'
|
|
3
3
|
|
|
4
|
-
import storeConfig from '../../../
|
|
4
|
+
import storeConfig from '../../../discovery.config'
|
|
5
5
|
|
|
6
6
|
if (typeof window !== 'undefined') {
|
|
7
7
|
window.dataLayer = window.dataLayer ?? []
|
|
@@ -7,7 +7,7 @@ import type {
|
|
|
7
7
|
SearchSelectItemEvent,
|
|
8
8
|
} from '../../types'
|
|
9
9
|
|
|
10
|
-
import config from '../../../../../
|
|
10
|
+
import config from '../../../../../discovery.config'
|
|
11
11
|
import { getCookie } from '../../../../utils/getCookie'
|
|
12
12
|
|
|
13
13
|
const THIRTY_MINUTES_S = 30 * 60
|