@flock/wirespec 0.19.5 → 0.20.0-RC.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/arrow-arrow-atomic.mjs +12 -12
- package/arrow-arrow-core.mjs +167 -167
- package/clikt-clikt-mordant.mjs +81 -81
- package/clikt-clikt-mordant.mjs.map +1 -1
- package/clikt-clikt.mjs +1636 -1636
- package/clikt-clikt.mjs.map +1 -1
- package/colormath-root-colormath.mjs +448 -448
- package/kotest-kotest-assertions-kotest-assertions-core.mjs +4 -0
- package/kotest-kotest-assertions-kotest-assertions-core.mjs.map +1 -0
- package/kotest-kotest-assertions-kotest-assertions-shared.mjs +4 -0
- package/kotest-kotest-assertions-kotest-assertions-shared.mjs.map +1 -0
- package/kotest-kotest-common.mjs +56 -0
- package/kotest-kotest-common.mjs.map +1 -0
- package/kotest-kotest-framework-kotest-framework-engine.mjs +4 -0
- package/kotest-kotest-framework-kotest-framework-engine.mjs.map +1 -0
- package/kotest-kotest-property.mjs +2501 -0
- package/kotest-kotest-property.mjs.map +1 -0
- package/kotlin-kotlin-stdlib.mjs +5263 -2481
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +10243 -10243
- package/kotlin-openapi-bindings.mjs.map +1 -1
- package/kotlin-rgxgen.mjs +1846 -1846
- package/kotlin-rgxgen.mjs.map +1 -1
- package/kotlinx-coroutines-test.mjs +4 -0
- package/kotlinx-coroutines-test.mjs.map +1 -0
- package/kotlinx-io-kotlinx-io-core.mjs +455 -455
- package/kotlinx-io-kotlinx-io-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +2135 -2101
- package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1579 -1579
- package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/mordant-mordant.mjs +1435 -1435
- package/package.json +5 -1
- package/wirespec-generator.d.ts +51 -0
- package/wirespec-generator.mjs +9 -0
- package/wirespec-src-compiler-core.mjs +1598 -1598
- package/wirespec-src-compiler-emitters-java.mjs +445 -445
- package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-kotlin.mjs +343 -343
- package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-python.mjs +429 -429
- package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-rust.mjs +482 -482
- package/wirespec-src-compiler-emitters-scala.mjs +194 -194
- package/wirespec-src-compiler-emitters-typescript.mjs +530 -530
- package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-wirespec.mjs +87 -87
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-ir.mjs +3887 -3863
- package/wirespec-src-compiler-ir.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +457 -457
- package/wirespec-src-compiler-lib.mjs.map +1 -1
- package/wirespec-src-converter-avro.mjs +521 -521
- package/wirespec-src-converter-avro.mjs.map +1 -1
- package/wirespec-src-converter-openapi.mjs +859 -859
- package/wirespec-src-converter-openapi.mjs.map +1 -1
- package/wirespec-src-ide-lsp.mjs +1387 -1387
- package/wirespec-src-ide-lsp.mjs.map +1 -1
- package/wirespec-src-integration-kotest.mjs +1647 -0
- package/wirespec-src-integration-kotest.mjs.map +1 -0
- package/wirespec-src-plugin-arguments.mjs +192 -192
- package/wirespec-src-plugin-arguments.mjs.map +1 -1
- package/wirespec-src-plugin-cli.mjs +109 -109
- package/wirespec-src-plugin-npm.d.mts +21 -0
- package/wirespec-src-plugin-npm.mjs +43 -43
- package/wirespec-src-plugin-npm.mjs.map +1 -1
- package/wirespec-src-tools-generator.mjs +35 -35
- package/wirespec-src-tools-generator.mjs.map +1 -1
- package/xmlutil-core.mjs +4 -0
- package/xmlutil-core.mjs.map +1 -0
- package/xmlutil-serialization.mjs +4 -0
- package/xmlutil-serialization.mjs.map +1 -0
|
@@ -146,15 +146,15 @@ initMetadataForCompanion(Companion);
|
|
|
146
146
|
initMetadataForClass(ScalaIrEmitter, 'ScalaIrEmitter', ScalaIrEmitter, VOID, [IrEmitter]);
|
|
147
147
|
//endregion
|
|
148
148
|
function _get_sanitizationConfig__sns434($this) {
|
|
149
|
-
var tmp0 = $this.
|
|
149
|
+
var tmp0 = $this.c24_1;
|
|
150
150
|
var tmp = KProperty1;
|
|
151
151
|
// Inline function 'kotlin.getValue' call
|
|
152
152
|
getPropertyCallableRef('sanitizationConfig', 1, tmp, ScalaIrEmitter$_get_sanitizationConfig_$ref_ydarb0(), null);
|
|
153
|
-
return tmp0.
|
|
153
|
+
return tmp0.m1();
|
|
154
154
|
}
|
|
155
155
|
function sanitize($this, _this__u8e3s4) {
|
|
156
156
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
157
|
-
var this_0 = split(_this__u8e3s4.
|
|
157
|
+
var this_0 = split(_this__u8e3s4.m1(), ['.', ' ']);
|
|
158
158
|
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
159
159
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
160
160
|
var index = 0;
|
|
@@ -163,8 +163,8 @@ function sanitize($this, _this__u8e3s4) {
|
|
|
163
163
|
var item = _iterator__ex2g4s.v();
|
|
164
164
|
var _unary__edvuaz = index;
|
|
165
165
|
index = _unary__edvuaz + 1 | 0;
|
|
166
|
-
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.
|
|
167
|
-
destination.
|
|
166
|
+
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.pu(item) : item;
|
|
167
|
+
destination.y(tmp$ret$0);
|
|
168
168
|
}
|
|
169
169
|
// Inline function 'kotlin.text.filter' call
|
|
170
170
|
var tmp0 = joinToString(destination, '');
|
|
@@ -211,7 +211,7 @@ function sanitizeFirstIsDigit($this, _this__u8e3s4) {
|
|
|
211
211
|
return tmp;
|
|
212
212
|
}
|
|
213
213
|
function sanitizeKeywords($this, _this__u8e3s4) {
|
|
214
|
-
return Companion_getInstance_0().
|
|
214
|
+
return Companion_getInstance_0().d24_1.v1(_this__u8e3s4) ? addBackticks(_this__u8e3s4) : _this__u8e3s4;
|
|
215
215
|
}
|
|
216
216
|
function sanitizeSymbol($this, _this__u8e3s4) {
|
|
217
217
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
@@ -224,8 +224,8 @@ function sanitizeSymbol($this, _this__u8e3s4) {
|
|
|
224
224
|
var item = _iterator__ex2g4s.v();
|
|
225
225
|
var _unary__edvuaz = index;
|
|
226
226
|
index = _unary__edvuaz + 1 | 0;
|
|
227
|
-
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.
|
|
228
|
-
destination.
|
|
227
|
+
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.pu(item) : item;
|
|
228
|
+
destination.y(tmp$ret$0);
|
|
229
229
|
}
|
|
230
230
|
// Inline function 'kotlin.text.filter' call
|
|
231
231
|
var tmp0 = joinToString(destination, '');
|
|
@@ -251,7 +251,7 @@ function sanitizeEnum($this, _this__u8e3s4) {
|
|
|
251
251
|
}
|
|
252
252
|
function Companion() {
|
|
253
253
|
Companion_instance_2 = this;
|
|
254
|
-
this.
|
|
254
|
+
this.d24_1 = setOf(['abstract', 'case', 'class', 'def', 'do', 'else', 'extends', 'false', 'final', 'for', 'forSome', 'if', 'implicit', 'import', 'lazy', 'match', 'new', 'null', 'object', 'override', 'package', 'private', 'protected', 'return', 'sealed', 'super', 'this', 'throw', 'trait', 'true', 'try', 'type', 'val', 'var', 'while', 'with', 'yield', 'given', 'using', 'enum', 'export', 'then']);
|
|
255
255
|
}
|
|
256
256
|
var Companion_instance_2;
|
|
257
257
|
function Companion_getInstance_0() {
|
|
@@ -264,13 +264,13 @@ function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda(it) {
|
|
|
264
264
|
}
|
|
265
265
|
function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0) {
|
|
266
266
|
return function (name) {
|
|
267
|
-
var sanitized = name.
|
|
267
|
+
var sanitized = name.a1l_1.b1() > 1 ? name.f1q() : sanitizeSymbol(this$0, name.y1m());
|
|
268
268
|
return new Name(listOf(sanitized));
|
|
269
269
|
};
|
|
270
270
|
}
|
|
271
271
|
function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0) {
|
|
272
272
|
return function (name) {
|
|
273
|
-
return new Name(listOf(sanitizeSymbol(this$0, name.
|
|
273
|
+
return new Name(listOf(sanitizeSymbol(this$0, name.f1q())));
|
|
274
274
|
};
|
|
275
275
|
}
|
|
276
276
|
function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_2(this$0) {
|
|
@@ -283,29 +283,29 @@ function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
283
283
|
var tmp;
|
|
284
284
|
var tmp_0;
|
|
285
285
|
if (stmt instanceof FunctionCall) {
|
|
286
|
-
tmp_0 = stmt.
|
|
286
|
+
tmp_0 = stmt.p1q_1.y1m() === 'validate';
|
|
287
287
|
} else {
|
|
288
288
|
tmp_0 = false;
|
|
289
289
|
}
|
|
290
290
|
if (tmp_0) {
|
|
291
|
-
tmp = transformChildren(stmt.
|
|
291
|
+
tmp = transformChildren(stmt.t1q(VOID, emptyList()), tr);
|
|
292
292
|
} else {
|
|
293
293
|
if (stmt instanceof ConstructorStatement) {
|
|
294
|
-
var tmp_1 = tr.
|
|
294
|
+
var tmp_1 = tr.n1y(stmt.h1r_1);
|
|
295
295
|
// Inline function 'kotlin.collections.map' call
|
|
296
|
-
var this_0 = stmt.
|
|
296
|
+
var this_0 = stmt.i1r_1;
|
|
297
297
|
// Inline function 'kotlin.collections.mapTo' call
|
|
298
|
-
var destination = ArrayList_init_$Create$(this_0.
|
|
298
|
+
var destination = ArrayList_init_$Create$(this_0.b1());
|
|
299
299
|
// Inline function 'kotlin.collections.iterator' call
|
|
300
|
-
var _iterator__ex2g4s = this_0.
|
|
300
|
+
var _iterator__ex2g4s = this_0.k1().t();
|
|
301
301
|
while (_iterator__ex2g4s.u()) {
|
|
302
302
|
var item = _iterator__ex2g4s.v();
|
|
303
303
|
// Inline function 'kotlin.collections.component1' call
|
|
304
|
-
var name = item.
|
|
304
|
+
var name = item.l1();
|
|
305
305
|
// Inline function 'kotlin.collections.component2' call
|
|
306
|
-
var expr = item.
|
|
307
|
-
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), name), tr.
|
|
308
|
-
destination.
|
|
306
|
+
var expr = item.m1();
|
|
307
|
+
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), name), tr.q1y(expr));
|
|
308
|
+
destination.y(tmp$ret$3);
|
|
309
309
|
}
|
|
310
310
|
tmp = new ConstructorStatement(tmp_1, toMap(destination));
|
|
311
311
|
} else {
|
|
@@ -317,7 +317,7 @@ function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
317
317
|
}
|
|
318
318
|
function ScalaIrEmitter$sanitizationConfig$delegate$lambda(this$0) {
|
|
319
319
|
return function () {
|
|
320
|
-
var tmp = Companion_getInstance_0().
|
|
320
|
+
var tmp = Companion_getInstance_0().d24_1;
|
|
321
321
|
var tmp_0 = ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda;
|
|
322
322
|
var tmp_1 = ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0);
|
|
323
323
|
var tmp_2 = ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0);
|
|
@@ -331,36 +331,36 @@ function ScalaIrEmitter$_get_sanitizationConfig_$ref_ydarb0() {
|
|
|
331
331
|
};
|
|
332
332
|
}
|
|
333
333
|
function ScalaIrEmitter$emitShared$lambda($this$struct) {
|
|
334
|
-
$this$struct.
|
|
335
|
-
$this$struct.
|
|
334
|
+
$this$struct.j1o(Custom_init_$Create$('PathSegment'));
|
|
335
|
+
$this$struct.e1o('value', String_instance);
|
|
336
336
|
return Unit_instance;
|
|
337
337
|
}
|
|
338
338
|
function ScalaIrEmitter$emitShared$lambda_0($this$struct) {
|
|
339
|
-
$this$struct.
|
|
340
|
-
$this$struct.
|
|
341
|
-
$this$struct.
|
|
339
|
+
$this$struct.j1o(Custom_init_$Create$('PathSegment'));
|
|
340
|
+
$this$struct.e1o('name', String_instance);
|
|
341
|
+
$this$struct.e1o('type', Reflect_instance);
|
|
342
342
|
return Unit_instance;
|
|
343
343
|
}
|
|
344
344
|
function ScalaIrEmitter$emitShared$lambda_1(element, transformer) {
|
|
345
345
|
var tmp;
|
|
346
346
|
if (element instanceof File) {
|
|
347
347
|
// Inline function 'kotlin.collections.partition' call
|
|
348
|
-
var this_0 = element.
|
|
348
|
+
var this_0 = element.l1r_1;
|
|
349
349
|
var first = ArrayList_init_$Create$_0();
|
|
350
350
|
var second = ArrayList_init_$Create$_0();
|
|
351
351
|
var _iterator__ex2g4s = this_0.t();
|
|
352
352
|
while (_iterator__ex2g4s.u()) {
|
|
353
353
|
var element_0 = _iterator__ex2g4s.v();
|
|
354
354
|
if (element_0 instanceof Package) {
|
|
355
|
-
first.
|
|
355
|
+
first.y(element_0);
|
|
356
356
|
} else {
|
|
357
|
-
second.
|
|
357
|
+
second.y(element_0);
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
360
|
var _destruct__k2r9zo = new Pair(first, second);
|
|
361
|
-
var packageElements = _destruct__k2r9zo.
|
|
362
|
-
var rest = _destruct__k2r9zo.
|
|
363
|
-
tmp = element.
|
|
361
|
+
var packageElements = _destruct__k2r9zo.mf();
|
|
362
|
+
var rest = _destruct__k2r9zo.nf();
|
|
363
|
+
tmp = element.o1r(VOID, plus(packageElements, rest));
|
|
364
364
|
} else {
|
|
365
365
|
tmp = element;
|
|
366
366
|
}
|
|
@@ -372,12 +372,12 @@ function ScalaIrEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
372
372
|
if (element instanceof Namespace) {
|
|
373
373
|
var tmp$ret$0;
|
|
374
374
|
$l$block: {
|
|
375
|
-
if (!element.
|
|
375
|
+
if (!element.q1r_1.equals(Companion_getInstance().c1l('Wirespec'))) {
|
|
376
376
|
tmp$ret$0 = element;
|
|
377
377
|
break $l$block;
|
|
378
378
|
}
|
|
379
379
|
// Inline function 'kotlin.collections.flatMap' call
|
|
380
|
-
var tmp0 = element.
|
|
380
|
+
var tmp0 = element.r1r_1;
|
|
381
381
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
382
382
|
var destination = ArrayList_init_$Create$_0();
|
|
383
383
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -389,21 +389,21 @@ function ScalaIrEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
389
389
|
if (!(element_0 instanceof Interface)) {
|
|
390
390
|
tmp_0 = true;
|
|
391
391
|
} else {
|
|
392
|
-
tmp_0 = !setOf(['Request', 'Response']).
|
|
392
|
+
tmp_0 = !setOf(['Request', 'Response']).v1(element_0.e1s_1.d1l());
|
|
393
393
|
}
|
|
394
394
|
if (tmp_0) {
|
|
395
395
|
tmp$ret$1 = listOf(element_0);
|
|
396
396
|
break $l$block_2;
|
|
397
397
|
}
|
|
398
398
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
399
|
-
var tmp0_0 = element_0.
|
|
399
|
+
var tmp0_0 = element_0.f1s_1;
|
|
400
400
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
401
401
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
402
402
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
403
403
|
while (_iterator__ex2g4s_0.u()) {
|
|
404
404
|
var element_1 = _iterator__ex2g4s_0.v();
|
|
405
405
|
if (element_1 instanceof Interface) {
|
|
406
|
-
destination_0.
|
|
406
|
+
destination_0.y(element_1);
|
|
407
407
|
}
|
|
408
408
|
}
|
|
409
409
|
var tmp$ret$5;
|
|
@@ -412,7 +412,7 @@ function ScalaIrEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
412
412
|
var _iterator__ex2g4s_1 = destination_0.t();
|
|
413
413
|
while (_iterator__ex2g4s_1.u()) {
|
|
414
414
|
var element_2 = _iterator__ex2g4s_1.v();
|
|
415
|
-
if (element_2.
|
|
415
|
+
if (element_2.e1s_1.d1l() === 'Headers') {
|
|
416
416
|
tmp$ret$5 = element_2;
|
|
417
417
|
break $l$block_1;
|
|
418
418
|
}
|
|
@@ -428,9 +428,9 @@ function ScalaIrEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
428
428
|
tmp_1 = tmp0_elvis_lhs;
|
|
429
429
|
}
|
|
430
430
|
var nestedHeaders = tmp_1;
|
|
431
|
-
var tmp_2 = new Namespace(element_0.
|
|
431
|
+
var tmp_2 = new Namespace(element_0.e1s_1, listOf(nestedHeaders));
|
|
432
432
|
// Inline function 'kotlin.collections.filter' call
|
|
433
|
-
var tmp0_1 = element_0.
|
|
433
|
+
var tmp0_1 = element_0.f1s_1;
|
|
434
434
|
// Inline function 'kotlin.collections.filterTo' call
|
|
435
435
|
var destination_1 = ArrayList_init_$Create$_0();
|
|
436
436
|
var _iterator__ex2g4s_2 = tmp0_1.t();
|
|
@@ -438,38 +438,38 @@ function ScalaIrEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
438
438
|
var element_3 = _iterator__ex2g4s_2.v();
|
|
439
439
|
var tmp_3;
|
|
440
440
|
if (element_3 instanceof Interface) {
|
|
441
|
-
tmp_3 = element_3.
|
|
441
|
+
tmp_3 = element_3.e1s_1.d1l() === 'Headers';
|
|
442
442
|
} else {
|
|
443
443
|
tmp_3 = false;
|
|
444
444
|
}
|
|
445
445
|
if (!tmp_3) {
|
|
446
|
-
destination_1.
|
|
446
|
+
destination_1.y(element_3);
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
449
|
var tmp_4 = destination_1;
|
|
450
450
|
// Inline function 'kotlin.collections.map' call
|
|
451
|
-
var this_0 = element_0.
|
|
451
|
+
var this_0 = element_0.j1s_1;
|
|
452
452
|
// Inline function 'kotlin.collections.mapTo' call
|
|
453
453
|
var destination_2 = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
454
454
|
var _iterator__ex2g4s_3 = this_0.t();
|
|
455
455
|
while (_iterator__ex2g4s_3.u()) {
|
|
456
456
|
var item = _iterator__ex2g4s_3.v();
|
|
457
457
|
var tmp_5;
|
|
458
|
-
if (item.
|
|
459
|
-
tmp_5 = item.
|
|
458
|
+
if (item.r1t_1.y1m() === 'headers') {
|
|
459
|
+
tmp_5 = item.v1t(VOID, Custom_init_$Create$(element_0.e1s_1.d1l() + '.Headers'));
|
|
460
460
|
} else {
|
|
461
461
|
tmp_5 = item;
|
|
462
462
|
}
|
|
463
463
|
var tmp$ret$9 = tmp_5;
|
|
464
|
-
destination_2.
|
|
464
|
+
destination_2.y(tmp$ret$9);
|
|
465
465
|
}
|
|
466
|
-
tmp$ret$1 = listOf_0([tmp_2, element_0.
|
|
466
|
+
tmp$ret$1 = listOf_0([tmp_2, element_0.l1s(VOID, tmp_4, VOID, VOID, VOID, destination_2)]);
|
|
467
467
|
}
|
|
468
468
|
var list = tmp$ret$1;
|
|
469
469
|
addAll(destination, list);
|
|
470
470
|
}
|
|
471
471
|
var newElements = destination;
|
|
472
|
-
tmp$ret$0 = element.
|
|
472
|
+
tmp$ret$0 = element.u1r(VOID, newElements);
|
|
473
473
|
}
|
|
474
474
|
tmp = tmp$ret$0;
|
|
475
475
|
} else {
|
|
@@ -482,11 +482,11 @@ function ScalaIrEmitter$emitShared$lambda_3($clientServer) {
|
|
|
482
482
|
return function (element, transformer) {
|
|
483
483
|
var tmp;
|
|
484
484
|
if (element instanceof Namespace) {
|
|
485
|
-
var injected = element.
|
|
485
|
+
var injected = element.q1r_1.equals(Companion_getInstance().c1l('Wirespec')) ? $clientServer : emptyList();
|
|
486
486
|
var tmp_0;
|
|
487
487
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
488
488
|
if (!injected.r()) {
|
|
489
|
-
tmp_0 = withElements(element, plus(element.
|
|
489
|
+
tmp_0 = withElements(element, plus(element.m1r(), injected));
|
|
490
490
|
} else {
|
|
491
491
|
tmp_0 = element;
|
|
492
492
|
}
|
|
@@ -516,30 +516,30 @@ function ScalaIrEmitter$emit$lambda(this$0) {
|
|
|
516
516
|
}
|
|
517
517
|
function ScalaIrEmitter(packageName, emitShared) {
|
|
518
518
|
Companion_getInstance_0();
|
|
519
|
-
packageName = packageName === VOID ? Companion_instance_0.
|
|
520
|
-
emitShared = emitShared === VOID ? Companion_instance_1.
|
|
521
|
-
this.
|
|
522
|
-
this.
|
|
523
|
-
this.
|
|
524
|
-
this.
|
|
525
|
-
this.
|
|
519
|
+
packageName = packageName === VOID ? Companion_instance_0.nv('community.flock.wirespec.generated') : packageName;
|
|
520
|
+
emitShared = emitShared === VOID ? Companion_instance_1.hs() : emitShared;
|
|
521
|
+
this.x23_1 = packageName;
|
|
522
|
+
this.y23_1 = emitShared;
|
|
523
|
+
this.z23_1 = ScalaGenerator_getInstance();
|
|
524
|
+
this.a24_1 = FileExtension_Scala_getInstance();
|
|
525
|
+
this.b24_1 = listOf_0([import_0('community.flock.wirespec.scala', 'Wirespec'), import_0('scala.reflect', 'ClassTag')]);
|
|
526
526
|
var tmp = this;
|
|
527
|
-
tmp.
|
|
527
|
+
tmp.c24_1 = lazy(ScalaIrEmitter$sanitizationConfig$delegate$lambda(this));
|
|
528
528
|
}
|
|
529
|
-
protoOf(ScalaIrEmitter).
|
|
530
|
-
return this.
|
|
529
|
+
protoOf(ScalaIrEmitter).j20 = function () {
|
|
530
|
+
return this.x23_1;
|
|
531
531
|
};
|
|
532
|
-
protoOf(ScalaIrEmitter).
|
|
533
|
-
return this.
|
|
532
|
+
protoOf(ScalaIrEmitter).i1z = function () {
|
|
533
|
+
return this.z23_1;
|
|
534
534
|
};
|
|
535
|
-
protoOf(ScalaIrEmitter).
|
|
536
|
-
return this.
|
|
535
|
+
protoOf(ScalaIrEmitter).fu = function () {
|
|
536
|
+
return this.a24_1;
|
|
537
537
|
};
|
|
538
|
-
protoOf(ScalaIrEmitter).
|
|
539
|
-
ScalaGenerator_getInstance().
|
|
538
|
+
protoOf(ScalaIrEmitter).p1z = function (allFiles) {
|
|
539
|
+
ScalaGenerator_getInstance().w1z(allFiles);
|
|
540
540
|
};
|
|
541
|
-
protoOf(ScalaIrEmitter).
|
|
542
|
-
var packageName = Companion_instance_0.
|
|
541
|
+
protoOf(ScalaIrEmitter).m1z = function () {
|
|
542
|
+
var packageName = Companion_instance_0.nv('community.flock.wirespec.scala');
|
|
543
543
|
var tmp = interface_0('PathSegment', true);
|
|
544
544
|
var tmp_0 = struct('Literal', ScalaIrEmitter$emitShared$lambda);
|
|
545
545
|
var pathSegmentTypes = listOf_0([tmp, tmp_0, struct('Param', ScalaIrEmitter$emitShared$lambda_0)]);
|
|
@@ -553,17 +553,17 @@ protoOf(ScalaIrEmitter).b1w = function () {
|
|
|
553
553
|
var tmp_1;
|
|
554
554
|
var tmp_2;
|
|
555
555
|
if (item instanceof Interface) {
|
|
556
|
-
tmp_2 = setOf(['Client', 'Server']).
|
|
556
|
+
tmp_2 = setOf(['Client', 'Server']).v1(item.e1s_1.d1l());
|
|
557
557
|
} else {
|
|
558
558
|
tmp_2 = false;
|
|
559
559
|
}
|
|
560
560
|
if (tmp_2) {
|
|
561
|
-
tmp_1 = item.
|
|
561
|
+
tmp_1 = item.l1s(VOID, VOID, VOID, VOID, VOID, plus_0(item.j1s_1, new Field(Companion_getInstance().c1l('pathSegments'), new Array_0(Custom_init_$Create$('PathSegment')))));
|
|
562
562
|
} else {
|
|
563
563
|
tmp_1 = item;
|
|
564
564
|
}
|
|
565
565
|
var tmp$ret$0 = tmp_1;
|
|
566
|
-
destination.
|
|
566
|
+
destination.y(tmp$ret$0);
|
|
567
567
|
}
|
|
568
568
|
var clientServer = plus(pathSegmentTypes, destination);
|
|
569
569
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
@@ -572,58 +572,58 @@ protoOf(ScalaIrEmitter).b1w = function () {
|
|
|
572
572
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
573
573
|
var tmp_3 = scope;
|
|
574
574
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
575
|
-
var this_2 = scope.
|
|
575
|
+
var this_2 = scope.v1y_1;
|
|
576
576
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
577
577
|
// Inline function 'kotlin.apply' call
|
|
578
578
|
var this_3 = new TransformerBuilder();
|
|
579
|
-
this_3.
|
|
580
|
-
var tmp$ret$5 = this_3.
|
|
581
|
-
tmp_3.
|
|
579
|
+
this_3.m1m(ScalaIrEmitter$emitShared$lambda_1);
|
|
580
|
+
var tmp$ret$5 = this_3.n1m();
|
|
581
|
+
tmp_3.v1y_1 = transform(this_2, tmp$ret$5);
|
|
582
582
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
583
583
|
var tmp_4 = scope;
|
|
584
584
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
585
|
-
var this_4 = scope.
|
|
585
|
+
var this_4 = scope.v1y_1;
|
|
586
586
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
587
587
|
// Inline function 'kotlin.apply' call
|
|
588
588
|
var this_5 = new TransformerBuilder();
|
|
589
|
-
this_5.
|
|
590
|
-
var tmp$ret$10 = this_5.
|
|
591
|
-
tmp_4.
|
|
589
|
+
this_5.m1m(ScalaIrEmitter$emitShared$lambda_2);
|
|
590
|
+
var tmp$ret$10 = this_5.n1m();
|
|
591
|
+
tmp_4.v1y_1 = transform(this_4, tmp$ret$10);
|
|
592
592
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.injectAfter' call
|
|
593
593
|
var tmp_5 = scope;
|
|
594
594
|
// Inline function 'community.flock.wirespec.ir.core.injectAfter' call
|
|
595
595
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
596
|
-
var this_6 = scope.
|
|
596
|
+
var this_6 = scope.v1y_1;
|
|
597
597
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
598
598
|
// Inline function 'kotlin.apply' call
|
|
599
599
|
var this_7 = new TransformerBuilder();
|
|
600
|
-
this_7.
|
|
601
|
-
var tmp$ret$15 = this_7.
|
|
602
|
-
tmp_5.
|
|
603
|
-
var tmp_6 = scope.
|
|
600
|
+
this_7.m1m(ScalaIrEmitter$emitShared$lambda_3(clientServer));
|
|
601
|
+
var tmp$ret$15 = this_7.n1m();
|
|
602
|
+
tmp_5.v1y_1 = transform(this_6, tmp$ret$15);
|
|
603
|
+
var tmp_6 = scope.v1y_1;
|
|
604
604
|
var wirespecShared = isInterface(tmp_6, Element) ? tmp_6 : THROW_CCE();
|
|
605
605
|
var tmp_7;
|
|
606
|
-
if (this.
|
|
607
|
-
tmp_7 = wirespecShared.
|
|
606
|
+
if (this.y23_1.is_1) {
|
|
607
|
+
tmp_7 = wirespecShared.o1r(Companion_getInstance().c1l(packageName.qv() + 'Wirespec'));
|
|
608
608
|
} else {
|
|
609
609
|
tmp_7 = null;
|
|
610
610
|
}
|
|
611
611
|
return tmp_7;
|
|
612
612
|
};
|
|
613
|
-
protoOf(ScalaIrEmitter).
|
|
613
|
+
protoOf(ScalaIrEmitter).wu = function (definition, module_0, logger) {
|
|
614
614
|
var file = emit.call(this, definition, module_0, logger);
|
|
615
615
|
// Inline function 'kotlin.takeIf' call
|
|
616
|
-
var this_0 = this.
|
|
616
|
+
var this_0 = this.b24_1;
|
|
617
617
|
var tmp;
|
|
618
|
-
if (Companion_instance.
|
|
618
|
+
if (Companion_instance.su(module_0)) {
|
|
619
619
|
tmp = this_0;
|
|
620
620
|
} else {
|
|
621
621
|
tmp = null;
|
|
622
622
|
}
|
|
623
623
|
var tmp$ret$1 = tmp;
|
|
624
|
-
return placeInPackage(prependImports(file, tmp$ret$1), this.
|
|
624
|
+
return placeInPackage(prependImports(file, tmp$ret$1), this.j20(), definition);
|
|
625
625
|
};
|
|
626
|
-
protoOf(ScalaIrEmitter).
|
|
626
|
+
protoOf(ScalaIrEmitter).r1z = function (definition, module_0) {
|
|
627
627
|
var tmp;
|
|
628
628
|
if (definition instanceof Type) {
|
|
629
629
|
tmp = convertToGenerator_2(definition, module_0);
|
|
@@ -644,7 +644,7 @@ protoOf(ScalaIrEmitter).g1w = function (definition, module_0) {
|
|
|
644
644
|
}
|
|
645
645
|
var generatorFile = tmp;
|
|
646
646
|
var sanitized = sanitizeNames(generatorFile, _get_sanitizationConfig__sns434(this));
|
|
647
|
-
var generatorOwnName = definition.
|
|
647
|
+
var generatorOwnName = definition.xu().m1() + 'Generator';
|
|
648
648
|
var tmp_0 = asSequence(collectCustomTypeNames(sanitized));
|
|
649
649
|
var tmp_1 = filterNot(tmp_0, ScalaIrEmitter$emitGenerator$lambda);
|
|
650
650
|
var tmp_2 = filterNot(tmp_1, ScalaIrEmitter$emitGenerator$lambda_0(generatorOwnName));
|
|
@@ -656,7 +656,7 @@ protoOf(ScalaIrEmitter).g1w = function (definition, module_0) {
|
|
|
656
656
|
while (_iterator__ex2g4s.u()) {
|
|
657
657
|
var element = _iterator__ex2g4s.v();
|
|
658
658
|
if (!endsWith(element, 'Generator')) {
|
|
659
|
-
destination.
|
|
659
|
+
destination.y(element);
|
|
660
660
|
}
|
|
661
661
|
}
|
|
662
662
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -665,59 +665,59 @@ protoOf(ScalaIrEmitter).g1w = function (definition, module_0) {
|
|
|
665
665
|
var _iterator__ex2g4s_0 = destination.t();
|
|
666
666
|
while (_iterator__ex2g4s_0.u()) {
|
|
667
667
|
var item = _iterator__ex2g4s_0.v();
|
|
668
|
-
var tmp$ret$3 = import_0(this.
|
|
669
|
-
destination_0.
|
|
668
|
+
var tmp$ret$3 = import_0(this.j20().ov_1 + '.model', item);
|
|
669
|
+
destination_0.y(tmp$ret$3);
|
|
670
670
|
}
|
|
671
671
|
var modelImports = destination_0;
|
|
672
|
-
return placeInPackage_0(prependImports(sanitized, plus(this.
|
|
672
|
+
return placeInPackage_0(prependImports(sanitized, plus(this.b24_1, modelImports)), this.j20(), 'generator');
|
|
673
673
|
};
|
|
674
|
-
protoOf(ScalaIrEmitter).
|
|
674
|
+
protoOf(ScalaIrEmitter).vt = function (type, module_0) {
|
|
675
675
|
return ensureEmptyStructHasConstructor(sanitizeNames(convertWithValidation(type, module_0), _get_sanitizationConfig__sns434(this)));
|
|
676
676
|
};
|
|
677
|
-
protoOf(ScalaIrEmitter).
|
|
677
|
+
protoOf(ScalaIrEmitter).kv = function (enum_0, module_0) {
|
|
678
678
|
var tmp = sanitizeNames(convert_0(enum_0), _get_sanitizationConfig__sns434(this));
|
|
679
679
|
return injectEnumLabelField(tmp, ScalaIrEmitter$emit$lambda(this));
|
|
680
680
|
};
|
|
681
|
-
protoOf(ScalaIrEmitter).
|
|
681
|
+
protoOf(ScalaIrEmitter).av = function (union) {
|
|
682
682
|
return sanitizeNames(convert_1(union), _get_sanitizationConfig__sns434(this));
|
|
683
683
|
};
|
|
684
|
-
protoOf(ScalaIrEmitter).
|
|
684
|
+
protoOf(ScalaIrEmitter).fv = function (refined) {
|
|
685
685
|
var file = sanitizeNames(convert_2(refined), _get_sanitizationConfig__sns434(this));
|
|
686
686
|
// Inline function 'community.flock.wirespec.ir.core.findElement' call
|
|
687
687
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
688
|
-
var tmp0 = file.
|
|
688
|
+
var tmp0 = file.m1r();
|
|
689
689
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
690
690
|
var destination = ArrayList_init_$Create$_0();
|
|
691
691
|
var _iterator__ex2g4s = tmp0.t();
|
|
692
692
|
while (_iterator__ex2g4s.u()) {
|
|
693
693
|
var element = _iterator__ex2g4s.v();
|
|
694
694
|
if (element instanceof Struct) {
|
|
695
|
-
destination.
|
|
695
|
+
destination.y(element);
|
|
696
696
|
}
|
|
697
697
|
}
|
|
698
698
|
var tmp$ret$2 = firstOrNull_0(destination);
|
|
699
699
|
var updatedStruct = convertToStringCallsToFieldAccess(markMembersAsOverride(ensureNotNull(tmp$ret$2)));
|
|
700
|
-
return new File(Companion_getInstance().
|
|
700
|
+
return new File(Companion_getInstance().c1l(sanitize(this, refined.dv_1)), listOf(updatedStruct));
|
|
701
701
|
};
|
|
702
|
-
protoOf(ScalaIrEmitter).
|
|
702
|
+
protoOf(ScalaIrEmitter).lv = function (endpoint) {
|
|
703
703
|
// Inline function 'community.flock.wirespec.ir.core.findElement' call
|
|
704
704
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
705
|
-
var tmp0 = convert_3(endpoint).
|
|
705
|
+
var tmp0 = convert_3(endpoint).m1r();
|
|
706
706
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
707
707
|
var destination = ArrayList_init_$Create$_0();
|
|
708
708
|
var _iterator__ex2g4s = tmp0.t();
|
|
709
709
|
while (_iterator__ex2g4s.u()) {
|
|
710
710
|
var element = _iterator__ex2g4s.v();
|
|
711
711
|
if (element instanceof Namespace) {
|
|
712
|
-
destination.
|
|
712
|
+
destination.y(element);
|
|
713
713
|
}
|
|
714
714
|
}
|
|
715
715
|
var tmp$ret$2 = firstOrNull_0(destination);
|
|
716
716
|
var endpointNamespace = ensureNotNull(tmp$ret$2);
|
|
717
717
|
var body = appendClientServerObjects(injectHandleFunction(endpointNamespace), endpoint, isRequestObject(endpointNamespace));
|
|
718
|
-
var tmp = sanitizeNames(new File(Companion_getInstance().
|
|
718
|
+
var tmp = sanitizeNames(new File(Companion_getInstance().c1l(sanitize(this, endpoint.ft_1)), listOf(body)), _get_sanitizationConfig__sns434(this));
|
|
719
719
|
// Inline function 'kotlin.takeIf' call
|
|
720
|
-
var this_0 = buildModelImports(endpoint, this.
|
|
720
|
+
var this_0 = buildModelImports(endpoint, this.j20());
|
|
721
721
|
var tmp_0;
|
|
722
722
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
723
723
|
if (!this_0.r()) {
|
|
@@ -728,10 +728,10 @@ protoOf(ScalaIrEmitter).as = function (endpoint) {
|
|
|
728
728
|
var tmp$ret$5 = tmp_0;
|
|
729
729
|
return prependImports(tmp, tmp$ret$5);
|
|
730
730
|
};
|
|
731
|
-
protoOf(ScalaIrEmitter).
|
|
731
|
+
protoOf(ScalaIrEmitter).zu = function (channel) {
|
|
732
732
|
var tmp = sanitizeNames(convert_4(channel), _get_sanitizationConfig__sns434(this));
|
|
733
733
|
// Inline function 'kotlin.takeIf' call
|
|
734
|
-
var this_0 = buildModelImports(channel, this.
|
|
734
|
+
var this_0 = buildModelImports(channel, this.j20());
|
|
735
735
|
var tmp_0;
|
|
736
736
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
737
737
|
if (!this_0.r()) {
|
|
@@ -742,25 +742,25 @@ protoOf(ScalaIrEmitter).or = function (channel) {
|
|
|
742
742
|
var tmp$ret$2 = tmp_0;
|
|
743
743
|
return prependImports(tmp, tmp$ret$2);
|
|
744
744
|
};
|
|
745
|
-
protoOf(ScalaIrEmitter).
|
|
746
|
-
var imports = buildModelImports(endpoint, this.
|
|
747
|
-
var endpointImport = import_0(this.
|
|
745
|
+
protoOf(ScalaIrEmitter).q1z = function (endpoint) {
|
|
746
|
+
var imports = buildModelImports(endpoint, this.j20());
|
|
747
|
+
var endpointImport = import_0(this.j20().ov_1 + '.endpoint', endpoint.ft_1.m1());
|
|
748
748
|
var file = addIdentityTypeToCall(sanitizeNames(emitEndpointClient.call(this, endpoint), _get_sanitizationConfig__sns434(this)));
|
|
749
|
-
var subPackageName = plus_1(this.
|
|
750
|
-
var tmp = Companion_getInstance().
|
|
749
|
+
var subPackageName = plus_1(this.j20(), 'client');
|
|
750
|
+
var tmp = Companion_getInstance().c1l(subPackageName.qv() + file.k1r_1.d1l());
|
|
751
751
|
// Inline function 'kotlin.collections.buildList' call
|
|
752
752
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
753
753
|
// Inline function 'kotlin.apply' call
|
|
754
754
|
var this_0 = ArrayList_init_$Create$_0();
|
|
755
|
-
this_0.
|
|
756
|
-
this_0.
|
|
757
|
-
this_0.
|
|
758
|
-
this_0.
|
|
759
|
-
this_0.
|
|
760
|
-
var tmp$ret$3 = this_0.
|
|
755
|
+
this_0.y(new Package(subPackageName.ov_1));
|
|
756
|
+
this_0.g1(this.b24_1);
|
|
757
|
+
this_0.g1(imports);
|
|
758
|
+
this_0.y(endpointImport);
|
|
759
|
+
this_0.g1(file.l1r_1);
|
|
760
|
+
var tmp$ret$3 = this_0.p5();
|
|
761
761
|
return new File(tmp, tmp$ret$3);
|
|
762
762
|
};
|
|
763
|
-
protoOf(ScalaIrEmitter).
|
|
763
|
+
protoOf(ScalaIrEmitter).n1z = function (endpoints, logger) {
|
|
764
764
|
// Inline function 'kotlin.collections.flatMap' call
|
|
765
765
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
766
766
|
var destination = ArrayList_init_$Create$_0();
|
|
@@ -776,9 +776,9 @@ protoOf(ScalaIrEmitter).c1w = function (endpoints, logger) {
|
|
|
776
776
|
var _iterator__ex2g4s_0 = destination.t();
|
|
777
777
|
while (_iterator__ex2g4s_0.u()) {
|
|
778
778
|
var e = _iterator__ex2g4s_0.v();
|
|
779
|
-
var key = e.
|
|
780
|
-
if (set.
|
|
781
|
-
list_0.
|
|
779
|
+
var key = e.my_1;
|
|
780
|
+
if (set.y(key)) {
|
|
781
|
+
list_0.y(e);
|
|
782
782
|
}
|
|
783
783
|
}
|
|
784
784
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -787,8 +787,8 @@ protoOf(ScalaIrEmitter).c1w = function (endpoints, logger) {
|
|
|
787
787
|
var _iterator__ex2g4s_1 = list_0.t();
|
|
788
788
|
while (_iterator__ex2g4s_1.u()) {
|
|
789
789
|
var item = _iterator__ex2g4s_1.v();
|
|
790
|
-
var tmp$ret$5 = import_0(this.
|
|
791
|
-
destination_0.
|
|
790
|
+
var tmp$ret$5 = import_0(this.j20().ov_1 + '.model', item.my_1);
|
|
791
|
+
destination_0.y(tmp$ret$5);
|
|
792
792
|
}
|
|
793
793
|
var imports = destination_0;
|
|
794
794
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -797,8 +797,8 @@ protoOf(ScalaIrEmitter).c1w = function (endpoints, logger) {
|
|
|
797
797
|
var _iterator__ex2g4s_2 = endpoints.t();
|
|
798
798
|
while (_iterator__ex2g4s_2.u()) {
|
|
799
799
|
var item_0 = _iterator__ex2g4s_2.v();
|
|
800
|
-
var tmp$ret$8 = import_0(this.
|
|
801
|
-
destination_1.
|
|
800
|
+
var tmp$ret$8 = import_0(this.j20().ov_1 + '.endpoint', item_0.ft_1.m1());
|
|
801
|
+
destination_1.y(tmp$ret$8);
|
|
802
802
|
}
|
|
803
803
|
var endpointImports = destination_1;
|
|
804
804
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -807,38 +807,38 @@ protoOf(ScalaIrEmitter).c1w = function (endpoints, logger) {
|
|
|
807
807
|
var _iterator__ex2g4s_3 = endpoints.t();
|
|
808
808
|
while (_iterator__ex2g4s_3.u()) {
|
|
809
809
|
var item_1 = _iterator__ex2g4s_3.v();
|
|
810
|
-
var tmp$ret$11 = import_0(this.
|
|
811
|
-
destination_2.
|
|
810
|
+
var tmp$ret$11 = import_0(this.j20().ov_1 + '.client', item_1.ft_1.m1() + 'Client');
|
|
811
|
+
destination_2.y(tmp$ret$11);
|
|
812
812
|
}
|
|
813
813
|
var clientImports = destination_2;
|
|
814
814
|
var allImports = plus(plus(imports, endpointImports), clientImports);
|
|
815
815
|
var file = addIdentityTypeToCall(sanitizeNames(emitClient.call(this, endpoints, logger), _get_sanitizationConfig__sns434(this)));
|
|
816
|
-
var tmp = Companion_getInstance().
|
|
816
|
+
var tmp = Companion_getInstance().c1l(this.j20().qv() + file.k1r_1.d1l());
|
|
817
817
|
// Inline function 'kotlin.collections.buildList' call
|
|
818
818
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
819
819
|
// Inline function 'kotlin.apply' call
|
|
820
820
|
var this_0 = ArrayList_init_$Create$_0();
|
|
821
|
-
this_0.
|
|
822
|
-
this_0.
|
|
823
|
-
this_0.
|
|
824
|
-
this_0.
|
|
825
|
-
var tmp$ret$17 = this_0.
|
|
821
|
+
this_0.y(new Package(this.j20().ov_1));
|
|
822
|
+
this_0.g1(this.b24_1);
|
|
823
|
+
this_0.g1(allImports);
|
|
824
|
+
this_0.g1(file.l1r_1);
|
|
825
|
+
var tmp$ret$17 = this_0.p5();
|
|
826
826
|
return new File(tmp, tmp$ret$17);
|
|
827
827
|
};
|
|
828
828
|
function convertToStringCallsToFieldAccess(_this__u8e3s4) {
|
|
829
829
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
830
830
|
var scope = new TransformScope(_this__u8e3s4);
|
|
831
|
-
scope.
|
|
832
|
-
var tmp = scope.
|
|
831
|
+
scope.d1z(convertToStringCallsToFieldAccess$lambda);
|
|
832
|
+
var tmp = scope.v1y_1;
|
|
833
833
|
return isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
834
834
|
}
|
|
835
835
|
function appendClientServerObjects(_this__u8e3s4, endpoint, requestIsObject) {
|
|
836
836
|
var reqType = requestIsObject ? 'Request.type' : 'Request';
|
|
837
|
-
var pathTemplate = '/' + joinToString(endpoint.
|
|
838
|
-
var pathSegmentsCode = joinToString(endpoint.
|
|
839
|
-
var clientObject = raw(trimMargin('\n |object Client extends Wirespec.Client[' + reqType + ', Response[?]] {\n | override val pathTemplate: String = "' + pathTemplate + '"\n | override val method: String = "' + endpoint.
|
|
840
|
-
var serverObject = raw(trimMargin('\n |object Server extends Wirespec.Server[' + reqType + ', Response[?]] {\n | override val pathTemplate: String = "' + pathTemplate + '"\n | override val method: String = "' + endpoint.
|
|
841
|
-
return _this__u8e3s4.
|
|
837
|
+
var pathTemplate = '/' + joinToString(endpoint.ht_1, '/', VOID, VOID, VOID, VOID, appendClientServerObjects$lambda);
|
|
838
|
+
var pathSegmentsCode = joinToString(endpoint.ht_1, ', ', VOID, VOID, VOID, VOID, appendClientServerObjects$lambda_0);
|
|
839
|
+
var clientObject = raw(trimMargin('\n |object Client extends Wirespec.Client[' + reqType + ', Response[?]] {\n | override val pathTemplate: String = "' + pathTemplate + '"\n | override val method: String = "' + endpoint.gt_1.toString() + '"\n | override val pathSegments: List[Wirespec.PathSegment] = List(' + pathSegmentsCode + ')\n | override def client(serialization: Wirespec.Serialization): Wirespec.ClientEdge[' + reqType + ', Response[?]] = new Wirespec.ClientEdge[' + reqType + ', Response[?]] {\n | override def to(request: ' + reqType + '): Wirespec.RawRequest = toRawRequest(serialization, request)\n | override def from(response: Wirespec.RawResponse): Response[?] = fromRawResponse(serialization, response)\n | }\n |}\n '));
|
|
840
|
+
var serverObject = raw(trimMargin('\n |object Server extends Wirespec.Server[' + reqType + ', Response[?]] {\n | override val pathTemplate: String = "' + pathTemplate + '"\n | override val method: String = "' + endpoint.gt_1.toString() + '"\n | override val pathSegments: List[Wirespec.PathSegment] = List(' + pathSegmentsCode + ')\n | override def server(serialization: Wirespec.Serialization): Wirespec.ServerEdge[' + reqType + ', Response[?]] = new Wirespec.ServerEdge[' + reqType + ', Response[?]] {\n | override def from(request: Wirespec.RawRequest): ' + reqType + ' = fromRawRequest(serialization, request)\n | override def to(response: Response[?]): Wirespec.RawResponse = toRawResponse(serialization, response)\n | }\n |}\n '));
|
|
841
|
+
return _this__u8e3s4.u1r(VOID, plus_0(plus_0(_this__u8e3s4.r1r_1, clientObject), serverObject));
|
|
842
842
|
}
|
|
843
843
|
function injectHandleFunction(_this__u8e3s4) {
|
|
844
844
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
@@ -846,26 +846,26 @@ function injectHandleFunction(_this__u8e3s4) {
|
|
|
846
846
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
847
847
|
var tmp = scope;
|
|
848
848
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
849
|
-
var this_0 = scope.
|
|
849
|
+
var this_0 = scope.v1y_1;
|
|
850
850
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
851
851
|
// Inline function 'kotlin.apply' call
|
|
852
852
|
var this_1 = new TransformerBuilder();
|
|
853
|
-
this_1.
|
|
854
|
-
var tmp$ret$2 = this_1.
|
|
855
|
-
tmp.
|
|
856
|
-
var tmp_0 = scope.
|
|
853
|
+
this_1.m1m(injectHandleFunction$lambda);
|
|
854
|
+
var tmp$ret$2 = this_1.n1m();
|
|
855
|
+
tmp.v1y_1 = transform(this_0, tmp$ret$2);
|
|
856
|
+
var tmp_0 = scope.v1y_1;
|
|
857
857
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
858
858
|
}
|
|
859
859
|
function isRequestObject(namespace) {
|
|
860
860
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
861
|
-
var tmp0 = namespace.
|
|
861
|
+
var tmp0 = namespace.r1r_1;
|
|
862
862
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
863
863
|
var destination = ArrayList_init_$Create$_0();
|
|
864
864
|
var _iterator__ex2g4s = tmp0.t();
|
|
865
865
|
while (_iterator__ex2g4s.u()) {
|
|
866
866
|
var element = _iterator__ex2g4s.v();
|
|
867
867
|
if (element instanceof Struct) {
|
|
868
|
-
destination.
|
|
868
|
+
destination.y(element);
|
|
869
869
|
}
|
|
870
870
|
}
|
|
871
871
|
var tmp$ret$3;
|
|
@@ -874,7 +874,7 @@ function isRequestObject(namespace) {
|
|
|
874
874
|
var _iterator__ex2g4s_0 = destination.t();
|
|
875
875
|
while (_iterator__ex2g4s_0.u()) {
|
|
876
876
|
var element_0 = _iterator__ex2g4s_0.v();
|
|
877
|
-
if (element_0.
|
|
877
|
+
if (element_0.v1r_1.d1l() === 'Request') {
|
|
878
878
|
tmp$ret$3 = element_0;
|
|
879
879
|
break $l$block;
|
|
880
880
|
}
|
|
@@ -889,7 +889,7 @@ function isRequestObject(namespace) {
|
|
|
889
889
|
tmp = tmp0_elvis_lhs;
|
|
890
890
|
}
|
|
891
891
|
var requestStruct = tmp;
|
|
892
|
-
return requestStruct.
|
|
892
|
+
return requestStruct.x1r_1.b1() === 1 && single(requestStruct.x1r_1).e1v_1.r() || (requestStruct.w1r_1.r() && requestStruct.x1r_1.r());
|
|
893
893
|
}
|
|
894
894
|
function buildModelImports(_this__u8e3s4, packageName) {
|
|
895
895
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
@@ -899,9 +899,9 @@ function buildModelImports(_this__u8e3s4, packageName) {
|
|
|
899
899
|
var _iterator__ex2g4s = this_0.t();
|
|
900
900
|
while (_iterator__ex2g4s.u()) {
|
|
901
901
|
var e = _iterator__ex2g4s.v();
|
|
902
|
-
var key = e.
|
|
903
|
-
if (set.
|
|
904
|
-
list.
|
|
902
|
+
var key = e.my_1;
|
|
903
|
+
if (set.y(key)) {
|
|
904
|
+
list.y(e);
|
|
905
905
|
}
|
|
906
906
|
}
|
|
907
907
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -910,8 +910,8 @@ function buildModelImports(_this__u8e3s4, packageName) {
|
|
|
910
910
|
var _iterator__ex2g4s_0 = list.t();
|
|
911
911
|
while (_iterator__ex2g4s_0.u()) {
|
|
912
912
|
var item = _iterator__ex2g4s_0.v();
|
|
913
|
-
var tmp$ret$2 = import_0(packageName.
|
|
914
|
-
destination.
|
|
913
|
+
var tmp$ret$2 = import_0(packageName.ov_1 + '.model', Companion_getInstance().c1l(item.my_1).d1l());
|
|
914
|
+
destination.y(tmp$ret$2);
|
|
915
915
|
}
|
|
916
916
|
return destination;
|
|
917
917
|
}
|
|
@@ -921,29 +921,29 @@ function addIdentityTypeToCall(_this__u8e3s4) {
|
|
|
921
921
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
922
922
|
var tmp = scope;
|
|
923
923
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
924
|
-
var this_0 = scope.
|
|
924
|
+
var this_0 = scope.v1y_1;
|
|
925
925
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
926
926
|
// Inline function 'kotlin.apply' call
|
|
927
927
|
var this_1 = new TransformerBuilder();
|
|
928
|
-
this_1.
|
|
929
|
-
var tmp$ret$2 = this_1.
|
|
930
|
-
tmp.
|
|
931
|
-
var tmp_0 = scope.
|
|
928
|
+
this_1.m1m(addIdentityTypeToCall$lambda);
|
|
929
|
+
var tmp$ret$2 = this_1.n1m();
|
|
930
|
+
tmp.v1y_1 = transform(this_0, tmp$ret$2);
|
|
931
|
+
var tmp_0 = scope.v1y_1;
|
|
932
932
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
933
933
|
}
|
|
934
934
|
function toScalaTypeName(_this__u8e3s4) {
|
|
935
935
|
var tmp;
|
|
936
936
|
if (_this__u8e3s4 instanceof Primitive) {
|
|
937
|
-
var t = _this__u8e3s4.
|
|
937
|
+
var t = _this__u8e3s4.qy_1;
|
|
938
938
|
var tmp_0;
|
|
939
939
|
if (t instanceof String_0) {
|
|
940
940
|
tmp_0 = 'String';
|
|
941
941
|
} else {
|
|
942
942
|
if (t instanceof Integer) {
|
|
943
|
-
tmp_0 = t.
|
|
943
|
+
tmp_0 = t.ux_1.equals(Precision_P32_getInstance()) ? 'Int' : 'Long';
|
|
944
944
|
} else {
|
|
945
945
|
if (t instanceof Number_0) {
|
|
946
|
-
tmp_0 = t.
|
|
946
|
+
tmp_0 = t.xx_1.equals(Precision_P32_getInstance()) ? 'Float' : 'Double';
|
|
947
947
|
} else {
|
|
948
948
|
if (equals(t, Boolean_instance)) {
|
|
949
949
|
tmp_0 = 'Boolean';
|
|
@@ -960,13 +960,13 @@ function toScalaTypeName(_this__u8e3s4) {
|
|
|
960
960
|
tmp = tmp_0;
|
|
961
961
|
} else {
|
|
962
962
|
if (_this__u8e3s4 instanceof Custom) {
|
|
963
|
-
tmp = _this__u8e3s4.
|
|
963
|
+
tmp = _this__u8e3s4.my_1;
|
|
964
964
|
} else {
|
|
965
965
|
if (_this__u8e3s4 instanceof Iterable) {
|
|
966
|
-
tmp = 'List[' + toScalaTypeName(_this__u8e3s4.
|
|
966
|
+
tmp = 'List[' + toScalaTypeName(_this__u8e3s4.as_1) + ']';
|
|
967
967
|
} else {
|
|
968
968
|
if (_this__u8e3s4 instanceof Dict) {
|
|
969
|
-
tmp = 'Map[String, ' + toScalaTypeName(_this__u8e3s4.
|
|
969
|
+
tmp = 'Map[String, ' + toScalaTypeName(_this__u8e3s4.ds_1) + ']';
|
|
970
970
|
} else {
|
|
971
971
|
if (_this__u8e3s4 instanceof Any) {
|
|
972
972
|
tmp = 'Any';
|
|
@@ -982,32 +982,32 @@ function toScalaTypeName(_this__u8e3s4) {
|
|
|
982
982
|
}
|
|
983
983
|
}
|
|
984
984
|
var base = tmp;
|
|
985
|
-
return _this__u8e3s4.
|
|
985
|
+
return _this__u8e3s4.ey() ? 'Option[' + base + ']' : base;
|
|
986
986
|
}
|
|
987
987
|
function convertToStringCallsToFieldAccess$lambda(expr, tr) {
|
|
988
988
|
var tmp;
|
|
989
989
|
var tmp_0;
|
|
990
990
|
var tmp_1;
|
|
991
991
|
if (expr instanceof FunctionCall) {
|
|
992
|
-
tmp_1 = expr.
|
|
992
|
+
tmp_1 = expr.p1q_1.f1q() === 'toString';
|
|
993
993
|
} else {
|
|
994
994
|
tmp_1 = false;
|
|
995
995
|
}
|
|
996
996
|
if (tmp_1) {
|
|
997
|
-
tmp_0 = !(expr.
|
|
997
|
+
tmp_0 = !(expr.n1q_1 == null);
|
|
998
998
|
} else {
|
|
999
999
|
tmp_0 = false;
|
|
1000
1000
|
}
|
|
1001
1001
|
if (tmp_0) {
|
|
1002
|
-
var tmp0_safe_receiver = expr.
|
|
1002
|
+
var tmp0_safe_receiver = expr.n1q_1;
|
|
1003
1003
|
var tmp_2;
|
|
1004
1004
|
if (tmp0_safe_receiver == null) {
|
|
1005
1005
|
tmp_2 = null;
|
|
1006
1006
|
} else {
|
|
1007
1007
|
// Inline function 'kotlin.let' call
|
|
1008
|
-
tmp_2 = tr.
|
|
1008
|
+
tmp_2 = tr.q1y(tmp0_safe_receiver);
|
|
1009
1009
|
}
|
|
1010
|
-
tmp = new FieldCall(tmp_2, Companion_getInstance().
|
|
1010
|
+
tmp = new FieldCall(tmp_2, Companion_getInstance().c1l('toString'));
|
|
1011
1011
|
} else {
|
|
1012
1012
|
tmp = transformChildren_1(expr, tr);
|
|
1013
1013
|
}
|
|
@@ -1016,10 +1016,10 @@ function convertToStringCallsToFieldAccess$lambda(expr, tr) {
|
|
|
1016
1016
|
function appendClientServerObjects$lambda(it) {
|
|
1017
1017
|
var tmp;
|
|
1018
1018
|
if (it instanceof Literal) {
|
|
1019
|
-
tmp = it.
|
|
1019
|
+
tmp = it.iu_1;
|
|
1020
1020
|
} else {
|
|
1021
1021
|
if (it instanceof Param) {
|
|
1022
|
-
tmp = '{' + it.
|
|
1022
|
+
tmp = '{' + it.mt_1.m1() + '}';
|
|
1023
1023
|
} else {
|
|
1024
1024
|
noWhenBranchMatchedException();
|
|
1025
1025
|
}
|
|
@@ -1029,10 +1029,10 @@ function appendClientServerObjects$lambda(it) {
|
|
|
1029
1029
|
function appendClientServerObjects$lambda_0(segment) {
|
|
1030
1030
|
var tmp;
|
|
1031
1031
|
if (segment instanceof Literal) {
|
|
1032
|
-
tmp = 'Wirespec.Literal("' + segment.
|
|
1032
|
+
tmp = 'Wirespec.Literal("' + segment.iu_1 + '")';
|
|
1033
1033
|
} else {
|
|
1034
1034
|
if (segment instanceof Param) {
|
|
1035
|
-
tmp = 'Wirespec.Param("' + segment.
|
|
1035
|
+
tmp = 'Wirespec.Param("' + segment.mt_1.m1() + '", scala.reflect.classTag[' + toScalaTypeName(segment.nt_1) + '])';
|
|
1036
1036
|
} else {
|
|
1037
1037
|
noWhenBranchMatchedException();
|
|
1038
1038
|
}
|
|
@@ -1044,13 +1044,13 @@ function injectHandleFunction$lambda(element, transformer) {
|
|
|
1044
1044
|
if (element instanceof Interface) {
|
|
1045
1045
|
var tmp$ret$0;
|
|
1046
1046
|
$l$block: {
|
|
1047
|
-
if (!element.
|
|
1047
|
+
if (!element.e1s_1.equals(Companion_getInstance().c1l('Handler')) && !element.e1s_1.equals(Companion_getInstance().c1l('Call'))) {
|
|
1048
1048
|
tmp$ret$0 = element;
|
|
1049
1049
|
break $l$block;
|
|
1050
1050
|
}
|
|
1051
1051
|
var tmp0_typeParameters = listOf(new TypeParameter(Custom_init_$Create$('F[_]')));
|
|
1052
1052
|
// Inline function 'kotlin.collections.map' call
|
|
1053
|
-
var this_0 = element.
|
|
1053
|
+
var this_0 = element.f1s_1;
|
|
1054
1054
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1055
1055
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1056
1056
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -1061,7 +1061,7 @@ function injectHandleFunction$lambda(element, transformer) {
|
|
|
1061
1061
|
if (tmp0_safe_receiver == null) {
|
|
1062
1062
|
tmp_0 = null;
|
|
1063
1063
|
} else {
|
|
1064
|
-
var tmp1_safe_receiver = item.
|
|
1064
|
+
var tmp1_safe_receiver = item.v1o_1;
|
|
1065
1065
|
var tmp_1;
|
|
1066
1066
|
if (tmp1_safe_receiver == null) {
|
|
1067
1067
|
tmp_1 = null;
|
|
@@ -1070,13 +1070,13 @@ function injectHandleFunction$lambda(element, transformer) {
|
|
|
1070
1070
|
tmp_1 = Custom_init_$Create$('F', listOf(tmp1_safe_receiver));
|
|
1071
1071
|
}
|
|
1072
1072
|
var tmp3_returnType = tmp_1;
|
|
1073
|
-
tmp_0 = tmp0_safe_receiver.
|
|
1073
|
+
tmp_0 = tmp0_safe_receiver.a1p(VOID, VOID, VOID, tmp3_returnType, VOID, false);
|
|
1074
1074
|
}
|
|
1075
1075
|
var tmp4_elvis_lhs = tmp_0;
|
|
1076
1076
|
var tmp$ret$3 = tmp4_elvis_lhs == null ? item : tmp4_elvis_lhs;
|
|
1077
|
-
destination.
|
|
1077
|
+
destination.y(tmp$ret$3);
|
|
1078
1078
|
}
|
|
1079
|
-
tmp$ret$0 = element.
|
|
1079
|
+
tmp$ret$0 = element.l1s(VOID, destination, VOID, VOID, tmp0_typeParameters);
|
|
1080
1080
|
}
|
|
1081
1081
|
tmp = tmp$ret$0;
|
|
1082
1082
|
} else {
|
|
@@ -1089,7 +1089,7 @@ function addIdentityTypeToCall$lambda(element, transformer) {
|
|
|
1089
1089
|
var tmp;
|
|
1090
1090
|
if (element instanceof Struct) {
|
|
1091
1091
|
// Inline function 'kotlin.collections.map' call
|
|
1092
|
-
var this_0 = element.
|
|
1092
|
+
var this_0 = element.y1r_1;
|
|
1093
1093
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1094
1094
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1095
1095
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -1102,7 +1102,7 @@ function addIdentityTypeToCall$lambda(element, transformer) {
|
|
|
1102
1102
|
} else {
|
|
1103
1103
|
// Inline function 'kotlin.takeIf' call
|
|
1104
1104
|
var tmp_1;
|
|
1105
|
-
if (endsWith(tmp0_safe_receiver.
|
|
1105
|
+
if (endsWith(tmp0_safe_receiver.w1m_1.d1l(), '.Call')) {
|
|
1106
1106
|
tmp_1 = tmp0_safe_receiver;
|
|
1107
1107
|
} else {
|
|
1108
1108
|
tmp_1 = null;
|
|
@@ -1110,11 +1110,11 @@ function addIdentityTypeToCall$lambda(element, transformer) {
|
|
|
1110
1110
|
tmp_0 = tmp_1;
|
|
1111
1111
|
}
|
|
1112
1112
|
var tmp1_safe_receiver = tmp_0;
|
|
1113
|
-
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
1113
|
+
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.b1r(VOID, listOf(Custom_init_$Create$('[A] =>> A')));
|
|
1114
1114
|
var tmp$ret$2 = tmp2_elvis_lhs == null ? item : tmp2_elvis_lhs;
|
|
1115
|
-
destination.
|
|
1115
|
+
destination.y(tmp$ret$2);
|
|
1116
1116
|
}
|
|
1117
|
-
tmp = element.
|
|
1117
|
+
tmp = element.c1s(VOID, VOID, VOID, destination);
|
|
1118
1118
|
} else {
|
|
1119
1119
|
tmp = element;
|
|
1120
1120
|
}
|
|
@@ -1122,9 +1122,9 @@ function addIdentityTypeToCall$lambda(element, transformer) {
|
|
|
1122
1122
|
return transformChildren_0(transformed, transformer);
|
|
1123
1123
|
}
|
|
1124
1124
|
//region block: post-declaration
|
|
1125
|
-
protoOf(ScalaIrEmitter).
|
|
1126
|
-
protoOf(ScalaIrEmitter).
|
|
1127
|
-
protoOf(ScalaIrEmitter).
|
|
1125
|
+
protoOf(ScalaIrEmitter).k1z = get_extensions;
|
|
1126
|
+
protoOf(ScalaIrEmitter).pr = emit_0;
|
|
1127
|
+
protoOf(ScalaIrEmitter).l1z = emit_1;
|
|
1128
1128
|
//endregion
|
|
1129
1129
|
//region block: exports
|
|
1130
1130
|
export {
|