mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 07:35:05 -04:00
Ported bin folder to typescript.
This commit is contained in:
parent
a768b322cf
commit
f9e3416d78
24 changed files with 346 additions and 1123 deletions
22
bin/plugins/stalePlugins.ts
Normal file
22
bin/plugins/stalePlugins.ts
Normal file
|
@ -0,0 +1,22 @@
|
|||
'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}`);
|
||||
}
|
||||
}
|
||||
})();
|
Loading…
Add table
Add a link
Reference in a new issue