23 Commits

Author SHA1 Message Date
chris48s
bd3a11b4b6 upgrade to docusaurus 3 (#9820)
* 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
2024-03-23 19:54:57 +00:00
Pierre-Yves Bigourdan
cb2ebe2e94 migrate examples to openApi part 37; affects [bitbucket bitrise chromewebstore circleci] (#9881)
* 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
2024-02-14 18:52:47 +00:00
chris48s
14892e3943 Implement a pattern for dealing with upstream APIs which are slow on the first hit; affects [endpoint] (#9233)
* allow serviceData to override cacheSeconds with a longer value

* prevent [endpoint] json cacheSeconds property exceeding service default

* allow ShieldsRuntimeError to specify a cacheSeconds property

By default error responses use the cacheLength of
the service class throwing the error.

This allows error to tell the handling layer the maxAge
that should be set on the error badge response.

* add customExceptions param

This

1. allows us to specify custom properties to pass to the exception
   constructor if we throw any of the standard got errors
   e.g: `ETIMEDOUT`, `ECONNRESET`, etc
2. uses a custom `cacheSeconds` property (if set on the exception)
   to set the response maxAge

* customExceptions --> systemErrors

* errorMessages --> httpErrors
2023-06-13 21:08:43 +01:00
chris48s
c73072deed Remove requestOptions2GotOptions compatibility layer (#7270)
* gzip --> decompress

* strictSSL --> https.rejectUnauthorized

* auth --> username/password

* qs --> searchParams

* fix base service auth docs

* completely remove requestOptions2GotOptions layer

* update the docs

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2021-11-15 19:56:08 +00:00
Pierre-Yves B
23c0406bed Migrate from CommonJS to ESM (#6651) 2021-07-09 12:53:55 +01:00
chris48s
504015c0ba migrate hapi/joi to joi (#5624)
* update joi + joi-extension-semver

* @hapi/joi --> joi

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-30 17:51:02 +00:00
Caleb Cartwright
bb2f827e00 convert some service classes to static props, run [ciibestpractices circleci cirrus] (#5511)
* refactor(ciibestpractices): convert to static props

* refactor(circleci): convert to static props

* refactor(cirrus): convert to static props

* chore: prettify

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-12 16:22:03 +00:00
chris48s
8621fe42d7 Upgrade Joi (#3505)
* upgrade joi
* find & replace ALL THE THINGS
* update related deps
2019-06-02 21:59:55 +01:00
Caleb Cartwright
054b2eb5ba fix: circle token query param bug (#3516) 2019-06-02 12:31:59 -04:00
chris48s
7caf301730 switch [circleci] service to scrape SVG badge, reorganise routes (#3413)
* switch [circleci] service to scrape SVG badge

* reorganise [circleci] routes

Default URL is now
circleci/build/gh/badges/shields/master?token=abc123
There are redirects on the legacy routes to provide
backwards compatibility for existing users
2019-05-11 17:55:32 +01:00
Paul Melnikow
0088a9d0da Unify remaining service order and enforce (#3359)
Ref #3353
2019-04-24 16:53:33 -04:00
Paul Melnikow
fafb22efee Move "good" badge helpers from lib/ to services/ (#3101)
This moves a few helpers from `lib/` to `services/`:

build-status.js
build-status.spec.js
color-formatters.js
color-formatters.spec.js
contributor-count.js
licenses.js
licenses.spec.js
php-version.js
php-version.spec.js
text-formatters.js
text-formatters.spec.js
version.js
version.spec.js

And one from `lib/` to `core/`:

unhandled-rejection.spec.js

The diff is long, but the changes are straightforward.

Ref #2832
2019-02-27 20:47:46 -05:00
Paul Melnikow
226fa67a02 Create shortcut for BaseService-related imports (#2809)
Continue to implement #2698:

- Add `core/base-service/index.js` (but hold off on moving the things it imports)
- Add shortcuts in `services/index.js` for Base*Service, errors, and deprecatedService. This file will be streamlined later to avoid cluttering it with rarely used bits.
- Apply consistent ordering of imports and use of `module.exports` in testers.
- Remove some renaming of imports.
- Remove obsolete tests here and there.
2019-01-21 15:41:24 -05:00
Pierre-Yves B
55ce947a35 Extended usage of build-status.js tomore services (#2763)
* Extended usage of build-status.js

* Removed remaining status arguments
2019-01-15 20:27:18 +00:00
Paul Melnikow
89113eee17 Migrate deprecated staticExample -> staticPreview (#2650) 2019-01-06 17:30:25 -05:00
Paul Melnikow
c4143b9c23 Convert a bunch of exampleUrls and formats (#2633) 2019-01-05 14:54:34 -05:00
Haythem Tlili
f076b46da8 CircleCI token documentation (#2379) 2018-11-21 10:42:26 -06:00
Haythem Tlili
ce0b492029 Fix CircleCI token example (#2373)
The CircleCI token example contains a redundant fragment `/circleci/circleci/:token`.
2018-11-20 15:35:44 -06:00
Paul Melnikow
3ad742e79a Example: Canonicalize urlPattern to pattern (#2341)
Close #2334 

To avoid merge conflicts, I've deferred removing the aliasing logic in `prepareExamples`. That whole function will be refactored momentarily, and there's also #2339 open.
2018-11-18 09:03:33 -05:00
Paul Melnikow
02ec19fd22 BaseService terminology: Rename url to route (#2278)
The term “url” is overloaded in services, to refer to the Shields route and also the API URL. Calling the Shields URL a “route” is on the whole more descriptive, and makes it clearer and more obvious which one of these we’re talking about. It’s a small thing, though seems like an improvement.

We have a few functions called `buildUrl`. I’ve renamed them to `buildRoute` when they refer to routes, and left them as `buildUrl` when they refer to API URLs.

I included a minor style tweak and some formatting cleanup in `TUTORIAL.md`.
2018-11-09 15:11:03 -05:00
Marcin Mielnicki
1d18e1048f bugfix: [CircleCI] uses 'github' as a default VCS (#2137)
* Circle CI uses 'github' as a default VCS

* Prettier code
2018-10-05 22:46:51 +01:00
Eugene Zhlobo
c8593c77c4 Handle CircleCI urls with token correctly (#2087) 2018-09-18 09:03:00 +01:00
chris48s
e294dc4edc refactor [circleci] integration (#1927)
* refactor [circleci] integration
2018-08-28 15:49:43 +01:00