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