Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 Not Found - GET https://xxxxxxxx/%22/-/v1 #47

Open
Randall23 opened this issue Jun 11, 2021 · 4 comments
Open

404 Not Found - GET https://xxxxxxxx/%22/-/v1 #47

Randall23 opened this issue Jun 11, 2021 · 4 comments

Comments

@Randall23
Copy link

Randall23 commented Jun 11, 2021

404 Not Found - GET https://xxxxxxx/-/v1/search?text=*&size=20&from=0&quality=0.65&popularity=0.98&maintenance=0.5
How can I change the endpoint in order to be able to use GET https://xxxxxxx/-/all

@joelspadin-garmin
Copy link
Owner

This uses libnpmsearch which explicitly says it does not support legacy search through /-/all. You will either need to update your registry server to use the current search API or change

private async *findMatchingPackages(query: string | readonly string[], token?: CancellationToken) {
let from = 0;
while (from < MAX_RESULTS) {
if (token?.isCancellationRequested) {
break;
}
const page = await npmsearch(query, {
...this.options,
from,
});
so that it can optionally use a different search function.

@amey2688
Copy link

amey2688 commented Aug 16, 2022

@joelspadin-garmin can you explain more about this error and the solution provided , i am also trying to connect to a private npm artificatory and getting 404 not found error. for testing purpose i have deployed only one package in artifactory .i have given url like https://artifactory.xxx.net:443/artifactory/xxx/

can we not connect to jfrog artifactories using this extension?
since i am simply using private extension manager extension without modifiying your code, is their any way i can fix this without making code changes

@amey2688
Copy link

what query parameters can i set so that it will just fetch first 200 extensions?
i tried to follow documentation but coudnt get it working

@joelspadin-garmin
Copy link
Owner

can we not connect to jfrog artifactories using this extension?

I believe the registry I am using is based on Artifactory, but I was not responsible for setting it up, so I unfortunately don't have any more details about how to get that to work. I do know that we set up a completely separate registry which only contains our extensions. It is not mirroring NPM.

what query parameters can i set so that it will just fetch first 200 extensions?

As the extension is currently written, this is not possible. The extension will read from the server until it has gotten every package or until it hits a hard-coded limit of 1000 packages.

while (from < MAX_RESULTS) {
if (token?.isCancellationRequested) {
break;
}
const page = await npmsearch(query, {
...this.options,
from,
});

Why do you want to limit to 200 extensions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants