@flock/wirespec 0.22.6 → 0.22.7
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 +11 -11
- package/arrow-arrow-core.mjs +150 -150
- package/clikt-clikt-mordant.mjs +80 -80
- package/clikt-clikt.mjs +1488 -1488
- package/colormath-root-colormath.mjs +441 -441
- package/kotlin-kotlin-stdlib.mjs +1622 -1600
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +10028 -10028
- package/kotlin-rgxgen.mjs +1802 -1802
- package/kotlinx-io-kotlinx-io-core.mjs +414 -414
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +1816 -1816
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1570 -1570
- package/mordant-mordant.mjs +1278 -1278
- package/package.json +1 -1
- package/wirespec-src-compiler-core.mjs +6104 -5969
- package/wirespec-src-compiler-core.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-java.mjs +177 -177
- package/wirespec-src-compiler-emitters-kotlin.mjs +132 -132
- package/wirespec-src-compiler-emitters-python.mjs +166 -166
- package/wirespec-src-compiler-emitters-rust.mjs +409 -409
- package/wirespec-src-compiler-emitters-rust.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-scala.mjs +165 -165
- package/wirespec-src-compiler-emitters-typescript.mjs +214 -214
- package/wirespec-src-compiler-emitters-wirespec.mjs +175 -195
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +282 -282
- package/wirespec-src-converter-asyncapi.mjs +849 -767
- package/wirespec-src-converter-asyncapi.mjs.map +1 -1
- package/wirespec-src-converter-avro.mjs +596 -595
- package/wirespec-src-converter-avro.mjs.map +1 -1
- package/wirespec-src-converter-common.mjs +18 -18
- package/wirespec-src-converter-graphql.mjs +1063 -1063
- package/wirespec-src-converter-openapi.mjs +773 -661
- package/wirespec-src-converter-openapi.mjs.map +1 -1
- package/wirespec-src-ide-lsp.mjs +1379 -1379
- package/wirespec-src-plugin-arguments.mjs +200 -190
- package/wirespec-src-plugin-arguments.mjs.map +1 -1
- package/wirespec-src-plugin-cli.mjs +112 -112
- package/wirespec-src-plugin-extensions.mjs +1034 -998
- package/wirespec-src-plugin-extensions.mjs.map +1 -1
- package/wirespec-src-plugin-npm.mjs +54 -54
- package/wirespec-src-tools-generator.mjs +32 -32
|
@@ -146,7 +146,7 @@ initMetadataForCompanion(Companion);
|
|
|
146
146
|
initMetadataForClass(ScalaEmitter, 'ScalaEmitter', ScalaEmitter, VOID, [IrEmitter]);
|
|
147
147
|
//endregion
|
|
148
148
|
function _get_sanitizationConfig__sns434($this) {
|
|
149
|
-
var tmp0 = $this.
|
|
149
|
+
var tmp0 = $this.l39_1;
|
|
150
150
|
var tmp = KProperty1;
|
|
151
151
|
// Inline function 'kotlin.getValue' call
|
|
152
152
|
getPropertyCallableRef('sanitizationConfig', 1, tmp, ScalaEmitter$_get_sanitizationConfig_$ref_u7mbyd(), null);
|
|
@@ -163,7 +163,7 @@ function sanitize($this, $receiver) {
|
|
|
163
163
|
var item = _iterator__ex2g4s.v();
|
|
164
164
|
var _unary__edvuaz = index;
|
|
165
165
|
index = _unary__edvuaz + 1 | 0;
|
|
166
|
-
var tmp$ret$2 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.
|
|
166
|
+
var tmp$ret$2 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.zr(item) : item;
|
|
167
167
|
destination.x(tmp$ret$2);
|
|
168
168
|
}
|
|
169
169
|
// Inline function 'kotlin.text.filter' call
|
|
@@ -211,7 +211,7 @@ function sanitizeFirstIsDigit($this, $receiver) {
|
|
|
211
211
|
return tmp;
|
|
212
212
|
}
|
|
213
213
|
function sanitizeKeywords($this, $receiver) {
|
|
214
|
-
return Companion_getInstance_0().
|
|
214
|
+
return Companion_getInstance_0().n37().i1($receiver) ? addBackticks($receiver) : $receiver;
|
|
215
215
|
}
|
|
216
216
|
function sanitizeSymbol($this, $receiver) {
|
|
217
217
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
@@ -224,7 +224,7 @@ function sanitizeSymbol($this, $receiver) {
|
|
|
224
224
|
var item = _iterator__ex2g4s.v();
|
|
225
225
|
var _unary__edvuaz = index;
|
|
226
226
|
index = _unary__edvuaz + 1 | 0;
|
|
227
|
-
var tmp$ret$2 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.
|
|
227
|
+
var tmp$ret$2 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.zr(item) : item;
|
|
228
228
|
destination.x(tmp$ret$2);
|
|
229
229
|
}
|
|
230
230
|
// Inline function 'kotlin.text.filter' call
|
|
@@ -251,10 +251,10 @@ function sanitizeEnum($this, $receiver) {
|
|
|
251
251
|
}
|
|
252
252
|
function Companion() {
|
|
253
253
|
Companion_instance_2 = this;
|
|
254
|
-
this.
|
|
254
|
+
this.m39_1 = ScalaGenerator_getInstance();
|
|
255
255
|
}
|
|
256
|
-
protoOf(Companion).
|
|
257
|
-
return this.
|
|
256
|
+
protoOf(Companion).n37 = function () {
|
|
257
|
+
return this.m39_1.s1c_1;
|
|
258
258
|
};
|
|
259
259
|
var Companion_instance_2;
|
|
260
260
|
function Companion_getInstance_0() {
|
|
@@ -267,13 +267,13 @@ function ScalaEmitter$sanitizationConfig$delegate$lambda$lambda(it) {
|
|
|
267
267
|
}
|
|
268
268
|
function ScalaEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0) {
|
|
269
269
|
return function (name) {
|
|
270
|
-
var sanitized = name.
|
|
270
|
+
var sanitized = name.yt_1.c1() > 1 ? name.cu() : sanitizeSymbol(this$0, name.bu());
|
|
271
271
|
return new Name(listOf(sanitized));
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
274
|
function ScalaEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0) {
|
|
275
275
|
return function (name) {
|
|
276
|
-
return new Name(listOf(sanitizeSymbol(this$0, name.
|
|
276
|
+
return new Name(listOf(sanitizeSymbol(this$0, name.cu())));
|
|
277
277
|
};
|
|
278
278
|
}
|
|
279
279
|
function ScalaEmitter$sanitizationConfig$delegate$lambda$lambda_2(this$0) {
|
|
@@ -285,9 +285,9 @@ function ScalaEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
285
285
|
return function (stmt, tr) {
|
|
286
286
|
var tmp;
|
|
287
287
|
if (stmt instanceof ConstructorStatement) {
|
|
288
|
-
var tmp_0 = tr.
|
|
288
|
+
var tmp_0 = tr.w18(stmt.gu_1);
|
|
289
289
|
// Inline function 'kotlin.collections.map' call
|
|
290
|
-
var this_0 = stmt.
|
|
290
|
+
var this_0 = stmt.hu_1;
|
|
291
291
|
// Inline function 'kotlin.collections.mapTo' call
|
|
292
292
|
var destination = ArrayList_init_$Create$(this_0.c1());
|
|
293
293
|
// Inline function 'kotlin.collections.iterator' call
|
|
@@ -298,7 +298,7 @@ function ScalaEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
298
298
|
var name = item.n1();
|
|
299
299
|
// Inline function 'kotlin.collections.component2' call
|
|
300
300
|
var expr = item.o1();
|
|
301
|
-
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), name), tr.
|
|
301
|
+
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), name), tr.z18(expr));
|
|
302
302
|
destination.x(tmp$ret$3);
|
|
303
303
|
}
|
|
304
304
|
tmp = new ConstructorStatement(tmp_0, toMap(destination));
|
|
@@ -310,7 +310,7 @@ function ScalaEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
310
310
|
}
|
|
311
311
|
function ScalaEmitter$sanitizationConfig$delegate$lambda(this$0) {
|
|
312
312
|
return function () {
|
|
313
|
-
var tmp = Companion_getInstance_0().
|
|
313
|
+
var tmp = Companion_getInstance_0().n37();
|
|
314
314
|
var tmp_0 = ScalaEmitter$sanitizationConfig$delegate$lambda$lambda;
|
|
315
315
|
var tmp_1 = ScalaEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0);
|
|
316
316
|
var tmp_2 = ScalaEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0);
|
|
@@ -324,21 +324,21 @@ function ScalaEmitter$_get_sanitizationConfig_$ref_u7mbyd() {
|
|
|
324
324
|
};
|
|
325
325
|
}
|
|
326
326
|
function ScalaEmitter$emitShared$lambda($this$struct) {
|
|
327
|
-
$this$struct.
|
|
328
|
-
$this$struct.
|
|
327
|
+
$this$struct.x15(Custom_init_$Create$('PathSegment'));
|
|
328
|
+
$this$struct.z15('value', String_instance);
|
|
329
329
|
return Unit_instance;
|
|
330
330
|
}
|
|
331
331
|
function ScalaEmitter$emitShared$lambda_0($this$struct) {
|
|
332
|
-
$this$struct.
|
|
333
|
-
$this$struct.
|
|
334
|
-
$this$struct.
|
|
332
|
+
$this$struct.x15(Custom_init_$Create$('PathSegment'));
|
|
333
|
+
$this$struct.z15('name', String_instance);
|
|
334
|
+
$this$struct.z15('type', Reflect_instance);
|
|
335
335
|
return Unit_instance;
|
|
336
336
|
}
|
|
337
337
|
function ScalaEmitter$emitShared$lambda_1(element, transformer) {
|
|
338
338
|
var tmp;
|
|
339
339
|
if (element instanceof File) {
|
|
340
340
|
// Inline function 'kotlin.collections.partition' call
|
|
341
|
-
var this_0 = element.
|
|
341
|
+
var this_0 = element.gv_1;
|
|
342
342
|
var first = ArrayList_init_$Create$_0();
|
|
343
343
|
var second = ArrayList_init_$Create$_0();
|
|
344
344
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -351,9 +351,9 @@ function ScalaEmitter$emitShared$lambda_1(element, transformer) {
|
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
353
|
var _destruct__k2r9zo = new Pair(first, second);
|
|
354
|
-
var packageElements = _destruct__k2r9zo.
|
|
355
|
-
var rest = _destruct__k2r9zo.
|
|
356
|
-
tmp = element.
|
|
354
|
+
var packageElements = _destruct__k2r9zo.af();
|
|
355
|
+
var rest = _destruct__k2r9zo.bf();
|
|
356
|
+
tmp = element.jv(VOID, plus(packageElements, rest));
|
|
357
357
|
} else {
|
|
358
358
|
tmp = element;
|
|
359
359
|
}
|
|
@@ -365,12 +365,12 @@ function ScalaEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
365
365
|
if (element instanceof Namespace) {
|
|
366
366
|
var tmp$ret$0;
|
|
367
367
|
$l$block: {
|
|
368
|
-
if (!element.
|
|
368
|
+
if (!element.lv_1.equals(Companion_getInstance().au('Wirespec'))) {
|
|
369
369
|
tmp$ret$0 = element;
|
|
370
370
|
break $l$block;
|
|
371
371
|
}
|
|
372
372
|
// Inline function 'kotlin.collections.flatMap' call
|
|
373
|
-
var tmp0 = element.
|
|
373
|
+
var tmp0 = element.mv_1;
|
|
374
374
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
375
375
|
var destination = ArrayList_init_$Create$_0();
|
|
376
376
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -382,14 +382,14 @@ function ScalaEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
382
382
|
if (!(element_0 instanceof Interface)) {
|
|
383
383
|
tmp_0 = true;
|
|
384
384
|
} else {
|
|
385
|
-
tmp_0 = !setOf(['Request', 'Response']).i1(element_0.
|
|
385
|
+
tmp_0 = !setOf(['Request', 'Response']).i1(element_0.rv_1.du());
|
|
386
386
|
}
|
|
387
387
|
if (tmp_0) {
|
|
388
388
|
tmp$ret$3 = listOf(element_0);
|
|
389
389
|
break $l$block_2;
|
|
390
390
|
}
|
|
391
391
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
392
|
-
var tmp0_0 = element_0.
|
|
392
|
+
var tmp0_0 = element_0.sv_1;
|
|
393
393
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
394
394
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
395
395
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
@@ -405,7 +405,7 @@ function ScalaEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
405
405
|
var _iterator__ex2g4s_1 = destination_0.t();
|
|
406
406
|
while (_iterator__ex2g4s_1.u()) {
|
|
407
407
|
var element_2 = _iterator__ex2g4s_1.v();
|
|
408
|
-
if (element_2.
|
|
408
|
+
if (element_2.rv_1.du() === 'Headers') {
|
|
409
409
|
tmp$ret$6 = element_2;
|
|
410
410
|
break $l$block_1;
|
|
411
411
|
}
|
|
@@ -421,9 +421,9 @@ function ScalaEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
421
421
|
tmp_1 = tmp0_elvis_lhs;
|
|
422
422
|
}
|
|
423
423
|
var nestedHeaders = tmp_1;
|
|
424
|
-
var tmp_2 = new Namespace(element_0.
|
|
424
|
+
var tmp_2 = new Namespace(element_0.rv_1, listOf(nestedHeaders));
|
|
425
425
|
// Inline function 'kotlin.collections.filter' call
|
|
426
|
-
var tmp0_1 = element_0.
|
|
426
|
+
var tmp0_1 = element_0.sv_1;
|
|
427
427
|
// Inline function 'kotlin.collections.filterTo' call
|
|
428
428
|
var destination_1 = ArrayList_init_$Create$_0();
|
|
429
429
|
var _iterator__ex2g4s_2 = tmp0_1.t();
|
|
@@ -431,7 +431,7 @@ function ScalaEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
431
431
|
var element_3 = _iterator__ex2g4s_2.v();
|
|
432
432
|
var tmp_3;
|
|
433
433
|
if (element_3 instanceof Interface) {
|
|
434
|
-
tmp_3 = element_3.
|
|
434
|
+
tmp_3 = element_3.rv_1.du() === 'Headers';
|
|
435
435
|
} else {
|
|
436
436
|
tmp_3 = false;
|
|
437
437
|
}
|
|
@@ -441,28 +441,28 @@ function ScalaEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
441
441
|
}
|
|
442
442
|
var tmp_4 = destination_1;
|
|
443
443
|
// Inline function 'kotlin.collections.map' call
|
|
444
|
-
var this_0 = element_0.
|
|
444
|
+
var this_0 = element_0.wv_1;
|
|
445
445
|
// Inline function 'kotlin.collections.mapTo' call
|
|
446
446
|
var destination_2 = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
447
447
|
var _iterator__ex2g4s_3 = this_0.t();
|
|
448
448
|
while (_iterator__ex2g4s_3.u()) {
|
|
449
449
|
var item = _iterator__ex2g4s_3.v();
|
|
450
450
|
var tmp_5;
|
|
451
|
-
if (item.
|
|
452
|
-
tmp_5 = item.
|
|
451
|
+
if (item.aw_1.bu() === 'headers') {
|
|
452
|
+
tmp_5 = item.kw(VOID, Custom_init_$Create$(element_0.rv_1.du() + '.Headers'));
|
|
453
453
|
} else {
|
|
454
454
|
tmp_5 = item;
|
|
455
455
|
}
|
|
456
456
|
var tmp$ret$13 = tmp_5;
|
|
457
457
|
destination_2.x(tmp$ret$13);
|
|
458
458
|
}
|
|
459
|
-
tmp$ret$3 = listOf_0([tmp_2, element_0.
|
|
459
|
+
tmp$ret$3 = listOf_0([tmp_2, element_0.zv(VOID, tmp_4, VOID, VOID, VOID, destination_2)]);
|
|
460
460
|
}
|
|
461
461
|
var list = tmp$ret$3;
|
|
462
462
|
addAll(destination, list);
|
|
463
463
|
}
|
|
464
464
|
var newElements = destination;
|
|
465
|
-
tmp$ret$0 = element.
|
|
465
|
+
tmp$ret$0 = element.qv(VOID, newElements);
|
|
466
466
|
}
|
|
467
467
|
tmp = tmp$ret$0;
|
|
468
468
|
} else {
|
|
@@ -475,27 +475,27 @@ function ScalaEmitter$emitShared$lambda_3($clientServer) {
|
|
|
475
475
|
return function (element, transformer) {
|
|
476
476
|
var tmp;
|
|
477
477
|
if (element instanceof Namespace) {
|
|
478
|
-
var injected = element.
|
|
478
|
+
var injected = element.lv_1.equals(Companion_getInstance().au('Wirespec')) ? $clientServer : emptyList();
|
|
479
479
|
var tmp_0;
|
|
480
480
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
481
481
|
if (!injected.r()) {
|
|
482
482
|
// Inline function 'community.flock.wirespec.compiler.core.ir.withElements' call
|
|
483
|
-
var elements = plus(element.
|
|
483
|
+
var elements = plus(element.hv(), injected);
|
|
484
484
|
var tmp_1;
|
|
485
485
|
if (element instanceof File) {
|
|
486
|
-
tmp_1 = element.
|
|
486
|
+
tmp_1 = element.jv(VOID, elements);
|
|
487
487
|
} else {
|
|
488
488
|
if (element instanceof Struct) {
|
|
489
|
-
tmp_1 = element.
|
|
489
|
+
tmp_1 = element.qx(VOID, VOID, VOID, VOID, elements);
|
|
490
490
|
} else {
|
|
491
491
|
if (element instanceof Namespace) {
|
|
492
|
-
tmp_1 = element.
|
|
492
|
+
tmp_1 = element.qv(VOID, elements);
|
|
493
493
|
} else {
|
|
494
494
|
if (element instanceof Interface) {
|
|
495
|
-
tmp_1 = element.
|
|
495
|
+
tmp_1 = element.zv(VOID, elements);
|
|
496
496
|
} else {
|
|
497
497
|
if (element instanceof Enum) {
|
|
498
|
-
tmp_1 = element.
|
|
498
|
+
tmp_1 = element.ex(VOID, VOID, VOID, VOID, VOID, elements);
|
|
499
499
|
} else {
|
|
500
500
|
if (element instanceof Main) {
|
|
501
501
|
tmp_1 = element;
|
|
@@ -539,28 +539,28 @@ function ScalaEmitter$emit$lambda(this$0) {
|
|
|
539
539
|
function ScalaEmitter(packageName, emitShared) {
|
|
540
540
|
Companion_getInstance_0();
|
|
541
541
|
packageName = packageName === VOID ? Companion_instance_0.at('community.flock.wirespec.generated') : packageName;
|
|
542
|
-
emitShared = emitShared === VOID ? Companion_instance_1.
|
|
543
|
-
this.
|
|
544
|
-
this.
|
|
545
|
-
this.
|
|
546
|
-
this.
|
|
547
|
-
this.
|
|
542
|
+
emitShared = emitShared === VOID ? Companion_instance_1.gq() : emitShared;
|
|
543
|
+
this.g39_1 = packageName;
|
|
544
|
+
this.h39_1 = emitShared;
|
|
545
|
+
this.i39_1 = ScalaGenerator_getInstance();
|
|
546
|
+
this.j39_1 = FileExtension_Scala_getInstance();
|
|
547
|
+
this.k39_1 = listOf_0([import_0('community.flock.wirespec.scala', 'Wirespec'), import_0('scala.reflect', 'ClassTag')]);
|
|
548
548
|
var tmp = this;
|
|
549
|
-
tmp.
|
|
549
|
+
tmp.l39_1 = lazy(ScalaEmitter$sanitizationConfig$delegate$lambda(this));
|
|
550
550
|
}
|
|
551
|
-
protoOf(ScalaEmitter).
|
|
552
|
-
return this.
|
|
551
|
+
protoOf(ScalaEmitter).u37 = function () {
|
|
552
|
+
return this.g39_1;
|
|
553
553
|
};
|
|
554
|
-
protoOf(ScalaEmitter).
|
|
555
|
-
return this.
|
|
554
|
+
protoOf(ScalaEmitter).l1b = function () {
|
|
555
|
+
return this.i39_1;
|
|
556
556
|
};
|
|
557
|
-
protoOf(ScalaEmitter).
|
|
558
|
-
return this.
|
|
557
|
+
protoOf(ScalaEmitter).xp = function () {
|
|
558
|
+
return this.j39_1;
|
|
559
559
|
};
|
|
560
|
-
protoOf(ScalaEmitter).
|
|
561
|
-
ScalaGenerator_getInstance().
|
|
560
|
+
protoOf(ScalaEmitter).k1b = function (allFiles) {
|
|
561
|
+
ScalaGenerator_getInstance().w1c(allFiles);
|
|
562
562
|
};
|
|
563
|
-
protoOf(ScalaEmitter).
|
|
563
|
+
protoOf(ScalaEmitter).g1b = function () {
|
|
564
564
|
var packageName = Companion_instance_0.at('community.flock.wirespec.scala');
|
|
565
565
|
var tmp = interface_0('PathSegment', true);
|
|
566
566
|
var tmp_0 = struct('Literal', ScalaEmitter$emitShared$lambda);
|
|
@@ -575,12 +575,12 @@ protoOf(ScalaEmitter).c1b = function () {
|
|
|
575
575
|
var tmp_1;
|
|
576
576
|
var tmp_2;
|
|
577
577
|
if (item instanceof Interface) {
|
|
578
|
-
tmp_2 = setOf(['Client', 'Server']).i1(item.
|
|
578
|
+
tmp_2 = setOf(['Client', 'Server']).i1(item.rv_1.du());
|
|
579
579
|
} else {
|
|
580
580
|
tmp_2 = false;
|
|
581
581
|
}
|
|
582
582
|
if (tmp_2) {
|
|
583
|
-
tmp_1 = item.
|
|
583
|
+
tmp_1 = item.zv(VOID, VOID, VOID, VOID, VOID, plus_0(item.wv_1, new Field(Companion_getInstance().au('pathSegments'), new Array_0(Custom_init_$Create$('PathSegment')))));
|
|
584
584
|
} else {
|
|
585
585
|
tmp_1 = item;
|
|
586
586
|
}
|
|
@@ -594,58 +594,58 @@ protoOf(ScalaEmitter).c1b = function () {
|
|
|
594
594
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
595
595
|
var tmp_3 = scope;
|
|
596
596
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
597
|
-
var this_2 = scope.
|
|
597
|
+
var this_2 = scope.e19_1;
|
|
598
598
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
599
599
|
// Inline function 'kotlin.apply' call
|
|
600
600
|
var this_3 = new TransformerBuilder();
|
|
601
|
-
this_3.
|
|
602
|
-
var tmp$ret$7 = this_3.
|
|
603
|
-
tmp_3.
|
|
601
|
+
this_3.y19(ScalaEmitter$emitShared$lambda_1);
|
|
602
|
+
var tmp$ret$7 = this_3.t19();
|
|
603
|
+
tmp_3.e19_1 = transform(this_2, tmp$ret$7);
|
|
604
604
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
605
605
|
var tmp_4 = scope;
|
|
606
606
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
607
|
-
var this_4 = scope.
|
|
607
|
+
var this_4 = scope.e19_1;
|
|
608
608
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
609
609
|
// Inline function 'kotlin.apply' call
|
|
610
610
|
var this_5 = new TransformerBuilder();
|
|
611
|
-
this_5.
|
|
612
|
-
var tmp$ret$12 = this_5.
|
|
613
|
-
tmp_4.
|
|
611
|
+
this_5.y19(ScalaEmitter$emitShared$lambda_2);
|
|
612
|
+
var tmp$ret$12 = this_5.t19();
|
|
613
|
+
tmp_4.e19_1 = transform(this_4, tmp$ret$12);
|
|
614
614
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.injectAfter' call
|
|
615
615
|
var tmp_5 = scope;
|
|
616
616
|
// Inline function 'community.flock.wirespec.compiler.core.ir.injectAfter' call
|
|
617
617
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
618
|
-
var this_6 = scope.
|
|
618
|
+
var this_6 = scope.e19_1;
|
|
619
619
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
620
620
|
// Inline function 'kotlin.apply' call
|
|
621
621
|
var this_7 = new TransformerBuilder();
|
|
622
|
-
this_7.
|
|
623
|
-
var tmp$ret$18 = this_7.
|
|
624
|
-
tmp_5.
|
|
625
|
-
var tmp_6 = scope.
|
|
622
|
+
this_7.y19(ScalaEmitter$emitShared$lambda_3(clientServer));
|
|
623
|
+
var tmp$ret$18 = this_7.t19();
|
|
624
|
+
tmp_5.e19_1 = transform(this_6, tmp$ret$18);
|
|
625
|
+
var tmp_6 = scope.e19_1;
|
|
626
626
|
var wirespecShared = isInterface(tmp_6, Element) ? tmp_6 : THROW_CCE();
|
|
627
627
|
var tmp_7;
|
|
628
|
-
if (this.
|
|
629
|
-
tmp_7 = wirespecShared.
|
|
628
|
+
if (this.h39_1.hq_1) {
|
|
629
|
+
tmp_7 = wirespecShared.jv(Companion_getInstance().au(packageName.dt() + 'Wirespec'));
|
|
630
630
|
} else {
|
|
631
631
|
tmp_7 = null;
|
|
632
632
|
}
|
|
633
633
|
return tmp_7;
|
|
634
634
|
};
|
|
635
|
-
protoOf(ScalaEmitter).
|
|
635
|
+
protoOf(ScalaEmitter).ds = function (definition, module_0, logger) {
|
|
636
636
|
var file = emit.call(this, definition, module_0, logger);
|
|
637
637
|
// Inline function 'kotlin.takeIf' call
|
|
638
|
-
var this_0 = this.
|
|
638
|
+
var this_0 = this.k39_1;
|
|
639
639
|
var tmp;
|
|
640
|
-
if (Companion_instance.
|
|
640
|
+
if (Companion_instance.as(module_0)) {
|
|
641
641
|
tmp = this_0;
|
|
642
642
|
} else {
|
|
643
643
|
tmp = null;
|
|
644
644
|
}
|
|
645
645
|
var tmp$ret$0 = tmp;
|
|
646
|
-
return placeInPackage(prependImports(file, tmp$ret$0), this.
|
|
646
|
+
return placeInPackage(prependImports(file, tmp$ret$0), this.u37(), definition);
|
|
647
647
|
};
|
|
648
|
-
protoOf(ScalaEmitter).
|
|
648
|
+
protoOf(ScalaEmitter).o1b = function (definition, module_0) {
|
|
649
649
|
var tmp;
|
|
650
650
|
if (definition instanceof Type) {
|
|
651
651
|
tmp = convertToGenerator_2(definition, module_0);
|
|
@@ -666,7 +666,7 @@ protoOf(ScalaEmitter).k1b = function (definition, module_0) {
|
|
|
666
666
|
}
|
|
667
667
|
var generatorFile = tmp;
|
|
668
668
|
var sanitized = sanitizeNames(generatorFile, _get_sanitizationConfig__sns434(this));
|
|
669
|
-
var generatorOwnName = definition.
|
|
669
|
+
var generatorOwnName = definition.es().o1() + 'Generator';
|
|
670
670
|
var tmp_0 = asSequence(collectCustomTypeNames(sanitized));
|
|
671
671
|
var tmp_1 = filterNot(tmp_0, ScalaEmitter$emitGenerator$lambda);
|
|
672
672
|
var tmp_2 = filterNot(tmp_1, ScalaEmitter$emitGenerator$lambda_0(generatorOwnName));
|
|
@@ -687,27 +687,27 @@ protoOf(ScalaEmitter).k1b = function (definition, module_0) {
|
|
|
687
687
|
var _iterator__ex2g4s_0 = destination.t();
|
|
688
688
|
while (_iterator__ex2g4s_0.u()) {
|
|
689
689
|
var item = _iterator__ex2g4s_0.v();
|
|
690
|
-
var tmp$ret$5 = import_0(this.
|
|
690
|
+
var tmp$ret$5 = import_0(this.u37().bt_1 + '.model', item);
|
|
691
691
|
destination_0.x(tmp$ret$5);
|
|
692
692
|
}
|
|
693
693
|
var modelImports = destination_0;
|
|
694
|
-
return placeInPackage_0(prependImports(sanitized, plus(this.
|
|
694
|
+
return placeInPackage_0(prependImports(sanitized, plus(this.k39_1, modelImports)), this.u37(), 'generator');
|
|
695
695
|
};
|
|
696
|
-
protoOf(ScalaEmitter).
|
|
696
|
+
protoOf(ScalaEmitter).vs = function (type, module_0) {
|
|
697
697
|
return ensureEmptyStructHasConstructor(sanitizeNames(convert_0(type), _get_sanitizationConfig__sns434(this)));
|
|
698
698
|
};
|
|
699
|
-
protoOf(ScalaEmitter).
|
|
699
|
+
protoOf(ScalaEmitter).ts = function (enum_0, module_0) {
|
|
700
700
|
var tmp = sanitizeNames(convert_1(enum_0), _get_sanitizationConfig__sns434(this));
|
|
701
701
|
return injectEnumLabelField(tmp, ScalaEmitter$emit$lambda(this));
|
|
702
702
|
};
|
|
703
|
-
protoOf(ScalaEmitter).
|
|
703
|
+
protoOf(ScalaEmitter).js = function (union) {
|
|
704
704
|
return sanitizeNames(convert_2(union), _get_sanitizationConfig__sns434(this));
|
|
705
705
|
};
|
|
706
|
-
protoOf(ScalaEmitter).
|
|
706
|
+
protoOf(ScalaEmitter).os = function (refined) {
|
|
707
707
|
var file = sanitizeNames(convert_3(refined), _get_sanitizationConfig__sns434(this));
|
|
708
708
|
// Inline function 'community.flock.wirespec.compiler.core.ir.findElement' call
|
|
709
709
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
710
|
-
var tmp0 = file.
|
|
710
|
+
var tmp0 = file.hv();
|
|
711
711
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
712
712
|
var destination = ArrayList_init_$Create$_0();
|
|
713
713
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -719,12 +719,12 @@ protoOf(ScalaEmitter).ns = function (refined) {
|
|
|
719
719
|
}
|
|
720
720
|
var tmp$ret$0 = firstOrNull_0(destination);
|
|
721
721
|
var updatedStruct = convertToStringCallsToFieldAccess(markMembersAsOverride(ensureNotNull(tmp$ret$0)));
|
|
722
|
-
return new File(Companion_getInstance().
|
|
722
|
+
return new File(Companion_getInstance().au(sanitize(this, refined.ms_1)), listOf(updatedStruct));
|
|
723
723
|
};
|
|
724
|
-
protoOf(ScalaEmitter).
|
|
724
|
+
protoOf(ScalaEmitter).us = function (endpoint) {
|
|
725
725
|
// Inline function 'community.flock.wirespec.compiler.core.ir.findElement' call
|
|
726
726
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
727
|
-
var tmp0 = convert_4(endpoint).
|
|
727
|
+
var tmp0 = convert_4(endpoint).hv();
|
|
728
728
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
729
729
|
var destination = ArrayList_init_$Create$_0();
|
|
730
730
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -737,9 +737,9 @@ protoOf(ScalaEmitter).ts = function (endpoint) {
|
|
|
737
737
|
var tmp$ret$0 = firstOrNull_0(destination);
|
|
738
738
|
var endpointNamespace = ensureNotNull(tmp$ret$0);
|
|
739
739
|
var body = appendClientServerObjects(injectHandleFunction(endpointNamespace), endpoint, isRequestObject(endpointNamespace));
|
|
740
|
-
var tmp = sanitizeNames(new File(Companion_getInstance().
|
|
740
|
+
var tmp = sanitizeNames(new File(Companion_getInstance().au(sanitize(this, endpoint.gr_1)), listOf(body)), _get_sanitizationConfig__sns434(this));
|
|
741
741
|
// Inline function 'kotlin.takeIf' call
|
|
742
|
-
var this_0 = buildModelImports(endpoint, this.
|
|
742
|
+
var this_0 = buildModelImports(endpoint, this.u37());
|
|
743
743
|
var tmp_0;
|
|
744
744
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
745
745
|
if (!this_0.r()) {
|
|
@@ -750,10 +750,10 @@ protoOf(ScalaEmitter).ts = function (endpoint) {
|
|
|
750
750
|
var tmp$ret$3 = tmp_0;
|
|
751
751
|
return prependImports(tmp, tmp$ret$3);
|
|
752
752
|
};
|
|
753
|
-
protoOf(ScalaEmitter).
|
|
753
|
+
protoOf(ScalaEmitter).is = function (channel) {
|
|
754
754
|
var tmp = sanitizeNames(convert_5(channel), _get_sanitizationConfig__sns434(this));
|
|
755
755
|
// Inline function 'kotlin.takeIf' call
|
|
756
|
-
var this_0 = buildModelImports(channel, this.
|
|
756
|
+
var this_0 = buildModelImports(channel, this.u37());
|
|
757
757
|
var tmp_0;
|
|
758
758
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
759
759
|
if (!this_0.r()) {
|
|
@@ -764,10 +764,10 @@ protoOf(ScalaEmitter).hs = function (channel) {
|
|
|
764
764
|
var tmp$ret$0 = tmp_0;
|
|
765
765
|
return prependImports(tmp, tmp$ret$0);
|
|
766
766
|
};
|
|
767
|
-
protoOf(ScalaEmitter).
|
|
767
|
+
protoOf(ScalaEmitter).hs = function (rpc) {
|
|
768
768
|
var tmp = sanitizeNames(convert_6(rpc), _get_sanitizationConfig__sns434(this));
|
|
769
769
|
// Inline function 'kotlin.takeIf' call
|
|
770
|
-
var this_0 = buildModelImports(rpc, this.
|
|
770
|
+
var this_0 = buildModelImports(rpc, this.u37());
|
|
771
771
|
var tmp_0;
|
|
772
772
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
773
773
|
if (!this_0.r()) {
|
|
@@ -778,25 +778,25 @@ protoOf(ScalaEmitter).gs = function (rpc) {
|
|
|
778
778
|
var tmp$ret$0 = tmp_0;
|
|
779
779
|
return prependImports(tmp, tmp$ret$0);
|
|
780
780
|
};
|
|
781
|
-
protoOf(ScalaEmitter).
|
|
782
|
-
var imports = buildModelImports(endpoint, this.
|
|
783
|
-
var endpointImport = import_0(this.
|
|
781
|
+
protoOf(ScalaEmitter).n1b = function (endpoint) {
|
|
782
|
+
var imports = buildModelImports(endpoint, this.u37());
|
|
783
|
+
var endpointImport = import_0(this.u37().bt_1 + '.endpoint', endpoint.gr_1.o1());
|
|
784
784
|
var file = addIdentityTypeToCall(sanitizeNames(emitEndpointClient.call(this, endpoint), _get_sanitizationConfig__sns434(this)));
|
|
785
|
-
var subPackageName = plus_1(this.
|
|
786
|
-
var tmp = Companion_getInstance().
|
|
785
|
+
var subPackageName = plus_1(this.u37(), 'client');
|
|
786
|
+
var tmp = Companion_getInstance().au(subPackageName.dt() + file.fv_1.du());
|
|
787
787
|
// Inline function 'kotlin.collections.buildList' call
|
|
788
788
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
789
789
|
// Inline function 'kotlin.apply' call
|
|
790
790
|
var this_0 = ArrayList_init_$Create$_0();
|
|
791
791
|
this_0.x(new Package(subPackageName.bt_1));
|
|
792
|
-
this_0.g1(this.
|
|
792
|
+
this_0.g1(this.k39_1);
|
|
793
793
|
this_0.g1(imports);
|
|
794
794
|
this_0.x(endpointImport);
|
|
795
|
-
this_0.g1(file.
|
|
796
|
-
var tmp$ret$0 = this_0.
|
|
795
|
+
this_0.g1(file.gv_1);
|
|
796
|
+
var tmp$ret$0 = this_0.r5();
|
|
797
797
|
return new File(tmp, tmp$ret$0);
|
|
798
798
|
};
|
|
799
|
-
protoOf(ScalaEmitter).
|
|
799
|
+
protoOf(ScalaEmitter).h1b = function (endpoints, logger) {
|
|
800
800
|
// Inline function 'kotlin.collections.flatMap' call
|
|
801
801
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
802
802
|
var destination = ArrayList_init_$Create$_0();
|
|
@@ -812,7 +812,7 @@ protoOf(ScalaEmitter).d1b = function (endpoints, logger) {
|
|
|
812
812
|
var _iterator__ex2g4s_0 = destination.t();
|
|
813
813
|
while (_iterator__ex2g4s_0.u()) {
|
|
814
814
|
var e = _iterator__ex2g4s_0.v();
|
|
815
|
-
var key = e.
|
|
815
|
+
var key = e.b1a_1;
|
|
816
816
|
if (set.x(key)) {
|
|
817
817
|
list_0.x(e);
|
|
818
818
|
}
|
|
@@ -823,7 +823,7 @@ protoOf(ScalaEmitter).d1b = function (endpoints, logger) {
|
|
|
823
823
|
var _iterator__ex2g4s_1 = list_0.t();
|
|
824
824
|
while (_iterator__ex2g4s_1.u()) {
|
|
825
825
|
var item = _iterator__ex2g4s_1.v();
|
|
826
|
-
var tmp$ret$7 = import_0(this.
|
|
826
|
+
var tmp$ret$7 = import_0(this.u37().bt_1 + '.model', item.b1a_1);
|
|
827
827
|
destination_0.x(tmp$ret$7);
|
|
828
828
|
}
|
|
829
829
|
var imports = destination_0;
|
|
@@ -833,7 +833,7 @@ protoOf(ScalaEmitter).d1b = function (endpoints, logger) {
|
|
|
833
833
|
var _iterator__ex2g4s_2 = endpoints.t();
|
|
834
834
|
while (_iterator__ex2g4s_2.u()) {
|
|
835
835
|
var item_0 = _iterator__ex2g4s_2.v();
|
|
836
|
-
var tmp$ret$10 = import_0(this.
|
|
836
|
+
var tmp$ret$10 = import_0(this.u37().bt_1 + '.endpoint', item_0.gr_1.o1());
|
|
837
837
|
destination_1.x(tmp$ret$10);
|
|
838
838
|
}
|
|
839
839
|
var endpointImports = destination_1;
|
|
@@ -843,38 +843,38 @@ protoOf(ScalaEmitter).d1b = function (endpoints, logger) {
|
|
|
843
843
|
var _iterator__ex2g4s_3 = endpoints.t();
|
|
844
844
|
while (_iterator__ex2g4s_3.u()) {
|
|
845
845
|
var item_1 = _iterator__ex2g4s_3.v();
|
|
846
|
-
var tmp$ret$13 = import_0(this.
|
|
846
|
+
var tmp$ret$13 = import_0(this.u37().bt_1 + '.client', item_1.gr_1.o1() + 'Client');
|
|
847
847
|
destination_2.x(tmp$ret$13);
|
|
848
848
|
}
|
|
849
849
|
var clientImports = destination_2;
|
|
850
850
|
var allImports = plus(plus(imports, endpointImports), clientImports);
|
|
851
851
|
var file = addIdentityTypeToCall(sanitizeNames(emitClient.call(this, endpoints, logger), _get_sanitizationConfig__sns434(this)));
|
|
852
|
-
var tmp = Companion_getInstance().
|
|
852
|
+
var tmp = Companion_getInstance().au(this.u37().dt() + file.fv_1.du());
|
|
853
853
|
// Inline function 'kotlin.collections.buildList' call
|
|
854
854
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
855
855
|
// Inline function 'kotlin.apply' call
|
|
856
856
|
var this_0 = ArrayList_init_$Create$_0();
|
|
857
|
-
this_0.x(new Package(this.
|
|
858
|
-
this_0.g1(this.
|
|
857
|
+
this_0.x(new Package(this.u37().bt_1));
|
|
858
|
+
this_0.g1(this.k39_1);
|
|
859
859
|
this_0.g1(allImports);
|
|
860
|
-
this_0.g1(file.
|
|
861
|
-
var tmp$ret$14 = this_0.
|
|
860
|
+
this_0.g1(file.gv_1);
|
|
861
|
+
var tmp$ret$14 = this_0.r5();
|
|
862
862
|
return new File(tmp, tmp$ret$14);
|
|
863
863
|
};
|
|
864
864
|
function convertToStringCallsToFieldAccess(_this__u8e3s4) {
|
|
865
865
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
866
866
|
var scope = new TransformScope(_this__u8e3s4);
|
|
867
|
-
scope.
|
|
868
|
-
var tmp = scope.
|
|
867
|
+
scope.v19(convertToStringCallsToFieldAccess$lambda);
|
|
868
|
+
var tmp = scope.e19_1;
|
|
869
869
|
return isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
870
870
|
}
|
|
871
871
|
function appendClientServerObjects(_this__u8e3s4, endpoint, requestIsObject) {
|
|
872
872
|
var reqType = requestIsObject ? 'Request.type' : 'Request';
|
|
873
|
-
var pathTemplate = '/' + joinToString(endpoint.
|
|
874
|
-
var pathSegmentsCode = joinToString(endpoint.
|
|
875
|
-
var clientObject = raw(trimMargin('\n |object Client extends Wirespec.Client[' + reqType + ', Response[?]] {\n | override val pathTemplate: String = "' + pathTemplate + '"\n | override val method: String = "' + endpoint.
|
|
876
|
-
var serverObject = raw(trimMargin('\n |object Server extends Wirespec.Server[' + reqType + ', Response[?]] {\n | override val pathTemplate: String = "' + pathTemplate + '"\n | override val method: String = "' + endpoint.
|
|
877
|
-
return _this__u8e3s4.
|
|
873
|
+
var pathTemplate = '/' + joinToString(endpoint.ir_1, '/', VOID, VOID, VOID, VOID, appendClientServerObjects$lambda);
|
|
874
|
+
var pathSegmentsCode = joinToString(endpoint.ir_1, ', ', VOID, VOID, VOID, VOID, appendClientServerObjects$lambda_0);
|
|
875
|
+
var clientObject = raw(trimMargin('\n |object Client extends Wirespec.Client[' + reqType + ', Response[?]] {\n | override val pathTemplate: String = "' + pathTemplate + '"\n | override val method: String = "' + endpoint.hr_1.toString() + '"\n | override val pathSegments: List[Wirespec.PathSegment] = List(' + pathSegmentsCode + ')\n | override def client(serialization: Wirespec.Serialization): Wirespec.ClientEdge[' + reqType + ', Response[?]] = new Wirespec.ClientEdge[' + reqType + ', Response[?]] {\n | override def to(request: ' + reqType + '): Wirespec.RawRequest = toRawRequest(serialization, request)\n | override def from(response: Wirespec.RawResponse): Response[?] = fromRawResponse(serialization, response)\n | }\n |}\n '));
|
|
876
|
+
var serverObject = raw(trimMargin('\n |object Server extends Wirespec.Server[' + reqType + ', Response[?]] {\n | override val pathTemplate: String = "' + pathTemplate + '"\n | override val method: String = "' + endpoint.hr_1.toString() + '"\n | override val pathSegments: List[Wirespec.PathSegment] = List(' + pathSegmentsCode + ')\n | override def server(serialization: Wirespec.Serialization): Wirespec.ServerEdge[' + reqType + ', Response[?]] = new Wirespec.ServerEdge[' + reqType + ', Response[?]] {\n | override def from(request: Wirespec.RawRequest): ' + reqType + ' = fromRawRequest(serialization, request)\n | override def to(response: Response[?]): Wirespec.RawResponse = toRawResponse(serialization, response)\n | }\n |}\n '));
|
|
877
|
+
return _this__u8e3s4.qv(VOID, plus_0(plus_0(_this__u8e3s4.mv_1, clientObject), serverObject));
|
|
878
878
|
}
|
|
879
879
|
function injectHandleFunction(_this__u8e3s4) {
|
|
880
880
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
@@ -882,19 +882,19 @@ function injectHandleFunction(_this__u8e3s4) {
|
|
|
882
882
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
883
883
|
var tmp = scope;
|
|
884
884
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
885
|
-
var this_0 = scope.
|
|
885
|
+
var this_0 = scope.e19_1;
|
|
886
886
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
887
887
|
// Inline function 'kotlin.apply' call
|
|
888
888
|
var this_1 = new TransformerBuilder();
|
|
889
|
-
this_1.
|
|
890
|
-
var tmp$ret$4 = this_1.
|
|
891
|
-
tmp.
|
|
892
|
-
var tmp_0 = scope.
|
|
889
|
+
this_1.y19(injectHandleFunction$lambda);
|
|
890
|
+
var tmp$ret$4 = this_1.t19();
|
|
891
|
+
tmp.e19_1 = transform(this_0, tmp$ret$4);
|
|
892
|
+
var tmp_0 = scope.e19_1;
|
|
893
893
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
894
894
|
}
|
|
895
895
|
function isRequestObject(namespace) {
|
|
896
896
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
897
|
-
var tmp0 = namespace.
|
|
897
|
+
var tmp0 = namespace.mv_1;
|
|
898
898
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
899
899
|
var destination = ArrayList_init_$Create$_0();
|
|
900
900
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -910,7 +910,7 @@ function isRequestObject(namespace) {
|
|
|
910
910
|
var _iterator__ex2g4s_0 = destination.t();
|
|
911
911
|
while (_iterator__ex2g4s_0.u()) {
|
|
912
912
|
var element_0 = _iterator__ex2g4s_0.v();
|
|
913
|
-
if (element_0.
|
|
913
|
+
if (element_0.fx_1.du() === 'Request') {
|
|
914
914
|
tmp$ret$2 = element_0;
|
|
915
915
|
break $l$block;
|
|
916
916
|
}
|
|
@@ -925,7 +925,7 @@ function isRequestObject(namespace) {
|
|
|
925
925
|
tmp = tmp0_elvis_lhs;
|
|
926
926
|
}
|
|
927
927
|
var requestStruct = tmp;
|
|
928
|
-
return requestStruct.
|
|
928
|
+
return requestStruct.hx_1.c1() === 1 && single(requestStruct.hx_1).g10_1.r() || (requestStruct.gx_1.r() && requestStruct.hx_1.r());
|
|
929
929
|
}
|
|
930
930
|
function buildModelImports(_this__u8e3s4, packageName) {
|
|
931
931
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
@@ -935,7 +935,7 @@ function buildModelImports(_this__u8e3s4, packageName) {
|
|
|
935
935
|
var _iterator__ex2g4s = this_0.t();
|
|
936
936
|
while (_iterator__ex2g4s.u()) {
|
|
937
937
|
var e = _iterator__ex2g4s.v();
|
|
938
|
-
var key = e.
|
|
938
|
+
var key = e.b1a_1;
|
|
939
939
|
if (set.x(key)) {
|
|
940
940
|
list.x(e);
|
|
941
941
|
}
|
|
@@ -946,7 +946,7 @@ function buildModelImports(_this__u8e3s4, packageName) {
|
|
|
946
946
|
var _iterator__ex2g4s_0 = list.t();
|
|
947
947
|
while (_iterator__ex2g4s_0.u()) {
|
|
948
948
|
var item = _iterator__ex2g4s_0.v();
|
|
949
|
-
var tmp$ret$4 = import_0(packageName.bt_1 + '.model', Companion_getInstance().
|
|
949
|
+
var tmp$ret$4 = import_0(packageName.bt_1 + '.model', Companion_getInstance().au(item.b1a_1).du());
|
|
950
950
|
destination.x(tmp$ret$4);
|
|
951
951
|
}
|
|
952
952
|
return destination;
|
|
@@ -957,29 +957,29 @@ function addIdentityTypeToCall(_this__u8e3s4) {
|
|
|
957
957
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
958
958
|
var tmp = scope;
|
|
959
959
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
960
|
-
var this_0 = scope.
|
|
960
|
+
var this_0 = scope.e19_1;
|
|
961
961
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
962
962
|
// Inline function 'kotlin.apply' call
|
|
963
963
|
var this_1 = new TransformerBuilder();
|
|
964
|
-
this_1.
|
|
965
|
-
var tmp$ret$4 = this_1.
|
|
966
|
-
tmp.
|
|
967
|
-
var tmp_0 = scope.
|
|
964
|
+
this_1.y19(addIdentityTypeToCall$lambda);
|
|
965
|
+
var tmp$ret$4 = this_1.t19();
|
|
966
|
+
tmp.e19_1 = transform(this_0, tmp$ret$4);
|
|
967
|
+
var tmp_0 = scope.e19_1;
|
|
968
968
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
969
969
|
}
|
|
970
970
|
function toScalaTypeName(_this__u8e3s4) {
|
|
971
971
|
var tmp;
|
|
972
972
|
if (_this__u8e3s4 instanceof Primitive) {
|
|
973
|
-
var t = _this__u8e3s4.
|
|
973
|
+
var t = _this__u8e3s4.d1a_1;
|
|
974
974
|
var tmp_0;
|
|
975
975
|
if (t instanceof String_0) {
|
|
976
976
|
tmp_0 = 'String';
|
|
977
977
|
} else {
|
|
978
978
|
if (t instanceof Integer) {
|
|
979
|
-
tmp_0 = t.
|
|
979
|
+
tmp_0 = t.l1a_1.equals(Precision_P32_getInstance()) ? 'Int' : 'Long';
|
|
980
980
|
} else {
|
|
981
981
|
if (t instanceof Number_0) {
|
|
982
|
-
tmp_0 = t.
|
|
982
|
+
tmp_0 = t.g1a_1.equals(Precision_P32_getInstance()) ? 'Float' : 'Double';
|
|
983
983
|
} else {
|
|
984
984
|
if (equals(t, Boolean_instance)) {
|
|
985
985
|
tmp_0 = 'Boolean';
|
|
@@ -996,13 +996,13 @@ function toScalaTypeName(_this__u8e3s4) {
|
|
|
996
996
|
tmp = tmp_0;
|
|
997
997
|
} else {
|
|
998
998
|
if (_this__u8e3s4 instanceof Custom) {
|
|
999
|
-
tmp = _this__u8e3s4.
|
|
999
|
+
tmp = _this__u8e3s4.b1a_1;
|
|
1000
1000
|
} else {
|
|
1001
1001
|
if (_this__u8e3s4 instanceof Iterable) {
|
|
1002
|
-
tmp = 'List[' + toScalaTypeName(_this__u8e3s4.
|
|
1002
|
+
tmp = 'List[' + toScalaTypeName(_this__u8e3s4.zp_1) + ']';
|
|
1003
1003
|
} else {
|
|
1004
1004
|
if (_this__u8e3s4 instanceof Dict) {
|
|
1005
|
-
tmp = 'Map[String, ' + toScalaTypeName(_this__u8e3s4.
|
|
1005
|
+
tmp = 'Map[String, ' + toScalaTypeName(_this__u8e3s4.cq_1) + ']';
|
|
1006
1006
|
} else {
|
|
1007
1007
|
if (_this__u8e3s4 instanceof Any) {
|
|
1008
1008
|
tmp = 'Any';
|
|
@@ -1025,25 +1025,25 @@ function convertToStringCallsToFieldAccess$lambda(expr, tr) {
|
|
|
1025
1025
|
var tmp_0;
|
|
1026
1026
|
var tmp_1;
|
|
1027
1027
|
if (expr instanceof FunctionCall) {
|
|
1028
|
-
tmp_1 = expr.
|
|
1028
|
+
tmp_1 = expr.qy_1.cu() === 'toString';
|
|
1029
1029
|
} else {
|
|
1030
1030
|
tmp_1 = false;
|
|
1031
1031
|
}
|
|
1032
1032
|
if (tmp_1) {
|
|
1033
|
-
tmp_0 = !(expr.
|
|
1033
|
+
tmp_0 = !(expr.oy_1 == null);
|
|
1034
1034
|
} else {
|
|
1035
1035
|
tmp_0 = false;
|
|
1036
1036
|
}
|
|
1037
1037
|
if (tmp_0) {
|
|
1038
|
-
var tmp0_safe_receiver = expr.
|
|
1038
|
+
var tmp0_safe_receiver = expr.oy_1;
|
|
1039
1039
|
var tmp_2;
|
|
1040
1040
|
if (tmp0_safe_receiver == null) {
|
|
1041
1041
|
tmp_2 = null;
|
|
1042
1042
|
} else {
|
|
1043
1043
|
// Inline function 'kotlin.let' call
|
|
1044
|
-
tmp_2 = tr.
|
|
1044
|
+
tmp_2 = tr.z18(tmp0_safe_receiver);
|
|
1045
1045
|
}
|
|
1046
|
-
tmp = new FieldCall(tmp_2, Companion_getInstance().
|
|
1046
|
+
tmp = new FieldCall(tmp_2, Companion_getInstance().au('toString'));
|
|
1047
1047
|
} else {
|
|
1048
1048
|
tmp = transformChildren_1(expr, tr);
|
|
1049
1049
|
}
|
|
@@ -1052,10 +1052,10 @@ function convertToStringCallsToFieldAccess$lambda(expr, tr) {
|
|
|
1052
1052
|
function appendClientServerObjects$lambda(it) {
|
|
1053
1053
|
var tmp;
|
|
1054
1054
|
if (it instanceof Literal) {
|
|
1055
|
-
tmp = it.
|
|
1055
|
+
tmp = it.e1b_1;
|
|
1056
1056
|
} else {
|
|
1057
1057
|
if (it instanceof Param) {
|
|
1058
|
-
tmp = '{' + it.
|
|
1058
|
+
tmp = '{' + it.nr_1.o1() + '}';
|
|
1059
1059
|
} else {
|
|
1060
1060
|
noWhenBranchMatchedException();
|
|
1061
1061
|
}
|
|
@@ -1065,10 +1065,10 @@ function appendClientServerObjects$lambda(it) {
|
|
|
1065
1065
|
function appendClientServerObjects$lambda_0(segment) {
|
|
1066
1066
|
var tmp;
|
|
1067
1067
|
if (segment instanceof Literal) {
|
|
1068
|
-
tmp = 'Wirespec.Literal("' + segment.
|
|
1068
|
+
tmp = 'Wirespec.Literal("' + segment.e1b_1 + '")';
|
|
1069
1069
|
} else {
|
|
1070
1070
|
if (segment instanceof Param) {
|
|
1071
|
-
tmp = 'Wirespec.Param("' + segment.
|
|
1071
|
+
tmp = 'Wirespec.Param("' + segment.nr_1.o1() + '", scala.reflect.classTag[' + toScalaTypeName(segment.or_1) + '])';
|
|
1072
1072
|
} else {
|
|
1073
1073
|
noWhenBranchMatchedException();
|
|
1074
1074
|
}
|
|
@@ -1080,13 +1080,13 @@ function injectHandleFunction$lambda(element, transformer) {
|
|
|
1080
1080
|
if (element instanceof Interface) {
|
|
1081
1081
|
var tmp$ret$0;
|
|
1082
1082
|
$l$block: {
|
|
1083
|
-
if (!element.
|
|
1083
|
+
if (!element.rv_1.equals(Companion_getInstance().au('Handler')) && !element.rv_1.equals(Companion_getInstance().au('Call'))) {
|
|
1084
1084
|
tmp$ret$0 = element;
|
|
1085
1085
|
break $l$block;
|
|
1086
1086
|
}
|
|
1087
1087
|
var tmp0_typeParameters = listOf(new TypeParameter(Custom_init_$Create$('F[_]')));
|
|
1088
1088
|
// Inline function 'kotlin.collections.map' call
|
|
1089
|
-
var this_0 = element.
|
|
1089
|
+
var this_0 = element.sv_1;
|
|
1090
1090
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1091
1091
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1092
1092
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -1097,7 +1097,7 @@ function injectHandleFunction$lambda(element, transformer) {
|
|
|
1097
1097
|
if (tmp0_safe_receiver == null) {
|
|
1098
1098
|
tmp_0 = null;
|
|
1099
1099
|
} else {
|
|
1100
|
-
var tmp1_safe_receiver = item.
|
|
1100
|
+
var tmp1_safe_receiver = item.ux_1;
|
|
1101
1101
|
var tmp_1;
|
|
1102
1102
|
if (tmp1_safe_receiver == null) {
|
|
1103
1103
|
tmp_1 = null;
|
|
@@ -1106,13 +1106,13 @@ function injectHandleFunction$lambda(element, transformer) {
|
|
|
1106
1106
|
tmp_1 = Custom_init_$Create$('F', listOf(tmp1_safe_receiver));
|
|
1107
1107
|
}
|
|
1108
1108
|
var tmp3_returnType = tmp_1;
|
|
1109
|
-
tmp_0 = tmp0_safe_receiver.
|
|
1109
|
+
tmp_0 = tmp0_safe_receiver.dy(VOID, VOID, VOID, tmp3_returnType, VOID, false);
|
|
1110
1110
|
}
|
|
1111
1111
|
var tmp4_elvis_lhs = tmp_0;
|
|
1112
1112
|
var tmp$ret$3 = tmp4_elvis_lhs == null ? item : tmp4_elvis_lhs;
|
|
1113
1113
|
destination.x(tmp$ret$3);
|
|
1114
1114
|
}
|
|
1115
|
-
tmp$ret$0 = element.
|
|
1115
|
+
tmp$ret$0 = element.zv(VOID, destination, VOID, VOID, tmp0_typeParameters);
|
|
1116
1116
|
}
|
|
1117
1117
|
tmp = tmp$ret$0;
|
|
1118
1118
|
} else {
|
|
@@ -1125,7 +1125,7 @@ function addIdentityTypeToCall$lambda(element, transformer) {
|
|
|
1125
1125
|
var tmp;
|
|
1126
1126
|
if (element instanceof Struct) {
|
|
1127
1127
|
// Inline function 'kotlin.collections.map' call
|
|
1128
|
-
var this_0 = element.
|
|
1128
|
+
var this_0 = element.ix_1;
|
|
1129
1129
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1130
1130
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1131
1131
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -1133,17 +1133,17 @@ function addIdentityTypeToCall$lambda(element, transformer) {
|
|
|
1133
1133
|
var item = _iterator__ex2g4s.v();
|
|
1134
1134
|
// Inline function 'kotlin.takeIf' call
|
|
1135
1135
|
var tmp_0;
|
|
1136
|
-
if (endsWith(item.
|
|
1136
|
+
if (endsWith(item.ru_1.du(), '.Call')) {
|
|
1137
1137
|
tmp_0 = item;
|
|
1138
1138
|
} else {
|
|
1139
1139
|
tmp_0 = null;
|
|
1140
1140
|
}
|
|
1141
1141
|
var tmp0_safe_receiver = tmp_0;
|
|
1142
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1142
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.uu(VOID, listOf(Custom_init_$Create$('[A] =>> A')));
|
|
1143
1143
|
var tmp$ret$3 = tmp1_elvis_lhs == null ? item : tmp1_elvis_lhs;
|
|
1144
1144
|
destination.x(tmp$ret$3);
|
|
1145
1145
|
}
|
|
1146
|
-
tmp = element.
|
|
1146
|
+
tmp = element.qx(VOID, VOID, VOID, destination);
|
|
1147
1147
|
} else {
|
|
1148
1148
|
tmp = element;
|
|
1149
1149
|
}
|
|
@@ -1151,10 +1151,10 @@ function addIdentityTypeToCall$lambda(element, transformer) {
|
|
|
1151
1151
|
return transformChildren_0(transformed, transformer);
|
|
1152
1152
|
}
|
|
1153
1153
|
//region block: post-declaration
|
|
1154
|
-
protoOf(ScalaEmitter).
|
|
1155
|
-
protoOf(ScalaEmitter).
|
|
1156
|
-
protoOf(ScalaEmitter).
|
|
1157
|
-
protoOf(ScalaEmitter).
|
|
1154
|
+
protoOf(ScalaEmitter).i1b = get_extensions;
|
|
1155
|
+
protoOf(ScalaEmitter).uo = emit_0;
|
|
1156
|
+
protoOf(ScalaEmitter).f1b = emit_1;
|
|
1157
|
+
protoOf(ScalaEmitter).wp = get_supportsDefaults;
|
|
1158
1158
|
//endregion
|
|
1159
1159
|
//region block: exports
|
|
1160
1160
|
export {
|