From fc2be33e32cd858cfaaa2e0faf386f507b8c4857 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 2 Aug 2021 15:20:00 +0200 Subject: deployment helpers --- packages/taler-util/src/talerconfig.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'packages/taler-util/src') diff --git a/packages/taler-util/src/talerconfig.ts b/packages/taler-util/src/talerconfig.ts index a40d6a126..624d4ff3d 100644 --- a/packages/taler-util/src/talerconfig.ts +++ b/packages/taler-util/src/talerconfig.ts @@ -98,37 +98,37 @@ export class ConfigValue { constructor( private sectionName: string, private optionName: string, - private val: string | undefined, + public value: string | undefined, private converter: (x: string) => T, ) {} required(): T { - if (!this.val) { + if (!this.value) { throw new ConfigError( `required option [${this.sectionName}]/${this.optionName} not found`, ); } - return this.converter(this.val); + return this.converter(this.value); } orUndefined(): T | undefined { - if (this.val !== undefined) { - return this.converter(this.val); + if (this.value !== undefined) { + return this.converter(this.value); } else { return undefined; } } orDefault(v: T): T | undefined { - if (this.val !== undefined) { - return this.converter(this.val); + if (this.value !== undefined) { + return this.converter(this.value); } else { return v; } } isDefined(): boolean { - return this.val !== undefined; + return this.value !== undefined; } } @@ -303,7 +303,7 @@ export class Configuration { private nestLevel = 0; - loadFromFilename(filename: string, opts: LoadOptions = {}): void { + private loadFromFilename(filename: string, opts: LoadOptions = {}): void { filename = expandPath(filename); const checkCycle = () => { @@ -339,7 +339,7 @@ export class Configuration { } } - loadGlob(parentFilename: string, fileglob: string): void { + private loadGlob(parentFilename: string, fileglob: string): void { const resolvedParent = nodejs_fs().realpathSync(parentFilename); const parentDir = nodejs_path().dirname(resolvedParent); -- cgit v1.2.3