Implement everything needed for importx
Because JS is JS, I can’t use normal blocking socket reads, instead i have to use this weird structure of promises, like I think async functions and promises are awesome but like when some things need promises and some things (unix socket API) do not have promises i have to make this weird linking layer which involves things like:
- attaching a
.then to a function to trick JS into thinking it’s some weird function-promise object, then use Proxy on that mutant to make a weird kind of object thats a function and can be await’ed and can also have properties set and accesses and all properties are also this cursed thing
- returning a manual promise (without
async) and resolving/rejecting it OUTSIDE THE FUNCTION like i send a promise but another function wayy outside resolves it?
Changelog
in libimportx-js:
(sorry for the code screenshot but since this devlog is only a stepping stone (it does not implement importx yet, just the framewrok underneath), i dont have any output to show