fxpio / composer-asset-plugin

NPM/Bower Dependency Manager for Composer
MIT License
892 stars 156 forks source link

Handle VCS endpoint-defined package #201

Open pmaselkowski opened 8 years ago

pmaselkowski commented 8 years ago

When installed package has endpoint-defined dep it fails with error message:

  [Seld\JsonLint\ParsingException]                                               
  "https://bower.herokuapp.com/packages/player-api" does not contain valid JSON  
  Parse error on line 1:                                                         
  Package not found                                                              
  ^                                                                              
  Expected one of: 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['   

Note: url https://bower.herokuapp.com/packages/player-api returns 404 but it's still being parsed. Anyway should it even check bower if has endpoint instead of version?

My proposal is to either handle installing from endpoint (probably complicated), or at least display more meaningful message, like "Package player-api not found while installing maslosoft-playlist".

Details:

Dependencies of installed package:

{
    "name":"maslosoft-playlist",
      "dependencies": {
        "jquery": "~2",
        "font-awesome": "fontawesome#~4",
        "bootstrap": "~3",
        "player-api": "https://github.com/vimeo/player-api" 
    }
}