pub_proxy_server 0.1.2

  • README.md
  • Installing
  • Versions
  • 0

pub_proxy_server #

Private pub repository and proxy server.

Publish private package to your local server.

Act as proxy for pub.dartlang.org or any pub server.

Private and public packages all accessible through pub command line.

pub publish --server http://me:mypassword@127.0.0.1:8042

pub publish --server https://me:mypassword@127.0.0.1

pub get

Installation #

Add this package to your pubspec.yaml file:

dependencies:
  pub_proxy_server: any

Then, run pub install to download and link in the package.

Set PUB_HOSTED_URL environent variable to http://me:mypassword@127.0.0.1:8042

import 'package:logging/logging.dart';
import 'package:pub_proxy_server/pub_proxy_server.dart';
import 'dart:io';

void main() {
  initLog();
  PermissionStore store = new PermissionStore();
  store.addPermission(new UserPermission("me", "mypassword"));
  store.addPermission(new UserPermission("me@gmail.com", "")); //necessary to publish

  var repos = [new PubRepoImpl(new Store(new StoreSettings.fromDir("C:/Users/me/Google Drive/pub_repo","C:/Users/me/pub_repo_tmp"))), 
                 new DartLangRemoteRepo(new Store(new StoreSettings.fromRepoDirPrefix('cache')), new HttpClient())];
  PubFederatedRepo pubrepo = new PubFederatedRepo(repos);
  start_pub_proxy_server(pubrepo, port:8042, permissionStore:store, isSecure:false);
//  InitializeSSL();
//  start_pub_proxy_server(pubrepo, port:443, permissionStore:store, isSecure:true);
}
 
initLog(){
  Logger.root.level = Level.ALL;
  Logger.root.onRecord.listen((LogRecord rec) {
    print('${rec.level.name}:${rec.loggerName}: ${rec.time}: ${rec.message}');
    if (rec.error != null) print(rec.error);
    if (rec.stackTrace != null) print(rec.stackTrace);
  });
}

void InitializeSSL() {
  var testPkcertDatabase = Platform.script.resolve('pkcert').toFilePath();
  SecureSocket.initialize(database: testPkcertDatabase, password: 'a');
}
}

Roadmap #

Web admin pages

Use this package as a library

1. Depend on it

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


dependencies:
  pub_proxy_server: ^0.1.2

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:pub_proxy_server/pub_proxy_server.dart';
  
Version Uploaded Documentation Archive
0.1.2 Mar 23, 2014 Go to the documentation of pub_proxy_server 0.1.2 Download pub_proxy_server 0.1.2 archive
0.0.6 Feb 28, 2014 Go to the documentation of pub_proxy_server 0.0.6 Download pub_proxy_server 0.0.6 archive
0.0.4 Feb 27, 2014 Go to the documentation of pub_proxy_server 0.0.4 Download pub_proxy_server 0.0.4 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
--
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
--
Overall:
Weighted score of the above. [more]
0
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://dart.dev/dart-2#migration.

Maintenance issues and suggestions

Make sure dartdoc successfully runs on your package's source files. (-10 points)

Dependencies were not resolved.