From 2010c622262ac15597d528f4f5be3094149bf7e2 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Mon, 14 Oct 2024 09:03:22 +0000 Subject: [PATCH] ref(githubish): automated removal of unused request --- _example/releases.js | 4 ++-- arc/releases.js | 6 +++--- atomicparsley/releases.js | 6 +++--- awless/releases.js | 6 +++--- bat/releases.js | 6 +++--- bun/releases.js | 6 +++--- caddy/releases.js | 6 +++--- cilium/releases.js | 4 ++-- cmake/releases.js | 6 +++--- comrak/releases.js | 6 +++--- crabz/releases.js | 6 +++--- curlie/releases.js | 6 +++--- dashcore/releases.js | 6 +++--- dashmsg/releases.js | 6 +++--- delta/releases.js | 6 +++--- deno/releases.js | 6 +++--- dotenv-linter/releases.js | 6 +++--- dotenv/releases.js | 6 +++--- fd/releases.js | 6 +++--- ffmpeg/releases.js | 6 +++--- ffuf/releases.js | 6 +++--- fish/releases.js | 6 +++--- fzf/releases.js | 6 +++--- gh/releases.js | 6 +++--- git/releases.js | 6 +++--- gitdeploy/releases.js | 6 +++--- gitea/releases.js | 6 +++--- goreleaser/releases.js | 6 +++--- gprox/releases.js | 6 +++--- grype/releases.js | 6 +++--- hexyl/releases.js | 6 +++--- hugo-extended/releases.js | 6 +++--- hugo/releases.js | 6 +++--- jq/releases.js | 6 +++--- k9s/releases.js | 6 +++--- keypairs/releases.js | 6 +++--- kind/releases.js | 6 +++--- koji/releases.js | 6 +++--- kubectx/releases.js | 6 +++--- kubens/releases.js | 6 +++--- lf/releases.js | 6 +++--- lsd/releases.js | 6 +++--- mutagen/releases.js | 6 +++--- ollama/releases.js | 6 +++--- ots/releases.js | 6 +++--- pandoc/releases.js | 6 +++--- pathman/releases.js | 6 +++--- pwsh/releases.js | 6 +++--- rclone/releases.js | 6 +++--- rg/releases.js | 6 +++--- ripgrep/releases.js | 6 +++--- sass/releases.js | 6 +++--- sclient/releases.js | 6 +++--- sd/releases.js | 6 +++--- serviceman/releases.js | 6 +++--- shellcheck/releases.js | 6 +++--- shfmt/releases.js | 6 +++--- sqlpkg/releases.js | 6 +++--- sttr/releases.js | 6 +++--- syncthing/releases.js | 6 +++--- tinygo/releases.js | 6 +++--- trip/releases.js | 6 +++--- watchexec/releases.js | 6 +++--- xcaddy/releases.js | 6 +++--- xsv/releases.js | 6 +++--- xz/releases.js | 6 +++--- yq/releases.js | 6 +++--- zoxide/releases.js | 6 +++--- 68 files changed, 202 insertions(+), 202 deletions(-) diff --git a/_example/releases.js b/_example/releases.js index a9e4599..ca60b98 100644 --- a/_example/releases.js +++ b/_example/releases.js @@ -14,8 +14,8 @@ var repo = 'ripgrep'; let Releases = module.exports; -Releases.latest = async function (request) { - let all = await github(request, owner, repo); +Releases.latest = async function () { + let all = await github(null, owner, repo); return all; }; diff --git a/arc/releases.js b/arc/releases.js index 222720e..15e622e 100644 --- a/arc/releases.js +++ b/arc/releases.js @@ -4,15 +4,15 @@ var github = require('../_common/github.js'); var owner = 'mholt'; var repo = 'archiver'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { all._names = ['archiver', 'arc']; return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); // just select the first 5 for demonstration all.releases = all.releases.slice(0, 5); diff --git a/atomicparsley/releases.js b/atomicparsley/releases.js index 24b4e7d..588041b 100644 --- a/atomicparsley/releases.js +++ b/atomicparsley/releases.js @@ -32,8 +32,8 @@ let targets = { }, }; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { for (let rel of all.releases) { let windows32 = rel.name.includes('WindowsX86.'); if (windows32) { @@ -71,7 +71,7 @@ module.exports = function (request) { }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); console.info(JSON.stringify(all)); //console.info(JSON.stringify(all, null, 2)); diff --git a/awless/releases.js b/awless/releases.js index 281dfbf..112a60e 100644 --- a/awless/releases.js +++ b/awless/releases.js @@ -4,8 +4,8 @@ var github = require('../_common/github.js'); var owner = 'wallix'; var repo = 'awless'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { // remove checksums and .deb all.releases = all.releases.filter(function (rel) { return !/(\.txt)|(\.deb)$/i.test(rel.name); @@ -15,7 +15,7 @@ module.exports = function (request) { }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); console.info(JSON.stringify(all)); }); diff --git a/bat/releases.js b/bat/releases.js index 9e64ace..c75307c 100644 --- a/bat/releases.js +++ b/bat/releases.js @@ -4,14 +4,14 @@ var github = require('../_common/github.js'); var owner = 'sharkdp'; var repo = 'bat'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); all.releases = all.releases.slice(0, 10); //console.info(JSON.stringify(all)); diff --git a/bun/releases.js b/bun/releases.js index 653b60f..1238c15 100644 --- a/bun/releases.js +++ b/bun/releases.js @@ -4,8 +4,8 @@ var github = require('../_common/github.js'); var owner = 'oven-sh'; var repo = 'bun'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { all.releases = all.releases .filter(function (r) { let isDebug = r.name.includes('-profile'); @@ -30,7 +30,7 @@ module.exports = function (request) { }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); // just select the first 5 for demonstration all.releases = all.releases.slice(0, 5); diff --git a/caddy/releases.js b/caddy/releases.js index 837b1fe..bebfea3 100644 --- a/caddy/releases.js +++ b/caddy/releases.js @@ -4,8 +4,8 @@ var github = require('../_common/github.js'); var owner = 'caddyserver'; var repo = 'caddy'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { // remove checksums and .deb all.releases = all.releases.filter(function (rel) { let isOneOffAsset = rel.download.includes('buildable-artifact'); @@ -20,7 +20,7 @@ module.exports = function (request) { }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); console.info(JSON.stringify(all)); }); diff --git a/cilium/releases.js b/cilium/releases.js index ab51e41..6d79ca0 100644 --- a/cilium/releases.js +++ b/cilium/releases.js @@ -4,8 +4,8 @@ var github = require('../_common/github.js'); var owner = 'cilium'; var repo = 'cilium-cli'; -module.exports = async function (request) { - let all = await github(request, owner, repo); +module.exports = async function () { + let all = await github(null, owner, repo); return all; }; diff --git a/cmake/releases.js b/cmake/releases.js index 638dad2..b9f4d08 100644 --- a/cmake/releases.js +++ b/cmake/releases.js @@ -4,8 +4,8 @@ var github = require('../_common/github.js'); var owner = 'Kitware'; var repo = 'CMake'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { for (let rel of all.releases) { if (rel.version.startsWith('v')) { rel._version = rel.version.slice(1); @@ -44,7 +44,7 @@ module.exports = function (request) { }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); // just select the first 5 for demonstration all.releases = all.releases.slice(0, 5); diff --git a/comrak/releases.js b/comrak/releases.js index 9bfc116..29cf252 100644 --- a/comrak/releases.js +++ b/comrak/releases.js @@ -6,8 +6,8 @@ var repo = 'comrak'; var ODDITIES = ['-musleabihf.1-']; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { let builds = []; loopBuilds: for (let build of all.releases) { @@ -31,7 +31,7 @@ module.exports = function (request) { }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); all.releases = all.releases.slice(0, 10); //console.info(JSON.stringify(all)); diff --git a/crabz/releases.js b/crabz/releases.js index e93491e..e8142c2 100644 --- a/crabz/releases.js +++ b/crabz/releases.js @@ -4,8 +4,8 @@ var github = require('../_common/github.js'); var owner = 'sstadick'; var repo = 'crabz'; -module.exports = async function (request) { - let all = await github(request, owner, repo); +module.exports = async function () { + let all = await github(null, owner, repo); let releases = []; for (let rel of all.releases) { @@ -22,7 +22,7 @@ module.exports = async function (request) { }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); // just select the first 5 for demonstration all.releases = all.releases.slice(0, 5); diff --git a/curlie/releases.js b/curlie/releases.js index 2f50a3b..ea8caf9 100644 --- a/curlie/releases.js +++ b/curlie/releases.js @@ -4,15 +4,15 @@ var github = require('../_common/github.js'); var owner = 'rs'; var repo = 'curlie'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { all._names = ['curlie', 'curl-httpie']; return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); all.releases = all.releases.slice(0, 10); //console.info(JSON.stringify(all)); diff --git a/dashcore/releases.js b/dashcore/releases.js index 0c44963..b86127a 100644 --- a/dashcore/releases.js +++ b/dashcore/releases.js @@ -4,8 +4,8 @@ var github = require('../_common/github.js'); var owner = 'dashpay'; var repo = 'dash'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { all.releases.forEach(function (rel) { if (rel.name.includes('osx64')) { rel.os = 'macos'; @@ -22,7 +22,7 @@ module.exports = function (request) { }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); // just select the first 5 for demonstration all.releases = all.releases.slice(0, 5); diff --git a/dashmsg/releases.js b/dashmsg/releases.js index 7ae7371..07e90c8 100644 --- a/dashmsg/releases.js +++ b/dashmsg/releases.js @@ -4,14 +4,14 @@ var github = require('../_common/github.js'); var owner = 'dashhive'; var repo = 'dashmsg'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); console.info(JSON.stringify(all, null, 2)); }); diff --git a/delta/releases.js b/delta/releases.js index 47c16ac..7f2c4e7 100644 --- a/delta/releases.js +++ b/delta/releases.js @@ -4,14 +4,14 @@ var github = require('../_common/github.js'); var owner = 'dandavison'; var repo = 'delta'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); // just select the first 15 for demonstration all.releases = all.releases.slice(0, 15); diff --git a/deno/releases.js b/deno/releases.js index 9638648..eeaf6cb 100644 --- a/deno/releases.js +++ b/deno/releases.js @@ -6,8 +6,8 @@ var github = require('../_common/github.js'); var owner = 'denoland'; var repo = 'deno'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { // remove checksums and .deb all.releases = all.releases .filter(function (rel) { @@ -35,7 +35,7 @@ module.exports = function (request) { }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); console.info(JSON.stringify(all, null, 2)); }); diff --git a/dotenv-linter/releases.js b/dotenv-linter/releases.js index f30da76..190512e 100644 --- a/dotenv-linter/releases.js +++ b/dotenv-linter/releases.js @@ -4,14 +4,14 @@ var github = require('../_common/github.js'); var owner = 'dotenv-linter'; var repo = 'dotenv-linter'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); // just select the first 5 for demonstration all.releases = all.releases.slice(0, 5); diff --git a/dotenv/releases.js b/dotenv/releases.js index 0e26faf..92a88d1 100644 --- a/dotenv/releases.js +++ b/dotenv/releases.js @@ -4,14 +4,14 @@ var github = require('../_common/github.js'); var owner = 'therootcompany'; var repo = 'dotenv'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); console.info(JSON.stringify(all)); }); diff --git a/fd/releases.js b/fd/releases.js index 8f71619..2a3e093 100644 --- a/fd/releases.js +++ b/fd/releases.js @@ -4,8 +4,8 @@ var github = require('../_common/github.js'); var owner = 'sharkdp'; var repo = 'fd'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { let builds = []; for (let build of all.releases) { @@ -22,7 +22,7 @@ module.exports = function (request) { }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); all.releases = all.releases.slice(0, 10); //console.info(JSON.stringify(all)); diff --git a/ffmpeg/releases.js b/ffmpeg/releases.js index bd2e75f..dd3d9b5 100644 --- a/ffmpeg/releases.js +++ b/ffmpeg/releases.js @@ -6,8 +6,8 @@ var github = require('../_common/github.js'); var owner = 'eugeneware'; var repo = 'ffmpeg-static'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { all.releases = all.releases .filter(function (rel) { let isFfmpeg = rel.name.includes('ffmpeg'); @@ -38,7 +38,7 @@ module.exports = function (request) { }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); console.info(JSON.stringify(all)); }); diff --git a/ffuf/releases.js b/ffuf/releases.js index 347f560..1af43a6 100644 --- a/ffuf/releases.js +++ b/ffuf/releases.js @@ -4,14 +4,14 @@ var github = require('../_common/github.js'); var owner = 'ffuf'; var repo = 'ffuf'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); // just select the first 5 for demonstration all.releases = all.releases.slice(0, 5); diff --git a/fish/releases.js b/fish/releases.js index 127121b..9da61a6 100644 --- a/fish/releases.js +++ b/fish/releases.js @@ -6,8 +6,8 @@ var repo = 'fish-shell'; var ODDITIES = ['bundledpcre']; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { all.releases = all.releases .map(function (rel) { for (let oddity of ODDITIES) { @@ -30,7 +30,7 @@ module.exports = function (request) { }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); // just select the first 5 for demonstration all.releases = all.releases.slice(0, 5); diff --git a/fzf/releases.js b/fzf/releases.js index 33c993e..f1c7c6e 100644 --- a/fzf/releases.js +++ b/fzf/releases.js @@ -4,14 +4,14 @@ var github = require('../_common/github.js'); var owner = 'junegunn'; var repo = 'fzf'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); all.releases = all.releases.slice(0, 10); //console.info(JSON.stringify(all)); diff --git a/gh/releases.js b/gh/releases.js index 816fe55..4d782b1 100644 --- a/gh/releases.js +++ b/gh/releases.js @@ -4,14 +4,14 @@ var github = require('../_common/github.js'); var owner = 'cli'; var repo = 'cli'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); // just select the first 5 for demonstration all.releases = all.releases.slice(0, 5); diff --git a/git/releases.js b/git/releases.js index 49e2232..122bec4 100644 --- a/git/releases.js +++ b/git/releases.js @@ -4,9 +4,9 @@ var github = require('../_common/github.js'); var owner = 'git-for-windows'; var repo = 'git'; -module.exports = function (request) { +module.exports = function () { // TODO support mac and linux tarballs - return github(request, owner, repo).then(function (all) { + return github(null, owner, repo).then(function (all) { // See https://github.com/git-for-windows/git/wiki/MinGit // also consider https://github.com/git-for-windows/git/wiki/Silent-or-Unattended-Installation all.releases = all.releases @@ -26,7 +26,7 @@ module.exports = function (request) { }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); console.info(JSON.stringify(all, null, 2)); }); diff --git a/gitdeploy/releases.js b/gitdeploy/releases.js index f4cc284..fbec092 100644 --- a/gitdeploy/releases.js +++ b/gitdeploy/releases.js @@ -4,14 +4,14 @@ var github = require('../_common/github.js'); var owner = 'therootcompany'; var repo = 'gitdeploy'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); console.info(JSON.stringify(all)); }); diff --git a/gitea/releases.js b/gitea/releases.js index 10f6cb0..0a9f39e 100644 --- a/gitea/releases.js +++ b/gitea/releases.js @@ -6,8 +6,8 @@ var repo = 'gitea'; var ODDITIES = ['-gogit-', '-docs-']; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { // remove checksums and .deb all.releases = all.releases.filter(function (rel) { for (let oddity of ODDITIES) { @@ -27,7 +27,7 @@ module.exports = function (request) { }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); console.info(JSON.stringify(all)); }); diff --git a/goreleaser/releases.js b/goreleaser/releases.js index bb331cd..aff03dc 100644 --- a/goreleaser/releases.js +++ b/goreleaser/releases.js @@ -4,15 +4,15 @@ var github = require('../_common/github.js'); var owner = 'goreleaser'; var repo = 'goreleaser'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { all._names = ['goreleaser', '1']; return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); // just select the first 5 for demonstration all.releases = all.releases.slice(0, 5); diff --git a/gprox/releases.js b/gprox/releases.js index 4cb80fa..f7b0a4d 100644 --- a/gprox/releases.js +++ b/gprox/releases.js @@ -4,14 +4,14 @@ var github = require('../_common/github.js'); var owner = 'creedasaurus'; var repo = 'gprox'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); // just select the first 5 for demonstration all.releases = all.releases.slice(0, 5); diff --git a/grype/releases.js b/grype/releases.js index 861729b..a0a63e8 100644 --- a/grype/releases.js +++ b/grype/releases.js @@ -4,14 +4,14 @@ var github = require('../_common/github.js'); var owner = 'anchore'; var repo = 'grype'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); // just select the first 5 for demonstration all.releases = all.releases.slice(0, 5); diff --git a/hexyl/releases.js b/hexyl/releases.js index ca28ed3..7eb1237 100644 --- a/hexyl/releases.js +++ b/hexyl/releases.js @@ -4,14 +4,14 @@ var github = require('../_common/github.js'); var owner = 'sharkdp'; var repo = 'hexyl'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); all.releases = all.releases.slice(0, 10); //console.info(JSON.stringify(all)); diff --git a/hugo-extended/releases.js b/hugo-extended/releases.js index 13419cb..4d18dd1 100644 --- a/hugo-extended/releases.js +++ b/hugo-extended/releases.js @@ -4,8 +4,8 @@ var github = require('../_common/github.js'); var owner = 'gohugoio'; var repo = 'hugo'; -module.exports = async function (request) { - let all = await github(request, owner, repo); +module.exports = async function () { + let all = await github(null, owner, repo); all.releases = all.releases.filter(function (rel) { let isExtended = rel.name.includes('_extended_'); @@ -25,7 +25,7 @@ module.exports = async function (request) { }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); console.info(JSON.stringify(all)); }); diff --git a/hugo/releases.js b/hugo/releases.js index 1108442..f5e928d 100644 --- a/hugo/releases.js +++ b/hugo/releases.js @@ -4,8 +4,8 @@ var github = require('../_common/github.js'); var owner = 'gohugoio'; var repo = 'hugo'; -module.exports = async function (request) { - let all = await github(request, owner, repo); +module.exports = async function () { + let all = await github(null, owner, repo); all.releases = all.releases.filter(function (rel) { let isExtended = rel.name.includes('_extended_'); @@ -25,7 +25,7 @@ module.exports = async function (request) { }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); console.info(JSON.stringify(all)); }); diff --git a/jq/releases.js b/jq/releases.js index 60c3851..d590b99 100644 --- a/jq/releases.js +++ b/jq/releases.js @@ -15,8 +15,8 @@ function isOdd(build) { } } -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { let builds = []; for (let build of all.releases) { @@ -35,7 +35,7 @@ module.exports = function (request) { }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); console.info(JSON.stringify(all)); //console.info(JSON.stringify(all, null, 2)); diff --git a/k9s/releases.js b/k9s/releases.js index 58d9bac..993a55b 100644 --- a/k9s/releases.js +++ b/k9s/releases.js @@ -4,14 +4,14 @@ var github = require('../_common/github.js'); var owner = 'derailed'; var repo = 'k9s'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); // just select the first 5 for demonstration all.releases = all.releases.slice(0, 5); diff --git a/keypairs/releases.js b/keypairs/releases.js index ec0fb13..87b1788 100644 --- a/keypairs/releases.js +++ b/keypairs/releases.js @@ -4,14 +4,14 @@ var github = require('../_common/github.js'); var owner = 'therootcompany'; var repo = 'keypairs'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); console.info(JSON.stringify(all, null, 2)); }); diff --git a/kind/releases.js b/kind/releases.js index b6c7636..2d7db0a 100644 --- a/kind/releases.js +++ b/kind/releases.js @@ -12,14 +12,14 @@ var repo = 'kind'; /** **/ /******************************************************************************/ -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); // just select the first 5 for demonstration all.releases = all.releases.slice(0, 5); diff --git a/koji/releases.js b/koji/releases.js index 513de96..24b73ba 100644 --- a/koji/releases.js +++ b/koji/releases.js @@ -4,14 +4,14 @@ var github = require('../_common/github.js'); var owner = 'cococonscious'; var repo = 'koji'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); console.info(JSON.stringify(all)); }); diff --git a/kubectx/releases.js b/kubectx/releases.js index 1e8da19..4d17ad7 100644 --- a/kubectx/releases.js +++ b/kubectx/releases.js @@ -4,8 +4,8 @@ var github = require('../_common/github.js'); var owner = 'ahmetb'; var repo = 'kubectx'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { let builds = []; for (let build of all.releases) { @@ -28,7 +28,7 @@ module.exports = function (request) { }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); // just select the first 5 for demonstration all.releases = all.releases.slice(0, 5); diff --git a/kubens/releases.js b/kubens/releases.js index b38e250..f60281f 100644 --- a/kubens/releases.js +++ b/kubens/releases.js @@ -4,8 +4,8 @@ var github = require('../_common/github.js'); var owner = 'ahmetb'; var repo = 'kubectx'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { let builds = []; for (let build of all.releases) { @@ -28,7 +28,7 @@ module.exports = function (request) { }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); // just select the first 5 for demonstration all.releases = all.releases.slice(0, 5); diff --git a/lf/releases.js b/lf/releases.js index 6de6313..2c7d4e2 100644 --- a/lf/releases.js +++ b/lf/releases.js @@ -4,8 +4,8 @@ var github = require('../_common/github.js'); var owner = 'gokcehan'; var repo = 'lf'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { all.releases = all.releases.map(function (r) { // r21 -> 0.21.0 if (/^r/.test(r.version)) { @@ -18,7 +18,7 @@ module.exports = function (request) { }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')._debug(all); console.info(JSON.stringify(all, null, 2)); }); diff --git a/lsd/releases.js b/lsd/releases.js index 2d9de3d..66d102a 100644 --- a/lsd/releases.js +++ b/lsd/releases.js @@ -4,8 +4,8 @@ var github = require('../_common/github.js'); var owner = 'lsd-rs'; var repo = 'lsd'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { all.releases = all.releases.filter(function (rel) { return !/(-msvc\.)|(\.deb$)/.test(rel.name); }); @@ -14,7 +14,7 @@ module.exports = function (request) { }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); // just select the first 5 for demonstration all.releases = all.releases.slice(0, 5); diff --git a/mutagen/releases.js b/mutagen/releases.js index 96ee045..2386d84 100644 --- a/mutagen/releases.js +++ b/mutagen/releases.js @@ -4,14 +4,14 @@ var github = require('../_common/github.js'); var owner = 'mutagen-io'; var repo = 'mutagen'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')._debug(all); console.info(JSON.stringify(all, null, 2)); }); diff --git a/ollama/releases.js b/ollama/releases.js index 2112227..fa4eeb5 100644 --- a/ollama/releases.js +++ b/ollama/releases.js @@ -4,8 +4,8 @@ var github = require('../_common/github.js'); var owner = 'jmorganca'; var repo = 'ollama'; -module.exports = async function (request) { - let all = await github(request, owner, repo); +module.exports = async function () { + let all = await github(null, owner, repo); let releases = []; for (let rel of all.releases) { @@ -51,7 +51,7 @@ module.exports = async function (request) { }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); console.info(JSON.stringify(all)); //console.info(JSON.stringify(all, null, 2)); diff --git a/ots/releases.js b/ots/releases.js index 4c2e719..3f9334f 100644 --- a/ots/releases.js +++ b/ots/releases.js @@ -4,14 +4,14 @@ var github = require('../_common/github.js'); var owner = 'emdneto'; var repo = 'otsgo'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); // just select the first 5 for demonstration all.releases = all.releases.slice(0, 5); diff --git a/pandoc/releases.js b/pandoc/releases.js index ef1257b..87a0237 100644 --- a/pandoc/releases.js +++ b/pandoc/releases.js @@ -4,14 +4,14 @@ var github = require('../_common/github.js'); var owner = 'jgm'; var repo = 'pandoc'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); // just select the first 5 for demonstration all.releases = all.releases.slice(0, 5); diff --git a/pathman/releases.js b/pathman/releases.js index 6f0ff5e..47d9a6c 100644 --- a/pathman/releases.js +++ b/pathman/releases.js @@ -5,8 +5,8 @@ var owner = 'root'; var repo = 'pathman'; var baseurl = 'https://git.rootprojects.org'; -module.exports = function (request) { - return github(request, owner, repo, baseurl).then(function (all) { +module.exports = function () { + return github(null, owner, repo, baseurl).then(function (all) { all.releases = all.releases.filter(function (release) { release._filename = release.name; @@ -22,7 +22,7 @@ module.exports = function (request) { }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { console.info(JSON.stringify(all, null, 2)); }); } diff --git a/pwsh/releases.js b/pwsh/releases.js index e4062f7..8194503 100644 --- a/pwsh/releases.js +++ b/pwsh/releases.js @@ -15,8 +15,8 @@ function isOdd(build) { } } -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { // remove checksums and .deb all.releases = all.releases.filter(function (rel) { let odd = isOdd(rel); @@ -44,7 +44,7 @@ module.exports = function (request) { }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); console.info(JSON.stringify(all)); }); diff --git a/rclone/releases.js b/rclone/releases.js index 2f3747c..f1842dd 100644 --- a/rclone/releases.js +++ b/rclone/releases.js @@ -4,14 +4,14 @@ var github = require('../_common/github.js'); var owner = 'rclone'; var repo = 'rclone'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); all.releases = all.releases.slice(0, 10); console.info(JSON.stringify(all, null, 2)); diff --git a/rg/releases.js b/rg/releases.js index da7a40a..94f240c 100644 --- a/rg/releases.js +++ b/rg/releases.js @@ -4,15 +4,15 @@ var github = require('../_common/github.js'); var owner = 'BurntSushi'; var repo = 'ripgrep'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { all._names = ['ripgrep', 'rg']; return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); // just select the first 5 for demonstration all.releases = all.releases.slice(0, 5); diff --git a/ripgrep/releases.js b/ripgrep/releases.js index 2ebc97d..60d05e7 100644 --- a/ripgrep/releases.js +++ b/ripgrep/releases.js @@ -4,14 +4,14 @@ var github = require('../_common/github.js'); var owner = 'BurntSushi'; var repo = 'ripgrep'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); console.info(JSON.stringify(all)); //console.info(JSON.stringify(all, null, 2)); diff --git a/sass/releases.js b/sass/releases.js index d1fae04..328c3a2 100644 --- a/sass/releases.js +++ b/sass/releases.js @@ -4,15 +4,15 @@ var github = require('../_common/github.js'); var owner = 'sass'; var repo = 'dart-sass'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { all._names = ['dart-sass', 'sass']; return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); // just select the first 5 for demonstration all.releases = all.releases.slice(0, 5); diff --git a/sclient/releases.js b/sclient/releases.js index 7121985..1f98a67 100644 --- a/sclient/releases.js +++ b/sclient/releases.js @@ -4,14 +4,14 @@ var github = require('../_common/github.js'); var owner = 'therootcompany'; var repo = 'sclient'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); console.info(JSON.stringify(all)); }); diff --git a/sd/releases.js b/sd/releases.js index 3c69083..5bba51d 100644 --- a/sd/releases.js +++ b/sd/releases.js @@ -4,14 +4,14 @@ var github = require('../_common/github.js'); var owner = 'chmln'; var repo = 'sd'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); // just select the first 5 for demonstration all.releases = all.releases.slice(0, 5); diff --git a/serviceman/releases.js b/serviceman/releases.js index 4853646..2c7634a 100644 --- a/serviceman/releases.js +++ b/serviceman/releases.js @@ -4,14 +4,14 @@ var github = require('../_common/github.js'); var owner = 'therootcompany'; var repo = 'serviceman'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); console.info(JSON.stringify(all)); }); diff --git a/shellcheck/releases.js b/shellcheck/releases.js index 902200e..44fd060 100644 --- a/shellcheck/releases.js +++ b/shellcheck/releases.js @@ -4,14 +4,14 @@ var github = require('../_common/github.js'); var owner = 'koalaman'; var repo = 'shellcheck'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); // just select the first 5 for demonstration all.releases = all.releases.slice(0, 5); diff --git a/shfmt/releases.js b/shfmt/releases.js index 85aa276..4aa2c72 100644 --- a/shfmt/releases.js +++ b/shfmt/releases.js @@ -4,14 +4,14 @@ var github = require('../_common/github.js'); var owner = 'mvdan'; var repo = 'sh'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); all.releases = all.releases.slice(0, 5); console.info(JSON.stringify(all, null, 2)); diff --git a/sqlpkg/releases.js b/sqlpkg/releases.js index 3b7f45e..f3af463 100644 --- a/sqlpkg/releases.js +++ b/sqlpkg/releases.js @@ -4,15 +4,15 @@ var github = require('../_common/github.js'); var owner = 'nalgeon'; var repo = 'sqlpkg-cli'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { all._names = ['sqlpkg-cli', 'sqlpkg']; return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); console.info(JSON.stringify(all, null, 2)); }); diff --git a/sttr/releases.js b/sttr/releases.js index d6f996a..032b473 100644 --- a/sttr/releases.js +++ b/sttr/releases.js @@ -4,14 +4,14 @@ var github = require('../_common/github.js'); var owner = 'abhimanyu003'; var repo = 'sttr'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); // just select the first 5 for demonstration all.releases = all.releases.slice(0, 5); diff --git a/syncthing/releases.js b/syncthing/releases.js index a3809ea..04eb23f 100644 --- a/syncthing/releases.js +++ b/syncthing/releases.js @@ -4,14 +4,14 @@ var github = require('../_common/github.js'); var owner = 'syncthing'; var repo = 'syncthing'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); // just select the first 5 for demonstration all.releases = all.releases.slice(0, 5); diff --git a/tinygo/releases.js b/tinygo/releases.js index 8f819ce..5a58d6a 100644 --- a/tinygo/releases.js +++ b/tinygo/releases.js @@ -4,8 +4,8 @@ var github = require('../_common/github.js'); var owner = 'tinygo-org'; var repo = 'tinygo'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { // all.releases = all.releases.filter(function (rel) { // return !rel.name.endsWith('.deb'); // }); @@ -14,7 +14,7 @@ module.exports = function (request) { }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); // just select the first 5 for demonstration all.releases = all.releases.slice(0, 5); diff --git a/trip/releases.js b/trip/releases.js index ade8292..efc1f7d 100644 --- a/trip/releases.js +++ b/trip/releases.js @@ -4,15 +4,15 @@ var github = require('../_common/github.js'); var owner = 'fujiapple852'; var repo = 'trippy'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { all._names = ['trippy', 'trip']; return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); // just select the first 5 for demonstration all.releases = all.releases.slice(0, 5); diff --git a/watchexec/releases.js b/watchexec/releases.js index 6d435ce..fdf294e 100644 --- a/watchexec/releases.js +++ b/watchexec/releases.js @@ -4,8 +4,8 @@ var github = require('../_common/github.js'); var owner = 'watchexec'; var repo = 'watchexec'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { let builds = []; for (let build of all.releases) { build.version = build.version.replace(/^cli-/, ''); @@ -18,7 +18,7 @@ module.exports = function (request) { }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); // just select the first 5 for demonstration all.releases = all.releases.slice(0, 5); diff --git a/xcaddy/releases.js b/xcaddy/releases.js index b16b7bb..ce8c5bd 100644 --- a/xcaddy/releases.js +++ b/xcaddy/releases.js @@ -4,8 +4,8 @@ var github = require('../_common/github.js'); var owner = 'caddyserver'; var repo = 'xcaddy'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { // remove checksums and .deb all.releases = all.releases.filter(function (rel) { return !/(\.txt)|(\.deb)$/i.test(rel.name); @@ -15,7 +15,7 @@ module.exports = function (request) { }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); console.info(JSON.stringify(all)); }); diff --git a/xsv/releases.js b/xsv/releases.js index 04cefc1..497700b 100644 --- a/xsv/releases.js +++ b/xsv/releases.js @@ -4,14 +4,14 @@ var github = require('../_common/github.js'); var owner = 'BurntSushi'; var repo = 'xsv'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); // just select the first 5 for demonstration all.releases = all.releases.slice(0, 5); diff --git a/xz/releases.js b/xz/releases.js index 75717a0..ffaf1d9 100644 --- a/xz/releases.js +++ b/xz/releases.js @@ -4,8 +4,8 @@ var github = require('../_common/github.js'); var owner = 'therootcompany'; var repo = 'xz-static'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { all.releases.forEach(function (rel) { if (/windows/.test(rel.download)) { if (!/(86|64)/.test(rel.arch)) { @@ -18,7 +18,7 @@ module.exports = function (request) { }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); // just select the first 5 for demonstration all.releases = all.releases.slice(0, 5); diff --git a/yq/releases.js b/yq/releases.js index a1d8264..7cf2210 100644 --- a/yq/releases.js +++ b/yq/releases.js @@ -15,8 +15,8 @@ function isOdd(build) { } } -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { let builds = []; for (let build of all.releases) { @@ -34,7 +34,7 @@ module.exports = function (request) { }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); all.releases = all.releases.slice(0, 5); console.info(JSON.stringify(all, null, 2)); diff --git a/zoxide/releases.js b/zoxide/releases.js index 0fcc85c..6d82fa8 100644 --- a/zoxide/releases.js +++ b/zoxide/releases.js @@ -4,14 +4,14 @@ var github = require('../_common/github.js'); var owner = 'ajeetdsouza'; var repo = 'zoxide'; -module.exports = function (request) { - return github(request, owner, repo).then(function (all) { +module.exports = function () { + return github(null, owner, repo).then(function (all) { return all; }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function (all) { + module.exports().then(function (all) { all = require('../_webi/normalize.js')(all); // just select the first 5 for demonstration all.releases = all.releases.slice(0, 10);