Closed AdamZaczek closed 2 years ago
My initial thoughts:
CODEROAD_SESSION_FILE_PATH
(string) as a path to the file to write/read fromConsiderations:
I agree with your implementation thoughts,
Regarding considerations: We should not write to the workplace directory or it will mess with Git Agreed
We may hit permissions errors in VSCode or Node when trying to write to a file outside of the workplace We already tested this in another case and it works as long as the final file path is not protected. It won't be once we pass the proper CODEROAD_SESSION_FILE_PATH variable.
We may hit file system permission errors if the process does not have to write or read access As above
The file should be read as text and validated as it could be a vector for attack Good point!
Do you want to handle the Coderoad part of the task? We will provide you with the env variable.
I think I can handle the CodeRoad part, I have a basic implementation ready (see PR above). But I'll test it more and adjust.
Now published in CodeRoad v0.16 on open-vsx.
To make it work, add the following env var: CODEROAD_SESSION_STORAGE_PATH
and pass in the path to the folder where session can be stored.
Awesome, I'm handling this today!
This feature probably causes https://github.com/freeCodeCamp/CodeAlly-CodeRoad-freeCodeCamp/issues/33 to happen. Needs investigation.
Just a heads up - this is already updated according to @ShMcK's suggestion from #33.
This is already working @moT01, thanks to Shawn pointing out a missing env variables issue when continuing an existing project.
Closing!
Describe the bug Progress in the tutorial is lost if the user stops the session and comes back again later on. The progress is stored in localStorage and should be stored in a file instead.
To Reproduce Steps to reproduce the behavior:
Expected behavior Progress should be persisted
Additional context We need to know where is the progress stored and read so we can apply the fix @ShMcK. Thanks in advance!