Skip to content

Commit

Permalink
Add machine-uuid
Browse files Browse the repository at this point in the history
  • Loading branch information
holdenchristiansen committed Apr 12, 2024
1 parent 14fecbd commit ee54ed1
Show file tree
Hide file tree
Showing 3 changed files with 149 additions and 122 deletions.
265 changes: 143 additions & 122 deletions 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 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
"express": "^4.18.2",
"i18next": "^22.4.13",
"iconsax-react": "^0.0.8",
"machine-uuid": "^1.2.0",
"md5-file": "^5.0.0",
"next": "^13.4.4",
"next-i18next": "^13.3.0",
Expand Down
5 changes: 5 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { Server } from "socket.io";
import { Readable } from "stream";
import update from "update-electron-app";
import { parse } from "url";
import machineUuid from 'machine-uuid';

let mainWindow;

Expand Down Expand Up @@ -82,6 +83,10 @@ const checkConnection = (simulateOffline?): Promise<boolean> => {
io.on("connection", (socket) => {
console.log("socket connected");

machineUuid().then((uuid: string) => {
socket.emit("machine_id", uuid);
});

socket.on('get_electron_version', () => {
socket.emit('electron_version', app.getVersion());
});
Expand Down

0 comments on commit ee54ed1

Please sign in to comment.