Giter VIP home page Giter VIP logo

pub_server's Issues

multiple source about pub

I need to publish libs to my personal pub, and I need "flutter packages get" by multiple source. Thanks

Local private pub-server usage problem

I built the pub-server successfully on this machine, and then uploaded the private package successfully, but I am relying on this package in the project when the error is as follows:
image
Dependency settings are as follows:
image
Please help me to see what the problem is, thank you!

After I executed "pub publish", the authorization was successful, but I always waited for timeout. May I ask why?

D:\pub_server\pub_server>pub publish
Publishing pub_server 0.1.6-dev to https://pub.flutter-io.cn:
|-- .gitignore
|-- .idea
| |-- codeStyles
| | '-- Project.xml
| |-- libraries
| | |-- Dart_Packages.xml
| | '-- Dart_SDK.xml
| |-- misc.xml
| |-- modules.xml
| |-- pub_server.iml
| |-- vcs.xml
| '-- workspace.xml
|-- .travis.yml
|-- AUTHORS
|-- CHANGELOG.md
|-- LICENSE
|-- README.md
|-- analysis_options.yaml
|-- codereview.settings
|-- example
| |-- example.dart
| '-- src
| '-- examples
| |-- cow_repository.dart
| |-- file_repository.dart
| '-- http_proxy_repository.dart
|-- lib
| |-- repository.dart
| '-- shelf_pubserver.dart
|-- pubspec.yaml
'-- test
'-- shelf_pubserver_test.dart
Suggestions:

  • .\CHANGELOG.md doesn't mention current version (0.1.6-dev).
    Consider updating it with notes on this version prior to publication.

Package has 1 warning. Upload anyway (y/n)? y
Pub needs your authorization to upload packages on your behalf.
In a web browser, go to https://accounts.google.com/o/oauth2/auth?access_type=offline&approval_prompt=force&response_type=code&client_id=818368855108-8grd2eg9tj9f38os6f1urbcvsq399u8n.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%3A61995&scope=openid+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email
Then click "Allow access".

Waiting for your authorization...
Authorization received, processing...
It looks like accounts.google.com is having some trouble.
Pub will wait for a while before trying to connect again.
OS Error: 信号灯超时时间已到
, errno = 121, address = accounts.google.com, port = 62508

D:\pub_server\pub_server>pub publish
Publishing pub_server 0.1.6-dev to https://pub.flutter-io.cn:
|-- .gitignore
|-- .idea
| |-- codeStyles
| | '-- Project.xml
| |-- libraries
| | |-- Dart_Packages.xml
| | '-- Dart_SDK.xml
| |-- misc.xml
| |-- modules.xml
| |-- pub_server.iml
| |-- vcs.xml
| '-- workspace.xml
|-- .travis.yml
|-- AUTHORS
|-- CHANGELOG.md
|-- LICENSE
|-- README.md
|-- analysis_options.yaml
|-- codereview.settings
|-- example
| |-- example.dart
| '-- src
| '-- examples
| |-- cow_repository.dart
| |-- file_repository.dart
| '-- http_proxy_repository.dart
|-- lib
| |-- repository.dart
| '-- shelf_pubserver.dart
|-- pubspec.yaml
'-- test
'-- shelf_pubserver_test.dart
Suggestions:

  • .\CHANGELOG.md doesn't mention current version (0.1.6-dev).
    Consider updating it with notes on this version prior to publication.

Package has 1 warning. Upload anyway (y/n)? y
Pub needs your authorization to upload packages on your behalf.
In a web browser, go to https://accounts.google.com/o/oauth2/auth?access_type=offline&approval_prompt=force&response_type=code&client_id=818368855108-8grd2eg9tj9f38os6f1urbcvsq399u8n.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%3A63172&scope=openid+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email
Then click "Allow access".

Waiting for your authorization...
Authorization received, processing...
It looks like accounts.google.com is having some trouble.
Pub will wait for a while before trying to connect again.
OS Error: 信号灯超时时间已到
, errno = 121, address = accounts.google.com, port = 63891

Pub Server Authentication For Private Pub Packages

Currently in order to host proprietary pub packages on a private pub server, the server must be behind a VPN. There is no way to require authentication for package downloads. Maven, npm, and Go all have ways of putting packages behind authentication barriers.

I saw no existing issue discussing this, so I figured I'd make one to get it on the Dart team's radar.

pub get not finishing

Great job on this one! I'm trying out this server using the original example. I was able to push a library A without a problem but when calling pub get from library B which depends on A it simply never finishes the resolving packages stage. This is due to the following exception:

ERROR - 2018-08-09 23:53:30.287675
Asynchronous error
type 'List<dynamic>' is not a subtype of type 'List<Map<dynamic, dynamic>>' in type cast
dart:core                                              Object._as
example/src/examples/http_proxy_repository.dart 33:37  HttpProxyRepository.versions
===== asynchronous gap ===========================
example/src/examples/cow_repository.dart 135:18        _RemoteMetadataCache.fetchVersionlist.<fn>
dart:collection                                        __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent
example/src/examples/cow_repository.dart 131:10        _RemoteMetadataCache.fetchVersionlist
example/src/examples/cow_repository.dart 47:35         CopyAndWriteRepository.versions.onListen
dart:async                                             Stream.toList
package:pub_server/shelf_pubserver.dart 244:62         ShelfPubServer._listVersions

PS: Is there any plan to replicate all pub.dartlang.org functionality eventually? Including serving a website to browse packages, version, and documentation.

Set Content-Type application/vnd.pub.v2+json

The client was originally designed to send Accept: application/vnd.pub.v2+json, to support multiple versions of the API.

I've recently documented this in:
https://github.com/dart-lang/pub/blob/master/doc/repository-spec-v2.md

We should probably start responding Content-Type: application/vnd.pub.v2+json to requests which carry Accept: application/vnd.pub.v2+json.

We might have to interpret no accept header or application/json accept header as to mean return Content-Type: application/json with the version 2 format. We could likely do some logging and figure out of this is necessary and then document it in the API docs.

But just returning Content-Type: application/vnd.pub.v2+json to requests with Accept: application/vnd.pub.v2+json is a good start. It means clients can start to check the Content-Type.

pub get hanging on typing issue

When the server tries to find a package on the remote, it throws a typing error.

//type 'List' is not a subtype of type 'List<Map<dynamic, dynamic>>' in type cast example\src\examples\cow_repository.dart 135:18

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.