From 3ede2d1fd3216bf82d2ffda4ec14d97041eb760d Mon Sep 17 00:00:00 2001 From: soniaklimas Date: Thu, 12 Dec 2024 13:39:56 +0100 Subject: [PATCH 1/7] feat: Copy PDP improvements from fashion --- apps/storefront/messages/en-GB.json | 18 +- apps/storefront/package.json | 1 + .../src/app/[locale]/(main)/layout.tsx | 2 +- .../[slug]/components/attributes-dropdown.tsx | 52 ++ .../[slug]/components/details-dropdown.tsx | 0 .../[slug]/components/product-display.tsx | 211 +++++++++ .../components/variant-selector-utils.ts | 235 +++++++++ .../[slug]/components/variant-selector.tsx | 444 ++++++------------ .../[slug]/hooks/useVariantSelection.tsx | 197 ++++++++ .../[locale]/(main)/products/[slug]/page.tsx | 80 +--- .../(main)/search/_filters/color-swatch.tsx | 86 ++++ .../(main)/search/_filters/filter-text.tsx | 52 ++ .../search/_filters/filters-container.tsx | 4 +- .../(main)/search/_listing/products-list.tsx | 4 +- .../src/app/[locale]/(main)/search/actions.ts | 9 +- .../src/app/[locale]/(main)/search/page.tsx | 11 +- apps/storefront/src/app/[locale]/layout.tsx | 10 +- .../src/components/search-product-card.tsx | 9 +- apps/storefront/src/config.ts | 2 +- apps/storefront/src/lib/json-ld.tsx | 4 +- packages/domain/src/objects/Product.ts | 4 + .../cms-menu/graphql/fragments/generated.ts | 133 ++---- .../cms-menu/graphql/queries/generated.ts | 155 ++---- .../search/infrastructure/search-infra.ts | 11 +- .../fragments/ProductDetailsFragment.graphql | 26 + .../ProductPricingInfoFragment.graphql | 7 + .../ProductVariantDetailsFragment.graphql | 3 + .../store/graphql/fragments/generated.ts | 83 +++- .../saleor/store/graphql/queries/generated.ts | 81 +++- .../get-product-details-infra.ts | 34 +- .../src/use-cases/search/types.ts | 1 + packages/ui/src/components/alert.tsx | 62 +++ pnpm-lock.yaml | 63 ++- 33 files changed, 1466 insertions(+), 628 deletions(-) create mode 100644 apps/storefront/src/app/[locale]/(main)/products/[slug]/components/attributes-dropdown.tsx create mode 100644 apps/storefront/src/app/[locale]/(main)/products/[slug]/components/details-dropdown.tsx create mode 100644 apps/storefront/src/app/[locale]/(main)/products/[slug]/components/product-display.tsx create mode 100644 apps/storefront/src/app/[locale]/(main)/products/[slug]/components/variant-selector-utils.ts create mode 100644 apps/storefront/src/app/[locale]/(main)/products/[slug]/hooks/useVariantSelection.tsx create mode 100644 apps/storefront/src/app/[locale]/(main)/search/_filters/color-swatch.tsx create mode 100644 apps/storefront/src/app/[locale]/(main)/search/_filters/filter-text.tsx create mode 100644 packages/infrastructure/src/public/saleor/store/graphql/fragments/ProductPricingInfoFragment.graphql create mode 100644 packages/ui/src/components/alert.tsx diff --git a/apps/storefront/messages/en-GB.json b/apps/storefront/messages/en-GB.json index e8b4c49..46040cf 100644 --- a/apps/storefront/messages/en-GB.json +++ b/apps/storefront/messages/en-GB.json @@ -17,7 +17,9 @@ "artists": "Artists", "in-stock": "In stock", "is-exclusive": "Is exclusive", - "is-digital": "Is digital" + "is-digital": "Is digital", + "size": "Size", + "color": "Color" }, "search": { "go-to-product": "Go to product {name}", @@ -110,7 +112,8 @@ "products": { "variant-select-label": "Variant select label", "variant-select": "Variant select", - "label-slug": "Label-{slug}" + "label-slug": "Label-{slug}", + "description": "Description" }, "address": { "companyName": "Company name", @@ -350,5 +353,16 @@ "faq": "FAQ", "privacy-policy": "Privacy Policy", "terms-of-use": "Terms of Use" + }, + "colors": { + "yellow": "Yellow", + "black": "Black", + "white": "White", + "beige": "Beige", + "grey": "Grey", + "khaki": "Khaki", + "pink": "Pink", + "red": "Red", + "green": "Green" } } diff --git a/apps/storefront/package.json b/apps/storefront/package.json index 578bddc..b6f46d5 100644 --- a/apps/storefront/package.json +++ b/apps/storefront/package.json @@ -32,6 +32,7 @@ "next-auth": "5.0.0-beta.17", "next-intl": "3.23.5", "nextjs-routes": "2.1.0", + "nuqs": "2.1.1", "react": "19.0.0", "react-dom": "19.0.0", "react-error-boundary": "4.0.13", diff --git a/apps/storefront/src/app/[locale]/(main)/layout.tsx b/apps/storefront/src/app/[locale]/(main)/layout.tsx index 1fceb07..518c779 100644 --- a/apps/storefront/src/app/[locale]/(main)/layout.tsx +++ b/apps/storefront/src/app/[locale]/(main)/layout.tsx @@ -18,7 +18,7 @@ export default async function Layout({ children }: { children: ReactNode }) { return ( <> -
+
diff --git a/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/attributes-dropdown.tsx b/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/attributes-dropdown.tsx new file mode 100644 index 0000000..4a5b1e7 --- /dev/null +++ b/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/attributes-dropdown.tsx @@ -0,0 +1,52 @@ +import type { Attribute } from "@nimara/domain/objects/Attribute"; +import { + Accordion, + AccordionContent, + AccordionItem, + AccordionTrigger, +} from "@nimara/ui/components/accordion"; +import { RichText } from "@nimara/ui/components/rich-text"; +import { parseEditorJSData } from "@nimara/ui/lib/richText"; + +export const AttributesDropdown = ({ + attributes, +}: { + attributes: Attribute[]; +}) => { + if (!attributes.length) { + return null; + } + + return ( + + {attributes.map((attribute) => { + if ( + !attribute.values.some( + (val) => val.richText && parseEditorJSData(val.richText), + ) + ) { + return; + } + + return ( + + + {attribute.name} + + + {attribute.values.map((val) => { + if (val.richText) { + return ( + + ); + } + + return

{val.name}

; + })} +
+
+ ); + })} +
+ ); +}; diff --git a/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/details-dropdown.tsx b/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/details-dropdown.tsx new file mode 100644 index 0000000..e69de29 diff --git a/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/product-display.tsx b/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/product-display.tsx new file mode 100644 index 0000000..c73b01b --- /dev/null +++ b/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/product-display.tsx @@ -0,0 +1,211 @@ +"use client"; + +import { Truck, Undo2 } from "lucide-react"; +import Image from "next/image"; + +import type { Cart } from "@nimara/domain/objects/Cart"; +import type { + Product, + ProductAvailability, +} from "@nimara/domain/objects/Product"; +import type { User } from "@nimara/domain/objects/User"; +import { + Alert, + AlertDescription, + AlertTitle, +} from "@nimara/ui/components/alert"; +import { + Carousel, + CarouselContent, + CarouselItem, +} from "@nimara/ui/components/carousel"; + +import { ProductImagePlaceholder } from "@/components/product-image-placeholder"; +import { SearchProductCard } from "@/components/search-product-card"; + +import { useVariantSelection } from "../hooks/useVariantSelection"; +import { AttributesDropdown } from "./attributes-dropdown"; +import { VariantSelector } from "./variant-selector"; +import { getImagesToDisplay } from "./variant-selector-utils"; + +export const ProductDisplay = ({ + product, + availability, + cart, + user, +}: { + availability: ProductAvailability; + cart: Cart | null; + product: Product; + user: (User & { accessToken: string | undefined }) | null; +}) => { + const { chosenVariant, looselyMatchingVariants } = useVariantSelection({ + product, + productAvailability: availability, + cart, + }); + + const { images, name, description } = product; + + // const imagesToDisplay = chosenVariant + // ? chosenVariant.images + // : looselyMatchingVariants.length > 0 + // ? looselyMatchingVariants + // .map(({ images }) => images) + // .flat() + // .filter( + // (image, index, self) => + // index === self.findIndex((i) => i.url === image.url), + // ) + // : images; + + // const imagesToDisplay = chosenVariant?.images?.length + // ? chosenVariant.images + // : looselyMatchingVariants.length > 0 + // ? looselyMatchingVariants + // .flatMap(({ images }) => images) + // .filter( + // (image, index, self) => + // index === self.findIndex((i) => i.url === image.url), + // ) + // : product.images; + + const imagesToDisplay = getImagesToDisplay({ + chosenVariant, + looselyMatchingVariants, + productImages: images, + }); + + console.log("imagesToDisplay", imagesToDisplay); + console.log("images", images); + + const hasFreeShipping = !!product.attributes + .find(({ slug }) => slug === "free-shipping") + ?.values.find(({ boolean }) => boolean); + + const hasFreeReturn = !!product.attributes + .find(({ slug }) => slug === "free-return") + ?.values.find(({ boolean }) => boolean); + + const attributesToDisplay = product.attributes.filter( + ({ slug }) => slug !== "free-shipping" && slug !== "free-return", + ); + + if (description && description?.length > 0) { + attributesToDisplay.unshift({ + name: "description", + slug: "description", + type: "RICH_TEXT", + values: [ + { + name: "description", + slug: "description", + richText: product.description ?? "", + boolean: false, + value: "", + date: undefined, + dateTime: undefined, + reference: undefined, + plainText: "", + }, + ], + }); + } + + return ( +
+
+
+ {imagesToDisplay.length ? ( + <> + {imagesToDisplay.map(({ url, alt }, i) => ( + {alt + ))} + + ) : ( + + )} +
+ + + + {imagesToDisplay.map(({ url, alt }) => ( + + {alt + + ))} + + + +
+
+

{name}

+ + + {hasFreeShipping && ( + + + Free shipping + + Standard parcel + + )} + + {hasFreeReturn && ( + + + Free 30 days return policy + + )} + + +
+
+
+ + {product.relatedProducts.length > 0 && ( +
+

You may also like

+ + + {product.relatedProducts.map((product) => ( + + + + ))} + + +
+ )} +
+ ); +}; diff --git a/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/variant-selector-utils.ts b/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/variant-selector-utils.ts new file mode 100644 index 0000000..233c4b5 --- /dev/null +++ b/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/variant-selector-utils.ts @@ -0,0 +1,235 @@ +"use client"; + +import { createParser, parseAsString } from "nuqs"; + +import type { + Attribute, + AttributeType, + AttributeValue, +} from "@nimara/domain/objects/Attribute"; +import type { Image } from "@nimara/domain/objects/common"; +import type { ProductVariant } from "@nimara/domain/objects/Product"; + +export type AttributeDetails = { + name: string; + slug: string; + type: Attribute["type"]; + values: AttributeValue[]; +}; + +export type ChosenAttribute = { slug: string; value: string }; + +export const getVariantSelectionAttributes = ( + variantId: string, + variants: ProductVariant[], +): ChosenAttribute[] => { + const variant = variants.find(({ id }) => id === variantId); + + return ( + variant?.selectionAttributes + .map(({ slug, values }) => { + if (values.length) { + return { + slug, + value: values[0].slug, + }; + } + + return null; + }) + .filter(Boolean) ?? [] + ); +}; + +export const getParserForAttributeType = (type: AttributeType) => { + switch (type) { + case "MULTISELECT": + return createParser({ + parse: (value: string) => (value ? value.split(",") : []), + serialize: (values: string[]) => { + if (!Array.isArray(values)) { + return ""; + } + + return values.join(","); + }, + }).withDefault([]); + + case "DROPDOWN": + case "SWATCH": + return parseAsString.withDefault(""); + + default: + return parseAsString.withDefault(""); + } +}; + +export const getAllNonSelectionAttributes = (variants: ProductVariant[]) => { + const allNonSelectionAttributes: AttributeDetails[] = []; + + variants.forEach(({ nonSelectionAttributes }) => { + nonSelectionAttributes.forEach( + ({ + values, + type, + name, + slug, + }: { + name: string; + slug: string; + type: Attribute["type"]; + values: AttributeValue[]; + }) => { + if (slug && values?.length > 0) { + const attributeMatch = allNonSelectionAttributes.find( + (attribute) => attribute.slug === slug, + ); + + if (attributeMatch) { + const currentValuesSlug = attributeMatch.values.map( + ({ slug }) => slug, + ); + + const newValues = values.filter( + ({ slug }) => !currentValuesSlug.includes(slug), + ); + + attributeMatch.values.push(...newValues); + } else { + allNonSelectionAttributes.push({ + slug, + values: [...values], + name, + type, + }); + } + } + }, + ); + }); + + return allNonSelectionAttributes; +}; + +export const getAllSelectionAttributes = (variants: ProductVariant[]) => { + const allSelectionAttributes: AttributeDetails[] = []; + + variants.forEach(({ selectionAttributes }) => { + selectionAttributes.forEach( + ({ + values, + type, + name, + slug, + }: { + name: string; + slug: string; + type: Attribute["type"]; + values: AttributeValue[]; + }) => { + if (slug && values?.length > 0) { + const attributeMatch = allSelectionAttributes.find( + (attribute) => attribute.slug === slug, + ); + + if (attributeMatch) { + const currentValuesSlug = attributeMatch.values.map( + ({ slug }) => slug, + ); + + const newValues = values.filter( + ({ slug }) => !currentValuesSlug.includes(slug), + ); + + attributeMatch.values.push(...newValues); + } else { + allSelectionAttributes.push({ + slug, + values: [...values], + name, + type, + }); + } + } + }, + ); + }); + + return allSelectionAttributes; +}; + +// ! currently unsued +export const isAttributeCombinationPossible = ( + allVariants: ProductVariant[], + chosenAttributes: ChosenAttribute[], +) => { + if (chosenAttributes.length < 1) { + return true; + } + + return allVariants.some((variant) => + chosenAttributes.every(({ slug, value }) => { + const variantAttribute = variant.selectionAttributes.find( + (attr) => attr.slug === slug, + ); + + return variantAttribute?.values.some( + (attrValue) => attrValue.slug === value, + ); + }), + ); +}; + +export const validateValue = ( + slug: string, + value: unknown, + allSelectionAttributes: Attribute[], +) => { + const attribute = allSelectionAttributes.find((attr) => attr.slug === slug); + + if (!attribute) { + return false; + } + + if (attribute.type === "MULTISELECT") { + return ( + Array.isArray(value) && + value.every((v) => attribute.values.some((av) => av.slug === v)) + ); + } + + return value === "" || attribute.values.some((av) => av.slug === value); +}; + +export const getImagesToDisplay = ({ + chosenVariant, + looselyMatchingVariants, + productImages, +}: { + chosenVariant: { images: Image[] } | null; + looselyMatchingVariants: { images: Image[] }[]; + productImages: Image[]; +}): Image[] => { + if (chosenVariant?.images?.length) { + return chosenVariant.images; + } + + if (looselyMatchingVariants.length > 0) { + const uniqueImages = looselyMatchingVariants + .flatMap(({ images }) => images) + .filter( + (image, index, self) => + index === self.findIndex((i) => i.url === image.url), + ); + + if (uniqueImages.length) { + return uniqueImages; + } + } + + if (productImages.length > 0) { + return productImages; + } + + return []; +}; diff --git a/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/variant-selector.tsx b/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/variant-selector.tsx index 099bad9..54778a9 100644 --- a/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/variant-selector.tsx +++ b/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/variant-selector.tsx @@ -1,379 +1,213 @@ "use client"; import { useTranslations } from "next-intl"; -import { useEffect, useState } from "react"; -import type { - Attribute, - AttributeValue, -} from "@nimara/domain/objects/Attribute"; -import type { Cart } from "@nimara/domain/objects/Cart"; -import type { - ProductAvailability, - ProductVariant, +import { type Cart } from "@nimara/domain/objects/Cart"; +import { + type Product, + type ProductAvailability, } from "@nimara/domain/objects/Product"; -import type { User } from "@nimara/domain/objects/User"; +import { type User } from "@nimara/domain/objects/User"; import { Label } from "@nimara/ui/components/label"; import { ToggleGroup, ToggleGroupItem, } from "@nimara/ui/components/toggle-group"; -import { usePathname, useRouter } from "@/i18n/routing"; import { useLocalizedFormatter } from "@/lib/formatters/use-localized-formatter"; -import { isVariantInStock } from "@/lib/product"; +import { cn } from "@/lib/utils"; +import { useVariantSelection } from "../hooks/useVariantSelection"; import { AddToBag } from "./add-to-bag"; import { VariantDropdown } from "./variant-dropdown"; -type AttributeDetails = { - name: string; - slug: string; - type: Attribute["type"]; - values: AttributeValue[]; -}; -type SelectionAttributeMap = AttributeDetails[]; - -type SelectedAttribute = { slug: string; value: string }; - -export const getIdFromHash = () => { - const isOnServer = typeof window === "undefined"; - - return isOnServer ? "" : location.hash.replace("#", ""); -}; - -const generateFullAttributeMap = (variants: ProductVariant[]) => { - const selectionAttributesMap: SelectionAttributeMap = []; - - variants.forEach(({ selectionAttributes }) => { - selectionAttributes.forEach( - ({ - values, - type, - name, - slug, - }: { - name: string; - slug: string; - type: Attribute["type"]; - values: AttributeValue[]; - }) => { - if (slug && values?.length > 0) { - const attributeMatch = selectionAttributesMap.find( - (attribute) => attribute.slug === slug, - ); - - if (attributeMatch) { - const currentValuesSlug = attributeMatch.values.map( - ({ slug }) => slug, - ); - - const newValues = values.filter( - ({ slug }) => !currentValuesSlug.includes(slug), - ); - - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument - attributeMatch.values.push(...newValues); - } else { - selectionAttributesMap.push({ - slug, - values: [...values], - name, - type, - }); - } - } - }, - ); - }); - - return selectionAttributesMap; -}; - -const narrowAttributeMapToSelectedAttributes = ( - variants: ProductVariant[], - selectionAttributesMap: SelectionAttributeMap, - selectedAttributes: SelectedAttribute[], -) => { - selectedAttributes.forEach((_, i, array) => { - let newValues: AttributeValue[] = []; - const attributesRequirements = array.slice(0, i + 1); - const selectionToUpdate = selectionAttributesMap[i + 1]; - - if (!selectionToUpdate) { - return; - } - - variants.forEach(({ selectionAttributes }) => { - const match = attributesRequirements.every((requirement) => { - return selectionAttributes.some(({ values, slug }) => { - const valuesSlug = values.map(({ slug }: { slug: string }) => slug); - - return ( - requirement.slug === slug && valuesSlug.includes(requirement.value) - ); - }); - }); - - if (match) { - const attributes = selectionAttributes.filter( - ({ slug, values }) => - selectionToUpdate.slug === slug && values.length, - ); - - if (attributes.length) { - newValues.push( - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument - ...attributes - .map(({ values }: { values: AttributeValue[] }) => values) - .flat(), - ); - } - } - }); - - const attributeMatch = selectionAttributesMap.find( - ({ slug }) => slug === selectionToUpdate.slug, - ); - - if (attributeMatch) { - attributeMatch.values = [...newValues]; - } - - newValues = []; - }); -}; - -const generateSelectionAttributeMap = ( - variants: ProductVariant[], - selectedAttributes: SelectedAttribute[], -): SelectionAttributeMap => { - const selectionAttributesMap = generateFullAttributeMap(variants); - - narrowAttributeMapToSelectedAttributes( - variants, - selectionAttributesMap, - selectedAttributes, - ); - - return selectionAttributesMap; -}; - -const generateSelectedMapForVariant = ( - variantId: string, - variants: ProductVariant[], -): SelectedAttribute[] => { - const variant = variants.find(({ id }) => id === variantId); - - return ( - variant?.selectionAttributes - .map(({ slug, values }) => { - if (values.length) { - return { - slug, - value: values[0].slug, - }; - } - - return null; - }) - .filter(Boolean) ?? [] - ); -}; - -type AttributePickerProps = { - availability: ProductAvailability; +type VariantSelectorProps = { cart: Cart | null; + product: Product; + productAvailability: ProductAvailability; user: (User & { accessToken: string | undefined }) | null; - variants: ProductVariant[]; }; export const VariantSelector = ({ - variants: productVariants, - availability: { - isAvailable: isProductAvailable, - variants: variantsAvailability, - startPrice, - }, + product, + productAvailability, cart, user, -}: AttributePickerProps) => { - const router = useRouter(); - const pathname = usePathname(); +}: VariantSelectorProps) => { const t = useTranslations(); const formatter = useLocalizedFormatter(); - - const [selectedVariantId, setSelectedVariantId] = useState(""); - const [variants, setVariants] = useState([]); - const [selectedAttributes, setSelectedAttributes] = useState< - SelectedAttribute[] - >(generateSelectedMapForVariant(selectedVariantId, productVariants)); - const [selectionAttributesMap, setSelectionAttributesMap] = - useState( - generateSelectionAttributeMap(productVariants, selectedAttributes), - ); - - const startingPrice = startPrice; - const selectedVariant = variantsAvailability - ? variantsAvailability.find(({ id }) => id === selectedVariantId) - : undefined; - const isVariantAvailable = selectedVariant - ? isVariantInStock(selectedVariant, cart?.lines) - : isProductAvailable; + const { + allSelectionAttributes, + areAllRequiredSelectionAttributesChosen, + chosenAttributes, + chosenVariant, + chosenVariantAvailability, + discriminatedVariantId, + isChosenVariantAvailable, + matchingVariants, + params, + setDiscriminatedVariantId, + setParams, + startPrice, + variantsAvailability, + } = useVariantSelection({ cart, product, productAvailability }); const getPrice = () => { - if (selectedVariant) { - if (selectedVariant.price.amount === 0) { + if (chosenVariantAvailability?.price) { + if (chosenVariantAvailability.price.amount === 0) { return t("common.free"); } - return formatter.price({ amount: selectedVariant.price.amount }); + return formatter.price({ + amount: chosenVariantAvailability.price.amount, + }); } - const hasFreeVariant = variantsAvailability.some( + const hasFreeVariant = variantsAvailability?.some( (variant) => variant.price.amount === 0, ); - if (hasFreeVariant || startingPrice.amount === 0) { + if (hasFreeVariant || startPrice?.amount === 0) { return t("common.free"); } return t("common.from-price", { - price: formatter.price({ amount: startingPrice.amount }), + price: formatter.price({ amount: startPrice?.amount ?? 0 }), }); }; - useEffect(() => { - const regeneratedSelectionAttributesMap = generateSelectionAttributeMap( - productVariants, - selectedAttributes, - ); - - if (selectedAttributes.length) { - const variantWithSelectedAttributes = productVariants.filter((variant) => - variant.selectionAttributes.every(({ slug, values }) => { - if (values.length) { - const attributeMatch = selectedAttributes.find( - (attribute) => slug === attribute.slug, - ); - - return attributeMatch?.value === values[0].slug; - } - - return true; - }), - ); - - if (variantWithSelectedAttributes) { - setVariants(variantWithSelectedAttributes); - } - } - - setSelectionAttributesMap(regeneratedSelectionAttributesMap); - }, [selectedAttributes]); - - useEffect(() => { - if (selectedVariantId) { - router.push(`${pathname}#${selectedVariantId}`, { scroll: false }); - } else if (getIdFromHash() && !selectedVariantId) { - router.push(pathname, { scroll: false }); - } - }, [selectedVariantId]); - - useEffect(() => { - /** - * Can't set this in initial useState due to hydration error - */ - const variantId = getIdFromHash(); - - // Check if the variant id exists in the product variants. - const isVariantIdValid = - productVariants.findIndex((v) => v.id === variantId) !== -1; - - if (variantId && isVariantIdValid) { - setSelectedVariantId(variantId); - setSelectedAttributes( - generateSelectedMapForVariant(variantId, productVariants), - ); - } - }, []); - return ( <>

{getPrice()}

-
- {selectionAttributesMap.map(({ slug, name, values }, index) => { - const arePreviousAttributesSelected = - index < selectedAttributes.length + 1; - const hasValues = values.length > 0; - - if (!(arePreviousAttributesSelected && hasValues)) { - return null; - } +
+ {allSelectionAttributes.map(({ slug, name, values, type }, index) => { + const isPreviousAttributeSelected = + index === 0 ? true : !!chosenAttributes[index - 1]?.value; - const defaultValue = selectedAttributes.find((val) => { + const chosenAttribute = chosenAttributes.find((val) => { if (val.slug === slug) { return values.some((v) => v.slug === val.value); } return false; - })?.value; + }); return (
- + + { - setVariants([]); - setSelectedVariantId(""); - setSelectedAttributes((values) => { - if (index < values.length - 1) { - // Undo if someone selects one of the previous attribute. - values.splice(index, values.length - index, { - slug, - value: valueSlug, - }); - } else if (valueSlug) { - // Insert new attribute choice. - values.splice(index, 1, { slug, value: valueSlug }); - } else { - // Replace current attribute choice. - values.splice(index, 1); - } - - return [...values]; + setDiscriminatedVariantId(""); + setParams({ + ...params, + [slug]: valueSlug, + }).catch((e) => { + console.error(e); }); }} > - {values.map(({ slug, name }) => ( - - {name} - - ))} + {values + .sort((a, b) => a.name.localeCompare(b.name)) + .map(({ slug: valueSlug, name: valueName, value }) => { + const isSelected = chosenAttributes.some( + (attr) => attr.slug === slug && attr.value === valueSlug, + ); + + return type === "SWATCH" ? ( + +
+ +
+ + ) : ( + + {valueName} + + ); + })}
); })} -
- -
+ {matchingVariants?.length > 1 && ( +
+ { + setDiscriminatedVariantId(variantId); + }} + selectedVariantId={discriminatedVariantId} + /> +
+ )}
1 + ? discriminatedVariantId + : chosenVariant + ? chosenVariant?.id + : areAllRequiredSelectionAttributesChosen + ? "NOTIFY_ME" + : "" + } + isVariantAvailable={ + matchingVariants?.length > 1 + ? true + : chosenVariant + ? isChosenVariantAvailable + : areAllRequiredSelectionAttributesChosen + ? false + : true + } user={user} /> diff --git a/apps/storefront/src/app/[locale]/(main)/products/[slug]/hooks/useVariantSelection.tsx b/apps/storefront/src/app/[locale]/(main)/products/[slug]/hooks/useVariantSelection.tsx new file mode 100644 index 0000000..46a5f90 --- /dev/null +++ b/apps/storefront/src/app/[locale]/(main)/products/[slug]/hooks/useVariantSelection.tsx @@ -0,0 +1,197 @@ +"use client"; + +import { useQueryStates } from "nuqs"; +import { useEffect, useMemo, useState } from "react"; + +import { type Cart } from "@nimara/domain/objects/Cart"; +import { + type Product, + type ProductAvailability, +} from "@nimara/domain/objects/Product"; + +import { isVariantInStock } from "@/lib/product"; + +import { + getAllSelectionAttributes, + getParserForAttributeType, + validateValue, +} from "../components/variant-selector-utils"; + +export const useVariantSelection = ({ + cart, + product, + productAvailability, +}: { + cart: Cart | null; + product: Product; + productAvailability: ProductAvailability; +}) => { + const [discriminatedVariantId, setDiscriminatedVariantId] = useState(""); + const productVariants = product?.variants; + const variantsAvailability = productAvailability?.variants; + + const allSelectionAttributes = useMemo( + () => getAllSelectionAttributes(productVariants), + [productVariants], + ); + + const [params, setParams] = useQueryStates( + Object.fromEntries( + allSelectionAttributes.map((attr) => [ + attr.slug, + getParserForAttributeType(attr.type), + ]), + ), + { + history: "replace", + }, + ); + + const chosenAttributes = useMemo( + () => + Object.entries(params ?? {}) + .map(([slug, value]) => { + return typeof value === "string" ? { slug, value } : null; + }) + .filter(Boolean), + [params], + ); + + useEffect(() => { + if (!params) { + return; + } + + const validatedParams = Object.fromEntries( + allSelectionAttributes.map((attr, index) => { + const currentValue = params[attr.slug]; + + if (!validateValue(attr.slug, currentValue, allSelectionAttributes)) { + return [attr.slug, attr.type === "MULTISELECT" ? [] : ""]; + } + + return [ + attr.slug, + index > 0 && params[allSelectionAttributes?.[index - 1]?.slug] === "" + ? "" + : currentValue, + ]; + }), + ); + + // this selects only the first attribute's value if only one value is available + if ( + allSelectionAttributes?.length > 0 && + allSelectionAttributes?.[0]?.values?.length === 1 + ) { + validatedParams[allSelectionAttributes?.[0]?.slug] = + allSelectionAttributes?.[0]?.values?.[0]?.slug; + } + + if (JSON.stringify(params) !== JSON.stringify(validatedParams)) { + setParams(validatedParams).catch((e) => { + console.error(e); + }); + } + }, [ + params, + allSelectionAttributes, + setParams, + setDiscriminatedVariantId, + setParams, + ]); + + const areAllRequiredSelectionAttributesChosen = allSelectionAttributes.every( + ({ slug }) => { + const value = params?.[slug]; + + return value && (Array.isArray(value) ? value.length > 0 : value !== ""); + }, + ); + + const matchingVariants = useMemo(() => { + if (!areAllRequiredSelectionAttributesChosen) { + return []; + } + + return ( + productVariants?.filter((variant) => + variant.selectionAttributes.every(({ slug, values, type }) => { + if (!values.length) { + return true; + } + + const selectedValue = params?.[slug]; + + if (!selectedValue) { + return false; + } + + return type === "MULTISELECT" + ? (selectedValue as string[]).every((v) => + values.some((attr) => attr.slug === v), + ) + : values.some((v) => v.slug === selectedValue); + }), + ) ?? [] + ); + }, [params, productVariants, allSelectionAttributes]); + + const looselyMatchingVariants = useMemo(() => { + return productVariants.filter( + ({ selectionAttributes: productVariantSelectionAttributes }) => { + return chosenAttributes.every( + ({ slug: chosenAttributeSlug, value: chosenAttributeValue }) => { + if (chosenAttributeValue === "") { + return true; + } + + return productVariantSelectionAttributes.some( + (productVariantSelectionAttribute) => { + return ( + productVariantSelectionAttribute.slug === + chosenAttributeSlug && + productVariantSelectionAttribute.values.some((value) => { + return value.slug === chosenAttributeValue; + }) + ); + }, + ); + }, + ); + }, + ); + }, [chosenAttributes, productVariants]); + + const chosenVariant = discriminatedVariantId + ? (productVariants?.find(({ id }) => id === discriminatedVariantId) ?? null) + : matchingVariants?.length === 1 + ? matchingVariants?.[0] + : null; + + const chosenVariantAvailability = variantsAvailability + ? variantsAvailability.find(({ id }) => id === chosenVariant?.id) + : undefined; + + const isChosenVariantAvailable = + chosenVariant && chosenVariantAvailability + ? isVariantInStock(chosenVariantAvailability, cart?.lines) + : !!productAvailability?.isAvailable; + + return { + allSelectionAttributes, + areAllRequiredSelectionAttributesChosen, + chosenAttributes, + chosenVariant, + chosenVariantAvailability, + discriminatedVariantId, + looselyMatchingVariants, + isChosenVariantAvailable, + matchingVariants, + params, + setDiscriminatedVariantId, + setParams, + startPrice: productAvailability?.startPrice, + variantsAvailability, + }; +}; diff --git a/apps/storefront/src/app/[locale]/(main)/products/[slug]/page.tsx b/apps/storefront/src/app/[locale]/(main)/products/[slug]/page.tsx index 9732074..a64d153 100644 --- a/apps/storefront/src/app/[locale]/(main)/products/[slug]/page.tsx +++ b/apps/storefront/src/app/[locale]/(main)/products/[slug]/page.tsx @@ -1,23 +1,14 @@ import { cookies } from "next/headers"; -import Image from "next/image"; import { notFound } from "next/navigation"; -import { - Carousel, - CarouselContent, - CarouselItem, -} from "@nimara/ui/components/carousel"; -import { RichText } from "@nimara/ui/components/rich-text"; - import { getAccessToken } from "@/auth"; -import { ProductImagePlaceholder } from "@/components/product-image-placeholder"; import { CACHE_TTL, COOKIE_KEY } from "@/config"; import { clientEnvs } from "@/envs/client"; import { JsonLd, productToJsonLd } from "@/lib/json-ld"; import { getCurrentRegion } from "@/regions/server"; import { cartService, storeService, userService } from "@/services"; -import { VariantSelector } from "./components/variant-selector"; +import { ProductDisplay } from "./components/product-display"; export async function generateMetadata(props: { params: Promise<{ slug: string }>; @@ -67,6 +58,7 @@ export default async function Page(props: { apiURI: clientEnvs.NEXT_PUBLIC_SALEOR_API_URL, countryCode: region.market.countryCode, }; + const checkoutId = (await cookies()).get(COOKIE_KEY.checkoutId)?.value; const [{ data }, cart, user] = await Promise.all([ @@ -92,64 +84,16 @@ export default async function Page(props: { notFound(); } - const { availability, product } = data; - const { images, name, description, variants } = product; - return ( -
-
-
- {images.length ? ( - <> - {images.map(({ url, alt }, i) => ( - {alt - ))} - - ) : ( - - )} -
- - - - {images.map(({ url, alt }) => ( - - {alt - - ))} - - - -
-

{name}

- - - - -
-
- -
+ <> + + + + ); } diff --git a/apps/storefront/src/app/[locale]/(main)/search/_filters/color-swatch.tsx b/apps/storefront/src/app/[locale]/(main)/search/_filters/color-swatch.tsx new file mode 100644 index 0000000..22d628c --- /dev/null +++ b/apps/storefront/src/app/[locale]/(main)/search/_filters/color-swatch.tsx @@ -0,0 +1,86 @@ +import { getTranslations } from "next-intl/server"; + +import type { Facet } from "@nimara/infrastructure/use-cases/search/types"; +import { Toggle } from "@nimara/ui/components/toggle"; + +import { cn } from "@/lib/utils"; +import type { TranslationMessage } from "@/types"; + +export const colors = [ + "yellow", + "black", + "white", + "beige", + "brown", + "grey", + "coffee", + "red", + "green", + "blue", +] as const; +export type ColorValue = (typeof colors)[number]; + +const colorsMap = { + yellow: "bg-[#fffa4B]", + black: "bg-black", + white: "bg-white", + beige: "bg-[#f5f5dc]", + brown: "bg-[#8b4513]", + grey: "bg-[#808080]", + coffee: "bg-[#7f540f]", + red: "bg-[#f62c2c]", + green: "bg-[#4dd273]", + blue: "bg-[#52a9f5]", +}; + +export const ColorSwatch = async ({ + facet: { choices, name, slug, messageKey }, + searchParams, +}: { + facet: Facet; + searchParams: Record; +}) => { + const t = await getTranslations(); + const label = name ?? t(messageKey as TranslationMessage); + const defaultValue = searchParams[slug]?.split(".") ?? []; + + return ( +
+ {label && ( +

{label}

+ )} +
+ {choices?.map((choice) => ( +
+ + +
+
+ ); +}; diff --git a/apps/storefront/src/app/[locale]/(main)/search/_filters/filter-text.tsx b/apps/storefront/src/app/[locale]/(main)/search/_filters/filter-text.tsx new file mode 100644 index 0000000..032d067 --- /dev/null +++ b/apps/storefront/src/app/[locale]/(main)/search/_filters/filter-text.tsx @@ -0,0 +1,52 @@ +import { getTranslations } from "next-intl/server"; + +import type { Facet } from "@nimara/infrastructure/use-cases/search/types"; +import { Toggle } from "@nimara/ui/components/toggle"; + +import { type TranslationMessage } from "@/types"; + +export const FilterText = async ({ + facet: { choices, name, slug, messageKey }, + searchParams, +}: { + facet: Facet; + searchParams: Record; +}) => { + const t = await getTranslations(); + const defaultValue = searchParams[slug]?.split(".") ?? []; + const label = name ?? t(messageKey as TranslationMessage); + + return ( +
+ {label && ( +

{label}

+ )} +
+ {choices?.map((choice) => ( +
+ + + + +
+ ))} +
+
+ ); +}; diff --git a/apps/storefront/src/app/[locale]/(main)/search/_filters/filters-container.tsx b/apps/storefront/src/app/[locale]/(main)/search/_filters/filters-container.tsx index 69539b3..77bfb8f 100644 --- a/apps/storefront/src/app/[locale]/(main)/search/_filters/filters-container.tsx +++ b/apps/storefront/src/app/[locale]/(main)/search/_filters/filters-container.tsx @@ -112,7 +112,7 @@ export const FiltersContainer = async ({
{facets - .filter(({ type }) => type !== "BOOLEAN") + ?.filter(({ type }) => type !== "BOOLEAN") .map((facet) => renderFilterComponent(facet, searchParams))}
@@ -122,7 +122,7 @@ export const FiltersContainer = async ({

{facets - .filter(({ type }) => type === "BOOLEAN") + ?.filter(({ type }) => type === "BOOLEAN") .map((facet) => renderFilterComponent(facet, searchParams), )} diff --git a/apps/storefront/src/app/[locale]/(main)/search/_listing/products-list.tsx b/apps/storefront/src/app/[locale]/(main)/search/_listing/products-list.tsx index f099392..7e0f46f 100644 --- a/apps/storefront/src/app/[locale]/(main)/search/_listing/products-list.tsx +++ b/apps/storefront/src/app/[locale]/(main)/search/_listing/products-list.tsx @@ -9,8 +9,8 @@ type Props = { export const ProductsList = ({ products }: Props) => { return (
- {products.map((product) => ( - + {products.map((product, index) => ( + ))}
); diff --git a/apps/storefront/src/app/[locale]/(main)/search/actions.ts b/apps/storefront/src/app/[locale]/(main)/search/actions.ts index 90050ec..281ef04 100644 --- a/apps/storefront/src/app/[locale]/(main)/search/actions.ts +++ b/apps/storefront/src/app/[locale]/(main)/search/actions.ts @@ -1,8 +1,7 @@ "use server"; -import { redirect } from "next/navigation"; - import { DEFAULT_SORT_BY } from "@/config"; +import { redirect } from "@/i18n/routing"; import { paths } from "@/lib/paths"; const passThroughParams = ["sortBy", "limit", "q"] as const; @@ -15,7 +14,11 @@ export const handleFiltersFormSubmit = async ( const params = new URLSearchParams(); formData.forEach((value, key) => { - if (value && typeof value === "string" && !formClear) { + if (key.startsWith("group")) { + const [k, v] = key.replace("group", "").split("-"); + + params.set(k, params.getAll(k).concat(v).join(".")); + } else if (value && typeof value === "string" && !formClear) { params.set(key, value); } }); diff --git a/apps/storefront/src/app/[locale]/(main)/search/page.tsx b/apps/storefront/src/app/[locale]/(main)/search/page.tsx index 1160a35..fef5539 100644 --- a/apps/storefront/src/app/[locale]/(main)/search/page.tsx +++ b/apps/storefront/src/app/[locale]/(main)/search/page.tsx @@ -17,6 +17,7 @@ type SearchParams = Promise<{ after?: string; before?: string; category?: string; + collection?: string; limit?: string; page?: string; q?: string; @@ -25,6 +26,7 @@ type SearchParams = Promise<{ export async function generateMetadata(props: { searchParams: SearchParams }) { const searchParams = await props.searchParams; + const t = await getTranslations("search"); return { @@ -91,9 +93,12 @@ export default async function Page(props: { searchParams: SearchParams }) { return t("results-for", { query }); } - if (searchParams.category) { - return ( - searchParams.category[0].toUpperCase() + searchParams.category.slice(1) + const headerKey = searchParams.category || searchParams.collection; + + if (headerKey) { + return (headerKey[0].toUpperCase() + headerKey.slice(1)).replaceAll( + "-", + " & ", ); } diff --git a/apps/storefront/src/app/[locale]/layout.tsx b/apps/storefront/src/app/[locale]/layout.tsx index 47c5a0d..5ceefbd 100644 --- a/apps/storefront/src/app/[locale]/layout.tsx +++ b/apps/storefront/src/app/[locale]/layout.tsx @@ -4,6 +4,7 @@ import type { Metadata } from "next"; import { notFound } from "next/navigation"; import { NextIntlClientProvider } from "next-intl"; import { getMessages } from "next-intl/server"; +import { NuqsAdapter } from "nuqs/adapters/next/app"; import type { ReactNode } from "react"; import { Toaster } from "@nimara/ui/components/toaster"; @@ -33,7 +34,6 @@ export default async function LocaleLayout({ if (!routing.locales.includes(locale as any)) { notFound(); } - const messages = await getMessages(); return ( @@ -42,9 +42,11 @@ export default async function LocaleLayout({ className={cn("min-h-[100dvh]", "flex flex-col", aspekta.className)} > - {children} - - + + {children} + + + diff --git a/apps/storefront/src/components/search-product-card.tsx b/apps/storefront/src/components/search-product-card.tsx index b309630..e94de6e 100644 --- a/apps/storefront/src/components/search-product-card.tsx +++ b/apps/storefront/src/components/search-product-card.tsx @@ -6,7 +6,7 @@ import type { PropsWithChildren } from "react"; import type { SearchProduct } from "@nimara/domain/objects/SearchProduct"; -import productPlaceholder from "@/assets/product_placeholder.svg?url"; +import productPlaceholder from "@/assets/product_placeholder.svg"; import { Link } from "@/i18n/routing"; import { useLocalizedFormatter } from "@/lib/formatters/use-localized-formatter"; import { paths } from "@/lib/paths"; @@ -26,8 +26,8 @@ export const ProductPrice = ({ children }: PropsWithChildren) => { }; export const ProductThumbnail = ({ alt, ...props }: ImageProps) => ( -
- {alt} +
+ {alt}
); @@ -61,7 +61,8 @@ export const SearchProductCard = ({ src={thumbnail?.url ?? productPlaceholder} width={width ?? 256} sizes={ - sizes ?? "(max-width: 720px) 100vw, (max-width: 1024px) 50vw, 33vw" + sizes ?? + "(max-width: 720px) 100vw, (max-width: 1024px) 50vw, (max-width: 1294px) 33vw, 25vw" } />
diff --git a/apps/storefront/src/config.ts b/apps/storefront/src/config.ts index b65de2e..8177773 100644 --- a/apps/storefront/src/config.ts +++ b/apps/storefront/src/config.ts @@ -17,7 +17,7 @@ export const CACHE_TTL = { }; export const DEFAULT_DEBOUNCE_TIME_IN_MS = 500; export const DEFAULT_SORT_BY = "price-asc"; -export const DEFAULT_RESULTS_PER_PAGE = 12; +export const DEFAULT_RESULTS_PER_PAGE = 16; export const COOKIE_KEY = { checkoutId: "checkoutId", diff --git a/apps/storefront/src/lib/json-ld.tsx b/apps/storefront/src/lib/json-ld.tsx index bac8b09..4b984c1 100644 --- a/apps/storefront/src/lib/json-ld.tsx +++ b/apps/storefront/src/lib/json-ld.tsx @@ -35,8 +35,8 @@ export const productToJsonLd = ( name: product.name, image: { "@type": "ImageObject", - url: product.images[0].url, - description: product.images[0].alt ?? undefined, + url: product.images[0]?.url ?? undefined, + description: product.images[0]?.alt ?? undefined, }, description: product.description ?? undefined, offers: { diff --git a/packages/domain/src/objects/Product.ts b/packages/domain/src/objects/Product.ts index f75475c..49956d3 100644 --- a/packages/domain/src/objects/Product.ts +++ b/packages/domain/src/objects/Product.ts @@ -1,5 +1,6 @@ import type { Attribute } from "./Attribute"; import type { Image, TaxedPrice } from "./common"; +import { type SearchProduct } from "./SearchProduct"; export type ProductAvailability = { isAvailable: boolean; @@ -16,15 +17,18 @@ export type ProductVariantAvailability = { }; export type Product = { + attributes: Attribute[]; description: string | null; id: string; images: Image[]; name: string; + relatedProducts: SearchProduct[]; variants: ProductVariant[]; }; export type ProductVariant = { id: string; + images: Image[]; name: string; nonSelectionAttributes: Attribute[]; selectionAttributes: Attribute[]; diff --git a/packages/infrastructure/src/public/saleor/cms-menu/graphql/fragments/generated.ts b/packages/infrastructure/src/public/saleor/cms-menu/graphql/fragments/generated.ts index b85d789..4fb0e90 100644 --- a/packages/infrastructure/src/public/saleor/cms-menu/graphql/fragments/generated.ts +++ b/packages/infrastructure/src/public/saleor/cms-menu/graphql/fragments/generated.ts @@ -1,101 +1,43 @@ -import type * as Types from "@nimara/codegen/schema"; - -import type { DocumentTypeDecoration } from "@graphql-typed-document-node/core"; -export type MenuItem_MenuItem_translation_MenuItemTranslation = { - name: string; -}; - -export type MenuItem_MenuItem_category_Category_translation_CategoryTranslation = - { name: string | null; description: string | null }; - -export type MenuItem_MenuItem_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_attributes_SelectedAttribute_attribute_Attribute_translation_AttributeTranslation = - { name: string }; - -export type MenuItem_MenuItem_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_attributes_SelectedAttribute_attribute_Attribute = - { - name: string | null; - slug: string | null; - translation: MenuItem_MenuItem_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_attributes_SelectedAttribute_attribute_Attribute_translation_AttributeTranslation | null; - }; - -export type MenuItem_MenuItem_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_attributes_SelectedAttribute = - { - attribute: MenuItem_MenuItem_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_attributes_SelectedAttribute_attribute_Attribute; - }; - -export type MenuItem_MenuItem_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product = - { - id: string; - attributes: Array; - }; - -export type MenuItem_MenuItem_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge = - { - node: MenuItem_MenuItem_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product; - }; - -export type MenuItem_MenuItem_category_Category_products_ProductCountableConnection = - { - edges: Array; - }; - -export type MenuItem_MenuItem_category_Category = { - id: string; - slug: string; - name: string; - description: string | null; - translation: MenuItem_MenuItem_category_Category_translation_CategoryTranslation | null; - products: MenuItem_MenuItem_category_Category_products_ProductCountableConnection | null; -}; - -export type MenuItem_MenuItem_collection_Collection_translation_CollectionTranslation = - { name: string | null; description: string | null }; - -export type MenuItem_MenuItem_collection_Collection_backgroundImage_Image = { - url: string; -}; - -export type MenuItem_MenuItem_collection_Collection = { - id: string; - name: string; - slug: string; - description: string | null; - translation: MenuItem_MenuItem_collection_Collection_translation_CollectionTranslation | null; - backgroundImage: MenuItem_MenuItem_collection_Collection_backgroundImage_Image | null; -}; - -export type MenuItem_MenuItem_page_Page_translation_PageTranslation = { - title: string | null; -}; - -export type MenuItem_MenuItem_page_Page = { - id: string; - title: string; - slug: string; - translation: MenuItem_MenuItem_page_Page_translation_PageTranslation | null; -}; - -export type MenuItem = { - id: string; - name: string; - level: number; - url: string | null; - translation: MenuItem_MenuItem_translation_MenuItemTranslation | null; - category: MenuItem_MenuItem_category_Category | null; - collection: MenuItem_MenuItem_collection_Collection | null; - page: MenuItem_MenuItem_page_Page | null; -}; +import type * as Types from '@nimara/codegen/schema'; + +import type { DocumentTypeDecoration } from '@graphql-typed-document-node/core'; +export type MenuItem_MenuItem_translation_MenuItemTranslation = { name: string }; + +export type MenuItem_MenuItem_category_Category_translation_CategoryTranslation = { name: string | null, description: string | null }; + +export type MenuItem_MenuItem_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_attributes_SelectedAttribute_attribute_Attribute_translation_AttributeTranslation = { name: string }; + +export type MenuItem_MenuItem_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_attributes_SelectedAttribute_attribute_Attribute = { name: string | null, slug: string | null, translation: MenuItem_MenuItem_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_attributes_SelectedAttribute_attribute_Attribute_translation_AttributeTranslation | null }; + +export type MenuItem_MenuItem_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_attributes_SelectedAttribute = { attribute: MenuItem_MenuItem_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_attributes_SelectedAttribute_attribute_Attribute }; + +export type MenuItem_MenuItem_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product = { id: string, attributes: Array }; + +export type MenuItem_MenuItem_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge = { node: MenuItem_MenuItem_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product }; + +export type MenuItem_MenuItem_category_Category_products_ProductCountableConnection = { edges: Array }; + +export type MenuItem_MenuItem_category_Category = { id: string, slug: string, name: string, description: string | null, translation: MenuItem_MenuItem_category_Category_translation_CategoryTranslation | null, products: MenuItem_MenuItem_category_Category_products_ProductCountableConnection | null }; + +export type MenuItem_MenuItem_collection_Collection_translation_CollectionTranslation = { name: string | null, description: string | null }; + +export type MenuItem_MenuItem_collection_Collection_backgroundImage_Image = { url: string }; + +export type MenuItem_MenuItem_collection_Collection = { id: string, name: string, slug: string, description: string | null, translation: MenuItem_MenuItem_collection_Collection_translation_CollectionTranslation | null, backgroundImage: MenuItem_MenuItem_collection_Collection_backgroundImage_Image | null }; + +export type MenuItem_MenuItem_page_Page_translation_PageTranslation = { title: string | null }; + +export type MenuItem_MenuItem_page_Page = { id: string, title: string, slug: string, translation: MenuItem_MenuItem_page_Page_translation_PageTranslation | null }; + +export type MenuItem = { id: string, name: string, level: number, url: string | null, translation: MenuItem_MenuItem_translation_MenuItemTranslation | null, category: MenuItem_MenuItem_category_Category | null, collection: MenuItem_MenuItem_collection_Collection | null, page: MenuItem_MenuItem_page_Page | null }; export class TypedDocumentString extends String implements DocumentTypeDecoration { - __apiType?: DocumentTypeDecoration["__apiType"]; + __apiType?: DocumentTypeDecoration['__apiType']; - constructor( - private value: string, - public __meta__?: Record, - ) { + constructor(private value: string, public __meta__?: Record) { super(value); } @@ -103,8 +45,7 @@ export class TypedDocumentString return this.value; } } -export const MenuItem = new TypedDocumentString( - ` +export const MenuItem = new TypedDocumentString(` fragment MenuItem on MenuItem { id name @@ -161,6 +102,4 @@ export const MenuItem = new TypedDocumentString( } url } - `, - { fragmentName: "MenuItem" }, -) as unknown as TypedDocumentString; + `, {"fragmentName":"MenuItem"}) as unknown as TypedDocumentString; \ No newline at end of file diff --git a/packages/infrastructure/src/public/saleor/cms-menu/graphql/queries/generated.ts b/packages/infrastructure/src/public/saleor/cms-menu/graphql/queries/generated.ts index 0a49dac..84b752a 100644 --- a/packages/infrastructure/src/public/saleor/cms-menu/graphql/queries/generated.ts +++ b/packages/infrastructure/src/public/saleor/cms-menu/graphql/queries/generated.ts @@ -1,127 +1,60 @@ -import type * as Types from "@nimara/codegen/schema"; - -import type { DocumentTypeDecoration } from "@graphql-typed-document-node/core"; -export type MenuGet_menu_Menu_items_MenuItem_children_MenuItem_translation_MenuItemTranslation = - { name: string }; - -export type MenuGet_menu_Menu_items_MenuItem_children_MenuItem_category_Category_translation_CategoryTranslation = - { name: string | null; description: string | null }; - -export type MenuGet_menu_Menu_items_MenuItem_children_MenuItem_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_attributes_SelectedAttribute_attribute_Attribute_translation_AttributeTranslation = - { name: string }; - -export type MenuGet_menu_Menu_items_MenuItem_children_MenuItem_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_attributes_SelectedAttribute_attribute_Attribute = - { - name: string | null; - slug: string | null; - translation: MenuGet_menu_Menu_items_MenuItem_children_MenuItem_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_attributes_SelectedAttribute_attribute_Attribute_translation_AttributeTranslation | null; - }; - -export type MenuGet_menu_Menu_items_MenuItem_children_MenuItem_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_attributes_SelectedAttribute = - { - attribute: MenuGet_menu_Menu_items_MenuItem_children_MenuItem_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_attributes_SelectedAttribute_attribute_Attribute; - }; - -export type MenuGet_menu_Menu_items_MenuItem_children_MenuItem_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product = - { - id: string; - attributes: Array; - }; - -export type MenuGet_menu_Menu_items_MenuItem_children_MenuItem_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge = - { - node: MenuGet_menu_Menu_items_MenuItem_children_MenuItem_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product; - }; - -export type MenuGet_menu_Menu_items_MenuItem_children_MenuItem_category_Category_products_ProductCountableConnection = - { - edges: Array; - }; - -export type MenuGet_menu_Menu_items_MenuItem_children_MenuItem_category_Category = - { - id: string; - slug: string; - name: string; - description: string | null; - translation: MenuGet_menu_Menu_items_MenuItem_children_MenuItem_category_Category_translation_CategoryTranslation | null; - products: MenuGet_menu_Menu_items_MenuItem_children_MenuItem_category_Category_products_ProductCountableConnection | null; - }; - -export type MenuGet_menu_Menu_items_MenuItem_children_MenuItem_collection_Collection_translation_CollectionTranslation = - { name: string | null; description: string | null }; - -export type MenuGet_menu_Menu_items_MenuItem_children_MenuItem_collection_Collection_backgroundImage_Image = - { url: string }; - -export type MenuGet_menu_Menu_items_MenuItem_children_MenuItem_collection_Collection = - { - id: string; - name: string; - slug: string; - description: string | null; - translation: MenuGet_menu_Menu_items_MenuItem_children_MenuItem_collection_Collection_translation_CollectionTranslation | null; - backgroundImage: MenuGet_menu_Menu_items_MenuItem_children_MenuItem_collection_Collection_backgroundImage_Image | null; - }; - -export type MenuGet_menu_Menu_items_MenuItem_children_MenuItem_page_Page_translation_PageTranslation = - { title: string | null }; - -export type MenuGet_menu_Menu_items_MenuItem_children_MenuItem_page_Page = { - id: string; - title: string; - slug: string; - translation: MenuGet_menu_Menu_items_MenuItem_children_MenuItem_page_Page_translation_PageTranslation | null; -}; - -export type MenuGet_menu_Menu_items_MenuItem_children_MenuItem = { - id: string; - name: string; - level: number; - url: string | null; - translation: MenuGet_menu_Menu_items_MenuItem_children_MenuItem_translation_MenuItemTranslation | null; - category: MenuGet_menu_Menu_items_MenuItem_children_MenuItem_category_Category | null; - collection: MenuGet_menu_Menu_items_MenuItem_children_MenuItem_collection_Collection | null; - page: MenuGet_menu_Menu_items_MenuItem_children_MenuItem_page_Page | null; -}; - -export type MenuGet_menu_Menu_items_MenuItem = { - id: string; - name: string; - level: number; - url: string | null; - children: Array | null; - translation: MenuGet_menu_Menu_items_MenuItem_children_MenuItem_translation_MenuItemTranslation | null; - category: MenuGet_menu_Menu_items_MenuItem_children_MenuItem_category_Category | null; - collection: MenuGet_menu_Menu_items_MenuItem_children_MenuItem_collection_Collection | null; - page: MenuGet_menu_Menu_items_MenuItem_children_MenuItem_page_Page | null; -}; - -export type MenuGet_menu_Menu = { - items: Array | null; -}; +import type * as Types from '@nimara/codegen/schema'; + +import type { DocumentTypeDecoration } from '@graphql-typed-document-node/core'; +export type MenuGet_menu_Menu_items_MenuItem_children_MenuItem_translation_MenuItemTranslation = { name: string }; + +export type MenuGet_menu_Menu_items_MenuItem_children_MenuItem_category_Category_translation_CategoryTranslation = { name: string | null, description: string | null }; + +export type MenuGet_menu_Menu_items_MenuItem_children_MenuItem_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_attributes_SelectedAttribute_attribute_Attribute_translation_AttributeTranslation = { name: string }; + +export type MenuGet_menu_Menu_items_MenuItem_children_MenuItem_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_attributes_SelectedAttribute_attribute_Attribute = { name: string | null, slug: string | null, translation: MenuGet_menu_Menu_items_MenuItem_children_MenuItem_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_attributes_SelectedAttribute_attribute_Attribute_translation_AttributeTranslation | null }; + +export type MenuGet_menu_Menu_items_MenuItem_children_MenuItem_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_attributes_SelectedAttribute = { attribute: MenuGet_menu_Menu_items_MenuItem_children_MenuItem_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_attributes_SelectedAttribute_attribute_Attribute }; + +export type MenuGet_menu_Menu_items_MenuItem_children_MenuItem_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product = { id: string, attributes: Array }; + +export type MenuGet_menu_Menu_items_MenuItem_children_MenuItem_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge = { node: MenuGet_menu_Menu_items_MenuItem_children_MenuItem_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product }; + +export type MenuGet_menu_Menu_items_MenuItem_children_MenuItem_category_Category_products_ProductCountableConnection = { edges: Array }; + +export type MenuGet_menu_Menu_items_MenuItem_children_MenuItem_category_Category = { id: string, slug: string, name: string, description: string | null, translation: MenuGet_menu_Menu_items_MenuItem_children_MenuItem_category_Category_translation_CategoryTranslation | null, products: MenuGet_menu_Menu_items_MenuItem_children_MenuItem_category_Category_products_ProductCountableConnection | null }; + +export type MenuGet_menu_Menu_items_MenuItem_children_MenuItem_collection_Collection_translation_CollectionTranslation = { name: string | null, description: string | null }; + +export type MenuGet_menu_Menu_items_MenuItem_children_MenuItem_collection_Collection_backgroundImage_Image = { url: string }; + +export type MenuGet_menu_Menu_items_MenuItem_children_MenuItem_collection_Collection = { id: string, name: string, slug: string, description: string | null, translation: MenuGet_menu_Menu_items_MenuItem_children_MenuItem_collection_Collection_translation_CollectionTranslation | null, backgroundImage: MenuGet_menu_Menu_items_MenuItem_children_MenuItem_collection_Collection_backgroundImage_Image | null }; + +export type MenuGet_menu_Menu_items_MenuItem_children_MenuItem_page_Page_translation_PageTranslation = { title: string | null }; + +export type MenuGet_menu_Menu_items_MenuItem_children_MenuItem_page_Page = { id: string, title: string, slug: string, translation: MenuGet_menu_Menu_items_MenuItem_children_MenuItem_page_Page_translation_PageTranslation | null }; + +export type MenuGet_menu_Menu_items_MenuItem_children_MenuItem = { id: string, name: string, level: number, url: string | null, translation: MenuGet_menu_Menu_items_MenuItem_children_MenuItem_translation_MenuItemTranslation | null, category: MenuGet_menu_Menu_items_MenuItem_children_MenuItem_category_Category | null, collection: MenuGet_menu_Menu_items_MenuItem_children_MenuItem_collection_Collection | null, page: MenuGet_menu_Menu_items_MenuItem_children_MenuItem_page_Page | null }; + +export type MenuGet_menu_Menu_items_MenuItem = { id: string, name: string, level: number, url: string | null, children: Array | null, translation: MenuGet_menu_Menu_items_MenuItem_children_MenuItem_translation_MenuItemTranslation | null, category: MenuGet_menu_Menu_items_MenuItem_children_MenuItem_category_Category | null, collection: MenuGet_menu_Menu_items_MenuItem_children_MenuItem_collection_Collection | null, page: MenuGet_menu_Menu_items_MenuItem_children_MenuItem_page_Page | null }; + +export type MenuGet_menu_Menu = { items: Array | null }; export type MenuGet_Query = { menu: MenuGet_menu_Menu | null }; + export type MenuGetVariables = Types.Exact<{ - slug?: Types.InputMaybe; - id?: Types.InputMaybe; - channel: Types.Scalars["String"]["input"]; + slug?: Types.InputMaybe; + id?: Types.InputMaybe; + channel: Types.Scalars['String']['input']; languageCode: Types.LanguageCodeEnum; }>; + export type MenuGet = MenuGet_Query; export class TypedDocumentString extends String implements DocumentTypeDecoration { - __apiType?: DocumentTypeDecoration["__apiType"]; + __apiType?: DocumentTypeDecoration['__apiType']; - constructor( - private value: string, - public __meta__?: Record, - ) { + constructor(private value: string, public __meta__?: Record) { super(value); } @@ -196,4 +129,4 @@ export const MenuGetDocument = new TypedDocumentString(` slug } url -}`) as unknown as TypedDocumentString; +}`) as unknown as TypedDocumentString; \ No newline at end of file diff --git a/packages/infrastructure/src/public/saleor/search/infrastructure/search-infra.ts b/packages/infrastructure/src/public/saleor/search/infrastructure/search-infra.ts index 545ce58..ae7c7a5 100644 --- a/packages/infrastructure/src/public/saleor/search/infrastructure/search-infra.ts +++ b/packages/infrastructure/src/public/saleor/search/infrastructure/search-infra.ts @@ -14,7 +14,7 @@ import type { SaleorSearchServiceConfig } from "../types"; export const saleorSearchInfra = ({ apiURL, serializers, settings }: SaleorSearchServiceConfig): SearchInfra => async ( - { query, after, before, sortBy, filters, limit, productIds }, + { query, after, before, sortBy, filters, limit, productIds, category }, context, ) => { const pageInfo = before @@ -22,7 +22,6 @@ export const saleorSearchInfra = : after ? { after, first: limit } : { first: limit }; - // TODO: Find a better way how to handle filters between providers const attributesFilter: AttributeInput[] | undefined = filters ? Object.entries(filters).map(([slug, value]) => ({ @@ -32,6 +31,11 @@ export const saleorSearchInfra = })) : undefined; + const whereFilter = { + ...(productIds && { ids: productIds }), + ...(category && { category: { oneOf: [category] } }), + }; + try { loggingService.debug("Fetching the products from Saleor", { query, @@ -42,10 +46,9 @@ export const saleorSearchInfra = SearchProductQueryDocument, { variables: { - where: productIds ? { ids: productIds } : undefined, + where: Object.keys(whereFilter).length ? whereFilter : undefined, search: query, channel: context.channel, - // a `languageCode` is only used for fetching translated names, not for searching - Saleor does not support searching in multiple languages languageCode: context.languageCode as LanguageCodeEnum, sortBy: settings.sorting.find( (conf) => conf.queryParamValue === sortBy, diff --git a/packages/infrastructure/src/public/saleor/store/graphql/fragments/ProductDetailsFragment.graphql b/packages/infrastructure/src/public/saleor/store/graphql/fragments/ProductDetailsFragment.graphql index 2b0ae8d..102f26c 100644 --- a/packages/infrastructure/src/public/saleor/store/graphql/fragments/ProductDetailsFragment.graphql +++ b/packages/infrastructure/src/public/saleor/store/graphql/fragments/ProductDetailsFragment.graphql @@ -15,4 +15,30 @@ fragment ProductDetailsFragment on Product { variants { ...ProductVariantDetailsFragment } + attributes { + attribute { + ...AttributeFragment + } + values { + ...AttributeValueFragment + } + } + category { + products(first: 10, channel: $channel) { + edges { + node { + id + slug + name + thumbnail(size: 512) { + url + alt + } + pricing { + ...ProductPricingInfoFragment + } + } + } + } + } } diff --git a/packages/infrastructure/src/public/saleor/store/graphql/fragments/ProductPricingInfoFragment.graphql b/packages/infrastructure/src/public/saleor/store/graphql/fragments/ProductPricingInfoFragment.graphql new file mode 100644 index 0000000..bacf818 --- /dev/null +++ b/packages/infrastructure/src/public/saleor/store/graphql/fragments/ProductPricingInfoFragment.graphql @@ -0,0 +1,7 @@ +fragment ProductPricingInfoFragment on ProductPricingInfo { + priceRange { + start { + ...TaxedMoneyFragment + } + } +} diff --git a/packages/infrastructure/src/public/saleor/store/graphql/fragments/ProductVariantDetailsFragment.graphql b/packages/infrastructure/src/public/saleor/store/graphql/fragments/ProductVariantDetailsFragment.graphql index 20055db..8f09d05 100644 --- a/packages/infrastructure/src/public/saleor/store/graphql/fragments/ProductVariantDetailsFragment.graphql +++ b/packages/infrastructure/src/public/saleor/store/graphql/fragments/ProductVariantDetailsFragment.graphql @@ -4,6 +4,9 @@ fragment ProductVariantDetailsFragment on ProductVariant { translation(languageCode: $languageCode) { name } + media { + ...ProductMediaFragment + } selectionAttributes: attributes(variantSelection: VARIANT_SELECTION) { ...SelectionAttributeFragment } diff --git a/packages/infrastructure/src/public/saleor/store/graphql/fragments/generated.ts b/packages/infrastructure/src/public/saleor/store/graphql/fragments/generated.ts index 27f2ef9..f849fef 100644 --- a/packages/infrastructure/src/public/saleor/store/graphql/fragments/generated.ts +++ b/packages/infrastructure/src/public/saleor/store/graphql/fragments/generated.ts @@ -39,6 +39,8 @@ export type ProductDetailsFragment_Product_media_ProductMedia = { url: string, a export type ProductDetailsFragment_Product_variants_ProductVariant_translation_ProductVariantTranslation = { name: string }; +export type ProductDetailsFragment_Product_variants_ProductVariant_media_ProductMedia = { url: string, alt: string, type: Types.ProductMediaType }; + export type ProductDetailsFragment_Product_variants_ProductVariant_selectionAttributes_SelectedAttribute_attribute_Attribute = { slug: string | null, inputType: Types.AttributeInputTypeEnum | null, name: string | null, translation: AttributeFragment_Attribute_translation_AttributeTranslation | null }; export type ProductDetailsFragment_Product_variants_ProductVariant_selectionAttributes_SelectedAttribute_values_AttributeValue = { slug: string | null, name: string | null, plainText: string | null, richText: string | null, boolean: boolean | null, date: string | null, dateTime: string | null, reference: string | null, value: string | null, translation: AttributeValueFragment_AttributeValue_translation_AttributeValueTranslation | null, file: AttributeValueFragment_AttributeValue_file_File | null }; @@ -47,13 +49,37 @@ export type ProductDetailsFragment_Product_variants_ProductVariant_selectionAttr export type ProductDetailsFragment_Product_variants_ProductVariant_nonSelectionAttributes_SelectedAttribute = { attribute: ProductDetailsFragment_Product_variants_ProductVariant_selectionAttributes_SelectedAttribute_attribute_Attribute, values: Array }; -export type ProductDetailsFragment_Product_variants_ProductVariant = { id: string, name: string, translation: ProductDetailsFragment_Product_variants_ProductVariant_translation_ProductVariantTranslation | null, selectionAttributes: Array, nonSelectionAttributes: Array }; +export type ProductDetailsFragment_Product_variants_ProductVariant = { id: string, name: string, translation: ProductDetailsFragment_Product_variants_ProductVariant_translation_ProductVariantTranslation | null, media: Array | null, selectionAttributes: Array, nonSelectionAttributes: Array }; + +export type ProductDetailsFragment_Product_attributes_SelectedAttribute_attribute_Attribute = { slug: string | null, inputType: Types.AttributeInputTypeEnum | null, name: string | null, translation: AttributeFragment_Attribute_translation_AttributeTranslation | null }; + +export type ProductDetailsFragment_Product_attributes_SelectedAttribute_values_AttributeValue = { slug: string | null, name: string | null, plainText: string | null, richText: string | null, boolean: boolean | null, date: string | null, dateTime: string | null, reference: string | null, value: string | null, translation: AttributeValueFragment_AttributeValue_translation_AttributeValueTranslation | null, file: AttributeValueFragment_AttributeValue_file_File | null }; + +export type ProductDetailsFragment_Product_attributes_SelectedAttribute = { attribute: ProductDetailsFragment_Product_attributes_SelectedAttribute_attribute_Attribute, values: Array }; + +export type ProductDetailsFragment_Product_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_thumbnail_Image = { url: string, alt: string | null }; + +export type ProductDetailsFragment_Product_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_pricing_ProductPricingInfo_priceRange_TaxedMoneyRange_start_TaxedMoney = { net: ProductAvailabilityDetailsFragment_Product_pricing_ProductPricingInfo_priceRange_TaxedMoneyRange_start_TaxedMoney_net_Money, gross: ProductAvailabilityDetailsFragment_Product_pricing_ProductPricingInfo_priceRange_TaxedMoneyRange_start_TaxedMoney_gross_Money, tax: ProductAvailabilityDetailsFragment_Product_pricing_ProductPricingInfo_priceRange_TaxedMoneyRange_start_TaxedMoney_tax_Money }; + +export type ProductDetailsFragment_Product_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_pricing_ProductPricingInfo_priceRange_TaxedMoneyRange = { start: ProductDetailsFragment_Product_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_pricing_ProductPricingInfo_priceRange_TaxedMoneyRange_start_TaxedMoney | null }; + +export type ProductDetailsFragment_Product_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_pricing_ProductPricingInfo = { priceRange: ProductDetailsFragment_Product_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_pricing_ProductPricingInfo_priceRange_TaxedMoneyRange | null }; + +export type ProductDetailsFragment_Product_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product = { id: string, slug: string, name: string, thumbnail: ProductDetailsFragment_Product_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_thumbnail_Image | null, pricing: ProductDetailsFragment_Product_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_pricing_ProductPricingInfo | null }; + +export type ProductDetailsFragment_Product_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge = { node: ProductDetailsFragment_Product_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product }; -export type ProductDetailsFragment = { id: string, name: string, description: string | null, translation: ProductDetailsFragment_Product_translation_ProductTranslation | null, media: Array | null, variants: Array | null }; +export type ProductDetailsFragment_Product_category_Category_products_ProductCountableConnection = { edges: Array }; + +export type ProductDetailsFragment_Product_category_Category = { products: ProductDetailsFragment_Product_category_Category_products_ProductCountableConnection | null }; + +export type ProductDetailsFragment = { id: string, name: string, description: string | null, translation: ProductDetailsFragment_Product_translation_ProductTranslation | null, media: Array | null, variants: Array | null, attributes: Array, category: ProductDetailsFragment_Product_category_Category | null }; export type ProductMediaFragment = { url: string, alt: string, type: Types.ProductMediaType }; -export type ProductVariantDetailsFragment = { id: string, name: string, translation: ProductDetailsFragment_Product_variants_ProductVariant_translation_ProductVariantTranslation | null, selectionAttributes: Array, nonSelectionAttributes: Array }; +export type ProductPricingInfoFragment = { priceRange: ProductDetailsFragment_Product_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_pricing_ProductPricingInfo_priceRange_TaxedMoneyRange | null }; + +export type ProductVariantDetailsFragment = { id: string, name: string, translation: ProductDetailsFragment_Product_variants_ProductVariant_translation_ProductVariantTranslation | null, media: Array | null, selectionAttributes: Array, nonSelectionAttributes: Array }; export type SelectionAttributeFragment = { attribute: ProductDetailsFragment_Product_variants_ProductVariant_selectionAttributes_SelectedAttribute_attribute_Attribute, values: Array }; @@ -136,6 +162,32 @@ export const ProductDetailsFragment = new TypedDocumentString(` variants { ...ProductVariantDetailsFragment } + attributes { + attribute { + ...AttributeFragment + } + values { + ...AttributeValueFragment + } + } + category { + products(first: 10, channel: $channel) { + edges { + node { + id + slug + name + thumbnail(size: 512) { + url + alt + } + pricing { + ...ProductPricingInfoFragment + } + } + } + } + } } fragment AttributeFragment on Attribute { slug @@ -169,12 +221,22 @@ fragment ProductMediaFragment on ProductMedia { alt type } +fragment ProductPricingInfoFragment on ProductPricingInfo { + priceRange { + start { + ...TaxedMoneyFragment + } + } +} fragment ProductVariantDetailsFragment on ProductVariant { id name translation(languageCode: $languageCode) { name } + media { + ...ProductMediaFragment + } selectionAttributes: attributes(variantSelection: VARIANT_SELECTION) { ...SelectionAttributeFragment } @@ -189,4 +251,19 @@ fragment SelectionAttributeFragment on SelectedAttribute { values { ...AttributeValueFragment } +} +fragment TaxedMoneyFragment on TaxedMoney { + net { + ...MoneyFragment + } + gross { + ...MoneyFragment + } + tax { + ...MoneyFragment + } +} +fragment MoneyFragment on Money { + currency + amount }`, {"fragmentName":"ProductDetailsFragment"}) as unknown as TypedDocumentString; \ No newline at end of file diff --git a/packages/infrastructure/src/public/saleor/store/graphql/queries/generated.ts b/packages/infrastructure/src/public/saleor/store/graphql/queries/generated.ts index e8b0ac7..4945c66 100644 --- a/packages/infrastructure/src/public/saleor/store/graphql/queries/generated.ts +++ b/packages/infrastructure/src/public/saleor/store/graphql/queries/generated.ts @@ -41,6 +41,8 @@ export type ProductDetailsQuery_product_Product_media_ProductMedia = { url: stri export type ProductDetailsQuery_product_Product_variants_ProductVariant_translation_ProductVariantTranslation = { name: string }; +export type ProductDetailsQuery_product_Product_variants_ProductVariant_media_ProductMedia = { url: string, alt: string, type: Types.ProductMediaType }; + export type ProductDetailsQuery_product_Product_variants_ProductVariant_selectionAttributes_SelectedAttribute_attribute_Attribute_translation_AttributeTranslation = { name: string }; export type ProductDetailsQuery_product_Product_variants_ProductVariant_selectionAttributes_SelectedAttribute_attribute_Attribute = { slug: string | null, inputType: Types.AttributeInputTypeEnum | null, name: string | null, translation: ProductDetailsQuery_product_Product_variants_ProductVariant_selectionAttributes_SelectedAttribute_attribute_Attribute_translation_AttributeTranslation | null }; @@ -55,9 +57,31 @@ export type ProductDetailsQuery_product_Product_variants_ProductVariant_selectio export type ProductDetailsQuery_product_Product_variants_ProductVariant_nonSelectionAttributes_SelectedAttribute = { attribute: ProductDetailsQuery_product_Product_variants_ProductVariant_selectionAttributes_SelectedAttribute_attribute_Attribute, values: Array }; -export type ProductDetailsQuery_product_Product_variants_ProductVariant = { id: string, name: string, translation: ProductDetailsQuery_product_Product_variants_ProductVariant_translation_ProductVariantTranslation | null, selectionAttributes: Array, nonSelectionAttributes: Array }; +export type ProductDetailsQuery_product_Product_variants_ProductVariant = { id: string, name: string, translation: ProductDetailsQuery_product_Product_variants_ProductVariant_translation_ProductVariantTranslation | null, media: Array | null, selectionAttributes: Array, nonSelectionAttributes: Array }; + +export type ProductDetailsQuery_product_Product_attributes_SelectedAttribute_attribute_Attribute = { slug: string | null, inputType: Types.AttributeInputTypeEnum | null, name: string | null, translation: ProductDetailsQuery_product_Product_variants_ProductVariant_selectionAttributes_SelectedAttribute_attribute_Attribute_translation_AttributeTranslation | null }; + +export type ProductDetailsQuery_product_Product_attributes_SelectedAttribute_values_AttributeValue = { slug: string | null, name: string | null, plainText: string | null, richText: string | null, boolean: boolean | null, date: string | null, dateTime: string | null, reference: string | null, value: string | null, translation: ProductDetailsQuery_product_Product_variants_ProductVariant_selectionAttributes_SelectedAttribute_values_AttributeValue_translation_AttributeValueTranslation | null, file: ProductDetailsQuery_product_Product_variants_ProductVariant_selectionAttributes_SelectedAttribute_values_AttributeValue_file_File | null }; + +export type ProductDetailsQuery_product_Product_attributes_SelectedAttribute = { attribute: ProductDetailsQuery_product_Product_attributes_SelectedAttribute_attribute_Attribute, values: Array }; + +export type ProductDetailsQuery_product_Product_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_thumbnail_Image = { url: string, alt: string | null }; + +export type ProductDetailsQuery_product_Product_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_pricing_ProductPricingInfo_priceRange_TaxedMoneyRange_start_TaxedMoney = { net: ProductAvailabilityDetailsQuery_product_Product_pricing_ProductPricingInfo_priceRange_TaxedMoneyRange_start_TaxedMoney_net_Money, gross: ProductAvailabilityDetailsQuery_product_Product_pricing_ProductPricingInfo_priceRange_TaxedMoneyRange_start_TaxedMoney_gross_Money, tax: ProductAvailabilityDetailsQuery_product_Product_pricing_ProductPricingInfo_priceRange_TaxedMoneyRange_start_TaxedMoney_tax_Money }; + +export type ProductDetailsQuery_product_Product_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_pricing_ProductPricingInfo_priceRange_TaxedMoneyRange = { start: ProductDetailsQuery_product_Product_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_pricing_ProductPricingInfo_priceRange_TaxedMoneyRange_start_TaxedMoney | null }; + +export type ProductDetailsQuery_product_Product_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_pricing_ProductPricingInfo = { priceRange: ProductDetailsQuery_product_Product_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_pricing_ProductPricingInfo_priceRange_TaxedMoneyRange | null }; + +export type ProductDetailsQuery_product_Product_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product = { id: string, slug: string, name: string, thumbnail: ProductDetailsQuery_product_Product_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_thumbnail_Image | null, pricing: ProductDetailsQuery_product_Product_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_pricing_ProductPricingInfo | null }; + +export type ProductDetailsQuery_product_Product_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge = { node: ProductDetailsQuery_product_Product_category_Category_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product }; -export type ProductDetailsQuery_product_Product = { id: string, name: string, description: string | null, translation: ProductDetailsQuery_product_Product_translation_ProductTranslation | null, media: Array | null, variants: Array | null }; +export type ProductDetailsQuery_product_Product_category_Category_products_ProductCountableConnection = { edges: Array }; + +export type ProductDetailsQuery_product_Product_category_Category = { products: ProductDetailsQuery_product_Product_category_Category_products_ProductCountableConnection | null }; + +export type ProductDetailsQuery_product_Product = { id: string, name: string, description: string | null, translation: ProductDetailsQuery_product_Product_translation_ProductTranslation | null, media: Array | null, variants: Array | null, attributes: Array, category: ProductDetailsQuery_product_Product_category_Category | null }; export type ProductDetailsQuery_Query = { product: ProductDetailsQuery_product_Product | null }; @@ -142,7 +166,22 @@ export const ProductDetailsQueryDocument = new TypedDocumentString(` ...ProductDetailsFragment } } - fragment ProductDetailsFragment on Product { + fragment TaxedMoneyFragment on TaxedMoney { + net { + ...MoneyFragment + } + gross { + ...MoneyFragment + } + tax { + ...MoneyFragment + } +} +fragment MoneyFragment on Money { + currency + amount +} +fragment ProductDetailsFragment on Product { id name translation(languageCode: $languageCode) { @@ -159,6 +198,32 @@ export const ProductDetailsQueryDocument = new TypedDocumentString(` variants { ...ProductVariantDetailsFragment } + attributes { + attribute { + ...AttributeFragment + } + values { + ...AttributeValueFragment + } + } + category { + products(first: 10, channel: $channel) { + edges { + node { + id + slug + name + thumbnail(size: 512) { + url + alt + } + pricing { + ...ProductPricingInfoFragment + } + } + } + } + } } fragment ProductMediaFragment on ProductMedia { url(size: $mediaSize, format: $mediaFormat) @@ -171,6 +236,9 @@ fragment ProductVariantDetailsFragment on ProductVariant { translation(languageCode: $languageCode) { name } + media { + ...ProductMediaFragment + } selectionAttributes: attributes(variantSelection: VARIANT_SELECTION) { ...SelectionAttributeFragment } @@ -212,4 +280,11 @@ fragment AttributeValueFragment on AttributeValue { file { url } +} +fragment ProductPricingInfoFragment on ProductPricingInfo { + priceRange { + start { + ...TaxedMoneyFragment + } + } }`) as unknown as TypedDocumentString; \ No newline at end of file diff --git a/packages/infrastructure/src/public/saleor/store/infrastructure/get-product-details-infra.ts b/packages/infrastructure/src/public/saleor/store/infrastructure/get-product-details-infra.ts index aade8e6..86ac379 100644 --- a/packages/infrastructure/src/public/saleor/store/infrastructure/get-product-details-infra.ts +++ b/packages/infrastructure/src/public/saleor/store/infrastructure/get-product-details-infra.ts @@ -30,14 +30,46 @@ const parseData = (data: ProductDetailsFragment): Product => { name, description, images, + relatedProducts: + data.category?.products?.edges + ?.filter(({ node }) => node.id !== id) + .filter(Boolean) + .map(({ node }) => { + return { + currency: node?.pricing?.priceRange?.start?.gross?.currency ?? "", + id: node.slug, + media: null, + thumbnail: node.thumbnail + ? { + alt: node.thumbnail.alt ?? undefined, + url: node.thumbnail.url, + } + : null, + name: node.name, + price: node.pricing?.priceRange?.start?.gross?.amount ?? 0, + slug: node.slug, + updatedAt: new Date(), + }; + }) ?? [], + attributes: data.attributes.map(parseAttributeData), + variants: variants.map( - ({ nonSelectionAttributes, selectionAttributes, id, ...variant }) => { + ({ + nonSelectionAttributes, + selectionAttributes, + id, + media, + ...variant + }) => { return { id, name: getTranslation("name", variant), selectionAttributes: selectionAttributes.map(parseAttributeData), nonSelectionAttributes: nonSelectionAttributes.map(parseAttributeData), + images: media + .filter(({ type }) => type === "IMAGE") + .map(({ alt, url }) => ({ url, alt })), }; }, ), diff --git a/packages/infrastructure/src/use-cases/search/types.ts b/packages/infrastructure/src/use-cases/search/types.ts index 018f646..27b00f5 100644 --- a/packages/infrastructure/src/use-cases/search/types.ts +++ b/packages/infrastructure/src/use-cases/search/types.ts @@ -33,6 +33,7 @@ export type SearchInfra = ( params: { after?: string; before?: string; + category?: string; filters?: Record; limit: number; page?: string; diff --git a/packages/ui/src/components/alert.tsx b/packages/ui/src/components/alert.tsx new file mode 100644 index 0000000..d1330e8 --- /dev/null +++ b/packages/ui/src/components/alert.tsx @@ -0,0 +1,62 @@ +import { cva, type VariantProps } from "class-variance-authority"; +import * as React from "react"; + +import { cn } from "../lib/utils"; + +const alertVariants = cva( + "relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground", + { + variants: { + variant: { + default: "bg-background text-foreground", + destructive: + "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive", + }, + }, + defaultVariants: { + variant: "default", + }, + }, +); + +const Alert = React.forwardRef< + HTMLDivElement, + React.HTMLAttributes & VariantProps +>(({ className, variant, ...props }, ref) => ( +
+)); + +Alert.displayName = "Alert"; + +const AlertTitle = React.forwardRef< + HTMLParagraphElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +
+)); + +AlertTitle.displayName = "AlertTitle"; + +const AlertDescription = React.forwardRef< + HTMLParagraphElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +
+)); + +AlertDescription.displayName = "AlertDescription"; + +export { Alert, AlertTitle, AlertDescription }; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 604bb53..408f185 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -165,6 +165,9 @@ importers: nextjs-routes: specifier: 2.1.0 version: 2.1.0(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)) + nuqs: + specifier: 2.1.1 + version: 2.1.1(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0) react: specifier: 19.0.0 version: 19.0.0 @@ -426,7 +429,7 @@ importers: dependencies: '@saleor/auth-sdk': specifier: 1.0.1 - version: 1.0.1(next@14.2.12(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 1.0.1(next@14.2.12(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@stripe/stripe-js': specifier: 3.5.0 version: 3.5.0 @@ -7082,6 +7085,9 @@ packages: resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} engines: {node: '>=16 || 14 >=14.17'} + mitt@3.0.1: + resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==} + mj-context-menu@0.6.1: resolution: {integrity: sha512-7NO5s6n10TIV96d4g2uDpG7ZDpIhMh0QNfGdJw/W47JswFcosz457wqz/b5sAKvl12sxINGFCn80NZHKwxQEXA==} @@ -7356,6 +7362,21 @@ packages: nullthrows@1.1.1: resolution: {integrity: sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw==} + nuqs@2.1.1: + resolution: {integrity: sha512-iM2H8lMmhvk9bxupUs2oRle9usRNEAqppOkTMXOxD/uK85gOKAubU7T2zmPo8fnYQS4n5e/XswTiq+gLYGpy3w==} + peerDependencies: + '@remix-run/react': '>= 2' + next: '>= 14.2.0' + react: '>= 18.2.0' + react-router-dom: '>= 6' + peerDependenciesMeta: + '@remix-run/react': + optional: true + next: + optional: true + react-router-dom: + optional: true + oauth4webapi@2.10.4: resolution: {integrity: sha512-DSoj8QoChzOCQlJkRmYxAJCIpnXFW32R0Uq7avyghIeB6iJq0XAblOD7pcq3mx4WEBDwMuKr0Y1qveCBleG2Xw==} @@ -12518,13 +12539,13 @@ snapshots: '@rushstack/eslint-patch@1.10.4': {} - '@saleor/auth-sdk@1.0.1(next@14.2.12(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@saleor/auth-sdk@1.0.1(next@14.2.12(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@graphql-typed-document-node/core': 3.2.0(graphql@16.9.0) cookie: 0.6.0 graphql: 16.9.0 optionalDependencies: - next: 14.2.12(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + next: 14.2.12(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) @@ -15234,7 +15255,7 @@ snapshots: debug: 4.3.4 enhanced-resolve: 5.15.0 eslint: 8.57.0 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.13.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.13.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.13.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.13.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) fast-glob: 3.3.2 get-tsconfig: 4.7.2 @@ -15251,7 +15272,7 @@ snapshots: debug: 4.3.4 enhanced-resolve: 5.15.0 eslint: 8.57.0 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.13.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.13.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.13.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0)(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-import: 2.31.0(@typescript-eslint/parser@6.13.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) fast-glob: 3.3.2 get-tsconfig: 4.7.2 @@ -15263,7 +15284,7 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-module-utils@2.12.0(@typescript-eslint/parser@6.13.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): + eslint-module-utils@2.12.0(@typescript-eslint/parser@6.13.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.13.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0)(eslint@8.57.0))(eslint@8.57.0): dependencies: debug: 3.2.7 optionalDependencies: @@ -15274,7 +15295,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.0(@typescript-eslint/parser@6.13.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): + eslint-module-utils@2.8.0(@typescript-eslint/parser@6.13.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.13.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0): dependencies: debug: 3.2.7 optionalDependencies: @@ -15285,6 +15306,17 @@ snapshots: transitivePeerDependencies: - supports-color + eslint-module-utils@2.8.0(@typescript-eslint/parser@6.13.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.13.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0)(eslint@8.57.0))(eslint@8.57.0): + dependencies: + debug: 3.2.7 + optionalDependencies: + '@typescript-eslint/parser': 6.13.1(eslint@8.57.0)(typescript@5.5.4) + eslint: 8.57.0 + eslint-import-resolver-node: 0.3.9 + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.13.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0)(eslint@8.57.0) + transitivePeerDependencies: + - supports-color + eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.13.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): dependencies: array-includes: 3.1.7 @@ -15295,7 +15327,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.13.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.13.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.13.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0) hasown: 2.0.0 is-core-module: 2.13.1 is-glob: 4.0.3 @@ -15323,7 +15355,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@6.13.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-module-utils: 2.12.0(@typescript-eslint/parser@6.13.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.13.1(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0)(eslint@8.57.0))(eslint@8.57.0) hasown: 2.0.2 is-core-module: 2.15.1 is-glob: 4.0.3 @@ -17656,6 +17688,8 @@ snapshots: minipass@7.1.2: {} + mitt@3.0.1: {} + mj-context-menu@0.6.1: {} mlly@1.7.3: @@ -17710,7 +17744,7 @@ snapshots: react: 19.0.0 react-dom: 19.0.0(react@19.0.0) - next@14.2.12(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + next@14.2.12(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@next/env': 14.2.12 '@swc/helpers': 0.5.5 @@ -17731,8 +17765,6 @@ snapshots: '@next/swc-win32-arm64-msvc': 14.2.12 '@next/swc-win32-ia32-msvc': 14.2.12 '@next/swc-win32-x64-msvc': 14.2.12 - '@opentelemetry/api': 1.9.0 - '@playwright/test': 1.46.1 transitivePeerDependencies: - '@babel/core' - babel-plugin-macros @@ -17896,6 +17928,13 @@ snapshots: nullthrows@1.1.1: {} + nuqs@2.1.1(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0): + dependencies: + mitt: 3.0.1 + react: 19.0.0 + optionalDependencies: + next: 15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + oauth4webapi@2.10.4: {} object-assign@4.1.1: {} From ff999a7f7a7848ed9b58c5d156a5d469d45ff59d Mon Sep 17 00:00:00 2001 From: soniaklimas Date: Tue, 17 Dec 2024 09:45:02 +0100 Subject: [PATCH 2/7] Bump @sentry/nextjs version --- apps/storefront/package.json | 2 +- pnpm-lock.yaml | 960 +++++++++++++++++------------------ 2 files changed, 475 insertions(+), 487 deletions(-) diff --git a/apps/storefront/package.json b/apps/storefront/package.json index 638b294..f8cdcfa 100644 --- a/apps/storefront/package.json +++ b/apps/storefront/package.json @@ -17,7 +17,7 @@ "@formatjs/intl-localematcher": "0.5.9", "@hookform/resolvers": "3.6.0", "@sentry/integrations": "^7.114.0", - "@sentry/nextjs": "^8.12.0", + "@sentry/nextjs": "^8.34.0", "@sentry/types": "^8.12.0", "@svgr/webpack": "8.1.0", "@uidotdev/usehooks": "2.4.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index aa401b8..eeb1de6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -73,10 +73,10 @@ importers: version: 15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) nextra: specifier: 3.2.4 - version: 3.2.4(@types/react@19.0.0)(acorn@8.14.0)(next@15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@4.9.5) + version: 3.2.4(@types/react@19.0.0)(acorn@8.14.0)(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@4.9.5) nextra-theme-docs: specifier: 3.2.4 - version: 3.2.4(next@15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(nextra@3.2.4(@types/react@19.0.0)(acorn@8.14.0)(next@15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@4.9.5))(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + version: 3.2.4(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(nextra@3.2.4(@types/react@19.0.0)(acorn@8.14.0)(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@4.9.5))(react-dom@19.0.0(react@19.0.0))(react@19.0.0) react: specifier: ^19.0.0 version: 19.0.0 @@ -121,8 +121,8 @@ importers: specifier: ^7.114.0 version: 7.114.0 '@sentry/nextjs': - specifier: ^8.12.0 - version: 8.13.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.52.1(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.25.1)(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0)(webpack@5.90.3) + specifier: ^8.34.0 + version: 8.34.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.53.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.29.0(@opentelemetry/api@1.9.0))(next@15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0)(webpack@5.90.3) '@sentry/types': specifier: ^8.12.0 version: 8.13.0 @@ -134,7 +134,7 @@ importers: version: 2.4.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0) '@vercel/otel': specifier: ^1.9.1 - version: 1.9.1(@opentelemetry/api@1.9.0)(@opentelemetry/instrumentation@0.52.1(@opentelemetry/api@1.9.0))(@opentelemetry/resources@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-metrics@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.25.1(@opentelemetry/api@1.9.0)) + version: 1.9.1(@opentelemetry/api@1.9.0)(@opentelemetry/instrumentation@0.53.0(@opentelemetry/api@1.9.0))(@opentelemetry/resources@1.29.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-metrics@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.29.0(@opentelemetry/api@1.9.0)) clsx: specifier: 2.0.0 version: 2.0.0 @@ -164,16 +164,16 @@ importers: version: 15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) next-auth: specifier: 5.0.0-beta.17 - version: 5.0.0-beta.17(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0) + version: 5.0.0-beta.17(next@15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0) next-intl: specifier: 3.23.5 - version: 3.23.5(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0) + version: 3.23.5(next@15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0) nextjs-routes: specifier: 2.1.0 - version: 2.1.0(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)) + version: 2.1.0(next@15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)) nuqs: specifier: 2.1.1 - version: 2.1.1(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0) + version: 2.1.1(next@15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0) react: specifier: 19.0.0 version: 19.0.0 @@ -2374,6 +2374,10 @@ packages: resolution: {integrity: sha512-qnSqB2DQ9TPP96dl8cDubDvrUyWc0/sK81xHTK8eSUspzDM3bsewX903qclQFvVhgStjRWdC5bLb3kQqMkfV5A==} engines: {node: '>=14'} + '@opentelemetry/api-logs@0.53.0': + resolution: {integrity: sha512-8HArjKx+RaAI8uEIgcORbZIPklyh1YLjPSBus8hjRmvLi6DeFzgOcdZ7KwPabKj8mXF8dX0hyfAyGfycz0DbFw==} + engines: {node: '>=14'} + '@opentelemetry/api@1.9.0': resolution: {integrity: sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==} engines: {node: '>=8.0.0'} @@ -2390,108 +2394,162 @@ packages: peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' - '@opentelemetry/instrumentation-connect@0.37.0': - resolution: {integrity: sha512-SeQktDIH5rNzjiEiazWiJAIXkmnLOnNV7wwHpahrqE0Ph+Z3heqMfxRtoMtbdJSIYLfcNZYO51AjxZ00IXufdw==} + '@opentelemetry/core@1.26.0': + resolution: {integrity: sha512-1iKxXXE8415Cdv0yjG3G6hQnB5eVEsJce3QaawX8SjDn0mAS0ZM8fAbZZJD4ajvhC15cePvosSCut404KrIIvQ==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': '>=1.0.0 <1.10.0' + + '@opentelemetry/core@1.29.0': + resolution: {integrity: sha512-gmT7vAreXl0DTHD2rVZcw3+l2g84+5XiHIqdBUxXbExymPCvSsGOpiwMmn8nkiJur28STV31wnhIDrzWDPzjfA==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': '>=1.0.0 <1.10.0' + + '@opentelemetry/instrumentation-amqplib@0.42.0': + resolution: {integrity: sha512-fiuU6OKsqHJiydHWgTRQ7MnIrJ2lEqsdgFtNIH4LbAUJl/5XmrIeoDzDnox+hfkgWK65jsleFuQDtYb5hW1koQ==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': ^1.3.0 + + '@opentelemetry/instrumentation-connect@0.39.0': + resolution: {integrity: sha512-pGBiKevLq7NNglMgqzmeKczF4XQMTOUOTkK8afRHMZMnrK3fcETyTH7lVaSozwiOM3Ws+SuEmXZT7DYrrhxGlg==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': ^1.3.0 + + '@opentelemetry/instrumentation-dataloader@0.12.0': + resolution: {integrity: sha512-pnPxatoFE0OXIZDQhL2okF//dmbiWFzcSc8pUg9TqofCLYZySSxDCgQc69CJBo5JnI3Gz1KP+mOjS4WAeRIH4g==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': ^1.3.0 + + '@opentelemetry/instrumentation-express@0.42.0': + resolution: {integrity: sha512-YNcy7ZfGnLsVEqGXQPT+S0G1AE46N21ORY7i7yUQyfhGAL4RBjnZUqefMI0NwqIl6nGbr1IpF0rZGoN8Q7x12Q==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': ^1.3.0 + + '@opentelemetry/instrumentation-fastify@0.39.0': + resolution: {integrity: sha512-SS9uSlKcsWZabhBp2szErkeuuBDgxOUlllwkS92dVaWRnMmwysPhcEgHKB8rUe3BHg/GnZC1eo1hbTZv4YhfoA==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': ^1.3.0 + + '@opentelemetry/instrumentation-fs@0.15.0': + resolution: {integrity: sha512-JWVKdNLpu1skqZQA//jKOcKdJC66TWKqa2FUFq70rKohvaSq47pmXlnabNO+B/BvLfmidfiaN35XakT5RyMl2Q==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/instrumentation-express@0.40.1': - resolution: {integrity: sha512-+RKMvVe2zw3kIXRup9c1jFu3T4d0fs5aKy015TpiMyoCKX1UMu3Z0lfgYtuyiSTANvg5hZnDbWmQmqSPj9VTvg==} + '@opentelemetry/instrumentation-generic-pool@0.39.0': + resolution: {integrity: sha512-y4v8Y+tSfRB3NNBvHjbjrn7rX/7sdARG7FuK6zR8PGb28CTa0kHpEGCJqvL9L8xkTNvTXo+lM36ajFGUaK1aNw==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/instrumentation-fastify@0.37.0': - resolution: {integrity: sha512-WRjwzNZgupSzbEYvo9s+QuHJRqZJjVdNxSEpGBwWK8RKLlHGwGVAu0gcc2gPamJWUJsGqPGvahAPWM18ZkWj6A==} + '@opentelemetry/instrumentation-graphql@0.43.0': + resolution: {integrity: sha512-aI3YMmC2McGd8KW5du1a2gBA0iOMOGLqg4s9YjzwbjFwjlmMNFSK1P3AIg374GWg823RPUGfVTIgZ/juk9CVOA==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/instrumentation-graphql@0.41.0': - resolution: {integrity: sha512-R/gXeljgIhaRDKquVkKYT5QHPnFouM8ooyePZEP0kqyaVAedtR1V7NfAUJbxfTG5fBQa5wdmLjvu63+tzRXZCA==} + '@opentelemetry/instrumentation-hapi@0.41.0': + resolution: {integrity: sha512-jKDrxPNXDByPlYcMdZjNPYCvw0SQJjN+B1A+QH+sx+sAHsKSAf9hwFiJSrI6C4XdOls43V/f/fkp9ITkHhKFbQ==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/instrumentation-hapi@0.39.0': - resolution: {integrity: sha512-ik2nA9Yj2s2ay+aNY+tJsKCsEx6Tsc2g/MK0iWBW5tibwrWKTy1pdVt5sB3kd5Gkimqj23UV5+FH2JFcQLeKug==} + '@opentelemetry/instrumentation-http@0.53.0': + resolution: {integrity: sha512-H74ErMeDuZfj7KgYCTOFGWF5W9AfaPnqLQQxeFq85+D29wwV2yqHbz2IKLYpkOh7EI6QwDEl7rZCIxjJLyc/CQ==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/instrumentation-http@0.52.1': - resolution: {integrity: sha512-dG/aevWhaP+7OLv4BQQSEKMJv8GyeOp3Wxl31NHqE8xo9/fYMfEljiZphUHIfyg4gnZ9swMyWjfOQs5GUQe54Q==} + '@opentelemetry/instrumentation-ioredis@0.43.0': + resolution: {integrity: sha512-i3Dke/LdhZbiUAEImmRG3i7Dimm/BD7t8pDDzwepSvIQ6s2X6FPia7561gw+64w+nx0+G9X14D7rEfaMEmmjig==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/instrumentation-ioredis@0.41.0': - resolution: {integrity: sha512-rxiLloU8VyeJGm5j2fZS8ShVdB82n7VNP8wTwfUQqDwRfHCnkzGr+buKoxuhGD91gtwJ91RHkjHA1Eg6RqsUTg==} + '@opentelemetry/instrumentation-kafkajs@0.3.0': + resolution: {integrity: sha512-UnkZueYK1ise8FXQeKlpBd7YYUtC7mM8J0wzUSccEfc/G8UqHQqAzIyYCUOUPUKp8GsjLnWOOK/3hJc4owb7Jg==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/instrumentation-koa@0.41.0': - resolution: {integrity: sha512-mbPnDt7ELvpM2S0vixYUsde7122lgegLOJQxx8iJQbB8YHal/xnTh9v7IfArSVzIDo+E+080hxZyUZD4boOWkw==} + '@opentelemetry/instrumentation-koa@0.43.0': + resolution: {integrity: sha512-lDAhSnmoTIN6ELKmLJBplXzT/Jqs5jGZehuG22EdSMaTwgjMpxMDI1YtlKEhiWPWkrz5LUsd0aOO0ZRc9vn3AQ==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/instrumentation-mongodb@0.45.0': - resolution: {integrity: sha512-xnZP9+ayeB1JJyNE9cIiwhOJTzNEsRhXVdLgfzmrs48Chhhk026mQdM5CITfyXSCfN73FGAIB8d91+pflJEfWQ==} + '@opentelemetry/instrumentation-lru-memoizer@0.40.0': + resolution: {integrity: sha512-21xRwZsEdMPnROu/QsaOIODmzw59IYpGFmuC4aFWvMj6stA8+Ei1tX67nkarJttlNjoM94um0N4X26AD7ff54A==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/instrumentation-mongoose@0.39.0': - resolution: {integrity: sha512-J1r66A7zJklPPhMtrFOO7/Ud2p0Pv5u8+r23Cd1JUH6fYPmftNJVsLp2urAt6PHK4jVqpP/YegN8wzjJ2mZNPQ==} + '@opentelemetry/instrumentation-mongodb@0.47.0': + resolution: {integrity: sha512-yqyXRx2SulEURjgOQyJzhCECSh5i1uM49NUaq9TqLd6fA7g26OahyJfsr9NE38HFqGRHpi4loyrnfYGdrsoVjQ==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/instrumentation-mysql2@0.39.0': - resolution: {integrity: sha512-Iypuq2z6TCfriAXCIZjRq8GTFCKhQv5SpXbmI+e60rYdXw8NHtMH4NXcGF0eKTuoCsC59IYSTUvDQYDKReaszA==} + '@opentelemetry/instrumentation-mongoose@0.42.0': + resolution: {integrity: sha512-AnWv+RaR86uG3qNEMwt3plKX1ueRM7AspfszJYVkvkehiicC3bHQA6vWdb6Zvy5HAE14RyFbu9+2hUUjR2NSyg==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/instrumentation-mysql@0.39.0': - resolution: {integrity: sha512-8snHPh83rhrDf31v9Kq0Nf+ts8hdr7NguuszRqZomZBHgE0+UyXZSkXHAAFZoBPPRMGyM68uaFE5hVtFl+wOcA==} + '@opentelemetry/instrumentation-mysql2@0.41.0': + resolution: {integrity: sha512-REQB0x+IzVTpoNgVmy5b+UnH1/mDByrneimP6sbDHkp1j8QOl1HyWOrBH/6YWR0nrbU3l825Em5PlybjT3232g==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/instrumentation-nestjs-core@0.38.0': - resolution: {integrity: sha512-M381Df1dM8aqihZz2yK+ugvMFK5vlHG/835dc67Sx2hH4pQEQYDA2PpFPTgc9AYYOydQaj7ClFQunESimjXDgg==} + '@opentelemetry/instrumentation-mysql@0.41.0': + resolution: {integrity: sha512-jnvrV6BsQWyHS2qb2fkfbfSb1R/lmYwqEZITwufuRl37apTopswu9izc0b1CYRp/34tUG/4k/V39PND6eyiNvw==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/instrumentation-pg@0.42.0': - resolution: {integrity: sha512-sjgcM8CswYy8zxHgXv4RAZ09DlYhQ+9TdlourUs63Df/ek5RrB1ZbjznqW7PB6c3TyJJmX6AVtPTjAsROovEjA==} + '@opentelemetry/instrumentation-nestjs-core@0.40.0': + resolution: {integrity: sha512-WF1hCUed07vKmf5BzEkL0wSPinqJgH7kGzOjjMAiTGacofNXjb/y4KQ8loj2sNsh5C/NN7s1zxQuCgbWbVTGKg==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/instrumentation-redis-4@0.40.0': - resolution: {integrity: sha512-0ieQYJb6yl35kXA75LQUPhHtGjtQU9L85KlWa7d4ohBbk/iQKZ3X3CFl5jC5vNMq/GGPB3+w3IxNvALlHtrp7A==} + '@opentelemetry/instrumentation-pg@0.44.0': + resolution: {integrity: sha512-oTWVyzKqXud1BYEGX1loo2o4k4vaU1elr3vPO8NZolrBtFvQ34nx4HgUaexUDuEog00qQt+MLR5gws/p+JXMLQ==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/instrumentation@0.43.0': - resolution: {integrity: sha512-S1uHE+sxaepgp+t8lvIDuRgyjJWisAb733198kwQTUc9ZtYQ2V2gmyCtR1x21ePGVLoMiX/NWY7WA290hwkjJQ==} + '@opentelemetry/instrumentation-redis-4@0.42.0': + resolution: {integrity: sha512-NaD+t2JNcOzX/Qa7kMy68JbmoVIV37fT/fJYzLKu2Wwd+0NCxt+K2OOsOakA8GVg8lSpFdbx4V/suzZZ2Pvdjg==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 + '@opentelemetry/instrumentation-undici@0.6.0': + resolution: {integrity: sha512-ABJBhm5OdhGmbh0S/fOTE4N69IZ00CsHC5ijMYfzbw3E5NwLgpQk5xsljaECrJ8wz1SfXbO03FiSuu5AyRAkvQ==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': ^1.7.0 + '@opentelemetry/instrumentation@0.52.1': resolution: {integrity: sha512-uXJbYU/5/MBHjMp1FqrILLRuiJCs3Ofk0MeRDk8g1S1gD47U8X3JnSwcMO1rtRo1x1a7zKaQHaoYu49p/4eSKw==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 + '@opentelemetry/instrumentation@0.53.0': + resolution: {integrity: sha512-DMwg0hy4wzf7K73JJtl95m/e0boSoWhH07rfvHvYzQtBD3Bmv0Wc1x733vyZBqmFm8OjJD0/pfiUg1W3JjFX0A==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': ^1.3.0 + '@opentelemetry/redis-common@0.36.2': resolution: {integrity: sha512-faYX1N0gpLhej/6nyp6bgRjzAKXn5GOEMYY7YhciSfCoITAktLUtQ36d24QEWNA1/WA1y6qQunCe0OhHRkVl9g==} engines: {node: '>=14'} @@ -2502,14 +2560,20 @@ packages: peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' + '@opentelemetry/resources@1.29.0': + resolution: {integrity: sha512-s7mLXuHZE7RQr1wwweGcaRp3Q4UJJ0wazeGlc/N5/XSe6UyXfsh1UQGMADYeg7YwD+cEdMtU1yJAUXdnFzYzyQ==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': '>=1.0.0 <1.10.0' + '@opentelemetry/sdk-metrics@1.25.1': resolution: {integrity: sha512-9Mb7q5ioFL4E4dDrc4wC/A3NTHDat44v4I3p2pLPSxRvqUbDIQyMVr9uK+EU69+HWhlET1VaSrRzwdckWqY15Q==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': '>=1.3.0 <1.10.0' - '@opentelemetry/sdk-trace-base@1.25.1': - resolution: {integrity: sha512-C8k4hnEbc5FamuZQ92nTOp8X/diCY56XUTnMiv9UTuJitCzaNNHAVsdm5+HLCdI8SLQsLWIrG38tddMxLVoftw==} + '@opentelemetry/sdk-trace-base@1.29.0': + resolution: {integrity: sha512-hEOpAYLKXF3wGJpXOtWsxEtqBgde0SCv+w+jvr3/UusR4ll3QrENEGnSl1WDCyRrpqOQ5NCNOvZch9UFVa7MnQ==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' @@ -2518,6 +2582,14 @@ packages: resolution: {integrity: sha512-ZDjMJJQRlyk8A1KZFCc+bCbsyrn1wTwdNt56F7twdfUfnHUZUq77/WfONCj8p72NZOyP7pNTdUWSTYC3GTbuuQ==} engines: {node: '>=14'} + '@opentelemetry/semantic-conventions@1.27.0': + resolution: {integrity: sha512-sAay1RrB+ONOem0OZanAR1ZI/k7yDpnOQSQmTMuGImUQb2y8EbSaCJ94FQluM74xoU03vlb2d2U90hZluL6nQg==} + engines: {node: '>=14'} + + '@opentelemetry/semantic-conventions@1.28.0': + resolution: {integrity: sha512-lp4qAiMTD4sNWW4DbKLBkfiMZ4jbAboJIGOQr5DvciMRI494OapieI9qiODpOt0XBr1LjIDy1xAGAnVs5supTA==} + engines: {node: '>=14'} + '@opentelemetry/sql-common@0.40.1': resolution: {integrity: sha512-nSDlnHSqzC3pXn/wZEZVLuAuJ1MYMXPBwtv2qAbCa3847SaHItdE7SzUq/Jtb0KZmh1zfAbNi3AAMjztTT4Ugg==} engines: {node: '>=14'} @@ -2635,8 +2707,8 @@ packages: resolution: {integrity: sha512-c83qWb22rNRuB0UaVCI0uRPNRr8Z0FWnEIvT47jiHAmOIUHbBOg5XvV7pM5x+rKn9HRpjxquDbXYSXr3fAKFcw==} engines: {node: '>=12'} - '@prisma/instrumentation@5.16.0': - resolution: {integrity: sha512-MVzNRW2ikWvVNnMIEgQMcwWxpFD+XF2U2h0Qz7MjutRqJxrhWexWV2aSi2OXRaU8UL5wzWw7pnjdKUzYhWauLg==} + '@prisma/instrumentation@5.19.1': + resolution: {integrity: sha512-VLnzMQq7CWroL5AeaW0Py2huiNKeoMfCH3SUxstdzPrlWQi6UQ9UrfcbUkNHlVFqOMacqy8X/8YtE0kuKDpD9w==} '@radix-ui/number@1.1.0': resolution: {integrity: sha512-V3gRzhVNU1ldS5XhAPTom1fOIo4ccrjjJgmE+LI2h/WaFpHmx0MQApT+KZHnx8abG6Avtfcz4WoEciMnpFT3HQ==} @@ -3259,77 +3331,77 @@ packages: peerDependencies: semantic-release: '>=20.1.0' - '@sentry-internal/browser-utils@8.13.0': - resolution: {integrity: sha512-lqq8BYbbs9KTlDuyB5NjdZB6P/llqQs32KUgaCQ/k5DFB4Zf56+BFHXObnMHxwx375X1uixtnEphagWZa+nsLQ==} + '@sentry-internal/browser-utils@8.34.0': + resolution: {integrity: sha512-4AcYOzPzD1tL5eSRQ/GpKv5enquZf4dMVUez99/Bh3va8qiJrNP55AcM7UzZ7WZLTqKygIYruJTU5Zu2SpEAPQ==} engines: {node: '>=14.18'} - '@sentry-internal/feedback@8.13.0': - resolution: {integrity: sha512-YyJ6SzpTonixvguAg0H9vkEp7Jq8ZeVY8M4n47ClR0+TtaAUp04ZhcJpHKF7PwBIAzc7DRr2XP112tmWgiVEcg==} + '@sentry-internal/feedback@8.34.0': + resolution: {integrity: sha512-aYSM2KPUs0FLPxxbJCFSwCYG70VMzlT04xepD1Y/tTlPPOja/02tSv2tyOdZbv8Uw7xslZs3/8Lhj74oYcTBxw==} engines: {node: '>=14.18'} - '@sentry-internal/replay-canvas@8.13.0': - resolution: {integrity: sha512-lPlfWVIHX+gW4S8a/UOVutuqMyQhlkNUAay0W21MVhZJT5Mtj0p21D/Cz7nrOQRDIiLNq90KAGK2tLxx5NkiWA==} + '@sentry-internal/replay-canvas@8.34.0': + resolution: {integrity: sha512-x8KhZcCDpbKHqFOykYXiamX6x0LRxv6N1OJHoH+XCrMtiDBZr4Yo30d/MaS6rjmKGMtSRij30v+Uq+YWIgxUrg==} engines: {node: '>=14.18'} - '@sentry-internal/replay@8.13.0': - resolution: {integrity: sha512-DJ1jF/Pab0FH4SeCvSGCnGAu/s0wJvhBWM5VjQp7Jjmcfunp+R3vJibqU8gAVZU1nYRLaqprLdIXrSyP2Km8nQ==} + '@sentry-internal/replay@8.34.0': + resolution: {integrity: sha512-EoMh9NYljNewZK1quY23YILgtNdGgrkzJ9TPsj6jXUG0LZ0Q7N7eFWd0xOEDBvFxrmI3cSXF1i4d1sBb+eyKRw==} engines: {node: '>=14.18'} - '@sentry/babel-plugin-component-annotate@2.20.1': - resolution: {integrity: sha512-4mhEwYTK00bIb5Y9UWIELVUfru587Vaeg0DQGswv4aIRHIiMKLyNqCEejaaybQ/fNChIZOKmvyqXk430YVd7Qg==} + '@sentry/babel-plugin-component-annotate@2.22.3': + resolution: {integrity: sha512-OlHA+i+vnQHRIdry4glpiS/xTOtgjmpXOt6IBOUqynx5Jd/iK1+fj+t8CckqOx9wRacO/hru2wfW/jFq0iViLg==} engines: {node: '>= 14'} - '@sentry/browser@8.13.0': - resolution: {integrity: sha512-/tp7HZ5qjwDLtwooPMoexdAi2PG7gMNY0bHeMlwy20hs8mclC8RW8ZiJA6czXHfgnbmvxfrHaY53IJyz//JnlA==} + '@sentry/browser@8.34.0': + resolution: {integrity: sha512-3HHG2NXxzHq1lVmDy2uRjYjGNf9NsJsTPlOC70vbQdOb+S49EdH/XMPy+J3ruIoyv6Cu0LwvA6bMOM6rHZOgNQ==} engines: {node: '>=14.18'} - '@sentry/bundler-plugin-core@2.20.1': - resolution: {integrity: sha512-6ipbmGzHekxeRCbp7eoefr6bdd/lW4cNA9eNnrmd9+PicubweGaZZbH2NjhFHsaxzgOezwipDHjrTaap2kTHgw==} + '@sentry/bundler-plugin-core@2.22.3': + resolution: {integrity: sha512-DeoUl0WffcqZZRl5Wy9aHvX4WfZbbWt0QbJ7NJrcEViq+dRAI2FQTYECFLwdZi5Gtb3oyqZICO+P7k8wDnzsjQ==} engines: {node: '>= 14'} - '@sentry/cli-darwin@2.32.1': - resolution: {integrity: sha512-z/lEwANTYPCzbWTZ2+eeeNYxRLllC8knd0h+vtAKlhmGw/fyc/N39cznIFyFu+dLJ6tTdjOWOeikHtKuS/7onw==} + '@sentry/cli-darwin@2.39.1': + resolution: {integrity: sha512-kiNGNSAkg46LNGatfNH5tfsmI/kCAaPA62KQuFZloZiemTNzhy9/6NJP8HZ/GxGs8GDMxic6wNrV9CkVEgFLJQ==} engines: {node: '>=10'} os: [darwin] - '@sentry/cli-linux-arm64@2.32.1': - resolution: {integrity: sha512-hsGqHYuecUl1Yhq4MhiRejfh1gNlmhyNPcQEoO/DDRBnGnJyEAdiDpKXJcc2e/lT9k40B55Ob2CP1SeY040T2w==} + '@sentry/cli-linux-arm64@2.39.1': + resolution: {integrity: sha512-5VbVJDatolDrWOgaffsEM7znjs0cR8bHt9Bq0mStM3tBolgAeSDHE89NgHggfZR+DJ2VWOy4vgCwkObrUD6NQw==} engines: {node: '>=10'} cpu: [arm64] os: [linux, freebsd] - '@sentry/cli-linux-arm@2.32.1': - resolution: {integrity: sha512-m0lHkn+o4YKBq8KptGZvpT64FAwSl9mYvHZO9/ChnEGIJ/WyJwiN1X1r9JHVaW4iT5lD0Y5FAyq3JLkk0m0XHg==} + '@sentry/cli-linux-arm@2.39.1': + resolution: {integrity: sha512-DkENbxyRxUrfLnJLXTA4s5UL/GoctU5Cm4ER1eB7XN7p9WsamFJd/yf2KpltkjEyiTuplv0yAbdjl1KX3vKmEQ==} engines: {node: '>=10'} cpu: [arm] os: [linux, freebsd] - '@sentry/cli-linux-i686@2.32.1': - resolution: {integrity: sha512-SuMLN1/ceFd3Q/B0DVyh5igjetTAF423txiABAHASenEev0lG0vZkRDXFclfgDtDUKRPmOXW7VDMirM3yZWQHQ==} + '@sentry/cli-linux-i686@2.39.1': + resolution: {integrity: sha512-pXWVoKXCRrY7N8vc9H7mETiV9ZCz+zSnX65JQCzZxgYrayQPJTc+NPRnZTdYdk5RlAupXaFicBI2GwOCRqVRkg==} engines: {node: '>=10'} cpu: [x86, ia32] os: [linux, freebsd] - '@sentry/cli-linux-x64@2.32.1': - resolution: {integrity: sha512-x4FGd6xgvFddz8V/dh6jii4wy9qjWyvYLBTz8Fhi9rIP+b8wQ3oxwHIdzntareetZP7C1ggx+hZheiYocNYVwA==} + '@sentry/cli-linux-x64@2.39.1': + resolution: {integrity: sha512-IwayNZy+it7FWG4M9LayyUmG1a/8kT9+/IEm67sT5+7dkMIMcpmHDqL8rWcPojOXuTKaOBBjkVdNMBTXy0mXlA==} engines: {node: '>=10'} cpu: [x64] os: [linux, freebsd] - '@sentry/cli-win32-i686@2.32.1': - resolution: {integrity: sha512-i6aZma9mFzR+hqMY5VliQZEX6ypP/zUjPK0VtIMYWs5cC6PsQLRmuoeJmy3Z7d4nlh0CdK5NPC813Ej6RY6/vg==} + '@sentry/cli-win32-i686@2.39.1': + resolution: {integrity: sha512-NglnNoqHSmE+Dz/wHeIVRnV2bLMx7tIn3IQ8vXGO5HWA2f8zYJGktbkLq1Lg23PaQmeZLPGlja3gBQfZYSG10Q==} engines: {node: '>=10'} cpu: [x86, ia32] os: [win32] - '@sentry/cli-win32-x64@2.32.1': - resolution: {integrity: sha512-B58w/lRHLb4MUSjJNfMMw2cQykfimDCMLMmeK+1EiT2RmSeNQliwhhBxYcKk82a8kszH6zg3wT2vCea7LyPUyA==} + '@sentry/cli-win32-x64@2.39.1': + resolution: {integrity: sha512-xv0R2CMf/X1Fte3cMWie1NXuHmUyQPDBfCyIt6k6RPFPxAYUgcqgMPznYwVMwWEA1W43PaOkSn3d8ZylsDaETw==} engines: {node: '>=10'} cpu: [x64] os: [win32] - '@sentry/cli@2.32.1': - resolution: {integrity: sha512-MWkbkzZfnlE7s2pPbg4VozRSAeMlIObfZlTIou9ye6XnPt6ZmmxCLOuOgSKMv4sXg6aeqKNzMNiadThxCWyvPg==} + '@sentry/cli@2.39.1': + resolution: {integrity: sha512-JIb3e9vh0+OmQ0KxmexMXg9oZsR/G7HMwxt5BUIKAXZ9m17Xll4ETXTRnRUBT3sf7EpNGAmlQk1xEmVN9pYZYQ==} engines: {node: '>= 10'} hasBin: true @@ -3337,40 +3409,40 @@ packages: resolution: {integrity: sha512-YnanVlmulkjgZiVZ9BfY9k6I082n+C+LbZo52MTvx3FY6RE5iyiPMpaOh67oXEZRWcYQEGm+bKruRxLVP6RlbA==} engines: {node: '>=8'} - '@sentry/core@8.13.0': - resolution: {integrity: sha512-N9Qg4ZGxZWp8eb2eUUHVVKgjBLtFIjS805nG92s6yJmkvOpKm6mLtcUaT/iDf3Hta6nG+xRkhbE3r+Z4cbXG8w==} + '@sentry/core@8.34.0': + resolution: {integrity: sha512-adrXCTK/zsg5pJ67lgtZqdqHvyx6etMjQW3P82NgWdj83c8fb+zH+K79Z47pD4zQjX0ou2Ws5nwwi4wJbz4bfA==} engines: {node: '>=14.18'} '@sentry/integrations@7.114.0': resolution: {integrity: sha512-BJIBWXGKeIH0ifd7goxOS29fBA8BkEgVVCahs6xIOXBjX1IRS6PmX0zYx/GP23nQTfhJiubv2XPzoYOlZZmDxg==} engines: {node: '>=8'} - '@sentry/nextjs@8.13.0': - resolution: {integrity: sha512-zXZWCA/sfGVP3MEGrshUZiMM5eOu33o8vDTKExsmGRWGTsR1tkLyLUwxQQSE9PdihUnPqv/Nw27eMXZv2XpJMw==} + '@sentry/nextjs@8.34.0': + resolution: {integrity: sha512-REHE3E21Mnm92B3BfJz3GTMsaZM8vaDJAe7RlAMDltESRECv+ELJ5qVRLgAp8Bd6w4mG8IRNINmK2UwHrAIi9g==} engines: {node: '>=14.18'} peerDependencies: next: ^13.2.0 || ^14.0 || ^15.0.0-rc.0 - webpack: '>= 5.0.0' + webpack: '>=5.0.0' peerDependenciesMeta: webpack: optional: true - '@sentry/node@8.13.0': - resolution: {integrity: sha512-OeZ7K90RhyxfwfreerIi4cszzHrPRRH36STJno2+p3sIGbG5VScOccqXzYEOAqHpByxnti4KQN34BLAT2BFOEA==} + '@sentry/node@8.34.0': + resolution: {integrity: sha512-Q7BPp7Y8yCcwD620xoziWSOuPi/PCIdttkczvB0BGzBRYh2s702h+qNusRijRpVNZmzmYOo9m1x7Y1O/b8/v2A==} engines: {node: '>=14.18'} - '@sentry/opentelemetry@8.13.0': - resolution: {integrity: sha512-NYn/HNE/SxFXe8pfnxJknhrrRzYRMHNssCoi5M1CeR5G7F2BGxxVmaGsd8j0WyTCpUS4i97G4vhYtDGxHvWN6w==} + '@sentry/opentelemetry@8.34.0': + resolution: {integrity: sha512-WS91L+HVKGVIzOgt0szGp+24iKOs86BZsAHGt0HWnMR4kqWP6Ak+TLvqWDCxnuzniZMxdewDGA8p5hrBAPsmsA==} engines: {node: '>=14.18'} peerDependencies: '@opentelemetry/api': ^1.9.0 '@opentelemetry/core': ^1.25.1 - '@opentelemetry/instrumentation': ^0.52.1 - '@opentelemetry/sdk-trace-base': ^1.25.1 - '@opentelemetry/semantic-conventions': ^1.25.1 + '@opentelemetry/instrumentation': ^0.53.0 + '@opentelemetry/sdk-trace-base': ^1.26.0 + '@opentelemetry/semantic-conventions': ^1.27.0 - '@sentry/react@8.13.0': - resolution: {integrity: sha512-gz+aHZMcl6uvHkmLBGzMGjJJ+Vpl+W0VXJsKB9fdjZDDF5vJpgXTR9mwMEXJ9lKi+cY6tDe0+af+DA8BGJgw0Q==} + '@sentry/react@8.34.0': + resolution: {integrity: sha512-gIgzhj7h67C+Sdq2ul4fOSK142Gf0uV99bqHRdtIiUlXw9yjzZQY5TKTtzbOaevn7qBJ0xrRKtIRUbOBMl0clw==} engines: {node: '>=14.18'} peerDependencies: react: ^16.14.0 || 17.x || 18.x || 19.x @@ -3383,20 +3455,24 @@ packages: resolution: {integrity: sha512-r63s/H5gvQnQM9tTGBXz2xErUbxZALh4e2Lg/1aHj4zIvGLBjA2z5qWsh6TEZYbpmgAyGShLDr6+rWeUVf9yBQ==} engines: {node: '>=14.18'} + '@sentry/types@8.34.0': + resolution: {integrity: sha512-zLRc60CzohGCo6zNsNeQ9JF3SiEeRE4aDCP9fDDdIVCOKovS+mn1rtSip0qd0Vp2fidOu0+2yY0ALCz1A3PJSQ==} + engines: {node: '>=14.18'} + '@sentry/utils@7.114.0': resolution: {integrity: sha512-319N90McVpupQ6vws4+tfCy/03AdtsU0MurIE4+W5cubHME08HtiEWlfacvAxX+yuKFhvdsO4K4BB/dj54ideg==} engines: {node: '>=8'} - '@sentry/utils@8.13.0': - resolution: {integrity: sha512-PxV0v9VbGWH9zP37P5w2msLUFDr287nYjoY2XVF+RSolyiTs1CQNI5ZMUO3o4MsSac/dpXxjyrZXQd72t/jRYA==} + '@sentry/utils@8.34.0': + resolution: {integrity: sha512-W1KoRlFUjprlh3t86DZPFxLfM6mzjRzshVfMY7vRlJFymBelJsnJ3A1lPeBZM9nCraOSiw6GtOWu6k5BAkiGIg==} engines: {node: '>=14.18'} - '@sentry/vercel-edge@8.13.0': - resolution: {integrity: sha512-6i2FTpIec/o+lfdtzXRIebo38ca4DWHXmpzfFZJVcYdBFWbu2F3Q6c61tnXGuZhyRjGtEW1ASPlbd8nterQIwQ==} + '@sentry/vercel-edge@8.34.0': + resolution: {integrity: sha512-yF6043FcVO9GqPawCJZp0psEL8iF9+5bOlAdQydCyaj2BtDgFvAeBVI19qlDeAHhqsXNfTD0JsIox2aJPNupwg==} engines: {node: '>=14.18'} - '@sentry/webpack-plugin@2.20.1': - resolution: {integrity: sha512-U6LzoE09Ndt0OCWROoRaZqqIHGxyMRdKpBhbqoBqyyfVwXN/zGW3I/cWZ1e8rreiKFj+2+c7+X0kOS+NGMTUrg==} + '@sentry/webpack-plugin@2.22.3': + resolution: {integrity: sha512-Sq1S6bL3nuoTP5typkj+HPjQ13dqftIE8kACAq4tKkXOpWO9bf6HtqcruEQCxMekbWDTdljsrknQ17ZBx2q66Q==} engines: {node: '>= 14'} peerDependencies: webpack: '>=4.40.0' @@ -3553,33 +3629,18 @@ packages: resolution: {integrity: sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==} engines: {node: '>=10.13.0'} - '@types/accepts@1.3.7': - resolution: {integrity: sha512-Pay9fq2lM2wXPWbteBsRAGiWH2hig4ZE2asK+mm7kUzlxRTfL961rj89I6zV/E3PcIkDqyuBEcMxFT7rccugeQ==} - '@types/acorn@4.0.6': resolution: {integrity: sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==} - '@types/body-parser@1.19.5': - resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==} - '@types/connect@3.4.36': resolution: {integrity: sha512-P63Zd/JUGq+PdrM1lv0Wv5SBYeA2+CORvbrXbngriYY0jzLUWfQMQQxOhjONEz/wlHOAxOdY7CY65rgQdTjq2w==} - '@types/connect@3.4.38': - resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} - - '@types/content-disposition@0.5.8': - resolution: {integrity: sha512-QVSSvno3dE0MgO76pJhmv4Qyi/j0Yk9pBp0Y7TJ2Tlj+KCgJWY6qX7nnxCOLkZ3VYRSIk1WTxCvwUSdx6CCLdg==} - '@types/conventional-commits-parser@5.0.0': resolution: {integrity: sha512-loB369iXNmAZglwWATL+WRe+CRMmmBPtpolYzIebFaX4YA3x+BEfLqhUAV9WanycKI3TG1IMr5bMJDajDKLlUQ==} '@types/cookie@0.6.0': resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} - '@types/cookies@0.9.0': - resolution: {integrity: sha512-40Zk8qR147RABiQ7NQnBzWzDcjKzNrntB5BAmeGCb2p/MIyOE+4BVvc17wumsUqUw00bJYqoXFHYygQnEFh4/Q==} - '@types/d3-array@3.2.1': resolution: {integrity: sha512-Y2Jn2idRrLzUfAKV2LyRImR+y4oa2AntrgID95SHJxuMUrkNXmanDSed71sRNZysveJVt1hLLemQZIady0FpEg==} @@ -3691,24 +3752,12 @@ packages: '@types/estree@1.0.6': resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} - '@types/express-serve-static-core@4.17.41': - resolution: {integrity: sha512-OaJ7XLaelTgrvlZD8/aa0vvvxZdUmlCn6MtWeB7TkiKW70BQLc9XEPpDLPdbo52ZhXUCrznlWdCHWxJWtdyajA==} - - '@types/express@4.17.21': - resolution: {integrity: sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==} - '@types/geojson@7946.0.15': resolution: {integrity: sha512-9oSxFzDCT2Rj6DfcHF8G++jxBKS7mBqXl5xrRW+Kbvjry6Uduya2iiwqHPhVXpasAVMBYKkEPGgKhd3+/HZ6xA==} '@types/hast@3.0.4': resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} - '@types/http-assert@1.5.5': - resolution: {integrity: sha512-4+tE/lwdAahgZT1g30Jkdm9PzFRde0xwxBNUyRsCitRvCQB90iuA2uJYdUnhnANRcqGXaWOGY4FEoxeElNAK2g==} - - '@types/http-errors@2.0.4': - resolution: {integrity: sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==} - '@types/js-cookie@3.0.6': resolution: {integrity: sha512-wkw9yd1kEXOPnvEeEV1Go1MmxtBJL0RR79aOTAApecWFVu7w0NNXNqhcWgvw2YgZDYadliXkl14pa3WXw5jlCQ==} @@ -3727,18 +3776,6 @@ packages: '@types/katex@0.16.7': resolution: {integrity: sha512-HMwFiRujE5PjrgwHQ25+bsLJgowjGjm5Z8FVSf0N6PwgJrwxH0QxzHYDcKsTfV3wva0vzrpqMTJS2jXPr5BMEQ==} - '@types/keygrip@1.0.6': - resolution: {integrity: sha512-lZuNAY9xeJt7Bx4t4dx0rYCDqGPW8RXhQZK1td7d4H6E9zYbLoOtjBvfwdTKpsyxQI/2jv+armjX/RW+ZNpXOQ==} - - '@types/koa-compose@3.2.8': - resolution: {integrity: sha512-4Olc63RY+MKvxMwVknCUDhRQX1pFQoBZ/lXcRLP69PQkEpze/0cr8LNqJQe5NFb/b19DWi2a5bTi2VAlQzhJuA==} - - '@types/koa@2.14.0': - resolution: {integrity: sha512-DTDUyznHGNHAl+wd1n0z1jxNajduyTh8R53xoewuerdBzGo6Ogj6F2299BFtrexJw4NtgjsI5SMPCmV9gZwGXA==} - - '@types/koa__router@12.0.3': - resolution: {integrity: sha512-5YUJVv6NwM1z7m6FuYpKfNLTZ932Z6EF6xy2BbtpJSyn13DKNQEkXVffFVSnJHxvwwWh2SAeumpjAYUELqgjyw==} - '@types/lodash-es@4.17.12': resolution: {integrity: sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==} @@ -3751,17 +3788,11 @@ packages: '@types/mdx@2.0.10': resolution: {integrity: sha512-Rllzc5KHk0Al5/WANwgSPl1/CwjqCy+AZrGd78zuK+jO9aDM6ffblZ+zIjgPNAaEBmlO0RYDvLNh7wD0zKVgEg==} - '@types/mime@1.3.5': - resolution: {integrity: sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==} - - '@types/mime@3.0.4': - resolution: {integrity: sha512-iJt33IQnVRkqeqC7PzBHPTC6fDlRNRW8vjrgqtScAhrmMwe8c4Eo7+fUGTa+XdWrpEgpyKWMYmi2dIwMAYRzPw==} - '@types/ms@0.7.34': resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} - '@types/mysql@2.15.22': - resolution: {integrity: sha512-wK1pzsJVVAjYCSZWQoWHziQZbNggXFDUEIGf54g4ZM/ERuP86uGdWeKZWMYlqTPMZfHJJvLPyogXGvCOg87yLQ==} + '@types/mysql@2.15.26': + resolution: {integrity: sha512-DSLCOXhkvfS5WNNPbfn2KdICAmk8lLc+/PNvnPnF7gOdMZCxopXduqv0OQ13y/yA/zXTSikZZqVgybUxOEg6YQ==} '@types/negotiator@0.6.3': resolution: {integrity: sha512-JkXTOdKs5MF086b/pt8C3+yVp3iDUwG635L7oCH6HvJvvr6lSUU5oe/gLXnPEfYRROHjJIPgCV6cuAg8gGkntQ==} @@ -3778,18 +3809,12 @@ packages: '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} - '@types/pg-pool@2.0.4': - resolution: {integrity: sha512-qZAvkv1K3QbmHHFYSNRYPkRjOWRLBYrL4B9c+wG0GSVGBw0NtJwPcgx/DSddeDJvRGMHCEQ4VMEVfuJ/0gZ3XQ==} + '@types/pg-pool@2.0.6': + resolution: {integrity: sha512-TaAUE5rq2VQYxab5Ts7WZhKNmuN78Q6PiFonTDdpbx8a1H0M1vhy3rhiMjl+e2iHmogyMw7jZF4FrE6eJUy5HQ==} '@types/pg@8.6.1': resolution: {integrity: sha512-1Kc4oAGzAl7uqUStZCDvaLFqZrW9qWSjXOmBfdgyBP5La7Us6Mg4GBvRlSoaZMhQF/zSj1C8CtKMBkoiT8eL8w==} - '@types/qs@6.9.10': - resolution: {integrity: sha512-3Gnx08Ns1sEoCrWssEgTSJs/rsT2vhGP+Ja9cnnk9k4ALxinORlQneLXFeFKOTJMOeZUFD1s7w+w2AphTpvzZw==} - - '@types/range-parser@1.2.7': - resolution: {integrity: sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==} - '@types/react-dom@19.0.0': resolution: {integrity: sha512-1KfiQKsH1o00p9m5ag12axHQSb3FOU9H20UTrujVSkNhuCrRHiQWFqgEnTNK5ZNfnzZv8UWrnXVqCmCF9fgY3w==} @@ -3799,15 +3824,12 @@ packages: '@types/semver@7.5.6': resolution: {integrity: sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==} - '@types/send@0.17.4': - resolution: {integrity: sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==} - - '@types/serve-static@1.15.5': - resolution: {integrity: sha512-PDRk21MnK70hja/YF8AHfC7yIsiQHn1rcXx7ijCFBX/k+XQJhQT/gw3xekXKJvx+5SXaMMS8oqQy09Mzvz2TuQ==} - '@types/shimmer@1.0.5': resolution: {integrity: sha512-9Hp0ObzwwO57DpLFF0InUjUm/II8GmKAvzbefxQTihCb7KI6yc9yzf0nLc4mVdby5N4DRCgQM2wCup9KTieeww==} + '@types/shimmer@1.2.0': + resolution: {integrity: sha512-UE7oxhQLLd9gub6JKIAhDq06T0F6FnztwMNRvYgjeQSBeMc1ZG/tA47EwfduvkuQS8apbkM/lpLpWsaCeYsXVg==} + '@types/stripe@8.0.417': resolution: {integrity: sha512-PTuqskh9YKNENnOHGVJBm4sM0zE8B1jZw1JIskuGAPkMB+OH236QeN8scclhYGPA4nG6zTtPXgwpXdp+HPDTVw==} deprecated: This is a stub types definition. stripe provides its own type definitions, so you do not need this installed. @@ -4057,11 +4079,6 @@ packages: engines: {node: '>=0.4.0'} hasBin: true - acorn@8.11.2: - resolution: {integrity: sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==} - engines: {node: '>=0.4.0'} - hasBin: true - acorn@8.12.1: resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==} engines: {node: '>=0.4.0'} @@ -6146,8 +6163,8 @@ packages: resolution: {integrity: sha512-P9J71vT5nLlDeV8FHs5nNxaLbrpfAV5cF5srvbZfpwpcJoM/xZR3hiv+q+SAnuSmuGbXMWud063iIMx/V/EWZQ==} engines: {node: '>=12.2'} - import-in-the-middle@1.4.2: - resolution: {integrity: sha512-9WOz1Yh/cvO/p69sxRmhyQwrIGGSp7EIdcb+fFNVi7CzQGQB8U1/1XrKVSbEd/GNOAeM0peJtmi7+qphe7NvAw==} + import-in-the-middle@1.11.3: + resolution: {integrity: sha512-tNpKEb4AjZrCyrxi+Eyu43h5ig0O8ZRFSXPHh/00/o+4P4pKzVEW/m5lsVtsAT7fCIgmQOAPjdqecGDsBXRxsw==} import-in-the-middle@1.8.1: resolution: {integrity: sha512-yhRwoHtiLGvmSozNOALgjRPFI6uYsds60EoMqqnXyyv+JOIW/BrrLejuTGBt+bq0T5tLzOHrN0T7xYTm4Qt/ng==} @@ -7104,10 +7121,6 @@ packages: resolution: {integrity: sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==} engines: {node: '>=8'} - minipass@7.0.4: - resolution: {integrity: sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==} - engines: {node: '>=16 || 14 >=14.17'} - minipass@7.1.2: resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} engines: {node: '>=16 || 14 >=14.17'} @@ -7490,10 +7503,6 @@ packages: oniguruma-to-es@0.7.0: resolution: {integrity: sha512-HRaRh09cE0gRS3+wi2zxekB+I5L8C/gN60S+vb11eADHUaB/q4u8wGGOX3GvwvitG8ixaeycZfeoyruKQzUgNg==} - opentelemetry-instrumentation-fetch-node@1.2.0: - resolution: {integrity: sha512-aiSt/4ubOTyb1N5C2ZbGrBvaJOXIZhZvpRPYuUVxQJe27wJZqf/o65iPrqgLcgfeOLaQ8cS2Q+762jrYvniTrA==} - engines: {node: '>18.0.0'} - optionator@0.9.3: resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} engines: {node: '>= 0.8.0'} @@ -7671,10 +7680,6 @@ packages: resolution: {integrity: sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg==} engines: {node: '>=0.10.0'} - path-scurry@1.10.1: - resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==} - engines: {node: '>=16 || 14 >=14.17'} - path-scurry@1.11.1: resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} engines: {node: '>=16 || 14 >=14.18'} @@ -8285,8 +8290,8 @@ packages: robust-predicates@3.0.2: resolution: {integrity: sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==} - rollup@3.29.4: - resolution: {integrity: sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==} + rollup@3.29.5: + resolution: {integrity: sha512-GVsDdsbJzzy4S/v3dqWPJ7EfvZJfCHiDqe80IyrF59LYuP+e6U1LJoUqeuqRbwAWoMNoXivMNeNAOf5E22VA1w==} engines: {node: '>=14.18.0', npm: '>=8.0.0'} hasBin: true @@ -11710,6 +11715,10 @@ snapshots: dependencies: '@opentelemetry/api': 1.9.0 + '@opentelemetry/api-logs@0.53.0': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/api@1.9.0': {} '@opentelemetry/context-async-hooks@1.25.1(@opentelemetry/api@1.9.0)': @@ -11721,164 +11730,226 @@ snapshots: '@opentelemetry/api': 1.9.0 '@opentelemetry/semantic-conventions': 1.25.1 - '@opentelemetry/instrumentation-connect@0.37.0(@opentelemetry/api@1.9.0)': + '@opentelemetry/core@1.26.0(@opentelemetry/api@1.9.0)': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/semantic-conventions': 1.27.0 + + '@opentelemetry/core@1.29.0(@opentelemetry/api@1.9.0)': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/semantic-conventions': 1.28.0 + + '@opentelemetry/instrumentation-amqplib@0.42.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/core': 1.25.1(@opentelemetry/api@1.9.0) - '@opentelemetry/instrumentation': 0.52.1(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.25.1 - '@types/connect': 3.4.36 + '@opentelemetry/instrumentation': 0.53.0(@opentelemetry/api@1.9.0) + '@opentelemetry/semantic-conventions': 1.28.0 transitivePeerDependencies: - supports-color - '@opentelemetry/instrumentation-express@0.40.1(@opentelemetry/api@1.9.0)': + '@opentelemetry/instrumentation-connect@0.39.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/core': 1.25.1(@opentelemetry/api@1.9.0) - '@opentelemetry/instrumentation': 0.52.1(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.25.1 + '@opentelemetry/instrumentation': 0.53.0(@opentelemetry/api@1.9.0) + '@opentelemetry/semantic-conventions': 1.28.0 + '@types/connect': 3.4.36 transitivePeerDependencies: - supports-color - '@opentelemetry/instrumentation-fastify@0.37.0(@opentelemetry/api@1.9.0)': + '@opentelemetry/instrumentation-dataloader@0.12.0(@opentelemetry/api@1.9.0)': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/instrumentation': 0.53.0(@opentelemetry/api@1.9.0) + transitivePeerDependencies: + - supports-color + + '@opentelemetry/instrumentation-express@0.42.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/core': 1.25.1(@opentelemetry/api@1.9.0) - '@opentelemetry/instrumentation': 0.52.1(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.25.1 + '@opentelemetry/instrumentation': 0.53.0(@opentelemetry/api@1.9.0) + '@opentelemetry/semantic-conventions': 1.28.0 transitivePeerDependencies: - supports-color - '@opentelemetry/instrumentation-graphql@0.41.0(@opentelemetry/api@1.9.0)': + '@opentelemetry/instrumentation-fastify@0.39.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 - '@opentelemetry/instrumentation': 0.52.1(@opentelemetry/api@1.9.0) + '@opentelemetry/core': 1.25.1(@opentelemetry/api@1.9.0) + '@opentelemetry/instrumentation': 0.53.0(@opentelemetry/api@1.9.0) + '@opentelemetry/semantic-conventions': 1.28.0 transitivePeerDependencies: - supports-color - '@opentelemetry/instrumentation-hapi@0.39.0(@opentelemetry/api@1.9.0)': + '@opentelemetry/instrumentation-fs@0.15.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/core': 1.25.1(@opentelemetry/api@1.9.0) - '@opentelemetry/instrumentation': 0.52.1(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.25.1 + '@opentelemetry/instrumentation': 0.53.0(@opentelemetry/api@1.9.0) + transitivePeerDependencies: + - supports-color + + '@opentelemetry/instrumentation-generic-pool@0.39.0(@opentelemetry/api@1.9.0)': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/instrumentation': 0.53.0(@opentelemetry/api@1.9.0) transitivePeerDependencies: - supports-color - '@opentelemetry/instrumentation-http@0.52.1(@opentelemetry/api@1.9.0)': + '@opentelemetry/instrumentation-graphql@0.43.0(@opentelemetry/api@1.9.0)': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/instrumentation': 0.53.0(@opentelemetry/api@1.9.0) + transitivePeerDependencies: + - supports-color + + '@opentelemetry/instrumentation-hapi@0.41.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/core': 1.25.1(@opentelemetry/api@1.9.0) - '@opentelemetry/instrumentation': 0.52.1(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.25.1 - semver: 7.5.4 + '@opentelemetry/instrumentation': 0.53.0(@opentelemetry/api@1.9.0) + '@opentelemetry/semantic-conventions': 1.28.0 transitivePeerDependencies: - supports-color - '@opentelemetry/instrumentation-ioredis@0.41.0(@opentelemetry/api@1.9.0)': + '@opentelemetry/instrumentation-http@0.53.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 - '@opentelemetry/instrumentation': 0.52.1(@opentelemetry/api@1.9.0) + '@opentelemetry/core': 1.26.0(@opentelemetry/api@1.9.0) + '@opentelemetry/instrumentation': 0.53.0(@opentelemetry/api@1.9.0) + '@opentelemetry/semantic-conventions': 1.27.0 + semver: 7.6.3 + transitivePeerDependencies: + - supports-color + + '@opentelemetry/instrumentation-ioredis@0.43.0(@opentelemetry/api@1.9.0)': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/instrumentation': 0.53.0(@opentelemetry/api@1.9.0) '@opentelemetry/redis-common': 0.36.2 - '@opentelemetry/semantic-conventions': 1.25.1 + '@opentelemetry/semantic-conventions': 1.28.0 transitivePeerDependencies: - supports-color - '@opentelemetry/instrumentation-koa@0.41.0(@opentelemetry/api@1.9.0)': + '@opentelemetry/instrumentation-kafkajs@0.3.0(@opentelemetry/api@1.9.0)': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/instrumentation': 0.53.0(@opentelemetry/api@1.9.0) + '@opentelemetry/semantic-conventions': 1.28.0 + transitivePeerDependencies: + - supports-color + + '@opentelemetry/instrumentation-koa@0.43.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/core': 1.25.1(@opentelemetry/api@1.9.0) - '@opentelemetry/instrumentation': 0.52.1(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.25.1 - '@types/koa': 2.14.0 - '@types/koa__router': 12.0.3 + '@opentelemetry/instrumentation': 0.53.0(@opentelemetry/api@1.9.0) + '@opentelemetry/semantic-conventions': 1.28.0 transitivePeerDependencies: - supports-color - '@opentelemetry/instrumentation-mongodb@0.45.0(@opentelemetry/api@1.9.0)': + '@opentelemetry/instrumentation-lru-memoizer@0.40.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 - '@opentelemetry/instrumentation': 0.52.1(@opentelemetry/api@1.9.0) + '@opentelemetry/instrumentation': 0.53.0(@opentelemetry/api@1.9.0) + transitivePeerDependencies: + - supports-color + + '@opentelemetry/instrumentation-mongodb@0.47.0(@opentelemetry/api@1.9.0)': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/instrumentation': 0.53.0(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-metrics': 1.25.1(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.25.1 + '@opentelemetry/semantic-conventions': 1.28.0 transitivePeerDependencies: - supports-color - '@opentelemetry/instrumentation-mongoose@0.39.0(@opentelemetry/api@1.9.0)': + '@opentelemetry/instrumentation-mongoose@0.42.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/core': 1.25.1(@opentelemetry/api@1.9.0) - '@opentelemetry/instrumentation': 0.52.1(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.25.1 + '@opentelemetry/instrumentation': 0.53.0(@opentelemetry/api@1.9.0) + '@opentelemetry/semantic-conventions': 1.28.0 transitivePeerDependencies: - supports-color - '@opentelemetry/instrumentation-mysql2@0.39.0(@opentelemetry/api@1.9.0)': + '@opentelemetry/instrumentation-mysql2@0.41.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 - '@opentelemetry/instrumentation': 0.52.1(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.25.1 + '@opentelemetry/instrumentation': 0.53.0(@opentelemetry/api@1.9.0) + '@opentelemetry/semantic-conventions': 1.28.0 '@opentelemetry/sql-common': 0.40.1(@opentelemetry/api@1.9.0) transitivePeerDependencies: - supports-color - '@opentelemetry/instrumentation-mysql@0.39.0(@opentelemetry/api@1.9.0)': + '@opentelemetry/instrumentation-mysql@0.41.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 - '@opentelemetry/instrumentation': 0.52.1(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.25.1 - '@types/mysql': 2.15.22 + '@opentelemetry/instrumentation': 0.53.0(@opentelemetry/api@1.9.0) + '@opentelemetry/semantic-conventions': 1.28.0 + '@types/mysql': 2.15.26 transitivePeerDependencies: - supports-color - '@opentelemetry/instrumentation-nestjs-core@0.38.0(@opentelemetry/api@1.9.0)': + '@opentelemetry/instrumentation-nestjs-core@0.40.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 - '@opentelemetry/instrumentation': 0.52.1(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.25.1 + '@opentelemetry/instrumentation': 0.53.0(@opentelemetry/api@1.9.0) + '@opentelemetry/semantic-conventions': 1.28.0 transitivePeerDependencies: - supports-color - '@opentelemetry/instrumentation-pg@0.42.0(@opentelemetry/api@1.9.0)': + '@opentelemetry/instrumentation-pg@0.44.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 - '@opentelemetry/instrumentation': 0.52.1(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.25.1 + '@opentelemetry/instrumentation': 0.53.0(@opentelemetry/api@1.9.0) + '@opentelemetry/semantic-conventions': 1.28.0 '@opentelemetry/sql-common': 0.40.1(@opentelemetry/api@1.9.0) '@types/pg': 8.6.1 - '@types/pg-pool': 2.0.4 + '@types/pg-pool': 2.0.6 transitivePeerDependencies: - supports-color - '@opentelemetry/instrumentation-redis-4@0.40.0(@opentelemetry/api@1.9.0)': + '@opentelemetry/instrumentation-redis-4@0.42.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 - '@opentelemetry/instrumentation': 0.52.1(@opentelemetry/api@1.9.0) + '@opentelemetry/instrumentation': 0.53.0(@opentelemetry/api@1.9.0) '@opentelemetry/redis-common': 0.36.2 - '@opentelemetry/semantic-conventions': 1.25.1 + '@opentelemetry/semantic-conventions': 1.28.0 + transitivePeerDependencies: + - supports-color + + '@opentelemetry/instrumentation-undici@0.6.0(@opentelemetry/api@1.9.0)': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/core': 1.25.1(@opentelemetry/api@1.9.0) + '@opentelemetry/instrumentation': 0.53.0(@opentelemetry/api@1.9.0) transitivePeerDependencies: - supports-color - '@opentelemetry/instrumentation@0.43.0(@opentelemetry/api@1.9.0)': + '@opentelemetry/instrumentation@0.52.1(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 + '@opentelemetry/api-logs': 0.52.1 '@types/shimmer': 1.0.5 - import-in-the-middle: 1.4.2 + import-in-the-middle: 1.11.3 require-in-the-middle: 7.3.0 semver: 7.6.3 shimmer: 1.2.1 transitivePeerDependencies: - supports-color - optional: true - '@opentelemetry/instrumentation@0.52.1(@opentelemetry/api@1.9.0)': + '@opentelemetry/instrumentation@0.53.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 - '@opentelemetry/api-logs': 0.52.1 - '@types/shimmer': 1.0.5 + '@opentelemetry/api-logs': 0.53.0 + '@types/shimmer': 1.2.0 import-in-the-middle: 1.8.1 require-in-the-middle: 7.3.0 - semver: 7.5.4 + semver: 7.6.3 shimmer: 1.2.1 transitivePeerDependencies: - supports-color @@ -11891,6 +11962,12 @@ snapshots: '@opentelemetry/core': 1.25.1(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': 1.25.1 + '@opentelemetry/resources@1.29.0(@opentelemetry/api@1.9.0)': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/core': 1.29.0(@opentelemetry/api@1.9.0) + '@opentelemetry/semantic-conventions': 1.28.0 + '@opentelemetry/sdk-metrics@1.25.1(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 @@ -11898,15 +11975,19 @@ snapshots: '@opentelemetry/resources': 1.25.1(@opentelemetry/api@1.9.0) lodash.merge: 4.6.2 - '@opentelemetry/sdk-trace-base@1.25.1(@opentelemetry/api@1.9.0)': + '@opentelemetry/sdk-trace-base@1.29.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 - '@opentelemetry/core': 1.25.1(@opentelemetry/api@1.9.0) - '@opentelemetry/resources': 1.25.1(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.25.1 + '@opentelemetry/core': 1.29.0(@opentelemetry/api@1.9.0) + '@opentelemetry/resources': 1.29.0(@opentelemetry/api@1.9.0) + '@opentelemetry/semantic-conventions': 1.28.0 '@opentelemetry/semantic-conventions@1.25.1': {} + '@opentelemetry/semantic-conventions@1.27.0': {} + + '@opentelemetry/semantic-conventions@1.28.0': {} + '@opentelemetry/sql-common@0.40.1(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 @@ -12007,11 +12088,11 @@ snapshots: '@pnpm/network.ca-file': 1.0.2 config-chain: 1.1.13 - '@prisma/instrumentation@5.16.0': + '@prisma/instrumentation@5.19.1': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/instrumentation': 0.52.1(@opentelemetry/api@1.9.0) - '@opentelemetry/sdk-trace-base': 1.25.1(@opentelemetry/api@1.9.0) + '@opentelemetry/sdk-trace-base': 1.29.0(@opentelemetry/api@1.9.0) transitivePeerDependencies: - supports-color @@ -12499,24 +12580,24 @@ snapshots: '@repeaterjs/repeater@3.0.5': {} - '@rollup/plugin-commonjs@26.0.1(rollup@3.29.4)': + '@rollup/plugin-commonjs@26.0.1(rollup@3.29.5)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@3.29.4) + '@rollup/pluginutils': 5.1.0(rollup@3.29.5) commondir: 1.0.1 estree-walker: 2.0.2 glob: 10.4.2 is-reference: 1.2.1 - magic-string: 0.30.8 + magic-string: 0.30.10 optionalDependencies: - rollup: 3.29.4 + rollup: 3.29.5 - '@rollup/pluginutils@5.1.0(rollup@3.29.4)': + '@rollup/pluginutils@5.1.0(rollup@3.29.5)': dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 estree-walker: 2.0.2 picomatch: 2.3.1 optionalDependencies: - rollup: 3.29.4 + rollup: 3.29.5 '@rollup/rollup-android-arm-eabi@4.18.1': optional: true @@ -12653,49 +12734,49 @@ snapshots: transitivePeerDependencies: - supports-color - '@sentry-internal/browser-utils@8.13.0': + '@sentry-internal/browser-utils@8.34.0': dependencies: - '@sentry/core': 8.13.0 - '@sentry/types': 8.13.0 - '@sentry/utils': 8.13.0 + '@sentry/core': 8.34.0 + '@sentry/types': 8.34.0 + '@sentry/utils': 8.34.0 - '@sentry-internal/feedback@8.13.0': + '@sentry-internal/feedback@8.34.0': dependencies: - '@sentry/core': 8.13.0 - '@sentry/types': 8.13.0 - '@sentry/utils': 8.13.0 + '@sentry/core': 8.34.0 + '@sentry/types': 8.34.0 + '@sentry/utils': 8.34.0 - '@sentry-internal/replay-canvas@8.13.0': + '@sentry-internal/replay-canvas@8.34.0': dependencies: - '@sentry-internal/replay': 8.13.0 - '@sentry/core': 8.13.0 - '@sentry/types': 8.13.0 - '@sentry/utils': 8.13.0 + '@sentry-internal/replay': 8.34.0 + '@sentry/core': 8.34.0 + '@sentry/types': 8.34.0 + '@sentry/utils': 8.34.0 - '@sentry-internal/replay@8.13.0': + '@sentry-internal/replay@8.34.0': dependencies: - '@sentry-internal/browser-utils': 8.13.0 - '@sentry/core': 8.13.0 - '@sentry/types': 8.13.0 - '@sentry/utils': 8.13.0 + '@sentry-internal/browser-utils': 8.34.0 + '@sentry/core': 8.34.0 + '@sentry/types': 8.34.0 + '@sentry/utils': 8.34.0 - '@sentry/babel-plugin-component-annotate@2.20.1': {} + '@sentry/babel-plugin-component-annotate@2.22.3': {} - '@sentry/browser@8.13.0': + '@sentry/browser@8.34.0': dependencies: - '@sentry-internal/browser-utils': 8.13.0 - '@sentry-internal/feedback': 8.13.0 - '@sentry-internal/replay': 8.13.0 - '@sentry-internal/replay-canvas': 8.13.0 - '@sentry/core': 8.13.0 - '@sentry/types': 8.13.0 - '@sentry/utils': 8.13.0 + '@sentry-internal/browser-utils': 8.34.0 + '@sentry-internal/feedback': 8.34.0 + '@sentry-internal/replay': 8.34.0 + '@sentry-internal/replay-canvas': 8.34.0 + '@sentry/core': 8.34.0 + '@sentry/types': 8.34.0 + '@sentry/utils': 8.34.0 - '@sentry/bundler-plugin-core@2.20.1': + '@sentry/bundler-plugin-core@2.22.3': dependencies: '@babel/core': 7.24.7 - '@sentry/babel-plugin-component-annotate': 2.20.1 - '@sentry/cli': 2.32.1 + '@sentry/babel-plugin-component-annotate': 2.22.3 + '@sentry/cli': 2.39.1 dotenv: 16.3.1 find-up: 5.0.0 glob: 9.3.5 @@ -12705,28 +12786,28 @@ snapshots: - encoding - supports-color - '@sentry/cli-darwin@2.32.1': + '@sentry/cli-darwin@2.39.1': optional: true - '@sentry/cli-linux-arm64@2.32.1': + '@sentry/cli-linux-arm64@2.39.1': optional: true - '@sentry/cli-linux-arm@2.32.1': + '@sentry/cli-linux-arm@2.39.1': optional: true - '@sentry/cli-linux-i686@2.32.1': + '@sentry/cli-linux-i686@2.39.1': optional: true - '@sentry/cli-linux-x64@2.32.1': + '@sentry/cli-linux-x64@2.39.1': optional: true - '@sentry/cli-win32-i686@2.32.1': + '@sentry/cli-win32-i686@2.39.1': optional: true - '@sentry/cli-win32-x64@2.32.1': + '@sentry/cli-win32-x64@2.39.1': optional: true - '@sentry/cli@2.32.1': + '@sentry/cli@2.39.1': dependencies: https-proxy-agent: 5.0.1 node-fetch: 2.7.0 @@ -12734,13 +12815,13 @@ snapshots: proxy-from-env: 1.1.0 which: 2.0.2 optionalDependencies: - '@sentry/cli-darwin': 2.32.1 - '@sentry/cli-linux-arm': 2.32.1 - '@sentry/cli-linux-arm64': 2.32.1 - '@sentry/cli-linux-i686': 2.32.1 - '@sentry/cli-linux-x64': 2.32.1 - '@sentry/cli-win32-i686': 2.32.1 - '@sentry/cli-win32-x64': 2.32.1 + '@sentry/cli-darwin': 2.39.1 + '@sentry/cli-linux-arm': 2.39.1 + '@sentry/cli-linux-arm64': 2.39.1 + '@sentry/cli-linux-i686': 2.39.1 + '@sentry/cli-linux-x64': 2.39.1 + '@sentry/cli-win32-i686': 2.39.1 + '@sentry/cli-win32-x64': 2.39.1 transitivePeerDependencies: - encoding - supports-color @@ -12750,10 +12831,10 @@ snapshots: '@sentry/types': 7.114.0 '@sentry/utils': 7.114.0 - '@sentry/core@8.13.0': + '@sentry/core@8.34.0': dependencies: - '@sentry/types': 8.13.0 - '@sentry/utils': 8.13.0 + '@sentry/types': 8.34.0 + '@sentry/utils': 8.34.0 '@sentry/integrations@7.114.0': dependencies: @@ -12762,22 +12843,24 @@ snapshots: '@sentry/utils': 7.114.0 localforage: 1.10.0 - '@sentry/nextjs@8.13.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.52.1(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.25.1)(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0)(webpack@5.90.3)': - dependencies: - '@opentelemetry/instrumentation-http': 0.52.1(@opentelemetry/api@1.9.0) - '@rollup/plugin-commonjs': 26.0.1(rollup@3.29.4) - '@sentry/core': 8.13.0 - '@sentry/node': 8.13.0 - '@sentry/opentelemetry': 8.13.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.52.1(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.25.1) - '@sentry/react': 8.13.0(react@19.0.0) - '@sentry/types': 8.13.0 - '@sentry/utils': 8.13.0 - '@sentry/vercel-edge': 8.13.0 - '@sentry/webpack-plugin': 2.20.1(webpack@5.90.3) + '@sentry/nextjs@8.34.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.53.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.29.0(@opentelemetry/api@1.9.0))(next@15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0)(webpack@5.90.3)': + dependencies: + '@opentelemetry/instrumentation-http': 0.53.0(@opentelemetry/api@1.9.0) + '@opentelemetry/semantic-conventions': 1.28.0 + '@rollup/plugin-commonjs': 26.0.1(rollup@3.29.5) + '@sentry-internal/browser-utils': 8.34.0 + '@sentry/core': 8.34.0 + '@sentry/node': 8.34.0 + '@sentry/opentelemetry': 8.34.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.53.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.29.0(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.28.0) + '@sentry/react': 8.34.0(react@19.0.0) + '@sentry/types': 8.34.0 + '@sentry/utils': 8.34.0 + '@sentry/vercel-edge': 8.34.0 + '@sentry/webpack-plugin': 2.22.3(webpack@5.90.3) chalk: 3.0.0 next: 15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) resolve: 1.22.8 - rollup: 3.29.4 + rollup: 3.29.5 stacktrace-parser: 0.1.10 optionalDependencies: webpack: 5.90.3 @@ -12786,62 +12869,67 @@ snapshots: - '@opentelemetry/core' - '@opentelemetry/instrumentation' - '@opentelemetry/sdk-trace-base' - - '@opentelemetry/semantic-conventions' - encoding - react - supports-color - '@sentry/node@8.13.0': + '@sentry/node@8.34.0': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/context-async-hooks': 1.25.1(@opentelemetry/api@1.9.0) '@opentelemetry/core': 1.25.1(@opentelemetry/api@1.9.0) - '@opentelemetry/instrumentation': 0.52.1(@opentelemetry/api@1.9.0) - '@opentelemetry/instrumentation-connect': 0.37.0(@opentelemetry/api@1.9.0) - '@opentelemetry/instrumentation-express': 0.40.1(@opentelemetry/api@1.9.0) - '@opentelemetry/instrumentation-fastify': 0.37.0(@opentelemetry/api@1.9.0) - '@opentelemetry/instrumentation-graphql': 0.41.0(@opentelemetry/api@1.9.0) - '@opentelemetry/instrumentation-hapi': 0.39.0(@opentelemetry/api@1.9.0) - '@opentelemetry/instrumentation-http': 0.52.1(@opentelemetry/api@1.9.0) - '@opentelemetry/instrumentation-ioredis': 0.41.0(@opentelemetry/api@1.9.0) - '@opentelemetry/instrumentation-koa': 0.41.0(@opentelemetry/api@1.9.0) - '@opentelemetry/instrumentation-mongodb': 0.45.0(@opentelemetry/api@1.9.0) - '@opentelemetry/instrumentation-mongoose': 0.39.0(@opentelemetry/api@1.9.0) - '@opentelemetry/instrumentation-mysql': 0.39.0(@opentelemetry/api@1.9.0) - '@opentelemetry/instrumentation-mysql2': 0.39.0(@opentelemetry/api@1.9.0) - '@opentelemetry/instrumentation-nestjs-core': 0.38.0(@opentelemetry/api@1.9.0) - '@opentelemetry/instrumentation-pg': 0.42.0(@opentelemetry/api@1.9.0) - '@opentelemetry/instrumentation-redis-4': 0.40.0(@opentelemetry/api@1.9.0) - '@opentelemetry/resources': 1.25.1(@opentelemetry/api@1.9.0) - '@opentelemetry/sdk-trace-base': 1.25.1(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.25.1 - '@prisma/instrumentation': 5.16.0 - '@sentry/core': 8.13.0 - '@sentry/opentelemetry': 8.13.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.52.1(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.25.1) - '@sentry/types': 8.13.0 - '@sentry/utils': 8.13.0 - optionalDependencies: - opentelemetry-instrumentation-fetch-node: 1.2.0 + '@opentelemetry/instrumentation': 0.53.0(@opentelemetry/api@1.9.0) + '@opentelemetry/instrumentation-amqplib': 0.42.0(@opentelemetry/api@1.9.0) + '@opentelemetry/instrumentation-connect': 0.39.0(@opentelemetry/api@1.9.0) + '@opentelemetry/instrumentation-dataloader': 0.12.0(@opentelemetry/api@1.9.0) + '@opentelemetry/instrumentation-express': 0.42.0(@opentelemetry/api@1.9.0) + '@opentelemetry/instrumentation-fastify': 0.39.0(@opentelemetry/api@1.9.0) + '@opentelemetry/instrumentation-fs': 0.15.0(@opentelemetry/api@1.9.0) + '@opentelemetry/instrumentation-generic-pool': 0.39.0(@opentelemetry/api@1.9.0) + '@opentelemetry/instrumentation-graphql': 0.43.0(@opentelemetry/api@1.9.0) + '@opentelemetry/instrumentation-hapi': 0.41.0(@opentelemetry/api@1.9.0) + '@opentelemetry/instrumentation-http': 0.53.0(@opentelemetry/api@1.9.0) + '@opentelemetry/instrumentation-ioredis': 0.43.0(@opentelemetry/api@1.9.0) + '@opentelemetry/instrumentation-kafkajs': 0.3.0(@opentelemetry/api@1.9.0) + '@opentelemetry/instrumentation-koa': 0.43.0(@opentelemetry/api@1.9.0) + '@opentelemetry/instrumentation-lru-memoizer': 0.40.0(@opentelemetry/api@1.9.0) + '@opentelemetry/instrumentation-mongodb': 0.47.0(@opentelemetry/api@1.9.0) + '@opentelemetry/instrumentation-mongoose': 0.42.0(@opentelemetry/api@1.9.0) + '@opentelemetry/instrumentation-mysql': 0.41.0(@opentelemetry/api@1.9.0) + '@opentelemetry/instrumentation-mysql2': 0.41.0(@opentelemetry/api@1.9.0) + '@opentelemetry/instrumentation-nestjs-core': 0.40.0(@opentelemetry/api@1.9.0) + '@opentelemetry/instrumentation-pg': 0.44.0(@opentelemetry/api@1.9.0) + '@opentelemetry/instrumentation-redis-4': 0.42.0(@opentelemetry/api@1.9.0) + '@opentelemetry/instrumentation-undici': 0.6.0(@opentelemetry/api@1.9.0) + '@opentelemetry/resources': 1.29.0(@opentelemetry/api@1.9.0) + '@opentelemetry/sdk-trace-base': 1.29.0(@opentelemetry/api@1.9.0) + '@opentelemetry/semantic-conventions': 1.28.0 + '@prisma/instrumentation': 5.19.1 + '@sentry/core': 8.34.0 + '@sentry/opentelemetry': 8.34.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.53.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.29.0(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.28.0) + '@sentry/types': 8.34.0 + '@sentry/utils': 8.34.0 + import-in-the-middle: 1.11.3 transitivePeerDependencies: - supports-color - '@sentry/opentelemetry@8.13.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.52.1(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.25.1)': + '@sentry/opentelemetry@8.34.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.53.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.29.0(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.28.0)': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/core': 1.25.1(@opentelemetry/api@1.9.0) - '@opentelemetry/instrumentation': 0.52.1(@opentelemetry/api@1.9.0) - '@opentelemetry/sdk-trace-base': 1.25.1(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.25.1 - '@sentry/core': 8.13.0 - '@sentry/types': 8.13.0 - '@sentry/utils': 8.13.0 - - '@sentry/react@8.13.0(react@19.0.0)': - dependencies: - '@sentry/browser': 8.13.0 - '@sentry/core': 8.13.0 - '@sentry/types': 8.13.0 - '@sentry/utils': 8.13.0 + '@opentelemetry/instrumentation': 0.53.0(@opentelemetry/api@1.9.0) + '@opentelemetry/sdk-trace-base': 1.29.0(@opentelemetry/api@1.9.0) + '@opentelemetry/semantic-conventions': 1.28.0 + '@sentry/core': 8.34.0 + '@sentry/types': 8.34.0 + '@sentry/utils': 8.34.0 + + '@sentry/react@8.34.0(react@19.0.0)': + dependencies: + '@sentry/browser': 8.34.0 + '@sentry/core': 8.34.0 + '@sentry/types': 8.34.0 + '@sentry/utils': 8.34.0 hoist-non-react-statics: 3.3.2 react: 19.0.0 @@ -12849,23 +12937,25 @@ snapshots: '@sentry/types@8.13.0': {} + '@sentry/types@8.34.0': {} + '@sentry/utils@7.114.0': dependencies: '@sentry/types': 7.114.0 - '@sentry/utils@8.13.0': + '@sentry/utils@8.34.0': dependencies: - '@sentry/types': 8.13.0 + '@sentry/types': 8.34.0 - '@sentry/vercel-edge@8.13.0': + '@sentry/vercel-edge@8.34.0': dependencies: - '@sentry/core': 8.13.0 - '@sentry/types': 8.13.0 - '@sentry/utils': 8.13.0 + '@sentry/core': 8.34.0 + '@sentry/types': 8.34.0 + '@sentry/utils': 8.34.0 - '@sentry/webpack-plugin@2.20.1(webpack@5.90.3)': + '@sentry/webpack-plugin@2.22.3(webpack@5.90.3)': dependencies: - '@sentry/bundler-plugin-core': 2.20.1 + '@sentry/bundler-plugin-core': 2.22.3 unplugin: 1.0.1 uuid: 9.0.1 webpack: 5.90.3 @@ -13102,29 +13192,14 @@ snapshots: '@trysound/sax@0.2.0': {} - '@types/accepts@1.3.7': - dependencies: - '@types/node': 20.14.12 - '@types/acorn@4.0.6': dependencies: '@types/estree': 1.0.6 - '@types/body-parser@1.19.5': - dependencies: - '@types/connect': 3.4.38 - '@types/node': 20.14.12 - '@types/connect@3.4.36': dependencies: '@types/node': 20.14.12 - '@types/connect@3.4.38': - dependencies: - '@types/node': 20.14.12 - - '@types/content-disposition@0.5.8': {} - '@types/conventional-commits-parser@5.0.0': dependencies: '@types/node': 20.14.12 @@ -13132,13 +13207,6 @@ snapshots: '@types/cookie@0.6.0': {} - '@types/cookies@0.9.0': - dependencies: - '@types/connect': 3.4.38 - '@types/express': 4.17.21 - '@types/keygrip': 1.0.6 - '@types/node': 20.14.12 - '@types/d3-array@3.2.1': {} '@types/d3-axis@3.0.6': @@ -13278,30 +13346,12 @@ snapshots: '@types/estree@1.0.6': {} - '@types/express-serve-static-core@4.17.41': - dependencies: - '@types/node': 20.14.12 - '@types/qs': 6.9.10 - '@types/range-parser': 1.2.7 - '@types/send': 0.17.4 - - '@types/express@4.17.21': - dependencies: - '@types/body-parser': 1.19.5 - '@types/express-serve-static-core': 4.17.41 - '@types/qs': 6.9.10 - '@types/serve-static': 1.15.5 - '@types/geojson@7946.0.15': {} '@types/hast@3.0.4': dependencies: '@types/unist': 3.0.2 - '@types/http-assert@1.5.5': {} - - '@types/http-errors@2.0.4': {} - '@types/js-cookie@3.0.6': {} '@types/js-yaml@4.0.9': {} @@ -13314,27 +13364,6 @@ snapshots: '@types/katex@0.16.7': {} - '@types/keygrip@1.0.6': {} - - '@types/koa-compose@3.2.8': - dependencies: - '@types/koa': 2.14.0 - - '@types/koa@2.14.0': - dependencies: - '@types/accepts': 1.3.7 - '@types/content-disposition': 0.5.8 - '@types/cookies': 0.9.0 - '@types/http-assert': 1.5.5 - '@types/http-errors': 2.0.4 - '@types/keygrip': 1.0.6 - '@types/koa-compose': 3.2.8 - '@types/node': 20.14.12 - - '@types/koa__router@12.0.3': - dependencies: - '@types/koa': 2.14.0 - '@types/lodash-es@4.17.12': dependencies: '@types/lodash': 4.17.7 @@ -13347,13 +13376,9 @@ snapshots: '@types/mdx@2.0.10': {} - '@types/mime@1.3.5': {} - - '@types/mime@3.0.4': {} - '@types/ms@0.7.34': {} - '@types/mysql@2.15.22': + '@types/mysql@2.15.26': dependencies: '@types/node': 20.14.12 @@ -13371,7 +13396,7 @@ snapshots: '@types/normalize-package-data@2.4.4': {} - '@types/pg-pool@2.0.4': + '@types/pg-pool@2.0.6': dependencies: '@types/pg': 8.6.1 @@ -13381,10 +13406,6 @@ snapshots: pg-protocol: 1.6.1 pg-types: 2.2.0 - '@types/qs@6.9.10': {} - - '@types/range-parser@1.2.7': {} - '@types/react-dom@19.0.0': dependencies: '@types/react': 19.0.0 @@ -13395,19 +13416,10 @@ snapshots: '@types/semver@7.5.6': {} - '@types/send@0.17.4': - dependencies: - '@types/mime': 1.3.5 - '@types/node': 20.14.12 - - '@types/serve-static@1.15.5': - dependencies: - '@types/http-errors': 2.0.4 - '@types/mime': 3.0.4 - '@types/node': 20.14.12 - '@types/shimmer@1.0.5': {} + '@types/shimmer@1.2.0': {} + '@types/stripe@8.0.417': dependencies: stripe: 15.10.0 @@ -13571,13 +13583,13 @@ snapshots: '@ungap/structured-clone@1.2.0': {} - '@vercel/otel@1.9.1(@opentelemetry/api@1.9.0)(@opentelemetry/instrumentation@0.52.1(@opentelemetry/api@1.9.0))(@opentelemetry/resources@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-metrics@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.25.1(@opentelemetry/api@1.9.0))': + '@vercel/otel@1.9.1(@opentelemetry/api@1.9.0)(@opentelemetry/instrumentation@0.53.0(@opentelemetry/api@1.9.0))(@opentelemetry/resources@1.29.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-metrics@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.29.0(@opentelemetry/api@1.9.0))': dependencies: '@opentelemetry/api': 1.9.0 - '@opentelemetry/instrumentation': 0.52.1(@opentelemetry/api@1.9.0) - '@opentelemetry/resources': 1.25.1(@opentelemetry/api@1.9.0) + '@opentelemetry/instrumentation': 0.53.0(@opentelemetry/api@1.9.0) + '@opentelemetry/resources': 1.29.0(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-metrics': 1.25.1(@opentelemetry/api@1.9.0) - '@opentelemetry/sdk-trace-base': 1.25.1(@opentelemetry/api@1.9.0) + '@opentelemetry/sdk-trace-base': 1.29.0(@opentelemetry/api@1.9.0) '@vitest/expect@2.0.5': dependencies: @@ -13729,18 +13741,13 @@ snapshots: dependencies: event-target-shim: 5.0.1 - acorn-import-assertions@1.9.0(acorn@8.12.1): - dependencies: - acorn: 8.12.1 - optional: true - acorn-import-assertions@1.9.0(acorn@8.14.0): dependencies: acorn: 8.14.0 - acorn-import-attributes@1.9.5(acorn@8.12.1): + acorn-import-attributes@1.9.5(acorn@8.14.0): dependencies: - acorn: 8.12.1 + acorn: 8.14.0 acorn-jsx@5.3.2(acorn@7.4.1): dependencies: @@ -13756,8 +13763,6 @@ snapshots: acorn@7.4.1: {} - acorn@8.11.2: {} - acorn@8.12.1: {} acorn@8.14.0: {} @@ -16054,7 +16059,7 @@ snapshots: fs.realpath: 1.0.0 minimatch: 8.0.4 minipass: 4.2.8 - path-scurry: 1.10.1 + path-scurry: 1.11.1 global-directory@4.0.1: dependencies: @@ -16449,18 +16454,17 @@ snapshots: import-from@4.0.0: {} - import-in-the-middle@1.4.2: + import-in-the-middle@1.11.3: dependencies: - acorn: 8.12.1 - acorn-import-assertions: 1.9.0(acorn@8.12.1) + acorn: 8.14.0 + acorn-import-attributes: 1.9.5(acorn@8.14.0) cjs-module-lexer: 1.3.1 module-details-from-path: 1.0.3 - optional: true import-in-the-middle@1.8.1: dependencies: - acorn: 8.12.1 - acorn-import-attributes: 1.9.5(acorn@8.12.1) + acorn: 8.14.0 + acorn-import-attributes: 1.9.5(acorn@8.14.0) cjs-module-lexer: 1.3.1 module-details-from-path: 1.0.3 @@ -16689,7 +16693,7 @@ snapshots: is-reference@1.2.1: dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 is-regex@1.1.4: dependencies: @@ -17734,8 +17738,6 @@ snapshots: minipass@4.2.8: {} - minipass@7.0.4: {} - minipass@7.1.2: {} mitt@3.0.1: {} @@ -17775,13 +17777,13 @@ snapshots: nerf-dart@1.0.0: {} - next-auth@5.0.0-beta.17(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0): + next-auth@5.0.0-beta.17(next@15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0): dependencies: '@auth/core': 0.30.0 next: 15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) react: 19.0.0 - next-intl@3.23.5(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0): + next-intl@3.23.5(next@15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0): dependencies: '@formatjs/intl-localematcher': 0.5.4 negotiator: 1.0.0 @@ -17847,12 +17849,12 @@ snapshots: - '@babel/core' - babel-plugin-macros - nextjs-routes@2.1.0(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)): + nextjs-routes@2.1.0(next@15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)): dependencies: chokidar: 3.5.3 next: 15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) - nextra-theme-docs@3.2.4(next@15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(nextra@3.2.4(@types/react@19.0.0)(acorn@8.14.0)(next@15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@4.9.5))(react-dom@19.0.0(react@19.0.0))(react@19.0.0): + nextra-theme-docs@3.2.4(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(nextra@3.2.4(@types/react@19.0.0)(acorn@8.14.0)(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@4.9.5))(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: '@headlessui/react': 2.2.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) clsx: 2.0.0 @@ -17860,13 +17862,13 @@ snapshots: flexsearch: 0.7.43 next: 15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) next-themes: 0.4.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) - nextra: 3.2.4(@types/react@19.0.0)(acorn@8.14.0)(next@15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@4.9.5) + nextra: 3.2.4(@types/react@19.0.0)(acorn@8.14.0)(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@4.9.5) react: 19.0.0 react-dom: 19.0.0(react@19.0.0) scroll-into-view-if-needed: 3.1.0 zod: 3.23.8 - nextra@3.2.4(@types/react@19.0.0)(acorn@8.14.0)(next@15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@4.9.5): + nextra@3.2.4(@types/react@19.0.0)(acorn@8.14.0)(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@4.9.5): dependencies: '@formatjs/intl-localematcher': 0.5.9 '@headlessui/react': 2.2.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -17978,7 +17980,7 @@ snapshots: nullthrows@1.1.1: {} - nuqs@2.1.1(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0): + nuqs@2.1.1(next@15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0): dependencies: mitt: 3.0.1 react: 19.0.0 @@ -18090,15 +18092,6 @@ snapshots: regex: 5.0.2 regex-recursion: 4.3.0 - opentelemetry-instrumentation-fetch-node@1.2.0: - dependencies: - '@opentelemetry/api': 1.9.0 - '@opentelemetry/instrumentation': 0.43.0(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.25.1 - transitivePeerDependencies: - - supports-color - optional: true - optionator@0.9.3: dependencies: '@aashutoshrathi/word-wrap': 1.2.6 @@ -18286,11 +18279,6 @@ snapshots: dependencies: path-root-regex: 0.1.2 - path-scurry@1.10.1: - dependencies: - lru-cache: 10.3.0 - minipass: 7.0.4 - path-scurry@1.11.1: dependencies: lru-cache: 10.3.0 @@ -18958,7 +18946,7 @@ snapshots: robust-predicates@3.0.2: {} - rollup@3.29.4: + rollup@3.29.5: optionalDependencies: fsevents: 2.3.3 @@ -19994,7 +19982,7 @@ snapshots: unplugin@1.0.1: dependencies: - acorn: 8.11.2 + acorn: 8.14.0 chokidar: 3.5.3 webpack-sources: 3.2.3 webpack-virtual-modules: 0.5.0 From 2550aa162b72fb27b50ecb2950261ada37016362 Mon Sep 17 00:00:00 2001 From: soniaklimas Date: Tue, 17 Dec 2024 10:11:53 +0100 Subject: [PATCH 3/7] Fix types of image src, add locale to redirect --- .../src/app/[locale]/(main)/search/actions.ts | 10 +++++++--- apps/storefront/src/components/search-product-card.tsx | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/storefront/src/app/[locale]/(main)/search/actions.ts b/apps/storefront/src/app/[locale]/(main)/search/actions.ts index 281ef04..cde8317 100644 --- a/apps/storefront/src/app/[locale]/(main)/search/actions.ts +++ b/apps/storefront/src/app/[locale]/(main)/search/actions.ts @@ -3,6 +3,7 @@ import { DEFAULT_SORT_BY } from "@/config"; import { redirect } from "@/i18n/routing"; import { paths } from "@/lib/paths"; +import { getCurrentRegion } from "@/regions/server"; const passThroughParams = ["sortBy", "limit", "q"] as const; @@ -13,6 +14,8 @@ export const handleFiltersFormSubmit = async ( const formClear = formData.has("clear"); const params = new URLSearchParams(); + const region = await getCurrentRegion(); + formData.forEach((value, key) => { if (key.startsWith("group")) { const [k, v] = key.replace("group", "").split("-"); @@ -45,9 +48,10 @@ export const handleFiltersFormSubmit = async ( } }); - return redirect( - paths.search.asPath({ + return redirect({ + href: paths.search.asPath({ query: Object.fromEntries(params), }), - ); + locale: region.language.locale, + }); }; diff --git a/apps/storefront/src/components/search-product-card.tsx b/apps/storefront/src/components/search-product-card.tsx index e94de6e..9078894 100644 --- a/apps/storefront/src/components/search-product-card.tsx +++ b/apps/storefront/src/components/search-product-card.tsx @@ -6,7 +6,7 @@ import type { PropsWithChildren } from "react"; import type { SearchProduct } from "@nimara/domain/objects/SearchProduct"; -import productPlaceholder from "@/assets/product_placeholder.svg"; +import productPlaceholder from "@/assets/product_placeholder.svg?url"; import { Link } from "@/i18n/routing"; import { useLocalizedFormatter } from "@/lib/formatters/use-localized-formatter"; import { paths } from "@/lib/paths"; From 8b25d817409e2a1ad160c9916fdfd95e246acc7d Mon Sep 17 00:00:00 2001 From: soniaklimas Date: Wed, 18 Dec 2024 15:35:52 +0100 Subject: [PATCH 4/7] Implement review --- .../[slug]/components/attributes-dropdown.tsx | 16 +++---- .../[slug]/components/details-dropdown.tsx | 0 .../[slug]/components/product-display.tsx | 26 ----------- .../components/variant-selector-utils.ts | 22 --------- packages/domain/src/objects/Product.ts | 2 +- packages/ui/src/components/alert.tsx | 46 ++++++++----------- 6 files changed, 26 insertions(+), 86 deletions(-) delete mode 100644 apps/storefront/src/app/[locale]/(main)/products/[slug]/components/details-dropdown.tsx diff --git a/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/attributes-dropdown.tsx b/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/attributes-dropdown.tsx index 4a5b1e7..4838c30 100644 --- a/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/attributes-dropdown.tsx +++ b/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/attributes-dropdown.tsx @@ -34,15 +34,13 @@ export const AttributesDropdown = ({ {attribute.name} - {attribute.values.map((val) => { - if (val.richText) { - return ( - - ); - } - - return

{val.name}

; - })} + {attribute.values.map((val) => + val.richText ? ( + + ) : ( +

{val.name}

+ ), + )}
); diff --git a/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/details-dropdown.tsx b/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/details-dropdown.tsx deleted file mode 100644 index e69de29..0000000 diff --git a/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/product-display.tsx b/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/product-display.tsx index c73b01b..01f01fe 100644 --- a/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/product-display.tsx +++ b/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/product-display.tsx @@ -47,38 +47,12 @@ export const ProductDisplay = ({ const { images, name, description } = product; - // const imagesToDisplay = chosenVariant - // ? chosenVariant.images - // : looselyMatchingVariants.length > 0 - // ? looselyMatchingVariants - // .map(({ images }) => images) - // .flat() - // .filter( - // (image, index, self) => - // index === self.findIndex((i) => i.url === image.url), - // ) - // : images; - - // const imagesToDisplay = chosenVariant?.images?.length - // ? chosenVariant.images - // : looselyMatchingVariants.length > 0 - // ? looselyMatchingVariants - // .flatMap(({ images }) => images) - // .filter( - // (image, index, self) => - // index === self.findIndex((i) => i.url === image.url), - // ) - // : product.images; - const imagesToDisplay = getImagesToDisplay({ chosenVariant, looselyMatchingVariants, productImages: images, }); - console.log("imagesToDisplay", imagesToDisplay); - console.log("images", images); - const hasFreeShipping = !!product.attributes .find(({ slug }) => slug === "free-shipping") ?.values.find(({ boolean }) => boolean); diff --git a/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/variant-selector-utils.ts b/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/variant-selector-utils.ts index 233c4b5..7d0489a 100644 --- a/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/variant-selector-utils.ts +++ b/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/variant-selector-utils.ts @@ -158,28 +158,6 @@ export const getAllSelectionAttributes = (variants: ProductVariant[]) => { return allSelectionAttributes; }; -// ! currently unsued -export const isAttributeCombinationPossible = ( - allVariants: ProductVariant[], - chosenAttributes: ChosenAttribute[], -) => { - if (chosenAttributes.length < 1) { - return true; - } - - return allVariants.some((variant) => - chosenAttributes.every(({ slug, value }) => { - const variantAttribute = variant.selectionAttributes.find( - (attr) => attr.slug === slug, - ); - - return variantAttribute?.values.some( - (attrValue) => attrValue.slug === value, - ); - }), - ); -}; - export const validateValue = ( slug: string, value: unknown, diff --git a/packages/domain/src/objects/Product.ts b/packages/domain/src/objects/Product.ts index 49956d3..da6cde1 100644 --- a/packages/domain/src/objects/Product.ts +++ b/packages/domain/src/objects/Product.ts @@ -1,6 +1,6 @@ import type { Attribute } from "./Attribute"; import type { Image, TaxedPrice } from "./common"; -import { type SearchProduct } from "./SearchProduct"; +import type { SearchProduct } from "./SearchProduct"; export type ProductAvailability = { isAvailable: boolean; diff --git a/packages/ui/src/components/alert.tsx b/packages/ui/src/components/alert.tsx index d1330e8..324b603 100644 --- a/packages/ui/src/components/alert.tsx +++ b/packages/ui/src/components/alert.tsx @@ -19,44 +19,34 @@ const alertVariants = cva( }, ); -const Alert = React.forwardRef< - HTMLDivElement, - React.HTMLAttributes & VariantProps ->(({ className, variant, ...props }, ref) => ( +const Alert = ({ + className, + variant, + ...props +}: React.HTMLAttributes & + VariantProps) => (
-)); - -Alert.displayName = "Alert"; +); -const AlertTitle = React.forwardRef< - HTMLParagraphElement, - React.HTMLAttributes ->(({ className, ...props }, ref) => ( +const AlertTitle = ({ + className, + ...props +}: React.HTMLAttributes) => (
-)); - -AlertTitle.displayName = "AlertTitle"; - -const AlertDescription = React.forwardRef< - HTMLParagraphElement, - React.HTMLAttributes ->(({ className, ...props }, ref) => ( -
-)); +); -AlertDescription.displayName = "AlertDescription"; +const AlertDescription = ({ + className, + ...props +}: React.HTMLAttributes) => ( +
+); export { Alert, AlertTitle, AlertDescription }; From afc7848e1a346da74b61eb0bf5cbe7f1a56734c4 Mon Sep 17 00:00:00 2001 From: soniaklimas Date: Wed, 18 Dec 2024 15:43:19 +0100 Subject: [PATCH 5/7] Fix pnpm-lock.jaml --- pnpm-lock.yaml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b7612d4..4259ff1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -70,10 +70,10 @@ importers: version: 15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) nextra: specifier: 3.2.4 - version: 3.2.4(@types/react@19.0.0)(acorn@8.14.0)(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@4.9.5) + version: 3.2.4(@types/react@19.0.0)(acorn@8.14.0)(next@15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@4.9.5) nextra-theme-docs: specifier: 3.2.4 - version: 3.2.4(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(nextra@3.2.4(@types/react@19.0.0)(acorn@8.14.0)(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@4.9.5))(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + version: 3.2.4(next@15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(nextra@3.2.4(@types/react@19.0.0)(acorn@8.14.0)(next@15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@4.9.5))(react-dom@19.0.0(react@19.0.0))(react@19.0.0) react: specifier: ^19.0.0 version: 19.0.0 @@ -119,7 +119,7 @@ importers: version: 7.114.0 '@sentry/nextjs': specifier: ^8.34.0 - version: 8.34.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.53.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.29.0(@opentelemetry/api@1.9.0))(next@15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0)(webpack@5.90.3) + version: 8.34.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.53.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.29.0(@opentelemetry/api@1.9.0))(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0)(webpack@5.90.3) '@sentry/types': specifier: ^8.12.0 version: 8.13.0 @@ -161,16 +161,16 @@ importers: version: 15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) next-auth: specifier: 5.0.0-beta.17 - version: 5.0.0-beta.17(next@15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0) + version: 5.0.0-beta.17(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0) next-intl: specifier: 3.23.5 - version: 3.23.5(next@15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0) + version: 3.23.5(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0) nextjs-routes: specifier: 2.1.0 - version: 2.1.0(next@15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)) + version: 2.1.0(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)) nuqs: specifier: 2.1.1 - version: 2.1.1(next@15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0) + version: 2.1.1(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0) react: specifier: 19.0.0 version: 19.0.0 @@ -12130,7 +12130,7 @@ snapshots: estree-walker: 2.0.2 glob: 10.4.2 is-reference: 1.2.1 - magic-string: 0.30.10 + magic-string: 0.30.8 optionalDependencies: rollup: 3.29.5 @@ -12338,7 +12338,7 @@ snapshots: '@sentry/utils': 7.114.0 localforage: 1.10.0 - '@sentry/nextjs@8.34.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.53.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.29.0(@opentelemetry/api@1.9.0))(next@15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0)(webpack@5.90.3)': + '@sentry/nextjs@8.34.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.53.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.29.0(@opentelemetry/api@1.9.0))(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0)(webpack@5.90.3)': dependencies: '@opentelemetry/instrumentation-http': 0.53.0(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': 1.28.0 @@ -17185,13 +17185,13 @@ snapshots: nerf-dart@1.0.0: {} - next-auth@5.0.0-beta.17(next@15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0): + next-auth@5.0.0-beta.17(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0): dependencies: '@auth/core': 0.30.0 next: 15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) react: 19.0.0 - next-intl@3.23.5(next@15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0): + next-intl@3.23.5(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0): dependencies: '@formatjs/intl-localematcher': 0.5.4 negotiator: 1.0.0 @@ -17257,12 +17257,12 @@ snapshots: - '@babel/core' - babel-plugin-macros - nextjs-routes@2.1.0(next@15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)): + nextjs-routes@2.1.0(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)): dependencies: chokidar: 3.5.3 next: 15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) - nextra-theme-docs@3.2.4(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(nextra@3.2.4(@types/react@19.0.0)(acorn@8.14.0)(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@4.9.5))(react-dom@19.0.0(react@19.0.0))(react@19.0.0): + nextra-theme-docs@3.2.4(next@15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(nextra@3.2.4(@types/react@19.0.0)(acorn@8.14.0)(next@15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@4.9.5))(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: '@headlessui/react': 2.2.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) clsx: 2.0.0 @@ -17270,13 +17270,13 @@ snapshots: flexsearch: 0.7.43 next: 15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) next-themes: 0.4.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) - nextra: 3.2.4(@types/react@19.0.0)(acorn@8.14.0)(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@4.9.5) + nextra: 3.2.4(@types/react@19.0.0)(acorn@8.14.0)(next@15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@4.9.5) react: 19.0.0 react-dom: 19.0.0(react@19.0.0) scroll-into-view-if-needed: 3.1.0 zod: 3.23.8 - nextra@3.2.4(@types/react@19.0.0)(acorn@8.14.0)(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@4.9.5): + nextra@3.2.4(@types/react@19.0.0)(acorn@8.14.0)(next@15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@4.9.5): dependencies: '@formatjs/intl-localematcher': 0.5.9 '@headlessui/react': 2.2.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -17388,7 +17388,7 @@ snapshots: nullthrows@1.1.1: {} - nuqs@2.1.1(next@15.0.3(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0): + nuqs@2.1.1(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0): dependencies: mitt: 3.0.1 react: 19.0.0 From fb5ea9ca9febaf6a4b4c1a822cdb6b032c5858a4 Mon Sep 17 00:00:00 2001 From: soniaklimas Date: Wed, 18 Dec 2024 16:41:58 +0100 Subject: [PATCH 6/7] Add translations --- apps/storefront/messages/en-GB.json | 6 +++++- .../products/[slug]/components/product-display.tsx | 12 +++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/apps/storefront/messages/en-GB.json b/apps/storefront/messages/en-GB.json index 46040cf..60c1d9b 100644 --- a/apps/storefront/messages/en-GB.json +++ b/apps/storefront/messages/en-GB.json @@ -113,7 +113,11 @@ "variant-select-label": "Variant select label", "variant-select": "Variant select", "label-slug": "Label-{slug}", - "description": "Description" + "description": "Description", + "free-shipping": "Free shipping", + "standard-parcel": "Standard parcel", + "free-30-days": "Free 30 days return policy", + "you-may-also-like": "You may also like" }, "address": { "companyName": "Company name", diff --git a/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/product-display.tsx b/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/product-display.tsx index 01f01fe..2398a7e 100644 --- a/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/product-display.tsx +++ b/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/product-display.tsx @@ -2,6 +2,7 @@ import { Truck, Undo2 } from "lucide-react"; import Image from "next/image"; +import { useTranslations } from "next-intl"; import type { Cart } from "@nimara/domain/objects/Cart"; import type { @@ -39,6 +40,8 @@ export const ProductDisplay = ({ product: Product; user: (User & { accessToken: string | undefined }) | null; }) => { + const t = useTranslations("products"); + const { chosenVariant, looselyMatchingVariants } = useVariantSelection({ product, productAvailability: availability, @@ -140,16 +143,15 @@ export const ProductDisplay = ({ {hasFreeShipping && ( - Free shipping - - Standard parcel + {t("free-shipping")} + {t("standard-parcel")} )} {hasFreeReturn && ( - Free 30 days return policy + {t("free-30-days")} )} @@ -160,7 +162,7 @@ export const ProductDisplay = ({ {product.relatedProducts.length > 0 && (
-

You may also like

+

{t("you-may-also-like")}

{product.relatedProducts.map((product) => ( From 824d837a73bcce92f302810e9d0f50ffbd430d2d Mon Sep 17 00:00:00 2001 From: soniaklimas Date: Thu, 19 Dec 2024 14:39:05 +0100 Subject: [PATCH 7/7] Remove unused code --- apps/storefront/src/app/[locale]/(main)/search/actions.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/apps/storefront/src/app/[locale]/(main)/search/actions.ts b/apps/storefront/src/app/[locale]/(main)/search/actions.ts index 18ad844..c8c07ad 100644 --- a/apps/storefront/src/app/[locale]/(main)/search/actions.ts +++ b/apps/storefront/src/app/[locale]/(main)/search/actions.ts @@ -5,7 +5,6 @@ import { getLocale } from "next-intl/server"; import { DEFAULT_SORT_BY } from "@/config"; import { redirect } from "@/i18n/routing"; import { paths } from "@/lib/paths"; -import { getCurrentRegion } from "@/regions/server"; const passThroughParams = ["sortBy", "limit", "q"] as const; @@ -17,8 +16,6 @@ export const handleFiltersFormSubmit = async ( const params = new URLSearchParams(); const locale = await getLocale(); - const region = await getCurrentRegion(); - formData.forEach((value, key) => { if (key.startsWith("group")) { const [k, v] = key.replace("group", "").split("-");