@blaxel/core 0.2.1 → 0.2.2-dev.49
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.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function getAlphanumericLimitedHash(input: string, maxSize
|
|
1
|
+
export declare function getAlphanumericLimitedHash(input: string, maxSize?: number): string;
|
|
2
2
|
export declare function getGlobalUniqueHash(workspace: string, type: string, name: string): string;
|
package/dist/common/internal.js
CHANGED
|
@@ -6,12 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.getAlphanumericLimitedHash = getAlphanumericLimitedHash;
|
|
7
7
|
exports.getGlobalUniqueHash = getGlobalUniqueHash;
|
|
8
8
|
const crypto_1 = __importDefault(require("crypto"));
|
|
9
|
-
function getAlphanumericLimitedHash(input, maxSize) {
|
|
10
|
-
const hash = crypto_1.default.createHash(
|
|
11
|
-
|
|
12
|
-
return alphanumeric.length > maxSize
|
|
13
|
-
? alphanumeric.substring(0, maxSize)
|
|
14
|
-
: alphanumeric;
|
|
9
|
+
function getAlphanumericLimitedHash(input, maxSize = 48) {
|
|
10
|
+
const hash = crypto_1.default.createHash('md5').update(input).digest('hex');
|
|
11
|
+
return hash.length > maxSize ? hash.substring(0, maxSize) : hash;
|
|
15
12
|
}
|
|
16
13
|
function getGlobalUniqueHash(workspace, type, name) {
|
|
17
14
|
const globalUniqueName = `${workspace}-${type}-${name}`;
|
package/dist/common/settings.js
CHANGED
|
@@ -72,11 +72,17 @@ class Settings {
|
|
|
72
72
|
return env_js_1.env.BL_TYPE || "agents";
|
|
73
73
|
}
|
|
74
74
|
get runInternalHostname() {
|
|
75
|
+
if (!this.generation) {
|
|
76
|
+
return "";
|
|
77
|
+
}
|
|
75
78
|
return env_js_1.env.BL_RUN_INTERNAL_HOSTNAME || "";
|
|
76
79
|
}
|
|
77
80
|
get runInternalProtocol() {
|
|
78
81
|
return env_js_1.env.BL_RUN_INTERNAL_PROTOCOL || "https";
|
|
79
82
|
}
|
|
83
|
+
get generation() {
|
|
84
|
+
return env_js_1.env.BL_GENERATION || "";
|
|
85
|
+
}
|
|
80
86
|
get loggerType() {
|
|
81
87
|
return env_js_1.env.BL_LOGGER || "http";
|
|
82
88
|
}
|