towns-bot 0.0.347 → 0.0.348
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/dist/index.js +8 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1298,23 +1298,19 @@ function isTestEnv() {
|
|
|
1298
1298
|
}
|
|
1299
1299
|
|
|
1300
1300
|
// ../dlog/dist/envUtils.js
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1301
|
+
function safeEnv(keys, opts) {
|
|
1302
|
+
for (const keyRef of keys) {
|
|
1303
|
+
const key = opts?.keyPrefix ? `${opts.keyPrefix}${keyRef}` : keyRef;
|
|
1304
|
+
if (opts?.env) {
|
|
1305
|
+
if (opts.env[key]) {
|
|
1306
|
+
return opts.env[key];
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1304
1309
|
if (typeof process === "object" && "env" in process) {
|
|
1305
1310
|
if (process.env[key]) {
|
|
1306
1311
|
return process.env[key];
|
|
1307
1312
|
}
|
|
1308
1313
|
}
|
|
1309
|
-
if (typeof import_meta === "object" && "env" in import_meta) {
|
|
1310
|
-
if (import_meta.env[key]) {
|
|
1311
|
-
return import_meta.env[key];
|
|
1312
|
-
}
|
|
1313
|
-
const viteKey = `VITE_${key}`;
|
|
1314
|
-
if (import_meta.env[viteKey]) {
|
|
1315
|
-
return import_meta.env[viteKey];
|
|
1316
|
-
}
|
|
1317
|
-
}
|
|
1318
1314
|
}
|
|
1319
1315
|
return void 0;
|
|
1320
1316
|
}
|