Skip to content

Commit

Permalink
Merge.
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulDalek committed Feb 14, 2025
2 parents b14af3c + 051687c commit 9f5fe7f
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,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.
Expand Down Expand Up @@ -245,7 +245,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.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,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=<PORT>` 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=<PORT>` 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/`.

Expand Down
2 changes: 1 addition & 1 deletion bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,5 +145,5 @@ async function start() {
}
}

// Start the export server process
// Start the Export Server process
start();
2 changes: 1 addition & 1 deletion lib/schemas/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
Expand Down
4 changes: 2 additions & 2 deletions lib/server/routes/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/

Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ <h1>Highcharts Export Server</h1>

<p>
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
<a href="https://export.highcharts.com"
>https://export.highcharts.com</a
>
Expand Down
2 changes: 1 addition & 1 deletion tests/cli/cliTestRunnerSingle.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/http/httpTestRunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/http/httpTestRunnerSingle.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/other/sideBySide.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9f5fe7f

Please sign in to comment.