refactor: migrate ResourcePathResolver.ts to use vault.adapter

- Replace all fs operations with vault.adapter methods
- Replace fs.readdirSync with vault.adapter.list for directory scanning
- Replace fs.existsSync with PathUtils.fileExists
- Replace path.join with PathUtils.joinPath for vault paths
- Remove fs/fsPromises imports, add PathUtils import
- Add plugin parameter to constructor for vault.adapter access
- Update PandocCommandBuilder to pass plugin to ResourcePathResolver
- Maintain resource discovery functionality for Pandoc
This commit is contained in:
Jarvis committed 2025-09-25 12:27:33 +02:00
1 parent f8142f995a
commit ee79ed3f74
2 files changed
+35 -34

No files matched your search

@@ -20,7 +20,7 @@ export class PandocCommandBuilder {
constructor(plugin: obsidianTypstPDFExport) {
this.plugin = plugin;
this.variableMapper = new TypstVariableMapper(plugin);
this.resourcePathResolver = new ResourcePathResolver();
this.resourcePathResolver = new ResourcePathResolver(plugin);
this.pathResolver = new PathResolver(plugin);
}