From 1a18977e714d5be22df291ac1f9266213302613f Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Sat, 30 Nov 2024 14:27:22 +0100
Subject: [PATCH] chore(deps): lock file maintenance (#165)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Fabian Meyer <3982806+meyfa@users.noreply.github.com>
---
integration/backend/auth/local.test.ts | 8 +-
integration/backend/auth/logout.test.ts | 4 +-
integration/backend/auth/me.test.ts | 2 +-
integration/backend/auth/strategies.test.ts | 4 +-
integration/backend/trigger.test.ts | 2 +-
integration/frontend.test.ts | 12 +-
package-lock.json | 822 +++++++++++++++-----
7 files changed, 632 insertions(+), 222 deletions(-)
diff --git a/integration/backend/auth/local.test.ts b/integration/backend/auth/local.test.ts
index 69e3510..a6ee339 100644
--- a/integration/backend/auth/local.test.ts
+++ b/integration/backend/auth/local.test.ts
@@ -9,7 +9,7 @@ describe('/api/auth/local', () => {
const response = await fetch(`${origin}/api/auth/local`, { method: 'POST' })
assert.strictEqual(response.status, 404)
- assert.strictEqual(response.headers.get('Content-Type'), 'application/json; charset=utf-8')
+ assert.strictEqual(response.headers.get('Content-Type')?.toLowerCase(), 'application/json; charset=utf-8')
assert.deepStrictEqual(await response.json(), { error: 'Not Found' })
})
@@ -45,7 +45,7 @@ describe('/api/auth/local', () => {
})
assert.strictEqual(response.status, 400)
// TODO respond with JSON instead of plain text
- assert.strictEqual(response.headers.get('Content-Type'), 'text/plain; charset=utf-8')
+ assert.strictEqual(response.headers.get('Content-Type')?.toLowerCase(), 'text/plain; charset=utf-8')
assert.strictEqual(await response.text(), 'Bad Request')
}
})
@@ -82,7 +82,7 @@ describe('/api/auth/local', () => {
})
assert.strictEqual(response.status, 401)
// TODO respond with JSON instead of plain text
- assert.strictEqual(response.headers.get('Content-Type'), 'text/plain; charset=utf-8')
+ assert.strictEqual(response.headers.get('Content-Type')?.toLowerCase(), 'text/plain; charset=utf-8')
assert.deepStrictEqual(await response.text(), 'Unauthorized')
}
})
@@ -110,7 +110,7 @@ describe('/api/auth/local', () => {
body: '{"username":"test-user","password":"test-password"}'
})
assert.strictEqual(response.status, 200)
- assert.strictEqual(response.headers.get('Content-Type'), 'application/json; charset=utf-8')
+ assert.strictEqual(response.headers.get('Content-Type')?.toLowerCase(), 'application/json; charset=utf-8')
// TODO set SameSite=Strict
const setCookie = response.headers.getSetCookie()
assert.ok(setCookie.length === 1)
diff --git a/integration/backend/auth/logout.test.ts b/integration/backend/auth/logout.test.ts
index a6b0229..538ad50 100644
--- a/integration/backend/auth/logout.test.ts
+++ b/integration/backend/auth/logout.test.ts
@@ -10,7 +10,7 @@ describe('/api/auth/logout', () => {
// Note: This sets a cookie, but its contents indicate a missing session.
const response = await fetch(`${origin}/api/auth/logout`, { method: 'POST' })
assert.strictEqual(response.status, 200)
- assert.strictEqual(response.headers.get('Content-Type'), 'application/json; charset=utf-8')
+ assert.strictEqual(response.headers.get('Content-Type')?.toLowerCase(), 'application/json; charset=utf-8')
// TODO set SameSite=Strict
const setCookie = response.headers.getSetCookie()
assert.ok(setCookie.length === 1)
@@ -63,7 +63,7 @@ describe('/api/auth/logout', () => {
headers: { Cookie: `session=${session}` }
})
assert.strictEqual(logoutResponse.status, 200)
- assert.strictEqual(logoutResponse.headers.get('Content-Type'), 'application/json; charset=utf-8')
+ assert.strictEqual(logoutResponse.headers.get('Content-Type')?.toLowerCase(), 'application/json; charset=utf-8')
// TODO set SameSite=Strict
const setCookie = logoutResponse.headers.getSetCookie()
assert.ok(setCookie.length === 1)
diff --git a/integration/backend/auth/me.test.ts b/integration/backend/auth/me.test.ts
index ea6c289..db0ebee 100644
--- a/integration/backend/auth/me.test.ts
+++ b/integration/backend/auth/me.test.ts
@@ -9,7 +9,7 @@ describe('/api/auth/me', () => {
const response = await fetch(`${origin}/api/auth/me`, { method: 'GET' })
assert.strictEqual(response.status, 403)
- assert.strictEqual(response.headers.get('Content-Type'), 'application/json; charset=utf-8')
+ assert.strictEqual(response.headers.get('Content-Type')?.toLowerCase(), 'application/json; charset=utf-8')
assert.deepStrictEqual(await response.json(), { error: 'Forbidden' })
})
})
diff --git a/integration/backend/auth/strategies.test.ts b/integration/backend/auth/strategies.test.ts
index 4caa54e..7a75199 100644
--- a/integration/backend/auth/strategies.test.ts
+++ b/integration/backend/auth/strategies.test.ts
@@ -9,7 +9,7 @@ describe('/api/auth/strategies', () => {
const response = await fetch(`${origin}/api/auth/strategies`, { method: 'GET' })
assert.strictEqual(response.status, 200)
- assert.strictEqual(response.headers.get('Content-Type'), 'application/json; charset=utf-8')
+ assert.strictEqual(response.headers.get('Content-Type')?.toLowerCase(), 'application/json; charset=utf-8')
const strategies = await response.json()
assert.deepStrictEqual(strategies, [])
@@ -34,7 +34,7 @@ describe('/api/auth/strategies', () => {
const response = await fetch(`${origin}/api/auth/strategies`, { method: 'GET' })
assert.strictEqual(response.status, 200)
- assert.strictEqual(response.headers.get('Content-Type'), 'application/json; charset=utf-8')
+ assert.strictEqual(response.headers.get('Content-Type')?.toLowerCase(), 'application/json; charset=utf-8')
const strategies = await response.json()
assert.deepStrictEqual(strategies, ['local'])
diff --git a/integration/backend/trigger.test.ts b/integration/backend/trigger.test.ts
index b4c2a61..555ec4b 100644
--- a/integration/backend/trigger.test.ts
+++ b/integration/backend/trigger.test.ts
@@ -9,7 +9,7 @@ describe('/api/trigger', () => {
const response = await fetch(`${origin}/api/trigger`, { method: 'POST' })
assert.strictEqual(response.status, 403)
- assert.strictEqual(response.headers.get('Content-Type'), 'application/json; charset=utf-8')
+ assert.strictEqual(response.headers.get('Content-Type')?.toLowerCase(), 'application/json; charset=utf-8')
assert.deepStrictEqual(await response.json(), { error: 'Forbidden' })
})
})
diff --git a/integration/frontend.test.ts b/integration/frontend.test.ts
index 3b1a017..01a4d70 100644
--- a/integration/frontend.test.ts
+++ b/integration/frontend.test.ts
@@ -16,12 +16,12 @@ describe('frontend', () => {
// should set proper headers
const { headers } = getResponse
- assert.strictEqual(headers.get('Content-Security-Policy'), "default-src 'self'; connect-src 'self'; frame-ancestors 'none'; base-uri 'self'; form-action 'self'")
+ assert.strictEqual(headers.get('Content-Security-Policy'), 'default-src \'self\'; connect-src \'self\'; frame-ancestors \'none\'; base-uri \'self\'; form-action \'self\'')
assert.strictEqual(headers.get('X-Frame-Options'), 'DENY')
assert.strictEqual(headers.get('X-Content-Type-Options'), 'nosniff')
assert.strictEqual(headers.get('Referrer-Policy'), 'no-referrer')
assert.strictEqual(headers.get('Cache-Control'), 'public, max-age=0')
- assert.strictEqual(headers.get('Content-Type'), 'text/html; charset=UTF-8')
+ assert.strictEqual(headers.get('Content-Type')?.toLowerCase(), 'text/html; charset=utf-8')
// should also respond to HEAD requests
const headResponse = await fetch(`${origin}${path}`, { method: 'HEAD' })
@@ -59,11 +59,11 @@ describe('frontend', () => {
const text = await response.text()
- const stylesheet = text.match(/]*\shref="([^"]+)"/i)
+ const stylesheet = /]*\shref="([^"]+)"/i.exec(text)
assert.ok(stylesheet)
assert.match(stylesheet[1], /^\/assets\/index-.+\.css$/)
- const script = text.match(/