lemmy-js-client 0.19.0-rc.16 → 0.19.0-rc.19

Sign up to get free protection for your applications and to get access to all the features.
package/dist/http.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import fetch from "cross-fetch";
1
2
  import { AddAdmin } from "./types/AddAdmin";
2
3
  import { AddAdminResponse } from "./types/AddAdminResponse";
3
4
  import { AddModToCommunity } from "./types/AddModToCommunity";
package/dist/http.js CHANGED
@@ -25,6 +25,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
25
25
  var _LemmyHttp_instances, _LemmyHttp_apiUrl, _LemmyHttp_headers, _LemmyHttp_pictrsUrl, _LemmyHttp_fetchFunction, _LemmyHttp_buildFullUrl, _LemmyHttp_wrapper;
26
26
  Object.defineProperty(exports, "__esModule", { value: true });
27
27
  exports.LemmyHttp = void 0;
28
+ const cross_fetch_1 = __importDefault(require("cross-fetch"));
28
29
  const form_data_1 = __importDefault(require("form-data"));
29
30
  const other_types_1 = require("./other_types");
30
31
  var HttpType;
@@ -47,7 +48,7 @@ class LemmyHttp {
47
48
  _LemmyHttp_apiUrl.set(this, void 0);
48
49
  _LemmyHttp_headers.set(this, {});
49
50
  _LemmyHttp_pictrsUrl.set(this, void 0);
50
- _LemmyHttp_fetchFunction.set(this, fetch);
51
+ _LemmyHttp_fetchFunction.set(this, cross_fetch_1.default);
51
52
  __classPrivateFieldSet(this, _LemmyHttp_apiUrl, `${baseUrl.replace(/\/+$/, "")}/api/${other_types_1.VERSION}`, "f");
52
53
  __classPrivateFieldSet(this, _LemmyHttp_pictrsUrl, `${baseUrl}/pictrs/image`, "f");
53
54
  if (options === null || options === void 0 ? void 0 : options.headers) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lemmy-js-client",
3
- "version": "0.19.0-rc.16",
3
+ "version": "0.19.0-rc.19",
4
4
  "description": "A javascript / typescript client for Lemmy",
5
5
  "repository": "https://github.com/LemmyNet/lemmy-js-client",
6
6
  "license": "AGPL-3.0",
@@ -26,6 +26,7 @@
26
26
  ]
27
27
  },
28
28
  "dependencies": {
29
+ "cross-fetch": "^3.1.5",
29
30
  "form-data": "^4.0.0"
30
31
  },
31
32
  "devDependencies": {