1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +02:00

chore(dependencies): upgrade msw to fix xmldom CVE (#8362)

* chore(dependencies): upgrade msw to fix xmldom CVE

* refactor(msw): rename msw DefaultRequestBody to DefaultBodyType
This commit is contained in:
LP B 2023-01-23 14:03:11 +01:00 committed by GitHub
parent eff6ec9df9
commit a74e389521
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 197 additions and 77 deletions

View file

@ -1,4 +1,4 @@
import { DefaultRequestBody, PathParams, rest } from 'msw';
import { DefaultBodyType, PathParams, rest } from 'msw';
import {
Edition,
@ -72,7 +72,7 @@ export const handlers = [
tags.push(tag);
return res(ctx.json(tag));
}),
rest.get<DefaultRequestBody, PathParams, Partial<PublicSettingsResponse>>(
rest.get<DefaultBodyType, PathParams, Partial<PublicSettingsResponse>>(
'/api/settings/public',
(req, res, ctx) =>
res(
@ -87,7 +87,7 @@ export const handlers = [
})
)
),
rest.get<DefaultRequestBody, PathParams, Partial<StatusResponse>>(
rest.get<DefaultBodyType, PathParams, Partial<StatusResponse>>(
'/api/status',
(req, res, ctx) => res(ctx.json({}))
),

View file

@ -1,4 +1,4 @@
import { DefaultRequestBody, PathParams, rest } from 'msw';
import { DefaultBodyType, PathParams, rest } from 'msw';
import {
InfoResponse,
@ -6,11 +6,11 @@ import {
} from '@/docker/services/system.service';
export const dockerHandlers = [
rest.get<DefaultRequestBody, PathParams, InfoResponse>(
rest.get<DefaultBodyType, PathParams, InfoResponse>(
'/api/endpoints/:endpointId/docker/info',
(req, res, ctx) => res(ctx.json({}))
),
rest.get<DefaultRequestBody, PathParams, VersionResponse>(
rest.get<DefaultBodyType, PathParams, VersionResponse>(
'/api/endpoints/:endpointId/docker/version',
(req, res, ctx) => res(ctx.json({ ApiVersion: '1.24' }))
),

View file

@ -1,4 +1,4 @@
import { DefaultRequestBody, PathParams, rest } from 'msw';
import { DefaultBodyType, PathParams, rest } from 'msw';
import { TeamMembership } from '@/react/portainer/users/teams/types';
import { createMockUsers } from '@/react-tools/test-mocks';
@ -7,7 +7,7 @@ export const userHandlers = [
rest.get('/api/users', async (req, res, ctx) =>
res(ctx.json(createMockUsers(10)))
),
rest.get<DefaultRequestBody, PathParams, TeamMembership[]>(
rest.get<DefaultBodyType, PathParams, TeamMembership[]>(
'/api/users/:userId/memberships',
(req, res, ctx) => res(ctx.json([]))
),