Changed some declarations from foo.bar to fooBar

It helps with better target-specific options support
This commit is contained in:
Kir_Antipov 2022-07-05 17:07:56 +03:00
parent f491e136d1
commit 4989430f1a
2 changed files with 7 additions and 7 deletions

View file

@ -19,10 +19,10 @@ async function main() {
}
const options = { ...commonOptions, ...publisherOptions };
const fileSelector = options.files && (typeof(options.files) === "string" || options.files.primary) ? options.files : gradleOutputSelector;
const fileSelector = typeof options.filesPrimary === "string" ? { primary: options.filesPrimary, secondary: typeof options.filesSecondary === "string" ? options.filesSecondary : gradleOutputSelector["secondary"] } : typeof options.files === "string" ? options.files : gradleOutputSelector;
const files = await getRequiredFiles(fileSelector);
const retryAttempts = mapNumberInput(options.retry?.["attempts"]);
const retryDelay = mapNumberInput(options.retry?.["delay"]);
const retryAttempts = mapNumberInput(options.retryAttempts);
const retryDelay = mapNumberInput(options.retryDelay);
const publisher = publisherFactory.create(target, logger);
logger.info(`Publishing assets to ${targetName}...`);

View file

@ -18,12 +18,12 @@ interface ModPublisherOptions {
loaders?: string | string[];
name?: string;
version?: string;
changelog?: string | { file?: string };
changelog?: string;
changelogFile?: string;
versionResolver?: string;
gameVersions?: string | string[];
java?: string | string[];
dependencies?: string | string[];
files?: string | { primary?: string, secondary?: string };
}
function processMultilineInput(input: string | string[], splitter?: RegExp): string[] {
@ -92,8 +92,8 @@ export default abstract class ModPublisher extends Publisher<ModPublisherOptions
const name = typeof options.name === "string" ? options.name : (<string>releaseInfo?.name || version);
const changelog = typeof options.changelog === "string"
? options.changelog
: options.changelog?.file
? await readChangelog(options.changelog.file)
: typeof options.changelogFile === "string"
? await readChangelog(options.changelogFile)
: <string>releaseInfo?.body || "";
const loaders = processMultilineInput(options.loaders, /\s+/);