MCPcopy
hub / github.com/vercel/hyper / lsRemote

Function lsRemote

cli/index.ts:98–112  ·  view source on GitHub ↗
(pattern?: string)

Source from the content-addressed store, hash-verified

96);
97
98const lsRemote = (pattern?: string) => {
99 // note that no errors are catched by this function
100 const URL = `https://api.npms.io/v2/search?q=${
101 (pattern && `${pattern}+`) || ''
102 }keywords:hyper-plugin,hyper-theme&size=250`;
103 type npmResult = {package: {name: string; description: string}};
104 return got(URL)
105 .then((response) => JSON.parse(response.body).results as npmResult[])
106 .then((entries) => entries.map((entry) => entry.package))
107 .then((entries) =>
108 entries.map(({name, description}) => {
109 return {name, description};
110 })
111 );
112};
113
114args.command(
115 'search',

Callers 1

index.tsFile · 0.85

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected