devDeps: Manually bump msw from 2.4.10 to 2.6.0

This bumps bump msw from 2.4.10 to 2.6.0
This commit is contained in:
regexowl 2024-11-04 13:39:49 +01:00 committed by Klara Simickova
parent c2926ff147
commit b83ee20541
3 changed files with 63 additions and 70 deletions

View file

@ -8,8 +8,8 @@
* - Please do NOT serve this file on production.
*/
const PACKAGE_VERSION = '2.4.10'
const INTEGRITY_CHECKSUM = '26357c79639bfa20d64c0efca2a87423'
const PACKAGE_VERSION = '2.6.0'
const INTEGRITY_CHECKSUM = '07a8241b182f8a246a7cd39894799a9e'
const IS_MOCKED_RESPONSE = Symbol('isMockedResponse')
const activeClientIds = new Set()
@ -62,7 +62,12 @@ self.addEventListener('message', async function (event) {
sendToClient(client, {
type: 'MOCKING_ENABLED',
payload: true,
payload: {
client: {
id: client.id,
frameType: client.frameType,
},
},
})
break
}
@ -155,6 +160,10 @@ async function handleRequest(event, requestId) {
async function resolveMainClient(event) {
const client = await self.clients.get(event.clientId)
if (activeClientIds.has(event.clientId)) {
return client
}
if (client?.frameType === 'top-level') {
return client
}