Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/options-type-validations #561

Closed
wants to merge 100 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
9f0ed4e
Added a websocket connection possibility.
PaulDalek Dec 1, 2023
c7d0df3
Other smaller corrections.
PaulDalek Dec 1, 2023
3dc1db8
Websocket connection overhaul, touch #456.
PaulDalek Dec 15, 2023
f85a027
Removed cached dist folder, touch #456.
PaulDalek Jan 3, 2024
54964f1
Zod optionals correction, touch #456.
PaulDalek Jan 3, 2024
d297397
Small correction to the strict equality, touch #456.
PaulDalek Jan 3, 2024
c0cd679
Merge branch 'master' into feature/websockets
PaulDalek Jan 4, 2024
63b70f6
Merge branch 'stable' into feature/websockets
PaulDalek Jan 5, 2024
06dde71
Updated package-lock.json, touch #456.
PaulDalek Jan 5, 2024
4daaf0d
Updated README.md, touch #456.
PaulDalek Jan 5, 2024
0d55402
Merge branch 'master' into feature/websockets
PaulDalek Jan 18, 2024
1f61e3f
Merge branch 'master' into feature/websockets
PaulDalek Mar 7, 2024
b1d6ea7
Corrections after the master merge, touch #456.
PaulDalek Mar 7, 2024
792e727
Merge branch 'master' into feature/websockets
PaulDalek Apr 3, 2024
4418997
Corrections after the master merge, touch #456.
PaulDalek Apr 3, 2024
1bfae8f
Merge branch 'master' into feature/websockets
PaulDalek Apr 3, 2024
29f1efd
Corrections after the master merge, touch #456.
PaulDalek Apr 3, 2024
4d0a312
Merge branch 'master' into feature/websockets
PaulDalek May 16, 2024
4fef128
Corrections after the master merge.
PaulDalek May 16, 2024
e96a510
Merge branch 'master' into feature/websockets
PaulDalek May 23, 2024
829036b
Corrections after the master merge.
PaulDalek May 23, 2024
e175c5a
Added retry mechanism for the reconnect plus some minor fixes, touch …
PaulDalek May 27, 2024
3dcfedd
Various config, linting and formatting corrections, touch #456.
PaulDalek May 31, 2024
7252a3b
Update README.md
PaulDalek May 31, 2024
bf86c33
Packages updates, touch #456.
PaulDalek Jun 3, 2024
832697e
Refactored WebSocket logic along with reconnect corrections, touch #456.
PaulDalek Jun 6, 2024
8f88732
Further WebSocket enhancements along with other corrections, touch #456.
PaulDalek Jun 12, 2024
f1262ec
Limit to one connection, other corrections, touch #456.
PaulDalek Jun 13, 2024
e044382
Added simple caching and sending data in interval mechanism, touch #456.
PaulDalek Jun 18, 2024
f5eb3a7
Removed expiresIn for WebSocket and other small corrections, touch #456.
PaulDalek Jun 24, 2024
187a84c
Merge remote-tracking branch 'origin/master' into feature/websockets
PaulDalek Jul 4, 2024
4469481
Minor corrections, touch #456.
PaulDalek Jul 4, 2024
9cf36f9
Merge branch 'master' into feature/websockets
PaulDalek Jul 4, 2024
4ffca85
Removed the /dist folder, touch #456.
PaulDalek Jul 4, 2024
6df5b48
Added commands for version and usage of CLI info, touch #456.
PaulDalek Jul 5, 2024
a4ad6c0
Reamde and Changelog updates, touch #456.
PaulDalek Jul 5, 2024
a1736cb
Other minor corrections, touch #456.
PaulDalek Jul 5, 2024
fe48746
Various WebSocket, documentation and other fixes, touch #456.
PaulDalek Jul 9, 2024
8425836
Telemetry data object updated with sent dates and clean up after mess…
PaulDalek Jul 11, 2024
6c48548
Utils module updated with handleResources function moved out, touch #…
PaulDalek Jul 11, 2024
6e24a08
The utils getNewDate and getNewDateTime functions related corrections…
PaulDalek Jul 11, 2024
a1b5e93
Readme, changelog and package.json updates, touch #456.
PaulDalek Jul 11, 2024
fc5517c
Merge remote-tracking branch 'origin/stable' into feature/websockets
PaulDalek Jul 24, 2024
f4cf05e
Merge pull request #553 from highcharts/master
cvasseng Aug 2, 2024
999c504
Merge pull request #555 from highcharts/master
cvasseng Aug 5, 2024
bff8507
Merge branch 'master' into feature/websockets
PaulDalek Aug 5, 2024
92f0687
Changelog, readme and other readability corrections, touch #456.
PaulDalek Aug 5, 2024
3cb24bf
Updated packages versions, touch #456.
PaulDalek Aug 5, 2024
9c04655
Small prettier correction, touch #456.
PaulDalek Aug 5, 2024
93d225f
Merge pull request #558 from highcharts/master
cvasseng Aug 5, 2024
6f1be5c
Build the dist files after merge.
actions-user Aug 5, 2024
23ce55a
Merge pull request #560 from highcharts/master
cvasseng Aug 5, 2024
6f8ed0c
Expanded and added new type validators for envs and options along wit…
PaulDalek Aug 5, 2024
f83659b
Overall enhancements of validators and tests both for options from co…
PaulDalek Aug 13, 2024
a936674
Versions update.
PaulDalek Aug 13, 2024
dcc4876
Corrections in validators and tests.
PaulDalek Aug 21, 2024
dcb7bc9
Further validators and tests optimizations.
PaulDalek Aug 23, 2024
bfacbcd
Renamed envs.js to validate.js plus some corrections.
PaulDalek Aug 26, 2024
050b308
Implemented validation into the code along with many fixes and optimi…
PaulDalek Aug 29, 2024
b6316b8
Added #562, cache path option now supports absolute paths.
jszuminski Sep 2, 2024
fdae737
Touch #562: update changelog, docs, add code note.
jszuminski Sep 2, 2024
fbcffab
Tests: minor cleanup.
jszuminski Sep 2, 2024
d2c619d
Big number of fixes, corrections and enhancements.
PaulDalek Sep 17, 2024
184ac54
ExportError: add statusCode to constructor, improve basic status codes.
jszuminski Sep 18, 2024
c708bc7
Errors: Throw 400s for all client-caused errors instead of 500s.
jszuminski Sep 19, 2024
e04c30f
Fixed RasterizationTimeout from 500 to 408.
jszuminski Sep 19, 2024
853b311
Error status: rasterization timeout switched from 500 to 408.
jszuminski Sep 26, 2024
3194faa
Merge pull request #577 from highcharts/fix/error-handling-status
cvasseng Sep 26, 2024
36b5769
Added note on public export server
cvasseng Sep 26, 2024
a281b4c
Merge pull request #581 from highcharts/master
cvasseng Sep 26, 2024
28b8f88
Build the dist files after merge.
actions-user Sep 26, 2024
f6cef24
Further options and validators corrections and enhancements.
PaulDalek Oct 1, 2024
4739643
Added missing envs, validation middleware, validation enhancements, o…
PaulDalek Oct 9, 2024
d095dc0
First portion of fixes and optimizations.
PaulDalek Oct 16, 2024
5a2f159
Further fixes and optimizations.
PaulDalek Oct 17, 2024
0a25484
Logs readability and other smaller corrections.
PaulDalek Oct 18, 2024
d6b65c6
Improvements in the resource creation.
PaulDalek Oct 21, 2024
dbc8ee7
Removed the dist folder.
PaulDalek Oct 21, 2024
e8232fb
Merge branch 'master' into public/add-fair-usage-policy-link
jszuminski Oct 22, 2024
74fb4cf
Add note about the license to the fair usage policy note.
jszuminski Oct 22, 2024
cd3fdce
Add integrity and crossorigin properties to script for improved secur…
jszuminski Oct 22, 2024
0c34ece
Merge pull request #583 from highcharts/public/add-fair-usage-policy-…
jszuminski Oct 22, 2024
7270403
Merge pull request #576 from highcharts/feat/562-support-for-absolute…
PaulDalek Oct 23, 2024
4688a0a
Merge pull request #586 from highcharts/fix/memory-leak
PaulDalek Oct 23, 2024
bdbd56c
Merge remote-tracking branch 'origin/master' into fix/options-type-va…
PaulDalek Oct 23, 2024
f566663
fix: add additional error check in exportAsString for chartJSON
jszuminski Oct 28, 2024
35fbb37
chore: minor cleanup
jszuminski Oct 29, 2024
371d057
fix: export error raw input set to 400
jszuminski Oct 29, 2024
55c59e5
update changelog for v4.0.3
jszuminski Oct 29, 2024
110c3e6
chore: version bump to v4.0.3
jszuminski Oct 29, 2024
0e3da2b
Added some missing codes.
PaulDalek Oct 29, 2024
7ff083a
Merge pull request #588 from highcharts/bugfix/improper-status-code
PaulDalek Oct 29, 2024
964c7cb
Merge pull request #589 from highcharts/docs/update-changelog
PaulDalek Oct 29, 2024
9f9761c
fix: set allowed origin methods to POST, GET, OPTIONS
jszuminski Oct 30, 2024
d61b462
Merge pull request #590 from highcharts/fix/server-allowed-methods
PaulDalek Oct 30, 2024
7a22f18
Packages update.
PaulDalek Nov 4, 2024
33626cb
Master changes.
PaulDalek Nov 4, 2024
660c7fd
Merge branch 'master' into feature/websockets
PaulDalek Nov 27, 2024
ecccd13
Merge from websocket branch.
PaulDalek Nov 27, 2024
bdcf3f4
Merge branch 'stable' into fix/options-type-validations
PaulDalek Dec 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 41 additions & 5 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,24 +1,46 @@
# PUPPETEER CONFIG
PUPPETEER_ARGS =

