mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-23 00:11:33 +03:00
7f9d321d9c
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [glob](https://togithub.com/isaacs/node-glob) | [`^10.3.12` -> `^11.0.0`](https://renovatebot.com/diffs/npm/glob/10.4.3/11.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/glob/11.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/glob/11.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/glob/10.4.3/11.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/glob/10.4.3/11.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>isaacs/node-glob (glob)</summary> ### [`v11.0.0`](https://togithub.com/isaacs/node-glob/compare/v10.4.4...561601d9d14935970ea78b0c1ca3a25addbf5379) [Compare Source](https://togithub.com/isaacs/node-glob/compare/v10.4.5...v11.0.0) ### [`v10.4.5`](https://togithub.com/isaacs/node-glob/compare/v10.4.4...v10.4.5) [Compare Source](https://togithub.com/isaacs/node-glob/compare/v10.4.4...v10.4.5) ### [`v10.4.4`](https://togithub.com/isaacs/node-glob/compare/v10.4.3...v10.4.4) [Compare Source](https://togithub.com/isaacs/node-glob/compare/v10.4.3...v10.4.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:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyNS4xIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==--> |
||
---|---|---|
.. | ||
edgeless-snapshot | ||
onboarding | ||
stickers | ||
build-edgeless.mjs | ||
build-stickers.mjs | ||
edgeless-templates.gen.ts | ||
package.json | ||
README.md | ||
stickers-templates.gen.ts |
@affine/templates
Manages template files for use in AFFiNE. For now we only support onboarding templates.
How to update
Before we offer a better solution, to update the onboarding templates:
- run AFFiNE core locally (dev mode)
- expose
ZipTransformer
to window. e.g.,import {ZipTransformer} from '@blocksuite/blocks'; window.ZipTransformer = ZipTransformer;
- run the following script
(async () => { // make sure ZipTransformer is imported and attached to window const { ZipTransformer } = window; await Promise.all([...currentWorkspace.blockSuiteWorkspace.pages.values()].map(p => p.load())); // wait for a few more seconds await new Promise(resolve => setTimeout(resolve, 5000)); const zipblob = await ZipTransformer.exportPages(currentWorkspace.blockSuiteWorkspace, [...currentWorkspace.blockSuiteWorkspace.pages.values()]); const url = URL.createObjectURL(zipblob); const a = document.createElement('a'); a.setAttribute('href', url); a.setAttribute('download', `${currentWorkspace.id}.affine.zip`); a.click(); a.remove(); URL.revokeObjectURL(url); })();
- unzip the file, replace the json files into onboarding folder (no need to include the
assets
) - run
yarn postinstall
to update thetemplates.gen.ts
file