diff --git a/src/index.ts b/src/index.ts index cb1cde4..5c8c646 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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}...`); diff --git a/src/publishing/mod-publisher.ts b/src/publishing/mod-publisher.ts index 239dde1..79ede3d 100644 --- a/src/publishing/mod-publisher.ts +++ b/src/publishing/mod-publisher.ts @@ -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 PublisherreleaseInfo?.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) : releaseInfo?.body || ""; const loaders = processMultilineInput(options.loaders, /\s+/);