refactor: simplify setup of asset paths

This commit is contained in:
Carlos Valente
2024-10-13 13:53:55 +02:00
committed by Carlos Valente
parent e46948772e
commit 5950551da2
17 changed files with 177 additions and 144 deletions
@@ -1,7 +1,8 @@
import { Low } from 'lowdb';
import { JSONFile } from 'lowdb/node';
import { appStatePath, isTest } from '../../setup/index.js';
import { publicFiles } from '../../setup/index.js';
import { isTest } from '../../externals.js';
import { isPath } from '../../utils/fileManagement.js';
import { shouldCrashDev } from '../../utils/development.js';
@@ -9,7 +10,7 @@ interface AppState {
lastLoadedProject?: string;
}
const adapter = new JSONFile<AppState>(appStatePath);
const adapter = new JSONFile<AppState>(publicFiles.appState);
const config = new Low<AppState>(adapter, {});
export async function isLastLoadedProject(projectName: string): Promise<boolean> {