* support setting pypiBaseUrl by environment variables
* Add support for pypiBaseUrl configuration
* Update Pypi services to include pypiBaseUrl parameter
* change package name example to a more well-known package
* Update custom-environment-variables.yml
* Update Pypi services to include pypiBaseUrl parameter
* fix openapi mismatch
* Update doc/server-secrets.md
---------
Co-authored-by: chris48s <chris48s@users.noreply.github.com>
* [GithubGoMod] Ignore comment after version (fixes#10079)
* add unit tests for GithubGoModGoVersion.transform
---------
Co-authored-by: chris48s <git@chris-shaw.dev>
* Add Bitbucket last commit
* Update schemas
* Limit API results to 1
* Make `branch` a required path param
Co-authored-by: chris48s <chris48s@users.noreply.github.com>
* Better message for no commits found
* Update 404 message
* Use common `relativeUri` validator for `path`
---------
Co-authored-by: chris48s <chris48s@users.noreply.github.com>
* Support file path for GitHub last commit
* Support file path for GitLab last commit
* Support file path for Gitea last commit
* Define common `relativeUri` validator
* Sort imports
* Add more tests for path variations
* Fix test name
Co-authored-by: chris48s <chris48s@users.noreply.github.com>
* Update Gitea 404 message
* Handle case when no commits are returned for GitHub and GitLab
---------
Co-authored-by: chris48s <chris48s@users.noreply.github.com>
* update packages
* add plugin to strip autolinks in code blocks
* fix all the documentation for MDXv3
* remove check-docusaurus-versions
in docusaurus 3 this is now a hard error, not just a warning
* port upstream change to Curl component
fixes performing the 'execute' action when pressing enter
* Add snapstore version badge
Fixesbadges/shields#9103
* Add basic test for Snapcraft version
* Handle snapstore-version - package not found
* Add test for invalid snapcraft package
* Remove redundent SnapstoreBase class
not needed as there is no auth
* Remove logo from default
The project convention is using namedLogo by default only for social badges.
This commit removes the default logo usage as this badge is not in the social category.
* Rename snapstore to snapcraft
Keep 1 convention for the snapcraft badge, use only snapcraft and ditch snapstore.
* Fix SnapcraftVersion schema
* Use renderVersionBadge
Replace the costume render in SnapcraftVersion with renderVersionBadge
* Rename folder from snapstore to snapcraft
* Add track & risk path parameters for SnapcraftVersion
enhancing control and clarity
* Add architecture query parameter to SnapcraftVersion
Added architecture query parameter: The snapcraft-version.service.js file now accepts an optional arch query parameter to specify the desired architecture for the Snap package. This defaults to amd64 if not provided.
If an unsupported architecture is specified in the query parameter, a NotFound error is thrown with a specific message indicating that the requested architecture is not found.
The snapcraft-version.tester.js file is updated to include a new test case that verifies the behavior when using the arch query parameter and also includes a test case for handling an invalid architecture.
* move filter logic into a transform function
* Fix filter logic
The goal here was to filter by all conditions with logic and.
Before this fix the only the logic of the last filter is used.
* Add tests for SnapcraftVersion.transform
* init GithubCreatedAt service
* render raw created_at
* impl formatted date
* add color
* add test for absent repo
* add `reversed` parameter to `age` color formatter
* inverse the colors of the badge
---------
Co-authored-by: Studio <studio@192.168.1.20>
* added support for custom bucket urls in Scoop Version shield
* tolerate URLs with a trailing slash
* added description with example to bucket query param
* you missed one
* remove examples from deprecatedService()
I'm not going to replace this with openApi
We have zero examples of deprecated services that declare examples
* remove examples from redirector()
* update test
* remove compatibility code for converting examples to openApi
* remove all the code for handling examples
* remove a few bits of redundant code
* improve docs for openApi property
* last one, I promise
* improve stackexchange auth testing
Change auth tests to include all shields of the base class.
The code is formated to be used in more general cases and increases code reuseability.
* Remove dummy auth test
We already test all existing classes, no need for a dummy
* Add getBadgeExampleCall to test-helpers
Add getBadgeExampleCall to extract the first OpenAPI example then reformat it for service invoke function.
* Use getBadgeExampleCall in stackexchange-base tests
* Fix getBadgeExampleCall Errors
* Add testAuth to test-helpers
Add the testAuth function which tests auth of a service (badge) using a provided dummy response.
* Refactor stackexchange-base.spec.js to use testAuth from test-helpers
* Split stackexchange-base.spec into per service test file
* Add all auth methods to testAuth
Add all auth methods used to testAuth to be generic and used by all services.
Add helper functions to make testAuth more readable
* Handle non-default bearer and api headers
* Add discord.spec.js as first attempt for bearer auth
* Fix basic auth user
* Add dynamic authorizedOrigins
* Add header optional argument
* Add obs as basicAuth example
* Use apiHeaderKey and bearerHeaderKey function params
Use apiHeaderKey & bearerHeaderKey as function params rather then extracting them with regex from function strings.
Those options are now part of an options object param joined with the contentType that replaces header.
header was originaly added for setting content type of the reply, so it makes more sense to directly set the content type
* Remove old comment
* Allow any pass & user key for QueryStringAuth
Before this commit the QueryStringAuth would only work for the key of stackexchange.
This commit makes the testAuth function generic and allows passing user and pass keys.
* Add auth test for PepyDownloads
* Fix wrong header for jwt login
Might set wrong header for jwt login request.
This commit fixes that.
* Support multiple authOrigins in testAuth
Some services might have more then one authOrigin.
This commit makes sure we test for redundent authOrigins as well as support requests to them if needed.
* Add docker-automated auth test
* Fix JwtAuth testing by introducing mandatory jwtLoginEndpoint
Prior to this change, JwtAuth testing would lead to erros due to the absence of a specified login endpoint,
Nock would be dumplicated for both login and non login hosts and indicate a missing request.
This commit enforces the requirement for a new jwtLoginEndpoint argument when testing JwtAuth.
The argument seperates the endpoint nock scope from the behavior of the request nock.
* Fix type test in generateFakeConfig
* init npm-unpacked-size service
* add sample badge
* fetch unpacked size from latest version
* format unpacked size
* parametrize unpacked size by package name
* add optional version parameter
* fix typo on test
* rename test to tester
* test against json endpoint instead of svg
* test and impl version with undefined unpacked size
* test version with defined unpacked size
* change color to lightgray when unpackedSize is undefined
* add openapi docs
* extend NpmBase instead of BaseJsonService
* use isFileSize validator
* add schema to validate npm registry response body
* add tests for scoped packages
* impl scoped package route
* change the type of schema.dist.unpackedSize to optionalNonNegativeInteger
* add registry_uri query param
* add default label to badge
* unpack tag instead of version
* revert back to versions instead of tags
* test unresponsive website
* render down badge if website is unresponsive
* use built-in timeout option from got client
* reply with 200 after delay
* add a note to the docs
---------
Co-authored-by: chris48s <git@chris-shaw.dev>
* migrate some services from examples to openApi
* Fix Bitbucket tests and examples
* Fix CircleCI and Bitrise tests
* Use fake token in Bitrise examples
* Use JohnEstropia/CoreStore token in Bitrise tests
* feat(gitea): add forks, stars, issues and pr badges
* doc(comment): update comments
* fix(gitea): update based on feedback
* refactor(fetch): refactor fetch to be more generic
* refactor(fetch): remove unused function
* use isMetric
---------
Co-authored-by: chris48s <chris48s@users.noreply.github.com>
* prototype fix msrv using yanked versions
* make it prettier
* deduplicate schema definition and add version info helper function
* use newest version only if it wasnt yanked
* fix variable name typo
* remove unused import
* try add new test
* satisfy linter
* don't import "describe()"
* fixup
---------
Co-authored-by: chris48s <git@chris-shaw.dev>
* fix(gitea): set gitea.com as default, update tests and message
* fix(gitea): removed required flag
* test(gitea): migrate tests to try.gitea.io
* fix(test): fix auth test nock
* fix(ci): revert tests to codeberg, update description with better verbiage, rename documenation to description
* doc(api): reference flagship url for swagger information in comments