RangerMauve / hyper-sdk

Make your own hyper apps!
https://www.youtube.com/watch?v=HyHk4aImd_I&list=PL7sG5SCUNyeYx8wnfMOUpsh7rM_g0w_cu&index=20
MIT License
290 stars 46 forks source link

SLEEP dir usage #20

Closed dpaez closed 4 years ago

dpaez commented 4 years ago

Hello y'all, this is a question about hyperdrive, the sdk and the .dat folder that we use to find after using the dat CLI create or share commands. From my understanding the .dat folder contains SLEEP related files. The current sdk behavior is to create a .dat file containing the public key only. Is this desired behavior? I mean maybe the SLEEP format is not longer used anymore. Or maybe there is a module to handle SLEEP dir creation. I'm playing with dat-storage with no luck yet.

My use case involves something similar to dat-node but using latest hyperdrive mainly.

Thanks in advance for any info 👋

RangerMauve commented 4 years ago

Hey! The SDK still uses SLEEP, it's just that instead of storing the data inside the .dat folder, it stores it in the user folder. The idea there was to have deduplication of data across applications using the SDK, and was adapted from what the hyperdrive daemon was doing.

It uses the env-paths module to determine what the proper directory should be per platform rather than polluting the user's home dir with another directory.

Do you need to have finer grained control over where the data is being stored?

dpaez commented 4 years ago

Thanks for the quick response and clarification @RangerMauve.