From 458bf0fc628d9bcf6a59a0efb898045266dab6ba Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sun, 25 Feb 2024 05:01:00 -0300 Subject: Explicit import from "node:process"; move log() to hero.mjs --- src/db.mjs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/db.mjs') diff --git a/src/db.mjs b/src/db.mjs index 6bb2634..b82cb18 100644 --- a/src/db.mjs +++ b/src/db.mjs @@ -1,7 +1,8 @@ -import assert from "node:assert/strict"; -import fs from "node:fs"; -import path from "node:path"; -import url from "node:url"; +import assert from "node:assert/strict"; +import fs from "node:fs"; +import path from "node:path"; +import process from "node:process"; +import url from "node:url"; import sqlite from "./sqlite.cjs"; @@ -49,7 +50,7 @@ export const open = (...args) => export let handle = null; -export const init = async (dbName = process.env.PAPO_DB_PATH || ":memory:") => { +export const init = async (logFn, dbName = process.env.PAPO_DB_PATH || ":memory:") => { handle = await open(dbName); - await accretion.runMigrations(handle); + await accretion.runMigrations(logFn, handle); }; -- cgit v1.2.3