Brooooooklyn
81729703d9
chore(server): use native file-type implementation ( #6686 )
2024-04-29 04:46:26 +00:00
Brooooooklyn
fed2503782
refactor(server): rename @affine/storage to @affine/server-native ( #6682 )
...
- Close https://github.com/toeverything/AFFiNE/issues/6680
2024-04-29 02:14:20 +00:00
forehalo
3297486e31
fix(server): skip throttle for currentUser ( #6700 )
2024-04-25 09:45:31 +00:00
forehalo
e8bcb75602
fix(server): use post request to consume magic link token ( #6656 )
2024-04-22 07:15:26 +00:00
EYHN
5e243de392
feat(server): auto refresh session ( #6613 )
2024-04-19 07:00:12 +00:00
DarkSky
ccb3bed91e
feat: add blob upload support for copilot ( #6584 )
2024-04-17 14:05:38 +00:00
liuyi
e53d5e2e3d
chore(server): clean up throttler ( #6326 )
2024-04-17 16:32:26 +08:00
renovate
66231e0e41
chore: bump up oxlint version to v0.2.17 ( #5778 )
...
[](https://renovatebot.com )
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [oxlint](https://oxc-project.github.io ) ([source](https://togithub.com/oxc-project/oxc/tree/HEAD/npm/oxlint )) | [`0.2.14` -> `0.2.17`](https://renovatebot.com/diffs/npm/oxlint/0.2.14/0.2.17 ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) |
---
### Release Notes
<details>
<summary>oxc-project/oxc (oxlint)</summary>
### [`v0.2.17`](https://togithub.com/oxc-project/oxc/releases/tag/oxlint_v0.2.17 ): oxlint v0.2.17
[Compare Source](7066d55153...df11d10a22 )
##### What's Changed
- feat(linter): eslint-plugin-jest/prefer-lowercase-title by [@​eryue0220](https://togithub.com/eryue0220 ) in [https://github.com/oxc-project/oxc/pull/2911 ](https://togithub.com/oxc-project/oxc/pull/2911 )
- feat(linter): typescript-eslint/consistent-type-definitions by [@​todor-a](https://togithub.com/todor-a ) in [https://github.com/oxc-project/oxc/pull/2885 ](https://togithub.com/oxc-project/oxc/pull/2885 )
- fix(cli): fix `oxlint --format json` yields 0 files to lint by [@​Boshen](https://togithub.com/Boshen ) in [https://github.com/oxc-project/oxc/pull/2940 ](https://togithub.com/oxc-project/oxc/pull/2940 )
- fix(cli): if format is json do not print summary information ([#​2899](https://togithub.com/oxc-project/oxc/issues/2899 )) by [@​kalvenschraut](https://togithub.com/kalvenschraut ) in [https://github.com/oxc-project/oxc/pull/2925 ](https://togithub.com/oxc-project/oxc/pull/2925 )
- fix(linter): import/no-cycle ignore type-only imports by [@​JohnDaly](https://togithub.com/JohnDaly ) in [https://github.com/oxc-project/oxc/pull/2924 ](https://togithub.com/oxc-project/oxc/pull/2924 )
- refactor(semantic/jsdoc): Rework JSDoc struct for better Span handling by [@​leaysgur](https://togithub.com/leaysgur ) in [https://github.com/oxc-project/oxc/pull/2917 ](https://togithub.com/oxc-project/oxc/pull/2917 )
##### New Contributors
- [@​bradzacher](https://togithub.com/bradzacher ) made their first contribution in [https://github.com/oxc-project/oxc/pull/2938 ](https://togithub.com/oxc-project/oxc/pull/2938 )
**Full Changelog**: https://github.com/oxc-project/oxc/compare/oxlint_v0.2.16...oxlint_v0.2.17
### [`v0.2.16`](https://togithub.com/oxc-project/oxc/releases/tag/oxlint_v0.2.16 ): oxlint v0.2.16
[Compare Source](e7307ed23c...7066d55153 )
#### What's Changed
- feat(linter): [@​typescript-eslint/prefer-for-of](https://togithub.com/typescript-eslint/prefer-for-of ) by [@​charnog](https://togithub.com/charnog ) in [https://github.com/oxc-project/oxc/pull/2789 ](https://togithub.com/oxc-project/oxc/pull/2789 )
- feat(linter): Implement jsdoc/check-access by [@​leaysgur](https://togithub.com/leaysgur ) in [https://github.com/oxc-project/oxc/pull/2642 ](https://togithub.com/oxc-project/oxc/pull/2642 )
- feat(linter): Implement jsdoc/empty-tags by [@​leaysgur](https://togithub.com/leaysgur ) in [https://github.com/oxc-project/oxc/pull/2893 ](https://togithub.com/oxc-project/oxc/pull/2893 )
- feat(linter): eslint-plugin-jest/prefer-mock-promise-sorthand by [@​eryue0220](https://togithub.com/eryue0220 ) in [https://github.com/oxc-project/oxc/pull/2864 ](https://togithub.com/oxc-project/oxc/pull/2864 )
- feat(linter/import): Add `ignoreTypes` option for the `import/no-cycle` rule by [@​JohnDaly](https://togithub.com/JohnDaly ) in [https://github.com/oxc-project/oxc/pull/2905 ](https://togithub.com/oxc-project/oxc/pull/2905 )
- fix(ast): `FinallyClause` won't get visited as `BlockStatement` anymore. by [@​rzvxa](https://togithub.com/rzvxa ) in [https://github.com/oxc-project/oxc/pull/2881 ](https://togithub.com/oxc-project/oxc/pull/2881 )
- fix(linter): handle self closing script tags in astro partial loader ([#​2017](https://togithub.com/oxc-project/oxc/issues/2017 )) by [@​kalvenschraut](https://togithub.com/kalvenschraut ) in [https://github.com/oxc-project/oxc/pull/2907 ](https://togithub.com/oxc-project/oxc/pull/2907 )
- fix(linter): svelte partial loader handle generics ([#​2875](https://togithub.com/oxc-project/oxc/issues/2875 )) by [@​kalvenschraut](https://togithub.com/kalvenschraut ) in [https://github.com/oxc-project/oxc/pull/2906 ](https://togithub.com/oxc-project/oxc/pull/2906 )
#### New Contributors
- [@​charnog](https://togithub.com/charnog ) made their first contribution in [https://github.com/oxc-project/oxc/pull/2789 ](https://togithub.com/oxc-project/oxc/pull/2789 )
- [@​kalvenschraut](https://togithub.com/kalvenschraut ) made their first contribution in [https://github.com/oxc-project/oxc/pull/2906 ](https://togithub.com/oxc-project/oxc/pull/2906 )
- [@​JohnDaly](https://togithub.com/JohnDaly ) made their first contribution in [https://github.com/oxc-project/oxc/pull/2905 ](https://togithub.com/oxc-project/oxc/pull/2905 )
**Full Changelog**: https://github.com/oxc-project/oxc/compare/oxlint_v0.2.15...oxlint_v0.2.16
### [`v0.2.15`](https://togithub.com/oxc-project/oxc/releases/tag/oxlint_v0.2.15 ): oxlint v0.2.15
[Compare Source](b1343d7bcb...e7307ed23c )
#### What's Changed
- feat(linter): default_param_last by [@​JoSeBu1](https://togithub.com/JoSeBu1 ) in [https://github.com/oxc-project/oxc/pull/2756 ](https://togithub.com/oxc-project/oxc/pull/2756 )
- feat(linter): eslint-plugin-jest/no-untyped-mock-factory by [@​eryue0220](https://togithub.com/eryue0220 ) in [https://github.com/oxc-project/oxc/pull/2807 ](https://togithub.com/oxc-project/oxc/pull/2807 )
- feat(linter): eslint-plugin-jest/prefer-comparison-matcher by [@​eryue0220](https://togithub.com/eryue0220 ) in [https://github.com/oxc-project/oxc/pull/2806 ](https://togithub.com/oxc-project/oxc/pull/2806 )
- feat(linter): eslint-plugin-react checked-requires-onchange-or-readonly by [@​keita-hino](https://togithub.com/keita-hino ) in [https://github.com/oxc-project/oxc/pull/2754 ](https://togithub.com/oxc-project/oxc/pull/2754 )
- feat(linter): eslint/no-iterator by [@​JoSeBu1](https://togithub.com/JoSeBu1 ) in [https://github.com/oxc-project/oxc/pull/2758 ](https://togithub.com/oxc-project/oxc/pull/2758 )
- feat(linter): fallback to the default tsconfig path by [@​Dunqing](https://togithub.com/Dunqing ) in [https://github.com/oxc-project/oxc/pull/2842 ](https://togithub.com/oxc-project/oxc/pull/2842 )
- feat(linter): no_script_url by [@​JoSeBu1](https://togithub.com/JoSeBu1 ) in [https://github.com/oxc-project/oxc/pull/2761 ](https://togithub.com/oxc-project/oxc/pull/2761 )
- feat(linter/import) check deep namespace in namespace rule by [@​Dunqing](https://togithub.com/Dunqing ) in [https://github.com/oxc-project/oxc/pull/2805 ](https://togithub.com/oxc-project/oxc/pull/2805 )
- feat(linter/import) check module import in no_duplicates by [@​Dunqing](https://togithub.com/Dunqing ) in [https://github.com/oxc-project/oxc/pull/2771 ](https://togithub.com/oxc-project/oxc/pull/2771 )
- feat(linter/import) check type import in no_duplicates by [@​Dunqing](https://togithub.com/Dunqing ) in [https://github.com/oxc-project/oxc/pull/2777 ](https://togithub.com/oxc-project/oxc/pull/2777 )
- feat(linter/import) support allow_computed option in namespace by [@​Dunqing](https://togithub.com/Dunqing ) in [https://github.com/oxc-project/oxc/pull/2840 ](https://togithub.com/oxc-project/oxc/pull/2840 )
- feat(linter/import) support check re-export in named by [@​Dunqing](https://togithub.com/Dunqing ) in [https://github.com/oxc-project/oxc/pull/2769 ](https://togithub.com/oxc-project/oxc/pull/2769 )
- feat(linter/import): ignore type-only imports and exports in no_unresolved by [@​Dunqing](https://togithub.com/Dunqing ) in [https://github.com/oxc-project/oxc/pull/2849 ](https://togithub.com/oxc-project/oxc/pull/2849 )
- fix(linter/import): false positive for indirect export in namespace by [@​Dunqing](https://togithub.com/Dunqing ) in [https://github.com/oxc-project/oxc/pull/2862 ](https://togithub.com/oxc-project/oxc/pull/2862 )
- fix(linter/import): ignore export declaration in no-duplicates by [@​Dunqing](https://togithub.com/Dunqing ) in [https://github.com/oxc-project/oxc/pull/2863 ](https://togithub.com/oxc-project/oxc/pull/2863 )
- fix(linter/max-lines): only report codes that exceed the line limit by [@​mysteryven](https://togithub.com/mysteryven ) in [https://github.com/oxc-project/oxc/pull/2778 ](https://togithub.com/oxc-project/oxc/pull/2778 )
- fix(parser): add support for empty module declaration by [@​rzvxa](https://togithub.com/rzvxa ) in [https://github.com/oxc-project/oxc/pull/2834 ](https://togithub.com/oxc-project/oxc/pull/2834 )
#### New Contributors
- [@​rzvxa](https://togithub.com/rzvxa ) made their first contribution in [https://github.com/oxc-project/oxc/pull/2764 ](https://togithub.com/oxc-project/oxc/pull/2764 )
**Full Changelog**: https://github.com/oxc-project/oxc/compare/oxlint_v0.2.14...oxlint_v0.2.15
</details>
---
### 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.
🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
---
This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/ ). View repository job log [here](https://developer.mend.io/github/toeverything/AFFiNE ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNTMuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2024-04-11 10:51:02 +00:00
EYHN
366e0a4b60
feat(server): adjust telemetry config ( #6424 )
2024-04-02 03:44:48 +00:00
fundon
8ee9f6ec05
chore: improve password error message ( #6255 )
...
chore: improve error message
chore: add password minlength & maxlength i18n
chore: check max length
fix: i18n variables
feat: add CredentialsRequirementType
2024-03-26 07:15:06 +00:00
forehalo
1a1af83375
test(server): auth tests ( #6135 )
2024-03-26 02:24:17 +00:00
EYHN
f2adbdaba4
style: enable import-x/no-duplicates ( #6279 )
2024-03-25 03:55:33 +00:00
EYHN
2b42a75e5a
style: enable rxjs/finnish ( #6276 )
...
chore(infra): use finnish notation for observables
do rename
2024-03-24 17:04:51 +00:00
Brooooooklyn
150c22936d
chore(core): add mixpanel track ( #6202 )
2024-03-22 09:24:41 +00:00
forehalo
540e456704
ci: set private key from env ( #6239 )
2024-03-21 10:09:26 +00:00
DarkSky
da32682afb
fix(server): handle expired lock re-release & external locker injection ( #6145 )
2024-03-19 02:16:47 +00:00
liuyi
4702c1a9ca
fix(server): inject correct locker to request scope mutex ( #6140 )
2024-03-19 02:16:35 +00:00
DarkSky
f18133af82
fix(server): wrap read-modify-write apis with distributed lock ( #6142 )
2024-03-19 02:16:24 +00:00
liuyi
a4cd8d6ca3
chore(server): organize server configs ( #6169 )
2024-03-19 02:05:56 +00:00
LongYinan
bc465f9704
Revert "fix(server): wrap read-modify-write apis with distributed lock ( #5979 )"
...
This reverts commit 34f892b05b .
2024-03-15 16:55:48 +08:00
DarkSky
34f892b05b
fix(server): wrap read-modify-write apis with distributed lock ( #5979 )
2024-03-15 13:31:11 +08:00
liuyi
533c181640
feat(server): cleanup gateway code ( #6118 )
2024-03-15 02:00:40 +00:00
DarkSky
282b788258
fix: allow empty mailer password ( #6066 )
...
fix #6046
smtp relay may allow empty password, although this is usually not safe
2024-03-13 10:07:18 +00:00
liuyi
fb3a0e7b8f
refactor(server): auth ( #5895 )
...
Remove `next-auth` and implement our own Authorization/Authentication system from scratch.
## Server
- [x] tokens
- [x] function
- [x] encryption
- [x] AuthController
- [x] /api/auth/sign-in
- [x] /api/auth/sign-out
- [x] /api/auth/session
- [x] /api/auth/session (WE SUPPORT MULTI-ACCOUNT!)
- [x] OAuthPlugin
- [x] OAuthController
- [x] /oauth/login
- [x] /oauth/callback
- [x] Providers
- [x] Google
- [x] GitHub
## Client
- [x] useSession
- [x] cloudSignIn
- [x] cloudSignOut
## NOTE:
Tests will be adding in the future
2024-03-12 10:00:09 +00:00
LongYinan
ae41c6c544
chore: bump all dependencies ( #5891 )
2024-02-23 09:37:14 +00:00
liuyi
4d421a324f
refactor(server): import prisma from @prisma/client ( #5863 )
2024-02-22 07:46:57 +00:00
LongYinan
18e212b95c
chore: bump up linter to v7 (major) ( #5820 )
...
[](https://renovatebot.com )
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/typescript-eslint ) ([source](https://togithub.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin )) | [`^6.13.1` -> `^7.0.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2feslint-plugin/6.13.1/7.0.2 ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) |
| [@typescript-eslint/parser](https://togithub.com/typescript-eslint/typescript-eslint ) ([source](https://togithub.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser )) | [`^6.13.1` -> `^7.0.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fparser/6.13.1/7.0.2 ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) | [](https://docs.renovatebot.com/merge-confidence/ ) |
---
### Release Notes
<details>
<summary>typescript-eslint/typescript-eslint (@​typescript-eslint/eslint-plugin)</summary>
### [`v7.0.2`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#702-2024-02-19 )
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v7.0.1...v7.0.2 )
##### 🩹 Fixes
- fix tsconfig-less check errors, fix `@types/eslint` incompatibilities, add tests
##### ❤️ Thank You
- Brad Zacher
- Gareth Jones
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
### [`v7.0.1`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#701-2024-02-12 )
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v7.0.0...v7.0.1 )
##### 🩹 Fixes
- **eslint-plugin:** update peer dep for parser
##### ❤️ Thank You
- Tim Dorr
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
### [`v7.0.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#700-2024-02-12 )
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v6.21.0...v7.0.0 )
##### 🚀 Features
- ⚠️ bump ESLint, NodeJS, and TS minimum version requirements
- add support for flat configs
##### 🩹 Fixes
- **eslint-plugin:** \[prefer-find] stop throwing type errors when converting symbols to numbers
##### ⚠️ Breaking Changes
- ⚠️ bump ESLint, NodeJS, and TS minimum version requirements
##### ❤️ Thank You
- Brad Zacher
- Kirk Waiblinger
- StyleShit
- YeonJuan
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
#### 6.21.0 (2024-02-05)
##### 🚀 Features
- export plugin metadata
- allow `parserOptions.project: false`
- **eslint-plugin:** add rule prefer-find
##### 🩹 Fixes
- **eslint-plugin:** \[no-unused-vars] don't report on types referenced in export assignment expression
- **eslint-plugin:** \[switch-exhaustiveness-check] better support for intersections, infinite types, non-union values
- **eslint-plugin:** \[consistent-type-imports] dont report on types used in export assignment expressions
- **eslint-plugin:** \[no-unnecessary-condition] handle left-hand optional with exactOptionalPropertyTypes option
- **eslint-plugin:** \[class-literal-property-style] allow getter when same key setter exists
- **eslint-plugin:** \[no-unnecessary-type-assertion] provide valid fixes for assertions with extra tokens before `as` keyword
##### ❤️ Thank You
- auvred
- Brad Zacher
- Kirk Waiblinger
- Pete Gonzalez
- YeonJuan
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
#### 6.20.0 (2024-01-29)
##### 🚀 Features
- **eslint-plugin:** \[member-ordering] allow easy reuse of the default ordering
##### 🩹 Fixes
- **eslint-plugin:** \[no-useless-template-literals] incorrect bigint autofix result
- **eslint-plugin:** \[prefer-nullish-coalescing] treat any/unknown as non-nullable
- **eslint-plugin:** \[no-useless-template-literals] report Infinity & NaN
- **eslint-plugin:** \[prefer-readonly] disable checking accessors
##### ❤️ Thank You
- Alex Parloti
- auvred
- James Browning
- StyleShit
- YeonJuan
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
#### 6.19.1 (2024-01-22)
##### 🩹 Fixes
- **type-utils:** preventing isUnsafeAssignment infinite recursive calls
- **eslint-plugin:** \[no-unnecessary-condition] fix false positive for type variable
##### ❤️ Thank You
- YeonJuan
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
#### 6.19.0 (2024-01-15)
##### 🚀 Features
- **eslint-plugin:** \[prefer-promise-reject-errors] add rule
- **eslint-plugin:** \[no-array-delete] add new rule
- **eslint-plugin:** \[no-useless-template-literals] add fix suggestions
##### 🩹 Fixes
- **eslint-plugin:** \[no-unnecessary-type-assertion] detect unnecessary non-null-assertion on a call expression
- **eslint-plugin:** \[no-unnecesary-type-assertion] treat unknown/any as nullable
##### ❤️ Thank You
- auvred
- Brad Zacher
- Josh Goldberg ✨
- Joshua Chen
- LJX
- Steven
- StyleShit
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
#### 6.18.1 (2024-01-08)
##### 🩹 Fixes
- **eslint-plugin:** \[no-non-null-assertion] provide valid fix when member access is on next line
- **eslint-plugin:** \[no-unnecessary-condition] improve checking optional callee
- **eslint-plugin:** \[prefer-readonly] support modifiers of unions and intersections
- **eslint-plugin:** \[switch-exhaustiveness-check] fix new allowDefaultCaseForExhaustiveSwitch option
##### ❤️ Thank You
- auvred
- James
- Josh Goldberg ✨
- YeonJuan
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
#### 6.18.0 (2024-01-06)
##### 🚀 Features
- **typescript-estree:** throw on invalid update expressions
- **eslint-plugin:** \[no-var-requires, no-require-imports] allow option
##### ❤️ Thank You
- auvred
- Joshua Chen
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
### [`v6.21.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#6210-2024-02-05 )
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v6.20.0...v6.21.0 )
##### 🚀 Features
- export plugin metadata
- allow `parserOptions.project: false`
- **eslint-plugin:** add rule prefer-find
##### 🩹 Fixes
- **eslint-plugin:** \[no-unused-vars] don't report on types referenced in export assignment expression
- **eslint-plugin:** \[switch-exhaustiveness-check] better support for intersections, infinite types, non-union values
- **eslint-plugin:** \[consistent-type-imports] dont report on types used in export assignment expressions
- **eslint-plugin:** \[no-unnecessary-condition] handle left-hand optional with exactOptionalPropertyTypes option
- **eslint-plugin:** \[class-literal-property-style] allow getter when same key setter exists
- **eslint-plugin:** \[no-unnecessary-type-assertion] provide valid fixes for assertions with extra tokens before `as` keyword
##### ❤️ Thank You
- auvred
- Brad Zacher
- Kirk Waiblinger
- Pete Gonzalez
- YeonJuan
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
### [`v6.20.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#6200-2024-01-29 )
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v6.19.1...v6.20.0 )
##### 🚀 Features
- **eslint-plugin:** \[member-ordering] allow easy reuse of the default ordering
##### 🩹 Fixes
- **eslint-plugin:** \[no-useless-template-literals] incorrect bigint autofix result
- **eslint-plugin:** \[prefer-nullish-coalescing] treat any/unknown as non-nullable
- **eslint-plugin:** \[no-useless-template-literals] report Infinity & NaN
- **eslint-plugin:** \[prefer-readonly] disable checking accessors
##### ❤️ Thank You
- Alex Parloti
- auvred
- James Browning
- StyleShit
- YeonJuan
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
### [`v6.19.1`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#6191-2024-01-22 )
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v6.19.0...v6.19.1 )
##### 🩹 Fixes
- **type-utils:** preventing isUnsafeAssignment infinite recursive calls
- **eslint-plugin:** \[no-unnecessary-condition] fix false positive for type variable
##### ❤️ Thank You
- YeonJuan
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
### [`v6.19.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#6190-2024-01-15 )
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v6.18.1...v6.19.0 )
##### 🚀 Features
- **eslint-plugin:** \[prefer-promise-reject-errors] add rule
- **eslint-plugin:** \[no-array-delete] add new rule
- **eslint-plugin:** \[no-useless-template-literals] add fix suggestions
##### 🩹 Fixes
- **eslint-plugin:** \[no-unnecessary-type-assertion] detect unnecessary non-null-assertion on a call expression
- **eslint-plugin:** \[no-unnecesary-type-assertion] treat unknown/any as nullable
##### ❤️ Thank You
- auvred
- Brad Zacher
- Josh Goldberg ✨
- Joshua Chen
- LJX
- Steven
- StyleShit
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
### [`v6.18.1`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#6181-2024-01-08 )
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v6.18.0...v6.18.1 )
##### 🩹 Fixes
- **eslint-plugin:** \[no-non-null-assertion] provide valid fix when member access is on next line
- **eslint-plugin:** \[no-unnecessary-condition] improve checking optional callee
- **eslint-plugin:** \[prefer-readonly] support modifiers of unions and intersections
- **eslint-plugin:** \[switch-exhaustiveness-check] fix new allowDefaultCaseForExhaustiveSwitch option
##### ❤️ Thank You
- auvred
- James
- Josh Goldberg ✨
- YeonJuan
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
### [`v6.18.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#6180-2024-01-06 )
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v6.17.0...v6.18.0 )
##### 🚀 Features
- **typescript-estree:** throw on invalid update expressions
- **eslint-plugin:** \[no-var-requires, no-require-imports] allow option
##### ❤️ Thank You
- auvred
- Joshua Chen
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
### [`v6.17.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#6170-2024-01-01 )
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v6.16.0...v6.17.0 )
##### Bug Fixes
- **eslint-plugin:** \[no-restricted-imports] prevent crash when `patterns` or `paths` in options are empty ([#​8108](https://togithub.com/typescript-eslint/typescript-eslint/issues/8108 )) ([675e987](675e987ca1 ))
##### Features
- **eslint-plugin:** \[no-floating-promises] flag result of .map(async) ([#​7897](https://togithub.com/typescript-eslint/typescript-eslint/issues/7897 )) ([5857356](5857356962 ))
- **eslint-plugin:** \[switch-exhaustiveness-check] add an option to warn against a `default` case on an already exhaustive `switch` ([#​7539](https://togithub.com/typescript-eslint/typescript-eslint/issues/7539 )) ([6a219bd](6a219bdfe6 ))
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
### [`v6.16.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#6160-2023-12-25 )
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v6.15.0...v6.16.0 )
##### Bug Fixes
- **eslint-plugin:** \[unbound-method] exempt all non-Promise built-in statics ([#​8096](https://togithub.com/typescript-eslint/typescript-eslint/issues/8096 )) ([3182959](31829591e2 ))
##### Features
- **eslint-plugin:** deprecate formatting (meta.type: layout) rules ([#​8073](https://togithub.com/typescript-eslint/typescript-eslint/issues/8073 )) ([04dea84](04dea84e8e ))
- **eslint-plugin:** deprecate no-extra-semi in favor of ESLint Stylistic equivalent ([#​8123](https://togithub.com/typescript-eslint/typescript-eslint/issues/8123 )) ([9368bf3](9368bf390a ))
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
### [`v6.15.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#6150-2023-12-18 )
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v6.14.0...v6.15.0 )
##### Features
- **eslint-plugin:** \[no-useless-template-literals] add new rule ([#​7957](https://togithub.com/typescript-eslint/typescript-eslint/issues/7957 )) ([ff75785](ff75785f4c )), closes [#​2846](https://togithub.com/typescript-eslint/typescript-eslint/issues/2846 )
- require-array-sort-compare + toSorted ([#​8052](https://togithub.com/typescript-eslint/typescript-eslint/issues/8052 )) ([c9661c8](c9661c8bbf ))
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
### [`v6.14.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#6140-2023-12-11 )
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v6.13.2...v6.14.0 )
##### Bug Fixes
- **eslint-plugin:** add no-unsafe-unary-minus, prefer-destructuring to disable-type-checked ([#​8038](https://togithub.com/typescript-eslint/typescript-eslint/issues/8038 )) ([431cd15](431cd1559f ))
- **eslint-plugin:** correct message for `no-unsafe-unary-minus` ([#​7998](https://togithub.com/typescript-eslint/typescript-eslint/issues/7998 )) ([705370a](705370ac0d ))
##### Features
- **eslint-plugin:** \[explicit-function-return-type] add support for typed class property definitions ([#​8027](https://togithub.com/typescript-eslint/typescript-eslint/issues/8027 )) ([bff47d7](bff47d7885 ))
- **eslint-plugin:** \[require-await] allow yielding Promise in async generators ([#​8003](https://togithub.com/typescript-eslint/typescript-eslint/issues/8003 )) ([4c3e704](4c3e704b97 ))
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
#### [6.13.2](https://togithub.com/typescript-eslint/typescript-eslint/compare/v6.13.1...v6.13.2 ) (2023-12-04)
**Note:** Version bump only for package [@​typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/eslint-plugin )
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
#### [6.13.1](https://togithub.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1 ) (2023-11-28)
**Note:** Version bump only for package [@​typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/eslint-plugin )
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
### [`v6.13.2`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#6132-2023-12-04 )
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v6.13.1...v6.13.2 )
**Note:** Version bump only for package [@​typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/eslint-plugin )
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
</details>
<details>
<summary>typescript-eslint/typescript-eslint (@​typescript-eslint/parser)</summary>
### [`v7.0.2`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#702-2024-02-19 )
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v7.0.1...v7.0.2 )
##### 🩹 Fixes
- fix tsconfig-less check errors, fix `@types/eslint` incompatibilities, add tests
##### ❤️ Thank You
- Brad Zacher
- Gareth Jones
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
### [`v7.0.1`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#701-2024-02-12 )
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v7.0.0...v7.0.1 )
This was a version bump only for parser to align it with other projects, there were no code changes.
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
### [`v7.0.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#700-2024-02-12 )
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v6.21.0...v7.0.0 )
##### 🚀 Features
- ⚠️ bump ESLint, NodeJS, and TS minimum version requirements
- add support for flat configs
##### ⚠️ Breaking Changes
- ⚠️ bump ESLint, NodeJS, and TS minimum version requirements
##### ❤️ Thank You
- Brad Zacher
- Kirk Waiblinger
- StyleShit
- YeonJuan
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
#### 6.21.0 (2024-02-05)
##### 🚀 Features
- allow `parserOptions.project: false`
##### ❤️ Thank You
- auvred
- Brad Zacher
- Kirk Waiblinger
- Pete Gonzalez
- YeonJuan
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
#### 6.20.0 (2024-01-29)
This was a version bump only for parser to align it with other projects, there were no code changes.
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
#### 6.19.1 (2024-01-22)
This was a version bump only for parser to align it with other projects, there were no code changes.
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
#### 6.19.0 (2024-01-15)
This was a version bump only for parser to align it with other projects, there were no code changes.
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
#### 6.18.1 (2024-01-08)
This was a version bump only for parser to align it with other projects, there were no code changes.
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
#### 6.18.0 (2024-01-06)
This was a version bump only for parser to align it with other projects, there were no code changes.
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
### [`v6.21.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#6210-2024-02-05 )
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v6.20.0...v6.21.0 )
##### 🚀 Features
- allow `parserOptions.project: false`
##### ❤️ Thank You
- auvred
- Brad Zacher
- Kirk Waiblinger
- Pete Gonzalez
- YeonJuan
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
### [`v6.20.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#6200-2024-01-29 )
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v6.19.1...v6.20.0 )
This was a version bump only for parser to align it with other projects, there were no code changes.
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
### [`v6.19.1`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#6191-2024-01-22 )
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v6.19.0...v6.19.1 )
This was a version bump only for parser to align it with other projects, there were no code changes.
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
### [`v6.19.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#6190-2024-01-15 )
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v6.18.1...v6.19.0 )
This was a version bump only for parser to align it with other projects, there were no code changes.
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
### [`v6.18.1`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#6181-2024-01-08 )
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v6.18.0...v6.18.1 )
This was a version bump only for parser to align it with other projects, there were no code changes.
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
### [`v6.18.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#6180-2024-01-06 )
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v6.17.0...v6.18.0 )
This was a version bump only for parser to align it with other projects, there were no code changes.
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
### [`v6.17.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#6170-2024-01-01 )
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v6.16.0...v6.17.0 )
**Note:** Version bump only for package [@​typescript-eslint/parser](https://togithub.com/typescript-eslint/parser )
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
### [`v6.16.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#6160-2023-12-25 )
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v6.15.0...v6.16.0 )
**Note:** Version bump only for package [@​typescript-eslint/parser](https://togithub.com/typescript-eslint/parser )
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
### [`v6.15.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#6150-2023-12-18 )
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v6.14.0...v6.15.0 )
**Note:** Version bump only for package [@​typescript-eslint/parser](https://togithub.com/typescript-eslint/parser )
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
### [`v6.14.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#6140-2023-12-11 )
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v6.13.2...v6.14.0 )
**Note:** Version bump only for package [@​typescript-eslint/parser](https://togithub.com/typescript-eslint/parser )
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
#### [6.13.2](https://togithub.com/typescript-eslint/typescript-eslint/compare/v6.13.1...v6.13.2 ) (2023-12-04)
**Note:** Version bump only for package [@​typescript-eslint/parser](https://togithub.com/typescript-eslint/parser )
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
#### [6.13.1](https://togithub.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1 ) (2023-11-28)
**Note:** Version bump only for package [@​typescript-eslint/parser](https://togithub.com/typescript-eslint/parser )
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
### [`v6.13.2`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#6132-2023-12-04 )
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v6.13.1...v6.13.2 )
**Note:** Version bump only for package [@​typescript-eslint/parser](https://togithub.com/typescript-eslint/parser )
You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning ) and [releases](https://main--typescript-eslint.netlify.app/users/releases ) on our website.
</details>
---
### 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.
🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
---
This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/ ). View repository job log [here](https://developer.mend.io/github/toeverything/AFFiNE ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNzMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjIwMC4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2024-02-20 04:14:37 +00:00
DarkSky
fd18732e6e
feat: use custom verify token policy ( #5836 )
2024-02-20 09:47:27 +08:00
liuyi
df157819dc
feat(server): allow customize mailer server ( #5835 )
2024-02-19 14:37:08 +00:00
liuyi
296d47f102
refactor(server): separate s3 & r2 storage to plugin ( #5805 )
2024-02-05 15:10:09 +00:00
DarkSky
25e8a2a22f
feat: sync client versioning ( #5645 )
...
after this pr, server will only accept client that have some major version
the client version <0.12 will be rejected by the server, >= 0.12 can receive outdated messages and notify users
2024-02-05 08:43:50 +00:00
liuyi
d9c2dc8dfb
fix(server): apply env overrides after all config merged ( #5795 )
2024-02-04 06:38:31 +00:00
liuyi
bef266ae3b
refactor(server): reorganize server configs ( #5753 )
2024-02-02 08:32:07 +00:00
liuyi
26db1d436d
refactor(server): server errors ( #5741 )
...
standardize the error raising in both GraphQL Resolvers and Controllers.
Now, All user aware errors should be throwed with `HttpException`'s variants, for example `NotFoundException`.
> Directly throwing `GraphQLError` are forbidden.
The GraphQL errorFormatter will handle it automatically and set `code`, `status` in error extensions.
At the same time, the frontend `GraphQLError` should be imported from `@affine/graphql`, which introduce a better error extensions type.
----
controller example:
```js
@Get('/docs/${id}')
doc() {
// ...
// imported from '@nestjs/common'
throw new NotFoundException('Doc is not found.');
// ...
}
```
the above will response as:
```
status: 404 Not Found
{
"message": "Doc is not found.",
"statusCode": 404,
"error": "Not Found"
}
```
resolver example:
```js
@Mutation()
invite() {
// ...
throw new PayloadTooLargeException('Workspace seats is full.')
// ...
}
```
the above will response as:
```
status: 200 Ok
{
"data": null,
"errors": [
{
"message": "Workspace seats is full.",
"extensions": {
"code": 404,
"status": "Not Found"
}
}
]
}
```
for frontend GraphQLError user-friend, a helper function introduced:
```js
import { findGraphQLError } from '@affine/graphql'
fetch(query)
.catch(errOrArr => {
const e = findGraphQLError(errOrArr, e => e.extensions.code === 404)
if (e) {
// handle
}
})
```
2024-01-31 08:43:03 +00:00
liuyi
72d9cc1e5b
chore(storage): bump y-octo ( #5751 )
2024-01-31 06:54:33 +00:00
DarkSky
fdffe90892
fix: consume blob stream correctly ( #5706 )
...
- use correctly endpoint in r2
- consume blob stream correctly
2024-01-25 10:59:53 +00:00
liuyi
0f67c683c9
fix(server): add metrics missing attributes ( #5682 )
2024-01-24 08:06:34 +00:00
liuyi
62169c59c8
fix(server): del staled update count cache if unmatch ( #5674 )
2024-01-23 08:19:29 +00:00
liuyi
e516e0db23
refactor(server): plugin modules ( #5630 )
...
- [x] separates modules into `fundamental`, `core`, `plugins`
- [x] optional modules with `@OptionalModule` decorator to install modules with requirements met(`requires`, `if`)
- [x] `module.contributesTo` defines optional features that will be enabled if module registered
- [x] `AFFiNE.plugins.use('payment', {})` to enable a optional/plugin module
- [x] `PaymentModule` is the first plugin module
- [x] GraphQLSchema will not be generated for non-included modules
- [x] Frontend can use `ServerConfigType` query to detect which features are enabled
- [x] override existing provider globally
2024-01-22 07:40:28 +00:00
LongYinan
fa8655e43e
style: apply prefer-node-protocol lint rule ( #5627 )
...
it makes it perfectly clear that the package is a Node.js builtin module.
2024-01-19 03:47:08 +00:00
LongYinan
c5ea6fd2c3
fix(server): selfhost issues ( #5623 )
...
- env name in helm chart
- omit health check controller in selfhost env
2024-01-18 05:55:54 +00:00
liuyi
d9324286d4
chore(server): add port to host if it is 0.0.0.0 ( #5619 )
2024-01-18 03:04:36 +00:00
liuyi
bf88b6edaa
chore(server): remove too verbose logs ( #5555 )
...
chore(server): remove too verbose logs
chore(server): make logs less verbose
2024-01-17 10:37:22 +00:00
liuyi
24e18dd475
fix: improve self-host convenience ( #5582 )
2024-01-15 09:24:53 +00:00
liuyi
4c49b62ab7
fix(server): node imports order ( #5583 )
2024-01-14 05:47:56 +00:00
liuyi
89b5c96d25
refactor(server): folder structure ( #5573 )
2024-01-12 04:18:39 +00:00