mirror of
https://github.com/certd/certd.git
synced 2026-07-15 02:07:38 +08:00
refactor(certd-server): 移除非运行时依赖到动态导入
将alipay-sdk、openid-client、otplib、wechatpay-node-v3改为动态导入,从dependencies移到devDependencies?不,是改为通过importRuntime动态加载,移除顶层静态引入,优化启动时依赖加载,减少初始包体积和启动耗时
This commit is contained in:
@@ -49,7 +49,7 @@ export class OidcOauthProvider extends BaseAddon implements IOauthProvider {
|
||||
issuerUrl = "";
|
||||
|
||||
async getClient() {
|
||||
const client = await import("openid-client");
|
||||
const client = await this.importRuntime("openid-client");
|
||||
const server = new URL(this.issuerUrl); // Authorization Server's Issuer Identifier
|
||||
|
||||
const config = await client.discovery(server, this.clientId, this.clientSecretKey);
|
||||
|
||||
Reference in New Issue
Block a user