Closed allain closed 5 years ago
What about making it in-memory and having it clear after it runs?
Yeah, that's an option. When using sessionStorage in the browser it normally persists even between invocations, the closest thing I could think of to this in a server context is to tie it to the process doing the invocation.
You mean tha parent of the webrun process?
Yeah. Opening a new shell would create a new session.
Yeah, I love it!
Maybe the logic could be something like:
Fixed. Stores session data in /tmp/.webrun/session-${process.ppid}
.
Would you mind adding some logic to make it work cross platform? (windows)
Ideally temporary folders should use fs.mkdtemp
I think the latest fixes make this work on Windows (untested though), and using fs.mkdtemp() wouldn't allow for other processes to access the directory since it "Generates six random characters to be appended behind a required prefix".
Close this?
Would work like localStorage but would be bound to the process.id of the shell used to run the script.