@flock/wirespec 0.22.0 → 0.22.2
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 +166 -154
- package/arrow-arrow-core.mjs.map +1 -1
- package/clikt-clikt-mordant.mjs +80 -80
- package/clikt-clikt.mjs +1559 -1559
- package/colormath-root-colormath.mjs +441 -441
- package/kotlin-kotlin-stdlib.mjs +2239 -1951
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +10246 -10246
- package/kotlin-rgxgen.mjs +1808 -1808
- package/kotlinx-io-kotlinx-io-core.mjs +419 -419
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +1868 -1868
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1607 -1586
- package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/mordant-mordant.mjs +1335 -1321
- package/mordant-mordant.mjs.map +1 -1
- package/package.json +1 -1
- package/wirespec-src-compiler-core.mjs +6432 -6170
- package/wirespec-src-compiler-core.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-java.mjs +181 -181
- package/wirespec-src-compiler-emitters-kotlin.mjs +143 -143
- package/wirespec-src-compiler-emitters-python.mjs +179 -179
- package/wirespec-src-compiler-emitters-rust.mjs +423 -423
- package/wirespec-src-compiler-emitters-scala.mjs +176 -176
- package/wirespec-src-compiler-emitters-scala.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-typescript.mjs +254 -255
- package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-wirespec.mjs +361 -163
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +937 -405
- package/wirespec-src-compiler-lib.mjs.map +1 -1
- package/wirespec-src-converter-asyncapi.mjs +5382 -0
- package/wirespec-src-converter-asyncapi.mjs.map +1 -0
- package/wirespec-src-converter-avro.mjs +1075 -508
- package/wirespec-src-converter-avro.mjs.map +1 -1
- package/wirespec-src-converter-common.mjs +20 -20
- package/wirespec-src-converter-common.mjs.map +1 -1
- package/wirespec-src-converter-graphql.mjs +6895 -0
- package/wirespec-src-converter-graphql.mjs.map +1 -0
- package/wirespec-src-converter-openapi.mjs +786 -777
- package/wirespec-src-converter-openapi.mjs.map +1 -1
- package/wirespec-src-ide-lsp.mjs +1395 -1395
- package/wirespec-src-plugin-arguments.mjs +204 -184
- package/wirespec-src-plugin-arguments.mjs.map +1 -1
- package/wirespec-src-plugin-cli.mjs +111 -108
- package/wirespec-src-plugin-cli.mjs.map +1 -1
- package/wirespec-src-plugin-npm.d.mts +219 -27
- package/wirespec-src-plugin-npm.mjs +144 -49
- package/wirespec-src-plugin-npm.mjs.map +1 -1
- package/wirespec-src-tools-generator.mjs +35 -35
|
@@ -146,15 +146,15 @@ initMetadataForCompanion(Companion);
|
|
|
146
146
|
initMetadataForClass(ScalaEmitter, 'ScalaEmitter', ScalaEmitter, VOID, [IrEmitter]);
|
|
147
147
|
//endregion
|
|
148
148
|
function _get_sanitizationConfig__sns434($this) {
|
|
149
|
-
var tmp0 = $this.
|
|
149
|
+
var tmp0 = $this.t21_1;
|
|
150
150
|
var tmp = KProperty1;
|
|
151
151
|
// Inline function 'kotlin.getValue' call
|
|
152
152
|
getPropertyCallableRef('sanitizationConfig', 1, tmp, ScalaEmitter$_get_sanitizationConfig_$ref_u7mbyd(), null);
|
|
153
|
-
return tmp0.
|
|
153
|
+
return tmp0.o1();
|
|
154
154
|
}
|
|
155
155
|
function sanitize($this, $receiver) {
|
|
156
156
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
157
|
-
var this_0 = split($receiver.
|
|
157
|
+
var this_0 = split($receiver.o1(), ['.', ' ']);
|
|
158
158
|
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
159
159
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
160
160
|
var index = 0;
|
|
@@ -163,7 +163,7 @@ function sanitize($this, $receiver) {
|
|
|
163
163
|
var item = _iterator__ex2g4s.v();
|
|
164
164
|
var _unary__edvuaz = index;
|
|
165
165
|
index = _unary__edvuaz + 1 | 0;
|
|
166
|
-
var tmp$ret$2 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.
|
|
166
|
+
var tmp$ret$2 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.yr(item) : item;
|
|
167
167
|
destination.x(tmp$ret$2);
|
|
168
168
|
}
|
|
169
169
|
// Inline function 'kotlin.text.filter' call
|
|
@@ -211,7 +211,7 @@ function sanitizeFirstIsDigit($this, $receiver) {
|
|
|
211
211
|
return tmp;
|
|
212
212
|
}
|
|
213
213
|
function sanitizeKeywords($this, $receiver) {
|
|
214
|
-
return Companion_getInstance_0().
|
|
214
|
+
return Companion_getInstance_0().v1z().i1($receiver) ? addBackticks($receiver) : $receiver;
|
|
215
215
|
}
|
|
216
216
|
function sanitizeSymbol($this, $receiver) {
|
|
217
217
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
@@ -224,7 +224,7 @@ function sanitizeSymbol($this, $receiver) {
|
|
|
224
224
|
var item = _iterator__ex2g4s.v();
|
|
225
225
|
var _unary__edvuaz = index;
|
|
226
226
|
index = _unary__edvuaz + 1 | 0;
|
|
227
|
-
var tmp$ret$2 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.
|
|
227
|
+
var tmp$ret$2 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.yr(item) : item;
|
|
228
228
|
destination.x(tmp$ret$2);
|
|
229
229
|
}
|
|
230
230
|
// Inline function 'kotlin.text.filter' call
|
|
@@ -251,10 +251,10 @@ function sanitizeEnum($this, $receiver) {
|
|
|
251
251
|
}
|
|
252
252
|
function Companion() {
|
|
253
253
|
Companion_instance_2 = this;
|
|
254
|
-
this.
|
|
254
|
+
this.u21_1 = ScalaGenerator_getInstance();
|
|
255
255
|
}
|
|
256
|
-
protoOf(Companion).
|
|
257
|
-
return this.
|
|
256
|
+
protoOf(Companion).v1z = function () {
|
|
257
|
+
return this.u21_1.q1a_1;
|
|
258
258
|
};
|
|
259
259
|
var Companion_instance_2;
|
|
260
260
|
function Companion_getInstance_0() {
|
|
@@ -267,13 +267,13 @@ function ScalaEmitter$sanitizationConfig$delegate$lambda$lambda(it) {
|
|
|
267
267
|
}
|
|
268
268
|
function ScalaEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0) {
|
|
269
269
|
return function (name) {
|
|
270
|
-
var sanitized = name.
|
|
270
|
+
var sanitized = name.ut_1.b1() > 1 ? name.yt() : sanitizeSymbol(this$0, name.xt());
|
|
271
271
|
return new Name(listOf(sanitized));
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
274
|
function ScalaEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0) {
|
|
275
275
|
return function (name) {
|
|
276
|
-
return new Name(listOf(sanitizeSymbol(this$0, name.
|
|
276
|
+
return new Name(listOf(sanitizeSymbol(this$0, name.yt())));
|
|
277
277
|
};
|
|
278
278
|
}
|
|
279
279
|
function ScalaEmitter$sanitizationConfig$delegate$lambda$lambda_2(this$0) {
|
|
@@ -286,28 +286,28 @@ function ScalaEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
286
286
|
var tmp;
|
|
287
287
|
var tmp_0;
|
|
288
288
|
if (stmt instanceof FunctionCall) {
|
|
289
|
-
tmp_0 = stmt.
|
|
289
|
+
tmp_0 = stmt.eu_1.xt() === 'validate';
|
|
290
290
|
} else {
|
|
291
291
|
tmp_0 = false;
|
|
292
292
|
}
|
|
293
293
|
if (tmp_0) {
|
|
294
|
-
tmp = transformChildren(stmt.
|
|
294
|
+
tmp = transformChildren(stmt.iu(VOID, emptyList()), tr);
|
|
295
295
|
} else {
|
|
296
296
|
if (stmt instanceof ConstructorStatement) {
|
|
297
|
-
var tmp_1 = tr.
|
|
297
|
+
var tmp_1 = tr.m17(stmt.dv_1);
|
|
298
298
|
// Inline function 'kotlin.collections.map' call
|
|
299
|
-
var this_0 = stmt.
|
|
299
|
+
var this_0 = stmt.ev_1;
|
|
300
300
|
// Inline function 'kotlin.collections.mapTo' call
|
|
301
301
|
var destination = ArrayList_init_$Create$(this_0.b1());
|
|
302
302
|
// Inline function 'kotlin.collections.iterator' call
|
|
303
|
-
var _iterator__ex2g4s = this_0.
|
|
303
|
+
var _iterator__ex2g4s = this_0.m1().t();
|
|
304
304
|
while (_iterator__ex2g4s.u()) {
|
|
305
305
|
var item = _iterator__ex2g4s.v();
|
|
306
306
|
// Inline function 'kotlin.collections.component1' call
|
|
307
|
-
var name = item.
|
|
307
|
+
var name = item.n1();
|
|
308
308
|
// Inline function 'kotlin.collections.component2' call
|
|
309
|
-
var expr = item.
|
|
310
|
-
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), name), tr.
|
|
309
|
+
var expr = item.o1();
|
|
310
|
+
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), name), tr.p17(expr));
|
|
311
311
|
destination.x(tmp$ret$3);
|
|
312
312
|
}
|
|
313
313
|
tmp = new ConstructorStatement(tmp_1, toMap(destination));
|
|
@@ -320,7 +320,7 @@ function ScalaEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
320
320
|
}
|
|
321
321
|
function ScalaEmitter$sanitizationConfig$delegate$lambda(this$0) {
|
|
322
322
|
return function () {
|
|
323
|
-
var tmp = Companion_getInstance_0().
|
|
323
|
+
var tmp = Companion_getInstance_0().v1z();
|
|
324
324
|
var tmp_0 = ScalaEmitter$sanitizationConfig$delegate$lambda$lambda;
|
|
325
325
|
var tmp_1 = ScalaEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0);
|
|
326
326
|
var tmp_2 = ScalaEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0);
|
|
@@ -334,21 +334,21 @@ function ScalaEmitter$_get_sanitizationConfig_$ref_u7mbyd() {
|
|
|
334
334
|
};
|
|
335
335
|
}
|
|
336
336
|
function ScalaEmitter$emitShared$lambda($this$struct) {
|
|
337
|
-
$this$struct.
|
|
338
|
-
$this$struct.
|
|
337
|
+
$this$struct.r14(Custom_init_$Create$('PathSegment'));
|
|
338
|
+
$this$struct.t14('value', String_instance);
|
|
339
339
|
return Unit_instance;
|
|
340
340
|
}
|
|
341
341
|
function ScalaEmitter$emitShared$lambda_0($this$struct) {
|
|
342
|
-
$this$struct.
|
|
343
|
-
$this$struct.
|
|
344
|
-
$this$struct.
|
|
342
|
+
$this$struct.r14(Custom_init_$Create$('PathSegment'));
|
|
343
|
+
$this$struct.t14('name', String_instance);
|
|
344
|
+
$this$struct.t14('type', Reflect_instance);
|
|
345
345
|
return Unit_instance;
|
|
346
346
|
}
|
|
347
347
|
function ScalaEmitter$emitShared$lambda_1(element, transformer) {
|
|
348
348
|
var tmp;
|
|
349
349
|
if (element instanceof File) {
|
|
350
350
|
// Inline function 'kotlin.collections.partition' call
|
|
351
|
-
var this_0 = element.
|
|
351
|
+
var this_0 = element.iv_1;
|
|
352
352
|
var first = ArrayList_init_$Create$_0();
|
|
353
353
|
var second = ArrayList_init_$Create$_0();
|
|
354
354
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -361,9 +361,9 @@ function ScalaEmitter$emitShared$lambda_1(element, transformer) {
|
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
var _destruct__k2r9zo = new Pair(first, second);
|
|
364
|
-
var packageElements = _destruct__k2r9zo.
|
|
365
|
-
var rest = _destruct__k2r9zo.
|
|
366
|
-
tmp = element.
|
|
364
|
+
var packageElements = _destruct__k2r9zo.ze();
|
|
365
|
+
var rest = _destruct__k2r9zo.af();
|
|
366
|
+
tmp = element.lv(VOID, plus(packageElements, rest));
|
|
367
367
|
} else {
|
|
368
368
|
tmp = element;
|
|
369
369
|
}
|
|
@@ -375,12 +375,12 @@ function ScalaEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
375
375
|
if (element instanceof Namespace) {
|
|
376
376
|
var tmp$ret$0;
|
|
377
377
|
$l$block: {
|
|
378
|
-
if (!element.
|
|
378
|
+
if (!element.nv_1.equals(Companion_getInstance().wt('Wirespec'))) {
|
|
379
379
|
tmp$ret$0 = element;
|
|
380
380
|
break $l$block;
|
|
381
381
|
}
|
|
382
382
|
// Inline function 'kotlin.collections.flatMap' call
|
|
383
|
-
var tmp0 = element.
|
|
383
|
+
var tmp0 = element.ov_1;
|
|
384
384
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
385
385
|
var destination = ArrayList_init_$Create$_0();
|
|
386
386
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -392,14 +392,14 @@ function ScalaEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
392
392
|
if (!(element_0 instanceof Interface)) {
|
|
393
393
|
tmp_0 = true;
|
|
394
394
|
} else {
|
|
395
|
-
tmp_0 = !setOf(['Request', 'Response']).
|
|
395
|
+
tmp_0 = !setOf(['Request', 'Response']).i1(element_0.tv_1.zt());
|
|
396
396
|
}
|
|
397
397
|
if (tmp_0) {
|
|
398
398
|
tmp$ret$3 = listOf(element_0);
|
|
399
399
|
break $l$block_2;
|
|
400
400
|
}
|
|
401
401
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
402
|
-
var tmp0_0 = element_0.
|
|
402
|
+
var tmp0_0 = element_0.uv_1;
|
|
403
403
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
404
404
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
405
405
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
@@ -415,7 +415,7 @@ function ScalaEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
415
415
|
var _iterator__ex2g4s_1 = destination_0.t();
|
|
416
416
|
while (_iterator__ex2g4s_1.u()) {
|
|
417
417
|
var element_2 = _iterator__ex2g4s_1.v();
|
|
418
|
-
if (element_2.
|
|
418
|
+
if (element_2.tv_1.zt() === 'Headers') {
|
|
419
419
|
tmp$ret$6 = element_2;
|
|
420
420
|
break $l$block_1;
|
|
421
421
|
}
|
|
@@ -431,9 +431,9 @@ function ScalaEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
431
431
|
tmp_1 = tmp0_elvis_lhs;
|
|
432
432
|
}
|
|
433
433
|
var nestedHeaders = tmp_1;
|
|
434
|
-
var tmp_2 = new Namespace(element_0.
|
|
434
|
+
var tmp_2 = new Namespace(element_0.tv_1, listOf(nestedHeaders));
|
|
435
435
|
// Inline function 'kotlin.collections.filter' call
|
|
436
|
-
var tmp0_1 = element_0.
|
|
436
|
+
var tmp0_1 = element_0.uv_1;
|
|
437
437
|
// Inline function 'kotlin.collections.filterTo' call
|
|
438
438
|
var destination_1 = ArrayList_init_$Create$_0();
|
|
439
439
|
var _iterator__ex2g4s_2 = tmp0_1.t();
|
|
@@ -441,7 +441,7 @@ function ScalaEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
441
441
|
var element_3 = _iterator__ex2g4s_2.v();
|
|
442
442
|
var tmp_3;
|
|
443
443
|
if (element_3 instanceof Interface) {
|
|
444
|
-
tmp_3 = element_3.
|
|
444
|
+
tmp_3 = element_3.tv_1.zt() === 'Headers';
|
|
445
445
|
} else {
|
|
446
446
|
tmp_3 = false;
|
|
447
447
|
}
|
|
@@ -451,28 +451,28 @@ function ScalaEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
451
451
|
}
|
|
452
452
|
var tmp_4 = destination_1;
|
|
453
453
|
// Inline function 'kotlin.collections.map' call
|
|
454
|
-
var this_0 = element_0.
|
|
454
|
+
var this_0 = element_0.yv_1;
|
|
455
455
|
// Inline function 'kotlin.collections.mapTo' call
|
|
456
456
|
var destination_2 = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
457
457
|
var _iterator__ex2g4s_3 = this_0.t();
|
|
458
458
|
while (_iterator__ex2g4s_3.u()) {
|
|
459
459
|
var item = _iterator__ex2g4s_3.v();
|
|
460
460
|
var tmp_5;
|
|
461
|
-
if (item.
|
|
462
|
-
tmp_5 = item.
|
|
461
|
+
if (item.cw_1.xt() === 'headers') {
|
|
462
|
+
tmp_5 = item.mw(VOID, Custom_init_$Create$(element_0.tv_1.zt() + '.Headers'));
|
|
463
463
|
} else {
|
|
464
464
|
tmp_5 = item;
|
|
465
465
|
}
|
|
466
466
|
var tmp$ret$13 = tmp_5;
|
|
467
467
|
destination_2.x(tmp$ret$13);
|
|
468
468
|
}
|
|
469
|
-
tmp$ret$3 = listOf_0([tmp_2, element_0.
|
|
469
|
+
tmp$ret$3 = listOf_0([tmp_2, element_0.bw(VOID, tmp_4, VOID, VOID, VOID, destination_2)]);
|
|
470
470
|
}
|
|
471
471
|
var list = tmp$ret$3;
|
|
472
472
|
addAll(destination, list);
|
|
473
473
|
}
|
|
474
474
|
var newElements = destination;
|
|
475
|
-
tmp$ret$0 = element.
|
|
475
|
+
tmp$ret$0 = element.sv(VOID, newElements);
|
|
476
476
|
}
|
|
477
477
|
tmp = tmp$ret$0;
|
|
478
478
|
} else {
|
|
@@ -485,27 +485,27 @@ function ScalaEmitter$emitShared$lambda_3($clientServer) {
|
|
|
485
485
|
return function (element, transformer) {
|
|
486
486
|
var tmp;
|
|
487
487
|
if (element instanceof Namespace) {
|
|
488
|
-
var injected = element.
|
|
488
|
+
var injected = element.nv_1.equals(Companion_getInstance().wt('Wirespec')) ? $clientServer : emptyList();
|
|
489
489
|
var tmp_0;
|
|
490
490
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
491
491
|
if (!injected.r()) {
|
|
492
492
|
// Inline function 'community.flock.wirespec.compiler.core.ir.withElements' call
|
|
493
|
-
var elements = plus(element.
|
|
493
|
+
var elements = plus(element.jv(), injected);
|
|
494
494
|
var tmp_1;
|
|
495
495
|
if (element instanceof File) {
|
|
496
|
-
tmp_1 = element.
|
|
496
|
+
tmp_1 = element.lv(VOID, elements);
|
|
497
497
|
} else {
|
|
498
498
|
if (element instanceof Struct) {
|
|
499
|
-
tmp_1 = element.
|
|
499
|
+
tmp_1 = element.sx(VOID, VOID, VOID, VOID, elements);
|
|
500
500
|
} else {
|
|
501
501
|
if (element instanceof Namespace) {
|
|
502
|
-
tmp_1 = element.
|
|
502
|
+
tmp_1 = element.sv(VOID, elements);
|
|
503
503
|
} else {
|
|
504
504
|
if (element instanceof Interface) {
|
|
505
|
-
tmp_1 = element.
|
|
505
|
+
tmp_1 = element.bw(VOID, elements);
|
|
506
506
|
} else {
|
|
507
507
|
if (element instanceof Enum) {
|
|
508
|
-
tmp_1 = element.
|
|
508
|
+
tmp_1 = element.gx(VOID, VOID, VOID, VOID, VOID, elements);
|
|
509
509
|
} else {
|
|
510
510
|
if (element instanceof Main) {
|
|
511
511
|
tmp_1 = element;
|
|
@@ -548,30 +548,30 @@ function ScalaEmitter$emit$lambda(this$0) {
|
|
|
548
548
|
}
|
|
549
549
|
function ScalaEmitter(packageName, emitShared) {
|
|
550
550
|
Companion_getInstance_0();
|
|
551
|
-
packageName = packageName === VOID ? Companion_instance_0.
|
|
552
|
-
emitShared = emitShared === VOID ? Companion_instance_1.
|
|
553
|
-
this.
|
|
554
|
-
this.
|
|
555
|
-
this.
|
|
556
|
-
this.
|
|
557
|
-
this.
|
|
551
|
+
packageName = packageName === VOID ? Companion_instance_0.at('community.flock.wirespec.generated') : packageName;
|
|
552
|
+
emitShared = emitShared === VOID ? Companion_instance_1.fq() : emitShared;
|
|
553
|
+
this.o21_1 = packageName;
|
|
554
|
+
this.p21_1 = emitShared;
|
|
555
|
+
this.q21_1 = ScalaGenerator_getInstance();
|
|
556
|
+
this.r21_1 = FileExtension_Scala_getInstance();
|
|
557
|
+
this.s21_1 = listOf_0([import_0('community.flock.wirespec.scala', 'Wirespec'), import_0('scala.reflect', 'ClassTag')]);
|
|
558
558
|
var tmp = this;
|
|
559
|
-
tmp.
|
|
559
|
+
tmp.t21_1 = lazy(ScalaEmitter$sanitizationConfig$delegate$lambda(this));
|
|
560
560
|
}
|
|
561
|
-
protoOf(ScalaEmitter).
|
|
562
|
-
return this.
|
|
561
|
+
protoOf(ScalaEmitter).c20 = function () {
|
|
562
|
+
return this.o21_1;
|
|
563
563
|
};
|
|
564
|
-
protoOf(ScalaEmitter).
|
|
565
|
-
return this.
|
|
564
|
+
protoOf(ScalaEmitter).h1a = function () {
|
|
565
|
+
return this.q21_1;
|
|
566
566
|
};
|
|
567
|
-
protoOf(ScalaEmitter).
|
|
568
|
-
return this.
|
|
567
|
+
protoOf(ScalaEmitter).wp = function () {
|
|
568
|
+
return this.r21_1;
|
|
569
569
|
};
|
|
570
|
-
protoOf(ScalaEmitter).
|
|
571
|
-
ScalaGenerator_getInstance().
|
|
570
|
+
protoOf(ScalaEmitter).g1a = function (allFiles) {
|
|
571
|
+
ScalaGenerator_getInstance().u1a(allFiles);
|
|
572
572
|
};
|
|
573
|
-
protoOf(ScalaEmitter).
|
|
574
|
-
var packageName = Companion_instance_0.
|
|
573
|
+
protoOf(ScalaEmitter).c1a = function () {
|
|
574
|
+
var packageName = Companion_instance_0.at('community.flock.wirespec.scala');
|
|
575
575
|
var tmp = interface_0('PathSegment', true);
|
|
576
576
|
var tmp_0 = struct('Literal', ScalaEmitter$emitShared$lambda);
|
|
577
577
|
var pathSegmentTypes = listOf_0([tmp, tmp_0, struct('Param', ScalaEmitter$emitShared$lambda_0)]);
|
|
@@ -585,12 +585,12 @@ protoOf(ScalaEmitter).s19 = function () {
|
|
|
585
585
|
var tmp_1;
|
|
586
586
|
var tmp_2;
|
|
587
587
|
if (item instanceof Interface) {
|
|
588
|
-
tmp_2 = setOf(['Client', 'Server']).
|
|
588
|
+
tmp_2 = setOf(['Client', 'Server']).i1(item.tv_1.zt());
|
|
589
589
|
} else {
|
|
590
590
|
tmp_2 = false;
|
|
591
591
|
}
|
|
592
592
|
if (tmp_2) {
|
|
593
|
-
tmp_1 = item.
|
|
593
|
+
tmp_1 = item.bw(VOID, VOID, VOID, VOID, VOID, plus_0(item.yv_1, new Field(Companion_getInstance().wt('pathSegments'), new Array_0(Custom_init_$Create$('PathSegment')))));
|
|
594
594
|
} else {
|
|
595
595
|
tmp_1 = item;
|
|
596
596
|
}
|
|
@@ -604,58 +604,58 @@ protoOf(ScalaEmitter).s19 = function () {
|
|
|
604
604
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
605
605
|
var tmp_3 = scope;
|
|
606
606
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
607
|
-
var this_2 = scope.
|
|
607
|
+
var this_2 = scope.u17_1;
|
|
608
608
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
609
609
|
// Inline function 'kotlin.apply' call
|
|
610
610
|
var this_3 = new TransformerBuilder();
|
|
611
|
-
this_3.
|
|
612
|
-
var tmp$ret$7 = this_3.
|
|
613
|
-
tmp_3.
|
|
611
|
+
this_3.o18(ScalaEmitter$emitShared$lambda_1);
|
|
612
|
+
var tmp$ret$7 = this_3.j18();
|
|
613
|
+
tmp_3.u17_1 = transform(this_2, tmp$ret$7);
|
|
614
614
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
615
615
|
var tmp_4 = scope;
|
|
616
616
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
617
|
-
var this_4 = scope.
|
|
617
|
+
var this_4 = scope.u17_1;
|
|
618
618
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
619
619
|
// Inline function 'kotlin.apply' call
|
|
620
620
|
var this_5 = new TransformerBuilder();
|
|
621
|
-
this_5.
|
|
622
|
-
var tmp$ret$12 = this_5.
|
|
623
|
-
tmp_4.
|
|
621
|
+
this_5.o18(ScalaEmitter$emitShared$lambda_2);
|
|
622
|
+
var tmp$ret$12 = this_5.j18();
|
|
623
|
+
tmp_4.u17_1 = transform(this_4, tmp$ret$12);
|
|
624
624
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.injectAfter' call
|
|
625
625
|
var tmp_5 = scope;
|
|
626
626
|
// Inline function 'community.flock.wirespec.compiler.core.ir.injectAfter' call
|
|
627
627
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
628
|
-
var this_6 = scope.
|
|
628
|
+
var this_6 = scope.u17_1;
|
|
629
629
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
630
630
|
// Inline function 'kotlin.apply' call
|
|
631
631
|
var this_7 = new TransformerBuilder();
|
|
632
|
-
this_7.
|
|
633
|
-
var tmp$ret$18 = this_7.
|
|
634
|
-
tmp_5.
|
|
635
|
-
var tmp_6 = scope.
|
|
632
|
+
this_7.o18(ScalaEmitter$emitShared$lambda_3(clientServer));
|
|
633
|
+
var tmp$ret$18 = this_7.j18();
|
|
634
|
+
tmp_5.u17_1 = transform(this_6, tmp$ret$18);
|
|
635
|
+
var tmp_6 = scope.u17_1;
|
|
636
636
|
var wirespecShared = isInterface(tmp_6, Element) ? tmp_6 : THROW_CCE();
|
|
637
637
|
var tmp_7;
|
|
638
|
-
if (this.
|
|
639
|
-
tmp_7 = wirespecShared.
|
|
638
|
+
if (this.p21_1.gq_1) {
|
|
639
|
+
tmp_7 = wirespecShared.lv(Companion_getInstance().wt(packageName.dt() + 'Wirespec'));
|
|
640
640
|
} else {
|
|
641
641
|
tmp_7 = null;
|
|
642
642
|
}
|
|
643
643
|
return tmp_7;
|
|
644
644
|
};
|
|
645
|
-
protoOf(ScalaEmitter).
|
|
645
|
+
protoOf(ScalaEmitter).cs = function (definition, module_0, logger) {
|
|
646
646
|
var file = emit.call(this, definition, module_0, logger);
|
|
647
647
|
// Inline function 'kotlin.takeIf' call
|
|
648
|
-
var this_0 = this.
|
|
648
|
+
var this_0 = this.s21_1;
|
|
649
649
|
var tmp;
|
|
650
|
-
if (Companion_instance.
|
|
650
|
+
if (Companion_instance.zr(module_0)) {
|
|
651
651
|
tmp = this_0;
|
|
652
652
|
} else {
|
|
653
653
|
tmp = null;
|
|
654
654
|
}
|
|
655
655
|
var tmp$ret$0 = tmp;
|
|
656
|
-
return placeInPackage(prependImports(file, tmp$ret$0), this.
|
|
656
|
+
return placeInPackage(prependImports(file, tmp$ret$0), this.c20(), definition);
|
|
657
657
|
};
|
|
658
|
-
protoOf(ScalaEmitter).
|
|
658
|
+
protoOf(ScalaEmitter).k1a = function (definition, module_0) {
|
|
659
659
|
var tmp;
|
|
660
660
|
if (definition instanceof Type) {
|
|
661
661
|
tmp = convertToGenerator_2(definition, module_0);
|
|
@@ -676,7 +676,7 @@ protoOf(ScalaEmitter).a1a = function (definition, module_0) {
|
|
|
676
676
|
}
|
|
677
677
|
var generatorFile = tmp;
|
|
678
678
|
var sanitized = sanitizeNames(generatorFile, _get_sanitizationConfig__sns434(this));
|
|
679
|
-
var generatorOwnName = definition.
|
|
679
|
+
var generatorOwnName = definition.ds().o1() + 'Generator';
|
|
680
680
|
var tmp_0 = asSequence(collectCustomTypeNames(sanitized));
|
|
681
681
|
var tmp_1 = filterNot(tmp_0, ScalaEmitter$emitGenerator$lambda);
|
|
682
682
|
var tmp_2 = filterNot(tmp_1, ScalaEmitter$emitGenerator$lambda_0(generatorOwnName));
|
|
@@ -697,27 +697,27 @@ protoOf(ScalaEmitter).a1a = function (definition, module_0) {
|
|
|
697
697
|
var _iterator__ex2g4s_0 = destination.t();
|
|
698
698
|
while (_iterator__ex2g4s_0.u()) {
|
|
699
699
|
var item = _iterator__ex2g4s_0.v();
|
|
700
|
-
var tmp$ret$5 = import_0(this.
|
|
700
|
+
var tmp$ret$5 = import_0(this.c20().bt_1 + '.model', item);
|
|
701
701
|
destination_0.x(tmp$ret$5);
|
|
702
702
|
}
|
|
703
703
|
var modelImports = destination_0;
|
|
704
|
-
return placeInPackage_0(prependImports(sanitized, plus(this.
|
|
704
|
+
return placeInPackage_0(prependImports(sanitized, plus(this.s21_1, modelImports)), this.c20(), 'generator');
|
|
705
705
|
};
|
|
706
|
-
protoOf(ScalaEmitter).
|
|
706
|
+
protoOf(ScalaEmitter).us = function (type, module_0) {
|
|
707
707
|
return ensureEmptyStructHasConstructor(sanitizeNames(convertWithValidation(type, module_0), _get_sanitizationConfig__sns434(this)));
|
|
708
708
|
};
|
|
709
|
-
protoOf(ScalaEmitter).
|
|
709
|
+
protoOf(ScalaEmitter).ss = function (enum_0, module_0) {
|
|
710
710
|
var tmp = sanitizeNames(convert_0(enum_0), _get_sanitizationConfig__sns434(this));
|
|
711
711
|
return injectEnumLabelField(tmp, ScalaEmitter$emit$lambda(this));
|
|
712
712
|
};
|
|
713
|
-
protoOf(ScalaEmitter).
|
|
713
|
+
protoOf(ScalaEmitter).is = function (union) {
|
|
714
714
|
return sanitizeNames(convert_1(union), _get_sanitizationConfig__sns434(this));
|
|
715
715
|
};
|
|
716
|
-
protoOf(ScalaEmitter).
|
|
716
|
+
protoOf(ScalaEmitter).ns = function (refined) {
|
|
717
717
|
var file = sanitizeNames(convert_2(refined), _get_sanitizationConfig__sns434(this));
|
|
718
718
|
// Inline function 'community.flock.wirespec.compiler.core.ir.findElement' call
|
|
719
719
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
720
|
-
var tmp0 = file.
|
|
720
|
+
var tmp0 = file.jv();
|
|
721
721
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
722
722
|
var destination = ArrayList_init_$Create$_0();
|
|
723
723
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -729,12 +729,12 @@ protoOf(ScalaEmitter).ds = function (refined) {
|
|
|
729
729
|
}
|
|
730
730
|
var tmp$ret$0 = firstOrNull_0(destination);
|
|
731
731
|
var updatedStruct = convertToStringCallsToFieldAccess(markMembersAsOverride(ensureNotNull(tmp$ret$0)));
|
|
732
|
-
return new File(Companion_getInstance().
|
|
732
|
+
return new File(Companion_getInstance().wt(sanitize(this, refined.ls_1)), listOf(updatedStruct));
|
|
733
733
|
};
|
|
734
|
-
protoOf(ScalaEmitter).
|
|
734
|
+
protoOf(ScalaEmitter).ts = function (endpoint) {
|
|
735
735
|
// Inline function 'community.flock.wirespec.compiler.core.ir.findElement' call
|
|
736
736
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
737
|
-
var tmp0 = convert_3(endpoint).
|
|
737
|
+
var tmp0 = convert_3(endpoint).jv();
|
|
738
738
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
739
739
|
var destination = ArrayList_init_$Create$_0();
|
|
740
740
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -747,9 +747,9 @@ protoOf(ScalaEmitter).js = function (endpoint) {
|
|
|
747
747
|
var tmp$ret$0 = firstOrNull_0(destination);
|
|
748
748
|
var endpointNamespace = ensureNotNull(tmp$ret$0);
|
|
749
749
|
var body = appendClientServerObjects(injectHandleFunction(endpointNamespace), endpoint, isRequestObject(endpointNamespace));
|
|
750
|
-
var tmp = sanitizeNames(new File(Companion_getInstance().
|
|
750
|
+
var tmp = sanitizeNames(new File(Companion_getInstance().wt(sanitize(this, endpoint.fr_1)), listOf(body)), _get_sanitizationConfig__sns434(this));
|
|
751
751
|
// Inline function 'kotlin.takeIf' call
|
|
752
|
-
var this_0 = buildModelImports(endpoint, this.
|
|
752
|
+
var this_0 = buildModelImports(endpoint, this.c20());
|
|
753
753
|
var tmp_0;
|
|
754
754
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
755
755
|
if (!this_0.r()) {
|
|
@@ -760,10 +760,10 @@ protoOf(ScalaEmitter).js = function (endpoint) {
|
|
|
760
760
|
var tmp$ret$3 = tmp_0;
|
|
761
761
|
return prependImports(tmp, tmp$ret$3);
|
|
762
762
|
};
|
|
763
|
-
protoOf(ScalaEmitter).
|
|
763
|
+
protoOf(ScalaEmitter).hs = function (channel) {
|
|
764
764
|
var tmp = sanitizeNames(convert_4(channel), _get_sanitizationConfig__sns434(this));
|
|
765
765
|
// Inline function 'kotlin.takeIf' call
|
|
766
|
-
var this_0 = buildModelImports(channel, this.
|
|
766
|
+
var this_0 = buildModelImports(channel, this.c20());
|
|
767
767
|
var tmp_0;
|
|
768
768
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
769
769
|
if (!this_0.r()) {
|
|
@@ -774,10 +774,10 @@ protoOf(ScalaEmitter).xr = function (channel) {
|
|
|
774
774
|
var tmp$ret$0 = tmp_0;
|
|
775
775
|
return prependImports(tmp, tmp$ret$0);
|
|
776
776
|
};
|
|
777
|
-
protoOf(ScalaEmitter).
|
|
777
|
+
protoOf(ScalaEmitter).gs = function (rpc) {
|
|
778
778
|
var tmp = sanitizeNames(convert_5(rpc), _get_sanitizationConfig__sns434(this));
|
|
779
779
|
// Inline function 'kotlin.takeIf' call
|
|
780
|
-
var this_0 = buildModelImports(rpc, this.
|
|
780
|
+
var this_0 = buildModelImports(rpc, this.c20());
|
|
781
781
|
var tmp_0;
|
|
782
782
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
783
783
|
if (!this_0.r()) {
|
|
@@ -788,25 +788,25 @@ protoOf(ScalaEmitter).wr = function (rpc) {
|
|
|
788
788
|
var tmp$ret$0 = tmp_0;
|
|
789
789
|
return prependImports(tmp, tmp$ret$0);
|
|
790
790
|
};
|
|
791
|
-
protoOf(ScalaEmitter).
|
|
792
|
-
var imports = buildModelImports(endpoint, this.
|
|
793
|
-
var endpointImport = import_0(this.
|
|
791
|
+
protoOf(ScalaEmitter).j1a = function (endpoint) {
|
|
792
|
+
var imports = buildModelImports(endpoint, this.c20());
|
|
793
|
+
var endpointImport = import_0(this.c20().bt_1 + '.endpoint', endpoint.fr_1.o1());
|
|
794
794
|
var file = addIdentityTypeToCall(sanitizeNames(emitEndpointClient.call(this, endpoint), _get_sanitizationConfig__sns434(this)));
|
|
795
|
-
var subPackageName = plus_1(this.
|
|
796
|
-
var tmp = Companion_getInstance().
|
|
795
|
+
var subPackageName = plus_1(this.c20(), 'client');
|
|
796
|
+
var tmp = Companion_getInstance().wt(subPackageName.dt() + file.hv_1.zt());
|
|
797
797
|
// Inline function 'kotlin.collections.buildList' call
|
|
798
798
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
799
799
|
// Inline function 'kotlin.apply' call
|
|
800
800
|
var this_0 = ArrayList_init_$Create$_0();
|
|
801
|
-
this_0.x(new Package(subPackageName.
|
|
802
|
-
this_0.g1(this.
|
|
801
|
+
this_0.x(new Package(subPackageName.bt_1));
|
|
802
|
+
this_0.g1(this.s21_1);
|
|
803
803
|
this_0.g1(imports);
|
|
804
804
|
this_0.x(endpointImport);
|
|
805
|
-
this_0.g1(file.
|
|
806
|
-
var tmp$ret$0 = this_0.
|
|
805
|
+
this_0.g1(file.iv_1);
|
|
806
|
+
var tmp$ret$0 = this_0.q5();
|
|
807
807
|
return new File(tmp, tmp$ret$0);
|
|
808
808
|
};
|
|
809
|
-
protoOf(ScalaEmitter).
|
|
809
|
+
protoOf(ScalaEmitter).d1a = function (endpoints, logger) {
|
|
810
810
|
// Inline function 'kotlin.collections.flatMap' call
|
|
811
811
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
812
812
|
var destination = ArrayList_init_$Create$_0();
|
|
@@ -822,7 +822,7 @@ protoOf(ScalaEmitter).t19 = function (endpoints, logger) {
|
|
|
822
822
|
var _iterator__ex2g4s_0 = destination.t();
|
|
823
823
|
while (_iterator__ex2g4s_0.u()) {
|
|
824
824
|
var e = _iterator__ex2g4s_0.v();
|
|
825
|
-
var key = e.
|
|
825
|
+
var key = e.r18_1;
|
|
826
826
|
if (set.x(key)) {
|
|
827
827
|
list_0.x(e);
|
|
828
828
|
}
|
|
@@ -833,7 +833,7 @@ protoOf(ScalaEmitter).t19 = function (endpoints, logger) {
|
|
|
833
833
|
var _iterator__ex2g4s_1 = list_0.t();
|
|
834
834
|
while (_iterator__ex2g4s_1.u()) {
|
|
835
835
|
var item = _iterator__ex2g4s_1.v();
|
|
836
|
-
var tmp$ret$7 = import_0(this.
|
|
836
|
+
var tmp$ret$7 = import_0(this.c20().bt_1 + '.model', item.r18_1);
|
|
837
837
|
destination_0.x(tmp$ret$7);
|
|
838
838
|
}
|
|
839
839
|
var imports = destination_0;
|
|
@@ -843,7 +843,7 @@ protoOf(ScalaEmitter).t19 = function (endpoints, logger) {
|
|
|
843
843
|
var _iterator__ex2g4s_2 = endpoints.t();
|
|
844
844
|
while (_iterator__ex2g4s_2.u()) {
|
|
845
845
|
var item_0 = _iterator__ex2g4s_2.v();
|
|
846
|
-
var tmp$ret$10 = import_0(this.
|
|
846
|
+
var tmp$ret$10 = import_0(this.c20().bt_1 + '.endpoint', item_0.fr_1.o1());
|
|
847
847
|
destination_1.x(tmp$ret$10);
|
|
848
848
|
}
|
|
849
849
|
var endpointImports = destination_1;
|
|
@@ -853,38 +853,38 @@ protoOf(ScalaEmitter).t19 = function (endpoints, logger) {
|
|
|
853
853
|
var _iterator__ex2g4s_3 = endpoints.t();
|
|
854
854
|
while (_iterator__ex2g4s_3.u()) {
|
|
855
855
|
var item_1 = _iterator__ex2g4s_3.v();
|
|
856
|
-
var tmp$ret$13 = import_0(this.
|
|
856
|
+
var tmp$ret$13 = import_0(this.c20().bt_1 + '.client', item_1.fr_1.o1() + 'Client');
|
|
857
857
|
destination_2.x(tmp$ret$13);
|
|
858
858
|
}
|
|
859
859
|
var clientImports = destination_2;
|
|
860
860
|
var allImports = plus(plus(imports, endpointImports), clientImports);
|
|
861
861
|
var file = addIdentityTypeToCall(sanitizeNames(emitClient.call(this, endpoints, logger), _get_sanitizationConfig__sns434(this)));
|
|
862
|
-
var tmp = Companion_getInstance().
|
|
862
|
+
var tmp = Companion_getInstance().wt(this.c20().dt() + file.hv_1.zt());
|
|
863
863
|
// Inline function 'kotlin.collections.buildList' call
|
|
864
864
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
865
865
|
// Inline function 'kotlin.apply' call
|
|
866
866
|
var this_0 = ArrayList_init_$Create$_0();
|
|
867
|
-
this_0.x(new Package(this.
|
|
868
|
-
this_0.g1(this.
|
|
867
|
+
this_0.x(new Package(this.c20().bt_1));
|
|
868
|
+
this_0.g1(this.s21_1);
|
|
869
869
|
this_0.g1(allImports);
|
|
870
|
-
this_0.g1(file.
|
|
871
|
-
var tmp$ret$14 = this_0.
|
|
870
|
+
this_0.g1(file.iv_1);
|
|
871
|
+
var tmp$ret$14 = this_0.q5();
|
|
872
872
|
return new File(tmp, tmp$ret$14);
|
|
873
873
|
};
|
|
874
874
|
function convertToStringCallsToFieldAccess(_this__u8e3s4) {
|
|
875
875
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
876
876
|
var scope = new TransformScope(_this__u8e3s4);
|
|
877
|
-
scope.
|
|
878
|
-
var tmp = scope.
|
|
877
|
+
scope.l18(convertToStringCallsToFieldAccess$lambda);
|
|
878
|
+
var tmp = scope.u17_1;
|
|
879
879
|
return isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
880
880
|
}
|
|
881
881
|
function appendClientServerObjects(_this__u8e3s4, endpoint, requestIsObject) {
|
|
882
882
|
var reqType = requestIsObject ? 'Request.type' : 'Request';
|
|
883
|
-
var pathTemplate = '/' + joinToString(endpoint.
|
|
884
|
-
var pathSegmentsCode = joinToString(endpoint.
|
|
885
|
-
var clientObject = raw(trimMargin('\n |object Client extends Wirespec.Client[' + reqType + ', Response[?]] {\n | override val pathTemplate: String = "' + pathTemplate + '"\n | override val method: String = "' + endpoint.
|
|
886
|
-
var serverObject = raw(trimMargin('\n |object Server extends Wirespec.Server[' + reqType + ', Response[?]] {\n | override val pathTemplate: String = "' + pathTemplate + '"\n | override val method: String = "' + endpoint.
|
|
887
|
-
return _this__u8e3s4.
|
|
883
|
+
var pathTemplate = '/' + joinToString(endpoint.hr_1, '/', VOID, VOID, VOID, VOID, appendClientServerObjects$lambda);
|
|
884
|
+
var pathSegmentsCode = joinToString(endpoint.hr_1, ', ', VOID, VOID, VOID, VOID, appendClientServerObjects$lambda_0);
|
|
885
|
+
var clientObject = raw(trimMargin('\n |object Client extends Wirespec.Client[' + reqType + ', Response[?]] {\n | override val pathTemplate: String = "' + pathTemplate + '"\n | override val method: String = "' + endpoint.gr_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 '));
|
|
886
|
+
var serverObject = raw(trimMargin('\n |object Server extends Wirespec.Server[' + reqType + ', Response[?]] {\n | override val pathTemplate: String = "' + pathTemplate + '"\n | override val method: String = "' + endpoint.gr_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 '));
|
|
887
|
+
return _this__u8e3s4.sv(VOID, plus_0(plus_0(_this__u8e3s4.ov_1, clientObject), serverObject));
|
|
888
888
|
}
|
|
889
889
|
function injectHandleFunction(_this__u8e3s4) {
|
|
890
890
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
@@ -892,19 +892,19 @@ function injectHandleFunction(_this__u8e3s4) {
|
|
|
892
892
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
893
893
|
var tmp = scope;
|
|
894
894
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
895
|
-
var this_0 = scope.
|
|
895
|
+
var this_0 = scope.u17_1;
|
|
896
896
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
897
897
|
// Inline function 'kotlin.apply' call
|
|
898
898
|
var this_1 = new TransformerBuilder();
|
|
899
|
-
this_1.
|
|
900
|
-
var tmp$ret$4 = this_1.
|
|
901
|
-
tmp.
|
|
902
|
-
var tmp_0 = scope.
|
|
899
|
+
this_1.o18(injectHandleFunction$lambda);
|
|
900
|
+
var tmp$ret$4 = this_1.j18();
|
|
901
|
+
tmp.u17_1 = transform(this_0, tmp$ret$4);
|
|
902
|
+
var tmp_0 = scope.u17_1;
|
|
903
903
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
904
904
|
}
|
|
905
905
|
function isRequestObject(namespace) {
|
|
906
906
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
907
|
-
var tmp0 = namespace.
|
|
907
|
+
var tmp0 = namespace.ov_1;
|
|
908
908
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
909
909
|
var destination = ArrayList_init_$Create$_0();
|
|
910
910
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -920,7 +920,7 @@ function isRequestObject(namespace) {
|
|
|
920
920
|
var _iterator__ex2g4s_0 = destination.t();
|
|
921
921
|
while (_iterator__ex2g4s_0.u()) {
|
|
922
922
|
var element_0 = _iterator__ex2g4s_0.v();
|
|
923
|
-
if (element_0.
|
|
923
|
+
if (element_0.hx_1.zt() === 'Request') {
|
|
924
924
|
tmp$ret$2 = element_0;
|
|
925
925
|
break $l$block;
|
|
926
926
|
}
|
|
@@ -935,7 +935,7 @@ function isRequestObject(namespace) {
|
|
|
935
935
|
tmp = tmp0_elvis_lhs;
|
|
936
936
|
}
|
|
937
937
|
var requestStruct = tmp;
|
|
938
|
-
return requestStruct.
|
|
938
|
+
return requestStruct.jx_1.b1() === 1 && single(requestStruct.jx_1).b10_1.r() || (requestStruct.ix_1.r() && requestStruct.jx_1.r());
|
|
939
939
|
}
|
|
940
940
|
function buildModelImports(_this__u8e3s4, packageName) {
|
|
941
941
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
@@ -945,7 +945,7 @@ function buildModelImports(_this__u8e3s4, packageName) {
|
|
|
945
945
|
var _iterator__ex2g4s = this_0.t();
|
|
946
946
|
while (_iterator__ex2g4s.u()) {
|
|
947
947
|
var e = _iterator__ex2g4s.v();
|
|
948
|
-
var key = e.
|
|
948
|
+
var key = e.r18_1;
|
|
949
949
|
if (set.x(key)) {
|
|
950
950
|
list.x(e);
|
|
951
951
|
}
|
|
@@ -956,7 +956,7 @@ function buildModelImports(_this__u8e3s4, packageName) {
|
|
|
956
956
|
var _iterator__ex2g4s_0 = list.t();
|
|
957
957
|
while (_iterator__ex2g4s_0.u()) {
|
|
958
958
|
var item = _iterator__ex2g4s_0.v();
|
|
959
|
-
var tmp$ret$4 = import_0(packageName.
|
|
959
|
+
var tmp$ret$4 = import_0(packageName.bt_1 + '.model', Companion_getInstance().wt(item.r18_1).zt());
|
|
960
960
|
destination.x(tmp$ret$4);
|
|
961
961
|
}
|
|
962
962
|
return destination;
|
|
@@ -967,29 +967,29 @@ function addIdentityTypeToCall(_this__u8e3s4) {
|
|
|
967
967
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
968
968
|
var tmp = scope;
|
|
969
969
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
970
|
-
var this_0 = scope.
|
|
970
|
+
var this_0 = scope.u17_1;
|
|
971
971
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
972
972
|
// Inline function 'kotlin.apply' call
|
|
973
973
|
var this_1 = new TransformerBuilder();
|
|
974
|
-
this_1.
|
|
975
|
-
var tmp$ret$4 = this_1.
|
|
976
|
-
tmp.
|
|
977
|
-
var tmp_0 = scope.
|
|
974
|
+
this_1.o18(addIdentityTypeToCall$lambda);
|
|
975
|
+
var tmp$ret$4 = this_1.j18();
|
|
976
|
+
tmp.u17_1 = transform(this_0, tmp$ret$4);
|
|
977
|
+
var tmp_0 = scope.u17_1;
|
|
978
978
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
979
979
|
}
|
|
980
980
|
function toScalaTypeName(_this__u8e3s4) {
|
|
981
981
|
var tmp;
|
|
982
982
|
if (_this__u8e3s4 instanceof Primitive) {
|
|
983
|
-
var t = _this__u8e3s4.
|
|
983
|
+
var t = _this__u8e3s4.t18_1;
|
|
984
984
|
var tmp_0;
|
|
985
985
|
if (t instanceof String_0) {
|
|
986
986
|
tmp_0 = 'String';
|
|
987
987
|
} else {
|
|
988
988
|
if (t instanceof Integer) {
|
|
989
|
-
tmp_0 = t.
|
|
989
|
+
tmp_0 = t.b19_1.equals(Precision_P32_getInstance()) ? 'Int' : 'Long';
|
|
990
990
|
} else {
|
|
991
991
|
if (t instanceof Number_0) {
|
|
992
|
-
tmp_0 = t.
|
|
992
|
+
tmp_0 = t.w18_1.equals(Precision_P32_getInstance()) ? 'Float' : 'Double';
|
|
993
993
|
} else {
|
|
994
994
|
if (equals(t, Boolean_instance)) {
|
|
995
995
|
tmp_0 = 'Boolean';
|
|
@@ -1006,13 +1006,13 @@ function toScalaTypeName(_this__u8e3s4) {
|
|
|
1006
1006
|
tmp = tmp_0;
|
|
1007
1007
|
} else {
|
|
1008
1008
|
if (_this__u8e3s4 instanceof Custom) {
|
|
1009
|
-
tmp = _this__u8e3s4.
|
|
1009
|
+
tmp = _this__u8e3s4.r18_1;
|
|
1010
1010
|
} else {
|
|
1011
1011
|
if (_this__u8e3s4 instanceof Iterable) {
|
|
1012
|
-
tmp = 'List[' + toScalaTypeName(_this__u8e3s4.
|
|
1012
|
+
tmp = 'List[' + toScalaTypeName(_this__u8e3s4.yp_1) + ']';
|
|
1013
1013
|
} else {
|
|
1014
1014
|
if (_this__u8e3s4 instanceof Dict) {
|
|
1015
|
-
tmp = 'Map[String, ' + toScalaTypeName(_this__u8e3s4.
|
|
1015
|
+
tmp = 'Map[String, ' + toScalaTypeName(_this__u8e3s4.bq_1) + ']';
|
|
1016
1016
|
} else {
|
|
1017
1017
|
if (_this__u8e3s4 instanceof Any) {
|
|
1018
1018
|
tmp = 'Any';
|
|
@@ -1028,32 +1028,32 @@ function toScalaTypeName(_this__u8e3s4) {
|
|
|
1028
1028
|
}
|
|
1029
1029
|
}
|
|
1030
1030
|
var base = tmp;
|
|
1031
|
-
return _this__u8e3s4.
|
|
1031
|
+
return _this__u8e3s4.ot() ? 'Option[' + base + ']' : base;
|
|
1032
1032
|
}
|
|
1033
1033
|
function convertToStringCallsToFieldAccess$lambda(expr, tr) {
|
|
1034
1034
|
var tmp;
|
|
1035
1035
|
var tmp_0;
|
|
1036
1036
|
var tmp_1;
|
|
1037
1037
|
if (expr instanceof FunctionCall) {
|
|
1038
|
-
tmp_1 = expr.
|
|
1038
|
+
tmp_1 = expr.eu_1.yt() === 'toString';
|
|
1039
1039
|
} else {
|
|
1040
1040
|
tmp_1 = false;
|
|
1041
1041
|
}
|
|
1042
1042
|
if (tmp_1) {
|
|
1043
|
-
tmp_0 = !(expr.
|
|
1043
|
+
tmp_0 = !(expr.cu_1 == null);
|
|
1044
1044
|
} else {
|
|
1045
1045
|
tmp_0 = false;
|
|
1046
1046
|
}
|
|
1047
1047
|
if (tmp_0) {
|
|
1048
|
-
var tmp0_safe_receiver = expr.
|
|
1048
|
+
var tmp0_safe_receiver = expr.cu_1;
|
|
1049
1049
|
var tmp_2;
|
|
1050
1050
|
if (tmp0_safe_receiver == null) {
|
|
1051
1051
|
tmp_2 = null;
|
|
1052
1052
|
} else {
|
|
1053
1053
|
// Inline function 'kotlin.let' call
|
|
1054
|
-
tmp_2 = tr.
|
|
1054
|
+
tmp_2 = tr.p17(tmp0_safe_receiver);
|
|
1055
1055
|
}
|
|
1056
|
-
tmp = new FieldCall(tmp_2, Companion_getInstance().
|
|
1056
|
+
tmp = new FieldCall(tmp_2, Companion_getInstance().wt('toString'));
|
|
1057
1057
|
} else {
|
|
1058
1058
|
tmp = transformChildren_1(expr, tr);
|
|
1059
1059
|
}
|
|
@@ -1062,10 +1062,10 @@ function convertToStringCallsToFieldAccess$lambda(expr, tr) {
|
|
|
1062
1062
|
function appendClientServerObjects$lambda(it) {
|
|
1063
1063
|
var tmp;
|
|
1064
1064
|
if (it instanceof Literal) {
|
|
1065
|
-
tmp = it.
|
|
1065
|
+
tmp = it.a1a_1;
|
|
1066
1066
|
} else {
|
|
1067
1067
|
if (it instanceof Param) {
|
|
1068
|
-
tmp = '{' + it.
|
|
1068
|
+
tmp = '{' + it.mr_1.o1() + '}';
|
|
1069
1069
|
} else {
|
|
1070
1070
|
noWhenBranchMatchedException();
|
|
1071
1071
|
}
|
|
@@ -1075,10 +1075,10 @@ function appendClientServerObjects$lambda(it) {
|
|
|
1075
1075
|
function appendClientServerObjects$lambda_0(segment) {
|
|
1076
1076
|
var tmp;
|
|
1077
1077
|
if (segment instanceof Literal) {
|
|
1078
|
-
tmp = 'Wirespec.Literal("' + segment.
|
|
1078
|
+
tmp = 'Wirespec.Literal("' + segment.a1a_1 + '")';
|
|
1079
1079
|
} else {
|
|
1080
1080
|
if (segment instanceof Param) {
|
|
1081
|
-
tmp = 'Wirespec.Param("' + segment.
|
|
1081
|
+
tmp = 'Wirespec.Param("' + segment.mr_1.o1() + '", scala.reflect.classTag[' + toScalaTypeName(segment.nr_1) + '])';
|
|
1082
1082
|
} else {
|
|
1083
1083
|
noWhenBranchMatchedException();
|
|
1084
1084
|
}
|
|
@@ -1090,13 +1090,13 @@ function injectHandleFunction$lambda(element, transformer) {
|
|
|
1090
1090
|
if (element instanceof Interface) {
|
|
1091
1091
|
var tmp$ret$0;
|
|
1092
1092
|
$l$block: {
|
|
1093
|
-
if (!element.
|
|
1093
|
+
if (!element.tv_1.equals(Companion_getInstance().wt('Handler')) && !element.tv_1.equals(Companion_getInstance().wt('Call'))) {
|
|
1094
1094
|
tmp$ret$0 = element;
|
|
1095
1095
|
break $l$block;
|
|
1096
1096
|
}
|
|
1097
1097
|
var tmp0_typeParameters = listOf(new TypeParameter(Custom_init_$Create$('F[_]')));
|
|
1098
1098
|
// Inline function 'kotlin.collections.map' call
|
|
1099
|
-
var this_0 = element.
|
|
1099
|
+
var this_0 = element.uv_1;
|
|
1100
1100
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1101
1101
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1102
1102
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -1107,7 +1107,7 @@ function injectHandleFunction$lambda(element, transformer) {
|
|
|
1107
1107
|
if (tmp0_safe_receiver == null) {
|
|
1108
1108
|
tmp_0 = null;
|
|
1109
1109
|
} else {
|
|
1110
|
-
var tmp1_safe_receiver = item.
|
|
1110
|
+
var tmp1_safe_receiver = item.wx_1;
|
|
1111
1111
|
var tmp_1;
|
|
1112
1112
|
if (tmp1_safe_receiver == null) {
|
|
1113
1113
|
tmp_1 = null;
|
|
@@ -1116,13 +1116,13 @@ function injectHandleFunction$lambda(element, transformer) {
|
|
|
1116
1116
|
tmp_1 = Custom_init_$Create$('F', listOf(tmp1_safe_receiver));
|
|
1117
1117
|
}
|
|
1118
1118
|
var tmp3_returnType = tmp_1;
|
|
1119
|
-
tmp_0 = tmp0_safe_receiver.
|
|
1119
|
+
tmp_0 = tmp0_safe_receiver.fy(VOID, VOID, VOID, tmp3_returnType, VOID, false);
|
|
1120
1120
|
}
|
|
1121
1121
|
var tmp4_elvis_lhs = tmp_0;
|
|
1122
1122
|
var tmp$ret$3 = tmp4_elvis_lhs == null ? item : tmp4_elvis_lhs;
|
|
1123
1123
|
destination.x(tmp$ret$3);
|
|
1124
1124
|
}
|
|
1125
|
-
tmp$ret$0 = element.
|
|
1125
|
+
tmp$ret$0 = element.bw(VOID, destination, VOID, VOID, tmp0_typeParameters);
|
|
1126
1126
|
}
|
|
1127
1127
|
tmp = tmp$ret$0;
|
|
1128
1128
|
} else {
|
|
@@ -1135,7 +1135,7 @@ function addIdentityTypeToCall$lambda(element, transformer) {
|
|
|
1135
1135
|
var tmp;
|
|
1136
1136
|
if (element instanceof Struct) {
|
|
1137
1137
|
// Inline function 'kotlin.collections.map' call
|
|
1138
|
-
var this_0 = element.
|
|
1138
|
+
var this_0 = element.kx_1;
|
|
1139
1139
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1140
1140
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1141
1141
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -1143,17 +1143,17 @@ function addIdentityTypeToCall$lambda(element, transformer) {
|
|
|
1143
1143
|
var item = _iterator__ex2g4s.v();
|
|
1144
1144
|
// Inline function 'kotlin.takeIf' call
|
|
1145
1145
|
var tmp_0;
|
|
1146
|
-
if (endsWith(item.
|
|
1146
|
+
if (endsWith(item.qu_1.zt(), '.Call')) {
|
|
1147
1147
|
tmp_0 = item;
|
|
1148
1148
|
} else {
|
|
1149
1149
|
tmp_0 = null;
|
|
1150
1150
|
}
|
|
1151
1151
|
var tmp0_safe_receiver = tmp_0;
|
|
1152
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1152
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.tu(VOID, listOf(Custom_init_$Create$('[A] =>> A')));
|
|
1153
1153
|
var tmp$ret$3 = tmp1_elvis_lhs == null ? item : tmp1_elvis_lhs;
|
|
1154
1154
|
destination.x(tmp$ret$3);
|
|
1155
1155
|
}
|
|
1156
|
-
tmp = element.
|
|
1156
|
+
tmp = element.sx(VOID, VOID, VOID, destination);
|
|
1157
1157
|
} else {
|
|
1158
1158
|
tmp = element;
|
|
1159
1159
|
}
|
|
@@ -1161,10 +1161,10 @@ function addIdentityTypeToCall$lambda(element, transformer) {
|
|
|
1161
1161
|
return transformChildren_0(transformed, transformer);
|
|
1162
1162
|
}
|
|
1163
1163
|
//region block: post-declaration
|
|
1164
|
-
protoOf(ScalaEmitter).
|
|
1165
|
-
protoOf(ScalaEmitter).
|
|
1166
|
-
protoOf(ScalaEmitter).
|
|
1167
|
-
protoOf(ScalaEmitter).
|
|
1164
|
+
protoOf(ScalaEmitter).e1a = get_extensions;
|
|
1165
|
+
protoOf(ScalaEmitter).to = emit_0;
|
|
1166
|
+
protoOf(ScalaEmitter).b1a = emit_1;
|
|
1167
|
+
protoOf(ScalaEmitter).vp = get_supportsDefaults;
|
|
1168
1168
|
//endregion
|
|
1169
1169
|
//region block: exports
|
|
1170
1170
|
export {
|