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:
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user