Constructor
- - - -new exports()
- - - - - - - - - - - - - - - - - - --
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Source: -
- - - - - - - - -
diff --git a/badge-maker_lib_index.js.html b/badge-maker_lib_index.js.html
index e12a244ac1..6fd4dc12ea 100644
--- a/badge-maker_lib_index.js.html
+++ b/badge-maker_lib_index.js.html
@@ -117,13 +117,13 @@ module.exports = {
diff --git a/badge-maker_lib_xml.js.html b/badge-maker_lib_xml.js.html
index 140a9b800f..834b54e738 100644
--- a/badge-maker_lib_xml.js.html
+++ b/badge-maker_lib_xml.js.html
@@ -112,13 +112,13 @@ module.exports = { escapeXml, stripXmlWhitespace, XmlElement }
diff --git a/core_base-service_base-graphql.js.html b/core_base-service_base-graphql.js.html
index 99a9906865..ad37bdeb11 100644
--- a/core_base-service_base-graphql.js.html
+++ b/core_base-service_base-graphql.js.html
@@ -130,13 +130,13 @@ export default BaseGraphqlService
diff --git a/core_base-service_base-json.js.html b/core_base-service_base-json.js.html
index c7b1251ccc..3250fa2a2e 100644
--- a/core_base-service_base-json.js.html
+++ b/core_base-service_base-json.js.html
@@ -91,13 +91,13 @@ export default BaseJsonService
diff --git a/core_base-service_base-svg-scraping.js.html b/core_base-service_base-svg-scraping.js.html
index 4e61b80b5e..eeaebc6795 100644
--- a/core_base-service_base-svg-scraping.js.html
+++ b/core_base-service_base-svg-scraping.js.html
@@ -127,13 +127,13 @@ export default BaseSvgScrapingService
diff --git a/core_base-service_base-xml.js.html b/core_base-service_base-xml.js.html
index b69ee5db5e..04d72bf843 100644
--- a/core_base-service_base-xml.js.html
+++ b/core_base-service_base-xml.js.html
@@ -105,13 +105,13 @@ export default BaseXmlService
diff --git a/core_base-service_base-yaml.js.html b/core_base-service_base-yaml.js.html
index ed054cbc96..8281216997 100644
--- a/core_base-service_base-yaml.js.html
+++ b/core_base-service_base-yaml.js.html
@@ -109,13 +109,13 @@ export default BaseYamlService
diff --git a/core_base-service_base.js.html b/core_base-service_base.js.html
index 167a2386e1..c976be94aa 100644
--- a/core_base-service_base.js.html
+++ b/core_base-service_base.js.html
@@ -606,13 +606,13 @@ export default BaseService
diff --git a/core_base-service_errors.js.html b/core_base-service_errors.js.html
index 20a0e0030f..a3f5ac688a 100644
--- a/core_base-service_errors.js.html
+++ b/core_base-service_errors.js.html
@@ -255,13 +255,13 @@ export {
diff --git a/core_base-service_graphql.js.html b/core_base-service_graphql.js.html
index 2e534479d4..8198719b15 100644
--- a/core_base-service_graphql.js.html
+++ b/core_base-service_graphql.js.html
@@ -87,13 +87,13 @@ export { mergeQueries }
diff --git a/core_server_prometheus-metrics.js.html b/core_server_prometheus-metrics.js.html
index 92262d1723..f3c343d852 100644
--- a/core_server_prometheus-metrics.js.html
+++ b/core_server_prometheus-metrics.js.html
@@ -121,13 +121,13 @@ export default class PrometheusMetrics {
diff --git a/core_server_server.js.html b/core_server_server.js.html
index b972d15ae3..5575f4ab99 100644
--- a/core_server_server.js.html
+++ b/core_server_server.js.html
@@ -587,13 +587,13 @@ export default Server
diff --git a/core_service-test-runner_create-service-tester.js.html b/core_service-test-runner_create-service-tester.js.html
index 204a352d14..f2a7c817dd 100644
--- a/core_service-test-runner_create-service-tester.js.html
+++ b/core_service-test-runner_create-service-tester.js.html
@@ -68,13 +68,13 @@ export default createServiceTester
diff --git a/core_service-test-runner_icedfrisby-shields.js.html b/core_service-test-runner_icedfrisby-shields.js.html
index 015f199b63..c96a7f9eea 100644
--- a/core_service-test-runner_icedfrisby-shields.js.html
+++ b/core_service-test-runner_icedfrisby-shields.js.html
@@ -123,13 +123,13 @@ export default factory
diff --git a/core_service-test-runner_infer-pull-request.js.html b/core_service-test-runner_infer-pull-request.js.html
index d95e91230c..13fb593cc4 100644
--- a/core_service-test-runner_infer-pull-request.js.html
+++ b/core_service-test-runner_infer-pull-request.js.html
@@ -136,13 +136,13 @@ export { parseGithubPullRequestUrl, parseGithubRepoSlug, inferPullRequest }
diff --git a/core_service-test-runner_runner.js.html b/core_service-test-runner_runner.js.html
index 3e5d2d48e8..c0210ee7dd 100644
--- a/core_service-test-runner_runner.js.html
+++ b/core_service-test-runner_runner.js.html
@@ -112,13 +112,13 @@ export default Runner
diff --git a/core_service-test-runner_service-tester.js.html b/core_service-test-runner_service-tester.js.html
index 0c32632361..f6a86b0f1d 100644
--- a/core_service-test-runner_service-tester.js.html
+++ b/core_service-test-runner_service-tester.js.html
@@ -178,13 +178,13 @@ export default ServiceTester
diff --git a/core_service-test-runner_services-for-title.js.html b/core_service-test-runner_services-for-title.js.html
index 3c142eed06..4d8bb4ca0a 100644
--- a/core_service-test-runner_services-for-title.js.html
+++ b/core_service-test-runner_services-for-title.js.html
@@ -69,13 +69,13 @@ export default servicesForTitle
diff --git a/core_token-pooling_token-pool.js.html b/core_token-pooling_token-pool.js.html
index ca0448400f..6a7b66224a 100644
--- a/core_token-pooling_token-pool.js.html
+++ b/core_token-pooling_token-pool.js.html
@@ -392,13 +392,13 @@ export { sanitizeToken, Token, TokenPool }
diff --git a/global.html b/global.html
index 2b15c8b9a4..e417f63585 100644
--- a/global.html
+++ b/global.html
@@ -354,217 +354,6 @@
-
Return color for active, maintenance and archived statuses, which were the three -example keywords used in Netflix's open-source meetup. -See https://slideshare.net/aspyker/netflix-open-source-meetup-season-4-episode-1 -Other keywords are possible, but will appear in grey.
-| Name | - - -Type | - - - - - -Description | -||||||
|---|---|---|---|---|---|---|---|---|
attrs |
-
-
- - - -object - - - - | - - - - - -Refer to individual attrs -Properties- - -
|
-
color
-Takes a percentage and maps it to a message and color.
-The colors are determined based on how Weblate does it internally. -Weblate on GitHub
-| Name | - - -Type | - - - - - -Description | -
|---|---|---|
translatedPercent |
-
-
- - - -* - - - - | - - - - - -The percentage of translations translated. |
-
Format for the badge.
-Validates affiliations should contain combination of allowed values in any order.
-| Name | - - -Type | - - - - - -Description | -
|---|---|---|
value |
-
-
- - - -string - - - - | - - - - - -affiliation current value |
-
helpers |
-
-
- - - -* - - - - | - - - - - -object to construct custom error |
-
valiadtion error or value unchanged
-Criterion Badge Service
-Support and Contact:
-API Documentation:
-This badge displays the license of a component on a Weblate instance.
This badge displays the percentage of strings translated on a project on a -Weblate instance.
This badge displays the total installations of a MediaWiki extensions, skins, -etc via Wikiapiary.
-import Joi from 'joi'
-import { BaseJsonService } from '../index.js'
-import {
- IMPROVED_STATUS,
- NOT_FOUND_STATUS,
- REGRESSED_STATUS,
- NO_CHANGE_STATUS,
-} from './constants.js'
-
-const schema = Joi.string()
- .allow(IMPROVED_STATUS, REGRESSED_STATUS, NO_CHANGE_STATUS)
- .required()
-
-/**
- * Criterion Badge Service
- *
- * Support and Contact:
- * - https://github.com/chmoder/api.criterion.dev
- *
- * API Documentation:
- * - https://app.swaggerhub.com/apis-docs/chmoder/Criterion.dev
- */
-export default class Criterion extends BaseJsonService {
- static category = 'analysis'
- static route = { base: 'criterion', pattern: ':user/:repo' }
-
- static examples = [
- {
- title: 'Criterion',
- namedParams: {
- user: 'chmoder',
- repo: 'data_vault',
- },
- staticPreview: this.render({ status: IMPROVED_STATUS }),
- },
- ]
-
- static defaultBadgeData = { label: 'criterion' }
-
- static render({ status }) {
- let statusColor = 'lightgrey'
-
- if (status === IMPROVED_STATUS) {
- statusColor = 'brightgreen'
- } else if (status === NO_CHANGE_STATUS) {
- statusColor = 'green'
- } else if (statusColor === REGRESSED_STATUS) {
- statusColor = 'red'
- }
-
- return {
- message: `${status}`,
- color: statusColor,
- }
- }
-
- async handle({ user, repo }) {
- const status = await this._requestJson({
- url: `https://api.criterion.dev/v1/${user}/${repo}/status`,
- errorMessages: { 404: NOT_FOUND_STATUS },
- schema,
- })
-
- return this.constructor.render({ status })
- }
-}
-
- import Joi from 'joi'
-import gql from 'graphql-tag'
-import { nonNegativeInteger } from '../validators.js'
-import { metric } from '../text-formatters.js'
-import { GithubAuthV4Service } from './github-auth-service.js'
-import {
- documentation as commonDocumentation,
- transformErrors,
-} from './github-helpers.js'
-
-const MAX_REPO_LIMIT = 200
-
-const customDocumentation = `This badge takes into account up to <code>${MAX_REPO_LIMIT}</code> of the most starred repositories of given user / org.`
-
-const userDocumentation = `${commonDocumentation}
-<p>
- <b>Note:</b><br>
- 1. ${customDocumentation}<br>
- 2. <code>affiliations</code> query param accepts three values (must be UPPER case) <code>OWNER</code>, <code>COLLABORATOR</code>, <code>ORGANIZATION_MEMBER</code>.
- One can pass comma separated combinations of these values (no spaces) e.g. <code>OWNER,COLLABORATOR</code> or <code>OWNER,COLLABORATOR,ORGANIZATION_MEMBER</code>.
- Default value is <code>OWNER</code>. See the explanation of these values <a href="https://docs.github.com/en/graphql/reference/enums#repositoryaffiliation">here</a>.
-</p>
-`
-const orgDocumentation = `${commonDocumentation}
-<p>
- <b>Note:</b> ${customDocumentation}
-</p>`
-
-const pageInfoSchema = Joi.object({
- hasNextPage: Joi.boolean().required(),
- endCursor: Joi.string().allow(null).required(),
-}).required()
-
-const nodesSchema = Joi.array()
- .items(
- Joi.object({
- stargazers: Joi.object({
- totalCount: nonNegativeInteger,
- }).required(),
- })
- )
- .default([])
-
-const repositoriesSchema = Joi.object({
- pageInfo: pageInfoSchema,
- nodes: nodesSchema,
-}).required()
-
-const schema = Joi.object({
- data: Joi.alternatives(
- Joi.object({
- user: Joi.object({
- repositories: repositoriesSchema,
- }).required(),
- }).required(),
- Joi.object({
- organization: Joi.object({
- repositories: repositoriesSchema,
- }).required(),
- }).required()
- ).required(),
-}).required()
-
-const query = gql`
- query fetchStars(
- $user: String!
- $nextCursor: String
- $affiliations: [RepositoryAffiliation]!
- ) {
- user(login: $user) {
- repositories(
- first: 100
- after: $nextCursor
- ownerAffiliations: $affiliations
- orderBy: { field: STARGAZERS, direction: DESC }
- ) {
- pageInfo {
- hasNextPage
- endCursor
- }
- nodes {
- stargazers {
- totalCount
- }
- }
- }
- }
-
- organization(login: $user) {
- repositories(
- first: 100
- after: $nextCursor
- orderBy: { field: STARGAZERS, direction: DESC }
- ) {
- pageInfo {
- hasNextPage
- endCursor
- }
- nodes {
- stargazers {
- totalCount
- }
- }
- }
- }
- }
-`
-
-const affiliationsAllowedValues = [
- 'OWNER',
- `COLLABORATOR`,
- 'ORGANIZATION_MEMBER',
-]
-/**
- * Validates affiliations should contain combination of allowed values in any order.
- *
- * @param {string} value affiliation current value
- * @param {*} helpers object to construct custom error
- *
- * @returns {string} valiadtion error or value unchanged
- */
-const validateAffiliations = (value, helpers) => {
- const values = value.split(',')
- if (values.some(e => !affiliationsAllowedValues.includes(e))) {
- return helpers.error('any.invalid')
- }
- return value
-}
-
-const queryParamSchema = Joi.object({
- affiliations: Joi.string().default('OWNER').custom(validateAffiliations),
-}).required()
-
-export default class GithubTotalStarService extends GithubAuthV4Service {
- static defaultLabel = 'stars'
- static category = 'social'
-
- static route = {
- base: 'github/stars',
- pattern: ':user',
- queryParamSchema,
- }
-
- static examples = [
- {
- title: "GitHub User's stars",
- namedParams: {
- user: 'chris48s',
- },
- queryParams: { affiliations: 'OWNER,COLLABORATOR' },
- staticPreview: {
- label: this.defaultLabel,
- message: 54,
- style: 'social',
- },
- documentation: userDocumentation,
- },
- {
- title: "GitHub Org's stars",
- pattern: ':org',
- namedParams: {
- org: 'badges',
- },
- staticPreview: {
- label: this.defaultLabel,
- message: metric(7000),
- style: 'social',
- },
- documentation: orgDocumentation,
- },
- ]
-
- static defaultBadgeData = {
- label: this.defaultLabel,
- namedLogo: 'github',
- }
-
- static render({ totalStars, user }) {
- return {
- message: metric(totalStars),
- color: 'blue',
- link: [`https://github.com/${user}`],
- }
- }
-
- async fetch({ user, affiliations, nextCursor }) {
- const variables = { user, affiliations, nextCursor }
- return await this._requestGraphql({
- query,
- variables,
- schema,
- transformJson: json =>
- json.data.organization || json.data.user ? { data: json.data } : json,
- transformErrors: e => transformErrors(e, 'user/org'),
- })
- }
-
- transform(repos) {
- const totalStars = repos
- .map(element => element.stargazers.totalCount)
- .reduce((accumulator, currentValue) => accumulator + currentValue, 0)
- const lastRepo = repos.slice(-1).pop() // undefined when repos is empty
- const hasStars = lastRepo ? lastRepo.stargazers.totalCount !== 0 : false
- return {
- totalStars,
- hasStars,
- }
- }
-
- async getTotalStars({ user }, { affiliations }) {
- let grandTotalStars = 0
- let fetchedReposCount = 0
- let nextCursor = null
- let hasNext
-
- do {
- const { data } = await this.fetch({
- user,
- affiliations: affiliations.split(','),
- nextCursor,
- })
- const {
- repositories: {
- pageInfo: { hasNextPage, endCursor },
- nodes: repos,
- },
- } = data.user || data.organization
- const { totalStars, hasStars } = this.transform(repos)
- // repos are sorted based on the stars. If last repo has zero star,
- // no need to fire additional fetch call, as repos on next page will have zero stars only.
- hasNext = hasNextPage && hasStars
- nextCursor = endCursor
- grandTotalStars += totalStars
- fetchedReposCount += repos.length
- } while (hasNext && fetchedReposCount < MAX_REPO_LIMIT)
-
- return grandTotalStars
- }
-
- async handle({ user }, queryParams) {
- const totalStars = await this.getTotalStars({ user }, queryParams)
- return this.constructor.render({ totalStars, user })
- }
-}
-
- import { BaseService, InvalidResponse } from '../index.js'
-
-const documentation = `
-<p>
- OSS Lifecycle is an initiative started by Netflix to classify open-source projects into lifecycles
- and clearly identify which projects are active and which ones are retired. To enable this badge,
- simply create an OSSMETADATA tagging file at the root of your GitHub repository containing a
- single line similar to the following: <code>osslifecycle=active</code>. Other suggested values are
- <code>osslifecycle=maintenance</code> and <code>osslifecycle=archived</code>. A working example
- can be viewed on the <a href="https://github.com/Netflix/osstracker">OSS Tracker repository</a>.
-</p>
-`
-
-export default class OssTracker extends BaseService {
- static category = 'other'
-
- static route = {
- base: 'osslifecycle',
- pattern: ':user/:repo/:branch*',
- }
-
- static examples = [
- {
- title: 'OSS Lifecycle',
- pattern: ':user/:repo',
- namedParams: { user: 'Teevity', repo: 'ice' },
- staticPreview: this.render({ status: 'active' }),
- keywords: ['Netflix'],
- documentation,
- },
- {
- title: 'OSS Lifecycle (branch)',
- pattern: ':user/:repo/:branch',
- namedParams: {
- user: 'Netflix',
- repo: 'osstracker',
- branch: 'documentation',
- },
- staticPreview: this.render({ status: 'active' }),
- keywords: ['Netflix'],
- documentation,
- },
- ]
-
- static defaultBadgeData = { label: 'oss lifecycle' }
-
- /**
- * Return color for active, maintenance and archived statuses, which were the three
- * example keywords used in Netflix's open-source meetup.
- * See https://slideshare.net/aspyker/netflix-open-source-meetup-season-4-episode-1
- * Other keywords are possible, but will appear in grey.
- *
- * @param {object} attrs Refer to individual attrs
- * @param {string} attrs.status Specifies the current maintenance status
- * @returns {string} color
- */
- static getColor({ status }) {
- if (status === 'active') {
- return 'brightgreen'
- } else if (status === 'maintenance') {
- return 'yellow'
- } else if (status === 'archived') {
- return 'red'
- }
- return 'lightgrey'
- }
-
- static render({ status }) {
- const color = this.getColor({ status })
- return {
- message: status,
- color,
- }
- }
-
- async fetch({ user, repo, branch }) {
- return this._request({
- url: `https://raw.githubusercontent.com/${user}/${repo}/${branch}/OSSMETADATA`,
- })
- }
-
- async handle({ user, repo, branch }) {
- const { buffer } = await this.fetch({
- user,
- repo,
- branch: branch || 'HEAD',
- })
- try {
- const status = buffer.match(/osslifecycle=([a-z]+)/im)[1]
- return this.constructor.render({ status })
- } catch (e) {
- throw new InvalidResponse({
- prettyMessage: 'metadata in unexpected format',
- })
- }
- }
-}
-
- import Joi from 'joi'
-import { BaseJsonService } from '../index.js'
-import { optionalUrl } from '../validators.js'
-
-const schema = Joi.object({
- license: Joi.string().required(),
-}).required()
-
-const queryParamSchema = Joi.object({
- server: optionalUrl,
-}).required()
-
-/**
- * This badge displays the license of a component on a Weblate instance.
- */
-export default class WeblateComponentLicense extends BaseJsonService {
- static category = 'license'
- static route = {
- base: 'weblate/l',
- pattern: ':project/:component',
- queryParamSchema,
- }
-
- static examples = [
- {
- title: 'Weblate component license',
- namedParams: { project: 'godot-engine', component: 'godot' },
- queryParams: { server: 'https://hosted.weblate.org' },
- staticPreview: this.render({ license: 'MIT' }),
- keywords: ['i18n', 'translation', 'internationalization'],
- },
- ]
-
- static defaultBadgeData = { label: 'license', color: 'informational' }
-
- static render({ license }) {
- return { message: `${license}` }
- }
-
- async fetch({ project, component, server = 'https://hosted.weblate.org' }) {
- return this._requestJson({
- schema,
- url: `${server}/api/components/${project}/${component}/`,
- errorMessages: {
- 403: 'access denied by remote server',
- 404: 'component not found',
- 429: 'rate limited by remote server',
- },
- })
- }
-
- async handle({ project, component }, { server }) {
- const { license } = await this.fetch({ project, component, server })
- return this.constructor.render({ license })
- }
-}
-
- import Joi from 'joi'
-import { BaseJsonService } from '../index.js'
-import { optionalUrl } from '../validators.js'
-import { colorScale } from '../color-formatters.js'
-
-const schema = Joi.object({
- translated_percent: Joi.number().required(),
-}).required()
-
-const queryParamSchema = Joi.object({
- server: optionalUrl,
-}).required()
-
-/**
- * This badge displays the percentage of strings translated on a project on a
- * Weblate instance.
- */
-export default class WeblateProjectTranslatedPercentage extends BaseJsonService {
- static category = 'other'
- static route = {
- base: 'weblate/progress',
- pattern: ':project',
- queryParamSchema,
- }
-
- static examples = [
- {
- title: 'Weblate project translated',
- namedParams: { project: 'godot-engine' },
- queryParams: { server: 'https://hosted.weblate.org' },
- staticPreview: this.render({ translatedPercent: 20.5 }),
- keywords: ['i18n', 'translation', 'internationalization'],
- },
- ]
-
- static defaultBadgeData = { label: 'translated' }
-
- /**
- * Takes a percentage and maps it to a message and color.
- *
- * The colors are determined based on how Weblate does it internally.
- * {@link https://github.com/WeblateOrg/weblate/blob/main/weblate/trans/widgets.py Weblate on GitHub}
- *
- * @param {*} translatedPercent The percentage of translations translated.
- * @returns {object} Format for the badge.
- */
- static render({ translatedPercent }) {
- const color = colorScale([75, 90])(translatedPercent)
- return { message: `${translatedPercent.toFixed(0)}%`, color }
- }
-
- async fetch({ project, server = 'https://hosted.weblate.org' }) {
- return this._requestJson({
- schema,
- url: `${server}/api/projects/${project}/statistics/`,
- errorMessages: {
- 403: 'access denied by remote server',
- 404: 'project not found',
- 429: 'rate limited by remote server',
- },
- })
- }
-
- async handle({ project }, { server }) {
- const { translated_percent } = await this.fetch({ project, server })
- return this.constructor.render({ translatedPercent: translated_percent })
- }
-}
-
- import Joi from 'joi'
-import { metric } from '../text-formatters.js'
-import { BaseJsonService, NotFound } from '../index.js'
-
-const documentation = `
- <p>
- The name of an extension is case-sensitive excluding the first character.
- </p>
- <p>
- For example, in the case of <code>ParserFunctions</code>, the following are
- valid:
- <ul>
- <li><code>ParserFunctions</code></li>
- <li><code>parserFunctions</code></li>
- </ul>
-
- However, the following are invalid:
- <ul>
- <li><code>parserfunctions</code></li>
- <li><code>Parserfunctions</code></li>
- <li><code>pARSERfUNCTIONS</code></li>
- </ul>
- </p>
-`
-
-const schema = Joi.object({
- query: Joi.object({
- results: Joi.alternatives([
- Joi.object()
- .required()
- .pattern(/^\w+:.+$/, {
- printouts: Joi.object({
- 'Has website count': Joi.array()
- .required()
- .items(Joi.number().required()),
- }).required(),
- }),
- Joi.array().required(),
- ]).required(),
- }).required(),
-}).required()
-
-/**
- * This badge displays the total installations of a MediaWiki extensions, skins,
- * etc via Wikiapiary.
- *
- * {@link https://www.mediawiki.org/wiki/Manual:Extensions MediaWiki Extensions Manual}
- */
-export default class WikiapiaryInstalls extends BaseJsonService {
- static category = 'downloads'
- static route = {
- base: 'wikiapiary',
- pattern: ':variant(extension|skin|farm|generator|host)/installs/:name',
- }
-
- static examples = [
- {
- title: 'Wikiapiary installs',
- namedParams: { variant: 'extension', name: 'ParserFunctions' },
- staticPreview: this.render({ usage: 11170 }),
- documentation,
- keywords: ['mediawiki'],
- },
- ]
-
- static defaultBadgeData = { label: 'installs', color: 'informational' }
-
- static render({ usage }) {
- return { message: metric(usage) }
- }
-
- static validate({ results }) {
- if (Array.isArray(results))
- throw new NotFound({ prettyMessage: 'not found' })
- }
-
- async fetch({ variant, name }) {
- return this._requestJson({
- schema,
- url: `https://wikiapiary.com/w/api.php`,
- options: {
- qs: {
- action: 'ask',
- query: `[[${variant}:${name}]]|?Has_website_count`,
- format: 'json',
- },
- },
- })
- }
-
- async handle({ variant, name }) {
- const response = await this.fetch({ variant, name })
- const { results } = response.query
-
- this.constructor.validate({ results })
-
- const keyLowerCase = `${variant}:${name.toLowerCase()}`
- const resultKey = Object.keys(results).find(
- key => keyLowerCase === key.toLowerCase()
- )
-
- if (resultKey === undefined)
- throw new NotFound({ prettyMessage: 'not found' })
-
- const [usage] = results[resultKey].printouts['Has website count']
- return this.constructor.render({ usage })
- }
-}
-
- :user/:repo.
public.requireCloudflare: true.