api!(npm rpc server): change api: don't search in path unless options.takeVersionFromPATH is set to true

-remove `DELTA_CHAT_SKIP_PATH` environment variable
- remove version check / search for dc rpc server in $PATH
- remove `options.skipSearchInPath`
- add `options.takeVersionFromPATH`
This commit is contained in:
Simon Laux
2024-05-20 18:36:49 +02:00
committed by Simon Laux
parent ee671836ca
commit 11546a1ce9
4 changed files with 19 additions and 85 deletions

View File

@@ -46,12 +46,11 @@ references:
When you import this package it searches for the rpc server in the following locations and order:
1. `DELTA_CHAT_RPC_SERVER` environment variable
2. in PATH
- unless `DELTA_CHAT_SKIP_PATH=1` is specified
- searches in .cargo/bin directory first
- but there an additional version check is performed
2. use the PATH when `{takeVersionFromPATH: true}` is supplied in the options.
3. prebuilds in npm packages
so by default it uses the prebuilds.
## How do you built this package in CI
- To build platform packages, run the `build_platform_package.py` script: