extiverse / bazaar

The extension marketplace for your Flarum forum.
https://discuss.flarum.org/d/5151
MIT License
59 stars 14 forks source link

WIP Configure Satis repository when enabling extension #21

Closed clarkwinkelmann closed 7 years ago

clarkwinkelmann commented 7 years ago

It's not working at the moment, I'm getting 403 errors from the satis endpoint when enabled :(

Also, there's a quiet issue if a "repositories" key is present in composer.json but uses an array instead of an object (we need to name our repo so it can be easily found & replaced when enabling the extension)

clarkwinkelmann commented 7 years ago

Didn't notice your satis branch, my bad 🙈

I will try to merge all this in a single PR

codecov-io commented 7 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@0e5430f). Click here to learn what that means. The diff coverage is 19.23%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #21   +/-   ##
=========================================
  Coverage          ?   31.73%           
=========================================
  Files             ?       29           
  Lines             ?      460           
  Branches          ?        0           
=========================================
  Hits              ?      146           
  Misses            ?      314           
  Partials          ?        0
Impacted Files Coverage Δ
src/Listeners/BazaarEnabled.php 0% <0%> (ø)
src/Extensions/ExtensionPackageManager.php 0% <0%> (ø)
src/Providers/ComposerEnvironmentProvider.php 0% <0%> (ø)
src/Search/FlagrowApi.php 0% <0%> (ø)
src/Listeners/AddSatisConfiguration.php 0% <0%> (ø)
src/Events/TokenSet.php 0% <0%> (ø)
src/Composer/Utils/ComposerFileEditor.php 93.75% <100%> (ø)
src/Composer/Commands/BaseCommand.php 93.18% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0e5430f...e3d902a. Read the comment docs.

luceos commented 7 years ago

Confirmed that this only works if "repositories" is an object, not an array, we have to mutate all items in that list to become an object (perhaps based on the path?)

luceos commented 7 years ago

fixed the 403 by putting the token and Bearer witin single quotes

luceos commented 7 years ago

Going to add further logic in a new branch, let's move on with this.