Commit Graph

22 Commits

Author SHA1 Message Date
chris48s
c2fe2ffa2e documentation html fixes (#8887)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-02-12 18:47:16 +00: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
J. Ryan Stinnett
8284545e22 Rename Riot to Element in Matrix badge help (#6996)
The Riot Matrix client was renamed to Element in July 2020 (https://element.io/blog/welcome-to-element/). This updates the Matrix badge help text to match.
2021-09-08 17:07:53 +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
Thakur Karthik
aa171180e5 Convert [maintenance mastodon matrix mavencentral] classes to static props (#5588)
* Refactor jira,jitpack,jsdelivr,keybase service files

* refactor maintenance mastodon matric and maven-central service files

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-22 03:30:18 +00:00
chris48s
13d75e0607 upgrade to prettier 2 (#5051)
* arrowParens: avoid
* remove trailingComma setting
2020-05-05 21:07:43 +01:00
chris48s
8621fe42d7 Upgrade Joi (#3505)
* upgrade joi
* find & replace ALL THE THINGS
* update related deps
2019-06-02 21:59:55 +01:00
Paul Melnikow
f8aeb56129 Unify order of more services (#3358)
Ref #3353
2019-04-24 15:08:26 -04:00
Pierre-Yves B
25f8541e5b JSON format modernisation and _shields_test removal (#3272)
* Modernised JSON format and removed _shields_test style

* Added logoWidth and labelColor fields to JSON response

* Reinstated and updated comment

* Extended expectBadge to accept Joi schemas for all fields
2019-04-07 18:57:55 +01:00
Pierre-Yves B
1f29c22d3d Migrated most service tests to use new expectBadge (#3122) 2019-02-28 21:43:23 +00:00
Paul Melnikow
4bd16f93e8 Sort imports and requires (#3056)
This will definitely save time, and ensure more uniformity.

It moves the `createServiceTester()` calls to a different place from where I'd like them, though I'm happy to have them checked by the linter.

Closes #2701
2019-02-21 22:14:40 -05:00
Paul Melnikow
2d7be31b0c Validate query params in BaseService (#3042)
This is a mid-sized PR that adds query param validation to BaseService and updates most of the services which use query param validation to use it. There are a couple minor tweaks I made along the way.

Fix #2676
2019-02-20 22:24:47 -05:00
Paul Melnikow
8c478d0e0a Use normalized colors to fix [dynamic matrix nexus] service tests (#2958) 2019-02-08 00:49:27 -05:00
Caleb Cartwright
855c9cd261 Remove dev dep imports in production code (#2937)
Fixes #2876 with @paulmelnikow's suggestion 

Moved imports of `ServiceTester` and `createServiceTester` to a separate file so that dev dependencies are not imported by service classes.
2019-02-05 21:51:55 -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
Paul Melnikow
bcc9acd18f Disallow redundant example patterns (#2787) 2019-01-16 19:47:10 -05:00
Paul Melnikow
4597d77015 Refactor badge color functions (#2742)
- Replace the idea of color schemes with the idea of named colors (since none of our colorschemes have used `colorA`)
- Pass through the normalized color to `_shields_test` to harmonize with BaseService and simplify testing
    - Update service tests
- Move responsibility for color generation into the npm package
- Remove several color helper functions and their tests
- Update gh-badge public API to accept `color` and `labelColor`

This is a precursor to refactoring some of the logo code for #2473.
2019-01-15 16:43:33 -05:00
Paul Melnikow
d1c5378bf0 Integrate new path-to-regexp with trailing optionals (#2644)
Fix #2497

Ref pillarjs/path-to-regexp#176
2019-01-08 18:50:47 -05:00
Paul Melnikow
89113eee17 Migrate deprecated staticExample -> staticPreview (#2650) 2019-01-06 17:30:25 -05:00
Brendan Abolivier
da5ca7454a Improve [Matrix] badge generation (#2527)
Fixes #2524 

This PR addresses the issues expressed in #2524, in that it:

* checks if a server has advertised a FQDN it can be reached at and if that FQDN hosts Matrix's client APIs
* uses room aliases instead of room IDs, in order to avoid a badge being impossible to generate if the server that created the room leaves it

This includes a breaking change to the badge endpoint.
2018-12-20 17:00:49 -05:00
M C
9e95020b18 Add [Matrix] Badge (#2417)
* Added matrix badge

* decreased the size of the matrix logo by more than 50%

* returning the size in fetch() instead of an object

* found another way to register a throwaway account (guest account). this one actually works on matrix.org, but I kept the old way as a backup method. also changed the POST from /members to /state because guest accounts didn't work with /members

* updated logo to a recolored version of the official logo

* Removed unnecessary comments.
Added documentation on how to create the badge URL.
Added a test that hits a real room to test for API compliance.
URLs are now obtained from getter functions.
Added JSON schema for the /state API request.
Improved state response filter.
Replaced example URL room ID to a dedicated testing room.
Made some error messages more helpful.

* correctly implemented requested changes

* changed color hex codes to constants
2018-12-06 19:25:59 +00:00