@wise-old-man/utils 2.0.0-beta.7 → 2.0.0-beta.8

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.
Files changed (2) hide show
  1. package/dist/index.js +7 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2482,12 +2482,15 @@ class CompetitionsClient extends BaseAPIClient {
2482
2482
 
2483
2483
  class WOMClient {
2484
2484
  constructor(options) {
2485
+ const headers = {
2486
+ 'x-user-agent': (options === null || options === void 0 ? void 0 : options.userAgent) || config.defaultUserAgent
2487
+ };
2488
+ if (options === null || options === void 0 ? void 0 : options.apiKey) {
2489
+ headers['x-api-key'] = options.apiKey;
2490
+ }
2485
2491
  const axiosInstance = axios__default["default"].create({
2486
2492
  baseURL: (options === null || options === void 0 ? void 0 : options.baseAPIUrl) || config.baseAPIUrl,
2487
- headers: {
2488
- 'x-api-key': (options === null || options === void 0 ? void 0 : options.apiKey) || null,
2489
- 'x-user-agent': (options === null || options === void 0 ? void 0 : options.userAgent) || config.defaultUserAgent
2490
- }
2493
+ headers
2491
2494
  });
2492
2495
  this.deltas = new DeltasClient(axiosInstance);
2493
2496
  this.groups = new GroupsClient(axiosInstance);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wise-old-man/utils",
3
- "version": "2.0.0-beta.7",
3
+ "version": "2.0.0-beta.8",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",