ref!(githubish-source): bring over updates from 'githubish'

This commit is contained in:
AJ ONeal
2024-09-13 08:33:49 +00:00
parent b2c62dc6b6
commit 566ea0fc9a
5 changed files with 188 additions and 91 deletions
+12 -8
View File
@@ -1,17 +1,21 @@
'use strict';
var githubSource = require('../_common/github-source.js');
var owner = 'BeyondCodeBootcamp';
var repo = 'aliasman';
let Releases = module.exports;
module.exports = function (request) {
return githubSource(request, owner, repo).then(function (all) {
return all;
});
let GitHubSource = require('../_common/github-source.js');
let owner = 'BeyondCodeBootcamp';
let repo = 'aliasman';
Releases.latest = async function () {
let all = await GitHubSource.getDistributables({ owner, repo });
for (let pkg of all.releases) {
pkg.os = 'posix_2017';
}
return all;
};
if (module === require.main) {
module.exports(require('@root/request')).then(function (all) {
Releases.latest().then(function (all) {
all = require('../_webi/normalize.js')(all);
console.info(JSON.stringify(all, null, 2));
});