mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-01 12:29:35 +01:00
Upgrade prisma. Lint fixes.
This commit is contained in:
parent
a3b5f05a32
commit
a224a3caf3
@ -63,11 +63,11 @@
|
||||
"dependencies": {
|
||||
"@clickhouse/client": "^0.2.2",
|
||||
"@fontsource/inter": "^4.5.15",
|
||||
"@prisma/client": "5.4.2",
|
||||
"@prisma/client": "5.6.0",
|
||||
"@prisma/extension-read-replicas": "^0.3.0",
|
||||
"@react-spring/web": "^9.7.3",
|
||||
"@tanstack/react-query": "^4.33.0",
|
||||
"@umami/prisma-client": "^0.5.0",
|
||||
"@umami/prisma-client": "^0.7.0",
|
||||
"@umami/redis-client": "^0.18.0",
|
||||
"chalk": "^4.1.1",
|
||||
"chart.js": "^4.2.1",
|
||||
@ -97,9 +97,9 @@
|
||||
"next-basics": "^0.37.0",
|
||||
"node-fetch": "^3.2.8",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"prisma": "5.4.2",
|
||||
"prisma": "5.6.0",
|
||||
"react": "^18.2.0",
|
||||
"react-basics": "^0.107.0",
|
||||
"react-basics": "^0.109.0",
|
||||
"react-beautiful-dnd": "^13.1.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-error-boundary": "^4.0.4",
|
||||
|
@ -34,7 +34,7 @@ export function WebsiteSettings({ websiteId, openExternal = false, analyticsUrl
|
||||
|
||||
const handleReset = async value => {
|
||||
if (value === 'delete') {
|
||||
await router.push('/settings/websites');
|
||||
router.push('/settings/websites');
|
||||
} else if (value === 'reset') {
|
||||
showSuccess();
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Button, Text, Icon } from 'react-basics';
|
||||
import { Button, Text, Icon, Icons } from 'react-basics';
|
||||
import { useMemo } from 'react';
|
||||
import { firstBy } from 'thenby';
|
||||
import Link from 'next/link';
|
||||
@ -7,7 +7,6 @@ import useDashboard from 'store/dashboard';
|
||||
import WebsiteHeader from './WebsiteHeader';
|
||||
import { WebsiteMetricsBar } from './WebsiteMetricsBar';
|
||||
import { useMessages, useLocale } from 'components/hooks';
|
||||
import Icons from 'components/icons';
|
||||
|
||||
export default function WebsiteChartList({ websites, showCharts, limit }) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
|
@ -7,7 +7,7 @@ export function ErrorMessage() {
|
||||
|
||||
return (
|
||||
<div className={styles.error}>
|
||||
<Icon className={styles.icon} size="large">
|
||||
<Icon className={styles.icon} size="lg">
|
||||
<Icons.Alert />
|
||||
</Icon>
|
||||
<Text>{formatMessage(messages.error)}</Text>
|
||||
|
@ -10,9 +10,9 @@ import styles from './FilterLink.module.css';
|
||||
export interface FilterLinkProps {
|
||||
id: string;
|
||||
value: string;
|
||||
label: string;
|
||||
externalUrl: string;
|
||||
className: string;
|
||||
label?: string;
|
||||
externalUrl?: string;
|
||||
className?: string;
|
||||
children: ReactNode;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { Button, Icon } from 'react-basics';
|
||||
import { Button, Icon, Icons } from 'react-basics';
|
||||
import { useState } from 'react';
|
||||
import MobileMenu from './MobileMenu';
|
||||
import Icons from 'components/icons';
|
||||
|
||||
export function HamburgerButton({ menuItems }: { menuItems: any[] }) {
|
||||
const [active, setActive] = useState(false);
|
||||
|
@ -22,7 +22,7 @@ import User from 'assets/user.svg';
|
||||
import Users from 'assets/users.svg';
|
||||
import Visitor from 'assets/visitor.svg';
|
||||
|
||||
const icons: any = {
|
||||
const icons = {
|
||||
...Icons,
|
||||
AddUser,
|
||||
Bars,
|
||||
|
@ -45,7 +45,7 @@ async function relationalQuery(websiteId: string, filters: QueryFilters) {
|
||||
async function clickhouseQuery(
|
||||
websiteId: string,
|
||||
filters: QueryFilters,
|
||||
): Promise<{ events: number; fields: number; records: number }> {
|
||||
): Promise<{ events: number; fields: number; records: number }[]> {
|
||||
const { rawQuery, parseFilters } = clickhouse;
|
||||
const { filterQuery, params } = await parseFilters(websiteId, filters);
|
||||
|
||||
|
@ -2,15 +2,15 @@ import { md5 } from 'next-basics';
|
||||
import { getSessions, getEvents } from 'queries/index';
|
||||
import { EVENT_TYPE } from 'lib/constants';
|
||||
|
||||
export async function getRealtimeData(websiteId, time) {
|
||||
export async function getRealtimeData(websiteId: string, startDate: Date) {
|
||||
const [pageviews, sessions, events] = await Promise.all([
|
||||
getEvents(websiteId, time, EVENT_TYPE.pageView),
|
||||
getSessions(websiteId, time),
|
||||
getEvents(websiteId, time, EVENT_TYPE.customEvent),
|
||||
getEvents(websiteId, startDate, EVENT_TYPE.pageView),
|
||||
getSessions(websiteId, startDate),
|
||||
getEvents(websiteId, startDate, EVENT_TYPE.customEvent),
|
||||
]);
|
||||
|
||||
const decorate = (id, data) => {
|
||||
return data.map(props => ({
|
||||
const decorate = (id: string, data: any[]) => {
|
||||
return data.map((props: { [key: string]: any }) => ({
|
||||
...props,
|
||||
__id: md5(id, ...Object.values(props)),
|
||||
__type: id,
|
||||
|
@ -83,10 +83,17 @@ async function clickhouseQuery(
|
||||
limit 500
|
||||
`,
|
||||
params,
|
||||
);
|
||||
).then(a => {
|
||||
return Object.values(a).map(a => {
|
||||
return {
|
||||
x: a.x,
|
||||
y: Number(a.y),
|
||||
};
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function parseFields(fields) {
|
||||
function parseFields(fields: any[]) {
|
||||
const query = fields.reduce(
|
||||
(arr, field) => {
|
||||
const { name } = field;
|
||||
@ -99,7 +106,7 @@ function parseFields(fields) {
|
||||
return query.join(',\n');
|
||||
}
|
||||
|
||||
function parseGroupBy(fields) {
|
||||
function parseGroupBy(fields: { name: any }[]) {
|
||||
if (!fields.length) {
|
||||
return '';
|
||||
}
|
||||
|
54
yarn.lock
54
yarn.lock
@ -1941,22 +1941,22 @@
|
||||
"@parcel/watcher-win32-ia32" "2.3.0"
|
||||
"@parcel/watcher-win32-x64" "2.3.0"
|
||||
|
||||
"@prisma/client@5.4.2":
|
||||
version "5.4.2"
|
||||
resolved "https://registry.yarnpkg.com/@prisma/client/-/client-5.4.2.tgz#786f9c1d8f06d955933004ac638d14da4bf14025"
|
||||
integrity sha512-2xsPaz4EaMKj1WS9iW6MlPhmbqtBsXAOeVttSePp8vTFTtvzh2hZbDgswwBdSCgPzmmwF+tLB259QzggvCmJqA==
|
||||
"@prisma/client@5.6.0":
|
||||
version "5.6.0"
|
||||
resolved "https://registry.yarnpkg.com/@prisma/client/-/client-5.6.0.tgz#1c15932250d5658fe0127e62faf4ecd96a877259"
|
||||
integrity sha512-mUDefQFa1wWqk4+JhKPYq8BdVoFk9NFMBXUI8jAkBfQTtgx8WPx02U2HB/XbAz3GSUJpeJOKJQtNvaAIDs6sug==
|
||||
dependencies:
|
||||
"@prisma/engines-version" "5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574"
|
||||
"@prisma/engines-version" "5.6.0-32.e95e739751f42d8ca026f6b910f5a2dc5adeaeee"
|
||||
|
||||
"@prisma/engines-version@5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574":
|
||||
version "5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574"
|
||||
resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574.tgz#ff14f2926890edee47e8f1d08df7b4f392ee34bf"
|
||||
integrity sha512-wvupDL4AA1vf4TQNANg7kR7y98ITqPsk6aacfBxZKtrJKRIsWjURHkZCGcQliHdqCiW/hGreO6d6ZuSv9MhdAA==
|
||||
"@prisma/engines-version@5.6.0-32.e95e739751f42d8ca026f6b910f5a2dc5adeaeee":
|
||||
version "5.6.0-32.e95e739751f42d8ca026f6b910f5a2dc5adeaeee"
|
||||
resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-5.6.0-32.e95e739751f42d8ca026f6b910f5a2dc5adeaeee.tgz#57b003ab5e1ea1523b5cdd7f06b24ebcf5c7fd8c"
|
||||
integrity sha512-UoFgbV1awGL/3wXuUK3GDaX2SolqczeeJ5b4FVec9tzeGbSWJboPSbT0psSrmgYAKiKnkOPFSLlH6+b+IyOwAw==
|
||||
|
||||
"@prisma/engines@5.4.2":
|
||||
version "5.4.2"
|
||||
resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-5.4.2.tgz#ba2b7faeb227c76e423e88f962afe6a031319f3f"
|
||||
integrity sha512-fqeucJ3LH0e1eyFdT0zRx+oETLancu5+n4lhiYECyEz6H2RDskPJHJYHkVc0LhkU4Uv7fuEnppKU3nVKNzMh8g==
|
||||
"@prisma/engines@5.6.0":
|
||||
version "5.6.0"
|
||||
resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-5.6.0.tgz#82c445aa10633bbc0388aa2d6e411a0bd94c9439"
|
||||
integrity sha512-Mt2q+GNJpU2vFn6kif24oRSBQv1KOkYaterQsi0k2/lA+dLvhRX6Lm26gon6PYHwUM8/h8KRgXIUMU0PCLB6bw==
|
||||
|
||||
"@prisma/extension-read-replicas@^0.3.0":
|
||||
version "0.3.0"
|
||||
@ -2601,10 +2601,10 @@
|
||||
"@typescript-eslint/types" "6.8.0"
|
||||
eslint-visitor-keys "^3.4.1"
|
||||
|
||||
"@umami/prisma-client@^0.5.0":
|
||||
version "0.5.0"
|
||||
resolved "https://registry.yarnpkg.com/@umami/prisma-client/-/prisma-client-0.5.0.tgz#e2287debbf21f9344c989b9e7192491df88513bf"
|
||||
integrity sha512-BkStMrvxYZQPwEIyy30JJPucTTsmQqb4jD8+ciSHxcBc7039cW0XyX3TL/u9ebZmANzIuNO0XiBArwjWulGIjg==
|
||||
"@umami/prisma-client@^0.7.0":
|
||||
version "0.7.0"
|
||||
resolved "https://registry.yarnpkg.com/@umami/prisma-client/-/prisma-client-0.7.0.tgz#f9de0dfc861c9ba6379c0789e012d4effa65f1ef"
|
||||
integrity sha512-70Azr4aAYMU6c+Lx69bjumNnKWgOFoq2PuYmp+T2kfCDhMyMLXTLDVD5ArDrwJMl1gWsgvpnumxCirYy+6KhGg==
|
||||
dependencies:
|
||||
chalk "^4.1.2"
|
||||
debug "^4.3.4"
|
||||
@ -6324,7 +6324,7 @@ next-basics@^0.37.0:
|
||||
jsonwebtoken "^9.0.0"
|
||||
pure-rand "^6.0.2"
|
||||
|
||||
next@^13.5.3:
|
||||
next@13.5.6:
|
||||
version "13.5.6"
|
||||
resolved "https://registry.yarnpkg.com/next/-/next-13.5.6.tgz#e964b5853272236c37ce0dd2c68302973cf010b1"
|
||||
integrity sha512-Y2wTcTbO4WwEsVb4A8VSnOsG1I9ok+h74q0ZdxkwM3EODqrs4pasq7O0iUxbcS9VtWMicG7f3+HAj0r1+NtKSw==
|
||||
@ -7377,12 +7377,12 @@ pretty-bytes@^5.6.0:
|
||||
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb"
|
||||
integrity sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==
|
||||
|
||||
prisma@5.4.2:
|
||||
version "5.4.2"
|
||||
resolved "https://registry.yarnpkg.com/prisma/-/prisma-5.4.2.tgz#7eac9276439ec7073ec697c6c0dfa259d96e955e"
|
||||
integrity sha512-GDMZwZy7mysB2oXU+angQqJ90iaPFdD0rHaZNkn+dio5NRkGLmMqmXs31//tg/qXT3iB0cTQwnGGQNuirhSTZg==
|
||||
prisma@5.6.0:
|
||||
version "5.6.0"
|
||||
resolved "https://registry.yarnpkg.com/prisma/-/prisma-5.6.0.tgz#ae2c27fdfb4d53be7f7dafb50d6b8b7f55c93aa5"
|
||||
integrity sha512-EEaccku4ZGshdr2cthYHhf7iyvCcXqwJDvnoQRAJg5ge2Tzpv0e2BaMCp+CbbDUwoVTzwgOap9Zp+d4jFa2O9A==
|
||||
dependencies:
|
||||
"@prisma/engines" "5.4.2"
|
||||
"@prisma/engines" "5.6.0"
|
||||
|
||||
promise.series@^0.2.0:
|
||||
version "0.2.0"
|
||||
@ -7476,10 +7476,10 @@ rc@^1.2.7:
|
||||
minimist "^1.2.0"
|
||||
strip-json-comments "~2.0.1"
|
||||
|
||||
react-basics@^0.107.0:
|
||||
version "0.107.0"
|
||||
resolved "https://registry.yarnpkg.com/react-basics/-/react-basics-0.107.0.tgz#e5615792cbb3e4707ba5c8f438b29d6a88cf38b3"
|
||||
integrity sha512-jYnP1z2LTotxXWYwxOBvF26vXxSUBJB0x62YPKkEr1vmJGeg8iOLr8JGF8KE3R6E+NTqzRt6Bmdtt93mjaog4A==
|
||||
react-basics@^0.109.0:
|
||||
version "0.109.0"
|
||||
resolved "https://registry.yarnpkg.com/react-basics/-/react-basics-0.109.0.tgz#9c1f41ebf6abbcf67f7dd11a16a7fb5e3aedd38d"
|
||||
integrity sha512-n955CwqIeQ/sTMxxvbtYpWtBWS07Rg39zrNKeUYN/JoCIq0YbbZiZDALAhh1Out+qsIe62NoOFA7JtHzk1EkHQ==
|
||||
dependencies:
|
||||
"@react-spring/web" "^9.7.3"
|
||||
classnames "^2.3.1"
|
||||
|
Loading…
Reference in New Issue
Block a user