From 57d2d3db8043a20747c3242f0d04d4b2e7d12dc2 Mon Sep 17 00:00:00 2001 From: Florian Date: Thu, 4 Jul 2024 08:19:40 +0200 Subject: [PATCH 01/20] feat: add back sentry --- next.config.js | 12 +++---- sentry.client.config.ts | 34 +++++++++++++++++++ sentry.edge.config.ts | 17 ++++++++++ sentry.server.config.ts | 19 +++++++++++ .../_components/EditableGroupTitle.tsx | 3 +- .../groupResults/OwnerAdminSection.tsx | 3 +- .../groupResults/ParticipantAdminSection.tsx | 3 +- .../(simulation)/amis/supprimer/page.tsx | 3 +- .../fin/_components/GetResultsByEmail.tsx | 7 ++-- .../creer-campagne/_components/PollForm.tsx | 3 +- .../creer/_components/CreationForm.tsx | 3 +- src/app/global-error.tsx | 3 +- src/components/northstar/Northstar.tsx | 3 +- .../organisations/ExportDataButton.tsx | 7 ++-- .../polls/handleMissingComputedResults.ts | 7 ++-- src/helpers/simulation/generateSimulation.ts | 3 +- src/hooks/groups/useFixComputedResults.ts | 7 ++-- src/hooks/navigation/useEndPage.ts | 3 +- .../helpers/safeEvaluateHelper.ts | 3 +- .../helpers/safeGetRuleHelper.ts | 3 +- .../simulationProvider/useCategories.ts | 25 +++++++------- .../providers/simulationProvider/useEngine.ts | 3 +- 22 files changed, 130 insertions(+), 44 deletions(-) create mode 100644 sentry.client.config.ts create mode 100644 sentry.edge.config.ts create mode 100644 sentry.server.config.ts diff --git a/next.config.js b/next.config.js index db8df385d..5307d3e00 100644 --- a/next.config.js +++ b/next.config.js @@ -7,7 +7,7 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({ enabled: process.env.ANALYZE === 'true', }) -// const { withSentryConfig } = require('@sentry/nextjs') +const { withSentryConfig } = require('@sentry/nextjs') const redirects = require('./config/redirects.js') @@ -90,9 +90,7 @@ const sentryConfig = [ }, ] -// module.exports = withSentryConfig( -// withBundleAnalyzer(withMDX(nextConfig)), -// ...sentryConfig -// ) - -module.exports = withBundleAnalyzer(withMDX(nextConfig)) +module.exports = withSentryConfig( + withBundleAnalyzer(withMDX(nextConfig)), + ...sentryConfig +) diff --git a/sentry.client.config.ts b/sentry.client.config.ts new file mode 100644 index 000000000..33cbcb5f6 --- /dev/null +++ b/sentry.client.config.ts @@ -0,0 +1,34 @@ +// This file configures the initialization of Sentry on the client. +// The config you add here will be used whenever a users loads a page in their browser. +// https://docs.sentry.io/platforms/javascript/guides/nextjs/ + +import * as Sentry from '@sentry/nextjs' + +Sentry.init({ + dsn: 'https://75dcf9dfe74c4439977a517be2805122@sentry.incubateur.net/118', + + enableTracing: false, + + // Setting this option to true will print useful information to the console while you're setting up Sentry. + debug: false, + + sampleRate: 0.1, + + replaysOnErrorSampleRate: 1.0, + + // This sets the sample rate to be 10%. You may want this to be 100% while + // in development and sample at a lower rate in production + replaysSessionSampleRate: 0.1, + + // You can remove this option if you're not planning to use the Sentry Session Replay feature: + integrations: [ + new Sentry.Replay({ + // Additional Replay configuration goes in here, for example: + maskAllText: true, + blockAllMedia: true, + }), + ], + + // Disable sentry for development based on local data + enabled: !process.env.NEXT_PUBLIC_LOCAL_DATA, +}) diff --git a/sentry.edge.config.ts b/sentry.edge.config.ts new file mode 100644 index 000000000..ed15a115a --- /dev/null +++ b/sentry.edge.config.ts @@ -0,0 +1,17 @@ +// This file configures the initialization of Sentry for edge features (middleware, edge routes, and so on). +// The config you add here will be used whenever one of the edge features is loaded. +// Note that this config is unrelated to the Vercel Edge Runtime and is also required when running locally. +// https://docs.sentry.io/platforms/javascript/guides/nextjs/ + +import * as Sentry from '@sentry/nextjs' + +Sentry.init({ + dsn: 'https://75dcf9dfe74c4439977a517be2805122@sentry.incubateur.net/118', + + enableTracing: false, + + // Setting this option to true will print useful information to the console while you're setting up Sentry. + debug: false, + + sampleRate: 0.1, +}) diff --git a/sentry.server.config.ts b/sentry.server.config.ts new file mode 100644 index 000000000..fcb636f9c --- /dev/null +++ b/sentry.server.config.ts @@ -0,0 +1,19 @@ +// This file configures the initialization of Sentry on the server. +// The config you add here will be used whenever the server handles a request. +// https://docs.sentry.io/platforms/javascript/guides/nextjs/ + +import * as Sentry from '@sentry/nextjs' + +Sentry.init({ + dsn: 'https://75dcf9dfe74c4439977a517be2805122@sentry.incubateur.net/118', + + enableTracing: false, + + // Setting this option to true will print useful information to the console while you're setting up Sentry. + debug: false, + + sampleRate: 0.1, + + // Disable sentry for development based on local data + enabled: !process.env.NEXT_PUBLIC_LOCAL_DATA, +}) diff --git a/src/app/(layout-with-navigation)/(simulation)/amis/resultats/_components/EditableGroupTitle.tsx b/src/app/(layout-with-navigation)/(simulation)/amis/resultats/_components/EditableGroupTitle.tsx index 898bcc272..4030eab11 100644 --- a/src/app/(layout-with-navigation)/(simulation)/amis/resultats/_components/EditableGroupTitle.tsx +++ b/src/app/(layout-with-navigation)/(simulation)/amis/resultats/_components/EditableGroupTitle.tsx @@ -15,6 +15,7 @@ import { useUpdateGroup } from '@/hooks/groups/useUpdateGroup' import { useClientTranslation } from '@/hooks/useClientTranslation' import { Group } from '@/types/groups' import { trackEvent } from '@/utils/matomo/trackEvent' +import { captureException } from '@sentry/react' import { useState } from 'react' export default function EditableGroupTitle({ group }: { group: Group }) { @@ -40,7 +41,7 @@ export default function EditableGroupTitle({ group }: { group: Group }) { setIsSubmitting(false) setIsEditingTitle(false) } catch (e) { - // captureException(e) + captureException(e) } } const vousWord = t('Vous') diff --git a/src/app/(layout-with-navigation)/(simulation)/amis/resultats/_components/groupResults/OwnerAdminSection.tsx b/src/app/(layout-with-navigation)/(simulation)/amis/resultats/_components/groupResults/OwnerAdminSection.tsx index 2be0c939e..892b9de84 100644 --- a/src/app/(layout-with-navigation)/(simulation)/amis/resultats/_components/groupResults/OwnerAdminSection.tsx +++ b/src/app/(layout-with-navigation)/(simulation)/amis/resultats/_components/groupResults/OwnerAdminSection.tsx @@ -13,6 +13,7 @@ import { useDeleteGroup } from '@/hooks/groups/useDeleteGroup' import { useUser } from '@/publicodes-state' import { Group } from '@/types/groups' import { trackEvent } from '@/utils/matomo/trackEvent' +import { captureException } from '@sentry/react' import { useRouter } from 'next/navigation' import { useEffect, useRef, useState } from 'react' @@ -51,7 +52,7 @@ export default function OwnerAdminSection({ group }: Props) { router.push(linkToClassement) }, 2000) } catch (error) { - // captureException(error) + captureException(error) } } diff --git a/src/app/(layout-with-navigation)/(simulation)/amis/resultats/_components/groupResults/ParticipantAdminSection.tsx b/src/app/(layout-with-navigation)/(simulation)/amis/resultats/_components/groupResults/ParticipantAdminSection.tsx index 0d54053b5..af52a41aa 100644 --- a/src/app/(layout-with-navigation)/(simulation)/amis/resultats/_components/groupResults/ParticipantAdminSection.tsx +++ b/src/app/(layout-with-navigation)/(simulation)/amis/resultats/_components/groupResults/ParticipantAdminSection.tsx @@ -8,6 +8,7 @@ import { linkToClassement } from '@/helpers/navigation/classementPages' import { useRemoveParticipant } from '@/hooks/groups/useRemoveParticipant' import { useUser } from '@/publicodes-state' import { Group } from '@/types/groups' +import { captureException } from '@sentry/react' import { useRouter } from 'next/navigation' import { useEffect, useRef, useState } from 'react' @@ -39,7 +40,7 @@ export default function ParticipantAdminSection({ group }: Props) { router.push(linkToClassement) }, 1750) } catch (error) { - // captureException(error) + captureException(error) } } diff --git a/src/app/(layout-with-navigation)/(simulation)/amis/supprimer/page.tsx b/src/app/(layout-with-navigation)/(simulation)/amis/supprimer/page.tsx index c39990b70..b95d0cae9 100644 --- a/src/app/(layout-with-navigation)/(simulation)/amis/supprimer/page.tsx +++ b/src/app/(layout-with-navigation)/(simulation)/amis/supprimer/page.tsx @@ -8,6 +8,7 @@ import { useDeleteGroup } from '@/hooks/groups/useDeleteGroup' import { useFetchGroup } from '@/hooks/groups/useFetchGroup' import { useClientTranslation } from '@/hooks/useClientTranslation' import { Participant } from '@/types/groups' +import { captureException } from '@sentry/react' import { useRouter } from 'next/navigation' export default function SupprimerGroupePage({ @@ -37,7 +38,7 @@ export default function SupprimerGroupePage({ // Refresh cache refetchGroup() } catch (error) { - // captureException(error) + captureException(error) } } diff --git a/src/app/(layout-with-navigation)/(simulation)/fin/_components/GetResultsByEmail.tsx b/src/app/(layout-with-navigation)/(simulation)/fin/_components/GetResultsByEmail.tsx index 426a1bf44..b3f1f76a2 100644 --- a/src/app/(layout-with-navigation)/(simulation)/fin/_components/GetResultsByEmail.tsx +++ b/src/app/(layout-with-navigation)/(simulation)/fin/_components/GetResultsByEmail.tsx @@ -20,6 +20,7 @@ import { useLocale } from '@/hooks/useLocale' import { useNumberSubscribers } from '@/hooks/useNumberSubscriber' import { useCurrentSimulation, useEngine, useUser } from '@/publicodes-state' import { trackEvent } from '@/utils/matomo/trackEvent' +import { captureException } from '@sentry/react' import { useEffect, useRef } from 'react' import { SubmitHandler, useForm as useReactHookForm } from 'react-hook-form' import { twMerge } from 'tailwind-merge' @@ -114,9 +115,9 @@ export default function GetResultsByEmail({ if (currentSimulation?.computedResults?.bilan === 0) { // Send an error to Sentry - // captureException( - // new Error('GetResultsByEmail: computedResults.bilan === 0') - // ) + captureException( + new Error('GetResultsByEmail: computedResults.bilan === 0') + ) } // We save the simulation (and signify the backend to send the email) diff --git a/src/app/(layout-with-navigation)/(simulation)/organisations/[orgaSlug]/creer-campagne/_components/PollForm.tsx b/src/app/(layout-with-navigation)/(simulation)/organisations/[orgaSlug]/creer-campagne/_components/PollForm.tsx index bee7ab0ad..f5d27ca35 100644 --- a/src/app/(layout-with-navigation)/(simulation)/organisations/[orgaSlug]/creer-campagne/_components/PollForm.tsx +++ b/src/app/(layout-with-navigation)/(simulation)/organisations/[orgaSlug]/creer-campagne/_components/PollForm.tsx @@ -5,6 +5,7 @@ import TextInputGroup from '@/design-system/inputs/TextInputGroup' import { useCreatePoll } from '@/hooks/polls/useCreatePoll' import { useClientTranslation } from '@/hooks/useClientTranslation' import { Organisation } from '@/types/organisations' +import { captureException } from '@sentry/react' import { useRouter } from 'next/navigation' import { useState } from 'react' import { useForm as useReactHookForm } from 'react-hook-form' @@ -56,7 +57,7 @@ export default function PollForm({ organisation }: Props) { } } catch (error) { setIsError(true) - // captureException(error) + captureException(error) } } diff --git a/src/app/(layout-with-navigation)/(simulation)/organisations/creer/_components/CreationForm.tsx b/src/app/(layout-with-navigation)/(simulation)/organisations/creer/_components/CreationForm.tsx index 1913e5aba..75546835f 100644 --- a/src/app/(layout-with-navigation)/(simulation)/organisations/creer/_components/CreationForm.tsx +++ b/src/app/(layout-with-navigation)/(simulation)/organisations/creer/_components/CreationForm.tsx @@ -12,6 +12,7 @@ import { useSendOrganisationCreationEmail } from '@/hooks/organisations/useSendO import { useUpdateOrganisation } from '@/hooks/organisations/useUpdateOrganisation' import { useClientTranslation } from '@/hooks/useClientTranslation' import { useUser } from '@/publicodes-state' +import { captureException } from '@sentry/react' import { useRouter } from 'next/navigation' import { useEffect, useRef, useState } from 'react' import { useForm as useReactHookForm } from 'react-hook-form' @@ -88,7 +89,7 @@ export default function CreationForm() { setPathToNavigate(`/organisations/${organisationUpdated?.slug}`) } } catch (error: any) { - // captureException(error) + captureException(error) } } diff --git a/src/app/global-error.tsx b/src/app/global-error.tsx index 37c8e330d..537d9c2b5 100644 --- a/src/app/global-error.tsx +++ b/src/app/global-error.tsx @@ -1,6 +1,7 @@ 'use client' import Error500 from '@/components/layout/500' +import * as Sentry from '@sentry/nextjs' import NextError from 'next/error' import { useEffect } from 'react' @@ -9,7 +10,7 @@ type Props = { } export default function GlobalError({ error }: Props) { useEffect(() => { - // Sentry.captureException(error) + Sentry.captureException(error) }, [error]) return ( diff --git a/src/components/northstar/Northstar.tsx b/src/components/northstar/Northstar.tsx index 34e67f065..50b50fa7b 100644 --- a/src/components/northstar/Northstar.tsx +++ b/src/components/northstar/Northstar.tsx @@ -6,6 +6,7 @@ import { NorthStarType, NorthStarValue, } from '@/types/northstar' +import { captureException } from '@sentry/browser' import { useEffect, useState } from 'react' import EmojiButton from './EmojiButton' @@ -148,6 +149,6 @@ const postData = async (data: any, id: string, ratings: NorthStarRatings) => { body: JSON.stringify(body), }) } catch (e) { - // captureException(e) + captureException(e) } } diff --git a/src/components/organisations/ExportDataButton.tsx b/src/components/organisations/ExportDataButton.tsx index f1feb7286..08d7d4550 100644 --- a/src/components/organisations/ExportDataButton.tsx +++ b/src/components/organisations/ExportDataButton.tsx @@ -4,6 +4,7 @@ import Button, { ButtonProps } from '@/design-system/inputs/Button' import { createXLSXFileAndDownload } from '@/helpers/export/createXLSXFileAndDownload' import { useEngine } from '@/publicodes-state' import { PollData, SimulationRecap } from '@/types/organisations' +import { captureException } from '@sentry/react' import dayjs from 'dayjs' import { useState } from 'react' import DownloadIcon from '../icons/DownloadIcon' @@ -40,9 +41,9 @@ export default function ExportDataButton({ if (simulationRecapToParse.bilan === 0) { // Send an error to Sentry - // captureException( - // new Error('ExportDataButton: computedResults.bilan === 0') - // ) + captureException( + new Error('ExportDataButton: computedResults.bilan === 0') + ) const computedResults = getComputedResults( simulationRecapToParse.situation diff --git a/src/helpers/polls/handleMissingComputedResults.ts b/src/helpers/polls/handleMissingComputedResults.ts index 31e8f1eb5..1311f9d48 100644 --- a/src/helpers/polls/handleMissingComputedResults.ts +++ b/src/helpers/polls/handleMissingComputedResults.ts @@ -1,5 +1,6 @@ import { ComputedResults, Situation } from '@/publicodes-state/types' import { SimulationRecap } from '@/types/organisations' +import { captureException } from '@sentry/react' type Props = { simulationRecaps: SimulationRecap[] @@ -14,9 +15,9 @@ export function handleMissingComputedResults({ if (simulationRecap.bilan !== 0) return simulationRecap // Send an error to Sentry - // captureException( - // new Error('handleMissingComputedResults: computedResults.bilan === 0') - // ) + captureException( + new Error('handleMissingComputedResults: computedResults.bilan === 0') + ) const computedResults = getComputedResults(simulationRecap.situation) diff --git a/src/helpers/simulation/generateSimulation.ts b/src/helpers/simulation/generateSimulation.ts index 95db2aba1..b6a5e1f8a 100644 --- a/src/helpers/simulation/generateSimulation.ts +++ b/src/helpers/simulation/generateSimulation.ts @@ -1,6 +1,7 @@ import { migrateSimulation } from '@/publicodes-state/helpers/migrateSimulation' import { Simulation } from '@/publicodes-state/types' import { Migration } from '@publicodes/tools/migration' +import { captureException } from '@sentry/react' import { v4 as uuidv4 } from 'uuid' export function generateSimulation({ @@ -42,7 +43,7 @@ export function generateSimulation({ simulation = migrateSimulation(simulation, migrationInstructions) } catch (error) { console.warn('Error trying to migrate LocalStorage:', error) - // captureException(error) + captureException(error) } return simulation diff --git a/src/hooks/groups/useFixComputedResults.ts b/src/hooks/groups/useFixComputedResults.ts index b94780266..9d053e3ea 100644 --- a/src/hooks/groups/useFixComputedResults.ts +++ b/src/hooks/groups/useFixComputedResults.ts @@ -1,5 +1,6 @@ import { useEngine } from '@/publicodes-state' import { Group } from '@/types/groups' +import { captureException } from '@sentry/react' export function useFixComputedResults(group?: Group) { const { getComputedResults } = useEngine() @@ -13,9 +14,9 @@ export function useFixComputedResults(group?: Group) { } // Send an error to Sentry - // captureException( - // new Error('useFixComputedResults: computedResults.bilan === 0') - // ) + captureException( + new Error('useFixComputedResults: computedResults.bilan === 0') + ) const participantWithFixedComputedResults = { ...participant, diff --git a/src/hooks/navigation/useEndPage.ts b/src/hooks/navigation/useEndPage.ts index 47eaa0774..d544064d7 100644 --- a/src/hooks/navigation/useEndPage.ts +++ b/src/hooks/navigation/useEndPage.ts @@ -2,6 +2,7 @@ import { getLinkToGroupDashboard } from '@/helpers/navigation/groupPages' import { linkToQuiz } from '@/helpers/navigation/quizPages' import { useSaveSimulation } from '@/hooks/simulation/useSaveSimulation' import { useCurrentSimulation, useEngine } from '@/publicodes-state' +import { captureException } from '@sentry/react' import { useRouter } from 'next/navigation' import { useCallback, useState } from 'react' @@ -58,7 +59,7 @@ export function useEndPage() { ) { if (currentSimulation.computedResults?.bilan === 0) { // Send an error to Sentry - // captureException(new Error('useEndPage: computedResults.bilan === 0')) + captureException(new Error('useEndPage: computedResults.bilan === 0')) } await saveSimulation({ diff --git a/src/publicodes-state/helpers/safeEvaluateHelper.ts b/src/publicodes-state/helpers/safeEvaluateHelper.ts index f1811032a..e05b82b24 100644 --- a/src/publicodes-state/helpers/safeEvaluateHelper.ts +++ b/src/publicodes-state/helpers/safeEvaluateHelper.ts @@ -1,3 +1,4 @@ +import { captureException } from '@sentry/react' import Engine, { PublicodesExpression } from 'publicodes' import { NGCEvaluatedNode } from '../types' @@ -10,7 +11,7 @@ export const safeEvaluateHelper = ( evaluation = engineUsed.evaluate(expr) } catch (error) { console.warn(error) - // captureException(error) + captureException(error) } return evaluation } diff --git a/src/publicodes-state/helpers/safeGetRuleHelper.ts b/src/publicodes-state/helpers/safeGetRuleHelper.ts index e8b5d7b85..199aa58d1 100644 --- a/src/publicodes-state/helpers/safeGetRuleHelper.ts +++ b/src/publicodes-state/helpers/safeGetRuleHelper.ts @@ -1,3 +1,4 @@ +import { captureException } from '@sentry/react' import Engine from 'publicodes' import { DottedName, NGCRuleNode } from '../types' @@ -10,7 +11,7 @@ export const safeGetRuleHelper = ( rule = engineUsed.getRule(ruleName) } catch (error) { console.warn(error) - // captureException(error) + captureException(error) } return rule } diff --git a/src/publicodes-state/providers/simulationProvider/useCategories.ts b/src/publicodes-state/providers/simulationProvider/useCategories.ts index 60f66f8cf..c55ded7c6 100644 --- a/src/publicodes-state/providers/simulationProvider/useCategories.ts +++ b/src/publicodes-state/providers/simulationProvider/useCategories.ts @@ -1,5 +1,6 @@ import { orderedCategories } from '@/constants/orderedCategories' import getSomme from '@/publicodes-state/helpers/getSomme' +import * as Sentry from '@sentry/react' import { utils } from 'publicodes' import { useMemo } from 'react' import { DottedName, NGCRuleNode, NGCRulesNodes } from '../../types' @@ -22,18 +23,18 @@ export function useCategories({ if (!rootRule) { console.error(`[useCategories] No rule found for ${root}`) - // Sentry.captureMessage( - // `[useCategories:categories] No rule found for ${root}` - // ) + Sentry.captureMessage( + `[useCategories:categories] No rule found for ${root}` + ) return [] } const sum = getSomme(rootRule.rawNode) if (!sum) { console.error(`[useCategories] No [somme] found for ${root}`) - // Sentry.captureMessage( - // `[useCategories:categories] No [somme] found for ${root}` - // ) + Sentry.captureMessage( + `[useCategories:categories] No [somme] found for ${root}` + ) return [] } @@ -52,9 +53,9 @@ export function useCategories({ console.error( `[useCategories:subcategories] No rule found for ${currentValue}` ) - // Sentry.captureMessage( - // `[useCategories:subcategories] No rule found for ${currentValue}` - // ) + Sentry.captureMessage( + `[useCategories:subcategories] No rule found for ${currentValue}` + ) return accumulator } @@ -63,9 +64,9 @@ export function useCategories({ console.error( `[useCategories:subcategories] No [somme] found for ${currentValue}` ) - // Sentry.captureMessage( - // `[useCategories:subcategories] No [somme] found for ${currentValue}` - // ) + Sentry.captureMessage( + `[useCategories:subcategories] No [somme] found for ${currentValue}` + ) return accumulator } diff --git a/src/publicodes-state/providers/simulationProvider/useEngine.ts b/src/publicodes-state/providers/simulationProvider/useEngine.ts index 5310f01ca..32121f66e 100644 --- a/src/publicodes-state/providers/simulationProvider/useEngine.ts +++ b/src/publicodes-state/providers/simulationProvider/useEngine.ts @@ -1,4 +1,5 @@ import { safeGetRuleHelper } from '@/publicodes-state/helpers/safeGetRuleHelper' +import { captureException } from '@sentry/react' import Engine, { PublicodesExpression } from 'publicodes' import { useMemo } from 'react' import { safeEvaluateHelper } from '../../helpers/safeEvaluateHelper' @@ -30,7 +31,7 @@ export function useEngine(rules: Rules) { // If it's a situation error, we throw it to sentry if (msg.match(/[ Erreur lors de la mise à jour de la situation ]/)) { - // captureException(new Error(msg)) + captureException(new Error(msg)) } }, }, From 64405507ed4f90853b46abe40c152bd458caedf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment?= Date: Thu, 4 Jul 2024 11:41:21 +0200 Subject: [PATCH 02/20] feat: layout changes mosaique repas --- .../[root]/_components/simulateur/Form.tsx | 2 +- src/components/form/Question.tsx | 12 +++++++++++- .../{questions => specialQuestions}/Avion.tsx | 0 .../{questions => specialQuestions}/Plats.tsx | 8 +++++--- .../{questions => specialQuestions}/Voiture.tsx | 0 .../avion/ThreeYearsInput.tsx | 0 .../{questions => specialQuestions}/index.tsx | 4 ++-- .../specialQuestions/plats/DishesNumber.tsx | 15 +++++++++++++++ .../plats/DishesNumberInfo.tsx | 17 ++++------------- .../voiture/JourneysInput.tsx | 0 .../journeysInput/JourneysInputDesktop.tsx | 0 .../journeysInput/JourneysInputMobile.tsx | 0 .../journeysInput/_components/JourneyItem.tsx | 0 .../journeysInput/_components/Summary.tsx | 0 .../journeysInputDesktop/AddJourneyDesktop.tsx | 2 +- .../journeysInputMobile/AddJourneyMobile.tsx | 2 +- 16 files changed, 40 insertions(+), 22 deletions(-) rename src/components/{questions => specialQuestions}/Avion.tsx (100%) rename src/components/{questions => specialQuestions}/Plats.tsx (63%) rename src/components/{questions => specialQuestions}/Voiture.tsx (100%) rename src/components/{questions => specialQuestions}/avion/ThreeYearsInput.tsx (100%) rename src/components/{questions => specialQuestions}/index.tsx (93%) create mode 100644 src/components/specialQuestions/plats/DishesNumber.tsx rename src/components/{questions => specialQuestions}/plats/DishesNumberInfo.tsx (62%) rename src/components/{questions => specialQuestions}/voiture/JourneysInput.tsx (100%) rename src/components/{questions => specialQuestions}/voiture/journeysInput/JourneysInputDesktop.tsx (100%) rename src/components/{questions => specialQuestions}/voiture/journeysInput/JourneysInputMobile.tsx (100%) rename src/components/{questions => specialQuestions}/voiture/journeysInput/_components/JourneyItem.tsx (100%) rename src/components/{questions => specialQuestions}/voiture/journeysInput/_components/Summary.tsx (100%) rename src/components/{questions => specialQuestions}/voiture/journeysInput/journeysInputDesktop/AddJourneyDesktop.tsx (97%) rename src/components/{questions => specialQuestions}/voiture/journeysInput/journeysInputMobile/AddJourneyMobile.tsx (97%) diff --git a/src/app/(layout-with-navigation)/(simulation)/simulateur/[root]/_components/simulateur/Form.tsx b/src/app/(layout-with-navigation)/(simulation)/simulateur/[root]/_components/simulateur/Form.tsx index 718eade60..c9cde68ad 100644 --- a/src/app/(layout-with-navigation)/(simulation)/simulateur/[root]/_components/simulateur/Form.tsx +++ b/src/app/(layout-with-navigation)/(simulation)/simulateur/[root]/_components/simulateur/Form.tsx @@ -1,7 +1,7 @@ import { PreventNavigationContext } from '@/app/_components/mainLayoutProviders/PreventNavigationProvider' import Navigation from '@/components/form/Navigation' import Question from '@/components/form/Question' -import questions from '@/components/questions' +import questions from '@/components/specialQuestions' import { simulationSimulationCompleted } from '@/constants/tracking/simulation' import { uuidToNumber } from '@/helpers/uuidToNumber' import { useEndPage } from '@/hooks/navigation/useEndPage' diff --git a/src/components/form/Question.tsx b/src/components/form/Question.tsx index 5519fdffb..2ef5c5363 100644 --- a/src/components/form/Question.tsx +++ b/src/components/form/Question.tsx @@ -25,9 +25,15 @@ type Props = { question: string tempValue?: number | undefined setTempValue?: (value: number | undefined) => void + children?: React.ReactNode } -export default function Question({ question, tempValue, setTempValue }: Props) { +export default function Question({ + question, + tempValue, + setTempValue, + children, +}: Props) { const { type, label, @@ -74,6 +80,10 @@ export default function Question({ question, tempValue, setTempValue }: Props) { setValue(value, { foldedStep: question }) }} /> + + {/* This is a temporary hack to show `alimentation . plats` question info inside Question component */} + {children} + {type === 'number' && ( - - {!isMissing ? : null} + + {!isMissing ? : null} + + ) } diff --git a/src/components/questions/Voiture.tsx b/src/components/specialQuestions/Voiture.tsx similarity index 100% rename from src/components/questions/Voiture.tsx rename to src/components/specialQuestions/Voiture.tsx diff --git a/src/components/questions/avion/ThreeYearsInput.tsx b/src/components/specialQuestions/avion/ThreeYearsInput.tsx similarity index 100% rename from src/components/questions/avion/ThreeYearsInput.tsx rename to src/components/specialQuestions/avion/ThreeYearsInput.tsx diff --git a/src/components/questions/index.tsx b/src/components/specialQuestions/index.tsx similarity index 93% rename from src/components/questions/index.tsx rename to src/components/specialQuestions/index.tsx index 50a42af6d..32a3677b9 100644 --- a/src/components/questions/index.tsx +++ b/src/components/specialQuestions/index.tsx @@ -7,7 +7,7 @@ type Props = { tempValue?: number } -const questions: Record = { +const specialQuestions: Record = { 'alimentation . plats': (props: Props) => ( ), @@ -41,4 +41,4 @@ const questions: Record = { ), } -export default questions +export default specialQuestions diff --git a/src/components/specialQuestions/plats/DishesNumber.tsx b/src/components/specialQuestions/plats/DishesNumber.tsx new file mode 100644 index 000000000..5a3aa2e07 --- /dev/null +++ b/src/components/specialQuestions/plats/DishesNumber.tsx @@ -0,0 +1,15 @@ +import { useRule } from '@/publicodes-state' + +export default function DishesNumber() { + const { numericValue: totalNumberOfPlats } = useRule( + 'ui . nombre de repas par semaine' + ) + + return ( + <> +
+ {totalNumberOfPlats} / 14 repas +
+ + ) +} diff --git a/src/components/questions/plats/DishesNumberInfo.tsx b/src/components/specialQuestions/plats/DishesNumberInfo.tsx similarity index 62% rename from src/components/questions/plats/DishesNumberInfo.tsx rename to src/components/specialQuestions/plats/DishesNumberInfo.tsx index 167256695..bbe3b79aa 100644 --- a/src/components/questions/plats/DishesNumberInfo.tsx +++ b/src/components/specialQuestions/plats/DishesNumberInfo.tsx @@ -10,26 +10,17 @@ export default function DishesNumberInfo() { return ( <>
- {totalNumberOfPlats < 12 ? ( + {totalNumberOfPlats !== 14 ? ( + Vous avez sélectionné{' '} {totalNumberOfPlats}{' '} repas {' '} - par semaine, quel appétit de moineau - 🐦 + sur les 14 habituels 🍽️ ) : null} - {totalNumberOfPlats > 16 ? ( - - {totalNumberOfPlats}{' '} - - repas - {' '} - par semaine, quel appétit ! 💪 - - ) : null} - {totalNumberOfPlats >= 12 && totalNumberOfPlats <= 16 ? ( + {totalNumberOfPlats === 14 ? ( {totalNumberOfPlats}{' '} diff --git a/src/components/questions/voiture/JourneysInput.tsx b/src/components/specialQuestions/voiture/JourneysInput.tsx similarity index 100% rename from src/components/questions/voiture/JourneysInput.tsx rename to src/components/specialQuestions/voiture/JourneysInput.tsx diff --git a/src/components/questions/voiture/journeysInput/JourneysInputDesktop.tsx b/src/components/specialQuestions/voiture/journeysInput/JourneysInputDesktop.tsx similarity index 100% rename from src/components/questions/voiture/journeysInput/JourneysInputDesktop.tsx rename to src/components/specialQuestions/voiture/journeysInput/JourneysInputDesktop.tsx diff --git a/src/components/questions/voiture/journeysInput/JourneysInputMobile.tsx b/src/components/specialQuestions/voiture/journeysInput/JourneysInputMobile.tsx similarity index 100% rename from src/components/questions/voiture/journeysInput/JourneysInputMobile.tsx rename to src/components/specialQuestions/voiture/journeysInput/JourneysInputMobile.tsx diff --git a/src/components/questions/voiture/journeysInput/_components/JourneyItem.tsx b/src/components/specialQuestions/voiture/journeysInput/_components/JourneyItem.tsx similarity index 100% rename from src/components/questions/voiture/journeysInput/_components/JourneyItem.tsx rename to src/components/specialQuestions/voiture/journeysInput/_components/JourneyItem.tsx diff --git a/src/components/questions/voiture/journeysInput/_components/Summary.tsx b/src/components/specialQuestions/voiture/journeysInput/_components/Summary.tsx similarity index 100% rename from src/components/questions/voiture/journeysInput/_components/Summary.tsx rename to src/components/specialQuestions/voiture/journeysInput/_components/Summary.tsx diff --git a/src/components/questions/voiture/journeysInput/journeysInputDesktop/AddJourneyDesktop.tsx b/src/components/specialQuestions/voiture/journeysInput/journeysInputDesktop/AddJourneyDesktop.tsx similarity index 97% rename from src/components/questions/voiture/journeysInput/journeysInputDesktop/AddJourneyDesktop.tsx rename to src/components/specialQuestions/voiture/journeysInput/journeysInputDesktop/AddJourneyDesktop.tsx index 9d0791579..1b4d40c3c 100644 --- a/src/components/questions/voiture/journeysInput/journeysInputDesktop/AddJourneyDesktop.tsx +++ b/src/components/specialQuestions/voiture/journeysInput/journeysInputDesktop/AddJourneyDesktop.tsx @@ -1,7 +1,7 @@ import { labels, periods, -} from '@/components/questions/voiture/journeysInput/_components/JourneyItem' +} from '@/components/specialQuestions/voiture/journeysInput/_components/JourneyItem' import Trans from '@/components/translation/Trans' import Button from '@/design-system/inputs/Button' import Select from '@/design-system/inputs/Select' diff --git a/src/components/questions/voiture/journeysInput/journeysInputMobile/AddJourneyMobile.tsx b/src/components/specialQuestions/voiture/journeysInput/journeysInputMobile/AddJourneyMobile.tsx similarity index 97% rename from src/components/questions/voiture/journeysInput/journeysInputMobile/AddJourneyMobile.tsx rename to src/components/specialQuestions/voiture/journeysInput/journeysInputMobile/AddJourneyMobile.tsx index 0826851de..be937665b 100644 --- a/src/components/questions/voiture/journeysInput/journeysInputMobile/AddJourneyMobile.tsx +++ b/src/components/specialQuestions/voiture/journeysInput/journeysInputMobile/AddJourneyMobile.tsx @@ -1,7 +1,7 @@ import { labels, periods, -} from '@/components/questions/voiture/journeysInput/_components/JourneyItem' +} from '@/components/specialQuestions/voiture/journeysInput/_components/JourneyItem' import Trans from '@/components/translation/Trans' import Button from '@/design-system/inputs/Button' import Select from '@/design-system/inputs/Select' From aee9be2715db8fe1f8917233f166c3cfb1a0813f Mon Sep 17 00:00:00 2001 From: Florian Date: Mon, 8 Jul 2024 08:25:05 +0200 Subject: [PATCH 03/20] feat: update cypress install --- .gitignore | 6 + package.json | 4 +- sentry.client.config.ts | 9 -- src/instrumentation.ts | 9 ++ yarn.lock | 326 +++++++++++++++++++++------------------- 5 files changed, 186 insertions(+), 168 deletions(-) create mode 100644 src/instrumentation.ts diff --git a/.gitignore b/.gitignore index 904ef6903..8c3631698 100644 --- a/.gitignore +++ b/.gitignore @@ -57,3 +57,9 @@ dist # Build analysis /analyze + +# Sentry Config File +.env.sentry-build-plugin + +# Sentry Config File +.env.sentry-build-plugin diff --git a/package.json b/package.json index 8a0df5a80..c28c43c78 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "@next/mdx": "^14.0.2", "@publicodes/react-ui": "^1.3.3", "@publicodes/tools": "^1.2.0", - "@sentry/nextjs": "^8.10.0", + "@sentry/nextjs": "^8", "@sentry/react": "^8.10.0", "@tanstack/react-query": "^5.28.4", "axios": "^1.6.8", @@ -101,7 +101,7 @@ "autoprefixer": "^10.4.16", "cli-progress": "^3.12.0", "core-js": "^3.33.2", - "cypress": "^13.7.0", + "cypress": "^13.13.0", "cypress-plugin-tab": "^1.0.5", "cypress-recurse": "^1.35.2", "deepl-node": "^1.10.2", diff --git a/sentry.client.config.ts b/sentry.client.config.ts index 33cbcb5f6..3ab3ec118 100644 --- a/sentry.client.config.ts +++ b/sentry.client.config.ts @@ -20,15 +20,6 @@ Sentry.init({ // in development and sample at a lower rate in production replaysSessionSampleRate: 0.1, - // You can remove this option if you're not planning to use the Sentry Session Replay feature: - integrations: [ - new Sentry.Replay({ - // Additional Replay configuration goes in here, for example: - maskAllText: true, - blockAllMedia: true, - }), - ], - // Disable sentry for development based on local data enabled: !process.env.NEXT_PUBLIC_LOCAL_DATA, }) diff --git a/src/instrumentation.ts b/src/instrumentation.ts new file mode 100644 index 000000000..6a02852d9 --- /dev/null +++ b/src/instrumentation.ts @@ -0,0 +1,9 @@ +export async function register() { + if (process.env.NEXT_RUNTIME === 'nodejs') { + await import('../sentry.server.config'); + } + + if (process.env.NEXT_RUNTIME === 'edge') { + await import('../sentry.edge.config'); + } +} diff --git a/yarn.lock b/yarn.lock index 5d8eeb9f9..cb8614d2a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -991,20 +991,6 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@opentelemetry/api-logs@0.51.1": - version "0.51.1" - resolved "https://registry.yarnpkg.com/@opentelemetry/api-logs/-/api-logs-0.51.1.tgz#ded1874c04516c2b8cb24828eef3d6c3d1f75343" - integrity sha512-E3skn949Pk1z2XtXu/lxf6QAZpawuTM/IUEXcAzpiUkTd73Hmvw26FiN3cJuTmkpM5hZzHwkomVdtrh/n/zzwA== - dependencies: - "@opentelemetry/api" "^1.0.0" - -"@opentelemetry/api-logs@0.52.0": - version "0.52.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/api-logs/-/api-logs-0.52.0.tgz#b117c1fc6fc457249739bbe21571cefc55e5092c" - integrity sha512-HxjD7xH9iAE4OyhNaaSec65i1H6QZYBWSwWkowFfsc5YAcDvJG30/J1sRKXEQqdmUcKTXEAnA66UciqZha/4+Q== - dependencies: - "@opentelemetry/api" "^1.0.0" - "@opentelemetry/api-logs@0.52.1": version "0.52.1" resolved "https://registry.yarnpkg.com/@opentelemetry/api-logs/-/api-logs-0.52.1.tgz#52906375da4d64c206b0c4cb8ffa209214654ecc" @@ -1017,19 +1003,12 @@ resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-1.9.0.tgz#d03eba68273dc0f7509e2a3d5cba21eae10379fe" integrity sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg== -"@opentelemetry/context-async-hooks@^1.25.0": +"@opentelemetry/context-async-hooks@^1.25.1": version "1.25.1" resolved "https://registry.yarnpkg.com/@opentelemetry/context-async-hooks/-/context-async-hooks-1.25.1.tgz#810bff2fcab84ec51f4684aff2d21f6c057d9e73" integrity sha512-UW/ge9zjvAEmRWVapOP0qyCvPulWU6cQxGxDbWEFfGOj1VBBZAuOqTo3X6yWmDTD3Xe15ysCZChHncr2xFMIfQ== -"@opentelemetry/core@1.25.0": - version "1.25.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/core/-/core-1.25.0.tgz#ad034f5c2669f589bd703bfbbaa38b51f8504053" - integrity sha512-n0B3s8rrqGrasTgNkXLKXzN0fXo+6IYP7M5b7AMsrZM33f/y6DS6kJ0Btd7SespASWq8bgL3taLo0oe0vB52IQ== - dependencies: - "@opentelemetry/semantic-conventions" "1.25.0" - -"@opentelemetry/core@1.25.1", "@opentelemetry/core@^1.1.0", "@opentelemetry/core@^1.25.0", "@opentelemetry/core@^1.8.0": +"@opentelemetry/core@1.25.1", "@opentelemetry/core@^1.1.0", "@opentelemetry/core@^1.25.1", "@opentelemetry/core@^1.8.0": version "1.25.1" resolved "https://registry.yarnpkg.com/@opentelemetry/core/-/core-1.25.1.tgz#ff667d939d128adfc7c793edae2f6bca177f829d" integrity sha512-GeT/l6rBYWVQ4XArluLVB6WWQ8flHbdb6r2FCHC3smtdOAbrJBIv35tpV/yp9bmYUJf+xmZpu9DRTIeJVhFbEQ== @@ -1080,14 +1059,14 @@ "@opentelemetry/instrumentation" "^0.52.0" "@opentelemetry/semantic-conventions" "^1.22.0" -"@opentelemetry/instrumentation-http@0.52.0": - version "0.52.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-http/-/instrumentation-http-0.52.0.tgz#a2fd280a493591d2cf4db534253ca406580569f7" - integrity sha512-E6ywZuxTa4LnVXZGwL1oj3e2Eog1yIaNqa8KjKXoGkDNKte9/SjQnePXOmhQYI0A9nf0UyFbP9aKd+yHrkJXUA== +"@opentelemetry/instrumentation-http@0.52.1": + version "0.52.1" + resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-http/-/instrumentation-http-0.52.1.tgz#12061501601838d1c912f9c29bdd40a13a7e44cf" + integrity sha512-dG/aevWhaP+7OLv4BQQSEKMJv8GyeOp3Wxl31NHqE8xo9/fYMfEljiZphUHIfyg4gnZ9swMyWjfOQs5GUQe54Q== dependencies: - "@opentelemetry/core" "1.25.0" - "@opentelemetry/instrumentation" "0.52.0" - "@opentelemetry/semantic-conventions" "1.25.0" + "@opentelemetry/core" "1.25.1" + "@opentelemetry/instrumentation" "0.52.1" + "@opentelemetry/semantic-conventions" "1.25.1" semver "^7.5.2" "@opentelemetry/instrumentation-ioredis@0.41.0": @@ -1174,14 +1153,14 @@ "@opentelemetry/redis-common" "^0.36.2" "@opentelemetry/semantic-conventions" "^1.22.0" -"@opentelemetry/instrumentation@0.52.0": - version "0.52.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation/-/instrumentation-0.52.0.tgz#f8b790bfb1c61c27e0ba846bc6d0e377da195d1e" - integrity sha512-LPwSIrw+60cheWaXsfGL8stBap/AppKQJFE+qqRvzYrgttXFH2ofoIMxWadeqPTq4BYOXM/C7Bdh/T+B60xnlQ== +"@opentelemetry/instrumentation@0.52.1", "@opentelemetry/instrumentation@^0.49 || ^0.50 || ^0.51 || ^0.52.0", "@opentelemetry/instrumentation@^0.52.0", "@opentelemetry/instrumentation@^0.52.1": + version "0.52.1" + resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation/-/instrumentation-0.52.1.tgz#2e7e46a38bd7afbf03cf688c862b0b43418b7f48" + integrity sha512-uXJbYU/5/MBHjMp1FqrILLRuiJCs3Ofk0MeRDk8g1S1gD47U8X3JnSwcMO1rtRo1x1a7zKaQHaoYu49p/4eSKw== dependencies: - "@opentelemetry/api-logs" "0.52.0" + "@opentelemetry/api-logs" "0.52.1" "@types/shimmer" "^1.0.2" - import-in-the-middle "1.8.0" + import-in-the-middle "^1.8.1" require-in-the-middle "^7.1.1" semver "^7.5.2" shimmer "^1.2.1" @@ -1197,36 +1176,12 @@ semver "^7.5.2" shimmer "^1.2.1" -"@opentelemetry/instrumentation@^0.49 || ^0.50 || ^0.51": - version "0.51.1" - resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation/-/instrumentation-0.51.1.tgz#46fb2291150ec6923e50b2f094b9407bc726ca9b" - integrity sha512-JIrvhpgqY6437QIqToyozrUG1h5UhwHkaGK/WAX+fkrpyPtc+RO5FkRtUd9BH0MibabHHvqsnBGKfKVijbmp8w== - dependencies: - "@opentelemetry/api-logs" "0.51.1" - "@types/shimmer" "^1.0.2" - import-in-the-middle "1.7.4" - require-in-the-middle "^7.1.1" - semver "^7.5.2" - shimmer "^1.2.1" - -"@opentelemetry/instrumentation@^0.52.0": - version "0.52.1" - resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation/-/instrumentation-0.52.1.tgz#2e7e46a38bd7afbf03cf688c862b0b43418b7f48" - integrity sha512-uXJbYU/5/MBHjMp1FqrILLRuiJCs3Ofk0MeRDk8g1S1gD47U8X3JnSwcMO1rtRo1x1a7zKaQHaoYu49p/4eSKw== - dependencies: - "@opentelemetry/api-logs" "0.52.1" - "@types/shimmer" "^1.0.2" - import-in-the-middle "^1.8.1" - require-in-the-middle "^7.1.1" - semver "^7.5.2" - shimmer "^1.2.1" - "@opentelemetry/redis-common@^0.36.2": version "0.36.2" resolved "https://registry.yarnpkg.com/@opentelemetry/redis-common/-/redis-common-0.36.2.tgz#906ac8e4d804d4109f3ebd5c224ac988276fdc47" integrity sha512-faYX1N0gpLhej/6nyp6bgRjzAKXn5GOEMYY7YhciSfCoITAktLUtQ36d24QEWNA1/WA1y6qQunCe0OhHRkVl9g== -"@opentelemetry/resources@1.25.1", "@opentelemetry/resources@^1.25.0": +"@opentelemetry/resources@1.25.1", "@opentelemetry/resources@^1.25.1": version "1.25.1" resolved "https://registry.yarnpkg.com/@opentelemetry/resources/-/resources-1.25.1.tgz#bb9a674af25a1a6c30840b755bc69da2796fefbb" integrity sha512-pkZT+iFYIZsVn6+GzM0kSX+u3MSLCY9md+lIJOoKl/P+gJFfxJte/60Usdp8Ce4rOs8GduUpSPNe1ddGyDT1sQ== @@ -1243,7 +1198,7 @@ "@opentelemetry/resources" "1.25.1" lodash.merge "^4.6.2" -"@opentelemetry/sdk-trace-base@^1.22", "@opentelemetry/sdk-trace-base@^1.25.0": +"@opentelemetry/sdk-trace-base@^1.22", "@opentelemetry/sdk-trace-base@^1.25.1": version "1.25.1" resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.25.1.tgz#cbc1e60af255655d2020aa14cde17b37bd13df37" integrity sha512-C8k4hnEbc5FamuZQ92nTOp8X/diCY56XUTnMiv9UTuJitCzaNNHAVsdm5+HLCdI8SLQsLWIrG38tddMxLVoftw== @@ -1252,12 +1207,7 @@ "@opentelemetry/resources" "1.25.1" "@opentelemetry/semantic-conventions" "1.25.1" -"@opentelemetry/semantic-conventions@1.25.0": - version "1.25.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.25.0.tgz#390eb4d42a29c66bdc30066af9035645e9bb7270" - integrity sha512-M+kkXKRAIAiAP6qYyesfrC5TOmDpDVtsxuGfPcqd9B/iBrac+E14jYwrgm0yZBUIbIP2OnqC3j+UgkXLm1vxUQ== - -"@opentelemetry/semantic-conventions@1.25.1", "@opentelemetry/semantic-conventions@^1.17.0", "@opentelemetry/semantic-conventions@^1.22.0", "@opentelemetry/semantic-conventions@^1.23.0", "@opentelemetry/semantic-conventions@^1.25.0": +"@opentelemetry/semantic-conventions@1.25.1", "@opentelemetry/semantic-conventions@^1.17.0", "@opentelemetry/semantic-conventions@^1.22.0", "@opentelemetry/semantic-conventions@^1.23.0", "@opentelemetry/semantic-conventions@^1.25.1": version "1.25.1" resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.25.1.tgz#0deecb386197c5e9c2c28f2f89f51fb8ae9f145e" integrity sha512-ZDjMJJQRlyk8A1KZFCc+bCbsyrn1wTwdNt56F7twdfUfnHUZUq77/WfONCj8p72NZOyP7pNTdUWSTYC3GTbuuQ== @@ -1279,13 +1229,13 @@ resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.25.tgz#f077fdc0b5d0078d30893396ff4827a13f99e817" integrity sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ== -"@prisma/instrumentation@5.15.0": - version "5.15.0" - resolved "https://registry.yarnpkg.com/@prisma/instrumentation/-/instrumentation-5.15.0.tgz#9ec061b35761579ffa896bdf19c6a0bf53247593" - integrity sha512-fCWOOOajTKOUEp43gRmBqwt6oN9bPJcLiloi2OG/2ED0N5z62Cuza6FDrlm3SJHQAXYlXqLE0HLdEE5WcUkOzg== +"@prisma/instrumentation@5.16.1": + version "5.16.1" + resolved "https://registry.yarnpkg.com/@prisma/instrumentation/-/instrumentation-5.16.1.tgz#93f996f9c95874156badbb5edbb97994667f7c3f" + integrity sha512-4m5gRFWnQb8s/yTyGbMZkL7A5uJgqOWcWJxapwcAD0T0kh5sGPEVSQl/zTQvE9aduXhFAxOtC3gO+R8Hb5xO1Q== dependencies: "@opentelemetry/api" "^1.8" - "@opentelemetry/instrumentation" "^0.49 || ^0.50 || ^0.51" + "@opentelemetry/instrumentation" "^0.49 || ^0.50 || ^0.51 || ^0.52.0" "@opentelemetry/sdk-trace-base" "^1.22" "@publicodes/react-ui@^1.3.3": @@ -1339,6 +1289,15 @@ "@sentry/types" "8.10.0" "@sentry/utils" "8.10.0" +"@sentry-internal/browser-utils@8.14.0": + version "8.14.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/browser-utils/-/browser-utils-8.14.0.tgz#2a50823c43fcea26846fd0088c8712e36ab0dab5" + integrity sha512-ldIa3qeMYZ5WUdcuBqQhXOSrEPZwB09gmELzFietjcPZTK1naAE5g5On94gpj1je1dn1S0+tXJ0a7SJS9Tu4Sw== + dependencies: + "@sentry/core" "8.14.0" + "@sentry/types" "8.14.0" + "@sentry/utils" "8.14.0" + "@sentry-internal/feedback@8.10.0": version "8.10.0" resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-8.10.0.tgz#31afdc59be6a500eadebcc4603e0ebec7942cd16" @@ -1348,6 +1307,15 @@ "@sentry/types" "8.10.0" "@sentry/utils" "8.10.0" +"@sentry-internal/feedback@8.14.0": + version "8.14.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-8.14.0.tgz#bed1d59267406b638fd47a371999fb7d61251515" + integrity sha512-0mBSTdoCEgzWS4btIIZF8XSnAo0eK6gr7Md7xVVOZMd/er0DgYVKl+z3dMoidyijGcrAlJssECUxWHOV3iJitQ== + dependencies: + "@sentry/core" "8.14.0" + "@sentry/types" "8.14.0" + "@sentry/utils" "8.14.0" + "@sentry-internal/replay-canvas@8.10.0": version "8.10.0" resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-8.10.0.tgz#a1ac59d13ff12d497e7eea0727c488a572772941" @@ -1358,6 +1326,16 @@ "@sentry/types" "8.10.0" "@sentry/utils" "8.10.0" +"@sentry-internal/replay-canvas@8.14.0": + version "8.14.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-8.14.0.tgz#5e7351a70a5da582b8cc19f26398a5987feb4255" + integrity sha512-8md1ZxuEk51PNFPbwxVDc7RJ7RSNWHiGLNWYQO/MTKonZf78x4OfQLNIHgQ4z4nMUP38NfjMVkNi21LGW+vMNA== + dependencies: + "@sentry-internal/replay" "8.14.0" + "@sentry/core" "8.14.0" + "@sentry/types" "8.14.0" + "@sentry/utils" "8.14.0" + "@sentry-internal/replay@8.10.0": version "8.10.0" resolved "https://registry.yarnpkg.com/@sentry-internal/replay/-/replay-8.10.0.tgz#05be6548ffe3e8497a9efc4bf65be2ad0ab85ff6" @@ -1368,10 +1346,20 @@ "@sentry/types" "8.10.0" "@sentry/utils" "8.10.0" -"@sentry/babel-plugin-component-annotate@2.18.0": - version "2.18.0" - resolved "https://registry.yarnpkg.com/@sentry/babel-plugin-component-annotate/-/babel-plugin-component-annotate-2.18.0.tgz#3bee98f94945643b0762ceed1f6cca60db52bdbd" - integrity sha512-9L4RbhS3WNtc/SokIhc0dwgcvs78YSQPakZejsrIgnzLzCi8mS6PeT+BY0+QCtsXxjd1egM8hqcJeB0lukBkXA== +"@sentry-internal/replay@8.14.0": + version "8.14.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/replay/-/replay-8.14.0.tgz#1c9f842febddb0147bbe7e38b0c7b65cbaed2d0f" + integrity sha512-ntc4+1asXCUvM/Oiot/z3+mlCZ83imphbPdiI9ilLErQjDsXFsvNTXe6a0TMoCckKcnypTG6LFyQS62okDiG5Q== + dependencies: + "@sentry-internal/browser-utils" "8.14.0" + "@sentry/core" "8.14.0" + "@sentry/types" "8.14.0" + "@sentry/utils" "8.14.0" + +"@sentry/babel-plugin-component-annotate@2.20.1": + version "2.20.1" + resolved "https://registry.yarnpkg.com/@sentry/babel-plugin-component-annotate/-/babel-plugin-component-annotate-2.20.1.tgz#204c63ed006a048f48f633876e1b8bacf87a9722" + integrity sha512-4mhEwYTK00bIb5Y9UWIELVUfru587Vaeg0DQGswv4aIRHIiMKLyNqCEejaaybQ/fNChIZOKmvyqXk430YVd7Qg== "@sentry/browser@8.10.0": version "8.10.0" @@ -1386,13 +1374,26 @@ "@sentry/types" "8.10.0" "@sentry/utils" "8.10.0" -"@sentry/bundler-plugin-core@2.18.0": - version "2.18.0" - resolved "https://registry.yarnpkg.com/@sentry/bundler-plugin-core/-/bundler-plugin-core-2.18.0.tgz#2411cd934e9510c53a2e682497a74172485ac817" - integrity sha512-JvxVgsMFmDsU0Dgcx1CeFUC1scxOVSAOzOcE06qKAVm9BZzxHpI53iNfeMOXwVTUolD8LZVIfgOjkiXfwN/UPQ== +"@sentry/browser@8.14.0": + version "8.14.0" + resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-8.14.0.tgz#14a555000dcb615b454f70e2485dd656fb6fbbef" + integrity sha512-XQ28e/vcxtI+TwSpvfqS86nZtY0538ZUdda1vZmkpu9eXT632tzk1P8rNhiIUs0lCssQw8sakTUzjxZxEe0+ZA== + dependencies: + "@sentry-internal/browser-utils" "8.14.0" + "@sentry-internal/feedback" "8.14.0" + "@sentry-internal/replay" "8.14.0" + "@sentry-internal/replay-canvas" "8.14.0" + "@sentry/core" "8.14.0" + "@sentry/types" "8.14.0" + "@sentry/utils" "8.14.0" + +"@sentry/bundler-plugin-core@2.20.1": + version "2.20.1" + resolved "https://registry.yarnpkg.com/@sentry/bundler-plugin-core/-/bundler-plugin-core-2.20.1.tgz#c9dd35e2177a4c22ecf675558eb84fbc2607e465" + integrity sha512-6ipbmGzHekxeRCbp7eoefr6bdd/lW4cNA9eNnrmd9+PicubweGaZZbH2NjhFHsaxzgOezwipDHjrTaap2kTHgw== dependencies: "@babel/core" "^7.18.5" - "@sentry/babel-plugin-component-annotate" "2.18.0" + "@sentry/babel-plugin-component-annotate" "2.20.1" "@sentry/cli" "^2.22.3" dotenv "^16.3.1" find-up "^5.0.0" @@ -1462,41 +1463,49 @@ "@sentry/types" "8.10.0" "@sentry/utils" "8.10.0" -"@sentry/nextjs@^8.10.0": - version "8.10.0" - resolved "https://registry.yarnpkg.com/@sentry/nextjs/-/nextjs-8.10.0.tgz#1272f7befce00cacb160f06f339518520e1e0aab" - integrity sha512-oSaAH9PLDmAgC81PKincziJuaILFBub9cg/jldTVF3h+wTGaKDvs9PbXPkUn+dIh2RzgnTCgnIlL1L6lyJvNGw== +"@sentry/core@8.14.0": + version "8.14.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-8.14.0.tgz#4fa4ba8de9ec123f8cececd44b7cc54e1af909fd" + integrity sha512-kEB8R3hMxdJRzwZwNqIxwrnmKx/iNl2ZHL/48/ywJu4u+qkBqQs9OsR+ACa+eZyAZTY5T0cPRGsUcNdnwy1ZAg== + dependencies: + "@sentry/types" "8.14.0" + "@sentry/utils" "8.14.0" + +"@sentry/nextjs@^8": + version "8.14.0" + resolved "https://registry.yarnpkg.com/@sentry/nextjs/-/nextjs-8.14.0.tgz#b6e8d2f3896a23322bf81c849e5aa8688c70c64f" + integrity sha512-K1pdkh+V+MxWxdwwxQe1pkauE9OJ6cGP5UTAJXDaQIYOLToVhrjz4igg9MRvbe1WcA64uiTHHvYts9vmwXTGQw== dependencies: - "@opentelemetry/instrumentation-http" "0.52.0" + "@opentelemetry/instrumentation-http" "0.52.1" "@rollup/plugin-commonjs" "26.0.1" - "@sentry/core" "8.10.0" - "@sentry/node" "8.10.0" - "@sentry/opentelemetry" "8.10.0" - "@sentry/react" "8.10.0" - "@sentry/types" "8.10.0" - "@sentry/utils" "8.10.0" - "@sentry/vercel-edge" "8.10.0" - "@sentry/webpack-plugin" "2.18.0" + "@sentry/core" "8.14.0" + "@sentry/node" "8.14.0" + "@sentry/opentelemetry" "8.14.0" + "@sentry/react" "8.14.0" + "@sentry/types" "8.14.0" + "@sentry/utils" "8.14.0" + "@sentry/vercel-edge" "8.14.0" + "@sentry/webpack-plugin" "2.20.1" chalk "3.0.0" resolve "1.22.8" rollup "3.29.4" stacktrace-parser "^0.1.10" -"@sentry/node@8.10.0": - version "8.10.0" - resolved "https://registry.yarnpkg.com/@sentry/node/-/node-8.10.0.tgz#8bee9d3270ce6054e3c271125415d6524298847a" - integrity sha512-cokBLwYGBFhFw4TFX5QCRat8JBkjT3U72PsptciO+ck3XUHJwQn2AipzzEk9itCvtnhQjhStRswyCK4zXHpW7w== +"@sentry/node@8.14.0": + version "8.14.0" + resolved "https://registry.yarnpkg.com/@sentry/node/-/node-8.14.0.tgz#47908275af3a0ba389a327159159a84c66a56225" + integrity sha512-C/Gwk4iHo2AbMX3X8aoZR1pYhr5WwaeTZZXSytglbKJgy5Udi/jB/3PKJqJnzJX4xCSvNj7rp75QM+E+3fAzbw== dependencies: "@opentelemetry/api" "^1.9.0" - "@opentelemetry/context-async-hooks" "^1.25.0" - "@opentelemetry/core" "^1.25.0" - "@opentelemetry/instrumentation" "^0.52.0" + "@opentelemetry/context-async-hooks" "^1.25.1" + "@opentelemetry/core" "^1.25.1" + "@opentelemetry/instrumentation" "^0.52.1" "@opentelemetry/instrumentation-connect" "0.37.0" "@opentelemetry/instrumentation-express" "0.40.1" "@opentelemetry/instrumentation-fastify" "0.37.0" "@opentelemetry/instrumentation-graphql" "0.41.0" "@opentelemetry/instrumentation-hapi" "0.39.0" - "@opentelemetry/instrumentation-http" "0.52.0" + "@opentelemetry/instrumentation-http" "0.52.1" "@opentelemetry/instrumentation-ioredis" "0.41.0" "@opentelemetry/instrumentation-koa" "0.41.0" "@opentelemetry/instrumentation-mongodb" "0.45.0" @@ -1506,27 +1515,38 @@ "@opentelemetry/instrumentation-nestjs-core" "0.38.0" "@opentelemetry/instrumentation-pg" "0.42.0" "@opentelemetry/instrumentation-redis-4" "0.40.0" - "@opentelemetry/resources" "^1.25.0" - "@opentelemetry/sdk-trace-base" "^1.25.0" - "@opentelemetry/semantic-conventions" "^1.25.0" - "@prisma/instrumentation" "5.15.0" - "@sentry/core" "8.10.0" - "@sentry/opentelemetry" "8.10.0" - "@sentry/types" "8.10.0" - "@sentry/utils" "8.10.0" + "@opentelemetry/resources" "^1.25.1" + "@opentelemetry/sdk-trace-base" "^1.25.1" + "@opentelemetry/semantic-conventions" "^1.25.1" + "@prisma/instrumentation" "5.16.1" + "@sentry/core" "8.14.0" + "@sentry/opentelemetry" "8.14.0" + "@sentry/types" "8.14.0" + "@sentry/utils" "8.14.0" optionalDependencies: opentelemetry-instrumentation-fetch-node "1.2.0" -"@sentry/opentelemetry@8.10.0": - version "8.10.0" - resolved "https://registry.yarnpkg.com/@sentry/opentelemetry/-/opentelemetry-8.10.0.tgz#bf1488e4a1769d4e74aa07dad55ce1fb2ec7a297" - integrity sha512-OPdxZZWaOzOCOYbH7oGeDrz3veaxdlUMU0PMaqYYywN+iOx+0uZm+MfAiAEbInL8dmLMg0qJHde3vI9veDozgQ== +"@sentry/opentelemetry@8.14.0": + version "8.14.0" + resolved "https://registry.yarnpkg.com/@sentry/opentelemetry/-/opentelemetry-8.14.0.tgz#bc4587f3a15ef941e157a102b482da5d6e028602" + integrity sha512-Kf7mzxhmHQFf3G1tueAhKHFF3wfGiAyCGzSof7QwhHaUp2a3iHOFHGpzcPaq+RS9O01qAQDq0GYChj0VpBH34g== dependencies: - "@sentry/core" "8.10.0" - "@sentry/types" "8.10.0" - "@sentry/utils" "8.10.0" + "@sentry/core" "8.14.0" + "@sentry/types" "8.14.0" + "@sentry/utils" "8.14.0" + +"@sentry/react@8.14.0": + version "8.14.0" + resolved "https://registry.yarnpkg.com/@sentry/react/-/react-8.14.0.tgz#37f72343c25c795ed3b780ee4eb8ea56d91e2501" + integrity sha512-Fvpi75ipK7XJEEVWxnEm5tol1bL6/LsBDIULQia1pSYqGDfnosYwkmRmNjhtIkhQTyDbbER9ZFypT+cwGS1mUw== + dependencies: + "@sentry/browser" "8.14.0" + "@sentry/core" "8.14.0" + "@sentry/types" "8.14.0" + "@sentry/utils" "8.14.0" + hoist-non-react-statics "^3.3.2" -"@sentry/react@8.10.0", "@sentry/react@^8.10.0": +"@sentry/react@^8.10.0": version "8.10.0" resolved "https://registry.yarnpkg.com/@sentry/react/-/react-8.10.0.tgz#2be8b01db4d178cc06d27a0325c75258db04822d" integrity sha512-Nwamhet8jeJWrRFJzLd08tyYgSbZOxZTQuDtyzU+EVkjzy2RVoYZUtYSHkopzg8MULz5MrI7BfrWFVSncDBNjA== @@ -1542,6 +1562,11 @@ resolved "https://registry.yarnpkg.com/@sentry/types/-/types-8.10.0.tgz#47119cb121cba38cc3654e7b79ac9014235132a9" integrity sha512-6kgh6NqgQHcnnD7dOe3THcVkzv2nor/f94x3odmPShN2AWBfPRprHZZsLTjh/3aC7l76V2nfuQ4wgRvwsddTWw== +"@sentry/types@8.14.0": + version "8.14.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-8.14.0.tgz#01705776836dc3acf490fcefde2b236cb2dc7d0e" + integrity sha512-RTXp96JPY3OM7Y3J8CaAYEkhosyTXrT/2uE7dTmPn1z7Oxunp8MYyyfSU4HtvDeMA3dxbI4dhNmXpfRyclV4Ew== + "@sentry/utils@8.10.0": version "8.10.0" resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-8.10.0.tgz#0947188bafdd343fffd9554de3604fdde4818ff7" @@ -1549,21 +1574,28 @@ dependencies: "@sentry/types" "8.10.0" -"@sentry/vercel-edge@8.10.0": - version "8.10.0" - resolved "https://registry.yarnpkg.com/@sentry/vercel-edge/-/vercel-edge-8.10.0.tgz#3f18d4a3ea2538f2bdafe44bad94eae6b10af819" - integrity sha512-m7FbEVwpVp9j+IkV2oG/bls2/Q1l32sM/fGqjwrYVsMdWeqfuBsFoZsGUjrNfbKDmX/N5Op+QG7KhdFPfGingQ== +"@sentry/utils@8.14.0": + version "8.14.0" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-8.14.0.tgz#5b58fb15e62e73504761b432ea274d8b48da1628" + integrity sha512-EWlBrYEqdgmDn/C8iRr+z2jSwUXOQL73NG+cbsJtGWSDGSmBLsGNPk2wgKq6U5Nu7Icyw2+10QbbqS5F1Q1bvQ== dependencies: - "@sentry/core" "8.10.0" - "@sentry/types" "8.10.0" - "@sentry/utils" "8.10.0" + "@sentry/types" "8.14.0" + +"@sentry/vercel-edge@8.14.0": + version "8.14.0" + resolved "https://registry.yarnpkg.com/@sentry/vercel-edge/-/vercel-edge-8.14.0.tgz#9b84b5d96b20f0bcf7b31f437087cc7d60934585" + integrity sha512-UEl0Wc+PAXb3qW6CHQ/UXPpbtwsmkAytrY3rwXAcF0iAwiSxxe5IeFNfKk5QpDbUzq65jv8aJaww7RicQEaG5A== + dependencies: + "@sentry/core" "8.14.0" + "@sentry/types" "8.14.0" + "@sentry/utils" "8.14.0" -"@sentry/webpack-plugin@2.18.0": - version "2.18.0" - resolved "https://registry.yarnpkg.com/@sentry/webpack-plugin/-/webpack-plugin-2.18.0.tgz#f0955d28b1271e9a8b6a2927ab98b1688d7b03e1" - integrity sha512-iQ5OCvuoaIanbq4GRqj4Azay86mVpa64pP9Oi3EJpaURGZNLqwE7bWq9tkr1Dr7zBPBZN7QBmLD3OOeOSzbHuA== +"@sentry/webpack-plugin@2.20.1": + version "2.20.1" + resolved "https://registry.yarnpkg.com/@sentry/webpack-plugin/-/webpack-plugin-2.20.1.tgz#285d325a0a1bd0a534126b97e0190da9486ff7f6" + integrity sha512-U6LzoE09Ndt0OCWROoRaZqqIHGxyMRdKpBhbqoBqyyfVwXN/zGW3I/cWZ1e8rreiKFj+2+c7+X0kOS+NGMTUrg== dependencies: - "@sentry/bundler-plugin-core" "2.18.0" + "@sentry/bundler-plugin-core" "2.20.1" unplugin "1.0.1" uuid "^9.0.0" @@ -3387,10 +3419,10 @@ cypress-recurse@^1.35.2: dependencies: humanize-duration "^3.27.3" -cypress@^13.7.0: - version "13.8.1" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-13.8.1.tgz#f558e51b770a409e2360031bbd36c3f4fb3f2db4" - integrity sha512-Uk6ovhRbTg6FmXjeZW/TkbRM07KPtvM5gah1BIMp4Y2s+i/NMxgaLw0+PbYTOdw1+egE0FP3mWRiGcRkjjmhzA== +cypress@^13.13.0: + version "13.13.0" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-13.13.0.tgz#52b2914c0c1c7d8a51ec2e3df18e13995da95951" + integrity sha512-ou/MQUDq4tcDJI2FsPaod2FZpex4kpIK43JJlcBgWrX8WX7R/05ZxGTuxedOuZBfxjZxja+fbijZGyxiLP6CFA== dependencies: "@cypress/request" "^3.0.0" "@cypress/xvfb" "^1.2.4" @@ -3431,7 +3463,7 @@ cypress@^13.7.0: request-progress "^3.0.0" semver "^7.5.3" supports-color "^8.1.1" - tmp "~0.2.1" + tmp "~0.2.3" untildify "^4.0.0" yauzl "^2.10.0" @@ -5127,26 +5159,6 @@ import-in-the-middle@1.4.2: cjs-module-lexer "^1.2.2" module-details-from-path "^1.0.3" -import-in-the-middle@1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/import-in-the-middle/-/import-in-the-middle-1.7.4.tgz#508da6e91cfa84f210dcdb6c0a91ab0c9e8b3ebc" - integrity sha512-Lk+qzWmiQuRPPulGQeK5qq0v32k2bHnWrRPFgqyvhw7Kkov5L6MOLOIU3pcWeujc9W4q54Cp3Q2WV16eQkc7Bg== - dependencies: - acorn "^8.8.2" - acorn-import-attributes "^1.9.5" - cjs-module-lexer "^1.2.2" - module-details-from-path "^1.0.3" - -import-in-the-middle@1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/import-in-the-middle/-/import-in-the-middle-1.8.0.tgz#c94d88d53701de9a248f9710b41f533e67f598a4" - integrity sha512-/xQjze8szLNnJ5rvHSzn+dcVXqCAU6Plbk4P24U/jwPmg1wy7IIp9OjKIO5tYue8GSPhDpPDiApQjvBUmWwhsQ== - dependencies: - acorn "^8.8.2" - acorn-import-attributes "^1.9.5" - cjs-module-lexer "^1.2.2" - module-details-from-path "^1.0.3" - import-in-the-middle@^1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/import-in-the-middle/-/import-in-the-middle-1.8.1.tgz#8b51c2cc631b64e53e958d7048d2d9463ce628f8" @@ -8230,7 +8242,7 @@ tiny-invariant@^1.3.1: resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.3.3.tgz#46680b7a873a0d5d10005995eb90a70d74d60127" integrity sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg== -tmp@~0.2.1: +tmp@~0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.3.tgz#eb783cc22bc1e8bebd0671476d46ea4eb32a79ae" integrity sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w== From 18ee4a412b79ff45b22435d589ce794ffe05a353 Mon Sep 17 00:00:00 2001 From: Florian Date: Mon, 8 Jul 2024 09:04:15 +0200 Subject: [PATCH 04/20] feat: add inputMode indication for inputs --- src/components/form/question/NumberInput.tsx | 1 + .../form/question/mosaic/mosaicQuestion/MosaicNumberInput.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/src/components/form/question/NumberInput.tsx b/src/components/form/question/NumberInput.tsx index 0982d2805..4fd187736 100644 --- a/src/components/form/question/NumberInput.tsx +++ b/src/components/form/question/NumberInput.tsx @@ -32,6 +32,7 @@ export default function NumberInput({ debounceTimeout={300} className={`focus:ring-primary max-w-[8rem] rounded-xl border-2 border-gray-200 bg-white p-2 text-right transition-colors focus:border-primary-700 focus:ring-2 md:max-w-full`} type="number" + inputMode="numeric" min={min} value={isMissing ? '' : value} placeholder={ diff --git a/src/components/form/question/mosaic/mosaicQuestion/MosaicNumberInput.tsx b/src/components/form/question/mosaic/mosaicQuestion/MosaicNumberInput.tsx index 2ae77ba84..c33461482 100644 --- a/src/components/form/question/mosaic/mosaicQuestion/MosaicNumberInput.tsx +++ b/src/components/form/question/mosaic/mosaicQuestion/MosaicNumberInput.tsx @@ -57,6 +57,7 @@ export default function NumberInput({ setValue(Number(event.target.value))} From 0a49f0a174bd1b2fe182d4026c7c83486c1f7899 Mon Sep 17 00:00:00 2001 From: Benjamin Arias Date: Mon, 8 Jul 2024 11:32:59 +0200 Subject: [PATCH 05/20] =?UTF-8?q?feat:=20Ajoute=20une=20couleur=20de=20th?= =?UTF-8?q?=C3=A8me=20VSCode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 -- .vscode/extensions.json | 7 +++++++ .vscode/settings.json | 19 +++++++++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 .vscode/extensions.json create mode 100644 .vscode/settings.json diff --git a/.gitignore b/.gitignore index 8c3631698..b837574ee 100644 --- a/.gitignore +++ b/.gitignore @@ -53,8 +53,6 @@ dist # Sentry Config File .sentryclirc -.vscode - # Build analysis /analyze diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 000000000..e59f42e07 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,7 @@ +{ + "recommendations": [ + "editorconfig.editorconfig", + "dbaeumer.vscode-eslint", + "vscode-icons-team.vscode-icons" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..53c193244 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,19 @@ +{ + "typescript.tsdk": "node_modules/typescript/lib", + "[typescript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[javascript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "files.associations": { + ".env*": "dotenv" + }, + "workbench.colorCustomizations": { + "editor.findMatchBackground": "#ffe900", + "editor.findMatchHighlightBackground": "#ff7b00a1", + "activityBar.background": "#296c36", + "titleBar.activeBackground": "#296c36", + "titleBar.activeForeground": "#FAF9FD" + } +} From 4415fd5c7c4d5b27de192a055c2cf9a91b17dfa9 Mon Sep 17 00:00:00 2001 From: Benjamin Arias Date: Mon, 8 Jul 2024 12:06:18 +0200 Subject: [PATCH 06/20] feat: Retire le bouton Partagez --- .../statisticsBlocks/ResultsSoonBanner.tsx | 34 ------------------- src/locales/ui/ui-fr.yaml | 3 -- 2 files changed, 37 deletions(-) diff --git a/src/components/organisations/orgaStatistics/statisticsBlocks/ResultsSoonBanner.tsx b/src/components/organisations/orgaStatistics/statisticsBlocks/ResultsSoonBanner.tsx index 8f19a32f5..0f8c7c5ac 100644 --- a/src/components/organisations/orgaStatistics/statisticsBlocks/ResultsSoonBanner.tsx +++ b/src/components/organisations/orgaStatistics/statisticsBlocks/ResultsSoonBanner.tsx @@ -2,40 +2,16 @@ import HourglassIcon from '@/components/icons/HourglassIcon' import Trans from '@/components/translation/Trans' -import { organisationsDashboardClickShortcutShare } from '@/constants/tracking/pages/organisationsDashboard' import Card from '@/design-system/layout/Card' import { useIsOrganisationAdmin } from '@/hooks/organisations/useIsOrganisationAdmin' -import { trackEvent } from '@/utils/matomo/trackEvent' -import { usePathname } from 'next/navigation' type Props = { hasLessThan3Participants: boolean } export default function ResultsSoonBanner({ hasLessThan3Participants }: Props) { - const pathname = usePathname() - const { isAdmin } = useIsOrganisationAdmin() - const isResultatsDetailles = pathname.includes('resultats-detailles') - - function handleScrollIntoView(id: string) { - const shareSection = document.getElementById(id) - - shareSection?.scrollIntoView({ - behavior: 'smooth', - block: 'center', - }) - - if (!shareSection) return - - shareSection.style.backgroundColor = '#E8DFEE' - - setTimeout(() => { - shareSection.style.backgroundColor = '#FFFFFF' - }, 700) - } - return (
@@ -71,16 +47,6 @@ export default function ResultsSoonBanner({ hasLessThan3Participants }: Props) { )}
- {!isResultatsDetailles && ( - - )}
) diff --git a/src/locales/ui/ui-fr.yaml b/src/locales/ui/ui-fr.yaml index 042c5ca84..929e15ffe 100644 --- a/src/locales/ui/ui-fr.yaml +++ b/src/locales/ui/ui-fr.yaml @@ -231,7 +231,6 @@ entries: Les personas nous servent à tester le simulateur sous toutes ses coutures, et à vérifier qu’il s’adapte bien à toutes les situations de vie des citoyens métropolitains. De par leur présence, ils nous forcent à penser à tous les cas d’usage, pour nous projeter dans différentes réalités, et inclure ces réalités dans nos refontes du parcours de test et des actions proposées à la fin de ce dernier.: Les personas nous servent à tester le simulateur sous toutes ses coutures, et à vérifier qu’il s’adapte bien à toutes les situations de vie des citoyens métropolitains. De par leur présence, ils nous forcent à penser à tous les cas d’usage, pour nous projeter dans différentes réalités, et inclure ces réalités dans nos refontes du parcours de test et des actions proposées à la fin de ce dernier. Logo de l'Association pour la transition Bas Carbone: Logo de l'Association pour la transition Bas Carbone Mes réponses: Mes réponses - Oups! Cette page n'existe pas ou n'existe plus: Oups! Cette page n'existe pas ou n'existe plus Passer en français: Passer en français Plus d'information à ce sujet: Plus d'information à ce sujet publicodes.Tutoriel.slide1.p1: Le climat se réchauffe à cause des activités humaines, c'est un fait. Tout ce que nous consommons, utilisons, puis jetons a nécessité de la matière et de l'énergie. Que ce soit pour la phase de production, d'utilisation, ou de fin de vie du bien, ou du service. Ainsi, toutes nos activités participent à émettre des gaz à effet de serre. Certaines énormément, d'autres très peu. Mais quel est notre impact, à notre échelle de citoyen ? @@ -472,7 +471,6 @@ entries: Envie de connaître votre empreinte carbone ?: Envie de connaître votre empreinte carbone ? Vous avez déjà commencé le test Nos Gestes Climat !: Vous avez déjà commencé le test Nos Gestes Climat ! Vous avez déjà réalisé le test Nos Gestes Climat !: Vous avez déjà réalisé le test Nos Gestes Climat ! - Propulsé par Vercel: Propulsé par Vercel Au total: Au total C’est bien cette distance qui sera comptabilisée en fin de test.: C’est bien cette distance qui sera comptabilisée en fin de test. km sont parcourus par an, avec en moyenne: km sont parcourus par an, avec en moyenne @@ -548,7 +546,6 @@ entries: Consultez les nouvelles fonctionnalités et dernières nouvelles de Nos Gestes Climat.: Consultez les nouvelles fonctionnalités et dernières nouvelles de Nos Gestes Climat. Contact - Nos Gestes Climat: Contact - Nos Gestes Climat Contactez l'équipe de Nos Gestes Climat.: Contactez l'équipe de Nos Gestes Climat. - Créer un groupe et calculer notre empreinte carbone - Nos Gestes Climat: Créer un groupe et calculer notre empreinte carbone - Nos Gestes Climat Découvrez comment nous utilisons vos données personnelles pour vous proposer un simulateur de bilan carbone personnel.: Découvrez comment nous utilisons vos données personnelles pour vous proposer un simulateur de bilan carbone personnel. Découvrez le modèle de données de notre simulateur d'empreinte climat: Découvrez le modèle de données de notre simulateur d'empreinte climat Découvrez les actions que vous pouvez mettre en place pour réduire votre empreinte carbone.: Découvrez les actions que vous pouvez mettre en place pour réduire votre empreinte carbone. From 1f890eb6b060fc734bff31f6a1f6dd91a50f6e96 Mon Sep 17 00:00:00 2001 From: Benjamin Arias Date: Tue, 9 Jul 2024 12:06:41 +0200 Subject: [PATCH 07/20] chore: Retire lien mort --- .../(layout-with-navigation)/(pages-statiques)/modele/page.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/(layout-with-navigation)/(pages-statiques)/modele/page.tsx b/src/app/(layout-with-navigation)/(pages-statiques)/modele/page.tsx index 88e5be794..01f70f932 100644 --- a/src/app/(layout-with-navigation)/(pages-statiques)/modele/page.tsx +++ b/src/app/(layout-with-navigation)/(pages-statiques)/modele/page.tsx @@ -38,7 +38,6 @@ export default async function ModelePage() { Entièrement ouvert (open source) et contributif, chacun peut l' explorer,{' '} - donner son avis,{' '} l'améliorer From 7b3aa7a8cc3d9766b82740f5bad52fec5b4f9330 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment?= Date: Tue, 9 Jul 2024 14:37:06 +0200 Subject: [PATCH 08/20] feat: back to previous layout --- src/components/form/Question.tsx | 11 +---------- src/components/specialQuestions/Plats.tsx | 7 ++----- .../specialQuestions/plats/DishesNumber.tsx | 15 --------------- 3 files changed, 3 insertions(+), 30 deletions(-) delete mode 100644 src/components/specialQuestions/plats/DishesNumber.tsx diff --git a/src/components/form/Question.tsx b/src/components/form/Question.tsx index 2ef5c5363..7883b77b5 100644 --- a/src/components/form/Question.tsx +++ b/src/components/form/Question.tsx @@ -25,15 +25,9 @@ type Props = { question: string tempValue?: number | undefined setTempValue?: (value: number | undefined) => void - children?: React.ReactNode } -export default function Question({ - question, - tempValue, - setTempValue, - children, -}: Props) { +export default function Question({ question, tempValue, setTempValue }: Props) { const { type, label, @@ -81,9 +75,6 @@ export default function Question({ }} /> - {/* This is a temporary hack to show `alimentation . plats` question info inside Question component */} - {children} - {type === 'number' && ( - - {!isMissing ? : null} - - + + {!isMissing ? : null} ) } diff --git a/src/components/specialQuestions/plats/DishesNumber.tsx b/src/components/specialQuestions/plats/DishesNumber.tsx deleted file mode 100644 index 5a3aa2e07..000000000 --- a/src/components/specialQuestions/plats/DishesNumber.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { useRule } from '@/publicodes-state' - -export default function DishesNumber() { - const { numericValue: totalNumberOfPlats } = useRule( - 'ui . nombre de repas par semaine' - ) - - return ( - <> -
- {totalNumberOfPlats} / 14 repas -
- - ) -} From 55ce9c0f6597c667efd1782c46cf0d802948aeed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment?= Date: Tue, 9 Jul 2024 14:40:05 +0200 Subject: [PATCH 09/20] feat: traduction --- src/locales/ui/ui-en.yaml | 2 ++ src/locales/ui/ui-es.yaml | 2 ++ src/locales/ui/ui-fr.yaml | 7 ++----- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/locales/ui/ui-en.yaml b/src/locales/ui/ui-en.yaml index d9fc705dc..bd7e138ff 100644 --- a/src/locales/ui/ui-en.yaml +++ b/src/locales/ui/ui-en.yaml @@ -1038,3 +1038,5 @@ entries: La simulation et les calculs se font dans votre navigateur Web, donc les réponses aux questions restent chez vous, nous n'en collectons aucune.: The simulation and calculations are done in your web browser, so the answers to the questions stay with you, we don't collect any of them. Un bonhomme se demandant où il est: A man wondering where he is Rien à l'horizon ! <1>La page recherchée n'existe pas.: Nothing on the horizon! <1>The page you are looking for does not exist. + Vous avez sélectionné: You have selected + sur les 14 habituels: out of the usual 14 diff --git a/src/locales/ui/ui-es.yaml b/src/locales/ui/ui-es.yaml index 0b5fb11c0..ca642fcc0 100644 --- a/src/locales/ui/ui-es.yaml +++ b/src/locales/ui/ui-es.yaml @@ -1031,3 +1031,5 @@ entries: Pour le retrouver facilement dans votre liste: Para encontrarlo fácilmente en su lista Un bonhomme se demandant où il est: Un hombre preguntándose dónde está Rien à l'horizon ! <1>La page recherchée n'existe pas.: Nada en el horizonte <1>La página que busca no existe. + sur les 14 habituels: de los 14 habituales + Vous avez sélectionné: Ha seleccionado diff --git a/src/locales/ui/ui-fr.yaml b/src/locales/ui/ui-fr.yaml index 042c5ca84..2adce7aa1 100644 --- a/src/locales/ui/ui-fr.yaml +++ b/src/locales/ui/ui-fr.yaml @@ -231,7 +231,6 @@ entries: Les personas nous servent à tester le simulateur sous toutes ses coutures, et à vérifier qu’il s’adapte bien à toutes les situations de vie des citoyens métropolitains. De par leur présence, ils nous forcent à penser à tous les cas d’usage, pour nous projeter dans différentes réalités, et inclure ces réalités dans nos refontes du parcours de test et des actions proposées à la fin de ce dernier.: Les personas nous servent à tester le simulateur sous toutes ses coutures, et à vérifier qu’il s’adapte bien à toutes les situations de vie des citoyens métropolitains. De par leur présence, ils nous forcent à penser à tous les cas d’usage, pour nous projeter dans différentes réalités, et inclure ces réalités dans nos refontes du parcours de test et des actions proposées à la fin de ce dernier. Logo de l'Association pour la transition Bas Carbone: Logo de l'Association pour la transition Bas Carbone Mes réponses: Mes réponses - Oups! Cette page n'existe pas ou n'existe plus: Oups! Cette page n'existe pas ou n'existe plus Passer en français: Passer en français Plus d'information à ce sujet: Plus d'information à ce sujet publicodes.Tutoriel.slide1.p1: Le climat se réchauffe à cause des activités humaines, c'est un fait. Tout ce que nous consommons, utilisons, puis jetons a nécessité de la matière et de l'énergie. Que ce soit pour la phase de production, d'utilisation, ou de fin de vie du bien, ou du service. Ainsi, toutes nos activités participent à émettre des gaz à effet de serre. Certaines énormément, d'autres très peu. Mais quel est notre impact, à notre échelle de citoyen ? @@ -472,7 +471,6 @@ entries: Envie de connaître votre empreinte carbone ?: Envie de connaître votre empreinte carbone ? Vous avez déjà commencé le test Nos Gestes Climat !: Vous avez déjà commencé le test Nos Gestes Climat ! Vous avez déjà réalisé le test Nos Gestes Climat !: Vous avez déjà réalisé le test Nos Gestes Climat ! - Propulsé par Vercel: Propulsé par Vercel Au total: Au total C’est bien cette distance qui sera comptabilisée en fin de test.: C’est bien cette distance qui sera comptabilisée en fin de test. km sont parcourus par an, avec en moyenne: km sont parcourus par an, avec en moyenne @@ -548,7 +546,6 @@ entries: Consultez les nouvelles fonctionnalités et dernières nouvelles de Nos Gestes Climat.: Consultez les nouvelles fonctionnalités et dernières nouvelles de Nos Gestes Climat. Contact - Nos Gestes Climat: Contact - Nos Gestes Climat Contactez l'équipe de Nos Gestes Climat.: Contactez l'équipe de Nos Gestes Climat. - Créer un groupe et calculer notre empreinte carbone - Nos Gestes Climat: Créer un groupe et calculer notre empreinte carbone - Nos Gestes Climat Découvrez comment nous utilisons vos données personnelles pour vous proposer un simulateur de bilan carbone personnel.: Découvrez comment nous utilisons vos données personnelles pour vous proposer un simulateur de bilan carbone personnel. Découvrez le modèle de données de notre simulateur d'empreinte climat: Découvrez le modèle de données de notre simulateur d'empreinte climat Découvrez les actions que vous pouvez mettre en place pour réduire votre empreinte carbone.: Découvrez les actions que vous pouvez mettre en place pour réduire votre empreinte carbone. @@ -602,8 +599,6 @@ entries: Ce test vous est proposé par: Ce test vous est proposé par En participant vous acceptez que vos résultats sont partagés anonymement avec cette organisation.: En participant vous acceptez que vos résultats sont partagés anonymement avec cette organisation. par semaine, miam: par semaine, miam - par semaine, quel appétit !: par semaine, quel appétit ! - par semaine, quel appétit de moineau: par semaine, quel appétit de moineau repas: repas Cambiar a español: Cambiar a español Passer le test →: Passer le test → @@ -858,3 +853,5 @@ entries: Veuillez saisir une adresse email valide.: Veuillez saisir une adresse email valide. Rien à l'horizon ! <1>La page recherchée n'existe pas.: Rien à l'horizon ! <1>La page recherchée n'existe pas. Un bonhomme se demandant où il est: Un bonhomme se demandant où il est + sur les 14 habituels: sur les 14 habituels + Vous avez sélectionné: Vous avez sélectionné From 6f0a2a06e8fca75c12d1f47b53f809bddf4e9b8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment?= Date: Wed, 10 Jul 2024 14:45:39 +0200 Subject: [PATCH 10/20] fix: test e2e with quiz --- cypress/e2e/integration/pages/groupes.cy.js | 34 ++++++++++++++++++- .../quiz/_components/Navigation.tsx | 1 + 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/cypress/e2e/integration/pages/groupes.cy.js b/cypress/e2e/integration/pages/groupes.cy.js index 19a89f221..601d97e99 100644 --- a/cypress/e2e/integration/pages/groupes.cy.js +++ b/cypress/e2e/integration/pages/groupes.cy.js @@ -35,6 +35,22 @@ describe('The Group creation page /amis/creer', () => { recursivelyFillSimulation(null, 'group') + cy.wait(2000) + + cy.get('h1').then(($el) => { + if ( + $el + .text() + .includes( + Cypress.env('testLangURL') === 'en' + ? "Let's finish with a riddle!" + : 'Une devinette pour finir !' + ) + ) { + cy.get('[data-cypress-id="button-skip-quiz"]').click() + } + }) + cy.wait(4000) cy.get('[data-cypress-id="group-name"]') @@ -94,7 +110,23 @@ describe('The Group creation page /amis/creer', () => { clickSkipTutorialButton() recursivelyFillSimulation(null, 'group') - cy.wait(3000) + cy.wait(2000) + + cy.get('h1').then(($el) => { + if ( + $el + .text() + .includes( + Cypress.env('testLangURL') === 'en' + ? "Let's finish with a riddle!" + : 'Une devinette pour finir !' + ) + ) { + cy.get('[data-cypress-id="button-skip-quiz"]').click() + } + }) + + cy.wait(4000) cy.get('[data-cypress-id="group-name"]') diff --git a/src/app/(layout-with-navigation)/(simulation)/quiz/_components/Navigation.tsx b/src/app/(layout-with-navigation)/(simulation)/quiz/_components/Navigation.tsx index f8dca1719..5b8e83b7e 100644 --- a/src/app/(layout-with-navigation)/(simulation)/quiz/_components/Navigation.tsx +++ b/src/app/(layout-with-navigation)/(simulation)/quiz/_components/Navigation.tsx @@ -50,6 +50,7 @@ export default function Navigation({ href={getLinkToEndPage({ allowedToGoToGroupDashboard: true, })} + data-cypress-id="button-skip-quiz" onClick={() => { trackEvent( simulationSimulationCompleted({ bilan: getNumericValue('bilan') }) From 4c0f3dfa6db1988a7586efdfec54cc8930614611 Mon Sep 17 00:00:00 2001 From: Benjamin Arias Date: Thu, 11 Jul 2024 11:40:49 +0200 Subject: [PATCH 11/20] Update Select.tsx --- src/design-system/inputs/Select.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/design-system/inputs/Select.tsx b/src/design-system/inputs/Select.tsx index 86436e049..9af2c76a8 100644 --- a/src/design-system/inputs/Select.tsx +++ b/src/design-system/inputs/Select.tsx @@ -53,7 +53,7 @@ export default forwardRef(function Select(