diff --git a/packages/core/package.json b/packages/core/package.json index 057777e32d..2571c1149a 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -54,7 +54,7 @@ "@lexical/rich-text": "^0.34.0", "@types/react": "catalog:", "@vtex/client-cms": "^0.2.16", - "@vtex/client-cp": "0.3.5", + "@vtex/client-cp": "0.4.0", "@vtex/prettier-config": "1.0.0", "autoprefixer": "^10.4.0", "cookie": "catalog:", diff --git a/packages/core/src/components/cms/GlobalSections.tsx b/packages/core/src/components/cms/GlobalSections.tsx index 257273f916..3efac0eba7 100644 --- a/packages/core/src/components/cms/GlobalSections.tsx +++ b/packages/core/src/components/cms/GlobalSections.tsx @@ -15,7 +15,8 @@ export type GlobalSectionsData = { export const getGlobalSectionsByType = async ( previewData: PreviewData, - contentType: string + contentType: string, + locale?: string ): Promise => { if (storeConfig.cms.data) { const cmsData = JSON.parse(storeConfig.cms.data) @@ -25,6 +26,7 @@ export const getGlobalSectionsByType = async ( const pageData = contentService.getSingleContent({ contentType, previewData, + locale, documentId: page.documentId, versionId: page.versionId, releaseId: page.releaseId, @@ -37,25 +39,30 @@ export const getGlobalSectionsByType = async ( const pageData = contentService.getSingleContent({ contentType, previewData, + locale, }) return pageData } export const getGlobalSectionsData = ( - previewData: PreviewData + previewData: PreviewData, + locale?: string ): Promise[] => { const globalSections = getGlobalSectionsByType( previewData, - GLOBAL_SECTIONS_CONTENT_TYPE + GLOBAL_SECTIONS_CONTENT_TYPE, + locale ) const globalHeaderSections = getGlobalSectionsByType( previewData, - GLOBAL_SECTIONS_HEADER_CONTENT_TYPE + GLOBAL_SECTIONS_HEADER_CONTENT_TYPE, + locale ) const globalFooterSections = getGlobalSectionsByType( previewData, - GLOBAL_SECTIONS_FOOTER_CONTENT_TYPE + GLOBAL_SECTIONS_FOOTER_CONTENT_TYPE, + locale ) return [globalSections, globalHeaderSections, globalFooterSections] diff --git a/packages/core/src/components/templates/LandingPage/LandingPage.tsx b/packages/core/src/components/templates/LandingPage/LandingPage.tsx index 78a73526f5..c4c041c471 100644 --- a/packages/core/src/components/templates/LandingPage/LandingPage.tsx +++ b/packages/core/src/components/templates/LandingPage/LandingPage.tsx @@ -3,7 +3,6 @@ import type { ComponentType } from 'react' import { default as GLOBAL_COMPONENTS } from 'src/components/cms/global/Components' import RenderSections from 'src/components/cms/RenderSections' -import { getComponentKey } from 'src/utils/cms' import BannerNewsletter from 'src/components/sections/BannerNewsletter/BannerNewsletter' import { OverriddenDefaultBannerText as BannerText } from 'src/components/sections/BannerText/OverriddenDefaultBannerText' import { OverriddenDefaultCrossSellingShelf as CrossSellingShelf } from 'src/components/sections/CrossSellingShelf/OverriddenDefaultCrossSellingShelf' @@ -17,6 +16,7 @@ import PLUGINS_COMPONENTS from 'src/plugins' import MissingContentError from 'src/sdk/error/MissingContentError/MissingContentError' import PageProvider from 'src/sdk/overrides/PageProvider' import type { PageContentType } from 'src/server/cms' +import { getComponentKey } from 'src/utils/cms' import storeConfig from 'discovery.config' import { contentService } from 'src/server/content/service' @@ -114,7 +114,8 @@ export default function LandingPage({ export const getLandingPageBySlug = async ( slug: string, - previewData: PreviewData + previewData: PreviewData, + locale?: string ) => { try { if (storeConfig.cms.data) { @@ -128,6 +129,7 @@ export const getLandingPageBySlug = async ( await contentService.getSingleContent({ contentType: 'landingPage', previewData, + locale, documentId: pageBySlug.documentId, versionId: pageBySlug.versionId, releaseId: pageBySlug.releaseId, @@ -143,6 +145,7 @@ export const getLandingPageBySlug = async ( contentType: 'landingPage', previewData, slug, + locale, filters: previewData?.contentType !== 'landingPage' ? { filters: { 'settings.seo.slug': `/${slug}` } } diff --git a/packages/core/src/experimental/searchServerSideFunctions/getServerSideProps.ts b/packages/core/src/experimental/searchServerSideFunctions/getServerSideProps.ts index 5f118dbc3d..5549b912e5 100644 --- a/packages/core/src/experimental/searchServerSideFunctions/getServerSideProps.ts +++ b/packages/core/src/experimental/searchServerSideFunctions/getServerSideProps.ts @@ -3,10 +3,10 @@ import type { SearchPageProps } from './getStaticProps' import storeConfig from 'discovery.config' import { getGlobalSectionsData } from 'src/components/cms/GlobalSections' -import { type SearchContentType, getPage } from 'src/server/cms' +import type { SearchContentType } from 'src/server/cms' import { injectGlobalSections } from 'src/server/cms/global' -import type { PreviewData } from 'src/server/content/types' import { contentService } from 'src/server/content/service' +import type { PreviewData } from 'src/server/content/types' import { withLocaleValidationSSR } from 'src/utils/withLocaleValidation' const getServerSidePropsBase: GetServerSideProps< @@ -14,14 +14,14 @@ const getServerSidePropsBase: GetServerSideProps< Record, PreviewData > = async (context) => { - const { previewData, query, res } = context + const { previewData, query, res, locale } = context const searchTerm = (query.q as string)?.split('+').join(' ') const [ globalSectionsPromise, globalSectionsHeaderPromise, globalSectionsFooterPromise, - ] = getGlobalSectionsData(previewData) + ] = getGlobalSectionsData(previewData, locale) if (storeConfig.cms.data) { const cmsData = JSON.parse(storeConfig.cms.data) @@ -36,6 +36,7 @@ const getServerSidePropsBase: GetServerSideProps< contentService.getSingleContent({ contentType: 'search', previewData, + locale, documentId: page.documentId, versionId: page.versionId, releaseId: page.releaseId, diff --git a/packages/core/src/experimental/searchServerSideFunctions/getStaticProps.ts b/packages/core/src/experimental/searchServerSideFunctions/getStaticProps.ts index 51cf91cc2e..f2168b0461 100644 --- a/packages/core/src/experimental/searchServerSideFunctions/getStaticProps.ts +++ b/packages/core/src/experimental/searchServerSideFunctions/getStaticProps.ts @@ -24,12 +24,12 @@ export const getStaticProps: GetStaticProps< Record, PreviewData > = async (context) => { - const { previewData } = context + const { previewData, locale } = context const [ globalSectionsPromise, globalSectionsHeaderPromise, globalSectionsFooterPromise, - ] = getGlobalSectionsData(previewData) + ] = getGlobalSectionsData(previewData, locale) if (storeConfig.cms.data) { const cmsData = JSON.parse(storeConfig.cms.data) @@ -45,6 +45,7 @@ export const getStaticProps: GetStaticProps< contentService.getSingleContent({ contentType: 'search', previewData, + locale, documentId: page.documentId, versionId: page.versionId, releaseId: page.releaseId, @@ -71,6 +72,7 @@ export const getStaticProps: GetStaticProps< contentService.getSingleContent({ contentType: 'search', previewData, + locale, }), globalSectionsPromise, globalSectionsHeaderPromise, diff --git a/packages/core/src/pages/404.tsx b/packages/core/src/pages/404.tsx index 1e88c5582e..2e7252d411 100644 --- a/packages/core/src/pages/404.tsx +++ b/packages/core/src/pages/404.tsx @@ -8,7 +8,6 @@ import { import { default as GLOBAL_COMPONENTS } from 'src/components/cms/global/Components' import RenderSections from 'src/components/cms/RenderSections' -import { getComponentKey } from 'src/utils/cms' import { OverriddenDefaultEmptyState as EmptyState } from 'src/components/sections/EmptyState/OverriddenDefaultEmptyState' import CUSTOM_COMPONENTS from 'src/customizations/src/components' import PLUGINS_COMPONENTS from 'src/plugins' @@ -17,6 +16,7 @@ import type { PageContentType } from 'src/server/cms' import { injectGlobalSections } from 'src/server/cms/global' import { contentService } from 'src/server/content/service' import type { PreviewData } from 'src/server/content/types' +import { getComponentKey } from 'src/utils/cms' /* A list of components that can be used in the CMS. */ const COMPONENTS: Record> = { @@ -67,18 +67,19 @@ export const getStaticProps: GetStaticProps< Props, Record, PreviewData -> = async ({ previewData }) => { +> = async ({ previewData, locale }) => { const [ globalSectionsPromise, globalSectionsHeaderPromise, globalSectionsFooterPromise, - ] = getGlobalSectionsData(previewData) + ] = getGlobalSectionsData(previewData, locale) const [page, globalSections, globalSectionsHeader, globalSectionsFooter] = await Promise.all([ contentService.getSingleContent({ contentType: '404', previewData, + locale, }), globalSectionsPromise, globalSectionsHeaderPromise, diff --git a/packages/core/src/pages/500.tsx b/packages/core/src/pages/500.tsx index 3077bcc344..03019463df 100644 --- a/packages/core/src/pages/500.tsx +++ b/packages/core/src/pages/500.tsx @@ -8,7 +8,6 @@ import { import { default as GLOBAL_COMPONENTS } from 'src/components/cms/global/Components' import RenderSections from 'src/components/cms/RenderSections' -import { getComponentKey } from 'src/utils/cms' import { OverriddenDefaultEmptyState as EmptyState } from 'src/components/sections/EmptyState/OverriddenDefaultEmptyState' import CUSTOM_COMPONENTS from 'src/customizations/src/components' import PLUGINS_COMPONENTS from 'src/plugins' @@ -17,6 +16,7 @@ import type { PageContentType } from 'src/server/cms' import { injectGlobalSections } from 'src/server/cms/global' import { contentService } from 'src/server/content/service' import type { PreviewData } from 'src/server/content/types' +import { getComponentKey } from 'src/utils/cms' /* A list of components that can be used in the CMS. */ const COMPONENTS: Record> = { @@ -68,18 +68,19 @@ export const getStaticProps: GetStaticProps< Props, Record, PreviewData -> = async ({ previewData }) => { +> = async ({ previewData, locale }) => { const [ globalSectionsPromise, globalSectionsHeaderPromise, globalSectionsFooterPromise, - ] = getGlobalSectionsData(previewData) + ] = getGlobalSectionsData(previewData, locale) const [page, globalSections, globalSectionsHeader, globalSectionsFooter] = await Promise.all([ contentService.getSingleContent({ contentType: '500', previewData, + locale, }), globalSectionsPromise, globalSectionsHeaderPromise, diff --git a/packages/core/src/pages/[...slug].tsx b/packages/core/src/pages/[...slug].tsx index 9ec8ee0f81..8bcb648320 100644 --- a/packages/core/src/pages/[...slug].tsx +++ b/packages/core/src/pages/[...slug].tsx @@ -114,7 +114,7 @@ export const getStaticProps: GetStaticProps< Props, { slug: string[] }, PreviewData -> = async ({ params, previewData }) => { +> = async ({ params, previewData, locale }) => { const slug = params?.slug.join('/') ?? '' const rewrites = (await storeConfig.rewrites?.()) ?? [] @@ -122,9 +122,9 @@ export const getStaticProps: GetStaticProps< globalSectionsPromise, globalSectionsHeaderPromise, globalSectionsFooterPromise, - ] = getGlobalSectionsData(previewData) + ] = getGlobalSectionsData(previewData, locale) - const landingPagePromise = getLandingPageBySlug(slug, previewData) + const landingPagePromise = getLandingPageBySlug(slug, previewData, locale) const landingPage = await landingPagePromise @@ -176,6 +176,7 @@ export const getStaticProps: GetStaticProps< { previewData, slug, + locale, }, rewrites ), diff --git a/packages/core/src/pages/[slug]/p.tsx b/packages/core/src/pages/[slug]/p.tsx index 02f9d635c7..90dc7e01d5 100644 --- a/packages/core/src/pages/[slug]/p.tsx +++ b/packages/core/src/pages/[slug]/p.tsx @@ -12,7 +12,6 @@ import type { } from '@generated/graphql' import { default as GLOBAL_COMPONENTS } from 'src/components/cms/global/Components' import RenderSections from 'src/components/cms/RenderSections' -import { getComponentKey } from 'src/utils/cms' import BannerNewsletter from 'src/components/sections/BannerNewsletter/BannerNewsletter' import { OverriddenDefaultBannerText as BannerText } from 'src/components/sections/BannerText/OverriddenDefaultBannerText' import { OverriddenDefaultBreadcrumb as Breadcrumb } from 'src/components/sections/Breadcrumb/OverriddenDefaultBreadcrumb' @@ -27,6 +26,7 @@ import PLUGINS_COMPONENTS from 'src/plugins' import { getRedirect } from 'src/sdk/redirects' import { useSession } from 'src/sdk/session' import { execute } from 'src/server' +import { getComponentKey } from 'src/utils/cms' import storeConfig from 'discovery.config' import { @@ -295,14 +295,14 @@ export const getStaticProps: GetStaticProps< Props, { slug: string }, PreviewData -> = async ({ params, previewData }) => { +> = async ({ params, previewData, locale }) => { const slug = params?.slug ?? '' const [ globalSectionsPromise, globalSectionsHeaderPromise, globalSectionsFooterPromise, - ] = getGlobalSectionsData(previewData) + ] = getGlobalSectionsData(previewData, locale) const [ searchResult, @@ -349,6 +349,7 @@ export const getStaticProps: GetStaticProps< { previewData, slug, + locale, } ) diff --git a/packages/core/src/pages/checkout.tsx b/packages/core/src/pages/checkout.tsx index 6ccc486c0a..9cc9d2e44c 100644 --- a/packages/core/src/pages/checkout.tsx +++ b/packages/core/src/pages/checkout.tsx @@ -55,12 +55,12 @@ export const getStaticProps: GetStaticProps< Props, Record, Locator -> = async ({ previewData }) => { +> = async ({ previewData, locale }) => { const [ globalSectionsPromise, globalSectionsHeaderPromise, globalSectionsFooterPromise, - ] = getGlobalSectionsData(previewData) + ] = getGlobalSectionsData(previewData, locale) const [globalSections, globalSectionsHeader, globalSectionsFooter] = await Promise.all([ diff --git a/packages/core/src/pages/index.tsx b/packages/core/src/pages/index.tsx index c94e913875..ba473ae4bf 100644 --- a/packages/core/src/pages/index.tsx +++ b/packages/core/src/pages/index.tsx @@ -154,12 +154,12 @@ export const getStaticProps: GetStaticProps< Props, Record, PreviewData -> = async ({ previewData }) => { +> = async ({ previewData, locale }) => { const [ globalSectionsPromise, globalSectionsHeaderPromise, globalSectionsFooterPromise, - ] = getGlobalSectionsData(previewData) + ] = getGlobalSectionsData(previewData, locale) const serverDataPromise = getDynamicContent({ pageType: 'home' }) let cmsPage = null @@ -175,10 +175,12 @@ export const getStaticProps: GetStaticProps< documentId: cmsPage.documentId, versionId: cmsPage.versionId, releaseId: cmsPage.releaseId, + locale, }) : contentService.getSingleContent({ contentType: 'home', previewData, + locale, }) const [ diff --git a/packages/core/src/pages/login.tsx b/packages/core/src/pages/login.tsx index 12ff05754f..5595ab85e1 100644 --- a/packages/core/src/pages/login.tsx +++ b/packages/core/src/pages/login.tsx @@ -9,7 +9,6 @@ import { getGlobalSectionsData, } from 'src/components/cms/GlobalSections' import RenderSections from 'src/components/cms/RenderSections' -import { getComponentKey } from 'src/utils/cms' import { OverriddenDefaultEmptyState as EmptyState } from 'src/components/sections/EmptyState/OverriddenDefaultEmptyState' import CUSTOM_COMPONENTS from 'src/customizations/src/components' import PLUGINS_COMPONENTS from 'src/plugins' @@ -18,6 +17,7 @@ import type { PageContentType } from 'src/server/cms' import { injectGlobalSections } from 'src/server/cms/global' import { contentService } from 'src/server/content/service' import type { PreviewData } from 'src/server/content/types' +import { getComponentKey } from 'src/utils/cms' import storeConfig from '../../discovery.config' /* A list of components that can be used in the CMS. */ @@ -80,18 +80,19 @@ export const getStaticProps: GetStaticProps< Props, Record, PreviewData -> = async ({ previewData }) => { +> = async ({ previewData, locale }) => { const [ globalSectionsPromise, globalSectionsHeaderPromise, globalSectionsFooterPromise, - ] = getGlobalSectionsData(previewData) + ] = getGlobalSectionsData(previewData, locale) const [page, globalSections, globalSectionsHeader, globalSectionsFooter] = await Promise.all([ contentService.getSingleContent({ contentType: 'login', previewData, + locale, }), globalSectionsPromise, globalSectionsHeaderPromise, diff --git a/packages/core/src/server/cms/global.ts b/packages/core/src/server/cms/global.ts index ea71b81436..b2a2cbd33d 100644 --- a/packages/core/src/server/cms/global.ts +++ b/packages/core/src/server/cms/global.ts @@ -12,6 +12,31 @@ export function injectGlobalSections({ globalSectionsHeader, globalSectionsFooter, }: InjectGlobalSectionsProps) { + if ( + !globalSections || + !globalSections.sections || + globalSections.sections.length === 0 + ) { + console.warn( + 'Global Sections content type was not found or has no sections. Returning minimal structure for development.' + ) + // Return minimal structure with header and footer sections + const headerSections = globalSectionsHeader?.sections || [] + const footerSections = globalSectionsFooter?.sections || [] + + return { + sections: [ + ...headerSections, + { + name: 'Children', + data: {}, + }, + ...footerSections, + ], + settings: globalSections?.settings || {}, + } + } + const childrenIndex = globalSections.sections.findIndex( (section) => section.name === 'Children' ) diff --git a/packages/core/src/server/content/service.ts b/packages/core/src/server/content/service.ts index aa48d2ae16..555714ad2f 100644 --- a/packages/core/src/server/content/service.ts +++ b/packages/core/src/server/content/service.ts @@ -20,12 +20,26 @@ import { isBranchPreview, isContentPlatformSource } from './utils' type ContentResult = ContentData | (ContentEntry & PageContentType) export class ContentService { - private clientCP: ClientCP + private clientCPCache = new Map() - constructor() { - this.clientCP = new ClientCP({ + private getClientCP(locale?: string): ClientCP { + const currentLocale = locale ?? config.localization.defaultLocale + + // Reuse cached ClientCP for locale + if (this.clientCPCache.has(currentLocale)) { + return this.clientCPCache.get(currentLocale) + } + + // Create new instance only if not in cache + const clientCP = new ClientCP({ tenant: config.api.storeId, + locale: currentLocale, }) + + // Store in cache for future use + this.clientCPCache.set(currentLocale, clientCP) + + return clientCP } async getSingleContent( @@ -34,7 +48,7 @@ export class ContentService { const options = this.createContentOptions(params) if (isContentPlatformSource()) { - return this.getFromCP(options) + return this.getFromCP(options, params.locale) } return getPage(options.cmsOptions) } @@ -45,9 +59,15 @@ export class ContentService { const options = this.createContentOptions(params) if (isContentPlatformSource()) { + const clientCP = this.getClientCP(params.locale) const serviceParams = this.convertOptionsToParams(options) - const { entries } = await this.clientCP.listEntries(serviceParams) - return this.fillEntriesWithData(entries, serviceParams, options.isPreview) + const { entries } = await clientCP.listEntries(serviceParams) + return this.fillEntriesWithData( + entries, + serviceParams, + options.isPreview, + params.locale + ) } return getCMSPage(options.cmsOptions) } @@ -90,13 +110,15 @@ export class ContentService { } private async getFromCP( - options: ContentOptions + options: ContentOptions, + locale?: string ): Promise { const params = this.convertOptionsToParams(options) try { const entry: PageContentType = await this.getEntry( params, - options.isPreview + options.isPreview, + locale ) return entry as T } catch (err: unknown) { @@ -108,13 +130,15 @@ export class ContentService { private async fillEntriesWithData( entries: ContentEntry[], serviceParams: EntryPathParams, - isPreview: boolean + isPreview: boolean, + locale?: string ): Promise<{ data: (ContentEntry & PageContentType)[] }> { const data = await Promise.all( entries.map(async (entry) => { const entryData = await this.getEntryData( { ...serviceParams, entryId: entry.id }, - isPreview + isPreview, + locale ) return this.mergeEntryWithData(entry, entryData) }) @@ -124,38 +148,44 @@ export class ContentService { private async getEntry( params: EntryPathParams, - isPreview: boolean + isPreview: boolean, + locale?: string ): Promise { return params.entryId || params.slug - ? await this.getEntryData(params, isPreview) - : await this.fetchFirstEntryFromList(params, isPreview) + ? await this.getEntryData(params, isPreview, locale) + : await this.fetchFirstEntryFromList(params, isPreview, locale) } private async getEntryData( params: EntryPathParams, - isPreview: boolean + isPreview: boolean, + locale?: string ): Promise { if (!params.entryId && !params.slug) { const operation = isPreview ? 'Preview' : 'getEntry' throw new Error(`${operation} requires entryId or slug`) } + const clientCP = this.getClientCP(locale) + if (isPreview) { return params.entryId - ? (this.clientCP.previewEntryById(params) as Promise) - : (this.clientCP.previewEntryBySlug(params) as Promise) + ? (clientCP.previewEntryById(params) as Promise) + : (clientCP.previewEntryBySlug(params) as Promise) } return params.entryId - ? (this.clientCP.getEntry(params) as Promise) - : (this.clientCP.getEntryBySlug(params) as Promise) + ? (clientCP.getEntry(params) as Promise) + : (clientCP.getEntryBySlug(params) as Promise) } private async fetchFirstEntryFromList( params: EntryPathParams, - isPreview: boolean + isPreview: boolean, + locale?: string ): Promise { - const { entries } = await this.clientCP.listEntries(params) + const clientCP = this.getClientCP(locale) + const { entries } = await clientCP.listEntries(params) if (!entries || entries.length === 0) { console.warn('No entries found for params', params) return {} as PageContentType @@ -163,7 +193,11 @@ export class ContentService { if (entries.length > 1) { throw new MultipleContentError(params) } - return this.getEntryData({ ...params, entryId: entries[0].id }, isPreview) + return this.getEntryData( + { ...params, entryId: entries[0].id }, + isPreview, + locale + ) } private createContentOptions(params: ContentParams): ContentOptions { diff --git a/packages/core/src/server/content/types.ts b/packages/core/src/server/content/types.ts index b08ed933c9..5cbf7dfada 100644 --- a/packages/core/src/server/content/types.ts +++ b/packages/core/src/server/content/types.ts @@ -17,6 +17,7 @@ export interface ContentParams { versionId?: string releaseId?: string filters?: Record + locale?: string } export interface ContentOptions { diff --git a/packages/core/src/utils/utilities.ts b/packages/core/src/utils/utilities.ts index 2a92a21578..96328edda7 100644 --- a/packages/core/src/utils/utilities.ts +++ b/packages/core/src/utils/utilities.ts @@ -7,7 +7,10 @@ * textToKebabCase("Example Text!") // example-text * ``` */ -export function textToKebabCase(text: string): string { +export function textToKebabCase(text: string | null | undefined): string { + // Handle null, undefined, or empty strings + if (!text) return '' + // Replace spaces and special characters with hyphens let kebabCase = text.replace(/[^\w\s]/gi, '-') diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6dbc0155a6..eee2117197 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -494,8 +494,8 @@ importers: specifier: ^0.2.16 version: 0.2.16(encoding@0.1.13) '@vtex/client-cp': - specifier: 0.3.5 - version: 0.3.5 + specifier: 0.4.0 + version: 0.4.0 '@vtex/prettier-config': specifier: 1.0.0 version: 1.0.0(prettier@2.8.8) @@ -4212,8 +4212,8 @@ packages: '@vtex/client-cms@0.2.16': resolution: {integrity: sha512-mK5OiaaGHItVuispyy8yXLILnMx4aOJj7HkamOmAL12+KbnkiKKpO1vJEb3hRB16lK1rHtl7Q5H3aTFsMqrf0w==} - '@vtex/client-cp@0.3.5': - resolution: {integrity: sha512-uzvpYz1LHiPxBc0FmVVG0azfGWiYJhIJf2JgcNSsi3V5oxR/dwM6tbh+JigSNQpp6bNn9GglLvMpYboxORMsnQ==} + '@vtex/client-cp@0.4.0': + resolution: {integrity: sha512-tZxZL4ixR29fkhJ04mBcvCxD3ZBMP2dV5vXoubfgMnNP7PnhdREP4Oj7uR/CkL2jT3kRSS7u6pbetQ1ilwFByw==} engines: {node: '>=16'} '@vtex/faststore-sdk@0.1.1-canary.1': @@ -16064,7 +16064,7 @@ snapshots: transitivePeerDependencies: - encoding - '@vtex/client-cp@0.3.5': + '@vtex/client-cp@0.4.0': dependencies: axios: 1.13.2 transitivePeerDependencies: