import * as plugins from './szci.plugins.ts'; /** * Get current working directory (evaluated at call time, not module load time) */ export const getCwd = (): string => Deno.cwd(); /** * Current working directory - use getCwd() if you need the live value after chdir * @deprecated Use getCwd() for dynamic cwd resolution */ export const cwd = Deno.cwd(); // package paths export const SzciPackageRoot = plugins.path.join( plugins.smartpath.get.dirnameFromImportMetaUrl(import.meta.url), '../' ); export const SzciPackageConfig = plugins.path.join(SzciPackageRoot, './config.json'); // project paths - use functions for dynamic resolution export const getSzciProjectDir = (): string => getCwd(); export const getSzciProjectNogitDir = (): string => plugins.path.join(getCwd(), './.nogit'); export const getSzciTestDir = (): string => plugins.path.join(getCwd(), './test'); export const getSzciCacheDir = (): string => plugins.path.join(getCwd(), './.szci_cache'); // Static paths (for backwards compatibility - captured at module load) export const SzciProjectDir = cwd; export const SzciProjectNogitDir = plugins.path.join(SzciProjectDir, './.nogit'); export const SzciTestDir = plugins.path.join(cwd, './test'); export const SzciCacheDir = plugins.path.join(cwd, './.szci_cache');