node-easywechat 3.7.5 → 3.7.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/.github/workflows/build-3.yml +11 -3
- package/.github/workflows/publish-npm-2.yml +3 -1
- package/.github/workflows/publish-npm-3.yml +8 -4
- package/CHANGELOG.md +8 -0
- package/dist/Channel/Application.js +0 -5
- package/dist/Core/Support/AES.d.ts +1 -0
- package/dist/Core/Support/PrivateKey.d.ts +2 -2
- package/dist/Core/Support/PublicKey.d.ts +1 -1
- package/dist/MiniApp/Application.js +0 -5
- package/dist/OpenPlatform/Authorization.js +17 -7
- package/dist/OpenWork/Authorization.js +17 -7
- package/package.json +9 -8
|
@@ -10,11 +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: [16.x, 18.x, 20.x, 22.x, 24.x]
|
|
13
18
|
steps:
|
|
14
|
-
- uses: actions/checkout@
|
|
15
|
-
- uses: actions/setup-node@v3
|
|
19
|
+
- uses: actions/checkout@v4
|
|
16
20
|
with:
|
|
17
|
-
|
|
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
|
|
@@ -10,6 +10,8 @@ on:
|
|
|
10
10
|
jobs:
|
|
11
11
|
publish-npm:
|
|
12
12
|
runs-on: ubuntu-latest
|
|
13
|
+
permissions:
|
|
14
|
+
id-token: write
|
|
13
15
|
steps:
|
|
14
16
|
- uses: actions/checkout@v3
|
|
15
17
|
- uses: actions/setup-node@v3
|
|
@@ -19,6 +21,6 @@ jobs:
|
|
|
19
21
|
- run: npm install
|
|
20
22
|
- run: npm run build
|
|
21
23
|
- run: npm test
|
|
22
|
-
- run: npm publish --tag second
|
|
24
|
+
- run: npm publish --tag second --provenance --access public
|
|
23
25
|
env:
|
|
24
26
|
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
|
@@ -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@
|
|
15
|
-
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
with:
|
|
18
|
+
show-progress: false
|
|
19
|
+
- uses: actions/setup-node@v4
|
|
16
20
|
with:
|
|
17
21
|
node-version: 16
|
|
18
|
-
registry-url: https://registry.npmjs.org
|
|
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 latest
|
|
26
|
+
- run: npm publish --tag latest --provenance --access public
|
|
23
27
|
env:
|
|
24
28
|
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
package/CHANGELOG.md
CHANGED
|
@@ -69,11 +69,6 @@ class Application {
|
|
|
69
69
|
}
|
|
70
70
|
getServer() {
|
|
71
71
|
if (!this.server) {
|
|
72
|
-
let token = this.getAccount().getToken();
|
|
73
|
-
let aesKey = this.getAccount().getAesKey();
|
|
74
|
-
if (!token || !aesKey) {
|
|
75
|
-
throw new Error('token or aes_key cannot be empty.');
|
|
76
|
-
}
|
|
77
72
|
this.server = new Server_1.default(this.getRequest(), this.getAccount().getAesKey() ? this.getEncryptor() : null);
|
|
78
73
|
}
|
|
79
74
|
else {
|
|
@@ -6,7 +6,7 @@ export declare class PrivateKey {
|
|
|
6
6
|
* 获取私钥内容
|
|
7
7
|
* @returns
|
|
8
8
|
*/
|
|
9
|
-
getKey(): Buffer
|
|
9
|
+
getKey(): Buffer<ArrayBufferLike>;
|
|
10
10
|
/**
|
|
11
11
|
* 获取密码
|
|
12
12
|
* @returns
|
|
@@ -16,5 +16,5 @@ export declare class PrivateKey {
|
|
|
16
16
|
* 转为字符串
|
|
17
17
|
* @returns
|
|
18
18
|
*/
|
|
19
|
-
toString(): Buffer
|
|
19
|
+
toString(): Buffer<ArrayBufferLike>;
|
|
20
20
|
}
|
|
@@ -71,11 +71,6 @@ class Application {
|
|
|
71
71
|
}
|
|
72
72
|
getServer() {
|
|
73
73
|
if (!this.server) {
|
|
74
|
-
let token = this.getAccount().getToken();
|
|
75
|
-
let aesKey = this.getAccount().getAesKey();
|
|
76
|
-
if (!token || !aesKey) {
|
|
77
|
-
throw new Error('token or aes_key cannot be empty.');
|
|
78
|
-
}
|
|
79
74
|
this.server = new Server_1.default(this.getRequest(), this.getAccount().getAesKey() ? this.getEncryptor() : null);
|
|
80
75
|
}
|
|
81
76
|
else {
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-easywechat",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.7",
|
|
4
4
|
"description": "EasyWechat SDK for Node.js (NOT OFFICIAL)",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -22,20 +22,21 @@
|
|
|
22
22
|
"node": ">=15.6.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@types/node": "^20.
|
|
25
|
+
"@types/node": "^20.19.9",
|
|
26
26
|
"axios-mock-adapter": "^1.22.0",
|
|
27
|
-
"mocha": "^
|
|
27
|
+
"mocha": "^11.7.1",
|
|
28
28
|
"package-release": "^1.0.3",
|
|
29
|
-
"typescript": "^5.
|
|
29
|
+
"typescript": "^5.8.3"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"axios": "^1.
|
|
32
|
+
"axios": "^1.10.0",
|
|
33
33
|
"axios-retry": "^4.5.0",
|
|
34
|
-
"form-data": "^4.0.
|
|
34
|
+
"form-data": "^4.0.4",
|
|
35
35
|
"merge": "^2.1.1",
|
|
36
36
|
"node-socialite": "^1.4.1",
|
|
37
|
-
"qs": "^6.
|
|
37
|
+
"qs": "^6.14.0",
|
|
38
38
|
"raw-body": "^2.5.2",
|
|
39
39
|
"xml2js": "^0.6.2"
|
|
40
|
-
}
|
|
40
|
+
},
|
|
41
|
+
"packageManager": "pnpm@10.12.4+sha512.5ea8b0deed94ed68691c9bad4c955492705c5eeb8a87ef86bc62c74a26b037b08ff9570f108b2e4dbd1dd1a9186fea925e527f141c648e85af45631074680184"
|
|
41
42
|
}
|