@flock/wirespec 0.22.0 → 0.22.1
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 +160 -154
- package/arrow-arrow-core.mjs.map +1 -1
- package/clikt-clikt-mordant.mjs +80 -80
- package/clikt-clikt.mjs +1541 -1541
- package/colormath-root-colormath.mjs +441 -441
- package/kotlin-kotlin-stdlib.mjs +2223 -1941
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +10254 -10254
- package/kotlin-rgxgen.mjs +1808 -1808
- package/kotlinx-io-kotlinx-io-core.mjs +419 -419
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +1866 -1866
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1601 -1586
- package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/mordant-mordant.mjs +1326 -1318
- package/mordant-mordant.mjs.map +1 -1
- package/package.json +1 -1
- package/wirespec-src-compiler-core.mjs +6339 -6128
- package/wirespec-src-compiler-core.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-java.mjs +181 -181
- package/wirespec-src-compiler-emitters-kotlin.mjs +143 -143
- package/wirespec-src-compiler-emitters-python.mjs +179 -179
- package/wirespec-src-compiler-emitters-rust.mjs +423 -423
- package/wirespec-src-compiler-emitters-scala.mjs +176 -176
- package/wirespec-src-compiler-emitters-scala.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-typescript.mjs +254 -255
- package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-wirespec.mjs +362 -164
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +873 -403
- package/wirespec-src-compiler-lib.mjs.map +1 -1
- package/wirespec-src-converter-asyncapi.mjs +5382 -0
- package/wirespec-src-converter-asyncapi.mjs.map +1 -0
- package/wirespec-src-converter-avro.mjs +1075 -508
- package/wirespec-src-converter-avro.mjs.map +1 -1
- package/wirespec-src-converter-common.mjs +20 -20
- package/wirespec-src-converter-common.mjs.map +1 -1
- package/wirespec-src-converter-graphql.mjs +5691 -0
- package/wirespec-src-converter-graphql.mjs.map +1 -0
- package/wirespec-src-converter-openapi.mjs +777 -768
- package/wirespec-src-converter-openapi.mjs.map +1 -1
- package/wirespec-src-ide-lsp.mjs +1395 -1395
- package/wirespec-src-plugin-arguments.mjs +204 -184
- package/wirespec-src-plugin-arguments.mjs.map +1 -1
- package/wirespec-src-plugin-cli.mjs +111 -108
- package/wirespec-src-plugin-cli.mjs.map +1 -1
- package/wirespec-src-plugin-npm.d.mts +198 -24
- package/wirespec-src-plugin-npm.mjs +144 -49
- package/wirespec-src-plugin-npm.mjs.map +1 -1
- package/wirespec-src-tools-generator.mjs +35 -35
|
@@ -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.xr(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().r1z().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.q1z_1 = JavaGenerator_getInstance();
|
|
198
198
|
}
|
|
199
|
-
protoOf(Companion).
|
|
200
|
-
return this.
|
|
199
|
+
protoOf(Companion).r1z = function () {
|
|
200
|
+
return this.q1z_1.k1a_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.tt_1.b1() > 1 ? new Name(listOf(name.xt())) : name;
|
|
213
213
|
}
|
|
214
214
|
function JavaEmitter$sanitizationConfig$lambda_1(name) {
|
|
215
|
-
return new Name(listOf(name.
|
|
215
|
+
return new Name(listOf(name.xt()));
|
|
216
216
|
}
|
|
217
217
|
function JavaEmitter$sanitizationConfig$lambda_2(this$0) {
|
|
218
218
|
return function (it) {
|
|
@@ -223,23 +223,23 @@ function JavaEmitter$sanitizationConfig$lambda_3(stmt, tr) {
|
|
|
223
223
|
var tmp;
|
|
224
224
|
var tmp_0;
|
|
225
225
|
if (stmt instanceof FunctionCall) {
|
|
226
|
-
tmp_0 = stmt.
|
|
226
|
+
tmp_0 = stmt.du_1.wt() === 'validate';
|
|
227
227
|
} else {
|
|
228
228
|
tmp_0 = false;
|
|
229
229
|
}
|
|
230
230
|
if (tmp_0) {
|
|
231
|
-
tmp = transformChildren(stmt.
|
|
231
|
+
tmp = transformChildren(stmt.hu(VOID, emptyList()), tr);
|
|
232
232
|
} else {
|
|
233
233
|
tmp = transformChildren(stmt, tr);
|
|
234
234
|
}
|
|
235
235
|
return tmp;
|
|
236
236
|
}
|
|
237
237
|
function JavaEmitter$emitShared$lambda(name) {
|
|
238
|
-
switch (name.
|
|
238
|
+
switch (name.wt()) {
|
|
239
239
|
case 'client':
|
|
240
|
-
return Companion_getInstance().
|
|
240
|
+
return Companion_getInstance().vt('getClient');
|
|
241
241
|
case 'server':
|
|
242
|
-
return Companion_getInstance().
|
|
242
|
+
return Companion_getInstance().vt('getServer');
|
|
243
243
|
default:
|
|
244
244
|
return null;
|
|
245
245
|
}
|
|
@@ -249,7 +249,7 @@ function JavaEmitter$emitShared$lambda_0($imports) {
|
|
|
249
249
|
var tmp;
|
|
250
250
|
if (element instanceof File) {
|
|
251
251
|
// Inline function 'kotlin.collections.partition' call
|
|
252
|
-
var this_0 = element.
|
|
252
|
+
var this_0 = element.hv_1;
|
|
253
253
|
var first = ArrayList_init_$Create$_0();
|
|
254
254
|
var second = ArrayList_init_$Create$_0();
|
|
255
255
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -262,9 +262,9 @@ function JavaEmitter$emitShared$lambda_0($imports) {
|
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
264
|
var _destruct__k2r9zo = new Pair(first, second);
|
|
265
|
-
var packageElements = _destruct__k2r9zo.
|
|
266
|
-
var rest = _destruct__k2r9zo.
|
|
267
|
-
tmp = element.
|
|
265
|
+
var packageElements = _destruct__k2r9zo.ye();
|
|
266
|
+
var rest = _destruct__k2r9zo.ze();
|
|
267
|
+
tmp = element.kv(VOID, plus(plus(packageElements, $imports), rest));
|
|
268
268
|
} else {
|
|
269
269
|
tmp = element;
|
|
270
270
|
}
|
|
@@ -276,27 +276,27 @@ function JavaEmitter$emitShared$lambda_1($clientServer) {
|
|
|
276
276
|
return function (element, transformer) {
|
|
277
277
|
var tmp;
|
|
278
278
|
if (element instanceof Namespace) {
|
|
279
|
-
var injected = element.
|
|
279
|
+
var injected = element.mv_1.equals(Companion_getInstance().vt('Wirespec')) ? $clientServer : emptyList();
|
|
280
280
|
var tmp_0;
|
|
281
281
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
282
282
|
if (!injected.r()) {
|
|
283
283
|
// Inline function 'community.flock.wirespec.compiler.core.ir.withElements' call
|
|
284
|
-
var elements = plus(element.
|
|
284
|
+
var elements = plus(element.iv(), injected);
|
|
285
285
|
var tmp_1;
|
|
286
286
|
if (element instanceof File) {
|
|
287
|
-
tmp_1 = element.
|
|
287
|
+
tmp_1 = element.kv(VOID, elements);
|
|
288
288
|
} else {
|
|
289
289
|
if (element instanceof Struct) {
|
|
290
|
-
tmp_1 = element.
|
|
290
|
+
tmp_1 = element.rx(VOID, VOID, VOID, VOID, elements);
|
|
291
291
|
} else {
|
|
292
292
|
if (element instanceof Namespace) {
|
|
293
|
-
tmp_1 = element.
|
|
293
|
+
tmp_1 = element.rv(VOID, elements);
|
|
294
294
|
} else {
|
|
295
295
|
if (element instanceof Interface) {
|
|
296
|
-
tmp_1 = element.
|
|
296
|
+
tmp_1 = element.aw(VOID, elements);
|
|
297
297
|
} else {
|
|
298
298
|
if (element instanceof Enum) {
|
|
299
|
-
tmp_1 = element.
|
|
299
|
+
tmp_1 = element.fx(VOID, VOID, VOID, VOID, VOID, elements);
|
|
300
300
|
} else {
|
|
301
301
|
if (element instanceof Main) {
|
|
302
302
|
tmp_1 = element;
|
|
@@ -334,7 +334,7 @@ function JavaEmitter$emitGenerator$lambda_1(it) {
|
|
|
334
334
|
}
|
|
335
335
|
function JavaEmitter$emitGenerator$lambda_2(this$0) {
|
|
336
336
|
return function (it) {
|
|
337
|
-
return import_0(this$0.
|
|
337
|
+
return import_0(this$0.y1z().at_1 + '.model', it);
|
|
338
338
|
};
|
|
339
339
|
}
|
|
340
340
|
function JavaEmitter$emit$lambda(this$0) {
|
|
@@ -346,38 +346,38 @@ function JavaEmitter$emit$lambda_0(it) {
|
|
|
346
346
|
return listOf(function_0('label', VOID, VOID, JavaEmitter$emit$lambda$lambda));
|
|
347
347
|
}
|
|
348
348
|
function JavaEmitter$emit$lambda$lambda($this$function) {
|
|
349
|
-
$this$function.
|
|
350
|
-
$this$function.
|
|
349
|
+
$this$function.i13(String_instance);
|
|
350
|
+
$this$function.l13(new VariableReference(Companion_getInstance().vt('label')));
|
|
351
351
|
return Unit_instance;
|
|
352
352
|
}
|
|
353
353
|
function JavaEmitter(packageName, emitShared) {
|
|
354
354
|
Companion_getInstance_0();
|
|
355
|
-
packageName = packageName === VOID ? Companion_instance_0.
|
|
356
|
-
emitShared = emitShared === VOID ? Companion_instance_1.
|
|
357
|
-
this.
|
|
358
|
-
this.
|
|
359
|
-
this.
|
|
360
|
-
this.
|
|
361
|
-
this.
|
|
355
|
+
packageName = packageName === VOID ? Companion_instance_0.zs('community.flock.wirespec.generated') : packageName;
|
|
356
|
+
emitShared = emitShared === VOID ? Companion_instance_1.eq() : emitShared;
|
|
357
|
+
this.s1z_1 = packageName;
|
|
358
|
+
this.t1z_1 = emitShared;
|
|
359
|
+
this.u1z_1 = JavaGenerator_getInstance();
|
|
360
|
+
this.v1z_1 = FileExtension_Java_getInstance();
|
|
361
|
+
this.w1z_1 = listOf(import_0('community.flock.wirespec.java', 'Wirespec'));
|
|
362
362
|
var tmp = this;
|
|
363
|
-
var tmp_0 = Companion_getInstance_0().
|
|
363
|
+
var tmp_0 = Companion_getInstance_0().r1z();
|
|
364
364
|
var tmp_1 = JavaEmitter$sanitizationConfig$lambda;
|
|
365
365
|
var tmp_2 = JavaEmitter$sanitizationConfig$lambda_0;
|
|
366
366
|
var tmp_3 = JavaEmitter$sanitizationConfig$lambda_1;
|
|
367
367
|
var tmp_4 = JavaEmitter$sanitizationConfig$lambda_2(this);
|
|
368
|
-
tmp.
|
|
368
|
+
tmp.x1z_1 = new SanitizationConfig(tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, JavaEmitter$sanitizationConfig$lambda_3);
|
|
369
369
|
}
|
|
370
|
-
protoOf(JavaEmitter).
|
|
371
|
-
return this.
|
|
370
|
+
protoOf(JavaEmitter).y1z = function () {
|
|
371
|
+
return this.s1z_1;
|
|
372
372
|
};
|
|
373
|
-
protoOf(JavaEmitter).
|
|
374
|
-
return this.
|
|
373
|
+
protoOf(JavaEmitter).g1a = function () {
|
|
374
|
+
return this.u1z_1;
|
|
375
375
|
};
|
|
376
|
-
protoOf(JavaEmitter).
|
|
377
|
-
return this.
|
|
376
|
+
protoOf(JavaEmitter).vp = function () {
|
|
377
|
+
return this.v1z_1;
|
|
378
378
|
};
|
|
379
|
-
protoOf(JavaEmitter).
|
|
380
|
-
var packageName = Companion_instance_0.
|
|
379
|
+
protoOf(JavaEmitter).b1a = function () {
|
|
380
|
+
var packageName = Companion_instance_0.zs('community.flock.wirespec.java');
|
|
381
381
|
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
382
|
// Inline function 'kotlin.collections.map' call
|
|
383
383
|
var this_0 = convertClientServer();
|
|
@@ -396,49 +396,49 @@ protoOf(JavaEmitter).s19 = function () {
|
|
|
396
396
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
397
397
|
var tmp = scope;
|
|
398
398
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
399
|
-
var this_2 = scope.
|
|
399
|
+
var this_2 = scope.t17_1;
|
|
400
400
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
401
401
|
// Inline function 'kotlin.apply' call
|
|
402
402
|
var this_3 = new TransformerBuilder();
|
|
403
|
-
this_3.
|
|
404
|
-
var tmp$ret$7 = this_3.
|
|
405
|
-
tmp.
|
|
403
|
+
this_3.n18(JavaEmitter$emitShared$lambda_0(imports));
|
|
404
|
+
var tmp$ret$7 = this_3.i18();
|
|
405
|
+
tmp.t17_1 = transform(this_2, tmp$ret$7);
|
|
406
406
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.injectAfter' call
|
|
407
407
|
var tmp_0 = scope;
|
|
408
408
|
// Inline function 'community.flock.wirespec.compiler.core.ir.injectAfter' call
|
|
409
409
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
410
|
-
var this_4 = scope.
|
|
410
|
+
var this_4 = scope.t17_1;
|
|
411
411
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
412
412
|
// Inline function 'kotlin.apply' call
|
|
413
413
|
var this_5 = new TransformerBuilder();
|
|
414
|
-
this_5.
|
|
415
|
-
var tmp$ret$13 = this_5.
|
|
416
|
-
tmp_0.
|
|
417
|
-
var tmp_1 = scope.
|
|
414
|
+
this_5.n18(JavaEmitter$emitShared$lambda_1(clientServer));
|
|
415
|
+
var tmp$ret$13 = this_5.i18();
|
|
416
|
+
tmp_0.t17_1 = transform(this_4, tmp$ret$13);
|
|
417
|
+
var tmp_1 = scope.t17_1;
|
|
418
418
|
var wirespecShared = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
419
419
|
var tmp_2;
|
|
420
|
-
if (this.
|
|
420
|
+
if (this.t1z_1.fq_1) {
|
|
421
421
|
tmp_2 = wirespecShared;
|
|
422
422
|
} else {
|
|
423
423
|
tmp_2 = null;
|
|
424
424
|
}
|
|
425
425
|
return tmp_2;
|
|
426
426
|
};
|
|
427
|
-
protoOf(JavaEmitter).
|
|
427
|
+
protoOf(JavaEmitter).bs = function (definition, module_0, logger) {
|
|
428
428
|
var file = emit.call(this, definition, module_0, logger);
|
|
429
|
-
var tmp = file.
|
|
429
|
+
var tmp = file.kv(Companion_getInstance().vt(sanitizeSymbol(this, file.gv_1.yt())));
|
|
430
430
|
// Inline function 'kotlin.takeIf' call
|
|
431
|
-
var this_0 = this.
|
|
431
|
+
var this_0 = this.w1z_1;
|
|
432
432
|
var tmp_0;
|
|
433
|
-
if (Companion_instance.
|
|
433
|
+
if (Companion_instance.yr(module_0)) {
|
|
434
434
|
tmp_0 = this_0;
|
|
435
435
|
} else {
|
|
436
436
|
tmp_0 = null;
|
|
437
437
|
}
|
|
438
438
|
var tmp$ret$0 = tmp_0;
|
|
439
|
-
return placeInPackage(prependImports(tmp, tmp$ret$0), this.
|
|
439
|
+
return placeInPackage(prependImports(tmp, tmp$ret$0), this.y1z(), definition);
|
|
440
440
|
};
|
|
441
|
-
protoOf(JavaEmitter).
|
|
441
|
+
protoOf(JavaEmitter).j1a = function (definition, module_0) {
|
|
442
442
|
var tmp;
|
|
443
443
|
if (definition instanceof Type) {
|
|
444
444
|
tmp = convertToGenerator_2(definition, module_0);
|
|
@@ -458,33 +458,33 @@ protoOf(JavaEmitter).a1a = function (definition, module_0) {
|
|
|
458
458
|
}
|
|
459
459
|
}
|
|
460
460
|
var generatorFile = tmp;
|
|
461
|
-
var sanitized = sanitizeNames(generatorFile, this.
|
|
462
|
-
var generatorOwnName = definition.
|
|
461
|
+
var sanitized = sanitizeNames(generatorFile, this.x1z_1);
|
|
462
|
+
var generatorOwnName = definition.cs().o1() + 'Generator';
|
|
463
463
|
var tmp_0 = asSequence(collectCustomTypeNames(sanitized));
|
|
464
464
|
var tmp_1 = filterNot(tmp_0, JavaEmitter$emitGenerator$lambda);
|
|
465
465
|
var tmp_2 = filterNot(tmp_1, JavaEmitter$emitGenerator$lambda_0(generatorOwnName));
|
|
466
466
|
var tmp_3 = distinct(map(tmp_2, JavaEmitter$emitGenerator$lambda_1));
|
|
467
467
|
var modelImports = toList(map(tmp_3, JavaEmitter$emitGenerator$lambda_2(this)));
|
|
468
|
-
return placeInPackage_0(prependImports(sanitized, plus(this.
|
|
468
|
+
return placeInPackage_0(prependImports(sanitized, plus(this.w1z_1, modelImports)), this.y1z(), 'generator');
|
|
469
469
|
};
|
|
470
|
-
protoOf(JavaEmitter).
|
|
471
|
-
return sanitizeNames(convertWithValidation(type, module_0), this.
|
|
470
|
+
protoOf(JavaEmitter).ts = function (type, module_0) {
|
|
471
|
+
return sanitizeNames(convertWithValidation(type, module_0), this.x1z_1);
|
|
472
472
|
};
|
|
473
|
-
protoOf(JavaEmitter).
|
|
473
|
+
protoOf(JavaEmitter).rs = function (enum_0, module_0) {
|
|
474
474
|
var tmp = convert_0(enum_0);
|
|
475
475
|
var tmp_0 = JavaEmitter$emit$lambda(this);
|
|
476
|
-
return sanitizeNames(injectEnumLabelField(tmp, tmp_0, JavaEmitter$emit$lambda_0), this.
|
|
476
|
+
return sanitizeNames(injectEnumLabelField(tmp, tmp_0, JavaEmitter$emit$lambda_0), this.x1z_1);
|
|
477
477
|
};
|
|
478
|
-
protoOf(JavaEmitter).
|
|
479
|
-
return sanitizeNames(convert_1(union), this.
|
|
478
|
+
protoOf(JavaEmitter).hs = function (union) {
|
|
479
|
+
return sanitizeNames(convert_1(union), this.x1z_1);
|
|
480
480
|
};
|
|
481
|
-
protoOf(JavaEmitter).
|
|
482
|
-
return sanitizeNames(applyRefinedStructShape(convert_2(refined), refined), this.
|
|
481
|
+
protoOf(JavaEmitter).ms = function (refined) {
|
|
482
|
+
return sanitizeNames(applyRefinedStructShape(convert_2(refined), refined), this.x1z_1);
|
|
483
483
|
};
|
|
484
|
-
protoOf(JavaEmitter).
|
|
485
|
-
var tmp = sanitizeNames(transformTypeDescriptors(injectApi(convert_3(endpoint), endpoint)), this.
|
|
484
|
+
protoOf(JavaEmitter).ss = function (endpoint) {
|
|
485
|
+
var tmp = sanitizeNames(transformTypeDescriptors(injectApi(convert_3(endpoint), endpoint)), this.x1z_1);
|
|
486
486
|
// Inline function 'kotlin.takeIf' call
|
|
487
|
-
var this_0 = buildModelImports(endpoint, this.
|
|
487
|
+
var this_0 = buildModelImports(endpoint, this.y1z());
|
|
488
488
|
var tmp_0;
|
|
489
489
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
490
490
|
if (!this_0.r()) {
|
|
@@ -495,20 +495,20 @@ protoOf(JavaEmitter).js = function (endpoint) {
|
|
|
495
495
|
var tmp$ret$0 = tmp_0;
|
|
496
496
|
return prependImports(tmp, tmp$ret$0);
|
|
497
497
|
};
|
|
498
|
-
protoOf(JavaEmitter).
|
|
498
|
+
protoOf(JavaEmitter).gs = function (channel) {
|
|
499
499
|
var tmp;
|
|
500
|
-
if (channel.
|
|
501
|
-
tmp = this.
|
|
500
|
+
if (channel.wq_1.o1() === channel.xq_1.o1()) {
|
|
501
|
+
tmp = this.y1z().at_1 + '.model.';
|
|
502
502
|
} else {
|
|
503
503
|
tmp = '';
|
|
504
504
|
}
|
|
505
505
|
var fullyQualifiedPrefix = tmp;
|
|
506
|
-
return qualifyChannelReferences(sanitizeNames(convert_4(channel), this.
|
|
506
|
+
return qualifyChannelReferences(sanitizeNames(convert_4(channel), this.x1z_1), fullyQualifiedPrefix);
|
|
507
507
|
};
|
|
508
|
-
protoOf(JavaEmitter).
|
|
509
|
-
var tmp = sanitizeNames(convert_5(rpc), this.
|
|
508
|
+
protoOf(JavaEmitter).fs = function (rpc) {
|
|
509
|
+
var tmp = sanitizeNames(convert_5(rpc), this.x1z_1);
|
|
510
510
|
// Inline function 'kotlin.takeIf' call
|
|
511
|
-
var this_0 = buildModelImports(rpc, this.
|
|
511
|
+
var this_0 = buildModelImports(rpc, this.y1z());
|
|
512
512
|
var tmp_0;
|
|
513
513
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
514
514
|
if (!this_0.r()) {
|
|
@@ -519,15 +519,15 @@ protoOf(JavaEmitter).wr = function (rpc) {
|
|
|
519
519
|
var tmp$ret$0 = tmp_0;
|
|
520
520
|
return prependImports(tmp, tmp$ret$0);
|
|
521
521
|
};
|
|
522
|
-
protoOf(JavaEmitter).
|
|
523
|
-
var imports = buildModelImports(endpoint, this.
|
|
524
|
-
var endpointImport = import_0(this.
|
|
525
|
-
var endpointName = endpoint.
|
|
526
|
-
var file = wrapAsyncReturnInThenApply(transformTypeDescriptors(sanitizeNames(emitEndpointClient.call(this, endpoint), this.
|
|
527
|
-
var subPackageName = plus_1(this.
|
|
528
|
-
return new File(Companion_getInstance().
|
|
522
|
+
protoOf(JavaEmitter).i1a = function (endpoint) {
|
|
523
|
+
var imports = buildModelImports(endpoint, this.y1z());
|
|
524
|
+
var endpointImport = import_0(this.y1z().at_1 + '.endpoint', endpoint.er_1.o1());
|
|
525
|
+
var endpointName = endpoint.er_1.o1();
|
|
526
|
+
var file = wrapAsyncReturnInThenApply(transformTypeDescriptors(sanitizeNames(emitEndpointClient.call(this, endpoint), this.x1z_1)), endpointName);
|
|
527
|
+
var subPackageName = plus_1(this.y1z(), 'client');
|
|
528
|
+
return new File(Companion_getInstance().vt(subPackageName.ct() + sanitizeSymbol(this, file.gv_1.yt())), plus(plus(plus(plus(listOf(new Package(subPackageName.at_1)), this.w1z_1), imports), listOf(endpointImport)), file.hv_1));
|
|
529
529
|
};
|
|
530
|
-
protoOf(JavaEmitter).
|
|
530
|
+
protoOf(JavaEmitter).c1a = function (endpoints, logger) {
|
|
531
531
|
// Inline function 'kotlin.collections.flatMap' call
|
|
532
532
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
533
533
|
var destination = ArrayList_init_$Create$_0();
|
|
@@ -543,7 +543,7 @@ protoOf(JavaEmitter).t19 = function (endpoints, logger) {
|
|
|
543
543
|
var _iterator__ex2g4s_0 = destination.t();
|
|
544
544
|
while (_iterator__ex2g4s_0.u()) {
|
|
545
545
|
var e = _iterator__ex2g4s_0.v();
|
|
546
|
-
var key = e.
|
|
546
|
+
var key = e.q18_1;
|
|
547
547
|
if (set.x(key)) {
|
|
548
548
|
list_0.x(e);
|
|
549
549
|
}
|
|
@@ -570,7 +570,7 @@ protoOf(JavaEmitter).t19 = function (endpoints, logger) {
|
|
|
570
570
|
var _iterator__ex2g4s_2 = endpoints.t();
|
|
571
571
|
while (_iterator__ex2g4s_2.u()) {
|
|
572
572
|
var element_1 = _iterator__ex2g4s_2.v();
|
|
573
|
-
if (element_1.
|
|
573
|
+
if (element_1.er_1.o1() === element_0.q18_1) {
|
|
574
574
|
tmp$ret$8 = false;
|
|
575
575
|
break $l$block_0;
|
|
576
576
|
}
|
|
@@ -587,7 +587,7 @@ protoOf(JavaEmitter).t19 = function (endpoints, logger) {
|
|
|
587
587
|
var _iterator__ex2g4s_3 = destination_0.t();
|
|
588
588
|
while (_iterator__ex2g4s_3.u()) {
|
|
589
589
|
var item = _iterator__ex2g4s_3.v();
|
|
590
|
-
var tmp$ret$12 = import_0(this.
|
|
590
|
+
var tmp$ret$12 = import_0(this.y1z().at_1 + '.model', item.q18_1);
|
|
591
591
|
destination_1.x(tmp$ret$12);
|
|
592
592
|
}
|
|
593
593
|
var imports = destination_1;
|
|
@@ -597,7 +597,7 @@ protoOf(JavaEmitter).t19 = function (endpoints, logger) {
|
|
|
597
597
|
var _iterator__ex2g4s_4 = endpoints.t();
|
|
598
598
|
while (_iterator__ex2g4s_4.u()) {
|
|
599
599
|
var item_0 = _iterator__ex2g4s_4.v();
|
|
600
|
-
var tmp$ret$15 = import_0(this.
|
|
600
|
+
var tmp$ret$15 = import_0(this.y1z().at_1 + '.endpoint', item_0.er_1.o1());
|
|
601
601
|
destination_2.x(tmp$ret$15);
|
|
602
602
|
}
|
|
603
603
|
var endpointImports = destination_2;
|
|
@@ -607,19 +607,19 @@ protoOf(JavaEmitter).t19 = function (endpoints, logger) {
|
|
|
607
607
|
var _iterator__ex2g4s_5 = endpoints.t();
|
|
608
608
|
while (_iterator__ex2g4s_5.u()) {
|
|
609
609
|
var item_1 = _iterator__ex2g4s_5.v();
|
|
610
|
-
var tmp$ret$18 = import_0(this.
|
|
610
|
+
var tmp$ret$18 = import_0(this.y1z().at_1 + '.client', item_1.er_1.o1() + 'Client');
|
|
611
611
|
destination_3.x(tmp$ret$18);
|
|
612
612
|
}
|
|
613
613
|
var clientImports = destination_3;
|
|
614
614
|
var allImports = plus(plus(imports, endpointImports), clientImports);
|
|
615
|
-
var file = sanitizeNames(emitClient.call(this, endpoints, logger), this.
|
|
616
|
-
return new File(Companion_getInstance().
|
|
615
|
+
var file = sanitizeNames(emitClient.call(this, endpoints, logger), this.x1z_1);
|
|
616
|
+
return new File(Companion_getInstance().vt(this.y1z().ct() + sanitizeSymbol(this, file.gv_1.yt())), plus(plus(plus(listOf(new Package(this.y1z().at_1)), this.w1z_1), allImports), file.hv_1));
|
|
617
617
|
};
|
|
618
618
|
function transformTypeDescriptors(_this__u8e3s4) {
|
|
619
619
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
620
620
|
var scope = new TransformScope(_this__u8e3s4);
|
|
621
|
-
scope.
|
|
622
|
-
var tmp = scope.
|
|
621
|
+
scope.l18(transformTypeDescriptors$lambda);
|
|
622
|
+
var tmp = scope.t17_1;
|
|
623
623
|
return isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
624
624
|
}
|
|
625
625
|
function applyRefinedStructShape(_this__u8e3s4, refined) {
|
|
@@ -628,14 +628,14 @@ function applyRefinedStructShape(_this__u8e3s4, refined) {
|
|
|
628
628
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
629
629
|
var tmp = scope;
|
|
630
630
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
631
|
-
var this_0 = scope.
|
|
631
|
+
var this_0 = scope.t17_1;
|
|
632
632
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
633
633
|
// Inline function 'kotlin.apply' call
|
|
634
634
|
var this_1 = new TransformerBuilder();
|
|
635
|
-
this_1.
|
|
636
|
-
var tmp$ret$4 = this_1.
|
|
637
|
-
tmp.
|
|
638
|
-
var tmp_0 = scope.
|
|
635
|
+
this_1.n18(applyRefinedStructShape$lambda(refined));
|
|
636
|
+
var tmp$ret$4 = this_1.i18();
|
|
637
|
+
tmp.t17_1 = transform(this_0, tmp$ret$4);
|
|
638
|
+
var tmp_0 = scope.t17_1;
|
|
639
639
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
640
640
|
}
|
|
641
641
|
function injectApi(_this__u8e3s4, endpoint) {
|
|
@@ -645,14 +645,14 @@ function injectApi(_this__u8e3s4, endpoint) {
|
|
|
645
645
|
var tmp = scope;
|
|
646
646
|
// Inline function 'community.flock.wirespec.compiler.core.ir.injectAfter' call
|
|
647
647
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
648
|
-
var this_0 = scope.
|
|
648
|
+
var this_0 = scope.t17_1;
|
|
649
649
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
650
650
|
// Inline function 'kotlin.apply' call
|
|
651
651
|
var this_1 = new TransformerBuilder();
|
|
652
|
-
this_1.
|
|
653
|
-
var tmp$ret$5 = this_1.
|
|
654
|
-
tmp.
|
|
655
|
-
var tmp_0 = scope.
|
|
652
|
+
this_1.n18(injectApi$lambda(endpoint));
|
|
653
|
+
var tmp$ret$5 = this_1.i18();
|
|
654
|
+
tmp.t17_1 = transform(this_0, tmp$ret$5);
|
|
655
|
+
var tmp_0 = scope.t17_1;
|
|
656
656
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
657
657
|
}
|
|
658
658
|
function buildModelImports(_this__u8e3s4, packageName) {
|
|
@@ -663,7 +663,7 @@ function buildModelImports(_this__u8e3s4, packageName) {
|
|
|
663
663
|
var _iterator__ex2g4s = tmp0.t();
|
|
664
664
|
while (_iterator__ex2g4s.u()) {
|
|
665
665
|
var element = _iterator__ex2g4s.v();
|
|
666
|
-
if (!(_this__u8e3s4.
|
|
666
|
+
if (!(_this__u8e3s4.cs().o1() === element.q18_1)) {
|
|
667
667
|
destination.x(element);
|
|
668
668
|
}
|
|
669
669
|
}
|
|
@@ -673,7 +673,7 @@ function buildModelImports(_this__u8e3s4, packageName) {
|
|
|
673
673
|
var _iterator__ex2g4s_0 = destination.t();
|
|
674
674
|
while (_iterator__ex2g4s_0.u()) {
|
|
675
675
|
var item = _iterator__ex2g4s_0.v();
|
|
676
|
-
var tmp$ret$5 = import_0(packageName.
|
|
676
|
+
var tmp$ret$5 = import_0(packageName.at_1 + '.model', Companion_getInstance().vt(item.q18_1).yt());
|
|
677
677
|
destination_0.x(tmp$ret$5);
|
|
678
678
|
}
|
|
679
679
|
return destination_0;
|
|
@@ -684,14 +684,14 @@ function qualifyChannelReferences(_this__u8e3s4, fullyQualifiedPrefix) {
|
|
|
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.t17_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.n18(qualifyChannelReferences$lambda(fullyQualifiedPrefix));
|
|
692
|
+
var tmp$ret$4 = this_1.i18();
|
|
693
|
+
tmp.t17_1 = transform(this_0, tmp$ret$4);
|
|
694
|
+
var tmp_0 = scope.t17_1;
|
|
695
695
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
696
696
|
}
|
|
697
697
|
function wrapAsyncReturnInThenApply(_this__u8e3s4, endpointName) {
|
|
@@ -700,26 +700,26 @@ function wrapAsyncReturnInThenApply(_this__u8e3s4, endpointName) {
|
|
|
700
700
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
701
701
|
var tmp = scope;
|
|
702
702
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
703
|
-
var this_0 = scope.
|
|
703
|
+
var this_0 = scope.t17_1;
|
|
704
704
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
705
705
|
// Inline function 'kotlin.apply' call
|
|
706
706
|
var this_1 = new TransformerBuilder();
|
|
707
|
-
this_1.
|
|
708
|
-
var tmp$ret$4 = this_1.
|
|
709
|
-
tmp.
|
|
710
|
-
var tmp_0 = scope.
|
|
707
|
+
this_1.n18(wrapAsyncReturnInThenApply$lambda(endpointName));
|
|
708
|
+
var tmp$ret$4 = this_1.i18();
|
|
709
|
+
tmp.t17_1 = transform(this_0, tmp$ret$4);
|
|
710
|
+
var tmp_0 = scope.t17_1;
|
|
711
711
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
712
712
|
}
|
|
713
713
|
function findRoot(_this__u8e3s4) {
|
|
714
714
|
var tmp;
|
|
715
715
|
if (_this__u8e3s4 instanceof Nullable) {
|
|
716
|
-
tmp = findRoot(_this__u8e3s4.
|
|
716
|
+
tmp = findRoot(_this__u8e3s4.tu_1);
|
|
717
717
|
} else {
|
|
718
718
|
if (_this__u8e3s4 instanceof Array_0) {
|
|
719
|
-
tmp = findRoot(_this__u8e3s4.
|
|
719
|
+
tmp = findRoot(_this__u8e3s4.ku_1);
|
|
720
720
|
} else {
|
|
721
721
|
if (_this__u8e3s4 instanceof Dict) {
|
|
722
|
-
tmp = findRoot(_this__u8e3s4.
|
|
722
|
+
tmp = findRoot(_this__u8e3s4.nu_1);
|
|
723
723
|
} else {
|
|
724
724
|
tmp = _this__u8e3s4;
|
|
725
725
|
}
|
|
@@ -748,7 +748,7 @@ function toJavaName(_this__u8e3s4) {
|
|
|
748
748
|
var tmp;
|
|
749
749
|
if (_this__u8e3s4 instanceof Integer) {
|
|
750
750
|
var tmp_0;
|
|
751
|
-
switch (_this__u8e3s4.
|
|
751
|
+
switch (_this__u8e3s4.iu_1.e3_1) {
|
|
752
752
|
case 0:
|
|
753
753
|
tmp_0 = 'Integer';
|
|
754
754
|
break;
|
|
@@ -763,7 +763,7 @@ function toJavaName(_this__u8e3s4) {
|
|
|
763
763
|
} else {
|
|
764
764
|
if (_this__u8e3s4 instanceof Number_0) {
|
|
765
765
|
var tmp_1;
|
|
766
|
-
switch (_this__u8e3s4.
|
|
766
|
+
switch (_this__u8e3s4.ju_1.e3_1) {
|
|
767
767
|
case 0:
|
|
768
768
|
tmp_1 = 'Float';
|
|
769
769
|
break;
|
|
@@ -792,7 +792,7 @@ function toJavaName(_this__u8e3s4) {
|
|
|
792
792
|
tmp = 'Void';
|
|
793
793
|
} else {
|
|
794
794
|
if (_this__u8e3s4 instanceof Custom) {
|
|
795
|
-
tmp = _this__u8e3s4.
|
|
795
|
+
tmp = _this__u8e3s4.pu_1.yt();
|
|
796
796
|
} else {
|
|
797
797
|
tmp = 'Object';
|
|
798
798
|
}
|
|
@@ -806,7 +806,7 @@ function toJavaName(_this__u8e3s4) {
|
|
|
806
806
|
return tmp;
|
|
807
807
|
}
|
|
808
808
|
function buildApiStruct(_this__u8e3s4) {
|
|
809
|
-
var pathTemplate = '/' + joinToString(_this__u8e3s4.
|
|
809
|
+
var pathTemplate = '/' + joinToString(_this__u8e3s4.gr_1, '/', VOID, VOID, VOID, VOID, buildApiStruct$lambda);
|
|
810
810
|
return struct('Api', buildApiStruct$lambda_0(pathTemplate, _this__u8e3s4));
|
|
811
811
|
}
|
|
812
812
|
function withFullyQualifiedPrefix(_this__u8e3s4, prefix) {
|
|
@@ -818,14 +818,14 @@ function withFullyQualifiedPrefix(_this__u8e3s4, prefix) {
|
|
|
818
818
|
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matching' call
|
|
819
819
|
var tmp_0 = scope;
|
|
820
820
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatching' call
|
|
821
|
-
var this_0 = scope.
|
|
821
|
+
var this_0 = scope.t17_1;
|
|
822
822
|
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
823
823
|
// Inline function 'kotlin.apply' call
|
|
824
824
|
var this_1 = new TransformerBuilder();
|
|
825
|
-
this_1.
|
|
826
|
-
var tmp$ret$5 = this_1.
|
|
827
|
-
tmp_0.
|
|
828
|
-
var tmp_1 = scope.
|
|
825
|
+
this_1.z17(withFullyQualifiedPrefix$lambda(prefix));
|
|
826
|
+
var tmp$ret$5 = this_1.i18();
|
|
827
|
+
tmp_0.t17_1 = transform(this_0, tmp$ret$5);
|
|
828
|
+
var tmp_1 = scope.t17_1;
|
|
829
829
|
tmp = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
830
830
|
} else {
|
|
831
831
|
tmp = _this__u8e3s4;
|
|
@@ -835,8 +835,8 @@ function withFullyQualifiedPrefix(_this__u8e3s4, prefix) {
|
|
|
835
835
|
function transformTypeDescriptors$lambda(stmt, tr) {
|
|
836
836
|
var tmp;
|
|
837
837
|
if (stmt instanceof TypeDescriptor) {
|
|
838
|
-
var rootType = findRoot(stmt.
|
|
839
|
-
var containerStr = rawContainerClass(stmt.
|
|
838
|
+
var rootType = findRoot(stmt.gy_1);
|
|
839
|
+
var containerStr = rawContainerClass(stmt.gy_1);
|
|
840
840
|
var rootStr = toJavaName(rootType) + '.class';
|
|
841
841
|
var tmp_0;
|
|
842
842
|
if (containerStr == null) {
|
|
@@ -855,8 +855,8 @@ function transformTypeDescriptors$lambda(stmt, tr) {
|
|
|
855
855
|
}
|
|
856
856
|
function applyRefinedStructShape$lambda$lambda($refined) {
|
|
857
857
|
return function ($this$function) {
|
|
858
|
-
$this$function.
|
|
859
|
-
$this$function.
|
|
858
|
+
$this$function.i13(convert_6($refined.ls_1));
|
|
859
|
+
$this$function.l13(new VariableReference(Companion_getInstance().vt('value')));
|
|
860
860
|
return Unit_instance;
|
|
861
861
|
};
|
|
862
862
|
}
|
|
@@ -866,39 +866,39 @@ function applyRefinedStructShape$lambda($refined) {
|
|
|
866
866
|
if (element instanceof Struct) {
|
|
867
867
|
var tmp_0 = listOf(Custom_init_$Create$('Wirespec.Refined'));
|
|
868
868
|
// Inline function 'kotlin.collections.map' call
|
|
869
|
-
var this_0 = element.
|
|
869
|
+
var this_0 = element.kx_1;
|
|
870
870
|
// Inline function 'kotlin.collections.mapTo' call
|
|
871
871
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
872
872
|
var _iterator__ex2g4s = this_0.t();
|
|
873
873
|
while (_iterator__ex2g4s.u()) {
|
|
874
874
|
var item = _iterator__ex2g4s.v();
|
|
875
875
|
var tmp0_safe_receiver = item instanceof Function ? item : null;
|
|
876
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
876
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ey(VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
|
|
877
877
|
var tmp$ret$3 = tmp1_elvis_lhs == null ? item : tmp1_elvis_lhs;
|
|
878
878
|
destination.x(tmp$ret$3);
|
|
879
879
|
}
|
|
880
|
-
var tmp0 = element.
|
|
880
|
+
var tmp0 = element.rx(VOID, VOID, VOID, tmp_0, destination);
|
|
881
881
|
// Inline function 'community.flock.wirespec.compiler.core.ir.plus' call
|
|
882
882
|
var element_0 = function_0('value', VOID, true, applyRefinedStructShape$lambda$lambda($refined));
|
|
883
883
|
var tmp_1;
|
|
884
884
|
if (tmp0 instanceof File) {
|
|
885
|
-
var tmp_2 = tmp0.
|
|
885
|
+
var tmp_2 = tmp0.kv(VOID, plus_0(tmp0.hv_1, element_0));
|
|
886
886
|
tmp_1 = tmp_2 instanceof Struct ? tmp_2 : THROW_CCE();
|
|
887
887
|
} else {
|
|
888
888
|
if (tmp0 instanceof Struct) {
|
|
889
|
-
var tmp_3 = tmp0.
|
|
889
|
+
var tmp_3 = tmp0.rx(VOID, VOID, VOID, VOID, plus_0(tmp0.kx_1, element_0));
|
|
890
890
|
tmp_1 = tmp_3 instanceof Struct ? tmp_3 : THROW_CCE();
|
|
891
891
|
} else {
|
|
892
892
|
if (tmp0 instanceof Namespace) {
|
|
893
|
-
var tmp_4 = tmp0.
|
|
893
|
+
var tmp_4 = tmp0.rv(VOID, plus_0(tmp0.nv_1, element_0));
|
|
894
894
|
tmp_1 = tmp_4 instanceof Struct ? tmp_4 : THROW_CCE();
|
|
895
895
|
} else {
|
|
896
896
|
if (tmp0 instanceof Interface) {
|
|
897
|
-
var tmp_5 = tmp0.
|
|
897
|
+
var tmp_5 = tmp0.aw(VOID, plus_0(tmp0.tv_1, element_0));
|
|
898
898
|
tmp_1 = tmp_5 instanceof Struct ? tmp_5 : THROW_CCE();
|
|
899
899
|
} else {
|
|
900
900
|
if (tmp0 instanceof Enum) {
|
|
901
|
-
var tmp_6 = tmp0.
|
|
901
|
+
var tmp_6 = tmp0.fx(VOID, VOID, VOID, VOID, VOID, plus_0(tmp0.cx_1, element_0));
|
|
902
902
|
tmp_1 = tmp_6 instanceof Struct ? tmp_6 : THROW_CCE();
|
|
903
903
|
} else {
|
|
904
904
|
noWhenBranchMatchedException();
|
|
@@ -924,22 +924,22 @@ function injectApi$lambda($endpoint) {
|
|
|
924
924
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
925
925
|
if (!injected.r()) {
|
|
926
926
|
// Inline function 'community.flock.wirespec.compiler.core.ir.withElements' call
|
|
927
|
-
var elements = plus(element.
|
|
927
|
+
var elements = plus(element.iv(), injected);
|
|
928
928
|
var tmp_1;
|
|
929
929
|
if (element instanceof File) {
|
|
930
|
-
tmp_1 = element.
|
|
930
|
+
tmp_1 = element.kv(VOID, elements);
|
|
931
931
|
} else {
|
|
932
932
|
if (element instanceof Struct) {
|
|
933
|
-
tmp_1 = element.
|
|
933
|
+
tmp_1 = element.rx(VOID, VOID, VOID, VOID, elements);
|
|
934
934
|
} else {
|
|
935
935
|
if (element instanceof Namespace) {
|
|
936
|
-
tmp_1 = element.
|
|
936
|
+
tmp_1 = element.rv(VOID, elements);
|
|
937
937
|
} else {
|
|
938
938
|
if (element instanceof Interface) {
|
|
939
|
-
tmp_1 = element.
|
|
939
|
+
tmp_1 = element.aw(VOID, elements);
|
|
940
940
|
} else {
|
|
941
941
|
if (element instanceof Enum) {
|
|
942
|
-
tmp_1 = element.
|
|
942
|
+
tmp_1 = element.fx(VOID, VOID, VOID, VOID, VOID, elements);
|
|
943
943
|
} else {
|
|
944
944
|
if (element instanceof Main) {
|
|
945
945
|
tmp_1 = element;
|
|
@@ -982,11 +982,11 @@ function wrapAsyncReturnInThenApply$lambda($endpointName) {
|
|
|
982
982
|
if (element instanceof Function) {
|
|
983
983
|
var tmp$ret$0;
|
|
984
984
|
$l$block_1: {
|
|
985
|
-
if (!element.
|
|
985
|
+
if (!element.xx_1 || element.wx_1.b1() < 2) {
|
|
986
986
|
tmp$ret$0 = element;
|
|
987
987
|
break $l$block_1;
|
|
988
988
|
}
|
|
989
|
-
var tmp_0 = element.
|
|
989
|
+
var tmp_0 = element.wx_1.c1(element.wx_1.b1() - 2 | 0);
|
|
990
990
|
var tmp0_elvis_lhs = tmp_0 instanceof Assignment ? tmp_0 : null;
|
|
991
991
|
var tmp_1;
|
|
992
992
|
if (tmp0_elvis_lhs == null) {
|
|
@@ -996,16 +996,16 @@ function wrapAsyncReturnInThenApply$lambda($endpointName) {
|
|
|
996
996
|
tmp_1 = tmp0_elvis_lhs;
|
|
997
997
|
}
|
|
998
998
|
var transportAssign = tmp_1;
|
|
999
|
-
var tmp_2 = last(element.
|
|
999
|
+
var tmp_2 = last(element.wx_1);
|
|
1000
1000
|
if (!(tmp_2 instanceof ReturnStatement)) {
|
|
1001
1001
|
tmp$ret$0 = element;
|
|
1002
1002
|
break $l$block_1;
|
|
1003
1003
|
}
|
|
1004
|
-
var tmp_3 = dropLast(element.
|
|
1005
|
-
var tmp1_name = Companion_getInstance().
|
|
1006
|
-
var tmp2_receiver = transportAssign.
|
|
1007
|
-
var tmp3_arguments = mapOf(to(Companion_getInstance().
|
|
1008
|
-
tmp$ret$0 = element.
|
|
1004
|
+
var tmp_3 = dropLast(element.wx_1, 2);
|
|
1005
|
+
var tmp1_name = Companion_getInstance().vt('thenApply');
|
|
1006
|
+
var tmp2_receiver = transportAssign.jy_1;
|
|
1007
|
+
var tmp3_arguments = mapOf(to(Companion_getInstance().vt('mapper'), new RawExpression('rawResponse -> ' + $endpointName + '.fromRawResponse(serialization(), rawResponse)')));
|
|
1008
|
+
tmp$ret$0 = element.ey(VOID, VOID, VOID, VOID, plus_0(tmp_3, new ReturnStatement(new FunctionCall(tmp2_receiver, VOID, tmp1_name, tmp3_arguments))));
|
|
1009
1009
|
}
|
|
1010
1010
|
tmp = tmp$ret$0;
|
|
1011
1011
|
} else {
|
|
@@ -1018,10 +1018,10 @@ function wrapAsyncReturnInThenApply$lambda($endpointName) {
|
|
|
1018
1018
|
function buildApiStruct$lambda(it) {
|
|
1019
1019
|
var tmp;
|
|
1020
1020
|
if (it instanceof Literal) {
|
|
1021
|
-
tmp = it.
|
|
1021
|
+
tmp = it.z19_1;
|
|
1022
1022
|
} else {
|
|
1023
1023
|
if (it instanceof Param) {
|
|
1024
|
-
tmp = '{' + it.
|
|
1024
|
+
tmp = '{' + it.lr_1.o1() + '}';
|
|
1025
1025
|
} else {
|
|
1026
1026
|
noWhenBranchMatchedException();
|
|
1027
1027
|
}
|
|
@@ -1030,38 +1030,38 @@ function buildApiStruct$lambda(it) {
|
|
|
1030
1030
|
}
|
|
1031
1031
|
function buildApiStruct$lambda$lambda($pathTemplate) {
|
|
1032
1032
|
return function ($this$function) {
|
|
1033
|
-
$this$function.
|
|
1034
|
-
$this$function.
|
|
1033
|
+
$this$function.i13(String_instance);
|
|
1034
|
+
$this$function.l13($this$function.f14($pathTemplate));
|
|
1035
1035
|
return Unit_instance;
|
|
1036
1036
|
};
|
|
1037
1037
|
}
|
|
1038
1038
|
function buildApiStruct$lambda$lambda_0($this_buildApiStruct) {
|
|
1039
1039
|
return function ($this$function) {
|
|
1040
|
-
$this$function.
|
|
1041
|
-
$this$function.
|
|
1040
|
+
$this$function.i13(String_instance);
|
|
1041
|
+
$this$function.l13($this$function.f14($this_buildApiStruct.fr_1.d3_1));
|
|
1042
1042
|
return Unit_instance;
|
|
1043
1043
|
};
|
|
1044
1044
|
}
|
|
1045
1045
|
function buildApiStruct$lambda$lambda_1($this$function) {
|
|
1046
|
-
$this$function.
|
|
1047
|
-
$this$function.
|
|
1048
|
-
$this$function.
|
|
1046
|
+
$this$function.i13($this$function.e14('Wirespec.ServerEdge', [$this$function.e14('Request', []), $this$function.e14('Response', [Wildcard_instance])]));
|
|
1047
|
+
$this$function.j13('serialization', $this$function.e14('Wirespec.Serialization', []));
|
|
1048
|
+
$this$function.l13(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
1049
|
return Unit_instance;
|
|
1050
1050
|
}
|
|
1051
1051
|
function buildApiStruct$lambda$lambda_2($this$function) {
|
|
1052
|
-
$this$function.
|
|
1053
|
-
$this$function.
|
|
1054
|
-
$this$function.
|
|
1052
|
+
$this$function.i13($this$function.e14('Wirespec.ClientEdge', [$this$function.e14('Request', []), $this$function.e14('Response', [Wildcard_instance])]));
|
|
1053
|
+
$this$function.j13('serialization', $this$function.e14('Wirespec.Serialization', []));
|
|
1054
|
+
$this$function.l13(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
1055
|
return Unit_instance;
|
|
1056
1056
|
}
|
|
1057
1057
|
function buildApiStruct$lambda_0($pathTemplate, $this_buildApiStruct) {
|
|
1058
1058
|
return function ($this$struct) {
|
|
1059
|
-
$this$struct.
|
|
1060
|
-
$this$struct.
|
|
1061
|
-
$this$struct.
|
|
1062
|
-
$this$struct.
|
|
1063
|
-
$this$struct.
|
|
1064
|
-
$this$struct.
|
|
1059
|
+
$this$struct.q14($this$struct.e14('Wirespec.Server', [$this$struct.e14('Request', []), $this$struct.e14('Response', [Wildcard_instance])]));
|
|
1060
|
+
$this$struct.q14($this$struct.e14('Wirespec.Client', [$this$struct.e14('Request', []), $this$struct.e14('Response', [Wildcard_instance])]));
|
|
1061
|
+
$this$struct.z14('getPathTemplate', VOID, true, buildApiStruct$lambda$lambda($pathTemplate));
|
|
1062
|
+
$this$struct.z14('getMethod', VOID, true, buildApiStruct$lambda$lambda_0($this_buildApiStruct));
|
|
1063
|
+
$this$struct.z14('getServer', VOID, true, buildApiStruct$lambda$lambda_1);
|
|
1064
|
+
$this$struct.z14('getClient', VOID, true, buildApiStruct$lambda$lambda_2);
|
|
1065
1065
|
return Unit_instance;
|
|
1066
1066
|
};
|
|
1067
1067
|
}
|
|
@@ -1069,7 +1069,7 @@ function withFullyQualifiedPrefix$lambda($prefix) {
|
|
|
1069
1069
|
return function (type, transformer) {
|
|
1070
1070
|
var tmp;
|
|
1071
1071
|
if (type instanceof Custom) {
|
|
1072
|
-
tmp = type.
|
|
1072
|
+
tmp = type.su(new Name(listOf($prefix + type.pu_1.yt())));
|
|
1073
1073
|
} else {
|
|
1074
1074
|
tmp = type;
|
|
1075
1075
|
}
|
|
@@ -1078,11 +1078,11 @@ function withFullyQualifiedPrefix$lambda($prefix) {
|
|
|
1078
1078
|
};
|
|
1079
1079
|
}
|
|
1080
1080
|
//region block: post-declaration
|
|
1081
|
-
protoOf(JavaEmitter).
|
|
1082
|
-
protoOf(JavaEmitter).
|
|
1083
|
-
protoOf(JavaEmitter).
|
|
1084
|
-
protoOf(JavaEmitter).
|
|
1085
|
-
protoOf(JavaEmitter).
|
|
1081
|
+
protoOf(JavaEmitter).d1a = get_extensions;
|
|
1082
|
+
protoOf(JavaEmitter).to = emit_0;
|
|
1083
|
+
protoOf(JavaEmitter).a1a = emit_1;
|
|
1084
|
+
protoOf(JavaEmitter).f1a = beforeGenerate;
|
|
1085
|
+
protoOf(JavaEmitter).up = get_supportsDefaults;
|
|
1086
1086
|
//endregion
|
|
1087
1087
|
//region block: exports
|
|
1088
1088
|
export {
|