@hatchet-dev/typescript-sdk 0.10.0 → 0.10.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.
package/package.json
CHANGED
|
@@ -34,7 +34,7 @@ const token_1 = require("./token");
|
|
|
34
34
|
const DEFAULT_CONFIG_FILE = '.hatchet.yaml';
|
|
35
35
|
class ConfigLoader {
|
|
36
36
|
static loadClientConfig(override, config) {
|
|
37
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4;
|
|
37
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6;
|
|
38
38
|
const yaml = this.loadYamlConfig(config === null || config === void 0 ? void 0 : config.path);
|
|
39
39
|
const tlsConfig = (_a = override === null || override === void 0 ? void 0 : override.tls_config) !== null && _a !== void 0 ? _a : {
|
|
40
40
|
tls_strategy: (_d = (_c = (_b = yaml === null || yaml === void 0 ? void 0 : yaml.tls_config) === null || _b === void 0 ? void 0 : _b.tls_strategy) !== null && _c !== void 0 ? _c : this.env('HATCHET_CLIENT_TLS_STRATEGY')) !== null && _d !== void 0 ? _d : 'tls',
|
|
@@ -56,21 +56,22 @@ class ConfigLoader {
|
|
|
56
56
|
try {
|
|
57
57
|
const addresses = (0, token_1.getAddressesFromJWT)(token);
|
|
58
58
|
grpcBroadcastAddress =
|
|
59
|
-
(_r = (_q = yaml === null || yaml === void 0 ? void 0 : yaml.host_port) !== null &&
|
|
59
|
+
(_s = (_r = (_q = override === null || override === void 0 ? void 0 : override.host_port) !== null && _q !== void 0 ? _q : yaml === null || yaml === void 0 ? void 0 : yaml.host_port) !== null && _r !== void 0 ? _r : this.env('HATCHET_CLIENT_HOST_PORT')) !== null && _s !== void 0 ? _s : addresses.grpcBroadcastAddress;
|
|
60
60
|
apiUrl =
|
|
61
|
-
(
|
|
61
|
+
(_v = (_u = (_t = override === null || override === void 0 ? void 0 : override.api_url) !== null && _t !== void 0 ? _t : yaml === null || yaml === void 0 ? void 0 : yaml.api_url) !== null && _u !== void 0 ? _u : this.env('HATCHET_CLIENT_API_URL')) !== null && _v !== void 0 ? _v : addresses.serverUrl;
|
|
62
62
|
}
|
|
63
63
|
catch (e) {
|
|
64
|
-
grpcBroadcastAddress =
|
|
65
|
-
|
|
64
|
+
grpcBroadcastAddress =
|
|
65
|
+
(_x = (_w = override === null || override === void 0 ? void 0 : override.host_port) !== null && _w !== void 0 ? _w : yaml === null || yaml === void 0 ? void 0 : yaml.host_port) !== null && _x !== void 0 ? _x : this.env('HATCHET_CLIENT_HOST_PORT');
|
|
66
|
+
apiUrl = (_z = (_y = override === null || override === void 0 ? void 0 : override.api_url) !== null && _y !== void 0 ? _y : yaml === null || yaml === void 0 ? void 0 : yaml.api_url) !== null && _z !== void 0 ? _z : this.env('HATCHET_CLIENT_API_URL');
|
|
66
67
|
}
|
|
67
|
-
const namespace = (
|
|
68
|
+
const namespace = (_1 = (_0 = override === null || override === void 0 ? void 0 : override.namespace) !== null && _0 !== void 0 ? _0 : yaml === null || yaml === void 0 ? void 0 : yaml.namespace) !== null && _1 !== void 0 ? _1 : this.env('HATCHET_CLIENT_NAMESPACE');
|
|
68
69
|
return {
|
|
69
|
-
token: (
|
|
70
|
+
token: (_3 = (_2 = override === null || override === void 0 ? void 0 : override.token) !== null && _2 !== void 0 ? _2 : yaml === null || yaml === void 0 ? void 0 : yaml.token) !== null && _3 !== void 0 ? _3 : this.env('HATCHET_CLIENT_TOKEN'),
|
|
70
71
|
host_port: grpcBroadcastAddress,
|
|
71
72
|
api_url: apiUrl,
|
|
72
73
|
tls_config: tlsConfig,
|
|
73
|
-
log_level: (
|
|
74
|
+
log_level: (_6 = (_5 = (_4 = override === null || override === void 0 ? void 0 : override.log_level) !== null && _4 !== void 0 ? _4 : yaml === null || yaml === void 0 ? void 0 : yaml.log_level) !== null && _5 !== void 0 ? _5 : this.env('HATCHET_CLIENT_LOG_LEVEL')) !== null && _6 !== void 0 ? _6 : 'INFO',
|
|
74
75
|
tenant_id: tenantId,
|
|
75
76
|
namespace: namespace ? `${namespace}_`.toLowerCase() : '',
|
|
76
77
|
};
|