I ended up there while bisecting repository → repositoryBase 's silent (and partialy a breaking) change. I believe this PR removed support of setting repository in the configuration file, which makes tldr fallback to default assets instead of the specified one. To handle this:
Update documentation according to the code (to supply a base url and construct the actual download inside tldr) and note it's a breaking change
Add a condition to allow all-language download if repository was specified (this makes it backwards compatible)
I think one of the two (prefferably both) of the above measures should be taken. (I think the second one should be implemented with a deprecation warning of some form as it's inefficient for both the client and the server)(if we're going to implement it)
Affected codes between prior to #420 and the current main branch (7ad3c5aa53a40adc3ac419ca682776d20bc828cd..c58c92cd4806840dbe094f28a2a1c47c0f00c67d):
I don't have time currently to make a PR on my own now, so I would appreciate if someone could handle this. However if this remains for a month or two, maybe I can put my hands on it.
following up #420
I ended up there while bisecting
repository
→repositoryBase
's silent (and partialy a breaking) change. I believe this PR removed support of settingrepository
in the configuration file, which makes tldr fallback to default assets instead of the specified one. To handle this:repository
was specified (this makes it backwards compatible)I think one of the two (prefferably both) of the above measures should be taken. (I think the second one should be implemented with a deprecation warning of some form as it's inefficient for both the client and the server)(if we're going to implement it)
Affected codes between prior to #420 and the current main branch (7ad3c5aa53a40adc3ac419ca682776d20bc828cd..c58c92cd4806840dbe094f28a2a1c47c0f00c67d):
config.json: https://github.com/tldr-pages/tldr-node-client/blob/7ad3c5aa53a40adc3ac419ca682776d20bc828cd/config.json#L3 https://github.com/tldr-pages/tldr-node-client/blob/c58c92cd4806840dbe094f28a2a1c47c0f00c67d/config.json#L3
lib/cache.js https://github.com/tldr-pages/tldr-node-client/blob/7ad3c5aa53a40adc3ac419ca682776d20bc828cd/lib/cache.js#L53-L56 https://github.com/tldr-pages/tldr-node-client/blob/c58c92cd4806840dbe094f28a2a1c47c0f00c67d/lib/cache.js#L51-L56
lib/remote.js https://github.com/tldr-pages/tldr-node-client/blob/7ad3c5aa53a40adc3ac419ca682776d20bc828cd/lib/remote.js#L8-L9 https://github.com/tldr-pages/tldr-node-client/blob/c58c92cd4806840dbe094f28a2a1c47c0f00c67d/lib/remote.js#L10-L15
I don't have time currently to make a PR on my own now, so I would appreciate if someone could handle this. However if this remains for a month or two, maybe I can put my hands on it.