@flock/wirespec 0.17.20 → 0.18.1-RC.2
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/arrow-arrow-annotations.mjs.map +1 -1
- package/arrow-arrow-atomic.mjs +13 -13
- package/arrow-arrow-atomic.mjs.map +1 -1
- package/arrow-arrow-core.mjs +588 -431
- package/arrow-arrow-core.mjs.map +1 -1
- package/arrow-arrow-exception-utils.mjs +30 -0
- package/arrow-arrow-exception-utils.mjs.map +1 -0
- package/clikt-clikt-mordant.mjs +318 -0
- package/clikt-clikt-mordant.mjs.map +1 -0
- package/clikt-clikt.mjs +3834 -3696
- package/clikt-clikt.mjs.map +1 -1
- package/colormath-root-colormath.mjs +619 -682
- package/colormath-root-colormath.mjs.map +1 -1
- package/kotlin-js-core.mjs +4 -0
- package/kotlin-js-core.mjs.map +1 -0
- package/kotlin-js.mjs +4 -0
- package/kotlin-js.mjs.map +1 -0
- package/kotlin-kotlin-stdlib.mjs +6284 -5825
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +8163 -8198
- package/kotlin-openapi-bindings.mjs.map +1 -1
- package/kotlin-plugins-js-plain-objects-runtime.mjs +4 -0
- package/kotlin-plugins-js-plain-objects-runtime.mjs.map +1 -0
- package/kotlin-rgxgen.mjs +2007 -2062
- package/kotlin-rgxgen.mjs.map +1 -1
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs.map +1 -1
- package/kotlinx-atomicfu.mjs +4 -0
- package/kotlinx-atomicfu.mjs.map +1 -0
- package/kotlinx-coroutines-core.mjs +4 -0
- package/kotlinx-coroutines-core.mjs.map +1 -0
- package/kotlinx-io-kotlinx-io-bytestring.mjs.map +1 -1
- package/kotlinx-io-kotlinx-io-core.mjs +803 -839
- package/kotlinx-io-kotlinx-io-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +2483 -2553
- package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1861 -1928
- package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/mordant-mordant-omnibus.mjs +4 -0
- package/mordant-mordant-omnibus.mjs.map +1 -0
- package/mordant-mordant.mjs +2525 -4426
- package/mordant-mordant.mjs.map +1 -1
- package/package.json +4 -7
- package/seskar-core.mjs +4 -0
- package/seskar-core.mjs.map +1 -0
- package/wirespec-bin.mjs +13 -1
- package/wirespec-fetch.d.ts +4 -1
- package/wirespec-fetch.mjs +34 -0
- package/wirespec-serialization.d.ts +13 -2
- package/wirespec-serialization.mjs +22 -1
- package/wirespec-src-compiler-core.mjs +2857 -3909
- package/wirespec-src-compiler-core.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-java.mjs +1370 -413
- package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-kotlin.mjs +1015 -337
- package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-python.mjs +1465 -387
- package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-rust.mjs +2461 -0
- package/wirespec-src-compiler-emitters-rust.mjs.map +1 -0
- package/wirespec-src-compiler-emitters-scala.mjs +1010 -0
- package/wirespec-src-compiler-emitters-scala.mjs.map +1 -0
- package/wirespec-src-compiler-emitters-typescript.mjs +1533 -450
- package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-wirespec.mjs +122 -144
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-ir.mjs +17369 -0
- package/wirespec-src-compiler-ir.mjs.map +1 -0
- package/wirespec-src-compiler-lib.mjs +662 -728
- package/wirespec-src-compiler-lib.mjs.map +1 -1
- package/wirespec-src-converter-avro.mjs +630 -656
- package/wirespec-src-converter-avro.mjs.map +1 -1
- package/wirespec-src-converter-common.mjs.map +1 -1
- package/wirespec-src-converter-openapi.mjs +1705 -2024
- package/wirespec-src-converter-openapi.mjs.map +1 -1
- package/wirespec-src-plugin-arguments.mjs +418 -459
- package/wirespec-src-plugin-arguments.mjs.map +1 -1
- package/wirespec-src-plugin-cli.mjs +367 -331
- package/wirespec-src-plugin-cli.mjs.map +1 -1
- package/{wirespec-src-plugin-npm.d.ts → wirespec-src-plugin-npm.d.mts} +247 -0
- package/wirespec-src-plugin-npm.mjs +166 -359
- package/wirespec-src-plugin-npm.mjs.map +1 -1
- package/wirespec-src-tools-generator.mjs +79 -106
- package/wirespec-src-tools-generator.mjs.map +1 -1
- package/arrow-arrow-continuations.mjs +0 -18
- package/arrow-arrow-continuations.mjs.map +0 -1
- package/markdown.mjs +0 -6756
- package/markdown.mjs.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
importReferencesy4xv7r53sjjs as importReferences,
|
|
3
3
|
LanguageEmitterxhzgykhux3qm as LanguageEmitter,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
Companion_instance1a2xqc448tlhh as Companion_instance,
|
|
5
|
+
Companion_instance2ryk3262e300f as Companion_instance_0,
|
|
6
|
+
FileExtension_Kotlin_getInstanceiz8k5f00lst9 as FileExtension_Kotlin_getInstance,
|
|
7
7
|
Emitted12h24rpo4uifw as Emitted,
|
|
8
8
|
plus3lrm73de10b42 as plus,
|
|
9
|
-
|
|
9
|
+
Companion_instancebcq57hoyp8c2 as Companion_instance_1,
|
|
10
10
|
get_pathParamsf41cxx5qebxt as get_pathParams,
|
|
11
11
|
orNull2zq556ke3x99j as orNull,
|
|
12
|
-
|
|
12
|
+
Spacer_instance1p6915grp4mfk as Spacer_instance,
|
|
13
13
|
get_indexedPathParams2pzt0qs62068 as get_indexedPathParams,
|
|
14
14
|
removeQuestionMark174e2l0zlwrek as removeQuestionMark,
|
|
15
15
|
emit2koty5c8abmj3 as emit,
|
|
@@ -22,8 +22,10 @@ import {
|
|
|
22
22
|
FieldIdentifier34k7iphndcnl0 as FieldIdentifier,
|
|
23
23
|
DefinitionIdentifiervfasqdb33qef as DefinitionIdentifier,
|
|
24
24
|
addBackticks1di5q03fw4yhx as addBackticks,
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
Shared1uygqfbd22ukz as Shared,
|
|
26
|
+
plus14o24vdaiongg as plus_0,
|
|
27
|
+
Bytes_instance1o9u095wd3kx6 as Bytes_instance,
|
|
28
|
+
Boolean_instance237vwt01w3hs8 as Boolean_instance,
|
|
27
29
|
RegExpiyof7szm5zfu as RegExp_0,
|
|
28
30
|
String1czvr8pxnm6on as String_0,
|
|
29
31
|
Number1mui0heypwdhp as Number_0,
|
|
@@ -41,9 +43,9 @@ import {
|
|
|
41
43
|
} from './wirespec-src-compiler-core.mjs';
|
|
42
44
|
import {
|
|
43
45
|
collectionSizeOrDefault36dulx8yinfqm as collectionSizeOrDefault,
|
|
44
|
-
ArrayList_init_$Create$
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
ArrayList_init_$Create$3ivpeip4ouddx as ArrayList_init_$Create$,
|
|
47
|
+
Unit_instance28fytmsmm6r23 as Unit_instance,
|
|
48
|
+
VOID3gxj6tk5isa35 as VOID,
|
|
47
49
|
joinToString1cxrrlmo0chqs as joinToString,
|
|
48
50
|
THROW_CCE2g6jy02ryeudk as THROW_CCE,
|
|
49
51
|
isCharSequence1ju9jr1w86plq as isCharSequence,
|
|
@@ -53,22 +55,23 @@ import {
|
|
|
53
55
|
protoOf180f3jzyo7rfj as protoOf,
|
|
54
56
|
initMetadataForInterface1egvbzx539z91 as initMetadataForInterface,
|
|
55
57
|
initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
|
|
56
|
-
|
|
58
|
+
charCodeAt1yspne1d8erbm as charCodeAt,
|
|
57
59
|
Char19o2r8palgjof as Char,
|
|
58
60
|
distinct10qe1scfdvu5k as distinct,
|
|
59
61
|
listOfNotNull2woi2boe01ub4 as listOfNotNull,
|
|
60
62
|
isBlank1dvkhjjvox3p0 as isBlank,
|
|
61
63
|
charSequenceLength3278n89t01tmv as charSequenceLength,
|
|
62
|
-
|
|
64
|
+
toString3dhdjl9yf50de as toString_0,
|
|
63
65
|
noWhenBranchMatchedException2a6r7ubxgky5j as noWhenBranchMatchedException,
|
|
64
66
|
first58ocm7j58k3q as first,
|
|
65
|
-
ArrayList_init_$Create$
|
|
67
|
+
ArrayList_init_$Create$1jemgvhi5v0js as ArrayList_init_$Create$_0,
|
|
68
|
+
substring3saq8ornu0luv as substring,
|
|
66
69
|
startsWith26w8qjqapeeq6 as startsWith,
|
|
67
70
|
split2bvyvnrlcifjv as split,
|
|
68
71
|
setOf45ia9pnfhe90 as setOf,
|
|
69
72
|
initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
|
|
70
73
|
isLetterOrDigit2kuxd9e198haf as isLetterOrDigit,
|
|
71
|
-
|
|
74
|
+
_Char___init__impl__6a9atx1csff5kwtduxl as _Char___init__impl__6a9atx,
|
|
72
75
|
listOfvhqybd2zx248 as listOf,
|
|
73
76
|
checkIndexOverflow3frtmheghr0th as checkIndexOverflow,
|
|
74
77
|
asSequence3lsvgkvyzox0q as asSequence,
|
|
@@ -76,20 +79,88 @@ import {
|
|
|
76
79
|
joinToStringooja5rkatz3u as joinToString_0,
|
|
77
80
|
firstOrNulltrxqttxfxqju as firstOrNull,
|
|
78
81
|
isDigit3mimrri4wkzop as isDigit,
|
|
82
|
+
Paire9pteg33gng7 as Pair,
|
|
83
|
+
plus20p0vtfmu0596 as plus_1,
|
|
84
|
+
plus310ted5e4i90h as plus_2,
|
|
85
|
+
emptyList1g2z5xcrvp2zy as emptyList,
|
|
86
|
+
KProperty1ca4yb4wlo496 as KProperty1,
|
|
87
|
+
getPropertyCallableRef3hckxc0xueiaj as getPropertyCallableRef,
|
|
88
|
+
StringBuilder_init_$Create$322n630qt3r8c as StringBuilder_init_$Create$,
|
|
89
|
+
charSequenceGet1vxk1y5n17t1z as charSequenceGet,
|
|
90
|
+
HashSet_init_$Create$33p49hmosnvr4 as HashSet_init_$Create$,
|
|
91
|
+
isInterface3d6p8outrmvmk as isInterface,
|
|
92
|
+
to2cs3ny02qtbcb as to,
|
|
93
|
+
toMap1vec9topfei08 as toMap,
|
|
94
|
+
listOf1jh22dvmctj1r as listOf_0,
|
|
95
|
+
lazy2hsh8ze7j6ikd as lazy,
|
|
96
|
+
firstOrNull1982767dljvdy as firstOrNull_0,
|
|
97
|
+
ensureNotNull1e947j3ixpazm as ensureNotNull,
|
|
98
|
+
addAll1k27qatfgp3k5 as addAll,
|
|
79
99
|
equals2au1ep9vhcato as equals,
|
|
80
100
|
initMetadataForObject1cxne3s9w65el as initMetadataForObject,
|
|
81
101
|
dropLastlqc2oyv04br0 as dropLast,
|
|
82
102
|
} from './kotlin-kotlin-stdlib.mjs';
|
|
103
|
+
import {
|
|
104
|
+
NonEmptyList3ak25ihy2gcvs as NonEmptyList,
|
|
105
|
+
NonEmptyList__plus_impl_xqmb92tle8a7jcf2wm as NonEmptyList__plus_impl_xqmb9,
|
|
106
|
+
} from './arrow-arrow-core.mjs';
|
|
107
|
+
import {
|
|
108
|
+
Package2tniq694j1763 as Package,
|
|
109
|
+
import5uhkz67bd8tt as import_0,
|
|
110
|
+
File3dimy4iqmuock as File,
|
|
111
|
+
transformChildrend9p91tpcqdkx as transformChildren,
|
|
112
|
+
Companion_getInstance3gvtuyxc9uhxj as Companion_getInstance,
|
|
113
|
+
withElements2toq84v08e72 as withElements,
|
|
114
|
+
Namespace345pal554qu3j as Namespace,
|
|
115
|
+
TransformScopeyrd3lf4zrk76 as TransformScope,
|
|
116
|
+
TransformerBuildera6a1gvlhjj9b as TransformerBuilder,
|
|
117
|
+
transform3eti8i2bqvifx as transform,
|
|
118
|
+
Elementitq62jg6fid3 as Element,
|
|
119
|
+
rawttvqxl50flj9 as raw,
|
|
120
|
+
Nameoqr8dt2fim9d as Name,
|
|
121
|
+
transformChildren2mszeagj5nq4c as transformChildren_0,
|
|
122
|
+
sanitizeFieldName1ptgy1kxy8u2m as sanitizeFieldName,
|
|
123
|
+
ConstructorStatement1x4n4sr59iy4n as ConstructorStatement,
|
|
124
|
+
FunctionCall30872kpnbr7op as FunctionCall,
|
|
125
|
+
SanitizationConfig11mmn3p2c03c1 as SanitizationConfig,
|
|
126
|
+
convertClientServer3s89ijty7q130 as convertClientServer,
|
|
127
|
+
convert13xvfhgrf57n5 as convert,
|
|
128
|
+
generateKotlin23t0psnmer03b as generateKotlin,
|
|
129
|
+
RawElement2yts1x2rbem1g as RawElement,
|
|
130
|
+
Constructor3io4sluuia3gk as Constructor,
|
|
131
|
+
Struct39wf79cwtn4ty as Struct,
|
|
132
|
+
withLabelField33ehya4zusm70 as withLabelField,
|
|
133
|
+
Enumlszg09mwd24f as Enum,
|
|
134
|
+
Interface3pn84xq686t2r as Interface,
|
|
135
|
+
KotlinGenerator_instance3iknxuxfla2k5 as KotlinGenerator_instance,
|
|
136
|
+
emit3bzdcd0f6nwtj as emit_0,
|
|
137
|
+
withSharedSource1qgrajaccojj3 as withSharedSource,
|
|
138
|
+
emitn3eihixilqyh as emit_1,
|
|
139
|
+
prependImports32gcj3yb8voha as prependImports,
|
|
140
|
+
placeInPackage1ffljbk9me4ug as placeInPackage,
|
|
141
|
+
convertWithValidation3ar3nbcqsbkpn as convertWithValidation,
|
|
142
|
+
sanitizeNames2wqmyf8vafp9x as sanitizeNames,
|
|
143
|
+
convert11ert2po54h1y as convert_0,
|
|
144
|
+
convert37aabdzvtv9vg as convert_1,
|
|
145
|
+
convert17zcptkz4mhr4 as convert_2,
|
|
146
|
+
Function21cuq8qizkin7 as Function,
|
|
147
|
+
convert32tuiui3czihh as convert_3,
|
|
148
|
+
convert1cn4bolzoed8c as convert_4,
|
|
149
|
+
emitEndpointClient1meajc90wf3el as emitEndpointClient,
|
|
150
|
+
emitClient32kfwzg2hm5vj as emitClient,
|
|
151
|
+
emit1oxjujel6f3jb as emit_2,
|
|
152
|
+
IrEmitterh2m93ojzvkep as IrEmitter,
|
|
153
|
+
} from './wirespec-src-compiler-ir.mjs';
|
|
83
154
|
//region block: imports
|
|
84
155
|
//endregion
|
|
85
156
|
//region block: pre-declaration
|
|
86
|
-
function
|
|
157
|
+
function emit_3(identifier) {
|
|
87
158
|
var tmp;
|
|
88
159
|
if (identifier instanceof DefinitionIdentifier) {
|
|
89
|
-
tmp = this.
|
|
160
|
+
tmp = this.s1w(identifier);
|
|
90
161
|
} else {
|
|
91
162
|
if (identifier instanceof FieldIdentifier) {
|
|
92
|
-
tmp = this.
|
|
163
|
+
tmp = this.a1w(this.s1w(identifier));
|
|
93
164
|
} else {
|
|
94
165
|
noWhenBranchMatchedException();
|
|
95
166
|
}
|
|
@@ -98,21 +169,20 @@ function emit_0(identifier) {
|
|
|
98
169
|
}
|
|
99
170
|
function sanitize(_this__u8e3s4) {
|
|
100
171
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
101
|
-
var this_0 = split(_this__u8e3s4.
|
|
172
|
+
var this_0 = split(_this__u8e3s4.l1(), ['.', ' ']);
|
|
102
173
|
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
103
174
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
104
175
|
var index = 0;
|
|
105
|
-
var
|
|
106
|
-
while (
|
|
107
|
-
var item =
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
destination.e(tmp$ret$0);
|
|
176
|
+
var _iterator__ex2g4s = this_0.t();
|
|
177
|
+
while (_iterator__ex2g4s.u()) {
|
|
178
|
+
var item = _iterator__ex2g4s.v();
|
|
179
|
+
var _unary__edvuaz = index;
|
|
180
|
+
index = _unary__edvuaz + 1 | 0;
|
|
181
|
+
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance_1.oq(item) : item;
|
|
182
|
+
destination.x(tmp$ret$0);
|
|
113
183
|
}
|
|
114
184
|
var tmp = asSequence(joinToString(destination, ''));
|
|
115
|
-
return this.
|
|
185
|
+
return this.z1v(joinToString_0(filter(tmp, KotlinIdentifierEmitter$sanitize$lambda), ''));
|
|
116
186
|
}
|
|
117
187
|
function sanitizeFirstIsDigit(_this__u8e3s4) {
|
|
118
188
|
var tmp;
|
|
@@ -132,22 +202,20 @@ function sanitizeFirstIsDigit(_this__u8e3s4) {
|
|
|
132
202
|
return tmp;
|
|
133
203
|
}
|
|
134
204
|
function sanitizeKeywords(_this__u8e3s4) {
|
|
135
|
-
return
|
|
205
|
+
return Companion_getInstance_0().f1x_1.u1(_this__u8e3s4) ? addBackticks(_this__u8e3s4) : _this__u8e3s4;
|
|
136
206
|
}
|
|
137
207
|
initMetadataForInterface(KotlinIdentifierEmitter, 'KotlinIdentifierEmitter');
|
|
138
|
-
function
|
|
208
|
+
function emit_4(type, module_0) {
|
|
139
209
|
var tmp;
|
|
140
|
-
if (type.
|
|
141
|
-
tmp = 'data object ' + this.
|
|
210
|
+
if (type.wo_1.so_1.r()) {
|
|
211
|
+
tmp = 'data object ' + this.wq(type.vo_1);
|
|
142
212
|
} else {
|
|
143
|
-
var tmp_0 = this.
|
|
144
|
-
var tmp_1 = this.
|
|
213
|
+
var tmp_0 = this.wq(type.vo_1);
|
|
214
|
+
var tmp_1 = this.vp(type.wo_1);
|
|
145
215
|
// Inline function 'kotlin.run' call
|
|
146
|
-
|
|
147
|
-
// Inline function 'community.flock.wirespec.emitters.kotlin.KotlinTypeDefinitionEmitter.emit.<anonymous>' call
|
|
148
|
-
var $this$run = type.z23_1;
|
|
216
|
+
var $this$run = type.xo_1;
|
|
149
217
|
var tmp_2;
|
|
150
|
-
if ($this$run.
|
|
218
|
+
if ($this$run.r()) {
|
|
151
219
|
tmp_2 = '';
|
|
152
220
|
} else {
|
|
153
221
|
tmp_2 = ' : ' + joinToString($this$run, ', ', VOID, VOID, VOID, VOID, KotlinTypeDefinitionEmitter$emit$lambda(this));
|
|
@@ -157,20 +225,19 @@ function emit_1(type, module_0) {
|
|
|
157
225
|
}
|
|
158
226
|
return tmp;
|
|
159
227
|
}
|
|
160
|
-
function
|
|
161
|
-
return dropLast(joinToString(_this__u8e3s4.
|
|
228
|
+
function emit_5(_this__u8e3s4) {
|
|
229
|
+
return dropLast(joinToString(_this__u8e3s4.so_1, '\n', VOID, VOID, VOID, VOID, KotlinTypeDefinitionEmitter$emit$lambda_0(this)), 1);
|
|
162
230
|
}
|
|
163
|
-
function
|
|
164
|
-
return this.
|
|
231
|
+
function emit_6(_this__u8e3s4) {
|
|
232
|
+
return this.wq(_this__u8e3s4.ap_1) + ': ' + this.xp(_this__u8e3s4.bp_1);
|
|
165
233
|
}
|
|
166
|
-
function
|
|
167
|
-
// Inline function 'kotlin.let' call
|
|
234
|
+
function emit_7(_this__u8e3s4) {
|
|
168
235
|
var tmp;
|
|
169
236
|
if (_this__u8e3s4 instanceof Dict) {
|
|
170
|
-
tmp = 'Map<String, ' + this.
|
|
237
|
+
tmp = 'Map<String, ' + this.xp(_this__u8e3s4.co_1) + '>';
|
|
171
238
|
} else {
|
|
172
239
|
if (_this__u8e3s4 instanceof Iterable) {
|
|
173
|
-
tmp = 'List<' + this.
|
|
240
|
+
tmp = 'List<' + this.xp(_this__u8e3s4.zn_1) + '>';
|
|
174
241
|
} else {
|
|
175
242
|
if (_this__u8e3s4 instanceof Unit) {
|
|
176
243
|
tmp = 'Unit';
|
|
@@ -179,17 +246,17 @@ function emit_4(_this__u8e3s4) {
|
|
|
179
246
|
tmp = 'Any';
|
|
180
247
|
} else {
|
|
181
248
|
if (_this__u8e3s4 instanceof Custom) {
|
|
182
|
-
tmp = _this__u8e3s4.
|
|
249
|
+
tmp = _this__u8e3s4.lu_1;
|
|
183
250
|
} else {
|
|
184
251
|
if (_this__u8e3s4 instanceof Primitive) {
|
|
185
|
-
var t = _this__u8e3s4.
|
|
252
|
+
var t = _this__u8e3s4.pu_1;
|
|
186
253
|
var tmp_0;
|
|
187
254
|
if (t instanceof String_0) {
|
|
188
255
|
tmp_0 = 'String';
|
|
189
256
|
} else {
|
|
190
257
|
if (t instanceof Integer) {
|
|
191
258
|
var tmp_1;
|
|
192
|
-
switch (t.
|
|
259
|
+
switch (t.tt_1.b3_1) {
|
|
193
260
|
case 0:
|
|
194
261
|
tmp_1 = 'Int';
|
|
195
262
|
break;
|
|
@@ -204,7 +271,7 @@ function emit_4(_this__u8e3s4) {
|
|
|
204
271
|
} else {
|
|
205
272
|
if (t instanceof Number_0) {
|
|
206
273
|
var tmp_2;
|
|
207
|
-
switch (t.
|
|
274
|
+
switch (t.wt_1.b3_1) {
|
|
208
275
|
case 0:
|
|
209
276
|
tmp_2 = 'Float';
|
|
210
277
|
break;
|
|
@@ -238,49 +305,40 @@ function emit_4(_this__u8e3s4) {
|
|
|
238
305
|
}
|
|
239
306
|
}
|
|
240
307
|
}
|
|
241
|
-
// Inline function 'kotlin.
|
|
242
|
-
// Inline function 'community.flock.wirespec.emitters.kotlin.KotlinTypeDefinitionEmitter.emit.<anonymous>' call
|
|
308
|
+
// Inline function 'kotlin.let' call
|
|
243
309
|
var it = tmp;
|
|
244
|
-
return _this__u8e3s4.
|
|
310
|
+
return _this__u8e3s4.du() ? it + '?' : it;
|
|
245
311
|
}
|
|
246
|
-
function
|
|
312
|
+
function emit_8(_this__u8e3s4) {
|
|
247
313
|
var tmp;
|
|
248
314
|
if (_this__u8e3s4 instanceof RegExp_0) {
|
|
249
|
-
tmp = 'Regex("""' + this.
|
|
315
|
+
tmp = 'Regex("""' + this.zp(_this__u8e3s4.ys_1) + '""").matches(value)';
|
|
250
316
|
} else {
|
|
251
317
|
if (_this__u8e3s4 instanceof Bound) {
|
|
252
|
-
var tmp1_safe_receiver = _this__u8e3s4.
|
|
318
|
+
var tmp1_safe_receiver = _this__u8e3s4.pt_1;
|
|
253
319
|
var tmp_0;
|
|
254
320
|
if (tmp1_safe_receiver == null) {
|
|
255
321
|
tmp_0 = null;
|
|
256
322
|
} else {
|
|
257
323
|
// Inline function 'kotlin.let' call
|
|
258
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
259
|
-
// Inline function 'community.flock.wirespec.emitters.kotlin.KotlinTypeDefinitionEmitter.emit.<anonymous>' call
|
|
260
324
|
tmp_0 = tmp1_safe_receiver + ' < value';
|
|
261
325
|
}
|
|
262
326
|
var minCheck = tmp_0;
|
|
263
|
-
var tmp2_safe_receiver = _this__u8e3s4.
|
|
327
|
+
var tmp2_safe_receiver = _this__u8e3s4.qt_1;
|
|
264
328
|
var tmp_1;
|
|
265
329
|
if (tmp2_safe_receiver == null) {
|
|
266
330
|
tmp_1 = null;
|
|
267
331
|
} else {
|
|
268
332
|
// Inline function 'kotlin.let' call
|
|
269
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
270
|
-
// Inline function 'community.flock.wirespec.emitters.kotlin.KotlinTypeDefinitionEmitter.emit.<anonymous>' call
|
|
271
333
|
tmp_1 = 'value < ' + tmp2_safe_receiver;
|
|
272
334
|
}
|
|
273
335
|
var maxCheck = tmp_1;
|
|
274
336
|
// Inline function 'kotlin.let' call
|
|
275
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
276
|
-
// Inline function 'community.flock.wirespec.emitters.kotlin.KotlinTypeDefinitionEmitter.emit.<anonymous>' call
|
|
277
337
|
// Inline function 'kotlin.text.ifEmpty' call
|
|
278
338
|
var this_0 = joinToString(listOfNotNull([minCheck, maxCheck]), ' && ');
|
|
279
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
280
339
|
var tmp_2;
|
|
281
340
|
// Inline function 'kotlin.text.isEmpty' call
|
|
282
341
|
if (charSequenceLength(this_0) === 0) {
|
|
283
|
-
// Inline function 'community.flock.wirespec.emitters.kotlin.KotlinTypeDefinitionEmitter.emit.<anonymous>.<anonymous>' call
|
|
284
342
|
tmp_2 = 'true';
|
|
285
343
|
} else {
|
|
286
344
|
tmp_2 = this_0;
|
|
@@ -293,174 +351,170 @@ function emit_5(_this__u8e3s4) {
|
|
|
293
351
|
return tmp;
|
|
294
352
|
}
|
|
295
353
|
initMetadataForInterface(KotlinTypeDefinitionEmitter, 'KotlinTypeDefinitionEmitter', VOID, VOID, [TypeDefinitionEmitter, KotlinIdentifierEmitter]);
|
|
296
|
-
function
|
|
297
|
-
return trimMargin('\n |' + emitImports(
|
|
354
|
+
function emit_9(channel) {
|
|
355
|
+
return trimMargin('\n |' + emitImports(this, channel) + '\n |\n |fun interface ' + this.wq(channel.mo_1) + ' {\n | operator fun invoke(message: ' + this.xp(channel.no_1) + ')\n |}\n |\n ');
|
|
298
356
|
}
|
|
299
357
|
initMetadataForInterface(KotlinChannelDefinitionEmitter, 'KotlinChannelDefinitionEmitter', VOID, VOID, [KotlinTypeDefinitionEmitter]);
|
|
300
|
-
function
|
|
301
|
-
var tmp = this.j2a(enum_0.i26_1);
|
|
302
|
-
return trimMargin('\n |enum class ' + tmp + ' (override val label: String): Wirespec.Enum {\n |' + spacer(joinToString(enum_0.j26_1, ',\n', VOID, VOID, VOID, VOID, KotlinEnumDefinitionEmitter$emit$lambda(this))) + ';\n |' + Spacer_instance.toString() + 'override fun toString(): String {\n |' + Spacer_instance.s26(2) + 'return label\n |' + Spacer_instance.toString() + '}\n |}\n |\n ');
|
|
303
|
-
}
|
|
304
|
-
initMetadataForInterface(KotlinEnumDefinitionEmitter, 'KotlinEnumDefinitionEmitter', VOID, VOID, [KotlinIdentifierEmitter]);
|
|
305
|
-
function emit_8(union) {
|
|
306
|
-
return trimMargin('\n |sealed interface ' + this.y25(union.s23_1) + '\n |\n ');
|
|
307
|
-
}
|
|
308
|
-
initMetadataForInterface(KotlinUnionDefinitionEmitter, 'KotlinUnionDefinitionEmitter', VOID, VOID, [KotlinIdentifierEmitter]);
|
|
309
|
-
function emit_9(endpoint) {
|
|
358
|
+
function emit_10(endpoint) {
|
|
310
359
|
// Inline function 'kotlin.collections.map' call
|
|
311
360
|
var this_0 = importReferences(endpoint);
|
|
312
361
|
// Inline function 'kotlin.collections.mapTo' call
|
|
313
362
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
314
|
-
var
|
|
315
|
-
while (
|
|
316
|
-
var item =
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
destination.e(tmp$ret$0);
|
|
363
|
+
var _iterator__ex2g4s = this_0.t();
|
|
364
|
+
while (_iterator__ex2g4s.u()) {
|
|
365
|
+
var item = _iterator__ex2g4s.v();
|
|
366
|
+
var tmp$ret$0 = 'import ' + this.k1v().mr_1 + '.model.' + item.lu_1;
|
|
367
|
+
destination.x(tmp$ret$0);
|
|
320
368
|
}
|
|
321
369
|
var tmp = destination;
|
|
322
370
|
var tmp_0 = joinToString(tmp, '\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda);
|
|
323
|
-
var tmp_1 = this.
|
|
371
|
+
var tmp_1 = this.wq(endpoint.ep_1);
|
|
324
372
|
var tmp_2 = get_pathParams(endpoint);
|
|
325
|
-
var tmp_3 = emitObject$default(
|
|
326
|
-
var tmp_4 = emitObject$default(endpoint.
|
|
327
|
-
var tmp_5 = emitObject$default(endpoint.
|
|
328
|
-
var tmp_6 = this.
|
|
373
|
+
var tmp_3 = emitObject$default(this, tmp_2, 'Path', 'Wirespec.Path', VOID, KotlinEndpointDefinitionEmitter$emit$lambda_0(this));
|
|
374
|
+
var tmp_4 = emitObject$default(this, endpoint.hp_1, 'Queries', 'Wirespec.Queries', VOID, KotlinEndpointDefinitionEmitter$emit$lambda_1(this));
|
|
375
|
+
var tmp_5 = emitObject$default(this, endpoint.ip_1, 'Headers', 'Wirespec.Request.Headers', VOID, KotlinEndpointDefinitionEmitter$emit$lambda_2(this));
|
|
376
|
+
var tmp_6 = this.x1v(first(endpoint.jp_1), endpoint);
|
|
329
377
|
var tmp_7 = Spacer_instance.toString();
|
|
330
|
-
var tmp_8 = emitStatusInterfaces(
|
|
331
|
-
var tmp_9 = emitResponseInterfaces(
|
|
332
|
-
var tmp_10 = distinctByStatus(endpoint.
|
|
378
|
+
var tmp_8 = emitStatusInterfaces(this, endpoint);
|
|
379
|
+
var tmp_9 = emitResponseInterfaces(this, endpoint);
|
|
380
|
+
var tmp_10 = distinctByStatus(endpoint.kp_1);
|
|
333
381
|
var tmp_11 = joinToString(tmp_10, '\n\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_3(this));
|
|
334
382
|
var tmp_12 = Spacer_instance.toString();
|
|
335
|
-
var tmp_13 = Spacer_instance.
|
|
336
|
-
var tmp_14 = distinctByStatus(endpoint.
|
|
383
|
+
var tmp_13 = Spacer_instance.qr(2);
|
|
384
|
+
var tmp_14 = distinctByStatus(endpoint.kp_1);
|
|
337
385
|
var tmp_15 = joinToString(tmp_14, '\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_4(this));
|
|
338
|
-
var tmp_16 = Spacer_instance.
|
|
386
|
+
var tmp_16 = Spacer_instance.qr(2);
|
|
339
387
|
var tmp_17 = Spacer_instance.toString();
|
|
340
|
-
var tmp_18 = Spacer_instance.
|
|
388
|
+
var tmp_18 = Spacer_instance.qr(2);
|
|
341
389
|
// Inline function 'kotlin.collections.filter' call
|
|
390
|
+
var tmp0 = distinctByStatus(endpoint.kp_1);
|
|
342
391
|
// Inline function 'kotlin.collections.filterTo' call
|
|
343
|
-
var this_1 = distinctByStatus(endpoint.m24_1);
|
|
344
392
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
345
|
-
var
|
|
346
|
-
while (
|
|
347
|
-
var element =
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
destination_0.e(element);
|
|
393
|
+
var _iterator__ex2g4s_0 = tmp0.t();
|
|
394
|
+
while (_iterator__ex2g4s_0.u()) {
|
|
395
|
+
var element = _iterator__ex2g4s_0.v();
|
|
396
|
+
if (Companion_instance_1.rq(element.qp_1)) {
|
|
397
|
+
destination_0.x(element);
|
|
351
398
|
}
|
|
352
399
|
}
|
|
353
400
|
var tmp_19 = destination_0;
|
|
354
401
|
var tmp_20 = joinToString(tmp_19, '\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_5(this));
|
|
355
|
-
var tmp_21 = Spacer_instance.
|
|
356
|
-
var tmp_22 = Spacer_instance.
|
|
402
|
+
var tmp_21 = Spacer_instance.qr(3);
|
|
403
|
+
var tmp_22 = Spacer_instance.qr(2);
|
|
357
404
|
var tmp_23 = Spacer_instance.toString();
|
|
358
|
-
var tmp_24 = Spacer_instance.
|
|
359
|
-
var tmp_25 = this.
|
|
360
|
-
var tmp_26 = Spacer_instance.
|
|
361
|
-
var tmp_27 = Spacer_instance.
|
|
362
|
-
return trimMargin('\n |' + tmp_0 + '\n |\n |object ' + tmp_1 + ' : Wirespec.Endpoint {\n |' + tmp_3 + '\n |\n |' + tmp_4 + '\n |\n |' + tmp_5 + '\n |\n |' + tmp_6 + '\n |\n |' + tmp_7 + 'sealed interface Response<T: Any> : Wirespec.Response<T>\n |\n |' + tmp_8 + '\n |\n |' + tmp_9 + '\n |\n |' + tmp_11 + '\n |\n |' + tmp_12 + 'fun toResponse(serialization: Wirespec.Serializer, response: Response<*>): Wirespec.RawResponse =\n |' + tmp_13 + 'when(response) {\n |' + tmp_15 + '\n |' + tmp_16 + '}\n |\n |' + tmp_17 + 'fun fromResponse(serialization: Wirespec.Deserializer, response: Wirespec.RawResponse): Response<*> =\n |' + tmp_18 + 'when (response.statusCode) {\n |' + tmp_20 + '\n |' + tmp_21 + 'else -> error("Cannot match response with status: ${response.statusCode}")\n |' + tmp_22 + '}\n |\n |' + tmp_23 + 'interface Handler: Wirespec.Handler {\n |' + tmp_24 + tmp_25 + '\n |' + tmp_26 + 'companion object: Wirespec.Server<Request, Response<*>>, Wirespec.Client<Request, Response<*>> {\n |' + tmp_27 + 'override val pathTemplate = "/' + joinToString(endpoint.
|
|
405
|
+
var tmp_24 = Spacer_instance.qr(2);
|
|
406
|
+
var tmp_25 = this.b1w(endpoint);
|
|
407
|
+
var tmp_26 = Spacer_instance.qr(2);
|
|
408
|
+
var tmp_27 = Spacer_instance.qr(3);
|
|
409
|
+
return trimMargin('\n |' + tmp_0 + '\n |\n |object ' + tmp_1 + ' : Wirespec.Endpoint {\n |' + tmp_3 + '\n |\n |' + tmp_4 + '\n |\n |' + tmp_5 + '\n |\n |' + tmp_6 + '\n |\n |' + tmp_7 + 'sealed interface Response<T: Any> : Wirespec.Response<T>\n |\n |' + tmp_8 + '\n |\n |' + tmp_9 + '\n |\n |' + tmp_11 + '\n |\n |' + tmp_12 + 'fun toResponse(serialization: Wirespec.Serializer, response: Response<*>): Wirespec.RawResponse =\n |' + tmp_13 + 'when(response) {\n |' + tmp_15 + '\n |' + tmp_16 + '}\n |\n |' + tmp_17 + 'fun fromResponse(serialization: Wirespec.Deserializer, response: Wirespec.RawResponse): Response<*> =\n |' + tmp_18 + 'when (response.statusCode) {\n |' + tmp_20 + '\n |' + tmp_21 + 'else -> error("Cannot match response with status: ${response.statusCode}")\n |' + tmp_22 + '}\n |\n |' + tmp_23 + 'interface Handler: Wirespec.Handler {\n |' + tmp_24 + tmp_25 + '\n |' + tmp_26 + 'companion object: Wirespec.Server<Request, Response<*>>, Wirespec.Client<Request, Response<*>> {\n |' + tmp_27 + 'override val pathTemplate = "/' + joinToString(endpoint.gp_1, '/', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_6) + '"\n |' + Spacer_instance.qr(3) + 'override val method = "' + endpoint.fp_1.toString() + '"\n |' + Spacer_instance.qr(3) + 'override fun server(serialization: Wirespec.Serialization) = object : Wirespec.ServerEdge<Request, Response<*>> {\n |' + Spacer_instance.qr(4) + 'override fun from(request: Wirespec.RawRequest) = fromRequest(serialization, request)\n |' + Spacer_instance.qr(4) + 'override fun to(response: Response<*>) = toResponse(serialization, response)\n |' + Spacer_instance.qr(3) + '}\n |' + Spacer_instance.qr(3) + 'override fun client(serialization: Wirespec.Serialization) = object : Wirespec.ClientEdge<Request, Response<*>> {\n |' + Spacer_instance.qr(4) + 'override fun to(request: Request) = toRequest(serialization, request)\n |' + Spacer_instance.qr(4) + 'override fun from(response: Wirespec.RawResponse) = fromResponse(serialization, response)\n |' + Spacer_instance.qr(3) + '}\n |' + Spacer_instance.qr(2) + '}\n |' + Spacer_instance.toString() + '}\n |}\n |\n ');
|
|
363
410
|
}
|
|
364
411
|
function emitHandleFunction(endpoint) {
|
|
365
|
-
return 'suspend fun ' + Companion_instance_1.
|
|
412
|
+
return 'suspend fun ' + Companion_instance_1.pq(this.wq(endpoint.ep_1)) + '(request: Request): Response<*>';
|
|
366
413
|
}
|
|
367
|
-
function
|
|
414
|
+
function emit_11(_this__u8e3s4, endpoint) {
|
|
368
415
|
var tmp = Spacer_instance.toString();
|
|
369
|
-
var tmp_0 = emitConstructor(
|
|
370
|
-
var tmp_1 = Spacer_instance.
|
|
416
|
+
var tmp_0 = emitConstructor(this, _this__u8e3s4, endpoint);
|
|
417
|
+
var tmp_1 = Spacer_instance.qr(2);
|
|
371
418
|
var tmp_2 = get_pathParams(endpoint);
|
|
372
|
-
var tmp_3 = brace(joinToString(tmp_2, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_7(this))
|
|
373
|
-
var tmp_4 = Spacer_instance.
|
|
374
|
-
var tmp_5 = Spacer_instance.
|
|
375
|
-
var tmp_6 = brace(joinToString(endpoint.
|
|
376
|
-
var tmp_7 = Spacer_instance.
|
|
377
|
-
var tmp_8 = brace(joinToString(endpoint.
|
|
378
|
-
var tmp_9 = _this__u8e3s4.
|
|
419
|
+
var tmp_3 = brace(this, joinToString(tmp_2, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_7(this)));
|
|
420
|
+
var tmp_4 = Spacer_instance.qr(2);
|
|
421
|
+
var tmp_5 = Spacer_instance.qr(2);
|
|
422
|
+
var tmp_6 = brace(this, joinToString(endpoint.hp_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_8(this)));
|
|
423
|
+
var tmp_7 = Spacer_instance.qr(2);
|
|
424
|
+
var tmp_8 = brace(this, joinToString(endpoint.ip_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_9(this)));
|
|
425
|
+
var tmp_9 = _this__u8e3s4.np_1 == null ? Spacer_instance.qr(2) + 'override val body = Unit\n' + Spacer_instance.toString() + '}' : Spacer_instance.toString() + '}';
|
|
379
426
|
var tmp_10 = Spacer_instance.toString();
|
|
380
|
-
var tmp_11 = Spacer_instance.
|
|
381
|
-
var tmp_12 = Spacer_instance.
|
|
382
|
-
return trimMargin('\n |' + tmp + tmp_0 + '\n |' + tmp_1 + 'override val path = Path' + tmp_3 + '\n |' + tmp_4 + 'override val method = Wirespec.Method.' + endpoint.
|
|
427
|
+
var tmp_11 = Spacer_instance.qr(2);
|
|
428
|
+
var tmp_12 = Spacer_instance.qr(3);
|
|
429
|
+
return trimMargin('\n |' + tmp + tmp_0 + '\n |' + tmp_1 + 'override val path = Path' + tmp_3 + '\n |' + tmp_4 + 'override val method = Wirespec.Method.' + endpoint.fp_1.a3_1 + '\n |' + tmp_5 + 'override val queries = Queries' + tmp_6 + '\n |' + tmp_7 + 'override val headers = Headers' + tmp_8 + '\n |' + tmp_9 + '\n |\n |' + tmp_10 + 'fun toRequest(serialization: Wirespec.Serializer, request: Request): Wirespec.RawRequest =\n |' + tmp_11 + 'Wirespec.RawRequest(\n |' + tmp_12 + 'path = listOf(' + joinToString(endpoint.gp_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_10(this)) + '),\n |' + Spacer_instance.qr(3) + 'method = request.method.name,\n |' + Spacer_instance.qr(3) + 'queries = ' + this.c1x(endpoint) + ',\n |' + Spacer_instance.qr(3) + 'headers = ' + this.b1x(endpoint) + ',\n |' + Spacer_instance.qr(3) + 'body = ' + (!(_this__u8e3s4.np_1 == null) ? 'serialization.serializeBody(request.body, typeOf<' + emit_16(this, _this__u8e3s4.np_1) + '>())' : 'null') + ',\n |' + Spacer_instance.qr(2) + ')\n |\n |' + Spacer_instance.toString() + 'fun fromRequest(serialization: Wirespec.Deserializer, request: Wirespec.RawRequest): Request =\n |' + Spacer_instance.qr(2) + 'Request' + emitDeserializedParams(this, _this__u8e3s4, endpoint) + '\n ');
|
|
383
430
|
}
|
|
384
431
|
function emitRequestHeaders(_this__u8e3s4) {
|
|
385
432
|
var tmp;
|
|
386
|
-
if (_this__u8e3s4.
|
|
433
|
+
if (_this__u8e3s4.ip_1.r()) {
|
|
387
434
|
tmp = 'emptyMap()';
|
|
388
435
|
} else {
|
|
389
|
-
var tmp_0 = Spacer_instance.
|
|
390
|
-
var tmp_1 = ',\n' + Spacer_instance.
|
|
391
|
-
tmp = trimMargin('\n |mapOf(\n |' + tmp_0 + joinToString(_this__u8e3s4.
|
|
436
|
+
var tmp_0 = Spacer_instance.qr(5);
|
|
437
|
+
var tmp_1 = ',\n' + Spacer_instance.qr(5);
|
|
438
|
+
tmp = trimMargin('\n |mapOf(\n |' + tmp_0 + joinToString(_this__u8e3s4.ip_1, tmp_1, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitRequestHeaders$lambda(this)) + '\n |' + Spacer_instance.qr(4) + ')\n ');
|
|
392
439
|
}
|
|
393
440
|
return tmp;
|
|
394
441
|
}
|
|
395
442
|
function emitQueries(endpoint) {
|
|
396
443
|
var tmp;
|
|
397
444
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
398
|
-
if (!endpoint.
|
|
399
|
-
var tmp_0 = Spacer_instance.
|
|
400
|
-
var tmp_1 = ',\n' + Spacer_instance.
|
|
401
|
-
tmp = trimMargin('\n |mapOf(\n |' + tmp_0 + joinToString(endpoint.
|
|
445
|
+
if (!endpoint.hp_1.r()) {
|
|
446
|
+
var tmp_0 = Spacer_instance.qr(5);
|
|
447
|
+
var tmp_1 = ',\n' + Spacer_instance.qr(5);
|
|
448
|
+
tmp = trimMargin('\n |mapOf(\n |' + tmp_0 + joinToString(endpoint.hp_1, tmp_1, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitQueries$lambda(this)) + '\n |' + Spacer_instance.qr(4) + ')\n ');
|
|
402
449
|
} else {
|
|
403
450
|
tmp = 'emptyMap()';
|
|
404
451
|
}
|
|
405
452
|
return tmp;
|
|
406
453
|
}
|
|
407
|
-
function
|
|
454
|
+
function emit_12(_this__u8e3s4) {
|
|
408
455
|
// Inline function 'kotlin.let' call
|
|
409
|
-
|
|
410
|
-
// Inline function 'community.flock.wirespec.emitters.kotlin.KotlinEndpointDefinitionEmitter.emit.<anonymous>' call
|
|
411
|
-
var it = joinToString(_this__u8e3s4.t24_1, ', ', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_11(this));
|
|
456
|
+
var it = joinToString(_this__u8e3s4.rp_1, ', ', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_11(this));
|
|
412
457
|
var responseHeaderFields = isBlank(it) ? '' : ', ' + it;
|
|
413
458
|
var tmp = Spacer_instance.toString();
|
|
414
|
-
var tmp_0 =
|
|
415
|
-
var tmp_1 = toString_0(
|
|
416
|
-
var tmp_2 =
|
|
417
|
-
var tmp_3 = concatGenerics(
|
|
418
|
-
var tmp_4 = Spacer_instance.
|
|
419
|
-
var tmp_5 = fixStatus(_this__u8e3s4.
|
|
420
|
-
var tmp_6 = Spacer_instance.
|
|
421
|
-
var tmp_7 = brace(joinToString(_this__u8e3s4.
|
|
422
|
-
return trimMargin('\n |' + tmp + 'data class Response' + _this__u8e3s4.
|
|
459
|
+
var tmp_0 = emit_16(this, _this__u8e3s4.sp_1);
|
|
460
|
+
var tmp_1 = toString_0(charCodeAt(_this__u8e3s4.qp_1, 0));
|
|
461
|
+
var tmp_2 = emit_16(this, _this__u8e3s4.sp_1);
|
|
462
|
+
var tmp_3 = concatGenerics(emit_16(this, _this__u8e3s4.sp_1));
|
|
463
|
+
var tmp_4 = Spacer_instance.qr(2);
|
|
464
|
+
var tmp_5 = fixStatus(_this__u8e3s4.qp_1);
|
|
465
|
+
var tmp_6 = Spacer_instance.qr(2);
|
|
466
|
+
var tmp_7 = brace(this, joinToString(_this__u8e3s4.rp_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_12(this)));
|
|
467
|
+
return trimMargin('\n |' + tmp + 'data class Response' + _this__u8e3s4.qp_1 + '(override val body: ' + tmp_0 + responseHeaderFields + ') : Response' + tmp_1 + 'XX<' + tmp_2 + '>, Response' + tmp_3 + ' {\n |' + tmp_4 + 'override val status = ' + tmp_5 + '\n |' + tmp_6 + 'override val headers = ResponseHeaders' + tmp_7 + '\n |' + emitObject(this, _this__u8e3s4.rp_1, 'ResponseHeaders', 'Wirespec.Response.Headers', 2, KotlinEndpointDefinitionEmitter$emit$lambda_13(this)) + '\n |' + Spacer_instance.toString() + '}\n ');
|
|
423
468
|
}
|
|
424
469
|
function emitBody(_this__u8e3s4, content) {
|
|
425
|
-
return 'serialization.serializeBody(response.body, typeOf<' +
|
|
470
|
+
return 'serialization.serializeBody(response.body, typeOf<' + emit_16(_this__u8e3s4, content) + '>())';
|
|
426
471
|
}
|
|
427
472
|
function emitHeaders(_this__u8e3s4) {
|
|
428
473
|
var tmp;
|
|
429
|
-
if (_this__u8e3s4.
|
|
474
|
+
if (_this__u8e3s4.rp_1.r()) {
|
|
430
475
|
tmp = 'emptyMap()';
|
|
431
476
|
} else {
|
|
432
|
-
var tmp_0 = Spacer_instance.
|
|
433
|
-
var tmp_1 = ',\n' + Spacer_instance.
|
|
434
|
-
tmp = trimMargin('\n |mapOf(\n |' + tmp_0 + joinToString(_this__u8e3s4.
|
|
477
|
+
var tmp_0 = Spacer_instance.qr(5);
|
|
478
|
+
var tmp_1 = ',\n' + Spacer_instance.qr(5);
|
|
479
|
+
tmp = trimMargin('\n |mapOf(\n |' + tmp_0 + joinToString(_this__u8e3s4.rp_1, tmp_1, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitHeaders$lambda(this)) + '\n |' + Spacer_instance.qr(4) + ')\n ');
|
|
435
480
|
}
|
|
436
481
|
return tmp;
|
|
437
482
|
}
|
|
438
483
|
initMetadataForInterface(KotlinEndpointDefinitionEmitter, 'KotlinEndpointDefinitionEmitter', VOID, VOID, [KotlinTypeDefinitionEmitter]);
|
|
439
|
-
function
|
|
440
|
-
return trimMargin('\n |
|
|
484
|
+
function emit_13(union) {
|
|
485
|
+
return trimMargin('\n |sealed interface ' + this.wq(union.qo_1) + '\n |\n ');
|
|
486
|
+
}
|
|
487
|
+
initMetadataForInterface(KotlinUnionDefinitionEmitter, 'KotlinUnionDefinitionEmitter', VOID, VOID, [KotlinIdentifierEmitter]);
|
|
488
|
+
function emit_14(enum_0, module_0) {
|
|
489
|
+
var tmp = this.s1w(enum_0.gr_1);
|
|
490
|
+
return trimMargin('\n |enum class ' + tmp + ' (override val label: String): Wirespec.Enum {\n |' + spacer(joinToString(enum_0.hr_1, ',\n', VOID, VOID, VOID, VOID, KotlinEnumDefinitionEmitter$emit$lambda(this))) + ';\n |' + Spacer_instance.toString() + 'override fun toString(): String {\n |' + Spacer_instance.qr(2) + 'return label\n |' + Spacer_instance.toString() + '}\n |}\n |\n ');
|
|
491
|
+
}
|
|
492
|
+
initMetadataForInterface(KotlinEnumDefinitionEmitter, 'KotlinEnumDefinitionEmitter', VOID, VOID, [KotlinIdentifierEmitter]);
|
|
493
|
+
function emit_15(refined) {
|
|
494
|
+
return trimMargin('\n |data class ' + this.s1w(refined.br_1) + '(override val value: ' + this.xp(refined.cr_1) + '): Wirespec.Refined<' + this.xp(refined.cr_1) + '> {\n |' + Spacer_instance.toString() + 'override fun toString() = value.toString()\n |' + Spacer_instance.toString() + 'override fun validate() = ' + this.kr(refined) + '\n |}\n |\n ');
|
|
441
495
|
}
|
|
442
496
|
function emitValidator(_this__u8e3s4) {
|
|
443
497
|
var defaultReturn = 'true';
|
|
444
|
-
var type = _this__u8e3s4.
|
|
498
|
+
var type = _this__u8e3s4.cr_1.pu_1;
|
|
445
499
|
var tmp;
|
|
446
500
|
if (type instanceof Integer) {
|
|
447
|
-
var tmp0_safe_receiver = type.
|
|
448
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.
|
|
501
|
+
var tmp0_safe_receiver = type.ut_1;
|
|
502
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.yp(tmp0_safe_receiver);
|
|
449
503
|
tmp = tmp1_elvis_lhs == null ? defaultReturn : tmp1_elvis_lhs;
|
|
450
504
|
} else {
|
|
451
505
|
if (type instanceof Number_0) {
|
|
452
|
-
var tmp2_safe_receiver = type.
|
|
453
|
-
var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : this.
|
|
506
|
+
var tmp2_safe_receiver = type.xt_1;
|
|
507
|
+
var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : this.yp(tmp2_safe_receiver);
|
|
454
508
|
tmp = tmp3_elvis_lhs == null ? defaultReturn : tmp3_elvis_lhs;
|
|
455
509
|
} else {
|
|
456
510
|
if (type instanceof String_0) {
|
|
457
|
-
var tmp4_safe_receiver = type.
|
|
511
|
+
var tmp4_safe_receiver = type.rt_1;
|
|
458
512
|
var tmp_0;
|
|
459
513
|
var tmp_1 = tmp4_safe_receiver;
|
|
460
514
|
if ((tmp_1 == null ? null : new RegExp_0(tmp_1)) == null) {
|
|
461
515
|
tmp_0 = null;
|
|
462
516
|
} else {
|
|
463
|
-
tmp_0 = this.
|
|
517
|
+
tmp_0 = this.yp(new RegExp_0(tmp4_safe_receiver));
|
|
464
518
|
}
|
|
465
519
|
var tmp5_elvis_lhs = tmp_0;
|
|
466
520
|
tmp = tmp5_elvis_lhs == null ? defaultReturn : tmp5_elvis_lhs;
|
|
@@ -480,21 +534,23 @@ function emitValidator(_this__u8e3s4) {
|
|
|
480
534
|
return tmp;
|
|
481
535
|
}
|
|
482
536
|
initMetadataForInterface(KotlinRefinedTypeDefinitionEmitter, 'KotlinRefinedTypeDefinitionEmitter', VOID, VOID, [KotlinIdentifierEmitter, KotlinTypeDefinitionEmitter]);
|
|
483
|
-
initMetadataForClass(KotlinEmitter, 'KotlinEmitter', KotlinEmitter, LanguageEmitter, [LanguageEmitter,
|
|
537
|
+
initMetadataForClass(KotlinEmitter, 'KotlinEmitter', KotlinEmitter, LanguageEmitter, [LanguageEmitter, KotlinEndpointDefinitionEmitter, KotlinChannelDefinitionEmitter, KotlinUnionDefinitionEmitter, KotlinEnumDefinitionEmitter, KotlinIdentifierEmitter, KotlinTypeDefinitionEmitter, KotlinRefinedTypeDefinitionEmitter]);
|
|
484
538
|
initMetadataForCompanion(Companion);
|
|
539
|
+
initMetadataForCompanion(Companion_0);
|
|
540
|
+
initMetadataForClass(KotlinIrEmitter$shared$1);
|
|
541
|
+
initMetadataForClass(KotlinIrEmitter, 'KotlinIrEmitter', KotlinIrEmitter, VOID, [IrEmitter]);
|
|
485
542
|
initMetadataForObject(KotlinShared, 'KotlinShared');
|
|
486
543
|
//endregion
|
|
487
|
-
function emitImports(
|
|
544
|
+
function emitImports($this, _this__u8e3s4) {
|
|
488
545
|
// Inline function 'kotlin.collections.map' call
|
|
489
546
|
var this_0 = importReferences(_this__u8e3s4);
|
|
490
547
|
// Inline function 'kotlin.collections.mapTo' call
|
|
491
548
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
492
|
-
var
|
|
493
|
-
while (
|
|
494
|
-
var item =
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
destination.e(tmp$ret$0);
|
|
549
|
+
var _iterator__ex2g4s = this_0.t();
|
|
550
|
+
while (_iterator__ex2g4s.u()) {
|
|
551
|
+
var item = _iterator__ex2g4s.v();
|
|
552
|
+
var tmp$ret$0 = 'import ' + $this.k1v().mr_1 + '.model.' + item.lu_1 + ';';
|
|
553
|
+
destination.x(tmp$ret$0);
|
|
498
554
|
}
|
|
499
555
|
var tmp = destination;
|
|
500
556
|
return joinToString(tmp, '\n', VOID, VOID, VOID, VOID, KotlinChannelDefinitionEmitter$emitImports$lambda);
|
|
@@ -506,170 +562,156 @@ function KotlinChannelDefinitionEmitter$emitImports$lambda(it) {
|
|
|
506
562
|
function KotlinChannelDefinitionEmitter() {
|
|
507
563
|
}
|
|
508
564
|
function KotlinEmitter(packageName, emitShared) {
|
|
509
|
-
packageName = packageName === VOID ? Companion_instance.
|
|
510
|
-
emitShared = emitShared === VOID ? Companion_instance_0.
|
|
565
|
+
packageName = packageName === VOID ? Companion_instance.lr('community.flock.wirespec.generated') : packageName;
|
|
566
|
+
emitShared = emitShared === VOID ? Companion_instance_0.go() : emitShared;
|
|
511
567
|
LanguageEmitter.call(this);
|
|
512
|
-
this.
|
|
513
|
-
this.
|
|
514
|
-
this.
|
|
515
|
-
this.
|
|
516
|
-
this.
|
|
517
|
-
this.
|
|
518
|
-
}
|
|
519
|
-
protoOf(KotlinEmitter).
|
|
520
|
-
return this.
|
|
568
|
+
this.t1w_1 = packageName;
|
|
569
|
+
this.u1w_1 = emitShared;
|
|
570
|
+
this.v1w_1 = '\nimport community.flock.wirespec.kotlin.Wirespec\nimport kotlin.reflect.typeOf\n';
|
|
571
|
+
this.w1w_1 = FileExtension_Kotlin_getInstance();
|
|
572
|
+
this.x1w_1 = KotlinShared_getInstance();
|
|
573
|
+
this.y1w_1 = '//';
|
|
574
|
+
}
|
|
575
|
+
protoOf(KotlinEmitter).k1v = function () {
|
|
576
|
+
return this.t1w_1;
|
|
521
577
|
};
|
|
522
|
-
protoOf(KotlinEmitter).
|
|
523
|
-
return this.
|
|
578
|
+
protoOf(KotlinEmitter).eq = function () {
|
|
579
|
+
return this.w1w_1;
|
|
524
580
|
};
|
|
525
|
-
protoOf(KotlinEmitter).
|
|
526
|
-
return this.
|
|
581
|
+
protoOf(KotlinEmitter).t1v = function () {
|
|
582
|
+
return this.x1w_1;
|
|
527
583
|
};
|
|
528
|
-
protoOf(KotlinEmitter).
|
|
529
|
-
return this.
|
|
584
|
+
protoOf(KotlinEmitter).fq = function () {
|
|
585
|
+
return this.y1w_1;
|
|
530
586
|
};
|
|
531
|
-
protoOf(KotlinEmitter).
|
|
587
|
+
protoOf(KotlinEmitter).tq = function (module_0, logger) {
|
|
532
588
|
// Inline function 'kotlin.let' call
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
var it = protoOf(LanguageEmitter).v25.call(this, module_0, logger);
|
|
536
|
-
return this.n2a_1.j23_1 ? it.vk(new Emitted(Companion_instance.n26('community.flock.wirespec.kotlin').q26() + 'Wirespec', this.s2a().u2a_1)) : it;
|
|
589
|
+
var it = protoOf(LanguageEmitter).tq.call(this, module_0, logger);
|
|
590
|
+
return this.u1w_1.ho_1 ? NonEmptyList__plus_impl_xqmb9(it, new Emitted(Companion_instance.lr('community.flock.wirespec.kotlin').or() + 'Wirespec', this.t1v().a1x_1)) : it;
|
|
537
591
|
};
|
|
538
|
-
protoOf(KotlinEmitter).
|
|
592
|
+
protoOf(KotlinEmitter).uq = function (definition, module_0, logger) {
|
|
539
593
|
// Inline function 'kotlin.let' call
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
var
|
|
543
|
-
var subPackageName = plus(this.i2a(), definition);
|
|
544
|
-
var tmp = subPackageName.q26() + it.k23_1;
|
|
594
|
+
var it = protoOf(LanguageEmitter).uq.call(this, definition, module_0, logger);
|
|
595
|
+
var subPackageName = plus(this.k1v(), definition);
|
|
596
|
+
var tmp = subPackageName.or() + it.io_1;
|
|
545
597
|
// Inline function 'kotlin.text.trimStart' call
|
|
546
|
-
var this_0 = trimMargin('\n |package ' + subPackageName.toString() + '\n |' + (Companion_instance_1.
|
|
598
|
+
var this_0 = trimMargin('\n |package ' + subPackageName.toString() + '\n |' + (Companion_instance_1.qq(module_0) ? this.v1w_1 : '') + '\n |' + it.jo_1 + '\n ');
|
|
547
599
|
var tmp$ret$0 = toString(trimStart(isCharSequence(this_0) ? this_0 : THROW_CCE()));
|
|
548
600
|
return new Emitted(tmp, tmp$ret$0);
|
|
549
601
|
};
|
|
550
|
-
function emitStatusInterfaces(
|
|
602
|
+
function emitStatusInterfaces($this, _this__u8e3s4) {
|
|
551
603
|
// Inline function 'kotlin.collections.map' call
|
|
552
|
-
var this_0 = _this__u8e3s4.
|
|
604
|
+
var this_0 = _this__u8e3s4.kp_1;
|
|
553
605
|
// Inline function 'kotlin.collections.mapTo' call
|
|
554
606
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
555
|
-
var
|
|
556
|
-
while (
|
|
557
|
-
var item =
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
destination.e(tmp$ret$0);
|
|
607
|
+
var _iterator__ex2g4s = this_0.t();
|
|
608
|
+
while (_iterator__ex2g4s.u()) {
|
|
609
|
+
var item = _iterator__ex2g4s.v();
|
|
610
|
+
var tmp$ret$0 = new Char(charCodeAt(item.qp_1, 0));
|
|
611
|
+
destination.x(tmp$ret$0);
|
|
561
612
|
}
|
|
562
613
|
var tmp = distinct(destination);
|
|
563
614
|
return joinToString(tmp, '\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitStatusInterfaces$lambda);
|
|
564
615
|
}
|
|
565
|
-
function emitResponseInterfaces(
|
|
616
|
+
function emitResponseInterfaces($this, _this__u8e3s4) {
|
|
566
617
|
// Inline function 'kotlin.collections.map' call
|
|
567
|
-
var this_0 = _this__u8e3s4.
|
|
618
|
+
var this_0 = _this__u8e3s4.kp_1;
|
|
568
619
|
// Inline function 'kotlin.collections.mapTo' call
|
|
569
620
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
570
|
-
var
|
|
571
|
-
while (
|
|
572
|
-
var item =
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
destination.e(tmp$ret$0);
|
|
621
|
+
var _iterator__ex2g4s = this_0.t();
|
|
622
|
+
while (_iterator__ex2g4s.u()) {
|
|
623
|
+
var item = _iterator__ex2g4s.v();
|
|
624
|
+
var tmp$ret$0 = emit_16($this, item.sp_1);
|
|
625
|
+
destination.x(tmp$ret$0);
|
|
576
626
|
}
|
|
577
627
|
var tmp = distinct(destination);
|
|
578
628
|
return joinToString(tmp, '\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitResponseInterfaces$lambda);
|
|
579
629
|
}
|
|
580
|
-
function emitConstructor(
|
|
581
|
-
// Inline function 'kotlin.let' call
|
|
630
|
+
function emitConstructor($this, _this__u8e3s4, endpoint) {
|
|
582
631
|
var tmp = get_pathParams(endpoint);
|
|
583
632
|
var tmp_0 = orNull(joinToString(tmp, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitConstructor$lambda($this)));
|
|
584
|
-
var tmp_1 = orNull(joinToString(endpoint.
|
|
585
|
-
var tmp_2 = orNull(joinToString(endpoint.
|
|
586
|
-
var tmp0_safe_receiver = _this__u8e3s4.
|
|
633
|
+
var tmp_1 = orNull(joinToString(endpoint.hp_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitConstructor$lambda_0($this)));
|
|
634
|
+
var tmp_2 = orNull(joinToString(endpoint.ip_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitConstructor$lambda_1($this)));
|
|
635
|
+
var tmp0_safe_receiver = _this__u8e3s4.np_1;
|
|
587
636
|
var tmp_3;
|
|
588
637
|
if (tmp0_safe_receiver == null) {
|
|
589
638
|
tmp_3 = null;
|
|
590
639
|
} else {
|
|
591
640
|
// Inline function 'kotlin.let' call
|
|
592
|
-
|
|
593
|
-
// Inline function 'community.flock.wirespec.emitters.kotlin.KotlinEndpointDefinitionEmitter.emitConstructor.<anonymous>' call
|
|
594
|
-
tmp_3 = Spacer_instance.s26(2) + 'override val body: ' + emit_13(tmp0_safe_receiver, $this) + ',';
|
|
641
|
+
tmp_3 = Spacer_instance.qr(2) + 'override val body: ' + emit_16($this, tmp0_safe_receiver) + ',';
|
|
595
642
|
}
|
|
596
|
-
// Inline function 'kotlin.
|
|
597
|
-
// Inline function 'community.flock.wirespec.emitters.kotlin.KotlinEndpointDefinitionEmitter.emitConstructor.<anonymous>' call
|
|
643
|
+
// Inline function 'kotlin.let' call
|
|
598
644
|
var it = joinToString(listOfNotNull([tmp_0, tmp_1, tmp_2, tmp_3]), ',\n');
|
|
599
|
-
return isBlank(it) ? 'object Request : Wirespec.Request<' +
|
|
645
|
+
return isBlank(it) ? 'object Request : Wirespec.Request<' + emit_16($this, _this__u8e3s4.np_1) + '> {' : 'class Request(\n' + it + '\n' + Spacer_instance.toString() + ') : Wirespec.Request<' + emit_16($this, _this__u8e3s4.np_1) + '> {';
|
|
600
646
|
}
|
|
601
|
-
function emitDeserializedParams(
|
|
602
|
-
// Inline function 'kotlin.let' call
|
|
647
|
+
function emitDeserializedParams($this, _this__u8e3s4, endpoint) {
|
|
603
648
|
var tmp = get_indexedPathParams(endpoint);
|
|
604
649
|
var tmp_0 = orNull(joinToString(tmp, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitDeserializedParams$lambda($this)));
|
|
605
|
-
var tmp_1 = orNull(joinToString(endpoint.
|
|
606
|
-
var tmp_2 = orNull(joinToString(endpoint.
|
|
607
|
-
var tmp0_safe_receiver = _this__u8e3s4.
|
|
650
|
+
var tmp_1 = orNull(joinToString(endpoint.hp_1, ',\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitDeserializedParams$lambda_0($this)));
|
|
651
|
+
var tmp_2 = orNull(joinToString(endpoint.ip_1, ',\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitDeserializedParams$lambda_1($this)));
|
|
652
|
+
var tmp0_safe_receiver = _this__u8e3s4.np_1;
|
|
608
653
|
var tmp_3;
|
|
609
654
|
if (tmp0_safe_receiver == null) {
|
|
610
655
|
tmp_3 = null;
|
|
611
656
|
} else {
|
|
612
657
|
// Inline function 'kotlin.let' call
|
|
613
|
-
|
|
614
|
-
// Inline function 'community.flock.wirespec.emitters.kotlin.KotlinEndpointDefinitionEmitter.emitDeserializedParams.<anonymous>' call
|
|
615
|
-
tmp_3 = Spacer_instance.s26(3) + 'body = serialization.deserializeBody(requireNotNull(request.body) { "body is null" }, typeOf<' + emit_13(tmp0_safe_receiver, $this) + '>()),';
|
|
658
|
+
tmp_3 = Spacer_instance.qr(3) + 'body = serialization.deserializeBody(requireNotNull(request.body) { "body is null" }, typeOf<' + emit_16($this, tmp0_safe_receiver) + '>()),';
|
|
616
659
|
}
|
|
617
|
-
// Inline function 'kotlin.
|
|
618
|
-
// Inline function 'community.flock.wirespec.emitters.kotlin.KotlinEndpointDefinitionEmitter.emitDeserializedParams.<anonymous>' call
|
|
660
|
+
// Inline function 'kotlin.let' call
|
|
619
661
|
var it = joinToString(listOfNotNull([tmp_0, tmp_1, tmp_2, tmp_3]), ',\n');
|
|
620
|
-
return isBlank(it) ? '' : '(\n' + it + '\n' + Spacer_instance.
|
|
662
|
+
return isBlank(it) ? '' : '(\n' + it + '\n' + Spacer_instance.qr(2) + ')';
|
|
621
663
|
}
|
|
622
|
-
function emitSerialized(
|
|
623
|
-
return trimMargin('\n |' + Spacer_instance.
|
|
664
|
+
function emitSerialized($this, _this__u8e3s4) {
|
|
665
|
+
return trimMargin('\n |' + Spacer_instance.qr(3) + 'is Response' + _this__u8e3s4.qp_1 + ' -> Wirespec.RawResponse(\n |' + Spacer_instance.qr(4) + 'statusCode = response.status,\n |' + Spacer_instance.qr(4) + 'headers = ' + $this.e1x(_this__u8e3s4) + ',\n |' + Spacer_instance.qr(4) + 'body = ' + (!(_this__u8e3s4.sp_1 == null) ? $this.d1x($this, _this__u8e3s4.sp_1) : 'null') + ',\n |' + Spacer_instance.qr(3) + ')\n ');
|
|
624
666
|
}
|
|
625
|
-
function emitDeserialized(
|
|
626
|
-
var tmp = Spacer_instance.
|
|
667
|
+
function emitDeserialized($this, _this__u8e3s4) {
|
|
668
|
+
var tmp = Spacer_instance.qr(3) + _this__u8e3s4.qp_1 + ' -> Response' + _this__u8e3s4.qp_1 + '(';
|
|
627
669
|
var tmp_0;
|
|
628
|
-
if (!(_this__u8e3s4.
|
|
629
|
-
tmp_0 = Spacer_instance.
|
|
670
|
+
if (!(_this__u8e3s4.sp_1 == null)) {
|
|
671
|
+
tmp_0 = Spacer_instance.qr(4) + 'body = serialization.deserializeBody(requireNotNull(response.body) { "body is null" }, typeOf<' + emit_16($this, _this__u8e3s4.sp_1) + '>()),';
|
|
630
672
|
} else {
|
|
631
|
-
tmp_0 = Spacer_instance.
|
|
673
|
+
tmp_0 = Spacer_instance.qr(4) + 'body = Unit,';
|
|
632
674
|
}
|
|
633
675
|
var tmp_1 = tmp_0;
|
|
634
|
-
return joinToString(listOfNotNull([tmp, tmp_1, orNull(joinToString(_this__u8e3s4.
|
|
676
|
+
return joinToString(listOfNotNull([tmp, tmp_1, orNull(joinToString(_this__u8e3s4.rp_1, ',\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitDeserialized$lambda($this))), Spacer_instance.qr(3) + ')']), '\n');
|
|
635
677
|
}
|
|
636
|
-
function emitSerializedMapEntry(
|
|
637
|
-
return '"' + _this__u8e3s4.
|
|
678
|
+
function emitSerializedMapEntry($this, _this__u8e3s4, type, fields) {
|
|
679
|
+
return '"' + _this__u8e3s4.ap_1.l1() + '" to ' + type + '.' + fields + '.' + $this.wq(_this__u8e3s4.ap_1) + '?.let{ serialization.serializeParam(it, typeOf<' + $this.xp(_this__u8e3s4.bp_1) + '>()) }.orEmpty()';
|
|
638
680
|
}
|
|
639
|
-
function emitDeserialized_0(
|
|
640
|
-
return Spacer_instance.
|
|
681
|
+
function emitDeserialized_0($this, _this__u8e3s4) {
|
|
682
|
+
return Spacer_instance.qr(3) + $this.wq(_this__u8e3s4.me_1.lp_1) + ' = serialization.deserializePath(request.path[' + _this__u8e3s4.le_1 + '], typeOf<' + $this.xp(_this__u8e3s4.me_1.mp_1) + '>())';
|
|
641
683
|
}
|
|
642
|
-
function emitDeserializedParams_0(
|
|
643
|
-
var trimMargin_0 = trimMargin('\n |' + Spacer_instance.
|
|
684
|
+
function emitDeserializedParams_0($this, _this__u8e3s4, type, fields, spaces, caseSensitive) {
|
|
685
|
+
var trimMargin_0 = trimMargin('\n |' + Spacer_instance.qr(spaces) + $this.wq(_this__u8e3s4.ap_1) + ' =\n |' + Spacer_instance.qr(spaces + 1 | 0) + type + '.' + fields + '\n |' + Spacer_instance.qr(spaces + 2 | 0) + '.entries\n |' + Spacer_instance.qr(spaces + 2 | 0) + '.find { it.key.equals("' + _this__u8e3s4.ap_1.l1() + '", ignoreCase = ' + !caseSensitive + ') }\n |' + Spacer_instance.qr(spaces + 2 | 0) + '?.let { serialization.deserializeParam(it.value, typeOf<' + $this.xp(_this__u8e3s4.bp_1) + '>()) }\n ');
|
|
644
686
|
var tmp;
|
|
645
|
-
if (_this__u8e3s4.
|
|
687
|
+
if (_this__u8e3s4.bp_1.du()) {
|
|
646
688
|
tmp = trimMargin_0;
|
|
647
689
|
} else {
|
|
648
|
-
tmp = trimMargin_0 + '\n' + Spacer_instance.
|
|
690
|
+
tmp = trimMargin_0 + '\n' + Spacer_instance.qr(spaces + 2 | 0) + '?: throw IllegalArgumentException("' + $this.wq(_this__u8e3s4.ap_1) + ' is null")';
|
|
649
691
|
}
|
|
650
692
|
return tmp;
|
|
651
693
|
}
|
|
652
|
-
function emitDeserializedParams$default(
|
|
694
|
+
function emitDeserializedParams$default($this, _this__u8e3s4, type, fields, spaces, caseSensitive, $super) {
|
|
653
695
|
spaces = spaces === VOID ? 3 : spaces;
|
|
654
696
|
caseSensitive = caseSensitive === VOID ? true : caseSensitive;
|
|
655
|
-
return emitDeserializedParams_0(
|
|
697
|
+
return emitDeserializedParams_0($this, _this__u8e3s4, type, fields, spaces, caseSensitive);
|
|
656
698
|
}
|
|
657
|
-
function emitIdentifier(
|
|
658
|
-
return 'request.path.' + $this.
|
|
699
|
+
function emitIdentifier($this, _this__u8e3s4) {
|
|
700
|
+
return 'request.path.' + $this.wq(_this__u8e3s4.lp_1) + '.let{serialization.serializePath(it, typeOf<' + $this.xp(_this__u8e3s4.mp_1) + '>())}';
|
|
659
701
|
}
|
|
660
|
-
function
|
|
661
|
-
var tmp1_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.
|
|
662
|
-
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : $this.
|
|
702
|
+
function emit_16($this, _this__u8e3s4) {
|
|
703
|
+
var tmp1_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.pp_1;
|
|
704
|
+
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : $this.xp(tmp1_safe_receiver);
|
|
663
705
|
var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : removeQuestionMark(tmp2_safe_receiver);
|
|
664
706
|
return tmp3_elvis_lhs == null ? 'Unit' : tmp3_elvis_lhs;
|
|
665
707
|
}
|
|
666
|
-
function
|
|
667
|
-
return $this.
|
|
708
|
+
function emit_17($this, _this__u8e3s4) {
|
|
709
|
+
return $this.wq(_this__u8e3s4.lp_1) + ': ' + $this.xp(_this__u8e3s4.mp_1);
|
|
668
710
|
}
|
|
669
|
-
function brace(
|
|
670
|
-
return wrap(
|
|
711
|
+
function brace($this, _this__u8e3s4) {
|
|
712
|
+
return wrap($this, _this__u8e3s4, '(', ')');
|
|
671
713
|
}
|
|
672
|
-
function wrap(
|
|
714
|
+
function wrap($this, _this__u8e3s4, prefix, postfix) {
|
|
673
715
|
var tmp;
|
|
674
716
|
// Inline function 'kotlin.text.isEmpty' call
|
|
675
717
|
if (charSequenceLength(_this__u8e3s4) === 0) {
|
|
@@ -679,19 +721,19 @@ function wrap(_this__u8e3s4, $this, prefix, postfix) {
|
|
|
679
721
|
}
|
|
680
722
|
return tmp;
|
|
681
723
|
}
|
|
682
|
-
function emitObject(
|
|
724
|
+
function emitObject($this, _this__u8e3s4, name, extends_0, spaces, block) {
|
|
683
725
|
var tmp;
|
|
684
|
-
if (_this__u8e3s4.
|
|
685
|
-
tmp = Spacer_instance.
|
|
726
|
+
if (_this__u8e3s4.r()) {
|
|
727
|
+
tmp = Spacer_instance.qr(spaces) + 'data object ' + name + ' : ' + extends_0;
|
|
686
728
|
} else {
|
|
687
|
-
var tmp_0 = Spacer_instance.
|
|
688
|
-
tmp = trimMargin('\n |' + tmp_0 + 'data class ' + name + '(\n |' + joinToString(_this__u8e3s4, ',\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitObject$lambda(spaces, block)) + ',\n |' + Spacer_instance.
|
|
729
|
+
var tmp_0 = Spacer_instance.qr(spaces);
|
|
730
|
+
tmp = trimMargin('\n |' + tmp_0 + 'data class ' + name + '(\n |' + joinToString(_this__u8e3s4, ',\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitObject$lambda(spaces, block)) + ',\n |' + Spacer_instance.qr(spaces) + ') : ' + extends_0 + '\n ');
|
|
689
731
|
}
|
|
690
732
|
return tmp;
|
|
691
733
|
}
|
|
692
|
-
function emitObject$default(
|
|
734
|
+
function emitObject$default($this, _this__u8e3s4, name, extends_0, spaces, block, $super) {
|
|
693
735
|
spaces = spaces === VOID ? 1 : spaces;
|
|
694
|
-
return emitObject(
|
|
736
|
+
return emitObject($this, _this__u8e3s4, name, extends_0, spaces, block);
|
|
695
737
|
}
|
|
696
738
|
function KotlinEndpointDefinitionEmitter$emit$lambda(it) {
|
|
697
739
|
// Inline function 'kotlin.text.trimStart' call
|
|
@@ -699,66 +741,66 @@ function KotlinEndpointDefinitionEmitter$emit$lambda(it) {
|
|
|
699
741
|
}
|
|
700
742
|
function KotlinEndpointDefinitionEmitter$emit$lambda_0(this$0) {
|
|
701
743
|
return function (it) {
|
|
702
|
-
return
|
|
744
|
+
return emit_17(this$0, it);
|
|
703
745
|
};
|
|
704
746
|
}
|
|
705
747
|
function KotlinEndpointDefinitionEmitter$emit$lambda_1(this$0) {
|
|
706
748
|
return function (it) {
|
|
707
|
-
return this$0.
|
|
749
|
+
return this$0.wp(it);
|
|
708
750
|
};
|
|
709
751
|
}
|
|
710
752
|
function KotlinEndpointDefinitionEmitter$emit$lambda_2(this$0) {
|
|
711
753
|
return function (it) {
|
|
712
|
-
return this$0.
|
|
754
|
+
return this$0.wp(it);
|
|
713
755
|
};
|
|
714
756
|
}
|
|
715
757
|
function KotlinEndpointDefinitionEmitter$emit$lambda_3(this$0) {
|
|
716
758
|
return function (it) {
|
|
717
|
-
return this$0.
|
|
759
|
+
return this$0.y1v(it);
|
|
718
760
|
};
|
|
719
761
|
}
|
|
720
762
|
function KotlinEndpointDefinitionEmitter$emit$lambda_4(this$0) {
|
|
721
763
|
return function (it) {
|
|
722
|
-
return emitSerialized(
|
|
764
|
+
return emitSerialized(this$0, it);
|
|
723
765
|
};
|
|
724
766
|
}
|
|
725
767
|
function KotlinEndpointDefinitionEmitter$emit$lambda_5(this$0) {
|
|
726
768
|
return function (it) {
|
|
727
|
-
return emitDeserialized(
|
|
769
|
+
return emitDeserialized(this$0, it);
|
|
728
770
|
};
|
|
729
771
|
}
|
|
730
772
|
function KotlinEndpointDefinitionEmitter$emit$lambda_6(it) {
|
|
731
773
|
return emit(it);
|
|
732
774
|
}
|
|
733
775
|
function KotlinEndpointDefinitionEmitter$emitStatusInterfaces$lambda(it) {
|
|
734
|
-
return Spacer_instance.toString() + 'sealed interface Response' + toString_0(it.
|
|
776
|
+
return Spacer_instance.toString() + 'sealed interface Response' + toString_0(it.h1_1) + 'XX<T: Any> : Response<T>';
|
|
735
777
|
}
|
|
736
778
|
function KotlinEndpointDefinitionEmitter$emitResponseInterfaces$lambda(it) {
|
|
737
779
|
return Spacer_instance.toString() + 'sealed interface Response' + concatGenerics(it) + ' : Response<' + it + '>';
|
|
738
780
|
}
|
|
739
781
|
function KotlinEndpointDefinitionEmitter$emit$lambda_7(this$0) {
|
|
740
782
|
return function (it) {
|
|
741
|
-
return this$0.
|
|
783
|
+
return this$0.wq(it.lp_1);
|
|
742
784
|
};
|
|
743
785
|
}
|
|
744
786
|
function KotlinEndpointDefinitionEmitter$emit$lambda_8(this$0) {
|
|
745
787
|
return function (it) {
|
|
746
|
-
return this$0.
|
|
788
|
+
return this$0.wq(it.ap_1);
|
|
747
789
|
};
|
|
748
790
|
}
|
|
749
791
|
function KotlinEndpointDefinitionEmitter$emit$lambda_9(this$0) {
|
|
750
792
|
return function (it) {
|
|
751
|
-
return this$0.
|
|
793
|
+
return this$0.wq(it.ap_1);
|
|
752
794
|
};
|
|
753
795
|
}
|
|
754
796
|
function KotlinEndpointDefinitionEmitter$emit$lambda_10(this$0) {
|
|
755
797
|
return function (it) {
|
|
756
798
|
var tmp;
|
|
757
799
|
if (it instanceof Literal) {
|
|
758
|
-
tmp = '"' + it.
|
|
800
|
+
tmp = '"' + it.hq_1 + '"';
|
|
759
801
|
} else {
|
|
760
802
|
if (it instanceof Param) {
|
|
761
|
-
tmp = emitIdentifier(
|
|
803
|
+
tmp = emitIdentifier(this$0, it);
|
|
762
804
|
} else {
|
|
763
805
|
noWhenBranchMatchedException();
|
|
764
806
|
}
|
|
@@ -768,119 +810,755 @@ function KotlinEndpointDefinitionEmitter$emit$lambda_10(this$0) {
|
|
|
768
810
|
}
|
|
769
811
|
function KotlinEndpointDefinitionEmitter$emitRequestHeaders$lambda(this$0) {
|
|
770
812
|
return function (it) {
|
|
771
|
-
return emitSerializedMapEntry(
|
|
813
|
+
return emitSerializedMapEntry(this$0, it, 'request', 'headers');
|
|
772
814
|
};
|
|
773
815
|
}
|
|
774
816
|
function KotlinEndpointDefinitionEmitter$emitQueries$lambda(this$0) {
|
|
775
817
|
return function (it) {
|
|
776
|
-
return emitSerializedMapEntry(
|
|
818
|
+
return emitSerializedMapEntry(this$0, it, 'request', 'queries');
|
|
777
819
|
};
|
|
778
820
|
}
|
|
779
821
|
function KotlinEndpointDefinitionEmitter$emit$lambda_11(this$0) {
|
|
780
822
|
return function (it) {
|
|
781
|
-
return 'val ' + this$0.
|
|
823
|
+
return 'val ' + this$0.wp(it);
|
|
782
824
|
};
|
|
783
825
|
}
|
|
784
826
|
function KotlinEndpointDefinitionEmitter$emit$lambda_12(this$0) {
|
|
785
827
|
return function (it) {
|
|
786
|
-
return this$0.
|
|
828
|
+
return this$0.wq(it.ap_1);
|
|
787
829
|
};
|
|
788
830
|
}
|
|
789
831
|
function KotlinEndpointDefinitionEmitter$emit$lambda_13(this$0) {
|
|
790
832
|
return function (it) {
|
|
791
|
-
return this$0.
|
|
833
|
+
return this$0.wp(it);
|
|
792
834
|
};
|
|
793
835
|
}
|
|
794
836
|
function KotlinEndpointDefinitionEmitter$emitConstructor$lambda(this$0) {
|
|
795
837
|
return function (it) {
|
|
796
|
-
return Spacer_instance.
|
|
838
|
+
return Spacer_instance.qr(2) + emit_17(this$0, it);
|
|
797
839
|
};
|
|
798
840
|
}
|
|
799
841
|
function KotlinEndpointDefinitionEmitter$emitConstructor$lambda_0(this$0) {
|
|
800
842
|
return function (it) {
|
|
801
|
-
return Spacer_instance.
|
|
843
|
+
return Spacer_instance.qr(2) + this$0.wp(it);
|
|
802
844
|
};
|
|
803
845
|
}
|
|
804
846
|
function KotlinEndpointDefinitionEmitter$emitConstructor$lambda_1(this$0) {
|
|
805
847
|
return function (it) {
|
|
806
|
-
return Spacer_instance.
|
|
848
|
+
return Spacer_instance.qr(2) + this$0.wp(it);
|
|
807
849
|
};
|
|
808
850
|
}
|
|
809
851
|
function KotlinEndpointDefinitionEmitter$emitDeserializedParams$lambda(this$0) {
|
|
810
852
|
return function (it) {
|
|
811
|
-
return emitDeserialized_0(
|
|
853
|
+
return emitDeserialized_0(this$0, it);
|
|
812
854
|
};
|
|
813
855
|
}
|
|
814
856
|
function KotlinEndpointDefinitionEmitter$emitDeserializedParams$lambda_0(this$0) {
|
|
815
857
|
return function (it) {
|
|
816
|
-
return emitDeserializedParams$default(
|
|
858
|
+
return emitDeserializedParams$default(this$0, it, 'request', 'queries');
|
|
817
859
|
};
|
|
818
860
|
}
|
|
819
861
|
function KotlinEndpointDefinitionEmitter$emitDeserializedParams$lambda_1(this$0) {
|
|
820
862
|
return function (it) {
|
|
821
|
-
return emitDeserializedParams$default(
|
|
863
|
+
return emitDeserializedParams$default(this$0, it, 'request', 'headers', VOID, false);
|
|
822
864
|
};
|
|
823
865
|
}
|
|
824
866
|
function KotlinEndpointDefinitionEmitter$emitHeaders$lambda(this$0) {
|
|
825
867
|
return function (it) {
|
|
826
|
-
return emitSerializedMapEntry(
|
|
868
|
+
return emitSerializedMapEntry(this$0, it, 'response', 'headers');
|
|
827
869
|
};
|
|
828
870
|
}
|
|
829
871
|
function KotlinEndpointDefinitionEmitter$emitDeserialized$lambda(this$0) {
|
|
830
872
|
return function (it) {
|
|
831
|
-
return emitDeserializedParams_0(
|
|
873
|
+
return emitDeserializedParams_0(this$0, it, 'response', 'headers', 4, false);
|
|
832
874
|
};
|
|
833
875
|
}
|
|
834
876
|
function KotlinEndpointDefinitionEmitter$emitObject$lambda($spaces, $block) {
|
|
835
877
|
return function (it) {
|
|
836
|
-
return Spacer_instance.
|
|
878
|
+
return Spacer_instance.qr($spaces + 1 | 0) + 'val ' + $block(it);
|
|
837
879
|
};
|
|
838
880
|
}
|
|
839
881
|
function KotlinEndpointDefinitionEmitter() {
|
|
840
882
|
}
|
|
841
|
-
function sanitizeNegative(
|
|
842
|
-
|
|
843
|
-
if (startsWith(_this__u8e3s4, '-')) {
|
|
844
|
-
// Inline function 'kotlin.text.substring' call
|
|
845
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
846
|
-
tmp = '__' + _this__u8e3s4.substring(1);
|
|
847
|
-
} else {
|
|
848
|
-
tmp = _this__u8e3s4;
|
|
849
|
-
}
|
|
850
|
-
return tmp;
|
|
883
|
+
function sanitizeNegative($this, _this__u8e3s4) {
|
|
884
|
+
return startsWith(_this__u8e3s4, '-') ? '__' + substring(_this__u8e3s4, 1) : _this__u8e3s4;
|
|
851
885
|
}
|
|
852
|
-
function sanitizeEnum(
|
|
853
|
-
return $this.
|
|
886
|
+
function sanitizeEnum($this, _this__u8e3s4) {
|
|
887
|
+
return $this.z1v(joinToString(split(sanitizeNegative($this, _this__u8e3s4), ['-', ', ', '.', ' ', '//']), '_'));
|
|
854
888
|
}
|
|
855
889
|
function KotlinEnumDefinitionEmitter$emit$lambda(this$0) {
|
|
856
890
|
return function (it) {
|
|
857
|
-
return this$0.
|
|
891
|
+
return this$0.a1w(sanitizeEnum(this$0, it)) + '("' + it + '")';
|
|
858
892
|
};
|
|
859
893
|
}
|
|
860
894
|
function KotlinEnumDefinitionEmitter() {
|
|
861
895
|
}
|
|
862
896
|
function Companion() {
|
|
863
897
|
Companion_instance_2 = this;
|
|
864
|
-
this.
|
|
898
|
+
this.f1x_1 = setOf(['as', 'break', 'class', 'continue', 'do', 'else', 'false', 'for', 'fun', 'if', 'in', 'interface', 'internal', 'is', 'null', 'object', 'open', 'package', 'return', 'super', 'this', 'throw', 'true', 'try', 'typealias', 'typeof', 'val', 'var', 'when', 'while', 'private', 'public']);
|
|
865
899
|
}
|
|
866
900
|
var Companion_instance_2;
|
|
867
|
-
function
|
|
901
|
+
function Companion_getInstance_0() {
|
|
868
902
|
if (Companion_instance_2 == null)
|
|
869
903
|
new Companion();
|
|
870
904
|
return Companion_instance_2;
|
|
871
905
|
}
|
|
872
906
|
function KotlinIdentifierEmitter$sanitize$lambda(it) {
|
|
873
|
-
return isLetterOrDigit(it.
|
|
907
|
+
return isLetterOrDigit(it.h1_1) || listOf(new Char(_Char___init__impl__6a9atx(95))).u1(it);
|
|
874
908
|
}
|
|
875
909
|
function KotlinIdentifierEmitter() {
|
|
876
910
|
}
|
|
911
|
+
function KotlinIrEmitter$shared$o$source$lambda(element, transformer) {
|
|
912
|
+
var tmp;
|
|
913
|
+
if (element instanceof File) {
|
|
914
|
+
// Inline function 'kotlin.collections.partition' call
|
|
915
|
+
var this_0 = element.u1m_1;
|
|
916
|
+
var first = ArrayList_init_$Create$_0();
|
|
917
|
+
var second = ArrayList_init_$Create$_0();
|
|
918
|
+
var _iterator__ex2g4s = this_0.t();
|
|
919
|
+
while (_iterator__ex2g4s.u()) {
|
|
920
|
+
var element_0 = _iterator__ex2g4s.v();
|
|
921
|
+
if (element_0 instanceof Package) {
|
|
922
|
+
first.x(element_0);
|
|
923
|
+
} else {
|
|
924
|
+
second.x(element_0);
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
var _destruct__k2r9zo = new Pair(first, second);
|
|
928
|
+
var packageElements = _destruct__k2r9zo.ne();
|
|
929
|
+
var rest = _destruct__k2r9zo.oe();
|
|
930
|
+
tmp = element.x1m(VOID, plus_2(plus_1(packageElements, import_0('kotlin.reflect', 'KType')), rest));
|
|
931
|
+
} else {
|
|
932
|
+
tmp = element;
|
|
933
|
+
}
|
|
934
|
+
var transformed = tmp;
|
|
935
|
+
return transformChildren(transformed, transformer);
|
|
936
|
+
}
|
|
937
|
+
function KotlinIrEmitter$shared$o$source$lambda_0(this$0) {
|
|
938
|
+
return function (element, transformer) {
|
|
939
|
+
var tmp;
|
|
940
|
+
if (element instanceof Namespace) {
|
|
941
|
+
var injected = element.z1m_1.equals(Companion_getInstance().m1h('Wirespec')) ? this$0.h1x_1 : emptyList();
|
|
942
|
+
var tmp_0;
|
|
943
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
944
|
+
if (!injected.r()) {
|
|
945
|
+
tmp_0 = withElements(element, plus_2(element.v1m(), injected));
|
|
946
|
+
} else {
|
|
947
|
+
tmp_0 = element;
|
|
948
|
+
}
|
|
949
|
+
tmp = tmp_0;
|
|
950
|
+
} else {
|
|
951
|
+
tmp = element;
|
|
952
|
+
}
|
|
953
|
+
var transformed = tmp;
|
|
954
|
+
return transformChildren(transformed, transformer);
|
|
955
|
+
};
|
|
956
|
+
}
|
|
957
|
+
function _get_sanitizationConfig__sns434($this) {
|
|
958
|
+
var tmp0 = $this.o1x_1;
|
|
959
|
+
var tmp = KProperty1;
|
|
960
|
+
// Inline function 'kotlin.getValue' call
|
|
961
|
+
getPropertyCallableRef('sanitizationConfig', 1, tmp, KotlinIrEmitter$_get_sanitizationConfig_$ref_tnafwf(), null);
|
|
962
|
+
return tmp0.l1();
|
|
963
|
+
}
|
|
964
|
+
function sanitize_0($this, _this__u8e3s4) {
|
|
965
|
+
// Inline function 'kotlin.collections.mapIndexed' call
|
|
966
|
+
var this_0 = split(_this__u8e3s4.l1(), ['.', ' ']);
|
|
967
|
+
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
968
|
+
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
969
|
+
var index = 0;
|
|
970
|
+
var _iterator__ex2g4s = this_0.t();
|
|
971
|
+
while (_iterator__ex2g4s.u()) {
|
|
972
|
+
var item = _iterator__ex2g4s.v();
|
|
973
|
+
var _unary__edvuaz = index;
|
|
974
|
+
index = _unary__edvuaz + 1 | 0;
|
|
975
|
+
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance_1.oq(item) : item;
|
|
976
|
+
destination.x(tmp$ret$0);
|
|
977
|
+
}
|
|
978
|
+
// Inline function 'kotlin.text.filter' call
|
|
979
|
+
var tmp0 = joinToString(destination, '');
|
|
980
|
+
// Inline function 'kotlin.text.filterTo' call
|
|
981
|
+
var destination_0 = StringBuilder_init_$Create$();
|
|
982
|
+
var inductionVariable = 0;
|
|
983
|
+
var last = charSequenceLength(tmp0);
|
|
984
|
+
if (inductionVariable < last)
|
|
985
|
+
do {
|
|
986
|
+
var index_0 = inductionVariable;
|
|
987
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
988
|
+
var element = charSequenceGet(tmp0, index_0);
|
|
989
|
+
if (isLetterOrDigit(element) || element === _Char___init__impl__6a9atx(95)) {
|
|
990
|
+
destination_0.s(element);
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
while (inductionVariable < last);
|
|
994
|
+
var tmp$ret$5 = destination_0.toString();
|
|
995
|
+
// Inline function 'kotlin.let' call
|
|
996
|
+
var it = sanitizeFirstIsDigit_0($this, tmp$ret$5);
|
|
997
|
+
var tmp;
|
|
998
|
+
if (_this__u8e3s4 instanceof FieldIdentifier) {
|
|
999
|
+
tmp = sanitizeKeywords_0($this, it);
|
|
1000
|
+
} else {
|
|
1001
|
+
tmp = it;
|
|
1002
|
+
}
|
|
1003
|
+
return tmp;
|
|
1004
|
+
}
|
|
1005
|
+
function sanitizeFirstIsDigit_0($this, _this__u8e3s4) {
|
|
1006
|
+
var tmp;
|
|
1007
|
+
var tmp0_safe_receiver = firstOrNull(_this__u8e3s4);
|
|
1008
|
+
var tmp_0;
|
|
1009
|
+
var tmp_1 = tmp0_safe_receiver;
|
|
1010
|
+
if ((tmp_1 == null ? null : new Char(tmp_1)) == null) {
|
|
1011
|
+
tmp_0 = null;
|
|
1012
|
+
} else {
|
|
1013
|
+
tmp_0 = isDigit(tmp0_safe_receiver);
|
|
1014
|
+
}
|
|
1015
|
+
if (tmp_0 === true) {
|
|
1016
|
+
tmp = '_' + _this__u8e3s4;
|
|
1017
|
+
} else {
|
|
1018
|
+
tmp = _this__u8e3s4;
|
|
1019
|
+
}
|
|
1020
|
+
return tmp;
|
|
1021
|
+
}
|
|
1022
|
+
function sanitizeKeywords_0($this, _this__u8e3s4) {
|
|
1023
|
+
return Companion_getInstance_1().q1x_1.u1(_this__u8e3s4) ? addBackticks(_this__u8e3s4) : _this__u8e3s4;
|
|
1024
|
+
}
|
|
1025
|
+
function sanitizeSymbol($this, _this__u8e3s4) {
|
|
1026
|
+
// Inline function 'kotlin.collections.mapIndexed' call
|
|
1027
|
+
var this_0 = split(_this__u8e3s4, ['.', ' ', '-']);
|
|
1028
|
+
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
1029
|
+
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1030
|
+
var index = 0;
|
|
1031
|
+
var _iterator__ex2g4s = this_0.t();
|
|
1032
|
+
while (_iterator__ex2g4s.u()) {
|
|
1033
|
+
var item = _iterator__ex2g4s.v();
|
|
1034
|
+
var _unary__edvuaz = index;
|
|
1035
|
+
index = _unary__edvuaz + 1 | 0;
|
|
1036
|
+
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance_1.oq(item) : item;
|
|
1037
|
+
destination.x(tmp$ret$0);
|
|
1038
|
+
}
|
|
1039
|
+
// Inline function 'kotlin.text.filter' call
|
|
1040
|
+
var tmp0 = joinToString(destination, '');
|
|
1041
|
+
// Inline function 'kotlin.text.filterTo' call
|
|
1042
|
+
var destination_0 = StringBuilder_init_$Create$();
|
|
1043
|
+
var inductionVariable = 0;
|
|
1044
|
+
var last = charSequenceLength(tmp0);
|
|
1045
|
+
if (inductionVariable < last)
|
|
1046
|
+
do {
|
|
1047
|
+
var index_0 = inductionVariable;
|
|
1048
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
1049
|
+
var element = charSequenceGet(tmp0, index_0);
|
|
1050
|
+
if (isLetterOrDigit(element) || element === _Char___init__impl__6a9atx(95)) {
|
|
1051
|
+
destination_0.s(element);
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
while (inductionVariable < last);
|
|
1055
|
+
var tmp$ret$5 = destination_0.toString();
|
|
1056
|
+
return sanitizeFirstIsDigit_0($this, tmp$ret$5);
|
|
1057
|
+
}
|
|
1058
|
+
function sanitizeEnum_0($this, _this__u8e3s4) {
|
|
1059
|
+
return sanitizeKeywords_0($this, sanitizeFirstIsDigit_0($this, joinToString(split(_this__u8e3s4, ['-', ', ', '.', ' ', '//']), '_')));
|
|
1060
|
+
}
|
|
1061
|
+
function buildImports($this, _this__u8e3s4) {
|
|
1062
|
+
// Inline function 'kotlin.collections.distinctBy' call
|
|
1063
|
+
var this_0 = importReferences(_this__u8e3s4);
|
|
1064
|
+
var set = HashSet_init_$Create$();
|
|
1065
|
+
var list = ArrayList_init_$Create$_0();
|
|
1066
|
+
var _iterator__ex2g4s = this_0.t();
|
|
1067
|
+
while (_iterator__ex2g4s.u()) {
|
|
1068
|
+
var e = _iterator__ex2g4s.v();
|
|
1069
|
+
var key = e.lu_1;
|
|
1070
|
+
if (set.x(key)) {
|
|
1071
|
+
list.x(e);
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
// Inline function 'kotlin.collections.map' call
|
|
1075
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1076
|
+
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(list, 10));
|
|
1077
|
+
var _iterator__ex2g4s_0 = list.t();
|
|
1078
|
+
while (_iterator__ex2g4s_0.u()) {
|
|
1079
|
+
var item = _iterator__ex2g4s_0.v();
|
|
1080
|
+
var tmp$ret$2 = import_0($this.k1v().mr_1 + '.model', item.lu_1);
|
|
1081
|
+
destination.x(tmp$ret$2);
|
|
1082
|
+
}
|
|
1083
|
+
return destination;
|
|
1084
|
+
}
|
|
1085
|
+
function injectCompanionObject($this, _this__u8e3s4, endpoint) {
|
|
1086
|
+
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1087
|
+
var scope = new TransformScope(_this__u8e3s4);
|
|
1088
|
+
// Inline function 'community.flock.wirespec.ir.core.TransformScope.injectAfter' call
|
|
1089
|
+
var tmp = scope;
|
|
1090
|
+
// Inline function 'community.flock.wirespec.ir.core.injectAfter' call
|
|
1091
|
+
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1092
|
+
var this_0 = scope.z1t_1;
|
|
1093
|
+
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1094
|
+
// Inline function 'kotlin.apply' call
|
|
1095
|
+
var this_1 = new TransformerBuilder();
|
|
1096
|
+
this_1.d1h(KotlinIrEmitter$injectCompanionObject$lambda($this, endpoint));
|
|
1097
|
+
var tmp$ret$2 = this_1.e1h();
|
|
1098
|
+
tmp.z1t_1 = transform(this_0, tmp$ret$2);
|
|
1099
|
+
var tmp_0 = scope.z1t_1;
|
|
1100
|
+
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1101
|
+
}
|
|
1102
|
+
function buildCompanionObject($this, endpoint) {
|
|
1103
|
+
var pathTemplate = '/' + joinToString(endpoint.gp_1, '/', VOID, VOID, VOID, VOID, KotlinIrEmitter$buildCompanionObject$lambda);
|
|
1104
|
+
// Inline function 'kotlin.let' call
|
|
1105
|
+
var p0 = trimMargin('\n |companion object: Wirespec.Server<Request, Response<*>>, Wirespec.Client<Request, Response<*>> {\n | override val pathTemplate = "' + pathTemplate + '"\n | override val method = "' + endpoint.fp_1.toString() + '"\n | override fun server(serialization: Wirespec.Serialization) = object : Wirespec.ServerEdge<Request, Response<*>> {\n | override fun from(request: Wirespec.RawRequest) = fromRawRequest(serialization, request)\n | override fun to(response: Response<*>) = toRawResponse(serialization, response)\n | }\n | override fun client(serialization: Wirespec.Serialization) = object : Wirespec.ClientEdge<Request, Response<*>> {\n | override fun to(request: Request) = toRawRequest(serialization, request)\n | override fun from(response: Wirespec.RawResponse) = fromRawResponse(serialization, response)\n | }\n |}\n ');
|
|
1106
|
+
return raw(p0);
|
|
1107
|
+
}
|
|
1108
|
+
function Companion_0() {
|
|
1109
|
+
Companion_instance_3 = this;
|
|
1110
|
+
this.q1x_1 = setOf(['as', 'break', 'class', 'continue', 'do', 'else', 'false', 'for', 'fun', 'if', 'in', 'interface', 'internal', 'is', 'null', 'object', 'open', 'package', 'return', 'super', 'this', 'throw', 'true', 'try', 'typealias', 'typeof', 'val', 'var', 'when', 'while', 'private', 'public']);
|
|
1111
|
+
}
|
|
1112
|
+
var Companion_instance_3;
|
|
1113
|
+
function Companion_getInstance_1() {
|
|
1114
|
+
if (Companion_instance_3 == null)
|
|
1115
|
+
new Companion_0();
|
|
1116
|
+
return Companion_instance_3;
|
|
1117
|
+
}
|
|
1118
|
+
function KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda(it) {
|
|
1119
|
+
return addBackticks(it);
|
|
1120
|
+
}
|
|
1121
|
+
function KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0) {
|
|
1122
|
+
return function (name) {
|
|
1123
|
+
var sanitized = name.n1h_1.a1() > 1 ? name.r1l() : sanitizeSymbol(this$0, name.s1h());
|
|
1124
|
+
return new Name(listOf(sanitized));
|
|
1125
|
+
};
|
|
1126
|
+
}
|
|
1127
|
+
function KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0) {
|
|
1128
|
+
return function (name) {
|
|
1129
|
+
return new Name(listOf(sanitizeSymbol(this$0, name.r1l())));
|
|
1130
|
+
};
|
|
1131
|
+
}
|
|
1132
|
+
function KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_2(this$0) {
|
|
1133
|
+
return function (it) {
|
|
1134
|
+
return sanitizeSymbol(this$0, it);
|
|
1135
|
+
};
|
|
1136
|
+
}
|
|
1137
|
+
function KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
1138
|
+
return function (stmt, tr) {
|
|
1139
|
+
var tmp;
|
|
1140
|
+
if (stmt instanceof FunctionCall) {
|
|
1141
|
+
var tmp_0;
|
|
1142
|
+
if (stmt.b1m_1.s1h() === 'validate') {
|
|
1143
|
+
tmp_0 = transformChildren_0(stmt.f1m(VOID, emptyList()), tr);
|
|
1144
|
+
} else {
|
|
1145
|
+
tmp_0 = transformChildren_0(stmt, tr);
|
|
1146
|
+
}
|
|
1147
|
+
tmp = tmp_0;
|
|
1148
|
+
} else {
|
|
1149
|
+
if (stmt instanceof ConstructorStatement) {
|
|
1150
|
+
var tmp_1 = tr.r1t(stmt.p1m_1);
|
|
1151
|
+
// Inline function 'kotlin.collections.map' call
|
|
1152
|
+
var this_0 = stmt.q1m_1;
|
|
1153
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1154
|
+
var destination = ArrayList_init_$Create$(this_0.a1());
|
|
1155
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
1156
|
+
var _iterator__ex2g4s = this_0.j1().t();
|
|
1157
|
+
while (_iterator__ex2g4s.u()) {
|
|
1158
|
+
var item = _iterator__ex2g4s.v();
|
|
1159
|
+
// Inline function 'kotlin.collections.component1' call
|
|
1160
|
+
var name = item.k1();
|
|
1161
|
+
// Inline function 'kotlin.collections.component2' call
|
|
1162
|
+
var expr = item.l1();
|
|
1163
|
+
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), name), tr.u1t(expr));
|
|
1164
|
+
destination.x(tmp$ret$3);
|
|
1165
|
+
}
|
|
1166
|
+
tmp = new ConstructorStatement(tmp_1, toMap(destination));
|
|
1167
|
+
} else {
|
|
1168
|
+
tmp = transformChildren_0(stmt, tr);
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
return tmp;
|
|
1172
|
+
};
|
|
1173
|
+
}
|
|
1174
|
+
function KotlinIrEmitter$sanitizationConfig$delegate$lambda(this$0) {
|
|
1175
|
+
return function () {
|
|
1176
|
+
var tmp = Companion_getInstance_1().q1x_1;
|
|
1177
|
+
var tmp_0 = KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda;
|
|
1178
|
+
var tmp_1 = KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0);
|
|
1179
|
+
var tmp_2 = KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0);
|
|
1180
|
+
var tmp_3 = KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_2(this$0);
|
|
1181
|
+
return new SanitizationConfig(tmp, tmp_0, tmp_1, tmp_2, tmp_3, KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0));
|
|
1182
|
+
};
|
|
1183
|
+
}
|
|
1184
|
+
function KotlinIrEmitter$_get_sanitizationConfig_$ref_tnafwf() {
|
|
1185
|
+
return function (p0) {
|
|
1186
|
+
return _get_sanitizationConfig__sns434(p0);
|
|
1187
|
+
};
|
|
1188
|
+
}
|
|
1189
|
+
function KotlinIrEmitter$shared$1() {
|
|
1190
|
+
this.g1x_1 = 'community.flock.wirespec.kotlin';
|
|
1191
|
+
this.h1x_1 = convertClientServer(new Shared(this.g1x_1));
|
|
1192
|
+
var tmp = this;
|
|
1193
|
+
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1194
|
+
var this_0 = convert(new Shared(this.g1x_1));
|
|
1195
|
+
var scope = new TransformScope(this_0);
|
|
1196
|
+
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1197
|
+
var tmp_0 = scope;
|
|
1198
|
+
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1199
|
+
var this_1 = scope.z1t_1;
|
|
1200
|
+
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1201
|
+
// Inline function 'kotlin.apply' call
|
|
1202
|
+
var this_2 = new TransformerBuilder();
|
|
1203
|
+
this_2.d1h(KotlinIrEmitter$shared$o$source$lambda);
|
|
1204
|
+
var tmp$ret$2 = this_2.e1h();
|
|
1205
|
+
tmp_0.z1t_1 = transform(this_1, tmp$ret$2);
|
|
1206
|
+
// Inline function 'community.flock.wirespec.ir.core.TransformScope.injectAfter' call
|
|
1207
|
+
var tmp_1 = scope;
|
|
1208
|
+
// Inline function 'community.flock.wirespec.ir.core.injectAfter' call
|
|
1209
|
+
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1210
|
+
var this_3 = scope.z1t_1;
|
|
1211
|
+
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1212
|
+
// Inline function 'kotlin.apply' call
|
|
1213
|
+
var this_4 = new TransformerBuilder();
|
|
1214
|
+
this_4.d1h(KotlinIrEmitter$shared$o$source$lambda_0(this));
|
|
1215
|
+
var tmp$ret$7 = this_4.e1h();
|
|
1216
|
+
tmp_1.z1t_1 = transform(this_3, tmp$ret$7);
|
|
1217
|
+
var tmp_2 = scope.z1t_1;
|
|
1218
|
+
var tmp$ret$12 = isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
|
|
1219
|
+
tmp.i1x_1 = generateKotlin(tmp$ret$12);
|
|
1220
|
+
}
|
|
1221
|
+
protoOf(KotlinIrEmitter$shared$1).r1w = function () {
|
|
1222
|
+
return this.i1x_1;
|
|
1223
|
+
};
|
|
1224
|
+
function KotlinIrEmitter$emit$lambda(this$0) {
|
|
1225
|
+
return function () {
|
|
1226
|
+
return new File(Companion_getInstance().m1h(Companion_instance.lr('community.flock.wirespec.kotlin').or() + 'Wirespec'), listOf(new RawElement(this$0.t1v().r1w())));
|
|
1227
|
+
};
|
|
1228
|
+
}
|
|
1229
|
+
function KotlinIrEmitter$emit$lambda_0(element, transformer) {
|
|
1230
|
+
var tmp;
|
|
1231
|
+
if (element instanceof Struct) {
|
|
1232
|
+
tmp = element.g1n_1.r() ? element.l1n(VOID, VOID, listOf(new Constructor(emptyList(), emptyList()))) : element;
|
|
1233
|
+
} else {
|
|
1234
|
+
tmp = element;
|
|
1235
|
+
}
|
|
1236
|
+
var transformed = tmp;
|
|
1237
|
+
return transformChildren(transformed, transformer);
|
|
1238
|
+
}
|
|
1239
|
+
function KotlinIrEmitter$emit$lambda$lambda(this$0) {
|
|
1240
|
+
return function (it) {
|
|
1241
|
+
return sanitizeEnum_0(this$0, it);
|
|
1242
|
+
};
|
|
1243
|
+
}
|
|
1244
|
+
function KotlinIrEmitter$emit$lambda_1(this$0) {
|
|
1245
|
+
return function (element, transformer) {
|
|
1246
|
+
var tmp;
|
|
1247
|
+
if (element instanceof Enum) {
|
|
1248
|
+
tmp = withLabelField(element, KotlinIrEmitter$emit$lambda$lambda(this$0));
|
|
1249
|
+
} else {
|
|
1250
|
+
tmp = element;
|
|
1251
|
+
}
|
|
1252
|
+
var transformed = tmp;
|
|
1253
|
+
return transformChildren(transformed, transformer);
|
|
1254
|
+
};
|
|
1255
|
+
}
|
|
1256
|
+
function KotlinIrEmitter$injectCompanionObject$lambda(this$0, $endpoint) {
|
|
1257
|
+
return function (element, transformer) {
|
|
1258
|
+
var tmp;
|
|
1259
|
+
if (element instanceof Interface) {
|
|
1260
|
+
var injected = element.m1o_1.equals(Companion_getInstance().m1h('Handler')) ? listOf(buildCompanionObject(this$0, $endpoint)) : emptyList();
|
|
1261
|
+
var tmp_0;
|
|
1262
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1263
|
+
if (!injected.r()) {
|
|
1264
|
+
tmp_0 = withElements(element, plus_2(element.v1m(), injected));
|
|
1265
|
+
} else {
|
|
1266
|
+
tmp_0 = element;
|
|
1267
|
+
}
|
|
1268
|
+
tmp = tmp_0;
|
|
1269
|
+
} else {
|
|
1270
|
+
tmp = element;
|
|
1271
|
+
}
|
|
1272
|
+
var transformed = tmp;
|
|
1273
|
+
return transformChildren(transformed, transformer);
|
|
1274
|
+
};
|
|
1275
|
+
}
|
|
1276
|
+
function KotlinIrEmitter$buildCompanionObject$lambda(it) {
|
|
1277
|
+
var tmp;
|
|
1278
|
+
if (it instanceof Literal) {
|
|
1279
|
+
tmp = it.hq_1;
|
|
1280
|
+
} else {
|
|
1281
|
+
if (it instanceof Param) {
|
|
1282
|
+
tmp = '{' + it.lp_1.l1() + '}';
|
|
1283
|
+
} else {
|
|
1284
|
+
noWhenBranchMatchedException();
|
|
1285
|
+
}
|
|
1286
|
+
}
|
|
1287
|
+
return tmp;
|
|
1288
|
+
}
|
|
1289
|
+
function KotlinIrEmitter(packageName, emitShared) {
|
|
1290
|
+
Companion_getInstance_1();
|
|
1291
|
+
packageName = packageName === VOID ? Companion_instance.lr('community.flock.wirespec.generated') : packageName;
|
|
1292
|
+
emitShared = emitShared === VOID ? Companion_instance_0.go() : emitShared;
|
|
1293
|
+
this.j1x_1 = packageName;
|
|
1294
|
+
this.k1x_1 = emitShared;
|
|
1295
|
+
this.l1x_1 = KotlinGenerator_instance;
|
|
1296
|
+
this.m1x_1 = FileExtension_Kotlin_getInstance();
|
|
1297
|
+
this.n1x_1 = listOf_0([import_0('community.flock.wirespec.kotlin', 'Wirespec'), import_0('kotlin.reflect', 'typeOf')]);
|
|
1298
|
+
var tmp = this;
|
|
1299
|
+
tmp.o1x_1 = lazy(KotlinIrEmitter$sanitizationConfig$delegate$lambda(this));
|
|
1300
|
+
var tmp_0 = this;
|
|
1301
|
+
tmp_0.p1x_1 = new KotlinIrEmitter$shared$1();
|
|
1302
|
+
}
|
|
1303
|
+
protoOf(KotlinIrEmitter).k1v = function () {
|
|
1304
|
+
return this.j1x_1;
|
|
1305
|
+
};
|
|
1306
|
+
protoOf(KotlinIrEmitter).m1u = function () {
|
|
1307
|
+
return this.l1x_1;
|
|
1308
|
+
};
|
|
1309
|
+
protoOf(KotlinIrEmitter).eq = function () {
|
|
1310
|
+
return this.m1x_1;
|
|
1311
|
+
};
|
|
1312
|
+
protoOf(KotlinIrEmitter).t1v = function () {
|
|
1313
|
+
return this.p1x_1;
|
|
1314
|
+
};
|
|
1315
|
+
protoOf(KotlinIrEmitter).n1u = function (module_0, logger) {
|
|
1316
|
+
var tmp = emit_0.call(this, module_0, logger);
|
|
1317
|
+
return withSharedSource(tmp, this.k1x_1, KotlinIrEmitter$emit$lambda(this));
|
|
1318
|
+
};
|
|
1319
|
+
protoOf(KotlinIrEmitter).uq = function (definition, module_0, logger) {
|
|
1320
|
+
var file = emit_1.call(this, definition, module_0, logger);
|
|
1321
|
+
// Inline function 'kotlin.takeIf' call
|
|
1322
|
+
var this_0 = this.n1x_1;
|
|
1323
|
+
var tmp;
|
|
1324
|
+
if (Companion_instance_1.qq(module_0)) {
|
|
1325
|
+
tmp = this_0;
|
|
1326
|
+
} else {
|
|
1327
|
+
tmp = null;
|
|
1328
|
+
}
|
|
1329
|
+
var tmp$ret$1 = tmp;
|
|
1330
|
+
return placeInPackage(prependImports(file, tmp$ret$1), this.k1v(), definition);
|
|
1331
|
+
};
|
|
1332
|
+
protoOf(KotlinIrEmitter).up = function (type, module_0) {
|
|
1333
|
+
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1334
|
+
var this_0 = sanitizeNames(convertWithValidation(type, module_0), _get_sanitizationConfig__sns434(this));
|
|
1335
|
+
var scope = new TransformScope(this_0);
|
|
1336
|
+
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1337
|
+
var tmp = scope;
|
|
1338
|
+
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1339
|
+
var this_1 = scope.z1t_1;
|
|
1340
|
+
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1341
|
+
// Inline function 'kotlin.apply' call
|
|
1342
|
+
var this_2 = new TransformerBuilder();
|
|
1343
|
+
this_2.d1h(KotlinIrEmitter$emit$lambda_0);
|
|
1344
|
+
var tmp$ret$2 = this_2.e1h();
|
|
1345
|
+
tmp.z1t_1 = transform(this_1, tmp$ret$2);
|
|
1346
|
+
var tmp_0 = scope.z1t_1;
|
|
1347
|
+
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1348
|
+
};
|
|
1349
|
+
protoOf(KotlinIrEmitter).ir = function (enum_0, module_0) {
|
|
1350
|
+
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1351
|
+
var this_0 = sanitizeNames(convert_0(enum_0), _get_sanitizationConfig__sns434(this));
|
|
1352
|
+
var scope = new TransformScope(this_0);
|
|
1353
|
+
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1354
|
+
var tmp = scope;
|
|
1355
|
+
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1356
|
+
var this_1 = scope.z1t_1;
|
|
1357
|
+
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1358
|
+
// Inline function 'kotlin.apply' call
|
|
1359
|
+
var this_2 = new TransformerBuilder();
|
|
1360
|
+
this_2.d1h(KotlinIrEmitter$emit$lambda_1(this));
|
|
1361
|
+
var tmp$ret$2 = this_2.e1h();
|
|
1362
|
+
tmp.z1t_1 = transform(this_1, tmp$ret$2);
|
|
1363
|
+
var tmp_0 = scope.z1t_1;
|
|
1364
|
+
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1365
|
+
};
|
|
1366
|
+
protoOf(KotlinIrEmitter).yq = function (union) {
|
|
1367
|
+
return sanitizeNames(convert_1(union), _get_sanitizationConfig__sns434(this));
|
|
1368
|
+
};
|
|
1369
|
+
protoOf(KotlinIrEmitter).dr = function (refined) {
|
|
1370
|
+
var file = sanitizeNames(convert_2(refined), _get_sanitizationConfig__sns434(this));
|
|
1371
|
+
// Inline function 'community.flock.wirespec.ir.core.findElement' call
|
|
1372
|
+
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1373
|
+
var tmp0 = file.v1m();
|
|
1374
|
+
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1375
|
+
var destination = ArrayList_init_$Create$_0();
|
|
1376
|
+
var _iterator__ex2g4s = tmp0.t();
|
|
1377
|
+
while (_iterator__ex2g4s.u()) {
|
|
1378
|
+
var element = _iterator__ex2g4s.v();
|
|
1379
|
+
if (element instanceof Struct) {
|
|
1380
|
+
destination.x(element);
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1383
|
+
var struct = firstOrNull_0(destination);
|
|
1384
|
+
var tmp;
|
|
1385
|
+
if (struct == null) {
|
|
1386
|
+
tmp = null;
|
|
1387
|
+
} else {
|
|
1388
|
+
// Inline function 'kotlin.collections.map' call
|
|
1389
|
+
var this_0 = struct.g1n_1;
|
|
1390
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1391
|
+
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1392
|
+
var _iterator__ex2g4s_0 = this_0.t();
|
|
1393
|
+
while (_iterator__ex2g4s_0.u()) {
|
|
1394
|
+
var item = _iterator__ex2g4s_0.v();
|
|
1395
|
+
var tmp$ret$3 = item.q1n(VOID, VOID, true);
|
|
1396
|
+
destination_0.x(tmp$ret$3);
|
|
1397
|
+
}
|
|
1398
|
+
var tmp_0 = destination_0;
|
|
1399
|
+
// Inline function 'kotlin.collections.map' call
|
|
1400
|
+
var this_1 = struct.j1n_1;
|
|
1401
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1402
|
+
var destination_1 = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
|
|
1403
|
+
var _iterator__ex2g4s_1 = this_1.t();
|
|
1404
|
+
while (_iterator__ex2g4s_1.u()) {
|
|
1405
|
+
var item_0 = _iterator__ex2g4s_1.v();
|
|
1406
|
+
var tmp_1;
|
|
1407
|
+
if (item_0 instanceof Function) {
|
|
1408
|
+
tmp_1 = item_0.b1k(VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
|
|
1409
|
+
} else {
|
|
1410
|
+
tmp_1 = item_0;
|
|
1411
|
+
}
|
|
1412
|
+
var tmp$ret$6 = tmp_1;
|
|
1413
|
+
destination_1.x(tmp$ret$6);
|
|
1414
|
+
}
|
|
1415
|
+
tmp = struct.l1n(VOID, tmp_0, VOID, VOID, destination_1);
|
|
1416
|
+
}
|
|
1417
|
+
var updatedStruct = tmp;
|
|
1418
|
+
var tmp_2 = Companion_getInstance().m1h(sanitize_0(this, refined.br_1));
|
|
1419
|
+
var tmp_3;
|
|
1420
|
+
if (updatedStruct == null) {
|
|
1421
|
+
tmp_3 = null;
|
|
1422
|
+
} else {
|
|
1423
|
+
// Inline function 'kotlin.let' call
|
|
1424
|
+
tmp_3 = listOf(updatedStruct);
|
|
1425
|
+
}
|
|
1426
|
+
var tmp2_elvis_lhs = tmp_3;
|
|
1427
|
+
return new File(tmp_2, tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs);
|
|
1428
|
+
};
|
|
1429
|
+
protoOf(KotlinIrEmitter).jr = function (endpoint) {
|
|
1430
|
+
var imports = buildImports(this, endpoint);
|
|
1431
|
+
var file = convert_3(endpoint);
|
|
1432
|
+
// Inline function 'community.flock.wirespec.ir.core.findElement' call
|
|
1433
|
+
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1434
|
+
var tmp0 = file.v1m();
|
|
1435
|
+
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1436
|
+
var destination = ArrayList_init_$Create$_0();
|
|
1437
|
+
var _iterator__ex2g4s = tmp0.t();
|
|
1438
|
+
while (_iterator__ex2g4s.u()) {
|
|
1439
|
+
var element = _iterator__ex2g4s.v();
|
|
1440
|
+
if (element instanceof Namespace) {
|
|
1441
|
+
destination.x(element);
|
|
1442
|
+
}
|
|
1443
|
+
}
|
|
1444
|
+
var tmp$ret$2 = firstOrNull_0(destination);
|
|
1445
|
+
var endpointNamespace = ensureNotNull(tmp$ret$2);
|
|
1446
|
+
var body = injectCompanionObject(this, endpointNamespace, endpoint);
|
|
1447
|
+
var sanitized = sanitizeNames(new File(Companion_getInstance().m1h(sanitize_0(this, endpoint.ep_1)), listOf(body)), _get_sanitizationConfig__sns434(this));
|
|
1448
|
+
var tmp;
|
|
1449
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1450
|
+
if (!imports.r()) {
|
|
1451
|
+
tmp = sanitized.x1m(VOID, plus_2(imports, sanitized.u1m_1));
|
|
1452
|
+
} else {
|
|
1453
|
+
tmp = sanitized;
|
|
1454
|
+
}
|
|
1455
|
+
return tmp;
|
|
1456
|
+
};
|
|
1457
|
+
protoOf(KotlinIrEmitter).xq = function (channel) {
|
|
1458
|
+
var imports = buildImports(this, channel);
|
|
1459
|
+
var file = sanitizeNames(convert_4(channel), _get_sanitizationConfig__sns434(this));
|
|
1460
|
+
var tmp;
|
|
1461
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1462
|
+
if (!imports.r()) {
|
|
1463
|
+
tmp = file.x1m(VOID, plus_2(imports, file.u1m_1));
|
|
1464
|
+
} else {
|
|
1465
|
+
tmp = file;
|
|
1466
|
+
}
|
|
1467
|
+
return tmp;
|
|
1468
|
+
};
|
|
1469
|
+
protoOf(KotlinIrEmitter).q1u = function (endpoint) {
|
|
1470
|
+
var imports = buildImports(this, endpoint);
|
|
1471
|
+
var endpointImport = import_0(this.k1v().mr_1 + '.endpoint', endpoint.ep_1.l1());
|
|
1472
|
+
var file = sanitizeNames(emitEndpointClient.call(this, endpoint), _get_sanitizationConfig__sns434(this));
|
|
1473
|
+
var subPackageName = plus_0(this.k1v(), 'client');
|
|
1474
|
+
var tmp = Companion_getInstance().m1h(subPackageName.or() + file.t1m_1.x1l());
|
|
1475
|
+
// Inline function 'kotlin.collections.buildList' call
|
|
1476
|
+
// Inline function 'kotlin.collections.buildListInternal' call
|
|
1477
|
+
// Inline function 'kotlin.apply' call
|
|
1478
|
+
var this_0 = ArrayList_init_$Create$_0();
|
|
1479
|
+
this_0.x(new Package(subPackageName.mr_1));
|
|
1480
|
+
this_0.e1(this.n1x_1);
|
|
1481
|
+
this_0.e1(imports);
|
|
1482
|
+
this_0.x(endpointImport);
|
|
1483
|
+
this_0.e1(file.u1m_1);
|
|
1484
|
+
var tmp$ret$3 = this_0.o5();
|
|
1485
|
+
return new File(tmp, tmp$ret$3);
|
|
1486
|
+
};
|
|
1487
|
+
protoOf(KotlinIrEmitter).p1u = function (endpoints, logger) {
|
|
1488
|
+
// Inline function 'kotlin.collections.flatMap' call
|
|
1489
|
+
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1490
|
+
var destination = ArrayList_init_$Create$_0();
|
|
1491
|
+
var _iterator__ex2g4s = endpoints.t();
|
|
1492
|
+
while (_iterator__ex2g4s.u()) {
|
|
1493
|
+
var element = _iterator__ex2g4s.v();
|
|
1494
|
+
var list = importReferences(element);
|
|
1495
|
+
addAll(destination, list);
|
|
1496
|
+
}
|
|
1497
|
+
// Inline function 'kotlin.collections.distinctBy' call
|
|
1498
|
+
var set = HashSet_init_$Create$();
|
|
1499
|
+
var list_0 = ArrayList_init_$Create$_0();
|
|
1500
|
+
var _iterator__ex2g4s_0 = destination.t();
|
|
1501
|
+
while (_iterator__ex2g4s_0.u()) {
|
|
1502
|
+
var e = _iterator__ex2g4s_0.v();
|
|
1503
|
+
var key = e.lu_1;
|
|
1504
|
+
if (set.x(key)) {
|
|
1505
|
+
list_0.x(e);
|
|
1506
|
+
}
|
|
1507
|
+
}
|
|
1508
|
+
// Inline function 'kotlin.collections.map' call
|
|
1509
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1510
|
+
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(list_0, 10));
|
|
1511
|
+
var _iterator__ex2g4s_1 = list_0.t();
|
|
1512
|
+
while (_iterator__ex2g4s_1.u()) {
|
|
1513
|
+
var item = _iterator__ex2g4s_1.v();
|
|
1514
|
+
var tmp$ret$5 = import_0(this.k1v().mr_1 + '.model', item.lu_1);
|
|
1515
|
+
destination_0.x(tmp$ret$5);
|
|
1516
|
+
}
|
|
1517
|
+
var imports = destination_0;
|
|
1518
|
+
// Inline function 'kotlin.collections.map' call
|
|
1519
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1520
|
+
var destination_1 = ArrayList_init_$Create$(collectionSizeOrDefault(endpoints, 10));
|
|
1521
|
+
var _iterator__ex2g4s_2 = endpoints.t();
|
|
1522
|
+
while (_iterator__ex2g4s_2.u()) {
|
|
1523
|
+
var item_0 = _iterator__ex2g4s_2.v();
|
|
1524
|
+
var tmp$ret$8 = import_0(this.k1v().mr_1 + '.endpoint', item_0.ep_1.l1());
|
|
1525
|
+
destination_1.x(tmp$ret$8);
|
|
1526
|
+
}
|
|
1527
|
+
var endpointImports = destination_1;
|
|
1528
|
+
// Inline function 'kotlin.collections.map' call
|
|
1529
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1530
|
+
var destination_2 = ArrayList_init_$Create$(collectionSizeOrDefault(endpoints, 10));
|
|
1531
|
+
var _iterator__ex2g4s_3 = endpoints.t();
|
|
1532
|
+
while (_iterator__ex2g4s_3.u()) {
|
|
1533
|
+
var item_1 = _iterator__ex2g4s_3.v();
|
|
1534
|
+
var tmp$ret$11 = import_0(this.k1v().mr_1 + '.client', item_1.ep_1.l1() + 'Client');
|
|
1535
|
+
destination_2.x(tmp$ret$11);
|
|
1536
|
+
}
|
|
1537
|
+
var clientImports = destination_2;
|
|
1538
|
+
var allImports = plus_2(plus_2(imports, endpointImports), clientImports);
|
|
1539
|
+
var file = sanitizeNames(emitClient.call(this, endpoints, logger), _get_sanitizationConfig__sns434(this));
|
|
1540
|
+
var tmp = Companion_getInstance().m1h(this.k1v().or() + file.t1m_1.x1l());
|
|
1541
|
+
// Inline function 'kotlin.collections.buildList' call
|
|
1542
|
+
// Inline function 'kotlin.collections.buildListInternal' call
|
|
1543
|
+
// Inline function 'kotlin.apply' call
|
|
1544
|
+
var this_0 = ArrayList_init_$Create$_0();
|
|
1545
|
+
this_0.x(new Package(this.k1v().mr_1));
|
|
1546
|
+
this_0.e1(this.n1x_1);
|
|
1547
|
+
this_0.e1(allImports);
|
|
1548
|
+
this_0.e1(file.u1m_1);
|
|
1549
|
+
var tmp$ret$17 = this_0.o5();
|
|
1550
|
+
return new File(tmp, tmp$ret$17);
|
|
1551
|
+
};
|
|
877
1552
|
function KotlinRefinedTypeDefinitionEmitter() {
|
|
878
1553
|
}
|
|
879
1554
|
function KotlinShared() {
|
|
880
1555
|
KotlinShared_instance = this;
|
|
881
|
-
this.
|
|
882
|
-
this.
|
|
1556
|
+
this.z1w_1 = 'community.flock.wirespec.kotlin';
|
|
1557
|
+
this.a1x_1 = trimMargin('\n |package ' + this.z1w_1 + '\n |\n |import kotlin.reflect.KType\n |\n |object Wirespec {\n |' + Spacer_instance.toString() + 'interface Enum { val label: String }\n |' + Spacer_instance.toString() + 'interface Endpoint\n |' + Spacer_instance.toString() + 'interface Refined<T> { val value: T }\n |' + Spacer_instance.toString() + 'interface Path\n |' + Spacer_instance.toString() + 'interface Queries\n |' + Spacer_instance.toString() + 'interface Headers\n |' + Spacer_instance.toString() + 'interface Handler\n |' + Spacer_instance.toString() + 'interface ServerEdge<Req: Request<*>, Res: Response<*>> { \n |' + Spacer_instance.toString() + 'fun from(request: RawRequest): Req \n |' + Spacer_instance.toString() + 'fun to(response: Res): RawResponse\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface ClientEdge<Req: Request<*>, Res: Response<*>> { \n |' + Spacer_instance.qr(2) + 'fun to(request: Req): RawRequest\n |' + Spacer_instance.qr(2) + 'fun from(response: RawResponse): Res\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface Client<Req : Request<*>, Res : Response<*>> {\n |' + Spacer_instance.qr(2) + 'val pathTemplate: String\n |' + Spacer_instance.qr(2) + 'val method: String\n |' + Spacer_instance.qr(2) + 'fun client(serialization: Serialization): ClientEdge<Req, Res>\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface Server<Req : Request<*>, Res : Response<*>> {\n |' + Spacer_instance.qr(2) + 'val pathTemplate: String\n |' + Spacer_instance.qr(2) + 'val method: String\n |' + Spacer_instance.qr(2) + 'fun server(serialization: Serialization): ServerEdge<Req, Res>\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'enum class Method { GET, PUT, POST, DELETE, OPTIONS, HEAD, PATCH, TRACE }\n |' + Spacer_instance.toString() + 'interface Request<T : Any> { val path: Path; val method: Method; val queries: Queries; val headers: Headers; val body: T; interface Headers : Wirespec.Headers }\n |' + Spacer_instance.toString() + 'interface Response<T : Any> { val status: Int; val headers: Headers; val body: T; interface Headers : Wirespec.Headers }\n |' + Spacer_instance.toString() + 'interface Serialization : Serializer, Deserializer\n |' + Spacer_instance.toString() + 'interface Serializer : BodySerializer, PathSerializer, ParamSerializer\n |' + Spacer_instance.toString() + 'interface Deserializer : BodyDeserializer, PathDeserializer, ParamDeserializer\n |' + Spacer_instance.toString() + 'interface BodySerialization : BodySerializer, BodyDeserializer\n |' + Spacer_instance.toString() + 'interface BodySerializer { fun <T : Any> serializeBody(t: T, kType: KType): ByteArray }\n |' + Spacer_instance.toString() + 'interface BodyDeserializer { fun <T : Any> deserializeBody(raw: ByteArray, kType: KType): T }\n |' + Spacer_instance.toString() + 'interface PathSerialization : PathSerializer, PathDeserializer\n |' + Spacer_instance.toString() + 'interface PathSerializer { fun <T : Any> serializePath(t: T, kType: KType): String }\n |' + Spacer_instance.toString() + 'interface PathDeserializer { fun <T : Any> deserializePath(raw: String, kType: KType): T }\n |' + Spacer_instance.toString() + 'interface ParamSerialization : ParamSerializer, ParamDeserializer\n |' + Spacer_instance.toString() + 'interface ParamSerializer { fun <T : Any> serializeParam(value: T, kType: KType): List<String> }\n |' + Spacer_instance.toString() + 'interface ParamDeserializer { fun <T : Any> deserializeParam(values: List<String>, kType: KType): T }\n |' + Spacer_instance.toString() + 'data class RawRequest(val method: String, val path: List<String>, val queries: Map<String, List<String>>, val headers: Map<String, List<String>>, val body: ByteArray?) \n |' + Spacer_instance.toString() + 'data class RawResponse(val statusCode: Int, val headers: Map<String, List<String>>, val body: ByteArray?)\n |}\n ');
|
|
883
1558
|
}
|
|
1559
|
+
protoOf(KotlinShared).r1w = function () {
|
|
1560
|
+
return this.a1x_1;
|
|
1561
|
+
};
|
|
884
1562
|
protoOf(KotlinShared).toString = function () {
|
|
885
1563
|
return 'KotlinShared';
|
|
886
1564
|
};
|
|
@@ -892,7 +1570,6 @@ protoOf(KotlinShared).equals = function (other) {
|
|
|
892
1570
|
return true;
|
|
893
1571
|
if (!(other instanceof KotlinShared))
|
|
894
1572
|
return false;
|
|
895
|
-
other instanceof KotlinShared || THROW_CCE();
|
|
896
1573
|
return true;
|
|
897
1574
|
};
|
|
898
1575
|
var KotlinShared_instance;
|
|
@@ -903,12 +1580,12 @@ function KotlinShared_getInstance() {
|
|
|
903
1580
|
}
|
|
904
1581
|
function KotlinTypeDefinitionEmitter$emit$lambda(this$0) {
|
|
905
1582
|
return function (it) {
|
|
906
|
-
return this$0.
|
|
1583
|
+
return this$0.xp(it);
|
|
907
1584
|
};
|
|
908
1585
|
}
|
|
909
1586
|
function KotlinTypeDefinitionEmitter$emit$lambda_0(this$0) {
|
|
910
1587
|
return function (it) {
|
|
911
|
-
return Spacer_instance.toString() + 'val ' + this$0.
|
|
1588
|
+
return Spacer_instance.toString() + 'val ' + this$0.wp(it) + ',';
|
|
912
1589
|
};
|
|
913
1590
|
}
|
|
914
1591
|
function KotlinTypeDefinitionEmitter() {
|
|
@@ -916,33 +1593,34 @@ function KotlinTypeDefinitionEmitter() {
|
|
|
916
1593
|
function KotlinUnionDefinitionEmitter() {
|
|
917
1594
|
}
|
|
918
1595
|
//region block: post-declaration
|
|
919
|
-
protoOf(KotlinEmitter).
|
|
920
|
-
protoOf(KotlinEmitter).
|
|
921
|
-
protoOf(KotlinEmitter).
|
|
922
|
-
protoOf(KotlinEmitter).
|
|
923
|
-
protoOf(KotlinEmitter).
|
|
924
|
-
protoOf(KotlinEmitter).
|
|
925
|
-
protoOf(KotlinEmitter).
|
|
926
|
-
protoOf(KotlinEmitter).
|
|
927
|
-
protoOf(KotlinEmitter).
|
|
928
|
-
protoOf(KotlinEmitter).
|
|
929
|
-
protoOf(KotlinEmitter).
|
|
930
|
-
protoOf(KotlinEmitter).
|
|
931
|
-
protoOf(KotlinEmitter).
|
|
932
|
-
protoOf(KotlinEmitter).
|
|
933
|
-
protoOf(KotlinEmitter).
|
|
934
|
-
protoOf(KotlinEmitter).
|
|
935
|
-
protoOf(KotlinEmitter).
|
|
936
|
-
protoOf(KotlinEmitter).
|
|
937
|
-
protoOf(KotlinEmitter).
|
|
938
|
-
protoOf(KotlinEmitter).
|
|
939
|
-
protoOf(KotlinEmitter).
|
|
940
|
-
protoOf(KotlinEmitter).
|
|
1596
|
+
protoOf(KotlinEmitter).up = emit_4;
|
|
1597
|
+
protoOf(KotlinEmitter).vp = emit_5;
|
|
1598
|
+
protoOf(KotlinEmitter).wp = emit_6;
|
|
1599
|
+
protoOf(KotlinEmitter).xp = emit_7;
|
|
1600
|
+
protoOf(KotlinEmitter).yp = emit_8;
|
|
1601
|
+
protoOf(KotlinEmitter).ir = emit_14;
|
|
1602
|
+
protoOf(KotlinEmitter).dr = emit_15;
|
|
1603
|
+
protoOf(KotlinEmitter).jr = emit_10;
|
|
1604
|
+
protoOf(KotlinEmitter).yq = emit_13;
|
|
1605
|
+
protoOf(KotlinEmitter).wq = emit_3;
|
|
1606
|
+
protoOf(KotlinEmitter).xq = emit_9;
|
|
1607
|
+
protoOf(KotlinEmitter).x1v = emit_11;
|
|
1608
|
+
protoOf(KotlinEmitter).y1v = emit_12;
|
|
1609
|
+
protoOf(KotlinEmitter).kr = emitValidator;
|
|
1610
|
+
protoOf(KotlinEmitter).s1w = sanitize;
|
|
1611
|
+
protoOf(KotlinEmitter).z1v = sanitizeFirstIsDigit;
|
|
1612
|
+
protoOf(KotlinEmitter).a1w = sanitizeKeywords;
|
|
1613
|
+
protoOf(KotlinEmitter).b1w = emitHandleFunction;
|
|
1614
|
+
protoOf(KotlinEmitter).b1x = emitRequestHeaders;
|
|
1615
|
+
protoOf(KotlinEmitter).c1x = emitQueries;
|
|
1616
|
+
protoOf(KotlinEmitter).d1x = emitBody;
|
|
1617
|
+
protoOf(KotlinEmitter).e1x = emitHeaders;
|
|
1618
|
+
protoOf(KotlinIrEmitter).on = emit_2;
|
|
941
1619
|
//endregion
|
|
942
1620
|
//region block: exports
|
|
943
1621
|
export {
|
|
944
1622
|
KotlinEmitter as KotlinEmitterddb8247fx90i,
|
|
945
|
-
|
|
1623
|
+
KotlinIrEmitter as KotlinIrEmitterbehcpsqpuupy,
|
|
946
1624
|
};
|
|
947
1625
|
//endregion
|
|
948
1626
|
|