diff --git a/.gitattributes b/.gitattributes
index 68e48dade61..e827b1dd8d9 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,12 +1,26 @@
# Auto detect text files and perform LF normalization
* text=auto
-# Linguist
+# Vendored files
+source/templates/** linguist-vendored
source/app/web/statics/style.vars.css linguist-vendored
-.github/* -linguist-detectable
-source/templates/* -linguist-detectable
-package-lock.json linguist-generated
-settings.example.json linguist-generated
-action.yml linguist-generated
+
+# Hidden files
+.github/** -linguist-detectable
+
+# Documentation
+ARCHITECTURE.md linguist-documentation
+CODE_OF_CONDUCT.md linguist-documentation
CONTRIBUTING.md linguist-documentation
-SECURITY.md linguist-documentation
\ No newline at end of file
+LICENSE.md linguist-documentation
+SECURITY.md linguist-documentation
+README.md linguist-documentation
+
+# Generated files
+source/plugins/README.md linguist-generated
+source/plugins/community/README.md linguist-generated
+source/templates/README.md linguist-generated
+action.yml linguist-generated
+settings.example.json linguist-generated
+tests/cases/* linguist-generated
+package-lock.json linguist-generated
diff --git a/.github/workflows/maintenance/delete_ghcr_dangling_images.sh b/.github/actions/ghcr-clean/delete_ghcr_dangling_images.sh
old mode 100755
new mode 100644
similarity index 100%
rename from .github/workflows/maintenance/delete_ghcr_dangling_images.sh
rename to .github/actions/ghcr-clean/delete_ghcr_dangling_images.sh
diff --git a/.github/workflows/maintenance/delete_workflows.sh b/.github/actions/ghcr-clean/delete_workflows.sh
old mode 100755
new mode 100644
similarity index 100%
rename from .github/workflows/maintenance/delete_workflows.sh
rename to .github/actions/ghcr-clean/delete_workflows.sh
diff --git a/.github/actions/spelling/README.md b/.github/actions/spelling/README.md
new file mode 100644
index 00000000000..d82bed75ccc
--- /dev/null
+++ b/.github/actions/spelling/README.md
@@ -0,0 +1,16 @@
+# check-spelling/check-spelling configuration
+
+File | Purpose | Format | Info
+-|-|-|-
+[dictionary.txt](dictionary.txt) | Replacement dictionary (creating this file will override the default dictionary) | one word per line | [dictionary](https://github.com/check-spelling/check-spelling/wiki/Configuration#dictionary)
+[allow.txt](allow.txt) | Add words to the dictionary | one word per line (only letters and `'`s allowed) | [allow](https://github.com/check-spelling/check-spelling/wiki/Configuration#allow)
+[reject.txt](reject.txt) | Remove words from the dictionary (after allow) | grep pattern matching whole dictionary words | [reject](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-reject)
+[excludes.txt](excludes.txt) | Files to ignore entirely | perl regular expression | [excludes](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-excludes)
+[only.txt](only.txt) | Only check matching files (applied after excludes) | perl regular expression | [only](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-only)
+[patterns.txt](patterns.txt) | Patterns to ignore from checked lines | perl regular expression (order matters, first match wins) | [patterns](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-patterns)
+[line_forbidden.patterns](line_forbidden.patterns) | Patterns to flag in checked lines | perl regular expression (order matters, first match wins) | [patterns](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-patterns)
+[expect.txt](expect.txt) | Expected words that aren't in the dictionary | one word per line (sorted, alphabetically) | [expect](https://github.com/check-spelling/check-spelling/wiki/Configuration#expect)
+[advice.md](advice.md) | Supplement for GitHub comment when unrecognized words are found | GitHub Markdown | [advice](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-advice)
+
+Note: you can replace any of these files with a directory by the same name (minus the suffix)
+and then include multiple files inside that directory (with that suffix) to merge multiple files together.
diff --git a/.github/actions/spelling/advice.md b/.github/actions/spelling/advice.md
new file mode 100644
index 00000000000..54f0c9b5e5e
--- /dev/null
+++ b/.github/actions/spelling/advice.md
@@ -0,0 +1,25 @@
+
+If the flagged items are false positives
+
+If items relate to a ...
+* binary file (or some other file you wouldn't want to check at all).
+
+ Please add a file path to the `excludes.txt` file matching the containing file.
+
+ File paths are Perl 5 Regular Expressions - you can [test](
+https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files.
+
+ `^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md](
+../tree/HEAD/README.md) (on whichever branch you're using).
+
+* well-formed pattern.
+
+ If you can write a [pattern](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) that would match it,
+ try adding it to the `patterns.txt` file.
+
+ Patterns are Perl 5 Regular Expressions - you can [test](
+https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines.
+
+ Note that patterns can't match multiline strings.
+
+
diff --git a/.github/actions/spelling/allow.txt b/.github/actions/spelling/allow.txt
new file mode 100644
index 00000000000..e4d5df47c2f
--- /dev/null
+++ b/.github/actions/spelling/allow.txt
@@ -0,0 +1,46 @@
+appid
+apikey
+apiname
+appdetails
+appids
+appinfo
+deno
+Flickr
+gpgarmor
+github
+githubassets
+https
+IPlayer
+ISteam
+joinmastodon
+leetcode
+MBTI
+Nie
+npx
+personaname
+pgn
+playerstats
+rbga
+rtime
+scm
+shas
+splatoon
+Splatnet
+ssh
+statink
+STATINK
+steamcommunity
+steamid
+steamids
+steampowered
+tdatum
+timecreated
+tspan
+ubuntu
+unlocktime
+userid
+xticked
+xticks
+yargsparser
+yticked
+webtoken
diff --git a/.github/actions/spelling/candidate.patterns b/.github/actions/spelling/candidate.patterns
new file mode 100644
index 00000000000..b1963070abe
--- /dev/null
+++ b/.github/actions/spelling/candidate.patterns
@@ -0,0 +1,4 @@
+# Apple music
+\bembed\.music\.apple\.com/fr/playlist/usr-share/[-\w.]+
+# Spotify
+\bopen\.spotify\.com/embed/playlist/\w+
diff --git a/.github/actions/spelling/excludes.txt b/.github/actions/spelling/excludes.txt
new file mode 100644
index 00000000000..0900304ea4e
--- /dev/null
+++ b/.github/actions/spelling/excludes.txt
@@ -0,0 +1,59 @@
+# See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-excludes
+(?:^|/)(?i)COPYRIGHT
+(?:^|/)(?i)LICEN[CS]E
+(?:^|/)go\.sum$
+(?:^|/)package(?:-lock|)\.json$
+(?:^|/)vendor/
+ignore$
+\.a$
+\.ai$
+\.avi$
+\.bmp$
+\.bz2$
+\.crt$
+\.dll$
+\.DS_Store$
+\.eot$
+\.exe$
+\.gif$
+\.gitattributes$
+\.graffle$
+\.gz$
+\.icns$
+\.ico$
+\.jar$
+\.jpe?g$
+\.key$
+\.lib$
+\.lock$
+\.map$
+\.min\..
+\.mod$
+\.mp[34]$
+\.o$
+\.ocf$
+\.otf$
+\.pdf$
+\.pem$
+\.png$
+\.psd$
+\.s$
+\.svg$
+\.tiff?$
+\.ttf$
+\.wav$
+\.woff2?$
+\.zip$
+^\.github/actions/spelling/
+^\Q.github/readme/partials/documentation/inspirations.md\E$
+^\Q.github/workflows/spelling.yml\E$
+^source/plugins/community/splatoon/
+^\Qsource/plugins/sponsors/index.mjs\E$
+^\Qsource/plugins/stargazers/worldmap/atlas/50m_countries.geojson\E$
+^\Qsource/templates/classic/partials/splatoon.ejs\E$
+^\Qsource/templates/markdown/example.md\E$
+^\Qsource/templates/terminal/fonts.css\E$
+^\Qsource/templates/terminal/partials/screenshot.ejs\E$
+^\Qtests/mocks/api/github/rest/emojis/get.mjs\E$
+^\Qtests/mocks/api/axios/get/lichess.mjs\E$
+^\Qtests/mocks/api/axios/get/steam.mjs\E$
\ No newline at end of file
diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt
new file mode 100644
index 00000000000..0c3e2fbf0b2
--- /dev/null
+++ b/.github/actions/spelling/expect.txt
@@ -0,0 +1,376 @@
+ABCDEFGHIJKLMNOPQRSTUVWXY
+activeline
+allowtransparency
+alse
+amd
+anilist
+apidojo
+apostrophecms
+argv
+arobase
+asi
+audioscrobbler
+Autoloaded
+automator
+backreference
+Bizau
+blankslate
+blog
+brackethighlighter
+btn
+cacheable
+cakeday
+captcha
+charsets
+chmod
+chown
+chrisbottin
+cloudinary
+cmake
+codelines
+codemirror
+codeql
+colorsets
+Consolas
+coord
+csso
+CVE
+cwd
+datapoints
+dded
+dependabot
+deployer
+deps
+dessant
+destructuring
+Dexcom
+dflag
+diffs
+diffstat
+dirname
+domcontentloaded
+DOUBLEDOWN
+DOUBLEUP
+downvotes
+dprint
+dryrun
+dto
+ecma
+Edg
+eleased
+eleted
+emails
+emoji
+emojipedia
+endgroup
+endyear
+ENOENT
+entrypoint
+eopened
+eqeqeq
+erged
+esm
+eugeneware
+eviewed
+expr
+expressjs
+extracter
+extralarge
+facebook
+favicon
+favourites
+FEmusic
+filesize
+filesloop
+Firefox
+firstname
+Fnc
+foliojs
+forkee
+FORTYFIVEDOWN
+FORTYFIVEUP
+freefont
+fss
+FTg
+fullyear
+gemoji
+geocodes
+geopath
+getrecenttracks
+gettopartists
+gettoptracks
+ghactions
+ghcr
+ghquery
+gifencoder
+gionkunz
+Gister
+githubs
+githubusercontent
+gitted
+globals
+Gmap
+gnupg
+gnuplot
+Gollum
+google
+googlechrome
+gpg
+grep
+guttermarker
+hackernews
+hardcode
+hashnode
+hashtag
+herokuapp
+highalert
+highlighter
+homepage
+honzaap
+htmlescape
+htmlsanitize
+htmlunescape
+hubot
+hyperlinks
+identicon
+ies
+iframes
+imagga
+imgb
+indepth
+infographics
+infographile
+installable
+instanceof
+instantier
+Intelli
+invertocat
+Ionica
+ipafont
+ipsum
+isaacs
+isocalendar
+itemprop
+itunes
+jellyfin
+jshemas
+kacst
+keyup
+Kotlin
+largeable
+lastfm
+lastname
+leaderboard
+lecoq
+legoandmars
+libgconf
+libssl
+libx
+libxml
+libxmljs
+libxss
+libxtst
+lichess
+linux
+lng
+localhost
+localstorage
+logline
+losed
+lovell
+lowalert
+lowercased
+lowlighter
+lsb
+lstat
+mangas
+markedjs
+marudor
+matchingbracket
+matievisthekat
+maxage
+maxusers
+mbid
+mde
+mergeability
+mergeable
+middlewares
+mkdir
+mockresize
+mozilla
+MSFT
+myplugin
+myquery
+ncal
+networkidle
+newplugin
+newyear
+nfriedly
+nightscout
+Nixinova
+NOASSERTION
+nocase
+nodeca
+nodejs
+notoken
+octicon
+OCTO
+octocat
+octokit
+octonaut
+octoraw
+oid
+ommented
+opengraph
+optimizable
+orked
+pageerror
+pagespeed
+pagespeedonline
+panosoft
+params
+patchnote
+pdated
+pened
+PGP
+playcount
+playlists
+plugin
+poopmap
+practicaldev
+prettylights
+previewable
+prismjs
+producthunt
+ptarjan
+puppeteergif
+purgecss
+pwa
+qmake
+rankeds
+rapidapi
+ratelimit
+ratelimiter
+rbmok
+rbren
+rcopy
+readdir
+readme
+readonly
+reated
+recenttracks
+regexp
+rlreset
+rssi
+runsh
+SAPISID
+SAPISIDHASH
+scorecalc
+screenshots
+SDKs
+Segoe
+selfhosted
+seo
+Serializer
+sgit
+sgv
+shipit
+shm
+SIGKILL
+SINGLEDOWN
+SINGLEUP
+sourced
+spamming
+spams
+spdx
+sponsorable
+spotify
+stackexchange
+stackoverflow
+stagazers
+standalone
+starlist
+stderr
+stdin
+stdio
+stdout
+steveukx
+streamable
+stripemojis
+stroustrup
+sublimelinter
+substr
+sudo
+sysadmin
+systemctl
+systemd
+tempdir
+templating
+testapp
+testcase
+Thu
+timeline
+tlwg
+tmpdir
+todo
+topartists
+toptracks
+tracklist
+transfonter
+trollface
+TSLA
+twemoji
+uapi
+uconf
+uid
+uncache
+Unconfigured
+undef
+underlinenav
+Unescape
+upcase
+upvote
+urgenthighalert
+urgentlowalert
+uri
+urlencoded
+URLTo
+usermod
+usernames
+ushed
+usr
+utf
+utm
+vercel
+vnd
+vuejs
+waifus
+wakapi
+wakatime
+wasm
+webserver
+websites
+wget
+whitelisted
+whoami
+wiki
+wikipedia
+wontfix
+workaround
+WORKDIR
+worldmap
+wqy
+wsl
+xcb
+Xcode
+xkcd
+xmlformat
+ycombinator
+ymd
+yoda
+youtube
+ytd
+ytmusic
+Zabcdefghijklmnopqrstuvwxyz
+zenhei
+zenorocha
diff --git a/.github/actions/spelling/line_forbidden.patterns b/.github/actions/spelling/line_forbidden.patterns
new file mode 100644
index 00000000000..254230547aa
--- /dev/null
+++ b/.github/actions/spelling/line_forbidden.patterns
@@ -0,0 +1,48 @@
+# reject `m_data` as there's a certain OS which has evil defines that break things if it's used elsewhere
+# \bm_data\b
+
+# s.b. GitHub
+\bGithub\b
+
+# s.b. GitLab
+\bGitlab\b
+
+# s.b. JavaScript
+\bJavascript\b
+
+# s.b. Microsoft
+\bMicroSoft\b
+
+# s.b. another
+\ban[- ]other\b
+
+# s.b. greater than
+\bgreater then\b
+
+# s.b. less than
+\bless then\b
+
+# s.b. otherwise
+\bother[- ]wise\b
+
+# s.b. nonexistent
+\bnon existing\b
+\b[Nn]o[nt][- ]existent\b
+
+# s.b. preexisting
+[Pp]re-existing
+
+# s.b. preempt
+[Pp]re-empt\b
+
+# s.b. preemptively
+[Pp]re-emptively
+
+# s.b. reentrancy
+[Rr]e-entrancy
+
+# s.b. reentrant
+[Rr]e-entrant
+
+# Reject duplicate words
+\s([A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,})\s\g{-1}\s
diff --git a/.github/actions/spelling/patterns.txt b/.github/actions/spelling/patterns.txt
new file mode 100644
index 00000000000..c64f5b0c27c
--- /dev/null
+++ b/.github/actions/spelling/patterns.txt
@@ -0,0 +1,97 @@
+# See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns
+
+# hit-count: 506 file-count: 66
+# w3
+\bw3\.org/[-0-9a-zA-Z/#.]+
+
+# hit-count: 414 file-count: 136
+# GitHub SHAs (markdown)
+(?:\[`?[0-9a-f]+`?\]\(https:/|)/(?:www\.|)github\.com(?:/[^/ ]+){2,}(?:/[^/ )]+/[0-9a-f]+(?:[-0-9a-zA-Z/#.]*|)\b|)
+
+# hit-count: 69 file-count: 26
+\.replace\(/[^/]*/[gim]*\s*,
+
+# hit-count: 66 file-count: 31
+# JavaScript regular expressions
+/[^/]*/[gim]*\.test\(
+
+# hit-count: 41 file-count: 14
+# URL escaped characters
+\%[0-9A-F]{2}
+
+# hit-count: 29 file-count: 19
+# githubusercontent
+/[-a-z0-9]+\.githubusercontent\.com/[-a-zA-Z0-9?&=_\/.]*
+
+# hit-count: 18 file-count: 6
+# data url in quotes
+([`'"])data:.*?(?:[A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,}).*\g{-1}
+
+# hit-count: 12 file-count: 4
+# Contributor
+\[[^\]]+\]\(https://github\.com/[^/ ]+\)
+
+# hit-count: 1 file-count: 1
+# YouTube music
+\bmusic\.youtube\.com/youtubei/v1/browse(?:[?&]\w+=[-a-zA-Z0-9?&=_]*)
+
+# hit-count: 6 file-count: 5
+# While you could try to match `http://` and `https://` by using `s?` in `https?://`, sometimes there
+# YouTube url
+\b(?:(?:www\.|)youtube\.com|youtu.be)/(?:channel/|embed/|playlist\?list=|watch\?v=|v/|)[-a-zA-Z0-9?&=_]*
+
+# hit-count: 1 file-count: 1
+# AWS S3
+\b\w*\.s3[^.]*\.amazonaws\.com/[-\w/%_?:=]*
+
+# hit-count: 1 file-count: 1
+# GitHub SHAs
+\bgithub\.com(?:/[^/ ]+){2}[@#][0-9a-f]+\b
+
+# hit-count: 1 file-count: 1
+# hex runs
+\b[0-9a-fA-F]{16,}\b
+
+# hit-count: 1 file-count: 1
+# hex in url queries
+=[0-9a-fA-F]*?(?:[A-F]{3,}|[a-f]{3,})[0-9a-fA-F]*?&
+
+# Automatically suggested patterns
+# hit-count: 970 file-count: 25
+# hex digits including css/html color classes:
+(?:[\\0][xX]|\\u|[uU]\+|#x?|\%23)[0-9a-fA-FgGrR_]{2,}(?:[uUlL]{0,3}|u\d+)\b
+
+# Automatically suggested patterns
+# hit-count: 4 file-count: 4
+# Apple music
+\bembed\.music\.apple\.com/fr/playlist/usr-share/[-\w.]+
+
+# hit-count: 4 file-count: 4
+# Spotify
+\bopen\.spotify\.com/embed/playlist/\w+
+
+computed\.avatar = await avatar \|\| ".*"
+place_id: ".*"
+(?:answer|question|user): "[^"]*"
+
+# acceptable duplicates
+# ls directory listings
+[-bcdlpsw](?:[-r][-w][-sx]){3}\s+\d+\s+(\S+)\s+\g{-1}\s+\d+\s+
+# C types
+\s(long|LONG) \g{-1}\s
+# javadoc / .net
+(?:[\\@](?:groupname|param)|(?:public|private)(?:\s+static|\s+readonly)*)\s+(\w+)\s+\g{-1}\s
+
+# Commit message -- Signed-off-by and friends
+^\s*(?:(?:Based-on-patch|Co-authored|Helped|Mentored|Reported|Reviewed|Signed-off)-by|Thanks-to): (?:[^<]*<[^>]*>|[^<]*)\s*$
+
+# Autogenerated revert commit message
+^This reverts commit [0-9a-f]{40}\.$
+
+# ignore long runs of a single character:
+\b([A-Za-z])\g{-1}{3,}\b
+
+# Chess patterns
+\brnbqkbnr\b
+\bRNBQKBNR\b
+\bpgn\b
diff --git a/.github/actions/spelling/reject.txt b/.github/actions/spelling/reject.txt
new file mode 100644
index 00000000000..b5a6d36809f
--- /dev/null
+++ b/.github/actions/spelling/reject.txt
@@ -0,0 +1,10 @@
+^attache$
+benefitting
+occurences?
+^dependan.*
+^oer$
+Sorce
+^[Ss]pae.*
+^untill$
+^untilling$
+^wether.*
diff --git a/.github/config/codeql.yml b/.github/config/codeql.yml
index 44c38b3ad4c..7372b88829a 100644
--- a/.github/config/codeql.yml
+++ b/.github/config/codeql.yml
@@ -3,4 +3,5 @@ queries:
- uses: security-and-quality
paths-ignore:
- copyrighted/**
- - .github/scripts/quickstart/**
\ No newline at end of file
+ - .github/scripts/quickstart/**
+ - source/plugins/community/splatoon/s3si/**
\ No newline at end of file
diff --git a/.github/config/dprint.json b/.github/config/dprint.json
index cd648004770..d5511d0d578 100644
--- a/.github/config/dprint.json
+++ b/.github/config/dprint.json
@@ -1,10 +1,8 @@
{
- "$schema": "https://dprint.dev/schemas/v0.json",
- "projectType": "openSource",
"incremental": true,
"indentWidth": 2,
"typescript": {
- "lineWidth": 280,
+ "lineWidth": 360,
"semiColons": "asi",
"quoteStyle": "preferDouble",
"useBraces": "preferNone",
@@ -12,7 +10,8 @@
"arrowFunction.useParentheses": "preferNone",
"commentLine.forceSpaceAfterSlashes": false,
"taggedTemplate.spaceBeforeLiteral": false,
- "nextControlFlowPosition": "nextLine"
+ "nextControlFlowPosition": "nextLine",
+ "spaceSurroundingProperties": false
},
"includes": ["**/*.{js,mjs}"],
"excludes": [
@@ -20,6 +19,6 @@
".github/scripts/quickstart/**/*"
],
"plugins": [
- "https://plugins.dprint.dev/typescript-0.42.0.wasm"
+ "https://plugins.dprint.dev/typescript-0.83.0.wasm"
]
}
diff --git a/.github/config/label.yml b/.github/config/label.yml
index 2b255b35fa1..1d10a5dc423 100644
--- a/.github/config/label.yml
+++ b/.github/config/label.yml
@@ -2,7 +2,7 @@
- source/app/action/**
- source/app/web/**
⨠metrics insights:
- - source/app/web/statics/about/**
+ - source/app/web/statics/insights/**
đ§Š plugins:
- source/plugins/**
@@ -15,7 +15,7 @@
- source/app/metrics/**
- source/plugins/core/**
-đ˛ community plugin:
+đ˛ community plugins:
- source/plugins/community/**
đ plugin achievements:
@@ -24,6 +24,8 @@
- source/plugins/activity/**
đ¸ plugin anilist:
- source/plugins/anilist/**
+đ plugin calendar:
+ - source/plugins/calendar/**
â plugin code:
- source/plugins/code/**
đ plugin contributors:
@@ -42,6 +44,8 @@
- source/plugins/isocalendar/**
đˇī¸ plugin languages:
- source/plugins/languages/**
+đŗī¸ plugin leetcode:
+ - source/plugins/leetcode/**
đ plugin licenses:
- source/plugins/licenses/**
đ¨âđģ plugin lines:
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 11aa142e8dd..2cabb80366b 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -1,6 +1,7 @@
version: 2
updates:
- package-ecosystem: npm
+ open-pull-requests-limit: 0 # Will not be managed by npm anymore in v4
labels:
- đĻ dependencies
directory: /
diff --git a/.github/readme/imgs/example_action_update.dark.png b/.github/readme/imgs/example_action_update.dark.png
new file mode 100644
index 00000000000..a31a49d1f33
Binary files /dev/null and b/.github/readme/imgs/example_action_update.dark.png differ
diff --git a/.github/readme/imgs/example_action_update.light.png b/.github/readme/imgs/example_action_update.light.png
new file mode 100644
index 00000000000..1be3969fd1d
Binary files /dev/null and b/.github/readme/imgs/example_action_update.light.png differ
diff --git a/.github/readme/imgs/example_action_update.png b/.github/readme/imgs/example_action_update.png
deleted file mode 100644
index 8805818d6d4..00000000000
Binary files a/.github/readme/imgs/example_action_update.png and /dev/null differ
diff --git a/.github/readme/imgs/example_github_profile.dark.png b/.github/readme/imgs/example_github_profile.dark.png
new file mode 100644
index 00000000000..b5c0d524e87
Binary files /dev/null and b/.github/readme/imgs/example_github_profile.dark.png differ
diff --git a/.github/readme/imgs/example_github_profile.light.png b/.github/readme/imgs/example_github_profile.light.png
new file mode 100644
index 00000000000..35e7328092d
Binary files /dev/null and b/.github/readme/imgs/example_github_profile.light.png differ
diff --git a/.github/readme/imgs/example_github_profile.png b/.github/readme/imgs/example_github_profile.png
deleted file mode 100644
index b580945e863..00000000000
Binary files a/.github/readme/imgs/example_github_profile.png and /dev/null differ
diff --git a/.github/readme/imgs/plugin_16personalities_profile.png b/.github/readme/imgs/plugin_16personalities_profile.png
new file mode 100644
index 00000000000..d55d3302c97
Binary files /dev/null and b/.github/readme/imgs/plugin_16personalities_profile.png differ
diff --git a/.github/readme/imgs/plugin_chess_lichess_token_0.png b/.github/readme/imgs/plugin_chess_lichess_token_0.png
new file mode 100644
index 00000000000..6336af1ac84
Binary files /dev/null and b/.github/readme/imgs/plugin_chess_lichess_token_0.png differ
diff --git a/.github/readme/imgs/plugin_chess_lichess_token_1.png b/.github/readme/imgs/plugin_chess_lichess_token_1.png
new file mode 100644
index 00000000000..8a7a1857e83
Binary files /dev/null and b/.github/readme/imgs/plugin_chess_lichess_token_1.png differ
diff --git a/.github/readme/imgs/plugin_chess_lichess_token_2.png b/.github/readme/imgs/plugin_chess_lichess_token_2.png
new file mode 100644
index 00000000000..9374a464032
Binary files /dev/null and b/.github/readme/imgs/plugin_chess_lichess_token_2.png differ
diff --git a/.github/readme/imgs/plugin_splatoon_auth.png b/.github/readme/imgs/plugin_splatoon_auth.png
new file mode 100644
index 00000000000..74529f2a4ef
Binary files /dev/null and b/.github/readme/imgs/plugin_splatoon_auth.png differ
diff --git a/.github/readme/imgs/plugin_splatoon_script.png b/.github/readme/imgs/plugin_splatoon_script.png
new file mode 100644
index 00000000000..5e0e9e7114f
Binary files /dev/null and b/.github/readme/imgs/plugin_splatoon_script.png differ
diff --git a/.github/readme/imgs/plugin_splatoon_statink.png b/.github/readme/imgs/plugin_splatoon_statink.png
new file mode 100644
index 00000000000..212e00e7b9c
Binary files /dev/null and b/.github/readme/imgs/plugin_splatoon_statink.png differ
diff --git a/.github/readme/imgs/plugin_steam_userid.png b/.github/readme/imgs/plugin_steam_userid.png
new file mode 100644
index 00000000000..30ede9680f5
Binary files /dev/null and b/.github/readme/imgs/plugin_steam_userid.png differ
diff --git a/.github/readme/imgs/plugin_steam_webtoken.png b/.github/readme/imgs/plugin_steam_webtoken.png
new file mode 100644
index 00000000000..63e83717084
Binary files /dev/null and b/.github/readme/imgs/plugin_steam_webtoken.png differ
diff --git a/.github/readme/imgs/setup_personal_repository.dark.png b/.github/readme/imgs/setup_personal_repository.dark.png
new file mode 100644
index 00000000000..8cd8fbcf982
Binary files /dev/null and b/.github/readme/imgs/setup_personal_repository.dark.png differ
diff --git a/.github/readme/imgs/setup_personal_repository.light.png b/.github/readme/imgs/setup_personal_repository.light.png
new file mode 100644
index 00000000000..53558cae449
Binary files /dev/null and b/.github/readme/imgs/setup_personal_repository.light.png differ
diff --git a/.github/readme/imgs/setup_personal_repository.png b/.github/readme/imgs/setup_personal_repository.png
deleted file mode 100644
index 88d74873f0a..00000000000
Binary files a/.github/readme/imgs/setup_personal_repository.png and /dev/null differ
diff --git a/.github/readme/imgs/setup_personal_token.dark.png b/.github/readme/imgs/setup_personal_token.dark.png
new file mode 100644
index 00000000000..8c35dba2b60
Binary files /dev/null and b/.github/readme/imgs/setup_personal_token.dark.png differ
diff --git a/.github/readme/imgs/setup_personal_token.light.png b/.github/readme/imgs/setup_personal_token.light.png
new file mode 100644
index 00000000000..155692c6556
Binary files /dev/null and b/.github/readme/imgs/setup_personal_token.light.png differ
diff --git a/.github/readme/imgs/setup_personal_token.png b/.github/readme/imgs/setup_personal_token.png
deleted file mode 100644
index 728f21437c8..00000000000
Binary files a/.github/readme/imgs/setup_personal_token.png and /dev/null differ
diff --git a/.github/readme/imgs/setup_private_contributions.dark.png b/.github/readme/imgs/setup_private_contributions.dark.png
new file mode 100644
index 00000000000..060db6a6240
Binary files /dev/null and b/.github/readme/imgs/setup_private_contributions.dark.png differ
diff --git a/.github/readme/imgs/setup_private_contributions.light.png b/.github/readme/imgs/setup_private_contributions.light.png
new file mode 100644
index 00000000000..11672045d19
Binary files /dev/null and b/.github/readme/imgs/setup_private_contributions.light.png differ
diff --git a/.github/readme/imgs/setup_private_contributions.png b/.github/readme/imgs/setup_private_contributions.png
deleted file mode 100644
index c4e9fca607c..00000000000
Binary files a/.github/readme/imgs/setup_private_contributions.png and /dev/null differ
diff --git a/.github/readme/imgs/setup_public_membership_org.dark.png b/.github/readme/imgs/setup_public_membership_org.dark.png
new file mode 100644
index 00000000000..7de5390c0b5
Binary files /dev/null and b/.github/readme/imgs/setup_public_membership_org.dark.png differ
diff --git a/.github/readme/imgs/setup_public_membership_org.light.png b/.github/readme/imgs/setup_public_membership_org.light.png
new file mode 100644
index 00000000000..33cad56573d
Binary files /dev/null and b/.github/readme/imgs/setup_public_membership_org.light.png differ
diff --git a/.github/readme/imgs/setup_public_membership_org.png b/.github/readme/imgs/setup_public_membership_org.png
deleted file mode 100644
index 9de7bb0fe3d..00000000000
Binary files a/.github/readme/imgs/setup_public_membership_org.png and /dev/null differ
diff --git a/.github/readme/imgs/setup_repository_secret.dark.png b/.github/readme/imgs/setup_repository_secret.dark.png
new file mode 100644
index 00000000000..c1bab0ef916
Binary files /dev/null and b/.github/readme/imgs/setup_repository_secret.dark.png differ
diff --git a/.github/readme/imgs/setup_repository_secret.light.png b/.github/readme/imgs/setup_repository_secret.light.png
new file mode 100644
index 00000000000..f4d54fcfbdd
Binary files /dev/null and b/.github/readme/imgs/setup_repository_secret.light.png differ
diff --git a/.github/readme/imgs/setup_repository_secret.png b/.github/readme/imgs/setup_repository_secret.png
deleted file mode 100644
index 3cafae20f7a..00000000000
Binary files a/.github/readme/imgs/setup_repository_secret.png and /dev/null differ
diff --git a/.github/readme/imgs/setup_selfhosted_create.dark.png b/.github/readme/imgs/setup_selfhosted_create.dark.png
new file mode 100644
index 00000000000..154bd3384b2
Binary files /dev/null and b/.github/readme/imgs/setup_selfhosted_create.dark.png differ
diff --git a/.github/readme/imgs/setup_selfhosted_create.light.png b/.github/readme/imgs/setup_selfhosted_create.light.png
new file mode 100644
index 00000000000..36237004d75
Binary files /dev/null and b/.github/readme/imgs/setup_selfhosted_create.light.png differ
diff --git a/.github/readme/imgs/setup_token_org_read_scope.dark.png b/.github/readme/imgs/setup_token_org_read_scope.dark.png
new file mode 100644
index 00000000000..948bffffdb8
Binary files /dev/null and b/.github/readme/imgs/setup_token_org_read_scope.dark.png differ
diff --git a/.github/readme/imgs/setup_token_org_read_scope.light.png b/.github/readme/imgs/setup_token_org_read_scope.light.png
new file mode 100644
index 00000000000..b66178eddcc
Binary files /dev/null and b/.github/readme/imgs/setup_token_org_read_scope.light.png differ
diff --git a/.github/readme/imgs/setup_token_org_read_scope.png b/.github/readme/imgs/setup_token_org_read_scope.png
deleted file mode 100644
index ab92ac512ee..00000000000
Binary files a/.github/readme/imgs/setup_token_org_read_scope.png and /dev/null differ
diff --git a/.github/readme/imgs/setup_token_repo_scope.dark.png b/.github/readme/imgs/setup_token_repo_scope.dark.png
new file mode 100644
index 00000000000..9cbfa379c40
Binary files /dev/null and b/.github/readme/imgs/setup_token_repo_scope.dark.png differ
diff --git a/.github/readme/imgs/setup_token_repo_scope.light.png b/.github/readme/imgs/setup_token_repo_scope.light.png
new file mode 100644
index 00000000000..8a1e92872fd
Binary files /dev/null and b/.github/readme/imgs/setup_token_repo_scope.light.png differ
diff --git a/.github/readme/imgs/setup_token_repo_scope.png b/.github/readme/imgs/setup_token_repo_scope.png
deleted file mode 100644
index 7c839852179..00000000000
Binary files a/.github/readme/imgs/setup_token_repo_scope.png and /dev/null differ
diff --git a/.github/readme/imgs/setup_workflow_permissions.dark.png b/.github/readme/imgs/setup_workflow_permissions.dark.png
new file mode 100644
index 00000000000..3d8fcf91f8a
Binary files /dev/null and b/.github/readme/imgs/setup_workflow_permissions.dark.png differ
diff --git a/.github/readme/imgs/setup_workflow_permissions.light.png b/.github/readme/imgs/setup_workflow_permissions.light.png
new file mode 100644
index 00000000000..841a968c09b
Binary files /dev/null and b/.github/readme/imgs/setup_workflow_permissions.light.png differ
diff --git a/.github/readme/partials/documentation/compatibility.md b/.github/readme/partials/documentation/compatibility.md
index ced494528e0..da009dfa73d 100644
--- a/.github/readme/partials/documentation/compatibility.md
+++ b/.github/readme/partials/documentation/compatibility.md
@@ -5,45 +5,51 @@
Template/Plugin
đī¸
đ
-
đˇī¸
+
đˇī¸
+
â¨
+
đ¨âđģ
đ
đ
đ
-
đĄ
+
đĄ
đ
đī¸
đ
-
đ§âđ¤âđ§
-
â¨
-
đī¸
-
â
-
đ°
+
đ§âđ¤âđ§
+
đ
+
đ
+
đ
+
đŦ
+
đĢ
+
đ
đ
đŠ
-
đŦ
-
đ
-
đ¨âđģ
+
đ°
đ§Ž
-
đ
+
â
đĢ
+
đī¸
đ
-
đ
-
đĢ
-
đ
-
âąī¸
-
đŧ
-
đ¨ī¸
-
đ¸
+
đ
+
đ
+
âąī¸
đ¤
+
đ¨ī¸
+
đ¸
+
đŧ
âī¸
đŧ
-
â°
+
â°
+
đŗī¸
+
đšī¸
đ Classic template
âī¸
âī¸
âī¸
+
âī¸
+
âī¸
âī¸
âī¸
â
@@ -52,36 +58,40 @@
âī¸
âī¸
âī¸
-
âī¸
-
âī¸
-
âī¸
-
âī¸
+
âī¸
+
âī¸
+
âī¸
+
âī¸
+
âī¸
+
âī¸
âī¸
âī¸
-
âī¸
-
âī¸
-
âī¸
+
âī¸
âī¸
-
âī¸
+
âī¸
âī¸
+
âī¸
âī¸
-
âī¸
-
âī¸
âī¸
+
âī¸
âī¸
-
âī¸
+
âī¸
âī¸
âī¸
-
âī¸
+
âī¸
âī¸
âī¸
âī¸
+
âī¸
+
âī¸
đ Repository template
âī¸
â
âī¸
+
âī¸
+
âī¸
â
â
âī¸
@@ -90,36 +100,40 @@
âī¸
â
âī¸
-
âī¸
-
âī¸
-
â
-
âī¸
+
â
+
âī¸
+
â
+
â
+
â
+
â
â
â
-
â
-
â
-
âī¸
+
âī¸
âī¸
-
â
+
â
â
+
âī¸
âī¸
-
âī¸
-
â
â
+
â
âī¸
-
â
+
â
â
â
-
â
+
â
âī¸
âī¸
â
+
â
+
â
đ Terminal template
âī¸
âī¸
âī¸
+
â
+
âī¸
â
â
â
@@ -128,36 +142,40 @@
â
â
â
-
â
-
â
-
â
-
â
+
â
+
â
+
â
+
â
+
â
+
â
â
â
-
â
-
â
-
âī¸
+
â
âī¸
-
â
+
â
âī¸
+
â
â
-
â
-
â
â
+
â
âī¸
-
â
+
â
â
â
-
â
+
â
â
â
â
+
â
+
â
đ Markdown template
âī¸
â
â
+
â
+
â
âī¸
â
â
@@ -166,77 +184,85 @@
â
â
â
-
â
-
â
-
â
-
âī¸
+
â
+
â
+
â
+
â
+
â
+
â
â
â
-
â
-
â
-
â
+
âī¸
â
-
â
+
â
â
+
â
â
-
â
-
â
â
+
â
â
-
â
+
âī¸
â
â
-
âī¸
+
â
âī¸
âī¸
â
+
â
+
â
-
+
Mode/Plugin
đī¸
đ
-
đˇī¸
+
đˇī¸
+
â¨
+
đ¨âđģ
đ
đ
đ
-
đĄ
+
đĄ
đ
đī¸
đ
-
đ§âđ¤âđ§
-
â¨
-
đī¸
-
â
-
đ°
+
đ§âđ¤âđ§
+
đ
+
đ
+
đ
+
đŦ
+
đĢ
+
đ
đ
đŠ
-
đŦ
-
đ
-
đ¨âđģ
+
đ°
đ§Ž
-
đ
+
â
đĢ
+
đī¸
đ
-
đ
-
đĢ
-
đ
-
âąī¸
-
đŧ
-
đ¨ī¸
-
đ¸
+
đ
+
đ
+
âąī¸
đ¤
+
đ¨ī¸
+
đ¸
+
đŧ
âī¸
đŧ
-
â°
+
â°
+
đŗī¸
+
đšī¸
đ¤ User
âī¸
âī¸
âī¸
+
âī¸
+
âī¸
âī¸
âī¸
â
@@ -245,36 +271,40 @@
âī¸
âī¸
âī¸
-
âī¸
-
âī¸
-
âī¸
-
âī¸
+
âī¸
+
âī¸
+
âī¸
+
âī¸
+
âī¸
+
âī¸
âī¸
âī¸
-
âī¸
-
âī¸
-
âī¸
+
âī¸
âī¸
-
âī¸
+
âī¸
âī¸
+
âī¸
âī¸
-
âī¸
-
âī¸
âī¸
+
âī¸
âī¸
-
âī¸
+
âī¸
âī¸
âī¸
-
âī¸
+
âī¸
âī¸
âī¸
âī¸
+
âī¸
+
âī¸
đĨ Organization
âī¸
â
âī¸
+
âī¸
+
âī¸
â
â
â
@@ -283,36 +313,40 @@
âī¸
â
âī¸
-
âī¸
-
âī¸
-
âī¸
-
âī¸
+
âī¸
+
âī¸
+
âī¸
+
â
+
â
+
â
âī¸
â
-
â
-
â
-
âī¸
+
âī¸
âī¸
-
âī¸
+
âī¸
â
+
âī¸
âī¸
-
âī¸
-
â
â
+
â
âī¸
-
âī¸
+
âī¸
âī¸
âī¸
-
âī¸
+
âī¸
âī¸
âī¸
â
+
â
+
âī¸
đ Repository
âī¸
â
âī¸
+
âī¸
+
âī¸
â
â
âī¸
@@ -321,30 +355,32 @@
âī¸
â
âī¸
-
âī¸
-
âī¸
-
â
-
âī¸
+
â
+
âī¸
+
â
+
â
+
â
+
â
â
â
-
â
-
â
-
âī¸
+
âī¸
âī¸
-
â
+
â
â
+
âī¸
âī¸
-
âī¸
-
â
â
+
â
âī¸
-
â
+
â
â
â
-
â
+
â
âī¸
âī¸
â
+
â
+
â
diff --git a/.github/readme/partials/documentation/inspirations.md b/.github/readme/partials/documentation/inspirations.md
index a70aa1157ea..050b86da438 100644
--- a/.github/readme/partials/documentation/inspirations.md
+++ b/.github/readme/partials/documentation/inspirations.md
@@ -7,4 +7,5 @@
* [jamesgeorge007/github-activity-readme](https://github.com/jamesgeorge007/github-activity-readme)
* [vvo/sourcekarma](https://github.com/vvo/sourcekarma)
* [ryo-ma/github-profile-trophy](https://github.com/ryo-ma/github-profile-trophy)
-* [teoxoy/profile-readme-stats](https://github.com/teoxoy/profile-readme-stats)
\ No newline at end of file
+* [teoxoy/profile-readme-stats](https://github.com/teoxoy/profile-readme-stats)
+* [dyatko/worldstar](https://github.com/dyatko/worldstar)
\ No newline at end of file
diff --git a/.github/readme/partials/documentation/organizations.md b/.github/readme/partials/documentation/organizations.md
index e47ecdd8399..3c49742ffcf 100644
--- a/.github/readme/partials/documentation/organizations.md
+++ b/.github/readme/partials/documentation/organizations.md
@@ -8,7 +8,8 @@ While *metrics* targets mainly user accounts, it's possible to render metrics fo
Setup is mostly the same as for user accounts. A personal access token from an user account is required excepted that `read:org` scope must be enabled, **whether you are member of the target organization or not**.
-
+
+
`user` option will need to be set to organization name instead.
@@ -31,9 +32,10 @@ It is possible to host workflows in the `.github` repository of organizations, a
## *ī¸âŖ Organizations memberships for user accounts
By default, GitHub only display public memberships.
-Membership visibility canbe managed in the `People` tab of your organization.
+Membership visibility can be managed in the `People` tab of your organization.
-
+
+
> â ī¸ Seeing your organization membership in your profile **does not** mean that it is visible from other users! You can check this by viewing your profile in an private browser window.
diff --git a/.github/readme/partials/documentation/selfhosted.md b/.github/readme/partials/documentation/selfhosted.md
new file mode 100644
index 00000000000..395f9d76761
--- /dev/null
+++ b/.github/readme/partials/documentation/selfhosted.md
@@ -0,0 +1,37 @@
+# đ Run metrics on self-hosted runners
+
+## 0ī¸ Setup a self-hosted runner
+
+Learn more about hosting runners on [GitHub documentation](https://docs.github.com/en/actions/hosting-your-own-runners).
+
+> â ī¸ To run *metrics* on a self-hosted runner, the following dependencies needs to be installed on runner:
+> - [docker](https://www.docker.com)
+> - [jq](https://github.com/stedolan/jq)
+
+Go to repository settings, and select `Runners` under the `Actions` side tab.
+
+
+
+
+> â ī¸ Working user **must be able** to run docker. If *metrics* is run with an unprivileged user, ensure it can open `/var/run/docker.sock`
+>
+> Use the following workaround when receiving the following error: `dial unix /var/run/docker.sock: connect: permission denied`
+> ```bash
+> usermod -a -G docker $USER
+> chown root:docker /var/run/docker.sock
+> ```
+
+## 1ī¸ Update workflows to use self-hosted runners
+
+To run *metrics* action on a self-hosted runner, uses `runs-on: self-hosted`.
+
+*Example: render metrics for `github` organization*
+```yaml
+runs-on: self-hosted
+steps:
+ - uses: lowlighter/metrics@latest
+ with:
+ token: ${{ secrets.METRICS_TOKEN }}
+```
+
+> đĄ To easily debug workflow errors, use [`debug: yes`](https://github.com/lowlighter/metrics/tree/master/source/plugins/core#debug) option
diff --git a/.github/readme/partials/documentation/setup.md b/.github/readme/partials/documentation/setup.md
index efe78983696..c031cd8ed9e 100644
--- a/.github/readme/partials/documentation/setup.md
+++ b/.github/readme/partials/documentation/setup.md
@@ -11,11 +11,12 @@ There are several ways to setup metrics, each having its advantages and disadvan
* â Limited features *(compute-intensive features are disabled)*
* [đī¸ Deploying a web instance *(~20 min)*](/.github/readme/partials/documentation/setup/web.md)
* âī¸ Create another shared instance
- * â Requires some sysadmin knowlegde
+ * â Requires some sysadmin knowledge
* [đŗ Using command line with docker *(~2 min)*](/.github/readme/partials/documentation/setup/docker.md)
* âī¸ Suited for one-time rendering
* [đ§ Local setup for development *(~20 min)*](/.github/readme/partials/documentation/setup/local.md)
Additional resources for setup:
* [đĻ Configure metrics for organizations](/.github/readme/partials/documentation/organizations.md)
+* [đ Run metrics on self-hosted runners](/.github/readme/partials/documentation/selfhosted.md)
* [đ§° Template/Plugin compatibility matrix](/.github/readme/partials/documentation/compatibility.md)
\ No newline at end of file
diff --git a/.github/readme/partials/documentation/setup/action.md b/.github/readme/partials/documentation/setup/action.md
index 9f5425150ee..320134ce2be 100644
--- a/.github/readme/partials/documentation/setup/action.md
+++ b/.github/readme/partials/documentation/setup/action.md
@@ -6,32 +6,40 @@ Setup a GitHub Action which runs periodically and pushes generated images to a r
Create a repository with the same name as your GitHub login (if it doesn't exist).
-
+
+
Its `README.md` will be displayed on your user profile:
-
+
+
## 1ī¸ Create a GitHub personal token
+> đĄ A GitHub personal token is required since this action will fetch data that cannot be accessed through repository-scoped tokens (like [`${{ secrets.GITHUB_TOKEN }}` or `${{ github.token }}`](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret)) such as users, organizations, issues, pull requests, comments, commits, activity, etc.
+
From the `Developer settings` of your account settings, select `Personal access tokens` to create a new token.
No scopes are required, but additional one may be required depending on which features will be used. Each plugin documentation enumerates which scopes are required to make it work.
-A a general rule, the following scopes may be required:
+As a general rule, the following scopes may be required:
- `public_repo` for some plugins
- `read:org` for all organizations related metrics
- `repo` for all private repositories related metrics
- `read:user` for some private repositories related metrics
+- `read:packages` for some packages related metrics
+- `read:project` for some projects related metrics
- `gist` for publishing renders to gists instead of a repository
> đĄ For security reasons, it is advised to always use the least amount of scopes. It is possible to prevent security issues by [forking this repository](https://github.com/lowlighter/metrics/fork) and using it in your workflow instead (more information available in step 3)
-
+
+
A scope-less token can still display private contributions by enabling `Include private contributions on my profile` in account settings:
-
+
+
When a plugin has not enough scopes to operate (and `plugins_errors_fatal` is disabled), an error will be reported in the rendering like below:
@@ -41,7 +49,8 @@ When a plugin has not enough scopes to operate (and `plugins_errors_fatal` is di
Go to the `Settings` of your repository and to create a new secret and paste your freshly generated GitHub token there.
-
+
+
## 3ī¸ Setup GitHub Action workflow
@@ -59,15 +68,22 @@ on:
jobs:
github-metrics:
runs-on: ubuntu-latest
+ environment:
+ name: production
+ permissions:
+ contents: write
steps:
- uses: lowlighter/metrics@latest
with:
token: ${{ secrets.METRICS_TOKEN }}
```
-Rendered metrics will be committed to repository on each run.
+Default output action is to commit rendered metrics to target repository on each run.
+
+
+
-
+Use [`output_action`](/source/plugins/core/README.md#-configuring-output-action) to change this behaviour to use either pull requests, gists or manually handle renders.
### 3ī¸.1ī¸ Choosing between `@latest`, `@master`/`@main`, a fork or a pinned version
@@ -113,7 +129,14 @@ Update profile `README.md` to include rendered image (filename may differ if `fi
*Example: add rendered image with html for more customization*
```html
-
+
+```
+
+*Example: add rendered image and prevent GitHub from auto linking to the image*
+```html
+
+
+
```
*Example: add rendered image when using `config_display: columns`*
diff --git a/.github/readme/partials/documentation/setup/docker.md b/.github/readme/partials/documentation/setup/docker.md
index 3260e0adb9e..07e568ea18a 100644
--- a/.github/readme/partials/documentation/setup/docker.md
+++ b/.github/readme/partials/documentation/setup/docker.md
@@ -2,13 +2,17 @@
## 0ī¸ Prepare your machine
-A server with a recent version of [docker](https://www.docker.com/) is required.
+A machine with a recent version of [docker](https://www.docker.com/) is required.
## 1ī¸ Run docker image
The command to use is similar to the following:
```shell
-docker run --env INPUT_TOKEN=**** --env INPUT_USER=user --volume=/tmp:/renders ghcr.io/lowlighter/metrics:latest
+docker run --rm --env INPUT_TOKEN=**** --env INPUT_USER=user --volume=/tmp:/renders ghcr.io/lowlighter/metrics:latest
```
To pass parameters, pass environment variable with the same name as the corresponding action option but in uppercase and prefixed with `INPUT_`.
+
+Generated files will be created in the mounted `/renders` directory.
+
+> đĄ When running *metrics* with docker, [`output_action`](/source/plugins/core/README.md#-configuring-output-action) will automatically default to `none` instead. To use a different output action, both `GITHUB_REPOSITORY` (notice the absence of `INPUT_` prefix) and `INPUT_COMMITTER_TOKEN` (with sufficient permissions) environment variables must be set.
diff --git a/.github/readme/partials/documentation/setup/local.md b/.github/readme/partials/documentation/setup/local.md
index a530c1dc518..06a7f996a61 100644
--- a/.github/readme/partials/documentation/setup/local.md
+++ b/.github/readme/partials/documentation/setup/local.md
@@ -1,7 +1,5 @@
# đ§ Local setup for development (~20 min)
-*Documentation not available yet*
-
## 0ī¸ Prepare your machine
A machine with a recent version of [NodeJS](https://nodejs.org) is required (see used version in [Dockerfile](/Dockerfile#L1-L2)).
diff --git a/.github/readme/partials/documentation/setup/shared.md b/.github/readme/partials/documentation/setup/shared.md
index 701b688f132..10072894def 100644
--- a/.github/readme/partials/documentation/setup/shared.md
+++ b/.github/readme/partials/documentation/setup/shared.md
@@ -6,11 +6,13 @@ For convenience, a free shared instance is available at [metrics.lecoq.io](https
Create a repository with the same name as your GitHub login (if it doesn't exist).
-
+
+
Its `README.md` will be displayed on your user profile:
-
+
+
## 2ī¸ Configure *metrics*
@@ -18,6 +20,8 @@ Visit [metrics.lecoq.io](https://metrics.lecoq.io) and start playing around!
> â ī¸ Some plugins are not available on the web instance. Consider using [GitHub action](https://github.com/marketplace/actions/metrics-embed) to enjoy all features!
+> âšī¸ [metrics.lecoq.io](https://metrics.lecoq.io) always run on [latest release](https://github.com/lowlighter/metrics/releases/latest). To test upcoming releases, use [beta-metrics.lecoq.io](https://beta-metrics.lecoq.io), which always run on `@master` instead.
+


diff --git a/.github/readme/partials/documentation/setup/web.md b/.github/readme/partials/documentation/setup/web.md
index 25669bd7508..4c6c4f6a80a 100644
--- a/.github/readme/partials/documentation/setup/web.md
+++ b/.github/readme/partials/documentation/setup/web.md
@@ -14,7 +14,8 @@ No additional scopes are required.
> đĄ For security reasons, it is advised to use a scope-less token for web instances.
-
+
+
## 2ī¸ Configure *metrics*
@@ -33,7 +34,7 @@ Edit `settings.json` to configure your instance.
}
```
-### 2ī¸.1ī¸ Restricting access to your web instance
+### 2ī¸.1ī¸ Restricting access to your web instance
If you intend to make your web instance public, it is advised to restrict access using an access list or rate-limiting it.
@@ -71,10 +72,6 @@ Configuration file also contains settings about enabled templates, plugins and f
"by": "me",
"link": "https://user.me",
},
- "extras": {
- "css": true,
- "features": false
- },
"plugins": {
"isocalendar":{
"enabled": false
@@ -83,7 +80,47 @@ Configuration file also contains settings about enabled templates, plugins and f
}
```
-> â ī¸ Extras features **should not** be enabled on a public server, most of these are compute-intensive and some of some even allow remote code execution! Use with caution
+### 2ī¸.3ī¸ Extra features configuration
+
+Extra features are a way to enable and control advanced functionality in plugins, which are usually either CPU or API intensive, require access to filesystem or binaries, and sometimes also allow remote code execution.
+
+> â ī¸ Please understand that some extras features may compromise container integrity or security.
+> Never use them if outside a containerized or development environment!
+>
+> Use at your own risk, *metrics* and its authors cannot be held responsible for any damage caused.
+
+*Example: extra features server configuration*
+```javascript
+{
+ "extras": {
+ "features": [
+ "metrics.setup.community.templates",
+ "metrics.api.github.overuse",
+ "metrics.cpu.overuse",
+ "metrics.run.puppeteer.scrapping",
+ ]
+ }
+}
+```
+
+The following extra features are supported:
+| Extra feature identifier | Description |
+| ----------------------------------- | --------------------------------------------------------- |
+| `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.api.*` | Allow use of external API requests |
+| `metrics.cpu.overuse` | Allow CPU intensive requests |
+| `metrics.run.tempdir` | Allow access to temporary directory (including I/O) |
+| `metrics.run.git` | Allow to run git |
+| `metrics.run.licensed` | Allow to run licensed |
+| â ī¸ `metrics.run.user.cmd` | Allow to run ANY command by user (USE WITH CAUTION! May result in token leaks by malicious users) |
+| `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.*` | Allow use of specified dependency (CONSULT RESPECTIVE DEPENDENCY CVE FIRST) |
+
+If a plugin is used without sufficient permissions, it will result in an error.
## 3ī¸ Start docker container
@@ -103,7 +140,7 @@ PUBLISHED_PORT=80
And start the container using the following command:
```shell
-docker run --entrypoint="" -p=127.0.0.1:$PUBLISHED_PORT:$SERVICE_PORT --volume=$SETTINGS:/metrics/settings.json ghcr.io/lowlighter/metrics:$VERSION npm start
+docker run --rm --entrypoint="" -p=127.0.0.1:$PUBLISHED_PORT:$SERVICE_PORT --volume=$SETTINGS:/metrics/settings.json ghcr.io/lowlighter/metrics:$VERSION npm start
```
## 4ī¸ Add images to your profile `README.md`
@@ -117,7 +154,7 @@ Update profile `README.md` to include rendered image.
### 4ī¸.1ī¸ URL parameters syntax
-The GitHub action and the web instance uses the same engine behing the hood.
+The GitHub action and the web instance uses the same engine behind the hood.
It is actually possible to generate image directly from url without passing by the web ui by knowing how to pass parameters.
diff --git a/.github/readme/partials/license.md b/.github/readme/partials/license.md
index f55be9f450c..59eec4c0403 100644
--- a/.github/readme/partials/license.md
+++ b/.github/readme/partials/license.md
@@ -6,4 +6,3 @@ Copyright (c) 2020-present lowlighter
```

-
diff --git a/.github/readme/partials/templated/README.md b/.github/readme/partials/templated/README.md
index bc3308e598f..e75f478bcdc 100644
--- a/.github/readme/partials/templated/README.md
+++ b/.github/readme/partials/templated/README.md
@@ -1,4 +1,4 @@
-# đ Metrics [](https://www.producthunt.com/posts/github-metrics?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-github-metrics)
+# đ Metrics [](https://www.producthunt.com/posts/github-metrics?utm_source=badge-featured&utm_medium=badge&utm_source=badge-github-metrics)
[](https://github.com/lowlighter/metrics/actions/workflows/ci.yml)
diff --git a/.github/readme/partials/templated/documentation.md b/.github/readme/partials/templated/documentation.md
index 50b9cfc78d3..f0ab9b43631 100644
--- a/.github/readme/partials/templated/documentation.md
+++ b/.github/readme/partials/templated/documentation.md
@@ -1,7 +1,7 @@
# đ Documentation
<% if (/[.]0-beta$/.test(packaged.version)) { %>
-> *â ī¸ This is the documentation of **v<%= packaged.version.replace(/[.]0-beta$/, "") %>-beta** (`@master`/`@main` branches) which includes [unreleased features](https://github.com/lowlighter/metrics/compare/latest...master). See documentation for [**v<%= (Number(packaged.version.replace(/[.]0-beta$/, ""))-0.01).toFixed(2).replace(/[.]0/, ".") %>** (`@latest` branch) here](https://github.com/lowlighter/metrics/blob/latest/README.md).*
+> *â ī¸ This is the documentation of **v<%= packaged.version.replace(/[.]0-beta$/, "") %>-beta** (`@master`/`@main` branches) which includes [unreleased features](https://github.com/lowlighter/metrics/compare/latest...master) planned for next release. See documentation for current released version [**v<%= (Number(packaged.version.replace(/[.]0-beta$/, ""))-0.01).toFixed(2).replace(/[.]0/, ".") %>** (`@latest` branch) here](https://github.com/lowlighter/metrics/blob/latest/README.md).*
<% } %>
<% for (const partial of ["documentation/setup", "templated/templates", "templated/plugins", "documentation/contributing"]) { %>
diff --git a/.github/readme/partials/templated/introduction.md b/.github/readme/partials/templated/introduction.md
index 89473dbe35e..57a0e56ffa3 100644
--- a/.github/readme/partials/templated/introduction.md
+++ b/.github/readme/partials/templated/introduction.md
@@ -10,7 +10,7 @@ Generate metrics that can be embedded everywhere, including your GitHub profile
<% {
let cell = 0
- const elements = Object.entries(plugins).filter(([key, value]) => (value)&&(!["base", "core"].includes(key)&&(value.category !== "community")))
+ const elements = Object.entries(plugins).filter(([key, value]) => (value)&&(!["base", "core"].includes(key)&&(value.category !== "community")&&(!value.deprecation)))
-%>
@@ -36,13 +36,30 @@ Generate metrics that can be embedded everywhere, including your GitHub profile
<% } %> <%- readme.demo.replace(/ i ? ` ${x}` : x)?.join("\n") %>
<% if (cell === "odd") {
-%>
-<% }}} -%>
+<% }}}} {
+ let cell = 0
+ const elements = Object.entries(plugins).filter(([key, value]) => (value.category === "community")&&(!value.deprecation))
+ if (elements.length%2)
+ elements.push(["", {readme:{demo:`
+<% }}}} %><%# -%>
<% {
let cell = 0
const elements = Object.entries(templates).filter(([key, value]) => (value)&&(!["community"].includes(key)))
@@ -79,19 +96,24 @@ Generate metrics that can be embedded everywhere, including your GitHub profile