@govuk-pay/pay-js-commons 5.0.1 → 5.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -5,7 +5,6 @@ var utils = require('./utils');
5
5
  var nunjucksFilters = require('./nunjucks-filters');
6
6
  var logging = require('./logging');
7
7
  var constants = require('./constants');
8
- var HttpsBaseClient = require('./utils/https-base-client/https-base-client');
9
8
 
10
9
  // Add to window.GOVUKPAY if in browser context
11
10
  if (typeof window !== 'undefined') {
@@ -19,6 +18,5 @@ module.exports = {
19
18
  utils: utils,
20
19
  nunjucksFilters: nunjucksFilters,
21
20
  logging: logging,
22
- constants: constants,
23
- HttpsBaseClient: HttpsBaseClient
21
+ constants: constants
24
22
  };
@@ -23,16 +23,16 @@ var https = require('https');
23
23
  var axios = require('axios');
24
24
  var _require = require('./errors'),
25
25
  RESTClientError = _require.RESTClientError;
26
- var HttpsBaseClient = /*#__PURE__*/function () {
27
- function HttpsBaseClient(app) {
28
- _classCallCheck(this, HttpsBaseClient);
26
+ var Client = /*#__PURE__*/function () {
27
+ function Client(app) {
28
+ _classCallCheck(this, Client);
29
29
  this._app = app;
30
30
  }
31
31
 
32
32
  /**
33
33
  * Configure the client. Should only be called once.
34
34
  */
35
- _createClass(HttpsBaseClient, [{
35
+ _createClass(Client, [{
36
36
  key: "configure",
37
37
  value: function configure(baseURL, options) {
38
38
  var _this = this;
@@ -49,7 +49,7 @@ var HttpsBaseClient = /*#__PURE__*/function () {
49
49
  }),
50
50
  headers: {
51
51
  'Content-Type': 'application/json',
52
- Accept: 'application/json'
52
+ 'Accept': 'application/json'
53
53
  }
54
54
  });
55
55
  this._axios.interceptors.request.use(function (config) {
@@ -190,6 +190,8 @@ var HttpsBaseClient = /*#__PURE__*/function () {
190
190
  return this._axios.delete(url, this._getConfigWithDescription(config, description));
191
191
  }
192
192
  }]);
193
- return HttpsBaseClient;
193
+ return Client;
194
194
  }();
195
- module.exports = HttpsBaseClient;
195
+ module.exports = {
196
+ Client: Client
197
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@govuk-pay/pay-js-commons",
3
- "version": "5.0.1",
3
+ "version": "5.0.2",
4
4
  "description": "Reusable js scripts for GOV.UK Pay Node.js projects",
5
5
  "engines": {
6
6
  "node": "^18.17.1"
@@ -20,7 +20,7 @@
20
20
  "prepare": "npm run transpile && npm run browserify-analytics",
21
21
  "test": "npm run jest-tests npm && npm run karma-tests",
22
22
  "karma-tests": "karma start",
23
- "jest-tests": "jest src/analytics src/utils/https-base-client/https-base-client.test.js",
23
+ "jest-tests": "jest src/analytics src/utils/axios-base-client/axios-base-client.test.js",
24
24
  "lint": "standard --fix"
25
25
  },
26
26
  "repository": {