From: AJ ONeal Date: Sun, 3 May 2020 10:49:06 +0000 (+0000) Subject: make Prettier X-Git-Url: https://git.josue.xyz/?p=webi-installers%2F.git;a=commitdiff_plain;h=fa2dcece4ca1b421fc427117de11778c60804538 make Prettier --- diff --git a/_common/gitea.js b/_common/gitea.js index a3aa574..c0deae3 100644 --- a/_common/gitea.js +++ b/_common/gitea.js @@ -15,7 +15,9 @@ function getAllReleases(request, owner, repo, baseurl) { if (!baseurl) { return Promise.reject('missing baseurl'); } - return ghRelease(request, owner, repo, baseurl + '/api/v1').then(function (all) { + return ghRelease(request, owner, repo, baseurl + '/api/v1').then(function ( + all + ) { return all; }); } @@ -23,8 +25,13 @@ function getAllReleases(request, owner, repo, baseurl) { module.exports = getAllReleases; if (module === require.main) { - getAllReleases(require('@root/request'), 'coolaj86', 'go-pathman', 'https://git.coolaj86.com').then( - //getAllReleases(require('@root/request'), 'root', 'serviceman', 'https://git.rootprojects.org').then( + getAllReleases( + require('@root/request'), + 'coolaj86', + 'go-pathman', + 'https://git.coolaj86.com' + ).then( + //getAllReleases(require('@root/request'), 'root', 'serviceman', 'https://git.rootprojects.org').then( function (all) { console.log(JSON.stringify(all, null, 2)); } diff --git a/_common/github.js b/_common/github.js index aeaf025..7b62ea3 100644 --- a/_common/github.js +++ b/_common/github.js @@ -9,7 +9,12 @@ * @param {string} repo * @returns {PromiseLike | Promise} */ -function getAllReleases(request, owner, repo, baseurl = 'https://api.github.com') { +function getAllReleases( + request, + owner, + repo, + baseurl = 'https://api.github.com' +) { if (!owner) { return Promise.reject('missing owner for repo'); } diff --git a/flutter/releases.js b/flutter/releases.js index 216078a..41a0be2 100644 --- a/flutter/releases.js +++ b/flutter/releases.js @@ -17,7 +17,7 @@ module.exports = function (request) { json: true }).then(function (resp) { var body = resp.body; - all.download = body.base_url + '/{{ download }}' + all.download = body.base_url + '/{{ download }}'; body.releases.forEach(function (asset) { if (!map[asset.channel]) { map[asset.channel] = true; diff --git a/pathman/releases.js b/pathman/releases.js index e57e5d3..26d23c2 100644 --- a/pathman/releases.js +++ b/pathman/releases.js @@ -3,7 +3,7 @@ var github = require('../_common/gitea.js'); var owner = 'coolaj86'; var repo = 'go-pathman'; -var baseurl = 'https://git.coolaj86.com' +var baseurl = 'https://git.coolaj86.com'; module.exports = function (request) { return github(request, owner, repo, baseurl).then(function (all) {