mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
16 lines
353 B
JavaScript
16 lines
353 B
JavaScript
'use strict';
|
|
|
|
const fetch = require('node-fetch');
|
|
|
|
function getLatestEventGatewayVersion() {
|
|
const url = 'https://api.github.com/repos/serverless/event-gateway/releases/latest';
|
|
|
|
return fetch(url, {
|
|
method: 'GET',
|
|
timeout: 10000,
|
|
}).then(res => res.json())
|
|
.then(json => json.name);
|
|
}
|
|
|
|
module.exports = getLatestEventGatewayVersion;
|