@flock/wirespec 0.19.3-RC.1 → 0.19.4
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-atomic.mjs +12 -12
- package/arrow-arrow-core.mjs +167 -167
- package/clikt-clikt-mordant.mjs +81 -81
- package/clikt-clikt-mordant.mjs.map +1 -1
- package/clikt-clikt.mjs +1636 -1636
- package/clikt-clikt.mjs.map +1 -1
- package/colormath-root-colormath.mjs +448 -448
- package/kotlin-kotlin-stdlib.mjs +2428 -5210
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +10248 -10248
- package/kotlin-openapi-bindings.mjs.map +1 -1
- package/kotlin-rgxgen.mjs +1846 -1846
- package/kotlin-rgxgen.mjs.map +1 -1
- package/kotlinx-io-kotlinx-io-core.mjs +455 -455
- package/kotlinx-io-kotlinx-io-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +2101 -2135
- package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1579 -1579
- package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/mordant-mordant.mjs +1435 -1435
- package/package.json +1 -5
- package/wirespec-src-compiler-core.mjs +1598 -1598
- package/wirespec-src-compiler-emitters-java.mjs +453 -451
- package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-kotlin.mjs +341 -339
- package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-python.mjs +430 -428
- package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-rust.mjs +483 -481
- package/wirespec-src-compiler-emitters-rust.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-scala.mjs +195 -193
- package/wirespec-src-compiler-emitters-scala.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-typescript.mjs +501 -499
- package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-wirespec.mjs +82 -82
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-ir.mjs +3901 -3909
- package/wirespec-src-compiler-ir.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +439 -439
- package/wirespec-src-compiler-lib.mjs.map +1 -1
- package/wirespec-src-converter-avro.mjs +521 -521
- package/wirespec-src-converter-avro.mjs.map +1 -1
- package/wirespec-src-converter-openapi.mjs +859 -859
- package/wirespec-src-converter-openapi.mjs.map +1 -1
- package/wirespec-src-ide-lsp.mjs +1387 -1387
- package/wirespec-src-ide-lsp.mjs.map +1 -1
- package/wirespec-src-plugin-arguments.mjs +192 -192
- package/wirespec-src-plugin-arguments.mjs.map +1 -1
- package/wirespec-src-plugin-cli.mjs +109 -109
- package/wirespec-src-plugin-npm.d.mts +0 -21
- package/wirespec-src-plugin-npm.mjs +43 -43
- package/wirespec-src-plugin-npm.mjs.map +1 -1
- package/wirespec-src-tools-generator.mjs +35 -35
- package/wirespec-src-tools-generator.mjs.map +1 -1
- package/kotest-kotest-assertions-kotest-assertions-core.mjs +0 -4
- package/kotest-kotest-assertions-kotest-assertions-core.mjs.map +0 -1
- package/kotest-kotest-assertions-kotest-assertions-shared.mjs +0 -4
- package/kotest-kotest-assertions-kotest-assertions-shared.mjs.map +0 -1
- package/kotest-kotest-common.mjs +0 -56
- package/kotest-kotest-common.mjs.map +0 -1
- package/kotest-kotest-framework-kotest-framework-engine.mjs +0 -4
- package/kotest-kotest-framework-kotest-framework-engine.mjs.map +0 -1
- package/kotest-kotest-property.mjs +0 -2501
- package/kotest-kotest-property.mjs.map +0 -1
- package/kotlinx-coroutines-test.mjs +0 -4
- package/kotlinx-coroutines-test.mjs.map +0 -1
- package/wirespec-generator.d.ts +0 -51
- package/wirespec-generator.mjs +0 -9
- package/wirespec-src-integration-kotest.mjs +0 -1647
- package/wirespec-src-integration-kotest.mjs.map +0 -1
- package/xmlutil-core.mjs +0 -4
- package/xmlutil-core.mjs.map +0 -1
- package/xmlutil-serialization.mjs +0 -4
- package/xmlutil-serialization.mjs.map +0 -1
|
@@ -159,6 +159,7 @@ import {
|
|
|
159
159
|
convert1cn4bolzoed8c as convert_4,
|
|
160
160
|
emitEndpointClient1meajc90wf3el as emitEndpointClient,
|
|
161
161
|
emitClient32kfwzg2hm5vj as emitClient,
|
|
162
|
+
get_extensions31c4or738wbxz as get_extensions,
|
|
162
163
|
emit1oxjujel6f3jb as emit_1,
|
|
163
164
|
emit3bzdcd0f6nwtj as emit_2,
|
|
164
165
|
beforeGenerate3o8idb3hey1b0 as beforeGenerate,
|
|
@@ -172,10 +173,10 @@ import {
|
|
|
172
173
|
function emit_3(identifier) {
|
|
173
174
|
var tmp;
|
|
174
175
|
if (identifier instanceof DefinitionIdentifier) {
|
|
175
|
-
tmp = this.
|
|
176
|
+
tmp = this.u1x(identifier);
|
|
176
177
|
} else {
|
|
177
178
|
if (identifier instanceof FieldIdentifier) {
|
|
178
|
-
tmp = this.
|
|
179
|
+
tmp = this.k1x(this.u1x(identifier));
|
|
179
180
|
} else {
|
|
180
181
|
noWhenBranchMatchedException();
|
|
181
182
|
}
|
|
@@ -184,7 +185,7 @@ function emit_3(identifier) {
|
|
|
184
185
|
}
|
|
185
186
|
function sanitize(_this__u8e3s4) {
|
|
186
187
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
187
|
-
var this_0 = split(_this__u8e3s4.
|
|
188
|
+
var this_0 = split(_this__u8e3s4.l1(), ['.', ' ']);
|
|
188
189
|
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
189
190
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
190
191
|
var index = 0;
|
|
@@ -193,11 +194,11 @@ function sanitize(_this__u8e3s4) {
|
|
|
193
194
|
var item = _iterator__ex2g4s.v();
|
|
194
195
|
var _unary__edvuaz = index;
|
|
195
196
|
index = _unary__edvuaz + 1 | 0;
|
|
196
|
-
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance_1.
|
|
197
|
-
destination.
|
|
197
|
+
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance_1.er(item) : item;
|
|
198
|
+
destination.x(tmp$ret$0);
|
|
198
199
|
}
|
|
199
200
|
var tmp = asSequence(joinToString(destination, ''));
|
|
200
|
-
return this.
|
|
201
|
+
return this.j1x(joinToString_0(filter(tmp, KotlinIdentifierEmitter$sanitize$lambda), ''));
|
|
201
202
|
}
|
|
202
203
|
function sanitizeFirstIsDigit(_this__u8e3s4) {
|
|
203
204
|
var tmp;
|
|
@@ -217,18 +218,18 @@ function sanitizeFirstIsDigit(_this__u8e3s4) {
|
|
|
217
218
|
return tmp;
|
|
218
219
|
}
|
|
219
220
|
function sanitizeKeywords(_this__u8e3s4) {
|
|
220
|
-
return Companion_getInstance_0().
|
|
221
|
+
return Companion_getInstance_0().h1y_1.u1(_this__u8e3s4) ? addBackticks(_this__u8e3s4) : _this__u8e3s4;
|
|
221
222
|
}
|
|
222
223
|
initMetadataForInterface(KotlinIdentifierEmitter, 'KotlinIdentifierEmitter');
|
|
223
224
|
function emit_4(type, module_0) {
|
|
224
225
|
var tmp;
|
|
225
|
-
if (type.
|
|
226
|
-
tmp = 'data object ' + this.
|
|
226
|
+
if (type.mp_1.ip_1.r()) {
|
|
227
|
+
tmp = 'data object ' + this.nr(type.lp_1);
|
|
227
228
|
} else {
|
|
228
|
-
var tmp_0 = this.
|
|
229
|
-
var tmp_1 = this.
|
|
229
|
+
var tmp_0 = this.nr(type.lp_1);
|
|
230
|
+
var tmp_1 = this.lq(type.mp_1);
|
|
230
231
|
// Inline function 'kotlin.run' call
|
|
231
|
-
var $this$run = type.
|
|
232
|
+
var $this$run = type.np_1;
|
|
232
233
|
var tmp_2;
|
|
233
234
|
if ($this$run.r()) {
|
|
234
235
|
tmp_2 = '';
|
|
@@ -241,18 +242,18 @@ function emit_4(type, module_0) {
|
|
|
241
242
|
return tmp;
|
|
242
243
|
}
|
|
243
244
|
function emit_5(_this__u8e3s4) {
|
|
244
|
-
return dropLast(joinToString(_this__u8e3s4.
|
|
245
|
+
return dropLast(joinToString(_this__u8e3s4.ip_1, '\n', VOID, VOID, VOID, VOID, KotlinTypeDefinitionEmitter$emit$lambda_0(this)), 1);
|
|
245
246
|
}
|
|
246
247
|
function emit_6(_this__u8e3s4) {
|
|
247
|
-
return this.
|
|
248
|
+
return this.nr(_this__u8e3s4.qp_1) + ': ' + this.nq(_this__u8e3s4.rp_1);
|
|
248
249
|
}
|
|
249
250
|
function emit_7(_this__u8e3s4) {
|
|
250
251
|
var tmp;
|
|
251
252
|
if (_this__u8e3s4 instanceof Dict) {
|
|
252
|
-
tmp = 'Map<String, ' + this.
|
|
253
|
+
tmp = 'Map<String, ' + this.nq(_this__u8e3s4.so_1) + '>';
|
|
253
254
|
} else {
|
|
254
255
|
if (_this__u8e3s4 instanceof Iterable) {
|
|
255
|
-
tmp = 'List<' + this.
|
|
256
|
+
tmp = 'List<' + this.nq(_this__u8e3s4.po_1) + '>';
|
|
256
257
|
} else {
|
|
257
258
|
if (_this__u8e3s4 instanceof Unit) {
|
|
258
259
|
tmp = 'Unit';
|
|
@@ -261,17 +262,17 @@ function emit_7(_this__u8e3s4) {
|
|
|
261
262
|
tmp = 'Any';
|
|
262
263
|
} else {
|
|
263
264
|
if (_this__u8e3s4 instanceof Custom) {
|
|
264
|
-
tmp = _this__u8e3s4.
|
|
265
|
+
tmp = _this__u8e3s4.bv_1;
|
|
265
266
|
} else {
|
|
266
267
|
if (_this__u8e3s4 instanceof Primitive) {
|
|
267
|
-
var t = _this__u8e3s4.
|
|
268
|
+
var t = _this__u8e3s4.fv_1;
|
|
268
269
|
var tmp_0;
|
|
269
270
|
if (t instanceof String_0) {
|
|
270
271
|
tmp_0 = 'String';
|
|
271
272
|
} else {
|
|
272
273
|
if (t instanceof Integer) {
|
|
273
274
|
var tmp_1;
|
|
274
|
-
switch (t.
|
|
275
|
+
switch (t.ju_1.b3_1) {
|
|
275
276
|
case 0:
|
|
276
277
|
tmp_1 = 'Int';
|
|
277
278
|
break;
|
|
@@ -286,7 +287,7 @@ function emit_7(_this__u8e3s4) {
|
|
|
286
287
|
} else {
|
|
287
288
|
if (t instanceof Number_0) {
|
|
288
289
|
var tmp_2;
|
|
289
|
-
switch (t.
|
|
290
|
+
switch (t.mu_1.b3_1) {
|
|
290
291
|
case 0:
|
|
291
292
|
tmp_2 = 'Float';
|
|
292
293
|
break;
|
|
@@ -322,15 +323,15 @@ function emit_7(_this__u8e3s4) {
|
|
|
322
323
|
}
|
|
323
324
|
// Inline function 'kotlin.let' call
|
|
324
325
|
var it = tmp;
|
|
325
|
-
return _this__u8e3s4.
|
|
326
|
+
return _this__u8e3s4.tu() ? it + '?' : it;
|
|
326
327
|
}
|
|
327
328
|
function emit_8(_this__u8e3s4) {
|
|
328
329
|
var tmp;
|
|
329
330
|
if (_this__u8e3s4 instanceof RegExp_0) {
|
|
330
|
-
tmp = 'Regex("""' + this.
|
|
331
|
+
tmp = 'Regex("""' + this.pq(_this__u8e3s4.pt_1) + '""").matches(value)';
|
|
331
332
|
} else {
|
|
332
333
|
if (_this__u8e3s4 instanceof Bound) {
|
|
333
|
-
var tmp1_safe_receiver = _this__u8e3s4.
|
|
334
|
+
var tmp1_safe_receiver = _this__u8e3s4.fu_1;
|
|
334
335
|
var tmp_0;
|
|
335
336
|
if (tmp1_safe_receiver == null) {
|
|
336
337
|
tmp_0 = null;
|
|
@@ -339,7 +340,7 @@ function emit_8(_this__u8e3s4) {
|
|
|
339
340
|
tmp_0 = tmp1_safe_receiver + ' < value';
|
|
340
341
|
}
|
|
341
342
|
var minCheck = tmp_0;
|
|
342
|
-
var tmp2_safe_receiver = _this__u8e3s4.
|
|
343
|
+
var tmp2_safe_receiver = _this__u8e3s4.gu_1;
|
|
343
344
|
var tmp_1;
|
|
344
345
|
if (tmp2_safe_receiver == null) {
|
|
345
346
|
tmp_1 = null;
|
|
@@ -367,14 +368,10 @@ function emit_8(_this__u8e3s4) {
|
|
|
367
368
|
}
|
|
368
369
|
initMetadataForInterface(KotlinTypeDefinitionEmitter, 'KotlinTypeDefinitionEmitter', VOID, VOID, [TypeDefinitionEmitter, KotlinIdentifierEmitter]);
|
|
369
370
|
function emit_9(channel) {
|
|
370
|
-
return trimMargin('\n |' + emitImports(this, channel) + '\n |\n |fun interface ' + this.
|
|
371
|
+
return trimMargin('\n |' + emitImports(this, channel) + '\n |\n |fun interface ' + this.nr(channel.cp_1) + ' {\n | operator fun invoke(message: ' + this.nq(channel.dp_1) + ')\n |}\n |\n ');
|
|
371
372
|
}
|
|
372
373
|
initMetadataForInterface(KotlinChannelDefinitionEmitter, 'KotlinChannelDefinitionEmitter', VOID, VOID, [KotlinTypeDefinitionEmitter]);
|
|
373
|
-
function emit_10(
|
|
374
|
-
return trimMargin('\n |sealed interface ' + this.yu(union.rs_1) + '\n |\n ');
|
|
375
|
-
}
|
|
376
|
-
initMetadataForInterface(KotlinUnionDefinitionEmitter, 'KotlinUnionDefinitionEmitter', VOID, VOID, [KotlinIdentifierEmitter]);
|
|
377
|
-
function emit_11(endpoint) {
|
|
374
|
+
function emit_10(endpoint) {
|
|
378
375
|
// Inline function 'kotlin.collections.map' call
|
|
379
376
|
var this_0 = importReferences(endpoint);
|
|
380
377
|
// Inline function 'kotlin.collections.mapTo' call
|
|
@@ -382,154 +379,158 @@ function emit_11(endpoint) {
|
|
|
382
379
|
var _iterator__ex2g4s = this_0.t();
|
|
383
380
|
while (_iterator__ex2g4s.u()) {
|
|
384
381
|
var item = _iterator__ex2g4s.v();
|
|
385
|
-
var tmp$ret$0 = 'import ' + this.
|
|
386
|
-
destination.
|
|
382
|
+
var tmp$ret$0 = 'import ' + this.u1w().ds_1 + '.model.' + item.bv_1;
|
|
383
|
+
destination.x(tmp$ret$0);
|
|
387
384
|
}
|
|
388
385
|
var tmp = destination;
|
|
389
386
|
var tmp_0 = joinToString(tmp, '\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda);
|
|
390
|
-
var tmp_1 = this.
|
|
387
|
+
var tmp_1 = this.nr(endpoint.up_1);
|
|
391
388
|
var tmp_2 = get_pathParams(endpoint);
|
|
392
389
|
var tmp_3 = emitObject$default(this, tmp_2, 'Path', 'Wirespec.Path', VOID, KotlinEndpointDefinitionEmitter$emit$lambda_0(this));
|
|
393
|
-
var tmp_4 = emitObject$default(this, endpoint.
|
|
394
|
-
var tmp_5 = emitObject$default(this, endpoint.
|
|
395
|
-
var tmp_6 = this.
|
|
390
|
+
var tmp_4 = emitObject$default(this, endpoint.xp_1, 'Queries', 'Wirespec.Queries', VOID, KotlinEndpointDefinitionEmitter$emit$lambda_1(this));
|
|
391
|
+
var tmp_5 = emitObject$default(this, endpoint.yp_1, 'Headers', 'Wirespec.Request.Headers', VOID, KotlinEndpointDefinitionEmitter$emit$lambda_2(this));
|
|
392
|
+
var tmp_6 = this.h1x(first(endpoint.zp_1), endpoint);
|
|
396
393
|
var tmp_7 = Spacer_instance.toString();
|
|
397
394
|
var tmp_8 = emitStatusInterfaces(this, endpoint);
|
|
398
395
|
var tmp_9 = emitResponseInterfaces(this, endpoint);
|
|
399
|
-
var tmp_10 = distinctByStatus(endpoint.
|
|
396
|
+
var tmp_10 = distinctByStatus(endpoint.aq_1);
|
|
400
397
|
var tmp_11 = joinToString(tmp_10, '\n\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_3(this));
|
|
401
398
|
var tmp_12 = Spacer_instance.toString();
|
|
402
|
-
var tmp_13 = Spacer_instance.
|
|
403
|
-
var tmp_14 = distinctByStatus(endpoint.
|
|
399
|
+
var tmp_13 = Spacer_instance.hs(2);
|
|
400
|
+
var tmp_14 = distinctByStatus(endpoint.aq_1);
|
|
404
401
|
var tmp_15 = joinToString(tmp_14, '\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_4(this));
|
|
405
|
-
var tmp_16 = Spacer_instance.
|
|
402
|
+
var tmp_16 = Spacer_instance.hs(2);
|
|
406
403
|
var tmp_17 = Spacer_instance.toString();
|
|
407
|
-
var tmp_18 = Spacer_instance.
|
|
404
|
+
var tmp_18 = Spacer_instance.hs(2);
|
|
408
405
|
// Inline function 'kotlin.collections.filter' call
|
|
409
|
-
var tmp0 = distinctByStatus(endpoint.
|
|
406
|
+
var tmp0 = distinctByStatus(endpoint.aq_1);
|
|
410
407
|
// Inline function 'kotlin.collections.filterTo' call
|
|
411
408
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
412
409
|
var _iterator__ex2g4s_0 = tmp0.t();
|
|
413
410
|
while (_iterator__ex2g4s_0.u()) {
|
|
414
411
|
var element = _iterator__ex2g4s_0.v();
|
|
415
|
-
if (Companion_instance_1.
|
|
416
|
-
destination_0.
|
|
412
|
+
if (Companion_instance_1.ir(element.gq_1)) {
|
|
413
|
+
destination_0.x(element);
|
|
417
414
|
}
|
|
418
415
|
}
|
|
419
416
|
var tmp_19 = destination_0;
|
|
420
417
|
var tmp_20 = joinToString(tmp_19, '\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_5(this));
|
|
421
|
-
var tmp_21 = Spacer_instance.
|
|
422
|
-
var tmp_22 = Spacer_instance.
|
|
418
|
+
var tmp_21 = Spacer_instance.hs(3);
|
|
419
|
+
var tmp_22 = Spacer_instance.hs(2);
|
|
423
420
|
var tmp_23 = Spacer_instance.toString();
|
|
424
|
-
var tmp_24 = Spacer_instance.
|
|
425
|
-
var tmp_25 = this.
|
|
426
|
-
var tmp_26 = Spacer_instance.
|
|
427
|
-
var tmp_27 = Spacer_instance.
|
|
428
|
-
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.
|
|
421
|
+
var tmp_24 = Spacer_instance.hs(2);
|
|
422
|
+
var tmp_25 = this.l1x(endpoint);
|
|
423
|
+
var tmp_26 = Spacer_instance.hs(2);
|
|
424
|
+
var tmp_27 = Spacer_instance.hs(3);
|
|
425
|
+
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.wp_1, '/', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_6) + '"\n |' + Spacer_instance.hs(3) + 'override val method = "' + endpoint.vp_1.toString() + '"\n |' + Spacer_instance.hs(3) + 'override fun server(serialization: Wirespec.Serialization) = object : Wirespec.ServerEdge<Request, Response<*>> {\n |' + Spacer_instance.hs(4) + 'override fun from(request: Wirespec.RawRequest) = fromRequest(serialization, request)\n |' + Spacer_instance.hs(4) + 'override fun to(response: Response<*>) = toResponse(serialization, response)\n |' + Spacer_instance.hs(3) + '}\n |' + Spacer_instance.hs(3) + 'override fun client(serialization: Wirespec.Serialization) = object : Wirespec.ClientEdge<Request, Response<*>> {\n |' + Spacer_instance.hs(4) + 'override fun to(request: Request) = toRequest(serialization, request)\n |' + Spacer_instance.hs(4) + 'override fun from(response: Wirespec.RawResponse) = fromResponse(serialization, response)\n |' + Spacer_instance.hs(3) + '}\n |' + Spacer_instance.hs(2) + '}\n |' + Spacer_instance.toString() + '}\n |}\n |\n ');
|
|
429
426
|
}
|
|
430
427
|
function emitHandleFunction(endpoint) {
|
|
431
|
-
return 'suspend fun ' + Companion_instance_1.
|
|
428
|
+
return 'suspend fun ' + Companion_instance_1.fr(this.nr(endpoint.up_1)) + '(request: Request): Response<*>';
|
|
432
429
|
}
|
|
433
|
-
function
|
|
430
|
+
function emit_11(_this__u8e3s4, endpoint) {
|
|
434
431
|
var tmp = Spacer_instance.toString();
|
|
435
432
|
var tmp_0 = emitConstructor(this, _this__u8e3s4, endpoint);
|
|
436
|
-
var tmp_1 = Spacer_instance.
|
|
433
|
+
var tmp_1 = Spacer_instance.hs(2);
|
|
437
434
|
var tmp_2 = get_pathParams(endpoint);
|
|
438
435
|
var tmp_3 = brace(this, joinToString(tmp_2, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_7(this)));
|
|
439
|
-
var tmp_4 = Spacer_instance.
|
|
440
|
-
var tmp_5 = Spacer_instance.
|
|
441
|
-
var tmp_6 = brace(this, joinToString(endpoint.
|
|
442
|
-
var tmp_7 = Spacer_instance.
|
|
443
|
-
var tmp_8 = brace(this, joinToString(endpoint.
|
|
444
|
-
var tmp_9 = _this__u8e3s4.
|
|
436
|
+
var tmp_4 = Spacer_instance.hs(2);
|
|
437
|
+
var tmp_5 = Spacer_instance.hs(2);
|
|
438
|
+
var tmp_6 = brace(this, joinToString(endpoint.xp_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_8(this)));
|
|
439
|
+
var tmp_7 = Spacer_instance.hs(2);
|
|
440
|
+
var tmp_8 = brace(this, joinToString(endpoint.yp_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_9(this)));
|
|
441
|
+
var tmp_9 = _this__u8e3s4.dq_1 == null ? Spacer_instance.hs(2) + 'override val body = Unit\n' + Spacer_instance.toString() + '}' : Spacer_instance.toString() + '}';
|
|
445
442
|
var tmp_10 = Spacer_instance.toString();
|
|
446
|
-
var tmp_11 = Spacer_instance.
|
|
447
|
-
var tmp_12 = Spacer_instance.
|
|
448
|
-
return trimMargin('\n |' + tmp + tmp_0 + '\n |' + tmp_1 + 'override val path = Path' + tmp_3 + '\n |' + tmp_4 + 'override val method = Wirespec.Method.' + endpoint.
|
|
443
|
+
var tmp_11 = Spacer_instance.hs(2);
|
|
444
|
+
var tmp_12 = Spacer_instance.hs(3);
|
|
445
|
+
return trimMargin('\n |' + tmp + tmp_0 + '\n |' + tmp_1 + 'override val path = Path' + tmp_3 + '\n |' + tmp_4 + 'override val method = Wirespec.Method.' + endpoint.vp_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.wp_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_10(this)) + '),\n |' + Spacer_instance.hs(3) + 'method = request.method.name,\n |' + Spacer_instance.hs(3) + 'queries = ' + this.e1y(endpoint) + ',\n |' + Spacer_instance.hs(3) + 'headers = ' + this.d1y(endpoint) + ',\n |' + Spacer_instance.hs(3) + 'body = ' + (!(_this__u8e3s4.dq_1 == null) ? 'serialization.serializeBody(request.body, typeOf<' + emit_16(this, _this__u8e3s4.dq_1) + '>())' : 'null') + ',\n |' + Spacer_instance.hs(2) + ')\n |\n |' + Spacer_instance.toString() + 'fun fromRequest(serialization: Wirespec.Deserializer, request: Wirespec.RawRequest): Request =\n |' + Spacer_instance.hs(2) + 'Request' + emitDeserializedParams(this, _this__u8e3s4, endpoint) + '\n ');
|
|
449
446
|
}
|
|
450
447
|
function emitRequestHeaders(_this__u8e3s4) {
|
|
451
448
|
var tmp;
|
|
452
|
-
if (_this__u8e3s4.
|
|
449
|
+
if (_this__u8e3s4.yp_1.r()) {
|
|
453
450
|
tmp = 'emptyMap()';
|
|
454
451
|
} else {
|
|
455
|
-
var tmp_0 = Spacer_instance.
|
|
456
|
-
var tmp_1 = ',\n' + Spacer_instance.
|
|
457
|
-
tmp = trimMargin('\n |mapOf(\n |' + tmp_0 + joinToString(_this__u8e3s4.
|
|
452
|
+
var tmp_0 = Spacer_instance.hs(5);
|
|
453
|
+
var tmp_1 = ',\n' + Spacer_instance.hs(5);
|
|
454
|
+
tmp = trimMargin('\n |mapOf(\n |' + tmp_0 + joinToString(_this__u8e3s4.yp_1, tmp_1, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitRequestHeaders$lambda(this)) + '\n |' + Spacer_instance.hs(4) + ')\n ');
|
|
458
455
|
}
|
|
459
456
|
return tmp;
|
|
460
457
|
}
|
|
461
458
|
function emitQueries(endpoint) {
|
|
462
459
|
var tmp;
|
|
463
460
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
464
|
-
if (!endpoint.
|
|
465
|
-
var tmp_0 = Spacer_instance.
|
|
466
|
-
var tmp_1 = ',\n' + Spacer_instance.
|
|
467
|
-
tmp = trimMargin('\n |mapOf(\n |' + tmp_0 + joinToString(endpoint.
|
|
461
|
+
if (!endpoint.xp_1.r()) {
|
|
462
|
+
var tmp_0 = Spacer_instance.hs(5);
|
|
463
|
+
var tmp_1 = ',\n' + Spacer_instance.hs(5);
|
|
464
|
+
tmp = trimMargin('\n |mapOf(\n |' + tmp_0 + joinToString(endpoint.xp_1, tmp_1, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitQueries$lambda(this)) + '\n |' + Spacer_instance.hs(4) + ')\n ');
|
|
468
465
|
} else {
|
|
469
466
|
tmp = 'emptyMap()';
|
|
470
467
|
}
|
|
471
468
|
return tmp;
|
|
472
469
|
}
|
|
473
|
-
function
|
|
470
|
+
function emit_12(_this__u8e3s4) {
|
|
474
471
|
// Inline function 'kotlin.let' call
|
|
475
|
-
var it = joinToString(_this__u8e3s4.
|
|
472
|
+
var it = joinToString(_this__u8e3s4.hq_1, ', ', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_11(this));
|
|
476
473
|
var responseHeaderFields = isBlank(it) ? '' : ', ' + it;
|
|
477
474
|
var tmp = Spacer_instance.toString();
|
|
478
|
-
var tmp_0 = emit_16(this, _this__u8e3s4.
|
|
479
|
-
var tmp_1 = toString_0(charCodeAt(_this__u8e3s4.
|
|
480
|
-
var tmp_2 = emit_16(this, _this__u8e3s4.
|
|
481
|
-
var tmp_3 = concatGenerics(emit_16(this, _this__u8e3s4.
|
|
482
|
-
var tmp_4 = Spacer_instance.
|
|
483
|
-
var tmp_5 = fixStatus(_this__u8e3s4.
|
|
484
|
-
var tmp_6 = Spacer_instance.
|
|
485
|
-
var tmp_7 = brace(this, joinToString(_this__u8e3s4.
|
|
486
|
-
return trimMargin('\n |' + tmp + 'data class Response' + _this__u8e3s4.
|
|
475
|
+
var tmp_0 = emit_16(this, _this__u8e3s4.iq_1);
|
|
476
|
+
var tmp_1 = toString_0(charCodeAt(_this__u8e3s4.gq_1, 0));
|
|
477
|
+
var tmp_2 = emit_16(this, _this__u8e3s4.iq_1);
|
|
478
|
+
var tmp_3 = concatGenerics(emit_16(this, _this__u8e3s4.iq_1));
|
|
479
|
+
var tmp_4 = Spacer_instance.hs(2);
|
|
480
|
+
var tmp_5 = fixStatus(_this__u8e3s4.gq_1);
|
|
481
|
+
var tmp_6 = Spacer_instance.hs(2);
|
|
482
|
+
var tmp_7 = brace(this, joinToString(_this__u8e3s4.hq_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_12(this)));
|
|
483
|
+
return trimMargin('\n |' + tmp + 'data class Response' + _this__u8e3s4.gq_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.hq_1, 'ResponseHeaders', 'Wirespec.Response.Headers', 2, KotlinEndpointDefinitionEmitter$emit$lambda_13(this)) + '\n |' + Spacer_instance.toString() + '}\n ');
|
|
487
484
|
}
|
|
488
485
|
function emitBody(_this__u8e3s4, content) {
|
|
489
486
|
return 'serialization.serializeBody(response.body, typeOf<' + emit_16(_this__u8e3s4, content) + '>())';
|
|
490
487
|
}
|
|
491
488
|
function emitHeaders(_this__u8e3s4) {
|
|
492
489
|
var tmp;
|
|
493
|
-
if (_this__u8e3s4.
|
|
490
|
+
if (_this__u8e3s4.hq_1.r()) {
|
|
494
491
|
tmp = 'emptyMap()';
|
|
495
492
|
} else {
|
|
496
|
-
var tmp_0 = Spacer_instance.
|
|
497
|
-
var tmp_1 = ',\n' + Spacer_instance.
|
|
498
|
-
tmp = trimMargin('\n |mapOf(\n |' + tmp_0 + joinToString(_this__u8e3s4.
|
|
493
|
+
var tmp_0 = Spacer_instance.hs(5);
|
|
494
|
+
var tmp_1 = ',\n' + Spacer_instance.hs(5);
|
|
495
|
+
tmp = trimMargin('\n |mapOf(\n |' + tmp_0 + joinToString(_this__u8e3s4.hq_1, tmp_1, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitHeaders$lambda(this)) + '\n |' + Spacer_instance.hs(4) + ')\n ');
|
|
499
496
|
}
|
|
500
497
|
return tmp;
|
|
501
498
|
}
|
|
502
499
|
initMetadataForInterface(KotlinEndpointDefinitionEmitter, 'KotlinEndpointDefinitionEmitter', VOID, VOID, [KotlinTypeDefinitionEmitter]);
|
|
503
|
-
function
|
|
504
|
-
var tmp = this.
|
|
505
|
-
return trimMargin('\n |enum class ' + tmp + ' (override val label: String): Wirespec.Enum {\n |' + spacer(joinToString(enum_0.
|
|
500
|
+
function emit_13(enum_0, module_0) {
|
|
501
|
+
var tmp = this.u1x(enum_0.xr_1);
|
|
502
|
+
return trimMargin('\n |enum class ' + tmp + ' (override val label: String): Wirespec.Enum {\n |' + spacer(joinToString(enum_0.yr_1, ',\n', VOID, VOID, VOID, VOID, KotlinEnumDefinitionEmitter$emit$lambda(this))) + ';\n |' + Spacer_instance.toString() + 'override fun toString(): String {\n |' + Spacer_instance.hs(2) + 'return label\n |' + Spacer_instance.toString() + '}\n |}\n |\n ');
|
|
506
503
|
}
|
|
507
504
|
initMetadataForInterface(KotlinEnumDefinitionEmitter, 'KotlinEnumDefinitionEmitter', VOID, VOID, [KotlinIdentifierEmitter]);
|
|
505
|
+
function emit_14(union) {
|
|
506
|
+
return trimMargin('\n |sealed interface ' + this.nr(union.gp_1) + '\n |\n ');
|
|
507
|
+
}
|
|
508
|
+
initMetadataForInterface(KotlinUnionDefinitionEmitter, 'KotlinUnionDefinitionEmitter', VOID, VOID, [KotlinIdentifierEmitter]);
|
|
508
509
|
function emit_15(refined) {
|
|
509
|
-
return trimMargin('\n |data class ' + this.
|
|
510
|
+
return trimMargin('\n |data class ' + this.u1x(refined.sr_1) + '(override val value: ' + this.nq(refined.tr_1) + '): Wirespec.Refined<' + this.nq(refined.tr_1) + '> {\n |' + Spacer_instance.toString() + 'override fun toString() = value.toString()\n |' + Spacer_instance.toString() + 'override fun validate() = ' + this.bs(refined) + '\n |}\n |\n ');
|
|
510
511
|
}
|
|
511
512
|
function emitValidator(_this__u8e3s4) {
|
|
512
513
|
var defaultReturn = 'true';
|
|
513
|
-
var type = _this__u8e3s4.
|
|
514
|
+
var type = _this__u8e3s4.tr_1.fv_1;
|
|
514
515
|
var tmp;
|
|
515
516
|
if (type instanceof Integer) {
|
|
516
|
-
var tmp0_safe_receiver = type.
|
|
517
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.
|
|
517
|
+
var tmp0_safe_receiver = type.ku_1;
|
|
518
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.oq(tmp0_safe_receiver);
|
|
518
519
|
tmp = tmp1_elvis_lhs == null ? defaultReturn : tmp1_elvis_lhs;
|
|
519
520
|
} else {
|
|
520
521
|
if (type instanceof Number_0) {
|
|
521
|
-
var tmp2_safe_receiver = type.
|
|
522
|
-
var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : this.
|
|
522
|
+
var tmp2_safe_receiver = type.nu_1;
|
|
523
|
+
var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : this.oq(tmp2_safe_receiver);
|
|
523
524
|
tmp = tmp3_elvis_lhs == null ? defaultReturn : tmp3_elvis_lhs;
|
|
524
525
|
} else {
|
|
525
526
|
if (type instanceof String_0) {
|
|
526
|
-
var tmp4_safe_receiver = type.
|
|
527
|
+
var tmp4_safe_receiver = type.hu_1;
|
|
527
528
|
var tmp_0;
|
|
528
529
|
var tmp_1 = tmp4_safe_receiver;
|
|
529
530
|
if ((tmp_1 == null ? null : new RegExp_0(tmp_1)) == null) {
|
|
530
531
|
tmp_0 = null;
|
|
531
532
|
} else {
|
|
532
|
-
tmp_0 = this.
|
|
533
|
+
tmp_0 = this.oq(new RegExp_0(tmp4_safe_receiver));
|
|
533
534
|
}
|
|
534
535
|
var tmp5_elvis_lhs = tmp_0;
|
|
535
536
|
tmp = tmp5_elvis_lhs == null ? defaultReturn : tmp5_elvis_lhs;
|
|
@@ -549,7 +550,7 @@ function emitValidator(_this__u8e3s4) {
|
|
|
549
550
|
return tmp;
|
|
550
551
|
}
|
|
551
552
|
initMetadataForInterface(KotlinRefinedTypeDefinitionEmitter, 'KotlinRefinedTypeDefinitionEmitter', VOID, VOID, [KotlinIdentifierEmitter, KotlinTypeDefinitionEmitter]);
|
|
552
|
-
initMetadataForClass(KotlinEmitter, 'KotlinEmitter', KotlinEmitter, LanguageEmitter, [LanguageEmitter,
|
|
553
|
+
initMetadataForClass(KotlinEmitter, 'KotlinEmitter', KotlinEmitter, LanguageEmitter, [LanguageEmitter, KotlinEndpointDefinitionEmitter, KotlinEnumDefinitionEmitter, KotlinUnionDefinitionEmitter, KotlinRefinedTypeDefinitionEmitter, KotlinTypeDefinitionEmitter, KotlinIdentifierEmitter, KotlinChannelDefinitionEmitter]);
|
|
553
554
|
initMetadataForCompanion(Companion);
|
|
554
555
|
initMetadataForCompanion(Companion_0);
|
|
555
556
|
initMetadataForClass(KotlinIrEmitter, 'KotlinIrEmitter', KotlinIrEmitter, VOID, [IrEmitter]);
|
|
@@ -563,8 +564,8 @@ function emitImports($this, _this__u8e3s4) {
|
|
|
563
564
|
var _iterator__ex2g4s = this_0.t();
|
|
564
565
|
while (_iterator__ex2g4s.u()) {
|
|
565
566
|
var item = _iterator__ex2g4s.v();
|
|
566
|
-
var tmp$ret$0 = 'import ' + $this.
|
|
567
|
-
destination.
|
|
567
|
+
var tmp$ret$0 = 'import ' + $this.u1w().ds_1 + '.model.' + item.bv_1 + ';';
|
|
568
|
+
destination.x(tmp$ret$0);
|
|
568
569
|
}
|
|
569
570
|
var tmp = destination;
|
|
570
571
|
return joinToString(tmp, '\n', VOID, VOID, VOID, VOID, KotlinChannelDefinitionEmitter$emitImports$lambda);
|
|
@@ -576,67 +577,67 @@ function KotlinChannelDefinitionEmitter$emitImports$lambda(it) {
|
|
|
576
577
|
function KotlinChannelDefinitionEmitter() {
|
|
577
578
|
}
|
|
578
579
|
function KotlinEmitter(packageName, emitShared) {
|
|
579
|
-
packageName = packageName === VOID ? Companion_instance.
|
|
580
|
-
emitShared = emitShared === VOID ? Companion_instance_0.
|
|
580
|
+
packageName = packageName === VOID ? Companion_instance.cs('community.flock.wirespec.generated') : packageName;
|
|
581
|
+
emitShared = emitShared === VOID ? Companion_instance_0.wo() : emitShared;
|
|
581
582
|
LanguageEmitter.call(this);
|
|
582
|
-
this.
|
|
583
|
-
this.
|
|
584
|
-
this.
|
|
585
|
-
this.
|
|
586
|
-
this.
|
|
587
|
-
this.
|
|
588
|
-
}
|
|
589
|
-
protoOf(KotlinEmitter).
|
|
590
|
-
return this.
|
|
583
|
+
this.v1x_1 = packageName;
|
|
584
|
+
this.w1x_1 = emitShared;
|
|
585
|
+
this.x1x_1 = '\nimport community.flock.wirespec.kotlin.Wirespec\nimport kotlin.reflect.typeOf\n';
|
|
586
|
+
this.y1x_1 = FileExtension_Kotlin_getInstance();
|
|
587
|
+
this.z1x_1 = KotlinShared_getInstance();
|
|
588
|
+
this.a1y_1 = '//';
|
|
589
|
+
}
|
|
590
|
+
protoOf(KotlinEmitter).u1w = function () {
|
|
591
|
+
return this.v1x_1;
|
|
591
592
|
};
|
|
592
|
-
protoOf(KotlinEmitter).
|
|
593
|
-
return this.
|
|
593
|
+
protoOf(KotlinEmitter).uq = function () {
|
|
594
|
+
return this.y1x_1;
|
|
594
595
|
};
|
|
595
|
-
protoOf(KotlinEmitter).
|
|
596
|
-
return this.
|
|
596
|
+
protoOf(KotlinEmitter).d1x = function () {
|
|
597
|
+
return this.z1x_1;
|
|
597
598
|
};
|
|
598
|
-
protoOf(KotlinEmitter).
|
|
599
|
-
return this.
|
|
599
|
+
protoOf(KotlinEmitter).vq = function () {
|
|
600
|
+
return this.a1y_1;
|
|
600
601
|
};
|
|
601
|
-
protoOf(KotlinEmitter).
|
|
602
|
+
protoOf(KotlinEmitter).kr = function (module_0, logger) {
|
|
602
603
|
// Inline function 'kotlin.let' call
|
|
603
|
-
var it = protoOf(LanguageEmitter).
|
|
604
|
-
return this.
|
|
604
|
+
var it = protoOf(LanguageEmitter).kr.call(this, module_0, logger);
|
|
605
|
+
return this.w1x_1.xo_1 ? NonEmptyList__plus_impl_xqmb9(it, new Emitted(Companion_instance.cs('community.flock.wirespec.kotlin').fs() + 'Wirespec', this.d1x().c1y_1)) : it;
|
|
605
606
|
};
|
|
606
|
-
protoOf(KotlinEmitter).
|
|
607
|
+
protoOf(KotlinEmitter).lr = function (definition, module_0, logger) {
|
|
607
608
|
// Inline function 'kotlin.let' call
|
|
608
|
-
var it = protoOf(LanguageEmitter).
|
|
609
|
-
var subPackageName = plus(this.
|
|
610
|
-
var tmp = subPackageName.
|
|
609
|
+
var it = protoOf(LanguageEmitter).lr.call(this, definition, module_0, logger);
|
|
610
|
+
var subPackageName = plus(this.u1w(), definition);
|
|
611
|
+
var tmp = subPackageName.fs() + it.yo_1;
|
|
611
612
|
// Inline function 'kotlin.text.trimStart' call
|
|
612
|
-
var this_0 = trimMargin('\n |package ' + subPackageName.toString() + '\n |' + (Companion_instance_1.
|
|
613
|
+
var this_0 = trimMargin('\n |package ' + subPackageName.toString() + '\n |' + (Companion_instance_1.gr(module_0) ? this.x1x_1 : '') + '\n |' + it.zo_1 + '\n ');
|
|
613
614
|
var tmp$ret$0 = toString(trimStart(isCharSequence(this_0) ? this_0 : THROW_CCE()));
|
|
614
615
|
return new Emitted(tmp, tmp$ret$0);
|
|
615
616
|
};
|
|
616
617
|
function emitStatusInterfaces($this, _this__u8e3s4) {
|
|
617
618
|
// Inline function 'kotlin.collections.map' call
|
|
618
|
-
var this_0 = _this__u8e3s4.
|
|
619
|
+
var this_0 = _this__u8e3s4.aq_1;
|
|
619
620
|
// Inline function 'kotlin.collections.mapTo' call
|
|
620
621
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
621
622
|
var _iterator__ex2g4s = this_0.t();
|
|
622
623
|
while (_iterator__ex2g4s.u()) {
|
|
623
624
|
var item = _iterator__ex2g4s.v();
|
|
624
|
-
var tmp$ret$0 = new Char(charCodeAt(item.
|
|
625
|
-
destination.
|
|
625
|
+
var tmp$ret$0 = new Char(charCodeAt(item.gq_1, 0));
|
|
626
|
+
destination.x(tmp$ret$0);
|
|
626
627
|
}
|
|
627
628
|
var tmp = distinct(destination);
|
|
628
629
|
return joinToString(tmp, '\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitStatusInterfaces$lambda);
|
|
629
630
|
}
|
|
630
631
|
function emitResponseInterfaces($this, _this__u8e3s4) {
|
|
631
632
|
// Inline function 'kotlin.collections.map' call
|
|
632
|
-
var this_0 = _this__u8e3s4.
|
|
633
|
+
var this_0 = _this__u8e3s4.aq_1;
|
|
633
634
|
// Inline function 'kotlin.collections.mapTo' call
|
|
634
635
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
635
636
|
var _iterator__ex2g4s = this_0.t();
|
|
636
637
|
while (_iterator__ex2g4s.u()) {
|
|
637
638
|
var item = _iterator__ex2g4s.v();
|
|
638
|
-
var tmp$ret$0 = emit_16($this, item.
|
|
639
|
-
destination.
|
|
639
|
+
var tmp$ret$0 = emit_16($this, item.iq_1);
|
|
640
|
+
destination.x(tmp$ret$0);
|
|
640
641
|
}
|
|
641
642
|
var tmp = distinct(destination);
|
|
642
643
|
return joinToString(tmp, '\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitResponseInterfaces$lambda);
|
|
@@ -644,64 +645,64 @@ function emitResponseInterfaces($this, _this__u8e3s4) {
|
|
|
644
645
|
function emitConstructor($this, _this__u8e3s4, endpoint) {
|
|
645
646
|
var tmp = get_pathParams(endpoint);
|
|
646
647
|
var tmp_0 = orNull(joinToString(tmp, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitConstructor$lambda($this)));
|
|
647
|
-
var tmp_1 = orNull(joinToString(endpoint.
|
|
648
|
-
var tmp_2 = orNull(joinToString(endpoint.
|
|
649
|
-
var tmp0_safe_receiver = _this__u8e3s4.
|
|
648
|
+
var tmp_1 = orNull(joinToString(endpoint.xp_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitConstructor$lambda_0($this)));
|
|
649
|
+
var tmp_2 = orNull(joinToString(endpoint.yp_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitConstructor$lambda_1($this)));
|
|
650
|
+
var tmp0_safe_receiver = _this__u8e3s4.dq_1;
|
|
650
651
|
var tmp_3;
|
|
651
652
|
if (tmp0_safe_receiver == null) {
|
|
652
653
|
tmp_3 = null;
|
|
653
654
|
} else {
|
|
654
655
|
// Inline function 'kotlin.let' call
|
|
655
|
-
tmp_3 = Spacer_instance.
|
|
656
|
+
tmp_3 = Spacer_instance.hs(2) + 'override val body: ' + emit_16($this, tmp0_safe_receiver) + ',';
|
|
656
657
|
}
|
|
657
658
|
// Inline function 'kotlin.let' call
|
|
658
659
|
var it = joinToString(listOfNotNull([tmp_0, tmp_1, tmp_2, tmp_3]), ',\n');
|
|
659
|
-
return isBlank(it) ? 'object Request : Wirespec.Request<' + emit_16($this, _this__u8e3s4.
|
|
660
|
+
return isBlank(it) ? 'object Request : Wirespec.Request<' + emit_16($this, _this__u8e3s4.dq_1) + '> {' : 'class Request(\n' + it + '\n' + Spacer_instance.toString() + ') : Wirespec.Request<' + emit_16($this, _this__u8e3s4.dq_1) + '> {';
|
|
660
661
|
}
|
|
661
662
|
function emitDeserializedParams($this, _this__u8e3s4, endpoint) {
|
|
662
663
|
var tmp = get_indexedPathParams(endpoint);
|
|
663
664
|
var tmp_0 = orNull(joinToString(tmp, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitDeserializedParams$lambda($this)));
|
|
664
|
-
var tmp_1 = orNull(joinToString(endpoint.
|
|
665
|
-
var tmp_2 = orNull(joinToString(endpoint.
|
|
666
|
-
var tmp0_safe_receiver = _this__u8e3s4.
|
|
665
|
+
var tmp_1 = orNull(joinToString(endpoint.xp_1, ',\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitDeserializedParams$lambda_0($this)));
|
|
666
|
+
var tmp_2 = orNull(joinToString(endpoint.yp_1, ',\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitDeserializedParams$lambda_1($this)));
|
|
667
|
+
var tmp0_safe_receiver = _this__u8e3s4.dq_1;
|
|
667
668
|
var tmp_3;
|
|
668
669
|
if (tmp0_safe_receiver == null) {
|
|
669
670
|
tmp_3 = null;
|
|
670
671
|
} else {
|
|
671
672
|
// Inline function 'kotlin.let' call
|
|
672
|
-
tmp_3 = Spacer_instance.
|
|
673
|
+
tmp_3 = Spacer_instance.hs(3) + 'body = serialization.deserializeBody(requireNotNull(request.body) { "body is null" }, typeOf<' + emit_16($this, tmp0_safe_receiver) + '>()),';
|
|
673
674
|
}
|
|
674
675
|
// Inline function 'kotlin.let' call
|
|
675
676
|
var it = joinToString(listOfNotNull([tmp_0, tmp_1, tmp_2, tmp_3]), ',\n');
|
|
676
|
-
return isBlank(it) ? '' : '(\n' + it + '\n' + Spacer_instance.
|
|
677
|
+
return isBlank(it) ? '' : '(\n' + it + '\n' + Spacer_instance.hs(2) + ')';
|
|
677
678
|
}
|
|
678
679
|
function emitSerialized($this, _this__u8e3s4) {
|
|
679
|
-
return trimMargin('\n |' + Spacer_instance.
|
|
680
|
+
return trimMargin('\n |' + Spacer_instance.hs(3) + 'is Response' + _this__u8e3s4.gq_1 + ' -> Wirespec.RawResponse(\n |' + Spacer_instance.hs(4) + 'statusCode = response.status,\n |' + Spacer_instance.hs(4) + 'headers = ' + $this.g1y(_this__u8e3s4) + ',\n |' + Spacer_instance.hs(4) + 'body = ' + (!(_this__u8e3s4.iq_1 == null) ? $this.f1y($this, _this__u8e3s4.iq_1) : 'null') + ',\n |' + Spacer_instance.hs(3) + ')\n ');
|
|
680
681
|
}
|
|
681
682
|
function emitDeserialized($this, _this__u8e3s4) {
|
|
682
|
-
var tmp = Spacer_instance.
|
|
683
|
+
var tmp = Spacer_instance.hs(3) + _this__u8e3s4.gq_1 + ' -> Response' + _this__u8e3s4.gq_1 + '(';
|
|
683
684
|
var tmp_0;
|
|
684
|
-
if (!(_this__u8e3s4.
|
|
685
|
-
tmp_0 = Spacer_instance.
|
|
685
|
+
if (!(_this__u8e3s4.iq_1 == null)) {
|
|
686
|
+
tmp_0 = Spacer_instance.hs(4) + 'body = serialization.deserializeBody(requireNotNull(response.body) { "body is null" }, typeOf<' + emit_16($this, _this__u8e3s4.iq_1) + '>()),';
|
|
686
687
|
} else {
|
|
687
|
-
tmp_0 = Spacer_instance.
|
|
688
|
+
tmp_0 = Spacer_instance.hs(4) + 'body = Unit,';
|
|
688
689
|
}
|
|
689
690
|
var tmp_1 = tmp_0;
|
|
690
|
-
return joinToString(listOfNotNull([tmp, tmp_1, orNull(joinToString(_this__u8e3s4.
|
|
691
|
+
return joinToString(listOfNotNull([tmp, tmp_1, orNull(joinToString(_this__u8e3s4.hq_1, ',\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitDeserialized$lambda($this))), Spacer_instance.hs(3) + ')']), '\n');
|
|
691
692
|
}
|
|
692
693
|
function emitSerializedMapEntry($this, _this__u8e3s4, type, fields) {
|
|
693
|
-
return '"' + _this__u8e3s4.
|
|
694
|
+
return '"' + _this__u8e3s4.qp_1.l1() + '" to ' + type + '.' + fields + '.' + $this.nr(_this__u8e3s4.qp_1) + '?.let{ serialization.serializeParam(it, typeOf<' + $this.nq(_this__u8e3s4.rp_1) + '>()) }.orEmpty()';
|
|
694
695
|
}
|
|
695
696
|
function emitDeserialized_0($this, _this__u8e3s4) {
|
|
696
|
-
return Spacer_instance.
|
|
697
|
+
return Spacer_instance.hs(3) + $this.nr(_this__u8e3s4.ue_1.bq_1) + ' = serialization.deserializePath(request.path[' + _this__u8e3s4.te_1 + '], typeOf<' + $this.nq(_this__u8e3s4.ue_1.cq_1) + '>())';
|
|
697
698
|
}
|
|
698
699
|
function emitDeserializedParams_0($this, _this__u8e3s4, type, fields, spaces, caseSensitive) {
|
|
699
|
-
var trimMargin_0 = trimMargin('\n |' + Spacer_instance.
|
|
700
|
+
var trimMargin_0 = trimMargin('\n |' + Spacer_instance.hs(spaces) + $this.nr(_this__u8e3s4.qp_1) + ' =\n |' + Spacer_instance.hs(spaces + 1 | 0) + type + '.' + fields + '\n |' + Spacer_instance.hs(spaces + 2 | 0) + '.entries\n |' + Spacer_instance.hs(spaces + 2 | 0) + '.find { it.key.equals("' + _this__u8e3s4.qp_1.l1() + '", ignoreCase = ' + !caseSensitive + ') }\n |' + Spacer_instance.hs(spaces + 2 | 0) + '?.let { serialization.deserializeParam(it.value, typeOf<' + $this.nq(_this__u8e3s4.rp_1) + '>()) }\n ');
|
|
700
701
|
var tmp;
|
|
701
|
-
if (_this__u8e3s4.
|
|
702
|
+
if (_this__u8e3s4.rp_1.tu()) {
|
|
702
703
|
tmp = trimMargin_0;
|
|
703
704
|
} else {
|
|
704
|
-
tmp = trimMargin_0 + '\n' + Spacer_instance.
|
|
705
|
+
tmp = trimMargin_0 + '\n' + Spacer_instance.hs(spaces + 2 | 0) + '?: throw IllegalArgumentException("' + $this.nr(_this__u8e3s4.qp_1) + ' is null")';
|
|
705
706
|
}
|
|
706
707
|
return tmp;
|
|
707
708
|
}
|
|
@@ -711,16 +712,16 @@ function emitDeserializedParams$default($this, _this__u8e3s4, type, fields, spac
|
|
|
711
712
|
return emitDeserializedParams_0($this, _this__u8e3s4, type, fields, spaces, caseSensitive);
|
|
712
713
|
}
|
|
713
714
|
function emitIdentifier($this, _this__u8e3s4) {
|
|
714
|
-
return 'request.path.' + $this.
|
|
715
|
+
return 'request.path.' + $this.nr(_this__u8e3s4.bq_1) + '.let{serialization.serializePath(it, typeOf<' + $this.nq(_this__u8e3s4.cq_1) + '>())}';
|
|
715
716
|
}
|
|
716
717
|
function emit_16($this, _this__u8e3s4) {
|
|
717
|
-
var tmp1_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.
|
|
718
|
-
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : $this.
|
|
718
|
+
var tmp1_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.fq_1;
|
|
719
|
+
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : $this.nq(tmp1_safe_receiver);
|
|
719
720
|
var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : removeQuestionMark(tmp2_safe_receiver);
|
|
720
721
|
return tmp3_elvis_lhs == null ? 'Unit' : tmp3_elvis_lhs;
|
|
721
722
|
}
|
|
722
723
|
function emit_17($this, _this__u8e3s4) {
|
|
723
|
-
return $this.
|
|
724
|
+
return $this.nr(_this__u8e3s4.bq_1) + ': ' + $this.nq(_this__u8e3s4.cq_1);
|
|
724
725
|
}
|
|
725
726
|
function brace($this, _this__u8e3s4) {
|
|
726
727
|
return wrap($this, _this__u8e3s4, '(', ')');
|
|
@@ -738,10 +739,10 @@ function wrap($this, _this__u8e3s4, prefix, postfix) {
|
|
|
738
739
|
function emitObject($this, _this__u8e3s4, name, extends_0, spaces, block) {
|
|
739
740
|
var tmp;
|
|
740
741
|
if (_this__u8e3s4.r()) {
|
|
741
|
-
tmp = Spacer_instance.
|
|
742
|
+
tmp = Spacer_instance.hs(spaces) + 'data object ' + name + ' : ' + extends_0;
|
|
742
743
|
} else {
|
|
743
|
-
var tmp_0 = Spacer_instance.
|
|
744
|
-
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.
|
|
744
|
+
var tmp_0 = Spacer_instance.hs(spaces);
|
|
745
|
+
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.hs(spaces) + ') : ' + extends_0 + '\n ');
|
|
745
746
|
}
|
|
746
747
|
return tmp;
|
|
747
748
|
}
|
|
@@ -760,17 +761,17 @@ function KotlinEndpointDefinitionEmitter$emit$lambda_0(this$0) {
|
|
|
760
761
|
}
|
|
761
762
|
function KotlinEndpointDefinitionEmitter$emit$lambda_1(this$0) {
|
|
762
763
|
return function (it) {
|
|
763
|
-
return this$0.
|
|
764
|
+
return this$0.mq(it);
|
|
764
765
|
};
|
|
765
766
|
}
|
|
766
767
|
function KotlinEndpointDefinitionEmitter$emit$lambda_2(this$0) {
|
|
767
768
|
return function (it) {
|
|
768
|
-
return this$0.
|
|
769
|
+
return this$0.mq(it);
|
|
769
770
|
};
|
|
770
771
|
}
|
|
771
772
|
function KotlinEndpointDefinitionEmitter$emit$lambda_3(this$0) {
|
|
772
773
|
return function (it) {
|
|
773
|
-
return this$0.
|
|
774
|
+
return this$0.i1x(it);
|
|
774
775
|
};
|
|
775
776
|
}
|
|
776
777
|
function KotlinEndpointDefinitionEmitter$emit$lambda_4(this$0) {
|
|
@@ -787,31 +788,31 @@ function KotlinEndpointDefinitionEmitter$emit$lambda_6(it) {
|
|
|
787
788
|
return emit(it);
|
|
788
789
|
}
|
|
789
790
|
function KotlinEndpointDefinitionEmitter$emitStatusInterfaces$lambda(it) {
|
|
790
|
-
return Spacer_instance.toString() + 'sealed interface Response' + toString_0(it.
|
|
791
|
+
return Spacer_instance.toString() + 'sealed interface Response' + toString_0(it.h1_1) + 'XX<T: Any> : Response<T>';
|
|
791
792
|
}
|
|
792
793
|
function KotlinEndpointDefinitionEmitter$emitResponseInterfaces$lambda(it) {
|
|
793
794
|
return Spacer_instance.toString() + 'sealed interface Response' + concatGenerics(it) + ' : Response<' + it + '>';
|
|
794
795
|
}
|
|
795
796
|
function KotlinEndpointDefinitionEmitter$emit$lambda_7(this$0) {
|
|
796
797
|
return function (it) {
|
|
797
|
-
return this$0.
|
|
798
|
+
return this$0.nr(it.bq_1);
|
|
798
799
|
};
|
|
799
800
|
}
|
|
800
801
|
function KotlinEndpointDefinitionEmitter$emit$lambda_8(this$0) {
|
|
801
802
|
return function (it) {
|
|
802
|
-
return this$0.
|
|
803
|
+
return this$0.nr(it.qp_1);
|
|
803
804
|
};
|
|
804
805
|
}
|
|
805
806
|
function KotlinEndpointDefinitionEmitter$emit$lambda_9(this$0) {
|
|
806
807
|
return function (it) {
|
|
807
|
-
return this$0.
|
|
808
|
+
return this$0.nr(it.qp_1);
|
|
808
809
|
};
|
|
809
810
|
}
|
|
810
811
|
function KotlinEndpointDefinitionEmitter$emit$lambda_10(this$0) {
|
|
811
812
|
return function (it) {
|
|
812
813
|
var tmp;
|
|
813
814
|
if (it instanceof Literal) {
|
|
814
|
-
tmp = '"' + it.
|
|
815
|
+
tmp = '"' + it.xq_1 + '"';
|
|
815
816
|
} else {
|
|
816
817
|
if (it instanceof Param) {
|
|
817
818
|
tmp = emitIdentifier(this$0, it);
|
|
@@ -834,32 +835,32 @@ function KotlinEndpointDefinitionEmitter$emitQueries$lambda(this$0) {
|
|
|
834
835
|
}
|
|
835
836
|
function KotlinEndpointDefinitionEmitter$emit$lambda_11(this$0) {
|
|
836
837
|
return function (it) {
|
|
837
|
-
return 'val ' + this$0.
|
|
838
|
+
return 'val ' + this$0.mq(it);
|
|
838
839
|
};
|
|
839
840
|
}
|
|
840
841
|
function KotlinEndpointDefinitionEmitter$emit$lambda_12(this$0) {
|
|
841
842
|
return function (it) {
|
|
842
|
-
return this$0.
|
|
843
|
+
return this$0.nr(it.qp_1);
|
|
843
844
|
};
|
|
844
845
|
}
|
|
845
846
|
function KotlinEndpointDefinitionEmitter$emit$lambda_13(this$0) {
|
|
846
847
|
return function (it) {
|
|
847
|
-
return this$0.
|
|
848
|
+
return this$0.mq(it);
|
|
848
849
|
};
|
|
849
850
|
}
|
|
850
851
|
function KotlinEndpointDefinitionEmitter$emitConstructor$lambda(this$0) {
|
|
851
852
|
return function (it) {
|
|
852
|
-
return Spacer_instance.
|
|
853
|
+
return Spacer_instance.hs(2) + emit_17(this$0, it);
|
|
853
854
|
};
|
|
854
855
|
}
|
|
855
856
|
function KotlinEndpointDefinitionEmitter$emitConstructor$lambda_0(this$0) {
|
|
856
857
|
return function (it) {
|
|
857
|
-
return Spacer_instance.
|
|
858
|
+
return Spacer_instance.hs(2) + this$0.mq(it);
|
|
858
859
|
};
|
|
859
860
|
}
|
|
860
861
|
function KotlinEndpointDefinitionEmitter$emitConstructor$lambda_1(this$0) {
|
|
861
862
|
return function (it) {
|
|
862
|
-
return Spacer_instance.
|
|
863
|
+
return Spacer_instance.hs(2) + this$0.mq(it);
|
|
863
864
|
};
|
|
864
865
|
}
|
|
865
866
|
function KotlinEndpointDefinitionEmitter$emitDeserializedParams$lambda(this$0) {
|
|
@@ -889,7 +890,7 @@ function KotlinEndpointDefinitionEmitter$emitDeserialized$lambda(this$0) {
|
|
|
889
890
|
}
|
|
890
891
|
function KotlinEndpointDefinitionEmitter$emitObject$lambda($spaces, $block) {
|
|
891
892
|
return function (it) {
|
|
892
|
-
return Spacer_instance.
|
|
893
|
+
return Spacer_instance.hs($spaces + 1 | 0) + 'val ' + $block(it);
|
|
893
894
|
};
|
|
894
895
|
}
|
|
895
896
|
function KotlinEndpointDefinitionEmitter() {
|
|
@@ -898,18 +899,18 @@ function sanitizeNegative($this, _this__u8e3s4) {
|
|
|
898
899
|
return startsWith(_this__u8e3s4, '-') ? '__' + substring(_this__u8e3s4, 1) : _this__u8e3s4;
|
|
899
900
|
}
|
|
900
901
|
function sanitizeEnum($this, _this__u8e3s4) {
|
|
901
|
-
return $this.
|
|
902
|
+
return $this.j1x(joinToString(split(sanitizeNegative($this, _this__u8e3s4), ['-', ', ', '.', ' ', '//']), '_'));
|
|
902
903
|
}
|
|
903
904
|
function KotlinEnumDefinitionEmitter$emit$lambda(this$0) {
|
|
904
905
|
return function (it) {
|
|
905
|
-
return this$0.
|
|
906
|
+
return this$0.k1x(sanitizeEnum(this$0, it)) + '("' + it + '")';
|
|
906
907
|
};
|
|
907
908
|
}
|
|
908
909
|
function KotlinEnumDefinitionEmitter() {
|
|
909
910
|
}
|
|
910
911
|
function Companion() {
|
|
911
912
|
Companion_instance_2 = this;
|
|
912
|
-
this.
|
|
913
|
+
this.h1y_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']);
|
|
913
914
|
}
|
|
914
915
|
var Companion_instance_2;
|
|
915
916
|
function Companion_getInstance_0() {
|
|
@@ -918,27 +919,27 @@ function Companion_getInstance_0() {
|
|
|
918
919
|
return Companion_instance_2;
|
|
919
920
|
}
|
|
920
921
|
function KotlinIdentifierEmitter$sanitize$lambda(it) {
|
|
921
|
-
return isLetterOrDigit(it.
|
|
922
|
+
return isLetterOrDigit(it.h1_1) || listOf(new Char(_Char___init__impl__6a9atx(95))).u1(it);
|
|
922
923
|
}
|
|
923
924
|
function KotlinIdentifierEmitter() {
|
|
924
925
|
}
|
|
925
926
|
function _get_sanitizationConfig__sns434($this) {
|
|
926
|
-
var tmp0 = $this.
|
|
927
|
+
var tmp0 = $this.n1y_1;
|
|
927
928
|
var tmp = KProperty1;
|
|
928
929
|
// Inline function 'kotlin.getValue' call
|
|
929
930
|
getPropertyCallableRef('sanitizationConfig', 1, tmp, KotlinIrEmitter$_get_sanitizationConfig_$ref_tnafwf(), null);
|
|
930
|
-
return tmp0.
|
|
931
|
+
return tmp0.l1();
|
|
931
932
|
}
|
|
932
933
|
function _get_modelSanitizationConfig__vgg831($this) {
|
|
933
|
-
var tmp0 = $this.
|
|
934
|
+
var tmp0 = $this.o1y_1;
|
|
934
935
|
var tmp = KProperty1;
|
|
935
936
|
// Inline function 'kotlin.getValue' call
|
|
936
937
|
getPropertyCallableRef('modelSanitizationConfig', 1, tmp, KotlinIrEmitter$_get_modelSanitizationConfig_$ref_iulb4s(), null);
|
|
937
|
-
return tmp0.
|
|
938
|
+
return tmp0.l1();
|
|
938
939
|
}
|
|
939
940
|
function sanitize_0($this, _this__u8e3s4) {
|
|
940
941
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
941
|
-
var this_0 = split(_this__u8e3s4.
|
|
942
|
+
var this_0 = split(_this__u8e3s4.l1(), ['.', ' ']);
|
|
942
943
|
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
943
944
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
944
945
|
var index = 0;
|
|
@@ -947,8 +948,8 @@ function sanitize_0($this, _this__u8e3s4) {
|
|
|
947
948
|
var item = _iterator__ex2g4s.v();
|
|
948
949
|
var _unary__edvuaz = index;
|
|
949
950
|
index = _unary__edvuaz + 1 | 0;
|
|
950
|
-
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance_1.
|
|
951
|
-
destination.
|
|
951
|
+
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance_1.er(item) : item;
|
|
952
|
+
destination.x(tmp$ret$0);
|
|
952
953
|
}
|
|
953
954
|
// Inline function 'kotlin.text.filter' call
|
|
954
955
|
var tmp0 = joinToString(destination, '');
|
|
@@ -995,7 +996,7 @@ function sanitizeFirstIsDigit_0($this, _this__u8e3s4) {
|
|
|
995
996
|
return tmp;
|
|
996
997
|
}
|
|
997
998
|
function sanitizeKeywords_0($this, _this__u8e3s4) {
|
|
998
|
-
return Companion_getInstance_1().
|
|
999
|
+
return Companion_getInstance_1().p1y_1.u1(_this__u8e3s4) ? addBackticks(_this__u8e3s4) : _this__u8e3s4;
|
|
999
1000
|
}
|
|
1000
1001
|
function sanitizeSymbol($this, _this__u8e3s4) {
|
|
1001
1002
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
@@ -1008,8 +1009,8 @@ function sanitizeSymbol($this, _this__u8e3s4) {
|
|
|
1008
1009
|
var item = _iterator__ex2g4s.v();
|
|
1009
1010
|
var _unary__edvuaz = index;
|
|
1010
1011
|
index = _unary__edvuaz + 1 | 0;
|
|
1011
|
-
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance_1.
|
|
1012
|
-
destination.
|
|
1012
|
+
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance_1.er(item) : item;
|
|
1013
|
+
destination.x(tmp$ret$0);
|
|
1013
1014
|
}
|
|
1014
1015
|
// Inline function 'kotlin.text.filter' call
|
|
1015
1016
|
var tmp0 = joinToString(destination, '');
|
|
@@ -1068,7 +1069,7 @@ function sanitizeEnum_0($this, _this__u8e3s4) {
|
|
|
1068
1069
|
}
|
|
1069
1070
|
function Companion_0() {
|
|
1070
1071
|
Companion_instance_3 = this;
|
|
1071
|
-
this.
|
|
1072
|
+
this.p1y_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']);
|
|
1072
1073
|
}
|
|
1073
1074
|
var Companion_instance_3;
|
|
1074
1075
|
function Companion_getInstance_1() {
|
|
@@ -1081,13 +1082,13 @@ function KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda(it) {
|
|
|
1081
1082
|
}
|
|
1082
1083
|
function KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0) {
|
|
1083
1084
|
return function (name) {
|
|
1084
|
-
var sanitized = name.
|
|
1085
|
+
var sanitized = name.l1h_1.a1() > 1 ? name.q1m() : sanitizeSymbol(this$0, name.j1j());
|
|
1085
1086
|
return new Name(listOf(sanitized));
|
|
1086
1087
|
};
|
|
1087
1088
|
}
|
|
1088
1089
|
function KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0) {
|
|
1089
1090
|
return function (name) {
|
|
1090
|
-
return new Name(listOf(sanitizeSymbol(this$0, name.
|
|
1091
|
+
return new Name(listOf(sanitizeSymbol(this$0, name.q1m())));
|
|
1091
1092
|
};
|
|
1092
1093
|
}
|
|
1093
1094
|
function KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_2(this$0) {
|
|
@@ -1100,29 +1101,29 @@ function KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
1100
1101
|
var tmp;
|
|
1101
1102
|
var tmp_0;
|
|
1102
1103
|
if (stmt instanceof FunctionCall) {
|
|
1103
|
-
tmp_0 = stmt.
|
|
1104
|
+
tmp_0 = stmt.a1n_1.j1j() === 'validate';
|
|
1104
1105
|
} else {
|
|
1105
1106
|
tmp_0 = false;
|
|
1106
1107
|
}
|
|
1107
1108
|
if (tmp_0) {
|
|
1108
|
-
tmp = transformChildren(stmt.
|
|
1109
|
+
tmp = transformChildren(stmt.e1n(VOID, emptyList()), tr);
|
|
1109
1110
|
} else {
|
|
1110
1111
|
if (stmt instanceof ConstructorStatement) {
|
|
1111
|
-
var tmp_1 = tr.
|
|
1112
|
+
var tmp_1 = tr.y1u(stmt.s1n_1);
|
|
1112
1113
|
// Inline function 'kotlin.collections.map' call
|
|
1113
|
-
var this_0 = stmt.
|
|
1114
|
+
var this_0 = stmt.t1n_1;
|
|
1114
1115
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1115
|
-
var destination = ArrayList_init_$Create$(this_0.
|
|
1116
|
+
var destination = ArrayList_init_$Create$(this_0.a1());
|
|
1116
1117
|
// Inline function 'kotlin.collections.iterator' call
|
|
1117
|
-
var _iterator__ex2g4s = this_0.
|
|
1118
|
+
var _iterator__ex2g4s = this_0.j1().t();
|
|
1118
1119
|
while (_iterator__ex2g4s.u()) {
|
|
1119
1120
|
var item = _iterator__ex2g4s.v();
|
|
1120
1121
|
// Inline function 'kotlin.collections.component1' call
|
|
1121
|
-
var name = item.
|
|
1122
|
+
var name = item.k1();
|
|
1122
1123
|
// Inline function 'kotlin.collections.component2' call
|
|
1123
|
-
var expr = item.
|
|
1124
|
-
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), name), tr.
|
|
1125
|
-
destination.
|
|
1124
|
+
var expr = item.l1();
|
|
1125
|
+
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), name), tr.b1v(expr));
|
|
1126
|
+
destination.x(tmp$ret$3);
|
|
1126
1127
|
}
|
|
1127
1128
|
tmp = new ConstructorStatement(tmp_1, toMap(destination));
|
|
1128
1129
|
} else {
|
|
@@ -1134,7 +1135,7 @@ function KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
1134
1135
|
}
|
|
1135
1136
|
function KotlinIrEmitter$sanitizationConfig$delegate$lambda(this$0) {
|
|
1136
1137
|
return function () {
|
|
1137
|
-
var tmp = Companion_getInstance_1().
|
|
1138
|
+
var tmp = Companion_getInstance_1().p1y_1;
|
|
1138
1139
|
var tmp_0 = KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda;
|
|
1139
1140
|
var tmp_1 = KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0);
|
|
1140
1141
|
var tmp_2 = KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0);
|
|
@@ -1148,7 +1149,7 @@ function KotlinIrEmitter$_get_sanitizationConfig_$ref_tnafwf() {
|
|
|
1148
1149
|
};
|
|
1149
1150
|
}
|
|
1150
1151
|
function KotlinIrEmitter$modelSanitizationConfig$delegate$lambda$lambda(name) {
|
|
1151
|
-
return new Name(listOf(name.
|
|
1152
|
+
return new Name(listOf(name.j1j()));
|
|
1152
1153
|
}
|
|
1153
1154
|
function KotlinIrEmitter$modelSanitizationConfig$delegate$lambda$lambda_0(this$0) {
|
|
1154
1155
|
return function (it) {
|
|
@@ -1159,7 +1160,7 @@ function KotlinIrEmitter$modelSanitizationConfig$delegate$lambda(this$0) {
|
|
|
1159
1160
|
return function () {
|
|
1160
1161
|
var tmp = _get_sanitizationConfig__sns434(this$0);
|
|
1161
1162
|
var tmp_0 = KotlinIrEmitter$modelSanitizationConfig$delegate$lambda$lambda;
|
|
1162
|
-
return tmp.
|
|
1163
|
+
return tmp.t1w(VOID, VOID, tmp_0, VOID, KotlinIrEmitter$modelSanitizationConfig$delegate$lambda$lambda_0(this$0));
|
|
1163
1164
|
};
|
|
1164
1165
|
}
|
|
1165
1166
|
function KotlinIrEmitter$_get_modelSanitizationConfig_$ref_iulb4s() {
|
|
@@ -1171,22 +1172,22 @@ function KotlinIrEmitter$emitShared$lambda(element, transformer) {
|
|
|
1171
1172
|
var tmp;
|
|
1172
1173
|
if (element instanceof File) {
|
|
1173
1174
|
// Inline function 'kotlin.collections.partition' call
|
|
1174
|
-
var this_0 = element.
|
|
1175
|
+
var this_0 = element.w1n_1;
|
|
1175
1176
|
var first = ArrayList_init_$Create$_0();
|
|
1176
1177
|
var second = ArrayList_init_$Create$_0();
|
|
1177
1178
|
var _iterator__ex2g4s = this_0.t();
|
|
1178
1179
|
while (_iterator__ex2g4s.u()) {
|
|
1179
1180
|
var element_0 = _iterator__ex2g4s.v();
|
|
1180
1181
|
if (element_0 instanceof Package) {
|
|
1181
|
-
first.
|
|
1182
|
+
first.x(element_0);
|
|
1182
1183
|
} else {
|
|
1183
|
-
second.
|
|
1184
|
+
second.x(element_0);
|
|
1184
1185
|
}
|
|
1185
1186
|
}
|
|
1186
1187
|
var _destruct__k2r9zo = new Pair(first, second);
|
|
1187
|
-
var packageElements = _destruct__k2r9zo.
|
|
1188
|
-
var rest = _destruct__k2r9zo.
|
|
1189
|
-
tmp = element.
|
|
1188
|
+
var packageElements = _destruct__k2r9zo.ve();
|
|
1189
|
+
var rest = _destruct__k2r9zo.we();
|
|
1190
|
+
tmp = element.z1n(VOID, plus_2(plus_1(packageElements, import_0('kotlin.reflect', 'KType')), rest));
|
|
1190
1191
|
} else {
|
|
1191
1192
|
tmp = element;
|
|
1192
1193
|
}
|
|
@@ -1197,11 +1198,11 @@ function KotlinIrEmitter$emitShared$lambda_0($clientServer) {
|
|
|
1197
1198
|
return function (element, transformer) {
|
|
1198
1199
|
var tmp;
|
|
1199
1200
|
if (element instanceof Namespace) {
|
|
1200
|
-
var injected = element.
|
|
1201
|
+
var injected = element.b1o_1.equals(Companion_getInstance().n1h('Wirespec')) ? $clientServer : emptyList();
|
|
1201
1202
|
var tmp_0;
|
|
1202
1203
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1203
1204
|
if (!injected.r()) {
|
|
1204
|
-
tmp_0 = withElements(element, plus_2(element.
|
|
1205
|
+
tmp_0 = withElements(element, plus_2(element.x1n(), injected));
|
|
1205
1206
|
} else {
|
|
1206
1207
|
tmp_0 = element;
|
|
1207
1208
|
}
|
|
@@ -1226,7 +1227,7 @@ function KotlinIrEmitter$emitGenerator$lambda_1(it) {
|
|
|
1226
1227
|
}
|
|
1227
1228
|
function KotlinIrEmitter$emitGenerator$lambda_2(this$0) {
|
|
1228
1229
|
return function (it) {
|
|
1229
|
-
return import_0(this$0.
|
|
1230
|
+
return import_0(this$0.u1w().ds_1 + '.model', it);
|
|
1230
1231
|
};
|
|
1231
1232
|
}
|
|
1232
1233
|
function KotlinIrEmitter$emit$lambda(this$0) {
|
|
@@ -1236,29 +1237,29 @@ function KotlinIrEmitter$emit$lambda(this$0) {
|
|
|
1236
1237
|
}
|
|
1237
1238
|
function KotlinIrEmitter(packageName, emitShared) {
|
|
1238
1239
|
Companion_getInstance_1();
|
|
1239
|
-
packageName = packageName === VOID ? Companion_instance.
|
|
1240
|
-
emitShared = emitShared === VOID ? Companion_instance_0.
|
|
1241
|
-
this.
|
|
1242
|
-
this.
|
|
1243
|
-
this.
|
|
1244
|
-
this.
|
|
1245
|
-
this.
|
|
1240
|
+
packageName = packageName === VOID ? Companion_instance.cs('community.flock.wirespec.generated') : packageName;
|
|
1241
|
+
emitShared = emitShared === VOID ? Companion_instance_0.wo() : emitShared;
|
|
1242
|
+
this.i1y_1 = packageName;
|
|
1243
|
+
this.j1y_1 = emitShared;
|
|
1244
|
+
this.k1y_1 = KotlinGenerator_instance;
|
|
1245
|
+
this.l1y_1 = FileExtension_Kotlin_getInstance();
|
|
1246
|
+
this.m1y_1 = listOf_0([import_0('community.flock.wirespec.kotlin', 'Wirespec'), import_0('kotlin.reflect', 'typeOf')]);
|
|
1246
1247
|
var tmp = this;
|
|
1247
|
-
tmp.
|
|
1248
|
+
tmp.n1y_1 = lazy(KotlinIrEmitter$sanitizationConfig$delegate$lambda(this));
|
|
1248
1249
|
var tmp_0 = this;
|
|
1249
|
-
tmp_0.
|
|
1250
|
+
tmp_0.o1y_1 = lazy(KotlinIrEmitter$modelSanitizationConfig$delegate$lambda(this));
|
|
1250
1251
|
}
|
|
1251
|
-
protoOf(KotlinIrEmitter).
|
|
1252
|
-
return this.
|
|
1252
|
+
protoOf(KotlinIrEmitter).u1w = function () {
|
|
1253
|
+
return this.i1y_1;
|
|
1253
1254
|
};
|
|
1254
|
-
protoOf(KotlinIrEmitter).
|
|
1255
|
-
return this.
|
|
1255
|
+
protoOf(KotlinIrEmitter).t1v = function () {
|
|
1256
|
+
return this.k1y_1;
|
|
1256
1257
|
};
|
|
1257
|
-
protoOf(KotlinIrEmitter).
|
|
1258
|
-
return this.
|
|
1258
|
+
protoOf(KotlinIrEmitter).uq = function () {
|
|
1259
|
+
return this.l1y_1;
|
|
1259
1260
|
};
|
|
1260
|
-
protoOf(KotlinIrEmitter).
|
|
1261
|
-
var packageName = Companion_instance.
|
|
1261
|
+
protoOf(KotlinIrEmitter).x1v = function () {
|
|
1262
|
+
var packageName = Companion_instance.cs('community.flock.wirespec.kotlin');
|
|
1262
1263
|
var clientServer = convertClientServer(packageName);
|
|
1263
1264
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1264
1265
|
var this_0 = convert(packageName);
|
|
@@ -1266,48 +1267,48 @@ protoOf(KotlinIrEmitter).h1z = function () {
|
|
|
1266
1267
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1267
1268
|
var tmp = scope;
|
|
1268
1269
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1269
|
-
var this_1 = scope.
|
|
1270
|
+
var this_1 = scope.g1v_1;
|
|
1270
1271
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1271
1272
|
// Inline function 'kotlin.apply' call
|
|
1272
1273
|
var this_2 = new TransformerBuilder();
|
|
1273
|
-
this_2.
|
|
1274
|
-
var tmp$ret$2 = this_2.
|
|
1275
|
-
tmp.
|
|
1274
|
+
this_2.x1i(KotlinIrEmitter$emitShared$lambda);
|
|
1275
|
+
var tmp$ret$2 = this_2.y1i();
|
|
1276
|
+
tmp.g1v_1 = transform(this_1, tmp$ret$2);
|
|
1276
1277
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.injectAfter' call
|
|
1277
1278
|
var tmp_0 = scope;
|
|
1278
1279
|
// Inline function 'community.flock.wirespec.ir.core.injectAfter' call
|
|
1279
1280
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1280
|
-
var this_3 = scope.
|
|
1281
|
+
var this_3 = scope.g1v_1;
|
|
1281
1282
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1282
1283
|
// Inline function 'kotlin.apply' call
|
|
1283
1284
|
var this_4 = new TransformerBuilder();
|
|
1284
|
-
this_4.
|
|
1285
|
-
var tmp$ret$7 = this_4.
|
|
1286
|
-
tmp_0.
|
|
1287
|
-
var tmp_1 = scope.
|
|
1285
|
+
this_4.x1i(KotlinIrEmitter$emitShared$lambda_0(clientServer));
|
|
1286
|
+
var tmp$ret$7 = this_4.y1i();
|
|
1287
|
+
tmp_0.g1v_1 = transform(this_3, tmp$ret$7);
|
|
1288
|
+
var tmp_1 = scope.g1v_1;
|
|
1288
1289
|
var wirespecShared = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
1289
1290
|
var tmp_2;
|
|
1290
|
-
if (this.
|
|
1291
|
+
if (this.j1y_1.xo_1) {
|
|
1291
1292
|
tmp_2 = wirespecShared;
|
|
1292
1293
|
} else {
|
|
1293
1294
|
tmp_2 = null;
|
|
1294
1295
|
}
|
|
1295
1296
|
return tmp_2;
|
|
1296
1297
|
};
|
|
1297
|
-
protoOf(KotlinIrEmitter).
|
|
1298
|
+
protoOf(KotlinIrEmitter).lr = function (definition, module_0, logger) {
|
|
1298
1299
|
var file = emit_0.call(this, definition, module_0, logger);
|
|
1299
1300
|
// Inline function 'kotlin.takeIf' call
|
|
1300
|
-
var this_0 = this.
|
|
1301
|
+
var this_0 = this.m1y_1;
|
|
1301
1302
|
var tmp;
|
|
1302
|
-
if (Companion_instance_1.
|
|
1303
|
+
if (Companion_instance_1.hr(module_0)) {
|
|
1303
1304
|
tmp = this_0;
|
|
1304
1305
|
} else {
|
|
1305
1306
|
tmp = null;
|
|
1306
1307
|
}
|
|
1307
1308
|
var tmp$ret$1 = tmp;
|
|
1308
|
-
return placeInPackage(prependImports(file, tmp$ret$1), this.
|
|
1309
|
+
return placeInPackage(prependImports(file, tmp$ret$1), this.u1w(), definition);
|
|
1309
1310
|
};
|
|
1310
|
-
protoOf(KotlinIrEmitter).
|
|
1311
|
+
protoOf(KotlinIrEmitter).c1w = function (definition, module_0) {
|
|
1311
1312
|
var tmp;
|
|
1312
1313
|
if (definition instanceof Type) {
|
|
1313
1314
|
tmp = convertToGenerator_2(definition, module_0);
|
|
@@ -1328,60 +1329,60 @@ protoOf(KotlinIrEmitter).l1z = function (definition, module_0) {
|
|
|
1328
1329
|
}
|
|
1329
1330
|
var generatorFile = tmp;
|
|
1330
1331
|
var sanitized = sanitizeNames(generatorFile, _get_sanitizationConfig__sns434(this));
|
|
1331
|
-
var generatorOwnName = definition.
|
|
1332
|
+
var generatorOwnName = definition.mr().l1() + 'Generator';
|
|
1332
1333
|
var tmp_0 = asSequence_0(collectCustomTypeNames(sanitized));
|
|
1333
1334
|
var tmp_1 = filterNot(tmp_0, KotlinIrEmitter$emitGenerator$lambda);
|
|
1334
1335
|
var tmp_2 = filterNot(tmp_1, KotlinIrEmitter$emitGenerator$lambda_0(generatorOwnName));
|
|
1335
1336
|
var tmp_3 = distinct_0(map(tmp_2, KotlinIrEmitter$emitGenerator$lambda_1));
|
|
1336
1337
|
var modelImports = toList(map(tmp_3, KotlinIrEmitter$emitGenerator$lambda_2(this)));
|
|
1337
|
-
return placeInPackage_0(prependImports(sanitized, plus_2(this.
|
|
1338
|
+
return placeInPackage_0(prependImports(sanitized, plus_2(this.m1y_1, modelImports)), this.u1w(), 'generator');
|
|
1338
1339
|
};
|
|
1339
|
-
protoOf(KotlinIrEmitter).
|
|
1340
|
+
protoOf(KotlinIrEmitter).kq = function (type, module_0) {
|
|
1340
1341
|
return ensureEmptyStructHasConstructor(sanitizeNames(convertWithValidation(type, module_0), _get_modelSanitizationConfig__vgg831(this)));
|
|
1341
1342
|
};
|
|
1342
|
-
protoOf(KotlinIrEmitter).
|
|
1343
|
+
protoOf(KotlinIrEmitter).zr = function (enum_0, module_0) {
|
|
1343
1344
|
var tmp = sanitizeNames(convert_0(enum_0), _get_sanitizationConfig__sns434(this));
|
|
1344
1345
|
return injectEnumLabelField(tmp, KotlinIrEmitter$emit$lambda(this));
|
|
1345
1346
|
};
|
|
1346
|
-
protoOf(KotlinIrEmitter).
|
|
1347
|
+
protoOf(KotlinIrEmitter).pr = function (union) {
|
|
1347
1348
|
return sanitizeNames(convert_1(union), _get_sanitizationConfig__sns434(this));
|
|
1348
1349
|
};
|
|
1349
|
-
protoOf(KotlinIrEmitter).
|
|
1350
|
+
protoOf(KotlinIrEmitter).ur = function (refined) {
|
|
1350
1351
|
var file = sanitizeNames(convert_2(refined), _get_sanitizationConfig__sns434(this));
|
|
1351
1352
|
// Inline function 'community.flock.wirespec.ir.core.findElement' call
|
|
1352
1353
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1353
|
-
var tmp0 = file.
|
|
1354
|
+
var tmp0 = file.x1n();
|
|
1354
1355
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1355
1356
|
var destination = ArrayList_init_$Create$_0();
|
|
1356
1357
|
var _iterator__ex2g4s = tmp0.t();
|
|
1357
1358
|
while (_iterator__ex2g4s.u()) {
|
|
1358
1359
|
var element = _iterator__ex2g4s.v();
|
|
1359
1360
|
if (element instanceof Struct) {
|
|
1360
|
-
destination.
|
|
1361
|
+
destination.x(element);
|
|
1361
1362
|
}
|
|
1362
1363
|
}
|
|
1363
1364
|
var tmp0_safe_receiver = firstOrNull_0(destination);
|
|
1364
1365
|
var updatedStruct = tmp0_safe_receiver == null ? null : markMembersAsOverride(tmp0_safe_receiver);
|
|
1365
|
-
return new File(Companion_getInstance().
|
|
1366
|
+
return new File(Companion_getInstance().n1h(sanitize_0(this, refined.sr_1)), listOfNotNull_0(updatedStruct));
|
|
1366
1367
|
};
|
|
1367
|
-
protoOf(KotlinIrEmitter).
|
|
1368
|
-
var imports = buildModelImports(endpoint, this.
|
|
1368
|
+
protoOf(KotlinIrEmitter).as = function (endpoint) {
|
|
1369
|
+
var imports = buildModelImports(endpoint, this.u1w());
|
|
1369
1370
|
// Inline function 'community.flock.wirespec.ir.core.findElement' call
|
|
1370
1371
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
1371
|
-
var tmp0 = convert_3(endpoint).
|
|
1372
|
+
var tmp0 = convert_3(endpoint).x1n();
|
|
1372
1373
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1373
1374
|
var destination = ArrayList_init_$Create$_0();
|
|
1374
1375
|
var _iterator__ex2g4s = tmp0.t();
|
|
1375
1376
|
while (_iterator__ex2g4s.u()) {
|
|
1376
1377
|
var element = _iterator__ex2g4s.v();
|
|
1377
1378
|
if (element instanceof Namespace) {
|
|
1378
|
-
destination.
|
|
1379
|
+
destination.x(element);
|
|
1379
1380
|
}
|
|
1380
1381
|
}
|
|
1381
1382
|
var tmp$ret$2 = firstOrNull_0(destination);
|
|
1382
1383
|
var endpointNamespace = ensureNotNull(tmp$ret$2);
|
|
1383
1384
|
var body = injectApiAlias(injectCompanionObject(endpointNamespace, endpoint));
|
|
1384
|
-
var tmp = sanitizeNames(new File(Companion_getInstance().
|
|
1385
|
+
var tmp = sanitizeNames(new File(Companion_getInstance().n1h(sanitize_0(this, endpoint.up_1)), listOf(body)), _get_sanitizationConfig__sns434(this));
|
|
1385
1386
|
// Inline function 'kotlin.takeIf' call
|
|
1386
1387
|
var tmp_0;
|
|
1387
1388
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
@@ -1393,10 +1394,10 @@ protoOf(KotlinIrEmitter).lv = function (endpoint) {
|
|
|
1393
1394
|
var tmp$ret$5 = tmp_0;
|
|
1394
1395
|
return prependImports(tmp, tmp$ret$5);
|
|
1395
1396
|
};
|
|
1396
|
-
protoOf(KotlinIrEmitter).
|
|
1397
|
+
protoOf(KotlinIrEmitter).or = function (channel) {
|
|
1397
1398
|
var tmp = sanitizeNames(convert_4(channel), _get_sanitizationConfig__sns434(this));
|
|
1398
1399
|
// Inline function 'kotlin.takeIf' call
|
|
1399
|
-
var this_0 = buildModelImports(channel, this.
|
|
1400
|
+
var this_0 = buildModelImports(channel, this.u1w());
|
|
1400
1401
|
var tmp_0;
|
|
1401
1402
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1402
1403
|
if (!this_0.r()) {
|
|
@@ -1407,25 +1408,25 @@ protoOf(KotlinIrEmitter).zu = function (channel) {
|
|
|
1407
1408
|
var tmp$ret$2 = tmp_0;
|
|
1408
1409
|
return prependImports(tmp, tmp$ret$2);
|
|
1409
1410
|
};
|
|
1410
|
-
protoOf(KotlinIrEmitter).
|
|
1411
|
-
var imports = buildModelImports(endpoint, this.
|
|
1412
|
-
var endpointImport = import_0(this.
|
|
1411
|
+
protoOf(KotlinIrEmitter).b1w = function (endpoint) {
|
|
1412
|
+
var imports = buildModelImports(endpoint, this.u1w());
|
|
1413
|
+
var endpointImport = import_0(this.u1w().ds_1 + '.endpoint', endpoint.up_1.l1());
|
|
1413
1414
|
var file = sanitizeNames(emitEndpointClient.call(this, endpoint), _get_sanitizationConfig__sns434(this));
|
|
1414
|
-
var subPackageName = plus_0(this.
|
|
1415
|
-
var tmp = Companion_getInstance().
|
|
1415
|
+
var subPackageName = plus_0(this.u1w(), 'client');
|
|
1416
|
+
var tmp = Companion_getInstance().n1h(subPackageName.fs() + file.v1n_1.o1h());
|
|
1416
1417
|
// Inline function 'kotlin.collections.buildList' call
|
|
1417
1418
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
1418
1419
|
// Inline function 'kotlin.apply' call
|
|
1419
1420
|
var this_0 = ArrayList_init_$Create$_0();
|
|
1420
|
-
this_0.
|
|
1421
|
-
this_0.
|
|
1422
|
-
this_0.
|
|
1423
|
-
this_0.
|
|
1424
|
-
this_0.
|
|
1425
|
-
var tmp$ret$3 = this_0.
|
|
1421
|
+
this_0.x(new Package(subPackageName.ds_1));
|
|
1422
|
+
this_0.f1(this.m1y_1);
|
|
1423
|
+
this_0.f1(imports);
|
|
1424
|
+
this_0.x(endpointImport);
|
|
1425
|
+
this_0.f1(file.w1n_1);
|
|
1426
|
+
var tmp$ret$3 = this_0.o5();
|
|
1426
1427
|
return new File(tmp, tmp$ret$3);
|
|
1427
1428
|
};
|
|
1428
|
-
protoOf(KotlinIrEmitter).
|
|
1429
|
+
protoOf(KotlinIrEmitter).y1v = function (endpoints, logger) {
|
|
1429
1430
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1430
1431
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1431
1432
|
var destination = ArrayList_init_$Create$_0();
|
|
@@ -1441,9 +1442,9 @@ protoOf(KotlinIrEmitter).i1z = function (endpoints, logger) {
|
|
|
1441
1442
|
var _iterator__ex2g4s_0 = destination.t();
|
|
1442
1443
|
while (_iterator__ex2g4s_0.u()) {
|
|
1443
1444
|
var e = _iterator__ex2g4s_0.v();
|
|
1444
|
-
var key = e.
|
|
1445
|
-
if (set.
|
|
1446
|
-
list_0.
|
|
1445
|
+
var key = e.bv_1;
|
|
1446
|
+
if (set.x(key)) {
|
|
1447
|
+
list_0.x(e);
|
|
1447
1448
|
}
|
|
1448
1449
|
}
|
|
1449
1450
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -1452,8 +1453,8 @@ protoOf(KotlinIrEmitter).i1z = function (endpoints, logger) {
|
|
|
1452
1453
|
var _iterator__ex2g4s_1 = list_0.t();
|
|
1453
1454
|
while (_iterator__ex2g4s_1.u()) {
|
|
1454
1455
|
var item = _iterator__ex2g4s_1.v();
|
|
1455
|
-
var tmp$ret$5 = import_0(this.
|
|
1456
|
-
destination_0.
|
|
1456
|
+
var tmp$ret$5 = import_0(this.u1w().ds_1 + '.model', item.bv_1);
|
|
1457
|
+
destination_0.x(tmp$ret$5);
|
|
1457
1458
|
}
|
|
1458
1459
|
var imports = destination_0;
|
|
1459
1460
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -1462,8 +1463,8 @@ protoOf(KotlinIrEmitter).i1z = function (endpoints, logger) {
|
|
|
1462
1463
|
var _iterator__ex2g4s_2 = endpoints.t();
|
|
1463
1464
|
while (_iterator__ex2g4s_2.u()) {
|
|
1464
1465
|
var item_0 = _iterator__ex2g4s_2.v();
|
|
1465
|
-
var tmp$ret$8 = import_0(this.
|
|
1466
|
-
destination_1.
|
|
1466
|
+
var tmp$ret$8 = import_0(this.u1w().ds_1 + '.endpoint', item_0.up_1.l1());
|
|
1467
|
+
destination_1.x(tmp$ret$8);
|
|
1467
1468
|
}
|
|
1468
1469
|
var endpointImports = destination_1;
|
|
1469
1470
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -1472,22 +1473,22 @@ protoOf(KotlinIrEmitter).i1z = function (endpoints, logger) {
|
|
|
1472
1473
|
var _iterator__ex2g4s_3 = endpoints.t();
|
|
1473
1474
|
while (_iterator__ex2g4s_3.u()) {
|
|
1474
1475
|
var item_1 = _iterator__ex2g4s_3.v();
|
|
1475
|
-
var tmp$ret$11 = import_0(this.
|
|
1476
|
-
destination_2.
|
|
1476
|
+
var tmp$ret$11 = import_0(this.u1w().ds_1 + '.client', item_1.up_1.l1() + 'Client');
|
|
1477
|
+
destination_2.x(tmp$ret$11);
|
|
1477
1478
|
}
|
|
1478
1479
|
var clientImports = destination_2;
|
|
1479
1480
|
var allImports = plus_2(plus_2(imports, endpointImports), clientImports);
|
|
1480
1481
|
var file = sanitizeNames(emitClient.call(this, endpoints, logger), _get_sanitizationConfig__sns434(this));
|
|
1481
|
-
var tmp = Companion_getInstance().
|
|
1482
|
+
var tmp = Companion_getInstance().n1h(this.u1w().fs() + file.v1n_1.o1h());
|
|
1482
1483
|
// Inline function 'kotlin.collections.buildList' call
|
|
1483
1484
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
1484
1485
|
// Inline function 'kotlin.apply' call
|
|
1485
1486
|
var this_0 = ArrayList_init_$Create$_0();
|
|
1486
|
-
this_0.
|
|
1487
|
-
this_0.
|
|
1488
|
-
this_0.
|
|
1489
|
-
this_0.
|
|
1490
|
-
var tmp$ret$17 = this_0.
|
|
1487
|
+
this_0.x(new Package(this.u1w().ds_1));
|
|
1488
|
+
this_0.f1(this.m1y_1);
|
|
1489
|
+
this_0.f1(allImports);
|
|
1490
|
+
this_0.f1(file.w1n_1);
|
|
1491
|
+
var tmp$ret$17 = this_0.o5();
|
|
1491
1492
|
return new File(tmp, tmp$ret$17);
|
|
1492
1493
|
};
|
|
1493
1494
|
function buildModelImports(_this__u8e3s4, packageName) {
|
|
@@ -1498,9 +1499,9 @@ function buildModelImports(_this__u8e3s4, packageName) {
|
|
|
1498
1499
|
var _iterator__ex2g4s = this_0.t();
|
|
1499
1500
|
while (_iterator__ex2g4s.u()) {
|
|
1500
1501
|
var e = _iterator__ex2g4s.v();
|
|
1501
|
-
var key = e.
|
|
1502
|
-
if (set.
|
|
1503
|
-
list.
|
|
1502
|
+
var key = e.bv_1;
|
|
1503
|
+
if (set.x(key)) {
|
|
1504
|
+
list.x(e);
|
|
1504
1505
|
}
|
|
1505
1506
|
}
|
|
1506
1507
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -1509,8 +1510,8 @@ function buildModelImports(_this__u8e3s4, packageName) {
|
|
|
1509
1510
|
var _iterator__ex2g4s_0 = list.t();
|
|
1510
1511
|
while (_iterator__ex2g4s_0.u()) {
|
|
1511
1512
|
var item = _iterator__ex2g4s_0.v();
|
|
1512
|
-
var tmp$ret$2 = import_0(packageName.
|
|
1513
|
-
destination.
|
|
1513
|
+
var tmp$ret$2 = import_0(packageName.ds_1 + '.model', Companion_getInstance().n1h(item.bv_1).o1h());
|
|
1514
|
+
destination.x(tmp$ret$2);
|
|
1514
1515
|
}
|
|
1515
1516
|
return destination;
|
|
1516
1517
|
}
|
|
@@ -1521,14 +1522,14 @@ function injectApiAlias(_this__u8e3s4) {
|
|
|
1521
1522
|
var tmp = scope;
|
|
1522
1523
|
// Inline function 'community.flock.wirespec.ir.core.injectAfter' call
|
|
1523
1524
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1524
|
-
var this_0 = scope.
|
|
1525
|
+
var this_0 = scope.g1v_1;
|
|
1525
1526
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1526
1527
|
// Inline function 'kotlin.apply' call
|
|
1527
1528
|
var this_1 = new TransformerBuilder();
|
|
1528
|
-
this_1.
|
|
1529
|
-
var tmp$ret$2 = this_1.
|
|
1530
|
-
tmp.
|
|
1531
|
-
var tmp_0 = scope.
|
|
1529
|
+
this_1.x1i(injectApiAlias$lambda);
|
|
1530
|
+
var tmp$ret$2 = this_1.y1i();
|
|
1531
|
+
tmp.g1v_1 = transform(this_0, tmp$ret$2);
|
|
1532
|
+
var tmp_0 = scope.g1v_1;
|
|
1532
1533
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1533
1534
|
}
|
|
1534
1535
|
function injectCompanionObject(_this__u8e3s4, endpoint) {
|
|
@@ -1538,20 +1539,20 @@ function injectCompanionObject(_this__u8e3s4, endpoint) {
|
|
|
1538
1539
|
var tmp = scope;
|
|
1539
1540
|
// Inline function 'community.flock.wirespec.ir.core.injectAfter' call
|
|
1540
1541
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1541
|
-
var this_0 = scope.
|
|
1542
|
+
var this_0 = scope.g1v_1;
|
|
1542
1543
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1543
1544
|
// Inline function 'kotlin.apply' call
|
|
1544
1545
|
var this_1 = new TransformerBuilder();
|
|
1545
|
-
this_1.
|
|
1546
|
-
var tmp$ret$2 = this_1.
|
|
1547
|
-
tmp.
|
|
1548
|
-
var tmp_0 = scope.
|
|
1546
|
+
this_1.x1i(injectCompanionObject$lambda(endpoint));
|
|
1547
|
+
var tmp$ret$2 = this_1.y1i();
|
|
1548
|
+
tmp.g1v_1 = transform(this_0, tmp$ret$2);
|
|
1549
|
+
var tmp_0 = scope.g1v_1;
|
|
1549
1550
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1550
1551
|
}
|
|
1551
1552
|
function buildCompanionObject(endpoint) {
|
|
1552
|
-
var pathTemplate = '/' + joinToString(endpoint.
|
|
1553
|
+
var pathTemplate = '/' + joinToString(endpoint.wp_1, '/', VOID, VOID, VOID, VOID, buildCompanionObject$lambda);
|
|
1553
1554
|
// Inline function 'kotlin.let' call
|
|
1554
|
-
var p0 = trimMargin('\n |companion object: Wirespec.Server<Request, Response<*>>, Wirespec.Client<Request, Response<*>> {\n | override val pathTemplate = "' + pathTemplate + '"\n | override val method = "' + endpoint.
|
|
1555
|
+
var p0 = trimMargin('\n |companion object: Wirespec.Server<Request, Response<*>>, Wirespec.Client<Request, Response<*>> {\n | override val pathTemplate = "' + pathTemplate + '"\n | override val method = "' + endpoint.vp_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 ');
|
|
1555
1556
|
return raw(p0);
|
|
1556
1557
|
}
|
|
1557
1558
|
function injectApiAlias$lambda(element, transformer) {
|
|
@@ -1561,7 +1562,7 @@ function injectApiAlias$lambda(element, transformer) {
|
|
|
1561
1562
|
var tmp_0;
|
|
1562
1563
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1563
1564
|
if (!injected.r()) {
|
|
1564
|
-
tmp_0 = withElements(element, plus_2(element.
|
|
1565
|
+
tmp_0 = withElements(element, plus_2(element.x1n(), injected));
|
|
1565
1566
|
} else {
|
|
1566
1567
|
tmp_0 = element;
|
|
1567
1568
|
}
|
|
@@ -1576,11 +1577,11 @@ function injectCompanionObject$lambda($endpoint) {
|
|
|
1576
1577
|
return function (element, transformer) {
|
|
1577
1578
|
var tmp;
|
|
1578
1579
|
if (element instanceof Interface) {
|
|
1579
|
-
var injected = element.
|
|
1580
|
+
var injected = element.p1o_1.equals(Companion_getInstance().n1h('Handler')) ? listOf(buildCompanionObject($endpoint)) : emptyList();
|
|
1580
1581
|
var tmp_0;
|
|
1581
1582
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1582
1583
|
if (!injected.r()) {
|
|
1583
|
-
tmp_0 = withElements(element, plus_2(element.
|
|
1584
|
+
tmp_0 = withElements(element, plus_2(element.x1n(), injected));
|
|
1584
1585
|
} else {
|
|
1585
1586
|
tmp_0 = element;
|
|
1586
1587
|
}
|
|
@@ -1595,10 +1596,10 @@ function injectCompanionObject$lambda($endpoint) {
|
|
|
1595
1596
|
function buildCompanionObject$lambda(it) {
|
|
1596
1597
|
var tmp;
|
|
1597
1598
|
if (it instanceof Literal) {
|
|
1598
|
-
tmp = it.
|
|
1599
|
+
tmp = it.xq_1;
|
|
1599
1600
|
} else {
|
|
1600
1601
|
if (it instanceof Param) {
|
|
1601
|
-
tmp = '{' + it.
|
|
1602
|
+
tmp = '{' + it.bq_1.l1() + '}';
|
|
1602
1603
|
} else {
|
|
1603
1604
|
noWhenBranchMatchedException();
|
|
1604
1605
|
}
|
|
@@ -1609,8 +1610,8 @@ function KotlinRefinedTypeDefinitionEmitter() {
|
|
|
1609
1610
|
}
|
|
1610
1611
|
function KotlinShared() {
|
|
1611
1612
|
KotlinShared_instance = this;
|
|
1612
|
-
this.
|
|
1613
|
-
this.
|
|
1613
|
+
this.b1y_1 = 'community.flock.wirespec.kotlin';
|
|
1614
|
+
this.c1y_1 = trimMargin('\n |package ' + this.b1y_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> {\n |' + Spacer_instance.hs(2) + 'val value: T\n |' + Spacer_instance.hs(2) + 'fun validate(): Boolean\n |' + Spacer_instance.toString() + '}\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.hs(2) + 'fun to(request: Req): RawRequest\n |' + Spacer_instance.hs(2) + 'fun from(response: RawResponse): Res\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface Client<Req : Request<*>, Res : Response<*>> {\n |' + Spacer_instance.hs(2) + 'val pathTemplate: String\n |' + Spacer_instance.hs(2) + 'val method: String\n |' + Spacer_instance.hs(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.hs(2) + 'val pathTemplate: String\n |' + Spacer_instance.hs(2) + 'val method: String\n |' + Spacer_instance.hs(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 ');
|
|
1614
1615
|
}
|
|
1615
1616
|
protoOf(KotlinShared).toString = function () {
|
|
1616
1617
|
return 'KotlinShared';
|
|
@@ -1633,12 +1634,12 @@ function KotlinShared_getInstance() {
|
|
|
1633
1634
|
}
|
|
1634
1635
|
function KotlinTypeDefinitionEmitter$emit$lambda(this$0) {
|
|
1635
1636
|
return function (it) {
|
|
1636
|
-
return this$0.
|
|
1637
|
+
return this$0.nq(it);
|
|
1637
1638
|
};
|
|
1638
1639
|
}
|
|
1639
1640
|
function KotlinTypeDefinitionEmitter$emit$lambda_0(this$0) {
|
|
1640
1641
|
return function (it) {
|
|
1641
|
-
return Spacer_instance.toString() + 'val ' + this$0.
|
|
1642
|
+
return Spacer_instance.toString() + 'val ' + this$0.mq(it) + ',';
|
|
1642
1643
|
};
|
|
1643
1644
|
}
|
|
1644
1645
|
function KotlinTypeDefinitionEmitter() {
|
|
@@ -1646,31 +1647,32 @@ function KotlinTypeDefinitionEmitter() {
|
|
|
1646
1647
|
function KotlinUnionDefinitionEmitter() {
|
|
1647
1648
|
}
|
|
1648
1649
|
//region block: post-declaration
|
|
1649
|
-
protoOf(KotlinEmitter).
|
|
1650
|
-
protoOf(KotlinEmitter).
|
|
1651
|
-
protoOf(KotlinEmitter).
|
|
1652
|
-
protoOf(KotlinEmitter).
|
|
1653
|
-
protoOf(KotlinEmitter).
|
|
1654
|
-
protoOf(KotlinEmitter).
|
|
1655
|
-
protoOf(KotlinEmitter).
|
|
1656
|
-
protoOf(KotlinEmitter).
|
|
1657
|
-
protoOf(KotlinEmitter).
|
|
1658
|
-
protoOf(KotlinEmitter).
|
|
1659
|
-
protoOf(KotlinEmitter).
|
|
1660
|
-
protoOf(KotlinEmitter).
|
|
1661
|
-
protoOf(KotlinEmitter).
|
|
1662
|
-
protoOf(KotlinEmitter).
|
|
1663
|
-
protoOf(KotlinEmitter).
|
|
1664
|
-
protoOf(KotlinEmitter).
|
|
1665
|
-
protoOf(KotlinEmitter).
|
|
1666
|
-
protoOf(KotlinEmitter).
|
|
1667
|
-
protoOf(KotlinEmitter).
|
|
1668
|
-
protoOf(KotlinEmitter).
|
|
1669
|
-
protoOf(KotlinEmitter).
|
|
1670
|
-
protoOf(KotlinEmitter).
|
|
1671
|
-
protoOf(KotlinIrEmitter).
|
|
1672
|
-
protoOf(KotlinIrEmitter).
|
|
1673
|
-
protoOf(KotlinIrEmitter).
|
|
1650
|
+
protoOf(KotlinEmitter).kq = emit_4;
|
|
1651
|
+
protoOf(KotlinEmitter).lq = emit_5;
|
|
1652
|
+
protoOf(KotlinEmitter).mq = emit_6;
|
|
1653
|
+
protoOf(KotlinEmitter).nq = emit_7;
|
|
1654
|
+
protoOf(KotlinEmitter).oq = emit_8;
|
|
1655
|
+
protoOf(KotlinEmitter).zr = emit_13;
|
|
1656
|
+
protoOf(KotlinEmitter).ur = emit_15;
|
|
1657
|
+
protoOf(KotlinEmitter).as = emit_10;
|
|
1658
|
+
protoOf(KotlinEmitter).pr = emit_14;
|
|
1659
|
+
protoOf(KotlinEmitter).nr = emit_3;
|
|
1660
|
+
protoOf(KotlinEmitter).or = emit_9;
|
|
1661
|
+
protoOf(KotlinEmitter).h1x = emit_11;
|
|
1662
|
+
protoOf(KotlinEmitter).i1x = emit_12;
|
|
1663
|
+
protoOf(KotlinEmitter).bs = emitValidator;
|
|
1664
|
+
protoOf(KotlinEmitter).u1x = sanitize;
|
|
1665
|
+
protoOf(KotlinEmitter).j1x = sanitizeFirstIsDigit;
|
|
1666
|
+
protoOf(KotlinEmitter).k1x = sanitizeKeywords;
|
|
1667
|
+
protoOf(KotlinEmitter).l1x = emitHandleFunction;
|
|
1668
|
+
protoOf(KotlinEmitter).d1y = emitRequestHeaders;
|
|
1669
|
+
protoOf(KotlinEmitter).e1y = emitQueries;
|
|
1670
|
+
protoOf(KotlinEmitter).f1y = emitBody;
|
|
1671
|
+
protoOf(KotlinEmitter).g1y = emitHeaders;
|
|
1672
|
+
protoOf(KotlinIrEmitter).v1v = get_extensions;
|
|
1673
|
+
protoOf(KotlinIrEmitter).eo = emit_1;
|
|
1674
|
+
protoOf(KotlinIrEmitter).w1v = emit_2;
|
|
1675
|
+
protoOf(KotlinIrEmitter).a1w = beforeGenerate;
|
|
1674
1676
|
//endregion
|
|
1675
1677
|
//region block: exports
|
|
1676
1678
|
export {
|