@blaxel/core 0.2.16-dev.104 → 0.2.16-dev.105
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/common/internal.js +5 -5
- package/package.json +1 -1
package/dist/common/internal.js
CHANGED
|
@@ -5,7 +5,7 @@ exports.getAlphanumericLimitedHash = getAlphanumericLimitedHash;
|
|
|
5
5
|
exports.getGlobalUniqueHash = getGlobalUniqueHash;
|
|
6
6
|
exports.pluralize = pluralize;
|
|
7
7
|
exports.getForcedUrl = getForcedUrl;
|
|
8
|
-
const
|
|
8
|
+
const core_1 = require("@blaxel/core");
|
|
9
9
|
// Pure JS MD5 implementation that matches standard crypto MD5
|
|
10
10
|
function md5(input) {
|
|
11
11
|
function cmn(q, a, b, x, s, t) {
|
|
@@ -177,12 +177,12 @@ function getForcedUrl(type, name) {
|
|
|
177
177
|
const pluralType = pluralize(type);
|
|
178
178
|
const envVar = name.replace(/-/g, "_").toUpperCase();
|
|
179
179
|
// BL_FUNCTIONS_NAME_URL
|
|
180
|
-
if (
|
|
181
|
-
return new URL(
|
|
180
|
+
if (core_1.env[`BL_${pluralType.toUpperCase()}_${envVar}_URL`]) {
|
|
181
|
+
return new URL(core_1.env[`BL_${pluralType.toUpperCase()}_${envVar}_URL`]);
|
|
182
182
|
}
|
|
183
183
|
// BL_FUNCTION_NAME_URL
|
|
184
|
-
if (
|
|
185
|
-
return new URL(
|
|
184
|
+
if (core_1.env[`BL_${type.toUpperCase()}_${envVar}_URL`]) {
|
|
185
|
+
return new URL(core_1.env[`BL_${type.toUpperCase()}_${envVar}_URL`]);
|
|
186
186
|
}
|
|
187
187
|
return null;
|
|
188
188
|
}
|