diff --git a/.env.example b/.env.example index 52e67f3..ab6fa0c 100644 --- a/.env.example +++ b/.env.example @@ -26,3 +26,5 @@ KOFI_USERNAME=zaanposni SVELTEKIT_SENTRY_DSN= UMAMI_ID= API_ANALYTICS_KEY= + +API_HOSTNAME= diff --git a/.github/workflows/docker_pr.yml b/.github/workflows/docker_pr.yml index 2cb9b35..b49d844 100644 --- a/.github/workflows/docker_pr.yml +++ b/.github/workflows/docker_pr.yml @@ -4,20 +4,32 @@ on: pull_request: jobs: - build: + build_frontend: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Build frontend working-directory: ./src/psaggregator run: docker build -t ghcr.io/${{ github.repository_owner }}/psaggregator_frontend:latest . + build_nginx: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Build nginx working-directory: ./src/nginx run: docker build -t ghcr.io/${{ github.repository_owner }}/psaggregator_nginx:latest . + build_dataimport: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Build dataimport working-directory: ./src/dataimport run: docker build -t ghcr.io/${{ github.repository_owner }}/psaggregator_dataimport:latest . diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index b86e26f..56d2b47 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -14,7 +14,7 @@ jobs: packages: write steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Determine version run: | diff --git a/.github/workflows/pythonlint_pr.yml b/.github/workflows/pythonlint_pr.yml index 14b90fc..67ec012 100644 --- a/.github/workflows/pythonlint_pr.yml +++ b/.github/workflows/pythonlint_pr.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v2 diff --git a/docker-compose.yml b/docker-compose.yml index b8c512d..89ec025 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -20,6 +20,7 @@ services: environment: - PRIVATE_DATABASE_URL=${DATABASE_URL} - PRIVATE_API_ANALYTICS_KEY=${API_ANALYTICS_KEY} + - PRIVATE_API_HOSTNAME=${API_HOSTNAME} - PUBLIC_LEGAL_URL=${LEGAL_URL} - PUBLIC_UMAMI_ID=${UMAMI_ID} - PUBLIC_KOFI_USERNAME=${KOFI_USERNAME} diff --git a/src/psaggregator/package-lock.json b/src/psaggregator/package-lock.json index 92c0890..eff9f7b 100644 --- a/src/psaggregator/package-lock.json +++ b/src/psaggregator/package-lock.json @@ -1,12 +1,12 @@ { "name": "psaggregator", - "version": "1.15.1", + "version": "1.16.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "psaggregator", - "version": "1.15.1", + "version": "1.16.0", "dependencies": { "@internationalized/date": "^3.5.5", "@sentry/sveltekit": "^8.37.1", @@ -1059,12 +1059,12 @@ } }, "node_modules/@opentelemetry/instrumentation-amqplib": { - "version": "0.42.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-amqplib/-/instrumentation-amqplib-0.42.0.tgz", - "integrity": "sha512-fiuU6OKsqHJiydHWgTRQ7MnIrJ2lEqsdgFtNIH4LbAUJl/5XmrIeoDzDnox+hfkgWK65jsleFuQDtYb5hW1koQ==", + "version": "0.43.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-amqplib/-/instrumentation-amqplib-0.43.0.tgz", + "integrity": "sha512-ALjfQC+0dnIEcvNYsbZl/VLh7D2P1HhFF4vicRKHhHFIUV3Shpg4kXgiek5PLhmeKSIPiUB25IYH5RIneclL4A==", "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.53.0", + "@opentelemetry/instrumentation": "^0.54.0", "@opentelemetry/semantic-conventions": "^1.27.0" }, "engines": { @@ -1074,36 +1074,6 @@ "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@opentelemetry/instrumentation-amqplib/node_modules/@opentelemetry/api-logs": { - "version": "0.53.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.53.0.tgz", - "integrity": "sha512-8HArjKx+RaAI8uEIgcORbZIPklyh1YLjPSBus8hjRmvLi6DeFzgOcdZ7KwPabKj8mXF8dX0hyfAyGfycz0DbFw==", - "dependencies": { - "@opentelemetry/api": "^1.0.0" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/@opentelemetry/instrumentation-amqplib/node_modules/@opentelemetry/instrumentation": { - "version": "0.53.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.53.0.tgz", - "integrity": "sha512-DMwg0hy4wzf7K73JJtl95m/e0boSoWhH07rfvHvYzQtBD3Bmv0Wc1x733vyZBqmFm8OjJD0/pfiUg1W3JjFX0A==", - "dependencies": { - "@opentelemetry/api-logs": "0.53.0", - "@types/shimmer": "^1.2.0", - "import-in-the-middle": "^1.8.1", - "require-in-the-middle": "^7.1.1", - "semver": "^7.5.2", - "shimmer": "^1.2.1" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, "node_modules/@opentelemetry/instrumentation-connect": { "version": "0.40.0", "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-connect/-/instrumentation-connect-0.40.0.tgz", @@ -1438,6 +1408,21 @@ "@opentelemetry/api": "^1.3.0" } }, + "node_modules/@opentelemetry/instrumentation-knex": { + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-knex/-/instrumentation-knex-0.41.0.tgz", + "integrity": "sha512-OhI1SlLv5qnsnm2dOVrian/x3431P75GngSpnR7c4fcVFv7prXGYu29Z6ILRWJf/NJt6fkbySmwdfUUnFnHCTg==", + "dependencies": { + "@opentelemetry/instrumentation": "^0.54.0", + "@opentelemetry/semantic-conventions": "^1.27.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, "node_modules/@opentelemetry/instrumentation-koa": { "version": "0.43.0", "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-koa/-/instrumentation-koa-0.43.0.tgz", @@ -1820,6 +1805,22 @@ "@opentelemetry/api": "^1.3.0" } }, + "node_modules/@opentelemetry/instrumentation-tedious": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-tedious/-/instrumentation-tedious-0.15.0.tgz", + "integrity": "sha512-Kb7yo8Zsq2TUwBbmwYgTAMPK0VbhoS8ikJ6Bup9KrDtCx2JC01nCb+M0VJWXt7tl0+5jARUbKWh5jRSoImxdCw==", + "dependencies": { + "@opentelemetry/instrumentation": "^0.54.0", + "@opentelemetry/semantic-conventions": "^1.27.0", + "@types/tedious": "^4.0.14" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, "node_modules/@opentelemetry/instrumentation-undici": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-undici/-/instrumentation-undici-0.6.0.tgz", @@ -2351,54 +2352,54 @@ ] }, "node_modules/@sentry-internal/browser-utils": { - "version": "8.37.1", - "resolved": "https://registry.npmjs.org/@sentry-internal/browser-utils/-/browser-utils-8.37.1.tgz", - "integrity": "sha512-OSR/V5GCsSCG7iapWtXCT/y22uo3HlawdEgfM1NIKk1mkP15UyGQtGEzZDdih2H+SNuX1mp9jQLTjr5FFp1A5w==", + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/browser-utils/-/browser-utils-8.38.0.tgz", + "integrity": "sha512-5QMVcssrAcmjKT0NdFYcX0b0wwZovGAZ9L2GajErXtHkBenjI2sgR2+5J7n+QZGuk2SC1qhGmT1O9i3p3UEwew==", "dependencies": { - "@sentry/core": "8.37.1", - "@sentry/types": "8.37.1", - "@sentry/utils": "8.37.1" + "@sentry/core": "8.38.0", + "@sentry/types": "8.38.0", + "@sentry/utils": "8.38.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/feedback": { - "version": "8.37.1", - "resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-8.37.1.tgz", - "integrity": "sha512-Se25NXbSapgS2S+JssR5YZ48b3OY4UGmAuBOafgnMW91LXMxRNWRbehZuNUmjjHwuywABMxjgu+Yp5uJDATX+g==", + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-8.38.0.tgz", + "integrity": "sha512-AW5HCCAlc3T1jcSuNhbFVNO1CHyJ5g5tsGKEP4VKgu+D1Gg2kZ5S2eFatLBUP/BD5JYb1A7p6XPuzYp1XfMq0A==", "dependencies": { - "@sentry/core": "8.37.1", - "@sentry/types": "8.37.1", - "@sentry/utils": "8.37.1" + "@sentry/core": "8.38.0", + "@sentry/types": "8.38.0", + "@sentry/utils": "8.38.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/replay": { - "version": "8.37.1", - "resolved": "https://registry.npmjs.org/@sentry-internal/replay/-/replay-8.37.1.tgz", - "integrity": "sha512-E/Plhisk/pXJjOdOU12sg8m/APTXTA21iEniidP6jW3/+O0tD/H/UovEqa4odNTqxPMa798xHQSQNt5loYiaLA==", + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/replay/-/replay-8.38.0.tgz", + "integrity": "sha512-mQPShKnIab7oKwkwrRxP/D8fZYHSkDY+cvqORzgi+wAwgnunytJQjz9g6Ww2lJu98rHEkr5SH4V4rs6PZYZmnQ==", "dependencies": { - "@sentry-internal/browser-utils": "8.37.1", - "@sentry/core": "8.37.1", - "@sentry/types": "8.37.1", - "@sentry/utils": "8.37.1" + "@sentry-internal/browser-utils": "8.38.0", + "@sentry/core": "8.38.0", + "@sentry/types": "8.38.0", + "@sentry/utils": "8.38.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/replay-canvas": { - "version": "8.37.1", - "resolved": "https://registry.npmjs.org/@sentry-internal/replay-canvas/-/replay-canvas-8.37.1.tgz", - "integrity": "sha512-1JLAaPtn1VL5vblB0BMELFV0D+KUm/iMGsrl4/JpRm0Ws5ESzQl33DhXVv1IX/ZAbx9i14EjR7MG9+Hj70tieQ==", + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/replay-canvas/-/replay-canvas-8.38.0.tgz", + "integrity": "sha512-OxmlWzK9J8mRM+KxdSnQ5xuxq+p7TiBzTz70FT3HltxmeugvDkyp6803UcFqHOPHR35OYeVLOalym+FmvNn9kw==", "dependencies": { - "@sentry-internal/replay": "8.37.1", - "@sentry/core": "8.37.1", - "@sentry/types": "8.37.1", - "@sentry/utils": "8.37.1" + "@sentry-internal/replay": "8.38.0", + "@sentry/core": "8.38.0", + "@sentry/types": "8.38.0", + "@sentry/utils": "8.38.0" }, "engines": { "node": ">=14.18" @@ -2413,17 +2414,17 @@ } }, "node_modules/@sentry/browser": { - "version": "8.37.1", - "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-8.37.1.tgz", - "integrity": "sha512-5ym+iGiIpjIKKpMWi9S3/tXh9xneS+jqxwRTJqed3cb8i4ydfMAAP8sM3U8xMCWWABpWyIUW+fpewC0tkhE1aQ==", + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-8.38.0.tgz", + "integrity": "sha512-AZR+b0EteNZEGv6JSdBD22S9VhQ7nrljKsSnzxobBULf3BpwmhmCzTbDrqWszKDAIDYmL+yQJIR2glxbknneWQ==", "dependencies": { - "@sentry-internal/browser-utils": "8.37.1", - "@sentry-internal/feedback": "8.37.1", - "@sentry-internal/replay": "8.37.1", - "@sentry-internal/replay-canvas": "8.37.1", - "@sentry/core": "8.37.1", - "@sentry/types": "8.37.1", - "@sentry/utils": "8.37.1" + "@sentry-internal/browser-utils": "8.38.0", + "@sentry-internal/feedback": "8.38.0", + "@sentry-internal/replay": "8.38.0", + "@sentry-internal/replay-canvas": "8.38.0", + "@sentry/core": "8.38.0", + "@sentry/types": "8.38.0", + "@sentry/utils": "8.38.0" }, "engines": { "node": ">=14.18" @@ -2634,27 +2635,27 @@ } }, "node_modules/@sentry/core": { - "version": "8.37.1", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.37.1.tgz", - "integrity": "sha512-82csXby589iDupM3VgCHJeWZagUyEEaDnbFcoZ/Z91QX2Sjq8FcF5OsforoXjw09i0XTFqlkFAnQVpDBmMXcpQ==", + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.38.0.tgz", + "integrity": "sha512-sGD+5TEHU9G7X7zpyaoJxpOtwjTjvOd1f/MKBrWW2vf9UbYK+GUJrOzLhMoSWp/pHSYgvObkJkDb/HwieQjvhQ==", "dependencies": { - "@sentry/types": "8.37.1", - "@sentry/utils": "8.37.1" + "@sentry/types": "8.38.0", + "@sentry/utils": "8.38.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry/node": { - "version": "8.37.1", - "resolved": "https://registry.npmjs.org/@sentry/node/-/node-8.37.1.tgz", - "integrity": "sha512-ACRZmqOBHRPKsyVhnDR4+RH1QQr7WMdH7RNl62VlKNZGLvraxW1CUqTSeNUFUuOwks3P6nozROSQs8VMSC/nVg==", + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@sentry/node/-/node-8.38.0.tgz", + "integrity": "sha512-nwW0XqZFQseXYn0i6i6nKPkbjgHMBEFSF9TnK6mHHqJHHObHIZ6qu5CfvGKgxATia8JPIg9NN8XcyYOnQMi07w==", "dependencies": { "@opentelemetry/api": "^1.9.0", "@opentelemetry/context-async-hooks": "^1.25.1", "@opentelemetry/core": "^1.25.1", "@opentelemetry/instrumentation": "^0.54.0", - "@opentelemetry/instrumentation-amqplib": "^0.42.0", + "@opentelemetry/instrumentation-amqplib": "^0.43.0", "@opentelemetry/instrumentation-connect": "0.40.0", "@opentelemetry/instrumentation-dataloader": "0.12.0", "@opentelemetry/instrumentation-express": "0.44.0", @@ -2666,6 +2667,7 @@ "@opentelemetry/instrumentation-http": "0.53.0", "@opentelemetry/instrumentation-ioredis": "0.43.0", "@opentelemetry/instrumentation-kafkajs": "0.4.0", + "@opentelemetry/instrumentation-knex": "0.41.0", "@opentelemetry/instrumentation-koa": "0.43.0", "@opentelemetry/instrumentation-lru-memoizer": "0.40.0", "@opentelemetry/instrumentation-mongodb": "0.48.0", @@ -2675,15 +2677,16 @@ "@opentelemetry/instrumentation-nestjs-core": "0.40.0", "@opentelemetry/instrumentation-pg": "0.44.0", "@opentelemetry/instrumentation-redis-4": "0.42.0", + "@opentelemetry/instrumentation-tedious": "0.15.0", "@opentelemetry/instrumentation-undici": "0.6.0", "@opentelemetry/resources": "^1.26.0", "@opentelemetry/sdk-trace-base": "^1.26.0", "@opentelemetry/semantic-conventions": "^1.27.0", "@prisma/instrumentation": "5.19.1", - "@sentry/core": "8.37.1", - "@sentry/opentelemetry": "8.37.1", - "@sentry/types": "8.37.1", - "@sentry/utils": "8.37.1", + "@sentry/core": "8.38.0", + "@sentry/opentelemetry": "8.38.0", + "@sentry/types": "8.38.0", + "@sentry/utils": "8.38.0", "import-in-the-middle": "^1.11.2" }, "engines": { @@ -2691,13 +2694,13 @@ } }, "node_modules/@sentry/opentelemetry": { - "version": "8.37.1", - "resolved": "https://registry.npmjs.org/@sentry/opentelemetry/-/opentelemetry-8.37.1.tgz", - "integrity": "sha512-P/Rp7R+qNiRYz9qtVMV12YL9CIrZjzXWGVUBZjJayHu37jdvMowCol5G850QPYy0E2O0AQnFtxBno2yeURn8QQ==", + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@sentry/opentelemetry/-/opentelemetry-8.38.0.tgz", + "integrity": "sha512-AfjmIf/v7+x2WplhkX66LyGKvrzzPeSgff9uJ0cFCC2s0yd1qA2VPuIwEyr5i/FOJOP5bvFr8tu/hz3LA4+F5Q==", "dependencies": { - "@sentry/core": "8.37.1", - "@sentry/types": "8.37.1", - "@sentry/utils": "8.37.1" + "@sentry/core": "8.38.0", + "@sentry/types": "8.38.0", + "@sentry/utils": "8.38.0" }, "engines": { "node": ">=14.18" @@ -2711,14 +2714,14 @@ } }, "node_modules/@sentry/svelte": { - "version": "8.37.1", - "resolved": "https://registry.npmjs.org/@sentry/svelte/-/svelte-8.37.1.tgz", - "integrity": "sha512-hG3ciV2UjFRrXq6afP7x9hNePwYfCN7kgQcnBu1cU881l0nAzCN5eQBzzAgfxzloO3kUZbZhBTc721lbsSXegw==", - "dependencies": { - "@sentry/browser": "8.37.1", - "@sentry/core": "8.37.1", - "@sentry/types": "8.37.1", - "@sentry/utils": "8.37.1", + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@sentry/svelte/-/svelte-8.38.0.tgz", + "integrity": "sha512-Un6/5lovEwsmd5MMkUcF4HlWQAr5Fi95ZiRFkPBmFwUKrDwu8SJ36/LErtLyCI4fPdAlhQ8EJSSqX1DVJFfcrg==", + "dependencies": { + "@sentry/browser": "8.38.0", + "@sentry/core": "8.38.0", + "@sentry/types": "8.38.0", + "@sentry/utils": "8.38.0", "magic-string": "^0.30.0" }, "engines": { @@ -2729,16 +2732,16 @@ } }, "node_modules/@sentry/sveltekit": { - "version": "8.37.1", - "resolved": "https://registry.npmjs.org/@sentry/sveltekit/-/sveltekit-8.37.1.tgz", - "integrity": "sha512-UH8GbQWFyTowsFdtCGohf7uWdVSfxU7ALQTOG1l0ONboCWTRcOwac7UNzSz8NmIdxwQXHAtx5XJN6qALnat//A==", - "dependencies": { - "@sentry/core": "8.37.1", - "@sentry/node": "8.37.1", - "@sentry/opentelemetry": "8.37.1", - "@sentry/svelte": "8.37.1", - "@sentry/types": "8.37.1", - "@sentry/utils": "8.37.1", + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@sentry/sveltekit/-/sveltekit-8.38.0.tgz", + "integrity": "sha512-AJDbELyzUfHcWkI9FajW7sDLkcD53s/q4kWgFLL3MjfCpEITNqj4XqiiWglPxDFl2wQd9y5YEhcFMhoNGhixyQ==", + "dependencies": { + "@sentry/core": "8.38.0", + "@sentry/node": "8.38.0", + "@sentry/opentelemetry": "8.38.0", + "@sentry/svelte": "8.38.0", + "@sentry/types": "8.38.0", + "@sentry/utils": "8.38.0", "@sentry/vite-plugin": "2.22.6", "magic-string": "0.30.7", "magicast": "0.2.8", @@ -2771,19 +2774,19 @@ } }, "node_modules/@sentry/types": { - "version": "8.37.1", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.37.1.tgz", - "integrity": "sha512-ryMOTROLSLINKFEbHWvi7GigNrsQhsaScw2NddybJGztJQ5UhxIGESnxGxWCufBmWFDwd7+5u0jDPCVUJybp7w==", + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.38.0.tgz", + "integrity": "sha512-fP5H9ZX01W4Z/EYctk3mkSHi7d06cLcX2/UWqwdWbyPWI+pL2QpUPICeO/C+8SnmYx//wFj3qWDhyPCh1PdFAA==", "engines": { "node": ">=14.18" } }, "node_modules/@sentry/utils": { - "version": "8.37.1", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.37.1.tgz", - "integrity": "sha512-Qtn2IfpII12K17txG/ZtTci35XYjYi4CxbQ3j7nXY7toGv/+MqPXwV5q2i9g94XaSXlE5Wy9/hoCZoZpZs/djA==", + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.38.0.tgz", + "integrity": "sha512-3X7MgIKIx+2q5Al7QkhaRB4wV6DvzYsaeIwdqKUzGLuRjXmNgJrLoU87TAwQRmZ6Wr3IoEpThZZMNrzYPXxArw==", "dependencies": { - "@sentry/types": "8.37.1" + "@sentry/types": "8.38.0" }, "engines": { "node": ">=14.18" @@ -2829,9 +2832,9 @@ } }, "node_modules/@sveltejs/kit": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-2.8.0.tgz", - "integrity": "sha512-HCiWupCuKJQ3aPaC4Xc6lpPdjOOnoGzEiYjOqMqppdtfGtY2ABrx932Vw66ZwS2RGXc0BmZvFvNq5SzqlmDVLg==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-2.8.1.tgz", + "integrity": "sha512-uuOfFwZ4xvnfPsiTB6a4H1ljjTUksGhWnYq5X/Y9z4x5+3uM2Md8q/YVeHL+7w+mygAwoEFdgKZ8YkUuk+VKww==", "hasInstallScript": true, "dependencies": { "@types/cookie": "^0.6.0", @@ -3007,6 +3010,14 @@ "resolved": "https://registry.npmjs.org/@types/shimmer/-/shimmer-1.2.0.tgz", "integrity": "sha512-UE7oxhQLLd9gub6JKIAhDq06T0F6FnztwMNRvYgjeQSBeMc1ZG/tA47EwfduvkuQS8apbkM/lpLpWsaCeYsXVg==" }, + "node_modules/@types/tedious": { + "version": "4.0.14", + "resolved": "https://registry.npmjs.org/@types/tedious/-/tedious-4.0.14.tgz", + "integrity": "sha512-KHPsfX/FoVbUGbyYvk1q9MMQHLPeRZhRJZdO45Q4YjvFkv4hMNghCWTvy7rdKessBsmtz4euWCWAB6/tVpI1Iw==", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "6.18.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.18.1.tgz", diff --git a/src/psaggregator/package.json b/src/psaggregator/package.json index cb061ec..3ff6b9c 100644 --- a/src/psaggregator/package.json +++ b/src/psaggregator/package.json @@ -1,6 +1,6 @@ { "name": "psaggregator", - "version": "1.15.1", + "version": "1.16.0", "scripts": { "dev": "vite dev", "build": "vite build", diff --git a/src/psaggregator/server.js b/src/psaggregator/server.js index c68e3a8..ffb0d40 100644 --- a/src/psaggregator/server.js +++ b/src/psaggregator/server.js @@ -15,10 +15,12 @@ if (process.env.PRIVATE_API_ANALYTICS_KEY) { const apiAnalytics = expressAnalytics(process.env.PRIVATE_API_ANALYTICS_KEY, apiAnalyticsConfig); const customMiddleware = (req, res, next) => { - if (req.path.startsWith("/api/")) { - return apiAnalytics(req, res, next); - } - next(); + if (!req.path.startsWith("/api/")) return next(); + if (req.path.endsWith("__data.json")) return next(); + const referer = req.get("Referer"); + if (referer && referer.includes(process.env.PRIVATE_API_HOSTNAME)) return next(); + + return apiAnalytics(req, res, next); }; app.use(customMiddleware); diff --git a/src/psaggregator/src/routes/+layout.svelte b/src/psaggregator/src/routes/+layout.svelte index 507b5d4..feb2a98 100644 --- a/src/psaggregator/src/routes/+layout.svelte +++ b/src/psaggregator/src/routes/+layout.svelte @@ -24,6 +24,9 @@ export let data: LayoutData; + let scrollableContent: HTMLElement; + let atTop = false; + afterNavigate(() => { if (browser) { disableScrollHandling(); @@ -37,11 +40,25 @@ } }); + function scrollToTop(event: TouchEvent) { + const touchY = event.touches[0].clientY; + if (touchY < 10 && !atTop) { + scrollableContent.scrollTo({ top: 0, behavior: "smooth" }); + } + } + onMount(() => { if (browser) { SHOW_ABSOLUTE_DATES.set(localStorage.getItem(SHOW_ABSOLUTE_DATES_KEY) === "true"); VIDEO_COMPLEXE_VIEW.set(localStorage.getItem(VIDEO_COMPLEXE_VIEW_KEY) === "true"); LINK_YOUTUBE.set(localStorage.getItem(LINK_YOUTUBE_KEY) === "true"); + + scrollableContent && + scrollableContent.addEventListener("scroll", () => { + atTop = scrollableContent.scrollTop === 0; + }); + + window && window.addEventListener("touchstart", scrollToTop, { passive: true }); } }); @@ -70,7 +87,7 @@ {/each}