@ubleipzig/autoconfig
Advanced tools
Comparing version 2.3.2 to 2.3.3
@@ -33,3 +33,4 @@ /** | ||
nconf = require('nconf'), | ||
pwgen = require('password-generator'); | ||
pwgen = require('password-generator'), | ||
yaml = require('js-yaml'); | ||
@@ -363,6 +364,15 @@ var config_tpl = '' + | ||
console.log(`updating configuration ${filePath}`); | ||
ini.write(filePath, runtimeConfigs[file], { | ||
encoding: 'utf8', | ||
keep_quotes: true | ||
}); | ||
var ext = path.extname(file); | ||
if (ext === '.yml' || ext === '.yaml') { | ||
let yamlStr = yaml.safeDump(runtimeConfigs[file]); | ||
if(yamlStr) { | ||
fs.writeFileSync(filePath, yamlStr.toString(), 'utf8'); | ||
} | ||
} else { | ||
ini.write(filePath, runtimeConfigs[file], { | ||
encoding: 'utf8', | ||
keep_quotes: true | ||
}); | ||
} | ||
}); | ||
@@ -369,0 +379,0 @@ |
{ | ||
"name": "@ubleipzig/autoconfig", | ||
"version": "2.3.2", | ||
"version": "2.3.3", | ||
"description": "generates config for deployed instances", | ||
@@ -21,2 +21,3 @@ "scripts": { | ||
"commander": "^2.15.1", | ||
"js-yaml": "^3.14.0", | ||
"mkdirp": "0.5.1", | ||
@@ -23,0 +24,0 @@ "multi-ini": "^2.0.0", |
74346
1077
12
+ Addedjs-yaml@^3.14.0
+ Addedargparse@1.0.10(transitive)
+ Addedesprima@4.0.1(transitive)
+ Addedjs-yaml@3.14.1(transitive)
+ Addedsprintf-js@1.0.3(transitive)