changed electron to tauri v2

This commit is contained in:
2026-08-20 20:59:46 -07:00
parent a1d61a23ff
commit 4754801fe3
72 changed files with 11783 additions and 5228 deletions

View File

@@ -39,19 +39,26 @@ class ServiceManager {
throw new Error(`Service script not found: ${scriptPath}`);
}
const tokenSecret = process.env.TOKEN_SECRET ||
process.env.STREAM_API_TOKEN_SECRET ||
this.credentialManager.getCredential('stream-api', 'TOKEN_SECRET') ||
require('crypto').randomBytes(32).toString('hex');
const env = {
...process.env,
TOKEN_SECRET: tokenSecret,
STREAM_API_TOKEN_SECRET: tokenSecret,
...(this.envConfig[name] || {}),
...(this.credentialManager.getServiceCredentials(name) || {}),
ELECTRON_RUN_AS_NODE: '1'
...(this.credentialManager.getServiceCredentials(name) || {})
};
this.logToFile(name, `--- Starting ${name} in ${serviceDir} ---`);
const child = spawn(process.execPath, [scriptPath], {
const child = spawn('node', [scriptPath], {
cwd: serviceDir,
env,
stdio: ['ignore', 'pipe', 'pipe']
stdio: ['ignore', 'pipe', 'pipe'],
shell: process.platform === 'win32'
});
this.processes[name] = {
@@ -70,11 +77,13 @@ class ServiceManager {
child.stdout.on('data', (data) => {
const text = data.toString().trim();
console.log(`[${name}] STDOUT: ${text}`);
this.logToFile(name, `STDOUT: ${text}`);
});
child.stderr.on('data', (data) => {
const text = data.toString().trim();
console.error(`[${name}] STDERR: ${text}`);
this.logToFile(name, `STDERR: ${text}`);
});