sidecar network host

This commit is contained in:
2026-02-26 03:32:04 +00:00
parent 42abb97d7b
commit 466dc3adda
8 changed files with 310 additions and 420 deletions
+2 -3
View File
@@ -1,9 +1,8 @@
import { join } from 'node:path';
import { homedir } from 'node:os';
import type { Database } from 'bun:sqlite';
import type { JobHandler } from '../types';
import { registerHandler } from '../handler-registry';
import { DATA_PATH } from '../../data-path';
import { DATA_PATH, SERVER_CONFIG_DIR } from '../../data-path';
import { openEmailDb, upsertFromRawEml, getSyncMeta, setSyncMeta, updateEmailLabels } from '../../api/email/email-db';
type GoogleCredentials = {
@@ -14,7 +13,7 @@ type GoogleCredentials = {
clientSecret: string;
};
const googleConfigPath = join(homedir(), '.config', 'officer.dev', 'google-oauth.json');
const googleConfigPath = join(SERVER_CONFIG_DIR, 'google-oauth.json');
async function loadCredentials(userId: string): Promise<GoogleCredentials> {
const config = await Bun.file(googleConfigPath).json().catch(() => null);