@flock/wirespec 0.19.2 → 0.19.3-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 +5269 -2487
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +10266 -10266
- 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 +2132 -2098
- 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 +1597 -1597
- package/wirespec-src-compiler-emitters-java.mjs +451 -451
- package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-kotlin.mjs +371 -371
- package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-python.mjs +456 -456
- package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-rust.mjs +481 -481
- package/wirespec-src-compiler-emitters-scala.mjs +193 -193
- package/wirespec-src-compiler-emitters-typescript.mjs +526 -526
- package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-wirespec.mjs +85 -85
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-ir.mjs +3913 -3857
- package/wirespec-src-compiler-ir.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +439 -439
- 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
|
@@ -145,15 +145,15 @@ initMetadataForCompanion(Companion);
|
|
|
145
145
|
initMetadataForClass(ScalaIrEmitter, 'ScalaIrEmitter', ScalaIrEmitter, VOID, [IrEmitter]);
|
|
146
146
|
//endregion
|
|
147
147
|
function _get_sanitizationConfig__sns434($this) {
|
|
148
|
-
var tmp0 = $this.
|
|
148
|
+
var tmp0 = $this.w23_1;
|
|
149
149
|
var tmp = KProperty1;
|
|
150
150
|
// Inline function 'kotlin.getValue' call
|
|
151
151
|
getPropertyCallableRef('sanitizationConfig', 1, tmp, ScalaIrEmitter$_get_sanitizationConfig_$ref_ydarb0(), null);
|
|
152
|
-
return tmp0.
|
|
152
|
+
return tmp0.m1();
|
|
153
153
|
}
|
|
154
154
|
function sanitize($this, _this__u8e3s4) {
|
|
155
155
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
156
|
-
var this_0 = split(_this__u8e3s4.
|
|
156
|
+
var this_0 = split(_this__u8e3s4.m1(), ['.', ' ']);
|
|
157
157
|
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
158
158
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
159
159
|
var index = 0;
|
|
@@ -162,8 +162,8 @@ function sanitize($this, _this__u8e3s4) {
|
|
|
162
162
|
var item = _iterator__ex2g4s.v();
|
|
163
163
|
var _unary__edvuaz = index;
|
|
164
164
|
index = _unary__edvuaz + 1 | 0;
|
|
165
|
-
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.
|
|
166
|
-
destination.
|
|
165
|
+
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.pu(item) : item;
|
|
166
|
+
destination.y(tmp$ret$0);
|
|
167
167
|
}
|
|
168
168
|
// Inline function 'kotlin.text.filter' call
|
|
169
169
|
var tmp0 = joinToString(destination, '');
|
|
@@ -210,7 +210,7 @@ function sanitizeFirstIsDigit($this, _this__u8e3s4) {
|
|
|
210
210
|
return tmp;
|
|
211
211
|
}
|
|
212
212
|
function sanitizeKeywords($this, _this__u8e3s4) {
|
|
213
|
-
return Companion_getInstance_0().
|
|
213
|
+
return Companion_getInstance_0().x23_1.v1(_this__u8e3s4) ? addBackticks(_this__u8e3s4) : _this__u8e3s4;
|
|
214
214
|
}
|
|
215
215
|
function sanitizeSymbol($this, _this__u8e3s4) {
|
|
216
216
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
@@ -223,8 +223,8 @@ function sanitizeSymbol($this, _this__u8e3s4) {
|
|
|
223
223
|
var item = _iterator__ex2g4s.v();
|
|
224
224
|
var _unary__edvuaz = index;
|
|
225
225
|
index = _unary__edvuaz + 1 | 0;
|
|
226
|
-
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.
|
|
227
|
-
destination.
|
|
226
|
+
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.pu(item) : item;
|
|
227
|
+
destination.y(tmp$ret$0);
|
|
228
228
|
}
|
|
229
229
|
// Inline function 'kotlin.text.filter' call
|
|
230
230
|
var tmp0 = joinToString(destination, '');
|
|
@@ -250,7 +250,7 @@ function sanitizeEnum($this, _this__u8e3s4) {
|
|
|
250
250
|
}
|
|
251
251
|
function Companion() {
|
|
252
252
|
Companion_instance_2 = this;
|
|
253
|
-
this.
|
|
253
|
+
this.x23_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']);
|
|
254
254
|
}
|
|
255
255
|
var Companion_instance_2;
|
|
256
256
|
function Companion_getInstance_0() {
|
|
@@ -263,13 +263,13 @@ function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda(it) {
|
|
|
263
263
|
}
|
|
264
264
|
function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0) {
|
|
265
265
|
return function (name) {
|
|
266
|
-
var sanitized = name.
|
|
266
|
+
var sanitized = name.w1k_1.b1() > 1 ? name.b1q() : sanitizeSymbol(this$0, name.u1m());
|
|
267
267
|
return new Name(listOf(sanitized));
|
|
268
268
|
};
|
|
269
269
|
}
|
|
270
270
|
function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0) {
|
|
271
271
|
return function (name) {
|
|
272
|
-
return new Name(listOf(sanitizeSymbol(this$0, name.
|
|
272
|
+
return new Name(listOf(sanitizeSymbol(this$0, name.b1q())));
|
|
273
273
|
};
|
|
274
274
|
}
|
|
275
275
|
function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_2(this$0) {
|
|
@@ -282,29 +282,29 @@ function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
282
282
|
var tmp;
|
|
283
283
|
var tmp_0;
|
|
284
284
|
if (stmt instanceof FunctionCall) {
|
|
285
|
-
tmp_0 = stmt.
|
|
285
|
+
tmp_0 = stmt.l1q_1.u1m() === 'validate';
|
|
286
286
|
} else {
|
|
287
287
|
tmp_0 = false;
|
|
288
288
|
}
|
|
289
289
|
if (tmp_0) {
|
|
290
|
-
tmp = transformChildren(stmt.
|
|
290
|
+
tmp = transformChildren(stmt.p1q(VOID, emptyList()), tr);
|
|
291
291
|
} else {
|
|
292
292
|
if (stmt instanceof ConstructorStatement) {
|
|
293
|
-
var tmp_1 = tr.
|
|
293
|
+
var tmp_1 = tr.j1y(stmt.d1r_1);
|
|
294
294
|
// Inline function 'kotlin.collections.map' call
|
|
295
|
-
var this_0 = stmt.
|
|
295
|
+
var this_0 = stmt.e1r_1;
|
|
296
296
|
// Inline function 'kotlin.collections.mapTo' call
|
|
297
|
-
var destination = ArrayList_init_$Create$(this_0.
|
|
297
|
+
var destination = ArrayList_init_$Create$(this_0.b1());
|
|
298
298
|
// Inline function 'kotlin.collections.iterator' call
|
|
299
|
-
var _iterator__ex2g4s = this_0.
|
|
299
|
+
var _iterator__ex2g4s = this_0.k1().t();
|
|
300
300
|
while (_iterator__ex2g4s.u()) {
|
|
301
301
|
var item = _iterator__ex2g4s.v();
|
|
302
302
|
// Inline function 'kotlin.collections.component1' call
|
|
303
|
-
var name = item.
|
|
303
|
+
var name = item.l1();
|
|
304
304
|
// Inline function 'kotlin.collections.component2' call
|
|
305
|
-
var expr = item.
|
|
306
|
-
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), name), tr.
|
|
307
|
-
destination.
|
|
305
|
+
var expr = item.m1();
|
|
306
|
+
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), name), tr.m1y(expr));
|
|
307
|
+
destination.y(tmp$ret$3);
|
|
308
308
|
}
|
|
309
309
|
tmp = new ConstructorStatement(tmp_1, toMap(destination));
|
|
310
310
|
} else {
|
|
@@ -316,7 +316,7 @@ function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
316
316
|
}
|
|
317
317
|
function ScalaIrEmitter$sanitizationConfig$delegate$lambda(this$0) {
|
|
318
318
|
return function () {
|
|
319
|
-
var tmp = Companion_getInstance_0().
|
|
319
|
+
var tmp = Companion_getInstance_0().x23_1;
|
|
320
320
|
var tmp_0 = ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda;
|
|
321
321
|
var tmp_1 = ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0);
|
|
322
322
|
var tmp_2 = ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0);
|
|
@@ -330,36 +330,36 @@ function ScalaIrEmitter$_get_sanitizationConfig_$ref_ydarb0() {
|
|
|
330
330
|
};
|
|
331
331
|
}
|
|
332
332
|
function ScalaIrEmitter$emitShared$lambda($this$struct) {
|
|
333
|
-
$this$struct.
|
|
334
|
-
$this$struct.
|
|
333
|
+
$this$struct.f1o(Custom_init_$Create$('PathSegment'));
|
|
334
|
+
$this$struct.a1o('value', String_instance);
|
|
335
335
|
return Unit_instance;
|
|
336
336
|
}
|
|
337
337
|
function ScalaIrEmitter$emitShared$lambda_0($this$struct) {
|
|
338
|
-
$this$struct.
|
|
339
|
-
$this$struct.
|
|
340
|
-
$this$struct.
|
|
338
|
+
$this$struct.f1o(Custom_init_$Create$('PathSegment'));
|
|
339
|
+
$this$struct.a1o('name', String_instance);
|
|
340
|
+
$this$struct.a1o('type', Reflect_instance);
|
|
341
341
|
return Unit_instance;
|
|
342
342
|
}
|
|
343
343
|
function ScalaIrEmitter$emitShared$lambda_1(element, transformer) {
|
|
344
344
|
var tmp;
|
|
345
345
|
if (element instanceof File) {
|
|
346
346
|
// Inline function 'kotlin.collections.partition' call
|
|
347
|
-
var this_0 = element.
|
|
347
|
+
var this_0 = element.h1r_1;
|
|
348
348
|
var first = ArrayList_init_$Create$_0();
|
|
349
349
|
var second = ArrayList_init_$Create$_0();
|
|
350
350
|
var _iterator__ex2g4s = this_0.t();
|
|
351
351
|
while (_iterator__ex2g4s.u()) {
|
|
352
352
|
var element_0 = _iterator__ex2g4s.v();
|
|
353
353
|
if (element_0 instanceof Package) {
|
|
354
|
-
first.
|
|
354
|
+
first.y(element_0);
|
|
355
355
|
} else {
|
|
356
|
-
second.
|
|
356
|
+
second.y(element_0);
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
359
|
var _destruct__k2r9zo = new Pair(first, second);
|
|
360
|
-
var packageElements = _destruct__k2r9zo.
|
|
361
|
-
var rest = _destruct__k2r9zo.
|
|
362
|
-
tmp = element.
|
|
360
|
+
var packageElements = _destruct__k2r9zo.mf();
|
|
361
|
+
var rest = _destruct__k2r9zo.nf();
|
|
362
|
+
tmp = element.k1r(VOID, plus(packageElements, rest));
|
|
363
363
|
} else {
|
|
364
364
|
tmp = element;
|
|
365
365
|
}
|
|
@@ -371,12 +371,12 @@ function ScalaIrEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
371
371
|
if (element instanceof Namespace) {
|
|
372
372
|
var tmp$ret$0;
|
|
373
373
|
$l$block: {
|
|
374
|
-
if (!element.
|
|
374
|
+
if (!element.m1r_1.equals(Companion_getInstance().y1k('Wirespec'))) {
|
|
375
375
|
tmp$ret$0 = element;
|
|
376
376
|
break $l$block;
|
|
377
377
|
}
|
|
378
378
|
// Inline function 'kotlin.collections.flatMap' call
|
|
379
|
-
var tmp0 = element.
|
|
379
|
+
var tmp0 = element.n1r_1;
|
|
380
380
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
381
381
|
var destination = ArrayList_init_$Create$_0();
|
|
382
382
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -388,21 +388,21 @@ function ScalaIrEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
388
388
|
if (!(element_0 instanceof Interface)) {
|
|
389
389
|
tmp_0 = true;
|
|
390
390
|
} else {
|
|
391
|
-
tmp_0 = !setOf(['Request', 'Response']).
|
|
391
|
+
tmp_0 = !setOf(['Request', 'Response']).v1(element_0.a1s_1.z1k());
|
|
392
392
|
}
|
|
393
393
|
if (tmp_0) {
|
|
394
394
|
tmp$ret$1 = listOf(element_0);
|
|
395
395
|
break $l$block_2;
|
|
396
396
|
}
|
|
397
397
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
398
|
-
var tmp0_0 = element_0.
|
|
398
|
+
var tmp0_0 = element_0.b1s_1;
|
|
399
399
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
400
400
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
401
401
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
402
402
|
while (_iterator__ex2g4s_0.u()) {
|
|
403
403
|
var element_1 = _iterator__ex2g4s_0.v();
|
|
404
404
|
if (element_1 instanceof Interface) {
|
|
405
|
-
destination_0.
|
|
405
|
+
destination_0.y(element_1);
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
408
|
var tmp$ret$5;
|
|
@@ -411,7 +411,7 @@ function ScalaIrEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
411
411
|
var _iterator__ex2g4s_1 = destination_0.t();
|
|
412
412
|
while (_iterator__ex2g4s_1.u()) {
|
|
413
413
|
var element_2 = _iterator__ex2g4s_1.v();
|
|
414
|
-
if (element_2.
|
|
414
|
+
if (element_2.a1s_1.z1k() === 'Headers') {
|
|
415
415
|
tmp$ret$5 = element_2;
|
|
416
416
|
break $l$block_1;
|
|
417
417
|
}
|
|
@@ -427,9 +427,9 @@ function ScalaIrEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
427
427
|
tmp_1 = tmp0_elvis_lhs;
|
|
428
428
|
}
|
|
429
429
|
var nestedHeaders = tmp_1;
|
|
430
|
-
var tmp_2 = new Namespace(element_0.
|
|
430
|
+
var tmp_2 = new Namespace(element_0.a1s_1, listOf(nestedHeaders));
|
|
431
431
|
// Inline function 'kotlin.collections.filter' call
|
|
432
|
-
var tmp0_1 = element_0.
|
|
432
|
+
var tmp0_1 = element_0.b1s_1;
|
|
433
433
|
// Inline function 'kotlin.collections.filterTo' call
|
|
434
434
|
var destination_1 = ArrayList_init_$Create$_0();
|
|
435
435
|
var _iterator__ex2g4s_2 = tmp0_1.t();
|
|
@@ -437,38 +437,38 @@ function ScalaIrEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
437
437
|
var element_3 = _iterator__ex2g4s_2.v();
|
|
438
438
|
var tmp_3;
|
|
439
439
|
if (element_3 instanceof Interface) {
|
|
440
|
-
tmp_3 = element_3.
|
|
440
|
+
tmp_3 = element_3.a1s_1.z1k() === 'Headers';
|
|
441
441
|
} else {
|
|
442
442
|
tmp_3 = false;
|
|
443
443
|
}
|
|
444
444
|
if (!tmp_3) {
|
|
445
|
-
destination_1.
|
|
445
|
+
destination_1.y(element_3);
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
448
|
var tmp_4 = destination_1;
|
|
449
449
|
// Inline function 'kotlin.collections.map' call
|
|
450
|
-
var this_0 = element_0.
|
|
450
|
+
var this_0 = element_0.f1s_1;
|
|
451
451
|
// Inline function 'kotlin.collections.mapTo' call
|
|
452
452
|
var destination_2 = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
453
453
|
var _iterator__ex2g4s_3 = this_0.t();
|
|
454
454
|
while (_iterator__ex2g4s_3.u()) {
|
|
455
455
|
var item = _iterator__ex2g4s_3.v();
|
|
456
456
|
var tmp_5;
|
|
457
|
-
if (item.
|
|
458
|
-
tmp_5 = item.
|
|
457
|
+
if (item.n1t_1.u1m() === 'headers') {
|
|
458
|
+
tmp_5 = item.r1t(VOID, Custom_init_$Create$(element_0.a1s_1.z1k() + '.Headers'));
|
|
459
459
|
} else {
|
|
460
460
|
tmp_5 = item;
|
|
461
461
|
}
|
|
462
462
|
var tmp$ret$9 = tmp_5;
|
|
463
|
-
destination_2.
|
|
463
|
+
destination_2.y(tmp$ret$9);
|
|
464
464
|
}
|
|
465
|
-
tmp$ret$1 = listOf_0([tmp_2, element_0.
|
|
465
|
+
tmp$ret$1 = listOf_0([tmp_2, element_0.h1s(VOID, tmp_4, VOID, VOID, VOID, destination_2)]);
|
|
466
466
|
}
|
|
467
467
|
var list = tmp$ret$1;
|
|
468
468
|
addAll(destination, list);
|
|
469
469
|
}
|
|
470
470
|
var newElements = destination;
|
|
471
|
-
tmp$ret$0 = element.
|
|
471
|
+
tmp$ret$0 = element.q1r(VOID, newElements);
|
|
472
472
|
}
|
|
473
473
|
tmp = tmp$ret$0;
|
|
474
474
|
} else {
|
|
@@ -481,11 +481,11 @@ function ScalaIrEmitter$emitShared$lambda_3($clientServer) {
|
|
|
481
481
|
return function (element, transformer) {
|
|
482
482
|
var tmp;
|
|
483
483
|
if (element instanceof Namespace) {
|
|
484
|
-
var injected = element.
|
|
484
|
+
var injected = element.m1r_1.equals(Companion_getInstance().y1k('Wirespec')) ? $clientServer : emptyList();
|
|
485
485
|
var tmp_0;
|
|
486
486
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
487
487
|
if (!injected.r()) {
|
|
488
|
-
tmp_0 = withElements(element, plus(element.
|
|
488
|
+
tmp_0 = withElements(element, plus(element.i1r(), injected));
|
|
489
489
|
} else {
|
|
490
490
|
tmp_0 = element;
|
|
491
491
|
}
|
|
@@ -515,30 +515,30 @@ function ScalaIrEmitter$emit$lambda(this$0) {
|
|
|
515
515
|
}
|
|
516
516
|
function ScalaIrEmitter(packageName, emitShared) {
|
|
517
517
|
Companion_getInstance_0();
|
|
518
|
-
packageName = packageName === VOID ? Companion_instance_0.
|
|
519
|
-
emitShared = emitShared === VOID ? Companion_instance_1.
|
|
520
|
-
this.
|
|
521
|
-
this.
|
|
522
|
-
this.
|
|
523
|
-
this.
|
|
524
|
-
this.
|
|
518
|
+
packageName = packageName === VOID ? Companion_instance_0.nv('community.flock.wirespec.generated') : packageName;
|
|
519
|
+
emitShared = emitShared === VOID ? Companion_instance_1.hs() : emitShared;
|
|
520
|
+
this.r23_1 = packageName;
|
|
521
|
+
this.s23_1 = emitShared;
|
|
522
|
+
this.t23_1 = ScalaGenerator_getInstance();
|
|
523
|
+
this.u23_1 = FileExtension_Scala_getInstance();
|
|
524
|
+
this.v23_1 = listOf_0([import_0('community.flock.wirespec.scala', 'Wirespec'), import_0('scala.reflect', 'ClassTag')]);
|
|
525
525
|
var tmp = this;
|
|
526
|
-
tmp.
|
|
526
|
+
tmp.w23_1 = lazy(ScalaIrEmitter$sanitizationConfig$delegate$lambda(this));
|
|
527
527
|
}
|
|
528
|
-
protoOf(ScalaIrEmitter).
|
|
529
|
-
return this.
|
|
528
|
+
protoOf(ScalaIrEmitter).d20 = function () {
|
|
529
|
+
return this.r23_1;
|
|
530
530
|
};
|
|
531
|
-
protoOf(ScalaIrEmitter).
|
|
532
|
-
return this.
|
|
531
|
+
protoOf(ScalaIrEmitter).e1z = function () {
|
|
532
|
+
return this.t23_1;
|
|
533
533
|
};
|
|
534
|
-
protoOf(ScalaIrEmitter).
|
|
535
|
-
return this.
|
|
534
|
+
protoOf(ScalaIrEmitter).fu = function () {
|
|
535
|
+
return this.u23_1;
|
|
536
536
|
};
|
|
537
|
-
protoOf(ScalaIrEmitter).
|
|
538
|
-
ScalaGenerator_getInstance().
|
|
537
|
+
protoOf(ScalaIrEmitter).j1z = function (allFiles) {
|
|
538
|
+
ScalaGenerator_getInstance().q1z(allFiles);
|
|
539
539
|
};
|
|
540
|
-
protoOf(ScalaIrEmitter).
|
|
541
|
-
var packageName = Companion_instance_0.
|
|
540
|
+
protoOf(ScalaIrEmitter).h1z = function () {
|
|
541
|
+
var packageName = Companion_instance_0.nv('community.flock.wirespec.scala');
|
|
542
542
|
var tmp = interface_0('PathSegment', true);
|
|
543
543
|
var tmp_0 = struct('Literal', ScalaIrEmitter$emitShared$lambda);
|
|
544
544
|
var pathSegmentTypes = listOf_0([tmp, tmp_0, struct('Param', ScalaIrEmitter$emitShared$lambda_0)]);
|
|
@@ -552,17 +552,17 @@ protoOf(ScalaIrEmitter).v1v = function () {
|
|
|
552
552
|
var tmp_1;
|
|
553
553
|
var tmp_2;
|
|
554
554
|
if (item instanceof Interface) {
|
|
555
|
-
tmp_2 = setOf(['Client', 'Server']).
|
|
555
|
+
tmp_2 = setOf(['Client', 'Server']).v1(item.a1s_1.z1k());
|
|
556
556
|
} else {
|
|
557
557
|
tmp_2 = false;
|
|
558
558
|
}
|
|
559
559
|
if (tmp_2) {
|
|
560
|
-
tmp_1 = item.
|
|
560
|
+
tmp_1 = item.h1s(VOID, VOID, VOID, VOID, VOID, plus_0(item.f1s_1, new Field(Companion_getInstance().y1k('pathSegments'), new Array_0(Custom_init_$Create$('PathSegment')))));
|
|
561
561
|
} else {
|
|
562
562
|
tmp_1 = item;
|
|
563
563
|
}
|
|
564
564
|
var tmp$ret$0 = tmp_1;
|
|
565
|
-
destination.
|
|
565
|
+
destination.y(tmp$ret$0);
|
|
566
566
|
}
|
|
567
567
|
var clientServer = plus(pathSegmentTypes, destination);
|
|
568
568
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
@@ -571,58 +571,58 @@ protoOf(ScalaIrEmitter).v1v = function () {
|
|
|
571
571
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
572
572
|
var tmp_3 = scope;
|
|
573
573
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
574
|
-
var this_2 = scope.
|
|
574
|
+
var this_2 = scope.r1y_1;
|
|
575
575
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
576
576
|
// Inline function 'kotlin.apply' call
|
|
577
577
|
var this_3 = new TransformerBuilder();
|
|
578
|
-
this_3.
|
|
579
|
-
var tmp$ret$5 = this_3.
|
|
580
|
-
tmp_3.
|
|
578
|
+
this_3.i1m(ScalaIrEmitter$emitShared$lambda_1);
|
|
579
|
+
var tmp$ret$5 = this_3.j1m();
|
|
580
|
+
tmp_3.r1y_1 = transform(this_2, tmp$ret$5);
|
|
581
581
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
582
582
|
var tmp_4 = scope;
|
|
583
583
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
584
|
-
var this_4 = scope.
|
|
584
|
+
var this_4 = scope.r1y_1;
|
|
585
585
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
586
586
|
// Inline function 'kotlin.apply' call
|
|
587
587
|
var this_5 = new TransformerBuilder();
|
|
588
|
-
this_5.
|
|
589
|
-
var tmp$ret$10 = this_5.
|
|
590
|
-
tmp_4.
|
|
588
|
+
this_5.i1m(ScalaIrEmitter$emitShared$lambda_2);
|
|
589
|
+
var tmp$ret$10 = this_5.j1m();
|
|
590
|
+
tmp_4.r1y_1 = transform(this_4, tmp$ret$10);
|
|
591
591
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.injectAfter' call
|
|
592
592
|
var tmp_5 = scope;
|
|
593
593
|
// Inline function 'community.flock.wirespec.ir.core.injectAfter' call
|
|
594
594
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
595
|
-
var this_6 = scope.
|
|
595
|
+
var this_6 = scope.r1y_1;
|
|
596
596
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
597
597
|
// Inline function 'kotlin.apply' call
|
|
598
598
|
var this_7 = new TransformerBuilder();
|
|
599
|
-
this_7.
|
|
600
|
-
var tmp$ret$15 = this_7.
|
|
601
|
-
tmp_5.
|
|
602
|
-
var tmp_6 = scope.
|
|
599
|
+
this_7.i1m(ScalaIrEmitter$emitShared$lambda_3(clientServer));
|
|
600
|
+
var tmp$ret$15 = this_7.j1m();
|
|
601
|
+
tmp_5.r1y_1 = transform(this_6, tmp$ret$15);
|
|
602
|
+
var tmp_6 = scope.r1y_1;
|
|
603
603
|
var wirespecShared = isInterface(tmp_6, Element) ? tmp_6 : THROW_CCE();
|
|
604
604
|
var tmp_7;
|
|
605
|
-
if (this.
|
|
606
|
-
tmp_7 = wirespecShared.
|
|
605
|
+
if (this.s23_1.is_1) {
|
|
606
|
+
tmp_7 = wirespecShared.k1r(Companion_getInstance().y1k(packageName.qv() + 'Wirespec'));
|
|
607
607
|
} else {
|
|
608
608
|
tmp_7 = null;
|
|
609
609
|
}
|
|
610
610
|
return tmp_7;
|
|
611
611
|
};
|
|
612
|
-
protoOf(ScalaIrEmitter).
|
|
612
|
+
protoOf(ScalaIrEmitter).wu = function (definition, module_0, logger) {
|
|
613
613
|
var file = emit.call(this, definition, module_0, logger);
|
|
614
614
|
// Inline function 'kotlin.takeIf' call
|
|
615
|
-
var this_0 = this.
|
|
615
|
+
var this_0 = this.v23_1;
|
|
616
616
|
var tmp;
|
|
617
|
-
if (Companion_instance.
|
|
617
|
+
if (Companion_instance.su(module_0)) {
|
|
618
618
|
tmp = this_0;
|
|
619
619
|
} else {
|
|
620
620
|
tmp = null;
|
|
621
621
|
}
|
|
622
622
|
var tmp$ret$1 = tmp;
|
|
623
|
-
return placeInPackage(prependImports(file, tmp$ret$1), this.
|
|
623
|
+
return placeInPackage(prependImports(file, tmp$ret$1), this.d20(), definition);
|
|
624
624
|
};
|
|
625
|
-
protoOf(ScalaIrEmitter).
|
|
625
|
+
protoOf(ScalaIrEmitter).l1z = function (definition, module_0) {
|
|
626
626
|
var tmp;
|
|
627
627
|
if (definition instanceof Type) {
|
|
628
628
|
tmp = convertToGenerator_2(definition, module_0);
|
|
@@ -643,7 +643,7 @@ protoOf(ScalaIrEmitter).z1v = function (definition, module_0) {
|
|
|
643
643
|
}
|
|
644
644
|
var generatorFile = tmp;
|
|
645
645
|
var sanitized = sanitizeNames(generatorFile, _get_sanitizationConfig__sns434(this));
|
|
646
|
-
var generatorOwnName = definition.
|
|
646
|
+
var generatorOwnName = definition.xu().m1() + 'Generator';
|
|
647
647
|
var tmp_0 = asSequence(collectCustomTypeNames(sanitized));
|
|
648
648
|
var tmp_1 = filterNot(tmp_0, ScalaIrEmitter$emitGenerator$lambda);
|
|
649
649
|
var tmp_2 = filterNot(tmp_1, ScalaIrEmitter$emitGenerator$lambda_0(generatorOwnName));
|
|
@@ -655,7 +655,7 @@ protoOf(ScalaIrEmitter).z1v = function (definition, module_0) {
|
|
|
655
655
|
while (_iterator__ex2g4s.u()) {
|
|
656
656
|
var element = _iterator__ex2g4s.v();
|
|
657
657
|
if (!endsWith(element, 'Generator')) {
|
|
658
|
-
destination.
|
|
658
|
+
destination.y(element);
|
|
659
659
|
}
|
|
660
660
|
}
|
|
661
661
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -664,59 +664,59 @@ protoOf(ScalaIrEmitter).z1v = function (definition, module_0) {
|
|
|
664
664
|
var _iterator__ex2g4s_0 = destination.t();
|
|
665
665
|
while (_iterator__ex2g4s_0.u()) {
|
|
666
666
|
var item = _iterator__ex2g4s_0.v();
|
|
667
|
-
var tmp$ret$3 = import_0(this.
|
|
668
|
-
destination_0.
|
|
667
|
+
var tmp$ret$3 = import_0(this.d20().ov_1 + '.model', item);
|
|
668
|
+
destination_0.y(tmp$ret$3);
|
|
669
669
|
}
|
|
670
670
|
var modelImports = destination_0;
|
|
671
|
-
return placeInPackage_0(prependImports(sanitized, plus(this.
|
|
671
|
+
return placeInPackage_0(prependImports(sanitized, plus(this.v23_1, modelImports)), this.d20(), 'generator');
|
|
672
672
|
};
|
|
673
|
-
protoOf(ScalaIrEmitter).
|
|
673
|
+
protoOf(ScalaIrEmitter).vt = function (type, module_0) {
|
|
674
674
|
return ensureEmptyStructHasConstructor(sanitizeNames(convertWithValidation(type, module_0), _get_sanitizationConfig__sns434(this)));
|
|
675
675
|
};
|
|
676
|
-
protoOf(ScalaIrEmitter).
|
|
676
|
+
protoOf(ScalaIrEmitter).kv = function (enum_0, module_0) {
|
|
677
677
|
var tmp = sanitizeNames(convert_0(enum_0), _get_sanitizationConfig__sns434(this));
|
|
678
678
|
return injectEnumLabelField(tmp, ScalaIrEmitter$emit$lambda(this));
|
|
679
679
|
};
|
|
680
|
-
protoOf(ScalaIrEmitter).
|
|
680
|
+
protoOf(ScalaIrEmitter).av = function (union) {
|
|
681
681
|
return sanitizeNames(convert_1(union), _get_sanitizationConfig__sns434(this));
|
|
682
682
|
};
|
|
683
|
-
protoOf(ScalaIrEmitter).
|
|
683
|
+
protoOf(ScalaIrEmitter).fv = function (refined) {
|
|
684
684
|
var file = sanitizeNames(convert_2(refined), _get_sanitizationConfig__sns434(this));
|
|
685
685
|
// Inline function 'community.flock.wirespec.ir.core.findElement' call
|
|
686
686
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
687
|
-
var tmp0 = file.
|
|
687
|
+
var tmp0 = file.i1r();
|
|
688
688
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
689
689
|
var destination = ArrayList_init_$Create$_0();
|
|
690
690
|
var _iterator__ex2g4s = tmp0.t();
|
|
691
691
|
while (_iterator__ex2g4s.u()) {
|
|
692
692
|
var element = _iterator__ex2g4s.v();
|
|
693
693
|
if (element instanceof Struct) {
|
|
694
|
-
destination.
|
|
694
|
+
destination.y(element);
|
|
695
695
|
}
|
|
696
696
|
}
|
|
697
697
|
var tmp$ret$2 = firstOrNull_0(destination);
|
|
698
698
|
var updatedStruct = convertToStringCallsToFieldAccess(markMembersAsOverride(ensureNotNull(tmp$ret$2)));
|
|
699
|
-
return new File(Companion_getInstance().
|
|
699
|
+
return new File(Companion_getInstance().y1k(sanitize(this, refined.dv_1)), listOf(updatedStruct));
|
|
700
700
|
};
|
|
701
|
-
protoOf(ScalaIrEmitter).
|
|
701
|
+
protoOf(ScalaIrEmitter).lv = function (endpoint) {
|
|
702
702
|
// Inline function 'community.flock.wirespec.ir.core.findElement' call
|
|
703
703
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
704
|
-
var tmp0 = convert_3(endpoint).
|
|
704
|
+
var tmp0 = convert_3(endpoint).i1r();
|
|
705
705
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
706
706
|
var destination = ArrayList_init_$Create$_0();
|
|
707
707
|
var _iterator__ex2g4s = tmp0.t();
|
|
708
708
|
while (_iterator__ex2g4s.u()) {
|
|
709
709
|
var element = _iterator__ex2g4s.v();
|
|
710
710
|
if (element instanceof Namespace) {
|
|
711
|
-
destination.
|
|
711
|
+
destination.y(element);
|
|
712
712
|
}
|
|
713
713
|
}
|
|
714
714
|
var tmp$ret$2 = firstOrNull_0(destination);
|
|
715
715
|
var endpointNamespace = ensureNotNull(tmp$ret$2);
|
|
716
716
|
var body = appendClientServerObjects(injectHandleFunction(endpointNamespace), endpoint, isRequestObject(endpointNamespace));
|
|
717
|
-
var tmp = sanitizeNames(new File(Companion_getInstance().
|
|
717
|
+
var tmp = sanitizeNames(new File(Companion_getInstance().y1k(sanitize(this, endpoint.ft_1)), listOf(body)), _get_sanitizationConfig__sns434(this));
|
|
718
718
|
// Inline function 'kotlin.takeIf' call
|
|
719
|
-
var this_0 = buildModelImports(endpoint, this.
|
|
719
|
+
var this_0 = buildModelImports(endpoint, this.d20());
|
|
720
720
|
var tmp_0;
|
|
721
721
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
722
722
|
if (!this_0.r()) {
|
|
@@ -727,10 +727,10 @@ protoOf(ScalaIrEmitter).as = function (endpoint) {
|
|
|
727
727
|
var tmp$ret$5 = tmp_0;
|
|
728
728
|
return prependImports(tmp, tmp$ret$5);
|
|
729
729
|
};
|
|
730
|
-
protoOf(ScalaIrEmitter).
|
|
730
|
+
protoOf(ScalaIrEmitter).zu = function (channel) {
|
|
731
731
|
var tmp = sanitizeNames(convert_4(channel), _get_sanitizationConfig__sns434(this));
|
|
732
732
|
// Inline function 'kotlin.takeIf' call
|
|
733
|
-
var this_0 = buildModelImports(channel, this.
|
|
733
|
+
var this_0 = buildModelImports(channel, this.d20());
|
|
734
734
|
var tmp_0;
|
|
735
735
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
736
736
|
if (!this_0.r()) {
|
|
@@ -741,25 +741,25 @@ protoOf(ScalaIrEmitter).or = function (channel) {
|
|
|
741
741
|
var tmp$ret$2 = tmp_0;
|
|
742
742
|
return prependImports(tmp, tmp$ret$2);
|
|
743
743
|
};
|
|
744
|
-
protoOf(ScalaIrEmitter).
|
|
745
|
-
var imports = buildModelImports(endpoint, this.
|
|
746
|
-
var endpointImport = import_0(this.
|
|
744
|
+
protoOf(ScalaIrEmitter).k1z = function (endpoint) {
|
|
745
|
+
var imports = buildModelImports(endpoint, this.d20());
|
|
746
|
+
var endpointImport = import_0(this.d20().ov_1 + '.endpoint', endpoint.ft_1.m1());
|
|
747
747
|
var file = addIdentityTypeToCall(sanitizeNames(emitEndpointClient.call(this, endpoint), _get_sanitizationConfig__sns434(this)));
|
|
748
|
-
var subPackageName = plus_1(this.
|
|
749
|
-
var tmp = Companion_getInstance().
|
|
748
|
+
var subPackageName = plus_1(this.d20(), 'client');
|
|
749
|
+
var tmp = Companion_getInstance().y1k(subPackageName.qv() + file.g1r_1.z1k());
|
|
750
750
|
// Inline function 'kotlin.collections.buildList' call
|
|
751
751
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
752
752
|
// Inline function 'kotlin.apply' call
|
|
753
753
|
var this_0 = ArrayList_init_$Create$_0();
|
|
754
|
-
this_0.
|
|
755
|
-
this_0.
|
|
756
|
-
this_0.
|
|
757
|
-
this_0.
|
|
758
|
-
this_0.
|
|
759
|
-
var tmp$ret$3 = this_0.
|
|
754
|
+
this_0.y(new Package(subPackageName.ov_1));
|
|
755
|
+
this_0.g1(this.v23_1);
|
|
756
|
+
this_0.g1(imports);
|
|
757
|
+
this_0.y(endpointImport);
|
|
758
|
+
this_0.g1(file.h1r_1);
|
|
759
|
+
var tmp$ret$3 = this_0.p5();
|
|
760
760
|
return new File(tmp, tmp$ret$3);
|
|
761
761
|
};
|
|
762
|
-
protoOf(ScalaIrEmitter).
|
|
762
|
+
protoOf(ScalaIrEmitter).i1z = function (endpoints, logger) {
|
|
763
763
|
// Inline function 'kotlin.collections.flatMap' call
|
|
764
764
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
765
765
|
var destination = ArrayList_init_$Create$_0();
|
|
@@ -775,9 +775,9 @@ protoOf(ScalaIrEmitter).w1v = function (endpoints, logger) {
|
|
|
775
775
|
var _iterator__ex2g4s_0 = destination.t();
|
|
776
776
|
while (_iterator__ex2g4s_0.u()) {
|
|
777
777
|
var e = _iterator__ex2g4s_0.v();
|
|
778
|
-
var key = e.
|
|
779
|
-
if (set.
|
|
780
|
-
list_0.
|
|
778
|
+
var key = e.my_1;
|
|
779
|
+
if (set.y(key)) {
|
|
780
|
+
list_0.y(e);
|
|
781
781
|
}
|
|
782
782
|
}
|
|
783
783
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -786,8 +786,8 @@ protoOf(ScalaIrEmitter).w1v = function (endpoints, logger) {
|
|
|
786
786
|
var _iterator__ex2g4s_1 = list_0.t();
|
|
787
787
|
while (_iterator__ex2g4s_1.u()) {
|
|
788
788
|
var item = _iterator__ex2g4s_1.v();
|
|
789
|
-
var tmp$ret$5 = import_0(this.
|
|
790
|
-
destination_0.
|
|
789
|
+
var tmp$ret$5 = import_0(this.d20().ov_1 + '.model', item.my_1);
|
|
790
|
+
destination_0.y(tmp$ret$5);
|
|
791
791
|
}
|
|
792
792
|
var imports = destination_0;
|
|
793
793
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -796,8 +796,8 @@ protoOf(ScalaIrEmitter).w1v = function (endpoints, logger) {
|
|
|
796
796
|
var _iterator__ex2g4s_2 = endpoints.t();
|
|
797
797
|
while (_iterator__ex2g4s_2.u()) {
|
|
798
798
|
var item_0 = _iterator__ex2g4s_2.v();
|
|
799
|
-
var tmp$ret$8 = import_0(this.
|
|
800
|
-
destination_1.
|
|
799
|
+
var tmp$ret$8 = import_0(this.d20().ov_1 + '.endpoint', item_0.ft_1.m1());
|
|
800
|
+
destination_1.y(tmp$ret$8);
|
|
801
801
|
}
|
|
802
802
|
var endpointImports = destination_1;
|
|
803
803
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -806,38 +806,38 @@ protoOf(ScalaIrEmitter).w1v = function (endpoints, logger) {
|
|
|
806
806
|
var _iterator__ex2g4s_3 = endpoints.t();
|
|
807
807
|
while (_iterator__ex2g4s_3.u()) {
|
|
808
808
|
var item_1 = _iterator__ex2g4s_3.v();
|
|
809
|
-
var tmp$ret$11 = import_0(this.
|
|
810
|
-
destination_2.
|
|
809
|
+
var tmp$ret$11 = import_0(this.d20().ov_1 + '.client', item_1.ft_1.m1() + 'Client');
|
|
810
|
+
destination_2.y(tmp$ret$11);
|
|
811
811
|
}
|
|
812
812
|
var clientImports = destination_2;
|
|
813
813
|
var allImports = plus(plus(imports, endpointImports), clientImports);
|
|
814
814
|
var file = addIdentityTypeToCall(sanitizeNames(emitClient.call(this, endpoints, logger), _get_sanitizationConfig__sns434(this)));
|
|
815
|
-
var tmp = Companion_getInstance().
|
|
815
|
+
var tmp = Companion_getInstance().y1k(this.d20().qv() + file.g1r_1.z1k());
|
|
816
816
|
// Inline function 'kotlin.collections.buildList' call
|
|
817
817
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
818
818
|
// Inline function 'kotlin.apply' call
|
|
819
819
|
var this_0 = ArrayList_init_$Create$_0();
|
|
820
|
-
this_0.
|
|
821
|
-
this_0.
|
|
822
|
-
this_0.
|
|
823
|
-
this_0.
|
|
824
|
-
var tmp$ret$17 = this_0.
|
|
820
|
+
this_0.y(new Package(this.d20().ov_1));
|
|
821
|
+
this_0.g1(this.v23_1);
|
|
822
|
+
this_0.g1(allImports);
|
|
823
|
+
this_0.g1(file.h1r_1);
|
|
824
|
+
var tmp$ret$17 = this_0.p5();
|
|
825
825
|
return new File(tmp, tmp$ret$17);
|
|
826
826
|
};
|
|
827
827
|
function convertToStringCallsToFieldAccess(_this__u8e3s4) {
|
|
828
828
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
829
829
|
var scope = new TransformScope(_this__u8e3s4);
|
|
830
|
-
scope.
|
|
831
|
-
var tmp = scope.
|
|
830
|
+
scope.z1y(convertToStringCallsToFieldAccess$lambda);
|
|
831
|
+
var tmp = scope.r1y_1;
|
|
832
832
|
return isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
833
833
|
}
|
|
834
834
|
function appendClientServerObjects(_this__u8e3s4, endpoint, requestIsObject) {
|
|
835
835
|
var reqType = requestIsObject ? 'Request.type' : 'Request';
|
|
836
|
-
var pathTemplate = '/' + joinToString(endpoint.
|
|
837
|
-
var pathSegmentsCode = joinToString(endpoint.
|
|
838
|
-
var clientObject = raw(trimMargin('\n |object Client extends Wirespec.Client[' + reqType + ', Response[?]] {\n | override val pathTemplate: String = "' + pathTemplate + '"\n | override val method: String = "' + endpoint.
|
|
839
|
-
var serverObject = raw(trimMargin('\n |object Server extends Wirespec.Server[' + reqType + ', Response[?]] {\n | override val pathTemplate: String = "' + pathTemplate + '"\n | override val method: String = "' + endpoint.
|
|
840
|
-
return _this__u8e3s4.
|
|
836
|
+
var pathTemplate = '/' + joinToString(endpoint.ht_1, '/', VOID, VOID, VOID, VOID, appendClientServerObjects$lambda);
|
|
837
|
+
var pathSegmentsCode = joinToString(endpoint.ht_1, ', ', VOID, VOID, VOID, VOID, appendClientServerObjects$lambda_0);
|
|
838
|
+
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 '));
|
|
839
|
+
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 '));
|
|
840
|
+
return _this__u8e3s4.q1r(VOID, plus_0(plus_0(_this__u8e3s4.n1r_1, clientObject), serverObject));
|
|
841
841
|
}
|
|
842
842
|
function injectHandleFunction(_this__u8e3s4) {
|
|
843
843
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
@@ -845,26 +845,26 @@ function injectHandleFunction(_this__u8e3s4) {
|
|
|
845
845
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
846
846
|
var tmp = scope;
|
|
847
847
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
848
|
-
var this_0 = scope.
|
|
848
|
+
var this_0 = scope.r1y_1;
|
|
849
849
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
850
850
|
// Inline function 'kotlin.apply' call
|
|
851
851
|
var this_1 = new TransformerBuilder();
|
|
852
|
-
this_1.
|
|
853
|
-
var tmp$ret$2 = this_1.
|
|
854
|
-
tmp.
|
|
855
|
-
var tmp_0 = scope.
|
|
852
|
+
this_1.i1m(injectHandleFunction$lambda);
|
|
853
|
+
var tmp$ret$2 = this_1.j1m();
|
|
854
|
+
tmp.r1y_1 = transform(this_0, tmp$ret$2);
|
|
855
|
+
var tmp_0 = scope.r1y_1;
|
|
856
856
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
857
857
|
}
|
|
858
858
|
function isRequestObject(namespace) {
|
|
859
859
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
860
|
-
var tmp0 = namespace.
|
|
860
|
+
var tmp0 = namespace.n1r_1;
|
|
861
861
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
862
862
|
var destination = ArrayList_init_$Create$_0();
|
|
863
863
|
var _iterator__ex2g4s = tmp0.t();
|
|
864
864
|
while (_iterator__ex2g4s.u()) {
|
|
865
865
|
var element = _iterator__ex2g4s.v();
|
|
866
866
|
if (element instanceof Struct) {
|
|
867
|
-
destination.
|
|
867
|
+
destination.y(element);
|
|
868
868
|
}
|
|
869
869
|
}
|
|
870
870
|
var tmp$ret$3;
|
|
@@ -873,7 +873,7 @@ function isRequestObject(namespace) {
|
|
|
873
873
|
var _iterator__ex2g4s_0 = destination.t();
|
|
874
874
|
while (_iterator__ex2g4s_0.u()) {
|
|
875
875
|
var element_0 = _iterator__ex2g4s_0.v();
|
|
876
|
-
if (element_0.
|
|
876
|
+
if (element_0.r1r_1.z1k() === 'Request') {
|
|
877
877
|
tmp$ret$3 = element_0;
|
|
878
878
|
break $l$block;
|
|
879
879
|
}
|
|
@@ -888,7 +888,7 @@ function isRequestObject(namespace) {
|
|
|
888
888
|
tmp = tmp0_elvis_lhs;
|
|
889
889
|
}
|
|
890
890
|
var requestStruct = tmp;
|
|
891
|
-
return requestStruct.
|
|
891
|
+
return requestStruct.t1r_1.b1() === 1 && single(requestStruct.t1r_1).a1v_1.r() || (requestStruct.s1r_1.r() && requestStruct.t1r_1.r());
|
|
892
892
|
}
|
|
893
893
|
function buildModelImports(_this__u8e3s4, packageName) {
|
|
894
894
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
@@ -898,9 +898,9 @@ function buildModelImports(_this__u8e3s4, packageName) {
|
|
|
898
898
|
var _iterator__ex2g4s = this_0.t();
|
|
899
899
|
while (_iterator__ex2g4s.u()) {
|
|
900
900
|
var e = _iterator__ex2g4s.v();
|
|
901
|
-
var key = e.
|
|
902
|
-
if (set.
|
|
903
|
-
list.
|
|
901
|
+
var key = e.my_1;
|
|
902
|
+
if (set.y(key)) {
|
|
903
|
+
list.y(e);
|
|
904
904
|
}
|
|
905
905
|
}
|
|
906
906
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -909,8 +909,8 @@ function buildModelImports(_this__u8e3s4, packageName) {
|
|
|
909
909
|
var _iterator__ex2g4s_0 = list.t();
|
|
910
910
|
while (_iterator__ex2g4s_0.u()) {
|
|
911
911
|
var item = _iterator__ex2g4s_0.v();
|
|
912
|
-
var tmp$ret$2 = import_0(packageName.
|
|
913
|
-
destination.
|
|
912
|
+
var tmp$ret$2 = import_0(packageName.ov_1 + '.model', Companion_getInstance().y1k(item.my_1).z1k());
|
|
913
|
+
destination.y(tmp$ret$2);
|
|
914
914
|
}
|
|
915
915
|
return destination;
|
|
916
916
|
}
|
|
@@ -920,29 +920,29 @@ function addIdentityTypeToCall(_this__u8e3s4) {
|
|
|
920
920
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
921
921
|
var tmp = scope;
|
|
922
922
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
923
|
-
var this_0 = scope.
|
|
923
|
+
var this_0 = scope.r1y_1;
|
|
924
924
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
925
925
|
// Inline function 'kotlin.apply' call
|
|
926
926
|
var this_1 = new TransformerBuilder();
|
|
927
|
-
this_1.
|
|
928
|
-
var tmp$ret$2 = this_1.
|
|
929
|
-
tmp.
|
|
930
|
-
var tmp_0 = scope.
|
|
927
|
+
this_1.i1m(addIdentityTypeToCall$lambda);
|
|
928
|
+
var tmp$ret$2 = this_1.j1m();
|
|
929
|
+
tmp.r1y_1 = transform(this_0, tmp$ret$2);
|
|
930
|
+
var tmp_0 = scope.r1y_1;
|
|
931
931
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
932
932
|
}
|
|
933
933
|
function toScalaTypeName(_this__u8e3s4) {
|
|
934
934
|
var tmp;
|
|
935
935
|
if (_this__u8e3s4 instanceof Primitive) {
|
|
936
|
-
var t = _this__u8e3s4.
|
|
936
|
+
var t = _this__u8e3s4.qy_1;
|
|
937
937
|
var tmp_0;
|
|
938
938
|
if (t instanceof String_0) {
|
|
939
939
|
tmp_0 = 'String';
|
|
940
940
|
} else {
|
|
941
941
|
if (t instanceof Integer) {
|
|
942
|
-
tmp_0 = t.
|
|
942
|
+
tmp_0 = t.ux_1.equals(Precision_P32_getInstance()) ? 'Int' : 'Long';
|
|
943
943
|
} else {
|
|
944
944
|
if (t instanceof Number_0) {
|
|
945
|
-
tmp_0 = t.
|
|
945
|
+
tmp_0 = t.xx_1.equals(Precision_P32_getInstance()) ? 'Float' : 'Double';
|
|
946
946
|
} else {
|
|
947
947
|
if (equals(t, Boolean_instance)) {
|
|
948
948
|
tmp_0 = 'Boolean';
|
|
@@ -959,13 +959,13 @@ function toScalaTypeName(_this__u8e3s4) {
|
|
|
959
959
|
tmp = tmp_0;
|
|
960
960
|
} else {
|
|
961
961
|
if (_this__u8e3s4 instanceof Custom) {
|
|
962
|
-
tmp = _this__u8e3s4.
|
|
962
|
+
tmp = _this__u8e3s4.my_1;
|
|
963
963
|
} else {
|
|
964
964
|
if (_this__u8e3s4 instanceof Iterable) {
|
|
965
|
-
tmp = 'List[' + toScalaTypeName(_this__u8e3s4.
|
|
965
|
+
tmp = 'List[' + toScalaTypeName(_this__u8e3s4.as_1) + ']';
|
|
966
966
|
} else {
|
|
967
967
|
if (_this__u8e3s4 instanceof Dict) {
|
|
968
|
-
tmp = 'Map[String, ' + toScalaTypeName(_this__u8e3s4.
|
|
968
|
+
tmp = 'Map[String, ' + toScalaTypeName(_this__u8e3s4.ds_1) + ']';
|
|
969
969
|
} else {
|
|
970
970
|
if (_this__u8e3s4 instanceof Any) {
|
|
971
971
|
tmp = 'Any';
|
|
@@ -981,32 +981,32 @@ function toScalaTypeName(_this__u8e3s4) {
|
|
|
981
981
|
}
|
|
982
982
|
}
|
|
983
983
|
var base = tmp;
|
|
984
|
-
return _this__u8e3s4.
|
|
984
|
+
return _this__u8e3s4.ey() ? 'Option[' + base + ']' : base;
|
|
985
985
|
}
|
|
986
986
|
function convertToStringCallsToFieldAccess$lambda(expr, tr) {
|
|
987
987
|
var tmp;
|
|
988
988
|
var tmp_0;
|
|
989
989
|
var tmp_1;
|
|
990
990
|
if (expr instanceof FunctionCall) {
|
|
991
|
-
tmp_1 = expr.
|
|
991
|
+
tmp_1 = expr.l1q_1.b1q() === 'toString';
|
|
992
992
|
} else {
|
|
993
993
|
tmp_1 = false;
|
|
994
994
|
}
|
|
995
995
|
if (tmp_1) {
|
|
996
|
-
tmp_0 = !(expr.
|
|
996
|
+
tmp_0 = !(expr.j1q_1 == null);
|
|
997
997
|
} else {
|
|
998
998
|
tmp_0 = false;
|
|
999
999
|
}
|
|
1000
1000
|
if (tmp_0) {
|
|
1001
|
-
var tmp0_safe_receiver = expr.
|
|
1001
|
+
var tmp0_safe_receiver = expr.j1q_1;
|
|
1002
1002
|
var tmp_2;
|
|
1003
1003
|
if (tmp0_safe_receiver == null) {
|
|
1004
1004
|
tmp_2 = null;
|
|
1005
1005
|
} else {
|
|
1006
1006
|
// Inline function 'kotlin.let' call
|
|
1007
|
-
tmp_2 = tr.
|
|
1007
|
+
tmp_2 = tr.m1y(tmp0_safe_receiver);
|
|
1008
1008
|
}
|
|
1009
|
-
tmp = new FieldCall(tmp_2, Companion_getInstance().
|
|
1009
|
+
tmp = new FieldCall(tmp_2, Companion_getInstance().y1k('toString'));
|
|
1010
1010
|
} else {
|
|
1011
1011
|
tmp = transformChildren_1(expr, tr);
|
|
1012
1012
|
}
|
|
@@ -1015,10 +1015,10 @@ function convertToStringCallsToFieldAccess$lambda(expr, tr) {
|
|
|
1015
1015
|
function appendClientServerObjects$lambda(it) {
|
|
1016
1016
|
var tmp;
|
|
1017
1017
|
if (it instanceof Literal) {
|
|
1018
|
-
tmp = it.
|
|
1018
|
+
tmp = it.iu_1;
|
|
1019
1019
|
} else {
|
|
1020
1020
|
if (it instanceof Param) {
|
|
1021
|
-
tmp = '{' + it.
|
|
1021
|
+
tmp = '{' + it.mt_1.m1() + '}';
|
|
1022
1022
|
} else {
|
|
1023
1023
|
noWhenBranchMatchedException();
|
|
1024
1024
|
}
|
|
@@ -1028,10 +1028,10 @@ function appendClientServerObjects$lambda(it) {
|
|
|
1028
1028
|
function appendClientServerObjects$lambda_0(segment) {
|
|
1029
1029
|
var tmp;
|
|
1030
1030
|
if (segment instanceof Literal) {
|
|
1031
|
-
tmp = 'Wirespec.Literal("' + segment.
|
|
1031
|
+
tmp = 'Wirespec.Literal("' + segment.iu_1 + '")';
|
|
1032
1032
|
} else {
|
|
1033
1033
|
if (segment instanceof Param) {
|
|
1034
|
-
tmp = 'Wirespec.Param("' + segment.
|
|
1034
|
+
tmp = 'Wirespec.Param("' + segment.mt_1.m1() + '", scala.reflect.classTag[' + toScalaTypeName(segment.nt_1) + '])';
|
|
1035
1035
|
} else {
|
|
1036
1036
|
noWhenBranchMatchedException();
|
|
1037
1037
|
}
|
|
@@ -1043,13 +1043,13 @@ function injectHandleFunction$lambda(element, transformer) {
|
|
|
1043
1043
|
if (element instanceof Interface) {
|
|
1044
1044
|
var tmp$ret$0;
|
|
1045
1045
|
$l$block: {
|
|
1046
|
-
if (!element.
|
|
1046
|
+
if (!element.a1s_1.equals(Companion_getInstance().y1k('Handler')) && !element.a1s_1.equals(Companion_getInstance().y1k('Call'))) {
|
|
1047
1047
|
tmp$ret$0 = element;
|
|
1048
1048
|
break $l$block;
|
|
1049
1049
|
}
|
|
1050
1050
|
var tmp0_typeParameters = listOf(new TypeParameter(Custom_init_$Create$('F[_]')));
|
|
1051
1051
|
// Inline function 'kotlin.collections.map' call
|
|
1052
|
-
var this_0 = element.
|
|
1052
|
+
var this_0 = element.b1s_1;
|
|
1053
1053
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1054
1054
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1055
1055
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -1060,7 +1060,7 @@ function injectHandleFunction$lambda(element, transformer) {
|
|
|
1060
1060
|
if (tmp0_safe_receiver == null) {
|
|
1061
1061
|
tmp_0 = null;
|
|
1062
1062
|
} else {
|
|
1063
|
-
var tmp1_safe_receiver = item.
|
|
1063
|
+
var tmp1_safe_receiver = item.r1o_1;
|
|
1064
1064
|
var tmp_1;
|
|
1065
1065
|
if (tmp1_safe_receiver == null) {
|
|
1066
1066
|
tmp_1 = null;
|
|
@@ -1069,13 +1069,13 @@ function injectHandleFunction$lambda(element, transformer) {
|
|
|
1069
1069
|
tmp_1 = Custom_init_$Create$('F', listOf(tmp1_safe_receiver));
|
|
1070
1070
|
}
|
|
1071
1071
|
var tmp3_returnType = tmp_1;
|
|
1072
|
-
tmp_0 = tmp0_safe_receiver.
|
|
1072
|
+
tmp_0 = tmp0_safe_receiver.w1o(VOID, VOID, VOID, tmp3_returnType, VOID, false);
|
|
1073
1073
|
}
|
|
1074
1074
|
var tmp4_elvis_lhs = tmp_0;
|
|
1075
1075
|
var tmp$ret$3 = tmp4_elvis_lhs == null ? item : tmp4_elvis_lhs;
|
|
1076
|
-
destination.
|
|
1076
|
+
destination.y(tmp$ret$3);
|
|
1077
1077
|
}
|
|
1078
|
-
tmp$ret$0 = element.
|
|
1078
|
+
tmp$ret$0 = element.h1s(VOID, destination, VOID, VOID, tmp0_typeParameters);
|
|
1079
1079
|
}
|
|
1080
1080
|
tmp = tmp$ret$0;
|
|
1081
1081
|
} else {
|
|
@@ -1088,7 +1088,7 @@ function addIdentityTypeToCall$lambda(element, transformer) {
|
|
|
1088
1088
|
var tmp;
|
|
1089
1089
|
if (element instanceof Struct) {
|
|
1090
1090
|
// Inline function 'kotlin.collections.map' call
|
|
1091
|
-
var this_0 = element.
|
|
1091
|
+
var this_0 = element.u1r_1;
|
|
1092
1092
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1093
1093
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1094
1094
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -1101,7 +1101,7 @@ function addIdentityTypeToCall$lambda(element, transformer) {
|
|
|
1101
1101
|
} else {
|
|
1102
1102
|
// Inline function 'kotlin.takeIf' call
|
|
1103
1103
|
var tmp_1;
|
|
1104
|
-
if (endsWith(tmp0_safe_receiver.
|
|
1104
|
+
if (endsWith(tmp0_safe_receiver.s1m_1.z1k(), '.Call')) {
|
|
1105
1105
|
tmp_1 = tmp0_safe_receiver;
|
|
1106
1106
|
} else {
|
|
1107
1107
|
tmp_1 = null;
|
|
@@ -1109,11 +1109,11 @@ function addIdentityTypeToCall$lambda(element, transformer) {
|
|
|
1109
1109
|
tmp_0 = tmp_1;
|
|
1110
1110
|
}
|
|
1111
1111
|
var tmp1_safe_receiver = tmp_0;
|
|
1112
|
-
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
1112
|
+
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.x1q(VOID, listOf(Custom_init_$Create$('[A] =>> A')));
|
|
1113
1113
|
var tmp$ret$2 = tmp2_elvis_lhs == null ? item : tmp2_elvis_lhs;
|
|
1114
|
-
destination.
|
|
1114
|
+
destination.y(tmp$ret$2);
|
|
1115
1115
|
}
|
|
1116
|
-
tmp = element.
|
|
1116
|
+
tmp = element.y1r(VOID, VOID, VOID, destination);
|
|
1117
1117
|
} else {
|
|
1118
1118
|
tmp = element;
|
|
1119
1119
|
}
|
|
@@ -1121,8 +1121,8 @@ function addIdentityTypeToCall$lambda(element, transformer) {
|
|
|
1121
1121
|
return transformChildren_0(transformed, transformer);
|
|
1122
1122
|
}
|
|
1123
1123
|
//region block: post-declaration
|
|
1124
|
-
protoOf(ScalaIrEmitter).
|
|
1125
|
-
protoOf(ScalaIrEmitter).
|
|
1124
|
+
protoOf(ScalaIrEmitter).pr = emit_0;
|
|
1125
|
+
protoOf(ScalaIrEmitter).g1z = emit_1;
|
|
1126
1126
|
//endregion
|
|
1127
1127
|
//region block: exports
|
|
1128
1128
|
export {
|