Skip to content

Commit

Permalink
Changed to camelCase.
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulDalek committed Nov 28, 2024
1 parent 388e924 commit ced9f14
Show file tree
Hide file tree
Showing 99 changed files with 64 additions and 61 deletions.
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
node_modules/
dist/

samples/cli/infile_not_json.json
samples/cli/infileNotJson.json
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ Additionally, some options are now named differently due to the new structure an
- `rateLimit` -> `maxRequests`
- `workers` -> `maxWorkers`

If you depend on any of the above options, the optimal approach is to directly change the old names to the new ones in the options. However, you don't have to do it manually, as there is a utility function called `mapToNewConfig` that can easily transfer the old-structured options to the new format. For an example, refer to the `./samples/module/options_phantomjs.js` file.
If you depend on any of the above options, the optimal approach is to directly change the old names to the new ones in the options. However, you don't have to do it manually, as there is a utility function called `mapToNewConfig` that can easily transfer the old-structured options to the new format. For an example, refer to the `./samples/module/optionsPhantom.js` file.

## Note about Chart Size

Expand Down
2 changes: 1 addition & 1 deletion lib/export.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { getCache } from './cache.js';
import { triggerExport } from './highcharts.js';
import { log } from './logger.js';

import svgTemplate from './../templates/svg_export/svg_export.js';
import svgTemplate from './../templates/svgExport/svgExport.js';

import ExportError from './errors/ExportError.js';

Expand Down
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import {
enableFileLogging
} from './logger.js';
import { initPool, killPool } from './pool.js';
import { shutdownCleanUp } from './resource_release.js';
import { shutdownCleanUp } from './resourceRelease.js';
import server, { startServer } from './server/server.js';
import { printLogo, printUsage } from './utils.js';

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions lib/server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ import https from 'https';
import multer from 'multer';

import errorHandler from './error.js';
import rateLimit from './rate_limit.js';
import rateLimit from './rateLimiting.js';
import { log, logWithStack } from '../logger.js';
import { __dirname } from '../utils.js';

import vSwitchRoute from './routes/change_hc_version.js';
import vSwitchRoute from './routes/versionChange.js';
import exportRoutes from './routes/export.js';
import healthRoute from './routes/health.js';
import uiRoute from './routes/ui.js';
Expand Down
2 changes: 1 addition & 1 deletion msg/licenseagree.msg
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ https://github.com/highcharts/node-export-server

In order to use this application, Highcharts needs to be downloaded and
embedded. A license is required to use Highcharts if you're a
for-profit, commercial, outfit.
for-profit, commercial, outfit.

