From 837667d3424b333f911573d47763a4c7c3f17316 Mon Sep 17 00:00:00 2001
From: "elastic-renovate-prod[bot]"
<174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
Date: Thu, 27 Feb 2025 11:49:09 -0800
Subject: [PATCH] Update @elastic/kibana-cloud-security-posture dependencies
(main) (#208427)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This PR contains the following updates:
| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
| [@mswjs/http-middleware](https://mswjs.io)
([source](https://redirect.github.com/mswjs/http-middleware)) |
devDependencies | patch | [`0.10.1` ->
`0.10.3`](https://renovatebot.com/diffs/npm/@mswjs%2fhttp-middleware/0.10.1/0.10.3)
| |
| [msw](https://mswjs.io)
([source](https://redirect.github.com/mswjs/msw)) | devDependencies |
minor | [`~2.5.2` ->
`~2.7.0`](https://renovatebot.com/diffs/npm/msw/2.5.2/2.7.0) | `2.7.3`
(+2) |
---
### Release Notes
mswjs/http-middleware (@mswjs/http-middleware)
###
[`v0.10.3`](https://redirect.github.com/mswjs/http-middleware/releases/tag/v0.10.3)
[Compare
Source](https://redirect.github.com/mswjs/http-middleware/compare/v0.10.2...v0.10.3)
#### v0.10.3 (2025-01-12)
##### Bug Fixes
- remove unused `parserOptions`, fix handlers type
([#51](https://redirect.github.com/mswjs/http-middleware/issues/51))
([`372fd85`](https://redirect.github.com/mswjs/http-middleware/commit/372fd85464d3f90d2d8847cf0abe0c5e67aa9d4f))
[@vivekmiyani](https://redirect.github.com/vivekmiyani)
###
[`v0.10.2`](https://redirect.github.com/mswjs/http-middleware/releases/tag/v0.10.2)
[Compare
Source](https://redirect.github.com/mswjs/http-middleware/compare/v0.10.1...v0.10.2)
#### v0.10.2 (2024-10-25)
##### Bug Fixes
- consume undisturbed request stream as-is
([#39](https://redirect.github.com/mswjs/http-middleware/issues/39))
([`13cee76`](https://redirect.github.com/mswjs/http-middleware/commit/13cee76e5aa3cc0d4dd0067b34655214a786b61a))
[@c0per](https://redirect.github.com/c0per)
[@LeBenLeBen](https://redirect.github.com/LeBenLeBen)
[@kettanaito](https://redirect.github.com/kettanaito)
mswjs/msw (msw)
###
[`v2.7.0`](https://redirect.github.com/mswjs/msw/releases/tag/v2.7.0)
[Compare
Source](https://redirect.github.com/mswjs/msw/compare/v2.6.9...v2.7.0)
#### v2.7.0 (2024-12-17)
##### Features
- use `picocolors` instead of `chalk`
([#2377](https://redirect.github.com/mswjs/msw/issues/2377))
([`85bdd82`](https://redirect.github.com/mswjs/msw/commit/85bdd82dfe4cd3d514d7820dad3338b485084fbf))
[@Namchee](https://redirect.github.com/Namchee)
[@kettanaito](https://redirect.github.com/kettanaito)
###
[`v2.6.9`](https://redirect.github.com/mswjs/msw/releases/tag/v2.6.9)
[Compare
Source](https://redirect.github.com/mswjs/msw/compare/v2.6.8...v2.6.9)
#### v2.6.9 (2024-12-16)
##### Bug Fixes
- support `SharedArrayBuffer` in `HttpResponse.arrayBuffer`
([#2389](https://redirect.github.com/mswjs/msw/issues/2389))
([`41f00e1`](https://redirect.github.com/mswjs/msw/commit/41f00e1a67e21010ab9c1a46c8e92193b655f24a))
[@danilofuchs](https://redirect.github.com/danilofuchs)
[@kettanaito](https://redirect.github.com/kettanaito)
###
[`v2.6.8`](https://redirect.github.com/mswjs/msw/releases/tag/v2.6.8)
[Compare
Source](https://redirect.github.com/mswjs/msw/compare/v2.6.7...v2.6.8)
#### v2.6.8 (2024-12-07)
##### Bug Fixes
- **setupServer:** reapply interception after calling `server.listen()`
after `server.close()`
([#2383](https://redirect.github.com/mswjs/msw/issues/2383))
([`00da9ca`](https://redirect.github.com/mswjs/msw/commit/00da9cad4249b61732ee375d9dbefeb76028cc2b))
[@kettanaito](https://redirect.github.com/kettanaito)
###
[`v2.6.7`](https://redirect.github.com/mswjs/msw/releases/tag/v2.6.7)
[Compare
Source](https://redirect.github.com/mswjs/msw/compare/v2.6.6...v2.6.7)
#### v2.6.7 (2024-12-06)
##### Bug Fixes
- **setupWorker:** correctly delete internal `accept` header on
passthrough
([#2375](https://redirect.github.com/mswjs/msw/issues/2375))
([`3f40055`](https://redirect.github.com/mswjs/msw/commit/3f40055b1d3814da4b30e5eb7555e09b1084798c))
[@smouillour](https://redirect.github.com/smouillour)
[@kettanaito](https://redirect.github.com/kettanaito)
###
[`v2.6.6`](https://redirect.github.com/mswjs/msw/releases/tag/v2.6.6)
[Compare
Source](https://redirect.github.com/mswjs/msw/compare/v2.6.5...v2.6.6)
#### v2.6.6 (2024-11-22)
##### Bug Fixes
- **types:** support optional path parameters
([#2368](https://redirect.github.com/mswjs/msw/issues/2368))
([`3b7b776`](https://redirect.github.com/mswjs/msw/commit/3b7b776e8c0de341185df4686a895c24326748d3))
[@kettanaito](https://redirect.github.com/kettanaito)
###
[`v2.6.5`](https://redirect.github.com/mswjs/msw/releases/tag/v2.6.5)
[Compare
Source](https://redirect.github.com/mswjs/msw/compare/v2.6.4...v2.6.5)
#### v2.6.5 (2024-11-16)
##### Bug Fixes
- support non-configurable responses
([#2360](https://redirect.github.com/mswjs/msw/issues/2360))
([`5bf3e3b`](https://redirect.github.com/mswjs/msw/commit/5bf3e3bf5f9a6d32c79410c11abd539ec4c2ddc5))
[@kettanaito](https://redirect.github.com/kettanaito)
###
[`v2.6.4`](https://redirect.github.com/mswjs/msw/releases/tag/v2.6.4)
[Compare
Source](https://redirect.github.com/mswjs/msw/compare/v2.6.3...v2.6.4)
#### v2.6.4 (2024-11-10)
##### Bug Fixes
- prevent infinite loop when bypassing `sendBeacon()` requests
([#2353](https://redirect.github.com/mswjs/msw/issues/2353))
([`2fa98c3`](https://redirect.github.com/mswjs/msw/commit/2fa98c327acc51189f87789d9155c4ec57be2299))
[@kettanaito](https://redirect.github.com/kettanaito)
- remove the internal bypass request header before performing the
request as-is in Node.js
([#2353](https://redirect.github.com/mswjs/msw/issues/2353))
([`2fa98c3`](https://redirect.github.com/mswjs/msw/commit/2fa98c327acc51189f87789d9155c4ec57be2299))
[@kettanaito](https://redirect.github.com/kettanaito)
###
[`v2.6.3`](https://redirect.github.com/mswjs/msw/releases/tag/v2.6.3)
[Compare
Source](https://redirect.github.com/mswjs/msw/compare/v2.6.2...v2.6.3)
#### v2.6.3 (2024-11-10)
##### Bug Fixes
- **handleRequest:** remove `transformResponse` option
([#2351](https://redirect.github.com/mswjs/msw/issues/2351))
([`74c4a3a`](https://redirect.github.com/mswjs/msw/commit/74c4a3a89970bbfc498c812790daef13766dea72))
[@kettanaito](https://redirect.github.com/kettanaito)
###
[`v2.6.2`](https://redirect.github.com/mswjs/msw/releases/tag/v2.6.2)
[Compare
Source](https://redirect.github.com/mswjs/msw/compare/v2.6.1...v2.6.2)
#### v2.6.2 (2024-11-07)
##### Bug Fixes
- update `@bundled-es-modules/cookie` to 2.0.1
([#2312](https://redirect.github.com/mswjs/msw/issues/2312))
([`c134352`](https://redirect.github.com/mswjs/msw/commit/c134352e8206b91740247f4f196767ab8a8eb921))
[@kettanaito](https://redirect.github.com/kettanaito)
###
[`v2.6.1`](https://redirect.github.com/mswjs/msw/releases/tag/v2.6.1)
[Compare
Source](https://redirect.github.com/mswjs/msw/compare/v2.6.0...v2.6.1)
#### v2.6.1 (2024-11-06)
##### Bug Fixes
- prevent `instanceof` handler check failures between different MSW
versions
([#2349](https://redirect.github.com/mswjs/msw/issues/2349))
([`28d26bd`](https://redirect.github.com/mswjs/msw/commit/28d26bd7fa585d76f9ca69a67dfa70a234450ed9))
[@kettanaito](https://redirect.github.com/kettanaito)
###
[`v2.6.0`](https://redirect.github.com/mswjs/msw/releases/tag/v2.6.0)
[Compare
Source](https://redirect.github.com/mswjs/msw/compare/v2.5.2...v2.6.0)
#### v2.6.0 (2024-10-29)
##### Features
- support mocking WebSocket APIs
([#2011](https://redirect.github.com/mswjs/msw/issues/2011))
([`ae786f5`](https://redirect.github.com/mswjs/msw/commit/ae786f59eb86b3d08c0fa5183ffca90e32af6448))
[@kettanaito](https://redirect.github.com/kettanaito)
[@DanielleHuisman](https://redirect.github.com/DanielleHuisman)
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
â™» **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.
---
- [ ] If you want to rebase/retry this PR, check
this box
---
This PR has been generated by [Renovate
Bot](https://redirect.github.com/renovatebot/renovate).
---------
Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
Co-authored-by: Sean Rathier
Co-authored-by: seanrathier
---
package.json | 4 +--
.../cloud_security_posture/jest.config.js | 5 +++
.../cloud_security_posture/jest.setup.js | 22 +++++++++++++
.../public/test/mock_server/mock_server.ts | 1 -
yarn.lock | 33 ++++++++++---------
5 files changed, 46 insertions(+), 19 deletions(-)
create mode 100644 x-pack/solutions/security/plugins/cloud_security_posture/jest.setup.js
diff --git a/package.json b/package.json
index 5df3d78c9f330..793a76488191d 100644
--- a/package.json
+++ b/package.json
@@ -1539,7 +1539,7 @@
"@kbn/whereis-pkg-cli": "link:packages/kbn-whereis-pkg-cli",
"@kbn/yarn-lock-validator": "link:packages/kbn-yarn-lock-validator",
"@mapbox/vector-tile": "1.3.1",
- "@mswjs/http-middleware": "0.10.1",
+ "@mswjs/http-middleware": "0.10.3",
"@octokit/rest": "^21.1.1",
"@parcel/watcher": "^2.1.0",
"@playwright/test": "1.49.0",
@@ -1808,7 +1808,7 @@
"mochawesome-merge": "^4.3.0",
"mock-fs": "^5.1.2",
"ms-chromium-edge-driver": "^0.5.1",
- "msw": "~2.5.2",
+ "msw": "~2.7.0",
"mutation-observer": "^1.0.3",
"native-hdr-histogram": "^1.0.0",
"nock": "12.0.3",
diff --git a/x-pack/solutions/security/plugins/cloud_security_posture/jest.config.js b/x-pack/solutions/security/plugins/cloud_security_posture/jest.config.js
index 630c9292dd304..58ea68c679bf9 100644
--- a/x-pack/solutions/security/plugins/cloud_security_posture/jest.config.js
+++ b/x-pack/solutions/security/plugins/cloud_security_posture/jest.config.js
@@ -6,10 +6,15 @@
*/
/** @type {import('@jest/types').Config.InitialOptions} */
+
module.exports = {
preset: '@kbn/test',
rootDir: '../../../../..',
roots: ['/x-pack/solutions/security/plugins/cloud_security_posture'],
+ // setupFilesAfterEnv is a list of scripts that are executed after JSDOM is initialized.
+ setupFilesAfterEnv: [
+ '/x-pack/solutions/security/plugins/cloud_security_posture/jest.setup.js',
+ ],
coverageDirectory:
'/target/kibana-coverage/jest/x-pack/solutions/security/plugins/cloud_security_posture',
coverageReporters: ['text', 'html'],
diff --git a/x-pack/solutions/security/plugins/cloud_security_posture/jest.setup.js b/x-pack/solutions/security/plugins/cloud_security_posture/jest.setup.js
new file mode 100644
index 0000000000000..e43772b4f736c
--- /dev/null
+++ b/x-pack/solutions/security/plugins/cloud_security_posture/jest.setup.js
@@ -0,0 +1,22 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+// This is a fix for the BroadcastChannel API not being available in JSDOM.
+// This is a temporary workaround until JSDOM supports BroadcastChannel.
+// https://github.com/mswjs/data/issues/306
+// https://github.com/elastic/kibana/pull/208427
+class BroadcastChannelMock {
+ constructor() {
+ this.onmessage = null;
+ }
+ postMessage(data) {
+ if (this.onmessage) {
+ this.onmessage({ data });
+ }
+ }
+}
+global.BroadcastChannel = BroadcastChannelMock;
diff --git a/x-pack/solutions/security/plugins/cloud_security_posture/public/test/mock_server/mock_server.ts b/x-pack/solutions/security/plugins/cloud_security_posture/public/test/mock_server/mock_server.ts
index 1c5480f339a64..7fa2203bcdac5 100644
--- a/x-pack/solutions/security/plugins/cloud_security_posture/public/test/mock_server/mock_server.ts
+++ b/x-pack/solutions/security/plugins/cloud_security_posture/public/test/mock_server/mock_server.ts
@@ -17,7 +17,6 @@ import { CspClientPluginStartDeps } from '@kbn/cloud-security-posture';
import { defaultHandlers } from './handlers';
import { getMockDependencies } from '../fixtures/get_mock_dependencies';
import { MOCK_SERVER_LICENSING_INFO_URL } from './handlers/licensing.handlers.mock';
-
/**
* Mock the lastValueFrom function from rxjs to return the result of the promise instead of the Observable
* This is for simplifying the testing by avoiding the need to subscribe to the Observable while producing the same result
diff --git a/yarn.lock b/yarn.lock
index 52d689574db0a..61ac573bf1e21 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1962,7 +1962,7 @@
resolved "https://registry.yarnpkg.com/@bufbuild/protobuf/-/protobuf-1.2.1.tgz#f8b1fbbe79726a4eafa9772ddde147b57f85d177"
integrity sha512-cwwGvLGqvoaOZmoP5+i4v/rbW+rHkguvTehuZyM2p/xpmaNSdT2h3B7kHw33aiffv35t1XrYHIkdJSEkSEMJuA==
-"@bundled-es-modules/cookie@^2.0.0":
+"@bundled-es-modules/cookie@^2.0.1":
version "2.0.1"
resolved "https://registry.yarnpkg.com/@bundled-es-modules/cookie/-/cookie-2.0.1.tgz#b41376af6a06b3e32a15241d927b840a9b4de507"
integrity sha512-8o+5fRPLNbjbdGRRmJj3h6Hh1AQJf2dk3qQ/5ZFb+PXkRNiSoMGGUKlsgLfrxneb72axVJyIYji64E2+nNfYyw==
@@ -8582,18 +8582,18 @@
resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-win32-x64/-/msgpackr-extract-win32-x64-3.0.2.tgz#0f164b726869f71da3c594171df5ebc1c4b0a407"
integrity sha512-O+6Gs8UeDbyFpbSh2CPEz/UOrrdWPTBYNblZK5CxxLisYt4kGX3Sc+czffFonyjiGSq3jWLwJS/CCJc7tBr4sQ==
-"@mswjs/http-middleware@0.10.1":
- version "0.10.1"
- resolved "https://registry.yarnpkg.com/@mswjs/http-middleware/-/http-middleware-0.10.1.tgz#7ff38c5398ba01efe98e16a0da24d612ffd69ccc"
- integrity sha512-I58RDHXzwKjMjaSO7aV7X0zUzbAvUEEDYsL9+I6Ro0zF5LgjnNdpZoMufG/WoYEenhDCgv7K+HMpLxGuhlfjKA==
+"@mswjs/http-middleware@0.10.3":
+ version "0.10.3"
+ resolved "https://registry.yarnpkg.com/@mswjs/http-middleware/-/http-middleware-0.10.3.tgz#0c667558788489bdc787fc6695abe96a9476281c"
+ integrity sha512-6CoX9IivDF7hggORdA4vX6uz+pkY1urGQMhmviHmYya/0b4EXwmhaXlGLQG3G29heqb3qdjp61V0+E2xRtyR5A==
dependencies:
express "^4.18.2"
strict-event-emitter "^0.5.1"
-"@mswjs/interceptors@^0.36.5":
- version "0.36.5"
- resolved "https://registry.yarnpkg.com/@mswjs/interceptors/-/interceptors-0.36.5.tgz#c0fc6970a7a9f8c7b9f4c122dbab3827e4cc19a5"
- integrity sha512-aQ8WF5zQwOdcxLsxSEk9Jd01GgGb80xxqCaiDDlewhtwqpSm8MOvUHslwPydVirasdW09++NxDNNftm1vLY8yA==
+"@mswjs/interceptors@^0.37.0":
+ version "0.37.6"
+ resolved "https://registry.yarnpkg.com/@mswjs/interceptors/-/interceptors-0.37.6.tgz#2635319b7a81934e1ef1b5593ef7910347e2b761"
+ integrity sha512-wK+5pLK5XFmgtH3aQ2YVvA3HohS3xqV/OxuVOdNx9Wpnz7VE/fnC+e1A7ln6LFYeck7gOJ/dsZV6OLplOtAJ2w==
dependencies:
"@open-draft/deferred-promise" "^2.2.0"
"@open-draft/logger" "^0.3.0"
@@ -25248,25 +25248,26 @@ msgpackr@^1.9.9:
optionalDependencies:
msgpackr-extract "^3.0.2"
-msw@~2.5.2:
- version "2.5.2"
- resolved "https://registry.yarnpkg.com/msw/-/msw-2.5.2.tgz#dfce10b68dbabc2d5dafeb6d7fb82c3c7073a4d1"
- integrity sha512-eBsFgU30NYtrfC62XzS1rdAzFK+Br0zKU4ORqD9Qliq86362DWZyPiD6FLfMgy0Ktik83DPTXmqPMz2bqwmJdA==
+msw@~2.7.0:
+ version "2.7.3"
+ resolved "https://registry.yarnpkg.com/msw/-/msw-2.7.3.tgz#5ad569fae7c7cdb8be2eeba3d041c185600b25a0"
+ integrity sha512-+mycXv8l2fEAjFZ5sjrtjJDmm2ceKGjrNbBr1durRg6VkU9fNUE/gsmQ51hWbHqs+l35W1iM+ZsmOD9Fd6lspw==
dependencies:
- "@bundled-es-modules/cookie" "^2.0.0"
+ "@bundled-es-modules/cookie" "^2.0.1"
"@bundled-es-modules/statuses" "^1.0.1"
"@bundled-es-modules/tough-cookie" "^0.1.6"
"@inquirer/confirm" "^5.0.0"
- "@mswjs/interceptors" "^0.36.5"
+ "@mswjs/interceptors" "^0.37.0"
+ "@open-draft/deferred-promise" "^2.2.0"
"@open-draft/until" "^2.1.0"
"@types/cookie" "^0.6.0"
"@types/statuses" "^2.0.4"
- chalk "^4.1.2"
graphql "^16.8.1"
headers-polyfill "^4.0.2"
is-node-process "^1.2.0"
outvariant "^1.4.3"
path-to-regexp "^6.3.0"
+ picocolors "^1.1.1"
strict-event-emitter "^0.5.1"
type-fest "^4.26.1"
yargs "^17.7.2"