Skip to content

Commit

Permalink
fix: temp
Browse files Browse the repository at this point in the history
  • Loading branch information
jonat75 committed Jan 8, 2025
1 parent edba05e commit 5d4fe29
Show file tree
Hide file tree
Showing 9 changed files with 6,291 additions and 4,965 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"[typescript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
Expand Down
23 changes: 17 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,22 @@
"test:api": "cd packages/api && EGAPRO_DBPORT=5436 EGAPRO_DBNAME=test_egapro ./venv/bin/py.test -vv --cov"
},
"devDependencies": {
"@semantic-release/changelog": "^6.0.2",
"@semantic-release/git": "^10.0.1",
"@socialgouv/releaserc": "^1.1.1",
"concurrently": "^8.2.0",
"semantic-release": "^19"
"@semantic-release/changelog": "*",
"@semantic-release/git": "*",
"@socialgouv/releaserc": "*",
"@testing-library/dom": "^10.4.0",
"concurrently": "*",
"eslint": "^8.0.0",
"next": "^14.0.4",
"semantic-release": "*",
"webpack": "^5.97.1"
},
"packageManager": "[email protected]"
"packageManager": "[email protected]",
"dependencies": {
"@sentry/profiling-node": "^8.47.0",
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
}
2 changes: 1 addition & 1 deletion packages/app/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
/// <reference types="next/navigation-types/compat/navigation" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
178 changes: 89 additions & 89 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,96 +19,96 @@
"migrateSimulations": "ts-node --project scripts/tsconfig.json scripts/sql-scripts/migrate-simulations.ts"
},
"dependencies": {
"@codegouvfr/react-dsfr": "patch:@codegouvfr/react-dsfr@npm%3A0.78.2#~/.yarn/patches/@codegouvfr-react-dsfr-npm-0.78.2-9b92c7917d.patch",
"@formkit/auto-animate": "^0.8.0",
"@hookform/resolvers": "^3.1.1",
"@json2csv/node": "^7.0.1",
"@octokit/rest": "^20.0.2",
"@react-pdf/renderer": "^3.1.12",
"@sentry/nextjs": "^7.92.0",
"@socialgouv/matomo-next": "^1.8.0",
"chart.js": "^4.3.0",
"chartjs-plugin-datalabels": "^2.2.0",
"clsx": "^2.0.0",
"cors": "^2.8.5",
"date-fns": "^2.29.3",
"http-status-codes": "^2.3.0",
"i18next": "^23.5.1",
"immer": "^10.0.2",
"js-xlsx": "^0.8.22",
"jsonwebtoken": "^9.0.1",
"lodash": "^4.17.21",
"lru-cache": "^10.0.0",
"mime": "^3.0.0",
"moize": "^6.1.3",
"next": "14.0.4",
"next-auth": "^4.24.5",
"nodemailer": "^6.8.0",
"pg": "^8.8.0",
"pino": "^8.17.2",
"pino-pretty": "^10.3.1",
"postgres": "^3.3.2",
"react": "^18.2.0",
"react-chartjs-2": "^5.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.46.2",
"react-json-view": "^1.21.3",
"react-tooltip": "^5.24.0",
"server-only": "^0.0.1",
"sharp": "^0.32.6",
"simple-zustand-devtools": "^1.1.0",
"swr": "^2.2.4",
"swr-devtools": "^1.3.2",
"tiny-invariant": "^1.3.1",
"use-debounce": "^9.0.4",
"uuid": "^9.0.1",
"xlsx": "^0.18.5",
"zod": "^3.21.4",
"zod-i18n-map": "^2.19.0",
"zustand": "^4.3.7"
"@codegouvfr/react-dsfr": "^1.16.4",
"@formkit/auto-animate": "*",
"@hookform/resolvers": "*",
"@json2csv/node": "*",
"@octokit/rest": "*",
"@react-pdf/renderer": "*",
"@sentry/nextjs": "8.47.0",
"@socialgouv/matomo-next": "*",
"chart.js": "*",
"chartjs-plugin-datalabels": "*",
"clsx": "*",
"cors": "*",
"date-fns": "*",
"http-status-codes": "*",
"i18next": "*",
"immer": "*",
"js-xlsx": "*",
"jsonwebtoken": "*",
"lodash": "*",
"lru-cache": "*",
"mime": "*",
"moize": "*",
"next": "^14.0.4",
"next-auth": "*",
"nodemailer": "*",
"pg": "*",
"pino": "*",
"pino-pretty": "*",
"postgres": "*",
"react": "*",
"react-chartjs-2": "*",
"react-dom": "*",
"react-hook-form": "*",
"react-json-view": "*",
"react-tooltip": "*",
"server-only": "*",
"sharp": "*",
"simple-zustand-devtools": "*",
"swr": "*",
"swr-devtools": "*",
"tiny-invariant": "*",
"use-debounce": "*",
"uuid": "*",
"xlsx": "*",
"zod": "*",
"zod-i18n-map": "*",
"zustand": "*"
},
"devDependencies": {
"@babel/core": "^7.23.0",
"@faker-js/faker": "^8.1.0",
"@hookform/devtools": "^4.3.0",
"@next/eslint-plugin-next": "14.0.0",
"@testing-library/jest-dom": "^6.1.4",
"@testing-library/react": "^14.1.2",
"@tsconfig/next": "^2.0.0",
"@tsconfig/node16": "^16.1.0",
"@types/cors": "^2.8.13",
"@types/dotenv": "^8.2.0",
"@types/jest": "^29.5.9",
"@types/jsonwebtoken": "^9.0.3",
"@types/mime": "^3.0.1",
"@types/node": "^20.7.0",
"@types/nodemailer": "^6.4.11",
"@types/pg": "^8.10.3",
"@types/qs": "^6.9.7",
"@types/react": "^18.2.23",
"@types/react-dom": "^18.2.8",
"@types/uuid": "^9.0.4",
"@typescript-eslint/eslint-plugin": "^6.7.3",
"@typescript-eslint/parser": "^6.7.2",
"babel-loader": "^9.1.3",
"concurrently": "^8.2.0",
"cypress": "^13.6.0",
"dotenv": "^16.0.1",
"eslint": "^8.50.0",
"eslint-config-next": "^14.0.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-lodash": "^7.4.0",
"eslint-plugin-prettier": "^5.0.0-alpha.1",
"eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-typescript-sort-keys": "^3.0.0",
"eslint-plugin-unused-imports": "^3.0.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"json-schema-to-typescript": "^12.0.0",
"prettier": "^3.0.0",
"sass": "^1.68.0",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.1.6"
"@babel/core": "*",
"@faker-js/faker": "*",
"@hookform/devtools": "*",
"@next/eslint-plugin-next": "*",
"@testing-library/jest-dom": "*",
"@testing-library/react": "*",
"@tsconfig/next": "*",
"@tsconfig/node16": "*",
"@types/cors": "*",
"@types/dotenv": "*",
"@types/jest": "*",
"@types/jsonwebtoken": "*",
"@types/mime": "*",
"@types/node": "*",
"@types/nodemailer": "*",
"@types/pg": "*",
"@types/qs": "*",
"@types/react": "*",
"@types/react-dom": "*",
"@types/uuid": "*",
"@typescript-eslint/eslint-plugin": "*",
"@typescript-eslint/parser": "*",
"babel-loader": "*",
"concurrently": "*",
"cypress": "*",
"dotenv": "*",
"eslint": "*",
"eslint-config-next": "*",
"eslint-config-prettier": "*",
"eslint-plugin-lodash": "*",
"eslint-plugin-prettier": "*",
"eslint-plugin-simple-import-sort": "*",
"eslint-plugin-typescript-sort-keys": "*",
"eslint-plugin-unused-imports": "*",
"jest": "*",
"jest-environment-jsdom": "*",
"json-schema-to-typescript": "*",
"prettier": "*",
"sass": "*",
"ts-node": "*",
"tsconfig-paths": "*",
"typescript": "*"
}
}
41 changes: 25 additions & 16 deletions packages/app/sentry.client.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,38 @@
// https://docs.sentry.io/platforms/javascript/guides/nextjs/

