diff options
Diffstat (limited to 'vendor/blueimp/jquery-file-upload')
14 files changed, 63 insertions, 304 deletions
diff --git a/vendor/blueimp/jquery-file-upload/.github/workflows/test.yml b/vendor/blueimp/jquery-file-upload/.github/workflows/test.yml index f7c4b8bb9..048a2593e 100644 --- a/vendor/blueimp/jquery-file-upload/.github/workflows/test.yml +++ b/vendor/blueimp/jquery-file-upload/.github/workflows/test.yml @@ -69,7 +69,7 @@ jobs: - name: docker-compose build run: docker-compose build example - name: wdio firefox - run: docker-compose run --rm wdio firefox + run: docker-compose run --rm wdio firefox.js - name: docker-compose logs if: always() run: docker-compose logs example diff --git a/vendor/blueimp/jquery-file-upload/docker-compose.yml b/vendor/blueimp/jquery-file-upload/docker-compose.yml index d84a43e27..828d99bec 100644 --- a/vendor/blueimp/jquery-file-upload/docker-compose.yml +++ b/vendor/blueimp/jquery-file-upload/docker-compose.yml @@ -8,10 +8,10 @@ services: volumes: - .:/var/www/html mocha: - build: test + image: blueimp/mocha-chrome command: http://example/test - volumes: - - .:/var/www/html + environment: + - WAIT_FOR_HOSTS=example:80 depends_on: - example chromedriver: diff --git a/vendor/blueimp/jquery-file-upload/js/jquery.fileupload-ui.js b/vendor/blueimp/jquery-file-upload/js/jquery.fileupload-ui.js index 562708c6b..ff725cf14 100644 --- a/vendor/blueimp/jquery-file-upload/js/jquery.fileupload-ui.js +++ b/vendor/blueimp/jquery-file-upload/js/jquery.fileupload-ui.js @@ -54,6 +54,8 @@ // as the user clicks on the start buttons. To enable automatic // uploads, set the following option to true: autoUpload: false, + // The class to show/hide UI elements: + showElementClass: 'in', // The ID of the upload template: uploadTemplateId: 'template-upload', // The ID of the download template: @@ -614,9 +616,9 @@ }; node .bind($.support.transition.end, transitionEndHandler) - .toggleClass('in'); + .toggleClass(this.options.showElementClass); } else { - node.toggleClass('in'); + node.toggleClass(this.options.showElementClass); dfd.resolveWith(node); } return dfd; diff --git a/vendor/blueimp/jquery-file-upload/package-lock.json b/vendor/blueimp/jquery-file-upload/package-lock.json index 60b45d14f..aaa4293bb 100644 --- a/vendor/blueimp/jquery-file-upload/package-lock.json +++ b/vendor/blueimp/jquery-file-upload/package-lock.json @@ -1,6 +1,6 @@ { "name": "blueimp-file-upload", - "version": "10.3.0", + "version": "10.7.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -355,12 +355,6 @@ "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", "dev": true }, - "async-limiter": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", - "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", - "dev": true - }, "atob": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", @@ -650,35 +644,6 @@ "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", "dev": true }, - "chrome-launcher": { - "version": "0.10.7", - "resolved": "https://registry.npmjs.org/chrome-launcher/-/chrome-launcher-0.10.7.tgz", - "integrity": "sha512-IoQLp64s2n8OQuvKZwt77CscVj3UlV2Dj7yZtd1EBMld9mSdGcsGy9fN5hd/r4vJuWZR09it78n1+A17gB+AIQ==", - "dev": true, - "requires": { - "@types/node": "*", - "is-wsl": "^1.1.0", - "lighthouse-logger": "^1.0.0", - "mkdirp": "0.5.1", - "rimraf": "^2.6.1" - } - }, - "chrome-remote-interface": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/chrome-remote-interface/-/chrome-remote-interface-0.27.2.tgz", - "integrity": "sha512-pVLljQ29SAx8KIv5tSa9sIf8GrEsAZdPJoeWOmY3/nrIzFmE+EryNNHvDkddGod0cmAFTv+GmPG0uvzxi2NWsA==", - "dev": true, - "requires": { - "commander": "2.11.x", - "ws": "^6.1.0" - } - }, - "chrome-unmirror": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/chrome-unmirror/-/chrome-unmirror-0.1.0.tgz", - "integrity": "sha1-6a94ukf3/7kAYCk6cgoBzSbVC6s=", - "dev": true - }, "class-utils": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", @@ -757,12 +722,6 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, - "commander": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", - "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", - "dev": true - }, "comment-parser": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-0.6.2.tgz", @@ -903,15 +862,6 @@ "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", "dev": true }, - "deep-assign": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/deep-assign/-/deep-assign-3.0.0.tgz", - "integrity": "sha512-YX2i9XjJ7h5q/aQ/IM9PEwEnDqETAIYbggmdDB3HLTlSgo1CxPsj6pvhPG68rq6SVE0+p+6Ywsm5fTYNrYtBWw==", - "dev": true, - "requires": { - "is-obj": "^1.0.0" - } - }, "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", @@ -1508,15 +1458,6 @@ } } }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, "flat-cache": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", @@ -1782,16 +1723,6 @@ "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==", "dev": true }, - "import-local": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", - "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", - "dev": true, - "requires": { - "pkg-dir": "^3.0.0", - "resolve-cwd": "^2.0.0" - } - }, "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -2062,12 +1993,6 @@ "integrity": "sha512-0wfcrFgOOOBdgRNT9H33xe6Zi6yhX/uoc4U8NBZGeQQB0ctU1dnlNTyL9JM2646bHDTpsDm1Brb3VPoCIMrd/A==", "dev": true }, - "is-wsl": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", - "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", - "dev": true - }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -2177,33 +2102,6 @@ "type-check": "~0.3.2" } }, - "lighthouse-logger": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/lighthouse-logger/-/lighthouse-logger-1.2.0.tgz", - "integrity": "sha512-wzUvdIeJZhRsG6gpZfmSCfysaxNEr43i+QT+Hie94wvHDKFLi4n7C2GqZ4sTC+PH5b5iktmXJvU87rWvhP3lHw==", - "dev": true, - "requires": { - "debug": "^2.6.8", - "marky": "^1.2.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, "load-json-file": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", @@ -2216,16 +2114,6 @@ "strip-bom": "^3.0.0" } }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, "lodash": { "version": "4.17.15", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", @@ -2241,12 +2129,6 @@ "chalk": "^2.4.2" } }, - "loglevel": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.3.tgz", - "integrity": "sha512-LoEDv5pgpvWgPF4kNYuIp0qqSJVWak/dML0RY74xlzMZiT9w77teNAwKYKWBTYjlokMirg+o3jBwp+vlLrcfAA==", - "dev": true - }, "longest-streak": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-2.0.3.tgz", @@ -2296,12 +2178,6 @@ "integrity": "sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==", "dev": true }, - "marky": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/marky/-/marky-1.2.1.tgz", - "integrity": "sha512-md9k+Gxa3qLH6sUKpeC2CNkJK/Ld+bEz5X96nYwloqphQE0CKCVEKco/6jxEZixinqNdz5RFi/KaCyfbMDMAXQ==", - "dev": true - }, "mathml-tag-names": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/mathml-tag-names/-/mathml-tag-names-2.1.1.tgz", @@ -2446,24 +2322,6 @@ "minimist": "0.0.8" } }, - "mocha-chrome": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mocha-chrome/-/mocha-chrome-2.0.0.tgz", - "integrity": "sha512-Kq6W9jdXY3C2PhNHtSrk3GnDuoAKN+DbgJKCLfXtc5cql8oHB8+rUYlq9t1c8in6vQ6/X432E/U8h0pV5QlAug==", - "dev": true, - "requires": { - "chalk": "^2.0.1", - "chrome-launcher": "^0.10.2", - "chrome-remote-interface": "^0.27.0", - "chrome-unmirror": "^0.1.0", - "debug": "^4.1.1", - "deep-assign": "^3.0.0", - "import-local": "^2.0.0", - "loglevel": "^1.4.1", - "meow": "^5.0.0", - "nanobus": "^4.2.0" - } - }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -2476,23 +2334,6 @@ "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", "dev": true }, - "nanoassert": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/nanoassert/-/nanoassert-1.1.0.tgz", - "integrity": "sha1-TzFS4JVA/eKMdvRLGbvNHVpCR40=", - "dev": true - }, - "nanobus": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/nanobus/-/nanobus-4.4.0.tgz", - "integrity": "sha512-Hv9USGyH8EsPy0o8pPWE7x3YRIfuZDgMBirzjU6XLebhiSK2g53JlfqgolD0c39ne6wXAfaBNcIAvYe22Bav+Q==", - "dev": true, - "requires": { - "nanoassert": "^1.1.0", - "nanotiming": "^7.2.0", - "remove-array-items": "^1.0.0" - } - }, "nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", @@ -2512,25 +2353,6 @@ "to-regex": "^3.0.1" } }, - "nanoscheduler": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/nanoscheduler/-/nanoscheduler-1.0.3.tgz", - "integrity": "sha512-jBbrF3qdU9321r8n9X7yu18DjP31Do2ItJm3mWrt90wJTrnDO+HXpoV7ftaUglAtjgj9s+OaCxGufbvx6pvbEQ==", - "dev": true, - "requires": { - "nanoassert": "^1.1.0" - } - }, - "nanotiming": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/nanotiming/-/nanotiming-7.3.1.tgz", - "integrity": "sha512-l3lC7v/PfOuRWQa8vV29Jo6TG10wHtnthLElFXs4Te4Aas57Fo4n1Q8LH9n+NDh9riOzTVvb2QNBhTS4JUKNjw==", - "dev": true, - "requires": { - "nanoassert": "^1.1.0", - "nanoscheduler": "^1.0.2" - } - }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -2691,30 +2513,6 @@ "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, - "p-limit": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", - "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -2805,15 +2603,6 @@ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true }, - "pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", - "dev": true, - "requires": { - "find-up": "^3.0.0" - } - }, "posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", @@ -3169,12 +2958,6 @@ "xtend": "^4.0.1" } }, - "remove-array-items": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/remove-array-items/-/remove-array-items-1.1.1.tgz", - "integrity": "sha512-MXW/jtHyl5F1PZI7NbpS8SOtympdLuF20aoWJT5lELR1p/HJDd5nqW8Eu9uLh/hCRY3FgvrIT5AwDCgBODklcA==", - "dev": true - }, "repeat-element": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", @@ -3202,23 +2985,6 @@ "path-parse": "^1.0.6" } }, - "resolve-cwd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", - "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", - "dev": true, - "requires": { - "resolve-from": "^3.0.0" - }, - "dependencies": { - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", - "dev": true - } - } - }, "resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -4198,15 +3964,6 @@ "mkdirp": "^0.5.1" } }, - "ws": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz", - "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==", - "dev": true, - "requires": { - "async-limiter": "~1.0.0" - } - }, "x-is-string": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/x-is-string/-/x-is-string-0.1.0.tgz", diff --git a/vendor/blueimp/jquery-file-upload/package.json b/vendor/blueimp/jquery-file-upload/package.json index 55ff49854..9a6159619 100644 --- a/vendor/blueimp/jquery-file-upload/package.json +++ b/vendor/blueimp/jquery-file-upload/package.json @@ -1,6 +1,6 @@ { "name": "blueimp-file-upload", - "version": "10.3.0", + "version": "10.7.0", "title": "jQuery File Upload", "description": "File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.", "keywords": [ @@ -48,7 +48,6 @@ "eslint-config-prettier": "6", "eslint-plugin-jsdoc": "15", "eslint-plugin-prettier": "3", - "mocha-chrome": "2", "prettier": "1", "stylelint": "10", "stylelint-config-prettier": "5", @@ -88,7 +87,7 @@ "lint": "stylelint '**/*.css' && eslint .", "unit": "docker-compose run --rm mocha", "wdio": "docker-compose run --rm wdio", - "test": "npm run lint && npm run unit && npm run wdio && npm run wdio -- firefox", + "test": "npm run lint && npm run unit && npm run wdio && npm run wdio -- firefox.js", "posttest": "docker-compose down -v", "preversion": "npm test", "postversion": "git push --tags origin master && npm publish" diff --git a/vendor/blueimp/jquery-file-upload/server/php/Dockerfile b/vendor/blueimp/jquery-file-upload/server/php/Dockerfile index 8633fee74..67752f995 100644 --- a/vendor/blueimp/jquery-file-upload/server/php/Dockerfile +++ b/vendor/blueimp/jquery-file-upload/server/php/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7-apache +FROM php:7.4-apache # Enable the Apache Headers module: RUN ln -s /etc/apache2/mods-available/headers.load \ @@ -20,7 +20,7 @@ RUN DEBIAN_FRONTEND=noninteractive \ && docker-php-ext-enable \ imagick \ && docker-php-ext-configure \ - gd --with-jpeg-dir=/usr/include/ \ + gd --with-jpeg=/usr/include/ \ && docker-php-ext-install \ gd \ # Uninstall obsolete packages: diff --git a/vendor/blueimp/jquery-file-upload/server/php/UploadHandler.php b/vendor/blueimp/jquery-file-upload/server/php/UploadHandler.php index bc6f3a249..62f65a51f 100644 --- a/vendor/blueimp/jquery-file-upload/server/php/UploadHandler.php +++ b/vendor/blueimp/jquery-file-upload/server/php/UploadHandler.php @@ -497,7 +497,7 @@ class UploadHandler $name = $this->upcount_name($name); } // Keep an existing filename if this is part of a chunked upload: - $uploaded_bytes = $this->fix_integer_overflow((int)$content_range[1]); + $uploaded_bytes = $this->fix_integer_overflow((int)@$content_range[1]); while (is_file($this->get_upload_path($name))) { if ($uploaded_bytes === $this->get_file_size( $this->get_upload_path($name))) { @@ -1394,7 +1394,7 @@ class UploadHandler $content_range_header = $this->get_server_var('HTTP_CONTENT_RANGE'); $content_range = $content_range_header ? preg_split('/[^0-9]+/', $content_range_header) : null; - $size = $content_range ? $content_range[3] : null; + $size = @$content_range[3]; $files = array(); if ($upload) { if (is_array($upload['tmp_name'])) { diff --git a/vendor/blueimp/jquery-file-upload/test/Dockerfile b/vendor/blueimp/jquery-file-upload/test/Dockerfile deleted file mode 100644 index a80dccc8d..000000000 --- a/vendor/blueimp/jquery-file-upload/test/Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -FROM blueimp/chromedriver - -USER root - -RUN export DEBIAN_FRONTEND=noninteractive \ - && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y \ - nodejs \ - npm \ - # Remove obsolete files: - && npm install -g \ - npm@latest \ - mocha-chrome \ - && apt-get clean \ - && rm -rf \ - /tmp/* \ - /usr/share/doc/* \ - /var/cache/* \ - /var/lib/apt/lists/* \ - /var/tmp/* - -USER webdriver - -WORKDIR /var/www/html - -ENTRYPOINT ["mocha-chrome"] diff --git a/vendor/blueimp/jquery-file-upload/wdio/bin/safaridriver.sh b/vendor/blueimp/jquery-file-upload/wdio/bin/safaridriver.sh index 829ce9b3b..ed9c63e70 100644 --- a/vendor/blueimp/jquery-file-upload/wdio/bin/safaridriver.sh +++ b/vendor/blueimp/jquery-file-upload/wdio/bin/safaridriver.sh @@ -1,9 +1,14 @@ #!/bin/sh +SCREEN='Capture screen' + if [ -z "$1" ]; then - echo 'Please select the input device by entering its [index] number:' >&2 - ffmpeg -f avfoundation -list_devices true -i - 2>&1 | grep screen >&2 - read -r INDEX + OUTPUT=$(ffmpeg -f avfoundation -list_devices true -i - 2>&1 | grep "$SCREEN") + if [ "$(echo "$OUTPUT" | grep -c ^)" -gt 1 ]; then + echo 'Please select the input device by entering its [index] number:' >&2 + echo "$OUTPUT" >&2 + read -r INDEX + fi else INDEX=$1 fi @@ -25,7 +30,7 @@ mjpeg-server -a 127.0.0.1:9000 -- ffmpeg \ -capture_cursor 1 \ -r "${FPS:-15}" \ -pixel_format yuyv422 \ - -i "$INDEX" \ + -i "${INDEX:-$SCREEN}" \ -f mpjpeg \ -q "${QUALITY:-2}" \ - diff --git a/vendor/blueimp/jquery-file-upload/wdio/chrome.js b/vendor/blueimp/jquery-file-upload/wdio/chrome.js index 6d1650e66..fc7264417 100644 --- a/vendor/blueimp/jquery-file-upload/wdio/chrome.js +++ b/vendor/blueimp/jquery-file-upload/wdio/chrome.js @@ -1,6 +1,8 @@ 'use strict' -exports.config = Object.assign({}, require('./hooks'), { +/* eslint-disable jsdoc/valid-types */ +/** @type WebdriverIO.Config */ +const config = { hostname: 'chromedriver', path: '/', capabilities: [ @@ -33,4 +35,6 @@ exports.config = Object.assign({}, require('./hooks'), { }, assetsDir: '/home/webdriver/assets/', baseUrl: 'http://example' -}) +} + +exports.config = Object.assign({}, require('./hooks'), config) diff --git a/vendor/blueimp/jquery-file-upload/wdio/firefox.js b/vendor/blueimp/jquery-file-upload/wdio/firefox.js index ab91dcb79..a4403de9e 100644 --- a/vendor/blueimp/jquery-file-upload/wdio/firefox.js +++ b/vendor/blueimp/jquery-file-upload/wdio/firefox.js @@ -1,6 +1,8 @@ 'use strict' -exports.config = Object.assign({}, require('./chrome').config, { +/* eslint-disable jsdoc/valid-types */ +/** @type WebdriverIO.Config */ +const config = { hostname: 'geckodriver', capabilities: [ { @@ -18,4 +20,6 @@ exports.config = Object.assign({}, require('./chrome').config, { startDelay: 500, stopDelay: 500 } -}) +} + +exports.config = Object.assign({}, require('./chrome').config, config) diff --git a/vendor/blueimp/jquery-file-upload/wdio/hooks/index.js b/vendor/blueimp/jquery-file-upload/wdio/hooks/index.js index 9ce5c52fd..2f0dcd3f6 100644 --- a/vendor/blueimp/jquery-file-upload/wdio/hooks/index.js +++ b/vendor/blueimp/jquery-file-upload/wdio/hooks/index.js @@ -1,21 +1,27 @@ 'use strict' -/* global browser */ +/* global browser, Promise */ const cmds = require('wdio-screen-commands') -module.exports = { - before: () => { - global.should = require('chai').should() +/* eslint-disable jsdoc/valid-types */ +/** @type WebdriverIO.Config */ +const config = { + before: async () => { + global.Should = require('chai').should() browser.addCommand('saveScreenshotByName', cmds.saveScreenshotByName) browser.addCommand('saveAndDiffScreenshot', cmds.saveAndDiffScreenshot) - if (browser.config.maximizeWindow) browser.maximizeWindow() + if (browser.config.maximizeWindow) await browser.maximizeWindow() }, - beforeTest: test => { - cmds.startScreenRecording(test) + beforeTest: async test => { + await cmds.startScreenRecording(test) }, afterTest: async test => { - await cmds.stopScreenRecording(test) - cmds.saveScreenshotByTest(test) + await Promise.all([ + cmds.stopScreenRecording(test), + cmds.saveScreenshotByTest(test) + ]) } } + +module.exports = config diff --git a/vendor/blueimp/jquery-file-upload/wdio/ie.js b/vendor/blueimp/jquery-file-upload/wdio/ie.js index 8fff1161e..223a50190 100644 --- a/vendor/blueimp/jquery-file-upload/wdio/ie.js +++ b/vendor/blueimp/jquery-file-upload/wdio/ie.js @@ -1,6 +1,8 @@ 'use strict' -exports.config = Object.assign({}, require('./chrome').config, { +/* eslint-disable jsdoc/valid-types */ +/** @type WebdriverIO.Config */ +const config = { hostname: process.env.WINDOWS_HOST || 'host.docker.internal', port: 4445, capabilities: [ @@ -17,4 +19,6 @@ exports.config = Object.assign({}, require('./chrome').config, { stopDelay: 500 }, assetsDir: process.env.WINDOWS_ASSETS_DIR -}) +} + +exports.config = Object.assign({}, require('./chrome').config, config) diff --git a/vendor/blueimp/jquery-file-upload/wdio/safari.js b/vendor/blueimp/jquery-file-upload/wdio/safari.js index 360909b33..d252d0d5d 100644 --- a/vendor/blueimp/jquery-file-upload/wdio/safari.js +++ b/vendor/blueimp/jquery-file-upload/wdio/safari.js @@ -1,6 +1,8 @@ 'use strict' -exports.config = Object.assign({}, require('./chrome').config, { +/* eslint-disable jsdoc/valid-types */ +/** @type WebdriverIO.Config */ +const config = { // Docker for Mac host address: hostname: 'host.docker.internal', capabilities: [ @@ -17,4 +19,6 @@ exports.config = Object.assign({}, require('./chrome').config, { stopDelay: 500 }, assetsDir: process.env.MACOS_ASSETS_DIR -}) +} + +exports.config = Object.assign({}, require('./chrome').config, config) |