@flock/wirespec 0.10.12 → 0.10.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/kotlin-kotlin-stdlib.js +15 -15
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/package.json +1 -1
- package/wirespec-src-compiler-core.js +21 -9
- package/wirespec-src-compiler-core.js.map +1 -1
- package/wirespec-src-converter-openapi.js +163 -137
- package/wirespec-src-converter-openapi.js.map +1 -1
package/package.json
CHANGED
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
var first = kotlin_kotlin.$_$.qc;
|
|
49
49
|
var Char = kotlin_kotlin.$_$.se;
|
|
50
50
|
var distinct = kotlin_kotlin.$_$.y5;
|
|
51
|
+
var HashSet_init_$Create$ = kotlin_kotlin.$_$.r;
|
|
51
52
|
var trimMargin = kotlin_kotlin.$_$.me;
|
|
52
53
|
var listOfNotNull = kotlin_kotlin.$_$.f7;
|
|
53
54
|
var split = kotlin_kotlin.$_$.od;
|
|
@@ -67,7 +68,6 @@
|
|
|
67
68
|
var dropLast = kotlin_kotlin.$_$.kc;
|
|
68
69
|
var replace = kotlin_kotlin.$_$.jd;
|
|
69
70
|
var first_0 = kotlin_kotlin.$_$.h6;
|
|
70
|
-
var HashSet_init_$Create$ = kotlin_kotlin.$_$.r;
|
|
71
71
|
var trimIndent = kotlin_kotlin.$_$.le;
|
|
72
72
|
var prependIndent = kotlin_kotlin.$_$.ed;
|
|
73
73
|
var toSet = kotlin_kotlin.$_$.p8;
|
|
@@ -623,15 +623,27 @@
|
|
|
623
623
|
}
|
|
624
624
|
function emitResponseInterfaces(_this__u8e3s4, $this) {
|
|
625
625
|
// Inline function 'kotlin.collections.map' call
|
|
626
|
+
// Inline function 'kotlin.collections.distinctBy' call
|
|
626
627
|
var this_0 = _this__u8e3s4.u23_1;
|
|
627
|
-
|
|
628
|
-
var
|
|
628
|
+
var set = HashSet_init_$Create$();
|
|
629
|
+
var list = ArrayList_init_$Create$();
|
|
629
630
|
var tmp0_iterator = this_0.g();
|
|
630
631
|
while (tmp0_iterator.h()) {
|
|
631
|
-
var
|
|
632
|
+
var e = tmp0_iterator.i();
|
|
632
633
|
// Inline function 'community.flock.wirespec.compiler.core.emit.JavaEmitter.emitResponseInterfaces.<anonymous>' call
|
|
633
|
-
var
|
|
634
|
-
|
|
634
|
+
var key = e.v23_1;
|
|
635
|
+
if (set.e(key)) {
|
|
636
|
+
list.e(e);
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
640
|
+
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(list, 10));
|
|
641
|
+
var tmp0_iterator_0 = list.g();
|
|
642
|
+
while (tmp0_iterator_0.h()) {
|
|
643
|
+
var item = tmp0_iterator_0.i();
|
|
644
|
+
// Inline function 'community.flock.wirespec.compiler.core.emit.JavaEmitter.emitResponseInterfaces.<anonymous>' call
|
|
645
|
+
var tmp$ret$2 = emit_1(item.x23_1, $this);
|
|
646
|
+
destination.e(tmp$ret$2);
|
|
635
647
|
}
|
|
636
648
|
var tmp = distinct(destination);
|
|
637
649
|
return joinToString(tmp, '\n', VOID, VOID, VOID, VOID, JavaEmitter$emitResponseInterfaces$lambda);
|
|
@@ -783,8 +795,8 @@
|
|
|
783
795
|
function emitDeserialized_1(_this__u8e3s4, $this, fields) {
|
|
784
796
|
return Spacer_instance.z23(4) + 'java.util.Optional.ofNullable(request.' + fields + '().get("' + _this__u8e3s4.i24_1.b1() + '")).map(it -> serialization.<' + $this.o24(_this__u8e3s4.j24_1) + '>deserialize(it, Wirespec.getType(' + emitType$default(_this__u8e3s4.j24_1, $this) + '.class, ' + _this__u8e3s4.j24_1.e24() + ')))' + (!_this__u8e3s4.k24_1 ? '.get()' : '');
|
|
785
797
|
}
|
|
786
|
-
function
|
|
787
|
-
return 'java.util.Map.entry("' + _this__u8e3s4.i24_1.b1() + '", serialization.serialize(
|
|
798
|
+
function emitSerializedHeader(_this__u8e3s4, $this) {
|
|
799
|
+
return 'java.util.Map.entry("' + _this__u8e3s4.i24_1.b1() + '", serialization.serialize(r.getHeaders().' + $this.l24(_this__u8e3s4.i24_1) + '(), Wirespec.getType(' + emitType$default(_this__u8e3s4.j24_1, $this) + '.class, ' + _this__u8e3s4.j24_1.e24() + ')))';
|
|
788
800
|
}
|
|
789
801
|
function emitIdentifier(_this__u8e3s4, $this) {
|
|
790
802
|
return 'serialization.serialize(request.path.' + Companion_getInstance_3().p24($this.l24(_this__u8e3s4.m24_1)) + ', Wirespec.getType(' + emitType$default(_this__u8e3s4.n24_1, $this) + '.class, ' + _this__u8e3s4.n24_1.e24() + '))';
|
|
@@ -1014,7 +1026,7 @@
|
|
|
1014
1026
|
}
|
|
1015
1027
|
function JavaEmitter$emitSerialized$lambda(this$0) {
|
|
1016
1028
|
return function (it) {
|
|
1017
|
-
return
|
|
1029
|
+
return emitSerializedHeader(it, this$0);
|
|
1018
1030
|
};
|
|
1019
1031
|
}
|
|
1020
1032
|
function JavaEmitter$sanitizeSymbol$lambda(it) {
|