UNPKG

git-semver-tagger

Version:

![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/robertfmurdock/ze-great-tools?label=Release) ![NPM Version](https://img.shields.io/npm/v/git-semver-tagger?label=npm%20git-semver-tagger)

869 lines (867 loc) 38.6 kB
(function (_, kotlin_kotlin, kotlin_clikt_clikt, kotlin_com_zegreatrob_tools_tagger_core, kotlin_clikt_clikt_mordant, kotlin_com_zegreatrob_tools_git_adapter, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json, kotlin_com_zegreatrob_tools_cli_tools, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core) { 'use strict'; //region block: imports var imul = Math.imul; var protoOf = kotlin_kotlin.$_$.aa; var initMetadataForObject = kotlin_kotlin.$_$.f9; var CliktError = kotlin_clikt_clikt.$_$.a; var VOID = kotlin_kotlin.$_$.f; var Unit_instance = kotlin_kotlin.$_$.e4; var RegexOption_IGNORE_CASE_getInstance = kotlin_kotlin.$_$.g; var Regex_init_$Create$ = kotlin_kotlin.$_$.x; var VersionRegex = kotlin_com_zegreatrob_tools_tagger_core.$_$.c; var CliktCommand = kotlin_clikt_clikt_mordant.$_$.a; var context = kotlin_clikt_clikt.$_$.e; var argument = kotlin_clikt_clikt.$_$.j; var optional = kotlin_clikt_clikt.$_$.k; var option = kotlin_clikt_clikt.$_$.o; var boolean = kotlin_clikt_clikt.$_$.q; var default_0 = kotlin_clikt_clikt.$_$.l; var Defaults_getInstance = kotlin_com_zegreatrob_tools_tagger_core.$_$.j; var Companion_instance = kotlin_com_zegreatrob_tools_tagger_core.$_$.i; var GitAdapter = kotlin_com_zegreatrob_tools_git_adapter.$_$.a; var TaggerCore = kotlin_com_zegreatrob_tools_tagger_core.$_$.b; var calculateNextVersion = kotlin_com_zegreatrob_tools_tagger_core.$_$.f; var noWhenBranchMatchedException = kotlin_kotlin.$_$.ye; var Failure = kotlin_com_zegreatrob_tools_tagger_core.$_$.d; var Success = kotlin_com_zegreatrob_tools_tagger_core.$_$.e; var initMetadataForClass = kotlin_kotlin.$_$.a9; var KProperty1 = kotlin_kotlin.$_$.va; var getPropertyCallableRef = kotlin_kotlin.$_$.x8; var emptyList = kotlin_kotlin.$_$.t5; var JsonObject = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.c; var collectionSizeOrDefault = kotlin_kotlin.$_$.c5; var ArrayList_init_$Create$ = kotlin_kotlin.$_$.i; var Companion_instance_0 = kotlin_clikt_clikt.$_$.s; var get_jsonPrimitive = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.d; var JsonArray = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.b; var IllegalArgumentException = kotlin_kotlin.$_$.wd; var split = kotlin_kotlin.$_$.nc; var Companion_instance_1 = kotlin_clikt_clikt.$_$.r; var listOf = kotlin_kotlin.$_$.p6; var Regex_init_$Create$_0 = kotlin_kotlin.$_$.w; var readFromFile = kotlin_com_zegreatrob_tools_cli_tools.$_$.b; var Default_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.a; var getKClass = kotlin_kotlin.$_$.e; var arrayOf = kotlin_kotlin.$_$.oe; var createKType = kotlin_kotlin.$_$.b; var serializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.i2; var THROW_CCE = kotlin_kotlin.$_$.ce; var KSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.a2; var isInterface = kotlin_kotlin.$_$.o9; var last = kotlin_kotlin.$_$.bc; var toString = kotlin_kotlin.$_$.x1; var platformArgCorrection = kotlin_com_zegreatrob_tools_cli_tools.$_$.a; var main = kotlin_clikt_clikt.$_$.f; var subcommands = kotlin_clikt_clikt.$_$.h; var required = kotlin_clikt_clikt.$_$.p; var tag = kotlin_com_zegreatrob_tools_tagger_core.$_$.g; var Error_0 = kotlin_com_zegreatrob_tools_tagger_core.$_$.a; var Success_getInstance = kotlin_com_zegreatrob_tools_tagger_core.$_$.h; var equals = kotlin_kotlin.$_$.u8; var PrintMessage = kotlin_clikt_clikt.$_$.d; var setOf = kotlin_kotlin.$_$.f7; var eagerOption = kotlin_clikt_clikt.$_$.m; var flag = kotlin_clikt_clikt.$_$.n; var initMetadataForCompanion = kotlin_kotlin.$_$.b9; var PluginGeneratedSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.u1; var StringSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.n; var BooleanSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.m; var UnknownFieldException_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.d; var get_nullable = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.q; var typeParametersSerializers = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.p1; var GeneratedSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.q1; var throwMissingFieldException = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.x1; var objectCreate = kotlin_kotlin.$_$.z9; var getStringHashCode = kotlin_kotlin.$_$.y8; var getBooleanHashCode = kotlin_kotlin.$_$.v8; //endregion //region block: pre-declaration initMetadataForObject(Versions, 'Versions'); initMetadataForClass(CalculateVersion, 'CalculateVersion', CalculateVersion, CliktCommand); initMetadataForClass(ConfigFileSource, 'ConfigFileSource'); initMetadataForClass(Tag, 'Tag', Tag, CliktCommand); initMetadataForClass(Tagger, 'Tagger', Tagger, CliktCommand); initMetadataForCompanion(Companion); initMetadataForObject($serializer, '$serializer', VOID, VOID, [GeneratedSerializer]); initMetadataForClass(TaggerConfig, 'TaggerConfig', TaggerConfig, VOID, VOID, VOID, VOID, {0: $serializer_getInstance}); //endregion function Versions() { this.h31_1 = '1.7.10'; } var Versions_instance; function Versions_getInstance() { return Versions_instance; } function _get_gitRepoArgument__zxde8($this) { return $this.x31_1.r22($this, gitRepoArgument$factory_0()); } function _get_gitRepoOption__rk7ta0($this) { return $this.y31_1.r22($this, gitRepoOption$factory_0()); } function _get_workingDirectory__eyfbj($this) { var tmp0_elvis_lhs = _get_gitRepoArgument__zxde8($this); var tmp1_elvis_lhs = tmp0_elvis_lhs == null ? _get_gitRepoOption__rk7ta0($this) : tmp0_elvis_lhs; var tmp; if (tmp1_elvis_lhs == null) { throw new CliktError('No target directory'); } else { tmp = tmp1_elvis_lhs; } return tmp; } function _get_implicitPatch__bjk4pa($this) { return $this.z31_1.r22($this, implicitPatch$factory_0()); } function _get_releaseBranch__pqrgbs($this) { return $this.a32_1.r22($this, releaseBranch$factory_0()); } function _get_majorRegex__5j6ypp($this) { return $this.b32_1.r22($this, majorRegex$factory_0()); } function _get_minorRegex__20z96h($this) { return $this.c32_1.r22($this, minorRegex$factory_0()); } function _get_patchRegex__mtlu2c($this) { return $this.d32_1.r22($this, patchRegex$factory_0()); } function _get_noneRegex__1tdbgi($this) { return $this.e32_1.r22($this, noneRegex$factory_0()); } function _get_versionRegex__7su5ss($this) { return $this.f32_1.r22($this, versionRegex$factory_0()); } function output($this, message, errorMessage) { $this.f1s(message); // Inline function 'kotlin.collections.isNotEmpty' call if (!errorMessage.m()) { $this.f1s(errorMessage, VOID, true); } } function versionRegex($this) { var tmp = Regex_init_$Create$(_get_noneRegex__1tdbgi($this), RegexOption_IGNORE_CASE_getInstance()); var tmp_0 = Regex_init_$Create$(_get_patchRegex__mtlu2c($this), RegexOption_IGNORE_CASE_getInstance()); var tmp_1 = Regex_init_$Create$(_get_minorRegex__20z96h($this), RegexOption_IGNORE_CASE_getInstance()); var tmp_2 = Regex_init_$Create$(_get_majorRegex__5j6ypp($this), RegexOption_IGNORE_CASE_getInstance()); var tmp0_safe_receiver = _get_versionRegex__7su5ss($this); var tmp_3; if (tmp0_safe_receiver == null) { tmp_3 = null; } else { // Inline function 'kotlin.let' call tmp_3 = Regex_init_$Create$(tmp0_safe_receiver, RegexOption_IGNORE_CASE_getInstance()); } return new VersionRegex(tmp, tmp_0, tmp_1, tmp_2, tmp_3); } function CalculateVersion$lambda($this$context) { $this$context.z1s([new ConfigFileSource($this$context.v1s_1)]); return Unit_instance; } function CalculateVersion$versionRegex$delegate$lambda($tmp2_check_$receiver, $message) { return function ($this$copy, it) { var tmp; if (!(it == null)) { // Inline function 'com.github.ajalt.clikt.parameters.options.OptionTransformContext.require' call if (!$tmp2_check_$receiver.u1o(it)) { var tmp$ret$2 = $message; $this$copy.a22(tmp$ret$2); } tmp = Unit_instance; } return Unit_instance; }; } function CalculateVersion() { CliktCommand.call(this); context(this, CalculateVersion$lambda); this.x31_1 = optional(argument(this, 'git-repo')).x21(this, gitRepoArgument$factory()); this.y31_1 = option(this, ['--git-repo'], VOID, VOID, VOID, 'PWD').b23(this, gitRepoOption$factory()); this.z31_1 = default_0(boolean(option(this, [])), true).b23(this, implicitPatch$factory()); this.a32_1 = option(this, []).b23(this, releaseBranch$factory()); this.b32_1 = default_0(option(this, []), Defaults_getInstance().s1o_1.nc_1).b23(this, majorRegex$factory()); this.c32_1 = default_0(option(this, []), Defaults_getInstance().r1o_1.nc_1).b23(this, minorRegex$factory()); this.d32_1 = default_0(option(this, []), Defaults_getInstance().q1o_1.nc_1).b23(this, patchRegex$factory()); this.e32_1 = default_0(option(this, []), Defaults_getInstance().p1o_1.nc_1).b23(this, noneRegex$factory()); var tmp = this; var tmp0 = option(this, []); // Inline function 'com.github.ajalt.clikt.parameters.options.check' call var message = "version regex must include groups named 'major', 'minor', 'patch', and 'none'."; // Inline function 'com.github.ajalt.clikt.parameters.options.check' call // Inline function 'com.github.ajalt.clikt.parameters.options.validate' call var tmp_0 = tmp0.s21(); var tmp_1 = tmp0.u22(); var tmp_2 = tmp0.t21(); tmp.f32_1 = tmp0.v22(tmp_0, tmp_1, tmp_2, CalculateVersion$versionRegex$delegate$lambda(Companion_instance, message)).b23(this, versionRegex$factory()); } protoOf(CalculateVersion).r1t = function () { var tmp = new TaggerCore(new GitAdapter(_get_workingDirectory__eyfbj(this))); var tmp_0 = _get_implicitPatch__bjk4pa(this); var tmp_1 = versionRegex(this); var tmp0_elvis_lhs = _get_releaseBranch__pqrgbs(this); // Inline function 'kotlin.run' call var $this$run = calculateNextVersion(tmp, tmp_0, tmp_1, tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs); if ($this$run instanceof Success) { output(this, $this$run.v1o_1, $this$run.w1o_1); } else { if ($this$run instanceof Failure) throw new CliktError($this$run.ma()); else { noWhenBranchMatchedException(); } } }; function gitRepoArgument$factory() { return getPropertyCallableRef('gitRepoArgument', 1, KProperty1, function (receiver) { return _get_gitRepoArgument__zxde8(receiver); }, null); } function gitRepoOption$factory() { return getPropertyCallableRef('gitRepoOption', 1, KProperty1, function (receiver) { return _get_gitRepoOption__rk7ta0(receiver); }, null); } function implicitPatch$factory() { return getPropertyCallableRef('implicitPatch', 1, KProperty1, function (receiver) { return _get_implicitPatch__bjk4pa(receiver); }, null); } function releaseBranch$factory() { return getPropertyCallableRef('releaseBranch', 1, KProperty1, function (receiver) { return _get_releaseBranch__pqrgbs(receiver); }, null); } function majorRegex$factory() { return getPropertyCallableRef('majorRegex', 1, KProperty1, function (receiver) { return _get_majorRegex__5j6ypp(receiver); }, null); } function minorRegex$factory() { return getPropertyCallableRef('minorRegex', 1, KProperty1, function (receiver) { return _get_minorRegex__20z96h(receiver); }, null); } function patchRegex$factory() { return getPropertyCallableRef('patchRegex', 1, KProperty1, function (receiver) { return _get_patchRegex__mtlu2c(receiver); }, null); } function noneRegex$factory() { return getPropertyCallableRef('noneRegex', 1, KProperty1, function (receiver) { return _get_noneRegex__1tdbgi(receiver); }, null); } function versionRegex$factory() { return getPropertyCallableRef('versionRegex', 1, KProperty1, function (receiver) { return _get_versionRegex__7su5ss(receiver); }, null); } function gitRepoArgument$factory_0() { return getPropertyCallableRef('gitRepoArgument', 1, KProperty1, function (receiver) { return _get_gitRepoArgument__zxde8(receiver); }, null); } function gitRepoOption$factory_0() { return getPropertyCallableRef('gitRepoOption', 1, KProperty1, function (receiver) { return _get_gitRepoOption__rk7ta0(receiver); }, null); } function implicitPatch$factory_0() { return getPropertyCallableRef('implicitPatch', 1, KProperty1, function (receiver) { return _get_implicitPatch__bjk4pa(receiver); }, null); } function releaseBranch$factory_0() { return getPropertyCallableRef('releaseBranch', 1, KProperty1, function (receiver) { return _get_releaseBranch__pqrgbs(receiver); }, null); } function majorRegex$factory_0() { return getPropertyCallableRef('majorRegex', 1, KProperty1, function (receiver) { return _get_majorRegex__5j6ypp(receiver); }, null); } function minorRegex$factory_0() { return getPropertyCallableRef('minorRegex', 1, KProperty1, function (receiver) { return _get_minorRegex__20z96h(receiver); }, null); } function patchRegex$factory_0() { return getPropertyCallableRef('patchRegex', 1, KProperty1, function (receiver) { return _get_patchRegex__mtlu2c(receiver); }, null); } function noneRegex$factory_0() { return getPropertyCallableRef('noneRegex', 1, KProperty1, function (receiver) { return _get_noneRegex__1tdbgi(receiver); }, null); } function versionRegex$factory_0() { return getPropertyCallableRef('versionRegex', 1, KProperty1, function (receiver) { return _get_versionRegex__7su5ss(receiver); }, null); } function findInvocations($this, configAsElement, option) { var cursor = configAsElement; var parts_0 = parts($this, option); var _iterator__ex2g4s = parts_0.p(); while (_iterator__ex2g4s.q()) { var part = _iterator__ex2g4s.r(); if (!(cursor instanceof JsonObject)) return emptyList(); cursor = cursor.md(part); } if (cursor == null) return emptyList(); try { if (cursor instanceof JsonArray) { // Inline function 'kotlin.collections.map' call var this_0 = cursor; // Inline function 'kotlin.collections.mapTo' call var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10)); var _iterator__ex2g4s_0 = this_0.p(); while (_iterator__ex2g4s_0.q()) { var item = _iterator__ex2g4s_0.r(); var tmp$ret$0 = Companion_instance_0.r27(get_jsonPrimitive(item).w2r()); destination.e(tmp$ret$0); } return destination; } return Companion_instance_0.q27(get_jsonPrimitive(cursor).w2r()); } catch ($p) { if ($p instanceof IllegalArgumentException) { var _unused_var__etf5q3 = $p; return emptyList(); } else { throw $p; } } } function parts($this, _this__u8e3s4) { var tmp0_safe_receiver = _this__u8e3s4.f1u(); var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : split(tmp0_safe_receiver, ['.']); return tmp1_elvis_lhs == null ? listOf(kebabToCamelCase($this, Companion_instance_1.s27(_this__u8e3s4))) : tmp1_elvis_lhs; } function kebabToCamelCase($this, _this__u8e3s4) { // Inline function 'kotlin.text.toRegex' call var pattern = Regex_init_$Create$_0('-[a-z]'); // Inline function 'kotlin.text.replace' call var transform = ConfigFileSource$kebabToCamelCase$lambda; return pattern.fd(_this__u8e3s4, transform); } function readConfigFileAsJsonElement($this) { var pwd = $this.g32_1('PWD'); var tmp0_elvis_lhs = readFromFile('' + pwd + '/.tagger'); var tmp; if (tmp0_elvis_lhs == null) { return null; } else { tmp = tmp0_elvis_lhs; } var fileContents = tmp; // Inline function 'kotlinx.serialization.json.Json.decodeFromString' call var this_0 = Default_getInstance(); // Inline function 'kotlinx.serialization.serializer' call var this_1 = this_0.hp(); // Inline function 'kotlinx.serialization.internal.cast' call var this_2 = serializer(this_1, createKType(getKClass(TaggerConfig), arrayOf([]), false)); var tmp$ret$1 = isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(); var config = this_0.j2q(tmp$ret$1, fileContents); // Inline function 'kotlinx.serialization.json.encodeToJsonElement' call var this_3 = Default_getInstance(); // Inline function 'kotlinx.serialization.serializer' call var this_4 = this_3.hp(); // Inline function 'kotlinx.serialization.internal.cast' call var this_5 = serializer(this_4, createKType(getKClass(TaggerConfig), arrayOf([]), false)); var tmp$ret$4 = isInterface(this_5, KSerializer) ? this_5 : THROW_CCE(); var configAsElement = this_3.k2q(tmp$ret$4, config); return configAsElement; } function ConfigFileSource$kebabToCamelCase$lambda(it) { // Inline function 'kotlin.text.uppercase' call var this_0 = last(it.z()); // Inline function 'kotlin.js.asDynamic' call // Inline function 'kotlin.js.unsafeCast' call return toString(this_0).toUpperCase(); } function ConfigFileSource(envvarReader) { this.g32_1 = envvarReader; } protoOf(ConfigFileSource).d23 = function (context, option) { var tmp0_elvis_lhs = readConfigFileAsJsonElement(this); var tmp; if (tmp0_elvis_lhs == null) { return emptyList(); } else { tmp = tmp0_elvis_lhs; } var configAsElement = tmp; return findInvocations(this, configAsElement, option); }; function main_0(args) { return main(cli(), platformArgCorrection(args)); } function cli() { return subcommands(subcommands(new Tagger(), [new CalculateVersion()]), [new Tag()]); } function mainWrapper() { main_0([]); } function _get_gitRepoArgument__zxde8_0($this) { return $this.w32_1.r22($this, gitRepoArgument$factory_2()); } function _get_gitRepoOption__rk7ta0_0($this) { return $this.x32_1.r22($this, gitRepoOption$factory_2()); } function _get_workingDirectory__eyfbj_0($this) { var tmp0_elvis_lhs = _get_gitRepoArgument__zxde8_0($this); var tmp1_elvis_lhs = tmp0_elvis_lhs == null ? _get_gitRepoOption__rk7ta0_0($this) : tmp0_elvis_lhs; var tmp; if (tmp1_elvis_lhs == null) { throw new CliktError('No target directory'); } else { tmp = tmp1_elvis_lhs; } return tmp; } function _get_releaseBranch__pqrgbs_0($this) { return $this.y32_1.r22($this, releaseBranch$factory_2()); } function _get_version__2bx7w9($this) { return $this.z32_1.r22($this, version$factory_0()); } function _get_userName__tupjmd($this) { return $this.a33_1.r22($this, userName$factory_0()); } function _get_userEmail__21hfkw($this) { return $this.b33_1.r22($this, userEmail$factory_0()); } function _get_warningsAsErrors__7mpwfd($this) { return $this.c33_1.r22($this, warningsAsErrors$factory_0()); } function Tag$lambda($this$context) { $this$context.z1s([new ConfigFileSource($this$context.v1s_1)]); return Unit_instance; } function Tag() { CliktCommand.call(this); context(this, Tag$lambda); this.w32_1 = optional(argument(this, 'git-repo')).x21(this, gitRepoArgument$factory_1()); this.x32_1 = option(this, ['--git-repo'], VOID, VOID, VOID, 'PWD').b23(this, gitRepoOption$factory_1()); this.y32_1 = required(option(this, [])).b23(this, releaseBranch$factory_1()); this.z32_1 = required(option(this, [])).b23(this, version$factory()); this.a33_1 = option(this, []).b23(this, userName$factory()); this.b33_1 = option(this, []).b23(this, userEmail$factory()); this.c33_1 = default_0(boolean(option(this, [])), false).b23(this, warningsAsErrors$factory()); } protoOf(Tag).r1t = function () { // Inline function 'kotlin.let' call var it = tag(new TaggerCore(new GitAdapter(_get_workingDirectory__eyfbj_0(this))), _get_version__2bx7w9(this), _get_releaseBranch__pqrgbs_0(this), _get_userName__tupjmd(this), _get_userEmail__21hfkw(this)); if (equals(it, Success_getInstance())) { this.f1s('Success!'); } else { if (it instanceof Error_0) if (_get_warningsAsErrors__7mpwfd(this)) { throw new CliktError(it.o1o_1); } else { this.f1s(it.o1o_1, VOID, true); } else { noWhenBranchMatchedException(); } } }; function gitRepoArgument$factory_1() { return getPropertyCallableRef('gitRepoArgument', 1, KProperty1, function (receiver) { return _get_gitRepoArgument__zxde8_0(receiver); }, null); } function gitRepoOption$factory_1() { return getPropertyCallableRef('gitRepoOption', 1, KProperty1, function (receiver) { return _get_gitRepoOption__rk7ta0_0(receiver); }, null); } function releaseBranch$factory_1() { return getPropertyCallableRef('releaseBranch', 1, KProperty1, function (receiver) { return _get_releaseBranch__pqrgbs_0(receiver); }, null); } function version$factory() { return getPropertyCallableRef('version', 1, KProperty1, function (receiver) { return _get_version__2bx7w9(receiver); }, null); } function userName$factory() { return getPropertyCallableRef('userName', 1, KProperty1, function (receiver) { return _get_userName__tupjmd(receiver); }, null); } function userEmail$factory() { return getPropertyCallableRef('userEmail', 1, KProperty1, function (receiver) { return _get_userEmail__21hfkw(receiver); }, null); } function warningsAsErrors$factory() { return getPropertyCallableRef('warningsAsErrors', 1, KProperty1, function (receiver) { return _get_warningsAsErrors__7mpwfd(receiver); }, null); } function gitRepoArgument$factory_2() { return getPropertyCallableRef('gitRepoArgument', 1, KProperty1, function (receiver) { return _get_gitRepoArgument__zxde8_0(receiver); }, null); } function gitRepoOption$factory_2() { return getPropertyCallableRef('gitRepoOption', 1, KProperty1, function (receiver) { return _get_gitRepoOption__rk7ta0_0(receiver); }, null); } function releaseBranch$factory_2() { return getPropertyCallableRef('releaseBranch', 1, KProperty1, function (receiver) { return _get_releaseBranch__pqrgbs_0(receiver); }, null); } function version$factory_0() { return getPropertyCallableRef('version', 1, KProperty1, function (receiver) { return _get_version__2bx7w9(receiver); }, null); } function userName$factory_0() { return getPropertyCallableRef('userName', 1, KProperty1, function (receiver) { return _get_userName__tupjmd(receiver); }, null); } function userEmail$factory_0() { return getPropertyCallableRef('userEmail', 1, KProperty1, function (receiver) { return _get_userEmail__21hfkw(receiver); }, null); } function warningsAsErrors$factory_0() { return getPropertyCallableRef('warningsAsErrors', 1, KProperty1, function (receiver) { return _get_warningsAsErrors__7mpwfd(receiver); }, null); } function _get_quiet__c6dzoj($this) { return $this.s33_1.r22($this, quiet$factory_0()); } function Tagger$lambda($version, $this) { return function ($this$eagerOption) { var it = $version; var tmp$ret$0 = $this.y1o_1 + ' version ' + it; throw new PrintMessage(tmp$ret$0); }; } function Tagger() { CliktCommand.call(this); // Inline function 'com.github.ajalt.clikt.parameters.options.versionOption' call var version = Versions_instance.h31_1; var help = 'Show the version and exit'; var names = setOf('--version'); eagerOption(this, names, help, VOID, VOID, VOID, Tagger$lambda(version, this)); this.s33_1 = flag(option(this, ['--quiet', '-q']), [], false).b23(this, quiet$factory()); } protoOf(Tagger).r1t = function () { if (!_get_quiet__c6dzoj(this)) { this.f1s('Welcome to Tagger CLI.'); } }; function quiet$factory() { return getPropertyCallableRef('quiet', 1, KProperty1, function (receiver) { return _get_quiet__c6dzoj(receiver); }, null); } function quiet$factory_0() { return getPropertyCallableRef('quiet', 1, KProperty1, function (receiver) { return _get_quiet__c6dzoj(receiver); }, null); } function Companion() { } var Companion_instance_2; function Companion_getInstance() { return Companion_instance_2; } function $serializer() { $serializer_instance = this; var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.zegreatrob.tools.tagger.cli.TaggerConfig', this, 10); tmp0_serialDesc.zv('releaseBranch', true); tmp0_serialDesc.zv('implicitPatch', true); tmp0_serialDesc.zv('majorRegex', true); tmp0_serialDesc.zv('minorRegex', true); tmp0_serialDesc.zv('patchRegex', true); tmp0_serialDesc.zv('versionRegex', true); tmp0_serialDesc.zv('noneRegex', true); tmp0_serialDesc.zv('userName', true); tmp0_serialDesc.zv('userEmail', true); tmp0_serialDesc.zv('warningsAsErrors', true); this.t33_1 = tmp0_serialDesc; } protoOf($serializer).u33 = function (encoder, value) { var tmp0_desc = this.t33_1; var tmp1_output = encoder.so(tmp0_desc); if (tmp1_output.oq(tmp0_desc, 0) ? true : !(value.v33_1 == null)) { tmp1_output.kq(tmp0_desc, 0, StringSerializer_getInstance(), value.v33_1); } if (tmp1_output.oq(tmp0_desc, 1) ? true : !(value.w33_1 == null)) { tmp1_output.kq(tmp0_desc, 1, BooleanSerializer_getInstance(), value.w33_1); } if (tmp1_output.oq(tmp0_desc, 2) ? true : !(value.x33_1 == null)) { tmp1_output.kq(tmp0_desc, 2, StringSerializer_getInstance(), value.x33_1); } if (tmp1_output.oq(tmp0_desc, 3) ? true : !(value.y33_1 == null)) { tmp1_output.kq(tmp0_desc, 3, StringSerializer_getInstance(), value.y33_1); } if (tmp1_output.oq(tmp0_desc, 4) ? true : !(value.z33_1 == null)) { tmp1_output.kq(tmp0_desc, 4, StringSerializer_getInstance(), value.z33_1); } if (tmp1_output.oq(tmp0_desc, 5) ? true : !(value.a34_1 == null)) { tmp1_output.kq(tmp0_desc, 5, StringSerializer_getInstance(), value.a34_1); } if (tmp1_output.oq(tmp0_desc, 6) ? true : !(value.b34_1 == null)) { tmp1_output.kq(tmp0_desc, 6, StringSerializer_getInstance(), value.b34_1); } if (tmp1_output.oq(tmp0_desc, 7) ? true : !(value.c34_1 == null)) { tmp1_output.kq(tmp0_desc, 7, StringSerializer_getInstance(), value.c34_1); } if (tmp1_output.oq(tmp0_desc, 8) ? true : !(value.d34_1 == null)) { tmp1_output.kq(tmp0_desc, 8, StringSerializer_getInstance(), value.d34_1); } if (tmp1_output.oq(tmp0_desc, 9) ? true : !(value.e34_1 == null)) { tmp1_output.kq(tmp0_desc, 9, BooleanSerializer_getInstance(), value.e34_1); } tmp1_output.to(tmp0_desc); }; protoOf($serializer).ol = function (encoder, value) { return this.u33(encoder, value instanceof TaggerConfig ? value : THROW_CCE()); }; protoOf($serializer).pl = function (decoder) { var tmp0_desc = this.t33_1; var tmp1_flag = true; var tmp2_index = 0; var tmp3_bitMask0 = 0; var tmp4_local0 = null; var tmp5_local1 = null; var tmp6_local2 = null; var tmp7_local3 = null; var tmp8_local4 = null; var tmp9_local5 = null; var tmp10_local6 = null; var tmp11_local7 = null; var tmp12_local8 = null; var tmp13_local9 = null; var tmp14_input = decoder.so(tmp0_desc); if (tmp14_input.ip()) { tmp4_local0 = tmp14_input.gp(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0); tmp3_bitMask0 = tmp3_bitMask0 | 1; tmp5_local1 = tmp14_input.gp(tmp0_desc, 1, BooleanSerializer_getInstance(), tmp5_local1); tmp3_bitMask0 = tmp3_bitMask0 | 2; tmp6_local2 = tmp14_input.gp(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2); tmp3_bitMask0 = tmp3_bitMask0 | 4; tmp7_local3 = tmp14_input.gp(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3); tmp3_bitMask0 = tmp3_bitMask0 | 8; tmp8_local4 = tmp14_input.gp(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4); tmp3_bitMask0 = tmp3_bitMask0 | 16; tmp9_local5 = tmp14_input.gp(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5); tmp3_bitMask0 = tmp3_bitMask0 | 32; tmp10_local6 = tmp14_input.gp(tmp0_desc, 6, StringSerializer_getInstance(), tmp10_local6); tmp3_bitMask0 = tmp3_bitMask0 | 64; tmp11_local7 = tmp14_input.gp(tmp0_desc, 7, StringSerializer_getInstance(), tmp11_local7); tmp3_bitMask0 = tmp3_bitMask0 | 128; tmp12_local8 = tmp14_input.gp(tmp0_desc, 8, StringSerializer_getInstance(), tmp12_local8); tmp3_bitMask0 = tmp3_bitMask0 | 256; tmp13_local9 = tmp14_input.gp(tmp0_desc, 9, BooleanSerializer_getInstance(), tmp13_local9); tmp3_bitMask0 = tmp3_bitMask0 | 512; } else while (tmp1_flag) { tmp2_index = tmp14_input.jp(tmp0_desc); switch (tmp2_index) { case -1: tmp1_flag = false; break; case 0: tmp4_local0 = tmp14_input.gp(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0); tmp3_bitMask0 = tmp3_bitMask0 | 1; break; case 1: tmp5_local1 = tmp14_input.gp(tmp0_desc, 1, BooleanSerializer_getInstance(), tmp5_local1); tmp3_bitMask0 = tmp3_bitMask0 | 2; break; case 2: tmp6_local2 = tmp14_input.gp(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2); tmp3_bitMask0 = tmp3_bitMask0 | 4; break; case 3: tmp7_local3 = tmp14_input.gp(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3); tmp3_bitMask0 = tmp3_bitMask0 | 8; break; case 4: tmp8_local4 = tmp14_input.gp(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4); tmp3_bitMask0 = tmp3_bitMask0 | 16; break; case 5: tmp9_local5 = tmp14_input.gp(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5); tmp3_bitMask0 = tmp3_bitMask0 | 32; break; case 6: tmp10_local6 = tmp14_input.gp(tmp0_desc, 6, StringSerializer_getInstance(), tmp10_local6); tmp3_bitMask0 = tmp3_bitMask0 | 64; break; case 7: tmp11_local7 = tmp14_input.gp(tmp0_desc, 7, StringSerializer_getInstance(), tmp11_local7); tmp3_bitMask0 = tmp3_bitMask0 | 128; break; case 8: tmp12_local8 = tmp14_input.gp(tmp0_desc, 8, StringSerializer_getInstance(), tmp12_local8); tmp3_bitMask0 = tmp3_bitMask0 | 256; break; case 9: tmp13_local9 = tmp14_input.gp(tmp0_desc, 9, BooleanSerializer_getInstance(), tmp13_local9); tmp3_bitMask0 = tmp3_bitMask0 | 512; break; default: throw UnknownFieldException_init_$Create$(tmp2_index); } } tmp14_input.to(tmp0_desc); return TaggerConfig_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, tmp13_local9, null); }; protoOf($serializer).nl = function () { return this.t33_1; }; protoOf($serializer).bw = function () { // Inline function 'kotlin.arrayOf' call // Inline function 'kotlin.js.unsafeCast' call // Inline function 'kotlin.js.asDynamic' call return [get_nullable(StringSerializer_getInstance()), get_nullable(BooleanSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(BooleanSerializer_getInstance())]; }; var $serializer_instance; function $serializer_getInstance() { if ($serializer_instance == null) new $serializer(); return $serializer_instance; } function TaggerConfig_init_$Init$(seen0, releaseBranch, implicitPatch, majorRegex, minorRegex, patchRegex, versionRegex, noneRegex, userName, userEmail, warningsAsErrors, serializationConstructorMarker, $this) { if (!(0 === (0 & seen0))) { throwMissingFieldException(seen0, 0, $serializer_getInstance().t33_1); } if (0 === (seen0 & 1)) $this.v33_1 = null; else $this.v33_1 = releaseBranch; if (0 === (seen0 & 2)) $this.w33_1 = null; else $this.w33_1 = implicitPatch; if (0 === (seen0 & 4)) $this.x33_1 = null; else $this.x33_1 = majorRegex; if (0 === (seen0 & 8)) $this.y33_1 = null; else $this.y33_1 = minorRegex; if (0 === (seen0 & 16)) $this.z33_1 = null; else $this.z33_1 = patchRegex; if (0 === (seen0 & 32)) $this.a34_1 = null; else $this.a34_1 = versionRegex; if (0 === (seen0 & 64)) $this.b34_1 = null; else $this.b34_1 = noneRegex; if (0 === (seen0 & 128)) $this.c34_1 = null; else $this.c34_1 = userName; if (0 === (seen0 & 256)) $this.d34_1 = null; else $this.d34_1 = userEmail; if (0 === (seen0 & 512)) $this.e34_1 = null; else $this.e34_1 = warningsAsErrors; return $this; } function TaggerConfig_init_$Create$(seen0, releaseBranch, implicitPatch, majorRegex, minorRegex, patchRegex, versionRegex, noneRegex, userName, userEmail, warningsAsErrors, serializationConstructorMarker) { return TaggerConfig_init_$Init$(seen0, releaseBranch, implicitPatch, majorRegex, minorRegex, patchRegex, versionRegex, noneRegex, userName, userEmail, warningsAsErrors, serializationConstructorMarker, objectCreate(protoOf(TaggerConfig))); } function TaggerConfig(releaseBranch, implicitPatch, majorRegex, minorRegex, patchRegex, versionRegex, noneRegex, userName, userEmail, warningsAsErrors) { releaseBranch = releaseBranch === VOID ? null : releaseBranch; implicitPatch = implicitPatch === VOID ? null : implicitPatch; majorRegex = majorRegex === VOID ? null : majorRegex; minorRegex = minorRegex === VOID ? null : minorRegex; patchRegex = patchRegex === VOID ? null : patchRegex; versionRegex = versionRegex === VOID ? null : versionRegex; noneRegex = noneRegex === VOID ? null : noneRegex; userName = userName === VOID ? null : userName; userEmail = userEmail === VOID ? null : userEmail; warningsAsErrors = warningsAsErrors === VOID ? null : warningsAsErrors; this.v33_1 = releaseBranch; this.w33_1 = implicitPatch; this.x33_1 = majorRegex; this.y33_1 = minorRegex; this.z33_1 = patchRegex; this.a34_1 = versionRegex; this.b34_1 = noneRegex; this.c34_1 = userName; this.d34_1 = userEmail; this.e34_1 = warningsAsErrors; } protoOf(TaggerConfig).toString = function () { return 'TaggerConfig(releaseBranch=' + this.v33_1 + ', implicitPatch=' + this.w33_1 + ', majorRegex=' + this.x33_1 + ', minorRegex=' + this.y33_1 + ', patchRegex=' + this.z33_1 + ', versionRegex=' + this.a34_1 + ', noneRegex=' + this.b34_1 + ', userName=' + this.c34_1 + ', userEmail=' + this.d34_1 + ', warningsAsErrors=' + this.e34_1 + ')'; }; protoOf(TaggerConfig).hashCode = function () { var result = this.v33_1 == null ? 0 : getStringHashCode(this.v33_1); result = imul(result, 31) + (this.w33_1 == null ? 0 : getBooleanHashCode(this.w33_1)) | 0; result = imul(result, 31) + (this.x33_1 == null ? 0 : getStringHashCode(this.x33_1)) | 0; result = imul(result, 31) + (this.y33_1 == null ? 0 : getStringHashCode(this.y33_1)) | 0; result = imul(result, 31) + (this.z33_1 == null ? 0 : getStringHashCode(this.z33_1)) | 0; result = imul(result, 31) + (this.a34_1 == null ? 0 : getStringHashCode(this.a34_1)) | 0; result = imul(result, 31) + (this.b34_1 == null ? 0 : getStringHashCode(this.b34_1)) | 0; result = imul(result, 31) + (this.c34_1 == null ? 0 : getStringHashCode(this.c34_1)) | 0; result = imul(result, 31) + (this.d34_1 == null ? 0 : getStringHashCode(this.d34_1)) | 0; result = imul(result, 31) + (this.e34_1 == null ? 0 : getBooleanHashCode(this.e34_1)) | 0; return result; }; protoOf(TaggerConfig).equals = function (other) { if (this === other) return true; if (!(other instanceof TaggerConfig)) return false; var tmp0_other_with_cast = other instanceof TaggerConfig ? other : THROW_CCE(); if (!(this.v33_1 == tmp0_other_with_cast.v33_1)) return false; if (!(this.w33_1 == tmp0_other_with_cast.w33_1)) return false; if (!(this.x33_1 == tmp0_other_with_cast.x33_1)) return false; if (!(this.y33_1 == tmp0_other_with_cast.y33_1)) return false; if (!(this.z33_1 == tmp0_other_with_cast.z33_1)) return false; if (!(this.a34_1 == tmp0_other_with_cast.a34_1)) return false; if (!(this.b34_1 == tmp0_other_with_cast.b34_1)) return false; if (!(this.c34_1 == tmp0_other_with_cast.c34_1)) return false; if (!(this.d34_1 == tmp0_other_with_cast.d34_1)) return false; if (!(this.e34_1 == tmp0_other_with_cast.e34_1)) return false; return true; }; //region block: post-declaration protoOf($serializer).cw = typeParametersSerializers; //endregion //region block: init Versions_instance = new Versions(); Companion_instance_2 = new Companion(); //endregion mainWrapper(); return _; }(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./clikt-clikt.js'), require('./tools-tagger-core.js'), require('./clikt-clikt-mordant.js'), require('./tools-git-adapter.js'), require('./kotlinx-serialization-kotlinx-serialization-json.js'), require('./tools-cli-tools.js'), require('./kotlinx-serialization-kotlinx-serialization-core.js'))); //# sourceMappingURL=command-line-tools-tagger-cli.js.map