Closed line-o closed 1 year ago
example output of the templating library with --extended
templating
Title: eXist-db HTML Templating Library
URI: http://exist-db.org/html-templating
Author: eXist-db Project
Description: This package contains the HTML templating library for eXist, which was previously part of the now deprecated 'shared-resources'
Website: https://github.com/eXist-db/templating
Version: 1.1.0
Installed: 2023-01-04T17:05:21.129+01:00
Processor: existdb >=5.2.0
Type: library
License: LGPL-2.1
Components:
xquery:
http://exist-db.org/xquery/html-templating
http://exist-db.org/xquery/html-templating/lib
Example output of xst package list --app --versions --dependencies
dashboard 2.0.9
├── functx >=1.0
└── packageservice >=1.3.8
eXide 3.4.0
└── (no dependency)
exist-documentation 5.4.0
└── templating >=1.0.2
fundocs 1.2.0
└── templating >=1.0.2
monex 3.0.5
└── templating >=1.0.2
packageservice 1.3.14
├── functx *
└── semver-xq *
With --dependencies
each dependency will be checked to be installed and version mismatches detected.
Example output for exist-documentation when the templating module is not installed:
exist-documentation 5.4.0
└── ! http://exist-db.org/html-templating >=1.0.2
Example --extended
output for functx
functx
Title: FunctX library
Name: http://www.functx.com
Author: Priscilla Walmsley
Description: The FunctX XQuery/XSLT 2.0 function library is a set of reusable functions for XQuery 1.0 and XSLT 2.0. The project itself is an open source application and framework for developers to create function libraries.
Website: http://www.functx.com/
Version: 1.0.1
Installed: 2023-01-06T21:41:14.261+01:00
Processor: any
Type: library
License: GNU-LGPL
Components:
xslt: http://www.functx.com/functx.xsl
xquery: http://www.functx.com
--raw
can be used to pipe the json result to jq
xst package list --raw | jq '.packages[0]' -M
{
"date": "2023-01-04T17:05:22.989+01:00",
"processor": {
"name": "http://exist-db.org",
"semverMin": "5.3.0-SNAPSHOT",
"semverMax": null,
"semver": null,
"versions": []
},
"components": {
"xslt": [],
"xquery": [],
"xproc": [],
"xsd": [],
"rng": [],
"schematron": [],
"nvdl": [],
"resource": [],
"jar": []
},
"website": "https://www.github.com/exist-db/documentation",
"abbrev": "fundocs",
"target": "fundocs",
"description": null,
"type": "application",
"name": "http://exist-db.org/apps/fundocs",
"authors": [
"eXist-db"
],
"version": "1.2.0",
"title": "XQuery Function Documentation",
"dependencies": [
{
"name": "http://exist-db.org/html-templating",
"semverMin": "1.0.2",
"semverMax": null,
"semver": null,
"versions": []
}
],
"license": "GNU Lesser General Public License, version 2.1"
}
In this raw output, "template" is again a bit misleading. Best to call the properties what they are in the spec: semver-min
, semver-max
, semver
, versions
, and name
.
URI:
also doesn't conform to the spec. The property is @name
, not @uri
. In public-repo, we use "Name (URI)" to distinguish the @name
property from the package's <title>
. I'd suggest either Name:
or Name (URI):
. (The package spec says the property is an IRI, but in practice I've only ever seen URIs... not to say I can tell you what the difference is without googling.)
I will rename uri
to name
. I think that is sensible to do as it is in fact a free-text property.
In this raw output, "template" is again a bit misleading. Best to call the properties what they are in the spec:
semver-min
,semver-max
,semver
,versions
, andname
.
I asked about a better name for template above :) Property names in JSON with hyphens are possible, but I would want to avoid them as it makes it less comfortable to work with in JS. It is also somewhat uncommon. We could either
semverMin
, semverMax
, semver
, versions
)min
, max
, range
, versions
)I do see the value of staying close to the input XML, but it is already aggregated. components.xquery
for example combines the information from expath-pkg.xml and exist.xml to show all registered module names in one place.
The property names of dependencies now reflect the attribute names of declared dependencies @joewiz (see updated --raw output).
@joewiz all suggested changes are now implemented. The package itself still had a uri
property which is now renamed to name
.
Also the command line flag --full-uri
was renamed to --full-name
:tada: This PR is included in version 1.2.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
closes #7
Implements all options in #7 and then some. Except the ability to filter the list using a globbing expression. This should rather be done as a separate command
xst package info <package-abbrev>
.