# HIGHCHARTS CONFIG
HIGHCHARTS_VERSION = latest
HIGHCHARTS_CDN_URL = https://code.highcharts.com/
HIGHCHARTS_FORCE_FETCH = false
HIGHCHARTS_CACHE_PATH = .cache
HIGHCHARTS_ADMIN_TOKEN =
HIGHCHARTS_CORE_SCRIPTS =
HIGHCHARTS_MODULE_SCRIPTS =
HIGHCHARTS_INDICATOR_SCRIPTS =
HIGHCHARTS_FORCE_FETCH = false
HIGHCHARTS_CACHE_PATH =
HIGHCHARTS_ADMIN_TOKEN =
HIGHCHARTS_CUSTOM_SCRIPTS =

# EXPORT CONFIG
EXPORT_INFILE =
EXPORT_INSTR =
EXPORT_OPTIONS =
EXPORT_SVG =
EXPORT_TYPE = png
EXPORT_CONSTR = chart
EXPORT_OUTFILE =
EXPORT_B64 = false
EXPORT_NO_DOWNLOAD = false
EXPORT_HEIGHT =
EXPORT_WIDTH =
EXPORT_SCALE =
EXPORT_DEFAULT_HEIGHT = 400
EXPORT_DEFAULT_WIDTH = 600
EXPORT_DEFAULT_SCALE = 1
EXPORT_GLOBAL_OPTIONS =
EXPORT_THEME_OPTIONS =
EXPORT_BATCH =
EXPORT_RASTERIZATION_TIMEOUT = 1500

