We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 723d69c commit 295b1eaCopy full SHA for 295b1ea
src/config_types.ts
@@ -1,5 +1,6 @@
1
import * as fs from 'fs';
2
import * as _ from 'underscore';
3
+import {URL} from 'url';
4
5
export enum ActionOnInvalid {
6
THROW = 'throw',
@@ -27,7 +28,10 @@ export interface Cluster {
27
28
export function newClusters(a: any, opts?: Partial<ConfigOptions>): Cluster[] {
29
const options = Object.assign(defaultNewConfigOptions(), opts || {});
30
- return _.compact(_.map(a, clusterIterator(options.onInvalidEntry)));
31
+ return _.compact(_.map(a, clusterIterator(options.onInvalidEntry))).map((cluster) => ({
32
+ ...cluster,
33
+ server: new URL(cluster.server).origin,
34
+ }));
35
}
36
37
export function exportCluster(cluster: Cluster): any {
0 commit comments