@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,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
KProperty1ca4yb4wlo496 as KProperty1,
|
|
3
3
|
getPropertyCallableRef3hckxc0xueiaj as getPropertyCallableRef,
|
|
4
|
-
|
|
4
|
+
Unit_instancev9v8hjid95df as Unit_instance,
|
|
5
5
|
THROW_CCE2g6jy02ryeudk as THROW_CCE,
|
|
6
6
|
isInterface3d6p8outrmvmk as isInterface,
|
|
7
7
|
split2bvyvnrlcifjv as split,
|
|
8
8
|
collectionSizeOrDefault36dulx8yinfqm as collectionSizeOrDefault,
|
|
9
|
-
ArrayList_init_$Create$
|
|
9
|
+
ArrayList_init_$Create$2byt5m5yn22yy as ArrayList_init_$Create$,
|
|
10
10
|
checkIndexOverflow3frtmheghr0th as checkIndexOverflow,
|
|
11
11
|
joinToString1cxrrlmo0chqs as joinToString,
|
|
12
|
-
StringBuilder_init_$Create$
|
|
12
|
+
StringBuilder_init_$Create$3ds9zx2kx9u4d as StringBuilder_init_$Create$,
|
|
13
13
|
charSequenceLength3278n89t01tmv as charSequenceLength,
|
|
14
14
|
charSequenceGet1vxk1y5n17t1z as charSequenceGet,
|
|
15
15
|
isLetterOrDigit2kuxd9e198haf as isLetterOrDigit,
|
|
16
|
-
|
|
16
|
+
_Char___init__impl__6a9atx2gndcvjvc5pke as _Char___init__impl__6a9atx,
|
|
17
17
|
firstOrNulltrxqttxfxqju as firstOrNull,
|
|
18
18
|
isDigit3mimrri4wkzop as isDigit,
|
|
19
19
|
Char19o2r8palgjof as Char,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
toMap1vec9topfei08 as toMap,
|
|
27
27
|
emptyList1g2z5xcrvp2zy as emptyList,
|
|
28
28
|
VOID3gxj6tk5isa35 as VOID,
|
|
29
|
-
ArrayList_init_$Create$
|
|
29
|
+
ArrayList_init_$Create$37gc04va6yfo2 as ArrayList_init_$Create$_0,
|
|
30
30
|
Paire9pteg33gng7 as Pair,
|
|
31
31
|
plus20p0vtfmu0596 as plus,
|
|
32
32
|
plus310ted5e4i90h as plus_0,
|
|
@@ -43,81 +43,80 @@ import {
|
|
|
43
43
|
listOfNotNull1v4ggfackvuny as listOfNotNull,
|
|
44
44
|
ensureNotNull1e947j3ixpazm as ensureNotNull,
|
|
45
45
|
addAll1k27qatfgp3k5 as addAll,
|
|
46
|
-
HashSet_init_$Create$
|
|
46
|
+
HashSet_init_$Create$2w31ptb4ree5i as HashSet_init_$Create$,
|
|
47
47
|
initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
|
|
48
48
|
trimMarginhyd3fsmh8iev as trimMargin,
|
|
49
49
|
noWhenBranchMatchedException2a6r7ubxgky5j as noWhenBranchMatchedException,
|
|
50
50
|
} from './kotlin-kotlin-stdlib.mjs';
|
|
51
51
|
import {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
Nameoqr8dt2fim9d as Name,
|
|
58
|
-
FunctionCall30872kpnbr7op as FunctionCall,
|
|
59
|
-
transformChildren2mszeagj5nq4c as transformChildren,
|
|
60
|
-
VariableReference2vlynnhaw1i64 as VariableReference,
|
|
61
|
-
sanitizeFieldName1ptgy1kxy8u2m as sanitizeFieldName,
|
|
62
|
-
ConstructorStatement1x4n4sr59iy4n as ConstructorStatement,
|
|
63
|
-
SanitizationConfig11mmn3p2c03c1 as SanitizationConfig,
|
|
64
|
-
Package2tniq694j1763 as Package,
|
|
65
|
-
import5uhkz67bd8tt as import_0,
|
|
66
|
-
File3dimy4iqmuock as File,
|
|
67
|
-
transformChildrend9p91tpcqdkx as transformChildren_0,
|
|
68
|
-
Companion_getInstance3gvtuyxc9uhxj as Companion_getInstance,
|
|
69
|
-
Mainb4yvz4x0nrxd as Main,
|
|
70
|
-
Enumlszg09mwd24f as Enum,
|
|
71
|
-
Interface3pn84xq686t2r as Interface,
|
|
72
|
-
Namespace345pal554qu3j as Namespace,
|
|
73
|
-
Struct39wf79cwtn4ty as Struct,
|
|
74
|
-
Visibility_PUBLIC_getInstancezzqdnyfgtpc3 as Visibility_PUBLIC_getInstance,
|
|
75
|
-
Function21cuq8qizkin7 as Function,
|
|
76
|
-
Union38f3pecvfcpxh as Union,
|
|
77
|
-
convertClientServer1346neky3bhls as convertClientServer,
|
|
78
|
-
convertnty9x0e63d0u as convert,
|
|
79
|
-
emitn3eihixilqyh as emit,
|
|
80
|
-
prependImports32gcj3yb8voha as prependImports,
|
|
81
|
-
placeInPackage1ffljbk9me4ug as placeInPackage,
|
|
82
|
-
convertToGenerator2wzjrmaavxhph as convertToGenerator,
|
|
83
|
-
convertToGeneratorkggw47cqose7 as convertToGenerator_0,
|
|
84
|
-
convertToGenerator3rjr3azp4vdsx as convertToGenerator_1,
|
|
85
|
-
convertToGenerator2msmr3acdd5nx as convertToGenerator_2,
|
|
86
|
-
sanitizeNames2wqmyf8vafp9x as sanitizeNames,
|
|
87
|
-
collectCustomTypeNames373f3lwl9sqd5 as collectCustomTypeNames,
|
|
88
|
-
placeInPackagena6oqbi45fz6 as placeInPackage_0,
|
|
89
|
-
convertWithValidation3ar3nbcqsbkpn as convertWithValidation,
|
|
90
|
-
ensureEmptyStructHasConstructorfl467argh9dd as ensureEmptyStructHasConstructor,
|
|
91
|
-
convert11ert2po54h1y as convert_0,
|
|
92
|
-
injectEnumLabelFieldyfohidz6c88i as injectEnumLabelField,
|
|
93
|
-
convert37aabdzvtv9vg as convert_1,
|
|
94
|
-
convert17zcptkz4mhr4 as convert_2,
|
|
95
|
-
markMembersAsOverride3r1zpft8nbmxg as markMembersAsOverride,
|
|
96
|
-
convert32tuiui3czihh as convert_3,
|
|
97
|
-
convert1cn4bolzoed8c as convert_4,
|
|
98
|
-
convert3ewo9inue7gua as convert_5,
|
|
99
|
-
emitEndpointClient1meajc90wf3el as emitEndpointClient,
|
|
100
|
-
emitClient32kfwzg2hm5vj as emitClient,
|
|
101
|
-
get_extensions31c4or738wbxz as get_extensions,
|
|
102
|
-
emit1oxjujel6f3jb as emit_0,
|
|
103
|
-
emit3bzdcd0f6nwtj as emit_1,
|
|
104
|
-
beforeGenerate3o8idb3hey1b0 as beforeGenerate,
|
|
105
|
-
IrEmitterh2m93ojzvkep as IrEmitter,
|
|
106
|
-
rawttvqxl50flj9 as raw,
|
|
107
|
-
} from './wirespec-src-compiler-ir.mjs';
|
|
108
|
-
import {
|
|
109
|
-
Companion_instancebcq57hoyp8c2 as Companion_instance,
|
|
52
|
+
TransformScope3fhztkr2eyk36 as TransformScope,
|
|
53
|
+
TransformerBuilder26pbjl5nmg6wa as TransformerBuilder,
|
|
54
|
+
transformhd96z3w1u5uc as transform,
|
|
55
|
+
Element3p1xrn21d2w4b as Element,
|
|
56
|
+
Companion_instance27ueeez2qu1l as Companion_instance,
|
|
110
57
|
FieldIdentifier34k7iphndcnl0 as FieldIdentifier,
|
|
111
58
|
addBackticks1di5q03fw4yhx as addBackticks,
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
59
|
+
KotlinGenerator_getInstance2e31cf8vh2zcv as KotlinGenerator_getInstance,
|
|
60
|
+
Name1ijtblv1phm3y as Name,
|
|
61
|
+
FunctionCall1a3g4e6bcljl6 as FunctionCall,
|
|
62
|
+
transformChildren34heehtlmzzif as transformChildren,
|
|
63
|
+
VariableReferencesji1q1tq3ygo as VariableReference,
|
|
64
|
+
sanitizeFieldName333wgwu6tt90n as sanitizeFieldName,
|
|
65
|
+
ConstructorStatement1edouznvc71xv as ConstructorStatement,
|
|
66
|
+
SanitizationConfigunh0ok3qg1q3 as SanitizationConfig,
|
|
67
|
+
Package1a6hdgk3p4frd as Package,
|
|
68
|
+
import3bym2b49e642p as import_0,
|
|
69
|
+
File12q75sqvz964e as File,
|
|
70
|
+
transformChildren14suh59vxsgt as transformChildren_0,
|
|
71
|
+
Companion_getInstance34fvro4h6bumb as Companion_getInstance,
|
|
72
|
+
Main3fexakddcxfff as Main,
|
|
73
|
+
Enumoqsp4e7al89r as Enum,
|
|
74
|
+
Interface2g99rmjjt5ne as Interface,
|
|
75
|
+
Namespacex2gpe17ntoag as Namespace,
|
|
76
|
+
Structakfq94wrq695 as Struct,
|
|
77
|
+
Visibility_PUBLIC_getInstance32vt79oefqy1j as Visibility_PUBLIC_getInstance,
|
|
78
|
+
Function1wme41sk2huri as Function,
|
|
79
|
+
Uniontffpdks00nyc as Union,
|
|
80
|
+
Companion_instance21vwhhqsaytqt as Companion_instance_0,
|
|
81
|
+
Companion_instance2oq66qbk0c5g8 as Companion_instance_1,
|
|
82
|
+
FileExtension_Kotlin_getInstance29s41mx2tvhb1 as FileExtension_Kotlin_getInstance,
|
|
83
|
+
convertClientServerdyft3utnhf92 as convertClientServer,
|
|
84
|
+
convert37y165c07dvpq as convert,
|
|
85
|
+
emit1w04jgbmswnni as emit,
|
|
86
|
+
prependImportslco5lco5if44 as prependImports,
|
|
87
|
+
placeInPackage3aq544c1svvop as placeInPackage,
|
|
88
|
+
convertToGenerator115obo0n49kco as convertToGenerator,
|
|
115
89
|
Unionccsavx6nrdr2 as Union_0,
|
|
90
|
+
convertToGenerator1x32vg5qdleq8 as convertToGenerator_0,
|
|
116
91
|
Refined1lkzc0dg6wey7 as Refined,
|
|
92
|
+
convertToGenerator33dm40iimoy3x as convertToGenerator_1,
|
|
117
93
|
Enum3l2iuc342kle6 as Enum_0,
|
|
94
|
+
convertToGenerator1arvbkvdv4bro as convertToGenerator_2,
|
|
118
95
|
Type12n1gx16iqtcu as Type,
|
|
96
|
+
sanitizeNames1v55mz1p84psg as sanitizeNames,
|
|
97
|
+
collectCustomTypeNames2atsrip288ol4 as collectCustomTypeNames,
|
|
98
|
+
placeInPackagea1jcxre6uf77 as placeInPackage_0,
|
|
99
|
+
convertWithValidation24mbxf4x2u6w4 as convertWithValidation,
|
|
100
|
+
sanitizeEnumDefaults29ynqh9a2ayr9 as sanitizeEnumDefaults,
|
|
101
|
+
ensureEmptyStructHasConstructorftf9v01tnb2y as ensureEmptyStructHasConstructor,
|
|
102
|
+
convert1ke01d6gmcvu7 as convert_0,
|
|
103
|
+
injectEnumLabelField21kogrwccvlea as injectEnumLabelField,
|
|
104
|
+
convert29zpebhuxz599 as convert_1,
|
|
105
|
+
convert39lmqftdnlhsy as convert_2,
|
|
106
|
+
markMembersAsOverridessfchvibgdcx as markMembersAsOverride,
|
|
107
|
+
convert333pgxr2q05n as convert_3,
|
|
108
|
+
convert86y6uioox2cl as convert_4,
|
|
109
|
+
convert1o5h4ulxoqycg as convert_5,
|
|
110
|
+
emitEndpointClient2og25opoka4ql as emitEndpointClient,
|
|
119
111
|
plus14o24vdaiongg as plus_1,
|
|
120
112
|
importReferencesy4xv7r53sjjs as importReferences,
|
|
113
|
+
emitClient1ucatfg1ovgb6 as emitClient,
|
|
114
|
+
get_extensions1p1y8uybwv35q as get_extensions,
|
|
115
|
+
emit2s9bv7yrx5jcs as emit_0,
|
|
116
|
+
emit3e40nagyc4qho as emit_1,
|
|
117
|
+
beforeGenerate2eu511tof5fa4 as beforeGenerate,
|
|
118
|
+
IrEmitter2jy94gp21kviv as IrEmitter,
|
|
119
|
+
raw1mm1rmqheq474 as raw,
|
|
121
120
|
Paramvfwnys2w6aj1 as Param,
|
|
122
121
|
Literal331hu9r04vptz as Literal,
|
|
123
122
|
} from './wirespec-src-compiler-core.mjs';
|
|
@@ -125,41 +124,41 @@ import {
|
|
|
125
124
|
//endregion
|
|
126
125
|
//region block: pre-declaration
|
|
127
126
|
initMetadataForCompanion(Companion);
|
|
128
|
-
initMetadataForClass(
|
|
127
|
+
initMetadataForClass(KotlinEmitter, 'KotlinEmitter', KotlinEmitter, VOID, [IrEmitter]);
|
|
129
128
|
//endregion
|
|
130
129
|
function _get_sanitizationConfig__sns434($this) {
|
|
131
|
-
var tmp0 = $this.
|
|
130
|
+
var tmp0 = $this.m1z_1;
|
|
132
131
|
var tmp = KProperty1;
|
|
133
132
|
// Inline function 'kotlin.getValue' call
|
|
134
|
-
getPropertyCallableRef('sanitizationConfig', 1, tmp,
|
|
133
|
+
getPropertyCallableRef('sanitizationConfig', 1, tmp, KotlinEmitter$_get_sanitizationConfig_$ref_sjisty(), null);
|
|
135
134
|
return tmp0.m1();
|
|
136
135
|
}
|
|
137
136
|
function _get_modelSanitizationConfig__vgg831($this) {
|
|
138
|
-
var tmp0 = $this.
|
|
137
|
+
var tmp0 = $this.n1z_1;
|
|
139
138
|
var tmp = KProperty1;
|
|
140
139
|
// Inline function 'kotlin.getValue' call
|
|
141
|
-
getPropertyCallableRef('modelSanitizationConfig', 1, tmp,
|
|
140
|
+
getPropertyCallableRef('modelSanitizationConfig', 1, tmp, KotlinEmitter$_get_modelSanitizationConfig_$ref_pvjfk5(), null);
|
|
142
141
|
return tmp0.m1();
|
|
143
142
|
}
|
|
144
|
-
function withExplicitVisibility($this,
|
|
145
|
-
// Inline function 'community.flock.wirespec.
|
|
146
|
-
var scope = new TransformScope(
|
|
147
|
-
// Inline function 'community.flock.wirespec.
|
|
143
|
+
function withExplicitVisibility($this, $receiver) {
|
|
144
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
145
|
+
var scope = new TransformScope($receiver);
|
|
146
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
148
147
|
var tmp = scope;
|
|
149
|
-
// Inline function 'community.flock.wirespec.
|
|
150
|
-
var this_0 = scope.
|
|
151
|
-
// Inline function 'community.flock.wirespec.
|
|
148
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
149
|
+
var this_0 = scope.k17_1;
|
|
150
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
152
151
|
// Inline function 'kotlin.apply' call
|
|
153
152
|
var this_1 = new TransformerBuilder();
|
|
154
|
-
this_1.
|
|
155
|
-
var tmp$ret$
|
|
156
|
-
tmp.
|
|
157
|
-
var tmp_0 = scope.
|
|
153
|
+
this_1.e18(KotlinEmitter$withExplicitVisibility$lambda);
|
|
154
|
+
var tmp$ret$4 = this_1.z17();
|
|
155
|
+
tmp.k17_1 = transform(this_0, tmp$ret$4);
|
|
156
|
+
var tmp_0 = scope.k17_1;
|
|
158
157
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
159
158
|
}
|
|
160
|
-
function sanitize($this,
|
|
159
|
+
function sanitize($this, $receiver) {
|
|
161
160
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
162
|
-
var this_0 = split(
|
|
161
|
+
var this_0 = split($receiver.m1(), ['.', ' ']);
|
|
163
162
|
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
164
163
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
165
164
|
var index = 0;
|
|
@@ -168,8 +167,8 @@ function sanitize($this, _this__u8e3s4) {
|
|
|
168
167
|
var item = _iterator__ex2g4s.v();
|
|
169
168
|
var _unary__edvuaz = index;
|
|
170
169
|
index = _unary__edvuaz + 1 | 0;
|
|
171
|
-
var tmp$ret$
|
|
172
|
-
destination.x(tmp$ret$
|
|
170
|
+
var tmp$ret$2 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.or(item) : item;
|
|
171
|
+
destination.x(tmp$ret$2);
|
|
173
172
|
}
|
|
174
173
|
// Inline function 'kotlin.text.filter' call
|
|
175
174
|
var tmp0 = joinToString(destination, '');
|
|
@@ -187,20 +186,20 @@ function sanitize($this, _this__u8e3s4) {
|
|
|
187
186
|
}
|
|
188
187
|
}
|
|
189
188
|
while (inductionVariable < last);
|
|
190
|
-
var tmp$ret$
|
|
189
|
+
var tmp$ret$3 = destination_0.toString();
|
|
191
190
|
// Inline function 'kotlin.let' call
|
|
192
|
-
var it = sanitizeFirstIsDigit($this, tmp$ret$
|
|
191
|
+
var it = sanitizeFirstIsDigit($this, tmp$ret$3);
|
|
193
192
|
var tmp;
|
|
194
|
-
if (
|
|
193
|
+
if ($receiver instanceof FieldIdentifier) {
|
|
195
194
|
tmp = sanitizeKeywords($this, it);
|
|
196
195
|
} else {
|
|
197
196
|
tmp = it;
|
|
198
197
|
}
|
|
199
198
|
return tmp;
|
|
200
199
|
}
|
|
201
|
-
function sanitizeFirstIsDigit($this,
|
|
200
|
+
function sanitizeFirstIsDigit($this, $receiver) {
|
|
202
201
|
var tmp;
|
|
203
|
-
var tmp0_safe_receiver = firstOrNull(
|
|
202
|
+
var tmp0_safe_receiver = firstOrNull($receiver);
|
|
204
203
|
var tmp_0;
|
|
205
204
|
var tmp_1 = tmp0_safe_receiver;
|
|
206
205
|
if ((tmp_1 == null ? null : new Char(tmp_1)) == null) {
|
|
@@ -209,18 +208,18 @@ function sanitizeFirstIsDigit($this, _this__u8e3s4) {
|
|
|
209
208
|
tmp_0 = isDigit(tmp0_safe_receiver);
|
|
210
209
|
}
|
|
211
210
|
if (tmp_0 === true) {
|
|
212
|
-
tmp = '_' +
|
|
211
|
+
tmp = '_' + $receiver;
|
|
213
212
|
} else {
|
|
214
|
-
tmp =
|
|
213
|
+
tmp = $receiver;
|
|
215
214
|
}
|
|
216
215
|
return tmp;
|
|
217
216
|
}
|
|
218
|
-
function sanitizeKeywords($this,
|
|
219
|
-
return Companion_getInstance_0().
|
|
217
|
+
function sanitizeKeywords($this, $receiver) {
|
|
218
|
+
return Companion_getInstance_0().y1y().v1($receiver) ? addBackticks($receiver) : $receiver;
|
|
220
219
|
}
|
|
221
|
-
function sanitizeSymbol($this,
|
|
220
|
+
function sanitizeSymbol($this, $receiver) {
|
|
222
221
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
223
|
-
var this_0 = split(
|
|
222
|
+
var this_0 = split($receiver, ['.', ' ', '-']);
|
|
224
223
|
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
225
224
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
226
225
|
var index = 0;
|
|
@@ -229,8 +228,8 @@ function sanitizeSymbol($this, _this__u8e3s4) {
|
|
|
229
228
|
var item = _iterator__ex2g4s.v();
|
|
230
229
|
var _unary__edvuaz = index;
|
|
231
230
|
index = _unary__edvuaz + 1 | 0;
|
|
232
|
-
var tmp$ret$
|
|
233
|
-
destination.x(tmp$ret$
|
|
231
|
+
var tmp$ret$2 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.or(item) : item;
|
|
232
|
+
destination.x(tmp$ret$2);
|
|
234
233
|
}
|
|
235
234
|
// Inline function 'kotlin.text.filter' call
|
|
236
235
|
var tmp0 = joinToString(destination, '');
|
|
@@ -248,51 +247,51 @@ function sanitizeSymbol($this, _this__u8e3s4) {
|
|
|
248
247
|
}
|
|
249
248
|
}
|
|
250
249
|
while (inductionVariable < last);
|
|
251
|
-
var tmp$ret$
|
|
252
|
-
return sanitizeFirstIsDigit($this, tmp$ret$
|
|
250
|
+
var tmp$ret$3 = destination_0.toString();
|
|
251
|
+
return sanitizeFirstIsDigit($this, tmp$ret$3);
|
|
253
252
|
}
|
|
254
|
-
function sanitizeFieldSymbol($this,
|
|
255
|
-
return isBareIdentifier($this,
|
|
253
|
+
function sanitizeFieldSymbol($this, $receiver) {
|
|
254
|
+
return isBareIdentifier($this, $receiver) ? $receiver : addBackticks($receiver);
|
|
256
255
|
}
|
|
257
|
-
function isBareIdentifier($this,
|
|
256
|
+
function isBareIdentifier($this, $receiver) {
|
|
258
257
|
var tmp;
|
|
259
258
|
var tmp_0;
|
|
260
259
|
// Inline function 'kotlin.text.isNotEmpty' call
|
|
261
|
-
if (charSequenceLength(
|
|
262
|
-
tmp_0 = isLetter(first(
|
|
260
|
+
if (charSequenceLength($receiver) > 0) {
|
|
261
|
+
tmp_0 = isLetter(first($receiver)) || first($receiver) === _Char___init__impl__6a9atx(95);
|
|
263
262
|
} else {
|
|
264
263
|
tmp_0 = false;
|
|
265
264
|
}
|
|
266
265
|
if (tmp_0) {
|
|
267
|
-
var tmp$ret$
|
|
266
|
+
var tmp$ret$1;
|
|
268
267
|
$l$block: {
|
|
269
268
|
// Inline function 'kotlin.text.all' call
|
|
270
269
|
var inductionVariable = 0;
|
|
271
|
-
while (inductionVariable < charSequenceLength(
|
|
272
|
-
var element = charSequenceGet(
|
|
270
|
+
while (inductionVariable < charSequenceLength($receiver)) {
|
|
271
|
+
var element = charSequenceGet($receiver, inductionVariable);
|
|
273
272
|
inductionVariable = inductionVariable + 1 | 0;
|
|
274
273
|
if (!(isLetterOrDigit(element) || element === _Char___init__impl__6a9atx(95))) {
|
|
275
|
-
tmp$ret$
|
|
274
|
+
tmp$ret$1 = false;
|
|
276
275
|
break $l$block;
|
|
277
276
|
}
|
|
278
277
|
}
|
|
279
|
-
tmp$ret$
|
|
278
|
+
tmp$ret$1 = true;
|
|
280
279
|
}
|
|
281
|
-
tmp = tmp$ret$
|
|
280
|
+
tmp = tmp$ret$1;
|
|
282
281
|
} else {
|
|
283
282
|
tmp = false;
|
|
284
283
|
}
|
|
285
284
|
return tmp;
|
|
286
285
|
}
|
|
287
|
-
function sanitizeEnum($this,
|
|
288
|
-
return sanitizeKeywords($this, sanitizeFirstIsDigit($this, joinToString(split(
|
|
286
|
+
function sanitizeEnum($this, $receiver) {
|
|
287
|
+
return sanitizeKeywords($this, sanitizeFirstIsDigit($this, joinToString(split($receiver, ['-', ', ', '.', ' ', '//']), '_')));
|
|
289
288
|
}
|
|
290
289
|
function Companion() {
|
|
291
290
|
Companion_instance_2 = this;
|
|
292
|
-
this.
|
|
291
|
+
this.o1z_1 = KotlinGenerator_getInstance();
|
|
293
292
|
}
|
|
294
|
-
protoOf(Companion).
|
|
295
|
-
return this.
|
|
293
|
+
protoOf(Companion).y1y = function () {
|
|
294
|
+
return this.o1z_1.d1a_1;
|
|
296
295
|
};
|
|
297
296
|
var Companion_instance_2;
|
|
298
297
|
function Companion_getInstance_0() {
|
|
@@ -300,42 +299,42 @@ function Companion_getInstance_0() {
|
|
|
300
299
|
new Companion();
|
|
301
300
|
return Companion_instance_2;
|
|
302
301
|
}
|
|
303
|
-
function
|
|
302
|
+
function KotlinEmitter$sanitizationConfig$delegate$lambda$lambda(it) {
|
|
304
303
|
return addBackticks(it);
|
|
305
304
|
}
|
|
306
|
-
function
|
|
305
|
+
function KotlinEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0) {
|
|
307
306
|
return function (name) {
|
|
308
|
-
var sanitized = name.
|
|
307
|
+
var sanitized = name.kt_1.b1() > 1 ? name.ot() : sanitizeSymbol(this$0, name.nt());
|
|
309
308
|
return new Name(listOf(sanitized));
|
|
310
309
|
};
|
|
311
310
|
}
|
|
312
|
-
function
|
|
311
|
+
function KotlinEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0) {
|
|
313
312
|
return function (name) {
|
|
314
|
-
var sanitized = name.
|
|
313
|
+
var sanitized = name.kt_1.b1() > 1 ? name.ot() : sanitizeSymbol(this$0, name.nt());
|
|
315
314
|
return new Name(listOf(sanitized));
|
|
316
315
|
};
|
|
317
316
|
}
|
|
318
|
-
function
|
|
317
|
+
function KotlinEmitter$sanitizationConfig$delegate$lambda$lambda_2(this$0) {
|
|
319
318
|
return function (it) {
|
|
320
319
|
return sanitizeSymbol(this$0, it);
|
|
321
320
|
};
|
|
322
321
|
}
|
|
323
|
-
function
|
|
322
|
+
function KotlinEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
324
323
|
return function (stmt, tr) {
|
|
325
324
|
var tmp;
|
|
326
325
|
var tmp_0;
|
|
327
326
|
if (stmt instanceof FunctionCall) {
|
|
328
|
-
tmp_0 = stmt.
|
|
327
|
+
tmp_0 = stmt.ut_1.nt() === 'validate';
|
|
329
328
|
} else {
|
|
330
329
|
tmp_0 = false;
|
|
331
330
|
}
|
|
332
331
|
if (tmp_0) {
|
|
333
|
-
tmp = transformChildren(stmt.
|
|
332
|
+
tmp = transformChildren(stmt.yt(VOID, emptyList()), tr);
|
|
334
333
|
} else {
|
|
335
334
|
if (stmt instanceof ConstructorStatement) {
|
|
336
|
-
var tmp_1 = tr.
|
|
335
|
+
var tmp_1 = tr.c17(stmt.tu_1);
|
|
337
336
|
// Inline function 'kotlin.collections.map' call
|
|
338
|
-
var this_0 = stmt.
|
|
337
|
+
var this_0 = stmt.uu_1;
|
|
339
338
|
// Inline function 'kotlin.collections.mapTo' call
|
|
340
339
|
var destination = ArrayList_init_$Create$(this_0.b1());
|
|
341
340
|
// Inline function 'kotlin.collections.iterator' call
|
|
@@ -346,15 +345,15 @@ function KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
346
345
|
var name = item.l1();
|
|
347
346
|
// Inline function 'kotlin.collections.component2' call
|
|
348
347
|
var expr = item.m1();
|
|
349
|
-
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), name), tr.
|
|
348
|
+
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), name), tr.f17(expr));
|
|
350
349
|
destination.x(tmp$ret$3);
|
|
351
350
|
}
|
|
352
351
|
tmp = new ConstructorStatement(tmp_1, toMap(destination));
|
|
353
352
|
} else {
|
|
354
353
|
if (stmt instanceof VariableReference) {
|
|
355
|
-
var cased = _get_sanitizationConfig__sns434(this$0).
|
|
356
|
-
var sanitized = _get_sanitizationConfig__sns434(this$0).
|
|
357
|
-
var escaped = Companion_getInstance_0().
|
|
354
|
+
var cased = _get_sanitizationConfig__sns434(this$0).s1a_1(stmt.wu_1);
|
|
355
|
+
var sanitized = _get_sanitizationConfig__sns434(this$0).t1a_1(cased.nt());
|
|
356
|
+
var escaped = Companion_getInstance_0().y1y().v1(sanitized) ? addBackticks(sanitized) : sanitized;
|
|
358
357
|
tmp = new VariableReference(new Name(listOf(escaped)));
|
|
359
358
|
} else {
|
|
360
359
|
tmp = transformChildren(stmt, tr);
|
|
@@ -364,46 +363,46 @@ function KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
|
364
363
|
return tmp;
|
|
365
364
|
};
|
|
366
365
|
}
|
|
367
|
-
function
|
|
366
|
+
function KotlinEmitter$sanitizationConfig$delegate$lambda(this$0) {
|
|
368
367
|
return function () {
|
|
369
|
-
var tmp = Companion_getInstance_0().
|
|
370
|
-
var tmp_0 =
|
|
371
|
-
var tmp_1 =
|
|
372
|
-
var tmp_2 =
|
|
373
|
-
var tmp_3 =
|
|
374
|
-
return new SanitizationConfig(tmp, tmp_0, tmp_1, tmp_2, tmp_3,
|
|
368
|
+
var tmp = Companion_getInstance_0().y1y();
|
|
369
|
+
var tmp_0 = KotlinEmitter$sanitizationConfig$delegate$lambda$lambda;
|
|
370
|
+
var tmp_1 = KotlinEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0);
|
|
371
|
+
var tmp_2 = KotlinEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0);
|
|
372
|
+
var tmp_3 = KotlinEmitter$sanitizationConfig$delegate$lambda$lambda_2(this$0);
|
|
373
|
+
return new SanitizationConfig(tmp, tmp_0, tmp_1, tmp_2, tmp_3, KotlinEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0));
|
|
375
374
|
};
|
|
376
375
|
}
|
|
377
|
-
function
|
|
376
|
+
function KotlinEmitter$_get_sanitizationConfig_$ref_sjisty() {
|
|
378
377
|
return function (p0) {
|
|
379
378
|
return _get_sanitizationConfig__sns434(p0);
|
|
380
379
|
};
|
|
381
380
|
}
|
|
382
|
-
function
|
|
383
|
-
return new Name(listOf(name.
|
|
381
|
+
function KotlinEmitter$modelSanitizationConfig$delegate$lambda$lambda(name) {
|
|
382
|
+
return new Name(listOf(name.nt()));
|
|
384
383
|
}
|
|
385
|
-
function
|
|
384
|
+
function KotlinEmitter$modelSanitizationConfig$delegate$lambda$lambda_0(this$0) {
|
|
386
385
|
return function (it) {
|
|
387
386
|
return sanitizeFieldSymbol(this$0, it);
|
|
388
387
|
};
|
|
389
388
|
}
|
|
390
|
-
function
|
|
389
|
+
function KotlinEmitter$modelSanitizationConfig$delegate$lambda(this$0) {
|
|
391
390
|
return function () {
|
|
392
391
|
var tmp = _get_sanitizationConfig__sns434(this$0);
|
|
393
|
-
var tmp_0 =
|
|
394
|
-
return tmp.
|
|
392
|
+
var tmp_0 = KotlinEmitter$modelSanitizationConfig$delegate$lambda$lambda;
|
|
393
|
+
return tmp.x1a(VOID, VOID, tmp_0, VOID, KotlinEmitter$modelSanitizationConfig$delegate$lambda$lambda_0(this$0));
|
|
395
394
|
};
|
|
396
395
|
}
|
|
397
|
-
function
|
|
396
|
+
function KotlinEmitter$_get_modelSanitizationConfig_$ref_pvjfk5() {
|
|
398
397
|
return function (p0) {
|
|
399
398
|
return _get_modelSanitizationConfig__vgg831(p0);
|
|
400
399
|
};
|
|
401
400
|
}
|
|
402
|
-
function
|
|
401
|
+
function KotlinEmitter$emitShared$lambda(element, transformer) {
|
|
403
402
|
var tmp;
|
|
404
403
|
if (element instanceof File) {
|
|
405
404
|
// Inline function 'kotlin.collections.partition' call
|
|
406
|
-
var this_0 = element.
|
|
405
|
+
var this_0 = element.yu_1;
|
|
407
406
|
var first = ArrayList_init_$Create$_0();
|
|
408
407
|
var second = ArrayList_init_$Create$_0();
|
|
409
408
|
var _iterator__ex2g4s = this_0.t();
|
|
@@ -416,40 +415,40 @@ function KotlinIrEmitter$emitShared$lambda(element, transformer) {
|
|
|
416
415
|
}
|
|
417
416
|
}
|
|
418
417
|
var _destruct__k2r9zo = new Pair(first, second);
|
|
419
|
-
var packageElements = _destruct__k2r9zo.
|
|
420
|
-
var rest = _destruct__k2r9zo.
|
|
421
|
-
tmp = element.
|
|
418
|
+
var packageElements = _destruct__k2r9zo.ve();
|
|
419
|
+
var rest = _destruct__k2r9zo.we();
|
|
420
|
+
tmp = element.bv(VOID, plus_0(plus(packageElements, import_0('kotlin.reflect', 'KType')), rest));
|
|
422
421
|
} else {
|
|
423
422
|
tmp = element;
|
|
424
423
|
}
|
|
425
424
|
var transformed = tmp;
|
|
426
425
|
return transformChildren_0(transformed, transformer);
|
|
427
426
|
}
|
|
428
|
-
function
|
|
427
|
+
function KotlinEmitter$emitShared$lambda_0($clientServer) {
|
|
429
428
|
return function (element, transformer) {
|
|
430
429
|
var tmp;
|
|
431
430
|
if (element instanceof Namespace) {
|
|
432
|
-
var injected = element.
|
|
431
|
+
var injected = element.dv_1.equals(Companion_getInstance().mt('Wirespec')) ? $clientServer : emptyList();
|
|
433
432
|
var tmp_0;
|
|
434
433
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
435
434
|
if (!injected.r()) {
|
|
436
|
-
// Inline function 'community.flock.wirespec.
|
|
437
|
-
var elements = plus_0(element.
|
|
435
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.withElements' call
|
|
436
|
+
var elements = plus_0(element.zu(), injected);
|
|
438
437
|
var tmp_1;
|
|
439
438
|
if (element instanceof File) {
|
|
440
|
-
tmp_1 = element.
|
|
439
|
+
tmp_1 = element.bv(VOID, elements);
|
|
441
440
|
} else {
|
|
442
441
|
if (element instanceof Struct) {
|
|
443
|
-
tmp_1 = element.
|
|
442
|
+
tmp_1 = element.ix(VOID, VOID, VOID, VOID, elements);
|
|
444
443
|
} else {
|
|
445
444
|
if (element instanceof Namespace) {
|
|
446
|
-
tmp_1 = element.
|
|
445
|
+
tmp_1 = element.iv(VOID, elements);
|
|
447
446
|
} else {
|
|
448
447
|
if (element instanceof Interface) {
|
|
449
|
-
tmp_1 = element.
|
|
448
|
+
tmp_1 = element.rv(VOID, elements);
|
|
450
449
|
} else {
|
|
451
450
|
if (element instanceof Enum) {
|
|
452
|
-
tmp_1 = element.
|
|
451
|
+
tmp_1 = element.ww(VOID, VOID, VOID, VOID, VOID, elements);
|
|
453
452
|
} else {
|
|
454
453
|
if (element instanceof Main) {
|
|
455
454
|
tmp_1 = element;
|
|
@@ -474,38 +473,38 @@ function KotlinIrEmitter$emitShared$lambda_0($clientServer) {
|
|
|
474
473
|
return transformChildren_0(transformed, transformer);
|
|
475
474
|
};
|
|
476
475
|
}
|
|
477
|
-
function
|
|
476
|
+
function KotlinEmitter$withExplicitVisibility$lambda(element, transformer) {
|
|
478
477
|
var tmp;
|
|
479
478
|
if (isInterface(element, Element)) {
|
|
480
479
|
var tmp_0;
|
|
481
480
|
if (element instanceof Namespace) {
|
|
482
|
-
tmp_0 = element.
|
|
481
|
+
tmp_0 = element.iv(VOID, VOID, VOID, Visibility_PUBLIC_getInstance());
|
|
483
482
|
} else {
|
|
484
483
|
if (element instanceof Interface) {
|
|
485
484
|
var tmp2_visibility = Visibility_PUBLIC_getInstance();
|
|
486
485
|
// Inline function 'kotlin.collections.map' call
|
|
487
|
-
var this_0 = element.
|
|
486
|
+
var this_0 = element.ov_1;
|
|
488
487
|
// Inline function 'kotlin.collections.mapTo' call
|
|
489
488
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
490
489
|
var _iterator__ex2g4s = this_0.t();
|
|
491
490
|
while (_iterator__ex2g4s.u()) {
|
|
492
491
|
var item = _iterator__ex2g4s.v();
|
|
493
|
-
var tmp$ret$
|
|
494
|
-
destination.x(tmp$ret$
|
|
492
|
+
var tmp$ret$3 = item.cw(VOID, VOID, VOID, VOID, Visibility_PUBLIC_getInstance());
|
|
493
|
+
destination.x(tmp$ret$3);
|
|
495
494
|
}
|
|
496
|
-
tmp_0 = element.
|
|
495
|
+
tmp_0 = element.rv(VOID, VOID, VOID, VOID, VOID, destination, tmp2_visibility);
|
|
497
496
|
} else {
|
|
498
497
|
if (element instanceof Union) {
|
|
499
|
-
tmp_0 = element.
|
|
498
|
+
tmp_0 = element.jw(VOID, VOID, VOID, VOID, Visibility_PUBLIC_getInstance());
|
|
500
499
|
} else {
|
|
501
500
|
if (element instanceof Enum) {
|
|
502
|
-
tmp_0 = element.
|
|
501
|
+
tmp_0 = element.ww(VOID, VOID, VOID, VOID, VOID, VOID, Visibility_PUBLIC_getInstance());
|
|
503
502
|
} else {
|
|
504
503
|
if (element instanceof Struct) {
|
|
505
|
-
tmp_0 = element.
|
|
504
|
+
tmp_0 = element.ix(VOID, VOID, VOID, VOID, VOID, VOID, Visibility_PUBLIC_getInstance());
|
|
506
505
|
} else {
|
|
507
506
|
if (element instanceof Function) {
|
|
508
|
-
tmp_0 = element.
|
|
507
|
+
tmp_0 = element.vx(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, Visibility_PUBLIC_getInstance());
|
|
509
508
|
} else {
|
|
510
509
|
tmp_0 = element;
|
|
511
510
|
}
|
|
@@ -521,101 +520,110 @@ function KotlinIrEmitter$withExplicitVisibility$lambda(element, transformer) {
|
|
|
521
520
|
var transformed = tmp;
|
|
522
521
|
return transformChildren_0(transformed, transformer);
|
|
523
522
|
}
|
|
524
|
-
function
|
|
523
|
+
function KotlinEmitter$emitGenerator$lambda(it) {
|
|
525
524
|
return startsWith(it, 'Wirespec.') || it === 'Wirespec';
|
|
526
525
|
}
|
|
527
|
-
function
|
|
526
|
+
function KotlinEmitter$emitGenerator$lambda_0($generatorOwnName) {
|
|
528
527
|
return function (it) {
|
|
529
528
|
return it === $generatorOwnName;
|
|
530
529
|
};
|
|
531
530
|
}
|
|
532
|
-
function
|
|
531
|
+
function KotlinEmitter$emitGenerator$lambda_1(it) {
|
|
533
532
|
return substringBefore(it, _Char___init__impl__6a9atx(60));
|
|
534
533
|
}
|
|
535
|
-
function
|
|
534
|
+
function KotlinEmitter$emitGenerator$lambda_2(this$0) {
|
|
536
535
|
return function (it) {
|
|
537
|
-
return import_0(this$0.
|
|
536
|
+
return import_0(this$0.f1z().rs_1 + '.model', it);
|
|
538
537
|
};
|
|
539
538
|
}
|
|
540
|
-
function
|
|
539
|
+
function KotlinEmitter$emit$lambda(this$0) {
|
|
541
540
|
return function (it) {
|
|
542
541
|
return sanitizeEnum(this$0, it);
|
|
543
542
|
};
|
|
544
543
|
}
|
|
545
|
-
function
|
|
544
|
+
function KotlinEmitter$emit$lambda_0(this$0) {
|
|
545
|
+
return function (it) {
|
|
546
|
+
return sanitizeEnum(this$0, it);
|
|
547
|
+
};
|
|
548
|
+
}
|
|
549
|
+
function KotlinEmitter(packageName, emitShared) {
|
|
546
550
|
Companion_getInstance_0();
|
|
547
|
-
packageName = packageName === VOID ? Companion_instance_0.
|
|
548
|
-
emitShared = emitShared === VOID ? Companion_instance_1.
|
|
549
|
-
this.
|
|
550
|
-
this.
|
|
551
|
-
this.
|
|
552
|
-
this.
|
|
553
|
-
this.
|
|
551
|
+
packageName = packageName === VOID ? Companion_instance_0.qs('community.flock.wirespec.generated') : packageName;
|
|
552
|
+
emitShared = emitShared === VOID ? Companion_instance_1.xp() : emitShared;
|
|
553
|
+
this.g1z_1 = packageName;
|
|
554
|
+
this.h1z_1 = emitShared;
|
|
555
|
+
this.i1z_1 = KotlinGenerator_getInstance();
|
|
556
|
+
this.j1z_1 = FileExtension_Kotlin_getInstance();
|
|
557
|
+
this.k1z_1 = true;
|
|
558
|
+
this.l1z_1 = listOf_0([import_0('community.flock.wirespec.kotlin', 'Wirespec'), import_0('kotlin.reflect', 'typeOf')]);
|
|
554
559
|
var tmp = this;
|
|
555
|
-
tmp.
|
|
560
|
+
tmp.m1z_1 = lazy(KotlinEmitter$sanitizationConfig$delegate$lambda(this));
|
|
556
561
|
var tmp_0 = this;
|
|
557
|
-
tmp_0.
|
|
562
|
+
tmp_0.n1z_1 = lazy(KotlinEmitter$modelSanitizationConfig$delegate$lambda(this));
|
|
558
563
|
}
|
|
559
|
-
protoOf(
|
|
560
|
-
return this.
|
|
564
|
+
protoOf(KotlinEmitter).f1z = function () {
|
|
565
|
+
return this.g1z_1;
|
|
561
566
|
};
|
|
562
|
-
protoOf(
|
|
563
|
-
return this.
|
|
567
|
+
protoOf(KotlinEmitter).x19 = function () {
|
|
568
|
+
return this.i1z_1;
|
|
564
569
|
};
|
|
565
|
-
protoOf(
|
|
566
|
-
return this.
|
|
570
|
+
protoOf(KotlinEmitter).op = function () {
|
|
571
|
+
return this.j1z_1;
|
|
567
572
|
};
|
|
568
|
-
protoOf(
|
|
569
|
-
|
|
573
|
+
protoOf(KotlinEmitter).np = function () {
|
|
574
|
+
return this.k1z_1;
|
|
575
|
+
};
|
|
576
|
+
protoOf(KotlinEmitter).s19 = function () {
|
|
577
|
+
var packageName = Companion_instance_0.qs('community.flock.wirespec.kotlin');
|
|
570
578
|
var clientServer = convertClientServer();
|
|
571
|
-
// Inline function 'community.flock.wirespec.
|
|
579
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
572
580
|
var this_0 = convert(packageName);
|
|
573
581
|
var scope = new TransformScope(this_0);
|
|
574
|
-
// Inline function 'community.flock.wirespec.
|
|
582
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
575
583
|
var tmp = scope;
|
|
576
|
-
// Inline function 'community.flock.wirespec.
|
|
577
|
-
var this_1 = scope.
|
|
578
|
-
// Inline function 'community.flock.wirespec.
|
|
584
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
585
|
+
var this_1 = scope.k17_1;
|
|
586
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
579
587
|
// Inline function 'kotlin.apply' call
|
|
580
588
|
var this_2 = new TransformerBuilder();
|
|
581
|
-
this_2.
|
|
582
|
-
var tmp$ret$
|
|
583
|
-
tmp.
|
|
584
|
-
// Inline function 'community.flock.wirespec.
|
|
589
|
+
this_2.e18(KotlinEmitter$emitShared$lambda);
|
|
590
|
+
var tmp$ret$4 = this_2.z17();
|
|
591
|
+
tmp.k17_1 = transform(this_1, tmp$ret$4);
|
|
592
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.injectAfter' call
|
|
585
593
|
var tmp_0 = scope;
|
|
586
|
-
// Inline function 'community.flock.wirespec.
|
|
587
|
-
// Inline function 'community.flock.wirespec.
|
|
588
|
-
var this_3 = scope.
|
|
589
|
-
// Inline function 'community.flock.wirespec.
|
|
594
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.injectAfter' call
|
|
595
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
596
|
+
var this_3 = scope.k17_1;
|
|
597
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
590
598
|
// Inline function 'kotlin.apply' call
|
|
591
599
|
var this_4 = new TransformerBuilder();
|
|
592
|
-
this_4.
|
|
593
|
-
var tmp$ret$
|
|
594
|
-
tmp_0.
|
|
595
|
-
var tmp_1 = scope.
|
|
600
|
+
this_4.e18(KotlinEmitter$emitShared$lambda_0(clientServer));
|
|
601
|
+
var tmp$ret$10 = this_4.z17();
|
|
602
|
+
tmp_0.k17_1 = transform(this_3, tmp$ret$10);
|
|
603
|
+
var tmp_1 = scope.k17_1;
|
|
596
604
|
var wirespecShared = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
597
605
|
var tmp_2;
|
|
598
|
-
if (this.
|
|
606
|
+
if (this.h1z_1.yp_1) {
|
|
599
607
|
tmp_2 = withExplicitVisibility(this, wirespecShared);
|
|
600
608
|
} else {
|
|
601
609
|
tmp_2 = null;
|
|
602
610
|
}
|
|
603
611
|
return tmp_2;
|
|
604
612
|
};
|
|
605
|
-
protoOf(
|
|
613
|
+
protoOf(KotlinEmitter).sr = function (definition, module_0, logger) {
|
|
606
614
|
var file = emit.call(this, definition, module_0, logger);
|
|
607
615
|
// Inline function 'kotlin.takeIf' call
|
|
608
|
-
var this_0 = this.
|
|
616
|
+
var this_0 = this.l1z_1;
|
|
609
617
|
var tmp;
|
|
610
|
-
if (Companion_instance.
|
|
618
|
+
if (Companion_instance.pr(module_0)) {
|
|
611
619
|
tmp = this_0;
|
|
612
620
|
} else {
|
|
613
621
|
tmp = null;
|
|
614
622
|
}
|
|
615
|
-
var tmp$ret$
|
|
616
|
-
return placeInPackage(prependImports(file, tmp$ret$
|
|
623
|
+
var tmp$ret$0 = tmp;
|
|
624
|
+
return placeInPackage(prependImports(file, tmp$ret$0), this.f1z(), definition);
|
|
617
625
|
};
|
|
618
|
-
protoOf(
|
|
626
|
+
protoOf(KotlinEmitter).a1a = function (definition, module_0) {
|
|
619
627
|
var tmp;
|
|
620
628
|
if (definition instanceof Type) {
|
|
621
629
|
tmp = convertToGenerator_2(definition, module_0);
|
|
@@ -636,29 +644,30 @@ protoOf(KotlinIrEmitter).w1w = function (definition, module_0) {
|
|
|
636
644
|
}
|
|
637
645
|
var generatorFile = tmp;
|
|
638
646
|
var sanitized = sanitizeNames(generatorFile, _get_sanitizationConfig__sns434(this));
|
|
639
|
-
var generatorOwnName = definition.
|
|
647
|
+
var generatorOwnName = definition.tr().m1() + 'Generator';
|
|
640
648
|
var tmp_0 = asSequence(collectCustomTypeNames(sanitized));
|
|
641
|
-
var tmp_1 = filterNot(tmp_0,
|
|
642
|
-
var tmp_2 = filterNot(tmp_1,
|
|
643
|
-
var tmp_3 = distinct(map(tmp_2,
|
|
644
|
-
var modelImports = toList(map(tmp_3,
|
|
645
|
-
return placeInPackage_0(prependImports(sanitized, plus_0(this.
|
|
649
|
+
var tmp_1 = filterNot(tmp_0, KotlinEmitter$emitGenerator$lambda);
|
|
650
|
+
var tmp_2 = filterNot(tmp_1, KotlinEmitter$emitGenerator$lambda_0(generatorOwnName));
|
|
651
|
+
var tmp_3 = distinct(map(tmp_2, KotlinEmitter$emitGenerator$lambda_1));
|
|
652
|
+
var modelImports = toList(map(tmp_3, KotlinEmitter$emitGenerator$lambda_2(this)));
|
|
653
|
+
return placeInPackage_0(prependImports(sanitized, plus_0(this.l1z_1, modelImports)), this.f1z(), 'generator');
|
|
646
654
|
};
|
|
647
|
-
protoOf(
|
|
648
|
-
|
|
655
|
+
protoOf(KotlinEmitter).ks = function (type, module_0) {
|
|
656
|
+
var tmp = sanitizeNames(convertWithValidation(type, module_0), _get_modelSanitizationConfig__vgg831(this));
|
|
657
|
+
return ensureEmptyStructHasConstructor(sanitizeEnumDefaults(tmp, KotlinEmitter$emit$lambda(this)));
|
|
649
658
|
};
|
|
650
|
-
protoOf(
|
|
659
|
+
protoOf(KotlinEmitter).is = function (enum_0, module_0) {
|
|
651
660
|
var tmp = sanitizeNames(convert_0(enum_0), _get_sanitizationConfig__sns434(this));
|
|
652
|
-
return injectEnumLabelField(tmp,
|
|
661
|
+
return injectEnumLabelField(tmp, KotlinEmitter$emit$lambda_0(this));
|
|
653
662
|
};
|
|
654
|
-
protoOf(
|
|
663
|
+
protoOf(KotlinEmitter).yr = function (union) {
|
|
655
664
|
return sanitizeNames(convert_1(union), _get_sanitizationConfig__sns434(this));
|
|
656
665
|
};
|
|
657
|
-
protoOf(
|
|
666
|
+
protoOf(KotlinEmitter).ds = function (refined) {
|
|
658
667
|
var file = sanitizeNames(convert_2(refined), _get_sanitizationConfig__sns434(this));
|
|
659
|
-
// Inline function 'community.flock.wirespec.
|
|
668
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.findElement' call
|
|
660
669
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
661
|
-
var tmp0 = file.
|
|
670
|
+
var tmp0 = file.zu();
|
|
662
671
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
663
672
|
var destination = ArrayList_init_$Create$_0();
|
|
664
673
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -670,13 +679,13 @@ protoOf(KotlinIrEmitter).vr = function (refined) {
|
|
|
670
679
|
}
|
|
671
680
|
var tmp0_safe_receiver = firstOrNull_0(destination);
|
|
672
681
|
var updatedStruct = tmp0_safe_receiver == null ? null : markMembersAsOverride(tmp0_safe_receiver);
|
|
673
|
-
return new File(Companion_getInstance().
|
|
682
|
+
return new File(Companion_getInstance().mt(sanitize(this, refined.bs_1)), listOfNotNull(updatedStruct));
|
|
674
683
|
};
|
|
675
|
-
protoOf(
|
|
676
|
-
var imports = buildModelImports(endpoint, this.
|
|
677
|
-
// Inline function 'community.flock.wirespec.
|
|
684
|
+
protoOf(KotlinEmitter).js = function (endpoint) {
|
|
685
|
+
var imports = buildModelImports(endpoint, this.f1z());
|
|
686
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.findElement' call
|
|
678
687
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
679
|
-
var tmp0 = convert_3(endpoint).
|
|
688
|
+
var tmp0 = convert_3(endpoint).zu();
|
|
680
689
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
681
690
|
var destination = ArrayList_init_$Create$_0();
|
|
682
691
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -686,10 +695,10 @@ protoOf(KotlinIrEmitter).bs = function (endpoint) {
|
|
|
686
695
|
destination.x(element);
|
|
687
696
|
}
|
|
688
697
|
}
|
|
689
|
-
var tmp$ret$
|
|
690
|
-
var endpointNamespace = ensureNotNull(tmp$ret$
|
|
691
|
-
var body =
|
|
692
|
-
var tmp = sanitizeNames(new File(Companion_getInstance().
|
|
698
|
+
var tmp$ret$0 = firstOrNull_0(destination);
|
|
699
|
+
var endpointNamespace = ensureNotNull(tmp$ret$0);
|
|
700
|
+
var body = injectApiObject(endpointNamespace, endpoint);
|
|
701
|
+
var tmp = sanitizeNames(new File(Companion_getInstance().mt(sanitize(this, endpoint.vq_1)), listOf(body)), _get_sanitizationConfig__sns434(this));
|
|
693
702
|
// Inline function 'kotlin.takeIf' call
|
|
694
703
|
var tmp_0;
|
|
695
704
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
@@ -698,13 +707,13 @@ protoOf(KotlinIrEmitter).bs = function (endpoint) {
|
|
|
698
707
|
} else {
|
|
699
708
|
tmp_0 = null;
|
|
700
709
|
}
|
|
701
|
-
var tmp$ret$
|
|
702
|
-
return prependImports(tmp, tmp$ret$
|
|
710
|
+
var tmp$ret$3 = tmp_0;
|
|
711
|
+
return prependImports(tmp, tmp$ret$3);
|
|
703
712
|
};
|
|
704
|
-
protoOf(
|
|
713
|
+
protoOf(KotlinEmitter).xr = function (channel) {
|
|
705
714
|
var tmp = sanitizeNames(convert_4(channel), _get_sanitizationConfig__sns434(this));
|
|
706
715
|
// Inline function 'kotlin.takeIf' call
|
|
707
|
-
var this_0 = buildModelImports(channel, this.
|
|
716
|
+
var this_0 = buildModelImports(channel, this.f1z());
|
|
708
717
|
var tmp_0;
|
|
709
718
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
710
719
|
if (!this_0.r()) {
|
|
@@ -712,13 +721,13 @@ protoOf(KotlinIrEmitter).pr = function (channel) {
|
|
|
712
721
|
} else {
|
|
713
722
|
tmp_0 = null;
|
|
714
723
|
}
|
|
715
|
-
var tmp$ret$
|
|
716
|
-
return prependImports(tmp, tmp$ret$
|
|
724
|
+
var tmp$ret$0 = tmp_0;
|
|
725
|
+
return prependImports(tmp, tmp$ret$0);
|
|
717
726
|
};
|
|
718
|
-
protoOf(
|
|
727
|
+
protoOf(KotlinEmitter).wr = function (rpc) {
|
|
719
728
|
var tmp = sanitizeNames(convert_5(rpc), _get_sanitizationConfig__sns434(this));
|
|
720
729
|
// Inline function 'kotlin.takeIf' call
|
|
721
|
-
var this_0 = buildModelImports(rpc, this.
|
|
730
|
+
var this_0 = buildModelImports(rpc, this.f1z());
|
|
722
731
|
var tmp_0;
|
|
723
732
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
724
733
|
if (!this_0.r()) {
|
|
@@ -726,28 +735,28 @@ protoOf(KotlinIrEmitter).or = function (rpc) {
|
|
|
726
735
|
} else {
|
|
727
736
|
tmp_0 = null;
|
|
728
737
|
}
|
|
729
|
-
var tmp$ret$
|
|
730
|
-
return prependImports(tmp, tmp$ret$
|
|
738
|
+
var tmp$ret$0 = tmp_0;
|
|
739
|
+
return prependImports(tmp, tmp$ret$0);
|
|
731
740
|
};
|
|
732
|
-
protoOf(
|
|
733
|
-
var imports = buildModelImports(endpoint, this.
|
|
734
|
-
var endpointImport = import_0(this.
|
|
741
|
+
protoOf(KotlinEmitter).z19 = function (endpoint) {
|
|
742
|
+
var imports = buildModelImports(endpoint, this.f1z());
|
|
743
|
+
var endpointImport = import_0(this.f1z().rs_1 + '.endpoint', endpoint.vq_1.m1());
|
|
735
744
|
var file = sanitizeNames(emitEndpointClient.call(this, endpoint), _get_sanitizationConfig__sns434(this));
|
|
736
|
-
var subPackageName = plus_1(this.
|
|
737
|
-
var tmp = Companion_getInstance().
|
|
745
|
+
var subPackageName = plus_1(this.f1z(), 'client');
|
|
746
|
+
var tmp = Companion_getInstance().mt(subPackageName.ts() + file.xu_1.pt());
|
|
738
747
|
// Inline function 'kotlin.collections.buildList' call
|
|
739
748
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
740
749
|
// Inline function 'kotlin.apply' call
|
|
741
750
|
var this_0 = ArrayList_init_$Create$_0();
|
|
742
|
-
this_0.x(new Package(subPackageName.
|
|
743
|
-
this_0.g1(this.
|
|
751
|
+
this_0.x(new Package(subPackageName.rs_1));
|
|
752
|
+
this_0.g1(this.l1z_1);
|
|
744
753
|
this_0.g1(imports);
|
|
745
754
|
this_0.x(endpointImport);
|
|
746
|
-
this_0.g1(file.
|
|
747
|
-
var tmp$ret$
|
|
748
|
-
return new File(tmp, tmp$ret$
|
|
755
|
+
this_0.g1(file.yu_1);
|
|
756
|
+
var tmp$ret$0 = this_0.p5();
|
|
757
|
+
return new File(tmp, tmp$ret$0);
|
|
749
758
|
};
|
|
750
|
-
protoOf(
|
|
759
|
+
protoOf(KotlinEmitter).t19 = function (endpoints, logger) {
|
|
751
760
|
// Inline function 'kotlin.collections.flatMap' call
|
|
752
761
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
753
762
|
var destination = ArrayList_init_$Create$_0();
|
|
@@ -763,7 +772,7 @@ protoOf(KotlinIrEmitter).s1w = function (endpoints, logger) {
|
|
|
763
772
|
var _iterator__ex2g4s_0 = destination.t();
|
|
764
773
|
while (_iterator__ex2g4s_0.u()) {
|
|
765
774
|
var e = _iterator__ex2g4s_0.v();
|
|
766
|
-
var key = e.
|
|
775
|
+
var key = e.h18_1;
|
|
767
776
|
if (set.x(key)) {
|
|
768
777
|
list_0.x(e);
|
|
769
778
|
}
|
|
@@ -774,8 +783,8 @@ protoOf(KotlinIrEmitter).s1w = function (endpoints, logger) {
|
|
|
774
783
|
var _iterator__ex2g4s_1 = list_0.t();
|
|
775
784
|
while (_iterator__ex2g4s_1.u()) {
|
|
776
785
|
var item = _iterator__ex2g4s_1.v();
|
|
777
|
-
var tmp$ret$
|
|
778
|
-
destination_0.x(tmp$ret$
|
|
786
|
+
var tmp$ret$7 = import_0(this.f1z().rs_1 + '.model', item.h18_1);
|
|
787
|
+
destination_0.x(tmp$ret$7);
|
|
779
788
|
}
|
|
780
789
|
var imports = destination_0;
|
|
781
790
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -784,8 +793,8 @@ protoOf(KotlinIrEmitter).s1w = function (endpoints, logger) {
|
|
|
784
793
|
var _iterator__ex2g4s_2 = endpoints.t();
|
|
785
794
|
while (_iterator__ex2g4s_2.u()) {
|
|
786
795
|
var item_0 = _iterator__ex2g4s_2.v();
|
|
787
|
-
var tmp$ret$
|
|
788
|
-
destination_1.x(tmp$ret$
|
|
796
|
+
var tmp$ret$10 = import_0(this.f1z().rs_1 + '.endpoint', item_0.vq_1.m1());
|
|
797
|
+
destination_1.x(tmp$ret$10);
|
|
789
798
|
}
|
|
790
799
|
var endpointImports = destination_1;
|
|
791
800
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -794,23 +803,23 @@ protoOf(KotlinIrEmitter).s1w = function (endpoints, logger) {
|
|
|
794
803
|
var _iterator__ex2g4s_3 = endpoints.t();
|
|
795
804
|
while (_iterator__ex2g4s_3.u()) {
|
|
796
805
|
var item_1 = _iterator__ex2g4s_3.v();
|
|
797
|
-
var tmp$ret$
|
|
798
|
-
destination_2.x(tmp$ret$
|
|
806
|
+
var tmp$ret$13 = import_0(this.f1z().rs_1 + '.client', item_1.vq_1.m1() + 'Client');
|
|
807
|
+
destination_2.x(tmp$ret$13);
|
|
799
808
|
}
|
|
800
809
|
var clientImports = destination_2;
|
|
801
810
|
var allImports = plus_0(plus_0(imports, endpointImports), clientImports);
|
|
802
811
|
var file = sanitizeNames(emitClient.call(this, endpoints, logger), _get_sanitizationConfig__sns434(this));
|
|
803
|
-
var tmp = Companion_getInstance().
|
|
812
|
+
var tmp = Companion_getInstance().mt(this.f1z().ts() + file.xu_1.pt());
|
|
804
813
|
// Inline function 'kotlin.collections.buildList' call
|
|
805
814
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
806
815
|
// Inline function 'kotlin.apply' call
|
|
807
816
|
var this_0 = ArrayList_init_$Create$_0();
|
|
808
|
-
this_0.x(new Package(this.
|
|
809
|
-
this_0.g1(this.
|
|
817
|
+
this_0.x(new Package(this.f1z().rs_1));
|
|
818
|
+
this_0.g1(this.l1z_1);
|
|
810
819
|
this_0.g1(allImports);
|
|
811
|
-
this_0.g1(file.
|
|
812
|
-
var tmp$ret$
|
|
813
|
-
return new File(tmp, tmp$ret$
|
|
820
|
+
this_0.g1(file.yu_1);
|
|
821
|
+
var tmp$ret$14 = this_0.p5();
|
|
822
|
+
return new File(tmp, tmp$ret$14);
|
|
814
823
|
};
|
|
815
824
|
function buildModelImports(_this__u8e3s4, packageName) {
|
|
816
825
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
@@ -820,7 +829,7 @@ function buildModelImports(_this__u8e3s4, packageName) {
|
|
|
820
829
|
var _iterator__ex2g4s = this_0.t();
|
|
821
830
|
while (_iterator__ex2g4s.u()) {
|
|
822
831
|
var e = _iterator__ex2g4s.v();
|
|
823
|
-
var key = e.
|
|
832
|
+
var key = e.h18_1;
|
|
824
833
|
if (set.x(key)) {
|
|
825
834
|
list.x(e);
|
|
826
835
|
}
|
|
@@ -831,123 +840,59 @@ function buildModelImports(_this__u8e3s4, packageName) {
|
|
|
831
840
|
var _iterator__ex2g4s_0 = list.t();
|
|
832
841
|
while (_iterator__ex2g4s_0.u()) {
|
|
833
842
|
var item = _iterator__ex2g4s_0.v();
|
|
834
|
-
var tmp$ret$
|
|
835
|
-
destination.x(tmp$ret$
|
|
843
|
+
var tmp$ret$4 = import_0(packageName.rs_1 + '.model', Companion_getInstance().mt(item.h18_1).pt());
|
|
844
|
+
destination.x(tmp$ret$4);
|
|
836
845
|
}
|
|
837
846
|
return destination;
|
|
838
847
|
}
|
|
839
|
-
function
|
|
840
|
-
// Inline function 'community.flock.wirespec.
|
|
848
|
+
function injectApiObject(_this__u8e3s4, endpoint) {
|
|
849
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
841
850
|
var scope = new TransformScope(_this__u8e3s4);
|
|
842
|
-
// Inline function 'community.flock.wirespec.
|
|
851
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.injectAfter' call
|
|
843
852
|
var tmp = scope;
|
|
844
|
-
// Inline function 'community.flock.wirespec.
|
|
845
|
-
// Inline function 'community.flock.wirespec.
|
|
846
|
-
var this_0 = scope.
|
|
847
|
-
// Inline function 'community.flock.wirespec.
|
|
853
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.injectAfter' call
|
|
854
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
855
|
+
var this_0 = scope.k17_1;
|
|
856
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
848
857
|
// Inline function 'kotlin.apply' call
|
|
849
858
|
var this_1 = new TransformerBuilder();
|
|
850
|
-
this_1.
|
|
851
|
-
var tmp$ret$
|
|
852
|
-
tmp.
|
|
853
|
-
var tmp_0 = scope.
|
|
859
|
+
this_1.e18(injectApiObject$lambda(endpoint));
|
|
860
|
+
var tmp$ret$5 = this_1.z17();
|
|
861
|
+
tmp.k17_1 = transform(this_0, tmp$ret$5);
|
|
862
|
+
var tmp_0 = scope.k17_1;
|
|
854
863
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
855
864
|
}
|
|
856
|
-
function
|
|
857
|
-
|
|
858
|
-
var scope = new TransformScope(_this__u8e3s4);
|
|
859
|
-
// Inline function 'community.flock.wirespec.ir.core.TransformScope.injectAfter' call
|
|
860
|
-
var tmp = scope;
|
|
861
|
-
// Inline function 'community.flock.wirespec.ir.core.injectAfter' call
|
|
862
|
-
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
863
|
-
var this_0 = scope.a1w_1;
|
|
864
|
-
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
865
|
-
// Inline function 'kotlin.apply' call
|
|
866
|
-
var this_1 = new TransformerBuilder();
|
|
867
|
-
this_1.u1i(injectCompanionObject$lambda(endpoint));
|
|
868
|
-
var tmp$ret$2 = this_1.v1i();
|
|
869
|
-
tmp.a1w_1 = transform(this_0, tmp$ret$2);
|
|
870
|
-
var tmp_0 = scope.a1w_1;
|
|
871
|
-
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
872
|
-
}
|
|
873
|
-
function buildCompanionObject(endpoint) {
|
|
874
|
-
var pathTemplate = '/' + joinToString(endpoint.mq_1, '/', VOID, VOID, VOID, VOID, buildCompanionObject$lambda);
|
|
865
|
+
function buildApiObject(endpoint) {
|
|
866
|
+
var pathTemplate = '/' + joinToString(endpoint.xq_1, '/', VOID, VOID, VOID, VOID, buildApiObject$lambda);
|
|
875
867
|
// Inline function 'kotlin.let' call
|
|
876
|
-
var p0 = trimMargin('\n |
|
|
868
|
+
var p0 = trimMargin('\n |object api : Wirespec.Server<Request, Response<*>>, Wirespec.Client<Request, Response<*>> {\n | override val pathTemplate = "' + pathTemplate + '"\n | override val method = "' + endpoint.wq_1.toString() + '"\n | override fun server(serialization: Wirespec.Serialization) = object : Wirespec.ServerEdge<Request, Response<*>> {\n | override fun from(request: Wirespec.RawRequest) = fromRawRequest(serialization, request)\n | override fun to(response: Response<*>) = toRawResponse(serialization, response)\n | }\n | override fun client(serialization: Wirespec.Serialization) = object : Wirespec.ClientEdge<Request, Response<*>> {\n | override fun to(request: Request) = toRawRequest(serialization, request)\n | override fun from(response: Wirespec.RawResponse) = fromRawResponse(serialization, response)\n | }\n |}\n ');
|
|
877
869
|
return raw(p0);
|
|
878
870
|
}
|
|
879
|
-
function
|
|
880
|
-
var tmp;
|
|
881
|
-
if (element instanceof Namespace) {
|
|
882
|
-
var injected = listOf(raw('val api = Handler'));
|
|
883
|
-
var tmp_0;
|
|
884
|
-
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
885
|
-
if (!injected.r()) {
|
|
886
|
-
// Inline function 'community.flock.wirespec.ir.core.withElements' call
|
|
887
|
-
var elements = plus_0(element.e1o(), injected);
|
|
888
|
-
var tmp_1;
|
|
889
|
-
if (element instanceof File) {
|
|
890
|
-
tmp_1 = element.g1o(VOID, elements);
|
|
891
|
-
} else {
|
|
892
|
-
if (element instanceof Struct) {
|
|
893
|
-
tmp_1 = element.n1q(VOID, VOID, VOID, VOID, elements);
|
|
894
|
-
} else {
|
|
895
|
-
if (element instanceof Namespace) {
|
|
896
|
-
tmp_1 = element.n1o(VOID, elements);
|
|
897
|
-
} else {
|
|
898
|
-
if (element instanceof Interface) {
|
|
899
|
-
tmp_1 = element.w1o(VOID, elements);
|
|
900
|
-
} else {
|
|
901
|
-
if (element instanceof Enum) {
|
|
902
|
-
tmp_1 = element.b1q(VOID, VOID, VOID, VOID, VOID, elements);
|
|
903
|
-
} else {
|
|
904
|
-
if (element instanceof Main) {
|
|
905
|
-
tmp_1 = element;
|
|
906
|
-
} else {
|
|
907
|
-
tmp_1 = element;
|
|
908
|
-
}
|
|
909
|
-
}
|
|
910
|
-
}
|
|
911
|
-
}
|
|
912
|
-
}
|
|
913
|
-
}
|
|
914
|
-
var tmp_2 = tmp_1;
|
|
915
|
-
tmp_0 = tmp_2 instanceof Namespace ? tmp_2 : THROW_CCE();
|
|
916
|
-
} else {
|
|
917
|
-
tmp_0 = element;
|
|
918
|
-
}
|
|
919
|
-
tmp = tmp_0;
|
|
920
|
-
} else {
|
|
921
|
-
tmp = element;
|
|
922
|
-
}
|
|
923
|
-
var transformed = tmp;
|
|
924
|
-
return transformChildren_0(transformed, transformer);
|
|
925
|
-
}
|
|
926
|
-
function injectCompanionObject$lambda($endpoint) {
|
|
871
|
+
function injectApiObject$lambda($endpoint) {
|
|
927
872
|
return function (element, transformer) {
|
|
928
873
|
var tmp;
|
|
929
|
-
if (element instanceof
|
|
930
|
-
var injected =
|
|
874
|
+
if (element instanceof Namespace) {
|
|
875
|
+
var injected = listOf(buildApiObject($endpoint));
|
|
931
876
|
var tmp_0;
|
|
932
877
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
933
878
|
if (!injected.r()) {
|
|
934
|
-
// Inline function 'community.flock.wirespec.
|
|
935
|
-
var elements = plus_0(element.
|
|
879
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.withElements' call
|
|
880
|
+
var elements = plus_0(element.zu(), injected);
|
|
936
881
|
var tmp_1;
|
|
937
882
|
if (element instanceof File) {
|
|
938
|
-
tmp_1 = element.
|
|
883
|
+
tmp_1 = element.bv(VOID, elements);
|
|
939
884
|
} else {
|
|
940
885
|
if (element instanceof Struct) {
|
|
941
|
-
tmp_1 = element.
|
|
886
|
+
tmp_1 = element.ix(VOID, VOID, VOID, VOID, elements);
|
|
942
887
|
} else {
|
|
943
888
|
if (element instanceof Namespace) {
|
|
944
|
-
tmp_1 = element.
|
|
889
|
+
tmp_1 = element.iv(VOID, elements);
|
|
945
890
|
} else {
|
|
946
891
|
if (element instanceof Interface) {
|
|
947
|
-
tmp_1 = element.
|
|
892
|
+
tmp_1 = element.rv(VOID, elements);
|
|
948
893
|
} else {
|
|
949
894
|
if (element instanceof Enum) {
|
|
950
|
-
tmp_1 = element.
|
|
895
|
+
tmp_1 = element.ww(VOID, VOID, VOID, VOID, VOID, elements);
|
|
951
896
|
} else {
|
|
952
897
|
if (element instanceof Main) {
|
|
953
898
|
tmp_1 = element;
|
|
@@ -960,7 +905,7 @@ function injectCompanionObject$lambda($endpoint) {
|
|
|
960
905
|
}
|
|
961
906
|
}
|
|
962
907
|
var tmp_2 = tmp_1;
|
|
963
|
-
tmp_0 = tmp_2 instanceof
|
|
908
|
+
tmp_0 = tmp_2 instanceof Namespace ? tmp_2 : THROW_CCE();
|
|
964
909
|
} else {
|
|
965
910
|
tmp_0 = element;
|
|
966
911
|
}
|
|
@@ -972,13 +917,13 @@ function injectCompanionObject$lambda($endpoint) {
|
|
|
972
917
|
return transformChildren_0(transformed, transformer);
|
|
973
918
|
};
|
|
974
919
|
}
|
|
975
|
-
function
|
|
920
|
+
function buildApiObject$lambda(it) {
|
|
976
921
|
var tmp;
|
|
977
922
|
if (it instanceof Literal) {
|
|
978
|
-
tmp = it.
|
|
923
|
+
tmp = it.q19_1;
|
|
979
924
|
} else {
|
|
980
925
|
if (it instanceof Param) {
|
|
981
|
-
tmp = '{' + it.
|
|
926
|
+
tmp = '{' + it.cr_1.m1() + '}';
|
|
982
927
|
} else {
|
|
983
928
|
noWhenBranchMatchedException();
|
|
984
929
|
}
|
|
@@ -986,14 +931,14 @@ function buildCompanionObject$lambda(it) {
|
|
|
986
931
|
return tmp;
|
|
987
932
|
}
|
|
988
933
|
//region block: post-declaration
|
|
989
|
-
protoOf(
|
|
990
|
-
protoOf(
|
|
991
|
-
protoOf(
|
|
992
|
-
protoOf(
|
|
934
|
+
protoOf(KotlinEmitter).u19 = get_extensions;
|
|
935
|
+
protoOf(KotlinEmitter).mo = emit_0;
|
|
936
|
+
protoOf(KotlinEmitter).r19 = emit_1;
|
|
937
|
+
protoOf(KotlinEmitter).w19 = beforeGenerate;
|
|
993
938
|
//endregion
|
|
994
939
|
//region block: exports
|
|
995
940
|
export {
|
|
996
|
-
|
|
941
|
+
KotlinEmitter as KotlinEmitterddb8247fx90i,
|
|
997
942
|
};
|
|
998
943
|
//endregion
|
|
999
944
|
|