Moving all JS dependencies to vendor core

While the application runs the JS dependencies that are being used are derived from Foreman.
In case your plugin uses a different version of a module, it will still resolve to the version Foreman.
and if you add a new module to your plugin, it will be used.

basically, in a plugin we need devDependencies only for lining, testing, and creating docs.
while the actual dependencies will be derived from Foreman that installs "@theforeman/vendor".
and a couple of extra dependencies.

as a best practice, I think we should move all dependencies from foreman and from plugins to foreman-js so we don’t end with overriding accidentally each plugin’s unique JS libs, here is the list of dependencies in foreman-js: foreman-js/package.json at master · theforeman/foreman-js · GitHub
and it also makes it much easier to bump the version of "@theforeman/vendor" in packaging, instead of adding multiple different libs.

before you do move packages from your plugin to foreman-js,
please make sure that the package is actually being used, so we could do some cleanup :slight_smile:

Once we move all dependencies to one place,
I also think we could remove the ./script/npm_install_plugins.js script in Foreman,
as all dependency will be derived from @theforeman/vendor

I think that might break commands in plugins, for instance npm run test in Katello directory runs npx jest webpack, and I think npx first looks in node_modules (in Katello dir.) for the jest command, and then if it doesn’t find it, downloads it from npm and installs it. npx wouldn’t be smart enough to look in ../foreman/node_modules