Within my composer package, I require a script be enqueued, I get its "base" path with plugin_dir_url( __FILE__ )
and then append Assets/JS/my_script.js
to get the full path, problem is, if someone installs my package and uses it inside a theme, that function isn't going to work, yet the package itself is supposed to work just fine.
What is the alternative here? Isn't there a function that tells me the current path I'm in, no matter if a plugin or theme?