From 3b3d2186fd3983326af4174a975b4eb7f2232f10 Mon Sep 17 00:00:00 2001 From: "github-merge-queue[bot]" Date: Fri, 11 Aug 2023 15:19:56 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20badges/s?= =?UTF-8?q?hields@a94115fbb0890120bf9058b41ee4253273e02b7e=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- badge-maker_lib_index.js.html | 4 +- badge-maker_lib_xml.js.html | 4 +- core_base-service_base-graphql.js.html | 4 +- core_base-service_base-json.js.html | 4 +- core_base-service_base-svg-scraping.js.html | 4 +- core_base-service_base-xml.js.html | 4 +- core_base-service_base-yaml.js.html | 4 +- core_base-service_base.js.html | 4 +- core_base-service_errors.js.html | 4 +- core_base-service_graphql.js.html | 4 +- core_base-service_openapi.js.html | 4 +- core_base-service_resource-cache.js.html | 4 +- core_server_prometheus-metrics.js.html | 4 +- core_server_server.js.html | 4 +- ...-test-runner_create-service-tester.js.html | 4 +- ...ice-test-runner_icedfrisby-shields.js.html | 4 +- core_service-test-runner_runner.js.html | 4 +- ...service-test-runner_service-tester.js.html | 4 +- ...ice-test-runner_services-for-title.js.html | 4 +- core_token-pooling_token-pool.js.html | 4 +- global.html | 4 +- index.html | 4 +- module-badge-maker.html | 4 +- module-badge-maker_lib_xml-ElementList.html | 4 +- module-badge-maker_lib_xml-XmlElement.html | 4 +- module-badge-maker_lib_xml.html | 4 +- ...le-core_base-service_base-BaseService.html | 4 +- ...rvice_base-graphql-BaseGraphqlService.html | 4 +- module-core_base-service_base-graphql.html | 4 +- ...ase-service_base-json-BaseJsonService.html | 4 +- module-core_base-service_base-json.html | 4 +- ...e-svg-scraping-BaseSvgScrapingService.html | 4 +- ...e-core_base-service_base-svg-scraping.html | 4 +- ..._base-service_base-xml-BaseXmlService.html | 4 +- module-core_base-service_base-xml.html | 4 +- ...ase-service_base-yaml-BaseYamlService.html | 4 +- module-core_base-service_base-yaml.html | 4 +- module-core_base-service_base.html | 4 +- ...e-core_base-service_errors-Deprecated.html | 4 +- ...e-service_errors-ImproperlyConfigured.html | 4 +- ...core_base-service_errors-Inaccessible.html | 4 +- ..._base-service_errors-InvalidParameter.html | 4 +- ...e_base-service_errors-InvalidResponse.html | 4 +- module-core_base-service_errors-NotFound.html | 4 +- ...se-service_errors-ShieldsRuntimeError.html | 4 +- module-core_base-service_errors.html | 4 +- module-core_base-service_graphql.html | 4 +- module-core_base-service_openapi.html | 4 +- module-core_base-service_resource-cache.html | 4 +- module-core_server_server-Server.html | 4 +- module-core_server_server.html | 4 +- ...ice-test-runner_create-service-tester.html | 4 +- ...ervice-test-runner_icedfrisby-shields.html | 4 +- ...ore_service-test-runner_runner-Runner.html | 4 +- module-core_service-test-runner_runner.html | 4 +- ...t-runner_service-tester-ServiceTester.html | 4 +- ...re_service-test-runner_service-tester.html | 4 +- ...ervice-test-runner_services-for-title.html | 4 +- ...e-core_token-pooling_token-pool-Token.html | 4 +- ...re_token-pooling_token-pool-TokenPool.html | 4 +- module-core_token-pooling_token-pool.html | 4 +- module-services_build-status.html | 4 +- module-services_color-formatters.html | 4 +- module-services_contributor-count.html | 4 +- module-services_downloads.html | 4 +- module-services_dynamic-common.html | 4 +- module-services_dynamic_json-path.html | 4 +- module-services_endpoint-common.html | 4 +- module-services_licenses.html | 4 +- module-services_package-json-helpers.html | 4 +- module-services_php-version.html | 4 +- module-services_pipenv-helpers.html | 4 +- module-services_route-builder.html | 4 +- ...ervices_steam_steam-base-BaseSteamAPI.html | 4 +- module-services_steam_steam-base.html | 4 +- module-services_text-formatters.html | 4 +- module-services_validators.html | 4 +- module-services_version.html | 1891 +++++++++++++++++ services_build-status.js.html | 4 +- services_color-formatters.js.html | 4 +- services_contributor-count.js.html | 4 +- services_downloads.js.html | 4 +- services_dynamic-common.js.html | 4 +- services_dynamic_json-path.js.html | 4 +- services_endpoint-common.js.html | 4 +- services_licenses.js.html | 4 +- services_package-json-helpers.js.html | 4 +- services_packagist_packagist-base.js.html | 4 +- services_php-version.js.html | 4 +- services_pipenv-helpers.js.html | 4 +- services_route-builder.js.html | 4 +- services_steam_steam-base.js.html | 4 +- services_test-validators.js.html | 4 +- services_text-formatters.js.html | 4 +- services_validators.js.html | 4 +- services_version.js.html | 308 +++ tutorial-TUTORIAL.html | 4 +- tutorial-adding-new-config-values.html | 4 +- tutorial-authentication.html | 4 +- tutorial-badge-urls.html | 4 +- tutorial-code-walkthrough.html | 4 +- tutorial-deprecating-badges.html | 4 +- tutorial-input-validation.html | 4 +- tutorial-json-format.html | 4 +- tutorial-logos.html | 4 +- tutorial-performance-testing.html | 4 +- tutorial-production-hosting.html | 4 +- tutorial-releases.html | 4 +- tutorial-self-hosting.html | 4 +- tutorial-server-secrets.html | 4 +- tutorial-service-tests.html | 4 +- tutorial-static-badges.html | 4 +- 112 files changed, 2419 insertions(+), 220 deletions(-) create mode 100644 module-services_version.html create mode 100644 services_version.js.html diff --git a/badge-maker_lib_index.js.html b/badge-maker_lib_index.js.html index 2be8082d65..ccd6842ec1 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 cb4a779b0d..6b66d1657e 100644 --- a/badge-maker_lib_xml.js.html +++ b/badge-maker_lib_xml.js.html @@ -132,13 +132,13 @@ module.exports = { escapeXml, stripXmlWhitespace, XmlElement, ElementList }
diff --git a/core_base-service_base-graphql.js.html b/core_base-service_base-graphql.js.html index 7ee50d5121..871145fb9b 100644 --- a/core_base-service_base-graphql.js.html +++ b/core_base-service_base-graphql.js.html @@ -138,13 +138,13 @@ export default BaseGraphqlService
diff --git a/core_base-service_base-json.js.html b/core_base-service_base-json.js.html index f165d8530c..a322526eda 100644 --- a/core_base-service_base-json.js.html +++ b/core_base-service_base-json.js.html @@ -104,13 +104,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 3e3be36b32..7e06a5da41 100644 --- a/core_base-service_base-svg-scraping.js.html +++ b/core_base-service_base-svg-scraping.js.html @@ -135,13 +135,13 @@ export default BaseSvgScrapingService
diff --git a/core_base-service_base-xml.js.html b/core_base-service_base-xml.js.html index e032989e59..fa5970f6fc 100644 --- a/core_base-service_base-xml.js.html +++ b/core_base-service_base-xml.js.html @@ -114,13 +114,13 @@ export default BaseXmlService
diff --git a/core_base-service_base-yaml.js.html b/core_base-service_base-yaml.js.html index 4fabf946ab..5f72e2c051 100644 --- a/core_base-service_base-yaml.js.html +++ b/core_base-service_base-yaml.js.html @@ -117,13 +117,13 @@ export default BaseYamlService
diff --git a/core_base-service_base.js.html b/core_base-service_base.js.html index 4890837a4e..7217ddeb2c 100644 --- a/core_base-service_base.js.html +++ b/core_base-service_base.js.html @@ -652,13 +652,13 @@ export default BaseService
diff --git a/core_base-service_errors.js.html b/core_base-service_errors.js.html index d5702278df..cc2a5dbc1d 100644 --- a/core_base-service_errors.js.html +++ b/core_base-service_errors.js.html @@ -259,13 +259,13 @@ export {
diff --git a/core_base-service_graphql.js.html b/core_base-service_graphql.js.html index 6f399b9324..d6e6473ef1 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_base-service_openapi.js.html b/core_base-service_openapi.js.html index 9e4e6a4cbd..fec78cbf0f 100644 --- a/core_base-service_openapi.js.html +++ b/core_base-service_openapi.js.html @@ -505,13 +505,13 @@ export { category2openapi, pathParam, pathParams, queryParam, queryParams }
diff --git a/core_base-service_resource-cache.js.html b/core_base-service_resource-cache.js.html index 8676114f0b..1f7c7041f9 100644 --- a/core_base-service_resource-cache.js.html +++ b/core_base-service_resource-cache.js.html @@ -105,13 +105,13 @@ export { getCachedResource, clearResourceCache }
diff --git a/core_server_prometheus-metrics.js.html b/core_server_prometheus-metrics.js.html index 00f2cc2c7e..7b2cf7a8e9 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 6bb332ab0c..ecee8f0b69 100644 --- a/core_server_server.js.html +++ b/core_server_server.js.html @@ -636,13 +636,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 0fe0dfd003..322af9cd41 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 b61bfb033e..9134ad44db 100644 --- a/core_service-test-runner_icedfrisby-shields.js.html +++ b/core_service-test-runner_icedfrisby-shields.js.html @@ -140,13 +140,13 @@ export default factory
diff --git a/core_service-test-runner_runner.js.html b/core_service-test-runner_runner.js.html index 1a87467963..c12d79660d 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 b6db3dab5c..643e4805f5 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 33983828e2..52f232ed24 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 fa29f6dce5..a14b0a2bc9 100644 --- a/core_token-pooling_token-pool.js.html +++ b/core_token-pooling_token-pool.js.html @@ -373,13 +373,13 @@ export { sanitizeToken, Token, TokenPool }
diff --git a/global.html b/global.html index e80cfe7ef9..11b625675a 100644 --- a/global.html +++ b/global.html @@ -678,13 +678,13 @@
diff --git a/index.html b/index.html index 65fd37e7e0..3fd5a9ec61 100644 --- a/index.html +++ b/index.html @@ -214,13 +214,13 @@ under their terms and license.


diff --git a/module-badge-maker.html b/module-badge-maker.html index 7c384a837b..add53dd3a8 100644 --- a/module-badge-maker.html +++ b/module-badge-maker.html @@ -423,13 +423,13 @@
diff --git a/module-badge-maker_lib_xml-ElementList.html b/module-badge-maker_lib_xml-ElementList.html index e1f8eb0024..7b38a2b784 100644 --- a/module-badge-maker_lib_xml-ElementList.html +++ b/module-badge-maker_lib_xml-ElementList.html @@ -157,13 +157,13 @@ like an XmlElement but renders multiple XML tags (not wrapped in a ).


- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-badge-maker_lib_xml-XmlElement.html b/module-badge-maker_lib_xml-XmlElement.html index e2e71d580c..8035c86d72 100644 --- a/module-badge-maker_lib_xml-XmlElement.html +++ b/module-badge-maker_lib_xml-XmlElement.html @@ -468,13 +468,13 @@ element will be rendered as a self-closing element.


- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-badge-maker_lib_xml.html b/module-badge-maker_lib_xml.html index 4b7d73eb25..a18b27b375 100644 --- a/module-badge-maker_lib_xml.html +++ b/module-badge-maker_lib_xml.html @@ -122,13 +122,13 @@
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_base-service_base-BaseService.html b/module-core_base-service_base-BaseService.html index 34531cd4b0..e1a9697fef 100644 --- a/module-core_base-service_base-BaseService.html +++ b/module-core_base-service_base-BaseService.html @@ -809,13 +809,13 @@ defined in this.route.pattern or this.route.capture


- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_base-service_base-graphql-BaseGraphqlService.html b/module-core_base-service_base-graphql-BaseGraphqlService.html index adba209573..2218ff3948 100644 --- a/module-core_base-service_base-graphql-BaseGraphqlService.html +++ b/module-core_base-service_base-graphql-BaseGraphqlService.html @@ -867,13 +867,13 @@ an InvalidResponse.


- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_base-service_base-graphql.html b/module-core_base-service_base-graphql.html index f0256591b6..ad7b0775a8 100644 --- a/module-core_base-service_base-graphql.html +++ b/module-core_base-service_base-graphql.html @@ -119,13 +119,13 @@
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_base-service_base-json-BaseJsonService.html b/module-core_base-service_base-json-BaseJsonService.html index 0fd98bb8f1..9497425122 100644 --- a/module-core_base-service_base-json-BaseJsonService.html +++ b/module-core_base-service_base-json-BaseJsonService.html @@ -712,13 +712,13 @@ and module:cor
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_base-service_base-json.html b/module-core_base-service_base-json.html index 591e4d3784..d319b422b9 100644 --- a/module-core_base-service_base-json.html +++ b/module-core_base-service_base-json.html @@ -119,13 +119,13 @@
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_base-service_base-svg-scraping-BaseSvgScrapingService.html b/module-core_base-service_base-svg-scraping-BaseSvgScrapingService.html index d9e0d28c01..219d0463ef 100644 --- a/module-core_base-service_base-svg-scraping-BaseSvgScrapingService.html +++ b/module-core_base-service_base-svg-scraping-BaseSvgScrapingService.html @@ -803,13 +803,13 @@ and module:cor
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_base-service_base-svg-scraping.html b/module-core_base-service_base-svg-scraping.html index d4baad6014..5de5d809fa 100644 --- a/module-core_base-service_base-svg-scraping.html +++ b/module-core_base-service_base-svg-scraping.html @@ -119,13 +119,13 @@
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_base-service_base-xml-BaseXmlService.html b/module-core_base-service_base-xml-BaseXmlService.html index c6e3b75431..9644c739d5 100644 --- a/module-core_base-service_base-xml-BaseXmlService.html +++ b/module-core_base-service_base-xml-BaseXmlService.html @@ -595,13 +595,13 @@ and module:cor
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_base-service_base-xml.html b/module-core_base-service_base-xml.html index 1047b8ab8f..e6f6d29310 100644 --- a/module-core_base-service_base-xml.html +++ b/module-core_base-service_base-xml.html @@ -119,13 +119,13 @@
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_base-service_base-yaml-BaseYamlService.html b/module-core_base-service_base-yaml-BaseYamlService.html index 5121fd6cdf..33fc2eb973 100644 --- a/module-core_base-service_base-yaml-BaseYamlService.html +++ b/module-core_base-service_base-yaml-BaseYamlService.html @@ -592,13 +592,13 @@ and module:cor
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_base-service_base-yaml.html b/module-core_base-service_base-yaml.html index ae63eeedc2..2a2db3d099 100644 --- a/module-core_base-service_base-yaml.html +++ b/module-core_base-service_base-yaml.html @@ -119,13 +119,13 @@
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_base-service_base.html b/module-core_base-service_base.html index 72ae96e3eb..937f347055 100644 --- a/module-core_base-service_base.html +++ b/module-core_base-service_base.html @@ -1202,13 +1202,13 @@ when the parameter is absent. (Note that in,
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_base-service_errors-Deprecated.html b/module-core_base-service_errors-Deprecated.html index e2301c1441..db4afa1d46 100644 --- a/module-core_base-service_errors-Deprecated.html +++ b/module-core_base-service_errors-Deprecated.html @@ -205,13 +205,13 @@
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_base-service_errors-ImproperlyConfigured.html b/module-core_base-service_errors-ImproperlyConfigured.html index 2954de4a38..637cc744d3 100644 --- a/module-core_base-service_errors-ImproperlyConfigured.html +++ b/module-core_base-service_errors-ImproperlyConfigured.html @@ -205,13 +205,13 @@
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_base-service_errors-Inaccessible.html b/module-core_base-service_errors-Inaccessible.html index 91e7e3c213..065a89fa8b 100644 --- a/module-core_base-service_errors-Inaccessible.html +++ b/module-core_base-service_errors-Inaccessible.html @@ -206,13 +206,13 @@ or to wrap a 5XX response


- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_base-service_errors-InvalidParameter.html b/module-core_base-service_errors-InvalidParameter.html index 82d81ebdcf..59fff62764 100644 --- a/module-core_base-service_errors-InvalidParameter.html +++ b/module-core_base-service_errors-InvalidParameter.html @@ -206,13 +206,13 @@ is invalid or unexpected


- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_base-service_errors-InvalidResponse.html b/module-core_base-service_errors-InvalidResponse.html index d6181e7a08..34d09e9565 100644 --- a/module-core_base-service_errors-InvalidResponse.html +++ b/module-core_base-service_errors-InvalidResponse.html @@ -205,13 +205,13 @@
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_base-service_errors-NotFound.html b/module-core_base-service_errors-NotFound.html index 1f225c2ec6..c1d44548a9 100644 --- a/module-core_base-service_errors-NotFound.html +++ b/module-core_base-service_errors-NotFound.html @@ -205,13 +205,13 @@
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_base-service_errors-ShieldsRuntimeError.html b/module-core_base-service_errors-ShieldsRuntimeError.html index 1f379d73b6..6e1deb367c 100644 --- a/module-core_base-service_errors-ShieldsRuntimeError.html +++ b/module-core_base-service_errors-ShieldsRuntimeError.html @@ -378,13 +378,13 @@ should override this method.


- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_base-service_errors.html b/module-core_base-service_errors.html index e48c357132..7613ca1af4 100644 --- a/module-core_base-service_errors.html +++ b/module-core_base-service_errors.html @@ -337,13 +337,13 @@ for. Defaults to the cacheLength of the service class throwing the error
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_base-service_graphql.html b/module-core_base-service_graphql.html index de9e8c1672..6a3c4ae098 100644 --- a/module-core_base-service_graphql.html +++ b/module-core_base-service_graphql.html @@ -290,13 +290,13 @@ but can't use that due to incorrect packaging.


- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_base-service_openapi.html b/module-core_base-service_openapi.html index a6da1156c9..2c99de66bf 100644 --- a/module-core_base-service_openapi.html +++ b/module-core_base-service_openapi.html @@ -1627,13 +1627,13 @@ Query params are usually strings. (Optional)


- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_base-service_resource-cache.html b/module-core_base-service_resource-cache.html index 82ed3ea3b2..c7ee82fdbf 100644 --- a/module-core_base-service_resource-cache.html +++ b/module-core_base-service_resource-cache.html @@ -562,13 +562,13 @@
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_server_server-Server.html b/module-core_server_server-Server.html index 7e0ced50d2..caadcb6270 100644 --- a/module-core_server_server-Server.html +++ b/module-core_server_server-Server.html @@ -675,13 +675,13 @@ Start listening for requests on this.baseUrl()


- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_server_server.html b/module-core_server_server.html index dbbd82c09b..f7a1acc716 100644 --- a/module-core_server_server.html +++ b/module-core_server_server.html @@ -119,13 +119,13 @@
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_service-test-runner_create-service-tester.html b/module-core_service-test-runner_create-service-tester.html index a269152cbb..7697100b74 100644 --- a/module-core_service-test-runner_create-service-tester.html +++ b/module-core_service-test-runner_create-service-tester.html @@ -230,13 +230,13 @@ service.


- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_service-test-runner_icedfrisby-shields.html b/module-core_service-test-runner_icedfrisby-shields.html index 463ab01672..621f428e47 100644 --- a/module-core_service-test-runner_icedfrisby-shields.html +++ b/module-core_service-test-runner_icedfrisby-shields.html @@ -286,13 +286,13 @@
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_service-test-runner_runner-Runner.html b/module-core_service-test-runner_runner-Runner.html index 92cea15ee8..c7df9d6305 100644 --- a/module-core_service-test-runner_runner-Runner.html +++ b/module-core_service-test-runner_runner-Runner.html @@ -562,13 +562,13 @@ overridden on instances.


- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_service-test-runner_runner.html b/module-core_service-test-runner_runner.html index cc89a832d4..c73d733d3f 100644 --- a/module-core_service-test-runner_runner.html +++ b/module-core_service-test-runner_runner.html @@ -119,13 +119,13 @@
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_service-test-runner_service-tester-ServiceTester.html b/module-core_service-test-runner_service-tester-ServiceTester.html index d6f83b7f46..5ecb54ec6d 100644 --- a/module-core_service-test-runner_service-tester-ServiceTester.html +++ b/module-core_service-test-runner_service-tester-ServiceTester.html @@ -1120,13 +1120,13 @@ the CLI, or directly on the tester.


- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_service-test-runner_service-tester.html b/module-core_service-test-runner_service-tester.html index 5f8860d87f..2ca7e093cf 100644 --- a/module-core_service-test-runner_service-tester.html +++ b/module-core_service-test-runner_service-tester.html @@ -119,13 +119,13 @@
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_service-test-runner_services-for-title.html b/module-core_service-test-runner_services-for-title.html index aa5599796e..37f74d3f1e 100644 --- a/module-core_service-test-runner_services-for-title.html +++ b/module-core_service-test-runner_services-for-title.html @@ -278,13 +278,13 @@ as an array of strings.


- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_token-pooling_token-pool-Token.html b/module-core_token-pooling_token-pool-Token.html index 03e77a2836..cce7e884b2 100644 --- a/module-core_token-pooling_token-pool-Token.html +++ b/module-core_token-pooling_token-pool-Token.html @@ -709,13 +709,13 @@ stable ordering for a valid priority queue.


- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_token-pooling_token-pool-TokenPool.html b/module-core_token-pooling_token-pool-TokenPool.html index 57a8b08a5b..1ad9eeb93d 100644 --- a/module-core_token-pooling_token-pool-TokenPool.html +++ b/module-core_token-pooling_token-pool-TokenPool.html @@ -893,13 +893,13 @@ indicate it should not be reused.


- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-core_token-pooling_token-pool.html b/module-core_token-pooling_token-pool.html index d6adf7b776..c1e152b707 100644 --- a/module-core_token-pooling_token-pool.html +++ b/module-core_token-pooling_token-pool.html @@ -285,13 +285,13 @@
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-services_build-status.html b/module-services_build-status.html index d298b38e67..6a2c45c29c 100644 --- a/module-services_build-status.html +++ b/module-services_build-status.html @@ -447,13 +447,13 @@ Determines the message and color of the badge according to the build status.


- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-services_color-formatters.html b/module-services_color-formatters.html index 81b75db273..250726b16c 100644 --- a/module-services_color-formatters.html +++ b/module-services_color-formatters.html @@ -1526,13 +1526,13 @@ The color defaults to red if the score does not matches with any of the grade va
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-services_contributor-count.html b/module-services_contributor-count.html index 001ffc60ed..5782fb9313 100644 --- a/module-services_contributor-count.html +++ b/module-services_contributor-count.html @@ -530,13 +530,13 @@ Determines the message and color of the badge according to the contributor count
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-services_downloads.html b/module-services_downloads.html index 4de7845773..0871463fb5 100644 --- a/module-services_downloads.html +++ b/module-services_downloads.html @@ -540,13 +540,13 @@ this value as the prefix for versioned badges, e.g. foobar@v1.23. D
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-services_dynamic-common.html b/module-services_dynamic-common.html index 8be4e98b20..32e8564860 100644 --- a/module-services_dynamic-common.html +++ b/module-services_dynamic-common.html @@ -954,13 +954,13 @@ Sets the color of the badge to blue.


- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-services_dynamic_json-path.html b/module-services_dynamic_json-path.html index 323e76c4d1..b2b3a23c80 100644 --- a/module-services_dynamic_json-path.html +++ b/module-services_dynamic_json-path.html @@ -417,13 +417,13 @@ This can be used to extend or override the
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-services_endpoint-common.html b/module-services_endpoint-common.html index fc5a5e84ce..ddfe3db64b 100644 --- a/module-services_endpoint-common.html +++ b/module-services_endpoint-common.html @@ -804,13 +804,13 @@ Optionally it prints those keys in the message to provide detailed feedback.


- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-services_licenses.html b/module-services_licenses.html index 78c04d0761..71479e9f71 100644 --- a/module-services_licenses.html +++ b/module-services_licenses.html @@ -644,13 +644,13 @@ Sets the badge color to the provided value, if not provided then the color is us
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-services_package-json-helpers.html b/module-services_package-json-helpers.html index 086f076425..e69c805ef6 100644 --- a/module-services_package-json-helpers.html +++ b/module-services_package-json-helpers.html @@ -650,13 +650,13 @@ Checks if the object has all the dependency types and the dependency types are v
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-services_php-version.html b/module-services_php-version.html index 34b68633b6..5a57280614 100644 --- a/module-services_php-version.html +++ b/module-services_php-version.html @@ -1466,13 +1466,13 @@ Return { numbers: [1,0,something big], modifier: 2, modifierCount: 1 }


- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-services_pipenv-helpers.html b/module-services_pipenv-helpers.html index 30acfe1c55..4f536e831f 100644 --- a/module-services_pipenv-helpers.html +++ b/module-services_pipenv-helpers.html @@ -610,13 +610,13 @@ Checks if the lock file object has required properties and the properties are va
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-services_route-builder.html b/module-services_route-builder.html index b5eca326af..d4bd0b3b11 100644 --- a/module-services_route-builder.html +++ b/module-services_route-builder.html @@ -615,13 +615,13 @@
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-services_steam_steam-base-BaseSteamAPI.html b/module-services_steam_steam-base-BaseSteamAPI.html index 92388a1e62..52516cb32f 100644 --- a/module-services_steam_steam-base-BaseSteamAPI.html +++ b/module-services_steam_steam-base-BaseSteamAPI.html @@ -374,13 +374,13 @@
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-services_steam_steam-base.html b/module-services_steam_steam-base.html index 3b00f3ce9f..9eeaf9b8ba 100644 --- a/module-services_steam_steam-base.html +++ b/module-services_steam_steam-base.html @@ -119,13 +119,13 @@
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-services_text-formatters.html b/module-services_text-formatters.html index 1700690165..b96dacf414 100644 --- a/module-services_text-formatters.html +++ b/module-services_text-formatters.html @@ -1674,13 +1674,13 @@ The remaining stars are empty stars until the maximum number of stars is reached
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-services_validators.html b/module-services_validators.html index e6e29ed0c9..bf92f350e8 100644 --- a/module-services_validators.html +++ b/module-services_validators.html @@ -701,13 +701,13 @@ Some invalid values for this validator are: abc, 1.a, 1.0-, .1


- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/module-services_version.html b/module-services_version.html new file mode 100644 index 0000000000..7ce9a75575 --- /dev/null +++ b/module-services_version.html @@ -0,0 +1,1891 @@ + + + + + JSDoc: Module: services/version + + + + + + + + + + +
+ +

Module: services/version

+ + + + + + +
+ +
+ +
+ +
+
+ + +

Utilities relating to generating badges relating to version numbers. Includes +comparing versions to determine the latest, and determining the color to use +for the badge based on whether the version is a stable release. +For utilities specific to PHP version ranges, see php-version.js.

+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + +

Methods

+ + + + + + + +

(inner) compareDottedVersion(v1, v2) → {number}

+ + + + + + +
+

Compares two strings representing version numbers lexicographically and returns an integer value.

+
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
v1 + + +string + + + +

The first version to compare

v2 + + +string + + + +

The second version to compare

+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+

-1 if v1 is smaller than v2, 1 if v1 is larger than v2, 0 if v1 and v2 are equal

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + + +
Example
+ +
compareDottedVersion('1.2.3', '1.2.4') // returns -1 because numeric part of first version is smaller than the numeric part of second version.
+ + + + + + + + + +

(inner) latest(versions, optionsopt) → {string|undefined}

+ + + + + + +
+

Finds the largest version number lexicographically or semantically from an array of strings representing version numbers and returns it as a string. +latest() is looser than latestMaybeSemVer() as it will attempt to make sense of anything, falling back to alphabetic sorting. +We should ideally prefer latest() over latestMaybeSemVer() when adding version badges.

+
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
versions + + +Array.<string> + + + + + + + + + +

The array of version numbers to compare

options + + +object + + + + + + <optional>
+ + + + + +

An optional object that contains additional options

+
Properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
pre + + +boolean + + + + + + <optional>
+ + + + + +
+ + false + +

Whether to include pre-release versions or not, defaults to false

+ +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+

The largest version number as a string, or undefined if the array is empty

+
+ + + +
+
+ Type +
+
+ +string +| + +undefined + + +
+
+ + + + + + +
Example
+ +
latest(['1.2.3', '1.2.4', '1.3', '2.0'], { pre: false }) // returns '2.0' because it is the largest version number and pre-release versions are excluded.
+latest(['1.2.3', '1.2.4', '1.3', '2.0'], { pre: true }) // returns '2.0' because pre-release versions are included but none of them are present in the array.
+latest(['1.2.3', '1.2.4', '1.3-alpha', '2.0-beta'], { pre: false }) // returns '1.2.4' because pre-release versions are excluded and it is the largest version number among the remaining ones.
+latest(['1.2.3', '1.2.4', '1.3-alpha', '2.0-beta'], { pre: true }) // returns '2.0-beta' because pre-release versions are included and it is the largest version number.
+ + + + + + + + + +

(inner) latestDottedVersion(versions) → {string|undefined}

+ + + + + + +
+

Finds the largest version number lexicographically from an array of strings representing version numbers and returns it as a string.

+
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
versions + + +Array.<string> + + + +

The array of version numbers to compare

+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+

The largest version number as a string, or undefined if the array is empty

+
+ + + +
+
+ Type +
+
+ +string +| + +undefined + + +
+
+ + + + + + +
Example
+ +
latestDottedVersion(['1.2.3', '1.2.4', '1.3', '2.0']) // returns '2.0' because it is the largest version number in the array.
+latestDottedVersion([]) // returns undefined because the array is empty.
+ + + + + + + + + +

(inner) latestMaybeSemVer(versions, pre) → {string|undefined}

+ + + + + + +
+

Finds the largest version number lexicographically or semantically from an array of strings representing version numbers and returns it as a string. +latestMaybeSemVer() is used for versions that match some kind of dotted version pattern.

+
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
versions + + +Array.<string> + + + +

The array of version numbers to compare

pre + + +boolean + + + +

Whether to include pre-release versions or not

+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+

The largest version number as a string, or undefined if the array is empty

+
+ + + +
+
+ Type +
+
+ +string +| + +undefined + + +
+
+ + + + + + +
Example
+ +
latestMaybeSemVer(['1.2.3', '1.2.4', '1.3', '2.0'], false) // returns '2.0' because it is the largest version number and pre-release versions are excluded.
+latestMaybeSemVer(['1.2.3', '1.2.4', '1.3', '2.0'], true) // returns '2.0' because pre-release versions are included but none of them are present in the array.
+latestMaybeSemVer(['1.2.3', '1.2.4', '1.3-alpha', '2.0-beta'], false) // returns '1.2.4' because pre-release versions are excluded and it is the largest version number among the remaining ones.
+latestMaybeSemVer(['1.2.3', '1.2.4', '1.3-alpha', '2.0-beta'], true) // returns '2.0-beta' because pre-release versions are included and it is the largest version number.
+ + + + + + + + + +

(inner) listCompare(a, b) → {number}

+ + + + + + +
+

Compares two arrays of numbers lexicographically and returns an integer value.

+
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
a + + +Array.<number> + + + +

The first array to compare

b + + +Array.<number> + + + +

The second array to compare

+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+

-1 if a is smaller than b, 1 if a is larger than b, 0 if a and b are equal

+
+ + + +
+
+ Type +
+
+ +number + + +
+
+ + + + + + +
Example
+ +
listCompare([1, 2, 3], [1, 2, 4]) // returns -1 because the third element of the first array is smaller than the third element of the second array.
+ + + + + + + + + +

(inner) rangeStart(v) → {string}

+ + + + + + +
+

Returns the start of the range that matches a given version string.

+
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
v + + +string + + + +

A version string that follows the Semantic Versioning specification. The function will accept and coerce invalid versions into valid ones.

+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
Throws:
+ + + +
+
+
+

If v is an invalid semver range

+
+
+
+
+
+
+ Type +
+
+ +TypeError + + +
+
+
+
+
+ + + + + +
Returns:
+ + +
+

The start of the range that matches the given version string, or null if no match is found.

+
+ + + +
+
+ Type +
+
+ +string + + +
+
+ + + + + + +
Example
+ +
rangeStart('^1.2.3') // returns '1.2.3'
+rangeStart('>=2.0.0') // returns '2.0.0'
+rangeStart('1.x || >=2.5.0 || 5.0.0 - 7.2.3') // returns '1.0.0'
+rangeStart('1.2.x') // returns '1.2.0'
+rangeStart('1.2.*') // returns '1.2.0-0'
+rangeStart(null) // throws TypeError: Invalid Version: null
+rangeStart('') // throws TypeError: Invalid Version:
+ + + + + + + + + +

(inner) renderVersionBadge(options) → {object}

+ + + + + + +
+

Creates a badge object that displays information about a version number. It should usually be used to output a version badge.

+
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +object + + + +

An object that contains the options for the badge

+
Properties
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDefaultDescription
version + + +string + + + + + + + + + + + +

The version number to display on the badge

tag + + +string + + + + + + <optional>
+ + + + + +
+ +

The tag to display on the badge, such as "alpha" or "beta"

defaultLabel + + +string + + + + + + <optional>
+ + + + + +
+ +

The default label to display on the badge, such as "npm" or "github"

versionFormatter + + +function + + + + + + <optional>
+ + + + + +
+ + versionColor + +

The function to use to format the color of the badge based on the version number

+ +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+

A badge object that has three properties: label, message, and color

+
+ + + +
+
+ Type +
+
+ +object + + +
+
+ + + + + + +
Example
+ +
renderVersionBadge({version: '1.2.3', tag: 'alpha', defaultLabel: 'npm'}) // returns {label: 'npm@alpha', message: 'v1.2.3', color: 'orange'} because
+it uses the tag and the defaultLabel to create the label, the addv function to add a 'v' prefix to the version in message,
+and the versionColor function to assign an orange color based on the version.
+ + + + + + + + + +

(inner) slice(v, releaseType) → {string|null}

+ + + + + + +
+

Slices the specified number of dotted parts from the given semver version.

+
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
v + + +string + + + +

The semver version to slice

releaseType + + +string + + + +

The release type to slice up to. Can be one of "major", "minor", or "patch"

+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + +
Returns:
+ + +
+

The sliced version as a string, or null if the version is not valid

+
+ + + +
+
+ Type +
+
+ +string +| + +null + + +
+
+ + + + + + +
Example
+ +
slice('2.4.7', 'minor') // returns '2.4' because it slices the version string up to the minor component.
+slice('2.4.7-alpha', 'patch') // returns '2.4.7-alpha' because it slices the version string up to the patch component and preserves the prerelease component.
+slice('2.4', 'patch') // returns null because the version string is not valid according to semver rules.
+ + + + + + + + + +
+ +
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time) +
+ + + + + \ No newline at end of file diff --git a/services_build-status.js.html b/services_build-status.js.html index 0e02f8ca23..e4d9966a6b 100644 --- a/services_build-status.js.html +++ b/services_build-status.js.html @@ -134,13 +134,13 @@ export { isBuildStatus, renderBuildStatusBadge }
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:54 GMT+0000 (Coordinated Universal Time)
diff --git a/services_color-formatters.js.html b/services_color-formatters.js.html index 409dc5e410..31c610aeec 100644 --- a/services_color-formatters.js.html +++ b/services_color-formatters.js.html @@ -234,13 +234,13 @@ export {
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:54 GMT+0000 (Coordinated Universal Time)
diff --git a/services_contributor-count.js.html b/services_contributor-count.js.html index d26d43f728..1ba4f96516 100644 --- a/services_contributor-count.js.html +++ b/services_contributor-count.js.html @@ -79,13 +79,13 @@ export { contributorColor, renderContributorBadge }
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:54 GMT+0000 (Coordinated Universal Time)
diff --git a/services_downloads.js.html b/services_downloads.js.html index bb2f427e02..42c3f8a786 100644 --- a/services_downloads.js.html +++ b/services_downloads.js.html @@ -95,13 +95,13 @@ export { renderDownloadsBadge }
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:54 GMT+0000 (Coordinated Universal Time)
diff --git a/services_dynamic-common.js.html b/services_dynamic-common.js.html index 8f4d45960f..6cd3ae2472 100644 --- a/services_dynamic-common.js.html +++ b/services_dynamic-common.js.html @@ -136,13 +136,13 @@ export {
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:54 GMT+0000 (Coordinated Universal Time)
diff --git a/services_dynamic_json-path.js.html b/services_dynamic_json-path.js.html index 030df1c5df..f957fd4cf5 100644 --- a/services_dynamic_json-path.js.html +++ b/services_dynamic_json-path.js.html @@ -114,13 +114,13 @@ export default superclass =>
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:54 GMT+0000 (Coordinated Universal Time)
diff --git a/services_endpoint-common.js.html b/services_endpoint-common.js.html index 0d9eb84ceb..d268840c8c 100644 --- a/services_endpoint-common.js.html +++ b/services_endpoint-common.js.html @@ -142,13 +142,13 @@ export { validateEndpointData, fetchEndpointData }
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:54 GMT+0000 (Coordinated Universal Time)
diff --git a/services_licenses.js.html b/services_licenses.js.html index 0b299830d2..1690c4a6ed 100644 --- a/services_licenses.js.html +++ b/services_licenses.js.html @@ -195,13 +195,13 @@ export { licenseToColor, renderLicenseBadge }
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:54 GMT+0000 (Coordinated Universal Time)
diff --git a/services_package-json-helpers.js.html b/services_package-json-helpers.js.html index b2047136be..c9ecc4ccdb 100644 --- a/services_package-json-helpers.js.html +++ b/services_package-json-helpers.js.html @@ -114,13 +114,13 @@ export { isDependencyMap, isPackageJsonWithDependencies, getDependencyVersion }
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:54 GMT+0000 (Coordinated Universal Time)
diff --git a/services_packagist_packagist-base.js.html b/services_packagist_packagist-base.js.html index 59da347b96..b133c700bc 100644 --- a/services_packagist_packagist-base.js.html +++ b/services_packagist_packagist-base.js.html @@ -221,13 +221,13 @@ export {
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:54 GMT+0000 (Coordinated Universal Time)
diff --git a/services_php-version.js.html b/services_php-version.js.html index e9b4ae20b4..055b683cc8 100644 --- a/services_php-version.js.html +++ b/services_php-version.js.html @@ -335,13 +335,13 @@ export {
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:54 GMT+0000 (Coordinated Universal Time)
diff --git a/services_pipenv-helpers.js.html b/services_pipenv-helpers.js.html index e0159fac54..cadeb68990 100644 --- a/services_pipenv-helpers.js.html +++ b/services_pipenv-helpers.js.html @@ -122,13 +122,13 @@ export { isLockfile, getDependencyVersion }
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:54 GMT+0000 (Coordinated Universal Time)
diff --git a/services_route-builder.js.html b/services_route-builder.js.html index aa7e2ed33f..424f757da7 100644 --- a/services_route-builder.js.html +++ b/services_route-builder.js.html @@ -99,13 +99,13 @@ export default class RouteBuilder {
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:54 GMT+0000 (Coordinated Universal Time)
diff --git a/services_steam_steam-base.js.html b/services_steam_steam-base.js.html index c21c089a95..03f788d5cb 100644 --- a/services_steam_steam-base.js.html +++ b/services_steam_steam-base.js.html @@ -92,13 +92,13 @@ export default BaseSteamAPI
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:54 GMT+0000 (Coordinated Universal Time)
diff --git a/services_test-validators.js.html b/services_test-validators.js.html index b67137ceeb..6ecb3068f6 100644 --- a/services_test-validators.js.html +++ b/services_test-validators.js.html @@ -253,13 +253,13 @@ export {
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:54 GMT+0000 (Coordinated Universal Time)
diff --git a/services_text-formatters.js.html b/services_text-formatters.js.html index aaa93a5eeb..91611bfdb0 100644 --- a/services_text-formatters.js.html +++ b/services_text-formatters.js.html @@ -246,13 +246,13 @@ export {
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:54 GMT+0000 (Coordinated Universal Time)
diff --git a/services_validators.js.html b/services_validators.js.html index 2bd2fce1e8..e9744bb77b 100644 --- a/services_validators.js.html +++ b/services_validators.js.html @@ -117,13 +117,13 @@ export const fileSize = Joi.string()
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:54 GMT+0000 (Coordinated Universal Time)
diff --git a/services_version.js.html b/services_version.js.html new file mode 100644 index 0000000000..e03d7eed03 --- /dev/null +++ b/services_version.js.html @@ -0,0 +1,308 @@ + + + + + JSDoc: Source: services/version.js + + + + + + + + + + +
+ +

Source: services/version.js

+ + + + + + +
+
+
/**
+ * Utilities relating to generating badges relating to version numbers. Includes
+ * comparing versions to determine the latest, and determining the color to use
+ * for the badge based on whether the version is a stable release.
+ * For utilities specific to PHP version ranges, see php-version.js.
+ *
+ * @module
+ */
+
+import semver from 'semver'
+import { addv } from './text-formatters.js'
+import { version as versionColor } from './color-formatters.js'
+
+/**
+ * Compares two arrays of numbers lexicographically and returns an integer value.
+ *
+ * @param {number[]} a - The first array to compare
+ * @param {number[]} b - The second array to compare
+ * @returns {number} -1 if a is smaller than b, 1 if a is larger than b, 0 if a and b are equal
+ * @example
+ * listCompare([1, 2, 3], [1, 2, 4]) // returns -1 because the third element of the first array is smaller than the third element of the second array.
+ */
+function listCompare(a, b) {
+  const alen = a.length
+  const blen = b.length
+  for (let i = 0; i < alen; i++) {
+    if (a[i] < b[i]) {
+      return -1
+    } else if (a[i] > b[i]) {
+      return 1
+    }
+  }
+  return alen - blen
+}
+
+/**
+ * Compares two strings representing version numbers lexicographically and returns an integer value.
+ *
+ * @param {string} v1 - The first version to compare
+ * @param {string} v2 - The second version to compare
+ * @returns {number} -1 if v1 is smaller than v2, 1 if v1 is larger than v2, 0 if v1 and v2 are equal
+ * @example
+ * compareDottedVersion('1.2.3', '1.2.4') // returns -1 because numeric part of first version is smaller than the numeric part of second version.
+ */
+function compareDottedVersion(v1, v2) {
+  const parts1 = /([0-9.]+)(.*)$/.exec(v1)
+  const parts2 = /([0-9.]+)(.*)$/.exec(v2)
+  if (parts1 != null && parts2 != null) {
+    const numbers1 = parts1[1]
+    const numbers2 = parts2[1]
+    const distinguisher1 = parts1[2]
+    const distinguisher2 = parts2[2]
+    const numlist1 = numbers1.split('.').map(e => +e)
+    const numlist2 = numbers2.split('.').map(e => +e)
+    const cmp = listCompare(numlist1, numlist2)
+    if (cmp !== 0) {
+      return cmp
+    } else {
+      return distinguisher1 < distinguisher2
+        ? -1
+        : distinguisher1 > distinguisher2
+        ? 1
+        : 0
+    }
+  }
+  return v1 < v2 ? -1 : v1 > v2 ? 1 : 0
+}
+
+/**
+ * Finds the largest version number lexicographically from an array of strings representing version numbers and returns it as a string.
+ *
+ * @param {string[]} versions - The array of version numbers to compare
+ * @returns {string|undefined} The largest version number as a string, or undefined if the array is empty
+ * @example
+ * latestDottedVersion(['1.2.3', '1.2.4', '1.3', '2.0']) // returns '2.0' because it is the largest version number in the array.
+ * latestDottedVersion([]) // returns undefined because the array is empty.
+ */
+function latestDottedVersion(versions) {
+  const len = versions.length
+  if (len === 0) {
+    return
+  }
+  let version = versions[0]
+  for (let i = 1; i < len; i++) {
+    if (compareDottedVersion(version, versions[i]) < 0) {
+      version = versions[i]
+    }
+  }
+  return version
+}
+
+/**
+ * Finds the largest version number lexicographically or semantically from an array of strings representing version numbers and returns it as a string.
+ * latestMaybeSemVer() is used for versions that match some kind of dotted version pattern.
+ *
+ * @param {string[]} versions - The array of version numbers to compare
+ * @param {boolean} pre - Whether to include pre-release versions or not
+ * @returns {string|undefined} The largest version number as a string, or undefined if the array is empty
+ * @example
+ * latestMaybeSemVer(['1.2.3', '1.2.4', '1.3', '2.0'], false) // returns '2.0' because it is the largest version number and pre-release versions are excluded.
+ * latestMaybeSemVer(['1.2.3', '1.2.4', '1.3', '2.0'], true) // returns '2.0' because pre-release versions are included but none of them are present in the array.
+ * latestMaybeSemVer(['1.2.3', '1.2.4', '1.3-alpha', '2.0-beta'], false) // returns '1.2.4' because pre-release versions are excluded and it is the largest version number among the remaining ones.
+ * latestMaybeSemVer(['1.2.3', '1.2.4', '1.3-alpha', '2.0-beta'], true) // returns '2.0-beta' because pre-release versions are included and it is the largest version number.
+ */
+function latestMaybeSemVer(versions, pre) {
+  let version = ''
+
+  if (!pre) {
+    // remove pre-releases from array
+    versions = versions.filter(version => !/\d+-\w+/.test(version))
+  }
+  try {
+    // coerce to string then lowercase otherwise alpha > RC
+    version = versions.sort((a, b) =>
+      semver.compareBuild(
+        `${a}`.toLowerCase(),
+        `${b}`.toLowerCase(),
+        /* loose */ true,
+      ),
+    )[versions.length - 1]
+  } catch (e) {
+    version = latestDottedVersion(versions)
+  }
+  return version
+}
+
+/**
+ * Finds the largest version number lexicographically or semantically from an array of strings representing version numbers and returns it as a string.
+ * latest() is looser than latestMaybeSemVer() as it will attempt to make sense of anything, falling back to alphabetic sorting.
+ * We should ideally prefer latest() over latestMaybeSemVer() when adding version badges.
+ *
+ * @param {string[]} versions - The array of version numbers to compare
+ * @param {object} [options] - An optional object that contains additional options
+ * @param {boolean} [options.pre=false] - Whether to include pre-release versions or not, defaults to false
+ * @returns {string|undefined} The largest version number as a string, or undefined if the array is empty
+ * @example
+ * latest(['1.2.3', '1.2.4', '1.3', '2.0'], { pre: false }) // returns '2.0' because it is the largest version number and pre-release versions are excluded.
+ * latest(['1.2.3', '1.2.4', '1.3', '2.0'], { pre: true }) // returns '2.0' because pre-release versions are included but none of them are present in the array.
+ * latest(['1.2.3', '1.2.4', '1.3-alpha', '2.0-beta'], { pre: false }) // returns '1.2.4' because pre-release versions are excluded and it is the largest version number among the remaining ones.
+ * latest(['1.2.3', '1.2.4', '1.3-alpha', '2.0-beta'], { pre: true }) // returns '2.0-beta' because pre-release versions are included and it is the largest version number.
+ */
+function latest(versions, { pre = false } = {}) {
+  let version = ''
+  let origVersions = versions
+
+  // return all results that are likely semver compatible versions
+  versions = origVersions.filter(version => /\d+\.\d+/.test(version))
+  // If no semver versions then look for single numbered versions
+  if (!versions.length) {
+    versions = origVersions.filter(version => /\d+/.test(version))
+  }
+
+  version = latestMaybeSemVer(versions, pre)
+
+  if (version == null && !pre) {
+    version = latestMaybeSemVer(versions, true)
+  }
+
+  // if we've still got nothing,
+  // fall back to a case-insensitive string comparison
+  if (version == null) {
+    origVersions = origVersions.sort((a, b) =>
+      a.toLowerCase().localeCompare(b.toLowerCase()),
+    )
+    version = origVersions[origVersions.length - 1]
+  }
+
+  return version
+}
+
+/**
+ * Slices the specified number of dotted parts from the given semver version.
+ *
+ * @param {string} v - The semver version to slice
+ * @param {string} releaseType - The release type to slice up to. Can be one of "major", "minor", or "patch"
+ * @returns {string|null} The sliced version as a string, or null if the version is not valid
+ * @example
+ * slice('2.4.7', 'minor') // returns '2.4' because it slices the version string up to the minor component.
+ * slice('2.4.7-alpha', 'patch') // returns '2.4.7-alpha' because it slices the version string up to the patch component and preserves the prerelease component.
+ * slice('2.4', 'patch') // returns null because the version string is not valid according to semver rules.
+ */
+function slice(v, releaseType) {
+  if (!semver.valid(v, /* loose */ true)) {
+    return null
+  }
+
+  const major = semver.major(v, /* loose */ true)
+  const minor = semver.minor(v, /* loose */ true)
+  const patch = semver.patch(v, /* loose */ true)
+  const prerelease = semver.prerelease(v, /* loose */ true)
+
+  const dottedParts = {
+    major: [major],
+    minor: [major, minor],
+    patch: [major, minor, patch],
+  }[releaseType]
+
+  if (dottedParts === undefined) {
+    throw Error(`Unknown releaseType: ${releaseType}`)
+  }
+
+  const dotted = dottedParts.join('.')
+  if (prerelease) {
+    return `${dotted}-${prerelease.join('.')}`
+  } else {
+    return dotted
+  }
+}
+
+/**
+ * Returns the start of the range that matches a given version string.
+ *
+ * @param {string} v - A version string that follows the Semantic Versioning specification. The function will accept and coerce invalid versions into valid ones.
+ * @returns {string} The start of the range that matches the given version string, or null if no match is found.
+ * @throws {TypeError} If v is an invalid semver range
+ * @example
+ * rangeStart('^1.2.3') // returns '1.2.3'
+ * rangeStart('>=2.0.0') // returns '2.0.0'
+ * rangeStart('1.x || >=2.5.0 || 5.0.0 - 7.2.3') // returns '1.0.0'
+ * rangeStart('1.2.x') // returns '1.2.0'
+ * rangeStart('1.2.*') // returns '1.2.0-0'
+ * rangeStart(null) // throws TypeError: Invalid Version: null
+ * rangeStart('') // throws TypeError: Invalid Version:
+ */
+function rangeStart(v) {
+  const range = new semver.Range(v, /* loose */ true)
+  return range.set[0][0].semver.version
+}
+
+/**
+ * Creates a badge object that displays information about a version number. It should usually be used to output a version badge.
+ *
+ * @param {object} options - An object that contains the options for the badge
+ * @param {string} options.version - The version number to display on the badge
+ * @param {string} [options.tag] - The tag to display on the badge, such as "alpha" or "beta"
+ * @param {string} [options.defaultLabel] - The default label to display on the badge, such as "npm" or "github"
+ * @param {Function} [options.versionFormatter=versionColor] - The function to use to format the color of the badge based on the version number
+ * @returns {object} A badge object that has three properties: label, message, and color
+ * @example
+ * renderVersionBadge({version: '1.2.3', tag: 'alpha', defaultLabel: 'npm'}) // returns {label: 'npm@alpha', message: 'v1.2.3', color: 'orange'} because
+ * it uses the tag and the defaultLabel to create the label, the addv function to add a 'v' prefix to the version in message,
+ * and the versionColor function to assign an orange color based on the version.
+ */
+function renderVersionBadge({
+  version,
+  tag,
+  defaultLabel,
+  versionFormatter = versionColor,
+}) {
+  return {
+    label: tag ? `${defaultLabel}@${tag}` : undefined,
+    message: addv(version),
+    color: versionFormatter(version),
+  }
+}
+
+export { latest, listCompare, slice, rangeStart, renderVersionBadge }
+
+
+
+ + + + +
+ + + +
+ +
+ Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:54 GMT+0000 (Coordinated Universal Time) +
+ + + + + diff --git a/tutorial-TUTORIAL.html b/tutorial-TUTORIAL.html index 0152e4a260..1ca4249f80 100644 --- a/tutorial-TUTORIAL.html +++ b/tutorial-TUTORIAL.html @@ -371,13 +371,13 @@ will review your contribution.
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/tutorial-adding-new-config-values.html b/tutorial-adding-new-config-values.html index 1a9b3a24af..c2798c3ce7 100644 --- a/tutorial-adding-new-config-values.html +++ b/tutorial-adding-new-config-values.html @@ -54,13 +54,13 @@
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/tutorial-authentication.html b/tutorial-authentication.html index 0940e61311..eb1e3702b2 100644 --- a/tutorial-authentication.html +++ b/tutorial-authentication.html @@ -42,13 +42,13 @@
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/tutorial-badge-urls.html b/tutorial-badge-urls.html index 781d9b2791..2bdf38dd6d 100644 --- a/tutorial-badge-urls.html +++ b/tutorial-badge-urls.html @@ -77,13 +77,13 @@ badge is for issues, and the parameters are :user/:repo.
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/tutorial-code-walkthrough.html b/tutorial-code-walkthrough.html index 84f0b4f180..83ced94451 100644 --- a/tutorial-code-walkthrough.html +++ b/tutorial-code-walkthrough.html @@ -229,13 +229,13 @@ result over the HTTPS connection.
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/tutorial-deprecating-badges.html b/tutorial-deprecating-badges.html index 3cd757131f..9a2257f08a 100644 --- a/tutorial-deprecating-badges.html +++ b/tutorial-deprecating-badges.html @@ -143,13 +143,13 @@ t.create('no longer available (previously number of layers)')
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/tutorial-input-validation.html b/tutorial-input-validation.html index 66e8ef5bd9..853abc43a7 100644 --- a/tutorial-input-validation.html +++ b/tutorial-input-validation.html @@ -97,13 +97,13 @@
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/tutorial-json-format.html b/tutorial-json-format.html index 1d13944146..286a5f191d 100644 --- a/tutorial-json-format.html +++ b/tutorial-json-format.html @@ -54,13 +54,13 @@ if you have any queries regarding the JSON format.


- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/tutorial-logos.html b/tutorial-logos.html index f788d87561..b7c4ef179a 100644 --- a/tutorial-logos.html +++ b/tutorial-logos.html @@ -80,13 +80,13 @@
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/tutorial-performance-testing.html b/tutorial-performance-testing.html index 3af68b81a9..6b6ebeb7d3 100644 --- a/tutorial-performance-testing.html +++ b/tutorial-performance-testing.html @@ -70,13 +70,13 @@ node --prof-process --preprocess -j isolate-00000244AB6ED3B0-11920-v8.log | flam
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/tutorial-production-hosting.html b/tutorial-production-hosting.html index 316768239f..1f3af6155f 100644 --- a/tutorial-production-hosting.html +++ b/tutorial-production-hosting.html @@ -211,13 +211,13 @@ via local-shields-io-production.yml (see Home

Modules

Classes

Tutorials

Global

+

Home

Modules

Classes

Tutorials

Global


- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/tutorial-releases.html b/tutorial-releases.html index 0863b778df..e0a4949e07 100644 --- a/tutorial-releases.html +++ b/tutorial-releases.html @@ -73,13 +73,13 @@
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/tutorial-self-hosting.html b/tutorial-self-hosting.html index 486916be17..d443351c8e 100644 --- a/tutorial-self-hosting.html +++ b/tutorial-self-hosting.html @@ -174,13 +174,13 @@ Set public.requireCloudflare: true.


- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/tutorial-server-secrets.html b/tutorial-server-secrets.html index f7e156d196..9c948dd20d 100644 --- a/tutorial-server-secrets.html +++ b/tutorial-server-secrets.html @@ -288,13 +288,13 @@ and create an API key for the YouTube Data API v3.


- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/tutorial-service-tests.html b/tutorial-service-tests.html index 0b460f7e56..a7e149796a 100644 --- a/tutorial-service-tests.html +++ b/tutorial-service-tests.html @@ -240,13 +240,13 @@ comment there instead.


- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)
diff --git a/tutorial-static-badges.html b/tutorial-static-badges.html index c6d7ce39f8..9c7e77c77a 100644 --- a/tutorial-static-badges.html +++ b/tutorial-static-badges.html @@ -36,13 +36,13 @@
- Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 14:53:44 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 4.0.2 on Fri Aug 11 2023 15:19:55 GMT+0000 (Coordinated Universal Time)