Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
bitbucket-url-from-git
Advanced tools
Readme
Blatantly ripped off tj/node-github-url-from-git But tweaked for bitbucket urls
describe('parse(url)', function () {
it('should support git://*', function () {
var url = 'git@bitbucket.org:alex-e-leon/node-bitbucket-url-from-git.git'
parse(url).should.eql('https://bitbucket.org/alex-e-leon/node-bitbucket-url-from-git')
})
it('should support git://*.git', function () {
var url = 'git://bitbucket.org/alex-e-leon/node-bitbucket-url-from-git.git'
parse(url).should.eql('https://bitbucket.org/alex-e-leon/node-bitbucket-url-from-git')
})
it('should support https://*', function () {
var url = 'https://bitbucket.org/alex-e-leon/node-bitbucket-url-from-git'
parse(url).should.eql('https://bitbucket.org/alex-e-leon/node-bitbucket-url-from-git')
})
it('should support https://*.git', function () {
var url = 'https://alex@bitbucket.org/alex-e-leon/node-bitbucket-url-from-git.git'
parse(url).should.eql('https://bitbucket.org/alex-e-leon/node-bitbucket-url-from-git')
})
it('should return undefined on failure', function () {
var url = 'git://bitbucket.org/alex-e-leon/.git'
assert(parse(url) == null)
})
it('should parse git@bitbucket.org:/alex-e-leon/node-bitbucket-url-from-git.git', function () {
var url = 'git@bitbucket.org:/alex-e-leon/node-bitbucket-url-from-git.git'
parse(url).should.eql('https://bitbucket.org/alex-e-leon/node-bitbucket-url-from-git')
})
it('should parse git@github.com:bcoe/thumbd.git#2.7.0', function () {
var url = 'git@bitbucket.org:alex-e-leon/node-bitbucket-url-from-git.git#2.7.0'
parse(url).should.eql('https://bitbucket.org/alex-e-leon/node-bitbucket-url-from-git')
})
it('should parse git+https://bitbucket.org/alex-e-leon/node-bitbucket-url-from-git.git', function () {
var url = 'git+https://bitbucket.org/alex-e-leon/node-bitbucket-url-from-git.git'
parse(url).should.eql('https://bitbucket.org/alex-e-leon/node-bitbucket-url-from-git')
})
it('should parse git+ssh://bitbucket.org/alex-e-leon/node-bitbucket-url-from-git.git', function () {
var url = 'git+ssh://bitbucket.org/alex-e-leon/node-bitbucket-url-from-git.git'
parse(url).should.eql('https://bitbucket.org/alex-e-leon/node-bitbucket-url-from-git')
})
// snippet urls.
it('should parse git@ snippet urls', function () {
var url = 'git@bitbucket.org:snippets/alex-e-leon/nepk84/a-snippet.git'
parse(url).should.equal('https://bitbucket.org/snippets/alex-e-leon/nepk84')
})
it('should parse https://gist urls', function () {
var url = 'https://alex@bitbucket.org/snippets/alex-e-leon/nepk84/a-snippet.git'
parse(url).should.equal('https://bitbucket.org/snippets/alex-e-leon/nepk84')
})
// Handle arbitrary GitHub Enterprise domains.
it('should parse parse extra bitbucket enterprise urls provided', function () {
var url = 'git://bitbucket.example.com/alex-e-leon/node-bitbucket-url-from-git.git'
parse(
url, {extraBaseUrls: ['bitbucket.example.com']}
).should.equal('https://bitbucket.example.com/alex-e-leon/node-bitbucket-url-from-git')
})
it('should parse bitbucket enterprise urls with multiple subdomains', function () {
var url = 'git://bitbucket.internal.example.com/alex-e-leon/node-bitbucket-url-from-git.git'
parse(
url, {extraBaseUrls: ['bitbucket.internal.example.com']}
).should.equal('https://bitbucket.internal.example.com/alex-e-leon/node-bitbucket-url-from-git')
})
})
FAQs
Parse a bitbucket git url and return the bitbucket repo url
The npm package bitbucket-url-from-git receives a total of 5,494 weekly downloads. As such, bitbucket-url-from-git popularity was classified as popular.
We found that bitbucket-url-from-git demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.