From 529c17da569d2b589c69ed0aa7ee595e69aa77e3 Mon Sep 17 00:00:00 2001 From: Bet4 <0xbet4@gmail.com> Date: Mon, 27 Apr 2020 22:10:38 +0800 Subject: [PATCH] Show more plugins when use command list-remote --- cli/index.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cli/index.ts b/cli/index.ts index 836f1c3e..7fc03d53 100644 --- a/cli/index.ts +++ b/cli/index.ts @@ -13,8 +13,6 @@ import got from 'got'; import ora from 'ora'; import * as api from './api'; -const PLUGIN_PREFIX = 'hyper-'; - let commandPromise: Promise; const assertPluginName = (pluginName: string) => { @@ -83,11 +81,12 @@ args.command( const lsRemote = (pattern?: string) => { // note that no errors are catched by this function - const URL = `https://api.npms.io/v2/search?q=${(pattern && `${pattern}+`) || ''}keywords:hyper-plugin,hyper-theme`; + const URL = `https://api.npms.io/v2/search?q=${ + (pattern && `${pattern}+`) || '' + }keywords:hyper-plugin,hyper-theme&size=250`; return got(URL) .then((response) => JSON.parse(response.body).results as any[]) .then((entries) => entries.map((entry) => entry.package)) - .then((entries) => entries.filter((entry) => entry.name.indexOf(PLUGIN_PREFIX) === 0)) .then((entries) => entries.map(({name, description}) => { return {name, description};