drop dotenv, upd pkg hash :earnest:
This commit is contained in:
parent
8872d127a9
commit
6670b57674
6 changed files with 12 additions and 17 deletions
|
|
@ -6,6 +6,7 @@ import fsPromises from "fs/promises";
|
|||
import { and, eq } from "drizzle-orm";
|
||||
import * as log from "./log.js";
|
||||
import prettyBytes from "pretty-bytes";
|
||||
import process from "node:process";
|
||||
|
||||
// try creating cache if it doesn't exist
|
||||
// a bit scuffed but that ok
|
||||
|
|
|
|||
|
|
@ -2,10 +2,17 @@ import fs from "node:fs";
|
|||
import * as log from "./log.js";
|
||||
import toml from "toml";
|
||||
import { z, ZodError, ZodObject } from "zod";
|
||||
import * as dotenv from "dotenv";
|
||||
import { fromZodError } from "zod-validation-error";
|
||||
import process from "node:process";
|
||||
|
||||
dotenv.config({ quiet: true });
|
||||
try {
|
||||
process.loadEnvFile("./.env");
|
||||
} catch (err) {
|
||||
if (err instanceof Error && !err.message.includes("ENOENT")) {
|
||||
log.error("error reading or parsing evv file!");
|
||||
log.error(err);
|
||||
}
|
||||
}
|
||||
|
||||
const configSchema = z.object({
|
||||
server: z.object({
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import { createClient } from "@libsql/client";
|
|||
import { config, env } from "../config.js";
|
||||
import { drizzle } from "drizzle-orm/libsql";
|
||||
import { migrate } from "drizzle-orm/libsql/migrator";
|
||||
import process from "node:process";
|
||||
import fsPromises from "fs/promises";
|
||||
import * as log from "../log.js";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue