clean up
This commit is contained in:
@@ -1,78 +1,77 @@
|
||||
import CommandLine, { CommandLineOptions } from './CommandLine';
|
||||
|
||||
import type {CommandLineOptions} from './CommandLine';
|
||||
|
||||
type ApplicationCredentials = {
|
||||
applicationId: string;
|
||||
secret: string;
|
||||
}
|
||||
applicationId: string;
|
||||
secret: string;
|
||||
};
|
||||
|
||||
type Uri = {
|
||||
pcast: string;
|
||||
ingest: string | undefined;
|
||||
channel: string | undefined;
|
||||
publisher: string | undefined;
|
||||
}
|
||||
pcast: string;
|
||||
ingest: string | undefined;
|
||||
channel: string | undefined;
|
||||
publisher: string | undefined;
|
||||
};
|
||||
|
||||
type BrowserstackConfiguration = {
|
||||
enabled: boolean;
|
||||
local: boolean;
|
||||
user: string;
|
||||
key: string;
|
||||
}
|
||||
enabled: boolean;
|
||||
local: boolean;
|
||||
user: string;
|
||||
key: string;
|
||||
};
|
||||
|
||||
export default class TestConfiguration {
|
||||
private readonly _applicationCredentials: ApplicationCredentials;
|
||||
private readonly _uri: Uri;
|
||||
private readonly _viewers: string[];
|
||||
private readonly _publishers: string[];
|
||||
private readonly _tests: string[];
|
||||
private readonly _browserstack: BrowserstackConfiguration;
|
||||
private readonly _applicationCredentials: ApplicationCredentials;
|
||||
private readonly _uri: Uri;
|
||||
private readonly _viewers: string[];
|
||||
private readonly _publishers: string[];
|
||||
private readonly _tests: string[];
|
||||
private readonly _browserstack: BrowserstackConfiguration;
|
||||
|
||||
constructor(commandLineOptions: CommandLineOptions) {
|
||||
this._applicationCredentials = {
|
||||
applicationId: commandLineOptions.applicationId,
|
||||
secret: commandLineOptions.secret,
|
||||
};
|
||||
constructor(commandLineOptions: CommandLineOptions) {
|
||||
this._applicationCredentials = {
|
||||
applicationId: commandLineOptions.applicationId,
|
||||
secret: commandLineOptions.secret
|
||||
};
|
||||
|
||||
this._uri = {
|
||||
pcast: commandLineOptions.pcastUri,
|
||||
ingest: commandLineOptions.ingestUri,
|
||||
channel: commandLineOptions.channelUri,
|
||||
publisher: commandLineOptions.publisherUri,
|
||||
};
|
||||
this._uri = {
|
||||
pcast: commandLineOptions.pcastUri,
|
||||
ingest: commandLineOptions.ingestUri,
|
||||
channel: commandLineOptions.channelUri,
|
||||
publisher: commandLineOptions.publisherUri
|
||||
};
|
||||
|
||||
this._viewers = commandLineOptions.viewers;
|
||||
this._publishers = commandLineOptions.publishers;
|
||||
this._tests = commandLineOptions.tests;
|
||||
this._browserstack = {
|
||||
enabled: commandLineOptions.useBrowserstack,
|
||||
local: commandLineOptions.useBrowserstackLocal,
|
||||
user: commandLineOptions.browserstackUser,
|
||||
key: commandLineOptions.browserstackKey,
|
||||
};
|
||||
}
|
||||
this._viewers = commandLineOptions.viewers;
|
||||
this._publishers = commandLineOptions.publishers;
|
||||
this._tests = commandLineOptions.tests;
|
||||
this._browserstack = {
|
||||
enabled: commandLineOptions.useBrowserstack,
|
||||
local: commandLineOptions.useBrowserstackLocal,
|
||||
user: commandLineOptions.browserstackUser,
|
||||
key: commandLineOptions.browserstackKey
|
||||
};
|
||||
}
|
||||
|
||||
get applicationCredentials(): ApplicationCredentials {
|
||||
return this._applicationCredentials;
|
||||
}
|
||||
get applicationCredentials(): ApplicationCredentials {
|
||||
return this._applicationCredentials;
|
||||
}
|
||||
|
||||
get uri(): Uri {
|
||||
return this._uri;
|
||||
}
|
||||
get uri(): Uri {
|
||||
return this._uri;
|
||||
}
|
||||
|
||||
get viewers(): string[] {
|
||||
return this._viewers;
|
||||
}
|
||||
get viewers(): string[] {
|
||||
return this._viewers;
|
||||
}
|
||||
|
||||
get publishers(): string[] {
|
||||
return this._publishers;
|
||||
}
|
||||
get publishers(): string[] {
|
||||
return this._publishers;
|
||||
}
|
||||
|
||||
get tests(): string[] {
|
||||
return this._tests;
|
||||
}
|
||||
get tests(): string[] {
|
||||
return this._tests;
|
||||
}
|
||||
|
||||
get browserstack(): BrowserstackConfiguration {
|
||||
return this._browserstack;
|
||||
}
|
||||
}
|
||||
get browserstack(): BrowserstackConfiguration {
|
||||
return this._browserstack;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user