Skip to content

Commit

Permalink
release v1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
saqqdy committed Jun 29, 2023
1 parent 73311e4 commit 818931d
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 24 deletions.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,10 @@ updates:
directory: / # Location of package manifests
schedule:
interval: weekly
open-pull-requests-limit: 5
ignore:
- dependency-name: 'aws*'
- dependency-name: typescript
versions: [4.x]
- dependency-name: '*'
update-types: ['version-update:semver-patch']
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change logs

## 2023.06.29 v1.1.0

1. Extended `buildXML` & `parseXML` in helper context
2. use `node-wxcrypto` v3.0.0 [node-wxcrypto](https://github.com/saqqdy/node-wxcrypto)

## 2023.06.26 v1.0.1

1. api docs work
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,16 @@ class HomeService extends Service {
module.exports = HomeService
```

### Extended Context Methods

```js
// {app_root}/app/service/home.js
const { ctx } = this

ctx.buildXML(data, options) // data => xmlString
ctx.parseXML(xmlString, options) // xmlString => data
```

## Change logs

[Change logs](./CHANGELOG.md)
Expand Down
7 changes: 6 additions & 1 deletion app/extend/context.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const { buildXMLSync, parseXMLSync } = require('node-wxcrypto')

module.exports = {
/**
* decryptWxMsg
Expand All @@ -24,5 +26,8 @@ module.exports = {
data = data || this.request.body

return await this.app.wxcrypto.encrypt(data, options)
}
},

buildXML: buildXMLSync,
parseXML: parseXMLSync
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "egg-wxcrypto",
"description": "扩展支持微信消息加解密nodejs版本的egg插件",
"version": "1.0.1",
"version": "1.1.0",
"packageManager": "pnpm@8.6.3",
"eggPlugin": {
"name": "wxcrypto"
Expand Down Expand Up @@ -29,7 +29,7 @@
},
"dependencies": {
"js-cool": "^4.7.0",
"node-wxcrypto": "^2.0.1"
"node-wxcrypto": "^3.0.0"
},
"devDependencies": {
"@eslint-sets/eslint-config-basic": "^5.5.0",
Expand All @@ -44,7 +44,7 @@
"npm-run-all": "^4.1.5",
"prettier": "^2.8.8",
"prettier-config-common": "^1.4.0",
"reinstaller": "^3.0.0",
"reinstaller": "^3.0.2",
"tsnd": "^1.1.0",
"webstorm-disable-index": "^1.2.0",
"zx": "^7.2.2"
Expand Down
Loading

0 comments on commit 818931d

Please sign in to comment.