Skip to content

Commit 5ecf556

Browse files
committed
fix merge conflict
regenerate package lock with npm i due to `Reason: Cannot find module @rollup/rollup-linux-x64-gnu. npm has a bug related to optional dependencies (npm/cli#4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.`
1 parent 02b8723 commit 5ecf556

File tree

5 files changed

+494
-564
lines changed

5 files changed

+494
-564
lines changed

Cargo.lock

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -34,38 +34,6 @@ broken_intra_doc_links = "deny"
3434
[workspace.dependencies]
3535

3636
# Workspace crates
37-
<<<<<<< HEAD
38-
mas-axum-utils = { path = "./crates/axum-utils/", version = "=1.0.0" }
39-
mas-cli = { path = "./crates/cli/", version = "=1.0.0" }
40-
mas-config = { path = "./crates/config/", version = "=1.0.0" }
41-
mas-context = { path = "./crates/context/", version = "=1.0.0" }
42-
mas-data-model = { path = "./crates/data-model/", version = "=1.0.0" }
43-
mas-email = { path = "./crates/email/", version = "=1.0.0" }
44-
mas-graphql = { path = "./crates/graphql/", version = "=1.0.0" }
45-
mas-handlers = { path = "./crates/handlers/", version = "=1.0.0" }
46-
mas-http = { path = "./crates/http/", version = "=1.0.0" }
47-
mas-i18n = { path = "./crates/i18n/", version = "=1.0.0" }
48-
mas-i18n-scan = { path = "./crates/i18n-scan/", version = "=1.0.0" }
49-
mas-iana = { path = "./crates/iana/", version = "=1.0.0" }
50-
mas-iana-codegen = { path = "./crates/iana-codegen/", version = "=1.0.0" }
51-
mas-jose = { path = "./crates/jose/", version = "=1.0.0" }
52-
mas-keystore = { path = "./crates/keystore/", version = "=1.0.0" }
53-
mas-listener = { path = "./crates/listener/", version = "=1.0.0" }
54-
mas-matrix = { path = "./crates/matrix/", version = "=1.0.0" }
55-
mas-matrix-synapse = { path = "./crates/matrix-synapse/", version = "=1.0.0" }
56-
mas-oidc-client = { path = "./crates/oidc-client/", version = "=1.0.0" }
57-
mas-policy = { path = "./crates/policy/", version = "=1.0.0" }
58-
mas-router = { path = "./crates/router/", version = "=1.0.0" }
59-
mas-spa = { path = "./crates/spa/", version = "=1.0.0" }
60-
mas-storage = { path = "./crates/storage/", version = "=1.0.0" }
61-
mas-storage-pg = { path = "./crates/storage-pg/", version = "=1.0.0" }
62-
mas-tasks = { path = "./crates/tasks/", version = "=1.0.0" }
63-
mas-templates = { path = "./crates/templates/", version = "=1.0.0" }
64-
mas-tower = { path = "./crates/tower/", version = "=1.0.0" }
65-
oauth2-types = { path = "./crates/oauth2-types/", version = "=1.0.0" }
66-
syn2mas = { path = "./crates/syn2mas", version = "=1.0.0" }
67-
tchap = { path = "./crates/tchap", version = "=0.1.0" }
68-
=======
6937
mas-axum-utils = { path = "./crates/axum-utils/", version = "=1.2.0" }
7038
mas-cli = { path = "./crates/cli/", version = "=1.2.0" }
7139
mas-config = { path = "./crates/config/", version = "=1.2.0" }
@@ -95,7 +63,9 @@ mas-templates = { path = "./crates/templates/", version = "=1.2.0" }
9563
mas-tower = { path = "./crates/tower/", version = "=1.2.0" }
9664
oauth2-types = { path = "./crates/oauth2-types/", version = "=1.2.0" }
9765
syn2mas = { path = "./crates/syn2mas", version = "=1.2.0" }
98-
>>>>>>> v1.2.0
66+
#:tchap:
67+
tchap = { path = "./crates/tchap", version = "=0.1.0" }
68+
#:tchap:
9969

10070
# OpenAPI schema generation and validation
10171
[workspace.dependencies.aide]

frontend/.storybook/public/mockServiceWorker.js

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
* - Please do NOT modify this file.
88
*/
99

10-
const PACKAGE_VERSION = '2.11.1'
11-
const INTEGRITY_CHECKSUM = 'f5825c521429caf22a4dd13b66e243af'
10+
const PACKAGE_VERSION = '2.11.2'
11+
const INTEGRITY_CHECKSUM = '4db4a41e972cec1b64cc569c66952d82'
1212
const IS_MOCKED_RESPONSE = Symbol('isMockedResponse')
1313
const activeClientIds = new Set()
1414

@@ -71,11 +71,6 @@ addEventListener('message', async function (event) {
7171
break
7272
}
7373

74-
case 'MOCK_DEACTIVATE': {
75-
activeClientIds.delete(clientId)
76-
break
77-
}
78-
7974
case 'CLIENT_CLOSED': {
8075
activeClientIds.delete(clientId)
8176

@@ -94,6 +89,8 @@ addEventListener('message', async function (event) {
9489
})
9590

9691
addEventListener('fetch', function (event) {
92+
const requestInterceptedAt = Date.now()
93+
9794
// Bypass navigation requests.
9895
if (event.request.mode === 'navigate') {
9996
return
@@ -110,23 +107,29 @@ addEventListener('fetch', function (event) {
110107

111108
// Bypass all requests when there are no active clients.
112109
// Prevents the self-unregistered worked from handling requests
113-
// after it's been deleted (still remains active until the next reload).
110+
// after it's been terminated (still remains active until the next reload).
114111
if (activeClientIds.size === 0) {
115112
return
116113
}
117114

118115
const requestId = crypto.randomUUID()
119-
event.respondWith(handleRequest(event, requestId))
116+
event.respondWith(handleRequest(event, requestId, requestInterceptedAt))
120117
})
121118

122119
/**
123120
* @param {FetchEvent} event
124121
* @param {string} requestId
122+
* @param {number} requestInterceptedAt
125123
*/
126-
async function handleRequest(event, requestId) {
124+
async function handleRequest(event, requestId, requestInterceptedAt) {
127125
const client = await resolveMainClient(event)
128126
const requestCloneForEvents = event.request.clone()
129-
const response = await getResponse(event, client, requestId)
127+
const response = await getResponse(
128+
event,
129+
client,
130+
requestId,
131+
requestInterceptedAt,
132+
)
130133

131134
// Send back the response clone for the "response:*" life-cycle events.
132135
// Ensure MSW is active and ready to handle the message, otherwise
@@ -204,7 +207,7 @@ async function resolveMainClient(event) {
204207
* @param {string} requestId
205208
* @returns {Promise<Response>}
206209
*/
207-
async function getResponse(event, client, requestId) {
210+
async function getResponse(event, client, requestId, requestInterceptedAt) {
208211
// Clone the request because it might've been already used
209212
// (i.e. its body has been read and sent to the client).
210213
const requestClone = event.request.clone()
@@ -255,6 +258,7 @@ async function getResponse(event, client, requestId) {
255258
type: 'REQUEST',
256259
payload: {
257260
id: requestId,
261+
interceptedAt: requestInterceptedAt,
258262
...serializedRequest,
259263
},
260264
},

0 commit comments

Comments
 (0)