Phil Cockfield
@pjc
Orbiter Questions: @stevedylandev.eth and @polluterofminds | With Orbiter, is there also a programmatic library along side the npm installable CLI (ie. the library that the CLI is invoking. I'm writing my own controller for managing pushing state into the cloud, and I can do it via wrapping the CLI in a child-process, but wanted to check if there was a direct lib (or if whether that's the intent perhaps). __ Also, if I have a bundle of state already in the Orbiter "project" ├── dist │ ├── foo/ │ ├── bar/ And I do an update (eg `orbiter-cli update --siteId="..." ./dist`) And only changes to files in `bar/` exist. Is your CLI doing the smarts to de-dupe what's already up in IPFS/Orbiter, and not incur the extra resources of pushing the entire folder up (up to 1GB on "Launch" plan and 10GB on "Orbit") OR is there something smarter I can (need/should) do at the `update` pushing end?
2 replies
0 recast
3 reactions
Steve
@stevedylandev.eth
Great questions! At the moment the CLI is just a standalone binary. It's possible we could port the packages into standalone libs, but one of the challenges is we're using Supabase Auth instead of API keys. I think for now the easiest route is just using the CLI as it stands because I'm doing some fancy auth refreshing behind the scenes before running a command, but in the future when we will likely adopt proper API keys then it would be much more feasible to expose our API with more control and better DX. Currently its designed to work for our app but I would love to refactor it down the road to make it more user friendly, and those more portable into other libraries. You should be covered on the dedup front, as I believe we only track the current size of the site vs all previous concurrent versions, but admittedly this is something Justin and I haven't thought through yet so fire away for now lol 😂 Feel free to hit us with any other questions you have!!
1 reply
0 recast
2 reactions
Justin Hunter
@polluterofminds
Hey Phil! 1. We don't have an installable library yet because we only support Oauth sign in at the moment. So, using a child process is probably your best bet for now. That said, we plan to introduce API keys in the future which would enable libraries. Also Steve has a tutorial on how to use git hooks to auto upload sites during commits coming today or tomorrow. 2. Yes, we are auto-deduplicating because IPFS does that for us. So you're not getting charged for duplications.
0 reply
0 recast
2 reactions