/**
 * @copyright Sister Software
 * @license AGPL-3.0
 * @author Teffen Ellis, et al.
 */
import { dirname, resolve } from "node:path";
import { fileURLToPath } from "node:url";
import { createPathBuilderResolver } from "path-ts";
/**
 * Aliased path to the root of the repository.
 *
 * @typedef {"mailwoman"} RepoRootAlias
 */
/**
 * Compiled directory name for TS output files.
 */
export const OutDirectoryName = "out";
const RepoRootAlias = "mailwoman";
const PathReflection = ["mailwoman", "sdk"];
/**
 * The directory path of the current file, post-compilation.
 */
const __dirname = dirname(fileURLToPath(import.meta.url));
/**
 * The absolute path to the root of the repository.
 */
const RepoRootAbsolutePath = resolve(__dirname, ...PathReflection.map(() => ".."));
/**
 * Path builder relative to the repo root.
 */
export const repoRootPathBuilder = createPathBuilderResolver(RepoRootAbsolutePath);
/**
 * Path builder relative to a specific package's output directory.
 */
export function tsOutPathBuilder(...pathSegments) {
    // eslint-disable-next-line @typescript-eslint/no-explicit-any
    return repoRootPathBuilder(OutDirectoryName, ...pathSegments);
}
/**
 * Path builder relative to a address resource dictionary directory
 */
export function resourceDictionaryPathBuilder(resource, ...pathSegments) {
    return repoRootPathBuilder("resources", resource, "dictionaries", ...pathSegments);
}
/**
 * Absolute path to the test directory.
 */
export const functionTestsDirectory = repoRootPathBuilder("test");
//# sourceMappingURL=repo.js.map