Conversation
| * e.g. src/menu/adapt-contrib-boxMenu → 'menu' | ||
| * @returns {string|null} | ||
| */ | ||
| getTypeFromProjectPath () { |
There was a problem hiding this comment.
Does this not make the rest of the getType code redundant?
There was a problem hiding this comment.
The path-based check only applies when the plugin is already installed on disk (this.projectPath is set). For a fresh install on a clean project, getTypeFromProjectPath() returns null and falls through to the existing attribute/keyword detection.
So the rest of getType is still needed for first-time installs where no project path exists yet.
Posted via collaboration with Claude Code
There was a problem hiding this comment.
I'd much rather you figured out why it's getting installed in the component directory and fix that, rather than side stepping it with this solution.
I don't see an explanation of why the issue is happening in this solution.
The bower to npm goal will be to install all of the plugins in a node_modules folder, where this code is counter to that direction.
Fixes #235
Fix
fetchProjectInfo()is now called duringloadPluginData()so the CLI knows what's already on disksrc/menu/adapt-contrib-boxMenu→ typemenu) before falling back to keyword/attribute detection — this prevents already-installed plugins from being misrouted to the defaultsrc/components/directoryTesting
adapt-contrib-boxMenuis installed insrc/menu/and listed inadapt.jsonwith"*"adapt install adapt-contrib-mediaadapt-contrib-boxMenuis NOT duplicated intosrc/components/adapt install(no args) and verify all plugins go to their correct type directoriesadapt install adapt-contrib-boxMenuand verify it installs tosrc/menu/