From 312f4a9af2792f7c2be38a0ac869710189842f01 Mon Sep 17 00:00:00 2001 From: Milind Deore Date: Thu, 16 Oct 2025 15:18:19 +0530 Subject: [PATCH 01/10] Invite link changed Invite link changed from i.delta.chat to i.privittytech.com --- src/qr.rs | 6 +++--- src/qr/qr_tests.rs | 2 +- src/securejoin.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/qr.rs b/src/qr.rs index 6453188033..c259d2f1d8 100644 --- a/src/qr.rs +++ b/src/qr.rs @@ -23,8 +23,8 @@ use crate::token; use crate::tools::validate_id; const OPENPGP4FPR_SCHEME: &str = "OPENPGP4FPR:"; // yes: uppercase -const IDELTACHAT_SCHEME: &str = "https://i.delta.chat/#"; -const IDELTACHAT_NOSLASH_SCHEME: &str = "https://i.delta.chat#"; +const IDELTACHAT_SCHEME: &str = "https://i.privittytech.com/#"; +const IDELTACHAT_NOSLASH_SCHEME: &str = "https://i.privittytech.com#"; const DCACCOUNT_SCHEME: &str = "DCACCOUNT:"; pub(super) const DCLOGIN_SCHEME: &str = "DCLOGIN:"; const DCWEBRTC_SCHEME: &str = "DCWEBRTC:"; @@ -546,7 +546,7 @@ async fn decode_openpgp(context: &Context, qr: &str) -> Result { } } -/// scheme: `https://i.delta.chat[/]#FINGERPRINT&a=ADDR[&OPTIONAL_PARAMS]` +/// scheme: `https://i.privittytech.com[/]#FINGERPRINT&a=ADDR[&OPTIONAL_PARAMS]` async fn decode_ideltachat(context: &Context, prefix: &str, qr: &str) -> Result { let qr = qr.replacen(prefix, OPENPGP4FPR_SCHEME, 1); let qr = qr.replacen('&', "#", 1); diff --git a/src/qr/qr_tests.rs b/src/qr/qr_tests.rs index 171d54e7c4..eeb265d7e5 100644 --- a/src/qr/qr_tests.rs +++ b/src/qr/qr_tests.rs @@ -220,7 +220,7 @@ async fn test_decode_ideltachat_link() -> Result<()> { let qr = check_qr( &ctx.ctx, - "https://i.delta.chat#79252762C34C5096AF57958F4FC3D21A81B0F0A7&a=cli%40deltachat.de&g=test%20%3F+test%20%21&x=h-0oKQf2CDK&i=9JEXlxAqGM0&s=0V7LzL9cxRL" + "https://i.privittytech.com#79252762C34C5096AF57958F4FC3D21A81B0F0A7&a=cli%40deltachat.de&g=test%20%3F+test%20%21&x=h-0oKQf2CDK&i=9JEXlxAqGM0&s=0V7LzL9cxRL" ).await?; assert!(matches!(qr, Qr::AskVerifyGroup { .. })); diff --git a/src/securejoin.rs b/src/securejoin.rs index c779685441..191bcab13b 100644 --- a/src/securejoin.rs +++ b/src/securejoin.rs @@ -101,7 +101,7 @@ pub async fn get_securejoin_qr(context: &Context, group: Option) -> Resu context.scheduler.interrupt_inbox().await; } format!( - "https://i.delta.chat/#{}&a={}&g={}&x={}&i={}&s={}", + "https://i.privittytech.com/#{}&a={}&g={}&x={}&i={}&s={}", fingerprint.hex(), self_addr_urlencoded, &group_name_urlencoded, @@ -116,7 +116,7 @@ pub async fn get_securejoin_qr(context: &Context, group: Option) -> Resu context.scheduler.interrupt_inbox().await; } format!( - "https://i.delta.chat/#{}&a={}&n={}&i={}&s={}", + "https://i.privittytech.com/#{}&a={}&n={}&i={}&s={}", fingerprint.hex(), self_addr_urlencoded, self_name_urlencoded, From 2f81e989835f2c6f6ff76aba6d6ad35c60a5c814 Mon Sep 17 00:00:00 2001 From: Milind Deore Date: Sat, 10 Jan 2026 22:01:44 +0530 Subject: [PATCH 02/10] Adding second device Adding second devices using sync. This patch make it happen. Bug: Test: This patch also required changes in the application and privitty side changes. This is verified on the real phone and it works. --- src/imex.rs | 137 +++++++++++++++++++++++++++++++++++++++++++ src/imex/transfer.rs | 10 +++- 2 files changed, 146 insertions(+), 1 deletion(-) diff --git a/src/imex.rs b/src/imex.rs index 5fcdc6c6cc..8aaa113f55 100644 --- a/src/imex.rs +++ b/src/imex.rs @@ -38,6 +38,7 @@ pub use transfer::{BackupProvider, get_backup}; // Name of the database file in the backup. const DBFILE_BACKUP_NAME: &str = "dc_database_backup.sqlite"; pub(crate) const BLOBS_BACKUP_NAME: &str = "blobs_backup"; +pub(crate) const PRIVITTY_BACKUP_NAME: &str = ".privitty"; /// Import/export command. #[derive(Debug, Display, Copy, Clone, PartialEq, Eq, FromPrimitive, ToPrimitive)] @@ -346,6 +347,15 @@ async fn import_backup_stream_inner( let backup_file = ProgressReader::new(backup_file, context.clone(), file_size); let mut archive = Archive::new(backup_file); + let context_dir = context + .get_blobdir() + .parent() + .context("Context dir not found"); + let context_dir = match context_dir { + Ok(dir) => dir.to_path_buf(), + Err(e) => return (Err(e).context("Failed to get context dir"),), + }; + let mut entries = match archive.entries() { Ok(entries) => entries, Err(e) => return (Err(e).context("Failed to get archive entries"),), @@ -362,6 +372,38 @@ async fn import_backup_stream_inner( Ok(path) => path.to_path_buf(), Err(e) => break Err(e).context("Failed to get entry path"), }; + + // Handle .privitty folder separately - extract to context_dir instead of blobdir + // Check if the path starts with .privitty component (skipping leading CurDir components) + // This handles paths like ".privitty/file.txt", "./.privitty/file.txt", etc. + let is_privitty_entry = path + .components() + .skip_while(|c| matches!(c, std::path::Component::CurDir)) + .next() + .and_then(|c| { + if let std::path::Component::Normal(name) = c { + name.to_str() + } else { + None + } + }) + .map(|name| name == PRIVITTY_BACKUP_NAME) + .unwrap_or(false); + + if is_privitty_entry { + // Ensure target directory exists + if let Err(e) = fs::create_dir_all(&context_dir).await { + warn!(context, "Failed to create context dir {}: {:#}", context_dir.display(), e); + } + if let Err(e) = f.unpack_in(&context_dir).await { + warn!(context, "Failed to unpack .privitty entry {} to {}: {:#}", path.display(), context_dir.display(), e); + // Continue processing other entries even if .privitty extraction fails + } else { + info!(context, "Successfully unpacked .privitty entry {} to {}", path.display(), context_dir.display()); + } + continue; + } + if let Err(e) = f.unpack_in(context.get_blobdir()).await { break Err(e).context("Failed to unpack file"); } @@ -489,6 +531,14 @@ async fn export_backup(context: &Context, dir: &Path, passphrase: String) -> Res for blob in blobdir.iter() { file_size += blob.to_abs_path().metadata()?.len() } + + // Add size of .privitty folder if it exists + let context_dir = context + .get_blobdir() + .parent() + .context("Context dir not found")?; + let privitty_dir = context_dir.join(PRIVITTY_BACKUP_NAME); + file_size += calculate_dir_size(&privitty_dir).await?; export_backup_stream(context, &temp_db_path, blobdir, file, file_size) .await @@ -569,6 +619,73 @@ where } } +/// Calculates the total size of all files in a directory recursively. +pub(crate) async fn calculate_dir_size(dir: &Path) -> Result { + let mut total_size = 0u64; + if !dir.exists() { + return Ok(0); + } + // Use iterative approach with a stack to avoid recursion boxing issues + let mut dirs_to_process = vec![dir.to_path_buf()]; + + while let Some(current_dir) = dirs_to_process.pop() { + let mut entries = tokio::fs::read_dir(¤t_dir).await?; + while let Ok(Some(entry)) = entries.next_entry().await { + let path = entry.path(); + let metadata = entry.metadata().await?; + if metadata.is_file() { + total_size += metadata.len(); + } else if metadata.is_dir() { + dirs_to_process.push(path); + } + } + } + Ok(total_size) +} + +/// Adds a directory to the tar archive recursively. +async fn append_dir_to_tar( + builder: &mut tokio_tar::Builder, + source_dir: &Path, + archive_prefix: &Path, +) -> Result<()> +where + W: tokio::io::AsyncWrite + Unpin + Send, +{ + if !source_dir.exists() { + return Ok(()); + } + // Use iterative approach with a stack to avoid recursion issues + let mut dirs_to_process: Vec<(PathBuf, PathBuf)> = vec![(source_dir.to_path_buf(), archive_prefix.to_path_buf())]; + + while let Some((current_dir, current_archive_prefix)) = dirs_to_process.pop() { + let mut entries = tokio::fs::read_dir(¤t_dir).await?; + while let Ok(Some(entry)) = entries.next_entry().await { + let path = entry.path(); + let metadata = entry.metadata().await?; + + if metadata.is_file() { + let file_name = path + .file_name() + .and_then(|n| n.to_str()) + .ok_or_else(|| format_err!("invalid file name"))?; + let archive_path = current_archive_prefix.join(file_name); + let mut file = File::open(&path).await?; + builder.append_file(archive_path, &mut file).await?; + } else if metadata.is_dir() { + let dir_name = path + .file_name() + .and_then(|n| n.to_str()) + .ok_or_else(|| format_err!("invalid directory name"))?; + let archive_path = current_archive_prefix.join(dir_name); + // Add subdirectory to stack for processing + dirs_to_process.push((path, archive_path)); + } + } + } + Ok(()) +} + /// Exports the database and blobs into a stream. pub(crate) async fn export_backup_stream<'a, W>( context: &'a Context, @@ -593,6 +710,26 @@ where builder.append_file(path_in_archive, &mut file).await?; } + // Add .privitty folder if it exists + let context_dir = context + .get_blobdir() + .parent() + .context("Context dir not found")?; + let privitty_dir = context_dir.join(PRIVITTY_BACKUP_NAME); + if privitty_dir.exists() { + info!(context, "Adding .privitty folder to backup from {}", privitty_dir.display()); + append_dir_to_tar( + &mut builder, + &privitty_dir, + &PathBuf::from(PRIVITTY_BACKUP_NAME), + ) + .await + .context("Failed to add .privitty folder to backup")?; + info!(context, "Successfully added .privitty folder to backup"); + } else { + info!(context, ".privitty folder does not exist at {}, skipping", privitty_dir.display()); + } + builder.finish().await?; Ok(()) } diff --git a/src/imex/transfer.rs b/src/imex/transfer.rs index 606fb2bd0d..376a94d7f5 100644 --- a/src/imex/transfer.rs +++ b/src/imex/transfer.rs @@ -48,7 +48,7 @@ use crate::stock_str::backup_transfer_msg_body; use crate::tools::{TempPathGuard, create_id, time}; use crate::{EventType, e2ee}; -use super::{DBFILE_BACKUP_NAME, export_backup_stream, export_database, import_backup_stream}; +use super::{DBFILE_BACKUP_NAME, PRIVITTY_BACKUP_NAME, calculate_dir_size, export_backup_stream, export_database, import_backup_stream}; /// ALPN protocol identifier for the backup transfer protocol. const BACKUP_ALPN: &[u8] = b"/deltachat/backup"; @@ -194,6 +194,14 @@ impl BackupProvider { for blob in blobdir.iter() { file_size += blob.to_abs_path().metadata()?.len() } + + // Add size of .privitty folder if it exists + let context_dir = context + .get_blobdir() + .parent() + .context("Context dir not found")?; + let privitty_dir = context_dir.join(PRIVITTY_BACKUP_NAME); + file_size += calculate_dir_size(&privitty_dir).await?; send_stream.write_all(&file_size.to_be_bytes()).await?; From 12823d386b9610439f2a8612131c3a973490319a Mon Sep 17 00:00:00 2001 From: Milind Deore Date: Tue, 17 Feb 2026 00:04:52 +0530 Subject: [PATCH 03/10] @privitty/deltachat-rpc-server --- .../publish-privitty-deltachat-rpc-server.yml | 182 ++++++++++++++++++ .../npm-package-privitty/.npmignore | 3 + .../npm-package-privitty/README.md | 19 ++ .../npm-package-privitty/index.d.ts | 28 +++ .../npm-package-privitty/index.js | 100 ++++++++++ .../npm-package-privitty/package.json | 20 ++ .../scripts/pack_binary_for_platform.py | 31 +++ .../scripts/src/convert_platform.py | 19 ++ .../scripts/src/make_package.py | 31 +++ ...pdate_optional_dependencies_and_version.js | 43 +++++ .../npm-package-privitty/src/const.js | 3 + .../npm-package-privitty/src/errors.js | 26 +++ 12 files changed, 505 insertions(+) create mode 100644 .github/workflows/publish-privitty-deltachat-rpc-server.yml create mode 100644 deltachat-rpc-server/npm-package-privitty/.npmignore create mode 100644 deltachat-rpc-server/npm-package-privitty/README.md create mode 100644 deltachat-rpc-server/npm-package-privitty/index.d.ts create mode 100644 deltachat-rpc-server/npm-package-privitty/index.js create mode 100644 deltachat-rpc-server/npm-package-privitty/package.json create mode 100644 deltachat-rpc-server/npm-package-privitty/scripts/pack_binary_for_platform.py create mode 100644 deltachat-rpc-server/npm-package-privitty/scripts/src/convert_platform.py create mode 100644 deltachat-rpc-server/npm-package-privitty/scripts/src/make_package.py create mode 100644 deltachat-rpc-server/npm-package-privitty/scripts/update_optional_dependencies_and_version.js create mode 100644 deltachat-rpc-server/npm-package-privitty/src/const.js create mode 100644 deltachat-rpc-server/npm-package-privitty/src/errors.js diff --git a/.github/workflows/publish-privitty-deltachat-rpc-server.yml b/.github/workflows/publish-privitty-deltachat-rpc-server.yml new file mode 100644 index 0000000000..61b174b361 --- /dev/null +++ b/.github/workflows/publish-privitty-deltachat-rpc-server.yml @@ -0,0 +1,182 @@ +# Build deltachat-rpc-server from branch dekstop-core (Privitty/core) and publish to npm as @privitty/deltachat-rpc-server + +name: Publish @privitty/deltachat-rpc-server + +concurrency: + group: publish-privitty-rpc-${{ github.ref }} + cancel-in-progress: true + +on: + push: + branches: [dekstop-core] + workflow_dispatch: + inputs: + branch: + description: "Branch to build from" + required: false + default: "dekstop-core" + +permissions: {} + +jobs: + build_linux: + name: Linux + strategy: + fail-fast: false + matrix: + arch: [aarch64, armv7l, armv6l, i686, x86_64] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.branch || github.ref }} + show-progress: false + persist-credentials: false + - uses: DeterminateSystems/nix-installer-action@main + - name: Build deltachat-rpc-server binaries + run: nix build .#deltachat-rpc-server-${{ matrix.arch }}-linux + - name: Upload binary + uses: actions/upload-artifact@v4 + with: + name: deltachat-rpc-server-${{ matrix.arch }}-linux + path: result/bin/deltachat-rpc-server + if-no-files-found: error + + build_windows: + name: Windows + strategy: + fail-fast: false + matrix: + arch: [win32, win64] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.branch || github.ref }} + show-progress: false + persist-credentials: false + - uses: DeterminateSystems/nix-installer-action@main + - name: Build deltachat-rpc-server binaries + run: nix build .#deltachat-rpc-server-${{ matrix.arch }} + - name: Upload binary + uses: actions/upload-artifact@v4 + with: + name: deltachat-rpc-server-${{ matrix.arch }} + path: result/bin/deltachat-rpc-server.exe + if-no-files-found: error + + build_macos: + name: macOS + strategy: + fail-fast: false + matrix: + arch: [x86_64, aarch64] + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.branch || github.ref }} + show-progress: false + persist-credentials: false + - name: Setup rust target + run: rustup target add ${{ matrix.arch }}-apple-darwin + - name: Build + run: cargo build --release --package deltachat-rpc-server --target ${{ matrix.arch }}-apple-darwin --features vendored + - name: Upload binary + uses: actions/upload-artifact@v4 + with: + name: deltachat-rpc-server-${{ matrix.arch }}-macos + path: target/${{ matrix.arch }}-apple-darwin/release/deltachat-rpc-server + if-no-files-found: error + + publish_npm: + name: Pack and publish @privitty/deltachat-rpc-server + needs: [build_linux, build_windows, build_macos] + runs-on: ubuntu-latest + permissions: + id-token: write + contents: read + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.branch || github.ref }} + show-progress: false + persist-credentials: false + - uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - name: Download Linux binaries + uses: actions/download-artifact@v4 + with: + name: deltachat-rpc-server-aarch64-linux + path: deltachat-rpc-server-aarch64-linux.d + - name: Download Linux armv7l + uses: actions/download-artifact@v4 + with: + name: deltachat-rpc-server-armv7l-linux + path: deltachat-rpc-server-armv7l-linux.d + - name: Download Linux armv6l + uses: actions/download-artifact@v4 + with: + name: deltachat-rpc-server-armv6l-linux + path: deltachat-rpc-server-armv6l-linux.d + - name: Download Linux i686 + uses: actions/download-artifact@v4 + with: + name: deltachat-rpc-server-i686-linux + path: deltachat-rpc-server-i686-linux.d + - name: Download Linux x86_64 + uses: actions/download-artifact@v4 + with: + name: deltachat-rpc-server-x86_64-linux + path: deltachat-rpc-server-x86_64-linux.d + - name: Download Win32 + uses: actions/download-artifact@v4 + with: + name: deltachat-rpc-server-win32 + path: deltachat-rpc-server-win32.d + - name: Download Win64 + uses: actions/download-artifact@v4 + with: + name: deltachat-rpc-server-win64 + path: deltachat-rpc-server-win64.d + - name: Download macOS x86_64 + uses: actions/download-artifact@v4 + with: + name: deltachat-rpc-server-x86_64-macos + path: deltachat-rpc-server-x86_64-macos.d + - name: Download macOS aarch64 + uses: actions/download-artifact@v4 + with: + name: deltachat-rpc-server-aarch64-macos + path: deltachat-rpc-server-aarch64-macos.d + + - name: Make npm packages for @privitty/deltachat-rpc-server + run: | + cd deltachat-rpc-server/npm-package-privitty + python scripts/pack_binary_for_platform.py aarch64-unknown-linux-musl ../../deltachat-rpc-server-aarch64-linux.d/deltachat-rpc-server + python scripts/pack_binary_for_platform.py armv7-unknown-linux-musleabihf ../../deltachat-rpc-server-armv7l-linux.d/deltachat-rpc-server + python scripts/pack_binary_for_platform.py arm-unknown-linux-musleabihf ../../deltachat-rpc-server-armv6l-linux.d/deltachat-rpc-server + python scripts/pack_binary_for_platform.py i686-unknown-linux-musl ../../deltachat-rpc-server-i686-linux.d/deltachat-rpc-server + python scripts/pack_binary_for_platform.py x86_64-unknown-linux-musl ../../deltachat-rpc-server-x86_64-linux.d/deltachat-rpc-server + python scripts/pack_binary_for_platform.py i686-pc-windows-gnu ../../deltachat-rpc-server-win32.d/deltachat-rpc-server.exe + python scripts/pack_binary_for_platform.py x86_64-pc-windows-gnu ../../deltachat-rpc-server-win64.d/deltachat-rpc-server.exe + python scripts/pack_binary_for_platform.py x86_64-apple-darwin ../../deltachat-rpc-server-x86_64-macos.d/deltachat-rpc-server + python scripts/pack_binary_for_platform.py aarch64-apple-darwin ../../deltachat-rpc-server-aarch64-macos.d/deltachat-rpc-server + ls -la platform_package + for platform in ./platform_package/*; do npm pack "$platform"; done + npm pack + ls -la *.tgz + + - uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: "https://registry.npmjs.org" + + - name: Publish @privitty/deltachat-rpc-server to npm + working-directory: deltachat-rpc-server/npm-package-privitty + run: | + for f in *.tgz; do npm publish --provenance "$f" --access public; done + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/deltachat-rpc-server/npm-package-privitty/.npmignore b/deltachat-rpc-server/npm-package-privitty/.npmignore new file mode 100644 index 0000000000..ad1d0f9973 --- /dev/null +++ b/deltachat-rpc-server/npm-package-privitty/.npmignore @@ -0,0 +1,3 @@ +platform_package/* +scripts/ +*.tgz diff --git a/deltachat-rpc-server/npm-package-privitty/README.md b/deltachat-rpc-server/npm-package-privitty/README.md new file mode 100644 index 0000000000..4a3210e886 --- /dev/null +++ b/deltachat-rpc-server/npm-package-privitty/README.md @@ -0,0 +1,19 @@ +# @privitty/deltachat-rpc-server + +deltachat-rpc-server (stdio JSON-RPC server) from [Privitty/core](https://github.com/Privitty/core), built from the **dekstop-core** branch and published under **@privitty** on npm. + +Same API as `@deltachat/stdio-rpc-server`. Use this when you want the server from the dekstop-core branch. + +```bash +npm i @privitty/deltachat-rpc-server @deltachat/jsonrpc-client +``` + +```js +import { startDeltaChat } from "@privitty/deltachat-rpc-server"; + +const dc = await startDeltaChat("deltachat-data"); +console.log(await dc.rpc.getSystemInfo()); +dc.close(); +``` + +Binary is resolved in this order: `DELTA_CHAT_RPC_SERVER` env, PATH (if `takeVersionFromPATH: true`), or platform prebuilds. Node >= 16. diff --git a/deltachat-rpc-server/npm-package-privitty/index.d.ts b/deltachat-rpc-server/npm-package-privitty/index.d.ts new file mode 100644 index 0000000000..ababa527c8 --- /dev/null +++ b/deltachat-rpc-server/npm-package-privitty/index.d.ts @@ -0,0 +1,28 @@ +import { StdioDeltaChat } from "@deltachat/jsonrpc-client"; + +export interface SearchOptions { + takeVersionFromPATH: boolean; + disableEnvPath: boolean; +} + +export function getRPCServerPath( + options?: Partial +): Promise; + +export type DeltaChatOverJsonRpcServer = StdioDeltaChat & { + readonly pathToServerBinary: string; +}; + +export interface StartOptions { + muteStdErr: boolean; +} + +export function startDeltaChat( + directory: string, + options?: Partial +): Promise; + +export namespace FnTypes { + export type getRPCServerPath = typeof getRPCServerPath; + export type startDeltaChat = typeof startDeltaChat; +} diff --git a/deltachat-rpc-server/npm-package-privitty/index.js b/deltachat-rpc-server/npm-package-privitty/index.js new file mode 100644 index 0000000000..1a54604680 --- /dev/null +++ b/deltachat-rpc-server/npm-package-privitty/index.js @@ -0,0 +1,100 @@ +//@ts-check +import { spawn } from "node:child_process"; +import { stat } from "node:fs/promises"; +import os from "node:os"; +import process from "node:process"; +import { ENV_VAR_NAME, PATH_EXECUTABLE_NAME } from "./src/const.js"; +import { + ENV_VAR_LOCATION_NOT_FOUND, + FAILED_TO_START_SERVER_EXECUTABLE, + NPM_NOT_FOUND_SUPPORTED_PLATFORM_ERROR, + NPM_NOT_FOUND_UNSUPPORTED_PLATFORM_ERROR, +} from "./src/errors.js"; + +import { createRequire } from "node:module"; + +function findRPCServerInNodeModules() { + const arch = os.arch(); + const operating_system = process.platform; + const require = createRequire(import.meta.url); + const packageName = require("./package.json").name; + const package_name = `${packageName}-${operating_system}-${arch}`; + try { + const { resolve } = createRequire(import.meta.url); + return resolve(package_name); + } catch (error) { + console.debug("findRpcServerInNodeModules", error); + if ( + Object.keys(require("./package.json").optionalDependencies || {}).includes( + package_name + ) + ) { + throw new Error(NPM_NOT_FOUND_SUPPORTED_PLATFORM_ERROR(package_name)); + } else { + throw new Error(NPM_NOT_FOUND_UNSUPPORTED_PLATFORM_ERROR()); + } + } +} + +/** @type {import("./index").FnTypes.getRPCServerPath} */ +export async function getRPCServerPath(options = {}) { + const { takeVersionFromPATH, disableEnvPath } = { + takeVersionFromPATH: false, + disableEnvPath: false, + ...options, + }; + if (process.env[ENV_VAR_NAME] && !disableEnvPath) { + try { + if (!(await stat(process.env[ENV_VAR_NAME])).isFile()) { + throw new Error( + `expected ${ENV_VAR_NAME} to point to the deltachat-rpc-server executable` + ); + } + } catch (error) { + throw new Error(ENV_VAR_LOCATION_NOT_FOUND()); + } + return process.env[ENV_VAR_NAME]; + } + if (takeVersionFromPATH) { + return PATH_EXECUTABLE_NAME; + } + return findRPCServerInNodeModules(); +} + +import { StdioDeltaChat } from "@deltachat/jsonrpc-client"; + +/** @type {import("./index").FnTypes.startDeltaChat} */ +export async function startDeltaChat(directory, options = {}) { + const pathToServerBinary = await getRPCServerPath(options); + const server = spawn(pathToServerBinary, { + env: { + RUST_LOG: process.env.RUST_LOG, + DC_ACCOUNTS_PATH: directory, + }, + stdio: ["pipe", "pipe", options.muteStdErr ? "ignore" : "inherit"], + }); + + server.on("error", (err) => { + throw new Error(FAILED_TO_START_SERVER_EXECUTABLE(pathToServerBinary, err)); + }); + let shouldClose = false; + + server.on("exit", () => { + if (shouldClose) return; + throw new Error("Server quit"); + }); + + /** @type {import('./index').DeltaChatOverJsonRpcServer} */ + //@ts-expect-error + const dc = new StdioDeltaChat(server.stdin, server.stdout, true); + + dc.close = () => { + shouldClose = true; + if (!server.kill()) console.log("server termination failed"); + }; + + //@ts-expect-error + dc.pathToServerBinary = pathToServerBinary; + + return dc; +} diff --git a/deltachat-rpc-server/npm-package-privitty/package.json b/deltachat-rpc-server/npm-package-privitty/package.json new file mode 100644 index 0000000000..eb28b61e34 --- /dev/null +++ b/deltachat-rpc-server/npm-package-privitty/package.json @@ -0,0 +1,20 @@ +{ + "name": "@privitty/deltachat-rpc-server", + "version": "1.160.0", + "license": "MPL-2.0", + "main": "index.js", + "types": "index.d.ts", + "type": "module", + "optionalDependencies": {}, + "peerDependencies": { + "@deltachat/jsonrpc-client": "*" + }, + "repository": { + "type": "git", + "url": "https://github.com/Privitty/core.git", + "directory": "deltachat-rpc-server" + }, + "scripts": { + "prepack": "node scripts/update_optional_dependencies_and_version.js" + } +} diff --git a/deltachat-rpc-server/npm-package-privitty/scripts/pack_binary_for_platform.py b/deltachat-rpc-server/npm-package-privitty/scripts/pack_binary_for_platform.py new file mode 100644 index 0000000000..abc552b526 --- /dev/null +++ b/deltachat-rpc-server/npm-package-privitty/scripts/pack_binary_for_platform.py @@ -0,0 +1,31 @@ +import subprocess +import sys +from os import path, makedirs, chdir, chmod +from shutil import copy + +# run from npm-package-privitty/ +chdir(path.join(path.dirname(path.abspath(__file__)), "../")) + +if len(sys.argv) < 3: + print("Usage: pack_binary_for_platform.py ") + sys.exit(1) + +target = sys.argv[1].strip() +binary_path = sys.argv[2].strip() + +out = subprocess.run(["rustc", "--print", "target-list"], capture_output=True, check=True) +if target not in out.stdout.decode("utf-8"): + print("Unknown target:", target) + sys.exit(1) + +makedirs("platform_package", exist_ok=True) +platform_path = "platform_package/" + target +makedirs(platform_path, exist_ok=True) + +binary_name = path.basename(binary_path) +dest = platform_path + "/" + binary_name +copy(binary_path, dest) +chmod(dest, 0o555) + +from src.make_package import write_package_json +write_package_json(platform_path, target, binary_name) diff --git a/deltachat-rpc-server/npm-package-privitty/scripts/src/convert_platform.py b/deltachat-rpc-server/npm-package-privitty/scripts/src/convert_platform.py new file mode 100644 index 0000000000..2d23c66ca5 --- /dev/null +++ b/deltachat-rpc-server/npm-package-privitty/scripts/src/convert_platform.py @@ -0,0 +1,19 @@ +def convert_cpu_arch_to_npm_cpu_arch(arch): + if arch == "x86_64": + return "x64" + if arch == "i686": + return "ia32" + if arch == "aarch64": + return "arm64" + if arch in ("armv7", "arm"): + return "arm" + return arch + +def convert_os_to_npm_os(os): + if os == "windows": + return "win32" + if os in ("darwin", "linux"): + return os + if os.startswith("android"): + return "android" + return os diff --git a/deltachat-rpc-server/npm-package-privitty/scripts/src/make_package.py b/deltachat-rpc-server/npm-package-privitty/scripts/src/make_package.py new file mode 100644 index 0000000000..f18f1d8c5b --- /dev/null +++ b/deltachat-rpc-server/npm-package-privitty/scripts/src/make_package.py @@ -0,0 +1,31 @@ +import json +import os +import tomllib + +from .convert_platform import convert_cpu_arch_to_npm_cpu_arch, convert_os_to_npm_os + +def write_package_json(platform_path, rust_target, my_binary_name): + parts = rust_target.split("-") + if len(parts) == 3: + cpu_arch, _vendor, os_name = parts + else: + cpu_arch, _vendor, os_name, _env = parts[0], parts[1], parts[2], parts[3] + + script_dir = os.path.dirname(os.path.abspath(__file__)) + with open(os.path.join(script_dir, "../../package.json")) as f: + base_package_name = json.load(f)["name"] + with open(os.path.join(script_dir, "../../../Cargo.toml"), "rb") as f: + version = tomllib.load(f)["package"]["version"] + + name = base_package_name + "-" + convert_os_to_npm_os(os_name) + "-" + convert_cpu_arch_to_npm_cpu_arch(cpu_arch) + package_json = { + "name": name, + "version": version, + "os": [convert_os_to_npm_os(os_name)], + "cpu": [convert_cpu_arch_to_npm_cpu_arch(cpu_arch)], + "main": my_binary_name, + "license": "MPL-2.0", + "repository": {"type": "git", "url": "https://github.com/Privitty/core.git", "directory": "deltachat-rpc-server"}, + } + with open(platform_path + "/package.json", "w") as f: + f.write(json.dumps(package_json, indent=4)) diff --git a/deltachat-rpc-server/npm-package-privitty/scripts/update_optional_dependencies_and_version.js b/deltachat-rpc-server/npm-package-privitty/scripts/update_optional_dependencies_and_version.js new file mode 100644 index 0000000000..68e5682b54 --- /dev/null +++ b/deltachat-rpc-server/npm-package-privitty/scripts/update_optional_dependencies_and_version.js @@ -0,0 +1,43 @@ +import fs from "node:fs/promises"; +import { join, dirname } from "node:path"; +import { fileURLToPath } from "node:url"; + +const expected_cwd = join(dirname(fileURLToPath(import.meta.url)), ".."); + +if (process.cwd() !== expected_cwd) { + console.error("CWD mismatch: run from " + expected_cwd); + process.exit(1); +} + +const is_local = process.argv.includes("--local"); +const package_json = JSON.parse(await fs.readFile("./package.json", "utf8")); +const cargo_toml = await fs.readFile("../Cargo.toml", "utf8"); +const version = cargo_toml.split("\n").find((l) => l.includes("version")).split('"')[1]; +const platform_packages_dir = "./platform_package"; + +const platform_package_names = await Promise.all( + (await fs.readdir(platform_packages_dir)).map(async (name) => { + const p = JSON.parse( + await fs.readFile(join(platform_packages_dir, name, "package.json"), "utf8") + ); + if (p.version !== version) throw new Error("version mismatch: " + name); + return { folder_name: name, package_name: p.name }; + }) +); + +package_json.version = version; +package_json.optionalDependencies = {}; +for (const { folder_name, package_name } of platform_package_names) { + package_json.optionalDependencies[package_name] = is_local + ? `file:${expected_cwd}/platform_package/${folder_name}` + : version; +} + +if (is_local) { + package_json.peerDependencies["@deltachat/jsonrpc-client"] = + `file:${join(expected_cwd, "/../../deltachat-jsonrpc/typescript")}`; +} else { + package_json.peerDependencies["@deltachat/jsonrpc-client"] = "*"; +} + +await fs.writeFile("./package.json", JSON.stringify(package_json, null, 4)); diff --git a/deltachat-rpc-server/npm-package-privitty/src/const.js b/deltachat-rpc-server/npm-package-privitty/src/const.js new file mode 100644 index 0000000000..d56e36bde2 --- /dev/null +++ b/deltachat-rpc-server/npm-package-privitty/src/const.js @@ -0,0 +1,3 @@ +//@ts-check +export const PATH_EXECUTABLE_NAME = "deltachat-rpc-server"; +export const ENV_VAR_NAME = "DELTA_CHAT_RPC_SERVER"; diff --git a/deltachat-rpc-server/npm-package-privitty/src/errors.js b/deltachat-rpc-server/npm-package-privitty/src/errors.js new file mode 100644 index 0000000000..d50bdff413 --- /dev/null +++ b/deltachat-rpc-server/npm-package-privitty/src/errors.js @@ -0,0 +1,26 @@ +//@ts-check +import { ENV_VAR_NAME } from "./const.js"; + +const cargoInstallCommand = + "cargo install --git https://github.com/Privitty/core deltachat-rpc-server"; + +export function NPM_NOT_FOUND_SUPPORTED_PLATFORM_ERROR(package_name) { + return `deltachat-rpc-server not found: + +- Install it with "npm i ${package_name}" +- or put deltachat-rpc-server in your PATH (e.g. "${cargoInstallCommand}") +- or set "${ENV_VAR_NAME}" to the path to the binary"`; +} + +export function NPM_NOT_FOUND_UNSUPPORTED_PLATFORM_ERROR() { + return `deltachat-rpc-server not found: no prebuild for your platform. +Provide the binary via PATH or set "${ENV_VAR_NAME}".`; +} + +export function ENV_VAR_LOCATION_NOT_FOUND(error) { + return `deltachat-rpc-server not found at ${ENV_VAR_NAME}: ${error}`; +} + +export function FAILED_TO_START_SERVER_EXECUTABLE(pathToServerBinary, error) { + return `Failed to start server at '${pathToServerBinary}': ${error}`; +} From 13c7d2a5caf9d3fe7462a3f9cf0ecf252f71ab8e Mon Sep 17 00:00:00 2001 From: Milind Deore Date: Tue, 17 Feb 2026 12:03:13 +0530 Subject: [PATCH 04/10] fix in publish-privitty-deltachat-rpc-server.yml --- .../publish-privitty-deltachat-rpc-server.yml | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/publish-privitty-deltachat-rpc-server.yml b/.github/workflows/publish-privitty-deltachat-rpc-server.yml index 61b174b361..f1877a141c 100644 --- a/.github/workflows/publish-privitty-deltachat-rpc-server.yml +++ b/.github/workflows/publish-privitty-deltachat-rpc-server.yml @@ -27,7 +27,7 @@ jobs: arch: [aarch64, armv7l, armv6l, i686, x86_64] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@6d28f1ea826946162388c29db5a29aca24037adb with: ref: ${{ github.event.inputs.branch || github.ref }} show-progress: false @@ -36,7 +36,7 @@ jobs: - name: Build deltachat-rpc-server binaries run: nix build .#deltachat-rpc-server-${{ matrix.arch }}-linux - name: Upload binary - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@6d28f1ea826946162388c29db5a29aca24037adb with: name: deltachat-rpc-server-${{ matrix.arch }}-linux path: result/bin/deltachat-rpc-server @@ -50,7 +50,7 @@ jobs: arch: [win32, win64] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@6d28f1ea826946162388c29db5a29aca24037a with: ref: ${{ github.event.inputs.branch || github.ref }} show-progress: false @@ -59,7 +59,7 @@ jobs: - name: Build deltachat-rpc-server binaries run: nix build .#deltachat-rpc-server-${{ matrix.arch }} - name: Upload binary - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@6d28f1ea826946162388c29db5a29aca24037adb with: name: deltachat-rpc-server-${{ matrix.arch }} path: result/bin/deltachat-rpc-server.exe @@ -73,7 +73,7 @@ jobs: arch: [x86_64, aarch64] runs-on: macos-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@6d28f1ea826946162388c29db5a29aca24037adb with: ref: ${{ github.event.inputs.branch || github.ref }} show-progress: false @@ -83,7 +83,7 @@ jobs: - name: Build run: cargo build --release --package deltachat-rpc-server --target ${{ matrix.arch }}-apple-darwin --features vendored - name: Upload binary - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@6d28f1ea826946162388c29db5a29aca24037adb with: name: deltachat-rpc-server-${{ matrix.arch }}-macos path: target/${{ matrix.arch }}-apple-darwin/release/deltachat-rpc-server @@ -97,7 +97,7 @@ jobs: id-token: write contents: read steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@6d28f1ea826946162388c29db5a29aca24037adb with: ref: ${{ github.event.inputs.branch || github.ref }} show-progress: false @@ -107,47 +107,47 @@ jobs: python-version: "3.11" - name: Download Linux binaries - uses: actions/download-artifact@v4 + uses: actions/download-artifact@6d28f1ea826946162388c29db5a29aca24037adb with: name: deltachat-rpc-server-aarch64-linux path: deltachat-rpc-server-aarch64-linux.d - name: Download Linux armv7l - uses: actions/download-artifact@v4 + uses: actions/download-artifact@6d28f1ea826946162388c29db5a29aca24037adb with: name: deltachat-rpc-server-armv7l-linux path: deltachat-rpc-server-armv7l-linux.d - name: Download Linux armv6l - uses: actions/download-artifact@v4 + uses: actions/download-artifact@6d28f1ea826946162388c29db5a29aca24037adb with: name: deltachat-rpc-server-armv6l-linux path: deltachat-rpc-server-armv6l-linux.d - name: Download Linux i686 - uses: actions/download-artifact@v4 + uses: actions/download-artifact@6d28f1ea826946162388c29db5a29aca24037adb with: name: deltachat-rpc-server-i686-linux path: deltachat-rpc-server-i686-linux.d - name: Download Linux x86_64 - uses: actions/download-artifact@v4 + uses: actions/download-artifact@6d28f1ea826946162388c29db5a29aca24037adb with: name: deltachat-rpc-server-x86_64-linux path: deltachat-rpc-server-x86_64-linux.d - name: Download Win32 - uses: actions/download-artifact@v4 + uses: actions/download-artifact@6d28f1ea826946162388c29db5a29aca24037adb with: name: deltachat-rpc-server-win32 path: deltachat-rpc-server-win32.d - name: Download Win64 - uses: actions/download-artifact@v4 + uses: actions/download-artifact@6d28f1ea826946162388c29db5a29aca24037adb with: name: deltachat-rpc-server-win64 path: deltachat-rpc-server-win64.d - name: Download macOS x86_64 - uses: actions/download-artifact@v4 + uses: actions/download-artifact@6d28f1ea826946162388c29db5a29aca24037adb with: name: deltachat-rpc-server-x86_64-macos path: deltachat-rpc-server-x86_64-macos.d - name: Download macOS aarch64 - uses: actions/download-artifact@v4 + uses: actions/download-artifact@6d28f1ea826946162388c29db5a29aca24037adb with: name: deltachat-rpc-server-aarch64-macos path: deltachat-rpc-server-aarch64-macos.d @@ -169,7 +169,7 @@ jobs: npm pack ls -la *.tgz - - uses: actions/setup-node@v4 + - uses: actions/setup-node@6d28f1ea826946162388c29db5a29aca24037adb with: node-version: 20 registry-url: "https://registry.npmjs.org" From 8ba6efd5966727f77bb4566453bc0503c3dfe107 Mon Sep 17 00:00:00 2001 From: Milind Deore Date: Tue, 17 Feb 2026 12:11:50 +0530 Subject: [PATCH 05/10] more fix in publish-privitty-deltachat-rpc-server.yml --- .github/workflows/publish-privitty-deltachat-rpc-server.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-privitty-deltachat-rpc-server.yml b/.github/workflows/publish-privitty-deltachat-rpc-server.yml index f1877a141c..7705fb8b49 100644 --- a/.github/workflows/publish-privitty-deltachat-rpc-server.yml +++ b/.github/workflows/publish-privitty-deltachat-rpc-server.yml @@ -32,7 +32,7 @@ jobs: ref: ${{ github.event.inputs.branch || github.ref }} show-progress: false persist-credentials: false - - uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/nix-installer-action@6d28f1ea826946162388c29db5a29aca24037adb - name: Build deltachat-rpc-server binaries run: nix build .#deltachat-rpc-server-${{ matrix.arch }}-linux - name: Upload binary @@ -50,12 +50,12 @@ jobs: arch: [win32, win64] runs-on: ubuntu-latest steps: - - uses: actions/checkout@6d28f1ea826946162388c29db5a29aca24037a + - uses: actions/checkout@6d28f1ea826946162388c29db5a29aca24037adb with: ref: ${{ github.event.inputs.branch || github.ref }} show-progress: false persist-credentials: false - - uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/nix-installer-action@6d28f1ea826946162388c29db5a29aca24037adb - name: Build deltachat-rpc-server binaries run: nix build .#deltachat-rpc-server-${{ matrix.arch }} - name: Upload binary From 1513501f0ac7e0f5706976740b0fe6debc490f83 Mon Sep 17 00:00:00 2001 From: Milind Deore Date: Tue, 17 Feb 2026 12:34:03 +0530 Subject: [PATCH 06/10] minor fix in publish-privitty-deltachat-rpc-server.yml --- .github/workflows/publish-privitty-deltachat-rpc-server.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-privitty-deltachat-rpc-server.yml b/.github/workflows/publish-privitty-deltachat-rpc-server.yml index 7705fb8b49..775ab00ef1 100644 --- a/.github/workflows/publish-privitty-deltachat-rpc-server.yml +++ b/.github/workflows/publish-privitty-deltachat-rpc-server.yml @@ -102,7 +102,7 @@ jobs: ref: ${{ github.event.inputs.branch || github.ref }} show-progress: false persist-credentials: false - - uses: actions/setup-python@v5 + - uses: actions/setup-python@6d28f1ea826946162388c29db5a29aca24037adb with: python-version: "3.11" From ba24685b3294b71a0e44db5caa49bb83c92312a5 Mon Sep 17 00:00:00 2001 From: Milind Deore Date: Tue, 17 Feb 2026 13:22:40 +0530 Subject: [PATCH 07/10] removed unsed imports --- src/accounts.rs | 2 +- src/blob.rs | 2 +- src/calls.rs | 2 +- src/chat.rs | 2 +- src/config.rs | 2 +- src/configure.rs | 2 +- src/contact.rs | 2 +- src/context.rs | 2 +- src/debug_logging.rs | 2 +- src/download.rs | 1 - src/ephemeral.rs | 2 +- src/imap.rs | 2 +- src/imap/client.rs | 2 +- src/imap/idle.rs | 2 +- src/imap/scan_folders.rs | 2 +- src/imap/select_folder.rs | 2 +- src/imex.rs | 2 +- src/imex/transfer.rs | 2 +- src/key.rs | 2 +- src/location.rs | 2 +- src/log.rs | 6 ++++-- src/message.rs | 2 +- src/mimefactory.rs | 2 +- src/mimeparser.rs | 2 +- src/net/dns.rs | 2 +- src/net/http.rs | 2 +- src/oauth2.rs | 2 +- src/peer_channels.rs | 2 +- src/reaction.rs | 1 - src/receive_imf.rs | 2 +- src/scheduler.rs | 2 +- src/scheduler/connectivity.rs | 1 - src/securejoin.rs | 2 +- src/securejoin/bob.rs | 1 - src/smtp.rs | 2 +- src/smtp/connect.rs | 2 +- src/smtp/send.rs | 2 +- src/sql.rs | 2 +- src/sql/migrations.rs | 2 +- src/sync.rs | 2 +- src/webxdc.rs | 2 +- 41 files changed, 40 insertions(+), 42 deletions(-) diff --git a/src/accounts.rs b/src/accounts.rs index d10c7a58c4..eaa6563845 100644 --- a/src/accounts.rs +++ b/src/accounts.rs @@ -18,7 +18,7 @@ use tokio::time::{Duration, sleep}; use crate::context::{Context, ContextBuilder}; use crate::events::{Event, EventEmitter, EventType, Events}; -use crate::log::{info, warn}; +use crate::log::warn; use crate::push::PushSubscriber; use crate::stock_str::StockStrings; diff --git a/src/blob.rs b/src/blob.rs index ca47c65a4d..1b11cfea3b 100644 --- a/src/blob.rs +++ b/src/blob.rs @@ -20,7 +20,7 @@ use crate::config::Config; use crate::constants::{self, MediaQuality}; use crate::context::Context; use crate::events::EventType; -use crate::log::{LogExt, error, info, warn}; +use crate::log::{LogExt, warn}; use crate::message::Viewtype; use crate::tools::sanitize_filename; diff --git a/src/calls.rs b/src/calls.rs index 2daf0e8eca..1e04ca189e 100644 --- a/src/calls.rs +++ b/src/calls.rs @@ -8,7 +8,7 @@ use crate::contact::ContactId; use crate::context::Context; use crate::events::EventType; use crate::headerdef::HeaderDef; -use crate::log::{info, warn}; +use crate::log::warn; use crate::message::{self, Message, MsgId, Viewtype}; use crate::mimeparser::{MimeMessage, SystemMessage}; use crate::net::dns::lookup_host_with_cache; diff --git a/src/chat.rs b/src/chat.rs index 796eaf32d4..da2c0a6992 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -32,7 +32,7 @@ use crate::download::DownloadState; use crate::ephemeral::{Timer as EphemeralTimer, start_chat_ephemeral_timers}; use crate::events::EventType; use crate::location; -use crate::log::{LogExt, error, info, warn}; +use crate::log::{LogExt, warn}; use crate::logged_debug_assert; use crate::message::{self, Message, MessageState, MsgId, Viewtype}; use crate::mimefactory::MimeFactory; diff --git a/src/config.rs b/src/config.rs index 9bc13d317c..bb0d2fa606 100644 --- a/src/config.rs +++ b/src/config.rs @@ -17,7 +17,7 @@ use crate::configure::EnteredLoginParam; use crate::constants; use crate::context::Context; use crate::events::EventType; -use crate::log::{LogExt, info}; +use crate::log::LogExt; use crate::login_param::ConfiguredLoginParam; use crate::mimefactory::RECOMMENDED_FILE_SIZE; use crate::provider::{Provider, get_provider_by_id}; diff --git a/src/configure.rs b/src/configure.rs index 31d81200b9..216c43cb72 100644 --- a/src/configure.rs +++ b/src/configure.rs @@ -27,7 +27,7 @@ use crate::config::{self, Config}; use crate::constants::NON_ALPHANUMERIC_WITHOUT_DOT; use crate::context::Context; use crate::imap::Imap; -use crate::log::{LogExt, info, warn}; +use crate::log::{LogExt, warn}; pub use crate::login_param::EnteredLoginParam; use crate::login_param::{ ConfiguredCertificateChecks, ConfiguredLoginParam, ConfiguredServerLoginParam, diff --git a/src/contact.rs b/src/contact.rs index bf1bbe5171..54743beb1b 100644 --- a/src/contact.rs +++ b/src/contact.rs @@ -31,7 +31,7 @@ use crate::key::{ DcKey, Fingerprint, SignedPublicKey, load_self_public_key, self_fingerprint, self_fingerprint_opt, }; -use crate::log::{LogExt, info, warn}; +use crate::log::{LogExt, warn}; use crate::message::MessageState; use crate::mimeparser::AvatarAction; use crate::param::{Param, Params}; diff --git a/src/context.rs b/src/context.rs index 767db0d7f2..3d61b65e5e 100644 --- a/src/context.rs +++ b/src/context.rs @@ -26,7 +26,7 @@ use crate::download::DownloadState; use crate::events::{Event, EventEmitter, EventType, Events}; use crate::imap::{FolderMeaning, Imap, ServerMetadata}; use crate::key::{load_self_secret_key, self_fingerprint}; -use crate::log::{info, warn}; +use crate::log::warn; use crate::logged_debug_assert; use crate::login_param::{ConfiguredLoginParam, EnteredLoginParam}; use crate::message::{self, Message, MessageState, MsgId}; diff --git a/src/debug_logging.rs b/src/debug_logging.rs index 5947acae2e..5ac30f52bc 100644 --- a/src/debug_logging.rs +++ b/src/debug_logging.rs @@ -3,7 +3,7 @@ use crate::chat::ChatId; use crate::config::Config; use crate::context::Context; use crate::events::EventType; -use crate::log::{error, info}; + use crate::message::{Message, MsgId, Viewtype}; use crate::param::Param; use crate::tools::time; diff --git a/src/download.rs b/src/download.rs index d4ad5ec1db..cb12e4471f 100644 --- a/src/download.rs +++ b/src/download.rs @@ -10,7 +10,6 @@ use serde::{Deserialize, Serialize}; use crate::config::Config; use crate::context::Context; use crate::imap::session::Session; -use crate::log::info; use crate::message::{Message, MsgId, Viewtype}; use crate::mimeparser::{MimeMessage, Part}; use crate::tools::time; diff --git a/src/ephemeral.rs b/src/ephemeral.rs index 84a5805174..fbd6f94863 100644 --- a/src/ephemeral.rs +++ b/src/ephemeral.rs @@ -81,7 +81,7 @@ use crate::context::Context; use crate::download::MIN_DELETE_SERVER_AFTER; use crate::events::EventType; use crate::location; -use crate::log::{LogExt, error, info, warn}; +use crate::log::{LogExt, warn}; use crate::message::{Message, MessageState, MsgId, Viewtype}; use crate::mimeparser::SystemMessage; use crate::stock_str; diff --git a/src/imap.rs b/src/imap.rs index 5481d75b7c..5ea8a7a70c 100644 --- a/src/imap.rs +++ b/src/imap.rs @@ -33,7 +33,7 @@ use crate::contact::{Contact, ContactId, Modifier, Origin}; use crate::context::Context; use crate::events::EventType; use crate::headerdef::{HeaderDef, HeaderDefMap}; -use crate::log::{LogExt, error, info, warn}; +use crate::log::{LogExt, warn}; use crate::login_param::{ ConfiguredLoginParam, ConfiguredServerLoginParam, prioritize_server_login_params, }; diff --git a/src/imap/client.rs b/src/imap/client.rs index bd5b13659d..0e08384b08 100644 --- a/src/imap/client.rs +++ b/src/imap/client.rs @@ -8,7 +8,7 @@ use tokio::io::BufWriter; use super::capabilities::Capabilities; use crate::context::Context; -use crate::log::{LoggingStream, info, warn}; +use crate::log::{LoggingStream, warn}; use crate::login_param::{ConnectionCandidate, ConnectionSecurity}; use crate::net::dns::{lookup_host_with_cache, update_connect_timestamp}; use crate::net::proxy::ProxyConfig; diff --git a/src/imap/idle.rs b/src/imap/idle.rs index b60c431f8d..44c014bde5 100644 --- a/src/imap/idle.rs +++ b/src/imap/idle.rs @@ -8,7 +8,7 @@ use tokio::time::timeout; use super::Imap; use super::session::Session; use crate::context::Context; -use crate::log::{info, warn}; +use crate::log::warn; use crate::net::TIMEOUT; use crate::tools::{self, time_elapsed}; diff --git a/src/imap/scan_folders.rs b/src/imap/scan_folders.rs index 9b22c613af..6a88748ff1 100644 --- a/src/imap/scan_folders.rs +++ b/src/imap/scan_folders.rs @@ -5,7 +5,7 @@ use anyhow::{Context as _, Result}; use super::{get_folder_meaning_by_attrs, get_folder_meaning_by_name}; use crate::config::Config; use crate::imap::{Imap, session::Session}; -use crate::log::{LogExt, info}; +use crate::log::LogExt; use crate::tools::{self, time_elapsed}; use crate::{context::Context, imap::FolderMeaning}; diff --git a/src/imap/select_folder.rs b/src/imap/select_folder.rs index 5796c4f0ea..8cbea57b95 100644 --- a/src/imap/select_folder.rs +++ b/src/imap/select_folder.rs @@ -5,7 +5,7 @@ use anyhow::Context as _; use super::session::Session as ImapSession; use super::{get_uid_next, get_uidvalidity, set_modseq, set_uid_next, set_uidvalidity}; use crate::context::Context; -use crate::log::{info, warn}; +use crate::log::warn; type Result = std::result::Result; diff --git a/src/imex.rs b/src/imex.rs index 7573f4334c..286ba7c8ac 100644 --- a/src/imex.rs +++ b/src/imex.rs @@ -20,7 +20,7 @@ use crate::context::Context; use crate::e2ee; use crate::events::EventType; use crate::key::{self, DcKey, DcSecretKey, SignedPublicKey, SignedSecretKey}; -use crate::log::{LogExt, error, info, warn}; +use crate::log::{LogExt, warn}; use crate::pgp; use crate::qr::DCBACKUP_VERSION; use crate::sql; diff --git a/src/imex/transfer.rs b/src/imex/transfer.rs index ae0a3e5f46..f2f594152c 100644 --- a/src/imex/transfer.rs +++ b/src/imex/transfer.rs @@ -41,7 +41,7 @@ use tokio_util::sync::CancellationToken; use crate::chat::add_device_msg; use crate::context::Context; use crate::imex::BlobDirContents; -use crate::log::{info, warn}; +use crate::log::warn; use crate::message::Message; use crate::qr::Qr; use crate::stock_str::backup_transfer_msg_body; diff --git a/src/key.rs b/src/key.rs index cde859d006..dbb7627e8d 100644 --- a/src/key.rs +++ b/src/key.rs @@ -16,7 +16,7 @@ use tokio::runtime::Handle; use crate::context::Context; use crate::events::EventType; -use crate::log::{LogExt, info}; +use crate::log::LogExt; use crate::pgp::KeyPair; use crate::tools::{self, time_elapsed}; diff --git a/src/location.rs b/src/location.rs index 4f9fe867e0..18cb3703be 100644 --- a/src/location.rs +++ b/src/location.rs @@ -22,7 +22,7 @@ use crate::constants::DC_CHAT_ID_TRASH; use crate::contact::ContactId; use crate::context::Context; use crate::events::EventType; -use crate::log::{info, warn}; +use crate::log::warn; use crate::message::{Message, MsgId, Viewtype}; use crate::mimeparser::SystemMessage; use crate::tools::{duration_to_str, time}; diff --git a/src/log.rs b/src/log.rs index aa8ce66d84..f16fd098af 100644 --- a/src/log.rs +++ b/src/log.rs @@ -23,7 +23,8 @@ macro_rules! info { }}; } -pub(crate) use info; +// Re-export removed - info and error macros are unused after cleanup +// pub(crate) use info; // Workaround for . #[macro_use] @@ -60,7 +61,8 @@ macro_rules! error { }}; } -pub(crate) use error; +// Re-export removed - error macro is unused after cleanup +// pub(crate) use error; impl Context { /// Set last error string. diff --git a/src/message.rs b/src/message.rs index 8ae88f6bb6..8c431d11f7 100644 --- a/src/message.rs +++ b/src/message.rs @@ -24,7 +24,7 @@ use crate::ephemeral::{Timer as EphemeralTimer, start_ephemeral_timers_msgids}; use crate::events::EventType; use crate::imap::markseen_on_imap_table; use crate::location::delete_poi_location; -use crate::log::{error, info, warn}; +use crate::log::warn; use crate::mimeparser::{SystemMessage, parse_message_id}; use crate::param::{Param, Params}; use crate::pgp::split_armored_data; diff --git a/src/mimefactory.rs b/src/mimefactory.rs index 11727bf355..0c8d37484e 100644 --- a/src/mimefactory.rs +++ b/src/mimefactory.rs @@ -27,7 +27,7 @@ use crate::ephemeral::Timer as EphemeralTimer; use crate::headerdef::HeaderDef; use crate::key::{DcKey, SignedPublicKey, self_fingerprint}; use crate::location; -use crate::log::{info, warn}; +use crate::log::warn; use crate::message::{Message, MsgId, Viewtype}; use crate::mimeparser::{SystemMessage, is_hidden}; use crate::param::Param; diff --git a/src/mimeparser.rs b/src/mimeparser.rs index 3943bea08e..99e0e355e9 100644 --- a/src/mimeparser.rs +++ b/src/mimeparser.rs @@ -26,7 +26,7 @@ use crate::dehtml::dehtml; use crate::events::EventType; use crate::headerdef::{HeaderDef, HeaderDefMap}; use crate::key::{self, DcKey, Fingerprint, SignedPublicKey, load_self_secret_keyring}; -use crate::log::{error, info, warn}; +use crate::log::warn; use crate::message::{self, Message, MsgId, Viewtype, get_vcard_summary, set_msg_failed}; use crate::param::{Param, Params}; use crate::simplify::{SimplifiedText, simplify}; diff --git a/src/net/dns.rs b/src/net/dns.rs index abd207cfc6..68f529126d 100644 --- a/src/net/dns.rs +++ b/src/net/dns.rs @@ -50,7 +50,7 @@ use tokio::time::timeout; use super::load_connection_timestamp; use crate::context::Context; -use crate::log::{info, warn}; +use crate::log::warn; use crate::tools::time; /// Inserts entry into DNS cache diff --git a/src/net/http.rs b/src/net/http.rs index 68dff5fc7b..15ccc65af1 100644 --- a/src/net/http.rs +++ b/src/net/http.rs @@ -10,7 +10,7 @@ use tokio::fs; use crate::blob::BlobObject; use crate::context::Context; -use crate::log::{info, warn}; +use crate::log::warn; use crate::net::proxy::ProxyConfig; use crate::net::session::SessionStream; use crate::net::tls::wrap_rustls; diff --git a/src/oauth2.rs b/src/oauth2.rs index ae875d8273..405dfce3b8 100644 --- a/src/oauth2.rs +++ b/src/oauth2.rs @@ -7,7 +7,7 @@ use percent_encoding::{NON_ALPHANUMERIC, utf8_percent_encode}; use serde::Deserialize; use crate::context::Context; -use crate::log::{info, warn}; +use crate::log::warn; use crate::net::http::post_form; use crate::net::read_url_blob; use crate::provider; diff --git a/src/peer_channels.rs b/src/peer_channels.rs index c74a4d695a..dd0200045e 100644 --- a/src/peer_channels.rs +++ b/src/peer_channels.rs @@ -40,7 +40,7 @@ use crate::EventType; use crate::chat::send_msg; use crate::config::Config; use crate::context::Context; -use crate::log::{info, warn}; +use crate::log::warn; use crate::message::{Message, MsgId, Viewtype}; use crate::mimeparser::SystemMessage; diff --git a/src/reaction.rs b/src/reaction.rs index 6b90e0947f..15b93b6fb9 100644 --- a/src/reaction.rs +++ b/src/reaction.rs @@ -26,7 +26,6 @@ use crate::chatlist_events; use crate::contact::ContactId; use crate::context::Context; use crate::events::EventType; -use crate::log::info; use crate::message::{Message, MsgId, rfc724_mid_exists}; use crate::param::Param; diff --git a/src/receive_imf.rs b/src/receive_imf.rs index fd192e1462..20337a42d2 100644 --- a/src/receive_imf.rs +++ b/src/receive_imf.rs @@ -30,7 +30,7 @@ use crate::imap::{GENERATED_PREFIX, markseen_on_imap_table}; use crate::key::self_fingerprint_opt; use crate::key::{DcKey, Fingerprint}; use crate::log::LogExt; -use crate::log::{info, warn}; +use crate::log::warn; use crate::logged_debug_assert; use crate::message::{ self, Message, MessageState, MessengerMessage, MsgId, Viewtype, rfc724_mid_exists, diff --git a/src/scheduler.rs b/src/scheduler.rs index bbf1ef0161..f5716c3d96 100644 --- a/src/scheduler.rs +++ b/src/scheduler.rs @@ -23,7 +23,7 @@ use crate::ephemeral::{self, delete_expired_imap_messages}; use crate::events::EventType; use crate::imap::{FolderMeaning, Imap, session::Session}; use crate::location; -use crate::log::{LogExt, error, info, warn}; +use crate::log::{LogExt, warn}; use crate::message::MsgId; use crate::smtp::{Smtp, send_smtp_messages}; use crate::sql; diff --git a/src/scheduler/connectivity.rs b/src/scheduler/connectivity.rs index 64dfccc7a0..4889046b07 100644 --- a/src/scheduler/connectivity.rs +++ b/src/scheduler/connectivity.rs @@ -7,7 +7,6 @@ use humansize::{BINARY, format_size}; use crate::events::EventType; use crate::imap::{FolderMeaning, scan_folders::get_watched_folder_configs}; -use crate::log::info; use crate::quota::{QUOTA_ERROR_THRESHOLD_PERCENTAGE, QUOTA_WARN_THRESHOLD_PERCENTAGE}; use crate::stock_str; use crate::{context::Context, log::LogExt}; diff --git a/src/securejoin.rs b/src/securejoin.rs index b96539353d..3e6a5c6bf0 100644 --- a/src/securejoin.rs +++ b/src/securejoin.rs @@ -15,7 +15,7 @@ use crate::e2ee::ensure_secret_key_exists; use crate::events::EventType; use crate::headerdef::HeaderDef; use crate::key::{DcKey, Fingerprint, load_self_public_key}; -use crate::log::{error, info, warn}; +use crate::log::warn; use crate::message::{Message, Viewtype}; use crate::mimeparser::{MimeMessage, SystemMessage}; use crate::param::Param; diff --git a/src/securejoin/bob.rs b/src/securejoin/bob.rs index 5392f94692..2df40069ac 100644 --- a/src/securejoin/bob.rs +++ b/src/securejoin/bob.rs @@ -10,7 +10,6 @@ use crate::contact::Origin; use crate::context::Context; use crate::events::EventType; use crate::key::self_fingerprint; -use crate::log::info; use crate::message::{Message, Viewtype}; use crate::mimeparser::{MimeMessage, SystemMessage}; use crate::param::Param; diff --git a/src/smtp.rs b/src/smtp.rs index 76908096b3..f801f7949a 100644 --- a/src/smtp.rs +++ b/src/smtp.rs @@ -13,7 +13,7 @@ use crate::config::Config; use crate::contact::{Contact, ContactId}; use crate::context::Context; use crate::events::EventType; -use crate::log::{error, info, warn}; +use crate::log::warn; use crate::login_param::prioritize_server_login_params; use crate::login_param::{ConfiguredLoginParam, ConfiguredServerLoginParam}; use crate::message::Message; diff --git a/src/smtp/connect.rs b/src/smtp/connect.rs index f7b35d6579..0283b26032 100644 --- a/src/smtp/connect.rs +++ b/src/smtp/connect.rs @@ -7,7 +7,7 @@ use async_smtp::{SmtpClient, SmtpTransport}; use tokio::io::{AsyncBufRead, AsyncWrite, BufStream}; use crate::context::Context; -use crate::log::{info, warn}; +use crate::log::warn; use crate::login_param::{ConnectionCandidate, ConnectionSecurity}; use crate::net::dns::{lookup_host_with_cache, update_connect_timestamp}; use crate::net::proxy::ProxyConfig; diff --git a/src/smtp/send.rs b/src/smtp/send.rs index e030fc2876..8ba1b89ef8 100644 --- a/src/smtp/send.rs +++ b/src/smtp/send.rs @@ -6,7 +6,7 @@ use super::Smtp; use crate::config::Config; use crate::context::Context; use crate::events::EventType; -use crate::log::{info, warn}; +use crate::log::warn; use crate::tools; pub type Result = std::result::Result; diff --git a/src/sql.rs b/src/sql.rs index 1a9ed5c874..70956c5a4a 100644 --- a/src/sql.rs +++ b/src/sql.rs @@ -16,7 +16,7 @@ use crate::debug_logging::set_debug_logging_xdc; use crate::ephemeral::start_ephemeral_timers; use crate::imex::BLOBS_BACKUP_NAME; use crate::location::delete_orphaned_poi_locations; -use crate::log::{LogExt, error, info, warn}; +use crate::log::{LogExt, warn}; use crate::message::{Message, MsgId}; use crate::net::dns::prune_dns_cache; use crate::net::http::http_cache_cleanup; diff --git a/src/sql/migrations.rs b/src/sql/migrations.rs index 4a7c40e911..08dddae644 100644 --- a/src/sql/migrations.rs +++ b/src/sql/migrations.rs @@ -16,7 +16,7 @@ use crate::constants::ShowEmails; use crate::context::Context; use crate::imap; use crate::key::DcKey; -use crate::log::{info, warn}; +use crate::log::warn; use crate::login_param::ConfiguredLoginParam; use crate::message::MsgId; use crate::provider::get_provider_by_domain; diff --git a/src/sync.rs b/src/sync.rs index 1f17ff48c7..6e85cf94da 100644 --- a/src/sync.rs +++ b/src/sync.rs @@ -10,7 +10,7 @@ use crate::constants::Blocked; use crate::contact::ContactId; use crate::context::Context; use crate::log::LogExt; -use crate::log::{info, warn}; +use crate::log::warn; use crate::message::{Message, MsgId, Viewtype}; use crate::mimeparser::SystemMessage; use crate::param::Param; diff --git a/src/webxdc.rs b/src/webxdc.rs index af032419f8..62761eab16 100644 --- a/src/webxdc.rs +++ b/src/webxdc.rs @@ -40,7 +40,7 @@ use crate::contact::ContactId; use crate::context::Context; use crate::events::EventType; use crate::key::self_fingerprint; -use crate::log::{info, warn}; +use crate::log::warn; use crate::message::{Message, MessageState, MsgId, Viewtype}; use crate::mimefactory::RECOMMENDED_FILE_SIZE; use crate::mimeparser::SystemMessage; From 9bc4c0ee2aea5adeff33cb8a6fe7a86225be1e7c Mon Sep 17 00:00:00 2001 From: Milind Deore Date: Tue, 17 Feb 2026 13:46:55 +0530 Subject: [PATCH 08/10] Updated branch typo in publish-privitty-deltachat-rpc-server.yml --- .github/workflows/publish-privitty-deltachat-rpc-server.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-privitty-deltachat-rpc-server.yml b/.github/workflows/publish-privitty-deltachat-rpc-server.yml index 775ab00ef1..aaec88a3e1 100644 --- a/.github/workflows/publish-privitty-deltachat-rpc-server.yml +++ b/.github/workflows/publish-privitty-deltachat-rpc-server.yml @@ -1,4 +1,4 @@ -# Build deltachat-rpc-server from branch dekstop-core (Privitty/core) and publish to npm as @privitty/deltachat-rpc-server +# Build deltachat-rpc-server from branch deskstop-core (Privitty/core) and publish to npm as @privitty/deltachat-rpc-server name: Publish @privitty/deltachat-rpc-server @@ -8,13 +8,13 @@ concurrency: on: push: - branches: [dekstop-core] + branches: [deskstop-core] workflow_dispatch: inputs: branch: description: "Branch to build from" required: false - default: "dekstop-core" + default: "deskstop-core" permissions: {} From 729084b18aa6df3e14171b053b79065df0602448 Mon Sep 17 00:00:00 2001 From: Milind Deore Date: Tue, 17 Feb 2026 14:00:16 +0530 Subject: [PATCH 09/10] Another branch typo in publish-privitty-deltachat-rpc-server.yml --- .github/workflows/publish-privitty-deltachat-rpc-server.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-privitty-deltachat-rpc-server.yml b/.github/workflows/publish-privitty-deltachat-rpc-server.yml index aaec88a3e1..bfb3de8e2d 100644 --- a/.github/workflows/publish-privitty-deltachat-rpc-server.yml +++ b/.github/workflows/publish-privitty-deltachat-rpc-server.yml @@ -8,13 +8,13 @@ concurrency: on: push: - branches: [deskstop-core] + branches: [desktop-core] workflow_dispatch: inputs: branch: description: "Branch to build from" required: false - default: "deskstop-core" + default: "desktop-core" permissions: {} From 01cb1179ef4be75ea978c4b6793ed3b59d390859 Mon Sep 17 00:00:00 2001 From: Milind Deore Date: Tue, 17 Feb 2026 14:18:58 +0530 Subject: [PATCH 10/10] Correct version is set publish-privitty-deltachat-rpc-server.yml --- .../publish-privitty-deltachat-rpc-server.yml | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/publish-privitty-deltachat-rpc-server.yml b/.github/workflows/publish-privitty-deltachat-rpc-server.yml index bfb3de8e2d..1fb6cdc3af 100644 --- a/.github/workflows/publish-privitty-deltachat-rpc-server.yml +++ b/.github/workflows/publish-privitty-deltachat-rpc-server.yml @@ -27,16 +27,16 @@ jobs: arch: [aarch64, armv7l, armv6l, i686, x86_64] runs-on: ubuntu-latest steps: - - uses: actions/checkout@6d28f1ea826946162388c29db5a29aca24037adb + - uses: actions/checkout@v4 with: ref: ${{ github.event.inputs.branch || github.ref }} show-progress: false persist-credentials: false - - uses: DeterminateSystems/nix-installer-action@6d28f1ea826946162388c29db5a29aca24037adb + - uses: DeterminateSystems/nix-installer-action@main - name: Build deltachat-rpc-server binaries run: nix build .#deltachat-rpc-server-${{ matrix.arch }}-linux - name: Upload binary - uses: actions/upload-artifact@6d28f1ea826946162388c29db5a29aca24037adb + uses: actions/upload-artifact@v4 with: name: deltachat-rpc-server-${{ matrix.arch }}-linux path: result/bin/deltachat-rpc-server @@ -50,16 +50,16 @@ jobs: arch: [win32, win64] runs-on: ubuntu-latest steps: - - uses: actions/checkout@6d28f1ea826946162388c29db5a29aca24037adb + - uses: actions/checkout@v4 with: ref: ${{ github.event.inputs.branch || github.ref }} show-progress: false persist-credentials: false - - uses: DeterminateSystems/nix-installer-action@6d28f1ea826946162388c29db5a29aca24037adb + - uses: DeterminateSystems/nix-installer-action@main - name: Build deltachat-rpc-server binaries run: nix build .#deltachat-rpc-server-${{ matrix.arch }} - name: Upload binary - uses: actions/upload-artifact@6d28f1ea826946162388c29db5a29aca24037adb + uses: actions/upload-artifact@v4 with: name: deltachat-rpc-server-${{ matrix.arch }} path: result/bin/deltachat-rpc-server.exe @@ -73,7 +73,7 @@ jobs: arch: [x86_64, aarch64] runs-on: macos-latest steps: - - uses: actions/checkout@6d28f1ea826946162388c29db5a29aca24037adb + - uses: actions/checkout@v4 with: ref: ${{ github.event.inputs.branch || github.ref }} show-progress: false @@ -83,7 +83,7 @@ jobs: - name: Build run: cargo build --release --package deltachat-rpc-server --target ${{ matrix.arch }}-apple-darwin --features vendored - name: Upload binary - uses: actions/upload-artifact@6d28f1ea826946162388c29db5a29aca24037adb + uses: actions/upload-artifact@v4 with: name: deltachat-rpc-server-${{ matrix.arch }}-macos path: target/${{ matrix.arch }}-apple-darwin/release/deltachat-rpc-server @@ -97,57 +97,57 @@ jobs: id-token: write contents: read steps: - - uses: actions/checkout@6d28f1ea826946162388c29db5a29aca24037adb + - uses: actions/checkout@v4 with: ref: ${{ github.event.inputs.branch || github.ref }} show-progress: false persist-credentials: false - - uses: actions/setup-python@6d28f1ea826946162388c29db5a29aca24037adb + - uses: actions/setup-python@v5 with: python-version: "3.11" - name: Download Linux binaries - uses: actions/download-artifact@6d28f1ea826946162388c29db5a29aca24037adb + uses: actions/download-artifact@v4 with: name: deltachat-rpc-server-aarch64-linux path: deltachat-rpc-server-aarch64-linux.d - name: Download Linux armv7l - uses: actions/download-artifact@6d28f1ea826946162388c29db5a29aca24037adb + uses: actions/download-artifact@v4 with: name: deltachat-rpc-server-armv7l-linux path: deltachat-rpc-server-armv7l-linux.d - name: Download Linux armv6l - uses: actions/download-artifact@6d28f1ea826946162388c29db5a29aca24037adb + uses: actions/download-artifact@v4 with: name: deltachat-rpc-server-armv6l-linux path: deltachat-rpc-server-armv6l-linux.d - name: Download Linux i686 - uses: actions/download-artifact@6d28f1ea826946162388c29db5a29aca24037adb + uses: actions/download-artifact@v4 with: name: deltachat-rpc-server-i686-linux path: deltachat-rpc-server-i686-linux.d - name: Download Linux x86_64 - uses: actions/download-artifact@6d28f1ea826946162388c29db5a29aca24037adb + uses: actions/download-artifact@v4 with: name: deltachat-rpc-server-x86_64-linux path: deltachat-rpc-server-x86_64-linux.d - name: Download Win32 - uses: actions/download-artifact@6d28f1ea826946162388c29db5a29aca24037adb + uses: actions/download-artifact@v4 with: name: deltachat-rpc-server-win32 path: deltachat-rpc-server-win32.d - name: Download Win64 - uses: actions/download-artifact@6d28f1ea826946162388c29db5a29aca24037adb + uses: actions/download-artifact@v4 with: name: deltachat-rpc-server-win64 path: deltachat-rpc-server-win64.d - name: Download macOS x86_64 - uses: actions/download-artifact@6d28f1ea826946162388c29db5a29aca24037adb + uses: actions/download-artifact@v4 with: name: deltachat-rpc-server-x86_64-macos path: deltachat-rpc-server-x86_64-macos.d - name: Download macOS aarch64 - uses: actions/download-artifact@6d28f1ea826946162388c29db5a29aca24037adb + uses: actions/download-artifact@v4 with: name: deltachat-rpc-server-aarch64-macos path: deltachat-rpc-server-aarch64-macos.d @@ -169,7 +169,7 @@ jobs: npm pack ls -la *.tgz - - uses: actions/setup-node@6d28f1ea826946162388c29db5a29aca24037adb + - uses: actions/setup-node@v4 with: node-version: 20 registry-url: "https://registry.npmjs.org"