feat(app): add diagnostics and update runtime
This commit is contained in:
@@ -47,7 +47,7 @@ let cache: PersistedState | null = null
|
||||
let storePath = ''
|
||||
let pendingWrite: NodeJS.Timeout | null = null
|
||||
|
||||
function getStorePath(): string {
|
||||
export function getStorePath(): string {
|
||||
if (!storePath) {
|
||||
const dir = app.getPath('userData')
|
||||
if (!existsSync(dir)) mkdirSync(dir, { recursive: true })
|
||||
@@ -197,7 +197,8 @@ function sanitizeMeal(raw: unknown, now = Date.now()): Meal | null {
|
||||
const meal: Meal = {
|
||||
...base,
|
||||
id,
|
||||
nextFireAt: finiteMs(raw.nextFireAt) ?? nextMealOccurrence(base.time, base.days, now)
|
||||
nextFireAt:
|
||||
finiteMs(raw.nextFireAt) ?? nextMealOccurrence(base.time, base.days, now)
|
||||
}
|
||||
const lastDoneAt = finiteMs(raw.lastDoneAt)
|
||||
if (lastDoneAt !== undefined) meal.lastDoneAt = lastDoneAt
|
||||
|
||||
Reference in New Issue
Block a user