shama / napa

:wine_glass: A helper for installing stuff without a package.json with npm.
MIT License
412 stars 34 forks source link

Can download zip from github but not from another server #34

Closed msieurtoph closed 9 years ago

msieurtoph commented 9 years ago

Assuming this config :

"scripts": {
    "install": "napa "
},
"napa": {
    "angular-bootstrap": "http://github.com/angular-ui/bootstrap-bower/archive/0.12.0.zip",
    "angular-bootstrap2": "http://napa.farmercorp.com/github/0.12.0.zip"
}

Both archives are the extact same file. But, only the github archive will be downloaded to node_modules/. The other one seems to be ignored.

See the verbose log :

...                                             
> napa                                                                                                                                                   

info download http://github.com/angular-ui/bootstrap-bower/archive/0.12.0.zip into angular-bootstrap                                                       
info download http://napa.farmercorp.com/github/0.12.0.zip into angular-bootstrap2                                                                         

... 
...                                                                                                                                          ```
msieurtoph commented 9 years ago

My apologies.

The case I submitted does not work because of my corporate firewall.

The initial error was about a localhost url, which was looking like http://localhost:8081/nexus/content/sites/local-frontend-repository/github/angular-ui/bootstrap-bower-0.12.0.zip.

In fact, this url is rejected by the old version of regex-url (@1.0.4) in the download module. Using the latest version of url-regex (@2.1.2), the url is accepted.

I let a comment on this issue https://github.com/kevva/download/issues/33, asking for the update. I'll let you know.

Again, sorry.

shama commented 9 years ago

Should be fixed on v1.1.0. Thanks for your help!