engine
engine copied to clipboard
output of `ota lint` doesn't seem to point out location of Invalid URLs it finds
In https://github.com/tosdr/tosdr-declarations/pull/12#issuecomment-2031640381 we see an ota lint failure, but running it locally I see:
npm run lint
> lint
> ota lint
1) Uncaught error outside test suite
0 passing (1ms)
1 failing
1) Uncaught error outside test suite:
Uncaught TypeError: Invalid URL
at new URL (node:internal/url:775:36)
at new SourceDocument (file:///Users/michiel/gh/tosdr/tosdr-declarations/node_modules/@opentermsarchive/engine/src/archivist/services/sourceDocument.js:10:15)
at loadServiceDocument (file:///Users/michiel/gh/tosdr/tosdr-declarations/node_modules/@opentermsarchive/engine/src/archivist/services/index.js:66:26)
at async Promise.all (index 0)
at async file:///Users/michiel/gh/tosdr/tosdr-declarations/node_modules/@opentermsarchive/engine/src/archivist/services/index.js:28:5
at async Promise.all (index 37)
at async load (file:///Users/michiel/gh/tosdr/tosdr-declarations/node_modules/@opentermsarchive/engine/src/archivist/services/index.js:23:3)
at async Module.loadWithHistory (file:///Users/michiel/gh/tosdr/tosdr-declarations/node_modules/@opentermsarchive/engine/src/archivist/services/index.js:101:20)
at async default (file:///Users/michiel/gh/tosdr/tosdr-declarations/node_modules/@opentermsarchive/engine/scripts/declarations/lint/index.mocha.js:25:31)
And no further info. Does this lint tool have something like a verbose version where it tells you the location of the Invalid URL it finds?
See comment in MatterMost from @Ndpnt
Said comment unblocks the specific case through https://github.com/tosdr/tosdr-declarations/pull/14, and also states:
We already planned to work on improving the validation tooling. However, it will take a few weeks for these enhancements to be available.