From 97eb929cfd5396ea66078d013e2fe895baae1ea9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 03:40:13 +0000 Subject: [PATCH 01/14] [npm] Bump typescript from 5.5.4 to 5.6.2 Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.5.4 to 5.6.2. - [Release notes](https://github.com/microsoft/TypeScript/releases) - [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml) - [Commits](https://github.com/microsoft/TypeScript/compare/v5.5.4...v5.6.2) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 64f136f3..b36ac403 100644 --- a/package-lock.json +++ b/package-lock.json @@ -49,7 +49,7 @@ "svelte-eslint-parser": "^0.40.0", "tailwindcss": "3.3.6", "tslib": "^2.6.3", - "typescript": "^5.5.4", + "typescript": "^5.6.2", "vite": "^5.4.8", "vite-plugin-tailwind-purgecss": "0.3.0", "vitest": "^1.5.0" @@ -5515,9 +5515,9 @@ } }, "node_modules/typescript": { - "version": "5.5.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", - "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", + "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", "dev": true, "bin": { "tsc": "bin/tsc", diff --git a/package.json b/package.json index e4f224ff..924ee1c8 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "svelte-eslint-parser": "^0.40.0", "tailwindcss": "3.3.6", "tslib": "^2.6.3", - "typescript": "^5.5.4", + "typescript": "^5.6.2", "vite": "^5.4.8", "vite-plugin-tailwind-purgecss": "0.3.0", "vitest": "^1.5.0" From 5c64a73984421fb0a847a017b6037074589f9cb4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 03:40:06 +0000 Subject: [PATCH 02/14] [npm] Bump postcss from 8.4.39 to 8.4.47 Bumps [postcss](https://github.com/postcss/postcss) from 8.4.39 to 8.4.47. - [Release notes](https://github.com/postcss/postcss/releases) - [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss/compare/8.4.39...8.4.47) --- updated-dependencies: - dependency-name: postcss dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 40 ++++++---------------------------------- package.json | 2 +- 2 files changed, 7 insertions(+), 35 deletions(-) diff --git a/package-lock.json b/package-lock.json index b36ac403..e1e2a047 100644 --- a/package-lock.json +++ b/package-lock.json @@ -41,7 +41,7 @@ "eslint": "^8.28.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-svelte": "^2.30.0", - "postcss": "8.4.39", + "postcss": "8.4.47", "prettier": "^3.3.3", "prettier-plugin-svelte": "^3.1.2", "svelte": "^4.2.19", @@ -4171,9 +4171,9 @@ "integrity": "sha512-HKAXTm+cFLNPxNllGIZGgVwX4OCd2SCnLLveUUOk4P27EKz/aPKeGLAcnGXegH3IKZKhvcbmreiwC+vK5vPlXw==" }, "node_modules/postcss": { - "version": "8.4.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.39.tgz", - "integrity": "sha512-0vzE+lAiG7hZl1/9I8yzKLx3aR9Xbof3fBHKunvMfOCYAtMhrsnccJY2iTURb9EZd5+pLuiNV9/c/GZJOHsgIw==", + "version": "8.4.47", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", + "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", "dev": true, "funding": [ { @@ -4191,8 +4191,8 @@ ], "dependencies": { "nanoid": "^3.3.7", - "picocolors": "^1.0.1", - "source-map-js": "^1.2.0" + "picocolors": "^1.1.0", + "source-map-js": "^1.2.1" }, "engines": { "node": "^10 || ^12 || >=14" @@ -5730,34 +5730,6 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/vite/node_modules/postcss": { - "version": "8.4.47", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", - "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "nanoid": "^3.3.7", - "picocolors": "^1.1.0", - "source-map-js": "^1.2.1" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, "node_modules/vitefu": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-0.2.5.tgz", diff --git a/package.json b/package.json index 924ee1c8..e873e0ef 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "eslint": "^8.28.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-svelte": "^2.30.0", - "postcss": "8.4.39", + "postcss": "8.4.47", "prettier": "^3.3.3", "prettier-plugin-svelte": "^3.1.2", "svelte": "^4.2.19", From 4c0925a9c0b6d690b1aef8baf1c710992f5bad29 Mon Sep 17 00:00:00 2001 From: James Date: Wed, 16 Oct 2024 15:45:48 -0400 Subject: [PATCH 03/14] [ALS-6967] Updates for all in one integration (#262) --- Dockerfile | 7 +------ Dockerfile.prod | 6 +----- vite.config.ts | 5 +++++ 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4cea24ed..66ab24ea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,22 +12,17 @@ RUN npm ci --omit dev FROM httpd:2.4.62-alpine RUN apk add --update openssl sed nodejs supervisor -#TODO: volume mount the certs + RUN mkdir -p ${HTTPD_PREFIX}/cert -COPY cert ${HTTPD_PREFIX}/cert -COPY httpd-vhosts.conf ${HTTPD_PREFIX}/conf/extra/httpd-vhosts.conf RUN sed -i '/^#Include conf.extra.httpd-vhosts.conf/s/^#//' ${HTTPD_PREFIX}/conf/httpd.conf - RUN sed -i '/^#LoadModule proxy_module/s/^#//' ${HTTPD_PREFIX}/conf/httpd.conf RUN sed -i '/^#LoadModule proxy_http_module/s/^#//' ${HTTPD_PREFIX}/conf/httpd.conf RUN sed -i '/^#LoadModule proxy_connect_module/s/^#//' ${HTTPD_PREFIX}/conf/httpd.conf - RUN sed -i '/^#LoadModule ssl_module modules\/mod_ssl.so/s/^#//' ${HTTPD_PREFIX}/conf/httpd.conf RUN sed -i '/^#LoadModule rewrite_module modules\/mod_rewrite.so/s/^#//' ${HTTPD_PREFIX}/conf/httpd.conf RUN sed -i '/^#LoadModule socache_shmcb_module modules\/mod_socache_shmcb.so/s/^#//' ${HTTPD_PREFIX}/conf/httpd.conf RUN mkdir -p /usr/local/apache2/logs/ssl_mutex - RUN sed -i 's/Options Indexes FollowSymLinks/Options -Indexes +FollowSymLinks/' ${HTTPD_PREFIX}/conf/httpd.conf WORKDIR /app diff --git a/Dockerfile.prod b/Dockerfile.prod index 94647d17..58322156 100644 --- a/Dockerfile.prod +++ b/Dockerfile.prod @@ -12,17 +12,13 @@ RUN npm ci --omit dev FROM httpd:2.4.62-alpine RUN apk add --update openssl sed nodejs supervisor -#TODO: volume mount the certs + RUN mkdir -p ${HTTPD_PREFIX}/cert -COPY cert ${HTTPD_PREFIX}/cert -COPY httpd-vhosts.conf ${HTTPD_PREFIX}/conf/extra/httpd-vhosts.conf RUN sed -i '/^#Include conf.extra.httpd-vhosts.conf/s/^#//' ${HTTPD_PREFIX}/conf/httpd.conf - RUN sed -i '/^#LoadModule proxy_module/s/^#//' ${HTTPD_PREFIX}/conf/httpd.conf RUN sed -i '/^#LoadModule proxy_http_module/s/^#//' ${HTTPD_PREFIX}/conf/httpd.conf RUN sed -i '/^#LoadModule proxy_connect_module/s/^#//' ${HTTPD_PREFIX}/conf/httpd.conf - RUN sed -i '/^#LoadModule ssl_module modules\/mod_ssl.so/s/^#//' ${HTTPD_PREFIX}/conf/httpd.conf RUN sed -i '/^#LoadModule rewrite_module modules\/mod_rewrite.so/s/^#//' ${HTTPD_PREFIX}/conf/httpd.conf RUN sed -i '/^#LoadModule socache_shmcb_module modules\/mod_socache_shmcb.so/s/^#//' ${HTTPD_PREFIX}/conf/httpd.conf diff --git a/vite.config.ts b/vite.config.ts index 6ea69b82..529e4f26 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -5,5 +5,10 @@ import { defineConfig } from 'vite'; export default () => { return defineConfig({ plugins: [sveltekit(), purgeCss()], + build: { + rollupOptions: { + maxParallelFileOps: 10, + }, + }, }); }; From ef877417477245feac7c48cef8fd2e12c1890d10 Mon Sep 17 00:00:00 2001 From: James Date: Wed, 16 Oct 2024 15:48:39 -0400 Subject: [PATCH 04/14] [ALS-7439] Add loading indicator to searches (#255) --- src/lib/components/datatable/RemoteTable.svelte | 13 ++++++++++++- src/lib/components/explorer/Explorer.svelte | 17 +++++++++++++---- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/lib/components/datatable/RemoteTable.svelte b/src/lib/components/datatable/RemoteTable.svelte index 77b1a647..f59e32d6 100644 --- a/src/lib/components/datatable/RemoteTable.svelte +++ b/src/lib/components/datatable/RemoteTable.svelte @@ -12,9 +12,12 @@ import RowsPerPage from '$lib/components/datatable/accessories/Rows.svelte'; import RowCount from '$lib/components/datatable/accessories/Count.svelte'; import Pagination from '$lib/components/datatable/accessories/Pagination.svelte'; + import { ProgressRadial } from '@skeletonlabs/skeleton'; + import type { Writable } from 'svelte/store'; export let tableName: string = 'ExplorerTable'; export let handler: DataHandler; + export let isLoading: Writable; export let searchable = false; export let title = ''; export let fullWidth: boolean = false; @@ -87,7 +90,15 @@ - {#if $rows.length > 0} + {#if $isLoading} + + +
+ +
+ + + {:else if $rows.length > 0} {#each $rows as row, i} {/each} diff --git a/src/lib/components/explorer/Explorer.svelte b/src/lib/components/explorer/Explorer.svelte index 7a346ca3..6a27e808 100644 --- a/src/lib/components/explorer/Explorer.svelte +++ b/src/lib/components/explorer/Explorer.svelte @@ -1,7 +1,7 @@ @@ -53,42 +54,10 @@ language="python" lineNumbers={true} buttonCopied="Copied!" - code={`# Requires python 3.6 or later -import sys -import pandas as pd -import matplotlib.pyplot as plt -# BDC Powered by Terra users uncomment the following line to specify package install location -# sys.path.insert(0, r"/home/jupyter/.local/lib/python3.7/site-packages") -!{sys.executable} -m pip install --upgrade --force-reinstall git+https://github.com/hms-dbmi/pic-sure-python-client.git -!{sys.executable} -m pip install --upgrade --force-reinstall git+https://github.com/hms-dbmi/pic-sure-python-adapter-hpds.git -!{sys.executable} -m pip install --upgrade --force-reinstall git+https://github.com/hms-dbmi/pic-sure-biodatacatalyst-python-adapter-hpds.git -import PicSureClient -import PicSureBdcAdapter -# Set up connection to PIC-SURE API -PICSURE_network_URL = "https://picsure.biodatacatalyst.nhlbi.nih.gov/picsure" -token_file = "token.txt" - -with open(token_file, "r") as f: - my_token = f.read() - -bdc = PicSureBdcAdapter.Adapter(PICSURE_network_URL, my_token)`} + code={codeBlocks?.bdcPythonAPI || 'Code not set'} > {:else if tabSet === 1} - {/if} From 10bc6182ce304cf3471369f0c9a770a5fb692caa Mon Sep 17 00:00:00 2001 From: James Date: Tue, 22 Oct 2024 10:42:00 -0400 Subject: [PATCH 11/14] Bump rollup, vite (#238) --- package-lock.json | 134 +++++++++++++++++++++++----------------------- 1 file changed, 67 insertions(+), 67 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0ca0c179..51aa9efc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -888,9 +888,9 @@ "dev": true }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.22.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.5.tgz", - "integrity": "sha512-SU5cvamg0Eyu/F+kLeMXS7GoahL+OoizlclVFX3l5Ql6yNlywJJ0OuqTzUx0v+aHhPHEB/56CT06GQrRrGNYww==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.24.0.tgz", + "integrity": "sha512-Q6HJd7Y6xdB48x8ZNVDOqsbh2uByBhgK8PiQgPhwkIw/HC/YX5Ghq2mQY5sRMZWHb3VsFkWooUVOZHKr7DmDIA==", "cpu": [ "arm" ], @@ -901,9 +901,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.22.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.22.5.tgz", - "integrity": "sha512-S4pit5BP6E5R5C8S6tgU/drvgjtYW76FBuG6+ibG3tMvlD1h9LHVF9KmlmaUBQ8Obou7hEyS+0w+IR/VtxwNMQ==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.24.0.tgz", + "integrity": "sha512-ijLnS1qFId8xhKjT81uBHuuJp2lU4x2yxa4ctFPtG+MqEE6+C5f/+X/bStmxapgmwLwiL3ih122xv8kVARNAZA==", "cpu": [ "arm64" ], @@ -914,9 +914,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.22.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.22.5.tgz", - "integrity": "sha512-250ZGg4ipTL0TGvLlfACkIxS9+KLtIbn7BCZjsZj88zSg2Lvu3Xdw6dhAhfe/FjjXPVNCtcSp+WZjVsD3a/Zlw==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.24.0.tgz", + "integrity": "sha512-bIv+X9xeSs1XCk6DVvkO+S/z8/2AMt/2lMqdQbMrmVpgFvXlmde9mLcbQpztXm1tajC3raFDqegsH18HQPMYtA==", "cpu": [ "arm64" ], @@ -927,9 +927,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.22.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.22.5.tgz", - "integrity": "sha512-D8brJEFg5D+QxFcW6jYANu+Rr9SlKtTenmsX5hOSzNYVrK5oLAEMTUgKWYJP+wdKyCdeSwnapLsn+OVRFycuQg==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.24.0.tgz", + "integrity": "sha512-X6/nOwoFN7RT2svEQWUsW/5C/fYMBe4fnLK9DQk4SX4mgVBiTA9h64kjUYPvGQ0F/9xwJ5U5UfTbl6BEjaQdBQ==", "cpu": [ "x64" ], @@ -940,9 +940,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.22.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.22.5.tgz", - "integrity": "sha512-PNqXYmdNFyWNg0ma5LdY8wP+eQfdvyaBAojAXgO7/gs0Q/6TQJVXAXe8gwW9URjbS0YAammur0fynYGiWsKlXw==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.24.0.tgz", + "integrity": "sha512-0KXvIJQMOImLCVCz9uvvdPgfyWo93aHHp8ui3FrtOP57svqrF/roSSR5pjqL2hcMp0ljeGlU4q9o/rQaAQ3AYA==", "cpu": [ "arm" ], @@ -953,9 +953,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.22.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.22.5.tgz", - "integrity": "sha512-kSSCZOKz3HqlrEuwKd9TYv7vxPYD77vHSUvM2y0YaTGnFc8AdI5TTQRrM1yIp3tXCKrSL9A7JLoILjtad5t8pQ==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.24.0.tgz", + "integrity": "sha512-it2BW6kKFVh8xk/BnHfakEeoLPv8STIISekpoF+nBgWM4d55CZKc7T4Dx1pEbTnYm/xEKMgy1MNtYuoA8RFIWw==", "cpu": [ "arm" ], @@ -966,9 +966,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.22.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.5.tgz", - "integrity": "sha512-oTXQeJHRbOnwRnRffb6bmqmUugz0glXaPyspp4gbQOPVApdpRrY/j7KP3lr7M8kTfQTyrBUzFjj5EuHAhqH4/w==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.24.0.tgz", + "integrity": "sha512-i0xTLXjqap2eRfulFVlSnM5dEbTVque/3Pi4g2y7cxrs7+a9De42z4XxKLYJ7+OhE3IgxvfQM7vQc43bwTgPwA==", "cpu": [ "arm64" ], @@ -979,9 +979,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.22.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.22.5.tgz", - "integrity": "sha512-qnOTIIs6tIGFKCHdhYitgC2XQ2X25InIbZFor5wh+mALH84qnFHvc+vmWUpyX97B0hNvwNUL4B+MB8vJvH65Fw==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.24.0.tgz", + "integrity": "sha512-9E6MKUJhDuDh604Qco5yP/3qn3y7SLXYuiC0Rpr89aMScS2UAmK1wHP2b7KAa1nSjWJc/f/Lc0Wl1L47qjiyQw==", "cpu": [ "arm64" ], @@ -992,9 +992,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.22.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.5.tgz", - "integrity": "sha512-TMYu+DUdNlgBXING13rHSfUc3Ky5nLPbWs4bFnT+R6Vu3OvXkTkixvvBKk8uO4MT5Ab6lC3U7x8S8El2q5o56w==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.24.0.tgz", + "integrity": "sha512-2XFFPJ2XMEiF5Zi2EBf4h73oR1V/lycirxZxHZNc93SqDN/IWhYYSYj8I9381ikUFXZrz2v7r2tOVk2NBwxrWw==", "cpu": [ "ppc64" ], @@ -1005,9 +1005,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.22.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.22.5.tgz", - "integrity": "sha512-PTQq1Kz22ZRvuhr3uURH+U/Q/a0pbxJoICGSprNLAoBEkyD3Sh9qP5I0Asn0y0wejXQBbsVMRZRxlbGFD9OK4A==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.24.0.tgz", + "integrity": "sha512-M3Dg4hlwuntUCdzU7KjYqbbd+BLq3JMAOhCKdBE3TcMGMZbKkDdJ5ivNdehOssMCIokNHFOsv7DO4rlEOfyKpg==", "cpu": [ "riscv64" ], @@ -1018,9 +1018,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.22.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.22.5.tgz", - "integrity": "sha512-bR5nCojtpuMss6TDEmf/jnBnzlo+6n1UhgwqUvRoe4VIotC7FG1IKkyJbwsT7JDsF2jxR+NTnuOwiGv0hLyDoQ==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.24.0.tgz", + "integrity": "sha512-mjBaoo4ocxJppTorZVKWFpy1bfFj9FeCMJqzlMQGjpNPY9JwQi7OuS1axzNIk0nMX6jSgy6ZURDZ2w0QW6D56g==", "cpu": [ "s390x" ], @@ -1031,9 +1031,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.22.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.22.5.tgz", - "integrity": "sha512-N0jPPhHjGShcB9/XXZQWuWBKZQnC1F36Ce3sDqWpujsGjDz/CQtOL9LgTrJ+rJC8MJeesMWrMWVLKKNR/tMOCA==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.24.0.tgz", + "integrity": "sha512-ZXFk7M72R0YYFN5q13niV0B7G8/5dcQ9JDp8keJSfr3GoZeXEoMHP/HlvqROA3OMbMdfr19IjCeNAnPUG93b6A==", "cpu": [ "x64" ], @@ -1044,9 +1044,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.22.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.22.5.tgz", - "integrity": "sha512-uBa2e28ohzNNwjr6Uxm4XyaA1M/8aTgfF2T7UIlElLaeXkgpmIJ2EitVNQxjO9xLLLy60YqAgKn/AqSpCUkE9g==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.24.0.tgz", + "integrity": "sha512-w1i+L7kAXZNdYl+vFvzSZy8Y1arS7vMgIy8wusXJzRrPyof5LAb02KGr1PD2EkRcl73kHulIID0M501lN+vobQ==", "cpu": [ "x64" ], @@ -1057,9 +1057,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.22.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.22.5.tgz", - "integrity": "sha512-RXT8S1HP8AFN/Kr3tg4fuYrNxZ/pZf1HemC5Tsddc6HzgGnJm0+Lh5rAHJkDuW3StI0ynNXukidROMXYl6ew8w==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.24.0.tgz", + "integrity": "sha512-VXBrnPWgBpVDCVY6XF3LEW0pOU51KbaHhccHw6AS6vBWIC60eqsH19DAeeObl+g8nKAz04QFdl/Cefta0xQtUQ==", "cpu": [ "arm64" ], @@ -1070,9 +1070,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.22.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.22.5.tgz", - "integrity": "sha512-ElTYOh50InL8kzyUD6XsnPit7jYCKrphmddKAe1/Ytt74apOxDq5YEcbsiKs0fR3vff3jEneMM+3I7jbqaMyBg==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.24.0.tgz", + "integrity": "sha512-xrNcGDU0OxVcPTH/8n/ShH4UevZxKIO6HJFK0e15XItZP2UcaiLFd5kiX7hJnqCbSztUF8Qot+JWBC/QXRPYWQ==", "cpu": [ "ia32" ], @@ -1083,9 +1083,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.22.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.5.tgz", - "integrity": "sha512-+lvL/4mQxSV8MukpkKyyvfwhH266COcWlXE/1qxwN08ajovta3459zrjLghYMgDerlzNwLAcFpvU+WWE5y6nAQ==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.24.0.tgz", + "integrity": "sha512-fbMkAF7fufku0N2dE5TBXcNlg0pt0cJue4xBRE2Qc5Vqikxr4VCgKj/ht6SMdFcOacVA9rqF70APJ8RN/4vMJw==", "cpu": [ "x64" ], @@ -4387,9 +4387,9 @@ } }, "node_modules/rollup": { - "version": "4.22.5", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.22.5.tgz", - "integrity": "sha512-WoinX7GeQOFMGznEcWA1WrTQCd/tpEbMkc3nuMs9BT0CPjMdSjPMTVClwWd4pgSQwJdP65SK9mTCNvItlr5o7w==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.24.0.tgz", + "integrity": "sha512-DOmrlGSXNk1DM0ljiQA+i+o0rSLhtii1je5wgk60j49d1jHT5YYttBv1iWOnYSTG+fZZESUOSNiAl89SIet+Cg==", "dev": true, "dependencies": { "@types/estree": "1.0.6" @@ -4402,22 +4402,22 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.22.5", - "@rollup/rollup-android-arm64": "4.22.5", - "@rollup/rollup-darwin-arm64": "4.22.5", - "@rollup/rollup-darwin-x64": "4.22.5", - "@rollup/rollup-linux-arm-gnueabihf": "4.22.5", - "@rollup/rollup-linux-arm-musleabihf": "4.22.5", - "@rollup/rollup-linux-arm64-gnu": "4.22.5", - "@rollup/rollup-linux-arm64-musl": "4.22.5", - "@rollup/rollup-linux-powerpc64le-gnu": "4.22.5", - "@rollup/rollup-linux-riscv64-gnu": "4.22.5", - "@rollup/rollup-linux-s390x-gnu": "4.22.5", - "@rollup/rollup-linux-x64-gnu": "4.22.5", - "@rollup/rollup-linux-x64-musl": "4.22.5", - "@rollup/rollup-win32-arm64-msvc": "4.22.5", - "@rollup/rollup-win32-ia32-msvc": "4.22.5", - "@rollup/rollup-win32-x64-msvc": "4.22.5", + "@rollup/rollup-android-arm-eabi": "4.24.0", + "@rollup/rollup-android-arm64": "4.24.0", + "@rollup/rollup-darwin-arm64": "4.24.0", + "@rollup/rollup-darwin-x64": "4.24.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.24.0", + "@rollup/rollup-linux-arm-musleabihf": "4.24.0", + "@rollup/rollup-linux-arm64-gnu": "4.24.0", + "@rollup/rollup-linux-arm64-musl": "4.24.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.24.0", + "@rollup/rollup-linux-riscv64-gnu": "4.24.0", + "@rollup/rollup-linux-s390x-gnu": "4.24.0", + "@rollup/rollup-linux-x64-gnu": "4.24.0", + "@rollup/rollup-linux-x64-musl": "4.24.0", + "@rollup/rollup-win32-arm64-msvc": "4.24.0", + "@rollup/rollup-win32-ia32-msvc": "4.24.0", + "@rollup/rollup-win32-x64-msvc": "4.24.0", "fsevents": "~2.3.2" } }, From 92bbf94e5369a32d539124d128171bb954742b96 Mon Sep 17 00:00:00 2001 From: Gcolon021 <34667267+Gcolon021@users.noreply.github.com> Date: Tue, 22 Oct 2024 13:39:35 -0400 Subject: [PATCH 12/14] Enhance GA tracking consent check (#229) [ALS-6742] FIX: Google Consents - The default consent is now set on every page appropriately. - Removed `security_storage` and replaced it with `ad_user_data`. > - Updated unit test to reflect this change. - Moved all related code into a single `GoogleTracking.svelte` class. This made it easier to ensure things are loaded in the expected order and to maintain the code. --- .../tracking/GoogleAnalytics.svelte | 53 ------- .../components/tracking/GoogleConsents.svelte | 65 -------- .../tracking/GoogleTagManger.svelte | 24 --- .../components/tracking/GoogleTracking.svelte | 139 ++++++++++++++++++ src/routes/+layout.svelte | 22 +-- tests/routes/login/test.ts | 4 +- 6 files changed, 152 insertions(+), 155 deletions(-) delete mode 100644 src/lib/components/tracking/GoogleAnalytics.svelte delete mode 100644 src/lib/components/tracking/GoogleConsents.svelte delete mode 100644 src/lib/components/tracking/GoogleTagManger.svelte create mode 100644 src/lib/components/tracking/GoogleTracking.svelte diff --git a/src/lib/components/tracking/GoogleAnalytics.svelte b/src/lib/components/tracking/GoogleAnalytics.svelte deleted file mode 100644 index 042fb690..00000000 --- a/src/lib/components/tracking/GoogleAnalytics.svelte +++ /dev/null @@ -1,53 +0,0 @@ - - - - {#if googleAnalyticsID} - - {/if} - diff --git a/src/lib/components/tracking/GoogleConsents.svelte b/src/lib/components/tracking/GoogleConsents.svelte deleted file mode 100644 index d026f803..00000000 --- a/src/lib/components/tracking/GoogleConsents.svelte +++ /dev/null @@ -1,65 +0,0 @@ - - -{#if googleTag && googleConsentVisible && branding?.privacyPolicy?.url && branding?.privacyPolicy?.title} -
-
-
-
-

- We use cookies to provide you with the best possible experience and to help us make the - site more useful to visitors. To learn more, please visit our {branding?.privacyPolicy?.title}. -

-
-
- - -
-
-
-
-{/if} diff --git a/src/lib/components/tracking/GoogleTagManger.svelte b/src/lib/components/tracking/GoogleTagManger.svelte deleted file mode 100644 index dfe8829f..00000000 --- a/src/lib/components/tracking/GoogleTagManger.svelte +++ /dev/null @@ -1,24 +0,0 @@ - diff --git a/src/lib/components/tracking/GoogleTracking.svelte b/src/lib/components/tracking/GoogleTracking.svelte new file mode 100644 index 00000000..cd6f8287 --- /dev/null +++ b/src/lib/components/tracking/GoogleTracking.svelte @@ -0,0 +1,139 @@ + + + + {#if googleAnalyticsID} + + + {/if} + {#if googleTag} + + {/if} + + +{#if googleTag && googleConsentVisible && branding?.privacyPolicy?.url && branding?.privacyPolicy?.title} +
+
+
+
+

+ We use cookies to provide you with the best possible experience and to help us make the + site more useful to visitors. To learn more, please visit our {branding?.privacyPolicy?.title}. +

+
+
+ + +
+
+
+
+{/if} diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 7fb2eb6c..3235fcb9 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -3,30 +3,30 @@ import '../app.postcss'; import { initializeStores } from '@skeletonlabs/skeleton'; import { initializeBranding } from '$lib/configuration'; + import GoogleTracking from '$lib/components/tracking/GoogleTracking.svelte'; import { settings } from '$lib/configuration'; - import GoogleAnalytics from '$lib/components/tracking/GoogleAnalytics.svelte'; - import GoogleConsents from '$lib/components/tracking/GoogleConsents.svelte'; - import GoogleTagManger from '$lib/components/tracking/GoogleTagManger.svelte'; - let googleTagManagerId = settings.google.tagManager; + + let googleTag = settings.google.tagManager; initializeStores(); initializeBranding(); -
- + +{#if googleTag} +{/if} + +
- +
- - diff --git a/tests/routes/login/test.ts b/tests/routes/login/test.ts index f95ed9f1..71b3b160 100644 --- a/tests/routes/login/test.ts +++ b/tests/routes/login/test.ts @@ -156,7 +156,7 @@ unauthedTest.describe('Login page', () => { expect(parsedGoogleConsent).toHaveProperty('ad_storage', 'denied'); expect(parsedGoogleConsent).toHaveProperty('analytics_storage', 'granted'); expect(parsedGoogleConsent).toHaveProperty('personalization_storage', 'granted'); - expect(parsedGoogleConsent).toHaveProperty('security_storage', 'granted'); + expect(parsedGoogleConsent).toHaveProperty('ad_user_data', 'denied'); expect(parsedGoogleConsent).toHaveProperty('ad_personalization', 'denied'); expect(parsedGoogleConsent).toHaveProperty('ad_data', 'denied'); } @@ -179,7 +179,7 @@ unauthedTest.describe('Login page', () => { expect(parsedGoogleConsent).toHaveProperty('ad_storage', 'denied'); expect(parsedGoogleConsent).toHaveProperty('analytics_storage', 'denied'); expect(parsedGoogleConsent).toHaveProperty('personalization_storage', 'denied'); - expect(parsedGoogleConsent).toHaveProperty('security_storage', 'denied'); + expect(parsedGoogleConsent).toHaveProperty('ad_user_data', 'denied'); expect(parsedGoogleConsent).toHaveProperty('ad_personalization', 'denied'); expect(parsedGoogleConsent).toHaveProperty('ad_data', 'denied'); } From c8e4a25a67eafe83178c26ac859080ac200c6e56 Mon Sep 17 00:00:00 2001 From: James Date: Tue, 22 Oct 2024 15:59:30 -0400 Subject: [PATCH 13/14] [ALS-7506][ALS-7646] Fix logout bug & add message when timed out (#263) --- src/lib/api.ts | 6 +++-- src/lib/components/Navigation.svelte | 2 +- src/lib/services/dictionary.ts | 23 ++++++++----------- src/lib/stores/User.ts | 15 ++++++++---- .../(authentication)/login/+layout.svelte | 2 ++ .../(authentication)/login/+page.svelte | 19 ++++++++++++++- 6 files changed, 45 insertions(+), 22 deletions(-) diff --git a/src/lib/api.ts b/src/lib/api.ts index e1514df9..a6246ed6 100644 --- a/src/lib/api.ts +++ b/src/lib/api.ts @@ -75,8 +75,10 @@ async function handleResponse(res: Response) { return text; //TODO: Change this } } else if (res.status === 401) { - logout(); - throw error(401, 'Unauthorized'); + browser && + sessionStorage.setItem('logout-reason', 'Your session has timed out. Please log in.'); + logout(undefined, true); + return; } throw error(res.status as NumericRange<400, 599>, await res.text()); diff --git a/src/lib/components/Navigation.svelte b/src/lib/components/Navigation.svelte index 44d93138..0fa382db 100644 --- a/src/lib/components/Navigation.svelte +++ b/src/lib/components/Navigation.svelte @@ -132,7 +132,7 @@ id="user-logout-btn" class="btn variant-ringed-primary" title="Logout" - on:click={() => logout(providerInstance)}>Logout logout(providerInstance, false)}>Logout {:else} diff --git a/src/lib/services/dictionary.ts b/src/lib/services/dictionary.ts index 3a64c91f..be5181a7 100644 --- a/src/lib/services/dictionary.ts +++ b/src/lib/services/dictionary.ts @@ -49,16 +49,6 @@ export function searchDictionary( ); } -export async function getAllFacets(): Promise { - let request: DictionarySearchRequest = { facets: [], search: '' }; - if (!get(page).url.pathname.includes('/discover')) { - request = addConsents(request); - } - const response: DictionaryFacetResult[] = await api.post(`${dictionaryUrl}facets/`, request); - initializeHiddenFacets(response); - return response; -} - function initializeHiddenFacets(response: DictionaryFacetResult[]) { // facets that have a count of zero should never be shown in the UI // this happens because of consent filters @@ -87,11 +77,16 @@ export async function updateFacetsFromSearch( request = addConsents(request); } - const response: DictionaryFacetResult[] = await api.post(`${dictionaryUrl}facets/`, request); - if (facets.length === 0 && search.length === 0) { - initializeHiddenFacets(response); + try { + const response: DictionaryFacetResult[] = await api.post(`${dictionaryUrl}facets/`, request); + if (facets.length === 0 && search.length === 0) { + initializeHiddenFacets(response); + } + return response; + } catch (error) { + console.error('Failed to update facets from search:', error); + throw error; } - return response; } export async function getConceptDetails( diff --git a/src/lib/stores/User.ts b/src/lib/stores/User.ts index 5489d994..6e7e0dcf 100644 --- a/src/lib/stores/User.ts +++ b/src/lib/stores/User.ts @@ -8,6 +8,7 @@ import { routes, features, resources } from '$lib/configuration'; import { goto } from '$app/navigation'; import type { QueryInterface } from '$lib/models/query/Query'; import type AuthProvider from '$lib/models/AuthProvider.ts'; +import { page } from '$app/stores'; export const user: Writable = writable(restoreUser()); @@ -134,11 +135,15 @@ export async function login(token: string) { } } -export async function logout(authProvider: AuthProvider | undefined) { +export async function logout(authProvider?: AuthProvider, redirect = false) { if (browser) { const token = localStorage.getItem('token'); - token && api.get('/psama/logout'); - token && localStorage.removeItem('token'); + if (token) { + api.get('/psama/logout').catch((error) => { + console.error('Error logging out: ' + error); + }); + localStorage.removeItem('token'); + } } // get the auth provider @@ -161,7 +166,9 @@ export async function logout(authProvider: AuthProvider | undefined) { }); } else { user.set({}); - goto('/login'); + redirect + ? goto(`/login?redirectTo=${encodeURIComponent(get(page).url.pathname)}`) + : goto('/login'); } } diff --git a/src/routes/(authentication)/login/+layout.svelte b/src/routes/(authentication)/login/+layout.svelte index 8ef023d8..6b98ce61 100644 --- a/src/routes/(authentication)/login/+layout.svelte +++ b/src/routes/(authentication)/login/+layout.svelte @@ -4,6 +4,7 @@ import { onMount } from 'svelte'; import Footer from '$lib/components/Footer.svelte'; import Dots from '$lib/components/Dots.svelte'; + import { Toast } from '@skeletonlabs/skeleton'; onMount(() => { if ($user && $user.token) { @@ -12,6 +13,7 @@ }); +
diff --git a/src/routes/(authentication)/login/+page.svelte b/src/routes/(authentication)/login/+page.svelte index ea479cdf..1e45f4c5 100644 --- a/src/routes/(authentication)/login/+page.svelte +++ b/src/routes/(authentication)/login/+page.svelte @@ -6,11 +6,28 @@ import type { AuthData } from '$lib/models/AuthProvider'; import { branding, features } from '$lib/configuration'; import { fly } from 'svelte/transition'; - + import { browser } from '$app/environment'; + import { getToastStore } from '@skeletonlabs/skeleton'; + import { onMount } from 'svelte'; + const toastStore = getToastStore(); const redirectTo = $page.url.searchParams.get('redirectTo') || '/'; const siteName = branding?.applicationName; const description = branding?.login.description; const openPicsureLinkText = branding?.login.openPicsureLinkText; + let logoutReason: string | null; + + onMount(() => { + if (browser) { + logoutReason = sessionStorage.getItem('logout-reason'); + if (logoutReason) { + toastStore.trigger({ + message: logoutReason!, + background: 'variant-filled-error', + }); + sessionStorage.removeItem('logout-reason'); + } + } + }); let selected: string; From 464f0d6c2e52e4eb7fdf97472eb094fcef45702c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 22 Oct 2024 16:00:39 -0400 Subject: [PATCH 14/14] [docker] Bump node from 22.9.0-alpine3.19 to 23.0.0-alpine3.19 (#268) Bumps node from 22.9.0-alpine3.19 to 23.0.0-alpine3.19. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=node&package-manager=docker&previous-version=22.9.0-alpine3.19&new-version=23.0.0-alpine3.19)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--------- Signed-off-by: dependabot[bot] Co-authored-by: James Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Dockerfile | 2 +- Dockerfile.bdc | 2 +- Dockerfile.prod | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 66ab24ea..3b38fa8b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Step 1: Build the app with node -FROM node:22.9.0-alpine3.19 AS builder +FROM node:23.0.0-alpine3.19 AS builder WORKDIR /app COPY package*.json . COPY .env . diff --git a/Dockerfile.bdc b/Dockerfile.bdc index 485677eb..9b7522e3 100644 --- a/Dockerfile.bdc +++ b/Dockerfile.bdc @@ -1,5 +1,5 @@ # Step 1: Build the app with node -FROM node:22.9.0-alpine3.19 AS builder +FROM node:23.0.0-alpine3.19 AS builder WORKDIR /app COPY package*.json . COPY .env . diff --git a/Dockerfile.prod b/Dockerfile.prod index 58322156..f470405e 100644 --- a/Dockerfile.prod +++ b/Dockerfile.prod @@ -1,5 +1,5 @@ # Step 1: Build the app with node -FROM node:22.9.0-alpine3.19 AS builder +FROM node:23.0.0-alpine3.19 AS builder WORKDIR /app COPY package*.json . COPY .env .