@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
|
@@ -158,7 +158,7 @@ initMetadataForClass(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', VOID, V
|
|
|
158
158
|
initMetadataForClass(PythonEmitter, 'PythonEmitter', PythonEmitter, VOID, [IrEmitter]);
|
|
159
159
|
//endregion
|
|
160
160
|
function _get_sanitizationConfig__sns434($this) {
|
|
161
|
-
var tmp0 = $this.
|
|
161
|
+
var tmp0 = $this.i38_1;
|
|
162
162
|
var tmp = KProperty1;
|
|
163
163
|
// Inline function 'kotlin.getValue' call
|
|
164
164
|
getPropertyCallableRef('sanitizationConfig', 1, tmp, PythonEmitter$_get_sanitizationConfig_$ref_crpgpd(), null);
|
|
@@ -175,7 +175,7 @@ function sanitize($this, $receiver) {
|
|
|
175
175
|
var item = _iterator__ex2g4s.v();
|
|
176
176
|
var _unary__edvuaz = index;
|
|
177
177
|
index = _unary__edvuaz + 1 | 0;
|
|
178
|
-
var tmp$ret$2 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.
|
|
178
|
+
var tmp$ret$2 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.zr(item) : item;
|
|
179
179
|
destination.x(tmp$ret$2);
|
|
180
180
|
}
|
|
181
181
|
// Inline function 'kotlin.text.filter' call
|
|
@@ -221,7 +221,7 @@ function sanitize($this, $receiver) {
|
|
|
221
221
|
return tmp_2;
|
|
222
222
|
}
|
|
223
223
|
function sanitizeKeywords($this, $receiver) {
|
|
224
|
-
return Companion_getInstance_0().
|
|
224
|
+
return Companion_getInstance_0().n37().i1($receiver) ? '_' + $receiver : $receiver;
|
|
225
225
|
}
|
|
226
226
|
function sanitizeEnum($this, $receiver) {
|
|
227
227
|
// Inline function 'kotlin.let' call
|
|
@@ -247,10 +247,10 @@ function buildImports($this, wirespecPath) {
|
|
|
247
247
|
}
|
|
248
248
|
function Companion() {
|
|
249
249
|
Companion_instance_2 = this;
|
|
250
|
-
this.
|
|
250
|
+
this.k38_1 = PythonGenerator_getInstance();
|
|
251
251
|
}
|
|
252
|
-
protoOf(Companion).
|
|
253
|
-
return this.
|
|
252
|
+
protoOf(Companion).n37 = function () {
|
|
253
|
+
return this.k38_1.q1c_1;
|
|
254
254
|
};
|
|
255
255
|
var Companion_instance_2;
|
|
256
256
|
function Companion_getInstance_0() {
|
|
@@ -259,23 +259,23 @@ function Companion_getInstance_0() {
|
|
|
259
259
|
return Companion_instance_2;
|
|
260
260
|
}
|
|
261
261
|
function sam$kotlin_Comparator$0(function_0) {
|
|
262
|
-
this.
|
|
262
|
+
this.l38_1 = function_0;
|
|
263
263
|
}
|
|
264
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
265
|
-
return this.
|
|
264
|
+
protoOf(sam$kotlin_Comparator$0).zd = function (a, b) {
|
|
265
|
+
return this.l38_1(a, b);
|
|
266
266
|
};
|
|
267
267
|
protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
|
|
268
|
-
return this.
|
|
268
|
+
return this.zd(a, b);
|
|
269
269
|
};
|
|
270
|
-
protoOf(sam$kotlin_Comparator$0).
|
|
271
|
-
return this.
|
|
270
|
+
protoOf(sam$kotlin_Comparator$0).p3 = function () {
|
|
271
|
+
return this.l38_1;
|
|
272
272
|
};
|
|
273
273
|
protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
274
274
|
var tmp;
|
|
275
275
|
if (!(other == null) ? isInterface(other, Comparator) : false) {
|
|
276
276
|
var tmp_0;
|
|
277
277
|
if (!(other == null) ? isInterface(other, FunctionAdapter) : false) {
|
|
278
|
-
tmp_0 = equals(this.
|
|
278
|
+
tmp_0 = equals(this.p3(), other.p3());
|
|
279
279
|
} else {
|
|
280
280
|
tmp_0 = false;
|
|
281
281
|
}
|
|
@@ -286,17 +286,17 @@ protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
|
286
286
|
return tmp;
|
|
287
287
|
};
|
|
288
288
|
protoOf(sam$kotlin_Comparator$0).hashCode = function () {
|
|
289
|
-
return hashCode(this.
|
|
289
|
+
return hashCode(this.p3());
|
|
290
290
|
};
|
|
291
291
|
function PythonEmitter$sanitizationConfig$delegate$lambda$lambda(it) {
|
|
292
292
|
return '_' + it;
|
|
293
293
|
}
|
|
294
294
|
function PythonEmitter$sanitizationConfig$delegate$lambda$lambda_0(name) {
|
|
295
|
-
var sanitized = name.
|
|
295
|
+
var sanitized = name.yt_1.c1() > 1 ? name.cu() : name.bu();
|
|
296
296
|
return new Name(listOf_0(sanitized));
|
|
297
297
|
}
|
|
298
298
|
function PythonEmitter$sanitizationConfig$delegate$lambda$lambda_1(name) {
|
|
299
|
-
return new Name(listOf_0(name.
|
|
299
|
+
return new Name(listOf_0(name.cu()));
|
|
300
300
|
}
|
|
301
301
|
function PythonEmitter$sanitizationConfig$delegate$lambda$lambda_2(it) {
|
|
302
302
|
return it;
|
|
@@ -305,9 +305,9 @@ function PythonEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
305
305
|
return function (stmt, tr) {
|
|
306
306
|
var tmp;
|
|
307
307
|
if (stmt instanceof ConstructorStatement) {
|
|
308
|
-
var tmp_0 = tr.
|
|
308
|
+
var tmp_0 = tr.w18(stmt.gu_1);
|
|
309
309
|
// Inline function 'kotlin.collections.map' call
|
|
310
|
-
var this_0 = stmt.
|
|
310
|
+
var this_0 = stmt.hu_1;
|
|
311
311
|
// Inline function 'kotlin.collections.mapTo' call
|
|
312
312
|
var destination = ArrayList_init_$Create$(this_0.c1());
|
|
313
313
|
// Inline function 'kotlin.collections.iterator' call
|
|
@@ -318,7 +318,7 @@ function PythonEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
318
318
|
var k = item.n1();
|
|
319
319
|
// Inline function 'kotlin.collections.component2' call
|
|
320
320
|
var v = item.o1();
|
|
321
|
-
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), k), tr.
|
|
321
|
+
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), k), tr.z18(v));
|
|
322
322
|
destination.x(tmp$ret$3);
|
|
323
323
|
}
|
|
324
324
|
tmp = new ConstructorStatement(tmp_0, toMap(destination));
|
|
@@ -330,7 +330,7 @@ function PythonEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
330
330
|
}
|
|
331
331
|
function PythonEmitter$sanitizationConfig$delegate$lambda(this$0) {
|
|
332
332
|
return function () {
|
|
333
|
-
var tmp = Companion_getInstance_0().
|
|
333
|
+
var tmp = Companion_getInstance_0().n37();
|
|
334
334
|
var tmp_0 = PythonEmitter$sanitizationConfig$delegate$lambda$lambda;
|
|
335
335
|
var tmp_1 = PythonEmitter$sanitizationConfig$delegate$lambda$lambda_0;
|
|
336
336
|
var tmp_2 = PythonEmitter$sanitizationConfig$delegate$lambda$lambda_1;
|
|
@@ -350,7 +350,7 @@ function PythonEmitter$emit$lambda(a, b) {
|
|
|
350
350
|
return compareValues(tmp, tmp$ret$2);
|
|
351
351
|
}
|
|
352
352
|
function emit$emitInitImport(this$0, def) {
|
|
353
|
-
return import_0('.' + sanitize(this$0, def.
|
|
353
|
+
return import_0('.' + sanitize(this$0, def.es()), sanitize(this$0, def.es()));
|
|
354
354
|
}
|
|
355
355
|
function PythonEmitter$emitGenerator$lambda(it) {
|
|
356
356
|
return startsWith(it, 'Wirespec.') || it === 'Wirespec';
|
|
@@ -369,17 +369,17 @@ function PythonEmitter$emitGenerator$lambda_2($generatorOwnName, $generatorRefs)
|
|
|
369
369
|
var tmp_0;
|
|
370
370
|
var tmp_1;
|
|
371
371
|
if (expr instanceof RawExpression) {
|
|
372
|
-
tmp_1 = endsWith(expr.
|
|
372
|
+
tmp_1 = endsWith(expr.gy_1, 'Generator');
|
|
373
373
|
} else {
|
|
374
374
|
tmp_1 = false;
|
|
375
375
|
}
|
|
376
376
|
if (tmp_1) {
|
|
377
|
-
tmp_0 = !(expr.
|
|
377
|
+
tmp_0 = !(expr.gy_1 === $generatorOwnName);
|
|
378
378
|
} else {
|
|
379
379
|
tmp_0 = false;
|
|
380
380
|
}
|
|
381
381
|
if (tmp_0) {
|
|
382
|
-
$generatorRefs.x(expr.
|
|
382
|
+
$generatorRefs.x(expr.gy_1);
|
|
383
383
|
tmp = Unit_instance;
|
|
384
384
|
}
|
|
385
385
|
return transformChildren_0(expr, t);
|
|
@@ -393,42 +393,42 @@ function PythonEmitter$emit$lambda_0(this$0) {
|
|
|
393
393
|
function PythonEmitter(packageName, emitShared) {
|
|
394
394
|
Companion_getInstance_0();
|
|
395
395
|
packageName = packageName === VOID ? Companion_instance_0.at('community.flock.wirespec.generated') : packageName;
|
|
396
|
-
emitShared = emitShared === VOID ? Companion_instance_1.
|
|
397
|
-
this.
|
|
398
|
-
this.
|
|
399
|
-
this.
|
|
400
|
-
this.
|
|
396
|
+
emitShared = emitShared === VOID ? Companion_instance_1.gq() : emitShared;
|
|
397
|
+
this.e38_1 = packageName;
|
|
398
|
+
this.f38_1 = emitShared;
|
|
399
|
+
this.g38_1 = PythonGenerator_getInstance();
|
|
400
|
+
this.h38_1 = FileExtension_Python_getInstance();
|
|
401
401
|
var tmp = this;
|
|
402
|
-
tmp.
|
|
403
|
-
this.
|
|
402
|
+
tmp.i38_1 = lazy(PythonEmitter$sanitizationConfig$delegate$lambda(this));
|
|
403
|
+
this.j38_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";
|
|
404
404
|
}
|
|
405
|
-
protoOf(PythonEmitter).
|
|
406
|
-
return this.
|
|
405
|
+
protoOf(PythonEmitter).l1b = function () {
|
|
406
|
+
return this.g38_1;
|
|
407
407
|
};
|
|
408
|
-
protoOf(PythonEmitter).
|
|
409
|
-
return this.
|
|
408
|
+
protoOf(PythonEmitter).xp = function () {
|
|
409
|
+
return this.h38_1;
|
|
410
410
|
};
|
|
411
|
-
protoOf(PythonEmitter).
|
|
411
|
+
protoOf(PythonEmitter).g1b = function () {
|
|
412
412
|
var source = replaceReflectInNonGenericStructFields(convert(Companion_instance_0.at('shared')));
|
|
413
413
|
var tmp;
|
|
414
|
-
if (this.
|
|
415
|
-
tmp = new File(Companion_getInstance().
|
|
414
|
+
if (this.f38_1.hq_1) {
|
|
415
|
+
tmp = new File(Companion_getInstance().au(this.e38_1.dt() + 'wirespec'), listOf_0(raw(this.j38_1 + PythonGenerator_getInstance().m1b(source))));
|
|
416
416
|
} else {
|
|
417
417
|
tmp = null;
|
|
418
418
|
}
|
|
419
419
|
return tmp;
|
|
420
420
|
};
|
|
421
|
-
protoOf(PythonEmitter).
|
|
421
|
+
protoOf(PythonEmitter).f1b = function (module_0, logger) {
|
|
422
422
|
// Inline function 'kotlin.collections.sortedBy' call
|
|
423
|
-
var this_0 = new NonEmptyList(module_0.
|
|
423
|
+
var this_0 = new NonEmptyList(module_0.hp_1);
|
|
424
424
|
// Inline function 'kotlin.comparisons.compareBy' call
|
|
425
425
|
var tmp = PythonEmitter$emit$lambda;
|
|
426
426
|
var tmp$ret$1 = new sam$kotlin_Comparator$0(tmp);
|
|
427
427
|
var tmp$ret$0 = sortedWith(this_0, tmp$ret$1);
|
|
428
428
|
var tmp_0 = toNonEmptyListOrNull(tmp$ret$0);
|
|
429
|
-
var statements = ensureNotNull(tmp_0 == null ? null : new NonEmptyList(tmp_0)).
|
|
430
|
-
var emitted = emit.call(this, module_0.
|
|
431
|
-
var tmp0 = new NonEmptyList(module_0.
|
|
429
|
+
var statements = ensureNotNull(tmp_0 == null ? null : new NonEmptyList(tmp_0)).en_1;
|
|
430
|
+
var emitted = emit.call(this, module_0.up(VOID, statements), logger);
|
|
431
|
+
var tmp0 = new NonEmptyList(module_0.hp_1);
|
|
432
432
|
var tmp$ret$2;
|
|
433
433
|
$l$block_0: {
|
|
434
434
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -453,7 +453,7 @@ protoOf(PythonEmitter).b1b = function (module_0, logger) {
|
|
|
453
453
|
tmp$ret$2 = false;
|
|
454
454
|
}
|
|
455
455
|
var hasEndpoints = tmp$ret$2;
|
|
456
|
-
var tmp_2 = Companion_getInstance().
|
|
456
|
+
var tmp_2 = Companion_getInstance().au(this.e38_1.dt() + '__init__');
|
|
457
457
|
// Inline function 'kotlin.collections.buildList' call
|
|
458
458
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
459
459
|
// Inline function 'kotlin.apply' call
|
|
@@ -464,11 +464,11 @@ protoOf(PythonEmitter).b1b = function (module_0, logger) {
|
|
|
464
464
|
this_1.x(import_0('.', 'client'));
|
|
465
465
|
}
|
|
466
466
|
this_1.x(import_0('.', 'wirespec'));
|
|
467
|
-
var tmp$ret$4 = this_1.
|
|
467
|
+
var tmp$ret$4 = this_1.r5();
|
|
468
468
|
var init = new File(tmp_2, tmp$ret$4);
|
|
469
|
-
var tmp_3 = Companion_getInstance().
|
|
469
|
+
var tmp_3 = Companion_getInstance().au(this.e38_1.dt() + 'endpoint/' + '__init__');
|
|
470
470
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
471
|
-
var tmp0_0 = new NonEmptyList(module_0.
|
|
471
|
+
var tmp0_0 = new NonEmptyList(module_0.hp_1);
|
|
472
472
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
473
473
|
var destination = ArrayList_init_$Create$_0();
|
|
474
474
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
@@ -488,9 +488,9 @@ protoOf(PythonEmitter).b1b = function (module_0, logger) {
|
|
|
488
488
|
destination_0.x(tmp$ret$12);
|
|
489
489
|
}
|
|
490
490
|
var initEndpoint = new File(tmp_3, destination_0);
|
|
491
|
-
var tmp_4 = Companion_getInstance().
|
|
491
|
+
var tmp_4 = Companion_getInstance().au(this.e38_1.dt() + 'model/' + '__init__');
|
|
492
492
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
493
|
-
var tmp0_1 = new NonEmptyList(module_0.
|
|
493
|
+
var tmp0_1 = new NonEmptyList(module_0.hp_1);
|
|
494
494
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
495
495
|
var destination_1 = ArrayList_init_$Create$_0();
|
|
496
496
|
var _iterator__ex2g4s_2 = tmp0_1.t();
|
|
@@ -510,8 +510,8 @@ protoOf(PythonEmitter).b1b = function (module_0, logger) {
|
|
|
510
510
|
destination_2.x(tmp$ret$17);
|
|
511
511
|
}
|
|
512
512
|
var initModel = new File(tmp_4, destination_2);
|
|
513
|
-
var initClient = hasEndpoints ? listOf_0(new File(Companion_getInstance().
|
|
514
|
-
var tmp0_2 = dropLast(split(this.
|
|
513
|
+
var initClient = hasEndpoints ? listOf_0(new File(Companion_getInstance().au(this.e38_1.dt() + 'client/' + '__init__'), emptyList())) : emptyList();
|
|
514
|
+
var tmp0_2 = dropLast(split(this.e38_1.bt_1, ['.']), 1);
|
|
515
515
|
var tmp$ret$18;
|
|
516
516
|
$l$block_1: {
|
|
517
517
|
// Inline function 'kotlin.collections.runningFold' call
|
|
@@ -548,17 +548,17 @@ protoOf(PythonEmitter).b1b = function (module_0, logger) {
|
|
|
548
548
|
var _iterator__ex2g4s_5 = this_3.t();
|
|
549
549
|
while (_iterator__ex2g4s_5.u()) {
|
|
550
550
|
var item_1 = _iterator__ex2g4s_5.v();
|
|
551
|
-
var tmp$ret$25 = new File(Companion_getInstance().
|
|
551
|
+
var tmp$ret$25 = new File(Companion_getInstance().au(item_1 + '/__init__'), emptyList());
|
|
552
552
|
destination_3.x(tmp$ret$25);
|
|
553
553
|
}
|
|
554
554
|
var parentInits = destination_3;
|
|
555
|
-
return this.
|
|
555
|
+
return this.f38_1.hq_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);
|
|
556
556
|
};
|
|
557
|
-
protoOf(PythonEmitter).
|
|
557
|
+
protoOf(PythonEmitter).ds = function (definition, module_0, logger) {
|
|
558
558
|
var file = emit_0.call(this, definition, module_0, logger);
|
|
559
|
-
return placeInModule(prependImports(file, buildImports(this, '..wirespec')), this.
|
|
559
|
+
return placeInModule(prependImports(file, buildImports(this, '..wirespec')), this.e38_1, definition);
|
|
560
560
|
};
|
|
561
|
-
protoOf(PythonEmitter).
|
|
561
|
+
protoOf(PythonEmitter).o1b = function (definition, module_0) {
|
|
562
562
|
var tmp;
|
|
563
563
|
if (definition instanceof Type) {
|
|
564
564
|
tmp = convertToGenerator_2(definition, module_0);
|
|
@@ -579,7 +579,7 @@ protoOf(PythonEmitter).k1b = function (definition, module_0) {
|
|
|
579
579
|
}
|
|
580
580
|
var generatorFile = tmp;
|
|
581
581
|
var sanitized = sanitizeNames(generatorFile, _get_sanitizationConfig__sns434(this));
|
|
582
|
-
var generatorOwnName = definition.
|
|
582
|
+
var generatorOwnName = definition.es().o1() + 'Generator';
|
|
583
583
|
var tmp_0 = asSequence(collectCustomTypeNames(sanitized));
|
|
584
584
|
var tmp_1 = filterNot(tmp_0, PythonEmitter$emitGenerator$lambda);
|
|
585
585
|
var tmp_2 = filterNot(tmp_1, PythonEmitter$emitGenerator$lambda_0(generatorOwnName));
|
|
@@ -588,8 +588,8 @@ protoOf(PythonEmitter).k1b = function (definition, module_0) {
|
|
|
588
588
|
var generatorRefs = LinkedHashSet_init_$Create$();
|
|
589
589
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
590
590
|
var scope = new TransformScope(sanitized);
|
|
591
|
-
scope.
|
|
592
|
-
var tmp_3 = scope.
|
|
591
|
+
scope.v19(PythonEmitter$emitGenerator$lambda_2(generatorOwnName, generatorRefs));
|
|
592
|
+
var tmp_3 = scope.e19_1;
|
|
593
593
|
isInterface(tmp_3, Element) || THROW_CCE();
|
|
594
594
|
// Inline function 'kotlin.collections.filter' call
|
|
595
595
|
// Inline function 'kotlin.collections.filterTo' call
|
|
@@ -632,9 +632,9 @@ protoOf(PythonEmitter).k1b = function (definition, module_0) {
|
|
|
632
632
|
destination_2.x(tmp$ret$14);
|
|
633
633
|
}
|
|
634
634
|
var modelImports = destination_2;
|
|
635
|
-
return placeInModule_0(prependImports(sanitized, plus(plus(buildImports(this, '..wirespec'), modelImports), generatorImports)), this.
|
|
635
|
+
return placeInModule_0(prependImports(sanitized, plus(plus(buildImports(this, '..wirespec'), modelImports), generatorImports)), this.e38_1, 'generator');
|
|
636
636
|
};
|
|
637
|
-
protoOf(PythonEmitter).
|
|
637
|
+
protoOf(PythonEmitter).vs = function (type, module_0) {
|
|
638
638
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
639
639
|
var this_0 = importReferences(type);
|
|
640
640
|
var set = HashSet_init_$Create$();
|
|
@@ -642,7 +642,7 @@ protoOf(PythonEmitter).us = function (type, module_0) {
|
|
|
642
642
|
var _iterator__ex2g4s = this_0.t();
|
|
643
643
|
while (_iterator__ex2g4s.u()) {
|
|
644
644
|
var e = _iterator__ex2g4s.v();
|
|
645
|
-
var key = e.
|
|
645
|
+
var key = e.b1a_1;
|
|
646
646
|
if (set.x(key)) {
|
|
647
647
|
list.x(e);
|
|
648
648
|
}
|
|
@@ -653,7 +653,7 @@ protoOf(PythonEmitter).us = function (type, module_0) {
|
|
|
653
653
|
var _iterator__ex2g4s_0 = list.t();
|
|
654
654
|
while (_iterator__ex2g4s_0.u()) {
|
|
655
655
|
var item = _iterator__ex2g4s_0.v();
|
|
656
|
-
var tmp$ret$4 = import_0('.' + item.
|
|
656
|
+
var tmp$ret$4 = import_0('.' + item.b1a_1, item.b1a_1);
|
|
657
657
|
destination.x(tmp$ret$4);
|
|
658
658
|
}
|
|
659
659
|
var typeImports = destination;
|
|
@@ -669,17 +669,17 @@ protoOf(PythonEmitter).us = function (type, module_0) {
|
|
|
669
669
|
var tmp$ret$5 = tmp_0;
|
|
670
670
|
return prependImports(tmp, tmp$ret$5);
|
|
671
671
|
};
|
|
672
|
-
protoOf(PythonEmitter).
|
|
672
|
+
protoOf(PythonEmitter).ts = function (enum_0, module_0) {
|
|
673
673
|
var tmp = convert_1(enum_0);
|
|
674
674
|
return sanitizeNames(sanitizeEnumEntries(tmp, PythonEmitter$emit$lambda_0(this)), _get_sanitizationConfig__sns434(this));
|
|
675
675
|
};
|
|
676
|
-
protoOf(PythonEmitter).
|
|
676
|
+
protoOf(PythonEmitter).js = function (union) {
|
|
677
677
|
return sanitizeNames(convert_2(union), _get_sanitizationConfig__sns434(this));
|
|
678
678
|
};
|
|
679
|
-
protoOf(PythonEmitter).
|
|
679
|
+
protoOf(PythonEmitter).os = function (refined) {
|
|
680
680
|
return sanitizeNames(replaceRefinedFunctions(convert_3(refined), refined), _get_sanitizationConfig__sns434(this));
|
|
681
681
|
};
|
|
682
|
-
protoOf(PythonEmitter).
|
|
682
|
+
protoOf(PythonEmitter).us = function (endpoint) {
|
|
683
683
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
684
684
|
var this_0 = importReferences(endpoint);
|
|
685
685
|
var set = HashSet_init_$Create$();
|
|
@@ -687,7 +687,7 @@ protoOf(PythonEmitter).ts = function (endpoint) {
|
|
|
687
687
|
var _iterator__ex2g4s = this_0.t();
|
|
688
688
|
while (_iterator__ex2g4s.u()) {
|
|
689
689
|
var e = _iterator__ex2g4s.v();
|
|
690
|
-
var key = e.
|
|
690
|
+
var key = e.b1a_1;
|
|
691
691
|
if (set.x(key)) {
|
|
692
692
|
list.x(e);
|
|
693
693
|
}
|
|
@@ -698,19 +698,19 @@ protoOf(PythonEmitter).ts = function (endpoint) {
|
|
|
698
698
|
var _iterator__ex2g4s_0 = list.t();
|
|
699
699
|
while (_iterator__ex2g4s_0.u()) {
|
|
700
700
|
var item = _iterator__ex2g4s_0.v();
|
|
701
|
-
var tmp$ret$4 = import_0('..model.' + item.
|
|
701
|
+
var tmp$ret$4 = import_0('..model.' + item.b1a_1, item.b1a_1);
|
|
702
702
|
destination.x(tmp$ret$4);
|
|
703
703
|
}
|
|
704
704
|
var endpointImports = destination;
|
|
705
705
|
// Inline function 'kotlin.let' call
|
|
706
706
|
var it = splitEndpointStructsToModuleLevel(convert_4(endpoint));
|
|
707
|
-
var tmp$ret$5 = it.
|
|
707
|
+
var tmp$ret$5 = it.jv(VOID, plus(endpointImports, it.gv_1));
|
|
708
708
|
return sanitizeNames(snakeCaseHandlerAndCallMethods(tmp$ret$5), _get_sanitizationConfig__sns434(this));
|
|
709
709
|
};
|
|
710
|
-
protoOf(PythonEmitter).
|
|
710
|
+
protoOf(PythonEmitter).is = function (channel) {
|
|
711
711
|
return sanitizeNames(convert_5(channel), _get_sanitizationConfig__sns434(this));
|
|
712
712
|
};
|
|
713
|
-
protoOf(PythonEmitter).
|
|
713
|
+
protoOf(PythonEmitter).hs = function (rpc) {
|
|
714
714
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
715
715
|
var this_0 = importReferences(rpc);
|
|
716
716
|
var set = HashSet_init_$Create$();
|
|
@@ -718,7 +718,7 @@ protoOf(PythonEmitter).gs = function (rpc) {
|
|
|
718
718
|
var _iterator__ex2g4s = this_0.t();
|
|
719
719
|
while (_iterator__ex2g4s.u()) {
|
|
720
720
|
var e = _iterator__ex2g4s.v();
|
|
721
|
-
var key = e.
|
|
721
|
+
var key = e.b1a_1;
|
|
722
722
|
if (set.x(key)) {
|
|
723
723
|
list.x(e);
|
|
724
724
|
}
|
|
@@ -729,16 +729,16 @@ protoOf(PythonEmitter).gs = function (rpc) {
|
|
|
729
729
|
var _iterator__ex2g4s_0 = list.t();
|
|
730
730
|
while (_iterator__ex2g4s_0.u()) {
|
|
731
731
|
var item = _iterator__ex2g4s_0.v();
|
|
732
|
-
var tmp$ret$4 = import_0('..model.' + item.
|
|
732
|
+
var tmp$ret$4 = import_0('..model.' + item.b1a_1, item.b1a_1);
|
|
733
733
|
destination.x(tmp$ret$4);
|
|
734
734
|
}
|
|
735
735
|
var rpcImports = destination;
|
|
736
736
|
// Inline function 'kotlin.let' call
|
|
737
737
|
var it = convert_6(rpc);
|
|
738
|
-
var tmp$ret$5 = it.
|
|
738
|
+
var tmp$ret$5 = it.jv(VOID, plus(rpcImports, it.gv_1));
|
|
739
739
|
return sanitizeNames(tmp$ret$5, _get_sanitizationConfig__sns434(this));
|
|
740
740
|
};
|
|
741
|
-
protoOf(PythonEmitter).
|
|
741
|
+
protoOf(PythonEmitter).n1b = function (endpoint) {
|
|
742
742
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
743
743
|
var this_0 = importReferences(endpoint);
|
|
744
744
|
var set = HashSet_init_$Create$();
|
|
@@ -746,7 +746,7 @@ protoOf(PythonEmitter).j1b = function (endpoint) {
|
|
|
746
746
|
var _iterator__ex2g4s = this_0.t();
|
|
747
747
|
while (_iterator__ex2g4s.u()) {
|
|
748
748
|
var e = _iterator__ex2g4s.v();
|
|
749
|
-
var key = e.
|
|
749
|
+
var key = e.b1a_1;
|
|
750
750
|
if (set.x(key)) {
|
|
751
751
|
list.x(e);
|
|
752
752
|
}
|
|
@@ -757,17 +757,17 @@ protoOf(PythonEmitter).j1b = function (endpoint) {
|
|
|
757
757
|
var _iterator__ex2g4s_0 = list.t();
|
|
758
758
|
while (_iterator__ex2g4s_0.u()) {
|
|
759
759
|
var item = _iterator__ex2g4s_0.v();
|
|
760
|
-
var tmp$ret$4 = import_0('..model.' + item.
|
|
760
|
+
var tmp$ret$4 = import_0('..model.' + item.b1a_1, item.b1a_1);
|
|
761
761
|
destination.x(tmp$ret$4);
|
|
762
762
|
}
|
|
763
763
|
var modelImports = destination;
|
|
764
|
-
var endpointImport = import_0('..endpoint.' + endpoint.
|
|
765
|
-
var endpointName = endpoint.
|
|
764
|
+
var endpointImport = import_0('..endpoint.' + endpoint.gr_1.o1(), '*');
|
|
765
|
+
var endpointName = endpoint.gr_1.o1();
|
|
766
766
|
var file = flattenEndpointTypeRefs(snakeCaseClientFunctions(addSelfReceiverToClientFields(sanitizeNames(emitEndpointClient.call(this, endpoint), _get_sanitizationConfig__sns434(this)))), endpointName);
|
|
767
|
-
var subPackageName = plus_1(this.
|
|
768
|
-
return new File(Companion_getInstance().
|
|
767
|
+
var subPackageName = plus_1(this.e38_1, 'client');
|
|
768
|
+
return new File(Companion_getInstance().au(subPackageName.dt() + file.fv_1.du()), plus(plus(plus(buildImports(this, '..wirespec'), modelImports), listOf_0(endpointImport)), file.gv_1));
|
|
769
769
|
};
|
|
770
|
-
protoOf(PythonEmitter).
|
|
770
|
+
protoOf(PythonEmitter).h1b = function (endpoints, logger) {
|
|
771
771
|
// Inline function 'kotlin.collections.flatMap' call
|
|
772
772
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
773
773
|
var destination = ArrayList_init_$Create$_0();
|
|
@@ -783,7 +783,7 @@ protoOf(PythonEmitter).d1b = function (endpoints, logger) {
|
|
|
783
783
|
var _iterator__ex2g4s_0 = destination.t();
|
|
784
784
|
while (_iterator__ex2g4s_0.u()) {
|
|
785
785
|
var e = _iterator__ex2g4s_0.v();
|
|
786
|
-
var key = e.
|
|
786
|
+
var key = e.b1a_1;
|
|
787
787
|
if (set.x(key)) {
|
|
788
788
|
list_0.x(e);
|
|
789
789
|
}
|
|
@@ -794,7 +794,7 @@ protoOf(PythonEmitter).d1b = function (endpoints, logger) {
|
|
|
794
794
|
var _iterator__ex2g4s_1 = list_0.t();
|
|
795
795
|
while (_iterator__ex2g4s_1.u()) {
|
|
796
796
|
var item = _iterator__ex2g4s_1.v();
|
|
797
|
-
var tmp$ret$7 = import_0('.model.' + item.
|
|
797
|
+
var tmp$ret$7 = import_0('.model.' + item.b1a_1, item.b1a_1);
|
|
798
798
|
destination_0.x(tmp$ret$7);
|
|
799
799
|
}
|
|
800
800
|
var modelImports = destination_0;
|
|
@@ -804,7 +804,7 @@ protoOf(PythonEmitter).d1b = function (endpoints, logger) {
|
|
|
804
804
|
var _iterator__ex2g4s_2 = endpoints.t();
|
|
805
805
|
while (_iterator__ex2g4s_2.u()) {
|
|
806
806
|
var item_0 = _iterator__ex2g4s_2.v();
|
|
807
|
-
var tmp$ret$10 = import_0('.endpoint.' + item_0.
|
|
807
|
+
var tmp$ret$10 = import_0('.endpoint.' + item_0.gr_1.o1(), '*');
|
|
808
808
|
destination_1.x(tmp$ret$10);
|
|
809
809
|
}
|
|
810
810
|
var endpointImports = destination_1;
|
|
@@ -814,7 +814,7 @@ protoOf(PythonEmitter).d1b = function (endpoints, logger) {
|
|
|
814
814
|
var _iterator__ex2g4s_3 = endpoints.t();
|
|
815
815
|
while (_iterator__ex2g4s_3.u()) {
|
|
816
816
|
var item_1 = _iterator__ex2g4s_3.v();
|
|
817
|
-
var tmp$ret$13 = import_0('.client.' + item_1.
|
|
817
|
+
var tmp$ret$13 = import_0('.client.' + item_1.gr_1.o1() + 'Client', item_1.gr_1.o1() + 'Client');
|
|
818
818
|
destination_2.x(tmp$ret$13);
|
|
819
819
|
}
|
|
820
820
|
var clientImports = destination_2;
|
|
@@ -825,7 +825,7 @@ protoOf(PythonEmitter).d1b = function (endpoints, logger) {
|
|
|
825
825
|
var _iterator__ex2g4s_4 = endpoints.t();
|
|
826
826
|
while (_iterator__ex2g4s_4.u()) {
|
|
827
827
|
var item_2 = _iterator__ex2g4s_4.v();
|
|
828
|
-
var tmp$ret$16 = item_2.
|
|
828
|
+
var tmp$ret$16 = item_2.gr_1.o1();
|
|
829
829
|
destination_3.x(tmp$ret$16);
|
|
830
830
|
}
|
|
831
831
|
var endpointNames = destination_3;
|
|
@@ -839,7 +839,7 @@ protoOf(PythonEmitter).d1b = function (endpoints, logger) {
|
|
|
839
839
|
accumulator = flattenEndpointTypeRefs(acc, element_0);
|
|
840
840
|
}
|
|
841
841
|
var file = accumulator;
|
|
842
|
-
return new File(Companion_getInstance().
|
|
842
|
+
return new File(Companion_getInstance().au(this.e38_1.dt() + file.fv_1.du()), plus(plus(buildImports(this, '.wirespec'), allImports), file.gv_1));
|
|
843
843
|
};
|
|
844
844
|
function replaceReflectInNonGenericStructFields(_this__u8e3s4) {
|
|
845
845
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
@@ -847,14 +847,14 @@ function replaceReflectInNonGenericStructFields(_this__u8e3s4) {
|
|
|
847
847
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
848
848
|
var tmp = scope;
|
|
849
849
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
850
|
-
var this_0 = scope.
|
|
850
|
+
var this_0 = scope.e19_1;
|
|
851
851
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
852
852
|
// Inline function 'kotlin.apply' call
|
|
853
853
|
var this_1 = new TransformerBuilder();
|
|
854
|
-
this_1.
|
|
855
|
-
var tmp$ret$4 = this_1.
|
|
856
|
-
tmp.
|
|
857
|
-
var tmp_0 = scope.
|
|
854
|
+
this_1.y19(replaceReflectInNonGenericStructFields$lambda);
|
|
855
|
+
var tmp$ret$4 = this_1.t19();
|
|
856
|
+
tmp.e19_1 = transform(this_0, tmp$ret$4);
|
|
857
|
+
var tmp_0 = scope.e19_1;
|
|
858
858
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
859
859
|
}
|
|
860
860
|
function replaceRefinedFunctions(_this__u8e3s4, refined) {
|
|
@@ -863,14 +863,14 @@ function replaceRefinedFunctions(_this__u8e3s4, refined) {
|
|
|
863
863
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
864
864
|
var tmp = scope;
|
|
865
865
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
866
|
-
var this_0 = scope.
|
|
866
|
+
var this_0 = scope.e19_1;
|
|
867
867
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
868
868
|
// Inline function 'kotlin.apply' call
|
|
869
869
|
var this_1 = new TransformerBuilder();
|
|
870
|
-
this_1.
|
|
871
|
-
var tmp$ret$4 = this_1.
|
|
872
|
-
tmp.
|
|
873
|
-
var tmp_0 = scope.
|
|
870
|
+
this_1.y19(replaceRefinedFunctions$lambda(refined));
|
|
871
|
+
var tmp$ret$4 = this_1.t19();
|
|
872
|
+
tmp.e19_1 = transform(this_0, tmp$ret$4);
|
|
873
|
+
var tmp_0 = scope.e19_1;
|
|
874
874
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
875
875
|
}
|
|
876
876
|
function snakeCaseHandlerAndCallMethods(_this__u8e3s4) {
|
|
@@ -879,20 +879,20 @@ function snakeCaseHandlerAndCallMethods(_this__u8e3s4) {
|
|
|
879
879
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
880
880
|
var tmp = scope;
|
|
881
881
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
882
|
-
var this_0 = scope.
|
|
882
|
+
var this_0 = scope.e19_1;
|
|
883
883
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
884
884
|
// Inline function 'kotlin.apply' call
|
|
885
885
|
var this_1 = new TransformerBuilder();
|
|
886
|
-
this_1.
|
|
887
|
-
var tmp$ret$4 = this_1.
|
|
888
|
-
tmp.
|
|
889
|
-
var tmp_0 = scope.
|
|
886
|
+
this_1.y19(snakeCaseHandlerAndCallMethods$lambda);
|
|
887
|
+
var tmp$ret$4 = this_1.t19();
|
|
888
|
+
tmp.e19_1 = transform(this_0, tmp$ret$4);
|
|
889
|
+
var tmp_0 = scope.e19_1;
|
|
890
890
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
891
891
|
}
|
|
892
892
|
function splitEndpointStructsToModuleLevel(_this__u8e3s4) {
|
|
893
893
|
// Inline function 'community.flock.wirespec.compiler.core.ir.findElement' call
|
|
894
894
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
895
|
-
var tmp0 = _this__u8e3s4.
|
|
895
|
+
var tmp0 = _this__u8e3s4.hv();
|
|
896
896
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
897
897
|
var destination = ArrayList_init_$Create$_0();
|
|
898
898
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -905,7 +905,7 @@ function splitEndpointStructsToModuleLevel(_this__u8e3s4) {
|
|
|
905
905
|
var tmp$ret$0 = firstOrNull_0(destination);
|
|
906
906
|
var namespace = ensureNotNull(tmp$ret$0);
|
|
907
907
|
// Inline function 'kotlin.collections.partition' call
|
|
908
|
-
var this_0 = namespace.
|
|
908
|
+
var this_0 = namespace.mv_1;
|
|
909
909
|
var first = ArrayList_init_$Create$_0();
|
|
910
910
|
var second = ArrayList_init_$Create$_0();
|
|
911
911
|
var _iterator__ex2g4s_0 = this_0.t();
|
|
@@ -924,16 +924,16 @@ function splitEndpointStructsToModuleLevel(_this__u8e3s4) {
|
|
|
924
924
|
}
|
|
925
925
|
}
|
|
926
926
|
var _destruct__k2r9zo = new Pair(first, second);
|
|
927
|
-
var moduleElements = _destruct__k2r9zo.
|
|
928
|
-
var classElements = _destruct__k2r9zo.
|
|
929
|
-
var endpointClass = new Namespace(namespace.
|
|
930
|
-
return new File(namespace.
|
|
927
|
+
var moduleElements = _destruct__k2r9zo.af();
|
|
928
|
+
var classElements = _destruct__k2r9zo.bf();
|
|
929
|
+
var endpointClass = new Namespace(namespace.lv_1, classElements, namespace.nv_1);
|
|
930
|
+
return new File(namespace.lv_1, plus_0(moduleElements, endpointClass));
|
|
931
931
|
}
|
|
932
932
|
function flattenEndpointTypeRefs(_this__u8e3s4, endpointName) {
|
|
933
933
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
934
934
|
var scope = new TransformScope(_this__u8e3s4);
|
|
935
|
-
scope.
|
|
936
|
-
var tmp = scope.
|
|
935
|
+
scope.k19(flattenEndpointTypeRefs$lambda(endpointName));
|
|
936
|
+
var tmp = scope.e19_1;
|
|
937
937
|
return isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
938
938
|
}
|
|
939
939
|
function snakeCaseClientFunctions(_this__u8e3s4) {
|
|
@@ -942,15 +942,15 @@ function snakeCaseClientFunctions(_this__u8e3s4) {
|
|
|
942
942
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
943
943
|
var tmp = scope;
|
|
944
944
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
945
|
-
var this_0 = scope.
|
|
945
|
+
var this_0 = scope.e19_1;
|
|
946
946
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
947
947
|
// Inline function 'kotlin.apply' call
|
|
948
948
|
var this_1 = new TransformerBuilder();
|
|
949
|
-
this_1.
|
|
950
|
-
var tmp$ret$4 = this_1.
|
|
951
|
-
tmp.
|
|
952
|
-
scope.
|
|
953
|
-
var tmp_0 = scope.
|
|
949
|
+
this_1.y19(snakeCaseClientFunctions$lambda);
|
|
950
|
+
var tmp$ret$4 = this_1.t19();
|
|
951
|
+
tmp.e19_1 = transform(this_0, tmp$ret$4);
|
|
952
|
+
scope.w19(snakeCaseClientFunctions$lambda_0);
|
|
953
|
+
var tmp_0 = scope.e19_1;
|
|
954
954
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
955
955
|
}
|
|
956
956
|
function addSelfReceiverToClientFields(_this__u8e3s4) {
|
|
@@ -961,7 +961,7 @@ function addSelfReceiverToClientFields(_this__u8e3s4) {
|
|
|
961
961
|
} else {
|
|
962
962
|
// Inline function 'community.flock.wirespec.compiler.core.ir.findElement' call
|
|
963
963
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
964
|
-
var tmp0 = tmp0_safe_receiver.
|
|
964
|
+
var tmp0 = tmp0_safe_receiver.hv();
|
|
965
965
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
966
966
|
var destination = ArrayList_init_$Create$_0();
|
|
967
967
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -985,7 +985,7 @@ function addSelfReceiverToClientFields(_this__u8e3s4) {
|
|
|
985
985
|
var _iterator__ex2g4s_0 = tmp2_safe_receiver.t();
|
|
986
986
|
while (_iterator__ex2g4s_0.u()) {
|
|
987
987
|
var item = _iterator__ex2g4s_0.v();
|
|
988
|
-
var tmp$ret$5 = item.
|
|
988
|
+
var tmp$ret$5 = item.aw_1.bu();
|
|
989
989
|
destination_0.x(tmp$ret$5);
|
|
990
990
|
}
|
|
991
991
|
tmp_0 = destination_0;
|
|
@@ -997,8 +997,8 @@ function addSelfReceiverToClientFields(_this__u8e3s4) {
|
|
|
997
997
|
return _this__u8e3s4;
|
|
998
998
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
999
999
|
var scope = new TransformScope(_this__u8e3s4);
|
|
1000
|
-
scope.
|
|
1001
|
-
var tmp_1 = scope.
|
|
1000
|
+
scope.w19(addSelfReceiverToClientFields$lambda(fieldNames));
|
|
1001
|
+
var tmp_1 = scope.e19_1;
|
|
1002
1002
|
return isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
1003
1003
|
}
|
|
1004
1004
|
function replaceReflectAsTypeAny(_this__u8e3s4) {
|
|
@@ -1007,13 +1007,13 @@ function replaceReflectAsTypeAny(_this__u8e3s4) {
|
|
|
1007
1007
|
tmp = Custom_init_$Create$('type', listOf_0(Any_instance));
|
|
1008
1008
|
} else {
|
|
1009
1009
|
if (_this__u8e3s4 instanceof Nullable) {
|
|
1010
|
-
tmp = _this__u8e3s4.
|
|
1010
|
+
tmp = _this__u8e3s4.nu(replaceReflectAsTypeAny(_this__u8e3s4.vu_1));
|
|
1011
1011
|
} else {
|
|
1012
1012
|
if (_this__u8e3s4 instanceof Array_0) {
|
|
1013
|
-
tmp = _this__u8e3s4.
|
|
1013
|
+
tmp = _this__u8e3s4.nu(replaceReflectAsTypeAny(_this__u8e3s4.mu_1));
|
|
1014
1014
|
} else {
|
|
1015
1015
|
if (_this__u8e3s4 instanceof Dict) {
|
|
1016
|
-
tmp = _this__u8e3s4.
|
|
1016
|
+
tmp = _this__u8e3s4.qu(replaceReflectAsTypeAny(_this__u8e3s4.ou_1), replaceReflectAsTypeAny(_this__u8e3s4.pu_1));
|
|
1017
1017
|
} else {
|
|
1018
1018
|
tmp = _this__u8e3s4;
|
|
1019
1019
|
}
|
|
@@ -1028,12 +1028,12 @@ function replaceReflectInNonGenericStructFields$lambda(element, transformer) {
|
|
|
1028
1028
|
var tmp$ret$0;
|
|
1029
1029
|
$l$block: {
|
|
1030
1030
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1031
|
-
if (!element.
|
|
1031
|
+
if (!element.kx_1.r()) {
|
|
1032
1032
|
tmp$ret$0 = element;
|
|
1033
1033
|
break $l$block;
|
|
1034
1034
|
}
|
|
1035
1035
|
// Inline function 'kotlin.collections.map' call
|
|
1036
|
-
var this_0 = element.
|
|
1036
|
+
var this_0 = element.gx_1;
|
|
1037
1037
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1038
1038
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1039
1039
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -1041,14 +1041,14 @@ function replaceReflectInNonGenericStructFields$lambda(element, transformer) {
|
|
|
1041
1041
|
var item = _iterator__ex2g4s.v();
|
|
1042
1042
|
var tmp_0;
|
|
1043
1043
|
if (item instanceof Field) {
|
|
1044
|
-
tmp_0 = item.
|
|
1044
|
+
tmp_0 = item.kw(VOID, replaceReflectAsTypeAny(item.bw_1));
|
|
1045
1045
|
} else {
|
|
1046
1046
|
tmp_0 = item;
|
|
1047
1047
|
}
|
|
1048
1048
|
var tmp$ret$4 = tmp_0;
|
|
1049
1049
|
destination.x(tmp$ret$4);
|
|
1050
1050
|
}
|
|
1051
|
-
tmp$ret$0 = element.
|
|
1051
|
+
tmp$ret$0 = element.qx(VOID, destination);
|
|
1052
1052
|
}
|
|
1053
1053
|
tmp = tmp$ret$0;
|
|
1054
1054
|
} else {
|
|
@@ -1059,17 +1059,17 @@ function replaceReflectInNonGenericStructFields$lambda(element, transformer) {
|
|
|
1059
1059
|
}
|
|
1060
1060
|
function replaceRefinedFunctions$lambda$lambda($constraintExpr) {
|
|
1061
1061
|
return function ($this$function) {
|
|
1062
|
-
$this$function.
|
|
1063
|
-
$this$function.
|
|
1064
|
-
$this$function.
|
|
1062
|
+
$this$function.a14('self', Custom_init_$Create$(''));
|
|
1063
|
+
$this$function.x13(Boolean_instance);
|
|
1064
|
+
$this$function.d14($constraintExpr);
|
|
1065
1065
|
return Unit_instance;
|
|
1066
1066
|
};
|
|
1067
1067
|
}
|
|
1068
1068
|
function replaceRefinedFunctions$lambda$lambda_0($toStringExpr) {
|
|
1069
1069
|
return function ($this$function) {
|
|
1070
|
-
$this$function.
|
|
1071
|
-
$this$function.
|
|
1072
|
-
$this$function.
|
|
1070
|
+
$this$function.a14('self', Custom_init_$Create$(''));
|
|
1071
|
+
$this$function.x13(String_instance);
|
|
1072
|
+
$this$function.d14(new RawExpression($toStringExpr));
|
|
1073
1073
|
return Unit_instance;
|
|
1074
1074
|
};
|
|
1075
1075
|
}
|
|
@@ -1078,7 +1078,7 @@ function replaceRefinedFunctions$lambda($refined) {
|
|
|
1078
1078
|
var tmp;
|
|
1079
1079
|
if (element instanceof Struct) {
|
|
1080
1080
|
// Inline function 'kotlin.collections.map' call
|
|
1081
|
-
var this_0 = element.
|
|
1081
|
+
var this_0 = element.jx_1;
|
|
1082
1082
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1083
1083
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1084
1084
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -1087,23 +1087,23 @@ function replaceRefinedFunctions$lambda($refined) {
|
|
|
1087
1087
|
var tmp_0;
|
|
1088
1088
|
var tmp_1;
|
|
1089
1089
|
if (item instanceof Function) {
|
|
1090
|
-
tmp_1 = item.
|
|
1090
|
+
tmp_1 = item.rx_1.equals(Companion_getInstance().au('validate'));
|
|
1091
1091
|
} else {
|
|
1092
1092
|
tmp_1 = false;
|
|
1093
1093
|
}
|
|
1094
1094
|
if (tmp_1) {
|
|
1095
|
-
var constraintExpr = convertConstraint($refined.
|
|
1095
|
+
var constraintExpr = convertConstraint($refined.ns_1, new FieldCall(new VariableReference(Companion_getInstance().au('self')), Companion_getInstance().au('value')));
|
|
1096
1096
|
tmp_0 = function_0('validate', VOID, VOID, replaceRefinedFunctions$lambda$lambda(constraintExpr));
|
|
1097
1097
|
} else {
|
|
1098
1098
|
var tmp_2;
|
|
1099
1099
|
if (item instanceof Function) {
|
|
1100
|
-
tmp_2 = item.
|
|
1100
|
+
tmp_2 = item.rx_1.equals(Companion_getInstance().au('toString'));
|
|
1101
1101
|
} else {
|
|
1102
1102
|
tmp_2 = false;
|
|
1103
1103
|
}
|
|
1104
1104
|
if (tmp_2) {
|
|
1105
1105
|
var tmp_3;
|
|
1106
|
-
if ($refined.
|
|
1106
|
+
if ($refined.ns_1.d1a_1 instanceof String_0) {
|
|
1107
1107
|
tmp_3 = 'self.value';
|
|
1108
1108
|
} else {
|
|
1109
1109
|
tmp_3 = 'str(self.value)';
|
|
@@ -1117,7 +1117,7 @@ function replaceRefinedFunctions$lambda($refined) {
|
|
|
1117
1117
|
var tmp$ret$3 = tmp_0;
|
|
1118
1118
|
destination.x(tmp$ret$3);
|
|
1119
1119
|
}
|
|
1120
|
-
tmp = element.
|
|
1120
|
+
tmp = element.qx(VOID, VOID, VOID, VOID, destination);
|
|
1121
1121
|
} else {
|
|
1122
1122
|
tmp = element;
|
|
1123
1123
|
}
|
|
@@ -1130,23 +1130,23 @@ function snakeCaseHandlerAndCallMethods$lambda(element, transformer) {
|
|
|
1130
1130
|
if (element instanceof Interface) {
|
|
1131
1131
|
var tmp$ret$0;
|
|
1132
1132
|
$l$block: {
|
|
1133
|
-
if (!element.
|
|
1133
|
+
if (!element.rv_1.equals(Companion_getInstance().au('Handler')) && !element.rv_1.equals(Companion_getInstance().au('Call'))) {
|
|
1134
1134
|
tmp$ret$0 = element;
|
|
1135
1135
|
break $l$block;
|
|
1136
1136
|
}
|
|
1137
1137
|
// Inline function 'kotlin.collections.map' call
|
|
1138
|
-
var this_0 = element.
|
|
1138
|
+
var this_0 = element.sv_1;
|
|
1139
1139
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1140
1140
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1141
1141
|
var _iterator__ex2g4s = this_0.t();
|
|
1142
1142
|
while (_iterator__ex2g4s.u()) {
|
|
1143
1143
|
var item = _iterator__ex2g4s.v();
|
|
1144
1144
|
var tmp0_safe_receiver = item instanceof Function ? item : null;
|
|
1145
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1145
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.dy(Companion_getInstance().au(item.rx_1.eu()));
|
|
1146
1146
|
var tmp$ret$3 = tmp1_elvis_lhs == null ? item : tmp1_elvis_lhs;
|
|
1147
1147
|
destination.x(tmp$ret$3);
|
|
1148
1148
|
}
|
|
1149
|
-
tmp$ret$0 = element.
|
|
1149
|
+
tmp$ret$0 = element.zv(VOID, destination);
|
|
1150
1150
|
}
|
|
1151
1151
|
tmp = tmp$ret$0;
|
|
1152
1152
|
} else {
|
|
@@ -1161,17 +1161,17 @@ function flattenEndpointTypeRefs$lambda($endpointName) {
|
|
|
1161
1161
|
if (!(type instanceof Custom)) {
|
|
1162
1162
|
tmp = type;
|
|
1163
1163
|
} else {
|
|
1164
|
-
if (!startsWith(type.
|
|
1164
|
+
if (!startsWith(type.ru_1.du(), $endpointName + '.')) {
|
|
1165
1165
|
tmp = type;
|
|
1166
1166
|
} else {
|
|
1167
|
-
var suffix = removePrefix(type.
|
|
1167
|
+
var suffix = removePrefix(type.ru_1.du(), $endpointName + '.');
|
|
1168
1168
|
switch (suffix) {
|
|
1169
1169
|
case 'Call':
|
|
1170
1170
|
case 'Handler':
|
|
1171
1171
|
tmp = type;
|
|
1172
1172
|
break;
|
|
1173
1173
|
default:
|
|
1174
|
-
tmp = type.
|
|
1174
|
+
tmp = type.uu(Companion_getInstance().au(suffix));
|
|
1175
1175
|
break;
|
|
1176
1176
|
}
|
|
1177
1177
|
}
|
|
@@ -1182,7 +1182,7 @@ function flattenEndpointTypeRefs$lambda($endpointName) {
|
|
|
1182
1182
|
function snakeCaseClientFunctions$lambda(element, transformer) {
|
|
1183
1183
|
var tmp;
|
|
1184
1184
|
if (element instanceof Function) {
|
|
1185
|
-
tmp = element.
|
|
1185
|
+
tmp = element.dy(Companion_getInstance().au(element.rx_1.eu()), VOID, plus(listOf_0(new Parameter(Companion_getInstance().au('self'), Custom_init_$Create$(''))), element.tx_1));
|
|
1186
1186
|
} else {
|
|
1187
1187
|
tmp = element;
|
|
1188
1188
|
}
|
|
@@ -1192,19 +1192,19 @@ function snakeCaseClientFunctions$lambda(element, transformer) {
|
|
|
1192
1192
|
function snakeCaseClientFunctions$lambda_0(stmt, tr) {
|
|
1193
1193
|
var tmp;
|
|
1194
1194
|
if (stmt instanceof FunctionCall) {
|
|
1195
|
-
var nameStr = stmt.
|
|
1196
|
-
var newName = contains(nameStr, '.') ? stmt.
|
|
1197
|
-
var tmp1_safe_receiver = stmt.
|
|
1195
|
+
var nameStr = stmt.qy_1.bu();
|
|
1196
|
+
var newName = contains(nameStr, '.') ? stmt.qy_1 : Companion_getInstance().au(Companion_getInstance().au(nameStr).eu());
|
|
1197
|
+
var tmp1_safe_receiver = stmt.oy_1;
|
|
1198
1198
|
var tmp_0;
|
|
1199
1199
|
if (tmp1_safe_receiver == null) {
|
|
1200
1200
|
tmp_0 = null;
|
|
1201
1201
|
} else {
|
|
1202
1202
|
// Inline function 'kotlin.let' call
|
|
1203
|
-
tmp_0 = tr.
|
|
1203
|
+
tmp_0 = tr.z18(tmp1_safe_receiver);
|
|
1204
1204
|
}
|
|
1205
1205
|
var tmp2_receiver = tmp_0;
|
|
1206
1206
|
// Inline function 'kotlin.collections.mapValues' call
|
|
1207
|
-
var this_0 = stmt.
|
|
1207
|
+
var this_0 = stmt.ry_1;
|
|
1208
1208
|
// Inline function 'kotlin.collections.mapValuesTo' call
|
|
1209
1209
|
var destination = LinkedHashMap_init_$Create$(mapCapacity(this_0.c1()));
|
|
1210
1210
|
// Inline function 'kotlin.collections.associateByTo' call
|
|
@@ -1214,10 +1214,10 @@ function snakeCaseClientFunctions$lambda_0(stmt, tr) {
|
|
|
1214
1214
|
var tmp_1 = element.n1();
|
|
1215
1215
|
// Inline function 'kotlin.collections.component2' call
|
|
1216
1216
|
var v = element.o1();
|
|
1217
|
-
var tmp$ret$6 = tr.
|
|
1218
|
-
destination.
|
|
1217
|
+
var tmp$ret$6 = tr.z18(v);
|
|
1218
|
+
destination.w2(tmp_1, tmp$ret$6);
|
|
1219
1219
|
}
|
|
1220
|
-
var tmp4_isAwait = !(stmt.
|
|
1220
|
+
var tmp4_isAwait = !(stmt.oy_1 == null);
|
|
1221
1221
|
tmp = new FunctionCall(tmp2_receiver, VOID, newName, destination, tmp4_isAwait);
|
|
1222
1222
|
} else {
|
|
1223
1223
|
tmp = transformChildren(stmt, tr);
|
|
@@ -1229,23 +1229,23 @@ function addSelfReceiverToClientFields$lambda($fieldNames) {
|
|
|
1229
1229
|
var tmp;
|
|
1230
1230
|
var tmp_0;
|
|
1231
1231
|
if (stmt instanceof FieldCall) {
|
|
1232
|
-
tmp_0 = (stmt.
|
|
1232
|
+
tmp_0 = (stmt.kz_1 == null && $fieldNames.i1(stmt.lz_1.bu()));
|
|
1233
1233
|
} else {
|
|
1234
1234
|
tmp_0 = false;
|
|
1235
1235
|
}
|
|
1236
1236
|
if (tmp_0) {
|
|
1237
|
-
tmp = new FieldCall(new VariableReference(Companion_getInstance().
|
|
1237
|
+
tmp = new FieldCall(new VariableReference(Companion_getInstance().au('self')), stmt.lz_1);
|
|
1238
1238
|
} else {
|
|
1239
1239
|
if (stmt instanceof FieldCall) {
|
|
1240
|
-
var tmp1_safe_receiver = stmt.
|
|
1240
|
+
var tmp1_safe_receiver = stmt.kz_1;
|
|
1241
1241
|
var tmp_1;
|
|
1242
1242
|
if (tmp1_safe_receiver == null) {
|
|
1243
1243
|
tmp_1 = null;
|
|
1244
1244
|
} else {
|
|
1245
1245
|
// Inline function 'kotlin.let' call
|
|
1246
|
-
tmp_1 = tr.
|
|
1246
|
+
tmp_1 = tr.z18(tmp1_safe_receiver);
|
|
1247
1247
|
}
|
|
1248
|
-
tmp = new FieldCall(tmp_1, stmt.
|
|
1248
|
+
tmp = new FieldCall(tmp_1, stmt.lz_1);
|
|
1249
1249
|
} else {
|
|
1250
1250
|
tmp = transformChildren(stmt, tr);
|
|
1251
1251
|
}
|
|
@@ -1254,10 +1254,10 @@ function addSelfReceiverToClientFields$lambda($fieldNames) {
|
|
|
1254
1254
|
};
|
|
1255
1255
|
}
|
|
1256
1256
|
//region block: post-declaration
|
|
1257
|
-
protoOf(PythonEmitter).
|
|
1258
|
-
protoOf(PythonEmitter).
|
|
1259
|
-
protoOf(PythonEmitter).
|
|
1260
|
-
protoOf(PythonEmitter).
|
|
1257
|
+
protoOf(PythonEmitter).i1b = get_extensions;
|
|
1258
|
+
protoOf(PythonEmitter).uo = emit_1;
|
|
1259
|
+
protoOf(PythonEmitter).k1b = beforeGenerate;
|
|
1260
|
+
protoOf(PythonEmitter).wp = get_supportsDefaults;
|
|
1261
1261
|
//endregion
|
|
1262
1262
|
//region block: exports
|
|
1263
1263
|
export {
|