node-easywechat 2.13.1 → 2.13.3

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.
@@ -10,12 +10,19 @@ on:
10
10
  jobs:
11
11
  build:
12
12
  runs-on: ubuntu-latest
13
+ permissions:
14
+ id-token: write
15
+ strategy:
16
+ matrix:
17
+ node-version: [14.x, 16.x, 18.x, 20.x, 22.x, 24.x]
13
18
  steps:
14
- - uses: actions/checkout@v3
15
- - uses: actions/setup-node@v3
19
+ - uses: actions/checkout@v4
16
20
  with:
17
- node-version: 16
21
+ show-progress: false
22
+ - uses: actions/setup-node@v4
23
+ with:
24
+ node-version: ${{ matrix.node-version }}
25
+ registry-url: 'https://registry.npmjs.org'
18
26
  - run: npm install
19
27
  - run: npm run build
20
28
  - run: npm test
21
-
@@ -10,15 +10,19 @@ on:
10
10
  jobs:
11
11
  publish-npm:
12
12
  runs-on: ubuntu-latest
13
+ permissions:
14
+ id-token: write
13
15
  steps:
14
- - uses: actions/checkout@v3
15
- - uses: actions/setup-node@v3
16
+ - uses: actions/checkout@v4
16
17
  with:
17
- node-version: 16
18
- registry-url: https://registry.npmjs.org/
18
+ show-progress: false
19
+ - uses: actions/setup-node@v4
20
+ with:
21
+ node-version: 22
22
+ registry-url: 'https://registry.npmjs.org'
19
23
  - run: npm install
20
24
  - run: npm run build
21
25
  - run: npm test
22
- - run: npm publish --tag second
26
+ - run: npm publish --tag latest --provenance --access public
23
27
  env:
24
28
  NODE_AUTH_TOKEN: ${{secrets.npm_token}}
package/CHANGELOG.md CHANGED
@@ -1,6 +1,14 @@
1
1
  # CHANGELOG
2
2
 
3
3
 
4
+ ## v2.13.3 (2025-07-24)
5
+
6
+ - Fix: 更新依赖包,修复安全漏洞
7
+
8
+ ## v2.13.2 (2025-03-13)
9
+
10
+ - Fix: 自动回复视频消息的格式错误问题
11
+
4
12
  ## v2.13.1 (2023-11-11)
5
13
 
6
14
  - Fix: 更新依赖包
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  **注:2.x分支针对 EasyWechat 的 5.x版本(由于4.x与5.x的结构基本一致,就不升级大版本了)。**
8
8
 
9
- 若您需要 EasyWechat 的 5.x版本,请切换到 [3.x](https://github.com/hpyer/node-easywechat/tree/3.x) 分支。
9
+ 若您需要 EasyWechat 的 6.x版本,请切换到 [3.x](https://github.com/hpyer/node-easywechat/tree/3.x) 分支。
10
10
 
11
11
  [EasyWechat](https://github.com/w7corp/easywechat) 是一个由 `安正超` 大神用 PHP 开发的开源的微信非官方 SDK(现由微擎团队团队维护)。其功能强大,使用方便,个人一直很喜欢,所以近日将其在 Node.js 上实现。本人会尽量还原其配置项以及接口的调用方式,但毕竟语言环境不同,具体的实现方式会有些许差别,还请各位开发者见谅。
12
12
 
@@ -1,4 +1,6 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ /// <reference types="node" />
2
4
  import { CipherGCMTypes, BinaryLike, CipherKey } from 'crypto';
3
5
  export declare class AES {
4
6
  /**
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import { IncomingMessage } from 'http';
3
4
  import RequestInterface from '../Contracts/RequestInterface';
4
5
  export default class Request implements RequestInterface {
@@ -10,23 +10,17 @@ class Video extends Media_1.Media {
10
10
  'title',
11
11
  'description',
12
12
  'media_id',
13
- 'thumb_media_id',
14
13
  ];
15
14
  }
16
15
  toXmlArray() {
17
- let music = {
18
- Music: {
16
+ let video = {
17
+ Video: {
18
+ MediaId: this.get('media_id'),
19
19
  Title: this.get('title'),
20
20
  Description: this.get('description'),
21
- MusicUrl: this.get('url'),
22
- HQMusicUrl: this.get('hq_url'),
23
21
  }
24
22
  };
25
- let thumbMediaId = this.get('thumb_media_id');
26
- if (thumbMediaId) {
27
- music['Music']['ThumbMediaId'] = thumbMediaId;
28
- }
29
- return music;
23
+ return video;
30
24
  }
31
25
  }
32
26
  exports.Video = Video;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import crypto from 'crypto';
3
4
  export default class RSA {
4
5
  protected publicKey: crypto.KeyObject;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-easywechat",
3
- "version": "2.13.1",
3
+ "version": "2.13.3",
4
4
  "description": "EasyWechat SDK for Node.js (NOT OFFICIAL)",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -20,18 +20,18 @@
20
20
  "author": "Hpyer",
21
21
  "license": "MIT",
22
22
  "devDependencies": {
23
- "@types/node": "^17.0.23",
24
- "mocha": "^9.2.2",
25
- "package-release": "^1.0.3",
23
+ "@types/node": "^17.0.45",
24
+ "package-release": "^1.0.4",
26
25
  "sinon": "^12.0.1",
27
- "typescript": "^4.6.3"
26
+ "typescript": "^4.9.5"
28
27
  },
29
28
  "dependencies": {
30
- "axios": "^1.6.1",
31
- "form-data": "^4.0.0",
32
- "node-socialite": "^1.4.1",
33
- "qs": "^6.11.2",
29
+ "axios": "^1.11.0",
30
+ "form-data": "^4.0.4",
31
+ "node-socialite": "^1.4.3",
32
+ "qs": "^6.14.0",
34
33
  "raw-body": "^2.5.2",
35
34
  "xml2js": "^0.6.2"
36
- }
35
+ },
36
+ "packageManager": "pnpm@10.12.4+sha512.5ea8b0deed94ed68691c9bad4c955492705c5eeb8a87ef86bc62c74a26b037b08ff9570f108b2e4dbd1dd1a9186fea925e527f141c648e85af45631074680184"
37
37
  }
@@ -1,21 +0,0 @@
1
- # 3.x 所有提交自动构建并测试
2
-
3
- name: Build 3.x
4
-
5
- on:
6
- push:
7
- branches:
8
- - '3.x'
9
-
10
- jobs:
11
- build:
12
- runs-on: ubuntu-latest
13
- steps:
14
- - uses: actions/checkout@v3
15
- - uses: actions/setup-node@v3
16
- with:
17
- node-version: 16
18
- - run: npm install
19
- - run: npm run build
20
- - run: npm test
21
-
@@ -1,24 +0,0 @@
1
- # 构建、测试并发布3.x分支
2
-
3
- name: Publish 3.x to npm
4
-
5
- on:
6
- push:
7
- tags:
8
- - v3.*
9
-
10
- jobs:
11
- publish-npm:
12
- runs-on: ubuntu-latest
13
- steps:
14
- - uses: actions/checkout@v3
15
- - uses: actions/setup-node@v3
16
- with:
17
- node-version: 16
18
- registry-url: https://registry.npmjs.org/
19
- - run: npm install
20
- - run: npm run build
21
- - run: npm test
22
- - run: npm publish --tag latest
23
- env:
24
- NODE_AUTH_TOKEN: ${{secrets.npm_token}}