@logzio-node-toolbox/consul
Advanced tools
Comparing version 0.0.24 to 0.0.25
@@ -17,2 +17,6 @@ /* eslint-disable no-unused-vars */ | ||
export interface KeyValueOptions extends ConsulInstance.Kv.SetOptions { | ||
value: any; | ||
} | ||
export interface ValidateOptions { | ||
@@ -71,3 +75,3 @@ fail?: boolean; | ||
public get(key?: string): AnyObject; | ||
public set(options: ConsulInstance.Kv.SetOptions): void; | ||
public set(options: KeyValueOptions): void; | ||
public setString(options: KeyValueOptions): void; | ||
@@ -74,0 +78,0 @@ public keys(key?: string): AnyObject; |
@@ -124,5 +124,6 @@ import retry from 'async-retry'; | ||
key, | ||
value | ||
value, | ||
...options | ||
}) { | ||
return this.consulInstance.kv.set(this.buildKey(key), value); | ||
return this.consulInstance.kv.set(this.buildKey(key), value, options); | ||
} | ||
@@ -136,3 +137,4 @@ | ||
key, | ||
value | ||
value, | ||
...options | ||
}) { | ||
@@ -142,3 +144,3 @@ const configValues = await this.get(key); | ||
const newValues = deepMerge(currentValues, value); | ||
await this.set(key, newValues); | ||
await this.set(key, newValues, options); | ||
return newValues; | ||
@@ -145,0 +147,0 @@ } |
{ | ||
"name": "@logzio-node-toolbox/consul", | ||
"version": "0.0.24", | ||
"version": "0.0.25", | ||
"description": "Consul easy use for json configs and service discovery", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.cjs", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
80038
2175