# CUSTOM LOGIC CONFIG
CUSTOM_LOGIC_ALLOW_CODE_EXECUTION = false
CUSTOM_LOGIC_ALLOW_FILE_RESOURCES = false
CUSTOM_LOGIC_CUSTOM_CODE =
CUSTOM_LOGIC_CALLBACK =
CUSTOM_LOGIC_RESOURCES =
CUSTOM_LOGIC_LOAD_CONFIG =
CUSTOM_LOGIC_CREATE_CONFIG =

# SERVER CONFIG
SERVER_ENABLE = false
Expand Down Expand Up @@ -57,16 +79,17 @@ POOL_IDLE_TIMEOUT = 30000
POOL_CREATE_RETRY_INTERVAL = 200
POOL_REAPER_INTERVAL = 1000
POOL_BENCHMARKING = false
POOL_RESOURCES_INTERVAL = 30000

# LOGGING CONFIG
LOGGING_LEVEL = 4
LOGGING_FILE = highcharts-export-server.log
LOGGING_DEST = log/
LOGGING_DEST = log
LOGGING_TO_CONSOLE = true
LOGGING_TO_FILE = true

# UI CONFIG
UI_ENABLE = true
UI_ENABLE = false
UI_ROUTE = /

# OTHER CONFIG
Expand All @@ -75,6 +98,7 @@ OTHER_LISTEN_TO_PROCESS_EXITS = true
OTHER_NO_LOGO = false
OTHER_HARD_RESET_PAGE = false
OTHER_BROWSER_SHELL_MODE = true
OTHER_CONNECTION_OVER_PIPE = false

