@flock/wirespec 0.22.4 → 0.22.6
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-core.mjs +13 -8
- package/arrow-arrow-core.mjs.map +1 -1
- package/clikt-clikt-mordant.mjs +79 -79
- package/clikt-clikt.mjs +1367 -1366
- package/clikt-clikt.mjs.map +1 -1
- package/colormath-root-colormath.mjs +436 -436
- package/kotlin-kotlin-stdlib.mjs +304 -239
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +10221 -10221
- package/kotlin-rgxgen.mjs +1771 -1771
- package/kotlinx-io-kotlinx-io-core.mjs +425 -425
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +1824 -1824
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1509 -1509
- package/mordant-mordant.mjs +1246 -1246
- package/package.json +1 -1
- package/wirespec-src-compiler-core.mjs +5972 -5367
- package/wirespec-src-compiler-core.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-java.mjs +171 -187
- package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-kotlin.mjs +174 -165
- package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-python.mjs +147 -160
- package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-rust.mjs +356 -370
- package/wirespec-src-compiler-emitters-rust.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-scala.mjs +165 -175
- package/wirespec-src-compiler-emitters-scala.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-typescript.mjs +187 -313
- package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-wirespec.mjs +81 -81
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +194 -194
- package/wirespec-src-converter-asyncapi.mjs +545 -545
- package/wirespec-src-converter-avro.mjs +570 -514
- package/wirespec-src-converter-avro.mjs.map +1 -1
- package/wirespec-src-converter-common.mjs +11 -11
- package/wirespec-src-converter-graphql.mjs +942 -942
- package/wirespec-src-converter-openapi.mjs +453 -453
- package/wirespec-src-ide-lsp.mjs +1359 -1359
- package/wirespec-src-plugin-arguments.mjs +419 -224
- package/wirespec-src-plugin-arguments.mjs.map +1 -1
- package/wirespec-src-plugin-cli.mjs +170 -137
- package/wirespec-src-plugin-cli.mjs.map +1 -1
- package/wirespec-src-plugin-extensions.mjs +4874 -0
- package/wirespec-src-plugin-extensions.mjs.map +1 -0
- package/wirespec-src-plugin-npm.d.mts +43 -1
- package/wirespec-src-plugin-npm.mjs +230 -54
- package/wirespec-src-plugin-npm.mjs.map +1 -1
- package/wirespec-src-tools-generator.mjs +17 -17
|
@@ -16,11 +16,11 @@ import {
|
|
|
16
16
|
protoOf180f3jzyo7rfj as protoOf,
|
|
17
17
|
initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
|
|
18
18
|
listOfvhqybd2zx248 as listOf,
|
|
19
|
-
emptyList1g2z5xcrvp2zy as emptyList,
|
|
20
|
-
VOID3gxj6tk5isa35 as VOID,
|
|
21
19
|
ArrayList_init_$Create$37gc04va6yfo2 as ArrayList_init_$Create$_0,
|
|
22
20
|
Paire9pteg33gng7 as Pair,
|
|
23
21
|
plus310ted5e4i90h as plus,
|
|
22
|
+
VOID3gxj6tk5isa35 as VOID,
|
|
23
|
+
emptyList1g2z5xcrvp2zy as emptyList,
|
|
24
24
|
THROW_CCE2g6jy02ryeudk as THROW_CCE,
|
|
25
25
|
startsWith26w8qjqapeeq6 as startsWith,
|
|
26
26
|
substringBefore3n7kj60w69hju as substringBefore,
|
|
@@ -47,12 +47,10 @@ import {
|
|
|
47
47
|
Companion_instance27ueeez2qu1l as Companion_instance,
|
|
48
48
|
JavaGenerator_getInstance1vn8n4kivtqjx as JavaGenerator_getInstance,
|
|
49
49
|
Name1ijtblv1phm3y as Name,
|
|
50
|
-
FunctionCall1a3g4e6bcljl6 as FunctionCall,
|
|
51
|
-
transformChildren34heehtlmzzif as transformChildren,
|
|
52
50
|
Companion_getInstance34fvro4h6bumb as Companion_getInstance,
|
|
53
51
|
Package1a6hdgk3p4frd as Package,
|
|
54
52
|
File12q75sqvz964e as File,
|
|
55
|
-
transformChildren14suh59vxsgt as
|
|
53
|
+
transformChildren14suh59vxsgt as transformChildren,
|
|
56
54
|
Main3fexakddcxfff as Main,
|
|
57
55
|
Enumoqsp4e7al89r as Enum,
|
|
58
56
|
Interface2g99rmjjt5ne as Interface,
|
|
@@ -88,14 +86,14 @@ import {
|
|
|
88
86
|
sanitizeNames1v55mz1p84psg as sanitizeNames,
|
|
89
87
|
collectCustomTypeNames2atsrip288ol4 as collectCustomTypeNames,
|
|
90
88
|
placeInPackagea1jcxre6uf77 as placeInPackage_0,
|
|
91
|
-
|
|
92
|
-
convert1ke01d6gmcvu7 as
|
|
89
|
+
convert23o50n5glj7h5 as convert_0,
|
|
90
|
+
convert1ke01d6gmcvu7 as convert_1,
|
|
93
91
|
injectEnumLabelField21kogrwccvlea as injectEnumLabelField,
|
|
94
|
-
convert29zpebhuxz599 as
|
|
95
|
-
convert39lmqftdnlhsy as
|
|
96
|
-
convert333pgxr2q05n as
|
|
97
|
-
convert86y6uioox2cl as
|
|
98
|
-
convert1o5h4ulxoqycg as
|
|
92
|
+
convert29zpebhuxz599 as convert_2,
|
|
93
|
+
convert39lmqftdnlhsy as convert_3,
|
|
94
|
+
convert333pgxr2q05n as convert_4,
|
|
95
|
+
convert86y6uioox2cl as convert_5,
|
|
96
|
+
convert1o5h4ulxoqycg as convert_6,
|
|
99
97
|
emitEndpointClient2og25opoka4ql as emitEndpointClient,
|
|
100
98
|
plus14o24vdaiongg as plus_1,
|
|
101
99
|
importReferencesy4xv7r53sjjs as importReferences,
|
|
@@ -117,14 +115,16 @@ import {
|
|
|
117
115
|
Number2bo3d41wdfzde as Number_0,
|
|
118
116
|
Integer3hago8kqppnkb as Integer,
|
|
119
117
|
struct1gzvysjt73bn4 as struct,
|
|
118
|
+
transformChildren34heehtlmzzif as transformChildren_0,
|
|
120
119
|
RawExpressionfqemfbo6j6cq as RawExpression,
|
|
121
120
|
TypeDescriptor2a3i4v81u9c6y as TypeDescriptor,
|
|
122
|
-
convert32i7359nc4b5g as
|
|
121
|
+
convert32i7359nc4b5g as convert_7,
|
|
123
122
|
Custom_init_$Create$kfegfgqdjj1p as Custom_init_$Create$,
|
|
124
123
|
Function1wme41sk2huri as Function,
|
|
125
124
|
RawElement3huqlgf21e29z as RawElement,
|
|
126
125
|
Assignment1el26yjkp72c6 as Assignment,
|
|
127
126
|
ReturnStatement2onvxq5s96j3a as ReturnStatement,
|
|
127
|
+
FunctionCall1a3g4e6bcljl6 as FunctionCall,
|
|
128
128
|
Paramvfwnys2w6aj1 as Param,
|
|
129
129
|
Literal331hu9r04vptz as Literal,
|
|
130
130
|
Wildcard_instance1x48vpete4k7w as Wildcard_instance,
|
|
@@ -187,17 +187,17 @@ function sanitizeFirstIsDigit($this, $receiver) {
|
|
|
187
187
|
return tmp;
|
|
188
188
|
}
|
|
189
189
|
function sanitizeKeywords($this, $receiver) {
|
|
190
|
-
return Companion_getInstance_0().
|
|
190
|
+
return Companion_getInstance_0().i37().i1($receiver) ? '_' + $receiver : $receiver;
|
|
191
191
|
}
|
|
192
192
|
function sanitizeEnum($this, $receiver) {
|
|
193
193
|
return sanitizeKeywords($this, sanitizeFirstIsDigit($this, joinToString(split($receiver, ['-', ', ', '.', ' ', '//']), '_')));
|
|
194
194
|
}
|
|
195
195
|
function Companion() {
|
|
196
196
|
Companion_instance_2 = this;
|
|
197
|
-
this.
|
|
197
|
+
this.h37_1 = JavaGenerator_getInstance();
|
|
198
198
|
}
|
|
199
|
-
protoOf(Companion).
|
|
200
|
-
return this.
|
|
199
|
+
protoOf(Companion).i37 = function () {
|
|
200
|
+
return this.h37_1.i1c_1;
|
|
201
201
|
};
|
|
202
202
|
var Companion_instance_2;
|
|
203
203
|
function Companion_getInstance_0() {
|
|
@@ -209,7 +209,7 @@ function JavaEmitter$sanitizationConfig$lambda(it) {
|
|
|
209
209
|
return '_' + it;
|
|
210
210
|
}
|
|
211
211
|
function JavaEmitter$sanitizationConfig$lambda_0(name) {
|
|
212
|
-
return name.ut_1.
|
|
212
|
+
return name.ut_1.c1() > 1 ? new Name(listOf(name.yt())) : name;
|
|
213
213
|
}
|
|
214
214
|
function JavaEmitter$sanitizationConfig$lambda_1(name) {
|
|
215
215
|
return new Name(listOf(name.yt()));
|
|
@@ -219,21 +219,6 @@ function JavaEmitter$sanitizationConfig$lambda_2(this$0) {
|
|
|
219
219
|
return sanitizeSymbol(this$0, it);
|
|
220
220
|
};
|
|
221
221
|
}
|
|
222
|
-
function JavaEmitter$sanitizationConfig$lambda_3(stmt, tr) {
|
|
223
|
-
var tmp;
|
|
224
|
-
var tmp_0;
|
|
225
|
-
if (stmt instanceof FunctionCall) {
|
|
226
|
-
tmp_0 = stmt.eu_1.xt() === 'validate';
|
|
227
|
-
} else {
|
|
228
|
-
tmp_0 = false;
|
|
229
|
-
}
|
|
230
|
-
if (tmp_0) {
|
|
231
|
-
tmp = transformChildren(stmt.iu(VOID, emptyList()), tr);
|
|
232
|
-
} else {
|
|
233
|
-
tmp = transformChildren(stmt, tr);
|
|
234
|
-
}
|
|
235
|
-
return tmp;
|
|
236
|
-
}
|
|
237
222
|
function JavaEmitter$emitShared$lambda(name) {
|
|
238
223
|
switch (name.xt()) {
|
|
239
224
|
case 'client':
|
|
@@ -249,7 +234,7 @@ function JavaEmitter$emitShared$lambda_0($imports) {
|
|
|
249
234
|
var tmp;
|
|
250
235
|
if (element instanceof File) {
|
|
251
236
|
// Inline function 'kotlin.collections.partition' call
|
|
252
|
-
var this_0 = element.
|
|
237
|
+
var this_0 = element.cv_1;
|
|
253
238
|
var first = ArrayList_init_$Create$_0();
|
|
254
239
|
var second = ArrayList_init_$Create$_0();
|
|
255
240
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -264,39 +249,39 @@ function JavaEmitter$emitShared$lambda_0($imports) {
|
|
|
264
249
|
var _destruct__k2r9zo = new Pair(first, second);
|
|
265
250
|
var packageElements = _destruct__k2r9zo.ze();
|
|
266
251
|
var rest = _destruct__k2r9zo.af();
|
|
267
|
-
tmp = element.
|
|
252
|
+
tmp = element.fv(VOID, plus(plus(packageElements, $imports), rest));
|
|
268
253
|
} else {
|
|
269
254
|
tmp = element;
|
|
270
255
|
}
|
|
271
256
|
var transformed = tmp;
|
|
272
|
-
return
|
|
257
|
+
return transformChildren(transformed, transformer);
|
|
273
258
|
};
|
|
274
259
|
}
|
|
275
260
|
function JavaEmitter$emitShared$lambda_1($clientServer) {
|
|
276
261
|
return function (element, transformer) {
|
|
277
262
|
var tmp;
|
|
278
263
|
if (element instanceof Namespace) {
|
|
279
|
-
var injected = element.
|
|
264
|
+
var injected = element.hv_1.equals(Companion_getInstance().wt('Wirespec')) ? $clientServer : emptyList();
|
|
280
265
|
var tmp_0;
|
|
281
266
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
282
267
|
if (!injected.r()) {
|
|
283
268
|
// Inline function 'community.flock.wirespec.compiler.core.ir.withElements' call
|
|
284
|
-
var elements = plus(element.
|
|
269
|
+
var elements = plus(element.dv(), injected);
|
|
285
270
|
var tmp_1;
|
|
286
271
|
if (element instanceof File) {
|
|
287
|
-
tmp_1 = element.
|
|
272
|
+
tmp_1 = element.fv(VOID, elements);
|
|
288
273
|
} else {
|
|
289
274
|
if (element instanceof Struct) {
|
|
290
|
-
tmp_1 = element.
|
|
275
|
+
tmp_1 = element.mx(VOID, VOID, VOID, VOID, elements);
|
|
291
276
|
} else {
|
|
292
277
|
if (element instanceof Namespace) {
|
|
293
|
-
tmp_1 = element.
|
|
278
|
+
tmp_1 = element.mv(VOID, elements);
|
|
294
279
|
} else {
|
|
295
280
|
if (element instanceof Interface) {
|
|
296
|
-
tmp_1 = element.
|
|
281
|
+
tmp_1 = element.vv(VOID, elements);
|
|
297
282
|
} else {
|
|
298
283
|
if (element instanceof Enum) {
|
|
299
|
-
tmp_1 = element.
|
|
284
|
+
tmp_1 = element.ax(VOID, VOID, VOID, VOID, VOID, elements);
|
|
300
285
|
} else {
|
|
301
286
|
if (element instanceof Main) {
|
|
302
287
|
tmp_1 = element;
|
|
@@ -318,7 +303,7 @@ function JavaEmitter$emitShared$lambda_1($clientServer) {
|
|
|
318
303
|
tmp = element;
|
|
319
304
|
}
|
|
320
305
|
var transformed = tmp;
|
|
321
|
-
return
|
|
306
|
+
return transformChildren(transformed, transformer);
|
|
322
307
|
};
|
|
323
308
|
}
|
|
324
309
|
function JavaEmitter$emitGenerator$lambda(it) {
|
|
@@ -334,7 +319,7 @@ function JavaEmitter$emitGenerator$lambda_1(it) {
|
|
|
334
319
|
}
|
|
335
320
|
function JavaEmitter$emitGenerator$lambda_2(this$0) {
|
|
336
321
|
return function (it) {
|
|
337
|
-
return import_0(this$0.
|
|
322
|
+
return import_0(this$0.p37().bt_1 + '.model', it);
|
|
338
323
|
};
|
|
339
324
|
}
|
|
340
325
|
function JavaEmitter$emit$lambda(this$0) {
|
|
@@ -346,37 +331,36 @@ function JavaEmitter$emit$lambda_0(it) {
|
|
|
346
331
|
return listOf(function_0('label', VOID, VOID, JavaEmitter$emit$lambda$lambda));
|
|
347
332
|
}
|
|
348
333
|
function JavaEmitter$emit$lambda$lambda($this$function) {
|
|
349
|
-
$this$function.
|
|
350
|
-
$this$function.
|
|
334
|
+
$this$function.t13(String_instance);
|
|
335
|
+
$this$function.z13(new VariableReference(Companion_getInstance().wt('label')));
|
|
351
336
|
return Unit_instance;
|
|
352
337
|
}
|
|
353
338
|
function JavaEmitter(packageName, emitShared) {
|
|
354
339
|
Companion_getInstance_0();
|
|
355
340
|
packageName = packageName === VOID ? Companion_instance_0.at('community.flock.wirespec.generated') : packageName;
|
|
356
341
|
emitShared = emitShared === VOID ? Companion_instance_1.fq() : emitShared;
|
|
357
|
-
this.
|
|
358
|
-
this.
|
|
359
|
-
this.
|
|
360
|
-
this.
|
|
361
|
-
this.
|
|
342
|
+
this.j37_1 = packageName;
|
|
343
|
+
this.k37_1 = emitShared;
|
|
344
|
+
this.l37_1 = JavaGenerator_getInstance();
|
|
345
|
+
this.m37_1 = FileExtension_Java_getInstance();
|
|
346
|
+
this.n37_1 = listOf(import_0('community.flock.wirespec.java', 'Wirespec'));
|
|
362
347
|
var tmp = this;
|
|
363
|
-
var tmp_0 = Companion_getInstance_0().
|
|
348
|
+
var tmp_0 = Companion_getInstance_0().i37();
|
|
364
349
|
var tmp_1 = JavaEmitter$sanitizationConfig$lambda;
|
|
365
350
|
var tmp_2 = JavaEmitter$sanitizationConfig$lambda_0;
|
|
366
351
|
var tmp_3 = JavaEmitter$sanitizationConfig$lambda_1;
|
|
367
|
-
|
|
368
|
-
tmp.b20_1 = new SanitizationConfig(tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, JavaEmitter$sanitizationConfig$lambda_3);
|
|
352
|
+
tmp.o37_1 = new SanitizationConfig(tmp_0, tmp_1, tmp_2, tmp_3, JavaEmitter$sanitizationConfig$lambda_2(this));
|
|
369
353
|
}
|
|
370
|
-
protoOf(JavaEmitter).
|
|
371
|
-
return this.
|
|
354
|
+
protoOf(JavaEmitter).p37 = function () {
|
|
355
|
+
return this.j37_1;
|
|
372
356
|
};
|
|
373
|
-
protoOf(JavaEmitter).
|
|
374
|
-
return this.
|
|
357
|
+
protoOf(JavaEmitter).h1b = function () {
|
|
358
|
+
return this.l37_1;
|
|
375
359
|
};
|
|
376
360
|
protoOf(JavaEmitter).wp = function () {
|
|
377
|
-
return this.
|
|
361
|
+
return this.m37_1;
|
|
378
362
|
};
|
|
379
|
-
protoOf(JavaEmitter).
|
|
363
|
+
protoOf(JavaEmitter).c1b = function () {
|
|
380
364
|
var packageName = Companion_instance_0.at('community.flock.wirespec.java');
|
|
381
365
|
var imports = listOf_0([import_0('java.lang.reflect', 'Type'), import_0('java.lang.reflect', 'ParameterizedType'), import_0('java.util', 'List'), import_0('java.util', 'Map')]);
|
|
382
366
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -396,28 +380,28 @@ protoOf(JavaEmitter).c1a = function () {
|
|
|
396
380
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
397
381
|
var tmp = scope;
|
|
398
382
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
399
|
-
var this_2 = scope.
|
|
383
|
+
var this_2 = scope.a19_1;
|
|
400
384
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
401
385
|
// Inline function 'kotlin.apply' call
|
|
402
386
|
var this_3 = new TransformerBuilder();
|
|
403
|
-
this_3.
|
|
404
|
-
var tmp$ret$7 = this_3.
|
|
405
|
-
tmp.
|
|
387
|
+
this_3.u19(JavaEmitter$emitShared$lambda_0(imports));
|
|
388
|
+
var tmp$ret$7 = this_3.p19();
|
|
389
|
+
tmp.a19_1 = transform(this_2, tmp$ret$7);
|
|
406
390
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.injectAfter' call
|
|
407
391
|
var tmp_0 = scope;
|
|
408
392
|
// Inline function 'community.flock.wirespec.compiler.core.ir.injectAfter' call
|
|
409
393
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
410
|
-
var this_4 = scope.
|
|
394
|
+
var this_4 = scope.a19_1;
|
|
411
395
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
412
396
|
// Inline function 'kotlin.apply' call
|
|
413
397
|
var this_5 = new TransformerBuilder();
|
|
414
|
-
this_5.
|
|
415
|
-
var tmp$ret$13 = this_5.
|
|
416
|
-
tmp_0.
|
|
417
|
-
var tmp_1 = scope.
|
|
398
|
+
this_5.u19(JavaEmitter$emitShared$lambda_1(clientServer));
|
|
399
|
+
var tmp$ret$13 = this_5.p19();
|
|
400
|
+
tmp_0.a19_1 = transform(this_4, tmp$ret$13);
|
|
401
|
+
var tmp_1 = scope.a19_1;
|
|
418
402
|
var wirespecShared = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
419
403
|
var tmp_2;
|
|
420
|
-
if (this.
|
|
404
|
+
if (this.k37_1.gq_1) {
|
|
421
405
|
tmp_2 = wirespecShared;
|
|
422
406
|
} else {
|
|
423
407
|
tmp_2 = null;
|
|
@@ -426,9 +410,9 @@ protoOf(JavaEmitter).c1a = function () {
|
|
|
426
410
|
};
|
|
427
411
|
protoOf(JavaEmitter).cs = function (definition, module_0, logger) {
|
|
428
412
|
var file = emit.call(this, definition, module_0, logger);
|
|
429
|
-
var tmp = file.
|
|
413
|
+
var tmp = file.fv(Companion_getInstance().wt(sanitizeSymbol(this, file.bv_1.zt())));
|
|
430
414
|
// Inline function 'kotlin.takeIf' call
|
|
431
|
-
var this_0 = this.
|
|
415
|
+
var this_0 = this.n37_1;
|
|
432
416
|
var tmp_0;
|
|
433
417
|
if (Companion_instance.zr(module_0)) {
|
|
434
418
|
tmp_0 = this_0;
|
|
@@ -436,9 +420,9 @@ protoOf(JavaEmitter).cs = function (definition, module_0, logger) {
|
|
|
436
420
|
tmp_0 = null;
|
|
437
421
|
}
|
|
438
422
|
var tmp$ret$0 = tmp_0;
|
|
439
|
-
return placeInPackage(prependImports(tmp, tmp$ret$0), this.
|
|
423
|
+
return placeInPackage(prependImports(tmp, tmp$ret$0), this.p37(), definition);
|
|
440
424
|
};
|
|
441
|
-
protoOf(JavaEmitter).
|
|
425
|
+
protoOf(JavaEmitter).k1b = function (definition, module_0) {
|
|
442
426
|
var tmp;
|
|
443
427
|
if (definition instanceof Type) {
|
|
444
428
|
tmp = convertToGenerator_2(definition, module_0);
|
|
@@ -458,33 +442,33 @@ protoOf(JavaEmitter).k1a = function (definition, module_0) {
|
|
|
458
442
|
}
|
|
459
443
|
}
|
|
460
444
|
var generatorFile = tmp;
|
|
461
|
-
var sanitized = sanitizeNames(generatorFile, this.
|
|
445
|
+
var sanitized = sanitizeNames(generatorFile, this.o37_1);
|
|
462
446
|
var generatorOwnName = definition.ds().o1() + 'Generator';
|
|
463
447
|
var tmp_0 = asSequence(collectCustomTypeNames(sanitized));
|
|
464
448
|
var tmp_1 = filterNot(tmp_0, JavaEmitter$emitGenerator$lambda);
|
|
465
449
|
var tmp_2 = filterNot(tmp_1, JavaEmitter$emitGenerator$lambda_0(generatorOwnName));
|
|
466
450
|
var tmp_3 = distinct(map(tmp_2, JavaEmitter$emitGenerator$lambda_1));
|
|
467
451
|
var modelImports = toList(map(tmp_3, JavaEmitter$emitGenerator$lambda_2(this)));
|
|
468
|
-
return placeInPackage_0(prependImports(sanitized, plus(this.
|
|
452
|
+
return placeInPackage_0(prependImports(sanitized, plus(this.n37_1, modelImports)), this.p37(), 'generator');
|
|
469
453
|
};
|
|
470
454
|
protoOf(JavaEmitter).us = function (type, module_0) {
|
|
471
|
-
return sanitizeNames(
|
|
455
|
+
return sanitizeNames(convert_0(type), this.o37_1);
|
|
472
456
|
};
|
|
473
457
|
protoOf(JavaEmitter).ss = function (enum_0, module_0) {
|
|
474
|
-
var tmp =
|
|
458
|
+
var tmp = convert_1(enum_0);
|
|
475
459
|
var tmp_0 = JavaEmitter$emit$lambda(this);
|
|
476
|
-
return sanitizeNames(injectEnumLabelField(tmp, tmp_0, JavaEmitter$emit$lambda_0), this.
|
|
460
|
+
return sanitizeNames(injectEnumLabelField(tmp, tmp_0, JavaEmitter$emit$lambda_0), this.o37_1);
|
|
477
461
|
};
|
|
478
462
|
protoOf(JavaEmitter).is = function (union) {
|
|
479
|
-
return sanitizeNames(
|
|
463
|
+
return sanitizeNames(convert_2(union), this.o37_1);
|
|
480
464
|
};
|
|
481
465
|
protoOf(JavaEmitter).ns = function (refined) {
|
|
482
|
-
return sanitizeNames(applyRefinedStructShape(
|
|
466
|
+
return sanitizeNames(applyRefinedStructShape(convert_3(refined), refined), this.o37_1);
|
|
483
467
|
};
|
|
484
468
|
protoOf(JavaEmitter).ts = function (endpoint) {
|
|
485
|
-
var tmp = sanitizeNames(transformTypeDescriptors(injectApi(
|
|
469
|
+
var tmp = sanitizeNames(transformTypeDescriptors(injectApi(convert_4(endpoint), endpoint)), this.o37_1);
|
|
486
470
|
// Inline function 'kotlin.takeIf' call
|
|
487
|
-
var this_0 = buildModelImports(endpoint, this.
|
|
471
|
+
var this_0 = buildModelImports(endpoint, this.p37());
|
|
488
472
|
var tmp_0;
|
|
489
473
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
490
474
|
if (!this_0.r()) {
|
|
@@ -498,17 +482,17 @@ protoOf(JavaEmitter).ts = function (endpoint) {
|
|
|
498
482
|
protoOf(JavaEmitter).hs = function (channel) {
|
|
499
483
|
var tmp;
|
|
500
484
|
if (channel.xq_1.o1() === channel.yq_1.o1()) {
|
|
501
|
-
tmp = this.
|
|
485
|
+
tmp = this.p37().bt_1 + '.model.';
|
|
502
486
|
} else {
|
|
503
487
|
tmp = '';
|
|
504
488
|
}
|
|
505
489
|
var fullyQualifiedPrefix = tmp;
|
|
506
|
-
return qualifyChannelReferences(sanitizeNames(
|
|
490
|
+
return qualifyChannelReferences(sanitizeNames(convert_5(channel), this.o37_1), fullyQualifiedPrefix);
|
|
507
491
|
};
|
|
508
492
|
protoOf(JavaEmitter).gs = function (rpc) {
|
|
509
|
-
var tmp = sanitizeNames(
|
|
493
|
+
var tmp = sanitizeNames(convert_6(rpc), this.o37_1);
|
|
510
494
|
// Inline function 'kotlin.takeIf' call
|
|
511
|
-
var this_0 = buildModelImports(rpc, this.
|
|
495
|
+
var this_0 = buildModelImports(rpc, this.p37());
|
|
512
496
|
var tmp_0;
|
|
513
497
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
514
498
|
if (!this_0.r()) {
|
|
@@ -519,15 +503,15 @@ protoOf(JavaEmitter).gs = function (rpc) {
|
|
|
519
503
|
var tmp$ret$0 = tmp_0;
|
|
520
504
|
return prependImports(tmp, tmp$ret$0);
|
|
521
505
|
};
|
|
522
|
-
protoOf(JavaEmitter).
|
|
523
|
-
var imports = buildModelImports(endpoint, this.
|
|
524
|
-
var endpointImport = import_0(this.
|
|
506
|
+
protoOf(JavaEmitter).j1b = function (endpoint) {
|
|
507
|
+
var imports = buildModelImports(endpoint, this.p37());
|
|
508
|
+
var endpointImport = import_0(this.p37().bt_1 + '.endpoint', endpoint.fr_1.o1());
|
|
525
509
|
var endpointName = endpoint.fr_1.o1();
|
|
526
|
-
var file = wrapAsyncReturnInThenApply(transformTypeDescriptors(sanitizeNames(emitEndpointClient.call(this, endpoint), this.
|
|
527
|
-
var subPackageName = plus_1(this.
|
|
528
|
-
return new File(Companion_getInstance().wt(subPackageName.dt() + sanitizeSymbol(this, file.
|
|
510
|
+
var file = wrapAsyncReturnInThenApply(transformTypeDescriptors(sanitizeNames(emitEndpointClient.call(this, endpoint), this.o37_1)), endpointName);
|
|
511
|
+
var subPackageName = plus_1(this.p37(), 'client');
|
|
512
|
+
return new File(Companion_getInstance().wt(subPackageName.dt() + sanitizeSymbol(this, file.bv_1.zt())), plus(plus(plus(plus(listOf(new Package(subPackageName.bt_1)), this.n37_1), imports), listOf(endpointImport)), file.cv_1));
|
|
529
513
|
};
|
|
530
|
-
protoOf(JavaEmitter).
|
|
514
|
+
protoOf(JavaEmitter).d1b = function (endpoints, logger) {
|
|
531
515
|
// Inline function 'kotlin.collections.flatMap' call
|
|
532
516
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
533
517
|
var destination = ArrayList_init_$Create$_0();
|
|
@@ -543,7 +527,7 @@ protoOf(JavaEmitter).d1a = function (endpoints, logger) {
|
|
|
543
527
|
var _iterator__ex2g4s_0 = destination.t();
|
|
544
528
|
while (_iterator__ex2g4s_0.u()) {
|
|
545
529
|
var e = _iterator__ex2g4s_0.v();
|
|
546
|
-
var key = e.
|
|
530
|
+
var key = e.x19_1;
|
|
547
531
|
if (set.x(key)) {
|
|
548
532
|
list_0.x(e);
|
|
549
533
|
}
|
|
@@ -570,7 +554,7 @@ protoOf(JavaEmitter).d1a = function (endpoints, logger) {
|
|
|
570
554
|
var _iterator__ex2g4s_2 = endpoints.t();
|
|
571
555
|
while (_iterator__ex2g4s_2.u()) {
|
|
572
556
|
var element_1 = _iterator__ex2g4s_2.v();
|
|
573
|
-
if (element_1.fr_1.o1() === element_0.
|
|
557
|
+
if (element_1.fr_1.o1() === element_0.x19_1) {
|
|
574
558
|
tmp$ret$8 = false;
|
|
575
559
|
break $l$block_0;
|
|
576
560
|
}
|
|
@@ -587,7 +571,7 @@ protoOf(JavaEmitter).d1a = function (endpoints, logger) {
|
|
|
587
571
|
var _iterator__ex2g4s_3 = destination_0.t();
|
|
588
572
|
while (_iterator__ex2g4s_3.u()) {
|
|
589
573
|
var item = _iterator__ex2g4s_3.v();
|
|
590
|
-
var tmp$ret$12 = import_0(this.
|
|
574
|
+
var tmp$ret$12 = import_0(this.p37().bt_1 + '.model', item.x19_1);
|
|
591
575
|
destination_1.x(tmp$ret$12);
|
|
592
576
|
}
|
|
593
577
|
var imports = destination_1;
|
|
@@ -597,7 +581,7 @@ protoOf(JavaEmitter).d1a = function (endpoints, logger) {
|
|
|
597
581
|
var _iterator__ex2g4s_4 = endpoints.t();
|
|
598
582
|
while (_iterator__ex2g4s_4.u()) {
|
|
599
583
|
var item_0 = _iterator__ex2g4s_4.v();
|
|
600
|
-
var tmp$ret$15 = import_0(this.
|
|
584
|
+
var tmp$ret$15 = import_0(this.p37().bt_1 + '.endpoint', item_0.fr_1.o1());
|
|
601
585
|
destination_2.x(tmp$ret$15);
|
|
602
586
|
}
|
|
603
587
|
var endpointImports = destination_2;
|
|
@@ -607,19 +591,19 @@ protoOf(JavaEmitter).d1a = function (endpoints, logger) {
|
|
|
607
591
|
var _iterator__ex2g4s_5 = endpoints.t();
|
|
608
592
|
while (_iterator__ex2g4s_5.u()) {
|
|
609
593
|
var item_1 = _iterator__ex2g4s_5.v();
|
|
610
|
-
var tmp$ret$18 = import_0(this.
|
|
594
|
+
var tmp$ret$18 = import_0(this.p37().bt_1 + '.client', item_1.fr_1.o1() + 'Client');
|
|
611
595
|
destination_3.x(tmp$ret$18);
|
|
612
596
|
}
|
|
613
597
|
var clientImports = destination_3;
|
|
614
598
|
var allImports = plus(plus(imports, endpointImports), clientImports);
|
|
615
|
-
var file = sanitizeNames(emitClient.call(this, endpoints, logger), this.
|
|
616
|
-
return new File(Companion_getInstance().wt(this.
|
|
599
|
+
var file = sanitizeNames(emitClient.call(this, endpoints, logger), this.o37_1);
|
|
600
|
+
return new File(Companion_getInstance().wt(this.p37().dt() + sanitizeSymbol(this, file.bv_1.zt())), plus(plus(plus(listOf(new Package(this.p37().bt_1)), this.n37_1), allImports), file.cv_1));
|
|
617
601
|
};
|
|
618
602
|
function transformTypeDescriptors(_this__u8e3s4) {
|
|
619
603
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
620
604
|
var scope = new TransformScope(_this__u8e3s4);
|
|
621
|
-
scope.
|
|
622
|
-
var tmp = scope.
|
|
605
|
+
scope.s19(transformTypeDescriptors$lambda);
|
|
606
|
+
var tmp = scope.a19_1;
|
|
623
607
|
return isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
624
608
|
}
|
|
625
609
|
function applyRefinedStructShape(_this__u8e3s4, refined) {
|
|
@@ -628,14 +612,14 @@ function applyRefinedStructShape(_this__u8e3s4, refined) {
|
|
|
628
612
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
629
613
|
var tmp = scope;
|
|
630
614
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
631
|
-
var this_0 = scope.
|
|
615
|
+
var this_0 = scope.a19_1;
|
|
632
616
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
633
617
|
// Inline function 'kotlin.apply' call
|
|
634
618
|
var this_1 = new TransformerBuilder();
|
|
635
|
-
this_1.
|
|
636
|
-
var tmp$ret$4 = this_1.
|
|
637
|
-
tmp.
|
|
638
|
-
var tmp_0 = scope.
|
|
619
|
+
this_1.u19(applyRefinedStructShape$lambda(refined));
|
|
620
|
+
var tmp$ret$4 = this_1.p19();
|
|
621
|
+
tmp.a19_1 = transform(this_0, tmp$ret$4);
|
|
622
|
+
var tmp_0 = scope.a19_1;
|
|
639
623
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
640
624
|
}
|
|
641
625
|
function injectApi(_this__u8e3s4, endpoint) {
|
|
@@ -645,14 +629,14 @@ function injectApi(_this__u8e3s4, endpoint) {
|
|
|
645
629
|
var tmp = scope;
|
|
646
630
|
// Inline function 'community.flock.wirespec.compiler.core.ir.injectAfter' call
|
|
647
631
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
648
|
-
var this_0 = scope.
|
|
632
|
+
var this_0 = scope.a19_1;
|
|
649
633
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
650
634
|
// Inline function 'kotlin.apply' call
|
|
651
635
|
var this_1 = new TransformerBuilder();
|
|
652
|
-
this_1.
|
|
653
|
-
var tmp$ret$5 = this_1.
|
|
654
|
-
tmp.
|
|
655
|
-
var tmp_0 = scope.
|
|
636
|
+
this_1.u19(injectApi$lambda(endpoint));
|
|
637
|
+
var tmp$ret$5 = this_1.p19();
|
|
638
|
+
tmp.a19_1 = transform(this_0, tmp$ret$5);
|
|
639
|
+
var tmp_0 = scope.a19_1;
|
|
656
640
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
657
641
|
}
|
|
658
642
|
function buildModelImports(_this__u8e3s4, packageName) {
|
|
@@ -663,7 +647,7 @@ function buildModelImports(_this__u8e3s4, packageName) {
|
|
|
663
647
|
var _iterator__ex2g4s = tmp0.t();
|
|
664
648
|
while (_iterator__ex2g4s.u()) {
|
|
665
649
|
var element = _iterator__ex2g4s.v();
|
|
666
|
-
if (!(_this__u8e3s4.ds().o1() === element.
|
|
650
|
+
if (!(_this__u8e3s4.ds().o1() === element.x19_1)) {
|
|
667
651
|
destination.x(element);
|
|
668
652
|
}
|
|
669
653
|
}
|
|
@@ -673,7 +657,7 @@ function buildModelImports(_this__u8e3s4, packageName) {
|
|
|
673
657
|
var _iterator__ex2g4s_0 = destination.t();
|
|
674
658
|
while (_iterator__ex2g4s_0.u()) {
|
|
675
659
|
var item = _iterator__ex2g4s_0.v();
|
|
676
|
-
var tmp$ret$5 = import_0(packageName.bt_1 + '.model', Companion_getInstance().wt(item.
|
|
660
|
+
var tmp$ret$5 = import_0(packageName.bt_1 + '.model', Companion_getInstance().wt(item.x19_1).zt());
|
|
677
661
|
destination_0.x(tmp$ret$5);
|
|
678
662
|
}
|
|
679
663
|
return destination_0;
|
|
@@ -684,14 +668,14 @@ function qualifyChannelReferences(_this__u8e3s4, fullyQualifiedPrefix) {
|
|
|
684
668
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
685
669
|
var tmp = scope;
|
|
686
670
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
687
|
-
var this_0 = scope.
|
|
671
|
+
var this_0 = scope.a19_1;
|
|
688
672
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
689
673
|
// Inline function 'kotlin.apply' call
|
|
690
674
|
var this_1 = new TransformerBuilder();
|
|
691
|
-
this_1.
|
|
692
|
-
var tmp$ret$4 = this_1.
|
|
693
|
-
tmp.
|
|
694
|
-
var tmp_0 = scope.
|
|
675
|
+
this_1.u19(qualifyChannelReferences$lambda(fullyQualifiedPrefix));
|
|
676
|
+
var tmp$ret$4 = this_1.p19();
|
|
677
|
+
tmp.a19_1 = transform(this_0, tmp$ret$4);
|
|
678
|
+
var tmp_0 = scope.a19_1;
|
|
695
679
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
696
680
|
}
|
|
697
681
|
function wrapAsyncReturnInThenApply(_this__u8e3s4, endpointName) {
|
|
@@ -700,26 +684,26 @@ function wrapAsyncReturnInThenApply(_this__u8e3s4, endpointName) {
|
|
|
700
684
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
701
685
|
var tmp = scope;
|
|
702
686
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
703
|
-
var this_0 = scope.
|
|
687
|
+
var this_0 = scope.a19_1;
|
|
704
688
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
705
689
|
// Inline function 'kotlin.apply' call
|
|
706
690
|
var this_1 = new TransformerBuilder();
|
|
707
|
-
this_1.
|
|
708
|
-
var tmp$ret$4 = this_1.
|
|
709
|
-
tmp.
|
|
710
|
-
var tmp_0 = scope.
|
|
691
|
+
this_1.u19(wrapAsyncReturnInThenApply$lambda(endpointName));
|
|
692
|
+
var tmp$ret$4 = this_1.p19();
|
|
693
|
+
tmp.a19_1 = transform(this_0, tmp$ret$4);
|
|
694
|
+
var tmp_0 = scope.a19_1;
|
|
711
695
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
712
696
|
}
|
|
713
697
|
function findRoot(_this__u8e3s4) {
|
|
714
698
|
var tmp;
|
|
715
699
|
if (_this__u8e3s4 instanceof Nullable) {
|
|
716
|
-
tmp = findRoot(_this__u8e3s4.
|
|
700
|
+
tmp = findRoot(_this__u8e3s4.ru_1);
|
|
717
701
|
} else {
|
|
718
702
|
if (_this__u8e3s4 instanceof Array_0) {
|
|
719
|
-
tmp = findRoot(_this__u8e3s4.
|
|
703
|
+
tmp = findRoot(_this__u8e3s4.iu_1);
|
|
720
704
|
} else {
|
|
721
705
|
if (_this__u8e3s4 instanceof Dict) {
|
|
722
|
-
tmp = findRoot(_this__u8e3s4.
|
|
706
|
+
tmp = findRoot(_this__u8e3s4.lu_1);
|
|
723
707
|
} else {
|
|
724
708
|
tmp = _this__u8e3s4;
|
|
725
709
|
}
|
|
@@ -748,7 +732,7 @@ function toJavaName(_this__u8e3s4) {
|
|
|
748
732
|
var tmp;
|
|
749
733
|
if (_this__u8e3s4 instanceof Integer) {
|
|
750
734
|
var tmp_0;
|
|
751
|
-
switch (_this__u8e3s4.
|
|
735
|
+
switch (_this__u8e3s4.gu_1.e3_1) {
|
|
752
736
|
case 0:
|
|
753
737
|
tmp_0 = 'Integer';
|
|
754
738
|
break;
|
|
@@ -763,7 +747,7 @@ function toJavaName(_this__u8e3s4) {
|
|
|
763
747
|
} else {
|
|
764
748
|
if (_this__u8e3s4 instanceof Number_0) {
|
|
765
749
|
var tmp_1;
|
|
766
|
-
switch (_this__u8e3s4.
|
|
750
|
+
switch (_this__u8e3s4.hu_1.e3_1) {
|
|
767
751
|
case 0:
|
|
768
752
|
tmp_1 = 'Float';
|
|
769
753
|
break;
|
|
@@ -792,7 +776,7 @@ function toJavaName(_this__u8e3s4) {
|
|
|
792
776
|
tmp = 'Void';
|
|
793
777
|
} else {
|
|
794
778
|
if (_this__u8e3s4 instanceof Custom) {
|
|
795
|
-
tmp = _this__u8e3s4.
|
|
779
|
+
tmp = _this__u8e3s4.nu_1.zt();
|
|
796
780
|
} else {
|
|
797
781
|
tmp = 'Object';
|
|
798
782
|
}
|
|
@@ -818,14 +802,14 @@ function withFullyQualifiedPrefix(_this__u8e3s4, prefix) {
|
|
|
818
802
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matching' call
|
|
819
803
|
var tmp_0 = scope;
|
|
820
804
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatching' call
|
|
821
|
-
var this_0 = scope.
|
|
805
|
+
var this_0 = scope.a19_1;
|
|
822
806
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
823
807
|
// Inline function 'kotlin.apply' call
|
|
824
808
|
var this_1 = new TransformerBuilder();
|
|
825
|
-
this_1.
|
|
826
|
-
var tmp$ret$5 = this_1.
|
|
827
|
-
tmp_0.
|
|
828
|
-
var tmp_1 = scope.
|
|
809
|
+
this_1.g19(withFullyQualifiedPrefix$lambda(prefix));
|
|
810
|
+
var tmp$ret$5 = this_1.p19();
|
|
811
|
+
tmp_0.a19_1 = transform(this_0, tmp$ret$5);
|
|
812
|
+
var tmp_1 = scope.a19_1;
|
|
829
813
|
tmp = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
830
814
|
} else {
|
|
831
815
|
tmp = _this__u8e3s4;
|
|
@@ -835,8 +819,8 @@ function withFullyQualifiedPrefix(_this__u8e3s4, prefix) {
|
|
|
835
819
|
function transformTypeDescriptors$lambda(stmt, tr) {
|
|
836
820
|
var tmp;
|
|
837
821
|
if (stmt instanceof TypeDescriptor) {
|
|
838
|
-
var rootType = findRoot(stmt.
|
|
839
|
-
var containerStr = rawContainerClass(stmt.
|
|
822
|
+
var rootType = findRoot(stmt.by_1);
|
|
823
|
+
var containerStr = rawContainerClass(stmt.by_1);
|
|
840
824
|
var rootStr = toJavaName(rootType) + '.class';
|
|
841
825
|
var tmp_0;
|
|
842
826
|
if (containerStr == null) {
|
|
@@ -849,14 +833,14 @@ function transformTypeDescriptors$lambda(stmt, tr) {
|
|
|
849
833
|
var containerArg = tmp2_elvis_lhs == null ? 'null' : tmp2_elvis_lhs;
|
|
850
834
|
tmp = new RawExpression('Wirespec.getType(' + rootStr + ', ' + containerArg + ')');
|
|
851
835
|
} else {
|
|
852
|
-
tmp =
|
|
836
|
+
tmp = transformChildren_0(stmt, tr);
|
|
853
837
|
}
|
|
854
838
|
return tmp;
|
|
855
839
|
}
|
|
856
840
|
function applyRefinedStructShape$lambda$lambda($refined) {
|
|
857
841
|
return function ($this$function) {
|
|
858
|
-
$this$function.
|
|
859
|
-
$this$function.
|
|
842
|
+
$this$function.t13(convert_7($refined.ms_1));
|
|
843
|
+
$this$function.z13(new VariableReference(Companion_getInstance().wt('value')));
|
|
860
844
|
return Unit_instance;
|
|
861
845
|
};
|
|
862
846
|
}
|
|
@@ -866,39 +850,39 @@ function applyRefinedStructShape$lambda($refined) {
|
|
|
866
850
|
if (element instanceof Struct) {
|
|
867
851
|
var tmp_0 = listOf(Custom_init_$Create$('Wirespec.Refined'));
|
|
868
852
|
// Inline function 'kotlin.collections.map' call
|
|
869
|
-
var this_0 = element.
|
|
853
|
+
var this_0 = element.fx_1;
|
|
870
854
|
// Inline function 'kotlin.collections.mapTo' call
|
|
871
855
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
872
856
|
var _iterator__ex2g4s = this_0.t();
|
|
873
857
|
while (_iterator__ex2g4s.u()) {
|
|
874
858
|
var item = _iterator__ex2g4s.v();
|
|
875
859
|
var tmp0_safe_receiver = item instanceof Function ? item : null;
|
|
876
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
860
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zx(VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
|
|
877
861
|
var tmp$ret$3 = tmp1_elvis_lhs == null ? item : tmp1_elvis_lhs;
|
|
878
862
|
destination.x(tmp$ret$3);
|
|
879
863
|
}
|
|
880
|
-
var tmp0 = element.
|
|
864
|
+
var tmp0 = element.mx(VOID, VOID, VOID, tmp_0, destination);
|
|
881
865
|
// Inline function 'community.flock.wirespec.compiler.core.ir.plus' call
|
|
882
866
|
var element_0 = function_0('value', VOID, true, applyRefinedStructShape$lambda$lambda($refined));
|
|
883
867
|
var tmp_1;
|
|
884
868
|
if (tmp0 instanceof File) {
|
|
885
|
-
var tmp_2 = tmp0.
|
|
869
|
+
var tmp_2 = tmp0.fv(VOID, plus_0(tmp0.cv_1, element_0));
|
|
886
870
|
tmp_1 = tmp_2 instanceof Struct ? tmp_2 : THROW_CCE();
|
|
887
871
|
} else {
|
|
888
872
|
if (tmp0 instanceof Struct) {
|
|
889
|
-
var tmp_3 = tmp0.
|
|
873
|
+
var tmp_3 = tmp0.mx(VOID, VOID, VOID, VOID, plus_0(tmp0.fx_1, element_0));
|
|
890
874
|
tmp_1 = tmp_3 instanceof Struct ? tmp_3 : THROW_CCE();
|
|
891
875
|
} else {
|
|
892
876
|
if (tmp0 instanceof Namespace) {
|
|
893
|
-
var tmp_4 = tmp0.
|
|
877
|
+
var tmp_4 = tmp0.mv(VOID, plus_0(tmp0.iv_1, element_0));
|
|
894
878
|
tmp_1 = tmp_4 instanceof Struct ? tmp_4 : THROW_CCE();
|
|
895
879
|
} else {
|
|
896
880
|
if (tmp0 instanceof Interface) {
|
|
897
|
-
var tmp_5 = tmp0.
|
|
881
|
+
var tmp_5 = tmp0.vv(VOID, plus_0(tmp0.ov_1, element_0));
|
|
898
882
|
tmp_1 = tmp_5 instanceof Struct ? tmp_5 : THROW_CCE();
|
|
899
883
|
} else {
|
|
900
884
|
if (tmp0 instanceof Enum) {
|
|
901
|
-
var tmp_6 = tmp0.
|
|
885
|
+
var tmp_6 = tmp0.ax(VOID, VOID, VOID, VOID, VOID, plus_0(tmp0.xw_1, element_0));
|
|
902
886
|
tmp_1 = tmp_6 instanceof Struct ? tmp_6 : THROW_CCE();
|
|
903
887
|
} else {
|
|
904
888
|
noWhenBranchMatchedException();
|
|
@@ -912,7 +896,7 @@ function applyRefinedStructShape$lambda($refined) {
|
|
|
912
896
|
tmp = element;
|
|
913
897
|
}
|
|
914
898
|
var transformed = tmp;
|
|
915
|
-
return
|
|
899
|
+
return transformChildren(transformed, transformer);
|
|
916
900
|
};
|
|
917
901
|
}
|
|
918
902
|
function injectApi$lambda($endpoint) {
|
|
@@ -924,22 +908,22 @@ function injectApi$lambda($endpoint) {
|
|
|
924
908
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
925
909
|
if (!injected.r()) {
|
|
926
910
|
// Inline function 'community.flock.wirespec.compiler.core.ir.withElements' call
|
|
927
|
-
var elements = plus(element.
|
|
911
|
+
var elements = plus(element.dv(), injected);
|
|
928
912
|
var tmp_1;
|
|
929
913
|
if (element instanceof File) {
|
|
930
|
-
tmp_1 = element.
|
|
914
|
+
tmp_1 = element.fv(VOID, elements);
|
|
931
915
|
} else {
|
|
932
916
|
if (element instanceof Struct) {
|
|
933
|
-
tmp_1 = element.
|
|
917
|
+
tmp_1 = element.mx(VOID, VOID, VOID, VOID, elements);
|
|
934
918
|
} else {
|
|
935
919
|
if (element instanceof Namespace) {
|
|
936
|
-
tmp_1 = element.
|
|
920
|
+
tmp_1 = element.mv(VOID, elements);
|
|
937
921
|
} else {
|
|
938
922
|
if (element instanceof Interface) {
|
|
939
|
-
tmp_1 = element.
|
|
923
|
+
tmp_1 = element.vv(VOID, elements);
|
|
940
924
|
} else {
|
|
941
925
|
if (element instanceof Enum) {
|
|
942
|
-
tmp_1 = element.
|
|
926
|
+
tmp_1 = element.ax(VOID, VOID, VOID, VOID, VOID, elements);
|
|
943
927
|
} else {
|
|
944
928
|
if (element instanceof Main) {
|
|
945
929
|
tmp_1 = element;
|
|
@@ -961,7 +945,7 @@ function injectApi$lambda($endpoint) {
|
|
|
961
945
|
tmp = element;
|
|
962
946
|
}
|
|
963
947
|
var transformed = tmp;
|
|
964
|
-
return
|
|
948
|
+
return transformChildren(transformed, transformer);
|
|
965
949
|
};
|
|
966
950
|
}
|
|
967
951
|
function qualifyChannelReferences$lambda($fullyQualifiedPrefix) {
|
|
@@ -973,7 +957,7 @@ function qualifyChannelReferences$lambda($fullyQualifiedPrefix) {
|
|
|
973
957
|
tmp = element;
|
|
974
958
|
}
|
|
975
959
|
var transformed = tmp;
|
|
976
|
-
return
|
|
960
|
+
return transformChildren(transformed, transformer);
|
|
977
961
|
};
|
|
978
962
|
}
|
|
979
963
|
function wrapAsyncReturnInThenApply$lambda($endpointName) {
|
|
@@ -982,11 +966,11 @@ function wrapAsyncReturnInThenApply$lambda($endpointName) {
|
|
|
982
966
|
if (element instanceof Function) {
|
|
983
967
|
var tmp$ret$0;
|
|
984
968
|
$l$block_1: {
|
|
985
|
-
if (!element.
|
|
969
|
+
if (!element.sx_1 || element.rx_1.c1() < 2) {
|
|
986
970
|
tmp$ret$0 = element;
|
|
987
971
|
break $l$block_1;
|
|
988
972
|
}
|
|
989
|
-
var tmp_0 = element.
|
|
973
|
+
var tmp_0 = element.rx_1.b1(element.rx_1.c1() - 2 | 0);
|
|
990
974
|
var tmp0_elvis_lhs = tmp_0 instanceof Assignment ? tmp_0 : null;
|
|
991
975
|
var tmp_1;
|
|
992
976
|
if (tmp0_elvis_lhs == null) {
|
|
@@ -996,29 +980,29 @@ function wrapAsyncReturnInThenApply$lambda($endpointName) {
|
|
|
996
980
|
tmp_1 = tmp0_elvis_lhs;
|
|
997
981
|
}
|
|
998
982
|
var transportAssign = tmp_1;
|
|
999
|
-
var tmp_2 = last(element.
|
|
983
|
+
var tmp_2 = last(element.rx_1);
|
|
1000
984
|
if (!(tmp_2 instanceof ReturnStatement)) {
|
|
1001
985
|
tmp$ret$0 = element;
|
|
1002
986
|
break $l$block_1;
|
|
1003
987
|
}
|
|
1004
|
-
var tmp_3 = dropLast(element.
|
|
988
|
+
var tmp_3 = dropLast(element.rx_1, 2);
|
|
1005
989
|
var tmp1_name = Companion_getInstance().wt('thenApply');
|
|
1006
|
-
var tmp2_receiver = transportAssign.
|
|
990
|
+
var tmp2_receiver = transportAssign.ey_1;
|
|
1007
991
|
var tmp3_arguments = mapOf(to(Companion_getInstance().wt('mapper'), new RawExpression('rawResponse -> ' + $endpointName + '.fromRawResponse(serialization(), rawResponse)')));
|
|
1008
|
-
tmp$ret$0 = element.
|
|
992
|
+
tmp$ret$0 = element.zx(VOID, VOID, VOID, VOID, plus_0(tmp_3, new ReturnStatement(new FunctionCall(tmp2_receiver, VOID, tmp1_name, tmp3_arguments))));
|
|
1009
993
|
}
|
|
1010
994
|
tmp = tmp$ret$0;
|
|
1011
995
|
} else {
|
|
1012
996
|
tmp = element;
|
|
1013
997
|
}
|
|
1014
998
|
var transformed = tmp;
|
|
1015
|
-
return
|
|
999
|
+
return transformChildren(transformed, transformer);
|
|
1016
1000
|
};
|
|
1017
1001
|
}
|
|
1018
1002
|
function buildApiStruct$lambda(it) {
|
|
1019
1003
|
var tmp;
|
|
1020
1004
|
if (it instanceof Literal) {
|
|
1021
|
-
tmp = it.
|
|
1005
|
+
tmp = it.a1b_1;
|
|
1022
1006
|
} else {
|
|
1023
1007
|
if (it instanceof Param) {
|
|
1024
1008
|
tmp = '{' + it.mr_1.o1() + '}';
|
|
@@ -1030,38 +1014,38 @@ function buildApiStruct$lambda(it) {
|
|
|
1030
1014
|
}
|
|
1031
1015
|
function buildApiStruct$lambda$lambda($pathTemplate) {
|
|
1032
1016
|
return function ($this$function) {
|
|
1033
|
-
$this$function.
|
|
1034
|
-
$this$function.
|
|
1017
|
+
$this$function.t13(String_instance);
|
|
1018
|
+
$this$function.z13($this$function.e15($pathTemplate));
|
|
1035
1019
|
return Unit_instance;
|
|
1036
1020
|
};
|
|
1037
1021
|
}
|
|
1038
1022
|
function buildApiStruct$lambda$lambda_0($this_buildApiStruct) {
|
|
1039
1023
|
return function ($this$function) {
|
|
1040
|
-
$this$function.
|
|
1041
|
-
$this$function.
|
|
1024
|
+
$this$function.t13(String_instance);
|
|
1025
|
+
$this$function.z13($this$function.e15($this_buildApiStruct.gr_1.d3_1));
|
|
1042
1026
|
return Unit_instance;
|
|
1043
1027
|
};
|
|
1044
1028
|
}
|
|
1045
1029
|
function buildApiStruct$lambda$lambda_1($this$function) {
|
|
1046
|
-
$this$function.
|
|
1047
|
-
$this$function.
|
|
1048
|
-
$this$function.
|
|
1030
|
+
$this$function.t13($this$function.a15('Wirespec.ServerEdge', [$this$function.a15('Request', []), $this$function.a15('Response', [Wildcard_instance])]));
|
|
1031
|
+
$this$function.w13('serialization', $this$function.a15('Wirespec.Serialization', []));
|
|
1032
|
+
$this$function.z13(new RawExpression('new Wirespec.ServerEdge<>() {\n@Override public Request from(Wirespec.RawRequest request) {\n return fromRawRequest(serialization, request);\n}\n@Override public Wirespec.RawResponse to(Response<?> response) {\n return toRawResponse(serialization, response);\n}\n}'));
|
|
1049
1033
|
return Unit_instance;
|
|
1050
1034
|
}
|
|
1051
1035
|
function buildApiStruct$lambda$lambda_2($this$function) {
|
|
1052
|
-
$this$function.
|
|
1053
|
-
$this$function.
|
|
1054
|
-
$this$function.
|
|
1036
|
+
$this$function.t13($this$function.a15('Wirespec.ClientEdge', [$this$function.a15('Request', []), $this$function.a15('Response', [Wildcard_instance])]));
|
|
1037
|
+
$this$function.w13('serialization', $this$function.a15('Wirespec.Serialization', []));
|
|
1038
|
+
$this$function.z13(new RawExpression('new Wirespec.ClientEdge<>() {\n@Override public Wirespec.RawRequest to(Request request) {\n return toRawRequest(serialization, request);\n}\n@Override public Response<?> from(Wirespec.RawResponse response) {\n return fromRawResponse(serialization, response);\n}\n}'));
|
|
1055
1039
|
return Unit_instance;
|
|
1056
1040
|
}
|
|
1057
1041
|
function buildApiStruct$lambda_0($pathTemplate, $this_buildApiStruct) {
|
|
1058
1042
|
return function ($this$struct) {
|
|
1059
|
-
$this$struct.
|
|
1060
|
-
$this$struct.
|
|
1061
|
-
$this$struct.
|
|
1062
|
-
$this$struct.
|
|
1063
|
-
$this$struct.
|
|
1064
|
-
$this$struct.
|
|
1043
|
+
$this$struct.t15($this$struct.a15('Wirespec.Server', [$this$struct.a15('Request', []), $this$struct.a15('Response', [Wildcard_instance])]));
|
|
1044
|
+
$this$struct.t15($this$struct.a15('Wirespec.Client', [$this$struct.a15('Request', []), $this$struct.a15('Response', [Wildcard_instance])]));
|
|
1045
|
+
$this$struct.g16('getPathTemplate', VOID, true, buildApiStruct$lambda$lambda($pathTemplate));
|
|
1046
|
+
$this$struct.g16('getMethod', VOID, true, buildApiStruct$lambda$lambda_0($this_buildApiStruct));
|
|
1047
|
+
$this$struct.g16('getServer', VOID, true, buildApiStruct$lambda$lambda_1);
|
|
1048
|
+
$this$struct.g16('getClient', VOID, true, buildApiStruct$lambda$lambda_2);
|
|
1065
1049
|
return Unit_instance;
|
|
1066
1050
|
};
|
|
1067
1051
|
}
|
|
@@ -1069,7 +1053,7 @@ function withFullyQualifiedPrefix$lambda($prefix) {
|
|
|
1069
1053
|
return function (type, transformer) {
|
|
1070
1054
|
var tmp;
|
|
1071
1055
|
if (type instanceof Custom) {
|
|
1072
|
-
tmp = type.
|
|
1056
|
+
tmp = type.qu(new Name(listOf($prefix + type.nu_1.zt())));
|
|
1073
1057
|
} else {
|
|
1074
1058
|
tmp = type;
|
|
1075
1059
|
}
|
|
@@ -1078,10 +1062,10 @@ function withFullyQualifiedPrefix$lambda($prefix) {
|
|
|
1078
1062
|
};
|
|
1079
1063
|
}
|
|
1080
1064
|
//region block: post-declaration
|
|
1081
|
-
protoOf(JavaEmitter).
|
|
1065
|
+
protoOf(JavaEmitter).e1b = get_extensions;
|
|
1082
1066
|
protoOf(JavaEmitter).to = emit_0;
|
|
1083
|
-
protoOf(JavaEmitter).
|
|
1084
|
-
protoOf(JavaEmitter).
|
|
1067
|
+
protoOf(JavaEmitter).b1b = emit_1;
|
|
1068
|
+
protoOf(JavaEmitter).g1b = beforeGenerate;
|
|
1085
1069
|
protoOf(JavaEmitter).vp = get_supportsDefaults;
|
|
1086
1070
|
//endregion
|
|
1087
1071
|
//region block: exports
|