mirror of
https://github.com/lone-cloud/gerbil
synced 2026-06-03 19:54:44 -07:00
upgrade to latest electron, other dep upgrades, must use process.on to account for new rolldown bundling in vite v8
This commit is contained in:
parent
a277176b66
commit
b9200b1ee6
5 changed files with 410 additions and 657 deletions
20
package.json
20
package.json
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "gerbil",
|
"name": "gerbil",
|
||||||
"productName": "Gerbil",
|
"productName": "Gerbil",
|
||||||
"version": "1.20.2",
|
"version": "1.20.3",
|
||||||
"description": "Run Large Language Models locally",
|
"description": "Run Large Language Models locally",
|
||||||
"main": "out/main/index.js",
|
"main": "out/main/index.js",
|
||||||
"homepage": "./",
|
"homepage": "./",
|
||||||
|
|
@ -36,12 +36,12 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@codemirror/search": "^6.6.0",
|
"@codemirror/search": "^6.6.0",
|
||||||
"@codemirror/theme-one-dark": "^6.1.3",
|
"@codemirror/theme-one-dark": "^6.1.3",
|
||||||
"@codemirror/view": "^6.39.16",
|
"@codemirror/view": "^6.40.0",
|
||||||
"@fontsource/inter": "^5.2.8",
|
"@fontsource/inter": "^5.2.8",
|
||||||
"@huggingface/gguf": "^0.3.5",
|
"@huggingface/gguf": "^0.4.0",
|
||||||
"@mantine/core": "^8.3.16",
|
"@mantine/core": "^8.3.16",
|
||||||
"@mantine/hooks": "^8.3.16",
|
"@mantine/hooks": "^8.3.16",
|
||||||
"@uiw/react-codemirror": "^4.25.7",
|
"@uiw/react-codemirror": "^4.25.8",
|
||||||
"electron-updater": "^6.8.3",
|
"electron-updater": "^6.8.3",
|
||||||
"execa": "^9.6.1",
|
"execa": "^9.6.1",
|
||||||
"lucide-react": "^0.577.0",
|
"lucide-react": "^0.577.0",
|
||||||
|
|
@ -53,28 +53,28 @@
|
||||||
"rehype-raw": "^7.0.0",
|
"rehype-raw": "^7.0.0",
|
||||||
"rehype-sanitize": "^6.0.0",
|
"rehype-sanitize": "^6.0.0",
|
||||||
"remark-gfm": "^4.0.1",
|
"remark-gfm": "^4.0.1",
|
||||||
"systeminformation": "^5.31.3",
|
"systeminformation": "^5.31.4",
|
||||||
"winston": "^3.19.0",
|
"winston": "^3.19.0",
|
||||||
"winston-daily-rotate-file": "^5.0.0",
|
"winston-daily-rotate-file": "^5.0.0",
|
||||||
"yauzl": "^3.2.0",
|
"yauzl": "^3.2.1",
|
||||||
"zustand": "^5.0.11"
|
"zustand": "^5.0.11"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "^2.4.6",
|
"@biomejs/biome": "^2.4.6",
|
||||||
"@types/mime-types": "^3.0.1",
|
"@types/mime-types": "^3.0.1",
|
||||||
"@types/node": "^25.3.5",
|
"@types/node": "^25.5.0",
|
||||||
"@types/react": "^19.2.14",
|
"@types/react": "^19.2.14",
|
||||||
"@types/react-dom": "^19.2.3",
|
"@types/react-dom": "^19.2.3",
|
||||||
"@types/yauzl": "^2.10.3",
|
"@types/yauzl": "^2.10.3",
|
||||||
"@vitejs/plugin-react": "^5.1.4",
|
"@vitejs/plugin-react": "^6.0.0",
|
||||||
"cross-env": "^10.1.0",
|
"cross-env": "^10.1.0",
|
||||||
"electron": "^40.8.0",
|
"electron": "^41.0.1",
|
||||||
"electron-builder": "^26.8.1",
|
"electron-builder": "^26.8.1",
|
||||||
"electron-vite": "^5.0.0",
|
"electron-vite": "^5.0.0",
|
||||||
"jiti": "^2.6.1",
|
"jiti": "^2.6.1",
|
||||||
"rollup-plugin-visualizer": "^7.0.1",
|
"rollup-plugin-visualizer": "^7.0.1",
|
||||||
"typescript": "^5.9.3",
|
"typescript": "^5.9.3",
|
||||||
"vite": "^7.3.1"
|
"vite": "^8.0.0"
|
||||||
},
|
},
|
||||||
"build": {
|
"build": {
|
||||||
"appId": "com.gerbil.app",
|
"appId": "com.gerbil.app",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { spawn } from 'node:child_process';
|
import { spawn } from 'node:child_process';
|
||||||
import { exit, on, platform, stderr, stdin, stdout } from 'node:process';
|
import { exit, platform, stderr, stdin, stdout } from 'node:process';
|
||||||
import { pathExists, readJsonFile } from '@/utils/node/fs';
|
import { pathExists, readJsonFile } from '@/utils/node/fs';
|
||||||
import { getConfigDir } from '@/utils/node/path';
|
import { getConfigDir } from '@/utils/node/path';
|
||||||
import { terminateProcess } from '@/utils/node/process';
|
import { terminateProcess } from '@/utils/node/process';
|
||||||
|
|
@ -80,10 +80,10 @@ export async function handleCliMode(args: string[]) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
on('SIGINT', () => void handleSignal());
|
process.on('SIGINT', () => void handleSignal());
|
||||||
on('SIGTERM', () => void handleSignal());
|
process.on('SIGTERM', () => void handleSignal());
|
||||||
if (platform === 'win32') {
|
if (platform === 'win32') {
|
||||||
on('SIGBREAK', () => void handleSignal());
|
process.on('SIGBREAK', () => void handleSignal());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import type { ChildProcess } from 'node:child_process';
|
import type { ChildProcess } from 'node:child_process';
|
||||||
import { spawn } from 'node:child_process';
|
import { spawn } from 'node:child_process';
|
||||||
import { join } from 'node:path';
|
import { join } from 'node:path';
|
||||||
import { on } from 'node:process';
|
|
||||||
import { app } from 'electron';
|
import { app } from 'electron';
|
||||||
import { OPENWEBUI, SERVER_READY_SIGNALS } from '@/constants';
|
import { OPENWEBUI, SERVER_READY_SIGNALS } from '@/constants';
|
||||||
import { PROXY } from '@/constants/proxy';
|
import { PROXY } from '@/constants/proxy';
|
||||||
|
|
@ -17,11 +17,11 @@ let openWebUIProcess: ChildProcess | null = null;
|
||||||
const OPENWEBUI_VERSION = '0.6.41';
|
const OPENWEBUI_VERSION = '0.6.41';
|
||||||
const OPENWEBUI_BASE_ARGS = ['--python', '3.11', `open-webui@${OPENWEBUI_VERSION}`, 'serve'];
|
const OPENWEBUI_BASE_ARGS = ['--python', '3.11', `open-webui@${OPENWEBUI_VERSION}`, 'serve'];
|
||||||
|
|
||||||
on('SIGINT', () => {
|
process.on('SIGINT', () => {
|
||||||
void stopFrontend();
|
void stopFrontend();
|
||||||
});
|
});
|
||||||
|
|
||||||
on('SIGTERM', () => {
|
process.on('SIGTERM', () => {
|
||||||
void stopFrontend();
|
void stopFrontend();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import type { ChildProcess } from 'node:child_process';
|
||||||
import { spawn } from 'node:child_process';
|
import { spawn } from 'node:child_process';
|
||||||
import { createServer, request, type Server } from 'node:http';
|
import { createServer, request, type Server } from 'node:http';
|
||||||
import { join } from 'node:path';
|
import { join } from 'node:path';
|
||||||
import { on, platform } from 'node:process';
|
import { platform } from 'node:process';
|
||||||
import { SERVER_READY_SIGNALS, SILLYTAVERN } from '@/constants';
|
import { SERVER_READY_SIGNALS, SILLYTAVERN } from '@/constants';
|
||||||
import { PROXY } from '@/constants/proxy';
|
import { PROXY } from '@/constants/proxy';
|
||||||
import { pathExists, readJsonFile, writeJsonFile } from '@/utils/node/fs';
|
import { pathExists, readJsonFile, writeJsonFile } from '@/utils/node/fs';
|
||||||
|
|
@ -18,11 +18,11 @@ let proxyServer: Server | null = null;
|
||||||
|
|
||||||
const SILLYTAVERN_BASE_ARGS = ['--listen', '--browserLaunchEnabled', 'false', '--disableCsrf'];
|
const SILLYTAVERN_BASE_ARGS = ['--listen', '--browserLaunchEnabled', 'false', '--disableCsrf'];
|
||||||
|
|
||||||
on('SIGINT', () => {
|
process.on('SIGINT', () => {
|
||||||
void stopFrontend();
|
void stopFrontend();
|
||||||
});
|
});
|
||||||
|
|
||||||
on('SIGTERM', () => {
|
process.on('SIGTERM', () => {
|
||||||
void stopFrontend();
|
void stopFrontend();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue