Updates
This commit is contained in:
@@ -11,6 +11,9 @@ type Param = {
|
||||
env?: {
|
||||
[k: string]: string;
|
||||
};
|
||||
remoteHost?: string;
|
||||
remoteHostPort?: string;
|
||||
useDefault?: boolean;
|
||||
};
|
||||
/**
|
||||
* # Grab Names For Query
|
||||
|
||||
+10
-6
@@ -17,12 +17,16 @@ function grabHostNames(param) {
|
||||
const scheme = finalEnv["DSQL_HTTP_SCHEME"];
|
||||
const localHost = finalEnv["DSQL_LOCAL_HOST"];
|
||||
const localHostPort = finalEnv["DSQL_LOCAL_HOST_PORT"];
|
||||
const remoteHost = ((_a = finalEnv["DSQL_API_REMOTE_HOST"]) === null || _a === void 0 ? void 0 : _a.match(/.*\..*/))
|
||||
? finalEnv["DSQL_API_REMOTE_HOST"]
|
||||
: undefined;
|
||||
const remoteHostPort = ((_b = finalEnv["DSQL_API_REMOTE_HOST_PORT"]) === null || _b === void 0 ? void 0 : _b.match(/./))
|
||||
? finalEnv["DSQL_API_REMOTE_HOST_PORT"]
|
||||
: undefined;
|
||||
const remoteHost = (param === null || param === void 0 ? void 0 : param.useDefault)
|
||||
? undefined
|
||||
: ((_a = finalEnv["DSQL_API_REMOTE_HOST"]) === null || _a === void 0 ? void 0 : _a.match(/.*\..*/))
|
||||
? finalEnv["DSQL_API_REMOTE_HOST"]
|
||||
: undefined;
|
||||
const remoteHostPort = (param === null || param === void 0 ? void 0 : param.useDefault)
|
||||
? undefined
|
||||
: ((_b = finalEnv["DSQL_API_REMOTE_HOST_PORT"]) === null || _b === void 0 ? void 0 : _b.match(/./))
|
||||
? finalEnv["DSQL_API_REMOTE_HOST_PORT"]
|
||||
: undefined;
|
||||
return {
|
||||
host: remoteHost || localHost || "datasquirel.com",
|
||||
port: remoteHostPort || localHostPort || 443,
|
||||
|
||||
Reference in New Issue
Block a user