dub-registry 2.3.0

Online registry for dub packages


To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

DUB registry

vibe.d logo Online registry for dub packages, see http://code.dlang.org/.

Build Status

How to build & run locally

Requirements:

  • OpenSSL
  • MongoDB
dub

Running as a mirror

dub -- --mirror=https://code.dlang.org

GitHub/GitLab API

By default the GitHub/GitLab update cron job will use anonymous authentication on your local machine. As GitHub's API without authentication is quite rate-limited, you probably want to use authenticated API requests. You can do so by creating a settings.json in the root folder of the dub-registry and adding credentials for the needed APIs:

{
	"github-user": "<your-fancy-user-name>",
	"github-password": "<your-fancy-password>",
	"gitlab-url": "https://gitlab.com/",
	"gitlab-auth": "<gitlab-api-token from https://gitlab.com/profile/personal_access_tokens>"
}

It's recommended to create a separate account for the DUB registry GitHub authentication. Equally, if no GitLab packages are used in your local repository, no GitLab authentication is needed.

SECURITY NOTICE

Development versions prior to 2.3.0 were leaking the GitLab private token in error messages shown to the user. Please make sure to use the latest version along with a freshly generated token.

Running without the cron job

For local development it's often useful to disable the cron job, you can do so with the --no-monitoring flag:

dub -- --no-monitoring

Importing a one-time snapshot from the registry

You can download a dump of all packages and import it into your local registry for development:

curl https://code.dlang.org/api/packages/dump | gunzip > mirror.json
dub -- --mirror=mirror.json

Starting the registry with mirror.json will import all packages within the JSON file. Once all packages have been imported, you can start the registry as you normally would:

dub

And you should notice that it now contains all packages which are listed on code.dlang.org

Note that --mirror=mirror.json and --mirror=https://code.dlang.org are very similar and the mirror.json is only preferred for local development because it allows to easily nuke the entire mongo database and re-initialize it without needing any connection to the internet.

FAQ: I'm getting an "undefined reference to 'SSLv23clientmethod'"

Link with OpenSSL 1.1:

dub --override-config="vibe-d:tls/openssl-1.1"
Authors:
  • Sönke Ludwig
  • Martin Nowak
  • Anton Fediushin aka ohdatboi
  • Jan Jurzitza aka WebFreak001
  • Sebastian Wilzbach
  • Colden Cullen
  • see GitHub for more
Dependencies:
vibe-d, dub, userman
Versions:
2.3.0 2018-Jun-16
2.2.0 2017-Sep-04
2.1.0 2017-Jun-16
2.0.0 2016-Oct-14
1.6.0 2015-Sep-28
Show all 16 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 393 downloads total

Score:
2.2
Short URL:
dub-registry.dub.pm