@flock/wirespec 0.19.3-RC.1 → 0.19.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/arrow-arrow-atomic.mjs +12 -12
- package/arrow-arrow-core.mjs +167 -167
- package/clikt-clikt-mordant.mjs +81 -81
- package/clikt-clikt-mordant.mjs.map +1 -1
- package/clikt-clikt.mjs +1636 -1636
- package/clikt-clikt.mjs.map +1 -1
- package/colormath-root-colormath.mjs +448 -448
- package/kotlin-kotlin-stdlib.mjs +2428 -5210
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +10248 -10248
- package/kotlin-openapi-bindings.mjs.map +1 -1
- package/kotlin-rgxgen.mjs +1846 -1846
- package/kotlin-rgxgen.mjs.map +1 -1
- package/kotlinx-io-kotlinx-io-core.mjs +455 -455
- package/kotlinx-io-kotlinx-io-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +2101 -2135
- package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1579 -1579
- package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/mordant-mordant.mjs +1435 -1435
- package/package.json +1 -5
- package/wirespec-src-compiler-core.mjs +1598 -1598
- package/wirespec-src-compiler-emitters-java.mjs +453 -451
- package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-kotlin.mjs +341 -339
- package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-python.mjs +430 -428
- package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-rust.mjs +483 -481
- package/wirespec-src-compiler-emitters-rust.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-scala.mjs +195 -193
- package/wirespec-src-compiler-emitters-scala.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-typescript.mjs +501 -499
- package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-wirespec.mjs +82 -82
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-ir.mjs +3901 -3909
- package/wirespec-src-compiler-ir.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +439 -439
- package/wirespec-src-compiler-lib.mjs.map +1 -1
- package/wirespec-src-converter-avro.mjs +521 -521
- package/wirespec-src-converter-avro.mjs.map +1 -1
- package/wirespec-src-converter-openapi.mjs +859 -859
- package/wirespec-src-converter-openapi.mjs.map +1 -1
- package/wirespec-src-ide-lsp.mjs +1387 -1387
- package/wirespec-src-ide-lsp.mjs.map +1 -1
- package/wirespec-src-plugin-arguments.mjs +192 -192
- package/wirespec-src-plugin-arguments.mjs.map +1 -1
- package/wirespec-src-plugin-cli.mjs +109 -109
- package/wirespec-src-plugin-npm.d.mts +0 -21
- package/wirespec-src-plugin-npm.mjs +43 -43
- package/wirespec-src-plugin-npm.mjs.map +1 -1
- package/wirespec-src-tools-generator.mjs +35 -35
- package/wirespec-src-tools-generator.mjs.map +1 -1
- package/kotest-kotest-assertions-kotest-assertions-core.mjs +0 -4
- package/kotest-kotest-assertions-kotest-assertions-core.mjs.map +0 -1
- package/kotest-kotest-assertions-kotest-assertions-shared.mjs +0 -4
- package/kotest-kotest-assertions-kotest-assertions-shared.mjs.map +0 -1
- package/kotest-kotest-common.mjs +0 -56
- package/kotest-kotest-common.mjs.map +0 -1
- package/kotest-kotest-framework-kotest-framework-engine.mjs +0 -4
- package/kotest-kotest-framework-kotest-framework-engine.mjs.map +0 -1
- package/kotest-kotest-property.mjs +0 -2501
- package/kotest-kotest-property.mjs.map +0 -1
- package/kotlinx-coroutines-test.mjs +0 -4
- package/kotlinx-coroutines-test.mjs.map +0 -1
- package/wirespec-generator.d.ts +0 -51
- package/wirespec-generator.mjs +0 -9
- package/wirespec-src-integration-kotest.mjs +0 -1647
- package/wirespec-src-integration-kotest.mjs.map +0 -1
- package/xmlutil-core.mjs +0 -4
- package/xmlutil-core.mjs.map +0 -1
- package/xmlutil-serialization.mjs +0 -4
- package/xmlutil-serialization.mjs.map +0 -1
|
@@ -128,6 +128,7 @@ import {
|
|
|
128
128
|
convert1cn4bolzoed8c as convert_4,
|
|
129
129
|
emitEndpointClient1meajc90wf3el as emitEndpointClient,
|
|
130
130
|
emitClient32kfwzg2hm5vj as emitClient,
|
|
131
|
+
get_extensions31c4or738wbxz as get_extensions,
|
|
131
132
|
emit1oxjujel6f3jb as emit_0,
|
|
132
133
|
emit3bzdcd0f6nwtj as emit_1,
|
|
133
134
|
IrEmitterh2m93ojzvkep as IrEmitter,
|
|
@@ -145,15 +146,15 @@ initMetadataForCompanion(Companion);
|
|
|
145
146
|
initMetadataForClass(ScalaIrEmitter, 'ScalaIrEmitter', ScalaIrEmitter, VOID, [IrEmitter]);
|
|
146
147
|
//endregion
|
|
147
148
|
function _get_sanitizationConfig__sns434($this) {
|
|
148
|
-
var tmp0 = $this.
|
|
149
|
+
var tmp0 = $this.n20_1;
|
|
149
150
|
var tmp = KProperty1;
|
|
150
151
|
// Inline function 'kotlin.getValue' call
|
|
151
152
|
getPropertyCallableRef('sanitizationConfig', 1, tmp, ScalaIrEmitter$_get_sanitizationConfig_$ref_ydarb0(), null);
|
|
152
|
-
return tmp0.
|
|
153
|
+
return tmp0.l1();
|
|
153
154
|
}
|
|
154
155
|
function sanitize($this, _this__u8e3s4) {
|
|
155
156
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
156
|
-
var this_0 = split(_this__u8e3s4.
|
|
157
|
+
var this_0 = split(_this__u8e3s4.l1(), ['.', ' ']);
|
|
157
158
|
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
158
159
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
159
160
|
var index = 0;
|
|
@@ -162,8 +163,8 @@ function sanitize($this, _this__u8e3s4) {
|
|
|
162
163
|
var item = _iterator__ex2g4s.v();
|
|
163
164
|
var _unary__edvuaz = index;
|
|
164
165
|
index = _unary__edvuaz + 1 | 0;
|
|
165
|
-
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.
|
|
166
|
-
destination.
|
|
166
|
+
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.er(item) : item;
|
|
167
|
+
destination.x(tmp$ret$0);
|
|
167
168
|
}
|
|
168
169
|
// Inline function 'kotlin.text.filter' call
|
|
169
170
|
var tmp0 = joinToString(destination, '');
|
|
@@ -210,7 +211,7 @@ function sanitizeFirstIsDigit($this, _this__u8e3s4) {
|
|
|
210
211
|
return tmp;
|
|
211
212
|
}
|
|
212
213
|
function sanitizeKeywords($this, _this__u8e3s4) {
|
|
213
|
-
return Companion_getInstance_0().
|
|
214
|
+
return Companion_getInstance_0().o20_1.u1(_this__u8e3s4) ? addBackticks(_this__u8e3s4) : _this__u8e3s4;
|
|
214
215
|
}
|
|
215
216
|
function sanitizeSymbol($this, _this__u8e3s4) {
|
|
216
217
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
@@ -223,8 +224,8 @@ function sanitizeSymbol($this, _this__u8e3s4) {
|
|
|
223
224
|
var item = _iterator__ex2g4s.v();
|
|
224
225
|
var _unary__edvuaz = index;
|
|
225
226
|
index = _unary__edvuaz + 1 | 0;
|
|
226
|
-
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.
|
|
227
|
-
destination.
|
|
227
|
+
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.er(item) : item;
|
|
228
|
+
destination.x(tmp$ret$0);
|
|
228
229
|
}
|
|
229
230
|
// Inline function 'kotlin.text.filter' call
|
|
230
231
|
var tmp0 = joinToString(destination, '');
|
|
@@ -250,7 +251,7 @@ function sanitizeEnum($this, _this__u8e3s4) {
|
|
|
250
251
|
}
|
|
251
252
|
function Companion() {
|
|
252
253
|
Companion_instance_2 = this;
|
|
253
|
-
this.
|
|
254
|
+
this.o20_1 = setOf(['abstract', 'case', 'class', 'def', 'do', 'else', 'extends', 'false', 'final', 'for', 'forSome', 'if', 'implicit', 'import', 'lazy', 'match', 'new', 'null', 'object', 'override', 'package', 'private', 'protected', 'return', 'sealed', 'super', 'this', 'throw', 'trait', 'true', 'try', 'type', 'val', 'var', 'while', 'with', 'yield', 'given', 'using', 'enum', 'export', 'then']);
|
|
254
255
|
}
|
|
255
256
|
var Companion_instance_2;
|
|
256
257
|
function Companion_getInstance_0() {
|
|
@@ -263,13 +264,13 @@ function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda(it) {
|
|
|
263
264
|
}
|
|
264
265
|
function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0) {
|
|
265
266
|
return function (name) {
|
|
266
|
-
var sanitized = name.
|
|
267
|
+
var sanitized = name.l1h_1.a1() > 1 ? name.q1m() : sanitizeSymbol(this$0, name.j1j());
|
|
267
268
|
return new Name(listOf(sanitized));
|
|
268
269
|
};
|
|
269
270
|
}
|
|
270
271
|
function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0) {
|
|
271
272
|
return function (name) {
|
|
272
|
-
return new Name(listOf(sanitizeSymbol(this$0, name.
|
|
273
|
+
return new Name(listOf(sanitizeSymbol(this$0, name.q1m())));
|
|
273
274
|
};
|
|
274
275
|
}
|
|
275
276
|
function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_2(this$0) {
|
|
@@ -282,29 +283,29 @@ function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
282
283
|
var tmp;
|
|
283
284
|
var tmp_0;
|
|
284
285
|
if (stmt instanceof FunctionCall) {
|
|
285
|
-
tmp_0 = stmt.
|
|
286
|
+
tmp_0 = stmt.a1n_1.j1j() === 'validate';
|
|
286
287
|
} else {
|
|
287
288
|
tmp_0 = false;
|
|
288
289
|
}
|
|
289
290
|
if (tmp_0) {
|
|
290
|
-
tmp = transformChildren(stmt.
|
|
291
|
+
tmp = transformChildren(stmt.e1n(VOID, emptyList()), tr);
|
|
291
292
|
} else {
|
|
292
293
|
if (stmt instanceof ConstructorStatement) {
|
|
293
|
-
var tmp_1 = tr.
|
|
294
|
+
var tmp_1 = tr.y1u(stmt.s1n_1);
|
|
294
295
|
// Inline function 'kotlin.collections.map' call
|
|
295
|
-
var this_0 = stmt.
|
|
296
|
+
var this_0 = stmt.t1n_1;
|
|
296
297
|
// Inline function 'kotlin.collections.mapTo' call
|
|
297
|
-
var destination = ArrayList_init_$Create$(this_0.
|
|
298
|
+
var destination = ArrayList_init_$Create$(this_0.a1());
|
|
298
299
|
// Inline function 'kotlin.collections.iterator' call
|
|
299
|
-
var _iterator__ex2g4s = this_0.
|
|
300
|
+
var _iterator__ex2g4s = this_0.j1().t();
|
|
300
301
|
while (_iterator__ex2g4s.u()) {
|
|
301
302
|
var item = _iterator__ex2g4s.v();
|
|
302
303
|
// Inline function 'kotlin.collections.component1' call
|
|
303
|
-
var name = item.
|
|
304
|
+
var name = item.k1();
|
|
304
305
|
// Inline function 'kotlin.collections.component2' call
|
|
305
|
-
var expr = item.
|
|
306
|
-
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), name), tr.
|
|
307
|
-
destination.
|
|
306
|
+
var expr = item.l1();
|
|
307
|
+
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), name), tr.b1v(expr));
|
|
308
|
+
destination.x(tmp$ret$3);
|
|
308
309
|
}
|
|
309
310
|
tmp = new ConstructorStatement(tmp_1, toMap(destination));
|
|
310
311
|
} else {
|
|
@@ -316,7 +317,7 @@ function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
316
317
|
}
|
|
317
318
|
function ScalaIrEmitter$sanitizationConfig$delegate$lambda(this$0) {
|
|
318
319
|
return function () {
|
|
319
|
-
var tmp = Companion_getInstance_0().
|
|
320
|
+
var tmp = Companion_getInstance_0().o20_1;
|
|
320
321
|
var tmp_0 = ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda;
|
|
321
322
|
var tmp_1 = ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0);
|
|
322
323
|
var tmp_2 = ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0);
|
|
@@ -330,36 +331,36 @@ function ScalaIrEmitter$_get_sanitizationConfig_$ref_ydarb0() {
|
|
|
330
331
|
};
|
|
331
332
|
}
|
|
332
333
|
function ScalaIrEmitter$emitShared$lambda($this$struct) {
|
|
333
|
-
$this$struct.
|
|
334
|
-
$this$struct.
|
|
334
|
+
$this$struct.u1k(Custom_init_$Create$('PathSegment'));
|
|
335
|
+
$this$struct.p1k('value', String_instance);
|
|
335
336
|
return Unit_instance;
|
|
336
337
|
}
|
|
337
338
|
function ScalaIrEmitter$emitShared$lambda_0($this$struct) {
|
|
338
|
-
$this$struct.
|
|
339
|
-
$this$struct.
|
|
340
|
-
$this$struct.
|
|
339
|
+
$this$struct.u1k(Custom_init_$Create$('PathSegment'));
|
|
340
|
+
$this$struct.p1k('name', String_instance);
|
|
341
|
+
$this$struct.p1k('type', Reflect_instance);
|
|
341
342
|
return Unit_instance;
|
|
342
343
|
}
|
|
343
344
|
function ScalaIrEmitter$emitShared$lambda_1(element, transformer) {
|
|
344
345
|
var tmp;
|
|
345
346
|
if (element instanceof File) {
|
|
346
347
|
// Inline function 'kotlin.collections.partition' call
|
|
347
|
-
var this_0 = element.
|
|
348
|
+
var this_0 = element.w1n_1;
|
|
348
349
|
var first = ArrayList_init_$Create$_0();
|
|
349
350
|
var second = ArrayList_init_$Create$_0();
|
|
350
351
|
var _iterator__ex2g4s = this_0.t();
|
|
351
352
|
while (_iterator__ex2g4s.u()) {
|
|
352
353
|
var element_0 = _iterator__ex2g4s.v();
|
|
353
354
|
if (element_0 instanceof Package) {
|
|
354
|
-
first.
|
|
355
|
+
first.x(element_0);
|
|
355
356
|
} else {
|
|
356
|
-
second.
|
|
357
|
+
second.x(element_0);
|
|
357
358
|
}
|
|
358
359
|
}
|
|
359
360
|
var _destruct__k2r9zo = new Pair(first, second);
|
|
360
|
-
var packageElements = _destruct__k2r9zo.
|
|
361
|
-
var rest = _destruct__k2r9zo.
|
|
362
|
-
tmp = element.
|
|
361
|
+
var packageElements = _destruct__k2r9zo.ve();
|
|
362
|
+
var rest = _destruct__k2r9zo.we();
|
|
363
|
+
tmp = element.z1n(VOID, plus(packageElements, rest));
|
|
363
364
|
} else {
|
|
364
365
|
tmp = element;
|
|
365
366
|
}
|
|
@@ -371,12 +372,12 @@ function ScalaIrEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
371
372
|
if (element instanceof Namespace) {
|
|
372
373
|
var tmp$ret$0;
|
|
373
374
|
$l$block: {
|
|
374
|
-
if (!element.
|
|
375
|
+
if (!element.b1o_1.equals(Companion_getInstance().n1h('Wirespec'))) {
|
|
375
376
|
tmp$ret$0 = element;
|
|
376
377
|
break $l$block;
|
|
377
378
|
}
|
|
378
379
|
// Inline function 'kotlin.collections.flatMap' call
|
|
379
|
-
var tmp0 = element.
|
|
380
|
+
var tmp0 = element.c1o_1;
|
|
380
381
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
381
382
|
var destination = ArrayList_init_$Create$_0();
|
|
382
383
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -388,21 +389,21 @@ function ScalaIrEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
388
389
|
if (!(element_0 instanceof Interface)) {
|
|
389
390
|
tmp_0 = true;
|
|
390
391
|
} else {
|
|
391
|
-
tmp_0 = !setOf(['Request', 'Response']).
|
|
392
|
+
tmp_0 = !setOf(['Request', 'Response']).u1(element_0.p1o_1.o1h());
|
|
392
393
|
}
|
|
393
394
|
if (tmp_0) {
|
|
394
395
|
tmp$ret$1 = listOf(element_0);
|
|
395
396
|
break $l$block_2;
|
|
396
397
|
}
|
|
397
398
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
398
|
-
var tmp0_0 = element_0.
|
|
399
|
+
var tmp0_0 = element_0.q1o_1;
|
|
399
400
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
400
401
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
401
402
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
402
403
|
while (_iterator__ex2g4s_0.u()) {
|
|
403
404
|
var element_1 = _iterator__ex2g4s_0.v();
|
|
404
405
|
if (element_1 instanceof Interface) {
|
|
405
|
-
destination_0.
|
|
406
|
+
destination_0.x(element_1);
|
|
406
407
|
}
|
|
407
408
|
}
|
|
408
409
|
var tmp$ret$5;
|
|
@@ -411,7 +412,7 @@ function ScalaIrEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
411
412
|
var _iterator__ex2g4s_1 = destination_0.t();
|
|
412
413
|
while (_iterator__ex2g4s_1.u()) {
|
|
413
414
|
var element_2 = _iterator__ex2g4s_1.v();
|
|
414
|
-
if (element_2.
|
|
415
|
+
if (element_2.p1o_1.o1h() === 'Headers') {
|
|
415
416
|
tmp$ret$5 = element_2;
|
|
416
417
|
break $l$block_1;
|
|
417
418
|
}
|
|
@@ -427,9 +428,9 @@ function ScalaIrEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
427
428
|
tmp_1 = tmp0_elvis_lhs;
|
|
428
429
|
}
|
|
429
430
|
var nestedHeaders = tmp_1;
|
|
430
|
-
var tmp_2 = new Namespace(element_0.
|
|
431
|
+
var tmp_2 = new Namespace(element_0.p1o_1, listOf(nestedHeaders));
|
|
431
432
|
// Inline function 'kotlin.collections.filter' call
|
|
432
|
-
var tmp0_1 = element_0.
|
|
433
|
+
var tmp0_1 = element_0.q1o_1;
|
|
433
434
|
// Inline function 'kotlin.collections.filterTo' call
|
|
434
435
|
var destination_1 = ArrayList_init_$Create$_0();
|
|
435
436
|
var _iterator__ex2g4s_2 = tmp0_1.t();
|
|
@@ -437,38 +438,38 @@ function ScalaIrEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
437
438
|
var element_3 = _iterator__ex2g4s_2.v();
|
|
438
439
|
var tmp_3;
|
|
439
440
|
if (element_3 instanceof Interface) {
|
|
440
|
-
tmp_3 = element_3.
|
|
441
|
+
tmp_3 = element_3.p1o_1.o1h() === 'Headers';
|
|
441
442
|
} else {
|
|
442
443
|
tmp_3 = false;
|
|
443
444
|
}
|
|
444
445
|
if (!tmp_3) {
|
|
445
|
-
destination_1.
|
|
446
|
+
destination_1.x(element_3);
|
|
446
447
|
}
|
|
447
448
|
}
|
|
448
449
|
var tmp_4 = destination_1;
|
|
449
450
|
// Inline function 'kotlin.collections.map' call
|
|
450
|
-
var this_0 = element_0.
|
|
451
|
+
var this_0 = element_0.u1o_1;
|
|
451
452
|
// Inline function 'kotlin.collections.mapTo' call
|
|
452
453
|
var destination_2 = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
453
454
|
var _iterator__ex2g4s_3 = this_0.t();
|
|
454
455
|
while (_iterator__ex2g4s_3.u()) {
|
|
455
456
|
var item = _iterator__ex2g4s_3.v();
|
|
456
457
|
var tmp_5;
|
|
457
|
-
if (item.
|
|
458
|
-
tmp_5 = item.
|
|
458
|
+
if (item.c1q_1.j1j() === 'headers') {
|
|
459
|
+
tmp_5 = item.g1q(VOID, Custom_init_$Create$(element_0.p1o_1.o1h() + '.Headers'));
|
|
459
460
|
} else {
|
|
460
461
|
tmp_5 = item;
|
|
461
462
|
}
|
|
462
463
|
var tmp$ret$9 = tmp_5;
|
|
463
|
-
destination_2.
|
|
464
|
+
destination_2.x(tmp$ret$9);
|
|
464
465
|
}
|
|
465
|
-
tmp$ret$1 = listOf_0([tmp_2, element_0.
|
|
466
|
+
tmp$ret$1 = listOf_0([tmp_2, element_0.w1o(VOID, tmp_4, VOID, VOID, VOID, destination_2)]);
|
|
466
467
|
}
|
|
467
468
|
var list = tmp$ret$1;
|
|
468
469
|
addAll(destination, list);
|
|
469
470
|
}
|
|
470
471
|
var newElements = destination;
|
|
471
|
-
tmp$ret$0 = element.
|
|
472
|
+
tmp$ret$0 = element.f1o(VOID, newElements);
|
|
472
473
|
}
|
|
473
474
|
tmp = tmp$ret$0;
|
|
474
475
|
} else {
|
|
@@ -481,11 +482,11 @@ function ScalaIrEmitter$emitShared$lambda_3($clientServer) {
|
|
|
481
482
|
return function (element, transformer) {
|
|
482
483
|
var tmp;
|
|
483
484
|
if (element instanceof Namespace) {
|
|
484
|
-
var injected = element.
|
|
485
|
+
var injected = element.b1o_1.equals(Companion_getInstance().n1h('Wirespec')) ? $clientServer : emptyList();
|
|
485
486
|
var tmp_0;
|
|
486
487
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
487
488
|
if (!injected.r()) {
|
|
488
|
-
tmp_0 = withElements(element, plus(element.
|
|
489
|
+
tmp_0 = withElements(element, plus(element.x1n(), injected));
|
|
489
490
|
} else {
|
|
490
491
|
tmp_0 = element;
|
|
491
492
|
}
|
|
@@ -515,30 +516,30 @@ function ScalaIrEmitter$emit$lambda(this$0) {
|
|
|
515
516
|
}
|
|
516
517
|
function ScalaIrEmitter(packageName, emitShared) {
|
|
517
518
|
Companion_getInstance_0();
|
|
518
|
-
packageName = packageName === VOID ? Companion_instance_0.
|
|
519
|
-
emitShared = emitShared === VOID ? Companion_instance_1.
|
|
520
|
-
this.
|
|
521
|
-
this.
|
|
522
|
-
this.
|
|
523
|
-
this.
|
|
524
|
-
this.
|
|
519
|
+
packageName = packageName === VOID ? Companion_instance_0.cs('community.flock.wirespec.generated') : packageName;
|
|
520
|
+
emitShared = emitShared === VOID ? Companion_instance_1.wo() : emitShared;
|
|
521
|
+
this.i20_1 = packageName;
|
|
522
|
+
this.j20_1 = emitShared;
|
|
523
|
+
this.k20_1 = ScalaGenerator_getInstance();
|
|
524
|
+
this.l20_1 = FileExtension_Scala_getInstance();
|
|
525
|
+
this.m20_1 = listOf_0([import_0('community.flock.wirespec.scala', 'Wirespec'), import_0('scala.reflect', 'ClassTag')]);
|
|
525
526
|
var tmp = this;
|
|
526
|
-
tmp.
|
|
527
|
+
tmp.n20_1 = lazy(ScalaIrEmitter$sanitizationConfig$delegate$lambda(this));
|
|
527
528
|
}
|
|
528
|
-
protoOf(ScalaIrEmitter).
|
|
529
|
-
return this.
|
|
529
|
+
protoOf(ScalaIrEmitter).u1w = function () {
|
|
530
|
+
return this.i20_1;
|
|
530
531
|
};
|
|
531
|
-
protoOf(ScalaIrEmitter).
|
|
532
|
-
return this.
|
|
532
|
+
protoOf(ScalaIrEmitter).t1v = function () {
|
|
533
|
+
return this.k20_1;
|
|
533
534
|
};
|
|
534
|
-
protoOf(ScalaIrEmitter).
|
|
535
|
-
return this.
|
|
535
|
+
protoOf(ScalaIrEmitter).uq = function () {
|
|
536
|
+
return this.l20_1;
|
|
536
537
|
};
|
|
537
|
-
protoOf(ScalaIrEmitter).
|
|
538
|
-
ScalaGenerator_getInstance().
|
|
538
|
+
protoOf(ScalaIrEmitter).a1w = function (allFiles) {
|
|
539
|
+
ScalaGenerator_getInstance().h1w(allFiles);
|
|
539
540
|
};
|
|
540
|
-
protoOf(ScalaIrEmitter).
|
|
541
|
-
var packageName = Companion_instance_0.
|
|
541
|
+
protoOf(ScalaIrEmitter).x1v = function () {
|
|
542
|
+
var packageName = Companion_instance_0.cs('community.flock.wirespec.scala');
|
|
542
543
|
var tmp = interface_0('PathSegment', true);
|
|
543
544
|
var tmp_0 = struct('Literal', ScalaIrEmitter$emitShared$lambda);
|
|
544
545
|
var pathSegmentTypes = listOf_0([tmp, tmp_0, struct('Param', ScalaIrEmitter$emitShared$lambda_0)]);
|
|
@@ -552,17 +553,17 @@ protoOf(ScalaIrEmitter).h1z = function () {
|
|
|
552
553
|
var tmp_1;
|
|
553
554
|
var tmp_2;
|
|
554
555
|
if (item instanceof Interface) {
|
|
555
|
-
tmp_2 = setOf(['Client', 'Server']).
|
|
556
|
+
tmp_2 = setOf(['Client', 'Server']).u1(item.p1o_1.o1h());
|
|
556
557
|
} else {
|
|
557
558
|
tmp_2 = false;
|
|
558
559
|
}
|
|
559
560
|
if (tmp_2) {
|
|
560
|
-
tmp_1 = item.
|
|
561
|
+
tmp_1 = item.w1o(VOID, VOID, VOID, VOID, VOID, plus_0(item.u1o_1, new Field(Companion_getInstance().n1h('pathSegments'), new Array_0(Custom_init_$Create$('PathSegment')))));
|
|
561
562
|
} else {
|
|
562
563
|
tmp_1 = item;
|
|
563
564
|
}
|
|
564
565
|
var tmp$ret$0 = tmp_1;
|
|
565
|
-
destination.
|
|
566
|
+
destination.x(tmp$ret$0);
|
|
566
567
|
}
|
|
567
568
|
var clientServer = plus(pathSegmentTypes, destination);
|
|
568
569
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
@@ -571,58 +572,58 @@ protoOf(ScalaIrEmitter).h1z = function () {
|
|
|
571
572
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
572
573
|
var tmp_3 = scope;
|
|
573
574
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
574
|
-
var this_2 = scope.
|
|
575
|
+
var this_2 = scope.g1v_1;
|
|
575
576
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
576
577
|
// Inline function 'kotlin.apply' call
|
|
577
578
|
var this_3 = new TransformerBuilder();
|
|
578
|
-
this_3.
|
|
579
|
-
var tmp$ret$5 = this_3.
|
|
580
|
-
tmp_3.
|
|
579
|
+
this_3.x1i(ScalaIrEmitter$emitShared$lambda_1);
|
|
580
|
+
var tmp$ret$5 = this_3.y1i();
|
|
581
|
+
tmp_3.g1v_1 = transform(this_2, tmp$ret$5);
|
|
581
582
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
582
583
|
var tmp_4 = scope;
|
|
583
584
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
584
|
-
var this_4 = scope.
|
|
585
|
+
var this_4 = scope.g1v_1;
|
|
585
586
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
586
587
|
// Inline function 'kotlin.apply' call
|
|
587
588
|
var this_5 = new TransformerBuilder();
|
|
588
|
-
this_5.
|
|
589
|
-
var tmp$ret$10 = this_5.
|
|
590
|
-
tmp_4.
|
|
589
|
+
this_5.x1i(ScalaIrEmitter$emitShared$lambda_2);
|
|
590
|
+
var tmp$ret$10 = this_5.y1i();
|
|
591
|
+
tmp_4.g1v_1 = transform(this_4, tmp$ret$10);
|
|
591
592
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.injectAfter' call
|
|
592
593
|
var tmp_5 = scope;
|
|
593
594
|
// Inline function 'community.flock.wirespec.ir.core.injectAfter' call
|
|
594
595
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
595
|
-
var this_6 = scope.
|
|
596
|
+
var this_6 = scope.g1v_1;
|
|
596
597
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
597
598
|
// Inline function 'kotlin.apply' call
|
|
598
599
|
var this_7 = new TransformerBuilder();
|
|
599
|
-
this_7.
|
|
600
|
-
var tmp$ret$15 = this_7.
|
|
601
|
-
tmp_5.
|
|
602
|
-
var tmp_6 = scope.
|
|
600
|
+
this_7.x1i(ScalaIrEmitter$emitShared$lambda_3(clientServer));
|
|
601
|
+
var tmp$ret$15 = this_7.y1i();
|
|
602
|
+
tmp_5.g1v_1 = transform(this_6, tmp$ret$15);
|
|
603
|
+
var tmp_6 = scope.g1v_1;
|
|
603
604
|
var wirespecShared = isInterface(tmp_6, Element) ? tmp_6 : THROW_CCE();
|
|
604
605
|
var tmp_7;
|
|
605
|
-
if (this.
|
|
606
|
-
tmp_7 = wirespecShared.
|
|
606
|
+
if (this.j20_1.xo_1) {
|
|
607
|
+
tmp_7 = wirespecShared.z1n(Companion_getInstance().n1h(packageName.fs() + 'Wirespec'));
|
|
607
608
|
} else {
|
|
608
609
|
tmp_7 = null;
|
|
609
610
|
}
|
|
610
611
|
return tmp_7;
|
|
611
612
|
};
|
|
612
|
-
protoOf(ScalaIrEmitter).
|
|
613
|
+
protoOf(ScalaIrEmitter).lr = function (definition, module_0, logger) {
|
|
613
614
|
var file = emit.call(this, definition, module_0, logger);
|
|
614
615
|
// Inline function 'kotlin.takeIf' call
|
|
615
|
-
var this_0 = this.
|
|
616
|
+
var this_0 = this.m20_1;
|
|
616
617
|
var tmp;
|
|
617
|
-
if (Companion_instance.
|
|
618
|
+
if (Companion_instance.hr(module_0)) {
|
|
618
619
|
tmp = this_0;
|
|
619
620
|
} else {
|
|
620
621
|
tmp = null;
|
|
621
622
|
}
|
|
622
623
|
var tmp$ret$1 = tmp;
|
|
623
|
-
return placeInPackage(prependImports(file, tmp$ret$1), this.
|
|
624
|
+
return placeInPackage(prependImports(file, tmp$ret$1), this.u1w(), definition);
|
|
624
625
|
};
|
|
625
|
-
protoOf(ScalaIrEmitter).
|
|
626
|
+
protoOf(ScalaIrEmitter).c1w = function (definition, module_0) {
|
|
626
627
|
var tmp;
|
|
627
628
|
if (definition instanceof Type) {
|
|
628
629
|
tmp = convertToGenerator_2(definition, module_0);
|
|
@@ -643,7 +644,7 @@ protoOf(ScalaIrEmitter).l1z = function (definition, module_0) {
|
|
|
643
644
|
}
|
|
644
645
|
var generatorFile = tmp;
|
|
645
646
|
var sanitized = sanitizeNames(generatorFile, _get_sanitizationConfig__sns434(this));
|
|
646
|
-
var generatorOwnName = definition.
|
|
647
|
+
var generatorOwnName = definition.mr().l1() + 'Generator';
|
|
647
648
|
var tmp_0 = asSequence(collectCustomTypeNames(sanitized));
|
|
648
649
|
var tmp_1 = filterNot(tmp_0, ScalaIrEmitter$emitGenerator$lambda);
|
|
649
650
|
var tmp_2 = filterNot(tmp_1, ScalaIrEmitter$emitGenerator$lambda_0(generatorOwnName));
|
|
@@ -655,7 +656,7 @@ protoOf(ScalaIrEmitter).l1z = function (definition, module_0) {
|
|
|
655
656
|
while (_iterator__ex2g4s.u()) {
|
|
656
657
|
var element = _iterator__ex2g4s.v();
|
|
657
658
|
if (!endsWith(element, 'Generator')) {
|
|
658
|
-
destination.
|
|
659
|
+
destination.x(element);
|
|
659
660
|
}
|
|
660
661
|
}
|
|
661
662
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -664,59 +665,59 @@ protoOf(ScalaIrEmitter).l1z = function (definition, module_0) {
|
|
|
664
665
|
var _iterator__ex2g4s_0 = destination.t();
|
|
665
666
|
while (_iterator__ex2g4s_0.u()) {
|
|
666
667
|
var item = _iterator__ex2g4s_0.v();
|
|
667
|
-
var tmp$ret$3 = import_0(this.
|
|
668
|
-
destination_0.
|
|
668
|
+
var tmp$ret$3 = import_0(this.u1w().ds_1 + '.model', item);
|
|
669
|
+
destination_0.x(tmp$ret$3);
|
|
669
670
|
}
|
|
670
671
|
var modelImports = destination_0;
|
|
671
|
-
return placeInPackage_0(prependImports(sanitized, plus(this.
|
|
672
|
+
return placeInPackage_0(prependImports(sanitized, plus(this.m20_1, modelImports)), this.u1w(), 'generator');
|
|
672
673
|
};
|
|
673
|
-
protoOf(ScalaIrEmitter).
|
|
674
|
+
protoOf(ScalaIrEmitter).kq = function (type, module_0) {
|
|
674
675
|
return ensureEmptyStructHasConstructor(sanitizeNames(convertWithValidation(type, module_0), _get_sanitizationConfig__sns434(this)));
|
|
675
676
|
};
|
|
676
|
-
protoOf(ScalaIrEmitter).
|
|
677
|
+
protoOf(ScalaIrEmitter).zr = function (enum_0, module_0) {
|
|
677
678
|
var tmp = sanitizeNames(convert_0(enum_0), _get_sanitizationConfig__sns434(this));
|
|
678
679
|
return injectEnumLabelField(tmp, ScalaIrEmitter$emit$lambda(this));
|
|
679
680
|
};
|
|
680
|
-
protoOf(ScalaIrEmitter).
|
|
681
|
+
protoOf(ScalaIrEmitter).pr = function (union) {
|
|
681
682
|
return sanitizeNames(convert_1(union), _get_sanitizationConfig__sns434(this));
|
|
682
683
|
};
|
|
683
|
-
protoOf(ScalaIrEmitter).
|
|
684
|
+
protoOf(ScalaIrEmitter).ur = function (refined) {
|
|
684
685
|
var file = sanitizeNames(convert_2(refined), _get_sanitizationConfig__sns434(this));
|
|
685
686
|
// Inline function 'community.flock.wirespec.ir.core.findElement' call
|
|
686
687
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
687
|
-
var tmp0 = file.
|
|
688
|
+
var tmp0 = file.x1n();
|
|
688
689
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
689
690
|
var destination = ArrayList_init_$Create$_0();
|
|
690
691
|
var _iterator__ex2g4s = tmp0.t();
|
|
691
692
|
while (_iterator__ex2g4s.u()) {
|
|
692
693
|
var element = _iterator__ex2g4s.v();
|
|
693
694
|
if (element instanceof Struct) {
|
|
694
|
-
destination.
|
|
695
|
+
destination.x(element);
|
|
695
696
|
}
|
|
696
697
|
}
|
|
697
698
|
var tmp$ret$2 = firstOrNull_0(destination);
|
|
698
699
|
var updatedStruct = convertToStringCallsToFieldAccess(markMembersAsOverride(ensureNotNull(tmp$ret$2)));
|
|
699
|
-
return new File(Companion_getInstance().
|
|
700
|
+
return new File(Companion_getInstance().n1h(sanitize(this, refined.sr_1)), listOf(updatedStruct));
|
|
700
701
|
};
|
|
701
|
-
protoOf(ScalaIrEmitter).
|
|
702
|
+
protoOf(ScalaIrEmitter).as = function (endpoint) {
|
|
702
703
|
// Inline function 'community.flock.wirespec.ir.core.findElement' call
|
|
703
704
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
704
|
-
var tmp0 = convert_3(endpoint).
|
|
705
|
+
var tmp0 = convert_3(endpoint).x1n();
|
|
705
706
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
706
707
|
var destination = ArrayList_init_$Create$_0();
|
|
707
708
|
var _iterator__ex2g4s = tmp0.t();
|
|
708
709
|
while (_iterator__ex2g4s.u()) {
|
|
709
710
|
var element = _iterator__ex2g4s.v();
|
|
710
711
|
if (element instanceof Namespace) {
|
|
711
|
-
destination.
|
|
712
|
+
destination.x(element);
|
|
712
713
|
}
|
|
713
714
|
}
|
|
714
715
|
var tmp$ret$2 = firstOrNull_0(destination);
|
|
715
716
|
var endpointNamespace = ensureNotNull(tmp$ret$2);
|
|
716
717
|
var body = appendClientServerObjects(injectHandleFunction(endpointNamespace), endpoint, isRequestObject(endpointNamespace));
|
|
717
|
-
var tmp = sanitizeNames(new File(Companion_getInstance().
|
|
718
|
+
var tmp = sanitizeNames(new File(Companion_getInstance().n1h(sanitize(this, endpoint.up_1)), listOf(body)), _get_sanitizationConfig__sns434(this));
|
|
718
719
|
// Inline function 'kotlin.takeIf' call
|
|
719
|
-
var this_0 = buildModelImports(endpoint, this.
|
|
720
|
+
var this_0 = buildModelImports(endpoint, this.u1w());
|
|
720
721
|
var tmp_0;
|
|
721
722
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
722
723
|
if (!this_0.r()) {
|
|
@@ -727,10 +728,10 @@ protoOf(ScalaIrEmitter).lv = function (endpoint) {
|
|
|
727
728
|
var tmp$ret$5 = tmp_0;
|
|
728
729
|
return prependImports(tmp, tmp$ret$5);
|
|
729
730
|
};
|
|
730
|
-
protoOf(ScalaIrEmitter).
|
|
731
|
+
protoOf(ScalaIrEmitter).or = function (channel) {
|
|
731
732
|
var tmp = sanitizeNames(convert_4(channel), _get_sanitizationConfig__sns434(this));
|
|
732
733
|
// Inline function 'kotlin.takeIf' call
|
|
733
|
-
var this_0 = buildModelImports(channel, this.
|
|
734
|
+
var this_0 = buildModelImports(channel, this.u1w());
|
|
734
735
|
var tmp_0;
|
|
735
736
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
736
737
|
if (!this_0.r()) {
|
|
@@ -741,25 +742,25 @@ protoOf(ScalaIrEmitter).zu = function (channel) {
|
|
|
741
742
|
var tmp$ret$2 = tmp_0;
|
|
742
743
|
return prependImports(tmp, tmp$ret$2);
|
|
743
744
|
};
|
|
744
|
-
protoOf(ScalaIrEmitter).
|
|
745
|
-
var imports = buildModelImports(endpoint, this.
|
|
746
|
-
var endpointImport = import_0(this.
|
|
745
|
+
protoOf(ScalaIrEmitter).b1w = function (endpoint) {
|
|
746
|
+
var imports = buildModelImports(endpoint, this.u1w());
|
|
747
|
+
var endpointImport = import_0(this.u1w().ds_1 + '.endpoint', endpoint.up_1.l1());
|
|
747
748
|
var file = addIdentityTypeToCall(sanitizeNames(emitEndpointClient.call(this, endpoint), _get_sanitizationConfig__sns434(this)));
|
|
748
|
-
var subPackageName = plus_1(this.
|
|
749
|
-
var tmp = Companion_getInstance().
|
|
749
|
+
var subPackageName = plus_1(this.u1w(), 'client');
|
|
750
|
+
var tmp = Companion_getInstance().n1h(subPackageName.fs() + file.v1n_1.o1h());
|
|
750
751
|
// Inline function 'kotlin.collections.buildList' call
|
|
751
752
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
752
753
|
// Inline function 'kotlin.apply' call
|
|
753
754
|
var this_0 = ArrayList_init_$Create$_0();
|
|
754
|
-
this_0.
|
|
755
|
-
this_0.
|
|
756
|
-
this_0.
|
|
757
|
-
this_0.
|
|
758
|
-
this_0.
|
|
759
|
-
var tmp$ret$3 = this_0.
|
|
755
|
+
this_0.x(new Package(subPackageName.ds_1));
|
|
756
|
+
this_0.f1(this.m20_1);
|
|
757
|
+
this_0.f1(imports);
|
|
758
|
+
this_0.x(endpointImport);
|
|
759
|
+
this_0.f1(file.w1n_1);
|
|
760
|
+
var tmp$ret$3 = this_0.o5();
|
|
760
761
|
return new File(tmp, tmp$ret$3);
|
|
761
762
|
};
|
|
762
|
-
protoOf(ScalaIrEmitter).
|
|
763
|
+
protoOf(ScalaIrEmitter).y1v = function (endpoints, logger) {
|
|
763
764
|
// Inline function 'kotlin.collections.flatMap' call
|
|
764
765
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
765
766
|
var destination = ArrayList_init_$Create$_0();
|
|
@@ -775,9 +776,9 @@ protoOf(ScalaIrEmitter).i1z = function (endpoints, logger) {
|
|
|
775
776
|
var _iterator__ex2g4s_0 = destination.t();
|
|
776
777
|
while (_iterator__ex2g4s_0.u()) {
|
|
777
778
|
var e = _iterator__ex2g4s_0.v();
|
|
778
|
-
var key = e.
|
|
779
|
-
if (set.
|
|
780
|
-
list_0.
|
|
779
|
+
var key = e.bv_1;
|
|
780
|
+
if (set.x(key)) {
|
|
781
|
+
list_0.x(e);
|
|
781
782
|
}
|
|
782
783
|
}
|
|
783
784
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -786,8 +787,8 @@ protoOf(ScalaIrEmitter).i1z = function (endpoints, logger) {
|
|
|
786
787
|
var _iterator__ex2g4s_1 = list_0.t();
|
|
787
788
|
while (_iterator__ex2g4s_1.u()) {
|
|
788
789
|
var item = _iterator__ex2g4s_1.v();
|
|
789
|
-
var tmp$ret$5 = import_0(this.
|
|
790
|
-
destination_0.
|
|
790
|
+
var tmp$ret$5 = import_0(this.u1w().ds_1 + '.model', item.bv_1);
|
|
791
|
+
destination_0.x(tmp$ret$5);
|
|
791
792
|
}
|
|
792
793
|
var imports = destination_0;
|
|
793
794
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -796,8 +797,8 @@ protoOf(ScalaIrEmitter).i1z = function (endpoints, logger) {
|
|
|
796
797
|
var _iterator__ex2g4s_2 = endpoints.t();
|
|
797
798
|
while (_iterator__ex2g4s_2.u()) {
|
|
798
799
|
var item_0 = _iterator__ex2g4s_2.v();
|
|
799
|
-
var tmp$ret$8 = import_0(this.
|
|
800
|
-
destination_1.
|
|
800
|
+
var tmp$ret$8 = import_0(this.u1w().ds_1 + '.endpoint', item_0.up_1.l1());
|
|
801
|
+
destination_1.x(tmp$ret$8);
|
|
801
802
|
}
|
|
802
803
|
var endpointImports = destination_1;
|
|
803
804
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -806,38 +807,38 @@ protoOf(ScalaIrEmitter).i1z = function (endpoints, logger) {
|
|
|
806
807
|
var _iterator__ex2g4s_3 = endpoints.t();
|
|
807
808
|
while (_iterator__ex2g4s_3.u()) {
|
|
808
809
|
var item_1 = _iterator__ex2g4s_3.v();
|
|
809
|
-
var tmp$ret$11 = import_0(this.
|
|
810
|
-
destination_2.
|
|
810
|
+
var tmp$ret$11 = import_0(this.u1w().ds_1 + '.client', item_1.up_1.l1() + 'Client');
|
|
811
|
+
destination_2.x(tmp$ret$11);
|
|
811
812
|
}
|
|
812
813
|
var clientImports = destination_2;
|
|
813
814
|
var allImports = plus(plus(imports, endpointImports), clientImports);
|
|
814
815
|
var file = addIdentityTypeToCall(sanitizeNames(emitClient.call(this, endpoints, logger), _get_sanitizationConfig__sns434(this)));
|
|
815
|
-
var tmp = Companion_getInstance().
|
|
816
|
+
var tmp = Companion_getInstance().n1h(this.u1w().fs() + file.v1n_1.o1h());
|
|
816
817
|
// Inline function 'kotlin.collections.buildList' call
|
|
817
818
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
818
819
|
// Inline function 'kotlin.apply' call
|
|
819
820
|
var this_0 = ArrayList_init_$Create$_0();
|
|
820
|
-
this_0.
|
|
821
|
-
this_0.
|
|
822
|
-
this_0.
|
|
823
|
-
this_0.
|
|
824
|
-
var tmp$ret$17 = this_0.
|
|
821
|
+
this_0.x(new Package(this.u1w().ds_1));
|
|
822
|
+
this_0.f1(this.m20_1);
|
|
823
|
+
this_0.f1(allImports);
|
|
824
|
+
this_0.f1(file.w1n_1);
|
|
825
|
+
var tmp$ret$17 = this_0.o5();
|
|
825
826
|
return new File(tmp, tmp$ret$17);
|
|
826
827
|
};
|
|
827
828
|
function convertToStringCallsToFieldAccess(_this__u8e3s4) {
|
|
828
829
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
829
830
|
var scope = new TransformScope(_this__u8e3s4);
|
|
830
|
-
scope.
|
|
831
|
-
var tmp = scope.
|
|
831
|
+
scope.o1v(convertToStringCallsToFieldAccess$lambda);
|
|
832
|
+
var tmp = scope.g1v_1;
|
|
832
833
|
return isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
833
834
|
}
|
|
834
835
|
function appendClientServerObjects(_this__u8e3s4, endpoint, requestIsObject) {
|
|
835
836
|
var reqType = requestIsObject ? 'Request.type' : 'Request';
|
|
836
|
-
var pathTemplate = '/' + joinToString(endpoint.
|
|
837
|
-
var pathSegmentsCode = joinToString(endpoint.
|
|
838
|
-
var clientObject = raw(trimMargin('\n |object Client extends Wirespec.Client[' + reqType + ', Response[?]] {\n | override val pathTemplate: String = "' + pathTemplate + '"\n | override val method: String = "' + endpoint.
|
|
839
|
-
var serverObject = raw(trimMargin('\n |object Server extends Wirespec.Server[' + reqType + ', Response[?]] {\n | override val pathTemplate: String = "' + pathTemplate + '"\n | override val method: String = "' + endpoint.
|
|
840
|
-
return _this__u8e3s4.
|
|
837
|
+
var pathTemplate = '/' + joinToString(endpoint.wp_1, '/', VOID, VOID, VOID, VOID, appendClientServerObjects$lambda);
|
|
838
|
+
var pathSegmentsCode = joinToString(endpoint.wp_1, ', ', VOID, VOID, VOID, VOID, appendClientServerObjects$lambda_0);
|
|
839
|
+
var clientObject = raw(trimMargin('\n |object Client extends Wirespec.Client[' + reqType + ', Response[?]] {\n | override val pathTemplate: String = "' + pathTemplate + '"\n | override val method: String = "' + endpoint.vp_1.toString() + '"\n | override val pathSegments: List[Wirespec.PathSegment] = List(' + pathSegmentsCode + ')\n | override def client(serialization: Wirespec.Serialization): Wirespec.ClientEdge[' + reqType + ', Response[?]] = new Wirespec.ClientEdge[' + reqType + ', Response[?]] {\n | override def to(request: ' + reqType + '): Wirespec.RawRequest = toRawRequest(serialization, request)\n | override def from(response: Wirespec.RawResponse): Response[?] = fromRawResponse(serialization, response)\n | }\n |}\n '));
|
|
840
|
+
var serverObject = raw(trimMargin('\n |object Server extends Wirespec.Server[' + reqType + ', Response[?]] {\n | override val pathTemplate: String = "' + pathTemplate + '"\n | override val method: String = "' + endpoint.vp_1.toString() + '"\n | override val pathSegments: List[Wirespec.PathSegment] = List(' + pathSegmentsCode + ')\n | override def server(serialization: Wirespec.Serialization): Wirespec.ServerEdge[' + reqType + ', Response[?]] = new Wirespec.ServerEdge[' + reqType + ', Response[?]] {\n | override def from(request: Wirespec.RawRequest): ' + reqType + ' = fromRawRequest(serialization, request)\n | override def to(response: Response[?]): Wirespec.RawResponse = toRawResponse(serialization, response)\n | }\n |}\n '));
|
|
841
|
+
return _this__u8e3s4.f1o(VOID, plus_0(plus_0(_this__u8e3s4.c1o_1, clientObject), serverObject));
|
|
841
842
|
}
|
|
842
843
|
function injectHandleFunction(_this__u8e3s4) {
|
|
843
844
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
@@ -845,26 +846,26 @@ function injectHandleFunction(_this__u8e3s4) {
|
|
|
845
846
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
846
847
|
var tmp = scope;
|
|
847
848
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
848
|
-
var this_0 = scope.
|
|
849
|
+
var this_0 = scope.g1v_1;
|
|
849
850
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
850
851
|
// Inline function 'kotlin.apply' call
|
|
851
852
|
var this_1 = new TransformerBuilder();
|
|
852
|
-
this_1.
|
|
853
|
-
var tmp$ret$2 = this_1.
|
|
854
|
-
tmp.
|
|
855
|
-
var tmp_0 = scope.
|
|
853
|
+
this_1.x1i(injectHandleFunction$lambda);
|
|
854
|
+
var tmp$ret$2 = this_1.y1i();
|
|
855
|
+
tmp.g1v_1 = transform(this_0, tmp$ret$2);
|
|
856
|
+
var tmp_0 = scope.g1v_1;
|
|
856
857
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
857
858
|
}
|
|
858
859
|
function isRequestObject(namespace) {
|
|
859
860
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
860
|
-
var tmp0 = namespace.
|
|
861
|
+
var tmp0 = namespace.c1o_1;
|
|
861
862
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
862
863
|
var destination = ArrayList_init_$Create$_0();
|
|
863
864
|
var _iterator__ex2g4s = tmp0.t();
|
|
864
865
|
while (_iterator__ex2g4s.u()) {
|
|
865
866
|
var element = _iterator__ex2g4s.v();
|
|
866
867
|
if (element instanceof Struct) {
|
|
867
|
-
destination.
|
|
868
|
+
destination.x(element);
|
|
868
869
|
}
|
|
869
870
|
}
|
|
870
871
|
var tmp$ret$3;
|
|
@@ -873,7 +874,7 @@ function isRequestObject(namespace) {
|
|
|
873
874
|
var _iterator__ex2g4s_0 = destination.t();
|
|
874
875
|
while (_iterator__ex2g4s_0.u()) {
|
|
875
876
|
var element_0 = _iterator__ex2g4s_0.v();
|
|
876
|
-
if (element_0.
|
|
877
|
+
if (element_0.g1o_1.o1h() === 'Request') {
|
|
877
878
|
tmp$ret$3 = element_0;
|
|
878
879
|
break $l$block;
|
|
879
880
|
}
|
|
@@ -888,7 +889,7 @@ function isRequestObject(namespace) {
|
|
|
888
889
|
tmp = tmp0_elvis_lhs;
|
|
889
890
|
}
|
|
890
891
|
var requestStruct = tmp;
|
|
891
|
-
return requestStruct.
|
|
892
|
+
return requestStruct.i1o_1.a1() === 1 && single(requestStruct.i1o_1).p1r_1.r() || (requestStruct.h1o_1.r() && requestStruct.i1o_1.r());
|
|
892
893
|
}
|
|
893
894
|
function buildModelImports(_this__u8e3s4, packageName) {
|
|
894
895
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
@@ -898,9 +899,9 @@ function buildModelImports(_this__u8e3s4, packageName) {
|
|
|
898
899
|
var _iterator__ex2g4s = this_0.t();
|
|
899
900
|
while (_iterator__ex2g4s.u()) {
|
|
900
901
|
var e = _iterator__ex2g4s.v();
|
|
901
|
-
var key = e.
|
|
902
|
-
if (set.
|
|
903
|
-
list.
|
|
902
|
+
var key = e.bv_1;
|
|
903
|
+
if (set.x(key)) {
|
|
904
|
+
list.x(e);
|
|
904
905
|
}
|
|
905
906
|
}
|
|
906
907
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -909,8 +910,8 @@ function buildModelImports(_this__u8e3s4, packageName) {
|
|
|
909
910
|
var _iterator__ex2g4s_0 = list.t();
|
|
910
911
|
while (_iterator__ex2g4s_0.u()) {
|
|
911
912
|
var item = _iterator__ex2g4s_0.v();
|
|
912
|
-
var tmp$ret$2 = import_0(packageName.
|
|
913
|
-
destination.
|
|
913
|
+
var tmp$ret$2 = import_0(packageName.ds_1 + '.model', Companion_getInstance().n1h(item.bv_1).o1h());
|
|
914
|
+
destination.x(tmp$ret$2);
|
|
914
915
|
}
|
|
915
916
|
return destination;
|
|
916
917
|
}
|
|
@@ -920,29 +921,29 @@ function addIdentityTypeToCall(_this__u8e3s4) {
|
|
|
920
921
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
921
922
|
var tmp = scope;
|
|
922
923
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
923
|
-
var this_0 = scope.
|
|
924
|
+
var this_0 = scope.g1v_1;
|
|
924
925
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
925
926
|
// Inline function 'kotlin.apply' call
|
|
926
927
|
var this_1 = new TransformerBuilder();
|
|
927
|
-
this_1.
|
|
928
|
-
var tmp$ret$2 = this_1.
|
|
929
|
-
tmp.
|
|
930
|
-
var tmp_0 = scope.
|
|
928
|
+
this_1.x1i(addIdentityTypeToCall$lambda);
|
|
929
|
+
var tmp$ret$2 = this_1.y1i();
|
|
930
|
+
tmp.g1v_1 = transform(this_0, tmp$ret$2);
|
|
931
|
+
var tmp_0 = scope.g1v_1;
|
|
931
932
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
932
933
|
}
|
|
933
934
|
function toScalaTypeName(_this__u8e3s4) {
|
|
934
935
|
var tmp;
|
|
935
936
|
if (_this__u8e3s4 instanceof Primitive) {
|
|
936
|
-
var t = _this__u8e3s4.
|
|
937
|
+
var t = _this__u8e3s4.fv_1;
|
|
937
938
|
var tmp_0;
|
|
938
939
|
if (t instanceof String_0) {
|
|
939
940
|
tmp_0 = 'String';
|
|
940
941
|
} else {
|
|
941
942
|
if (t instanceof Integer) {
|
|
942
|
-
tmp_0 = t.
|
|
943
|
+
tmp_0 = t.ju_1.equals(Precision_P32_getInstance()) ? 'Int' : 'Long';
|
|
943
944
|
} else {
|
|
944
945
|
if (t instanceof Number_0) {
|
|
945
|
-
tmp_0 = t.
|
|
946
|
+
tmp_0 = t.mu_1.equals(Precision_P32_getInstance()) ? 'Float' : 'Double';
|
|
946
947
|
} else {
|
|
947
948
|
if (equals(t, Boolean_instance)) {
|
|
948
949
|
tmp_0 = 'Boolean';
|
|
@@ -959,13 +960,13 @@ function toScalaTypeName(_this__u8e3s4) {
|
|
|
959
960
|
tmp = tmp_0;
|
|
960
961
|
} else {
|
|
961
962
|
if (_this__u8e3s4 instanceof Custom) {
|
|
962
|
-
tmp = _this__u8e3s4.
|
|
963
|
+
tmp = _this__u8e3s4.bv_1;
|
|
963
964
|
} else {
|
|
964
965
|
if (_this__u8e3s4 instanceof Iterable) {
|
|
965
|
-
tmp = 'List[' + toScalaTypeName(_this__u8e3s4.
|
|
966
|
+
tmp = 'List[' + toScalaTypeName(_this__u8e3s4.po_1) + ']';
|
|
966
967
|
} else {
|
|
967
968
|
if (_this__u8e3s4 instanceof Dict) {
|
|
968
|
-
tmp = 'Map[String, ' + toScalaTypeName(_this__u8e3s4.
|
|
969
|
+
tmp = 'Map[String, ' + toScalaTypeName(_this__u8e3s4.so_1) + ']';
|
|
969
970
|
} else {
|
|
970
971
|
if (_this__u8e3s4 instanceof Any) {
|
|
971
972
|
tmp = 'Any';
|
|
@@ -981,32 +982,32 @@ function toScalaTypeName(_this__u8e3s4) {
|
|
|
981
982
|
}
|
|
982
983
|
}
|
|
983
984
|
var base = tmp;
|
|
984
|
-
return _this__u8e3s4.
|
|
985
|
+
return _this__u8e3s4.tu() ? 'Option[' + base + ']' : base;
|
|
985
986
|
}
|
|
986
987
|
function convertToStringCallsToFieldAccess$lambda(expr, tr) {
|
|
987
988
|
var tmp;
|
|
988
989
|
var tmp_0;
|
|
989
990
|
var tmp_1;
|
|
990
991
|
if (expr instanceof FunctionCall) {
|
|
991
|
-
tmp_1 = expr.
|
|
992
|
+
tmp_1 = expr.a1n_1.q1m() === 'toString';
|
|
992
993
|
} else {
|
|
993
994
|
tmp_1 = false;
|
|
994
995
|
}
|
|
995
996
|
if (tmp_1) {
|
|
996
|
-
tmp_0 = !(expr.
|
|
997
|
+
tmp_0 = !(expr.y1m_1 == null);
|
|
997
998
|
} else {
|
|
998
999
|
tmp_0 = false;
|
|
999
1000
|
}
|
|
1000
1001
|
if (tmp_0) {
|
|
1001
|
-
var tmp0_safe_receiver = expr.
|
|
1002
|
+
var tmp0_safe_receiver = expr.y1m_1;
|
|
1002
1003
|
var tmp_2;
|
|
1003
1004
|
if (tmp0_safe_receiver == null) {
|
|
1004
1005
|
tmp_2 = null;
|
|
1005
1006
|
} else {
|
|
1006
1007
|
// Inline function 'kotlin.let' call
|
|
1007
|
-
tmp_2 = tr.
|
|
1008
|
+
tmp_2 = tr.b1v(tmp0_safe_receiver);
|
|
1008
1009
|
}
|
|
1009
|
-
tmp = new FieldCall(tmp_2, Companion_getInstance().
|
|
1010
|
+
tmp = new FieldCall(tmp_2, Companion_getInstance().n1h('toString'));
|
|
1010
1011
|
} else {
|
|
1011
1012
|
tmp = transformChildren_1(expr, tr);
|
|
1012
1013
|
}
|
|
@@ -1015,10 +1016,10 @@ function convertToStringCallsToFieldAccess$lambda(expr, tr) {
|
|
|
1015
1016
|
function appendClientServerObjects$lambda(it) {
|
|
1016
1017
|
var tmp;
|
|
1017
1018
|
if (it instanceof Literal) {
|
|
1018
|
-
tmp = it.
|
|
1019
|
+
tmp = it.xq_1;
|
|
1019
1020
|
} else {
|
|
1020
1021
|
if (it instanceof Param) {
|
|
1021
|
-
tmp = '{' + it.
|
|
1022
|
+
tmp = '{' + it.bq_1.l1() + '}';
|
|
1022
1023
|
} else {
|
|
1023
1024
|
noWhenBranchMatchedException();
|
|
1024
1025
|
}
|
|
@@ -1028,10 +1029,10 @@ function appendClientServerObjects$lambda(it) {
|
|
|
1028
1029
|
function appendClientServerObjects$lambda_0(segment) {
|
|
1029
1030
|
var tmp;
|
|
1030
1031
|
if (segment instanceof Literal) {
|
|
1031
|
-
tmp = 'Wirespec.Literal("' + segment.
|
|
1032
|
+
tmp = 'Wirespec.Literal("' + segment.xq_1 + '")';
|
|
1032
1033
|
} else {
|
|
1033
1034
|
if (segment instanceof Param) {
|
|
1034
|
-
tmp = 'Wirespec.Param("' + segment.
|
|
1035
|
+
tmp = 'Wirespec.Param("' + segment.bq_1.l1() + '", scala.reflect.classTag[' + toScalaTypeName(segment.cq_1) + '])';
|
|
1035
1036
|
} else {
|
|
1036
1037
|
noWhenBranchMatchedException();
|
|
1037
1038
|
}
|
|
@@ -1043,13 +1044,13 @@ function injectHandleFunction$lambda(element, transformer) {
|
|
|
1043
1044
|
if (element instanceof Interface) {
|
|
1044
1045
|
var tmp$ret$0;
|
|
1045
1046
|
$l$block: {
|
|
1046
|
-
if (!element.
|
|
1047
|
+
if (!element.p1o_1.equals(Companion_getInstance().n1h('Handler')) && !element.p1o_1.equals(Companion_getInstance().n1h('Call'))) {
|
|
1047
1048
|
tmp$ret$0 = element;
|
|
1048
1049
|
break $l$block;
|
|
1049
1050
|
}
|
|
1050
1051
|
var tmp0_typeParameters = listOf(new TypeParameter(Custom_init_$Create$('F[_]')));
|
|
1051
1052
|
// Inline function 'kotlin.collections.map' call
|
|
1052
|
-
var this_0 = element.
|
|
1053
|
+
var this_0 = element.q1o_1;
|
|
1053
1054
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1054
1055
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1055
1056
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -1060,7 +1061,7 @@ function injectHandleFunction$lambda(element, transformer) {
|
|
|
1060
1061
|
if (tmp0_safe_receiver == null) {
|
|
1061
1062
|
tmp_0 = null;
|
|
1062
1063
|
} else {
|
|
1063
|
-
var tmp1_safe_receiver = item.
|
|
1064
|
+
var tmp1_safe_receiver = item.g1l_1;
|
|
1064
1065
|
var tmp_1;
|
|
1065
1066
|
if (tmp1_safe_receiver == null) {
|
|
1066
1067
|
tmp_1 = null;
|
|
@@ -1069,13 +1070,13 @@ function injectHandleFunction$lambda(element, transformer) {
|
|
|
1069
1070
|
tmp_1 = Custom_init_$Create$('F', listOf(tmp1_safe_receiver));
|
|
1070
1071
|
}
|
|
1071
1072
|
var tmp3_returnType = tmp_1;
|
|
1072
|
-
tmp_0 = tmp0_safe_receiver.
|
|
1073
|
+
tmp_0 = tmp0_safe_receiver.l1l(VOID, VOID, VOID, tmp3_returnType, VOID, false);
|
|
1073
1074
|
}
|
|
1074
1075
|
var tmp4_elvis_lhs = tmp_0;
|
|
1075
1076
|
var tmp$ret$3 = tmp4_elvis_lhs == null ? item : tmp4_elvis_lhs;
|
|
1076
|
-
destination.
|
|
1077
|
+
destination.x(tmp$ret$3);
|
|
1077
1078
|
}
|
|
1078
|
-
tmp$ret$0 = element.
|
|
1079
|
+
tmp$ret$0 = element.w1o(VOID, destination, VOID, VOID, tmp0_typeParameters);
|
|
1079
1080
|
}
|
|
1080
1081
|
tmp = tmp$ret$0;
|
|
1081
1082
|
} else {
|
|
@@ -1088,7 +1089,7 @@ function addIdentityTypeToCall$lambda(element, transformer) {
|
|
|
1088
1089
|
var tmp;
|
|
1089
1090
|
if (element instanceof Struct) {
|
|
1090
1091
|
// Inline function 'kotlin.collections.map' call
|
|
1091
|
-
var this_0 = element.
|
|
1092
|
+
var this_0 = element.j1o_1;
|
|
1092
1093
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1093
1094
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1094
1095
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -1101,7 +1102,7 @@ function addIdentityTypeToCall$lambda(element, transformer) {
|
|
|
1101
1102
|
} else {
|
|
1102
1103
|
// Inline function 'kotlin.takeIf' call
|
|
1103
1104
|
var tmp_1;
|
|
1104
|
-
if (endsWith(tmp0_safe_receiver.
|
|
1105
|
+
if (endsWith(tmp0_safe_receiver.h1j_1.o1h(), '.Call')) {
|
|
1105
1106
|
tmp_1 = tmp0_safe_receiver;
|
|
1106
1107
|
} else {
|
|
1107
1108
|
tmp_1 = null;
|
|
@@ -1109,11 +1110,11 @@ function addIdentityTypeToCall$lambda(element, transformer) {
|
|
|
1109
1110
|
tmp_0 = tmp_1;
|
|
1110
1111
|
}
|
|
1111
1112
|
var tmp1_safe_receiver = tmp_0;
|
|
1112
|
-
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
1113
|
+
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.m1n(VOID, listOf(Custom_init_$Create$('[A] =>> A')));
|
|
1113
1114
|
var tmp$ret$2 = tmp2_elvis_lhs == null ? item : tmp2_elvis_lhs;
|
|
1114
|
-
destination.
|
|
1115
|
+
destination.x(tmp$ret$2);
|
|
1115
1116
|
}
|
|
1116
|
-
tmp = element.
|
|
1117
|
+
tmp = element.n1o(VOID, VOID, VOID, destination);
|
|
1117
1118
|
} else {
|
|
1118
1119
|
tmp = element;
|
|
1119
1120
|
}
|
|
@@ -1121,8 +1122,9 @@ function addIdentityTypeToCall$lambda(element, transformer) {
|
|
|
1121
1122
|
return transformChildren_0(transformed, transformer);
|
|
1122
1123
|
}
|
|
1123
1124
|
//region block: post-declaration
|
|
1124
|
-
protoOf(ScalaIrEmitter).
|
|
1125
|
-
protoOf(ScalaIrEmitter).
|
|
1125
|
+
protoOf(ScalaIrEmitter).v1v = get_extensions;
|
|
1126
|
+
protoOf(ScalaIrEmitter).eo = emit_0;
|
|
1127
|
+
protoOf(ScalaIrEmitter).w1v = emit_1;
|
|
1126
1128
|
//endregion
|
|
1127
1129
|
//region block: exports
|
|
1128
1130
|
export {
|