Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.
TypeScript analyticsaudience-segmentationchartscohort-analysisgoogle-analyticsproduct-analyticsstatisticsuser-journeyweb-analytics
Updated Prisma build.
Mike Caoeabdd18604db
diff --git a/package.json b/package.jsonindex 9d0629055..9f41eded2 100644--- a/package.json+++ b/package.json@@ -13,10 +13,10 @@"scripts": {"dev": "next dev","dev-turbo": "next dev -p 3001 --turbopack",- "build": "npm-run-all check-env build-db-client check-db build-tracker build-geo build-app",- "build-turbo": "npm-run-all check-env build-db-client check-db build-tracker build-geo build-app-turbo",+ "build": "npm-run-all check-env build-db check-db build-tracker build-geo build-app",+ "build-turbo": "npm-run-all check-env build-db check-db build-tracker build-geo build-app-turbo","start": "next start",- "build-docker": "npm-run-all build-db-client build-tracker build-geo build-app",+ "build-docker": "npm-run-all build-db build-tracker build-geo build-app","start-docker": "npm-run-all check-db update-tracker set-routes-manifest start-server","start-env": "node scripts/start-env.js","start-server": "node server.js",@@ -28,6 +28,7 @@"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","build-geo": "node scripts/build-geo.js",+ "build-db": "npm-run-all build-db-client build-prisma-client","build-db-schema": "prisma db pull","build-db-client": "prisma generate","set-routes-manifest": "node scripts/set-routes-manifest.js",@@ -75,8 +76,8 @@"@dicebear/core": "^9.2.3","@fontsource/inter": "^4.5.15","@hello-pangea/dnd": "^17.0.0",- "@prisma/adapter-pg": "^6.13.0",- "@prisma/client": "^6.13.0",+ "@prisma/adapter-pg": "^6.14.0",+ "@prisma/client": "^6.14.0","@prisma/extension-read-replicas": "^0.4.1","@react-spring/web": "^9.7.3","@svgr/cli": "^8.1.0",@@ -116,7 +117,7 @@"npm-run-all": "^4.1.5","papaparse": "^5.5.3","pg": "^8.16.3",- "prisma": "6.13.0",+ "prisma": "6.14.0","pure-rand": "^7.0.1","react": "^19.1.1","react-basics": "^0.126.0",diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex e703ebba5..b5da37b39 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -27,14 +27,14 @@ importers:specifier: ^17.0.0'@prisma/adapter-pg':- specifier: ^6.13.0+ specifier: ^6.14.0version: 6.14.0'@prisma/client':- specifier: ^6.13.0+ specifier: ^6.14.0'@prisma/extension-read-replicas':specifier: ^0.4.1- version: 0.4.1(@prisma/[email protected]([email protected]([email protected]))([email protected]))+ version: 0.4.1(@prisma/[email protected]([email protected]([email protected]))([email protected]))'@react-spring/web':specifier: ^9.7.3@@ -150,8 +150,8 @@ importers:specifier: ^8.16.3version: 8.16.3prisma:- specifier: 6.13.0- version: 6.13.0([email protected])+ specifier: 6.14.0+ version: 6.14.0([email protected])pure-rand:specifier: ^7.0.1version: 7.0.1@@ -1478,11 +1478,8 @@ packages:typescript:optional: true- '@prisma/[email protected]':- resolution: {integrity: sha512-OYMM+pcrvj/NqNWCGESSxVG3O7kX6oWuGyvufTUNnDw740KIQvNyA4v0eILgkpuwsKIDU36beZCkUtIt0naTog==}-- '@prisma/[email protected]':- resolution: {integrity: sha512-um+9pfKJW0ihmM83id9FXGi5qEbVJ0Vxi1Gm0xpYsjwUBnw6s2LdPBbrsG9QXRX46K4CLWCTNvskXBup4i9hlw==}+ '@prisma/[email protected]':+ resolution: {integrity: sha512-IwC7o5KNNGhmblLs23swnfBjADkacBb7wvyDXUWLwuvUQciKJZqyecU0jw0d7JRkswrj+XTL8fdr0y2/VerKQQ==}'@prisma/[email protected]':resolution: {integrity: sha512-j4Lf+y+5QIJgQD4sJWSbkOD7geKx9CakaLp/TyTy/UDu9Wo0awvWCBH/BAxTHUaCpIl9USA5VS/KJhDqKJSwug==}@@ -1490,22 +1487,22 @@ packages:'@prisma/[email protected]':resolution: {integrity: sha512-On9vTNiJ7J/O1kVqedLtfdhhrfRYprkUOhxjlmmWEv12WNdG6v5x4PsrfZXdBtZqRZaqK1i1TigO6IdtYh8z+A==}- '@prisma/engines-version@6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd':- resolution: {integrity: sha512-MpPyKSzBX7P/ZY9odp9TSegnS/yH3CSbchQE9f0yBg3l2QyN59I6vGXcoYcqKC9VTniS1s18AMmhyr1OWavjHg==}+ '@prisma/engines-version@6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49':+ resolution: {integrity: sha512-EgN9ODJpiX45yvwcngoStp3uQPJ3l+AEVoQ6dMMO2QvmwIlnxfApzKmJQExzdo7/hqQANrz5txHJdGYHzOnGHA==}- '@prisma/[email protected]':- resolution: {integrity: sha512-D+1B79LFvtWA0KTt8ALekQ6A/glB9w10ETknH5Y9g1k2NYYQOQy93ffiuqLn3Pl6IPJG3EsK/YMROKEaq8KBrA==}+ '@prisma/[email protected]':+ resolution: {integrity: sha512-LhJjqsALFEcoAtF07nSaOkVguaxw/ZsgfROIYZ8bAZDobe7y8Wy+PkYQaPOK1iLSsFgV2MhCO/eNrI1gdSOj6w==}'@prisma/[email protected]':resolution: {integrity: sha512-mCMDloqUKUwx2o5uedTs1FHX3Nxdt1GdRMoeyp1JggjiwOALmIYWhxfIN08M2BZ0w8SKwvJqicJZMjkQYkkijw==}peerDependencies:'@prisma/client': ^6.5.0- '@prisma/[email protected]':- resolution: {integrity: sha512-grmmq+4FeFKmaaytA8Ozc2+Tf3BC8xn/DVJos6LL022mfRlMZYjT3hZM0/xG7+5fO95zFG9CkDUs0m1S2rXs5Q==}+ '@prisma/[email protected]':+ resolution: {integrity: sha512-MPzYPOKMENYOaY3AcAbaKrfvXVlvTc6iHmTXsp9RiwCX+bPyfDMqMFVUSVXPYrXnrvEzhGHfyiFy0PRLHPysNg==}- '@prisma/[email protected]':- resolution: {integrity: sha512-Nii2pX50fY4QKKxQwm7/vvqT6Ku8yYJLZAFX4e2vzHwRdMqjugcOG5hOSLjxqoXb0cvOspV70TOhMzrw8kqAnw==}+ '@prisma/[email protected]':+ resolution: {integrity: sha512-7VjuxKNwjnBhKfqPpMeWiHEa2sVjYzmHdl1slW6STuUCe9QnOY0OY1ljGSvz6wpG4U8DfbDqkG1yofd/1GINww==}'@react-aria/[email protected]':resolution: {integrity: sha512-8haBygHNMqVt4Ge90VOk+iVlLW+zhiOGHYz2IKCE6+Sy1dTE6mzhHjxrtwWYnSez/OQLbxjHlwLch4CDd5JkLA==}@@ -3604,6 +3601,10 @@ packages:resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==}+ resolution: {integrity: sha512-i6UzDscO/XfAcNYD75CfICkmfLedpyPDdozrLMmQc5ORaQcdMoc21OnlEylMIqI7U8eniKrPMxxtj8k0vhmJhA==}+ engines: {node: '>=14'}+resolution: {integrity: sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==}@@ -3982,10 +3983,6 @@ packages:resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==}engines: {node: '>=8'}- resolution: {integrity: sha512-afd4O7zpqHeRyg4PfDQsXmlDe2PfdHtJt6Akt8jOWaApLOZk5JXs6VMR29lz03pRe9mpykrRCYIYxaJYcfpncQ==}- engines: {node: '>=18'}-resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==}engines: {node: '>=8'}@@ -4239,10 +4236,6 @@ packages:resolution: {integrity: sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==}engines: {node: '>=10'}- resolution: {integrity: sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==}- engines: {node: ^16.14.0 || >=18.0.0}-resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==}@@ -4330,10 +4323,6 @@ packages:resolution: {integrity: sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==}engines: {node: '>=12'}- resolution: {integrity: sha512-XPdx9Dq4t9Qk1mTMbWONJqU7boCoumEH7fRET37HX5+khDUl3J2W6PdALxhILYlIYx2amlwYcRPp28p0tSiojg==}- engines: {node: '>=18'}-resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==}deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.@@ -5243,10 +5232,6 @@ packages:resolution: {integrity: sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==}engines: {node: '>=10'}- resolution: {integrity: sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g==}- engines: {node: ^16.14.0 || >=18.0.0}-resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==}engines: {node: '>=0.10.0'}@@ -5394,10 +5379,6 @@ packages:resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==}engines: {node: '>=8'}- resolution: {integrity: sha512-ybiGyvspI+fAoRQbIPRddCcSTV9/LsJbf0e/S85VLowVGzRmokfneg2kwVW/KU5rOXrPSbF1qAKPMgNTqqROQQ==}- engines: {node: '>=18'}-resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==}engines: {node: '>=8'}@@ -5987,8 +5968,8 @@ packages:resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==}engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}- resolution: {integrity: sha512-dfzORf0AbcEyyzxuv2lEwG8g+WRGF/qDQTpHf/6JoHsyF5MyzCEZwClVaEmw3WXcobgadosOboKUgQU0kFs9kw==}+ resolution: {integrity: sha512-QEuCwxu+Uq9BffFw7in8In+WfbSUN0ewnaSUKloLkbJd42w6EyFckux4M0f7VwwHlM3A8ssaz4OyniCXlsn0WA==}engines: {node: '>=18.18'}hasBin: truepeerDependencies:@@ -6161,10 +6142,6 @@ packages:resolution: {integrity: sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==}- resolution: {integrity: sha512-MbgfoNPANMdb4oRBNg5eqLbB2t2r+o5Ua1pNt8BqGp4I0FJZhuVSOj3PaBPni4azWuSzEdNn2evevzVmEk1ohQ==}- engines: {node: '>=18'}-resolution: {integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==}engines: {node: '>=8'}@@ -6185,10 +6162,6 @@ packages:resolution: {integrity: sha512-X1Fu3dPuk/8ZLsMhEj5f4wFAF0DWoK7qhGJvgaijocXxBmSToKfbFtqbxMO7bVjNA1dmE5huAzjXj/ey86iw9Q==}engines: {node: '>=12'}- resolution: {integrity: sha512-9viLL4/n1BJUCT1NXVTdS1jtm80yDEgR5T4yCelII49Mbj0v1rZdKqj7zCiYdbB0CuCgdrvHcNogAKTFPBocFA==}- engines: {node: '>=18'}-resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==}@@ -6933,10 +6906,6 @@ packages:resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==}- resolution: {integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==}- engines: {node: '>=18'}-resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==}engines: {node: '>= 4.0.0'}@@ -8276,50 +8245,48 @@ snapshots:transitivePeerDependencies:- pg-nativeoptionalDependencies:- prisma: 6.13.0([email protected])+ prisma: 6.14.0([email protected])typescript: 5.9.2- '@prisma/[email protected]':+ '@prisma/[email protected]':dependencies:c12: 3.1.0deepmerge-ts: 7.1.5effect: 3.16.12- read-package-up: 11.0.0+ empathic: 2.0.0transitivePeerDependencies:- magicast- '@prisma/[email protected]': {}-'@prisma/[email protected]': {}'@prisma/[email protected]':dependencies:'@prisma/debug': 6.14.0- '@prisma/engines-version@6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd': {}+ '@prisma/engines-version@6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49': {}- '@prisma/[email protected]':+ '@prisma/[email protected]':dependencies:- '@prisma/debug': 6.13.0- '@prisma/engines-version': 6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd- '@prisma/fetch-engine': 6.13.0- '@prisma/get-platform': 6.13.0+ '@prisma/debug': 6.14.0+ '@prisma/engines-version': 6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49+ '@prisma/fetch-engine': 6.14.0+ '@prisma/get-platform': 6.14.0- '@prisma/[email protected](@prisma/[email protected]([email protected]([email protected]))([email protected]))':+ '@prisma/[email protected](@prisma/[email protected]([email protected]([email protected]))([email protected]))':dependencies:- '@prisma/[email protected]':+ '@prisma/[email protected]':dependencies:- '@prisma/debug': 6.13.0- '@prisma/engines-version': 6.13.0-35.361e86d0ea4987e9f53a565309b3eed797a6bcbd- '@prisma/get-platform': 6.13.0+ '@prisma/debug': 6.14.0+ '@prisma/engines-version': 6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49+ '@prisma/get-platform': 6.14.0- '@prisma/[email protected]':+ '@prisma/[email protected]':dependencies:- '@prisma/debug': 6.13.0+ '@prisma/debug': 6.14.0dependencies:@@ -11047,6 +11014,8 @@ snapshots:+ [email protected]: {}+dependencies:once: 1.4.0@@ -11612,8 +11581,6 @@ snapshots:dependencies:to-regex-range: 5.0.1- [email protected]: {}-dependencies:locate-path: 5.0.0@@ -11907,10 +11874,6 @@ snapshots:dependencies:lru-cache: 6.0.0- dependencies:- lru-cache: 10.4.3-@@ -11971,8 +11934,6 @@ snapshots:- [email protected]: {}-dependencies:once: 1.4.0@@ -13067,12 +13028,6 @@ snapshots:semver: 7.7.2validate-npm-package-license: 3.0.4- dependencies:- hosted-git-info: 7.0.2- semver: 7.7.2- validate-npm-package-license: 3.0.4-@@ -13239,12 +13194,6 @@ snapshots:json-parse-even-better-errors: 2.3.1lines-and-columns: 1.2.4- dependencies:- '@babel/code-frame': 7.27.1- index-to-position: 1.1.0- type-fest: 4.41.0-@@ -13792,10 +13741,10 @@ snapshots:ansi-styles: 5.2.0react-is: 18.3.1dependencies:- '@prisma/config': 6.13.0- '@prisma/engines': 6.13.0+ '@prisma/config': 6.14.0+ '@prisma/engines': 6.14.0optionalDependencies:typescript: 5.9.2transitivePeerDependencies:@@ -14051,12 +14000,6 @@ snapshots:dependencies:pify: 2.3.0- dependencies:- find-up-simple: 1.0.1- read-pkg: 9.0.1- type-fest: 4.41.0-dependencies:find-up: 4.1.0@@ -14089,14 +14032,6 @@ snapshots:parse-json: 5.2.0type-fest: 1.4.0- dependencies:- '@types/normalize-package-data': 2.4.4- normalize-package-data: 6.0.2- parse-json: 8.3.0- type-fest: 4.41.0- unicorn-magic: 0.1.0-dependencies:core-util-is: 1.0.3@@ -14977,8 +14912,6 @@ snapshots:- [email protected]: {}-diff --git a/prisma/schema.prisma b/prisma/schema.prismaindex 956164db3..0434393be 100644--- a/prisma/schema.prisma+++ b/prisma/schema.prisma@@ -1,6 +1,7 @@generator client {- provider = "prisma-client-js"- previewFeatures = ["driverAdapters"]+ provider = "prisma-client"+ previewFeatures = ["driverAdapters", "queryCompiler"]+ output = "../src/generated/prisma"}datasource db {diff --git a/scripts/build-prisma-client.js b/scripts/build-prisma-client.jsindex 242b19d85..04a71bdd0 100644--- a/scripts/build-prisma-client.js+++ b/scripts/build-prisma-client.js@@ -2,13 +2,17 @@ import esbuild from 'esbuild';esbuild.build({- entryPoints: ['src/generated/prisma/client.js'], // Adjust this to your entry file+ entryPoints: ['src/generated/prisma/client.ts'], // Adjust this to your entry filebundle: true, // Bundle all files into one (optional)outfile: 'dist/generated/prisma/client.js', // Output fileplatform: 'node', // For Node.js compatibilitytarget: 'es2020', // Target version of Node.jsformat: 'esm', // Use ESM formatsourcemap: true, // Optional: generates source maps for debugging- external: [], // Optional: Exclude external dependencies from bundling+ external: [+ '../src/generated/prisma', // exclude generated client+ '@prisma/client', // just in case+ '.prisma/client',+ ], // Optional: Exclude external dependencies from bundling}).catch(() => process.exit(1));diff --git a/scripts/check-db.js b/scripts/check-db.jsindex f6781f1cd..ef974e804 100644--- a/scripts/check-db.js+++ b/scripts/check-db.js@@ -1,10 +1,9 @@/* eslint-disable no-console */import 'dotenv/config';-import { execSync } from 'node:child_process';import chalk from 'chalk';import semver from 'semver';-import { PrismaClient } from '@prisma/client';+import { PrismaClient } from '../dist/generated/prisma/client.js';import { PrismaPg } from '@prisma/adapter-pg';const MIN_VERSION = '9.4.0';diff --git a/src/lib/prisma.ts b/src/lib/prisma.tsindex 560361f8c..1bacff1b0 100644--- a/src/lib/prisma.ts+++ b/src/lib/prisma.ts@@ -1,5 +1,5 @@import debug from 'debug';-import { PrismaClient } from '@prisma/client';+import { PrismaClient } from '@/generated/prisma/client';import { PrismaPg } from '@prisma/adapter-pg';import { readReplicas } from '@prisma/extension-read-replicas';import { SESSION_COLUMNS, OPERATORS, DEFAULT_PAGE_SIZE } from './constants';