mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-06-08 13:11:11 +00:00
optimize code
This commit is contained in:
parent
15798eaae7
commit
785620d55b
6 changed files with 16 additions and 92 deletions
|
@ -131,14 +131,6 @@ export default class OfficialBuilds extends BaseDistribution {
|
|||
return `https://nodejs.org/dist`;
|
||||
}
|
||||
|
||||
protected async getNodejsVersions(): Promise<INodeVersion[]> {
|
||||
const initialUrl = this.getDistributionUrl();
|
||||
const dataUrl = `${initialUrl}/index.json`;
|
||||
|
||||
let response = await this.httpClient.getJson<INodeVersion[]>(dataUrl);
|
||||
return response.result || [];
|
||||
}
|
||||
|
||||
private getManifest(): Promise<tc.IToolRelease[]> {
|
||||
core.debug('Getting manifest from actions/node-versions@main');
|
||||
return tc.getManifestFromRepo(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue