Compare commits
79 Commits
server-202
...
server-202
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
be6598623e | ||
|
|
1c073cbe7d | ||
|
|
9118ba8d24 | ||
|
|
206a58a731 | ||
|
|
a7d6442abd | ||
|
|
dca72ef5b2 | ||
|
|
b01e15c7dd | ||
|
|
5ccc7bd3bb | ||
|
|
0068bd7138 | ||
|
|
7169bb970a | ||
|
|
3cefd28e0c | ||
|
|
083b36c0a1 | ||
|
|
19b50a66a6 | ||
|
|
5ad1e35101 | ||
|
|
a7e6f15e5e | ||
|
|
c4d7c84523 | ||
|
|
fd4b4c62b6 | ||
|
|
d9a68e35d9 | ||
|
|
9421bc48ca | ||
|
|
355ca66f2f | ||
|
|
b543d075f7 | ||
|
|
c109cf545d | ||
|
|
c2fafc9fac | ||
|
|
3512c89054 | ||
|
|
8f921a4078 | ||
|
|
57ffa7a456 | ||
|
|
cc02b015d3 | ||
|
|
8fa0adb77f | ||
|
|
6153d1f15c | ||
|
|
f2e2b0a197 | ||
|
|
a7db57e03b | ||
|
|
9d46340b3e | ||
|
|
bde30b2589 | ||
|
|
3ea96c31c0 | ||
|
|
8411c34ad4 | ||
|
|
9b1021520d | ||
|
|
c20d0185cd | ||
|
|
385c999d75 | ||
|
|
ecac34c258 | ||
|
|
cab0286608 | ||
|
|
646f7f21db | ||
|
|
8b77c8571c | ||
|
|
6a52e25dee | ||
|
|
a976e265bf | ||
|
|
167e7b14f7 | ||
|
|
7698dabe74 | ||
|
|
7bd1d4fb75 | ||
|
|
d4b7735e86 | ||
|
|
b1c2265230 | ||
|
|
7f4cb41e68 | ||
|
|
61cd2082fc | ||
|
|
a10e93d567 | ||
|
|
31e0254051 | ||
|
|
417a1c3e7e | ||
|
|
6da5a68a97 | ||
|
|
8fe11ad9a5 | ||
|
|
7df0098a64 | ||
|
|
e7968bd6cc | ||
|
|
b8bbe7bba9 | ||
|
|
d253a45070 | ||
|
|
87790f226f | ||
|
|
6f2c0a22e9 | ||
|
|
8e868cda4e | ||
|
|
6ff81c1784 | ||
|
|
c585f4eecc | ||
|
|
11f9735d95 | ||
|
|
520fcda548 | ||
|
|
4c43ffb70a | ||
|
|
5120cc0b79 | ||
|
|
7d02104ddb | ||
|
|
9874db7841 | ||
|
|
164209a4b1 | ||
|
|
72e6421d6a | ||
|
|
1fd625ec7d | ||
|
|
58a1176bbc | ||
|
|
075ead0f9b | ||
|
|
4784a9b553 | ||
|
|
685421f890 | ||
|
|
7749c5e8fe |
@@ -8,5 +8,5 @@ inputs:
|
||||
description: 'The GITHUB_TOKEN secret'
|
||||
required: true
|
||||
runs:
|
||||
using: 'node16'
|
||||
using: 'node20'
|
||||
main: 'index.js'
|
||||
|
||||
203
.github/actions/docusaurus-swizzled-warning/package-lock.json
generated
vendored
203
.github/actions/docusaurus-swizzled-warning/package-lock.json
generated
vendored
@@ -10,7 +10,7 @@
|
||||
"license": "CC0",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.10.1",
|
||||
"@actions/github": "^5.1.1"
|
||||
"@actions/github": "^6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/core": {
|
||||
@@ -23,123 +23,151 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/github": {
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@actions/github/-/github-5.1.1.tgz",
|
||||
"integrity": "sha512-Nk59rMDoJaV+mHCOJPXuvB1zIbomlKS0dmSIqPGxd0enAXBnOfn4VWF+CGtRCwXZG9Epa54tZA7VIRlJDS8A6g==",
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@actions/github/-/github-6.0.0.tgz",
|
||||
"integrity": "sha512-alScpSVnYmjNEXboZjarjukQEzgCRmjMv6Xj47fsdnqGS73bjJNDpiiXmp8jr0UZLdUB6d9jW63IcmddUP+l0g==",
|
||||
"dependencies": {
|
||||
"@actions/http-client": "^2.0.1",
|
||||
"@octokit/core": "^3.6.0",
|
||||
"@octokit/plugin-paginate-rest": "^2.17.0",
|
||||
"@octokit/plugin-rest-endpoint-methods": "^5.13.0"
|
||||
"@actions/http-client": "^2.2.0",
|
||||
"@octokit/core": "^5.0.1",
|
||||
"@octokit/plugin-paginate-rest": "^9.0.0",
|
||||
"@octokit/plugin-rest-endpoint-methods": "^10.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/http-client": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.1.1.tgz",
|
||||
"integrity": "sha512-qhrkRMB40bbbLo7gF+0vu+X+UawOvQQqNAA/5Unx774RS8poaOhThDOG6BGmxvAnxhQnDp2BG/ZUm65xZILTpw==",
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.0.tgz",
|
||||
"integrity": "sha512-q+epW0trjVUUHboliPb4UF9g2msf+w61b32tAkFEwL/IwP0DQWgbCMM0Hbe3e3WXSKz5VcUXbzJQgy8Hkra/Lg==",
|
||||
"dependencies": {
|
||||
"tunnel": "^0.0.6"
|
||||
"tunnel": "^0.0.6",
|
||||
"undici": "^5.25.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@fastify/busboy": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.0.0.tgz",
|
||||
"integrity": "sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/auth-token": {
|
||||
"version": "2.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz",
|
||||
"integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==",
|
||||
"dependencies": {
|
||||
"@octokit/types": "^6.0.3"
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz",
|
||||
"integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==",
|
||||
"engines": {
|
||||
"node": ">= 18"
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/core": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.6.0.tgz",
|
||||
"integrity": "sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==",
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.0.1.tgz",
|
||||
"integrity": "sha512-lyeeeZyESFo+ffI801SaBKmCfsvarO+dgV8/0gD8u1d87clbEdWsP5yC+dSj3zLhb2eIf5SJrn6vDz9AheETHw==",
|
||||
"dependencies": {
|
||||
"@octokit/auth-token": "^2.4.4",
|
||||
"@octokit/graphql": "^4.5.8",
|
||||
"@octokit/request": "^5.6.3",
|
||||
"@octokit/request-error": "^2.0.5",
|
||||
"@octokit/types": "^6.0.3",
|
||||
"@octokit/auth-token": "^4.0.0",
|
||||
"@octokit/graphql": "^7.0.0",
|
||||
"@octokit/request": "^8.0.2",
|
||||
"@octokit/request-error": "^5.0.0",
|
||||
"@octokit/types": "^12.0.0",
|
||||
"before-after-hook": "^2.2.0",
|
||||
"universal-user-agent": "^6.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 18"
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/endpoint": {
|
||||
"version": "6.0.12",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz",
|
||||
"integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==",
|
||||
"version": "9.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.1.tgz",
|
||||
"integrity": "sha512-hRlOKAovtINHQPYHZlfyFwaM8OyetxeoC81lAkBy34uLb8exrZB50SQdeW3EROqiY9G9yxQTpp5OHTV54QD+vA==",
|
||||
"dependencies": {
|
||||
"@octokit/types": "^6.0.3",
|
||||
"@octokit/types": "^12.0.0",
|
||||
"is-plain-object": "^5.0.0",
|
||||
"universal-user-agent": "^6.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 18"
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/graphql": {
|
||||
"version": "4.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz",
|
||||
"integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==",
|
||||
"version": "7.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.0.2.tgz",
|
||||
"integrity": "sha512-OJ2iGMtj5Tg3s6RaXH22cJcxXRi7Y3EBqbHTBRq+PQAqfaS8f/236fUrWhfSn8P4jovyzqucxme7/vWSSZBX2Q==",
|
||||
"dependencies": {
|
||||
"@octokit/request": "^5.6.0",
|
||||
"@octokit/types": "^6.0.3",
|
||||
"@octokit/request": "^8.0.1",
|
||||
"@octokit/types": "^12.0.0",
|
||||
"universal-user-agent": "^6.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 18"
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/openapi-types": {
|
||||
"version": "12.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz",
|
||||
"integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ=="
|
||||
"version": "19.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-19.0.0.tgz",
|
||||
"integrity": "sha512-PclQ6JGMTE9iUStpzMkwLCISFn/wDeRjkZFIKALpvJQNBGwDoYYi2fFvuHwssoQ1rXI5mfh6jgTgWuddeUzfWw=="
|
||||
},
|
||||
"node_modules/@octokit/plugin-paginate-rest": {
|
||||
"version": "2.21.3",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz",
|
||||
"integrity": "sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==",
|
||||
"version": "9.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.0.0.tgz",
|
||||
"integrity": "sha512-oIJzCpttmBTlEhBmRvb+b9rlnGpmFgDtZ0bB6nq39qIod6A5DP+7RkVLMOixIgRCYSHDTeayWqmiJ2SZ6xgfdw==",
|
||||
"dependencies": {
|
||||
"@octokit/types": "^6.40.0"
|
||||
"@octokit/types": "^12.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 18"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@octokit/core": ">=2"
|
||||
"@octokit/core": ">=5"
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/plugin-rest-endpoint-methods": {
|
||||
"version": "5.16.2",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz",
|
||||
"integrity": "sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==",
|
||||
"version": "10.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.0.1.tgz",
|
||||
"integrity": "sha512-fgS6HPkPvJiz8CCliewLyym9qAx0RZ/LKh3sATaPfM41y/O2wQ4Z9MrdYeGPVh04wYmHFmWiGlKPC7jWVtZXQA==",
|
||||
"dependencies": {
|
||||
"@octokit/types": "^6.39.0",
|
||||
"deprecation": "^2.3.1"
|
||||
"@octokit/types": "^12.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 18"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@octokit/core": ">=3"
|
||||
"@octokit/core": ">=5"
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/request": {
|
||||
"version": "5.6.3",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz",
|
||||
"integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==",
|
||||
"version": "8.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.1.4.tgz",
|
||||
"integrity": "sha512-M0aaFfpGPEKrg7XoA/gwgRvc9MSXHRO2Ioki1qrPDbl1e9YhjIwVoHE7HIKmv/m3idzldj//xBujcFNqGX6ENA==",
|
||||
"dependencies": {
|
||||
"@octokit/endpoint": "^6.0.1",
|
||||
"@octokit/request-error": "^2.1.0",
|
||||
"@octokit/types": "^6.16.1",
|
||||
"@octokit/endpoint": "^9.0.0",
|
||||
"@octokit/request-error": "^5.0.0",
|
||||
"@octokit/types": "^12.0.0",
|
||||
"is-plain-object": "^5.0.0",
|
||||
"node-fetch": "^2.6.7",
|
||||
"universal-user-agent": "^6.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 18"
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/request-error": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz",
|
||||
"integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==",
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.0.1.tgz",
|
||||
"integrity": "sha512-X7pnyTMV7MgtGmiXBwmO6M5kIPrntOXdyKZLigNfQWSEQzVxR4a4vo49vJjTWX70mPndj8KhfT4Dx+2Ng3vnBQ==",
|
||||
"dependencies": {
|
||||
"@octokit/types": "^6.0.3",
|
||||
"@octokit/types": "^12.0.0",
|
||||
"deprecation": "^2.0.0",
|
||||
"once": "^1.4.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 18"
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/types": {
|
||||
"version": "6.41.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz",
|
||||
"integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==",
|
||||
"version": "12.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.0.0.tgz",
|
||||
"integrity": "sha512-EzD434aHTFifGudYAygnFlS1Tl6KhbTynEWELQXIbTY8Msvb5nEqTZIm7sbPEt4mQYLZwu3zPKVdeIrw0g7ovg==",
|
||||
"dependencies": {
|
||||
"@octokit/openapi-types": "^12.11.0"
|
||||
"@octokit/openapi-types": "^19.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/before-after-hook": {
|
||||
@@ -160,25 +188,6 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/node-fetch": {
|
||||
"version": "2.6.12",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz",
|
||||
"integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==",
|
||||
"dependencies": {
|
||||
"whatwg-url": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "4.x || >=6.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"encoding": "^0.1.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"encoding": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/once": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
@@ -187,11 +196,6 @@
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"node_modules/tr46": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
||||
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
|
||||
},
|
||||
"node_modules/tunnel": {
|
||||
"version": "0.0.6",
|
||||
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
|
||||
@@ -200,6 +204,17 @@
|
||||
"node": ">=0.6.11 <=0.7.0 || >=0.7.3"
|
||||
}
|
||||
},
|
||||
"node_modules/undici": {
|
||||
"version": "5.26.3",
|
||||
"resolved": "https://registry.npmjs.org/undici/-/undici-5.26.3.tgz",
|
||||
"integrity": "sha512-H7n2zmKEWgOllKkIUkLvFmsJQj062lSm3uA4EYApG8gLuiOM0/go9bIoC3HVaSnfg4xunowDE2i9p8drkXuvDw==",
|
||||
"dependencies": {
|
||||
"@fastify/busboy": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0"
|
||||
}
|
||||
},
|
||||
"node_modules/universal-user-agent": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
|
||||
@@ -213,20 +228,6 @@
|
||||
"uuid": "dist/bin/uuid"
|
||||
}
|
||||
},
|
||||
"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/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/wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
|
||||
@@ -11,6 +11,6 @@
|
||||
"license": "CC0",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.10.1",
|
||||
"@actions/github": "^5.1.1"
|
||||
"@actions/github": "^6.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
5
.github/actions/service-tests/action.yml
vendored
5
.github/actions/service-tests/action.yml
vendored
@@ -16,6 +16,10 @@ inputs:
|
||||
description: 'The SERVICETESTS_OBS_PASS secret'
|
||||
required: false
|
||||
default: ''
|
||||
pepy-key:
|
||||
description: 'The SERVICETESTS_PEPY_KEY secret'
|
||||
required: false
|
||||
default: ''
|
||||
sl-insight-user-uuid:
|
||||
description: 'The SERVICETESTS_SL_INSIGHT_USER_UUID secret'
|
||||
required: false
|
||||
@@ -66,6 +70,7 @@ runs:
|
||||
LIBRARIESIO_TOKENS: '${{ inputs.librariesio-tokens }}'
|
||||
OBS_USER: '${{ inputs.obs-user }}'
|
||||
OBS_PASS: '${{ inputs.obs-pass }}'
|
||||
PEPY_KEY: '${{ inputs.pepy-key }}'
|
||||
SL_INSIGHT_USER_UUID: '${{ inputs.sl-insight-user-uuid }}'
|
||||
SL_INSIGHT_API_TOKEN: '${{ inputs.sl-insight-api-token }}'
|
||||
TWITCH_CLIENT_ID: '${{ inputs.twitch-client-id }}'
|
||||
|
||||
1
.github/workflows/deploy-review-app.yml
vendored
1
.github/workflows/deploy-review-app.yml
vendored
@@ -35,6 +35,7 @@ jobs:
|
||||
LIBRARIESIO_TOKENS=${{ secrets.SERVICETESTS_LIBRARIESIO_TOKENS }}
|
||||
OBS_USER=${{ secrets.SERVICETESTS_OBS_USER }}
|
||||
OBS_PASS=${{ secrets.SERVICETESTS_OBS_PASS }}
|
||||
PEPY_KEY=${{ secrets.SERVICETESTS_PEPY_KEY }}
|
||||
SL_INSIGHT_API_TOKEN=${{ secrets.SERVICETESTS_SL_INSIGHT_USER_UUID }}
|
||||
SL_INSIGHT_USER_UUID=${{ secrets.SERVICETESTS_SL_INSIGHT_API_TOKEN }}
|
||||
TWITCH_CLIENT_ID=${{ secrets.SERVICETESTS_TWITCH_CLIENT_ID }}
|
||||
|
||||
2
.github/workflows/test-bug-run-badge.yml
vendored
2
.github/workflows/test-bug-run-badge.yml
vendored
@@ -49,7 +49,7 @@ jobs:
|
||||
run: npm run badge $TEST_BADGE_LINK
|
||||
|
||||
- name: Add Comment to Issue
|
||||
uses: actions/github-script@v6
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const issueNumber = context.issue.number;
|
||||
|
||||
2
.github/workflows/test-package-cli.yml
vendored
2
.github/workflows/test-package-cli.yml
vendored
@@ -24,7 +24,7 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Node JS ${{ inputs.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
|
||||
|
||||
1
.github/workflows/test-services-20.yml
vendored
1
.github/workflows/test-services-20.yml
vendored
@@ -29,6 +29,7 @@ jobs:
|
||||
librariesio-tokens: '${{ secrets.SERVICETESTS_LIBRARIESIO_TOKENS }}'
|
||||
obs-user: '${{ secrets.SERVICETESTS_OBS_USER }}'
|
||||
obs-pass: '${{ secrets.SERVICETESTS_OBS_PASS }}'
|
||||
pepy-key: '${{ secrets.SERVICETESTS_PEPY_KEY }}'
|
||||
sl-insight-user-uuid: '${{ secrets.SERVICETESTS_SL_INSIGHT_USER_UUID }}'
|
||||
sl-insight-api-token: '${{ secrets.SERVICETESTS_SL_INSIGHT_API_TOKEN }}'
|
||||
twitch-client-id: '${{ secrets.SERVICETESTS_TWITCH_CLIENT_ID }}'
|
||||
|
||||
1
.github/workflows/test-services.yml
vendored
1
.github/workflows/test-services.yml
vendored
@@ -27,6 +27,7 @@ jobs:
|
||||
librariesio-tokens: '${{ secrets.SERVICETESTS_LIBRARIESIO_TOKENS }}'
|
||||
obs-user: '${{ secrets.SERVICETESTS_OBS_USER }}'
|
||||
obs-pass: '${{ secrets.SERVICETESTS_OBS_PASS }}'
|
||||
pepy-key: '${{ secrets.SERVICETESTS_PEPY_KEY }}'
|
||||
sl-insight-user-uuid: '${{ secrets.SERVICETESTS_SL_INSIGHT_USER_UUID }}'
|
||||
sl-insight-api-token: '${{ secrets.SERVICETESTS_SL_INSIGHT_API_TOKEN }}'
|
||||
twitch-client-id: '${{ secrets.SERVICETESTS_TWITCH_CLIENT_ID }}'
|
||||
|
||||
15
CHANGELOG.md
15
CHANGELOG.md
@@ -4,6 +4,21 @@ Note: this changelog is for the shields.io server. The changelog for the badge-m
|
||||
|
||||
---
|
||||
|
||||
## server-2023-12-04
|
||||
|
||||
- move from @renovate/pep440 to @renovatebot/pep440 [#9614](https://github.com/badges/shields/issues/9614)
|
||||
- deprecate/fix [ansible] galaxy services [#9648](https://github.com/badges/shields/issues/9648)
|
||||
- call [pepy] with auth [#9748](https://github.com/badges/shields/issues/9748)
|
||||
- add meaningful descriptions including keywords [#9715](https://github.com/badges/shields/issues/9715)
|
||||
- Dependency updates
|
||||
|
||||
## server-2023-11-01
|
||||
|
||||
- fix greasyfork 404 bug [#9632](https://github.com/badges/shields/issues/9632)
|
||||
- Hacktoberfest 2023 support - resolves #9636 [#9637](https://github.com/badges/shields/issues/9637)
|
||||
- switch to fixed OpenCollective images [#9615](https://github.com/badges/shields/issues/9615)
|
||||
- Dependency updates
|
||||
|
||||
## server-2023-10-02
|
||||
|
||||
- add python package total downloads from [pepy] badge [#9564](https://github.com/badges/shields/issues/9564)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<img src="https://img.shields.io/discord/308323056592486420?logo=discord"
|
||||
alt="chat on Discord"></a>
|
||||
<a href="https://twitter.com/intent/follow?screen_name=shields_io">
|
||||
<img src="https://img.shields.io/twitter/follow/shields_io?style=social&logo=twitter"
|
||||
<img src="https://img.shields.io/twitter/follow/shields_io?style=social&logo=X"
|
||||
alt="follow on Twitter"></a>
|
||||
</p>
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ class XmlElement {
|
||||
* Name of the XML tag
|
||||
* @param {Array.<string|module:badge-maker/lib/xml~XmlElement>} [attrs.content=[]]
|
||||
* Array of objects to render inside the tag. content may contain a mix of
|
||||
* string and XmlElement objects. If content is `[]` or ommitted the
|
||||
* string and XmlElement objects. If content is `[]` or omitted the
|
||||
* element will be rendered as a self-closing element.
|
||||
* @param {object} [attrs.attrs={}]
|
||||
* Object representing the tag's attributes as name/value pairs
|
||||
|
||||
@@ -96,6 +96,7 @@ private:
|
||||
obs_pass: 'OBS_PASS'
|
||||
redis_url: 'REDIS_URL'
|
||||
opencollective_token: 'OPENCOLLECTIVE_TOKEN'
|
||||
pepy_key: 'PEPY_KEY'
|
||||
postgres_url: 'POSTGRES_URL'
|
||||
sentry_dsn: 'SENTRY_DSN'
|
||||
sl_insight_userUuid: 'SL_INSIGHT_USER_UUID'
|
||||
|
||||
@@ -20,7 +20,7 @@ class BaseGraphqlService extends BaseService {
|
||||
/**
|
||||
* Parse data from JSON endpoint
|
||||
*
|
||||
* @param {string} buffer JSON repsonse from upstream API
|
||||
* @param {string} buffer JSON response from upstream API
|
||||
* @returns {object} Parsed response
|
||||
*/
|
||||
_parseJson(buffer) {
|
||||
@@ -51,7 +51,7 @@ class BaseGraphqlService extends BaseService {
|
||||
* for allowed keys
|
||||
* and {@link module:core/base-service/errors~RuntimeErrorProps} for allowed values
|
||||
* @param {Function} [attrs.transformJson=data => data] Function which takes the raw json and transforms it before
|
||||
* further procesing. In case of multiple query in a single graphql call and few of them
|
||||
* further processing. In case of multiple query in a single graphql call and few of them
|
||||
* throw error, partial data might be used ignoring the error.
|
||||
* @param {Function} [attrs.transformErrors=defaultTransformErrors]
|
||||
* Function which takes an errors object from a GraphQL
|
||||
|
||||
@@ -14,7 +14,7 @@ class BaseJsonService extends BaseService {
|
||||
/**
|
||||
* Parse data from JSON endpoint
|
||||
*
|
||||
* @param {string} buffer JSON repsonse from upstream API
|
||||
* @param {string} buffer JSON response from upstream API
|
||||
* @returns {object} Parsed response
|
||||
*/
|
||||
_parseJson(buffer) {
|
||||
|
||||
@@ -322,7 +322,7 @@ describe('BaseService', function () {
|
||||
})
|
||||
|
||||
describe('ScoutCamp integration', function () {
|
||||
// TODO Strangly, without the useless escape the regexes do not match in Node 12.
|
||||
// TODO Strangely, without the useless escape the regexes do not match in Node 12.
|
||||
// eslint-disable-next-line no-useless-escape
|
||||
const expectedRouteRegex = /^\/foo(?:\/([^\/#\?]+?))(|\.svg|\.json)$/
|
||||
|
||||
|
||||
@@ -363,7 +363,7 @@ function pathParam({
|
||||
* { name: 'name2', example: 'example2' },
|
||||
* )
|
||||
* ```
|
||||
* is equivilent to
|
||||
* is equivalent to
|
||||
* ```
|
||||
* const params = [
|
||||
* pathParam({ name: 'name1', example: 'example1' }),
|
||||
@@ -409,7 +409,7 @@ function queryParam({
|
||||
* { name: 'name2', example: 'example2' },
|
||||
* )
|
||||
* ```
|
||||
* is equivilent to
|
||||
* is equivalent to
|
||||
* ```
|
||||
* const params = [
|
||||
* queryParam({ name: 'name1', example: 'example1' }),
|
||||
|
||||
@@ -185,6 +185,7 @@ const privateConfigSchema = Joi.object({
|
||||
obs_pass: Joi.string(),
|
||||
redis_url: Joi.string().uri({ scheme: ['redis', 'rediss'] }),
|
||||
opencollective_token: Joi.string(),
|
||||
pepy_key: Joi.string(),
|
||||
postgres_url: Joi.string().uri({ scheme: 'postgresql' }),
|
||||
sentry_dsn: Joi.string(),
|
||||
sl_insight_userUuid: Joi.string(),
|
||||
|
||||
@@ -254,6 +254,14 @@ OpenCollective's GraphQL API only allows 10 reqs/minute for anonymous users.
|
||||
An [API token](https://graphql-docs-v2.opencollective.com/access)
|
||||
can be provided to access a higher rate limit of 100 reqs/minute.
|
||||
|
||||
### Pepy
|
||||
|
||||
- `PEPY_KEY` (yml: `pepy_key`)
|
||||
|
||||
The Pepy API requires authentication. To obtain a key,
|
||||
Create an account, sign in and obtain generate a key on your
|
||||
[account page](https://www.pepy.tech/user).
|
||||
|
||||
### SymfonyInsight (formerly Sensiolabs)
|
||||
|
||||
- `SL_INSIGHT_USER_UUID` (yml: `private.sl_insight_userUuid`)
|
||||
|
||||
14
frontend/blog/2023-11-29-simpleicons10.md
Normal file
14
frontend/blog/2023-11-29-simpleicons10.md
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
slug: simple-icons-10
|
||||
title: Simple Icons 10
|
||||
authors:
|
||||
name: chris48s
|
||||
title: Shields.io Core Team
|
||||
url: https://github.com/chris48s
|
||||
image_url: https://avatars.githubusercontent.com/u/6025893
|
||||
tags: []
|
||||
---
|
||||
|
||||
Logos on Shields.io are provided by SimpleIcons. We've recently upgraded to SimpleIcons 10. This release removes 45 icons. A full list of the removals can be found in the [release notes](https://github.com/simple-icons/simple-icons/releases/tag/10.0.0).
|
||||
|
||||
Please remember that we are just consumers of SimpleIcons. Decisions about changes and removals are made by the [SimpleIcons](https://github.com/simple-icons/simple-icons) project.
|
||||
@@ -93,7 +93,7 @@ const config = {
|
||||
href: 'https://discord.gg/HjJCwm5',
|
||||
},
|
||||
{
|
||||
label: 'Twitter',
|
||||
label: 'X',
|
||||
href: 'https://twitter.com/shields_io',
|
||||
},
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@ Shields.io is possible thanks to the people and companies who donate money, serv
|
||||
|
||||
<p>
|
||||
<object
|
||||
data="https://opencollective.com/shields/sponsors.svg?avatarHeight=80&width=600"
|
||||
data="https://opencollective.com/shields/tiers/sponsor.svg?avatarHeight=80&width=600"
|
||||
class="opencollective-image"
|
||||
></object>
|
||||
</p>
|
||||
@@ -34,7 +34,7 @@ Shields.io is possible thanks to the people and companies who donate money, serv
|
||||
|
||||
<p>
|
||||
<object
|
||||
data="https://opencollective.com/shields/backers.svg?width=600"
|
||||
data="https://opencollective.com/shields/tiers/backer.svg?width=600"
|
||||
class="opencollective-image">
|
||||
</object>
|
||||
</p>
|
||||
|
||||
801
package-lock.json
generated
801
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
40
package.json
40
package.json
@@ -21,9 +21,9 @@
|
||||
"url": "https://github.com/badges/shields"
|
||||
},
|
||||
"dependencies": {
|
||||
"@renovate/pep440": "^1.0.0",
|
||||
"@renovatebot/ruby-semver": "^3.0.15",
|
||||
"@sentry/node": "^7.72.0",
|
||||
"@renovatebot/pep440": "^3.0.12",
|
||||
"@renovatebot/ruby-semver": "^3.0.19",
|
||||
"@sentry/node": "^7.81.1",
|
||||
"@shields_io/camp": "^18.1.2",
|
||||
"@xmldom/xmldom": "0.8.10",
|
||||
"badge-maker": "file:badge-maker",
|
||||
@@ -44,7 +44,7 @@
|
||||
"got": "^13.0.0",
|
||||
"graphql": "16.8.1",
|
||||
"graphql-tag": "^2.12.6",
|
||||
"joi": "17.10.2",
|
||||
"joi": "17.11.0",
|
||||
"joi-extension-semver": "5.0.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"jsonpath": "~1.1.1",
|
||||
@@ -59,12 +59,12 @@
|
||||
"pg": "^8.11.3",
|
||||
"pretty-bytes": "^6.1.1",
|
||||
"priorityqueuejs": "^2.0.0",
|
||||
"prom-client": "^14.2.0",
|
||||
"prom-client": "^15.0.0",
|
||||
"qs": "^6.11.2",
|
||||
"query-string": "^8.1.0",
|
||||
"semver": "~7.5.4",
|
||||
"simple-icons": "9.16.0",
|
||||
"smol-toml": "1.1.2",
|
||||
"simple-icons": "10.0.0",
|
||||
"smol-toml": "1.1.3",
|
||||
"webextension-store-meta": "^1.0.5",
|
||||
"xpath": "~0.0.33"
|
||||
},
|
||||
@@ -147,7 +147,7 @@
|
||||
"@docusaurus/core": "^2.4.3",
|
||||
"@easyops-cn/docusaurus-search-local": "^0.36.0",
|
||||
"@mdx-js/react": "^1.6.21",
|
||||
"@typescript-eslint/parser": "^6.7.3",
|
||||
"@typescript-eslint/parser": "^6.12.0",
|
||||
"c8": "^8.0.1",
|
||||
"caller": "^1.1.0",
|
||||
"chai": "^4.3.10",
|
||||
@@ -156,13 +156,13 @@
|
||||
"chai-string": "^1.4.0",
|
||||
"child-process-promise": "^2.2.1",
|
||||
"clsx": "^2.0.0",
|
||||
"concurrently": "^8.2.1",
|
||||
"cypress": "^13.3.0",
|
||||
"concurrently": "^8.2.2",
|
||||
"cypress": "^13.6.0",
|
||||
"cypress-wait-for-stable-dom": "^0.1.0",
|
||||
"danger": "^11.3.0",
|
||||
"deepmerge": "^4.3.1",
|
||||
"docusaurus-preset-openapi": "0.6.4",
|
||||
"eslint": "8.50.0",
|
||||
"eslint": "8.54.0",
|
||||
"eslint-config-prettier": "^9.0.0",
|
||||
"eslint-config-standard": "17.1.0",
|
||||
"eslint-config-standard-jsx": "11.0.0",
|
||||
@@ -170,45 +170,45 @@
|
||||
"eslint-plugin-chai-friendly": "^0.7.2",
|
||||
"eslint-plugin-cypress": "^2.15.1",
|
||||
"eslint-plugin-icedfrisby": "^0.1.0",
|
||||
"eslint-plugin-import": "^2.28.1",
|
||||
"eslint-plugin-jsdoc": "^46.8.2",
|
||||
"eslint-plugin-import": "^2.29.0",
|
||||
"eslint-plugin-jsdoc": "^46.9.0",
|
||||
"eslint-plugin-mocha": "^10.2.0",
|
||||
"eslint-plugin-no-extension-in-require": "^0.2.0",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-promise": "6.1.1",
|
||||
"eslint-plugin-react": "^7.33.2",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"eslint-plugin-sort-class-members": "^1.18.0",
|
||||
"eslint-plugin-sort-class-members": "^1.19.0",
|
||||
"form-data": "^4.0.0",
|
||||
"icedfrisby": "4.0.0",
|
||||
"icedfrisby-nock": "^2.1.0",
|
||||
"is-svg": "^5.0.0",
|
||||
"jsdoc": "^4.0.2",
|
||||
"lint-staged": "^14.0.1",
|
||||
"lint-staged": "^15.1.0",
|
||||
"lodash.difference": "^4.5.0",
|
||||
"minimist": "^1.2.8",
|
||||
"mocha": "^10.2.0",
|
||||
"mocha-env-reporter": "^4.0.0",
|
||||
"mocha-junit-reporter": "^2.2.1",
|
||||
"mocha-yaml-loader": "^1.0.3",
|
||||
"nock": "13.3.3",
|
||||
"nock": "13.3.8",
|
||||
"node-mocks-http": "^1.13.0",
|
||||
"nodemon": "^3.0.1",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"open-cli": "^7.2.0",
|
||||
"portfinder": "^1.0.32",
|
||||
"prettier": "3.0.3",
|
||||
"prism-react-renderer": "^2.1.0",
|
||||
"prettier": "3.1.0",
|
||||
"prism-react-renderer": "^2.3.0",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"read-all-stdin-sync": "^1.0.5",
|
||||
"rimraf": "^5.0.5",
|
||||
"sazerac": "^2.0.0",
|
||||
"simple-git-hooks": "^2.9.0",
|
||||
"sinon": "^16.0.0",
|
||||
"sinon": "^17.0.1",
|
||||
"sinon-chai": "^3.7.0",
|
||||
"snap-shot-it": "^7.9.10",
|
||||
"start-server-and-test": "2.0.1",
|
||||
"start-server-and-test": "2.0.3",
|
||||
"tsd": "^0.29.0",
|
||||
"url": "^0.11.3"
|
||||
},
|
||||
|
||||
@@ -2,7 +2,8 @@ import Joi from 'joi'
|
||||
import { nonNegativeInteger } from '../validators.js'
|
||||
import { BaseJsonService } from '../index.js'
|
||||
|
||||
const keywords = ['amo', 'firefox']
|
||||
const description =
|
||||
'[addons.mozilla.org](https://addons.mozilla.org) (AMO) publishes extensions for Mozilla Firefox'
|
||||
|
||||
const schema = Joi.object({
|
||||
average_daily_users: nonNegativeInteger,
|
||||
@@ -26,4 +27,4 @@ class BaseAmoService extends BaseJsonService {
|
||||
}
|
||||
}
|
||||
|
||||
export { BaseAmoService, keywords }
|
||||
export { BaseAmoService, description }
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { renderDownloadsBadge } from '../downloads.js'
|
||||
import { redirector, pathParams } from '../index.js'
|
||||
import { BaseAmoService } from './amo-base.js'
|
||||
import { BaseAmoService, description as baseDescription } from './amo-base.js'
|
||||
|
||||
const description = `${baseDescription}
|
||||
|
||||
const description = `
|
||||
Previously \`amo/d\` provided a “total downloads” badge. However,
|
||||
[updates to the v3 API](https://github.com/badges/shields/issues/3079)
|
||||
only give us weekly downloads. The route \`amo/d\` redirects to \`amo/dw\`.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { starRating } from '../text-formatters.js'
|
||||
import { floorCount as floorCountColor } from '../color-formatters.js'
|
||||
import { pathParams } from '../index.js'
|
||||
import { BaseAmoService } from './amo-base.js'
|
||||
import { BaseAmoService, description } from './amo-base.js'
|
||||
|
||||
export default class AmoRating extends BaseAmoService {
|
||||
static category = 'rating'
|
||||
@@ -11,12 +11,14 @@ export default class AmoRating extends BaseAmoService {
|
||||
'/amo/rating/{addonId}': {
|
||||
get: {
|
||||
summary: 'Mozilla Add-on Rating',
|
||||
description,
|
||||
parameters: pathParams({ name: 'addonId', example: 'dustman' }),
|
||||
},
|
||||
},
|
||||
'/amo/stars/{addonId}': {
|
||||
get: {
|
||||
summary: 'Mozilla Add-on Stars',
|
||||
description,
|
||||
parameters: pathParams({ name: 'addonId', example: 'dustman' }),
|
||||
},
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { renderDownloadsBadge } from '../downloads.js'
|
||||
import { pathParams } from '../index.js'
|
||||
import { BaseAmoService } from './amo-base.js'
|
||||
import { BaseAmoService, description } from './amo-base.js'
|
||||
|
||||
export default class AmoUsers extends BaseAmoService {
|
||||
static category = 'downloads'
|
||||
@@ -10,6 +10,7 @@ export default class AmoUsers extends BaseAmoService {
|
||||
'/amo/users/{addonId}': {
|
||||
get: {
|
||||
summary: 'Mozilla Add-on Users',
|
||||
description,
|
||||
parameters: pathParams({ name: 'addonId', example: 'dustman' }),
|
||||
},
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { renderVersionBadge } from '../version.js'
|
||||
import { pathParams } from '../index.js'
|
||||
import { BaseAmoService } from './amo-base.js'
|
||||
import { BaseAmoService, description } from './amo-base.js'
|
||||
|
||||
export default class AmoVersion extends BaseAmoService {
|
||||
static category = 'version'
|
||||
@@ -10,6 +10,7 @@ export default class AmoVersion extends BaseAmoService {
|
||||
'/amo/v/{addonId}': {
|
||||
get: {
|
||||
summary: 'Mozilla Add-on Version',
|
||||
description,
|
||||
parameters: pathParams({ name: 'addonId', example: 'dustman' }),
|
||||
},
|
||||
},
|
||||
|
||||
@@ -1,45 +1,11 @@
|
||||
import Joi from 'joi'
|
||||
import { BaseJsonService, pathParams } from '../index.js'
|
||||
import { deprecatedService } from '../index.js'
|
||||
|
||||
const ansibleCollectionSchema = Joi.object({
|
||||
name: Joi.string().required(),
|
||||
namespace: Joi.object({
|
||||
name: Joi.string().required(),
|
||||
}),
|
||||
}).required()
|
||||
|
||||
class AnsibleGalaxyCollectionName extends BaseJsonService {
|
||||
static category = 'other'
|
||||
static route = { base: 'ansible/collection', pattern: ':collectionId' }
|
||||
|
||||
static openApi = {
|
||||
'/ansible/collection/{collectionId}': {
|
||||
get: {
|
||||
summary: 'Ansible Collection',
|
||||
parameters: pathParams({ name: 'collectionId', example: '278' }),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
static defaultBadgeData = { label: 'collection' }
|
||||
|
||||
static render({ name }) {
|
||||
return { message: name, color: 'blue' }
|
||||
}
|
||||
|
||||
async fetch({ collectionId }) {
|
||||
const url = `https://galaxy.ansible.com/api/v2/collections/${collectionId}/`
|
||||
return this._requestJson({
|
||||
url,
|
||||
schema: ansibleCollectionSchema,
|
||||
})
|
||||
}
|
||||
|
||||
async handle({ collectionId }) {
|
||||
const json = await this.fetch({ collectionId })
|
||||
const name = `${json.namespace.name}.${json.name}`
|
||||
return this.constructor.render({ name })
|
||||
}
|
||||
}
|
||||
|
||||
export { AnsibleGalaxyCollectionName }
|
||||
export const AnsibleGalaxyCollectionName = deprecatedService({
|
||||
category: 'other',
|
||||
route: {
|
||||
base: 'ansible/collection',
|
||||
pattern: ':collectionId',
|
||||
},
|
||||
label: 'collection',
|
||||
dateAdded: new Date('2023-10-10'),
|
||||
})
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
import { ServiceTester } from '../tester.js'
|
||||
export const t = new ServiceTester({
|
||||
id: 'AnsibleCollection',
|
||||
title: 'AnsibleCollection',
|
||||
id: 'AnsibleGalaxyCollectionName',
|
||||
title: 'AnsibleGalaxyCollectionName',
|
||||
pathPrefix: '/ansible/collection',
|
||||
})
|
||||
|
||||
t.create('collection name (valid)')
|
||||
t.create('collection name')
|
||||
.get('/278.json')
|
||||
.expectBadge({ label: 'collection', message: 'community.general' })
|
||||
|
||||
t.create('collection name (not found)')
|
||||
.get('/000.json')
|
||||
.expectBadge({ label: 'collection', message: 'not found' })
|
||||
.expectBadge({ label: 'collection', message: 'no longer available' })
|
||||
|
||||
@@ -1,52 +1,11 @@
|
||||
import Joi from 'joi'
|
||||
import { floorCount } from '../color-formatters.js'
|
||||
import { BaseJsonService, InvalidResponse, pathParams } from '../index.js'
|
||||
import { deprecatedService } from '../index.js'
|
||||
|
||||
const ansibleContentSchema = Joi.object({
|
||||
quality_score: Joi.number().allow(null).required(),
|
||||
}).required()
|
||||
|
||||
class AnsibleGalaxyContent extends BaseJsonService {
|
||||
async fetch({ projectId }) {
|
||||
const url = `https://galaxy.ansible.com/api/v1/content/${projectId}/`
|
||||
return this._requestJson({
|
||||
url,
|
||||
schema: ansibleContentSchema,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export default class AnsibleGalaxyContentQualityScore extends AnsibleGalaxyContent {
|
||||
static category = 'analysis'
|
||||
static route = { base: 'ansible/quality', pattern: ':projectId' }
|
||||
|
||||
static openApi = {
|
||||
'/ansible/quality/{projectId}': {
|
||||
get: {
|
||||
summary: 'Ansible Quality Score',
|
||||
parameters: pathParams({ name: 'projectId', example: '432' }),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
static defaultBadgeData = { label: 'quality' }
|
||||
|
||||
static render({ qualityScore }) {
|
||||
return {
|
||||
message: qualityScore,
|
||||
color: floorCount(qualityScore, 2, 3, 4),
|
||||
}
|
||||
}
|
||||
|
||||
async handle({ projectId }) {
|
||||
const { quality_score: qualityScore } = await this.fetch({ projectId })
|
||||
|
||||
if (qualityScore === null) {
|
||||
throw new InvalidResponse({
|
||||
prettyMessage: 'no score available',
|
||||
})
|
||||
}
|
||||
|
||||
return this.constructor.render({ qualityScore })
|
||||
}
|
||||
}
|
||||
export const AnsibleGalaxyContentQualityScore = deprecatedService({
|
||||
category: 'analysis',
|
||||
route: {
|
||||
base: 'ansible/quality',
|
||||
pattern: ':projectId',
|
||||
},
|
||||
label: 'quality',
|
||||
dateAdded: new Date('2023-10-10'),
|
||||
})
|
||||
|
||||
@@ -1,15 +1,10 @@
|
||||
import { nonNegativeInteger } from '../validators.js'
|
||||
import { createServiceTester } from '../tester.js'
|
||||
export const t = await createServiceTester()
|
||||
import { ServiceTester } from '../tester.js'
|
||||
export const t = new ServiceTester({
|
||||
id: 'AnsibleGalaxyContentQualityScore',
|
||||
title: 'AnsibleGalaxyContentQualityScore',
|
||||
pathPrefix: '/ansible/quality',
|
||||
})
|
||||
|
||||
t.create('quality score (valid)')
|
||||
t.create('quality score')
|
||||
.get('/432.json')
|
||||
.expectBadge({ label: 'quality', message: nonNegativeInteger })
|
||||
|
||||
t.create('quality score (project not found)')
|
||||
.get('/0101.json')
|
||||
.expectBadge({ label: 'quality', message: 'not found' })
|
||||
|
||||
t.create('quality score (no score available)')
|
||||
.get('/2504.json')
|
||||
.expectBadge({ label: 'quality', message: 'no score available' })
|
||||
.expectBadge({ label: 'quality', message: 'no longer available' })
|
||||
|
||||
@@ -1,73 +1,83 @@
|
||||
import Joi from 'joi'
|
||||
import { renderDownloadsBadge } from '../downloads.js'
|
||||
import { nonNegativeInteger } from '../validators.js'
|
||||
import { BaseJsonService, pathParams } from '../index.js'
|
||||
import {
|
||||
BaseJsonService,
|
||||
deprecatedService,
|
||||
NotFound,
|
||||
pathParams,
|
||||
} from '../index.js'
|
||||
|
||||
const ansibleRoleSchema = Joi.object({
|
||||
download_count: nonNegativeInteger,
|
||||
name: Joi.string().required(),
|
||||
summary_fields: Joi.object({
|
||||
namespace: Joi.object({
|
||||
name: Joi.string().required(),
|
||||
}),
|
||||
}),
|
||||
results: Joi.array()
|
||||
.items(
|
||||
Joi.object({
|
||||
download_count: nonNegativeInteger,
|
||||
}),
|
||||
)
|
||||
.required(),
|
||||
}).required()
|
||||
|
||||
class AnsibleGalaxyRole extends BaseJsonService {
|
||||
async fetch({ roleId }) {
|
||||
const url = `https://galaxy.ansible.com/api/v1/roles/${roleId}/`
|
||||
return this._requestJson({
|
||||
url,
|
||||
schema: ansibleRoleSchema,
|
||||
})
|
||||
}
|
||||
}
|
||||
const AnsibleGalaxyRoleName = deprecatedService({
|
||||
name: 'DeprecatedAnsibleGalaxyRoleName',
|
||||
category: 'other',
|
||||
route: {
|
||||
base: 'ansible/role',
|
||||
pattern: ':roleId',
|
||||
},
|
||||
label: 'role',
|
||||
dateAdded: new Date('2023-10-10'),
|
||||
})
|
||||
|
||||
class AnsibleGalaxyRoleDownloads extends AnsibleGalaxyRole {
|
||||
const AnsibleGalaxyRoleLegacyDownloads = deprecatedService({
|
||||
name: 'DeprecatedAnsibleGalaxyRoleDownloads',
|
||||
category: 'downloads',
|
||||
route: {
|
||||
base: 'ansible/role/d',
|
||||
pattern: ':roleId',
|
||||
},
|
||||
label: 'role downloads',
|
||||
dateAdded: new Date('2023-10-10'),
|
||||
})
|
||||
|
||||
class AnsibleGalaxyRoleDownloads extends BaseJsonService {
|
||||
static category = 'downloads'
|
||||
static route = { base: 'ansible/role/d', pattern: ':roleId' }
|
||||
static route = { base: 'ansible/role/d', pattern: ':namespace/:name' }
|
||||
|
||||
static openApi = {
|
||||
'/ansible/role/d/{roleId}': {
|
||||
'/ansible/role/d/{namespace}/{name}': {
|
||||
get: {
|
||||
summary: 'Ansible Role',
|
||||
parameters: pathParams({ name: 'roleId', example: '3078' }),
|
||||
parameters: pathParams(
|
||||
{ name: 'namespace', example: 'openwisp' },
|
||||
{ name: 'name', example: 'openwisp2' },
|
||||
),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
static defaultBadgeData = { label: 'role downloads' }
|
||||
|
||||
async handle({ roleId }) {
|
||||
const json = await this.fetch({ roleId })
|
||||
return renderDownloadsBadge({ downloads: json.download_count })
|
||||
async fetch({ namespace, name }) {
|
||||
const url = 'https://galaxy.ansible.com/api/v1/roles/'
|
||||
return this._requestJson({
|
||||
url,
|
||||
schema: ansibleRoleSchema,
|
||||
options: { searchParams: { namespace, name, limit: 1 } },
|
||||
})
|
||||
}
|
||||
|
||||
async handle({ namespace, name }) {
|
||||
const json = await this.fetch({ namespace, name })
|
||||
if (json.results.length === 0) {
|
||||
throw new NotFound({ prettyMessage: 'not found' })
|
||||
}
|
||||
return renderDownloadsBadge({ downloads: json.results[0].download_count })
|
||||
}
|
||||
}
|
||||
|
||||
class AnsibleGalaxyRoleName extends AnsibleGalaxyRole {
|
||||
static category = 'other'
|
||||
static route = { base: 'ansible/role', pattern: ':roleId' }
|
||||
|
||||
static openApi = {
|
||||
'/ansible/role/{roleId}': {
|
||||
get: {
|
||||
summary: 'Ansible Galaxy Role Name',
|
||||
parameters: pathParams({ name: 'roleId', example: '3078' }),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
static defaultBadgeData = { label: 'role' }
|
||||
|
||||
static render({ name }) {
|
||||
return { message: name, color: 'blue' }
|
||||
}
|
||||
|
||||
async handle({ roleId }) {
|
||||
const json = await this.fetch({ roleId })
|
||||
const name = `${json.summary_fields.namespace.name}.${json.name}`
|
||||
return this.constructor.render({ name })
|
||||
}
|
||||
export {
|
||||
AnsibleGalaxyRoleDownloads,
|
||||
AnsibleGalaxyRoleName,
|
||||
AnsibleGalaxyRoleLegacyDownloads,
|
||||
}
|
||||
|
||||
export { AnsibleGalaxyRoleDownloads, AnsibleGalaxyRoleName }
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
import { isMetric } from '../test-validators.js'
|
||||
import { ServiceTester } from '../tester.js'
|
||||
export const t = new ServiceTester({
|
||||
id: 'AnsibleRole',
|
||||
title: 'AnsibleRole',
|
||||
id: 'AnsibleGalaxyRole',
|
||||
title: 'AnsibleGalaxyRole',
|
||||
pathPrefix: '/ansible/role',
|
||||
})
|
||||
|
||||
t.create('role name (valid)')
|
||||
t.create('role name')
|
||||
.get('/14542.json')
|
||||
.expectBadge({ label: 'role', message: 'openwisp.openwisp2' })
|
||||
.expectBadge({ label: 'role', message: 'no longer available' })
|
||||
|
||||
t.create('role name (not found)')
|
||||
.get('/000.json')
|
||||
.expectBadge({ label: 'role', message: 'not found' })
|
||||
t.create('role downloads (deprecated)')
|
||||
.get('/d/14542.json')
|
||||
.expectBadge({ label: 'role downloads', message: 'no longer available' })
|
||||
|
||||
t.create('role downloads (valid)')
|
||||
.get('/d/14542.json')
|
||||
.get('/d/openwisp/openwisp2.json')
|
||||
.expectBadge({ label: 'role downloads', message: isMetric })
|
||||
|
||||
t.create('role downloads (not found)')
|
||||
.get('/d/does-not-exist.json')
|
||||
.get('/d/does-not/exist.json')
|
||||
.expectBadge({ label: 'role downloads', message: 'not found' })
|
||||
|
||||
@@ -20,7 +20,7 @@ export default class BitComponents extends BaseJsonService {
|
||||
static openApi = {
|
||||
'/bit/collection/total-components/{owner}/{collection}': {
|
||||
get: {
|
||||
summary: 'Bit',
|
||||
summary: 'Bit Components',
|
||||
parameters: pathParams(
|
||||
{
|
||||
name: 'owner',
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import { BaseJsonService } from '../index.js'
|
||||
|
||||
const description =
|
||||
'[Coincap](https://coincap.io/) is a cryptocurrency exchange'
|
||||
|
||||
export default class BaseCoincapService extends BaseJsonService {
|
||||
static category = 'other'
|
||||
|
||||
@@ -19,4 +22,4 @@ export default class BaseCoincapService extends BaseJsonService {
|
||||
}
|
||||
}
|
||||
|
||||
export { BaseCoincapService }
|
||||
export { BaseCoincapService, description }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Joi from 'joi'
|
||||
import { pathParams } from '../index.js'
|
||||
import { floorCount } from '../color-formatters.js'
|
||||
import BaseCoincapService from './coincap-base.js'
|
||||
import { BaseCoincapService, description } from './coincap-base.js'
|
||||
|
||||
const schema = Joi.object({
|
||||
data: Joi.object({
|
||||
@@ -19,6 +19,7 @@ export default class CoincapChangePercent24HrUsd extends BaseCoincapService {
|
||||
'/coincap/change-percent-24hr/{assetId}': {
|
||||
get: {
|
||||
summary: 'Coincap (Change Percent 24Hr)',
|
||||
description,
|
||||
parameters: pathParams({
|
||||
name: 'assetId',
|
||||
example: 'bitcoin',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Joi from 'joi'
|
||||
import { pathParams } from '../index.js'
|
||||
import BaseCoincapService from './coincap-base.js'
|
||||
import { BaseCoincapService, description } from './coincap-base.js'
|
||||
|
||||
const schema = Joi.object({
|
||||
data: Joi.object({
|
||||
@@ -18,6 +18,7 @@ export default class CoincapPriceUsd extends BaseCoincapService {
|
||||
'/coincap/price-usd/{assetId}': {
|
||||
get: {
|
||||
summary: 'Coincap (Price USD)',
|
||||
description,
|
||||
parameters: pathParams({
|
||||
name: 'assetId',
|
||||
example: 'bitcoin',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Joi from 'joi'
|
||||
import { pathParams } from '../index.js'
|
||||
import BaseCoincapService from './coincap-base.js'
|
||||
import { BaseCoincapService, description } from './coincap-base.js'
|
||||
|
||||
const schema = Joi.object({
|
||||
data: Joi.object({
|
||||
@@ -18,6 +18,7 @@ export default class CoincapRank extends BaseCoincapService {
|
||||
'/coincap/rank/{assetId}': {
|
||||
get: {
|
||||
summary: 'Coincap (Rank)',
|
||||
description,
|
||||
parameters: pathParams({
|
||||
name: 'assetId',
|
||||
example: 'bitcoin',
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
import dayjs from 'dayjs'
|
||||
import pep440 from '@renovate/pep440'
|
||||
import pep440 from '@renovatebot/pep440'
|
||||
|
||||
/**
|
||||
* Determines the color used for a badge based on version.
|
||||
|
||||
@@ -13,6 +13,7 @@ export default class ConanVersion extends ConditionalGithubAuthV3Service {
|
||||
'/conan/v/{packageName}': {
|
||||
get: {
|
||||
summary: 'Conan Center',
|
||||
description: '[Conan](https://conan.io/) is a package manager for C++',
|
||||
parameters: pathParams({
|
||||
name: 'packageName',
|
||||
example: 'boost',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { pathParams } from '../index.js'
|
||||
import BaseCpanService from './cpan.js'
|
||||
import { BaseCpanService, description } from './cpan.js'
|
||||
|
||||
export default class CpanLicense extends BaseCpanService {
|
||||
static category = 'license'
|
||||
@@ -9,6 +9,7 @@ export default class CpanLicense extends BaseCpanService {
|
||||
'/cpan/l/{packageName}': {
|
||||
get: {
|
||||
summary: 'CPAN License',
|
||||
description,
|
||||
parameters: pathParams({
|
||||
name: 'packageName',
|
||||
example: 'Config-Augeas',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { pathParams } from '../index.js'
|
||||
import { renderVersionBadge } from '../version.js'
|
||||
import BaseCpanService from './cpan.js'
|
||||
import { BaseCpanService, description } from './cpan.js'
|
||||
|
||||
export default class CpanVersion extends BaseCpanService {
|
||||
static category = 'version'
|
||||
@@ -10,6 +10,7 @@ export default class CpanVersion extends BaseCpanService {
|
||||
'/cpan/v/{packageName}': {
|
||||
get: {
|
||||
summary: 'CPAN Version',
|
||||
description,
|
||||
parameters: pathParams({
|
||||
name: 'packageName',
|
||||
example: 'Config-Augeas',
|
||||
|
||||
@@ -6,6 +6,9 @@ const schema = Joi.object({
|
||||
license: Joi.array().items(Joi.string()).min(1).required(),
|
||||
}).required()
|
||||
|
||||
const description =
|
||||
'[CPAN](https://www.cpan.org/) is a package registry for Perl'
|
||||
|
||||
export default class BaseCpanService extends BaseJsonService {
|
||||
static defaultBadgeData = { label: 'cpan' }
|
||||
|
||||
@@ -14,3 +17,5 @@ export default class BaseCpanService extends BaseJsonService {
|
||||
return this._requestJson({ schema, url })
|
||||
}
|
||||
}
|
||||
|
||||
export { BaseCpanService, description }
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import Joi from 'joi'
|
||||
import { pathParams } from '../../index.js'
|
||||
import { formatDate } from '../../text-formatters.js'
|
||||
import { age as ageColor } from '../../color-formatters.js'
|
||||
import { GithubAuthV3Service } from '../github-auth-service.js'
|
||||
@@ -11,17 +12,18 @@ const schema = Joi.object({
|
||||
export default class GistLastCommit extends GithubAuthV3Service {
|
||||
static category = 'activity'
|
||||
static route = { base: 'github/gist/last-commit', pattern: ':gistId' }
|
||||
static examples = [
|
||||
{
|
||||
title: 'GitHub Gist last commit',
|
||||
namedParams: {
|
||||
gistId: '8710649',
|
||||
static openApi = {
|
||||
'/github/gist/last-commit/{gistId}': {
|
||||
get: {
|
||||
summary: 'GitHub Gist last commit',
|
||||
description: `Shows the latest commit to a GitHub Gist.\n${documentation}`,
|
||||
parameters: pathParams({
|
||||
name: 'gistId',
|
||||
example: '8710649',
|
||||
}),
|
||||
},
|
||||
staticPreview: this.render({ commitDate: '2022-07-29T20:01:41Z' }),
|
||||
keywords: ['latest'],
|
||||
documentation,
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
static defaultBadgeData = { label: 'last commit' }
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import gql from 'graphql-tag'
|
||||
import Joi from 'joi'
|
||||
import { metric } from '../../text-formatters.js'
|
||||
import { NotFound } from '../../index.js'
|
||||
import { NotFound, pathParams } from '../../index.js'
|
||||
import { GithubAuthV4Service } from '../github-auth-service.js'
|
||||
import { documentation as commonDocumentation } from '../github-helpers.js'
|
||||
|
||||
@@ -20,7 +20,7 @@ const schema = Joi.object({
|
||||
}).required(),
|
||||
}).required()
|
||||
|
||||
const documentation = `${commonDocumentation}
|
||||
const description = `${commonDocumentation}
|
||||
<p>This badge shows the number of stargazers for a gist. Gist id is accepted as input and 'gist not found' is returned if the gist is not found for the given gist id.
|
||||
</p>`
|
||||
|
||||
@@ -32,18 +32,18 @@ export default class GistStars extends GithubAuthV4Service {
|
||||
pattern: ':gistId',
|
||||
}
|
||||
|
||||
static examples = [
|
||||
{
|
||||
title: 'Github Gist stars',
|
||||
namedParams: { gistId: '47a4d00457a92aa426dbd48a18776322' },
|
||||
staticPreview: {
|
||||
label: this.defaultBadgeData.label,
|
||||
message: metric(29),
|
||||
style: 'social',
|
||||
static openApi = {
|
||||
'/github/gist/stars/{gistId}': {
|
||||
get: {
|
||||
summary: 'Github Gist stars',
|
||||
description,
|
||||
parameters: pathParams({
|
||||
name: 'gistId',
|
||||
example: '47a4d00457a92aa426dbd48a18776322',
|
||||
}),
|
||||
},
|
||||
documentation,
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
static defaultBadgeData = {
|
||||
label: 'Stars',
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import Joi from 'joi'
|
||||
import { pathParams } from '../index.js'
|
||||
import { renderContributorBadge } from '../contributor-count.js'
|
||||
import { ConditionalGithubAuthV3Service } from './github-auth-service.js'
|
||||
import { fetchJsonFromRepo } from './github-common-fetch.js'
|
||||
import { documentation as commonDocumentation } from './github-helpers.js'
|
||||
|
||||
const documentation = `
|
||||
const description = `
|
||||
The All Contributors service allows you to recognize all your project
|
||||
contributors, including those that don't push code. See
|
||||
[https://allcontributors.org](https://allcontributors.org)
|
||||
@@ -24,18 +25,44 @@ export default class GithubAllContributorsService extends ConditionalGithubAuthV
|
||||
pattern: ':user/:repo/:branch*',
|
||||
}
|
||||
|
||||
static examples = [
|
||||
{
|
||||
title: 'GitHub contributors (via allcontributors.org)',
|
||||
namedParams: {
|
||||
repo: 'all-contributors',
|
||||
user: 'all-contributors',
|
||||
branch: 'master',
|
||||
static openApi = {
|
||||
'/github/all-contributors/{user}/{repo}/{branch}': {
|
||||
get: {
|
||||
summary: 'GitHub contributors from allcontributors.org (with branch)',
|
||||
description,
|
||||
parameters: pathParams(
|
||||
{
|
||||
name: 'user',
|
||||
example: 'all-contributors',
|
||||
},
|
||||
{
|
||||
name: 'repo',
|
||||
example: 'all-contributors',
|
||||
},
|
||||
{
|
||||
name: 'branch',
|
||||
example: 'master',
|
||||
},
|
||||
),
|
||||
},
|
||||
staticPreview: this.render({ contributorCount: 66 }),
|
||||
documentation,
|
||||
},
|
||||
]
|
||||
'/github/all-contributors/{user}/{repo}': {
|
||||
get: {
|
||||
summary: 'GitHub contributors from allcontributors.org',
|
||||
description,
|
||||
parameters: pathParams(
|
||||
{
|
||||
name: 'user',
|
||||
example: 'all-contributors',
|
||||
},
|
||||
{
|
||||
name: 'repo',
|
||||
example: 'all-contributors',
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
static defaultBadgeData = { label: 'all contributors' }
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import prettyBytes from 'pretty-bytes'
|
||||
import { pathParams } from '../index.js'
|
||||
import { BaseGithubLanguage } from './github-languages-base.js'
|
||||
import { documentation } from './github-helpers.js'
|
||||
|
||||
@@ -9,17 +10,24 @@ export default class GithubCodeSize extends BaseGithubLanguage {
|
||||
pattern: ':user/:repo',
|
||||
}
|
||||
|
||||
static examples = [
|
||||
{
|
||||
title: 'GitHub code size in bytes',
|
||||
namedParams: {
|
||||
user: 'badges',
|
||||
repo: 'shields',
|
||||
static openApi = {
|
||||
'/github/languages/code-size/{user}/{repo}': {
|
||||
get: {
|
||||
summary: 'GitHub code size in bytes',
|
||||
description: documentation,
|
||||
parameters: pathParams(
|
||||
{
|
||||
name: 'user',
|
||||
example: 'badges',
|
||||
},
|
||||
{
|
||||
name: 'repo',
|
||||
example: 'shields',
|
||||
},
|
||||
),
|
||||
},
|
||||
staticPreview: this.render({ size: 1625000 }),
|
||||
documentation,
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
static defaultBadgeData = { label: 'code size' }
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ t.create('commit activity (1 year) by author')
|
||||
.get(`/y/badges/shields.json?authorFilter=${authorFilterUser}`)
|
||||
.expectBadge({
|
||||
label: `commit activity by ${authorFilterUser}`,
|
||||
message: isMetricOverTimePeriod,
|
||||
message: isCommitActivity,
|
||||
})
|
||||
|
||||
t.create('commit activity (1 month)').get('/m/eslint/eslint.json').expectBadge({
|
||||
@@ -47,7 +47,7 @@ t.create('commit activity (1 month) by author')
|
||||
.get(`/m/badges/shields.json?authorFilter=${authorFilterUser}`)
|
||||
.expectBadge({
|
||||
label: `commit activity by ${authorFilterUser}`,
|
||||
message: isMetricOverTimePeriod,
|
||||
message: isCommitActivity,
|
||||
})
|
||||
|
||||
t.create('commit activity (4 weeks)')
|
||||
@@ -61,7 +61,7 @@ t.create('commit activity (4 weeks) by author')
|
||||
.get(`/4w/badges/shields.json?authorFilter=${authorFilterUser}`)
|
||||
.expectBadge({
|
||||
label: `commit activity by ${authorFilterUser}`,
|
||||
message: isMetricOverTimePeriod,
|
||||
message: isCommitActivity,
|
||||
})
|
||||
|
||||
t.create('commit activity (1 week)').get('/w/eslint/eslint.json').expectBadge({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Joi from 'joi'
|
||||
import { NotFound, InvalidParameter } from '../index.js'
|
||||
import { NotFound, InvalidParameter, pathParams } from '../index.js'
|
||||
import { GithubAuthV3Service } from './github-auth-service.js'
|
||||
import { documentation, httpErrorsFor } from './github-helpers.js'
|
||||
|
||||
@@ -15,23 +15,32 @@ export default class GithubCommitStatus extends GithubAuthV3Service {
|
||||
pattern: ':user/:repo/:branch/:commit',
|
||||
}
|
||||
|
||||
static examples = [
|
||||
{
|
||||
title: 'GitHub commit merge status',
|
||||
namedParams: {
|
||||
user: 'badges',
|
||||
repo: 'shields',
|
||||
branch: 'master',
|
||||
commit: '5d4ab86b1b5ddfb3c4a70a70bd19932c52603b8c',
|
||||
static openApi = {
|
||||
'/github/commit-status/{user}/{repo}/{branch}/{commit}': {
|
||||
get: {
|
||||
summary: 'GitHub commit merge status',
|
||||
description: documentation,
|
||||
parameters: pathParams(
|
||||
{
|
||||
name: 'user',
|
||||
example: 'badges',
|
||||
},
|
||||
{
|
||||
name: 'repo',
|
||||
example: 'shields',
|
||||
},
|
||||
{
|
||||
name: 'branch',
|
||||
example: 'master',
|
||||
},
|
||||
{
|
||||
name: 'commit',
|
||||
example: '5d4ab86b1b5ddfb3c4a70a70bd19932c52603b8c',
|
||||
},
|
||||
),
|
||||
},
|
||||
staticPreview: this.render({
|
||||
isInBranch: true,
|
||||
branch: 'master',
|
||||
}),
|
||||
keywords: ['branch'],
|
||||
documentation,
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
static defaultBadgeData = { label: 'commit status' }
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import gql from 'graphql-tag'
|
||||
import Joi from 'joi'
|
||||
import { NotFound } from '../index.js'
|
||||
import { NotFound, pathParams } from '../index.js'
|
||||
import { GithubAuthV4Service } from './github-auth-service.js'
|
||||
import { documentation, transformErrors } from './github-helpers.js'
|
||||
|
||||
@@ -49,20 +49,28 @@ export default class GithubDeployments extends GithubAuthV4Service {
|
||||
pattern: ':user/:repo/:environment',
|
||||
}
|
||||
|
||||
static examples = [
|
||||
{
|
||||
title: 'GitHub deployments',
|
||||
namedParams: {
|
||||
user: 'badges',
|
||||
repo: 'shields',
|
||||
environment: 'shields-staging',
|
||||
static openApi = {
|
||||
'/github/deployments/{user}/{repo}/{environment}': {
|
||||
get: {
|
||||
summary: 'GitHub deployments',
|
||||
description: documentation,
|
||||
parameters: pathParams(
|
||||
{
|
||||
name: 'user',
|
||||
example: 'badges',
|
||||
},
|
||||
{
|
||||
name: 'repo',
|
||||
example: 'shields',
|
||||
},
|
||||
{
|
||||
name: 'environment',
|
||||
example: 'shields-staging',
|
||||
},
|
||||
),
|
||||
},
|
||||
staticPreview: this.render({
|
||||
state: 'SUCCESS',
|
||||
}),
|
||||
documentation,
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
static defaultBadgeData = { label: 'state' }
|
||||
|
||||
|
||||
@@ -32,13 +32,13 @@ describe('GithubDirectoryFileCount', function () {
|
||||
})
|
||||
})
|
||||
|
||||
it('throws InvalidParameter on receving an object as contents instead of an array', function () {
|
||||
it('throws InvalidParameter on receiving an object as contents instead of an array', function () {
|
||||
expect(() => GithubDirectoryFileCount.transform({}, {}))
|
||||
.to.throw(InvalidParameter)
|
||||
.with.property('prettyMessage', 'not a directory')
|
||||
})
|
||||
|
||||
it('throws InvalidParameter on receving type dir and extension', function () {
|
||||
it('throws InvalidParameter on receiving type dir and extension', function () {
|
||||
expect(() =>
|
||||
GithubDirectoryFileCount.transform(contents, {
|
||||
type: 'dir',
|
||||
@@ -52,7 +52,7 @@ describe('GithubDirectoryFileCount', function () {
|
||||
)
|
||||
})
|
||||
|
||||
it('throws InvalidParameter on receving no type and extension', function () {
|
||||
it('throws InvalidParameter on receiving no type and extension', function () {
|
||||
expect(() =>
|
||||
GithubDirectoryFileCount.transform(contents, { extension: 'js' }),
|
||||
)
|
||||
|
||||
@@ -51,7 +51,7 @@ export default class GithubHacktoberfestCombinedStatus extends GithubAuthV4Servi
|
||||
static category = 'issue-tracking'
|
||||
static route = {
|
||||
base: 'github/hacktoberfest',
|
||||
pattern: ':year(2019|2020|2021|2022)/:user/:repo',
|
||||
pattern: ':year(2019|2020|2021|2022|2023)/:user/:repo',
|
||||
queryParamSchema,
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ export default class GithubHacktoberfestCombinedStatus extends GithubAuthV4Servi
|
||||
{
|
||||
title: 'GitHub Hacktoberfest combined status',
|
||||
namedParams: {
|
||||
year: '2022',
|
||||
year: '2023',
|
||||
user: 'snyk',
|
||||
repo: 'snyk',
|
||||
},
|
||||
@@ -73,7 +73,7 @@ export default class GithubHacktoberfestCombinedStatus extends GithubAuthV4Servi
|
||||
{
|
||||
title: 'GitHub Hacktoberfest combined status (suggestion label override)',
|
||||
namedParams: {
|
||||
year: '2022',
|
||||
year: '2023',
|
||||
user: 'tmrowco',
|
||||
repo: 'tmrowapp-contrib',
|
||||
},
|
||||
@@ -81,7 +81,7 @@ export default class GithubHacktoberfestCombinedStatus extends GithubAuthV4Servi
|
||||
suggestion_label: 'help wanted',
|
||||
},
|
||||
staticPreview: this.render({
|
||||
year: '2022',
|
||||
year: '2023',
|
||||
suggestedIssueCount: 12,
|
||||
contributionCount: 8,
|
||||
daysLeft: 15,
|
||||
@@ -202,9 +202,8 @@ export default class GithubHacktoberfestCombinedStatus extends GithubAuthV4Servi
|
||||
}
|
||||
|
||||
async handle({ user, repo, year }, { suggestion_label: suggestionLabel }) {
|
||||
const { isBefore, daysToStart } = this.constructor.getCalendarPosition(
|
||||
+year,
|
||||
)
|
||||
const { isBefore, daysToStart } =
|
||||
this.constructor.getCalendarPosition(+year)
|
||||
if (isBefore) {
|
||||
return this.constructor.render({ hasStarted: false, daysToStart, year })
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import Joi from 'joi'
|
||||
import { pathParams } from '../index.js'
|
||||
import { GithubAuthV3Service } from './github-auth-service.js'
|
||||
import { documentation, httpErrorsFor } from './github-helpers.js'
|
||||
|
||||
@@ -9,18 +10,28 @@ const schema = Joi.object({
|
||||
export default class GithubLabels extends GithubAuthV3Service {
|
||||
static category = 'issue-tracking'
|
||||
static route = { base: 'github/labels', pattern: ':user/:repo/:name' }
|
||||
static examples = [
|
||||
{
|
||||
title: 'GitHub labels',
|
||||
namedParams: {
|
||||
user: 'atom',
|
||||
repo: 'atom',
|
||||
name: 'help-wanted',
|
||||
static openApi = {
|
||||
'/github/labels/{user}/{repo}/{name}': {
|
||||
get: {
|
||||
summary: 'GitHub labels',
|
||||
description: documentation,
|
||||
parameters: pathParams(
|
||||
{
|
||||
name: 'user',
|
||||
example: 'atom',
|
||||
},
|
||||
{
|
||||
name: 'repo',
|
||||
example: 'atom',
|
||||
},
|
||||
{
|
||||
name: 'name',
|
||||
example: 'help-wanted',
|
||||
},
|
||||
),
|
||||
},
|
||||
staticPreview: this.render({ name: 'help-wanted', color: '#159818' }),
|
||||
documentation,
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
static defaultBadgeData = { label: ' ' }
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { pathParams } from '../index.js'
|
||||
import { metric } from '../text-formatters.js'
|
||||
import { BaseGithubLanguage } from './github-languages-base.js'
|
||||
import { documentation } from './github-helpers.js'
|
||||
@@ -5,17 +6,24 @@ import { documentation } from './github-helpers.js'
|
||||
export default class GithubLanguageCount extends BaseGithubLanguage {
|
||||
static category = 'analysis'
|
||||
static route = { base: 'github/languages/count', pattern: ':user/:repo' }
|
||||
static examples = [
|
||||
{
|
||||
title: 'GitHub language count',
|
||||
namedParams: {
|
||||
user: 'badges',
|
||||
repo: 'shields',
|
||||
static openApi = {
|
||||
'/github/languages/count/{user}/{repo}': {
|
||||
get: {
|
||||
summary: 'GitHub language count',
|
||||
description: documentation,
|
||||
parameters: pathParams(
|
||||
{
|
||||
name: 'user',
|
||||
example: 'badges',
|
||||
},
|
||||
{
|
||||
name: 'repo',
|
||||
example: 'shields',
|
||||
},
|
||||
),
|
||||
},
|
||||
staticPreview: this.render({ count: 5 }),
|
||||
documentation,
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
static defaultBadgeData = { label: 'languages' }
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import Joi from 'joi'
|
||||
import { pathParams } from '../index.js'
|
||||
import { renderLicenseBadge } from '../licenses.js'
|
||||
import { GithubAuthV3Service } from './github-auth-service.js'
|
||||
import { documentation, httpErrorsFor } from './github-helpers.js'
|
||||
@@ -11,18 +12,24 @@ const schema = Joi.object({
|
||||
export default class GithubLicense extends GithubAuthV3Service {
|
||||
static category = 'license'
|
||||
static route = { base: 'github/license', pattern: ':user/:repo' }
|
||||
static examples = [
|
||||
{
|
||||
title: 'GitHub',
|
||||
namedParams: { user: 'mashape', repo: 'apistatus' },
|
||||
staticPreview: {
|
||||
label: 'license',
|
||||
message: 'MIT',
|
||||
color: 'green',
|
||||
static openApi = {
|
||||
'/github/license/{user}/{repo}': {
|
||||
get: {
|
||||
summary: 'GitHub License',
|
||||
description: documentation,
|
||||
parameters: pathParams(
|
||||
{
|
||||
name: 'user',
|
||||
example: 'mashape',
|
||||
},
|
||||
{
|
||||
name: 'repo',
|
||||
example: 'apistatus',
|
||||
},
|
||||
),
|
||||
},
|
||||
documentation,
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
static defaultBadgeData = { label: 'license' }
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import Joi from 'joi'
|
||||
import prettyBytes from 'pretty-bytes'
|
||||
import { pathParams } from '../index.js'
|
||||
import { nonNegativeInteger } from '../validators.js'
|
||||
import { GithubAuthV3Service } from './github-auth-service.js'
|
||||
import { documentation, httpErrorsFor } from './github-helpers.js'
|
||||
@@ -11,17 +12,24 @@ const schema = Joi.object({
|
||||
export default class GithubRepoSize extends GithubAuthV3Service {
|
||||
static category = 'size'
|
||||
static route = { base: 'github/repo-size', pattern: ':user/:repo' }
|
||||
static examples = [
|
||||
{
|
||||
title: 'GitHub repo size',
|
||||
namedParams: {
|
||||
user: 'atom',
|
||||
repo: 'atom',
|
||||
static openApi = {
|
||||
'/github/repo-size/{user}/{repo}': {
|
||||
get: {
|
||||
summary: 'GitHub repo size',
|
||||
description: documentation,
|
||||
parameters: pathParams(
|
||||
{
|
||||
name: 'user',
|
||||
example: 'atom',
|
||||
},
|
||||
{
|
||||
name: 'repo',
|
||||
example: 'atom',
|
||||
},
|
||||
),
|
||||
},
|
||||
staticPreview: this.render({ size: 319488 }),
|
||||
documentation,
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
static defaultBadgeData = { label: 'repo size' }
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import Joi from 'joi'
|
||||
import { pathParams } from '../index.js'
|
||||
import { metric } from '../text-formatters.js'
|
||||
import { nonNegativeInteger } from '../validators.js'
|
||||
import { GithubAuthV3Service } from './github-auth-service.js'
|
||||
@@ -14,19 +15,28 @@ export default class GithubSearch extends GithubAuthV3Service {
|
||||
pattern: ':user/:repo/:query+',
|
||||
}
|
||||
|
||||
static examples = [
|
||||
{
|
||||
title: 'GitHub search hit counter',
|
||||
pattern: ':user/:repo/:query',
|
||||
namedParams: {
|
||||
user: 'torvalds',
|
||||
repo: 'linux',
|
||||
query: 'goto',
|
||||
static openApi = {
|
||||
'/github/search/{user}/{repo}/{query}': {
|
||||
get: {
|
||||
summary: 'GitHub search hit counter',
|
||||
description: documentation,
|
||||
parameters: pathParams(
|
||||
{
|
||||
name: 'user',
|
||||
example: 'torvalds',
|
||||
},
|
||||
{
|
||||
name: 'repo',
|
||||
example: 'linux',
|
||||
},
|
||||
{
|
||||
name: 'query',
|
||||
example: 'goto',
|
||||
},
|
||||
),
|
||||
},
|
||||
staticPreview: this.render({ query: 'goto', totalCount: 14000 }),
|
||||
documentation,
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
static defaultBadgeData = {
|
||||
label: 'counter',
|
||||
|
||||
@@ -2,7 +2,7 @@ import gql from 'graphql-tag'
|
||||
import Joi from 'joi'
|
||||
import { metric } from '../text-formatters.js'
|
||||
import { nonNegativeInteger } from '../validators.js'
|
||||
import { NotFound } from '../index.js'
|
||||
import { NotFound, pathParams } from '../index.js'
|
||||
import { GithubAuthV4Service } from './github-auth-service.js'
|
||||
import { documentation, transformErrors } from './github-helpers.js'
|
||||
|
||||
@@ -19,14 +19,18 @@ const schema = Joi.object({
|
||||
export default class GithubSponsors extends GithubAuthV4Service {
|
||||
static category = 'funding'
|
||||
static route = { base: 'github/sponsors', pattern: ':user' }
|
||||
static examples = [
|
||||
{
|
||||
title: 'GitHub Sponsors',
|
||||
namedParams: { user: 'Homebrew' },
|
||||
staticPreview: this.render({ count: 217 }),
|
||||
documentation,
|
||||
static openApi = {
|
||||
'/github/sponsors/{user}': {
|
||||
get: {
|
||||
summary: 'GitHub Sponsors',
|
||||
description: documentation,
|
||||
parameters: pathParams({
|
||||
name: 'user',
|
||||
example: 'Homebrew',
|
||||
}),
|
||||
},
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
static defaultBadgeData = {
|
||||
label: 'sponsors',
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { pathParams } from '../index.js'
|
||||
import { BaseGithubLanguage } from './github-languages-base.js'
|
||||
import { documentation } from './github-helpers.js'
|
||||
|
||||
@@ -9,21 +10,24 @@ export default class GithubTopLanguage extends BaseGithubLanguage {
|
||||
pattern: ':user/:repo',
|
||||
}
|
||||
|
||||
static examples = [
|
||||
{
|
||||
title: 'GitHub top language',
|
||||
namedParams: {
|
||||
user: 'badges',
|
||||
repo: 'shields',
|
||||
static openApi = {
|
||||
'/github/languages/top/{user}/{repo}': {
|
||||
get: {
|
||||
summary: 'GitHub top language',
|
||||
description: documentation,
|
||||
parameters: pathParams(
|
||||
{
|
||||
name: 'user',
|
||||
example: 'badges',
|
||||
},
|
||||
{
|
||||
name: 'repo',
|
||||
example: 'shields',
|
||||
},
|
||||
),
|
||||
},
|
||||
staticPreview: this.render({
|
||||
language: 'javascript',
|
||||
languageSize: 99.5,
|
||||
totalSize: 100,
|
||||
}),
|
||||
documentation,
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
static defaultBadgeData = {
|
||||
label: 'language',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Joi from 'joi'
|
||||
import { optionalUrl } from '../validators.js'
|
||||
import { latest, renderVersionBadge } from '../version.js'
|
||||
import { NotFound } from '../index.js'
|
||||
import { NotFound, pathParam, queryParam } from '../index.js'
|
||||
import { documentation, httpErrorsFor } from './gitlab-helper.js'
|
||||
import GitLabBase from './gitlab-base.js'
|
||||
|
||||
@@ -12,23 +12,24 @@ const schema = Joi.array().items(
|
||||
}),
|
||||
)
|
||||
|
||||
const sortEnum = ['date', 'semver']
|
||||
const displayNameEnum = ['tag', 'release']
|
||||
const dateOrderByEnum = ['created_at', 'released_at']
|
||||
|
||||
const queryParamSchema = Joi.object({
|
||||
gitlab_url: optionalUrl,
|
||||
include_prereleases: Joi.equal(''),
|
||||
sort: Joi.string().valid('date', 'semver').default('date'),
|
||||
display_name: Joi.string().valid('tag', 'release').default('tag'),
|
||||
sort: Joi.string()
|
||||
.valid(...sortEnum)
|
||||
.default('date'),
|
||||
display_name: Joi.string()
|
||||
.valid(...displayNameEnum)
|
||||
.default('tag'),
|
||||
date_order_by: Joi.string()
|
||||
.valid('created_at', 'released_at')
|
||||
.valid(...dateOrderByEnum)
|
||||
.default('created_at'),
|
||||
}).required()
|
||||
|
||||
const commonProps = {
|
||||
namedParams: {
|
||||
project: 'shields-ops-group/tag-test',
|
||||
},
|
||||
documentation,
|
||||
}
|
||||
|
||||
export default class GitLabRelease extends GitLabBase {
|
||||
static category = 'version'
|
||||
|
||||
@@ -38,58 +39,44 @@ export default class GitLabRelease extends GitLabBase {
|
||||
queryParamSchema,
|
||||
}
|
||||
|
||||
static examples = [
|
||||
{
|
||||
title: 'GitLab Release (latest by date)',
|
||||
...commonProps,
|
||||
queryParams: { sort: 'date', date_order_by: 'created_at' },
|
||||
staticPreview: renderVersionBadge({ version: 'v2.0.0' }),
|
||||
},
|
||||
{
|
||||
title: 'GitLab Release (latest by SemVer)',
|
||||
...commonProps,
|
||||
queryParams: { sort: 'semver' },
|
||||
staticPreview: renderVersionBadge({ version: 'v4.0.0' }),
|
||||
},
|
||||
{
|
||||
title: 'GitLab Release (latest by SemVer pre-release)',
|
||||
...commonProps,
|
||||
queryParams: {
|
||||
sort: 'semver',
|
||||
include_prereleases: null,
|
||||
static openApi = {
|
||||
'/gitlab/v/release/{project}': {
|
||||
get: {
|
||||
summary: 'GitLab Release',
|
||||
description: documentation,
|
||||
parameters: [
|
||||
pathParam({
|
||||
name: 'project',
|
||||
example: 'gitlab-org/gitlab',
|
||||
}),
|
||||
queryParam({
|
||||
name: 'gitlab_url',
|
||||
example: 'https://gitlab.com',
|
||||
}),
|
||||
queryParam({
|
||||
name: 'include_prereleases',
|
||||
schema: { type: 'boolean' },
|
||||
example: null,
|
||||
}),
|
||||
queryParam({
|
||||
name: 'sort',
|
||||
schema: { type: 'string', enum: sortEnum },
|
||||
example: 'semver',
|
||||
}),
|
||||
queryParam({
|
||||
name: 'display_name',
|
||||
schema: { type: 'string', enum: displayNameEnum },
|
||||
example: 'release',
|
||||
}),
|
||||
queryParam({
|
||||
name: 'date_order_by',
|
||||
schema: { type: 'string', enum: dateOrderByEnum },
|
||||
example: 'created_at',
|
||||
}),
|
||||
],
|
||||
},
|
||||
staticPreview: renderVersionBadge({ version: 'v5.0.0-beta.1' }),
|
||||
},
|
||||
{
|
||||
title: 'GitLab Release (self-managed)',
|
||||
namedParams: {
|
||||
project: 'GNOME/librsvg',
|
||||
},
|
||||
documentation,
|
||||
queryParams: {
|
||||
sort: 'semver',
|
||||
include_prereleases: null,
|
||||
gitlab_url: 'https://gitlab.gnome.org',
|
||||
date_order_by: 'created_at',
|
||||
},
|
||||
staticPreview: renderVersionBadge({ version: 'v2.51.4' }),
|
||||
},
|
||||
{
|
||||
title: 'GitLab Release (by release name)',
|
||||
namedParams: {
|
||||
project: 'gitlab-org/gitlab',
|
||||
},
|
||||
documentation,
|
||||
queryParams: {
|
||||
sort: 'semver',
|
||||
include_prereleases: null,
|
||||
gitlab_url: 'https://gitlab.com',
|
||||
display_name: 'release',
|
||||
date_order_by: 'created_at',
|
||||
},
|
||||
staticPreview: renderVersionBadge({ version: 'GitLab 14.2' }),
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
static defaultBadgeData = { label: 'release' }
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Joi from 'joi'
|
||||
import { nonNegativeInteger } from '../validators.js'
|
||||
import { BaseJsonService } from '../index.js'
|
||||
import { BaseJsonService, NotFound } from '../index.js'
|
||||
|
||||
const schema = Joi.object({
|
||||
daily_installs: nonNegativeInteger,
|
||||
@@ -16,9 +16,17 @@ export default class BaseGreasyForkService extends BaseJsonService {
|
||||
static defaultBadgeData = { label: 'greasy fork' }
|
||||
|
||||
async fetch({ scriptId }) {
|
||||
return this._requestJson({
|
||||
schema,
|
||||
url: `https://greasyfork.org/scripts/${scriptId}.json`,
|
||||
})
|
||||
try {
|
||||
return await this._requestJson({
|
||||
schema,
|
||||
url: `https://greasyfork.org/scripts/${scriptId}.json`,
|
||||
})
|
||||
} catch (e) {
|
||||
if (!(e instanceof NotFound)) throw e
|
||||
return this._requestJson({
|
||||
schema,
|
||||
url: `https://sleazyfork.org/scripts/${scriptId}.json`,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,3 +17,7 @@ t.create('Total Installs')
|
||||
t.create('Total Installs (not found)')
|
||||
.get('/dt/000000.json')
|
||||
.expectBadge({ label: 'installs', message: 'not found' })
|
||||
|
||||
t.create('Total Installs (sleazyfork)')
|
||||
.get('/dt/374903.json')
|
||||
.expectBadge({ label: 'installs', message: isMetric })
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import Joi from 'joi'
|
||||
import {
|
||||
queryParamSchema,
|
||||
exampleQueryParams,
|
||||
queryParams,
|
||||
renderWebsiteStatus,
|
||||
} from '../website-status.js'
|
||||
import { BaseJsonService } from '../index.js'
|
||||
import { BaseJsonService, pathParams } from '../index.js'
|
||||
|
||||
const schema = Joi.array()
|
||||
.items(Joi.object().keys({ su: Joi.boolean() }))
|
||||
@@ -24,14 +24,17 @@ export default class NodePingStatus extends BaseJsonService {
|
||||
queryParamSchema,
|
||||
}
|
||||
|
||||
static examples = [
|
||||
{
|
||||
title: 'NodePing status',
|
||||
namedParams: { checkUuid: exampleCheckUuid },
|
||||
queryParams: exampleQueryParams,
|
||||
staticPreview: renderWebsiteStatus({ isUp: true }),
|
||||
static openApi = {
|
||||
'/nodeping/status/{checkUuid}': {
|
||||
get: {
|
||||
summary: 'NodePing status',
|
||||
parameters: pathParams({
|
||||
name: 'checkUuid',
|
||||
example: exampleCheckUuid,
|
||||
}).concat(queryParams),
|
||||
},
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
static defaultBadgeData = { label: 'status' }
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Joi from 'joi'
|
||||
import { colorScale } from '../color-formatters.js'
|
||||
import { BaseJsonService } from '../index.js'
|
||||
import { BaseJsonService, pathParams } from '../index.js'
|
||||
|
||||
const colorFormatter = colorScale([99, 99.5, 100])
|
||||
|
||||
@@ -26,13 +26,17 @@ export default class NodePingUptime extends BaseJsonService {
|
||||
|
||||
static route = { base: 'nodeping/uptime', pattern: ':checkUuid' }
|
||||
|
||||
static examples = [
|
||||
{
|
||||
title: 'NodePing uptime',
|
||||
namedParams: { checkUuid: sampleCheckUuid },
|
||||
staticPreview: this.render({ uptime: 99.999 }),
|
||||
static openApi = {
|
||||
'/nodeping/uptime/{checkUuid}': {
|
||||
get: {
|
||||
summary: 'NodePing uptime',
|
||||
parameters: pathParams({
|
||||
name: 'checkUuid',
|
||||
example: sampleCheckUuid,
|
||||
}),
|
||||
},
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
static defaultBadgeData = { label: 'uptime' }
|
||||
|
||||
|
||||
@@ -58,8 +58,8 @@ class OpencollectiveBaseJson extends BaseJsonService {
|
||||
userType === 'users'
|
||||
? 'USER'
|
||||
: userType === 'organizations'
|
||||
? 'ORGANIZATION'
|
||||
: undefined,
|
||||
? 'ORGANIZATION'
|
||||
: undefined,
|
||||
tierRequired: tierId,
|
||||
})
|
||||
const members = await this._requestJson({
|
||||
|
||||
@@ -6,7 +6,7 @@ t.create('license (valid)')
|
||||
.expectBadge({ label: 'license', message: 'MIT' })
|
||||
|
||||
// note: packagist does serve up license at the version level
|
||||
// but our endpoint only supports fetching license for the lastest version
|
||||
// but our endpoint only supports fetching license for the latest version
|
||||
t.create('license (invalid, package version in request)')
|
||||
.get('/symfony/symfony/v2.8.0.json')
|
||||
.expectBadge({ label: '404', message: 'badge not found' })
|
||||
|
||||
@@ -20,6 +20,12 @@ export default class PepyDownloads extends BaseJsonService {
|
||||
pattern: 'dt/:packageName',
|
||||
}
|
||||
|
||||
static auth = {
|
||||
passKey: 'pepy_key',
|
||||
authorizedOrigins: ['https://api.pepy.tech'],
|
||||
isRequired: true,
|
||||
}
|
||||
|
||||
static openApi = {
|
||||
'/pepy/dt/{packageName}': {
|
||||
get: {
|
||||
@@ -38,10 +44,12 @@ export default class PepyDownloads extends BaseJsonService {
|
||||
static defaultBadgeData = { label: 'downloads' }
|
||||
|
||||
async fetch({ packageName }) {
|
||||
return this._requestJson({
|
||||
url: `https://api.pepy.tech/api/v2/projects/${packageName}`,
|
||||
schema,
|
||||
})
|
||||
return this._requestJson(
|
||||
this.authHelper.withApiKeyHeader({
|
||||
url: `https://api.pepy.tech/api/v2/projects/${packageName}`,
|
||||
schema,
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
||||
async handle({ packageName }) {
|
||||
|
||||
@@ -22,7 +22,7 @@ t.create('version (semver)').get('/requests.json').expectBadge({
|
||||
message: isSemver,
|
||||
})
|
||||
|
||||
// ..whereas this project does not folow SemVer
|
||||
// ..whereas this project does not follow SemVer
|
||||
t.create('version (not semver)').get('/psycopg2.json').expectBadge({
|
||||
label: 'pypi',
|
||||
message: isPsycopg2Version,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Joi from 'joi'
|
||||
import pep440 from '@renovate/pep440'
|
||||
import pep440 from '@renovatebot/pep440'
|
||||
import { createServiceTester } from '../tester.js'
|
||||
export const t = await createServiceTester()
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@ const description = `<p>
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
Label, message and color seperated by a dash <code>-</code>. For example:<br />
|
||||
Label, message and color separated by a dash <code>-</code>. For example:<br />
|
||||
<img alt="any text: you like" src="https://img.shields.io/badge/any_text-you_like-blue" /> -
|
||||
<a href="https://img.shields.io/badge/any_text-you_like-blue">https://img.shields.io/badge/any_text-you_like-blue</a>
|
||||
</li>
|
||||
<li>
|
||||
Message and color only, seperated by a dash <code>-</code>. For example:<br />
|
||||
Message and color only, separated by a dash <code>-</code>. For example:<br />
|
||||
<img alt="just the message" src="https://img.shields.io/badge/just%20the%20message-8A2BE2" /> -
|
||||
<a href="https://img.shields.io/badge/just%20the%20message-8A2BE2">https://img.shields.io/badge/just%20the%20message-8A2BE2</a>
|
||||
</li>
|
||||
@@ -57,7 +57,7 @@ export default class StaticBadge extends BaseStaticService {
|
||||
{
|
||||
name: 'badgeContent',
|
||||
description:
|
||||
'Label, (optional) message, and color. Seperated by dashes',
|
||||
'Label, (optional) message, and color. Separated by dashes',
|
||||
in: 'path',
|
||||
required: true,
|
||||
schema: { type: 'string' },
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Joi from 'joi'
|
||||
import { optionalUrl } from '../validators.js'
|
||||
import { BaseJsonService, NotFound } from '../index.js'
|
||||
import { BaseJsonService, NotFound, queryParams } from '../index.js'
|
||||
|
||||
const schema = Joi.object()
|
||||
.keys({
|
||||
@@ -26,17 +26,19 @@ export default class SwaggerValidatorService extends BaseJsonService {
|
||||
queryParamSchema,
|
||||
}
|
||||
|
||||
static examples = [
|
||||
{
|
||||
title: 'Swagger Validator',
|
||||
staticPreview: this.render({ status: 'valid' }),
|
||||
namedParams: {},
|
||||
queryParams: {
|
||||
specUrl:
|
||||
'https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v2.0/json/petstore-expanded.json',
|
||||
static openApi = {
|
||||
'/swagger/valid/3.0': {
|
||||
get: {
|
||||
summary: 'Swagger Validator',
|
||||
parameters: queryParams({
|
||||
name: 'specUrl',
|
||||
required: true,
|
||||
example:
|
||||
'https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v2.0/json/petstore-expanded.json',
|
||||
}),
|
||||
},
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
static defaultBadgeData = {
|
||||
label: 'swagger',
|
||||
|
||||
@@ -59,8 +59,8 @@ function compareDottedVersion(v1, v2) {
|
||||
return distinguisher1 < distinguisher2
|
||||
? -1
|
||||
: distinguisher1 > distinguisher2
|
||||
? 1
|
||||
: 0
|
||||
? 1
|
||||
: 0
|
||||
}
|
||||
}
|
||||
return v1 < v2 ? -1 : v1 > v2 ? 1 : 0
|
||||
|
||||
@@ -5,10 +5,11 @@
|
||||
*/
|
||||
|
||||
import Joi from 'joi'
|
||||
import { queryParams as qP } from './index.js'
|
||||
|
||||
/**
|
||||
* Joi schema for validating query params.
|
||||
* Checks if the query params obect has valid up_message, down_message, up_color and down_color properties.
|
||||
* Checks if the query params object has valid up_message, down_message, up_color and down_color properties.
|
||||
*
|
||||
* @type {Joi}
|
||||
*/
|
||||
@@ -20,17 +21,18 @@ const queryParamSchema = Joi.object({
|
||||
}).required()
|
||||
|
||||
/**
|
||||
* Example query param object.
|
||||
* Contains up_message, down_message, up_color and down_color properties.
|
||||
* Array of OpenAPI Parameter Objects describing the
|
||||
* up_message, down_message, up_color and down_color
|
||||
* query params
|
||||
*
|
||||
* @type {object}
|
||||
* @type {Array.<module:core/base-service/openapi~OpenApiParam>}
|
||||
*/
|
||||
const exampleQueryParams = {
|
||||
up_message: 'online',
|
||||
up_color: 'blue',
|
||||
down_message: 'offline',
|
||||
down_color: 'lightgrey',
|
||||
}
|
||||
const queryParams = qP(
|
||||
{ name: 'up_message', example: 'online' },
|
||||
{ name: 'up_color', example: 'blue' },
|
||||
{ name: 'down_message', example: 'offline' },
|
||||
{ name: 'down_color', example: 'lightgrey' },
|
||||
)
|
||||
|
||||
/**
|
||||
* Creates a badge object that displays information about website status.
|
||||
@@ -60,4 +62,4 @@ function renderWebsiteStatus({
|
||||
}
|
||||
}
|
||||
|
||||
export { queryParamSchema, exampleQueryParams, renderWebsiteStatus }
|
||||
export { queryParamSchema, queryParams, renderWebsiteStatus }
|
||||
|
||||
@@ -3,23 +3,16 @@ import emojic from 'emojic'
|
||||
import { optionalUrl } from '../validators.js'
|
||||
import {
|
||||
queryParamSchema,
|
||||
exampleQueryParams,
|
||||
queryParams as websiteQueryParams,
|
||||
renderWebsiteStatus,
|
||||
} from '../website-status.js'
|
||||
import { BaseService } from '../index.js'
|
||||
import { BaseService, queryParams } from '../index.js'
|
||||
import trace from '../../core/base-service/trace.js'
|
||||
|
||||
const documentation = `
|
||||
The badge is of the form
|
||||
\`https://img.shields.io/website/PROTOCOL/URLREST.svg\`.
|
||||
|
||||
The whole URL is obtained by concatenating the \`PROTOCOL\`
|
||||
(\`http\` or \`https\`, for example) with the
|
||||
\`URLREST\` (separating them with \`://\`).
|
||||
|
||||
const description = `
|
||||
The existence of a specific path on the server can be checked by appending
|
||||
a path after the domain name, e.g.
|
||||
\`https://img.shields.io/website/http/www.website.com/path/to/page.html.svg\`.
|
||||
\`https://img.shields.io/website?url=http%3A//www.website.com/path/to/page.html\`.
|
||||
|
||||
The messages and colors for the up and down states can also be customized.
|
||||
`
|
||||
@@ -37,18 +30,19 @@ export default class Website extends BaseService {
|
||||
queryParamSchema: queryParamSchema.concat(urlQueryParamSchema),
|
||||
}
|
||||
|
||||
static examples = [
|
||||
{
|
||||
title: 'Website',
|
||||
namedParams: {},
|
||||
queryParams: {
|
||||
...exampleQueryParams,
|
||||
...{ url: 'https://shields.io' },
|
||||
static openApi = {
|
||||
'/website': {
|
||||
get: {
|
||||
summary: 'Website',
|
||||
description,
|
||||
parameters: queryParams({
|
||||
name: 'url',
|
||||
required: true,
|
||||
example: 'https://shields.io',
|
||||
}).concat(websiteQueryParams),
|
||||
},
|
||||
staticPreview: renderWebsiteStatus({ isUp: true }),
|
||||
documentation,
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
static defaultBadgeData = {
|
||||
label: 'website',
|
||||
|
||||
Reference in New Issue
Block a user