mirror of
https://github.com/PretendoNetwork/website.git
synced 2026-04-18 15:07:21 -05:00
Moved from Trello to GitHub porjects
This commit is contained in:
parent
50daf65329
commit
80bc0f01c0
|
|
@ -1,44 +0,0 @@
|
|||
{
|
||||
"boards": {
|
||||
"gb7qURRJ": {
|
||||
"github_links": [
|
||||
{
|
||||
"display": "Account server repo",
|
||||
"url": "https://github.com/PretendoNetwork/account"
|
||||
}
|
||||
]
|
||||
},
|
||||
"G54H0wtc": {
|
||||
"github_links": [
|
||||
{
|
||||
"display": "Juxtaposition repo",
|
||||
"url": "https://github.com/PretendoNetwork/juxt-web"
|
||||
}
|
||||
]
|
||||
},
|
||||
"lmAbWUyn": {
|
||||
"github_links": [
|
||||
{
|
||||
"display": "BOSS repo",
|
||||
"url": "https://github.com/PretendoNetwork/BOSS"
|
||||
}
|
||||
]
|
||||
},
|
||||
"LQZftqhE": {
|
||||
"github_links": [
|
||||
{
|
||||
"display": "Super Mario Maker (authentication) repo",
|
||||
"url": "https://github.com/PretendoNetwork/super-mario-maker-authentication"
|
||||
}
|
||||
]
|
||||
},
|
||||
"9frc4r0Q": {
|
||||
"github_links": [
|
||||
{
|
||||
"display": "Website repo",
|
||||
"url": "https://github.com/PretendoNetwork/website"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
203
package-lock.json
generated
203
package-lock.json
generated
|
|
@ -21,6 +21,7 @@
|
|||
"express-locale": "^2.0.0",
|
||||
"fs-extra": "^9.1.0",
|
||||
"got": "^11.8.5",
|
||||
"graphql-request": "^4.3.0",
|
||||
"gray-matter": "^4.0.3",
|
||||
"kaitai-struct": "^0.9.0",
|
||||
"marked": "^4.0.10",
|
||||
|
|
@ -516,6 +517,11 @@
|
|||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/asynckit": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
|
||||
},
|
||||
"node_modules/at-least-node": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz",
|
||||
|
|
@ -998,6 +1004,17 @@
|
|||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/combined-stream": {
|
||||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
|
||||
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
|
||||
"dependencies": {
|
||||
"delayed-stream": "~1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/commander": {
|
||||
"version": "2.20.3",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
|
||||
|
|
@ -1126,6 +1143,14 @@
|
|||
"sha.js": "^2.4.8"
|
||||
}
|
||||
},
|
||||
"node_modules/cross-fetch": {
|
||||
"version": "3.1.5",
|
||||
"resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz",
|
||||
"integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==",
|
||||
"dependencies": {
|
||||
"node-fetch": "2.6.7"
|
||||
}
|
||||
},
|
||||
"node_modules/cross-spawn": {
|
||||
"version": "7.0.3",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
|
||||
|
|
@ -1229,6 +1254,14 @@
|
|||
"resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz",
|
||||
"integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM="
|
||||
},
|
||||
"node_modules/delayed-stream": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
|
||||
"engines": {
|
||||
"node": ">=0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/denque": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/denque/-/denque-2.0.1.tgz",
|
||||
|
|
@ -1793,6 +1826,17 @@
|
|||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/extract-files": {
|
||||
"version": "9.0.0",
|
||||
"resolved": "https://registry.npmjs.org/extract-files/-/extract-files-9.0.0.tgz",
|
||||
"integrity": "sha512-CvdFfHkC95B4bBBk36hcEmvdR2awOdhhVUYH6S/zrVj3477zven/fJMYg7121h4T1xHZC+tetUpubpAhxwI7hQ==",
|
||||
"engines": {
|
||||
"node": "^10.17.0 || ^12.0.0 || >= 13.7.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/jaydenseric"
|
||||
}
|
||||
},
|
||||
"node_modules/fast-deep-equal": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
||||
|
|
@ -1869,6 +1913,19 @@
|
|||
"resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz",
|
||||
"integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k="
|
||||
},
|
||||
"node_modules/form-data": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz",
|
||||
"integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==",
|
||||
"dependencies": {
|
||||
"asynckit": "^0.4.0",
|
||||
"combined-stream": "^1.0.8",
|
||||
"mime-types": "^2.1.12"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/forwarded": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz",
|
||||
|
|
@ -2037,6 +2094,28 @@
|
|||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz",
|
||||
"integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ=="
|
||||
},
|
||||
"node_modules/graphql": {
|
||||
"version": "16.5.0",
|
||||
"resolved": "https://registry.npmjs.org/graphql/-/graphql-16.5.0.tgz",
|
||||
"integrity": "sha512-qbHgh8Ix+j/qY+a/ZcJnFQ+j8ezakqPiHwPiZhV/3PgGlgf96QMBB5/f2rkiC9sgLoy/xvT6TSiaf2nTHJh5iA==",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/graphql-request": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/graphql-request/-/graphql-request-4.3.0.tgz",
|
||||
"integrity": "sha512-2v6hQViJvSsifK606AliqiNiijb1uwWp6Re7o0RTyH+uRTv/u7Uqm2g4Fjq/LgZIzARB38RZEvVBFOQOVdlBow==",
|
||||
"dependencies": {
|
||||
"cross-fetch": "^3.1.5",
|
||||
"extract-files": "^9.0.0",
|
||||
"form-data": "^3.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"graphql": "14 - 16"
|
||||
}
|
||||
},
|
||||
"node_modules/gray-matter": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-4.0.3.tgz",
|
||||
|
|
@ -3089,6 +3168,44 @@
|
|||
"resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz",
|
||||
"integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw=="
|
||||
},
|
||||
"node_modules/node-fetch": {
|
||||
"version": "2.6.7",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
|
||||
"integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
|
||||
"dependencies": {
|
||||
"whatwg-url": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "4.x || >=6.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"encoding": "^0.1.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"encoding": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/node-fetch/node_modules/tr46": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
||||
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
|
||||
},
|
||||
"node_modules/node-fetch/node_modules/webidl-conversions": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
|
||||
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
|
||||
},
|
||||
"node_modules/node-fetch/node_modules/whatwg-url": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
|
||||
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
|
||||
"dependencies": {
|
||||
"tr46": "~0.0.3",
|
||||
"webidl-conversions": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/nodemailer": {
|
||||
"version": "6.7.5",
|
||||
"resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.7.5.tgz",
|
||||
|
|
@ -4895,6 +5012,11 @@
|
|||
"integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==",
|
||||
"dev": true
|
||||
},
|
||||
"asynckit": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
|
||||
},
|
||||
"at-least-node": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz",
|
||||
|
|
@ -5283,6 +5405,14 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"combined-stream": {
|
||||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
|
||||
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
|
||||
"requires": {
|
||||
"delayed-stream": "~1.0.0"
|
||||
}
|
||||
},
|
||||
"commander": {
|
||||
"version": "2.20.3",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
|
||||
|
|
@ -5398,6 +5528,14 @@
|
|||
"sha.js": "^2.4.8"
|
||||
}
|
||||
},
|
||||
"cross-fetch": {
|
||||
"version": "3.1.5",
|
||||
"resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz",
|
||||
"integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==",
|
||||
"requires": {
|
||||
"node-fetch": "2.6.7"
|
||||
}
|
||||
},
|
||||
"cross-spawn": {
|
||||
"version": "7.0.3",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
|
||||
|
|
@ -5479,6 +5617,11 @@
|
|||
"resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz",
|
||||
"integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM="
|
||||
},
|
||||
"delayed-stream": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="
|
||||
},
|
||||
"denque": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/denque/-/denque-2.0.1.tgz",
|
||||
|
|
@ -5932,6 +6075,11 @@
|
|||
"is-extendable": "^0.1.0"
|
||||
}
|
||||
},
|
||||
"extract-files": {
|
||||
"version": "9.0.0",
|
||||
"resolved": "https://registry.npmjs.org/extract-files/-/extract-files-9.0.0.tgz",
|
||||
"integrity": "sha512-CvdFfHkC95B4bBBk36hcEmvdR2awOdhhVUYH6S/zrVj3477zven/fJMYg7121h4T1xHZC+tetUpubpAhxwI7hQ=="
|
||||
},
|
||||
"fast-deep-equal": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
||||
|
|
@ -5999,6 +6147,16 @@
|
|||
"resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz",
|
||||
"integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k="
|
||||
},
|
||||
"form-data": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz",
|
||||
"integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==",
|
||||
"requires": {
|
||||
"asynckit": "^0.4.0",
|
||||
"combined-stream": "^1.0.8",
|
||||
"mime-types": "^2.1.12"
|
||||
}
|
||||
},
|
||||
"forwarded": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz",
|
||||
|
|
@ -6122,6 +6280,22 @@
|
|||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz",
|
||||
"integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ=="
|
||||
},
|
||||
"graphql": {
|
||||
"version": "16.5.0",
|
||||
"resolved": "https://registry.npmjs.org/graphql/-/graphql-16.5.0.tgz",
|
||||
"integrity": "sha512-qbHgh8Ix+j/qY+a/ZcJnFQ+j8ezakqPiHwPiZhV/3PgGlgf96QMBB5/f2rkiC9sgLoy/xvT6TSiaf2nTHJh5iA==",
|
||||
"peer": true
|
||||
},
|
||||
"graphql-request": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/graphql-request/-/graphql-request-4.3.0.tgz",
|
||||
"integrity": "sha512-2v6hQViJvSsifK606AliqiNiijb1uwWp6Re7o0RTyH+uRTv/u7Uqm2g4Fjq/LgZIzARB38RZEvVBFOQOVdlBow==",
|
||||
"requires": {
|
||||
"cross-fetch": "^3.1.5",
|
||||
"extract-files": "^9.0.0",
|
||||
"form-data": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"gray-matter": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-4.0.3.tgz",
|
||||
|
|
@ -6894,6 +7068,35 @@
|
|||
"resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz",
|
||||
"integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw=="
|
||||
},
|
||||
"node-fetch": {
|
||||
"version": "2.6.7",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
|
||||
"integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
|
||||
"requires": {
|
||||
"whatwg-url": "^5.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"tr46": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
||||
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
|
||||
},
|
||||
"webidl-conversions": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
|
||||
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
|
||||
},
|
||||
"whatwg-url": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
|
||||
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
|
||||
"requires": {
|
||||
"tr46": "~0.0.3",
|
||||
"webidl-conversions": "^3.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"nodemailer": {
|
||||
"version": "6.7.5",
|
||||
"resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.7.5.tgz",
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
"express-locale": "^2.0.0",
|
||||
"fs-extra": "^9.1.0",
|
||||
"got": "^11.8.5",
|
||||
"graphql-request": "^4.3.0",
|
||||
"gray-matter": "^4.0.3",
|
||||
"kaitai-struct": "^0.9.0",
|
||||
"marked": "^4.0.10",
|
||||
|
|
@ -36,7 +37,6 @@
|
|||
"morgan": "^1.10.0",
|
||||
"nodemailer": "^6.7.5",
|
||||
"stripe": "^9.9.0",
|
||||
"trello": "^0.11.0",
|
||||
"uuid": "^8.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
|||
|
|
@ -8,12 +8,16 @@ document.querySelectorAll('.feature-list-wrapper').forEach(progressListElement =
|
|||
const allStartedFeatureNodes = progressListElement.querySelectorAll('.feature .ongoing');
|
||||
|
||||
// Use percentage override data attribute if present, else calculate
|
||||
const progressPercentage = Math.round(percentageOverride) || Math.round(Math.min((allDoneFeatureNodes.length + allStartedFeatureNodes.length * 0.5) / allFeatureNodes.length * 100, 100));
|
||||
const progressPercentage = Math.round(percentageOverride) || Math.round(Math.min((allDoneFeatureNodes.length + allStartedFeatureNodes.length * 0.5) / allFeatureNodes.length * 100, 100)) || 0;
|
||||
const remainingPercentage = 100 - progressPercentage;
|
||||
|
||||
// Set inner paragraph
|
||||
progressListElement.querySelectorAll('.percentage-label').forEach(p => {
|
||||
p.innerText = progressPercentage.toString().padStart(2, '0') + '%';
|
||||
if (progressPercentage === 0) {
|
||||
p.innerText = progressPercentage.toString() + '%';
|
||||
} else {
|
||||
p.innerText = progressPercentage.toString().padStart(2, '0') + '%';
|
||||
}
|
||||
});
|
||||
|
||||
// Create chart
|
||||
|
|
|
|||
171
src/cache.js
171
src/cache.js
|
|
@ -1,98 +1,131 @@
|
|||
const Trello = require('trello');
|
||||
const { GraphQLClient, gql } = require('graphql-request');
|
||||
const Stripe = require('stripe');
|
||||
const got = require('got');
|
||||
const config = require('../config.json');
|
||||
|
||||
const trello = new Trello(config.trello.api_key, config.trello.api_token);
|
||||
const graphql = new GraphQLClient('https://api.github.com/graphql', {
|
||||
headers: {
|
||||
Authorization: `bearer ${config.github.graphql_token}`,
|
||||
}
|
||||
});
|
||||
const stripe = new Stripe(config.stripe.secret_key);
|
||||
|
||||
const VALID_LIST_NAMES = ['Not Started', 'Started', 'Completed'];
|
||||
let trelloCache;
|
||||
const getProjectCards = gql`
|
||||
fragment ItemContent on Node {
|
||||
__typename
|
||||
... on DraftIssue {
|
||||
title
|
||||
}
|
||||
... on Issue {
|
||||
title
|
||||
}
|
||||
}
|
||||
|
||||
fragment Itemfields on Node {
|
||||
__typename
|
||||
... on ProjectV2ItemFieldSingleSelectValue {
|
||||
name,
|
||||
field {
|
||||
... on ProjectV2SingleSelectField {
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query getProjectCards($orgName: String!) {
|
||||
organization(login: $orgName) {
|
||||
projectsV2(first: 100) {
|
||||
nodes {
|
||||
repositories(first: 1) {
|
||||
nodes {
|
||||
url
|
||||
}
|
||||
}
|
||||
title
|
||||
items(first: 100) {
|
||||
nodes {
|
||||
id
|
||||
content {
|
||||
...ItemContent
|
||||
}
|
||||
fieldValues(first: 20) {
|
||||
nodes {
|
||||
...Itemfields
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
let githubProjectsCache;
|
||||
let stripeDonationCache;
|
||||
|
||||
async function getTrelloCache() {
|
||||
const available = await trelloAPIAvailable();
|
||||
if (!available) {
|
||||
return trelloCache || {
|
||||
update_time: 0,
|
||||
sections: [{
|
||||
title: 'Upstream API error',
|
||||
id: '',
|
||||
percentage_complete: '',
|
||||
progress: {
|
||||
not_started: [ 'Trello API unavailable' ],
|
||||
started: [],
|
||||
completed: []
|
||||
}
|
||||
}],
|
||||
};
|
||||
async function getGithubProjectsCache() {
|
||||
if (!githubProjectsCache) {
|
||||
githubProjectsCache = await updateGithubProjectsCache();
|
||||
}
|
||||
|
||||
if (!trelloCache) {
|
||||
trelloCache = await updateTrelloCache();
|
||||
if (githubProjectsCache.update_time < Date.now() - (1000 * 60 * 60)) {
|
||||
githubProjectsCache = await updateGithubProjectsCache();
|
||||
}
|
||||
|
||||
if (trelloCache.update_time < Date.now() - (1000 * 60 * 60)) {
|
||||
trelloCache = await updateTrelloCache();
|
||||
}
|
||||
|
||||
return trelloCache;
|
||||
return githubProjectsCache;
|
||||
}
|
||||
|
||||
async function updateTrelloCache() {
|
||||
const progressCache = {
|
||||
function getProgressField(fields) {
|
||||
const found = fields.nodes.find(v => v.field?.name === 'Status');
|
||||
return found?.name ?? undefined;
|
||||
}
|
||||
|
||||
async function updateGithubProjectsCache() {
|
||||
const projectsCacheData = {
|
||||
update_time: Date.now(),
|
||||
sections: []
|
||||
};
|
||||
|
||||
const boards = await trello.getOrgBoards(config.trello.board_name);
|
||||
const data = await graphql.request(getProjectCards, {
|
||||
orgName: 'PretendoNetwork',
|
||||
});
|
||||
|
||||
for (const board of boards) {
|
||||
const meta = {
|
||||
title: '',
|
||||
id: '',
|
||||
percentage_complete: 0,
|
||||
progress: {
|
||||
not_started: [],
|
||||
started: [],
|
||||
completed: []
|
||||
}
|
||||
};
|
||||
const projects = data.organization.projectsV2.nodes;
|
||||
|
||||
meta.title = board.name;
|
||||
meta.id = board.shortLink;
|
||||
|
||||
const lists = await trello.getListsOnBoard(board.id);
|
||||
|
||||
const listNames = lists.map(list => list.name);
|
||||
const hasAllValidLists = listNames.every(name => VALID_LIST_NAMES.includes(name));
|
||||
|
||||
if (!hasAllValidLists) {
|
||||
for (const project of projects) {
|
||||
if (!project.repositories.nodes[0]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const cards = await trello.getCardsOnBoard(board.id);
|
||||
|
||||
for (const card of cards) {
|
||||
const cardList = lists.find(({ id }) => id === card.idList);
|
||||
const listName = cardList.name.toLowerCase().replace(' ', '_');
|
||||
|
||||
if (meta.progress[listName]) {
|
||||
meta.progress[listName].push(card.name);
|
||||
const extractedData = {
|
||||
title: project.title,
|
||||
url: project.repositories.nodes[0]?.url,
|
||||
cards: {
|
||||
done: [],
|
||||
in_progress: [],
|
||||
todo: []
|
||||
}
|
||||
};
|
||||
|
||||
for (const { content, fieldValues } of project.items.nodes) {
|
||||
const progress = getProgressField(fieldValues);
|
||||
|
||||
if (!['DraftIssue'].includes(content.__typename)) {
|
||||
continue; // not a supported card, skip
|
||||
}
|
||||
|
||||
if (!progress) {
|
||||
continue; // entry does not have a status, skip
|
||||
}
|
||||
|
||||
extractedData.cards[progress.toLowerCase().replace(' ', '_')]?.push(content.title);
|
||||
}
|
||||
|
||||
if (meta.progress.not_started.length !== 0 || meta.progress.started.length !== 0 || meta.progress.completed.length !== 0) {
|
||||
progressCache.sections.push(meta);
|
||||
}
|
||||
projectsCacheData.sections.push(extractedData);
|
||||
}
|
||||
|
||||
return progressCache;
|
||||
}
|
||||
|
||||
async function trelloAPIAvailable() {
|
||||
const { status } = await got('https://trello.status.atlassian.com/api/v2/status.json').json();
|
||||
return status.indicator !== 'major' && status.indicator !== 'critical';
|
||||
return projectsCacheData;
|
||||
}
|
||||
|
||||
async function getStripeDonationCache() {
|
||||
|
|
@ -147,6 +180,6 @@ async function updateStripeDonationCache() {
|
|||
}
|
||||
|
||||
module.exports = {
|
||||
getTrelloCache,
|
||||
getGithubProjectsCache,
|
||||
getStripeDonationCache
|
||||
};
|
||||
|
|
|
|||
|
|
@ -40,4 +40,4 @@ async function renderDataMiddleware(request, response, next) {
|
|||
}
|
||||
}
|
||||
|
||||
module.exports = renderDataMiddleware;
|
||||
module.exports = renderDataMiddleware;
|
||||
|
|
@ -1,16 +1,12 @@
|
|||
const { Router } = require('express');
|
||||
const { boards } = require('../../boards/boards.json');
|
||||
const router = new Router();
|
||||
|
||||
const { getTrelloCache } = require('../cache');
|
||||
const { getGithubProjectsCache } = require('../cache');
|
||||
|
||||
router.get('/', async (request, response) => {
|
||||
const renderData = {};
|
||||
|
||||
const renderData = {
|
||||
boards
|
||||
};
|
||||
|
||||
const cache = await getTrelloCache();
|
||||
const githubProjectsCache = await getGithubProjectsCache();
|
||||
|
||||
// Builds the arrays of people for the special thanks section
|
||||
|
||||
|
|
@ -43,37 +39,37 @@ router.get('/', async (request, response) => {
|
|||
percentageSum: 0
|
||||
},
|
||||
percent: 0,
|
||||
progress: {
|
||||
not_started: [],
|
||||
started: [],
|
||||
completed: []
|
||||
cards: {
|
||||
todo: [],
|
||||
in_progress: [],
|
||||
done: []
|
||||
}
|
||||
};
|
||||
|
||||
// Calculates individual completion percentages and progress states
|
||||
cache.sections.forEach(section => {
|
||||
const { not_started, started, completed } = section.progress;
|
||||
githubProjectsCache.sections.forEach(section => {
|
||||
const { todo, in_progress, done } = section.cards;
|
||||
|
||||
// Calculates the completion percentage of the project, and sums it to the total
|
||||
const sectionCompletionPercentage = (completed.length + started.length * 0.5) / (completed.length + started.length + not_started.length);
|
||||
const sectionCompletionPercentage = ((done.length + in_progress.length * 0.5) / (done.length + in_progress.length + todo.length)) || 0;
|
||||
totalProgress._calc.percentageSum += sectionCompletionPercentage;
|
||||
|
||||
const sectionTitle = `${section.title} [${Math.round(sectionCompletionPercentage * 100)}%]`;
|
||||
|
||||
if (completed !== [] && started + not_started === []) {
|
||||
// if all the section tasks have been completed, push to completed
|
||||
totalProgress.progress.completed.push(sectionTitle);
|
||||
} else if (not_started !== [] && started + completed === []) {
|
||||
// if none the section tasks have been completed or started, push to not started
|
||||
totalProgress.progress.not_started.push(sectionTitle);
|
||||
if (done !== [] && in_progress + todo === []) {
|
||||
// if all the section tasks have been done, push to done
|
||||
totalProgress.cards.done.push(sectionTitle);
|
||||
} else if (todo !== [] && in_progress + done === []) {
|
||||
// if none the section tasks have been done or in_progress, push to todo
|
||||
totalProgress.cards.todo.push(sectionTitle);
|
||||
} else {
|
||||
// for all other combos, push to started
|
||||
totalProgress.progress.started.push(sectionTitle);
|
||||
// for all other combos, push to in_progress
|
||||
totalProgress.cards.in_progress.push(sectionTitle);
|
||||
}
|
||||
});
|
||||
|
||||
// Calculates global completion percentage
|
||||
totalProgress.percent = Math.round(totalProgress._calc.percentageSum / cache.sections.length * 100);
|
||||
totalProgress.percent = Math.round(totalProgress._calc.percentageSum / githubProjectsCache.sections.length * 100);
|
||||
|
||||
renderData.featuredFeatureList = totalProgress;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,19 +1,14 @@
|
|||
const { Router } = require('express');
|
||||
const { boards } = require('../../boards/boards.json');
|
||||
const router = new Router();
|
||||
|
||||
const { getTrelloCache, getStripeDonationCache } = require('../cache');
|
||||
const { getGithubProjectsCache, getStripeDonationCache } = require('../cache');
|
||||
|
||||
router.get('/', async (request, response) => {
|
||||
const renderData = {
|
||||
boards
|
||||
progressLists: await getGithubProjectsCache(),
|
||||
donationCache: await getStripeDonationCache()
|
||||
};
|
||||
|
||||
const trelloCache = await getTrelloCache();
|
||||
renderData.progressLists = trelloCache;
|
||||
const stripeDonationCache = await getStripeDonationCache();
|
||||
renderData.donationCache = stripeDonationCache;
|
||||
|
||||
response.render('progress', renderData);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@
|
|||
<h2 class="title">
|
||||
<a href="/progress">{{ localeHelper locale "progress" "title" }}</a>
|
||||
</h2>
|
||||
{{> progress-list data=featuredFeatureList purple=true boards=boards }}
|
||||
{{> progress-list data=featuredFeatureList purple=true }}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
|
|
|||
|
|
@ -10,19 +10,15 @@
|
|||
<div class="core">
|
||||
{{#if data.title}}<div class="progress-title">
|
||||
<h3>{{ data.title }}</h3>
|
||||
{{#if data.id}}{{#if (lookup boards data.id)}}{{#with (lookup boards data.id) as | board |}}
|
||||
{{#each board.github_links}}
|
||||
<div>
|
||||
<a href="{{this.url}}" class="github" target="_blank">
|
||||
<svg data-prefix="fab" data-icon="github" class="svg-inline--fa fa-github fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path fill="currentColor" d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"></path></svg>
|
||||
<span>{{this.display}}</span>
|
||||
</a>
|
||||
</div>
|
||||
{{/each}}
|
||||
{{/with}}{{/if}}{{/if}}
|
||||
<div>
|
||||
<a href="{{this.url}}" class="github" target="_blank">
|
||||
<svg data-prefix="fab" data-icon="github" class="svg-inline--fa fa-github fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path fill="currentColor" d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"></path></svg>
|
||||
<span>GitHub repository</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>{{/if}}
|
||||
<div class="feature-list">
|
||||
{{#each data.progress.completed}}
|
||||
{{#each data.cards.done}}
|
||||
<div class="feature">
|
||||
<div class="custom-checkbox done">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
|
|
@ -34,7 +30,7 @@
|
|||
</div>
|
||||
{{/each}}
|
||||
|
||||
{{#each data.progress.started}}
|
||||
{{#each data.cards.in_progress}}
|
||||
<div class="feature">
|
||||
<div class="custom-checkbox ongoing">
|
||||
<div class="small-dot"></div>
|
||||
|
|
@ -43,7 +39,7 @@
|
|||
</div>
|
||||
{{/each}}
|
||||
|
||||
{{#each data.progress.not_started}}
|
||||
{{#each data.cards.todo}}
|
||||
<div class="feature">
|
||||
<div class="custom-checkbox incomplete"></div>
|
||||
<span>{{ this }}</span>
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
{{#each progressLists.sections}}
|
||||
<div class="purple-card">
|
||||
{{> progress-list data=this boards=@root.boards }}
|
||||
{{> progress-list data=this }}
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user