From patchwork Sun Jan 13 23:33:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Zhizhikin X-Patchwork-Id: 1024173 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::237; helo=mail-lj1-x237.google.com; envelope-from=swupdate+bncbdw3n4ncreerbv4v57qqkgqevtcddgi@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.b="bXcudPA6"; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="gxaEg22c"; dkim-atps=neutral Received: from mail-lj1-x237.google.com (mail-lj1-x237.google.com [IPv6:2a00:1450:4864:20::237]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43dCbc1SBLz9s3q for ; Mon, 14 Jan 2019 10:33:46 +1100 (AEDT) Received: by mail-lj1-x237.google.com with SMTP id x18-v6sf5055040lji.0 for ; Sun, 13 Jan 2019 15:33:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1547422424; cv=pass; d=google.com; s=arc-20160816; b=MRj3X3XEnmUu/kn5bZGRNHMq09U1r610HCJHS9G3SEWaDV+x0C9HaHKkZlMzfHUgl7 KEjqB2YnPKNC1J5XaeS+iq0QI5HsexAl59PP34aXHWOJvL4AErjS+o6Wuu3/1sun0b4i exTltCg8IqsczrcVHR5bh4h4cV7I7z0BmoVNFxLcgAQ9CqFncB8XXHIGcvdbSTaRNBsd ozXKQUwKbnjmvBgvM6gFNFMuuQMbFhGqn1x2zTmIHBwz2/8GRmpmuUAQrnx/lTdSMUix Q+k55MYh96D3tO5bbEnGbOhxPwHL5g2ySDmuOqSxixnscBFfYxPIo3rEAfv/8nDgAURT oERQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:message-id:date:subject:cc:to:from :mime-version:sender:dkim-signature:dkim-signature; bh=+AL0RDMlfKSp2JwmyHYXk7hoJN/OAbyHDV5NAKu7gwg=; b=LKrnDgl59IW8tUfZVAGEwEjLf8kZBfRjz/7IlV1fJoA7f1dvkDTN6jy158ZC24SOHD d4AA1lDa/2Cvdcz41pP/cjz0BPPy2jO0MksbyVZLtbPkQlisBmW3QTKSPZoJoWEpxLm1 l0bPAZwwV6bvoYDpLMYbHOW5dLzHjm3mXZ3fdLiXwteNNpSo8PeTD00AgoOLhdN/mra7 ffBkVTccpKZH/IHXHym/pyqk/S36J54IIF7pS+T/VSG8GPUjAA2Fa1XOEkzfhAtKlBsa ittbmzn2CtzFak/kX0Z5NQpWsMqBZkRZvof70sKprxJq3KtkIaY4Jty5qpZIjn6OzS4K C7bw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=exfWyIQl; spf=pass (google.com: domain of andrey.z@gmail.com designates 2a00:1450:4864:20::535 as permitted sender) smtp.mailfrom=andrey.z@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:mime-version:from:to:cc:subject:date:message-id :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=+AL0RDMlfKSp2JwmyHYXk7hoJN/OAbyHDV5NAKu7gwg=; b=bXcudPA69kHs70x3hFq4GcY3W3M9OQdaaPSWMOlRpoaLL0YAWPHdWCfKIsLtUpEawX K9iCR8aFpK5EdIr4aGyRWagi9ahKVI1ryT0U3x/J+5bnEF9XKxN1sjFox0d7tR/4VOsq W4xjgH8IRGDHpv6tAPWa3v0Xb6ghU71CD4XpAYiyR3XK+AckZpBHjes3p+Pe0j3bEgxq 9aUrTFeN90YklzawKFyK8bQwzsJTcr6G5GmiaRntpQJ5EbeiaU5jqO3/plAZD53bEqKG jkkaD7HwHyZTRRT4IfNuS83sCF4iIxot98eICm5grPW/stwXlprM0b3S+IcanH4MAiIH BBug== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:to:cc:subject:date:message-id:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=+AL0RDMlfKSp2JwmyHYXk7hoJN/OAbyHDV5NAKu7gwg=; b=gxaEg22cQXXcffKO8jQ3+Stx+vVgcoxLECnwqF6SnCtos72ZXtFF7X0fMSWTTS8TBc zL+QdppBfHA3g/B+UOL+rjOOX/+9I71K6Olo4Zt59aV1Ohao50BzQBvISOZny3hR5lfC T75sdf3FTDpDZxcRz9SKTOy2SQd4SQg4k/64Bbl6HELhJjdi4TZhDnQqczF8jyIDyjeE m/hlXOrb+iEWG8An0wpbAJEFXqf9OdJ7lAKQSWCXtWkbx6qcDOlW4IzVdbKRzmeueFC6 oB3DD24w4lXcjSLzKwNS4WYp5JMz+Wmu7gKoBKMICTmZC/TqKnMGoVeEQYphle+vZOLZ 1eHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:mime-version:from:to:cc:subject:date :message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=+AL0RDMlfKSp2JwmyHYXk7hoJN/OAbyHDV5NAKu7gwg=; b=IHInAaZ2ngr1HFn7tSOKja+oaP3Eu5UB2eilbOn38Lik+Pu1g9CNVWG0LZ8PqkqGP3 lurDNDcjIBlPfNqSWdypA7WG35a7kq+u6iV7ZUVwnd8iNN6vga6HPnvY2ThOFvVFK7PB USNPEGYykahBbQ7atuSJBQUwhJupgEQ85x1WBh1zUfewWksdKaSzZI6yXII4s8wIqmpr /C+giWHXoCnoFN5fns10S6bSjO0liJC8h8hzRMbkTwgIMQYBT6j9OLMMfhGYeDhPDwUb JwSVYIBUKNWMpuC474MwoLz6Q//NwehAuce4CUgtxj/fDnMSVNXNiRlK72GjDyRW4Zc+ zK2Q== Sender: swupdate@googlegroups.com X-Gm-Message-State: AJcUukf0w7meVQo27vIMcg+kqNdnS4eeyhvXsmknjPqaUey9aI9xpbUE FQA4N2i+lDkjfUm8p24dsVg= X-Google-Smtp-Source: ALg8bN7Q0GZkC4lDTRQDvKyh03nnUcIycTKBpB4QjhOZxZiU9PTLM6qhOvW/OUtaamzSQW3fOY7/hg== X-Received: by 2002:a2e:21d:: with SMTP id 29-v6mr47201ljc.3.1547422423801; Sun, 13 Jan 2019 15:33:43 -0800 (PST) MIME-Version: 1.0 X-BeenThere: swupdate@googlegroups.com Received: by 2002:a19:7b01:: with SMTP id w1ls1830334lfc.9.gmail; Sun, 13 Jan 2019 15:33:43 -0800 (PST) X-Received: by 2002:ac2:418d:: with SMTP id z13mr442713lfh.13.1547422422954; Sun, 13 Jan 2019 15:33:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547422422; cv=none; d=google.com; s=arc-20160816; b=wMn3voflFQ1aTwd3tvtyXIosprWP+/HA6MEisWlmWy3m+dR8iH6JNjpePciSmM9VVP bpDSWWCDlSx0calLLSpiqHgt6iC3cTJPkuG6J/Jmn9B94tWp3z06hZfUyIyTb2f9rQfJ 90wi/+9W24rJ1b7PJX4JWZnBIJgZIUdQVyLnrqknt58KfvoYw3K8oZDlmLGe2uPYAO6w w3bzz8f+GsQt3Sz4jPgS+5UgANVQ+vBBgUJhYcAiT3lel5ipqLVIOu1CAq7bRdZcaNfW NHps9xhWA1ZKbbe6SF2L9BSPMQ1B3hbSb/MskBCTUFd9dnSs7Ya4YiRoQitjwfleFocA 2z4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature; bh=PO6ptPLOGbia9waXEnDIYIKKYC4HNWszJWU7m5RDs0I=; b=qIXv8SXg0qOqWlxiiXDmpEx6jP7M+96NWUD9HQEZxaqJqgVnGcgUW+gHYJbaYXZVwn 4a0rpKlRR4me+qP0klr6cBLgh996zJexupB/zekSX2+g3xhH1Sp/U5c2bWowy90vmREp PoAUzeQ/AcEMTco3ZtIuCjzKAeVZxr/y/RppGBBlrww4XQ+XFoQveQ86Ef8K29RxSYu9 5LFWkdeXIJuk0zfPqHcP1U/7JjIKhakhIDuzkn6Zp9byNvuEBqdTQ9ErwA2ZJe1zKL4B m42JCCEeDXVACX40IJ7PaRortOqhfp7faKuhGDFeXtheboBZkx+BZz04yCe1kCMJ0d9S SU6Q== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=exfWyIQl; spf=pass (google.com: domain of andrey.z@gmail.com designates 2a00:1450:4864:20::535 as permitted sender) smtp.mailfrom=andrey.z@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com. [2a00:1450:4864:20::535]) by gmr-mx.google.com with ESMTPS id y18si4097421lfe.3.2019.01.13.15.33.42 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 13 Jan 2019 15:33:42 -0800 (PST) Received-SPF: pass (google.com: domain of andrey.z@gmail.com designates 2a00:1450:4864:20::535 as permitted sender) client-ip=2a00:1450:4864:20::535; Received: by mail-ed1-x535.google.com with SMTP id f9so17245370eds.10 for ; Sun, 13 Jan 2019 15:33:42 -0800 (PST) X-Received: by 2002:a50:ade7:: with SMTP id b36mr20211953edd.215.1547422422374; Sun, 13 Jan 2019 15:33:42 -0800 (PST) Received: from lab-linux-pc.tendawifi.com (cable-static2-2-7.rsnweb.ch. [146.185.2.7]) by smtp.gmail.com with ESMTPSA id h9sm4430137ede.93.2019.01.13.15.33.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 13 Jan 2019 15:33:41 -0800 (PST) From: Andrey Zhizhikin To: swupdate@googlegroups.com Cc: Andrey Zhizhikin Subject: [swupdate] [PATCH] web-app: update node.js components to latest versions Date: Sun, 13 Jan 2019 23:33:28 +0000 Message-Id: <20190113233328.21700-1-andrey.z@gmail.com> X-Mailer: git-send-email 2.17.1 X-Original-Sender: andrey.z@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=exfWyIQl; spf=pass (google.com: domain of andrey.z@gmail.com designates 2a00:1450:4864:20::535 as permitted sender) smtp.mailfrom=andrey.z@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Some components were severely oudated, and some components are suggested to be upgraded due to security issues. This patch brings all components to their actual version. Major upgrade includes switching to gulp 4.0, which requires the new task generation scheme, this is also included in this patch. Signed-off-by: Andrey Zhizhikin Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com> --- web-app/gulpfile.js | 31 ++++++++++++++++--------------- web-app/index.html | 4 ++-- web-app/package.json | 34 ++++++++++++++++++---------------- 3 files changed, 36 insertions(+), 33 deletions(-) diff --git a/web-app/gulpfile.js b/web-app/gulpfile.js index 2ba5b9a..e5702f6 100755 --- a/web-app/gulpfile.js +++ b/web-app/gulpfile.js @@ -27,7 +27,11 @@ var knownOptions = { var options = minimist(process.argv.slice(2), knownOptions) -gulp.task('sass', ['clean'], () => { +function clean() { + return del('dist/**', { force: true }) +} + +gulp.task('sass', function() { return gulp.src('scss/*.scss') .pipe(sass().on('error', sass.logError)) .pipe(cleanCSS({ compatibility: '*' })) @@ -37,7 +41,7 @@ gulp.task('sass', ['clean'], () => { .pipe(gulp.dest('dist/css')) }) -gulp.task('minify-css', ['clean'], () => { +gulp.task('minify-css', function() { return gulp.src('css/*.css') .pipe(cleanCSS({ compatibility: '*' })) .pipe(rename({ @@ -46,7 +50,7 @@ gulp.task('minify-css', ['clean'], () => { .pipe(gulp.dest('dist/css')) }) -gulp.task('minify-js', ['clean'], () => { +gulp.task('minify-js', function() { return gulp.src('js/*.js') .pipe(minify({ ext: { @@ -58,7 +62,7 @@ gulp.task('minify-js', ['clean'], () => { .pipe(gulp.dest('dist/js')) }) -gulp.task('minify-html', ['clean'], () => { +gulp.task('minify-html', function() { return gulp.src('*.html') .pipe(replace('node_modules/bootstrap/dist/css', 'css')) .pipe(useref({ noconcat: true })) @@ -71,7 +75,7 @@ gulp.task('minify-html', ['clean'], () => { .pipe(gulp.dest('dist')) }) -gulp.task('copy-css', ['clean'], () => { +gulp.task('copy-css', function() { return gulp.src('*.html') .pipe(useref({ noconcat: true })) .pipe(filter('**/*.css')) @@ -83,7 +87,7 @@ gulp.task('copy-css', ['clean'], () => { .pipe(gulp.dest('dist')) }) -gulp.task('copy-js', ['clean'], () => { +gulp.task('copy-js', function() { return gulp.src('*.html') .pipe(useref({ noconcat: true })) .pipe(filter('**/*.js')) @@ -100,20 +104,20 @@ gulp.task('copy-js', ['clean'], () => { .pipe(gulp.dest('dist')) }) -gulp.task('copy-fonts', ['clean'], () => { +gulp.task('copy-fonts', function() { return gulp.src([ - 'node_modules/@fortawesome/fontawesome-free-webfonts/webfonts/fa-solid-900.{ttf,woff,woff2}' + 'node_modules/@fortawesome/fontawesome-free/webfonts/fa-solid-900.{ttf,woff,woff2}' ]) .pipe(gulp.dest('dist/webfonts')) }) -gulp.task('resize-images', ['clean'], () => { +gulp.task('resize-images', function() { return gulp.src('images/*') .pipe(imagemin({ verbose: true })) .pipe(gulp.dest('dist/images')) }) -gulp.task('package', () => { +gulp.task('package', function() { var name = options.output.replace('.tar', '').replace('.gz', '') return gulp.src('dist/**') .pipe(tar(name + '.tar')) @@ -121,10 +125,7 @@ gulp.task('package', () => { .pipe(gulp.dest('.')) }) -gulp.task('clean', () => { - return del('dist/**', { force: true }) -}) -gulp.task('build', ['copy-css', 'copy-js', 'copy-fonts', 'sass', 'minify-css', 'minify-js', 'minify-html', 'resize-images']) +gulp.task('build', gulp.series(clean, 'copy-css', 'copy-js', 'copy-fonts', 'sass', 'minify-css', 'minify-js', 'minify-html', 'resize-images')) -gulp.task('default', ['build']) +gulp.task('default', gulp.series('build')) diff --git a/web-app/index.html b/web-app/index.html index 82d22bf..641cb8c 100755 --- a/web-app/index.html +++ b/web-app/index.html @@ -10,8 +10,8 @@ - - + + diff --git a/web-app/package.json b/web-app/package.json index 5daf6a7..2909b45 100755 --- a/web-app/package.json +++ b/web-app/package.json @@ -1,6 +1,6 @@ { "name": "swupdate", - "version": "0.1.0", + "version": "0.2.0", "description": "Software Update for Embedded Systems Web Front End", "main": "index.html", "scripts": { @@ -16,28 +16,30 @@ "devDependencies": { "csslint": "^1.0.5", "del": "^3.0.0", - "gulp": "^3.9.1", - "gulp-clean-css": "^3.9.0", + "gulp": "^4.0.0", + "gulp-clean-css": "^4.0.0", "gulp-filter": "^5.1.0", - "gulp-gzip": "^1.4.1", + "gulp-gzip": "^1.4.2", "gulp-html-replace": "^1.6.2", - "gulp-htmlmin": "^4.0.0", - "gulp-imagemin": "^4.1.0", - "gulp-minify": "^2.1.0", - "gulp-rename": "^1.2.2", - "gulp-replace": "^0.6.1", - "gulp-sass": "^3.1.0", + "gulp-htmlmin": "^5.0.1", + "gulp-imagemin": "^5.0.3", + "gulp-minify": "^3.1.0", + "gulp-rename": "^1.4.0", + "gulp-replace": "^1.0.0", + "gulp-sass": "^4.0.2", "gulp-tar": "^2.1.0", - "gulp-useref": "^3.1.4", - "htmlhint": "^0.9.13", + "gulp-useref": "^3.1.6", + "htmlhint": "^0.10.1", "minimist": "^1.2.0", "sass-lint": "^1.12.1", - "standard": "^10.0.3" + "standard": "^12.0.1", + "eslint": "^5.11.1" }, "dependencies": { - "@fortawesome/fontawesome-free-webfonts": "^1.0.3", - "bootstrap": "^4.0.0", - "dropzone": "5.2.0", + "@fortawesome/fontawesome-free": "^5.6.3", + "bootstrap": "^4.2.1", + "popper.js": "^1.14.6", + "dropzone": "5.5.1", "jquery": "^3.3.1" }, "standard": {