Skip to content

Commit

Permalink
fix: ark options by module on use
Browse files Browse the repository at this point in the history
  • Loading branch information
ChoGathK committed Oct 12, 2022
1 parent ecfe12f commit 64d7976
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
8 changes: 4 additions & 4 deletions README.MD
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Vodyani ark

🛸 Vodyani ark 是一个完备的配置管理解决方案
🛸 ark(方舟)是一个功能完备的配置管理解决方案

通过在项目中引入 ark,开发者可以轻易的管理本地的配置数据,并且根据配置的变化,动态地根据配置重建本地客户端(如 MySQL/Redis 等)🤩

此外,ark 还提供了远程配置中心的数据同步和数据订阅功能 🎉
- ark 提供了灵活的配置加载方式,不仅默认提供 json/yaml 两种类型的本地配置文件加载器,而且支持注册远程配置中心(如 apolloConfig)
- ark 提供了功能强大的动态数据源功能,支持各类客户端通过实现适配器的方式来进行接入,并可以实时(秒级)根据配置的更新进行重新部署
- ark 适配所有的 nest.js 项目

[![Npm](https://img.shields.io/npm/v/@vodyani/ark/latest.svg)](https://www.npmjs.com/package/@vodyani/ark)
[![Npm](https://img.shields.io/npm/v/@vodyani/ark/beta.svg)](https://www.npmjs.com/package/@vodyani/ark)
Expand Down
2 changes: 0 additions & 2 deletions src/common/interface/options.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { ModuleMetadata } from '@nestjs/common';
import { IConfigClient, IConfigLoader } from '@vodyani/core';

export interface ConfigClientOptions {
Expand All @@ -15,6 +14,5 @@ export interface ConfigHandlerOptions<T = any> {
}

export interface ArkOptions<T = any> extends ConfigHandlerOptions<T> {
imports?: ModuleMetadata['imports'];
global?: boolean;
}
3 changes: 1 addition & 2 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class ArkModule {
const manager = new ArkManager().create(options);

const providers: any[] = [ConfigProvider, manager];
const { enableDynamicDataSource, global, imports } = options;
const { enableDynamicDataSource, global } = options;

if (enableDynamicDataSource) {
providers.push(AsyncDynamicDataSourceProvider);
Expand All @@ -21,7 +21,6 @@ export class ArkModule {
}

return {
imports,
providers,
module: ArkModule,
exports: providers,
Expand Down
3 changes: 0 additions & 3 deletions src/provider/dynamic-data-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,6 @@ export class DynamicDataSourceConfigObserver<T = any> implements IConfigObserver
private circularContrast() {
this.keys.forEach((key) => {
const value = this.config.get(key);

console.log(value);

this.contrast(key, value);
});
}
Expand Down

0 comments on commit 64d7976

Please sign in to comment.