Skip to content

Commit 6df22c0

Browse files
committed
feat: ir mapping for astro projects
1 parent 8a15069 commit 6df22c0

4 files changed

Lines changed: 378 additions & 28 deletions

File tree

eslint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default [
1313
'docs/architecture/**',
1414
'tools/**',
1515
'site/**',
16-
`src/extractors/builtin/basic-astro`,
16+
// `src/extractors/builtin/basic-astro`,
1717
],
1818
},
1919

src/extractors/builtin/basic-astro/file-parser.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ export async function parseFiles(filePaths: string[]): Promise<FileExtraction[]>
4747
// Extract imports from frontmatter
4848
const imports = extractImports(frontmatter);
4949

50-
// Find slots in the template
51-
const slots = findSlots(content);
50+
// Find slots in the template (reserved for future Astro metadata extraction)
51+
const _slots = findSlots(content);
5252

53-
// Extract client directives
54-
const clientDirective = findClientDirective(content);
53+
// Extract client directives (reserved for future Astro metadata extraction)
54+
const _clientDirective = findClientDirective(content);
5555

5656
// Extract component usage from template
5757
const componentUsage = extractComponentUsage(content, imports, filePath);

src/extractors/builtin/basic-astro/index.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@ export const basicAstro: ArchletteExtractor = async (
2121
const log = ctx.log;
2222
log.info(`Running basic-astro extractor: ${node.name || 'unnamed'}`);
2323

24-
// Parse inputs
24+
// Parse inputs (will be used in Phase 7)
2525
const inputs = node.inputs as ExtractorInputs;
26-
const include = inputs.include || ['**/*.astro'];
27-
const exclude = inputs.exclude || [];
26+
const _include = inputs.include || ['**/*.astro'];
27+
const _exclude = inputs.exclude || [];
2828

29-
// TODO: Implement extraction pipeline
30-
// 1. Find Astro files
31-
// 2. Parse files with Astro compiler
32-
// 3. Extract components, actors, relationships
33-
// 4. Map to IR
29+
// TODO: Implement extraction pipeline (Phase 7)
30+
// 1. Find Astro files using findAstroFiles(include, exclude)
31+
// 2. Parse files with parseFiles(filePaths)
32+
// 3. Find packages with findPackages()
33+
// 4. Map to IR with mapToIR(extractions, packages)
3434

35-
log.warn('Astro extractor not yet implemented');
35+
log.warn('Astro extractor not yet implemented - Phase 7 pending');
3636

3737
return createEmptyIR(node.name || 'Astro System');
3838
};

0 commit comments

Comments
 (0)