Add namespace and multi-catalog support for describe and list-available #81
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
describe
andlist-available
commands made assumptions on an operator existing in only one catalog. It also did not understand namespace-scoped catalogs resulting in incomplete results. It now honors the context namespace as well as the-n
override option to properly detect global vs. namespace-scoped catalogs.I also added additional catalog metadata to the output.
Example output of
describe
when a package exists in two catalogs at the Global and Namespace scopes:Example output of
list-available
when a package exists in two catalogs at the Global and Namespace scopes:Note: I purposely injected the NAMESPACE value into the
list-available
output. Since this is supposed to be a human-readable file, I'm assuming we do not need to preserve backward compatibility. I could add it at the end, but it would be unnatural. If this were to be a machine-readable tool, then I assume we would add a-o json
option.