diff --git a/warpgate-web/.eslintrc.yaml b/warpgate-web/.eslintrc.yaml
index 82362f00b..09de3053a 100644
--- a/warpgate-web/.eslintrc.yaml
+++ b/warpgate-web/.eslintrc.yaml
@@ -12,12 +12,11 @@ extends:
- 'plugin:import/recommended'
- 'plugin:import/typescript'
- 'plugin:@typescript-eslint/all'
+ - 'plugin:svelte/recommended'
plugins:
- import
- - svelte3
- '@typescript-eslint/eslint-plugin'
settings:
- svelte3/typescript: true
import/resolver:
typescript: {}
rules:
@@ -118,6 +117,7 @@ rules:
'@typescript-eslint/naming-convention': 'off'
'@typescript-eslint/lines-between-class-members':
- error
+ - always
- exceptAfterSingleLine: true
'@typescript-eslint/dot-notation': 'off'
'@typescript-eslint/no-implicit-any-catch': 'off'
@@ -141,7 +141,12 @@ rules:
overrides:
- files: '*.svelte'
- processor: svelte3/svelte3
+ parser: 'svelte-eslint-parser'
+ parserOptions:
+ parser:
+ ts: '@typescript-eslint/parser'
+ js: 'espree'
+ typescript: '@typescript-eslint/parser'
rules:
# To allow prop definitions
'@typescript-eslint/init-declarations': off
diff --git a/warpgate-web/openapitools.json b/warpgate-web/openapitools.json
index 7f483d159..ec757286f 100644
--- a/warpgate-web/openapitools.json
+++ b/warpgate-web/openapitools.json
@@ -2,6 +2,6 @@
"$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
"spaces": 2,
"generator-cli": {
- "version": "5.4.0"
+ "version": "7.7.0"
}
}
diff --git a/warpgate-web/package.json b/warpgate-web/package.json
index 0dc649bfa..cc3ddef66 100644
--- a/warpgate-web/package.json
+++ b/warpgate-web/package.json
@@ -8,13 +8,13 @@
"build": "vite build",
"watch": "vite build -w --mode development --minify false",
"preview": "vite preview",
- "check": "svelte-check --tsconfig ./tsconfig.json",
+ "check": "svelte-check --compiler-warnings 'a11y-no-noninteractive-element-interactions:ignore,a11y-click-events-have-key-events:ignore,a11y-no-static-element-interactions:ignore' --tsconfig ./tsconfig.json",
"lint": "eslint src && svelte-check",
"postinstall": "yarn run openapi:client:gateway && yarn run openapi:client:admin",
"openapi:schema:gateway": "cargo run -p warpgate-protocol-http > src/gateway/lib/openapi-schema.json",
"openapi:schema:admin": "cargo run -p warpgate-admin > src/admin/lib/openapi-schema.json",
- "openapi:client:gateway": "openapi-generator-cli generate -g typescript-fetch -i src/gateway/lib/openapi-schema.json -o src/gateway/lib/api-client -p npmName=warpgate-gateway-api-client -p useSingleRequestParameter=true && cd src/gateway/lib/api-client && npm i typescript@3.5 && npm i && yarn tsc --target esnext --module esnext && rm -rf src tsconfig.json",
- "openapi:client:admin": "openapi-generator-cli generate -g typescript-fetch -i src/admin/lib/openapi-schema.json -o src/admin/lib/api-client -p npmName=warpgate-admin-api-client -p useSingleRequestParameter=true && cd src/admin/lib/api-client && npm i typescript@3.5 && npm i && yarn tsc --target esnext --module esnext && rm -rf src tsconfig.json",
+ "openapi:client:gateway": "openapi-generator-cli generate -g typescript-fetch -i src/gateway/lib/openapi-schema.json -o src/gateway/lib/api-client -p npmName=warpgate-gateway-api-client -p useSingleRequestParameter=true && cd src/gateway/lib/api-client && npm i typescript@5 && npm i && yarn tsc --target esnext --module esnext && rm -rf src tsconfig.json",
+ "openapi:client:admin": "openapi-generator-cli generate -g typescript-fetch -i src/admin/lib/openapi-schema.json -o src/admin/lib/api-client -p npmName=warpgate-admin-api-client -p useSingleRequestParameter=true && cd src/admin/lib/api-client && npm i typescript@5 && npm i && yarn tsc --target esnext --module esnext && rm -rf src tsconfig.json",
"openapi": "yarn run openapi:schema:admin && yarn run openapi:schema:gateway && yarn run openapi:client:admin && yarn run openapi:client:gateway"
},
"devDependencies": {
@@ -22,46 +22,46 @@
"@fortawesome/free-brands-svg-icons": "^6.4.0",
"@fortawesome/free-regular-svg-icons": "^6.4.0",
"@fortawesome/free-solid-svg-icons": "^6.4.0",
- "@openapitools/openapi-generator-cli": "^2.5.1",
+ "@openapitools/openapi-generator-cli": "^2.13.4",
"@otplib/plugin-base32-enc-dec": "^12.0.1",
"@otplib/plugin-crypto-js": "^12.0.1",
"@otplib/preset-browser": "^12.0.1",
- "@sveltejs/vite-plugin-svelte": "^1.4.0",
- "@tsconfig/svelte": "^3.0.0",
+ "@sveltejs/vite-plugin-svelte": "^3.1.1",
+ "@tsconfig/svelte": "^5.0.0",
"@types/qrcode": "^1.5.0",
"@types/ua-parser-js": "^0.7.36",
- "@typescript-eslint/eslint-plugin": "^5.43.0",
- "@typescript-eslint/parser": "^5.58.0",
- "bootstrap": "^5.2.0-beta1",
+ "@typescript-eslint/eslint-plugin": "^7.13.0",
+ "@typescript-eslint/parser": "^7.13.0",
+ "bootstrap": "^5.3.3",
"copy-text-to-clipboard": "^3.0.1",
- "eslint": "^8.38.0",
- "eslint-config-standard": "^16.0.3",
- "eslint-import-resolver-typescript": "^3.5.5",
- "eslint-plugin-import": "^2.26.0",
+ "eslint": "^8.57.0",
+ "eslint-config-standard": "^17.1.0",
+ "eslint-import-resolver-typescript": "^3.6.1",
+ "eslint-plugin-import": "^2.29.1",
"eslint-plugin-node": "^11.1.0",
- "eslint-plugin-promise": "^6.1.1",
- "eslint-plugin-svelte3": "^4.0.0",
+ "eslint-plugin-promise": "^6.2.0",
+ "eslint-plugin-svelte": "^2.39.4",
"format-duration": "^3.0.2",
"moment": "^2.29.4",
"otplib": "^12.0.1",
"qrcode": "^1.5.1",
- "sass": "^1.61.0",
- "svelte": "^3.58.0",
- "svelte-check": "^2.9.2",
- "svelte-fa": "^3.0.1",
- "svelte-intersection-observer": "^0.10.0",
+ "sass": "^1.77.6",
+ "svelte": "^4.0.0",
+ "svelte-check": "^3.4.3",
+ "svelte-fa": "^4.0.2",
+ "svelte-intersection-observer": "^1.0.0",
"svelte-observable": "^0.4.0",
- "svelte-preprocess": "^4.10.7",
- "svelte-spa-router": "^3.3.0",
- "sveltestrap": "^5.9.0",
+ "svelte-preprocess": "^5.0.3",
+ "svelte-spa-router": "^4.0.1",
+ "@sveltestrap/sveltestrap": "^6.2.7",
"thenby": "^1.3.4",
- "tslib": "^2.5.0",
- "typescript": "^4.9.4",
+ "tslib": "^2.6.3",
+ "typescript": "^5.0.0",
"ua-parser-js": "^1.0.35",
- "vite": "^3.2.4",
- "vite-plugin-checker": "^0.5.3",
- "vite-tsconfig-paths": "^4.0.9",
+ "vite": "^5.3.1",
+ "vite-plugin-checker": "^0.6.4",
+ "vite-tsconfig-paths": "^4.3.2",
"xterm": "^4.18.0",
"xterm-addon-serialize": "^0.7.0"
}
-}
+}
\ No newline at end of file
diff --git a/warpgate-web/src/admin/AuthPolicyEditor.svelte b/warpgate-web/src/admin/AuthPolicyEditor.svelte
index 692d7738b..f426ab0de 100644
--- a/warpgate-web/src/admin/AuthPolicyEditor.svelte
+++ b/warpgate-web/src/admin/AuthPolicyEditor.svelte
@@ -1,12 +1,12 @@
diff --git a/warpgate-web/src/admin/CreateRole.svelte b/warpgate-web/src/admin/CreateRole.svelte
index e1100cb5f..36d5c2a7d 100644
--- a/warpgate-web/src/admin/CreateRole.svelte
+++ b/warpgate-web/src/admin/CreateRole.svelte
@@ -2,7 +2,7 @@
import { api } from 'admin/lib/api'
import AsyncButton from 'common/AsyncButton.svelte'
import { replace } from 'svelte-spa-router'
-import { Alert, FormGroup } from 'sveltestrap'
+import { Alert, FormGroup } from '@sveltestrap/sveltestrap'
let error: Error|null = null
let name = ''
@@ -19,7 +19,7 @@ async function create () {
})
replace(`/roles/${role.id}`)
} catch (err) {
- error = err
+ error = err as Error
}
}
diff --git a/warpgate-web/src/admin/CreateTarget.svelte b/warpgate-web/src/admin/CreateTarget.svelte
index d74bd9bf1..2badd24d2 100644
--- a/warpgate-web/src/admin/CreateTarget.svelte
+++ b/warpgate-web/src/admin/CreateTarget.svelte
@@ -2,7 +2,7 @@
import { api, TargetOptions, TlsMode } from 'admin/lib/api'
import AsyncButton from 'common/AsyncButton.svelte'
import { replace } from 'svelte-spa-router'
-import { Alert, FormGroup } from 'sveltestrap'
+import { Alert, FormGroup } from '@sveltestrap/sveltestrap'
let error: Error|null = null
let name = ''
@@ -54,7 +54,7 @@ async function create () {
})
replace(`/targets/${target.id}`)
} catch (err) {
- error = err
+ error = err as Error
}
}
diff --git a/warpgate-web/src/admin/CreateTicket.svelte b/warpgate-web/src/admin/CreateTicket.svelte
index 16227a2a0..4f2c60d7b 100644
--- a/warpgate-web/src/admin/CreateTicket.svelte
+++ b/warpgate-web/src/admin/CreateTicket.svelte
@@ -1,10 +1,10 @@
-