(plugin: any, configScope: string, dynamic = true)
| 105 | } |
| 106 | |
| 107 | async resolveConfig(plugin: any, configScope: string, dynamic = true) { |
| 108 | const schema = plugin['Config'] || plugin['schema']; |
| 109 | if (!schema) return Object.freeze({}); |
| 110 | const schemaRequest = this.buildSchema(schema, configScope); |
| 111 | await this.ctx.setting._tryMigrateConfig(schemaRequest); |
| 112 | const res = this.ctx.setting.requestConfig(schemaRequest, dynamic); |
| 113 | return configScope ? res[configScope] : res; |
| 114 | } |
| 115 | |
| 116 | async reloadPlugin(key: string, configScope: string) { |
| 117 | const plugin = this.resolvePlugin(key); |
no test coverage detected