Skip to content

Commit

Permalink
Update ignore files. Add data files to allow list. Bump version 1.2.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
Javier Vidal committed Sep 25, 2024
1 parent a796f87 commit e8a7622
Show file tree
Hide file tree
Showing 8 changed files with 175 additions and 92 deletions.
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ inputs:
description: 'The token needed to deploy your experiment. Get one at https://www.cognition.run/account'
required: true
jspsych-version:
description: 'JsPsych library version used, e.g., 7.3.0, 6.3.1'
description: 'JsPsych library version used, e.g., 8.0.2'
required: false
outputs:
link:
Expand Down
182 changes: 123 additions & 59 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions ignore-files.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = Object.freeze({
// Updated with JsPsych 8
IGNORE_FILE: [
//7.3
"extension-mouse-tracking.js",
"extension-record-video.js",
"extension-webgazer.js",
Expand Down Expand Up @@ -42,15 +42,15 @@ module.exports = Object.freeze({
"plugin-resize.js",
"plugin-same-different-html.js",
"plugin-same-different-image.js",
"plugin-serial-reaction-time-mouse.js",
"plugin-serial-reaction-time.js",
"plugin-serial-reaction-time-mouse.js",
"plugin-sketchpad.js",
"plugin-survey.js",
"plugin-survey-html-form.js",
"plugin-survey-likert.js",
"plugin-survey-multi-choice.js",
"plugin-survey-multi-select.js",
"plugin-survey-text.js",
"plugin-survey.js",
"plugin-video-button-response.js",
"plugin-video-keyboard-response.js",
"plugin-video-slider-response.js",
Expand All @@ -59,8 +59,8 @@ module.exports = Object.freeze({
"plugin-webgazer-calibrate.js",
"plugin-webgazer-init-camera.js",
"plugin-webgazer-validate.js",
"survey.css",
"test-utils.js",
//6.3
"jspsych-ext-webgazer.js",
"jspsych-animation.js",
"jspsych-audio-button-response.js",
Expand Down
27 changes: 22 additions & 5 deletions include-files.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ module.exports = Object.freeze({
"**/*.tif",
"**/*.tiff",
"**/*.webp",
"**/*.heic",
"**/*.heif",
],

AUDIO_TYPES: [
Expand All @@ -25,21 +27,36 @@ module.exports = Object.freeze({
"**/*.flac",
"**/*.mpg",
"**/*.mpeg",
"**/*.mpg",
"**/*.mpeg",
"**/*.mp3",
"**/*.m4a",
"**/*.m4v",
"**/*.m4p",
"**/*.oga",
"**/*.ogg",
"**/*.ogv",
"**/*.ogg",
"**/*.mov",
"**/*.wav",
"**/*.webm",
"**/*.webm",
"**/*.aiff",
"**/*.wma",
],

VIDEO_TYPES: ["**/*.mov", "**/*.mp4"],
VIDEO_TYPES: ["**/*.mov", "**/*.mp4", "**/*.avi", "**/*.mkv", "**/*.wmv"],

DATA_TYPES: [
"**/*.json",
"**/*.csv",
"**/*.tsv",
"**/*.txt",
"**/*.xml",
"**/*.yaml",
"**/*.yml",
"**/*.xls",
"**/*.xlsx",
"**/*.sql",
"**/*.ini",
"**/*.md",
"**/*.rdf",
"**/*.h5",
],
});
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const {
IMAGE_TYPES,
AUDIO_TYPES,
VIDEO_TYPES,
DATA_TYPES,
} = require("./include-files");
const FormData = require("form-data");
const https = require("https");
Expand Down Expand Up @@ -146,6 +147,7 @@ async function run() {
SOURCE_TYPES.concat(IMAGE_TYPES)
.concat(AUDIO_TYPES)
.concat(VIDEO_TYPES)
.concat(DATA_TYPES)
.join("\n"),
{
followSymbolicLinks: false,
Expand All @@ -159,7 +161,7 @@ async function run() {
const filename = file.replace(/^.*[\\/]/, "");
if (isExperimentFile(file) && !IGNORE_FILE.includes(filename)) {
await uploadFile(file, ignoreJS);
// If we just sent index.js, ignore index.html javascript
// If we sent index.js, ignore index.html javascript
if (filename === "index.js") {
ignoreJS = true;
}
Expand Down
36 changes: 18 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "javascript-action",
"version": "1.1.2",
"version": "1.2.0",
"description": "JavaScript Action Template",
"main": "index.js",
"scripts": {
Expand All @@ -25,9 +25,9 @@
},
"homepage": "https://github.com/actions/javascript-action#readme",
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/core": "^1.10.1",
"@actions/github": "^5.1.1",
"@actions/glob": "^0.3.0",
"@actions/glob": "^0.5.0",
"form-data": "^4.0.0"
},
"devDependencies": {
Expand Down

0 comments on commit e8a7622

Please sign in to comment.