(feat): migrate bun to pnpm
(feat): some mtp stuff (wip): electron app tray
This commit is contained in:
parent
69149b73bd
commit
82a483d7ab
39 changed files with 10109 additions and 2429 deletions
|
|
@ -4,11 +4,11 @@
|
|||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"format": "bunx prettier --write .",
|
||||
"format": "pnpm exec prettier --write .",
|
||||
"lint": "eslint src",
|
||||
"dev": "vite --port 3000 --host 0.0.0.0",
|
||||
"test": "bun test --pass-with-no-tests",
|
||||
"build": "bun run test && tsc -b && vite build",
|
||||
"test": "vitest run --passWithNoTests",
|
||||
"build": "pnpm run test && tsc -b && vite build",
|
||||
"preview": "cd dist && nix-shell -p python3 --run 'python3 -m http.server 3000' && cd .."
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
|||
|
|
@ -61,14 +61,9 @@ function parseTuFileContent(rawFileContent: string): {
|
|||
? Number(userIdString.split("@")[0])
|
||||
: Number(userIdString);
|
||||
|
||||
const rawDomain = userIdString.includes("@")
|
||||
const domain = userIdString.includes("@")
|
||||
? userIdString.split("@")[1]
|
||||
: null;
|
||||
const domain = rawDomain
|
||||
? rawDomain.includes(":")
|
||||
? rawDomain
|
||||
: rawDomain + ":1984"
|
||||
: null;
|
||||
|
||||
if (!userId || !privateKey) {
|
||||
throw new Error("Invalid file");
|
||||
|
|
@ -76,7 +71,6 @@ function parseTuFileContent(rawFileContent: string): {
|
|||
|
||||
console.log({
|
||||
domain,
|
||||
rawDomain,
|
||||
userId,
|
||||
});
|
||||
|
||||
|
|
@ -220,14 +214,9 @@ export default function Form() {
|
|||
const actualUsername = inputUsername.includes("@")
|
||||
? inputUsername.split("@")[0]
|
||||
: inputUsername;
|
||||
const rawDomain = inputUsername.includes("@")
|
||||
const domain = inputUsername.includes("@")
|
||||
? inputUsername.split("@")[1]
|
||||
: null;
|
||||
const domain = rawDomain
|
||||
? rawDomain.includes(":")
|
||||
? rawDomain
|
||||
: rawDomain + ":1984"
|
||||
: null;
|
||||
|
||||
try {
|
||||
const response = await fetch(
|
||||
|
|
|
|||
Loading…
Reference in a new issue