@flock/wirespec 0.21.1 → 0.22.0
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 +13 -13
- package/arrow-arrow-atomic.mjs.map +1 -1
- package/arrow-arrow-core.mjs +166 -167
- package/arrow-arrow-core.mjs.map +1 -1
- package/clikt-clikt-mordant.mjs +88 -88
- package/clikt-clikt-mordant.mjs.map +1 -1
- package/clikt-clikt.mjs +1545 -1547
- package/clikt-clikt.mjs.map +1 -1
- package/colormath-root-colormath.mjs +463 -463
- package/colormath-root-colormath.mjs.map +1 -1
- package/kotlin-kotlin-stdlib.mjs +1199 -1318
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +10323 -10296
- package/kotlin-openapi-bindings.mjs.map +1 -1
- package/kotlin-rgxgen.mjs +1811 -1815
- package/kotlin-rgxgen.mjs.map +1 -1
- package/kotlinx-io-kotlinx-io-core.mjs +454 -454
- package/kotlinx-io-kotlinx-io-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +1985 -1993
- package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1768 -1737
- package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/mordant-mordant.mjs +1357 -1360
- package/mordant-mordant.mjs.map +1 -1
- package/package.json +1 -1
- package/wirespec-src-compiler-core.mjs +26678 -4523
- package/wirespec-src-compiler-core.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-java.mjs +373 -469
- package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-kotlin.mjs +322 -377
- package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-python.mjs +345 -344
- package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-rust.mjs +738 -736
- package/wirespec-src-compiler-emitters-rust.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-scala.mjs +357 -357
- package/wirespec-src-compiler-emitters-scala.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-typescript.mjs +472 -459
- package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-wirespec.mjs +214 -131
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +403 -336
- package/wirespec-src-compiler-lib.mjs.map +1 -1
- package/wirespec-src-converter-avro.mjs +713 -708
- package/wirespec-src-converter-avro.mjs.map +1 -1
- package/wirespec-src-converter-common.mjs +267 -0
- package/wirespec-src-converter-common.mjs.map +1 -1
- package/wirespec-src-converter-openapi.mjs +1156 -1086
- package/wirespec-src-converter-openapi.mjs.map +1 -1
- package/wirespec-src-ide-lsp.mjs +1720 -1634
- package/wirespec-src-ide-lsp.mjs.map +1 -1
- package/wirespec-src-plugin-arguments.mjs +274 -233
- package/wirespec-src-plugin-arguments.mjs.map +1 -1
- package/wirespec-src-plugin-cli.mjs +153 -128
- package/wirespec-src-plugin-cli.mjs.map +1 -1
- package/wirespec-src-plugin-npm.d.mts +23 -10
- package/wirespec-src-plugin-npm.mjs +79 -81
- package/wirespec-src-plugin-npm.mjs.map +1 -1
- package/wirespec-src-tools-generator.mjs +59 -51
- package/wirespec-src-tools-generator.mjs.map +1 -1
- package/wirespec-src-compiler-ir.mjs +0 -18912
- package/wirespec-src-compiler-ir.mjs.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
split2bvyvnrlcifjv as split,
|
|
3
3
|
collectionSizeOrDefault36dulx8yinfqm as collectionSizeOrDefault,
|
|
4
|
-
ArrayList_init_$Create$
|
|
4
|
+
ArrayList_init_$Create$2byt5m5yn22yy as ArrayList_init_$Create$,
|
|
5
5
|
checkIndexOverflow3frtmheghr0th as checkIndexOverflow,
|
|
6
|
-
|
|
6
|
+
Unit_instancev9v8hjid95df as Unit_instance,
|
|
7
7
|
joinToString1cxrrlmo0chqs as joinToString,
|
|
8
|
-
StringBuilder_init_$Create$
|
|
8
|
+
StringBuilder_init_$Create$3ds9zx2kx9u4d as StringBuilder_init_$Create$,
|
|
9
9
|
charSequenceLength3278n89t01tmv as charSequenceLength,
|
|
10
10
|
charSequenceGet1vxk1y5n17t1z as charSequenceGet,
|
|
11
11
|
isLetterOrDigit2kuxd9e198haf as isLetterOrDigit,
|
|
12
|
-
|
|
12
|
+
_Char___init__impl__6a9atx2gndcvjvc5pke as _Char___init__impl__6a9atx,
|
|
13
13
|
firstOrNulltrxqttxfxqju as firstOrNull,
|
|
14
14
|
isDigit3mimrri4wkzop as isDigit,
|
|
15
15
|
Char19o2r8palgjof as Char,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
listOfvhqybd2zx248 as listOf,
|
|
19
19
|
emptyList1g2z5xcrvp2zy as emptyList,
|
|
20
20
|
VOID3gxj6tk5isa35 as VOID,
|
|
21
|
-
ArrayList_init_$Create$
|
|
21
|
+
ArrayList_init_$Create$37gc04va6yfo2 as ArrayList_init_$Create$_0,
|
|
22
22
|
Paire9pteg33gng7 as Pair,
|
|
23
23
|
plus310ted5e4i90h as plus,
|
|
24
24
|
THROW_CCE2g6jy02ryeudk as THROW_CCE,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
distinct17vua5ffe1cfv as distinct,
|
|
34
34
|
toListx6x8nvfmvvht as toList,
|
|
35
35
|
addAll1k27qatfgp3k5 as addAll,
|
|
36
|
-
HashSet_init_$Create$
|
|
36
|
+
HashSet_init_$Create$2w31ptb4ree5i as HashSet_init_$Create$,
|
|
37
37
|
Collection1k04j3hzsbod0 as Collection,
|
|
38
38
|
initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
|
|
39
39
|
equals2au1ep9vhcato as equals,
|
|
@@ -44,102 +44,101 @@ import {
|
|
|
44
44
|
mapOf2zpbbmyqk8xpf as mapOf,
|
|
45
45
|
} from './kotlin-kotlin-stdlib.mjs';
|
|
46
46
|
import {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
Companion_instance27ueeez2qu1l as Companion_instance,
|
|
48
|
+
JavaGenerator_getInstance1vn8n4kivtqjx as JavaGenerator_getInstance,
|
|
49
|
+
Name1ijtblv1phm3y as Name,
|
|
50
|
+
FunctionCall1a3g4e6bcljl6 as FunctionCall,
|
|
51
|
+
transformChildren34heehtlmzzif as transformChildren,
|
|
52
|
+
Companion_getInstance34fvro4h6bumb as Companion_getInstance,
|
|
53
|
+
Package1a6hdgk3p4frd as Package,
|
|
54
|
+
File12q75sqvz964e as File,
|
|
55
|
+
transformChildren14suh59vxsgt as transformChildren_0,
|
|
56
|
+
Main3fexakddcxfff as Main,
|
|
57
|
+
Enumoqsp4e7al89r as Enum,
|
|
58
|
+
Interface2g99rmjjt5ne as Interface,
|
|
59
|
+
Namespacex2gpe17ntoag as Namespace,
|
|
60
|
+
Structakfq94wrq695 as Struct,
|
|
61
|
+
import3bym2b49e642p as import_0,
|
|
62
|
+
function3tnfxyozkc8k as function_0,
|
|
63
|
+
String_instance2j5u8j0qc6lge as String_instance,
|
|
64
|
+
VariableReferencesji1q1tq3ygo as VariableReference,
|
|
65
|
+
Companion_instance21vwhhqsaytqt as Companion_instance_0,
|
|
66
|
+
Companion_instance2oq66qbk0c5g8 as Companion_instance_1,
|
|
67
|
+
FileExtension_Java_getInstance27piumj2wqd2g as FileExtension_Java_getInstance,
|
|
68
|
+
SanitizationConfigunh0ok3qg1q3 as SanitizationConfig,
|
|
69
|
+
convertClientServerdyft3utnhf92 as convertClientServer,
|
|
70
|
+
toGetterAccessors2qmrl32whhxsd as toGetterAccessors,
|
|
71
|
+
raw1mm1rmqheq474 as raw,
|
|
72
|
+
convert37y165c07dvpq as convert,
|
|
73
|
+
TransformScope3fhztkr2eyk36 as TransformScope,
|
|
74
|
+
TransformerBuilder26pbjl5nmg6wa as TransformerBuilder,
|
|
75
|
+
transformhd96z3w1u5uc as transform,
|
|
76
|
+
Element3p1xrn21d2w4b as Element,
|
|
77
|
+
emit1w04jgbmswnni as emit,
|
|
78
|
+
prependImportslco5lco5if44 as prependImports,
|
|
79
|
+
placeInPackage3aq544c1svvop as placeInPackage,
|
|
80
|
+
convertToGenerator115obo0n49kco as convertToGenerator,
|
|
51
81
|
Unionccsavx6nrdr2 as Union,
|
|
82
|
+
convertToGenerator1x32vg5qdleq8 as convertToGenerator_0,
|
|
52
83
|
Refined1lkzc0dg6wey7 as Refined,
|
|
53
|
-
|
|
84
|
+
convertToGenerator33dm40iimoy3x as convertToGenerator_1,
|
|
85
|
+
Enum3l2iuc342kle6 as Enum_0,
|
|
86
|
+
convertToGenerator1arvbkvdv4bro as convertToGenerator_2,
|
|
54
87
|
Type12n1gx16iqtcu as Type,
|
|
88
|
+
sanitizeNames1v55mz1p84psg as sanitizeNames,
|
|
89
|
+
collectCustomTypeNames2atsrip288ol4 as collectCustomTypeNames,
|
|
90
|
+
placeInPackagea1jcxre6uf77 as placeInPackage_0,
|
|
91
|
+
convertWithValidation24mbxf4x2u6w4 as convertWithValidation,
|
|
92
|
+
convert1ke01d6gmcvu7 as convert_0,
|
|
93
|
+
injectEnumLabelField21kogrwccvlea as injectEnumLabelField,
|
|
94
|
+
convert29zpebhuxz599 as convert_1,
|
|
95
|
+
convert39lmqftdnlhsy as convert_2,
|
|
96
|
+
convert333pgxr2q05n as convert_3,
|
|
97
|
+
convert86y6uioox2cl as convert_4,
|
|
98
|
+
convert1o5h4ulxoqycg as convert_5,
|
|
99
|
+
emitEndpointClient2og25opoka4ql as emitEndpointClient,
|
|
55
100
|
plus14o24vdaiongg as plus_1,
|
|
56
101
|
importReferencesy4xv7r53sjjs as importReferences,
|
|
102
|
+
emitClient1ucatfg1ovgb6 as emitClient,
|
|
103
|
+
get_extensions1p1y8uybwv35q as get_extensions,
|
|
104
|
+
emit2s9bv7yrx5jcs as emit_0,
|
|
105
|
+
emit3e40nagyc4qho as emit_1,
|
|
106
|
+
beforeGenerate2eu511tof5fa4 as beforeGenerate,
|
|
107
|
+
get_supportsDefaults2j8lo8mbv0egf as get_supportsDefaults,
|
|
108
|
+
IrEmitter2jy94gp21kviv as IrEmitter,
|
|
109
|
+
Dict27tp4weviyg4b as Dict,
|
|
110
|
+
Array2vay9bq78aua1 as Array_0,
|
|
111
|
+
Nullable3he31tqc4yy1q as Nullable,
|
|
112
|
+
Custom1ct1lu66hij6o as Custom,
|
|
113
|
+
Unit_instance25jwel3twibm6 as Unit_instance_0,
|
|
114
|
+
Any_instance2d4twy8sq7tlx as Any_instance,
|
|
115
|
+
Bytes_instance1wj5048pbkky0 as Bytes_instance,
|
|
116
|
+
Boolean_instance2uah59h3vb1ch as Boolean_instance,
|
|
117
|
+
Number2bo3d41wdfzde as Number_0,
|
|
118
|
+
Integer3hago8kqppnkb as Integer,
|
|
119
|
+
struct1gzvysjt73bn4 as struct,
|
|
120
|
+
RawExpressionfqemfbo6j6cq as RawExpression,
|
|
121
|
+
TypeDescriptor2a3i4v81u9c6y as TypeDescriptor,
|
|
122
|
+
convert32i7359nc4b5g as convert_6,
|
|
123
|
+
Custom_init_$Create$kfegfgqdjj1p as Custom_init_$Create$,
|
|
124
|
+
Function1wme41sk2huri as Function,
|
|
125
|
+
RawElement3huqlgf21e29z as RawElement,
|
|
126
|
+
Assignment1el26yjkp72c6 as Assignment,
|
|
127
|
+
ReturnStatement2onvxq5s96j3a as ReturnStatement,
|
|
57
128
|
Paramvfwnys2w6aj1 as Param,
|
|
58
129
|
Literal331hu9r04vptz as Literal,
|
|
130
|
+
Wildcard_instance1x48vpete4k7w as Wildcard_instance,
|
|
131
|
+
transformChildrenfid5m1x7z1ur as transformChildren_1,
|
|
59
132
|
} from './wirespec-src-compiler-core.mjs';
|
|
60
|
-
import {
|
|
61
|
-
JavaGenerator_getInstancepty760x3tbfi as JavaGenerator_getInstance,
|
|
62
|
-
Nameoqr8dt2fim9d as Name,
|
|
63
|
-
FunctionCall30872kpnbr7op as FunctionCall,
|
|
64
|
-
transformChildren2mszeagj5nq4c as transformChildren,
|
|
65
|
-
Companion_getInstance3gvtuyxc9uhxj as Companion_getInstance,
|
|
66
|
-
Package2tniq694j1763 as Package,
|
|
67
|
-
File3dimy4iqmuock as File,
|
|
68
|
-
transformChildrend9p91tpcqdkx as transformChildren_0,
|
|
69
|
-
Mainb4yvz4x0nrxd as Main,
|
|
70
|
-
Enumlszg09mwd24f as Enum_0,
|
|
71
|
-
Interface3pn84xq686t2r as Interface,
|
|
72
|
-
Namespace345pal554qu3j as Namespace,
|
|
73
|
-
Struct39wf79cwtn4ty as Struct,
|
|
74
|
-
import5uhkz67bd8tt as import_0,
|
|
75
|
-
function12vu2kapzno4w as function_0,
|
|
76
|
-
String_instance3uxvo48ki208u as String_instance,
|
|
77
|
-
VariableReference2vlynnhaw1i64 as VariableReference,
|
|
78
|
-
SanitizationConfig11mmn3p2c03c1 as SanitizationConfig,
|
|
79
|
-
convertClientServer1346neky3bhls as convertClientServer,
|
|
80
|
-
toGetterAccessors2z6mndbqwlczg as toGetterAccessors,
|
|
81
|
-
rawttvqxl50flj9 as raw,
|
|
82
|
-
convertnty9x0e63d0u as convert,
|
|
83
|
-
TransformScopeyrd3lf4zrk76 as TransformScope,
|
|
84
|
-
TransformerBuildera6a1gvlhjj9b as TransformerBuilder,
|
|
85
|
-
transform3eti8i2bqvifx as transform,
|
|
86
|
-
Elementitq62jg6fid3 as Element,
|
|
87
|
-
emitn3eihixilqyh as emit,
|
|
88
|
-
prependImports32gcj3yb8voha as prependImports,
|
|
89
|
-
placeInPackage1ffljbk9me4ug as placeInPackage,
|
|
90
|
-
convertToGenerator2wzjrmaavxhph as convertToGenerator,
|
|
91
|
-
convertToGeneratorkggw47cqose7 as convertToGenerator_0,
|
|
92
|
-
convertToGenerator3rjr3azp4vdsx as convertToGenerator_1,
|
|
93
|
-
convertToGenerator2msmr3acdd5nx as convertToGenerator_2,
|
|
94
|
-
sanitizeNames2wqmyf8vafp9x as sanitizeNames,
|
|
95
|
-
collectCustomTypeNames373f3lwl9sqd5 as collectCustomTypeNames,
|
|
96
|
-
placeInPackagena6oqbi45fz6 as placeInPackage_0,
|
|
97
|
-
convertWithValidation3ar3nbcqsbkpn as convertWithValidation,
|
|
98
|
-
convert11ert2po54h1y as convert_0,
|
|
99
|
-
injectEnumLabelFieldyfohidz6c88i as injectEnumLabelField,
|
|
100
|
-
convert37aabdzvtv9vg as convert_1,
|
|
101
|
-
convert17zcptkz4mhr4 as convert_2,
|
|
102
|
-
convert32tuiui3czihh as convert_3,
|
|
103
|
-
convert1cn4bolzoed8c as convert_4,
|
|
104
|
-
convert3ewo9inue7gua as convert_5,
|
|
105
|
-
emitEndpointClient1meajc90wf3el as emitEndpointClient,
|
|
106
|
-
emitClient32kfwzg2hm5vj as emitClient,
|
|
107
|
-
get_extensions31c4or738wbxz as get_extensions,
|
|
108
|
-
emit1oxjujel6f3jb as emit_0,
|
|
109
|
-
emit3bzdcd0f6nwtj as emit_1,
|
|
110
|
-
beforeGenerate3o8idb3hey1b0 as beforeGenerate,
|
|
111
|
-
IrEmitterh2m93ojzvkep as IrEmitter,
|
|
112
|
-
Dict22iqrhoo0g8et as Dict,
|
|
113
|
-
Array2goj74t0aak7b as Array_0,
|
|
114
|
-
Nullable3wjn6l6q3h6o as Nullable,
|
|
115
|
-
Custom2si7lto3wompr as Custom,
|
|
116
|
-
Unit_instanceyaei45a6t5rv as Unit_instance_0,
|
|
117
|
-
Any_instance2998xag3cdzh3 as Any_instance,
|
|
118
|
-
Bytes_instance3edm2lhbrwd51 as Bytes_instance,
|
|
119
|
-
Boolean_instance27opaqtiiiysz as Boolean_instance,
|
|
120
|
-
Number3azxs9q1cyulb as Number_0,
|
|
121
|
-
Integer1uwg1wvo5lp6z as Integer,
|
|
122
|
-
structo1silz79n3nu as struct,
|
|
123
|
-
RawExpression2bo7ldfrptjia as RawExpression,
|
|
124
|
-
TypeDescriptor1hvcpxrtxcqsx as TypeDescriptor,
|
|
125
|
-
convert2loxpwk8n2r8c as convert_6,
|
|
126
|
-
Custom_init_$Create$2enn7oyj71j1t as Custom_init_$Create$,
|
|
127
|
-
Function21cuq8qizkin7 as Function,
|
|
128
|
-
RawElement2yts1x2rbem1g as RawElement,
|
|
129
|
-
Assignment3kcxc8wlcbmkn as Assignment,
|
|
130
|
-
ReturnStatement29qlfkn9kpy10 as ReturnStatement,
|
|
131
|
-
Wildcard_instance2ga1ytfwj78ra as Wildcard_instance,
|
|
132
|
-
transformChildren2m3cpkz6zusq1 as transformChildren_1,
|
|
133
|
-
} from './wirespec-src-compiler-ir.mjs';
|
|
134
133
|
//region block: imports
|
|
135
134
|
//endregion
|
|
136
135
|
//region block: pre-declaration
|
|
137
136
|
initMetadataForCompanion(Companion);
|
|
138
|
-
initMetadataForClass(
|
|
137
|
+
initMetadataForClass(JavaEmitter, 'JavaEmitter', JavaEmitter, VOID, [IrEmitter]);
|
|
139
138
|
//endregion
|
|
140
|
-
function sanitizeSymbol($this,
|
|
139
|
+
function sanitizeSymbol($this, $receiver) {
|
|
141
140
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
142
|
-
var this_0 = split(
|
|
141
|
+
var this_0 = split($receiver, ['.', ' ', '-']);
|
|
143
142
|
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
144
143
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
145
144
|
var index = 0;
|
|
@@ -148,8 +147,8 @@ function sanitizeSymbol($this, _this__u8e3s4) {
|
|
|
148
147
|
var item = _iterator__ex2g4s.v();
|
|
149
148
|
var _unary__edvuaz = index;
|
|
150
149
|
index = _unary__edvuaz + 1 | 0;
|
|
151
|
-
var tmp$ret$
|
|
152
|
-
destination.x(tmp$ret$
|
|
150
|
+
var tmp$ret$2 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.or(item) : item;
|
|
151
|
+
destination.x(tmp$ret$2);
|
|
153
152
|
}
|
|
154
153
|
// Inline function 'kotlin.text.filter' call
|
|
155
154
|
var tmp0 = joinToString(destination, '');
|
|
@@ -167,12 +166,12 @@ function sanitizeSymbol($this, _this__u8e3s4) {
|
|
|
167
166
|
}
|
|
168
167
|
}
|
|
169
168
|
while (inductionVariable < last);
|
|
170
|
-
var tmp$ret$
|
|
171
|
-
return sanitizeFirstIsDigit($this, tmp$ret$
|
|
169
|
+
var tmp$ret$3 = destination_0.toString();
|
|
170
|
+
return sanitizeFirstIsDigit($this, tmp$ret$3);
|
|
172
171
|
}
|
|
173
|
-
function sanitizeFirstIsDigit($this,
|
|
172
|
+
function sanitizeFirstIsDigit($this, $receiver) {
|
|
174
173
|
var tmp;
|
|
175
|
-
var tmp0_safe_receiver = firstOrNull(
|
|
174
|
+
var tmp0_safe_receiver = firstOrNull($receiver);
|
|
176
175
|
var tmp_0;
|
|
177
176
|
var tmp_1 = tmp0_safe_receiver;
|
|
178
177
|
if ((tmp_1 == null ? null : new Char(tmp_1)) == null) {
|
|
@@ -181,24 +180,24 @@ function sanitizeFirstIsDigit($this, _this__u8e3s4) {
|
|
|
181
180
|
tmp_0 = isDigit(tmp0_safe_receiver);
|
|
182
181
|
}
|
|
183
182
|
if (tmp_0 === true) {
|
|
184
|
-
tmp = '_' +
|
|
183
|
+
tmp = '_' + $receiver;
|
|
185
184
|
} else {
|
|
186
|
-
tmp =
|
|
185
|
+
tmp = $receiver;
|
|
187
186
|
}
|
|
188
187
|
return tmp;
|
|
189
188
|
}
|
|
190
|
-
function sanitizeKeywords($this,
|
|
191
|
-
return Companion_getInstance_0().
|
|
189
|
+
function sanitizeKeywords($this, $receiver) {
|
|
190
|
+
return Companion_getInstance_0().y1y().v1($receiver) ? '_' + $receiver : $receiver;
|
|
192
191
|
}
|
|
193
|
-
function sanitizeEnum($this,
|
|
194
|
-
return sanitizeKeywords($this, sanitizeFirstIsDigit($this, joinToString(split(
|
|
192
|
+
function sanitizeEnum($this, $receiver) {
|
|
193
|
+
return sanitizeKeywords($this, sanitizeFirstIsDigit($this, joinToString(split($receiver, ['-', ', ', '.', ' ', '//']), '_')));
|
|
195
194
|
}
|
|
196
195
|
function Companion() {
|
|
197
196
|
Companion_instance_2 = this;
|
|
198
|
-
this.
|
|
197
|
+
this.x1y_1 = JavaGenerator_getInstance();
|
|
199
198
|
}
|
|
200
|
-
protoOf(Companion).
|
|
201
|
-
return this.
|
|
199
|
+
protoOf(Companion).y1y = function () {
|
|
200
|
+
return this.x1y_1.b1a_1;
|
|
202
201
|
};
|
|
203
202
|
var Companion_instance_2;
|
|
204
203
|
function Companion_getInstance_0() {
|
|
@@ -206,51 +205,51 @@ function Companion_getInstance_0() {
|
|
|
206
205
|
new Companion();
|
|
207
206
|
return Companion_instance_2;
|
|
208
207
|
}
|
|
209
|
-
function
|
|
208
|
+
function JavaEmitter$sanitizationConfig$lambda(it) {
|
|
210
209
|
return '_' + it;
|
|
211
210
|
}
|
|
212
|
-
function
|
|
213
|
-
return name.
|
|
211
|
+
function JavaEmitter$sanitizationConfig$lambda_0(name) {
|
|
212
|
+
return name.kt_1.b1() > 1 ? new Name(listOf(name.ot())) : name;
|
|
214
213
|
}
|
|
215
|
-
function
|
|
216
|
-
return new Name(listOf(name.
|
|
214
|
+
function JavaEmitter$sanitizationConfig$lambda_1(name) {
|
|
215
|
+
return new Name(listOf(name.ot()));
|
|
217
216
|
}
|
|
218
|
-
function
|
|
217
|
+
function JavaEmitter$sanitizationConfig$lambda_2(this$0) {
|
|
219
218
|
return function (it) {
|
|
220
219
|
return sanitizeSymbol(this$0, it);
|
|
221
220
|
};
|
|
222
221
|
}
|
|
223
|
-
function
|
|
222
|
+
function JavaEmitter$sanitizationConfig$lambda_3(stmt, tr) {
|
|
224
223
|
var tmp;
|
|
225
224
|
var tmp_0;
|
|
226
225
|
if (stmt instanceof FunctionCall) {
|
|
227
|
-
tmp_0 = stmt.
|
|
226
|
+
tmp_0 = stmt.ut_1.nt() === 'validate';
|
|
228
227
|
} else {
|
|
229
228
|
tmp_0 = false;
|
|
230
229
|
}
|
|
231
230
|
if (tmp_0) {
|
|
232
|
-
tmp = transformChildren(stmt.
|
|
231
|
+
tmp = transformChildren(stmt.yt(VOID, emptyList()), tr);
|
|
233
232
|
} else {
|
|
234
233
|
tmp = transformChildren(stmt, tr);
|
|
235
234
|
}
|
|
236
235
|
return tmp;
|
|
237
236
|
}
|
|
238
|
-
function
|
|
239
|
-
switch (name.
|
|
237
|
+
function JavaEmitter$emitShared$lambda(name) {
|
|
238
|
+
switch (name.nt()) {
|
|
240
239
|
case 'client':
|
|
241
|
-
return Companion_getInstance().
|
|
240
|
+
return Companion_getInstance().mt('getClient');
|
|
242
241
|
case 'server':
|
|
243
|
-
return Companion_getInstance().
|
|
242
|
+
return Companion_getInstance().mt('getServer');
|
|
244
243
|
default:
|
|
245
244
|
return null;
|
|
246
245
|
}
|
|
247
246
|
}
|
|
248
|
-
function
|
|
247
|
+
function JavaEmitter$emitShared$lambda_0($imports) {
|
|
249
248
|
return function (element, transformer) {
|
|
250
249
|
var tmp;
|
|
251
250
|
if (element instanceof File) {
|
|
252
251
|
// Inline function 'kotlin.collections.partition' call
|
|
253
|
-
var this_0 = element.
|
|
252
|
+
var this_0 = element.yu_1;
|
|
254
253
|
var first = ArrayList_init_$Create$_0();
|
|
255
254
|
var second = ArrayList_init_$Create$_0();
|
|
256
255
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -263,9 +262,9 @@ function JavaIrEmitter$emitShared$lambda_0($imports) {
|
|
|
263
262
|
}
|
|
264
263
|
}
|
|
265
264
|
var _destruct__k2r9zo = new Pair(first, second);
|
|
266
|
-
var packageElements = _destruct__k2r9zo.
|
|
267
|
-
var rest = _destruct__k2r9zo.
|
|
268
|
-
tmp = element.
|
|
265
|
+
var packageElements = _destruct__k2r9zo.ve();
|
|
266
|
+
var rest = _destruct__k2r9zo.we();
|
|
267
|
+
tmp = element.bv(VOID, plus(plus(packageElements, $imports), rest));
|
|
269
268
|
} else {
|
|
270
269
|
tmp = element;
|
|
271
270
|
}
|
|
@@ -273,31 +272,31 @@ function JavaIrEmitter$emitShared$lambda_0($imports) {
|
|
|
273
272
|
return transformChildren_0(transformed, transformer);
|
|
274
273
|
};
|
|
275
274
|
}
|
|
276
|
-
function
|
|
275
|
+
function JavaEmitter$emitShared$lambda_1($clientServer) {
|
|
277
276
|
return function (element, transformer) {
|
|
278
277
|
var tmp;
|
|
279
278
|
if (element instanceof Namespace) {
|
|
280
|
-
var injected = element.
|
|
279
|
+
var injected = element.dv_1.equals(Companion_getInstance().mt('Wirespec')) ? $clientServer : emptyList();
|
|
281
280
|
var tmp_0;
|
|
282
281
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
283
282
|
if (!injected.r()) {
|
|
284
|
-
// Inline function 'community.flock.wirespec.
|
|
285
|
-
var elements = plus(element.
|
|
283
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.withElements' call
|
|
284
|
+
var elements = plus(element.zu(), injected);
|
|
286
285
|
var tmp_1;
|
|
287
286
|
if (element instanceof File) {
|
|
288
|
-
tmp_1 = element.
|
|
287
|
+
tmp_1 = element.bv(VOID, elements);
|
|
289
288
|
} else {
|
|
290
289
|
if (element instanceof Struct) {
|
|
291
|
-
tmp_1 = element.
|
|
290
|
+
tmp_1 = element.ix(VOID, VOID, VOID, VOID, elements);
|
|
292
291
|
} else {
|
|
293
292
|
if (element instanceof Namespace) {
|
|
294
|
-
tmp_1 = element.
|
|
293
|
+
tmp_1 = element.iv(VOID, elements);
|
|
295
294
|
} else {
|
|
296
295
|
if (element instanceof Interface) {
|
|
297
|
-
tmp_1 = element.
|
|
296
|
+
tmp_1 = element.rv(VOID, elements);
|
|
298
297
|
} else {
|
|
299
|
-
if (element instanceof
|
|
300
|
-
tmp_1 = element.
|
|
298
|
+
if (element instanceof Enum) {
|
|
299
|
+
tmp_1 = element.ww(VOID, VOID, VOID, VOID, VOID, elements);
|
|
301
300
|
} else {
|
|
302
301
|
if (element instanceof Main) {
|
|
303
302
|
tmp_1 = element;
|
|
@@ -322,63 +321,63 @@ function JavaIrEmitter$emitShared$lambda_1($clientServer) {
|
|
|
322
321
|
return transformChildren_0(transformed, transformer);
|
|
323
322
|
};
|
|
324
323
|
}
|
|
325
|
-
function
|
|
324
|
+
function JavaEmitter$emitGenerator$lambda(it) {
|
|
326
325
|
return startsWith(it, 'Wirespec.') || it === 'Wirespec';
|
|
327
326
|
}
|
|
328
|
-
function
|
|
327
|
+
function JavaEmitter$emitGenerator$lambda_0($generatorOwnName) {
|
|
329
328
|
return function (it) {
|
|
330
329
|
return it === $generatorOwnName;
|
|
331
330
|
};
|
|
332
331
|
}
|
|
333
|
-
function
|
|
332
|
+
function JavaEmitter$emitGenerator$lambda_1(it) {
|
|
334
333
|
return substringBefore(it, _Char___init__impl__6a9atx(60));
|
|
335
334
|
}
|
|
336
|
-
function
|
|
335
|
+
function JavaEmitter$emitGenerator$lambda_2(this$0) {
|
|
337
336
|
return function (it) {
|
|
338
|
-
return import_0(this$0.
|
|
337
|
+
return import_0(this$0.f1z().rs_1 + '.model', it);
|
|
339
338
|
};
|
|
340
339
|
}
|
|
341
|
-
function
|
|
340
|
+
function JavaEmitter$emit$lambda(this$0) {
|
|
342
341
|
return function (it) {
|
|
343
342
|
return sanitizeEnum(this$0, it);
|
|
344
343
|
};
|
|
345
344
|
}
|
|
346
|
-
function
|
|
347
|
-
return listOf(function_0('label', VOID, VOID,
|
|
345
|
+
function JavaEmitter$emit$lambda_0(it) {
|
|
346
|
+
return listOf(function_0('label', VOID, VOID, JavaEmitter$emit$lambda$lambda));
|
|
348
347
|
}
|
|
349
|
-
function
|
|
350
|
-
$this$function.
|
|
351
|
-
$this$function.
|
|
348
|
+
function JavaEmitter$emit$lambda$lambda($this$function) {
|
|
349
|
+
$this$function.z12(String_instance);
|
|
350
|
+
$this$function.c13(new VariableReference(Companion_getInstance().mt('label')));
|
|
352
351
|
return Unit_instance;
|
|
353
352
|
}
|
|
354
|
-
function
|
|
353
|
+
function JavaEmitter(packageName, emitShared) {
|
|
355
354
|
Companion_getInstance_0();
|
|
356
|
-
packageName = packageName === VOID ? Companion_instance_0.
|
|
357
|
-
emitShared = emitShared === VOID ? Companion_instance_1.
|
|
358
|
-
this.
|
|
359
|
-
this.
|
|
360
|
-
this.
|
|
361
|
-
this.
|
|
362
|
-
this.
|
|
355
|
+
packageName = packageName === VOID ? Companion_instance_0.qs('community.flock.wirespec.generated') : packageName;
|
|
356
|
+
emitShared = emitShared === VOID ? Companion_instance_1.xp() : emitShared;
|
|
357
|
+
this.z1y_1 = packageName;
|
|
358
|
+
this.a1z_1 = emitShared;
|
|
359
|
+
this.b1z_1 = JavaGenerator_getInstance();
|
|
360
|
+
this.c1z_1 = FileExtension_Java_getInstance();
|
|
361
|
+
this.d1z_1 = listOf(import_0('community.flock.wirespec.java', 'Wirespec'));
|
|
363
362
|
var tmp = this;
|
|
364
|
-
var tmp_0 = Companion_getInstance_0().
|
|
365
|
-
var tmp_1 =
|
|
366
|
-
var tmp_2 =
|
|
367
|
-
var tmp_3 =
|
|
368
|
-
var tmp_4 =
|
|
369
|
-
tmp.
|
|
363
|
+
var tmp_0 = Companion_getInstance_0().y1y();
|
|
364
|
+
var tmp_1 = JavaEmitter$sanitizationConfig$lambda;
|
|
365
|
+
var tmp_2 = JavaEmitter$sanitizationConfig$lambda_0;
|
|
366
|
+
var tmp_3 = JavaEmitter$sanitizationConfig$lambda_1;
|
|
367
|
+
var tmp_4 = JavaEmitter$sanitizationConfig$lambda_2(this);
|
|
368
|
+
tmp.e1z_1 = new SanitizationConfig(tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, JavaEmitter$sanitizationConfig$lambda_3);
|
|
370
369
|
}
|
|
371
|
-
protoOf(
|
|
372
|
-
return this.
|
|
370
|
+
protoOf(JavaEmitter).f1z = function () {
|
|
371
|
+
return this.z1y_1;
|
|
373
372
|
};
|
|
374
|
-
protoOf(
|
|
375
|
-
return this.
|
|
373
|
+
protoOf(JavaEmitter).x19 = function () {
|
|
374
|
+
return this.b1z_1;
|
|
376
375
|
};
|
|
377
|
-
protoOf(
|
|
378
|
-
return this.
|
|
376
|
+
protoOf(JavaEmitter).op = function () {
|
|
377
|
+
return this.c1z_1;
|
|
379
378
|
};
|
|
380
|
-
protoOf(
|
|
381
|
-
var packageName = Companion_instance_0.
|
|
379
|
+
protoOf(JavaEmitter).s19 = function () {
|
|
380
|
+
var packageName = Companion_instance_0.qs('community.flock.wirespec.java');
|
|
382
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')]);
|
|
383
382
|
// Inline function 'kotlin.collections.map' call
|
|
384
383
|
var this_0 = convertClientServer();
|
|
@@ -387,64 +386,64 @@ protoOf(JavaIrEmitter).r1w = function () {
|
|
|
387
386
|
var _iterator__ex2g4s = this_0.t();
|
|
388
387
|
while (_iterator__ex2g4s.u()) {
|
|
389
388
|
var item = _iterator__ex2g4s.v();
|
|
390
|
-
var tmp$ret$
|
|
391
|
-
destination.x(tmp$ret$
|
|
389
|
+
var tmp$ret$2 = toGetterAccessors(item, JavaEmitter$emitShared$lambda);
|
|
390
|
+
destination.x(tmp$ret$2);
|
|
392
391
|
}
|
|
393
392
|
var clientServer = plus_0(destination, raw('public static Type getType(final Class<?> actualTypeArguments, final Class<?> rawType) {\n if(rawType != null) {\n return new ParameterizedType() {\n public Type getRawType() { return rawType; }\n public Type[] getActualTypeArguments() { return new Class<?>[]{actualTypeArguments}; }\n public Type getOwnerType() { return null; }\n };\n }\n else { return actualTypeArguments; }\n}'));
|
|
394
|
-
// Inline function 'community.flock.wirespec.
|
|
393
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
395
394
|
var this_1 = convert(packageName);
|
|
396
395
|
var scope = new TransformScope(this_1);
|
|
397
|
-
// Inline function 'community.flock.wirespec.
|
|
396
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
398
397
|
var tmp = scope;
|
|
399
|
-
// Inline function 'community.flock.wirespec.
|
|
400
|
-
var this_2 = scope.
|
|
401
|
-
// Inline function 'community.flock.wirespec.
|
|
398
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
399
|
+
var this_2 = scope.k17_1;
|
|
400
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
402
401
|
// Inline function 'kotlin.apply' call
|
|
403
402
|
var this_3 = new TransformerBuilder();
|
|
404
|
-
this_3.
|
|
405
|
-
var tmp$ret$
|
|
406
|
-
tmp.
|
|
407
|
-
// Inline function 'community.flock.wirespec.
|
|
403
|
+
this_3.e18(JavaEmitter$emitShared$lambda_0(imports));
|
|
404
|
+
var tmp$ret$7 = this_3.z17();
|
|
405
|
+
tmp.k17_1 = transform(this_2, tmp$ret$7);
|
|
406
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.injectAfter' call
|
|
408
407
|
var tmp_0 = scope;
|
|
409
|
-
// Inline function 'community.flock.wirespec.
|
|
410
|
-
// Inline function 'community.flock.wirespec.
|
|
411
|
-
var this_4 = scope.
|
|
412
|
-
// Inline function 'community.flock.wirespec.
|
|
408
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.injectAfter' call
|
|
409
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
410
|
+
var this_4 = scope.k17_1;
|
|
411
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
413
412
|
// Inline function 'kotlin.apply' call
|
|
414
413
|
var this_5 = new TransformerBuilder();
|
|
415
|
-
this_5.
|
|
416
|
-
var tmp$ret$
|
|
417
|
-
tmp_0.
|
|
418
|
-
var tmp_1 = scope.
|
|
414
|
+
this_5.e18(JavaEmitter$emitShared$lambda_1(clientServer));
|
|
415
|
+
var tmp$ret$13 = this_5.z17();
|
|
416
|
+
tmp_0.k17_1 = transform(this_4, tmp$ret$13);
|
|
417
|
+
var tmp_1 = scope.k17_1;
|
|
419
418
|
var wirespecShared = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
420
419
|
var tmp_2;
|
|
421
|
-
if (this.
|
|
420
|
+
if (this.a1z_1.yp_1) {
|
|
422
421
|
tmp_2 = wirespecShared;
|
|
423
422
|
} else {
|
|
424
423
|
tmp_2 = null;
|
|
425
424
|
}
|
|
426
425
|
return tmp_2;
|
|
427
426
|
};
|
|
428
|
-
protoOf(
|
|
427
|
+
protoOf(JavaEmitter).sr = function (definition, module_0, logger) {
|
|
429
428
|
var file = emit.call(this, definition, module_0, logger);
|
|
430
|
-
var tmp = file.
|
|
429
|
+
var tmp = file.bv(Companion_getInstance().mt(sanitizeSymbol(this, file.xu_1.pt())));
|
|
431
430
|
// Inline function 'kotlin.takeIf' call
|
|
432
|
-
var this_0 = this.
|
|
431
|
+
var this_0 = this.d1z_1;
|
|
433
432
|
var tmp_0;
|
|
434
|
-
if (Companion_instance.
|
|
433
|
+
if (Companion_instance.pr(module_0)) {
|
|
435
434
|
tmp_0 = this_0;
|
|
436
435
|
} else {
|
|
437
436
|
tmp_0 = null;
|
|
438
437
|
}
|
|
439
|
-
var tmp$ret$
|
|
440
|
-
return placeInPackage(prependImports(tmp, tmp$ret$
|
|
438
|
+
var tmp$ret$0 = tmp_0;
|
|
439
|
+
return placeInPackage(prependImports(tmp, tmp$ret$0), this.f1z(), definition);
|
|
441
440
|
};
|
|
442
|
-
protoOf(
|
|
441
|
+
protoOf(JavaEmitter).a1a = function (definition, module_0) {
|
|
443
442
|
var tmp;
|
|
444
443
|
if (definition instanceof Type) {
|
|
445
444
|
tmp = convertToGenerator_2(definition, module_0);
|
|
446
445
|
} else {
|
|
447
|
-
if (definition instanceof
|
|
446
|
+
if (definition instanceof Enum_0) {
|
|
448
447
|
tmp = convertToGenerator_1(definition);
|
|
449
448
|
} else {
|
|
450
449
|
if (definition instanceof Refined) {
|
|
@@ -459,33 +458,33 @@ protoOf(JavaIrEmitter).w1w = function (definition, module_0) {
|
|
|
459
458
|
}
|
|
460
459
|
}
|
|
461
460
|
var generatorFile = tmp;
|
|
462
|
-
var sanitized = sanitizeNames(generatorFile, this.
|
|
463
|
-
var generatorOwnName = definition.
|
|
461
|
+
var sanitized = sanitizeNames(generatorFile, this.e1z_1);
|
|
462
|
+
var generatorOwnName = definition.tr().m1() + 'Generator';
|
|
464
463
|
var tmp_0 = asSequence(collectCustomTypeNames(sanitized));
|
|
465
|
-
var tmp_1 = filterNot(tmp_0,
|
|
466
|
-
var tmp_2 = filterNot(tmp_1,
|
|
467
|
-
var tmp_3 = distinct(map(tmp_2,
|
|
468
|
-
var modelImports = toList(map(tmp_3,
|
|
469
|
-
return placeInPackage_0(prependImports(sanitized, plus(this.
|
|
464
|
+
var tmp_1 = filterNot(tmp_0, JavaEmitter$emitGenerator$lambda);
|
|
465
|
+
var tmp_2 = filterNot(tmp_1, JavaEmitter$emitGenerator$lambda_0(generatorOwnName));
|
|
466
|
+
var tmp_3 = distinct(map(tmp_2, JavaEmitter$emitGenerator$lambda_1));
|
|
467
|
+
var modelImports = toList(map(tmp_3, JavaEmitter$emitGenerator$lambda_2(this)));
|
|
468
|
+
return placeInPackage_0(prependImports(sanitized, plus(this.d1z_1, modelImports)), this.f1z(), 'generator');
|
|
470
469
|
};
|
|
471
|
-
protoOf(
|
|
472
|
-
return sanitizeNames(convertWithValidation(type, module_0), this.
|
|
470
|
+
protoOf(JavaEmitter).ks = function (type, module_0) {
|
|
471
|
+
return sanitizeNames(convertWithValidation(type, module_0), this.e1z_1);
|
|
473
472
|
};
|
|
474
|
-
protoOf(
|
|
473
|
+
protoOf(JavaEmitter).is = function (enum_0, module_0) {
|
|
475
474
|
var tmp = convert_0(enum_0);
|
|
476
|
-
var tmp_0 =
|
|
477
|
-
return sanitizeNames(injectEnumLabelField(tmp, tmp_0,
|
|
475
|
+
var tmp_0 = JavaEmitter$emit$lambda(this);
|
|
476
|
+
return sanitizeNames(injectEnumLabelField(tmp, tmp_0, JavaEmitter$emit$lambda_0), this.e1z_1);
|
|
478
477
|
};
|
|
479
|
-
protoOf(
|
|
480
|
-
return sanitizeNames(convert_1(union), this.
|
|
478
|
+
protoOf(JavaEmitter).yr = function (union) {
|
|
479
|
+
return sanitizeNames(convert_1(union), this.e1z_1);
|
|
481
480
|
};
|
|
482
|
-
protoOf(
|
|
483
|
-
return sanitizeNames(applyRefinedStructShape(convert_2(refined), refined), this.
|
|
481
|
+
protoOf(JavaEmitter).ds = function (refined) {
|
|
482
|
+
return sanitizeNames(applyRefinedStructShape(convert_2(refined), refined), this.e1z_1);
|
|
484
483
|
};
|
|
485
|
-
protoOf(
|
|
486
|
-
var tmp = sanitizeNames(transformTypeDescriptors(
|
|
484
|
+
protoOf(JavaEmitter).js = function (endpoint) {
|
|
485
|
+
var tmp = sanitizeNames(transformTypeDescriptors(injectApi(convert_3(endpoint), endpoint)), this.e1z_1);
|
|
487
486
|
// Inline function 'kotlin.takeIf' call
|
|
488
|
-
var this_0 = buildModelImports(endpoint, this.
|
|
487
|
+
var this_0 = buildModelImports(endpoint, this.f1z());
|
|
489
488
|
var tmp_0;
|
|
490
489
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
491
490
|
if (!this_0.r()) {
|
|
@@ -493,23 +492,23 @@ protoOf(JavaIrEmitter).bs = function (endpoint) {
|
|
|
493
492
|
} else {
|
|
494
493
|
tmp_0 = null;
|
|
495
494
|
}
|
|
496
|
-
var tmp$ret$
|
|
497
|
-
return prependImports(tmp, tmp$ret$
|
|
495
|
+
var tmp$ret$0 = tmp_0;
|
|
496
|
+
return prependImports(tmp, tmp$ret$0);
|
|
498
497
|
};
|
|
499
|
-
protoOf(
|
|
498
|
+
protoOf(JavaEmitter).xr = function (channel) {
|
|
500
499
|
var tmp;
|
|
501
|
-
if (channel.
|
|
502
|
-
tmp = this.
|
|
500
|
+
if (channel.nq_1.m1() === channel.oq_1.m1()) {
|
|
501
|
+
tmp = this.f1z().rs_1 + '.model.';
|
|
503
502
|
} else {
|
|
504
503
|
tmp = '';
|
|
505
504
|
}
|
|
506
505
|
var fullyQualifiedPrefix = tmp;
|
|
507
|
-
return qualifyChannelReferences(sanitizeNames(convert_4(channel), this.
|
|
506
|
+
return qualifyChannelReferences(sanitizeNames(convert_4(channel), this.e1z_1), fullyQualifiedPrefix);
|
|
508
507
|
};
|
|
509
|
-
protoOf(
|
|
510
|
-
var tmp = sanitizeNames(convert_5(rpc), this.
|
|
508
|
+
protoOf(JavaEmitter).wr = function (rpc) {
|
|
509
|
+
var tmp = sanitizeNames(convert_5(rpc), this.e1z_1);
|
|
511
510
|
// Inline function 'kotlin.takeIf' call
|
|
512
|
-
var this_0 = buildModelImports(rpc, this.
|
|
511
|
+
var this_0 = buildModelImports(rpc, this.f1z());
|
|
513
512
|
var tmp_0;
|
|
514
513
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
515
514
|
if (!this_0.r()) {
|
|
@@ -517,18 +516,18 @@ protoOf(JavaIrEmitter).or = function (rpc) {
|
|
|
517
516
|
} else {
|
|
518
517
|
tmp_0 = null;
|
|
519
518
|
}
|
|
520
|
-
var tmp$ret$
|
|
521
|
-
return prependImports(tmp, tmp$ret$
|
|
519
|
+
var tmp$ret$0 = tmp_0;
|
|
520
|
+
return prependImports(tmp, tmp$ret$0);
|
|
522
521
|
};
|
|
523
|
-
protoOf(
|
|
524
|
-
var imports = buildModelImports(endpoint, this.
|
|
525
|
-
var endpointImport = import_0(this.
|
|
526
|
-
var endpointName = endpoint.
|
|
527
|
-
var file = wrapAsyncReturnInThenApply(transformTypeDescriptors(sanitizeNames(emitEndpointClient.call(this, endpoint), this.
|
|
528
|
-
var subPackageName = plus_1(this.
|
|
529
|
-
return new File(Companion_getInstance().
|
|
522
|
+
protoOf(JavaEmitter).z19 = function (endpoint) {
|
|
523
|
+
var imports = buildModelImports(endpoint, this.f1z());
|
|
524
|
+
var endpointImport = import_0(this.f1z().rs_1 + '.endpoint', endpoint.vq_1.m1());
|
|
525
|
+
var endpointName = endpoint.vq_1.m1();
|
|
526
|
+
var file = wrapAsyncReturnInThenApply(transformTypeDescriptors(sanitizeNames(emitEndpointClient.call(this, endpoint), this.e1z_1)), endpointName);
|
|
527
|
+
var subPackageName = plus_1(this.f1z(), 'client');
|
|
528
|
+
return new File(Companion_getInstance().mt(subPackageName.ts() + sanitizeSymbol(this, file.xu_1.pt())), plus(plus(plus(plus(listOf(new Package(subPackageName.rs_1)), this.d1z_1), imports), listOf(endpointImport)), file.yu_1));
|
|
530
529
|
};
|
|
531
|
-
protoOf(
|
|
530
|
+
protoOf(JavaEmitter).t19 = function (endpoints, logger) {
|
|
532
531
|
// Inline function 'kotlin.collections.flatMap' call
|
|
533
532
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
534
533
|
var destination = ArrayList_init_$Create$_0();
|
|
@@ -544,7 +543,7 @@ protoOf(JavaIrEmitter).s1w = function (endpoints, logger) {
|
|
|
544
543
|
var _iterator__ex2g4s_0 = destination.t();
|
|
545
544
|
while (_iterator__ex2g4s_0.u()) {
|
|
546
545
|
var e = _iterator__ex2g4s_0.v();
|
|
547
|
-
var key = e.
|
|
546
|
+
var key = e.h18_1;
|
|
548
547
|
if (set.x(key)) {
|
|
549
548
|
list_0.x(e);
|
|
550
549
|
}
|
|
@@ -555,7 +554,7 @@ protoOf(JavaIrEmitter).s1w = function (endpoints, logger) {
|
|
|
555
554
|
var _iterator__ex2g4s_1 = list_0.t();
|
|
556
555
|
while (_iterator__ex2g4s_1.u()) {
|
|
557
556
|
var element_0 = _iterator__ex2g4s_1.v();
|
|
558
|
-
var tmp$ret$
|
|
557
|
+
var tmp$ret$8;
|
|
559
558
|
$l$block_0: {
|
|
560
559
|
// Inline function 'kotlin.collections.none' call
|
|
561
560
|
var tmp;
|
|
@@ -565,20 +564,20 @@ protoOf(JavaIrEmitter).s1w = function (endpoints, logger) {
|
|
|
565
564
|
tmp = false;
|
|
566
565
|
}
|
|
567
566
|
if (tmp) {
|
|
568
|
-
tmp$ret$
|
|
567
|
+
tmp$ret$8 = true;
|
|
569
568
|
break $l$block_0;
|
|
570
569
|
}
|
|
571
570
|
var _iterator__ex2g4s_2 = endpoints.t();
|
|
572
571
|
while (_iterator__ex2g4s_2.u()) {
|
|
573
572
|
var element_1 = _iterator__ex2g4s_2.v();
|
|
574
|
-
if (element_1.
|
|
575
|
-
tmp$ret$
|
|
573
|
+
if (element_1.vq_1.m1() === element_0.h18_1) {
|
|
574
|
+
tmp$ret$8 = false;
|
|
576
575
|
break $l$block_0;
|
|
577
576
|
}
|
|
578
577
|
}
|
|
579
|
-
tmp$ret$
|
|
578
|
+
tmp$ret$8 = true;
|
|
580
579
|
}
|
|
581
|
-
if (tmp$ret$
|
|
580
|
+
if (tmp$ret$8) {
|
|
582
581
|
destination_0.x(element_0);
|
|
583
582
|
}
|
|
584
583
|
}
|
|
@@ -588,8 +587,8 @@ protoOf(JavaIrEmitter).s1w = function (endpoints, logger) {
|
|
|
588
587
|
var _iterator__ex2g4s_3 = destination_0.t();
|
|
589
588
|
while (_iterator__ex2g4s_3.u()) {
|
|
590
589
|
var item = _iterator__ex2g4s_3.v();
|
|
591
|
-
var tmp$ret$
|
|
592
|
-
destination_1.x(tmp$ret$
|
|
590
|
+
var tmp$ret$12 = import_0(this.f1z().rs_1 + '.model', item.h18_1);
|
|
591
|
+
destination_1.x(tmp$ret$12);
|
|
593
592
|
}
|
|
594
593
|
var imports = destination_1;
|
|
595
594
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -598,8 +597,8 @@ protoOf(JavaIrEmitter).s1w = function (endpoints, logger) {
|
|
|
598
597
|
var _iterator__ex2g4s_4 = endpoints.t();
|
|
599
598
|
while (_iterator__ex2g4s_4.u()) {
|
|
600
599
|
var item_0 = _iterator__ex2g4s_4.v();
|
|
601
|
-
var tmp$ret$
|
|
602
|
-
destination_2.x(tmp$ret$
|
|
600
|
+
var tmp$ret$15 = import_0(this.f1z().rs_1 + '.endpoint', item_0.vq_1.m1());
|
|
601
|
+
destination_2.x(tmp$ret$15);
|
|
603
602
|
}
|
|
604
603
|
var endpointImports = destination_2;
|
|
605
604
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -608,69 +607,52 @@ protoOf(JavaIrEmitter).s1w = function (endpoints, logger) {
|
|
|
608
607
|
var _iterator__ex2g4s_5 = endpoints.t();
|
|
609
608
|
while (_iterator__ex2g4s_5.u()) {
|
|
610
609
|
var item_1 = _iterator__ex2g4s_5.v();
|
|
611
|
-
var tmp$ret$
|
|
612
|
-
destination_3.x(tmp$ret$
|
|
610
|
+
var tmp$ret$18 = import_0(this.f1z().rs_1 + '.client', item_1.vq_1.m1() + 'Client');
|
|
611
|
+
destination_3.x(tmp$ret$18);
|
|
613
612
|
}
|
|
614
613
|
var clientImports = destination_3;
|
|
615
614
|
var allImports = plus(plus(imports, endpointImports), clientImports);
|
|
616
|
-
var file = sanitizeNames(emitClient.call(this, endpoints, logger), this.
|
|
617
|
-
return new File(Companion_getInstance().
|
|
615
|
+
var file = sanitizeNames(emitClient.call(this, endpoints, logger), this.e1z_1);
|
|
616
|
+
return new File(Companion_getInstance().mt(this.f1z().ts() + sanitizeSymbol(this, file.xu_1.pt())), plus(plus(plus(listOf(new Package(this.f1z().rs_1)), this.d1z_1), allImports), file.yu_1));
|
|
618
617
|
};
|
|
619
618
|
function transformTypeDescriptors(_this__u8e3s4) {
|
|
620
|
-
// Inline function 'community.flock.wirespec.
|
|
619
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
621
620
|
var scope = new TransformScope(_this__u8e3s4);
|
|
622
|
-
scope.
|
|
623
|
-
var tmp = scope.
|
|
621
|
+
scope.c18(transformTypeDescriptors$lambda);
|
|
622
|
+
var tmp = scope.k17_1;
|
|
624
623
|
return isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
625
624
|
}
|
|
626
625
|
function applyRefinedStructShape(_this__u8e3s4, refined) {
|
|
627
|
-
// Inline function 'community.flock.wirespec.
|
|
628
|
-
var scope = new TransformScope(_this__u8e3s4);
|
|
629
|
-
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
630
|
-
var tmp = scope;
|
|
631
|
-
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
632
|
-
var this_0 = scope.a1w_1;
|
|
633
|
-
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
634
|
-
// Inline function 'kotlin.apply' call
|
|
635
|
-
var this_1 = new TransformerBuilder();
|
|
636
|
-
this_1.u1i(applyRefinedStructShape$lambda(refined));
|
|
637
|
-
var tmp$ret$2 = this_1.v1i();
|
|
638
|
-
tmp.a1w_1 = transform(this_0, tmp$ret$2);
|
|
639
|
-
var tmp_0 = scope.a1w_1;
|
|
640
|
-
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
641
|
-
}
|
|
642
|
-
function injectApiField(_this__u8e3s4) {
|
|
643
|
-
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
626
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
644
627
|
var scope = new TransformScope(_this__u8e3s4);
|
|
645
|
-
// Inline function 'community.flock.wirespec.
|
|
628
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
646
629
|
var tmp = scope;
|
|
647
|
-
// Inline function 'community.flock.wirespec.
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
630
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
631
|
+
var this_0 = scope.k17_1;
|
|
632
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
651
633
|
// Inline function 'kotlin.apply' call
|
|
652
634
|
var this_1 = new TransformerBuilder();
|
|
653
|
-
this_1.
|
|
654
|
-
var tmp$ret$
|
|
655
|
-
tmp.
|
|
656
|
-
var tmp_0 = scope.
|
|
635
|
+
this_1.e18(applyRefinedStructShape$lambda(refined));
|
|
636
|
+
var tmp$ret$4 = this_1.z17();
|
|
637
|
+
tmp.k17_1 = transform(this_0, tmp$ret$4);
|
|
638
|
+
var tmp_0 = scope.k17_1;
|
|
657
639
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
658
640
|
}
|
|
659
|
-
function
|
|
660
|
-
|
|
661
|
-
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
641
|
+
function injectApi(_this__u8e3s4, endpoint) {
|
|
642
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
662
643
|
var scope = new TransformScope(_this__u8e3s4);
|
|
663
|
-
// Inline function 'community.flock.wirespec.
|
|
644
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.injectAfter' call
|
|
664
645
|
var tmp = scope;
|
|
665
|
-
// Inline function 'community.flock.wirespec.
|
|
666
|
-
|
|
667
|
-
|
|
646
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.injectAfter' call
|
|
647
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
648
|
+
var this_0 = scope.k17_1;
|
|
649
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
668
650
|
// Inline function 'kotlin.apply' call
|
|
669
651
|
var this_1 = new TransformerBuilder();
|
|
670
|
-
this_1.
|
|
671
|
-
var tmp$ret$
|
|
672
|
-
tmp.
|
|
673
|
-
var tmp_0 = scope.
|
|
652
|
+
this_1.e18(injectApi$lambda(endpoint));
|
|
653
|
+
var tmp$ret$5 = this_1.z17();
|
|
654
|
+
tmp.k17_1 = transform(this_0, tmp$ret$5);
|
|
655
|
+
var tmp_0 = scope.k17_1;
|
|
674
656
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
675
657
|
}
|
|
676
658
|
function buildModelImports(_this__u8e3s4, packageName) {
|
|
@@ -681,7 +663,7 @@ function buildModelImports(_this__u8e3s4, packageName) {
|
|
|
681
663
|
var _iterator__ex2g4s = tmp0.t();
|
|
682
664
|
while (_iterator__ex2g4s.u()) {
|
|
683
665
|
var element = _iterator__ex2g4s.v();
|
|
684
|
-
if (!(_this__u8e3s4.
|
|
666
|
+
if (!(_this__u8e3s4.tr().m1() === element.h18_1)) {
|
|
685
667
|
destination.x(element);
|
|
686
668
|
}
|
|
687
669
|
}
|
|
@@ -691,53 +673,53 @@ function buildModelImports(_this__u8e3s4, packageName) {
|
|
|
691
673
|
var _iterator__ex2g4s_0 = destination.t();
|
|
692
674
|
while (_iterator__ex2g4s_0.u()) {
|
|
693
675
|
var item = _iterator__ex2g4s_0.v();
|
|
694
|
-
var tmp$ret$
|
|
695
|
-
destination_0.x(tmp$ret$
|
|
676
|
+
var tmp$ret$5 = import_0(packageName.rs_1 + '.model', Companion_getInstance().mt(item.h18_1).pt());
|
|
677
|
+
destination_0.x(tmp$ret$5);
|
|
696
678
|
}
|
|
697
679
|
return destination_0;
|
|
698
680
|
}
|
|
699
681
|
function qualifyChannelReferences(_this__u8e3s4, fullyQualifiedPrefix) {
|
|
700
|
-
// Inline function 'community.flock.wirespec.
|
|
682
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
701
683
|
var scope = new TransformScope(_this__u8e3s4);
|
|
702
|
-
// Inline function 'community.flock.wirespec.
|
|
684
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
703
685
|
var tmp = scope;
|
|
704
|
-
// Inline function 'community.flock.wirespec.
|
|
705
|
-
var this_0 = scope.
|
|
706
|
-
// Inline function 'community.flock.wirespec.
|
|
686
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
687
|
+
var this_0 = scope.k17_1;
|
|
688
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
707
689
|
// Inline function 'kotlin.apply' call
|
|
708
690
|
var this_1 = new TransformerBuilder();
|
|
709
|
-
this_1.
|
|
710
|
-
var tmp$ret$
|
|
711
|
-
tmp.
|
|
712
|
-
var tmp_0 = scope.
|
|
691
|
+
this_1.e18(qualifyChannelReferences$lambda(fullyQualifiedPrefix));
|
|
692
|
+
var tmp$ret$4 = this_1.z17();
|
|
693
|
+
tmp.k17_1 = transform(this_0, tmp$ret$4);
|
|
694
|
+
var tmp_0 = scope.k17_1;
|
|
713
695
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
714
696
|
}
|
|
715
697
|
function wrapAsyncReturnInThenApply(_this__u8e3s4, endpointName) {
|
|
716
|
-
// Inline function 'community.flock.wirespec.
|
|
698
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
717
699
|
var scope = new TransformScope(_this__u8e3s4);
|
|
718
|
-
// Inline function 'community.flock.wirespec.
|
|
700
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
719
701
|
var tmp = scope;
|
|
720
|
-
// Inline function 'community.flock.wirespec.
|
|
721
|
-
var this_0 = scope.
|
|
722
|
-
// Inline function 'community.flock.wirespec.
|
|
702
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
703
|
+
var this_0 = scope.k17_1;
|
|
704
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
723
705
|
// Inline function 'kotlin.apply' call
|
|
724
706
|
var this_1 = new TransformerBuilder();
|
|
725
|
-
this_1.
|
|
726
|
-
var tmp$ret$
|
|
727
|
-
tmp.
|
|
728
|
-
var tmp_0 = scope.
|
|
707
|
+
this_1.e18(wrapAsyncReturnInThenApply$lambda(endpointName));
|
|
708
|
+
var tmp$ret$4 = this_1.z17();
|
|
709
|
+
tmp.k17_1 = transform(this_0, tmp$ret$4);
|
|
710
|
+
var tmp_0 = scope.k17_1;
|
|
729
711
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
730
712
|
}
|
|
731
713
|
function findRoot(_this__u8e3s4) {
|
|
732
714
|
var tmp;
|
|
733
715
|
if (_this__u8e3s4 instanceof Nullable) {
|
|
734
|
-
tmp = findRoot(_this__u8e3s4.
|
|
716
|
+
tmp = findRoot(_this__u8e3s4.ku_1);
|
|
735
717
|
} else {
|
|
736
718
|
if (_this__u8e3s4 instanceof Array_0) {
|
|
737
|
-
tmp = findRoot(_this__u8e3s4.
|
|
719
|
+
tmp = findRoot(_this__u8e3s4.bu_1);
|
|
738
720
|
} else {
|
|
739
721
|
if (_this__u8e3s4 instanceof Dict) {
|
|
740
|
-
tmp = findRoot(_this__u8e3s4.
|
|
722
|
+
tmp = findRoot(_this__u8e3s4.eu_1);
|
|
741
723
|
} else {
|
|
742
724
|
tmp = _this__u8e3s4;
|
|
743
725
|
}
|
|
@@ -766,7 +748,7 @@ function toJavaName(_this__u8e3s4) {
|
|
|
766
748
|
var tmp;
|
|
767
749
|
if (_this__u8e3s4 instanceof Integer) {
|
|
768
750
|
var tmp_0;
|
|
769
|
-
switch (_this__u8e3s4.
|
|
751
|
+
switch (_this__u8e3s4.zt_1.c3_1) {
|
|
770
752
|
case 0:
|
|
771
753
|
tmp_0 = 'Integer';
|
|
772
754
|
break;
|
|
@@ -781,7 +763,7 @@ function toJavaName(_this__u8e3s4) {
|
|
|
781
763
|
} else {
|
|
782
764
|
if (_this__u8e3s4 instanceof Number_0) {
|
|
783
765
|
var tmp_1;
|
|
784
|
-
switch (_this__u8e3s4.
|
|
766
|
+
switch (_this__u8e3s4.au_1.c3_1) {
|
|
785
767
|
case 0:
|
|
786
768
|
tmp_1 = 'Float';
|
|
787
769
|
break;
|
|
@@ -810,7 +792,7 @@ function toJavaName(_this__u8e3s4) {
|
|
|
810
792
|
tmp = 'Void';
|
|
811
793
|
} else {
|
|
812
794
|
if (_this__u8e3s4 instanceof Custom) {
|
|
813
|
-
tmp = _this__u8e3s4.
|
|
795
|
+
tmp = _this__u8e3s4.gu_1.pt();
|
|
814
796
|
} else {
|
|
815
797
|
tmp = 'Object';
|
|
816
798
|
}
|
|
@@ -823,27 +805,27 @@ function toJavaName(_this__u8e3s4) {
|
|
|
823
805
|
}
|
|
824
806
|
return tmp;
|
|
825
807
|
}
|
|
826
|
-
function
|
|
827
|
-
var pathTemplate = '/' + joinToString(_this__u8e3s4.
|
|
828
|
-
return struct('
|
|
808
|
+
function buildApiStruct(_this__u8e3s4) {
|
|
809
|
+
var pathTemplate = '/' + joinToString(_this__u8e3s4.xq_1, '/', VOID, VOID, VOID, VOID, buildApiStruct$lambda);
|
|
810
|
+
return struct('Api', buildApiStruct$lambda_0(pathTemplate, _this__u8e3s4));
|
|
829
811
|
}
|
|
830
812
|
function withFullyQualifiedPrefix(_this__u8e3s4, prefix) {
|
|
831
813
|
var tmp;
|
|
832
814
|
// Inline function 'kotlin.text.isNotEmpty' call
|
|
833
815
|
if (charSequenceLength(prefix) > 0) {
|
|
834
|
-
// Inline function 'community.flock.wirespec.
|
|
816
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
835
817
|
var scope = new TransformScope(_this__u8e3s4);
|
|
836
|
-
// Inline function 'community.flock.wirespec.
|
|
818
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matching' call
|
|
837
819
|
var tmp_0 = scope;
|
|
838
|
-
// Inline function 'community.flock.wirespec.
|
|
839
|
-
var this_0 = scope.
|
|
840
|
-
// Inline function 'community.flock.wirespec.
|
|
820
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatching' call
|
|
821
|
+
var this_0 = scope.k17_1;
|
|
822
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
841
823
|
// Inline function 'kotlin.apply' call
|
|
842
824
|
var this_1 = new TransformerBuilder();
|
|
843
|
-
this_1.
|
|
844
|
-
var tmp$ret$
|
|
845
|
-
tmp_0.
|
|
846
|
-
var tmp_1 = scope.
|
|
825
|
+
this_1.q17(withFullyQualifiedPrefix$lambda(prefix));
|
|
826
|
+
var tmp$ret$5 = this_1.z17();
|
|
827
|
+
tmp_0.k17_1 = transform(this_0, tmp$ret$5);
|
|
828
|
+
var tmp_1 = scope.k17_1;
|
|
847
829
|
tmp = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
848
830
|
} else {
|
|
849
831
|
tmp = _this__u8e3s4;
|
|
@@ -853,8 +835,8 @@ function withFullyQualifiedPrefix(_this__u8e3s4, prefix) {
|
|
|
853
835
|
function transformTypeDescriptors$lambda(stmt, tr) {
|
|
854
836
|
var tmp;
|
|
855
837
|
if (stmt instanceof TypeDescriptor) {
|
|
856
|
-
var rootType = findRoot(stmt.
|
|
857
|
-
var containerStr = rawContainerClass(stmt.
|
|
838
|
+
var rootType = findRoot(stmt.xx_1);
|
|
839
|
+
var containerStr = rawContainerClass(stmt.xx_1);
|
|
858
840
|
var rootStr = toJavaName(rootType) + '.class';
|
|
859
841
|
var tmp_0;
|
|
860
842
|
if (containerStr == null) {
|
|
@@ -873,8 +855,8 @@ function transformTypeDescriptors$lambda(stmt, tr) {
|
|
|
873
855
|
}
|
|
874
856
|
function applyRefinedStructShape$lambda$lambda($refined) {
|
|
875
857
|
return function ($this$function) {
|
|
876
|
-
$this$function.
|
|
877
|
-
$this$function.
|
|
858
|
+
$this$function.z12(convert_6($refined.cs_1));
|
|
859
|
+
$this$function.c13(new VariableReference(Companion_getInstance().mt('value')));
|
|
878
860
|
return Unit_instance;
|
|
879
861
|
};
|
|
880
862
|
}
|
|
@@ -884,39 +866,39 @@ function applyRefinedStructShape$lambda($refined) {
|
|
|
884
866
|
if (element instanceof Struct) {
|
|
885
867
|
var tmp_0 = listOf(Custom_init_$Create$('Wirespec.Refined'));
|
|
886
868
|
// Inline function 'kotlin.collections.map' call
|
|
887
|
-
var this_0 = element.
|
|
869
|
+
var this_0 = element.bx_1;
|
|
888
870
|
// Inline function 'kotlin.collections.mapTo' call
|
|
889
871
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
890
872
|
var _iterator__ex2g4s = this_0.t();
|
|
891
873
|
while (_iterator__ex2g4s.u()) {
|
|
892
874
|
var item = _iterator__ex2g4s.v();
|
|
893
875
|
var tmp0_safe_receiver = item instanceof Function ? item : null;
|
|
894
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
895
|
-
var tmp$ret$
|
|
896
|
-
destination.x(tmp$ret$
|
|
876
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vx(VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
|
|
877
|
+
var tmp$ret$3 = tmp1_elvis_lhs == null ? item : tmp1_elvis_lhs;
|
|
878
|
+
destination.x(tmp$ret$3);
|
|
897
879
|
}
|
|
898
|
-
var tmp0 = element.
|
|
899
|
-
// Inline function 'community.flock.wirespec.
|
|
880
|
+
var tmp0 = element.ix(VOID, VOID, VOID, tmp_0, destination);
|
|
881
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.plus' call
|
|
900
882
|
var element_0 = function_0('value', VOID, true, applyRefinedStructShape$lambda$lambda($refined));
|
|
901
883
|
var tmp_1;
|
|
902
884
|
if (tmp0 instanceof File) {
|
|
903
|
-
var tmp_2 = tmp0.
|
|
885
|
+
var tmp_2 = tmp0.bv(VOID, plus_0(tmp0.yu_1, element_0));
|
|
904
886
|
tmp_1 = tmp_2 instanceof Struct ? tmp_2 : THROW_CCE();
|
|
905
887
|
} else {
|
|
906
888
|
if (tmp0 instanceof Struct) {
|
|
907
|
-
var tmp_3 = tmp0.
|
|
889
|
+
var tmp_3 = tmp0.ix(VOID, VOID, VOID, VOID, plus_0(tmp0.bx_1, element_0));
|
|
908
890
|
tmp_1 = tmp_3 instanceof Struct ? tmp_3 : THROW_CCE();
|
|
909
891
|
} else {
|
|
910
892
|
if (tmp0 instanceof Namespace) {
|
|
911
|
-
var tmp_4 = tmp0.
|
|
893
|
+
var tmp_4 = tmp0.iv(VOID, plus_0(tmp0.ev_1, element_0));
|
|
912
894
|
tmp_1 = tmp_4 instanceof Struct ? tmp_4 : THROW_CCE();
|
|
913
895
|
} else {
|
|
914
896
|
if (tmp0 instanceof Interface) {
|
|
915
|
-
var tmp_5 = tmp0.
|
|
897
|
+
var tmp_5 = tmp0.rv(VOID, plus_0(tmp0.kv_1, element_0));
|
|
916
898
|
tmp_1 = tmp_5 instanceof Struct ? tmp_5 : THROW_CCE();
|
|
917
899
|
} else {
|
|
918
|
-
if (tmp0 instanceof
|
|
919
|
-
var tmp_6 = tmp0.
|
|
900
|
+
if (tmp0 instanceof Enum) {
|
|
901
|
+
var tmp_6 = tmp0.ww(VOID, VOID, VOID, VOID, VOID, plus_0(tmp0.tw_1, element_0));
|
|
920
902
|
tmp_1 = tmp_6 instanceof Struct ? tmp_6 : THROW_CCE();
|
|
921
903
|
} else {
|
|
922
904
|
noWhenBranchMatchedException();
|
|
@@ -933,78 +915,31 @@ function applyRefinedStructShape$lambda($refined) {
|
|
|
933
915
|
return transformChildren_0(transformed, transformer);
|
|
934
916
|
};
|
|
935
917
|
}
|
|
936
|
-
function
|
|
937
|
-
var tmp;
|
|
938
|
-
if (element instanceof Namespace) {
|
|
939
|
-
var injected = listOf(new RawElement('Handler.Handlers api = new Handler.Handlers();\n'));
|
|
940
|
-
var tmp_0;
|
|
941
|
-
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
942
|
-
if (!injected.r()) {
|
|
943
|
-
// Inline function 'community.flock.wirespec.ir.core.withElements' call
|
|
944
|
-
var elements = plus(element.e1o(), injected);
|
|
945
|
-
var tmp_1;
|
|
946
|
-
if (element instanceof File) {
|
|
947
|
-
tmp_1 = element.g1o(VOID, elements);
|
|
948
|
-
} else {
|
|
949
|
-
if (element instanceof Struct) {
|
|
950
|
-
tmp_1 = element.n1q(VOID, VOID, VOID, VOID, elements);
|
|
951
|
-
} else {
|
|
952
|
-
if (element instanceof Namespace) {
|
|
953
|
-
tmp_1 = element.n1o(VOID, elements);
|
|
954
|
-
} else {
|
|
955
|
-
if (element instanceof Interface) {
|
|
956
|
-
tmp_1 = element.w1o(VOID, elements);
|
|
957
|
-
} else {
|
|
958
|
-
if (element instanceof Enum_0) {
|
|
959
|
-
tmp_1 = element.b1q(VOID, VOID, VOID, VOID, VOID, elements);
|
|
960
|
-
} else {
|
|
961
|
-
if (element instanceof Main) {
|
|
962
|
-
tmp_1 = element;
|
|
963
|
-
} else {
|
|
964
|
-
tmp_1 = element;
|
|
965
|
-
}
|
|
966
|
-
}
|
|
967
|
-
}
|
|
968
|
-
}
|
|
969
|
-
}
|
|
970
|
-
}
|
|
971
|
-
var tmp_2 = tmp_1;
|
|
972
|
-
tmp_0 = tmp_2 instanceof Namespace ? tmp_2 : THROW_CCE();
|
|
973
|
-
} else {
|
|
974
|
-
tmp_0 = element;
|
|
975
|
-
}
|
|
976
|
-
tmp = tmp_0;
|
|
977
|
-
} else {
|
|
978
|
-
tmp = element;
|
|
979
|
-
}
|
|
980
|
-
var transformed = tmp;
|
|
981
|
-
return transformChildren_0(transformed, transformer);
|
|
982
|
-
}
|
|
983
|
-
function injectHandleFunction$lambda$lambda($handlersStruct) {
|
|
918
|
+
function injectApi$lambda($endpoint) {
|
|
984
919
|
return function (element, transformer) {
|
|
985
920
|
var tmp;
|
|
986
|
-
if (element instanceof
|
|
987
|
-
var injected =
|
|
921
|
+
if (element instanceof Namespace) {
|
|
922
|
+
var injected = listOf_0([buildApiStruct($endpoint), new RawElement('Api api = new Api();\n')]);
|
|
988
923
|
var tmp_0;
|
|
989
924
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
990
925
|
if (!injected.r()) {
|
|
991
|
-
// Inline function 'community.flock.wirespec.
|
|
992
|
-
var elements = plus(element.
|
|
926
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.withElements' call
|
|
927
|
+
var elements = plus(element.zu(), injected);
|
|
993
928
|
var tmp_1;
|
|
994
929
|
if (element instanceof File) {
|
|
995
|
-
tmp_1 = element.
|
|
930
|
+
tmp_1 = element.bv(VOID, elements);
|
|
996
931
|
} else {
|
|
997
932
|
if (element instanceof Struct) {
|
|
998
|
-
tmp_1 = element.
|
|
933
|
+
tmp_1 = element.ix(VOID, VOID, VOID, VOID, elements);
|
|
999
934
|
} else {
|
|
1000
935
|
if (element instanceof Namespace) {
|
|
1001
|
-
tmp_1 = element.
|
|
936
|
+
tmp_1 = element.iv(VOID, elements);
|
|
1002
937
|
} else {
|
|
1003
938
|
if (element instanceof Interface) {
|
|
1004
|
-
tmp_1 = element.
|
|
939
|
+
tmp_1 = element.rv(VOID, elements);
|
|
1005
940
|
} else {
|
|
1006
|
-
if (element instanceof
|
|
1007
|
-
tmp_1 = element.
|
|
941
|
+
if (element instanceof Enum) {
|
|
942
|
+
tmp_1 = element.ww(VOID, VOID, VOID, VOID, VOID, elements);
|
|
1008
943
|
} else {
|
|
1009
944
|
if (element instanceof Main) {
|
|
1010
945
|
tmp_1 = element;
|
|
@@ -1017,39 +952,7 @@ function injectHandleFunction$lambda$lambda($handlersStruct) {
|
|
|
1017
952
|
}
|
|
1018
953
|
}
|
|
1019
954
|
var tmp_2 = tmp_1;
|
|
1020
|
-
tmp_0 = tmp_2 instanceof
|
|
1021
|
-
} else {
|
|
1022
|
-
tmp_0 = element;
|
|
1023
|
-
}
|
|
1024
|
-
tmp = tmp_0;
|
|
1025
|
-
} else {
|
|
1026
|
-
tmp = element;
|
|
1027
|
-
}
|
|
1028
|
-
var transformed = tmp;
|
|
1029
|
-
return transformChildren_0(transformed, transformer);
|
|
1030
|
-
};
|
|
1031
|
-
}
|
|
1032
|
-
function injectHandleFunction$lambda($handlersStruct) {
|
|
1033
|
-
return function (element, transformer) {
|
|
1034
|
-
var tmp;
|
|
1035
|
-
if (element instanceof Interface) {
|
|
1036
|
-
var tmp_0;
|
|
1037
|
-
if (element.o1o_1.equals(Companion_getInstance().h1h('Handler'))) {
|
|
1038
|
-
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1039
|
-
var scope = new TransformScope(element);
|
|
1040
|
-
// Inline function 'community.flock.wirespec.ir.core.TransformScope.injectAfter' call
|
|
1041
|
-
var tmp_1 = scope;
|
|
1042
|
-
// Inline function 'community.flock.wirespec.ir.core.injectAfter' call
|
|
1043
|
-
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1044
|
-
var this_0 = scope.a1w_1;
|
|
1045
|
-
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1046
|
-
// Inline function 'kotlin.apply' call
|
|
1047
|
-
var this_1 = new TransformerBuilder();
|
|
1048
|
-
this_1.u1i(injectHandleFunction$lambda$lambda($handlersStruct));
|
|
1049
|
-
var tmp$ret$2 = this_1.v1i();
|
|
1050
|
-
tmp_1.a1w_1 = transform(this_0, tmp$ret$2);
|
|
1051
|
-
var tmp_2 = scope.a1w_1;
|
|
1052
|
-
tmp_0 = isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
|
|
955
|
+
tmp_0 = tmp_2 instanceof Namespace ? tmp_2 : THROW_CCE();
|
|
1053
956
|
} else {
|
|
1054
957
|
tmp_0 = element;
|
|
1055
958
|
}
|
|
@@ -1079,11 +982,11 @@ function wrapAsyncReturnInThenApply$lambda($endpointName) {
|
|
|
1079
982
|
if (element instanceof Function) {
|
|
1080
983
|
var tmp$ret$0;
|
|
1081
984
|
$l$block_1: {
|
|
1082
|
-
if (!element.
|
|
985
|
+
if (!element.ox_1 || element.nx_1.b1() < 2) {
|
|
1083
986
|
tmp$ret$0 = element;
|
|
1084
987
|
break $l$block_1;
|
|
1085
988
|
}
|
|
1086
|
-
var tmp_0 = element.
|
|
989
|
+
var tmp_0 = element.nx_1.c1(element.nx_1.b1() - 2 | 0);
|
|
1087
990
|
var tmp0_elvis_lhs = tmp_0 instanceof Assignment ? tmp_0 : null;
|
|
1088
991
|
var tmp_1;
|
|
1089
992
|
if (tmp0_elvis_lhs == null) {
|
|
@@ -1093,16 +996,16 @@ function wrapAsyncReturnInThenApply$lambda($endpointName) {
|
|
|
1093
996
|
tmp_1 = tmp0_elvis_lhs;
|
|
1094
997
|
}
|
|
1095
998
|
var transportAssign = tmp_1;
|
|
1096
|
-
var tmp_2 = last(element.
|
|
999
|
+
var tmp_2 = last(element.nx_1);
|
|
1097
1000
|
if (!(tmp_2 instanceof ReturnStatement)) {
|
|
1098
1001
|
tmp$ret$0 = element;
|
|
1099
1002
|
break $l$block_1;
|
|
1100
1003
|
}
|
|
1101
|
-
var tmp_3 = dropLast(element.
|
|
1102
|
-
var tmp1_name = Companion_getInstance().
|
|
1103
|
-
var tmp2_receiver = transportAssign.
|
|
1104
|
-
var tmp3_arguments = mapOf(to(Companion_getInstance().
|
|
1105
|
-
tmp$ret$0 = element.
|
|
1004
|
+
var tmp_3 = dropLast(element.nx_1, 2);
|
|
1005
|
+
var tmp1_name = Companion_getInstance().mt('thenApply');
|
|
1006
|
+
var tmp2_receiver = transportAssign.ay_1;
|
|
1007
|
+
var tmp3_arguments = mapOf(to(Companion_getInstance().mt('mapper'), new RawExpression('rawResponse -> ' + $endpointName + '.fromRawResponse(serialization(), rawResponse)')));
|
|
1008
|
+
tmp$ret$0 = element.vx(VOID, VOID, VOID, VOID, plus_0(tmp_3, new ReturnStatement(new FunctionCall(tmp2_receiver, VOID, tmp1_name, tmp3_arguments))));
|
|
1106
1009
|
}
|
|
1107
1010
|
tmp = tmp$ret$0;
|
|
1108
1011
|
} else {
|
|
@@ -1112,53 +1015,53 @@ function wrapAsyncReturnInThenApply$lambda($endpointName) {
|
|
|
1112
1015
|
return transformChildren_0(transformed, transformer);
|
|
1113
1016
|
};
|
|
1114
1017
|
}
|
|
1115
|
-
function
|
|
1018
|
+
function buildApiStruct$lambda(it) {
|
|
1116
1019
|
var tmp;
|
|
1117
1020
|
if (it instanceof Literal) {
|
|
1118
|
-
tmp = it.
|
|
1021
|
+
tmp = it.q19_1;
|
|
1119
1022
|
} else {
|
|
1120
1023
|
if (it instanceof Param) {
|
|
1121
|
-
tmp = '{' + it.
|
|
1024
|
+
tmp = '{' + it.cr_1.m1() + '}';
|
|
1122
1025
|
} else {
|
|
1123
1026
|
noWhenBranchMatchedException();
|
|
1124
1027
|
}
|
|
1125
1028
|
}
|
|
1126
1029
|
return tmp;
|
|
1127
1030
|
}
|
|
1128
|
-
function
|
|
1031
|
+
function buildApiStruct$lambda$lambda($pathTemplate) {
|
|
1129
1032
|
return function ($this$function) {
|
|
1130
|
-
$this$function.
|
|
1131
|
-
$this$function.
|
|
1033
|
+
$this$function.z12(String_instance);
|
|
1034
|
+
$this$function.c13($this$function.w13($pathTemplate));
|
|
1132
1035
|
return Unit_instance;
|
|
1133
1036
|
};
|
|
1134
1037
|
}
|
|
1135
|
-
function
|
|
1038
|
+
function buildApiStruct$lambda$lambda_0($this_buildApiStruct) {
|
|
1136
1039
|
return function ($this$function) {
|
|
1137
|
-
$this$function.
|
|
1138
|
-
$this$function.
|
|
1040
|
+
$this$function.z12(String_instance);
|
|
1041
|
+
$this$function.c13($this$function.w13($this_buildApiStruct.wq_1.b3_1));
|
|
1139
1042
|
return Unit_instance;
|
|
1140
1043
|
};
|
|
1141
1044
|
}
|
|
1142
|
-
function
|
|
1143
|
-
$this$function.
|
|
1144
|
-
$this$function.
|
|
1145
|
-
$this$function.
|
|
1045
|
+
function buildApiStruct$lambda$lambda_1($this$function) {
|
|
1046
|
+
$this$function.z12($this$function.v13('Wirespec.ServerEdge', [$this$function.v13('Request', []), $this$function.v13('Response', [Wildcard_instance])]));
|
|
1047
|
+
$this$function.a13('serialization', $this$function.v13('Wirespec.Serialization', []));
|
|
1048
|
+
$this$function.c13(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}'));
|
|
1146
1049
|
return Unit_instance;
|
|
1147
1050
|
}
|
|
1148
|
-
function
|
|
1149
|
-
$this$function.
|
|
1150
|
-
$this$function.
|
|
1151
|
-
$this$function.
|
|
1051
|
+
function buildApiStruct$lambda$lambda_2($this$function) {
|
|
1052
|
+
$this$function.z12($this$function.v13('Wirespec.ClientEdge', [$this$function.v13('Request', []), $this$function.v13('Response', [Wildcard_instance])]));
|
|
1053
|
+
$this$function.a13('serialization', $this$function.v13('Wirespec.Serialization', []));
|
|
1054
|
+
$this$function.c13(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}'));
|
|
1152
1055
|
return Unit_instance;
|
|
1153
1056
|
}
|
|
1154
|
-
function
|
|
1057
|
+
function buildApiStruct$lambda_0($pathTemplate, $this_buildApiStruct) {
|
|
1155
1058
|
return function ($this$struct) {
|
|
1156
|
-
$this$struct.
|
|
1157
|
-
$this$struct.
|
|
1158
|
-
$this$struct.
|
|
1159
|
-
$this$struct.
|
|
1160
|
-
$this$struct.
|
|
1161
|
-
$this$struct.
|
|
1059
|
+
$this$struct.h14($this$struct.v13('Wirespec.Server', [$this$struct.v13('Request', []), $this$struct.v13('Response', [Wildcard_instance])]));
|
|
1060
|
+
$this$struct.h14($this$struct.v13('Wirespec.Client', [$this$struct.v13('Request', []), $this$struct.v13('Response', [Wildcard_instance])]));
|
|
1061
|
+
$this$struct.q14('getPathTemplate', VOID, true, buildApiStruct$lambda$lambda($pathTemplate));
|
|
1062
|
+
$this$struct.q14('getMethod', VOID, true, buildApiStruct$lambda$lambda_0($this_buildApiStruct));
|
|
1063
|
+
$this$struct.q14('getServer', VOID, true, buildApiStruct$lambda$lambda_1);
|
|
1064
|
+
$this$struct.q14('getClient', VOID, true, buildApiStruct$lambda$lambda_2);
|
|
1162
1065
|
return Unit_instance;
|
|
1163
1066
|
};
|
|
1164
1067
|
}
|
|
@@ -1166,7 +1069,7 @@ function withFullyQualifiedPrefix$lambda($prefix) {
|
|
|
1166
1069
|
return function (type, transformer) {
|
|
1167
1070
|
var tmp;
|
|
1168
1071
|
if (type instanceof Custom) {
|
|
1169
|
-
tmp = type.
|
|
1072
|
+
tmp = type.ju(new Name(listOf($prefix + type.gu_1.pt())));
|
|
1170
1073
|
} else {
|
|
1171
1074
|
tmp = type;
|
|
1172
1075
|
}
|
|
@@ -1175,14 +1078,15 @@ function withFullyQualifiedPrefix$lambda($prefix) {
|
|
|
1175
1078
|
};
|
|
1176
1079
|
}
|
|
1177
1080
|
//region block: post-declaration
|
|
1178
|
-
protoOf(
|
|
1179
|
-
protoOf(
|
|
1180
|
-
protoOf(
|
|
1181
|
-
protoOf(
|
|
1081
|
+
protoOf(JavaEmitter).u19 = get_extensions;
|
|
1082
|
+
protoOf(JavaEmitter).mo = emit_0;
|
|
1083
|
+
protoOf(JavaEmitter).r19 = emit_1;
|
|
1084
|
+
protoOf(JavaEmitter).w19 = beforeGenerate;
|
|
1085
|
+
protoOf(JavaEmitter).np = get_supportsDefaults;
|
|
1182
1086
|
//endregion
|
|
1183
1087
|
//region block: exports
|
|
1184
1088
|
export {
|
|
1185
|
-
|
|
1089
|
+
JavaEmitter as JavaEmitter1ye60adpym6m1,
|
|
1186
1090
|
};
|
|
1187
1091
|
//endregion
|
|
1188
1092
|
|