Skip to content

Commit

Permalink
Fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewbaldwin44 committed Oct 9, 2024
1 parent 9e71148 commit 7529d7c
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 83 deletions.
1 change: 0 additions & 1 deletion locust/webui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
"jsdom": "^25.0.1",
"msw": "^2.4.9",
"prettier": "^3.0.3",
"rollup": "^4.22.4",
"typescript": "^5.2.2",
"vitest": "^0.34.6",
"vitest-webgl-canvas-mock": "^1.1.0"
Expand Down
8 changes: 1 addition & 7 deletions locust/webui/src/redux/api/swarm.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react';

import { ISwarmFormInput } from 'types/swarm.types';
import { IStartSwarmResponse, ISwarmFormInput } from 'types/swarm.types';
import {
IStatsResponse,
ISwarmExceptionsResponse,
Expand All @@ -10,12 +10,6 @@ import {
import { createFormData } from 'utils/object';
import { camelCaseKeys, snakeCaseKeys } from 'utils/string';

interface IStartSwarmResponse {
success: boolean;
message: string;
host: string;
}

export const api = createApi({
baseQuery: fetchBaseQuery(),
endpoints: builder => ({
Expand Down
6 changes: 6 additions & 0 deletions locust/webui/src/types/swarm.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,9 @@ export interface ISwarmFormInput
userClasses?: string[];
shapeClass?: string;
}

export interface IStartSwarmResponse {
success: boolean;
message: string;
host: string;
}
14 changes: 1 addition & 13 deletions locust/webui/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,10 @@
import reactSwcPlugin from '@vitejs/plugin-react-swc';
import { UserConfig, defineConfig } from 'vite';
import checkerPlugin from 'vite-plugin-checker';
import tsconfigPaths from 'vite-tsconfig-paths';

// https://vitejs.dev/config/
export default defineConfig((config: UserConfig) => ({
plugins: [
reactSwcPlugin(),
tsconfigPaths(),
config.mode !== 'production' &&
config.mode !== 'test' &&
checkerPlugin({
typescript: true,
eslint: {
lintCommand: 'eslint ./src/**/*.{ts,tsx}',
},
}),
],
plugins: [reactSwcPlugin(), tsconfigPaths()],
base: './',
build: {
emptyOutDir: false,
Expand Down
129 changes: 67 additions & 62 deletions locust/webui/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
chalk "^2.4.2"

"@babel/code-frame@^7.12.13":
version "7.24.7"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.7.tgz#882fd9e09e8ee324e496bd040401c6f046ef4465"
integrity sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==
version "7.25.7"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.25.7.tgz#438f2c524071531d643c6f0188e1e28f130cebc7"
integrity sha512-0xZJFNE5XMpENsgfHYTw8FbX4kv53mFLn2i3XPoq69LyhYSCBJtitaHx9QnsVTrsogI4Z3+HtEfZ2/GFPOtf5g==
dependencies:
"@babel/highlight" "^7.24.7"
"@babel/highlight" "^7.25.7"
picocolors "^1.0.0"

"@babel/helper-module-imports@^7.16.7":
Expand Down Expand Up @@ -50,6 +50,11 @@
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db"
integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==

"@babel/helper-validator-identifier@^7.25.7":
version "7.25.7"
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.7.tgz#77b7f60c40b15c97df735b38a66ba1d7c3e93da5"
integrity sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==

"@babel/highlight@^7.22.13":
version "7.22.13"
resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.13.tgz#9cda839e5d3be9ca9e8c26b6dd69e7548f0cbf16"
Expand All @@ -59,12 +64,12 @@
chalk "^2.4.2"
js-tokens "^4.0.0"

"@babel/highlight@^7.24.7":
version "7.24.7"
resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.7.tgz#a05ab1df134b286558aae0ed41e6c5f731bf409d"
integrity sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==
"@babel/highlight@^7.25.7":
version "7.25.7"
resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.25.7.tgz#20383b5f442aa606e7b5e3043b0b1aafe9f37de5"
integrity sha512-iYyACpW3iW8Fw+ZybQK+drQre+ns/tKpXbNESfrhNnPLIklLbXr7MYJ6gPEd0iETGLOK+SxMjVvKb/ffmk+FEw==
dependencies:
"@babel/helper-validator-identifier" "^7.24.7"
"@babel/helper-validator-identifier" "^7.25.7"
chalk "^2.4.2"
js-tokens "^4.0.0"
picocolors "^1.0.0"
Expand Down Expand Up @@ -1403,45 +1408,45 @@
loupe "^2.3.6"
pretty-format "^29.5.0"

"@volar/language-core@2.4.5", "@volar/language-core@~2.4.1":
version "2.4.5"
resolved "https://registry.yarnpkg.com/@volar/language-core/-/language-core-2.4.5.tgz#af8ba724b05fc4dce2339c49662e732e9c22c897"
integrity sha512-F4tA0DCO5Q1F5mScHmca0umsi2ufKULAnMOVBfMsZdT4myhVl4WdKRwCaKcfOkIEuyrAVvtq1ESBdZ+rSyLVww==
"@volar/language-core@2.4.6", "@volar/language-core@~2.4.1":
version "2.4.6"
resolved "https://registry.yarnpkg.com/@volar/language-core/-/language-core-2.4.6.tgz#159625a6e1263fe68d1afad524ae2bd40c4ee0dd"
integrity sha512-FxUfxaB8sCqvY46YjyAAV6c3mMIq/NWQMVvJ+uS4yxr1KzOvyg61gAuOnNvgCvO4TZ7HcLExBEsWcDu4+K4E8A==
dependencies:
"@volar/source-map" "2.4.5"
"@volar/source-map" "2.4.6"

"@volar/source-map@2.4.5":
version "2.4.5"
resolved "https://registry.yarnpkg.com/@volar/source-map/-/source-map-2.4.5.tgz#81223a06321aaa067b40619189b44a9f0b7ac2d8"
integrity sha512-varwD7RaKE2J/Z+Zu6j3mNNJbNT394qIxXwdvz/4ao/vxOfyClZpSDtLKkwWmecinkOVos5+PWkWraelfMLfpw==
"@volar/source-map@2.4.6":
version "2.4.6"
resolved "https://registry.yarnpkg.com/@volar/source-map/-/source-map-2.4.6.tgz#b71ad241216f646812639f359262e6a84b46b6ed"
integrity sha512-Nsh7UW2ruK+uURIPzjJgF0YRGP5CX9nQHypA2OMqdM2FKy7rh+uv3XgPnWPw30JADbKvZ5HuBzG4gSbVDYVtiw==

"@volar/typescript@^2.4.4":
version "2.4.5"
resolved "https://registry.yarnpkg.com/@volar/typescript/-/typescript-2.4.5.tgz#1210c1e8561ac20af46348ceaf8e6e96c797063f"
integrity sha512-mcT1mHvLljAEtHviVcBuOyAwwMKz1ibXTi5uYtP/pf4XxoAzpdkQ+Br2IC0NPCvLCbjPZmbf3I0udndkfB1CDg==
version "2.4.6"
resolved "https://registry.yarnpkg.com/@volar/typescript/-/typescript-2.4.6.tgz#6a4611b9fae793ad0d4c66d11d765f2731d93a12"
integrity sha512-NMIrA7y5OOqddL9VtngPWYmdQU03htNKFtAYidbYfWA0TOhyGVd9tfcP4TsLWQ+RBWDZCbBqsr8xzU0ZOxYTCQ==
dependencies:
"@volar/language-core" "2.4.5"
"@volar/language-core" "2.4.6"
path-browserify "^1.0.1"
vscode-uri "^3.0.8"

"@vue/compiler-core@3.5.8":
version "3.5.8"
resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.5.8.tgz#03ee4a2fa022c9bc3e59f789a1e14593b1e95b10"
integrity sha512-Uzlxp91EPjfbpeO5KtC0KnXPkuTfGsNDeaKQJxQN718uz+RqDYarEf7UhQJGK+ZYloD2taUbHTI2J4WrUaZQNA==
"@vue/compiler-core@3.5.11":
version "3.5.11"
resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.5.11.tgz#3dcd0c1bab10732f44ab1790735afb03a4b69edc"
integrity sha512-PwAdxs7/9Hc3ieBO12tXzmTD+Ln4qhT/56S+8DvrrZ4kLDn4Z/AMUr8tXJD0axiJBS0RKIoNaR0yMuQB9v9Udg==
dependencies:
"@babel/parser" "^7.25.3"
"@vue/shared" "3.5.8"
"@vue/shared" "3.5.11"
entities "^4.5.0"
estree-walker "^2.0.2"
source-map-js "^1.2.0"

"@vue/compiler-dom@^3.4.0":
version "3.5.8"
resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.5.8.tgz#03e4a6bef00a1979613a1db2ab39e9b2dced3373"
integrity sha512-GUNHWvoDSbSa5ZSHT9SnV5WkStWfzJwwTd6NMGzilOE/HM5j+9EB9zGXdtu/fCNEmctBqMs6C9SvVPpVPuk1Eg==
version "3.5.11"
resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.5.11.tgz#950f8fc610e26326fed008b8d102cc8ee78a6ce5"
integrity sha512-pyGf8zdbDDRkBrEzf8p7BQlMKNNF5Fk/Cf/fQ6PiUz9at4OaUfyXW0dGJTo2Vl1f5U9jSLCNf0EZJEogLXoeew==
dependencies:
"@vue/compiler-core" "3.5.8"
"@vue/shared" "3.5.8"
"@vue/compiler-core" "3.5.11"
"@vue/shared" "3.5.11"

"@vue/compiler-vue2@^2.7.16":
version "2.7.16"
Expand All @@ -1465,10 +1470,10 @@
muggle-string "^0.4.1"
path-browserify "^1.0.1"

"@vue/shared@3.5.8", "@vue/shared@^3.4.0":
version "3.5.8"
resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.5.8.tgz#6ef14933872dcc4f7b79fee3aaecf648ff807fed"
integrity sha512-mJleSWbAGySd2RJdX1RBtcrUBX6snyOc0qHpgk3lGi4l9/P/3ny3ELqFWqYdkXIwwNN/kdm8nD9ky8o6l/Lx2A==
"@vue/shared@3.5.11", "@vue/shared@^3.4.0":
version "3.5.11"
resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.5.11.tgz#464b840afc89be9373addff9eeb9dfc98bf3fe2e"
integrity sha512-W8GgysJVnFo81FthhzurdRAWP/byq3q2qIw70e0JWblzVhjgOMiC2GyovXrZTFQJnFVryYaKGP3Tc9vYzYm6PQ==

acorn-jsx@^5.3.2:
version "5.3.2"
Expand All @@ -1485,7 +1490,7 @@ acorn@^8.10.0:
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.2.tgz#ca0d78b51895be5390a5903c5b3bdcdaf78ae40b"
integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==

acorn@^8.11.3:
acorn@^8.12.1:
version "8.12.1"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248"
integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==
Expand Down Expand Up @@ -1973,10 +1978,10 @@ concat-map@0.0.1:
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==

confbox@^0.1.7:
version "0.1.7"
resolved "https://registry.yarnpkg.com/confbox/-/confbox-0.1.7.tgz#ccfc0a2bcae36a84838e83a3b7f770fb17d6c579"
integrity sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA==
confbox@^0.1.8:
version "0.1.8"
resolved "https://registry.yarnpkg.com/confbox/-/confbox-0.1.8.tgz#820d73d3b3c82d9bd910652c5d4d599ef8ff8b06"
integrity sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==

convert-source-map@^1.5.0:
version "1.9.0"
Expand Down Expand Up @@ -2758,9 +2763,9 @@ fast-levenshtein@^2.0.6:
integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==

fast-uri@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.1.tgz#cddd2eecfc83a71c1be2cc2ef2061331be8a7134"
integrity sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==
version "3.0.2"
resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.2.tgz#d78b298cf70fd3b752fd951175a3da6a7b48f024"
integrity sha512-GR6f0hD7XXyNJa25Tb9BuIdN0tdr+0BMi6/CJPH3wJO1JjNG3n/VsSw38AwRdKZABm8lGbPfakLRkYzx2V9row==

fastq@^1.6.0:
version "1.17.1"
Expand Down Expand Up @@ -4080,15 +4085,15 @@ mlly@^1.2.0, mlly@^1.4.0:
pkg-types "^1.0.3"
ufo "^1.3.0"

mlly@^1.4.2, mlly@^1.7.1:
version "1.7.1"
resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.7.1.tgz#e0336429bb0731b6a8e887b438cbdae522c8f32f"
integrity sha512-rrVRZRELyQzrIUAVMHxP97kv+G786pHmOKzuFII8zDYahFBS7qnHh2AlYSl1GAHhaMPCz6/oHjVMcfFYgFYHgA==
mlly@^1.4.2, mlly@^1.7.2:
version "1.7.2"
resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.7.2.tgz#21c0d04543207495b8d867eff0ac29fac9a023c0"
integrity sha512-tN3dvVHYVz4DhSXinXIk7u9syPYaJvio118uomkovAtWBT+RdbP6Lfh/5Lvo519YMmwBafwlh20IPTXIStscpA==
dependencies:
acorn "^8.11.3"
acorn "^8.12.1"
pathe "^1.1.2"
pkg-types "^1.1.1"
ufo "^1.5.3"
pkg-types "^1.2.0"
ufo "^1.5.4"

ms@2.1.2:
version "2.1.2"
Expand Down Expand Up @@ -4481,13 +4486,13 @@ pkg-types@^1.0.3:
mlly "^1.2.0"
pathe "^1.1.0"

pkg-types@^1.1.1:
version "1.2.0"
resolved "https://registry.yarnpkg.com/pkg-types/-/pkg-types-1.2.0.tgz#d0268e894e93acff11a6279de147e83354ebd42d"
integrity sha512-+ifYuSSqOQ8CqP4MbZA5hDpb97n3E8SVWdJe+Wms9kj745lmd3b7EZJiqvmLwAlmRfjrI7Hi5z3kdBJ93lFNPA==
pkg-types@^1.2.0:
version "1.2.1"
resolved "https://registry.yarnpkg.com/pkg-types/-/pkg-types-1.2.1.tgz#6ac4e455a5bb4b9a6185c1c79abd544c901db2e5"
integrity sha512-sQoqa8alT3nHjGuTjuKgOnvjo4cljkufdtLMnO2LBP/wRwuDlo1tkaEdMxCRhyGRPacv/ztlZgDPm2b7FAmEvw==
dependencies:
confbox "^0.1.7"
mlly "^1.7.1"
confbox "^0.1.8"
mlly "^1.7.2"
pathe "^1.1.2"

possible-typed-array-names@^1.0.0:
Expand Down Expand Up @@ -4827,7 +4832,7 @@ rollup@^3.27.1:
optionalDependencies:
fsevents "~2.3.2"

rollup@^4.20.0, rollup@^4.22.4:
rollup@^4.20.0:
version "4.22.4"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.22.4.tgz#4135a6446671cd2a2453e1ad42a45d5973ec3a0f"
integrity sha512-vD8HJ5raRcWOyymsR6Z3o6+RzfEPCnVLMFJ6vRslO1jt4LO6dUo5Qnpg7y4RkZFM2DMe3WUirkI5c16onjrc6A==
Expand Down Expand Up @@ -5549,7 +5554,7 @@ ufo@^1.3.0:
resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.3.1.tgz#e085842f4627c41d4c1b60ebea1f75cdab4ce86b"
integrity sha512-uY/99gMLIOlJPwATcMVYfqDSxUR9//AUcgZMzwfSTJPDKzA1S8mX4VLqa+fiAtveraQUBCz4FFcwVZBGbwBXIw==

ufo@^1.5.3:
ufo@^1.5.4:
version "1.5.4"
resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.5.4.tgz#16d6949674ca0c9e0fbbae1fa20a71d7b1ded754"
integrity sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==
Expand Down Expand Up @@ -5718,9 +5723,9 @@ vite-plugin-checker@^0.8.0:
vscode-uri "^3.0.2"

vite-plugin-dts@^4.2.2:
version "4.2.2"
resolved "https://registry.yarnpkg.com/vite-plugin-dts/-/vite-plugin-dts-4.2.2.tgz#96fd412827e545564a6dfe2de678feec5ddbed5c"
integrity sha512-USwTMReZFf8yXV+cKkm4WOMqmFjbReAvkyxON5xzdnZzJEBnFgax6BBDZIGGr9WMJYvhHdpaIHLrOjXDcla4OA==
version "4.2.3"
resolved "https://registry.yarnpkg.com/vite-plugin-dts/-/vite-plugin-dts-4.2.3.tgz#e0d9616eb574700111dbd19ae98e166541433263"
integrity sha512-O5NalzHANQRwVw1xj8KQun3Bv8OSDAlNJXrnqoAz10BOuW8FVvY5g4ygj+DlJZL5mtSPuMu9vd3OfrdW5d4k6w==
dependencies:
"@microsoft/api-extractor" "7.47.7"
"@rollup/pluginutils" "^5.1.0"
Expand Down

0 comments on commit 7529d7c

Please sign in to comment.