update
This commit is contained in:
@@ -1,5 +1,14 @@
|
||||
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
|
||||
@@ -9,7 +18,13 @@ export const SzciPackageRoot = plugins.path.join(
|
||||
);
|
||||
export const SzciPackageConfig = plugins.path.join(SzciPackageRoot, './config.json');
|
||||
|
||||
// project paths
|
||||
// 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');
|
||||
|
||||
Reference in New Issue
Block a user