zowe-cli
zowe-cli copied to clipboard
`zowe plugins list` registry qualification
From @dkelosky on May 17, 2018 14:15
If a plugin is installed via a scoped registry, the scoped registry is not displayed on the zowe plugins list
command.
For example, if scoped package xyz
where installed from a registry qualified by the scoped zowe
the displayed registry could be misleading.
In other words if @zowe/xyz
were installed from a registry hosted on JFrog, it could be displayed as though it came from npmjs
:
$ zowe plugins list
Installed plugins:
-- pluginName: @zowe/xyz
-- package: @zowe/xyz
-- version: 0.0.1-20
-- registry: https://registry.npmjs.org/
Copied from original issue: gizafoundation/brightside#77
From @AHumanFromCA on May 17, 2018 14:17
This requires an enhancement to imperative.
From @AHumanFromCA on August 20, 2018 14:4
Perhaps a quick way to address this is when listing or installing plugins we could output every scoped registry we find. Then we could change the --registry flag to be --non-scoped-registry or keep the flag the same and change the doc so that people understand what is happening. Otherwise you would say that the registry would be bintray but that is also a lie since only the scoped packages are downloaded from there, everything else is pulled from the npm registry.
Our CLI component is not hosted on a registry at all yet is shown as the above example on a zowe plugins list - incorrectly in my view. I tried adding private: true to package.js but it made no difference.
From an internal conversation:
Perhaps we could make use of metadata that NPM adds to the plugin's package.json at install time? For example, in my
~/.zowe/plugins/installed/node_modules/@broadcom/jclcheck-for-zowe-cli/package.json
file there is a line:"_resolved": "https://registry.npmjs.org/@broadcom/jclcheck-for-zowe-cli/-/jclcheck-for-zowe-cli-1.1.2.tgz",
Edit: This metadata appears to no longer be generated by npm@8 😢
As recently discussed, it may be better to not display the registry at all.
--no-location as a new flag npm view before npm installing the package proper error handling around npm view command npm-package-arg to be be used to determine if registry vs .tgz install.