Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | // biome-ignore-all lint/performance/noBarrelFile: intentional public API
/**
* DSN Detection Module
*
* Public API for detecting Sentry DSN in a project directory.
*
* @example
* import { detectDsn, resolveProject } from "./lib/dsn/index.js";
*
* // Detect DSN (uses cache for speed)
* const dsn = await detectDsn(process.cwd());
*
* // Resolve to project info
* if (dsn) {
* const project = await resolveProject(process.cwd(), dsn);
* console.log(`Project: ${project.orgSlug}/${project.projectSlug}`);
* }
*/
// Cache Management
export {
clearDsnCache,
disableDsnCache,
enableDsnCache,
getCachedDsn,
setCachedDsn,
updateCachedResolution,
} from "../db/dsn-cache.js";
// Code Scanner (for advanced use)
export type { CodeScanResult } from "./code-scanner.js";
export { scanCodeForDsns, scanCodeForFirstDsn } from "./code-scanner.js";
// Main Detection API
export {
detectAllDsns,
detectDsn,
getDsnSourceDescription,
} from "./detector.js";
// Env File Scanner
export type { EnvFileScanResult } from "./env-file.js";
export { detectFromAllEnvFiles, detectFromEnvFiles } from "./env-file.js";
// Error Formatting
export {
formatConflictError,
formatMultipleProjectsFooter,
formatNoDsnError,
formatResolutionError,
} from "./errors.js";
// Utilities (for advanced use)
export {
createDetectedDsn,
createDsnFingerprint,
extractOrgIdFromHost,
inferPackagePath,
isValidDsn,
parseDsn,
stripDsnOrgPrefix,
} from "./parser.js";
// Project Root Detection
export type { ProjectRootReason, ProjectRootResult } from "./project-root.js";
export { findProjectRoot } from "./project-root.js";
// Project Resolution
export { getAccessibleProjects, resolveProject } from "./resolver.js";
// Types
export type {
CachedDsnEntry,
DetectedDsn,
DsnDetectionResult,
DsnSource,
ParsedDsn,
ResolvedProject,
ResolvedProjectInfo,
} from "./types.js";
|