linkedsoftwaredependencies / npm-extraction-server Goto Github PK
View Code? Open in Web Editor NEWConvert npm package.json metadata to RDF
License: Other
Convert npm package.json metadata to RDF
License: Other
Stuff like "https://linkedsoftwaredependencies.orgengines/node"
should be "https://linkedsoftwaredependencies.org/engines/node"
I guess
Hi,
Is it possible to add the FOAF profile URL of the authors, contributors, and so on to the RDF?
KR
Pieter
When the server receives a path such as http://localhost:3000/bundles/npm/@solid/community-server/3.0.0/components/context.jsonld
, it has to download the tarball and look in there to find that exact resource. It does this by taking the tail, components/context.jsonld
, and looking for that path. The problem is that this doesn't work if there is no direct mapping between the URL tail and the file path. The package above, for example, has the following in it's package.json
:
"lsd:importPaths": {
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^3.0.0/components/": "dist/components/",
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^3.0.0/config/": "config/",
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^3.0.0/dist/": "dist/",
"https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^3.0.0/templates/config/": "templates/config/"
}
So it should actually find dist/components/context.jsonld
. This requires checking if the incoming URL starts with one of the import paths, or is at least equal by using semver rules on the version number, notice the difference between 3.0.0
and ^3.0.0
above. It then has to check that the trailing part of the URL matches the trailing part of one of the importPath URLs. And then it has to replace the overlapping part with the value of the map. This makes the operation quite a bit more complicated but is feasible to do.
The issue that I have, and why I'm tagging @rubensworks, is because there are 2 other possible ways to configure the package.json
and I'm not sure what is expected there.
First case is having "lsd:module": true
in your config. How is the server supposed to know how to map the URL to a file path in the tarball? I had a look at the example in the documentation, but that caused more confusion since I have no idea how the equivalence there is achieved: https://componentsjs.readthedocs.io/en/latest/getting_started/basics/exposing_components/#packagejson-discovery
The other case is when there are only lsd:contexts
entries. What should be done in that case? Or should only the exact URLs there be supported and mapped to their values, while other paths should be ignored?
Hopefully this reduces the amount of errors
We should add a license to the dataset.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.