Skip to content

Commit

Permalink
Fuck you electron
Browse files Browse the repository at this point in the history
  • Loading branch information
undyingwraith committed May 7, 2024
1 parent 28713bc commit f6170ac
Show file tree
Hide file tree
Showing 8 changed files with 86 additions and 560 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
},
"typescript.tsdk": ".yarn/sdks/typescript/lib",
"files.insertFinalNewline": true,
"typescript.enablePromptUseWorkspaceTsdk": true
"typescript.enablePromptUseWorkspaceTsdk": true,
"editor.formatOnSave": true
}
5 changes: 4 additions & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
enableGlobalCache: false

nodeLinker: pnp
nodeLinker: node-modules

packageExtensions:
"@preact/signals-react-transform@*":
Expand All @@ -10,5 +10,8 @@ packageExtensions:
dependencies:
electron: "*"
vite: "*"
native-fetch@*:
dependencies:
undici: "*"

yarnPath: .yarn/releases/yarn-4.2.1.cjs
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Interplanetary Media Center

## Abstract

A piece of software made to access media libraries on [IPFS](https://ipfs.io)
A piece of software made to access media libraries hosted on [IPFS](https://ipfs.io)

## Getting started

Expand Down
8 changes: 5 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"watch": "tsc --watch"
},
"devDependencies": {
"@types/react": "^18.2.79",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.0",
"typescript": "^5.4.5"
},
"dependencies": {
Expand All @@ -22,7 +23,8 @@
"helia": "^4.1.1",
"i18next": "^23.11.2",
"multiformats": "^13.1.0",
"react": "^18.2.0",
"react-i18next": "^14.1.0"
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-i18next": "^14.1.1"
}
}
20 changes: 10 additions & 10 deletions packages/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
"lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix",
"typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false",
"typecheck:web": "tsc --noEmit -p tsconfig.web.json --composite false",
"typecheck": "npm run typecheck:node && npm run typecheck:web",
"typecheck": "yarn run typecheck:node && yarn run typecheck:web",
"start": "electron-vite preview",
"dev": "electron-vite dev",
"build": "npm run typecheck && electron-vite build",
"build": "yarn run typecheck && electron-vite build",
"postinstall": "electron-builder install-app-deps",
"build:win": "npm run build && electron-builder --win --config",
"build:win": "yarn run build && electron-builder --win --config",
"build:mac": "electron-vite build && electron-builder --mac --config",
"build:linux": "electron-vite build && electron-builder --linux --config"
},
Expand All @@ -43,8 +43,8 @@
"kubo-rpc-client": "^4.1.1",
"libp2p": "^1.3.0",
"multiformats": "^13.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"ts-node": "^10.9.2"
},
"devDependencies": {
Expand All @@ -53,18 +53,18 @@
"@electron-toolkit/tsconfig": "^1.0.1",
"@preact/signals-react-transform": "^0.3.1",
"@rollup/plugin-commonjs": "^25.0.7",
"@types/node": "^20.12.7",
"@types/react": "^18.2.79",
"@types/react-dom": "^18.2.25",
"@types/node": "^20.12.10",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.2.1",
"electron": "29.3.0",
"electron": "29.1.4",
"electron-builder": "^24.13.3",
"electron-vite": "^2.1.0",
"eslint": "^8.57.0",
"eslint-plugin-react": "^7.34.1",
"prettier": "^3.2.5",
"typescript": "^5.4.5",
"vite": "^5.2.9",
"vite": "^5.0.0",
"vite-plugin-commonjs": "^0.10.1"
}
}
6 changes: 2 additions & 4 deletions packages/desktop/src/preload/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ import fs from 'fs';

import { IConfigurationService, INodeService, IInternalProfile, IProfile, IIpfsService, IFileInfo } from 'ipm-core';

console.log("this is the preload script");

function getProfileFolder(name: string): string {
return `./profiles/${name}`
}
Expand Down Expand Up @@ -112,8 +110,8 @@ const nodeService: INodeService = {
toUrl(cid: string) {
return `http://127.0.0.1:${port}/ipfs/${cid}`;
},
peers() {
return node.swarm.peers().then(r => r.map(p => p.addr.toString()));
async peers() {
return (await node.swarm.peers()).map(p => p.addr.toString());
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions packages/webui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@
"ipm-core": "workspace:^",
"libp2p": "^1.3.0",
"libp2p-pnet": "^0.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-i18next": "^14.1.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-i18next": "^14.1.1",
"styled-components": "^6.1.8",
"util": "^0.12.5",
"web-streams-polyfill": "^4.0.0"
},
"devDependencies": {
"@types/react": "^18.2.79",
"@types/react-dom": "^18.2.25",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.0",
"typescript": "^5.4.5",
"vite": "^5.2.9",
"vite": "^5.0.0",
"vite-plugin-node-polyfills": "^0.21.0"
},
"packageManager": "yarn@4.0.2"
Expand Down
Loading

0 comments on commit f6170ac

Please sign in to comment.