@drumee/setup-infra 1.0.10 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +5 -5
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -223,17 +223,17 @@ function makeData(opt) {
223
223
  }
224
224
  for (let row of opt) {
225
225
  let [key, value, fallback] = row;
226
+ if (!value) value = fallback;
227
+ if (!value) continue;
226
228
  if (!data[key]) {
227
229
  if (/.+\+$/.test(value)) {
228
230
  value = value.replace(/\+$/, data[key]);
229
231
  }
230
- if(value){
231
- data[key] = value.trim() || fallback;
232
- }
232
+ data[key] = value.trim() || fallback;
233
233
  }
234
234
  }
235
235
 
236
- if(data.public_ip4){
236
+ if (data.public_ip4) {
237
237
  data.reverse_ip4 = data.public_ip4.split('.').reverse().join('.');
238
238
  }
239
239
 
@@ -408,7 +408,7 @@ function writeInfraConf(data) {
408
408
  `${mariadb}/50-server.cnf`,
409
409
  ];
410
410
 
411
- if(data.reverse_ip4){
411
+ if (data.reverse_ip4) {
412
412
  targets.push({
413
413
  tpl: `var/lib/bind/reverse.tpl`,
414
414
  out: `var/lib/bind/${data.public_ip4}`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drumee/setup-infra",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "description": "Drumee Infrastructure Setup Utilities",
5
5
  "main": "index.js",
6
6
  "scripts": {