mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-05-21 13:34:46 +00:00
.
This commit is contained in:
parent
9fff29ba6c
commit
00c3b50fca
7278 changed files with 0 additions and 1778943 deletions
77
node_modules/hosted-git-info/git-host-info.js
generated
vendored
77
node_modules/hosted-git-info/git-host-info.js
generated
vendored
|
@ -1,77 +0,0 @@
|
|||
'use strict'
|
||||
|
||||
var gitHosts = module.exports = {
|
||||
github: {
|
||||
// First two are insecure and generally shouldn't be used any more, but
|
||||
// they are still supported.
|
||||
'protocols': [ 'git', 'http', 'git+ssh', 'git+https', 'ssh', 'https' ],
|
||||
'domain': 'github.com',
|
||||
'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}',
|
||||
'tarballtemplate': 'https://codeload.{domain}/{user}/{project}/tar.gz/{committish}'
|
||||
},
|
||||
bitbucket: {
|
||||
'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ],
|
||||
'domain': 'bitbucket.org',
|
||||
'treepath': 'src',
|
||||
'tarballtemplate': 'https://{domain}/{user}/{project}/get/{committish}.tar.gz'
|
||||
},
|
||||
gitlab: {
|
||||
'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ],
|
||||
'domain': 'gitlab.com',
|
||||
'treepath': 'tree',
|
||||
'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' ],
|
||||
'domain': 'gist.github.com',
|
||||
'pathmatch': /^[/](?:([^/]+)[/])?([a-z0-9]+)(?:[.]git)?$/,
|
||||
'filetemplate': 'https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}',
|
||||
'bugstemplate': 'https://{domain}/{project}',
|
||||
'gittemplate': 'git://{domain}/{project}.git{#committish}',
|
||||
'sshtemplate': 'git@{domain}:/{project}.git{#committish}',
|
||||
'sshurltemplate': 'git+ssh://git@{domain}/{project}.git{#committish}',
|
||||
'browsetemplate': 'https://{domain}/{project}{/committish}',
|
||||
'browsefiletemplate': 'https://{domain}/{project}{/committish}{#path}',
|
||||
'docstemplate': 'https://{domain}/{project}{/committish}',
|
||||
'httpstemplate': 'git+https://{domain}/{project}.git{#committish}',
|
||||
'shortcuttemplate': '{type}:{project}{#committish}',
|
||||
'pathtemplate': '{project}{#committish}',
|
||||
'tarballtemplate': 'https://{domain}/{user}/{project}/archive/{committish}.tar.gz',
|
||||
'hashformat': function (fragment) {
|
||||
return 'file-' + formatHashFragment(fragment)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var gitHostDefaults = {
|
||||
'sshtemplate': 'git@{domain}:{user}/{project}.git{#committish}',
|
||||
'sshurltemplate': 'git+ssh://git@{domain}/{user}/{project}.git{#committish}',
|
||||
'browsetemplate': 'https://{domain}/{user}/{project}{/tree/committish}',
|
||||
'browsefiletemplate': 'https://{domain}/{user}/{project}/{treepath}/{committish}/{path}{#fragment}',
|
||||
'docstemplate': 'https://{domain}/{user}/{project}{/tree/committish}#readme',
|
||||
'httpstemplate': 'git+https://{auth@}{domain}/{user}/{project}.git{#committish}',
|
||||
'filetemplate': 'https://{domain}/{user}/{project}/raw/{committish}/{path}',
|
||||
'shortcuttemplate': '{type}:{user}/{project}{#committish}',
|
||||
'pathtemplate': '{user}/{project}{#committish}',
|
||||
'pathmatch': /^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/,
|
||||
'hashformat': formatHashFragment
|
||||
}
|
||||
|
||||
Object.keys(gitHosts).forEach(function (name) {
|
||||
Object.keys(gitHostDefaults).forEach(function (key) {
|
||||
if (gitHosts[name][key]) return
|
||||
gitHosts[name][key] = gitHostDefaults[key]
|
||||
})
|
||||
gitHosts[name].protocols_re = RegExp('^(' +
|
||||
gitHosts[name].protocols.map(function (protocol) {
|
||||
return protocol.replace(/([\\+*{}()[\]$^|])/g, '\\$1')
|
||||
}).join('|') + '):$')
|
||||
})
|
||||
|
||||
function formatHashFragment (fragment) {
|
||||
return fragment.toLowerCase().replace(/^\W+|\/|\W+$/g, '').replace(/\W+/g, '-')
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue