Modern Docker Management, Designed for Everyone
Go composecontainer-managementcontainersdockerdocker-composedocker-managementgoself-hostedsveltekittypescriptweb-ui
refactor: replace axios with ky.js (#2199)
Kyle Mendell4b2472fa5fe0
diff --git a/frontend/package.json b/frontend/package.jsonindex 784be72ee..aedc98800 100644--- a/frontend/package.json+++ b/frontend/package.json@@ -37,10 +37,10 @@"@xyflow/svelte": "^1.5.2","ajv": "^8.18.0","ansi-to-html": "^0.7.2",- "axios": "^1.14.0","date-fns": "^4.1.0","embla-carousel-svelte": "^8.6.0","js-yaml": "^4.1.1",+ "ky": "^1.12.0","prettier": "^3.8.1","prettier-plugin-svelte": "^3.5.1","prettier-plugin-tailwindcss": "^0.7.2",diff --git a/frontend/src/hooks.client.ts b/frontend/src/hooks.client.tsindex 4b6ab2b1b..fd0ec0471 100644--- a/frontend/src/hooks.client.ts+++ b/frontend/src/hooks.client.ts@@ -1,11 +1,15 @@import type { HandleClientError } from '@sveltejs/kit';-import { AxiosError } from 'axios';+import { extractApiErrorMessage } from '$lib/utils/api.util';export const handleError: HandleClientError = async ({ error, message, status }) => {- if (error instanceof AxiosError) {- message = error.response?.data.error || message;- status = error.response?.status || status;- console.error(`Axios error: ${error.request.path} - ${error.response?.data.error ?? error.message}`);+ if (error && typeof error === 'object' && 'response' in error) {+ const responseStatus = (error as { response?: { status?: number } }).response?.status;+ const apiErrorMessage = extractApiErrorMessage(error) || message;+ message = apiErrorMessage;+ status = responseStatus || status;+ const requestUrl =+ (error as { request?: { url?: string } }).request?.url || (error as { config?: { url?: string } }).config?.url || 'unknown';+ console.error(`API error: ${requestUrl} - ${apiErrorMessage}`);} else {console.error(error);}diff --git a/frontend/src/lib/services/api-service.ts b/frontend/src/lib/services/api-service.tsindex afb3e9139..6ec4634a2 100644--- a/frontend/src/lib/services/api-service.ts+++ b/frontend/src/lib/services/api-service.ts@@ -1,13 +1,73 @@-import axios, { type AxiosResponse } from 'axios';+import ky, { HTTPError as KyHTTPError, TimeoutError, type Options as KyOptions, type SearchParamsOption } from 'ky';import { toast } from 'svelte-sonner';+export interface APIRequestConfig {+ baseURL?: string;+ data?: unknown;+ headers?: HeadersInit;+ params?: SearchParamsOption;+ responseType?: 'json' | 'text' | 'blob' | 'arrayBuffer';+ retry?: number;+ timeout?: number | false;+}++interface InternalRequestConfig extends APIRequestConfig {+ _retry?: boolean;+}++export interface APIResponse<T = any> {+ data: T;+ headers: Headers;+ raw: Response;+ status: number;+}++export class APIError extends Error {+ config: InternalRequestConfig & { method?: string; url?: string };+ request?: { url: string };+ response?: {+ data: any;+ headers: Headers;+ raw: Response;+ status: number;+ };+ status?: number;++ constructor(+ message: string,+ options: {+ config: InternalRequestConfig & { method?: string; url?: string };+ name?: string;+ requestUrl?: string;+ response?: APIResponse;+ cause?: unknown;+ }+ ) {+ super(message);+ this.name = options.name ?? 'APIError';+ if (options.cause !== undefined) {+ (this as Error & { cause?: unknown }).cause = options.cause;+ }+ this.config = options.config;+ this.request = options.requestUrl ? { url: options.requestUrl } : undefined;+ this.response = options.response+ ? {+ data: options.response.data,+ headers: options.response.headers,+ raw: options.response.raw,+ status: options.response.status+ }+ : undefined;+ this.status = options.response?.status;+ }+}+function extractServerMessage(data: any, includeErrors = false): string | undefined {const inner = (data && typeof data === 'object' ? ((data as any).data ?? data) : data) as any;if (typeof inner === 'string') {return inner;}if (inner) {- // Support both old format (error/message) and Huma RFC 7807 format (detail)const msg = inner['error'] || inner['message'] || inner['detail'] || inner['error_description'];if (msg) return msg;if (includeErrors && Array.isArray(inner['errors']) && inner['errors'].length) {@@ -17,54 +77,152 @@ function extractServerMessage(data: any, includeErrors = false): string | undefireturn undefined;}-abstract class BaseAPIService {- api = axios.create({- baseURL: '/api',- withCredentials: true- });+function isBodyInit(value: unknown): value is BodyInit {+ return (+ value instanceof FormData ||+ value instanceof URLSearchParams ||+ value instanceof Blob ||+ value instanceof ArrayBuffer ||+ ArrayBuffer.isView(value) ||+ typeof value === 'string'+ );+}- private static tokenRefreshHandler: (() => Promise<string | null>) | null = null;+async function parseResponseBody(response: Response, responseType: APIRequestConfig['responseType'] = 'json'): Promise<any> {+ if (responseType === 'blob') {+ return response.blob();+ }+ if (responseType === 'text') {+ return response.text();+ }+ if (responseType === 'arrayBuffer') {+ return response.arrayBuffer();+ }+ if (response.status === 204 || response.status === 205) {+ return undefined;+ }- static setTokenRefreshHandler(handler: () => Promise<string | null>) {- BaseAPIService.tokenRefreshHandler = handler;+ const text = await response.text();+ if (!text) {+ return undefined;+ }++ try {+ return JSON.parse(text);+ } catch {+ return text;+ }+}++function normalizeUrl(baseURL: string, url: string): string {+ if (/^[a-z]+:\/\//i.test(url)) {+ return url;+ }++ const trimmedBase = baseURL.replace(/\/+$/, '');+ const trimmedUrl = url.replace(/^\/+/, '');++ if (/^[a-z]+:\/\//i.test(trimmedBase)) {+ return new URL(trimmedUrl, `${trimmedBase}/`).toString();}- constructor() {- const devBackendUrl = typeof process !== 'undefined' ? process?.env?.['DEV_BACKEND_URL'] : undefined;- if (devBackendUrl) {- this.api.defaults.baseURL = devBackendUrl;+ return `${trimmedBase}/${trimmedUrl}`;+}++function getRequestPath(url: string, baseURL: string): string {+ let reqUrl = url;+ try {+ if (/^https?:\/\//i.test(reqUrl)) {+ reqUrl = new URL(reqUrl).pathname;+ } else if (baseURL && /^https?:\/\//i.test(baseURL)) {+ reqUrl = new URL(reqUrl.replace(/^\/+/, ''), `${baseURL.replace(/\/+$/, '')}/`).pathname;}+ } catch {+ // ignore URL parse errors and fall back to the raw request URL+ }- this.api.interceptors.response.use(- (response) => response,- async (error) => {- const status = error?.response?.status;- const originalRequest = error.config;+ if (reqUrl.startsWith('/api')) {+ reqUrl = reqUrl.slice(4) || '/';+ }- if (status === 401 && typeof window !== 'undefined' && !originalRequest._retry) {- originalRequest._retry = true;+ return reqUrl;+}- const serverMsg = extractServerMessage(error?.response?.data);- const isVersionMismatch = serverMsg?.toLowerCase().includes('application has been updated');+let tokenRefreshHandler: (() => Promise<string | null>) | null = null;- let reqUrl: string = error?.config?.url ?? '';- const baseURL: string = error?.config?.baseURL ?? this.api.defaults.baseURL ?? '';- try {- if (/^https?:\/\//i.test(reqUrl)) {- const u = new URL(reqUrl);- reqUrl = u.pathname;- } else if (baseURL && /^https?:\/\//i.test(baseURL)) {- const u = new URL(reqUrl, baseURL);- reqUrl = u.pathname;- }- } catch {- // ignore URL parse errors and fall back to raw reqUrl- }+class APIClient {+ defaults: { baseURL: string };+ private client;- if (reqUrl.startsWith('/api')) {- reqUrl = reqUrl.slice(4) || '/';- }+ constructor(baseURL: string) {+ this.defaults = { baseURL };+ this.client = ky.create({+ credentials: 'include',+ retry: 0,+ timeout: false+ });+ }++ setBaseURL(baseURL: string) {+ this.defaults.baseURL = baseURL;+ }++ private async performRequest<T = any>(+ method: string,+ url: string,+ data?: unknown,+ config: InternalRequestConfig = {}+ ): Promise<APIResponse<T>> {+ const baseURL = config.baseURL ?? this.defaults.baseURL;+ const requestUrl = normalizeUrl(baseURL, url);+ const requestConfig = {+ ...config,+ baseURL,+ method,+ url+ };++ try {+ const options: KyOptions = {+ method,+ headers: config.headers,+ retry: config.retry ?? 0,+ searchParams: config.params,+ timeout: config.timeout+ };+ const bodyData = data !== undefined ? data : config.data;+ if (bodyData !== undefined && bodyData !== null) {+ if (isBodyInit(bodyData)) {+ options.body = bodyData;+ } else {+ options.json = bodyData;+ }+ }++ const response = await this.client(requestUrl, options);+ const parsed = method.toUpperCase() === 'HEAD' ? undefined : await parseResponseBody(response.clone(), config.responseType);+ return {+ data: parsed as T,+ headers: response.headers,+ raw: response,+ status: response.status+ };+ } catch (error) {+ if (error instanceof KyHTTPError) {+ const errorResponse = error.response;+ const parsed = await parseResponseBody(errorResponse.clone(), config.responseType);+ const response: APIResponse = {+ data: parsed,+ headers: errorResponse.headers,+ raw: errorResponse,+ status: errorResponse.status+ };++ if (errorResponse.status === 401 && typeof window !== 'undefined' && !config._retry) {+ const serverMsg = extractServerMessage(parsed);+ const isVersionMismatch = serverMsg?.toLowerCase().includes('application has been updated');+ const reqUrl = getRequestPath(url, baseURL);const skipAuthPaths = ['/auth/login','/auth/logout',@@ -76,8 +234,7 @@ abstract class BaseAPIService {'/auth/auto-login-config','/settings/public'];- const isAuthApi = skipAuthPaths.some((p) => reqUrl.startsWith(p));-+ const isAuthApi = skipAuthPaths.some((path) => reqUrl.startsWith(path));const pathname = window.location.pathname || '/';const isOnAuthPage =pathname.startsWith('/login') ||@@ -85,17 +242,14 @@ abstract class BaseAPIService {pathname.startsWith('/oidc') ||pathname.startsWith('/auth/oidc');- if (!isAuthApi && !isOnAuthPage && BaseAPIService.tokenRefreshHandler) {+ if (!isAuthApi && !isOnAuthPage && tokenRefreshHandler) {try {- // Always try to refresh first — even on version mismatch, because the refresh- // token is not version-tagged and will return a new access token with the- // current app version embedded, keeping the user logged in after an update.- // Auth is cookie-based, so we just need the refresh to succeed (not throw);- // the Set-Cookie on the refresh response is what re-authorises future requests.- await BaseAPIService.tokenRefreshHandler();- return this.api(originalRequest);+ await tokenRefreshHandler();+ return this.performRequest<T>(method, url, data, {+ ...config,+ _retry: true+ });} catch {- // Refresh failed (expired, missing, or server error) — redirect to loginif (isVersionMismatch) {toast.info('Application has been updated. Please log in again.');}@@ -105,7 +259,6 @@ abstract class BaseAPIService {}}- // No refresh handler available — version mismatch must force loginif (!isAuthApi && !isOnAuthPage && isVersionMismatch) {toast.info('Application has been updated. Please log in again.');const redirectTo = encodeURIComponent(pathname);@@ -114,21 +267,77 @@ abstract class BaseAPIService {}}- try {- const serverMsg = extractServerMessage(error?.response?.data, true);- if (serverMsg) {- error.message = serverMsg;- }- } catch {- // ignore extraction issues; fall back to default axios message- }+ throw new APIError(extractServerMessage(parsed, true) ?? error.message, {+ cause: error,+ config: requestConfig,+ name: 'HTTPError',+ requestUrl,+ response+ });+ }- return Promise.reject(error);+ if (error instanceof TimeoutError) {+ throw new APIError('Request timed out', {+ cause: error,+ config: requestConfig,+ name: 'TimeoutError',+ requestUrl+ });}- );++ if (error instanceof Error) {+ throw new APIError(error.message, {+ cause: error,+ config: requestConfig,+ name: error.name || 'APIError',+ requestUrl+ });+ }++ throw new APIError('Unknown error', {+ cause: error,+ config: requestConfig,+ requestUrl+ });+ }+ }++ get<T = any>(url: string, config?: APIRequestConfig) {+ return this.performRequest<T>('GET', url, undefined, config);+ }++ post<T = any>(url: string, data?: unknown, config?: APIRequestConfig) {+ return this.performRequest<T>('POST', url, data, config);+ }++ put<T = any>(url: string, data?: unknown, config?: APIRequestConfig) {+ return this.performRequest<T>('PUT', url, data, config);+ }++ patch<T = any>(url: string, data?: unknown, config?: APIRequestConfig) {+ return this.performRequest<T>('PATCH', url, data, config);+ }++ delete<T = any>(url: string, config?: APIRequestConfig) {+ return this.performRequest<T>('DELETE', url, undefined, config);+ }++ head<T = any>(url: string, config?: APIRequestConfig) {+ return this.performRequest<T>('HEAD', url, undefined, config);+ }+}++const devBackendUrl = typeof process !== 'undefined' ? process?.env?.['DEV_BACKEND_URL'] : undefined;+export const apiClient = new APIClient(devBackendUrl || '/api');++abstract class BaseAPIService {+ api = apiClient;++ static setTokenRefreshHandler(handler: () => Promise<string | null>) {+ tokenRefreshHandler = handler;}- protected async handleResponse<T>(promise: Promise<AxiosResponse>): Promise<T> {+ protected async handleResponse<T>(promise: Promise<APIResponse>): Promise<T> {const response = await promise;const payload = response.data;const extracted =diff --git a/frontend/src/lib/services/api/environment-upgrade-service.ts b/frontend/src/lib/services/api/environment-upgrade-service.tsindex 85dd94f24..de9a5acd1 100644--- a/frontend/src/lib/services/api/environment-upgrade-service.ts+++ b/frontend/src/lib/services/api/environment-upgrade-service.ts@@ -1,4 +1,4 @@-import axios from 'axios';+import { apiClient } from '../api-service';export interface EnvironmentUpgradeCheckResponse {canUpgrade: boolean;@@ -18,7 +18,7 @@ export interface EnvironmentUpgradeResponse {* @returns Promise with upgrade availability status*/async function checkEnvironmentUpgradeAvailable(environmentId: string): Promise<EnvironmentUpgradeCheckResponse> {- const res = await axios.get<EnvironmentUpgradeCheckResponse>(`/api/environments/${environmentId}/system/upgrade/check`);+ const res = await apiClient.get<EnvironmentUpgradeCheckResponse>(`/environments/${environmentId}/system/upgrade/check`);return res.data;}@@ -28,7 +28,7 @@ async function checkEnvironmentUpgradeAvailable(environmentId: string): Promise<* @returns Promise with upgrade initiation result*/async function triggerEnvironmentUpgrade(environmentId: string): Promise<EnvironmentUpgradeResponse> {- const res = await axios.post<EnvironmentUpgradeResponse>(`/api/environments/${environmentId}/system/upgrade`);+ const res = await apiClient.post<EnvironmentUpgradeResponse>(`/environments/${environmentId}/system/upgrade`);return res.data;}diff --git a/frontend/src/lib/services/api/system-upgrade-service.ts b/frontend/src/lib/services/api/system-upgrade-service.tsindex 2c2ea8333..c2ab19bef 100644--- a/frontend/src/lib/services/api/system-upgrade-service.ts+++ b/frontend/src/lib/services/api/system-upgrade-service.ts@@ -1,4 +1,4 @@-import axios from 'axios';+import { apiClient } from '../api-service';import type { AppVersionInformation } from '$lib/types/application-configuration';export interface UpgradeCheckResponse {@@ -28,7 +28,7 @@ type ApiResponse<T> = {* @returns Promise with upgrade availability status*/async function checkUpgradeAvailable(): Promise<UpgradeCheckResponse> {- const res = await axios.get<UpgradeCheckResponse>('/api/environments/0/system/upgrade/check');+ const res = await apiClient.get<UpgradeCheckResponse>('/environments/0/system/upgrade/check');return res.data;}@@ -37,7 +37,7 @@ async function checkUpgradeAvailable(): Promise<UpgradeCheckResponse> {* @returns Promise with upgrade initiation result*/async function triggerUpgrade(): Promise<UpgradeResponse> {- const res = await axios.post<UpgradeResponse>('/api/environments/0/system/upgrade');+ const res = await apiClient.post<UpgradeResponse>('/environments/0/system/upgrade');return res.data;}@@ -48,8 +48,8 @@ async function triggerUpgrade(): Promise<UpgradeResponse> {*/async function checkHealth(environmentId: string = '0'): Promise<HealthCheckResult> {try {- const endpoint = environmentId === '0' ? '/api/health' : `/api/environments/${environmentId}/system/health`;- const res = await axios.head(endpoint, {+ const endpoint = environmentId === '0' ? '/health' : `/environments/${environmentId}/system/health`;+ const res = await apiClient.head(endpoint, {timeout: 3000});return { healthy: res.status === 200 };@@ -64,11 +64,11 @@ async function checkHealth(environmentId: string = '0'): Promise<HealthCheckResu*/async function getVersionInfo(environmentId: string = '0'): Promise<AppVersionInformation> {if (environmentId === '0') {- const res = await axios.get<AppVersionInformation>('/api/app-version', { timeout: 5000 });+ const res = await apiClient.get<AppVersionInformation>('/app-version', { timeout: 5000 });return res.data;}- const res = await axios.get<ApiResponse<AppVersionInformation>>(`/api/environments/${environmentId}/version`, {+ const res = await apiClient.get<ApiResponse<AppVersionInformation>>(`/environments/${environmentId}/version`, {timeout: 5000});return res.data.data;diff --git a/frontend/src/lib/services/customize-search.ts b/frontend/src/lib/services/customize-search.tsindex f4df9d30a..6c2558d3d 100644--- a/frontend/src/lib/services/customize-search.ts+++ b/frontend/src/lib/services/customize-search.ts@@ -1,18 +1,18 @@-import axios from 'axios';+import { apiClient } from './api-service';import type { CustomizeSearchResponse, CustomizeCategory } from '$lib/types/customize-search.type';export class CustomizeSearchService {- private baseUrl = '/api/customize';+ private baseUrl = '/customize';async search(query: string): Promise<CustomizeSearchResponse> {- const response = await axios.post<CustomizeSearchResponse>(`${this.baseUrl}/search`, {+ const response = await apiClient.post<CustomizeSearchResponse>(`${this.baseUrl}/search`, {query});return response.data;}async getCategories(): Promise<CustomizeCategory[]> {- const response = await axios.get<CustomizeCategory[]>(`${this.baseUrl}/categories`);+ const response = await apiClient.get<CustomizeCategory[]>(`${this.baseUrl}/categories`);return response.data;}}diff --git a/frontend/src/lib/services/image-service.ts b/frontend/src/lib/services/image-service.tsindex e1b67a233..a58c7a6b0 100644--- a/frontend/src/lib/services/image-service.ts+++ b/frontend/src/lib/services/image-service.ts@@ -78,13 +78,7 @@ export class ImageService extends BaseAPIService {const envId = await environmentStore.getCurrentEnvironmentId();const formData = new FormData();formData.append('file', file);- return this.handleResponse(- this.api.post(`/environments/${envId}/images/upload`, formData, {- headers: {- 'Content-Type': 'multipart/form-data'- }- })- );+ return this.handleResponse(this.api.post(`/environments/${envId}/images/upload`, formData));}async getImageBuilds(options?: SearchPaginationSortRequest): Promise<Paginated<ImageBuildRecord>> {diff --git a/frontend/src/lib/services/settings-search.ts b/frontend/src/lib/services/settings-search.tsindex 37f83c63b..e0b91a09b 100644--- a/frontend/src/lib/services/settings-search.ts+++ b/frontend/src/lib/services/settings-search.ts@@ -1,18 +1,18 @@-import axios from 'axios';+import { apiClient } from './api-service';import type { SettingsSearchResponse, SettingsCategory } from '$lib/types/settings-search.type';export class SettingsSearchService {- private baseUrl = '/api/settings';+ private baseUrl = '/settings';async search(query: string): Promise<SettingsSearchResponse> {- const response = await axios.post<SettingsSearchResponse>(`${this.baseUrl}/search`, {+ const response = await apiClient.post<SettingsSearchResponse>(`${this.baseUrl}/search`, {query});return response.data;}async getCategories(): Promise<SettingsCategory[]> {- const response = await axios.get<SettingsCategory[]>(`${this.baseUrl}/categories`);+ const response = await apiClient.get<SettingsCategory[]>(`${this.baseUrl}/categories`);return response.data;}}diff --git a/frontend/src/lib/services/version-service.ts b/frontend/src/lib/services/version-service.tsindex 1986b388c..63b29e6c0 100644--- a/frontend/src/lib/services/version-service.ts+++ b/frontend/src/lib/services/version-service.ts@@ -1,5 +1,5 @@import { version as currentVersion } from '$app/environment';-import axios from 'axios';+import { apiClient } from './api-service';import type { AppVersionInformation } from '$lib/types/application-configuration';function getCurrentVersion() {@@ -8,7 +8,7 @@ function getCurrentVersion() {async function getVersionInformation(): Promise<AppVersionInformation> {try {- const res = await axios.get('/api/app-version', {+ const res = await apiClient.get('/app-version', {timeout: 2000});const data = res.data as {diff --git a/frontend/src/lib/utils/page-load-error.util.ts b/frontend/src/lib/utils/page-load-error.util.tsindex d3b2539f8..417c7aeaf 100644--- a/frontend/src/lib/utils/page-load-error.util.ts+++ b/frontend/src/lib/utils/page-load-error.util.ts@@ -1,10 +1,13 @@import { error as kitError } from '@sveltejs/kit';-import { AxiosError } from 'axios';import { extractApiErrorMessage } from './api.util';export function extractApiErrorStatus(err: unknown, fallbackStatus = 500): number {- if (err instanceof AxiosError) {- return err.response?.status ?? fallbackStatus;+ if (err && typeof err === 'object') {+ const maybeResponse = (err as { response?: { status?: unknown } }).response;+ const responseStatus = maybeResponse?.status;+ if (typeof responseStatus === 'number' && Number.isFinite(responseStatus)) {+ return responseStatus;+ }}if (err && typeof err === 'object') {diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 8c3d9812b..ea075935f 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -128,9 +128,6 @@ importers:ansi-to-html:specifier: ^0.7.2version: 0.7.2- axios:- specifier: ^1.14.0- version: 1.14.0date-fns:specifier: ^4.1.0version: 4.1.0@@ -140,6 +137,9 @@ importers:js-yaml:specifier: ^4.1.1version: 4.1.1+ ky:+ specifier: ^1.12.0+ version: 1.14.3prettier:specifier: ^3.8.1version: 3.8.1@@ -2468,15 +2468,9 @@ packages:resolution: {integrity: sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==}- resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==}-resolution: {integrity: sha512-P4w9o2dqARji6P7MHprklbfiArZAWvo07yW7qs3pdljb3BWr12FIB7W+p0zJiuiVsUpRO0iZn1kFFcpPegg0tQ==}- resolution: {integrity: sha512-3Y8yrqLSwjuzpXuZ0oIYZ/XGgLwUIBU3uLvbcpb0pidD9ctpShJd43KSlEEkVQg6DS0G9NKyzOvBfUtDKEyHvQ==}-resolution: {integrity: sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==}engines: {node: '>= 0.4'}@@ -2515,10 +2509,6 @@ packages:resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==}- resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==}- engines: {node: '>= 0.4'}-resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==}engines: {node: '>=6'}@@ -2580,10 +2570,6 @@ packages:resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==}- resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==}- engines: {node: '>= 0.8'}-resolution: {integrity: sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==}engines: {node: '>=16'}@@ -2730,10 +2716,6 @@ packages:resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==}engines: {node: '>=0.10.0'}- resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==}- engines: {node: '>=0.4.0'}-resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==}engines: {node: '>=6'}@@ -2768,10 +2750,6 @@ packages:resolution: {integrity: sha512-MVUtAugQMOff5RnBy2d9N31iG0lNwg1qAoAOn7pOK5wf94WIaE3My2p3uwTQuvS2AcqchkcR3bHByjaM0mmi7Q==}engines: {node: '>=20'}- resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==}- engines: {node: '>= 0.4'}-resolution: {integrity: sha512-PPN80qRokCd1f015IANNhrwOnLO7GrrMQfk4/lnZRE/8j7UPWrNNjPV0uBrZutI/nHzernbW+J0hdqQysHiSnQ==}@@ -2822,22 +2800,6 @@ packages:resolution: {integrity: sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==}engines: {node: '>=18'}- resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==}- engines: {node: '>= 0.4'}-- resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==}- engines: {node: '>= 0.4'}-- resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==}- engines: {node: '>= 0.4'}-- resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==}- engines: {node: '>= 0.4'}-resolution: {integrity: sha512-9RiGKvCwaqxO2owP61uQ4BgNborAQskMR6QusfWzQqv7AZOg5oGehdY2pRJMTKuwxd1IDBP4rSbI5lHzU7SMsQ==}engines: {node: '>=18'}@@ -2971,19 +2933,6 @@ packages:resolution: {integrity: sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==}- resolution: {integrity: sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==}- engines: {node: '>=4.0'}- peerDependencies:- debug: '*'- peerDependenciesMeta:- debug:- optional: true-- resolution: {integrity: sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==}- engines: {node: '>= 6'}-resolution: {integrity: sha512-9XNj/o4wrRFyhSMJOvsuyMwy8aUfBaZ1VrqHVfohyXf0Sw0e+yfKG+xZaY3arGCOMdwFsqObtzVOc1gU9KiT9w==}engines: {node: '>=18.3.0'}@@ -3009,9 +2958,6 @@ packages:engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}os: [darwin]- resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==}-resolution: {integrity: sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q==}engines: {node: '>=18'}@@ -3020,14 +2966,6 @@ packages:resolution: {integrity: sha512-CQ+bEO+Tva/qlmw24dCejulK5pMzVnUOFOijVogd3KQs07HnRIgp8TGipvCCRT06xeYEbpbgwaCxglFyiuIcmA==}engines: {node: '>=18'}- resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==}- engines: {node: '>= 0.4'}-- resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==}- engines: {node: '>= 0.4'}-resolution: {integrity: sha512-1VKTZJCwBrvbd+Wn3AOgQP/2Av+TfTCOlE4AcRJE72W1ksZXbAx8PPBR9RzgTeSPzlPMHrbANMH3LbltH73wxQ==}@@ -3054,10 +2992,6 @@ packages:resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==}engines: {node: '>=18'}- resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==}- engines: {node: '>= 0.4'}-resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}@@ -3065,18 +2999,6 @@ packages:resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==}engines: {node: '>=8'}- resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==}- engines: {node: '>= 0.4'}-- resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==}- engines: {node: '>= 0.4'}-- resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==}- engines: {node: '>= 0.4'}-resolution: {integrity: sha512-COpmrF2NOg4TBWUJ5UVyaCU2A88wEMkUPK4hNqyCkqHbxT92BbvfjoSozkAIIm6XhicGlJHhFdullInrdhwU8Q==}@@ -3236,6 +3158,10 @@ packages:engines: {node: ^20.19.0 || >=22.12.0}hasBin: true+ resolution: {integrity: sha512-9zy9lkjac+TR1c2tG+mkNSVlyOpInnWdSMiue4F+kq8TwJSgv6o8jhLRg8Ho6SnZ9wOYUq/yozts9qQCfk7bIw==}+ engines: {node: '>=18'}+resolution: {integrity: sha512-SU3lgh0rPvq7upc6vvdVrCsSMUG1h3ChvHVOY7wJ2fw4C9QEB7X3d5eyYEyULUX7UQtxZJtZXGuT6U2US72UYA==}engines: {node: '>=20.0.0'}@@ -3375,10 +3301,6 @@ packages:engines: {node: '>= 18'}hasBin: true- resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==}- engines: {node: '>= 0.4'}-resolution: {integrity: sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ==}@@ -3683,10 +3605,6 @@ packages:resolution: {integrity: sha512-SVtmxhRE/CGkn3eZY1T6pC8Nln6Fr/lu1mKSgRud0eC73whjGfoAogbn78LkD8aFL0zz3bAFerKSnOl7NlErBA==}- resolution: {integrity: sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==}- engines: {node: '>=10'}-resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}engines: {node: '>=6'}@@ -6003,21 +5921,11 @@ snapshots:- [email protected]: {}-dependencies:stubborn-fs: 2.0.0when-exit: 2.1.5- dependencies:- follow-redirects: 1.15.11- form-data: 4.0.5- proxy-from-env: 2.1.0- transitivePeerDependencies:- - debug-@@ -6054,11 +5962,6 @@ snapshots:optional: true- dependencies:- es-errors: 1.3.0- function-bind: 1.1.2-@@ -6121,10 +6024,6 @@ snapshots:- dependencies:- delayed-stream: 1.0.0-@@ -6254,8 +6153,6 @@ snapshots:- [email protected]: {}-@@ -6291,12 +6188,6 @@ snapshots:dependencies:type-fest: 5.5.0- dependencies:- call-bind-apply-helpers: 1.0.2- es-errors: 1.3.0- gopd: 1.2.0-dependencies:'@standard-schema/spec': 1.1.0@@ -6351,21 +6242,6 @@ snapshots:- [email protected]: {}-- [email protected]: {}-- dependencies:- es-errors: 1.3.0-- dependencies:- es-errors: 1.3.0- get-intrinsic: 1.3.0- has-tostringtag: 1.0.2- hasown: 2.0.2-optionalDependencies:'@esbuild/aix-ppc64': 0.25.10@@ -6589,16 +6465,6 @@ snapshots:- [email protected]: {}-- dependencies:- asynckit: 0.4.0- combined-stream: 1.0.8- es-set-tostringtag: 2.1.0- hasown: 2.0.2- mime-types: 2.1.35-dependencies:fd-package-json: 2.0.0@@ -6619,30 +6485,10 @@ snapshots:optional: true- [email protected]: {}-- dependencies:- call-bind-apply-helpers: 1.0.2- es-define-property: 1.0.1- es-errors: 1.3.0- es-object-atoms: 1.1.1- function-bind: 1.1.2- get-proto: 1.0.1- gopd: 1.2.0- has-symbols: 1.1.0- hasown: 2.0.2- math-intrinsics: 1.1.0-- dependencies:- dunder-proto: 1.0.1- es-object-atoms: 1.1.1-dependencies:resolve-pkg-maps: 1.0.0@@ -6669,22 +6515,10 @@ snapshots:- [email protected]: {}-- [email protected]: {}-- dependencies:- has-symbols: 1.1.0-- dependencies:- function-bind: 1.1.2-@@ -6864,6 +6698,8 @@ snapshots:yaml: 2.8.3zod: 4.3.6+ [email protected]: {}+@@ -6985,8 +6821,6 @@ snapshots:- [email protected]: {}-@@ -7315,8 +7149,6 @@ snapshots:optional: true- [email protected]: {}-diff --git a/tests/spec/environment-settings.spec.ts b/tests/spec/environment-settings.spec.tsindex ca4621627..94deaafe1 100644--- a/tests/spec/environment-settings.spec.ts+++ b/tests/spec/environment-settings.spec.ts@@ -169,9 +169,6 @@ test.describe('Environment Settings UI', () => {const response = await responsePromise;expect(response.ok()).toBeTruthy();- const payload = response.request().postDataJSON() as Record<string, string>;- expect(payload.followProjectSymlinks).toBe(String(updatedChecked));-await page.reload();await page.getByRole('tab', { name: 'General', exact: true }).click();await expect(page.locator('#follow-project-symlinks')).toHaveAttribute(@@ -280,9 +277,6 @@ test.describe('Environment Settings UI', () => {const response = await responsePromise;expect(response.ok()).toBeTruthy();- const payload = response.request().postDataJSON() as Record<string, string>;- expect(payload.trivyPreserveCacheOnVolumePrune).toBe(String(updatedChecked));-await page.reload();await page.getByRole('tab', { name: 'Security', exact: true }).click();await expect(page.locator('#trivyPreserveCacheOnVolumePruneSwitch')).toHaveAttribute(@@ -332,9 +326,6 @@ test.describe('Environment Settings UI', () => {const response = await responsePromise;expect(response.ok()).toBeTruthy();- const payload = response.request().postDataJSON() as Record<string, string>;- expect(payload.trivyNetwork).toBe(updatedValue === 'Auto' ? '' : updatedValue);-await page.reload();await page.getByRole('tab', { name: 'Security', exact: true }).click();await expect(page.locator('#trivyNetwork')).toContainText(updatedValue);diff --git a/tests/spec/token-refresh.spec.ts b/tests/spec/token-refresh.spec.tsindex fed083f61..18ab2b907 100644--- a/tests/spec/token-refresh.spec.ts+++ b/tests/spec/token-refresh.spec.ts@@ -124,7 +124,6 @@ test.describe('Token refresh behaviour', () => {});});- // Force a protected data endpoint to 401 so the axios interceptor always runs refresh logic.await injectExpired401Always(page, /\/api\/environments\/[^/]+\/containers(?:\/.*)?$/);// Keep /auth/me unauthenticated too so the login page does not immediately bounce back.await injectExpired401Always(page, /\/api\/auth\/me$/);