@karmaniverous/get-dotenv 2.1.0 → 2.1.1
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.
|
@@ -108,7 +108,9 @@ const getDotenv = async function () {
|
|
|
108
108
|
if (outputPath) await _fsExtra.default.writeFile(outputPath, Object.keys(dotenv).reduce((contents, key) => {
|
|
109
109
|
const value = dotenv[key] ?? '';
|
|
110
110
|
return `${contents}${key}=${value.includes('\n') ? `"${value}"` : value}\n`;
|
|
111
|
-
}, '')
|
|
111
|
+
}, ''), {
|
|
112
|
+
encoding: 'utf-8'
|
|
113
|
+
});
|
|
112
114
|
return dotenv;
|
|
113
115
|
};
|
|
114
116
|
|
|
@@ -179,7 +181,9 @@ const getDotenvSync = function () {
|
|
|
179
181
|
if (outputPath) _fsExtra.default.writeFileSync(outputPath, Object.keys(dotenv).reduce((contents, key) => {
|
|
180
182
|
const value = dotenv[key] ?? '';
|
|
181
183
|
return `${contents}${key}=${value.includes('\n') ? `"${value}"` : value}\n`;
|
|
182
|
-
}, '')
|
|
184
|
+
}, ''), {
|
|
185
|
+
encoding: 'utf-8'
|
|
186
|
+
});
|
|
183
187
|
return dotenv;
|
|
184
188
|
};
|
|
185
189
|
exports.getDotenvSync = getDotenvSync;
|
|
@@ -119,7 +119,8 @@ export const getDotenv = async ({
|
|
|
119
119
|
return `${contents}${key}=${
|
|
120
120
|
value.includes('\n') ? `"${value}"` : value
|
|
121
121
|
}\n`;
|
|
122
|
-
}, '')
|
|
122
|
+
}, ''),
|
|
123
|
+
{ encoding: 'utf-8' }
|
|
123
124
|
);
|
|
124
125
|
|
|
125
126
|
return dotenv;
|
|
@@ -218,7 +219,8 @@ export const getDotenvSync = ({
|
|
|
218
219
|
return `${contents}${key}=${
|
|
219
220
|
value.includes('\n') ? `"${value}"` : value
|
|
220
221
|
}\n`;
|
|
221
|
-
}, '')
|
|
222
|
+
}, ''),
|
|
223
|
+
{ encoding: 'utf-8' }
|
|
222
224
|
);
|
|
223
225
|
|
|
224
226
|
return dotenv;
|