Monorepo (Express+TS+Drizzle/libSQL server, React+Vite+Tabler web) matching the stack used by ScheduleTaskManager and Sloth Manager. Includes Authentik OIDC login with local admin/operator/viewer roles (first user becomes admin), a generalized audit log, encrypted-at-rest storage for future integration API tokens, the DB schema for all planned modules, and the Tabler-styled app shell/nav. Also ports the Secrets (expiry tracker) and IP Addresses (IPAM) modules from Sloth Manager onto the new stack. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
11 lines
433 B
TypeScript
11 lines
433 B
TypeScript
import { fileURLToPath } from "node:url";
|
|
import { dirname, resolve, isAbsolute } from "node:path";
|
|
|
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
const serverRoot = resolve(__dirname, ".."); // server/
|
|
|
|
/** Resolves a config path relative to the server package root, regardless of process.cwd(). */
|
|
export function resolveDataPath(path: string): string {
|
|
return isAbsolute(path) ? path : resolve(serverRoot, path);
|
|
}
|