@flock/wirespec 0.20.2 → 0.21.1
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/clikt-clikt-mordant.mjs +79 -79
- package/clikt-clikt.mjs +1329 -1329
- package/clikt-clikt.mjs.map +1 -1
- package/colormath-root-colormath.mjs +433 -433
- package/kotlin-kotlin-stdlib.mjs +15 -15
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +10144 -10144
- package/kotlin-rgxgen.mjs +1760 -1760
- package/kotlinx-io-kotlinx-io-core.mjs +404 -404
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +1810 -1810
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1488 -1488
- package/mordant-mordant.mjs +1198 -1198
- package/package.json +1 -1
- package/wirespec-src-compiler-core.mjs +1652 -1139
- package/wirespec-src-compiler-core.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-java.mjs +206 -191
- package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-kotlin.mjs +153 -138
- package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-python.mjs +182 -153
- package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-rust.mjs +439 -379
- package/wirespec-src-compiler-emitters-rust.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-scala.mjs +175 -160
- package/wirespec-src-compiler-emitters-scala.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-typescript.mjs +268 -224
- package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-wirespec.mjs +102 -81
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-ir.mjs +3704 -3619
- package/wirespec-src-compiler-ir.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +308 -227
- package/wirespec-src-compiler-lib.mjs.map +1 -1
- package/wirespec-src-converter-avro.mjs +503 -503
- package/wirespec-src-converter-openapi.mjs +581 -569
- package/wirespec-src-converter-openapi.mjs.map +1 -1
- package/wirespec-src-ide-lsp.mjs +1352 -1352
- package/wirespec-src-plugin-arguments.mjs +136 -136
- package/wirespec-src-plugin-cli.mjs +85 -85
- package/wirespec-src-plugin-npm.d.mts +15 -0
- package/wirespec-src-plugin-npm.mjs +26 -26
- package/wirespec-src-tools-generator.mjs +29 -24
- package/wirespec-src-tools-generator.mjs.map +1 -1
|
@@ -113,6 +113,7 @@ import {
|
|
|
113
113
|
convert17zcptkz4mhr4 as convert_2,
|
|
114
114
|
convert32tuiui3czihh as convert_3,
|
|
115
115
|
convert1cn4bolzoed8c as convert_4,
|
|
116
|
+
convert3ewo9inue7gua as convert_5,
|
|
116
117
|
emitEndpointClient1meajc90wf3el as emitEndpointClient,
|
|
117
118
|
emitClient32kfwzg2hm5vj as emitClient,
|
|
118
119
|
get_extensions31c4or738wbxz as get_extensions,
|
|
@@ -159,7 +160,7 @@ initMetadataForClass(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', VOID, V
|
|
|
159
160
|
initMetadataForClass(PythonIrEmitter, 'PythonIrEmitter', PythonIrEmitter, VOID, [IrEmitter]);
|
|
160
161
|
//endregion
|
|
161
162
|
function _get_sanitizationConfig__sns434($this) {
|
|
162
|
-
var tmp0 = $this.
|
|
163
|
+
var tmp0 = $this.p1y_1;
|
|
163
164
|
var tmp = KProperty1;
|
|
164
165
|
// Inline function 'kotlin.getValue' call
|
|
165
166
|
getPropertyCallableRef('sanitizationConfig', 1, tmp, PythonIrEmitter$_get_sanitizationConfig_$ref_1q5eai(), null);
|
|
@@ -176,7 +177,7 @@ function sanitize($this, _this__u8e3s4) {
|
|
|
176
177
|
var item = _iterator__ex2g4s.v();
|
|
177
178
|
var _unary__edvuaz = index;
|
|
178
179
|
index = _unary__edvuaz + 1 | 0;
|
|
179
|
-
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.
|
|
180
|
+
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.dr(item) : item;
|
|
180
181
|
destination.x(tmp$ret$0);
|
|
181
182
|
}
|
|
182
183
|
// Inline function 'kotlin.text.filter' call
|
|
@@ -222,7 +223,7 @@ function sanitize($this, _this__u8e3s4) {
|
|
|
222
223
|
return tmp_2;
|
|
223
224
|
}
|
|
224
225
|
function sanitizeKeywords($this, _this__u8e3s4) {
|
|
225
|
-
return Companion_getInstance_0().
|
|
226
|
+
return Companion_getInstance_0().v1x().v1(_this__u8e3s4) ? '_' + _this__u8e3s4 : _this__u8e3s4;
|
|
226
227
|
}
|
|
227
228
|
function sanitizeEnum($this, _this__u8e3s4) {
|
|
228
229
|
// Inline function 'kotlin.let' call
|
|
@@ -248,10 +249,10 @@ function buildImports($this, wirespecPath) {
|
|
|
248
249
|
}
|
|
249
250
|
function Companion() {
|
|
250
251
|
Companion_instance_2 = this;
|
|
251
|
-
this.
|
|
252
|
+
this.r1y_1 = PythonGenerator_getInstance();
|
|
252
253
|
}
|
|
253
|
-
protoOf(Companion).
|
|
254
|
-
return this.
|
|
254
|
+
protoOf(Companion).v1x = function () {
|
|
255
|
+
return this.r1y_1.a1x_1;
|
|
255
256
|
};
|
|
256
257
|
var Companion_instance_2;
|
|
257
258
|
function Companion_getInstance_0() {
|
|
@@ -260,16 +261,16 @@ function Companion_getInstance_0() {
|
|
|
260
261
|
return Companion_instance_2;
|
|
261
262
|
}
|
|
262
263
|
function sam$kotlin_Comparator$0(function_0) {
|
|
263
|
-
this.
|
|
264
|
+
this.s1y_1 = function_0;
|
|
264
265
|
}
|
|
265
266
|
protoOf(sam$kotlin_Comparator$0).ud = function (a, b) {
|
|
266
|
-
return this.
|
|
267
|
+
return this.s1y_1(a, b);
|
|
267
268
|
};
|
|
268
269
|
protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
|
|
269
270
|
return this.ud(a, b);
|
|
270
271
|
};
|
|
271
272
|
protoOf(sam$kotlin_Comparator$0).m3 = function () {
|
|
272
|
-
return this.
|
|
273
|
+
return this.s1y_1;
|
|
273
274
|
};
|
|
274
275
|
protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
275
276
|
var tmp;
|
|
@@ -293,11 +294,11 @@ function PythonIrEmitter$sanitizationConfig$delegate$lambda$lambda(it) {
|
|
|
293
294
|
return '_' + it;
|
|
294
295
|
}
|
|
295
296
|
function PythonIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(name) {
|
|
296
|
-
var sanitized = name.
|
|
297
|
+
var sanitized = name.f1h_1.b1() > 1 ? name.t1m() : name.g1j();
|
|
297
298
|
return new Name(listOf_0(sanitized));
|
|
298
299
|
}
|
|
299
300
|
function PythonIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(name) {
|
|
300
|
-
return new Name(listOf_0(name.
|
|
301
|
+
return new Name(listOf_0(name.t1m()));
|
|
301
302
|
}
|
|
302
303
|
function PythonIrEmitter$sanitizationConfig$delegate$lambda$lambda_2(it) {
|
|
303
304
|
return it;
|
|
@@ -306,9 +307,9 @@ function PythonIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
306
307
|
return function (stmt, tr) {
|
|
307
308
|
var tmp;
|
|
308
309
|
if (stmt instanceof ConstructorStatement) {
|
|
309
|
-
var tmp_0 = tr.
|
|
310
|
+
var tmp_0 = tr.s1v(stmt.y1n_1);
|
|
310
311
|
// Inline function 'kotlin.collections.map' call
|
|
311
|
-
var this_0 = stmt.
|
|
312
|
+
var this_0 = stmt.z1n_1;
|
|
312
313
|
// Inline function 'kotlin.collections.mapTo' call
|
|
313
314
|
var destination = ArrayList_init_$Create$(this_0.b1());
|
|
314
315
|
// Inline function 'kotlin.collections.iterator' call
|
|
@@ -319,7 +320,7 @@ function PythonIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
319
320
|
var k = item.l1();
|
|
320
321
|
// Inline function 'kotlin.collections.component2' call
|
|
321
322
|
var v = item.m1();
|
|
322
|
-
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.v1v(v));
|
|
323
324
|
destination.x(tmp$ret$3);
|
|
324
325
|
}
|
|
325
326
|
tmp = new ConstructorStatement(tmp_0, toMap(destination));
|
|
@@ -331,7 +332,7 @@ function PythonIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
331
332
|
}
|
|
332
333
|
function PythonIrEmitter$sanitizationConfig$delegate$lambda(this$0) {
|
|
333
334
|
return function () {
|
|
334
|
-
var tmp = Companion_getInstance_0().
|
|
335
|
+
var tmp = Companion_getInstance_0().v1x();
|
|
335
336
|
var tmp_0 = PythonIrEmitter$sanitizationConfig$delegate$lambda$lambda;
|
|
336
337
|
var tmp_1 = PythonIrEmitter$sanitizationConfig$delegate$lambda$lambda_0;
|
|
337
338
|
var tmp_2 = PythonIrEmitter$sanitizationConfig$delegate$lambda$lambda_1;
|
|
@@ -351,7 +352,7 @@ function PythonIrEmitter$emit$lambda(a, b) {
|
|
|
351
352
|
return compareValues(tmp, tmp$ret$1);
|
|
352
353
|
}
|
|
353
354
|
function emit$emitInitImport(this$0, def) {
|
|
354
|
-
return import_0('.' + sanitize(this$0, def.
|
|
355
|
+
return import_0('.' + sanitize(this$0, def.mr()), sanitize(this$0, def.mr()));
|
|
355
356
|
}
|
|
356
357
|
function PythonIrEmitter$emitGenerator$lambda(it) {
|
|
357
358
|
return startsWith(it, 'Wirespec.') || it === 'Wirespec';
|
|
@@ -370,17 +371,17 @@ function PythonIrEmitter$emitGenerator$lambda_2($generatorOwnName, $generatorRef
|
|
|
370
371
|
var tmp_0;
|
|
371
372
|
var tmp_1;
|
|
372
373
|
if (expr instanceof RawExpression) {
|
|
373
|
-
tmp_1 = endsWith(expr.
|
|
374
|
+
tmp_1 = endsWith(expr.r1q_1, 'Generator');
|
|
374
375
|
} else {
|
|
375
376
|
tmp_1 = false;
|
|
376
377
|
}
|
|
377
378
|
if (tmp_1) {
|
|
378
|
-
tmp_0 = !(expr.
|
|
379
|
+
tmp_0 = !(expr.r1q_1 === $generatorOwnName);
|
|
379
380
|
} else {
|
|
380
381
|
tmp_0 = false;
|
|
381
382
|
}
|
|
382
383
|
if (tmp_0) {
|
|
383
|
-
$generatorRefs.x(expr.
|
|
384
|
+
$generatorRefs.x(expr.r1q_1);
|
|
384
385
|
tmp = Unit_instance;
|
|
385
386
|
}
|
|
386
387
|
return transformChildren_0(expr, t);
|
|
@@ -393,43 +394,43 @@ function PythonIrEmitter$emit$lambda_0(this$0) {
|
|
|
393
394
|
}
|
|
394
395
|
function PythonIrEmitter(packageName, emitShared) {
|
|
395
396
|
Companion_getInstance_0();
|
|
396
|
-
packageName = packageName === VOID ? Companion_instance_0.
|
|
397
|
+
packageName = packageName === VOID ? Companion_instance_0.is('community.flock.wirespec.generated') : packageName;
|
|
397
398
|
emitShared = emitShared === VOID ? Companion_instance_1.fp() : emitShared;
|
|
398
|
-
this.
|
|
399
|
-
this.
|
|
400
|
-
this.
|
|
401
|
-
this.
|
|
399
|
+
this.l1y_1 = packageName;
|
|
400
|
+
this.m1y_1 = emitShared;
|
|
401
|
+
this.n1y_1 = PythonGenerator_getInstance();
|
|
402
|
+
this.o1y_1 = FileExtension_Python_getInstance();
|
|
402
403
|
var tmp = this;
|
|
403
|
-
tmp.
|
|
404
|
-
this.
|
|
404
|
+
tmp.p1y_1 = lazy(PythonIrEmitter$sanitizationConfig$delegate$lambda(this));
|
|
405
|
+
this.q1y_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";
|
|
405
406
|
}
|
|
406
|
-
protoOf(PythonIrEmitter).
|
|
407
|
-
return this.
|
|
407
|
+
protoOf(PythonIrEmitter).n1w = function () {
|
|
408
|
+
return this.n1y_1;
|
|
408
409
|
};
|
|
409
|
-
protoOf(PythonIrEmitter).
|
|
410
|
-
return this.
|
|
410
|
+
protoOf(PythonIrEmitter).kr = function () {
|
|
411
|
+
return this.o1y_1;
|
|
411
412
|
};
|
|
412
|
-
protoOf(PythonIrEmitter).
|
|
413
|
-
var source = replaceReflectInNonGenericStructFields(convert(Companion_instance_0.
|
|
413
|
+
protoOf(PythonIrEmitter).r1w = function () {
|
|
414
|
+
var source = replaceReflectInNonGenericStructFields(convert(Companion_instance_0.is('shared')));
|
|
414
415
|
var tmp;
|
|
415
|
-
if (this.
|
|
416
|
-
tmp = new File(Companion_getInstance().
|
|
416
|
+
if (this.m1y_1.gp_1) {
|
|
417
|
+
tmp = new File(Companion_getInstance().h1h(this.l1y_1.ls() + 'wirespec'), listOf_0(raw(this.q1y_1 + PythonGenerator_getInstance().o1w(source))));
|
|
417
418
|
} else {
|
|
418
419
|
tmp = null;
|
|
419
420
|
}
|
|
420
421
|
return tmp;
|
|
421
422
|
};
|
|
422
|
-
protoOf(PythonIrEmitter).
|
|
423
|
+
protoOf(PythonIrEmitter).q1w = function (module_0, logger) {
|
|
423
424
|
// Inline function 'kotlin.collections.sortedBy' call
|
|
424
|
-
var this_0 = new NonEmptyList(module_0.
|
|
425
|
+
var this_0 = new NonEmptyList(module_0.gr_1);
|
|
425
426
|
// Inline function 'kotlin.comparisons.compareBy' call
|
|
426
427
|
var tmp = PythonIrEmitter$emit$lambda;
|
|
427
428
|
var tmp$ret$0 = new sam$kotlin_Comparator$0(tmp);
|
|
428
429
|
var tmp$ret$1 = sortedWith(this_0, tmp$ret$0);
|
|
429
430
|
var tmp_0 = toNonEmptyListOrNull(tmp$ret$1);
|
|
430
431
|
var statements = ensureNotNull(tmp_0 == null ? null : new NonEmptyList(tmp_0)).xm_1;
|
|
431
|
-
var emitted = emit.call(this, module_0.
|
|
432
|
-
var tmp0 = new NonEmptyList(module_0.
|
|
432
|
+
var emitted = emit.call(this, module_0.tv(VOID, statements), logger);
|
|
433
|
+
var tmp0 = new NonEmptyList(module_0.gr_1);
|
|
433
434
|
var tmp$ret$2;
|
|
434
435
|
$l$block_0: {
|
|
435
436
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -454,7 +455,7 @@ protoOf(PythonIrEmitter).g1w = function (module_0, logger) {
|
|
|
454
455
|
tmp$ret$2 = false;
|
|
455
456
|
}
|
|
456
457
|
var hasEndpoints = tmp$ret$2;
|
|
457
|
-
var tmp_2 = Companion_getInstance().
|
|
458
|
+
var tmp_2 = Companion_getInstance().h1h(this.l1y_1.ls() + '__init__');
|
|
458
459
|
// Inline function 'kotlin.collections.buildList' call
|
|
459
460
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
460
461
|
// Inline function 'kotlin.apply' call
|
|
@@ -467,9 +468,9 @@ protoOf(PythonIrEmitter).g1w = function (module_0, logger) {
|
|
|
467
468
|
this_1.x(import_0('.', 'wirespec'));
|
|
468
469
|
var tmp$ret$7 = this_1.p5();
|
|
469
470
|
var init = new File(tmp_2, tmp$ret$7);
|
|
470
|
-
var tmp_3 = Companion_getInstance().
|
|
471
|
+
var tmp_3 = Companion_getInstance().h1h(this.l1y_1.ls() + 'endpoint/' + '__init__');
|
|
471
472
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
472
|
-
var tmp0_0 = new NonEmptyList(module_0.
|
|
473
|
+
var tmp0_0 = new NonEmptyList(module_0.gr_1);
|
|
473
474
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
474
475
|
var destination = ArrayList_init_$Create$_0();
|
|
475
476
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
@@ -489,9 +490,9 @@ protoOf(PythonIrEmitter).g1w = function (module_0, logger) {
|
|
|
489
490
|
destination_0.x(tmp$ret$10);
|
|
490
491
|
}
|
|
491
492
|
var initEndpoint = new File(tmp_3, destination_0);
|
|
492
|
-
var tmp_4 = Companion_getInstance().
|
|
493
|
+
var tmp_4 = Companion_getInstance().h1h(this.l1y_1.ls() + 'model/' + '__init__');
|
|
493
494
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
494
|
-
var tmp0_1 = new NonEmptyList(module_0.
|
|
495
|
+
var tmp0_1 = new NonEmptyList(module_0.gr_1);
|
|
495
496
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
496
497
|
var destination_1 = ArrayList_init_$Create$_0();
|
|
497
498
|
var _iterator__ex2g4s_2 = tmp0_1.t();
|
|
@@ -511,8 +512,8 @@ protoOf(PythonIrEmitter).g1w = function (module_0, logger) {
|
|
|
511
512
|
destination_2.x(tmp$ret$15);
|
|
512
513
|
}
|
|
513
514
|
var initModel = new File(tmp_4, destination_2);
|
|
514
|
-
var initClient = hasEndpoints ? listOf_0(new File(Companion_getInstance().
|
|
515
|
-
var tmp0_2 = dropLast(split(this.
|
|
515
|
+
var initClient = hasEndpoints ? listOf_0(new File(Companion_getInstance().h1h(this.l1y_1.ls() + 'client/' + '__init__'), emptyList())) : emptyList();
|
|
516
|
+
var tmp0_2 = dropLast(split(this.l1y_1.js_1, ['.']), 1);
|
|
516
517
|
var tmp$ret$18;
|
|
517
518
|
$l$block_1: {
|
|
518
519
|
// Inline function 'kotlin.collections.runningFold' call
|
|
@@ -549,17 +550,17 @@ protoOf(PythonIrEmitter).g1w = function (module_0, logger) {
|
|
|
549
550
|
var _iterator__ex2g4s_5 = this_3.t();
|
|
550
551
|
while (_iterator__ex2g4s_5.u()) {
|
|
551
552
|
var item_1 = _iterator__ex2g4s_5.v();
|
|
552
|
-
var tmp$ret$23 = new File(Companion_getInstance().
|
|
553
|
+
var tmp$ret$23 = new File(Companion_getInstance().h1h(item_1 + '/__init__'), emptyList());
|
|
553
554
|
destination_3.x(tmp$ret$23);
|
|
554
555
|
}
|
|
555
556
|
var parentInits = destination_3;
|
|
556
|
-
return this.
|
|
557
|
+
return this.m1y_1.gp_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);
|
|
557
558
|
};
|
|
558
|
-
protoOf(PythonIrEmitter).
|
|
559
|
+
protoOf(PythonIrEmitter).lr = function (definition, module_0, logger) {
|
|
559
560
|
var file = emit_0.call(this, definition, module_0, logger);
|
|
560
|
-
return placeInModule(prependImports(file, buildImports(this, '..wirespec')), this.
|
|
561
|
+
return placeInModule(prependImports(file, buildImports(this, '..wirespec')), this.l1y_1, definition);
|
|
561
562
|
};
|
|
562
|
-
protoOf(PythonIrEmitter).
|
|
563
|
+
protoOf(PythonIrEmitter).w1w = function (definition, module_0) {
|
|
563
564
|
var tmp;
|
|
564
565
|
if (definition instanceof Type) {
|
|
565
566
|
tmp = convertToGenerator_2(definition, module_0);
|
|
@@ -580,7 +581,7 @@ protoOf(PythonIrEmitter).m1w = function (definition, module_0) {
|
|
|
580
581
|
}
|
|
581
582
|
var generatorFile = tmp;
|
|
582
583
|
var sanitized = sanitizeNames(generatorFile, _get_sanitizationConfig__sns434(this));
|
|
583
|
-
var generatorOwnName = definition.
|
|
584
|
+
var generatorOwnName = definition.mr().m1() + 'Generator';
|
|
584
585
|
var tmp_0 = asSequence(collectCustomTypeNames(sanitized));
|
|
585
586
|
var tmp_1 = filterNot(tmp_0, PythonIrEmitter$emitGenerator$lambda);
|
|
586
587
|
var tmp_2 = filterNot(tmp_1, PythonIrEmitter$emitGenerator$lambda_0(generatorOwnName));
|
|
@@ -589,8 +590,8 @@ protoOf(PythonIrEmitter).m1w = function (definition, module_0) {
|
|
|
589
590
|
var generatorRefs = LinkedHashSet_init_$Create$();
|
|
590
591
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
591
592
|
var scope = new TransformScope(sanitized);
|
|
592
|
-
scope.
|
|
593
|
-
var tmp_3 = scope.
|
|
593
|
+
scope.i1w(PythonIrEmitter$emitGenerator$lambda_2(generatorOwnName, generatorRefs));
|
|
594
|
+
var tmp_3 = scope.a1w_1;
|
|
594
595
|
isInterface(tmp_3, Element) || THROW_CCE();
|
|
595
596
|
// Inline function 'kotlin.collections.filter' call
|
|
596
597
|
// Inline function 'kotlin.collections.filterTo' call
|
|
@@ -633,9 +634,9 @@ protoOf(PythonIrEmitter).m1w = function (definition, module_0) {
|
|
|
633
634
|
destination_2.x(tmp$ret$12);
|
|
634
635
|
}
|
|
635
636
|
var modelImports = destination_2;
|
|
636
|
-
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.l1y_1, 'generator');
|
|
637
638
|
};
|
|
638
|
-
protoOf(PythonIrEmitter).
|
|
639
|
+
protoOf(PythonIrEmitter).cs = function (type, module_0) {
|
|
639
640
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
640
641
|
var this_0 = importReferences(type);
|
|
641
642
|
var set = HashSet_init_$Create$();
|
|
@@ -643,7 +644,7 @@ protoOf(PythonIrEmitter).vr = function (type, module_0) {
|
|
|
643
644
|
var _iterator__ex2g4s = this_0.t();
|
|
644
645
|
while (_iterator__ex2g4s.u()) {
|
|
645
646
|
var e = _iterator__ex2g4s.v();
|
|
646
|
-
var key = e.
|
|
647
|
+
var key = e.lv_1;
|
|
647
648
|
if (set.x(key)) {
|
|
648
649
|
list.x(e);
|
|
649
650
|
}
|
|
@@ -654,18 +655,18 @@ protoOf(PythonIrEmitter).vr = function (type, module_0) {
|
|
|
654
655
|
var _iterator__ex2g4s_0 = list.t();
|
|
655
656
|
while (_iterator__ex2g4s_0.u()) {
|
|
656
657
|
var item = _iterator__ex2g4s_0.v();
|
|
657
|
-
var tmp$ret$2 = import_0('.' + item.
|
|
658
|
+
var tmp$ret$2 = import_0('.' + item.lv_1, item.lv_1);
|
|
658
659
|
destination.x(tmp$ret$2);
|
|
659
660
|
}
|
|
660
661
|
var typeImports = destination;
|
|
661
662
|
// Inline function 'kotlin.collections.map' call
|
|
662
|
-
var this_1 = type.
|
|
663
|
+
var this_1 = type.fq_1.kp_1;
|
|
663
664
|
// Inline function 'kotlin.collections.mapTo' call
|
|
664
665
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
|
|
665
666
|
var _iterator__ex2g4s_1 = this_1.t();
|
|
666
667
|
while (_iterator__ex2g4s_1.u()) {
|
|
667
668
|
var item_0 = _iterator__ex2g4s_1.v();
|
|
668
|
-
var tmp$ret$5 = item_0.
|
|
669
|
+
var tmp$ret$5 = item_0.sp_1.m1();
|
|
669
670
|
destination_0.x(tmp$ret$5);
|
|
670
671
|
}
|
|
671
672
|
var fieldNames = toSet(destination_0);
|
|
@@ -681,17 +682,17 @@ protoOf(PythonIrEmitter).vr = function (type, module_0) {
|
|
|
681
682
|
var tmp$ret$10 = tmp_0;
|
|
682
683
|
return prependImports(tmp, tmp$ret$10);
|
|
683
684
|
};
|
|
684
|
-
protoOf(PythonIrEmitter).
|
|
685
|
+
protoOf(PythonIrEmitter).as = function (enum_0, module_0) {
|
|
685
686
|
var tmp = convert_0(enum_0);
|
|
686
687
|
return sanitizeNames(sanitizeEnumEntries(tmp, PythonIrEmitter$emit$lambda_0(this)), _get_sanitizationConfig__sns434(this));
|
|
687
688
|
};
|
|
688
|
-
protoOf(PythonIrEmitter).
|
|
689
|
+
protoOf(PythonIrEmitter).qr = function (union) {
|
|
689
690
|
return sanitizeNames(convert_1(union), _get_sanitizationConfig__sns434(this));
|
|
690
691
|
};
|
|
691
|
-
protoOf(PythonIrEmitter).
|
|
692
|
+
protoOf(PythonIrEmitter).vr = function (refined) {
|
|
692
693
|
return sanitizeNames(replaceRefinedFunctions(convert_2(refined), refined), _get_sanitizationConfig__sns434(this));
|
|
693
694
|
};
|
|
694
|
-
protoOf(PythonIrEmitter).
|
|
695
|
+
protoOf(PythonIrEmitter).bs = function (endpoint) {
|
|
695
696
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
696
697
|
var this_0 = importReferences(endpoint);
|
|
697
698
|
var set = HashSet_init_$Create$();
|
|
@@ -699,7 +700,7 @@ protoOf(PythonIrEmitter).ur = function (endpoint) {
|
|
|
699
700
|
var _iterator__ex2g4s = this_0.t();
|
|
700
701
|
while (_iterator__ex2g4s.u()) {
|
|
701
702
|
var e = _iterator__ex2g4s.v();
|
|
702
|
-
var key = e.
|
|
703
|
+
var key = e.lv_1;
|
|
703
704
|
if (set.x(key)) {
|
|
704
705
|
list.x(e);
|
|
705
706
|
}
|
|
@@ -710,19 +711,47 @@ protoOf(PythonIrEmitter).ur = function (endpoint) {
|
|
|
710
711
|
var _iterator__ex2g4s_0 = list.t();
|
|
711
712
|
while (_iterator__ex2g4s_0.u()) {
|
|
712
713
|
var item = _iterator__ex2g4s_0.v();
|
|
713
|
-
var tmp$ret$2 = import_0('..model.' + item.
|
|
714
|
+
var tmp$ret$2 = import_0('..model.' + item.lv_1, item.lv_1);
|
|
714
715
|
destination.x(tmp$ret$2);
|
|
715
716
|
}
|
|
716
717
|
var endpointImports = destination;
|
|
717
718
|
// Inline function 'kotlin.let' call
|
|
718
719
|
var it = splitEndpointStructsToModuleLevel(convert_3(endpoint));
|
|
719
|
-
var tmp$ret$6 = it.
|
|
720
|
+
var tmp$ret$6 = it.g1o(VOID, plus(endpointImports, it.d1o_1));
|
|
720
721
|
return sanitizeNames(snakeCaseHandlerAndCallMethods(tmp$ret$6), _get_sanitizationConfig__sns434(this));
|
|
721
722
|
};
|
|
722
|
-
protoOf(PythonIrEmitter).
|
|
723
|
+
protoOf(PythonIrEmitter).pr = function (channel) {
|
|
723
724
|
return sanitizeNames(convert_4(channel), _get_sanitizationConfig__sns434(this));
|
|
724
725
|
};
|
|
725
|
-
protoOf(PythonIrEmitter).
|
|
726
|
+
protoOf(PythonIrEmitter).or = function (rpc) {
|
|
727
|
+
// Inline function 'kotlin.collections.distinctBy' call
|
|
728
|
+
var this_0 = importReferences(rpc);
|
|
729
|
+
var set = HashSet_init_$Create$();
|
|
730
|
+
var list = ArrayList_init_$Create$_0();
|
|
731
|
+
var _iterator__ex2g4s = this_0.t();
|
|
732
|
+
while (_iterator__ex2g4s.u()) {
|
|
733
|
+
var e = _iterator__ex2g4s.v();
|
|
734
|
+
var key = e.lv_1;
|
|
735
|
+
if (set.x(key)) {
|
|
736
|
+
list.x(e);
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
// Inline function 'kotlin.collections.map' call
|
|
740
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
741
|
+
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(list, 10));
|
|
742
|
+
var _iterator__ex2g4s_0 = list.t();
|
|
743
|
+
while (_iterator__ex2g4s_0.u()) {
|
|
744
|
+
var item = _iterator__ex2g4s_0.v();
|
|
745
|
+
var tmp$ret$2 = import_0('..model.' + item.lv_1, item.lv_1);
|
|
746
|
+
destination.x(tmp$ret$2);
|
|
747
|
+
}
|
|
748
|
+
var rpcImports = destination;
|
|
749
|
+
// Inline function 'kotlin.let' call
|
|
750
|
+
var it = convert_5(rpc);
|
|
751
|
+
var tmp$ret$6 = it.g1o(VOID, plus(rpcImports, it.d1o_1));
|
|
752
|
+
return sanitizeNames(tmp$ret$6, _get_sanitizationConfig__sns434(this));
|
|
753
|
+
};
|
|
754
|
+
protoOf(PythonIrEmitter).v1w = function (endpoint) {
|
|
726
755
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
727
756
|
var this_0 = importReferences(endpoint);
|
|
728
757
|
var set = HashSet_init_$Create$();
|
|
@@ -730,7 +759,7 @@ protoOf(PythonIrEmitter).l1w = function (endpoint) {
|
|
|
730
759
|
var _iterator__ex2g4s = this_0.t();
|
|
731
760
|
while (_iterator__ex2g4s.u()) {
|
|
732
761
|
var e = _iterator__ex2g4s.v();
|
|
733
|
-
var key = e.
|
|
762
|
+
var key = e.lv_1;
|
|
734
763
|
if (set.x(key)) {
|
|
735
764
|
list.x(e);
|
|
736
765
|
}
|
|
@@ -741,17 +770,17 @@ protoOf(PythonIrEmitter).l1w = function (endpoint) {
|
|
|
741
770
|
var _iterator__ex2g4s_0 = list.t();
|
|
742
771
|
while (_iterator__ex2g4s_0.u()) {
|
|
743
772
|
var item = _iterator__ex2g4s_0.v();
|
|
744
|
-
var tmp$ret$2 = import_0('..model.' + item.
|
|
773
|
+
var tmp$ret$2 = import_0('..model.' + item.lv_1, item.lv_1);
|
|
745
774
|
destination.x(tmp$ret$2);
|
|
746
775
|
}
|
|
747
776
|
var modelImports = destination;
|
|
748
|
-
var endpointImport = import_0('..endpoint.' + endpoint.
|
|
749
|
-
var endpointName = endpoint.
|
|
777
|
+
var endpointImport = import_0('..endpoint.' + endpoint.kq_1.m1(), '*');
|
|
778
|
+
var endpointName = endpoint.kq_1.m1();
|
|
750
779
|
var file = flattenEndpointTypeRefs(snakeCaseClientFunctions(addSelfReceiverToClientFields(sanitizeNames(emitEndpointClient.call(this, endpoint), _get_sanitizationConfig__sns434(this)))), endpointName);
|
|
751
|
-
var subPackageName = plus_1(this.
|
|
752
|
-
return new File(Companion_getInstance().
|
|
780
|
+
var subPackageName = plus_1(this.l1y_1, 'client');
|
|
781
|
+
return new File(Companion_getInstance().h1h(subPackageName.ls() + file.c1o_1.i1h()), plus(plus(plus(buildImports(this, '..wirespec'), modelImports), listOf_0(endpointImport)), file.d1o_1));
|
|
753
782
|
};
|
|
754
|
-
protoOf(PythonIrEmitter).
|
|
783
|
+
protoOf(PythonIrEmitter).s1w = function (endpoints, logger) {
|
|
755
784
|
// Inline function 'kotlin.collections.flatMap' call
|
|
756
785
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
757
786
|
var destination = ArrayList_init_$Create$_0();
|
|
@@ -767,7 +796,7 @@ protoOf(PythonIrEmitter).i1w = function (endpoints, logger) {
|
|
|
767
796
|
var _iterator__ex2g4s_0 = destination.t();
|
|
768
797
|
while (_iterator__ex2g4s_0.u()) {
|
|
769
798
|
var e = _iterator__ex2g4s_0.v();
|
|
770
|
-
var key = e.
|
|
799
|
+
var key = e.lv_1;
|
|
771
800
|
if (set.x(key)) {
|
|
772
801
|
list_0.x(e);
|
|
773
802
|
}
|
|
@@ -778,7 +807,7 @@ protoOf(PythonIrEmitter).i1w = function (endpoints, logger) {
|
|
|
778
807
|
var _iterator__ex2g4s_1 = list_0.t();
|
|
779
808
|
while (_iterator__ex2g4s_1.u()) {
|
|
780
809
|
var item = _iterator__ex2g4s_1.v();
|
|
781
|
-
var tmp$ret$5 = import_0('.model.' + item.
|
|
810
|
+
var tmp$ret$5 = import_0('.model.' + item.lv_1, item.lv_1);
|
|
782
811
|
destination_0.x(tmp$ret$5);
|
|
783
812
|
}
|
|
784
813
|
var modelImports = destination_0;
|
|
@@ -788,7 +817,7 @@ protoOf(PythonIrEmitter).i1w = function (endpoints, logger) {
|
|
|
788
817
|
var _iterator__ex2g4s_2 = endpoints.t();
|
|
789
818
|
while (_iterator__ex2g4s_2.u()) {
|
|
790
819
|
var item_0 = _iterator__ex2g4s_2.v();
|
|
791
|
-
var tmp$ret$8 = import_0('.endpoint.' + item_0.
|
|
820
|
+
var tmp$ret$8 = import_0('.endpoint.' + item_0.kq_1.m1(), '*');
|
|
792
821
|
destination_1.x(tmp$ret$8);
|
|
793
822
|
}
|
|
794
823
|
var endpointImports = destination_1;
|
|
@@ -798,7 +827,7 @@ protoOf(PythonIrEmitter).i1w = function (endpoints, logger) {
|
|
|
798
827
|
var _iterator__ex2g4s_3 = endpoints.t();
|
|
799
828
|
while (_iterator__ex2g4s_3.u()) {
|
|
800
829
|
var item_1 = _iterator__ex2g4s_3.v();
|
|
801
|
-
var tmp$ret$11 = import_0('.client.' + item_1.
|
|
830
|
+
var tmp$ret$11 = import_0('.client.' + item_1.kq_1.m1() + 'Client', item_1.kq_1.m1() + 'Client');
|
|
802
831
|
destination_2.x(tmp$ret$11);
|
|
803
832
|
}
|
|
804
833
|
var clientImports = destination_2;
|
|
@@ -809,7 +838,7 @@ protoOf(PythonIrEmitter).i1w = function (endpoints, logger) {
|
|
|
809
838
|
var _iterator__ex2g4s_4 = endpoints.t();
|
|
810
839
|
while (_iterator__ex2g4s_4.u()) {
|
|
811
840
|
var item_2 = _iterator__ex2g4s_4.v();
|
|
812
|
-
var tmp$ret$14 = item_2.
|
|
841
|
+
var tmp$ret$14 = item_2.kq_1.m1();
|
|
813
842
|
destination_3.x(tmp$ret$14);
|
|
814
843
|
}
|
|
815
844
|
var endpointNames = destination_3;
|
|
@@ -823,7 +852,7 @@ protoOf(PythonIrEmitter).i1w = function (endpoints, logger) {
|
|
|
823
852
|
accumulator = flattenEndpointTypeRefs(acc, element_0);
|
|
824
853
|
}
|
|
825
854
|
var file = accumulator;
|
|
826
|
-
return new File(Companion_getInstance().
|
|
855
|
+
return new File(Companion_getInstance().h1h(this.l1y_1.ls() + file.c1o_1.i1h()), plus(plus(buildImports(this, '.wirespec'), allImports), file.d1o_1));
|
|
827
856
|
};
|
|
828
857
|
function replaceReflectInNonGenericStructFields(_this__u8e3s4) {
|
|
829
858
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
@@ -831,14 +860,14 @@ function replaceReflectInNonGenericStructFields(_this__u8e3s4) {
|
|
|
831
860
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
832
861
|
var tmp = scope;
|
|
833
862
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
834
|
-
var this_0 = scope.
|
|
863
|
+
var this_0 = scope.a1w_1;
|
|
835
864
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
836
865
|
// Inline function 'kotlin.apply' call
|
|
837
866
|
var this_1 = new TransformerBuilder();
|
|
838
|
-
this_1.
|
|
839
|
-
var tmp$ret$2 = this_1.
|
|
840
|
-
tmp.
|
|
841
|
-
var tmp_0 = scope.
|
|
867
|
+
this_1.u1i(replaceReflectInNonGenericStructFields$lambda);
|
|
868
|
+
var tmp$ret$2 = this_1.v1i();
|
|
869
|
+
tmp.a1w_1 = transform(this_0, tmp$ret$2);
|
|
870
|
+
var tmp_0 = scope.a1w_1;
|
|
842
871
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
843
872
|
}
|
|
844
873
|
function replaceRefinedFunctions(_this__u8e3s4, refined) {
|
|
@@ -847,14 +876,14 @@ function replaceRefinedFunctions(_this__u8e3s4, refined) {
|
|
|
847
876
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
848
877
|
var tmp = scope;
|
|
849
878
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
850
|
-
var this_0 = scope.
|
|
879
|
+
var this_0 = scope.a1w_1;
|
|
851
880
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
852
881
|
// Inline function 'kotlin.apply' call
|
|
853
882
|
var this_1 = new TransformerBuilder();
|
|
854
|
-
this_1.
|
|
855
|
-
var tmp$ret$2 = this_1.
|
|
856
|
-
tmp.
|
|
857
|
-
var tmp_0 = scope.
|
|
883
|
+
this_1.u1i(replaceRefinedFunctions$lambda(refined));
|
|
884
|
+
var tmp$ret$2 = this_1.v1i();
|
|
885
|
+
tmp.a1w_1 = transform(this_0, tmp$ret$2);
|
|
886
|
+
var tmp_0 = scope.a1w_1;
|
|
858
887
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
859
888
|
}
|
|
860
889
|
function snakeCaseHandlerAndCallMethods(_this__u8e3s4) {
|
|
@@ -863,20 +892,20 @@ function snakeCaseHandlerAndCallMethods(_this__u8e3s4) {
|
|
|
863
892
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
864
893
|
var tmp = scope;
|
|
865
894
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
866
|
-
var this_0 = scope.
|
|
895
|
+
var this_0 = scope.a1w_1;
|
|
867
896
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
868
897
|
// Inline function 'kotlin.apply' call
|
|
869
898
|
var this_1 = new TransformerBuilder();
|
|
870
|
-
this_1.
|
|
871
|
-
var tmp$ret$2 = this_1.
|
|
872
|
-
tmp.
|
|
873
|
-
var tmp_0 = scope.
|
|
899
|
+
this_1.u1i(snakeCaseHandlerAndCallMethods$lambda);
|
|
900
|
+
var tmp$ret$2 = this_1.v1i();
|
|
901
|
+
tmp.a1w_1 = transform(this_0, tmp$ret$2);
|
|
902
|
+
var tmp_0 = scope.a1w_1;
|
|
874
903
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
875
904
|
}
|
|
876
905
|
function splitEndpointStructsToModuleLevel(_this__u8e3s4) {
|
|
877
906
|
// Inline function 'community.flock.wirespec.ir.core.findElement' call
|
|
878
907
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
879
|
-
var tmp0 = _this__u8e3s4.
|
|
908
|
+
var tmp0 = _this__u8e3s4.e1o();
|
|
880
909
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
881
910
|
var destination = ArrayList_init_$Create$_0();
|
|
882
911
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -889,7 +918,7 @@ function splitEndpointStructsToModuleLevel(_this__u8e3s4) {
|
|
|
889
918
|
var tmp$ret$2 = firstOrNull_0(destination);
|
|
890
919
|
var namespace = ensureNotNull(tmp$ret$2);
|
|
891
920
|
// Inline function 'kotlin.collections.partition' call
|
|
892
|
-
var this_0 = namespace.
|
|
921
|
+
var this_0 = namespace.j1o_1;
|
|
893
922
|
var first = ArrayList_init_$Create$_0();
|
|
894
923
|
var second = ArrayList_init_$Create$_0();
|
|
895
924
|
var _iterator__ex2g4s_0 = this_0.t();
|
|
@@ -910,14 +939,14 @@ function splitEndpointStructsToModuleLevel(_this__u8e3s4) {
|
|
|
910
939
|
var _destruct__k2r9zo = new Pair(first, second);
|
|
911
940
|
var moduleElements = _destruct__k2r9zo.we();
|
|
912
941
|
var classElements = _destruct__k2r9zo.xe();
|
|
913
|
-
var endpointClass = new Namespace(namespace.
|
|
914
|
-
return new File(namespace.
|
|
942
|
+
var endpointClass = new Namespace(namespace.i1o_1, classElements, namespace.k1o_1);
|
|
943
|
+
return new File(namespace.i1o_1, plus_0(moduleElements, endpointClass));
|
|
915
944
|
}
|
|
916
945
|
function flattenEndpointTypeRefs(_this__u8e3s4, endpointName) {
|
|
917
946
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
918
947
|
var scope = new TransformScope(_this__u8e3s4);
|
|
919
|
-
scope.
|
|
920
|
-
var tmp = scope.
|
|
948
|
+
scope.g1w(flattenEndpointTypeRefs$lambda(endpointName));
|
|
949
|
+
var tmp = scope.a1w_1;
|
|
921
950
|
return isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
922
951
|
}
|
|
923
952
|
function snakeCaseClientFunctions(_this__u8e3s4) {
|
|
@@ -926,15 +955,15 @@ function snakeCaseClientFunctions(_this__u8e3s4) {
|
|
|
926
955
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
927
956
|
var tmp = scope;
|
|
928
957
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
929
|
-
var this_0 = scope.
|
|
958
|
+
var this_0 = scope.a1w_1;
|
|
930
959
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
931
960
|
// Inline function 'kotlin.apply' call
|
|
932
961
|
var this_1 = new TransformerBuilder();
|
|
933
|
-
this_1.
|
|
934
|
-
var tmp$ret$2 = this_1.
|
|
935
|
-
tmp.
|
|
936
|
-
scope.
|
|
937
|
-
var tmp_0 = scope.
|
|
962
|
+
this_1.u1i(snakeCaseClientFunctions$lambda);
|
|
963
|
+
var tmp$ret$2 = this_1.v1i();
|
|
964
|
+
tmp.a1w_1 = transform(this_0, tmp$ret$2);
|
|
965
|
+
scope.j1w(snakeCaseClientFunctions$lambda_0);
|
|
966
|
+
var tmp_0 = scope.a1w_1;
|
|
938
967
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
939
968
|
}
|
|
940
969
|
function addSelfReceiverToClientFields(_this__u8e3s4) {
|
|
@@ -945,7 +974,7 @@ function addSelfReceiverToClientFields(_this__u8e3s4) {
|
|
|
945
974
|
} else {
|
|
946
975
|
// Inline function 'community.flock.wirespec.ir.core.findElement' call
|
|
947
976
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
948
|
-
var tmp0 = tmp0_safe_receiver.
|
|
977
|
+
var tmp0 = tmp0_safe_receiver.e1o();
|
|
949
978
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
950
979
|
var destination = ArrayList_init_$Create$_0();
|
|
951
980
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -969,7 +998,7 @@ function addSelfReceiverToClientFields(_this__u8e3s4) {
|
|
|
969
998
|
var _iterator__ex2g4s_0 = tmp2_safe_receiver.t();
|
|
970
999
|
while (_iterator__ex2g4s_0.u()) {
|
|
971
1000
|
var item = _iterator__ex2g4s_0.v();
|
|
972
|
-
var tmp$ret$3 = item.
|
|
1001
|
+
var tmp$ret$3 = item.x1o_1.g1j();
|
|
973
1002
|
destination_0.x(tmp$ret$3);
|
|
974
1003
|
}
|
|
975
1004
|
tmp_0 = destination_0;
|
|
@@ -981,8 +1010,8 @@ function addSelfReceiverToClientFields(_this__u8e3s4) {
|
|
|
981
1010
|
return _this__u8e3s4;
|
|
982
1011
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
983
1012
|
var scope = new TransformScope(_this__u8e3s4);
|
|
984
|
-
scope.
|
|
985
|
-
var tmp_1 = scope.
|
|
1013
|
+
scope.j1w(addSelfReceiverToClientFields$lambda(fieldNames));
|
|
1014
|
+
var tmp_1 = scope.a1w_1;
|
|
986
1015
|
return isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
987
1016
|
}
|
|
988
1017
|
function replaceReflectAsTypeAny(_this__u8e3s4) {
|
|
@@ -991,13 +1020,13 @@ function replaceReflectAsTypeAny(_this__u8e3s4) {
|
|
|
991
1020
|
tmp = Custom_init_$Create$('type', listOf_0(Any_instance));
|
|
992
1021
|
} else {
|
|
993
1022
|
if (_this__u8e3s4 instanceof Nullable) {
|
|
994
|
-
tmp = _this__u8e3s4.
|
|
1023
|
+
tmp = _this__u8e3s4.k1n(replaceReflectAsTypeAny(_this__u8e3s4.c1j_1));
|
|
995
1024
|
} else {
|
|
996
1025
|
if (_this__u8e3s4 instanceof Array_0) {
|
|
997
|
-
tmp = _this__u8e3s4.
|
|
1026
|
+
tmp = _this__u8e3s4.k1n(replaceReflectAsTypeAny(_this__u8e3s4.d1j_1));
|
|
998
1027
|
} else {
|
|
999
1028
|
if (_this__u8e3s4 instanceof Dict) {
|
|
1000
|
-
tmp = _this__u8e3s4.
|
|
1029
|
+
tmp = _this__u8e3s4.n1n(replaceReflectAsTypeAny(_this__u8e3s4.l1n_1), replaceReflectAsTypeAny(_this__u8e3s4.m1n_1));
|
|
1001
1030
|
} else {
|
|
1002
1031
|
tmp = _this__u8e3s4;
|
|
1003
1032
|
}
|
|
@@ -1012,12 +1041,12 @@ function replaceReflectInNonGenericStructFields$lambda(element, transformer) {
|
|
|
1012
1041
|
var tmp$ret$1;
|
|
1013
1042
|
$l$block: {
|
|
1014
1043
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1015
|
-
if (!element.
|
|
1044
|
+
if (!element.h1q_1.r()) {
|
|
1016
1045
|
tmp$ret$1 = element;
|
|
1017
1046
|
break $l$block;
|
|
1018
1047
|
}
|
|
1019
1048
|
// Inline function 'kotlin.collections.map' call
|
|
1020
|
-
var this_0 = element.
|
|
1049
|
+
var this_0 = element.d1q_1;
|
|
1021
1050
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1022
1051
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1023
1052
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -1025,14 +1054,14 @@ function replaceReflectInNonGenericStructFields$lambda(element, transformer) {
|
|
|
1025
1054
|
var item = _iterator__ex2g4s.v();
|
|
1026
1055
|
var tmp_0;
|
|
1027
1056
|
if (item instanceof Field) {
|
|
1028
|
-
tmp_0 = item.
|
|
1057
|
+
tmp_0 = item.h1p(VOID, replaceReflectAsTypeAny(item.y1o_1));
|
|
1029
1058
|
} else {
|
|
1030
1059
|
tmp_0 = item;
|
|
1031
1060
|
}
|
|
1032
1061
|
var tmp$ret$2 = tmp_0;
|
|
1033
1062
|
destination.x(tmp$ret$2);
|
|
1034
1063
|
}
|
|
1035
|
-
tmp$ret$1 = element.
|
|
1064
|
+
tmp$ret$1 = element.n1q(VOID, destination);
|
|
1036
1065
|
}
|
|
1037
1066
|
tmp = tmp$ret$1;
|
|
1038
1067
|
} else {
|
|
@@ -1043,17 +1072,17 @@ function replaceReflectInNonGenericStructFields$lambda(element, transformer) {
|
|
|
1043
1072
|
}
|
|
1044
1073
|
function replaceRefinedFunctions$lambda$lambda($constraintExpr) {
|
|
1045
1074
|
return function ($this$function) {
|
|
1046
|
-
$this$function.
|
|
1047
|
-
$this$function.
|
|
1048
|
-
$this$function.
|
|
1075
|
+
$this$function.v1h('self', Custom_init_$Create$(''));
|
|
1076
|
+
$this$function.y1h(Boolean_instance);
|
|
1077
|
+
$this$function.z1h($constraintExpr);
|
|
1049
1078
|
return Unit_instance;
|
|
1050
1079
|
};
|
|
1051
1080
|
}
|
|
1052
1081
|
function replaceRefinedFunctions$lambda$lambda_0($toStringExpr) {
|
|
1053
1082
|
return function ($this$function) {
|
|
1054
|
-
$this$function.
|
|
1055
|
-
$this$function.
|
|
1056
|
-
$this$function.
|
|
1083
|
+
$this$function.v1h('self', Custom_init_$Create$(''));
|
|
1084
|
+
$this$function.y1h(String_instance);
|
|
1085
|
+
$this$function.z1h(new RawExpression($toStringExpr));
|
|
1057
1086
|
return Unit_instance;
|
|
1058
1087
|
};
|
|
1059
1088
|
}
|
|
@@ -1062,7 +1091,7 @@ function replaceRefinedFunctions$lambda($refined) {
|
|
|
1062
1091
|
var tmp;
|
|
1063
1092
|
if (element instanceof Struct) {
|
|
1064
1093
|
// Inline function 'kotlin.collections.map' call
|
|
1065
|
-
var this_0 = element.
|
|
1094
|
+
var this_0 = element.g1q_1;
|
|
1066
1095
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1067
1096
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1068
1097
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -1071,23 +1100,23 @@ function replaceRefinedFunctions$lambda($refined) {
|
|
|
1071
1100
|
var tmp_0;
|
|
1072
1101
|
var tmp_1;
|
|
1073
1102
|
if (item instanceof Function) {
|
|
1074
|
-
tmp_1 = item.
|
|
1103
|
+
tmp_1 = item.e1l_1.equals(Companion_getInstance().h1h('validate'));
|
|
1075
1104
|
} else {
|
|
1076
1105
|
tmp_1 = false;
|
|
1077
1106
|
}
|
|
1078
1107
|
if (tmp_1) {
|
|
1079
|
-
var constraintExpr = convertConstraint($refined.
|
|
1108
|
+
var constraintExpr = convertConstraint($refined.ur_1, new FieldCall(new VariableReference(Companion_getInstance().h1h('self')), Companion_getInstance().h1h('value')));
|
|
1080
1109
|
tmp_0 = function_0('validate', VOID, VOID, replaceRefinedFunctions$lambda$lambda(constraintExpr));
|
|
1081
1110
|
} else {
|
|
1082
1111
|
var tmp_2;
|
|
1083
1112
|
if (item instanceof Function) {
|
|
1084
|
-
tmp_2 = item.
|
|
1113
|
+
tmp_2 = item.e1l_1.equals(Companion_getInstance().h1h('toString'));
|
|
1085
1114
|
} else {
|
|
1086
1115
|
tmp_2 = false;
|
|
1087
1116
|
}
|
|
1088
1117
|
if (tmp_2) {
|
|
1089
1118
|
var tmp_3;
|
|
1090
|
-
if ($refined.
|
|
1119
|
+
if ($refined.ur_1.wt_1 instanceof String_0) {
|
|
1091
1120
|
tmp_3 = 'self.value';
|
|
1092
1121
|
} else {
|
|
1093
1122
|
tmp_3 = 'str(self.value)';
|
|
@@ -1101,7 +1130,7 @@ function replaceRefinedFunctions$lambda($refined) {
|
|
|
1101
1130
|
var tmp$ret$0 = tmp_0;
|
|
1102
1131
|
destination.x(tmp$ret$0);
|
|
1103
1132
|
}
|
|
1104
|
-
tmp = element.
|
|
1133
|
+
tmp = element.n1q(VOID, VOID, VOID, VOID, destination);
|
|
1105
1134
|
} else {
|
|
1106
1135
|
tmp = element;
|
|
1107
1136
|
}
|
|
@@ -1114,23 +1143,23 @@ function snakeCaseHandlerAndCallMethods$lambda(element, transformer) {
|
|
|
1114
1143
|
if (element instanceof Interface) {
|
|
1115
1144
|
var tmp$ret$0;
|
|
1116
1145
|
$l$block: {
|
|
1117
|
-
if (!element.
|
|
1146
|
+
if (!element.o1o_1.equals(Companion_getInstance().h1h('Handler')) && !element.o1o_1.equals(Companion_getInstance().h1h('Call'))) {
|
|
1118
1147
|
tmp$ret$0 = element;
|
|
1119
1148
|
break $l$block;
|
|
1120
1149
|
}
|
|
1121
1150
|
// Inline function 'kotlin.collections.map' call
|
|
1122
|
-
var this_0 = element.
|
|
1151
|
+
var this_0 = element.p1o_1;
|
|
1123
1152
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1124
1153
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1125
1154
|
var _iterator__ex2g4s = this_0.t();
|
|
1126
1155
|
while (_iterator__ex2g4s.u()) {
|
|
1127
1156
|
var item = _iterator__ex2g4s.v();
|
|
1128
1157
|
var tmp0_safe_receiver = item instanceof Function ? item : null;
|
|
1129
|
-
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.p1l(Companion_getInstance().h1h(item.e1l_1.z1m()));
|
|
1130
1159
|
var tmp$ret$1 = tmp1_elvis_lhs == null ? item : tmp1_elvis_lhs;
|
|
1131
1160
|
destination.x(tmp$ret$1);
|
|
1132
1161
|
}
|
|
1133
|
-
tmp$ret$0 = element.
|
|
1162
|
+
tmp$ret$0 = element.w1o(VOID, destination);
|
|
1134
1163
|
}
|
|
1135
1164
|
tmp = tmp$ret$0;
|
|
1136
1165
|
} else {
|
|
@@ -1145,17 +1174,17 @@ function flattenEndpointTypeRefs$lambda($endpointName) {
|
|
|
1145
1174
|
if (!(type instanceof Custom)) {
|
|
1146
1175
|
tmp = type;
|
|
1147
1176
|
} else {
|
|
1148
|
-
if (!startsWith(type.
|
|
1177
|
+
if (!startsWith(type.e1j_1.i1h(), $endpointName + '.')) {
|
|
1149
1178
|
tmp = type;
|
|
1150
1179
|
} else {
|
|
1151
|
-
var suffix = removePrefix(type.
|
|
1180
|
+
var suffix = removePrefix(type.e1j_1.i1h(), $endpointName + '.');
|
|
1152
1181
|
switch (suffix) {
|
|
1153
1182
|
case 'Call':
|
|
1154
1183
|
case 'Handler':
|
|
1155
1184
|
tmp = type;
|
|
1156
1185
|
break;
|
|
1157
1186
|
default:
|
|
1158
|
-
tmp = type.
|
|
1187
|
+
tmp = type.p1n(Companion_getInstance().h1h(suffix));
|
|
1159
1188
|
break;
|
|
1160
1189
|
}
|
|
1161
1190
|
}
|
|
@@ -1166,7 +1195,7 @@ function flattenEndpointTypeRefs$lambda($endpointName) {
|
|
|
1166
1195
|
function snakeCaseClientFunctions$lambda(element, transformer) {
|
|
1167
1196
|
var tmp;
|
|
1168
1197
|
if (element instanceof Function) {
|
|
1169
|
-
tmp = element.
|
|
1198
|
+
tmp = element.p1l(Companion_getInstance().h1h(element.e1l_1.z1m()), VOID, plus(listOf_0(new Parameter(Companion_getInstance().h1h('self'), Custom_init_$Create$(''))), element.g1l_1));
|
|
1170
1199
|
} else {
|
|
1171
1200
|
tmp = element;
|
|
1172
1201
|
}
|
|
@@ -1176,19 +1205,19 @@ function snakeCaseClientFunctions$lambda(element, transformer) {
|
|
|
1176
1205
|
function snakeCaseClientFunctions$lambda_0(stmt, tr) {
|
|
1177
1206
|
var tmp;
|
|
1178
1207
|
if (stmt instanceof FunctionCall) {
|
|
1179
|
-
var nameStr = stmt.
|
|
1180
|
-
var newName = contains(nameStr, '.') ? stmt.
|
|
1181
|
-
var tmp1_safe_receiver = stmt.
|
|
1208
|
+
var nameStr = stmt.d1n_1.g1j();
|
|
1209
|
+
var newName = contains(nameStr, '.') ? stmt.d1n_1 : Companion_getInstance().h1h(Companion_getInstance().h1h(nameStr).z1m());
|
|
1210
|
+
var tmp1_safe_receiver = stmt.b1n_1;
|
|
1182
1211
|
var tmp_0;
|
|
1183
1212
|
if (tmp1_safe_receiver == null) {
|
|
1184
1213
|
tmp_0 = null;
|
|
1185
1214
|
} else {
|
|
1186
1215
|
// Inline function 'kotlin.let' call
|
|
1187
|
-
tmp_0 = tr.
|
|
1216
|
+
tmp_0 = tr.v1v(tmp1_safe_receiver);
|
|
1188
1217
|
}
|
|
1189
1218
|
var tmp2_receiver = tmp_0;
|
|
1190
1219
|
// Inline function 'kotlin.collections.mapValues' call
|
|
1191
|
-
var this_0 = stmt.
|
|
1220
|
+
var this_0 = stmt.e1n_1;
|
|
1192
1221
|
// Inline function 'kotlin.collections.mapValuesTo' call
|
|
1193
1222
|
var destination = LinkedHashMap_init_$Create$(mapCapacity(this_0.b1()));
|
|
1194
1223
|
// Inline function 'kotlin.collections.associateByTo' call
|
|
@@ -1198,10 +1227,10 @@ function snakeCaseClientFunctions$lambda_0(stmt, tr) {
|
|
|
1198
1227
|
var tmp_1 = element.l1();
|
|
1199
1228
|
// Inline function 'kotlin.collections.component2' call
|
|
1200
1229
|
var v = element.m1();
|
|
1201
|
-
var tmp$ret$4 = tr.
|
|
1230
|
+
var tmp$ret$4 = tr.v1v(v);
|
|
1202
1231
|
destination.t2(tmp_1, tmp$ret$4);
|
|
1203
1232
|
}
|
|
1204
|
-
var tmp4_isAwait = !(stmt.
|
|
1233
|
+
var tmp4_isAwait = !(stmt.b1n_1 == null);
|
|
1205
1234
|
tmp = new FunctionCall(tmp2_receiver, VOID, newName, destination, tmp4_isAwait);
|
|
1206
1235
|
} else {
|
|
1207
1236
|
tmp = transformChildren(stmt, tr);
|
|
@@ -1213,23 +1242,23 @@ function addSelfReceiverToClientFields$lambda($fieldNames) {
|
|
|
1213
1242
|
var tmp;
|
|
1214
1243
|
var tmp_0;
|
|
1215
1244
|
if (stmt instanceof FieldCall) {
|
|
1216
|
-
tmp_0 = (stmt.
|
|
1245
|
+
tmp_0 = (stmt.o1r_1 == null && $fieldNames.v1(stmt.p1r_1.g1j()));
|
|
1217
1246
|
} else {
|
|
1218
1247
|
tmp_0 = false;
|
|
1219
1248
|
}
|
|
1220
1249
|
if (tmp_0) {
|
|
1221
|
-
tmp = new FieldCall(new VariableReference(Companion_getInstance().
|
|
1250
|
+
tmp = new FieldCall(new VariableReference(Companion_getInstance().h1h('self')), stmt.p1r_1);
|
|
1222
1251
|
} else {
|
|
1223
1252
|
if (stmt instanceof FieldCall) {
|
|
1224
|
-
var tmp1_safe_receiver = stmt.
|
|
1253
|
+
var tmp1_safe_receiver = stmt.o1r_1;
|
|
1225
1254
|
var tmp_1;
|
|
1226
1255
|
if (tmp1_safe_receiver == null) {
|
|
1227
1256
|
tmp_1 = null;
|
|
1228
1257
|
} else {
|
|
1229
1258
|
// Inline function 'kotlin.let' call
|
|
1230
|
-
tmp_1 = tr.
|
|
1259
|
+
tmp_1 = tr.v1v(tmp1_safe_receiver);
|
|
1231
1260
|
}
|
|
1232
|
-
tmp = new FieldCall(tmp_1, stmt.
|
|
1261
|
+
tmp = new FieldCall(tmp_1, stmt.p1r_1);
|
|
1233
1262
|
} else {
|
|
1234
1263
|
tmp = transformChildren(stmt, tr);
|
|
1235
1264
|
}
|
|
@@ -1238,9 +1267,9 @@ function addSelfReceiverToClientFields$lambda($fieldNames) {
|
|
|
1238
1267
|
};
|
|
1239
1268
|
}
|
|
1240
1269
|
//region block: post-declaration
|
|
1241
|
-
protoOf(PythonIrEmitter).
|
|
1270
|
+
protoOf(PythonIrEmitter).p1w = get_extensions;
|
|
1242
1271
|
protoOf(PythonIrEmitter).no = emit_1;
|
|
1243
|
-
protoOf(PythonIrEmitter).
|
|
1272
|
+
protoOf(PythonIrEmitter).u1w = beforeGenerate;
|
|
1244
1273
|
//endregion
|
|
1245
1274
|
//region block: exports
|
|
1246
1275
|
export {
|