Initial commit
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { readFile } from "node:fs/promises";
|
||||
import { openKeePassDatabase } from "./keepass";
|
||||
|
||||
async function main() {
|
||||
const { password } = JSON.parse(await readFile("tests/fixtures/data.kdbx.json", "utf8")) as { password: string };
|
||||
|
||||
const db = openKeePassDatabase("tests/fixtures/data.kdbx", { password });
|
||||
const entries = await db.listEntries();
|
||||
|
||||
console.log(JSON.stringify({ ok: true, count: entries.length }, null, 2));
|
||||
}
|
||||
|
||||
main().catch((error) => {
|
||||
console.error(error);
|
||||
process.exit(1);
|
||||
});
|
||||
Reference in New Issue
Block a user