@flock/wirespec 0.19.0-RC.3 → 0.19.0
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 +156 -156
- package/clikt-clikt-mordant.mjs +80 -80
- package/clikt-clikt-mordant.mjs.map +1 -1
- package/clikt-clikt.mjs +1547 -1547
- package/clikt-clikt.mjs.map +1 -1
- package/colormath-root-colormath.mjs +444 -444
- package/kotlin-kotlin-stdlib.mjs +2347 -5055
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +20865 -6871
- package/kotlin-openapi-bindings.mjs.map +1 -1
- package/kotlin-rgxgen.mjs +1806 -1806
- package/kotlinx-io-kotlinx-io-core.mjs +432 -432
- package/kotlinx-io-kotlinx-io-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +2213 -2050
- package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1947 -1472
- package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/mordant-mordant.mjs +1333 -1333
- package/package.json +14 -9
- package/wirespec-lsp.mjs +7 -0
- package/wirespec-msw.d.ts +53 -0
- package/wirespec-msw.mjs +83 -0
- package/wirespec-src-compiler-core.mjs +1752 -1688
- package/wirespec-src-compiler-core.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-java.mjs +457 -421
- package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-kotlin.mjs +440 -341
- package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-python.mjs +381 -382
- package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-rust.mjs +447 -424
- package/wirespec-src-compiler-emitters-rust.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-scala.mjs +172 -173
- package/wirespec-src-compiler-emitters-scala.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-typescript.mjs +475 -444
- package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
- 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 +3833 -3883
- package/wirespec-src-compiler-ir.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +418 -418
- package/wirespec-src-compiler-lib.mjs.map +1 -1
- package/wirespec-src-converter-avro.mjs +510 -510
- package/wirespec-src-converter-avro.mjs.map +1 -1
- package/wirespec-src-converter-openapi.mjs +1584 -1510
- 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 +183 -183
- package/wirespec-src-plugin-arguments.mjs.map +1 -1
- package/wirespec-src-plugin-cli.mjs +106 -106
- package/wirespec-src-plugin-npm.d.mts +2 -11
- package/wirespec-src-plugin-npm.mjs +47 -42
- package/wirespec-src-plugin-npm.mjs.map +1 -1
- package/wirespec-src-tools-generator.mjs +53 -53
- package/wirespec-src-tools-generator.mjs.map +1 -1
- package/Kotlin-DateTime-library-kotlinx-datetime.mjs +0 -4
- package/Kotlin-DateTime-library-kotlinx-datetime.mjs.map +0 -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-kotest-property-datetime.mjs +0 -4
- package/kotest-kotest-property-kotest-property-datetime.mjs.map +0 -1
- package/kotest-kotest-property.mjs +0 -2400
- package/kotest-kotest-property.mjs.map +0 -1
- package/kotest-property-arbs.mjs +0 -4
- package/kotest-property-arbs.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 -52
- package/wirespec-generator.mjs +0 -9
- package/wirespec-src-integration-kotest.mjs +0 -1455
- 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
|
@@ -84,7 +84,7 @@ import {
|
|
|
84
84
|
sanitizeFieldName1ptgy1kxy8u2m as sanitizeFieldName,
|
|
85
85
|
ConstructorStatement1x4n4sr59iy4n as ConstructorStatement,
|
|
86
86
|
SanitizationConfig11mmn3p2c03c1 as SanitizationConfig,
|
|
87
|
-
|
|
87
|
+
Custom_init_$Create$2enn7oyj71j1t as Custom_init_$Create$,
|
|
88
88
|
String_instance3uxvo48ki208u as String_instance,
|
|
89
89
|
Reflect_instance3i17lxiopj78t as Reflect_instance,
|
|
90
90
|
Package2tniq694j1763 as Package,
|
|
@@ -125,7 +125,6 @@ import {
|
|
|
125
125
|
Struct39wf79cwtn4ty as Struct,
|
|
126
126
|
markMembersAsOverride3r1zpft8nbmxg as markMembersAsOverride,
|
|
127
127
|
convert32tuiui3czihh as convert_3,
|
|
128
|
-
flattenNestedStructs2956rxx8q2zxl as flattenNestedStructs,
|
|
129
128
|
convert1cn4bolzoed8c as convert_4,
|
|
130
129
|
emitEndpointClient1meajc90wf3el as emitEndpointClient,
|
|
131
130
|
emitClient32kfwzg2hm5vj as emitClient,
|
|
@@ -137,6 +136,7 @@ import {
|
|
|
137
136
|
FieldCall1iz7z2fx2xo4p as FieldCall,
|
|
138
137
|
TypeParameter1x56bawg1pg87 as TypeParameter,
|
|
139
138
|
Function21cuq8qizkin7 as Function,
|
|
139
|
+
Custom2si7lto3wompr as Custom_0,
|
|
140
140
|
} from './wirespec-src-compiler-ir.mjs';
|
|
141
141
|
//region block: imports
|
|
142
142
|
//endregion
|
|
@@ -145,15 +145,15 @@ initMetadataForCompanion(Companion);
|
|
|
145
145
|
initMetadataForClass(ScalaIrEmitter, 'ScalaIrEmitter', ScalaIrEmitter, VOID, [IrEmitter]);
|
|
146
146
|
//endregion
|
|
147
147
|
function _get_sanitizationConfig__sns434($this) {
|
|
148
|
-
var tmp0 = $this.
|
|
148
|
+
var tmp0 = $this.k20_1;
|
|
149
149
|
var tmp = KProperty1;
|
|
150
150
|
// Inline function 'kotlin.getValue' call
|
|
151
151
|
getPropertyCallableRef('sanitizationConfig', 1, tmp, ScalaIrEmitter$_get_sanitizationConfig_$ref_ydarb0(), null);
|
|
152
|
-
return tmp0.
|
|
152
|
+
return tmp0.l1();
|
|
153
153
|
}
|
|
154
154
|
function sanitize($this, _this__u8e3s4) {
|
|
155
155
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
156
|
-
var this_0 = split(_this__u8e3s4.
|
|
156
|
+
var this_0 = split(_this__u8e3s4.l1(), ['.', ' ']);
|
|
157
157
|
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
158
158
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
159
159
|
var index = 0;
|
|
@@ -162,7 +162,7 @@ function sanitize($this, _this__u8e3s4) {
|
|
|
162
162
|
var item = _iterator__ex2g4s.v();
|
|
163
163
|
var _unary__edvuaz = index;
|
|
164
164
|
index = _unary__edvuaz + 1 | 0;
|
|
165
|
-
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.
|
|
165
|
+
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.er(item) : item;
|
|
166
166
|
destination.x(tmp$ret$0);
|
|
167
167
|
}
|
|
168
168
|
// Inline function 'kotlin.text.filter' call
|
|
@@ -210,7 +210,7 @@ function sanitizeFirstIsDigit($this, _this__u8e3s4) {
|
|
|
210
210
|
return tmp;
|
|
211
211
|
}
|
|
212
212
|
function sanitizeKeywords($this, _this__u8e3s4) {
|
|
213
|
-
return Companion_getInstance_0().
|
|
213
|
+
return Companion_getInstance_0().l20_1.u1(_this__u8e3s4) ? addBackticks(_this__u8e3s4) : _this__u8e3s4;
|
|
214
214
|
}
|
|
215
215
|
function sanitizeSymbol($this, _this__u8e3s4) {
|
|
216
216
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
@@ -223,7 +223,7 @@ function sanitizeSymbol($this, _this__u8e3s4) {
|
|
|
223
223
|
var item = _iterator__ex2g4s.v();
|
|
224
224
|
var _unary__edvuaz = index;
|
|
225
225
|
index = _unary__edvuaz + 1 | 0;
|
|
226
|
-
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.
|
|
226
|
+
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.er(item) : item;
|
|
227
227
|
destination.x(tmp$ret$0);
|
|
228
228
|
}
|
|
229
229
|
// Inline function 'kotlin.text.filter' call
|
|
@@ -250,7 +250,7 @@ function sanitizeEnum($this, _this__u8e3s4) {
|
|
|
250
250
|
}
|
|
251
251
|
function Companion() {
|
|
252
252
|
Companion_instance_2 = this;
|
|
253
|
-
this.
|
|
253
|
+
this.l20_1 = setOf(['abstract', 'case', 'class', 'def', 'do', 'else', 'extends', 'false', 'final', 'for', 'forSome', 'if', 'implicit', 'import', 'lazy', 'match', 'new', 'null', 'object', 'override', 'package', 'private', 'protected', 'return', 'sealed', 'super', 'this', 'throw', 'trait', 'true', 'try', 'type', 'val', 'var', 'while', 'with', 'yield', 'given', 'using', 'enum', 'export', 'then']);
|
|
254
254
|
}
|
|
255
255
|
var Companion_instance_2;
|
|
256
256
|
function Companion_getInstance_0() {
|
|
@@ -263,13 +263,13 @@ function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda(it) {
|
|
|
263
263
|
}
|
|
264
264
|
function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0) {
|
|
265
265
|
return function (name) {
|
|
266
|
-
var sanitized = name.
|
|
266
|
+
var sanitized = name.l1h_1.a1() > 1 ? name.q1m() : sanitizeSymbol(this$0, name.j1j());
|
|
267
267
|
return new Name(listOf(sanitized));
|
|
268
268
|
};
|
|
269
269
|
}
|
|
270
270
|
function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0) {
|
|
271
271
|
return function (name) {
|
|
272
|
-
return new Name(listOf(sanitizeSymbol(this$0, name.
|
|
272
|
+
return new Name(listOf(sanitizeSymbol(this$0, name.q1m())));
|
|
273
273
|
};
|
|
274
274
|
}
|
|
275
275
|
function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_2(this$0) {
|
|
@@ -282,28 +282,28 @@ function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
282
282
|
var tmp;
|
|
283
283
|
var tmp_0;
|
|
284
284
|
if (stmt instanceof FunctionCall) {
|
|
285
|
-
tmp_0 = stmt.
|
|
285
|
+
tmp_0 = stmt.z1m_1.j1j() === 'validate';
|
|
286
286
|
} else {
|
|
287
287
|
tmp_0 = false;
|
|
288
288
|
}
|
|
289
289
|
if (tmp_0) {
|
|
290
|
-
tmp = transformChildren(stmt.
|
|
290
|
+
tmp = transformChildren(stmt.d1n(VOID, emptyList()), tr);
|
|
291
291
|
} else {
|
|
292
292
|
if (stmt instanceof ConstructorStatement) {
|
|
293
|
-
var tmp_1 = tr.
|
|
293
|
+
var tmp_1 = tr.x1u(stmt.r1n_1);
|
|
294
294
|
// Inline function 'kotlin.collections.map' call
|
|
295
|
-
var this_0 = stmt.
|
|
295
|
+
var this_0 = stmt.s1n_1;
|
|
296
296
|
// Inline function 'kotlin.collections.mapTo' call
|
|
297
297
|
var destination = ArrayList_init_$Create$(this_0.a1());
|
|
298
298
|
// Inline function 'kotlin.collections.iterator' call
|
|
299
|
-
var _iterator__ex2g4s = this_0.
|
|
299
|
+
var _iterator__ex2g4s = this_0.j1().t();
|
|
300
300
|
while (_iterator__ex2g4s.u()) {
|
|
301
301
|
var item = _iterator__ex2g4s.v();
|
|
302
302
|
// Inline function 'kotlin.collections.component1' call
|
|
303
|
-
var name = item.
|
|
303
|
+
var name = item.k1();
|
|
304
304
|
// Inline function 'kotlin.collections.component2' call
|
|
305
|
-
var expr = item.
|
|
306
|
-
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), name), tr.
|
|
305
|
+
var expr = item.l1();
|
|
306
|
+
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), name), tr.a1v(expr));
|
|
307
307
|
destination.x(tmp$ret$3);
|
|
308
308
|
}
|
|
309
309
|
tmp = new ConstructorStatement(tmp_1, toMap(destination));
|
|
@@ -316,7 +316,7 @@ function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
316
316
|
}
|
|
317
317
|
function ScalaIrEmitter$sanitizationConfig$delegate$lambda(this$0) {
|
|
318
318
|
return function () {
|
|
319
|
-
var tmp = Companion_getInstance_0().
|
|
319
|
+
var tmp = Companion_getInstance_0().l20_1;
|
|
320
320
|
var tmp_0 = ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda;
|
|
321
321
|
var tmp_1 = ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0);
|
|
322
322
|
var tmp_2 = ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0);
|
|
@@ -330,21 +330,21 @@ function ScalaIrEmitter$_get_sanitizationConfig_$ref_ydarb0() {
|
|
|
330
330
|
};
|
|
331
331
|
}
|
|
332
332
|
function ScalaIrEmitter$emitShared$lambda($this$struct) {
|
|
333
|
-
$this$struct.
|
|
334
|
-
$this$struct.
|
|
333
|
+
$this$struct.u1k(Custom_init_$Create$('PathSegment'));
|
|
334
|
+
$this$struct.p1k('value', String_instance);
|
|
335
335
|
return Unit_instance;
|
|
336
336
|
}
|
|
337
337
|
function ScalaIrEmitter$emitShared$lambda_0($this$struct) {
|
|
338
|
-
$this$struct.
|
|
339
|
-
$this$struct.
|
|
340
|
-
$this$struct.
|
|
338
|
+
$this$struct.u1k(Custom_init_$Create$('PathSegment'));
|
|
339
|
+
$this$struct.p1k('name', String_instance);
|
|
340
|
+
$this$struct.p1k('type', Reflect_instance);
|
|
341
341
|
return Unit_instance;
|
|
342
342
|
}
|
|
343
343
|
function ScalaIrEmitter$emitShared$lambda_1(element, transformer) {
|
|
344
344
|
var tmp;
|
|
345
345
|
if (element instanceof File) {
|
|
346
346
|
// Inline function 'kotlin.collections.partition' call
|
|
347
|
-
var this_0 = element.
|
|
347
|
+
var this_0 = element.v1n_1;
|
|
348
348
|
var first = ArrayList_init_$Create$_0();
|
|
349
349
|
var second = ArrayList_init_$Create$_0();
|
|
350
350
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -357,9 +357,9 @@ function ScalaIrEmitter$emitShared$lambda_1(element, transformer) {
|
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
359
|
var _destruct__k2r9zo = new Pair(first, second);
|
|
360
|
-
var packageElements = _destruct__k2r9zo.
|
|
361
|
-
var rest = _destruct__k2r9zo.
|
|
362
|
-
tmp = element.
|
|
360
|
+
var packageElements = _destruct__k2r9zo.ve();
|
|
361
|
+
var rest = _destruct__k2r9zo.we();
|
|
362
|
+
tmp = element.y1n(VOID, plus(packageElements, rest));
|
|
363
363
|
} else {
|
|
364
364
|
tmp = element;
|
|
365
365
|
}
|
|
@@ -371,12 +371,12 @@ function ScalaIrEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
371
371
|
if (element instanceof Namespace) {
|
|
372
372
|
var tmp$ret$0;
|
|
373
373
|
$l$block: {
|
|
374
|
-
if (!element.
|
|
374
|
+
if (!element.a1o_1.equals(Companion_getInstance().n1h('Wirespec'))) {
|
|
375
375
|
tmp$ret$0 = element;
|
|
376
376
|
break $l$block;
|
|
377
377
|
}
|
|
378
378
|
// Inline function 'kotlin.collections.flatMap' call
|
|
379
|
-
var tmp0 = element.
|
|
379
|
+
var tmp0 = element.b1o_1;
|
|
380
380
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
381
381
|
var destination = ArrayList_init_$Create$_0();
|
|
382
382
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -388,14 +388,14 @@ function ScalaIrEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
388
388
|
if (!(element_0 instanceof Interface)) {
|
|
389
389
|
tmp_0 = true;
|
|
390
390
|
} else {
|
|
391
|
-
tmp_0 = !setOf(['Request', 'Response']).
|
|
391
|
+
tmp_0 = !setOf(['Request', 'Response']).u1(element_0.o1o_1.y1i());
|
|
392
392
|
}
|
|
393
393
|
if (tmp_0) {
|
|
394
394
|
tmp$ret$1 = listOf(element_0);
|
|
395
395
|
break $l$block_2;
|
|
396
396
|
}
|
|
397
397
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
398
|
-
var tmp0_0 = element_0.
|
|
398
|
+
var tmp0_0 = element_0.p1o_1;
|
|
399
399
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
400
400
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
401
401
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
@@ -411,7 +411,7 @@ function ScalaIrEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
411
411
|
var _iterator__ex2g4s_1 = destination_0.t();
|
|
412
412
|
while (_iterator__ex2g4s_1.u()) {
|
|
413
413
|
var element_2 = _iterator__ex2g4s_1.v();
|
|
414
|
-
if (element_2.
|
|
414
|
+
if (element_2.o1o_1.y1i() === 'Headers') {
|
|
415
415
|
tmp$ret$5 = element_2;
|
|
416
416
|
break $l$block_1;
|
|
417
417
|
}
|
|
@@ -427,9 +427,9 @@ function ScalaIrEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
427
427
|
tmp_1 = tmp0_elvis_lhs;
|
|
428
428
|
}
|
|
429
429
|
var nestedHeaders = tmp_1;
|
|
430
|
-
var tmp_2 = new Namespace(element_0.
|
|
430
|
+
var tmp_2 = new Namespace(element_0.o1o_1, listOf(nestedHeaders));
|
|
431
431
|
// Inline function 'kotlin.collections.filter' call
|
|
432
|
-
var tmp0_1 = element_0.
|
|
432
|
+
var tmp0_1 = element_0.p1o_1;
|
|
433
433
|
// Inline function 'kotlin.collections.filterTo' call
|
|
434
434
|
var destination_1 = ArrayList_init_$Create$_0();
|
|
435
435
|
var _iterator__ex2g4s_2 = tmp0_1.t();
|
|
@@ -437,7 +437,7 @@ function ScalaIrEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
437
437
|
var element_3 = _iterator__ex2g4s_2.v();
|
|
438
438
|
var tmp_3;
|
|
439
439
|
if (element_3 instanceof Interface) {
|
|
440
|
-
tmp_3 = element_3.
|
|
440
|
+
tmp_3 = element_3.o1o_1.y1i() === 'Headers';
|
|
441
441
|
} else {
|
|
442
442
|
tmp_3 = false;
|
|
443
443
|
}
|
|
@@ -447,28 +447,28 @@ function ScalaIrEmitter$emitShared$lambda_2(element, transformer) {
|
|
|
447
447
|
}
|
|
448
448
|
var tmp_4 = destination_1;
|
|
449
449
|
// Inline function 'kotlin.collections.map' call
|
|
450
|
-
var this_0 = element_0.
|
|
450
|
+
var this_0 = element_0.t1o_1;
|
|
451
451
|
// Inline function 'kotlin.collections.mapTo' call
|
|
452
452
|
var destination_2 = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
453
453
|
var _iterator__ex2g4s_3 = this_0.t();
|
|
454
454
|
while (_iterator__ex2g4s_3.u()) {
|
|
455
455
|
var item = _iterator__ex2g4s_3.v();
|
|
456
456
|
var tmp_5;
|
|
457
|
-
if (item.
|
|
458
|
-
tmp_5 = item.
|
|
457
|
+
if (item.b1q_1.j1j() === 'headers') {
|
|
458
|
+
tmp_5 = item.f1q(VOID, Custom_init_$Create$(element_0.o1o_1.y1i() + '.Headers'));
|
|
459
459
|
} else {
|
|
460
460
|
tmp_5 = item;
|
|
461
461
|
}
|
|
462
462
|
var tmp$ret$9 = tmp_5;
|
|
463
463
|
destination_2.x(tmp$ret$9);
|
|
464
464
|
}
|
|
465
|
-
tmp$ret$1 = listOf_0([tmp_2, element_0.
|
|
465
|
+
tmp$ret$1 = listOf_0([tmp_2, element_0.v1o(VOID, tmp_4, VOID, VOID, VOID, destination_2)]);
|
|
466
466
|
}
|
|
467
467
|
var list = tmp$ret$1;
|
|
468
468
|
addAll(destination, list);
|
|
469
469
|
}
|
|
470
470
|
var newElements = destination;
|
|
471
|
-
tmp$ret$0 = element.
|
|
471
|
+
tmp$ret$0 = element.e1o(VOID, newElements);
|
|
472
472
|
}
|
|
473
473
|
tmp = tmp$ret$0;
|
|
474
474
|
} else {
|
|
@@ -481,11 +481,11 @@ function ScalaIrEmitter$emitShared$lambda_3($clientServer) {
|
|
|
481
481
|
return function (element, transformer) {
|
|
482
482
|
var tmp;
|
|
483
483
|
if (element instanceof Namespace) {
|
|
484
|
-
var injected = element.
|
|
484
|
+
var injected = element.a1o_1.equals(Companion_getInstance().n1h('Wirespec')) ? $clientServer : emptyList();
|
|
485
485
|
var tmp_0;
|
|
486
486
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
487
487
|
if (!injected.r()) {
|
|
488
|
-
tmp_0 = withElements(element, plus(element.
|
|
488
|
+
tmp_0 = withElements(element, plus(element.w1n(), injected));
|
|
489
489
|
} else {
|
|
490
490
|
tmp_0 = element;
|
|
491
491
|
}
|
|
@@ -515,30 +515,30 @@ function ScalaIrEmitter$emit$lambda(this$0) {
|
|
|
515
515
|
}
|
|
516
516
|
function ScalaIrEmitter(packageName, emitShared) {
|
|
517
517
|
Companion_getInstance_0();
|
|
518
|
-
packageName = packageName === VOID ? Companion_instance_0.
|
|
519
|
-
emitShared = emitShared === VOID ? Companion_instance_1.
|
|
520
|
-
this.
|
|
521
|
-
this.
|
|
522
|
-
this.
|
|
523
|
-
this.
|
|
524
|
-
this.
|
|
518
|
+
packageName = packageName === VOID ? Companion_instance_0.cs('community.flock.wirespec.generated') : packageName;
|
|
519
|
+
emitShared = emitShared === VOID ? Companion_instance_1.wo() : emitShared;
|
|
520
|
+
this.f20_1 = packageName;
|
|
521
|
+
this.g20_1 = emitShared;
|
|
522
|
+
this.h20_1 = ScalaGenerator_getInstance();
|
|
523
|
+
this.i20_1 = FileExtension_Scala_getInstance();
|
|
524
|
+
this.j20_1 = listOf_0([import_0('community.flock.wirespec.scala', 'Wirespec'), import_0('scala.reflect', 'ClassTag')]);
|
|
525
525
|
var tmp = this;
|
|
526
|
-
tmp.
|
|
526
|
+
tmp.k20_1 = lazy(ScalaIrEmitter$sanitizationConfig$delegate$lambda(this));
|
|
527
527
|
}
|
|
528
|
-
protoOf(ScalaIrEmitter).
|
|
529
|
-
return this.
|
|
528
|
+
protoOf(ScalaIrEmitter).r1w = function () {
|
|
529
|
+
return this.f20_1;
|
|
530
530
|
};
|
|
531
|
-
protoOf(ScalaIrEmitter).
|
|
532
|
-
return this.
|
|
531
|
+
protoOf(ScalaIrEmitter).s1v = function () {
|
|
532
|
+
return this.h20_1;
|
|
533
533
|
};
|
|
534
|
-
protoOf(ScalaIrEmitter).
|
|
535
|
-
return this.
|
|
534
|
+
protoOf(ScalaIrEmitter).uq = function () {
|
|
535
|
+
return this.i20_1;
|
|
536
536
|
};
|
|
537
|
-
protoOf(ScalaIrEmitter).
|
|
538
|
-
ScalaGenerator_getInstance().
|
|
537
|
+
protoOf(ScalaIrEmitter).x1v = function (allFiles) {
|
|
538
|
+
ScalaGenerator_getInstance().e1w(allFiles);
|
|
539
539
|
};
|
|
540
|
-
protoOf(ScalaIrEmitter).
|
|
541
|
-
var packageName = Companion_instance_0.
|
|
540
|
+
protoOf(ScalaIrEmitter).v1v = function () {
|
|
541
|
+
var packageName = Companion_instance_0.cs('community.flock.wirespec.scala');
|
|
542
542
|
var tmp = interface_0('PathSegment', true);
|
|
543
543
|
var tmp_0 = struct('Literal', ScalaIrEmitter$emitShared$lambda);
|
|
544
544
|
var pathSegmentTypes = listOf_0([tmp, tmp_0, struct('Param', ScalaIrEmitter$emitShared$lambda_0)]);
|
|
@@ -552,12 +552,12 @@ protoOf(ScalaIrEmitter).b1z = function () {
|
|
|
552
552
|
var tmp_1;
|
|
553
553
|
var tmp_2;
|
|
554
554
|
if (item instanceof Interface) {
|
|
555
|
-
tmp_2 = setOf(['Client', 'Server']).
|
|
555
|
+
tmp_2 = setOf(['Client', 'Server']).u1(item.o1o_1.y1i());
|
|
556
556
|
} else {
|
|
557
557
|
tmp_2 = false;
|
|
558
558
|
}
|
|
559
559
|
if (tmp_2) {
|
|
560
|
-
tmp_1 = item.
|
|
560
|
+
tmp_1 = item.v1o(VOID, VOID, VOID, VOID, VOID, plus_0(item.t1o_1, new Field(Companion_getInstance().n1h('pathSegments'), new Array_0(Custom_init_$Create$('PathSegment')))));
|
|
561
561
|
} else {
|
|
562
562
|
tmp_1 = item;
|
|
563
563
|
}
|
|
@@ -571,58 +571,58 @@ protoOf(ScalaIrEmitter).b1z = function () {
|
|
|
571
571
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
572
572
|
var tmp_3 = scope;
|
|
573
573
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
574
|
-
var this_2 = scope.
|
|
574
|
+
var this_2 = scope.f1v_1;
|
|
575
575
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
576
576
|
// Inline function 'kotlin.apply' call
|
|
577
577
|
var this_3 = new TransformerBuilder();
|
|
578
|
-
this_3.
|
|
579
|
-
var tmp$ret$5 = this_3.
|
|
580
|
-
tmp_3.
|
|
578
|
+
this_3.w1i(ScalaIrEmitter$emitShared$lambda_1);
|
|
579
|
+
var tmp$ret$5 = this_3.x1i();
|
|
580
|
+
tmp_3.f1v_1 = transform(this_2, tmp$ret$5);
|
|
581
581
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
582
582
|
var tmp_4 = scope;
|
|
583
583
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
584
|
-
var this_4 = scope.
|
|
584
|
+
var this_4 = scope.f1v_1;
|
|
585
585
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
586
586
|
// Inline function 'kotlin.apply' call
|
|
587
587
|
var this_5 = new TransformerBuilder();
|
|
588
|
-
this_5.
|
|
589
|
-
var tmp$ret$10 = this_5.
|
|
590
|
-
tmp_4.
|
|
588
|
+
this_5.w1i(ScalaIrEmitter$emitShared$lambda_2);
|
|
589
|
+
var tmp$ret$10 = this_5.x1i();
|
|
590
|
+
tmp_4.f1v_1 = transform(this_4, tmp$ret$10);
|
|
591
591
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.injectAfter' call
|
|
592
592
|
var tmp_5 = scope;
|
|
593
593
|
// Inline function 'community.flock.wirespec.ir.core.injectAfter' call
|
|
594
594
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
595
|
-
var this_6 = scope.
|
|
595
|
+
var this_6 = scope.f1v_1;
|
|
596
596
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
597
597
|
// Inline function 'kotlin.apply' call
|
|
598
598
|
var this_7 = new TransformerBuilder();
|
|
599
|
-
this_7.
|
|
600
|
-
var tmp$ret$15 = this_7.
|
|
601
|
-
tmp_5.
|
|
602
|
-
var tmp_6 = scope.
|
|
599
|
+
this_7.w1i(ScalaIrEmitter$emitShared$lambda_3(clientServer));
|
|
600
|
+
var tmp$ret$15 = this_7.x1i();
|
|
601
|
+
tmp_5.f1v_1 = transform(this_6, tmp$ret$15);
|
|
602
|
+
var tmp_6 = scope.f1v_1;
|
|
603
603
|
var wirespecShared = isInterface(tmp_6, Element) ? tmp_6 : THROW_CCE();
|
|
604
604
|
var tmp_7;
|
|
605
|
-
if (this.
|
|
606
|
-
tmp_7 = wirespecShared.
|
|
605
|
+
if (this.g20_1.xo_1) {
|
|
606
|
+
tmp_7 = wirespecShared.y1n(Companion_getInstance().n1h(packageName.fs() + 'Wirespec'));
|
|
607
607
|
} else {
|
|
608
608
|
tmp_7 = null;
|
|
609
609
|
}
|
|
610
610
|
return tmp_7;
|
|
611
611
|
};
|
|
612
|
-
protoOf(ScalaIrEmitter).
|
|
612
|
+
protoOf(ScalaIrEmitter).lr = function (definition, module_0, logger) {
|
|
613
613
|
var file = emit.call(this, definition, module_0, logger);
|
|
614
614
|
// Inline function 'kotlin.takeIf' call
|
|
615
|
-
var this_0 = this.
|
|
615
|
+
var this_0 = this.j20_1;
|
|
616
616
|
var tmp;
|
|
617
|
-
if (Companion_instance.
|
|
617
|
+
if (Companion_instance.hr(module_0)) {
|
|
618
618
|
tmp = this_0;
|
|
619
619
|
} else {
|
|
620
620
|
tmp = null;
|
|
621
621
|
}
|
|
622
622
|
var tmp$ret$1 = tmp;
|
|
623
|
-
return placeInPackage(prependImports(file, tmp$ret$1), this.
|
|
623
|
+
return placeInPackage(prependImports(file, tmp$ret$1), this.r1w(), definition);
|
|
624
624
|
};
|
|
625
|
-
protoOf(ScalaIrEmitter).
|
|
625
|
+
protoOf(ScalaIrEmitter).z1v = function (definition, module_0) {
|
|
626
626
|
var tmp;
|
|
627
627
|
if (definition instanceof Type) {
|
|
628
628
|
tmp = convertToGenerator_2(definition, module_0);
|
|
@@ -643,7 +643,7 @@ protoOf(ScalaIrEmitter).f1z = function (definition, module_0) {
|
|
|
643
643
|
}
|
|
644
644
|
var generatorFile = tmp;
|
|
645
645
|
var sanitized = sanitizeNames(generatorFile, _get_sanitizationConfig__sns434(this));
|
|
646
|
-
var generatorOwnName = definition.
|
|
646
|
+
var generatorOwnName = definition.mr().l1() + 'Generator';
|
|
647
647
|
var tmp_0 = asSequence(collectCustomTypeNames(sanitized));
|
|
648
648
|
var tmp_1 = filterNot(tmp_0, ScalaIrEmitter$emitGenerator$lambda);
|
|
649
649
|
var tmp_2 = filterNot(tmp_1, ScalaIrEmitter$emitGenerator$lambda_0(generatorOwnName));
|
|
@@ -664,27 +664,27 @@ protoOf(ScalaIrEmitter).f1z = function (definition, module_0) {
|
|
|
664
664
|
var _iterator__ex2g4s_0 = destination.t();
|
|
665
665
|
while (_iterator__ex2g4s_0.u()) {
|
|
666
666
|
var item = _iterator__ex2g4s_0.v();
|
|
667
|
-
var tmp$ret$3 = import_0(this.
|
|
667
|
+
var tmp$ret$3 = import_0(this.r1w().ds_1 + '.model', item);
|
|
668
668
|
destination_0.x(tmp$ret$3);
|
|
669
669
|
}
|
|
670
670
|
var modelImports = destination_0;
|
|
671
|
-
return placeInPackage_0(prependImports(sanitized, plus(this.
|
|
671
|
+
return placeInPackage_0(prependImports(sanitized, plus(this.j20_1, modelImports)), this.r1w(), 'generator');
|
|
672
672
|
};
|
|
673
|
-
protoOf(ScalaIrEmitter).
|
|
673
|
+
protoOf(ScalaIrEmitter).kq = function (type, module_0) {
|
|
674
674
|
return ensureEmptyStructHasConstructor(sanitizeNames(convertWithValidation(type, module_0), _get_sanitizationConfig__sns434(this)));
|
|
675
675
|
};
|
|
676
|
-
protoOf(ScalaIrEmitter).
|
|
676
|
+
protoOf(ScalaIrEmitter).zr = function (enum_0, module_0) {
|
|
677
677
|
var tmp = sanitizeNames(convert_0(enum_0), _get_sanitizationConfig__sns434(this));
|
|
678
678
|
return injectEnumLabelField(tmp, ScalaIrEmitter$emit$lambda(this));
|
|
679
679
|
};
|
|
680
|
-
protoOf(ScalaIrEmitter).
|
|
680
|
+
protoOf(ScalaIrEmitter).pr = function (union) {
|
|
681
681
|
return sanitizeNames(convert_1(union), _get_sanitizationConfig__sns434(this));
|
|
682
682
|
};
|
|
683
|
-
protoOf(ScalaIrEmitter).
|
|
683
|
+
protoOf(ScalaIrEmitter).ur = function (refined) {
|
|
684
684
|
var file = sanitizeNames(convert_2(refined), _get_sanitizationConfig__sns434(this));
|
|
685
685
|
// Inline function 'community.flock.wirespec.ir.core.findElement' call
|
|
686
686
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
687
|
-
var tmp0 = file.
|
|
687
|
+
var tmp0 = file.w1n();
|
|
688
688
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
689
689
|
var destination = ArrayList_init_$Create$_0();
|
|
690
690
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -696,12 +696,12 @@ protoOf(ScalaIrEmitter).bv = function (refined) {
|
|
|
696
696
|
}
|
|
697
697
|
var tmp$ret$2 = firstOrNull_0(destination);
|
|
698
698
|
var updatedStruct = convertToStringCallsToFieldAccess(markMembersAsOverride(ensureNotNull(tmp$ret$2)));
|
|
699
|
-
return new File(Companion_getInstance().
|
|
699
|
+
return new File(Companion_getInstance().n1h(sanitize(this, refined.sr_1)), listOf(updatedStruct));
|
|
700
700
|
};
|
|
701
|
-
protoOf(ScalaIrEmitter).
|
|
701
|
+
protoOf(ScalaIrEmitter).as = function (endpoint) {
|
|
702
702
|
// Inline function 'community.flock.wirespec.ir.core.findElement' call
|
|
703
703
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
704
|
-
var tmp0 = convert_3(endpoint).
|
|
704
|
+
var tmp0 = convert_3(endpoint).w1n();
|
|
705
705
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
706
706
|
var destination = ArrayList_init_$Create$_0();
|
|
707
707
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -713,11 +713,10 @@ protoOf(ScalaIrEmitter).hv = function (endpoint) {
|
|
|
713
713
|
}
|
|
714
714
|
var tmp$ret$2 = firstOrNull_0(destination);
|
|
715
715
|
var endpointNamespace = ensureNotNull(tmp$ret$2);
|
|
716
|
-
var
|
|
717
|
-
var
|
|
718
|
-
var tmp = sanitizeNames(new File(Companion_getInstance().u1k(sanitize(this, endpoint.ct_1)), listOf(body)), _get_sanitizationConfig__sns434(this));
|
|
716
|
+
var body = appendClientServerObjects(injectHandleFunction(endpointNamespace), endpoint, isRequestObject(endpointNamespace));
|
|
717
|
+
var tmp = sanitizeNames(new File(Companion_getInstance().n1h(sanitize(this, endpoint.up_1)), listOf(body)), _get_sanitizationConfig__sns434(this));
|
|
719
718
|
// Inline function 'kotlin.takeIf' call
|
|
720
|
-
var this_0 = buildModelImports(endpoint, this.
|
|
719
|
+
var this_0 = buildModelImports(endpoint, this.r1w());
|
|
721
720
|
var tmp_0;
|
|
722
721
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
723
722
|
if (!this_0.r()) {
|
|
@@ -728,10 +727,10 @@ protoOf(ScalaIrEmitter).hv = function (endpoint) {
|
|
|
728
727
|
var tmp$ret$5 = tmp_0;
|
|
729
728
|
return prependImports(tmp, tmp$ret$5);
|
|
730
729
|
};
|
|
731
|
-
protoOf(ScalaIrEmitter).
|
|
730
|
+
protoOf(ScalaIrEmitter).or = function (channel) {
|
|
732
731
|
var tmp = sanitizeNames(convert_4(channel), _get_sanitizationConfig__sns434(this));
|
|
733
732
|
// Inline function 'kotlin.takeIf' call
|
|
734
|
-
var this_0 = buildModelImports(channel, this.
|
|
733
|
+
var this_0 = buildModelImports(channel, this.r1w());
|
|
735
734
|
var tmp_0;
|
|
736
735
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
737
736
|
if (!this_0.r()) {
|
|
@@ -742,25 +741,25 @@ protoOf(ScalaIrEmitter).vu = function (channel) {
|
|
|
742
741
|
var tmp$ret$2 = tmp_0;
|
|
743
742
|
return prependImports(tmp, tmp$ret$2);
|
|
744
743
|
};
|
|
745
|
-
protoOf(ScalaIrEmitter).
|
|
746
|
-
var imports = buildModelImports(endpoint, this.
|
|
747
|
-
var endpointImport = import_0(this.
|
|
744
|
+
protoOf(ScalaIrEmitter).y1v = function (endpoint) {
|
|
745
|
+
var imports = buildModelImports(endpoint, this.r1w());
|
|
746
|
+
var endpointImport = import_0(this.r1w().ds_1 + '.endpoint', endpoint.up_1.l1());
|
|
748
747
|
var file = addIdentityTypeToCall(sanitizeNames(emitEndpointClient.call(this, endpoint), _get_sanitizationConfig__sns434(this)));
|
|
749
|
-
var subPackageName = plus_1(this.
|
|
750
|
-
var tmp = Companion_getInstance().
|
|
748
|
+
var subPackageName = plus_1(this.r1w(), 'client');
|
|
749
|
+
var tmp = Companion_getInstance().n1h(subPackageName.fs() + file.u1n_1.y1i());
|
|
751
750
|
// Inline function 'kotlin.collections.buildList' call
|
|
752
751
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
753
752
|
// Inline function 'kotlin.apply' call
|
|
754
753
|
var this_0 = ArrayList_init_$Create$_0();
|
|
755
|
-
this_0.x(new Package(subPackageName.
|
|
756
|
-
this_0.
|
|
757
|
-
this_0.
|
|
754
|
+
this_0.x(new Package(subPackageName.ds_1));
|
|
755
|
+
this_0.f1(this.j20_1);
|
|
756
|
+
this_0.f1(imports);
|
|
758
757
|
this_0.x(endpointImport);
|
|
759
|
-
this_0.
|
|
760
|
-
var tmp$ret$3 = this_0.
|
|
758
|
+
this_0.f1(file.v1n_1);
|
|
759
|
+
var tmp$ret$3 = this_0.o5();
|
|
761
760
|
return new File(tmp, tmp$ret$3);
|
|
762
761
|
};
|
|
763
|
-
protoOf(ScalaIrEmitter).
|
|
762
|
+
protoOf(ScalaIrEmitter).w1v = function (endpoints, logger) {
|
|
764
763
|
// Inline function 'kotlin.collections.flatMap' call
|
|
765
764
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
766
765
|
var destination = ArrayList_init_$Create$_0();
|
|
@@ -776,7 +775,7 @@ protoOf(ScalaIrEmitter).c1z = function (endpoints, logger) {
|
|
|
776
775
|
var _iterator__ex2g4s_0 = destination.t();
|
|
777
776
|
while (_iterator__ex2g4s_0.u()) {
|
|
778
777
|
var e = _iterator__ex2g4s_0.v();
|
|
779
|
-
var key = e.
|
|
778
|
+
var key = e.bv_1;
|
|
780
779
|
if (set.x(key)) {
|
|
781
780
|
list_0.x(e);
|
|
782
781
|
}
|
|
@@ -787,7 +786,7 @@ protoOf(ScalaIrEmitter).c1z = function (endpoints, logger) {
|
|
|
787
786
|
var _iterator__ex2g4s_1 = list_0.t();
|
|
788
787
|
while (_iterator__ex2g4s_1.u()) {
|
|
789
788
|
var item = _iterator__ex2g4s_1.v();
|
|
790
|
-
var tmp$ret$5 = import_0(this.
|
|
789
|
+
var tmp$ret$5 = import_0(this.r1w().ds_1 + '.model', item.bv_1);
|
|
791
790
|
destination_0.x(tmp$ret$5);
|
|
792
791
|
}
|
|
793
792
|
var imports = destination_0;
|
|
@@ -797,7 +796,7 @@ protoOf(ScalaIrEmitter).c1z = function (endpoints, logger) {
|
|
|
797
796
|
var _iterator__ex2g4s_2 = endpoints.t();
|
|
798
797
|
while (_iterator__ex2g4s_2.u()) {
|
|
799
798
|
var item_0 = _iterator__ex2g4s_2.v();
|
|
800
|
-
var tmp$ret$8 = import_0(this.
|
|
799
|
+
var tmp$ret$8 = import_0(this.r1w().ds_1 + '.endpoint', item_0.up_1.l1());
|
|
801
800
|
destination_1.x(tmp$ret$8);
|
|
802
801
|
}
|
|
803
802
|
var endpointImports = destination_1;
|
|
@@ -807,38 +806,38 @@ protoOf(ScalaIrEmitter).c1z = function (endpoints, logger) {
|
|
|
807
806
|
var _iterator__ex2g4s_3 = endpoints.t();
|
|
808
807
|
while (_iterator__ex2g4s_3.u()) {
|
|
809
808
|
var item_1 = _iterator__ex2g4s_3.v();
|
|
810
|
-
var tmp$ret$11 = import_0(this.
|
|
809
|
+
var tmp$ret$11 = import_0(this.r1w().ds_1 + '.client', item_1.up_1.l1() + 'Client');
|
|
811
810
|
destination_2.x(tmp$ret$11);
|
|
812
811
|
}
|
|
813
812
|
var clientImports = destination_2;
|
|
814
813
|
var allImports = plus(plus(imports, endpointImports), clientImports);
|
|
815
814
|
var file = addIdentityTypeToCall(sanitizeNames(emitClient.call(this, endpoints, logger), _get_sanitizationConfig__sns434(this)));
|
|
816
|
-
var tmp = Companion_getInstance().
|
|
815
|
+
var tmp = Companion_getInstance().n1h(this.r1w().fs() + file.u1n_1.y1i());
|
|
817
816
|
// Inline function 'kotlin.collections.buildList' call
|
|
818
817
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
819
818
|
// Inline function 'kotlin.apply' call
|
|
820
819
|
var this_0 = ArrayList_init_$Create$_0();
|
|
821
|
-
this_0.x(new Package(this.
|
|
822
|
-
this_0.
|
|
823
|
-
this_0.
|
|
824
|
-
this_0.
|
|
825
|
-
var tmp$ret$17 = this_0.
|
|
820
|
+
this_0.x(new Package(this.r1w().ds_1));
|
|
821
|
+
this_0.f1(this.j20_1);
|
|
822
|
+
this_0.f1(allImports);
|
|
823
|
+
this_0.f1(file.v1n_1);
|
|
824
|
+
var tmp$ret$17 = this_0.o5();
|
|
826
825
|
return new File(tmp, tmp$ret$17);
|
|
827
826
|
};
|
|
828
827
|
function convertToStringCallsToFieldAccess(_this__u8e3s4) {
|
|
829
828
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
830
829
|
var scope = new TransformScope(_this__u8e3s4);
|
|
831
|
-
scope.
|
|
832
|
-
var tmp = scope.
|
|
830
|
+
scope.n1v(convertToStringCallsToFieldAccess$lambda);
|
|
831
|
+
var tmp = scope.f1v_1;
|
|
833
832
|
return isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
834
833
|
}
|
|
835
834
|
function appendClientServerObjects(_this__u8e3s4, endpoint, requestIsObject) {
|
|
836
835
|
var reqType = requestIsObject ? 'Request.type' : 'Request';
|
|
837
|
-
var pathTemplate = '/' + joinToString(endpoint.
|
|
838
|
-
var pathSegmentsCode = joinToString(endpoint.
|
|
839
|
-
var clientObject = raw(trimMargin('\n |object Client extends Wirespec.Client[' + reqType + ', Response[?]] {\n | override val pathTemplate: String = "' + pathTemplate + '"\n | override val method: String = "' + endpoint.
|
|
840
|
-
var serverObject = raw(trimMargin('\n |object Server extends Wirespec.Server[' + reqType + ', Response[?]] {\n | override val pathTemplate: String = "' + pathTemplate + '"\n | override val method: String = "' + endpoint.
|
|
841
|
-
return _this__u8e3s4.
|
|
836
|
+
var pathTemplate = '/' + joinToString(endpoint.wp_1, '/', VOID, VOID, VOID, VOID, appendClientServerObjects$lambda);
|
|
837
|
+
var pathSegmentsCode = joinToString(endpoint.wp_1, ', ', VOID, VOID, VOID, VOID, appendClientServerObjects$lambda_0);
|
|
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.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 '));
|
|
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.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 '));
|
|
840
|
+
return _this__u8e3s4.e1o(VOID, plus_0(plus_0(_this__u8e3s4.b1o_1, clientObject), serverObject));
|
|
842
841
|
}
|
|
843
842
|
function injectHandleFunction(_this__u8e3s4) {
|
|
844
843
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
@@ -846,19 +845,19 @@ function injectHandleFunction(_this__u8e3s4) {
|
|
|
846
845
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
847
846
|
var tmp = scope;
|
|
848
847
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
849
|
-
var this_0 = scope.
|
|
848
|
+
var this_0 = scope.f1v_1;
|
|
850
849
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
851
850
|
// Inline function 'kotlin.apply' call
|
|
852
851
|
var this_1 = new TransformerBuilder();
|
|
853
|
-
this_1.
|
|
854
|
-
var tmp$ret$2 = this_1.
|
|
855
|
-
tmp.
|
|
856
|
-
var tmp_0 = scope.
|
|
852
|
+
this_1.w1i(injectHandleFunction$lambda);
|
|
853
|
+
var tmp$ret$2 = this_1.x1i();
|
|
854
|
+
tmp.f1v_1 = transform(this_0, tmp$ret$2);
|
|
855
|
+
var tmp_0 = scope.f1v_1;
|
|
857
856
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
858
857
|
}
|
|
859
858
|
function isRequestObject(namespace) {
|
|
860
859
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
861
|
-
var tmp0 = namespace.
|
|
860
|
+
var tmp0 = namespace.b1o_1;
|
|
862
861
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
863
862
|
var destination = ArrayList_init_$Create$_0();
|
|
864
863
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -874,7 +873,7 @@ function isRequestObject(namespace) {
|
|
|
874
873
|
var _iterator__ex2g4s_0 = destination.t();
|
|
875
874
|
while (_iterator__ex2g4s_0.u()) {
|
|
876
875
|
var element_0 = _iterator__ex2g4s_0.v();
|
|
877
|
-
if (element_0.
|
|
876
|
+
if (element_0.f1o_1.y1i() === 'Request') {
|
|
878
877
|
tmp$ret$3 = element_0;
|
|
879
878
|
break $l$block;
|
|
880
879
|
}
|
|
@@ -889,7 +888,7 @@ function isRequestObject(namespace) {
|
|
|
889
888
|
tmp = tmp0_elvis_lhs;
|
|
890
889
|
}
|
|
891
890
|
var requestStruct = tmp;
|
|
892
|
-
return requestStruct.
|
|
891
|
+
return requestStruct.h1o_1.a1() === 1 && single(requestStruct.h1o_1).o1r_1.r() || (requestStruct.g1o_1.r() && requestStruct.h1o_1.r());
|
|
893
892
|
}
|
|
894
893
|
function buildModelImports(_this__u8e3s4, packageName) {
|
|
895
894
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
@@ -899,7 +898,7 @@ function buildModelImports(_this__u8e3s4, packageName) {
|
|
|
899
898
|
var _iterator__ex2g4s = this_0.t();
|
|
900
899
|
while (_iterator__ex2g4s.u()) {
|
|
901
900
|
var e = _iterator__ex2g4s.v();
|
|
902
|
-
var key = e.
|
|
901
|
+
var key = e.bv_1;
|
|
903
902
|
if (set.x(key)) {
|
|
904
903
|
list.x(e);
|
|
905
904
|
}
|
|
@@ -910,7 +909,7 @@ function buildModelImports(_this__u8e3s4, packageName) {
|
|
|
910
909
|
var _iterator__ex2g4s_0 = list.t();
|
|
911
910
|
while (_iterator__ex2g4s_0.u()) {
|
|
912
911
|
var item = _iterator__ex2g4s_0.v();
|
|
913
|
-
var tmp$ret$2 = import_0(packageName.
|
|
912
|
+
var tmp$ret$2 = import_0(packageName.ds_1 + '.model', Companion_getInstance().n1h(item.bv_1).y1i());
|
|
914
913
|
destination.x(tmp$ret$2);
|
|
915
914
|
}
|
|
916
915
|
return destination;
|
|
@@ -921,29 +920,29 @@ function addIdentityTypeToCall(_this__u8e3s4) {
|
|
|
921
920
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
922
921
|
var tmp = scope;
|
|
923
922
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
924
|
-
var this_0 = scope.
|
|
923
|
+
var this_0 = scope.f1v_1;
|
|
925
924
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
926
925
|
// Inline function 'kotlin.apply' call
|
|
927
926
|
var this_1 = new TransformerBuilder();
|
|
928
|
-
this_1.
|
|
929
|
-
var tmp$ret$2 = this_1.
|
|
930
|
-
tmp.
|
|
931
|
-
var tmp_0 = scope.
|
|
927
|
+
this_1.w1i(addIdentityTypeToCall$lambda);
|
|
928
|
+
var tmp$ret$2 = this_1.x1i();
|
|
929
|
+
tmp.f1v_1 = transform(this_0, tmp$ret$2);
|
|
930
|
+
var tmp_0 = scope.f1v_1;
|
|
932
931
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
933
932
|
}
|
|
934
933
|
function toScalaTypeName(_this__u8e3s4) {
|
|
935
934
|
var tmp;
|
|
936
935
|
if (_this__u8e3s4 instanceof Primitive) {
|
|
937
|
-
var t = _this__u8e3s4.
|
|
936
|
+
var t = _this__u8e3s4.fv_1;
|
|
938
937
|
var tmp_0;
|
|
939
938
|
if (t instanceof String_0) {
|
|
940
939
|
tmp_0 = 'String';
|
|
941
940
|
} else {
|
|
942
941
|
if (t instanceof Integer) {
|
|
943
|
-
tmp_0 = t.
|
|
942
|
+
tmp_0 = t.ju_1.equals(Precision_P32_getInstance()) ? 'Int' : 'Long';
|
|
944
943
|
} else {
|
|
945
944
|
if (t instanceof Number_0) {
|
|
946
|
-
tmp_0 = t.
|
|
945
|
+
tmp_0 = t.mu_1.equals(Precision_P32_getInstance()) ? 'Float' : 'Double';
|
|
947
946
|
} else {
|
|
948
947
|
if (equals(t, Boolean_instance)) {
|
|
949
948
|
tmp_0 = 'Boolean';
|
|
@@ -960,13 +959,13 @@ function toScalaTypeName(_this__u8e3s4) {
|
|
|
960
959
|
tmp = tmp_0;
|
|
961
960
|
} else {
|
|
962
961
|
if (_this__u8e3s4 instanceof Custom) {
|
|
963
|
-
tmp = _this__u8e3s4.
|
|
962
|
+
tmp = _this__u8e3s4.bv_1;
|
|
964
963
|
} else {
|
|
965
964
|
if (_this__u8e3s4 instanceof Iterable) {
|
|
966
|
-
tmp = 'List[' + toScalaTypeName(_this__u8e3s4.
|
|
965
|
+
tmp = 'List[' + toScalaTypeName(_this__u8e3s4.po_1) + ']';
|
|
967
966
|
} else {
|
|
968
967
|
if (_this__u8e3s4 instanceof Dict) {
|
|
969
|
-
tmp = 'Map[String, ' + toScalaTypeName(_this__u8e3s4.
|
|
968
|
+
tmp = 'Map[String, ' + toScalaTypeName(_this__u8e3s4.so_1) + ']';
|
|
970
969
|
} else {
|
|
971
970
|
if (_this__u8e3s4 instanceof Any) {
|
|
972
971
|
tmp = 'Any';
|
|
@@ -982,32 +981,32 @@ function toScalaTypeName(_this__u8e3s4) {
|
|
|
982
981
|
}
|
|
983
982
|
}
|
|
984
983
|
var base = tmp;
|
|
985
|
-
return _this__u8e3s4.
|
|
984
|
+
return _this__u8e3s4.tu() ? 'Option[' + base + ']' : base;
|
|
986
985
|
}
|
|
987
986
|
function convertToStringCallsToFieldAccess$lambda(expr, tr) {
|
|
988
987
|
var tmp;
|
|
989
988
|
var tmp_0;
|
|
990
989
|
var tmp_1;
|
|
991
990
|
if (expr instanceof FunctionCall) {
|
|
992
|
-
tmp_1 = expr.
|
|
991
|
+
tmp_1 = expr.z1m_1.q1m() === 'toString';
|
|
993
992
|
} else {
|
|
994
993
|
tmp_1 = false;
|
|
995
994
|
}
|
|
996
995
|
if (tmp_1) {
|
|
997
|
-
tmp_0 = !(expr.
|
|
996
|
+
tmp_0 = !(expr.x1m_1 == null);
|
|
998
997
|
} else {
|
|
999
998
|
tmp_0 = false;
|
|
1000
999
|
}
|
|
1001
1000
|
if (tmp_0) {
|
|
1002
|
-
var tmp0_safe_receiver = expr.
|
|
1001
|
+
var tmp0_safe_receiver = expr.x1m_1;
|
|
1003
1002
|
var tmp_2;
|
|
1004
1003
|
if (tmp0_safe_receiver == null) {
|
|
1005
1004
|
tmp_2 = null;
|
|
1006
1005
|
} else {
|
|
1007
1006
|
// Inline function 'kotlin.let' call
|
|
1008
|
-
tmp_2 = tr.
|
|
1007
|
+
tmp_2 = tr.a1v(tmp0_safe_receiver);
|
|
1009
1008
|
}
|
|
1010
|
-
tmp = new FieldCall(tmp_2, Companion_getInstance().
|
|
1009
|
+
tmp = new FieldCall(tmp_2, Companion_getInstance().n1h('toString'));
|
|
1011
1010
|
} else {
|
|
1012
1011
|
tmp = transformChildren_1(expr, tr);
|
|
1013
1012
|
}
|
|
@@ -1016,10 +1015,10 @@ function convertToStringCallsToFieldAccess$lambda(expr, tr) {
|
|
|
1016
1015
|
function appendClientServerObjects$lambda(it) {
|
|
1017
1016
|
var tmp;
|
|
1018
1017
|
if (it instanceof Literal) {
|
|
1019
|
-
tmp = it.
|
|
1018
|
+
tmp = it.xq_1;
|
|
1020
1019
|
} else {
|
|
1021
1020
|
if (it instanceof Param) {
|
|
1022
|
-
tmp = '{' + it.
|
|
1021
|
+
tmp = '{' + it.bq_1.l1() + '}';
|
|
1023
1022
|
} else {
|
|
1024
1023
|
noWhenBranchMatchedException();
|
|
1025
1024
|
}
|
|
@@ -1029,10 +1028,10 @@ function appendClientServerObjects$lambda(it) {
|
|
|
1029
1028
|
function appendClientServerObjects$lambda_0(segment) {
|
|
1030
1029
|
var tmp;
|
|
1031
1030
|
if (segment instanceof Literal) {
|
|
1032
|
-
tmp = 'Wirespec.Literal("' + segment.
|
|
1031
|
+
tmp = 'Wirespec.Literal("' + segment.xq_1 + '")';
|
|
1033
1032
|
} else {
|
|
1034
1033
|
if (segment instanceof Param) {
|
|
1035
|
-
tmp = 'Wirespec.Param("' + segment.
|
|
1034
|
+
tmp = 'Wirespec.Param("' + segment.bq_1.l1() + '", scala.reflect.classTag[' + toScalaTypeName(segment.cq_1) + '])';
|
|
1036
1035
|
} else {
|
|
1037
1036
|
noWhenBranchMatchedException();
|
|
1038
1037
|
}
|
|
@@ -1044,13 +1043,13 @@ function injectHandleFunction$lambda(element, transformer) {
|
|
|
1044
1043
|
if (element instanceof Interface) {
|
|
1045
1044
|
var tmp$ret$0;
|
|
1046
1045
|
$l$block: {
|
|
1047
|
-
if (!element.
|
|
1046
|
+
if (!element.o1o_1.equals(Companion_getInstance().n1h('Handler')) && !element.o1o_1.equals(Companion_getInstance().n1h('Call'))) {
|
|
1048
1047
|
tmp$ret$0 = element;
|
|
1049
1048
|
break $l$block;
|
|
1050
1049
|
}
|
|
1051
|
-
var tmp0_typeParameters = listOf(new TypeParameter(
|
|
1050
|
+
var tmp0_typeParameters = listOf(new TypeParameter(Custom_init_$Create$('F[_]')));
|
|
1052
1051
|
// Inline function 'kotlin.collections.map' call
|
|
1053
|
-
var this_0 = element.
|
|
1052
|
+
var this_0 = element.p1o_1;
|
|
1054
1053
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1055
1054
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1056
1055
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -1061,22 +1060,22 @@ function injectHandleFunction$lambda(element, transformer) {
|
|
|
1061
1060
|
if (tmp0_safe_receiver == null) {
|
|
1062
1061
|
tmp_0 = null;
|
|
1063
1062
|
} else {
|
|
1064
|
-
var tmp1_safe_receiver = item.
|
|
1063
|
+
var tmp1_safe_receiver = item.g1l_1;
|
|
1065
1064
|
var tmp_1;
|
|
1066
1065
|
if (tmp1_safe_receiver == null) {
|
|
1067
1066
|
tmp_1 = null;
|
|
1068
1067
|
} else {
|
|
1069
1068
|
// Inline function 'kotlin.let' call
|
|
1070
|
-
tmp_1 =
|
|
1069
|
+
tmp_1 = Custom_init_$Create$('F', listOf(tmp1_safe_receiver));
|
|
1071
1070
|
}
|
|
1072
1071
|
var tmp3_returnType = tmp_1;
|
|
1073
|
-
tmp_0 = tmp0_safe_receiver.
|
|
1072
|
+
tmp_0 = tmp0_safe_receiver.l1l(VOID, VOID, VOID, tmp3_returnType, VOID, false);
|
|
1074
1073
|
}
|
|
1075
1074
|
var tmp4_elvis_lhs = tmp_0;
|
|
1076
1075
|
var tmp$ret$3 = tmp4_elvis_lhs == null ? item : tmp4_elvis_lhs;
|
|
1077
1076
|
destination.x(tmp$ret$3);
|
|
1078
1077
|
}
|
|
1079
|
-
tmp$ret$0 = element.
|
|
1078
|
+
tmp$ret$0 = element.v1o(VOID, destination, VOID, VOID, tmp0_typeParameters);
|
|
1080
1079
|
}
|
|
1081
1080
|
tmp = tmp$ret$0;
|
|
1082
1081
|
} else {
|
|
@@ -1089,7 +1088,7 @@ function addIdentityTypeToCall$lambda(element, transformer) {
|
|
|
1089
1088
|
var tmp;
|
|
1090
1089
|
if (element instanceof Struct) {
|
|
1091
1090
|
// Inline function 'kotlin.collections.map' call
|
|
1092
|
-
var this_0 = element.
|
|
1091
|
+
var this_0 = element.i1o_1;
|
|
1093
1092
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1094
1093
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1095
1094
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -1102,7 +1101,7 @@ function addIdentityTypeToCall$lambda(element, transformer) {
|
|
|
1102
1101
|
} else {
|
|
1103
1102
|
// Inline function 'kotlin.takeIf' call
|
|
1104
1103
|
var tmp_1;
|
|
1105
|
-
if (endsWith(tmp0_safe_receiver.
|
|
1104
|
+
if (endsWith(tmp0_safe_receiver.h1j_1.y1i(), '.Call')) {
|
|
1106
1105
|
tmp_1 = tmp0_safe_receiver;
|
|
1107
1106
|
} else {
|
|
1108
1107
|
tmp_1 = null;
|
|
@@ -1110,11 +1109,11 @@ function addIdentityTypeToCall$lambda(element, transformer) {
|
|
|
1110
1109
|
tmp_0 = tmp_1;
|
|
1111
1110
|
}
|
|
1112
1111
|
var tmp1_safe_receiver = tmp_0;
|
|
1113
|
-
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
1112
|
+
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.l1n(VOID, listOf(Custom_init_$Create$('[A] =>> A')));
|
|
1114
1113
|
var tmp$ret$2 = tmp2_elvis_lhs == null ? item : tmp2_elvis_lhs;
|
|
1115
1114
|
destination.x(tmp$ret$2);
|
|
1116
1115
|
}
|
|
1117
|
-
tmp = element.
|
|
1116
|
+
tmp = element.m1o(VOID, VOID, VOID, destination);
|
|
1118
1117
|
} else {
|
|
1119
1118
|
tmp = element;
|
|
1120
1119
|
}
|
|
@@ -1122,8 +1121,8 @@ function addIdentityTypeToCall$lambda(element, transformer) {
|
|
|
1122
1121
|
return transformChildren_0(transformed, transformer);
|
|
1123
1122
|
}
|
|
1124
1123
|
//region block: post-declaration
|
|
1125
|
-
protoOf(ScalaIrEmitter).
|
|
1126
|
-
protoOf(ScalaIrEmitter).
|
|
1124
|
+
protoOf(ScalaIrEmitter).eo = emit_0;
|
|
1125
|
+
protoOf(ScalaIrEmitter).u1v = emit_1;
|
|
1127
1126
|
//endregion
|
|
1128
1127
|
//region block: exports
|
|
1129
1128
|
export {
|