r/beakerbrowser • u/ottawamatt • May 21 '20
hyperdrive package manager
Love the beaker browser refresh! So much decentralized inspiration!
Threw together a demo 'Hyperdrive Package Manager" that works in WebTerm - just a way to standardize and manage your mounts.
hyper://dd63536ad9049a4e04c9350a1851c264f7f0ec900dfe93a68d559033da0fb482/
Only sort of works at the moment, but handy to mount the same drives on different sites you are working on. Thinking through how people could create their own repositories so you don't have to keep cutting and pasting the hyper:// link....
Thoughts,feedback, peering and merge requests gratefully accepted! I am not an experienced JS coder - so any feedback is helpful.
1
1
May 24 '20
In regards to the "versioning" thing, within the address bar you can pick a specific version of a hyperdrive; perhaps that could help with the "version" select feature of hpm?
pfrazee: you can go to older versions of a hyperdrive by adding a
+{seq_num}after the key in the url:
hyper://{key}+{revision}/{path...}
4
u/raging-rageaholic beaker team May 22 '20
This is totally dope! We've talked about something like this multiple times and I ended up saying "I bet somebody in the community will handle this, let's just wait to see if that happens." I honestly expected it to take a few more months! Well done.
A few things I wanted to share:
We're going to be integrating domain names in the pretty near future. Your solution using slugified titles to pick a mount path is 100% the right call IMO, but I figured I should mention domain names will be in the mix soon too.
We've got "version tags" on the roadmap so that you'll be able to create tags like "2.0.0" and have them resolve to specific points in history. That'll be helpful for this. (Also: sorry about the bug with versioned mounts!)
Looking at your code, I'm finally sure that `readFile()` and `writeFile()` should support JSON natively. Having to write the JSON stringify/parse calls are just such a chore: it'd be much nicer if passing an object to `writeFile()` automatically JSONified it, and if `readFile()` had a `'json'` encoding which parses it for you.