diff --git a/.github/workflows/_security-checks.yml b/.github/workflows/_security-checks.yml index c2da6a2e..02c3ab61 100644 --- a/.github/workflows/_security-checks.yml +++ b/.github/workflows/_security-checks.yml @@ -12,7 +12,7 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - name: Scan repo - uses: aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0 # 0.29.0 + uses: aquasecurity/trivy-action@6c175e9c4083a92bbca2f9724c8a5e33bc2d97a5 # 0.30.0 with: scan-type: 'fs' scan-ref: '.' diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a337f5a..681b13cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [0.20.0](https://github.com/stacklok/codegate-ui/compare/v0.19.1...v0.20.0) (2025-03-17) + + +### Features + +* shareable workspaces MVP (frontend) ([#379](https://github.com/stacklok/codegate-ui/issues/379)) ([6baf15c](https://github.com/stacklok/codegate-ui/commit/6baf15c5b51ff58882975148183e90abdade1f2b)) + + +### Bug Fixes + +* use package.json overrides to bump `@babel/runtime` & `prismjs` to fix npm audit warnings ([#396](https://github.com/stacklok/codegate-ui/issues/396)) ([79041a1](https://github.com/stacklok/codegate-ui/commit/79041a1aa7635a1539aec3618cb56d2133a48cf3)) + ## [0.19.1](https://github.com/stacklok/codegate-ui/compare/v0.19.0...v0.19.1) (2025-03-12) diff --git a/package-lock.json b/package-lock.json index e863006a..db7fab90 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,18 +1,18 @@ { "name": "vite-project", - "version": "0.19.1", + "version": "0.20.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "vite-project", - "version": "0.19.1", + "version": "0.20.0", "dependencies": { "@dnd-kit/core": "^6.3.1", "@dnd-kit/sortable": "^10.0.0", "@dnd-kit/utilities": "^3.2.2", "@hey-api/client-fetch": "^0.7.1", - "@monaco-editor/react": "^4.6.0", + "@monaco-editor/react": "^4.7.0", "@stacklok/ui-kit": "^1.0.1-9", "@tanstack/react-query": "^5.64.1", "@tanstack/react-query-devtools": "^5.66.0", @@ -27,7 +27,7 @@ "react": "19.0.0", "react-dom": "19.0.0", "react-markdown": "^9.0.1", - "react-router-dom": "^7.1.1", + "react-router-dom": "^7.3.0", "react-syntax-highlighter": "^15.6.1", "remark": "^15.0.1", "remark-gfm": "^4.0.0", @@ -53,13 +53,13 @@ "@types/react": "^19.0.2", "@types/react-dom": "^19.0.3", "@typescript-eslint/parser": "^8.23.0", - "@vitejs/plugin-react-swc": "^3.5.0", + "@vitejs/plugin-react-swc": "^3.8.0", "@vitest/coverage-istanbul": "^3.0.5", "@vitest/expect": "^3.0.5", "@vitest/ui": "^3.0.5", "autoprefixer": "^10.4.20", "eslint": "^9.21.0", - "eslint-import-resolver-typescript": "^3.7.0", + "eslint-import-resolver-typescript": "^4.0.0", "eslint-plugin-import": "^2.31.0", "eslint-plugin-react-hooks": "^5.1.0", "eslint-plugin-react-refresh": "^0.4.16", @@ -69,7 +69,7 @@ "husky": "^9.1.6", "jsdom": "^26.0.0", "knip": "^5.43.6", - "lint-staged": "^15.3.0", + "lint-staged": "^15.5.0", "msw": "^2.7.0", "postcss": "^8.4.49", "prettier": "3.5.3", @@ -326,9 +326,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.0.tgz", - "integrity": "sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.10.tgz", + "integrity": "sha512-2WJMeRQPHKSPemqk/awGrAiuFfzBmOIPXKizAsVhWH9YJqLZ0H+HS4c8loHGgW6utJ3E/ejXQUsiGaQy2NZ9Fw==", "license": "MIT", "dependencies": { "regenerator-runtime": "^0.14.0" @@ -604,6 +604,40 @@ "react": ">=16.8.0" } }, + "node_modules/@emnapi/core": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.3.1.tgz", + "integrity": "sha512-pVGjBIt1Y6gg3EJN8jTcfpP/+uuRksIo055oE/OBkDNcjZqVbfkWCksG1Jp4yZnj3iKWyWX8fdG/j6UDYPbFog==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/wasi-threads": "1.0.1", + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/runtime": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.3.1.tgz", + "integrity": "sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/wasi-threads": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.0.1.tgz", + "integrity": "sha512-iIBu7mwkq4UQGeMEM8bLwNK962nXdhodeScX4slfQnRhEMMzvYivHhutCIk8uojvmASXXPC2WNEjwxFWk72Oqw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.24.2", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.2.tgz", @@ -1727,29 +1761,26 @@ "license": "MIT" }, "node_modules/@monaco-editor/loader": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@monaco-editor/loader/-/loader-1.4.0.tgz", - "integrity": "sha512-00ioBig0x642hytVspPl7DbQyaSWRaolYie/UFNjoTdvoKPzo6xrXLhTk9ixgIKcLH5b5vDOjVNiGyY+uDCUlg==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@monaco-editor/loader/-/loader-1.5.0.tgz", + "integrity": "sha512-hKoGSM+7aAc7eRTRjpqAZucPmoNOC4UUbknb/VNoTkEIkCPhqV8LfbsgM1webRM7S/z21eHEx9Fkwx8Z/C/+Xw==", "license": "MIT", "dependencies": { "state-local": "^1.0.6" - }, - "peerDependencies": { - "monaco-editor": ">= 0.21.0 < 1" } }, "node_modules/@monaco-editor/react": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@monaco-editor/react/-/react-4.6.0.tgz", - "integrity": "sha512-RFkU9/i7cN2bsq/iTkurMWOEErmYcY6JiQI3Jn+WeR/FGISH8JbHERjpS9oRuSOPvDMJI0Z8nJeKkbOs9sBYQw==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@monaco-editor/react/-/react-4.7.0.tgz", + "integrity": "sha512-cyzXQCtO47ydzxpQtCGSQGOC8Gk3ZUeBXFAxD+CWXYFo5OqZyZUonFl0DwUlTyAfRHntBfw2p3w4s9R6oe1eCA==", "license": "MIT", "dependencies": { - "@monaco-editor/loader": "^1.4.0" + "@monaco-editor/loader": "^1.5.0" }, "peerDependencies": { "monaco-editor": ">= 0.25.0 < 1", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "node_modules/@mswjs/interceptors": { @@ -1770,6 +1801,19 @@ "node": ">=18" } }, + "node_modules/@napi-rs/wasm-runtime": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.7.tgz", + "integrity": "sha512-5yximcFK5FNompXfJFoWanu5l8v1hNGqNHh9du1xETp9HWk/B/PzvchX55WYOPaIeNglG8++68AAiauBAtbnzw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.3.1", + "@emnapi/runtime": "^1.3.1", + "@tybys/wasm-util": "^0.9.0" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -1805,16 +1849,6 @@ "node": ">= 8" } }, - "node_modules/@nolyfill/is-core-module": { - "version": "1.0.39", - "resolved": "https://registry.npmjs.org/@nolyfill/is-core-module/-/is-core-module-1.0.39.tgz", - "integrity": "sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.4.0" - } - }, "node_modules/@open-draft/deferred-promise": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@open-draft/deferred-promise/-/deferred-promise-2.2.0.tgz", @@ -3860,15 +3894,15 @@ } }, "node_modules/@swc/core": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.10.4.tgz", - "integrity": "sha512-ut3zfiTLORMxhr6y/GBxkHmzcGuVpwJYX4qyXWuBKkpw/0g0S5iO1/wW7RnLnZbAi8wS/n0atRZoaZlXWBkeJg==", + "version": "1.11.10", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.11.10.tgz", + "integrity": "sha512-Si27CiYwqJSF3K0HgxugQnjHNfH7YqqD89V+fLpyRHr81uTmCQpF0bnVdRMQ2SGAkCFJACYETRiBSrZOQ660+Q==", "dev": true, "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { "@swc/counter": "^0.1.3", - "@swc/types": "^0.1.17" + "@swc/types": "^0.1.19" }, "engines": { "node": ">=10" @@ -3878,16 +3912,16 @@ "url": "https://opencollective.com/swc" }, "optionalDependencies": { - "@swc/core-darwin-arm64": "1.10.4", - "@swc/core-darwin-x64": "1.10.4", - "@swc/core-linux-arm-gnueabihf": "1.10.4", - "@swc/core-linux-arm64-gnu": "1.10.4", - "@swc/core-linux-arm64-musl": "1.10.4", - "@swc/core-linux-x64-gnu": "1.10.4", - "@swc/core-linux-x64-musl": "1.10.4", - "@swc/core-win32-arm64-msvc": "1.10.4", - "@swc/core-win32-ia32-msvc": "1.10.4", - "@swc/core-win32-x64-msvc": "1.10.4" + "@swc/core-darwin-arm64": "1.11.10", + "@swc/core-darwin-x64": "1.11.10", + "@swc/core-linux-arm-gnueabihf": "1.11.10", + "@swc/core-linux-arm64-gnu": "1.11.10", + "@swc/core-linux-arm64-musl": "1.11.10", + "@swc/core-linux-x64-gnu": "1.11.10", + "@swc/core-linux-x64-musl": "1.11.10", + "@swc/core-win32-arm64-msvc": "1.11.10", + "@swc/core-win32-ia32-msvc": "1.11.10", + "@swc/core-win32-x64-msvc": "1.11.10" }, "peerDependencies": { "@swc/helpers": "*" @@ -3899,9 +3933,9 @@ } }, "node_modules/@swc/core-darwin-arm64": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.10.4.tgz", - "integrity": "sha512-sV/eurLhkjn/197y48bxKP19oqcLydSel42Qsy2zepBltqUx+/zZ8+/IS0Bi7kaWVFxerbW1IPB09uq8Zuvm3g==", + "version": "1.11.10", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.11.10.tgz", + "integrity": "sha512-FWwYyhUu+xRXldXHw4CBP6M0rXQs9gnE5/qodsb+cyOJaTHI8kU6FJtwaC0PiOVxjREdg/DoTrXS4sZUiL881A==", "cpu": [ "arm64" ], @@ -3916,9 +3950,9 @@ } }, "node_modules/@swc/core-darwin-x64": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.10.4.tgz", - "integrity": "sha512-gjYNU6vrAUO4+FuovEo9ofnVosTFXkF0VDuo1MKPItz6e2pxc2ale4FGzLw0Nf7JB1sX4a8h06CN16/pLJ8Q2w==", + "version": "1.11.10", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.11.10.tgz", + "integrity": "sha512-NKQ62w81TGR5YAidV3KF7CDY0nu62OWmz6Hl/mB/i8Cd9xPc+MnLwdY1cJOU/DsrU4YnRFSaOfBF4Fx4mKLWxA==", "cpu": [ "x64" ], @@ -3933,9 +3967,9 @@ } }, "node_modules/@swc/core-linux-arm-gnueabihf": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.10.4.tgz", - "integrity": "sha512-zd7fXH5w8s+Sfvn2oO464KDWl+ZX1MJiVmE4Pdk46N3PEaNwE0koTfgx2vQRqRG4vBBobzVvzICC3618WcefOA==", + "version": "1.11.10", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.11.10.tgz", + "integrity": "sha512-1Vu+ZjoR7M8ShIf0Koi+B1OJ6DsU7jd4Py743KCgKlabvLFrv/uahp5fPJ1kyAUTxFE5d37qWqWLl5NkYDmDtQ==", "cpu": [ "arm" ], @@ -3950,9 +3984,9 @@ } }, "node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.10.4.tgz", - "integrity": "sha512-+UGfoHDxsMZgFD3tABKLeEZHqLNOkxStu+qCG7atGBhS4Slri6h6zijVvf4yI5X3kbXdvc44XV/hrP/Klnui2A==", + "version": "1.11.10", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.11.10.tgz", + "integrity": "sha512-mP26821Auyqa+Dce8gFlH4GxxbJ8xJU8H5/iIU8ObK12ulmK75G2VdILoc3gFDKfx3K7IqQkfokW3PAGI9X2Vg==", "cpu": [ "arm64" ], @@ -3967,9 +4001,9 @@ } }, "node_modules/@swc/core-linux-arm64-musl": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.10.4.tgz", - "integrity": "sha512-cDDj2/uYsOH0pgAnDkovLZvKJpFmBMyXkxEG6Q4yw99HbzO6QzZ5HDGWGWVq/6dLgYKlnnmpjZCPPQIu01mXEg==", + "version": "1.11.10", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.11.10.tgz", + "integrity": "sha512-XZ61quwNgTqvbMqpFAa6/ZqoErabocHUHMWQHyShxbqM2nkP1sBe6EgODX6mNSzLn0u+KDVRyQUy9ratt+xbFw==", "cpu": [ "arm64" ], @@ -3984,9 +4018,9 @@ } }, "node_modules/@swc/core-linux-x64-gnu": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.10.4.tgz", - "integrity": "sha512-qJXh9D6Kf5xSdGWPINpLGixAbB5JX8JcbEJpRamhlDBoOcQC79dYfOMEIxWPhTS1DGLyFakAx2FX/b2VmQmj0g==", + "version": "1.11.10", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.11.10.tgz", + "integrity": "sha512-BwohorC2nkak8YQuS6IH/70XkhBjqmPbL7KT0NKmr4sstRe52I3F5Vbo30xBckpvT8ZRPvjmjK3FvJ2Rf3PRmw==", "cpu": [ "x64" ], @@ -4001,9 +4035,9 @@ } }, "node_modules/@swc/core-linux-x64-musl": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.10.4.tgz", - "integrity": "sha512-A76lIAeyQnHCVt0RL/pG+0er8Qk9+acGJqSZOZm67Ve3B0oqMd871kPtaHBM0BW3OZAhoILgfHW3Op9Q3mx3Cw==", + "version": "1.11.10", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.11.10.tgz", + "integrity": "sha512-bCaEJVB1+5KscAolNfL6qd3I1bVovhNDShutrTlNXNvjqNavWrX8z8ZfSJ3oK6CvrBzFR6fjCSqkoD+ckKBYBA==", "cpu": [ "x64" ], @@ -4018,9 +4052,9 @@ } }, "node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.10.4.tgz", - "integrity": "sha512-e6j5kBu4fIY7fFxFxnZI0MlEovRvp50Lg59Fw+DVbtqHk3C85dckcy5xKP+UoXeuEmFceauQDczUcGs19SRGSQ==", + "version": "1.11.10", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.11.10.tgz", + "integrity": "sha512-Gq4svadhEVP7xClzsV8W2/8R/kfEUbJJKIS2fj8hb9lM6/AVs/PVmDiLGye6cYfVpQzkdDsJLm8r4yhSAIFsFQ==", "cpu": [ "arm64" ], @@ -4035,9 +4069,9 @@ } }, "node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.10.4.tgz", - "integrity": "sha512-RSYHfdKgNXV/amY5Tqk1EWVsyQnhlsM//jeqMLw5Fy9rfxP592W9UTumNikNRPdjI8wKKzNMXDb1U29tQjN0dg==", + "version": "1.11.10", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.11.10.tgz", + "integrity": "sha512-RkZYTY0pQiHgcoFJwZoFZiEWw4WB/XVLp+y90l4Ar1nnoQQNmfb4FyvWYZbDQgrMGP0Wj5WhZuMXzW12/qI5Kg==", "cpu": [ "ia32" ], @@ -4052,9 +4086,9 @@ } }, "node_modules/@swc/core-win32-x64-msvc": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.10.4.tgz", - "integrity": "sha512-1ujYpaqfqNPYdwKBlvJnOqcl+Syn3UrQ4XE0Txz6zMYgyh6cdU6a3pxqLqIUSJ12MtXRA9ZUhEz1ekU3LfLWXw==", + "version": "1.11.10", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.11.10.tgz", + "integrity": "sha512-clDl+oAl6YLsqZiGb8NzpEXTdIzCTPCJSRFCeHIldjLlsAs+qsqItry2r2xSAKU1pFv4D7j9WgJmVVxOPgs/Jg==", "cpu": [ "x64" ], @@ -4085,9 +4119,9 @@ } }, "node_modules/@swc/types": { - "version": "0.1.17", - "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.17.tgz", - "integrity": "sha512-V5gRru+aD8YVyCOMAjMpWR1Ui577DD5KSJsHP8RAxopAH22jFz6GZd/qxqjO6MJHQhcsjvjOFXyDhyLQUnMveQ==", + "version": "0.1.19", + "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.19.tgz", + "integrity": "sha512-WkAZaAfj44kh/UFdAQcrMP1I0nwRqpt27u+08LMBYMqmQfwwMofYoMh/48NGkMMRfC4ynpfwRbJuu8ErfNloeA==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -4265,6 +4299,17 @@ "@testing-library/dom": ">=7.21.4" } }, + "node_modules/@tybys/wasm-util": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.9.0.tgz", + "integrity": "sha512-6+7nlbMVX/PVDCwaIQ8nTOPveOcFLSt8GcXdx8hD0bt39uWxYT88uXzqTd4fTvqta7oeUJqudepapKNt2DYJFw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@types/aria-query": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz", @@ -4757,6 +4802,163 @@ "integrity": "sha512-fEzPV3hSkSMltkw152tJKNARhOupqbH96MZWyRjNaYZOMIzbrTeQDG+MTc6Mr2pgzFQzFxAfmhGDNP5QK++2ZA==", "license": "ISC" }, + "node_modules/@unrs/rspack-resolver-binding-darwin-arm64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-darwin-arm64/-/rspack-resolver-binding-darwin-arm64-1.1.2.tgz", + "integrity": "sha512-bQx2L40UF5XxsXwkD26PzuspqUbUswWVbmclmUC+c83Cv/EFrFJ1JaZj5Q5jyYglKGOtyIWY/hXTCdWRN9vT0Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@unrs/rspack-resolver-binding-darwin-x64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-darwin-x64/-/rspack-resolver-binding-darwin-x64-1.1.2.tgz", + "integrity": "sha512-dMi9a7//BsuPTnhWEDxmdKZ6wxQlPnAob8VSjefGbKX/a+pHfTaX1pm/jv2VPdarP96IIjCKPatJS/TtLQeGQA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@unrs/rspack-resolver-binding-freebsd-x64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-freebsd-x64/-/rspack-resolver-binding-freebsd-x64-1.1.2.tgz", + "integrity": "sha512-RiBZQ+LSORQObfhV1yH7jGz+4sN3SDYtV53jgc8tUVvqdqVDaUm1KA3zHLffmoiYNGrYkE3sSreGC+FVpsB4Vg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@unrs/rspack-resolver-binding-linux-arm-gnueabihf": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-linux-arm-gnueabihf/-/rspack-resolver-binding-linux-arm-gnueabihf-1.1.2.tgz", + "integrity": "sha512-IyKIFBtOvuPCJt1WPx9e9ovTGhZzrIbW11vWzw4aPmx3VShE+YcMpAldqQubdCep0UVKZyFt+2hQDQZwFiJ4jg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/rspack-resolver-binding-linux-arm64-gnu": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-linux-arm64-gnu/-/rspack-resolver-binding-linux-arm64-gnu-1.1.2.tgz", + "integrity": "sha512-RfYtlCtJrv5i6TO4dSlpbyOJX9Zbhmkqrr9hjDfr6YyE5KD0ywLRzw8UjXsohxG1XWgRpb2tvPuRYtURJwbqWg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/rspack-resolver-binding-linux-arm64-musl": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-linux-arm64-musl/-/rspack-resolver-binding-linux-arm64-musl-1.1.2.tgz", + "integrity": "sha512-MaITzkoqsn1Rm3+YnplubgAQEfOt+2jHfFvuFhXseUfcfbxe8Zyc3TM7LKwgv7mRVjIl+/yYN5JqL0cjbnhAnQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/rspack-resolver-binding-linux-x64-gnu": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-linux-x64-gnu/-/rspack-resolver-binding-linux-x64-gnu-1.1.2.tgz", + "integrity": "sha512-Nu981XmzQqis/uB3j4Gi3p5BYCd/zReU5zbJmjMrEH7IIRH0dxZpdOmS/+KwEk6ao7Xd8P2D2gDHpHD/QTp0aQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/rspack-resolver-binding-linux-x64-musl": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-linux-x64-musl/-/rspack-resolver-binding-linux-x64-musl-1.1.2.tgz", + "integrity": "sha512-xJupeDvaRpV0ADMuG1dY9jkOjhUzTqtykvchiU2NldSD+nafSUcMWnoqzNUx7HGiqbTMOw9d9xT8ZiFs+6ZFyQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/rspack-resolver-binding-wasm32-wasi": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-wasm32-wasi/-/rspack-resolver-binding-wasm32-wasi-1.1.2.tgz", + "integrity": "sha512-un6X/xInks+KEgGpIHFV8BdoODHRohaDRvOwtjq+FXuoI4Ga0P6sLRvf4rPSZDvoMnqUhZtVNG0jG9oxOnrrLQ==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@napi-rs/wasm-runtime": "^0.2.7" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@unrs/rspack-resolver-binding-win32-arm64-msvc": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-win32-arm64-msvc/-/rspack-resolver-binding-win32-arm64-msvc-1.1.2.tgz", + "integrity": "sha512-2lCFkeT1HYUb/OOStBS1m67aZOf9BQxRA+Wf/xs94CGgzmoQt7H4V/BrkB/GSGKsudXjkiwt2oHNkHiowAS90A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@unrs/rspack-resolver-binding-win32-x64-msvc": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@unrs/rspack-resolver-binding-win32-x64-msvc/-/rspack-resolver-binding-win32-x64-msvc-1.1.2.tgz", + "integrity": "sha512-EYfya5HCQ/8Yfy7rvAAX2rGytu81+d/CIhNCbZfNKLQ690/qFsdEeTXRsMQW1afHoluMM50PsjPYu8ndy8fSQg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@untitled-ui/icons-react": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/@untitled-ui/icons-react/-/icons-react-0.1.4.tgz", @@ -4773,13 +4975,13 @@ } }, "node_modules/@vitejs/plugin-react-swc": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-react-swc/-/plugin-react-swc-3.7.2.tgz", - "integrity": "sha512-y0byko2b2tSVVf5Gpng1eEhX1OvPC7x8yns1Fx8jDzlJp4LS6CMkCPfLw47cjyoMrshQDoQw4qcgjsU9VvlCew==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react-swc/-/plugin-react-swc-3.8.0.tgz", + "integrity": "sha512-T4sHPvS+DIqDP51ifPqa9XIRAz/kIvIi8oXcnOZZgHmMotgmmdxe/DD5tMFlt5nuIRzT0/QuiwmKlH0503Aapw==", "dev": true, "license": "MIT", "dependencies": { - "@swc/core": "^1.7.26" + "@swc/core": "^1.10.15" }, "peerDependencies": { "vite": "^4 || ^5 || ^6" @@ -5933,9 +6135,9 @@ } }, "node_modules/commander": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", - "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-13.1.0.tgz", + "integrity": "sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==", "dev": true, "license": "MIT", "engines": { @@ -5977,6 +6179,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.0.2.tgz", "integrity": "sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==", + "license": "MIT", "engines": { "node": ">=18" } @@ -6711,23 +6914,21 @@ } }, "node_modules/eslint-import-resolver-typescript": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.7.0.tgz", - "integrity": "sha512-Vrwyi8HHxY97K5ebydMtffsWAn1SCR9eol49eCd5fJS4O1WV7PaAjbcjmbfJJSMz/t4Mal212Uz/fQZrOB8mow==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-4.0.0.tgz", + "integrity": "sha512-dnZZVh4I0yYrKDwT+G9+QvatOjArurtwZS3n2i5SKfFYiy+669z2wkR8ZI5gh8yUGJYH86kUhp0FkSlKerl02w==", "dev": true, "license": "ISC", "dependencies": { - "@nolyfill/is-core-module": "1.0.39", - "debug": "^4.3.7", - "enhanced-resolve": "^5.15.0", - "fast-glob": "^3.3.2", - "get-tsconfig": "^4.7.5", - "is-bun-module": "^1.0.2", - "is-glob": "^4.0.3", - "stable-hash": "^0.0.4" + "debug": "^4.4.0", + "get-tsconfig": "^4.10.0", + "is-bun-module": "^1.3.0", + "rspack-resolver": "^1.1.2", + "stable-hash": "^0.0.5", + "tinyglobby": "^0.2.12" }, "engines": { - "node": "^14.18.0 || >=16.0.0" + "node": "^16.17.0 || >=18.6.0" }, "funding": { "url": "https://opencollective.com/unts/projects/eslint-import-resolver-ts" @@ -7102,6 +7303,21 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/fdir": { + "version": "6.4.3", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.3.tgz", + "integrity": "sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, "node_modules/fflate": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz", @@ -8995,22 +9211,22 @@ } }, "node_modules/lint-staged": { - "version": "15.3.0", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.3.0.tgz", - "integrity": "sha512-vHFahytLoF2enJklgtOtCtIjZrKD/LoxlaUusd5nh7dWv/dkKQJY74ndFSzxCdv7g0ueGg1ORgTSt4Y9LPZn9A==", + "version": "15.5.0", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.5.0.tgz", + "integrity": "sha512-WyCzSbfYGhK7cU+UuDDkzUiytbfbi0ZdPy2orwtM75P3WTtQBzmG40cCxIa8Ii2+XjfxzLH6Be46tUfWS85Xfg==", "dev": true, "license": "MIT", "dependencies": { - "chalk": "~5.4.1", - "commander": "~12.1.0", - "debug": "~4.4.0", - "execa": "~8.0.1", - "lilconfig": "~3.1.3", - "listr2": "~8.2.5", - "micromatch": "~4.0.8", - "pidtree": "~0.6.0", - "string-argv": "~0.3.2", - "yaml": "~2.6.1" + "chalk": "^5.4.1", + "commander": "^13.1.0", + "debug": "^4.4.0", + "execa": "^8.0.1", + "lilconfig": "^3.1.3", + "listr2": "^8.2.5", + "micromatch": "^4.0.8", + "pidtree": "^0.6.0", + "string-argv": "^0.3.2", + "yaml": "^2.7.0" }, "bin": { "lint-staged": "bin/lint-staged.js" @@ -11366,9 +11582,9 @@ } }, "node_modules/prismjs": { - "version": "1.29.0", - "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.29.0.tgz", - "integrity": "sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==", + "version": "1.30.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.30.0.tgz", + "integrity": "sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw==", "license": "MIT", "engines": { "node": ">=6" @@ -11604,9 +11820,9 @@ } }, "node_modules/react-router": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.1.1.tgz", - "integrity": "sha512-39sXJkftkKWRZ2oJtHhCxmoCrBCULr/HAH4IT5DHlgu/Q0FCPV0S4Lx+abjDTx/74xoZzNYDYbOZWlJjruyuDQ==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.3.0.tgz", + "integrity": "sha512-466f2W7HIWaNXTKM5nHTqNxLrHTyXybm7R0eBlVSt0k/u55tTCDO194OIx/NrYD4TS5SXKTNekXfT37kMKUjgw==", "license": "MIT", "dependencies": { "@types/cookie": "^0.6.0", @@ -11628,12 +11844,12 @@ } }, "node_modules/react-router-dom": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.1.1.tgz", - "integrity": "sha512-vSrQHWlJ5DCfyrhgo0k6zViOe9ToK8uT5XGSmnuC2R3/g261IdIMpZVqfjD6vWSXdnf5Czs4VA/V60oVR6/jnA==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.3.0.tgz", + "integrity": "sha512-z7Q5FTiHGgQfEurX/FBinkOXhWREJIAB2RiU24lvcBa82PxUpwqvs/PAXb9lJyPjTs2jrl6UkLvCZVGJPeNuuQ==", "license": "MIT", "dependencies": { - "react-router": "7.1.1" + "react-router": "7.3.0" }, "engines": { "node": ">=20.0.0" @@ -11870,15 +12086,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/refractor/node_modules/prismjs": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.27.0.tgz", - "integrity": "sha512-t13BGPUlFDR7wRB5kQDG4jjl7XeuH6jbJGt11JHPL96qwsEHNX2+68tFXqc1/k+/jALsbSWJKUOT/hcYAZ5LkA==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/regenerator-runtime": { "version": "0.14.1", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", @@ -12140,6 +12347,29 @@ "dev": true, "license": "MIT" }, + "node_modules/rspack-resolver": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/rspack-resolver/-/rspack-resolver-1.1.2.tgz", + "integrity": "sha512-eHhz+9JWHFdbl/CVVqEP6kviLFZqw1s0MWxLdsGMtUKUspSO3SERptPohmrUIC9jT1bGV9Bd3+r8AmWbdfNAzQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/JounQin" + }, + "optionalDependencies": { + "@unrs/rspack-resolver-binding-darwin-arm64": "1.1.2", + "@unrs/rspack-resolver-binding-darwin-x64": "1.1.2", + "@unrs/rspack-resolver-binding-freebsd-x64": "1.1.2", + "@unrs/rspack-resolver-binding-linux-arm-gnueabihf": "1.1.2", + "@unrs/rspack-resolver-binding-linux-arm64-gnu": "1.1.2", + "@unrs/rspack-resolver-binding-linux-arm64-musl": "1.1.2", + "@unrs/rspack-resolver-binding-linux-x64-gnu": "1.1.2", + "@unrs/rspack-resolver-binding-linux-x64-musl": "1.1.2", + "@unrs/rspack-resolver-binding-wasm32-wasi": "1.1.2", + "@unrs/rspack-resolver-binding-win32-arm64-msvc": "1.1.2", + "@unrs/rspack-resolver-binding-win32-x64-msvc": "1.1.2" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -12257,7 +12487,8 @@ "node_modules/set-cookie-parser": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz", - "integrity": "sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==" + "integrity": "sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==", + "license": "MIT" }, "node_modules/set-function-length": { "version": "1.2.2", @@ -12529,9 +12760,9 @@ "license": "BSD-3-Clause" }, "node_modules/stable-hash": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/stable-hash/-/stable-hash-0.0.4.tgz", - "integrity": "sha512-LjdcbuBeLcdETCrPn9i8AYAZ1eCtu4ECAWtP7UleOiZ9LzVxRzzUZEoZ8zB24nhkQnDWyET0I+3sWokSDS3E7g==", + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stable-hash/-/stable-hash-0.0.5.tgz", + "integrity": "sha512-+L3ccpzibovGXFK+Ap/f8LOS0ahMrHTf3xu7mMLSpEGU0EO9ucaysSylKo9eRDFNhWve/y275iPmIZ4z39a9iA==", "dev": true, "license": "MIT" }, @@ -13127,32 +13358,20 @@ "license": "MIT" }, "node_modules/tinyglobby": { - "version": "0.2.10", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.10.tgz", - "integrity": "sha512-Zc+8eJlFMvgatPZTl6A9L/yht8QqdmUNtURHaKZLmKBE12hNPSrqNkUp2cs3M/UKmNVVAMFQYSjYIVHDjW5zew==", + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.12.tgz", + "integrity": "sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww==", "dev": true, "license": "MIT", "dependencies": { - "fdir": "^6.4.2", + "fdir": "^6.4.3", "picomatch": "^4.0.2" }, "engines": { "node": ">=12.0.0" - } - }, - "node_modules/tinyglobby/node_modules/fdir": { - "version": "6.4.2", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.2.tgz", - "integrity": "sha512-KnhMXsKSPZlAhp7+IjUkRZKPb4fUyccpDrdFXbi4QL1qkmFh9kVY09Yox+n4MaOb3lHZ1Tv829C3oaaXoMYPDQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "picomatch": "^3 || ^4" }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" } }, "node_modules/tinyglobby/node_modules/picomatch": { @@ -13370,7 +13589,8 @@ "node_modules/turbo-stream": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/turbo-stream/-/turbo-stream-2.4.0.tgz", - "integrity": "sha512-FHncC10WpBd2eOmGwpmQsWLDoK4cqsA/UT/GqNoaKOQnT8uzhtCbg3EoUDMvqpOSAI0S26mr0rkjzbOO6S3v1g==" + "integrity": "sha512-FHncC10WpBd2eOmGwpmQsWLDoK4cqsA/UT/GqNoaKOQnT8uzhtCbg3EoUDMvqpOSAI0S26mr0rkjzbOO6S3v1g==", + "license": "ISC" }, "node_modules/type-check": { "version": "0.4.0", @@ -14501,9 +14721,9 @@ "license": "ISC" }, "node_modules/yaml": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.1.tgz", - "integrity": "sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz", + "integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==", "license": "ISC", "bin": { "yaml": "bin.mjs" diff --git a/package.json b/package.json index 81a38e3f..2d256dba 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "vite-project", "private": true, - "version": "0.19.1", + "version": "0.20.0", "type": "module", "scripts": { "dev": "vite", @@ -25,7 +25,7 @@ "@dnd-kit/sortable": "^10.0.0", "@dnd-kit/utilities": "^3.2.2", "@hey-api/client-fetch": "^0.7.1", - "@monaco-editor/react": "^4.6.0", + "@monaco-editor/react": "^4.7.0", "@stacklok/ui-kit": "^1.0.1-9", "@tanstack/react-query": "^5.64.1", "@tanstack/react-query-devtools": "^5.66.0", @@ -40,7 +40,7 @@ "react": "19.0.0", "react-dom": "19.0.0", "react-markdown": "^9.0.1", - "react-router-dom": "^7.1.1", + "react-router-dom": "^7.3.0", "react-syntax-highlighter": "^15.6.1", "remark": "^15.0.1", "remark-gfm": "^4.0.0", @@ -66,13 +66,13 @@ "@types/react": "^19.0.2", "@types/react-dom": "^19.0.3", "@typescript-eslint/parser": "^8.23.0", - "@vitejs/plugin-react-swc": "^3.5.0", + "@vitejs/plugin-react-swc": "^3.8.0", "@vitest/coverage-istanbul": "^3.0.5", "@vitest/expect": "^3.0.5", "@vitest/ui": "^3.0.5", "autoprefixer": "^10.4.20", "eslint": "^9.21.0", - "eslint-import-resolver-typescript": "^3.7.0", + "eslint-import-resolver-typescript": "^4.0.0", "eslint-plugin-import": "^2.31.0", "eslint-plugin-react-hooks": "^5.1.0", "eslint-plugin-react-refresh": "^0.4.16", @@ -82,7 +82,7 @@ "husky": "^9.1.6", "jsdom": "^26.0.0", "knip": "^5.43.6", - "lint-staged": "^15.3.0", + "lint-staged": "^15.5.0", "msw": "^2.7.0", "postcss": "^8.4.49", "prettier": "3.5.3", @@ -99,6 +99,8 @@ "vitest-fail-on-console": "^0.7.1" }, "overrides": { + "@babel/runtime": "^7.26.10", + "prismjs": "^1.30.0", "vite": "^6.0.1" }, "optionalDependencies": { diff --git a/src/Page.tsx b/src/Page.tsx index e2d4c30d..6854a284 100644 --- a/src/Page.tsx +++ b/src/Page.tsx @@ -29,7 +29,7 @@ export default function Page() { } /> }> - } /> + } /> } /> diff --git a/src/api/generated/@tanstack/react-query.gen.ts b/src/api/generated/@tanstack/react-query.gen.ts index 125f7497..e00cc4b7 100644 --- a/src/api/generated/@tanstack/react-query.gen.ts +++ b/src/api/generated/@tanstack/react-query.gen.ts @@ -24,6 +24,7 @@ import { v1ActivateWorkspace, v1UpdateWorkspace, v1DeleteWorkspace, + v1GetWorkspaceByName, v1ListArchivedWorkspaces, v1RecoverWorkspace, v1HardDeleteWorkspace, @@ -36,7 +37,6 @@ import { v1DeleteWorkspaceCustomInstructions, v1GetWorkspaceMuxes, v1SetWorkspaceMuxes, - v1ListWorkspacesByProvider, v1StreamSse, v1VersionCheck, v1GetWorkspaceTokenUsage, @@ -62,6 +62,7 @@ import type { V1ConfigureAuthMaterialData, V1ConfigureAuthMaterialError, V1ConfigureAuthMaterialResponse, + V1ListWorkspacesData, V1CreateWorkspaceData, V1CreateWorkspaceError, V1CreateWorkspaceResponse, @@ -74,6 +75,7 @@ import type { V1DeleteWorkspaceData, V1DeleteWorkspaceError, V1DeleteWorkspaceResponse, + V1GetWorkspaceByNameData, V1RecoverWorkspaceData, V1RecoverWorkspaceError, V1RecoverWorkspaceResponse, @@ -97,7 +99,6 @@ import type { V1SetWorkspaceMuxesData, V1SetWorkspaceMuxesError, V1SetWorkspaceMuxesResponse, - V1ListWorkspacesByProviderData, V1GetWorkspaceTokenUsageData, V1CreatePersonaData, V1CreatePersonaError, @@ -349,11 +350,13 @@ export const v1ConfigureAuthMaterialMutation = ( return mutationOptions } -export const v1ListWorkspacesQueryKey = (options?: OptionsLegacyParser) => [ - createQueryKey('v1ListWorkspaces', options), -] +export const v1ListWorkspacesQueryKey = ( + options?: OptionsLegacyParser +) => [createQueryKey('v1ListWorkspaces', options)] -export const v1ListWorkspacesOptions = (options?: OptionsLegacyParser) => { +export const v1ListWorkspacesOptions = ( + options?: OptionsLegacyParser +) => { return queryOptions({ queryFn: async ({ queryKey, signal }) => { const { data } = await v1ListWorkspaces({ @@ -511,6 +514,27 @@ export const v1DeleteWorkspaceMutation = ( return mutationOptions } +export const v1GetWorkspaceByNameQueryKey = ( + options: OptionsLegacyParser +) => [createQueryKey('v1GetWorkspaceByName', options)] + +export const v1GetWorkspaceByNameOptions = ( + options: OptionsLegacyParser +) => { + return queryOptions({ + queryFn: async ({ queryKey, signal }) => { + const { data } = await v1GetWorkspaceByName({ + ...options, + ...queryKey[0], + signal, + throwOnError: true, + }) + return data + }, + queryKey: v1GetWorkspaceByNameQueryKey(options), + }) +} + export const v1ListArchivedWorkspacesQueryKey = ( options?: OptionsLegacyParser ) => [createQueryKey('v1ListArchivedWorkspaces', options)] @@ -867,27 +891,6 @@ export const v1SetWorkspaceMuxesMutation = ( return mutationOptions } -export const v1ListWorkspacesByProviderQueryKey = ( - options: OptionsLegacyParser -) => [createQueryKey('v1ListWorkspacesByProvider', options)] - -export const v1ListWorkspacesByProviderOptions = ( - options: OptionsLegacyParser -) => { - return queryOptions({ - queryFn: async ({ queryKey, signal }) => { - const { data } = await v1ListWorkspacesByProvider({ - ...options, - ...queryKey[0], - signal, - throwOnError: true, - }) - return data - }, - queryKey: v1ListWorkspacesByProviderQueryKey(options), - }) -} - export const v1StreamSseQueryKey = (options?: OptionsLegacyParser) => [ createQueryKey('v1StreamSse', options), ] diff --git a/src/api/generated/sdk.gen.ts b/src/api/generated/sdk.gen.ts index 4f4f0553..9780b4f4 100644 --- a/src/api/generated/sdk.gen.ts +++ b/src/api/generated/sdk.gen.ts @@ -31,6 +31,7 @@ import type { V1ConfigureAuthMaterialData, V1ConfigureAuthMaterialError, V1ConfigureAuthMaterialResponse, + V1ListWorkspacesData, V1ListWorkspacesError, V1ListWorkspacesResponse, V1CreateWorkspaceData, @@ -47,6 +48,9 @@ import type { V1DeleteWorkspaceData, V1DeleteWorkspaceError, V1DeleteWorkspaceResponse, + V1GetWorkspaceByNameData, + V1GetWorkspaceByNameError, + V1GetWorkspaceByNameResponse, V1ListArchivedWorkspacesError, V1ListArchivedWorkspacesResponse, V1RecoverWorkspaceData, @@ -82,9 +86,6 @@ import type { V1SetWorkspaceMuxesData, V1SetWorkspaceMuxesError, V1SetWorkspaceMuxesResponse, - V1ListWorkspacesByProviderData, - V1ListWorkspacesByProviderError, - V1ListWorkspacesByProviderResponse, V1StreamSseError, V1StreamSseResponse, V1VersionCheckError, @@ -192,13 +193,13 @@ export const v1ListModelsByProvider = ( ThrowOnError >({ ...options, - url: '/api/v1/provider-endpoints/{provider_id}/models', + url: '/api/v1/provider-endpoints/{provider_name}/models', }) } /** * Get Provider Endpoint - * Get a provider endpoint by ID. + * Get a provider endpoint by name. */ export const v1GetProviderEndpoint = ( options: OptionsLegacyParser @@ -209,13 +210,13 @@ export const v1GetProviderEndpoint = ( ThrowOnError >({ ...options, - url: '/api/v1/provider-endpoints/{provider_id}', + url: '/api/v1/provider-endpoints/{provider_name}', }) } /** * Update Provider Endpoint - * Update a provider endpoint by ID. + * Update a provider endpoint by name. */ export const v1UpdateProviderEndpoint = ( options: OptionsLegacyParser @@ -226,13 +227,13 @@ export const v1UpdateProviderEndpoint = ( ThrowOnError >({ ...options, - url: '/api/v1/provider-endpoints/{provider_id}', + url: '/api/v1/provider-endpoints/{provider_name}', }) } /** * Delete Provider Endpoint - * Delete a provider endpoint by id. + * Delete a provider endpoint by name. */ export const v1DeleteProviderEndpoint = ( options: OptionsLegacyParser @@ -243,7 +244,7 @@ export const v1DeleteProviderEndpoint = ( ThrowOnError >({ ...options, - url: '/api/v1/provider-endpoints/{provider_id}', + url: '/api/v1/provider-endpoints/{provider_name}', }) } @@ -260,16 +261,24 @@ export const v1ConfigureAuthMaterial = ( ThrowOnError >({ ...options, - url: '/api/v1/provider-endpoints/{provider_id}/auth-material', + url: '/api/v1/provider-endpoints/{provider_name}/auth-material', }) } /** * List Workspaces * List all workspaces. + * + * Args: + * provider_name (Optional[str]): Filter workspaces by provider name. If provided, + * will return workspaces where models from the specified provider (e.g., OpenAI, + * Anthropic) have been used in workspace muxing rules. + * + * Returns: + * ListWorkspacesResponse: A response object containing the list of workspaces. */ export const v1ListWorkspaces = ( - options?: OptionsLegacyParser + options?: OptionsLegacyParser ) => { return (options?.client ?? client).get< V1ListWorkspacesResponse, @@ -369,6 +378,23 @@ export const v1DeleteWorkspace = ( }) } +/** + * Get Workspace By Name + * List workspaces by provider ID. + */ +export const v1GetWorkspaceByName = ( + options: OptionsLegacyParser +) => { + return (options?.client ?? client).get< + V1GetWorkspaceByNameResponse, + V1GetWorkspaceByNameError, + ThrowOnError + >({ + ...options, + url: '/api/v1/workspaces/{workspace_name}', + }) +} + /** * List Archived Workspaces * List all archived workspaces. @@ -591,25 +617,6 @@ export const v1SetWorkspaceMuxes = ( }) } -/** - * List Workspaces By Provider - * List workspaces by provider ID. - */ -export const v1ListWorkspacesByProvider = < - ThrowOnError extends boolean = false, ->( - options: OptionsLegacyParser -) => { - return (options?.client ?? client).get< - V1ListWorkspacesByProviderResponse, - V1ListWorkspacesByProviderError, - ThrowOnError - >({ - ...options, - url: '/api/v1/workspaces/{provider_id}', - }) -} - /** * Stream Sse * Send alerts event diff --git a/src/api/generated/types.gen.ts b/src/api/generated/types.gen.ts index 8f09345f..8dbeeb3c 100644 --- a/src/api/generated/types.gen.ts +++ b/src/api/generated/types.gen.ts @@ -171,7 +171,7 @@ export type ListWorkspacesResponse = { */ export type ModelByProvider = { name: string - provider_id: string + provider_type: ProviderType provider_name: string } @@ -200,8 +200,8 @@ export enum MuxMatcherType { * Represents a mux rule for a provider. */ export type MuxRule = { - provider_name?: string | null - provider_id: string + provider_name: string + provider_type: ProviderType model: string matcher_type: MuxMatcherType matcher?: string | null @@ -340,15 +340,6 @@ export type WorkspaceConfig_Output = { muxing_rules: Array } -/** - * Returns a workspace ID with model name - */ -export type WorkspaceWithModel = { - id: string - name: string - provider_model_name: string -} - export type HealthCheckHealthGetResponse = unknown export type HealthCheckHealthGetError = unknown @@ -377,7 +368,7 @@ export type V1ListAllModelsForAllProvidersError = unknown export type V1ListModelsByProviderData = { path: { - provider_id: string + provider_name: string } } @@ -387,7 +378,7 @@ export type V1ListModelsByProviderError = HTTPValidationError export type V1GetProviderEndpointData = { path: { - provider_id: string + provider_name: string } } @@ -398,7 +389,7 @@ export type V1GetProviderEndpointError = HTTPValidationError export type V1UpdateProviderEndpointData = { body: ProviderEndpoint path: { - provider_id: string + provider_name: string } } @@ -408,7 +399,7 @@ export type V1UpdateProviderEndpointError = HTTPValidationError export type V1DeleteProviderEndpointData = { path: { - provider_id: string + provider_name: string } } @@ -419,7 +410,7 @@ export type V1DeleteProviderEndpointError = HTTPValidationError export type V1ConfigureAuthMaterialData = { body: ConfigureAuthMaterial path: { - provider_id: string + provider_name: string } } @@ -427,9 +418,15 @@ export type V1ConfigureAuthMaterialResponse = void export type V1ConfigureAuthMaterialError = HTTPValidationError +export type V1ListWorkspacesData = { + query?: { + provider_name?: string | null + } +} + export type V1ListWorkspacesResponse = ListWorkspacesResponse -export type V1ListWorkspacesError = unknown +export type V1ListWorkspacesError = HTTPValidationError export type V1CreateWorkspaceData = { body: FullWorkspace_Input @@ -475,6 +472,16 @@ export type V1DeleteWorkspaceResponse = unknown export type V1DeleteWorkspaceError = HTTPValidationError +export type V1GetWorkspaceByNameData = { + path: { + workspace_name: string + } +} + +export type V1GetWorkspaceByNameResponse = FullWorkspace_Output + +export type V1GetWorkspaceByNameError = HTTPValidationError + export type V1ListArchivedWorkspacesResponse = ListWorkspacesResponse export type V1ListArchivedWorkspacesError = unknown @@ -598,16 +605,6 @@ export type V1SetWorkspaceMuxesResponse = void export type V1SetWorkspaceMuxesError = HTTPValidationError -export type V1ListWorkspacesByProviderData = { - path: { - provider_id: string - } -} - -export type V1ListWorkspacesByProviderResponse = Array - -export type V1ListWorkspacesByProviderError = HTTPValidationError - export type V1StreamSseResponse = unknown export type V1StreamSseError = unknown diff --git a/src/api/openapi.json b/src/api/openapi.json index 9cd9c62a..ae50d9a7 100644 --- a/src/api/openapi.json +++ b/src/api/openapi.json @@ -137,7 +137,7 @@ } } }, - "/api/v1/provider-endpoints/{provider_id}/models": { + "/api/v1/provider-endpoints/{provider_name}/models": { "get": { "tags": ["CodeGate API", "Providers"], "summary": "List Models By Provider", @@ -145,13 +145,12 @@ "operationId": "v1_list_models_by_provider", "parameters": [ { - "name": "provider_id", + "name": "provider_name", "in": "path", "required": true, "schema": { "type": "string", - "format": "uuid", - "title": "Provider Id" + "title": "Provider Name" } } ], @@ -183,21 +182,20 @@ } } }, - "/api/v1/provider-endpoints/{provider_id}": { + "/api/v1/provider-endpoints/{provider_name}": { "get": { "tags": ["CodeGate API", "Providers"], "summary": "Get Provider Endpoint", - "description": "Get a provider endpoint by ID.", + "description": "Get a provider endpoint by name.", "operationId": "v1_get_provider_endpoint", "parameters": [ { - "name": "provider_id", + "name": "provider_name", "in": "path", "required": true, "schema": { "type": "string", - "format": "uuid", - "title": "Provider Id" + "title": "Provider Name" } } ], @@ -227,17 +225,16 @@ "put": { "tags": ["CodeGate API", "Providers"], "summary": "Update Provider Endpoint", - "description": "Update a provider endpoint by ID.", + "description": "Update a provider endpoint by name.", "operationId": "v1_update_provider_endpoint", "parameters": [ { - "name": "provider_id", + "name": "provider_name", "in": "path", "required": true, "schema": { "type": "string", - "format": "uuid", - "title": "Provider Id" + "title": "Provider Name" } } ], @@ -277,17 +274,16 @@ "delete": { "tags": ["CodeGate API", "Providers"], "summary": "Delete Provider Endpoint", - "description": "Delete a provider endpoint by id.", + "description": "Delete a provider endpoint by name.", "operationId": "v1_delete_provider_endpoint", "parameters": [ { - "name": "provider_id", + "name": "provider_name", "in": "path", "required": true, "schema": { "type": "string", - "format": "uuid", - "title": "Provider Id" + "title": "Provider Name" } } ], @@ -313,7 +309,7 @@ } } }, - "/api/v1/provider-endpoints/{provider_id}/auth-material": { + "/api/v1/provider-endpoints/{provider_name}/auth-material": { "put": { "tags": ["CodeGate API", "Providers"], "summary": "Configure Auth Material", @@ -321,13 +317,12 @@ "operationId": "v1_configure_auth_material", "parameters": [ { - "name": "provider_id", + "name": "provider_name", "in": "path", "required": true, "schema": { "type": "string", - "format": "uuid", - "title": "Provider Id" + "title": "Provider Name" } } ], @@ -362,8 +357,26 @@ "get": { "tags": ["CodeGate API", "Workspaces"], "summary": "List Workspaces", - "description": "List all workspaces.", + "description": "List all workspaces.\n\nArgs:\n provider_name (Optional[str]): Filter workspaces by provider name. If provided,\n will return workspaces where models from the specified provider (e.g., OpenAI,\n Anthropic) have been used in workspace muxing rules.\n\nReturns:\n ListWorkspacesResponse: A response object containing the list of workspaces.", "operationId": "v1_list_workspaces", + "parameters": [ + { + "name": "provider_name", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Provider Name" + } + } + ], "responses": { "200": { "description": "Successful Response", @@ -374,6 +387,16 @@ } } } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } } } }, @@ -383,14 +406,14 @@ "description": "Create a new workspace.", "operationId": "v1_create_workspace", "requestBody": { + "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FullWorkspace-Input" } } - }, - "required": true + } }, "responses": { "201": { @@ -511,7 +534,7 @@ } }, "responses": { - "201": { + "200": { "description": "Successful Response", "content": { "application/json": { @@ -569,6 +592,45 @@ } } } + }, + "get": { + "tags": ["CodeGate API", "Workspaces"], + "summary": "Get Workspace By Name", + "description": "List workspaces by provider ID.", + "operationId": "v1_get_workspace_by_name", + "parameters": [ + { + "name": "workspace_name", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Name" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FullWorkspace-Output" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } } }, "/api/v1/workspaces/archive": { @@ -1113,52 +1175,6 @@ } } }, - "/api/v1/workspaces/{provider_id}": { - "get": { - "tags": ["CodeGate API", "Workspaces"], - "summary": "List Workspaces By Provider", - "description": "List workspaces by provider ID.", - "operationId": "v1_list_workspaces_by_provider", - "parameters": [ - { - "name": "provider_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Provider Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WorkspaceWithModel" - }, - "title": "Response V1 List Workspaces By Provider" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, "/api/v1/alerts_notification": { "get": { "tags": ["CodeGate API", "Dashboard"], @@ -1989,9 +2005,8 @@ "type": "string", "title": "Name" }, - "provider_id": { - "type": "string", - "title": "Provider Id" + "provider_type": { + "$ref": "#/components/schemas/ProviderType" }, "provider_name": { "type": "string", @@ -1999,7 +2014,7 @@ } }, "type": "object", - "required": ["name", "provider_id", "provider_name"], + "required": ["name", "provider_type", "provider_name"], "title": "ModelByProvider", "description": "Represents a model supported by a provider.\n\nNote that these are auto-discovered by the provider." }, @@ -2017,19 +2032,11 @@ "MuxRule": { "properties": { "provider_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], + "type": "string", "title": "Provider Name" }, - "provider_id": { - "type": "string", - "title": "Provider Id" + "provider_type": { + "$ref": "#/components/schemas/ProviderType" }, "model": { "type": "string", @@ -2051,7 +2058,7 @@ } }, "type": "object", - "required": ["provider_id", "model", "matcher_type"], + "required": ["provider_name", "provider_type", "model", "matcher_type"], "title": "MuxRule", "description": "Represents a mux rule for a provider." }, @@ -2362,27 +2369,6 @@ "type": "object", "required": ["custom_instructions", "muxing_rules"], "title": "WorkspaceConfig" - }, - "WorkspaceWithModel": { - "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "name": { - "type": "string", - "pattern": "^[a-zA-Z0-9_-]+$", - "title": "Name" - }, - "provider_model_name": { - "type": "string", - "title": "Provider Model Name" - } - }, - "type": "object", - "required": ["id", "name", "provider_model_name"], - "title": "WorkspaceWithModel", - "description": "Returns a workspace ID with model name" } } } diff --git a/src/context/confirm-context.tsx b/src/context/confirm-context.tsx index 8509ce62..34c30e25 100644 --- a/src/context/confirm-context.tsx +++ b/src/context/confirm-context.tsx @@ -57,8 +57,12 @@ export function ConfirmProvider({ children }: { children: ReactNode }) { {children} - - + + {activeQuestion?.config.title} @@ -70,6 +74,7 @@ export function ConfirmProvider({ children }: { children: ReactNode }) { {activeQuestion?.config.buttons.no ?? ' '} + ) +} diff --git a/src/features/workspace/components/workspace-models-dropdown.tsx b/src/features/workspace/components/workspace-models-dropdown.tsx index 23c8c71e..b9c74db3 100644 --- a/src/features/workspace/components/workspace-models-dropdown.tsx +++ b/src/features/workspace/components/workspace-models-dropdown.tsx @@ -1,6 +1,5 @@ import { ModelByProvider, - MuxRule, V1ListAllModelsForAllProvidersResponse, } from '@/api/generated' import { @@ -16,17 +15,21 @@ import { import { ChevronDown, SearchMd } from '@untitled-ui/icons-react' import { map, groupBy } from 'lodash' import { useState } from 'react' +import { deserializeMuxModel, serializeMuxModel } from '../lib/mux-model-serde' +import { PreferredMuxRule } from '../hooks/use-muxing-rules-form-workspace' type Props = { - rule: MuxRule & { id: string } + rule: PreferredMuxRule isArchived: boolean models: V1ListAllModelsForAllProvidersResponse onChange: ({ model, - provider_id, + provider_name, + provider_type, }: { model: string - provider_id: string + provider_name: string + provider_type: string }) => void } @@ -37,7 +40,7 @@ function groupModelsByProviderName( id: providerName, textValue: providerName, items: items.map((item) => ({ - id: `${item.provider_id}@${item.name}`, + id: serializeMuxModel(item), textValue: item.name, })), })) @@ -77,12 +80,20 @@ export function WorkspaceModelsDropdown({ const [isOpen, setIsOpen] = useState(false) const [searchItem, setSearchItem] = useState('') const groupedModels = groupModelsByProviderName(models) - const currentProvider = models.find((p) => p.provider_id === rule.provider_id) + const currentProvider = models.find( + (p) => p.provider_name === rule.provider_name + ) const currentModel = currentProvider && rule.model ? `${currentProvider?.provider_name}/${rule.model}` : '' - const selectedKey = `${rule.provider_id}/${rule.model}` + const selectedKey = rule.provider_type + ? serializeMuxModel({ + name: rule.model, + provider_name: rule.provider_name, + provider_type: rule.provider_type, + }) + : undefined return (
@@ -110,19 +121,14 @@ export function WorkspaceModelsDropdown({ selectionBehavior="replace" selectedKeys={selectedKey ? [selectedKey] : []} onSelectionChange={(v) => { - if (v === 'all') { - return - } - const selectedValue = v.values().next().value - if (!selectedValue && typeof selectedValue !== 'string') return - if (typeof selectedValue === 'string') { - const atIndex = selectedValue.indexOf('@') - const provider_id = selectedValue.slice(0, atIndex) - const modelName = selectedValue.slice(atIndex + 1) - if (atIndex === -1 && (!provider_id || !modelName)) return + if (v === 'all') return + const id = v.values().next().value?.toString() + if (typeof id === 'string') { + const model = deserializeMuxModel(id) onChange({ - model: modelName, - provider_id, + model: model.name, + provider_name: model.provider_name, + provider_type: model.provider_type, }) setIsOpen(false) } diff --git a/src/features/workspace/components/workspace-muxing-model.tsx b/src/features/workspace/components/workspace-muxing-model.tsx index feb800cf..d6dcfcf5 100644 --- a/src/features/workspace/components/workspace-muxing-model.tsx +++ b/src/features/workspace/components/workspace-muxing-model.tsx @@ -19,7 +19,10 @@ import { } from '@stacklok/ui-kit' import { twMerge } from 'tailwind-merge' import { useMutationPreferredModelWorkspace } from '../hooks/use-mutation-preferred-model-workspace' -import { V1ListAllModelsForAllProvidersResponse } from '@/api/generated' +import { + ProviderType, + V1ListAllModelsForAllProvidersResponse, +} from '@/api/generated' import { FormEvent } from 'react' import { LayersThree01, @@ -37,6 +40,7 @@ import { } from '../hooks/use-muxing-rules-form-workspace' import { FormButtons } from '@/components/FormButtons' import { getRuleData, isRequestType } from '../lib/utils' +import { z } from 'zod' function MissingProviderBanner() { return ( @@ -120,9 +124,15 @@ function SortableItem({ rule={rule} isArchived={isArchived} models={models} - onChange={({ model, provider_id }) => - setRuleItem({ ...rule, provider_id, model }) - } + onChange={({ model, provider_name, provider_type }) => { + if (provider_type === undefined) return + setRuleItem({ + ...rule, + provider_name, + provider_type: z.nativeEnum(ProviderType).parse(provider_type), + model, + }) + }} /> {showRemoveButton && !isDefaultRule ? ( + ) +} diff --git a/src/features/workspace/hooks/use-invalidate-workspace-queries.ts b/src/features/workspace/hooks/use-invalidate-workspace-queries.ts index 58957dc6..dd131f42 100644 --- a/src/features/workspace/hooks/use-invalidate-workspace-queries.ts +++ b/src/features/workspace/hooks/use-invalidate-workspace-queries.ts @@ -1,7 +1,7 @@ import { + v1GetWorkspaceByNameQueryKey, v1GetWorkspaceMuxesQueryKey, v1ListArchivedWorkspacesQueryKey, - v1ListWorkspacesByProviderQueryKey, v1ListWorkspacesQueryKey, } from '@/api/generated/@tanstack/react-query.gen' import { invalidateQueries } from '@/lib/react-query-utils' @@ -16,7 +16,7 @@ export function useInvalidateWorkspaceQueries() { v1ListWorkspacesQueryKey, v1ListArchivedWorkspacesQueryKey, v1GetWorkspaceMuxesQueryKey, - v1ListWorkspacesByProviderQueryKey, + v1GetWorkspaceByNameQueryKey, ]) }, [queryClient]) diff --git a/src/features/workspace/hooks/use-mutation-set-workspace-custom-instructions.tsx b/src/features/workspace/hooks/use-mutation-set-workspace-custom-instructions.tsx index af5f86e9..7c9bce0d 100644 --- a/src/features/workspace/hooks/use-mutation-set-workspace-custom-instructions.tsx +++ b/src/features/workspace/hooks/use-mutation-set-workspace-custom-instructions.tsx @@ -1,5 +1,7 @@ import { + v1GetWorkspaceByNameQueryKey, v1GetWorkspaceCustomInstructionsQueryKey, + v1GetWorkspaceMuxesQueryKey, v1SetWorkspaceCustomInstructionsMutation, } from '@/api/generated/@tanstack/react-query.gen' import { V1GetWorkspaceCustomInstructionsData } from '@/api/generated' @@ -16,7 +18,9 @@ export function useMutationSetWorkspaceCustomInstructions( ...v1SetWorkspaceCustomInstructionsMutation(options), onSuccess: () => invalidateQueries(queryClient, [ + v1GetWorkspaceMuxesQueryKey, v1GetWorkspaceCustomInstructionsQueryKey, + v1GetWorkspaceByNameQueryKey, ]), successMsg: 'Successfully updated custom instructions', }) diff --git a/src/features/workspace/hooks/use-mutation-update-workspace.ts b/src/features/workspace/hooks/use-mutation-update-workspace.ts index 5ae08b88..d168f7c2 100644 --- a/src/features/workspace/hooks/use-mutation-update-workspace.ts +++ b/src/features/workspace/hooks/use-mutation-update-workspace.ts @@ -1,4 +1,5 @@ import { + v1GetWorkspaceByNameQueryKey, v1GetWorkspaceCustomInstructionsQueryKey, v1GetWorkspaceMuxesQueryKey, v1UpdateWorkspaceMutation, @@ -20,6 +21,7 @@ export function useMutationUpdateWorkspace() { queryKeyFns: [ v1GetWorkspaceMuxesQueryKey, v1GetWorkspaceCustomInstructionsQueryKey, + v1GetWorkspaceByNameQueryKey, ], }) await invalidate() diff --git a/src/features/workspace/hooks/use-muxing-rules-form-workspace.ts b/src/features/workspace/hooks/use-muxing-rules-form-workspace.ts index 2949c31a..5ee0e0c8 100644 --- a/src/features/workspace/hooks/use-muxing-rules-form-workspace.ts +++ b/src/features/workspace/hooks/use-muxing-rules-form-workspace.ts @@ -1,10 +1,12 @@ -import { MuxMatcherType, MuxRule } from '@/api/generated' +import { MuxMatcherType, MuxRule, ProviderType } from '@/api/generated' import { useFormState } from '@/hooks/useFormState' import { isEqual } from 'lodash' import { useCallback, useEffect, useRef } from 'react' import { v4 as uuidv4 } from 'uuid' -export type PreferredMuxRule = MuxRule & { id: string } +export type PreferredMuxRule = Omit & { + provider_type: ProviderType | undefined +} & { id: string } type MuxingRulesFormState = { rules: PreferredMuxRule[] @@ -12,7 +14,8 @@ type MuxingRulesFormState = { const DEFAULT_STATE: PreferredMuxRule = { id: uuidv4(), - provider_id: '', + provider_name: '', + provider_type: undefined, model: '', matcher: '', matcher_type: MuxMatcherType.CATCH_ALL, diff --git a/src/features/workspace/hooks/use-query-get-workspace-by-name.ts b/src/features/workspace/hooks/use-query-get-workspace-by-name.ts new file mode 100644 index 00000000..7aeb0a24 --- /dev/null +++ b/src/features/workspace/hooks/use-query-get-workspace-by-name.ts @@ -0,0 +1,12 @@ +import { v1GetWorkspaceByNameOptions } from '@/api/generated/@tanstack/react-query.gen' +import { useQuery } from '@tanstack/react-query' + +export function useQueryGetWorkspaceByName(options: { + path: { + workspace_name: string + } +}) { + return useQuery({ + ...v1GetWorkspaceByNameOptions(options), + }) +} diff --git a/src/features/workspace/hooks/use-query-muxing-rules-workspace.ts b/src/features/workspace/hooks/use-query-muxing-rules-workspace.ts index b42d0fba..c7c8551c 100644 --- a/src/features/workspace/hooks/use-query-muxing-rules-workspace.ts +++ b/src/features/workspace/hooks/use-query-muxing-rules-workspace.ts @@ -1,20 +1,24 @@ -import { V1GetWorkspaceMuxesData } from "@/api/generated"; -import { v1GetWorkspaceMuxesOptions } from "@/api/generated/@tanstack/react-query.gen"; -import { useQuery } from "@tanstack/react-query"; -import { useMemo } from "react"; +import { V1GetWorkspaceMuxesData } from '@/api/generated' +import { v1GetWorkspaceMuxesOptions } from '@/api/generated/@tanstack/react-query.gen' +import { getQueryCacheConfig } from '@/lib/react-query-utils' +import { useQuery } from '@tanstack/react-query' +import { useMemo } from 'react' export const useQueryMuxingRulesWorkspace = (workspace_name: string) => { const options: V1GetWorkspaceMuxesData & - Omit = useMemo( + Omit = useMemo( () => ({ path: { workspace_name }, }), - [workspace_name], - ); + [workspace_name] + ) const { data = [], ...rest } = useQuery({ ...v1GetWorkspaceMuxesOptions(options), - }); + ...getQueryCacheConfig('no-cache'), + // eslint-disable-next-line no-restricted-syntax + refetchOnMount: true, + }) - return { data: data, ...rest }; -}; + return { data: data, ...rest } +} diff --git a/src/features/workspace/lib/__tests__/mux-model-serde.test.ts b/src/features/workspace/lib/__tests__/mux-model-serde.test.ts new file mode 100644 index 00000000..49fdbe90 --- /dev/null +++ b/src/features/workspace/lib/__tests__/mux-model-serde.test.ts @@ -0,0 +1,35 @@ +import { describe, it, expect } from 'vitest' +import { serializeMuxModel, deserializeMuxModel } from '../mux-model-serde' +import { ModelByProvider } from '@/api/generated' + +describe('mux-model serialization/deserialization', () => { + it.each([ + { + name: 'deepseek-r1:1.5b', + provider_type: 'ollama', + provider_name: 'ollama', + }, + { + name: 'mistral-nemo:latest', + provider_type: 'ollama', + provider_name: 'ollama_muxing', + }, + { + name: '01-ai/yi-large', + provider_type: 'openrouter', + provider_name: 'openrouter_muxing', + }, + { + name: 'anthropic/claude-3-opus:beta', + provider_type: 'openrouter', + provider_name: 'openrouter_muxing', + }, + ] as ModelByProvider[])( + 'should correctly serialize and deserialize model: $name', + (model) => { + const serialized = serializeMuxModel(model) + const deserialized = deserializeMuxModel(serialized) + expect(deserialized).toEqual(model) + } + ) +}) diff --git a/src/features/workspace/lib/mux-model-serde.ts b/src/features/workspace/lib/mux-model-serde.ts new file mode 100644 index 00000000..fc0b7f63 --- /dev/null +++ b/src/features/workspace/lib/mux-model-serde.ts @@ -0,0 +1,17 @@ +import { ModelByProvider, ProviderType } from '@/api/generated' +import { z } from 'zod' + +export function serializeMuxModel(model: ModelByProvider): string { + return `${model.provider_name}___${model.provider_type}___${model.name}` +} + +export function deserializeMuxModel(str: string): ModelByProvider { + const [provider_name, provider_type, name] = str.split('___') + if (!provider_name || !provider_type || !name) + throw new Error('Invalid model') + return { + provider_name, + provider_type: z.nativeEnum(ProviderType).parse(provider_type), + name, + } +} diff --git a/src/hooks/use-query-list-all-models-for-all-providers.ts b/src/hooks/use-query-list-all-models-for-all-providers.ts index dd3d5995..b6f70a5f 100644 --- a/src/hooks/use-query-list-all-models-for-all-providers.ts +++ b/src/hooks/use-query-list-all-models-for-all-providers.ts @@ -1,8 +1,12 @@ import { useQuery } from '@tanstack/react-query' import { v1ListAllModelsForAllProvidersOptions } from '@/api/generated/@tanstack/react-query.gen' +import { getQueryCacheConfig } from '@/lib/react-query-utils' export const useQueryListAllModelsForAllProviders = () => { return useQuery({ ...v1ListAllModelsForAllProvidersOptions(), + ...getQueryCacheConfig('no-cache'), + // eslint-disable-next-line no-restricted-syntax + refetchOnMount: true, }) } diff --git a/src/mocks/msw/fixtures/GET_PROVIDERS_MODELS.json b/src/mocks/msw/fixtures/GET_PROVIDERS_MODELS.json index 7be5f209..2a273c8a 100644 --- a/src/mocks/msw/fixtures/GET_PROVIDERS_MODELS.json +++ b/src/mocks/msw/fixtures/GET_PROVIDERS_MODELS.json @@ -1,27 +1,27 @@ [ { "name": "claude-3.5", - "provider_id": "id_1", + "provider_type": "openrouter", "provider_name": "anthropic" }, { "name": "claude-3.6", - "provider_id": "id_2", + "provider_type": "openrouter", "provider_name": "anthropic" }, { "name": "claude-3.7", - "provider_id": "id_3", + "provider_type": "openrouter", "provider_name": "anthropic" }, { "name": "chatgpt-4o", - "provider_id": "id_4", + "provider_type": "openrouter", "provider_name": "openai" }, { "name": "chatgpt-4p", - "provider_id": "id_5", + "provider_type": "openrouter", "provider_name": "openai" } ] diff --git a/src/mocks/msw/handlers.ts b/src/mocks/msw/handlers.ts index 408ba2b1..cde7ca82 100644 --- a/src/mocks/msw/handlers.ts +++ b/src/mocks/msw/handlers.ts @@ -81,6 +81,15 @@ export const handlers = [ { status: 201 } ) ), + http.get(mswEndpoint('/api/v1/workspaces/:workspace_name'), () => + HttpResponse.json({ + name: 'foo', + config: { + custom_instructions: '', + muxing_rules: [], + }, + }) + ), http.post( mswEndpoint('/api/v1/workspaces/archive/:workspace_name/recover'), () => new HttpResponse(null, { status: 204 }) @@ -135,13 +144,14 @@ export const handlers = [ mswEndpoint('/api/v1/workspaces/:workspace_name/muxes'), () => new HttpResponse(null, { status: 204 }) ), - http.get(mswEndpoint('/api/v1/provider-endpoints/:provider_id/models'), () => - HttpResponse.json(mockedProvidersModels) + http.get( + mswEndpoint('/api/v1/provider-endpoints/:provider_name/models'), + () => HttpResponse.json(mockedProvidersModels) ), http.get(mswEndpoint('/api/v1/provider-endpoints/models'), () => HttpResponse.json(mockedProvidersModels) ), - http.get(mswEndpoint('/api/v1/provider-endpoints/:provider_id'), () => + http.get(mswEndpoint('/api/v1/provider-endpoints/:provider_name'), () => HttpResponse.json(mockedProviders[0]) ), http.get(mswEndpoint('/api/v1/provider-endpoints'), () => diff --git a/src/routes/route-provider-update.tsx b/src/routes/route-provider-update.tsx index c286e0f5..2f756c4f 100644 --- a/src/routes/route-provider-update.tsx +++ b/src/routes/route-provider-update.tsx @@ -7,16 +7,16 @@ import { DialogContent, Form } from '@stacklok/ui-kit' import { useParams } from 'react-router-dom' export function RouteProviderUpdate() { - const { id } = useParams() - if (id === undefined) { - throw new Error('Provider id is required') + const { name } = useParams() + if (name === undefined) { + throw new Error('Provider name is required') } - const { setProvider, provider } = useProvider(id) + const { setProvider, provider } = useProvider(name) const { mutateAsync } = useMutationUpdateProvider() const handleSubmit = (event: React.FormEvent) => { event.preventDefault() - mutateAsync(provider) + mutateAsync({ ...provider, oldName: name }) } // TODO add empty state and loading in a next step diff --git a/src/routes/route-workspace.tsx b/src/routes/route-workspace.tsx index d5df90ed..6453768f 100644 --- a/src/routes/route-workspace.tsx +++ b/src/routes/route-workspace.tsx @@ -10,6 +10,7 @@ import { WorkspaceCustomInstructions } from '@/features/workspace/components/wor import { WorkspaceMuxingModel } from '@/features/workspace/components/workspace-muxing-model' import { PageContainer } from '@/components/page-container' import { WorkspaceActivateButton } from '@/features/workspace/components/workspace-activate-button' +import { WorkspaceDownloadButton } from '@/features/workspace/components/workspace-download-button' function WorkspaceArchivedBanner({ name }: { name: string }) { const restoreButtonProps = useRestoreWorkspaceButton({ workspaceName: name }) @@ -46,7 +47,13 @@ export function RouteWorkspace() { - +
+ + +
{isArchived ? : null} diff --git a/src/routes/route-workspaces.tsx b/src/routes/route-workspaces.tsx index b4f21b7d..a5001364 100644 --- a/src/routes/route-workspaces.tsx +++ b/src/routes/route-workspaces.tsx @@ -14,6 +14,7 @@ import { useNavigate } from 'react-router-dom' import { hrefs } from '@/lib/hrefs' import { PlusSquare } from '@untitled-ui/icons-react' import { PageContainer } from '@/components/page-container' +import { WorkspaceUploadButton } from '@/features/workspace/components/workspace-upload-button' export function RouteWorkspaces() { const navigate = useNavigate() @@ -28,15 +29,20 @@ export function RouteWorkspaces() { - - - Create - - - Create a new workspace - C - - +
+ + + + Create + + + + Create a new workspace + + C + + +
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy