@flock/wirespec 0.22.6 → 0.22.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/arrow-arrow-atomic.mjs +11 -11
- package/arrow-arrow-core.mjs +150 -150
- package/clikt-clikt-mordant.mjs +80 -80
- package/clikt-clikt.mjs +1488 -1488
- package/colormath-root-colormath.mjs +441 -441
- package/kotlin-kotlin-stdlib.mjs +1626 -1604
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +10134 -10134
- package/kotlin-rgxgen.mjs +1802 -1802
- package/kotlinx-io-kotlinx-io-core.mjs +414 -414
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +1816 -1816
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1570 -1570
- package/mordant-mordant.mjs +1280 -1280
- package/package.json +1 -1
- package/wirespec-src-compiler-core.mjs +6797 -6957
- package/wirespec-src-compiler-core.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-java.mjs +177 -177
- package/wirespec-src-compiler-emitters-kotlin.mjs +132 -132
- package/wirespec-src-compiler-emitters-python.mjs +166 -166
- package/wirespec-src-compiler-emitters-rust.mjs +1501 -2116
- package/wirespec-src-compiler-emitters-rust.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-scala.mjs +165 -165
- package/wirespec-src-compiler-emitters-typescript.mjs +214 -214
- package/wirespec-src-compiler-emitters-wirespec.mjs +178 -198
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +282 -282
- package/wirespec-src-converter-asyncapi.mjs +849 -767
- package/wirespec-src-converter-asyncapi.mjs.map +1 -1
- package/wirespec-src-converter-avro.mjs +596 -595
- package/wirespec-src-converter-avro.mjs.map +1 -1
- package/wirespec-src-converter-common.mjs +18 -18
- package/wirespec-src-converter-graphql.mjs +1064 -1064
- package/wirespec-src-converter-openapi.mjs +774 -662
- package/wirespec-src-converter-openapi.mjs.map +1 -1
- package/wirespec-src-ide-lsp.mjs +1375 -1375
- package/wirespec-src-plugin-arguments.mjs +200 -190
- package/wirespec-src-plugin-arguments.mjs.map +1 -1
- package/wirespec-src-plugin-cli.mjs +112 -112
- package/wirespec-src-plugin-extensions.mjs +1034 -998
- package/wirespec-src-plugin-extensions.mjs.map +1 -1
- package/wirespec-src-plugin-npm.mjs +54 -54
- package/wirespec-src-tools-generator.mjs +32 -32
|
@@ -147,7 +147,7 @@ function sanitizeSymbol($this, $receiver) {
|
|
|
147
147
|
var item = _iterator__ex2g4s.v();
|
|
148
148
|
var _unary__edvuaz = index;
|
|
149
149
|
index = _unary__edvuaz + 1 | 0;
|
|
150
|
-
var tmp$ret$2 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.
|
|
150
|
+
var tmp$ret$2 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.zr(item) : item;
|
|
151
151
|
destination.x(tmp$ret$2);
|
|
152
152
|
}
|
|
153
153
|
// Inline function 'kotlin.text.filter' call
|
|
@@ -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().n37().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.m37_1 = JavaGenerator_getInstance();
|
|
198
198
|
}
|
|
199
|
-
protoOf(Companion).
|
|
200
|
-
return this.
|
|
199
|
+
protoOf(Companion).n37 = function () {
|
|
200
|
+
return this.m37_1.m1c_1;
|
|
201
201
|
};
|
|
202
202
|
var Companion_instance_2;
|
|
203
203
|
function Companion_getInstance_0() {
|
|
@@ -209,10 +209,10 @@ function JavaEmitter$sanitizationConfig$lambda(it) {
|
|
|
209
209
|
return '_' + it;
|
|
210
210
|
}
|
|
211
211
|
function JavaEmitter$sanitizationConfig$lambda_0(name) {
|
|
212
|
-
return name.
|
|
212
|
+
return name.yt_1.c1() > 1 ? new Name(listOf(name.cu())) : name;
|
|
213
213
|
}
|
|
214
214
|
function JavaEmitter$sanitizationConfig$lambda_1(name) {
|
|
215
|
-
return new Name(listOf(name.
|
|
215
|
+
return new Name(listOf(name.cu()));
|
|
216
216
|
}
|
|
217
217
|
function JavaEmitter$sanitizationConfig$lambda_2(this$0) {
|
|
218
218
|
return function (it) {
|
|
@@ -220,11 +220,11 @@ function JavaEmitter$sanitizationConfig$lambda_2(this$0) {
|
|
|
220
220
|
};
|
|
221
221
|
}
|
|
222
222
|
function JavaEmitter$emitShared$lambda(name) {
|
|
223
|
-
switch (name.
|
|
223
|
+
switch (name.bu()) {
|
|
224
224
|
case 'client':
|
|
225
|
-
return Companion_getInstance().
|
|
225
|
+
return Companion_getInstance().au('getClient');
|
|
226
226
|
case 'server':
|
|
227
|
-
return Companion_getInstance().
|
|
227
|
+
return Companion_getInstance().au('getServer');
|
|
228
228
|
default:
|
|
229
229
|
return null;
|
|
230
230
|
}
|
|
@@ -234,7 +234,7 @@ function JavaEmitter$emitShared$lambda_0($imports) {
|
|
|
234
234
|
var tmp;
|
|
235
235
|
if (element instanceof File) {
|
|
236
236
|
// Inline function 'kotlin.collections.partition' call
|
|
237
|
-
var this_0 = element.
|
|
237
|
+
var this_0 = element.gv_1;
|
|
238
238
|
var first = ArrayList_init_$Create$_0();
|
|
239
239
|
var second = ArrayList_init_$Create$_0();
|
|
240
240
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -247,9 +247,9 @@ function JavaEmitter$emitShared$lambda_0($imports) {
|
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
var _destruct__k2r9zo = new Pair(first, second);
|
|
250
|
-
var packageElements = _destruct__k2r9zo.
|
|
251
|
-
var rest = _destruct__k2r9zo.
|
|
252
|
-
tmp = element.
|
|
250
|
+
var packageElements = _destruct__k2r9zo.af();
|
|
251
|
+
var rest = _destruct__k2r9zo.bf();
|
|
252
|
+
tmp = element.jv(VOID, plus(plus(packageElements, $imports), rest));
|
|
253
253
|
} else {
|
|
254
254
|
tmp = element;
|
|
255
255
|
}
|
|
@@ -261,27 +261,27 @@ function JavaEmitter$emitShared$lambda_1($clientServer) {
|
|
|
261
261
|
return function (element, transformer) {
|
|
262
262
|
var tmp;
|
|
263
263
|
if (element instanceof Namespace) {
|
|
264
|
-
var injected = element.
|
|
264
|
+
var injected = element.lv_1.equals(Companion_getInstance().au('Wirespec')) ? $clientServer : emptyList();
|
|
265
265
|
var tmp_0;
|
|
266
266
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
267
267
|
if (!injected.r()) {
|
|
268
268
|
// Inline function 'community.flock.wirespec.compiler.core.ir.withElements' call
|
|
269
|
-
var elements = plus(element.
|
|
269
|
+
var elements = plus(element.hv(), injected);
|
|
270
270
|
var tmp_1;
|
|
271
271
|
if (element instanceof File) {
|
|
272
|
-
tmp_1 = element.
|
|
272
|
+
tmp_1 = element.jv(VOID, elements);
|
|
273
273
|
} else {
|
|
274
274
|
if (element instanceof Struct) {
|
|
275
|
-
tmp_1 = element.
|
|
275
|
+
tmp_1 = element.qx(VOID, VOID, VOID, VOID, elements);
|
|
276
276
|
} else {
|
|
277
277
|
if (element instanceof Namespace) {
|
|
278
|
-
tmp_1 = element.
|
|
278
|
+
tmp_1 = element.qv(VOID, elements);
|
|
279
279
|
} else {
|
|
280
280
|
if (element instanceof Interface) {
|
|
281
|
-
tmp_1 = element.
|
|
281
|
+
tmp_1 = element.zv(VOID, elements);
|
|
282
282
|
} else {
|
|
283
283
|
if (element instanceof Enum) {
|
|
284
|
-
tmp_1 = element.
|
|
284
|
+
tmp_1 = element.ex(VOID, VOID, VOID, VOID, VOID, elements);
|
|
285
285
|
} else {
|
|
286
286
|
if (element instanceof Main) {
|
|
287
287
|
tmp_1 = element;
|
|
@@ -319,7 +319,7 @@ function JavaEmitter$emitGenerator$lambda_1(it) {
|
|
|
319
319
|
}
|
|
320
320
|
function JavaEmitter$emitGenerator$lambda_2(this$0) {
|
|
321
321
|
return function (it) {
|
|
322
|
-
return import_0(this$0.
|
|
322
|
+
return import_0(this$0.u37().bt_1 + '.model', it);
|
|
323
323
|
};
|
|
324
324
|
}
|
|
325
325
|
function JavaEmitter$emit$lambda(this$0) {
|
|
@@ -331,36 +331,36 @@ function JavaEmitter$emit$lambda_0(it) {
|
|
|
331
331
|
return listOf(function_0('label', VOID, VOID, JavaEmitter$emit$lambda$lambda));
|
|
332
332
|
}
|
|
333
333
|
function JavaEmitter$emit$lambda$lambda($this$function) {
|
|
334
|
-
$this$function.
|
|
335
|
-
$this$function.
|
|
334
|
+
$this$function.x13(String_instance);
|
|
335
|
+
$this$function.d14(new VariableReference(Companion_getInstance().au('label')));
|
|
336
336
|
return Unit_instance;
|
|
337
337
|
}
|
|
338
338
|
function JavaEmitter(packageName, emitShared) {
|
|
339
339
|
Companion_getInstance_0();
|
|
340
340
|
packageName = packageName === VOID ? Companion_instance_0.at('community.flock.wirespec.generated') : packageName;
|
|
341
|
-
emitShared = emitShared === VOID ? Companion_instance_1.
|
|
342
|
-
this.
|
|
343
|
-
this.
|
|
344
|
-
this.
|
|
345
|
-
this.
|
|
346
|
-
this.
|
|
341
|
+
emitShared = emitShared === VOID ? Companion_instance_1.gq() : emitShared;
|
|
342
|
+
this.o37_1 = packageName;
|
|
343
|
+
this.p37_1 = emitShared;
|
|
344
|
+
this.q37_1 = JavaGenerator_getInstance();
|
|
345
|
+
this.r37_1 = FileExtension_Java_getInstance();
|
|
346
|
+
this.s37_1 = listOf(import_0('community.flock.wirespec.java', 'Wirespec'));
|
|
347
347
|
var tmp = this;
|
|
348
|
-
var tmp_0 = Companion_getInstance_0().
|
|
348
|
+
var tmp_0 = Companion_getInstance_0().n37();
|
|
349
349
|
var tmp_1 = JavaEmitter$sanitizationConfig$lambda;
|
|
350
350
|
var tmp_2 = JavaEmitter$sanitizationConfig$lambda_0;
|
|
351
351
|
var tmp_3 = JavaEmitter$sanitizationConfig$lambda_1;
|
|
352
|
-
tmp.
|
|
352
|
+
tmp.t37_1 = new SanitizationConfig(tmp_0, tmp_1, tmp_2, tmp_3, JavaEmitter$sanitizationConfig$lambda_2(this));
|
|
353
353
|
}
|
|
354
|
-
protoOf(JavaEmitter).
|
|
355
|
-
return this.
|
|
354
|
+
protoOf(JavaEmitter).u37 = function () {
|
|
355
|
+
return this.o37_1;
|
|
356
356
|
};
|
|
357
|
-
protoOf(JavaEmitter).
|
|
358
|
-
return this.
|
|
357
|
+
protoOf(JavaEmitter).l1b = function () {
|
|
358
|
+
return this.q37_1;
|
|
359
359
|
};
|
|
360
|
-
protoOf(JavaEmitter).
|
|
361
|
-
return this.
|
|
360
|
+
protoOf(JavaEmitter).xp = function () {
|
|
361
|
+
return this.r37_1;
|
|
362
362
|
};
|
|
363
|
-
protoOf(JavaEmitter).
|
|
363
|
+
protoOf(JavaEmitter).g1b = function () {
|
|
364
364
|
var packageName = Companion_instance_0.at('community.flock.wirespec.java');
|
|
365
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')]);
|
|
366
366
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -380,49 +380,49 @@ protoOf(JavaEmitter).c1b = function () {
|
|
|
380
380
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
381
381
|
var tmp = scope;
|
|
382
382
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
383
|
-
var this_2 = scope.
|
|
383
|
+
var this_2 = scope.e19_1;
|
|
384
384
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
385
385
|
// Inline function 'kotlin.apply' call
|
|
386
386
|
var this_3 = new TransformerBuilder();
|
|
387
|
-
this_3.
|
|
388
|
-
var tmp$ret$7 = this_3.
|
|
389
|
-
tmp.
|
|
387
|
+
this_3.y19(JavaEmitter$emitShared$lambda_0(imports));
|
|
388
|
+
var tmp$ret$7 = this_3.t19();
|
|
389
|
+
tmp.e19_1 = transform(this_2, tmp$ret$7);
|
|
390
390
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.injectAfter' call
|
|
391
391
|
var tmp_0 = scope;
|
|
392
392
|
// Inline function 'community.flock.wirespec.compiler.core.ir.injectAfter' call
|
|
393
393
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
394
|
-
var this_4 = scope.
|
|
394
|
+
var this_4 = scope.e19_1;
|
|
395
395
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
396
396
|
// Inline function 'kotlin.apply' call
|
|
397
397
|
var this_5 = new TransformerBuilder();
|
|
398
|
-
this_5.
|
|
399
|
-
var tmp$ret$13 = this_5.
|
|
400
|
-
tmp_0.
|
|
401
|
-
var tmp_1 = scope.
|
|
398
|
+
this_5.y19(JavaEmitter$emitShared$lambda_1(clientServer));
|
|
399
|
+
var tmp$ret$13 = this_5.t19();
|
|
400
|
+
tmp_0.e19_1 = transform(this_4, tmp$ret$13);
|
|
401
|
+
var tmp_1 = scope.e19_1;
|
|
402
402
|
var wirespecShared = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
403
403
|
var tmp_2;
|
|
404
|
-
if (this.
|
|
404
|
+
if (this.p37_1.hq_1) {
|
|
405
405
|
tmp_2 = wirespecShared;
|
|
406
406
|
} else {
|
|
407
407
|
tmp_2 = null;
|
|
408
408
|
}
|
|
409
409
|
return tmp_2;
|
|
410
410
|
};
|
|
411
|
-
protoOf(JavaEmitter).
|
|
411
|
+
protoOf(JavaEmitter).ds = function (definition, module_0, logger) {
|
|
412
412
|
var file = emit.call(this, definition, module_0, logger);
|
|
413
|
-
var tmp = file.
|
|
413
|
+
var tmp = file.jv(Companion_getInstance().au(sanitizeSymbol(this, file.fv_1.du())));
|
|
414
414
|
// Inline function 'kotlin.takeIf' call
|
|
415
|
-
var this_0 = this.
|
|
415
|
+
var this_0 = this.s37_1;
|
|
416
416
|
var tmp_0;
|
|
417
|
-
if (Companion_instance.
|
|
417
|
+
if (Companion_instance.as(module_0)) {
|
|
418
418
|
tmp_0 = this_0;
|
|
419
419
|
} else {
|
|
420
420
|
tmp_0 = null;
|
|
421
421
|
}
|
|
422
422
|
var tmp$ret$0 = tmp_0;
|
|
423
|
-
return placeInPackage(prependImports(tmp, tmp$ret$0), this.
|
|
423
|
+
return placeInPackage(prependImports(tmp, tmp$ret$0), this.u37(), definition);
|
|
424
424
|
};
|
|
425
|
-
protoOf(JavaEmitter).
|
|
425
|
+
protoOf(JavaEmitter).o1b = function (definition, module_0) {
|
|
426
426
|
var tmp;
|
|
427
427
|
if (definition instanceof Type) {
|
|
428
428
|
tmp = convertToGenerator_2(definition, module_0);
|
|
@@ -442,33 +442,33 @@ protoOf(JavaEmitter).k1b = function (definition, module_0) {
|
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
444
|
var generatorFile = tmp;
|
|
445
|
-
var sanitized = sanitizeNames(generatorFile, this.
|
|
446
|
-
var generatorOwnName = definition.
|
|
445
|
+
var sanitized = sanitizeNames(generatorFile, this.t37_1);
|
|
446
|
+
var generatorOwnName = definition.es().o1() + 'Generator';
|
|
447
447
|
var tmp_0 = asSequence(collectCustomTypeNames(sanitized));
|
|
448
448
|
var tmp_1 = filterNot(tmp_0, JavaEmitter$emitGenerator$lambda);
|
|
449
449
|
var tmp_2 = filterNot(tmp_1, JavaEmitter$emitGenerator$lambda_0(generatorOwnName));
|
|
450
450
|
var tmp_3 = distinct(map(tmp_2, JavaEmitter$emitGenerator$lambda_1));
|
|
451
451
|
var modelImports = toList(map(tmp_3, JavaEmitter$emitGenerator$lambda_2(this)));
|
|
452
|
-
return placeInPackage_0(prependImports(sanitized, plus(this.
|
|
452
|
+
return placeInPackage_0(prependImports(sanitized, plus(this.s37_1, modelImports)), this.u37(), 'generator');
|
|
453
453
|
};
|
|
454
|
-
protoOf(JavaEmitter).
|
|
455
|
-
return sanitizeNames(convert_0(type), this.
|
|
454
|
+
protoOf(JavaEmitter).vs = function (type, module_0) {
|
|
455
|
+
return sanitizeNames(convert_0(type), this.t37_1);
|
|
456
456
|
};
|
|
457
|
-
protoOf(JavaEmitter).
|
|
457
|
+
protoOf(JavaEmitter).ts = function (enum_0, module_0) {
|
|
458
458
|
var tmp = convert_1(enum_0);
|
|
459
459
|
var tmp_0 = JavaEmitter$emit$lambda(this);
|
|
460
|
-
return sanitizeNames(injectEnumLabelField(tmp, tmp_0, JavaEmitter$emit$lambda_0), this.
|
|
460
|
+
return sanitizeNames(injectEnumLabelField(tmp, tmp_0, JavaEmitter$emit$lambda_0), this.t37_1);
|
|
461
461
|
};
|
|
462
|
-
protoOf(JavaEmitter).
|
|
463
|
-
return sanitizeNames(convert_2(union), this.
|
|
462
|
+
protoOf(JavaEmitter).js = function (union) {
|
|
463
|
+
return sanitizeNames(convert_2(union), this.t37_1);
|
|
464
464
|
};
|
|
465
|
-
protoOf(JavaEmitter).
|
|
466
|
-
return sanitizeNames(applyRefinedStructShape(convert_3(refined), refined), this.
|
|
465
|
+
protoOf(JavaEmitter).os = function (refined) {
|
|
466
|
+
return sanitizeNames(applyRefinedStructShape(convert_3(refined), refined), this.t37_1);
|
|
467
467
|
};
|
|
468
|
-
protoOf(JavaEmitter).
|
|
469
|
-
var tmp = sanitizeNames(transformTypeDescriptors(injectApi(convert_4(endpoint), endpoint)), this.
|
|
468
|
+
protoOf(JavaEmitter).us = function (endpoint) {
|
|
469
|
+
var tmp = sanitizeNames(transformTypeDescriptors(injectApi(convert_4(endpoint), endpoint)), this.t37_1);
|
|
470
470
|
// Inline function 'kotlin.takeIf' call
|
|
471
|
-
var this_0 = buildModelImports(endpoint, this.
|
|
471
|
+
var this_0 = buildModelImports(endpoint, this.u37());
|
|
472
472
|
var tmp_0;
|
|
473
473
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
474
474
|
if (!this_0.r()) {
|
|
@@ -479,20 +479,20 @@ protoOf(JavaEmitter).ts = function (endpoint) {
|
|
|
479
479
|
var tmp$ret$0 = tmp_0;
|
|
480
480
|
return prependImports(tmp, tmp$ret$0);
|
|
481
481
|
};
|
|
482
|
-
protoOf(JavaEmitter).
|
|
482
|
+
protoOf(JavaEmitter).is = function (channel) {
|
|
483
483
|
var tmp;
|
|
484
|
-
if (channel.
|
|
485
|
-
tmp = this.
|
|
484
|
+
if (channel.yq_1.o1() === channel.zq_1.o1()) {
|
|
485
|
+
tmp = this.u37().bt_1 + '.model.';
|
|
486
486
|
} else {
|
|
487
487
|
tmp = '';
|
|
488
488
|
}
|
|
489
489
|
var fullyQualifiedPrefix = tmp;
|
|
490
|
-
return qualifyChannelReferences(sanitizeNames(convert_5(channel), this.
|
|
490
|
+
return qualifyChannelReferences(sanitizeNames(convert_5(channel), this.t37_1), fullyQualifiedPrefix);
|
|
491
491
|
};
|
|
492
|
-
protoOf(JavaEmitter).
|
|
493
|
-
var tmp = sanitizeNames(convert_6(rpc), this.
|
|
492
|
+
protoOf(JavaEmitter).hs = function (rpc) {
|
|
493
|
+
var tmp = sanitizeNames(convert_6(rpc), this.t37_1);
|
|
494
494
|
// Inline function 'kotlin.takeIf' call
|
|
495
|
-
var this_0 = buildModelImports(rpc, this.
|
|
495
|
+
var this_0 = buildModelImports(rpc, this.u37());
|
|
496
496
|
var tmp_0;
|
|
497
497
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
498
498
|
if (!this_0.r()) {
|
|
@@ -503,15 +503,15 @@ protoOf(JavaEmitter).gs = function (rpc) {
|
|
|
503
503
|
var tmp$ret$0 = tmp_0;
|
|
504
504
|
return prependImports(tmp, tmp$ret$0);
|
|
505
505
|
};
|
|
506
|
-
protoOf(JavaEmitter).
|
|
507
|
-
var imports = buildModelImports(endpoint, this.
|
|
508
|
-
var endpointImport = import_0(this.
|
|
509
|
-
var endpointName = endpoint.
|
|
510
|
-
var file = wrapAsyncReturnInThenApply(transformTypeDescriptors(sanitizeNames(emitEndpointClient.call(this, endpoint), this.
|
|
511
|
-
var subPackageName = plus_1(this.
|
|
512
|
-
return new File(Companion_getInstance().
|
|
506
|
+
protoOf(JavaEmitter).n1b = function (endpoint) {
|
|
507
|
+
var imports = buildModelImports(endpoint, this.u37());
|
|
508
|
+
var endpointImport = import_0(this.u37().bt_1 + '.endpoint', endpoint.gr_1.o1());
|
|
509
|
+
var endpointName = endpoint.gr_1.o1();
|
|
510
|
+
var file = wrapAsyncReturnInThenApply(transformTypeDescriptors(sanitizeNames(emitEndpointClient.call(this, endpoint), this.t37_1)), endpointName);
|
|
511
|
+
var subPackageName = plus_1(this.u37(), 'client');
|
|
512
|
+
return new File(Companion_getInstance().au(subPackageName.dt() + sanitizeSymbol(this, file.fv_1.du())), plus(plus(plus(plus(listOf(new Package(subPackageName.bt_1)), this.s37_1), imports), listOf(endpointImport)), file.gv_1));
|
|
513
513
|
};
|
|
514
|
-
protoOf(JavaEmitter).
|
|
514
|
+
protoOf(JavaEmitter).h1b = function (endpoints, logger) {
|
|
515
515
|
// Inline function 'kotlin.collections.flatMap' call
|
|
516
516
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
517
517
|
var destination = ArrayList_init_$Create$_0();
|
|
@@ -527,7 +527,7 @@ protoOf(JavaEmitter).d1b = function (endpoints, logger) {
|
|
|
527
527
|
var _iterator__ex2g4s_0 = destination.t();
|
|
528
528
|
while (_iterator__ex2g4s_0.u()) {
|
|
529
529
|
var e = _iterator__ex2g4s_0.v();
|
|
530
|
-
var key = e.
|
|
530
|
+
var key = e.b1a_1;
|
|
531
531
|
if (set.x(key)) {
|
|
532
532
|
list_0.x(e);
|
|
533
533
|
}
|
|
@@ -554,7 +554,7 @@ protoOf(JavaEmitter).d1b = function (endpoints, logger) {
|
|
|
554
554
|
var _iterator__ex2g4s_2 = endpoints.t();
|
|
555
555
|
while (_iterator__ex2g4s_2.u()) {
|
|
556
556
|
var element_1 = _iterator__ex2g4s_2.v();
|
|
557
|
-
if (element_1.
|
|
557
|
+
if (element_1.gr_1.o1() === element_0.b1a_1) {
|
|
558
558
|
tmp$ret$8 = false;
|
|
559
559
|
break $l$block_0;
|
|
560
560
|
}
|
|
@@ -571,7 +571,7 @@ protoOf(JavaEmitter).d1b = function (endpoints, logger) {
|
|
|
571
571
|
var _iterator__ex2g4s_3 = destination_0.t();
|
|
572
572
|
while (_iterator__ex2g4s_3.u()) {
|
|
573
573
|
var item = _iterator__ex2g4s_3.v();
|
|
574
|
-
var tmp$ret$12 = import_0(this.
|
|
574
|
+
var tmp$ret$12 = import_0(this.u37().bt_1 + '.model', item.b1a_1);
|
|
575
575
|
destination_1.x(tmp$ret$12);
|
|
576
576
|
}
|
|
577
577
|
var imports = destination_1;
|
|
@@ -581,7 +581,7 @@ protoOf(JavaEmitter).d1b = function (endpoints, logger) {
|
|
|
581
581
|
var _iterator__ex2g4s_4 = endpoints.t();
|
|
582
582
|
while (_iterator__ex2g4s_4.u()) {
|
|
583
583
|
var item_0 = _iterator__ex2g4s_4.v();
|
|
584
|
-
var tmp$ret$15 = import_0(this.
|
|
584
|
+
var tmp$ret$15 = import_0(this.u37().bt_1 + '.endpoint', item_0.gr_1.o1());
|
|
585
585
|
destination_2.x(tmp$ret$15);
|
|
586
586
|
}
|
|
587
587
|
var endpointImports = destination_2;
|
|
@@ -591,19 +591,19 @@ protoOf(JavaEmitter).d1b = function (endpoints, logger) {
|
|
|
591
591
|
var _iterator__ex2g4s_5 = endpoints.t();
|
|
592
592
|
while (_iterator__ex2g4s_5.u()) {
|
|
593
593
|
var item_1 = _iterator__ex2g4s_5.v();
|
|
594
|
-
var tmp$ret$18 = import_0(this.
|
|
594
|
+
var tmp$ret$18 = import_0(this.u37().bt_1 + '.client', item_1.gr_1.o1() + 'Client');
|
|
595
595
|
destination_3.x(tmp$ret$18);
|
|
596
596
|
}
|
|
597
597
|
var clientImports = destination_3;
|
|
598
598
|
var allImports = plus(plus(imports, endpointImports), clientImports);
|
|
599
|
-
var file = sanitizeNames(emitClient.call(this, endpoints, logger), this.
|
|
600
|
-
return new File(Companion_getInstance().
|
|
599
|
+
var file = sanitizeNames(emitClient.call(this, endpoints, logger), this.t37_1);
|
|
600
|
+
return new File(Companion_getInstance().au(this.u37().dt() + sanitizeSymbol(this, file.fv_1.du())), plus(plus(plus(listOf(new Package(this.u37().bt_1)), this.s37_1), allImports), file.gv_1));
|
|
601
601
|
};
|
|
602
602
|
function transformTypeDescriptors(_this__u8e3s4) {
|
|
603
603
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
604
604
|
var scope = new TransformScope(_this__u8e3s4);
|
|
605
|
-
scope.
|
|
606
|
-
var tmp = scope.
|
|
605
|
+
scope.w19(transformTypeDescriptors$lambda);
|
|
606
|
+
var tmp = scope.e19_1;
|
|
607
607
|
return isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
608
608
|
}
|
|
609
609
|
function applyRefinedStructShape(_this__u8e3s4, refined) {
|
|
@@ -612,14 +612,14 @@ function applyRefinedStructShape(_this__u8e3s4, refined) {
|
|
|
612
612
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
613
613
|
var tmp = scope;
|
|
614
614
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
615
|
-
var this_0 = scope.
|
|
615
|
+
var this_0 = scope.e19_1;
|
|
616
616
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
617
617
|
// Inline function 'kotlin.apply' call
|
|
618
618
|
var this_1 = new TransformerBuilder();
|
|
619
|
-
this_1.
|
|
620
|
-
var tmp$ret$4 = this_1.
|
|
621
|
-
tmp.
|
|
622
|
-
var tmp_0 = scope.
|
|
619
|
+
this_1.y19(applyRefinedStructShape$lambda(refined));
|
|
620
|
+
var tmp$ret$4 = this_1.t19();
|
|
621
|
+
tmp.e19_1 = transform(this_0, tmp$ret$4);
|
|
622
|
+
var tmp_0 = scope.e19_1;
|
|
623
623
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
624
624
|
}
|
|
625
625
|
function injectApi(_this__u8e3s4, endpoint) {
|
|
@@ -629,14 +629,14 @@ function injectApi(_this__u8e3s4, endpoint) {
|
|
|
629
629
|
var tmp = scope;
|
|
630
630
|
// Inline function 'community.flock.wirespec.compiler.core.ir.injectAfter' call
|
|
631
631
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
632
|
-
var this_0 = scope.
|
|
632
|
+
var this_0 = scope.e19_1;
|
|
633
633
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
634
634
|
// Inline function 'kotlin.apply' call
|
|
635
635
|
var this_1 = new TransformerBuilder();
|
|
636
|
-
this_1.
|
|
637
|
-
var tmp$ret$5 = this_1.
|
|
638
|
-
tmp.
|
|
639
|
-
var tmp_0 = scope.
|
|
636
|
+
this_1.y19(injectApi$lambda(endpoint));
|
|
637
|
+
var tmp$ret$5 = this_1.t19();
|
|
638
|
+
tmp.e19_1 = transform(this_0, tmp$ret$5);
|
|
639
|
+
var tmp_0 = scope.e19_1;
|
|
640
640
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
641
641
|
}
|
|
642
642
|
function buildModelImports(_this__u8e3s4, packageName) {
|
|
@@ -647,7 +647,7 @@ function buildModelImports(_this__u8e3s4, packageName) {
|
|
|
647
647
|
var _iterator__ex2g4s = tmp0.t();
|
|
648
648
|
while (_iterator__ex2g4s.u()) {
|
|
649
649
|
var element = _iterator__ex2g4s.v();
|
|
650
|
-
if (!(_this__u8e3s4.
|
|
650
|
+
if (!(_this__u8e3s4.es().o1() === element.b1a_1)) {
|
|
651
651
|
destination.x(element);
|
|
652
652
|
}
|
|
653
653
|
}
|
|
@@ -657,7 +657,7 @@ function buildModelImports(_this__u8e3s4, packageName) {
|
|
|
657
657
|
var _iterator__ex2g4s_0 = destination.t();
|
|
658
658
|
while (_iterator__ex2g4s_0.u()) {
|
|
659
659
|
var item = _iterator__ex2g4s_0.v();
|
|
660
|
-
var tmp$ret$5 = import_0(packageName.bt_1 + '.model', Companion_getInstance().
|
|
660
|
+
var tmp$ret$5 = import_0(packageName.bt_1 + '.model', Companion_getInstance().au(item.b1a_1).du());
|
|
661
661
|
destination_0.x(tmp$ret$5);
|
|
662
662
|
}
|
|
663
663
|
return destination_0;
|
|
@@ -668,14 +668,14 @@ function qualifyChannelReferences(_this__u8e3s4, fullyQualifiedPrefix) {
|
|
|
668
668
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
669
669
|
var tmp = scope;
|
|
670
670
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
671
|
-
var this_0 = scope.
|
|
671
|
+
var this_0 = scope.e19_1;
|
|
672
672
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
673
673
|
// Inline function 'kotlin.apply' call
|
|
674
674
|
var this_1 = new TransformerBuilder();
|
|
675
|
-
this_1.
|
|
676
|
-
var tmp$ret$4 = this_1.
|
|
677
|
-
tmp.
|
|
678
|
-
var tmp_0 = scope.
|
|
675
|
+
this_1.y19(qualifyChannelReferences$lambda(fullyQualifiedPrefix));
|
|
676
|
+
var tmp$ret$4 = this_1.t19();
|
|
677
|
+
tmp.e19_1 = transform(this_0, tmp$ret$4);
|
|
678
|
+
var tmp_0 = scope.e19_1;
|
|
679
679
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
680
680
|
}
|
|
681
681
|
function wrapAsyncReturnInThenApply(_this__u8e3s4, endpointName) {
|
|
@@ -684,26 +684,26 @@ function wrapAsyncReturnInThenApply(_this__u8e3s4, endpointName) {
|
|
|
684
684
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
685
685
|
var tmp = scope;
|
|
686
686
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
687
|
-
var this_0 = scope.
|
|
687
|
+
var this_0 = scope.e19_1;
|
|
688
688
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
689
689
|
// Inline function 'kotlin.apply' call
|
|
690
690
|
var this_1 = new TransformerBuilder();
|
|
691
|
-
this_1.
|
|
692
|
-
var tmp$ret$4 = this_1.
|
|
693
|
-
tmp.
|
|
694
|
-
var tmp_0 = scope.
|
|
691
|
+
this_1.y19(wrapAsyncReturnInThenApply$lambda(endpointName));
|
|
692
|
+
var tmp$ret$4 = this_1.t19();
|
|
693
|
+
tmp.e19_1 = transform(this_0, tmp$ret$4);
|
|
694
|
+
var tmp_0 = scope.e19_1;
|
|
695
695
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
696
696
|
}
|
|
697
697
|
function findRoot(_this__u8e3s4) {
|
|
698
698
|
var tmp;
|
|
699
699
|
if (_this__u8e3s4 instanceof Nullable) {
|
|
700
|
-
tmp = findRoot(_this__u8e3s4.
|
|
700
|
+
tmp = findRoot(_this__u8e3s4.vu_1);
|
|
701
701
|
} else {
|
|
702
702
|
if (_this__u8e3s4 instanceof Array_0) {
|
|
703
|
-
tmp = findRoot(_this__u8e3s4.
|
|
703
|
+
tmp = findRoot(_this__u8e3s4.mu_1);
|
|
704
704
|
} else {
|
|
705
705
|
if (_this__u8e3s4 instanceof Dict) {
|
|
706
|
-
tmp = findRoot(_this__u8e3s4.
|
|
706
|
+
tmp = findRoot(_this__u8e3s4.pu_1);
|
|
707
707
|
} else {
|
|
708
708
|
tmp = _this__u8e3s4;
|
|
709
709
|
}
|
|
@@ -732,7 +732,7 @@ function toJavaName(_this__u8e3s4) {
|
|
|
732
732
|
var tmp;
|
|
733
733
|
if (_this__u8e3s4 instanceof Integer) {
|
|
734
734
|
var tmp_0;
|
|
735
|
-
switch (_this__u8e3s4.
|
|
735
|
+
switch (_this__u8e3s4.ku_1.f3_1) {
|
|
736
736
|
case 0:
|
|
737
737
|
tmp_0 = 'Integer';
|
|
738
738
|
break;
|
|
@@ -747,7 +747,7 @@ function toJavaName(_this__u8e3s4) {
|
|
|
747
747
|
} else {
|
|
748
748
|
if (_this__u8e3s4 instanceof Number_0) {
|
|
749
749
|
var tmp_1;
|
|
750
|
-
switch (_this__u8e3s4.
|
|
750
|
+
switch (_this__u8e3s4.lu_1.f3_1) {
|
|
751
751
|
case 0:
|
|
752
752
|
tmp_1 = 'Float';
|
|
753
753
|
break;
|
|
@@ -776,7 +776,7 @@ function toJavaName(_this__u8e3s4) {
|
|
|
776
776
|
tmp = 'Void';
|
|
777
777
|
} else {
|
|
778
778
|
if (_this__u8e3s4 instanceof Custom) {
|
|
779
|
-
tmp = _this__u8e3s4.
|
|
779
|
+
tmp = _this__u8e3s4.ru_1.du();
|
|
780
780
|
} else {
|
|
781
781
|
tmp = 'Object';
|
|
782
782
|
}
|
|
@@ -790,7 +790,7 @@ function toJavaName(_this__u8e3s4) {
|
|
|
790
790
|
return tmp;
|
|
791
791
|
}
|
|
792
792
|
function buildApiStruct(_this__u8e3s4) {
|
|
793
|
-
var pathTemplate = '/' + joinToString(_this__u8e3s4.
|
|
793
|
+
var pathTemplate = '/' + joinToString(_this__u8e3s4.ir_1, '/', VOID, VOID, VOID, VOID, buildApiStruct$lambda);
|
|
794
794
|
return struct('Api', buildApiStruct$lambda_0(pathTemplate, _this__u8e3s4));
|
|
795
795
|
}
|
|
796
796
|
function withFullyQualifiedPrefix(_this__u8e3s4, prefix) {
|
|
@@ -802,14 +802,14 @@ function withFullyQualifiedPrefix(_this__u8e3s4, prefix) {
|
|
|
802
802
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matching' call
|
|
803
803
|
var tmp_0 = scope;
|
|
804
804
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatching' call
|
|
805
|
-
var this_0 = scope.
|
|
805
|
+
var this_0 = scope.e19_1;
|
|
806
806
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
807
807
|
// Inline function 'kotlin.apply' call
|
|
808
808
|
var this_1 = new TransformerBuilder();
|
|
809
|
-
this_1.
|
|
810
|
-
var tmp$ret$5 = this_1.
|
|
811
|
-
tmp_0.
|
|
812
|
-
var tmp_1 = scope.
|
|
809
|
+
this_1.k19(withFullyQualifiedPrefix$lambda(prefix));
|
|
810
|
+
var tmp$ret$5 = this_1.t19();
|
|
811
|
+
tmp_0.e19_1 = transform(this_0, tmp$ret$5);
|
|
812
|
+
var tmp_1 = scope.e19_1;
|
|
813
813
|
tmp = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
814
814
|
} else {
|
|
815
815
|
tmp = _this__u8e3s4;
|
|
@@ -819,8 +819,8 @@ function withFullyQualifiedPrefix(_this__u8e3s4, prefix) {
|
|
|
819
819
|
function transformTypeDescriptors$lambda(stmt, tr) {
|
|
820
820
|
var tmp;
|
|
821
821
|
if (stmt instanceof TypeDescriptor) {
|
|
822
|
-
var rootType = findRoot(stmt.
|
|
823
|
-
var containerStr = rawContainerClass(stmt.
|
|
822
|
+
var rootType = findRoot(stmt.fy_1);
|
|
823
|
+
var containerStr = rawContainerClass(stmt.fy_1);
|
|
824
824
|
var rootStr = toJavaName(rootType) + '.class';
|
|
825
825
|
var tmp_0;
|
|
826
826
|
if (containerStr == null) {
|
|
@@ -839,8 +839,8 @@ function transformTypeDescriptors$lambda(stmt, tr) {
|
|
|
839
839
|
}
|
|
840
840
|
function applyRefinedStructShape$lambda$lambda($refined) {
|
|
841
841
|
return function ($this$function) {
|
|
842
|
-
$this$function.
|
|
843
|
-
$this$function.
|
|
842
|
+
$this$function.x13(convert_7($refined.ns_1));
|
|
843
|
+
$this$function.d14(new VariableReference(Companion_getInstance().au('value')));
|
|
844
844
|
return Unit_instance;
|
|
845
845
|
};
|
|
846
846
|
}
|
|
@@ -850,39 +850,39 @@ function applyRefinedStructShape$lambda($refined) {
|
|
|
850
850
|
if (element instanceof Struct) {
|
|
851
851
|
var tmp_0 = listOf(Custom_init_$Create$('Wirespec.Refined'));
|
|
852
852
|
// Inline function 'kotlin.collections.map' call
|
|
853
|
-
var this_0 = element.
|
|
853
|
+
var this_0 = element.jx_1;
|
|
854
854
|
// Inline function 'kotlin.collections.mapTo' call
|
|
855
855
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
856
856
|
var _iterator__ex2g4s = this_0.t();
|
|
857
857
|
while (_iterator__ex2g4s.u()) {
|
|
858
858
|
var item = _iterator__ex2g4s.v();
|
|
859
859
|
var tmp0_safe_receiver = item instanceof Function ? item : null;
|
|
860
|
-
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.dy(VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
|
|
861
861
|
var tmp$ret$3 = tmp1_elvis_lhs == null ? item : tmp1_elvis_lhs;
|
|
862
862
|
destination.x(tmp$ret$3);
|
|
863
863
|
}
|
|
864
|
-
var tmp0 = element.
|
|
864
|
+
var tmp0 = element.qx(VOID, VOID, VOID, tmp_0, destination);
|
|
865
865
|
// Inline function 'community.flock.wirespec.compiler.core.ir.plus' call
|
|
866
866
|
var element_0 = function_0('value', VOID, true, applyRefinedStructShape$lambda$lambda($refined));
|
|
867
867
|
var tmp_1;
|
|
868
868
|
if (tmp0 instanceof File) {
|
|
869
|
-
var tmp_2 = tmp0.
|
|
869
|
+
var tmp_2 = tmp0.jv(VOID, plus_0(tmp0.gv_1, element_0));
|
|
870
870
|
tmp_1 = tmp_2 instanceof Struct ? tmp_2 : THROW_CCE();
|
|
871
871
|
} else {
|
|
872
872
|
if (tmp0 instanceof Struct) {
|
|
873
|
-
var tmp_3 = tmp0.
|
|
873
|
+
var tmp_3 = tmp0.qx(VOID, VOID, VOID, VOID, plus_0(tmp0.jx_1, element_0));
|
|
874
874
|
tmp_1 = tmp_3 instanceof Struct ? tmp_3 : THROW_CCE();
|
|
875
875
|
} else {
|
|
876
876
|
if (tmp0 instanceof Namespace) {
|
|
877
|
-
var tmp_4 = tmp0.
|
|
877
|
+
var tmp_4 = tmp0.qv(VOID, plus_0(tmp0.mv_1, element_0));
|
|
878
878
|
tmp_1 = tmp_4 instanceof Struct ? tmp_4 : THROW_CCE();
|
|
879
879
|
} else {
|
|
880
880
|
if (tmp0 instanceof Interface) {
|
|
881
|
-
var tmp_5 = tmp0.
|
|
881
|
+
var tmp_5 = tmp0.zv(VOID, plus_0(tmp0.sv_1, element_0));
|
|
882
882
|
tmp_1 = tmp_5 instanceof Struct ? tmp_5 : THROW_CCE();
|
|
883
883
|
} else {
|
|
884
884
|
if (tmp0 instanceof Enum) {
|
|
885
|
-
var tmp_6 = tmp0.
|
|
885
|
+
var tmp_6 = tmp0.ex(VOID, VOID, VOID, VOID, VOID, plus_0(tmp0.bx_1, element_0));
|
|
886
886
|
tmp_1 = tmp_6 instanceof Struct ? tmp_6 : THROW_CCE();
|
|
887
887
|
} else {
|
|
888
888
|
noWhenBranchMatchedException();
|
|
@@ -908,22 +908,22 @@ function injectApi$lambda($endpoint) {
|
|
|
908
908
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
909
909
|
if (!injected.r()) {
|
|
910
910
|
// Inline function 'community.flock.wirespec.compiler.core.ir.withElements' call
|
|
911
|
-
var elements = plus(element.
|
|
911
|
+
var elements = plus(element.hv(), injected);
|
|
912
912
|
var tmp_1;
|
|
913
913
|
if (element instanceof File) {
|
|
914
|
-
tmp_1 = element.
|
|
914
|
+
tmp_1 = element.jv(VOID, elements);
|
|
915
915
|
} else {
|
|
916
916
|
if (element instanceof Struct) {
|
|
917
|
-
tmp_1 = element.
|
|
917
|
+
tmp_1 = element.qx(VOID, VOID, VOID, VOID, elements);
|
|
918
918
|
} else {
|
|
919
919
|
if (element instanceof Namespace) {
|
|
920
|
-
tmp_1 = element.
|
|
920
|
+
tmp_1 = element.qv(VOID, elements);
|
|
921
921
|
} else {
|
|
922
922
|
if (element instanceof Interface) {
|
|
923
|
-
tmp_1 = element.
|
|
923
|
+
tmp_1 = element.zv(VOID, elements);
|
|
924
924
|
} else {
|
|
925
925
|
if (element instanceof Enum) {
|
|
926
|
-
tmp_1 = element.
|
|
926
|
+
tmp_1 = element.ex(VOID, VOID, VOID, VOID, VOID, elements);
|
|
927
927
|
} else {
|
|
928
928
|
if (element instanceof Main) {
|
|
929
929
|
tmp_1 = element;
|
|
@@ -966,11 +966,11 @@ function wrapAsyncReturnInThenApply$lambda($endpointName) {
|
|
|
966
966
|
if (element instanceof Function) {
|
|
967
967
|
var tmp$ret$0;
|
|
968
968
|
$l$block_1: {
|
|
969
|
-
if (!element.
|
|
969
|
+
if (!element.wx_1 || element.vx_1.c1() < 2) {
|
|
970
970
|
tmp$ret$0 = element;
|
|
971
971
|
break $l$block_1;
|
|
972
972
|
}
|
|
973
|
-
var tmp_0 = element.
|
|
973
|
+
var tmp_0 = element.vx_1.b1(element.vx_1.c1() - 2 | 0);
|
|
974
974
|
var tmp0_elvis_lhs = tmp_0 instanceof Assignment ? tmp_0 : null;
|
|
975
975
|
var tmp_1;
|
|
976
976
|
if (tmp0_elvis_lhs == null) {
|
|
@@ -980,16 +980,16 @@ function wrapAsyncReturnInThenApply$lambda($endpointName) {
|
|
|
980
980
|
tmp_1 = tmp0_elvis_lhs;
|
|
981
981
|
}
|
|
982
982
|
var transportAssign = tmp_1;
|
|
983
|
-
var tmp_2 = last(element.
|
|
983
|
+
var tmp_2 = last(element.vx_1);
|
|
984
984
|
if (!(tmp_2 instanceof ReturnStatement)) {
|
|
985
985
|
tmp$ret$0 = element;
|
|
986
986
|
break $l$block_1;
|
|
987
987
|
}
|
|
988
|
-
var tmp_3 = dropLast(element.
|
|
989
|
-
var tmp1_name = Companion_getInstance().
|
|
990
|
-
var tmp2_receiver = transportAssign.
|
|
991
|
-
var tmp3_arguments = mapOf(to(Companion_getInstance().
|
|
992
|
-
tmp$ret$0 = element.
|
|
988
|
+
var tmp_3 = dropLast(element.vx_1, 2);
|
|
989
|
+
var tmp1_name = Companion_getInstance().au('thenApply');
|
|
990
|
+
var tmp2_receiver = transportAssign.iy_1;
|
|
991
|
+
var tmp3_arguments = mapOf(to(Companion_getInstance().au('mapper'), new RawExpression('rawResponse -> ' + $endpointName + '.fromRawResponse(serialization(), rawResponse)')));
|
|
992
|
+
tmp$ret$0 = element.dy(VOID, VOID, VOID, VOID, plus_0(tmp_3, new ReturnStatement(new FunctionCall(tmp2_receiver, VOID, tmp1_name, tmp3_arguments))));
|
|
993
993
|
}
|
|
994
994
|
tmp = tmp$ret$0;
|
|
995
995
|
} else {
|
|
@@ -1002,10 +1002,10 @@ function wrapAsyncReturnInThenApply$lambda($endpointName) {
|
|
|
1002
1002
|
function buildApiStruct$lambda(it) {
|
|
1003
1003
|
var tmp;
|
|
1004
1004
|
if (it instanceof Literal) {
|
|
1005
|
-
tmp = it.
|
|
1005
|
+
tmp = it.e1b_1;
|
|
1006
1006
|
} else {
|
|
1007
1007
|
if (it instanceof Param) {
|
|
1008
|
-
tmp = '{' + it.
|
|
1008
|
+
tmp = '{' + it.nr_1.o1() + '}';
|
|
1009
1009
|
} else {
|
|
1010
1010
|
noWhenBranchMatchedException();
|
|
1011
1011
|
}
|
|
@@ -1014,38 +1014,38 @@ function buildApiStruct$lambda(it) {
|
|
|
1014
1014
|
}
|
|
1015
1015
|
function buildApiStruct$lambda$lambda($pathTemplate) {
|
|
1016
1016
|
return function ($this$function) {
|
|
1017
|
-
$this$function.
|
|
1018
|
-
$this$function.
|
|
1017
|
+
$this$function.x13(String_instance);
|
|
1018
|
+
$this$function.d14($this$function.i15($pathTemplate));
|
|
1019
1019
|
return Unit_instance;
|
|
1020
1020
|
};
|
|
1021
1021
|
}
|
|
1022
1022
|
function buildApiStruct$lambda$lambda_0($this_buildApiStruct) {
|
|
1023
1023
|
return function ($this$function) {
|
|
1024
|
-
$this$function.
|
|
1025
|
-
$this$function.
|
|
1024
|
+
$this$function.x13(String_instance);
|
|
1025
|
+
$this$function.d14($this$function.i15($this_buildApiStruct.hr_1.e3_1));
|
|
1026
1026
|
return Unit_instance;
|
|
1027
1027
|
};
|
|
1028
1028
|
}
|
|
1029
1029
|
function buildApiStruct$lambda$lambda_1($this$function) {
|
|
1030
|
-
$this$function.
|
|
1031
|
-
$this$function.
|
|
1032
|
-
$this$function.
|
|
1030
|
+
$this$function.x13($this$function.e15('Wirespec.ServerEdge', [$this$function.e15('Request', []), $this$function.e15('Response', [Wildcard_instance])]));
|
|
1031
|
+
$this$function.a14('serialization', $this$function.e15('Wirespec.Serialization', []));
|
|
1032
|
+
$this$function.d14(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}'));
|
|
1033
1033
|
return Unit_instance;
|
|
1034
1034
|
}
|
|
1035
1035
|
function buildApiStruct$lambda$lambda_2($this$function) {
|
|
1036
|
-
$this$function.
|
|
1037
|
-
$this$function.
|
|
1038
|
-
$this$function.
|
|
1036
|
+
$this$function.x13($this$function.e15('Wirespec.ClientEdge', [$this$function.e15('Request', []), $this$function.e15('Response', [Wildcard_instance])]));
|
|
1037
|
+
$this$function.a14('serialization', $this$function.e15('Wirespec.Serialization', []));
|
|
1038
|
+
$this$function.d14(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}'));
|
|
1039
1039
|
return Unit_instance;
|
|
1040
1040
|
}
|
|
1041
1041
|
function buildApiStruct$lambda_0($pathTemplate, $this_buildApiStruct) {
|
|
1042
1042
|
return function ($this$struct) {
|
|
1043
|
-
$this$struct.
|
|
1044
|
-
$this$struct.
|
|
1045
|
-
$this$struct.
|
|
1046
|
-
$this$struct.
|
|
1047
|
-
$this$struct.
|
|
1048
|
-
$this$struct.
|
|
1043
|
+
$this$struct.x15($this$struct.e15('Wirespec.Server', [$this$struct.e15('Request', []), $this$struct.e15('Response', [Wildcard_instance])]));
|
|
1044
|
+
$this$struct.x15($this$struct.e15('Wirespec.Client', [$this$struct.e15('Request', []), $this$struct.e15('Response', [Wildcard_instance])]));
|
|
1045
|
+
$this$struct.k16('getPathTemplate', VOID, true, buildApiStruct$lambda$lambda($pathTemplate));
|
|
1046
|
+
$this$struct.k16('getMethod', VOID, true, buildApiStruct$lambda$lambda_0($this_buildApiStruct));
|
|
1047
|
+
$this$struct.k16('getServer', VOID, true, buildApiStruct$lambda$lambda_1);
|
|
1048
|
+
$this$struct.k16('getClient', VOID, true, buildApiStruct$lambda$lambda_2);
|
|
1049
1049
|
return Unit_instance;
|
|
1050
1050
|
};
|
|
1051
1051
|
}
|
|
@@ -1053,7 +1053,7 @@ function withFullyQualifiedPrefix$lambda($prefix) {
|
|
|
1053
1053
|
return function (type, transformer) {
|
|
1054
1054
|
var tmp;
|
|
1055
1055
|
if (type instanceof Custom) {
|
|
1056
|
-
tmp = type.
|
|
1056
|
+
tmp = type.uu(new Name(listOf($prefix + type.ru_1.du())));
|
|
1057
1057
|
} else {
|
|
1058
1058
|
tmp = type;
|
|
1059
1059
|
}
|
|
@@ -1062,11 +1062,11 @@ function withFullyQualifiedPrefix$lambda($prefix) {
|
|
|
1062
1062
|
};
|
|
1063
1063
|
}
|
|
1064
1064
|
//region block: post-declaration
|
|
1065
|
-
protoOf(JavaEmitter).
|
|
1066
|
-
protoOf(JavaEmitter).
|
|
1067
|
-
protoOf(JavaEmitter).
|
|
1068
|
-
protoOf(JavaEmitter).
|
|
1069
|
-
protoOf(JavaEmitter).
|
|
1065
|
+
protoOf(JavaEmitter).i1b = get_extensions;
|
|
1066
|
+
protoOf(JavaEmitter).uo = emit_0;
|
|
1067
|
+
protoOf(JavaEmitter).f1b = emit_1;
|
|
1068
|
+
protoOf(JavaEmitter).k1b = beforeGenerate;
|
|
1069
|
+
protoOf(JavaEmitter).wp = get_supportsDefaults;
|
|
1070
1070
|
//endregion
|
|
1071
1071
|
//region block: exports
|
|
1072
1072
|
export {
|