import { Datastore } from "./deps.ts"; import { FS } from "./deps.ts"; await FS.ensureDir("./data"); export interface IPackage { name: string; owner: string; description: string; versions: string[]; deprecated: boolean; readme: string; } export interface IApiKey { user: string; key: string; createdAt: Date; lastAccess?: Date; lastIP?: string; } const db = { package: new Datastore({ filename: "data/packages.json", autoload: true, }), api_key: new Datastore({ filename: "data/api_keys.json", }), }; export default db;