mpp 1.0.2+1

  • Readme
  • Changelog
  • Example
  • Installing
  • 49



Git-based, password-protected private Pub server.

mpp is pretty minimal, and requires setup, but gets the job done.

mpp is built using Angel, a powerful, production-ready backend framework in Dart. Consider checking it out if you like mpp.

How it works #

mpp is a bare-minimum implementation of the Pub server API. It can be configured to fetch package sources from remote Git URL's, and redirects any other request to

For example, if you set up hello to mirror, then you can include package:hello in your own packages, provided that you set up Pub correctly (either via PUB_HOSTED_URL, or explicit hosted dependencies.)

mpp is password-protected, so third parties and malicious parties have no access to your private Dart code. For this to work, mpp requires Basic authentication.

For example, if you have a user foo with password bar, and mpp is running at localhost:3000, you could run the following:

export PUB_HOSTED_URL=http://foo:bar@localhost:3000

And then commands like pub get and pub upgrade would work, seamlessly.

Installation #

pub global activate mpp

Usage #

mpp is not a globally-installed package, so expect to the following generated in the working directory:

  • .dart_tool/mpp_packages
  • repos.json
  • users.json

Running the Server #

Starts a server at http://localhost:3000 by default, running as many instances as you have available processor cores:


To see options, i.e. port, etc.:

mpp_server -h

Creating Users #

mpp auth -u foo -p bar

Hosting a Package #

mpp mirror -n <package_name> -u <git url>

Deployment #

Deployment is very much an open-ended process, and thus won't be covered in great detail here. In general, though, the minimal steps are:

  • Install Dart.
  • Install mpp.
  • Using the mpp command line, create as many user accounts as is necessary.
  • Using the mpp command line, mark repositories to be mirrored.
  • Run mpp_server.

However, you might also consider:

  • Configuring HTTPS
  • Using a reverse proxy
  • Running as a daemon (i.e., using systemd)

1.0.2+1 #

  • Pub score fixes.

1.0.2 #

  • Fix a bug on pubspec parsing.

1.0.1 #

  • Remove unneeded boilerplate.
  • Publish mpp_server executable.

1.0.0 #

  • First release.


// Not a code package.

Use this package as an executable

1. Install it

You can install the package from the command line:

$ pub global activate mpp

2. Use it

The package has the following executables:

$ mpp
$ mpp_server

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  mpp: ^1.0.2+1

2. Install it

You can install packages from the command line:

with pub:

$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:mpp/mpp.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Oct 17, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21


Detected platforms: other

Primary library: package:mpp/mpp.dart with components: io, mirrors.

Health suggestions

Fix bin/mpp.dart. (-1.99 points)

Analysis of bin/mpp.dart reported 4 hints:

line 54 col 7: DO use curly braces for all flow control structures.

line 56 col 7: DO use curly braces for all flow control structures.

line 91 col 7: DO use curly braces for all flow control structures.

line 93 col 7: DO use curly braces for all flow control structures.

Fix lib/src/pretty_logging.dart. (-1.99 points)

Analysis of lib/src/pretty_logging.dart reported 4 hints:

line 26 col 5: DO use curly braces for all flow control structures.

line 28 col 5: DO use curly braces for all flow control structures.

line 30 col 5: DO use curly braces for all flow control structures.

line 32 col 5: DO use curly braces for all flow control structures.

Fix lib/src/config/plugins/repo_manager.dart. (-0.50 points)

Analysis of lib/src/config/plugins/repo_manager.dart reported 1 hint:

line 170 col 19: DO use curly braces for all flow control structures.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
angel_auth ^2.0.0 2.1.5+1
angel_configuration ^2.0.0 2.1.0
angel_container ^1.0.0 1.1.0
angel_file_service ^2.0.0 2.0.1
angel_framework ^2.0.0-rc.0 2.0.4+1 2.0.5-beta
angel_hot ^2.0.0 2.0.6
angel_http_exception ^1.0.0 1.1.0
angel_production ^1.0.0-alpha 1.0.0
angel_serialize ^2.0.0 2.2.3+3
archive ^2.0.0 2.0.10
args ^1.0.0 1.5.2
dbcrypt ^1.0.0 1.0.0
file ^5.0.0 5.1.0
http_parser ^3.0.0 3.1.3
io ^0.3.2 0.3.3
logging ^0.11.0 0.11.3+2
path ^1.0.0 1.6.4
pub_semver ^1.0.0 1.4.2
pubspec ^0.1.1 0.1.2
tuple ^1.0.0 1.0.3
Transitive dependencies
angel_client 2.0.2
angel_model 1.0.3
angel_route 3.0.6
angel_websocket 2.0.3
async 2.4.0
charcode 1.1.2
code_buffer 1.0.1
collection 1.14.12
combinator 1.1.0
convert 2.1.1
crypto 2.1.3
dart2_constant 1.0.2+dart2
dotenv 1.0.0
glob 1.2.0
html_builder 1.0.5
http 0.12.0+2
http2 1.0.0
http_server 0.9.8+3
intl 0.16.0
js 0.6.1+1
json_god 2.0.0-beta+3
json_rpc_2 2.1.0
matcher 0.12.5
merge_map 1.0.2
meta 1.1.7
mime 0.9.6+3
mock_request 1.0.6
node_interop 1.0.3
node_io 1.0.1+2
pool 1.4.0
pub_sub 2.3.0
quiver 2.0.5
quiver_hashcode 2.0.0
source_span 1.5.5
stack_trace 1.9.3
stream_channel 2.0.0
string_scanner 1.0.5
stuff 0.1.0
term_glyph 1.1.0
typed_data 1.1.6
uri 0.11.3+1
utf 0.9.0+5
uuid 2.0.2
vm_service_lib 0.3.10+2 3.22.2+1
watcher 0.9.7+12
web_socket_channel 1.1.0
yaml 2.2.0
Dev dependencies
angel_serialize_generator ^2.0.0
build_runner ^1.0.0
pedantic ^1.0.0 1.8.0+1
test ^1.0.0