Compare commits

...

2 Commits

Author SHA1 Message Date
6253098bfb chore(release): publish
- @egg/net-tool@1.14.2
2024-11-25 10:47:05 +00:00
b141a4c50e chore(net-tool): 修改鉴权函数调用方式
All checks were successful
/ release (push) Successful in 1m2s
2024-11-25 10:46:04 +00:00
5 changed files with 24 additions and 10 deletions

2
package-lock.json generated
View File

@ -12394,7 +12394,7 @@
},
"packages/net-tool": {
"name": "@egg/net-tool",
"version": "1.14.1",
"version": "1.14.2",
"license": "ISC",
"dependencies": {
"@egg/logger": "^1.4.4",

View File

@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.14.2](http://yingbo.im:3000/zhaoyingbo/egg_tools/compare/@egg/net-tool@1.14.1...@egg/net-tool@1.14.2) (2024-11-25)
**Note:** Version bump only for package @egg/net-tool
## [1.14.1](http://yingbo.im:3000/zhaoyingbo/egg_tools/compare/@egg/net-tool@1.14.0...@egg/net-tool@1.14.1) (2024-11-25)
### Bug Fixes

View File

@ -1,6 +1,6 @@
{
"name": "@egg/net-tool",
"version": "1.14.1",
"version": "1.14.2",
"description": "Net Tools for Egg projects",
"type": "module",
"main": "src/index.ts",

View File

@ -28,14 +28,12 @@ class LarkService {
appSecret,
requestId,
})
this.drive = new LarkDriveService(() => this.auth.getAppAuth(), requestId)
this.message = new LarkMessageService(
() => this.auth.getAppAuth(),
requestId
)
this.user = new LarkUserService(() => this.auth.getAppAuth(), requestId)
this.sheet = new LarkSheetService(() => this.auth.getAppAuth(), requestId)
this.chat = new LarkChatService(() => this.auth.getAppAuth(), requestId)
const getAppAuth = () => this.auth.getAppAuth()
this.drive = new LarkDriveService(getAppAuth, requestId)
this.message = new LarkMessageService(getAppAuth, requestId)
this.user = new LarkUserService(getAppAuth, requestId)
this.sheet = new LarkSheetService(getAppAuth, requestId)
this.chat = new LarkChatService(getAppAuth, requestId)
this.requestId = requestId
}
}

12
test/lark.ts Normal file
View File

@ -0,0 +1,12 @@
import { LarkService } from "../packages/net-tool/src/index"
const larkService = new LarkService({
appId: "appId",
appSecret: "appSecret",
requestId: "requestId",
})
larkService.user
.code2Login("")
.then((res) => console.log(res))
.catch((err) => console.error(err))