@blocklet/uploader-server 0.2.6 → 0.2.7

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/es/utils.js CHANGED
@@ -3,7 +3,6 @@ import path from "path";
3
3
  import joinUrl from "url-join";
4
4
  import { isbot } from "isbot";
5
5
  import component from "@blocklet/sdk/lib/component";
6
- import Auth from "@blocklet/sdk/service/auth";
7
6
  import { ImageBinDid } from "./constants.js";
8
7
  import crypto from "crypto";
9
8
  import { getSignData } from "@blocklet/sdk/lib/util/verify-sign";
@@ -16,7 +15,6 @@ import { join } from "path";
16
15
  import ExifTransformer from "exif-be-gone";
17
16
  export let logger = console;
18
17
  const isProduction = process.env.NODE_ENV === "production" || process.env.ABT_NODE_SERVICE_ENV === "production";
19
- const client = new Auth();
20
18
  if (process.env.BLOCKLET_LOG_DIR) {
21
19
  try {
22
20
  const initLogger = require("@blocklet/logger");
@@ -44,13 +42,6 @@ export async function getTrustedDomainsCache({
44
42
  return trustedDomainsCache.domains;
45
43
  }
46
44
  }
47
- try {
48
- if (!trustedDomainsCache?.domains?.length) {
49
- trustedDomainsCache.domains = await client.getTrustedDomains().then((res) => res.data);
50
- trustedDomainsCache.timestamp = now;
51
- }
52
- } catch (error) {
53
- }
54
45
  try {
55
46
  if (!trustedDomainsCache?.domains?.length) {
56
47
  trustedDomainsCache.domains = await axios.get(joinUrl(appUrl, "/.well-known/service/api/federated/getTrustedDomains")).then((res) => res.data);
package/lib/utils.js CHANGED
@@ -21,7 +21,6 @@ var _path = _interopRequireWildcard(require("path"));
21
21
  var _urlJoin = _interopRequireDefault(require("url-join"));
22
22
  var _isbot = require("isbot");
23
23
  var _component = _interopRequireDefault(require("@blocklet/sdk/lib/component"));
24
- var _auth = _interopRequireDefault(require("@blocklet/sdk/service/auth"));
25
24
  var _constants = require("./constants");
26
25
  var _crypto = _interopRequireDefault(require("crypto"));
27
26
  var _verifySign = require("@blocklet/sdk/lib/util/verify-sign");
@@ -36,7 +35,6 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
36
35
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
37
36
  let logger = exports.logger = console;
38
37
  const isProduction = process.env.NODE_ENV === "production" || process.env.ABT_NODE_SERVICE_ENV === "production";
39
- const client = new _auth.default();
40
38
  if (process.env.BLOCKLET_LOG_DIR) {
41
39
  try {
42
40
  const initLogger = require("@blocklet/logger");
@@ -63,12 +61,6 @@ async function getTrustedDomainsCache({
63
61
  return trustedDomainsCache.domains;
64
62
  }
65
63
  }
66
- try {
67
- if (!trustedDomainsCache?.domains?.length) {
68
- trustedDomainsCache.domains = await client.getTrustedDomains().then(res => res.data);
69
- trustedDomainsCache.timestamp = now;
70
- }
71
- } catch (error) {}
72
64
  try {
73
65
  if (!trustedDomainsCache?.domains?.length) {
74
66
  trustedDomainsCache.domains = await _axios.default.get((0, _urlJoin.default)(appUrl, "/.well-known/service/api/federated/getTrustedDomains")).then(res => res.data);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/uploader-server",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "blocklet upload server",
5
5
  "publishConfig": {
6
6
  "access": "public"