Skip to content

A spy satellite simulator in your browser, except the data is real. Live open source spatial intelligence on a photorealistic 3D globe.

358 B
Raw Blame
import path from 'node:path';
import { fileURLToPath } from 'node:url';

/** Resolve the explicit CLI project directory, defaulting to the tool's repository. */
export function projectRoot(moduleUrl, environment = process.env) {
  return path.resolve(
    environment.GEV_PROJECT_ROOT ||
      path.join(path.dirname(fileURLToPath(moduleUrl)), '..'),
  );
}