@dynatrace-sdk/http-client 1.5.1 → 1.5.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/esm/index.js CHANGED
@@ -46,6 +46,7 @@ var BaseError = class extends Error {
46
46
  super(message);
47
47
  this.cause = cause;
48
48
  }
49
+ cause;
49
50
  };
50
51
 
51
52
  // packages/http-client/src/lib/platform/unsupported-operation-error.ts
@@ -77,6 +78,7 @@ var Binary = class _Binary {
77
78
  constructor(data) {
78
79
  this.data = data;
79
80
  }
81
+ data;
80
82
  static fromText(text) {
81
83
  return new _Binary(new Blob([text]));
82
84
  }
@@ -238,6 +240,7 @@ var HttpClientAbortError = class extends Error {
238
240
  );
239
241
  this.cause = cause;
240
242
  }
243
+ cause;
241
244
  name = "AbortError";
242
245
  };
243
246
  var throwIfAbortError = (e) => {
@@ -254,21 +257,20 @@ var HttpClientRequestError = class extends BaseError {
254
257
  );
255
258
  this.cause = cause;
256
259
  }
260
+ cause;
257
261
  name = "RequestError";
258
262
  };
259
263
 
260
264
  // packages/http-client/src/lib/platform/decode-form-data.ts
261
265
  function byteToChar(byte) {
262
- if (byte === void 0)
263
- return void 0;
266
+ if (byte === void 0) return void 0;
264
267
  return String.fromCharCode(byte);
265
268
  }
266
269
  function isTextContentType(contentType) {
267
270
  return ["application/json", "text/plain"].includes(String(contentType).toLowerCase());
268
271
  }
269
272
  function removeEscaping(value) {
270
- if (!value)
271
- return value;
273
+ if (!value) return value;
272
274
  return JSON.parse(`"${value}"`);
273
275
  }
274
276
  function parseContentDisposition(contentDisposition) {
@@ -288,6 +290,8 @@ var FormDataParser = class {
288
290
  this.sourceArray = sourceArray;
289
291
  this.boundary = boundary;
290
292
  }
293
+ sourceArray;
294
+ boundary;
291
295
  currentChar = null;
292
296
  currentByte = null;
293
297
  offset = 0;
@@ -599,6 +603,7 @@ var HttpClientResponse = class {
599
603
  this.response = response;
600
604
  this.requestUrl = data?.requestUrl ?? response.url;
601
605
  }
606
+ response;
602
607
  requestUrl;
603
608
  get url() {
604
609
  return this.response.url;
@@ -820,6 +825,7 @@ var OAuthHttpClient = class {
820
825
  constructor(config) {
821
826
  this.config = config;
822
827
  }
828
+ config;
823
829
  oauthToken;
824
830
  async send(options) {
825
831
  const { statusValidator = defaultStatusValidator } = options;
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
package/package.json CHANGED
@@ -1,9 +1,20 @@
1
1
  {
2
2
  "name": "@dynatrace-sdk/http-client",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "description": "An environment agnostic (browser/deno vs nodejs) abstraction layer for making HTTP calls.",
5
5
  "license": "Apache-2.0",
6
- "dependencies": { "@dynatrace-sdk/error-handlers": "^1.2.0" },
6
+ "exports": {
7
+ ".": {
8
+ "types": "./types/index.d.ts",
9
+ "require": "./cjs/index.js",
10
+ "browser": "./esm/index.js",
11
+ "module": "./esm/index.js",
12
+ "import": "./esm/index.js"
13
+ }
14
+ },
15
+ "dependencies": {
16
+ "@dynatrace-sdk/error-handlers": "^1.2.0"
17
+ },
7
18
  "main": "./cjs/index.js",
8
19
  "module": "./esm/index.js",
9
20
  "types": "./types/index.d.ts"