feat: upgrade dependencies and lockfile (#5016)

- Close https://github.com/toeverything/AFFiNE/security/dependabot/47
This commit is contained in:
LongYinan
2023-11-23 05:18:05 +00:00
parent 4c8d54b3a7
commit 3499dbbb7f
40 changed files with 5090 additions and 4594 deletions

View File

@@ -1,3 +1,5 @@
import type { Request } from 'undici-types';
// cSpell:ignore Tolgee
const TOLGEE_API_KEY = process.env['TOLGEE_API_KEY'];
const TOLGEE_API_URL = 'https://i18n.affine.pro';
@@ -15,7 +17,7 @@ const withTolgee = (
'Content-Type': 'application/json',
});
const isRequest = (input: RequestInfo | URL): input is Request => {
const isRequest = (input: NodeJS.fetch.RequestInfo): input is Request => {
return typeof input === 'object' && !('href' in input);
};
@@ -31,6 +33,7 @@ const withTolgee = (
argArray[0] = {
...argArray[0],
url: `${baseUrl}${argArray[0].url}`,
// @ts-expect-error Node.js types incorrectly define RequestInit
headers,
};
}