@flock/wirespec 0.18.0-RC.1 → 0.18.1-RC.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/arrow-arrow-atomic.mjs +12 -12
- package/arrow-arrow-core.mjs +152 -158
- package/arrow-arrow-core.mjs.map +1 -1
- package/clikt-clikt-mordant.mjs +80 -80
- package/clikt-clikt.mjs +1442 -1442
- package/clikt-clikt.mjs.map +1 -1
- package/colormath-root-colormath.mjs +439 -439
- package/kotlin-kotlin-stdlib.mjs +1067 -1131
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +4857 -4857
- package/kotlin-rgxgen.mjs +1793 -1793
- package/kotlinx-io-kotlinx-io-core.mjs +415 -415
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +1752 -1752
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1348 -1356
- package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/mordant-mordant.mjs +1303 -1311
- package/mordant-mordant.mjs.map +1 -1
- package/package.json +1 -1
- package/wirespec-src-compiler-core.mjs +1527 -1527
- package/wirespec-src-compiler-emitters-java.mjs +477 -451
- package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-kotlin.mjs +413 -408
- package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-python.mjs +379 -378
- package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-rust.mjs +939 -725
- package/wirespec-src-compiler-emitters-rust.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-scala.mjs +225 -233
- package/wirespec-src-compiler-emitters-scala.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-typescript.mjs +558 -589
- 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 +3738 -3708
- package/wirespec-src-compiler-ir.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +418 -418
- package/wirespec-src-converter-avro.mjs +506 -506
- package/wirespec-src-converter-openapi.mjs +684 -684
- package/wirespec-src-plugin-arguments.mjs +181 -181
- package/wirespec-src-plugin-cli.mjs +106 -106
- package/wirespec-src-plugin-npm.mjs +36 -36
- package/wirespec-src-tools-generator.mjs +34 -34
|
@@ -43,12 +43,12 @@ import {
|
|
|
43
43
|
} from './kotlin-kotlin-stdlib.mjs';
|
|
44
44
|
import {
|
|
45
45
|
Package2tniq694j1763 as Package,
|
|
46
|
-
|
|
47
|
-
Importdjdfxu3pjkxa as Import,
|
|
46
|
+
import5uhkz67bd8tt as import_0,
|
|
48
47
|
File3dimy4iqmuock as File,
|
|
49
48
|
transformChildrend9p91tpcqdkx as transformChildren,
|
|
50
49
|
Interface3pn84xq686t2r as Interface,
|
|
51
50
|
Namespace345pal554qu3j as Namespace,
|
|
51
|
+
Custom2si7lto3wompr as Custom,
|
|
52
52
|
Companion_getInstance3gvtuyxc9uhxj as Companion_getInstance,
|
|
53
53
|
withElements2toq84v08e72 as withElements,
|
|
54
54
|
TransformScopeyrd3lf4zrk76 as TransformScope,
|
|
@@ -59,18 +59,16 @@ import {
|
|
|
59
59
|
rawttvqxl50flj9 as raw,
|
|
60
60
|
Nameoqr8dt2fim9d as Name,
|
|
61
61
|
transformChildren2mszeagj5nq4c as transformChildren_0,
|
|
62
|
-
|
|
62
|
+
sanitizeFieldName1ptgy1kxy8u2m as sanitizeFieldName,
|
|
63
63
|
ConstructorStatement1x4n4sr59iy4n as ConstructorStatement,
|
|
64
64
|
FunctionCall30872kpnbr7op as FunctionCall,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
buildClientServerInterfaces2363tdgi9w3me as buildClientServerInterfaces,
|
|
65
|
+
SanitizationConfig11mmn3p2c03c1 as SanitizationConfig,
|
|
66
|
+
convertClientServer3s89ijty7q130 as convertClientServer,
|
|
68
67
|
convert13xvfhgrf57n5 as convert,
|
|
69
68
|
generateScala1gu01ibz2u66l as generateScala,
|
|
70
69
|
RawElement2yts1x2rbem1g as RawElement,
|
|
71
70
|
Constructor3io4sluuia3gk as Constructor,
|
|
72
|
-
|
|
73
|
-
withLabelField22w2j91tp01o3 as withLabelField,
|
|
71
|
+
withLabelField33ehya4zusm70 as withLabelField,
|
|
74
72
|
Enumlszg09mwd24f as Enum,
|
|
75
73
|
transformChildren3n5cjwmxlhwx9 as transformChildren_1,
|
|
76
74
|
FieldCall1iz7z2fx2xo4p as FieldCall,
|
|
@@ -80,9 +78,10 @@ import {
|
|
|
80
78
|
emit3bzdcd0f6nwtj as emit,
|
|
81
79
|
withSharedSource1qgrajaccojj3 as withSharedSource,
|
|
82
80
|
emitn3eihixilqyh as emit_0,
|
|
83
|
-
|
|
81
|
+
prependImports32gcj3yb8voha as prependImports,
|
|
82
|
+
placeInPackage1ffljbk9me4ug as placeInPackage,
|
|
84
83
|
convertWithValidation3ar3nbcqsbkpn as convertWithValidation,
|
|
85
|
-
|
|
84
|
+
sanitizeNames2wqmyf8vafp9x as sanitizeNames,
|
|
86
85
|
convert11ert2po54h1y as convert_0,
|
|
87
86
|
convert37aabdzvtv9vg as convert_1,
|
|
88
87
|
convert17zcptkz4mhr4 as convert_2,
|
|
@@ -118,7 +117,7 @@ function ScalaIrEmitter$shared$o$source$lambda(element, transformer) {
|
|
|
118
117
|
var tmp;
|
|
119
118
|
if (element instanceof File) {
|
|
120
119
|
// Inline function 'kotlin.collections.partition' call
|
|
121
|
-
var this_0 = element.
|
|
120
|
+
var this_0 = element.u1m_1;
|
|
122
121
|
var first = ArrayList_init_$Create$();
|
|
123
122
|
var second = ArrayList_init_$Create$();
|
|
124
123
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -131,9 +130,9 @@ function ScalaIrEmitter$shared$o$source$lambda(element, transformer) {
|
|
|
131
130
|
}
|
|
132
131
|
}
|
|
133
132
|
var _destruct__k2r9zo = new Pair(first, second);
|
|
134
|
-
var packageElements = _destruct__k2r9zo.
|
|
135
|
-
var rest = _destruct__k2r9zo.
|
|
136
|
-
tmp = element.
|
|
133
|
+
var packageElements = _destruct__k2r9zo.ne();
|
|
134
|
+
var rest = _destruct__k2r9zo.oe();
|
|
135
|
+
tmp = element.x1m(VOID, plus_0(plus(packageElements, import_0('scala.reflect', 'ClassTag')), rest));
|
|
137
136
|
} else {
|
|
138
137
|
tmp = element;
|
|
139
138
|
}
|
|
@@ -144,9 +143,9 @@ function ScalaIrEmitter$shared$o$source$lambda_0(element, transformer) {
|
|
|
144
143
|
var tmp;
|
|
145
144
|
if (element instanceof Namespace) {
|
|
146
145
|
var tmp_0;
|
|
147
|
-
if (element.
|
|
146
|
+
if (element.z1m_1.equals(Companion_getInstance().m1h('Wirespec'))) {
|
|
148
147
|
// Inline function 'kotlin.collections.flatMap' call
|
|
149
|
-
var tmp0 = element.
|
|
148
|
+
var tmp0 = element.a1n_1;
|
|
150
149
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
151
150
|
var destination = ArrayList_init_$Create$();
|
|
152
151
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -155,13 +154,13 @@ function ScalaIrEmitter$shared$o$source$lambda_0(element, transformer) {
|
|
|
155
154
|
var tmp_1;
|
|
156
155
|
var tmp_2;
|
|
157
156
|
if (element_0 instanceof Interface) {
|
|
158
|
-
tmp_2 = setOf(['Request', 'Response']).
|
|
157
|
+
tmp_2 = setOf(['Request', 'Response']).u1(element_0.m1o_1.x1l());
|
|
159
158
|
} else {
|
|
160
159
|
tmp_2 = false;
|
|
161
160
|
}
|
|
162
161
|
if (tmp_2) {
|
|
163
162
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
164
|
-
var tmp0_0 = element_0.
|
|
163
|
+
var tmp0_0 = element_0.n1o_1;
|
|
165
164
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
166
165
|
var destination_0 = ArrayList_init_$Create$();
|
|
167
166
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
@@ -177,7 +176,7 @@ function ScalaIrEmitter$shared$o$source$lambda_0(element, transformer) {
|
|
|
177
176
|
var _iterator__ex2g4s_1 = destination_0.t();
|
|
178
177
|
while (_iterator__ex2g4s_1.u()) {
|
|
179
178
|
var element_2 = _iterator__ex2g4s_1.v();
|
|
180
|
-
if (element_2.
|
|
179
|
+
if (element_2.m1o_1.x1l() === 'Headers') {
|
|
181
180
|
tmp$ret$3 = element_2;
|
|
182
181
|
break $l$block;
|
|
183
182
|
}
|
|
@@ -187,9 +186,9 @@ function ScalaIrEmitter$shared$o$source$lambda_0(element, transformer) {
|
|
|
187
186
|
var nestedHeaders = tmp$ret$3;
|
|
188
187
|
var tmp_3;
|
|
189
188
|
if (!(nestedHeaders == null)) {
|
|
190
|
-
var tmp_4 = new Namespace(element_0.
|
|
189
|
+
var tmp_4 = new Namespace(element_0.m1o_1, listOf(nestedHeaders));
|
|
191
190
|
// Inline function 'kotlin.collections.filter' call
|
|
192
|
-
var tmp0_1 = element_0.
|
|
191
|
+
var tmp0_1 = element_0.n1o_1;
|
|
193
192
|
// Inline function 'kotlin.collections.filterTo' call
|
|
194
193
|
var destination_1 = ArrayList_init_$Create$();
|
|
195
194
|
var _iterator__ex2g4s_2 = tmp0_1.t();
|
|
@@ -197,7 +196,7 @@ function ScalaIrEmitter$shared$o$source$lambda_0(element, transformer) {
|
|
|
197
196
|
var element_3 = _iterator__ex2g4s_2.v();
|
|
198
197
|
var tmp_5;
|
|
199
198
|
if (element_3 instanceof Interface) {
|
|
200
|
-
tmp_5 = element_3.
|
|
199
|
+
tmp_5 = element_3.m1o_1.x1l() === 'Headers';
|
|
201
200
|
} else {
|
|
202
201
|
tmp_5 = false;
|
|
203
202
|
}
|
|
@@ -207,22 +206,22 @@ function ScalaIrEmitter$shared$o$source$lambda_0(element, transformer) {
|
|
|
207
206
|
}
|
|
208
207
|
var tmp_6 = destination_1;
|
|
209
208
|
// Inline function 'kotlin.collections.map' call
|
|
210
|
-
var this_0 = element_0.
|
|
209
|
+
var this_0 = element_0.r1o_1;
|
|
211
210
|
// Inline function 'kotlin.collections.mapTo' call
|
|
212
211
|
var destination_2 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
213
212
|
var _iterator__ex2g4s_3 = this_0.t();
|
|
214
213
|
while (_iterator__ex2g4s_3.u()) {
|
|
215
214
|
var item = _iterator__ex2g4s_3.v();
|
|
216
215
|
var tmp_7;
|
|
217
|
-
if (item.
|
|
218
|
-
tmp_7 = item.
|
|
216
|
+
if (item.m1n_1.s1h() === 'headers') {
|
|
217
|
+
tmp_7 = item.q1n(VOID, new Custom(element_0.m1o_1.x1l() + '.Headers'));
|
|
219
218
|
} else {
|
|
220
219
|
tmp_7 = item;
|
|
221
220
|
}
|
|
222
221
|
var tmp$ret$7 = tmp_7;
|
|
223
222
|
destination_2.x(tmp$ret$7);
|
|
224
223
|
}
|
|
225
|
-
tmp_3 = listOf_0([tmp_4, element_0.
|
|
224
|
+
tmp_3 = listOf_0([tmp_4, element_0.t1o(VOID, tmp_6, VOID, VOID, VOID, destination_2)]);
|
|
226
225
|
} else {
|
|
227
226
|
tmp_3 = listOf(element_0);
|
|
228
227
|
}
|
|
@@ -234,7 +233,7 @@ function ScalaIrEmitter$shared$o$source$lambda_0(element, transformer) {
|
|
|
234
233
|
addAll(destination, list);
|
|
235
234
|
}
|
|
236
235
|
var newElements = destination;
|
|
237
|
-
tmp_0 = element.
|
|
236
|
+
tmp_0 = element.d1n(VOID, newElements);
|
|
238
237
|
} else {
|
|
239
238
|
tmp_0 = element;
|
|
240
239
|
}
|
|
@@ -249,11 +248,11 @@ function ScalaIrEmitter$shared$o$source$lambda_1(this$0) {
|
|
|
249
248
|
return function (element, transformer) {
|
|
250
249
|
var tmp;
|
|
251
250
|
if (element instanceof Namespace) {
|
|
252
|
-
var injected = element.
|
|
251
|
+
var injected = element.z1m_1.equals(Companion_getInstance().m1h('Wirespec')) ? this$0.c20_1 : emptyList();
|
|
253
252
|
var tmp_0;
|
|
254
253
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
255
254
|
if (!injected.r()) {
|
|
256
|
-
tmp_0 = withElements(element, plus_0(element.
|
|
255
|
+
tmp_0 = withElements(element, plus_0(element.v1m(), injected));
|
|
257
256
|
} else {
|
|
258
257
|
tmp_0 = element;
|
|
259
258
|
}
|
|
@@ -266,15 +265,15 @@ function ScalaIrEmitter$shared$o$source$lambda_1(this$0) {
|
|
|
266
265
|
};
|
|
267
266
|
}
|
|
268
267
|
function _get_sanitizationConfig__sns434($this) {
|
|
269
|
-
var tmp0 = $this.
|
|
268
|
+
var tmp0 = $this.j20_1;
|
|
270
269
|
var tmp = KProperty1;
|
|
271
270
|
// Inline function 'kotlin.getValue' call
|
|
272
271
|
getPropertyCallableRef('sanitizationConfig', 1, tmp, ScalaIrEmitter$_get_sanitizationConfig_$ref_ydarb0(), null);
|
|
273
|
-
return tmp0.
|
|
272
|
+
return tmp0.l1();
|
|
274
273
|
}
|
|
275
274
|
function sanitize($this, _this__u8e3s4) {
|
|
276
275
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
277
|
-
var this_0 = split(_this__u8e3s4.
|
|
276
|
+
var this_0 = split(_this__u8e3s4.l1(), ['.', ' ']);
|
|
278
277
|
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
279
278
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
280
279
|
var index = 0;
|
|
@@ -283,7 +282,7 @@ function sanitize($this, _this__u8e3s4) {
|
|
|
283
282
|
var item = _iterator__ex2g4s.v();
|
|
284
283
|
var _unary__edvuaz = index;
|
|
285
284
|
index = _unary__edvuaz + 1 | 0;
|
|
286
|
-
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.
|
|
285
|
+
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.oq(item) : item;
|
|
287
286
|
destination.x(tmp$ret$0);
|
|
288
287
|
}
|
|
289
288
|
// Inline function 'kotlin.text.filter' call
|
|
@@ -331,7 +330,7 @@ function sanitizeFirstIsDigit($this, _this__u8e3s4) {
|
|
|
331
330
|
return tmp;
|
|
332
331
|
}
|
|
333
332
|
function sanitizeKeywords($this, _this__u8e3s4) {
|
|
334
|
-
return Companion_getInstance_0().
|
|
333
|
+
return Companion_getInstance_0().l20_1.u1(_this__u8e3s4) ? addBackticks(_this__u8e3s4) : _this__u8e3s4;
|
|
335
334
|
}
|
|
336
335
|
function sanitizeSymbol($this, _this__u8e3s4) {
|
|
337
336
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
@@ -344,7 +343,7 @@ function sanitizeSymbol($this, _this__u8e3s4) {
|
|
|
344
343
|
var item = _iterator__ex2g4s.v();
|
|
345
344
|
var _unary__edvuaz = index;
|
|
346
345
|
index = _unary__edvuaz + 1 | 0;
|
|
347
|
-
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.
|
|
346
|
+
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.oq(item) : item;
|
|
348
347
|
destination.x(tmp$ret$0);
|
|
349
348
|
}
|
|
350
349
|
// Inline function 'kotlin.text.filter' call
|
|
@@ -377,13 +376,21 @@ function buildImports($this, _this__u8e3s4) {
|
|
|
377
376
|
var _iterator__ex2g4s = this_0.t();
|
|
378
377
|
while (_iterator__ex2g4s.u()) {
|
|
379
378
|
var e = _iterator__ex2g4s.v();
|
|
380
|
-
var key = e.
|
|
379
|
+
var key = e.lu_1;
|
|
381
380
|
if (set.x(key)) {
|
|
382
381
|
list.x(e);
|
|
383
382
|
}
|
|
384
383
|
}
|
|
385
|
-
|
|
386
|
-
|
|
384
|
+
// Inline function 'kotlin.collections.map' call
|
|
385
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
386
|
+
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(list, 10));
|
|
387
|
+
var _iterator__ex2g4s_0 = list.t();
|
|
388
|
+
while (_iterator__ex2g4s_0.u()) {
|
|
389
|
+
var item = _iterator__ex2g4s_0.v();
|
|
390
|
+
var tmp$ret$2 = import_0($this.k1v().mr_1 + '.model', item.lu_1);
|
|
391
|
+
destination.x(tmp$ret$2);
|
|
392
|
+
}
|
|
393
|
+
return destination;
|
|
387
394
|
}
|
|
388
395
|
function addIdentityTypeToCall($this, _this__u8e3s4) {
|
|
389
396
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
@@ -391,19 +398,19 @@ function addIdentityTypeToCall($this, _this__u8e3s4) {
|
|
|
391
398
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
392
399
|
var tmp = scope;
|
|
393
400
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
394
|
-
var this_0 = scope.
|
|
401
|
+
var this_0 = scope.z1t_1;
|
|
395
402
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
396
403
|
// Inline function 'kotlin.apply' call
|
|
397
404
|
var this_1 = new TransformerBuilder();
|
|
398
|
-
this_1.
|
|
399
|
-
var tmp$ret$2 = this_1.
|
|
400
|
-
tmp.
|
|
401
|
-
var tmp_0 = scope.
|
|
405
|
+
this_1.d1h(ScalaIrEmitter$addIdentityTypeToCall$lambda);
|
|
406
|
+
var tmp$ret$2 = this_1.e1h();
|
|
407
|
+
tmp.z1t_1 = transform(this_0, tmp$ret$2);
|
|
408
|
+
var tmp_0 = scope.z1t_1;
|
|
402
409
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
403
410
|
}
|
|
404
411
|
function isRequestObject($this, namespace) {
|
|
405
412
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
406
|
-
var tmp0 = namespace.
|
|
413
|
+
var tmp0 = namespace.a1n_1;
|
|
407
414
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
408
415
|
var destination = ArrayList_init_$Create$();
|
|
409
416
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -419,7 +426,7 @@ function isRequestObject($this, namespace) {
|
|
|
419
426
|
var _iterator__ex2g4s_0 = destination.t();
|
|
420
427
|
while (_iterator__ex2g4s_0.u()) {
|
|
421
428
|
var element_0 = _iterator__ex2g4s_0.v();
|
|
422
|
-
if (element_0.
|
|
429
|
+
if (element_0.f1n_1.x1l() === 'Request') {
|
|
423
430
|
tmp$ret$3 = element_0;
|
|
424
431
|
break $l$block;
|
|
425
432
|
}
|
|
@@ -434,7 +441,7 @@ function isRequestObject($this, namespace) {
|
|
|
434
441
|
tmp = tmp0_elvis_lhs;
|
|
435
442
|
}
|
|
436
443
|
var requestStruct = tmp;
|
|
437
|
-
return requestStruct.
|
|
444
|
+
return requestStruct.h1n_1.a1() === 1 && single(requestStruct.h1n_1).r1n_1.r() || (requestStruct.g1n_1.r() && requestStruct.h1n_1.r());
|
|
438
445
|
}
|
|
439
446
|
function injectHandleFunction($this, _this__u8e3s4) {
|
|
440
447
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
@@ -442,26 +449,26 @@ function injectHandleFunction($this, _this__u8e3s4) {
|
|
|
442
449
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
443
450
|
var tmp = scope;
|
|
444
451
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
445
|
-
var this_0 = scope.
|
|
452
|
+
var this_0 = scope.z1t_1;
|
|
446
453
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
447
454
|
// Inline function 'kotlin.apply' call
|
|
448
455
|
var this_1 = new TransformerBuilder();
|
|
449
|
-
this_1.
|
|
450
|
-
var tmp$ret$2 = this_1.
|
|
451
|
-
tmp.
|
|
452
|
-
var tmp_0 = scope.
|
|
456
|
+
this_1.d1h(ScalaIrEmitter$injectHandleFunction$lambda);
|
|
457
|
+
var tmp$ret$2 = this_1.e1h();
|
|
458
|
+
tmp.z1t_1 = transform(this_0, tmp$ret$2);
|
|
459
|
+
var tmp_0 = scope.z1t_1;
|
|
453
460
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
454
461
|
}
|
|
455
462
|
function buildClientServerObjects($this, endpoint, requestIsObject, namespace) {
|
|
456
463
|
var reqType = requestIsObject ? 'Request.type' : 'Request';
|
|
457
|
-
var pathTemplate = '/' + joinToString(endpoint.
|
|
458
|
-
var clientObject = raw(trimMargin('\n |object Client extends Wirespec.Client[' + reqType + ', Response[?]] {\n | override val pathTemplate: String = "' + pathTemplate + '"\n | override val method: String = "' + endpoint.
|
|
459
|
-
var serverObject = raw(trimMargin('\n |object Server extends Wirespec.Server[' + reqType + ', Response[?]] {\n | override val pathTemplate: String = "' + pathTemplate + '"\n | override val method: String = "' + endpoint.
|
|
460
|
-
return namespace.
|
|
464
|
+
var pathTemplate = '/' + joinToString(endpoint.gp_1, '/', VOID, VOID, VOID, VOID, ScalaIrEmitter$buildClientServerObjects$lambda);
|
|
465
|
+
var clientObject = raw(trimMargin('\n |object Client extends Wirespec.Client[' + reqType + ', Response[?]] {\n | override val pathTemplate: String = "' + pathTemplate + '"\n | override val method: String = "' + endpoint.fp_1.toString() + '"\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 '));
|
|
466
|
+
var serverObject = raw(trimMargin('\n |object Server extends Wirespec.Server[' + reqType + ', Response[?]] {\n | override val pathTemplate: String = "' + pathTemplate + '"\n | override val method: String = "' + endpoint.fp_1.toString() + '"\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 '));
|
|
467
|
+
return namespace.d1n(VOID, plus(plus(namespace.a1n_1, clientObject), serverObject));
|
|
461
468
|
}
|
|
462
469
|
function Companion() {
|
|
463
470
|
Companion_instance_2 = this;
|
|
464
|
-
this.
|
|
471
|
+
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']);
|
|
465
472
|
}
|
|
466
473
|
var Companion_instance_2;
|
|
467
474
|
function Companion_getInstance_0() {
|
|
@@ -474,13 +481,13 @@ function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda(it) {
|
|
|
474
481
|
}
|
|
475
482
|
function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0) {
|
|
476
483
|
return function (name) {
|
|
477
|
-
var sanitized = name.
|
|
484
|
+
var sanitized = name.n1h_1.a1() > 1 ? name.r1l() : sanitizeSymbol(this$0, name.s1h());
|
|
478
485
|
return new Name(listOf(sanitized));
|
|
479
486
|
};
|
|
480
487
|
}
|
|
481
488
|
function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0) {
|
|
482
489
|
return function (name) {
|
|
483
|
-
return new Name(listOf(sanitizeSymbol(this$0, name.
|
|
490
|
+
return new Name(listOf(sanitizeSymbol(this$0, name.r1l())));
|
|
484
491
|
};
|
|
485
492
|
}
|
|
486
493
|
function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_2(this$0) {
|
|
@@ -493,28 +500,28 @@ function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
493
500
|
var tmp;
|
|
494
501
|
if (stmt instanceof FunctionCall) {
|
|
495
502
|
var tmp_0;
|
|
496
|
-
if (stmt.
|
|
497
|
-
tmp_0 = transformChildren_0(stmt.
|
|
503
|
+
if (stmt.b1m_1.s1h() === 'validate') {
|
|
504
|
+
tmp_0 = transformChildren_0(stmt.f1m(VOID, emptyList()), tr);
|
|
498
505
|
} else {
|
|
499
506
|
tmp_0 = transformChildren_0(stmt, tr);
|
|
500
507
|
}
|
|
501
508
|
tmp = tmp_0;
|
|
502
509
|
} else {
|
|
503
510
|
if (stmt instanceof ConstructorStatement) {
|
|
504
|
-
var tmp_1 = tr.
|
|
511
|
+
var tmp_1 = tr.r1t(stmt.p1m_1);
|
|
505
512
|
// Inline function 'kotlin.collections.map' call
|
|
506
|
-
var this_0 = stmt.
|
|
513
|
+
var this_0 = stmt.q1m_1;
|
|
507
514
|
// Inline function 'kotlin.collections.mapTo' call
|
|
508
515
|
var destination = ArrayList_init_$Create$_0(this_0.a1());
|
|
509
516
|
// Inline function 'kotlin.collections.iterator' call
|
|
510
|
-
var _iterator__ex2g4s = this_0.
|
|
517
|
+
var _iterator__ex2g4s = this_0.j1().t();
|
|
511
518
|
while (_iterator__ex2g4s.u()) {
|
|
512
519
|
var item = _iterator__ex2g4s.v();
|
|
513
520
|
// Inline function 'kotlin.collections.component1' call
|
|
514
|
-
var name = item.
|
|
521
|
+
var name = item.k1();
|
|
515
522
|
// Inline function 'kotlin.collections.component2' call
|
|
516
|
-
var expr = item.
|
|
517
|
-
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), name), tr.
|
|
523
|
+
var expr = item.l1();
|
|
524
|
+
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), name), tr.u1t(expr));
|
|
518
525
|
destination.x(tmp$ret$3);
|
|
519
526
|
}
|
|
520
527
|
tmp = new ConstructorStatement(tmp_1, toMap(destination));
|
|
@@ -527,7 +534,7 @@ function ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
527
534
|
}
|
|
528
535
|
function ScalaIrEmitter$sanitizationConfig$delegate$lambda(this$0) {
|
|
529
536
|
return function () {
|
|
530
|
-
var tmp = Companion_getInstance_0().
|
|
537
|
+
var tmp = Companion_getInstance_0().l20_1;
|
|
531
538
|
var tmp_0 = ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda;
|
|
532
539
|
var tmp_1 = ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0);
|
|
533
540
|
var tmp_2 = ScalaIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0);
|
|
@@ -541,59 +548,59 @@ function ScalaIrEmitter$_get_sanitizationConfig_$ref_ydarb0() {
|
|
|
541
548
|
};
|
|
542
549
|
}
|
|
543
550
|
function ScalaIrEmitter$shared$1() {
|
|
544
|
-
this.
|
|
545
|
-
this.
|
|
551
|
+
this.b20_1 = 'community.flock.wirespec.scala';
|
|
552
|
+
this.c20_1 = convertClientServer(new Shared(this.b20_1));
|
|
546
553
|
var tmp = this;
|
|
547
554
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
548
|
-
var this_0 = convert(new Shared(this.
|
|
555
|
+
var this_0 = convert(new Shared(this.b20_1));
|
|
549
556
|
var scope = new TransformScope(this_0);
|
|
550
557
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
551
558
|
var tmp_0 = scope;
|
|
552
559
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
553
|
-
var this_1 = scope.
|
|
560
|
+
var this_1 = scope.z1t_1;
|
|
554
561
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
555
562
|
// Inline function 'kotlin.apply' call
|
|
556
563
|
var this_2 = new TransformerBuilder();
|
|
557
|
-
this_2.
|
|
558
|
-
var tmp$ret$2 = this_2.
|
|
559
|
-
tmp_0.
|
|
564
|
+
this_2.d1h(ScalaIrEmitter$shared$o$source$lambda);
|
|
565
|
+
var tmp$ret$2 = this_2.e1h();
|
|
566
|
+
tmp_0.z1t_1 = transform(this_1, tmp$ret$2);
|
|
560
567
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
561
568
|
var tmp_1 = scope;
|
|
562
569
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
563
|
-
var this_3 = scope.
|
|
570
|
+
var this_3 = scope.z1t_1;
|
|
564
571
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
565
572
|
// Inline function 'kotlin.apply' call
|
|
566
573
|
var this_4 = new TransformerBuilder();
|
|
567
|
-
this_4.
|
|
568
|
-
var tmp$ret$7 = this_4.
|
|
569
|
-
tmp_1.
|
|
574
|
+
this_4.d1h(ScalaIrEmitter$shared$o$source$lambda_0);
|
|
575
|
+
var tmp$ret$7 = this_4.e1h();
|
|
576
|
+
tmp_1.z1t_1 = transform(this_3, tmp$ret$7);
|
|
570
577
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.injectAfter' call
|
|
571
578
|
var tmp_2 = scope;
|
|
572
579
|
// Inline function 'community.flock.wirespec.ir.core.injectAfter' call
|
|
573
580
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
574
|
-
var this_5 = scope.
|
|
581
|
+
var this_5 = scope.z1t_1;
|
|
575
582
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
576
583
|
// Inline function 'kotlin.apply' call
|
|
577
584
|
var this_6 = new TransformerBuilder();
|
|
578
|
-
this_6.
|
|
579
|
-
var tmp$ret$12 = this_6.
|
|
580
|
-
tmp_2.
|
|
581
|
-
var tmp_3 = scope.
|
|
585
|
+
this_6.d1h(ScalaIrEmitter$shared$o$source$lambda_1(this));
|
|
586
|
+
var tmp$ret$12 = this_6.e1h();
|
|
587
|
+
tmp_2.z1t_1 = transform(this_5, tmp$ret$12);
|
|
588
|
+
var tmp_3 = scope.z1t_1;
|
|
582
589
|
var tmp$ret$17 = isInterface(tmp_3, Element) ? tmp_3 : THROW_CCE();
|
|
583
|
-
tmp.
|
|
590
|
+
tmp.d20_1 = generateScala(tmp$ret$17);
|
|
584
591
|
}
|
|
585
|
-
protoOf(ScalaIrEmitter$shared$1).
|
|
586
|
-
return this.
|
|
592
|
+
protoOf(ScalaIrEmitter$shared$1).r1w = function () {
|
|
593
|
+
return this.d20_1;
|
|
587
594
|
};
|
|
588
595
|
function ScalaIrEmitter$emit$lambda(this$0) {
|
|
589
596
|
return function () {
|
|
590
|
-
return new File(Companion_getInstance().
|
|
597
|
+
return new File(Companion_getInstance().m1h(Companion_instance_0.lr('community.flock.wirespec.scala').or() + 'Wirespec'), listOf(new RawElement(this$0.t1v().r1w())));
|
|
591
598
|
};
|
|
592
599
|
}
|
|
593
600
|
function ScalaIrEmitter$emit$lambda_0(element, transformer) {
|
|
594
601
|
var tmp;
|
|
595
602
|
if (element instanceof Struct) {
|
|
596
|
-
tmp = element.
|
|
603
|
+
tmp = element.g1n_1.r() ? element.l1n(VOID, VOID, listOf(new Constructor(emptyList(), emptyList()))) : element;
|
|
597
604
|
} else {
|
|
598
605
|
tmp = element;
|
|
599
606
|
}
|
|
@@ -609,7 +616,7 @@ function ScalaIrEmitter$emit$lambda_1(this$0) {
|
|
|
609
616
|
return function (element, transformer) {
|
|
610
617
|
var tmp;
|
|
611
618
|
if (element instanceof Enum) {
|
|
612
|
-
tmp = withLabelField(element, ScalaIrEmitter$emit$lambda$lambda(this$0)
|
|
619
|
+
tmp = withLabelField(element, ScalaIrEmitter$emit$lambda$lambda(this$0));
|
|
613
620
|
} else {
|
|
614
621
|
tmp = element;
|
|
615
622
|
}
|
|
@@ -622,55 +629,35 @@ function ScalaIrEmitter$emit$lambda_2(expr, tr) {
|
|
|
622
629
|
var tmp_0;
|
|
623
630
|
var tmp_1;
|
|
624
631
|
if (expr instanceof FunctionCall) {
|
|
625
|
-
tmp_1 = expr.
|
|
632
|
+
tmp_1 = expr.b1m_1.r1l() === 'toString';
|
|
626
633
|
} else {
|
|
627
634
|
tmp_1 = false;
|
|
628
635
|
}
|
|
629
636
|
if (tmp_1) {
|
|
630
|
-
tmp_0 = !(expr.
|
|
637
|
+
tmp_0 = !(expr.z1l_1 == null);
|
|
631
638
|
} else {
|
|
632
639
|
tmp_0 = false;
|
|
633
640
|
}
|
|
634
641
|
if (tmp_0) {
|
|
635
|
-
var tmp0_safe_receiver = expr.
|
|
642
|
+
var tmp0_safe_receiver = expr.z1l_1;
|
|
636
643
|
var tmp_2;
|
|
637
644
|
if (tmp0_safe_receiver == null) {
|
|
638
645
|
tmp_2 = null;
|
|
639
646
|
} else {
|
|
640
647
|
// Inline function 'kotlin.let' call
|
|
641
|
-
tmp_2 = tr.
|
|
648
|
+
tmp_2 = tr.u1t(tmp0_safe_receiver);
|
|
642
649
|
}
|
|
643
|
-
tmp = new FieldCall(tmp_2, Companion_getInstance().
|
|
650
|
+
tmp = new FieldCall(tmp_2, Companion_getInstance().m1h('toString'));
|
|
644
651
|
} else {
|
|
645
652
|
tmp = transformChildren_1(expr, tr);
|
|
646
653
|
}
|
|
647
654
|
return tmp;
|
|
648
655
|
}
|
|
649
|
-
function ScalaIrEmitter$emitClient$lambda(this$0) {
|
|
650
|
-
return function (it) {
|
|
651
|
-
return 'import ' + this$0.l1v().or_1 + '.model.' + it.nu_1;
|
|
652
|
-
};
|
|
653
|
-
}
|
|
654
|
-
function ScalaIrEmitter$emitClient$lambda_0(this$0) {
|
|
655
|
-
return function (it) {
|
|
656
|
-
return 'import ' + this$0.l1v().or_1 + '.endpoint.' + it.gp_1.n1();
|
|
657
|
-
};
|
|
658
|
-
}
|
|
659
|
-
function ScalaIrEmitter$emitClient$lambda_1(this$0) {
|
|
660
|
-
return function (it) {
|
|
661
|
-
return 'import ' + this$0.l1v().or_1 + '.client.' + it.gp_1.n1() + 'Client';
|
|
662
|
-
};
|
|
663
|
-
}
|
|
664
|
-
function ScalaIrEmitter$buildImports$lambda(this$0) {
|
|
665
|
-
return function (it) {
|
|
666
|
-
return 'import ' + this$0.l1v().or_1 + '.model.' + it.nu_1;
|
|
667
|
-
};
|
|
668
|
-
}
|
|
669
656
|
function ScalaIrEmitter$addIdentityTypeToCall$lambda(element, transformer) {
|
|
670
657
|
var tmp;
|
|
671
658
|
if (element instanceof Struct) {
|
|
672
659
|
// Inline function 'kotlin.collections.map' call
|
|
673
|
-
var this_0 = element.
|
|
660
|
+
var this_0 = element.i1n_1;
|
|
674
661
|
// Inline function 'kotlin.collections.mapTo' call
|
|
675
662
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
676
663
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -679,19 +666,19 @@ function ScalaIrEmitter$addIdentityTypeToCall$lambda(element, transformer) {
|
|
|
679
666
|
var tmp_0;
|
|
680
667
|
var tmp_1;
|
|
681
668
|
if (item instanceof Custom) {
|
|
682
|
-
tmp_1 = endsWith(item.
|
|
669
|
+
tmp_1 = endsWith(item.q1h_1, '.Call');
|
|
683
670
|
} else {
|
|
684
671
|
tmp_1 = false;
|
|
685
672
|
}
|
|
686
673
|
if (tmp_1) {
|
|
687
|
-
tmp_0 = item.
|
|
674
|
+
tmp_0 = item.n1m(VOID, listOf(new Custom('[A] =>> A')));
|
|
688
675
|
} else {
|
|
689
676
|
tmp_0 = item;
|
|
690
677
|
}
|
|
691
678
|
var tmp$ret$0 = tmp_0;
|
|
692
679
|
destination.x(tmp$ret$0);
|
|
693
680
|
}
|
|
694
|
-
tmp = element.
|
|
681
|
+
tmp = element.l1n(VOID, VOID, VOID, destination);
|
|
695
682
|
} else {
|
|
696
683
|
tmp = element;
|
|
697
684
|
}
|
|
@@ -702,10 +689,10 @@ function ScalaIrEmitter$injectHandleFunction$lambda(element, transformer) {
|
|
|
702
689
|
var tmp;
|
|
703
690
|
if (element instanceof Interface) {
|
|
704
691
|
var tmp_0;
|
|
705
|
-
if (element.
|
|
692
|
+
if (element.m1o_1.equals(Companion_getInstance().m1h('Handler')) || element.m1o_1.equals(Companion_getInstance().m1h('Call'))) {
|
|
706
693
|
var tmp0_typeParameters = listOf(new TypeParameter(new Custom('F[_]')));
|
|
707
694
|
// Inline function 'kotlin.collections.map' call
|
|
708
|
-
var this_0 = element.
|
|
695
|
+
var this_0 = element.n1o_1;
|
|
709
696
|
// Inline function 'kotlin.collections.mapTo' call
|
|
710
697
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
711
698
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -713,7 +700,7 @@ function ScalaIrEmitter$injectHandleFunction$lambda(element, transformer) {
|
|
|
713
700
|
var item = _iterator__ex2g4s.v();
|
|
714
701
|
var tmp_1;
|
|
715
702
|
if (item instanceof Function) {
|
|
716
|
-
var tmp0_safe_receiver = item.
|
|
703
|
+
var tmp0_safe_receiver = item.w1j_1;
|
|
717
704
|
var tmp_2;
|
|
718
705
|
if (tmp0_safe_receiver == null) {
|
|
719
706
|
tmp_2 = null;
|
|
@@ -722,14 +709,14 @@ function ScalaIrEmitter$injectHandleFunction$lambda(element, transformer) {
|
|
|
722
709
|
tmp_2 = new Custom('F', listOf(tmp0_safe_receiver));
|
|
723
710
|
}
|
|
724
711
|
var tmp2_returnType = tmp_2;
|
|
725
|
-
tmp_1 = item.
|
|
712
|
+
tmp_1 = item.b1k(VOID, VOID, VOID, tmp2_returnType, VOID, false);
|
|
726
713
|
} else {
|
|
727
714
|
tmp_1 = item;
|
|
728
715
|
}
|
|
729
716
|
var tmp$ret$2 = tmp_1;
|
|
730
717
|
destination.x(tmp$ret$2);
|
|
731
718
|
}
|
|
732
|
-
tmp_0 = element.
|
|
719
|
+
tmp_0 = element.t1o(VOID, destination, VOID, VOID, tmp0_typeParameters);
|
|
733
720
|
} else {
|
|
734
721
|
tmp_0 = element;
|
|
735
722
|
}
|
|
@@ -743,10 +730,10 @@ function ScalaIrEmitter$injectHandleFunction$lambda(element, transformer) {
|
|
|
743
730
|
function ScalaIrEmitter$buildClientServerObjects$lambda(it) {
|
|
744
731
|
var tmp;
|
|
745
732
|
if (it instanceof Literal) {
|
|
746
|
-
tmp = it.
|
|
733
|
+
tmp = it.hq_1;
|
|
747
734
|
} else {
|
|
748
735
|
if (it instanceof Param) {
|
|
749
|
-
tmp = '{' + it.
|
|
736
|
+
tmp = '{' + it.lp_1.l1() + '}';
|
|
750
737
|
} else {
|
|
751
738
|
noWhenBranchMatchedException();
|
|
752
739
|
}
|
|
@@ -755,80 +742,89 @@ function ScalaIrEmitter$buildClientServerObjects$lambda(it) {
|
|
|
755
742
|
}
|
|
756
743
|
function ScalaIrEmitter(packageName, emitShared) {
|
|
757
744
|
Companion_getInstance_0();
|
|
758
|
-
packageName = packageName === VOID ? Companion_instance_0.
|
|
759
|
-
emitShared = emitShared === VOID ? Companion_instance_1.
|
|
760
|
-
this.
|
|
761
|
-
this.
|
|
762
|
-
this.
|
|
763
|
-
this.
|
|
764
|
-
this.
|
|
745
|
+
packageName = packageName === VOID ? Companion_instance_0.lr('community.flock.wirespec.generated') : packageName;
|
|
746
|
+
emitShared = emitShared === VOID ? Companion_instance_1.go() : emitShared;
|
|
747
|
+
this.e20_1 = packageName;
|
|
748
|
+
this.f20_1 = emitShared;
|
|
749
|
+
this.g20_1 = ScalaGenerator_instance;
|
|
750
|
+
this.h20_1 = FileExtension_Scala_getInstance();
|
|
751
|
+
this.i20_1 = listOf_0([import_0('community.flock.wirespec.scala', 'Wirespec'), import_0('scala.reflect', 'ClassTag')]);
|
|
765
752
|
var tmp = this;
|
|
766
|
-
tmp.
|
|
753
|
+
tmp.j20_1 = lazy(ScalaIrEmitter$sanitizationConfig$delegate$lambda(this));
|
|
767
754
|
var tmp_0 = this;
|
|
768
|
-
tmp_0.
|
|
755
|
+
tmp_0.k20_1 = new ScalaIrEmitter$shared$1();
|
|
769
756
|
}
|
|
770
|
-
protoOf(ScalaIrEmitter).
|
|
771
|
-
return this.
|
|
757
|
+
protoOf(ScalaIrEmitter).k1v = function () {
|
|
758
|
+
return this.e20_1;
|
|
772
759
|
};
|
|
773
|
-
protoOf(ScalaIrEmitter).
|
|
774
|
-
return this.
|
|
760
|
+
protoOf(ScalaIrEmitter).m1u = function () {
|
|
761
|
+
return this.g20_1;
|
|
775
762
|
};
|
|
776
|
-
protoOf(ScalaIrEmitter).
|
|
777
|
-
return this.
|
|
763
|
+
protoOf(ScalaIrEmitter).eq = function () {
|
|
764
|
+
return this.h20_1;
|
|
778
765
|
};
|
|
779
|
-
protoOf(ScalaIrEmitter).
|
|
780
|
-
return this.
|
|
766
|
+
protoOf(ScalaIrEmitter).t1v = function () {
|
|
767
|
+
return this.k20_1;
|
|
781
768
|
};
|
|
782
|
-
protoOf(ScalaIrEmitter).
|
|
769
|
+
protoOf(ScalaIrEmitter).n1u = function (module_0, logger) {
|
|
783
770
|
var tmp = emit.call(this, module_0, logger);
|
|
784
|
-
return withSharedSource(tmp, this.
|
|
771
|
+
return withSharedSource(tmp, this.f20_1, ScalaIrEmitter$emit$lambda(this));
|
|
785
772
|
};
|
|
786
|
-
protoOf(ScalaIrEmitter).
|
|
773
|
+
protoOf(ScalaIrEmitter).uq = function (definition, module_0, logger) {
|
|
787
774
|
var file = emit_0.call(this, definition, module_0, logger);
|
|
788
|
-
|
|
775
|
+
// Inline function 'kotlin.takeIf' call
|
|
776
|
+
var this_0 = this.i20_1;
|
|
777
|
+
var tmp;
|
|
778
|
+
if (Companion_instance.qq(module_0)) {
|
|
779
|
+
tmp = this_0;
|
|
780
|
+
} else {
|
|
781
|
+
tmp = null;
|
|
782
|
+
}
|
|
783
|
+
var tmp$ret$1 = tmp;
|
|
784
|
+
return placeInPackage(prependImports(file, tmp$ret$1), this.k1v(), definition);
|
|
789
785
|
};
|
|
790
|
-
protoOf(ScalaIrEmitter).
|
|
786
|
+
protoOf(ScalaIrEmitter).up = function (type, module_0) {
|
|
791
787
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
792
788
|
var this_0 = sanitizeNames(convertWithValidation(type, module_0), _get_sanitizationConfig__sns434(this));
|
|
793
789
|
var scope = new TransformScope(this_0);
|
|
794
790
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
795
791
|
var tmp = scope;
|
|
796
792
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
797
|
-
var this_1 = scope.
|
|
793
|
+
var this_1 = scope.z1t_1;
|
|
798
794
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
799
795
|
// Inline function 'kotlin.apply' call
|
|
800
796
|
var this_2 = new TransformerBuilder();
|
|
801
|
-
this_2.
|
|
802
|
-
var tmp$ret$2 = this_2.
|
|
803
|
-
tmp.
|
|
804
|
-
var tmp_0 = scope.
|
|
797
|
+
this_2.d1h(ScalaIrEmitter$emit$lambda_0);
|
|
798
|
+
var tmp$ret$2 = this_2.e1h();
|
|
799
|
+
tmp.z1t_1 = transform(this_1, tmp$ret$2);
|
|
800
|
+
var tmp_0 = scope.z1t_1;
|
|
805
801
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
806
802
|
};
|
|
807
|
-
protoOf(ScalaIrEmitter).
|
|
803
|
+
protoOf(ScalaIrEmitter).ir = function (enum_0, module_0) {
|
|
808
804
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
809
805
|
var this_0 = sanitizeNames(convert_0(enum_0), _get_sanitizationConfig__sns434(this));
|
|
810
806
|
var scope = new TransformScope(this_0);
|
|
811
807
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
812
808
|
var tmp = scope;
|
|
813
809
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
814
|
-
var this_1 = scope.
|
|
810
|
+
var this_1 = scope.z1t_1;
|
|
815
811
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
816
812
|
// Inline function 'kotlin.apply' call
|
|
817
813
|
var this_2 = new TransformerBuilder();
|
|
818
|
-
this_2.
|
|
819
|
-
var tmp$ret$2 = this_2.
|
|
820
|
-
tmp.
|
|
821
|
-
var tmp_0 = scope.
|
|
814
|
+
this_2.d1h(ScalaIrEmitter$emit$lambda_1(this));
|
|
815
|
+
var tmp$ret$2 = this_2.e1h();
|
|
816
|
+
tmp.z1t_1 = transform(this_1, tmp$ret$2);
|
|
817
|
+
var tmp_0 = scope.z1t_1;
|
|
822
818
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
823
819
|
};
|
|
824
|
-
protoOf(ScalaIrEmitter).
|
|
820
|
+
protoOf(ScalaIrEmitter).yq = function (union) {
|
|
825
821
|
return sanitizeNames(convert_1(union), _get_sanitizationConfig__sns434(this));
|
|
826
822
|
};
|
|
827
|
-
protoOf(ScalaIrEmitter).
|
|
823
|
+
protoOf(ScalaIrEmitter).dr = function (refined) {
|
|
828
824
|
var file = sanitizeNames(convert_2(refined), _get_sanitizationConfig__sns434(this));
|
|
829
825
|
// Inline function 'community.flock.wirespec.ir.core.findElement' call
|
|
830
826
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
831
|
-
var tmp0 = file.
|
|
827
|
+
var tmp0 = file.v1m();
|
|
832
828
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
833
829
|
var destination = ArrayList_init_$Create$();
|
|
834
830
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -841,18 +837,18 @@ protoOf(ScalaIrEmitter).fr = function (refined) {
|
|
|
841
837
|
var tmp$ret$2 = firstOrNull_0(destination);
|
|
842
838
|
var struct = ensureNotNull(tmp$ret$2);
|
|
843
839
|
// Inline function 'kotlin.collections.map' call
|
|
844
|
-
var this_0 = struct.
|
|
840
|
+
var this_0 = struct.g1n_1;
|
|
845
841
|
// Inline function 'kotlin.collections.mapTo' call
|
|
846
842
|
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
847
843
|
var _iterator__ex2g4s_0 = this_0.t();
|
|
848
844
|
while (_iterator__ex2g4s_0.u()) {
|
|
849
845
|
var item = _iterator__ex2g4s_0.v();
|
|
850
|
-
var tmp$ret$3 = item.
|
|
846
|
+
var tmp$ret$3 = item.q1n(VOID, VOID, true);
|
|
851
847
|
destination_0.x(tmp$ret$3);
|
|
852
848
|
}
|
|
853
849
|
var tmp = destination_0;
|
|
854
850
|
// Inline function 'kotlin.collections.map' call
|
|
855
|
-
var this_1 = struct.
|
|
851
|
+
var this_1 = struct.j1n_1;
|
|
856
852
|
// Inline function 'kotlin.collections.mapTo' call
|
|
857
853
|
var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
|
|
858
854
|
var _iterator__ex2g4s_1 = this_1.t();
|
|
@@ -860,7 +856,7 @@ protoOf(ScalaIrEmitter).fr = function (refined) {
|
|
|
860
856
|
var item_0 = _iterator__ex2g4s_1.v();
|
|
861
857
|
var tmp_0;
|
|
862
858
|
if (item_0 instanceof Function) {
|
|
863
|
-
tmp_0 = item_0.
|
|
859
|
+
tmp_0 = item_0.b1k(VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
|
|
864
860
|
} else {
|
|
865
861
|
tmp_0 = item_0;
|
|
866
862
|
}
|
|
@@ -868,19 +864,19 @@ protoOf(ScalaIrEmitter).fr = function (refined) {
|
|
|
868
864
|
destination_1.x(tmp$ret$6);
|
|
869
865
|
}
|
|
870
866
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
871
|
-
var this_2 = struct.
|
|
867
|
+
var this_2 = struct.l1n(VOID, tmp, VOID, VOID, destination_1);
|
|
872
868
|
var scope = new TransformScope(this_2);
|
|
873
|
-
scope.
|
|
874
|
-
var tmp_1 = scope.
|
|
869
|
+
scope.h1u(ScalaIrEmitter$emit$lambda_2);
|
|
870
|
+
var tmp_1 = scope.z1t_1;
|
|
875
871
|
var updatedStruct = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
876
|
-
return new File(Companion_getInstance().
|
|
872
|
+
return new File(Companion_getInstance().m1h(sanitize(this, refined.br_1)), listOf(updatedStruct));
|
|
877
873
|
};
|
|
878
|
-
protoOf(ScalaIrEmitter).
|
|
874
|
+
protoOf(ScalaIrEmitter).jr = function (endpoint) {
|
|
879
875
|
var imports = buildImports(this, endpoint);
|
|
880
876
|
var file = convert_3(endpoint);
|
|
881
877
|
// Inline function 'community.flock.wirespec.ir.core.findElement' call
|
|
882
878
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
883
|
-
var tmp0 = file.
|
|
879
|
+
var tmp0 = file.v1m();
|
|
884
880
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
885
881
|
var destination = ArrayList_init_$Create$();
|
|
886
882
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -897,62 +893,47 @@ protoOf(ScalaIrEmitter).lr = function (endpoint) {
|
|
|
897
893
|
// Inline function 'kotlin.let' call
|
|
898
894
|
var ns = injectHandleFunction(this, flattened);
|
|
899
895
|
var body = buildClientServerObjects(this, endpoint, requestIsObject, ns);
|
|
900
|
-
var sanitized = sanitizeNames(new File(Companion_getInstance().
|
|
896
|
+
var sanitized = sanitizeNames(new File(Companion_getInstance().m1h(sanitize(this, endpoint.ep_1)), listOf(body)), _get_sanitizationConfig__sns434(this));
|
|
901
897
|
var tmp;
|
|
902
|
-
// Inline function 'kotlin.
|
|
903
|
-
if (
|
|
904
|
-
tmp = sanitized.
|
|
898
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
899
|
+
if (!imports.r()) {
|
|
900
|
+
tmp = sanitized.x1m(VOID, plus_0(imports, sanitized.u1m_1));
|
|
905
901
|
} else {
|
|
906
902
|
tmp = sanitized;
|
|
907
903
|
}
|
|
908
904
|
return tmp;
|
|
909
905
|
};
|
|
910
|
-
protoOf(ScalaIrEmitter).
|
|
906
|
+
protoOf(ScalaIrEmitter).xq = function (channel) {
|
|
911
907
|
var imports = buildImports(this, channel);
|
|
912
908
|
var file = sanitizeNames(convert_4(channel), _get_sanitizationConfig__sns434(this));
|
|
913
909
|
var tmp;
|
|
914
|
-
// Inline function 'kotlin.
|
|
915
|
-
if (
|
|
916
|
-
tmp = file.
|
|
910
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
911
|
+
if (!imports.r()) {
|
|
912
|
+
tmp = file.x1m(VOID, plus_0(imports, file.u1m_1));
|
|
917
913
|
} else {
|
|
918
914
|
tmp = file;
|
|
919
915
|
}
|
|
920
916
|
return tmp;
|
|
921
917
|
};
|
|
922
|
-
protoOf(ScalaIrEmitter).
|
|
918
|
+
protoOf(ScalaIrEmitter).q1u = function (endpoint) {
|
|
923
919
|
var imports = buildImports(this, endpoint);
|
|
924
|
-
var endpointImport =
|
|
925
|
-
// Inline function 'kotlin.collections.filter' call
|
|
926
|
-
var tmp0 = listOf_0([imports, endpointImport]);
|
|
927
|
-
// Inline function 'kotlin.collections.filterTo' call
|
|
928
|
-
var destination = ArrayList_init_$Create$();
|
|
929
|
-
var _iterator__ex2g4s = tmp0.t();
|
|
930
|
-
while (_iterator__ex2g4s.u()) {
|
|
931
|
-
var element = _iterator__ex2g4s.v();
|
|
932
|
-
// Inline function 'kotlin.text.isNotEmpty' call
|
|
933
|
-
if (charSequenceLength(element) > 0) {
|
|
934
|
-
destination.x(element);
|
|
935
|
-
}
|
|
936
|
-
}
|
|
937
|
-
var allImports = joinToString(destination, '\n');
|
|
920
|
+
var endpointImport = import_0(this.k1v().mr_1 + '.endpoint', endpoint.ep_1.l1());
|
|
938
921
|
var file = addIdentityTypeToCall(this, sanitizeNames(emitEndpointClient.call(this, endpoint), _get_sanitizationConfig__sns434(this)));
|
|
939
|
-
var subPackageName = plus_1(this.
|
|
940
|
-
var tmp = Companion_getInstance().
|
|
922
|
+
var subPackageName = plus_1(this.k1v(), 'client');
|
|
923
|
+
var tmp = Companion_getInstance().m1h(subPackageName.or() + file.t1m_1.x1l());
|
|
941
924
|
// Inline function 'kotlin.collections.buildList' call
|
|
942
925
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
943
926
|
// Inline function 'kotlin.apply' call
|
|
944
927
|
var this_0 = ArrayList_init_$Create$();
|
|
945
|
-
this_0.x(new Package(subPackageName.
|
|
946
|
-
this_0.
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
var tmp$ret$8 = this_0.o5();
|
|
953
|
-
return new File(tmp, tmp$ret$8);
|
|
928
|
+
this_0.x(new Package(subPackageName.mr_1));
|
|
929
|
+
this_0.e1(this.i20_1);
|
|
930
|
+
this_0.e1(imports);
|
|
931
|
+
this_0.x(endpointImport);
|
|
932
|
+
this_0.e1(file.u1m_1);
|
|
933
|
+
var tmp$ret$3 = this_0.o5();
|
|
934
|
+
return new File(tmp, tmp$ret$3);
|
|
954
935
|
};
|
|
955
|
-
protoOf(ScalaIrEmitter).
|
|
936
|
+
protoOf(ScalaIrEmitter).p1u = function (endpoints, logger) {
|
|
956
937
|
// Inline function 'kotlin.collections.flatMap' call
|
|
957
938
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
958
939
|
var destination = ArrayList_init_$Create$();
|
|
@@ -968,46 +949,57 @@ protoOf(ScalaIrEmitter).q1u = function (endpoints, logger) {
|
|
|
968
949
|
var _iterator__ex2g4s_0 = destination.t();
|
|
969
950
|
while (_iterator__ex2g4s_0.u()) {
|
|
970
951
|
var e = _iterator__ex2g4s_0.v();
|
|
971
|
-
var key = e.
|
|
952
|
+
var key = e.lu_1;
|
|
972
953
|
if (set.x(key)) {
|
|
973
954
|
list_0.x(e);
|
|
974
955
|
}
|
|
975
956
|
}
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
var
|
|
979
|
-
var
|
|
980
|
-
// Inline function 'kotlin.collections.filter' call
|
|
981
|
-
var tmp0 = listOf_0([imports, endpointImports, clientImports]);
|
|
982
|
-
// Inline function 'kotlin.collections.filterTo' call
|
|
983
|
-
var destination_0 = ArrayList_init_$Create$();
|
|
984
|
-
var _iterator__ex2g4s_1 = tmp0.t();
|
|
957
|
+
// Inline function 'kotlin.collections.map' call
|
|
958
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
959
|
+
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(list_0, 10));
|
|
960
|
+
var _iterator__ex2g4s_1 = list_0.t();
|
|
985
961
|
while (_iterator__ex2g4s_1.u()) {
|
|
986
|
-
var
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
962
|
+
var item = _iterator__ex2g4s_1.v();
|
|
963
|
+
var tmp$ret$5 = import_0(this.k1v().mr_1 + '.model', item.lu_1);
|
|
964
|
+
destination_0.x(tmp$ret$5);
|
|
965
|
+
}
|
|
966
|
+
var imports = destination_0;
|
|
967
|
+
// Inline function 'kotlin.collections.map' call
|
|
968
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
969
|
+
var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(endpoints, 10));
|
|
970
|
+
var _iterator__ex2g4s_2 = endpoints.t();
|
|
971
|
+
while (_iterator__ex2g4s_2.u()) {
|
|
972
|
+
var item_0 = _iterator__ex2g4s_2.v();
|
|
973
|
+
var tmp$ret$8 = import_0(this.k1v().mr_1 + '.endpoint', item_0.ep_1.l1());
|
|
974
|
+
destination_1.x(tmp$ret$8);
|
|
991
975
|
}
|
|
992
|
-
var
|
|
976
|
+
var endpointImports = destination_1;
|
|
977
|
+
// Inline function 'kotlin.collections.map' call
|
|
978
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
979
|
+
var destination_2 = ArrayList_init_$Create$_0(collectionSizeOrDefault(endpoints, 10));
|
|
980
|
+
var _iterator__ex2g4s_3 = endpoints.t();
|
|
981
|
+
while (_iterator__ex2g4s_3.u()) {
|
|
982
|
+
var item_1 = _iterator__ex2g4s_3.v();
|
|
983
|
+
var tmp$ret$11 = import_0(this.k1v().mr_1 + '.client', item_1.ep_1.l1() + 'Client');
|
|
984
|
+
destination_2.x(tmp$ret$11);
|
|
985
|
+
}
|
|
986
|
+
var clientImports = destination_2;
|
|
987
|
+
var allImports = plus_0(plus_0(imports, endpointImports), clientImports);
|
|
993
988
|
var file = addIdentityTypeToCall(this, sanitizeNames(emitClient.call(this, endpoints, logger), _get_sanitizationConfig__sns434(this)));
|
|
994
|
-
var
|
|
989
|
+
var tmp = Companion_getInstance().m1h(this.k1v().or() + file.t1m_1.x1l());
|
|
995
990
|
// Inline function 'kotlin.collections.buildList' call
|
|
996
991
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
997
992
|
// Inline function 'kotlin.apply' call
|
|
998
993
|
var this_0 = ArrayList_init_$Create$();
|
|
999
|
-
this_0.x(new Package(this.
|
|
1000
|
-
this_0.
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
this_0.e1(file.r1m_1);
|
|
1006
|
-
var tmp$ret$13 = this_0.o5();
|
|
1007
|
-
return new File(tmp_0, tmp$ret$13);
|
|
994
|
+
this_0.x(new Package(this.k1v().mr_1));
|
|
995
|
+
this_0.e1(this.i20_1);
|
|
996
|
+
this_0.e1(allImports);
|
|
997
|
+
this_0.e1(file.u1m_1);
|
|
998
|
+
var tmp$ret$17 = this_0.o5();
|
|
999
|
+
return new File(tmp, tmp$ret$17);
|
|
1008
1000
|
};
|
|
1009
1001
|
//region block: post-declaration
|
|
1010
|
-
protoOf(ScalaIrEmitter).
|
|
1002
|
+
protoOf(ScalaIrEmitter).on = emit_1;
|
|
1011
1003
|
//endregion
|
|
1012
1004
|
//region block: exports
|
|
1013
1005
|
export {
|