e57b3618fc
* feat(tasks): move task ledger to sqlite * feat(tasks): add task run audit command * style(tasks): normalize audit command formatting * fix(tasks): address audit summary and sqlite perms * fix(tasks): avoid duplicate lost audit findings
18 lines
576 B
TypeScript
18 lines
576 B
TypeScript
import { createRequire } from "node:module";
|
|
import { installProcessWarningFilter } from "./warning-filter.js";
|
|
|
|
const require = createRequire(import.meta.url);
|
|
|
|
export function requireNodeSqlite(): typeof import("node:sqlite") {
|
|
installProcessWarningFilter();
|
|
try {
|
|
return require("node:sqlite") as typeof import("node:sqlite");
|
|
} catch (err) {
|
|
const message = err instanceof Error ? err.message : String(err);
|
|
throw new Error(
|
|
`SQLite support is unavailable in this Node runtime (missing node:sqlite). ${message}`,
|
|
{ cause: err },
|
|
);
|
|
}
|
|
}
|