Files
AFFiNE-Mirror/tools/cli
renovate 00c5f48a7d chore: bump up mime-types version to v3 (#11274)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [mime-types](https://redirect.github.com/jshttp/mime-types) | [`^2.1.35` -> `^3.0.0`](https://renovatebot.com/diffs/npm/mime-types/2.1.35/3.0.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/mime-types/3.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/mime-types/3.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/mime-types/2.1.35/3.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/mime-types/2.1.35/3.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>jshttp/mime-types (mime-types)</summary>

### [`v3.0.1`](https://redirect.github.com/jshttp/mime-types/blob/HEAD/HISTORY.md#301--2025-03-26)

[Compare Source](https://redirect.github.com/jshttp/mime-types/compare/v3.0.0...v3.0.1)

\===================

-   deps: mime-db@1.54.0

### [`v3.0.0`](https://redirect.github.com/jshttp/mime-types/blob/HEAD/HISTORY.md#300--2024-08-31)

[Compare Source](https://redirect.github.com/jshttp/mime-types/compare/2.1.35...v3.0.0)

\===================

-   Drop support for node <18
-   deps: mime-db@1.53.0
-   resolve extension conflicts with mime-score ([#&#8203;119](https://redirect.github.com/jshttp/mime-types/issues/119))
    -   asc -> application/pgp-signature is now application/pgp-keys
    -   mpp -> application/vnd.ms-project is now application/dash-patch+xml
    -   ac -> application/vnd.nokia.n-gage.ac+xml is now application/pkix-attr-cert
    -   bdoc -> application/x-bdoc is now application/bdoc
    -   wmz -> application/x-msmetafile is now application/x-ms-wmz
    -   xsl -> application/xslt+xml is now application/xml
    -   wav -> audio/wave is now audio/wav
    -   rtf -> text/rtf is now application/rtf
    -   xml -> text/xml is now application/xml
    -   mp4 -> video/mp4 is now application/mp4
    -   mpg4 -> video/mp4 is now application/mp4

</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 was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMDcuMSIsInVwZGF0ZWRJblZlciI6IjM5LjIwNy4xIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->
2025-03-31 05:49:12 +00:00
..
2025-01-08 04:07:56 +00:00
2024-12-24 15:29:48 +08:00

AFFiNE Monorepo Cli

Start

yarn affine -h

Run build command defined in package.json

yarn affine i18n build
# or
yarn build -p i18n

Run dev command defined in package.json

yarn affine web dev
# or
yarn dev -p i18n

Clean

yarn affine clean --dist --rust
# clean node_modules
yarn affine clean --node-modules

Init

Generate files that make the monorepo work properly, the per project codegen will not be included anymore

yarn affine init

Tricks

Define scripts to run a .ts files without --loader ts-node/esm/transpile-only

affine run will automatically inject ts-node's transpile service(swc used) for your scripts

{
  "name": "@affine/demo",
  "scripts": {
    "dev": "node ./dev.ts"
  }
}
affine @affine/demo dev

or

{
  "name": "@affine/demo",
  "scripts": {
    "dev": "r ./src/index.ts"
  },
  "devDependencies": {
    "@affine-tools/cli": "workspace:*"
  }
}

Short your key presses

# af is also available for running the scripts
yarn af web build

by custom shell script

personally, I use 'af'

create file af in the root of AFFiNE project with the following content

#!/usr/bin/env sh
./tools/scripts/bin/runner.js affine.ts $@

or on windows:

node "./tools/cli/bin/runner.js" affine.ts %*

and give it executable permission

chmod a+x ./af

# now you can run scripts with simply
./af web build

if you want to go further, but for vscode(or other forks) only, add the following to your .vscode/settings.json

{
  "terminal.integrated.env.osx": {
    "PATH": "${env:PATH}:${cwd}"
  },
  "terminal.integrated.env.linux": {
    "PATH": "${env:PATH}:${cwd}"
  },
  "terminal.integrated.env.windows": {
    "PATH": "${env:PATH};${cwd}"
  }
}

restart all the integrated terminals and now you get:

af web build