Commit Graph

360 Commits

Author SHA1 Message Date
Renovate Bot
b8ae86a8ea Update dependency sinon to v7.4.0 2019-08-05 01:28:22 +00:00
Renovate Bot
97d34b2aa1 Update dependency mocha to v6.2.0 2019-07-22 01:28:44 +00:00
Fabien O'Carroll
283c5fea58 Published new versions
- @tryghost/members-api@0.3.0
2019-07-17 18:23:25 +08:00
Fabien O'Carroll
1fb969ad36 Refactored to improve logging and error handling
* Installed stripe@7.4.0

refs #38

We were relying on stripe being installed in Ghost, this moves the dep
to the correct package.

* Created exponentialBackoff wrapper for stripe api

refs #38

https://stripe.com/docs/testing#rate-limits The stripe docs suggest to
use exponential backoff when recieving a rate limit error. This wrapper
will wrap stripe api calls, and retry them after 1s,2s,4s,8s,16s until
eventually failing. This gives a total of 5 retries over 31s.

* Added wrappers around the stripe api calls

refs #38

* Ensured all calls to stripe api go via exp backoff

refs #38

* Scaffolding out the error handling for stripe api

* Forwarding all errors

* Refactored stripe api into modules

* Ensured the ready promise object is not replaced

* Added logging setup

- Sets up common logger structure with custom logger passed through

* Ensure logger is kept in module state

* Renamed updateLogger to setLogger

* Removed `logger` param and exposed setLogger method

* Ensured different ids used for test mode

* Ensure setLogger works for prototype methods

* Removed reconfigureSettings method

* Updated payment processer service to keep static ready promise

* Added eventemitter to member api instance to handle errors

* Moved logging of errors to http level
2019-07-17 18:20:13 +08:00
Fabien O'Carroll
20c60e4de3 Published new versions
- @tryghost/members-api@0.2.0
 - @tryghost/members-browser-auth@0.1.3
 - @tryghost/members-gateway-api@0.1.4
 - @tryghost/members-theme-bindings@0.2.2
2019-07-09 15:39:16 +08:00
Fabien O'Carroll
f220ee10c7 Published new versions
- @tryghost/members-api@0.1.2
 - @tryghost/members-auth-pages@0.2.2
 - @tryghost/members-browser-auth@0.1.2
 - @tryghost/members-gateway-api@0.1.3
 - @tryghost/members-gateway-protocol@0.1.2
 - @tryghost/members-theme-bindings@0.2.0
2019-06-25 14:22:42 +07:00
Renovate Bot
ca998d0529 Update dependency jsdom to v15.1.1 2019-06-03 01:27:16 +00:00
Renovate Bot
32a13bf561 Update dependency jsdom to v15.1.0 2019-05-13 02:30:08 +00:00
Fabien O'Carroll
4633ea06e4 Published new versions
- @tryghost/members-api@0.1.1
 - @tryghost/members-auth-pages@0.1.2
2019-05-07 17:40:25 +02:00
Fabien O'Carroll
986791d091 Added package.json and deps for members-api
no-issue
2019-05-07 17:35:17 +02:00