diff --git a/lib/index.js b/lib/index.js index d5d63c6..2ef2cf3 100644 --- a/lib/index.js +++ b/lib/index.js @@ -16,6 +16,11 @@ function protocolToRepresentation (protocol) { return protocolToRepresentationMap[protocol] || protocol.slice(0, -1) } +function lastIndexOfBefore (str, char, beforeChar) { + const startPosition = str.lastIndexOf(beforeChar) + return str.lastIndexOf(char, startPosition > -1 ? startPosition : Infinity) +} + const authProtocols = { 'git:': true, 'https:': true, @@ -189,12 +194,11 @@ const isGitHubShorthand = (arg) => { // attempt to correct an scp style url so that it will parse with `new URL()` const correctUrl = (giturl) => { const firstAt = giturl.indexOf('@') - const lastHash = giturl.lastIndexOf('#') - let firstColon = giturl.indexOf(':') - let lastColon = giturl.lastIndexOf(':', lastHash > -1 ? lastHash : Infinity) + // ignore colons that come after the hash since that could include colons such as: + // git@github.com:user/package-2#semver:^1.0.0 + const lastColonBeforeHash = lastIndexOfBefore(giturl, ':', '#') - let corrected - if (lastColon > firstAt) { + if (lastColonBeforeHash > firstAt) { // the last : comes after the first @ (or there is no @) // like it would in: // proto://hostname.com:user/repo @@ -205,44 +209,33 @@ const correctUrl = (giturl) => { // proto://:password@hostname.com:user/repo // proto://username:password@hostname.com:user/repo // then we replace the last : with a / to create a valid path - corrected = giturl.slice(0, lastColon) + '/' + giturl.slice(lastColon + 1) - // // and we find our new : positions - firstColon = corrected.indexOf(':') - lastColon = corrected.lastIndexOf(':') + giturl = giturl.slice(0, lastColonBeforeHash) + '/' + giturl.slice(lastColonBeforeHash + 1) } - if (firstColon === -1 && giturl.indexOf('//') === -1) { + if (lastIndexOfBefore(giturl, ':', '#') === -1 && giturl.indexOf('//') === -1) { // we have no : at all // as it would be in: // username@hostname.com/user/repo // then we prepend a protocol - corrected = `git+ssh://${corrected}` + giturl = `git+ssh://${giturl}` } - return corrected + return giturl } // try to parse the url as its given to us, if that throws // then we try to clean the url and parse that result instead // THIS FUNCTION SHOULD NEVER THROW const parseGitUrl = (giturl) => { - let result try { - result = new url.URL(giturl) + return new url.URL(giturl) } catch { // this fn should never throw } - if (result) { - return result - } - - const correctedUrl = correctUrl(giturl) try { - result = new url.URL(correctedUrl) + return new url.URL(correctUrl(giturl)) } catch { // this fn should never throw } - - return result } diff --git a/test/github.js b/test/github.js index 3311f32..38a5ba3 100644 --- a/test/github.js +++ b/test/github.js @@ -31,157 +31,158 @@ const valid = { // // NOTE these do not accept auth at all 'foo/bar': { ...defaults, default: 'shortcut' }, - 'foo/bar#branch': { ...defaults, default: 'shortcut', committish: 'branch' }, + 'foo/bar#branch:^1.0.0': { ...defaults, default: 'shortcut', committish: 'branch:^1.0.0' }, 'foo/bar.git': { ...defaults, default: 'shortcut' }, - 'foo/bar.git#branch': { ...defaults, default: 'shortcut', committish: 'branch' }, + 'foo/bar.git#branch:^1.0.0': { ...defaults, default: 'shortcut', committish: 'branch:^1.0.0' }, // shortcuts // // NOTE auth is accepted but ignored 'github:foo/bar': { ...defaults, default: 'shortcut' }, - 'github:foo/bar#branch': { ...defaults, default: 'shortcut', committish: 'branch' }, + 'github:foo/bar#branch:^1.0.0': { ...defaults, default: 'shortcut', committish: 'branch:^1.0.0' }, 'github:user@foo/bar': { ...defaults, default: 'shortcut', auth: null }, - 'github:user@foo/bar#branch': { ...defaults, default: 'shortcut', auth: null, committish: 'branch' }, + 'github:user@foo/bar#branch:^1.0.0': { ...defaults, default: 'shortcut', auth: null, committish: 'branch:^1.0.0' }, 'github:user:password@foo/bar': { ...defaults, default: 'shortcut', auth: null }, - 'github:user:password@foo/bar#branch': { ...defaults, default: 'shortcut', auth: null, committish: 'branch' }, + 'github:user:password@foo/bar#branch:^1.0.0': { ...defaults, default: 'shortcut', auth: null, committish: 'branch:^1.0.0' }, 'github::password@foo/bar': { ...defaults, default: 'shortcut', auth: null }, - 'github::password@foo/bar#branch': { ...defaults, default: 'shortcut', auth: null, committish: 'branch' }, + 'github::password@foo/bar#branch:^1.0.0': { ...defaults, default: 'shortcut', auth: null, committish: 'branch:^1.0.0' }, 'github:foo/bar.git': { ...defaults, default: 'shortcut' }, - 'github:foo/bar.git#branch': { ...defaults, default: 'shortcut', committish: 'branch' }, + 'github:foo/bar.git#branch:^1.0.0': { ...defaults, default: 'shortcut', committish: 'branch:^1.0.0' }, 'github:user@foo/bar.git': { ...defaults, default: 'shortcut', auth: null }, - 'github:user@foo/bar.git#branch': { ...defaults, default: 'shortcut', auth: null, committish: 'branch' }, + 'github:user@foo/bar.git#branch:^1.0.0': { ...defaults, default: 'shortcut', auth: null, committish: 'branch:^1.0.0' }, 'github:user:password@foo/bar.git': { ...defaults, default: 'shortcut', auth: null }, - 'github:user:password@foo/bar.git#branch': { ...defaults, default: 'shortcut', auth: null, committish: 'branch' }, + 'github:user:password@foo/bar.git#branch:^1.0.0': { ...defaults, default: 'shortcut', auth: null, committish: 'branch:^1.0.0' }, 'github::password@foo/bar.git': { ...defaults, default: 'shortcut', auth: null }, - 'github::password@foo/bar.git#branch': { ...defaults, default: 'shortcut', auth: null, committish: 'branch' }, + 'github::password@foo/bar.git#branch:^1.0.0': { ...defaults, default: 'shortcut', auth: null, committish: 'branch:^1.0.0' }, // git urls // // NOTE auth is accepted and respected 'git://github.com/foo/bar': { ...defaults, default: 'git' }, - 'git://github.com/foo/bar#branch': { ...defaults, default: 'git', committish: 'branch' }, + 'git://github.com/foo/bar#branch:^1.0.0': { ...defaults, default: 'git', committish: 'branch:^1.0.0' }, 'git://user@github.com/foo/bar': { ...defaults, default: 'git', auth: 'user' }, - 'git://user@github.com/foo/bar#branch': { ...defaults, default: 'git', auth: 'user', committish: 'branch' }, + 'git://user@github.com/foo/bar#branch:^1.0.0': { ...defaults, default: 'git', auth: 'user', committish: 'branch:^1.0.0' }, 'git://user:password@github.com/foo/bar': { ...defaults, default: 'git', auth: 'user:password' }, - 'git://user:password@github.com/foo/bar#branch': { ...defaults, default: 'git', auth: 'user:password', committish: 'branch' }, + 'git://user:password@github.com/foo/bar#branch:^1.0.0': { ...defaults, default: 'git', auth: 'user:password', committish: 'branch:^1.0.0' }, 'git://:password@github.com/foo/bar': { ...defaults, default: 'git', auth: ':password' }, - 'git://:password@github.com/foo/bar#branch': { ...defaults, default: 'git', auth: ':password', committish: 'branch' }, + 'git://:password@github.com/foo/bar#branch:^1.0.0': { ...defaults, default: 'git', auth: ':password', committish: 'branch:^1.0.0' }, 'git://github.com/foo/bar.git': { ...defaults, default: 'git' }, - 'git://github.com/foo/bar.git#branch': { ...defaults, default: 'git', committish: 'branch' }, + 'git://github.com/foo/bar.git#branch:^1.0.0': { ...defaults, default: 'git', committish: 'branch:^1.0.0' }, 'git://git@github.com/foo/bar.git': { ...defaults, default: 'git', auth: 'git' }, - 'git://git@github.com/foo/bar.git#branch': { ...defaults, default: 'git', auth: 'git', committish: 'branch' }, + 'git://git@github.com/foo/bar.git#branch:^1.0.0': { ...defaults, default: 'git', auth: 'git', committish: 'branch:^1.0.0' }, 'git://user:password@github.com/foo/bar.git': { ...defaults, default: 'git', auth: 'user:password' }, - 'git://user:password@github.com/foo/bar.git#branch': { ...defaults, default: 'git', auth: 'user:password', committish: 'branch' }, + 'git://user:password@github.com/foo/bar.git#branch:^1.0.0': { ...defaults, default: 'git', auth: 'user:password', committish: 'branch:^1.0.0' }, 'git://:password@github.com/foo/bar.git': { ...defaults, default: 'git', auth: ':password' }, - 'git://:password@github.com/foo/bar.git#branch': { ...defaults, default: 'git', auth: ':password', committish: 'branch' }, + 'git://:password@github.com/foo/bar.git#branch:^1.0.0': { ...defaults, default: 'git', auth: ':password', committish: 'branch:^1.0.0' }, // no-protocol git+ssh // // NOTE auth is _required_ (see invalid list) but ignored 'user@github.com:foo/bar': { ...defaults, default: 'sshurl', auth: null }, - 'user@github.com:foo/bar#branch': { ...defaults, default: 'sshurl', auth: null, committish: 'branch' }, + 'user@github.com:foo/bar#branch:^1.0.0': { ...defaults, default: 'sshurl', auth: null, committish: 'branch:^1.0.0' }, 'user:password@github.com:foo/bar': { ...defaults, default: 'sshurl', auth: null }, - 'user:password@github.com:foo/bar#branch': { ...defaults, default: 'sshurl', auth: null, committish: 'branch' }, + 'user:password@github.com:foo/bar#branch:^1.0.0': { ...defaults, default: 'sshurl', auth: null, committish: 'branch:^1.0.0' }, ':password@github.com:foo/bar': { ...defaults, default: 'sshurl', auth: null }, - ':password@github.com:foo/bar#branch': { ...defaults, default: 'sshurl', auth: null, committish: 'branch' }, + ':password@github.com:foo/bar#branch:^1.0.0': { ...defaults, default: 'sshurl', auth: null, committish: 'branch:^1.0.0' }, 'user@github.com:foo/bar.git': { ...defaults, default: 'sshurl', auth: null }, - 'user@github.com:foo/bar.git#branch': { ...defaults, default: 'sshurl', auth: null, committish: 'branch' }, + 'user@github.com:foo/bar.git#branch:^1.0.0': { ...defaults, default: 'sshurl', auth: null, committish: 'branch:^1.0.0' }, 'user:password@github.com:foo/bar.git': { ...defaults, default: 'sshurl', auth: null }, - 'user:password@github.com:foo/bar.git#branch': { ...defaults, default: 'sshurl', auth: null, committish: 'branch' }, + 'user:password@github.com:foo/bar.git#branch:^1.0.0': { ...defaults, default: 'sshurl', auth: null, committish: 'branch:^1.0.0' }, ':password@github.com:foo/bar.git': { ...defaults, default: 'sshurl', auth: null }, - ':password@github.com:foo/bar.git#branch': { ...defaults, default: 'sshurl', auth: null, committish: 'branch' }, + ':password@github.com:foo/bar.git#branch:^1.0.0': { ...defaults, default: 'sshurl', auth: null, committish: 'branch:^1.0.0' }, // git+ssh urls // // NOTE auth is accepted but ignored 'git+ssh://github.com:foo/bar': { ...defaults, default: 'sshurl' }, - 'git+ssh://github.com:foo/bar#branch': { ...defaults, default: 'sshurl', committish: 'branch' }, + 'git+ssh://github.com:foo/bar#branch:^1.0.0': { ...defaults, default: 'sshurl', committish: 'branch:^1.0.0' }, 'git+ssh://user@github.com:foo/bar': { ...defaults, default: 'sshurl', auth: null }, - 'git+ssh://user@github.com:foo/bar#branch': { ...defaults, default: 'sshurl', auth: null, committish: 'branch' }, + 'git+ssh://user@github.com:foo/bar#branch:^1.0.0': { ...defaults, default: 'sshurl', auth: null, committish: 'branch:^1.0.0' }, 'git+ssh://user:password@github.com:foo/bar': { ...defaults, default: 'sshurl', auth: null }, - 'git+ssh://user:password@github.com:foo/bar#branch': { ...defaults, default: 'sshurl', auth: null, committish: 'branch' }, + 'git+ssh://user:password@github.com:foo/bar#branch:^1.0.0': { ...defaults, default: 'sshurl', auth: null, committish: 'branch:^1.0.0' }, 'git+ssh://:password@github.com:foo/bar': { ...defaults, default: 'sshurl', auth: null }, - 'git+ssh://:password@github.com:foo/bar#branch': { ...defaults, default: 'sshurl', auth: null, committish: 'branch' }, + 'git+ssh://:password@github.com:foo/bar#branch:^1.0.0': { ...defaults, default: 'sshurl', auth: null, committish: 'branch:^1.0.0' }, 'git+ssh://github.com:foo/bar.git': { ...defaults, default: 'sshurl' }, - 'git+ssh://github.com:foo/bar.git#branch': { ...defaults, default: 'sshurl', committish: 'branch' }, + 'git+ssh://github.com:foo/bar.git#branch:^1.0.0': { ...defaults, default: 'sshurl', committish: 'branch:^1.0.0' }, 'git+ssh://user@github.com:foo/bar.git': { ...defaults, default: 'sshurl', auth: null }, - 'git+ssh://user@github.com:foo/bar.git#branch': { ...defaults, default: 'sshurl', auth: null, committish: 'branch' }, + 'git+ssh://user@github.com:foo/bar.git#branch:^1.0.0': { ...defaults, default: 'sshurl', auth: null, committish: 'branch:^1.0.0' }, 'git+ssh://user:password@github.com:foo/bar.git': { ...defaults, default: 'sshurl', auth: null }, - 'git+ssh://user:password@github.com:foo/bar.git#branch': { ...defaults, default: 'sshurl', auth: null, committish: 'branch' }, + 'git+ssh://user:password@github.com:foo/bar.git#branch:^1.0.0': { ...defaults, default: 'sshurl', auth: null, committish: 'branch:^1.0.0' }, 'git+ssh://:password@github.com:foo/bar.git': { ...defaults, default: 'sshurl', auth: null }, - 'git+ssh://:password@github.com:foo/bar.git#branch': { ...defaults, default: 'sshurl', auth: null, committish: 'branch' }, + 'git+ssh://:password@github.com:foo/bar.git#branch:^1.0.0': { ...defaults, default: 'sshurl', auth: null, committish: 'branch:^1.0.0' }, // ssh urls // // NOTE auth is accepted but ignored 'ssh://github.com:foo/bar': { ...defaults, default: 'sshurl' }, - 'ssh://github.com:foo/bar#branch': { ...defaults, default: 'sshurl', committish: 'branch' }, + 'ssh://github.com:foo/bar#branch:^1.0.0': { ...defaults, default: 'sshurl', committish: 'branch:^1.0.0' }, 'ssh://user@github.com:foo/bar': { ...defaults, default: 'sshurl', auth: null }, - 'ssh://user@github.com:foo/bar#branch': { ...defaults, default: 'sshurl', auth: null, committish: 'branch' }, + 'ssh://user@github.com:foo/bar#branch:^1.0.0': { ...defaults, default: 'sshurl', auth: null, committish: 'branch:^1.0.0' }, 'ssh://user:password@github.com:foo/bar': { ...defaults, default: 'sshurl', auth: null }, - 'ssh://user:password@github.com:foo/bar#branch': { ...defaults, default: 'sshurl', auth: null, committish: 'branch' }, + 'ssh://user:password@github.com:foo/bar#branch:^1.0.0': { ...defaults, default: 'sshurl', auth: null, committish: 'branch:^1.0.0' }, 'ssh://:password@github.com:foo/bar': { ...defaults, default: 'sshurl', auth: null }, - 'ssh://:password@github.com:foo/bar#branch': { ...defaults, default: 'sshurl', auth: null, committish: 'branch' }, + 'ssh://:password@github.com:foo/bar#branch:^1.0.0': { ...defaults, default: 'sshurl', auth: null, committish: 'branch:^1.0.0' }, 'ssh://github.com:foo/bar.git': { ...defaults, default: 'sshurl' }, - 'ssh://github.com:foo/bar.git#branch': { ...defaults, default: 'sshurl', committish: 'branch' }, + 'ssh://github.com:foo/bar.git#branch:^1.0.0': { ...defaults, default: 'sshurl', committish: 'branch:^1.0.0' }, 'ssh://user@github.com:foo/bar.git': { ...defaults, default: 'sshurl', auth: null }, - 'ssh://user@github.com:foo/bar.git#branch': { ...defaults, default: 'sshurl', auth: null, committish: 'branch' }, + 'ssh://user@github.com:foo/bar.git#branch:^1.0.0': { ...defaults, default: 'sshurl', auth: null, committish: 'branch:^1.0.0' }, 'ssh://user:password@github.com:foo/bar.git': { ...defaults, default: 'sshurl', auth: null }, - 'ssh://user:password@github.com:foo/bar.git#branch': { ...defaults, default: 'sshurl', auth: null, committish: 'branch' }, + 'ssh://user:password@github.com:foo/bar.git#branch:^1.0.0': { ...defaults, default: 'sshurl', auth: null, committish: 'branch:^1.0.0' }, 'ssh://:password@github.com:foo/bar.git': { ...defaults, default: 'sshurl', auth: null }, - 'ssh://:password@github.com:foo/bar.git#branch': { ...defaults, default: 'sshurl', auth: null, committish: 'branch' }, + 'ssh://:password@github.com:foo/bar.git#branch:^1.0.0': { ...defaults, default: 'sshurl', auth: null, committish: 'branch:^1.0.0' }, // git+https urls // // NOTE auth is accepted and respected 'git+https://github.com/foo/bar': { ...defaults, default: 'https' }, - 'git+https://github.com/foo/bar#branch': { ...defaults, default: 'https', committish: 'branch' }, + 'git+https://github.com/foo/bar#branch:^1.0.0': { ...defaults, default: 'https', committish: 'branch:^1.0.0' }, 'git+https://user@github.com/foo/bar': { ...defaults, default: 'https', auth: 'user' }, - 'git+https://user@github.com/foo/bar#branch': { ...defaults, default: 'https', auth: 'user', committish: 'branch' }, + 'git+https://user@github.com/foo/bar#branch:^1.0.0': { ...defaults, default: 'https', auth: 'user', committish: 'branch:^1.0.0' }, 'git+https://user:password@github.com/foo/bar': { ...defaults, default: 'https', auth: 'user:password' }, - 'git+https://user:password@github.com/foo/bar#branch': { ...defaults, default: 'https', auth: 'user:password', committish: 'branch' }, + 'git+https://user:password@github.com/foo/bar#branch:^1.0.0': { ...defaults, default: 'https', auth: 'user:password', committish: 'branch:^1.0.0' }, 'git+https://:password@github.com/foo/bar': { ...defaults, default: 'https', auth: ':password' }, - 'git+https://:password@github.com/foo/bar#branch': { ...defaults, default: 'https', auth: ':password', committish: 'branch' }, + 'git+https://:password@github.com/foo/bar#branch:^1.0.0': { ...defaults, default: 'https', auth: ':password', committish: 'branch:^1.0.0' }, 'git+https://github.com/foo/bar.git': { ...defaults, default: 'https' }, - 'git+https://github.com/foo/bar.git#branch': { ...defaults, default: 'https', committish: 'branch' }, + 'git+https://github.com/foo/bar.git#branch:^1.0.0': { ...defaults, default: 'https', committish: 'branch:^1.0.0' }, 'git+https://user@github.com/foo/bar.git': { ...defaults, default: 'https', auth: 'user' }, - 'git+https://user@github.com/foo/bar.git#branch': { ...defaults, default: 'https', auth: 'user', committish: 'branch' }, + 'git+https://user@github.com/foo/bar.git#branch:^1.0.0': { ...defaults, default: 'https', auth: 'user', committish: 'branch:^1.0.0' }, 'git+https://user:password@github.com/foo/bar.git': { ...defaults, default: 'https', auth: 'user:password' }, - 'git+https://user:password@github.com/foo/bar.git#branch': { ...defaults, default: 'https', auth: 'user:password', committish: 'branch' }, + 'git+https://user:password@github.com/foo/bar.git#branch:^1.0.0': { ...defaults, default: 'https', auth: 'user:password', committish: 'branch:^1.0.0' }, 'git+https://:password@github.com/foo/bar.git': { ...defaults, default: 'https', auth: ':password' }, - 'git+https://:password@github.com/foo/bar.git#branch': { ...defaults, default: 'https', auth: ':password', committish: 'branch' }, + 'git+https://:password@github.com/foo/bar.git#branch:^1.0.0': { ...defaults, default: 'https', auth: ':password', committish: 'branch:^1.0.0' }, // https urls // // NOTE auth is accepted and respected 'https://github.com/foo/bar': { ...defaults, default: 'https' }, - 'https://github.com/foo/bar#branch': { ...defaults, default: 'https', committish: 'branch' }, + 'https://github.com/foo/bar#branch:^1.0.0': { ...defaults, default: 'https', committish: 'branch:^1.0.0' }, 'https://user@github.com/foo/bar': { ...defaults, default: 'https', auth: 'user' }, - 'https://user@github.com/foo/bar#branch': { ...defaults, default: 'https', auth: 'user', committish: 'branch' }, + 'https://user@github.com/foo/bar#branch:^1.0.0': { ...defaults, default: 'https', auth: 'user', committish: 'branch:^1.0.0' }, 'https://user:password@github.com/foo/bar': { ...defaults, default: 'https', auth: 'user:password' }, - 'https://user:password@github.com/foo/bar#branch': { ...defaults, default: 'https', auth: 'user:password', committish: 'branch' }, + 'https://user:password@github.com/foo/bar#branch:^1.0.0': { ...defaults, default: 'https', auth: 'user:password', committish: 'branch:^1.0.0' }, 'https://:password@github.com/foo/bar': { ...defaults, default: 'https', auth: ':password' }, - 'https://:password@github.com/foo/bar#branch': { ...defaults, default: 'https', auth: ':password', committish: 'branch' }, + 'https://:password@github.com/foo/bar#branch:^1.0.0': { ...defaults, default: 'https', auth: ':password', committish: 'branch:^1.0.0' }, 'https://github.com/foo/bar.git': { ...defaults, default: 'https' }, - 'https://github.com/foo/bar.git#branch': { ...defaults, default: 'https', committish: 'branch' }, + 'https://github.com/foo/bar.git#branch:^1.0.0': { ...defaults, default: 'https', committish: 'branch:^1.0.0' }, 'https://user@github.com/foo/bar.git': { ...defaults, default: 'https', auth: 'user' }, - 'https://user@github.com/foo/bar.git#branch': { ...defaults, default: 'https', auth: 'user', committish: 'branch' }, + 'https://user@github.com/foo/bar.git#branch:^1.0.0': { ...defaults, default: 'https', auth: 'user', committish: 'branch:^1.0.0' }, 'https://user:password@github.com/foo/bar.git': { ...defaults, default: 'https', auth: 'user:password' }, - 'https://user:password@github.com/foo/bar.git#branch': { ...defaults, default: 'https', auth: 'user:password', committish: 'branch' }, + 'https://user:password@github.com/foo/bar.git#branch:^1.0.0': { ...defaults, default: 'https', auth: 'user:password', committish: 'branch:^1.0.0' }, 'https://:password@github.com/foo/bar.git': { ...defaults, default: 'https', auth: ':password' }, - 'https://:password@github.com/foo/bar.git#branch': { ...defaults, default: 'https', auth: ':password', committish: 'branch' }, + 'https://:password@github.com/foo/bar.git#branch:^1.0.0': { ...defaults, default: 'https', auth: ':password', committish: 'branch:^1.0.0' }, // inputs that are not quite proper but we accept anyway 'https://www.github.com/foo/bar': { ...defaults, default: 'https' }, 'foo/bar#branch with space': { ...defaults, default: 'shortcut', committish: 'branch with space' }, + 'foo/bar#branch:with:colons': { ...defaults, default: 'shortcut', committish: 'branch:with:colons' }, 'https://github.com/foo/bar/tree/branch': { ...defaults, default: 'https', committish: 'branch' }, 'user..blerg--/..foo-js# . . . . . some . tags / / /': { ...defaults, default: 'shortcut', user: 'user..blerg--', project: '..foo-js', committish: ' . . . . . some . tags / / /' }, }