Skip to content

Commit

Permalink
fix: [DEVXBUGS-10865] "Explore and Install Generators" page is empty (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-gilin authored Jan 23, 2023
1 parent 60c594b commit c7cad32
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/backend/src/utils/npm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ export type PackagesData = {
export const isWin32 = platform() === "win32";
const NPM = isWin32 ? "npm.cmd" : "npm";

const NPM_REGISTRY_HOST = _.get(process, "env.NPM_CFG_REGISTRY", "http://registry.npmjs.com/");
const SEARCH_QUERY_PREFIX = `${NPM_REGISTRY_HOST}-/v1/search?text=`;
const regUrl = new URL(_.get(process, "env.NPM_CFG_REGISTRY", "http://registry.npmjs.com/"));
regUrl.pathname = `-/v1/search`;
const SEARCH_QUERY_PREFIX = `${regUrl.toString()}?text=`;
const SEARCH_QUERY_SUFFIX = "keywords:yeoman-generator &size=25&ranking=popularity";

const CANCELED = "Action cancelled";
Expand Down

0 comments on commit c7cad32

Please sign in to comment.