Skip to content

Commit

Permalink
Add AWS S3 upload to Record extension (#29)
Browse files Browse the repository at this point in the history
* 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
becky-gilbert and okaycj authored Jun 11, 2024
1 parent 4c6a00a commit 0141053
Show file tree
Hide file tree
Showing 25 changed files with 14,343 additions and 825 deletions.
1 change: 0 additions & 1 deletion .prettierignore

This file was deleted.

9 changes: 5 additions & 4 deletions jest.cjs
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
module.exports.makePackageConfig = () => {
return {
...require("@jspsych/config/jest").makePackageConfig(__dirname),
moduleNameMapper: { "@lookit/data": "<rootDir>/../../packages/data/src" },
coverageThreshold: {
global: {
branches: 80,
functions: 80,
lines: 80,
statements: -10,
branches: 100,
functions: 100,
lines: 100,
statements: 0,
},
},
};
Expand Down
Loading

0 comments on commit 0141053

Please sign in to comment.