lobstakit-cloud 1.0.5 → 1.0.6
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.
- package/lib/config.js +2 -2
- package/package.json +1 -1
package/lib/config.js
CHANGED
|
@@ -114,7 +114,7 @@ function writeConfig({ apiKey, model, channel, telegramBotToken, telegramUserId,
|
|
|
114
114
|
}
|
|
115
115
|
};
|
|
116
116
|
|
|
117
|
-
fs.writeFileSync(CONFIG_PATH, JSON.stringify(config, null, 2), 'utf8');
|
|
117
|
+
fs.writeFileSync(CONFIG_PATH, JSON.stringify(config, null, 2), { encoding: 'utf8', mode: 0o600 });
|
|
118
118
|
console.log('[config] Config written to', CONFIG_PATH);
|
|
119
119
|
return config;
|
|
120
120
|
}
|
|
@@ -126,7 +126,7 @@ function writeRawConfig(configObj) {
|
|
|
126
126
|
if (!fs.existsSync(CONFIG_DIR)) {
|
|
127
127
|
fs.mkdirSync(CONFIG_DIR, { recursive: true });
|
|
128
128
|
}
|
|
129
|
-
fs.writeFileSync(CONFIG_PATH, JSON.stringify(configObj, null, 2), 'utf8');
|
|
129
|
+
fs.writeFileSync(CONFIG_PATH, JSON.stringify(configObj, null, 2), { encoding: 'utf8', mode: 0o600 });
|
|
130
130
|
console.log('[config] Raw config written to', CONFIG_PATH);
|
|
131
131
|
}
|
|
132
132
|
|