@flock/wirespec 0.8.11 → 0.8.13
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.
|
@@ -100,33 +100,33 @@
|
|
|
100
100
|
}
|
|
101
101
|
setMetadataFor(RefinedTypeDefinitionEmitterLogger, 'RefinedTypeDefinitionEmitterLogger', interfaceMeta);
|
|
102
102
|
function withLogging_1(_this__u8e3s4, logger, block) {
|
|
103
|
-
return logger.nl('Emitting Definition:
|
|
103
|
+
return logger.nl('Emitting Definition: Endpoint', block);
|
|
104
104
|
}
|
|
105
|
+
setMetadataFor(EnumDefinitionEmitterLogger, 'EnumDefinitionEmitterLogger', interfaceMeta);
|
|
105
106
|
function withLogging_2(_this__u8e3s4, logger, block) {
|
|
106
|
-
return logger.nl('Emitting Definition:
|
|
107
|
+
return logger.nl('Emitting Definition: Endpoint', block);
|
|
107
108
|
}
|
|
108
109
|
function withLogging_3(_this__u8e3s4, logger, block) {
|
|
109
|
-
return logger.nl('Emitting Definition:
|
|
110
|
+
return logger.nl('Emitting Definition: Endpoint Segment', block);
|
|
110
111
|
}
|
|
112
|
+
setMetadataFor(EndpointDefinitionEmitterLogger, 'EndpointDefinitionEmitterLogger', interfaceMeta);
|
|
111
113
|
function withLogging_4(_this__u8e3s4, logger, block) {
|
|
112
|
-
return logger.nl('Emitting Definition: Type
|
|
114
|
+
return logger.nl('Emitting Definition: Type', block);
|
|
113
115
|
}
|
|
114
116
|
function withLogging_5(_this__u8e3s4, logger, block) {
|
|
115
|
-
return logger.nl('Emitting Definition: Type Shape
|
|
117
|
+
return logger.nl('Emitting Definition: Type Shape', block);
|
|
116
118
|
}
|
|
117
|
-
setMetadataFor(TypeDefinitionEmitterLogger, 'TypeDefinitionEmitterLogger', interfaceMeta);
|
|
118
119
|
function withLogging_6(_this__u8e3s4, logger, block) {
|
|
119
|
-
return logger.nl('Emitting Definition:
|
|
120
|
+
return logger.nl('Emitting Definition: Type Shape Field', block);
|
|
120
121
|
}
|
|
121
|
-
setMetadataFor(EnumDefinitionEmitterLogger, 'EnumDefinitionEmitterLogger', interfaceMeta);
|
|
122
122
|
function withLogging_7(_this__u8e3s4, logger, block) {
|
|
123
|
-
return logger.nl('Emitting Definition:
|
|
123
|
+
return logger.nl('Emitting Definition: Type Shape Field Key', block);
|
|
124
124
|
}
|
|
125
125
|
function withLogging_8(_this__u8e3s4, logger, block) {
|
|
126
|
-
return logger.nl('Emitting Definition:
|
|
126
|
+
return logger.nl('Emitting Definition: Type Shape Field Value', block);
|
|
127
127
|
}
|
|
128
|
-
setMetadataFor(
|
|
129
|
-
setMetadataFor(Emitter, 'Emitter', classMeta, VOID, [RefinedTypeDefinitionEmitterLogger,
|
|
128
|
+
setMetadataFor(TypeDefinitionEmitterLogger, 'TypeDefinitionEmitterLogger', interfaceMeta);
|
|
129
|
+
setMetadataFor(Emitter, 'Emitter', classMeta, VOID, [RefinedTypeDefinitionEmitterLogger, EnumDefinitionEmitterLogger, EndpointDefinitionEmitterLogger, TypeDefinitionEmitterLogger]);
|
|
130
130
|
setMetadataFor(JavaEmitter, 'JavaEmitter', classMeta, Emitter);
|
|
131
131
|
setMetadataFor(Companion, 'Companion', objectMeta);
|
|
132
132
|
setMetadataFor(KotlinEmitter, 'KotlinEmitter', classMeta, Emitter);
|
|
@@ -414,7 +414,7 @@
|
|
|
414
414
|
return Wirespec_instance;
|
|
415
415
|
}
|
|
416
416
|
function import_0($this, ast) {
|
|
417
|
-
return !Companion_getInstance_2().gi(ast) ? '' : 'import community.flock.wirespec.
|
|
417
|
+
return !Companion_getInstance_2().gi(ast) ? '' : 'import community.flock.wirespec.Wirespec;\n\n';
|
|
418
418
|
}
|
|
419
419
|
function emitPrimaryType(_this__u8e3s4, $this) {
|
|
420
420
|
return $this.hi(_this__u8e3s4, $this.ai_1, JavaEmitter$emitPrimaryType$lambda(_this__u8e3s4));
|
|
@@ -1130,7 +1130,7 @@
|
|
|
1130
1130
|
Companion_getInstance_2();
|
|
1131
1131
|
Companion_getInstance_2();
|
|
1132
1132
|
Companion_getInstance_2();
|
|
1133
|
-
tmp.oi_1 = trimMargin('\n |package community.flock.wirespec
|
|
1133
|
+
tmp.oi_1 = trimMargin('\n |package community.flock.wirespec;\n |\n |import java.lang.reflect.Type;\n |import java.lang.reflect.ParameterizedType;\n |\n |public interface Wirespec {\n |' + ' ' + 'enum Method { GET, PUT, POST, DELETE, OPTIONS, HEAD, PATCH, TRACE };\n |' + ' ' + 'record Content<T> (String type, T body) {};\n |' + ' ' + 'interface Request<T> { String getPath(); Method getMethod(); java.util.Map<String, java.util.List<Object>> getQuery(); java.util.Map<String, java.util.List<Object>> getHeaders(); Content<T> getContent(); }\n |' + ' ' + 'interface Response<T> { int getStatus(); java.util.Map<String, java.util.List<Object>> getHeaders(); Content<T> getContent(); }\n |' + ' ' + 'interface ContentMapper<B> { <T> Content<T> read(Content<B> content, Type valueType); <T> Content<B> write(Content<T> content); }\n |' + ' ' + 'static Type getType(final Class<?> type, final boolean isIterable) {\n |' + ' ' + ' ' + 'if(isIterable) {\n |' + ' ' + ' ' + ' ' + 'return new ParameterizedType() {\n |' + ' ' + ' ' + ' ' + ' ' + 'public Type getRawType() {return java.util.List.class;}\n |' + ' ' + ' ' + ' ' + ' ' + 'public Type[] getActualTypeArguments() {Class<?>[] types = {type};return types;}\n |' + ' ' + ' ' + ' ' + ' ' + 'public Type getOwnerType() {return null;}\n |' + ' ' + ' ' + ' ' + '};\n |' + ' ' + ' ' + '}\n |' + ' ' + ' ' + 'else {\n |' + ' ' + ' ' + ' ' + 'return type;\n |' + ' ' + ' ' + '}\n |' + ' ' + '}\n |}\n ');
|
|
1134
1134
|
this.pi_1 = isBlank(packageName) ? '' : 'package ' + packageName + ';';
|
|
1135
1135
|
}
|
|
1136
1136
|
protoOf(JavaEmitter).ci = function (ast) {
|
|
@@ -1177,6 +1177,9 @@
|
|
|
1177
1177
|
protoOf(JavaEmitter).ok = function (_this__u8e3s4) {
|
|
1178
1178
|
return this.pk(_this__u8e3s4, this.ai_1, JavaEmitter$emit$lambda_7(_this__u8e3s4, this));
|
|
1179
1179
|
};
|
|
1180
|
+
function emitPrimaryType_0(_this__u8e3s4, $this) {
|
|
1181
|
+
return $this.hi(_this__u8e3s4, $this.ai_1, KotlinEmitter$emitPrimaryType$lambda(_this__u8e3s4));
|
|
1182
|
+
}
|
|
1180
1183
|
function emitRequestSignature_0(_this__u8e3s4, $this, content) {
|
|
1181
1184
|
// Inline function 'kotlin.collections.map' call
|
|
1182
1185
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
@@ -1219,6 +1222,8 @@
|
|
|
1219
1222
|
return '/' + joinToString(_this__u8e3s4, '/', VOID, VOID, VOID, VOID, KotlinEmitter$emitPath$lambda($this));
|
|
1220
1223
|
}
|
|
1221
1224
|
function emitRequestMapper(_this__u8e3s4, $this) {
|
|
1225
|
+
Companion_getInstance_2();
|
|
1226
|
+
Companion_getInstance_2();
|
|
1222
1227
|
Companion_getInstance_2();
|
|
1223
1228
|
Companion_getInstance_2();
|
|
1224
1229
|
Companion_getInstance_2();
|
|
@@ -1228,7 +1233,9 @@
|
|
|
1228
1233
|
Companion_getInstance_2();
|
|
1229
1234
|
Companion_getInstance_2();
|
|
1230
1235
|
Companion_getInstance_2();
|
|
1231
|
-
|
|
1236
|
+
Companion_getInstance_2();
|
|
1237
|
+
Companion_getInstance_2();
|
|
1238
|
+
return trimMargin('\n |' + ' ' + ' ' + 'fun <B> REQUEST_MAPPER(contentMapper: Wirespec.ContentMapper<B>, path:String, method: Wirespec.Method, query: Map<String, List<Any?>>, headers:Map<String, List<Any?>>, content: Wirespec.Content<B>?) =\n |' + ' ' + ' ' + ' ' + 'when {\n |' + tmp + '\n |' + ' ' + ' ' + ' ' + ' ' + 'else -> error("Cannot map request")\n |' + ' ' + ' ' + ' ' + '}\n ');
|
|
1232
1239
|
}
|
|
1233
1240
|
function emitRequestMapperCondition(_this__u8e3s4, $this) {
|
|
1234
1241
|
var tmp;
|
|
@@ -1236,7 +1243,8 @@
|
|
|
1236
1243
|
Companion_getInstance_2();
|
|
1237
1244
|
Companion_getInstance_2();
|
|
1238
1245
|
Companion_getInstance_2();
|
|
1239
|
-
|
|
1246
|
+
Companion_getInstance_2();
|
|
1247
|
+
tmp = trimMargin('\n |' + ' ' + ' ' + ' ' + ' ' + 'content == null -> RequestUnit(path, method, query, headers, null)\n ');
|
|
1240
1248
|
} else {
|
|
1241
1249
|
Companion_getInstance_2();
|
|
1242
1250
|
Companion_getInstance_2();
|
|
@@ -1245,17 +1253,23 @@
|
|
|
1245
1253
|
Companion_getInstance_2();
|
|
1246
1254
|
Companion_getInstance_2();
|
|
1247
1255
|
Companion_getInstance_2();
|
|
1256
|
+
Companion_getInstance_2();
|
|
1257
|
+
Companion_getInstance_2();
|
|
1248
1258
|
var tmp_0 = $this.qi(_this__u8e3s4.ii_1.ki_1);
|
|
1249
|
-
var tmp_1 =
|
|
1259
|
+
var tmp_1 = emitPrimaryType_0(_this__u8e3s4.ii_1.ki_1, $this);
|
|
1260
|
+
var tmp_2 = _this__u8e3s4.ii_1.ki_1.cj();
|
|
1261
|
+
Companion_getInstance_2();
|
|
1250
1262
|
Companion_getInstance_2();
|
|
1251
1263
|
Companion_getInstance_2();
|
|
1252
1264
|
Companion_getInstance_2();
|
|
1253
1265
|
Companion_getInstance_2();
|
|
1254
|
-
tmp = trimMargin('\n |' + ' ' + ' ' + ' ' + 'content?.type == "' + _this__u8e3s4.ii_1.ji_1 + '" -> contentMapper\n |' + ' ' + ' ' + ' ' + ' ' + '.read<' + tmp_0 + '>(content,
|
|
1266
|
+
tmp = trimMargin('\n |' + ' ' + ' ' + ' ' + ' ' + 'content?.type == "' + _this__u8e3s4.ii_1.ji_1 + '" -> contentMapper\n |' + ' ' + ' ' + ' ' + ' ' + ' ' + '.read<' + tmp_0 + '>(content, Wirespec.getType(' + tmp_1 + '::class.java, ' + tmp_2 + '))\n |' + ' ' + ' ' + ' ' + ' ' + ' ' + '.let{ Request' + emitContentType_0(_this__u8e3s4.ii_1) + '(path, method, query, headers, it) }\n ');
|
|
1255
1267
|
}
|
|
1256
1268
|
return tmp;
|
|
1257
1269
|
}
|
|
1258
1270
|
function emitResponseMapper_0(_this__u8e3s4, $this) {
|
|
1271
|
+
Companion_getInstance_2();
|
|
1272
|
+
Companion_getInstance_2();
|
|
1259
1273
|
Companion_getInstance_2();
|
|
1260
1274
|
Companion_getInstance_2();
|
|
1261
1275
|
Companion_getInstance_2();
|
|
@@ -1316,7 +1330,9 @@
|
|
|
1316
1330
|
Companion_getInstance_2();
|
|
1317
1331
|
Companion_getInstance_2();
|
|
1318
1332
|
Companion_getInstance_2();
|
|
1319
|
-
|
|
1333
|
+
Companion_getInstance_2();
|
|
1334
|
+
Companion_getInstance_2();
|
|
1335
|
+
return trimMargin('\n |' + ' ' + ' ' + 'fun <B> RESPONSE_MAPPER(contentMapper: Wirespec.ContentMapper<B>, status: Int, headers:Map<String, List<Any?>>, content: Wirespec.Content<B>?) =\n |' + ' ' + ' ' + ' ' + 'when {\n |' + tmp_0 + '\n |' + tmp_2 + '\n |' + ' ' + ' ' + ' ' + ' ' + 'else -> error("Cannot map response with status $status")\n |' + ' ' + ' ' + ' ' + '}\n ');
|
|
1320
1336
|
}
|
|
1321
1337
|
function emitResponseMapperCondition_0(_this__u8e3s4, $this) {
|
|
1322
1338
|
var tmp;
|
|
@@ -1324,6 +1340,7 @@
|
|
|
1324
1340
|
Companion_getInstance_2();
|
|
1325
1341
|
Companion_getInstance_2();
|
|
1326
1342
|
Companion_getInstance_2();
|
|
1343
|
+
Companion_getInstance_2();
|
|
1327
1344
|
// Inline function 'kotlin.takeIf' call
|
|
1328
1345
|
var tmp0_takeIf = _this__u8e3s4.zi_1;
|
|
1329
1346
|
// Inline function 'kotlin.contracts.contract' call
|
|
@@ -1364,11 +1381,12 @@
|
|
|
1364
1381
|
// Inline function 'community.flock.wirespec.compiler.core.emit.KotlinEmitter.emitResponseMapperCondition.<anonymous>' call
|
|
1365
1382
|
tmp_5 = 'status, ';
|
|
1366
1383
|
}
|
|
1367
|
-
tmp = trimMargin('\n |' + ' ' + ' ' + ' ' + tmp_2 + 'content == null -> Response' + tmp_3 + 'Unit(' + orEmptyString_0(tmp_5) + 'headers)\n ');
|
|
1384
|
+
tmp = trimMargin('\n |' + ' ' + ' ' + ' ' + ' ' + tmp_2 + 'content == null -> Response' + tmp_3 + 'Unit(' + orEmptyString_0(tmp_5) + 'headers)\n ');
|
|
1368
1385
|
} else {
|
|
1369
1386
|
Companion_getInstance_2();
|
|
1370
1387
|
Companion_getInstance_2();
|
|
1371
1388
|
Companion_getInstance_2();
|
|
1389
|
+
Companion_getInstance_2();
|
|
1372
1390
|
// Inline function 'kotlin.takeIf' call
|
|
1373
1391
|
var tmp2_takeIf = _this__u8e3s4.zi_1;
|
|
1374
1392
|
// Inline function 'kotlin.contracts.contract' call
|
|
@@ -1393,34 +1411,37 @@
|
|
|
1393
1411
|
Companion_getInstance_2();
|
|
1394
1412
|
Companion_getInstance_2();
|
|
1395
1413
|
Companion_getInstance_2();
|
|
1414
|
+
Companion_getInstance_2();
|
|
1396
1415
|
var tmp_9 = $this.qi(_this__u8e3s4.aj_1.ki_1);
|
|
1397
|
-
var tmp_10 =
|
|
1416
|
+
var tmp_10 = emitPrimaryType_0(_this__u8e3s4.aj_1.ki_1, $this);
|
|
1417
|
+
var tmp_11 = _this__u8e3s4.aj_1.ki_1.cj();
|
|
1398
1418
|
Companion_getInstance_2();
|
|
1399
1419
|
Companion_getInstance_2();
|
|
1400
1420
|
Companion_getInstance_2();
|
|
1401
1421
|
Companion_getInstance_2();
|
|
1402
|
-
|
|
1403
|
-
var tmp_12 =
|
|
1422
|
+
Companion_getInstance_2();
|
|
1423
|
+
var tmp_12 = Companion_getInstance_2().bj(_this__u8e3s4.zi_1);
|
|
1424
|
+
var tmp_13 = emitContentType_0(_this__u8e3s4.aj_1);
|
|
1404
1425
|
// Inline function 'kotlin.takeIf' call
|
|
1405
1426
|
var tmp3_takeIf = _this__u8e3s4.zi_1;
|
|
1406
1427
|
// Inline function 'kotlin.contracts.contract' call
|
|
1407
|
-
var
|
|
1428
|
+
var tmp_14;
|
|
1408
1429
|
// Inline function 'community.flock.wirespec.compiler.core.emit.KotlinEmitter.emitResponseMapperCondition.<anonymous>' call
|
|
1409
1430
|
if (!Companion_getInstance_2().vk(tmp3_takeIf)) {
|
|
1410
|
-
|
|
1431
|
+
tmp_14 = tmp3_takeIf;
|
|
1411
1432
|
} else {
|
|
1412
|
-
tmp_13 = null;
|
|
1413
|
-
}
|
|
1414
|
-
var tmp_14;
|
|
1415
|
-
if (tmp_13 == null) {
|
|
1416
1433
|
tmp_14 = null;
|
|
1434
|
+
}
|
|
1435
|
+
var tmp_15;
|
|
1436
|
+
if (tmp_14 == null) {
|
|
1437
|
+
tmp_15 = null;
|
|
1417
1438
|
} else {
|
|
1418
1439
|
// Inline function 'kotlin.let' call
|
|
1419
1440
|
// Inline function 'kotlin.contracts.contract' call
|
|
1420
1441
|
// Inline function 'community.flock.wirespec.compiler.core.emit.KotlinEmitter.emitResponseMapperCondition.<anonymous>' call
|
|
1421
|
-
|
|
1442
|
+
tmp_15 = 'status, ';
|
|
1422
1443
|
}
|
|
1423
|
-
tmp = trimMargin('\n |' + ' ' + ' ' + ' ' + tmp_8 + 'content?.type == "' + _this__u8e3s4.aj_1.ji_1 + '" -> contentMapper\n |' + ' ' + ' ' + ' ' + ' ' + '.read<' + tmp_9 + '>(content,
|
|
1444
|
+
tmp = trimMargin('\n |' + ' ' + ' ' + ' ' + ' ' + tmp_8 + 'content?.type == "' + _this__u8e3s4.aj_1.ji_1 + '" -> contentMapper\n |' + ' ' + ' ' + ' ' + ' ' + ' ' + '.read<' + tmp_9 + '>(content, Wirespec.getType(' + tmp_10 + '::class.java, ' + tmp_11 + '))\n |' + ' ' + ' ' + ' ' + ' ' + ' ' + '.let{ Response' + tmp_12 + tmp_13 + '(' + orEmptyString_0(tmp_15) + 'headers, it.body) }\n ');
|
|
1424
1445
|
}
|
|
1425
1446
|
return tmp;
|
|
1426
1447
|
}
|
|
@@ -1480,22 +1501,18 @@
|
|
|
1480
1501
|
return this$0.yk(this$0.xk(joinToString(tmp$ret$2, '')));
|
|
1481
1502
|
};
|
|
1482
1503
|
}
|
|
1483
|
-
function KotlinEmitter$
|
|
1504
|
+
function KotlinEmitter$emitPrimaryType$lambda($this_emitPrimaryType) {
|
|
1484
1505
|
return function () {
|
|
1485
|
-
var
|
|
1486
|
-
// Inline function 'kotlin.let' call
|
|
1487
|
-
var tmp$ret$1;
|
|
1488
|
-
// Inline function 'kotlin.let' call
|
|
1489
|
-
var tmp0_subject = $this_emit;
|
|
1506
|
+
var tmp0_subject = $this_emitPrimaryType;
|
|
1490
1507
|
var tmp;
|
|
1491
1508
|
if (tmp0_subject instanceof Any) {
|
|
1492
1509
|
tmp = 'Any';
|
|
1493
1510
|
} else {
|
|
1494
1511
|
if (tmp0_subject instanceof Custom) {
|
|
1495
|
-
tmp = $
|
|
1512
|
+
tmp = $this_emitPrimaryType.tj_1;
|
|
1496
1513
|
} else {
|
|
1497
1514
|
if (tmp0_subject instanceof Primitive) {
|
|
1498
|
-
var tmp1_subject = $
|
|
1515
|
+
var tmp1_subject = $this_emitPrimaryType.qj_1;
|
|
1499
1516
|
var tmp0 = tmp1_subject.r4_1;
|
|
1500
1517
|
var tmp_0;
|
|
1501
1518
|
switch (tmp0) {
|
|
@@ -1518,7 +1535,16 @@
|
|
|
1518
1535
|
}
|
|
1519
1536
|
}
|
|
1520
1537
|
}
|
|
1521
|
-
|
|
1538
|
+
return tmp;
|
|
1539
|
+
};
|
|
1540
|
+
}
|
|
1541
|
+
function KotlinEmitter$emit$lambda_3(this$0, $this_emit) {
|
|
1542
|
+
return function () {
|
|
1543
|
+
var tmp$ret$3;
|
|
1544
|
+
// Inline function 'kotlin.let' call
|
|
1545
|
+
var tmp$ret$1;
|
|
1546
|
+
// Inline function 'kotlin.let' call
|
|
1547
|
+
var tmp0_let = emitPrimaryType_0($this_emit, this$0);
|
|
1522
1548
|
// Inline function 'kotlin.contracts.contract' call
|
|
1523
1549
|
var tmp$ret$0;
|
|
1524
1550
|
// Inline function 'community.flock.wirespec.compiler.core.emit.KotlinEmitter.emit.<anonymous>.<anonymous>' call
|
|
@@ -1837,19 +1863,16 @@
|
|
|
1837
1863
|
tmp$ret$18 = list_0;
|
|
1838
1864
|
var tmp_6 = tmp$ret$18;
|
|
1839
1865
|
var tmp_7 = joinToString(tmp_6, '\n', VOID, VOID, VOID, VOID, KotlinEmitter$emit$lambda$lambda_5(this$0));
|
|
1866
|
+
Companion_getInstance_2();
|
|
1840
1867
|
var tmp_8 = Companion_getInstance_2().ck($this_emit.ri_1);
|
|
1841
1868
|
Companion_getInstance_2();
|
|
1842
1869
|
Companion_getInstance_2();
|
|
1843
1870
|
Companion_getInstance_2();
|
|
1844
1871
|
var tmp_9 = emitSegment_0($this_emit.ti_1, this$0);
|
|
1845
|
-
Companion_getInstance_2();
|
|
1846
|
-
Companion_getInstance_2();
|
|
1847
1872
|
var tmp_10 = emitRequestMapper($this_emit.xi_1, this$0);
|
|
1848
|
-
Companion_getInstance_2();
|
|
1849
|
-
Companion_getInstance_2();
|
|
1850
1873
|
var tmp_11 = emitResponseMapper_0($this_emit.yi_1, this$0);
|
|
1851
1874
|
Companion_getInstance_2();
|
|
1852
|
-
return trimMargin('interface ' + $this_emit.ri_1 + ' {\n |' + ' ' + 'sealed interface Request<T>: Wirespec.Request<T>\n |' + tmp + '\n |' + ' ' + 'sealed interface Response<T>: Wirespec.Response<T>\n |' + tmp_1 + '\n |' + tmp_3 + '\n |' + tmp_5 + '\n |' + tmp_7 + '\n |suspend fun ' + tmp_8 + '(request: Request<*>): Response<*>\n |' + ' ' + 'companion object{\n |' + ' ' + ' ' + 'const val PATH = "' + tmp_9 + '"\n |' +
|
|
1875
|
+
return trimMargin('interface ' + $this_emit.ri_1 + ' {\n |' + ' ' + 'sealed interface Request<T>: Wirespec.Request<T>\n |' + tmp + '\n |' + ' ' + 'sealed interface Response<T>: Wirespec.Response<T>\n |' + tmp_1 + '\n |' + tmp_3 + '\n |' + tmp_5 + '\n |' + tmp_7 + '\n |' + ' ' + 'suspend fun ' + tmp_8 + '(request: Request<*>): Response<*>\n |' + ' ' + 'companion object{\n |' + ' ' + ' ' + 'const val PATH = "' + tmp_9 + '"\n |' + tmp_10 + '\n |' + tmp_11 + '\n |' + ' ' + '}\n |}\n |');
|
|
1853
1876
|
};
|
|
1854
1877
|
}
|
|
1855
1878
|
function KotlinEmitter$emitRequestSignature$lambda(this$0) {
|
|
@@ -1923,8 +1946,50 @@
|
|
|
1923
1946
|
Companion_getInstance_2();
|
|
1924
1947
|
Companion_getInstance_2();
|
|
1925
1948
|
Companion_getInstance_2();
|
|
1926
|
-
|
|
1927
|
-
|
|
1949
|
+
Companion_getInstance_2();
|
|
1950
|
+
Companion_getInstance_2();
|
|
1951
|
+
Companion_getInstance_2();
|
|
1952
|
+
Companion_getInstance_2();
|
|
1953
|
+
Companion_getInstance_2();
|
|
1954
|
+
Companion_getInstance_2();
|
|
1955
|
+
Companion_getInstance_2();
|
|
1956
|
+
Companion_getInstance_2();
|
|
1957
|
+
Companion_getInstance_2();
|
|
1958
|
+
Companion_getInstance_2();
|
|
1959
|
+
Companion_getInstance_2();
|
|
1960
|
+
Companion_getInstance_2();
|
|
1961
|
+
Companion_getInstance_2();
|
|
1962
|
+
Companion_getInstance_2();
|
|
1963
|
+
Companion_getInstance_2();
|
|
1964
|
+
Companion_getInstance_2();
|
|
1965
|
+
Companion_getInstance_2();
|
|
1966
|
+
Companion_getInstance_2();
|
|
1967
|
+
Companion_getInstance_2();
|
|
1968
|
+
Companion_getInstance_2();
|
|
1969
|
+
Companion_getInstance_2();
|
|
1970
|
+
Companion_getInstance_2();
|
|
1971
|
+
Companion_getInstance_2();
|
|
1972
|
+
Companion_getInstance_2();
|
|
1973
|
+
Companion_getInstance_2();
|
|
1974
|
+
Companion_getInstance_2();
|
|
1975
|
+
Companion_getInstance_2();
|
|
1976
|
+
Companion_getInstance_2();
|
|
1977
|
+
Companion_getInstance_2();
|
|
1978
|
+
Companion_getInstance_2();
|
|
1979
|
+
Companion_getInstance_2();
|
|
1980
|
+
Companion_getInstance_2();
|
|
1981
|
+
Companion_getInstance_2();
|
|
1982
|
+
Companion_getInstance_2();
|
|
1983
|
+
Companion_getInstance_2();
|
|
1984
|
+
Companion_getInstance_2();
|
|
1985
|
+
Companion_getInstance_2();
|
|
1986
|
+
Companion_getInstance_2();
|
|
1987
|
+
Companion_getInstance_2();
|
|
1988
|
+
Companion_getInstance_2();
|
|
1989
|
+
Companion_getInstance_2();
|
|
1990
|
+
Companion_getInstance_2();
|
|
1991
|
+
tmp.tk_1 = trimMargin('\n |package community.flock.wirespec\n |\n |import java.lang.reflect.Type\n |import java.lang.reflect.ParameterizedType\n |\n |interface Wirespec {\n |' + ' ' + 'enum class Method { GET, PUT, POST, DELETE, OPTIONS, HEAD, PATCH, TRACE }\n |' + ' ' + '@JvmRecord data class Content<T> (val type:String, val body:T )\n |' + ' ' + 'interface Request<T> { val path:String; val method: Method; val query: Map<String, List<Any?>>; val headers: Map<String, List<Any?>>; val content:Content<T>? }\n |' + ' ' + 'interface Response<T> { val status:Int; val headers: Map<String, List<Any?>>; val content:Content<T>? }\n |' + ' ' + 'interface ContentMapper<B> { fun <T> read(content: Content<B>, valueType: Type): Content<T> fun <T> write(content: Content<T>): Content<B> }\n |' + ' ' + 'companion object {\n |' + ' ' + ' ' + '@JvmStatic fun getType(type: Class<*>, isIterable: Boolean): Type {\n |' + ' ' + ' ' + ' ' + 'return if (isIterable) {\n |' + ' ' + ' ' + ' ' + ' ' + 'object : ParameterizedType {\n |' + ' ' + ' ' + ' ' + ' ' + ' ' + 'override fun getRawType() = MutableList::class.java\n |' + ' ' + ' ' + ' ' + ' ' + ' ' + 'override fun getActualTypeArguments() = arrayOf(type)\n |' + ' ' + ' ' + ' ' + ' ' + ' ' + 'override fun getOwnerType() = null\n |' + ' ' + ' ' + ' ' + ' ' + '}\n |' + ' ' + ' ' + ' ' + '} else {\n |' + ' ' + ' ' + ' ' + ' ' + 'type\n |' + ' ' + ' ' + ' ' + '}\n |' + ' ' + ' ' + '}\n |' + ' ' + '}\n |}\n ');
|
|
1992
|
+
this.uk_1 = '\nimport community.flock.wirespec.Wirespec\n';
|
|
1928
1993
|
}
|
|
1929
1994
|
protoOf(KotlinEmitter).ci = function (ast) {
|
|
1930
1995
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -1960,7 +2025,7 @@
|
|
|
1960
2025
|
return this.ik(_this__u8e3s4, this.ai_1, KotlinEmitter$emit$lambda_2(this, _this__u8e3s4));
|
|
1961
2026
|
};
|
|
1962
2027
|
protoOf(KotlinEmitter).qi = function (_this__u8e3s4) {
|
|
1963
|
-
return this.hi(_this__u8e3s4, this.ai_1, KotlinEmitter$emit$lambda_3(_this__u8e3s4));
|
|
2028
|
+
return this.hi(_this__u8e3s4, this.ai_1, KotlinEmitter$emit$lambda_3(this, _this__u8e3s4));
|
|
1964
2029
|
};
|
|
1965
2030
|
protoOf(KotlinEmitter).jk = function (_this__u8e3s4) {
|
|
1966
2031
|
return this.kk(_this__u8e3s4, this.ai_1, KotlinEmitter$emit$lambda_4(_this__u8e3s4, this));
|
|
@@ -5860,54 +5925,54 @@
|
|
|
5860
5925
|
}
|
|
5861
5926
|
}
|
|
5862
5927
|
//region block: post-declaration
|
|
5863
|
-
protoOf(JavaEmitter).fk =
|
|
5864
|
-
protoOf(JavaEmitter).gk =
|
|
5865
|
-
protoOf(JavaEmitter).hk =
|
|
5866
|
-
protoOf(JavaEmitter).ik =
|
|
5867
|
-
protoOf(JavaEmitter).hi =
|
|
5868
|
-
protoOf(JavaEmitter).kk =
|
|
5928
|
+
protoOf(JavaEmitter).fk = withLogging_4;
|
|
5929
|
+
protoOf(JavaEmitter).gk = withLogging_5;
|
|
5930
|
+
protoOf(JavaEmitter).hk = withLogging_6;
|
|
5931
|
+
protoOf(JavaEmitter).ik = withLogging_7;
|
|
5932
|
+
protoOf(JavaEmitter).hi = withLogging_8;
|
|
5933
|
+
protoOf(JavaEmitter).kk = withLogging_1;
|
|
5869
5934
|
protoOf(JavaEmitter).mk = withLogging;
|
|
5870
5935
|
protoOf(JavaEmitter).nk = withLogging_0;
|
|
5871
|
-
protoOf(JavaEmitter).pk =
|
|
5872
|
-
protoOf(JavaEmitter).dj =
|
|
5873
|
-
protoOf(KotlinEmitter).fk =
|
|
5874
|
-
protoOf(KotlinEmitter).gk =
|
|
5875
|
-
protoOf(KotlinEmitter).hk =
|
|
5876
|
-
protoOf(KotlinEmitter).ik =
|
|
5877
|
-
protoOf(KotlinEmitter).hi =
|
|
5878
|
-
protoOf(KotlinEmitter).kk =
|
|
5936
|
+
protoOf(JavaEmitter).pk = withLogging_2;
|
|
5937
|
+
protoOf(JavaEmitter).dj = withLogging_3;
|
|
5938
|
+
protoOf(KotlinEmitter).fk = withLogging_4;
|
|
5939
|
+
protoOf(KotlinEmitter).gk = withLogging_5;
|
|
5940
|
+
protoOf(KotlinEmitter).hk = withLogging_6;
|
|
5941
|
+
protoOf(KotlinEmitter).ik = withLogging_7;
|
|
5942
|
+
protoOf(KotlinEmitter).hi = withLogging_8;
|
|
5943
|
+
protoOf(KotlinEmitter).kk = withLogging_1;
|
|
5879
5944
|
protoOf(KotlinEmitter).mk = withLogging;
|
|
5880
5945
|
protoOf(KotlinEmitter).nk = withLogging_0;
|
|
5881
|
-
protoOf(KotlinEmitter).pk =
|
|
5882
|
-
protoOf(KotlinEmitter).dj =
|
|
5883
|
-
protoOf(ScalaEmitter).fk =
|
|
5884
|
-
protoOf(ScalaEmitter).gk =
|
|
5885
|
-
protoOf(ScalaEmitter).hk =
|
|
5886
|
-
protoOf(ScalaEmitter).ik =
|
|
5887
|
-
protoOf(ScalaEmitter).hi =
|
|
5888
|
-
protoOf(ScalaEmitter).kk =
|
|
5946
|
+
protoOf(KotlinEmitter).pk = withLogging_2;
|
|
5947
|
+
protoOf(KotlinEmitter).dj = withLogging_3;
|
|
5948
|
+
protoOf(ScalaEmitter).fk = withLogging_4;
|
|
5949
|
+
protoOf(ScalaEmitter).gk = withLogging_5;
|
|
5950
|
+
protoOf(ScalaEmitter).hk = withLogging_6;
|
|
5951
|
+
protoOf(ScalaEmitter).ik = withLogging_7;
|
|
5952
|
+
protoOf(ScalaEmitter).hi = withLogging_8;
|
|
5953
|
+
protoOf(ScalaEmitter).kk = withLogging_1;
|
|
5889
5954
|
protoOf(ScalaEmitter).mk = withLogging;
|
|
5890
5955
|
protoOf(ScalaEmitter).nk = withLogging_0;
|
|
5891
|
-
protoOf(ScalaEmitter).pk =
|
|
5892
|
-
protoOf(TypeScriptEmitter).fk =
|
|
5893
|
-
protoOf(TypeScriptEmitter).gk =
|
|
5894
|
-
protoOf(TypeScriptEmitter).hk =
|
|
5895
|
-
protoOf(TypeScriptEmitter).ik =
|
|
5896
|
-
protoOf(TypeScriptEmitter).hi =
|
|
5897
|
-
protoOf(TypeScriptEmitter).kk =
|
|
5956
|
+
protoOf(ScalaEmitter).pk = withLogging_2;
|
|
5957
|
+
protoOf(TypeScriptEmitter).fk = withLogging_4;
|
|
5958
|
+
protoOf(TypeScriptEmitter).gk = withLogging_5;
|
|
5959
|
+
protoOf(TypeScriptEmitter).hk = withLogging_6;
|
|
5960
|
+
protoOf(TypeScriptEmitter).ik = withLogging_7;
|
|
5961
|
+
protoOf(TypeScriptEmitter).hi = withLogging_8;
|
|
5962
|
+
protoOf(TypeScriptEmitter).kk = withLogging_1;
|
|
5898
5963
|
protoOf(TypeScriptEmitter).mk = withLogging;
|
|
5899
5964
|
protoOf(TypeScriptEmitter).nk = withLogging_0;
|
|
5900
|
-
protoOf(TypeScriptEmitter).pk =
|
|
5901
|
-
protoOf(TypeScriptEmitter).dj =
|
|
5902
|
-
protoOf(WirespecEmitter).fk =
|
|
5903
|
-
protoOf(WirespecEmitter).gk =
|
|
5904
|
-
protoOf(WirespecEmitter).hk =
|
|
5905
|
-
protoOf(WirespecEmitter).ik =
|
|
5906
|
-
protoOf(WirespecEmitter).hi =
|
|
5907
|
-
protoOf(WirespecEmitter).kk =
|
|
5965
|
+
protoOf(TypeScriptEmitter).pk = withLogging_2;
|
|
5966
|
+
protoOf(TypeScriptEmitter).dj = withLogging_3;
|
|
5967
|
+
protoOf(WirespecEmitter).fk = withLogging_4;
|
|
5968
|
+
protoOf(WirespecEmitter).gk = withLogging_5;
|
|
5969
|
+
protoOf(WirespecEmitter).hk = withLogging_6;
|
|
5970
|
+
protoOf(WirespecEmitter).ik = withLogging_7;
|
|
5971
|
+
protoOf(WirespecEmitter).hi = withLogging_8;
|
|
5972
|
+
protoOf(WirespecEmitter).kk = withLogging_1;
|
|
5908
5973
|
protoOf(WirespecEmitter).mk = withLogging;
|
|
5909
5974
|
protoOf(WirespecEmitter).nk = withLogging_0;
|
|
5910
|
-
protoOf(WirespecEmitter).pk =
|
|
5975
|
+
protoOf(WirespecEmitter).pk = withLogging_2;
|
|
5911
5976
|
protoOf(WsTypeDef).rl = name;
|
|
5912
5977
|
protoOf(WsEnumTypeDef).rl = name;
|
|
5913
5978
|
protoOf(WsRefinedTypeDef).rl = name;
|