mirror of
https://github.com/Kir-Antipov/mc-publish.git
synced 2024-12-29 10:04:49 -05:00
There're some weird predefined inputs
This commit is contained in:
parent
d8d4fd16a8
commit
810ff6d7dd
2 changed files with 4 additions and 4 deletions
|
@ -11,7 +11,7 @@
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
"arrow-body-style": ["error", "as-needed"],
|
"arrow-body-style": ["error", "as-needed"],
|
||||||
"complexity": ["warn", { "max": 20 }],
|
"complexity": ["warn", { "max": 30 }],
|
||||||
"curly": ["error", "multi-line", "consistent"],
|
"curly": ["error", "multi-line", "consistent"],
|
||||||
"eqeqeq": ["error", "smart"],
|
"eqeqeq": ["error", "smart"],
|
||||||
"no-constant-condition": ["error", { "checkLoops": false }],
|
"no-constant-condition": ["error", { "checkLoops": false }],
|
||||||
|
|
|
@ -63,10 +63,10 @@ export default abstract class ModPublisher<TUniqueOptions = unknown> extends Pub
|
||||||
throw new Error(`Specified files (${typeof fileSelector === "string" ? fileSelector : fileSelector.primary}) were not found`);
|
throw new Error(`Specified files (${typeof fileSelector === "string" ? fileSelector : fileSelector.primary}) were not found`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const version = this.options.version || <string>releaseInfo?.tag_name || parseVersionFromFilename(files[0].name);
|
const version = (typeof this.options.version === "string" && this.options.version) || <string>releaseInfo?.tag_name || parseVersionFromFilename(files[0].name);
|
||||||
const versionType = this.options.versionType?.toLowerCase() || parseVersionTypeFromFilename(files[0].name);
|
const versionType = this.options.versionType?.toLowerCase() || parseVersionTypeFromFilename(files[0].name);
|
||||||
const name = this.options.name || <string>releaseInfo?.name || version;
|
const name = (typeof this.options.name === "string" && this.options.name) || <string>releaseInfo?.name || version;
|
||||||
const changelog = (this.options.changelog ? await readChangelog(this.options.changelog) : <string>releaseInfo?.body) || "";
|
const changelog = ((typeof this.options.changelog === "string" || this.options.changelog?.file) ? (await readChangelog(this.options.changelog)) : <string>releaseInfo?.body) || "";
|
||||||
|
|
||||||
const loaders = processMultilineInput(this.options.loaders, /\s+/);
|
const loaders = processMultilineInput(this.options.loaders, /\s+/);
|
||||||
if (!loaders.length) {
|
if (!loaders.length) {
|
||||||
|
|
Loading…
Reference in a new issue