Remove the module_dirname helper as it is not necessary
This commit is contained in:
parent
b798bec40b
commit
aac979c9f1
@ -17,8 +17,7 @@ import {
|
||||
} from "./config.js";
|
||||
import ADMIN_CREDENTIALS from "./default-admin-credentials.js";
|
||||
import { TheFileManager } from "./file-manager.js";
|
||||
import { module_dirname } from "./utils/module_dirname.js";
|
||||
const locreq = _locreq(module_dirname(import.meta.url));
|
||||
const locreq = _locreq(import.meta.dirname);
|
||||
|
||||
declare module "koa" {
|
||||
interface BaseContext {
|
||||
|
@ -1,7 +1,6 @@
|
||||
import _locreq from "locreq";
|
||||
import { module_dirname } from "./utils/module_dirname.js";
|
||||
|
||||
const locreq = _locreq(module_dirname(import.meta.url));
|
||||
const locreq = _locreq(import.meta.dirname);
|
||||
import dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
@ -1,6 +1,5 @@
|
||||
import _locreq from "locreq";
|
||||
import { module_dirname } from "../utils/module_dirname.js";
|
||||
const locreq = _locreq(module_dirname(import.meta.url));
|
||||
const locreq = _locreq(import.meta.dirname);
|
||||
import { spawn } from "child_process";
|
||||
import { hasShape, is, predicates } from "@sealcode/ts-predicates";
|
||||
import { promises as fs } from "fs";
|
||||
|
@ -1,8 +1,7 @@
|
||||
import _locreq from "locreq";
|
||||
import { v4 as uuid } from "uuid";
|
||||
import { module_dirname } from "../utils/module_dirname.js";
|
||||
|
||||
const locreq = _locreq(module_dirname(import.meta.url));
|
||||
const locreq = _locreq(import.meta.dirname);
|
||||
import { SMTPMailer } from "sealious";
|
||||
import { TestUtils } from "sealious";
|
||||
import TheApp from "../app.js";
|
||||
|
@ -1,5 +0,0 @@
|
||||
import { dirname } from "node:path";
|
||||
|
||||
export function module_dirname(module_url: string): string {
|
||||
return dirname(module_url).replace(/^file:\/\//, "");
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user