Compare commits
4 Commits
44f7572167
...
c5f7de38e2
| Author | SHA1 | Date |
|---|---|---|
|
|
c5f7de38e2 | |
|
|
16ff771941 | |
|
|
ea557079f0 | |
|
|
87d194b93e |
|
|
@ -220,6 +220,23 @@ console.log(`\n${colors.cyan}Simple owner/repo URLs (regression check)${colors.r
|
|||
assert(result.displayName === 'path/repo', 'SSH protocol custom-port displayName uses last two segments', `Got: ${result.displayName}`);
|
||||
}
|
||||
|
||||
{
|
||||
const result = manager.parseSource('ssh://git@host:2222/path/repo.git?foo=bar#readme');
|
||||
assert(result.isValid === true, 'SSH protocol URL with query and hash is valid');
|
||||
assert(result.cloneUrl === 'ssh://git@host:2222/path/repo.git', 'SSH protocol cloneUrl drops query and hash', `Got: ${result.cloneUrl}`);
|
||||
assert(result.cacheKey === 'host:2222/path/repo', 'SSH protocol query/hash cacheKey ignores query and hash', `Got: ${result.cacheKey}`);
|
||||
}
|
||||
|
||||
{
|
||||
const result = manager.parseSource('ssh://git%40corp@host:2222/path/repo.git?foo=bar#readme');
|
||||
assert(result.isValid === true, 'SSH protocol URL with encoded username is valid');
|
||||
assert(
|
||||
result.cloneUrl === 'ssh://git%40corp@host:2222/path/repo.git',
|
||||
'SSH protocol cloneUrl preserves encoded username',
|
||||
`Got: ${result.cloneUrl}`,
|
||||
);
|
||||
}
|
||||
|
||||
{
|
||||
const result = manager.parseSource('ssh://git@host/owner/repo.git');
|
||||
assert(result.isValid === true, 'SSH protocol URL without custom port remains valid');
|
||||
|
|
|
|||
|
|
@ -171,10 +171,13 @@ class CustomModuleManager {
|
|||
const repoSeg = segments.at(-1);
|
||||
const ownerSeg = segments.at(-2);
|
||||
const displayName = ownerSeg ? `${ownerSeg}/${repoSeg}` : repoSeg;
|
||||
url.search = '';
|
||||
url.hash = '';
|
||||
const cloneUrl = url.toString();
|
||||
|
||||
return {
|
||||
type: 'url',
|
||||
cloneUrl: trimmed,
|
||||
cloneUrl,
|
||||
subdir: null,
|
||||
localPath: null,
|
||||
version: versionSuffix || null,
|
||||
|
|
|
|||
Loading…
Reference in New Issue