@blocklet/sdk 1.16.33-beta-20241102-083409-a924dd84 → 1.16.33-beta-20241105-141729-e4608175

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.
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.csrf = csrf;
7
- const lodash_1 = require("lodash");
7
+ const isEmpty_1 = __importDefault(require("lodash/isEmpty"));
8
8
  const joi_1 = __importDefault(require("joi"));
9
9
  const digest_1 = require("../util/digest");
10
10
  const wallet_1 = require("../util/wallet");
@@ -31,7 +31,7 @@ function defaultVerifyToken(req) {
31
31
  printCookieParserNotInstalledWarning();
32
32
  }
33
33
  if (req.cookies &&
34
- !(0, lodash_1.isEmpty)(req.cookies['x-csrf-token']) &&
34
+ !(0, isEmpty_1.default)(req.cookies['x-csrf-token']) &&
35
35
  req.cookies['x-csrf-token'] === req.headers['x-csrf-token']) {
36
36
  const [xCsrfTokenMd5, xCsrfTokenSigned] = req.headers['x-csrf-token'].split('.');
37
37
  if ((0, digest_1.hmac)(xCsrfTokenMd5) === xCsrfTokenSigned) {
@@ -49,7 +49,7 @@ function shouldGenerateToken(req) {
49
49
  */
50
50
  function shouldVerifyToken(req) {
51
51
  return (['POST', 'PUT', 'PATCH', 'DELETE'].includes(req.method) &&
52
- !(0, lodash_1.isEmpty)(req.cookies['x-csrf-token']) &&
52
+ !(0, isEmpty_1.default)(req.cookies['x-csrf-token']) &&
53
53
  !(0, wallet_1.isDidWalletConnect)(req.headers));
54
54
  }
55
55
  const csrfOptionsSchema = joi_1.default.object({
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.33-beta-20241102-083409-a924dd84",
6
+ "version": "1.16.33-beta-20241105-141729-e4608175",
7
7
  "description": "graphql client to read/write data on abt node",
8
8
  "main": "lib/index.js",
9
9
  "typings": "lib/index.d.ts",
@@ -27,20 +27,20 @@
27
27
  "author": "linchen1987 <linchen.1987@foxmail.com> (http://github.com/linchen1987)",
28
28
  "license": "Apache-2.0",
29
29
  "dependencies": {
30
- "@abtnode/client": "1.16.33-beta-20241102-083409-a924dd84",
31
- "@abtnode/constant": "1.16.33-beta-20241102-083409-a924dd84",
32
- "@arcblock/did": "1.18.137",
33
- "@arcblock/did-auth": "1.18.137",
34
- "@arcblock/jwt": "1.18.137",
35
- "@arcblock/ws": "1.18.137",
36
- "@blocklet/constant": "1.16.33-beta-20241102-083409-a924dd84",
37
- "@blocklet/env": "1.16.33-beta-20241102-083409-a924dd84",
38
- "@blocklet/meta": "1.16.33-beta-20241102-083409-a924dd84",
30
+ "@abtnode/client": "1.16.33-beta-20241105-141729-e4608175",
31
+ "@abtnode/constant": "1.16.33-beta-20241105-141729-e4608175",
32
+ "@arcblock/did": "1.18.138",
33
+ "@arcblock/did-auth": "1.18.138",
34
+ "@arcblock/jwt": "1.18.138",
35
+ "@arcblock/ws": "1.18.138",
36
+ "@blocklet/constant": "1.16.33-beta-20241105-141729-e4608175",
37
+ "@blocklet/env": "1.16.33-beta-20241105-141729-e4608175",
38
+ "@blocklet/meta": "1.16.33-beta-20241105-141729-e4608175",
39
39
  "@did-connect/authenticator": "^2.2.4",
40
40
  "@did-connect/handler": "^2.2.4",
41
41
  "@nedb/core": "^2.1.5",
42
- "@ocap/mcrypto": "1.18.137",
43
- "@ocap/wallet": "1.18.137",
42
+ "@ocap/mcrypto": "1.18.138",
43
+ "@ocap/wallet": "1.18.138",
44
44
  "axios": "^1.7.5",
45
45
  "cheerio": "1.0.0-rc.12",
46
46
  "debug": "^4.3.7",
@@ -78,5 +78,5 @@
78
78
  "ts-node": "^10.9.1",
79
79
  "typescript": "^5.6.3"
80
80
  },
81
- "gitHead": "bc8a9ea91a3012635f25fb1594d96d3a10971517"
81
+ "gitHead": "1adf7b559a8725c2a33536da6936244b53d4cbff"
82
82
  }