# DEBUG CONFIG
DEBUG_ENABLE = false
Expand All @@ -84,3 +108,15 @@ DEBUG_LISTEN_TO_CONSOLE = false
DEBUG_DUMPIO = false
DEBUG_SLOW_MO = 0
DEBUG_DEBUGGING_PORT = 9222

# WEBSOCKET CONFIG
WEB_SOCKET_ENABLE = false
WEB_SOCKET_RECONNECT = false
WEB_SOCKET_REJECT_UNAUTHORIZED = false
WEB_SOCKET_PING_TIMEOUT = 16000
WEB_SOCKET_RECONNECT_INTERVAL = 3000
WEB_SOCKET_RECONNECT_ATTEMPTS = 3
WEB_SOCKET_MESSAGE_INTERVAL = 3600000
WEB_SOCKET_GATHER_ALL_OPTIONS = false
WEB_SOCKET_URL =
WEB_SOCKET_SECRET =
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
node_modules/
dist/*
dist/
17 changes: 6 additions & 11 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module.exports = {
root: true,
env: {
browser: true,
es2021: true,
node: true
node: true,
es2024: true
},
root: true,
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module'
Expand All @@ -24,13 +24,8 @@ module.exports = {
}
],
rules: {
'no-unused-vars': 0,
'import/no-cycle': 2,
'prettier/prettier': [
'error',
{
endOfLine: require('os').EOL === '\r\n' ? 'crlf' : 'lf'
}
]
'no-unused-vars': 'off',
'import/no-cycle': 'error',
'import/no-named-as-default': 'off'
}
};
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

#### Expected behaviour


#### Actual behaviour

<!-- screenshots welcome! -->

#### Reproduction steps
<!-- Please describe how to reproduce the issue. -->

<!-- Please describe how to reproduce the issue. -->
<!-- If you can, please include a curl fetch that demonstrates the issue, e.g. -->
<!-- curl -H "Content-Type: application/json" -X POST -d '{"infile":{ <CHART OPTIONS HERE> }' 127.0.0.1:7801 -o mychart.png -->

34 changes: 17 additions & 17 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,24 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x.x'
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x.x'

- name: Install Dependencies
run: npm ci
- name: Install Dependencies
run: npm ci

- name: Build Project
run: npm run build
- name: Build Project
run: npm run build

- name: Commit and Push /dist Directory
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -f dist/
git commit -m "Build the dist files after merge."
git push -f
- name: Commit and Push /dist Directory
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -f dist/
git commit -m "Build the dist files after merge."
git push -f
2 changes: 1 addition & 1 deletion .github/workflows/eslint-check.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: ESLint check

on: [ pull_request ]
on: [pull_request]

jobs:
eslint:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Unit tests

on:
pull_request:
branches: [ master ]
branches: [master]

jobs:
testing:
Expand All @@ -23,4 +23,4 @@ jobs:
- name: Run unit tests
run: npm run unit:test
env:
CI: true
CI: true
12 changes: 5 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
node_modules/
tests/_temp/
tests/**/_results/
dist/
log/
tests/_temp
tmp/
dist/
.cache/
.cert/
.vscode/

.DS_Store
.cache
.vscode
.env
.eslintcache

tests/**/_results/

resources.json

**/*.png
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
npm run lint
npx lint-staged
npm run unit:test
3 changes: 2 additions & 1 deletion .lintstagedrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"lib/**/\*.{js,json}": ["eslint", "npx prettier --write"]
"*.{js,ts}": ["npm run lint"],
"*.{json,css,md}": ["npm run format"]
}
4 changes: 2 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
samples/cli/infileNotJson.json
node_modules/
dist/*
README.md
dist/
7 changes: 4 additions & 3 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"semi": true,
"singleQuote": true,
"trailingComma": "none",
"endOfLine": "auto",
"tabWidth": 2,
"printWidth": 80,
"trailingComma": "none"
"semi": true,
"singleQuote": true
}
Loading
Loading