@flock/wirespec
Advanced tools
Comparing version 0.10.24 to 0.10.25
{ | ||
"name": "@flock/wirespec", | ||
"version": "0.10.24", | ||
"version": "0.10.25", | ||
"main": "wirespec-src-plugin-npm.js", | ||
@@ -5,0 +5,0 @@ "types": "wirespec-src-plugin-npm.d.ts", |
@@ -64,34 +64,34 @@ (function (factory) { | ||
function CompilerArguments(operation, input, output, languages, packageName, logLevel, shared, strict) { | ||
this.i2b_1 = operation; | ||
this.j2b_1 = input; | ||
this.k2b_1 = output; | ||
this.l2b_1 = languages; | ||
this.m2b_1 = packageName; | ||
this.n2b_1 = logLevel; | ||
this.o2b_1 = shared; | ||
this.p2b_1 = strict; | ||
this.s2b_1 = operation; | ||
this.t2b_1 = input; | ||
this.u2b_1 = output; | ||
this.v2b_1 = languages; | ||
this.w2b_1 = packageName; | ||
this.x2b_1 = logLevel; | ||
this.y2b_1 = shared; | ||
this.z2b_1 = strict; | ||
} | ||
protoOf(CompilerArguments).toString = function () { | ||
var tmp = toString(this.i2b_1); | ||
var tmp_0 = toString(this.j2b_1); | ||
var tmp_1 = this.k2b_1; | ||
return 'CompilerArguments(operation=' + tmp + ', input=' + tmp_0 + ', output=' + toString_0(tmp_1 == null ? null : new Output(tmp_1)) + ', languages=' + toString(this.l2b_1) + ', packageName=' + PackageName__toString_impl_pes5ww(this.m2b_1) + ', logLevel=' + this.n2b_1.toString() + ', shared=' + this.o2b_1 + ', strict=' + this.p2b_1 + ')'; | ||
var tmp = toString(this.s2b_1); | ||
var tmp_0 = toString(this.t2b_1); | ||
var tmp_1 = this.u2b_1; | ||
return 'CompilerArguments(operation=' + tmp + ', input=' + tmp_0 + ', output=' + toString_0(tmp_1 == null ? null : new Output(tmp_1)) + ', languages=' + toString(this.v2b_1) + ', packageName=' + PackageName__toString_impl_pes5ww(this.w2b_1) + ', logLevel=' + this.x2b_1.toString() + ', shared=' + this.y2b_1 + ', strict=' + this.z2b_1 + ')'; | ||
}; | ||
protoOf(CompilerArguments).hashCode = function () { | ||
var result = hashCode(this.i2b_1); | ||
result = imul(result, 31) + hashCode(this.j2b_1) | 0; | ||
var result = hashCode(this.s2b_1); | ||
result = imul(result, 31) + hashCode(this.t2b_1) | 0; | ||
var tmp = imul(result, 31); | ||
var tmp_0; | ||
var tmp_1 = this.k2b_1; | ||
var tmp_1 = this.u2b_1; | ||
if ((tmp_1 == null ? null : new Output(tmp_1)) == null) { | ||
tmp_0 = 0; | ||
} else { | ||
tmp_0 = Output__hashCode_impl_m9q6pd(this.k2b_1); | ||
tmp_0 = Output__hashCode_impl_m9q6pd(this.u2b_1); | ||
} | ||
result = tmp + tmp_0 | 0; | ||
result = imul(result, 31) + hashCode(this.l2b_1) | 0; | ||
result = imul(result, 31) + PackageName__hashCode_impl_nv5z9d(this.m2b_1) | 0; | ||
result = imul(result, 31) + this.n2b_1.hashCode() | 0; | ||
result = imul(result, 31) + getBooleanHashCode(this.o2b_1) | 0; | ||
result = imul(result, 31) + getBooleanHashCode(this.p2b_1) | 0; | ||
result = imul(result, 31) + hashCode(this.v2b_1) | 0; | ||
result = imul(result, 31) + PackageName__hashCode_impl_nv5z9d(this.w2b_1) | 0; | ||
result = imul(result, 31) + this.x2b_1.hashCode() | 0; | ||
result = imul(result, 31) + getBooleanHashCode(this.y2b_1) | 0; | ||
result = imul(result, 31) + getBooleanHashCode(this.z2b_1) | 0; | ||
return result; | ||
@@ -105,20 +105,20 @@ }; | ||
var tmp0_other_with_cast = other instanceof CompilerArguments ? other : THROW_CCE(); | ||
if (!equals(this.i2b_1, tmp0_other_with_cast.i2b_1)) | ||
if (!equals(this.s2b_1, tmp0_other_with_cast.s2b_1)) | ||
return false; | ||
if (!equals(this.j2b_1, tmp0_other_with_cast.j2b_1)) | ||
if (!equals(this.t2b_1, tmp0_other_with_cast.t2b_1)) | ||
return false; | ||
var tmp = this.k2b_1; | ||
var tmp = this.u2b_1; | ||
var tmp_0 = tmp == null ? null : new Output(tmp); | ||
var tmp_1 = tmp0_other_with_cast.k2b_1; | ||
var tmp_1 = tmp0_other_with_cast.u2b_1; | ||
if (!equals(tmp_0, tmp_1 == null ? null : new Output(tmp_1))) | ||
return false; | ||
if (!equals(this.l2b_1, tmp0_other_with_cast.l2b_1)) | ||
if (!equals(this.v2b_1, tmp0_other_with_cast.v2b_1)) | ||
return false; | ||
if (!(this.m2b_1 === tmp0_other_with_cast.m2b_1)) | ||
if (!(this.w2b_1 === tmp0_other_with_cast.w2b_1)) | ||
return false; | ||
if (!this.n2b_1.equals(tmp0_other_with_cast.n2b_1)) | ||
if (!this.x2b_1.equals(tmp0_other_with_cast.x2b_1)) | ||
return false; | ||
if (!(this.o2b_1 === tmp0_other_with_cast.o2b_1)) | ||
if (!(this.y2b_1 === tmp0_other_with_cast.y2b_1)) | ||
return false; | ||
if (!(this.p2b_1 === tmp0_other_with_cast.p2b_1)) | ||
if (!(this.z2b_1 === tmp0_other_with_cast.z2b_1)) | ||
return false; | ||
@@ -142,3 +142,3 @@ return true; | ||
return false; | ||
if (!($this === (other instanceof PackageName ? other.q2b_1 : THROW_CCE()))) | ||
if (!($this === (other instanceof PackageName ? other.a2c_1 : THROW_CCE()))) | ||
return false; | ||
@@ -148,15 +148,15 @@ return true; | ||
function PackageName(value) { | ||
this.q2b_1 = value; | ||
this.a2c_1 = value; | ||
} | ||
protoOf(PackageName).b1 = function () { | ||
return _PackageName___get_value__impl__2zr98c(this.q2b_1); | ||
return _PackageName___get_value__impl__2zr98c(this.a2c_1); | ||
}; | ||
protoOf(PackageName).toString = function () { | ||
return PackageName__toString_impl_pes5ww(this.q2b_1); | ||
return PackageName__toString_impl_pes5ww(this.a2c_1); | ||
}; | ||
protoOf(PackageName).hashCode = function () { | ||
return PackageName__hashCode_impl_nv5z9d(this.q2b_1); | ||
return PackageName__hashCode_impl_nv5z9d(this.a2c_1); | ||
}; | ||
protoOf(PackageName).equals = function (other) { | ||
return PackageName__equals_impl_eo1xnn(this.q2b_1, other); | ||
return PackageName__equals_impl_eo1xnn(this.a2c_1, other); | ||
}; | ||
@@ -184,9 +184,9 @@ function Compile() { | ||
function Convert(format) { | ||
this.r2b_1 = format; | ||
this.b2c_1 = format; | ||
} | ||
protoOf(Convert).toString = function () { | ||
return 'Convert(format=' + this.r2b_1.toString() + ')'; | ||
return 'Convert(format=' + this.b2c_1.toString() + ')'; | ||
}; | ||
protoOf(Convert).hashCode = function () { | ||
return this.r2b_1.hashCode(); | ||
return this.b2c_1.hashCode(); | ||
}; | ||
@@ -199,3 +199,3 @@ protoOf(Convert).equals = function (other) { | ||
var tmp0_other_with_cast = other instanceof Convert ? other : THROW_CCE(); | ||
if (!this.r2b_1.equals(tmp0_other_with_cast.r2b_1)) | ||
if (!this.b2c_1.equals(tmp0_other_with_cast.b2c_1)) | ||
return false; | ||
@@ -245,3 +245,3 @@ return true; | ||
} | ||
protoOf(Companion_0).s2b = function (input) { | ||
protoOf(Companion_0).c2c = function (input) { | ||
// Inline function 'kotlin.let' call | ||
@@ -267,3 +267,3 @@ // Inline function 'kotlin.contracts.contract' call | ||
// Inline function 'community.flock.wirespec.plugin.Companion.parse.<anonymous>.<anonymous>' call | ||
if (element.v2b_1 === ext) { | ||
if (element.f2c_1 === ext) { | ||
tmp$ret$5 = element; | ||
@@ -294,22 +294,22 @@ break $l$block; | ||
extension = extension === VOID ? FileExtension_Wirespec_getInstance() : extension; | ||
this.w2b_1 = directory; | ||
this.x2b_1 = fileName; | ||
this.y2b_1 = extension; | ||
this.g2c_1 = directory; | ||
this.h2c_1 = fileName; | ||
this.i2c_1 = extension; | ||
} | ||
protoOf(FullFilePath).toString = function () { | ||
return this.w2b_1 + '/' + _FileName___get_value__impl__3u4cz6(this.x2b_1) + '.' + this.y2b_1.v2b_1; | ||
return this.g2c_1 + '/' + _FileName___get_value__impl__3u4cz6(this.h2c_1) + '.' + this.i2c_1.f2c_1; | ||
}; | ||
protoOf(FullFilePath).z2b = function (directory, fileName, extension) { | ||
protoOf(FullFilePath).j2c = function (directory, fileName, extension) { | ||
return new FullFilePath(directory, fileName, extension); | ||
}; | ||
protoOf(FullFilePath).a2c = function (directory, fileName, extension, $super) { | ||
directory = directory === VOID ? this.w2b_1 : directory; | ||
fileName = fileName === VOID ? this.x2b_1 : fileName; | ||
extension = extension === VOID ? this.y2b_1 : extension; | ||
return $super === VOID ? this.z2b(directory, fileName, extension) : $super.z2b.call(this, directory, new FileName(fileName), extension); | ||
protoOf(FullFilePath).k2c = function (directory, fileName, extension, $super) { | ||
directory = directory === VOID ? this.g2c_1 : directory; | ||
fileName = fileName === VOID ? this.h2c_1 : fileName; | ||
extension = extension === VOID ? this.i2c_1 : extension; | ||
return $super === VOID ? this.j2c(directory, fileName, extension) : $super.j2c.call(this, directory, new FileName(fileName), extension); | ||
}; | ||
protoOf(FullFilePath).hashCode = function () { | ||
var result = getStringHashCode(this.w2b_1); | ||
result = imul(result, 31) + FileName__hashCode_impl_43wak5(this.x2b_1) | 0; | ||
result = imul(result, 31) + this.y2b_1.hashCode() | 0; | ||
var result = getStringHashCode(this.g2c_1); | ||
result = imul(result, 31) + FileName__hashCode_impl_43wak5(this.h2c_1) | 0; | ||
result = imul(result, 31) + this.i2c_1.hashCode() | 0; | ||
return result; | ||
@@ -323,7 +323,7 @@ }; | ||
var tmp0_other_with_cast = other instanceof FullFilePath ? other : THROW_CCE(); | ||
if (!(this.w2b_1 === tmp0_other_with_cast.w2b_1)) | ||
if (!(this.g2c_1 === tmp0_other_with_cast.g2c_1)) | ||
return false; | ||
if (!(this.x2b_1 === tmp0_other_with_cast.x2b_1)) | ||
if (!(this.h2c_1 === tmp0_other_with_cast.h2c_1)) | ||
return false; | ||
if (!this.y2b_1.equals(tmp0_other_with_cast.y2b_1)) | ||
if (!this.i2c_1.equals(tmp0_other_with_cast.i2c_1)) | ||
return false; | ||
@@ -347,3 +347,3 @@ return true; | ||
return false; | ||
if (!($this === (other instanceof FileName ? other.b2c_1 : THROW_CCE()))) | ||
if (!($this === (other instanceof FileName ? other.l2c_1 : THROW_CCE()))) | ||
return false; | ||
@@ -353,15 +353,15 @@ return true; | ||
function FileName(value) { | ||
this.b2c_1 = value; | ||
this.l2c_1 = value; | ||
} | ||
protoOf(FileName).b1 = function () { | ||
return _FileName___get_value__impl__3u4cz6(this.b2c_1); | ||
return _FileName___get_value__impl__3u4cz6(this.l2c_1); | ||
}; | ||
protoOf(FileName).toString = function () { | ||
return FileName__toString_impl_hn9m8q(this.b2c_1); | ||
return FileName__toString_impl_hn9m8q(this.l2c_1); | ||
}; | ||
protoOf(FileName).hashCode = function () { | ||
return FileName__hashCode_impl_43wak5(this.b2c_1); | ||
return FileName__hashCode_impl_43wak5(this.l2c_1); | ||
}; | ||
protoOf(FileName).equals = function (other) { | ||
return FileName__equals_impl_o96ox3(this.b2c_1, other); | ||
return FileName__equals_impl_o96ox3(this.l2c_1, other); | ||
}; | ||
@@ -395,9 +395,9 @@ function Console$read$lambda() { | ||
function FullDirPath(path) { | ||
this.c2c_1 = path; | ||
this.m2c_1 = path; | ||
} | ||
protoOf(FullDirPath).toString = function () { | ||
return 'FullDirPath(path=' + this.c2c_1 + ')'; | ||
return 'FullDirPath(path=' + this.m2c_1 + ')'; | ||
}; | ||
protoOf(FullDirPath).hashCode = function () { | ||
return getStringHashCode(this.c2c_1); | ||
return getStringHashCode(this.m2c_1); | ||
}; | ||
@@ -410,3 +410,3 @@ protoOf(FullDirPath).equals = function (other) { | ||
var tmp0_other_with_cast = other instanceof FullDirPath ? other : THROW_CCE(); | ||
if (!(this.c2c_1 === tmp0_other_with_cast.c2c_1)) | ||
if (!(this.m2c_1 === tmp0_other_with_cast.m2c_1)) | ||
return false; | ||
@@ -424,3 +424,3 @@ return true; | ||
} | ||
protoOf(Companion_1).d2c = function () { | ||
protoOf(Companion_1).n2c = function () { | ||
// Inline function 'kotlin.collections.associateBy' call | ||
@@ -501,6 +501,6 @@ var this_0 = get_entries_0(); | ||
Enum.call(this, name, ordinal); | ||
this.v2b_1 = value; | ||
this.f2c_1 = value; | ||
} | ||
protoOf(FileExtension).b1 = function () { | ||
return this.v2b_1; | ||
return this.f2c_1; | ||
}; | ||
@@ -570,3 +570,3 @@ function Language_Java_getInstance() { | ||
} | ||
protoOf(Companion_2).e2c = function (s) { | ||
protoOf(Companion_2).o2c = function (s) { | ||
var tmp; | ||
@@ -592,3 +592,3 @@ if (s == null) { | ||
return false; | ||
if (!($this === (other instanceof Output ? other.f2c_1 : THROW_CCE()))) | ||
if (!($this === (other instanceof Output ? other.p2c_1 : THROW_CCE()))) | ||
return false; | ||
@@ -598,15 +598,15 @@ return true; | ||
function Output(value) { | ||
this.f2c_1 = value; | ||
this.p2c_1 = value; | ||
} | ||
protoOf(Output).b1 = function () { | ||
return _Output___get_value__impl__a8kw1g(this.f2c_1); | ||
return _Output___get_value__impl__a8kw1g(this.p2c_1); | ||
}; | ||
protoOf(Output).toString = function () { | ||
return Output__toString_impl_r07ygw(this.f2c_1); | ||
return Output__toString_impl_r07ygw(this.p2c_1); | ||
}; | ||
protoOf(Output).hashCode = function () { | ||
return Output__hashCode_impl_m9q6pd(this.f2c_1); | ||
return Output__hashCode_impl_m9q6pd(this.p2c_1); | ||
}; | ||
protoOf(Output).equals = function (other) { | ||
return Output__equals_impl_7y48wd(this.f2c_1, other); | ||
return Output__equals_impl_7y48wd(this.p2c_1, other); | ||
}; | ||
@@ -613,0 +613,0 @@ //region block: init |
@@ -171,3 +171,3 @@ (function (factory) { | ||
var l = function (p0) { | ||
$boundThis.r3q(p0); | ||
$boundThis.a3r(p0); | ||
return Unit_instance; | ||
@@ -180,3 +180,3 @@ }; | ||
} | ||
protoOf(Companion).w42 = function (compile, convert, write) { | ||
protoOf(Companion).f43 = function (compile, convert, write) { | ||
return WirespecCli$main$ref(subcommands(new WirespecCli(), [new Compile_0(compile, write), new Convert_0(convert, write)])); | ||
@@ -192,3 +192,3 @@ }; | ||
function _get_languages__ojonze($this) { | ||
return $this.x43_1.d40($this, languages$factory_0()); | ||
return $this.g44_1.m40($this, languages$factory_0()); | ||
} | ||
@@ -201,12 +201,12 @@ function Compile$run$lambda(e) { | ||
CommonOptions.call(this); | ||
this.v43_1 = block; | ||
this.w43_1 = write; | ||
this.x43_1 = multiple(choice(option(this, Options_Language_getInstance().a44_1.slice(), 'Language'), Companion_instance.d2c()), VOID, true).o40(this, languages$factory()); | ||
this.e44_1 = block; | ||
this.f44_1 = write; | ||
this.g44_1 = multiple(choice(option(this, Options_Language_getInstance().j44_1.slice(), 'Language'), Companion_instance.n2c()), VOID, true).x40(this, languages$factory()); | ||
} | ||
protoOf(Compile_0).s3q = function () { | ||
protoOf(Compile_0).b3r = function () { | ||
// Inline function 'kotlin.collections.forEach' call | ||
// Inline function 'kotlin.let' call | ||
var this_0 = new CompilerArguments(Compile_instance, this.a45(this.z44()), Companion_instance_0.e2c(this.b45()), toSet(_get_languages__ojonze(this)), _PackageName___init__impl__s13tbs(this.c45()), this.e45(this.d45()), this.f45(), this.g45()); | ||
var this_0 = new CompilerArguments(Compile_instance, this.j45(this.i45()), Companion_instance_0.o2c(this.k45()), toSet(_get_languages__ojonze(this)), _PackageName___init__impl__s13tbs(this.l45()), this.n45(this.m45()), this.o45(), this.p45()); | ||
// Inline function 'kotlin.contracts.contract' call | ||
var tmp0_iterator = this.v43_1(this_0).g(); | ||
var tmp0_iterator = this.e44_1(this_0).g(); | ||
while (tmp0_iterator.h()) { | ||
@@ -221,3 +221,3 @@ var element = tmp0_iterator.i(); | ||
var file = destruct.rd(); | ||
this.w43_1(result, file); | ||
this.f44_1(result, file); | ||
} else { | ||
@@ -233,11 +233,11 @@ if (element instanceof Left) { | ||
function _get_format__qlarck($this) { | ||
return $this.h46_1.d40($this, format$factory_0()); | ||
return $this.q46_1.m40($this, format$factory_0()); | ||
} | ||
function _get_languages__ojonze_0($this) { | ||
return $this.i46_1.d40($this, languages$factory_2()); | ||
return $this.r46_1.m40($this, languages$factory_2()); | ||
} | ||
function Convert_0(block, write) { | ||
CommonOptions.call(this); | ||
this.f46_1 = block; | ||
this.g46_1 = write; | ||
this.o46_1 = block; | ||
this.p46_1 = write; | ||
var tmp = this; | ||
@@ -262,7 +262,7 @@ // Inline function 'com.github.ajalt.clikt.parameters.types.enum' call | ||
} | ||
tmp.h46_1 = choice_0(this_0, destination, true).j3z(this, format$factory()); | ||
this.i46_1 = multiple(choice(option(this, Options_Language_getInstance().a44_1.slice(), 'Language'), Companion_instance.d2c(), VOID, true), listOf(Language_Wirespec_getInstance())).o40(this, languages$factory_1()); | ||
tmp.q46_1 = choice_0(this_0, destination, true).s3z(this, format$factory()); | ||
this.r46_1 = multiple(choice(option(this, Options_Language_getInstance().j44_1.slice(), 'Language'), Companion_instance.n2c(), VOID, true), listOf(Language_Wirespec_getInstance())).x40(this, languages$factory_1()); | ||
} | ||
protoOf(Convert_0).s3q = function () { | ||
if (this.z44() == null) | ||
protoOf(Convert_0).b3r = function () { | ||
if (this.i45() == null) | ||
null; | ||
@@ -272,3 +272,3 @@ else { | ||
// Inline function 'kotlin.contracts.contract' call | ||
this.l3q('To convert, please specify a file', VOID, true); | ||
this.u3q('To convert, please specify a file', VOID, true); | ||
} | ||
@@ -278,4 +278,4 @@ // Inline function 'kotlin.collections.forEach' call | ||
var tmp = new Convert(_get_format__qlarck(this)); | ||
var tmp_0 = this.a45(null); | ||
var tmp_1 = Companion_instance_0.e2c(this.b45()); | ||
var tmp_0 = this.j45(null); | ||
var tmp_1 = Companion_instance_0.o2c(this.k45()); | ||
// Inline function 'kotlin.collections.ifEmpty' call | ||
@@ -292,5 +292,5 @@ var this_0 = toSet(_get_languages__ojonze_0(this)); | ||
var tmp$ret$2 = tmp_2; | ||
var this_1 = new CompilerArguments(tmp, tmp_0, tmp_1, tmp$ret$2, _PackageName___init__impl__s13tbs(this.c45()), this.e45(this.d45()), this.f45(), this.g45()); | ||
var this_1 = new CompilerArguments(tmp, tmp_0, tmp_1, tmp$ret$2, _PackageName___init__impl__s13tbs(this.l45()), this.n45(this.m45()), this.o45(), this.p45()); | ||
// Inline function 'kotlin.contracts.contract' call | ||
var tmp0_iterator = this.f46_1(this_1).g(); | ||
var tmp0_iterator = this.o46_1(this_1).g(); | ||
while (tmp0_iterator.h()) { | ||
@@ -305,6 +305,6 @@ var element = tmp0_iterator.i(); | ||
var file = destruct.rd(); | ||
this.g46_1(result, file); | ||
this.p46_1(result, file); | ||
} else { | ||
if (element instanceof Left) { | ||
this.l3q(element.uj_1, VOID, true); | ||
this.u3q(element.uj_1, VOID, true); | ||
} else { | ||
@@ -317,33 +317,33 @@ noWhenBranchMatchedException(); | ||
function _get_inputFile__x1bqj($this) { | ||
return $this.s44_1.d40($this, inputFile$factory_0()); | ||
return $this.b45_1.m40($this, inputFile$factory_0()); | ||
} | ||
function CommonOptions() { | ||
CliktCommand.call(this); | ||
this.s44_1 = option(this, Options_InputFile_getInstance().a44_1.slice(), 'Input file').o40(this, inputFile$factory()); | ||
this.t44_1 = option(this, Options_InputDir_getInstance().a44_1.slice(), 'Input directory').o40(this, inputDir$factory()); | ||
this.u44_1 = option(this, Options_OutputDir_getInstance().a44_1.slice(), 'Output directory').o40(this, outputDir$factory()); | ||
this.v44_1 = default_0(option(this, Options_PackageName_getInstance().a44_1.slice(), 'Package name'), 'community.flock.wirespec.generated').o40(this, packageName$factory()); | ||
this.w44_1 = default_0(option(this, Options_LogLevel_getInstance().a44_1.slice(), 'Log level: ' + Companion_instance_1.toString()), Level_ERROR_getInstance().toString()).o40(this, logLevel$factory()); | ||
this.x44_1 = flag(option(this, Options_Shared_getInstance().a44_1.slice(), 'Generate shared wirespec code'), [], false).o40(this, shared$factory()); | ||
this.y44_1 = flag(option(this, Options_Strict_getInstance().a44_1.slice(), 'Strict mode'), []).o40(this, strict$factory()); | ||
this.b45_1 = option(this, Options_InputFile_getInstance().j44_1.slice(), 'Input file').x40(this, inputFile$factory()); | ||
this.c45_1 = option(this, Options_InputDir_getInstance().j44_1.slice(), 'Input directory').x40(this, inputDir$factory()); | ||
this.d45_1 = option(this, Options_OutputDir_getInstance().j44_1.slice(), 'Output directory').x40(this, outputDir$factory()); | ||
this.e45_1 = default_0(option(this, Options_PackageName_getInstance().j44_1.slice(), 'Package name'), 'community.flock.wirespec.generated').x40(this, packageName$factory()); | ||
this.f45_1 = default_0(option(this, Options_LogLevel_getInstance().j44_1.slice(), 'Log level: ' + Companion_instance_1.toString()), Level_ERROR_getInstance().toString()).x40(this, logLevel$factory()); | ||
this.g45_1 = flag(option(this, Options_Shared_getInstance().j44_1.slice(), 'Generate shared wirespec code'), [], false).x40(this, shared$factory()); | ||
this.h45_1 = flag(option(this, Options_Strict_getInstance().j44_1.slice(), 'Strict mode'), []).x40(this, strict$factory()); | ||
} | ||
protoOf(CommonOptions).z44 = function () { | ||
return this.t44_1.d40(this, inputDir$factory_0()); | ||
protoOf(CommonOptions).i45 = function () { | ||
return this.c45_1.m40(this, inputDir$factory_0()); | ||
}; | ||
protoOf(CommonOptions).b45 = function () { | ||
return this.u44_1.d40(this, outputDir$factory_0()); | ||
protoOf(CommonOptions).k45 = function () { | ||
return this.d45_1.m40(this, outputDir$factory_0()); | ||
}; | ||
protoOf(CommonOptions).c45 = function () { | ||
return this.v44_1.d40(this, packageName$factory_0()); | ||
protoOf(CommonOptions).l45 = function () { | ||
return this.e45_1.m40(this, packageName$factory_0()); | ||
}; | ||
protoOf(CommonOptions).d45 = function () { | ||
return this.w44_1.d40(this, logLevel$factory_0()); | ||
protoOf(CommonOptions).m45 = function () { | ||
return this.f45_1.m40(this, logLevel$factory_0()); | ||
}; | ||
protoOf(CommonOptions).f45 = function () { | ||
return this.x44_1.d40(this, shared$factory_0()); | ||
protoOf(CommonOptions).o45 = function () { | ||
return this.g45_1.m40(this, shared$factory_0()); | ||
}; | ||
protoOf(CommonOptions).g45 = function () { | ||
return this.y44_1.d40(this, strict$factory_0()); | ||
protoOf(CommonOptions).p45 = function () { | ||
return this.h45_1.m40(this, strict$factory_0()); | ||
}; | ||
protoOf(CommonOptions).a45 = function (inputDir) { | ||
protoOf(CommonOptions).j45 = function (inputDir) { | ||
var tmp; | ||
@@ -360,3 +360,3 @@ if (!(inputDir == null) && !(_get_inputFile__x1bqj(this) == null)) { | ||
// Inline function 'kotlin.contracts.contract' call | ||
tmp_0 = Companion_instance_2.s2b(tmp0_safe_receiver); | ||
tmp_0 = Companion_instance_2.c2c(tmp0_safe_receiver); | ||
} | ||
@@ -383,3 +383,3 @@ var tmp1_elvis_lhs = tmp_0; | ||
}; | ||
protoOf(CommonOptions).e45 = function (_this__u8e3s4) { | ||
protoOf(CommonOptions).n45 = function (_this__u8e3s4) { | ||
// Inline function 'kotlin.text.uppercase' call | ||
@@ -431,3 +431,3 @@ // Inline function 'kotlin.text.trim' call | ||
Enum.call(this, name, ordinal); | ||
this.a44_1 = flags; | ||
this.j44_1 = flags; | ||
} | ||
@@ -503,3 +503,3 @@ function Options_InputDir_getInstance() { | ||
return getPropertyCallableRef('inputDir', 1, KProperty1, function (receiver) { | ||
return receiver.z44(); | ||
return receiver.i45(); | ||
}, null); | ||
@@ -509,3 +509,3 @@ } | ||
return getPropertyCallableRef('outputDir', 1, KProperty1, function (receiver) { | ||
return receiver.b45(); | ||
return receiver.k45(); | ||
}, null); | ||
@@ -515,3 +515,3 @@ } | ||
return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) { | ||
return receiver.c45(); | ||
return receiver.l45(); | ||
}, null); | ||
@@ -521,3 +521,3 @@ } | ||
return getPropertyCallableRef('logLevel', 1, KProperty1, function (receiver) { | ||
return receiver.d45(); | ||
return receiver.m45(); | ||
}, null); | ||
@@ -527,3 +527,3 @@ } | ||
return getPropertyCallableRef('shared', 1, KProperty1, function (receiver) { | ||
return receiver.f45(); | ||
return receiver.o45(); | ||
}, null); | ||
@@ -533,3 +533,3 @@ } | ||
return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) { | ||
return receiver.g45(); | ||
return receiver.p45(); | ||
}, null); | ||
@@ -544,3 +544,3 @@ } | ||
return getPropertyCallableRef('inputDir', 1, KProperty1, function (receiver) { | ||
return receiver.z44(); | ||
return receiver.i45(); | ||
}, null); | ||
@@ -550,3 +550,3 @@ } | ||
return getPropertyCallableRef('outputDir', 1, KProperty1, function (receiver) { | ||
return receiver.b45(); | ||
return receiver.k45(); | ||
}, null); | ||
@@ -556,3 +556,3 @@ } | ||
return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) { | ||
return receiver.c45(); | ||
return receiver.l45(); | ||
}, null); | ||
@@ -562,3 +562,3 @@ } | ||
return getPropertyCallableRef('logLevel', 1, KProperty1, function (receiver) { | ||
return receiver.d45(); | ||
return receiver.m45(); | ||
}, null); | ||
@@ -568,3 +568,3 @@ } | ||
return getPropertyCallableRef('shared', 1, KProperty1, function (receiver) { | ||
return receiver.f45(); | ||
return receiver.o45(); | ||
}, null); | ||
@@ -574,3 +574,3 @@ } | ||
return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) { | ||
return receiver.g45(); | ||
return receiver.p45(); | ||
}, null); | ||
@@ -609,11 +609,11 @@ } | ||
// Inline function 'kotlin.contracts.contract' call | ||
tmp.w42(tmp_0, tmp_1, write$ref())(this_1); | ||
tmp.f43(tmp_0, tmp_1, write$ref())(this_1); | ||
} | ||
function compile_0(arguments_0) { | ||
var input = arguments_0.j2b_1; | ||
var output = arguments_0.k2b_1; | ||
var languages = arguments_0.l2b_1; | ||
var packageName = arguments_0.m2b_1; | ||
var logger = new Logger(arguments_0.n2b_1); | ||
var operation = arguments_0.i2b_1; | ||
var input = arguments_0.t2b_1; | ||
var output = arguments_0.u2b_1; | ||
var languages = arguments_0.v2b_1; | ||
var packageName = arguments_0.w2b_1; | ||
var logger = new Logger(arguments_0.x2b_1); | ||
var operation = arguments_0.s2b_1; | ||
var tmp; | ||
@@ -623,11 +623,11 @@ if (operation instanceof Convert) { | ||
var file = new JsonFile(fullPath); | ||
var strict = arguments_0.p2b_1; | ||
var format = operation.r2b_1; | ||
var strict = arguments_0.z2b_1; | ||
var format = operation.b2c_1; | ||
var tmp_0; | ||
switch (format.q2_1) { | ||
case 0: | ||
tmp_0 = OpenApiV2Parser_instance.n2a(file.z1a(), !strict); | ||
tmp_0 = OpenApiV2Parser_instance.x2a(file.z1a(), !strict); | ||
break; | ||
case 1: | ||
tmp_0 = OpenApiV3Parser_instance.n2a(file.z1a(), !strict); | ||
tmp_0 = OpenApiV3Parser_instance.x2a(file.z1a(), !strict); | ||
break; | ||
@@ -655,3 +655,3 @@ default: | ||
// Inline function 'kotlin.text.replaceFirstChar' call | ||
var this_1 = _FileName___get_value__impl__3u4cz6(fullPath.x2b_1); | ||
var this_1 = _FileName___get_value__impl__3u4cz6(fullPath.h2c_1); | ||
var tmp_2; | ||
@@ -674,3 +674,3 @@ // Inline function 'kotlin.text.isNotEmpty' call | ||
var tmp$ret$7 = tmp_2; | ||
tmp_1 = to(listOf(new Emitted(tmp$ret$7, first(results).p25_1)), file_0); | ||
tmp_1 = to(listOf(new Emitted(tmp$ret$7, first(results).t25_1)), file_0); | ||
} else { | ||
@@ -701,3 +701,3 @@ tmp_1 = to(results, file_0); | ||
// Inline function 'kotlin.collections.flatMapTo' call | ||
var this_3 = (new Directory(input.c2c_1)).l46(); | ||
var this_3 = (new Directory(input.m2c_1)).u46(); | ||
var destination_1 = ArrayList_init_$Create$(); | ||
@@ -708,3 +708,3 @@ var tmp0_iterator_1 = this_3.g(); | ||
// Inline function 'community.flock.wirespec.plugin.cli.compile.<anonymous>' call | ||
var list = wirespec(element, languages, packageName, out(element.j46_1, packageName, output), logger); | ||
var list = wirespec(element, languages, packageName, out(element.s46_1, packageName, output), logger); | ||
addAll(destination_1, list); | ||
@@ -716,3 +716,3 @@ } | ||
var tmp_5; | ||
if (input.y2b_1.equals(FileExtension_Wirespec_getInstance())) { | ||
if (input.i2c_1.equals(FileExtension_Wirespec_getInstance())) { | ||
// Inline function 'kotlin.let' call | ||
@@ -722,3 +722,3 @@ // Inline function 'kotlin.contracts.contract' call | ||
var it = new WirespecFile(input); | ||
tmp_5 = wirespec(it, languages, packageName, out(it.j46_1, packageName, output), logger); | ||
tmp_5 = wirespec(it, languages, packageName, out(it.s46_1, packageName, output), logger); | ||
} else { | ||
@@ -756,3 +756,3 @@ // Inline function 'arrow.core.nel' call | ||
var result = element.rd(); | ||
var tmp1_safe_receiver = file == null ? null : file.m46(_FileName___init__impl__nzn12e(name)); | ||
var tmp1_safe_receiver = file == null ? null : file.v46(_FileName___init__impl__nzn12e(name)); | ||
var tmp; | ||
@@ -923,3 +923,3 @@ if (tmp1_safe_receiver == null) { | ||
var it = results.ak_1; | ||
var tmp$ret$2 = listOf(new Emitted(Companion_getInstance().m24(_FileName___get_value__impl__3u4cz6(path(FileExtension_Wirespec_getInstance()).x2b_1)), first(it).p25_1)); | ||
var tmp$ret$2 = listOf(new Emitted(Companion_getInstance().q24(_FileName___get_value__impl__3u4cz6(path(FileExtension_Wirespec_getInstance()).h2c_1)), first(it).t25_1)); | ||
tmp_0 = new Right(tmp$ret$2); | ||
@@ -997,3 +997,3 @@ } else { | ||
var tmp = $output; | ||
return new FullFilePath(_Output___get_value__impl__a8kw1g(ensureNotNull(tmp == null ? null : new Output(tmp)).f2c_1), _FileName___init__impl__nzn12e('console'), it); | ||
return new FullFilePath(_Output___get_value__impl__a8kw1g(ensureNotNull(tmp == null ? null : new Output(tmp)).p2c_1), _FileName___init__impl__nzn12e('console'), it); | ||
}; | ||
@@ -1010,3 +1010,3 @@ } | ||
var tmp$ret$1 = extension.p2_1.toLowerCase(); | ||
tmp = $this_out.w2b_1 + '/out/' + tmp$ret$1; | ||
tmp = $this_out.g2c_1 + '/out/' + tmp$ret$1; | ||
} else { | ||
@@ -1016,40 +1016,40 @@ tmp = new Output(tmp0_elvis_lhs); | ||
var dir = tmp; | ||
return $this_out.a2c(toString(dir) + '/' + joinToString(split(_PackageName___get_value__impl__2zr98c($packageName), charArrayOf([_Char___init__impl__6a9atx(46)])), '/'), VOID, extension); | ||
return $this_out.k2c(toString(dir) + '/' + joinToString(split(_PackageName___get_value__impl__2zr98c($packageName), charArrayOf([_Char___init__impl__6a9atx(46)])), '/'), VOID, extension); | ||
}; | ||
} | ||
function JavaFile(path) { | ||
File.call(this, path.a2c(VOID, VOID, FileExtension_Java_getInstance())); | ||
File.call(this, path.k2c(VOID, VOID, FileExtension_Java_getInstance())); | ||
} | ||
protoOf(JavaFile).m46 = function (fileName) { | ||
return new JavaFile(this.j46_1.a2c(VOID, fileName)); | ||
protoOf(JavaFile).v46 = function (fileName) { | ||
return new JavaFile(this.s46_1.k2c(VOID, fileName)); | ||
}; | ||
function JsonFile(path) { | ||
File.call(this, path.a2c(VOID, VOID, FileExtension_Json_getInstance())); | ||
File.call(this, path.k2c(VOID, VOID, FileExtension_Json_getInstance())); | ||
} | ||
protoOf(JsonFile).m46 = function (fileName) { | ||
return new JsonFile(this.j46_1.a2c(VOID, fileName)); | ||
protoOf(JsonFile).v46 = function (fileName) { | ||
return new JsonFile(this.s46_1.k2c(VOID, fileName)); | ||
}; | ||
function KotlinFile(path) { | ||
File.call(this, path.a2c(VOID, VOID, FileExtension_Kotlin_getInstance())); | ||
File.call(this, path.k2c(VOID, VOID, FileExtension_Kotlin_getInstance())); | ||
} | ||
protoOf(KotlinFile).m46 = function (fileName) { | ||
return new KotlinFile(this.j46_1.a2c(VOID, fileName)); | ||
protoOf(KotlinFile).v46 = function (fileName) { | ||
return new KotlinFile(this.s46_1.k2c(VOID, fileName)); | ||
}; | ||
function ScalaFile(path) { | ||
File.call(this, path.a2c(VOID, VOID, FileExtension_Scala_getInstance())); | ||
File.call(this, path.k2c(VOID, VOID, FileExtension_Scala_getInstance())); | ||
} | ||
protoOf(ScalaFile).m46 = function (fileName) { | ||
return new ScalaFile(this.j46_1.a2c(VOID, fileName)); | ||
protoOf(ScalaFile).v46 = function (fileName) { | ||
return new ScalaFile(this.s46_1.k2c(VOID, fileName)); | ||
}; | ||
function TypeScriptFile(path) { | ||
File.call(this, path.a2c(VOID, VOID, FileExtension_TypeScript_getInstance())); | ||
File.call(this, path.k2c(VOID, VOID, FileExtension_TypeScript_getInstance())); | ||
} | ||
protoOf(TypeScriptFile).m46 = function (fileName) { | ||
return new TypeScriptFile(this.j46_1.a2c(VOID, fileName)); | ||
protoOf(TypeScriptFile).v46 = function (fileName) { | ||
return new TypeScriptFile(this.s46_1.k2c(VOID, fileName)); | ||
}; | ||
function WirespecFile(path) { | ||
File.call(this, path.a2c(VOID, VOID, FileExtension_Wirespec_getInstance())); | ||
File.call(this, path.k2c(VOID, VOID, FileExtension_Wirespec_getInstance())); | ||
} | ||
protoOf(WirespecFile).m46 = function (fileName) { | ||
return new WirespecFile(this.j46_1.a2c(VOID, fileName)); | ||
protoOf(WirespecFile).v46 = function (fileName) { | ||
return new WirespecFile(this.s46_1.k2c(VOID, fileName)); | ||
}; | ||
@@ -1117,10 +1117,10 @@ function cli(args) { | ||
function Directory$wirespecFiles$lambda_0(it) { | ||
return endsWith(it, FileExtension_Wirespec_getInstance().v2b_1); | ||
return endsWith(it, FileExtension_Wirespec_getInstance().f2c_1); | ||
} | ||
function Directory$wirespecFiles$lambda_1(it) { | ||
return dropLast(it, FileExtension_Wirespec_getInstance().v2b_1.length + 1 | 0); | ||
return dropLast(it, FileExtension_Wirespec_getInstance().f2c_1.length + 1 | 0); | ||
} | ||
function Directory$wirespecFiles$lambda_2(this$0) { | ||
return function (it) { | ||
return new FullFilePath(this$0.k46_1, _FileName___init__impl__nzn12e(it)); | ||
return new FullFilePath(this$0.t46_1, _FileName___init__impl__nzn12e(it)); | ||
}; | ||
@@ -1136,6 +1136,6 @@ } | ||
function Directory(path) { | ||
this.k46_1 = path; | ||
this.t46_1 = path; | ||
} | ||
protoOf(Directory).l46 = function () { | ||
var tmp = asSequence(iterator(get_fs().readdirSync(this.k46_1, 'utf-8'))); | ||
protoOf(Directory).u46 = function () { | ||
var tmp = asSequence(iterator(get_fs().readdirSync(this.t46_1, 'utf-8'))); | ||
var tmp_0 = map(tmp, Directory$wirespecFiles$lambda); | ||
@@ -1148,7 +1148,7 @@ var tmp_1 = filter(tmp_0, Directory$wirespecFiles$lambda_0); | ||
function File(path) { | ||
this.j46_1 = path; | ||
this.s46_1 = path; | ||
} | ||
protoOf(File).z1a = function () { | ||
// Inline function 'kotlin.js.unsafeCast' call | ||
return get_fs().readFileSync(this.j46_1.toString(), 'utf-8'); | ||
return get_fs().readFileSync(this.s46_1.toString(), 'utf-8'); | ||
}; | ||
@@ -1159,6 +1159,6 @@ protoOf(File).t18 = function (string) { | ||
// Inline function 'community.flock.wirespec.plugin.cli.io.File.write.<anonymous>' call | ||
var $this$run = this.j46_1.a2c(joinToString(split_0(this.j46_1.w2b_1, ['out']), 'out/node')); | ||
var $this$run = this.s46_1.k2c(joinToString(split_0(this.s46_1.g2c_1, ['out']), 'out/node')); | ||
// Inline function 'kotlin.js.unsafeCast' call | ||
if (!get_fs().existsSync($this$run.w2b_1)) { | ||
get_fs().mkdirSync($this$run.w2b_1, {recursive: true}); | ||
if (!get_fs().existsSync($this$run.g2c_1)) { | ||
get_fs().mkdirSync($this$run.g2c_1, {recursive: true}); | ||
} | ||
@@ -1165,0 +1165,0 @@ get_fs().writeFileSync($this$run.toString(), string); |
@@ -197,6 +197,6 @@ (function (factory) { | ||
case 0: | ||
tmp = produce_1(OpenApiV2Parser_instance.p2a(source)); | ||
tmp = produce_1(OpenApiV2Parser_instance.z2a(source)); | ||
break; | ||
case 1: | ||
tmp = produce_1(OpenApiV3Parser_instance.h2b(source)); | ||
tmp = produce_1(OpenApiV3Parser_instance.r2b(source)); | ||
break; | ||
@@ -285,3 +285,3 @@ default: | ||
var item_0 = tmp0_iterator.i(); | ||
var tmp$ret$3 = tmp1_map_$receiver.a2a(item_0); | ||
var tmp$ret$3 = tmp1_map_$receiver.k2a(item_0); | ||
destination_0.e(tmp$ret$3); | ||
@@ -328,3 +328,3 @@ } | ||
// Inline function 'community.flock.wirespec.plugin.npm.emit.<anonymous>.<anonymous>' call | ||
var tmp$ret$11 = OpenApiV3Emitter_getInstance().t2a(item_3, null); | ||
var tmp$ret$11 = OpenApiV3Emitter_getInstance().d2b(item_3, null); | ||
destination_3.e(tmp$ret$11); | ||
@@ -331,0 +331,0 @@ } |
@@ -85,3 +85,3 @@ (function (factory) { | ||
if (ref instanceof Primitive) { | ||
var tmp1_subject = ref.j23_1; | ||
var tmp1_subject = ref.n23_1; | ||
var tmp_0; | ||
@@ -108,3 +108,3 @@ if (tmp1_subject instanceof Integer) { | ||
// Inline function 'kotlin.contracts.contract' call | ||
var p0_2 = Companion_instance.t46('\\w{1,50}').c47(random); | ||
var p0_2 = Companion_instance.c47('\\w{1,50}').l47(random); | ||
tmp_0 = JsonPrimitive(p0_2); | ||
@@ -121,3 +121,3 @@ } | ||
var it = resolveReference(_this__u8e3s4, ref); | ||
tmp = ref.w22_1 ? generateIterator(_this__u8e3s4, it, random) : generateObject(_this__u8e3s4, it, random); | ||
tmp = ref.a23_1 ? generateIterator(_this__u8e3s4, it, random) : generateObject(_this__u8e3s4, it, random); | ||
} else { | ||
@@ -205,3 +205,3 @@ if (ref instanceof Unit) { | ||
// Inline function 'community.flock.wirespec.generator.resolveReference.<anonymous>' call | ||
if (element_0.m28().b1() === type.b1()) { | ||
if (element_0.s28().b1() === type.b1()) { | ||
tmp$ret$3 = element_0; | ||
@@ -230,3 +230,3 @@ break $l$block; | ||
// Inline function 'kotlin.collections.fold' call | ||
var this_0 = def.a23_1.t25_1; | ||
var this_0 = def.e23_1.x25_1; | ||
var accumulator = emptyMap(); | ||
@@ -241,3 +241,3 @@ var tmp0_iterator = this_0.g(); | ||
// Inline function 'community.flock.wirespec.generator.generateType.<anonymous>.<anonymous>.<anonymous>' call | ||
var value = element.n24_1.b1(); | ||
var value = element.r24_1.b1(); | ||
// Inline function 'kotlin.text.sumOf' call | ||
@@ -256,3 +256,3 @@ var sum = 0; | ||
var fieldRandom = Random(fieldSeed); | ||
accumulator = plus(acc, to(value, generateReference(_this__u8e3s4, element.o24_1, fieldRandom))); | ||
accumulator = plus(acc, to(value, generateReference(_this__u8e3s4, element.s24_1, fieldRandom))); | ||
} | ||
@@ -266,3 +266,3 @@ // Inline function 'kotlin.contracts.contract' call | ||
// Inline function 'kotlin.contracts.contract' call | ||
var p0 = randomRegex(def.f25_1.w25_1, random); | ||
var p0 = randomRegex(def.j25_1.a26_1, random); | ||
return JsonPrimitive(p0); | ||
@@ -273,6 +273,6 @@ } | ||
// Inline function 'kotlin.let' call | ||
var this_0 = random.sf(def.i25_1.j()); | ||
var this_0 = random.sf(def.m25_1.j()); | ||
// Inline function 'kotlin.contracts.contract' call | ||
// Inline function 'kotlin.contracts.contract' call | ||
var p0 = toList(def.i25_1).k(this_0); | ||
var p0 = toList(def.m25_1).k(this_0); | ||
return JsonPrimitive(p0); | ||
@@ -283,7 +283,7 @@ } | ||
// Inline function 'kotlin.let' call | ||
var this_0 = random.sf(def.u22_1.j()); | ||
var this_0 = random.sf(def.y22_1.j()); | ||
// Inline function 'kotlin.contracts.contract' call | ||
// Inline function 'kotlin.contracts.contract' call | ||
// Inline function 'community.flock.wirespec.generator.generateUnion.<anonymous>' call | ||
var it = toList(def.u22_1).k(this_0); | ||
var it = toList(def.y22_1).k(this_0); | ||
return generate_0(_this__u8e3s4, it, random); | ||
@@ -297,3 +297,3 @@ } | ||
var tmp$ret$1 = regex.substring(1, endIndex); | ||
return tmp.t46(tmp$ret$1).c47(random); | ||
return tmp.c47(tmp$ret$1).l47(random); | ||
} | ||
@@ -300,0 +300,0 @@ //region block: exports |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
5857089
90794