From patchwork Thu Jan 17 12:48:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Zhizhikin X-Patchwork-Id: 1026619 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::13a; helo=mail-lf1-x13a.google.com; envelope-from=swupdate+bncbdw3n4ncreerbhxtqhrakgqevtdwxcy@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="EzOHgTwi"; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="aFRCB5C+"; dkim-atps=neutral Received: from mail-lf1-x13a.google.com (mail-lf1-x13a.google.com [IPv6:2a00:1450:4864:20::13a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43gP5H6dBcz9sBZ for ; Thu, 17 Jan 2019 23:48:35 +1100 (AEDT) Received: by mail-lf1-x13a.google.com with SMTP id z17sf1097539lfg.10 for ; Thu, 17 Jan 2019 04:48:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1547729311; cv=pass; d=google.com; s=arc-20160816; b=mfiox0iJ9lDlmCQJyZ4/Qdc6onqLcnwvuoiLM0Mo9QE7h3rEsptkbSUWdB/ZULlPpS RKBlKAYfvkQXXL4RHtr4E6/mW+XUIsOQ5i+LNklreQClnmVuAhPLI3a0F94yZXeNnT1e VhioIheOLmOdPSt7aoslU/WVaneob2bGnrEsTuRUtdnILv2iQVnEg0dJZXZsWRk9RU7S dRGIvUo1Rw2Gk0DOTNd2e7Bl6J6zV10jtm5WjOQA0UDagD9dqK7TV3zCy0U6RBlYb2W1 9f1MVl6EAKwKUqTBO9EWkd6vrBia3/v1XcgM7/8N92cshEzKOJpFSR1Lr7TJOTj09sAX 2A4A== 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=s8XrY+axx5+tAF+6siF1YoAtUDAEFyd+ZUyxBckw3ZI=; b=OlNM/Xw221FPXFSnLt3AQj6wkVPV/1Txw0B44cji8UQ2pV5NfURtn8/35L9AWlEkf0 szFtPwoQdcubj03DUjWZh0h9CZnvIOOYRfzPDYVaoysjwI9oF4PqZLflFVAeX2oTdpHw 8foSY7tA9nSnPQmIXlRlGW5pNMa4rDD7VIEOkRsrhIeQVm+TKYf+LJzyVMDslLa0qYN3 DgeJYzsi90AMW5q2vPff7bNqiLISDlNIRKNAKsJ7CRxizCPCp7G7stwVboFviIsKh30Q AGOg4F0JjmW1LkPcKrFGFfvbVJJJeuEr3ayPYJ4hfW5eu7UgQ3KwmnSRXnEoJg3pSZ2m bqeQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mDG+FNkk; spf=pass (google.com: domain of andrey.z@gmail.com designates 2a00:1450:4864:20::544 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=s8XrY+axx5+tAF+6siF1YoAtUDAEFyd+ZUyxBckw3ZI=; b=EzOHgTwi4kuTvUM8kNZGlQyx1gBqUJKoQ1u6ExCcz3fsDar5l+Rg5TfRu1aGRGczaG Vk500PqpdJGPIPvegzXj520ocE2XE/6fHYgzMsMI41zLVoYYUVWT/P/8bT8wnyeMWGBl CA+Vl89D8uw1O09jfb8WljQ2zZ0wBNDlqU2I4ipbEKYkgxzGNCD1nzXIRAAqs+s0vw7b My/ULX2qh32YeXRz2Yg2K1Po9oAWq3FSn4rY5o2c9GbSyeg/NbkaBh8uOVjMtUa4GJKr fvF0mhiekRy9pLs8ihYH+Vj6Qkbwz5zetbVjx8TOFWmEnGae+DmMaipJjjcE2LVEmKa/ Q4Uw== 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=s8XrY+axx5+tAF+6siF1YoAtUDAEFyd+ZUyxBckw3ZI=; b=aFRCB5C+0sySa9DRZBJNWGUPvmgMggiVw9v1tqyAtR+aPd/siiVB02MaTD5D8qzhdC Qz0fdRJ9Q07nV59RJSnx/Y5n6t9dKDeq4x1WV6gLhh12B2vx50lePHh3l+4YQDjw/Ahd YRaoRDRPdvw2kZFkRUjyBdUmwm1J/slRK8WdxauJZ1X3Darb7AyOP0IHmX9Ko1BGjjOi X2SHRV7UNdpuMEPcNnJLJneMNwUndqwhXbIF/qm/WjAPHSxZjCE1QmULmlPcBYVdqpyH MWZlNWlha4On9MfszORKMDtO5Ee73WTPAPelCyHDoPaNqRyH7AMaF5LSfqvimZW8RcAm s4ew== 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=s8XrY+axx5+tAF+6siF1YoAtUDAEFyd+ZUyxBckw3ZI=; b=qiK6TUVAI/GnuxKMk4zoDGdcdv7Nq1dorPP8XqG3GnURbIap04D7ZiqW2sPlIud1KM cAgrfzm6p/aqz+BMgVB0X+Mnntl4ajKp4D4eijEPIKBtFggZazGJX4RaBs/SS9lxfqc1 p1KovjKtsBuoJ64Upz6K4sFsVU7ymLSvW5Lgwgv4Q3ss41Qqca3ctBiD4ZrPkIs8e+ev 5VG66KE4NkOMo9KHQ4P7/k/NJY5FEA/Y0qoQJDLBe6iGtEKelDYDtTxmCHoo+RGWn+ma dCtU88NA1Tb4+jIs/nDqy06b0mdUV+T9zHTesosDJpuGEHWDxvW71tI6ZgFfwZaJ5UBm DaQQ== Sender: swupdate@googlegroups.com X-Gm-Message-State: AJcUukdWQKmLOwZJllhOb6W4Ax2TQ2VkUs2db3cQTBbNo0mWMPuYG65T 4s24/uTECwT2J7AsAheypjE= X-Google-Smtp-Source: ALg8bN7FJyDIEuPnjcfxHQAX6DRtUN7rHcFgZILIAtcWOf0hX9jrPcPttxhTk90CrxoPxBfV7cv4ZA== X-Received: by 2002:a2e:968a:: with SMTP id q10-v6mr73415lji.4.1547729311067; Thu, 17 Jan 2019 04:48:31 -0800 (PST) MIME-Version: 1.0 X-BeenThere: swupdate@googlegroups.com Received: by 2002:a19:3fc4:: with SMTP id m187ls974473lfa.1.gmail; Thu, 17 Jan 2019 04:48:30 -0800 (PST) X-Received: by 2002:ac2:4150:: with SMTP id c16mr1000904lfi.2.1547729310331; Thu, 17 Jan 2019 04:48:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547729310; cv=none; d=google.com; s=arc-20160816; b=AIN9v2/Z/N1MYxBSV42i4nxx51QrqLIQQ9ifJtIGWnU00fvXY3Qll1D0FOIY/noYtq yarCsYDUY2wdRPmdQj7rA+Db/nViW6GQ59U2VoylX6R51b2Dmec+pF82iR/OQ2dxhMWj VjxoXTLW7zljzI+anXrRN3fQltBHQ2NMFrrMeVPaaob4WoSn9k8BaSk4BZsS0LwQtJQp SweXt8F5j1EiUzASP0mBzcL/Lzf//Mlrcx0Y8s44camYGUdLhxeKlKTFcPwl3b87AyYn aPlJQ1T4kPKM1S2jKvqvwW/hDHCfG0Pp2mwfynWQaofRYC5pxbAgwEsT+epm6+UWCNEU YA6g== 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=YY4N2nbo1K6uxQOtzgRakxFn8kDwt28ZIJdPcd/WEGo=; b=lZ2HV8G+n76C5HvO5T+lXO4ppzV7YpN8aXOjJIaf5n8uzU9DKf58vOIqK5HjSxHXgK R5XM0RwSYLMasEfqsVfpw0C832JWtLmOfKcd16Pz/A6U8a/5XMTmqLRaW3rHRSfZaTmK luFr5YHnJ7RXEkgTCxVe+66JqpE+NWHycKKuDtiAExRc6q4pQZ6uZhWK4Mwh8iEAu+4p xSlXOfwNdp8kgAJzC6InxKASY9dtUPEEGU0f86C0r4Q5Dyz86KLmIHIXMmRIYibISTCF jM7U+EbnS2d2sMYgc2u7G5mPSXEHZPMgmMWmTb+MiqMFLYpBCUlOSUxpBmlFvNDsCHdU 35aA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mDG+FNkk; spf=pass (google.com: domain of andrey.z@gmail.com designates 2a00:1450:4864:20::544 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-x544.google.com (mail-ed1-x544.google.com. [2a00:1450:4864:20::544]) by gmr-mx.google.com with ESMTPS id 81-v6si52270ljc.2.2019.01.17.04.48.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Jan 2019 04:48:30 -0800 (PST) Received-SPF: pass (google.com: domain of andrey.z@gmail.com designates 2a00:1450:4864:20::544 as permitted sender) client-ip=2a00:1450:4864:20::544; Received: by mail-ed1-x544.google.com with SMTP id b3so8301714ede.1 for ; Thu, 17 Jan 2019 04:48:30 -0800 (PST) X-Received: by 2002:a17:906:1d01:: with SMTP id n1-v6mr10640429ejh.61.1547729309716; Thu, 17 Jan 2019 04:48:29 -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 b46sm6641636edc.57.2019.01.17.04.48.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Jan 2019 04:48:28 -0800 (PST) From: Andrey Zhizhikin To: swupdate@googlegroups.com Cc: Andrey Zhizhikin Subject: [swupdate] [PATCH] [v2] web-app: update node.js components to latest versions Date: Thu, 17 Jan 2019 12:48:14 +0000 Message-Id: <20190117124814.15238-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=mDG+FNkk; spf=pass (google.com: domain of andrey.z@gmail.com designates 2a00:1450:4864:20::544 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 Tested-by: Stefano Babic --- web-app/gulpfile.js | 26 +++++++++++++------------- web-app/index.html | 4 ++-- web-app/package.json | 34 ++++++++++++++++++---------------- 3 files changed, 33 insertions(+), 31 deletions(-) diff --git a/web-app/gulpfile.js b/web-app/gulpfile.js index 2ba5b9a..19d17a1 100755 --- a/web-app/gulpfile.js +++ b/web-app/gulpfile.js @@ -27,7 +27,7 @@ var knownOptions = { var options = minimist(process.argv.slice(2), knownOptions) -gulp.task('sass', ['clean'], () => { +gulp.task('sass', async function () { return gulp.src('scss/*.scss') .pipe(sass().on('error', sass.logError)) .pipe(cleanCSS({ compatibility: '*' })) @@ -37,7 +37,7 @@ gulp.task('sass', ['clean'], () => { .pipe(gulp.dest('dist/css')) }) -gulp.task('minify-css', ['clean'], () => { +gulp.task('minify-css', async function () { return gulp.src('css/*.css') .pipe(cleanCSS({ compatibility: '*' })) .pipe(rename({ @@ -46,7 +46,7 @@ gulp.task('minify-css', ['clean'], () => { .pipe(gulp.dest('dist/css')) }) -gulp.task('minify-js', ['clean'], () => { +gulp.task('minify-js', async function () { return gulp.src('js/*.js') .pipe(minify({ ext: { @@ -58,7 +58,7 @@ gulp.task('minify-js', ['clean'], () => { .pipe(gulp.dest('dist/js')) }) -gulp.task('minify-html', ['clean'], () => { +gulp.task('minify-html', async function () { return gulp.src('*.html') .pipe(replace('node_modules/bootstrap/dist/css', 'css')) .pipe(useref({ noconcat: true })) @@ -71,7 +71,7 @@ gulp.task('minify-html', ['clean'], () => { .pipe(gulp.dest('dist')) }) -gulp.task('copy-css', ['clean'], () => { +gulp.task('copy-css', async function () { return gulp.src('*.html') .pipe(useref({ noconcat: true })) .pipe(filter('**/*.css')) @@ -83,7 +83,7 @@ gulp.task('copy-css', ['clean'], () => { .pipe(gulp.dest('dist')) }) -gulp.task('copy-js', ['clean'], () => { +gulp.task('copy-js', async function () { return gulp.src('*.html') .pipe(useref({ noconcat: true })) .pipe(filter('**/*.js')) @@ -100,20 +100,20 @@ gulp.task('copy-js', ['clean'], () => { .pipe(gulp.dest('dist')) }) -gulp.task('copy-fonts', ['clean'], () => { +gulp.task('copy-fonts', async 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', async 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 +121,10 @@ gulp.task('package', () => { .pipe(gulp.dest('.')) }) -gulp.task('clean', () => { +gulp.task('clean', function () { 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', gulp.parallel('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": {