diff options
-rw-r--r-- | node_modules/hosted-git-info/LICENSE | 13 | ||||
-rw-r--r-- | node_modules/hosted-git-info/README.md | 2 | ||||
-rw-r--r-- | node_modules/hosted-git-info/git-host-info.js | 40 | ||||
-rw-r--r-- | node_modules/hosted-git-info/git-host.js | 18 | ||||
-rw-r--r-- | node_modules/hosted-git-info/index.js | 4 | ||||
-rw-r--r-- | node_modules/hosted-git-info/package.json | 34 | ||||
-rw-r--r-- | package.json | 2 |
7 files changed, 73 insertions, 40 deletions
diff --git a/node_modules/hosted-git-info/LICENSE b/node_modules/hosted-git-info/LICENSE new file mode 100644 index 000000000..45055763d --- /dev/null +++ b/node_modules/hosted-git-info/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2015, Rebecca Turner + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/hosted-git-info/README.md b/node_modules/hosted-git-info/README.md index 55b5dbcbb..1db47dd65 100644 --- a/node_modules/hosted-git-info/README.md +++ b/node_modules/hosted-git-info/README.md @@ -37,7 +37,7 @@ And methods of: * info.file(path) Given the path of a file relative to the repository, returns a URL for -directly fetching it from the githost. If no comittish was set then +directly fetching it from the githost. If no committish was set then `master` will be used as the default. For example `hostedGitInfo.fromUrl("git@github.com:npm/hosted-git-info.git#v1.0.0").file("package.json")` diff --git a/node_modules/hosted-git-info/git-host-info.js b/node_modules/hosted-git-info/git-host-info.js index 354d9fc0d..22343335e 100644 --- a/node_modules/hosted-git-info/git-host-info.js +++ b/node_modules/hosted-git-info/git-host-info.js @@ -7,9 +7,9 @@ var gitHosts = module.exports = { 'protocols': [ 'git', 'http', 'git+ssh', 'git+https', 'ssh', 'https' ], 'domain': 'github.com', 'treepath': 'tree', - 'filetemplate': 'https://{auth@}raw.githubusercontent.com/{user}/{project}/{comittish}/{path}', + 'filetemplate': 'https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}', 'bugstemplate': 'https://{domain}/{user}/{project}/issues', - 'gittemplate': 'git://{auth@}{domain}/{user}/{project}.git{#comittish}' + 'gittemplate': 'git://{auth@}{domain}/{user}/{project}.git{#committish}' }, bitbucket: { 'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ], @@ -20,35 +20,35 @@ var gitHosts = module.exports = { 'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ], 'domain': 'gitlab.com', 'treepath': 'tree', - 'docstemplate': 'https://{domain}/{user}/{project}{/tree/comittish}#README', + 'docstemplate': 'https://{domain}/{user}/{project}{/tree/committish}#README', 'bugstemplate': 'https://{domain}/{user}/{project}/issues' }, 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{/comittish}/{path}', + 'filetemplate': 'https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}', 'bugstemplate': 'https://{domain}/{project}', - 'gittemplate': 'git://{domain}/{project}.git{#comittish}', - 'sshtemplate': 'git@{domain}:/{project}.git{#comittish}', - 'sshurltemplate': 'git+ssh://git@{domain}/{project}.git{#comittish}', - 'browsetemplate': 'https://{domain}/{project}{/comittish}', - 'docstemplate': 'https://{domain}/{project}{/comittish}', - 'httpstemplate': 'git+https://{domain}/{project}.git{#comittish}', - 'shortcuttemplate': '{type}:{project}{#comittish}', - 'pathtemplate': '{project}{#comittish}' + '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}', + 'docstemplate': 'https://{domain}/{project}{/committish}', + 'httpstemplate': 'git+https://{domain}/{project}.git{#committish}', + 'shortcuttemplate': '{type}:{project}{#committish}', + 'pathtemplate': '{project}{#committish}' } } var gitHostDefaults = { - 'sshtemplate': 'git@{domain}:{user}/{project}.git{#comittish}', - 'sshurltemplate': 'git+ssh://git@{domain}/{user}/{project}.git{#comittish}', - 'browsetemplate': 'https://{domain}/{user}/{project}{/tree/comittish}', - 'docstemplate': 'https://{domain}/{user}/{project}{/tree/comittish}#readme', - 'httpstemplate': 'git+https://{auth@}{domain}/{user}/{project}.git{#comittish}', - 'filetemplate': 'https://{domain}/{user}/{project}/raw/{comittish}/{path}', - 'shortcuttemplate': '{type}:{user}/{project}{#comittish}', - 'pathtemplate': '{user}/{project}{#comittish}', + 'sshtemplate': 'git@{domain}:{user}/{project}.git{#committish}', + 'sshurltemplate': 'git+ssh://git@{domain}/{user}/{project}.git{#committish}', + 'browsetemplate': 'https://{domain}/{user}/{project}{/tree/committish}', + '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)?$/ } diff --git a/node_modules/hosted-git-info/git-host.js b/node_modules/hosted-git-info/git-host.js index b69ad0f28..ea31380a4 100644 --- a/node_modules/hosted-git-info/git-host.js +++ b/node_modules/hosted-git-info/git-host.js @@ -1,7 +1,7 @@ 'use strict' var gitHosts = require('./git-host-info.js') -var GitHost = module.exports = function (type, user, auth, project, comittish, defaultRepresentation) { +var GitHost = module.exports = function (type, user, auth, project, committish, defaultRepresentation) { var gitHostInfo = this gitHostInfo.type = type Object.keys(gitHosts[type]).forEach(function (key) { @@ -10,13 +10,13 @@ var GitHost = module.exports = function (type, user, auth, project, comittish, d gitHostInfo.user = user gitHostInfo.auth = auth gitHostInfo.project = project - gitHostInfo.comittish = comittish + gitHostInfo.committish = committish gitHostInfo.default = defaultRepresentation } GitHost.prototype = {} GitHost.prototype.hash = function () { - return this.comittish ? '#' + this.comittish : '' + return this.committish ? '#' + this.committish : '' } GitHost.prototype._fill = function (template, vars) { @@ -27,17 +27,17 @@ GitHost.prototype._fill = function (template, vars) { if (self[key] != null && vars[key] == null) vars[key] = self[key] }) var rawAuth = vars.auth - var rawComittish = vars.comittish + var rawComittish = vars.committish Object.keys(vars).forEach(function (key) { vars[key] = encodeURIComponent(vars[key]) }) vars['auth@'] = rawAuth ? rawAuth + '@' : '' - vars['#comittish'] = rawComittish ? '#' + rawComittish : '' - vars['/tree/comittish'] = vars.comittish - ? '/' + vars.treepath + '/' + vars.comittish + vars['#committish'] = rawComittish ? '#' + rawComittish : '' + vars['/tree/committish'] = vars.committish + ? '/' + vars.treepath + '/' + vars.committish : '' - vars['/comittish'] = vars.comittish ? '/' + vars.comittish : '' - vars.comittish = vars.comittish || 'master' + vars['/committish'] = vars.committish ? '/' + vars.committish : '' + vars.committish = vars.committish || 'master' var res = template Object.keys(vars).forEach(function (key) { res = res.replace(new RegExp('[{]' + key + '[}]', 'g'), vars[key]) diff --git a/node_modules/hosted-git-info/index.js b/node_modules/hosted-git-info/index.js index b8c6e10c6..453ce87d3 100644 --- a/node_modules/hosted-git-info/index.js +++ b/node_modules/hosted-git-info/index.js @@ -35,7 +35,7 @@ module.exports.fromUrl = function (giturl) { if (parsed.auth && authProtocols[parsed.protocol]) { auth = decodeURIComponent(parsed.auth) } - var comittish = parsed.hash ? decodeURIComponent(parsed.hash.substr(1)) : null + var committish = parsed.hash ? decodeURIComponent(parsed.hash.substr(1)) : null var user = null var project = null var defaultRepresentation = null @@ -53,7 +53,7 @@ module.exports.fromUrl = function (giturl) { if (matched[2] != null) project = decodeURIComponent(matched[2]) defaultRepresentation = protocolToRepresentation(parsed.protocol) } - return new GitHost(gitHostName, user, auth, project, comittish, defaultRepresentation) + return new GitHost(gitHostName, user, auth, project, committish, defaultRepresentation) }).filter(function (gitHostInfo) { return gitHostInfo }) if (matches.length !== 1) return return matches[0] diff --git a/node_modules/hosted-git-info/package.json b/node_modules/hosted-git-info/package.json index 81f477ee6..8d34aca2d 100644 --- a/node_modules/hosted-git-info/package.json +++ b/node_modules/hosted-git-info/package.json @@ -1,6 +1,6 @@ { "name": "hosted-git-info", - "version": "2.1.2", + "version": "2.1.4", "description": "Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab", "main": "index.js", "repository": { @@ -30,10 +30,30 @@ "standard": "^3.3.2", "tap": "^0.4.13" }, - "readme": "# hosted-git-info\n\nThis will let you identify and transform various git hosts URLs between\nprotocols. It also can tell you what the URL is for the raw path for\nparticular file for direct access without git.\n\n## Usage\n\n```javascript\nvar hostedGitInfo = require(\"hosted-git-info\")\nvar info = hostedGitInfo.fromUrl(\"git@github.com:npm/hosted-git-info.git\")\n/* info looks like:\n{\n type: \"github\",\n domain: \"github.com\",\n user: \"npm\",\n project: \"hosted-git-info\"\n}\n*/\n```\n\nIf the URL can't be matched with a git host, `null` will be returned. We\ncan match git, ssh and https urls. Additionally, we can match ssh connect\nstrings (`git@github.com:npm/hosted-git-info`) and shortcuts (eg,\n`github:npm/hosted-git-info`). Github specifically, is detected in the case\nof a third, unprefixed, form: `npm/hosted-git-info`.\n\nIf it does match, the returned object has properties of:\n\n* info.type -- The short name of the service\n* info.domain -- The domain for git protocol use\n* info.user -- The name of the user/org on the git host\n* info.project -- The name of the project on the git host\n\nAnd methods of:\n\n* info.file(path)\n\nGiven the path of a file relative to the repository, returns a URL for\ndirectly fetching it from the githost. If no comittish was set then\n`master` will be used as the default.\n\nFor example `hostedGitInfo.fromUrl(\"git@github.com:npm/hosted-git-info.git#v1.0.0\").file(\"package.json\")`\nwould return `https://raw.githubusercontent.com/npm/hosted-git-info/v1.0.0/package.json`\n\n* info.shortcut()\n\neg, `github:npm/hosted-git-info`\n\n* info.browse()\n\neg, `https://github.com/npm/hosted-git-info/tree/v1.2.0`\n\n* info.bugs()\n\neg, `https://github.com/npm/hosted-git-info/issues`\n\n* info.docs()\n\neg, `https://github.com/npm/hosted-git-info/tree/v1.2.0#readme`\n\n* info.https()\n\neg, `git+https://github.com/npm/hosted-git-info.git`\n\n* info.sshurl()\n\neg, `git+ssh://git@github.com/npm/hosted-git-info.git`\n\n* info.ssh()\n\neg, `git@github.com:npm/hosted-git-info.git`\n\n* info.path()\n\neg, `npm/hosted-git-info`\n\n* info.getDefaultRepresentation()\n\nReturns the default output type. The default output type is based on the\nstring you passed in to be parsed\n\n* info.toString()\n\nUses the getDefaultRepresentation to call one of the other methods to get a URL for\nthis resource. As such `hostedGitInfo.fromUrl(url).toString()` will give\nyou a normalized version of the URL that still uses the same protocol.\n\nShortcuts will still be returned as shortcuts, but the special case github\nform of `org/project` will be normalized to `github:org/project`.\n\nSSH connect strings will be normalized into `git+ssh` URLs.\n\n\n## Supported hosts\n\nCurrently this supports Github, Bitbucket and Gitlab. Pull requests for\nadditional hosts welcome.\n\n", - "readmeFilename": "README.md", - "gitHead": "9f24fee147bb76595e234b7556ecc9d0448215fa", - "_id": "hosted-git-info@2.1.2", - "_shasum": "f947976852931851c33644bbce80d1e499795246", - "_from": "hosted-git-info@>=2.1.2 <2.2.0" + "gitHead": "9e1a36df8eb050a663713c79e56d89dadba2bd8d", + "_id": "hosted-git-info@2.1.4", + "_shasum": "d9e953b26988be88096c46e926494d9604c300f8", + "_from": "hosted-git-info@>=2.1.2 <2.2.0", + "_npmVersion": "2.10.1", + "_nodeVersion": "2.0.2", + "_npmUser": { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + "dist": { + "shasum": "d9e953b26988be88096c46e926494d9604c300f8", + "tarball": "http://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.1.4.tgz" + }, + "maintainers": [ + { + "name": "iarna", + "email": "me@re-becca.org" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.1.4.tgz" } diff --git a/package.json b/package.json index aa0e41b96..7f97c5da6 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "github-url-from-username-repo": "~1.0.2", "glob": "~5.0.7", "graceful-fs": "~3.0.7", - "hosted-git-info": "~2.1.2", + "hosted-git-info": "~2.1.4", "inflight": "~1.0.4", "inherits": "~2.0.1", "ini": "~1.3.3", |