Add support for full year display in isocalendar (#10)
* fix(inst): base=0 flag combined with other base.part flags is now correctly handled * ref(plugins): Space adjustements in plugins code * feat(plugins/isocalendar): Add support for full year * feat(repo): Update package.json * fix(plugins/isocalendar): Isocalendar first row sometimes displayed 6 days instead of 7
This commit is contained in:
@@ -194,6 +194,12 @@ inputs:
|
|||||||
description: Display an isometric view of your commits calendar, along with a few additional stats
|
description: Display an isometric view of your commits calendar, along with a few additional stats
|
||||||
default: no
|
default: no
|
||||||
|
|
||||||
|
# Duration shown by isometric calendar plugin
|
||||||
|
# Supported values are "half-year" and "full-year"
|
||||||
|
plugin_isocalendar_duration:
|
||||||
|
description: Set isometric calendar duration
|
||||||
|
default: half-year
|
||||||
|
|
||||||
# Gists plugins
|
# Gists plugins
|
||||||
# Display gists metrics
|
# Display gists metrics
|
||||||
plugin_gists:
|
plugin_gists:
|
||||||
|
|||||||
24
action/dist/index.js
vendored
24
action/dist/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -110,6 +110,11 @@
|
|||||||
console.log(`Posts provider | ${q["posts.provider"]}`)
|
console.log(`Posts provider | ${q["posts.provider"]}`)
|
||||||
console.log(`Posts limit | ${q["posts.limit"]}`)
|
console.log(`Posts limit | ${q["posts.limit"]}`)
|
||||||
}
|
}
|
||||||
|
//Isocalendar
|
||||||
|
if (plugins.isocalendar.enabled) {
|
||||||
|
q["isocalendar.duration"] = core.getInput("plugin_isocalendar_duration") ?? "half-year"
|
||||||
|
console.log(`Isocalendar duration| ${q["isocalendar.duration"]}`)
|
||||||
|
}
|
||||||
|
|
||||||
//Repositories to use
|
//Repositories to use
|
||||||
const repositories = Number(core.getInput("repositories")) || 100
|
const repositories = Number(core.getInput("repositories")) || 100
|
||||||
|
|||||||
215
package-lock.json
generated
215
package-lock.json
generated
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "metrics",
|
"name": "metrics",
|
||||||
"version": "2.4.0",
|
"version": "2.5.0",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -38,19 +38,19 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@babel/core": {
|
"@babel/core": {
|
||||||
"version": "7.12.3",
|
"version": "7.12.9",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.3.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.9.tgz",
|
||||||
"integrity": "sha512-0qXcZYKZp3/6N2jKYVxZv0aNCsxTSVCiK72DTiTYZAu7sjg73W0/aynWjMbiGd87EQL4WyA8reiJVh92AVla9g==",
|
"integrity": "sha512-gTXYh3M5wb7FRXQy+FErKFAv90BnlOuNn1QkCK2lREoPAjrQCO49+HVSrFoe5uakFAF5eenS75KbO2vQiLrTMQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/code-frame": "^7.10.4",
|
"@babel/code-frame": "^7.10.4",
|
||||||
"@babel/generator": "^7.12.1",
|
"@babel/generator": "^7.12.5",
|
||||||
"@babel/helper-module-transforms": "^7.12.1",
|
"@babel/helper-module-transforms": "^7.12.1",
|
||||||
"@babel/helpers": "^7.12.1",
|
"@babel/helpers": "^7.12.5",
|
||||||
"@babel/parser": "^7.12.3",
|
"@babel/parser": "^7.12.7",
|
||||||
"@babel/template": "^7.10.4",
|
"@babel/template": "^7.12.7",
|
||||||
"@babel/traverse": "^7.12.1",
|
"@babel/traverse": "^7.12.9",
|
||||||
"@babel/types": "^7.12.1",
|
"@babel/types": "^7.12.7",
|
||||||
"convert-source-map": "^1.7.0",
|
"convert-source-map": "^1.7.0",
|
||||||
"debug": "^4.1.0",
|
"debug": "^4.1.0",
|
||||||
"gensync": "^1.0.0-beta.1",
|
"gensync": "^1.0.0-beta.1",
|
||||||
@@ -93,12 +93,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@babel/helper-member-expression-to-functions": {
|
"@babel/helper-member-expression-to-functions": {
|
||||||
"version": "7.12.1",
|
"version": "7.12.7",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.1.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.7.tgz",
|
||||||
"integrity": "sha512-k0CIe3tXUKTRSoEx1LQEPFU9vRQfqHtl+kf8eNnDqb4AUJEy5pz6aIiog+YWtVm2jpggjS1laH68bPsR+KWWPQ==",
|
"integrity": "sha512-DCsuPyeWxeHgh1Dus7APn7iza42i/qXqiFPWyBDdOFtvS581JQePsc1F/nD+fHrcswhLlRc2UpYS1NwERxZhHw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/types": "^7.12.1"
|
"@babel/types": "^7.12.7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@babel/helper-module-imports": {
|
"@babel/helper-module-imports": {
|
||||||
@@ -128,12 +128,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@babel/helper-optimise-call-expression": {
|
"@babel/helper-optimise-call-expression": {
|
||||||
"version": "7.10.4",
|
"version": "7.12.7",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.7.tgz",
|
||||||
"integrity": "sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg==",
|
"integrity": "sha512-I5xc9oSJ2h59OwyUqjv95HRyzxj53DAubUERgQMrpcCEYQyToeHA+NEcUEsVWB4j53RDeskeBJ0SgRAYHDBckw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/types": "^7.10.4"
|
"@babel/types": "^7.12.7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@babel/helper-replace-supers": {
|
"@babel/helper-replace-supers": {
|
||||||
@@ -195,43 +195,43 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@babel/parser": {
|
"@babel/parser": {
|
||||||
"version": "7.12.5",
|
"version": "7.12.7",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.5.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.7.tgz",
|
||||||
"integrity": "sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ==",
|
"integrity": "sha512-oWR02Ubp4xTLCAqPRiNIuMVgNO5Aif/xpXtabhzW2HWUD47XJsAB4Zd/Rg30+XeQA3juXigV7hlquOTmwqLiwg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@babel/template": {
|
"@babel/template": {
|
||||||
"version": "7.10.4",
|
"version": "7.12.7",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.7.tgz",
|
||||||
"integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==",
|
"integrity": "sha512-GkDzmHS6GV7ZeXfJZ0tLRBhZcMcY0/Lnb+eEbXDBfCAcZCjrZKe6p3J4we/D24O9Y8enxWAg1cWwof59yLh2ow==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/code-frame": "^7.10.4",
|
"@babel/code-frame": "^7.10.4",
|
||||||
"@babel/parser": "^7.10.4",
|
"@babel/parser": "^7.12.7",
|
||||||
"@babel/types": "^7.10.4"
|
"@babel/types": "^7.12.7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@babel/traverse": {
|
"@babel/traverse": {
|
||||||
"version": "7.12.5",
|
"version": "7.12.9",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.5.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.9.tgz",
|
||||||
"integrity": "sha512-xa15FbQnias7z9a62LwYAA5SZZPkHIXpd42C6uW68o8uTuua96FHZy1y61Va5P/i83FAAcMpW8+A/QayntzuqA==",
|
"integrity": "sha512-iX9ajqnLdoU1s1nHt36JDI9KG4k+vmI8WgjK5d+aDTwQbL2fUnzedNedssA645Ede3PM2ma1n8Q4h2ohwXgMXw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/code-frame": "^7.10.4",
|
"@babel/code-frame": "^7.10.4",
|
||||||
"@babel/generator": "^7.12.5",
|
"@babel/generator": "^7.12.5",
|
||||||
"@babel/helper-function-name": "^7.10.4",
|
"@babel/helper-function-name": "^7.10.4",
|
||||||
"@babel/helper-split-export-declaration": "^7.11.0",
|
"@babel/helper-split-export-declaration": "^7.11.0",
|
||||||
"@babel/parser": "^7.12.5",
|
"@babel/parser": "^7.12.7",
|
||||||
"@babel/types": "^7.12.5",
|
"@babel/types": "^7.12.7",
|
||||||
"debug": "^4.1.0",
|
"debug": "^4.1.0",
|
||||||
"globals": "^11.1.0",
|
"globals": "^11.1.0",
|
||||||
"lodash": "^4.17.19"
|
"lodash": "^4.17.19"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@babel/types": {
|
"@babel/types": {
|
||||||
"version": "7.12.6",
|
"version": "7.12.7",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.7.tgz",
|
||||||
"integrity": "sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==",
|
"integrity": "sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/helper-validator-identifier": "^7.10.4",
|
"@babel/helper-validator-identifier": "^7.10.4",
|
||||||
@@ -347,9 +347,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "14.14.6",
|
"version": "14.14.10",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.6.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.10.tgz",
|
||||||
"integrity": "sha512-6QlRuqsQ/Ox/aJEQWBEJG7A9+u7oSYl3mem/K8IzxXG/kAGbV1YPD9Bg9Zw3vyxC/YP+zONKwy8hGkSt1jxFMw=="
|
"integrity": "sha512-J32dgx2hw8vXrSbu4ZlVhn1Nm3GbeCFNw2FWL8S5QKucHGY0cyNwjdQdO+KMBZ4wpmC7KhLCiNsdk1RFRIYUQQ=="
|
||||||
},
|
},
|
||||||
"@types/q": {
|
"@types/q": {
|
||||||
"version": "1.5.4",
|
"version": "1.5.4",
|
||||||
@@ -718,9 +718,9 @@
|
|||||||
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
|
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
|
||||||
},
|
},
|
||||||
"base64-js": {
|
"base64-js": {
|
||||||
"version": "1.3.1",
|
"version": "1.5.1",
|
||||||
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
|
||||||
"integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g=="
|
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
|
||||||
},
|
},
|
||||||
"before-after-hook": {
|
"before-after-hook": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
@@ -1029,26 +1029,26 @@
|
|||||||
"integrity": "sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ=="
|
"integrity": "sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ=="
|
||||||
},
|
},
|
||||||
"csso": {
|
"csso": {
|
||||||
"version": "4.1.0",
|
"version": "4.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/csso/-/csso-4.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz",
|
||||||
"integrity": "sha512-h+6w/W1WqXaJA4tb1dk7r5tVbOm97MsKxzwnvOR04UQ6GILroryjMWu3pmCCtL2mLaEStQ0fZgeGiy99mo7iyg==",
|
"integrity": "sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"css-tree": "^1.0.0"
|
"css-tree": "^1.1.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"css-tree": {
|
"css-tree": {
|
||||||
"version": "1.0.0",
|
"version": "1.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.2.tgz",
|
||||||
"integrity": "sha512-CdVYz/Yuqw0VdKhXPBIgi8DO3NicJVYZNWeX9XcIuSp9ZoFT5IcleVRW07O5rMjdcx1mb+MEJPknTTEW7DdsYw==",
|
"integrity": "sha512-wCoWush5Aeo48GLhfHPbmvZs59Z+M7k5+B1xDnXbdWNcEF423DoFdqSWE0PM5aNk5nI5cp1q7ms36zGApY/sKQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"mdn-data": "2.0.12",
|
"mdn-data": "2.0.14",
|
||||||
"source-map": "^0.6.1"
|
"source-map": "^0.6.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mdn-data": {
|
"mdn-data": {
|
||||||
"version": "2.0.12",
|
"version": "2.0.14",
|
||||||
"resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.12.tgz",
|
"resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz",
|
||||||
"integrity": "sha512-ULbAlgzVb8IqZ0Hsxm6hHSlQl3Jckst2YEQS7fODu9ilNWy2LvcoSY7TRFIktABP2mdppBioc66va90T+NUs8Q=="
|
"integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow=="
|
||||||
},
|
},
|
||||||
"source-map": {
|
"source-map": {
|
||||||
"version": "0.6.1",
|
"version": "0.6.1",
|
||||||
@@ -1058,9 +1058,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"debug": {
|
"debug": {
|
||||||
"version": "4.2.0",
|
"version": "4.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
|
||||||
"integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==",
|
"integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"ms": "2.1.2"
|
"ms": "2.1.2"
|
||||||
}
|
}
|
||||||
@@ -1113,9 +1113,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"devtools-protocol": {
|
"devtools-protocol": {
|
||||||
"version": "0.0.809251",
|
"version": "0.0.818844",
|
||||||
"resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.809251.tgz",
|
"resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.818844.tgz",
|
||||||
"integrity": "sha512-pf+2OY6ghMDPjKkzSWxHMq+McD+9Ojmq5XVRYpv/kPd9sTMQxzEt21592a31API8qRjro0iYYOc3ag46qF/1FA=="
|
"integrity": "sha512-AD1hi7iVJ8OD0aMLQU5VK0XH9LDlA1+BcPIgrAxPfaibx2DbWucuyOhc4oyQCbnvDDO68nN6/LcKfqTP343Jjg=="
|
||||||
},
|
},
|
||||||
"dom-serializer": {
|
"dom-serializer": {
|
||||||
"version": "0.2.2",
|
"version": "0.2.2",
|
||||||
@@ -1285,9 +1285,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"express-rate-limit": {
|
"express-rate-limit": {
|
||||||
"version": "5.1.3",
|
"version": "5.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-5.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-5.2.3.tgz",
|
||||||
"integrity": "sha512-TINcxve5510pXj4n9/1AMupkj3iWxl3JuZaWhCdYDlZeoCPqweGZrxbrlqTCFb1CT5wli7s8e2SH/Qz2c9GorA=="
|
"integrity": "sha512-cjQH+oDrEPXxc569XvxhHC6QXqJiuBT6BhZ70X3bdAImcnHnTNMVuMAJaT0TXPoRiEErUrVPRcOTpZpM36VbOQ=="
|
||||||
},
|
},
|
||||||
"extract-zip": {
|
"extract-zip": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
@@ -1595,11 +1595,6 @@
|
|||||||
"number-is-nan": "^1.0.0"
|
"number-is-nan": "^1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"is-negative-zero": {
|
|
||||||
"version": "2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.0.tgz",
|
|
||||||
"integrity": "sha1-lVOxIbD6wohp2p7UWeIMdUN4hGE="
|
|
||||||
},
|
|
||||||
"is-plain-object": {
|
"is-plain-object": {
|
||||||
"version": "5.0.0",
|
"version": "5.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
|
||||||
@@ -1804,9 +1799,9 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"debug": {
|
"debug": {
|
||||||
"version": "3.2.6",
|
"version": "3.2.7",
|
||||||
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
|
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
|
||||||
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
|
"integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"ms": "^2.1.1"
|
"ms": "^2.1.1"
|
||||||
@@ -2097,12 +2092,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"puppeteer": {
|
"puppeteer": {
|
||||||
"version": "5.4.1",
|
"version": "5.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-5.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-5.5.0.tgz",
|
||||||
"integrity": "sha512-8u6r9tFm3gtMylU4uCry1W/CeAA8uczKMONvGvivkTsGqKA7iB7DWO2CBFYlB9GY6/IEoq9vkI5slJWzUBkwNw==",
|
"integrity": "sha512-OM8ZvTXAhfgFA7wBIIGlPQzvyEETzDjeRa4mZRCRHxYL+GNH5WAuYUQdja3rpWZvkX/JKqmuVgbsxDNsDFjMEg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"debug": "^4.1.0",
|
"debug": "^4.1.0",
|
||||||
"devtools-protocol": "0.0.809251",
|
"devtools-protocol": "0.0.818844",
|
||||||
"extract-zip": "^2.0.0",
|
"extract-zip": "^2.0.0",
|
||||||
"https-proxy-agent": "^4.0.0",
|
"https-proxy-agent": "^4.0.0",
|
||||||
"node-fetch": "^2.6.1",
|
"node-fetch": "^2.6.1",
|
||||||
@@ -2186,12 +2181,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"resolve": {
|
"resolve": {
|
||||||
"version": "1.18.1",
|
"version": "1.19.0",
|
||||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.18.1.tgz",
|
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz",
|
||||||
"integrity": "sha512-lDfCPaMKfOJXjy0dPayzPdF1phampNWr3qFCjAu+rw/qbQmr5jWH5xN2hwh9QKfw9E5v4hwV7A+jrCmL8yjjqA==",
|
"integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"is-core-module": "^2.0.0",
|
"is-core-module": "^2.1.0",
|
||||||
"path-parse": "^1.0.6"
|
"path-parse": "^1.0.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2334,63 +2329,21 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"string.prototype.trimend": {
|
"string.prototype.trimend": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz",
|
||||||
"integrity": "sha512-8oAG/hi14Z4nOVP0z6mdiVZ/wqjDtWSLygMigTzAb+7aPEDTleeFf+WrF+alzecxIRkckkJVn+dTlwzJXORATw==",
|
"integrity": "sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"define-properties": "^1.1.3",
|
"call-bind": "^1.0.0",
|
||||||
"es-abstract": "^1.18.0-next.1"
|
"define-properties": "^1.1.3"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"es-abstract": {
|
|
||||||
"version": "1.18.0-next.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz",
|
|
||||||
"integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==",
|
|
||||||
"requires": {
|
|
||||||
"es-to-primitive": "^1.2.1",
|
|
||||||
"function-bind": "^1.1.1",
|
|
||||||
"has": "^1.0.3",
|
|
||||||
"has-symbols": "^1.0.1",
|
|
||||||
"is-callable": "^1.2.2",
|
|
||||||
"is-negative-zero": "^2.0.0",
|
|
||||||
"is-regex": "^1.1.1",
|
|
||||||
"object-inspect": "^1.8.0",
|
|
||||||
"object-keys": "^1.1.1",
|
|
||||||
"object.assign": "^4.1.1",
|
|
||||||
"string.prototype.trimend": "^1.0.1",
|
|
||||||
"string.prototype.trimstart": "^1.0.1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"string.prototype.trimstart": {
|
"string.prototype.trimstart": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz",
|
||||||
"integrity": "sha512-7F6CdBTl5zyu30BJFdzSTlSlLPwODC23Od+iLoVH8X6+3fvDPPuBVVj9iaB1GOsSTSIgVfsfm27R2FGrAPznWg==",
|
"integrity": "sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"define-properties": "^1.1.3",
|
"call-bind": "^1.0.0",
|
||||||
"es-abstract": "^1.18.0-next.1"
|
"define-properties": "^1.1.3"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"es-abstract": {
|
|
||||||
"version": "1.18.0-next.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz",
|
|
||||||
"integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==",
|
|
||||||
"requires": {
|
|
||||||
"es-to-primitive": "^1.2.1",
|
|
||||||
"function-bind": "^1.1.1",
|
|
||||||
"has": "^1.0.3",
|
|
||||||
"has-symbols": "^1.0.1",
|
|
||||||
"is-callable": "^1.2.2",
|
|
||||||
"is-negative-zero": "^2.0.0",
|
|
||||||
"is-regex": "^1.1.1",
|
|
||||||
"object-inspect": "^1.8.0",
|
|
||||||
"object-keys": "^1.1.1",
|
|
||||||
"object.assign": "^4.1.1",
|
|
||||||
"string.prototype.trimend": "^1.0.1",
|
|
||||||
"string.prototype.trimstart": "^1.0.1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"string_decoder": {
|
"string_decoder": {
|
||||||
@@ -2605,9 +2558,9 @@
|
|||||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
|
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
|
||||||
},
|
},
|
||||||
"ws": {
|
"ws": {
|
||||||
"version": "7.3.1",
|
"version": "7.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/ws/-/ws-7.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/ws/-/ws-7.4.0.tgz",
|
||||||
"integrity": "sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA=="
|
"integrity": "sha512-kyFwXuV/5ymf+IXhS6f0+eAFvydbaBW3zjpT6hUdAh/hbVjTIB5EHBGi0bPoCLSK2wcuz3BrEkB9LrYv1Nm4NQ=="
|
||||||
},
|
},
|
||||||
"yallist": {
|
"yallist": {
|
||||||
"version": "3.1.1",
|
"version": "3.1.1",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "metrics",
|
"name": "metrics",
|
||||||
"version": "2.4.0",
|
"version": "2.5.0",
|
||||||
"description": "Generate an user's GitHub metrics as SVG image format to embed somewhere else",
|
"description": "Generate an user's GitHub metrics as SVG image format to embed somewhere else",
|
||||||
"main": "index.mjs",
|
"main": "index.mjs",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -29,11 +29,11 @@
|
|||||||
"compression": "^1.7.4",
|
"compression": "^1.7.4",
|
||||||
"ejs": "^3.1.5",
|
"ejs": "^3.1.5",
|
||||||
"express": "^4.17.1",
|
"express": "^4.17.1",
|
||||||
"express-rate-limit": "^5.1.3",
|
"express-rate-limit": "^5.2.3",
|
||||||
"image-to-base64": "^2.1.1",
|
"image-to-base64": "^2.1.1",
|
||||||
"memory-cache": "^0.2.0",
|
"memory-cache": "^0.2.0",
|
||||||
"prismjs": "^1.22.0",
|
"prismjs": "^1.22.0",
|
||||||
"puppeteer": "^5.4.1",
|
"puppeteer": "^5.5.0",
|
||||||
"svgo": "^1.3.2",
|
"svgo": "^1.3.2",
|
||||||
"vue": "^2.6.12",
|
"vue": "^2.6.12",
|
||||||
"vue-prism-component": "^1.2.0"
|
"vue-prism-component": "^1.2.0"
|
||||||
|
|||||||
@@ -27,9 +27,9 @@
|
|||||||
|
|
||||||
//Base parts
|
//Base parts
|
||||||
if (("base" in q)&&(!q.base))
|
if (("base" in q)&&(!q.base))
|
||||||
conf.settings.plugins.base.parts.map(part => q[`base.${part}`] = false)
|
conf.settings.plugins.base.parts.map(part => !(`base.${part}` in q) ? q[`base.${part}`] = false : false)
|
||||||
for (const part of conf.settings.plugins.base.parts)
|
for (const part of conf.settings.plugins.base.parts)
|
||||||
data.base[part] = (`base.${part}` in q) ? !!q[`base.${part}`] : true
|
data.base[part] = !!q[`base.${part}`]
|
||||||
|
|
||||||
//Placeholder
|
//Placeholder
|
||||||
if (login === "placeholder")
|
if (login === "placeholder")
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
//Check if plugin is enabled and requirements are met
|
//Check if plugin is enabled and requirements are met
|
||||||
if ((!enabled)||(!q.gists))
|
if ((!enabled)||(!q.gists))
|
||||||
return null
|
return null
|
||||||
|
|
||||||
//Retrieve contribution calendar from graphql api
|
//Retrieve contribution calendar from graphql api
|
||||||
const {user:{gists}} = await graphql(`
|
const {user:{gists}} = await graphql(`
|
||||||
query Gists {
|
query Gists {
|
||||||
@@ -27,7 +26,6 @@
|
|||||||
}
|
}
|
||||||
`
|
`
|
||||||
)
|
)
|
||||||
|
|
||||||
//Iterate through gists
|
//Iterate through gists
|
||||||
let stargazers = 0, forks = 0, comments = 0
|
let stargazers = 0, forks = 0, comments = 0
|
||||||
for (const gist of gists.nodes) {
|
for (const gist of gists.nodes) {
|
||||||
@@ -39,7 +37,6 @@
|
|||||||
forks += gist.forks.totalCount
|
forks += gist.forks.totalCount
|
||||||
comments += gist.comments.totalCount
|
comments += gist.comments.totalCount
|
||||||
}
|
}
|
||||||
|
|
||||||
//Results
|
//Results
|
||||||
return {totalCount:gists.totalCount, stargazers, forks, comments}
|
return {totalCount:gists.totalCount, stargazers, forks, comments}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,11 +5,14 @@
|
|||||||
//Check if plugin is enabled and requirements are met
|
//Check if plugin is enabled and requirements are met
|
||||||
if ((!enabled)||(!q.isocalendar))
|
if ((!enabled)||(!q.isocalendar))
|
||||||
return null
|
return null
|
||||||
//Compute start day (need to start on monday to ensure last row is complete)
|
//Parameters override
|
||||||
const from = new Date(Date.now()-180*24*60*60*1000)
|
let {"isocalendar.duration":duration = "half-year"} = q
|
||||||
const day = from.getDay()||7
|
//Duration in days
|
||||||
if (day !== 1)
|
const leap = (new Date(new Date().getYear(), 1, 29).getDate() === 29)
|
||||||
from.setHours(-24*(day-1))
|
const days = {"half-year":180, "full-year":365 + leap}[duration] ?? 180
|
||||||
|
//Compute start day (to ensure last row is complete, we'll retrieve one more week that we'll shift later)
|
||||||
|
const from = new Date(Date.now()-days*24*60*60*1000)
|
||||||
|
from.setHours(-24*7)
|
||||||
//Retrieve contribution calendar from graphql api
|
//Retrieve contribution calendar from graphql api
|
||||||
const {user:{calendar:{contributionCalendar:calendar}}} = await graphql(`
|
const {user:{calendar:{contributionCalendar:calendar}}} = await graphql(`
|
||||||
query Calendar {
|
query Calendar {
|
||||||
@@ -29,6 +32,7 @@
|
|||||||
}
|
}
|
||||||
`
|
`
|
||||||
)
|
)
|
||||||
|
calendar.weeks.shift()
|
||||||
//Compute the highest contributions in a day, streaks and average commits per day
|
//Compute the highest contributions in a day, streaks and average commits per day
|
||||||
let max = 0, streak = {max:0, current:0}, values = [], average = 0
|
let max = 0, streak = {max:0, current:0}, values = [], average = 0
|
||||||
for (const week of calendar.weeks) {
|
for (const week of calendar.weeks) {
|
||||||
@@ -44,7 +48,7 @@
|
|||||||
const size = 6
|
const size = 6
|
||||||
let i = 0, j = 0
|
let i = 0, j = 0
|
||||||
let svg = `
|
let svg = `
|
||||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" style="margin-top: -52px;" viewBox="0,0 480,170">
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" style="margin-top: -52px;" viewBox="0,0 480,${duration === "full-year" ? 270 : 170}">
|
||||||
${[1, 2].map(k => `
|
${[1, 2].map(k => `
|
||||||
<filter id="brightness${k}">
|
<filter id="brightness${k}">
|
||||||
<feComponentTransfer>
|
<feComponentTransfer>
|
||||||
@@ -73,7 +77,7 @@
|
|||||||
}
|
}
|
||||||
svg += `</g></svg>`
|
svg += `</g></svg>`
|
||||||
//Results
|
//Results
|
||||||
return {streak, max, average, svg}
|
return {streak, max, average, svg, duration}
|
||||||
}
|
}
|
||||||
//Handle errors
|
//Handle errors
|
||||||
catch (error) {
|
catch (error) {
|
||||||
|
|||||||
@@ -23,14 +23,12 @@
|
|||||||
//Check if plugin is enabled and requirements are met
|
//Check if plugin is enabled and requirements are met
|
||||||
if ((!enabled)||(!q.music))
|
if ((!enabled)||(!q.music))
|
||||||
return null
|
return null
|
||||||
|
|
||||||
//Initialization
|
//Initialization
|
||||||
const raw = {
|
const raw = {
|
||||||
get provider() { return providers[provider]?.name ?? "" },
|
get provider() { return providers[provider]?.name ?? "" },
|
||||||
get mode() { return modes[mode] ?? "Unconfigured music plugin"},
|
get mode() { return modes[mode] ?? "Unconfigured music plugin"},
|
||||||
}
|
}
|
||||||
let tracks = null
|
let tracks = null
|
||||||
|
|
||||||
//Parameters override
|
//Parameters override
|
||||||
let {"music.provider":provider = "", "music.mode":mode = "", "music.playlist":playlist = null, "music.limit":limit = 4} = q
|
let {"music.provider":provider = "", "music.mode":mode = "", "music.playlist":playlist = null, "music.limit":limit = 4} = q
|
||||||
//Auto-guess parameters
|
//Auto-guess parameters
|
||||||
@@ -57,7 +55,6 @@
|
|||||||
}
|
}
|
||||||
//Limit
|
//Limit
|
||||||
limit = Math.max(1, Math.min(100, Number(limit)))
|
limit = Math.max(1, Math.min(100, Number(limit)))
|
||||||
|
|
||||||
//Handle mode
|
//Handle mode
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
//Playlist mode
|
//Playlist mode
|
||||||
|
|||||||
@@ -5,13 +5,11 @@
|
|||||||
//Check if plugin is enabled and requirements are met
|
//Check if plugin is enabled and requirements are met
|
||||||
if ((!enabled)||(!q.posts))
|
if ((!enabled)||(!q.posts))
|
||||||
return null
|
return null
|
||||||
|
|
||||||
//Parameters override
|
//Parameters override
|
||||||
const login = data.user.login
|
const login = data.user.login
|
||||||
let {"posts.source":source = "", "posts.limit":limit = 4} = q
|
let {"posts.source":source = "", "posts.limit":limit = 4} = q
|
||||||
//Limit
|
//Limit
|
||||||
limit = Math.max(1, Math.min(30, Number(limit)))
|
limit = Math.max(1, Math.min(30, Number(limit)))
|
||||||
|
|
||||||
//Retrieve posts
|
//Retrieve posts
|
||||||
let posts = null
|
let posts = null
|
||||||
switch (source) {
|
switch (source) {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
+ (!!computed.plugins.languages)*96
|
+ (!!computed.plugins.languages)*96
|
||||||
+ (!!computed.plugins.music)*64 + (computed.plugins.music ? computed.plugins.music.tracks ? 14+Math.max(0, computed.plugins.music.tracks.length-1)*36 : 0 : 0)
|
+ (!!computed.plugins.music)*64 + (computed.plugins.music ? computed.plugins.music.tracks ? 14+Math.max(0, computed.plugins.music.tracks.length-1)*36 : 0 : 0)
|
||||||
+ (!!computed.plugins.posts)*64 + (computed.plugins.posts ? computed.plugins.posts.posts ? Math.max(0, computed.plugins.posts.posts.length)*40 : 0 : 0)
|
+ (!!computed.plugins.posts)*64 + (computed.plugins.posts ? computed.plugins.posts.posts ? Math.max(0, computed.plugins.posts.posts.length)*40 : 0 : 0)
|
||||||
+ (!!computed.plugins.isocalendar)*192
|
+ (!!computed.plugins.isocalendar)*192 + (computed.plugins.isocalendar ? computed.plugins.isocalendar.duration === 'full-year' ? 100 : 0 : 0)
|
||||||
+ (!!computed.plugins.gists)*68
|
+ (!!computed.plugins.gists)*68
|
||||||
+ Math.max(0, (((!!base.metadata)+(!!base.header)+((!!base.activity)||(!!base.community))+(!!base.repositories)+((!!computed.plugins.habits))+(!!computed.plugins.pagespeed)+(!!computed.plugins.languages)+(!!computed.plugins.music)+(!!computed.plugins.posts)+(!!computed.plugins.isocalendar)+(!!computed.plugins.gists))-1))*4
|
+ Math.max(0, (((!!base.metadata)+(!!base.header)+((!!base.activity)||(!!base.community))+(!!base.repositories)+((!!computed.plugins.habits))+(!!computed.plugins.pagespeed)+(!!computed.plugins.languages)+(!!computed.plugins.music)+(!!computed.plugins.posts)+(!!computed.plugins.isocalendar)+(!!computed.plugins.gists))-1))*4
|
||||||
%>">
|
%>">
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
Reference in New Issue
Block a user