@flock/wirespec 0.18.6 → 0.18.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/arrow-arrow-atomic.mjs +11 -11
- package/arrow-arrow-core.mjs +141 -141
- package/clikt-clikt-mordant.mjs +80 -80
- package/clikt-clikt.mjs +1395 -1395
- package/clikt-clikt.mjs.map +1 -1
- package/colormath-root-colormath.mjs +442 -442
- package/kotlin-kotlin-stdlib.mjs +1054 -946
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +20812 -6818
- package/kotlin-openapi-bindings.mjs.map +1 -1
- package/kotlin-rgxgen.mjs +1797 -1797
- package/kotlinx-io-kotlinx-io-core.mjs +405 -405
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +1960 -1763
- package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1882 -1407
- package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/mordant-mordant.mjs +1269 -1269
- package/package.json +3 -2
- package/wirespec-lsp.mjs +7 -0
- package/wirespec-src-compiler-core.mjs +1708 -1644
- package/wirespec-src-compiler-core.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-java.mjs +409 -409
- package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-kotlin.mjs +326 -326
- package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-python.mjs +328 -328
- package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-rust.mjs +370 -370
- package/wirespec-src-compiler-emitters-scala.mjs +154 -154
- package/wirespec-src-compiler-emitters-scala.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-typescript.mjs +372 -372
- package/wirespec-src-compiler-emitters-wirespec.mjs +80 -80
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-ir.mjs +3193 -3193
- package/wirespec-src-compiler-lib.mjs +399 -399
- package/wirespec-src-converter-avro.mjs +507 -507
- package/wirespec-src-converter-openapi.mjs +1487 -1413
- package/wirespec-src-converter-openapi.mjs.map +1 -1
- package/wirespec-src-ide-lsp.mjs +4928 -0
- package/wirespec-src-ide-lsp.mjs.map +1 -0
- package/wirespec-src-plugin-arguments.mjs +175 -175
- package/wirespec-src-plugin-cli.mjs +102 -102
- package/wirespec-src-plugin-npm.d.mts +2 -0
- package/wirespec-src-plugin-npm.mjs +42 -37
- package/wirespec-src-plugin-npm.mjs.map +1 -1
- package/wirespec-src-tools-generator.mjs +32 -32
|
@@ -129,7 +129,7 @@ initMetadataForCompanion(Companion);
|
|
|
129
129
|
initMetadataForClass(ScalaIrEmitter, 'ScalaIrEmitter', ScalaIrEmitter, VOID, [IrEmitter]);
|
|
130
130
|
//endregion
|
|
131
131
|
function _get_sanitizationConfig__sns434($this) {
|
|
132
|
-
var tmp0 = $this.
|
|
132
|
+
var tmp0 = $this.z1y_1;
|
|
133
133
|
var tmp = KProperty1;
|
|
134
134
|
// Inline function 'kotlin.getValue' call
|
|
135
135
|
getPropertyCallableRef('sanitizationConfig', 1, tmp, ScalaIrEmitter$_get_sanitizationConfig_$ref_ydarb0(), null);
|
|
@@ -146,7 +146,7 @@ function sanitize($this, _this__u8e3s4) {
|
|
|
146
146
|
var item = _iterator__ex2g4s.v();
|
|
147
147
|
var _unary__edvuaz = index;
|
|
148
148
|
index = _unary__edvuaz + 1 | 0;
|
|
149
|
-
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.
|
|
149
|
+
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.sq(item) : item;
|
|
150
150
|
destination.x(tmp$ret$0);
|
|
151
151
|
}
|
|
152
152
|
// Inline function 'kotlin.text.filter' call
|
|
@@ -194,7 +194,7 @@ function sanitizeFirstIsDigit($this, _this__u8e3s4) {
|
|
|
194
194
|
return tmp;
|
|
195
195
|
}
|
|
196
196
|
function sanitizeKeywords($this, _this__u8e3s4) {
|
|
197
|
-
return Companion_getInstance_0().
|
|
197
|
+
return Companion_getInstance_0().a1z_1.u1(_this__u8e3s4) ? addBackticks(_this__u8e3s4) : _this__u8e3s4;
|
|
198
198
|
}
|
|
199
199
|
function sanitizeSymbol($this, _this__u8e3s4) {
|
|
200
200
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
@@ -207,7 +207,7 @@ function sanitizeSymbol($this, _this__u8e3s4) {
|
|
|
207
207
|
var item = _iterator__ex2g4s.v();
|
|
208
208
|
var _unary__edvuaz = index;
|
|
209
209
|
index = _unary__edvuaz + 1 | 0;
|
|
210
|
-
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.
|
|
210
|
+
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.sq(item) : item;
|
|
211
211
|
destination.x(tmp$ret$0);
|
|
212
212
|
}
|
|
213
213
|
// Inline function 'kotlin.text.filter' call
|
|
@@ -234,7 +234,7 @@ function sanitizeEnum($this, _this__u8e3s4) {
|
|
|
234
234
|
}
|
|
235
235
|
function Companion() {
|
|
236
236
|
Companion_instance_2 = this;
|
|
237
|
-
this.
|
|
237
|
+
this.a1z_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']);
|
|
238
238
|
}
|
|
239
239
|
var Companion_instance_2;
|
|
240
240
|
function Companion_getInstance_0() {
|
|
@@ -247,13 +247,13 @@ function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda(it) {
|
|
|
247
247
|
}
|
|
248
248
|
function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0) {
|
|
249
249
|
return function (name) {
|
|
250
|
-
var sanitized = name.
|
|
250
|
+
var sanitized = name.l1h_1.a1() > 1 ? name.x1l() : sanitizeSymbol(this$0, name.x1h());
|
|
251
251
|
return new Name(listOf(sanitized));
|
|
252
252
|
};
|
|
253
253
|
}
|
|
254
254
|
function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0) {
|
|
255
255
|
return function (name) {
|
|
256
|
-
return new Name(listOf(sanitizeSymbol(this$0, name.
|
|
256
|
+
return new Name(listOf(sanitizeSymbol(this$0, name.x1l())));
|
|
257
257
|
};
|
|
258
258
|
}
|
|
259
259
|
function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_2(this$0) {
|
|
@@ -266,17 +266,17 @@ function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
266
266
|
var tmp;
|
|
267
267
|
var tmp_0;
|
|
268
268
|
if (stmt instanceof FunctionCall) {
|
|
269
|
-
tmp_0 = stmt.
|
|
269
|
+
tmp_0 = stmt.g1m_1.x1h() === 'validate';
|
|
270
270
|
} else {
|
|
271
271
|
tmp_0 = false;
|
|
272
272
|
}
|
|
273
273
|
if (tmp_0) {
|
|
274
|
-
tmp = transformChildren(stmt.
|
|
274
|
+
tmp = transformChildren(stmt.k1m(VOID, emptyList()), tr);
|
|
275
275
|
} else {
|
|
276
276
|
if (stmt instanceof ConstructorStatement) {
|
|
277
|
-
var tmp_1 = tr.
|
|
277
|
+
var tmp_1 = tr.u1t(stmt.u1m_1);
|
|
278
278
|
// Inline function 'kotlin.collections.map' call
|
|
279
|
-
var this_0 = stmt.
|
|
279
|
+
var this_0 = stmt.v1m_1;
|
|
280
280
|
// Inline function 'kotlin.collections.mapTo' call
|
|
281
281
|
var destination = ArrayList_init_$Create$(this_0.a1());
|
|
282
282
|
// Inline function 'kotlin.collections.iterator' call
|
|
@@ -287,7 +287,7 @@ function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
287
287
|
var name = item.k1();
|
|
288
288
|
// Inline function 'kotlin.collections.component2' call
|
|
289
289
|
var expr = item.l1();
|
|
290
|
-
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), name), tr.
|
|
290
|
+
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), name), tr.x1t(expr));
|
|
291
291
|
destination.x(tmp$ret$3);
|
|
292
292
|
}
|
|
293
293
|
tmp = new ConstructorStatement(tmp_1, toMap(destination));
|
|
@@ -300,7 +300,7 @@ function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
300
300
|
}
|
|
301
301
|
function ScalaIrEmitter$sanitizationConfig$delegate$lambda(this$0) {
|
|
302
302
|
return function () {
|
|
303
|
-
var tmp = Companion_getInstance_0().
|
|
303
|
+
var tmp = Companion_getInstance_0().a1z_1;
|
|
304
304
|
var tmp_0 = ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda;
|
|
305
305
|
var tmp_1 = ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0);
|
|
306
306
|
var tmp_2 = ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0);
|
|
@@ -314,21 +314,21 @@ function ScalaIrEmitter$_get_sanitizationConfig_$ref_ydarb0() {
|
|
|
314
314
|
};
|
|
315
315
|
}
|
|
316
316
|
function ScalaIrEmitter$emitShared$lambda($this$struct) {
|
|
317
|
-
$this$struct.
|
|
318
|
-
$this$struct.
|
|
317
|
+
$this$struct.p1k(Custom_init_$Create$('PathSegment'));
|
|
318
|
+
$this$struct.p1j('value', String_instance);
|
|
319
319
|
return Unit_instance;
|
|
320
320
|
}
|
|
321
321
|
function ScalaIrEmitter$emitShared$lambda_0($this$struct) {
|
|
322
|
-
$this$struct.
|
|
323
|
-
$this$struct.
|
|
324
|
-
$this$struct.
|
|
322
|
+
$this$struct.p1k(Custom_init_$Create$('PathSegment'));
|
|
323
|
+
$this$struct.p1j('name', String_instance);
|
|
324
|
+
$this$struct.p1j('type', Reflect_instance);
|
|
325
325
|
return Unit_instance;
|
|
326
326
|
}
|
|
327
327
|
function ScalaIrEmitter$emitShared$lambda_1(element, transformer) {
|
|
328
328
|
var tmp;
|
|
329
329
|
if (element instanceof File) {
|
|
330
330
|
// Inline function 'kotlin.collections.partition' call
|
|
331
|
-
var this_0 = element.
|
|
331
|
+
var this_0 = element.y1m_1;
|
|
332
332
|
var first = ArrayList_init_$Create$_0();
|
|
333
333
|
var second = ArrayList_init_$Create$_0();
|
|
334
334
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -341,9 +341,9 @@ function ScalaIrEmitter$emitShared$lambda_1(element, transformer) {
|
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
var _destruct__k2r9zo = new Pair(first, second);
|
|
344
|
-
var packageElements = _destruct__k2r9zo.
|
|
345
|
-
var rest = _destruct__k2r9zo.
|
|
346
|
-
tmp = element.
|
|
344
|
+
var packageElements = _destruct__k2r9zo.qe();
|
|
345
|
+
var rest = _destruct__k2r9zo.re();
|
|
346
|
+
tmp = element.b1n(VOID, plus(packageElements, rest));
|
|
347
347
|
} else {
|
|
348
348
|
tmp = element;
|
|
349
349
|
}
|
|
@@ -355,12 +355,12 @@ function ScalaIrEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
355
355
|
if (element instanceof Namespace) {
|
|
356
356
|
var tmp$ret$0;
|
|
357
357
|
$l$block: {
|
|
358
|
-
if (!element.
|
|
358
|
+
if (!element.d1n_1.equals(Companion_getInstance().k1h('Wirespec'))) {
|
|
359
359
|
tmp$ret$0 = element;
|
|
360
360
|
break $l$block;
|
|
361
361
|
}
|
|
362
362
|
// Inline function 'kotlin.collections.flatMap' call
|
|
363
|
-
var tmp0 = element.
|
|
363
|
+
var tmp0 = element.e1n_1;
|
|
364
364
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
365
365
|
var destination = ArrayList_init_$Create$_0();
|
|
366
366
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -372,14 +372,14 @@ function ScalaIrEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
372
372
|
if (!(element_0 instanceof Interface)) {
|
|
373
373
|
tmp_0 = true;
|
|
374
374
|
} else {
|
|
375
|
-
tmp_0 = !setOf(['Request', 'Response']).u1(element_0.
|
|
375
|
+
tmp_0 = !setOf(['Request', 'Response']).u1(element_0.p1n_1.m1h());
|
|
376
376
|
}
|
|
377
377
|
if (tmp_0) {
|
|
378
378
|
tmp$ret$1 = listOf(element_0);
|
|
379
379
|
break $l$block_2;
|
|
380
380
|
}
|
|
381
381
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
382
|
-
var tmp0_0 = element_0.
|
|
382
|
+
var tmp0_0 = element_0.q1n_1;
|
|
383
383
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
384
384
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
385
385
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
@@ -395,7 +395,7 @@ function ScalaIrEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
395
395
|
var _iterator__ex2g4s_1 = destination_0.t();
|
|
396
396
|
while (_iterator__ex2g4s_1.u()) {
|
|
397
397
|
var element_2 = _iterator__ex2g4s_1.v();
|
|
398
|
-
if (element_2.
|
|
398
|
+
if (element_2.p1n_1.m1h() === 'Headers') {
|
|
399
399
|
tmp$ret$5 = element_2;
|
|
400
400
|
break $l$block_1;
|
|
401
401
|
}
|
|
@@ -411,9 +411,9 @@ function ScalaIrEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
411
411
|
tmp_1 = tmp0_elvis_lhs;
|
|
412
412
|
}
|
|
413
413
|
var nestedHeaders = tmp_1;
|
|
414
|
-
var tmp_2 = new Namespace(element_0.
|
|
414
|
+
var tmp_2 = new Namespace(element_0.p1n_1, listOf(nestedHeaders));
|
|
415
415
|
// Inline function 'kotlin.collections.filter' call
|
|
416
|
-
var tmp0_1 = element_0.
|
|
416
|
+
var tmp0_1 = element_0.q1n_1;
|
|
417
417
|
// Inline function 'kotlin.collections.filterTo' call
|
|
418
418
|
var destination_1 = ArrayList_init_$Create$_0();
|
|
419
419
|
var _iterator__ex2g4s_2 = tmp0_1.t();
|
|
@@ -421,7 +421,7 @@ function ScalaIrEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
421
421
|
var element_3 = _iterator__ex2g4s_2.v();
|
|
422
422
|
var tmp_3;
|
|
423
423
|
if (element_3 instanceof Interface) {
|
|
424
|
-
tmp_3 = element_3.
|
|
424
|
+
tmp_3 = element_3.p1n_1.m1h() === 'Headers';
|
|
425
425
|
} else {
|
|
426
426
|
tmp_3 = false;
|
|
427
427
|
}
|
|
@@ -431,28 +431,28 @@ function ScalaIrEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
431
431
|
}
|
|
432
432
|
var tmp_4 = destination_1;
|
|
433
433
|
// Inline function 'kotlin.collections.map' call
|
|
434
|
-
var this_0 = element_0.
|
|
434
|
+
var this_0 = element_0.u1n_1;
|
|
435
435
|
// Inline function 'kotlin.collections.mapTo' call
|
|
436
436
|
var destination_2 = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
437
437
|
var _iterator__ex2g4s_3 = this_0.t();
|
|
438
438
|
while (_iterator__ex2g4s_3.u()) {
|
|
439
439
|
var item = _iterator__ex2g4s_3.v();
|
|
440
440
|
var tmp_5;
|
|
441
|
-
if (item.
|
|
442
|
-
tmp_5 = item.
|
|
441
|
+
if (item.e1q_1.x1h() === 'headers') {
|
|
442
|
+
tmp_5 = item.i1q(VOID, Custom_init_$Create$(element_0.p1n_1.m1h() + '.Headers'));
|
|
443
443
|
} else {
|
|
444
444
|
tmp_5 = item;
|
|
445
445
|
}
|
|
446
446
|
var tmp$ret$9 = tmp_5;
|
|
447
447
|
destination_2.x(tmp$ret$9);
|
|
448
448
|
}
|
|
449
|
-
tmp$ret$1 = listOf_0([tmp_2, element_0.
|
|
449
|
+
tmp$ret$1 = listOf_0([tmp_2, element_0.w1n(VOID, tmp_4, VOID, VOID, VOID, destination_2)]);
|
|
450
450
|
}
|
|
451
451
|
var list = tmp$ret$1;
|
|
452
452
|
addAll(destination, list);
|
|
453
453
|
}
|
|
454
454
|
var newElements = destination;
|
|
455
|
-
tmp$ret$0 = element.
|
|
455
|
+
tmp$ret$0 = element.h1n(VOID, newElements);
|
|
456
456
|
}
|
|
457
457
|
tmp = tmp$ret$0;
|
|
458
458
|
} else {
|
|
@@ -465,11 +465,11 @@ function ScalaIrEmitter$emitShared$lambda_3($clientServer) {
|
|
|
465
465
|
return function (element, transformer) {
|
|
466
466
|
var tmp;
|
|
467
467
|
if (element instanceof Namespace) {
|
|
468
|
-
var injected = element.
|
|
468
|
+
var injected = element.d1n_1.equals(Companion_getInstance().k1h('Wirespec')) ? $clientServer : emptyList();
|
|
469
469
|
var tmp_0;
|
|
470
470
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
471
471
|
if (!injected.r()) {
|
|
472
|
-
tmp_0 = withElements(element, plus(element.
|
|
472
|
+
tmp_0 = withElements(element, plus(element.z1m(), injected));
|
|
473
473
|
} else {
|
|
474
474
|
tmp_0 = element;
|
|
475
475
|
}
|
|
@@ -488,27 +488,27 @@ function ScalaIrEmitter$emit$lambda(this$0) {
|
|
|
488
488
|
}
|
|
489
489
|
function ScalaIrEmitter(packageName, emitShared) {
|
|
490
490
|
Companion_getInstance_0();
|
|
491
|
-
packageName = packageName === VOID ? Companion_instance_0.
|
|
492
|
-
emitShared = emitShared === VOID ? Companion_instance_1.
|
|
493
|
-
this.
|
|
494
|
-
this.
|
|
495
|
-
this.
|
|
496
|
-
this.
|
|
497
|
-
this.
|
|
491
|
+
packageName = packageName === VOID ? Companion_instance_0.qr('community.flock.wirespec.generated') : packageName;
|
|
492
|
+
emitShared = emitShared === VOID ? Companion_instance_1.ko() : emitShared;
|
|
493
|
+
this.u1y_1 = packageName;
|
|
494
|
+
this.v1y_1 = emitShared;
|
|
495
|
+
this.w1y_1 = ScalaGenerator_getInstance();
|
|
496
|
+
this.x1y_1 = FileExtension_Scala_getInstance();
|
|
497
|
+
this.y1y_1 = listOf_0([import_0('community.flock.wirespec.scala', 'Wirespec'), import_0('scala.reflect', 'ClassTag')]);
|
|
498
498
|
var tmp = this;
|
|
499
|
-
tmp.
|
|
499
|
+
tmp.z1y_1 = lazy(ScalaIrEmitter$sanitizationConfig$delegate$lambda(this));
|
|
500
500
|
}
|
|
501
|
-
protoOf(ScalaIrEmitter).
|
|
502
|
-
return this.
|
|
501
|
+
protoOf(ScalaIrEmitter).i1v = function () {
|
|
502
|
+
return this.u1y_1;
|
|
503
503
|
};
|
|
504
|
-
protoOf(ScalaIrEmitter).
|
|
505
|
-
return this.
|
|
504
|
+
protoOf(ScalaIrEmitter).p1u = function () {
|
|
505
|
+
return this.w1y_1;
|
|
506
506
|
};
|
|
507
|
-
protoOf(ScalaIrEmitter).
|
|
508
|
-
return this.
|
|
507
|
+
protoOf(ScalaIrEmitter).iq = function () {
|
|
508
|
+
return this.x1y_1;
|
|
509
509
|
};
|
|
510
|
-
protoOf(ScalaIrEmitter).
|
|
511
|
-
var packageName = Companion_instance_0.
|
|
510
|
+
protoOf(ScalaIrEmitter).s1u = function () {
|
|
511
|
+
var packageName = Companion_instance_0.qr('community.flock.wirespec.scala');
|
|
512
512
|
var tmp = interface_0('PathSegment', true);
|
|
513
513
|
var tmp_0 = struct('Literal', ScalaIrEmitter$emitShared$lambda);
|
|
514
514
|
var pathSegmentTypes = listOf_0([tmp, tmp_0, struct('Param', ScalaIrEmitter$emitShared$lambda_0)]);
|
|
@@ -522,12 +522,12 @@ protoOf(ScalaIrEmitter).n1u = function () {
|
|
|
522
522
|
var tmp_1;
|
|
523
523
|
var tmp_2;
|
|
524
524
|
if (item instanceof Interface) {
|
|
525
|
-
tmp_2 = setOf(['Client', 'Server']).u1(item.
|
|
525
|
+
tmp_2 = setOf(['Client', 'Server']).u1(item.p1n_1.m1h());
|
|
526
526
|
} else {
|
|
527
527
|
tmp_2 = false;
|
|
528
528
|
}
|
|
529
529
|
if (tmp_2) {
|
|
530
|
-
tmp_1 = item.
|
|
530
|
+
tmp_1 = item.w1n(VOID, VOID, VOID, VOID, VOID, plus_0(item.u1n_1, new Field(Companion_getInstance().k1h('pathSegments'), new Array_0(Custom_init_$Create$('PathSegment')))));
|
|
531
531
|
} else {
|
|
532
532
|
tmp_1 = item;
|
|
533
533
|
}
|
|
@@ -541,72 +541,72 @@ protoOf(ScalaIrEmitter).n1u = function () {
|
|
|
541
541
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
542
542
|
var tmp_3 = scope;
|
|
543
543
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
544
|
-
var this_2 = scope.
|
|
544
|
+
var this_2 = scope.c1u_1;
|
|
545
545
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
546
546
|
// Inline function 'kotlin.apply' call
|
|
547
547
|
var this_3 = new TransformerBuilder();
|
|
548
|
-
this_3.
|
|
549
|
-
var tmp$ret$5 = this_3.
|
|
550
|
-
tmp_3.
|
|
548
|
+
this_3.h1h(ScalaIrEmitter$emitShared$lambda_1);
|
|
549
|
+
var tmp$ret$5 = this_3.i1h();
|
|
550
|
+
tmp_3.c1u_1 = transform(this_2, tmp$ret$5);
|
|
551
551
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
552
552
|
var tmp_4 = scope;
|
|
553
553
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
554
|
-
var this_4 = scope.
|
|
554
|
+
var this_4 = scope.c1u_1;
|
|
555
555
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
556
556
|
// Inline function 'kotlin.apply' call
|
|
557
557
|
var this_5 = new TransformerBuilder();
|
|
558
|
-
this_5.
|
|
559
|
-
var tmp$ret$10 = this_5.
|
|
560
|
-
tmp_4.
|
|
558
|
+
this_5.h1h(ScalaIrEmitter$emitShared$lambda_2);
|
|
559
|
+
var tmp$ret$10 = this_5.i1h();
|
|
560
|
+
tmp_4.c1u_1 = transform(this_4, tmp$ret$10);
|
|
561
561
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.injectAfter' call
|
|
562
562
|
var tmp_5 = scope;
|
|
563
563
|
// Inline function 'community.flock.wirespec.ir.core.injectAfter' call
|
|
564
564
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
565
|
-
var this_6 = scope.
|
|
565
|
+
var this_6 = scope.c1u_1;
|
|
566
566
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
567
567
|
// Inline function 'kotlin.apply' call
|
|
568
568
|
var this_7 = new TransformerBuilder();
|
|
569
|
-
this_7.
|
|
570
|
-
var tmp$ret$15 = this_7.
|
|
571
|
-
tmp_5.
|
|
572
|
-
var tmp_6 = scope.
|
|
569
|
+
this_7.h1h(ScalaIrEmitter$emitShared$lambda_3(clientServer));
|
|
570
|
+
var tmp$ret$15 = this_7.i1h();
|
|
571
|
+
tmp_5.c1u_1 = transform(this_6, tmp$ret$15);
|
|
572
|
+
var tmp_6 = scope.c1u_1;
|
|
573
573
|
var wirespecShared = isInterface(tmp_6, Element) ? tmp_6 : THROW_CCE();
|
|
574
574
|
var tmp_7;
|
|
575
|
-
if (this.
|
|
576
|
-
tmp_7 = wirespecShared.
|
|
575
|
+
if (this.v1y_1.lo_1) {
|
|
576
|
+
tmp_7 = wirespecShared.b1n(Companion_getInstance().k1h(packageName.tr() + 'Wirespec'));
|
|
577
577
|
} else {
|
|
578
578
|
tmp_7 = null;
|
|
579
579
|
}
|
|
580
580
|
return tmp_7;
|
|
581
581
|
};
|
|
582
|
-
protoOf(ScalaIrEmitter).
|
|
582
|
+
protoOf(ScalaIrEmitter).zq = function (definition, module_0, logger) {
|
|
583
583
|
var file = emit.call(this, definition, module_0, logger);
|
|
584
584
|
// Inline function 'kotlin.takeIf' call
|
|
585
|
-
var this_0 = this.
|
|
585
|
+
var this_0 = this.y1y_1;
|
|
586
586
|
var tmp;
|
|
587
|
-
if (Companion_instance.
|
|
587
|
+
if (Companion_instance.vq(module_0)) {
|
|
588
588
|
tmp = this_0;
|
|
589
589
|
} else {
|
|
590
590
|
tmp = null;
|
|
591
591
|
}
|
|
592
592
|
var tmp$ret$1 = tmp;
|
|
593
|
-
return placeInPackage(prependImports(file, tmp$ret$1), this.
|
|
593
|
+
return placeInPackage(prependImports(file, tmp$ret$1), this.i1v(), definition);
|
|
594
594
|
};
|
|
595
|
-
protoOf(ScalaIrEmitter).
|
|
595
|
+
protoOf(ScalaIrEmitter).yp = function (type, module_0) {
|
|
596
596
|
return ensureEmptyStructHasConstructor(sanitizeNames(convertWithValidation(type, module_0), _get_sanitizationConfig__sns434(this)));
|
|
597
597
|
};
|
|
598
|
-
protoOf(ScalaIrEmitter).
|
|
598
|
+
protoOf(ScalaIrEmitter).nr = function (enum_0, module_0) {
|
|
599
599
|
var tmp = sanitizeNames(convert_0(enum_0), _get_sanitizationConfig__sns434(this));
|
|
600
600
|
return injectEnumLabelField(tmp, ScalaIrEmitter$emit$lambda(this));
|
|
601
601
|
};
|
|
602
|
-
protoOf(ScalaIrEmitter).
|
|
602
|
+
protoOf(ScalaIrEmitter).dr = function (union) {
|
|
603
603
|
return sanitizeNames(convert_1(union), _get_sanitizationConfig__sns434(this));
|
|
604
604
|
};
|
|
605
|
-
protoOf(ScalaIrEmitter).
|
|
605
|
+
protoOf(ScalaIrEmitter).ir = function (refined) {
|
|
606
606
|
var file = sanitizeNames(convert_2(refined), _get_sanitizationConfig__sns434(this));
|
|
607
607
|
// Inline function 'community.flock.wirespec.ir.core.findElement' call
|
|
608
608
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
609
|
-
var tmp0 = file.
|
|
609
|
+
var tmp0 = file.z1m();
|
|
610
610
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
611
611
|
var destination = ArrayList_init_$Create$_0();
|
|
612
612
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -618,12 +618,12 @@ protoOf(ScalaIrEmitter).dr = function (refined) {
|
|
|
618
618
|
}
|
|
619
619
|
var tmp$ret$2 = firstOrNull_0(destination);
|
|
620
620
|
var updatedStruct = convertToStringCallsToFieldAccess(markMembersAsOverride(ensureNotNull(tmp$ret$2)));
|
|
621
|
-
return new File(Companion_getInstance().
|
|
621
|
+
return new File(Companion_getInstance().k1h(sanitize(this, refined.gr_1)), listOf(updatedStruct));
|
|
622
622
|
};
|
|
623
|
-
protoOf(ScalaIrEmitter).
|
|
623
|
+
protoOf(ScalaIrEmitter).or = function (endpoint) {
|
|
624
624
|
// Inline function 'community.flock.wirespec.ir.core.findElement' call
|
|
625
625
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
626
|
-
var tmp0 = convert_3(endpoint).
|
|
626
|
+
var tmp0 = convert_3(endpoint).z1m();
|
|
627
627
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
628
628
|
var destination = ArrayList_init_$Create$_0();
|
|
629
629
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -637,9 +637,9 @@ protoOf(ScalaIrEmitter).jr = function (endpoint) {
|
|
|
637
637
|
var endpointNamespace = ensureNotNull(tmp$ret$2);
|
|
638
638
|
var flattened = flattenNestedStructs(endpointNamespace);
|
|
639
639
|
var body = appendClientServerObjects(injectHandleFunction(flattened), endpoint, isRequestObject(flattened));
|
|
640
|
-
var tmp = sanitizeNames(new File(Companion_getInstance().
|
|
640
|
+
var tmp = sanitizeNames(new File(Companion_getInstance().k1h(sanitize(this, endpoint.ip_1)), listOf(body)), _get_sanitizationConfig__sns434(this));
|
|
641
641
|
// Inline function 'kotlin.takeIf' call
|
|
642
|
-
var this_0 = buildModelImports(endpoint, this.
|
|
642
|
+
var this_0 = buildModelImports(endpoint, this.i1v());
|
|
643
643
|
var tmp_0;
|
|
644
644
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
645
645
|
if (!this_0.r()) {
|
|
@@ -650,10 +650,10 @@ protoOf(ScalaIrEmitter).jr = function (endpoint) {
|
|
|
650
650
|
var tmp$ret$5 = tmp_0;
|
|
651
651
|
return prependImports(tmp, tmp$ret$5);
|
|
652
652
|
};
|
|
653
|
-
protoOf(ScalaIrEmitter).
|
|
653
|
+
protoOf(ScalaIrEmitter).cr = function (channel) {
|
|
654
654
|
var tmp = sanitizeNames(convert_4(channel), _get_sanitizationConfig__sns434(this));
|
|
655
655
|
// Inline function 'kotlin.takeIf' call
|
|
656
|
-
var this_0 = buildModelImports(channel, this.
|
|
656
|
+
var this_0 = buildModelImports(channel, this.i1v());
|
|
657
657
|
var tmp_0;
|
|
658
658
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
659
659
|
if (!this_0.r()) {
|
|
@@ -664,25 +664,25 @@ protoOf(ScalaIrEmitter).xq = function (channel) {
|
|
|
664
664
|
var tmp$ret$2 = tmp_0;
|
|
665
665
|
return prependImports(tmp, tmp$ret$2);
|
|
666
666
|
};
|
|
667
|
-
protoOf(ScalaIrEmitter).
|
|
668
|
-
var imports = buildModelImports(endpoint, this.
|
|
669
|
-
var endpointImport = import_0(this.
|
|
667
|
+
protoOf(ScalaIrEmitter).u1u = function (endpoint) {
|
|
668
|
+
var imports = buildModelImports(endpoint, this.i1v());
|
|
669
|
+
var endpointImport = import_0(this.i1v().rr_1 + '.endpoint', endpoint.ip_1.l1());
|
|
670
670
|
var file = addIdentityTypeToCall(sanitizeNames(emitEndpointClient.call(this, endpoint), _get_sanitizationConfig__sns434(this)));
|
|
671
|
-
var subPackageName = plus_1(this.
|
|
672
|
-
var tmp = Companion_getInstance().
|
|
671
|
+
var subPackageName = plus_1(this.i1v(), 'client');
|
|
672
|
+
var tmp = Companion_getInstance().k1h(subPackageName.tr() + file.x1m_1.m1h());
|
|
673
673
|
// Inline function 'kotlin.collections.buildList' call
|
|
674
674
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
675
675
|
// Inline function 'kotlin.apply' call
|
|
676
676
|
var this_0 = ArrayList_init_$Create$_0();
|
|
677
|
-
this_0.x(new Package(subPackageName.
|
|
678
|
-
this_0.
|
|
679
|
-
this_0.
|
|
677
|
+
this_0.x(new Package(subPackageName.rr_1));
|
|
678
|
+
this_0.f1(this.y1y_1);
|
|
679
|
+
this_0.f1(imports);
|
|
680
680
|
this_0.x(endpointImport);
|
|
681
|
-
this_0.
|
|
681
|
+
this_0.f1(file.y1m_1);
|
|
682
682
|
var tmp$ret$3 = this_0.o5();
|
|
683
683
|
return new File(tmp, tmp$ret$3);
|
|
684
684
|
};
|
|
685
|
-
protoOf(ScalaIrEmitter).
|
|
685
|
+
protoOf(ScalaIrEmitter).t1u = function (endpoints, logger) {
|
|
686
686
|
// Inline function 'kotlin.collections.flatMap' call
|
|
687
687
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
688
688
|
var destination = ArrayList_init_$Create$_0();
|
|
@@ -698,7 +698,7 @@ protoOf(ScalaIrEmitter).o1u = function (endpoints, logger) {
|
|
|
698
698
|
var _iterator__ex2g4s_0 = destination.t();
|
|
699
699
|
while (_iterator__ex2g4s_0.u()) {
|
|
700
700
|
var e = _iterator__ex2g4s_0.v();
|
|
701
|
-
var key = e.
|
|
701
|
+
var key = e.pu_1;
|
|
702
702
|
if (set.x(key)) {
|
|
703
703
|
list_0.x(e);
|
|
704
704
|
}
|
|
@@ -709,7 +709,7 @@ protoOf(ScalaIrEmitter).o1u = function (endpoints, logger) {
|
|
|
709
709
|
var _iterator__ex2g4s_1 = list_0.t();
|
|
710
710
|
while (_iterator__ex2g4s_1.u()) {
|
|
711
711
|
var item = _iterator__ex2g4s_1.v();
|
|
712
|
-
var tmp$ret$5 = import_0(this.
|
|
712
|
+
var tmp$ret$5 = import_0(this.i1v().rr_1 + '.model', item.pu_1);
|
|
713
713
|
destination_0.x(tmp$ret$5);
|
|
714
714
|
}
|
|
715
715
|
var imports = destination_0;
|
|
@@ -719,7 +719,7 @@ protoOf(ScalaIrEmitter).o1u = function (endpoints, logger) {
|
|
|
719
719
|
var _iterator__ex2g4s_2 = endpoints.t();
|
|
720
720
|
while (_iterator__ex2g4s_2.u()) {
|
|
721
721
|
var item_0 = _iterator__ex2g4s_2.v();
|
|
722
|
-
var tmp$ret$8 = import_0(this.
|
|
722
|
+
var tmp$ret$8 = import_0(this.i1v().rr_1 + '.endpoint', item_0.ip_1.l1());
|
|
723
723
|
destination_1.x(tmp$ret$8);
|
|
724
724
|
}
|
|
725
725
|
var endpointImports = destination_1;
|
|
@@ -729,38 +729,38 @@ protoOf(ScalaIrEmitter).o1u = function (endpoints, logger) {
|
|
|
729
729
|
var _iterator__ex2g4s_3 = endpoints.t();
|
|
730
730
|
while (_iterator__ex2g4s_3.u()) {
|
|
731
731
|
var item_1 = _iterator__ex2g4s_3.v();
|
|
732
|
-
var tmp$ret$11 = import_0(this.
|
|
732
|
+
var tmp$ret$11 = import_0(this.i1v().rr_1 + '.client', item_1.ip_1.l1() + 'Client');
|
|
733
733
|
destination_2.x(tmp$ret$11);
|
|
734
734
|
}
|
|
735
735
|
var clientImports = destination_2;
|
|
736
736
|
var allImports = plus(plus(imports, endpointImports), clientImports);
|
|
737
737
|
var file = addIdentityTypeToCall(sanitizeNames(emitClient.call(this, endpoints, logger), _get_sanitizationConfig__sns434(this)));
|
|
738
|
-
var tmp = Companion_getInstance().
|
|
738
|
+
var tmp = Companion_getInstance().k1h(this.i1v().tr() + file.x1m_1.m1h());
|
|
739
739
|
// Inline function 'kotlin.collections.buildList' call
|
|
740
740
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
741
741
|
// Inline function 'kotlin.apply' call
|
|
742
742
|
var this_0 = ArrayList_init_$Create$_0();
|
|
743
|
-
this_0.x(new Package(this.
|
|
744
|
-
this_0.
|
|
745
|
-
this_0.
|
|
746
|
-
this_0.
|
|
743
|
+
this_0.x(new Package(this.i1v().rr_1));
|
|
744
|
+
this_0.f1(this.y1y_1);
|
|
745
|
+
this_0.f1(allImports);
|
|
746
|
+
this_0.f1(file.y1m_1);
|
|
747
747
|
var tmp$ret$17 = this_0.o5();
|
|
748
748
|
return new File(tmp, tmp$ret$17);
|
|
749
749
|
};
|
|
750
750
|
function convertToStringCallsToFieldAccess(_this__u8e3s4) {
|
|
751
751
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
752
752
|
var scope = new TransformScope(_this__u8e3s4);
|
|
753
|
-
scope.
|
|
754
|
-
var tmp = scope.
|
|
753
|
+
scope.k1u(convertToStringCallsToFieldAccess$lambda);
|
|
754
|
+
var tmp = scope.c1u_1;
|
|
755
755
|
return isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
756
756
|
}
|
|
757
757
|
function appendClientServerObjects(_this__u8e3s4, endpoint, requestIsObject) {
|
|
758
758
|
var reqType = requestIsObject ? 'Request.type' : 'Request';
|
|
759
|
-
var pathTemplate = '/' + joinToString(endpoint.
|
|
760
|
-
var pathSegmentsCode = joinToString(endpoint.
|
|
761
|
-
var clientObject = raw(trimMargin('\n |object Client extends Wirespec.Client[' + reqType + ', Response[?]] {\n | override val pathTemplate: String = "' + pathTemplate + '"\n | override val method: String = "' + endpoint.
|
|
762
|
-
var serverObject = raw(trimMargin('\n |object Server extends Wirespec.Server[' + reqType + ', Response[?]] {\n | override val pathTemplate: String = "' + pathTemplate + '"\n | override val method: String = "' + endpoint.
|
|
763
|
-
return _this__u8e3s4.
|
|
759
|
+
var pathTemplate = '/' + joinToString(endpoint.kp_1, '/', VOID, VOID, VOID, VOID, appendClientServerObjects$lambda);
|
|
760
|
+
var pathSegmentsCode = joinToString(endpoint.kp_1, ', ', VOID, VOID, VOID, VOID, appendClientServerObjects$lambda_0);
|
|
761
|
+
var clientObject = raw(trimMargin('\n |object Client extends Wirespec.Client[' + reqType + ', Response[?]] {\n | override val pathTemplate: String = "' + pathTemplate + '"\n | override val method: String = "' + endpoint.jp_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 '));
|
|
762
|
+
var serverObject = raw(trimMargin('\n |object Server extends Wirespec.Server[' + reqType + ', Response[?]] {\n | override val pathTemplate: String = "' + pathTemplate + '"\n | override val method: String = "' + endpoint.jp_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 '));
|
|
763
|
+
return _this__u8e3s4.h1n(VOID, plus_0(plus_0(_this__u8e3s4.e1n_1, clientObject), serverObject));
|
|
764
764
|
}
|
|
765
765
|
function injectHandleFunction(_this__u8e3s4) {
|
|
766
766
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
@@ -768,19 +768,19 @@ function injectHandleFunction(_this__u8e3s4) {
|
|
|
768
768
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
769
769
|
var tmp = scope;
|
|
770
770
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
771
|
-
var this_0 = scope.
|
|
771
|
+
var this_0 = scope.c1u_1;
|
|
772
772
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
773
773
|
// Inline function 'kotlin.apply' call
|
|
774
774
|
var this_1 = new TransformerBuilder();
|
|
775
|
-
this_1.
|
|
776
|
-
var tmp$ret$2 = this_1.
|
|
777
|
-
tmp.
|
|
778
|
-
var tmp_0 = scope.
|
|
775
|
+
this_1.h1h(injectHandleFunction$lambda);
|
|
776
|
+
var tmp$ret$2 = this_1.i1h();
|
|
777
|
+
tmp.c1u_1 = transform(this_0, tmp$ret$2);
|
|
778
|
+
var tmp_0 = scope.c1u_1;
|
|
779
779
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
780
780
|
}
|
|
781
781
|
function isRequestObject(namespace) {
|
|
782
782
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
783
|
-
var tmp0 = namespace.
|
|
783
|
+
var tmp0 = namespace.e1n_1;
|
|
784
784
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
785
785
|
var destination = ArrayList_init_$Create$_0();
|
|
786
786
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -796,7 +796,7 @@ function isRequestObject(namespace) {
|
|
|
796
796
|
var _iterator__ex2g4s_0 = destination.t();
|
|
797
797
|
while (_iterator__ex2g4s_0.u()) {
|
|
798
798
|
var element_0 = _iterator__ex2g4s_0.v();
|
|
799
|
-
if (element_0.
|
|
799
|
+
if (element_0.i1n_1.m1h() === 'Request') {
|
|
800
800
|
tmp$ret$3 = element_0;
|
|
801
801
|
break $l$block;
|
|
802
802
|
}
|
|
@@ -811,7 +811,7 @@ function isRequestObject(namespace) {
|
|
|
811
811
|
tmp = tmp0_elvis_lhs;
|
|
812
812
|
}
|
|
813
813
|
var requestStruct = tmp;
|
|
814
|
-
return requestStruct.
|
|
814
|
+
return requestStruct.k1n_1.a1() === 1 && single(requestStruct.k1n_1).q1q_1.r() || (requestStruct.j1n_1.r() && requestStruct.k1n_1.r());
|
|
815
815
|
}
|
|
816
816
|
function buildModelImports(_this__u8e3s4, packageName) {
|
|
817
817
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
@@ -821,7 +821,7 @@ function buildModelImports(_this__u8e3s4, packageName) {
|
|
|
821
821
|
var _iterator__ex2g4s = this_0.t();
|
|
822
822
|
while (_iterator__ex2g4s.u()) {
|
|
823
823
|
var e = _iterator__ex2g4s.v();
|
|
824
|
-
var key = e.
|
|
824
|
+
var key = e.pu_1;
|
|
825
825
|
if (set.x(key)) {
|
|
826
826
|
list.x(e);
|
|
827
827
|
}
|
|
@@ -832,7 +832,7 @@ function buildModelImports(_this__u8e3s4, packageName) {
|
|
|
832
832
|
var _iterator__ex2g4s_0 = list.t();
|
|
833
833
|
while (_iterator__ex2g4s_0.u()) {
|
|
834
834
|
var item = _iterator__ex2g4s_0.v();
|
|
835
|
-
var tmp$ret$2 = import_0(packageName.
|
|
835
|
+
var tmp$ret$2 = import_0(packageName.rr_1 + '.model', Companion_getInstance().k1h(item.pu_1).m1h());
|
|
836
836
|
destination.x(tmp$ret$2);
|
|
837
837
|
}
|
|
838
838
|
return destination;
|
|
@@ -843,29 +843,29 @@ function addIdentityTypeToCall(_this__u8e3s4) {
|
|
|
843
843
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
844
844
|
var tmp = scope;
|
|
845
845
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
846
|
-
var this_0 = scope.
|
|
846
|
+
var this_0 = scope.c1u_1;
|
|
847
847
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
848
848
|
// Inline function 'kotlin.apply' call
|
|
849
849
|
var this_1 = new TransformerBuilder();
|
|
850
|
-
this_1.
|
|
851
|
-
var tmp$ret$2 = this_1.
|
|
852
|
-
tmp.
|
|
853
|
-
var tmp_0 = scope.
|
|
850
|
+
this_1.h1h(addIdentityTypeToCall$lambda);
|
|
851
|
+
var tmp$ret$2 = this_1.i1h();
|
|
852
|
+
tmp.c1u_1 = transform(this_0, tmp$ret$2);
|
|
853
|
+
var tmp_0 = scope.c1u_1;
|
|
854
854
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
855
855
|
}
|
|
856
856
|
function toScalaTypeName(_this__u8e3s4) {
|
|
857
857
|
var tmp;
|
|
858
858
|
if (_this__u8e3s4 instanceof Primitive) {
|
|
859
|
-
var t = _this__u8e3s4.
|
|
859
|
+
var t = _this__u8e3s4.tu_1;
|
|
860
860
|
var tmp_0;
|
|
861
861
|
if (t instanceof String_0) {
|
|
862
862
|
tmp_0 = 'String';
|
|
863
863
|
} else {
|
|
864
864
|
if (t instanceof Integer) {
|
|
865
|
-
tmp_0 = t.
|
|
865
|
+
tmp_0 = t.xt_1.equals(Precision_P32_getInstance()) ? 'Int' : 'Long';
|
|
866
866
|
} else {
|
|
867
867
|
if (t instanceof Number_0) {
|
|
868
|
-
tmp_0 = t.
|
|
868
|
+
tmp_0 = t.au_1.equals(Precision_P32_getInstance()) ? 'Float' : 'Double';
|
|
869
869
|
} else {
|
|
870
870
|
if (equals(t, Boolean_instance)) {
|
|
871
871
|
tmp_0 = 'Boolean';
|
|
@@ -882,13 +882,13 @@ function toScalaTypeName(_this__u8e3s4) {
|
|
|
882
882
|
tmp = tmp_0;
|
|
883
883
|
} else {
|
|
884
884
|
if (_this__u8e3s4 instanceof Custom) {
|
|
885
|
-
tmp = _this__u8e3s4.
|
|
885
|
+
tmp = _this__u8e3s4.pu_1;
|
|
886
886
|
} else {
|
|
887
887
|
if (_this__u8e3s4 instanceof Iterable) {
|
|
888
|
-
tmp = 'List[' + toScalaTypeName(_this__u8e3s4.
|
|
888
|
+
tmp = 'List[' + toScalaTypeName(_this__u8e3s4.do_1) + ']';
|
|
889
889
|
} else {
|
|
890
890
|
if (_this__u8e3s4 instanceof Dict) {
|
|
891
|
-
tmp = 'Map[String, ' + toScalaTypeName(_this__u8e3s4.
|
|
891
|
+
tmp = 'Map[String, ' + toScalaTypeName(_this__u8e3s4.go_1) + ']';
|
|
892
892
|
} else {
|
|
893
893
|
if (_this__u8e3s4 instanceof Any) {
|
|
894
894
|
tmp = 'Any';
|
|
@@ -904,32 +904,32 @@ function toScalaTypeName(_this__u8e3s4) {
|
|
|
904
904
|
}
|
|
905
905
|
}
|
|
906
906
|
var base = tmp;
|
|
907
|
-
return _this__u8e3s4.
|
|
907
|
+
return _this__u8e3s4.hu() ? 'Option[' + base + ']' : base;
|
|
908
908
|
}
|
|
909
909
|
function convertToStringCallsToFieldAccess$lambda(expr, tr) {
|
|
910
910
|
var tmp;
|
|
911
911
|
var tmp_0;
|
|
912
912
|
var tmp_1;
|
|
913
913
|
if (expr instanceof FunctionCall) {
|
|
914
|
-
tmp_1 = expr.
|
|
914
|
+
tmp_1 = expr.g1m_1.x1l() === 'toString';
|
|
915
915
|
} else {
|
|
916
916
|
tmp_1 = false;
|
|
917
917
|
}
|
|
918
918
|
if (tmp_1) {
|
|
919
|
-
tmp_0 = !(expr.
|
|
919
|
+
tmp_0 = !(expr.e1m_1 == null);
|
|
920
920
|
} else {
|
|
921
921
|
tmp_0 = false;
|
|
922
922
|
}
|
|
923
923
|
if (tmp_0) {
|
|
924
|
-
var tmp0_safe_receiver = expr.
|
|
924
|
+
var tmp0_safe_receiver = expr.e1m_1;
|
|
925
925
|
var tmp_2;
|
|
926
926
|
if (tmp0_safe_receiver == null) {
|
|
927
927
|
tmp_2 = null;
|
|
928
928
|
} else {
|
|
929
929
|
// Inline function 'kotlin.let' call
|
|
930
|
-
tmp_2 = tr.
|
|
930
|
+
tmp_2 = tr.x1t(tmp0_safe_receiver);
|
|
931
931
|
}
|
|
932
|
-
tmp = new FieldCall(tmp_2, Companion_getInstance().
|
|
932
|
+
tmp = new FieldCall(tmp_2, Companion_getInstance().k1h('toString'));
|
|
933
933
|
} else {
|
|
934
934
|
tmp = transformChildren_1(expr, tr);
|
|
935
935
|
}
|
|
@@ -938,10 +938,10 @@ function convertToStringCallsToFieldAccess$lambda(expr, tr) {
|
|
|
938
938
|
function appendClientServerObjects$lambda(it) {
|
|
939
939
|
var tmp;
|
|
940
940
|
if (it instanceof Literal) {
|
|
941
|
-
tmp = it.
|
|
941
|
+
tmp = it.lq_1;
|
|
942
942
|
} else {
|
|
943
943
|
if (it instanceof Param) {
|
|
944
|
-
tmp = '{' + it.
|
|
944
|
+
tmp = '{' + it.pp_1.l1() + '}';
|
|
945
945
|
} else {
|
|
946
946
|
noWhenBranchMatchedException();
|
|
947
947
|
}
|
|
@@ -951,10 +951,10 @@ function appendClientServerObjects$lambda(it) {
|
|
|
951
951
|
function appendClientServerObjects$lambda_0(segment) {
|
|
952
952
|
var tmp;
|
|
953
953
|
if (segment instanceof Literal) {
|
|
954
|
-
tmp = 'Wirespec.Literal("' + segment.
|
|
954
|
+
tmp = 'Wirespec.Literal("' + segment.lq_1 + '")';
|
|
955
955
|
} else {
|
|
956
956
|
if (segment instanceof Param) {
|
|
957
|
-
tmp = 'Wirespec.Param("' + segment.
|
|
957
|
+
tmp = 'Wirespec.Param("' + segment.pp_1.l1() + '", scala.reflect.classTag[' + toScalaTypeName(segment.qp_1) + '])';
|
|
958
958
|
} else {
|
|
959
959
|
noWhenBranchMatchedException();
|
|
960
960
|
}
|
|
@@ -966,13 +966,13 @@ function injectHandleFunction$lambda(element, transformer) {
|
|
|
966
966
|
if (element instanceof Interface) {
|
|
967
967
|
var tmp$ret$0;
|
|
968
968
|
$l$block: {
|
|
969
|
-
if (!element.
|
|
969
|
+
if (!element.p1n_1.equals(Companion_getInstance().k1h('Handler')) && !element.p1n_1.equals(Companion_getInstance().k1h('Call'))) {
|
|
970
970
|
tmp$ret$0 = element;
|
|
971
971
|
break $l$block;
|
|
972
972
|
}
|
|
973
973
|
var tmp0_typeParameters = listOf(new TypeParameter(Custom_init_$Create$('F[_]')));
|
|
974
974
|
// Inline function 'kotlin.collections.map' call
|
|
975
|
-
var this_0 = element.
|
|
975
|
+
var this_0 = element.q1n_1;
|
|
976
976
|
// Inline function 'kotlin.collections.mapTo' call
|
|
977
977
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
978
978
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -983,7 +983,7 @@ function injectHandleFunction$lambda(element, transformer) {
|
|
|
983
983
|
if (tmp0_safe_receiver == null) {
|
|
984
984
|
tmp_0 = null;
|
|
985
985
|
} else {
|
|
986
|
-
var tmp1_safe_receiver = item.
|
|
986
|
+
var tmp1_safe_receiver = item.b1k_1;
|
|
987
987
|
var tmp_1;
|
|
988
988
|
if (tmp1_safe_receiver == null) {
|
|
989
989
|
tmp_1 = null;
|
|
@@ -992,13 +992,13 @@ function injectHandleFunction$lambda(element, transformer) {
|
|
|
992
992
|
tmp_1 = Custom_init_$Create$('F', listOf(tmp1_safe_receiver));
|
|
993
993
|
}
|
|
994
994
|
var tmp3_returnType = tmp_1;
|
|
995
|
-
tmp_0 = tmp0_safe_receiver.
|
|
995
|
+
tmp_0 = tmp0_safe_receiver.g1k(VOID, VOID, VOID, tmp3_returnType, VOID, false);
|
|
996
996
|
}
|
|
997
997
|
var tmp4_elvis_lhs = tmp_0;
|
|
998
998
|
var tmp$ret$3 = tmp4_elvis_lhs == null ? item : tmp4_elvis_lhs;
|
|
999
999
|
destination.x(tmp$ret$3);
|
|
1000
1000
|
}
|
|
1001
|
-
tmp$ret$0 = element.
|
|
1001
|
+
tmp$ret$0 = element.w1n(VOID, destination, VOID, VOID, tmp0_typeParameters);
|
|
1002
1002
|
}
|
|
1003
1003
|
tmp = tmp$ret$0;
|
|
1004
1004
|
} else {
|
|
@@ -1011,7 +1011,7 @@ function addIdentityTypeToCall$lambda(element, transformer) {
|
|
|
1011
1011
|
var tmp;
|
|
1012
1012
|
if (element instanceof Struct) {
|
|
1013
1013
|
// Inline function 'kotlin.collections.map' call
|
|
1014
|
-
var this_0 = element.
|
|
1014
|
+
var this_0 = element.l1n_1;
|
|
1015
1015
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1016
1016
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1017
1017
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -1024,7 +1024,7 @@ function addIdentityTypeToCall$lambda(element, transformer) {
|
|
|
1024
1024
|
} else {
|
|
1025
1025
|
// Inline function 'kotlin.takeIf' call
|
|
1026
1026
|
var tmp_1;
|
|
1027
|
-
if (endsWith(tmp0_safe_receiver.
|
|
1027
|
+
if (endsWith(tmp0_safe_receiver.v1h_1.m1h(), '.Call')) {
|
|
1028
1028
|
tmp_1 = tmp0_safe_receiver;
|
|
1029
1029
|
} else {
|
|
1030
1030
|
tmp_1 = null;
|
|
@@ -1032,11 +1032,11 @@ function addIdentityTypeToCall$lambda(element, transformer) {
|
|
|
1032
1032
|
tmp_0 = tmp_1;
|
|
1033
1033
|
}
|
|
1034
1034
|
var tmp1_safe_receiver = tmp_0;
|
|
1035
|
-
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
1035
|
+
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.s1m(VOID, listOf(Custom_init_$Create$('[A] =>> A')));
|
|
1036
1036
|
var tmp$ret$2 = tmp2_elvis_lhs == null ? item : tmp2_elvis_lhs;
|
|
1037
1037
|
destination.x(tmp$ret$2);
|
|
1038
1038
|
}
|
|
1039
|
-
tmp = element.
|
|
1039
|
+
tmp = element.o1n(VOID, VOID, VOID, destination);
|
|
1040
1040
|
} else {
|
|
1041
1041
|
tmp = element;
|
|
1042
1042
|
}
|
|
@@ -1044,8 +1044,8 @@ function addIdentityTypeToCall$lambda(element, transformer) {
|
|
|
1044
1044
|
return transformChildren_0(transformed, transformer);
|
|
1045
1045
|
}
|
|
1046
1046
|
//region block: post-declaration
|
|
1047
|
-
protoOf(ScalaIrEmitter).
|
|
1048
|
-
protoOf(ScalaIrEmitter).
|
|
1047
|
+
protoOf(ScalaIrEmitter).sn = emit_0;
|
|
1048
|
+
protoOf(ScalaIrEmitter).r1u = emit_1;
|
|
1049
1049
|
//endregion
|
|
1050
1050
|
//region block: exports
|
|
1051
1051
|
export {
|