getImporterFilename() — astro Function Reference
Architecture documentation for the getImporterFilename() function in config.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 65db2577_d5e4_a284_6317_4ddba4134e0d["getImporterFilename()"] be7d1eab_916b_90f9_3072_d169ed547abf["config.ts"] 65db2577_d5e4_a284_6317_4ddba4134e0d -->|defined in| be7d1eab_916b_90f9_3072_d169ed547abf 0fc0b3cd_d192_5ff3_ce5a_937f5bcee001["defineLiveCollection()"] 0fc0b3cd_d192_5ff3_ce5a_937f5bcee001 -->|calls| 65db2577_d5e4_a284_6317_4ddba4134e0d 712677ed_d546_aba3_061e_3f904b7b139f["defineCollection()"] 712677ed_d546_aba3_061e_3f904b7b139f -->|calls| 65db2577_d5e4_a284_6317_4ddba4134e0d style 65db2577_d5e4_a284_6317_4ddba4134e0d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/content/config.ts lines 7–25
function getImporterFilename() {
// Find the first line in the stack trace that doesn't include 'defineCollection' or 'getImporterFilename'
const stackLine = new Error().stack
?.split('\n')
.find(
(line) =>
!line.includes('defineCollection') &&
!line.includes('defineLiveCollection') &&
!line.includes('getImporterFilename') &&
!line.startsWith('Error'),
);
if (!stackLine) {
return undefined;
}
// Extract the relative path from the stack line
const match = /\/((?:src|chunks)\/.*?):\d+:\d+/.exec(stackLine);
return match?.[1] ?? undefined;
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does getImporterFilename() do?
getImporterFilename() is a function in the astro codebase, defined in packages/astro/src/content/config.ts.
Where is getImporterFilename() defined?
getImporterFilename() is defined in packages/astro/src/content/config.ts at line 7.
What calls getImporterFilename()?
getImporterFilename() is called by 2 function(s): defineCollection, defineLiveCollection.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free