diff --git a/settings.example.json b/settings.example.json index 227e3cd2..090f796d 100644 --- a/settings.example.json +++ b/settings.example.json @@ -2,38 +2,53 @@ "//": "Example of configuration for metrics web instance", "//": "====================================================================", - "token": "MY GITHUB API TOKEN", "//": "GitHub Personal Token (required)", - "restricted": [], "//": "Authorized users (empty to disable)", - "maxusers": 0, "//": "Maximum users, (0 to disable)", - "cached": 3600000, "//": "Cache time rendered metrics (0 to disable)", - "ratelimiter": null, "//": "Rate limiter (see express-rate-limit documentation)", - "port": 3000, "//": "Listening port", - "optimize": true, "//": "SVG optimization", - "debug": false, "//": "Debug logs", - "debug.headless": false, "//": "Debug puppeteer process", - "mocked": false, "//": "Use mocked data instead of live APIs (use 'force' to use mocked token even if real token are defined)", - "repositories": 100, "//": "Number of repositories to use", - "padding": ["0", "8 + 11%"], "//": "Image padding (default)", + "token": "GITHUB API TOKEN", "//": "GitHub Personal Token (required)", + "modes": ["embed", "insights"], "//": "Web instance enabled modes", + "restricted": [], "//": "Authorized users (empty to disable)", + "maxusers": 0, "//": "Maximum users, (0 to disable)", + "cached": 3600000, "//": "Cache time rendered metrics (0 to disable)", + "ratelimiter": null, "//": "Rate limiter (see express-rate-limit documentation)", + "port": 3000, "//": "Listening port", + "optimize": true, "//": "SVG optimization", + "debug": false, "//": "Debug logs", + "debug.headless": false, "//": "Debug puppeteer process", + "mocked": false, "//": "Use mocked data instead of live APIs (use 'force' to use mocked token even if real token are defined)", + "repositories": 100, "//": "Number of repositories to use", + "padding": ["0", "8 + 11%"], "//": "Image padding (default)", + "outputs": ["svg", "png", "json"], "//": "Image output formats (empty to enable all)", "hosted": { - "by": "", "//": "Web instance host (displayed in footer)", - "link": "", "//": "Web instance host link (displayed in footer)" + "by": "", "//": "Web instance host (displayed in footer)", + "link": "", "//": "Web instance host link (displayed in footer)" }, "community": { - "templates": [], "//": "Additional community templates to setup" + "templates": [], "//": "Additional community templates to setup" }, "templates": { - "default": "classic", "//": "Default template", - "enabled": [], "//": "Enabled templates (empty to enable all)" + "default": "classic", "//": "Default template", + "enabled": [], "//": "Enabled templates (empty to enable all)" }, "extras": { - "default": false, "//": "Default extras state (advised to let 'false' unless in debug mode)", - "presets": false, "//": "Allow use of 'config.presets' option", - "css": false, "//": "Allow use of 'extras.css' option", - "js": false, "//": "Allow use of 'extras.js' option", - "features": false, "//": "Enable extra features (advised to let 'false' on web instances)" + "default": false, "//": "Default extras state (advised to let 'false' unless in debug mode)", + "presets": false, "//": "Allow use of 'config.presets' option", + "features": false, "//": "Enable extra features (advised to let 'false' on web instances), see below for supported features", + "//": "________________________________________________________________________", + "//": "metrics.setup.community.templates | Allow community templates download", + "//": "metrics.setup.community.presets | Allow community presets usage", + "//": "metrics.api.github.overuse | Allow GitHub API intensive requests", + "//": "metrics.cpu.overuse | Allow CPU intensive requests", + "//": "metrics.run.tempdir | Allow access to temporary directory (I/O operations may be performed)", + "//": "metrics.run.git | Allow to run git (needs to be installed)", + "//": "metrics.run.licensed | Allow to run licensed (needs to be installed)", + "//": "metrics.run.user.cmd | Allow to run ANY command by user (USE WITH CAUTION!)", + "//": "metrics.run.puppeteer.scrapping | Allow to run puppeteer to scrape data", + "//": "metrics.run.puppeteer.user.css | Allow to run CSS by user during puppeteer render", + "//": "metrics.run.puppeteer.user.js | Allow to run JavaScript by user during puppeteer render", + "//": "metrics.npm.optional.chartist | Allow use of chartist (needs to be installed)", + "//": "metrics.npm.optional.gifencoder | Allow use of gifencoder (needs to be installed)", + "//": "metrics.npm.optional.libxmljs2 | Allow use of libxmljs2 (needs to be installed)" }, - "plugins.default": false, "//": "Default plugin state (advised to let 'false' unless in debug mode)", - "plugins": { "//": "Global plugin configuration", + "plugins.default": false, "//": "Default plugin state (advised to let 'false' unless in debug mode)", + "plugins": { "//": "Global plugin configuration", "isocalendar":{ "enabled": false, "//": "Enable isocalendar plugin" }, diff --git a/source/plugins/achievements/README.md b/source/plugins/achievements/README.md index 4d506673..bda9230e 100644 --- a/source/plugins/achievements/README.md +++ b/source/plugins/achievements/README.md @@ -37,7 +37,11 @@ - type: boolean + 🌐 Web instances must configure settings.json: + +type: boolean
default: no
diff --git a/source/plugins/anilist/README.md b/source/plugins/anilist/README.md index ec690005..52a3e4da 100644 --- a/source/plugins/anilist/README.md +++ b/source/plugins/anilist/README.md @@ -38,7 +38,11 @@ - type: boolean + 🌐 Web instances must configure settings.json: + +type: boolean
default: no
diff --git a/source/plugins/base/README.md b/source/plugins/base/README.md index 98c2e26c..d2df4b1b 100644 --- a/source/plugins/base/README.md +++ b/source/plugins/base/README.md @@ -72,7 +72,6 @@ This currently improves the accuracy of the following statistics:

🌐 Web instances must configure settings.json: type: boolean
diff --git a/source/plugins/community/README.md b/source/plugins/community/README.md index 9b1edf28..11fd8f4e 100644 --- a/source/plugins/community/README.md +++ b/source/plugins/community/README.md @@ -261,7 +261,7 @@ export default async function( } //Handle errors catch (error) { - throw {error:{message:"An error occured", instance:error}} + throw imports.format.error(error) } } ``` diff --git a/source/plugins/community/screenshot/README.md b/source/plugins/community/screenshot/README.md index 74040692..7af9dc06 100644 --- a/source/plugins/community/screenshot/README.md +++ b/source/plugins/community/screenshot/README.md @@ -38,7 +38,11 @@ - type: boolean + 🌐 Web instances must configure settings.json: + +type: boolean
default: no
diff --git a/source/plugins/core/README.md b/source/plugins/core/README.md index 5e7c7558..e9a6d62a 100644 --- a/source/plugins/core/README.md +++ b/source/plugins/core/README.md @@ -583,7 +583,7 @@ When doing so, any settings which defaults on user fetched values will not be te 🌐 Web instances must configure settings.json: type: array (comma-separated) @@ -626,7 +626,7 @@ Useful to avoid creating a new template just to tweak some styling

🌐 Web instances must configure settings.json: type: string
@@ -643,7 +643,7 @@ It is run after transformations and optimizations, but just before resizing.

🌐 Web instances must configure settings.json: type: string
@@ -813,6 +813,10 @@ It can result in cropped or oversized outputs.

⏯️ Cannot be preset
+🌐 Web instances must configure settings.json: + type: array (comma-separated)
@@ -1004,6 +1008,10 @@ This option has no effects on forks (images will always be rebuilt from Dockerfi ⏯️ Cannot be preset
🔧 For development
+🌐 Web instances must configure settings.json: + type: boolean
default: no
diff --git a/source/plugins/languages/README.md b/source/plugins/languages/README.md index 5e4fdf76..ebc3d3bb 100644 --- a/source/plugins/languages/README.md +++ b/source/plugins/languages/README.md @@ -156,7 +156,7 @@ It will be automatically hidden if empty.

🌐 Web instances must configure settings.json: @@ -170,13 +170,7 @@ It will be automatically hidden if empty.

- 🌐 Web instances must configure settings.json: - -type: number + type: number (1 ≤ 𝑥 ≤ 30) @@ -189,13 +183,7 @@ It will be automatically hidden if empty.

- 🌐 Web instances must configure settings.json: - -type: array + type: array (comma-separated)
default: markup, programming
@@ -207,13 +195,7 @@ It will be automatically hidden if empty.

- 🌐 Web instances must configure settings.json: - -type: array + type: array (comma-separated)
default: markup, programming
@@ -225,13 +207,7 @@ It will be automatically hidden if empty.

- 🌐 Web instances must configure settings.json: - -type: number + type: number (100 ≤ 𝑥 ≤ 1000) @@ -244,13 +220,7 @@ It will be automatically hidden if empty.

- 🌐 Web instances must configure settings.json: - -type: number + type: number (0 ≤ 𝑥 ≤ 365) diff --git a/source/plugins/licenses/README.md b/source/plugins/licenses/README.md index d44d0f5d..835df8cb 100644 --- a/source/plugins/licenses/README.md +++ b/source/plugins/licenses/README.md @@ -60,6 +60,7 @@ Dependencies will be analyzed by [GitHub licensed](https://github.com/github/lic 🌐 Web instances must configure settings.json: