Skip to content

Commit c407c26

Browse files
authored
fix: search npmjs registry for community plugins
1 parent c42692f commit c407c26

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

main/plugins/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,13 @@ export class Plugins extends EventEmitter {
133133
}
134134

135135
async getFromNpm() {
136-
const url = 'https://api.npms.io/v2/search?q=keywords:kap-plugin+not:deprecated';
136+
const url = 'https://registry.npmjs.com/-/v1/search?text=keywords:kap-plugin+not:deprecated';
137137
const response = (await got(url, {json: true})) as {
138-
body: {results: Array<{package: NormalizedPackageJson}>};
138+
body: {objects: Array<{package: NormalizedPackageJson}>};
139139
};
140140
const installed = this.pluginNames;
141141

142-
return Promise.all(response.body.results
142+
return Promise.all(response.body.objects
143143
.map(x => x.package)
144144
.filter(x => x.name.startsWith('kap-'))
145145
.filter(x => !installed.includes(x.name)) // Filter out installed plugins

0 commit comments

Comments
 (0)