Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add AWS S3 upload to Record extension (#29)
* Rebase fixes * Fix a few mistakes found from rebasing * adapt EFP S3 class for AWS SDK v3 * rename S3 class/file to LookitS3 * add AWS S3 region to Env type * import S3 class into Recorder and add S3 upload (keep local download option for now) * move creation of Recorder instance from trial constructor to on_start * set strictPropertyInitialization:false to give the Recorder an s3 property that is not always set in constructor (can remove this if we remove local download option) * fix formatting error * call jsPsych finishTrial in stop plugin, give the recorder a second to stop before finishing * add optional filename param to Recorder constructor and util to create filename * remove strictPropertyInitialization: false * mark vars as optional so that they do not need to be defined in constructor * make s3 optional so that it does not need to be definitely assigned in constructor * remove the getFilename util and replace with class create filename method and filename getter * store recorder instance on window, call stop on that existing recorder, and throw errors based on existence/absence of recorder * S3 tests * fix file path for recorder import * make the recorder stop method async and have stop plugin wait for upload to finish * Change type of sessionRecorder to "unknown" To facilitate the typing for our window storage, I've added an interface that extends Window. Additionally, there's a new script in the root of this repo that will clean out "dist" directories. * fix JSDoc and linting errors * formatting fix * Fix broken tests after data went external * Remove prettier ignore file * Add typing for env values and update how s3 uses them * Add local down env value to record --------- Co-authored-by: CJ Green <[email protected]>
- Loading branch information