From 220fefd2e7a8e7e8d342a98f10d5bc2d08a9c33a Mon Sep 17 00:00:00 2001 From: PaulDalek Date: Fri, 14 Feb 2025 15:46:12 +0100 Subject: [PATCH] Cosmetic corrections. --- CHANGELOG.md | 4 ++-- README.md | 2 +- bin/cli.js | 2 +- lib/schemas/config.js | 2 +- lib/server/routes/ui.js | 4 ++-- public/index.html | 2 +- tests/cli/cliTestRunnerSingle.js | 2 +- tests/http/httpTestRunner.js | 2 +- tests/http/httpTestRunnerSingle.js | 2 +- tests/other/sideBySide.js | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ce1bf4b..7fff4d22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -63,7 +63,7 @@ _Enhancements:_ - Optimized logic and corrected the url (from `version/change` to `version_change`) in the `versionChange.js` router. - Refactored `exportHandler` (to `requestExport`) by moving some logic to the `validaion` middleware and refactoring the rest. - Removed unnecessary `doCallbacks` from the export router. -- Moved `server/error.js` and `server/rateLimiting.js` to `middlewares/`, optimizing error handling and rate limiting. +- Moved `./lib/server/error.js` and `./lib/server/rateLimiting.js` to `./lib/server/middlewares/`, optimizing error handling and rate limiting. - The `nodeEnv` option is now obtained from `getOptions`, not directly from the environment variables in the `error.js` middleware. - Refactored and optimized the entire logic for checking the cache and fetching scripts. - Refactored and split the `_updateCache` function into smaller, more manageable parts. @@ -235,7 +235,7 @@ _Enhancements:_ - Updated the `killPool` function. - The `uncaughtException` handler now kills the pool, browser, and terminates the process with exit code 1, when enabled. - The browser instance should be correctly closed now when an error occurs during pool creation. -- Corrected error handling and response sending in the `/change_hc_version.js` route. +- Corrected error handling and response sending in the `./lib/server/routes/change_hc_version.js` route. - Corrected the `handleResources` function. - Corrected samples, test scenarios, and test runners. - Bumped versions of most packages, with an updating deprecated `Puppeteer` from `v21.1.1` to latest. diff --git a/README.md b/README.md index fee6fc79..2fa44897 100644 --- a/README.md +++ b/README.md @@ -1026,7 +1026,7 @@ There are two main ways to debug code: - By adding a `debugger` statement within any client-side code (e.g., inside a `page.evaluate` callback). With the `--devtools` option set to **true**, the code execution will stop automatically. -- By running the export server with the `--inspect-brk=` flag, and adding a `debugger` statement within any server-side code. Subsequently, navigate to `chrome://inspect/`, input the server's IP address and port (e.g., `localhost:9229`) in the Configure section. Clicking 'inspect' initiates debugging of the server-side code. +- By running the Export Server with the `--inspect-brk=` flag, and adding a `debugger` statement within any server-side code. Subsequently, navigate to `chrome://inspect/`, input the server's IP address and port (e.g., `localhost:9229`) in the Configure section. Clicking 'inspect' initiates debugging of the server-side code. The `npm run start:debug` script from the `package.json` allows debugging code using both methods simultaneously. In this setup, client-side code is accessible from the devTools of a specific Puppeteer browser's page, while server-side code can be debugged from the devTools of `chrome://inspect/`. diff --git a/bin/cli.js b/bin/cli.js index f73c1f5b..099be3fc 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -145,5 +145,5 @@ async function start() { } } -// Start the export server process +// Start the Export Server process start(); diff --git a/lib/schemas/config.js b/lib/schemas/config.js index fa318f10..c8d1e677 100644 --- a/lib/schemas/config.js +++ b/lib/schemas/config.js @@ -856,7 +856,7 @@ const defaultConfig = { types: ['boolean'], envLink: 'UI_ENABLE', cliName: 'enableUi', - description: 'Enables or disables the UI for the export server', + description: 'Enables or disables the UI for the Export Server', promptOptions: { type: 'toggle' } diff --git a/lib/server/routes/ui.js b/lib/server/routes/ui.js index f4d45eff..3356f773 100644 --- a/lib/server/routes/ui.js +++ b/lib/server/routes/ui.js @@ -13,7 +13,7 @@ See LICENSE file in root for details. *******************************************************************************/ /** - * @overview Defines an Express route for serving the UI for the export server + * @overview Defines an Express route for serving the UI for the Export Server * when enabled. */ @@ -34,7 +34,7 @@ export default function uiRoutes(app) { // Add the UI endpoint only if required if (getOptions().ui.enable) { /** - * Adds the GET '/' - A route for a UI when enabled on the export server. + * Adds the GET '/' - A route for a UI when enabled on the Export Server. */ app.get(getOptions().ui.route || '/', (request, response, next) => { try { diff --git a/public/index.html b/public/index.html index 75866695..8113211d 100644 --- a/public/index.html +++ b/public/index.html @@ -49,7 +49,7 @@

Highcharts Export Server

This page allows you to experiment with different options for the - export server. If you use the public Export Server at + Export Server. If you use the public Export Server at https://export.highcharts.com diff --git a/tests/cli/cliTestRunnerSingle.js b/tests/cli/cliTestRunnerSingle.js index 7c1b92d1..cf3941f8 100644 --- a/tests/cli/cliTestRunnerSingle.js +++ b/tests/cli/cliTestRunnerSingle.js @@ -81,7 +81,7 @@ if (existsSync(file) && file.endsWith('.json')) { getNewDateTime() - startDate }ms.`; - // If code is 1, it means that export server thrown an error + // If code is 1, it means that Export Server thrown an error if (code === 1) { return console.error(`[Fail] ${endMessage}`.red); } diff --git a/tests/http/httpTestRunner.js b/tests/http/httpTestRunner.js index c7414ee2..abb4ca8a 100644 --- a/tests/http/httpTestRunner.js +++ b/tests/http/httpTestRunner.js @@ -36,7 +36,7 @@ console.log( '(results are stored in the ./tests/http/_results).\n'.green ); -// Url of Puppeteer export server +// Url of Puppeteer Export Server const url = 'http://127.0.0.1:7801'; // Perform a health check before continuing diff --git a/tests/http/httpTestRunnerSingle.js b/tests/http/httpTestRunnerSingle.js index bc563ee8..9700b23d 100644 --- a/tests/http/httpTestRunnerSingle.js +++ b/tests/http/httpTestRunnerSingle.js @@ -30,7 +30,7 @@ console.log( '(results are stored in the ./tests/http/_results).\n'.green ); -// Url of Puppeteer export server +// Url of Puppeteer Export Server const url = 'http://127.0.0.1:7801'; // Perform a health check before continuing diff --git a/tests/other/sideBySide.js b/tests/other/sideBySide.js index 3a2d3679..d0bda3ab 100644 --- a/tests/other/sideBySide.js +++ b/tests/other/sideBySide.js @@ -27,7 +27,7 @@ const resultsPath = join(__dirname, 'tests', 'other', '_results'); // Create results folder for CLI exports if doesn't exist !existsSync(resultsPath) && mkdirSync(resultsPath); -// Urls of Puppeteer and PhantomJS export servers +// Urls of Puppeteer and PhantomJS Export Servers const urls = ['http://127.0.0.1:7801', 'http://127.0.0.1:7802']; // Test message