(feat): migrate bun to pnpm
Some checks failed
/ build-web (push) Failing after 3m41s
/ build-desktop (linux) (push) Failing after 3m43s
/ build-mobile (push) Failing after 6m33s
/ release (push) Has been skipped

(feat): some mtp stuff
(wip): electron app tray
This commit is contained in:
Alois 2026-07-04 01:18:54 +02:00
commit 82a483d7ab
39 changed files with 10109 additions and 2429 deletions

View file

@ -11,7 +11,7 @@
"./popout": "./src/components/popout.tsx"
},
"scripts": {
"format": "bunx prettier --write .",
"format": "pnpm exec prettier --write .",
"lint": "eslint src",
"build": "tsc -p tsconfig.json --noEmit"
},

View file

@ -10,7 +10,7 @@
"./behaviour-community": "./src/behaviour/community.ts"
},
"scripts": {
"format": "bunx prettier --write .",
"format": "pnpm exec prettier --write .",
"lint": "eslint src",
"build": "tsc -p tsconfig.json --noEmit"
},

View file

@ -8,10 +8,10 @@
"./worker": "./src/worker.ts"
},
"scripts": {
"format": "bunx prettier --write .",
"format": "pnpm exec prettier --write .",
"lint": "eslint src",
"test": "bun test",
"build": "bun run test && tsc -p tsconfig.json --noEmit"
"test": "vitest run",
"build": "pnpm run test && tsc -p tsconfig.json --noEmit"
},
"dependencies": {
"@noble/curves": "^2.0.1",

View file

@ -1,11 +0,0 @@
declare module "bun:test" {
export const describe: (...args: unknown[]) => unknown;
export const test: (...args: unknown[]) => unknown;
export const it: (...args: unknown[]) => unknown;
export const expect: (value: unknown) => {
toBe: (expected: unknown) => void;
toEqual: (expected: unknown) => void;
toContain: (expected: unknown) => void;
toThrow: (expected?: unknown) => void;
};
}

View file

@ -1,4 +1,4 @@
import { describe, expect, test } from "bun:test";
import { describe, expect, test } from "vitest";
import { createCryptoActions } from "./context";
/**

View file

@ -1,4 +1,4 @@
import { describe, expect, test } from "bun:test";
import { describe, expect, test } from "vitest";
import { x448 } from "@noble/curves/ed448.js";
import {
decrypt,

View file

@ -8,7 +8,7 @@
"./input": "./src/input.tsx"
},
"scripts": {
"format": "bunx prettier --write .",
"format": "pnpm exec prettier --write .",
"lint": "eslint src",
"build": "tsc -p tsconfig.json --noEmit"
},

View file

@ -7,7 +7,7 @@
".": "./src/index.ts"
},
"scripts": {
"format": "bunx prettier --write .",
"format": "pnpm exec prettier --write .",
"lint": "eslint src --ext .ts,.tsx",
"build": "tsc -p tsconfig.json --noEmit"
},

View file

@ -331,9 +331,16 @@ export function Provider(props: {
setIdentifying(false);
await MTPClient.init();
const rawOmikronData = await fetch(mtpUrl ?? "").then((res) =>
codec.decode(res.arrayBuffer()),
log(2, "mtp", "purple", "Fetching Omikron data.");
const omikronData = await fetch(
`${mtpUrl}api/get/omikron/${await load("user_id")}`,
).then(async (res) =>
codec.decode(new Uint8Array(await res.arrayBuffer())),
);
console.log(omikronData);
const client = await MTPClient.create({
url: mtpUrl ?? "",
descriptor: "client",
@ -391,9 +398,7 @@ export function Provider(props: {
await client.auth();
const finalResponse = await authPayload;
if (disposed || clientRef.current !== client) {
return;
}
if (disposed || clientRef.current !== client) return;
setFreshContacts(finalResponse.data.contacts);
setFreshCommunities(finalResponse.data.communities ?? []);
@ -456,7 +461,7 @@ export function Provider(props: {
setIdentified(false);
setIdentifying(false);
};
}, [mtpUrl, props.blockConnection]);
}, [mtpUrl, props.blockConnection, load]);
// Async queue
const loadingDescription = useMemo(() => {

View file

@ -7,7 +7,7 @@
"./context": "./src/context.tsx"
},
"scripts": {
"format": "bunx prettier --write .",
"format": "pnpm exec prettier --write .",
"lint": "eslint src",
"build": "tsc -p tsconfig.json --noEmit"
},

View file

@ -14,7 +14,7 @@
"./features/conversation/schema": "./src/features/conversation/schema.ts"
},
"scripts": {
"format": "bunx prettier --write .",
"format": "pnpm exec prettier --write .",
"lint": "eslint src",
"build": "tsc -p tsconfig.json --noEmit"
},

View file

@ -314,7 +314,7 @@ export const storageDefaults: Storage = {
},
cached_contacts: [],
cached_communities: [],
mtp_url: "https://tensamin.net:959",
mtp_url: "https://omega.tensamin.net",
call_mute_range_start: -55,
call_mute_range_end: -45,
theme_color: "",

View file

@ -9,7 +9,7 @@
"./indexed-db": "./src/indexed-db.ts"
},
"scripts": {
"format": "bunx prettier --write .",
"format": "pnpm exec prettier --write .",
"lint": "eslint src",
"build": "tsc -p tsconfig.json --noEmit"
},

View file

@ -7,7 +7,7 @@
"./context": "./src/context.tsx"
},
"scripts": {
"format": "bunx prettier --write .",
"format": "pnpm exec prettier --write .",
"lint": "eslint src",
"build": "tsc -p tsconfig.json --noEmit"
},

View file

@ -9,7 +9,7 @@
"./values": "./src/values.ts"
},
"scripts": {
"format": "bunx prettier --write .",
"format": "pnpm exec prettier --write .",
"lint": "eslint src",
"build": "tsc -p tsconfig.json --noEmit"
},