From a1d85be235b72b3a321bbe679d8e12c795e99edd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Wed, 8 Feb 2017 14:21:40 -0800 Subject: hosted-git-info@2.2.0 Add support for `.tarball()` URLs. PR-URL: https://github.com/npm/hosted-git-info/pull/21 Credit: @zkat Reviewed-By: @iarna --- node_modules/hosted-git-info/git-host-info.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'node_modules/hosted-git-info/git-host-info.js') diff --git a/node_modules/hosted-git-info/git-host-info.js b/node_modules/hosted-git-info/git-host-info.js index 22343335e..cd511e3f7 100644 --- a/node_modules/hosted-git-info/git-host-info.js +++ b/node_modules/hosted-git-info/git-host-info.js @@ -9,19 +9,22 @@ var gitHosts = module.exports = { 'treepath': 'tree', 'filetemplate': 'https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}', 'bugstemplate': 'https://{domain}/{user}/{project}/issues', - 'gittemplate': 'git://{auth@}{domain}/{user}/{project}.git{#committish}' + 'gittemplate': 'git://{auth@}{domain}/{user}/{project}.git{#committish}', + 'tarballtemplate': 'https://{domain}/{user}/{project}/archive/{committish}.tar.gz' }, bitbucket: { 'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ], 'domain': 'bitbucket.org', - 'treepath': 'src' + 'treepath': 'src', + 'tarballtemplate': 'https://{domain}/{user}/{project}/get/{committish}.tar.gz' }, gitlab: { 'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ], 'domain': 'gitlab.com', 'treepath': 'tree', 'docstemplate': 'https://{domain}/{user}/{project}{/tree/committish}#README', - 'bugstemplate': 'https://{domain}/{user}/{project}/issues' + 'bugstemplate': 'https://{domain}/{user}/{project}/issues', + 'tarballtemplate': 'https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}' }, gist: { 'protocols': [ 'git', 'git+ssh', 'git+https', 'ssh', 'https' ], @@ -36,7 +39,8 @@ var gitHosts = module.exports = { 'docstemplate': 'https://{domain}/{project}{/committish}', 'httpstemplate': 'git+https://{domain}/{project}.git{#committish}', 'shortcuttemplate': '{type}:{project}{#committish}', - 'pathtemplate': '{project}{#committish}' + 'pathtemplate': '{project}{#committish}', + 'tarballtemplate': 'https://{domain}/{user}/{project}/archive/{committish}.tar.gz' } } -- cgit v1.2.3