Compare commits

...

299 Commits

Author SHA1 Message Date
EYHN
cccea3ec3e fix(workspace): avoid data loss (hot-fix) (#6114) 2024-03-14 13:14:03 +08:00
EYHN
39476d16ef fix(workspace): data loss (hot-fix) (#6110) 2024-03-14 11:29:50 +08:00
DarkSky
49bead719d feat: add cloud logger sa integrate (#6089) 2024-03-12 23:26:09 +08:00
DarkSky
a9f46ed088 fi: ci container publish 2024-03-12 18:22:38 +08:00
forehalo
d3a544f4aa ci: only enable jwst codec in canary 2024-03-12 17:55:01 +08:00
EYHN
cd56d8a6e6 feat(core): new onboarding template (hotfix) (#5952) 2024-02-29 14:01:31 +08:00
liuyi
6ed5ec36bb fix(server): sender passed to nextauth is never used (#5938) 2024-02-28 14:57:23 +08:00
liuyi
0fa917aabb ci: fix selfhost (#5920)
enhancement

___

- Introduced a new ESM module resolution setup using `ts-node` to enhance the development and deployment process.
- Implemented a dynamic loader script registration mechanism to facilitate ESM module loading.
- Simplified the predeploy script execution by refining environment variable handling and stdout configuration.
- Updated `package.json` to reflect changes in script commands for better ESM support and added necessary dependencies for `ts-node` and `typescript`.

___

<table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
      <summary><strong>loader.js</strong><dd><code>Introduce ESM Module Resolution via ts-node</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

packages/backend/server/scripts/loader.js

<li>Introduced <code>ts-node</code> configuration for ESM module resolution.<br> <li> Exported a <code>resolve</code> function for module resolution.<br>

</details>

  </td>
  <td><a href="https:/toeverything/AFFiNE/pull/5920/files#diff-9ed793897a493633028d510db0742ff38d2d86471c54b17513d4354c51597ef8">+11/-0</a>&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
      <summary><strong>register.js</strong><dd><code>Implement Dynamic Loader Script Registration</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

packages/backend/server/scripts/register.js

<li>Implemented dynamic registration of the loader script.<br> <li> Utilized <code>node:module</code> and <code>node:url</code> for script registration.<br>

</details>

  </td>
  <td><a href="https:/toeverything/AFFiNE/pull/5920/files#diff-64831012a09f2bc4bc5a611ddb8e0871b0e83588de6c5d4f2f5cb1dae8fff244">+4/-0</a>&nbsp; &nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
      <summary><strong>self-host-predeploy.js</strong><dd><code>Simplify Predeploy Script Execution</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

packages/backend/server/scripts/self-host-predeploy.js

<li>Simplified environment variable passing to <code>execSync</code>.<br> <li> Changed stdout handling to inherit from the parent process.<br>

</details>

  </td>
  <td><a href="https:/toeverything/AFFiNE/pull/5920/files#diff-bd7b0be14c198018c21dadda6945a779c57d13e4c8584ee62da4baa99d370664">+3/-5</a>&nbsp; &nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
      <summary><strong>package.json</strong><dd><code>Update Scripts and Dependencies for ESM Support</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

packages/backend/server/package.json

<li>Updated script commands for ESM compatibility.<br> <li> Added <code>ts-node</code> and <code>typescript</code> dependencies.<br> <li> Removed redundant <code>--es-module-specifier-resolution=node</code> flags.<br>

</details>

  </td>
  <td><a href="https:/toeverything/AFFiNE/pull/5920/files#diff-a6530c6fe539aaa49ff0a7a80bc4362c1d95c419fdd19125415dcc869b31a443">+6/-6</a>&nbsp; &nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

>  **PR-Agent usage**:
>Comment `/help` on the PR to get a list of all available PR-Agent tools and their descriptions
2024-02-28 14:56:37 +08:00
liuyi
eb79e6bdc9 ci: fix canary deployment (#5851) 2024-02-28 12:13:03 +08:00
liuyi
cf52a43773 feat(server): allow customize mailer server (#5835) 2024-02-28 12:12:06 +08:00
LongYinan
9203980a8c build: fix selfhost config 2024-02-27 23:49:25 +08:00
liuyi
d34eb2cbe5 fix(server): apply env overrides after all config merged (#5795) 2024-02-27 21:46:08 +08:00
liuyi
7f3f993ce4 refactor(server): reorganize server configs (#5753) 2024-02-27 21:45:26 +08:00
Peng Xiao
df17001284 feat(core): add shortcut for openning settings (#5883)
fix https://github.com/toeverything/AFFiNE/issues/5881
2024-02-23 15:14:39 +08:00
Peng Xiao
e400abf1f4 fix: keyboard shortcut style in cmdk (#5882)
![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/7eb2fa93-675a-43a6-8db4-9681fbbd1406.png)
2024-02-23 15:14:39 +08:00
EYHN
640aa00148 fix(core): fix app boot speed (#5884) 2024-02-23 06:54:42 +00:00
Ayush Agrawal
5ae8f029f7 chore: bump blocksuite (#5868)
Co-authored-by: LongYinan <lynweklm@gmail.com>
2024-02-22 17:15:27 +08:00
EYHN
a26e0b3ec9 fix(core): disable sidebar user select (#5862)
close #5846
2024-02-22 17:15:26 +08:00
Umar Faiz
f492b6711b fix(core): the pitch zooming function incorrectly zooms the toolbar (#5456)
Co-authored-by: LongYinan <lynweklm@gmail.com>
2024-02-22 17:15:26 +08:00
EYHN
81aae61394 fix(core): fix desktop e2e (#5867) 2024-02-22 16:12:23 +08:00
Peng Xiao
e08f58beea chore: bump electron dependencies (#5770)
to include this fix https://github.com/electron/electron/pull/40994
2024-02-22 15:26:09 +08:00
EYHN
4560819f76 fix(core): fix 404 after signout (hotfix) (#5865) 2024-02-22 15:11:11 +08:00
liuyi
193c197a54 fix(core): window.open to a new origin will be blocked by browser (#5856) 2024-02-21 20:51:25 +08:00
LongYinan
449c0a38a7 fix(electron): linux AppImage output path 2024-02-21 15:48:38 +08:00
Ayush Agrawal
8d141e5a81 feat: blocksuite integration for pageMode & pageUpdatedAt (#5849)
Co-authored-by: LongYinan <lynweklm@gmail.com>
2024-02-21 15:16:49 +08:00
Lye Hongtao
e04911315f feat: move templates into AFFiNE (#5750)
Related to https://github.com/toeverything/blocksuite/pull/6156

### Change
Move the edgeless templates to AFFiNE. All templates are stored as zip files. Run `node build-edgeless.mjs` in `@affine/templates` to generate JSON-format templates and importing script. The template will be generated automatically during building and dev (`yarn dev`).
2024-02-21 15:10:47 +08:00
Ayush Agrawal
75d58679b6 chore: bump blocksuite (#5852) 2024-02-21 15:10:35 +08:00
Ayush Agrawal
2e6386e4cf feat: bump blocksuite (#5845) 2024-02-21 15:09:33 +08:00
Ayush Agrawal
f345a61df0 feat: bump blocksuite (#5817) 2024-02-21 15:01:45 +08:00
Flrande
a6420fcd76 feat: bump blocksuite (#5812) 2024-02-21 15:00:43 +08:00
Yifeng Wang
fec406f7e8 feat: bump blocksuite (#5767)
Co-authored-by: LongYinan <lynweklm@gmail.com>
2024-02-21 14:57:05 +08:00
LongYinan
769398591b fix: resolve deps and types issues after cherry-pick 2024-02-21 14:51:29 +08:00
JimmFly
e01569fff7 feat(core): add loading to quick search modal (#5785)
close AFF-285

add `useSyncEngineStatus` hooks
add loading style

<img width="977" alt="test1" src="https://github.com/toeverything/AFFiNE/assets/102217452/e8bf6714-e42b-4adf-a279-341ef5f5cfc0">
2024-02-21 14:40:30 +08:00
JimmFly
6bde2de783 feat(core): add starAFFiNE and issueFeedback modal (#5718)
close TOV-482

https://github.com/toeverything/AFFiNE/assets/102217452/da1f74bc-4b8d-4d7f-987d-f53da98d92fe
2024-02-21 14:23:09 +08:00
JimmFly
3513ced6cb fix(core): match page preview and page title in page list (#5840)
close TOV-578
2024-02-21 14:21:05 +08:00
Adithyan
8dc9addc40 feat: Duplicate page in page list and clone naming improvements (#5818) 2024-02-21 14:20:38 +08:00
Muhammad Arsil
9d9f89ef2e fix: cards overlapping issue (#5727)
Co-authored-by: EYHN <cneyhn@gmail.com>
2024-02-21 14:20:31 +08:00
DarkSky
6cfe5d4566 feat: use custom verify token policy (#5836) 2024-02-21 14:20:08 +08:00
Peng Xiao
6032b432f8 build(electron): generate latest-linux.yml (#5822) 2024-02-21 14:19:37 +08:00
Peng Xiao
5823787ded fix(electron): linux login issues (#5821)
Looks like there are some issues using `@reforged/maker-appimage`:
- deep link not working properly (cannot login)
- cannot be installed via AppImageLauncher, which is required to enable deep link on linux

I forked saleae/electron-forge-maker-appimage into https://github.com/toeverything/electron-forge-maker-appimage to fix these issues
See changes: https://github.com/saleae/electron-forge-maker-appimage/compare/master...toeverything:electron-forge-maker-appimage:master?w=1

To enable login on Linux, the app must be installed via AppImageLauncher.

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/28dcaadb-49d1-4c95-8a4f-ef41bef604be.png)

fix https://github.com/toeverything/AFFiNE/issues/4978
fix https://github.com/toeverything/AFFiNE/issues/4466
2024-02-21 14:19:23 +08:00
LongYinan
b3f272ba70 fix: selfhost build (#5833) 2024-02-21 14:18:05 +08:00
Whitewater
a5df5a7c8a chore: skip sync when offline (#5786) 2024-02-21 14:17:20 +08:00
DarkSky
90de90403a feat: refresh new workspace feature (#5834) 2024-02-20 16:12:35 +08:00
李华桥
4d4e4fc4e2 Merge branch 'stable' into beta 2024-02-20 15:52:22 +08:00
liuyi
aa73e532d3 fix(server): doc upsert without row lock (#5765) 2024-02-16 22:06:23 +08:00
liuyi
31faa93c71 chore(storage): bump y-octo (#5751) 2024-02-16 19:36:26 +08:00
liuyi
def60f4c61 fix(server): doc upsert without row lock (#5765) 2024-02-05 16:39:48 +08:00
EYHN
d15ec0ff77 fix(workspace): fix sync handshake (hot-fix) (#5797) 2024-02-05 10:56:46 +08:00
EYHN
d2acd0385a fix(core): prevent data loss (hot-fix) (#5798) 2024-02-05 10:54:51 +08:00
EYHN
1effb2f25f fix(workspace): fix sync stuck (#5762) (#5772) 2024-02-01 17:41:49 +08:00
Joooye_34
9189d26332 feat: support sign-in with subscription coupon (#5768) 2024-02-01 17:03:29 +08:00
liuyi
79a8be7799 feat(server): allow pass coupon to checkout session (#5749) 2024-02-01 17:03:16 +08:00
liuyi
1a643cc70c fix(server): doc upsert race condition (#5755) 2024-01-31 21:36:35 +08:00
liuyi
9321be3ff5 fix(server): doc upsert race condition (#5755) 2024-01-31 11:08:52 +00:00
李华桥
24dc3f95ff fix: consume blob stream correctly (#5706) 2024-01-31 11:38:40 +08:00
Cats Juice
4257b5f3a4 fix(core): set createDate to journal's date when journal created (#5701) 2024-01-30 23:13:02 +08:00
Cats Juice
ea17e86032 feat(core): ignore empty journals for page lists (#5744) 2024-01-30 17:21:20 +08:00
Joooye_34
48cd8999bd fix: static resource not found in web server (#5745) 2024-01-30 17:21:05 +08:00
李华桥
cdf1d9002e Merge branch 'canary' into stable 2024-01-29 17:53:10 +08:00
LongYinan
588b3bcf33 chore: revert "chore: bump up @reforged/maker-appimage version to v4" (#5736)
link #5709
This reverts commit 59788aa334.
2024-01-29 08:41:35 +00:00
Yifeng Wang
1cf902bdb6 feat: bump blocksuite (#5735) 2024-01-29 16:40:23 +08:00
DarkSky
fc8a48fb43 feat: add business blob limit (#5734) 2024-01-29 08:32:35 +00:00
LongYinan
0044be972f chore: bump up @blocksuite/icons version to v2.1.44 (#5732)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@blocksuite/icons](https://togithub.com/toeverything/icons) | [`2.1.43` -> `2.1.44`](https://renovatebot.com/diffs/npm/@blocksuite%2ficons/2.1.43/2.1.44) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@blocksuite%2ficons/2.1.44?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@blocksuite%2ficons/2.1.44?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@blocksuite%2ficons/2.1.43/2.1.44?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@blocksuite%2ficons/2.1.43/2.1.44?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>toeverything/icons (@&#8203;blocksuite/icons)</summary>

### [`v2.1.44`](13299f7ede...bc31d70961)

[Compare Source](13299f7ede...bc31d70961)

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNTMuMiIsInVwZGF0ZWRJblZlciI6IjM3LjE1My4yIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2024-01-29 07:39:17 +00:00
LongYinan
5bd339bed7 feat: generate blocksuite changelog (#5724) 2024-01-29 07:28:02 +00:00
LongYinan
25e8b8306f fix: path issue on Windows (#5725) 2024-01-29 07:18:25 +00:00
DarkSky
070d5ca471 feat: impl unlimited features (#5659) 2024-01-26 08:28:54 +00:00
Yifeng Wang
04b9029d1b feat: bump blocksuite (#5720)
Co-authored-by: xiaoxin <hongtao.lye@toeverything.info>
2024-01-26 16:27:58 +08:00
Cats Juice
387e292ed9 fix(core): journal title's day tag may be invalid (#5703)
Fix [TOV-470](https://linear.app/affine-design/issue/TOV-470/journal-invalid-date)
2024-01-26 07:55:35 +00:00
JimmFly
18068f4ae2 feat(core): add collection and tag filters to all pages (#5567)
close TOV-69

Added the `filterMode` parameter to the `/all` route.
Abstracted the `PageList` and associated components into more universal ones.
Added the `useTagMetas` hook to get and update  the workspace tags.

https://github.com/toeverything/AFFiNE/assets/102217452/7595944d-a056-40c2-8d89-d8df9e901a4b
2024-01-26 07:42:47 +00:00
Peng Xiao
b867dcbdeb fix: add padding between editor and link panel (#5713)
Fix [AFF-561](https://linear.app/affine-design/issue/AFF-561/bi-directional-link-与文本编辑区域的-top-padding)
2024-01-26 07:32:22 +00:00
Cats Juice
6ca2043697 feat(component): optimize week-date-picker keyboard navigation (#5684) 2024-01-26 07:05:19 +00:00
LongYinan
16ef255f51 chore: upgrade husky to latest (#5719)
- https://github.com/typicode/husky/pull/1336
2024-01-26 06:37:39 +00:00
LongYinan
1cf182b7ca ci: add postUpdateOptions to renovate (#5714) 2024-01-26 06:19:38 +00:00
Peng Xiao
e8a6b6ad5e fix(core): bidi links rendering issue (#5707) 2024-01-26 06:07:04 +00:00
Joooye_34
fd9a7f6aad chore: remove unused blocksuite deps in e2e (#5717) 2024-01-26 05:55:13 +00:00
LongYinan
af45b93d26 chore: bump up husky version to v9 (#5694)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [husky](https://togithub.com/typicode/husky) | [`^8.0.3` -> `^9.0.0`](https://renovatebot.com/diffs/npm/husky/8.0.3/9.0.6) | [![age](https://developer.mend.io/api/mc/badges/age/npm/husky/9.0.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/husky/9.0.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/husky/8.0.3/9.0.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/husky/8.0.3/9.0.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>typicode/husky (husky)</summary>

### [`v9.0.6`](https://togithub.com/typicode/husky/releases/tag/v9.0.6)

[Compare Source](https://togithub.com/typicode/husky/compare/v9.0.5...v9.0.6)

-   docs: add favicon by [@&#8203;rakleed](https://togithub.com/rakleed) in [https://github.com/typicode/husky/pull/1354](https://togithub.com/typicode/husky/pull/1354)
-   chore: apply editorconfig to code only by [@&#8203;typicode](https://togithub.com/typicode) in [https://github.com/typicode/husky/pull/1355](https://togithub.com/typicode/husky/pull/1355)
-   docs: update install script to mjs and fix CI checks by [@&#8203;starnayuta](https://togithub.com/starnayuta) in [https://github.com/typicode/husky/pull/1357](https://togithub.com/typicode/husky/pull/1357)
-   Fix  unbound variable by [@&#8203;typicode](https://togithub.com/typicode) in [https://github.com/typicode/husky/pull/1359](https://togithub.com/typicode/husky/pull/1359)

### [`v9.0.5`](https://togithub.com/typicode/husky/releases/tag/v9.0.5)

[Compare Source](https://togithub.com/typicode/husky/compare/v9.0.4...v9.0.5)

-   docs: update path to startup files by [@&#8203;ManuelRauber](https://togithub.com/ManuelRauber) in [https://github.com/typicode/husky/pull/1350](https://togithub.com/typicode/husky/pull/1350)
-   fix: init error by [@&#8203;typicode](https://togithub.com/typicode) in [https://github.com/typicode/husky/pull/1353](https://togithub.com/typicode/husky/pull/1353)

### [`v9.0.4`](https://togithub.com/typicode/husky/releases/tag/v9.0.4)

[Compare Source](https://togithub.com/typicode/husky/compare/v9.0.3...v9.0.4)

-   fix: init create dir before by [@&#8203;typicode](https://togithub.com/typicode) in [https://github.com/typicode/husky/pull/1348](https://togithub.com/typicode/husky/pull/1348)
-   refactor: simplify by [@&#8203;typicode](https://togithub.com/typicode) in [https://github.com/typicode/husky/pull/1349](https://togithub.com/typicode/husky/pull/1349)
-   fix: init not working on pnpm [#&#8203;1334](https://togithub.com/typicode/husky/issues/1334) by [@&#8203;rozbo](https://togithub.com/rozbo) in [https://github.com/typicode/husky/pull/1347](https://togithub.com/typicode/husky/pull/1347)

### [`v9.0.3`](https://togithub.com/typicode/husky/releases/tag/v9.0.3)

[Compare Source](https://togithub.com/typicode/husky/compare/v9.0.2...v9.0.3)

-   docs: fix link by [@&#8203;typicode](https://togithub.com/typicode) in [https://github.com/typicode/husky/pull/1340](https://togithub.com/typicode/husky/pull/1340)
-   chore: fix links in issue template by [@&#8203;julien-f](https://togithub.com/julien-f) in [https://github.com/typicode/husky/pull/1341](https://togithub.com/typicode/husky/pull/1341)
-   fix: add scripts field if not present by [@&#8203;chalkygames123](https://togithub.com/chalkygames123) in [https://github.com/typicode/husky/pull/1338](https://togithub.com/typicode/husky/pull/1338)
-   docs: changelog link by [@&#8203;typicode](https://togithub.com/typicode) in [https://github.com/typicode/husky/pull/1343](https://togithub.com/typicode/husky/pull/1343)
-   fix: insert final newline by [@&#8203;chalkygames123](https://togithub.com/chalkygames123) in [https://github.com/typicode/husky/pull/1339](https://togithub.com/typicode/husky/pull/1339)
-   fix: fix git hooks path on windows by [@&#8203;rozbo](https://togithub.com/rozbo) in [https://github.com/typicode/husky/pull/1346](https://togithub.com/typicode/husky/pull/1346)

### [`v9.0.2`](https://togithub.com/typicode/husky/releases/tag/v9.0.2)

[Compare Source](https://togithub.com/typicode/husky/compare/v9.0.1...v9.0.2)

#### What's Changed

-   fix: exit code by [@&#8203;gergelypap](https://togithub.com/gergelypap) in [https://github.com/typicode/husky/pull/1336](https://togithub.com/typicode/husky/pull/1336)
-   docs: typo by [@&#8203;chalkygames123](https://togithub.com/chalkygames123) in [https://github.com/typicode/husky/pull/1337](https://togithub.com/typicode/husky/pull/1337)

#### New Contributors

-   [@&#8203;gergelypap](https://togithub.com/gergelypap) made their first contribution in [https://github.com/typicode/husky/pull/1336](https://togithub.com/typicode/husky/pull/1336)

**Full Changelog**: https://github.com/typicode/husky/compare/v9.0.1...v9.0.2

### [`v9.0.1`](https://togithub.com/typicode/husky/releases/tag/v9.0.1)

[Compare Source](https://togithub.com/typicode/husky/compare/v8.0.3...v9.0.1)

<p align="center">
Kicking off the year with an exciting update!
</p>

<p align="center">
<img src="https://github.com/typicode/husky/assets/5502029/457ab087-e935-4196-b99f-601ecf37f263" height="400px" alt="" />
</p>

#### TLDR;

Improved user experience and a (even) smaller package size while packing in more features!

#### 👋 By the Way

**I'm available for remote work** (Front-end/Back-end mainly JS/TS but open to other stacks Rails, Go, Elixir). You can contact me at my mail: typicode at gmail 🙂

#### Introducing `husky init`

Adding husky to a project is now easier than ever. Although the installation process was straightforward, it often required consulting the documentation.

##### v8

```shell
npm pkg set scripts.prepare="husky install"
npm run prepare
npx husky add .husky/pre-commit "npm test"
```

##### v9

```shell
npx husky init
```

#### Adding a New Hook

Adding a hook is now as simple as creating a file. This can be accomplished using your favorite editor, a script or a basic `echo` command.

##### v8

```shell
npx husky add  .husky/pre-commit "npm test"
git add --chmod=+x .husky/pre-commit # On Windows
```

##### v9

```shell
echo "npm test" > .husky/pre-commit
```

#### Further Size Reduction

`v8` was already the most compact Git hooks manager at approximately `6kB`.

`v9` takes this a step further, reducing the size to just `3kB`, likely making it the smallest devDependency in your toolkit.

**To give you an idea of how small it is, the biggest file in the project is the MIT license 😄**

#### More to Come

Additional features are in the pipeline for `v9`. Stay tuned 🙌

#### Other Changes

-   **Enhanced security** with CI and npm `--provenance` for safer publishing.
-   Added **`$XDG_CONFIG_HOME`** support. Move `~/.huskyrc` to `~/.config/husky/init.sh` for centralized configuration.
-   **Fixed permission issue for Windows-created hooks**; they no longer need to be executable.
-   Removed `husky install`. Use `husky` or `husky some/dir` for the same functionality (deprecation notice to be added).
-   Modified behavior when `.git` is missing; it now triggers a warning instead of failure.
-   Replaced `HUSKY_DEBUG=1` with `HUSKY=2` for debugging.
-   Updated the Husky API for module usage.
-   Transitioned to `ESM` for module usage.
-   Dropped support for Node 14 and 16.
-   Revamped docs.

#### How to Migrate

`v9` is backward compatible with `v8`, allowing you to freely upgrade and migrate your hooks later.

`package.json`

```diff
{
  "scripts": {
-   "prepare": "husky install"
+   "prepare": "husky"
  }
}
```

`.husky/pre-commit`

```diff
- #!/usr/bin/env sh
- . "$(dirname -- "$0")/_/husky.sh"
npm test
```

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMzUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEzNS4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2024-01-26 02:53:34 +00:00
LongYinan
59788aa334 chore: bump up @reforged/maker-appimage version to v4 (#5709)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@reforged/maker-appimage](https://togithub.com/SpacingBat3/ReForged) | [`^3.3.1` -> `^4.0.0`](https://renovatebot.com/diffs/npm/@reforged%2fmaker-appimage/3.3.1/4.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@reforged%2fmaker-appimage/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@reforged%2fmaker-appimage/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@reforged%2fmaker-appimage/3.3.1/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@reforged%2fmaker-appimage/3.3.1/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>SpacingBat3/ReForged (@&#8203;reforged/maker-appimage)</summary>

### [`v4.0.0`](1657b03766...f829e7a954)

[Compare Source](1657b03766...f829e7a954)

### [`v3.3.2`](45d28765c2...1657b03766)

[Compare Source](45d28765c2...1657b03766)

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMzUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEzNS4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2024-01-26 02:41:08 +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
LongYinan
db3891ba33 chore: bump up @blocksuite/icons version to v2.1.43 (#5702)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@blocksuite/icons](https://togithub.com/toeverything/icons) | [`2.1.42` -> `2.1.43`](https://renovatebot.com/diffs/npm/@blocksuite%2ficons/2.1.42/2.1.43) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@blocksuite%2ficons/2.1.43?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@blocksuite%2ficons/2.1.43?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@blocksuite%2ficons/2.1.42/2.1.43?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@blocksuite%2ficons/2.1.42/2.1.43?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>toeverything/icons (@&#8203;blocksuite/icons)</summary>

### [`v2.1.43`](fe902db67e...13299f7ede)

[Compare Source](fe902db67e...13299f7ede)

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMzUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEzNS4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2024-01-25 08:56:39 +00:00
李华桥
79b39f14d2 Merge branch 'canary' into stable 2024-01-25 13:46:21 +08:00
Cats Juice
e7307d969c chore(core): remove journal experimental flag (#5698) 2024-01-25 05:33:57 +00:00
Joooye_34
bd8c7751db chore: update base version to 0.12.0 (#5695) 2024-01-25 05:17:35 +00:00
李华桥
619420cfd1 chore: recover yarn.lock 2024-01-25 00:38:29 +08:00
李华桥
739e914b5f Merge branch 'canary' into stable 2024-01-25 00:33:28 +08:00
Cats Juice
9aa421d5e1 fix(core): modify journal page title today style, add weekday tag (#5687)
fix [TOV-434](https://linear.app/affine-design/issue/TOV-434/修改-journal-中-「today」的字体大小和日期-title-大小)

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://github.com/toeverything/AFFiNE/assets/39363750/ac0ab085-5ff7-4d27-a0b1-11d97fdd8074">
  <img width="100%" alt="" src="https://github.com/toeverything/AFFiNE/assets/39363750/3b311130-ded2-4651-badd-65dd059b7bc5">
</picture>
2024-01-24 13:07:20 +00:00
Cats Juice
3f96b9778f fix(core): change journal header week-date-picker's max-width (#5688)
Fix [TOV-444](https://linear.app/affine-design/issue/TOV-444/修改-journal-date-picker-max-width)
2024-01-24 12:54:34 +00:00
JimmFly
ad1521fd81 feat(core): adjust member order (#5685)
close #5686

`Owner >> Unaccepted > Admin > Write > Read`

This algorithm contains two parts: firstly, it calculates the weight of the Member (calculateWeight), and then, it uses set weights to sort the Members (useMembers).

In the calculateWeight part, the computation of the weight involves three primary factors:

1. **Permission Level**: The `Owner` is given the highest weight of `4`, followed by `Admin` with a weight of `3`, then `Write` with a weight of `2`, and finally, `Read`, with a weight of `1`.
2. **Acceptance Status**: `Unaccepted` members have a higher weight, this weight is `1`.
3. The weight corresponding to the permission level, if the member does not exist, this weight is 0.

These three `factors` are stored in the factors array and then processed through the reduce function for weighted sum calculation. Among them, `factor * Math.pow(10, arr.length - 1 - index)` means the more significant weight factors (i.e., the earlier factors) will be assigned a higher value.

Sorting rules are primarily based on the weight values obtained from the calculateWeight function. If the weights are identical, it then sorts by name, here assuming the weight of the name being `null` is the highest. If the names are not `null`, they are sorted alphabetically.
2024-01-24 12:44:01 +00:00
liuyi
0f67c683c9 fix(server): add metrics missing attributes (#5682) 2024-01-24 08:06:34 +00:00
JimmFly
25897dc404 feat(workspace): add blob and storage limit (#5535)
close TOV-343 AFF-508 TOV-461 TOV-460 TOV-419

Add `isOverCapacity ` status to detect if blob usage exceeds limits.
Add `onCapacityChange` and `onBlobSet` to monitor if the storage or blob exceeds the capacity limit.
Global modals `LocalQuotaModal` and `CloudQuotaModal` have been added, with the upload size of the blob being limited within the modal components.
The notification component has been adjusted, now you can pass in `action` click events and `actionLabel` .
2024-01-24 07:34:51 +00:00
Chen
c566952e09 feat: bump blocksuite (#5673) 2024-01-24 15:13:12 +08:00
liuyi
151a53c575 fix(server): disable payment module requirements temporarily (#5683) 2024-01-24 03:17:21 +00:00
Peng Xiao
a687e7c0ed fix(core): workspace feature should be workspace specific (#5677)
fix TOV-429
2024-01-24 03:07:51 +00:00
Peng Xiao
994ab96688 fix(playground): storybook story load issue (#5672)
Since the properties adapter now depends on whenLoaded status of the ydoc, we may need to explicitly mark doc as emit if the workspace is created without using a provider.
2024-01-24 02:56:07 +00:00
Peng Xiao
c2a978f0f2 fix: create page button offset issue on non-windows desktop app (#5669)
fix TOV-428
2024-01-24 02:56:04 +00:00
Peng Xiao
f62b67de61 fix(core): should set lang when locale changes (#5679)
this + https://github.com/toeverything/design/pull/110 should fix #5591

fix TOV-457

Reason: HTML requires `lang` to be set to render the correct CJK glyphs.

https://heistak.github.io/your-code-displays-japanese-wrong

<img width="692" alt="image" src="https://github.com/toeverything/AFFiNE/assets/584378/1d350219-5157-42cb-8e98-76d92d55b41e">
2024-01-24 02:43:22 +00:00
Peng Xiao
65b538ee45 chore: bump @toeverything/theme (#5680) 2024-01-24 02:43:19 +00:00
Joooye_34
fecf055867 ci: check yarn dedupe in ci lint stage (#5678) 2024-01-23 12:41:50 +00:00
liuyi
5e9739eb3a fix(server): del staled update count cache if unmatch (#5674) 2024-01-23 16:55:49 +08:00
DarkSky
8bbe2e3bb1 feat: use custom image/preview link (#5584)
dep toeverything/blocksuite#5969
2024-01-23 08:53:57 +00:00
liuyi
62169c59c8 fix(server): del staled update count cache if unmatch (#5674) 2024-01-23 08:19:29 +00:00
Cats Juice
8300df4a26 fix(core): correct typo in onboarding 'get start' (#5666) 2024-01-23 04:54:22 +00:00
Cats Juice
6c8621bdcd chore(core): bump @toeverything/theme, add cssVar use case (#5667) 2024-01-23 04:39:07 +00:00
LongYinan
021105c115 chore: bump up @blocksuite/icons version to v2.1.42 (#5668)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@blocksuite/icons](https://togithub.com/toeverything/icons) | [`2.1.41` -> `2.1.42`](https://renovatebot.com/diffs/npm/@blocksuite%2ficons/2.1.41/2.1.42) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@blocksuite%2ficons/2.1.42?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@blocksuite%2ficons/2.1.42?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@blocksuite%2ficons/2.1.41/2.1.42?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@blocksuite%2ficons/2.1.41/2.1.42?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>toeverything/icons (@&#8203;blocksuite/icons)</summary>

### [`v2.1.42`](fdca7d8e2e...fe902db67e)

[Compare Source](fdca7d8e2e...fe902db67e)

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMzUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEzNS4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2024-01-23 04:27:58 +00:00
Peng Xiao
ecdb5b3407 fix(core): properties adapter reactivitiy issue (#5661) 2024-01-23 01:41:44 +00:00
Peng Xiao
03b60a63cd fix: remove incorrect commit (#5660) 2024-01-23 01:41:39 +00:00
Cats Juice
45cc75a814 ci(component): deploy ui storybook (#5655) 2024-01-22 10:25:33 +00:00
Cats Juice
35e7b41ca8 fix(component): adjust the style of Switch to match the design (#5636)
closes #5635
2024-01-22 10:14:32 +00:00
Joooye_34
fccdf8ede7 feat: bump blocksuite (#5642)
f0c45fd...4e2c95a
2024-01-22 08:37:32 +00:00
Peng Xiao
0ed26f51af feat(core): adopt editor features for journal (#5638) 2024-01-22 08:25:31 +00:00
Peng Xiao
f41b7d7e71 feat(component): react wrapper for blocksuite editor (#5606)
A React wrapper for blocksuite editor from title/meta/doc/edgless fragments.
This PR only **clones** the `AffineEditorContainer`'s existing behavior and make it easier for extension in affine later.

fix TOV-315

### Some core issues:

A customized version of `createComponent` from `@lit/react`. The [existing and solutions in the community](https://github.com/lit/lit/issues/4435) does not work well in our case.
Alternatively in this PR the approach we have is to create web component instances in React lifecycle and then append them to DOM. However this make it hard to wrap the exported Lit component's using React and therefore we will have an additional wrapper tag for the wrapped web component.

To mitigate the migration issue on using React instead of Lit listed on last day, we now use [a proxy to mimic the wrapped React component](https://github.com/toeverything/AFFiNE/pull/5606/files#diff-5b7f0ae7b52a08739d50e78e9ec803c26ff3d3e5437581c692add0de12d3ede5R142-R183) into an `AffineEditorContainer` instance.
2024-01-22 08:25:29 +00:00
Peng Xiao
735e1cb117 feat(core): page info adapter for journal (#5561)
Page info adapter + schema.
Adapted for journal features.

![image](https://github.com/toeverything/AFFiNE/assets/584378/2731ed2b-a125-4d62-b658-f2aff49d0e17)
2024-01-22 08:25:27 +00:00
LongYinan
8b92cc0cae chore: decrease the instances count on gcp (#5658) 2024-01-22 08:02:26 +00:00
LongYinan
3de6424a65 fix(server): missing google oauth in auth providers (#5656) 2024-01-22 08:02:24 +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
DarkSky
ae8401b6f4 feat: skip update quota if same as latest activated quota (#5631) 2024-01-22 06:50:05 +00:00
LongYinan
fb93f59aea chore: bump up vite version to v5.0.12 [SECURITY] (#5648)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [vite](https://vitejs.dev) ([source](https://togithub.com/vitejs/vite/tree/HEAD/packages/vite)) | [`5.0.6` -> `5.0.12`](https://renovatebot.com/diffs/npm/vite/5.0.6/5.0.12) | [![age](https://developer.mend.io/api/mc/badges/age/npm/vite/5.0.12?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/vite/5.0.12?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/vite/5.0.6/5.0.12?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vite/5.0.6/5.0.12?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

### GitHub Vulnerability Alerts

#### [CVE-2024-23331](https://togithub.com/vitejs/vite/security/advisories/GHSA-c24v-8rfc-w8vw)

### Summary
[Vite dev server option](https://vitejs.dev/config/server-options.html#server-fs-deny) `server.fs.deny` can be bypassed on case-insensitive file systems using case-augmented versions of filenames. Notably this affects servers hosted on Windows.

This bypass is similar to https://nvd.nist.gov/vuln/detail/CVE-2023-34092 -- with surface area reduced to hosts having case-insensitive filesystems.

### Patches
Fixed in vite@5.0.12, vite@4.5.2, vite@3.2.8, vite@2.9.17

### Details
Since `picomatch` defaults to case-sensitive glob matching, but the file server doesn't discriminate; a blacklist bypass is possible.

See `picomatch`  usage, where `nocase` is defaulted to `false`: https://github.com/vitejs/vite/blob/v5.1.0-beta.1/packages/vite/src/node/server/index.ts#L632

By requesting raw filesystem paths using augmented casing, the matcher derived from `config.server.fs.deny` fails to block access to sensitive files.

### PoC
**Setup**
1. Created vanilla Vite project using `npm create vite@latest` on a Standard Azure hosted Windows 10 instance.
    - `npm run dev -- --host 0.0.0.0`
    - Publicly accessible for the time being here: http://20.12.242.81:5173/
2. Created dummy secret files, e.g. `custom.secret` and `production.pem`
3. Populated `vite.config.js` with
```javascript
export default { server: { fs: { deny: ['.env', '.env.*', '*.{crt,pem}', 'custom.secret'] } } }
```

**Reproduction**
1. `curl -s http://20.12.242.81:5173/@&#8203;fs//`
    - Descriptive error page reveals absolute filesystem path to project root
2. `curl -s http://20.12.242.81:5173/@&#8203;fs/C:/Users/darbonzo/Desktop/vite-project/vite.config.js`
    - Discoverable configuration file reveals locations of secrets
3. `curl -s http://20.12.242.81:5173/@&#8203;fs/C:/Users/darbonzo/Desktop/vite-project/custom.sEcReT`
    - Secrets are directly accessible using case-augmented version of filename

**Proof**
![Screenshot 2024-01-19 022736](https://user-images.githubusercontent.com/907968/298020728-3a8d3c06-fcfd-4009-9182-e842f66a6ea5.png)

### Impact
**Who**
- Users with exposed dev servers on environments with case-insensitive filesystems

**What**
- Files protected by `server.fs.deny` are both discoverable, and accessible

---

### Release Notes

<details>
<summary>vitejs/vite (vite)</summary>

### [`v5.0.12`](https://togithub.com/vitejs/vite/releases/tag/v5.0.12)

[Compare Source](https://togithub.com/vitejs/vite/compare/v5.0.11...v5.0.12)

Please refer to [CHANGELOG.md](https://togithub.com/vitejs/vite/blob/v5.0.12/packages/vite/CHANGELOG.md) for details.

### [`v5.0.11`](https://togithub.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small5011-2024-01-05-small)

[Compare Source](https://togithub.com/vitejs/vite/compare/v5.0.10...v5.0.11)

-   fix: don't pretransform classic script links ([#&#8203;15361](https://togithub.com/vitejs/vite/issues/15361)) ([19e3c9a](https://togithub.com/vitejs/vite/commit/19e3c9a)), closes [#&#8203;15361](https://togithub.com/vitejs/vite/issues/15361)
-   fix: inject `__vite__mapDeps` code before sourcemap file comment ([#&#8203;15483](https://togithub.com/vitejs/vite/issues/15483)) ([d2aa096](https://togithub.com/vitejs/vite/commit/d2aa096)), closes [#&#8203;15483](https://togithub.com/vitejs/vite/issues/15483)
-   fix(assets): avoid splitting `,` inside base64 value of `srcset` attribute ([#&#8203;15422](https://togithub.com/vitejs/vite/issues/15422)) ([8de7bd2](https://togithub.com/vitejs/vite/commit/8de7bd2)), closes [#&#8203;15422](https://togithub.com/vitejs/vite/issues/15422)
-   fix(html): handle offset magic-string slice error ([#&#8203;15435](https://togithub.com/vitejs/vite/issues/15435)) ([5ea9edb](https://togithub.com/vitejs/vite/commit/5ea9edb)), closes [#&#8203;15435](https://togithub.com/vitejs/vite/issues/15435)
-   chore(deps): update dependency strip-literal to v2 ([#&#8203;15475](https://togithub.com/vitejs/vite/issues/15475)) ([49d21fe](https://togithub.com/vitejs/vite/commit/49d21fe)), closes [#&#8203;15475](https://togithub.com/vitejs/vite/issues/15475)
-   chore(deps): update tj-actions/changed-files action to v41 ([#&#8203;15476](https://togithub.com/vitejs/vite/issues/15476)) ([2a540ee](https://togithub.com/vitejs/vite/commit/2a540ee)), closes [#&#8203;15476](https://togithub.com/vitejs/vite/issues/15476)

### [`v5.0.10`](https://togithub.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small5010-2023-12-15-small)

[Compare Source](https://togithub.com/vitejs/vite/compare/v5.0.9...v5.0.10)

-   fix: omit protocol does not require pre-transform ([#&#8203;15355](https://togithub.com/vitejs/vite/issues/15355)) ([d9ae1b2](https://togithub.com/vitejs/vite/commit/d9ae1b2)), closes [#&#8203;15355](https://togithub.com/vitejs/vite/issues/15355)
-   fix(build): use base64 for inline SVG if it contains both single and double quotes ([#&#8203;15271](https://togithub.com/vitejs/vite/issues/15271)) ([1bbff16](https://togithub.com/vitejs/vite/commit/1bbff16)), closes [#&#8203;15271](https://togithub.com/vitejs/vite/issues/15271)

### [`v5.0.9`](https://togithub.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small509-2023-12-14-small)

[Compare Source](https://togithub.com/vitejs/vite/compare/v5.0.8...v5.0.9)

-   fix: htmlFallbackMiddleware for favicon ([#&#8203;15301](https://togithub.com/vitejs/vite/issues/15301)) ([c902545](https://togithub.com/vitejs/vite/commit/c902545)), closes [#&#8203;15301](https://togithub.com/vitejs/vite/issues/15301)
-   fix: more stable hash calculation for depsOptimize ([#&#8203;15337](https://togithub.com/vitejs/vite/issues/15337)) ([2b39fe6](https://togithub.com/vitejs/vite/commit/2b39fe6)), closes [#&#8203;15337](https://togithub.com/vitejs/vite/issues/15337)
-   fix(scanner): catch all external files for glob imports ([#&#8203;15286](https://togithub.com/vitejs/vite/issues/15286)) ([129d0d0](https://togithub.com/vitejs/vite/commit/129d0d0)), closes [#&#8203;15286](https://togithub.com/vitejs/vite/issues/15286)
-   fix(server): avoid chokidar throttling on startup ([#&#8203;15347](https://togithub.com/vitejs/vite/issues/15347)) ([56a5740](https://togithub.com/vitejs/vite/commit/56a5740)), closes [#&#8203;15347](https://togithub.com/vitejs/vite/issues/15347)
-   fix(worker): replace `import.meta` correctly for IIFE worker ([#&#8203;15321](https://togithub.com/vitejs/vite/issues/15321)) ([08d093c](https://togithub.com/vitejs/vite/commit/08d093c)), closes [#&#8203;15321](https://togithub.com/vitejs/vite/issues/15321)
-   feat: log re-optimization reasons ([#&#8203;15339](https://togithub.com/vitejs/vite/issues/15339)) ([b1a6c84](https://togithub.com/vitejs/vite/commit/b1a6c84)), closes [#&#8203;15339](https://togithub.com/vitejs/vite/issues/15339)
-   chore: temporary typo ([#&#8203;15329](https://togithub.com/vitejs/vite/issues/15329)) ([7b71854](https://togithub.com/vitejs/vite/commit/7b71854)), closes [#&#8203;15329](https://togithub.com/vitejs/vite/issues/15329)
-   perf: avoid computing paths on each request ([#&#8203;15318](https://togithub.com/vitejs/vite/issues/15318)) ([0506812](https://togithub.com/vitejs/vite/commit/0506812)), closes [#&#8203;15318](https://togithub.com/vitejs/vite/issues/15318)
-   perf: temporary hack to avoid fs checks for /[@&#8203;react-refresh](https://togithub.com/react-refresh) ([#&#8203;15299](https://togithub.com/vitejs/vite/issues/15299)) ([b1d6211](https://togithub.com/vitejs/vite/commit/b1d6211)), closes [#&#8203;15299](https://togithub.com/vitejs/vite/issues/15299)

### [`v5.0.8`](https://togithub.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small508-2023-12-12-small)

[Compare Source](https://togithub.com/vitejs/vite/compare/v5.0.7...v5.0.8)

-   perf: cached fs utils ([#&#8203;15279](https://togithub.com/vitejs/vite/issues/15279)) ([c9b61c4](https://togithub.com/vitejs/vite/commit/c9b61c4)), closes [#&#8203;15279](https://togithub.com/vitejs/vite/issues/15279)
-   fix: missing warmupRequest in transformIndexHtml ([#&#8203;15303](https://togithub.com/vitejs/vite/issues/15303)) ([103820f](https://togithub.com/vitejs/vite/commit/103820f)), closes [#&#8203;15303](https://togithub.com/vitejs/vite/issues/15303)
-   fix: public files map will be updated on add/unlink in windows ([#&#8203;15317](https://togithub.com/vitejs/vite/issues/15317)) ([921ca41](https://togithub.com/vitejs/vite/commit/921ca41)), closes [#&#8203;15317](https://togithub.com/vitejs/vite/issues/15317)
-   fix(build): decode urls in CSS files (fix [#&#8203;15109](https://togithub.com/vitejs/vite/issues/15109)) ([#&#8203;15246](https://togithub.com/vitejs/vite/issues/15246)) ([ea6a7a6](https://togithub.com/vitejs/vite/commit/ea6a7a6)), closes [#&#8203;15109](https://togithub.com/vitejs/vite/issues/15109) [#&#8203;15246](https://togithub.com/vitejs/vite/issues/15246)
-   fix(deps): update all non-major dependencies ([#&#8203;15304](https://togithub.com/vitejs/vite/issues/15304)) ([bb07f60](https://togithub.com/vitejs/vite/commit/bb07f60)), closes [#&#8203;15304](https://togithub.com/vitejs/vite/issues/15304)
-   fix(ssr): check esm file with normal file path ([#&#8203;15307](https://togithub.com/vitejs/vite/issues/15307)) ([1597170](https://togithub.com/vitejs/vite/commit/1597170)), closes [#&#8203;15307](https://togithub.com/vitejs/vite/issues/15307)

### [`v5.0.7`](https://togithub.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small507-2023-12-08-small)

[Compare Source](https://togithub.com/vitejs/vite/compare/v5.0.6...v5.0.7)

-   fix: suppress terser warning if minify disabled ([#&#8203;15275](https://togithub.com/vitejs/vite/issues/15275)) ([3e42611](https://togithub.com/vitejs/vite/commit/3e42611)), closes [#&#8203;15275](https://togithub.com/vitejs/vite/issues/15275)
-   fix: symbolic links in public dir ([#&#8203;15264](https://togithub.com/vitejs/vite/issues/15264)) ([ef2a024](https://togithub.com/vitejs/vite/commit/ef2a024)), closes [#&#8203;15264](https://togithub.com/vitejs/vite/issues/15264)
-   fix(html): skip inlining icon and manifest links ([#&#8203;14958](https://togithub.com/vitejs/vite/issues/14958)) ([8ad81b4](https://togithub.com/vitejs/vite/commit/8ad81b4)), closes [#&#8203;14958](https://togithub.com/vitejs/vite/issues/14958)
-   chore: remove unneeded condition in getRealPath ([#&#8203;15267](https://togithub.com/vitejs/vite/issues/15267)) ([8e4655c](https://togithub.com/vitejs/vite/commit/8e4655c)), closes [#&#8203;15267](https://togithub.com/vitejs/vite/issues/15267)
-   perf: cache empty optimizer result ([#&#8203;15245](https://togithub.com/vitejs/vite/issues/15245)) ([8409b66](https://togithub.com/vitejs/vite/commit/8409b66)), closes [#&#8203;15245](https://togithub.com/vitejs/vite/issues/15245)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "" (UTC), 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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMzUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEzNS4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2024-01-20 13:36:05 +00:00
JimmFly
353b27d796 refactor(component): adapt the questionnaire component to the desktop client (#5514)
close TOV-240

Windows desktop:
<img width="1145" alt="image" src="https://github.com/toeverything/AFFiNE/assets/102217452/6b12a6bd-c020-4d02-a366-e97e1afd1e10">

MacOS desktop:
<img width="1187" alt="image" src="https://github.com/toeverything/AFFiNE/assets/102217452/9a3c909c-b283-4ddc-a187-3db12b26a7f5">

Web:
<img width="1438" alt="image" src="https://github.com/toeverything/AFFiNE/assets/102217452/e8e04258-9275-470d-a3f8-5d18f5b29eb3">
2024-01-19 10:07:18 +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
9d28eb530a feat: upgrade electron and playwright (#5632) 2024-01-19 03:16:06 +00:00
LongYinan
cf2ad141ea chore: upgrade perfsee sdk (#5629)
packages version info are missing: https://perfsee.com/projects/perfsee/bundle/1346?tab=packages
2024-01-19 10:58:36 +08:00
HeJiachen-PM
dc68ffd127 docs: update readme (#5637) 2024-01-19 02:02:25 +00:00
Cats Juice
351f1b73b4 feat(core): add journal entrance for app-sidebar (#5579) 2024-01-18 14:40:35 +00:00
Cats Juice
65bcdcafde feat(core): add experimental flag for journal (#5578) 2024-01-18 14:05:17 +00:00
Cats Juice
f4b26a16f8 feat(core): journal sidebar conflict block (#5574) 2024-01-18 14:05:15 +00:00
Cats Juice
7aaec3ad51 feat(core): add daily count for journal sidebar (#5559) 2024-01-18 12:54:44 +00:00
JimmFly
a7e8664959 fix(core): reserve space for the editor scrollbar (#5625)
Because the space for the scroll bar on the right is reserved, in order to make the editor symmetrical, padding corresponding to the width of the scroll bar is added to the left.
2024-01-18 12:44:27 +00:00
Cats Juice
70ea1e5ef8 feat(core): journal sidebar dater-picker navigation (#5558) 2024-01-18 12:34:23 +00:00
Cats Juice
496dc588be feat(core): journal extension loader (#5557) 2024-01-18 09:27:56 +00:00
regischen
8b1b5b2e93 feat: bump blocksuite (#5624) 2024-01-18 17:26:31 +08:00
DarkSky
c3fda80599 feat: use nx cloud runner (#5626) 2024-01-18 08:18:37 +00:00
Peng Xiao
9a944048e8 feat(core): experimental features ui (#5338)
fix TOV-280

experimental features ui
- enabled in the workspace settings for a cloud workspace; only show for workspace owner + early access
- a disclaimer prompt will be shown before going to the next feature setting page
- for now only show the ai poc switch, which controls the display of the ai tab in editor's sidepanel
2024-01-18 07:53:15 +00:00
Cats Juice
cabedef426 feat(core): journal hooks and page header layout (#5549)
feat(core): split page header items

feat(core): journal page judgment and header layout

feat(core): Add journal today button and style changes to share menu
2024-01-18 07:17:14 +00:00
Cats Juice
a64854319e feat(core): add document title for shared page (#5596) 2024-01-18 07:04:37 +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
9fdbb3ac3d fix(server): should not listen on user defined host (#5622) 2024-01-18 04:59:53 +00:00
EYHN
74a3a795bd fix(workspace): check session before get workspaces (#5621) 2024-01-18 04:46:52 +00:00
LongYinan
aa437bcd35 fix(core): remove hash prefix from cdn path (#5509)
The hash prefix will cause cache invalidate during deployment
It's for debug purpose but I forgot to remove it
2024-01-18 03:50:24 +00:00
Cats Juice
943ede4ffd feat(component): new inline-edit component (#5517)
<picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://github.com/toeverything/AFFiNE/assets/39363750/6dad59f0-5e63-4c25-a81c-dff397da1d34">
  <img height="100" alt="" src="https://github.com/toeverything/AFFiNE/assets/39363750/7c30d7b2-55c9-49eb-82e7-a0882f2e0493">
</picture>
2024-01-18 03:33:47 +00:00
liuyi
f419867437 chore(server): remove useless log (#5620) 2024-01-18 03:19:20 +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
LongYinan
5b84366de3 chore: bump up actions/cache action to v4 (#5616)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/cache](https://togithub.com/actions/cache) | action | major | `v3` -> `v4` |

---

### Release Notes

<details>
<summary>actions/cache (actions/cache)</summary>

### [`v4`](https://togithub.com/actions/cache/compare/v3...v4)

[Compare Source](https://togithub.com/actions/cache/compare/v3...v4)

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMzUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEzNS4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2024-01-18 02:37:47 +00:00
Cats Juice
2b92b27f8f feat(component): new week-date-picker component (#5477)
<picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://github.com/toeverything/AFFiNE/assets/39363750/49d7a1ee-2832-4b61-a427-e627dae92952">
  <img height="100" alt="" src="https://github.com/toeverything/AFFiNE/assets/39363750/819d6ee9-38e0-4537-ad0f-ec9faf96f505">
</picture>
2024-01-18 02:14:27 +00:00
DarkSky
ee8ec47a4f feat: use SafeInt replace Float (#5613) 2024-01-17 12:36:21 +00:00
liuyi
b9f20877d0 feat(core): make password sigin default if user has one (#5577) 2024-01-17 11:13:58 +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
00acc49342 chore(server): remove octobase storage usage (#5594)
since all blobs have been successfully migrated to r2, the octobase blob functions are no longer necessary.
2024-01-17 10:22:35 +00:00
Cats Juice
2db3c933fa refactor(component): move date-picker to ui, add story, support responsive (#5468)
- move to `component/ui`
- add `AFFiNEDatePicker` & `BlocksuiteDatePicker` story
- inline mode support
- responsive support
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://github.com/toeverything/AFFiNE/assets/39363750/320bef49-380f-40a2-b3b2-4b74dd2d8da4">
    <img  alt="" src="https://github.com/toeverything/AFFiNE/assets/39363750/fc9e7808-02fe-49a1-aa78-aea254fb1f9d">
  </picture>
2024-01-17 09:16:46 +00:00
DarkSky
8f80bdb7af feat: new free plan (#5604) 2024-01-17 07:20:18 +00:00
LongYinan
3f87d04481 chore: bump up postcss-loader version to v8 (#5609)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [postcss-loader](https://togithub.com/webpack-contrib/postcss-loader) | [`^7.3.3` -> `^8.0.0`](https://renovatebot.com/diffs/npm/postcss-loader/7.3.3/8.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/postcss-loader/8.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/postcss-loader/8.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/postcss-loader/7.3.3/8.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/postcss-loader/7.3.3/8.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>webpack-contrib/postcss-loader (postcss-loader)</summary>

### [`v8.0.0`](https://togithub.com/webpack-contrib/postcss-loader/blob/HEAD/CHANGELOG.md#800-2024-01-16)

[Compare Source](https://togithub.com/webpack-contrib/postcss-loader/compare/v7.3.4...v8.0.0)

##### ⚠ BREAKING CHANGES

-   minimum supported Node.js version is `18.12.0` ([#&#8203;677](https://togithub.com/webpack-contrib/postcss-loader/issues/677)) ([8dd0315](8dd0315c03))

##### [7.3.4](https://togithub.com/webpack-contrib/postcss-loader/compare/v7.3.3...v7.3.4) (2023-12-27)

##### Bug Fixes

-   do not crash if pkg.(d|devD)ependencies unset ([#&#8203;667](https://togithub.com/webpack-contrib/postcss-loader/issues/667)) ([8ef0c7e](8ef0c7e5c6))

##### [7.3.3](https://togithub.com/webpack-contrib/postcss-loader/compare/v7.3.2...v7.3.3) (2023-06-10)

##### Bug Fixes

-   **perf:** avoid using `klona` for postcss options ([#&#8203;658](https://togithub.com/webpack-contrib/postcss-loader/issues/658)) ([e754c3f](e754c3f845))
-   bug with loading configurations after updating `cosmiconfig` to version 8.2 ([684d265](684d265439))

##### [7.3.2](https://togithub.com/webpack-contrib/postcss-loader/compare/v7.3.1...v7.3.2) (2023-05-28)

##### Bug Fixes

-   use `cause` to keep original errors and warnings ([#&#8203;655](https://togithub.com/webpack-contrib/postcss-loader/issues/655)) ([e8873f4](e8873f46b4))

##### [7.3.1](https://togithub.com/webpack-contrib/postcss-loader/compare/v7.3.0...v7.3.1) (2023-05-26)

##### Bug Fixes

-   warning and error serialization ([65748ec](65748ece39))

### [`v7.3.4`](https://togithub.com/webpack-contrib/postcss-loader/blob/HEAD/CHANGELOG.md#734-2023-12-27)

[Compare Source](https://togithub.com/webpack-contrib/postcss-loader/compare/v7.3.3...v7.3.4)

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMzUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEzNS4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2024-01-17 02:56:58 +00:00
LongYinan
41083b7fec chore: bump up copy-webpack-plugin version to v12 (#5568)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [copy-webpack-plugin](https://togithub.com/webpack-contrib/copy-webpack-plugin) | [`^11.0.0` -> `^12.0.0`](https://renovatebot.com/diffs/npm/copy-webpack-plugin/11.0.0/12.0.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/copy-webpack-plugin/12.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/copy-webpack-plugin/12.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/copy-webpack-plugin/11.0.0/12.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/copy-webpack-plugin/11.0.0/12.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>webpack-contrib/copy-webpack-plugin (copy-webpack-plugin)</summary>

### [`v12.0.1`](https://togithub.com/webpack-contrib/copy-webpack-plugin/blob/HEAD/CHANGELOG.md#1201-2024-01-11)

[Compare Source](https://togithub.com/webpack-contrib/copy-webpack-plugin/compare/v12.0.0...v12.0.1)

### [`v12.0.0`](https://togithub.com/webpack-contrib/copy-webpack-plugin/blob/HEAD/CHANGELOG.md#1200-2024-01-10)

[Compare Source](https://togithub.com/webpack-contrib/copy-webpack-plugin/compare/v11.0.0...v12.0.0)

##### ⚠ BREAKING CHANGES

-   update `globby` to `14.0.0`
-   minimum supported `Node.js` version is `18.12.0` ([#&#8203;759](https://togithub.com/webpack-contrib/copy-webpack-plugin/issues/759)) ([a5b7d06](a5b7d06a05))

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMjcuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEyNy4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2024-01-16 15:44:18 +00:00
LongYinan
823ea92f62 chore: bump up happy-dom version to v13 (#5569)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [happy-dom](https://togithub.com/capricorn86/happy-dom) | [`^12.10.3` -> `^13.0.0`](https://renovatebot.com/diffs/npm/happy-dom/12.10.3/13.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/happy-dom/13.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/happy-dom/13.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/happy-dom/12.10.3/13.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/happy-dom/12.10.3/13.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>capricorn86/happy-dom (happy-dom)</summary>

### [`v13.0.0`](https://togithub.com/capricorn86/happy-dom/releases/tag/v13.0.0)

[Compare Source](https://togithub.com/capricorn86/happy-dom/compare/v12.10.3...v13.0.0)

##### 💣 Breaking Changes

-   This is a big release where a lot of the code has been refactored to improve security and to be able to support the new Browser API. A big release is always a potential risk for bugs and therefore it make sense to make this a major release to avoid that consumers automatically updates to it. ([#&#8203;466](https://togithub.com/capricorn86/happy-dom/issues/466))

##### 🎨 Features

-   Adds support for a Browser API similar to [Puppeteer](https://pptr.dev/) and [Playwright](https://playwright.dev/). With the Browser API, it is for example possible to create new pages and navigate in them. You can read more about it in the [Happy DOM Wiki](https://togithub.com/capricorn86/happy-dom/wiki). ([#&#8203;466](https://togithub.com/capricorn86/happy-dom/issues/466))
-   Improves security by not exposing sensitive internal logic to scripts running within the Happy DOM Browser. ([#&#8203;466](https://togithub.com/capricorn86/happy-dom/issues/466))
-   Improves support for CORS management. It now supports "OPTIONS" requests to detect if the client is allowed to proceed with a cross origin request. ([#&#8203;466](https://togithub.com/capricorn86/happy-dom/issues/466))
-   Adds support for HTTP response cache. The cache is in memory, but the plan is to add support for storing it on disk in the future. ([#&#8203;466](https://togithub.com/capricorn86/happy-dom/issues/466))
-   Improves support for `XMLHttpRequest`. It now supports the GZip, Deflate and Brotli encodings. ([#&#8203;466](https://togithub.com/capricorn86/happy-dom/issues/466))
-   Adds support for adding a process level error event listener for capturing errors. This is useful when using the Browser API, but will not work in environments such as [Jest](https://jestjs.io/) and [Vitest](https://vitest.dev/), as it collides with their error listener. ([#&#8203;466](https://togithub.com/capricorn86/happy-dom/issues/466))
-   Adds support for `Ẁindow.open()`. ([#&#8203;466](https://togithub.com/capricorn86/happy-dom/issues/466))
-   Adds support for `Ẁindow.close()`. This function should now be used when tearing down the environment. ([#&#8203;466](https://togithub.com/capricorn86/happy-dom/issues/466))
-   Improves support for cookies. ([#&#8203;466](https://togithub.com/capricorn86/happy-dom/issues/466))
-   Improves support for `HTMLIFrameElement`. ([#&#8203;466](https://togithub.com/capricorn86/happy-dom/issues/466))
-   Changes export of types to use "import type" and "export type" in "index.js". This will allow transpilers/compilers to optimize better. ([#&#8203;466](https://togithub.com/capricorn86/happy-dom/issues/466))
-   Adds support for navigating when clicking on an anchor link. ([#&#8203;466](https://togithub.com/capricorn86/happy-dom/issues/466))
-   Adds support for navigating when setting `Location.href`. ([#&#8203;466](https://togithub.com/capricorn86/happy-dom/issues/466))
-   Improves support for `MutationObserver`. It will not collect multiple records with a microtask. It now also supports `MutationObserver.takeRecords()` for records that has not yet been published. ([#&#8203;466](https://togithub.com/capricorn86/happy-dom/issues/466))
-   Deprecates "[@&#8203;happy-dom/uncaught-exception-observer](https://togithub.com/happy-dom/uncaught-exception-observer)" as the functionality is supported by "happy-dom" out of the box now. ([#&#8203;466](https://togithub.com/capricorn86/happy-dom/issues/466))
-   Uses Symbol for public internal properties instead of using "\_" as a prefix, so that internal properties won't be enumerable. This will also make sure that these properties won't clash with properties defined by the consumer. ([#&#8203;466](https://togithub.com/capricorn86/happy-dom/issues/466))

##### 👷‍♂️ Patch fixes

-   Improves the check for if the property is a class to avoid that it gets bound in "[@&#8203;happy-dom/global-registrator](https://togithub.com/happy-dom/global-registrator)". We only want functions to get bound to the global context. ([#&#8203;466](https://togithub.com/capricorn86/happy-dom/issues/466))
-   Fixes bug where `new Document()` did'nt work according to spec. ([#&#8203;466](https://togithub.com/capricorn86/happy-dom/issues/466))
-   Fixes bug where several Element classes wheren't available as properties on `Window`. ([#&#8203;466](https://togithub.com/capricorn86/happy-dom/issues/466))
-   Fixes bug in `Document.importNode()` where it didn't change `ownerDocument` on child nodes. ([#&#8203;466](https://togithub.com/capricorn86/happy-dom/issues/466))
-   Resets static `ownerDocument` state used when creating Node instances, so that it can be garbage collected if not used anymore. ([#&#8203;466](https://togithub.com/capricorn86/happy-dom/issues/466))

***

Merry Christmas and a Happy New Year! 🎅 

This release took some time as I didn't want to release the Browser API without applying security fixes. I've also stumbled across a few other issues along the way that I felt I needed to address.

I hope you will enjoy the release!

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMjcuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEyNy4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2024-01-16 15:27:24 +00:00
LongYinan
880588ad11 chore: bump up @blocksuite/icons version to v2.1.41 (#5580)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@blocksuite/icons](https://togithub.com/toeverything/icons) | [`2.1.40` -> `2.1.41`](https://renovatebot.com/diffs/npm/@blocksuite%2ficons/2.1.40/2.1.41) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@blocksuite%2ficons/2.1.41?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@blocksuite%2ficons/2.1.41?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@blocksuite%2ficons/2.1.40/2.1.41?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@blocksuite%2ficons/2.1.40/2.1.41?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>toeverything/icons (@&#8203;blocksuite/icons)</summary>

### [`v2.1.41`](2b42f403fb...fdca7d8e2e)

[Compare Source](2b42f403fb...fdca7d8e2e)

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMjcuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEyNy4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2024-01-16 15:11:36 +00:00
DarkSky
ee2520ec18 feat: add query quota of workspace (#5603) 2024-01-16 09:45:55 +00:00
JimmFly
4f4d057aad refactor(core): replace WorkspaceSubPath in env package with the one in core package (#5537) 2024-01-16 08:26:11 +00:00
Peng Xiao
238d1ad44e fix(component): add back lottie color hack for dark mode (#5576)
Not sure why but it seems the changes in https://github.com/toeverything/AFFiNE/pull/4953 are lost
2024-01-16 08:11:51 +00:00
JimmFly
baeb5cc732 feat(core): get cloud workspace usage limit from user quota (#5518) 2024-01-16 07:57:23 +00:00
Joooye_34
d6dd837bdb chore: update favicon (#5566) 2024-01-16 07:42:32 +00:00
DarkSky
dea0aab5e3 feat: update nx config (#5597) 2024-01-16 06:41:46 +00:00
Lewis Liu
94e24d1b82 style: import from './index' instead of '.' (#5590)
Co-authored-by: LongYinan <lynweklm@gmail.com>
2024-01-16 14:39:08 +08:00
liuyi
0a89b7f528 fix(server): standalone early access users detection (#5601) 2024-01-16 11:39:36 +08:00
liuyi
75fb0a9f1a fix(server): standalone early access users detection (#5601) 2024-01-16 03:27:44 +00:00
LongYinan
2fb0e3ef15 chore: bump up source-map-loader version to v5 (#5599)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [source-map-loader](https://togithub.com/webpack-contrib/source-map-loader) | [`^4.0.1` -> `^5.0.0`](https://renovatebot.com/diffs/npm/source-map-loader/4.0.1/5.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/source-map-loader/5.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/source-map-loader/5.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/source-map-loader/4.0.1/5.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/source-map-loader/4.0.1/5.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>webpack-contrib/source-map-loader (source-map-loader)</summary>

### [`v5.0.0`](https://togithub.com/webpack-contrib/source-map-loader/blob/HEAD/CHANGELOG.md#500-2024-01-15)

[Compare Source](https://togithub.com/webpack-contrib/source-map-loader/compare/v4.0.2...v5.0.0)

##### ⚠ BREAKING CHANGES

-   minimum supported Node.js version is `18.12.0` ([#&#8203;230](https://togithub.com/webpack-contrib/source-map-loader/issues/230)) ([7fcab17](7fcab17805))

##### [4.0.2](https://togithub.com/webpack-contrib/source-map-loader/compare/v4.0.1...v4.0.2) (2023-12-27)

##### Bug Fixes

-   avoid deprecation message of `abab` package ([#&#8203;228](https://togithub.com/webpack-contrib/source-map-loader/issues/228)) ([9daafb3](9daafb3662))

##### [4.0.1](https://togithub.com/webpack-contrib/source-map-loader/compare/v4.0.0...v4.0.1) (2022-10-07)

##### Bug Fixes

-   logic when sourceRoot contains absolute URL ([e724a1f](e724a1ffbf))

### [`v4.0.2`](https://togithub.com/webpack-contrib/source-map-loader/blob/HEAD/CHANGELOG.md#402-2023-12-27)

[Compare Source](https://togithub.com/webpack-contrib/source-map-loader/compare/v4.0.1...v4.0.2)

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMjcuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEyNy4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2024-01-16 03:14:57 +00:00
liuyi
24e18dd475 fix: improve self-host convenience (#5582) 2024-01-15 09:24:53 +00:00
DarkSky
2f9b4fd0cf fix: add field polyfill for old feature (#5586) 2024-01-15 08:33:06 +00:00
liuyi
4c49b62ab7 fix(server): node imports order (#5583) 2024-01-14 05:47:56 +00:00
DarkSky
0a0ee37ac2 fix: return empty resp if user not exists in login preflight (#5588) 2024-01-13 23:30:01 +08:00
DarkSky
18907ebe57 fix: return empty resp if user not exists in login preflight (#5588) 2024-01-13 15:26:55 +00:00
Peng Xiao
a143379161 fix(electron): remove cors headers hack (#5581) 2024-01-12 16:49:16 +08:00
Peng Xiao
5aea84af8f fix(electron): remove cors headers hack (#5581) 2024-01-12 16:48:55 +08:00
regischen
8e7dedfe82 feat: bump blocksuite (#5575) 2024-01-12 12:43:56 +08:00
EYHN
d25a8547d0 refactor(core): move page list to core (#5556) 2024-01-12 12:43:45 +08:00
Peng Xiao
4d16229fea chore(core): remove affine/cmdk package (#5552)
patch cmdk based on https://github.com/pengx17/cmdk/tree/patch-1
fix https://github.com/toeverything/AFFiNE/issues/5548
2024-01-12 12:43:35 +08:00
regischen
3602f1cac0 feat: bump blocksuite (#5575) 2024-01-12 12:41:27 +08:00
liuyi
89b5c96d25 refactor(server): folder structure (#5573) 2024-01-12 04:18:39 +00:00
EYHN
99371be7e8 fix(core): workspace not found after import (#5571)
close TOV-393
2024-01-12 11:05:59 +08:00
DarkSky
d6f65ea414 feat: blob size limit with quota (#5524)
fix AFF-506 TOV-342
2024-01-11 10:21:40 +00:00
EYHN
d1c2b2a7b0 fix(core): workspace not found after import (#5571)
close TOV-393
2024-01-11 09:47:24 +00:00
liuyi
12fdb18a80 test(server): make server testing utils (#5544) 2024-01-11 06:40:55 +00:00
liuyi
9253e522aa test(server): avoid progress get hold after tests finished (#5522) 2024-01-11 06:40:53 +00:00
EYHN
5aee480c50 refactor(core): move page list to core (#5556) 2024-01-10 11:09:39 +00:00
LongYinan
237722f7f9 feat: support self-host docker build (#5506)
Test command: `docker compose -f ./.github/deployment/self-host/compose.yaml up`
2024-01-10 08:35:21 +00:00
DarkSky
0d7ffb0511 feat: add unlimited workspace support (#5523)
fix AFF-505
2024-01-10 07:28:53 +00:00
DarkSky
a59fe1b49e feat: adapted user quota for member api (#5521)
fix AFF-494 TOV-337
2024-01-10 07:28:46 +00:00
Peng Xiao
275ea74772 chore(core): remove affine/cmdk package (#5552)
patch cmdk based on https://github.com/pengx17/cmdk/tree/patch-1
fix https://github.com/toeverything/AFFiNE/issues/5548
2024-01-10 05:25:37 +00:00
李华桥
34ed8dd7a5 Merge branch 'canary' into stable 2024-01-10 10:59:28 +08:00
Joooye_34
dd671c8764 build: change space replacement when set version to fix client upgrade always problem (#5554) 2024-01-10 10:57:52 +08:00
李华桥
39b7b671b1 Merge branch 'canary' into stable 2024-01-09 19:44:52 +08:00
liuyi
ddbb5e1121 fix(server): better error handling and logging for storage (#5553) 2024-01-09 10:37:24 +00:00
李华桥
207b56d5af Merge branch 'canary' into stable 2024-01-09 17:16:17 +08:00
NavyStack
af245315c2 chore: update Korean translation (#5551) 2024-01-09 15:59:02 +08:00
Cats Juice
611c6e85bb fix(component): app sidebar will never float when menu not opened (#5529) 2024-01-09 06:46:09 +00:00
LongYinan
d376ea441d chore(deps): bump follow-redirects from 1.15.3 to 1.15.4 (#5546)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.3 to 1.15.4.
<details>
<summary>Commits</summary>
<ul>
<li><a href="65858205e5"><code>6585820</code></a> Release version 1.15.4 of the npm package.</li>
<li><a href="7a6567e16d"><code>7a6567e</code></a> Disallow bracketed hostnames.</li>
<li><a href="05629af696"><code>05629af</code></a> Prefer native URL instead of deprecated url.parse.</li>
<li><a href="1cba8e85fa"><code>1cba8e8</code></a> Prefer native URL instead of legacy url.resolve.</li>
<li><a href="72bc2a4229"><code>72bc2a4</code></a> Simplify _processResponse error handling.</li>
<li><a href="3d42aecdca"><code>3d42aec</code></a> Add bracket tests.</li>
<li><a href="bcbb096b32"><code>bcbb096</code></a> Do not directly set Error properties.</li>
<li>See full diff in <a href="https://github.com/follow-redirects/follow-redirects/compare/v1.15.3...v1.15.4">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=follow-redirects&package-manager=npm_and_yarn&previous-version=1.15.3&new-version=1.15.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/toeverything/AFFiNE/network/alerts).

</details>
2024-01-09 04:27:11 +00:00
DarkSky
eecba240d3 chore: downgrade oxlint to avoid commiting freeze (#5545) 2024-01-09 04:11:54 +00:00
LongYinan
e95126a146 dedupe lockfile 2024-01-09 11:28:01 +08:00
Lewis Liu
389ee18e42 Move vanilla extract back 2024-01-09 11:26:42 +08:00
Lewis Liu
911efcdff1 Drop unused 2024-01-09 11:26:41 +08:00
Lewis Liu
a87055754e Properly split dep and dev deps, fix phantom deps 2024-01-09 11:26:26 +08:00
NavyStack
7c71c5457a fix: add missing Korean translations for updated English text (#5534) 2024-01-09 11:19:43 +08:00
LongYinan
aaab159a53 chore: bump up @napi-rs/cli version to v3.0.0-alpha.33 (#5542)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@napi-rs/cli](https://togithub.com/napi-rs/napi-rs) | [`3.0.0-alpha.31` -> `3.0.0-alpha.33`](https://renovatebot.com/diffs/npm/@napi-rs%2fcli/3.0.0-alpha.31/3.0.0-alpha.33) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@napi-rs%2fcli/3.0.0-alpha.33?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@napi-rs%2fcli/3.0.0-alpha.33?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@napi-rs%2fcli/3.0.0-alpha.31/3.0.0-alpha.33?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@napi-rs%2fcli/3.0.0-alpha.31/3.0.0-alpha.33?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>napi-rs/napi-rs (@&#8203;napi-rs/cli)</summary>

### [`v3.0.0-alpha.33`](https://togithub.com/napi-rs/napi-rs/releases/tag/%40napi-rs/cli%403.0.0-alpha.33)

[Compare Source](https://togithub.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.32...@napi-rs/cli@3.0.0-alpha.33)

##### What's Changed

-   fix(cli): artifacts wasi worker name by [@&#8203;Brooooooklyn](https://togithub.com/Brooooooklyn) in [https://github.com/napi-rs/napi-rs/pull/1895](https://togithub.com/napi-rs/napi-rs/pull/1895)

**Full Changelog**: https://github.com/napi-rs/napi-rs/compare/[@&#8203;napi-rs/cli](https://togithub.com/napi-rs/cli)[@&#8203;3](https://togithub.com/3).0.0-alpha.32...[@&#8203;napi-rs/cli](https://togithub.com/napi-rs/cli)[@&#8203;3](https://togithub.com/3).0.0-alpha.33

### [`v3.0.0-alpha.32`](https://togithub.com/napi-rs/napi-rs/releases/tag/%40napi-rs/cli%403.0.0-alpha.32)

[Compare Source](https://togithub.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.31...@napi-rs/cli@3.0.0-alpha.32)

#### What's Changed

-   fix(cli): missing files in created wasi package by [@&#8203;Brooooooklyn](https://togithub.com/Brooooooklyn) in [https://github.com/napi-rs/napi-rs/pull/1894](https://togithub.com/napi-rs/napi-rs/pull/1894)

**Full Changelog**: https://github.com/napi-rs/napi-rs/compare/[@&#8203;napi-rs/cli](https://togithub.com/napi-rs/cli)[@&#8203;3](https://togithub.com/3).0.0-alpha.31...[@&#8203;napi-rs/cli](https://togithub.com/napi-rs/cli)[@&#8203;3](https://togithub.com/3).0.0-alpha.32

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMjEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEyMS4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2024-01-09 03:07:28 +00:00
LongYinan
af0243d1a9 chore: bump up @napi-rs/cli version to v3.0.0-alpha.31 (#5539)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@napi-rs/cli](https://togithub.com/napi-rs/napi-rs) | [`3.0.0-alpha.30` -> `3.0.0-alpha.31`](https://renovatebot.com/diffs/npm/@napi-rs%2fcli/3.0.0-alpha.30/3.0.0-alpha.31) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@napi-rs%2fcli/3.0.0-alpha.31?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@napi-rs%2fcli/3.0.0-alpha.31?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@napi-rs%2fcli/3.0.0-alpha.30/3.0.0-alpha.31?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@napi-rs%2fcli/3.0.0-alpha.30/3.0.0-alpha.31?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>napi-rs/napi-rs (@&#8203;napi-rs/cli)</summary>

### [`v3.0.0-alpha.31`](https://togithub.com/napi-rs/napi-rs/releases/tag/%40napi-rs/cli%403.0.0-alpha.31)

[Compare Source](https://togithub.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.30...@napi-rs/cli@3.0.0-alpha.31)

##### What's Changed

-   chore(deps): update dependency c8 to v9 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/napi-rs/napi-rs/pull/1889](https://togithub.com/napi-rs/napi-rs/pull/1889)
-   fix(deps): update dependency [@&#8203;tybys/wasm-util](https://togithub.com/tybys/wasm-util) to v0.8.1 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/napi-rs/napi-rs/pull/1892](https://togithub.com/napi-rs/napi-rs/pull/1892)
-   feat(cli): support generate browser compatible codes by [@&#8203;Brooooooklyn](https://togithub.com/Brooooooklyn) in [https://github.com/napi-rs/napi-rs/pull/1891](https://togithub.com/napi-rs/napi-rs/pull/1891)

**Full Changelog**: https://github.com/napi-rs/napi-rs/compare/[@&#8203;napi-rs/cli](https://togithub.com/napi-rs/cli)[@&#8203;3](https://togithub.com/3).0.0-alpha.30...[@&#8203;napi-rs/cli](https://togithub.com/napi-rs/cli)[@&#8203;3](https://togithub.com/3).0.0-alpha.31

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMjEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEyMS4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2024-01-08 16:35:08 +00:00
Joooye_34
1e28fd73b4 docs: replace CLA.md contributor list by online url to reduce noise (#5538) 2024-01-08 09:21:14 +00:00
DarkSky
b9fa002e67 fix: only return activated features (#5536) 2024-01-08 15:58:59 +08:00
liuyi
d7b9462d1c fix(server): backward compatibility for beta+stable envs (#5510) 2024-01-08 05:15:32 +00:00
LongYinan
b23c092953 chore: bump up file-type version to v19 (#5533)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [file-type](https://togithub.com/sindresorhus/file-type) | [`^18.7.0` -> `^19.0.0`](https://renovatebot.com/diffs/npm/file-type/18.7.0/19.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/file-type/19.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/file-type/19.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/file-type/18.7.0/19.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/file-type/18.7.0/19.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>sindresorhus/file-type (file-type)</summary>

### [`v19.0.0`](https://togithub.com/sindresorhus/file-type/releases/tag/v19.0.0)

[Compare Source](https://togithub.com/sindresorhus/file-type/compare/v18.7.0...v19.0.0)

##### Breaking

-   Require Node.js 18  [`7f4b30b`](https://togithub.com/sindresorhus/file-type/commit/7f4b30b)
-   Use mime type `audio/wav` instead of `audio/vnd.wave` for .wav files ([#&#8203;620](https://togithub.com/sindresorhus/file-type/issues/620))  [`c7c923c`](https://togithub.com/sindresorhus/file-type/commit/c7c923c)

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMjEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEyMS4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2024-01-08 03:06:25 +00:00
LongYinan
e5db566ef0 chore: bump up oxlint version to v0.1.2 (#5528)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](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.0.22` -> `0.1.2`](https://renovatebot.com/diffs/npm/oxlint/0.0.22/0.1.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/oxlint/0.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/oxlint/0.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/oxlint/0.0.22/0.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/oxlint/0.0.22/0.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>oxc-project/oxc (oxlint)</summary>

### [`v0.1.2`](https://togithub.com/oxc-project/oxc/releases/tag/oxlint_v0.1.2): oxlint v0.1.2

[Compare Source](821cc8e9c7...4a9e0c4bf4)

#### Try it out!

-   Run `npx --yes oxlint@latest` from your terminal
-   Install the Vscode extension https://marketplace.visualstudio.com/items?itemName=oxc.oxc-vscode
-   Read the [usage guide](https://oxc-project.github.io/docs/guide/usage/linter.html)

#### Svelte support

`<script>` tag is linted by default.

#### Features

-   feat(linter): <script> part of svelte file by [@&#8203;Boshen](https://togithub.com/Boshen) in [https://github.com/oxc-project/oxc/pull/1918](https://togithub.com/oxc-project/oxc/pull/1918)
-   feat(linter): disable no-unused-labels for svelte by [@&#8203;Boshen](https://togithub.com/Boshen) in [https://github.com/oxc-project/oxc/pull/1919](https://togithub.com/oxc-project/oxc/pull/1919)

### Fixes

-   fix(linter): change no-var to restriction [`bb6128b`](https://togithub.com/oxc-project/oxc/commit/bb6128b)
-   chore: add some useful informantion log by [@&#8203;IWANABETHATGUY](https://togithub.com/IWANABETHATGUY) in [https://github.com/oxc-project/oxc/pull/1912](https://togithub.com/oxc-project/oxc/pull/1912)
-   fix(linter) fix eslint config for filename case by [@&#8203;camc314](https://togithub.com/camc314) in [https://github.com/oxc-project/oxc/pull/1913](https://togithub.com/oxc-project/oxc/pull/1913)

**Full Changelog**: https://github.com/oxc-project/oxc/compare/oxlint_v0.1.1...oxlint_v0.1.2

### [`v0.1.1`](https://togithub.com/oxc-project/oxc/releases/tag/oxlint_v0.1.1): oxlint v0.1.1

[Compare Source](https://togithub.com/oxc-project/oxc/compare/v0.1.0...821cc8e9c7cfb326ff546483bb2a32d12e018e4c)

#### Try it out!

-   Run `npx --yes oxlint@latest` from your terminal
-   Install the Vscode extension https://marketplace.visualstudio.com/items?itemName=oxc.oxc-vscode
-   Read the [usage guide](https://oxc-project.github.io/docs/guide/usage/linter.html)

#### Vue support

`<script>` and `<script setup>` are linted by default.

#### Astro support

Frontmatter component script `---` and all `<script>` tags are linted by default.

#### Configuration files (experimental)

`-c ./eslintrc.json` will use the `rules` field for rule configuration, as documented in [ESLint's documentation](https://eslint.org/docs/latest/use/configure/rules#using-configuration-files).

Unfortunately, only the `json` format is supported right now.

The `extends` field will not take effect; normal `-D` and `-A` flags still apply.

#### New Rules

##### Correctness

-   deepscan: bad object literal comparison by [@&#8203;camc314](https://togithub.com/camc314) in [https://github.com/oxc-project/oxc/pull/1844](https://togithub.com/oxc-project/oxc/pull/1844)
-   oxc: erasing op by [@&#8203;camc314](https://togithub.com/camc314) in [https://github.com/oxc-project/oxc/pull/1834](https://togithub.com/oxc-project/oxc/pull/1834)
-   oxc: only used in recursion by [@&#8203;camc314](https://togithub.com/camc314) in [https://github.com/oxc-project/oxc/pull/1833](https://togithub.com/oxc-project/oxc/pull/1833)
-   eslint: no irregular whitespace by [@&#8203;DeividAlmeida](https://togithub.com/DeividAlmeida) in [https://github.com/oxc-project/oxc/pull/1877](https://togithub.com/oxc-project/oxc/pull/1877)
-   eslint: no-unused-private-class-members rule by [@&#8203;Dunqing](https://togithub.com/Dunqing) in [https://github.com/oxc-project/oxc/pull/1820](https://togithub.com/oxc-project/oxc/pull/1820)
-   eslint: no-var by [@&#8203;zhangrunzhao](https://togithub.com/zhangrunzhao) in [https://github.com/oxc-project/oxc/pull/1890](https://togithub.com/oxc-project/oxc/pull/1890)
-   eslint-plugin-react: jsx-no-undef for by [@&#8203;XantreGodlike](https://togithub.com/XantreGodlike) in [https://github.com/oxc-project/oxc/pull/1862](https://togithub.com/oxc-project/oxc/pull/1862)
-   eslint-plugin-jsx-a11y: aria-role by [@&#8203;msdlisper](https://togithub.com/msdlisper) in [https://github.com/oxc-project/oxc/pull/1849](https://togithub.com/oxc-project/oxc/pull/1849)
-   eslint-plugin-jsx-a11y: lang by [@&#8203;msdlisper](https://togithub.com/msdlisper) in [https://github.com/oxc-project/oxc/pull/1812](https://togithub.com/oxc-project/oxc/pull/1812)
-   eslint-plugin-jsx-a11y: media-has-caption by [@&#8203;poteboy](https://togithub.com/poteboy) in [https://github.com/oxc-project/oxc/pull/1822](https://togithub.com/oxc-project/oxc/pull/1822)
-   eslint-plugin-jsx-a11y: mouse-events-have-key-events(correctness) by [@&#8203;Ken-HH24](https://togithub.com/Ken-HH24) in [https://github.com/oxc-project/oxc/pull/1867](https://togithub.com/oxc-project/oxc/pull/1867)
-   eslint-plugin-jsx-a11y: prefer-tag-over-role rule by [@&#8203;yossydev](https://togithub.com/yossydev) in [https://github.com/oxc-project/oxc/pull/1831](https://togithub.com/oxc-project/oxc/pull/1831)
-   eslint-plugin-jsx-a11y: aria-unsupported-elements by [@&#8203;re-taro](https://togithub.com/re-taro) in [https://github.com/oxc-project/oxc/pull/1855](https://togithub.com/oxc-project/oxc/pull/1855)
-   eslint-plugin-jsx-a11y: html_has_lang by [@&#8203;msdlisper](https://togithub.com/msdlisper) in [https://github.com/oxc-project/oxc/pull/1843](https://togithub.com/oxc-project/oxc/pull/1843)

##### Suspicious

-   oxc: approx constant by [@&#8203;camc314](https://togithub.com/camc314) in [https://github.com/oxc-project/oxc/pull/1818](https://togithub.com/oxc-project/oxc/pull/1818)
-   oxc: misrefactored assign op by [@&#8203;camc314](https://togithub.com/camc314) in [https://github.com/oxc-project/oxc/pull/1832](https://togithub.com/oxc-project/oxc/pull/1832)

##### Restriction

-   react: button has type by [@&#8203;camc314](https://togithub.com/camc314) in [https://github.com/oxc-project/oxc/pull/1785](https://togithub.com/oxc-project/oxc/pull/1785)
-   unicorn: prefer modern math apis by [@&#8203;camc314](https://togithub.com/camc314) in [https://github.com/oxc-project/oxc/pull/1620](https://togithub.com/oxc-project/oxc/pull/1620)

#### Fixes

-   fix(linter): ignore anonymous functional components in arrays for eslint-plugin-react(jsx-key) by [@&#8203;maurice](https://togithub.com/maurice) in [https://github.com/oxc-project/oxc/pull/1858](https://togithub.com/oxc-project/oxc/pull/1858)
-   Prioritize ignored paths when linting by [@&#8203;clarkf](https://togithub.com/clarkf) in [https://github.com/oxc-project/oxc/pull/1878](https://togithub.com/oxc-project/oxc/pull/1878)
-   feat(linter): handle more cases for `const-comparisons` by [@&#8203;camc314](https://togithub.com/camc314) in [https://github.com/oxc-project/oxc/pull/1817](https://togithub.com/oxc-project/oxc/pull/1817)
-   feat(semantic): allow reserved keyword defined in ts module block by [@&#8203;Dunqing](https://togithub.com/Dunqing) in [https://github.com/oxc-project/oxc/pull/1907](https://togithub.com/oxc-project/oxc/pull/1907)
-   fix(parser): error on source larger than 4 GiB by [@&#8203;overlookmotel](https://togithub.com/overlookmotel) in [https://github.com/oxc-project/oxc/pull/1860](https://togithub.com/oxc-project/oxc/pull/1860)
-   fix(parser): fix incorrectly identified directives by [@&#8203;overlookmotel](https://togithub.com/overlookmotel) in [https://github.com/oxc-project/oxc/pull/1885](https://togithub.com/oxc-project/oxc/pull/1885)
-   fix(parser): terminate parsing if an EmptyParenthesizedExpression error occurs by [@&#8203;Dunqing](https://togithub.com/Dunqing) in [https://github.com/oxc-project/oxc/pull/1874](https://togithub.com/oxc-project/oxc/pull/1874)
-   fix(semantic): remove duplicate errors in ModuleDeclaration::ImportDeclaration by [@&#8203;Dunqing](https://togithub.com/Dunqing) in [https://github.com/oxc-project/oxc/pull/1846](https://togithub.com/oxc-project/oxc/pull/1846)
-   perf(linter): reduce the number of diagnostics for no_sparse_arrays by [@&#8203;camc314](https://togithub.com/camc314) in [https://github.com/oxc-project/oxc/pull/1895](https://togithub.com/oxc-project/oxc/pull/1895)

#### New Contributors

-   [@&#8203;maurice](https://togithub.com/maurice) made their first contribution in [https://github.com/oxc-project/oxc/pull/1858](https://togithub.com/oxc-project/oxc/pull/1858)
-   [@&#8203;re-taro](https://togithub.com/re-taro) made their first contribution in [https://github.com/oxc-project/oxc/pull/1855](https://togithub.com/oxc-project/oxc/pull/1855)
-   [@&#8203;DeividAlmeida](https://togithub.com/DeividAlmeida) made their first contribution in [https://github.com/oxc-project/oxc/pull/1835](https://togithub.com/oxc-project/oxc/pull/1835)
-   [@&#8203;XantreGodlike](https://togithub.com/XantreGodlike) made their first contribution in [https://github.com/oxc-project/oxc/pull/1862](https://togithub.com/oxc-project/oxc/pull/1862)
-   [@&#8203;Qix-](https://togithub.com/Qix-) made their first contribution in [https://github.com/oxc-project/oxc/pull/1861](https://togithub.com/oxc-project/oxc/pull/1861)
-   [@&#8203;yossydev](https://togithub.com/yossydev) made their first contribution in [https://github.com/oxc-project/oxc/pull/1831](https://togithub.com/oxc-project/oxc/pull/1831)
-   [@&#8203;clarkf](https://togithub.com/clarkf) made their first contribution in [https://github.com/oxc-project/oxc/pull/1878](https://togithub.com/oxc-project/oxc/pull/1878)
-   [@&#8203;zhangrunzhao](https://togithub.com/zhangrunzhao) made their first contribution in [https://github.com/oxc-project/oxc/pull/1890](https://togithub.com/oxc-project/oxc/pull/1890)

**Full Changelog**: https://github.com/oxc-project/oxc/compare/oxlint_v0.0.22...oxlint_v0.1.1

### [`v0.1.0`](https://togithub.com/oxc-project/oxc/releases/tag/v0.1.0): CLI v0.1.0 Ezno Type Checker

[Compare Source](a1accdca7f...v0.1.0)

`npx oxidation-compiler@latest check ./test.ts`

![image](https://togithub.com/Boshen/oxc/assets/1430279/c7308395-1856-43fa-b4b8-b239886ec259)

#### New Contributors

-   [@&#8203;anonrig](https://togithub.com/anonrig) made their first contribution in [https://github.com/Boshen/oxc/pull/388](https://togithub.com/Boshen/oxc/pull/388)
-   [@&#8203;kaleidawave](https://togithub.com/kaleidawave) made their first contribution in [https://github.com/Boshen/oxc/pull/413](https://togithub.com/Boshen/oxc/pull/413)

**Full Changelog**: https://github.com/Boshen/oxc/compare/v0.0.7...

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMjEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEyMS4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2024-01-07 09:11:49 +00:00
DarkSky
443908da22 feat: add workspace experimental features api (#5525) 2024-01-06 11:04:49 +00:00
DarkSky
9650a5a6a1 feat: use relative path for api (#5520) 2024-01-05 14:01:25 +00:00
Peng Xiao
b86a5a2830 fix(core): sidebar extension sometimes not show (#5513) 2024-01-05 13:17:02 +00:00
LongYinan
b0716ae721 chore: bump up all non-major dependencies to v1.1.3 (#5519)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@vitest/coverage-istanbul](https://togithub.com/vitest-dev/vitest/tree/main/packages/coverage-istanbul#readme) ([source](https://togithub.com/vitest-dev/vitest/tree/HEAD/packages/coverage-istanbul)) | [`1.1.2` -> `1.1.3`](https://renovatebot.com/diffs/npm/@vitest%2fcoverage-istanbul/1.1.2/1.1.3) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@vitest%2fcoverage-istanbul/1.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@vitest%2fcoverage-istanbul/1.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@vitest%2fcoverage-istanbul/1.1.2/1.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@vitest%2fcoverage-istanbul/1.1.2/1.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@vitest/ui](https://togithub.com/vitest-dev/vitest/tree/main/packages/ui#readme) ([source](https://togithub.com/vitest-dev/vitest/tree/HEAD/packages/ui)) | [`1.1.2` -> `1.1.3`](https://renovatebot.com/diffs/npm/@vitest%2fui/1.1.2/1.1.3) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@vitest%2fui/1.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@vitest%2fui/1.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@vitest%2fui/1.1.2/1.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@vitest%2fui/1.1.2/1.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [vitest](https://togithub.com/vitest-dev/vitest) ([source](https://togithub.com/vitest-dev/vitest/tree/HEAD/packages/vitest)) | [`1.1.2` -> `1.1.3`](https://renovatebot.com/diffs/npm/vitest/1.1.2/1.1.3) | [![age](https://developer.mend.io/api/mc/badges/age/npm/vitest/1.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/vitest/1.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/vitest/1.1.2/1.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vitest/1.1.2/1.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>vitest-dev/vitest (@&#8203;vitest/coverage-istanbul)</summary>

### [`v1.1.3`](https://togithub.com/vitest-dev/vitest/releases/tag/v1.1.3)

[Compare Source](https://togithub.com/vitest-dev/vitest/compare/v1.1.2...v1.1.3)

#####    🐞 Bug Fixes

-   **vitest**:
    -   Vi.mock breaks tests when using imported variables inside the factory  -  by [@&#8203;sheremet-va](https://togithub.com/sheremet-va) and **Dunqing** in [https://github.com/vitest-dev/vitest/issues/4873](https://togithub.com/vitest-dev/vitest/issues/4873) [<samp>(7719e)</samp>](https://togithub.com/vitest-dev/vitest/commit/7719e79e)
    -   Apply `slowTestThreshold` to all reporters  -  by [@&#8203;hi-ogawa](https://togithub.com/hi-ogawa) in [https://github.com/vitest-dev/vitest/issues/4876](https://togithub.com/vitest-dev/vitest/issues/4876) [<samp>(1769c)</samp>](https://togithub.com/vitest-dev/vitest/commit/1769c796)

#####     [View changes on GitHub](https://togithub.com/vitest-dev/vitest/compare/v1.1.2...v1.1.3)

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMjEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEyMS4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2024-01-05 09:53:28 +00:00
LongYinan
1dae488863 chore: bump up @blocksuite/icons version to v2.1.40 (#5516)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@blocksuite/icons](https://togithub.com/toeverything/icons) | [`2.1.39` -> `2.1.40`](https://renovatebot.com/diffs/npm/@blocksuite%2ficons/2.1.39/2.1.40) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@blocksuite%2ficons/2.1.40?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@blocksuite%2ficons/2.1.40?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@blocksuite%2ficons/2.1.39/2.1.40?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@blocksuite%2ficons/2.1.39/2.1.40?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>toeverything/icons (@&#8203;blocksuite/icons)</summary>

### [`v2.1.40`](e255947e4e...2b42f403fb)

[Compare Source](e255947e4e...2b42f403fb)

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMjEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEyMS4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2024-01-05 09:29:40 +00:00
LongYinan
b166f5dbf2 feat: upgrade to rust 1.75.0 (#5515) 2024-01-05 08:19:14 +00:00
LongYinan
3cdfa8ca22 chore: bump up all non-major dependencies (#5499)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@aws-sdk/client-s3](https://togithub.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3) ([source](https://togithub.com/aws/aws-sdk-js-v3/tree/HEAD/clients/client-s3)) | [`3.484.0` -> `3.485.0`](https://renovatebot.com/diffs/npm/@aws-sdk%2fclient-s3/3.484.0/3.485.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@aws-sdk%2fclient-s3/3.485.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@aws-sdk%2fclient-s3/3.485.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@aws-sdk%2fclient-s3/3.484.0/3.485.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@aws-sdk%2fclient-s3/3.484.0/3.485.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@napi-rs/cli](https://togithub.com/napi-rs/napi-rs) | [`3.0.0-alpha.29` -> `3.0.0-alpha.30`](https://renovatebot.com/diffs/npm/@napi-rs%2fcli/3.0.0-alpha.29/3.0.0-alpha.30) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@napi-rs%2fcli/3.0.0-alpha.30?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@napi-rs%2fcli/3.0.0-alpha.30?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@napi-rs%2fcli/3.0.0-alpha.29/3.0.0-alpha.30?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@napi-rs%2fcli/3.0.0-alpha.29/3.0.0-alpha.30?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@node-rs/jsonwebtoken](https://togithub.com/napi-rs/node-rs) | [`^0.2.3` -> `^0.3.0`](https://renovatebot.com/diffs/npm/@node-rs%2fjsonwebtoken/0.2.3/0.3.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@node-rs%2fjsonwebtoken/0.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@node-rs%2fjsonwebtoken/0.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@node-rs%2fjsonwebtoken/0.2.3/0.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@node-rs%2fjsonwebtoken/0.2.3/0.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@opentelemetry/instrumentation-socket.io](https://togithub.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/instrumentation-socket.io#readme) ([source](https://togithub.com/open-telemetry/opentelemetry-js-contrib)) | [`^0.34.4` -> `^0.35.0`](https://renovatebot.com/diffs/npm/@opentelemetry%2finstrumentation-socket.io/0.34.4/0.35.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@opentelemetry%2finstrumentation-socket.io/0.35.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@opentelemetry%2finstrumentation-socket.io/0.35.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@opentelemetry%2finstrumentation-socket.io/0.34.4/0.35.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@opentelemetry%2finstrumentation-socket.io/0.34.4/0.35.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@storybook/test-runner](https://togithub.com/storybookjs/test-runner) | [`^0.15.2` -> `^0.16.0`](https://renovatebot.com/diffs/npm/@storybook%2ftest-runner/0.15.2/0.16.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@storybook%2ftest-runner/0.16.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@storybook%2ftest-runner/0.16.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@storybook%2ftest-runner/0.15.2/0.16.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@storybook%2ftest-runner/0.15.2/0.16.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@vitest/coverage-istanbul](https://togithub.com/vitest-dev/vitest/tree/main/packages/coverage-istanbul#readme) ([source](https://togithub.com/vitest-dev/vitest/tree/HEAD/packages/coverage-istanbul)) | [`1.1.1` -> `1.1.2`](https://renovatebot.com/diffs/npm/@vitest%2fcoverage-istanbul/1.1.1/1.1.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@vitest%2fcoverage-istanbul/1.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@vitest%2fcoverage-istanbul/1.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@vitest%2fcoverage-istanbul/1.1.1/1.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@vitest%2fcoverage-istanbul/1.1.1/1.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@vitest/ui](https://togithub.com/vitest-dev/vitest/tree/main/packages/ui#readme) ([source](https://togithub.com/vitest-dev/vitest/tree/HEAD/packages/ui)) | [`1.1.1` -> `1.1.2`](https://renovatebot.com/diffs/npm/@vitest%2fui/1.1.1/1.1.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@vitest%2fui/1.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@vitest%2fui/1.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@vitest%2fui/1.1.1/1.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@vitest%2fui/1.1.1/1.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [vitest](https://togithub.com/vitest-dev/vitest) ([source](https://togithub.com/vitest-dev/vitest/tree/HEAD/packages/vitest)) | [`1.1.1` -> `1.1.2`](https://renovatebot.com/diffs/npm/vitest/1.1.1/1.1.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/vitest/1.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/vitest/1.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/vitest/1.1.1/1.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vitest/1.1.1/1.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>aws/aws-sdk-js-v3 (@&#8203;aws-sdk/client-s3)</summary>

### [`v3.485.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#34850-2024-01-03)

[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.484.0...v3.485.0)

##### Features

-   **credential-providers:** add credentialScope field ([#&#8203;5606](https://togithub.com/aws/aws-sdk-js-v3/issues/5606)) ([04c1459](04c1459289))

</details>

<details>
<summary>napi-rs/napi-rs (@&#8203;napi-rs/cli)</summary>

### [`v3.0.0-alpha.30`](https://togithub.com/napi-rs/napi-rs/releases/tag/%40napi-rs/cli%403.0.0-alpha.30)

[Compare Source](https://togithub.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.29...@napi-rs/cli@3.0.0-alpha.30)

##### What's Changed

-   chore(deps): lock file maintenance by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/napi-rs/napi-rs/pull/1882](https://togithub.com/napi-rs/napi-rs/pull/1882)
-   fix(cli): wasi fallback package load logic by [@&#8203;Brooooooklyn](https://togithub.com/Brooooooklyn) in [https://github.com/napi-rs/napi-rs/pull/1887](https://togithub.com/napi-rs/napi-rs/pull/1887)
-   fix(cli): upload to github releases issue by [@&#8203;Brooooooklyn](https://togithub.com/Brooooooklyn) in [https://github.com/napi-rs/napi-rs/pull/1888](https://togithub.com/napi-rs/napi-rs/pull/1888)

**Full Changelog**: https://github.com/napi-rs/napi-rs/compare/[@&#8203;napi-rs/cli](https://togithub.com/napi-rs/cli)[@&#8203;3](https://togithub.com/3).0.0-alpha.29...[@&#8203;napi-rs/cli](https://togithub.com/napi-rs/cli)[@&#8203;3](https://togithub.com/3).0.0-alpha.30

</details>

<details>
<summary>napi-rs/node-rs (@&#8203;node-rs/jsonwebtoken)</summary>

### [`v0.3.1`](https://togithub.com/napi-rs/node-rs/compare/@node-rs/jsonwebtoken@0.3.0...@node-rs/jsonwebtoken@0.3.1)

[Compare Source](https://togithub.com/napi-rs/node-rs/compare/@node-rs/jsonwebtoken@0.3.0...@node-rs/jsonwebtoken@0.3.1)

### [`v0.3.0`](https://togithub.com/napi-rs/node-rs/compare/@node-rs/jsonwebtoken@0.2.3...@node-rs/jsonwebtoken@0.3.0)

[Compare Source](https://togithub.com/napi-rs/node-rs/compare/@node-rs/jsonwebtoken@0.2.3...@node-rs/jsonwebtoken@0.3.0)

</details>

<details>
<summary>open-telemetry/opentelemetry-js-contrib (@&#8203;opentelemetry/instrumentation-socket.io)</summary>

### [`v0.35.0`](efdfc727a4...f81f8a76a8)

[Compare Source](a757b5e443...9092823125)

</details>

<details>
<summary>storybookjs/test-runner (@&#8203;storybook/test-runner)</summary>

### [`v0.16.0`](https://togithub.com/storybookjs/test-runner/releases/tag/v0.16.0)

[Compare Source](https://togithub.com/storybookjs/test-runner/compare/v0.15.2...v0.16.0)

##### 🚀 Enhancement

-   Introduce logLevel configuration [#&#8203;406](https://togithub.com/storybookjs/test-runner/pull/406) ([@&#8203;yannbf](https://togithub.com/yannbf))

##### 🐛 Bug Fix

-   Filter duplicated error messages in browser logs [#&#8203;405](https://togithub.com/storybookjs/test-runner/pull/405) ([@&#8203;yannbf](https://togithub.com/yannbf))
-   Fix sync issues between tests [#&#8203;404](https://togithub.com/storybookjs/test-runner/pull/404) ([@&#8203;yannbf](https://togithub.com/yannbf))
-   Refactor: Extract the setup page scripts into a separate file [#&#8203;403](https://togithub.com/storybookjs/test-runner/pull/403) ([@&#8203;yannbf](https://togithub.com/yannbf))
-   Docs: Adds feedback form to migration documentation [#&#8203;402](https://togithub.com/storybookjs/test-runner/pull/402) ([@&#8203;jonniebigodes](https://togithub.com/jonniebigodes))
-   Bump `jest-playwright-preset` from `v3.0.1` to `v4.0.0` [#&#8203;400](https://togithub.com/storybookjs/test-runner/pull/400) ([@&#8203;kemuridama](https://togithub.com/kemuridama))
-   Improve type safety and code quality [#&#8203;383](https://togithub.com/storybookjs/test-runner/pull/383) ([@&#8203;bryanjtc](https://togithub.com/bryanjtc) [@&#8203;yannbf](https://togithub.com/yannbf))
-   Refactor: Improve internal code [#&#8203;378](https://togithub.com/storybookjs/test-runner/pull/378) ([@&#8203;bryanjtc](https://togithub.com/bryanjtc) [@&#8203;yannbf](https://togithub.com/yannbf))

##### Authors: 4

-   [@&#8203;jonniebigodes](https://togithub.com/jonniebigodes)
-   Bryan Thomas ([@&#8203;bryanjtc](https://togithub.com/bryanjtc))
-   Ryo Ochiai ([@&#8203;kemuridama](https://togithub.com/kemuridama))
-   Yann Braga ([@&#8203;yannbf](https://togithub.com/yannbf))

</details>

<details>
<summary>vitest-dev/vitest (@&#8203;vitest/coverage-istanbul)</summary>

### [`v1.1.2`](https://togithub.com/vitest-dev/vitest/releases/tag/v1.1.2)

[Compare Source](https://togithub.com/vitest-dev/vitest/compare/v1.1.1...v1.1.2)

#####    🐞 Bug Fixes

-   Remove internal flag from UI option in the config  -  by [@&#8203;sheremet-va](https://togithub.com/sheremet-va) [<samp>(7b4a2)</samp>](https://togithub.com/vitest-dev/vitest/commit/7b4a2fce)
-   **browser**:
    -   Avoid safaridriver collision  -  by [@&#8203;mbland](https://togithub.com/mbland) in [https://github.com/vitest-dev/vitest/issues/4863](https://togithub.com/vitest-dev/vitest/issues/4863) [<samp>(345a2)</samp>](https://togithub.com/vitest-dev/vitest/commit/345a25d6)
    -   Resolved failure to find arbitrarily-named snapshot files when using `expect(...).toMatchFileSnapshot()` matcher.  -  by [@&#8203;zmullett](https://togithub.com/zmullett), **Zac Mullett** and [@&#8203;sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/4839](https://togithub.com/vitest-dev/vitest/issues/4839) [<samp>(b8140)</samp>](https://togithub.com/vitest-dev/vitest/commit/b8140fca)
    -   Handle config.base  -  by [@&#8203;mbland](https://togithub.com/mbland) and [@&#8203;sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/4686](https://togithub.com/vitest-dev/vitest/issues/4686) and [https://github.com/vitest-dev/vitest/issues/4692](https://togithub.com/vitest-dev/vitest/issues/4692) [<samp>(9e345)</samp>](https://togithub.com/vitest-dev/vitest/commit/9e34557e)
-   **deps**:
    -   Update dependency acorn-walk to ^8.3.1  -  by [@&#8203;renovate](https://togithub.com/renovate)\[bot] in[https://github.com/vitest-dev/vitest/issues/4837](https://togithub.com/vitest-dev/vitest/issues/4837)7 [<samp>(47bc2)</samp>](https://togithub.com/vitest-dev/vitest/commit/47bc233d)
    -   Update dependency sirv to ^2.0.4  -  by [@&#8203;renovate](https://togithub.com/renovate)\[bot] in[https://github.com/vitest-dev/vitest/issues/4838](https://togithub.com/vitest-dev/vitest/issues/4838)8 [<samp>(df261)</samp>](https://togithub.com/vitest-dev/vitest/commit/df261ae1)
-   **runner**:
    -   Fix fixture cleanup for concurrent tests  -  by [@&#8203;hi-ogawa](https://togithub.com/hi-ogawa) in [https://github.com/vitest-dev/vitest/issues/4827](https://togithub.com/vitest-dev/vitest/issues/4827) [<samp>(1fee6)</samp>](https://togithub.com/vitest-dev/vitest/commit/1fee63f2)
-   **spy**:
    -   Don't allow `Promise` in `mockImplementation` if it's not in the function signature  -  by [@&#8203;sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/4859](https://togithub.com/vitest-dev/vitest/issues/4859) [<samp>(072e0)</samp>](https://togithub.com/vitest-dev/vitest/commit/072e02bf)
-   **vite-node**:
    -   Correctly return cached result  -  by [@&#8203;sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/4870](https://togithub.com/vitest-dev/vitest/issues/4870) [<samp>(15bbb)</samp>](https://togithub.com/vitest-dev/vitest/commit/15bbbf81)
-   **vitest**:
    -   Throw an error if mock was already loaded when `vi.mock` is called  -  by [@&#8203;sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/4862](https://togithub.com/vitest-dev/vitest/issues/4862) [<samp>(e12a5)</samp>](https://togithub.com/vitest-dev/vitest/commit/e12a5a36)
    -   Correctly rerun test files on change if server was restarted  -  by [@&#8203;sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/4871](https://togithub.com/vitest-dev/vitest/issues/4871) [<samp>(6088b)</samp>](https://togithub.com/vitest-dev/vitest/commit/6088b372)
-   **vm-threads**:
    -   Don't crash on percentage based `memoryLimit`  -  by [@&#8203;inottn](https://togithub.com/inottn) and [@&#8203;AriPerkkio](https://togithub.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/4802](https://togithub.com/vitest-dev/vitest/issues/4802) [<samp>(70e8a)</samp>](https://togithub.com/vitest-dev/vitest/commit/70e8a389)

#####     [View changes on GitHub](https://togithub.com/vitest-dev/vitest/compare/v1.1.1...v1.1.2)

</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.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMDMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjEyMS4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2024-01-05 07:23:22 +00:00
DarkSky
f6ec786ef9 feat: add workspace level feature apis (#5503) 2024-01-05 04:13:49 +00:00
DarkSky
04ca554525 feat: add workspace feature tests (#5501) 2024-01-05 04:13:47 +00:00
DarkSky
97f8927c21 feat: workspace level feature schema (#5466) 2024-01-05 04:13:44 +00:00
LongYinan
7b6430ebc3 chore: bump up @blocksuite/icons version to v2.1.39 (#5511)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@blocksuite/icons](https://togithub.com/toeverything/icons) | [`2.1.36` -> `2.1.39`](https://renovatebot.com/diffs/npm/@blocksuite%2ficons/2.1.36/2.1.39) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@blocksuite%2ficons/2.1.39?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@blocksuite%2ficons/2.1.39?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@blocksuite%2ficons/2.1.36/2.1.39?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@blocksuite%2ficons/2.1.36/2.1.39?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>toeverything/icons (@&#8203;blocksuite/icons)</summary>

### [`v2.1.39`](83cf4ea106...e255947e4e)

[Compare Source](83cf4ea106...e255947e4e)

### [`v2.1.38`](1c26e8f533...83cf4ea106)

[Compare Source](1c26e8f533...83cf4ea106)

### [`v2.1.37`](310adb0b9f...1c26e8f533)

[Compare Source](310adb0b9f...1c26e8f533)

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMDMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjEwMy4xIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2024-01-04 14:13:26 +00:00
LongYinan
e4b9f01186 chore: bump up chromatic version to v10 (#5512)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [chromatic](https://www.chromatic.com) ([source](https://togithub.com/chromaui/chromatic-cli)) | [`^9.1.0` -> `^10.0.0`](https://renovatebot.com/diffs/npm/chromatic/9.1.0/10.2.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/chromatic/10.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/chromatic/10.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/chromatic/9.1.0/10.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/chromatic/9.1.0/10.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>chromaui/chromatic-cli (chromatic)</summary>

### [`v10.2.0`](https://togithub.com/chromaui/chromatic-cli/blob/HEAD/CHANGELOG.md#v1020-Thu-Dec-21-2023)

[Compare Source](https://togithub.com/chromaui/chromatic-cli/compare/v10.1.0...v10.2.0)

##### 🚀 Enhancement

-   Replace `getUploadUrls` with `uploadBuild` mutation [#&#8203;876](https://togithub.com/chromaui/chromatic-cli/pull/876) ([@&#8203;ghengeveld](https://togithub.com/ghengeveld))
-   Implement file hashing for to-be-uploaded files [#&#8203;870](https://togithub.com/chromaui/chromatic-cli/pull/870) ([@&#8203;ghengeveld](https://togithub.com/ghengeveld))

##### 🐛 Bug Fix

-   Allow overriding `NODE_ENV` with `STORYBOOK_NODE_ENV` [#&#8203;879](https://togithub.com/chromaui/chromatic-cli/pull/879) ([@&#8203;tmeasday](https://togithub.com/tmeasday))
-   Use code splitting in tsup CJS output [#&#8203;873](https://togithub.com/chromaui/chromatic-cli/pull/873) ([@&#8203;tmeasday](https://togithub.com/tmeasday))

##### Authors: 2

-   Gert Hengeveld ([@&#8203;ghengeveld](https://togithub.com/ghengeveld))
-   Tom Coleman ([@&#8203;tmeasday](https://togithub.com/tmeasday))

***

### [`v10.1.0`](https://togithub.com/chromaui/chromatic-cli/blob/HEAD/CHANGELOG.md#v1010-Thu-Dec-07-2023)

[Compare Source](https://togithub.com/chromaui/chromatic-cli/compare/v10.0.0...v10.1.0)

##### 🚀 Enhancement

-   Increase number of commits checked for squash merge [#&#8203;866](https://togithub.com/chromaui/chromatic-cli/pull/866) ([@&#8203;tmeasday](https://togithub.com/tmeasday) [@&#8203;tevanoff](https://togithub.com/tevanoff))

##### Authors: 2

-   Todd Evanoff ([@&#8203;tevanoff](https://togithub.com/tevanoff))
-   Tom Coleman ([@&#8203;tmeasday](https://togithub.com/tmeasday))

***

### [`v10.0.0`](https://togithub.com/chromaui/chromatic-cli/blob/HEAD/CHANGELOG.md#v1000-Fri-Dec-01-2023)

[Compare Source](https://togithub.com/chromaui/chromatic-cli/compare/v9.1.0...v10.0.0)

##### 💥 Breaking Change

-   Force `NODE_ENV=production` for Storybook builds through the CLI [#&#8203;865](https://togithub.com/chromaui/chromatic-cli/pull/865) ([@&#8203;tmeasday](https://togithub.com/tmeasday))

##### 🐛 Bug Fix

-   Support pinning GitHub Action to major or patch version [#&#8203;863](https://togithub.com/chromaui/chromatic-cli/pull/863) ([@&#8203;ghengeveld](https://togithub.com/ghengeveld))

##### Authors: 2

-   Gert Hengeveld ([@&#8203;ghengeveld](https://togithub.com/ghengeveld))
-   Tom Coleman ([@&#8203;tmeasday](https://togithub.com/tmeasday))

***

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMDMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjEwMy4xIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2024-01-04 14:00:45 +00:00
JimmFly
971f2beed1 fix(core): disable quick search when the link-popup is visitable (#5409)
close AFF-471
2024-01-04 11:36:50 +00:00
DarkSky
f5b74ca8a9 feat: add copilot feature type (#5465) 2024-01-04 10:36:34 +00:00
LongYinan
df09dac389 fix: renovate ignorePaths should not include tests 2024-01-04 18:34:54 +08:00
LongYinan
6789da163d chore: workspaces config in package.json (#5502)
This will affect the dependency detection feature of renovate.
2024-01-04 07:36:36 +00:00
Joooye_34
36fde20b7d fix(electron): client always update cause by version not update correctly (#5507)
close #5475
2024-01-04 07:25:20 +00:00
LongYinan
400488980f chore: bump up c8 version to v9 (#5505)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [c8](https://togithub.com/bcoe/c8) | [`^8.0.1` -> `^9.0.0`](https://renovatebot.com/diffs/npm/c8/8.0.1/9.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/c8/9.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/c8/9.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/c8/8.0.1/9.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/c8/8.0.1/9.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>bcoe/c8 (c8)</summary>

### [`v9.0.0`](https://togithub.com/bcoe/c8/blob/HEAD/CHANGELOG.md#900-2024-01-03)

[Compare Source](https://togithub.com/bcoe/c8/compare/v8.0.1...v9.0.0)

##### ⚠ BREAKING CHANGES

-   **build:** minimum Node.js version is now 14.14.0

##### Features

-   **build:** minimum Node.js version is now 14.14.0 ([2cdc86b](2cdc86bd0a))
-   **deps:** update foreground-child to promise API ([#&#8203;512](https://togithub.com/bcoe/c8/issues/512)) ([b46b640](b46b640127))
-   **deps:** use Node.js built in rm ([2cdc86b](2cdc86bd0a))

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMDMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjEwMy4xIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2024-01-04 03:50:24 +00:00
JimmFly
7d886e44a6 feat(core): add cloud workspace member limit (#5500)
<img width="521" alt="image" src="https://github.com/toeverything/AFFiNE/assets/102217452/2cac78ef-07ed-4e06-b739-1279f913d0e1">
<img width="514" alt="image" src="https://github.com/toeverything/AFFiNE/assets/102217452/eed0db08-8550-4686-8ea1-251f1c4c7fee">
2024-01-03 14:57:27 +00:00
liuyi
760d900f99 feat(server): blob data migration (#5461) 2024-01-03 10:56:57 +00:00
liuyi
0d34805375 refactor(server): use new storage providers (#5433) 2024-01-03 10:56:55 +00:00
Peng Xiao
a709624ebf feat(core): page preview ui optimize (#5442)
![CleanShot 2023-12-28 at 23.42.44@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/16b66e74-4b0d-48a5-9062-c86c94f6b065.png)
fix TOV-92

No animations right now.
2024-01-03 03:30:43 +00:00
Peng Xiao
6cb62ed25d feat: bump blocksuite (#5453)
Change history: https://github.com/toeverything/blocksuite/compare/e3abcbb...master
2024-01-03 02:10:19 +00:00
Peng Xiao
8dc3e3d65c fix(core): add free plan prompt (#5441)
fix TOV-91

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/e209abd9-8831-46a4-a00e-fe4bef627d2f.png)
2024-01-03 01:50:32 +00:00
Peng Xiao
444de6d4ac fix(core): adjust error boundary level (#5493)
Allowing showing page title for page detail when page throws error.

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/398bef13-c52d-40b4-bf53-5157582d030a.png)
2024-01-02 22:48:19 +08:00
Peng Xiao
922bc11f16 test(core): fix selectMonthFromMonthPicker logic (#5498) 2024-01-02 14:21:14 +00:00
LongYinan
53c76ae2e2 chore: bump up vitest version to v1.1.1 (#5495)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [vitest](https://togithub.com/vitest-dev/vitest) ([source](https://togithub.com/vitest-dev/vitest/tree/HEAD/packages/vitest)) | [`1.1.0` -> `1.1.1`](https://renovatebot.com/diffs/npm/vitest/1.1.0/1.1.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/vitest/1.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/vitest/1.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/vitest/1.1.0/1.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vitest/1.1.0/1.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>vitest-dev/vitest (vitest)</summary>

### [`v1.1.1`](https://togithub.com/vitest-dev/vitest/releases/tag/v1.1.1)

[Compare Source](https://togithub.com/vitest-dev/vitest/compare/v1.1.0...v1.1.1)

#####    🐞 Bug Fixes

-   Don't crash when using happy-dom or jsdom environment on Yarn PnP workspaces  -  by [@&#8203;wojtekmaj](https://togithub.com/wojtekmaj) and [@&#8203;sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/4698](https://togithub.com/vitest-dev/vitest/issues/4698) [<samp>(ee8b4)</samp>](https://togithub.com/vitest-dev/vitest/commit/ee8b46db)
-   Don't fail if `inline: true` is set  -  by [@&#8203;sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/4815](https://togithub.com/vitest-dev/vitest/issues/4815) [<samp>(8f622)</samp>](https://togithub.com/vitest-dev/vitest/commit/8f6225b8)
-   Correct option name `--no-parallelism`  -  by [@&#8203;bonyuta0204](https://togithub.com/bonyuta0204) in [https://github.com/vitest-dev/vitest/issues/4831](https://togithub.com/vitest-dev/vitest/issues/4831) [<samp>(5053a)</samp>](https://togithub.com/vitest-dev/vitest/commit/5053a5dd)
-   Match jest json output by making json reporter output ndjson-compatible  -  by [@&#8203;bard](https://togithub.com/bard) in [https://github.com/vitest-dev/vitest/issues/4824](https://togithub.com/vitest-dev/vitest/issues/4824) [<samp>(7e6a6)</samp>](https://togithub.com/vitest-dev/vitest/commit/7e6a62af)
-   **runner**:
    -   Reset "current test" state on dynamic `skip`  -  by [@&#8203;hi-ogawa](https://togithub.com/hi-ogawa) in [https://github.com/vitest-dev/vitest/issues/4814](https://togithub.com/vitest-dev/vitest/issues/4814) [<samp>(19faf)</samp>](https://togithub.com/vitest-dev/vitest/commit/19faf00e)
-   **vitest**:
    -   Don't hang when mocking files with cyclic dependencies  -  by [@&#8203;sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/4811](https://togithub.com/vitest-dev/vitest/issues/4811) [<samp>(e8ca6)</samp>](https://togithub.com/vitest-dev/vitest/commit/e8ca6437)
    -   Initialize snapshot state only once for each file suite  -  by [@&#8203;hi-ogawa](https://togithub.com/hi-ogawa) in [https://github.com/vitest-dev/vitest/issues/4796](https://togithub.com/vitest-dev/vitest/issues/4796) [<samp>(957da)</samp>](https://togithub.com/vitest-dev/vitest/commit/957daa32)
    -   Fix file snapshots in skipped suites considered obsolete  -  by [@&#8203;hi-ogawa](https://togithub.com/hi-ogawa) in [https://github.com/vitest-dev/vitest/issues/4795](https://togithub.com/vitest-dev/vitest/issues/4795) [<samp>(06c14)</samp>](https://togithub.com/vitest-dev/vitest/commit/06c14f7d)
    -   Show `beforeAll/afterAll` errors in junit reporter  -  by [@&#8203;hi-ogawa](https://togithub.com/hi-ogawa) in [https://github.com/vitest-dev/vitest/issues/4819](https://togithub.com/vitest-dev/vitest/issues/4819) [<samp>(2baea)</samp>](https://togithub.com/vitest-dev/vitest/commit/2baea35e)
-   **vm-threads**:
    -   Tests not cancelled on key press, cancelled tests shown twice  -  by [@&#8203;AriPerkkio](https://togithub.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/4781](https://togithub.com/vitest-dev/vitest/issues/4781) [<samp>(cf53d)</samp>](https://togithub.com/vitest-dev/vitest/commit/cf53d4be)

#####     [View changes on GitHub](https://togithub.com/vitest-dev/vitest/compare/v1.1.0...v1.1.1)

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMDMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjEwMy4xIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2024-01-02 13:46:17 +00:00
EYHN
4aae3cbba3 docs: initial api reference docs (#5352) 2024-01-02 12:46:27 +00:00
DarkSky
44eb7b97f4 chore: bump vulnerable deps (#5494) 2024-01-02 12:32:47 +00:00
EYHN
54c6b445ea fix(workspace): make ci stable (#5496) 2024-01-02 12:21:35 +00:00
EYHN
104c21d84c refactor(workspace): split workspace interface and implementation (#5463)
@affine/workspace -> (@affine/workspace, @affine/workspace-impl)
2024-01-02 10:58:01 +00:00
EYHN
9d0b3b4947 refactor(core): move workspace atoms to core (#5459)
@affine/workspace/atom -> @affine/core/modules/workspace
2024-01-02 10:06:48 +00:00
EYHN
4b217e6b89 refactor(core): move hooks to core (#5458)
* move @toeverything/hooks -> @affine/core/hooks
* delete @toeverything/hooks

hooks are all business-related logic and are deeply coupled with other parts.

Move them into the core and then reconstruct them by feature.
2024-01-02 08:05:46 +00:00
LongYinan
6862b7deaf chore: bump up @napi-rs/cli version to v3.0.0-alpha.29 (#5492)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@napi-rs/cli](https://togithub.com/napi-rs/napi-rs) | [`3.0.0-alpha.28` -> `3.0.0-alpha.29`](https://renovatebot.com/diffs/npm/@napi-rs%2fcli/3.0.0-alpha.28/3.0.0-alpha.29) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@napi-rs%2fcli/3.0.0-alpha.29?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@napi-rs%2fcli/3.0.0-alpha.29?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@napi-rs%2fcli/3.0.0-alpha.28/3.0.0-alpha.29?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@napi-rs%2fcli/3.0.0-alpha.28/3.0.0-alpha.29?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>napi-rs/napi-rs (@&#8203;napi-rs/cli)</summary>

### [`v3.0.0-alpha.29`](https://togithub.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.28...@napi-rs/cli@3.0.0-alpha.29)

[Compare Source](https://togithub.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.28...@napi-rs/cli@3.0.0-alpha.29)

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMDMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjEwMy4xIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2024-01-02 07:39:44 +00:00
EYHN
6844b282ac refactor(component): adjust active editor atom (#5457)
before:

set global `blocksuiteEditorAtom` state in `<BlocksuiteEditorImpl />`

after:

Rename `blocksuiteEditorAtom` to `activeBlocksuiteEditorAtom`

And move the logic of setting this atom to `<PageDetailEditor />`.

benefit:

* make BlocksuiteEditor pure
* keep @toeverything/component clear
* Clarify the purpose of `activeBlocksuiteEditorAtom`
2024-01-02 07:30:09 +00:00
liuyi
1eefd712dd feat(server): new storage provider (#5410) 2024-01-02 07:21:01 +00:00
liuyi
abcca8b09e refactor(server): object storages (#5405) 2024-01-02 07:01:25 +00:00
Peng Xiao
b84494ef86 feat(core): optimize history list item ui (#5440)
![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/fa1b3626-4c07-411a-ae15-680b1ad70522.png)

fix TOV-90
2024-01-02 05:46:56 +00:00
LongYinan
b92f2cb29a chore: bump up all non-major dependencies (#5488)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@aws-sdk/client-s3](https://togithub.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3) ([source](https://togithub.com/aws/aws-sdk-js-v3/tree/HEAD/clients/client-s3)) | [`3.481.0` -> `3.484.0`](https://renovatebot.com/diffs/npm/@aws-sdk%2fclient-s3/3.481.0/3.484.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@aws-sdk%2fclient-s3/3.484.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@aws-sdk%2fclient-s3/3.484.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@aws-sdk%2fclient-s3/3.481.0/3.484.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@aws-sdk%2fclient-s3/3.481.0/3.484.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@napi-rs/cli](https://togithub.com/napi-rs/napi-rs) | [`3.0.0-alpha.25` -> `3.0.0-alpha.28`](https://renovatebot.com/diffs/npm/@napi-rs%2fcli/3.0.0-alpha.25/3.0.0-alpha.28) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@napi-rs%2fcli/3.0.0-alpha.28?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@napi-rs%2fcli/3.0.0-alpha.28?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@napi-rs%2fcli/3.0.0-alpha.25/3.0.0-alpha.28?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@napi-rs%2fcli/3.0.0-alpha.25/3.0.0-alpha.28?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@vitest/coverage-istanbul](https://togithub.com/vitest-dev/vitest/tree/main/packages/coverage-istanbul#readme) ([source](https://togithub.com/vitest-dev/vitest/tree/HEAD/packages/coverage-istanbul)) | [`1.1.0` -> `1.1.1`](https://renovatebot.com/diffs/npm/@vitest%2fcoverage-istanbul/1.1.0/1.1.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@vitest%2fcoverage-istanbul/1.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@vitest%2fcoverage-istanbul/1.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@vitest%2fcoverage-istanbul/1.1.0/1.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@vitest%2fcoverage-istanbul/1.1.0/1.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@vitest/ui](https://togithub.com/vitest-dev/vitest/tree/main/packages/ui#readme) ([source](https://togithub.com/vitest-dev/vitest/tree/HEAD/packages/ui)) | [`1.1.0` -> `1.1.1`](https://renovatebot.com/diffs/npm/@vitest%2fui/1.1.0/1.1.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@vitest%2fui/1.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@vitest%2fui/1.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@vitest%2fui/1.1.0/1.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@vitest%2fui/1.1.0/1.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [fake-indexeddb](https://togithub.com/dumbmatter/fakeIndexedDB) | [`5.0.1` -> `5.0.2`](https://renovatebot.com/diffs/npm/fake-indexeddb/5.0.1/5.0.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/fake-indexeddb/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/fake-indexeddb/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/fake-indexeddb/5.0.1/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/fake-indexeddb/5.0.1/5.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [vitest](https://togithub.com/vitest-dev/vitest) ([source](https://togithub.com/vitest-dev/vitest/tree/HEAD/packages/vitest)) | [`1.1.0` -> `1.1.1`](https://renovatebot.com/diffs/npm/vitest/1.1.0/1.1.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/vitest/1.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/vitest/1.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/vitest/1.1.0/1.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vitest/1.1.0/1.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>aws/aws-sdk-js-v3 (@&#8203;aws-sdk/client-s3)</summary>

### [`v3.484.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#34840-2023-12-29)

[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.481.0...v3.484.0)

**Note:** Version bump only for package [@&#8203;aws-sdk/client-s3](https://togithub.com/aws-sdk/client-s3)

</details>

<details>
<summary>napi-rs/napi-rs (@&#8203;napi-rs/cli)</summary>

### [`v3.0.0-alpha.28`](https://togithub.com/napi-rs/napi-rs/releases/tag/%40napi-rs/cli%403.0.0-alpha.28)

[Compare Source](https://togithub.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.27...@napi-rs/cli@3.0.0-alpha.28)

##### What's Changed

-   fix(cli): copy binding files into wasi packages by [@&#8203;Brooooooklyn](https://togithub.com/Brooooooklyn) in [https://github.com/napi-rs/napi-rs/pull/1881](https://togithub.com/napi-rs/napi-rs/pull/1881)

**Full Changelog**: https://github.com/napi-rs/napi-rs/compare/[@&#8203;napi-rs/cli](https://togithub.com/napi-rs/cli)[@&#8203;3](https://togithub.com/3).0.0-alpha.27...[@&#8203;napi-rs/cli](https://togithub.com/napi-rs/cli)[@&#8203;3](https://togithub.com/3).0.0-alpha.28

### [`v3.0.0-alpha.27`](https://togithub.com/napi-rs/napi-rs/releases/tag/%40napi-rs/cli%403.0.0-alpha.27)

[Compare Source](https://togithub.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.25...@napi-rs/cli@3.0.0-alpha.27)

##### What's Changed

-   fix(deps): update dependency emnapi to v0.45.0 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/napi-rs/napi-rs/pull/1879](https://togithub.com/napi-rs/napi-rs/pull/1879)

**Full Changelog**: https://github.com/napi-rs/napi-rs/compare/[@&#8203;napi-rs/cli](https://togithub.com/napi-rs/cli)[@&#8203;3](https://togithub.com/3).0.0-alpha.26...[@&#8203;napi-rs/cli](https://togithub.com/napi-rs/cli)[@&#8203;3](https://togithub.com/3).0.0-alpha.27

</details>

<details>
<summary>vitest-dev/vitest (@&#8203;vitest/coverage-istanbul)</summary>

### [`v1.1.1`](https://togithub.com/vitest-dev/vitest/releases/tag/v1.1.1)

[Compare Source](https://togithub.com/vitest-dev/vitest/compare/v1.1.0...v1.1.1)

#####    🐞 Bug Fixes

-   Don't crash when using happy-dom or jsdom environment on Yarn PnP workspaces  -  by [@&#8203;wojtekmaj](https://togithub.com/wojtekmaj) and [@&#8203;sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/4698](https://togithub.com/vitest-dev/vitest/issues/4698) [<samp>(ee8b4)</samp>](https://togithub.com/vitest-dev/vitest/commit/ee8b46db)
-   Don't fail if `inline: true` is set  -  by [@&#8203;sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/4815](https://togithub.com/vitest-dev/vitest/issues/4815) [<samp>(8f622)</samp>](https://togithub.com/vitest-dev/vitest/commit/8f6225b8)
-   Correct option name `--no-parallelism`  -  by [@&#8203;bonyuta0204](https://togithub.com/bonyuta0204) in [https://github.com/vitest-dev/vitest/issues/4831](https://togithub.com/vitest-dev/vitest/issues/4831) [<samp>(5053a)</samp>](https://togithub.com/vitest-dev/vitest/commit/5053a5dd)
-   Match jest json output by making json reporter output ndjson-compatible  -  by [@&#8203;bard](https://togithub.com/bard) in [https://github.com/vitest-dev/vitest/issues/4824](https://togithub.com/vitest-dev/vitest/issues/4824) [<samp>(7e6a6)</samp>](https://togithub.com/vitest-dev/vitest/commit/7e6a62af)
-   **runner**:
    -   Reset "current test" state on dynamic `skip`  -  by [@&#8203;hi-ogawa](https://togithub.com/hi-ogawa) in [https://github.com/vitest-dev/vitest/issues/4814](https://togithub.com/vitest-dev/vitest/issues/4814) [<samp>(19faf)</samp>](https://togithub.com/vitest-dev/vitest/commit/19faf00e)
-   **vitest**:
    -   Don't hang when mocking files with cyclic dependencies  -  by [@&#8203;sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/4811](https://togithub.com/vitest-dev/vitest/issues/4811) [<samp>(e8ca6)</samp>](https://togithub.com/vitest-dev/vitest/commit/e8ca6437)
    -   Initialize snapshot state only once for each file suite  -  by [@&#8203;hi-ogawa](https://togithub.com/hi-ogawa) in [https://github.com/vitest-dev/vitest/issues/4796](https://togithub.com/vitest-dev/vitest/issues/4796) [<samp>(957da)</samp>](https://togithub.com/vitest-dev/vitest/commit/957daa32)
    -   Fix file snapshots in skipped suites considered obsolete  -  by [@&#8203;hi-ogawa](https://togithub.com/hi-ogawa) in [https://github.com/vitest-dev/vitest/issues/4795](https://togithub.com/vitest-dev/vitest/issues/4795) [<samp>(06c14)</samp>](https://togithub.com/vitest-dev/vitest/commit/06c14f7d)
    -   Show `beforeAll/afterAll` errors in junit reporter  -  by [@&#8203;hi-ogawa](https://togithub.com/hi-ogawa) in [https://github.com/vitest-dev/vitest/issues/4819](https://togithub.com/vitest-dev/vitest/issues/4819) [<samp>(2baea)</samp>](https://togithub.com/vitest-dev/vitest/commit/2baea35e)
-   **vm-threads**:
    -   Tests not cancelled on key press, cancelled tests shown twice  -  by [@&#8203;AriPerkkio](https://togithub.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/4781](https://togithub.com/vitest-dev/vitest/issues/4781) [<samp>(cf53d)</samp>](https://togithub.com/vitest-dev/vitest/commit/cf53d4be)

#####     [View changes on GitHub](https://togithub.com/vitest-dev/vitest/compare/v1.1.0...v1.1.1)

</details>

<details>
<summary>dumbmatter/fakeIndexedDB (fake-indexeddb)</summary>

### [`v5.0.2`](https://togithub.com/dumbmatter/fakeIndexedDB/blob/HEAD/CHANGELOG.md#502-2023-12-30)

[Compare Source](https://togithub.com/dumbmatter/fakeIndexedDB/compare/v5.0.1...v5.0.2)

-   [#&#8203;94](https://togithub.com/dumbmatter/fakeIndexedDB/issues/94) - Improved performance of `IDBObjectStore.count` and `IDBIndex.count`.

</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.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMDMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjEwMy4xIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2024-01-02 04:51:44 +00:00
LongYinan
986860070b fix: renovate preserveSemverRanges rule should not be in group 2024-01-02 12:19:55 +08:00
LongYinan
ae3afccdb2 fix: renovate config 2024-01-02 12:13:37 +08:00
LongYinan
b0d90c26d3 ci: fix invalid renovate config (#5470)
- Close https://github.com/toeverything/AFFiNE/issues/5469
2024-01-02 03:37:22 +00:00
Peng Xiao
da5ac224ca test(core): select monthpicker issue when crossing different years (#5478) 2024-01-02 03:28:38 +00:00
LongYinan
10aeefe36d ci: prevent @blocksuite/* packages upgraded without group (#5467) 2023-12-29 10:23:56 +00:00
LongYinan
8eda42c57f chore: remove abbey-wood helm chart (#5464) 2023-12-29 17:51:23 +08:00
Joooye_34
d668016e4c feat(electron): use release api to filter draft release (#5443) 2023-12-29 09:01:35 +00:00
Joooye_34
3341295fc1 ci: temporarily save release from branch to affine-releases (#5455) 2023-12-29 17:00:10 +08:00
Peng Xiao
9e092b9c15 fix(core): long page title issue in page history (#5436)
![CleanShot 2023-12-28 at 18.17.50@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/43733a5b-d1b4-40d5-b9d4-f86896cc0598.png)
2023-12-29 07:27:02 +00:00
Peng Xiao
f65c5dbfa7 fix(core): upgrade page when previewing/reverting page snapshot (#5435) 2023-12-29 07:26:58 +00:00
DarkSky
3082d63948 fix: use absolute path in gql client (#5454) 2023-12-29 06:48:04 +00:00
Joooye_34
5a1065c646 test(electron): add unit tests for updater (#5439) 2023-12-29 04:39:29 +00:00
LongYinan
15566d8507 chore: bump up @nx/vite version to v17.2.8 (#5425)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@nx/vite](https://nx.dev) ([source](https://togithub.com/nrwl/nx/tree/HEAD/packages/vite)) | [`17.2.7` -> `17.2.8`](https://renovatebot.com/diffs/npm/@nx%2fvite/17.2.7/17.2.8) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@nx%2fvite/17.2.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@nx%2fvite/17.2.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@nx%2fvite/17.2.7/17.2.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@nx%2fvite/17.2.7/17.2.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>nrwl/nx (@&#8203;nx/vite)</summary>

### [`v17.2.8`](https://togithub.com/nrwl/nx/releases/tag/17.2.8)

[Compare Source](https://togithub.com/nrwl/nx/compare/17.2.7...17.2.8)

#### 17.2.8

##### 🚀 Features

-   **remix:** add remix

##### 🩹 Fixes

-   **linter:** flat config should always set path to config when using API
-   **nextjs:** update migration to handle projects without eslintrc

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMDMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjEwMy4xIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2023-12-29 04:10:19 +00:00
Peng Xiao
3978b2dfd2 refactor(core): onboarding using new transformer api (#5412)
Use new `transformer` to import onboarding json templates.

The json files are generated via this gist
https://gist.github.com/pengx17/ef92c305ac23123803a1a6a20e31f822

Not using the all-in-one `ZipTransformer` to import onboarding via a zip file.
1. The main concerns is that we still need to serve the blob resources via CDN to reduce user's blob usage. Otherwise the user will get the onboarding images being uploaded to cloud server every time he creates a new workspace. In this PR we extracted parts of the code from `ZipTransformer` in blocksuite and mute some code for uploading blobs.
2. it maybe not necessary to use zip for loading snapshots.

This PR is a short term solution. whether or not to tune the transformer api design may need further discussions.

fix TOV-264
2023-12-28 13:59:21 +00:00
JimmFly
954b751e7c chore: adjust side bar empty item color (#5422) 2023-12-28 13:49:14 +00:00
DarkSky
b3dbac3d4c feat: add migration for rename unamed accounts (#5434)
fix TOV-130
2023-12-28 12:20:00 +00:00
Peng Xiao
6fefe4ec71 fix(storybook): storybook flaky (#5430)
should add additional wait timeout for every story.play

I think this is a storybook issue. It seems that it starts to run the plays as soon as the following shows up:

![CleanShot 2023-12-28 at 17.32.49@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/33d5e49d-a2fd-46c5-9f31-0f7cc14c3acf.png)
2023-12-28 10:07:05 +00:00
EYHN
9d51f9596f refactor(component): make component pure (#5427) 2023-12-28 09:57:26 +00:00
JimmFly
e11e8277ca feat: add useBlocksuiteEditor hooks (#5366) 2023-12-28 08:36:36 +00:00
LongYinan
431f7cfac9 ci: exclude blocksuite from auto update group (#5424) 2023-12-28 08:22:20 +00:00
LongYinan
2f45200542 feat(server): upgrade prisma to use native relation joins and distinct (#5420)
https://github.com/prisma/prisma/releases/tag/5.7.0
2023-12-28 08:09:11 +00:00
LongYinan
07c63703b1 chore: bump up all non-major dependencies (#5187)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence | Type | Update |
|---|---|---|---|---|---|---|---|
| [@aws-sdk/client-s3](https://togithub.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3) ([source](https://togithub.com/aws/aws-sdk-js-v3/tree/HEAD/clients/client-s3)) | [`3.433.0` -> `3.481.0`](https://renovatebot.com/diffs/npm/@aws-sdk%2fclient-s3/3.433.0/3.481.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@aws-sdk%2fclient-s3/3.481.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@aws-sdk%2fclient-s3/3.481.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@aws-sdk%2fclient-s3/3.433.0/3.481.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@aws-sdk%2fclient-s3/3.433.0/3.481.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor |
| [@blocksuite/block-std](https://togithub.com/toeverything/blocksuite) | [`0.11.0-nightly-202312220916-e3abcbb` -> `0.11.0-nightly-202312270831-214616d`](https://renovatebot.com/diffs/npm/@blocksuite%2fblock-std/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@blocksuite%2fblock-std/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@blocksuite%2fblock-std/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@blocksuite%2fblock-std/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@blocksuite%2fblock-std/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [@blocksuite/block-std](https://togithub.com/toeverything/blocksuite) | [`0.11.0-nightly-202312220916-e3abcbb` -> `0.11.0-nightly-202312270831-214616d`](https://renovatebot.com/diffs/npm/@blocksuite%2fblock-std/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@blocksuite%2fblock-std/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@blocksuite%2fblock-std/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@blocksuite%2fblock-std/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@blocksuite%2fblock-std/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch |
| [@blocksuite/blocks](https://togithub.com/toeverything/blocksuite) | [`0.11.0-nightly-202312220916-e3abcbb` -> `0.11.0-nightly-202312270831-214616d`](https://renovatebot.com/diffs/npm/@blocksuite%2fblocks/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@blocksuite%2fblocks/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@blocksuite%2fblocks/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@blocksuite%2fblocks/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@blocksuite%2fblocks/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [@blocksuite/blocks](https://togithub.com/toeverything/blocksuite) | [`0.11.0-nightly-202312220916-e3abcbb` -> `0.11.0-nightly-202312270831-214616d`](https://renovatebot.com/diffs/npm/@blocksuite%2fblocks/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@blocksuite%2fblocks/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@blocksuite%2fblocks/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@blocksuite%2fblocks/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@blocksuite%2fblocks/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch |
| [@blocksuite/global](https://togithub.com/toeverything/blocksuite) | [`0.11.0-nightly-202312220916-e3abcbb` -> `0.11.0-nightly-202312270831-214616d`](https://renovatebot.com/diffs/npm/@blocksuite%2fglobal/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@blocksuite%2fglobal/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@blocksuite%2fglobal/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@blocksuite%2fglobal/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@blocksuite%2fglobal/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [@blocksuite/global](https://togithub.com/toeverything/blocksuite) | [`0.11.0-nightly-202312220916-e3abcbb` -> `0.11.0-nightly-202312270831-214616d`](https://renovatebot.com/diffs/npm/@blocksuite%2fglobal/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@blocksuite%2fglobal/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@blocksuite%2fglobal/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@blocksuite%2fglobal/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@blocksuite%2fglobal/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch |
| [@blocksuite/icons](https://togithub.com/toeverything/icons) | [`2.1.36` -> `2.1.39`](https://renovatebot.com/diffs/npm/@blocksuite%2ficons/2.1.36/2.1.39) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@blocksuite%2ficons/2.1.39?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@blocksuite%2ficons/2.1.39?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@blocksuite%2ficons/2.1.36/2.1.39?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@blocksuite%2ficons/2.1.36/2.1.39?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch |
| [@blocksuite/icons](https://togithub.com/toeverything/icons) | [`2.1.36` -> `2.1.39`](https://renovatebot.com/diffs/npm/@blocksuite%2ficons/2.1.36/2.1.39) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@blocksuite%2ficons/2.1.39?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@blocksuite%2ficons/2.1.39?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@blocksuite%2ficons/2.1.36/2.1.39?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@blocksuite%2ficons/2.1.36/2.1.39?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [@blocksuite/inline](https://togithub.com/toeverything/blocksuite) | [`0.11.0-nightly-202312220916-e3abcbb` -> `0.11.0-nightly-202312270831-214616d`](https://renovatebot.com/diffs/npm/@blocksuite%2finline/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@blocksuite%2finline/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@blocksuite%2finline/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@blocksuite%2finline/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@blocksuite%2finline/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch |
| [@blocksuite/lit](https://togithub.com/toeverything/blocksuite) | [`0.11.0-nightly-202312220916-e3abcbb` -> `0.11.0-nightly-202312270831-214616d`](https://renovatebot.com/diffs/npm/@blocksuite%2flit/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@blocksuite%2flit/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@blocksuite%2flit/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@blocksuite%2flit/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@blocksuite%2flit/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [@blocksuite/lit](https://togithub.com/toeverything/blocksuite) | [`0.11.0-nightly-202312220916-e3abcbb` -> `0.11.0-nightly-202312270831-214616d`](https://renovatebot.com/diffs/npm/@blocksuite%2flit/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@blocksuite%2flit/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@blocksuite%2flit/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@blocksuite%2flit/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@blocksuite%2flit/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch |
| [@blocksuite/presets](https://togithub.com/toeverything/blocksuite) | [`0.11.0-nightly-202312220916-e3abcbb` -> `0.11.0-nightly-202312270831-214616d`](https://renovatebot.com/diffs/npm/@blocksuite%2fpresets/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@blocksuite%2fpresets/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@blocksuite%2fpresets/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@blocksuite%2fpresets/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@blocksuite%2fpresets/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [@blocksuite/presets](https://togithub.com/toeverything/blocksuite) | [`0.11.0-nightly-202312220916-e3abcbb` -> `0.11.0-nightly-202312270831-214616d`](https://renovatebot.com/diffs/npm/@blocksuite%2fpresets/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@blocksuite%2fpresets/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@blocksuite%2fpresets/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@blocksuite%2fpresets/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@blocksuite%2fpresets/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch |
| [@blocksuite/store](https://togithub.com/toeverything/blocksuite) | [`0.11.0-nightly-202312220916-e3abcbb` -> `0.11.0-nightly-202312270831-214616d`](https://renovatebot.com/diffs/npm/@blocksuite%2fstore/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@blocksuite%2fstore/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@blocksuite%2fstore/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@blocksuite%2fstore/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@blocksuite%2fstore/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [@blocksuite/store](https://togithub.com/toeverything/blocksuite) | [`0.11.0-nightly-202312220916-e3abcbb` -> `0.11.0-nightly-202312270831-214616d`](https://renovatebot.com/diffs/npm/@blocksuite%2fstore/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@blocksuite%2fstore/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@blocksuite%2fstore/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@blocksuite%2fstore/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@blocksuite%2fstore/0.11.0-nightly-202312220916-e3abcbb/0.11.0-nightly-202312270831-214616d?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch |
| [@electron/remote](https://togithub.com/electron/remote) | [`2.1.0` -> `2.1.1`](https://renovatebot.com/diffs/npm/@electron%2fremote/2.1.0/2.1.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@electron%2fremote/2.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@electron%2fremote/2.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@electron%2fremote/2.1.0/2.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@electron%2fremote/2.1.0/2.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [@marsidev/react-turnstile](https://togithub.com/marsidev/react-turnstile) | [`^0.3.1` -> `^0.4.0`](https://renovatebot.com/diffs/npm/@marsidev%2freact-turnstile/0.3.2/0.4.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@marsidev%2freact-turnstile/0.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@marsidev%2freact-turnstile/0.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@marsidev%2freact-turnstile/0.3.2/0.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@marsidev%2freact-turnstile/0.3.2/0.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor |
| [@napi-rs/cli](https://togithub.com/napi-rs/napi-rs) | [`3.0.0-alpha.15` -> `3.0.0-alpha.25`](https://renovatebot.com/diffs/npm/@napi-rs%2fcli/3.0.0-alpha.15/3.0.0-alpha.25) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@napi-rs%2fcli/3.0.0-alpha.25?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@napi-rs%2fcli/3.0.0-alpha.25?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@napi-rs%2fcli/3.0.0-alpha.15/3.0.0-alpha.25?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@napi-rs%2fcli/3.0.0-alpha.15/3.0.0-alpha.25?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch |
| [@nx/vite](https://nx.dev) ([source](https://togithub.com/nrwl/nx/tree/HEAD/packages/vite)) | [`17.1.3` -> `17.2.7`](https://renovatebot.com/diffs/npm/@nx%2fvite/17.1.3/17.2.7) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@nx%2fvite/17.2.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@nx%2fvite/17.2.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@nx%2fvite/17.1.3/17.2.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@nx%2fvite/17.1.3/17.2.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor |
| [@storybook/test-runner](https://togithub.com/storybookjs/test-runner) | [`^0.15.2` -> `^0.16.0`](https://renovatebot.com/diffs/npm/@storybook%2ftest-runner/0.15.2/0.16.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@storybook%2ftest-runner/0.16.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@storybook%2ftest-runner/0.16.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@storybook%2ftest-runner/0.15.2/0.16.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@storybook%2ftest-runner/0.15.2/0.16.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor |
| [@vitest/coverage-istanbul](https://togithub.com/vitest-dev/vitest/tree/main/packages/coverage-istanbul#readme) ([source](https://togithub.com/vitest-dev/vitest/tree/HEAD/packages/coverage-istanbul)) | [`1.0.4` -> `1.1.0`](https://renovatebot.com/diffs/npm/@vitest%2fcoverage-istanbul/1.0.4/1.1.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@vitest%2fcoverage-istanbul/1.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@vitest%2fcoverage-istanbul/1.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@vitest%2fcoverage-istanbul/1.0.4/1.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@vitest%2fcoverage-istanbul/1.0.4/1.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor |
| [@vitest/ui](https://togithub.com/vitest-dev/vitest/tree/main/packages/ui#readme) ([source](https://togithub.com/vitest-dev/vitest/tree/HEAD/packages/ui)) | [`1.0.4` -> `1.1.0`](https://renovatebot.com/diffs/npm/@vitest%2fui/1.0.4/1.1.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@vitest%2fui/1.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@vitest%2fui/1.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@vitest%2fui/1.0.4/1.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@vitest%2fui/1.0.4/1.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor |
| [cloudflare/wrangler-action](https://togithub.com/cloudflare/wrangler-action) | `v3.3.2` -> `v3.4.0` | [![age](https://developer.mend.io/api/mc/badges/age/github-tags/cloudflare%2fwrangler-action/v3.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/github-tags/cloudflare%2fwrangler-action/v3.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/github-tags/cloudflare%2fwrangler-action/v3.3.2/v3.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/github-tags/cloudflare%2fwrangler-action/v3.3.2/v3.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | action | minor |
| openresty/openresty | `1.21.4.1-0-buster` -> `1.21.4.3-0-buster` | [![age](https://developer.mend.io/api/mc/badges/age/docker/openresty%2fopenresty/1.21.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/docker/openresty%2fopenresty/1.21.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/docker/openresty%2fopenresty/1.21.4.1/1.21.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/docker/openresty%2fopenresty/1.21.4.1/1.21.4.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | final | patch |
| [postgresql](https://bitnami.com) ([source](https://togithub.com/bitnami/charts/tree/HEAD/bitnami/postgresql)) | `13.2.23` -> `13.2.26` | [![age](https://developer.mend.io/api/mc/badges/age/helm/postgresql/13.2.26?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/helm/postgresql/13.2.26?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/helm/postgresql/13.2.23/13.2.26?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/helm/postgresql/13.2.23/13.2.26?slim=true)](https://docs.renovatebot.com/merge-confidence/) |  | patch |
| [reflect-metadata](http://rbuckton.github.io/reflect-metadata) ([source](https://togithub.com/rbuckton/reflect-metadata)) | [`^0.1.13` -> `^0.2.0`](https://renovatebot.com/diffs/npm/reflect-metadata/0.1.13/0.2.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/reflect-metadata/0.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/reflect-metadata/0.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/reflect-metadata/0.1.13/0.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/reflect-metadata/0.1.13/0.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | minor |
| [vite-plugin-dts](https://togithub.com/qmhc/vite-plugin-dts) | [`3.6.0` -> `3.7.0`](https://renovatebot.com/diffs/npm/vite-plugin-dts/3.6.0/3.7.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/vite-plugin-dts/3.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/vite-plugin-dts/3.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/vite-plugin-dts/3.6.0/3.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vite-plugin-dts/3.6.0/3.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor |
| [vitest](https://togithub.com/vitest-dev/vitest) ([source](https://togithub.com/vitest-dev/vitest/tree/HEAD/packages/vitest)) | [`1.0.4` -> `1.1.0`](https://renovatebot.com/diffs/npm/vitest/1.0.4/1.1.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/vitest/1.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/vitest/1.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/vitest/1.0.4/1.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vitest/1.0.4/1.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor |

---

### Release Notes

<details>
<summary>aws/aws-sdk-js-v3 (@&#8203;aws-sdk/client-s3)</summary>

### [`v3.481.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#34810-2023-12-26)

[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.478.0...v3.481.0)

##### Features

-   codegen for command class builder ([#&#8203;5604](https://togithub.com/aws/aws-sdk-js-v3/issues/5604)) ([4835de4](4835de4ebb))

### [`v3.478.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#34780-2023-12-20)

[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.477.0...v3.478.0)

##### Features

-   codegen for paginator factory ([#&#8203;5590](https://togithub.com/aws/aws-sdk-js-v3/issues/5590)) ([e54099b](e54099b7c1))

### [`v3.477.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#34770-2023-12-19)

[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.476.0...v3.477.0)

##### Features

-   xml codegen reduction ([#&#8203;5566](https://togithub.com/aws/aws-sdk-js-v3/issues/5566)) ([3ed7c81](3ed7c81f91))

### [`v3.476.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#34760-2023-12-18)

[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.474.0...v3.476.0)

**Note:** Version bump only for package [@&#8203;aws-sdk/client-s3](https://togithub.com/aws-sdk/client-s3)

### [`v3.474.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#34740-2023-12-14)

[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.473.0...v3.474.0)

**Note:** Version bump only for package [@&#8203;aws-sdk/client-s3](https://togithub.com/aws-sdk/client-s3)

### [`v3.473.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#34730-2023-12-13)

[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.472.0...v3.473.0)

**Note:** Version bump only for package [@&#8203;aws-sdk/client-s3](https://togithub.com/aws-sdk/client-s3)

### [`v3.472.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#34720-2023-12-12)

[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.470.0...v3.472.0)

##### Bug Fixes

-   **codegen:** dedupe `[@aws](https://togithub.com/aws).protocols#restXml` serialization ([#&#8203;5568](https://togithub.com/aws/aws-sdk-js-v3/issues/5568)) ([7df7325](7df73259b6))

### [`v3.470.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#34700-2023-12-08)

[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.468.0...v3.470.0)

**Note:** Version bump only for package [@&#8203;aws-sdk/client-s3](https://togithub.com/aws-sdk/client-s3)

### [`v3.468.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#34680-2023-12-06)

[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.465.0...v3.468.0)

**Note:** Version bump only for package [@&#8203;aws-sdk/client-s3](https://togithub.com/aws-sdk/client-s3)

### [`v3.465.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#34650-2023-12-01)

[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.462.0...v3.465.0)

**Note:** Version bump only for package [@&#8203;aws-sdk/client-s3](https://togithub.com/aws-sdk/client-s3)

### [`v3.462.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#34620-2023-11-29)

[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.461.0...v3.462.0)

**Note:** Version bump only for package [@&#8203;aws-sdk/client-s3](https://togithub.com/aws-sdk/client-s3)

### [`v3.461.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#34610-2023-11-28)

[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.460.0...v3.461.0)

##### Features

-   **client-s3:** Adds support for S3 Express One Zone. ([1dcc776](1dcc776322))

### [`v3.460.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#34600-2023-11-28)

[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.458.0...v3.460.0)

**Note:** Version bump only for package [@&#8203;aws-sdk/client-s3](https://togithub.com/aws-sdk/client-s3)

### [`v3.458.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#34580-2023-11-27)

[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.456.0...v3.458.0)

##### Features

-   **client-s3:** Adding new params - Key and Prefix, to S3 API operations for supporting S3 Access Grants. Note - These updates will not change any of the existing S3 API functionality. ([ba36517](ba365170a0))

### [`v3.456.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#34560-2023-11-21)

[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.454.0...v3.456.0)

##### Features

-   **client-s3:** Add support for automatic date based partitioning in S3 Server Access Logs. ([06ee66a](06ee66ae3b))

### [`v3.454.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#34540-2023-11-17)

[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.451.0...v3.454.0)

##### Features

-   **client-s3:** Removes all default 0 values for numbers and false values for booleans ([61b32fe](61b32fe67a))

### [`v3.451.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#34510-2023-11-14)

[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.450.0...v3.451.0)

**Note:** Version bump only for package [@&#8203;aws-sdk/client-s3](https://togithub.com/aws-sdk/client-s3)

### [`v3.450.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#34500-2023-11-13)

[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.449.0...v3.450.0)

**Note:** Version bump only for package [@&#8203;aws-sdk/client-s3](https://togithub.com/aws-sdk/client-s3)

### [`v3.449.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#34490-2023-11-10)

[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.445.0...v3.449.0)

**Note:** Version bump only for package [@&#8203;aws-sdk/client-s3](https://togithub.com/aws-sdk/client-s3)

### [`v3.445.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#34450-2023-11-07)

[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.441.0...v3.445.0)

**Note:** Version bump only for package [@&#8203;aws-sdk/client-s3](https://togithub.com/aws-sdk/client-s3)

### [`v3.441.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#34410-2023-11-01)

[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.440.0...v3.441.0)

**Note:** Version bump only for package [@&#8203;aws-sdk/client-s3](https://togithub.com/aws-sdk/client-s3)

### [`v3.440.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#34400-2023-10-31)

[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.438.0...v3.440.0)

**Note:** Version bump only for package [@&#8203;aws-sdk/client-s3](https://togithub.com/aws-sdk/client-s3)

### [`v3.438.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#34380-2023-10-27)

[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.437.0...v3.438.0)

**Note:** Version bump only for package [@&#8203;aws-sdk/client-s3](https://togithub.com/aws-sdk/client-s3)

### [`v3.437.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#34370-2023-10-26)

[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.436.0...v3.437.0)

##### Bug Fixes

-   **signature-v4-crt:** remove dynamic imports (!) ([#&#8203;5225](https://togithub.com/aws/aws-sdk-js-v3/issues/5225)) ([89f97b5](89f97b5cea))

### [`v3.436.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#34360-2023-10-25)

[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.435.0...v3.436.0)

**Note:** Version bump only for package [@&#8203;aws-sdk/client-s3](https://togithub.com/aws-sdk/client-s3)

### [`v3.435.0`](https://togithub.com/aws/aws-sdk-js-v3/blob/HEAD/clients/client-s3/CHANGELOG.md#34350-2023-10-24)

[Compare Source](https://togithub.com/aws/aws-sdk-js-v3/compare/v3.433.0...v3.435.0)

**Note:** Version bump only for package [@&#8203;aws-sdk/client-s3](https://togithub.com/aws-sdk/client-s3)

</details>

<details>
<summary>toeverything/icons (@&#8203;blocksuite/icons)</summary>

### [`v2.1.39`](83cf4ea106...e255947e4e)

[Compare Source](83cf4ea106...e255947e4e)

### [`v2.1.38`](1c26e8f533...83cf4ea106)

[Compare Source](1c26e8f533...83cf4ea106)

### [`v2.1.37`](310adb0b9f...1c26e8f533)

[Compare Source](310adb0b9f...1c26e8f533)

</details>

<details>
<summary>electron/remote (@&#8203;electron/remote)</summary>

### [`v2.1.1`](https://togithub.com/electron/remote/releases/tag/v2.1.1)

[Compare Source](https://togithub.com/electron/remote/compare/v2.1.0...v2.1.1)

##### Bug Fixes

-   senderId removed in Electron 28 ([#&#8203;171](https://togithub.com/electron/remote/issues/171)) ([51ff1b4](51ff1b432f))

</details>

<details>
<summary>marsidev/react-turnstile (@&#8203;marsidev/react-turnstile)</summary>

### [`v0.4.0`](https://togithub.com/marsidev/react-turnstile/releases/tag/v0.4.0)

[Compare Source](https://togithub.com/marsidev/react-turnstile/compare/v0.3.2...v0.4.0)

#####    🚀 Features

-   Add `crossOrigin` to `scriptOptions`  -  by [@&#8203;kaichii](https://togithub.com/kaichii) [<samp>(a588b)</samp>](https://togithub.com/marsidev/react-turnstile/commit/a588b72)
-   Add `onLoadScript` callback  -  by [@&#8203;marsidev](https://togithub.com/marsidev) [<samp>(4e5bc)</samp>](https://togithub.com/marsidev/react-turnstile/commit/4e5bcc3)
-   Add support for `isExpired()` method  -  by [@&#8203;marsidev](https://togithub.com/marsidev) [<samp>(7daca)</samp>](https://togithub.com/marsidev/react-turnstile/commit/7daca97)

#####     [View changes on GitHub](https://togithub.com/marsidev/react-turnstile/compare/v0.3.2...v0.4.0)

</details>

<details>
<summary>napi-rs/napi-rs (@&#8203;napi-rs/cli)</summary>

### [`v3.0.0-alpha.25`](https://togithub.com/napi-rs/napi-rs/releases/tag/%40napi-rs/cli%403.0.0-alpha.25)

[Compare Source](https://togithub.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.24...@napi-rs/cli@3.0.0-alpha.25)

##### What's Changed

-   fix(cli): compatible with napi artifacts -d option by [@&#8203;Brooooooklyn](https://togithub.com/Brooooooklyn) in [https://github.com/napi-rs/napi-rs/pull/1872](https://togithub.com/napi-rs/napi-rs/pull/1872)

**Full Changelog**: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.14.6...[@&#8203;napi-rs/cli](https://togithub.com/napi-rs/cli)[@&#8203;3](https://togithub.com/3).0.0-alpha.25

### [`v3.0.0-alpha.24`](https://togithub.com/napi-rs/napi-rs/releases/tag/%40napi-rs/cli%403.0.0-alpha.24)

[Compare Source](https://togithub.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.23...@napi-rs/cli@3.0.0-alpha.24)

##### What's Changed

-   fix(cli): prepublish tagstyle flag by [@&#8203;Brooooooklyn](https://togithub.com/Brooooooklyn) in [https://github.com/napi-rs/napi-rs/pull/1863](https://togithub.com/napi-rs/napi-rs/pull/1863)
-   chore(cli): root directory access permissions by [@&#8203;Brooooooklyn](https://togithub.com/Brooooooklyn) in [https://github.com/napi-rs/napi-rs/pull/1864](https://togithub.com/napi-rs/napi-rs/pull/1864)
-   feat(cli): support wasi target test & release workflow by [@&#8203;Brooooooklyn](https://togithub.com/Brooooooklyn) in [https://github.com/napi-rs/napi-rs/pull/1867](https://togithub.com/napi-rs/napi-rs/pull/1867)

**Full Changelog**: https://github.com/napi-rs/napi-rs/compare/[@&#8203;napi-rs/cli](https://togithub.com/napi-rs/cli)[@&#8203;3](https://togithub.com/3).0.0-alpha.20...[@&#8203;napi-rs/cli](https://togithub.com/napi-rs/cli)[@&#8203;3](https://togithub.com/3).0.0-alpha.24

### [`v3.0.0-alpha.23`](https://togithub.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.22...@napi-rs/cli@3.0.0-alpha.23)

[Compare Source](https://togithub.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.22...@napi-rs/cli@3.0.0-alpha.23)

### [`v3.0.0-alpha.22`](https://togithub.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.21...@napi-rs/cli@3.0.0-alpha.22)

[Compare Source](https://togithub.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.21...@napi-rs/cli@3.0.0-alpha.22)

### [`v3.0.0-alpha.21`](https://togithub.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.20...@napi-rs/cli@3.0.0-alpha.21)

[Compare Source](https://togithub.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.20...@napi-rs/cli@3.0.0-alpha.21)

### [`v3.0.0-alpha.20`](https://togithub.com/napi-rs/napi-rs/releases/tag/%40napi-rs/cli%403.0.0-alpha.20)

[Compare Source](https://togithub.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.19...@napi-rs/cli@3.0.0-alpha.20)

#### What's Changed

-   chore(deps): update actions/download-artifact action to v4 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/napi-rs/napi-rs/pull/1856](https://togithub.com/napi-rs/napi-rs/pull/1856)
-   fix(cli): make prepublish as pre-publish alias by [@&#8203;Brooooooklyn](https://togithub.com/Brooooooklyn) in [https://github.com/napi-rs/napi-rs/pull/1861](https://togithub.com/napi-rs/napi-rs/pull/1861)

**Full Changelog**: https://github.com/napi-rs/napi-rs/compare/[@&#8203;napi-rs/cli](https://togithub.com/napi-rs/cli)[@&#8203;3](https://togithub.com/3).0.0-alpha.19...[@&#8203;napi-rs/cli](https://togithub.com/napi-rs/cli)[@&#8203;3](https://togithub.com/3).0.0-alpha.20

### [`v3.0.0-alpha.19`](https://togithub.com/napi-rs/napi-rs/releases/tag/%40napi-rs/cli%403.0.0-alpha.19)

[Compare Source](https://togithub.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.18...@napi-rs/cli@3.0.0-alpha.19)

##### What's Changed

-   fix(cli): artifacts default option value by [@&#8203;Brooooooklyn](https://togithub.com/Brooooooklyn) in [https://github.com/napi-rs/napi-rs/pull/1853](https://togithub.com/napi-rs/napi-rs/pull/1853)
-   fix: more accurate napi expanding error by [@&#8203;forehalo](https://togithub.com/forehalo) in [https://github.com/napi-rs/napi-rs/pull/1854](https://togithub.com/napi-rs/napi-rs/pull/1854)
-   feat(cli): support read config from the given config file by [@&#8203;Brooooooklyn](https://togithub.com/Brooooooklyn) in [https://github.com/napi-rs/napi-rs/pull/1859](https://togithub.com/napi-rs/napi-rs/pull/1859)
-   fix(cli): prepublish command by [@&#8203;Brooooooklyn](https://togithub.com/Brooooooklyn) in [https://github.com/napi-rs/napi-rs/pull/1860](https://togithub.com/napi-rs/napi-rs/pull/1860)

**Full Changelog**: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.14.4...[@&#8203;napi-rs/cli](https://togithub.com/napi-rs/cli)[@&#8203;3](https://togithub.com/3).0.0-alpha.19

### [`v3.0.0-alpha.18`](https://togithub.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.17...@napi-rs/cli@3.0.0-alpha.18)

[Compare Source](https://togithub.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.17...@napi-rs/cli@3.0.0-alpha.18)

### [`v3.0.0-alpha.17`](https://togithub.com/napi-rs/napi-rs/releases/tag/%40napi-rs/cli%403.0.0-alpha.17)

[Compare Source](https://togithub.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.16...@napi-rs/cli@3.0.0-alpha.17)

##### What's Changed

-   fix(cli): make outputDir option of artifacts command compatible with v2 by [@&#8203;Brooooooklyn](https://togithub.com/Brooooooklyn) in [https://github.com/napi-rs/napi-rs/pull/1850](https://togithub.com/napi-rs/napi-rs/pull/1850)
-   fix(binding): add riscv64 linux binding by [@&#8203;kxxt](https://togithub.com/kxxt) in [https://github.com/napi-rs/napi-rs/pull/1851](https://togithub.com/napi-rs/napi-rs/pull/1851)

**Full Changelog**: https://github.com/napi-rs/napi-rs/compare/napi-derive@2.14.3...[@&#8203;napi-rs/cli](https://togithub.com/napi-rs/cli)[@&#8203;3](https://togithub.com/3).0.0-alpha.17

### [`v3.0.0-alpha.16`](https://togithub.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.15...@napi-rs/cli@3.0.0-alpha.16)

[Compare Source](https://togithub.com/napi-rs/napi-rs/compare/@napi-rs/cli@3.0.0-alpha.15...@napi-rs/cli@3.0.0-alpha.16)

</details>

<details>
<summary>nrwl/nx (@&#8203;nx/vite)</summary>

### [`v17.2.7`](https://togithub.com/nrwl/nx/releases/tag/17.2.7)

[Compare Source](https://togithub.com/nrwl/nx/compare/17.2.6...17.2.7)

##### 17.2.7

##### 🩹 Fixes

-   **angular:** fix standalone eslint config generation
-   **bundling:** added back code to handle skipTypeField option of rollup executor options + tests
-   **linter:** ensure angular entry point checks are correct
-   **nextjs:** enhance page generator to work when --project is not supplied
-   **nextjs:** remove temporary patch for next eslint rules
-   **nextjs:** correct inferred outputs for root Next.js projects
-   **node:** E2E test port conflicts
-   **release:** add overall nx release command
-   **release:** publish error handling, dry-run in dependsOn
-   **release:** capture all release titles during parse
-   **testing:** run playwright with the correct project option for multiple values
-   **testing:** safely handle circular deps in component testing plugin
-   **testing:** set correct type for ignoreTestFiles option in cypress executor
-   **vite:** vitest migration add reporters
-   **vite:** more properly resolve arguments from configurations
-   **vite:** dist and coverage paths for root projects

### [`v17.2.6`](https://togithub.com/nrwl/nx/releases/tag/17.2.6)

[Compare Source](https://togithub.com/nrwl/nx/compare/17.2.5...17.2.6)

##### 17.2.6

##### 🚀 Features

-   **release:** support Revert commits in changelog renderer ([#&#8203;20663](https://togithub.com/nrwl/nx/pull/20663))

##### 🩹 Fixes

-   **js:** fixing output based on test runner selection ([#&#8203;20788](https://togithub.com/nrwl/nx/pull/20788))
-   **linter:** fix workspace-rule naming with flat config ([#&#8203;20782](https://togithub.com/nrwl/nx/pull/20782))
-   **module-federation:** support buildable libs ([#&#8203;20786](https://togithub.com/nrwl/nx/pull/20786))
-   **nextjs:** Page generator should work out of the box ([#&#8203;20775](https://togithub.com/nrwl/nx/pull/20775))
-   **nx-dev:** dynamic classes not allowed ([#&#8203;20800](https://togithub.com/nrwl/nx/pull/20800))
-   **release:** changelog renderer should prefer breaking change explanation text ([#&#8203;20798](https://togithub.com/nrwl/nx/pull/20798))
-   **release:** ensure leading v is stripped from provided semver version ([#&#8203;20815](https://togithub.com/nrwl/nx/pull/20815))
-   **vite:** only dynamically import vite ([#&#8203;20774](https://togithub.com/nrwl/nx/pull/20774))

##### ❤️  Thank You

-   Colum Ferry [@&#8203;Coly010](https://togithub.com/Coly010)
-   Isaac Mann [@&#8203;isaacplmann](https://togithub.com/isaacplmann)
-   James Henry [@&#8203;JamesHenry](https://togithub.com/JamesHenry)
-   Katerina Skroumpelou [@&#8203;mandarini](https://togithub.com/mandarini)
-   Miroslav Jonaš [@&#8203;meeroslav](https://togithub.com/meeroslav)
-   Nicholas Cunningham [@&#8203;ndcunningham](https://togithub.com/ndcunningham)

### [`v17.2.5`](https://togithub.com/nrwl/nx/releases/tag/17.2.5)

[Compare Source](https://togithub.com/nrwl/nx/compare/17.2.4...17.2.5)

#### 17.2.5

##### 🩹 Fixes

-   **angular:** safely update task runner cacheable operations when setting up ssr ([#&#8203;20736](https://togithub.com/nrwl/nx/pull/20736))
-   **core:** fallback to checking stderr if stdout is empty on publish executor ([#&#8203;20737](https://togithub.com/nrwl/nx/pull/20737))
-   **core:** correctly move project and target strings ([#&#8203;20726](https://togithub.com/nrwl/nx/pull/20726))
-   **linter:** move should migrate all eslint configs ([#&#8203;20709](https://togithub.com/nrwl/nx/pull/20709))
-   **misc:** disallow path segments and allow scoped package name in --newProjectName option of move generator ([#&#8203;20768](https://togithub.com/nrwl/nx/pull/20768))
-   **module-federation:** allow relative remote paths ([#&#8203;20763](https://togithub.com/nrwl/nx/pull/20763))
-   **nextjs:** empty port should not overwrite env port ([#&#8203;20751](https://togithub.com/nrwl/nx/pull/20751))
-   **nextjs:** Add missing setParserOptionProject ([#&#8203;20754](https://togithub.com/nrwl/nx/pull/20754))
-   **react:** remove <base> tag from generated index.html ([#&#8203;20750](https://togithub.com/nrwl/nx/pull/20750))
-   **react:** update default webpack config for component testing ([#&#8203;20749](https://togithub.com/nrwl/nx/pull/20749))
-   **storybook:** do not throw for versions >=7 ([#&#8203;20770](https://togithub.com/nrwl/nx/pull/20770))
-   **testing:** avoid overwriting environment variables in nx cypress preset ([#&#8203;20748](https://togithub.com/nrwl/nx/pull/20748))
-   **vite:** allow vitest to be v1 ([#&#8203;20760](https://togithub.com/nrwl/nx/pull/20760))

##### ❤️  Thank You

-   Colum Ferry [@&#8203;Coly010](https://togithub.com/Coly010)
-   Craigory Coppola [@&#8203;AgentEnder](https://togithub.com/AgentEnder)
-   Jack Hsu [@&#8203;jaysoo](https://togithub.com/jaysoo)
-   Katerina Skroumpelou [@&#8203;mandarini](https://togithub.com/mandarini)
-   Leosvel Pérez Espinosa [@&#8203;leosvelperez](https://togithub.com/leosvelperez)
-   Miroslav Jonaš [@&#8203;meeroslav](https://togithub.com/meeroslav)
-   Nicholas Cunningham [@&#8203;ndcunningham](https://togithub.com/ndcunningham)

### [`v17.2.4`](https://togithub.com/nrwl/nx/releases/tag/17.2.4)

[Compare Source](https://togithub.com/nrwl/nx/compare/17.2.3...17.2.4)

#### 17.2.4

##### 🩹 Fixes

-   **webpack:** fix check for standardWebpackConfigFunction ([#&#8203;20728](https://togithub.com/nrwl/nx/pull/20728))

##### ❤️  Thank You

-   Jack Hsu [@&#8203;jaysoo](https://togithub.com/jaysoo)

### [`v17.2.3`](https://togithub.com/nrwl/nx/releases/tag/17.2.3)

[Compare Source](https://togithub.com/nrwl/nx/compare/17.2.2...17.2.3)

#### 17.2.3

##### 🩹 Fixes

-   **react:** skip adding comma to config when adding remote to host if… ([#&#8203;20620](https://togithub.com/nrwl/nx/pull/20620))

##### ❤️  Thank You

-   Tórur Zachariasen [@&#8203;torurz](https://togithub.com/torurz)

### [`v17.2.2`](https://togithub.com/nrwl/nx/releases/tag/17.2.2)

[Compare Source](https://togithub.com/nrwl/nx/compare/17.2.1...17.2.2)

#### 17.2.2

##### 🩹 Fixes

-   **core:** show warning if workspaceRoot starts with ! ([#&#8203;20705](https://togithub.com/nrwl/nx/pull/20705))
-   **core:** properly handle negated paths in cache outputs ([#&#8203;20661](https://togithub.com/nrwl/nx/pull/20661))
-   **react:** skip adding comma to config when adding remote to host if… ([#&#8203;20620](https://togithub.com/nrwl/nx/pull/20620))
-   **vite:** ignore CJS build deprecated warning ([#&#8203;20719](https://togithub.com/nrwl/nx/pull/20719))
-   **vite:** better extra args resolution ([#&#8203;20708](https://togithub.com/nrwl/nx/pull/20708))
-   **webpack:** add standardWebpackConfigFunction option when users opts for a standard config function ([#&#8203;20702](https://togithub.com/nrwl/nx/pull/20702))
-   **webpack:** handle both nx and nrwl scoped executors when migrating config ([#&#8203;20714](https://togithub.com/nrwl/nx/pull/20714))

##### ❤️  Thank You

-   Jack Hsu [@&#8203;jaysoo](https://togithub.com/jaysoo)
-   Jonathan Cammisuli
-   Katerina Skroumpelou [@&#8203;mandarini](https://togithub.com/mandarini)
-   Tórur Zachariasen [@&#8203;torurz](https://togithub.com/torurz)

### [`v17.2.1`](https://togithub.com/nrwl/nx/releases/tag/17.2.1)

[Compare Source](https://togithub.com/nrwl/nx/compare/17.2.0...17.2.1)

#### 17.2.1

##### 🩹 Fixes

-   **angular:** add missing package update for [@&#8203;angular/pwa](https://togithub.com/angular/pwa) ([#&#8203;20690](https://togithub.com/nrwl/nx/pull/20690))
-   **react:** webpack backwards compat for `@nx/react/plugin/webpack` ([#&#8203;20697](https://togithub.com/nrwl/nx/pull/20697))
-   **vite:** config migration account for other syntaxes ([#&#8203;20693](https://togithub.com/nrwl/nx/pull/20693))
-   **webpack:** migrate projects without webpackConfig to use webpack.config.js ([#&#8203;20699](https://togithub.com/nrwl/nx/pull/20699))
-   **webpack:** fixed `isolatedConfig: false` option not composing plugins ([#&#8203;20678](https://togithub.com/nrwl/nx/pull/20678))

##### ❤️  Thank You

-   Jack Hsu [@&#8203;jaysoo](https://togithub.com/jaysoo)
-   Katerina Skroumpelou [@&#8203;mandarini](https://togithub.com/mandarini)
-   Leosvel Pérez Espinosa [@&#8203;leosvelperez](https://togithub.com/leosvelperez)
-   Tycho Bokdam [@&#8203;TriPSs](https://togithub.com/TriPSs)

### [`v17.2.0`](https://togithub.com/nrwl/nx/releases/tag/17.2.0)

[Compare Source](https://togithub.com/nrwl/nx/compare/17.1.3...17.2.0)

#### 17.2.0

##### 🚀 Features

-   **angular:** update component generator to use a single string `styles` or `styleUrl` property ([#&#8203;20146](https://togithub.com/nrwl/nx/pull/20146))
-   **angular:** support application builder for cypress component testing ([#&#8203;20214](https://togithub.com/nrwl/nx/pull/20214))
-   **angular:** update ngrx to v17 ([#&#8203;20247](https://togithub.com/nrwl/nx/pull/20247))
-   **angular:** support esbuild-based executors/builders in [@&#8203;nx/angular](https://togithub.com/nx/angular):dev-server ([#&#8203;20311](https://togithub.com/nrwl/nx/pull/20311))
-   **angular:** convert module-federation-dev-server to executor ([#&#8203;20252](https://togithub.com/nrwl/nx/pull/20252))
-   **angular:** support providing esbuild plugins to [@&#8203;nx/angular](https://togithub.com/nx/angular):browser-esbuild ([#&#8203;20504](https://togithub.com/nrwl/nx/pull/20504))
-   **angular:** add application executor ([#&#8203;20529](https://togithub.com/nrwl/nx/pull/20529))
-   **core:** extglob to standard glob parser ([#&#8203;20089](https://togithub.com/nrwl/nx/pull/20089))
-   **core:** make createNodes async ([#&#8203;20195](https://togithub.com/nrwl/nx/pull/20195))
-   **core:** track project changes in source map when applying plugins ([#&#8203;19955](https://togithub.com/nrwl/nx/pull/19955))
-   **core:** independent nx releases and automated git operations ([#&#8203;20191](https://togithub.com/nrwl/nx/pull/20191))
-   **core:** rust task hasher ([#&#8203;19617](https://togithub.com/nrwl/nx/pull/19617))
-   **core:** programmatic API for nx release ([#&#8203;20371](https://togithub.com/nrwl/nx/pull/20371))
-   **core:** allow setting true for changelog config to enable with defaults ([#&#8203;20376](https://togithub.com/nrwl/nx/pull/20376))
-   **core:** add env parameter to run-commands ([#&#8203;20440](https://togithub.com/nrwl/nx/pull/20440))
-   **core:** introduce workspace file archive ([#&#8203;20471](https://togithub.com/nrwl/nx/pull/20471))
-   **core:** targets inferred from plugins override targetDefaults ([#&#8203;20586](https://togithub.com/nrwl/nx/pull/20586))
-   **core:** add task plans to `--graph=file.json` argument ([#&#8203;20643](https://togithub.com/nrwl/nx/pull/20643))
-   **graph:** add project details view ([#&#8203;20466](https://togithub.com/nrwl/nx/pull/20466))
-   **linter:** update eslint to next minor version ([#&#8203;20351](https://togithub.com/nrwl/nx/pull/20351))
-   **linter:** support yaml for flat config conversion ([#&#8203;20022](https://togithub.com/nrwl/nx/pull/20022))
-   **linter:** default lintFilePatterns to {projectRoot} ([#&#8203;20313](https://togithub.com/nrwl/nx/pull/20313))
-   **linter:** add create-nodes plugin ([#&#8203;20264](https://togithub.com/nrwl/nx/pull/20264))
-   **misc:** allow providing a path in the name option of project generators ([#&#8203;20274](https://togithub.com/nrwl/nx/pull/20274))
-   **module-federation:** use single file-server for static remotes ([#&#8203;20006](https://togithub.com/nrwl/nx/pull/20006))
-   **module-federation:** add comment to generated module federation config explaining usage of external remotes ([#&#8203;20177](https://togithub.com/nrwl/nx/pull/20177))
-   **module-federation:** Add react support for  dynamic federation ([#&#8203;20024](https://togithub.com/nrwl/nx/pull/20024))
-   **nextjs:** Add support for create nodes for nextjs ([#&#8203;20193](https://togithub.com/nrwl/nx/pull/20193))
-   **nuxt:** load nuxt config programmatically ([#&#8203;20185](https://togithub.com/nrwl/nx/pull/20185))
-   **nuxt:** nodes for build, serve, test targets ([#&#8203;20145](https://togithub.com/nrwl/nx/pull/20145))
-   **nx-dev:** call to action button ([b9e02d152b](https://togithub.com/nrwl/nx/commit/b9e02d152b))
-   **nx-dev:** move Twitter pixel to site-level ([059b061bfe](https://togithub.com/nrwl/nx/commit/059b061bfe))
-   **nx-dev:** allow ranges in fences highlighting ([#&#8203;20202](https://togithub.com/nrwl/nx/pull/20202))
-   **nx-dev:** rename nx-cloud tab to CI ([#&#8203;20476](https://togithub.com/nrwl/nx/pull/20476))
-   **nx-dev:** improve advent of code page ([#&#8203;20517](https://togithub.com/nrwl/nx/pull/20517))
-   **nx-dev:** allow custom media images ([#&#8203;20561](https://togithub.com/nrwl/nx/pull/20561))
-   **release:** update dist-tags when publishing a package version that already exists ([#&#8203;20316](

</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.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiIzNy44MS4zIiwidXBkYXRlZEluVmVyIjoiMzcuMTAzLjEiLCJ0YXJnZXRCcmFuY2giOiJjYW5hcnkifQ==-->
2023-12-28 08:00:13 +00:00
EYHN
0b9cd00fd3 refactor(core): adjust graphql hook (#5339) 2023-12-28 07:43:25 +00:00
Cats Juice
7e75e19d04 style(core): add font smoothing and optimize legibility globally (#5417)
![Frame 629667](https://github.com/toeverything/AFFiNE/assets/39363750/857a2c8d-6a75-43b2-a92f-eaf24c996d8b)
2023-12-28 07:34:20 +00:00
LongYinan
3148f93ee7 style: add perf rules (#5413) 2023-12-28 05:09:30 +00:00
LongYinan
4fcf589fe7 chore: bump up opentelemetry to ^0.46.0 (#5305)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@opentelemetry/exporter-prometheus](https://togithub.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-exporter-prometheus) ([source](https://togithub.com/open-telemetry/opentelemetry-js)) | [`^0.45.1` -> `^0.46.0`](https://renovatebot.com/diffs/npm/@opentelemetry%2fexporter-prometheus/0.45.1/0.46.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@opentelemetry%2fexporter-prometheus/0.46.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@opentelemetry%2fexporter-prometheus/0.46.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@opentelemetry%2fexporter-prometheus/0.45.1/0.46.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@opentelemetry%2fexporter-prometheus/0.45.1/0.46.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@opentelemetry/instrumentation](https://togithub.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation) ([source](https://togithub.com/open-telemetry/opentelemetry-js)) | [`^0.45.1` -> `^0.46.0`](https://renovatebot.com/diffs/npm/@opentelemetry%2finstrumentation/0.45.1/0.46.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@opentelemetry%2finstrumentation/0.46.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@opentelemetry%2finstrumentation/0.46.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@opentelemetry%2finstrumentation/0.45.1/0.46.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@opentelemetry%2finstrumentation/0.45.1/0.46.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@opentelemetry/instrumentation-http](https://togithub.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation-http) ([source](https://togithub.com/open-telemetry/opentelemetry-js)) | [`^0.45.1` -> `^0.46.0`](https://renovatebot.com/diffs/npm/@opentelemetry%2finstrumentation-http/0.45.1/0.46.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@opentelemetry%2finstrumentation-http/0.46.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@opentelemetry%2finstrumentation-http/0.46.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@opentelemetry%2finstrumentation-http/0.45.1/0.46.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@opentelemetry%2finstrumentation-http/0.45.1/0.46.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [@opentelemetry/sdk-node](https://togithub.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-sdk-node) ([source](https://togithub.com/open-telemetry/opentelemetry-js)) | [`^0.45.1` -> `^0.46.0`](https://renovatebot.com/diffs/npm/@opentelemetry%2fsdk-node/0.45.1/0.46.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@opentelemetry%2fsdk-node/0.46.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@opentelemetry%2fsdk-node/0.46.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@opentelemetry%2fsdk-node/0.45.1/0.46.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@opentelemetry%2fsdk-node/0.45.1/0.46.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>open-telemetry/opentelemetry-js (@&#8203;opentelemetry/exporter-prometheus)</summary>

### [`v0.46.0`](f665499096...d3c311aec2)

[Compare Source](f665499096...d3c311aec2)

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy45My4xIiwidXBkYXRlZEluVmVyIjoiMzcuOTMuMSIsInRhcmdldEJyYW5jaCI6ImNhbmFyeSJ9-->
2023-12-27 15:35:17 +00:00
Joooye_34
6b9f77f511 feat(core): set document title when detail page render (#5418) 2023-12-27 15:25:26 +00:00
DarkSky
a6f5a03b8a docs: update guide for build in windows (#5416) 2023-12-27 09:21:32 +00:00
Peng Xiao
0c64535e41 fix(infra): remove unused svg loader (#5398) 2023-12-27 09:00:37 +00:00
EYHN
86bd2a7d72 refactor(infra): no bundle infra (#5414) 2023-12-27 06:54:24 +00:00
EYHN
4e861d8118 refactor(electron): create electron api package (#5334) 2023-12-27 06:38:37 +00:00
Peng Xiao
ce17daba42 fix(core): enable page history for beta/stable (#5415) 2023-12-27 06:30:29 +00:00
EYHN
7a770f9672 fix(component): fix font display on safari (#5393)
before

![CleanShot 2023-12-25 at 13.09.26.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/g3jz87HxbjOJpXV3FPT7/4fe08951-67bb-4050-ba14-94391db1cac1.png)

after

![CleanShot 2023-12-25 at 13.09.13.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/g3jz87HxbjOJpXV3FPT7/fbfb17ec-b871-4746-9d3c-d24f850ecca1.png)
2023-12-27 04:37:30 +00:00
EYHN
265ee81666 refactor(infra): remove old plugin system (#5411)
plugin system need redesign
2023-12-27 02:49:59 +00:00
LongYinan
3903a1c1d6 ci: update actions/upload-artifact and actions/download-artifact (#5408) 2023-12-26 12:40:10 +00:00
Peng Xiao
c02ec5f7b9 fix(infra): workaround for self-referencing in storybook (#5406) 2023-12-26 20:27:20 +08:00
JimmFly
62fbab4f78 fix(core): avatars are not aligned (#5404) 2023-12-26 20:23:28 +08:00
LongYinan
cb4f6d30af chore: bump up react-i18next version to v14 (#5375)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [react-i18next](https://togithub.com/i18next/react-i18next) | [`^13.3.0` -> `^14.0.0`](https://renovatebot.com/diffs/npm/react-i18next/13.5.0/14.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/react-i18next/14.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-i18next/14.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-i18next/13.5.0/14.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-i18next/13.5.0/14.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>i18next/react-i18next (react-i18next)</summary>

### [`v14.0.0`](https://togithub.com/i18next/react-i18next/blob/HEAD/CHANGELOG.md#1400)

[Compare Source](https://togithub.com/i18next/react-i18next/compare/v13.5.0...v14.0.0)

-   types: reportNamespaces is now optional, should fix [1693](https://togithub.com/i18next/react-i18next/issues/1693)

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMDMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjEwMy4xIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2023-12-26 08:32:07 +00:00
LongYinan
8042140fe8 chore: bump up @types/supertest version to v6 (#5376)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@types/supertest](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/supertest) ([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/supertest)) | [`^2.0.16` -> `^6.0.0`](https://renovatebot.com/diffs/npm/@types%2fsupertest/2.0.16/6.0.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fsupertest/6.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2fsupertest/6.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2fsupertest/2.0.16/6.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fsupertest/2.0.16/6.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### 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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMDMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjEwMy4xIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2023-12-26 08:20:35 +00:00
Peng Xiao
285d2a7219 fix(core): trash page footer display issue (#5402)
Before

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/eb5e5b18-c4a2-469b-8763-be34c39ba736.png)

After

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/7b3ef339-0cb5-44fe-9e75-cec0e97d28b7.png)
2023-12-26 08:07:17 +00:00
Joooye_34
60fe5f0e87 fix(electron): set stable base url to app.affine.pro (#5401)
close TOV-282
2023-12-26 07:57:03 +00:00
Peng Xiao
fafcfbce6d fix(core): about setting blink issue (#5399) 2023-12-26 07:47:11 +00:00
Peng Xiao
c59a6a833c fix(core): workpace list blink issue on open (#5400) 2023-12-26 07:37:41 +00:00
Joooye_34
3024b5cc63 ci: define tag name to fix nightly release failing (#5397) 2023-12-26 07:24:30 +00:00
JimmFly
f25814b31c chore(core): add background color to questionnaire (#5396) 2023-12-26 07:13:44 +00:00
Cats Juice
080f636c1f fix(core): correct title of onboarding article-2 (#5387) 2023-12-26 07:01:34 +00:00
LongYinan
03b68e2654 chore: bump up @vitejs/plugin-vue version to v5 (#5394)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@vitejs/plugin-vue](https://togithub.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#readme) ([source](https://togithub.com/vitejs/vite-plugin-vue/tree/HEAD/packages/plugin-vue)) | [`^4.4.0` -> `^5.0.0`](https://renovatebot.com/diffs/npm/@vitejs%2fplugin-vue/4.5.0/5.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@vitejs%2fplugin-vue/5.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@vitejs%2fplugin-vue/5.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@vitejs%2fplugin-vue/4.5.0/5.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@vitejs%2fplugin-vue/4.5.0/5.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>vitejs/vite-plugin-vue (@&#8203;vitejs/plugin-vue)</summary>

### [`v5.0.0`](https://togithub.com/vitejs/vite-plugin-vue/blob/HEAD/packages/plugin-vue/CHANGELOG.md#500-2023-12-25)

-   **Breaking:** drop `reactivityTransform` support
-   **Breaking:** drop Node 14/16 support
-   **Breaking:** drop Vite 4.x support
-   Vue 3.4 template AST reuse support
-   Vue 3.4 compile-time flag `__VUE_PROD_HYDRATION_MISMATCH_DETAILS__` support
-   Added `customElement` option
-   Deprecated `defineModel` option

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMDMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjEwMy4xIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5In0=-->
2023-12-26 06:50:27 +00:00
Peng Xiao
972de52833 fix(core): remove plugins settings (#5337)
depend on https://github.com/toeverything/AFFiNE/pull/5324
2023-12-26 06:21:59 +00:00
DarkSky
555d40c3da fix: use prefix in electron to prevent formdata bug (#5395) 2023-12-25 15:14:08 +00:00
EYHN
7fcdb7a153 fix(core): fix flickering workspace list (#5391) 2023-12-25 07:09:49 +00:00
EYHN
56f0580382 fix(workspace): fix svg file with xml header (#5388) 2023-12-25 06:58:11 +00:00
EYHN
9493bd99f9 refactor(infra): move currentPageAtom to core (#5332)
Remove `currentPageAtom` from `infra` to `frontend/core.`
2023-12-25 03:34:28 +00:00
EYHN
e1bd13a018 refactor(core): remove adapter (#5324)
workspace adapter is no longer used.
2023-12-25 03:34:22 +00:00
EYHN
05025bf59a refactor(core): remove outline plugin and layout atom (#5326)
@affine/outline is no longer used, this PR deletes this plugin and deletes the code that is no longer used
2023-12-25 03:24:13 +00:00
regischen
a10aeca820 feat: bump blocksuite (#5386) 2023-12-22 18:04:05 +08:00
1051 changed files with 30845 additions and 32215 deletions

View File

@@ -11,6 +11,5 @@ e2e-dist-*
static
web-static
public
packages/common/sdk/src/*.d.ts
packages/common/sdk/src/*.js
packages/frontend/i18n/src/i18n-generated.ts
packages/frontend/templates/edgeless-templates.gen.ts

View File

@@ -61,7 +61,6 @@ const allPackages = [
'packages/frontend/core',
'packages/frontend/electron',
'packages/frontend/graphql',
'packages/frontend/hooks',
'packages/frontend/i18n',
'packages/frontend/native',
'packages/frontend/templates',
@@ -69,10 +68,8 @@ const allPackages = [
'packages/common/debug',
'packages/common/env',
'packages/common/infra',
'packages/common/sdk',
'packages/common/theme',
'packages/common/y-indexeddb',
'packages/plugins/copilot',
'tools/cli',
'tests/storybook',
];
@@ -220,6 +217,7 @@ const config = {
'unicorn/no-useless-promise-resolve-reject': 'error',
'unicorn/no-new-array': 'error',
'unicorn/new-for-builtins': 'error',
'unicorn/prefer-node-protocol': 'error',
'sonarjs/no-all-duplicated-branches': 'error',
'sonarjs/no-element-overwrite': 'error',
'sonarjs/no-empty-collection': 'error',

30
.github/CLA.md vendored
View File

@@ -33,32 +33,6 @@ You accept and agree to the following terms and conditions for your past, presen
9. This Agreement will be governed by the laws of Republic of Singapore without reference to conflict of laws principles.
## List of Contributors
## How To Sign
The below-signed are contributors to a code repository that is part of the project named "AFFiNE". Each below-signed contributor has read, understand and agrees to the terms above in the section within this document entitled "AFFiNE Contributor License Agreement" as of the date beside their real name (or entity name) and GitHub account name.
---
<!--
Example:
- Dark Sky, @darkskygit, 2022/07/22
-->
- Dark Sky, @darkskygit, 2022/07/22
- Lin Onetwo, @linonetwo, 2022/02/14
- zqran, @zqran, 2023/02/17
- Alessio Gravili, @AlessioGr, 2023/03/04
- Victor Nanka, @victornanka, 2023/03/09
- Aditya Sharma, @adityash1, 2023/03/21
- Fangdun Tsai, @fundon, 2023/03/21
- Zhilin Liu, @lzlme, 2023/04/09
- Skye Sun, @skyesun, 2023/04/14
- Jordy Delgado, @Jdelgad8, 2023/04/17
- Howard Do, @howarddo2208, 2023/04/20
- 三咲智子 Kevin Deng, @sxzz, 2023/04/21
- Moeyua, @moeyua, 2023/04/22
- Shishu, @shishudesu, 2023/05/19
- Kushagra Singh, @kush002, 2023/06/28
- Sarvesh Kumar, @sarvesh521 2023/08/25
- 微扰理论 Qinghao Huang, @wfnuser 2023/09/29
Visit https://cla-assistant.io/toeverything/AFFiNE and sign it.

View File

@@ -37,7 +37,7 @@ runs:
echo "TARGET_CC=clang" >> "$GITHUB_ENV"
- name: Cache cargo
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/

View File

@@ -13,15 +13,15 @@ const {
R2_ACCOUNT_ID,
R2_ACCESS_KEY_ID,
R2_SECRET_ACCESS_KEY,
R2_BUCKET,
ENABLE_CAPTCHA,
CAPTCHA_TURNSTILE_SECRET,
OAUTH_EMAIL_SENDER,
OAUTH_EMAIL_LOGIN,
OAUTH_EMAIL_PASSWORD,
MAILER_SENDER,
MAILER_USER,
MAILER_PASSWORD,
AFFINE_GOOGLE_CLIENT_ID,
AFFINE_GOOGLE_CLIENT_SECRET,
CLOUD_SQL_IAM_ACCOUNT,
CLOUD_LOGGER_IAM_ACCOUNT,
GCLOUD_CONNECTION_NAME,
GCLOUD_CLOUD_SQL_INTERNAL_ENDPOINT,
REDIS_HOST,
@@ -60,14 +60,24 @@ const createHelmCommand = ({ isDryRun }) => {
? [
`--set-json web.service.annotations=\"{ \\"cloud.google.com/neg\\": \\"{\\\\\\"ingress\\\\\\": true}\\" }\"`,
`--set-json graphql.service.annotations=\"{ \\"cloud.google.com/neg\\": \\"{\\\\\\"ingress\\\\\\": true}\\" }\"`,
`--set-json graphql.serviceAccount.annotations=\"{ \\"iam.gke.io/gcp-service-account\\": \\"${CLOUD_LOGGER_IAM_ACCOUNT}\\"}\"`,
`--set-json sync.service.annotations=\"{ \\"cloud.google.com/neg\\": \\"{\\\\\\"ingress\\\\\\": true}\\" }\"`,
`--set-json sync.serviceAccount.annotations=\"{ \\"iam.gke.io/gcp-service-account\\": \\"${CLOUD_LOGGER_IAM_ACCOUNT}\\"}\"`,
`--set-json cloud-sql-proxy.serviceAccount.annotations=\"{ \\"iam.gke.io/gcp-service-account\\": \\"${CLOUD_SQL_IAM_ACCOUNT}\\" }\"`,
`--set-json cloud-sql-proxy.nodeSelector=\"{ \\"iam.gke.io/gke-metadata-server-enabled\\": \\"true\\" }\"`,
]
: [];
const webReplicaCount = isProduction ? 3 : isBeta ? 2 : 2;
const graphqlReplicaCount = isProduction ? 10 : isBeta ? 5 : 2;
const syncReplicaCount = isProduction ? 10 : isBeta ? 5 : 2;
const graphqlReplicaCount = isProduction
? Number(process.env.PRODUCTION_GRAPHQL_REPLICA) || 3
: isBeta
? Number(process.env.isBeta_GRAPHQL_REPLICA) || 2
: 2;
const syncReplicaCount = isProduction
? Number(process.env.PRODUCTION_SYNC_REPLICA) || 3
: isBeta
? Number(process.env.BETA_SYNC_REPLICA) || 2
: 2;
const namespace = isProduction
? 'production'
: isBeta
@@ -96,16 +106,15 @@ const createHelmCommand = ({ isDryRun }) => {
`--set-string graphql.app.objectStorage.r2.accountId="${R2_ACCOUNT_ID}"`,
`--set-string graphql.app.objectStorage.r2.accessKeyId="${R2_ACCESS_KEY_ID}"`,
`--set-string graphql.app.objectStorage.r2.secretAccessKey="${R2_SECRET_ACCESS_KEY}"`,
`--set-string graphql.app.objectStorage.r2.bucket="${R2_BUCKET}"`,
`--set-string graphql.app.oauth.email.sender="${OAUTH_EMAIL_SENDER}"`,
`--set-string graphql.app.oauth.email.login="${OAUTH_EMAIL_LOGIN}"`,
`--set-string graphql.app.oauth.email.password="${OAUTH_EMAIL_PASSWORD}"`,
`--set-string graphql.app.mailer.sender="${MAILER_SENDER}"`,
`--set-string graphql.app.mailer.user="${MAILER_USER}"`,
`--set-string graphql.app.mailer.password="${MAILER_PASSWORD}"`,
`--set-string graphql.app.oauth.google.enabled=true`,
`--set-string graphql.app.oauth.google.clientId="${AFFINE_GOOGLE_CLIENT_ID}"`,
`--set-string graphql.app.oauth.google.clientSecret="${AFFINE_GOOGLE_CLIENT_SECRET}"`,
`--set-string graphql.app.payment.stripe.apiKey="${STRIPE_API_KEY}"`,
`--set-string graphql.app.payment.stripe.webhookKey="${STRIPE_WEBHOOK_KEY}"`,
`--set graphql.app.experimental.enableJwstCodec=true`,
`--set graphql.app.experimental.enableJwstCodec=${isInternal}`,
`--set graphql.app.features.earlyAccessPreview=false`,
`--set sync.replicaCount=${syncReplicaCount}`,
`--set-string sync.image.tag="${imageTag}"`,

View File

@@ -9,7 +9,7 @@ runs:
using: 'composite'
steps:
- name: Download tar.gz
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: core
path: .

View File

@@ -21,14 +21,6 @@ inputs:
description: 'set nmMode to hardlinks-local in .yarnrc.yml'
required: false
default: 'true'
build-infra:
description: 'Build infra'
required: false
default: 'true'
build-plugins:
description: 'Build plugins'
required: false
default: 'true'
nmHoistingLimits:
description: 'Set nmHoistingLimits in .yarnrc.yml'
required: false
@@ -71,7 +63,7 @@ runs:
run: node -e "const p = $(yarn config cacheFolder --json).effective; console.log('yarn_global_cache=' + p)" >> $GITHUB_OUTPUT
- name: Cache non-full yarn cache on Linux
uses: actions/cache@v3
uses: actions/cache@v4
if: ${{ inputs.full-cache != 'true' && runner.os == 'Linux' }}
with:
path: |
@@ -83,7 +75,7 @@ runs:
# and the decompression performance on Windows is very terrible
# so we reduce the number of cached files on non-Linux systems by remove node_modules from cache path.
- name: Cache non-full yarn cache on non-Linux
uses: actions/cache@v3
uses: actions/cache@v4
if: ${{ inputs.full-cache != 'true' && runner.os != 'Linux' }}
with:
path: |
@@ -91,7 +83,7 @@ runs:
key: node_modules-cache-${{ github.job }}-${{ runner.os }}
- name: Cache full yarn cache on Linux
uses: actions/cache@v3
uses: actions/cache@v4
if: ${{ inputs.full-cache == 'true' && runner.os == 'Linux' }}
with:
path: |
@@ -100,7 +92,7 @@ runs:
key: node_modules-cache-full-${{ runner.os }}
- name: Cache full yarn cache on non-Linux
uses: actions/cache@v3
uses: actions/cache@v4
if: ${{ inputs.full-cache == 'true' && runner.os != 'Linux' }}
with:
path: |
@@ -142,7 +134,7 @@ runs:
# Note: Playwright's cache directory is hard coded because that's what it
# says to do in the docs. There doesn't appear to be a command that prints
# it out for us.
- uses: actions/cache@v3
- uses: actions/cache@v4
id: playwright-cache
if: ${{ inputs.playwright-install == 'true' }}
with:
@@ -175,7 +167,7 @@ runs:
run: |
echo "version=$(yarn why --json electron | grep -h 'workspace:.' | jq --raw-output '.children[].locator' | sed -e 's/@playwright\/test@.*://' | head -n 1)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
id: electron-cache
if: ${{ inputs.electron-install == 'true' }}
with:
@@ -190,13 +182,3 @@ runs:
run: node ./node_modules/electron/install.js
env:
electron_config_cache: ./node_modules/.cache/electron
- name: Build Infra
shell: bash
if: inputs.build-infra == 'true'
run: yarn run build:infra
- name: Build Plugins
if: inputs.build-plugins == 'true'
shell: bash
run: yarn run build:plugins

View File

@@ -1,4 +1,4 @@
FROM openresty/openresty:1.21.4.1-0-buster
FROM openresty/openresty:1.21.4.3-0-buster
WORKDIR /app
COPY ./packages/frontend/core/dist ./dist
COPY ./.github/deployment/front/nginx.conf /usr/local/openresty/nginx/conf/nginx.conf

View File

@@ -1,10 +1,11 @@
FROM node:18-bookworm-slim
COPY ./packages/backend/server /app
COPY ./packages/frontend/core/dist /app/static
WORKDIR /app
RUN apt-get update && \
apt-get install -y --no-install-recommends openssl && \
rm -rf /var/lib/apt/lists/*
CMD ["node", "--es-module-specifier-resolution=node", "./dist/index.js"]
CMD ["node", "--import", "./scripts/register.js", "./dist/index.js"]

View File

@@ -0,0 +1,59 @@
services:
affine:
image: ghcr.io/toeverything/affine-graphql:stable
container_name: affine_selfhosted
command:
['sh', '-c', 'node ./scripts/self-host-predeploy && node ./dist/index.js']
ports:
- '3010:3010'
- '5555:5555'
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
volumes:
# custom configurations
- ~/.affine/self-host/config:/root/.affine/config
# blob storage
- ~/.affine/self-host/storage:/root/.affine/storage
logging:
driver: 'json-file'
options:
max-size: '1000m'
restart: unless-stopped
environment:
- NODE_OPTIONS="--import=./scripts/register.js"
- AFFINE_CONFIG_PATH=/root/.affine/config
- REDIS_SERVER_HOST=redis
- DATABASE_URL=postgres://affine:affine@postgres:5432/affine
- NODE_ENV=production
- AFFINE_ADMIN_EMAIL=${AFFINE_ADMIN_EMAIL}
- AFFINE_ADMIN_PASSWORD=${AFFINE_ADMIN_PASSWORD}
redis:
image: redis
container_name: affine_redis
restart: unless-stopped
volumes:
- ~/.affine/self-host/redis:/data
healthcheck:
test: ['CMD', 'redis-cli', '--raw', 'incr', 'ping']
interval: 10s
timeout: 5s
retries: 5
postgres:
image: postgres
container_name: affine_postgres
restart: unless-stopped
volumes:
- ~/.affine/self-host/postgres:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U affine']
interval: 10s
timeout: 5s
retries: 5
environment:
POSTGRES_USER: affine
POSTGRES_PASSWORD: affine
POSTGRES_DB: affine
PGDATA: /var/lib/postgresql/data/pgdata

View File

@@ -1 +0,0 @@
charts/

View File

@@ -1,23 +0,0 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/

View File

@@ -1,6 +0,0 @@
dependencies:
- name: postgresql
repository: https://charts.bitnami.com/bitnami
version: 13.2.23
digest: sha256:5b64538509bd067bb0f67bf082847a2c5d66dc37d0b9d7948a40405d9c446400
generated: "2023-12-05T03:04:57.997927753Z"

View File

@@ -1,12 +0,0 @@
apiVersion: v2
name: affine-cloud
description: A Helm chart for AFFiNE Cloud
type: application
version: 0.6.1
appVersion: '0.6.1'
dependencies:
- name: postgresql
version: 13.2.23
repository: https://charts.bitnami.com/bitnami

View File

@@ -1,30 +0,0 @@
# Helm Chart Configuration
The following table lists the configurable parameters of this Helm chart and their default values.
## AFFiNE Cloud Server parameters
| Parameter | Description | Default |
| ------------------------------ | -------------------------------------------------- | ------------------ |
| `affineCloud.tag` | The Docker tag of the AffineCloud image to be used | `'nightly-latest'` |
| `affineCloud.resources.cpu` | The CPU resources allocated for AffineCloud | `'250m'` |
| `affineCloud.resources.memory` | The memory resources allocated for AffineCloud | `'0.5Gi'` |
| `affineCloud.signKey` | The key used to sign the JWT tokens | `'c2VjcmV0'` |
| `affineCloud.service.type` | The type of the Kubernetes service | `'ClusterIP'` |
| `affineCloud.service.port` | The port of the Kubernetes service | `'http'` |
| `affineCloud.mail.account` | The email account used to send emails | `''` |
| `affineCloud.mail.password` | The password of the email account | `''` |
## PostgreSQL parameters
| Parameter | Description | Default |
| -------------------------------------------- | ------------------------------------------------------------------------------------- | ------------ |
| `postgresql.auth.username` | Username for the PostgreSQL database | `'affine'` |
| `postgresql.auth.password` | Password for the PostgreSQL database. Please change this for production environments. | `'password'` |
| `postgresql.auth.database` | The name of the default database that will be created on image startup | `'affine'` |
| `postgresql.primary.resources.limits.cpu` | The CPU resources allocated for the PostgreSQL primary node | `'500m'` |
| `postgresql.primary.resources.limits.memory` | The memory resources allocated for the PostgreSQL primary node | `'0.5Gi'` |
For more postgres parameters, please refer to: https://artifacthub.io/packages/helm/bitnami/postgresql
Please note that for the `postgresql.auth.password`, you should provide your own password for production environments. The default value is provided only for demonstration purposes.

View File

@@ -1,51 +0,0 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "affine-cloud.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "affine-cloud.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "affine-cloud.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "affine-cloud.labels" -}}
helm.sh/chart: {{ include "affine-cloud.chart" . }}
{{ include "affine-cloud.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "affine-cloud.selectorLabels" -}}
app.kubernetes.io/name: {{ include "affine-cloud.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

View File

@@ -1,51 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: "{{ include "affine-cloud.fullname" . }}"
labels:
{{- include "affine-cloud.labels" . | nindent 4 }}
spec:
replicas: 1
selector:
matchLabels:
{{- include "affine-cloud.selectorLabels" . | nindent 6 }}
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 2
template:
metadata:
labels:
{{- include "affine-cloud.selectorLabels" . | nindent 8 }}
spec:
restartPolicy: Always
containers:
- name: affine-cloud
image: "ghcr.io/toeverything/cloud-self-hosted:{{ .Values.affineCloud.tag | default .Chart.AppVersion }}"
env:
- name: PG_USER
value: "{{ .Values.postgresql.auth.username }}"
- name: PG_PASS
value: "{{ .Values.postgresql.auth.password }}"
- name: PG_DATABASE
value: "{{ .Values.postgresql.auth.database }}"
- name: PG_HOST
value: "{{ .Values.postgresql.fullnameOverride | default (printf "%s-postgresql" .Release.Name) }}"
- name: DATABASE_URL
value: "{{ .Values.affineCloud.databaseUrl | default "postgresql://$(PG_USER):$(PG_PASS)@$(PG_HOST)/$(PG_DATABASE)" }}"
envFrom:
- secretRef:
name: affine-cloud-secret
ports:
- containerPort: 3000
livenessProbe:
httpGet:
path: /api/healthz
port: 3000
failureThreshold: 1
initialDelaySeconds: 10
periodSeconds: 10
resources:
limits:
cpu: "{{ .Values.affineCloud.resources.cpu }}"
memory: "{{ .Values.affineCloud.resources.memory }}"

View File

@@ -1,9 +0,0 @@
apiVersion: v1
kind: Secret
metadata:
name: affine-cloud-secret
type: Opaque
data:
SIGN_KEY: "{{ .Values.affineCloud.signKey }}"
MAIL_ACCOUNT: "{{ .Values.affineCloud.mail.account }}"
MAIL_PASSWORD: "{{ .Values.affineCloud.mail.password }}"

View File

@@ -1,15 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: "{{ include "affine-cloud.fullname" . }}"
labels:
{{- include "affine-cloud.labels" . | nindent 4 }}
spec:
type: "{{ .Values.affineCloud.service.type }}"
ports:
- name: http
protocol: TCP
port: {{ .Values.affineCloud.service.port }}
targetPort: 3000
selector:
{{- include "affine-cloud.selectorLabels" . | nindent 4 }}

View File

@@ -1,30 +0,0 @@
affineCloud:
tag: 'canary-5e0d5e0cc65ea46f326fdde12658bfac59b38c9f-0949'
# databaseUrl: 'postgresql://affine:password@affine-cloud-postgresql:5432/affine'
signKey: TUFtdFdzQTJhdGJuem01TA==
mail:
account: ''
password: ''
service:
type: ClusterIP
port: 80
resources:
cpu: '250m'
memory: 0.5Gi
postgresql:
fullnameOverride: tcp-postgresql
auth:
# only for demo, please modify it at prod env
username: affine
password: password
database: affine
primary:
initdb:
scripts:
01-init.sql: |
CREATE DATABASE affine_binary;
GRANT ALL PRIVILEGES ON DATABASE affine_binary TO affine;
resources:
limits:
cpu: '500m'
memory: 0.5Gi

View File

@@ -3,4 +3,4 @@ name: affine
description: AFFiNE cloud chart
type: application
version: 0.0.0
appVersion: "0.11.0"
appVersion: "0.12.0"

View File

@@ -3,7 +3,7 @@ name: graphql
description: AFFiNE GraphQL server
type: application
version: 0.0.0
appVersion: "0.11.0"
appVersion: "0.12.0"
dependencies:
- name: gcloud-sql-proxy
version: 0.0.0

View File

@@ -39,6 +39,8 @@ spec:
value: "--max-old-space-size=4096"
- name: NO_COLOR
value: "1"
- name: DEPLOYMENT_TYPE
value: "affine"
- name: SERVER_FLAVOR
value: "graphql"
- name: AFFINE_ENV
@@ -73,37 +75,41 @@ spec:
value: "{{ .Values.app.path }}"
- name: AFFINE_SERVER_HOST
value: "{{ .Values.app.host }}"
- name: AFFINE_SERVER_HTTPS
value: "{{ .Values.app.https }}"
- name: ENABLE_R2_OBJECT_STORAGE
value: "{{ .Values.app.objectStorage.r2.enabled }}"
- name: ENABLE_CAPTCHA
value: "{{ .Values.app.captcha.enabled }}"
- name: FEATURES_EARLY_ACCESS_PREVIEW
value: "{{ .Values.app.features.earlyAccessPreview }}"
- name: OAUTH_EMAIL_SENDER
- name: FEATURES_SYNC_CLIENT_VERSION_CHECK
value: "{{ .Values.app.features.syncClientVersionCheck }}"
- name: MAILER_HOST
valueFrom:
secretKeyRef:
name: "{{ .Values.app.oauth.email.secretName }}"
key: sender
- name: OAUTH_EMAIL_LOGIN
name: "{{ .Values.app.mailer.secretName }}"
key: host
- name: MAILER_PORT
valueFrom:
secretKeyRef:
name: "{{ .Values.app.oauth.email.secretName }}"
key: login
- name: OAUTH_EMAIL_SERVER
valueFrom:
secretKeyRef:
name: "{{ .Values.app.oauth.email.secretName }}"
key: server
- name: OAUTH_EMAIL_PORT
valueFrom:
secretKeyRef:
name: "{{ .Values.app.oauth.email.secretName }}"
name: "{{ .Values.app.mailer.secretName }}"
key: port
- name: OAUTH_EMAIL_PASSWORD
- name: MAILER_USER
valueFrom:
secretKeyRef:
name: "{{ .Values.app.oauth.email.secretName }}"
name: "{{ .Values.app.mailer.secretName }}"
key: user
- name: MAILER_PASSWORD
valueFrom:
secretKeyRef:
name: "{{ .Values.app.mailer.secretName }}"
key: password
- name: MAILER_SENDER
valueFrom:
secretKeyRef:
name: "{{ .Values.app.mailer.secretName }}"
key: sender
- name: STRIPE_API_KEY
valueFrom:
secretKeyRef:
@@ -136,11 +142,6 @@ spec:
secretKeyRef:
name: "{{ .Values.app.objectStorage.r2.secretName }}"
key: secretAccessKey
- name: R2_OBJECT_STORAGE_BUCKET
valueFrom:
secretKeyRef:
name: "{{ .Values.app.objectStorage.r2.secretName }}"
key: bucket
{{ end }}
{{ if .Values.app.captcha.enabled }}
- name: CAPTCHA_TURNSTILE_SECRET
@@ -150,6 +151,8 @@ spec:
key: turnstileSecret
{{ end }}
{{ if .Values.app.oauth.google.enabled }}
- name: OAUTH_GOOGLE_ENABLED
value: "true"
- name: OAUTH_GOOGLE_CLIENT_ID
valueFrom:
secretKeyRef:

View File

@@ -0,0 +1,13 @@
{{- if .Values.app.mailer.secretName -}}
apiVersion: v1
kind: Secret
metadata:
name: "{{ .Values.app.mailer.secretName }}"
type: Opaque
data:
host: "{{ .Values.app.mailer.host | b64enc }}"
port: "{{ .Values.app.mailer.port | b64enc }}"
user: "{{ .Values.app.mailer.user | b64enc }}"
password: "{{ .Values.app.mailer.password | b64enc }}"
sender: "{{ .Values.app.mailer.sender | b64enc }}"
{{- end }}

View File

@@ -35,6 +35,23 @@ spec:
- name: DATABASE_URL
value: postgres://{{ .Values.global.database.user }}:$(DATABASE_PASSWORD)@{{ .Values.global.database.gcloud.cloudSqlInternal }}:{{ .Values.global.database.port }}/{{ .Values.global.database.name }}
{{ end }}
{{ if .Values.app.objectStorage.r2.enabled }}
- name: R2_OBJECT_STORAGE_ACCOUNT_ID
valueFrom:
secretKeyRef:
name: "{{ .Values.app.objectStorage.r2.secretName }}"
key: accountId
- name: R2_OBJECT_STORAGE_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: "{{ .Values.app.objectStorage.r2.secretName }}"
key: accessKeyId
- name: R2_OBJECT_STORAGE_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: "{{ .Values.app.objectStorage.r2.secretName }}"
key: secretAccessKey
{{ end }}
resources:
requests:
cpu: '100m'

View File

@@ -1,15 +1,3 @@
apiVersion: v1
kind: Secret
metadata:
name: "{{ .Values.app.oauth.email.secretName }}"
type: Opaque
data:
sender: "{{ .Values.app.oauth.email.sender | b64enc }}"
login: "{{ .Values.app.oauth.email.login | b64enc }}"
password: "{{ .Values.app.oauth.email.password | b64enc }}"
server: "{{ .Values.app.oauth.email.server | b64enc }}"
port: "{{ .Values.app.oauth.email.port | b64enc }}"
---
{{- if .Values.app.oauth.google.enabled -}}
apiVersion: v1
kind: Secret

View File

@@ -8,5 +8,4 @@ data:
accountId: {{ .Values.app.objectStorage.r2.accountId | b64enc }}
accessKeyId: {{ .Values.app.objectStorage.r2.accessKeyId | b64enc }}
secretAccessKey: {{ .Values.app.objectStorage.r2.secretAccessKey | b64enc }}
bucket: {{ .Values.app.objectStorage.r2.bucket | b64enc }}
{{- end }}

View File

@@ -16,6 +16,7 @@ app:
path: ''
# AFFINE_SERVER_HOST
host: '0.0.0.0'
https: true
doc:
mergeInterval: "3000"
jwt:
@@ -34,15 +35,7 @@ app:
accountId: ''
accessKeyId: ''
secretAccessKey: ''
bucket: ''
oauth:
email:
secretName: 'oauth-email'
sender: 'noreply@toeverything.info'
login: ''
password: ''
server: 'smtp.gmail.com'
port: '465'
oauth:
google:
enabled: false
secretName: oauth-google
@@ -53,6 +46,13 @@ app:
secretName: oauth-github
clientId: ''
clientSecret: ''
mailer:
secretName: 'mailer'
host: 'smtp.gmail.com'
port: '465'
user: ''
password: ''
sender: 'noreply@toeverything.info'
payment:
stripe:
secretName: 'stripe'

View File

@@ -3,7 +3,7 @@ name: sync
description: AFFiNE Sync Server
type: application
version: 0.0.0
appVersion: "0.11.0"
appVersion: "0.12.0"
dependencies:
- name: gcloud-sql-proxy
version: 0.0.0

View File

@@ -36,6 +36,8 @@ spec:
value: "{{ .Values.env }}"
- name: NO_COLOR
value: "1"
- name: DEPLOYMENT_TYPE
value: "affine"
- name: SERVER_FLAVOR
value: "sync"
- name: NEXTAUTH_URL

View File

@@ -1,60 +0,0 @@
# Cluster Deployment Guide
This document provides a step-by-step guide for developers on how to deploy services in a Kubernetes cluster. The following content assumes that the reader already has a basic understanding of Kubernetes concepts and operations.
### 1. Configure Service Mesh (Optional)
In the Kubernetes cluster, we optionally use Service Mesh (like Istio and Anthos Service Mesh) to manage the network interactions of microservices. If Service Mesh is already deployed on your cluster or do not need to use the service network, you can skip this step. In this step, we assume that you are using Google Kubernetes Engine (GKE) and have already installed Anthos Service Mesh on your cluster, if you wish to use another Ingress Controller, please refer to the relevant documentation.
To configure your kubectl context to interact with your Kubernetes cluster using the gcloud tool, you need to execute the following commands:
```sh
export CLUSTER_NAME=your_cluster_name
export REGION=your_cluster_region
export PROJECT=your_project_id
gcloud container clusters get-credentials $CLUSTER_NAME --region $REGION --project $PROJECT
```
In this command, you should replace `CLUSTER_NAME`, `REGION` and `PROJECT` with the actual name, region and project id of your Kubernetes cluster. This command retrieves the access credentials for your Kubernetes cluster and automatically configures kubectl to use these credentials.
Now, to inject Service Mesh for a specific Namespace, first, set the environment variable `NAMESPACE` that should correspond to your target Kubernetes Namespace. In this example, we use `prod` as the target Namespace:
```sh
export NAMESPACE=prod
```
Then, we label the Namespace which will enable Istio to automatically inject the sidecar container for all new Pods under this Namespace:
```sh
kubectl label namespace $NAMESPACE istio-injection- istio.io/rev=asm-managed --overwrite
```
Finally, we trigger the Kubernetes Deployment restart mechanism to allow existing Pods to also obtain sidecar container injection:
```sh
kubectl rollout restart deployment -n $NAMESPACE
```
### 2. Deploying the Application
Next, we will deploy our application in the Kubernetes cluster through Helm. First, set relevant environment variables:
```sh
export NAMESPACE=prod
export RELEASE=affine-cloud-prod
export PATH=.github/helm/affine-cloud
```
- `NAMESPACE` should be consistent with the first step, indicating your target Kubernetes Namespace.
- `RELEASE` is the name of your Helm release.
- `PATH` is the location of your Helm chart in your file system.
Finally, use the `helm upgrade --install` command to deploy or upgrade your application:
```sh
helm upgrade --namespace $NAMESPACE --create-namespace --install $RELEASE $PATH
```
This command creates (if it doesn't already exist) and deploys your Helm chart in the specified Namespace. If the release already exists, it will be upgraded.
The above are the complete steps for deploying an application in a Kubernetes cluster. Make sure all prerequisites are met before deploying, and also ensure that you have the correct permissions for operations in Kubernetes.

27
.github/labeler.yml vendored
View File

@@ -19,26 +19,11 @@ mod:dev:
- 'tools/cli/**/*'
- 'packages/common/debug/**/*'
mod:plugin:
- changed-files:
- any-glob-to-any-file:
- 'packages/plugins/**/*'
plugin:copilot:
- changed-files:
- any-glob-to-any-file:
- 'packages/plugins/copilot/**/*'
mod:infra:
- changed-files:
- any-glob-to-any-file:
- 'packages/common/infra/**/*'
mod:sdk:
- changed-files:
- any-glob-to-any-file:
- 'packages/common/sdk/**/*'
mod:plugin-cli:
- changed-files:
- any-glob-to-any-file:
@@ -47,7 +32,12 @@ mod:plugin-cli:
mod:workspace:
- changed-files:
- any-glob-to-any-file:
- 'packages/frontend/workspace/**/*'
- 'packages/common/workspace/**/*'
mod:workspace-impl:
- changed-files:
- any-glob-to-any-file:
- 'packages/frontend/workspace-impl/**/*'
mod:i18n:
- changed-files:
@@ -59,11 +49,6 @@ mod:env:
- any-glob-to-any-file:
- 'packages/common/env/**/*'
mod:hooks:
- changed-files:
- any-glob-to-any-file:
- 'packages/frontend/hooks/**/*'
mod:component:
- changed-files:
- any-glob-to-any-file:

39
.github/renovate.json vendored
View File

@@ -1,27 +1,35 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base",
"group:allNonMajor",
":preserveSemverRanges",
":disablePeerDependencies"
],
"extends": ["config:recommended", ":disablePeerDependencies"],
"labels": ["dependencies"],
"ignorePaths": [
"**/node_modules/**",
"**/bower_components/**",
"**/vendor/**",
"**/examples/**",
"**/__tests__/**",
"**/test/**",
"**/__fixtures__/**"
],
"packageRules": [
{
"matchPackageNames": ["napi", "napi-build", "napi-derive"],
"rangeStrategy": "replace",
"groupName": "napi-rs"
},
{
"matchPackagePatterns": ["^eslint", "^@typescript-eslint"],
"rangeStrategy": "replace",
"groupName": "linter"
},
{
"matchPackagePatterns": ["^@nestjs"],
"rangeStrategy": "replace",
"groupName": "nestjs"
},
{
"matchPackagePatterns": ["^@opentelemetry"],
"rangeStrategy": "replace",
"groupName": "opentelemetry"
},
{
@@ -30,22 +38,39 @@
"@prisma/instrumentation",
"prisma"
],
"rangeStrategy": "replace",
"groupName": "prisma"
},
{
"matchPackagePatterns": ["^@electron-forge"],
"rangeStrategy": "replace",
"groupName": "electron-forge"
},
{
"groupName": "blocksuite-canary",
"matchPackagePatterns": ["^@blocksuite"],
"excludePackageNames": ["@blocksuite/icons"],
"followTag": "nightly"
"rangeStrategy": "replace",
"followTag": "canary"
},
{
"groupName": "all non-major dependencies",
"groupSlug": "all-minor-patch",
"matchPackagePatterns": ["*"],
"excludePackagePatterns": ["^@blocksuite/"],
"matchUpdateTypes": ["minor", "patch"]
},
{
"matchPackagePatterns": ["*"],
"rangeStrategy": "replace",
"excludePackagePatterns": ["^@blocksuite/"]
}
],
"commitMessagePrefix": "chore: ",
"commitMessageAction": "bump up",
"commitMessageTopic": "{{depName}} version",
"ignoreDeps": [],
"postUpdateOptions": ["yarnDedupeHighest"],
"lockFileMaintenance": {
"enabled": true,
"extends": ["schedule:weekly"]

View File

@@ -19,6 +19,7 @@ env:
MACOSX_DEPLOYMENT_TARGET: '10.13'
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/node_modules/.cache/ms-playwright
DEPLOYMENT_TYPE: affine
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
@@ -95,6 +96,8 @@ jobs:
run: |
git checkout .yarnrc.yml
yarn lint:prettier
- name: Yarn Dedupe
run: yarn dedupe --check
- name: Run Type Check
run: yarn typecheck
@@ -108,44 +111,6 @@ jobs:
yarn set version $(node -e "console.log(require('./package.json').packageManager.split('@')[1])")
git diff --exit-code
e2e-plugin-test:
name: E2E Plugin Test
runs-on: ubuntu-latest
env:
DISTRIBUTION: browser
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: ./.github/actions/setup-node
with:
playwright-install: true
electron-install: false
full-cache: true
- name: Run playwright tests
run: yarn e2e --forbid-only
working-directory: tests/affine-plugin
env:
COVERAGE: true
- name: Collect code coverage report
run: yarn exec nyc report -t .nyc_output --report-dir .coverage --reporter=lcov
- name: Upload e2e test coverage results
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./.coverage/lcov.info
flags: e2e-plugin-test
name: affine
fail_ci_if_error: false
- name: Upload test results
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: test-results-e2e-plugin
path: ./test-results
if-no-files-found: ignore
e2e-test:
name: E2E Test
runs-on: ubuntu-latest
@@ -169,7 +134,7 @@ jobs:
- name: Upload test results
if: ${{ failure() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: test-results-e2e-${{ matrix.shard }}
path: ./test-results
@@ -194,7 +159,7 @@ jobs:
- name: Upload test results
if: ${{ failure() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: test-results-e2e-migration
path: ./tests/affine-migration/test-results
@@ -216,7 +181,7 @@ jobs:
full-cache: true
- name: Download affine.linux-x64-gnu.node
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: affine.linux-x64-gnu.node
path: ./packages/frontend/native
@@ -254,8 +219,6 @@ jobs:
with:
extra-flags: workspaces focus @affine/native
electron-install: false
build-infra: false
build-plugins: false
- name: Setup filename
id: filename
shell: bash
@@ -269,7 +232,7 @@ jobs:
package: '@affine/native'
nx_token: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
- name: Upload ${{ steps.filename.outputs.filename }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ steps.filename.outputs.filename }}
path: ./packages/frontend/native/${{ steps.filename.outputs.filename }}
@@ -287,8 +250,6 @@ jobs:
with:
extra-flags: workspaces focus @affine/storage
electron-install: false
build-infra: false
build-plugins: false
- name: Build Rust
uses: ./.github/actions/build-rust
with:
@@ -296,7 +257,7 @@ jobs:
package: '@affine/storage'
nx_token: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
- name: Upload storage.node
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: storage.node
path: ./packages/backend/storage/storage.node
@@ -312,7 +273,6 @@ jobs:
uses: ./.github/actions/setup-node
with:
electron-install: false
build-plugins: false
full-cache: true
- name: Build Core
# always skip cache because its fast, and cache configuration is always changing
@@ -320,7 +280,7 @@ jobs:
- name: zip core
run: tar -czf dist.tar.gz --directory=packages/frontend/core/dist .
- name: Upload core artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: core
path: dist.tar.gz
@@ -331,6 +291,7 @@ jobs:
runs-on: ubuntu-latest
needs: build-storage
env:
NODE_ENV: test
DISTRIBUTION: browser
services:
postgres:
@@ -358,6 +319,12 @@ jobs:
electron-install: false
full-cache: true
- name: Download storage.node
uses: actions/download-artifact@v4
with:
name: storage.node
path: ./packages/backend/server
- name: Initialize database
run: |
psql -h localhost -U postgres -c "CREATE DATABASE affine;"
@@ -380,12 +347,6 @@ jobs:
env:
DATABASE_URL: postgresql://affine:affine@localhost:5432/affine
- name: Download storage.node
uses: actions/download-artifact@v3
with:
name: storage.node
path: ./packages/backend/server
- name: Run server tests
run: yarn workspace @affine/server test:coverage
env:
@@ -450,6 +411,18 @@ jobs:
playwright-install: true
hard-link-nm: false
- name: Download storage.node
uses: actions/download-artifact@v4
with:
name: storage.node
path: ./packages/backend/server
- name: Download affine.linux-x64-gnu.node
uses: actions/download-artifact@v4
with:
name: affine.linux-x64-gnu.node
path: ./packages/frontend/native
- name: Initialize database
run: |
psql -h localhost -U postgres -c "CREATE DATABASE affine;"
@@ -469,28 +442,16 @@ jobs:
run: |
yarn workspace @affine/server data-migration run
yarn workspace @affine/server exec node --loader ts-node/esm/transpile-only ./scripts/init-db.ts
- name: Download storage.node
uses: actions/download-artifact@v3
with:
name: storage.node
path: ./packages/backend/server
- name: Download affine.linux-x64-gnu.node
uses: actions/download-artifact@v3
with:
name: affine.linux-x64-gnu.node
path: ./packages/frontend/native
- name: ${{ matrix.tests.name }}
run: |
${{ matrix.tests.script }}
env:
DEV_SERVER_URL: http://localhost:8080
ENABLE_LOCAL_EMAIL: true
- name: Upload test results
if: ${{ failure() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: test-results-e2e-server
path: ./tests/affine-cloud/test-results
@@ -554,7 +515,7 @@ jobs:
echo "filename=affine.$PLATFORM_ARCH_ABI.node" >> "$GITHUB_OUTPUT"
- name: Download ${{ steps.filename.outputs.filename }}
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ steps.filename.outputs.filename }}
path: ./packages/frontend/native
@@ -562,8 +523,7 @@ jobs:
- name: Run unit tests
if: ${{ matrix.spec.test }}
shell: bash
run: yarn vitest
working-directory: packages/frontend/electron
run: yarn workspace @affine/electron vitest
- name: Download core artifact
uses: ./.github/actions/download-core
@@ -596,7 +556,7 @@ jobs:
- name: Upload test results
if: ${{ failure() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: test-results-e2e-${{ matrix.spec.os }}-${{ matrix.spec.arch }}
path: ./test-results

View File

@@ -29,10 +29,11 @@ jobs:
uses: ./.github/actions/setup-node
with:
electron-install: false
extra-flags: workspaces focus @affine/server
- name: Build Server
run: yarn workspace @affine/server build
- name: Upload server dist
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: server-dist
path: ./packages/backend/server/dist
@@ -48,8 +49,6 @@ jobs:
uses: ./.github/actions/setup-version
- name: Setup Node.js
uses: ./.github/actions/setup-node
- name: Build Plugins
run: yarn run build:plugins
- name: Build Core
run: yarn nx build @affine/core --skip-nx-cache
env:
@@ -64,17 +63,18 @@ jobs:
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
PERFSEE_TOKEN: ${{ secrets.PERFSEE_TOKEN }}
- name: Upload core artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: core
path: ./packages/frontend/core/dist
if-no-files-found: error
build-storage:
name: Build Storage
build-core-selfhost:
name: Build @affine/core
runs-on: ubuntu-latest
environment: ${{ github.event.inputs.flavor }}
steps:
- uses: actions/checkout@v4
- name: Setup Version
@@ -82,22 +82,33 @@ jobs:
uses: ./.github/actions/setup-version
- name: Setup Node.js
uses: ./.github/actions/setup-node
- name: Build Rust
uses: ./.github/actions/build-rust
- name: Build Core
run: yarn nx build @affine/core --skip-nx-cache
env:
BUILD_TYPE: ${{ github.event.inputs.flavor }}
SHOULD_REPORT_TRACE: false
PUBLIC_PATH: '/'
- name: Download selfhost fonts
run: node ./scripts/download-blocksuite-fonts.mjs
- name: Upload core artifact
uses: actions/upload-artifact@v4
with:
target: 'x86_64-unknown-linux-gnu'
package: '@affine/storage'
nx_token: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
- name: Upload storage.node
uses: actions/upload-artifact@v3
with:
name: storage.node
path: ./packages/backend/storage/storage.node
name: selfhost-core
path: ./packages/frontend/core/dist
if-no-files-found: error
build-storage-arm64:
name: Build Storage arm64
build-storage:
name: Build Storage - ${{ matrix.targets.name }}
runs-on: ubuntu-latest
strategy:
matrix:
targets:
- name: x86_64-unknown-linux-gnu
file: storage.node
- name: aarch64-unknown-linux-gnu
file: storage.arm64.node
- name: armv7-unknown-linux-gnueabihf
file: storage.armv7.node
steps:
- uses: actions/checkout@v4
@@ -106,51 +117,65 @@ jobs:
uses: ./.github/actions/setup-version
- name: Setup Node.js
uses: ./.github/actions/setup-node
with:
electron-install: false
extra-flags: workspaces focus @affine/storage
- name: Build Rust
uses: ./.github/actions/build-rust
with:
target: 'aarch64-unknown-linux-gnu'
target: ${{ matrix.targets.name }}
package: '@affine/storage'
nx_token: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
- name: Upload storage.node
uses: actions/upload-artifact@v3
- name: Upload ${{ matrix.targets.file }}
uses: actions/upload-artifact@v4
with:
name: storage.arm64.node
name: ${{ matrix.targets.file }}
path: ./packages/backend/storage/storage.node
if-no-files-found: error
build-docker:
name: Build Docker
runs-on: ubuntu-latest
permissions:
contents: 'write'
id-token: 'write'
packages: 'write'
needs:
- build-server
- build-core
- build-core-selfhost
- build-storage
- build-storage-arm64
steps:
- uses: actions/checkout@v4
- name: Download core artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: core
path: ./packages/frontend/core/dist
- name: Download server dist
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: server-dist
path: ./packages/backend/server/dist
- name: Download storage.node
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: storage.node
path: ./packages/backend/server
- name: Download storage.node arm64
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: storage.arm64.node
path: ./packages/backend/storage
- name: move storage.arm64.node
run: mv ./packages/backend/storage/storage.node ./packages/backend/server/storage.arm64.node
- name: Download storage.node arm64
uses: actions/download-artifact@v4
with:
name: storage.armv7.node
path: .
- name: move storage files
run: |
mv ./packages/backend/storage/storage.node ./packages/backend/server/storage.arm64.node
mv storage.node ./packages/backend/server/storage.armv7.node
- name: Setup env
run: |
echo "GIT_SHORT_HASH=$(git rev-parse --short HEAD)" >> "$GITHUB_ENV"
@@ -192,9 +217,19 @@ jobs:
registry-url: https://npm.pkg.github.com
scope: '@toeverything'
- name: Remove core dist
run: rm -rf ./packages/frontend/core/dist
- name: Download selfhost core artifact
uses: actions/download-artifact@v4
with:
name: selfhost-core
path: ./packages/frontend/core/dist
- name: Install Node.js dependencies
run: |
yarn config set --json supportedArchitectures.cpu '["x64", "arm64"]'
yarn config set --json supportedArchitectures.cpu '["x64", "arm64", "arm"]'
yarn config set --json supportedArchitectures.libc '["glibc"]'
yarn workspaces focus @affine/server --production
- name: Generate Prisma client
@@ -206,7 +241,7 @@ jobs:
context: .
push: true
pull: true
platforms: linux/amd64,linux/arm64
platforms: linux/amd64,linux/arm64,linux/arm/v7
provenance: true
file: .github/deployment/node/Dockerfile
tags: ghcr.io/toeverything/affine-graphql:${{env.RELEASE_FLAVOR}}-${{ env.GIT_SHORT_HASH }},ghcr.io/toeverything/affine-graphql:${{env.RELEASE_FLAVOR}}
@@ -242,12 +277,11 @@ jobs:
R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
R2_BUCKET: ${{ secrets.R2_BUCKET }}
ENABLE_CAPTCHA: true
CAPTCHA_TURNSTILE_SECRET: ${{ secrets.CAPTCHA_TURNSTILE_SECRET }}
OAUTH_EMAIL_SENDER: ${{ secrets.OAUTH_EMAIL_SENDER }}
OAUTH_EMAIL_LOGIN: ${{ secrets.OAUTH_EMAIL_LOGIN }}
OAUTH_EMAIL_PASSWORD: ${{ secrets.OAUTH_EMAIL_PASSWORD }}
MAILER_SENDER: ${{ secrets.OAUTH_EMAIL_SENDER }}
MAILER_USER: ${{ secrets.OAUTH_EMAIL_LOGIN }}
MAILER_PASSWORD: ${{ secrets.OAUTH_EMAIL_PASSWORD }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AFFINE_GOOGLE_CLIENT_ID: ${{ secrets.AFFINE_GOOGLE_CLIENT_ID }}
AFFINE_GOOGLE_CLIENT_SECRET: ${{ secrets.AFFINE_GOOGLE_CLIENT_SECRET }}
@@ -260,6 +294,7 @@ jobs:
REDIS_HOST: ${{ secrets.REDIS_HOST }}
REDIS_PASSWORD: ${{ secrets.REDIS_PASSWORD }}
CLOUD_SQL_IAM_ACCOUNT: ${{ secrets.CLOUD_SQL_IAM_ACCOUNT }}
CLOUD_LOGGER_IAM_ACCOUNT: ${{ secrets.CLOUD_LOGGER_IAM_ACCOUNT }}
STRIPE_API_KEY: ${{ secrets.STRIPE_API_KEY }}
STRIPE_WEBHOOK_KEY: ${{ secrets.STRIPE_WEBHOOK_KEY }}
STATIC_IP_NAME: ${{ secrets.STATIC_IP_NAME }}

View File

@@ -32,8 +32,6 @@ jobs:
uses: ./.github/actions/setup-node
with:
electron-install: false
- name: Build Plugins
run: yarn run build:plugins
- uses: chromaui/action-next@v1
with:
workingDir: tests/storybook
@@ -44,7 +42,7 @@ jobs:
env:
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
NODE_OPTIONS: ${{ env.NODE_OPTIONS }}
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
name: chromatic-build-artifacts-${{ github.run_id }}

View File

@@ -0,0 +1,51 @@
name: Publish UI Storybook
env:
NODE_OPTIONS: --max-old-space-size=4096
on:
workflow_dispatch:
push:
branches:
- canary
pull_request:
branches:
- canary
paths-ignore:
- README.md
- .github/**
- packages/backend/server
- packages/frontend/electron
- '!.github/workflows/publish-storybook.yml'
jobs:
publish-ui-storybook:
name: Publish UI Storybook
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
# This is required to fetch all commits for chromatic
fetch-depth: 0
- name: Setup Node.js
uses: ./.github/actions/setup-node
with:
electron-install: false
- uses: chromaui/action-next@v1
with:
workingDir: packages/frontend/component
buildScriptName: build:storybook
exitOnceUploaded: true
onlyChanged: false
diagnostics: true
env:
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_UI_PROJECT_TOKEN }}
NODE_OPTIONS: ${{ env.NODE_OPTIONS }}
- uses: actions/upload-artifact@v4
if: always()
with:
name: chromatic-build-artifacts-${{ github.run_id }}
path: |
chromatic-diagnostics.json
**/build-storybook.log

View File

@@ -61,7 +61,7 @@ jobs:
SKIP_NX_CACHE: 'true'
- name: Upload core artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: core
path: packages/frontend/electron/resources/web-static
@@ -102,7 +102,6 @@ jobs:
with:
extra-flags: workspaces focus @affine/electron @affine/monorepo
hard-link-nm: false
build-plugins: false
nmHoistingLimits: workspaces
enableScripts: false
- name: Build AFFiNE native
@@ -111,7 +110,7 @@ jobs:
target: ${{ matrix.spec.target }}
package: '@affine/native'
nx_token: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: core
path: packages/frontend/electron/resources/web-static
@@ -144,10 +143,10 @@ jobs:
run: |
mkdir -p builds
mv packages/frontend/electron/out/*/make/zip/linux/x64/*.zip ./builds/affine-${{ env.BUILD_TYPE }}-linux-x64.zip
mv packages/frontend/electron/out/*/make/AppImage/x64/*.AppImage ./builds/affine-${{ env.BUILD_TYPE }}-linux-x64.AppImage
mv packages/frontend/electron/out/*/make/*.AppImage ./builds/affine-${{ env.BUILD_TYPE }}-linux-x64.AppImage
- name: Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: affine-${{ matrix.spec.platform }}-${{ matrix.spec.arch }}-builds
path: builds
@@ -179,7 +178,6 @@ jobs:
with:
extra-flags: workspaces focus @affine/electron @affine/monorepo
hard-link-nm: false
build-plugins: false
nmHoistingLimits: workspaces
- name: Build AFFiNE native
uses: ./.github/actions/build-rust
@@ -187,14 +185,11 @@ jobs:
target: ${{ matrix.spec.target }}
package: '@affine/native'
nx_token: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: core
path: packages/frontend/electron/resources/web-static
- name: Build Plugins
run: yarn run build:plugins
- name: Build Desktop Layers
run: yarn workspace @affine/electron build
@@ -216,7 +211,7 @@ jobs:
run: Compress-Archive -CompressionLevel Fastest -Path packages/frontend/electron/out/* -DestinationPath archive.zip
- name: Save packaged artifacts for signing
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: packaged-${{ matrix.spec.platform }}-${{ matrix.spec.arch }}
path: |
@@ -250,7 +245,7 @@ jobs:
timeout-minutes: 10
uses: ./.github/actions/setup-node
- name: Download and overwrite packaged artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: signed-packaged-${{ matrix.spec.platform }}-${{ matrix.spec.arch }}
path: .
@@ -271,7 +266,7 @@ jobs:
echo $FILES_TO_BE_SIGNED
- name: Save installer for signing
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: installer-${{ matrix.spec.platform }}-${{ matrix.spec.arch }}
path: archive.zip
@@ -297,7 +292,7 @@ jobs:
runs-on: ${{ matrix.spec.runner }}
steps:
- name: Download and overwrite installer artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: signed-installer-${{ matrix.spec.platform }}-${{ matrix.spec.arch }}
path: .
@@ -312,7 +307,7 @@ jobs:
mv packages/frontend/electron/out/*/make/squirrel.windows/x64/*.msi ./builds/affine-${{ env.BUILD_TYPE }}-windows-x64.msi
- name: Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: affine-${{ matrix.spec.platform }}-${{ matrix.spec.arch }}-builds
path: builds
@@ -323,29 +318,29 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: core
path: web-static
- name: Zip web-static
run: zip -r web-static.zip web-static
- name: Download Artifacts (macos-x64)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: affine-darwin-x64-builds
path: ./
- name: Download Artifacts (macos-arm64)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: affine-darwin-arm64-builds
path: ./
- name: Download Artifacts (windows-x64)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: affine-win32-x64-builds
path: ./
- name: Download Artifacts (linux-x64)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: affine-linux-x64-builds
path: ./
@@ -358,6 +353,7 @@ jobs:
env:
RELEASE_VERSION: ${{ needs.before-make.outputs.RELEASE_VERSION }}
- name: Create Release Draft
if: ${{ github.ref_type == 'tag' }}
uses: softprops/action-gh-release@v1
with:
name: ${{ needs.before-make.outputs.RELEASE_VERSION }}
@@ -372,3 +368,25 @@ jobs:
./*.AppImage
./*.apk
./*.yml
- name: Create Nightly Release Draft
if: ${{ github.ref_type == 'branch' }}
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
# Temporarily, treat release from branch as nightly release, artifact saved to AFFiNE-Releases.
# Need to improve internal build and nightly release logic.
repository: 'toeverything/AFFiNE-Releases'
name: ${{ needs.before-make.outputs.RELEASE_VERSION }}
tag_name: ${{ needs.before-make.outputs.RELEASE_VERSION }}
body: ''
draft: false
prerelease: true
files: |
./VERSION
./*.zip
./*.dmg
./*.exe
./*.AppImage
./*.apk
./*.yml

View File

@@ -14,7 +14,7 @@ jobs:
env:
ARCHIVE_DIR: ${{ github.run_id }}-${{ github.run_attempt }}-${{ inputs.artifact-name }}
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: ${{ inputs.artifact-name }}
path: ${{ env.ARCHIVE_DIR }}
@@ -36,7 +36,7 @@ jobs:
cd ${{ env.ARCHIVE_DIR }}
7za a signed.zip .\out\*
- name: upload
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: signed-${{ inputs.artifact-name }}
path: ${{ env.ARCHIVE_DIR }}/signed.zip

View File

@@ -15,7 +15,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Publish
uses: cloudflare/wrangler-action@v3.3.2
uses: cloudflare/wrangler-action@v3.4.0
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}

3
.gitignore vendored
View File

@@ -79,3 +79,6 @@ lib
affine.db
apps/web/next-routes.conf
.nx
packages/frontend/templates/edgeless
packages/frontend/core/public/static/templates

View File

@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
yarn lint-staged && yarn lint:ox

View File

@@ -16,6 +16,9 @@ packages/frontend/i18n/src/i18n-generated.ts
packages/frontend/graphql/src/graphql/index.ts
tests/affine-legacy/**/static
.yarnrc.yml
packages/frontend/templates/edgeless-templates.gen.ts
packages/frontend/templates/templates.gen.ts
packages/frontend/templates/onboarding
# auto-generated by NAPI-RS
# fixme(@joooye34): need script to check and generate ignore list here

File diff suppressed because one or more lines are too long

1010
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -113,21 +113,6 @@ If you have questions, you are welcome to contact us. One of the best places to
| [@toeverything/y-indexeddb](packages/common/y-indexeddb) | IndexedDB database adapter for Yjs | [![](https://img.shields.io/npm/dm/@toeverything/y-indexeddb?style=flat-square&color=eee)](https://www.npmjs.com/package/@toeverything/y-indexeddb) |
| [@toeverything/theme](packages/common/theme) | AFFiNE theme | [![](https://img.shields.io/npm/dm/@toeverything/theme?style=flat-square&color=eee)](https://www.npmjs.com/package/@toeverything/theme) |
## Plugins
> Plugins are a way to extend the functionality of AFFiNE. You can use plugins to add new blocks, new features, and even new ways to edit content.
>
> (Currently, the plugin system is under heavy development. You will see the plugin system in the canary release.)
- [@affine/sdk](./packages/common/sdk) - SDK for developing plugins
- [@affine/plugin-cli](./tools/plugin-cli) - CLI for developing plugins
| Official Plugin | Description | Status |
| ---------------------------------------------------------------- | ----------------------------------------- | ------ |
| [@affine/copilot-plugin](./packages/plugins/copilot) | AI Copilot that help you document writing | 🚧 |
| [@affine/image-preview-plugin](./packages/plugins/image-preview) | Component for previewing an image | ✅ |
| [@affine/outline](./packages/plugins/outline) | Outline for your document | ✅ |
## Upstreams
We would also like to give thanks to open-source projects that make AFFiNE possible:
@@ -153,24 +138,6 @@ We would like to express our gratitude to all the individuals who have already c
<img alt="contributors" src="https://opencollective.com/affine/contributors.svg?width=890&button=false" />
</a>
## Data Compatibility
Data compatibility is a very important issue for us. We will try our best to ensure that the data is compatible with the previous version.
If you encounter any problems when upgrading the version, please feel free to [contact us](mailto:developer@toeverything.info).
| AFFiNE Version | Export/Import workspace | Data auto migration |
| --------------- | ----------------------- | ------------------- |
| <= 0.5.4 | ❌️ | ❌ |
| 0.6.x | ✅️ | ✅ |
| 0.7.x | ✅️ | ✅ |
| 0.8.x (current) | ✅ | ✅ |
| 0.9.x (next) | 🚧 | 🚧 |
- ❌️: Not compatible
- ✅: Compatible
- 🚧: Work in progress
## Self-Host
> We know that the self-host version has been out of date for a long time.
@@ -227,7 +194,7 @@ See [LICENSE] for details.
[jobs available]: ./docs/jobs.md
[latest packages]: https://github.com/toeverything/AFFiNE/pkgs/container/affine-self-hosted
[contributor license agreement]: https://github.com/toeverything/affine/edit/canary/.github/CLA.md
[rust-version-icon]: https://img.shields.io/badge/Rust-1.74.1-dea584
[rust-version-icon]: https://img.shields.io/badge/Rust-1.75.0-dea584
[stars-icon]: https://img.shields.io/github/stars/toeverything/AFFiNE.svg?style=flat&logo=github&colorB=red&label=stars
[codecov]: https://codecov.io/gh/toeverything/affine/branch/canary/graphs/badge.svg?branch=canary
[node-version-icon]: https://img.shields.io/badge/node-%3E=18.16.1-success

View File

@@ -57,6 +57,29 @@ corepack prepare yarn@stable --activate
yarn install
```
### Clone repository
#### Linux & MacOS
```sh
git clone https://github.com/toeverything/AFFiNE
```
#### Windows
In our codebase, we use symbolic links. Due to the security design of Windows, the creation of symbolic links requires administrator privileges. This is part of the security policy settings of Windows, and more information can be found at [Security Policy Settings for Creating Symbolic Links](https://learn.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/create-symbolic-links).
For detailed guidance on enabling this feature, please refer to the official documentation: [Enable Developer Mode on Windows](https://learn.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development).
Once Developer Mode is enabled, execute the following command with administrator privileges:
```sh
# Enable symbolic links
git config --global core.symlinks true
# Clone the repository, also need to be run with administrator privileges
git clone https://github.com/toeverything/AFFiNE
```
### Build Native Dependencies
Run the following script. It will build the native module at [`/packages/frontend/native`](/packages/frontend/native) and build Node.js binding using [NAPI.rs](https://napi.rs/).
@@ -67,18 +90,6 @@ Note: use `strip` from system instead of `binutils` if you are running MacOS. [s
yarn workspace @affine/native build
```
### Build Infra
```sh
yarn run build:infra
```
### Build Plugins
```sh
yarn run build:plugins
```
### Build Server Dependencies
```sh
@@ -102,7 +113,7 @@ yarn test
### E2E Test
```shell
# there are `affine-local`, `affine-migration`, `affine-local`, `affine-plugin`, `affine-prototype` e2e tests,
# there are `affine-local`, `affine-migration`, `affine-local`, `affine-prototype` e2e tests,
# which are run under different situations.
cd tests/affine-local
yarn e2e

View File

@@ -17,7 +17,6 @@ The codebase is organized as follows:
- `packages/` contains all code running in production.
- `backend/` contains backend code, more information from <https://github.com/toeverything/OctoBase>.
- `frontend/` contains frontend code, including the web app, the electron app and business libraries.
- `plugins/` contains all build-in plugins.
- `common` contains the isomorphic code or basic libraries without business.
- `tools/` contains tools to help developing or CI, not used in production.
- `tests/` contains testings across different libraries, including e2e testings and integration testings.

View File

@@ -59,9 +59,9 @@ You may need additional env for auth login. You may want to put your own one if
For email login & password, please refer to https://nodemailer.com/usage/using-gmail/
```
OAUTH_EMAIL_SENDER=
OAUTH_EMAIL_LOGIN=
OAUTH_EMAIL_PASSWORD=
MAILER_SENDER=
MAILER_USER=
MAILER_PASSWORD=
OAUTH_GOOGLE_ENABLED="true"
OAUTH_GOOGLE_CLIENT_ID=
OAUTH_GOOGLE_CLIENT_SECRET=

View File

@@ -0,0 +1,23 @@
{
"name": "@affine/docs",
"type": "module",
"private": true,
"scripts": {
"build": "typedoc --options ../../typedoc.json",
"dev": "nodemon --exec 'typedoc --options ../../typedoc.json' & serve dist/"
},
"devDependencies": {
"nodemon": "^3.0.1",
"serve": "^14.2.1",
"typedoc": "^0.25.4"
},
"nodemonConfig": {
"watch": [
"./readme.md",
"../../packages/*/*/src/*.ts",
"../../**/typedoc{.base,}.json"
],
"ext": "ts,md,json"
},
"version": "0.12.0"
}

7
docs/reference/readme.md Normal file
View File

@@ -0,0 +1,7 @@
Welcome to AFFiNE development reference.
This document is intended for developers who want to contribute to AFFiNE. It contains information about the architecture of AFFiNE, how to build it, and how to contribute to it.
### The Infrastructure of AFFiNE
see {@link @toeverything/infra!}

View File

@@ -1,12 +1,13 @@
{
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"npmScope": "toeverything",
"nxCloudAccessToken": "MzUwNTU4YWItZGFhYi00YjE2LWIxODAtODk4NmIwYjMwYzZkfHJlYWQ=",
"tasksRunnerOptions": {
"default": {
"runner": "nx-cloud",
"options": {
"cacheableOperations": ["build", "test", "e2e", "lint"],
"accessToken": "YmQ2NTg1ODktZTk5Mi00YzhiLTk2ZmUtNWQzMDg0NDBkOWM3fHJlYWQtb25seQ=="
"runtimeCacheInputs": ["node -v"]
}
}
},

View File

@@ -1,6 +1,6 @@
{
"name": "@affine/monorepo",
"version": "0.11.0",
"version": "0.12.0",
"private": true,
"author": "toeverything",
"license": "MIT",
@@ -8,10 +8,9 @@
".",
"packages/*/*",
"tools/*",
"!tools/@types",
"docs/reference",
"tools/@types/*",
"tests/*",
"!tests/affine-legacy",
"tests/affine-legacy/*"
],
"engines": {
@@ -23,8 +22,6 @@
"build": "yarn nx build @affine/core",
"build:electron": "yarn nx build @affine/electron",
"build:storage": "yarn nx run-many -t build -p @affine/storage",
"build:infra": "yarn nx run-many -t build --projects=tag:infra",
"build:plugins": "yarn nx run-many -t build --projects=tag:plugin",
"build:storybook": "yarn nx build @affine/storybook",
"start:web-static": "yarn workspace @affine/core static-server",
"start:storybook": "yarn exec serve tests/storybook/storybook-static -l 6006",
@@ -33,14 +30,15 @@
"lint:eslint:fix": "yarn lint:eslint --fix",
"lint:prettier": "prettier --ignore-unknown --cache --check .",
"lint:prettier:fix": "prettier --ignore-unknown --cache --write .",
"lint:ox": "oxlint --deny-warnings -D correctness -D nursery -D prefer-array-some -D no-useless-promise-resolve-reject -A no-undef -A consistent-type-exports -A default -A named -A ban-ts-comment",
"lint:ox": "oxlint --import-plugin --deny-warnings -D correctness -D nursery -D prefer-array-some -D no-useless-promise-resolve-reject -D perf -A no-undef -A consistent-type-exports -A default -A named -A ban-ts-comment -A export",
"lint": "yarn lint:eslint && yarn lint:prettier",
"lint:fix": "yarn lint:eslint:fix && yarn lint:prettier:fix",
"test": "vitest --run",
"test:ui": "vitest --ui",
"test:coverage": "vitest run --coverage",
"typecheck": "tsc -b tsconfig.json --diagnostics",
"postinstall": "node ./scripts/check-version.mjs && yarn i18n-codegen gen && yarn husky install"
"postinstall": "node ./scripts/check-version.mjs && yarn i18n-codegen gen && yarn husky install",
"prepare": "husky"
},
"lint-staged": {
"*": "prettier --write --ignore-unknown --cache",
@@ -58,15 +56,13 @@
"devDependencies": {
"@affine-test/kit": "workspace:*",
"@affine/cli": "workspace:*",
"@affine/plugin-cli": "workspace:*",
"@commitlint/cli": "^18.4.3",
"@commitlint/config-conventional": "^18.4.3",
"@faker-js/faker": "^8.3.1",
"@istanbuljs/schema": "^0.1.3",
"@magic-works/i18n-codegen": "^0.5.0",
"@nx/vite": "17.1.3",
"@perfsee/sdk": "^1.9.0",
"@playwright/test": "^1.40.0",
"@nx/vite": "17.2.8",
"@playwright/test": "^1.41.0",
"@taplo/cli": "^0.5.2",
"@testing-library/react": "^14.1.2",
"@toeverything/infra": "workspace:*",
@@ -78,9 +74,9 @@
"@vanilla-extract/vite-plugin": "^3.9.2",
"@vanilla-extract/webpack-plugin": "^2.3.1",
"@vitejs/plugin-react-swc": "^3.5.0",
"@vitest/coverage-istanbul": "1.0.4",
"@vitest/ui": "1.0.4",
"electron": "^27.1.0",
"@vitest/coverage-istanbul": "1.1.3",
"@vitest/ui": "1.1.3",
"electron": "^28.2.1",
"eslint": "^8.54.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-i": "^2.29.0",
@@ -91,16 +87,15 @@
"eslint-plugin-unicorn": "^50.0.0",
"eslint-plugin-unused-imports": "^3.0.0",
"eslint-plugin-vue": "^9.18.1",
"fake-indexeddb": "5.0.1",
"happy-dom": "^12.10.3",
"husky": "^8.0.3",
"fake-indexeddb": "5.0.2",
"happy-dom": "^13.0.0",
"husky": "^9.0.6",
"lint-staged": "^15.1.0",
"msw": "^2.0.8",
"nanoid": "^5.0.3",
"nx": "^17.1.3",
"nx-cloud": "^16.5.2",
"nx": "^17.2.8",
"nyc": "^15.1.0",
"oxlint": "0.0.21",
"oxlint": "0.0.22",
"prettier": "^3.1.0",
"semver": "^7.5.4",
"serve": "^14.2.1",
@@ -111,7 +106,7 @@
"vite-plugin-istanbul": "^5.0.0",
"vite-plugin-static-copy": "^1.0.0",
"vite-tsconfig-paths": "^4.2.1",
"vitest": "1.0.4",
"vitest": "1.1.3",
"vitest-fetch-mock": "^0.2.2",
"vitest-mock-extended": "^1.3.1"
},
@@ -176,6 +171,7 @@
"next-auth@^4.24.5": "patch:next-auth@npm%3A4.24.5#~/.yarn/patches/next-auth-npm-4.24.5-8428e11927.patch",
"@reforged/maker-appimage/@electron-forge/maker-base": "7.2.0",
"macos-alias": "npm:macos-alias-building@latest",
"fs-xattr": "npm:@napi-rs/xattr@latest"
"fs-xattr": "npm:@napi-rs/xattr@latest",
"@radix-ui/react-dialog": "npm:@radix-ui/react-dialog@latest"
}
}

View File

@@ -1,8 +1,4 @@
DATABASE_URL="postgresql://affine@localhost:5432/affine"
NEXTAUTH_URL="http://localhost:8080"
OAUTH_EMAIL_SENDER="noreply@toeverything.info"
OAUTH_EMAIL_LOGIN=""
OAUTH_EMAIL_PASSWORD=""
ENABLE_LOCAL_EMAIL="true"
STRIPE_API_KEY=
STRIPE_WEBHOOK_KEY=
# AFFINE_SERVER_PORT=3010
# AFFINE_SERVER_HOST=app.affine.pro
# AFFINE_SERVER_HTTPS=true
# DATABASE_URL="postgres://affine@localhost:5432/affine"

View File

@@ -0,0 +1,18 @@
-- CreateTable
CREATE TABLE "workspace_features" (
"id" SERIAL NOT NULL,
"workspace_id" VARCHAR(36) NOT NULL,
"feature_id" INTEGER NOT NULL,
"reason" VARCHAR NOT NULL,
"created_at" TIMESTAMPTZ(6) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"expired_at" TIMESTAMPTZ(6),
"activated" BOOLEAN NOT NULL DEFAULT false,
CONSTRAINT "workspace_features_pkey" PRIMARY KEY ("id")
);
-- AddForeignKey
ALTER TABLE "workspace_features" ADD CONSTRAINT "workspace_features_feature_id_fkey" FOREIGN KEY ("feature_id") REFERENCES "features"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "workspace_features" ADD CONSTRAINT "workspace_features_workspace_id_fkey" FOREIGN KEY ("workspace_id") REFERENCES "workspaces"("id") ON DELETE CASCADE ON UPDATE CASCADE;

View File

@@ -1,7 +1,7 @@
{
"name": "@affine/server",
"private": true,
"version": "0.11.0",
"version": "0.12.0",
"description": "Affine Node.js server",
"type": "module",
"bin": {
@@ -9,20 +9,21 @@
},
"scripts": {
"build": "tsc",
"start": "node --loader ts-node/esm.mjs --es-module-specifier-resolution node ./src/index.ts",
"start": "node --loader ts-node/esm/transpile-only.mjs ./src/index.ts",
"dev": "nodemon ./src/index.ts",
"test": "ava --concurrency 1 --serial",
"test:coverage": "c8 ava --concurrency 1 --serial",
"postinstall": "prisma generate",
"data-migration": "node --loader ts-node/esm.mjs --es-module-specifier-resolution node ./src/data/app.ts",
"predeploy": "yarn prisma migrate deploy && node --es-module-specifier-resolution node ./dist/data/app.js run"
"data-migration": "node --loader ts-node/esm/transpile-only.mjs ./src/data/index.ts",
"predeploy": "yarn prisma migrate deploy && node --import ./scripts/register.js ./dist/data/index.js run"
},
"dependencies": {
"@apollo/server": "^4.9.5",
"@auth/prisma-adapter": "^1.0.7",
"@aws-sdk/client-s3": "^3.454.0",
"@aws-sdk/client-s3": "^3.499.0",
"@google-cloud/opentelemetry-cloud-monitoring-exporter": "^0.17.0",
"@google-cloud/opentelemetry-cloud-trace-exporter": "^2.1.0",
"@google-cloud/opentelemetry-resource-util": "^2.1.0",
"@keyv/redis": "^2.8.0",
"@nestjs/apollo": "^12.0.11",
"@nestjs/common": "^10.2.10",
@@ -32,35 +33,39 @@
"@nestjs/platform-express": "^10.2.10",
"@nestjs/platform-socket.io": "^10.2.10",
"@nestjs/schedule": "^4.0.0",
"@nestjs/serve-static": "^4.0.0",
"@nestjs/throttler": "^5.0.1",
"@nestjs/websockets": "^10.2.10",
"@node-rs/argon2": "^1.5.2",
"@node-rs/crc32": "^1.7.2",
"@node-rs/jsonwebtoken": "^0.2.3",
"@node-rs/jsonwebtoken": "^0.3.0",
"@opentelemetry/api": "^1.7.0",
"@opentelemetry/core": "^1.18.1",
"@opentelemetry/exporter-prometheus": "^0.45.1",
"@opentelemetry/exporter-zipkin": "^1.18.1",
"@opentelemetry/host-metrics": "^0.34.0",
"@opentelemetry/instrumentation": "^0.45.1",
"@opentelemetry/instrumentation-graphql": "^0.36.0",
"@opentelemetry/instrumentation-http": "^0.45.1",
"@opentelemetry/instrumentation-ioredis": "^0.36.0",
"@opentelemetry/instrumentation-nestjs-core": "^0.33.3",
"@opentelemetry/instrumentation-socket.io": "^0.34.3",
"@opentelemetry/resources": "^1.18.1",
"@opentelemetry/sdk-metrics": "^1.18.1",
"@opentelemetry/sdk-node": "^0.45.1",
"@opentelemetry/sdk-trace-node": "^1.18.1",
"@prisma/client": "^5.6.0",
"@prisma/instrumentation": "^5.6.0",
"@opentelemetry/core": "^1.21.0",
"@opentelemetry/exporter-prometheus": "^0.48.0",
"@opentelemetry/exporter-zipkin": "^1.21.0",
"@opentelemetry/host-metrics": "^0.35.0",
"@opentelemetry/instrumentation": "^0.48.0",
"@opentelemetry/instrumentation-graphql": "^0.37.0",
"@opentelemetry/instrumentation-http": "^0.48.0",
"@opentelemetry/instrumentation-ioredis": "^0.37.0",
"@opentelemetry/instrumentation-nestjs-core": "^0.34.0",
"@opentelemetry/instrumentation-socket.io": "^0.36.0",
"@opentelemetry/resources": "^1.21.0",
"@opentelemetry/sdk-metrics": "^1.21.0",
"@opentelemetry/sdk-node": "^0.48.0",
"@opentelemetry/sdk-trace-node": "^1.21.0",
"@opentelemetry/semantic-conventions": "^1.21.0",
"@prisma/client": "^5.7.1",
"@prisma/instrumentation": "^5.7.1",
"@socket.io/redis-adapter": "^8.2.1",
"cookie-parser": "^1.4.6",
"dotenv": "^16.3.1",
"dotenv-cli": "^7.3.0",
"express": "^4.18.2",
"file-type": "^18.7.0",
"file-type": "^19.0.0",
"get-stream": "^8.0.1",
"graphql": "^16.8.1",
"graphql-scalars": "^1.22.4",
"graphql-type-json": "^0.3.2",
"graphql-upload": "^16.0.2",
"ioredis": "^5.3.2",
@@ -74,13 +79,15 @@
"on-headers": "^1.0.2",
"parse-duration": "^1.1.0",
"pretty-time": "^1.1.0",
"prisma": "^5.6.0",
"prisma": "^5.7.1",
"prom-client": "^15.0.0",
"reflect-metadata": "^0.1.13",
"reflect-metadata": "^0.2.0",
"rxjs": "^7.8.1",
"semver": "^7.5.4",
"socket.io": "^4.7.2",
"stripe": "^14.5.0",
"ts-node": "^10.9.2",
"typescript": "^5.3.3",
"ws": "^8.14.2",
"yjs": "^13.6.10",
"zod": "^3.22.4"
@@ -101,17 +108,16 @@
"@types/on-headers": "^1.0.3",
"@types/pretty-time": "^1.1.5",
"@types/sinon": "^17.0.2",
"@types/supertest": "^2.0.16",
"@types/supertest": "^6.0.0",
"@types/ws": "^8.5.10",
"ava": "^6.0.0",
"c8": "^8.0.1",
"c8": "^9.0.0",
"nodemon": "^3.0.1",
"sinon": "^17.0.1",
"supertest": "^6.3.3",
"ts-node": "^10.9.1",
"typescript": "^5.3.2"
"supertest": "^6.3.3"
},
"ava": {
"timeout": "1m",
"extensions": {
"ts": "module"
},
@@ -133,10 +139,11 @@
"environmentVariables": {
"TS_NODE_PROJECT": "./tests/tsconfig.json",
"NODE_ENV": "test",
"ENABLE_LOCAL_EMAIL": "true",
"OAUTH_EMAIL_LOGIN": "noreply@toeverything.info",
"OAUTH_EMAIL_PASSWORD": "affine",
"OAUTH_EMAIL_SENDER": "noreply@toeverything.info",
"MAILER_HOST": "0.0.0.0",
"MAILER_PORT": "1025",
"MAILER_USER": "noreply@toeverything.info",
"MAILER_PASSWORD": "affine",
"MAILER_SENDER": "noreply@toeverything.info",
"FEATURES_EARLY_ACCESS_PREVIEW": "false"
}
},
@@ -156,7 +163,6 @@
"env": {
"TS_NODE_TRANSPILE_ONLY": true,
"TS_NODE_PROJECT": "./tsconfig.json",
"NODE_ENV": "development",
"DEBUG": "affine:*",
"FORCE_COLOR": true,
"DEBUG_COLORS": true

View File

@@ -1,7 +1,7 @@
generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "debian-openssl-3.0.x", "linux-arm64-openssl-3.0.x"]
previewFeatures = ["metrics", "tracing"]
previewFeatures = ["metrics", "tracing", "relationJoins", "nativeDistinct"]
}
datasource db {
@@ -40,6 +40,7 @@ model Workspace {
pages WorkspacePage[]
permissions WorkspaceUserPermission[]
pagePermissions WorkspacePageUserPermission[]
features WorkspaceFeatures[]
@@map("workspaces")
}
@@ -135,12 +136,39 @@ model UserFeatures {
// - if we switch the user to another plan, we will set the old plan to deactivated, but dont delete it
activated Boolean @default(false)
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
feature Features @relation(fields: [featureId], references: [id], onDelete: Cascade)
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
@@map("user_features")
}
// feature gates is a way to enable/disable features for a workspace
// for example:
// - copilet is a feature that allow some users in a workspace to access the copilet feature
model WorkspaceFeatures {
id Int @id @default(autoincrement())
workspaceId String @map("workspace_id") @db.VarChar(36)
featureId Int @map("feature_id") @db.Integer
// we will record the reason why the feature is enabled/disabled
// for example:
// - copilet_v1: "owner buy the copilet feature package"
reason String @db.VarChar
// record the feature enabled time
createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(6)
// record the quota expired time, pay plan is a subscription, so it will expired
expiredAt DateTime? @map("expired_at") @db.Timestamptz(6)
// whether the feature is activated
// for example:
// - if owner unsubscribe a feature package, we will set the feature to deactivated, but dont delete it
activated Boolean @default(false)
feature Features @relation(fields: [featureId], references: [id], onDelete: Cascade)
workspace Workspace @relation(fields: [workspaceId], references: [id], onDelete: Cascade)
@@map("workspace_features")
}
model Features {
id Int @id @default(autoincrement())
feature String @db.VarChar
@@ -151,7 +179,8 @@ model Features {
configs Json @db.Json
createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(6)
UserFeatureGates UserFeatures[]
UserFeatureGates UserFeatures[]
WorkspaceFeatures WorkspaceFeatures[]
@@unique([feature, version])
@@map("features")
@@ -196,6 +225,7 @@ model VerificationToken {
@@map("verificationtokens")
}
// deprecated, use [ObjectStorage]
model Blob {
id Int @id @default(autoincrement()) @db.Integer
hash String @db.VarChar
@@ -210,6 +240,7 @@ model Blob {
@@map("blobs")
}
// deprecated, use [ObjectStorage]
model OptimizedBlob {
id Int @id @default(autoincrement()) @db.Integer
hash String @db.VarChar
@@ -234,7 +265,9 @@ model Snapshot {
seq Int @default(0) @db.Integer
state Bytes? @db.ByteA
createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(6)
updatedAt DateTime @updatedAt @map("updated_at") @db.Timestamptz(6)
// the `updated_at` field will not record the time of record changed,
// but the created time of last seen update that has been merged into snapshot.
updatedAt DateTime @map("updated_at") @db.Timestamptz(6)
@@id([id, workspaceId])
@@map("snapshots")

View File

@@ -0,0 +1,11 @@
import { create, createEsmHooks } from 'ts-node';
const service = create({
experimentalSpecifierResolution: 'node',
transpileOnly: true,
logError: true,
skipProject: true,
});
const hooks = createEsmHooks(service);
export const resolve = hooks.resolve;

View File

@@ -0,0 +1,4 @@
import { register } from 'node:module';
import { pathToFileURL } from 'node:url';
register('./scripts/loader.js', pathToFileURL('./'));

View File

@@ -0,0 +1,52 @@
import { execSync } from 'node:child_process';
import fs from 'node:fs';
import path from 'node:path';
const SELF_HOST_CONFIG_DIR = '/root/.affine/config';
/**
* @type {Array<{ from: string; to?: string, modifier?: (content: string): string }>}
*/
const configFiles = [
{ from: './.env.example', to: '.env' },
{ from: './dist/config/affine.js', modifier: configCleaner },
{ from: './dist/config/affine.env.js', modifier: configCleaner },
];
function configCleaner(content) {
return content.replace(
/(^\/\/#.*$)|(^\/\/\s+TODO.*$)|("use\sstrict";?)|(^.*eslint-disable.*$)/gm,
''
);
}
function prepare() {
fs.mkdirSync(SELF_HOST_CONFIG_DIR, { recursive: true });
for (const { from, to, modifier } of configFiles) {
const targetFileName = to ?? path.parse(from).base;
const targetFilePath = path.join(SELF_HOST_CONFIG_DIR, targetFileName);
if (!fs.existsSync(targetFilePath)) {
console.log(`creating config file [${targetFilePath}].`);
if (modifier) {
const content = fs.readFileSync(from, 'utf-8');
fs.writeFileSync(targetFilePath, modifier(content), 'utf-8');
} else {
fs.cpSync(from, targetFilePath, {
force: false,
});
}
}
}
}
function runPredeployScript() {
console.log('running predeploy script.');
execSync('yarn predeploy', {
encoding: 'utf-8',
env: process.env,
stdio: 'inherit',
});
}
prepare();
runPredeployScript();

View File

@@ -1,13 +1,18 @@
import { Controller, Get } from '@nestjs/common';
import { Config } from './fundamentals/config';
@Controller('/')
export class AppController {
constructor(private readonly config: Config) {}
@Get()
info() {
const version = AFFiNE.version;
return {
compatibility: version,
message: `AFFiNE ${version} Server`,
compatibility: this.config.version,
message: `AFFiNE ${this.config.version} Server`,
type: this.config.type,
flavor: this.config.flavor,
};
}
}

View File

@@ -0,0 +1,169 @@
import { join } from 'node:path';
import { Logger, Module } from '@nestjs/common';
import { APP_INTERCEPTOR } from '@nestjs/core';
import { ScheduleModule } from '@nestjs/schedule';
import { ServeStaticModule } from '@nestjs/serve-static';
import { get } from 'lodash-es';
import { AppController } from './app.controller';
import { AuthModule } from './core/auth';
import { ADD_ENABLED_FEATURES, ServerConfigModule } from './core/config';
import { DocModule } from './core/doc';
import { FeatureModule } from './core/features';
import { QuotaModule } from './core/quota';
import { StorageModule } from './core/storage';
import { SyncModule } from './core/sync';
import { UsersModule } from './core/users';
import { WorkspaceModule } from './core/workspaces';
import { getOptionalModuleMetadata } from './fundamentals';
import { CacheInterceptor, CacheModule } from './fundamentals/cache';
import {
type AvailablePlugins,
Config,
ConfigModule,
} from './fundamentals/config';
import { EventModule } from './fundamentals/event';
import { GqlModule } from './fundamentals/graphql';
import { MailModule } from './fundamentals/mailer';
import { MetricsModule } from './fundamentals/metrics';
import { PrismaModule } from './fundamentals/prisma';
import { SessionModule } from './fundamentals/session';
import { RateLimiterModule } from './fundamentals/throttler';
import { WebSocketModule } from './fundamentals/websocket';
import { pluginsMap } from './plugins';
export const FunctionalityModules = [
ConfigModule.forRoot(),
ScheduleModule.forRoot(),
EventModule,
CacheModule,
PrismaModule,
MetricsModule,
RateLimiterModule,
SessionModule,
MailModule,
];
export class AppModuleBuilder {
private readonly modules: AFFiNEModule[] = [];
constructor(private readonly config: Config) {}
use(...modules: AFFiNEModule[]): this {
modules.forEach(m => {
const requirements = getOptionalModuleMetadata(m, 'requires');
// if condition not set or condition met, include the module
if (requirements?.length) {
const nonMetRequirements = requirements.filter(c => {
const value = get(this.config, c);
return (
value === undefined ||
value === null ||
(typeof value === 'string' && value.trim().length === 0)
);
});
if (nonMetRequirements.length) {
const name = 'module' in m ? m.module.name : m.name;
new Logger(name).warn(
`${name} is not enabled because of the required configuration is not satisfied.`,
'Unsatisfied configuration:',
...nonMetRequirements.map(config => ` AFFiNE.${config}`)
);
return;
}
}
const predicator = getOptionalModuleMetadata(m, 'if');
if (predicator && !predicator(this.config)) {
return;
}
const contribution = getOptionalModuleMetadata(m, 'contributesTo');
if (contribution) {
ADD_ENABLED_FEATURES(contribution);
}
this.modules.push(m);
});
return this;
}
useIf(
predicator: (config: Config) => boolean,
...modules: AFFiNEModule[]
): this {
if (predicator(this.config)) {
this.use(...modules);
}
return this;
}
compile() {
@Module({
providers: [
{
provide: APP_INTERCEPTOR,
useClass: CacheInterceptor,
},
],
imports: this.modules,
controllers: this.config.isSelfhosted ? [] : [AppController],
})
class AppModule {}
return AppModule;
}
}
function buildAppModule() {
const factor = new AppModuleBuilder(AFFiNE);
factor
// common fundamental modules
.use(...FunctionalityModules)
// auth
.use(AuthModule)
// business modules
.use(DocModule)
// sync server only
.useIf(config => config.flavor.sync, SyncModule)
// graphql server only
.useIf(
config => config.flavor.graphql,
ServerConfigModule,
WebSocketModule,
GqlModule,
StorageModule,
UsersModule,
WorkspaceModule,
FeatureModule,
QuotaModule
)
// self hosted server only
.useIf(
config => config.isSelfhosted,
ServeStaticModule.forRoot({
rootPath: join('/app', 'static'),
})
);
// plugin modules
AFFiNE.plugins.enabled.forEach(name => {
const plugin = pluginsMap.get(name as AvailablePlugins);
if (!plugin) {
throw new Error(`Unknown plugin ${name}`);
}
factor.use(plugin);
});
return factor.compile();
}
export const AppModule = buildAppModule();

View File

@@ -1,36 +1,48 @@
import { Module } from '@nestjs/common';
import { APP_INTERCEPTOR } from '@nestjs/core';
import { Type } from '@nestjs/common';
import { NestFactory } from '@nestjs/core';
import type { NestExpressApplication } from '@nestjs/platform-express';
import cookieParser from 'cookie-parser';
import graphqlUploadExpress from 'graphql-upload/graphqlUploadExpress.mjs';
import { AppController } from './app.controller';
import { CacheInterceptor, CacheModule } from './cache';
import { ConfigModule } from './config';
import { EventModule } from './event';
import { BusinessModules } from './modules';
import { AuthModule } from './modules/auth';
import { PrismaModule } from './prisma';
import { SessionModule } from './session';
import { StorageModule } from './storage';
import { RateLimiterModule } from './throttler';
import { SocketIoAdapter } from './fundamentals';
import { SocketIoAdapterImpl } from './fundamentals/websocket';
import { ExceptionLogger } from './middleware/exception-logger';
import { serverTimingAndCache } from './middleware/timing';
const BasicModules = [
PrismaModule,
ConfigModule.forRoot(),
CacheModule,
EventModule,
StorageModule.forRoot(),
SessionModule,
RateLimiterModule,
AuthModule,
];
export async function createApp() {
const { AppModule } = await import('./app.module');
@Module({
providers: [
{
provide: APP_INTERCEPTOR,
useClass: CacheInterceptor,
},
],
imports: [...BasicModules, ...BusinessModules],
controllers: [AppController],
})
export class AppModule {}
const app = await NestFactory.create<NestExpressApplication>(AppModule, {
cors: true,
rawBody: true,
bodyParser: true,
logger: AFFiNE.affine.stable ? ['log'] : ['verbose'],
});
app.use(serverTimingAndCache);
app.use(
graphqlUploadExpress({
// TODO: dynamic limit by quota
maxFileSize: 100 * 1024 * 1024,
maxFiles: 5,
})
);
app.useGlobalFilters(new ExceptionLogger());
app.use(cookieParser());
if (AFFiNE.flavor.sync) {
const SocketIoAdapter = app.get<Type<SocketIoAdapter>>(
SocketIoAdapterImpl,
{
strict: false,
}
);
const adapter = new SocketIoAdapter(app);
app.useWebSocketAdapter(adapter);
}
return app;
}

View File

@@ -1,26 +0,0 @@
import { FactoryProvider, Global, Module } from '@nestjs/common';
import { Redis } from 'ioredis';
import { Config } from '../config';
import { LocalCache } from './cache';
import { RedisCache } from './redis';
const CacheProvider: FactoryProvider = {
provide: LocalCache,
useFactory: (config: Config) => {
return config.redis.enabled
? new RedisCache(new Redis(config.redis))
: new LocalCache();
},
inject: [Config],
};
@Global()
@Module({
providers: [CacheProvider],
exports: [CacheProvider],
})
export class CacheModule {}
export { LocalCache as Cache };
export { CacheInterceptor, MakeCache, PreventCache } from './interceptor';

View File

@@ -0,0 +1,37 @@
// Convenient way to map environment variables to config values.
AFFiNE.ENV_MAP = {
AFFINE_SERVER_PORT: ['port', 'int'],
AFFINE_SERVER_HOST: 'host',
AFFINE_SERVER_SUB_PATH: 'path',
AFFINE_SERVER_HTTPS: ['https', 'boolean'],
DATABASE_URL: 'db.url',
ENABLE_CAPTCHA: ['auth.captcha.enable', 'boolean'],
CAPTCHA_TURNSTILE_SECRET: ['auth.captcha.turnstile.secret', 'string'],
OAUTH_GOOGLE_ENABLED: ['auth.oauthProviders.google.enabled', 'boolean'],
OAUTH_GOOGLE_CLIENT_ID: 'auth.oauthProviders.google.clientId',
OAUTH_GOOGLE_CLIENT_SECRET: 'auth.oauthProviders.google.clientSecret',
OAUTH_GITHUB_ENABLED: ['auth.oauthProviders.github.enabled', 'boolean'],
OAUTH_GITHUB_CLIENT_ID: 'auth.oauthProviders.github.clientId',
OAUTH_GITHUB_CLIENT_SECRET: 'auth.oauthProviders.github.clientSecret',
MAILER_HOST: 'mailer.host',
MAILER_PORT: ['mailer.port', 'int'],
MAILER_USER: 'mailer.auth.user',
MAILER_PASSWORD: 'mailer.auth.pass',
MAILER_SENDER: 'mailer.from.address',
MAILER_SECURE: ['mailer.secure', 'boolean'],
THROTTLE_TTL: ['rateLimiter.ttl', 'int'],
THROTTLE_LIMIT: ['rateLimiter.limit', 'int'],
REDIS_SERVER_HOST: 'plugins.redis.host',
REDIS_SERVER_PORT: ['plugins.redis.port', 'int'],
REDIS_SERVER_USER: 'plugins.redis.username',
REDIS_SERVER_PASSWORD: 'plugins.redis.password',
REDIS_SERVER_DATABASE: ['plugins.redis.db', 'int'],
DOC_MERGE_INTERVAL: ['doc.manager.updatePollInterval', 'int'],
DOC_MERGE_USE_JWST_CODEC: [
'doc.manager.experimentalMergeWithYOcto',
'boolean',
],
STRIPE_API_KEY: 'plugins.payment.stripe.keys.APIKey',
STRIPE_WEBHOOK_KEY: 'plugins.payment.stripe.keys.webhookKey',
FEATURES_EARLY_ACCESS_PREVIEW: ['featureFlags.earlyAccessPreview', 'boolean'],
};

View File

@@ -0,0 +1,54 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
// Custom configurations for AFFiNE Cloud
// ====================================================================================
// Q: WHY THIS FILE EXISTS?
// A: AFFiNE deployment environment may have a lot of custom environment variables,
// which are not suitable to be put in the `affine.ts` file.
// For example, AFFiNE Cloud Clusters are deployed on Google Cloud Platform.
// We need to enable the `gcloud` plugin to make sure the nodes working well,
// but the default selfhost version may not require it.
// So it's not a good idea to put such logic in the common `affine.ts` file.
//
// ```
// if (AFFiNE.deploy) {
// AFFiNE.plugins.use('gcloud');
// }
// ```
// ====================================================================================
const env = process.env;
AFFiNE.metrics.enabled = !AFFiNE.node.test;
if (env.R2_OBJECT_STORAGE_ACCOUNT_ID) {
AFFiNE.storage.providers.r2 = {
accountId: env.R2_OBJECT_STORAGE_ACCOUNT_ID,
credentials: {
accessKeyId: env.R2_OBJECT_STORAGE_ACCESS_KEY_ID!,
secretAccessKey: env.R2_OBJECT_STORAGE_SECRET_ACCESS_KEY!,
},
};
AFFiNE.storage.storages.avatar.provider = 'r2';
AFFiNE.storage.storages.avatar.bucket = 'account-avatar';
AFFiNE.storage.storages.avatar.publicLinkFactory = key =>
`https://avatar.affineassets.com/${key}`;
AFFiNE.storage.storages.blob.provider = 'r2';
AFFiNE.storage.storages.blob.bucket = `workspace-blobs-${
AFFiNE.affine.canary ? 'canary' : 'prod'
}`;
}
AFFiNE.plugins.use('redis');
AFFiNE.plugins.use('payment');
if (AFFiNE.deploy) {
AFFiNE.mailer = {
service: 'gmail',
auth: {
user: env.MAILER_USER,
pass: env.MAILER_PASSWORD,
},
};
AFFiNE.plugins.use('gcloud');
}

View File

@@ -0,0 +1,94 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
//
// ###############################################################
// ## AFFiNE Configuration System ##
// ###############################################################
// Here is the file of all AFFiNE configurations that will affect runtime behavior.
// Override any configuration here and it will be merged when starting the server.
// Any changes in this file won't take effect before server restarted.
//
//
// > Configurations merge order
// 1. load environment variables (`.env` if provided, and from system)
// 2. load `src/fundamentals/config/default.ts` for all default settings
// 3. apply `./affine.ts` patches (this file)
// 4. apply `./affine.env.ts` patches
//
//
// ###############################################################
// ## General settings ##
// ###############################################################
//
// /* The unique identity of the server */
// AFFiNE.serverId = 'some-randome-uuid';
//
// /* The name of AFFiNE Server, may show on the UI */
// AFFiNE.serverName = 'Your Cool AFFiNE Selfhosted Cloud';
//
// /* Whether the server is deployed behind a HTTPS proxied environment */
AFFiNE.https = false;
// /* Domain of your server that your server will be available at */
AFFiNE.host = 'localhost';
// /* The local port of your server that will listen on */
AFFiNE.port = 3010;
// /* The sub path of your server */
// /* For example, if you set `AFFiNE.path = '/affine'`, then the server will be available at `${domain}/affine` */
// AFFiNE.path = '/affine';
//
//
// ###############################################################
// ## Database settings ##
// ###############################################################
//
// /* The URL of the database where most of AFFiNE server data will be stored in */
// AFFiNE.db.url = 'postgres://user:passsword@localhost:5432/affine';
//
//
// ###############################################################
// ## Server Function settings ##
// ###############################################################
//
// /* Whether enable metrics and tracing while running the server */
// /* The metrics will be available at `http://localhost:9464/metrics` with [Prometheus] format exported */
// AFFiNE.metrics.enabled = true;
//
// /* GraphQL configurations that control the behavior of the Apollo Server behind */
// /* @see https://www.apollographql.com/docs/apollo-server/api/apollo-server */
// AFFiNE.graphql = {
// /* Path to mount GraphQL API */
// path: '/graphql',
// buildSchemaOptions: {
// numberScalarMode: 'integer',
// },
// /* Whether allow client to query the schema introspection */
// introspection: true,
// /* Whether enable GraphQL Playground UI */
// playground: true,
// }
//
// /* Doc Store & Collaberation */
// /* How long the buffer time of creating a new history snapshot when doc get updated */
// AFFiNE.doc.history.interval = 1000 * 60 * 10; // 10 minutes
//
// /* Use `y-octo` to merge updates at the same time when merging using Yjs */
// AFFiNE.doc.manager.experimentalMergeWithYOcto = true;
//
// /* How often the manager will start a new turn of merging pending updates into doc snapshot */
// AFFiNE.doc.manager.updatePollInterval = 1000 * 3;
//
//
// ###############################################################
// ## Plugins settings ##
// ###############################################################
//
// /* Redis Plugin */
// /* Provide caching and session storing backed by Redis. */
// /* Useful when you deploy AFFiNE server in a cluster. */
AFFiNE.plugins.use('redis', {
/* override options */
});
// /* Payment Plugin */
AFFiNE.plugins.use('payment', {
stripe: { keys: {}, apiVersion: '2023-10-16' },
});
//

View File

@@ -1,231 +0,0 @@
/// <reference types="../global.d.ts" />
import { createPrivateKey, createPublicKey } from 'node:crypto';
import { homedir } from 'node:os';
import { join } from 'node:path';
import parse from 'parse-duration';
import pkg from '../../package.json' assert { type: 'json' };
import type { AFFiNEConfig, ServerFlavor } from './def';
import { applyEnvToConfig } from './env';
export const SERVER_FLAVOR = (process.env.SERVER_FLAVOR ??
'allinone') as ServerFlavor;
// Don't use this in production
export const examplePrivateKey = `-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIEtyAJLIULkphVhqXqxk4Nr8Ggty3XLwUJWBxzAWCWTMoAoGCCqGSM49
AwEHoUQDQgAEF3U/0wIeJ3jRKXeFKqQyBKlr9F7xaAUScRrAuSP33rajm3cdfihI
3JvMxVNsS2lE8PSGQrvDrJZaDo0L+Lq9Gg==
-----END EC PRIVATE KEY-----`;
const jwtKeyPair = (function () {
const AUTH_PRIVATE_KEY = process.env.AUTH_PRIVATE_KEY ?? examplePrivateKey;
const privateKey = createPrivateKey({
key: Buffer.from(AUTH_PRIVATE_KEY),
format: 'pem',
type: 'sec1',
})
.export({
format: 'pem',
type: 'pkcs8',
})
.toString('utf8');
const publicKey = createPublicKey({
key: Buffer.from(AUTH_PRIVATE_KEY),
format: 'pem',
type: 'spki',
})
.export({
format: 'pem',
type: 'spki',
})
.toString('utf8');
return {
publicKey,
privateKey,
};
})();
export const getDefaultAFFiNEConfig: () => AFFiNEConfig = () => {
const defaultConfig = {
serverId: 'affine-nestjs-server',
version: pkg.version,
ENV_MAP: {
AFFINE_SERVER_PORT: ['port', 'int'],
AFFINE_SERVER_HOST: 'host',
AFFINE_SERVER_SUB_PATH: 'path',
AFFINE_ENV: 'affineEnv',
DATABASE_URL: 'db.url',
ENABLE_R2_OBJECT_STORAGE: ['objectStorage.r2.enabled', 'boolean'],
R2_OBJECT_STORAGE_ACCOUNT_ID: 'objectStorage.r2.accountId',
R2_OBJECT_STORAGE_ACCESS_KEY_ID: 'objectStorage.r2.accessKeyId',
R2_OBJECT_STORAGE_SECRET_ACCESS_KEY: 'objectStorage.r2.secretAccessKey',
R2_OBJECT_STORAGE_BUCKET: 'objectStorage.r2.bucket',
ENABLE_CAPTCHA: ['auth.captcha.enable', 'boolean'],
CAPTCHA_TURNSTILE_SECRET: ['auth.captcha.turnstile.secret', 'string'],
OAUTH_GOOGLE_ENABLED: ['auth.oauthProviders.google.enabled', 'boolean'],
OAUTH_GOOGLE_CLIENT_ID: 'auth.oauthProviders.google.clientId',
OAUTH_GOOGLE_CLIENT_SECRET: 'auth.oauthProviders.google.clientSecret',
OAUTH_GITHUB_ENABLED: ['auth.oauthProviders.github.enabled', 'boolean'],
OAUTH_GITHUB_CLIENT_ID: 'auth.oauthProviders.github.clientId',
OAUTH_GITHUB_CLIENT_SECRET: 'auth.oauthProviders.github.clientSecret',
OAUTH_EMAIL_LOGIN: 'auth.email.login',
OAUTH_EMAIL_SENDER: 'auth.email.sender',
OAUTH_EMAIL_SERVER: 'auth.email.server',
OAUTH_EMAIL_PORT: ['auth.email.port', 'int'],
OAUTH_EMAIL_PASSWORD: 'auth.email.password',
THROTTLE_TTL: ['rateLimiter.ttl', 'int'],
THROTTLE_LIMIT: ['rateLimiter.limit', 'int'],
REDIS_SERVER_ENABLED: ['redis.enabled', 'boolean'],
REDIS_SERVER_HOST: 'redis.host',
REDIS_SERVER_PORT: ['redis.port', 'int'],
REDIS_SERVER_USER: 'redis.username',
REDIS_SERVER_PASSWORD: 'redis.password',
REDIS_SERVER_DATABASE: ['redis.database', 'int'],
DOC_MERGE_INTERVAL: ['doc.manager.updatePollInterval', 'int'],
DOC_MERGE_USE_JWST_CODEC: [
'doc.manager.experimentalMergeWithJwstCodec',
'boolean',
],
ENABLE_LOCAL_EMAIL: ['auth.localEmail', 'boolean'],
STRIPE_API_KEY: 'payment.stripe.keys.APIKey',
STRIPE_WEBHOOK_KEY: 'payment.stripe.keys.webhookKey',
FEATURES_EARLY_ACCESS_PREVIEW: [
'featureFlags.earlyAccessPreview',
'boolean',
],
} satisfies AFFiNEConfig['ENV_MAP'],
affineEnv: 'dev',
get affine() {
const env = this.affineEnv;
return {
canary: env === 'dev',
beta: env === 'beta',
stable: env === 'production',
};
},
env: process.env.NODE_ENV ?? 'development',
get node() {
const env = this.env;
return {
prod: env === 'production',
dev: env === 'development',
test: env === 'test',
};
},
get deploy() {
return !this.node.dev && !this.node.test;
},
featureFlags: {
earlyAccessPreview: false,
},
get https() {
return !this.node.dev;
},
host: 'localhost',
port: 3010,
path: '',
db: {
url: '',
},
get origin() {
return this.node.dev
? 'http://localhost:8080'
: `${this.https ? 'https' : 'http'}://${this.host}${
this.host === 'localhost' ? `:${this.port}` : ''
}`;
},
get baseUrl() {
return `${this.origin}${this.path}`;
},
graphql: {
buildSchemaOptions: {
numberScalarMode: 'integer',
},
introspection: true,
playground: true,
},
auth: {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
accessTokenExpiresIn: parse('1h')! / 1000,
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
refreshTokenExpiresIn: parse('7d')! / 1000,
leeway: 60,
captcha: {
enable: false,
turnstile: {
secret: '1x0000000000000000000000000000000AA',
},
challenge: {
bits: 20,
},
},
privateKey: jwtKeyPair.privateKey,
publicKey: jwtKeyPair.publicKey,
enableSignup: true,
enableOauth: false,
get nextAuthSecret() {
return this.privateKey;
},
oauthProviders: {},
localEmail: false,
email: {
server: 'smtp.gmail.com',
port: 465,
login: '',
sender: '',
password: '',
},
},
objectStorage: {
r2: {
enabled: false,
bucket: '',
accountId: '',
accessKeyId: '',
secretAccessKey: '',
},
fs: {
path: join(homedir(), '.affine-storage'),
},
},
rateLimiter: {
ttl: 60,
limit: 60,
},
redis: {
enabled: false,
host: '127.0.0.1',
port: 6379,
username: '',
password: '',
database: 0,
},
doc: {
manager: {
enableUpdateAutoMerging: SERVER_FLAVOR !== 'sync',
updatePollInterval: 3000,
experimentalMergeWithJwstCodec: false,
},
history: {
interval: 1000 * 60 * 10 /* 10 mins */,
},
},
payment: {
stripe: {
keys: {
APIKey: '',
webhookKey: '',
},
apiVersion: '2023-10-16',
},
},
} satisfies AFFiNEConfig;
applyEnvToConfig(defaultConfig);
return defaultConfig;
};

View File

@@ -1,17 +0,0 @@
import { set } from 'lodash-es';
import { type AFFiNEConfig, parseEnvValue } from './def';
export function applyEnvToConfig(rawConfig: AFFiNEConfig) {
for (const env in rawConfig.ENV_MAP) {
const config = rawConfig.ENV_MAP[env];
const [path, value] =
typeof config === 'string'
? [config, process.env[env]]
: [config[0], parseEnvValue(process.env[env], config[1])];
if (value !== undefined) {
set(rawConfig, path, value);
}
}
}

View File

@@ -1,3 +0,0 @@
export const OPERATION_NAME = 'x-operation-name';
export const REQUEST_ID = 'x-request-id';

View File

@@ -10,8 +10,10 @@ import { Reflector } from '@nestjs/core';
import type { NextAuthOptions } from 'next-auth';
import { AuthHandler } from 'next-auth/core';
import { PrismaService } from '../../prisma';
import { getRequestResponseFromContext } from '../../utils/nestjs';
import {
getRequestResponseFromContext,
PrismaService,
} from '../../fundamentals';
import { NextAuthOptionsProvide } from './next-auth-options';
import { AuthService } from './service';

View File

@@ -1,7 +1,5 @@
import { Global, Module } from '@nestjs/common';
import { SessionModule } from '../../session';
import { MAILER, MailService } from './mailer';
import { NextAuthController } from './next-auth.controller';
import { NextAuthOptionsProvider } from './next-auth-options';
import { AuthResolver } from './resolver';
@@ -9,18 +7,12 @@ import { AuthService } from './service';
@Global()
@Module({
imports: [SessionModule],
providers: [
AuthService,
AuthResolver,
NextAuthOptionsProvider,
MAILER,
MailService,
],
exports: [AuthService, NextAuthOptionsProvider, MailService],
providers: [AuthService, AuthResolver, NextAuthOptionsProvider],
exports: [AuthService, NextAuthOptionsProvider],
controllers: [NextAuthController],
})
export class AuthModule {}
export * from './guard';
export { TokenType } from './resolver';
export { AuthService };

View File

@@ -8,12 +8,14 @@ import Email from 'next-auth/providers/email';
import Github from 'next-auth/providers/github';
import Google from 'next-auth/providers/google';
import { Config } from '../../config';
import { PrismaService } from '../../prisma';
import { SessionService } from '../../session';
import {
Config,
MailService,
PrismaService,
SessionService,
} from '../../fundamentals';
import { FeatureType } from '../features';
import { Quota_FreePlanV1 } from '../quota';
import { MailService } from './mailer';
import { Quota_FreePlanV1_1 } from '../quota';
import {
decode,
encode,
@@ -50,7 +52,7 @@ export const NextAuthOptionsProvider: FactoryProvider<NextAuthOptions> = {
activated: true,
feature: {
connect: {
feature_version: Quota_FreePlanV1,
feature_version: Quota_FreePlanV1_1,
},
},
},
@@ -94,28 +96,28 @@ export const NextAuthOptionsProvider: FactoryProvider<NextAuthOptions> = {
}
return result;
};
prismaAdapter.createVerificationToken = async data => {
await session.set(
`${data.identifier}:${data.token}`,
Date.now() + session.sessionTtl
);
return data;
};
prismaAdapter.useVerificationToken = async ({ identifier, token }) => {
const expires = await session.get(`${identifier}:${token}`);
if (expires) {
return { identifier, token, expires: new Date(expires) };
} else {
return null;
}
};
const nextAuthOptions: NextAuthOptions = {
providers: [
// @ts-expect-error esm interop issue
Email.default({
server: {
host: config.auth.email.server,
port: config.auth.email.port,
auth: {
user: config.auth.email.login,
pass: config.auth.email.password,
},
},
from: config.auth.email.sender,
sendVerificationRequest: (params: SendVerificationRequestParams) =>
sendVerificationRequest(config, logger, mailer, session, params),
}),
],
providers: [],
adapter: prismaAdapter,
debug: !config.node.prod,
session: {
strategy: 'database',
},
logger: {
debug(code, metadata) {
logger.debug(`${code}: ${JSON.stringify(metadata)}`);
@@ -168,6 +170,16 @@ export const NextAuthOptionsProvider: FactoryProvider<NextAuthOptions> = {
})
);
if (config.mailer && mailer) {
nextAuthOptions.providers.push(
// @ts-expect-error esm interop issue
Email.default({
sendVerificationRequest: (params: SendVerificationRequestParams) =>
sendVerificationRequest(config, logger, mailer, session, params),
})
);
}
if (config.auth.oauthProviders.github) {
nextAuthOptions.providers.push(
// @ts-expect-error esm interop issue
@@ -179,7 +191,7 @@ export const NextAuthOptionsProvider: FactoryProvider<NextAuthOptions> = {
);
}
if (config.auth.oauthProviders.google) {
if (config.auth.oauthProviders.google?.enabled) {
nextAuthOptions.providers.push(
// @ts-expect-error esm interop issue
Google.default({
@@ -194,6 +206,11 @@ export const NextAuthOptionsProvider: FactoryProvider<NextAuthOptions> = {
);
}
if (nextAuthOptions.providers.length > 1) {
// not only credentials provider
nextAuthOptions.session = { strategy: 'database' };
}
nextAuthOptions.jwt = {
encode: async ({ token, maxAge }) =>
encode(config, prisma, token, maxAge),

View File

@@ -22,11 +22,14 @@ import { nanoid } from 'nanoid';
import type { AuthAction, CookieOption, NextAuthOptions } from 'next-auth';
import { AuthHandler } from 'next-auth/core';
import { Config } from '../../config';
import { metrics } from '../../metrics';
import { PrismaService } from '../../prisma/service';
import { SessionService } from '../../session';
import { AuthThrottlerGuard, Throttle } from '../../throttler';
import {
AuthThrottlerGuard,
Config,
metrics,
PrismaService,
SessionService,
Throttle,
} from '../../fundamentals';
import { NextAuthOptionsProvide } from './next-auth-options';
import { AuthService } from './service';
@@ -186,15 +189,17 @@ export class NextAuthController {
}
let nextAuthTokenCookie: (CookieOption & { value: string }) | undefined;
const cookiePrefix = this.config.node.prod ? '__Secure-' : '';
const sessionCookieName = `${cookiePrefix}next-auth.session-token`;
const secureCookiePrefix = '__Secure-';
const sessionCookieName = `next-auth.session-token`;
// next-auth credentials login only support JWT strategy
// https://next-auth.js.org/configuration/providers/credentials
// let's store the session token in the database
if (
credentialsSignIn &&
(nextAuthTokenCookie = cookies?.find(
({ name }) => name === sessionCookieName
({ name }) =>
name === sessionCookieName ||
name === `${secureCookiePrefix}${sessionCookieName}`
))
) {
const cookieExpires = new Date();

View File

@@ -16,9 +16,12 @@ import {
import type { Request } from 'express';
import { nanoid } from 'nanoid';
import { Config } from '../../config';
import { SessionService } from '../../session';
import { CloudThrottlerGuard, Throttle } from '../../throttler';
import {
CloudThrottlerGuard,
Config,
SessionService,
Throttle,
} from '../../fundamentals';
import { UserType } from '../users';
import { Auth, CurrentUser } from './guard';
import { AuthService } from './service';
@@ -167,8 +170,13 @@ export class AuthResolver {
@CurrentUser() user: UserType,
@Args('token') token: string
) {
const key = await this.session.get(token);
if (!key) {
throw new ForbiddenException('Invalid token');
}
// email has set token in `sendVerifyChangeEmail`
const [id, email] = (await this.session.get(token)).split(',');
const [id, email] = key.split(',');
if (!id || id !== user.id || !email) {
throw new ForbiddenException('Invalid token');
}

View File

@@ -11,11 +11,13 @@ import { Algorithm, sign, verify as jwtVerify } from '@node-rs/jsonwebtoken';
import type { User } from '@prisma/client';
import { nanoid } from 'nanoid';
import { Config } from '../../config';
import { PrismaService } from '../../prisma';
import { verifyChallengeResponse } from '../../storage';
import { Quota_FreePlanV1 } from '../quota';
import { MailService } from './mailer';
import {
Config,
MailService,
PrismaService,
verifyChallengeResponse,
} from '../../fundamentals';
import { Quota_FreePlanV1_1 } from '../quota';
export type UserClaim = Pick<
User,
@@ -51,7 +53,7 @@ export class AuthService {
exp: now + this.config.auth.accessTokenExpiresIn,
iss: this.config.serverId,
sub: user.id,
aud: user.name,
aud: 'https://affine.pro',
jti: randomUUID({
disableEntropyCache: true,
}),
@@ -80,7 +82,7 @@ export class AuthService {
iat: now,
iss: this.config.serverId,
sub: user.id,
aud: user.name,
aud: 'https://affine.pro',
jti: randomUUID({
disableEntropyCache: true,
}),
@@ -100,6 +102,7 @@ export class AuthService {
iss: [this.config.serverId],
leeway: this.config.auth.leeway,
requiredSpecClaims: ['exp', 'iat', 'iss', 'sub'],
aud: ['https://affine.pro'],
})
).data as UserClaim;
@@ -133,7 +136,7 @@ export class AuthService {
return (
!!outcome.success &&
// skip hostname check in dev mode
(this.config.affineEnv === 'dev' || outcome.hostname === this.config.host)
(this.config.node.dev || outcome.hostname === this.config.host)
);
}
@@ -191,13 +194,14 @@ export class AuthService {
name,
email,
password: hashedPassword,
// TODO(@forehalo): handle in event system
features: {
create: {
reason: 'created by api sign up',
activated: true,
feature: {
connect: {
feature_version: Quota_FreePlanV1,
feature_version: Quota_FreePlanV1_1,
},
},
},
@@ -227,7 +231,7 @@ export class AuthService {
activated: true,
feature: {
connect: {
feature_version: Quota_FreePlanV1,
feature_version: Quota_FreePlanV1_1,
},
},
},

View File

@@ -4,8 +4,7 @@ import { BadRequestException } from '@nestjs/common';
import { Algorithm, sign, verify as jwtVerify } from '@node-rs/jsonwebtoken';
import { JWT } from 'next-auth/jwt';
import { Config } from '../../../config';
import { PrismaService } from '../../../prisma';
import { Config, PrismaService } from '../../../fundamentals';
import { getUtcTimestamp, UserClaim } from '../service';
export const jwtEncode = async (
@@ -38,7 +37,7 @@ export const jwtEncode = async (
exp: now + (maxAge ?? config.auth.accessTokenExpiresIn),
iss: config.serverId,
sub: user.id,
aud: user.name,
aud: 'https://affine.pro',
jti: randomUUID({
disableEntropyCache: true,
}),

View File

@@ -2,9 +2,7 @@ import { Logger } from '@nestjs/common';
import { nanoid } from 'nanoid';
import type { SendVerificationRequestParams } from 'next-auth/providers/email';
import { Config } from '../../../config';
import { SessionService } from '../../../session';
import { MailService } from '../mailer';
import { Config, MailService, SessionService } from '../../../fundamentals';
export async function sendVerificationRequest(
config: Config,
@@ -13,7 +11,7 @@ export async function sendVerificationRequest(
session: SessionService,
params: SendVerificationRequestParams
) {
const { identifier, url, provider } = params;
const { identifier, url } = params;
const urlWithToken = new URL(url);
const callbackUrl = urlWithToken.searchParams.get('callbackUrl') || '';
if (!callbackUrl) {
@@ -30,7 +28,6 @@ export async function sendVerificationRequest(
const result = await mailer.sendSignInEmail(urlWithToken.toString(), {
to: identifier,
from: provider.from,
});
logger.log(`send verification email success: ${result.accepted.join(', ')}`);

View File

@@ -0,0 +1,71 @@
import { Module } from '@nestjs/common';
import { Field, ObjectType, Query, registerEnumType } from '@nestjs/graphql';
import { DeploymentType } from '../fundamentals';
export enum ServerFeature {
Payment = 'payment',
}
registerEnumType(ServerFeature, {
name: 'ServerFeature',
});
registerEnumType(DeploymentType, {
name: 'ServerDeploymentType',
});
const ENABLED_FEATURES: ServerFeature[] = [];
export function ADD_ENABLED_FEATURES(feature: ServerFeature) {
ENABLED_FEATURES.push(feature);
}
@ObjectType()
export class ServerConfigType {
@Field({
description:
'server identical name could be shown as badge on user interface',
})
name!: string;
@Field({ description: 'server version' })
version!: string;
@Field({ description: 'server base url' })
baseUrl!: string;
@Field(() => DeploymentType, { description: 'server type' })
type!: DeploymentType;
/**
* @deprecated
*/
@Field({ description: 'server flavor', deprecationReason: 'use `features`' })
flavor!: string;
@Field(() => [ServerFeature], { description: 'enabled server features' })
features!: ServerFeature[];
}
export class ServerConfigResolver {
@Query(() => ServerConfigType, {
description: 'server config',
})
serverConfig(): ServerConfigType {
return {
name: AFFiNE.serverName,
version: AFFiNE.version,
baseUrl: AFFiNE.baseUrl,
type: AFFiNE.type,
// BACKWARD COMPATIBILITY
// the old flavors contains `selfhosted` but it actually not flavor but deployment type
// this field should be removed after frontend feature flags implemented
flavor: AFFiNE.type,
features: ENABLED_FEATURES,
};
}
}
@Module({
providers: [ServerConfigResolver],
})
export class ServerConfigModule {}

View File

@@ -3,10 +3,13 @@ import { isDeepStrictEqual } from 'node:util';
import { Injectable, Logger } from '@nestjs/common';
import { Cron, CronExpression } from '@nestjs/schedule';
import { Config } from '../../config';
import { type EventPayload, OnEvent } from '../../event';
import { metrics } from '../../metrics';
import { PrismaService } from '../../prisma';
import {
Config,
type EventPayload,
metrics,
OnEvent,
PrismaService,
} from '../../fundamentals';
import { QuotaService } from '../quota';
import { Permission } from '../workspaces/types';
import { isEmptyBuffer } from './manager';

View File

@@ -4,24 +4,29 @@ import {
OnModuleDestroy,
OnModuleInit,
} from '@nestjs/common';
import { Cron, CronExpression } from '@nestjs/schedule';
import { Snapshot, Update } from '@prisma/client';
import { chunk } from 'lodash-es';
import { defer, retry } from 'rxjs';
import {
applyUpdate,
decodeStateVector,
Doc,
encodeStateAsUpdate,
encodeStateVector,
transact,
} from 'yjs';
import { Cache } from '../../cache';
import { Config } from '../../config';
import { EventEmitter, type EventPayload, OnEvent } from '../../event';
import { metrics } from '../../metrics/metrics';
import { PrismaService } from '../../prisma';
import { mergeUpdatesInApplyWay as jwstMergeUpdates } from '../../storage';
import {
Cache,
CallTimer,
Config,
EventEmitter,
type EventPayload,
mergeUpdatesInApplyWay as jwstMergeUpdates,
metrics,
OnEvent,
PrismaService,
} from '../../fundamentals';
function compare(yBinary: Buffer, jwstBinary: Buffer, strict = false): boolean {
if (yBinary.equals(jwstBinary)) {
@@ -40,36 +45,6 @@ function compare(yBinary: Buffer, jwstBinary: Buffer, strict = false): boolean {
return compare(yBinary, yBinary2, true);
}
/**
* Detect whether rhs state is newer than lhs state.
*
* How could we tell a state is newer:
*
* i. if the state vector size is larger, it's newer
* ii. if the state vector size is same, compare each client's state
*/
function isStateNewer(lhs: Buffer, rhs: Buffer): boolean {
const lhsVector = decodeStateVector(lhs);
const rhsVector = decodeStateVector(rhs);
if (lhsVector.size < rhsVector.size) {
return true;
}
for (const [client, state] of lhsVector) {
const rstate = rhsVector.get(client);
if (!rstate) {
return false;
}
if (state < rstate) {
return true;
}
}
return false;
}
export function isEmptyBuffer(buf: Buffer): boolean {
return (
buf.length === 0 ||
@@ -79,6 +54,7 @@ export function isEmptyBuffer(buf: Buffer): boolean {
}
const MAX_SEQ_NUM = 0x3fffffff; // u31
const UPDATES_QUEUE_CACHE_KEY = 'doc:manager:updates';
/**
* Since we can't directly save all client updates into database, in which way the database will overload,
@@ -113,6 +89,7 @@ export class DocManager implements OnModuleInit, OnModuleDestroy {
this.destroy();
}
@CallTimer('doc', 'yjs_recover_updates_to_doc')
private recoverDoc(...updates: Buffer[]): Promise<Doc> {
const doc = new Doc();
const chunks = chunk(updates, 10);
@@ -148,11 +125,7 @@ export class DocManager implements OnModuleInit, OnModuleDestroy {
const doc = await this.recoverDoc(...updates);
// test jwst codec
if (
this.config.affine.canary &&
this.config.doc.manager.experimentalMergeWithJwstCodec &&
updates.length < 100 /* avoid overloading */
) {
if (this.config.doc.manager.experimentalMergeWithYOcto) {
metrics.jwst.counter('codec_merge_counter').add(1);
const yjsResult = Buffer.from(encodeStateAsUpdate(doc));
let log = false;
@@ -203,7 +176,7 @@ export class DocManager implements OnModuleInit, OnModuleDestroy {
}, this.config.doc.manager.updatePollInterval);
this.logger.log('Automation started');
if (this.config.doc.manager.experimentalMergeWithJwstCodec) {
if (this.config.doc.manager.experimentalMergeWithYOcto) {
this.logger.warn(
'Experimental feature enabled: merge updates with jwst codec is enabled'
);
@@ -376,7 +349,7 @@ export class DocManager implements OnModuleInit, OnModuleDestroy {
const updates = await this.getUpdates(workspaceId, guid);
if (updates.length) {
const doc = await this.squash(updates, snapshot);
const doc = await this.squash(snapshot, updates);
return Buffer.from(encodeStateVector(doc));
}
@@ -409,7 +382,7 @@ export class DocManager implements OnModuleInit, OnModuleDestroy {
// take it ease, we don't want to overload db and or cpu
// if we limit the taken number here,
// user will never see the latest doc if there are too many updates pending to be merged.
take: 100,
take: this.config.doc.manager.maxUpdatesPullCount,
});
// perf(memory): avoid sorting in db
@@ -457,80 +430,92 @@ export class DocManager implements OnModuleInit, OnModuleDestroy {
});
}
/**
* @returns whether the snapshot is updated to the latest, `undefined` means the doc to be upserted is outdated.
*/
@CallTimer('doc', 'upsert')
private async upsert(
workspaceId: string,
guid: string,
doc: Doc,
// we always delay the snapshot update to avoid db overload,
// so the value of `updatedAt` will not be accurate to user's real action time
// so the value of auto updated `updatedAt` by db will never be accurate to user's real action time
updatedAt: Date,
initialSeq?: number
seq: number
) {
return this.lockSnapshotForUpsert(workspaceId, guid, async () => {
const blob = Buffer.from(encodeStateAsUpdate(doc));
const blob = Buffer.from(encodeStateAsUpdate(doc));
if (isEmptyBuffer(blob)) {
return false;
if (isEmptyBuffer(blob)) {
return undefined;
}
const state = Buffer.from(encodeStateVector(doc));
// CONCERNS:
// i. Because we save the real user's last seen action time as `updatedAt`,
// it's possible to simply compare the `updatedAt` to determine if the snapshot is older than the one we are going to save.
//
// ii. Prisma doesn't support `upsert` with additional `where` condition along side unique constraint.
// In our case, we need to manually check the `updatedAt` to avoid overriding the newer snapshot.
// where: { id_workspaceId: {}, updatedAt: { lt: updatedAt } }
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//
// iii. Only set the seq number when creating the snapshot.
// For updating scenario, the seq number will be updated when updates pushed to db.
try {
const result: { updatedAt: Date }[] = await this.db.$queryRaw`
INSERT INTO "snapshots" ("workspace_id", "guid", "blob", "state", "seq", "created_at", "updated_at")
VALUES (${workspaceId}, ${guid}, ${blob}, ${state}, ${seq}, DEFAULT, ${updatedAt})
ON CONFLICT ("workspace_id", "guid")
DO UPDATE SET "blob" = ${blob}, "state" = ${state}, "updated_at" = ${updatedAt}, "seq" = ${seq}
WHERE "snapshots"."workspace_id" = ${workspaceId} AND "snapshots"."guid" = ${guid} AND "snapshots"."updated_at" <= ${updatedAt}
RETURNING "snapshots"."workspace_id" as "workspaceId", "snapshots"."guid" as "id", "snapshots"."updated_at" as "updatedAt"
`;
// const result = await this.db.snapshot.upsert({
// select: {
// updatedAt: true,
// seq: true,
// },
// where: {
// id_workspaceId: {
// workspaceId,
// id: guid,
// },
// ⬇️ NOT SUPPORTED BY PRISMA YET
// updatedAt: {
// lt: updatedAt,
// },
// },
// update: {
// blob,
// state,
// updatedAt,
// },
// create: {
// workspaceId,
// id: guid,
// blob,
// state,
// updatedAt,
// seq,
// },
// });
// if the condition `snapshot.updatedAt > updatedAt` is true, by which means the snapshot has already been updated by other process,
// the updates has been applied to current `doc` must have been seen by the other process as well.
// The `updatedSnapshot` will be `undefined` in this case.
const updatedSnapshot = result.at(0);
if (!updatedSnapshot) {
return undefined;
}
const state = Buffer.from(encodeStateVector(doc));
return await this.db.$transaction(async db => {
const snapshot = await db.snapshot.findUnique({
where: {
id_workspaceId: {
id: guid,
workspaceId,
},
},
});
// update
if (snapshot) {
// only update if state is newer
if (isStateNewer(snapshot.state ?? Buffer.from([0]), state)) {
await db.snapshot.update({
select: {
seq: true,
},
where: {
id_workspaceId: {
workspaceId,
id: guid,
},
},
data: {
blob,
state,
updatedAt,
},
});
return true;
} else {
return false;
}
} else {
// create
await db.snapshot.create({
select: {
seq: true,
},
data: {
id: guid,
workspaceId,
blob,
state,
seq: initialSeq,
createdAt: updatedAt,
updatedAt,
},
});
return true;
}
});
});
return true;
} catch (e) {
this.logger.error('Failed to upsert snapshot', e);
return false;
}
}
private async _get(
@@ -542,7 +527,7 @@ export class DocManager implements OnModuleInit, OnModuleDestroy {
if (updates.length) {
return {
doc: await this.squash(updates, snapshot),
doc: await this.squash(snapshot, updates),
};
}
@@ -553,17 +538,17 @@ export class DocManager implements OnModuleInit, OnModuleDestroy {
* Squash updates into a single update and save it as snapshot,
* and delete the updates records at the same time.
*/
private async squash(updates: Update[], snapshot: Snapshot | null) {
@CallTimer('doc', 'squash')
private async squash(snapshot: Snapshot | null, updates: Update[]) {
if (!updates.length) {
throw new Error('No updates to squash');
}
const first = updates[0];
const last = updates[updates.length - 1];
const { id, workspaceId } = first;
const last = updates[updates.length - 1];
const { id, workspaceId } = last;
const doc = await this.applyUpdates(
first.id,
id,
snapshot ? snapshot.blob : Buffer.from([0, 0]),
...updates.map(u => u.blob)
);
@@ -594,19 +579,24 @@ export class DocManager implements OnModuleInit, OnModuleDestroy {
);
}
// always delete updates
// the upsert will return false if the state is not newer, so we don't need to worry about it
const { count } = await this.db.update.deleteMany({
where: {
id,
workspaceId,
seq: {
in: updates.map(u => u.seq),
// we will keep the updates only if the upsert failed on unknown reason
// `done === undefined` means the updates is outdated(have already been merged by other process), safe to be deleted
// `done === true` means the upsert is successful, safe to be deleted
if (done !== false) {
// always delete updates
// the upsert will return false if the state is not newer, so we don't need to worry about it
const { count } = await this.db.update.deleteMany({
where: {
id,
workspaceId,
seq: {
in: updates.map(u => u.seq),
},
},
},
});
});
await this.updateCachedUpdatesCount(workspaceId, id, -count);
await this.updateCachedUpdatesCount(workspaceId, id, -count);
}
return doc;
}
@@ -663,26 +653,44 @@ export class DocManager implements OnModuleInit, OnModuleDestroy {
count: number
) {
const result = await this.cache.mapIncrease(
`doc:manager:updates`,
UPDATES_QUEUE_CACHE_KEY,
`${workspaceId}::${guid}`,
count
);
if (result <= 0) {
await this.cache.mapDelete(
`doc:manager:updates`,
UPDATES_QUEUE_CACHE_KEY,
`${workspaceId}::${guid}`
);
}
}
private async getAutoSquashCandidateFromCache() {
const key = await this.cache.mapRandomKey('doc:manager:updates');
const key = await this.cache.mapRandomKey(UPDATES_QUEUE_CACHE_KEY);
if (key) {
const count = await this.cache.mapGet<number>('doc:manager:updates', key);
if (typeof count === 'number' && count > 0) {
const cachedCount = await this.cache.mapIncrease(
UPDATES_QUEUE_CACHE_KEY,
key,
0
);
if (cachedCount > 0) {
const [workspaceId, id] = key.split('::');
const count = await this.db.update.count({
where: {
workspaceId,
id,
},
});
// FIXME(@forehalo): somehow the update count in cache is not accurate
if (count === 0) {
await this.cache.mapDelete(UPDATES_QUEUE_CACHE_KEY, key);
return null;
}
return { id, workspaceId };
}
}
@@ -690,22 +698,38 @@ export class DocManager implements OnModuleInit, OnModuleDestroy {
return null;
}
private async doWithLock<T>(lock: string, job: () => Promise<T>) {
private async doWithLock<T>(
lockScope: string,
lockResource: string,
job: () => Promise<T>
) {
const lock = `lock:${lockScope}:${lockResource}`;
const acquired = await this.cache.setnx(lock, 1, {
ttl: 60 * 1000,
});
metrics.doc.counter('lock').add(1, { scope: lockScope });
if (!acquired) {
metrics.doc.counter('lock_failed').add(1, { scope: lockScope });
return;
}
metrics.doc.counter('lock_required').add(1, { scope: lockScope });
try {
return await job();
} finally {
await this.cache.delete(lock).catch(e => {
// safe, the lock will be expired when ttl ends
this.logger.error(`Failed to release lock ${lock}`, e);
});
await this.cache
.delete(lock)
.then(() => {
metrics.doc.counter('lock_released').add(1, { scope: lockScope });
})
.catch(e => {
metrics.doc
.counter('lock_release_failed')
.add(1, { scope: lockScope });
// safe, the lock will be expired when ttl ends
this.logger.error(`Failed to release lock ${lock}`, e);
});
}
}
@@ -715,19 +739,16 @@ export class DocManager implements OnModuleInit, OnModuleDestroy {
job: () => Promise<T>
) {
return this.doWithLock(
`doc:manager:updates-lock:${workspaceId}::${guid}`,
'doc:manager:updates',
`${workspaceId}::${guid}`,
job
);
}
async lockSnapshotForUpsert<T>(
workspaceId: string,
guid: string,
job: () => Promise<T>
) {
return this.doWithLock(
`doc:manager:snapshot-lock:${workspaceId}::${guid}`,
job
);
@Cron(CronExpression.EVERY_MINUTE)
async reportUpdatesQueueCount() {
metrics.doc
.gauge('updates_queue_count')
.record(await this.db.update.count());
}
}

View File

@@ -1,4 +1,5 @@
import { PrismaService } from '../../prisma';
import { PrismaClient } from '@prisma/client';
import { Feature, FeatureSchema, FeatureType } from './types';
class FeatureConfig {
@@ -19,7 +20,20 @@ class FeatureConfig {
}
}
export class CopilotFeatureConfig extends FeatureConfig {
override config!: Feature & { feature: FeatureType.Copilot };
constructor(data: any) {
super(data);
if (this.config.feature !== FeatureType.Copilot) {
throw new Error('Invalid feature config: type is not Copilot');
}
}
}
export class EarlyAccessFeatureConfig extends FeatureConfig {
override config!: Feature & { feature: FeatureType.EarlyAccess };
constructor(data: any) {
super(data);
@@ -27,27 +41,33 @@ export class EarlyAccessFeatureConfig extends FeatureConfig {
throw new Error('Invalid feature config: type is not EarlyAccess');
}
}
}
checkWhiteList(email: string) {
for (const domain in this.config.configs.whitelist) {
if (email.endsWith(domain)) {
return true;
}
export class UnlimitedWorkspaceFeatureConfig extends FeatureConfig {
override config!: Feature & { feature: FeatureType.UnlimitedWorkspace };
constructor(data: any) {
super(data);
if (this.config.feature !== FeatureType.UnlimitedWorkspace) {
throw new Error('Invalid feature config: type is not UnlimitedWorkspace');
}
return false;
}
}
const FeatureConfigMap = {
[FeatureType.Copilot]: CopilotFeatureConfig,
[FeatureType.EarlyAccess]: EarlyAccessFeatureConfig,
[FeatureType.UnlimitedWorkspace]: UnlimitedWorkspaceFeatureConfig,
};
const FeatureCache = new Map<
number,
InstanceType<(typeof FeatureConfigMap)[FeatureType]>
>();
export type FeatureConfigType<F extends FeatureType> = InstanceType<
(typeof FeatureConfigMap)[F]
>;
export async function getFeature(prisma: PrismaService, featureId: number) {
const FeatureCache = new Map<number, FeatureConfigType<FeatureType>>();
export async function getFeature(prisma: PrismaClient, featureId: number) {
const cachedQuota = FeatureCache.get(featureId);
if (cachedQuota) {

View File

@@ -1,6 +1,5 @@
import { Module } from '@nestjs/common';
import { PrismaService } from '../../prisma';
import { FeatureManagementService } from './management';
import { FeatureService } from './service';
@@ -18,4 +17,4 @@ export class FeatureModule {}
export { type CommonFeature, commonFeatureSchema } from './types';
export { FeatureKind, Features, FeatureType } from './types';
export { FeatureManagementService, FeatureService, PrismaService };
export { FeatureManagementService, FeatureService };

View File

@@ -0,0 +1,114 @@
import { Injectable, Logger } from '@nestjs/common';
import { Config, PrismaService } from '../../fundamentals';
import { FeatureService } from './service';
import { FeatureType } from './types';
const STAFF = ['@toeverything.info'];
@Injectable()
export class FeatureManagementService {
protected logger = new Logger(FeatureManagementService.name);
constructor(
private readonly feature: FeatureService,
private readonly prisma: PrismaService,
private readonly config: Config
) {}
// ======== Admin ========
// todo(@darkskygit): replace this with abac
isStaff(email: string) {
for (const domain of STAFF) {
if (email.endsWith(domain)) {
return true;
}
}
return false;
}
// ======== Early Access ========
async addEarlyAccess(userId: string) {
return this.feature.addUserFeature(
userId,
FeatureType.EarlyAccess,
2,
'Early access user'
);
}
async removeEarlyAccess(userId: string) {
return this.feature.removeUserFeature(userId, FeatureType.EarlyAccess);
}
async listEarlyAccess() {
return this.feature.listFeatureUsers(FeatureType.EarlyAccess);
}
async isEarlyAccessUser(email: string) {
const user = await this.prisma.user.findFirst({
where: {
email,
},
});
if (user) {
const canEarlyAccess = await this.feature
.hasUserFeature(user.id, FeatureType.EarlyAccess)
.catch(() => false);
return canEarlyAccess;
}
return false;
}
/// check early access by email
async canEarlyAccess(email: string) {
if (this.config.featureFlags.earlyAccessPreview && !this.isStaff(email)) {
return this.isEarlyAccessUser(email);
} else {
return true;
}
}
// ======== Workspace Feature ========
async addWorkspaceFeatures(
workspaceId: string,
feature: FeatureType,
version?: number,
reason?: string
) {
const latestVersions = await this.feature.getFeaturesVersion();
// use latest version if not specified
const latestVersion = version || latestVersions[feature];
if (!Number.isInteger(latestVersion)) {
throw new Error(`Version of feature ${feature} not found`);
}
return this.feature.addWorkspaceFeature(
workspaceId,
feature,
latestVersion,
reason || 'add feature by api'
);
}
async getWorkspaceFeatures(workspaceId: string) {
const features = await this.feature.getWorkspaceFeatures(workspaceId);
return features.filter(f => f.activated).map(f => f.feature.name);
}
async hasWorkspaceFeature(workspaceId: string, feature: FeatureType) {
return this.feature.hasWorkspaceFeature(workspaceId, feature);
}
async removeWorkspaceFeature(workspaceId: string, feature: FeatureType) {
return this.feature
.removeWorkspaceFeature(workspaceId, feature)
.then(c => c > 0);
}
async listFeatureWorkspaces(feature: FeatureType) {
return this.feature.listFeatureWorkspaces(feature);
}
}

View File

@@ -0,0 +1,342 @@
import { Injectable } from '@nestjs/common';
import { PrismaService } from '../../fundamentals';
import { UserType } from '../users/types';
import { WorkspaceType } from '../workspaces/types';
import { FeatureConfigType, getFeature } from './feature';
import { FeatureKind, FeatureType } from './types';
@Injectable()
export class FeatureService {
constructor(private readonly prisma: PrismaService) {}
async getFeaturesVersion() {
const features = await this.prisma.features.findMany({
where: {
type: FeatureKind.Feature,
},
select: {
feature: true,
version: true,
},
});
return features.reduce(
(acc, feature) => {
// only keep the latest version
if (acc[feature.feature]) {
if (acc[feature.feature] < feature.version) {
acc[feature.feature] = feature.version;
}
} else {
acc[feature.feature] = feature.version;
}
return acc;
},
{} as Record<string, number>
);
}
async getFeature<F extends FeatureType>(
feature: F
): Promise<FeatureConfigType<F> | undefined> {
const data = await this.prisma.features.findFirst({
where: {
feature,
type: FeatureKind.Feature,
},
select: { id: true },
orderBy: {
version: 'desc',
},
});
if (data) {
return getFeature(this.prisma, data.id) as FeatureConfigType<F>;
}
return undefined;
}
// ======== User Features ========
async addUserFeature(
userId: string,
feature: FeatureType,
version: number,
reason: string,
expiredAt?: Date | string
) {
return this.prisma.$transaction(async tx => {
const latestFlag = await tx.userFeatures.findFirst({
where: {
userId,
feature: {
feature,
type: FeatureKind.Feature,
},
activated: true,
},
orderBy: {
createdAt: 'desc',
},
});
if (latestFlag) {
return latestFlag.id;
} else {
return tx.userFeatures
.create({
data: {
reason,
expiredAt,
activated: true,
user: {
connect: {
id: userId,
},
},
feature: {
connect: {
feature_version: {
feature,
version,
},
type: FeatureKind.Feature,
},
},
},
})
.then(r => r.id);
}
});
}
async removeUserFeature(userId: string, feature: FeatureType) {
return this.prisma.userFeatures
.updateMany({
where: {
userId,
feature: {
feature,
type: FeatureKind.Feature,
},
activated: true,
},
data: {
activated: false,
},
})
.then(r => r.count);
}
/**
* get user's features, will included inactivated features
* @param userId user id
* @returns list of features
*/
async getUserFeatures(userId: string) {
const features = await this.prisma.userFeatures.findMany({
where: {
user: { id: userId },
feature: {
type: FeatureKind.Feature,
},
},
select: {
activated: true,
reason: true,
createdAt: true,
expiredAt: true,
featureId: true,
},
});
const configs = await Promise.all(
features.map(async feature => ({
...feature,
feature: await getFeature(this.prisma, feature.featureId),
}))
);
return configs.filter(feature => !!feature.feature);
}
async listFeatureUsers(feature: FeatureType): Promise<UserType[]> {
return this.prisma.userFeatures
.findMany({
where: {
activated: true,
feature: {
feature: feature,
type: FeatureKind.Feature,
},
},
select: {
user: {
select: {
id: true,
name: true,
avatarUrl: true,
email: true,
emailVerified: true,
createdAt: true,
},
},
},
})
.then(users => users.map(user => user.user));
}
async hasUserFeature(userId: string, feature: FeatureType) {
return this.prisma.userFeatures
.count({
where: {
userId,
activated: true,
feature: {
feature,
type: FeatureKind.Feature,
},
},
})
.then(count => count > 0);
}
// ======== Workspace Features ========
async addWorkspaceFeature(
workspaceId: string,
feature: FeatureType,
version: number,
reason: string,
expiredAt?: Date | string
) {
return this.prisma.$transaction(async tx => {
const latestFlag = await tx.workspaceFeatures.findFirst({
where: {
workspaceId,
feature: {
feature,
type: FeatureKind.Feature,
},
activated: true,
},
orderBy: {
createdAt: 'desc',
},
});
if (latestFlag) {
return latestFlag.id;
} else {
return tx.workspaceFeatures
.create({
data: {
reason,
expiredAt,
activated: true,
workspace: {
connect: {
id: workspaceId,
},
},
feature: {
connect: {
feature_version: {
feature,
version,
},
type: FeatureKind.Feature,
},
},
},
})
.then(r => r.id);
}
});
}
async removeWorkspaceFeature(workspaceId: string, feature: FeatureType) {
return this.prisma.workspaceFeatures
.updateMany({
where: {
workspaceId,
feature: {
feature,
type: FeatureKind.Feature,
},
activated: true,
},
data: {
activated: false,
},
})
.then(r => r.count);
}
/**
* get workspace's features, will included inactivated features
* @param workspaceId workspace id
* @returns list of features
*/
async getWorkspaceFeatures(workspaceId: string) {
const features = await this.prisma.workspaceFeatures.findMany({
where: {
workspace: { id: workspaceId },
feature: {
type: FeatureKind.Feature,
},
},
select: {
activated: true,
reason: true,
createdAt: true,
expiredAt: true,
featureId: true,
},
});
const configs = await Promise.all(
features.map(async feature => ({
...feature,
feature: await getFeature(this.prisma, feature.featureId),
}))
);
return configs.filter(feature => !!feature.feature);
}
async listFeatureWorkspaces(feature: FeatureType): Promise<WorkspaceType[]> {
return this.prisma.workspaceFeatures
.findMany({
where: {
activated: true,
feature: {
feature: feature,
type: FeatureKind.Feature,
},
},
select: {
workspace: {
select: {
id: true,
public: true,
createdAt: true,
},
},
},
})
.then(wss => wss.map(ws => ws.workspace as WorkspaceType));
}
async hasWorkspaceFeature(workspaceId: string, feature: FeatureType) {
return this.prisma.workspaceFeatures
.count({
where: {
workspaceId,
activated: true,
feature: {
feature,
type: FeatureKind.Feature,
},
},
})
.then(count => count > 0);
}
}

View File

@@ -0,0 +1,12 @@
import { registerEnumType } from '@nestjs/graphql';
export enum FeatureType {
Copilot = 'copilot',
EarlyAccess = 'early_access',
UnlimitedWorkspace = 'unlimited_workspace',
}
registerEnumType(FeatureType, {
name: 'FeatureType',
description: 'The type of workspace feature',
});

View File

@@ -0,0 +1,8 @@
import { z } from 'zod';
import { FeatureType } from './common';
export const featureCopilot = z.object({
feature: z.literal(FeatureType.Copilot),
configs: z.object({}),
});

View File

@@ -0,0 +1,11 @@
import { z } from 'zod';
import { FeatureType } from './common';
export const featureEarlyAccess = z.object({
feature: z.literal(FeatureType.EarlyAccess),
configs: z.object({
// field polyfill, make it optional in the future
whitelist: z.string().array(),
}),
});

View File

@@ -1,7 +1,10 @@
import { URL } from 'node:url';
import { z } from 'zod';
import { FeatureType } from './common';
import { featureCopilot } from './copilot';
import { featureEarlyAccess } from './early-access';
import { featureUnlimitedWorkspace } from './unlimited-workspace';
/// ======== common schema ========
export enum FeatureKind {
@@ -20,30 +23,13 @@ export type CommonFeature = z.infer<typeof commonFeatureSchema>;
/// ======== feature define ========
export enum FeatureType {
EarlyAccess = 'early_access',
}
function checkHostname(host: string) {
try {
return new URL(`https://${host}`).hostname === host;
} catch (_) {
return false;
}
}
const featureEarlyAccess = z.object({
feature: z.literal(FeatureType.EarlyAccess),
configs: z.object({
whitelist: z
.string()
.startsWith('@')
.refine(domain => checkHostname(domain.slice(1)))
.array(),
}),
});
export const Features: Feature[] = [
{
feature: FeatureType.Copilot,
type: FeatureKind.Feature,
version: 1,
configs: {},
},
{
feature: FeatureType.EarlyAccess,
type: FeatureKind.Feature,
@@ -52,6 +38,20 @@ export const Features: Feature[] = [
whitelist: ['@toeverything.info'],
},
},
{
feature: FeatureType.EarlyAccess,
type: FeatureKind.Feature,
version: 2,
configs: {
whitelist: [],
},
},
{
feature: FeatureType.UnlimitedWorkspace,
type: FeatureKind.Feature,
version: 1,
configs: {},
},
];
/// ======== schema infer ========
@@ -60,6 +60,14 @@ export const FeatureSchema = commonFeatureSchema
.extend({
type: z.literal(FeatureKind.Feature),
})
.and(z.discriminatedUnion('feature', [featureEarlyAccess]));
.and(
z.discriminatedUnion('feature', [
featureCopilot,
featureEarlyAccess,
featureUnlimitedWorkspace,
])
);
export type Feature = z.infer<typeof FeatureSchema>;
export { FeatureType };

View File

@@ -0,0 +1,8 @@
import { z } from 'zod';
import { FeatureType } from './common';
export const featureUnlimitedWorkspace = z.object({
feature: z.literal(FeatureType.UnlimitedWorkspace),
configs: z.object({}),
});

View File

@@ -1,5 +1,7 @@
import { Module } from '@nestjs/common';
import { FeatureModule } from '../features';
import { StorageModule } from '../storage';
import { PermissionService } from '../workspaces/permission';
import { QuotaService } from './service';
import { QuotaManagementService } from './storage';
@@ -11,11 +13,12 @@ import { QuotaManagementService } from './storage';
* - quota statistics
*/
@Module({
imports: [FeatureModule, StorageModule],
providers: [PermissionService, QuotaService, QuotaManagementService],
exports: [QuotaService, QuotaManagementService],
})
export class QuotaModule {}
export { QuotaManagementService, QuotaService };
export { Quota_FreePlanV1, Quota_ProPlanV1, Quotas } from './schema';
export { QuotaType } from './types';
export { Quota_FreePlanV1_1, Quota_ProPlanV1, Quotas } from './schema';
export { QuotaQueryType, QuotaType } from './types';

View File

@@ -1,4 +1,4 @@
import { PrismaService } from '../../prisma';
import { PrismaService } from '../../fundamentals';
import { formatDate, formatSize, Quota, QuotaSchema } from './types';
const QuotaCache = new Map<number, QuotaConfig>();
@@ -44,6 +44,10 @@ export class QuotaConfig {
}
}
get version() {
return this.config.version;
}
/// feature name of quota
get name() {
return this.config.feature;
@@ -53,6 +57,12 @@ export class QuotaConfig {
return this.config.configs.blobLimit;
}
get businessBlobLimit() {
return (
this.config.configs.businessBlobLimit || this.config.configs.blobLimit
);
}
get storageQuota() {
return this.config.configs.storageQuota;
}

View File

@@ -0,0 +1,106 @@
import { FeatureKind } from '../features';
import { OneDay, OneGB, OneMB } from './constant';
import { Quota, QuotaType } from './types';
export const Quotas: Quota[] = [
{
feature: QuotaType.FreePlanV1,
type: FeatureKind.Quota,
version: 1,
configs: {
// quota name
name: 'Free',
// single blob limit 10MB
blobLimit: 10 * OneMB,
// total blob limit 10GB
storageQuota: 10 * OneGB,
// history period of validity 7 days
historyPeriod: 7 * OneDay,
// member limit 3
memberLimit: 3,
},
},
{
feature: QuotaType.ProPlanV1,
type: FeatureKind.Quota,
version: 1,
configs: {
// quota name
name: 'Pro',
// single blob limit 100MB
blobLimit: 100 * OneMB,
// total blob limit 100GB
storageQuota: 100 * OneGB,
// history period of validity 30 days
historyPeriod: 30 * OneDay,
// member limit 10
memberLimit: 10,
},
},
{
feature: QuotaType.RestrictedPlanV1,
type: FeatureKind.Quota,
version: 1,
configs: {
// quota name
name: 'Restricted',
// single blob limit 10MB
blobLimit: OneMB,
// total blob limit 1GB
storageQuota: 10 * OneMB,
// history period of validity 30 days
historyPeriod: 30 * OneDay,
// member limit 10
memberLimit: 10,
},
},
{
feature: QuotaType.FreePlanV1,
type: FeatureKind.Quota,
version: 2,
configs: {
// quota name
name: 'Free',
// single blob limit 10MB
blobLimit: 100 * OneMB,
// total blob limit 10GB
storageQuota: 10 * OneGB,
// history period of validity 7 days
historyPeriod: 7 * OneDay,
// member limit 3
memberLimit: 3,
},
},
{
feature: QuotaType.FreePlanV1,
type: FeatureKind.Quota,
version: 3,
configs: {
// quota name
name: 'Free',
// single blob limit 10MB
blobLimit: 10 * OneMB,
// server limit will larger then client to handle a edge case:
// when a user downgrades from pro to free, he can still continue
// to upload previously added files that exceed the free limit
// NOTE: this is a product decision, may change in future
businessBlobLimit: 100 * OneMB,
// total blob limit 10GB
storageQuota: 10 * OneGB,
// history period of validity 7 days
historyPeriod: 7 * OneDay,
// member limit 3
memberLimit: 3,
},
},
];
export const Quota_FreePlanV1_1 = {
feature: Quotas[4].feature,
version: Quotas[4].version,
};
export const Quota_ProPlanV1 = {
feature: Quotas[1].feature,
version: Quotas[1].version,
};

View File

@@ -1,10 +1,12 @@
import { Injectable } from '@nestjs/common';
import { PrismaService } from '../../prisma';
import { type EventPayload, OnEvent, PrismaService } from '../../fundamentals';
import { FeatureKind } from '../features';
import { QuotaConfig } from './quota';
import { QuotaType } from './types';
type Transaction = Parameters<Parameters<PrismaService['$transaction']>[0]>[0];
@Injectable()
export class QuotaService {
constructor(private readonly prisma: PrismaService) {}
@@ -83,6 +85,13 @@ export class QuotaService {
expiredAt?: Date
) {
await this.prisma.$transaction(async tx => {
const hasSameActivatedQuota = await this.hasQuota(userId, quota, tx);
if (hasSameActivatedQuota) {
// don't need to switch
return;
}
const latestPlanVersion = await tx.features.aggregate({
where: {
feature: quota,
@@ -130,8 +139,10 @@ export class QuotaService {
});
}
async hasQuota(userId: string, quota: QuotaType) {
return this.prisma.userFeatures
async hasQuota(userId: string, quota: QuotaType, transaction?: Transaction) {
const executor = transaction ?? this.prisma;
return executor.userFeatures
.count({
where: {
userId,
@@ -144,4 +155,26 @@ export class QuotaService {
})
.then(count => count > 0);
}
@OnEvent('user.subscription.activated')
async onSubscriptionUpdated({
userId,
}: EventPayload<'user.subscription.activated'>) {
await this.switchUserQuota(
userId,
QuotaType.ProPlanV1,
'subscription activated'
);
}
@OnEvent('user.subscription.canceled')
async onSubscriptionCanceled(
userId: EventPayload<'user.subscription.canceled'>
) {
await this.switchUserQuota(
userId,
QuotaType.FreePlanV1,
'subscription canceled'
);
}
}

View File

@@ -0,0 +1,112 @@
import { Injectable, NotFoundException } from '@nestjs/common';
import { FeatureService, FeatureType } from '../features';
import { WorkspaceBlobStorage } from '../storage';
import { PermissionService } from '../workspaces/permission';
import { OneGB } from './constant';
import { QuotaService } from './service';
import { formatSize, QuotaQueryType } from './types';
type QuotaBusinessType = QuotaQueryType & { businessBlobLimit: number };
@Injectable()
export class QuotaManagementService {
constructor(
private readonly feature: FeatureService,
private readonly quota: QuotaService,
private readonly permissions: PermissionService,
private readonly storage: WorkspaceBlobStorage
) {}
async getUserQuota(userId: string) {
const quota = await this.quota.getUserQuota(userId);
return {
name: quota.feature.name,
reason: quota.reason,
createAt: quota.createdAt,
expiredAt: quota.expiredAt,
blobLimit: quota.feature.blobLimit,
businessBlobLimit: quota.feature.businessBlobLimit,
storageQuota: quota.feature.storageQuota,
historyPeriod: quota.feature.historyPeriod,
memberLimit: quota.feature.memberLimit,
};
}
// TODO: lazy calc, need to be optimized with cache
async getUserUsage(userId: string) {
const workspaces = await this.permissions.getOwnedWorkspaces(userId);
const sizes = await Promise.all(
workspaces.map(workspace => this.storage.totalSize(workspace))
);
return sizes.reduce((total, size) => total + size, 0);
}
// get workspace's owner quota and total size of used
// quota was apply to owner's account
async getWorkspaceUsage(workspaceId: string): Promise<QuotaBusinessType> {
const { user: owner } =
await this.permissions.getWorkspaceOwner(workspaceId);
if (!owner) throw new NotFoundException('Workspace owner not found');
const {
feature: {
name,
blobLimit,
businessBlobLimit,
historyPeriod,
memberLimit,
storageQuota,
humanReadable,
},
} = await this.quota.getUserQuota(owner.id);
// get all workspaces size of owner used
const usedSize = await this.getUserUsage(owner.id);
const quota = {
name,
blobLimit,
businessBlobLimit,
historyPeriod,
memberLimit,
storageQuota,
humanReadable,
usedSize,
};
// relax restrictions if workspace has unlimited feature
// todo(@darkskygit): need a mechanism to allow feature as a middleware to edit quota
const unlimited = await this.feature.hasWorkspaceFeature(
workspaceId,
FeatureType.UnlimitedWorkspace
);
if (unlimited) {
return this.mergeUnlimitedQuota(quota);
}
return quota;
}
private mergeUnlimitedQuota(orig: QuotaBusinessType) {
return {
...orig,
storageQuota: 1000 * OneGB,
memberLimit: 1000,
humanReadable: {
...orig.humanReadable,
name: 'Unlimited',
storageQuota: formatSize(1000 * OneGB),
memberLimit: '1000',
},
};
}
async checkBlobQuota(workspaceId: string, size: number) {
const { storageQuota, usedSize } =
await this.getWorkspaceUsage(workspaceId);
return storageQuota - (size + usedSize);
}
}

View File

@@ -0,0 +1,110 @@
import { Field, ObjectType } from '@nestjs/graphql';
import { SafeIntResolver } from 'graphql-scalars';
import { z } from 'zod';
import { commonFeatureSchema, FeatureKind } from '../features';
import { ByteUnit, OneDay, OneKB } from './constant';
/// ======== quota define ========
/**
* naming rule:
* we append Vx to the end of the feature name to indicate the version of the feature
* x is a number, start from 1, this number will be change only at the time we change the schema of config
* for example, we change the value of `blobLimit` from 10MB to 100MB, then we will only change `version` field from 1 to 2
* but if we remove the `blobLimit` field or rename it, then we will change the Vx to Vx+1
*/
export enum QuotaType {
FreePlanV1 = 'free_plan_v1',
ProPlanV1 = 'pro_plan_v1',
// only for test, smaller quota
RestrictedPlanV1 = 'restricted_plan_v1',
}
const quotaPlan = z.object({
feature: z.enum([
QuotaType.FreePlanV1,
QuotaType.ProPlanV1,
QuotaType.RestrictedPlanV1,
]),
configs: z.object({
name: z.string(),
blobLimit: z.number().positive().int(),
storageQuota: z.number().positive().int(),
historyPeriod: z.number().positive().int(),
memberLimit: z.number().positive().int(),
businessBlobLimit: z.number().positive().int().nullish(),
}),
});
/// ======== schema infer ========
export const QuotaSchema = commonFeatureSchema
.extend({
type: z.literal(FeatureKind.Quota),
})
.and(z.discriminatedUnion('feature', [quotaPlan]));
export type Quota = z.infer<typeof QuotaSchema>;
/// ======== query types ========
@ObjectType()
export class HumanReadableQuotaType {
@Field(() => String)
name!: string;
@Field(() => String)
blobLimit!: string;
@Field(() => String)
storageQuota!: string;
@Field(() => String)
historyPeriod!: string;
@Field(() => String)
memberLimit!: string;
}
@ObjectType()
export class QuotaQueryType {
@Field(() => String)
name!: string;
@Field(() => SafeIntResolver)
blobLimit!: number;
@Field(() => SafeIntResolver)
historyPeriod!: number;
@Field(() => SafeIntResolver)
memberLimit!: number;
@Field(() => SafeIntResolver)
storageQuota!: number;
@Field(() => HumanReadableQuotaType)
humanReadable!: HumanReadableQuotaType;
@Field(() => SafeIntResolver)
usedSize!: number;
}
/// ======== utils ========
export function formatSize(bytes: number, decimals: number = 2): string {
if (bytes === 0) return '0 B';
const dm = decimals < 0 ? 0 : decimals;
const i = Math.floor(Math.log(bytes) / Math.log(OneKB));
return (
parseFloat((bytes / Math.pow(OneKB, i)).toFixed(dm)) + ' ' + ByteUnit[i]
);
}
export function formatDate(ms: number): string {
return `${(ms / OneDay).toFixed(0)} days`;
}

View File

@@ -0,0 +1,11 @@
import { Module } from '@nestjs/common';
import { AvatarStorage, WorkspaceBlobStorage } from './wrappers';
@Module({
providers: [WorkspaceBlobStorage, AvatarStorage],
exports: [WorkspaceBlobStorage, AvatarStorage],
})
export class StorageModule {}
export { AvatarStorage, WorkspaceBlobStorage };

Some files were not shown because too many files have changed in this diff Show More