@flock/wirespec 0.22.1 → 0.22.3
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-core.mjs +11 -5
- package/arrow-arrow-core.mjs.map +1 -1
- package/clikt-clikt-mordant.mjs +79 -79
- package/clikt-clikt.mjs +1343 -1343
- package/colormath-root-colormath.mjs +437 -437
- package/kotlin-kotlin-stdlib.mjs +259 -253
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +10004 -10004
- package/kotlin-rgxgen.mjs +1762 -1762
- package/kotlinx-io-kotlinx-io-core.mjs +404 -404
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +1786 -1786
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1514 -1508
- package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/mordant-mordant.mjs +1231 -1225
- package/mordant-mordant.mjs.map +1 -1
- package/package.json +1 -1
- package/wirespec-src-compiler-core.mjs +4940 -4889
- package/wirespec-src-compiler-core.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-java.mjs +180 -180
- package/wirespec-src-compiler-emitters-kotlin.mjs +134 -134
- package/wirespec-src-compiler-emitters-python.mjs +157 -157
- package/wirespec-src-compiler-emitters-rust.mjs +392 -392
- package/wirespec-src-compiler-emitters-scala.mjs +168 -168
- package/wirespec-src-compiler-emitters-typescript.mjs +229 -229
- package/wirespec-src-compiler-emitters-wirespec.mjs +125 -125
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +388 -326
- package/wirespec-src-compiler-lib.mjs.map +1 -1
- package/wirespec-src-converter-asyncapi.mjs +639 -639
- package/wirespec-src-converter-avro.mjs +548 -548
- package/wirespec-src-converter-common.mjs +16 -16
- package/wirespec-src-converter-graphql.mjs +2546 -1342
- package/wirespec-src-converter-graphql.mjs.map +1 -1
- package/wirespec-src-converter-openapi.mjs +593 -593
- package/wirespec-src-ide-lsp.mjs +1371 -1371
- package/wirespec-src-plugin-arguments.mjs +146 -146
- package/wirespec-src-plugin-cli.mjs +89 -89
- package/wirespec-src-plugin-npm.d.mts +21 -3
- package/wirespec-src-plugin-npm.mjs +26 -26
- package/wirespec-src-tools-generator.mjs +24 -24
|
@@ -160,7 +160,7 @@ initMetadataForClass(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', VOID, V
|
|
|
160
160
|
initMetadataForClass(PythonEmitter, 'PythonEmitter', PythonEmitter, VOID, [IrEmitter]);
|
|
161
161
|
//endregion
|
|
162
162
|
function _get_sanitizationConfig__sns434($this) {
|
|
163
|
-
var tmp0 = $this.
|
|
163
|
+
var tmp0 = $this.q20_1;
|
|
164
164
|
var tmp = KProperty1;
|
|
165
165
|
// Inline function 'kotlin.getValue' call
|
|
166
166
|
getPropertyCallableRef('sanitizationConfig', 1, tmp, PythonEmitter$_get_sanitizationConfig_$ref_crpgpd(), null);
|
|
@@ -177,7 +177,7 @@ function sanitize($this, $receiver) {
|
|
|
177
177
|
var item = _iterator__ex2g4s.v();
|
|
178
178
|
var _unary__edvuaz = index;
|
|
179
179
|
index = _unary__edvuaz + 1 | 0;
|
|
180
|
-
var tmp$ret$2 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.
|
|
180
|
+
var tmp$ret$2 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.yr(item) : item;
|
|
181
181
|
destination.x(tmp$ret$2);
|
|
182
182
|
}
|
|
183
183
|
// Inline function 'kotlin.text.filter' call
|
|
@@ -223,7 +223,7 @@ function sanitize($this, $receiver) {
|
|
|
223
223
|
return tmp_2;
|
|
224
224
|
}
|
|
225
225
|
function sanitizeKeywords($this, $receiver) {
|
|
226
|
-
return Companion_getInstance_0().
|
|
226
|
+
return Companion_getInstance_0().v1z().i1($receiver) ? '_' + $receiver : $receiver;
|
|
227
227
|
}
|
|
228
228
|
function sanitizeEnum($this, $receiver) {
|
|
229
229
|
// Inline function 'kotlin.let' call
|
|
@@ -249,10 +249,10 @@ function buildImports($this, wirespecPath) {
|
|
|
249
249
|
}
|
|
250
250
|
function Companion() {
|
|
251
251
|
Companion_instance_2 = this;
|
|
252
|
-
this.
|
|
252
|
+
this.s20_1 = PythonGenerator_getInstance();
|
|
253
253
|
}
|
|
254
|
-
protoOf(Companion).
|
|
255
|
-
return this.
|
|
254
|
+
protoOf(Companion).v1z = function () {
|
|
255
|
+
return this.s20_1.o1a_1;
|
|
256
256
|
};
|
|
257
257
|
var Companion_instance_2;
|
|
258
258
|
function Companion_getInstance_0() {
|
|
@@ -261,16 +261,16 @@ function Companion_getInstance_0() {
|
|
|
261
261
|
return Companion_instance_2;
|
|
262
262
|
}
|
|
263
263
|
function sam$kotlin_Comparator$0(function_0) {
|
|
264
|
-
this.
|
|
264
|
+
this.t20_1 = function_0;
|
|
265
265
|
}
|
|
266
266
|
protoOf(sam$kotlin_Comparator$0).yd = function (a, b) {
|
|
267
|
-
return this.
|
|
267
|
+
return this.t20_1(a, b);
|
|
268
268
|
};
|
|
269
269
|
protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
|
|
270
270
|
return this.yd(a, b);
|
|
271
271
|
};
|
|
272
272
|
protoOf(sam$kotlin_Comparator$0).o3 = function () {
|
|
273
|
-
return this.
|
|
273
|
+
return this.t20_1;
|
|
274
274
|
};
|
|
275
275
|
protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
276
276
|
var tmp;
|
|
@@ -294,11 +294,11 @@ function PythonEmitter$sanitizationConfig$delegate$lambda$lambda(it) {
|
|
|
294
294
|
return '_' + it;
|
|
295
295
|
}
|
|
296
296
|
function PythonEmitter$sanitizationConfig$delegate$lambda$lambda_0(name) {
|
|
297
|
-
var sanitized = name.
|
|
297
|
+
var sanitized = name.ut_1.b1() > 1 ? name.yt() : name.xt();
|
|
298
298
|
return new Name(listOf_0(sanitized));
|
|
299
299
|
}
|
|
300
300
|
function PythonEmitter$sanitizationConfig$delegate$lambda$lambda_1(name) {
|
|
301
|
-
return new Name(listOf_0(name.
|
|
301
|
+
return new Name(listOf_0(name.yt()));
|
|
302
302
|
}
|
|
303
303
|
function PythonEmitter$sanitizationConfig$delegate$lambda$lambda_2(it) {
|
|
304
304
|
return it;
|
|
@@ -307,9 +307,9 @@ function PythonEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
307
307
|
return function (stmt, tr) {
|
|
308
308
|
var tmp;
|
|
309
309
|
if (stmt instanceof ConstructorStatement) {
|
|
310
|
-
var tmp_0 = tr.
|
|
310
|
+
var tmp_0 = tr.m17(stmt.dv_1);
|
|
311
311
|
// Inline function 'kotlin.collections.map' call
|
|
312
|
-
var this_0 = stmt.
|
|
312
|
+
var this_0 = stmt.ev_1;
|
|
313
313
|
// Inline function 'kotlin.collections.mapTo' call
|
|
314
314
|
var destination = ArrayList_init_$Create$(this_0.b1());
|
|
315
315
|
// Inline function 'kotlin.collections.iterator' call
|
|
@@ -320,7 +320,7 @@ function PythonEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
320
320
|
var k = item.n1();
|
|
321
321
|
// Inline function 'kotlin.collections.component2' call
|
|
322
322
|
var v = item.o1();
|
|
323
|
-
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), k), tr.
|
|
323
|
+
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), k), tr.p17(v));
|
|
324
324
|
destination.x(tmp$ret$3);
|
|
325
325
|
}
|
|
326
326
|
tmp = new ConstructorStatement(tmp_0, toMap(destination));
|
|
@@ -332,7 +332,7 @@ function PythonEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
332
332
|
}
|
|
333
333
|
function PythonEmitter$sanitizationConfig$delegate$lambda(this$0) {
|
|
334
334
|
return function () {
|
|
335
|
-
var tmp = Companion_getInstance_0().
|
|
335
|
+
var tmp = Companion_getInstance_0().v1z();
|
|
336
336
|
var tmp_0 = PythonEmitter$sanitizationConfig$delegate$lambda$lambda;
|
|
337
337
|
var tmp_1 = PythonEmitter$sanitizationConfig$delegate$lambda$lambda_0;
|
|
338
338
|
var tmp_2 = PythonEmitter$sanitizationConfig$delegate$lambda$lambda_1;
|
|
@@ -352,7 +352,7 @@ function PythonEmitter$emit$lambda(a, b) {
|
|
|
352
352
|
return compareValues(tmp, tmp$ret$2);
|
|
353
353
|
}
|
|
354
354
|
function emit$emitInitImport(this$0, def) {
|
|
355
|
-
return import_0('.' + sanitize(this$0, def.
|
|
355
|
+
return import_0('.' + sanitize(this$0, def.ds()), sanitize(this$0, def.ds()));
|
|
356
356
|
}
|
|
357
357
|
function PythonEmitter$emitGenerator$lambda(it) {
|
|
358
358
|
return startsWith(it, 'Wirespec.') || it === 'Wirespec';
|
|
@@ -371,17 +371,17 @@ function PythonEmitter$emitGenerator$lambda_2($generatorOwnName, $generatorRefs)
|
|
|
371
371
|
var tmp_0;
|
|
372
372
|
var tmp_1;
|
|
373
373
|
if (expr instanceof RawExpression) {
|
|
374
|
-
tmp_1 = endsWith(expr.
|
|
374
|
+
tmp_1 = endsWith(expr.iy_1, 'Generator');
|
|
375
375
|
} else {
|
|
376
376
|
tmp_1 = false;
|
|
377
377
|
}
|
|
378
378
|
if (tmp_1) {
|
|
379
|
-
tmp_0 = !(expr.
|
|
379
|
+
tmp_0 = !(expr.iy_1 === $generatorOwnName);
|
|
380
380
|
} else {
|
|
381
381
|
tmp_0 = false;
|
|
382
382
|
}
|
|
383
383
|
if (tmp_0) {
|
|
384
|
-
$generatorRefs.x(expr.
|
|
384
|
+
$generatorRefs.x(expr.iy_1);
|
|
385
385
|
tmp = Unit_instance;
|
|
386
386
|
}
|
|
387
387
|
return transformChildren_0(expr, t);
|
|
@@ -394,33 +394,33 @@ function PythonEmitter$emit$lambda_0(this$0) {
|
|
|
394
394
|
}
|
|
395
395
|
function PythonEmitter(packageName, emitShared) {
|
|
396
396
|
Companion_getInstance_0();
|
|
397
|
-
packageName = packageName === VOID ? Companion_instance_0.
|
|
398
|
-
emitShared = emitShared === VOID ? Companion_instance_1.
|
|
399
|
-
this.
|
|
400
|
-
this.
|
|
401
|
-
this.
|
|
402
|
-
this.
|
|
397
|
+
packageName = packageName === VOID ? Companion_instance_0.at('community.flock.wirespec.generated') : packageName;
|
|
398
|
+
emitShared = emitShared === VOID ? Companion_instance_1.fq() : emitShared;
|
|
399
|
+
this.m20_1 = packageName;
|
|
400
|
+
this.n20_1 = emitShared;
|
|
401
|
+
this.o20_1 = PythonGenerator_getInstance();
|
|
402
|
+
this.p20_1 = FileExtension_Python_getInstance();
|
|
403
403
|
var tmp = this;
|
|
404
|
-
tmp.
|
|
405
|
-
this.
|
|
404
|
+
tmp.q20_1 = lazy(PythonEmitter$sanitizationConfig$delegate$lambda(this));
|
|
405
|
+
this.r20_1 = "from __future__ import annotations\n\nimport enum\nfrom abc import ABC, abstractmethod\nfrom dataclasses import dataclass\nfrom typing import Any, Callable, Generic, Optional, Type, TypeVar\n\nT = TypeVar('T')\nV = TypeVar('V')\n\n\ndef _raise(msg: str) -> Any:\n raise Exception(msg)\n\n";
|
|
406
406
|
}
|
|
407
|
-
protoOf(PythonEmitter).
|
|
408
|
-
return this.
|
|
407
|
+
protoOf(PythonEmitter).h1a = function () {
|
|
408
|
+
return this.o20_1;
|
|
409
409
|
};
|
|
410
|
-
protoOf(PythonEmitter).
|
|
411
|
-
return this.
|
|
410
|
+
protoOf(PythonEmitter).wp = function () {
|
|
411
|
+
return this.p20_1;
|
|
412
412
|
};
|
|
413
|
-
protoOf(PythonEmitter).
|
|
414
|
-
var source = replaceReflectInNonGenericStructFields(convert(Companion_instance_0.
|
|
413
|
+
protoOf(PythonEmitter).c1a = function () {
|
|
414
|
+
var source = replaceReflectInNonGenericStructFields(convert(Companion_instance_0.at('shared')));
|
|
415
415
|
var tmp;
|
|
416
|
-
if (this.
|
|
417
|
-
tmp = new File(Companion_getInstance().
|
|
416
|
+
if (this.n20_1.gq_1) {
|
|
417
|
+
tmp = new File(Companion_getInstance().wt(this.m20_1.dt() + 'wirespec'), listOf_0(raw(this.r20_1 + PythonGenerator_getInstance().i1a(source))));
|
|
418
418
|
} else {
|
|
419
419
|
tmp = null;
|
|
420
420
|
}
|
|
421
421
|
return tmp;
|
|
422
422
|
};
|
|
423
|
-
protoOf(PythonEmitter).
|
|
423
|
+
protoOf(PythonEmitter).b1a = function (module_0, logger) {
|
|
424
424
|
// Inline function 'kotlin.collections.sortedBy' call
|
|
425
425
|
var this_0 = new NonEmptyList(module_0.gp_1);
|
|
426
426
|
// Inline function 'kotlin.comparisons.compareBy' call
|
|
@@ -429,7 +429,7 @@ protoOf(PythonEmitter).a1a = function (module_0, logger) {
|
|
|
429
429
|
var tmp$ret$0 = sortedWith(this_0, tmp$ret$1);
|
|
430
430
|
var tmp_0 = toNonEmptyListOrNull(tmp$ret$0);
|
|
431
431
|
var statements = ensureNotNull(tmp_0 == null ? null : new NonEmptyList(tmp_0)).dn_1;
|
|
432
|
-
var emitted = emit.call(this, module_0.
|
|
432
|
+
var emitted = emit.call(this, module_0.tp(VOID, statements), logger);
|
|
433
433
|
var tmp0 = new NonEmptyList(module_0.gp_1);
|
|
434
434
|
var tmp$ret$2;
|
|
435
435
|
$l$block_0: {
|
|
@@ -455,7 +455,7 @@ protoOf(PythonEmitter).a1a = function (module_0, logger) {
|
|
|
455
455
|
tmp$ret$2 = false;
|
|
456
456
|
}
|
|
457
457
|
var hasEndpoints = tmp$ret$2;
|
|
458
|
-
var tmp_2 = Companion_getInstance().
|
|
458
|
+
var tmp_2 = Companion_getInstance().wt(this.m20_1.dt() + '__init__');
|
|
459
459
|
// Inline function 'kotlin.collections.buildList' call
|
|
460
460
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
461
461
|
// Inline function 'kotlin.apply' call
|
|
@@ -468,7 +468,7 @@ protoOf(PythonEmitter).a1a = function (module_0, logger) {
|
|
|
468
468
|
this_1.x(import_0('.', 'wirespec'));
|
|
469
469
|
var tmp$ret$4 = this_1.q5();
|
|
470
470
|
var init = new File(tmp_2, tmp$ret$4);
|
|
471
|
-
var tmp_3 = Companion_getInstance().
|
|
471
|
+
var tmp_3 = Companion_getInstance().wt(this.m20_1.dt() + 'endpoint/' + '__init__');
|
|
472
472
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
473
473
|
var tmp0_0 = new NonEmptyList(module_0.gp_1);
|
|
474
474
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
@@ -490,7 +490,7 @@ protoOf(PythonEmitter).a1a = function (module_0, logger) {
|
|
|
490
490
|
destination_0.x(tmp$ret$12);
|
|
491
491
|
}
|
|
492
492
|
var initEndpoint = new File(tmp_3, destination_0);
|
|
493
|
-
var tmp_4 = Companion_getInstance().
|
|
493
|
+
var tmp_4 = Companion_getInstance().wt(this.m20_1.dt() + 'model/' + '__init__');
|
|
494
494
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
495
495
|
var tmp0_1 = new NonEmptyList(module_0.gp_1);
|
|
496
496
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
@@ -512,8 +512,8 @@ protoOf(PythonEmitter).a1a = function (module_0, logger) {
|
|
|
512
512
|
destination_2.x(tmp$ret$17);
|
|
513
513
|
}
|
|
514
514
|
var initModel = new File(tmp_4, destination_2);
|
|
515
|
-
var initClient = hasEndpoints ? listOf_0(new File(Companion_getInstance().
|
|
516
|
-
var tmp0_2 = dropLast(split(this.
|
|
515
|
+
var initClient = hasEndpoints ? listOf_0(new File(Companion_getInstance().wt(this.m20_1.dt() + 'client/' + '__init__'), emptyList())) : emptyList();
|
|
516
|
+
var tmp0_2 = dropLast(split(this.m20_1.bt_1, ['.']), 1);
|
|
517
517
|
var tmp$ret$18;
|
|
518
518
|
$l$block_1: {
|
|
519
519
|
// Inline function 'kotlin.collections.runningFold' call
|
|
@@ -550,17 +550,17 @@ protoOf(PythonEmitter).a1a = function (module_0, logger) {
|
|
|
550
550
|
var _iterator__ex2g4s_5 = this_3.t();
|
|
551
551
|
while (_iterator__ex2g4s_5.u()) {
|
|
552
552
|
var item_1 = _iterator__ex2g4s_5.v();
|
|
553
|
-
var tmp$ret$25 = new File(Companion_getInstance().
|
|
553
|
+
var tmp$ret$25 = new File(Companion_getInstance().wt(item_1 + '/__init__'), emptyList());
|
|
554
554
|
destination_3.x(tmp$ret$25);
|
|
555
555
|
}
|
|
556
556
|
var parentInits = destination_3;
|
|
557
|
-
return this.
|
|
557
|
+
return this.n20_1.gq_1 ? NonEmptyList__plus_impl_xqmb9_0(NonEmptyList__plus_impl_xqmb9_0(NonEmptyList__plus_impl_xqmb9(NonEmptyList__plus_impl_xqmb9(NonEmptyList__plus_impl_xqmb9(emitted, init), initEndpoint), initModel), initClient), parentInits) : NonEmptyList__plus_impl_xqmb9_0(NonEmptyList__plus_impl_xqmb9(emitted, init), parentInits);
|
|
558
558
|
};
|
|
559
|
-
protoOf(PythonEmitter).
|
|
559
|
+
protoOf(PythonEmitter).cs = function (definition, module_0, logger) {
|
|
560
560
|
var file = emit_0.call(this, definition, module_0, logger);
|
|
561
|
-
return placeInModule(prependImports(file, buildImports(this, '..wirespec')), this.
|
|
561
|
+
return placeInModule(prependImports(file, buildImports(this, '..wirespec')), this.m20_1, definition);
|
|
562
562
|
};
|
|
563
|
-
protoOf(PythonEmitter).
|
|
563
|
+
protoOf(PythonEmitter).k1a = function (definition, module_0) {
|
|
564
564
|
var tmp;
|
|
565
565
|
if (definition instanceof Type) {
|
|
566
566
|
tmp = convertToGenerator_2(definition, module_0);
|
|
@@ -581,7 +581,7 @@ protoOf(PythonEmitter).j1a = function (definition, module_0) {
|
|
|
581
581
|
}
|
|
582
582
|
var generatorFile = tmp;
|
|
583
583
|
var sanitized = sanitizeNames(generatorFile, _get_sanitizationConfig__sns434(this));
|
|
584
|
-
var generatorOwnName = definition.
|
|
584
|
+
var generatorOwnName = definition.ds().o1() + 'Generator';
|
|
585
585
|
var tmp_0 = asSequence(collectCustomTypeNames(sanitized));
|
|
586
586
|
var tmp_1 = filterNot(tmp_0, PythonEmitter$emitGenerator$lambda);
|
|
587
587
|
var tmp_2 = filterNot(tmp_1, PythonEmitter$emitGenerator$lambda_0(generatorOwnName));
|
|
@@ -590,8 +590,8 @@ protoOf(PythonEmitter).j1a = function (definition, module_0) {
|
|
|
590
590
|
var generatorRefs = LinkedHashSet_init_$Create$();
|
|
591
591
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
592
592
|
var scope = new TransformScope(sanitized);
|
|
593
|
-
scope.
|
|
594
|
-
var tmp_3 = scope.
|
|
593
|
+
scope.l18(PythonEmitter$emitGenerator$lambda_2(generatorOwnName, generatorRefs));
|
|
594
|
+
var tmp_3 = scope.u17_1;
|
|
595
595
|
isInterface(tmp_3, Element) || THROW_CCE();
|
|
596
596
|
// Inline function 'kotlin.collections.filter' call
|
|
597
597
|
// Inline function 'kotlin.collections.filterTo' call
|
|
@@ -634,9 +634,9 @@ protoOf(PythonEmitter).j1a = function (definition, module_0) {
|
|
|
634
634
|
destination_2.x(tmp$ret$14);
|
|
635
635
|
}
|
|
636
636
|
var modelImports = destination_2;
|
|
637
|
-
return placeInModule_0(prependImports(sanitized, plus(plus(buildImports(this, '..wirespec'), modelImports), generatorImports)), this.
|
|
637
|
+
return placeInModule_0(prependImports(sanitized, plus(plus(buildImports(this, '..wirespec'), modelImports), generatorImports)), this.m20_1, 'generator');
|
|
638
638
|
};
|
|
639
|
-
protoOf(PythonEmitter).
|
|
639
|
+
protoOf(PythonEmitter).us = function (type, module_0) {
|
|
640
640
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
641
641
|
var this_0 = importReferences(type);
|
|
642
642
|
var set = HashSet_init_$Create$();
|
|
@@ -644,7 +644,7 @@ protoOf(PythonEmitter).ts = function (type, module_0) {
|
|
|
644
644
|
var _iterator__ex2g4s = this_0.t();
|
|
645
645
|
while (_iterator__ex2g4s.u()) {
|
|
646
646
|
var e = _iterator__ex2g4s.v();
|
|
647
|
-
var key = e.
|
|
647
|
+
var key = e.r18_1;
|
|
648
648
|
if (set.x(key)) {
|
|
649
649
|
list.x(e);
|
|
650
650
|
}
|
|
@@ -655,18 +655,18 @@ protoOf(PythonEmitter).ts = function (type, module_0) {
|
|
|
655
655
|
var _iterator__ex2g4s_0 = list.t();
|
|
656
656
|
while (_iterator__ex2g4s_0.u()) {
|
|
657
657
|
var item = _iterator__ex2g4s_0.v();
|
|
658
|
-
var tmp$ret$4 = import_0('.' + item.
|
|
658
|
+
var tmp$ret$4 = import_0('.' + item.r18_1, item.r18_1);
|
|
659
659
|
destination.x(tmp$ret$4);
|
|
660
660
|
}
|
|
661
661
|
var typeImports = destination;
|
|
662
662
|
// Inline function 'kotlin.collections.map' call
|
|
663
|
-
var this_1 = get_fields(type.
|
|
663
|
+
var this_1 = get_fields(type.lp_1);
|
|
664
664
|
// Inline function 'kotlin.collections.mapTo' call
|
|
665
665
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
|
|
666
666
|
var _iterator__ex2g4s_1 = this_1.t();
|
|
667
667
|
while (_iterator__ex2g4s_1.u()) {
|
|
668
668
|
var item_0 = _iterator__ex2g4s_1.v();
|
|
669
|
-
var tmp$ret$7 = item_0.
|
|
669
|
+
var tmp$ret$7 = item_0.op_1.o1();
|
|
670
670
|
destination_0.x(tmp$ret$7);
|
|
671
671
|
}
|
|
672
672
|
var fieldNames = toSet(destination_0);
|
|
@@ -682,17 +682,17 @@ protoOf(PythonEmitter).ts = function (type, module_0) {
|
|
|
682
682
|
var tmp$ret$8 = tmp_0;
|
|
683
683
|
return prependImports(tmp, tmp$ret$8);
|
|
684
684
|
};
|
|
685
|
-
protoOf(PythonEmitter).
|
|
685
|
+
protoOf(PythonEmitter).ss = function (enum_0, module_0) {
|
|
686
686
|
var tmp = convert_0(enum_0);
|
|
687
687
|
return sanitizeNames(sanitizeEnumEntries(tmp, PythonEmitter$emit$lambda_0(this)), _get_sanitizationConfig__sns434(this));
|
|
688
688
|
};
|
|
689
|
-
protoOf(PythonEmitter).
|
|
689
|
+
protoOf(PythonEmitter).is = function (union) {
|
|
690
690
|
return sanitizeNames(convert_1(union), _get_sanitizationConfig__sns434(this));
|
|
691
691
|
};
|
|
692
|
-
protoOf(PythonEmitter).
|
|
692
|
+
protoOf(PythonEmitter).ns = function (refined) {
|
|
693
693
|
return sanitizeNames(replaceRefinedFunctions(convert_2(refined), refined), _get_sanitizationConfig__sns434(this));
|
|
694
694
|
};
|
|
695
|
-
protoOf(PythonEmitter).
|
|
695
|
+
protoOf(PythonEmitter).ts = function (endpoint) {
|
|
696
696
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
697
697
|
var this_0 = importReferences(endpoint);
|
|
698
698
|
var set = HashSet_init_$Create$();
|
|
@@ -700,7 +700,7 @@ protoOf(PythonEmitter).ss = function (endpoint) {
|
|
|
700
700
|
var _iterator__ex2g4s = this_0.t();
|
|
701
701
|
while (_iterator__ex2g4s.u()) {
|
|
702
702
|
var e = _iterator__ex2g4s.v();
|
|
703
|
-
var key = e.
|
|
703
|
+
var key = e.r18_1;
|
|
704
704
|
if (set.x(key)) {
|
|
705
705
|
list.x(e);
|
|
706
706
|
}
|
|
@@ -711,19 +711,19 @@ protoOf(PythonEmitter).ss = function (endpoint) {
|
|
|
711
711
|
var _iterator__ex2g4s_0 = list.t();
|
|
712
712
|
while (_iterator__ex2g4s_0.u()) {
|
|
713
713
|
var item = _iterator__ex2g4s_0.v();
|
|
714
|
-
var tmp$ret$4 = import_0('..model.' + item.
|
|
714
|
+
var tmp$ret$4 = import_0('..model.' + item.r18_1, item.r18_1);
|
|
715
715
|
destination.x(tmp$ret$4);
|
|
716
716
|
}
|
|
717
717
|
var endpointImports = destination;
|
|
718
718
|
// Inline function 'kotlin.let' call
|
|
719
719
|
var it = splitEndpointStructsToModuleLevel(convert_3(endpoint));
|
|
720
|
-
var tmp$ret$5 = it.
|
|
720
|
+
var tmp$ret$5 = it.lv(VOID, plus(endpointImports, it.iv_1));
|
|
721
721
|
return sanitizeNames(snakeCaseHandlerAndCallMethods(tmp$ret$5), _get_sanitizationConfig__sns434(this));
|
|
722
722
|
};
|
|
723
|
-
protoOf(PythonEmitter).
|
|
723
|
+
protoOf(PythonEmitter).hs = function (channel) {
|
|
724
724
|
return sanitizeNames(convert_4(channel), _get_sanitizationConfig__sns434(this));
|
|
725
725
|
};
|
|
726
|
-
protoOf(PythonEmitter).
|
|
726
|
+
protoOf(PythonEmitter).gs = function (rpc) {
|
|
727
727
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
728
728
|
var this_0 = importReferences(rpc);
|
|
729
729
|
var set = HashSet_init_$Create$();
|
|
@@ -731,7 +731,7 @@ protoOf(PythonEmitter).fs = function (rpc) {
|
|
|
731
731
|
var _iterator__ex2g4s = this_0.t();
|
|
732
732
|
while (_iterator__ex2g4s.u()) {
|
|
733
733
|
var e = _iterator__ex2g4s.v();
|
|
734
|
-
var key = e.
|
|
734
|
+
var key = e.r18_1;
|
|
735
735
|
if (set.x(key)) {
|
|
736
736
|
list.x(e);
|
|
737
737
|
}
|
|
@@ -742,16 +742,16 @@ protoOf(PythonEmitter).fs = function (rpc) {
|
|
|
742
742
|
var _iterator__ex2g4s_0 = list.t();
|
|
743
743
|
while (_iterator__ex2g4s_0.u()) {
|
|
744
744
|
var item = _iterator__ex2g4s_0.v();
|
|
745
|
-
var tmp$ret$4 = import_0('..model.' + item.
|
|
745
|
+
var tmp$ret$4 = import_0('..model.' + item.r18_1, item.r18_1);
|
|
746
746
|
destination.x(tmp$ret$4);
|
|
747
747
|
}
|
|
748
748
|
var rpcImports = destination;
|
|
749
749
|
// Inline function 'kotlin.let' call
|
|
750
750
|
var it = convert_5(rpc);
|
|
751
|
-
var tmp$ret$5 = it.
|
|
751
|
+
var tmp$ret$5 = it.lv(VOID, plus(rpcImports, it.iv_1));
|
|
752
752
|
return sanitizeNames(tmp$ret$5, _get_sanitizationConfig__sns434(this));
|
|
753
753
|
};
|
|
754
|
-
protoOf(PythonEmitter).
|
|
754
|
+
protoOf(PythonEmitter).j1a = function (endpoint) {
|
|
755
755
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
756
756
|
var this_0 = importReferences(endpoint);
|
|
757
757
|
var set = HashSet_init_$Create$();
|
|
@@ -759,7 +759,7 @@ protoOf(PythonEmitter).i1a = function (endpoint) {
|
|
|
759
759
|
var _iterator__ex2g4s = this_0.t();
|
|
760
760
|
while (_iterator__ex2g4s.u()) {
|
|
761
761
|
var e = _iterator__ex2g4s.v();
|
|
762
|
-
var key = e.
|
|
762
|
+
var key = e.r18_1;
|
|
763
763
|
if (set.x(key)) {
|
|
764
764
|
list.x(e);
|
|
765
765
|
}
|
|
@@ -770,17 +770,17 @@ protoOf(PythonEmitter).i1a = function (endpoint) {
|
|
|
770
770
|
var _iterator__ex2g4s_0 = list.t();
|
|
771
771
|
while (_iterator__ex2g4s_0.u()) {
|
|
772
772
|
var item = _iterator__ex2g4s_0.v();
|
|
773
|
-
var tmp$ret$4 = import_0('..model.' + item.
|
|
773
|
+
var tmp$ret$4 = import_0('..model.' + item.r18_1, item.r18_1);
|
|
774
774
|
destination.x(tmp$ret$4);
|
|
775
775
|
}
|
|
776
776
|
var modelImports = destination;
|
|
777
|
-
var endpointImport = import_0('..endpoint.' + endpoint.
|
|
778
|
-
var endpointName = endpoint.
|
|
777
|
+
var endpointImport = import_0('..endpoint.' + endpoint.fr_1.o1(), '*');
|
|
778
|
+
var endpointName = endpoint.fr_1.o1();
|
|
779
779
|
var file = flattenEndpointTypeRefs(snakeCaseClientFunctions(addSelfReceiverToClientFields(sanitizeNames(emitEndpointClient.call(this, endpoint), _get_sanitizationConfig__sns434(this)))), endpointName);
|
|
780
|
-
var subPackageName = plus_1(this.
|
|
781
|
-
return new File(Companion_getInstance().
|
|
780
|
+
var subPackageName = plus_1(this.m20_1, 'client');
|
|
781
|
+
return new File(Companion_getInstance().wt(subPackageName.dt() + file.hv_1.zt()), plus(plus(plus(buildImports(this, '..wirespec'), modelImports), listOf_0(endpointImport)), file.iv_1));
|
|
782
782
|
};
|
|
783
|
-
protoOf(PythonEmitter).
|
|
783
|
+
protoOf(PythonEmitter).d1a = function (endpoints, logger) {
|
|
784
784
|
// Inline function 'kotlin.collections.flatMap' call
|
|
785
785
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
786
786
|
var destination = ArrayList_init_$Create$_0();
|
|
@@ -796,7 +796,7 @@ protoOf(PythonEmitter).c1a = function (endpoints, logger) {
|
|
|
796
796
|
var _iterator__ex2g4s_0 = destination.t();
|
|
797
797
|
while (_iterator__ex2g4s_0.u()) {
|
|
798
798
|
var e = _iterator__ex2g4s_0.v();
|
|
799
|
-
var key = e.
|
|
799
|
+
var key = e.r18_1;
|
|
800
800
|
if (set.x(key)) {
|
|
801
801
|
list_0.x(e);
|
|
802
802
|
}
|
|
@@ -807,7 +807,7 @@ protoOf(PythonEmitter).c1a = function (endpoints, logger) {
|
|
|
807
807
|
var _iterator__ex2g4s_1 = list_0.t();
|
|
808
808
|
while (_iterator__ex2g4s_1.u()) {
|
|
809
809
|
var item = _iterator__ex2g4s_1.v();
|
|
810
|
-
var tmp$ret$7 = import_0('.model.' + item.
|
|
810
|
+
var tmp$ret$7 = import_0('.model.' + item.r18_1, item.r18_1);
|
|
811
811
|
destination_0.x(tmp$ret$7);
|
|
812
812
|
}
|
|
813
813
|
var modelImports = destination_0;
|
|
@@ -817,7 +817,7 @@ protoOf(PythonEmitter).c1a = function (endpoints, logger) {
|
|
|
817
817
|
var _iterator__ex2g4s_2 = endpoints.t();
|
|
818
818
|
while (_iterator__ex2g4s_2.u()) {
|
|
819
819
|
var item_0 = _iterator__ex2g4s_2.v();
|
|
820
|
-
var tmp$ret$10 = import_0('.endpoint.' + item_0.
|
|
820
|
+
var tmp$ret$10 = import_0('.endpoint.' + item_0.fr_1.o1(), '*');
|
|
821
821
|
destination_1.x(tmp$ret$10);
|
|
822
822
|
}
|
|
823
823
|
var endpointImports = destination_1;
|
|
@@ -827,7 +827,7 @@ protoOf(PythonEmitter).c1a = function (endpoints, logger) {
|
|
|
827
827
|
var _iterator__ex2g4s_3 = endpoints.t();
|
|
828
828
|
while (_iterator__ex2g4s_3.u()) {
|
|
829
829
|
var item_1 = _iterator__ex2g4s_3.v();
|
|
830
|
-
var tmp$ret$13 = import_0('.client.' + item_1.
|
|
830
|
+
var tmp$ret$13 = import_0('.client.' + item_1.fr_1.o1() + 'Client', item_1.fr_1.o1() + 'Client');
|
|
831
831
|
destination_2.x(tmp$ret$13);
|
|
832
832
|
}
|
|
833
833
|
var clientImports = destination_2;
|
|
@@ -838,7 +838,7 @@ protoOf(PythonEmitter).c1a = function (endpoints, logger) {
|
|
|
838
838
|
var _iterator__ex2g4s_4 = endpoints.t();
|
|
839
839
|
while (_iterator__ex2g4s_4.u()) {
|
|
840
840
|
var item_2 = _iterator__ex2g4s_4.v();
|
|
841
|
-
var tmp$ret$16 = item_2.
|
|
841
|
+
var tmp$ret$16 = item_2.fr_1.o1();
|
|
842
842
|
destination_3.x(tmp$ret$16);
|
|
843
843
|
}
|
|
844
844
|
var endpointNames = destination_3;
|
|
@@ -852,7 +852,7 @@ protoOf(PythonEmitter).c1a = function (endpoints, logger) {
|
|
|
852
852
|
accumulator = flattenEndpointTypeRefs(acc, element_0);
|
|
853
853
|
}
|
|
854
854
|
var file = accumulator;
|
|
855
|
-
return new File(Companion_getInstance().
|
|
855
|
+
return new File(Companion_getInstance().wt(this.m20_1.dt() + file.hv_1.zt()), plus(plus(buildImports(this, '.wirespec'), allImports), file.iv_1));
|
|
856
856
|
};
|
|
857
857
|
function replaceReflectInNonGenericStructFields(_this__u8e3s4) {
|
|
858
858
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
@@ -860,14 +860,14 @@ function replaceReflectInNonGenericStructFields(_this__u8e3s4) {
|
|
|
860
860
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
861
861
|
var tmp = scope;
|
|
862
862
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
863
|
-
var this_0 = scope.
|
|
863
|
+
var this_0 = scope.u17_1;
|
|
864
864
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
865
865
|
// Inline function 'kotlin.apply' call
|
|
866
866
|
var this_1 = new TransformerBuilder();
|
|
867
|
-
this_1.
|
|
868
|
-
var tmp$ret$4 = this_1.
|
|
869
|
-
tmp.
|
|
870
|
-
var tmp_0 = scope.
|
|
867
|
+
this_1.o18(replaceReflectInNonGenericStructFields$lambda);
|
|
868
|
+
var tmp$ret$4 = this_1.j18();
|
|
869
|
+
tmp.u17_1 = transform(this_0, tmp$ret$4);
|
|
870
|
+
var tmp_0 = scope.u17_1;
|
|
871
871
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
872
872
|
}
|
|
873
873
|
function replaceRefinedFunctions(_this__u8e3s4, refined) {
|
|
@@ -876,14 +876,14 @@ function replaceRefinedFunctions(_this__u8e3s4, refined) {
|
|
|
876
876
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
877
877
|
var tmp = scope;
|
|
878
878
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
879
|
-
var this_0 = scope.
|
|
879
|
+
var this_0 = scope.u17_1;
|
|
880
880
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
881
881
|
// Inline function 'kotlin.apply' call
|
|
882
882
|
var this_1 = new TransformerBuilder();
|
|
883
|
-
this_1.
|
|
884
|
-
var tmp$ret$4 = this_1.
|
|
885
|
-
tmp.
|
|
886
|
-
var tmp_0 = scope.
|
|
883
|
+
this_1.o18(replaceRefinedFunctions$lambda(refined));
|
|
884
|
+
var tmp$ret$4 = this_1.j18();
|
|
885
|
+
tmp.u17_1 = transform(this_0, tmp$ret$4);
|
|
886
|
+
var tmp_0 = scope.u17_1;
|
|
887
887
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
888
888
|
}
|
|
889
889
|
function snakeCaseHandlerAndCallMethods(_this__u8e3s4) {
|
|
@@ -892,20 +892,20 @@ function snakeCaseHandlerAndCallMethods(_this__u8e3s4) {
|
|
|
892
892
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
893
893
|
var tmp = scope;
|
|
894
894
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
895
|
-
var this_0 = scope.
|
|
895
|
+
var this_0 = scope.u17_1;
|
|
896
896
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
897
897
|
// Inline function 'kotlin.apply' call
|
|
898
898
|
var this_1 = new TransformerBuilder();
|
|
899
|
-
this_1.
|
|
900
|
-
var tmp$ret$4 = this_1.
|
|
901
|
-
tmp.
|
|
902
|
-
var tmp_0 = scope.
|
|
899
|
+
this_1.o18(snakeCaseHandlerAndCallMethods$lambda);
|
|
900
|
+
var tmp$ret$4 = this_1.j18();
|
|
901
|
+
tmp.u17_1 = transform(this_0, tmp$ret$4);
|
|
902
|
+
var tmp_0 = scope.u17_1;
|
|
903
903
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
904
904
|
}
|
|
905
905
|
function splitEndpointStructsToModuleLevel(_this__u8e3s4) {
|
|
906
906
|
// Inline function 'community.flock.wirespec.compiler.core.ir.findElement' call
|
|
907
907
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
908
|
-
var tmp0 = _this__u8e3s4.
|
|
908
|
+
var tmp0 = _this__u8e3s4.jv();
|
|
909
909
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
910
910
|
var destination = ArrayList_init_$Create$_0();
|
|
911
911
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -918,7 +918,7 @@ function splitEndpointStructsToModuleLevel(_this__u8e3s4) {
|
|
|
918
918
|
var tmp$ret$0 = firstOrNull_0(destination);
|
|
919
919
|
var namespace = ensureNotNull(tmp$ret$0);
|
|
920
920
|
// Inline function 'kotlin.collections.partition' call
|
|
921
|
-
var this_0 = namespace.
|
|
921
|
+
var this_0 = namespace.ov_1;
|
|
922
922
|
var first = ArrayList_init_$Create$_0();
|
|
923
923
|
var second = ArrayList_init_$Create$_0();
|
|
924
924
|
var _iterator__ex2g4s_0 = this_0.t();
|
|
@@ -937,16 +937,16 @@ function splitEndpointStructsToModuleLevel(_this__u8e3s4) {
|
|
|
937
937
|
}
|
|
938
938
|
}
|
|
939
939
|
var _destruct__k2r9zo = new Pair(first, second);
|
|
940
|
-
var moduleElements = _destruct__k2r9zo.
|
|
941
|
-
var classElements = _destruct__k2r9zo.
|
|
942
|
-
var endpointClass = new Namespace(namespace.
|
|
943
|
-
return new File(namespace.
|
|
940
|
+
var moduleElements = _destruct__k2r9zo.ze();
|
|
941
|
+
var classElements = _destruct__k2r9zo.af();
|
|
942
|
+
var endpointClass = new Namespace(namespace.nv_1, classElements, namespace.pv_1);
|
|
943
|
+
return new File(namespace.nv_1, plus_0(moduleElements, endpointClass));
|
|
944
944
|
}
|
|
945
945
|
function flattenEndpointTypeRefs(_this__u8e3s4, endpointName) {
|
|
946
946
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
947
947
|
var scope = new TransformScope(_this__u8e3s4);
|
|
948
|
-
scope.
|
|
949
|
-
var tmp = scope.
|
|
948
|
+
scope.a18(flattenEndpointTypeRefs$lambda(endpointName));
|
|
949
|
+
var tmp = scope.u17_1;
|
|
950
950
|
return isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
951
951
|
}
|
|
952
952
|
function snakeCaseClientFunctions(_this__u8e3s4) {
|
|
@@ -955,15 +955,15 @@ function snakeCaseClientFunctions(_this__u8e3s4) {
|
|
|
955
955
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
956
956
|
var tmp = scope;
|
|
957
957
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
958
|
-
var this_0 = scope.
|
|
958
|
+
var this_0 = scope.u17_1;
|
|
959
959
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
960
960
|
// Inline function 'kotlin.apply' call
|
|
961
961
|
var this_1 = new TransformerBuilder();
|
|
962
|
-
this_1.
|
|
963
|
-
var tmp$ret$4 = this_1.
|
|
964
|
-
tmp.
|
|
965
|
-
scope.
|
|
966
|
-
var tmp_0 = scope.
|
|
962
|
+
this_1.o18(snakeCaseClientFunctions$lambda);
|
|
963
|
+
var tmp$ret$4 = this_1.j18();
|
|
964
|
+
tmp.u17_1 = transform(this_0, tmp$ret$4);
|
|
965
|
+
scope.m18(snakeCaseClientFunctions$lambda_0);
|
|
966
|
+
var tmp_0 = scope.u17_1;
|
|
967
967
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
968
968
|
}
|
|
969
969
|
function addSelfReceiverToClientFields(_this__u8e3s4) {
|
|
@@ -974,7 +974,7 @@ function addSelfReceiverToClientFields(_this__u8e3s4) {
|
|
|
974
974
|
} else {
|
|
975
975
|
// Inline function 'community.flock.wirespec.compiler.core.ir.findElement' call
|
|
976
976
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
977
|
-
var tmp0 = tmp0_safe_receiver.
|
|
977
|
+
var tmp0 = tmp0_safe_receiver.jv();
|
|
978
978
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
979
979
|
var destination = ArrayList_init_$Create$_0();
|
|
980
980
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -998,7 +998,7 @@ function addSelfReceiverToClientFields(_this__u8e3s4) {
|
|
|
998
998
|
var _iterator__ex2g4s_0 = tmp2_safe_receiver.t();
|
|
999
999
|
while (_iterator__ex2g4s_0.u()) {
|
|
1000
1000
|
var item = _iterator__ex2g4s_0.v();
|
|
1001
|
-
var tmp$ret$5 = item.
|
|
1001
|
+
var tmp$ret$5 = item.cw_1.xt();
|
|
1002
1002
|
destination_0.x(tmp$ret$5);
|
|
1003
1003
|
}
|
|
1004
1004
|
tmp_0 = destination_0;
|
|
@@ -1010,8 +1010,8 @@ function addSelfReceiverToClientFields(_this__u8e3s4) {
|
|
|
1010
1010
|
return _this__u8e3s4;
|
|
1011
1011
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
1012
1012
|
var scope = new TransformScope(_this__u8e3s4);
|
|
1013
|
-
scope.
|
|
1014
|
-
var tmp_1 = scope.
|
|
1013
|
+
scope.m18(addSelfReceiverToClientFields$lambda(fieldNames));
|
|
1014
|
+
var tmp_1 = scope.u17_1;
|
|
1015
1015
|
return isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
1016
1016
|
}
|
|
1017
1017
|
function replaceReflectAsTypeAny(_this__u8e3s4) {
|
|
@@ -1020,13 +1020,13 @@ function replaceReflectAsTypeAny(_this__u8e3s4) {
|
|
|
1020
1020
|
tmp = Custom_init_$Create$('type', listOf_0(Any_instance));
|
|
1021
1021
|
} else {
|
|
1022
1022
|
if (_this__u8e3s4 instanceof Nullable) {
|
|
1023
|
-
tmp = _this__u8e3s4.
|
|
1023
|
+
tmp = _this__u8e3s4.mu(replaceReflectAsTypeAny(_this__u8e3s4.uu_1));
|
|
1024
1024
|
} else {
|
|
1025
1025
|
if (_this__u8e3s4 instanceof Array_0) {
|
|
1026
|
-
tmp = _this__u8e3s4.
|
|
1026
|
+
tmp = _this__u8e3s4.mu(replaceReflectAsTypeAny(_this__u8e3s4.lu_1));
|
|
1027
1027
|
} else {
|
|
1028
1028
|
if (_this__u8e3s4 instanceof Dict) {
|
|
1029
|
-
tmp = _this__u8e3s4.
|
|
1029
|
+
tmp = _this__u8e3s4.pu(replaceReflectAsTypeAny(_this__u8e3s4.nu_1), replaceReflectAsTypeAny(_this__u8e3s4.ou_1));
|
|
1030
1030
|
} else {
|
|
1031
1031
|
tmp = _this__u8e3s4;
|
|
1032
1032
|
}
|
|
@@ -1041,12 +1041,12 @@ function replaceReflectInNonGenericStructFields$lambda(element, transformer) {
|
|
|
1041
1041
|
var tmp$ret$0;
|
|
1042
1042
|
$l$block: {
|
|
1043
1043
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1044
|
-
if (!element.
|
|
1044
|
+
if (!element.mx_1.r()) {
|
|
1045
1045
|
tmp$ret$0 = element;
|
|
1046
1046
|
break $l$block;
|
|
1047
1047
|
}
|
|
1048
1048
|
// Inline function 'kotlin.collections.map' call
|
|
1049
|
-
var this_0 = element.
|
|
1049
|
+
var this_0 = element.ix_1;
|
|
1050
1050
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1051
1051
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1052
1052
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -1054,14 +1054,14 @@ function replaceReflectInNonGenericStructFields$lambda(element, transformer) {
|
|
|
1054
1054
|
var item = _iterator__ex2g4s.v();
|
|
1055
1055
|
var tmp_0;
|
|
1056
1056
|
if (item instanceof Field) {
|
|
1057
|
-
tmp_0 = item.
|
|
1057
|
+
tmp_0 = item.mw(VOID, replaceReflectAsTypeAny(item.dw_1));
|
|
1058
1058
|
} else {
|
|
1059
1059
|
tmp_0 = item;
|
|
1060
1060
|
}
|
|
1061
1061
|
var tmp$ret$4 = tmp_0;
|
|
1062
1062
|
destination.x(tmp$ret$4);
|
|
1063
1063
|
}
|
|
1064
|
-
tmp$ret$0 = element.
|
|
1064
|
+
tmp$ret$0 = element.sx(VOID, destination);
|
|
1065
1065
|
}
|
|
1066
1066
|
tmp = tmp$ret$0;
|
|
1067
1067
|
} else {
|
|
@@ -1072,17 +1072,17 @@ function replaceReflectInNonGenericStructFields$lambda(element, transformer) {
|
|
|
1072
1072
|
}
|
|
1073
1073
|
function replaceRefinedFunctions$lambda$lambda($constraintExpr) {
|
|
1074
1074
|
return function ($this$function) {
|
|
1075
|
-
$this$function.
|
|
1076
|
-
$this$function.
|
|
1077
|
-
$this$function.
|
|
1075
|
+
$this$function.k13('self', Custom_init_$Create$(''));
|
|
1076
|
+
$this$function.j13(Boolean_instance);
|
|
1077
|
+
$this$function.m13($constraintExpr);
|
|
1078
1078
|
return Unit_instance;
|
|
1079
1079
|
};
|
|
1080
1080
|
}
|
|
1081
1081
|
function replaceRefinedFunctions$lambda$lambda_0($toStringExpr) {
|
|
1082
1082
|
return function ($this$function) {
|
|
1083
|
-
$this$function.
|
|
1084
|
-
$this$function.
|
|
1085
|
-
$this$function.
|
|
1083
|
+
$this$function.k13('self', Custom_init_$Create$(''));
|
|
1084
|
+
$this$function.j13(String_instance);
|
|
1085
|
+
$this$function.m13(new RawExpression($toStringExpr));
|
|
1086
1086
|
return Unit_instance;
|
|
1087
1087
|
};
|
|
1088
1088
|
}
|
|
@@ -1091,7 +1091,7 @@ function replaceRefinedFunctions$lambda($refined) {
|
|
|
1091
1091
|
var tmp;
|
|
1092
1092
|
if (element instanceof Struct) {
|
|
1093
1093
|
// Inline function 'kotlin.collections.map' call
|
|
1094
|
-
var this_0 = element.
|
|
1094
|
+
var this_0 = element.lx_1;
|
|
1095
1095
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1096
1096
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1097
1097
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -1100,23 +1100,23 @@ function replaceRefinedFunctions$lambda($refined) {
|
|
|
1100
1100
|
var tmp_0;
|
|
1101
1101
|
var tmp_1;
|
|
1102
1102
|
if (item instanceof Function) {
|
|
1103
|
-
tmp_1 = item.
|
|
1103
|
+
tmp_1 = item.tx_1.equals(Companion_getInstance().wt('validate'));
|
|
1104
1104
|
} else {
|
|
1105
1105
|
tmp_1 = false;
|
|
1106
1106
|
}
|
|
1107
1107
|
if (tmp_1) {
|
|
1108
|
-
var constraintExpr = convertConstraint($refined.
|
|
1108
|
+
var constraintExpr = convertConstraint($refined.ms_1, new FieldCall(new VariableReference(Companion_getInstance().wt('self')), Companion_getInstance().wt('value')));
|
|
1109
1109
|
tmp_0 = function_0('validate', VOID, VOID, replaceRefinedFunctions$lambda$lambda(constraintExpr));
|
|
1110
1110
|
} else {
|
|
1111
1111
|
var tmp_2;
|
|
1112
1112
|
if (item instanceof Function) {
|
|
1113
|
-
tmp_2 = item.
|
|
1113
|
+
tmp_2 = item.tx_1.equals(Companion_getInstance().wt('toString'));
|
|
1114
1114
|
} else {
|
|
1115
1115
|
tmp_2 = false;
|
|
1116
1116
|
}
|
|
1117
1117
|
if (tmp_2) {
|
|
1118
1118
|
var tmp_3;
|
|
1119
|
-
if ($refined.
|
|
1119
|
+
if ($refined.ms_1.t18_1 instanceof String_0) {
|
|
1120
1120
|
tmp_3 = 'self.value';
|
|
1121
1121
|
} else {
|
|
1122
1122
|
tmp_3 = 'str(self.value)';
|
|
@@ -1130,7 +1130,7 @@ function replaceRefinedFunctions$lambda($refined) {
|
|
|
1130
1130
|
var tmp$ret$3 = tmp_0;
|
|
1131
1131
|
destination.x(tmp$ret$3);
|
|
1132
1132
|
}
|
|
1133
|
-
tmp = element.
|
|
1133
|
+
tmp = element.sx(VOID, VOID, VOID, VOID, destination);
|
|
1134
1134
|
} else {
|
|
1135
1135
|
tmp = element;
|
|
1136
1136
|
}
|
|
@@ -1143,23 +1143,23 @@ function snakeCaseHandlerAndCallMethods$lambda(element, transformer) {
|
|
|
1143
1143
|
if (element instanceof Interface) {
|
|
1144
1144
|
var tmp$ret$0;
|
|
1145
1145
|
$l$block: {
|
|
1146
|
-
if (!element.
|
|
1146
|
+
if (!element.tv_1.equals(Companion_getInstance().wt('Handler')) && !element.tv_1.equals(Companion_getInstance().wt('Call'))) {
|
|
1147
1147
|
tmp$ret$0 = element;
|
|
1148
1148
|
break $l$block;
|
|
1149
1149
|
}
|
|
1150
1150
|
// Inline function 'kotlin.collections.map' call
|
|
1151
|
-
var this_0 = element.
|
|
1151
|
+
var this_0 = element.uv_1;
|
|
1152
1152
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1153
1153
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1154
1154
|
var _iterator__ex2g4s = this_0.t();
|
|
1155
1155
|
while (_iterator__ex2g4s.u()) {
|
|
1156
1156
|
var item = _iterator__ex2g4s.v();
|
|
1157
1157
|
var tmp0_safe_receiver = item instanceof Function ? item : null;
|
|
1158
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1158
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.fy(Companion_getInstance().wt(item.tx_1.au()));
|
|
1159
1159
|
var tmp$ret$3 = tmp1_elvis_lhs == null ? item : tmp1_elvis_lhs;
|
|
1160
1160
|
destination.x(tmp$ret$3);
|
|
1161
1161
|
}
|
|
1162
|
-
tmp$ret$0 = element.
|
|
1162
|
+
tmp$ret$0 = element.bw(VOID, destination);
|
|
1163
1163
|
}
|
|
1164
1164
|
tmp = tmp$ret$0;
|
|
1165
1165
|
} else {
|
|
@@ -1174,17 +1174,17 @@ function flattenEndpointTypeRefs$lambda($endpointName) {
|
|
|
1174
1174
|
if (!(type instanceof Custom)) {
|
|
1175
1175
|
tmp = type;
|
|
1176
1176
|
} else {
|
|
1177
|
-
if (!startsWith(type.
|
|
1177
|
+
if (!startsWith(type.qu_1.zt(), $endpointName + '.')) {
|
|
1178
1178
|
tmp = type;
|
|
1179
1179
|
} else {
|
|
1180
|
-
var suffix = removePrefix(type.
|
|
1180
|
+
var suffix = removePrefix(type.qu_1.zt(), $endpointName + '.');
|
|
1181
1181
|
switch (suffix) {
|
|
1182
1182
|
case 'Call':
|
|
1183
1183
|
case 'Handler':
|
|
1184
1184
|
tmp = type;
|
|
1185
1185
|
break;
|
|
1186
1186
|
default:
|
|
1187
|
-
tmp = type.
|
|
1187
|
+
tmp = type.tu(Companion_getInstance().wt(suffix));
|
|
1188
1188
|
break;
|
|
1189
1189
|
}
|
|
1190
1190
|
}
|
|
@@ -1195,7 +1195,7 @@ function flattenEndpointTypeRefs$lambda($endpointName) {
|
|
|
1195
1195
|
function snakeCaseClientFunctions$lambda(element, transformer) {
|
|
1196
1196
|
var tmp;
|
|
1197
1197
|
if (element instanceof Function) {
|
|
1198
|
-
tmp = element.
|
|
1198
|
+
tmp = element.fy(Companion_getInstance().wt(element.tx_1.au()), VOID, plus(listOf_0(new Parameter(Companion_getInstance().wt('self'), Custom_init_$Create$(''))), element.vx_1));
|
|
1199
1199
|
} else {
|
|
1200
1200
|
tmp = element;
|
|
1201
1201
|
}
|
|
@@ -1205,19 +1205,19 @@ function snakeCaseClientFunctions$lambda(element, transformer) {
|
|
|
1205
1205
|
function snakeCaseClientFunctions$lambda_0(stmt, tr) {
|
|
1206
1206
|
var tmp;
|
|
1207
1207
|
if (stmt instanceof FunctionCall) {
|
|
1208
|
-
var nameStr = stmt.
|
|
1209
|
-
var newName = contains(nameStr, '.') ? stmt.
|
|
1210
|
-
var tmp1_safe_receiver = stmt.
|
|
1208
|
+
var nameStr = stmt.eu_1.xt();
|
|
1209
|
+
var newName = contains(nameStr, '.') ? stmt.eu_1 : Companion_getInstance().wt(Companion_getInstance().wt(nameStr).au());
|
|
1210
|
+
var tmp1_safe_receiver = stmt.cu_1;
|
|
1211
1211
|
var tmp_0;
|
|
1212
1212
|
if (tmp1_safe_receiver == null) {
|
|
1213
1213
|
tmp_0 = null;
|
|
1214
1214
|
} else {
|
|
1215
1215
|
// Inline function 'kotlin.let' call
|
|
1216
|
-
tmp_0 = tr.
|
|
1216
|
+
tmp_0 = tr.p17(tmp1_safe_receiver);
|
|
1217
1217
|
}
|
|
1218
1218
|
var tmp2_receiver = tmp_0;
|
|
1219
1219
|
// Inline function 'kotlin.collections.mapValues' call
|
|
1220
|
-
var this_0 = stmt.
|
|
1220
|
+
var this_0 = stmt.fu_1;
|
|
1221
1221
|
// Inline function 'kotlin.collections.mapValuesTo' call
|
|
1222
1222
|
var destination = LinkedHashMap_init_$Create$(mapCapacity(this_0.b1()));
|
|
1223
1223
|
// Inline function 'kotlin.collections.associateByTo' call
|
|
@@ -1227,10 +1227,10 @@ function snakeCaseClientFunctions$lambda_0(stmt, tr) {
|
|
|
1227
1227
|
var tmp_1 = element.n1();
|
|
1228
1228
|
// Inline function 'kotlin.collections.component2' call
|
|
1229
1229
|
var v = element.o1();
|
|
1230
|
-
var tmp$ret$6 = tr.
|
|
1230
|
+
var tmp$ret$6 = tr.p17(v);
|
|
1231
1231
|
destination.v2(tmp_1, tmp$ret$6);
|
|
1232
1232
|
}
|
|
1233
|
-
var tmp4_isAwait = !(stmt.
|
|
1233
|
+
var tmp4_isAwait = !(stmt.cu_1 == null);
|
|
1234
1234
|
tmp = new FunctionCall(tmp2_receiver, VOID, newName, destination, tmp4_isAwait);
|
|
1235
1235
|
} else {
|
|
1236
1236
|
tmp = transformChildren(stmt, tr);
|
|
@@ -1242,23 +1242,23 @@ function addSelfReceiverToClientFields$lambda($fieldNames) {
|
|
|
1242
1242
|
var tmp;
|
|
1243
1243
|
var tmp_0;
|
|
1244
1244
|
if (stmt instanceof FieldCall) {
|
|
1245
|
-
tmp_0 = (stmt.
|
|
1245
|
+
tmp_0 = (stmt.fz_1 == null && $fieldNames.i1(stmt.gz_1.xt()));
|
|
1246
1246
|
} else {
|
|
1247
1247
|
tmp_0 = false;
|
|
1248
1248
|
}
|
|
1249
1249
|
if (tmp_0) {
|
|
1250
|
-
tmp = new FieldCall(new VariableReference(Companion_getInstance().
|
|
1250
|
+
tmp = new FieldCall(new VariableReference(Companion_getInstance().wt('self')), stmt.gz_1);
|
|
1251
1251
|
} else {
|
|
1252
1252
|
if (stmt instanceof FieldCall) {
|
|
1253
|
-
var tmp1_safe_receiver = stmt.
|
|
1253
|
+
var tmp1_safe_receiver = stmt.fz_1;
|
|
1254
1254
|
var tmp_1;
|
|
1255
1255
|
if (tmp1_safe_receiver == null) {
|
|
1256
1256
|
tmp_1 = null;
|
|
1257
1257
|
} else {
|
|
1258
1258
|
// Inline function 'kotlin.let' call
|
|
1259
|
-
tmp_1 = tr.
|
|
1259
|
+
tmp_1 = tr.p17(tmp1_safe_receiver);
|
|
1260
1260
|
}
|
|
1261
|
-
tmp = new FieldCall(tmp_1, stmt.
|
|
1261
|
+
tmp = new FieldCall(tmp_1, stmt.gz_1);
|
|
1262
1262
|
} else {
|
|
1263
1263
|
tmp = transformChildren(stmt, tr);
|
|
1264
1264
|
}
|
|
@@ -1267,10 +1267,10 @@ function addSelfReceiverToClientFields$lambda($fieldNames) {
|
|
|
1267
1267
|
};
|
|
1268
1268
|
}
|
|
1269
1269
|
//region block: post-declaration
|
|
1270
|
-
protoOf(PythonEmitter).
|
|
1270
|
+
protoOf(PythonEmitter).e1a = get_extensions;
|
|
1271
1271
|
protoOf(PythonEmitter).to = emit_1;
|
|
1272
|
-
protoOf(PythonEmitter).
|
|
1273
|
-
protoOf(PythonEmitter).
|
|
1272
|
+
protoOf(PythonEmitter).g1a = beforeGenerate;
|
|
1273
|
+
protoOf(PythonEmitter).vp = get_supportsDefaults;
|
|
1274
1274
|
//endregion
|
|
1275
1275
|
//region block: exports
|
|
1276
1276
|
export {
|