dat-desktop
dat-desktop copied to clipboard
accept `datproject.org/username/datname` dat links
Like in dat cli, you can do dat clone datproject.org/karissa/mydataset
and it'll get the dat link from the registry and start cloning it.
How is this implemented in the CLI currently?
https://github.com/datproject/dat/blob/master/lib/commands/clone.js#L55
@karissa thanks for the link! Where do you think this logic should go? Dat-node? A small helper lib? A dat registry module? Hm :)
The idea is that the link itself should return a certain pattern {key:...} I believe, so it doesn't have to be fancy
There is a datproject/dat-registry-client library though maybe there?
I'm mostly wondering if wherever you can clone a dat those links should be accepted, and thus resolution should be part of a central library
It's hard to know what links are accepted ahead of time without pinging the URL, because you could have anther instance of the registry with a different host, or have a dns record
yeah, but I mean if resolving those urls were part of dat-node for example, we would get this feature for free in all tools using dat-node
yeah, but I mean if resolving those urls were part of dat-node for example, we would get this feature for free in all tools using dat-node
+1 I can put this on my list for dat-node. Using https://github.com/joehand/dat-link-resolve in CLI but no reason I can't resolve keys directly in dat-node.
Should work with dat-node 3.4.0
!
nice