import * as Sentry from "@sentry/nextjs";
import { browserTracingIntegration, browserProfilingIntegration, replayIntegration } from "@sentry/nextjs";
import { commonConfig } from "./sentry.config.common";

Sentry.init({
dsn: "https://[email protected]/99",
environment: process.env.EGAPRO_ENV || "dev",
// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 0.1,
...commonConfig,

// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
// Session Replay configuration
replaysOnErrorSampleRate: process.env.NODE_ENV === "production" ? 0.1 : 1.0,
replaysSessionSampleRate: process.env.NODE_ENV === "production" ? 0.1 : 1.0,

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: [
// eslint-disable-next-line import/namespace
new Sentry.Replay({
// Additional Replay configuration goes in here, for example:
replayIntegration({
// Privacy settings
maskAllText: true,
blockAllMedia: true,
maskAllInputs: true,

// Network
networkDetailAllowUrls: [
// Add allowed URLs for network capturing
"https://api.egapro.fabrique.social.gouv.fr",
],
networkRequestHeaders: ["method", "referrer"],
networkResponseHeaders: ["content-type", "content-length"],
}),
browserTracingIntegration(),
browserProfilingIntegration(),
],
tracePropagationTargets: [
"localhost",
"egapro.fabrique.social.gouv.fr",
],
// Enable profiling
profilesSampleRate: process.env.NODE_ENV === "production" ? 0.1 : 1.0,
});
16 changes: 0 additions & 16 deletions packages/app/sentry.edge.config.ts

This file was deleted.

30 changes: 24 additions & 6 deletions packages/app/sentry.server.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,32 @@
// https://docs.sentry.io/platforms/javascript/guides/nextjs/

import * as Sentry from "@sentry/nextjs";
import { commonConfig } from "./sentry.config.common";

Sentry.init({
dsn: "https://[email protected]/99",
environment: process.env.EGAPRO_ENV || "dev",
...commonConfig,

// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 0.1,
// Server-specific settings
integrations: [
Sentry.httpIntegration(),
Sentry.expressIntegration(),
Sentry.onUncaughtExceptionIntegration(),
Sentry.onUnhandledRejectionIntegration()
],

// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
// Additional server configuration
autoSessionTracking: true,
serverName: process.env.HOSTNAME,

// Specific sampling for server-side
tracesSampler: (samplingContext) => {
// Adjust sampling based on the operation
if (samplingContext.transactionContext?.name?.includes("healthcheck")) {
return 0.0; // Don't sample healthchecks
}
if (samplingContext.transactionContext?.name?.includes("/api/")) {
return 0.5; // Sample 50% of API calls
}
return 0.1; // Default sample rate
},
});
2 changes: 2 additions & 0 deletions packages/app/src/app/(default)/login/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client";

import { authConfig } from "@api/core-domain/infra/auth/config";
import Alert from "@codegouvfr/react-dsfr/Alert";
import { config } from "@common/config";
Expand Down
Loading

0 comments on commit 5d4fe29

Please sign in to comment.