The license can be viewed here: https://highcharts.com/license

Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
"format": "prettier ./ --config .prettierrc.cjs --write",
"build": "rollup -c",
"prepack": "npm run build",
"cli-tests": "node ./tests/cli/cli_test_runner.js",
"cli-tests-single": "node ./tests/cli/cli_test_runner_single.js",
"http-tests": "node ./tests/http/http_test_runner.js",
"http-tests-single": "node ./tests/http/http_test_runner_single.js",
"node-tests": "node ./tests/node/node_test_runner.js",
"node-tests-single": "node ./tests/node/node_test_runner_single.js",
"cli-tests": "node ./tests/cli/cliTestRunner.js",
"cli-tests-single": "node ./tests/cli/cliTestRunnerSingle.js",
"http-tests": "node ./tests/http/httpTestRunner.js",
"http-tests-single": "node ./tests/http/httpTestRunnerSingle.js",
"node-tests": "node ./tests/node/nodeTestRunner.js",
"node-tests-single": "node ./tests/node/nodeTestRunnerSingle.js",
"unit:test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
"prepare": "husky || true"
},
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions samples/cli/svgBasic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions samples/cli/svgBigger.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions samples/cli/svgForeignObject.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import exporter from '../../lib/index.js';
const exportSettings = {
type: 'png',
constr: 'chart',
outfile: './samples/module/options_phantom.jpeg',
outfile: './samples/module/optionsPhantom.jpeg',
logLevel: 4,
scale: 1,
workers: 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const exportSettings = {
export: {
type: 'jpeg',
constr: 'chart',
outfile: './samples/module/options_puppeteer.jpeg',
outfile: './samples/module/optionsPuppeteer.jpeg',
height: 800,
width: 1200,
scale: 1,
Expand Down Expand Up @@ -113,7 +113,7 @@ const exportSettings = {
allowCodeExecution: true,
allowFileResources: true,
callback: './samples/resources/callback.js',
customCode: './samples/resources/custom_code.js',
customCode: './samples/resources/customCode.js',
resources: {
js: "Highcharts.charts[0].update({xAxis: {title: {text: 'Resources axis title'}}});",
css: '.highcharts-yaxis .highcharts-axis-line { stroke-width: 2px; } .highcharts-color-0 { fill: #f7a35c; stroke: #f7a35c; }'
Expand Down
2 changes: 1 addition & 1 deletion samples/module/promises.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ exportCharts(
charts.forEach((chart, index) => {
// Save the base64 from a buffer to a correct image file
writeFileSync(
`./samples/module/promise_${index + 1}.jpeg`,
`./samples/module/promise${index + 1}.jpeg`,
Buffer.from(chart, 'base64')
);
});
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions samples/resources/resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"js": "Highcharts.charts[0].update({xAxis:{title:{text:'Title from the resources file, js section'}}});",
"css": ".highcharts-yaxis .highcharts-axis-line{stroke-width:2px;stroke:#00FF00}",
"files": [
"./samples/resources/resources_file_1.js",
"./samples/resources/resources_file_2.js"
"./samples/resources/resourcesFile1.js",
"./samples/resources/resourcesFile2.js"
]
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"instr": "{\"title\":{\"text\":\"Do not allow code execution from strings\"},\"xAxis\":{\"categories\":[\"Jan\",\"Feb\",\"Mar\",\"Apr\"]},\"series\":[{\"type\":\"column\",\"data\":[5,6,7,8]},{\"type\":\"line\",\"data\":[1,2,3,4]}]}",
"outfile": "allow_code_execution_stringified.png",
"outfile": "allowCodeExecutionStringified.png",
"allowCodeExecution": false,
"allowFileResources": false,
"callback": "function callback(chart){chart.renderer.label('This label is added in the callback.<br>Highcharts version '+Highcharts.version,75,75).attr({id:'renderer-callback-label',fill:'#90ed7d',padding:10,r:10,zIndex:10}).css({color:'black',width:'100px'}).add();}",
"customCode": "./samples/resources/custom_code.js",
"customCode": "./samples/resources/customCode.js",
"resources": "./samples/resources/resources.js"
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"allowFileResources": true,
"callback": "./samples/resources/callback.js",
"customCode": "Highcharts.setOptions({chart:{events:{render:function (){this.renderer.image('https://www.highcharts.com/samples/graphics/sun.png',75,50,20,20).add();}}}});",
"resources": "{\"js\":\"Highcharts.charts[0].update({xAxis:{title:{text:'Title from the resources object, js section'}}});\",\"css\":\".highcharts-yaxis .highcharts-axis-line{stroke-width:2px;stroke:#FF0000;}\",\"files\":[\"./samples/resources/resources_file_1.js\",\"./samples/resources/resources_file_2.js\"]}"
"resources": "{\"js\":\"Highcharts.charts[0].update({xAxis:{title:{text:'Title from the resources object, js section'}}});\",\"css\":\".highcharts-yaxis .highcharts-axis-line{stroke-width:2px;stroke:#FF0000;}\",\"files\":[\"./samples/resources/resourcesFile1.js\",\"./samples/resources/resourcesFile2.js\"]}"
}
2 changes: 1 addition & 1 deletion tests/cli/scenarios/batch.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"batch": "./samples/batch/batch_1.json=./tests/cli/_results/batch_1.png;./samples/batch/batch_2.json=./tests/cli/_results/batch_2.png;./samples/batch/batch_3.json=./tests/cli/_results/batch_3.png;"
"batch": "./samples/batch/batch1.json=./tests/cli/_results/batch1.png;./samples/batch/batch2.json=./tests/cli/_results/batch2.png;./samples/batch/batch3.json=./tests/cli/_results/batch3.png;"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"instr": "{\"title\":{\"text\":\"Global and theme options from files\"},\"xAxis\":{\"categories\":[\"Jan\",\"Feb\",\"Mar\",\"Apr\"]},\"series\":[{\"type\":\"column\",\"data\":[5,6,7,8]},{\"type\":\"line\",\"data\":[1,2,3,4]}]}",
"globalOptions": "./samples/resources/options_global.json",
"themeOptions": "./samples/resources/options_theme.json"
"globalOptions": "./samples/resources/optionsGlobal.json",
"themeOptions": "./samples/resources/optionsTheme.json"
}
File renamed without changes.
3 changes: 3 additions & 0 deletions tests/cli/scenarios/infileJson.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"infile": "./samples/cli/infileJson.json"
}
3 changes: 3 additions & 0 deletions tests/cli/scenarios/infileSvg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"infile": "./samples/cli/svgBasic.svg"
}
4 changes: 4 additions & 0 deletions tests/cli/scenarios/infileSvgWithScale.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"infile": "./samples/cli/svgBasic.svg",
"scale": 3
}
5 changes: 5 additions & 0 deletions tests/cli/scenarios/infileSvgWithScaleToPdf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"infile": "./samples/cli/svgBasic.svg",
"type": "pdf",
"scale": 3
}
3 changes: 0 additions & 3 deletions tests/cli/scenarios/infile_json.json

This file was deleted.

3 changes: 0 additions & 3 deletions tests/cli/scenarios/infile_svg.json

This file was deleted.

Loading

0 comments on commit ced9f14

Please sign in to comment.