9 url: 'https://support.apple.com/en-us/HT208202'
12 name: 'OS X El Capitan',
17 url: 'https://support.apple.com/en-us/HT206886'
20 name: 'OS X Yosemite',
24 url: 'https://support.apple.com/en-us/HT210717'
29 Connection: 'keep-alive',
30 'Cache-Control': 'max-age=0',
31 'Upgrade-Insecure-Requests': '1',
33 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36',
34 'Sec-Fetch-Dest': 'document',
36 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
37 'Sec-Fetch-Site': 'none',
38 'Sec-Fetch-Mode': 'navigate',
39 'Sec-Fetch-User': '?1',
40 'Accept-Language': 'en-US,en;q=0.9,sq;q=0.8'
43 module.exports = function (request) {
44 var all = { download: '', releases: [] };
47 oses.map(function (os) {
52 }).then(function (resp) {
53 var m = resp.body.match(/(http[^>]+Install[^>]+.dmg)/);
54 var download = m && m[1];
55 ['macos', 'linux'].forEach(function (osname) {
59 channel: os.channel || 'beta',
71 all.releases.sort(function (a, b) {
72 if ('10.11.6' === a.version) {
75 if (a.date > a.date) {
78 if (a.date < a.date) {
86 if (module === require.main) {
87 module.exports(require('@root/request')).then(function (all) {
88 console.info(JSON.stringify(all, null, 2));