From 6ccc06bf663df9666788529128947e299b809ae8 Mon Sep 17 00:00:00 2001 From: Nicolas Burtey Date: Wed, 30 Oct 2024 16:07:05 -0700 Subject: [PATCH] chore: cleanup package --- apps/admin-panel/next.config.mjs | 9 +++ apps/admin-panel/package.json | 10 ++- apps/admin-panel/pnpm-lock.yaml | 119 +++++++++++++++++++++++-------- apps/admin-panel/tsconfig.json | 24 +++++-- 4 files changed, 124 insertions(+), 38 deletions(-) diff --git a/apps/admin-panel/next.config.mjs b/apps/admin-panel/next.config.mjs index e268e6704..d93da67e6 100644 --- a/apps/admin-panel/next.config.mjs +++ b/apps/admin-panel/next.config.mjs @@ -9,6 +9,15 @@ const nextConfig = { }, experimental: { instrumentationHook: true, + turbo: { + enabled: true, + rules: { + "**/*.svg": { + loaders: ["@svgr/webpack"], + as: "default", + }, + }, + }, }, output: "standalone", basePath: process.env.BASE_PATH, diff --git a/apps/admin-panel/package.json b/apps/admin-panel/package.json index d35d30af1..b25c00292 100644 --- a/apps/admin-panel/package.json +++ b/apps/admin-panel/package.json @@ -6,7 +6,7 @@ "node": "20" }, "scripts": { - "dev": "next dev --port 3001", + "dev": "next dev --turbo --port 3001", "build": "next build", "start": "next start", "lint": "next lint", @@ -31,14 +31,21 @@ "@t3-oss/env-nextjs": "^0.10.1", "apollo-upload-client": "^18.0.1", "axios": "^1.7.2", + "chart.js": "^4.4.6", + "class-variance-authority": "^0.7.0", + "clsx": "^2.1.1", "next": "14.2.10", "next-auth": "^4.24.3", + "nodemailer": "^6.9.16", "pg": "^8.12.0", "react": "18", "react-chartjs-2": "^5.2.0", "react-dom": "18", "react-dropzone": "^14.2.3", "react-icons": "^5.2.1", + "sonner": "^1.5.0", + "tailwind-merge": "^2.5.4", + "tailwindcss-animate": "^1.0.7", "zod": "^3.23.8" }, "devDependencies": { @@ -59,7 +66,6 @@ "@storybook/test": "^8.1.3", "@svgr/webpack": "^8.1.0", "@types/apollo-upload-client": "^18.0.0", - "@types/axios": "^0.14.0", "@types/node": "20", "@types/pg": "^8.11.6", "@types/react": "18", diff --git a/apps/admin-panel/pnpm-lock.yaml b/apps/admin-panel/pnpm-lock.yaml index 901a7d5f3..25169e268 100644 --- a/apps/admin-panel/pnpm-lock.yaml +++ b/apps/admin-panel/pnpm-lock.yaml @@ -50,12 +50,24 @@ importers: axios: specifier: ^1.7.2 version: 1.7.2 + chart.js: + specifier: ^4.4.6 + version: 4.4.6 + class-variance-authority: + specifier: ^0.7.0 + version: 0.7.0 + clsx: + specifier: ^2.1.1 + version: 2.1.1 next: specifier: 14.2.10 version: 14.2.10(@babel/core@7.24.7)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) next-auth: specifier: ^4.24.3 - version: 4.24.7(next@14.2.10(@babel/core@7.24.7)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(nodemailer@6.9.14)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 4.24.7(next@14.2.10(@babel/core@7.24.7)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(nodemailer@6.9.16)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + nodemailer: + specifier: ^6.9.16 + version: 6.9.16 pg: specifier: ^8.12.0 version: 8.12.0 @@ -64,7 +76,7 @@ importers: version: 18.3.1 react-chartjs-2: specifier: ^5.2.0 - version: 5.2.0(chart.js@4.4.4)(react@18.3.1) + version: 5.2.0(chart.js@4.4.6)(react@18.3.1) react-dom: specifier: '18' version: 18.3.1(react@18.3.1) @@ -74,6 +86,15 @@ importers: react-icons: specifier: ^5.2.1 version: 5.2.1(react@18.3.1) + sonner: + specifier: ^1.5.0 + version: 1.5.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + tailwind-merge: + specifier: ^2.5.4 + version: 2.5.4 + tailwindcss-animate: + specifier: ^1.0.7 + version: 1.0.7(tailwindcss@3.4.4) zod: specifier: ^3.23.8 version: 3.23.8 @@ -129,9 +150,6 @@ importers: '@types/apollo-upload-client': specifier: ^18.0.0 version: 18.0.0(@types/react@18.3.3)(graphql-ws@5.16.0(graphql@16.8.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@types/axios': - specifier: ^0.14.0 - version: 0.14.0 '@types/node': specifier: '20' version: 20.14.2 @@ -318,6 +336,10 @@ packages: resolution: {integrity: sha512-Rq76wjt7yz9AAc1KnlRKNAi/dMSVWgDRx43FHoJEbcYU6xOWaE2dVPwcdTukJrjxS65GITyfbvEYHvkirZ6uEg==} engines: {node: '>=6.9.0'} + '@babel/helper-plugin-utils@7.25.9': + resolution: {integrity: sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw==} + engines: {node: '>=6.9.0'} + '@babel/helper-remap-async-to-generator@7.24.7': resolution: {integrity: sha512-9pKLcTlZ92hNZMQfGCHImUpDOlAgkkpqalWEeftW5FBya75k8Li2ilerxkM/uBEj01iBZXcCIB/bwvDYgWyibA==} engines: {node: '>=6.9.0'} @@ -762,8 +784,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-react-constant-elements@7.24.7': - resolution: {integrity: sha512-7LidzZfUXyfZ8/buRW6qIIHBY8wAZ1OrY9c/wTr8YhZ6vMPo+Uc/CVFLYY1spZrEQlD4w5u8wjqk5NQ3OVqQKA==} + '@babel/plugin-transform-react-constant-elements@7.25.9': + resolution: {integrity: sha512-Ncw2JFsJVuvfRsa2lSHiC55kETQVLSnsYGQ1JDDwkUeWGTL/8Tom8aLTnlqgoeuopWrbbGndrc9AlLYrIosrow==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -2598,10 +2620,6 @@ packages: '@types/aria-query@5.0.4': resolution: {integrity: sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==} - '@types/axios@0.14.0': - resolution: {integrity: sha512-KqQnQbdYE54D7oa/UmYVMZKq7CO4l8DEENzOKc4aBRwxCXSlJXGz83flFx5L7AWrOQnmuN3kVsRdt+GZPPjiVQ==} - deprecated: This is a stub types definition for axios (https://github.com/mzabriskie/axios). axios provides its own type definitions, so you don't need @types/axios installed! - '@types/babel__core@7.20.5': resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} @@ -3426,8 +3444,8 @@ packages: chardet@0.7.0: resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} - chart.js@4.4.4: - resolution: {integrity: sha512-emICKGBABnxhMjUjlYRR12PmOXhJ2eJjEHL2/dZlWjxRAZT1D8xplLFq5M0tMQK8ja+wBS/tuVEJB5C6r7VxJA==} + chart.js@4.4.6: + resolution: {integrity: sha512-8Y406zevUPbbIBA/HRk33khEmQPk5+cxeflWE/2rx1NJsjVWMPw/9mSP9rxHP5eqi6LNoPBVMfZHxbwLSgldYA==} engines: {pnpm: '>=8'} check-error@1.0.3: @@ -3469,6 +3487,9 @@ packages: cjs-module-lexer@1.3.1: resolution: {integrity: sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q==} + class-variance-authority@0.7.0: + resolution: {integrity: sha512-jFI8IQw4hczaL4ALINxqLEXQbWcNjoSkloa4IaufXCJr6QawJyw7tuRysRsrE8w2p/4gGaxKIt/hX3qz/IbD1A==} + clean-css@5.3.3: resolution: {integrity: sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg==} engines: {node: '>= 10.0'} @@ -3515,6 +3536,14 @@ packages: resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} engines: {node: '>=0.8'} + clsx@2.0.0: + resolution: {integrity: sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==} + engines: {node: '>=6'} + + clsx@2.1.1: + resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} + engines: {node: '>=6'} + color-convert@1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} @@ -5448,8 +5477,8 @@ packages: node-releases@2.0.14: resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} - nodemailer@6.9.14: - resolution: {integrity: sha512-Dobp/ebDKBvz91sbtRKhcznLThrKxKt97GI2FAlAyy+fk19j73Uz3sBXolVtmcXjaorivqsbbbjDY+Jkt4/bQA==} + nodemailer@6.9.16: + resolution: {integrity: sha512-psAuZdTIRN08HKVd/E8ObdV6NO7NTBY3KsC30F7M4H1OnmLCUNaS56FpYxyb26zWLSyYF9Ozch9KYHhHegsiOQ==} engines: {node: '>=6.0.0'} normalize-package-data@2.5.0: @@ -6489,6 +6518,12 @@ packages: snake-case@3.0.4: resolution: {integrity: sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==} + sonner@1.5.0: + resolution: {integrity: sha512-FBjhG/gnnbN6FY0jaNnqZOMmB73R+5IiyYAw8yBj7L54ER7HB3fOSE5OFiQiE2iXWxeXKvg6fIP4LtVppHEdJA==} + peerDependencies: + react: ^18.0.0 + react-dom: ^18.0.0 + source-map-js@1.2.0: resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==} engines: {node: '>=0.10.0'} @@ -6680,6 +6715,14 @@ packages: resolution: {integrity: sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==} engines: {node: ^14.18.0 || >=16.0.0} + tailwind-merge@2.5.4: + resolution: {integrity: sha512-0q8cfZHMu9nuYP/b5Shb7Y7Sh1B7Nnl5GqNr1U+n2p6+mybvRtayrQ+0042Z5byvTA8ihjlP8Odo8/VnHbZu4Q==} + + tailwindcss-animate@1.0.7: + resolution: {integrity: sha512-bl6mpH3T7I3UFxuvDEXLxy/VuFxBk5bbzplh7tXI68mwMokNYd1t9qPBHlnyTwfa4JGC4zP516I1hYYtQ/vspA==} + peerDependencies: + tailwindcss: '>=3.0.0 || insiders' + tailwindcss@3.4.4: resolution: {integrity: sha512-ZoyXOdJjISB7/BcLTR6SEsLgKtDStYyYZVLsUtWChO4Ps20CBad7lfJKVDiejocV4ME1hLmyY0WJE3hSDcmQ2A==} engines: {node: '>=14.0.0'} @@ -7448,6 +7491,8 @@ snapshots: '@babel/helper-plugin-utils@7.24.7': {} + '@babel/helper-plugin-utils@7.25.9': {} + '@babel/helper-remap-async-to-generator@7.24.7(@babel/core@7.24.7)': dependencies: '@babel/core': 7.24.7 @@ -7940,10 +7985,10 @@ snapshots: '@babel/core': 7.24.7 '@babel/helper-plugin-utils': 7.24.7 - '@babel/plugin-transform-react-constant-elements@7.24.7(@babel/core@7.24.7)': + '@babel/plugin-transform-react-constant-elements@7.25.9(@babel/core@7.24.7)': dependencies: '@babel/core': 7.24.7 - '@babel/helper-plugin-utils': 7.24.7 + '@babel/helper-plugin-utils': 7.25.9 '@babel/plugin-transform-react-display-name@7.24.7(@babel/core@7.24.7)': dependencies: @@ -10495,7 +10540,7 @@ snapshots: '@svgr/webpack@8.1.0(typescript@5.4.5)': dependencies: '@babel/core': 7.24.7 - '@babel/plugin-transform-react-constant-elements': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-transform-react-constant-elements': 7.25.9(@babel/core@7.24.7) '@babel/preset-env': 7.24.7(@babel/core@7.24.7) '@babel/preset-react': 7.24.7(@babel/core@7.24.7) '@babel/preset-typescript': 7.24.7(@babel/core@7.24.7) @@ -10568,12 +10613,6 @@ snapshots: '@types/aria-query@5.0.4': {} - '@types/axios@0.14.0': - dependencies: - axios: 1.7.2 - transitivePeerDependencies: - - debug - '@types/babel__core@7.20.5': dependencies: '@babel/parser': 7.24.7 @@ -11635,7 +11674,7 @@ snapshots: chardet@0.7.0: {} - chart.js@4.4.4: + chart.js@4.4.6: dependencies: '@kurkle/color': 0.3.2 @@ -11674,6 +11713,10 @@ snapshots: cjs-module-lexer@1.3.1: {} + class-variance-authority@0.7.0: + dependencies: + clsx: 2.0.0 + clean-css@5.3.3: dependencies: source-map: 0.6.1 @@ -11721,6 +11764,10 @@ snapshots: clone@1.0.4: {} + clsx@2.0.0: {} + + clsx@2.1.1: {} + color-convert@1.9.3: dependencies: color-name: 1.1.3 @@ -13840,7 +13887,7 @@ snapshots: neo-async@2.6.2: {} - next-auth@4.24.7(next@14.2.10(@babel/core@7.24.7)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(nodemailer@6.9.14)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + next-auth@4.24.7(next@14.2.10(@babel/core@7.24.7)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(nodemailer@6.9.16)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@babel/runtime': 7.24.7 '@panva/hkdf': 1.2.1 @@ -13855,7 +13902,7 @@ snapshots: react-dom: 18.3.1(react@18.3.1) uuid: 8.3.2 optionalDependencies: - nodemailer: 6.9.14 + nodemailer: 6.9.16 next@14.2.10(@babel/core@7.24.7)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: @@ -13934,8 +13981,7 @@ snapshots: node-releases@2.0.14: {} - nodemailer@6.9.14: - optional: true + nodemailer@6.9.16: {} normalize-package-data@2.5.0: dependencies: @@ -14545,9 +14591,9 @@ snapshots: iconv-lite: 0.4.24 unpipe: 1.0.0 - react-chartjs-2@5.2.0(chart.js@4.4.4)(react@18.3.1): + react-chartjs-2@5.2.0(chart.js@4.4.6)(react@18.3.1): dependencies: - chart.js: 4.4.4 + chart.js: 4.4.6 react: 18.3.1 react-colorful@5.6.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): @@ -15056,6 +15102,11 @@ snapshots: dot-case: 3.0.4 tslib: 2.6.3 + sonner@1.5.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + dependencies: + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + source-map-js@1.2.0: {} source-map-support@0.5.21: @@ -15265,6 +15316,12 @@ snapshots: '@pkgr/core': 0.1.1 tslib: 2.6.3 + tailwind-merge@2.5.4: {} + + tailwindcss-animate@1.0.7(tailwindcss@3.4.4): + dependencies: + tailwindcss: 3.4.4 + tailwindcss@3.4.4: dependencies: '@alloc/quick-lru': 5.2.0 diff --git a/apps/admin-panel/tsconfig.json b/apps/admin-panel/tsconfig.json index e7ff90fd2..d81d4ee14 100644 --- a/apps/admin-panel/tsconfig.json +++ b/apps/admin-panel/tsconfig.json @@ -1,6 +1,10 @@ { "compilerOptions": { - "lib": ["dom", "dom.iterable", "esnext"], + "lib": [ + "dom", + "dom.iterable", + "esnext" + ], "allowJs": true, "skipLibCheck": true, "strict": true, @@ -18,9 +22,19 @@ } ], "paths": { - "@/*": ["./*"] - } + "@/*": [ + "./*" + ] + }, + "target": "ES2017" }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], - "exclude": ["node_modules"] + "include": [ + "next-env.d.ts", + "**/*.ts", + "**/*.tsx", + ".next/types/**/*.ts" + ], + "exclude": [ + "node_modules" + ] }