mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
23 lines
698 B
TypeScript
23 lines
698 B
TypeScript
|
'use strict';
|
||
|
|
||
|
// Returns a list of stale plugins and their authors email
|
||
|
|
||
|
import axios from 'axios'
|
||
|
const currentTime = new Date();
|
||
|
|
||
|
(async () => {
|
||
|
const res = await axios.get<string>('https://static.etherpad.org/plugins.full.json');
|
||
|
for (const plugin of Object.keys(res.data)) {
|
||
|
// @ts-ignore
|
||
|
const name = res.data[plugin].data.name;
|
||
|
// @ts-ignore
|
||
|
const date = new Date(res.data[plugin].time);
|
||
|
const diffTime = Math.abs(currentTime.getTime() - date.getTime());
|
||
|
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
|
||
|
if (diffDays > (365 * 2)) {
|
||
|
// @ts-ignore
|
||
|
console.log(`${name}, ${res.data[plugin].data.maintainers[0].email}`);
|
||
|
}
|
||
|
}
|
||
|
})();
|