Skip to content

Commit

Permalink
feat: add bun support
Browse files Browse the repository at this point in the history
  • Loading branch information
tautcony committed Jan 8, 2024
1 parent 2da5072 commit 6ac1111
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ setup/templates/**/* text eol=lf
*.ttf binary
*.woff binary
*.woff2 binary

# config for bun lock file
*.lockb binary diff=lockb
21 changes: 21 additions & 0 deletions setup/dashboard/ws/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions setup/dashboard/ws/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"@types/node": "^20.10.7",
"@types/react": "^18.2.47",
"@types/react-dom": "^18.2.18",
"@types/webpack-node-externals": "^3.0.4",
"@types/which": "^3.0.3",
"@types/ws": "^8.5.10",
"@typescript-eslint/eslint-plugin": "^6.18.0",
Expand Down
2 changes: 1 addition & 1 deletion setup/dashboard/ws/src/widgets/disk_data.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ async function renderTorrentInfo() {
</div>
);

const ret = [];
const ret: React.JSX.Element[] = [];

if (await processExists("rtorrent", username) && await exists("/install/.rtorrent.lock")) {
const rtorrents = await countTorrent(`/home/.${username}/.sessions/`);
Expand Down
2 changes: 1 addition & 1 deletion setup/dashboard/ws/tests/test-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ php.stdout.on('data', (data) => process.stdout.write(`[PHP::OUT::STD] ${data}`))
php.stderr.on('data', (data) => process.stderr.write(`[PHP::OUT::ERR] ${data}`));
php.on('exit', (code) => console.log(`php exited with code ${code}`));

const ws = spawn('node', [path.join(__dirname, '..', 'dist', 'server.js')]);
const ws = spawn('bun', [path.join(__dirname, '..', 'src', 'server.tsx')]);
ws.stdout.on('data', (data) => process.stdout.write(`[NODE::OUT::STD] ${data}`));
ws.stderr.on('data', (data) => process.stderr.write(`[NODE::OUT::ERR] ${data}`));
ws.on('exit', (code) => console.log(`node exited with code ${code}`));
Expand Down

0 comments on commit 6ac1111

Please sign in to comment.