Compare commits
16 Commits
daily-test
...
4.0.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5c8129904f | ||
|
|
677e713310 | ||
|
|
92718ff98b | ||
|
|
0c17d9d44d | ||
|
|
02608e1242 | ||
|
|
250686f147 | ||
|
|
35d5e9d964 | ||
|
|
8eff4f51e4 | ||
|
|
1445c3d21a | ||
|
|
95382dd5ce | ||
|
|
5ae8b29923 | ||
|
|
8303f43f2a | ||
|
|
3509d1faf6 | ||
|
|
283ef0bade | ||
|
|
d2344ed220 | ||
|
|
5aae2fdbd5 |
2
.github/workflows/build-docker-image.yml
vendored
2
.github/workflows/build-docker-image.yml
vendored
@@ -21,7 +21,7 @@ jobs:
|
||||
run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV
|
||||
|
||||
- name: Build
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: false
|
||||
|
||||
4
.github/workflows/create-release.yml
vendored
4
.github/workflows/create-release.yml
vendored
@@ -46,7 +46,7 @@ jobs:
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and push snapshot release to DockerHub
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
@@ -62,7 +62,7 @@ jobs:
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push snapshot release to GHCR
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
|
||||
4
.github/workflows/publish-docker-next.yml
vendored
4
.github/workflows/publish-docker-next.yml
vendored
@@ -30,7 +30,7 @@ jobs:
|
||||
|
||||
- name: Build and push to DockerHub
|
||||
id: docker_build_push
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
@@ -49,7 +49,7 @@ jobs:
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push to GHCR
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
# Changelog
|
||||
|
||||
## 4.0.0 [WIP]
|
||||
## 4.0.0
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
- Drop compatibility with Node < 16
|
||||
|
||||
### Features
|
||||
|
||||
- Add `links` and `logoBase64` params
|
||||
|
||||
## 3.3.1
|
||||
|
||||
- Improve font measuring in for-the-badge and social styles
|
||||
|
||||
@@ -67,6 +67,8 @@ The format is the following:
|
||||
message: 'passed', // (Required) Badge message
|
||||
labelColor: '#555', // (Optional) Label color
|
||||
color: '#4c1', // (Optional) Message color
|
||||
logoBase64: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2NCIgaGVpZ2h0PSI2NCI+PHJlY3Qgd2lkdGg9IjY0IiBoZWlnaHQ9IjY0IiByeD0iOCIgZmlsbD0iI2IxY2U1NiIvPjxwYXRoIGQ9Ik04IDBoMjR2NjRIOGMtNC40MzIgMC04LTMuNTY4LTgtOFY4YzAtNC40MzIgMy41NjgtOCA4LTh6IiBmaWxsPSIjNWQ1ZDVkIi8+PC9zdmc+' // (Optional) Any custom logo can be passed in a URL parameter by base64 encoding
|
||||
links: ['https://example.com', 'https://example.com'], // (Optional) Links array of maximum two links
|
||||
|
||||
// (Optional) One of: 'plastic', 'flat', 'flat-square', 'for-the-badge' or 'social'
|
||||
// Each offers a different visual design.
|
||||
|
||||
2
badge-maker/index.d.ts
vendored
2
badge-maker/index.d.ts
vendored
@@ -4,6 +4,8 @@ interface Format {
|
||||
labelColor?: string
|
||||
color?: string
|
||||
style?: 'plastic' | 'flat' | 'flat-square' | 'for-the-badge' | 'social'
|
||||
logoBase64?: string
|
||||
links?: Array<string>
|
||||
}
|
||||
|
||||
export declare class ValidationError extends Error {}
|
||||
|
||||
@@ -16,13 +16,30 @@ function _validate(format) {
|
||||
throw new ValidationError('Field `message` is required')
|
||||
}
|
||||
|
||||
const stringFields = ['labelColor', 'color', 'message', 'label']
|
||||
const stringFields = ['labelColor', 'color', 'message', 'label', 'logoBase64']
|
||||
stringFields.forEach(function (field) {
|
||||
if (field in format && typeof format[field] !== 'string') {
|
||||
throw new ValidationError(`Field \`${field}\` must be of type string`)
|
||||
}
|
||||
})
|
||||
|
||||
if ('links' in format) {
|
||||
if (!Array.isArray(format.links)) {
|
||||
throw new ValidationError('Field `links` must be an array of strings')
|
||||
} else {
|
||||
if (format.links.length > 2) {
|
||||
throw new ValidationError(
|
||||
'Field `links` must not have more than 2 elements',
|
||||
)
|
||||
}
|
||||
format.links.forEach(function (field) {
|
||||
if (typeof field !== 'string') {
|
||||
throw new ValidationError('Field `links` must be an array of strings')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const styleValues = [
|
||||
'plastic',
|
||||
'flat',
|
||||
@@ -38,11 +55,21 @@ function _validate(format) {
|
||||
}
|
||||
|
||||
function _clean(format) {
|
||||
const expectedKeys = ['label', 'message', 'labelColor', 'color', 'style']
|
||||
const expectedKeys = [
|
||||
'label',
|
||||
'message',
|
||||
'labelColor',
|
||||
'color',
|
||||
'style',
|
||||
'logoBase64',
|
||||
'links',
|
||||
]
|
||||
|
||||
const cleaned = {}
|
||||
Object.keys(format).forEach(key => {
|
||||
if (format[key] != null && expectedKeys.includes(key)) {
|
||||
if (format[key] != null && key === 'logoBase64') {
|
||||
cleaned.logo = format[key]
|
||||
} else if (format[key] != null && expectedKeys.includes(key)) {
|
||||
cleaned[key] = format[key]
|
||||
} else {
|
||||
throw new ValidationError(
|
||||
@@ -65,7 +92,9 @@ function _clean(format) {
|
||||
* @param {string} format.message (Required) Badge message (e.g: 'passing')
|
||||
* @param {string} format.labelColor (Optional) Label color
|
||||
* @param {string} format.color (Optional) Message color
|
||||
* @param {string} format.style (Optional) Visual style e.g: 'flat'
|
||||
* @param {string} format.style (Optional) Visual style (e.g: 'flat')
|
||||
* @param {string} format.logoBase64 (Optional) Logo data URL
|
||||
* @param {Array} format.links (Optional) Links array (e.g: ['https://example.com', 'https://example.com'])
|
||||
* @returns {string} Badge in SVG format
|
||||
* @see https://github.com/badges/shields/tree/master/badge-maker/README.md
|
||||
*/
|
||||
|
||||
@@ -25,6 +25,21 @@ describe('makeBadge function', function () {
|
||||
style: 'flat',
|
||||
}),
|
||||
).to.satisfy(isSvg)
|
||||
expect(
|
||||
makeBadge({
|
||||
label: 'build',
|
||||
message: 'passed',
|
||||
color: 'green',
|
||||
style: 'flat',
|
||||
labelColor: 'blue',
|
||||
logoBase64: 'data:image/svg+xml;base64,PHN2ZyB4bWxu',
|
||||
links: ['https://example.com', 'https://example.com'],
|
||||
}),
|
||||
)
|
||||
.to.satisfy(isSvg)
|
||||
// explicitly make an assertion about logoBase64
|
||||
// this param is not a straight passthrough
|
||||
.and.to.include('data:image/svg+xml;base64,PHN2ZyB4bWxu')
|
||||
})
|
||||
|
||||
it('should throw a ValidationError with invalid inputs', function () {
|
||||
@@ -46,6 +61,21 @@ describe('makeBadge function', function () {
|
||||
expect(() =>
|
||||
makeBadge({ label: 'build', message: 'passed', labelColor: 7 }),
|
||||
).to.throw(ValidationError, 'Field `labelColor` must be of type string')
|
||||
expect(() =>
|
||||
makeBadge({ label: 'build', message: 'passed', logoBase64: 7 }),
|
||||
).to.throw(ValidationError, 'Field `logoBase64` must be of type string')
|
||||
expect(() =>
|
||||
makeBadge({ label: 'build', message: 'passed', links: 'test' }),
|
||||
).to.throw(ValidationError, 'Field `links` must be an array of strings')
|
||||
expect(() =>
|
||||
makeBadge({ label: 'build', message: 'passed', links: [1] }),
|
||||
).to.throw(ValidationError, 'Field `links` must be an array of strings')
|
||||
expect(() =>
|
||||
makeBadge({ label: 'build', message: 'passed', links: ['1', '2', '3'] }),
|
||||
).to.throw(
|
||||
ValidationError,
|
||||
'Field `links` must not have more than 2 elements',
|
||||
)
|
||||
expect(() =>
|
||||
makeBadge({ label: 'build', message: 'passed', format: 'png' }),
|
||||
).to.throw(ValidationError, "Unexpected field 'format'")
|
||||
|
||||
@@ -17,7 +17,6 @@ module.exports = function makeBadge({
|
||||
color,
|
||||
labelColor,
|
||||
logo,
|
||||
logoPosition,
|
||||
logoSize,
|
||||
logoWidth,
|
||||
links = ['', ''],
|
||||
@@ -55,7 +54,6 @@ module.exports = function makeBadge({
|
||||
message,
|
||||
links,
|
||||
logo,
|
||||
logoPosition,
|
||||
logoWidth,
|
||||
logoSize,
|
||||
logoPadding: logo && label.length ? 3 : 0,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "badge-maker",
|
||||
"version": "3.3.1",
|
||||
"version": "4.0.0",
|
||||
"description": "Shields.io badge library",
|
||||
"keywords": [
|
||||
"GitHub",
|
||||
|
||||
@@ -66,7 +66,6 @@ const serviceDataSchema = Joi.object({
|
||||
logoSvg: Joi.string(),
|
||||
logoColor: optionalStringWhenNamedLogoPresent,
|
||||
logoWidth: optionalNumberWhenAnyLogoPresent,
|
||||
logoPosition: optionalNumberWhenAnyLogoPresent,
|
||||
cacheSeconds: Joi.number().integer().min(0),
|
||||
style: Joi.string(),
|
||||
})
|
||||
|
||||
@@ -378,7 +378,6 @@ describe('BaseService', function () {
|
||||
logo: undefined,
|
||||
logoWidth: undefined,
|
||||
logoSize: undefined,
|
||||
logoPosition: undefined,
|
||||
links: [],
|
||||
labelColor: undefined,
|
||||
cacheLengthSeconds: undefined,
|
||||
|
||||
@@ -23,9 +23,8 @@ import toArray from './to-array.js'
|
||||
// base64-encoded logos). Otherwise the default color is used. If the color
|
||||
// is specified for a multicolor Shield logo, the named logo will be used and
|
||||
// colored. The appearance of the logo can be customized using `logoWidth`,
|
||||
// and in the case of the popout badge, `logoPosition`. When `?logo=` is
|
||||
// specified, any logo-related parameters specified dynamically by the
|
||||
// service, or by default in the service, are ignored.
|
||||
// When `?logo=` is specified, any logo-related parameters specified
|
||||
// dynamically by the service, or by default in the service, are ignored.
|
||||
// 2. The second precedence is the dynamic logo returned by a service. This is
|
||||
// used only by the Endpoint badge. The `logoColor` can be overridden by the
|
||||
// query string.
|
||||
@@ -56,7 +55,6 @@ export default function coalesceBadge(
|
||||
} = overrides
|
||||
let {
|
||||
logoWidth: overrideLogoWidth,
|
||||
logoPosition: overrideLogoPosition,
|
||||
logoSize: overrideLogoSize,
|
||||
color: overrideColor,
|
||||
labelColor: overrideLabelColor,
|
||||
@@ -78,7 +76,6 @@ export default function coalesceBadge(
|
||||
overrideLabelColor = `${overrideLabelColor}`
|
||||
}
|
||||
overrideLogoWidth = +overrideLogoWidth || undefined
|
||||
overrideLogoPosition = +overrideLogoPosition || undefined
|
||||
|
||||
const {
|
||||
isError,
|
||||
@@ -91,7 +88,6 @@ export default function coalesceBadge(
|
||||
logoColor: serviceLogoColor,
|
||||
logoSize: serviceLogoSize,
|
||||
logoWidth: serviceLogoWidth,
|
||||
logoPosition: serviceLogoPosition,
|
||||
link: serviceLink,
|
||||
cacheSeconds: serviceCacheSeconds,
|
||||
style: serviceStyle,
|
||||
@@ -122,12 +118,7 @@ export default function coalesceBadge(
|
||||
style = 'flat'
|
||||
}
|
||||
|
||||
let namedLogo,
|
||||
namedLogoColor,
|
||||
logoSize,
|
||||
logoWidth,
|
||||
logoPosition,
|
||||
logoSvgBase64
|
||||
let namedLogo, namedLogoColor, logoSize, logoWidth, logoSvgBase64
|
||||
if (overrideLogo) {
|
||||
// `?logo=` could be a named logo or encoded svg.
|
||||
const overrideLogoSvgBase64 = decodeDataUrlFromQueryParam(overrideLogo)
|
||||
@@ -143,7 +134,6 @@ export default function coalesceBadge(
|
||||
// original width or position.
|
||||
logoSize = overrideLogoSize
|
||||
logoWidth = overrideLogoWidth
|
||||
logoPosition = overrideLogoPosition
|
||||
} else {
|
||||
if (serviceLogoSvg) {
|
||||
logoSvgBase64 = svg2base64(serviceLogoSvg)
|
||||
@@ -156,7 +146,6 @@ export default function coalesceBadge(
|
||||
}
|
||||
logoSize = coalesce(overrideLogoSize, serviceLogoSize)
|
||||
logoWidth = coalesce(overrideLogoWidth, serviceLogoWidth)
|
||||
logoPosition = coalesce(overrideLogoPosition, serviceLogoPosition)
|
||||
}
|
||||
if (namedLogo) {
|
||||
const iconSize = getIconSize(String(namedLogo).toLowerCase())
|
||||
@@ -195,7 +184,6 @@ export default function coalesceBadge(
|
||||
namedLogo,
|
||||
logo: logoSvgBase64,
|
||||
logoWidth,
|
||||
logoPosition,
|
||||
logoSize,
|
||||
links: toArray(overrideLink || serviceLink),
|
||||
cacheLengthSeconds: coalesce(serviceCacheSeconds, defaultCacheSeconds),
|
||||
|
||||
@@ -195,14 +195,13 @@ describe('coalesceBadge', function () {
|
||||
).to.equal(getSimpleIcon({ name: 'npm', color: 'blue' })).and.not.be.empty
|
||||
})
|
||||
|
||||
it("when the logo is overridden, it ignores the service's logo color, position, and width", function () {
|
||||
it("when the logo is overridden, it ignores the service's logo color and width", function () {
|
||||
expect(
|
||||
coalesceBadge(
|
||||
{ logo: 'npm' },
|
||||
{
|
||||
namedLogo: 'appveyor',
|
||||
logoColor: 'red',
|
||||
logoPosition: -3,
|
||||
logoWidth: 100,
|
||||
},
|
||||
{},
|
||||
@@ -288,20 +287,6 @@ describe('coalesceBadge', function () {
|
||||
})
|
||||
})
|
||||
|
||||
describe('Logo position', function () {
|
||||
it('overrides the logoPosition', function () {
|
||||
expect(coalesceBadge({ logoPosition: -10 }, {}, {})).to.include({
|
||||
logoPosition: -10,
|
||||
})
|
||||
})
|
||||
|
||||
it('applies the logo position', function () {
|
||||
expect(
|
||||
coalesceBadge({}, { namedLogo: 'npm', logoPosition: -10 }, {}),
|
||||
).to.include({ logoPosition: -10 })
|
||||
})
|
||||
})
|
||||
|
||||
describe('Links', function () {
|
||||
it('overrides the links', function () {
|
||||
expect(
|
||||
|
||||
@@ -11,7 +11,6 @@ const globalQueryParams = new Set([
|
||||
'link',
|
||||
'logo',
|
||||
'logoColor',
|
||||
'logoPosition',
|
||||
'logoSize',
|
||||
'logoWidth',
|
||||
'link',
|
||||
|
||||
223
package-lock.json
generated
223
package-lock.json
generated
@@ -11,7 +11,7 @@
|
||||
"dependencies": {
|
||||
"@renovatebot/pep440": "^3.0.20",
|
||||
"@renovatebot/ruby-semver": "^3.0.23",
|
||||
"@sentry/node": "^8.9.2",
|
||||
"@sentry/node": "^8.11.0",
|
||||
"@shields_io/camp": "^18.1.2",
|
||||
"@xmldom/xmldom": "0.8.10",
|
||||
"badge-maker": "file:badge-maker",
|
||||
@@ -27,12 +27,12 @@
|
||||
"emojic": "^1.1.17",
|
||||
"escape-string-regexp": "^4.0.0",
|
||||
"fast-xml-parser": "^4.4.0",
|
||||
"glob": "^10.4.1",
|
||||
"glob": "^10.4.2",
|
||||
"global-agent": "^3.0.0",
|
||||
"got": "^14.4.1",
|
||||
"graphql": "16.8.2",
|
||||
"graphql-tag": "^2.12.6",
|
||||
"joi": "17.13.1",
|
||||
"joi": "17.13.3",
|
||||
"joi-extension-semver": "5.0.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"jsonpath": "~1.1.1",
|
||||
@@ -41,7 +41,7 @@
|
||||
"lodash.times": "^4.3.2",
|
||||
"matcher": "^5.0.0",
|
||||
"node-env-flag": "^0.1.0",
|
||||
"node-pg-migrate": "^7.4.0",
|
||||
"node-pg-migrate": "^7.5.0",
|
||||
"parse-link-header": "^2.0.0",
|
||||
"path-to-regexp": "^6.2.2",
|
||||
"pg": "^8.12.0",
|
||||
@@ -60,9 +60,9 @@
|
||||
"devDependencies": {
|
||||
"@docusaurus/core": "^3.4.0",
|
||||
"@docusaurus/preset-classic": "^3.4.0",
|
||||
"@easyops-cn/docusaurus-search-local": "^0.44.0",
|
||||
"@easyops-cn/docusaurus-search-local": "^0.44.2",
|
||||
"@mdx-js/react": "^3.0.1",
|
||||
"@typescript-eslint/parser": "^7.13.0",
|
||||
"@typescript-eslint/parser": "^7.13.1",
|
||||
"c8": "^10.1.2",
|
||||
"caller": "^1.1.0",
|
||||
"chai": "^4.4.1",
|
||||
@@ -72,9 +72,9 @@
|
||||
"child-process-promise": "^2.2.1",
|
||||
"clsx": "^2.1.1",
|
||||
"concurrently": "^8.2.2",
|
||||
"cypress": "^13.11.0",
|
||||
"cypress": "^13.12.0",
|
||||
"cypress-wait-for-stable-dom": "^0.1.0",
|
||||
"danger": "^12.3.1",
|
||||
"danger": "^12.3.3",
|
||||
"deepmerge": "^4.3.1",
|
||||
"docusaurus-preset-openapi": "0.7.5",
|
||||
"eslint": "8.57.0",
|
||||
@@ -91,7 +91,7 @@
|
||||
"eslint-plugin-no-extension-in-require": "^0.2.0",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-promise": "6.2.0",
|
||||
"eslint-plugin-react": "^7.34.2",
|
||||
"eslint-plugin-react": "^7.34.3",
|
||||
"eslint-plugin-react-hooks": "^4.6.2",
|
||||
"eslint-plugin-sort-class-members": "^1.20.0",
|
||||
"form-data": "^4.0.0",
|
||||
@@ -108,7 +108,7 @@
|
||||
"mocha-yaml-loader": "^1.0.3",
|
||||
"nock": "13.5.4",
|
||||
"node-mocks-http": "^1.14.1",
|
||||
"nodemon": "^3.1.3",
|
||||
"nodemon": "^3.1.4",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"open-cli": "^8.0.0",
|
||||
"portfinder": "^1.0.32",
|
||||
@@ -124,7 +124,7 @@
|
||||
"sinon-chai": "^3.7.0",
|
||||
"snap-shot-it": "^7.9.10",
|
||||
"start-server-and-test": "2.0.4",
|
||||
"tsd": "^0.31.0",
|
||||
"tsd": "^0.31.1",
|
||||
"url": "^0.11.3"
|
||||
},
|
||||
"engines": {
|
||||
@@ -133,7 +133,7 @@
|
||||
}
|
||||
},
|
||||
"badge-maker": {
|
||||
"version": "3.3.1",
|
||||
"version": "4.0.0",
|
||||
"license": "CC0-1.0",
|
||||
"dependencies": {
|
||||
"anafanafo": "2.0.0",
|
||||
@@ -3291,9 +3291,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@easyops-cn/docusaurus-search-local": {
|
||||
"version": "0.44.0",
|
||||
"resolved": "https://registry.npmjs.org/@easyops-cn/docusaurus-search-local/-/docusaurus-search-local-0.44.0.tgz",
|
||||
"integrity": "sha512-sgLpvkRtYuEGvd4peYQW2oInI4JkcQfxo7HgEnkhcxn9kxDY5laA8DiCx9qMKAkM9cMed9e8IsLk5gBeDh8Rqw==",
|
||||
"version": "0.44.2",
|
||||
"resolved": "https://registry.npmjs.org/@easyops-cn/docusaurus-search-local/-/docusaurus-search-local-0.44.2.tgz",
|
||||
"integrity": "sha512-4tMBU54R1O6ITxkMGwOEifSHNkZLa2fb4ajGc8rd6TYZ0a8+jlu/u/5gYtw1s6sGGMRkwyG+QI6HD0bEnCRa1w==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@docusaurus/plugin-content-docs": "^2 || ^3",
|
||||
@@ -4941,21 +4941,21 @@
|
||||
"integrity": "sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg=="
|
||||
},
|
||||
"node_modules/@sentry/core": {
|
||||
"version": "8.9.2",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.9.2.tgz",
|
||||
"integrity": "sha512-ixm8NISFlPlEo3FjSaqmq4nnd13BRHoafwJ5MG+okCz6BKGZ1SexEggP42/QpGvDprUUHnfncG6WUMgcarr1zA==",
|
||||
"version": "8.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.11.0.tgz",
|
||||
"integrity": "sha512-rZaM55j5Fw0IGb8lNXOTVoq7WR6JmUzm9x5cURGsjL9gzAurGl817oK3iyOvYQ3JZnfijjh0QF0SQr4NZHKbIg==",
|
||||
"dependencies": {
|
||||
"@sentry/types": "8.9.2",
|
||||
"@sentry/utils": "8.9.2"
|
||||
"@sentry/types": "8.11.0",
|
||||
"@sentry/utils": "8.11.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.18"
|
||||
}
|
||||
},
|
||||
"node_modules/@sentry/node": {
|
||||
"version": "8.9.2",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/node/-/node-8.9.2.tgz",
|
||||
"integrity": "sha512-Q+JBpR4yx3eUyyhwgugucfRtPg65gYvzJGEmjzcnDJXJqX8ms4HPpNv9o2Om7A4014JxIibUdrQ+p5idcT7SZA==",
|
||||
"version": "8.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/node/-/node-8.11.0.tgz",
|
||||
"integrity": "sha512-hvPa2aUz1NAJ5AEcXVbll7ZM0LFgfYCvNBn6ZWb7d+segv/vbGwusTT1Xs7OlbF0UrNAx6rX5BJSAjQXQ2dlHg==",
|
||||
"dependencies": {
|
||||
"@opentelemetry/api": "^1.9.0",
|
||||
"@opentelemetry/context-async-hooks": "^1.25.0",
|
||||
@@ -4980,10 +4980,10 @@
|
||||
"@opentelemetry/sdk-trace-base": "^1.25.0",
|
||||
"@opentelemetry/semantic-conventions": "^1.25.0",
|
||||
"@prisma/instrumentation": "5.15.0",
|
||||
"@sentry/core": "8.9.2",
|
||||
"@sentry/opentelemetry": "8.9.2",
|
||||
"@sentry/types": "8.9.2",
|
||||
"@sentry/utils": "8.9.2"
|
||||
"@sentry/core": "8.11.0",
|
||||
"@sentry/opentelemetry": "8.11.0",
|
||||
"@sentry/types": "8.11.0",
|
||||
"@sentry/utils": "8.11.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.18"
|
||||
@@ -4993,13 +4993,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@sentry/opentelemetry": {
|
||||
"version": "8.9.2",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/opentelemetry/-/opentelemetry-8.9.2.tgz",
|
||||
"integrity": "sha512-Q6SHDQhrsBPcMi7ejqVdNTkt6SCTIhpGsFN8QR7daH3uvM0X2O7ciCuO9gRNRTEkflEINV4SBZEjANYH7BkRAg==",
|
||||
"version": "8.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/opentelemetry/-/opentelemetry-8.11.0.tgz",
|
||||
"integrity": "sha512-OukaRoGNZbnCSN/neJGI72GwxpSZ0jg/44Rc8C//d8JKIFAZUn2in61k7fSbET0PSTKxw5erguvjcv/9BvLJOg==",
|
||||
"dependencies": {
|
||||
"@sentry/core": "8.9.2",
|
||||
"@sentry/types": "8.9.2",
|
||||
"@sentry/utils": "8.9.2"
|
||||
"@sentry/core": "8.11.0",
|
||||
"@sentry/types": "8.11.0",
|
||||
"@sentry/utils": "8.11.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.18"
|
||||
@@ -5013,19 +5013,19 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@sentry/types": {
|
||||
"version": "8.9.2",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.9.2.tgz",
|
||||
"integrity": "sha512-+LFOyQGl+zk5SZRGZD2MEURf7i5RHgP/mt3s85Rza+vz8M211WJ0YsjkIGUJFSY842nged5QLx4JysLaBlLymg==",
|
||||
"version": "8.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.11.0.tgz",
|
||||
"integrity": "sha512-kz9/d2uw7wEXcK8DnCrCuMI75hZnpVAjYr8mq1uatltOx+2JOYPNdaK6ispxXlhb5KXOnVWNgfVDbGlLp0w+Gg==",
|
||||
"engines": {
|
||||
"node": ">=14.18"
|
||||
}
|
||||
},
|
||||
"node_modules/@sentry/utils": {
|
||||
"version": "8.9.2",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.9.2.tgz",
|
||||
"integrity": "sha512-A4srR9mEBFdVXwSEKjQ94msUbVkMr8JeFiEj9ouOFORw/Y/ux/WV2bWVD/ZI9wq0TcTNK8L1wBgU8UMS5lIq3A==",
|
||||
"version": "8.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.11.0.tgz",
|
||||
"integrity": "sha512-iDt5YVMYNgT151bPYVGo8XlpM0MHWy8DH+czmAiAlFTV7ns7lAeHGF6tsFYo7wOZOPDHxtF6F2CM7AvuYnOZGw==",
|
||||
"dependencies": {
|
||||
"@sentry/types": "8.9.2"
|
||||
"@sentry/types": "8.11.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.18"
|
||||
@@ -6033,15 +6033,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser": {
|
||||
"version": "7.13.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.13.0.tgz",
|
||||
"integrity": "sha512-EjMfl69KOS9awXXe83iRN7oIEXy9yYdqWfqdrFAYAAr6syP8eLEFI7ZE4939antx2mNgPRW/o1ybm2SFYkbTVA==",
|
||||
"version": "7.13.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.13.1.tgz",
|
||||
"integrity": "sha512-1ELDPlnLvDQ5ybTSrMhRTFDfOQEOXNM+eP+3HT/Yq7ruWpciQw+Avi73pdEbA4SooCawEWo3dtYbF68gN7Ed1A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "7.13.0",
|
||||
"@typescript-eslint/types": "7.13.0",
|
||||
"@typescript-eslint/typescript-estree": "7.13.0",
|
||||
"@typescript-eslint/visitor-keys": "7.13.0",
|
||||
"@typescript-eslint/scope-manager": "7.13.1",
|
||||
"@typescript-eslint/types": "7.13.1",
|
||||
"@typescript-eslint/typescript-estree": "7.13.1",
|
||||
"@typescript-eslint/visitor-keys": "7.13.1",
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"engines": {
|
||||
@@ -6061,13 +6061,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "7.13.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.13.0.tgz",
|
||||
"integrity": "sha512-ZrMCe1R6a01T94ilV13egvcnvVJ1pxShkE0+NDjDzH4nvG1wXpwsVI5bZCvE7AEDH1mXEx5tJSVR68bLgG7Dng==",
|
||||
"version": "7.13.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.13.1.tgz",
|
||||
"integrity": "sha512-adbXNVEs6GmbzaCpymHQ0MB6E4TqoiVbC0iqG3uijR8ZYfpAXMGttouQzF4Oat3P2GxDVIrg7bMI/P65LiQZdg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "7.13.0",
|
||||
"@typescript-eslint/visitor-keys": "7.13.0"
|
||||
"@typescript-eslint/types": "7.13.1",
|
||||
"@typescript-eslint/visitor-keys": "7.13.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || >=20.0.0"
|
||||
@@ -6078,9 +6078,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/types": {
|
||||
"version": "7.13.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.13.0.tgz",
|
||||
"integrity": "sha512-QWuwm9wcGMAuTsxP+qz6LBBd3Uq8I5Nv8xb0mk54jmNoCyDspnMvVsOxI6IsMmway5d1S9Su2+sCKv1st2l6eA==",
|
||||
"version": "7.13.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.13.1.tgz",
|
||||
"integrity": "sha512-7K7HMcSQIAND6RBL4kDl24sG/xKM13cA85dc7JnmQXw2cBDngg7c19B++JzvJHRG3zG36n9j1i451GBzRuHchw==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "^18.18.0 || >=20.0.0"
|
||||
@@ -6091,13 +6091,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/typescript-estree": {
|
||||
"version": "7.13.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.13.0.tgz",
|
||||
"integrity": "sha512-cAvBvUoobaoIcoqox1YatXOnSl3gx92rCZoMRPzMNisDiM12siGilSM4+dJAekuuHTibI2hVC2fYK79iSFvWjw==",
|
||||
"version": "7.13.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.13.1.tgz",
|
||||
"integrity": "sha512-uxNr51CMV7npU1BxZzYjoVz9iyjckBduFBP0S5sLlh1tXYzHzgZ3BR9SVsNed+LmwKrmnqN3Kdl5t7eZ5TS1Yw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "7.13.0",
|
||||
"@typescript-eslint/visitor-keys": "7.13.0",
|
||||
"@typescript-eslint/types": "7.13.1",
|
||||
"@typescript-eslint/visitor-keys": "7.13.1",
|
||||
"debug": "^4.3.4",
|
||||
"globby": "^11.1.0",
|
||||
"is-glob": "^4.0.3",
|
||||
@@ -6143,12 +6143,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/visitor-keys": {
|
||||
"version": "7.13.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.13.0.tgz",
|
||||
"integrity": "sha512-nxn+dozQx+MK61nn/JP+M4eCkHDSxSLDpgE3WcQo0+fkjEolnaB5jswvIKC4K56By8MMgIho7f1PVxERHEo8rw==",
|
||||
"version": "7.13.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.13.1.tgz",
|
||||
"integrity": "sha512-k/Bfne7lrP7hcb7m9zSsgcBmo+8eicqqfNAJ7uUY+jkTFpKeH2FSkWpFRtimBxgkyvqfu9jTPRbYOvud6isdXA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "7.13.0",
|
||||
"@typescript-eslint/types": "7.13.1",
|
||||
"eslint-visitor-keys": "^3.4.3"
|
||||
},
|
||||
"engines": {
|
||||
@@ -6848,16 +6848,19 @@
|
||||
}
|
||||
},
|
||||
"node_modules/array.prototype.tosorted": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.3.tgz",
|
||||
"integrity": "sha512-/DdH4TiTmOKzyQbp/eadcCVexiCb36xJg7HshYOYJnNZFDj33GEv0P7GxsynpShhq4OLYJzbGcBDkLsDt7MnNg==",
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz",
|
||||
"integrity": "sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.5",
|
||||
"call-bind": "^1.0.7",
|
||||
"define-properties": "^1.2.1",
|
||||
"es-abstract": "^1.22.3",
|
||||
"es-errors": "^1.1.0",
|
||||
"es-abstract": "^1.23.3",
|
||||
"es-errors": "^1.3.0",
|
||||
"es-shim-unscopables": "^1.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/arraybuffer.prototype.slice": {
|
||||
@@ -9604,9 +9607,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/cypress": {
|
||||
"version": "13.11.0",
|
||||
"resolved": "https://registry.npmjs.org/cypress/-/cypress-13.11.0.tgz",
|
||||
"integrity": "sha512-NXXogbAxVlVje4XHX+Cx5eMFZv4Dho/2rIcdBHg9CNPFUGZdM4cRdgIgM7USmNYsC12XY0bZENEQ+KBk72fl+A==",
|
||||
"version": "13.12.0",
|
||||
"resolved": "https://registry.npmjs.org/cypress/-/cypress-13.12.0.tgz",
|
||||
"integrity": "sha512-udzS2JilmI9ApO/UuqurEwOvThclin5ntz7K0BtnHBs+tg2Bl9QShLISXpSEMDv/u8b6mqdoAdyKeZiSqKWL8g==",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
@@ -9764,9 +9767,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/danger": {
|
||||
"version": "12.3.1",
|
||||
"resolved": "https://registry.npmjs.org/danger/-/danger-12.3.1.tgz",
|
||||
"integrity": "sha512-K5ydQs6fTl6+iAWZJ5Fk238YmGMGnDx/5ZD7ZBTK4NgztAxXIupWVEYUACFy/lUpvih6EDKocn12OF1MS3UsLQ==",
|
||||
"version": "12.3.3",
|
||||
"resolved": "https://registry.npmjs.org/danger/-/danger-12.3.3.tgz",
|
||||
"integrity": "sha512-nZKzpgXN21rr4dwa6bFhM7G2JEa79dZRJiT3RVRSyi4yk1/hgZ2f8HDGoa7tMladTmu8WjJFyE3LpBIihh+aDw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@gitbeaker/rest": "^38.0.0",
|
||||
@@ -12088,16 +12091,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-react": {
|
||||
"version": "7.34.2",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.34.2.tgz",
|
||||
"integrity": "sha512-2HCmrU+/JNigDN6tg55cRDKCQWicYAPB38JGSFDQt95jDm8rrvSUo7YPkOIm5l6ts1j1zCvysNcasvfTMQzUOw==",
|
||||
"version": "7.34.3",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.34.3.tgz",
|
||||
"integrity": "sha512-aoW4MV891jkUulwDApQbPYTVZmeuSyFrudpbTAQuj5Fv8VL+o6df2xIGpw8B0hPjAaih1/Fb0om9grCdyFYemA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"array-includes": "^3.1.8",
|
||||
"array.prototype.findlast": "^1.2.5",
|
||||
"array.prototype.flatmap": "^1.3.2",
|
||||
"array.prototype.toreversed": "^1.1.2",
|
||||
"array.prototype.tosorted": "^1.1.3",
|
||||
"array.prototype.tosorted": "^1.1.4",
|
||||
"doctrine": "^2.1.0",
|
||||
"es-iterator-helpers": "^1.0.19",
|
||||
"estraverse": "^5.3.0",
|
||||
@@ -13842,14 +13845,15 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/glob": {
|
||||
"version": "10.4.1",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-10.4.1.tgz",
|
||||
"integrity": "sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==",
|
||||
"version": "10.4.2",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-10.4.2.tgz",
|
||||
"integrity": "sha512-GwMlUF6PkPo3Gk21UxkCohOv0PLcIXVtKyLlpEI28R/cO/4eNOdmLk3CMW1wROV/WR/EsZOWAfBbBOqYvs88/w==",
|
||||
"dependencies": {
|
||||
"foreground-child": "^3.1.0",
|
||||
"jackspeak": "^3.1.2",
|
||||
"minimatch": "^9.0.4",
|
||||
"minipass": "^7.1.2",
|
||||
"package-json-from-dist": "^1.0.0",
|
||||
"path-scurry": "^1.11.1"
|
||||
},
|
||||
"bin": {
|
||||
@@ -16375,9 +16379,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/joi": {
|
||||
"version": "17.13.1",
|
||||
"resolved": "https://registry.npmjs.org/joi/-/joi-17.13.1.tgz",
|
||||
"integrity": "sha512-vaBlIKCyo4FCUtCm7Eu4QZd/q02bWcxfUO6YSXAZOWF6gzcLBeba8kwotUdYJjDLW8Cz8RywsSOqiNJZW0mNvg==",
|
||||
"version": "17.13.3",
|
||||
"resolved": "https://registry.npmjs.org/joi/-/joi-17.13.3.tgz",
|
||||
"integrity": "sha512-otDA4ldcIx+ZXsKHWmp0YizCweVRZG96J10b0FevjfuncLO1oX59THoAmHkNubYJ+9gWsYsp5k8v4ib6oDv1fA==",
|
||||
"dependencies": {
|
||||
"@hapi/hoek": "^9.3.0",
|
||||
"@hapi/topo": "^5.1.0",
|
||||
@@ -21019,17 +21023,19 @@
|
||||
}
|
||||
},
|
||||
"node_modules/node-pg-migrate": {
|
||||
"version": "7.4.0",
|
||||
"resolved": "https://registry.npmjs.org/node-pg-migrate/-/node-pg-migrate-7.4.0.tgz",
|
||||
"integrity": "sha512-HXvn8mPDsZ8nKVnsPqEhVGTgl0xXWWiw4UQENhG5i+sW5QI4jtN8KNrj/lmMl4MRSu3fMx0WkUSofZjcb8vA0g==",
|
||||
"version": "7.5.0",
|
||||
"resolved": "https://registry.npmjs.org/node-pg-migrate/-/node-pg-migrate-7.5.0.tgz",
|
||||
"integrity": "sha512-6WQEfSUhY4gk4sQVWutBffX9rEG9JnK9ag151G2+EkQwvIkNHMetQ1YT9pMzYP2q+ufyJirJ0FsvXdnJ77Oc1Q==",
|
||||
"dependencies": {
|
||||
"yargs": "~17.7.0"
|
||||
},
|
||||
"bin": {
|
||||
"node-pg-migrate": "bin/node-pg-migrate.js"
|
||||
"node-pg-migrate": "bin/node-pg-migrate.js",
|
||||
"node-pg-migrate-cjs": "bin/node-pg-migrate.js",
|
||||
"node-pg-migrate-esm": "bin/node-pg-migrate.mjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.18.0"
|
||||
"node": ">=18.19.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/pg": ">=6.0.0 <9.0.0",
|
||||
@@ -21167,9 +21173,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/nodemon": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.3.tgz",
|
||||
"integrity": "sha512-m4Vqs+APdKzDFpuaL9F9EVOF85+h070FnkHVEoU4+rmT6Vw0bmNl7s61VEkY/cJkL7RCv1p4urnUDUMrS5rk2w==",
|
||||
"version": "3.1.4",
|
||||
"resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.4.tgz",
|
||||
"integrity": "sha512-wjPBbFhtpJwmIeY2yP7QF+UKzPfltVGtfce1g/bB15/8vCGZj8uxD62b/b9M9/WVgme0NZudpownKN+c0plXlQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"chokidar": "^3.5.2",
|
||||
@@ -22325,6 +22331,11 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/package-json-from-dist": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz",
|
||||
"integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw=="
|
||||
},
|
||||
"node_modules/package-json/node_modules/@sindresorhus/is": {
|
||||
"version": "5.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-5.6.0.tgz",
|
||||
@@ -28412,9 +28423,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/tsd": {
|
||||
"version": "0.31.0",
|
||||
"resolved": "https://registry.npmjs.org/tsd/-/tsd-0.31.0.tgz",
|
||||
"integrity": "sha512-yjBiQ5n8OMv/IZOuhDjBy0ZLCoJ7rky/RxRh5W4sJ0oNNCU/kf6s3puPAkGNi59PptDdkcpUm+RsKSdjR2YbNg==",
|
||||
"version": "0.31.1",
|
||||
"resolved": "https://registry.npmjs.org/tsd/-/tsd-0.31.1.tgz",
|
||||
"integrity": "sha512-sSL84A0SFwx2xGMWrxlGaarKFSQszWjJS2vgNDDLwatytzg2aq6ShlwHsBYxRNmjzXISODwMva5ZOdAg/4AoOA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@tsd/typescript": "~5.4.3",
|
||||
@@ -29755,9 +29766,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/webpack-bundle-analyzer/node_modules/ws": {
|
||||
"version": "7.5.9",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz",
|
||||
"integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==",
|
||||
"version": "7.5.10",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz",
|
||||
"integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=8.3.0"
|
||||
@@ -29943,9 +29954,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/webpack-dev-server/node_modules/ws": {
|
||||
"version": "8.16.0",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz",
|
||||
"integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==",
|
||||
"version": "8.17.1",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz",
|
||||
"integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
@@ -30398,9 +30409,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ws": {
|
||||
"version": "6.2.2",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz",
|
||||
"integrity": "sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw==",
|
||||
"version": "6.2.3",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-6.2.3.tgz",
|
||||
"integrity": "sha512-jmTjYU0j60B+vHey6TfR3Z7RD61z/hmxBS3VMSGIrroOWXQEneK1zNuotOUrGyBHQj0yrpsLHPWtigEFd13ndA==",
|
||||
"dependencies": {
|
||||
"async-limiter": "~1.0.0"
|
||||
}
|
||||
|
||||
22
package.json
22
package.json
@@ -23,7 +23,7 @@
|
||||
"dependencies": {
|
||||
"@renovatebot/pep440": "^3.0.20",
|
||||
"@renovatebot/ruby-semver": "^3.0.23",
|
||||
"@sentry/node": "^8.9.2",
|
||||
"@sentry/node": "^8.11.0",
|
||||
"@shields_io/camp": "^18.1.2",
|
||||
"@xmldom/xmldom": "0.8.10",
|
||||
"badge-maker": "file:badge-maker",
|
||||
@@ -39,12 +39,12 @@
|
||||
"emojic": "^1.1.17",
|
||||
"escape-string-regexp": "^4.0.0",
|
||||
"fast-xml-parser": "^4.4.0",
|
||||
"glob": "^10.4.1",
|
||||
"glob": "^10.4.2",
|
||||
"global-agent": "^3.0.0",
|
||||
"got": "^14.4.1",
|
||||
"graphql": "16.8.2",
|
||||
"graphql-tag": "^2.12.6",
|
||||
"joi": "17.13.1",
|
||||
"joi": "17.13.3",
|
||||
"joi-extension-semver": "5.0.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"jsonpath": "~1.1.1",
|
||||
@@ -53,7 +53,7 @@
|
||||
"lodash.times": "^4.3.2",
|
||||
"matcher": "^5.0.0",
|
||||
"node-env-flag": "^0.1.0",
|
||||
"node-pg-migrate": "^7.4.0",
|
||||
"node-pg-migrate": "^7.5.0",
|
||||
"parse-link-header": "^2.0.0",
|
||||
"path-to-regexp": "^6.2.2",
|
||||
"pg": "^8.12.0",
|
||||
@@ -147,9 +147,9 @@
|
||||
"devDependencies": {
|
||||
"@docusaurus/core": "^3.4.0",
|
||||
"@docusaurus/preset-classic": "^3.4.0",
|
||||
"@easyops-cn/docusaurus-search-local": "^0.44.0",
|
||||
"@easyops-cn/docusaurus-search-local": "^0.44.2",
|
||||
"@mdx-js/react": "^3.0.1",
|
||||
"@typescript-eslint/parser": "^7.13.0",
|
||||
"@typescript-eslint/parser": "^7.13.1",
|
||||
"c8": "^10.1.2",
|
||||
"caller": "^1.1.0",
|
||||
"chai": "^4.4.1",
|
||||
@@ -159,9 +159,9 @@
|
||||
"child-process-promise": "^2.2.1",
|
||||
"clsx": "^2.1.1",
|
||||
"concurrently": "^8.2.2",
|
||||
"cypress": "^13.11.0",
|
||||
"cypress": "^13.12.0",
|
||||
"cypress-wait-for-stable-dom": "^0.1.0",
|
||||
"danger": "^12.3.1",
|
||||
"danger": "^12.3.3",
|
||||
"deepmerge": "^4.3.1",
|
||||
"docusaurus-preset-openapi": "0.7.5",
|
||||
"eslint": "8.57.0",
|
||||
@@ -178,7 +178,7 @@
|
||||
"eslint-plugin-no-extension-in-require": "^0.2.0",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-promise": "6.2.0",
|
||||
"eslint-plugin-react": "^7.34.2",
|
||||
"eslint-plugin-react": "^7.34.3",
|
||||
"eslint-plugin-react-hooks": "^4.6.2",
|
||||
"eslint-plugin-sort-class-members": "^1.20.0",
|
||||
"form-data": "^4.0.0",
|
||||
@@ -195,7 +195,7 @@
|
||||
"mocha-yaml-loader": "^1.0.3",
|
||||
"nock": "13.5.4",
|
||||
"node-mocks-http": "^1.14.1",
|
||||
"nodemon": "^3.1.3",
|
||||
"nodemon": "^3.1.4",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"open-cli": "^8.0.0",
|
||||
"portfinder": "^1.0.32",
|
||||
@@ -211,7 +211,7 @@
|
||||
"sinon-chai": "^3.7.0",
|
||||
"snap-shot-it": "^7.9.10",
|
||||
"start-server-and-test": "2.0.4",
|
||||
"tsd": "^0.31.0",
|
||||
"tsd": "^0.31.1",
|
||||
"url": "^0.11.3"
|
||||
},
|
||||
"engines": {
|
||||
|
||||
@@ -36,9 +36,14 @@ const endpointSchema = Joi.object({
|
||||
logoSvg: Joi.string(),
|
||||
logoColor: optionalStringWhenNamedLogoPresent,
|
||||
logoWidth: optionalNumberWhenAnyLogoPresent,
|
||||
logoPosition: optionalNumberWhenAnyLogoPresent,
|
||||
style: Joi.string(),
|
||||
cacheSeconds: Joi.number().integer().min(0),
|
||||
/*
|
||||
Retained for legacy compatibility
|
||||
Although this does nothing,
|
||||
passing it should not throw an error
|
||||
*/
|
||||
logoPosition: optionalNumberWhenAnyLogoPresent,
|
||||
})
|
||||
// `namedLogo` or `logoSvg`; not both.
|
||||
.oxor('namedLogo', 'logoSvg')
|
||||
|
||||
@@ -102,13 +102,6 @@ The endpoint badge takes a single required query param: <code>url</code>, which
|
||||
the query string.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>logoPosition</code></td>
|
||||
<td>
|
||||
Default: none. Same meaning as the query string. Can be overridden by
|
||||
the query string.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>style</code></td>
|
||||
<td>
|
||||
@@ -157,7 +150,6 @@ export default class Endpoint extends BaseJsonService {
|
||||
logoSvg,
|
||||
logoColor,
|
||||
logoWidth,
|
||||
logoPosition,
|
||||
style,
|
||||
cacheSeconds,
|
||||
}) {
|
||||
@@ -171,7 +163,6 @@ export default class Endpoint extends BaseJsonService {
|
||||
logoSvg,
|
||||
logoColor,
|
||||
logoWidth,
|
||||
logoPosition,
|
||||
style,
|
||||
// don't allow the user to set cacheSeconds any shorter than this._cacheLength
|
||||
cacheSeconds: Math.max(
|
||||
|
||||
@@ -119,6 +119,24 @@ t.create('logoWidth')
|
||||
logoWidth: 30,
|
||||
})
|
||||
|
||||
// The logoPosition param was removed, but passing it should not
|
||||
// throw a validation error. It should just do nothing.
|
||||
t.create('logoPosition')
|
||||
.get('.json?url=https://example.com/badge')
|
||||
.intercept(nock =>
|
||||
nock('https://example.com/').get('/badge').reply(200, {
|
||||
schemaVersion: 1,
|
||||
label: 'hey',
|
||||
message: 'yo',
|
||||
logoSvg,
|
||||
logoPosition: 30,
|
||||
}),
|
||||
)
|
||||
.expectBadge({
|
||||
label: 'hey',
|
||||
message: 'yo',
|
||||
})
|
||||
|
||||
t.create('Invalid schema')
|
||||
.get('.json?url=https://example.com/badge')
|
||||
.intercept(nock =>
|
||||
|
||||
70
services/mbin/mbin.service.js
Normal file
70
services/mbin/mbin.service.js
Normal file
@@ -0,0 +1,70 @@
|
||||
import Joi from 'joi'
|
||||
import { metric } from '../text-formatters.js'
|
||||
import { BaseJsonService, InvalidParameter, pathParams } from '../index.js'
|
||||
|
||||
const schema = Joi.object({
|
||||
subscriptionsCount: Joi.number().required(),
|
||||
}).required()
|
||||
|
||||
export default class Mbin extends BaseJsonService {
|
||||
static category = 'social'
|
||||
|
||||
static route = {
|
||||
base: 'mbin',
|
||||
pattern: ':magazine',
|
||||
}
|
||||
|
||||
static openApi = {
|
||||
'/mbin/{magazine}': {
|
||||
get: {
|
||||
summary: 'Mbin',
|
||||
description:
|
||||
'Mbin is a fork of Kbin, a content aggregator for the Fediverse.',
|
||||
parameters: pathParams({
|
||||
name: 'magazine',
|
||||
description: 'The magazine to query. This is CASE SENSITIVE.',
|
||||
example: 'teletext@fedia.io',
|
||||
}),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
static defaultBadgeData = { label: 'magazine', namedLogo: 'activitypub' }
|
||||
|
||||
static render({ magazine, members }) {
|
||||
return {
|
||||
label: `subscribe to ${magazine}`,
|
||||
message: metric(members),
|
||||
style: 'social',
|
||||
color: 'brightgreen',
|
||||
}
|
||||
}
|
||||
|
||||
async fetch({ magazine }) {
|
||||
const splitAlias = magazine.split('@')
|
||||
// The magazine will be in the format of 'magazine@server'
|
||||
if (splitAlias.length !== 2) {
|
||||
throw new InvalidParameter({
|
||||
prettyMessage: 'invalid magazine',
|
||||
})
|
||||
}
|
||||
|
||||
const mag = splitAlias[0]
|
||||
const host = splitAlias[1]
|
||||
|
||||
const data = await this._requestJson({
|
||||
url: `https://${host}/api/magazine/name/${mag}`,
|
||||
schema,
|
||||
httpErrors: {
|
||||
404: 'magazine not found',
|
||||
},
|
||||
})
|
||||
|
||||
return data.subscriptionsCount
|
||||
}
|
||||
|
||||
async handle({ magazine }) {
|
||||
const members = await this.fetch({ magazine })
|
||||
return this.constructor.render({ magazine, members })
|
||||
}
|
||||
}
|
||||
43
services/mbin/mbin.tester.js
Normal file
43
services/mbin/mbin.tester.js
Normal file
@@ -0,0 +1,43 @@
|
||||
import { isMetric } from '../test-validators.js'
|
||||
import { createServiceTester } from '../tester.js'
|
||||
export const t = await createServiceTester()
|
||||
|
||||
t.create('get magazine subscribers')
|
||||
.get('/magazine@instance.tld.json')
|
||||
.intercept(nock =>
|
||||
nock('https://instance.tld/')
|
||||
.get('/api/magazine/name/magazine')
|
||||
.reply(
|
||||
200,
|
||||
JSON.stringify({
|
||||
subscriptionsCount: 42,
|
||||
}),
|
||||
),
|
||||
)
|
||||
.expectBadge({
|
||||
label: 'subscribe to magazine@instance.tld',
|
||||
message: '42',
|
||||
color: 'brightgreen',
|
||||
})
|
||||
|
||||
t.create('unknown community')
|
||||
.get('/01J12N2ETYG3W5B6G8Y11F5EXG@fedia.io.json')
|
||||
.expectBadge({
|
||||
label: 'magazine',
|
||||
message: 'magazine not found',
|
||||
color: 'red',
|
||||
})
|
||||
|
||||
t.create('invalid magazine').get('/magazine.invalid.json').expectBadge({
|
||||
label: 'magazine',
|
||||
message: 'invalid magazine',
|
||||
color: 'red',
|
||||
})
|
||||
|
||||
t.create('test on real mbin magazine for API compliance')
|
||||
.get('/teletext@fedia.io.json')
|
||||
.expectBadge({
|
||||
label: 'subscribe to teletext@fedia.io',
|
||||
message: isMetric,
|
||||
color: 'brightgreen',
|
||||
})
|
||||
Reference in New Issue
Block a user