@flock/wirespec 0.19.0-RC.2 → 0.19.0-RC.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/arrow-arrow-atomic.mjs +12 -12
- package/arrow-arrow-core.mjs +163 -163
- package/clikt-clikt-mordant.mjs +80 -80
- package/clikt-clikt.mjs +1570 -1570
- package/colormath-root-colormath.mjs +444 -444
- package/kotest-kotest-property.mjs +605 -1435
- package/kotest-kotest-property.mjs.map +1 -1
- package/kotest-property-arbs.mjs +0 -478
- package/kotest-property-arbs.mjs.map +1 -1
- package/kotlin-kotlin-stdlib.mjs +2478 -2738
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +4926 -4926
- package/kotlin-openapi-bindings.mjs.map +1 -1
- package/kotlin-rgxgen.mjs +1819 -1819
- package/kotlinx-io-kotlinx-io-core.mjs +440 -440
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +1792 -1792
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1395 -1395
- package/mordant-mordant.mjs +1362 -1362
- package/package.json +1 -1
- package/wirespec-src-compiler-core.mjs +1541 -1541
- package/wirespec-src-compiler-emitters-java.mjs +387 -387
- package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-kotlin.mjs +341 -341
- package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-python.mjs +371 -371
- package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-rust.mjs +416 -416
- package/wirespec-src-compiler-emitters-scala.mjs +168 -168
- package/wirespec-src-compiler-emitters-typescript.mjs +471 -471
- 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 +3672 -3672
- package/wirespec-src-compiler-lib.mjs +418 -418
- package/wirespec-src-compiler-lib.mjs.map +1 -1
- package/wirespec-src-converter-avro.mjs +512 -512
- package/wirespec-src-converter-openapi.mjs +772 -772
- package/wirespec-src-converter-openapi.mjs.map +1 -1
- package/wirespec-src-integration-kotest.mjs +490 -572
- package/wirespec-src-integration-kotest.mjs.map +1 -1
- package/wirespec-src-plugin-arguments.mjs +185 -185
- package/wirespec-src-plugin-cli.mjs +106 -106
- package/wirespec-src-plugin-npm.d.mts +1 -1
- package/wirespec-src-plugin-npm.mjs +40 -40
- package/wirespec-src-tools-generator.mjs +35 -35
|
@@ -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.n23_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,7 +162,7 @@ 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.
|
|
165
|
+
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.mu(item) : item;
|
|
166
166
|
destination.x(tmp$ret$0);
|
|
167
167
|
}
|
|
168
168
|
// Inline function 'kotlin.text.filter' call
|
|
@@ -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().o23_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,7 +223,7 @@ 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.
|
|
226
|
+
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.mu(item) : item;
|
|
227
227
|
destination.x(tmp$ret$0);
|
|
228
228
|
}
|
|
229
229
|
// Inline function 'kotlin.text.filter' call
|
|
@@ -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.o23_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.s1k_1.a1() > 1 ? name.v1p() : sanitizeSymbol(this$0, name.p1m());
|
|
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.v1p())));
|
|
273
273
|
};
|
|
274
274
|
}
|
|
275
275
|
function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_2(this$0) {
|
|
@@ -282,28 +282,28 @@ 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.f1q_1.p1m() === 'validate';
|
|
286
286
|
} else {
|
|
287
287
|
tmp_0 = false;
|
|
288
288
|
}
|
|
289
289
|
if (tmp_0) {
|
|
290
|
-
tmp = transformChildren(stmt.
|
|
290
|
+
tmp = transformChildren(stmt.j1q(VOID, emptyList()), tr);
|
|
291
291
|
} else {
|
|
292
292
|
if (stmt instanceof ConstructorStatement) {
|
|
293
|
-
var tmp_1 = tr.
|
|
293
|
+
var tmp_1 = tr.d1y(stmt.x1q_1);
|
|
294
294
|
// Inline function 'kotlin.collections.map' call
|
|
295
|
-
var this_0 = stmt.
|
|
295
|
+
var this_0 = stmt.y1q_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.a1());
|
|
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.
|
|
305
|
+
var expr = item.m1();
|
|
306
|
+
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), name), tr.g1y(expr));
|
|
307
307
|
destination.x(tmp$ret$3);
|
|
308
308
|
}
|
|
309
309
|
tmp = new ConstructorStatement(tmp_1, toMap(destination));
|
|
@@ -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().o23_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,21 +330,21 @@ 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.a1o(new Custom_0('PathSegment'));
|
|
334
|
+
$this$struct.v1n('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.a1o(new Custom_0('PathSegment'));
|
|
339
|
+
$this$struct.v1n('name', String_instance);
|
|
340
|
+
$this$struct.v1n('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.b1r_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();
|
|
@@ -357,9 +357,9 @@ function ScalaIrEmitter$emitShared$lambda_1(element, transformer) {
|
|
|
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.kf();
|
|
361
|
+
var rest = _destruct__k2r9zo.lf();
|
|
362
|
+
tmp = element.e1r(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.g1r_1.equals(Companion_getInstance().u1k('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.h1r_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,14 +388,14 @@ 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.t1r_1.b1q());
|
|
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.u1r_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();
|
|
@@ -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.t1r_1.b1q() === '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.t1r_1, listOf(nestedHeaders));
|
|
431
431
|
// Inline function 'kotlin.collections.filter' call
|
|
432
|
-
var tmp0_1 = element_0.
|
|
432
|
+
var tmp0_1 = element_0.u1r_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,7 +437,7 @@ 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.t1r_1.b1q() === 'Headers';
|
|
441
441
|
} else {
|
|
442
442
|
tmp_3 = false;
|
|
443
443
|
}
|
|
@@ -447,28 +447,28 @@ function ScalaIrEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
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.y1r_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.h1t_1.p1m() === 'headers') {
|
|
458
|
+
tmp_5 = item.l1t(VOID, new Custom_0(element_0.t1r_1.b1q() + '.Headers'));
|
|
459
459
|
} else {
|
|
460
460
|
tmp_5 = item;
|
|
461
461
|
}
|
|
462
462
|
var tmp$ret$9 = tmp_5;
|
|
463
463
|
destination_2.x(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.a1s(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.k1r(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.g1r_1.equals(Companion_getInstance().u1k('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.c1r(), 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.jv('community.flock.wirespec.generated') : packageName;
|
|
519
|
+
emitShared = emitShared === VOID ? Companion_instance_1.es() : emitShared;
|
|
520
|
+
this.i23_1 = packageName;
|
|
521
|
+
this.j23_1 = emitShared;
|
|
522
|
+
this.k23_1 = ScalaGenerator_getInstance();
|
|
523
|
+
this.l23_1 = FileExtension_Scala_getInstance();
|
|
524
|
+
this.m23_1 = listOf_0([import_0('community.flock.wirespec.scala', 'Wirespec'), import_0('scala.reflect', 'ClassTag')]);
|
|
525
525
|
var tmp = this;
|
|
526
|
-
tmp.
|
|
526
|
+
tmp.n23_1 = lazy(ScalaIrEmitter$sanitizationConfig$delegate$lambda(this));
|
|
527
527
|
}
|
|
528
|
-
protoOf(ScalaIrEmitter).
|
|
529
|
-
return this.
|
|
528
|
+
protoOf(ScalaIrEmitter).v1z = function () {
|
|
529
|
+
return this.i23_1;
|
|
530
530
|
};
|
|
531
|
-
protoOf(ScalaIrEmitter).
|
|
532
|
-
return this.
|
|
531
|
+
protoOf(ScalaIrEmitter).y1y = function () {
|
|
532
|
+
return this.k23_1;
|
|
533
533
|
};
|
|
534
|
-
protoOf(ScalaIrEmitter).
|
|
535
|
-
return this.
|
|
534
|
+
protoOf(ScalaIrEmitter).cu = function () {
|
|
535
|
+
return this.l23_1;
|
|
536
536
|
};
|
|
537
|
-
protoOf(ScalaIrEmitter).
|
|
538
|
-
ScalaGenerator_getInstance().
|
|
537
|
+
protoOf(ScalaIrEmitter).d1z = function (allFiles) {
|
|
538
|
+
ScalaGenerator_getInstance().k1z(allFiles);
|
|
539
539
|
};
|
|
540
|
-
protoOf(ScalaIrEmitter).
|
|
541
|
-
var packageName = Companion_instance_0.
|
|
540
|
+
protoOf(ScalaIrEmitter).b1z = function () {
|
|
541
|
+
var packageName = Companion_instance_0.jv('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,12 +552,12 @@ protoOf(ScalaIrEmitter).t1z = 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.t1r_1.b1q());
|
|
556
556
|
} else {
|
|
557
557
|
tmp_2 = false;
|
|
558
558
|
}
|
|
559
559
|
if (tmp_2) {
|
|
560
|
-
tmp_1 = item.
|
|
560
|
+
tmp_1 = item.a1s(VOID, VOID, VOID, VOID, VOID, plus_0(item.y1r_1, new Field(Companion_getInstance().u1k('pathSegments'), new Array_0(new Custom_0('PathSegment')))));
|
|
561
561
|
} else {
|
|
562
562
|
tmp_1 = item;
|
|
563
563
|
}
|
|
@@ -571,58 +571,58 @@ protoOf(ScalaIrEmitter).t1z = 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.l1y_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.d1m(ScalaIrEmitter$emitShared$lambda_1);
|
|
579
|
+
var tmp$ret$5 = this_3.e1m();
|
|
580
|
+
tmp_3.l1y_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.l1y_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.d1m(ScalaIrEmitter$emitShared$lambda_2);
|
|
589
|
+
var tmp$ret$10 = this_5.e1m();
|
|
590
|
+
tmp_4.l1y_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.l1y_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.d1m(ScalaIrEmitter$emitShared$lambda_3(clientServer));
|
|
600
|
+
var tmp$ret$15 = this_7.e1m();
|
|
601
|
+
tmp_5.l1y_1 = transform(this_6, tmp$ret$15);
|
|
602
|
+
var tmp_6 = scope.l1y_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.j23_1.fs_1) {
|
|
606
|
+
tmp_7 = wirespecShared.e1r(Companion_getInstance().u1k(packageName.mv() + 'Wirespec'));
|
|
607
607
|
} else {
|
|
608
608
|
tmp_7 = null;
|
|
609
609
|
}
|
|
610
610
|
return tmp_7;
|
|
611
611
|
};
|
|
612
|
-
protoOf(ScalaIrEmitter).
|
|
612
|
+
protoOf(ScalaIrEmitter).su = 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.m23_1;
|
|
616
616
|
var tmp;
|
|
617
|
-
if (Companion_instance.
|
|
617
|
+
if (Companion_instance.ou(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.v1z(), definition);
|
|
624
624
|
};
|
|
625
|
-
protoOf(ScalaIrEmitter).
|
|
625
|
+
protoOf(ScalaIrEmitter).f1z = 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).x1z = 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.tu().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));
|
|
@@ -664,27 +664,27 @@ protoOf(ScalaIrEmitter).x1z = 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.
|
|
667
|
+
var tmp$ret$3 = import_0(this.v1z().kv_1 + '.model', item);
|
|
668
668
|
destination_0.x(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.m23_1, modelImports)), this.v1z(), 'generator');
|
|
672
672
|
};
|
|
673
|
-
protoOf(ScalaIrEmitter).
|
|
673
|
+
protoOf(ScalaIrEmitter).st = 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).gv = 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).wu = function (union) {
|
|
681
681
|
return sanitizeNames(convert_1(union), _get_sanitizationConfig__sns434(this));
|
|
682
682
|
};
|
|
683
|
-
protoOf(ScalaIrEmitter).
|
|
683
|
+
protoOf(ScalaIrEmitter).bv = 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.c1r();
|
|
688
688
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
689
689
|
var destination = ArrayList_init_$Create$_0();
|
|
690
690
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -696,12 +696,12 @@ protoOf(ScalaIrEmitter).tv = function (refined) {
|
|
|
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().u1k(sanitize(this, refined.zu_1)), listOf(updatedStruct));
|
|
700
700
|
};
|
|
701
|
-
protoOf(ScalaIrEmitter).
|
|
701
|
+
protoOf(ScalaIrEmitter).hv = 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).c1r();
|
|
705
705
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
706
706
|
var destination = ArrayList_init_$Create$_0();
|
|
707
707
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -715,9 +715,9 @@ protoOf(ScalaIrEmitter).zv = function (endpoint) {
|
|
|
715
715
|
var endpointNamespace = ensureNotNull(tmp$ret$2);
|
|
716
716
|
var flattened = flattenNestedStructs(endpointNamespace);
|
|
717
717
|
var body = appendClientServerObjects(injectHandleFunction(flattened), endpoint, isRequestObject(flattened));
|
|
718
|
-
var tmp = sanitizeNames(new File(Companion_getInstance().
|
|
718
|
+
var tmp = sanitizeNames(new File(Companion_getInstance().u1k(sanitize(this, endpoint.ct_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.v1z());
|
|
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).zv = 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).vu = 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.v1z());
|
|
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).nv = 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).e1z = function (endpoint) {
|
|
746
|
+
var imports = buildModelImports(endpoint, this.v1z());
|
|
747
|
+
var endpointImport = import_0(this.v1z().kv_1 + '.endpoint', endpoint.ct_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.v1z(), 'client');
|
|
750
|
+
var tmp = Companion_getInstance().u1k(subPackageName.mv() + file.a1r_1.b1q());
|
|
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.x(new Package(subPackageName.
|
|
756
|
-
this_0.
|
|
757
|
-
this_0.
|
|
755
|
+
this_0.x(new Package(subPackageName.kv_1));
|
|
756
|
+
this_0.e1(this.m23_1);
|
|
757
|
+
this_0.e1(imports);
|
|
758
758
|
this_0.x(endpointImport);
|
|
759
|
-
this_0.
|
|
760
|
-
var tmp$ret$3 = this_0.
|
|
759
|
+
this_0.e1(file.b1r_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).c1z = 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,7 +776,7 @@ protoOf(ScalaIrEmitter).u1z = 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.
|
|
779
|
+
var key = e.iy_1;
|
|
780
780
|
if (set.x(key)) {
|
|
781
781
|
list_0.x(e);
|
|
782
782
|
}
|
|
@@ -787,7 +787,7 @@ protoOf(ScalaIrEmitter).u1z = 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.
|
|
790
|
+
var tmp$ret$5 = import_0(this.v1z().kv_1 + '.model', item.iy_1);
|
|
791
791
|
destination_0.x(tmp$ret$5);
|
|
792
792
|
}
|
|
793
793
|
var imports = destination_0;
|
|
@@ -797,7 +797,7 @@ protoOf(ScalaIrEmitter).u1z = 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.
|
|
800
|
+
var tmp$ret$8 = import_0(this.v1z().kv_1 + '.endpoint', item_0.ct_1.m1());
|
|
801
801
|
destination_1.x(tmp$ret$8);
|
|
802
802
|
}
|
|
803
803
|
var endpointImports = destination_1;
|
|
@@ -807,38 +807,38 @@ protoOf(ScalaIrEmitter).u1z = 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.
|
|
810
|
+
var tmp$ret$11 = import_0(this.v1z().kv_1 + '.client', item_1.ct_1.m1() + 'Client');
|
|
811
811
|
destination_2.x(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().u1k(this.v1z().mv() + file.a1r_1.b1q());
|
|
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.x(new Package(this.
|
|
822
|
-
this_0.
|
|
823
|
-
this_0.
|
|
824
|
-
this_0.
|
|
825
|
-
var tmp$ret$17 = this_0.
|
|
821
|
+
this_0.x(new Package(this.v1z().kv_1));
|
|
822
|
+
this_0.e1(this.m23_1);
|
|
823
|
+
this_0.e1(allImports);
|
|
824
|
+
this_0.e1(file.b1r_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.t1y(convertToStringCallsToFieldAccess$lambda);
|
|
832
|
+
var tmp = scope.l1y_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.et_1, '/', VOID, VOID, VOID, VOID, appendClientServerObjects$lambda);
|
|
838
|
+
var pathSegmentsCode = joinToString(endpoint.et_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.dt_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.dt_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.k1r(VOID, plus_0(plus_0(_this__u8e3s4.h1r_1, clientObject), serverObject));
|
|
842
842
|
}
|
|
843
843
|
function injectHandleFunction(_this__u8e3s4) {
|
|
844
844
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
@@ -846,19 +846,19 @@ 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.l1y_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.d1m(injectHandleFunction$lambda);
|
|
854
|
+
var tmp$ret$2 = this_1.e1m();
|
|
855
|
+
tmp.l1y_1 = transform(this_0, tmp$ret$2);
|
|
856
|
+
var tmp_0 = scope.l1y_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.h1r_1;
|
|
862
862
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
863
863
|
var destination = ArrayList_init_$Create$_0();
|
|
864
864
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -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.l1r_1.b1q() === '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.n1r_1.a1() === 1 && single(requestStruct.n1r_1).u1u_1.r() || (requestStruct.m1r_1.r() && requestStruct.n1r_1.r());
|
|
893
893
|
}
|
|
894
894
|
function buildModelImports(_this__u8e3s4, packageName) {
|
|
895
895
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
@@ -899,7 +899,7 @@ 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.
|
|
902
|
+
var key = e.iy_1;
|
|
903
903
|
if (set.x(key)) {
|
|
904
904
|
list.x(e);
|
|
905
905
|
}
|
|
@@ -910,7 +910,7 @@ 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.
|
|
913
|
+
var tmp$ret$2 = import_0(packageName.kv_1 + '.model', item.iy_1);
|
|
914
914
|
destination.x(tmp$ret$2);
|
|
915
915
|
}
|
|
916
916
|
return destination;
|
|
@@ -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.l1y_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.d1m(addIdentityTypeToCall$lambda);
|
|
929
|
+
var tmp$ret$2 = this_1.e1m();
|
|
930
|
+
tmp.l1y_1 = transform(this_0, tmp$ret$2);
|
|
931
|
+
var tmp_0 = scope.l1y_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.my_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.qx_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.tx_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.iy_1;
|
|
964
964
|
} else {
|
|
965
965
|
if (_this__u8e3s4 instanceof Iterable) {
|
|
966
|
-
tmp = 'List[' + toScalaTypeName(_this__u8e3s4.
|
|
966
|
+
tmp = 'List[' + toScalaTypeName(_this__u8e3s4.xr_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.as_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.ay() ? '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.f1q_1.v1p() === 'toString';
|
|
993
993
|
} else {
|
|
994
994
|
tmp_1 = false;
|
|
995
995
|
}
|
|
996
996
|
if (tmp_1) {
|
|
997
|
-
tmp_0 = !(expr.
|
|
997
|
+
tmp_0 = !(expr.d1q_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.d1q_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.g1y(tmp0_safe_receiver);
|
|
1009
1009
|
}
|
|
1010
|
-
tmp = new FieldCall(tmp_2, Companion_getInstance().
|
|
1010
|
+
tmp = new FieldCall(tmp_2, Companion_getInstance().u1k('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.fu_1;
|
|
1020
1020
|
} else {
|
|
1021
1021
|
if (it instanceof Param) {
|
|
1022
|
-
tmp = '{' + it.
|
|
1022
|
+
tmp = '{' + it.jt_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.fu_1 + '")';
|
|
1033
1033
|
} else {
|
|
1034
1034
|
if (segment instanceof Param) {
|
|
1035
|
-
tmp = 'Wirespec.Param("' + segment.
|
|
1035
|
+
tmp = 'Wirespec.Param("' + segment.jt_1.m1() + '", scala.reflect.classTag[' + toScalaTypeName(segment.kt_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.t1r_1.equals(Companion_getInstance().u1k('Handler')) && !element.t1r_1.equals(Companion_getInstance().u1k('Call'))) {
|
|
1048
1048
|
tmp$ret$0 = element;
|
|
1049
1049
|
break $l$block;
|
|
1050
1050
|
}
|
|
1051
1051
|
var tmp0_typeParameters = listOf(new TypeParameter(new Custom_0('F[_]')));
|
|
1052
1052
|
// Inline function 'kotlin.collections.map' call
|
|
1053
|
-
var this_0 = element.
|
|
1053
|
+
var this_0 = element.u1r_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.m1o_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 = new Custom_0('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.r1o(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
1077
|
destination.x(tmp$ret$3);
|
|
1078
1078
|
}
|
|
1079
|
-
tmp$ret$0 = element.
|
|
1079
|
+
tmp$ret$0 = element.a1s(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.o1r_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.n1m_1, '.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.r1q(VOID, listOf(new Custom_0('[A] =>> A')));
|
|
1114
1114
|
var tmp$ret$2 = tmp2_elvis_lhs == null ? item : tmp2_elvis_lhs;
|
|
1115
1115
|
destination.x(tmp$ret$2);
|
|
1116
1116
|
}
|
|
1117
|
-
tmp = element.
|
|
1117
|
+
tmp = element.s1r(VOID, VOID, VOID, destination);
|
|
1118
1118
|
} else {
|
|
1119
1119
|
tmp = element;
|
|
1120
1120
|
}
|
|
@@ -1122,8 +1122,8 @@ 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).
|
|
1125
|
+
protoOf(ScalaIrEmitter).mr = emit_0;
|
|
1126
|
+
protoOf(ScalaIrEmitter).a1z = emit_1;
|
|
1127
1127
|
//endregion
|
|
1128
1128
|
//region block: exports
|
|
1129
1129
|
export {
|