diff --git a/esbuild.mjs b/esbuild.mjs deleted file mode 100644 index ca090255..00000000 --- a/esbuild.mjs +++ /dev/null @@ -1,36 +0,0 @@ -import esbuild from 'esbuild'; -import { commonjs } from '@hyrious/esbuild-plugin-commonjs'; -import fs from 'node:fs'; - -fs.copyFileSync('./package.components.json', './dist/package.json'); - -esbuild - .build({ - entryPoints: ['src/index.client.ts'], - outfile: 'dist/client/index.js', - platform: 'browser', - bundle: true, - jsx: 'automatic', - format: 'esm', - plugins: [commonjs()], - external: ['react', 'react-dom', 'react-jsx/runtime', '@swc/helpers'], - }) - .catch(e => { - // eslint-disable-next-line - console.error(e); - process.exit(1); - }); - -esbuild - .build({ - entryPoints: ['src/index.server.ts'], - outfile: 'dist/server/index.js', - platform: 'node', - bundle: true, - format: 'esm', - }) - .catch(e => { - // eslint-disable-next-line - console.error(e); - process.exit(1); - }); diff --git a/package.components.json b/package.components.json index 29abe59a..04eca82e 100644 --- a/package.components.json +++ b/package.components.json @@ -1,23 +1,10 @@ { "name": "@umami/components", - "version": "0.103.0", + "version": "0.111.0", "description": "Umami React components.", "author": "Mike Cao ", "license": "MIT", "type": "module", "main": "./index.js", - "types": "./index.d.ts", - "peerDependencies": { - "@tanstack/react-query": "^4.33.0", - "classnames": "^2.3.1", - "colord": "^2.9.2", - "date-fns-tz": "^1.1.4", - "immer": "^9.0.12", - "next": "^13.4.0", - "next-basics": "^0.36.0", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "react-intl": "^5.24.7", - "zustand": "^4.3.8" - } + "types": "./index.d.ts" } diff --git a/package.json b/package.json index 2dc733dd..f3d02c01 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "build-app": "next build", "build-app-turbo": "next build --turbo", "build-icons": "svgr ./src/assets --out-dir src/components/svg --typescript", - "build-components": "npm-run-all types esbuild", + "build-components": "tsup", "build-tracker": "rollup -c rollup.tracker.config.js", "build-prisma-client": "node scripts/build-prisma-client.js", "build-lang": "npm-run-all format-lang compile-lang download-country-names download-language-names clean-lang", @@ -51,10 +51,7 @@ "postbuild": "node scripts/postbuild.js", "test": "jest", "cypress-open": "cypress open cypress run", - "cypress-run": "cypress run cypress run", - "rollup": "rollup -c rollup.components.config.js", - "esbuild": "node esbuild.mjs", - "types": "tsup" + "cypress-run": "cypress run cypress run" }, "lint-staged": { "**/*.{js,jsx,ts,tsx}": [ @@ -86,7 +83,7 @@ "@svgr/cli": "^8.1.0", "@tanstack/react-query": "^5.85.5", "@umami/react-zen": "^0.175.0", - "@umami/redis-client": "^0.27.0", + "@umami/redis-client": "^0.29.0", "bcryptjs": "^3.0.2", "chalk": "^5.6.0", "chart.js": "^4.5.0", @@ -101,6 +98,7 @@ "del": "^6.0.0", "detect-browser": "^5.2.0", "dotenv": "^17.2.1", + "esbuild": "^0.25.9", "eslint-plugin-promise": "^6.1.1", "fs-extra": "^11.3.1", "immer": "^10.1.1", @@ -139,7 +137,6 @@ }, "devDependencies": { "@formatjs/cli": "^4.2.29", - "@hyrious/esbuild-plugin-commonjs": "^0.2.6", "@netlify/plugin-nextjs": "^5.12.1", "@rollup/plugin-alias": "^5.0.0", "@rollup/plugin-commonjs": "^25.0.4", @@ -155,12 +152,10 @@ "@types/react-window": "^1.8.8", "@typescript-eslint/eslint-plugin": "^8.41.0", "@typescript-eslint/parser": "^8.41.0", - "@umami/esbuild-plugin-css-modules": "^0.4.0", "@umami/prisma-client": "^0.19.0", "babel-plugin-react-compiler": "19.1.0-rc.2", "cross-env": "^10.0.0", "cypress": "^13.6.6", - "esbuild": "^0.25.8", "eslint": "^8.33.0", "eslint-config-next": "^14.2.32", "eslint-config-prettier": "^10.1.8", @@ -184,7 +179,6 @@ "rollup-plugin-copy": "^3.4.0", "rollup-plugin-delete": "^3.0.1", "rollup-plugin-dts": "^6.2.3", - "rollup-plugin-esbuild": "^6.2.1", "rollup-plugin-node-externals": "^8.1.0", "rollup-plugin-peer-deps-external": "^2.2.4", "rollup-plugin-postcss": "^4.0.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c78d6868..f3c2182f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -48,8 +48,8 @@ importers: specifier: ^0.175.0 version: 0.175.0(@babel/core@7.28.3)(@types/react@19.1.12)(babel-plugin-react-compiler@19.1.0-rc.2)(immer@10.1.1)(use-sync-external-store@1.5.0(react@19.1.1)) '@umami/redis-client': - specifier: ^0.27.0 - version: 0.27.0 + specifier: ^0.29.0 + version: 0.29.0 bcryptjs: specifier: ^3.0.2 version: 3.0.2 @@ -92,6 +92,9 @@ importers: dotenv: specifier: ^17.2.1 version: 17.2.1 + esbuild: + specifier: ^0.25.9 + version: 0.25.9 eslint-plugin-promise: specifier: ^6.1.1 version: 6.6.0(eslint@8.57.1) @@ -201,9 +204,6 @@ importers: '@formatjs/cli': specifier: ^4.2.29 version: 4.8.4(ts-jest@29.4.1(@babel/core@7.28.3)(@jest/transform@29.7.0)(@jest/types@30.0.5)(babel-jest@29.7.0(@babel/core@7.28.3))(esbuild@0.25.9)(jest-util@30.0.5)(jest@29.7.0(@types/node@24.3.0)(ts-node@10.9.2(@types/node@24.3.0)(typescript@5.9.2)))(typescript@5.9.2)) - '@hyrious/esbuild-plugin-commonjs': - specifier: ^0.2.6 - version: 0.2.6(cjs-module-lexer@1.4.3)(esbuild@0.25.9) '@netlify/plugin-nextjs': specifier: ^5.12.1 version: 5.12.1 @@ -249,9 +249,6 @@ importers: '@typescript-eslint/parser': specifier: ^8.41.0 version: 8.41.0(eslint@8.57.1)(typescript@5.9.2) - '@umami/esbuild-plugin-css-modules': - specifier: ^0.4.0 - version: 0.4.0 '@umami/prisma-client': specifier: ^0.19.0 version: 0.19.0(@prisma/adapter-pg@6.15.0)(@prisma/client@6.15.0(prisma@6.15.0(typescript@5.9.2))(typescript@5.9.2))(@prisma/extension-read-replicas@0.4.1(@prisma/client@6.15.0(prisma@6.15.0(typescript@5.9.2))(typescript@5.9.2))) @@ -264,9 +261,6 @@ importers: cypress: specifier: ^13.6.6 version: 13.17.0 - esbuild: - specifier: ^0.25.8 - version: 0.25.9 eslint: specifier: ^8.33.0 version: 8.57.1 @@ -336,9 +330,6 @@ importers: rollup-plugin-dts: specifier: ^6.2.3 version: 6.2.3(rollup@4.49.0)(typescript@5.9.2) - rollup-plugin-esbuild: - specifier: ^6.2.1 - version: 6.2.1(esbuild@0.25.9)(rollup@4.49.0) rollup-plugin-node-externals: specifier: ^8.1.0 version: 8.1.0(rollup@4.49.0) @@ -376,41 +367,7 @@ importers: specifier: ^5.9.2 version: 5.9.2 - dist: - dependencies: - '@tanstack/react-query': - specifier: ^4.33.0 - version: 4.40.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - classnames: - specifier: ^2.3.1 - version: 2.5.1 - colord: - specifier: ^2.9.2 - version: 2.9.3 - date-fns-tz: - specifier: ^1.1.4 - version: 1.3.8(date-fns@2.30.0) - immer: - specifier: ^9.0.12 - version: 9.0.21 - next: - specifier: ^13.4.0 - version: 13.5.11(@babel/core@7.28.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - next-basics: - specifier: ^0.36.0 - version: 0.36.0(next@13.5.11(@babel/core@7.28.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - react: - specifier: ^18.2.0 - version: 18.3.1 - react-dom: - specifier: ^18.2.0 - version: 18.3.1(react@18.3.1) - react-intl: - specifier: ^5.24.7 - version: 5.25.1(react@18.3.1)(typescript@4.9.5) - zustand: - specifier: ^4.3.8 - version: 4.5.7(@types/react@18.3.24)(immer@9.0.21)(react@18.3.1) + dist: {} packages: @@ -1123,9 +1080,6 @@ packages: '@formatjs/ecma402-abstract@2.3.4': resolution: {integrity: sha512-qrycXDeaORzIqNhBOx0btnhpD1c+/qFIHAN9znofuMJX6QBwtbrmlpWfD4oiUUD2vJUOIYFA/gYtg2KAMGG7sA==} - '@formatjs/fast-memoize@1.2.1': - resolution: {integrity: sha512-Rg0e76nomkz3vF9IPlKeV+Qynok0r7YZjL6syLz4/urSg0IbjPZCB/iYUMNsYA643gh4mgrX3T7KEIFIxJBQeg==} - '@formatjs/fast-memoize@2.2.7': resolution: {integrity: sha512-Yabmi9nSvyOMrlSeGGWDiH7rf3a7sIwplbvo/dlz9WCIjzIQAfy1RMf4S0X3yG724n5Ghu2GmEl5NJIV6O9sZQ==} @@ -1141,12 +1095,6 @@ packages: '@formatjs/icu-skeleton-parser@1.8.14': resolution: {integrity: sha512-i4q4V4qslThK4Ig8SxyD76cp3+QJ3sAqr7f6q9VVfeGtxG9OhiAk3y9XF6Q41OymsKzsGQ6OQQoJNY4/lI8TcQ==} - '@formatjs/intl-displaynames@5.4.3': - resolution: {integrity: sha512-4r12A3mS5dp5hnSaQCWBuBNfi9Amgx2dzhU4lTFfhSxgb5DOAiAbMpg6+7gpWZgl4ahsj3l2r/iHIjdmdXOE2Q==} - - '@formatjs/intl-listformat@6.5.3': - resolution: {integrity: sha512-ozpz515F/+3CU+HnLi5DYPsLa6JoCfBggBSSg/8nOB5LYSFW9+ZgNQJxJ8tdhKYeODT+4qVHX27EeJLoxLGLNg==} - '@formatjs/intl-localematcher@0.2.25': resolution: {integrity: sha512-YmLcX70BxoSopLFdLr1Ds99NdlTI2oWoLbaUW2M406lxOIPzE1KQhRz2fPUkq34xVZQaihCoU29h0KK7An3bhA==} @@ -1156,14 +1104,6 @@ packages: '@formatjs/intl-numberformat@5.7.6': resolution: {integrity: sha512-ZlZfYtvbVHYZY5OG3RXizoCwxKxEKOrzEe2YOw9wbzoxF3PmFn0SAgojCFGLyNXkkR6xVxlylhbuOPf1dkIVNg==} - '@formatjs/intl@2.2.1': - resolution: {integrity: sha512-vgvyUOOrzqVaOFYzTf2d3+ToSkH2JpR7x/4U1RyoHQLmvEaTQvXJ7A2qm1Iy3brGNXC/+/7bUlc3lpH+h/LOJA==} - peerDependencies: - typescript: ^4.5 - peerDependenciesMeta: - typescript: - optional: true - '@formatjs/intl@3.1.6': resolution: {integrity: sha512-tDkXnA4qpIFcDWac8CyVJq6oW8DR7W44QDUBsfXWIIJD/FYYen0QoH46W7XsVMFfPOVKkvbufjboZrrWbEfmww==} peerDependencies: @@ -1207,16 +1147,6 @@ packages: resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} deprecated: Use @eslint/object-schema instead - '@hyrious/esbuild-plugin-commonjs@0.2.6': - resolution: {integrity: sha512-LIPT8Y6EbNaHdV7lS9Ki6nnK0G1fP4bhzlMU1fgbOEJkR+yOA6FCORnPhjbQyeRTjG/ALPXdqCMRxTGwroL9CQ==} - engines: {node: '>=14'} - peerDependencies: - cjs-module-lexer: '*' - esbuild: '*' - peerDependenciesMeta: - cjs-module-lexer: - optional: true - '@img/sharp-darwin-arm64@0.34.3': resolution: {integrity: sha512-ryFMfvxxpQRsgZJqBd4wsttYQbCxsJksrv9Lw/v798JcQ8+w84mBWuXwl+TT0WJ/WrYOLaYpwQXi3sA9nTIaIg==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} @@ -1490,111 +1420,54 @@ packages: resolution: {integrity: sha512-b2Ic9NkNnnh0lKC/YWDZ2+HdLd/uYdBzLvLKYOkPyFt8KEszoC+Je3GRcwBeOLxaNtK8lji7YPIjtGz8K2sLVQ==} engines: {node: '>=18.0.0'} - '@next/env@13.5.11': - resolution: {integrity: sha512-fbb2C7HChgM7CemdCY+y3N1n8pcTKdqtQLbC7/EQtPdLvlMUT9JX/dBYl8MMZAtYG4uVMyPFHXckb68q/NRwqg==} - '@next/env@15.5.2': resolution: {integrity: sha512-Qe06ew4zt12LeO6N7j8/nULSOe3fMXE4dM6xgpBQNvdzyK1sv5y4oAP3bq4LamrvGCZtmRYnW8URFCeX5nFgGg==} '@next/eslint-plugin-next@14.2.32': resolution: {integrity: sha512-tyZMX8g4cWg/uPW4NxiJK13t62Pab47SKGJGVZJa6YtFwtfrXovH4j1n9tdpRdXW03PGQBugYEVGM7OhWfytdA==} - '@next/swc-darwin-arm64@13.5.9': - resolution: {integrity: sha512-pVyd8/1y1l5atQRvOaLOvfbmRwefxLhqQOzYo/M7FQ5eaRwA1+wuCn7t39VwEgDd7Aw1+AIWwd+MURXUeXhwDw==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [darwin] - '@next/swc-darwin-arm64@15.5.2': resolution: {integrity: sha512-8bGt577BXGSd4iqFygmzIfTYizHb0LGWqH+qgIF/2EDxS5JsSdERJKA8WgwDyNBZgTIIA4D8qUtoQHmxIIquoQ==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] - '@next/swc-darwin-x64@13.5.9': - resolution: {integrity: sha512-DwdeJqP7v8wmoyTWPbPVodTwCybBZa02xjSJ6YQFIFZFZ7dFgrieKW4Eo0GoIcOJq5+JxkQyejmI+8zwDp3pwA==} - engines: {node: '>= 10'} - cpu: [x64] - os: [darwin] - '@next/swc-darwin-x64@15.5.2': resolution: {integrity: sha512-2DjnmR6JHK4X+dgTXt5/sOCu/7yPtqpYt8s8hLkHFK3MGkka2snTv3yRMdHvuRtJVkPwCGsvBSwmoQCHatauFQ==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] - '@next/swc-linux-arm64-gnu@13.5.9': - resolution: {integrity: sha512-wdQsKsIsGSNdFojvjW3Ozrh8Q00+GqL3wTaMjDkQxVtRbAqfFBtrLPO0IuWChVUP2UeuQcHpVeUvu0YgOP00+g==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - '@next/swc-linux-arm64-gnu@15.5.2': resolution: {integrity: sha512-3j7SWDBS2Wov/L9q0mFJtEvQ5miIqfO4l7d2m9Mo06ddsgUK8gWfHGgbjdFlCp2Ek7MmMQZSxpGFqcC8zGh2AA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@next/swc-linux-arm64-musl@13.5.9': - resolution: {integrity: sha512-6VpS+bodQqzOeCwGxoimlRoosiWlSc0C224I7SQWJZoyJuT1ChNCo+45QQH+/GtbR/s7nhaUqmiHdzZC9TXnXA==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - '@next/swc-linux-arm64-musl@15.5.2': resolution: {integrity: sha512-s6N8k8dF9YGc5T01UPQ08yxsK6fUow5gG1/axWc1HVVBYQBgOjca4oUZF7s4p+kwhkB1bDSGR8QznWrFZ/Rt5g==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@next/swc-linux-x64-gnu@13.5.9': - resolution: {integrity: sha512-XxG3yj61WDd28NA8gFASIR+2viQaYZEFQagEodhI/R49gXWnYhiflTeeEmCn7Vgnxa/OfK81h1gvhUZ66lozpw==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - '@next/swc-linux-x64-gnu@15.5.2': resolution: {integrity: sha512-o1RV/KOODQh6dM6ZRJGZbc+MOAHww33Vbs5JC9Mp1gDk8cpEO+cYC/l7rweiEalkSm5/1WGa4zY7xrNwObN4+Q==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@next/swc-linux-x64-musl@13.5.9': - resolution: {integrity: sha512-/dnscWqfO3+U8asd+Fc6dwL2l9AZDl7eKtPNKW8mKLh4Y4wOpjJiamhe8Dx+D+Oq0GYVjuW0WwjIxYWVozt2bA==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - '@next/swc-linux-x64-musl@15.5.2': resolution: {integrity: sha512-/VUnh7w8RElYZ0IV83nUcP/J4KJ6LLYliiBIri3p3aW2giF+PAVgZb6mk8jbQSB3WlTai8gEmCAr7kptFa1H6g==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@next/swc-win32-arm64-msvc@13.5.9': - resolution: {integrity: sha512-T/iPnyurOK5a4HRUcxAlss8uzoEf5h9tkd+W2dSWAfzxv8WLKlUgbfk+DH43JY3Gc2xK5URLuXrxDZ2mGfk/jw==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [win32] - '@next/swc-win32-arm64-msvc@15.5.2': resolution: {integrity: sha512-sMPyTvRcNKXseNQ/7qRfVRLa0VhR0esmQ29DD6pqvG71+JdVnESJaHPA8t7bc67KD5spP3+DOCNLhqlEI2ZgQg==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] - '@next/swc-win32-ia32-msvc@13.5.9': - resolution: {integrity: sha512-BLiPKJomaPrTAb7ykjA0LPcuuNMLDVK177Z1xe0nAem33+9FIayU4k/OWrtSn9SAJW/U60+1hoey5z+KCHdRLQ==} - engines: {node: '>= 10'} - cpu: [ia32] - os: [win32] - - '@next/swc-win32-x64-msvc@13.5.9': - resolution: {integrity: sha512-/72/dZfjXXNY/u+n8gqZDjI6rxKMpYsgBBYNZKWOQw0BpBF7WCnPflRy3ZtvQ2+IYI3ZH2bPyj7K+6a6wNk90Q==} - engines: {node: '>= 10'} - cpu: [x64] - os: [win32] - '@next/swc-win32-x64-msvc@15.5.2': resolution: {integrity: sha512-W5VvyZHnxG/2ukhZF/9Ikdra5fdNftxI6ybeVKYvBPDtyx7x4jPPSNduUkfH5fo3zG0JQ0bPxgy41af2JX5D4Q==} engines: {node: '>= 10'} @@ -2627,27 +2500,9 @@ packages: '@swc/helpers@0.5.17': resolution: {integrity: sha512-5IKx/Y13RsYd+sauPb2x+U/xZikHjolzfuDgTAl/Tdf3Q8rslRvC19NKDLgAJQ6wsqADk10ntlv08nPFw/gO/A==} - '@swc/helpers@0.5.2': - resolution: {integrity: sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==} - - '@tanstack/query-core@4.40.0': - resolution: {integrity: sha512-7MJTtZkCSuehMC7IxMOCGsLvHS3jHx4WjveSrGsG1Nc1UQLjaFwwkpLA2LmPfvOAxnH4mszMOBFD6LlZE+aB+Q==} - '@tanstack/query-core@5.85.5': resolution: {integrity: sha512-KO0WTob4JEApv69iYp1eGvfMSUkgw//IpMnq+//cORBzXf0smyRwPLrUvEe5qtAEGjwZTXrjxg+oJNP/C00t6w==} - '@tanstack/react-query@4.40.1': - resolution: {integrity: sha512-mgD07S5N8e5v81CArKDWrHE4LM7HxZ9k/KLeD3+NUD9WimGZgKIqojUZf/rXkfAMYZU9p0Chzj2jOXm7xpgHHQ==} - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-native: '*' - peerDependenciesMeta: - react-dom: - optional: true - react-native: - optional: true - '@tanstack/react-query@5.85.5': resolution: {integrity: sha512-/X4EFNcnPiSs8wM2v+b6DqS5mmGeuJQvxBglmDxl6ZQb5V26ouD2SJYAcC3VjbNwqhY2zjxVD15rDA5nGbMn3A==} peerDependencies: @@ -2745,9 +2600,6 @@ packages: '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} - '@types/prop-types@15.7.15': - resolution: {integrity: sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==} - '@types/react-dom@19.1.8': resolution: {integrity: sha512-xG7xaBMJCpcK0RpN8jDbAACQo54ycO6h4dSSmgv8+fu6ZIAdANkx/WsawASUjVXYfy+J9AbUpRMNNEsXCDfDBQ==} peerDependencies: @@ -2756,9 +2608,6 @@ packages: '@types/react-window@1.8.8': resolution: {integrity: sha512-8Ls660bHR1AUA2kuRvVG9D/4XpRC6wjAaPT9dil7Ckc76eP9TKWZwwmgfq8Q1LANX3QNDnoU4Zp48A3w+zK69Q==} - '@types/react@18.3.24': - resolution: {integrity: sha512-0dLEBsA1kI3OezMBF8nSsb7Nk19ZnsyE1LLhB8r27KbgU5H4pvuqZLdtE+aUkJVoXgTVuA+iLIwmZ0TuK4tx6A==} - '@types/react@19.1.12': resolution: {integrity: sha512-cMoR+FoAf/Jyq6+Df2/Z41jISvGZZ2eTlnsaJRptmZ76Caldwy1odD4xTr/gNV9VLj0AWgg/nmkevIyUfIIq5w==} @@ -2879,9 +2728,6 @@ packages: resolution: {integrity: sha512-+GeGMebMCy0elMNg67LRNoVnUFPIm37iu5CmHESVx56/9Jsfdpsvbv605DQ81Pi/x11IdKUsS5nzgTYbCQU9fg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@umami/esbuild-plugin-css-modules@0.4.0': - resolution: {integrity: sha512-OcFbipBJZCmMnJ52/eHkZxpXGQT8Q5bAePgkhpxlreT4zP98grZ6iLzaIkDPFqURQwM/llDhPyNEFRzkSfVYFw==} - '@umami/prisma-client@0.19.0': resolution: {integrity: sha512-Vnys7MMAPexxmxrC+0q68B/iYmM1LFaP9RjKjffHbLfgZJ3moklJ2ea91cr8+m0CA3+3mqN38WEJI/o/ohOxYQ==} peerDependencies: @@ -2892,8 +2738,8 @@ packages: '@umami/react-zen@0.175.0': resolution: {integrity: sha512-iOUCZwmr09RnqIm01wnjcSTTJ5iJdXRmFlmja2Qf42di/SOOTSBJmu1fKiYESp4dLrXXcmMeDfDqtJli0PPSRw==} - '@umami/redis-client@0.27.0': - resolution: {integrity: sha512-SbHTpxhgeZyTBUSp2zdZM+XUtpsaSL4Tad8QXIEhEtjWhvvfoornyT5kLuyYCVtzSAT4daALeGmOO1z6EE1KcA==} + '@umami/redis-client@0.29.0': + resolution: {integrity: sha512-Jaqh++jskqDB7ny75pfC02OvKp1JTS4asGDsFrRL3qy8sxL3PAl9+/mybCJe4/6vWrXDJKqpgkSfUDJq2bFjyw==} '@ungap/structured-clone@1.3.0': resolution: {integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==} @@ -3251,9 +3097,6 @@ packages: bcrypt-pbkdf@1.0.2: resolution: {integrity: sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==} - bcryptjs@2.4.3: - resolution: {integrity: sha512-V/Hy/X9Vt7f3BbPJEi8BdVFMByHi+jNXrYkW3huaybV/kQ0KJg0Y6PkEMbn+zeT+i+SiKZ/HMqJGIIt4LZDqNQ==} - bcryptjs@3.0.2: resolution: {integrity: sha512-k38b3XOZKv60C4E2hVsXTolJWfkGRMbILBIe2IBITXciy5bOsTKot5kDrf3ZfufQtQOUN5mXceUEpU1rTl9Uog==} hasBin: true @@ -3307,10 +3150,6 @@ packages: peerDependencies: esbuild: '>=0.18' - busboy@1.6.0: - resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==} - engines: {node: '>=10.16.0'} - c12@3.1.0: resolution: {integrity: sha512-uWoS8OU1MEIsOv8p/5a82c3H31LsWVR5qiyXVfBNOzfffjUWtPnhAb4BYI2uG2HfGmZmFjCtui5XNWaps+iFuw==} peerDependencies: @@ -4006,9 +3845,6 @@ packages: resolution: {integrity: sha512-uDn+FE1yrDzyC0pCo961B2IHbdM8y/ACZsKD4dG6WqrjV53BADjwa7D+1aom2rsNVfLyDgU/eigvlJGJ08OQ4w==} engines: {node: '>= 0.4'} - es-module-lexer@1.7.0: - resolution: {integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==} - es-object-atoms@1.1.1: resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} engines: {node: '>= 0.4'} @@ -4497,9 +4333,6 @@ packages: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} engines: {node: '>=10.13.0'} - glob-to-regexp@0.4.1: - resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} - glob@10.3.10: resolution: {integrity: sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==} engines: {node: '>=16 || 14 >=14.17'} @@ -4672,9 +4505,6 @@ packages: immer@10.1.1: resolution: {integrity: sha512-s2MPrmjovJcoMaHtx6K11Ra7oD05NT97w1IC5zpMkT6Atjr7H8LjaDd81iIxUYpMKSRRNMJE703M1Fhr/TctHw==} - immer@9.0.21: - resolution: {integrity: sha512-bc4NBHqOqSfRW7POMkHd51LvClaeMXpm8dx0e8oE2GORbq5aRK7Bxl4FyzVLdGtLmvLKL7BTDBG5ACQm4HWjTA==} - import-cwd@3.0.0: resolution: {integrity: sha512-4pnzH16plW+hgvRECbDWpQl3cqtvSofHWh44met7ESfZ8UZOWWddm8hEyDTqREJ9RbYHY8gi8DqmaelApoOGMg==} engines: {node: '>=8'} @@ -4740,9 +4570,6 @@ packages: intl-messageformat@10.7.16: resolution: {integrity: sha512-UmdmHUmp5CIKKjSoE10la5yfU+AYJAaiYLsodbjL4lji83JNvgOQUjGaGhGrpFCb0Uh7sl7qfP1IyILa8Z40ug==} - intl-messageformat@9.13.0: - resolution: {integrity: sha512-7sGC7QnSQGa5LZP7bXLDhVDtQOeKGeBFGHF2Y8LVBwYZoQZCgWeKoPGTa5GMG8g/TzDgeXuYJQis7Ggiw2xTOw==} - ipaddr.js@2.2.0: resolution: {integrity: sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA==} engines: {node: '>= 10'} @@ -5609,28 +5436,6 @@ packages: neo-async@2.6.2: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} - next-basics@0.36.0: - resolution: {integrity: sha512-Nwou8pCjFuoD/ZxUw9iKC7hhZeWbo/ng0ze74yck3W89MNc/CepwCDziflAHY5XcmIVNmpXOCu9OfmzTdVRPWQ==} - peerDependencies: - next: ^13.4.0 - react: ^18.2.0 - react-dom: ^18.2.0 - - next@13.5.11: - resolution: {integrity: sha512-WUPJ6WbAX9tdC86kGTu92qkrRdgRqVrY++nwM+shmWQwmyxt4zhZfR59moXSI4N8GDYCBY3lIAqhzjDd4rTC8Q==} - engines: {node: '>=16.14.0'} - hasBin: true - peerDependencies: - '@opentelemetry/api': ^1.1.0 - react: ^18.2.0 - react-dom: ^18.2.0 - sass: ^1.3.0 - peerDependenciesMeta: - '@opentelemetry/api': - optional: true - sass: - optional: true - next@15.5.2: resolution: {integrity: sha512-H8Otr7abj1glFhbGnvUt3gz++0AF1+QoCXEBmd/6aKbfdFwrn0LpA836Ed5+00va/7HQSDD+mOoVhn3tNy3e/Q==} engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0} @@ -6230,11 +6035,6 @@ packages: peerDependencies: postcss: ^8.0.0 - postcss-modules@6.0.1: - resolution: {integrity: sha512-zyo2sAkVvuZFFy0gc2+4O+xar5dYlaVy/ebO24KT0ftk/iJevSNyPyQellsBLlnccwh7f6V6Y4GvuKRYToNgpQ==} - peerDependencies: - postcss: ^8.0.0 - postcss-nesting@10.2.0: resolution: {integrity: sha512-EwMkYchxiDiKUhlJGzWsD9b2zvq/r2SSubcRrgP+jujMXFzqvANLt16lJANC+5uZ6hjI7lpRmI6O8JIl+8l1KA==} engines: {node: ^12 || ^14 || >=16} @@ -6529,11 +6329,6 @@ packages: react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1 - react-dom@18.3.1: - resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==} - peerDependencies: - react: ^18.3.1 - react-dom@19.1.1: resolution: {integrity: sha512-Dlq/5LAZgF0Gaz6yiqZCf6VCcZs1ghAJyrsu84Q/GT0gV+mCxbfmKNoGRKBYMJ8IEdGPqu49YWXD02GCknEDkw==} peerDependencies: @@ -6555,15 +6350,6 @@ packages: peerDependencies: react: '*' - react-intl@5.25.1: - resolution: {integrity: sha512-pkjdQDvpJROoXLMltkP/5mZb0/XqrqLoPGKUCfbdkP8m6U9xbK40K51Wu+a4aQqTEvEK5lHBk0fWzUV72SJ3Hg==} - peerDependencies: - react: ^16.3.0 || 17 || 18 - typescript: ^4.5 - peerDependenciesMeta: - typescript: - optional: true - react-intl@7.1.11: resolution: {integrity: sha512-tnVoRCWvW5Ie2ikYSdPF7z3+880yCe/9xPmitFeRPw3RYDcCfR4m8ZYa4MBq19W4adt9Z+PQA4FaMBCJ7E+HCQ==} peerDependencies: @@ -6619,10 +6405,6 @@ packages: react: ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 react-dom: ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 - react@18.3.1: - resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==} - engines: {node: '>=0.10.0'} - react@19.1.1: resolution: {integrity: sha512-w8nqGImo45dmMIfljjMwOGtbmC/mk4CMYhWIicdSflH91J9TyCyczcPFXJzrZ/ZXcgGRFeP6BU0BEJTw6tZdfQ==} engines: {node: '>=0.10.0'} @@ -6762,13 +6544,6 @@ packages: rollup: ^3.29.4 || ^4 typescript: ^4.5 || ^5.0 - rollup-plugin-esbuild@6.2.1: - resolution: {integrity: sha512-jTNOMGoMRhs0JuueJrJqbW8tOwxumaWYq+V5i+PD+8ecSCVkuX27tGW7BXqDgoULQ55rO7IdNxPcnsWtshz3AA==} - engines: {node: '>=14.18.0'} - peerDependencies: - esbuild: '>=0.18.0' - rollup: ^1.20.0 || ^2.0.0 || ^3.0.0 || ^4.0.0 - rollup-plugin-node-externals@8.1.0: resolution: {integrity: sha512-0D3S0E0Dl1V3Q6Cywnc7wt88VAfOB9AC5QHwVdgvP1vByRHW2wnEXoK0x3VYZzJ/EmGsR5Uix5HUmMJNG+hz2Q==} engines: {node: '>= 21 || ^20.6.0 || ^18.19.0'} @@ -6824,9 +6599,6 @@ packages: safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - scheduler@0.23.2: - resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==} - scheduler@0.26.0: resolution: {integrity: sha512-NlHwttCI/l5gCPR3D1nNXtWABUmBwvZpEQiD4IXSbIDq8BzLIK/7Ir5gTFSGZDUu37K5cMNp0hFtzO38sC7gWA==} @@ -7014,10 +6786,6 @@ packages: resolution: {integrity: sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==} engines: {node: '>= 0.4'} - streamsearch@1.1.0: - resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} - engines: {node: '>=10.0.0'} - string-argv@0.3.2: resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==} engines: {node: '>=0.6.19'} @@ -7109,19 +6877,6 @@ packages: style-search@0.1.0: resolution: {integrity: sha512-Dj1Okke1C3uKKwQcetra4jSuk0DqbzbYtXipzFlFMZtowbF1x7BKJwB9AayVMyFARvU8EDrZdcax4At/452cAg==} - styled-jsx@5.1.1: - resolution: {integrity: sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==} - engines: {node: '>= 12.0.0'} - peerDependencies: - '@babel/core': '*' - babel-plugin-macros: '*' - react: '>= 16.8.0 || 17.x.x || ^18.0.0-0' - peerDependenciesMeta: - '@babel/core': - optional: true - babel-plugin-macros: - optional: true - styled-jsx@5.1.6: resolution: {integrity: sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA==} engines: {node: '>= 12.0.0'} @@ -7491,10 +7246,6 @@ packages: resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} engines: {node: '>= 10.0.0'} - unplugin-utils@0.2.5: - resolution: {integrity: sha512-gwXJnPRewT4rT7sBi/IvxKTjsms7jX7QIDLOClApuZwR49SXbrB1z2NLUZ+vDHyqCj/n58OzRRqaW+B8OZi8vg==} - engines: {node: '>=18.12.0'} - unrs-resolver@1.11.1: resolution: {integrity: sha512-bSjt9pjaEBnNiGgc9rUiHGKv5l4/TGzDmYw3RhnkJGtLhbnnA/5qJj7x3dNDCRx/PJxu774LlH8lCOlB4hEfKg==} @@ -7561,10 +7312,6 @@ packages: walker@1.0.8: resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==} - watchpack@2.4.0: - resolution: {integrity: sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==} - engines: {node: '>=10.13.0'} - web-streams-polyfill@3.3.3: resolution: {integrity: sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==} engines: {node: '>= 8'} @@ -7694,21 +7441,6 @@ packages: zod@4.1.5: resolution: {integrity: sha512-rcUUZqlLJgBC33IT3PNMgsCq6TzLQEG/Ei/KTCU0PedSWRMAXoOUN+4t/0H+Q8bdnLPdqUYnvboJT0bn/229qg==} - zustand@4.5.7: - resolution: {integrity: sha512-CHOUy7mu3lbD6o6LJLfllpjkzhHXSBlX8B9+qPddUsIfeF5S/UZ5q0kmCsnRqT1UHFQZchNFDDzMbQsuesHWlw==} - engines: {node: '>=12.7.0'} - peerDependencies: - '@types/react': '>=16.8' - immer: '>=9.0.6' - react: '>=16.8' - peerDependenciesMeta: - '@types/react': - optional: true - immer: - optional: true - react: - optional: true - zustand@5.0.8: resolution: {integrity: sha512-gyPKpIaxY9XcO2vSMrLbiER7QMAMGOQZVRdJ6Zi782jkbzZygq5GI9nG8g+sMgitRtndwaBSl7uiqC49o1SSiw==} engines: {node: '>=12.20.0'} @@ -8383,10 +8115,6 @@ snapshots: decimal.js: 10.6.0 tslib: 2.8.1 - '@formatjs/fast-memoize@1.2.1': - dependencies: - tslib: 2.8.1 - '@formatjs/fast-memoize@2.2.7': dependencies: tslib: 2.8.1 @@ -8413,18 +8141,6 @@ snapshots: '@formatjs/ecma402-abstract': 2.3.4 tslib: 2.8.1 - '@formatjs/intl-displaynames@5.4.3': - dependencies: - '@formatjs/ecma402-abstract': 1.11.4 - '@formatjs/intl-localematcher': 0.2.25 - tslib: 2.8.1 - - '@formatjs/intl-listformat@6.5.3': - dependencies: - '@formatjs/ecma402-abstract': 1.11.4 - '@formatjs/intl-localematcher': 0.2.25 - tslib: 2.8.1 - '@formatjs/intl-localematcher@0.2.25': dependencies: tslib: 2.8.1 @@ -8438,18 +8154,6 @@ snapshots: '@formatjs/ecma402-abstract': 1.4.0 tslib: 2.8.1 - '@formatjs/intl@2.2.1(typescript@4.9.5)': - dependencies: - '@formatjs/ecma402-abstract': 1.11.4 - '@formatjs/fast-memoize': 1.2.1 - '@formatjs/icu-messageformat-parser': 2.1.0 - '@formatjs/intl-displaynames': 5.4.3 - '@formatjs/intl-listformat': 6.5.3 - intl-messageformat: 9.13.0 - tslib: 2.8.1 - optionalDependencies: - typescript: 4.9.5 - '@formatjs/intl@3.1.6(typescript@5.9.2)': dependencies: '@formatjs/ecma402-abstract': 2.3.4 @@ -8504,12 +8208,6 @@ snapshots: '@humanwhocodes/object-schema@2.0.3': {} - '@hyrious/esbuild-plugin-commonjs@0.2.6(cjs-module-lexer@1.4.3)(esbuild@0.25.9)': - dependencies: - esbuild: 0.25.9 - optionalDependencies: - cjs-module-lexer: 1.4.3 - '@img/sharp-darwin-arm64@0.34.3': optionalDependencies: '@img/sharp-libvips-darwin-arm64': 1.2.0 @@ -8862,62 +8560,33 @@ snapshots: '@netlify/plugin-nextjs@5.12.1': {} - '@next/env@13.5.11': {} - '@next/env@15.5.2': {} '@next/eslint-plugin-next@14.2.32': dependencies: glob: 10.3.10 - '@next/swc-darwin-arm64@13.5.9': - optional: true - '@next/swc-darwin-arm64@15.5.2': optional: true - '@next/swc-darwin-x64@13.5.9': - optional: true - '@next/swc-darwin-x64@15.5.2': optional: true - '@next/swc-linux-arm64-gnu@13.5.9': - optional: true - '@next/swc-linux-arm64-gnu@15.5.2': optional: true - '@next/swc-linux-arm64-musl@13.5.9': - optional: true - '@next/swc-linux-arm64-musl@15.5.2': optional: true - '@next/swc-linux-x64-gnu@13.5.9': - optional: true - '@next/swc-linux-x64-gnu@15.5.2': optional: true - '@next/swc-linux-x64-musl@13.5.9': - optional: true - '@next/swc-linux-x64-musl@15.5.2': optional: true - '@next/swc-win32-arm64-msvc@13.5.9': - optional: true - '@next/swc-win32-arm64-msvc@15.5.2': optional: true - '@next/swc-win32-ia32-msvc@13.5.9': - optional: true - - '@next/swc-win32-x64-msvc@13.5.9': - optional: true - '@next/swc-win32-x64-msvc@15.5.2': optional: true @@ -10375,22 +10044,8 @@ snapshots: dependencies: tslib: 2.8.1 - '@swc/helpers@0.5.2': - dependencies: - tslib: 2.8.1 - - '@tanstack/query-core@4.40.0': {} - '@tanstack/query-core@5.85.5': {} - '@tanstack/react-query@4.40.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': - dependencies: - '@tanstack/query-core': 4.40.0 - react: 18.3.1 - use-sync-external-store: 1.5.0(react@18.3.1) - optionalDependencies: - react-dom: 18.3.1(react@18.3.1) - '@tanstack/react-query@5.85.5(react@19.1.1)': dependencies: '@tanstack/query-core': 5.85.5 @@ -10453,11 +10108,6 @@ snapshots: dependencies: '@types/node': 24.3.0 - '@types/hoist-non-react-statics@3.3.7(@types/react@18.3.24)': - dependencies: - '@types/react': 18.3.24 - hoist-non-react-statics: 3.3.2 - '@types/hoist-non-react-statics@3.3.7(@types/react@19.1.12)': dependencies: '@types/react': 19.1.12 @@ -10500,8 +10150,6 @@ snapshots: '@types/normalize-package-data@2.4.4': {} - '@types/prop-types@15.7.15': {} - '@types/react-dom@19.1.8(@types/react@19.1.12)': dependencies: '@types/react': 19.1.12 @@ -10510,11 +10158,6 @@ snapshots: dependencies: '@types/react': 19.1.12 - '@types/react@18.3.24': - dependencies: - '@types/prop-types': 15.7.15 - csstype: 3.1.3 - '@types/react@19.1.12': dependencies: csstype: 3.1.3 @@ -10680,11 +10323,6 @@ snapshots: '@typescript-eslint/types': 8.41.0 eslint-visitor-keys: 4.2.1 - '@umami/esbuild-plugin-css-modules@0.4.0': - dependencies: - postcss: 8.5.6 - postcss-modules: 6.0.1(postcss@8.5.6) - '@umami/prisma-client@0.19.0(@prisma/adapter-pg@6.15.0)(@prisma/client@6.15.0(prisma@6.15.0(typescript@5.9.2))(typescript@5.9.2))(@prisma/extension-read-replicas@0.4.1(@prisma/client@6.15.0(prisma@6.15.0(typescript@5.9.2))(typescript@5.9.2)))': dependencies: '@prisma/adapter-pg': 6.15.0 @@ -10724,7 +10362,7 @@ snapshots: - sass - use-sync-external-store - '@umami/redis-client@0.27.0': + '@umami/redis-client@0.29.0': dependencies: debug: 4.4.1(supports-color@8.1.1) redis: 4.7.1 @@ -11122,8 +10760,6 @@ snapshots: dependencies: tweetnacl: 0.14.5 - bcryptjs@2.4.3: {} - bcryptjs@3.0.2: {} blob-util@2.0.2: {} @@ -11176,10 +10812,6 @@ snapshots: esbuild: 0.25.9 load-tsconfig: 0.2.5 - busboy@1.6.0: - dependencies: - streamsearch: 1.1.0 - c12@3.1.0: dependencies: chokidar: 4.0.3 @@ -11983,8 +11615,6 @@ snapshots: iterator.prototype: 1.1.5 safe-array-concat: 1.1.3 - es-module-lexer@1.7.0: {} - es-object-atoms@1.1.1: dependencies: es-errors: 1.3.0 @@ -12619,8 +12249,6 @@ snapshots: dependencies: is-glob: 4.0.3 - glob-to-regexp@0.4.1: {} - glob@10.3.10: dependencies: foreground-child: 3.3.1 @@ -12798,8 +12426,6 @@ snapshots: immer@10.1.1: {} - immer@9.0.21: {} - import-cwd@3.0.0: dependencies: import-from: 3.0.0 @@ -12861,13 +12487,6 @@ snapshots: '@formatjs/icu-messageformat-parser': 2.11.2 tslib: 2.8.1 - intl-messageformat@9.13.0: - dependencies: - '@formatjs/ecma402-abstract': 1.11.4 - '@formatjs/fast-memoize': 1.2.1 - '@formatjs/icu-messageformat-parser': 2.1.0 - tslib: 2.8.1 - ipaddr.js@2.2.0: {} is-array-buffer@3.0.5: @@ -13930,40 +13549,6 @@ snapshots: neo-async@2.6.2: {} - next-basics@0.36.0(next@13.5.11(@babel/core@7.28.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1): - dependencies: - bcryptjs: 2.4.3 - jsonwebtoken: 9.0.2 - next: 13.5.11(@babel/core@7.28.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - pure-rand: 6.1.0 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - - next@13.5.11(@babel/core@7.28.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): - dependencies: - '@next/env': 13.5.11 - '@swc/helpers': 0.5.2 - busboy: 1.6.0 - caniuse-lite: 1.0.30001739 - postcss: 8.4.31 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - styled-jsx: 5.1.1(@babel/core@7.28.3)(react@18.3.1) - watchpack: 2.4.0 - optionalDependencies: - '@next/swc-darwin-arm64': 13.5.9 - '@next/swc-darwin-x64': 13.5.9 - '@next/swc-linux-arm64-gnu': 13.5.9 - '@next/swc-linux-arm64-musl': 13.5.9 - '@next/swc-linux-x64-gnu': 13.5.9 - '@next/swc-linux-x64-musl': 13.5.9 - '@next/swc-win32-arm64-msvc': 13.5.9 - '@next/swc-win32-ia32-msvc': 13.5.9 - '@next/swc-win32-x64-msvc': 13.5.9 - transitivePeerDependencies: - - '@babel/core' - - babel-plugin-macros - next@15.5.2(@babel/core@7.28.3)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.1(react@19.1.1))(react@19.1.1): dependencies: '@next/env': 15.5.2 @@ -14523,18 +14108,6 @@ snapshots: postcss-modules-values: 4.0.0(postcss@8.5.6) string-hash: 1.1.3 - postcss-modules@6.0.1(postcss@8.5.6): - dependencies: - generic-names: 4.0.0 - icss-utils: 5.1.0(postcss@8.5.6) - lodash.camelcase: 4.3.0 - postcss: 8.5.6 - postcss-modules-extract-imports: 3.1.0(postcss@8.5.6) - postcss-modules-local-by-default: 4.2.0(postcss@8.5.6) - postcss-modules-scope: 3.2.1(postcss@8.5.6) - postcss-modules-values: 4.0.0(postcss@8.5.6) - string-hash: 1.1.3 - postcss-nesting@10.2.0(postcss@8.5.6): dependencies: '@csstools/selector-specificity': 2.2.0(postcss-selector-parser@6.1.2) @@ -14907,12 +14480,6 @@ snapshots: react: 19.1.1 react-dom: 19.1.1(react@19.1.1) - react-dom@18.3.1(react@18.3.1): - dependencies: - loose-envify: 1.4.0 - react: 18.3.1 - scheduler: 0.23.2 - react-dom@19.1.1(react@19.1.1): dependencies: react: 19.1.1 @@ -14931,22 +14498,6 @@ snapshots: dependencies: react: 19.1.1 - react-intl@5.25.1(react@18.3.1)(typescript@4.9.5): - dependencies: - '@formatjs/ecma402-abstract': 1.11.4 - '@formatjs/icu-messageformat-parser': 2.1.0 - '@formatjs/intl': 2.2.1(typescript@4.9.5) - '@formatjs/intl-displaynames': 5.4.3 - '@formatjs/intl-listformat': 6.5.3 - '@types/hoist-non-react-statics': 3.3.7(@types/react@18.3.24) - '@types/react': 18.3.24 - hoist-non-react-statics: 3.3.2 - intl-messageformat: 9.13.0 - react: 18.3.1 - tslib: 2.8.1 - optionalDependencies: - typescript: 4.9.5 - react-intl@7.1.11(react@19.1.1)(typescript@5.9.2): dependencies: '@formatjs/ecma402-abstract': 2.3.4 @@ -15027,10 +14578,6 @@ snapshots: react: 19.1.1 react-dom: 19.1.1(react@19.1.1) - react@18.3.1: - dependencies: - loose-envify: 1.4.0 - react@19.1.1: {} read-babelrc-up@1.1.0: @@ -15200,17 +14747,6 @@ snapshots: optionalDependencies: '@babel/code-frame': 7.27.1 - rollup-plugin-esbuild@6.2.1(esbuild@0.25.9)(rollup@4.49.0): - dependencies: - debug: 4.4.1(supports-color@8.1.1) - es-module-lexer: 1.7.0 - esbuild: 0.25.9 - get-tsconfig: 4.10.1 - rollup: 4.49.0 - unplugin-utils: 0.2.5 - transitivePeerDependencies: - - supports-color - rollup-plugin-node-externals@8.1.0(rollup@4.49.0): dependencies: rollup: 4.49.0 @@ -15303,10 +14839,6 @@ snapshots: safer-buffer@2.1.2: {} - scheduler@0.23.2: - dependencies: - loose-envify: 1.4.0 - scheduler@0.26.0: {} schema-utils@2.7.1: @@ -15534,8 +15066,6 @@ snapshots: es-errors: 1.3.0 internal-slot: 1.1.0 - streamsearch@1.1.0: {} - string-argv@0.3.2: {} string-hash@1.1.3: {} @@ -15652,13 +15182,6 @@ snapshots: style-search@0.1.0: {} - styled-jsx@5.1.1(@babel/core@7.28.3)(react@18.3.1): - dependencies: - client-only: 0.0.1 - react: 18.3.1 - optionalDependencies: - '@babel/core': 7.28.3 - styled-jsx@5.1.6(@babel/core@7.28.3)(react@19.1.1): dependencies: client-only: 0.0.1 @@ -16069,11 +15592,6 @@ snapshots: universalify@2.0.1: {} - unplugin-utils@0.2.5: - dependencies: - pathe: 2.0.3 - picomatch: 4.0.3 - unrs-resolver@1.11.1: dependencies: napi-postinstall: 0.3.3 @@ -16114,10 +15632,6 @@ snapshots: dependencies: react: 19.1.1 - use-sync-external-store@1.5.0(react@18.3.1): - dependencies: - react: 18.3.1 - use-sync-external-store@1.5.0(react@19.1.1): dependencies: react: 19.1.1 @@ -16163,11 +15677,6 @@ snapshots: dependencies: makeerror: 1.0.12 - watchpack@2.4.0: - dependencies: - glob-to-regexp: 0.4.1 - graceful-fs: 4.2.11 - web-streams-polyfill@3.3.3: {} webidl-conversions@4.0.2: {} @@ -16325,14 +15834,6 @@ snapshots: zod@4.1.5: {} - zustand@4.5.7(@types/react@18.3.24)(immer@9.0.21)(react@18.3.1): - dependencies: - use-sync-external-store: 1.5.0(react@18.3.1) - optionalDependencies: - '@types/react': 18.3.24 - immer: 9.0.21 - react: 18.3.1 - zustand@5.0.8(@types/react@19.1.12)(immer@10.1.1)(react@19.1.1)(use-sync-external-store@1.5.0(react@19.1.1)): optionalDependencies: '@types/react': 19.1.12 diff --git a/rollup.components.config.js b/rollup.components.config.js deleted file mode 100644 index 04f23955..00000000 --- a/rollup.components.config.js +++ /dev/null @@ -1,77 +0,0 @@ -import path from 'path'; -import crypto from 'crypto'; -import resolve from '@rollup/plugin-node-resolve'; -import alias from '@rollup/plugin-alias'; -import json from '@rollup/plugin-json'; -import postcss from 'rollup-plugin-postcss'; -import copy from 'rollup-plugin-copy'; -import del from 'rollup-plugin-delete'; -import nodeExternals from 'rollup-plugin-node-externals'; -import esbuild from 'rollup-plugin-esbuild'; - -const md5 = str => crypto.createHash('md5').update(str).digest('hex'); - -const customResolver = resolve({ - extensions: ['.js', '.jsx', '.ts', '.tsx'], -}); - -const aliasConfig = { - entries: [ - { find: /^@/, replacement: path.resolve('./src/') }, - { find: /^public/, replacement: path.resolve('./public') }, - ], - customResolver, -}; - -const clientConfig = { - input: 'src/index.client.ts', - output: [ - { - file: 'dist/client/index.js', - format: 'es', - sourcemap: true, - }, - ], - plugins: [ - del({ targets: 'dist/*', runOnce: true }), - copy({ targets: [{ src: './package.components.json', dest: 'dist', rename: 'package.json' }] }), - postcss({ - config: false, - extract: 'styles.css', - sourceMap: true, - minimize: true, - modules: { - generateScopedName: function (name, filename, css) { - const file = path.basename(filename, '.css').replace('.module', ''); - const hash = Buffer.from(md5(`${name}:${filename}:${css}`)) - .toString('base64') - .substring(0, 5); - - return `${file}-${name}--${hash}`; - }, - }, - }), - alias(aliasConfig), - nodeExternals(), - json(), - esbuild({ - target: 'es6', - jsx: 'automatic', - loaders: { - '.js': 'jsx', - }, - }), - ], -}; - -const serverConfig = { - input: 'src/index.server.ts', - output: { - file: 'dist/server/index.ts', - format: 'es', - }, - plugins: [alias(aliasConfig), nodeExternals(), json()], - external: [/\.css/], -}; - -export default [clientConfig, serverConfig]; diff --git a/src/app/api/admin/teams/route.ts b/src/app/api/admin/teams/route.ts index a47930b8..fa203a29 100644 --- a/src/app/api/admin/teams/route.ts +++ b/src/app/api/admin/teams/route.ts @@ -2,7 +2,7 @@ import { z } from 'zod'; import { parseRequest } from '@/lib/request'; import { json, unauthorized } from '@/lib/response'; import { pagingParams, searchParams } from '@/lib/schema'; -import { canViewAllTeams } from '@/validations'; +import { canViewAllTeams } from '@/permissions'; import { getTeams } from '@/queries/prisma/team'; export async function GET(request: Request) { diff --git a/src/app/api/admin/users/route.ts b/src/app/api/admin/users/route.ts index ec074e01..2e522615 100644 --- a/src/app/api/admin/users/route.ts +++ b/src/app/api/admin/users/route.ts @@ -2,7 +2,7 @@ import { z } from 'zod'; import { parseRequest } from '@/lib/request'; import { json, unauthorized } from '@/lib/response'; import { pagingParams, searchParams } from '@/lib/schema'; -import { canViewUsers } from '@/validations'; +import { canViewUsers } from '@/permissions'; import { getUsers } from '@/queries/prisma/user'; export async function GET(request: Request) { diff --git a/src/app/api/admin/websites/route.ts b/src/app/api/admin/websites/route.ts index fda98a47..8d6d81bf 100644 --- a/src/app/api/admin/websites/route.ts +++ b/src/app/api/admin/websites/route.ts @@ -2,7 +2,7 @@ import { z } from 'zod'; import { parseRequest } from '@/lib/request'; import { json, unauthorized } from '@/lib/response'; import { pagingParams, searchParams } from '@/lib/schema'; -import { canViewAllWebsites } from '@/validations'; +import { canViewAllWebsites } from '@/permissions'; import { getWebsites } from '@/queries/prisma/website'; import { ROLES } from '@/lib/constants'; diff --git a/src/app/api/links/[linkId]/route.ts b/src/app/api/links/[linkId]/route.ts index 9647961c..f0598b8b 100644 --- a/src/app/api/links/[linkId]/route.ts +++ b/src/app/api/links/[linkId]/route.ts @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { canUpdateLink, canDeleteLink, canViewLink } from '@/validations'; +import { canUpdateLink, canDeleteLink, canViewLink } from '@/permissions'; import { parseRequest } from '@/lib/request'; import { ok, json, unauthorized, serverError, badRequest } from '@/lib/response'; import { deleteLink, getLink, updateLink } from '@/queries'; diff --git a/src/app/api/links/route.ts b/src/app/api/links/route.ts index 2ab561b6..4f10a8fd 100644 --- a/src/app/api/links/route.ts +++ b/src/app/api/links/route.ts @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { canCreateTeamWebsite, canCreateWebsite } from '@/validations'; +import { canCreateTeamWebsite, canCreateWebsite } from '@/permissions'; import { json, unauthorized } from '@/lib/response'; import { uuid } from '@/lib/crypto'; import { getQueryFilters, parseRequest } from '@/lib/request'; diff --git a/src/app/api/pixels/[pixelId]/route.ts b/src/app/api/pixels/[pixelId]/route.ts index 7a4bcfda..0926372a 100644 --- a/src/app/api/pixels/[pixelId]/route.ts +++ b/src/app/api/pixels/[pixelId]/route.ts @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { canUpdatePixel, canDeletePixel, canViewPixel } from '@/validations'; +import { canUpdatePixel, canDeletePixel, canViewPixel } from '@/permissions'; import { parseRequest } from '@/lib/request'; import { ok, json, unauthorized, serverError, badRequest } from '@/lib/response'; import { deletePixel, getPixel, updatePixel } from '@/queries'; diff --git a/src/app/api/pixels/route.ts b/src/app/api/pixels/route.ts index 07f05d6b..038d3660 100644 --- a/src/app/api/pixels/route.ts +++ b/src/app/api/pixels/route.ts @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { canCreateTeamWebsite, canCreateWebsite } from '@/validations'; +import { canCreateTeamWebsite, canCreateWebsite } from '@/permissions'; import { json, unauthorized } from '@/lib/response'; import { uuid } from '@/lib/crypto'; import { getQueryFilters, parseRequest } from '@/lib/request'; diff --git a/src/app/api/realtime/[websiteId]/route.ts b/src/app/api/realtime/[websiteId]/route.ts index baca763d..635a1bf2 100644 --- a/src/app/api/realtime/[websiteId]/route.ts +++ b/src/app/api/realtime/[websiteId]/route.ts @@ -1,6 +1,6 @@ import { json, unauthorized } from '@/lib/response'; import { getRealtimeData } from '@/queries'; -import { canViewWebsite } from '@/validations'; +import { canViewWebsite } from '@/permissions'; import { startOfMinute, subMinutes } from 'date-fns'; import { REALTIME_RANGE } from '@/lib/constants'; import { parseRequest, getQueryFilters } from '@/lib/request'; diff --git a/src/app/api/reports/[reportId]/route.ts b/src/app/api/reports/[reportId]/route.ts index 1c93028c..8f3e0c00 100644 --- a/src/app/api/reports/[reportId]/route.ts +++ b/src/app/api/reports/[reportId]/route.ts @@ -1,6 +1,6 @@ import { parseRequest } from '@/lib/request'; import { deleteReport, getReport, updateReport } from '@/queries'; -import { canDeleteReport, canUpdateReport, canViewReport } from '@/validations'; +import { canDeleteReport, canUpdateReport, canViewReport } from '@/permissions'; import { unauthorized, json, notFound, ok } from '@/lib/response'; import { reportSchema } from '@/lib/schema'; diff --git a/src/app/api/reports/attribution/route.ts b/src/app/api/reports/attribution/route.ts index d8032245..4c500377 100644 --- a/src/app/api/reports/attribution/route.ts +++ b/src/app/api/reports/attribution/route.ts @@ -1,4 +1,4 @@ -import { canViewWebsite } from '@/validations'; +import { canViewWebsite } from '@/permissions'; import { getQueryFilters, parseRequest, setWebsiteDate } from '@/lib/request'; import { json, unauthorized } from '@/lib/response'; import { reportResultSchema } from '@/lib/schema'; diff --git a/src/app/api/reports/breakdown/route.ts b/src/app/api/reports/breakdown/route.ts index 7db9f923..128229ac 100644 --- a/src/app/api/reports/breakdown/route.ts +++ b/src/app/api/reports/breakdown/route.ts @@ -1,4 +1,4 @@ -import { canViewWebsite } from '@/validations'; +import { canViewWebsite } from '@/permissions'; import { unauthorized, json } from '@/lib/response'; import { getQueryFilters, parseRequest, setWebsiteDate } from '@/lib/request'; import { BreakdownParameters, getBreakdown } from '@/queries'; diff --git a/src/app/api/reports/funnel/route.ts b/src/app/api/reports/funnel/route.ts index d3e386cc..cef2752a 100644 --- a/src/app/api/reports/funnel/route.ts +++ b/src/app/api/reports/funnel/route.ts @@ -1,4 +1,4 @@ -import { canViewWebsite } from '@/validations'; +import { canViewWebsite } from '@/permissions'; import { unauthorized, json } from '@/lib/response'; import { parseRequest, getQueryFilters, setWebsiteDate } from '@/lib/request'; import { FunnelParameters, getFunnel } from '@/queries'; diff --git a/src/app/api/reports/goal/route.ts b/src/app/api/reports/goal/route.ts index 47e5ba91..f9848fa7 100644 --- a/src/app/api/reports/goal/route.ts +++ b/src/app/api/reports/goal/route.ts @@ -1,4 +1,4 @@ -import { canViewWebsite } from '@/validations'; +import { canViewWebsite } from '@/permissions'; import { unauthorized, json } from '@/lib/response'; import { getQueryFilters, parseRequest, setWebsiteDate } from '@/lib/request'; import { getGoal, GoalParameters } from '@/queries/sql/reports/getGoal'; diff --git a/src/app/api/reports/journey/route.ts b/src/app/api/reports/journey/route.ts index 37a470f4..d512a191 100644 --- a/src/app/api/reports/journey/route.ts +++ b/src/app/api/reports/journey/route.ts @@ -1,4 +1,4 @@ -import { canViewWebsite } from '@/validations'; +import { canViewWebsite } from '@/permissions'; import { unauthorized, json } from '@/lib/response'; import { getQueryFilters, parseRequest } from '@/lib/request'; import { getJourney } from '@/queries'; diff --git a/src/app/api/reports/retention/route.ts b/src/app/api/reports/retention/route.ts index 7297d744..f016c4fe 100644 --- a/src/app/api/reports/retention/route.ts +++ b/src/app/api/reports/retention/route.ts @@ -1,4 +1,4 @@ -import { canViewWebsite } from '@/validations'; +import { canViewWebsite } from '@/permissions'; import { unauthorized, json } from '@/lib/response'; import { parseRequest, getQueryFilters, setWebsiteDate } from '@/lib/request'; import { getRetention, RetentionParameters } from '@/queries'; diff --git a/src/app/api/reports/revenue/route.ts b/src/app/api/reports/revenue/route.ts index 7e1137bc..75930adc 100644 --- a/src/app/api/reports/revenue/route.ts +++ b/src/app/api/reports/revenue/route.ts @@ -1,4 +1,4 @@ -import { canViewWebsite } from '@/validations'; +import { canViewWebsite } from '@/permissions'; import { unauthorized, json } from '@/lib/response'; import { parseRequest, getQueryFilters, setWebsiteDate } from '@/lib/request'; import { reportResultSchema } from '@/lib/schema'; diff --git a/src/app/api/reports/route.ts b/src/app/api/reports/route.ts index ce7ba50c..8777f645 100644 --- a/src/app/api/reports/route.ts +++ b/src/app/api/reports/route.ts @@ -2,7 +2,7 @@ import { z } from 'zod'; import { uuid } from '@/lib/crypto'; import { pagingParams, reportSchema } from '@/lib/schema'; import { parseRequest } from '@/lib/request'; -import { canViewWebsite, canUpdateWebsite } from '@/validations'; +import { canViewWebsite, canUpdateWebsite } from '@/permissions'; import { unauthorized, json } from '@/lib/response'; import { getReports, createReport } from '@/queries'; diff --git a/src/app/api/reports/utm/route.ts b/src/app/api/reports/utm/route.ts index 73009c29..a46d3858 100644 --- a/src/app/api/reports/utm/route.ts +++ b/src/app/api/reports/utm/route.ts @@ -1,4 +1,4 @@ -import { canViewWebsite } from '@/validations'; +import { canViewWebsite } from '@/permissions'; import { unauthorized, json } from '@/lib/response'; import { getQueryFilters, parseRequest, setWebsiteDate } from '@/lib/request'; import { getUTM, UTMParameters } from '@/queries'; diff --git a/src/app/api/teams/[teamId]/links/route.ts b/src/app/api/teams/[teamId]/links/route.ts index b3be8a5c..115316a6 100644 --- a/src/app/api/teams/[teamId]/links/route.ts +++ b/src/app/api/teams/[teamId]/links/route.ts @@ -1,6 +1,6 @@ import { z } from 'zod'; import { unauthorized, json } from '@/lib/response'; -import { canViewTeam } from '@/validations'; +import { canViewTeam } from '@/permissions'; import { getQueryFilters, parseRequest } from '@/lib/request'; import { pagingParams, searchParams } from '@/lib/schema'; import { getTeamLinks } from '@/queries'; diff --git a/src/app/api/teams/[teamId]/pixels/route.ts b/src/app/api/teams/[teamId]/pixels/route.ts index 41d9ce0f..5a904adb 100644 --- a/src/app/api/teams/[teamId]/pixels/route.ts +++ b/src/app/api/teams/[teamId]/pixels/route.ts @@ -1,6 +1,6 @@ import { z } from 'zod'; import { unauthorized, json } from '@/lib/response'; -import { canViewTeam } from '@/validations'; +import { canViewTeam } from '@/permissions'; import { getQueryFilters, parseRequest } from '@/lib/request'; import { pagingParams, searchParams } from '@/lib/schema'; import { getTeamPixels } from '@/queries'; diff --git a/src/app/api/teams/[teamId]/route.ts b/src/app/api/teams/[teamId]/route.ts index caa167e3..da5e4a01 100644 --- a/src/app/api/teams/[teamId]/route.ts +++ b/src/app/api/teams/[teamId]/route.ts @@ -1,6 +1,6 @@ import { z } from 'zod'; import { unauthorized, json, notFound, ok } from '@/lib/response'; -import { canDeleteTeam, canUpdateTeam, canViewTeam } from '@/validations'; +import { canDeleteTeam, canUpdateTeam, canViewTeam } from '@/permissions'; import { parseRequest } from '@/lib/request'; import { deleteTeam, getTeam, updateTeam } from '@/queries'; diff --git a/src/app/api/teams/[teamId]/users/[userId]/route.ts b/src/app/api/teams/[teamId]/users/[userId]/route.ts index 62e0a32c..71cf1bd8 100644 --- a/src/app/api/teams/[teamId]/users/[userId]/route.ts +++ b/src/app/api/teams/[teamId]/users/[userId]/route.ts @@ -1,4 +1,4 @@ -import { canDeleteTeamUser, canUpdateTeam } from '@/validations'; +import { canDeleteTeamUser, canUpdateTeam } from '@/permissions'; import { parseRequest } from '@/lib/request'; import { badRequest, json, ok, unauthorized } from '@/lib/response'; import { deleteTeamUser, getTeamUser, updateTeamUser } from '@/queries'; diff --git a/src/app/api/teams/[teamId]/users/route.ts b/src/app/api/teams/[teamId]/users/route.ts index 93e41f60..2bd40e35 100644 --- a/src/app/api/teams/[teamId]/users/route.ts +++ b/src/app/api/teams/[teamId]/users/route.ts @@ -1,6 +1,6 @@ import { z } from 'zod'; import { unauthorized, json, badRequest } from '@/lib/response'; -import { canAddUserToTeam, canViewTeam } from '@/validations'; +import { canAddUserToTeam, canViewTeam } from '@/permissions'; import { getQueryFilters, parseRequest } from '@/lib/request'; import { pagingParams, teamRoleParam, searchParams } from '@/lib/schema'; import { createTeamUser, getTeamUser, getTeamUsers } from '@/queries'; diff --git a/src/app/api/teams/[teamId]/websites/route.ts b/src/app/api/teams/[teamId]/websites/route.ts index 594416fa..d9188f39 100644 --- a/src/app/api/teams/[teamId]/websites/route.ts +++ b/src/app/api/teams/[teamId]/websites/route.ts @@ -1,6 +1,6 @@ import { z } from 'zod'; import { unauthorized, json } from '@/lib/response'; -import { canViewTeam } from '@/validations'; +import { canViewTeam } from '@/permissions'; import { getQueryFilters, parseRequest } from '@/lib/request'; import { pagingParams, searchParams } from '@/lib/schema'; import { getTeamWebsites } from '@/queries'; diff --git a/src/app/api/teams/join/route.ts b/src/app/api/teams/join/route.ts index b17a2c08..6f64d4db 100644 --- a/src/app/api/teams/join/route.ts +++ b/src/app/api/teams/join/route.ts @@ -1,6 +1,6 @@ import { z } from 'zod'; import { unauthorized, json, badRequest, notFound } from '@/lib/response'; -import { canCreateTeam } from '@/validations'; +import { canCreateTeam } from '@/permissions'; import { parseRequest } from '@/lib/request'; import { ROLES } from '@/lib/constants'; import { createTeamUser, findTeam, getTeamUser } from '@/queries'; diff --git a/src/app/api/teams/route.ts b/src/app/api/teams/route.ts index 5ea1064b..024f39ef 100644 --- a/src/app/api/teams/route.ts +++ b/src/app/api/teams/route.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; import { getRandomChars } from '@/lib/generate'; import { unauthorized, json } from '@/lib/response'; -import { canCreateTeam } from '@/validations'; +import { canCreateTeam } from '@/permissions'; import { uuid } from '@/lib/crypto'; import { parseRequest } from '@/lib/request'; import { createTeam } from '@/queries'; diff --git a/src/app/api/users/[userId]/route.ts b/src/app/api/users/[userId]/route.ts index 2a822e1d..3fe7ecf4 100644 --- a/src/app/api/users/[userId]/route.ts +++ b/src/app/api/users/[userId]/route.ts @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { canUpdateUser, canViewUser, canDeleteUser } from '@/validations'; +import { canUpdateUser, canViewUser, canDeleteUser } from '@/permissions'; import { getUser, getUserByUsername, updateUser, deleteUser } from '@/queries'; import { json, unauthorized, badRequest, ok } from '@/lib/response'; import { hashPassword } from '@/lib/auth'; diff --git a/src/app/api/users/route.ts b/src/app/api/users/route.ts index 4b7f4d49..3ebaeac1 100644 --- a/src/app/api/users/route.ts +++ b/src/app/api/users/route.ts @@ -1,6 +1,6 @@ import { z } from 'zod'; import { hashPassword } from '@/lib/auth'; -import { canCreateUser } from '@/validations'; +import { canCreateUser } from '@/permissions'; import { ROLES } from '@/lib/constants'; import { uuid } from '@/lib/crypto'; import { parseRequest } from '@/lib/request'; diff --git a/src/app/api/websites/[websiteId]/active/route.ts b/src/app/api/websites/[websiteId]/active/route.ts index c30ce910..08dc958f 100644 --- a/src/app/api/websites/[websiteId]/active/route.ts +++ b/src/app/api/websites/[websiteId]/active/route.ts @@ -1,4 +1,4 @@ -import { canViewWebsite } from '@/validations'; +import { canViewWebsite } from '@/permissions'; import { json, unauthorized } from '@/lib/response'; import { getActiveVisitors } from '@/queries'; import { parseRequest } from '@/lib/request'; diff --git a/src/app/api/websites/[websiteId]/daterange/route.ts b/src/app/api/websites/[websiteId]/daterange/route.ts index 7c208308..8b5f41d0 100644 --- a/src/app/api/websites/[websiteId]/daterange/route.ts +++ b/src/app/api/websites/[websiteId]/daterange/route.ts @@ -1,4 +1,4 @@ -import { canViewWebsite } from '@/validations'; +import { canViewWebsite } from '@/permissions'; import { getWebsiteDateRange } from '@/queries'; import { json, unauthorized } from '@/lib/response'; import { parseRequest } from '@/lib/request'; diff --git a/src/app/api/websites/[websiteId]/event-data/[eventId]/route.ts b/src/app/api/websites/[websiteId]/event-data/[eventId]/route.ts index 01258bb4..9135f70d 100644 --- a/src/app/api/websites/[websiteId]/event-data/[eventId]/route.ts +++ b/src/app/api/websites/[websiteId]/event-data/[eventId]/route.ts @@ -1,6 +1,6 @@ import { parseRequest } from '@/lib/request'; import { unauthorized, json } from '@/lib/response'; -import { canViewWebsite } from '@/validations'; +import { canViewWebsite } from '@/permissions'; import { getEventData } from '@/queries/sql/events/getEventData'; export async function GET( diff --git a/src/app/api/websites/[websiteId]/event-data/events/route.ts b/src/app/api/websites/[websiteId]/event-data/events/route.ts index 9511d0d1..b55d1d2e 100644 --- a/src/app/api/websites/[websiteId]/event-data/events/route.ts +++ b/src/app/api/websites/[websiteId]/event-data/events/route.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; import { getQueryFilters, parseRequest } from '@/lib/request'; import { unauthorized, json } from '@/lib/response'; -import { canViewWebsite } from '@/validations'; +import { canViewWebsite } from '@/permissions'; import { getEventDataEvents } from '@/queries/sql/events/getEventDataEvents'; export async function GET( diff --git a/src/app/api/websites/[websiteId]/event-data/fields/route.ts b/src/app/api/websites/[websiteId]/event-data/fields/route.ts index 371d8ec4..51458706 100644 --- a/src/app/api/websites/[websiteId]/event-data/fields/route.ts +++ b/src/app/api/websites/[websiteId]/event-data/fields/route.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; import { getQueryFilters, parseRequest } from '@/lib/request'; import { unauthorized, json } from '@/lib/response'; -import { canViewWebsite } from '@/validations'; +import { canViewWebsite } from '@/permissions'; import { getEventDataFields } from '@/queries'; export async function GET( diff --git a/src/app/api/websites/[websiteId]/event-data/properties/route.ts b/src/app/api/websites/[websiteId]/event-data/properties/route.ts index 001d5b61..b20230b5 100644 --- a/src/app/api/websites/[websiteId]/event-data/properties/route.ts +++ b/src/app/api/websites/[websiteId]/event-data/properties/route.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; import { getQueryFilters, parseRequest } from '@/lib/request'; import { unauthorized, json } from '@/lib/response'; -import { canViewWebsite } from '@/validations'; +import { canViewWebsite } from '@/permissions'; import { getEventDataProperties } from '@/queries'; export async function GET( diff --git a/src/app/api/websites/[websiteId]/event-data/stats/route.ts b/src/app/api/websites/[websiteId]/event-data/stats/route.ts index 5b799153..6c173cc2 100644 --- a/src/app/api/websites/[websiteId]/event-data/stats/route.ts +++ b/src/app/api/websites/[websiteId]/event-data/stats/route.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; import { getQueryFilters, parseRequest } from '@/lib/request'; import { unauthorized, json } from '@/lib/response'; -import { canViewWebsite } from '@/validations'; +import { canViewWebsite } from '@/permissions'; import { getEventDataStats } from '@/queries'; export async function GET( diff --git a/src/app/api/websites/[websiteId]/event-data/values/route.ts b/src/app/api/websites/[websiteId]/event-data/values/route.ts index 1d8438b7..e70ae198 100644 --- a/src/app/api/websites/[websiteId]/event-data/values/route.ts +++ b/src/app/api/websites/[websiteId]/event-data/values/route.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; import { getQueryFilters, parseRequest } from '@/lib/request'; import { unauthorized, json } from '@/lib/response'; -import { canViewWebsite } from '@/validations'; +import { canViewWebsite } from '@/permissions'; import { getEventDataValues } from '@/queries'; export async function GET( diff --git a/src/app/api/websites/[websiteId]/events/route.ts b/src/app/api/websites/[websiteId]/events/route.ts index b863fa9c..2f6a7a34 100644 --- a/src/app/api/websites/[websiteId]/events/route.ts +++ b/src/app/api/websites/[websiteId]/events/route.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; import { getQueryFilters, parseRequest } from '@/lib/request'; import { unauthorized, json } from '@/lib/response'; -import { canViewWebsite } from '@/validations'; +import { canViewWebsite } from '@/permissions'; import { dateRangeParams, pagingParams, filterParams, searchParams } from '@/lib/schema'; import { getWebsiteEvents } from '@/queries'; diff --git a/src/app/api/websites/[websiteId]/events/series/route.ts b/src/app/api/websites/[websiteId]/events/series/route.ts index 542fe07b..05ee5f19 100644 --- a/src/app/api/websites/[websiteId]/events/series/route.ts +++ b/src/app/api/websites/[websiteId]/events/series/route.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; import { parseRequest, getQueryFilters } from '@/lib/request'; import { unauthorized, json } from '@/lib/response'; -import { canViewWebsite } from '@/validations'; +import { canViewWebsite } from '@/permissions'; import { filterParams, timezoneParam, unitParam } from '@/lib/schema'; import { getEventStats } from '@/queries'; diff --git a/src/app/api/websites/[websiteId]/export/route.ts b/src/app/api/websites/[websiteId]/export/route.ts index 4247da7d..8d4a0976 100644 --- a/src/app/api/websites/[websiteId]/export/route.ts +++ b/src/app/api/websites/[websiteId]/export/route.ts @@ -3,7 +3,7 @@ import JSZip from 'jszip'; import Papa from 'papaparse'; import { getQueryFilters, parseRequest } from '@/lib/request'; import { unauthorized, json } from '@/lib/response'; -import { canViewWebsite } from '@/validations'; +import { canViewWebsite } from '@/permissions'; import { pagingParams, dateRangeParams } from '@/lib/schema'; import { getEventMetrics, getPageviewMetrics, getSessionMetrics } from '@/queries'; diff --git a/src/app/api/websites/[websiteId]/metrics/expanded/route.ts b/src/app/api/websites/[websiteId]/metrics/expanded/route.ts index e0b62ffd..b60e7012 100644 --- a/src/app/api/websites/[websiteId]/metrics/expanded/route.ts +++ b/src/app/api/websites/[websiteId]/metrics/expanded/route.ts @@ -1,4 +1,4 @@ -import { canViewWebsite } from '@/validations'; +import { canViewWebsite } from '@/permissions'; import { EVENT_COLUMNS, SESSION_COLUMNS } from '@/lib/constants'; import { getQueryFilters, parseRequest } from '@/lib/request'; import { badRequest, json, unauthorized } from '@/lib/response'; diff --git a/src/app/api/websites/[websiteId]/metrics/route.ts b/src/app/api/websites/[websiteId]/metrics/route.ts index ea76b4e8..840359d7 100644 --- a/src/app/api/websites/[websiteId]/metrics/route.ts +++ b/src/app/api/websites/[websiteId]/metrics/route.ts @@ -1,4 +1,4 @@ -import { canViewWebsite } from '@/validations'; +import { canViewWebsite } from '@/permissions'; import { EVENT_COLUMNS, SESSION_COLUMNS } from '@/lib/constants'; import { getQueryFilters, parseRequest } from '@/lib/request'; import { badRequest, json, unauthorized } from '@/lib/response'; diff --git a/src/app/api/websites/[websiteId]/pageviews/route.ts b/src/app/api/websites/[websiteId]/pageviews/route.ts index bfcc8f07..54705f1a 100644 --- a/src/app/api/websites/[websiteId]/pageviews/route.ts +++ b/src/app/api/websites/[websiteId]/pageviews/route.ts @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { canViewWebsite } from '@/validations'; +import { canViewWebsite } from '@/permissions'; import { getQueryFilters, parseRequest } from '@/lib/request'; import { dateRangeParams, filterParams } from '@/lib/schema'; import { getCompareDate } from '@/lib/date'; diff --git a/src/app/api/websites/[websiteId]/reports/route.ts b/src/app/api/websites/[websiteId]/reports/route.ts index 60e9b2d9..89c7f735 100644 --- a/src/app/api/websites/[websiteId]/reports/route.ts +++ b/src/app/api/websites/[websiteId]/reports/route.ts @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { canViewWebsite } from '@/validations'; +import { canViewWebsite } from '@/permissions'; import { getReports } from '@/queries'; import { filterParams, pagingParams } from '@/lib/schema'; import { parseRequest } from '@/lib/request'; diff --git a/src/app/api/websites/[websiteId]/reset/route.ts b/src/app/api/websites/[websiteId]/reset/route.ts index 36732205..9dae72e5 100644 --- a/src/app/api/websites/[websiteId]/reset/route.ts +++ b/src/app/api/websites/[websiteId]/reset/route.ts @@ -1,4 +1,4 @@ -import { canUpdateWebsite } from '@/validations'; +import { canUpdateWebsite } from '@/permissions'; import { resetWebsite } from '@/queries'; import { unauthorized, ok } from '@/lib/response'; import { parseRequest } from '@/lib/request'; diff --git a/src/app/api/websites/[websiteId]/route.ts b/src/app/api/websites/[websiteId]/route.ts index 466711ad..66dc3d0b 100644 --- a/src/app/api/websites/[websiteId]/route.ts +++ b/src/app/api/websites/[websiteId]/route.ts @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { canUpdateWebsite, canDeleteWebsite, canViewWebsite } from '@/validations'; +import { canUpdateWebsite, canDeleteWebsite, canViewWebsite } from '@/permissions'; import { SHARE_ID_REGEX } from '@/lib/constants'; import { parseRequest } from '@/lib/request'; import { ok, json, unauthorized, serverError, badRequest } from '@/lib/response'; diff --git a/src/app/api/websites/[websiteId]/segments/[segmentId]/route.ts b/src/app/api/websites/[websiteId]/segments/[segmentId]/route.ts index 588a4cac..4418cfe5 100644 --- a/src/app/api/websites/[websiteId]/segments/[segmentId]/route.ts +++ b/src/app/api/websites/[websiteId]/segments/[segmentId]/route.ts @@ -1,4 +1,4 @@ -import { canDeleteWebsite, canUpdateWebsite, canViewWebsite } from '@/validations'; +import { canDeleteWebsite, canUpdateWebsite, canViewWebsite } from '@/permissions'; import { parseRequest } from '@/lib/request'; import { json, notFound, ok, unauthorized } from '@/lib/response'; import { segmentTypeParam } from '@/lib/schema'; diff --git a/src/app/api/websites/[websiteId]/segments/route.ts b/src/app/api/websites/[websiteId]/segments/route.ts index 75d99289..fcc2e0a3 100644 --- a/src/app/api/websites/[websiteId]/segments/route.ts +++ b/src/app/api/websites/[websiteId]/segments/route.ts @@ -1,4 +1,4 @@ -import { canUpdateWebsite, canViewWebsite } from '@/validations'; +import { canUpdateWebsite, canViewWebsite } from '@/permissions'; import { uuid } from '@/lib/crypto'; import { getQueryFilters, parseRequest } from '@/lib/request'; import { json, unauthorized } from '@/lib/response'; diff --git a/src/app/api/websites/[websiteId]/session-data/properties/route.ts b/src/app/api/websites/[websiteId]/session-data/properties/route.ts index 5c7e2c47..9abdcf81 100644 --- a/src/app/api/websites/[websiteId]/session-data/properties/route.ts +++ b/src/app/api/websites/[websiteId]/session-data/properties/route.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; import { getQueryFilters, parseRequest } from '@/lib/request'; import { unauthorized, json } from '@/lib/response'; -import { canViewWebsite } from '@/validations'; +import { canViewWebsite } from '@/permissions'; import { getSessionDataProperties } from '@/queries'; export async function GET( diff --git a/src/app/api/websites/[websiteId]/session-data/values/route.ts b/src/app/api/websites/[websiteId]/session-data/values/route.ts index 27e95251..ab9abb0d 100644 --- a/src/app/api/websites/[websiteId]/session-data/values/route.ts +++ b/src/app/api/websites/[websiteId]/session-data/values/route.ts @@ -1,4 +1,4 @@ -import { canViewWebsite } from '@/validations'; +import { canViewWebsite } from '@/permissions'; import { getQueryFilters, parseRequest } from '@/lib/request'; import { json, unauthorized } from '@/lib/response'; import { getSessionDataValues } from '@/queries'; diff --git a/src/app/api/websites/[websiteId]/sessions/[sessionId]/activity/route.ts b/src/app/api/websites/[websiteId]/sessions/[sessionId]/activity/route.ts index ca226120..453ed002 100644 --- a/src/app/api/websites/[websiteId]/sessions/[sessionId]/activity/route.ts +++ b/src/app/api/websites/[websiteId]/sessions/[sessionId]/activity/route.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; import { parseRequest, getQueryFilters } from '@/lib/request'; import { unauthorized, json } from '@/lib/response'; -import { canViewWebsite } from '@/validations'; +import { canViewWebsite } from '@/permissions'; import { getSessionActivity } from '@/queries'; export async function GET( diff --git a/src/app/api/websites/[websiteId]/sessions/[sessionId]/properties/route.ts b/src/app/api/websites/[websiteId]/sessions/[sessionId]/properties/route.ts index 21663462..9ccd1f85 100644 --- a/src/app/api/websites/[websiteId]/sessions/[sessionId]/properties/route.ts +++ b/src/app/api/websites/[websiteId]/sessions/[sessionId]/properties/route.ts @@ -1,5 +1,5 @@ import { unauthorized, json } from '@/lib/response'; -import { canViewWebsite } from '@/validations'; +import { canViewWebsite } from '@/permissions'; import { getSessionData } from '@/queries'; import { parseRequest } from '@/lib/request'; diff --git a/src/app/api/websites/[websiteId]/sessions/[sessionId]/route.ts b/src/app/api/websites/[websiteId]/sessions/[sessionId]/route.ts index d110ebeb..468597ad 100644 --- a/src/app/api/websites/[websiteId]/sessions/[sessionId]/route.ts +++ b/src/app/api/websites/[websiteId]/sessions/[sessionId]/route.ts @@ -1,5 +1,5 @@ import { unauthorized, json } from '@/lib/response'; -import { canViewWebsite } from '@/validations'; +import { canViewWebsite } from '@/permissions'; import { getWebsiteSession } from '@/queries'; import { parseRequest } from '@/lib/request'; diff --git a/src/app/api/websites/[websiteId]/sessions/route.ts b/src/app/api/websites/[websiteId]/sessions/route.ts index 6a8c071b..53250633 100644 --- a/src/app/api/websites/[websiteId]/sessions/route.ts +++ b/src/app/api/websites/[websiteId]/sessions/route.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; import { getQueryFilters, parseRequest } from '@/lib/request'; import { unauthorized, json } from '@/lib/response'; -import { canViewWebsite } from '@/validations'; +import { canViewWebsite } from '@/permissions'; import { dateRangeParams, filterParams, pagingParams, searchParams } from '@/lib/schema'; import { getWebsiteSessions } from '@/queries'; diff --git a/src/app/api/websites/[websiteId]/sessions/stats/route.ts b/src/app/api/websites/[websiteId]/sessions/stats/route.ts index 619a05ad..af76aca2 100644 --- a/src/app/api/websites/[websiteId]/sessions/stats/route.ts +++ b/src/app/api/websites/[websiteId]/sessions/stats/route.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; import { parseRequest, getQueryFilters } from '@/lib/request'; import { unauthorized, json } from '@/lib/response'; -import { canViewWebsite } from '@/validations'; +import { canViewWebsite } from '@/permissions'; import { filterParams } from '@/lib/schema'; import { getWebsiteSessionStats } from '@/queries'; diff --git a/src/app/api/websites/[websiteId]/sessions/weekly/route.ts b/src/app/api/websites/[websiteId]/sessions/weekly/route.ts index fa52e19c..395b4555 100644 --- a/src/app/api/websites/[websiteId]/sessions/weekly/route.ts +++ b/src/app/api/websites/[websiteId]/sessions/weekly/route.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; import { getQueryFilters, parseRequest } from '@/lib/request'; import { unauthorized, json } from '@/lib/response'; -import { canViewWebsite } from '@/validations'; +import { canViewWebsite } from '@/permissions'; import { pagingParams, timezoneParam } from '@/lib/schema'; import { getWeeklyTraffic } from '@/queries'; diff --git a/src/app/api/websites/[websiteId]/stats/route.ts b/src/app/api/websites/[websiteId]/stats/route.ts index 302346c2..f3b1a708 100644 --- a/src/app/api/websites/[websiteId]/stats/route.ts +++ b/src/app/api/websites/[websiteId]/stats/route.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; import { parseRequest, getQueryFilters } from '@/lib/request'; import { unauthorized, json } from '@/lib/response'; -import { canViewWebsite } from '@/validations'; +import { canViewWebsite } from '@/permissions'; import { dateRangeParams, filterParams } from '@/lib/schema'; import { getWebsiteStats } from '@/queries'; import { getCompareDate } from '@/lib/date'; diff --git a/src/app/api/websites/[websiteId]/transfer/route.ts b/src/app/api/websites/[websiteId]/transfer/route.ts index 2a2826ae..1bb0a0f5 100644 --- a/src/app/api/websites/[websiteId]/transfer/route.ts +++ b/src/app/api/websites/[websiteId]/transfer/route.ts @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { canTransferWebsiteToTeam, canTransferWebsiteToUser } from '@/validations'; +import { canTransferWebsiteToTeam, canTransferWebsiteToUser } from '@/permissions'; import { updateWebsite } from '@/queries'; import { parseRequest } from '@/lib/request'; import { badRequest, unauthorized, json } from '@/lib/response'; diff --git a/src/app/api/websites/[websiteId]/values/route.ts b/src/app/api/websites/[websiteId]/values/route.ts index 80f96509..b6526d94 100644 --- a/src/app/api/websites/[websiteId]/values/route.ts +++ b/src/app/api/websites/[websiteId]/values/route.ts @@ -1,4 +1,4 @@ -import { canViewWebsite } from '@/validations'; +import { canViewWebsite } from '@/permissions'; import { EVENT_COLUMNS, FILTER_COLUMNS, SEGMENT_TYPES, SESSION_COLUMNS } from '@/lib/constants'; import { getQueryFilters, parseRequest } from '@/lib/request'; import { badRequest, json, unauthorized } from '@/lib/response'; diff --git a/src/app/api/websites/route.ts b/src/app/api/websites/route.ts index 963f8531..f9b18be8 100644 --- a/src/app/api/websites/route.ts +++ b/src/app/api/websites/route.ts @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { canCreateTeamWebsite, canCreateWebsite } from '@/validations'; +import { canCreateTeamWebsite, canCreateWebsite } from '@/permissions'; import { json, unauthorized } from '@/lib/response'; import { uuid } from '@/lib/crypto'; import { parseRequest } from '@/lib/request'; diff --git a/src/components/common/FilterLink.module.css b/src/components/common/FilterLink.module.css deleted file mode 100644 index 03898686..00000000 --- a/src/components/common/FilterLink.module.css +++ /dev/null @@ -1,38 +0,0 @@ -.row { - display: flex; - align-items: center; - gap: 10px; - width: 100%; -} - -.row.inactive { - color: var(--base500); -} - -.row.inactive img { - opacity: 0.35; -} - -.row.active { - color: var(--base900); - font-weight: 600; -} - -.row .link { - display: none; - margin-inline-start: 20px; -} - -.row .label { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.row:hover .link { - display: block; -} - -.icon { - cursor: pointer; -} diff --git a/src/components/common/HamburgerButton.module.css b/src/components/common/HamburgerButton.module.css deleted file mode 100644 index 60398585..00000000 --- a/src/components/common/HamburgerButton.module.css +++ /dev/null @@ -1,9 +0,0 @@ -.button { - display: none; -} - -@media only screen and (max-width: 768px) { - .button { - display: flex; - } -} diff --git a/src/components/common/PageBody.tsx b/src/components/common/PageBody.tsx index 0733a10d..7478280a 100644 --- a/src/components/common/PageBody.tsx +++ b/src/components/common/PageBody.tsx @@ -3,8 +3,10 @@ import { ReactNode } from 'react'; import { AlertBanner, Loading, Column, ColumnProps } from '@umami/react-zen'; import { useMessages } from '@/components/hooks'; +const DEFAULT_WIDTH = '1320px'; + export function PageBody({ - maxWidth = '1320px', + maxWidth = DEFAULT_WIDTH, error, isLoading, children, diff --git a/src/components/hooks/useApi.ts b/src/components/hooks/useApi.ts index 5b6b5482..fd0e26c6 100644 --- a/src/components/hooks/useApi.ts +++ b/src/components/hooks/useApi.ts @@ -10,7 +10,7 @@ const selector = (state: { shareToken: { token?: string } }) => state.shareToken async function handleResponse(res: FetchResponse): Promise { if (res.error) { const { message, code } = res?.error?.error || {}; - return Promise.reject(new Error(code || message || 'Unexpectd error.')); + return Promise.reject(new Error(code || message || 'Unexpected error.')); } return Promise.resolve(res.data); } diff --git a/src/index.server.ts b/src/index.server.ts deleted file mode 100644 index 3b999f5e..00000000 --- a/src/index.server.ts +++ /dev/null @@ -1,12 +0,0 @@ -export * as auth from '@/lib/auth'; -export * as clickhouse from '@/lib/clickhouse'; -export * as client from '@/lib/client'; -export { ROLES } from '@/lib/constants'; -export * as fetch from '@/lib/fetch'; -export * as prisma from '@/lib/prisma'; -export * as redis from '@/lib/redis'; -export * as request from '@/lib/request'; -export * as response from '@/lib/response'; -export * as storage from '@/lib/storage'; -export * as url from '@/lib/url'; -export * as utils from '@/lib/utils'; diff --git a/src/index.client.ts b/src/index.ts similarity index 84% rename from src/index.client.ts rename to src/index.ts index ab8faa3a..5ef1fe13 100644 --- a/src/index.client.ts +++ b/src/index.ts @@ -40,15 +40,24 @@ export * from '@/app/(main)/websites/WebsitesTable'; export * from '@/app/(main)/websites/WebsiteProvider'; +export * from '@/components/common/ActionForm'; export * from '@/components/common/ConfirmationForm'; export * from '@/components/common/DataGrid'; +export * from '@/components/common/DateDisplay'; +export * from '@/components/common/DateDistance'; export * from '@/components/common/Empty'; +export * from '@/components/common/EmptyPlaceholder'; export * from '@/components/common/ErrorBoundary'; export * from '@/components/common/ErrorMessage'; +export * from '@/components/common/ExternalLink'; export * from '@/components/common/Favicon'; -export * from '@/components/common/FilterLink'; export * from '@/components/common/LinkButton'; +export * from '@/components/common/PageBody'; +export * from '@/components/common/PageHeader'; export * from '@/components/common/Pager'; +export * from '@/components/common/Panel'; +export * from '@/components/common/SectionHeader'; +export * from '@/components/common/SideMenu'; export * from '@/components/common/TypeConfirmationForm'; export * from '@/components/input/FilterButtons'; diff --git a/src/lib/redis.ts b/src/lib/redis.ts index c440f5f1..edde3d65 100644 --- a/src/lib/redis.ts +++ b/src/lib/redis.ts @@ -4,7 +4,7 @@ const REDIS = 'redis'; const enabled = !!process.env.REDIS_URL; function getClient() { - const redis = new UmamiRedisClient(process.env.REDIS_URL); + const redis = new UmamiRedisClient({ url: process.env.REDIS_URL }); if (process.env.NODE_ENV !== 'production') { globalThis[REDIS] = redis; diff --git a/src/validations/index.ts b/src/permissions/index.ts similarity index 100% rename from src/validations/index.ts rename to src/permissions/index.ts diff --git a/src/validations/link.ts b/src/permissions/link.ts similarity index 100% rename from src/validations/link.ts rename to src/permissions/link.ts diff --git a/src/validations/pixel.ts b/src/permissions/pixel.ts similarity index 100% rename from src/validations/pixel.ts rename to src/permissions/pixel.ts diff --git a/src/validations/report.ts b/src/permissions/report.ts similarity index 100% rename from src/validations/report.ts rename to src/permissions/report.ts diff --git a/src/validations/team.ts b/src/permissions/team.ts similarity index 100% rename from src/validations/team.ts rename to src/permissions/team.ts diff --git a/src/validations/user.ts b/src/permissions/user.ts similarity index 100% rename from src/validations/user.ts rename to src/permissions/user.ts diff --git a/src/validations/website.ts b/src/permissions/website.ts similarity index 100% rename from src/validations/website.ts rename to src/permissions/website.ts diff --git a/tsup.config.js b/tsup.config.js new file mode 100644 index 00000000..73a5dfea --- /dev/null +++ b/tsup.config.js @@ -0,0 +1,15 @@ +import { defineConfig } from 'tsup'; + +export default defineConfig({ + entry: { index: 'src/index.ts' }, + format: ['esm'], + outDir: 'dist', + dts: true, + splitting: false, + sourcemap: false, + clean: true, + external: ['react', 'react-dom', 'react/jsx-runtime', '@swc/helpers'], + esbuildOptions(options) { + options.jsx = 'automatic'; + }, +}); diff --git a/tsup.config.ts b/tsup.config.ts deleted file mode 100644 index 29ff733c..00000000 --- a/tsup.config.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { defineConfig } from 'tsup'; - -export default defineConfig([ - { - entry: { index: 'src/index.client.ts' }, - format: ['esm'], - outDir: 'dist/client', - dts: true, - splitting: false, - sourcemap: false, - clean: true, - external: ['react', 'react-dom', 'react/jsx-runtime'], - }, - { - entry: { index: 'src/index.server.ts' }, - format: ['esm'], - outDir: 'dist/server', - dts: true, - splitting: false, - sourcemap: false, - clean: true, - }, -]);