From a1736cba122e06d7a1a1b5f19d12eba790868fb0 Mon Sep 17 00:00:00 2001 From: PaulDalek Date: Fri, 5 Jul 2024 20:10:05 +0200 Subject: [PATCH] Other minor corrections, touch #456. --- install.js | 36 ------------------------------------ lib/server/routes/health.js | 4 ++-- package-lock.json | 7 +++---- package.json | 3 +-- 4 files changed, 6 insertions(+), 44 deletions(-) delete mode 100644 install.js diff --git a/install.js b/install.js deleted file mode 100644 index d8c5cebf..00000000 --- a/install.js +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - -Highcharts Export Server - -Copyright (c) 2016-2024, Highsoft - -Licenced under the MIT licence. - -Additionally a valid Highcharts license is required for use. - -See LICENSE file in root for details. - -*******************************************************************************/ - -import { readFileSync } from 'fs'; -import { join } from 'path'; - -import { __dirname } from './lib/utils.js'; - -import 'colors'; - -const pkgFile = JSON.parse(readFileSync(join(__dirname, 'package.json'))); - -console.log( - ` -Highcharts Export Server v${pkgFile.version} - -${'This software requires a valid Highcharts license for commercial use.'.yellow} - -If you do not have a license, one can be obtained here: -${'https://shop.highsoft.com/'.green} - -To customize your installation (include additional/fewer modules and so on), -please refer to the readme file. -`.green -); diff --git a/lib/server/routes/health.js b/lib/server/routes/health.js index 7db23e2a..bf831904 100644 --- a/lib/server/routes/health.js +++ b/lib/server/routes/health.js @@ -21,7 +21,7 @@ import { addTimer } from '../../timers.js'; import { getStats, getPoolInfoJSON } from '../../pool.js'; import { __dirname } from '../../utils.js'; -const pkgFile = JSON.parse(readFileSync(pather(__dirname, 'package.json'))); +const packageFile = JSON.parse(readFileSync(pather(__dirname, 'package.json'))); const serverStartTime = new Date(); @@ -87,7 +87,7 @@ export default function addHealthRoutes(app) { Math.floor( (new Date().getTime() - serverStartTime.getTime()) / 1000 / 60 ) + ' minutes', - version: pkgFile.version, + version: packageFile.version, highchartsVersion: version(), averageProcessingTime: stats.spentAverage, performedExports: stats.performedExports, diff --git a/package-lock.json b/package-lock.json index 42359828..e0c3ed06 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,7 +7,6 @@ "": { "name": "highcharts-export-server", "version": "4.0.0", - "hasInstallScript": true, "license": "MIT", "dependencies": { "colors": "1.4.0", @@ -3219,9 +3218,9 @@ } }, "node_modules/dompurify": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.1.5.tgz", - "integrity": "sha512-lwG+n5h8QNpxtyrJW/gJWckL+1/DQiYMX8f7t8Z2AZTPw1esVrqjI63i7Zc2Gz0aKzLVMYC1V1PL/ky+aY/NgA==", + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.1.6.tgz", + "integrity": "sha512-cTOAhc36AalkjtBpfG6O8JimdTMWNXjiePT2xQH/ppBGi/4uIpmj8eKyIkMJErXWARyINV/sB38yf8JCLF5pbQ==", "license": "(MPL-2.0 OR Apache-2.0)" }, "node_modules/dotenv": { diff --git a/package.json b/package.json index a42829eb..05f9b7be 100644 --- a/package.json +++ b/package.json @@ -22,8 +22,7 @@ "highcharts-export-server": "./bin/cli.js" }, "scripts": { - "install": "node ./install.js", - "prestart": "rm -rf tmp || (if exist tmp (rd /s /q tmp)) && node ./node_modules/puppeteer/install.mjs", + "prestart": "rm -rf tmp && node ./node_modules/puppeteer/install.mjs", "start": "node ./bin/cli.js --enableServer 1 --logLevel 2", "start:dev": "npx nodemon ./bin/cli.js --enableServer 1 --logLevel 4", "start:debug": "node --inspect-brk=9229 ./bin/cli.js --enableDebug 1 --enableServer 1 --logLevel 4",