@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,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
KProperty1ca4yb4wlo496 as KProperty1,
|
|
3
3
|
getPropertyCallableRef3hckxc0xueiaj as getPropertyCallableRef,
|
|
4
|
-
StringBuilder_init_$Create$
|
|
4
|
+
StringBuilder_init_$Create$3ds9zx2kx9u4d as StringBuilder_init_$Create$,
|
|
5
5
|
charSequenceLength3278n89t01tmv as charSequenceLength,
|
|
6
6
|
charSequenceGet1vxk1y5n17t1z as charSequenceGet,
|
|
7
7
|
isLetterOrDigit2kuxd9e198haf as isLetterOrDigit,
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
_Char___init__impl__6a9atx2gndcvjvc5pke as _Char___init__impl__6a9atx,
|
|
9
|
+
Unit_instancev9v8hjid95df as Unit_instance,
|
|
10
10
|
charCodeAt1yspne1d8erbm as charCodeAt,
|
|
11
|
-
|
|
11
|
+
toString22rbkbhdb5cl2 as toString,
|
|
12
12
|
toString1pkumu07cwy4m as toString_0,
|
|
13
13
|
substring3saq8ornu0luv as substring,
|
|
14
|
-
Regex_init_$Create$
|
|
15
|
-
ArrayList_init_$Create$
|
|
14
|
+
Regex_init_$Create$17zqsmfd15n8x as Regex_init_$Create$,
|
|
15
|
+
ArrayList_init_$Create$37gc04va6yfo2 as ArrayList_init_$Create$,
|
|
16
16
|
first58ocm7j58k3q as first,
|
|
17
17
|
noWhenBranchMatchedException2a6r7ubxgky5j as noWhenBranchMatchedException,
|
|
18
18
|
protoOf180f3jzyo7rfj as protoOf,
|
|
@@ -23,11 +23,11 @@ import {
|
|
|
23
23
|
collectionSizeOrDefault36dulx8yinfqm as collectionSizeOrDefault,
|
|
24
24
|
mapCapacity1h45rc3eh9p2l as mapCapacity,
|
|
25
25
|
coerceAtLeast2bkz8m9ik7hep as coerceAtLeast,
|
|
26
|
-
LinkedHashMap_init_$Create$
|
|
26
|
+
LinkedHashMap_init_$Create$1gzy1x4a46gd4 as LinkedHashMap_init_$Create$,
|
|
27
27
|
removePrefix279df90bhrqqg as removePrefix,
|
|
28
28
|
initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
|
|
29
29
|
listOfvhqybd2zx248 as listOf_0,
|
|
30
|
-
ArrayList_init_$Create$
|
|
30
|
+
ArrayList_init_$Create$2byt5m5yn22yy as ArrayList_init_$Create$_0,
|
|
31
31
|
to2cs3ny02qtbcb as to,
|
|
32
32
|
toMap1vec9topfei08 as toMap,
|
|
33
33
|
VOID3gxj6tk5isa35 as VOID,
|
|
@@ -43,16 +43,16 @@ import {
|
|
|
43
43
|
isInterface3d6p8outrmvmk as isInterface,
|
|
44
44
|
lazy2hsh8ze7j6ikd as lazy,
|
|
45
45
|
addAll1k27qatfgp3k5 as addAll,
|
|
46
|
-
LinkedHashMap_init_$Create$
|
|
46
|
+
LinkedHashMap_init_$Create$2tibire69n089 as LinkedHashMap_init_$Create$_0,
|
|
47
47
|
joinToString1cxrrlmo0chqs as joinToString,
|
|
48
48
|
asSequence2phdjljfh9jhx as asSequence,
|
|
49
49
|
filterNot56uwv8hfomaa as filterNot,
|
|
50
50
|
mapsbvh18eqox7a as map,
|
|
51
51
|
distinct17vua5ffe1cfv as distinct,
|
|
52
52
|
toListx6x8nvfmvvht as toList,
|
|
53
|
-
LinkedHashSet_init_$Create$
|
|
53
|
+
LinkedHashSet_init_$Create$t7gzf3ihb6pk as LinkedHashSet_init_$Create$,
|
|
54
54
|
distinct10qe1scfdvu5k as distinct_0,
|
|
55
|
-
HashSet_init_$Create$
|
|
55
|
+
HashSet_init_$Create$2w31ptb4ree5i as HashSet_init_$Create$,
|
|
56
56
|
toSet2orjxp16sotqu as toSet,
|
|
57
57
|
trimMarginhyd3fsmh8iev as trimMargin,
|
|
58
58
|
Collection1k04j3hzsbod0 as Collection,
|
|
@@ -63,101 +63,103 @@ import {
|
|
|
63
63
|
trimEndvvzjdhan75g as trimEnd,
|
|
64
64
|
} from './kotlin-kotlin-stdlib.mjs';
|
|
65
65
|
import {
|
|
66
|
-
|
|
67
|
-
TypeScriptGenerator_getInstance3w0ea8m4h2slw as TypeScriptGenerator_getInstance,
|
|
68
|
-
transformChildren2mszeagj5nq4c as transformChildren,
|
|
69
|
-
sanitizeFieldName1ptgy1kxy8u2m as sanitizeFieldName,
|
|
70
|
-
Assignment3kcxc8wlcbmkn as Assignment,
|
|
71
|
-
ConstructorStatement1x4n4sr59iy4n as ConstructorStatement,
|
|
72
|
-
VariableReference2vlynnhaw1i64 as VariableReference,
|
|
73
|
-
SanitizationConfig11mmn3p2c03c1 as SanitizationConfig,
|
|
74
|
-
RawElement2yts1x2rbem1g as RawElement,
|
|
75
|
-
Companion_getInstance3gvtuyxc9uhxj as Companion_getInstance,
|
|
76
|
-
Mainb4yvz4x0nrxd as Main,
|
|
77
|
-
Enumlszg09mwd24f as Enum,
|
|
78
|
-
Interface3pn84xq686t2r as Interface,
|
|
79
|
-
Namespace345pal554qu3j as Namespace,
|
|
80
|
-
Struct39wf79cwtn4ty as Struct,
|
|
81
|
-
File3dimy4iqmuock as File,
|
|
82
|
-
transformChildrend9p91tpcqdkx as transformChildren_0,
|
|
83
|
-
StringLiteral3ffeojfhsbsmg as StringLiteral,
|
|
84
|
-
Field354s1ceh5pvhf as Field,
|
|
85
|
-
RawExpression2bo7ldfrptjia as RawExpression,
|
|
86
|
-
FunctionCall30872kpnbr7op as FunctionCall,
|
|
87
|
-
transformChildren3n5cjwmxlhwx9 as transformChildren_1,
|
|
88
|
-
Custom_init_$Create$2enn7oyj71j1t as Custom_init_$Create$,
|
|
89
|
-
Custom2si7lto3wompr as Custom,
|
|
90
|
-
String_instance3uxvo48ki208u as String_instance,
|
|
91
|
-
Literal50s1y3607cdv as Literal,
|
|
92
|
-
TransformScopeyrd3lf4zrk76 as TransformScope,
|
|
93
|
-
TransformerBuildera6a1gvlhjj9b as TransformerBuilder,
|
|
94
|
-
transform3eti8i2bqvifx as transform,
|
|
95
|
-
Elementitq62jg6fid3 as Element,
|
|
96
|
-
convertnty9x0e63d0u as convert,
|
|
97
|
-
emit1oxjujel6f3jb as emit,
|
|
98
|
-
emitn3eihixilqyh as emit_0,
|
|
99
|
-
import5uhkz67bd8tt as import_0,
|
|
100
|
-
convertToGenerator2wzjrmaavxhph as convertToGenerator,
|
|
101
|
-
convertToGeneratorkggw47cqose7 as convertToGenerator_0,
|
|
102
|
-
convertToGenerator3rjr3azp4vdsx as convertToGenerator_1,
|
|
103
|
-
convertToGenerator2msmr3acdd5nx as convertToGenerator_2,
|
|
104
|
-
sanitizeNames2wqmyf8vafp9x as sanitizeNames,
|
|
105
|
-
collectCustomTypeNames373f3lwl9sqd5 as collectCustomTypeNames,
|
|
106
|
-
classifyValidatableFields11bv88x0ho39r as classifyValidatableFields,
|
|
107
|
-
convertWithValidation3ar3nbcqsbkpn as convertWithValidation,
|
|
108
|
-
convert11ert2po54h1y as convert_0,
|
|
109
|
-
convert37aabdzvtv9vg as convert_1,
|
|
110
|
-
convert17zcptkz4mhr4 as convert_2,
|
|
111
|
-
convertConstraintkgpvomct0x0s as convertConstraint,
|
|
112
|
-
requestParameters1z8fdizgtviyb as requestParameters,
|
|
113
|
-
convert32tuiui3czihh as convert_3,
|
|
114
|
-
convert1cn4bolzoed8c as convert_4,
|
|
115
|
-
convert3ewo9inue7gua as convert_5,
|
|
116
|
-
get_extensions31c4or738wbxz as get_extensions,
|
|
117
|
-
emit3bzdcd0f6nwtj as emit_1,
|
|
118
|
-
beforeGenerate3o8idb3hey1b0 as beforeGenerate,
|
|
119
|
-
IrEmitterh2m93ojzvkep as IrEmitter,
|
|
120
|
-
rawttvqxl50flj9 as raw,
|
|
121
|
-
Switch3a1zi3na98deu as Switch,
|
|
122
|
-
Integer1uwg1wvo5lp6z as Integer,
|
|
123
|
-
Case2i7oahw4alz6h as Case,
|
|
124
|
-
FieldCall1iz7z2fx2xo4p as FieldCall,
|
|
125
|
-
Parameteruqoxd4rzw7ga as Parameter,
|
|
126
|
-
Function21cuq8qizkin7 as Function,
|
|
127
|
-
ErrorStatement1fq19ynue37ia as ErrorStatement,
|
|
128
|
-
BinaryOp35p72iprkxis9 as BinaryOp,
|
|
129
|
-
} from './wirespec-src-compiler-ir.mjs';
|
|
130
|
-
import {
|
|
66
|
+
Name1ijtblv1phm3y as Name,
|
|
131
67
|
Paramvfwnys2w6aj1 as Param,
|
|
68
|
+
get_fields3eodgfvi2duub as get_fields,
|
|
132
69
|
Bytes3eoc50vgt1uem as Bytes,
|
|
133
70
|
Boolean1fpfi8m5jt3fg as Boolean_0,
|
|
134
71
|
Number1mui0heypwdhp as Number_0,
|
|
135
|
-
Integer39lqx4uc63u28 as
|
|
72
|
+
Integer39lqx4uc63u28 as Integer,
|
|
136
73
|
String1czvr8pxnm6on as String_0,
|
|
137
74
|
Primitive1i8my14jkp3nk as Primitive,
|
|
138
|
-
Custom1lu6o8txpimqz as
|
|
75
|
+
Custom1lu6o8txpimqz as Custom,
|
|
139
76
|
Anyv7qdq63z63rc as Any,
|
|
140
77
|
Unit2z95clvxm08vr as Unit,
|
|
141
78
|
Iterable29qbzfup67wqp as Iterable,
|
|
142
79
|
Dict3g7w5wia7rncj as Dict,
|
|
143
|
-
|
|
144
|
-
|
|
80
|
+
TypeScriptGenerator_getInstancehiz60bwz5n7m as TypeScriptGenerator_getInstance,
|
|
81
|
+
transformChildren34heehtlmzzif as transformChildren,
|
|
82
|
+
sanitizeFieldName333wgwu6tt90n as sanitizeFieldName,
|
|
83
|
+
Assignment1el26yjkp72c6 as Assignment,
|
|
84
|
+
ConstructorStatement1edouznvc71xv as ConstructorStatement,
|
|
85
|
+
VariableReferencesji1q1tq3ygo as VariableReference,
|
|
86
|
+
SanitizationConfigunh0ok3qg1q3 as SanitizationConfig,
|
|
87
|
+
RawElement3huqlgf21e29z as RawElement,
|
|
88
|
+
Companion_getInstance34fvro4h6bumb as Companion_getInstance,
|
|
89
|
+
Main3fexakddcxfff as Main,
|
|
90
|
+
Enumoqsp4e7al89r as Enum,
|
|
91
|
+
Interface2g99rmjjt5ne as Interface,
|
|
92
|
+
Namespacex2gpe17ntoag as Namespace,
|
|
93
|
+
Structakfq94wrq695 as Struct,
|
|
94
|
+
File12q75sqvz964e as File,
|
|
95
|
+
transformChildren14suh59vxsgt as transformChildren_0,
|
|
96
|
+
StringLiteral3ok9p8g9pwd8t as StringLiteral,
|
|
97
|
+
Field26remk4nlwax4 as Field,
|
|
98
|
+
RawExpressionfqemfbo6j6cq as RawExpression,
|
|
99
|
+
FunctionCall1a3g4e6bcljl6 as FunctionCall,
|
|
100
|
+
transformChildren21ucrga4lv4sn as transformChildren_1,
|
|
101
|
+
Custom_init_$Create$kfegfgqdjj1p as Custom_init_$Create$,
|
|
102
|
+
Custom1ct1lu66hij6o as Custom_0,
|
|
103
|
+
String_instance2j5u8j0qc6lge as String_instance,
|
|
104
|
+
Literal1ddgfbf7tp4wt as Literal,
|
|
105
|
+
TransformScope3fhztkr2eyk36 as TransformScope,
|
|
106
|
+
TransformerBuilder26pbjl5nmg6wa as TransformerBuilder,
|
|
107
|
+
transformhd96z3w1u5uc as transform,
|
|
108
|
+
Element3p1xrn21d2w4b as Element,
|
|
109
|
+
FileExtension_TypeScript_getInstance13cn3j7kam56i as FileExtension_TypeScript_getInstance,
|
|
110
|
+
Companion_instance21vwhhqsaytqt as Companion_instance,
|
|
111
|
+
convert37y165c07dvpq as convert,
|
|
112
|
+
emit2s9bv7yrx5jcs as emit,
|
|
113
|
+
Part2m6fm5anwg79b as Part,
|
|
145
114
|
namespace2467cajrmgrc5 as namespace,
|
|
146
115
|
Emitted12h24rpo4uifw as Emitted,
|
|
116
|
+
emit1w04jgbmswnni as emit_0,
|
|
147
117
|
plus3lrm73de10b42 as plus_1,
|
|
118
|
+
import3bym2b49e642p as import_0,
|
|
119
|
+
convertToGenerator115obo0n49kco as convertToGenerator,
|
|
148
120
|
Unionccsavx6nrdr2 as Union,
|
|
121
|
+
convertToGenerator1x32vg5qdleq8 as convertToGenerator_0,
|
|
149
122
|
Refined1lkzc0dg6wey7 as Refined,
|
|
123
|
+
convertToGenerator33dm40iimoy3x as convertToGenerator_1,
|
|
150
124
|
Enum3l2iuc342kle6 as Enum_0,
|
|
125
|
+
convertToGenerator1arvbkvdv4bro as convertToGenerator_2,
|
|
151
126
|
Type12n1gx16iqtcu as Type,
|
|
127
|
+
sanitizeNames1v55mz1p84psg as sanitizeNames,
|
|
128
|
+
collectCustomTypeNames2atsrip288ol4 as collectCustomTypeNames,
|
|
152
129
|
plus14o24vdaiongg as plus_2,
|
|
130
|
+
classifyValidatableFieldsdr20i0f9b8o as classifyValidatableFields,
|
|
153
131
|
importReferencesy4xv7r53sjjs as importReferences,
|
|
132
|
+
get_fields25a89ltbcl7gz as get_fields_0,
|
|
133
|
+
convertWithValidation24mbxf4x2u6w4 as convertWithValidation,
|
|
134
|
+
convert1ke01d6gmcvu7 as convert_0,
|
|
135
|
+
convert29zpebhuxz599 as convert_1,
|
|
136
|
+
convert39lmqftdnlhsy as convert_2,
|
|
137
|
+
convertConstraint1tall9wrxeg5k as convertConstraint,
|
|
138
|
+
requestParameters17h8t6jwwzr7s as requestParameters,
|
|
139
|
+
convert333pgxr2q05n as convert_3,
|
|
140
|
+
convert86y6uioox2cl as convert_4,
|
|
141
|
+
convert1o5h4ulxoqycg as convert_5,
|
|
142
|
+
get_extensions1p1y8uybwv35q as get_extensions,
|
|
143
|
+
emit3e40nagyc4qho as emit_1,
|
|
144
|
+
beforeGenerate2eu511tof5fa4 as beforeGenerate,
|
|
145
|
+
get_supportsDefaults2j8lo8mbv0egf as get_supportsDefaults,
|
|
146
|
+
IrEmitter2jy94gp21kviv as IrEmitter,
|
|
147
|
+
raw1mm1rmqheq474 as raw,
|
|
148
|
+
Switch1xeta53lgnle5 as Switch,
|
|
149
|
+
Integer3hago8kqppnkb as Integer_0,
|
|
150
|
+
Case35feeoz93frh9 as Case,
|
|
151
|
+
FieldCall2nusnrnm7uuow as FieldCall,
|
|
152
|
+
Parameter37d5p43ul6u79 as Parameter,
|
|
153
|
+
Function1wme41sk2huri as Function,
|
|
154
154
|
Literal331hu9r04vptz as Literal_0,
|
|
155
|
+
ErrorStatement32jbg3x8mt63z as ErrorStatement,
|
|
156
|
+
BinaryOp3pda4rtz7k0s7 as BinaryOp,
|
|
155
157
|
} from './wirespec-src-compiler-core.mjs';
|
|
156
158
|
import {
|
|
157
|
-
|
|
159
|
+
_NonEmptyList___get_all__impl__pmf5092xnz0i2teaa6d as _NonEmptyList___get_all__impl__pmf509,
|
|
158
160
|
NonEmptyList3ak25ihy2gcvs as NonEmptyList,
|
|
159
|
-
|
|
160
|
-
|
|
161
|
+
_NonEmptyList___init__impl__fxd0xprpnd63likgzm as _NonEmptyList___init__impl__fxd0xp,
|
|
162
|
+
NonEmptyList__plus_impl_xqmb918nwrkd75m2j6 as NonEmptyList__plus_impl_xqmb9,
|
|
161
163
|
} from './arrow-arrow-core.mjs';
|
|
162
164
|
//region block: imports
|
|
163
165
|
var imul = Math.imul;
|
|
@@ -165,36 +167,36 @@ var imul = Math.imul;
|
|
|
165
167
|
//region block: pre-declaration
|
|
166
168
|
initMetadataForClass(EndpointParam, 'EndpointParam');
|
|
167
169
|
initMetadataForCompanion(Companion);
|
|
168
|
-
initMetadataForClass(
|
|
170
|
+
initMetadataForClass(TypeScriptEmitter, 'TypeScriptEmitter', TypeScriptEmitter, VOID, [IrEmitter]);
|
|
169
171
|
//endregion
|
|
170
172
|
function _get_sanitizationConfig__sns434($this) {
|
|
171
|
-
var tmp0 = $this.
|
|
173
|
+
var tmp0 = $this.a21_1;
|
|
172
174
|
var tmp = KProperty1;
|
|
173
175
|
// Inline function 'kotlin.getValue' call
|
|
174
|
-
getPropertyCallableRef('sanitizationConfig', 1, tmp,
|
|
176
|
+
getPropertyCallableRef('sanitizationConfig', 1, tmp, TypeScriptEmitter$_get_sanitizationConfig_$ref_eg4rmu(), null);
|
|
175
177
|
return tmp0.m1();
|
|
176
178
|
}
|
|
177
179
|
function _get_modelSanitizationConfig__vgg831($this) {
|
|
178
|
-
var tmp0 = $this.
|
|
180
|
+
var tmp0 = $this.b21_1;
|
|
179
181
|
var tmp = KProperty1;
|
|
180
182
|
// Inline function 'kotlin.getValue' call
|
|
181
|
-
getPropertyCallableRef('modelSanitizationConfig', 1, tmp,
|
|
183
|
+
getPropertyCallableRef('modelSanitizationConfig', 1, tmp, TypeScriptEmitter$_get_modelSanitizationConfig_$ref_jl2735(), null);
|
|
182
184
|
return tmp0.m1();
|
|
183
185
|
}
|
|
184
|
-
function sanitize($this,
|
|
185
|
-
return '"' +
|
|
186
|
+
function sanitize($this, $receiver) {
|
|
187
|
+
return '"' + $receiver.m1() + '"';
|
|
186
188
|
}
|
|
187
|
-
function sanitizeSymbol($this,
|
|
189
|
+
function sanitizeSymbol($this, $receiver) {
|
|
188
190
|
// Inline function 'kotlin.text.filter' call
|
|
189
191
|
// Inline function 'kotlin.text.filterTo' call
|
|
190
192
|
var destination = StringBuilder_init_$Create$();
|
|
191
193
|
var inductionVariable = 0;
|
|
192
|
-
var last = charSequenceLength(
|
|
194
|
+
var last = charSequenceLength($receiver);
|
|
193
195
|
if (inductionVariable < last)
|
|
194
196
|
do {
|
|
195
197
|
var index = inductionVariable;
|
|
196
198
|
inductionVariable = inductionVariable + 1 | 0;
|
|
197
|
-
var element = charSequenceGet(
|
|
199
|
+
var element = charSequenceGet($receiver, index);
|
|
198
200
|
if (isLetterOrDigit(element) || element === _Char___init__impl__6a9atx(95)) {
|
|
199
201
|
destination.s(element);
|
|
200
202
|
}
|
|
@@ -202,22 +204,22 @@ function sanitizeSymbol($this, _this__u8e3s4) {
|
|
|
202
204
|
while (inductionVariable < last);
|
|
203
205
|
return destination.toString();
|
|
204
206
|
}
|
|
205
|
-
function sanitizeKeywords($this,
|
|
206
|
-
return Companion_getInstance_0().
|
|
207
|
+
function sanitizeKeywords($this, $receiver) {
|
|
208
|
+
return Companion_getInstance_0().y1y().v1($receiver) ? '_' + $receiver : $receiver;
|
|
207
209
|
}
|
|
208
|
-
function firstToLower($this,
|
|
210
|
+
function firstToLower($this, $receiver) {
|
|
209
211
|
// Inline function 'kotlin.text.replaceFirstChar' call
|
|
210
212
|
var tmp;
|
|
211
213
|
// Inline function 'kotlin.text.isNotEmpty' call
|
|
212
|
-
if (charSequenceLength(
|
|
214
|
+
if (charSequenceLength($receiver) > 0) {
|
|
213
215
|
// Inline function 'kotlin.text.lowercase' call
|
|
214
|
-
var this_0 = charCodeAt(
|
|
216
|
+
var this_0 = charCodeAt($receiver, 0);
|
|
215
217
|
// Inline function 'kotlin.js.asDynamic' call
|
|
216
218
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
217
|
-
var tmp$ret$
|
|
218
|
-
tmp = toString_0(tmp$ret$
|
|
219
|
+
var tmp$ret$2 = toString(this_0).toLowerCase();
|
|
220
|
+
tmp = toString_0(tmp$ret$2) + substring($receiver, 1);
|
|
219
221
|
} else {
|
|
220
|
-
tmp =
|
|
222
|
+
tmp = $receiver;
|
|
221
223
|
}
|
|
222
224
|
return tmp;
|
|
223
225
|
}
|
|
@@ -225,7 +227,7 @@ function sanitizeParamName($this, identifier) {
|
|
|
225
227
|
var tmp0 = identifier.m1();
|
|
226
228
|
// Inline function 'kotlin.text.split' call
|
|
227
229
|
// Inline function 'kotlin.collections.filter' call
|
|
228
|
-
var tmp0_0 = Regex_init_$Create$('[.\\s-]+').
|
|
230
|
+
var tmp0_0 = Regex_init_$Create$('[.\\s-]+').cd(tmp0, 0);
|
|
229
231
|
// Inline function 'kotlin.collections.filterTo' call
|
|
230
232
|
var destination = ArrayList_init_$Create$();
|
|
231
233
|
var _iterator__ex2g4s = tmp0_0.t();
|
|
@@ -237,7 +239,7 @@ function sanitizeParamName($this, identifier) {
|
|
|
237
239
|
}
|
|
238
240
|
}
|
|
239
241
|
var parts = destination;
|
|
240
|
-
var name = parts.b1() > 1 ? (new Name(parts)).
|
|
242
|
+
var name = parts.b1() > 1 ? (new Name(parts)).ot() : identifier.m1();
|
|
241
243
|
return sanitizeKeywords($this, sanitizeSymbol($this, name));
|
|
242
244
|
}
|
|
243
245
|
function buildEndpointParams($this, endpoint) {
|
|
@@ -246,7 +248,7 @@ function buildEndpointParams($this, endpoint) {
|
|
|
246
248
|
// Inline function 'kotlin.apply' call
|
|
247
249
|
var this_0 = ArrayList_init_$Create$();
|
|
248
250
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
249
|
-
var tmp0 = endpoint.
|
|
251
|
+
var tmp0 = endpoint.xq_1;
|
|
250
252
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
251
253
|
var destination = ArrayList_init_$Create$();
|
|
252
254
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -260,36 +262,36 @@ function buildEndpointParams($this, endpoint) {
|
|
|
260
262
|
var _iterator__ex2g4s_0 = destination.t();
|
|
261
263
|
while (_iterator__ex2g4s_0.u()) {
|
|
262
264
|
var element_0 = _iterator__ex2g4s_0.v();
|
|
263
|
-
this_0.x(new EndpointParam(sanitizeParamName($this, element_0.
|
|
265
|
+
this_0.x(new EndpointParam(sanitizeParamName($this, element_0.cr_1), emitTypeScriptReference($this, element_0.dr_1.j19(false)), element_0.dr_1.et()));
|
|
264
266
|
}
|
|
265
267
|
// Inline function 'kotlin.collections.forEach' call
|
|
266
|
-
var _iterator__ex2g4s_1 = endpoint.
|
|
268
|
+
var _iterator__ex2g4s_1 = get_fields(endpoint.yq_1).t();
|
|
267
269
|
while (_iterator__ex2g4s_1.u()) {
|
|
268
270
|
var element_1 = _iterator__ex2g4s_1.v();
|
|
269
|
-
this_0.x(new EndpointParam(sanitizeParamName($this, element_1.
|
|
271
|
+
this_0.x(new EndpointParam(sanitizeParamName($this, element_1.gp_1), emitTypeScriptReference($this, element_1.hp_1.j19(false)), element_1.hp_1.et()));
|
|
270
272
|
}
|
|
271
273
|
// Inline function 'kotlin.collections.forEach' call
|
|
272
|
-
var _iterator__ex2g4s_2 = endpoint.
|
|
274
|
+
var _iterator__ex2g4s_2 = get_fields(endpoint.zq_1).t();
|
|
273
275
|
while (_iterator__ex2g4s_2.u()) {
|
|
274
276
|
var element_2 = _iterator__ex2g4s_2.v();
|
|
275
|
-
this_0.x(new EndpointParam(sanitizeParamName($this, element_2.
|
|
277
|
+
this_0.x(new EndpointParam(sanitizeParamName($this, element_2.gp_1), emitTypeScriptReference($this, element_2.hp_1.j19(false)), element_2.hp_1.et()));
|
|
276
278
|
}
|
|
277
|
-
var tmp0_safe_receiver = first(endpoint.
|
|
279
|
+
var tmp0_safe_receiver = first(endpoint.ar_1).er_1;
|
|
278
280
|
if (tmp0_safe_receiver == null)
|
|
279
281
|
null;
|
|
280
282
|
else {
|
|
281
283
|
// Inline function 'kotlin.let' call
|
|
282
|
-
this_0.x(new EndpointParam('body', emitTypeScriptReference($this, tmp0_safe_receiver.
|
|
284
|
+
this_0.x(new EndpointParam('body', emitTypeScriptReference($this, tmp0_safe_receiver.gr_1.j19(false)), tmp0_safe_receiver.gr_1.et()));
|
|
283
285
|
}
|
|
284
286
|
return this_0.p5();
|
|
285
287
|
}
|
|
286
288
|
function emitTypeScriptReference($this, ref) {
|
|
287
289
|
var tmp;
|
|
288
290
|
if (ref instanceof Dict) {
|
|
289
|
-
tmp = 'Record<string, ' + emitTypeScriptReference($this, ref.
|
|
291
|
+
tmp = 'Record<string, ' + emitTypeScriptReference($this, ref.tp_1) + '>';
|
|
290
292
|
} else {
|
|
291
293
|
if (ref instanceof Iterable) {
|
|
292
|
-
tmp = emitTypeScriptReference($this, ref.
|
|
294
|
+
tmp = emitTypeScriptReference($this, ref.qp_1) + '[]';
|
|
293
295
|
} else {
|
|
294
296
|
if (ref instanceof Unit) {
|
|
295
297
|
tmp = 'undefined';
|
|
@@ -297,16 +299,16 @@ function emitTypeScriptReference($this, ref) {
|
|
|
297
299
|
if (ref instanceof Any) {
|
|
298
300
|
tmp = 'any';
|
|
299
301
|
} else {
|
|
300
|
-
if (ref instanceof
|
|
301
|
-
tmp = sanitizeSymbol($this, ref.
|
|
302
|
+
if (ref instanceof Custom) {
|
|
303
|
+
tmp = sanitizeSymbol($this, ref.h18_1);
|
|
302
304
|
} else {
|
|
303
305
|
if (ref instanceof Primitive) {
|
|
304
|
-
var tmp1_subject = ref.
|
|
306
|
+
var tmp1_subject = ref.j18_1;
|
|
305
307
|
var tmp_0;
|
|
306
308
|
if (tmp1_subject instanceof String_0) {
|
|
307
309
|
tmp_0 = 'string';
|
|
308
310
|
} else {
|
|
309
|
-
if (tmp1_subject instanceof
|
|
311
|
+
if (tmp1_subject instanceof Integer) {
|
|
310
312
|
tmp_0 = 'number';
|
|
311
313
|
} else {
|
|
312
314
|
if (tmp1_subject instanceof Number_0) {
|
|
@@ -334,20 +336,20 @@ function emitTypeScriptReference($this, ref) {
|
|
|
334
336
|
}
|
|
335
337
|
}
|
|
336
338
|
// Inline function 'kotlin.let' call
|
|
337
|
-
return tmp + (ref.
|
|
339
|
+
return tmp + (ref.et() ? ' | undefined' : '');
|
|
338
340
|
}
|
|
339
341
|
function EndpointParam(name, type, nullable) {
|
|
340
|
-
this.
|
|
341
|
-
this.
|
|
342
|
-
this.
|
|
342
|
+
this.e21_1 = name;
|
|
343
|
+
this.f21_1 = type;
|
|
344
|
+
this.g21_1 = nullable;
|
|
343
345
|
}
|
|
344
346
|
protoOf(EndpointParam).toString = function () {
|
|
345
|
-
return 'EndpointParam(name=' + this.
|
|
347
|
+
return 'EndpointParam(name=' + this.e21_1 + ', type=' + this.f21_1 + ', nullable=' + this.g21_1 + ')';
|
|
346
348
|
};
|
|
347
349
|
protoOf(EndpointParam).hashCode = function () {
|
|
348
|
-
var result = getStringHashCode(this.
|
|
349
|
-
result = imul(result, 31) + getStringHashCode(this.
|
|
350
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
350
|
+
var result = getStringHashCode(this.e21_1);
|
|
351
|
+
result = imul(result, 31) + getStringHashCode(this.f21_1) | 0;
|
|
352
|
+
result = imul(result, 31) + getBooleanHashCode(this.g21_1) | 0;
|
|
351
353
|
return result;
|
|
352
354
|
};
|
|
353
355
|
protoOf(EndpointParam).equals = function (other) {
|
|
@@ -355,17 +357,17 @@ protoOf(EndpointParam).equals = function (other) {
|
|
|
355
357
|
return true;
|
|
356
358
|
if (!(other instanceof EndpointParam))
|
|
357
359
|
return false;
|
|
358
|
-
if (!(this.
|
|
360
|
+
if (!(this.e21_1 === other.e21_1))
|
|
359
361
|
return false;
|
|
360
|
-
if (!(this.
|
|
362
|
+
if (!(this.f21_1 === other.f21_1))
|
|
361
363
|
return false;
|
|
362
|
-
if (!(this.
|
|
364
|
+
if (!(this.g21_1 === other.g21_1))
|
|
363
365
|
return false;
|
|
364
366
|
return true;
|
|
365
367
|
};
|
|
366
368
|
function Companion() {
|
|
367
369
|
Companion_instance_0 = this;
|
|
368
|
-
this.
|
|
370
|
+
this.c21_1 = TypeScriptGenerator_getInstance();
|
|
369
371
|
var tmp = this;
|
|
370
372
|
// Inline function 'kotlin.collections.associateWith' call
|
|
371
373
|
var this_0 = listOf(['GeneratorFieldString', 'GeneratorFieldInteger64', 'GeneratorFieldInteger32', 'GeneratorFieldNumber64', 'GeneratorFieldNumber32', 'GeneratorFieldBoolean', 'GeneratorFieldBytes', 'GeneratorFieldEnum', 'GeneratorFieldUnion', 'GeneratorFieldArray', 'GeneratorFieldNullable', 'GeneratorFieldShape', 'GeneratorFieldDict']);
|
|
@@ -379,10 +381,10 @@ function Companion() {
|
|
|
379
381
|
var tmp$ret$2 = removePrefix(element, 'GeneratorField').toLowerCase();
|
|
380
382
|
result.t2(element, tmp$ret$2);
|
|
381
383
|
}
|
|
382
|
-
tmp.
|
|
384
|
+
tmp.d21_1 = result;
|
|
383
385
|
}
|
|
384
|
-
protoOf(Companion).
|
|
385
|
-
return this.
|
|
386
|
+
protoOf(Companion).y1y = function () {
|
|
387
|
+
return this.c21_1.l1a_1;
|
|
386
388
|
};
|
|
387
389
|
var Companion_instance_0;
|
|
388
390
|
function Companion_getInstance_0() {
|
|
@@ -390,22 +392,22 @@ function Companion_getInstance_0() {
|
|
|
390
392
|
new Companion();
|
|
391
393
|
return Companion_instance_0;
|
|
392
394
|
}
|
|
393
|
-
function
|
|
395
|
+
function TypeScriptEmitter$sanitizationConfig$delegate$lambda$lambda(it) {
|
|
394
396
|
return it;
|
|
395
397
|
}
|
|
396
|
-
function
|
|
398
|
+
function TypeScriptEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0) {
|
|
397
399
|
return function (name) {
|
|
398
|
-
var sanitized = name.
|
|
400
|
+
var sanitized = name.kt_1.b1() > 1 ? name.ot() : sanitizeSymbol(this$0, name.nt());
|
|
399
401
|
return new Name(listOf_0(sanitized));
|
|
400
402
|
};
|
|
401
403
|
}
|
|
402
|
-
function
|
|
404
|
+
function TypeScriptEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0) {
|
|
403
405
|
return function (name) {
|
|
404
|
-
var sanitized = name.
|
|
406
|
+
var sanitized = name.kt_1.b1() > 1 ? name.ot() : sanitizeSymbol(this$0, name.nt());
|
|
405
407
|
return new Name(listOf_0(sanitized));
|
|
406
408
|
};
|
|
407
409
|
}
|
|
408
|
-
function
|
|
410
|
+
function TypeScriptEmitter$sanitizationConfig$delegate$lambda$lambda_2(it) {
|
|
409
411
|
// Inline function 'kotlin.text.filter' call
|
|
410
412
|
// Inline function 'kotlin.text.filterTo' call
|
|
411
413
|
var destination = StringBuilder_init_$Create$();
|
|
@@ -423,16 +425,16 @@ function TypeScriptIrEmitter$sanitizationConfig$delegate$lambda$lambda_2(it) {
|
|
|
423
425
|
while (inductionVariable < last);
|
|
424
426
|
return destination.toString();
|
|
425
427
|
}
|
|
426
|
-
function
|
|
428
|
+
function TypeScriptEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
|
|
427
429
|
return function (stmt, tr) {
|
|
428
430
|
var tmp;
|
|
429
431
|
if (stmt instanceof VariableReference) {
|
|
430
|
-
tmp = new VariableReference(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), stmt.
|
|
432
|
+
tmp = new VariableReference(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), stmt.wu_1));
|
|
431
433
|
} else {
|
|
432
434
|
if (stmt instanceof ConstructorStatement) {
|
|
433
|
-
var tmp_0 = tr.
|
|
435
|
+
var tmp_0 = tr.c17(stmt.tu_1);
|
|
434
436
|
// Inline function 'kotlin.collections.map' call
|
|
435
|
-
var this_0 = stmt.
|
|
437
|
+
var this_0 = stmt.uu_1;
|
|
436
438
|
// Inline function 'kotlin.collections.mapTo' call
|
|
437
439
|
var destination = ArrayList_init_$Create$_0(this_0.b1());
|
|
438
440
|
// Inline function 'kotlin.collections.iterator' call
|
|
@@ -443,13 +445,13 @@ function TypeScriptIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0)
|
|
|
443
445
|
var key = item.l1();
|
|
444
446
|
// Inline function 'kotlin.collections.component2' call
|
|
445
447
|
var value = item.m1();
|
|
446
|
-
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), key), tr.
|
|
448
|
+
var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), key), tr.f17(value));
|
|
447
449
|
destination.x(tmp$ret$3);
|
|
448
450
|
}
|
|
449
451
|
tmp = new ConstructorStatement(tmp_0, toMap(destination));
|
|
450
452
|
} else {
|
|
451
453
|
if (stmt instanceof Assignment) {
|
|
452
|
-
tmp = new Assignment(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), stmt.
|
|
454
|
+
tmp = new Assignment(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), stmt.zx_1), tr.f17(stmt.ay_1), stmt.by_1);
|
|
453
455
|
} else {
|
|
454
456
|
tmp = transformChildren(stmt, tr);
|
|
455
457
|
}
|
|
@@ -458,63 +460,63 @@ function TypeScriptIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0)
|
|
|
458
460
|
return tmp;
|
|
459
461
|
};
|
|
460
462
|
}
|
|
461
|
-
function
|
|
463
|
+
function TypeScriptEmitter$sanitizationConfig$delegate$lambda(this$0) {
|
|
462
464
|
return function () {
|
|
463
|
-
var tmp0_reservedKeywords = Companion_getInstance_0().
|
|
464
|
-
var tmp =
|
|
465
|
-
var tmp_0 =
|
|
466
|
-
var tmp_1 =
|
|
467
|
-
var tmp_2 =
|
|
468
|
-
return new SanitizationConfig(tmp0_reservedKeywords, tmp, tmp_0, tmp_1, tmp_2,
|
|
465
|
+
var tmp0_reservedKeywords = Companion_getInstance_0().y1y();
|
|
466
|
+
var tmp = TypeScriptEmitter$sanitizationConfig$delegate$lambda$lambda;
|
|
467
|
+
var tmp_0 = TypeScriptEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0);
|
|
468
|
+
var tmp_1 = TypeScriptEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0);
|
|
469
|
+
var tmp_2 = TypeScriptEmitter$sanitizationConfig$delegate$lambda$lambda_2;
|
|
470
|
+
return new SanitizationConfig(tmp0_reservedKeywords, tmp, tmp_0, tmp_1, tmp_2, TypeScriptEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0), false);
|
|
469
471
|
};
|
|
470
472
|
}
|
|
471
|
-
function
|
|
473
|
+
function TypeScriptEmitter$_get_sanitizationConfig_$ref_eg4rmu() {
|
|
472
474
|
return function (p0) {
|
|
473
475
|
return _get_sanitizationConfig__sns434(p0);
|
|
474
476
|
};
|
|
475
477
|
}
|
|
476
|
-
function
|
|
477
|
-
return new Name(listOf_0(name.
|
|
478
|
+
function TypeScriptEmitter$modelSanitizationConfig$delegate$lambda$lambda(name) {
|
|
479
|
+
return new Name(listOf_0(name.nt()));
|
|
478
480
|
}
|
|
479
|
-
function
|
|
481
|
+
function TypeScriptEmitter$modelSanitizationConfig$delegate$lambda$lambda_0(it) {
|
|
480
482
|
return it;
|
|
481
483
|
}
|
|
482
|
-
function
|
|
484
|
+
function TypeScriptEmitter$modelSanitizationConfig$delegate$lambda(this$0) {
|
|
483
485
|
return function () {
|
|
484
486
|
var tmp = _get_sanitizationConfig__sns434(this$0);
|
|
485
|
-
var tmp_0 =
|
|
486
|
-
return tmp.
|
|
487
|
+
var tmp_0 = TypeScriptEmitter$modelSanitizationConfig$delegate$lambda$lambda;
|
|
488
|
+
return tmp.x1a(VOID, VOID, tmp_0, VOID, TypeScriptEmitter$modelSanitizationConfig$delegate$lambda$lambda_0);
|
|
487
489
|
};
|
|
488
490
|
}
|
|
489
|
-
function
|
|
491
|
+
function TypeScriptEmitter$_get_modelSanitizationConfig_$ref_jl2735() {
|
|
490
492
|
return function (p0) {
|
|
491
493
|
return _get_modelSanitizationConfig__vgg831(p0);
|
|
492
494
|
};
|
|
493
495
|
}
|
|
494
|
-
function
|
|
496
|
+
function TypeScriptEmitter$emitShared$lambda(element, transformer) {
|
|
495
497
|
var tmp;
|
|
496
498
|
if (element instanceof Namespace) {
|
|
497
|
-
var injected = element.
|
|
499
|
+
var injected = element.dv_1.equals(Companion_getInstance().mt('Wirespec')) ? listOf_0(new RawElement('export type Type = string')) : emptyList();
|
|
498
500
|
var tmp_0;
|
|
499
501
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
500
502
|
if (!injected.r()) {
|
|
501
|
-
// Inline function 'community.flock.wirespec.
|
|
502
|
-
var elements = plus(injected, element.
|
|
503
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.withElements' call
|
|
504
|
+
var elements = plus(injected, element.zu());
|
|
503
505
|
var tmp_1;
|
|
504
506
|
if (element instanceof File) {
|
|
505
|
-
tmp_1 = element.
|
|
507
|
+
tmp_1 = element.bv(VOID, elements);
|
|
506
508
|
} else {
|
|
507
509
|
if (element instanceof Struct) {
|
|
508
|
-
tmp_1 = element.
|
|
510
|
+
tmp_1 = element.ix(VOID, VOID, VOID, VOID, elements);
|
|
509
511
|
} else {
|
|
510
512
|
if (element instanceof Namespace) {
|
|
511
|
-
tmp_1 = element.
|
|
513
|
+
tmp_1 = element.iv(VOID, elements);
|
|
512
514
|
} else {
|
|
513
515
|
if (element instanceof Interface) {
|
|
514
|
-
tmp_1 = element.
|
|
516
|
+
tmp_1 = element.rv(VOID, elements);
|
|
515
517
|
} else {
|
|
516
518
|
if (element instanceof Enum) {
|
|
517
|
-
tmp_1 = element.
|
|
519
|
+
tmp_1 = element.ww(VOID, VOID, VOID, VOID, VOID, elements);
|
|
518
520
|
} else {
|
|
519
521
|
if (element instanceof Main) {
|
|
520
522
|
tmp_1 = element;
|
|
@@ -538,31 +540,31 @@ function TypeScriptIrEmitter$emitShared$lambda(element, transformer) {
|
|
|
538
540
|
var transformed = tmp;
|
|
539
541
|
return transformChildren_0(transformed, transformer);
|
|
540
542
|
}
|
|
541
|
-
function
|
|
543
|
+
function TypeScriptEmitter$emitShared$lambda_0($api) {
|
|
542
544
|
return function (element, transformer) {
|
|
543
545
|
var tmp;
|
|
544
546
|
if (element instanceof Namespace) {
|
|
545
|
-
var injected = element.
|
|
547
|
+
var injected = element.dv_1.equals(Companion_getInstance().mt('Wirespec')) ? listOf_0(new RawElement($api)) : emptyList();
|
|
546
548
|
var tmp_0;
|
|
547
549
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
548
550
|
if (!injected.r()) {
|
|
549
|
-
// Inline function 'community.flock.wirespec.
|
|
550
|
-
var elements = plus(element.
|
|
551
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.withElements' call
|
|
552
|
+
var elements = plus(element.zu(), injected);
|
|
551
553
|
var tmp_1;
|
|
552
554
|
if (element instanceof File) {
|
|
553
|
-
tmp_1 = element.
|
|
555
|
+
tmp_1 = element.bv(VOID, elements);
|
|
554
556
|
} else {
|
|
555
557
|
if (element instanceof Struct) {
|
|
556
|
-
tmp_1 = element.
|
|
558
|
+
tmp_1 = element.ix(VOID, VOID, VOID, VOID, elements);
|
|
557
559
|
} else {
|
|
558
560
|
if (element instanceof Namespace) {
|
|
559
|
-
tmp_1 = element.
|
|
561
|
+
tmp_1 = element.iv(VOID, elements);
|
|
560
562
|
} else {
|
|
561
563
|
if (element instanceof Interface) {
|
|
562
|
-
tmp_1 = element.
|
|
564
|
+
tmp_1 = element.rv(VOID, elements);
|
|
563
565
|
} else {
|
|
564
566
|
if (element instanceof Enum) {
|
|
565
|
-
tmp_1 = element.
|
|
567
|
+
tmp_1 = element.ww(VOID, VOID, VOID, VOID, VOID, elements);
|
|
566
568
|
} else {
|
|
567
569
|
if (element instanceof Main) {
|
|
568
570
|
tmp_1 = element;
|
|
@@ -587,16 +589,16 @@ function TypeScriptIrEmitter$emitShared$lambda_0($api) {
|
|
|
587
589
|
return transformChildren_0(transformed, transformer);
|
|
588
590
|
};
|
|
589
591
|
}
|
|
590
|
-
function
|
|
592
|
+
function TypeScriptEmitter$emitShared$lambda_1(element, transformer) {
|
|
591
593
|
var tmp;
|
|
592
594
|
if (element instanceof Struct) {
|
|
593
|
-
var tmp0_safe_receiver = Companion_getInstance_0().
|
|
595
|
+
var tmp0_safe_receiver = Companion_getInstance_0().d21_1.q2(element.xw_1.nt());
|
|
594
596
|
var tmp_0;
|
|
595
597
|
if (tmp0_safe_receiver == null) {
|
|
596
598
|
tmp_0 = null;
|
|
597
599
|
} else {
|
|
598
600
|
// Inline function 'kotlin.let' call
|
|
599
|
-
tmp_0 = element.
|
|
601
|
+
tmp_0 = element.ix(VOID, plus(listOf_0(new Field(Companion_getInstance().mt('kind'), new StringLiteral(tmp0_safe_receiver))), element.yw_1));
|
|
600
602
|
}
|
|
601
603
|
var tmp1_elvis_lhs = tmp_0;
|
|
602
604
|
tmp = tmp1_elvis_lhs == null ? element : tmp1_elvis_lhs;
|
|
@@ -606,34 +608,34 @@ function TypeScriptIrEmitter$emitShared$lambda_1(element, transformer) {
|
|
|
606
608
|
var transformed = tmp;
|
|
607
609
|
return transformChildren_0(transformed, transformer);
|
|
608
610
|
}
|
|
609
|
-
function
|
|
610
|
-
return 'export {' + it.
|
|
611
|
+
function TypeScriptEmitter$emit$lambda(it) {
|
|
612
|
+
return 'export {' + it.tr().m1() + "} from './" + it.tr().m1() + "'";
|
|
611
613
|
}
|
|
612
|
-
function
|
|
614
|
+
function TypeScriptEmitter$emitGenerator$lambda($definition) {
|
|
613
615
|
return function (expr, t) {
|
|
614
616
|
var tmp;
|
|
615
617
|
var tmp_0;
|
|
616
618
|
var tmp_1;
|
|
617
619
|
var tmp_2;
|
|
618
620
|
if (expr instanceof FunctionCall) {
|
|
619
|
-
var tmp_3 = expr.
|
|
621
|
+
var tmp_3 = expr.st_1;
|
|
620
622
|
tmp_2 = tmp_3 instanceof RawExpression;
|
|
621
623
|
} else {
|
|
622
624
|
tmp_2 = false;
|
|
623
625
|
}
|
|
624
626
|
if (tmp_2) {
|
|
625
|
-
var tmp_4 = expr.
|
|
626
|
-
tmp_1 = (tmp_4 instanceof RawExpression ? tmp_4 : THROW_CCE()).
|
|
627
|
+
var tmp_4 = expr.st_1;
|
|
628
|
+
tmp_1 = (tmp_4 instanceof RawExpression ? tmp_4 : THROW_CCE()).yx_1 === $definition.gs_1.m1();
|
|
627
629
|
} else {
|
|
628
630
|
tmp_1 = false;
|
|
629
631
|
}
|
|
630
632
|
if (tmp_1) {
|
|
631
|
-
tmp_0 = expr.
|
|
633
|
+
tmp_0 = expr.ut_1.equals(Companion_getInstance().mt('valueOf'));
|
|
632
634
|
} else {
|
|
633
635
|
tmp_0 = false;
|
|
634
636
|
}
|
|
635
637
|
if (tmp_0) {
|
|
636
|
-
var tmp0_elvis_lhs = expr.
|
|
638
|
+
var tmp0_elvis_lhs = expr.vt_1.q2(Companion_getInstance().mt('label'));
|
|
637
639
|
tmp = tmp0_elvis_lhs == null ? expr : tmp0_elvis_lhs;
|
|
638
640
|
} else {
|
|
639
641
|
tmp = transformChildren_1(expr, t);
|
|
@@ -641,17 +643,17 @@ function TypeScriptIrEmitter$emitGenerator$lambda($definition) {
|
|
|
641
643
|
return tmp;
|
|
642
644
|
};
|
|
643
645
|
}
|
|
644
|
-
function
|
|
646
|
+
function TypeScriptEmitter$emitGenerator$lambda_0($definition) {
|
|
645
647
|
return function (expr, t) {
|
|
646
648
|
var tmp;
|
|
647
649
|
var tmp_0;
|
|
648
650
|
if (expr instanceof ConstructorStatement) {
|
|
649
|
-
tmp_0 = equals(expr.
|
|
651
|
+
tmp_0 = equals(expr.tu_1, Custom_init_$Create$($definition.bs_1.m1()));
|
|
650
652
|
} else {
|
|
651
653
|
tmp_0 = false;
|
|
652
654
|
}
|
|
653
655
|
if (tmp_0) {
|
|
654
|
-
var tmp0_elvis_lhs = expr.
|
|
656
|
+
var tmp0_elvis_lhs = expr.uu_1.q2(Companion_getInstance().mt('value'));
|
|
655
657
|
tmp = tmp0_elvis_lhs == null ? expr : tmp0_elvis_lhs;
|
|
656
658
|
} else {
|
|
657
659
|
tmp = transformChildren_1(expr, t);
|
|
@@ -659,27 +661,27 @@ function TypeScriptIrEmitter$emitGenerator$lambda_0($definition) {
|
|
|
659
661
|
return tmp;
|
|
660
662
|
};
|
|
661
663
|
}
|
|
662
|
-
function
|
|
664
|
+
function TypeScriptEmitter$emitGenerator$lambda_1(expr, t) {
|
|
663
665
|
var tmp;
|
|
664
666
|
if (expr instanceof ConstructorStatement) {
|
|
665
|
-
var tmp_0 = expr.
|
|
666
|
-
var tmp0_safe_receiver = tmp_0 instanceof
|
|
667
|
-
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
668
|
-
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
667
|
+
var tmp_0 = expr.tu_1;
|
|
668
|
+
var tmp0_safe_receiver = tmp_0 instanceof Custom_0 ? tmp_0 : null;
|
|
669
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.gu_1;
|
|
670
|
+
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.nt();
|
|
669
671
|
var typeName = tmp2_safe_receiver == null ? null : removePrefix(tmp2_safe_receiver, 'Wirespec.');
|
|
670
672
|
var tmp_1;
|
|
671
673
|
if (typeName == null) {
|
|
672
674
|
tmp_1 = null;
|
|
673
675
|
} else {
|
|
674
676
|
// Inline function 'kotlin.let' call
|
|
675
|
-
tmp_1 = Companion_getInstance_0().
|
|
677
|
+
tmp_1 = Companion_getInstance_0().d21_1.q2(typeName);
|
|
676
678
|
}
|
|
677
679
|
var kind = tmp_1;
|
|
678
680
|
var tmp_2;
|
|
679
681
|
if (!(kind == null)) {
|
|
680
|
-
var tmp_3 = mapOf(to(Companion_getInstance().
|
|
682
|
+
var tmp_3 = mapOf(to(Companion_getInstance().mt('kind'), new Literal(kind, String_instance)));
|
|
681
683
|
// Inline function 'kotlin.collections.mapValues' call
|
|
682
|
-
var this_0 = expr.
|
|
684
|
+
var this_0 = expr.uu_1;
|
|
683
685
|
// Inline function 'kotlin.collections.mapValuesTo' call
|
|
684
686
|
var destination = LinkedHashMap_init_$Create$(mapCapacity(this_0.b1()));
|
|
685
687
|
// Inline function 'kotlin.collections.associateByTo' call
|
|
@@ -689,10 +691,10 @@ function TypeScriptIrEmitter$emitGenerator$lambda_1(expr, t) {
|
|
|
689
691
|
var tmp_4 = element.l1();
|
|
690
692
|
// Inline function 'kotlin.collections.component2' call
|
|
691
693
|
var v = element.m1();
|
|
692
|
-
var tmp$ret$
|
|
693
|
-
destination.t2(tmp_4, tmp$ret$
|
|
694
|
+
var tmp$ret$6 = t.f17(v);
|
|
695
|
+
destination.t2(tmp_4, tmp$ret$6);
|
|
694
696
|
}
|
|
695
|
-
tmp_2 = new ConstructorStatement(expr.
|
|
697
|
+
tmp_2 = new ConstructorStatement(expr.tu_1, plus_0(tmp_3, destination));
|
|
696
698
|
} else {
|
|
697
699
|
tmp_2 = transformChildren(expr, t);
|
|
698
700
|
}
|
|
@@ -702,40 +704,40 @@ function TypeScriptIrEmitter$emitGenerator$lambda_1(expr, t) {
|
|
|
702
704
|
}
|
|
703
705
|
return tmp;
|
|
704
706
|
}
|
|
705
|
-
function
|
|
707
|
+
function TypeScriptEmitter$emitGenerator$lambda_2(it) {
|
|
706
708
|
return startsWith(it, 'Wirespec.') || it === 'Wirespec';
|
|
707
709
|
}
|
|
708
|
-
function
|
|
710
|
+
function TypeScriptEmitter$emitGenerator$lambda_3($generatorOwnName) {
|
|
709
711
|
return function (it) {
|
|
710
712
|
return it === $generatorOwnName;
|
|
711
713
|
};
|
|
712
714
|
}
|
|
713
|
-
function
|
|
715
|
+
function TypeScriptEmitter$emitGenerator$lambda_4(it) {
|
|
714
716
|
return substringBefore(it, _Char___init__impl__6a9atx(60));
|
|
715
717
|
}
|
|
716
|
-
function
|
|
718
|
+
function TypeScriptEmitter$emitGenerator$lambda_5($generatorOwnName, $generatorRefs) {
|
|
717
719
|
return function (expr, t) {
|
|
718
720
|
var tmp;
|
|
719
721
|
var tmp_0;
|
|
720
722
|
var tmp_1;
|
|
721
723
|
if (expr instanceof RawExpression) {
|
|
722
|
-
tmp_1 = endsWith(expr.
|
|
724
|
+
tmp_1 = endsWith(expr.yx_1, 'Generator');
|
|
723
725
|
} else {
|
|
724
726
|
tmp_1 = false;
|
|
725
727
|
}
|
|
726
728
|
if (tmp_1) {
|
|
727
|
-
tmp_0 = !(expr.
|
|
729
|
+
tmp_0 = !(expr.yx_1 === $generatorOwnName);
|
|
728
730
|
} else {
|
|
729
731
|
tmp_0 = false;
|
|
730
732
|
}
|
|
731
733
|
if (tmp_0) {
|
|
732
|
-
$generatorRefs.x(expr.
|
|
734
|
+
$generatorRefs.x(expr.yx_1);
|
|
733
735
|
tmp = Unit_instance;
|
|
734
736
|
}
|
|
735
737
|
return transformChildren_1(expr, t);
|
|
736
738
|
};
|
|
737
739
|
}
|
|
738
|
-
function
|
|
740
|
+
function TypeScriptEmitter$emit$injectApiConst$lambda($endpoint) {
|
|
739
741
|
return function (element, transformer) {
|
|
740
742
|
var tmp;
|
|
741
743
|
if (element instanceof Namespace) {
|
|
@@ -743,23 +745,23 @@ function TypeScriptIrEmitter$emit$injectApiConst$lambda($endpoint) {
|
|
|
743
745
|
var tmp_0;
|
|
744
746
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
745
747
|
if (!injected.r()) {
|
|
746
|
-
// Inline function 'community.flock.wirespec.
|
|
747
|
-
var elements = plus(element.
|
|
748
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.withElements' call
|
|
749
|
+
var elements = plus(element.zu(), injected);
|
|
748
750
|
var tmp_1;
|
|
749
751
|
if (element instanceof File) {
|
|
750
|
-
tmp_1 = element.
|
|
752
|
+
tmp_1 = element.bv(VOID, elements);
|
|
751
753
|
} else {
|
|
752
754
|
if (element instanceof Struct) {
|
|
753
|
-
tmp_1 = element.
|
|
755
|
+
tmp_1 = element.ix(VOID, VOID, VOID, VOID, elements);
|
|
754
756
|
} else {
|
|
755
757
|
if (element instanceof Namespace) {
|
|
756
|
-
tmp_1 = element.
|
|
758
|
+
tmp_1 = element.iv(VOID, elements);
|
|
757
759
|
} else {
|
|
758
760
|
if (element instanceof Interface) {
|
|
759
|
-
tmp_1 = element.
|
|
761
|
+
tmp_1 = element.rv(VOID, elements);
|
|
760
762
|
} else {
|
|
761
763
|
if (element instanceof Enum) {
|
|
762
|
-
tmp_1 = element.
|
|
764
|
+
tmp_1 = element.ww(VOID, VOID, VOID, VOID, VOID, elements);
|
|
763
765
|
} else {
|
|
764
766
|
if (element instanceof Main) {
|
|
765
767
|
tmp_1 = element;
|
|
@@ -785,91 +787,91 @@ function TypeScriptIrEmitter$emit$injectApiConst$lambda($endpoint) {
|
|
|
785
787
|
};
|
|
786
788
|
}
|
|
787
789
|
function emit$injectApiConst(_this__u8e3s4, $endpoint) {
|
|
788
|
-
// Inline function 'community.flock.wirespec.
|
|
790
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
789
791
|
var scope = new TransformScope(_this__u8e3s4);
|
|
790
|
-
// Inline function 'community.flock.wirespec.
|
|
792
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.injectAfter' call
|
|
791
793
|
var tmp = scope;
|
|
792
|
-
// Inline function 'community.flock.wirespec.
|
|
793
|
-
// Inline function 'community.flock.wirespec.
|
|
794
|
-
var this_0 = scope.
|
|
795
|
-
// Inline function 'community.flock.wirespec.
|
|
794
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.injectAfter' call
|
|
795
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
796
|
+
var this_0 = scope.k17_1;
|
|
797
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
796
798
|
// Inline function 'kotlin.apply' call
|
|
797
799
|
var this_1 = new TransformerBuilder();
|
|
798
|
-
this_1.
|
|
799
|
-
var tmp$ret$
|
|
800
|
-
tmp.
|
|
801
|
-
var tmp_0 = scope.
|
|
800
|
+
this_1.e18(TypeScriptEmitter$emit$injectApiConst$lambda($endpoint));
|
|
801
|
+
var tmp$ret$5 = this_1.z17();
|
|
802
|
+
tmp.k17_1 = transform(this_0, tmp$ret$5);
|
|
803
|
+
var tmp_0 = scope.k17_1;
|
|
802
804
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
803
805
|
}
|
|
804
806
|
function emit$applyCallParamsIfNeeded(_this__u8e3s4, hasRequestParams) {
|
|
805
807
|
return hasRequestParams ? bindCallToRequestParams(_this__u8e3s4) : _this__u8e3s4;
|
|
806
808
|
}
|
|
807
|
-
function
|
|
809
|
+
function TypeScriptEmitter$emitClient$lambda(this$0) {
|
|
808
810
|
return function (it) {
|
|
809
|
-
var methodName = firstToLower(this$0, it.
|
|
811
|
+
var methodName = firstToLower(this$0, it.vq_1.m1());
|
|
810
812
|
return ' ...' + methodName + 'Client(serialization, transportation),';
|
|
811
813
|
};
|
|
812
814
|
}
|
|
813
|
-
function
|
|
815
|
+
function TypeScriptEmitter() {
|
|
814
816
|
Companion_getInstance_0();
|
|
815
|
-
this.
|
|
816
|
-
this.
|
|
817
|
+
this.y20_1 = TypeScriptGenerator_getInstance();
|
|
818
|
+
this.z20_1 = FileExtension_TypeScript_getInstance();
|
|
817
819
|
var tmp = this;
|
|
818
|
-
tmp.
|
|
820
|
+
tmp.a21_1 = lazy(TypeScriptEmitter$sanitizationConfig$delegate$lambda(this));
|
|
819
821
|
var tmp_0 = this;
|
|
820
|
-
tmp_0.
|
|
822
|
+
tmp_0.b21_1 = lazy(TypeScriptEmitter$modelSanitizationConfig$delegate$lambda(this));
|
|
821
823
|
}
|
|
822
|
-
protoOf(
|
|
823
|
-
return this.
|
|
824
|
+
protoOf(TypeScriptEmitter).x19 = function () {
|
|
825
|
+
return this.y20_1;
|
|
824
826
|
};
|
|
825
|
-
protoOf(
|
|
826
|
-
return this.
|
|
827
|
+
protoOf(TypeScriptEmitter).op = function () {
|
|
828
|
+
return this.z20_1;
|
|
827
829
|
};
|
|
828
|
-
protoOf(
|
|
829
|
-
var packageName = Companion_instance.
|
|
830
|
+
protoOf(TypeScriptEmitter).s19 = function () {
|
|
831
|
+
var packageName = Companion_instance.qs('community.flock.wirespec');
|
|
830
832
|
var api = 'export type Client<REQ extends Request<unknown>, RES extends Response<unknown>> = (serialization: Serialization) => {\n to: (request: REQ) => RawRequest;\n from: (response: RawResponse) => RES\n}\nexport type Server<REQ extends Request<unknown>, RES extends Response<unknown>> = (serialization: Serialization) => {\n from: (request: RawRequest) => REQ;\n to: (response: RES) => RawResponse\n}\nexport type Api<REQ extends Request<unknown>, RES extends Response<unknown>> = {\n name: string;\n method: Method,\n path: string,\n client: Client<REQ, RES>;\n server: Server<REQ, RES>\n}';
|
|
831
|
-
// Inline function 'community.flock.wirespec.
|
|
833
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
832
834
|
var this_0 = convert(packageName);
|
|
833
835
|
var scope = new TransformScope(this_0);
|
|
834
|
-
// Inline function 'community.flock.wirespec.
|
|
836
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.injectBefore' call
|
|
835
837
|
var tmp = scope;
|
|
836
|
-
// Inline function 'community.flock.wirespec.
|
|
837
|
-
// Inline function 'community.flock.wirespec.
|
|
838
|
-
var this_1 = scope.
|
|
839
|
-
// Inline function 'community.flock.wirespec.
|
|
838
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.injectBefore' call
|
|
839
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
840
|
+
var this_1 = scope.k17_1;
|
|
841
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
840
842
|
// Inline function 'kotlin.apply' call
|
|
841
843
|
var this_2 = new TransformerBuilder();
|
|
842
|
-
this_2.
|
|
843
|
-
var tmp$ret$
|
|
844
|
-
tmp.
|
|
845
|
-
// Inline function 'community.flock.wirespec.
|
|
844
|
+
this_2.e18(TypeScriptEmitter$emitShared$lambda);
|
|
845
|
+
var tmp$ret$5 = this_2.z17();
|
|
846
|
+
tmp.k17_1 = transform(this_1, tmp$ret$5);
|
|
847
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.injectAfter' call
|
|
846
848
|
var tmp_0 = scope;
|
|
847
|
-
// Inline function 'community.flock.wirespec.
|
|
848
|
-
// Inline function 'community.flock.wirespec.
|
|
849
|
-
var this_3 = scope.
|
|
850
|
-
// Inline function 'community.flock.wirespec.
|
|
849
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.injectAfter' call
|
|
850
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
851
|
+
var this_3 = scope.k17_1;
|
|
852
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
851
853
|
// Inline function 'kotlin.apply' call
|
|
852
854
|
var this_4 = new TransformerBuilder();
|
|
853
|
-
this_4.
|
|
854
|
-
var tmp$ret$
|
|
855
|
-
tmp_0.
|
|
856
|
-
// Inline function 'community.flock.wirespec.
|
|
855
|
+
this_4.e18(TypeScriptEmitter$emitShared$lambda_0(api));
|
|
856
|
+
var tmp$ret$11 = this_4.z17();
|
|
857
|
+
tmp_0.k17_1 = transform(this_3, tmp$ret$11);
|
|
858
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
857
859
|
var tmp_1 = scope;
|
|
858
|
-
// Inline function 'community.flock.wirespec.
|
|
859
|
-
var this_5 = scope.
|
|
860
|
-
// Inline function 'community.flock.wirespec.
|
|
860
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
861
|
+
var this_5 = scope.k17_1;
|
|
862
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
861
863
|
// Inline function 'kotlin.apply' call
|
|
862
864
|
var this_6 = new TransformerBuilder();
|
|
863
|
-
this_6.
|
|
864
|
-
var tmp$ret$
|
|
865
|
-
tmp_1.
|
|
866
|
-
var tmp_2 = scope.
|
|
865
|
+
this_6.e18(TypeScriptEmitter$emitShared$lambda_1);
|
|
866
|
+
var tmp$ret$16 = this_6.z17();
|
|
867
|
+
tmp_1.k17_1 = transform(this_5, tmp$ret$16);
|
|
868
|
+
var tmp_2 = scope.k17_1;
|
|
867
869
|
return isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
|
|
868
870
|
};
|
|
869
|
-
protoOf(
|
|
871
|
+
protoOf(TypeScriptEmitter).mo = function (ast, logger) {
|
|
870
872
|
var tmp = emit.call(this, ast, logger);
|
|
871
873
|
// Inline function 'arrow.core.NonEmptyList.flatMap' call
|
|
872
|
-
var this_0 = ast.
|
|
874
|
+
var this_0 = ast.xo_1;
|
|
873
875
|
// Inline function 'kotlin.collections.flatMap' call
|
|
874
876
|
var tmp0 = _NonEmptyList___get_all__impl__pmf509(this_0);
|
|
875
877
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
@@ -877,72 +879,82 @@ protoOf(TypeScriptIrEmitter).no = function (ast, logger) {
|
|
|
877
879
|
var _iterator__ex2g4s = tmp0.t();
|
|
878
880
|
while (_iterator__ex2g4s.u()) {
|
|
879
881
|
var element = _iterator__ex2g4s.v();
|
|
880
|
-
var list = new NonEmptyList(element.
|
|
882
|
+
var list = new NonEmptyList(element.zo_1);
|
|
881
883
|
addAll(destination, list);
|
|
882
884
|
}
|
|
883
|
-
var tmp$ret$
|
|
884
|
-
// Inline function 'kotlin.collections.
|
|
885
|
-
var tmp0_0 = new NonEmptyList(tmp$ret$
|
|
886
|
-
// Inline function 'kotlin.collections.
|
|
887
|
-
var destination_0 =
|
|
885
|
+
var tmp$ret$0 = _NonEmptyList___init__impl__fxd0xp(destination);
|
|
886
|
+
// Inline function 'kotlin.collections.filterNot' call
|
|
887
|
+
var tmp0_0 = new NonEmptyList(tmp$ret$0);
|
|
888
|
+
// Inline function 'kotlin.collections.filterNotTo' call
|
|
889
|
+
var destination_0 = ArrayList_init_$Create$();
|
|
888
890
|
var _iterator__ex2g4s_0 = tmp0_0.t();
|
|
889
891
|
while (_iterator__ex2g4s_0.u()) {
|
|
890
892
|
var element_0 = _iterator__ex2g4s_0.v();
|
|
891
|
-
|
|
893
|
+
if (!(element_0 instanceof Part)) {
|
|
894
|
+
destination_0.x(element_0);
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
// Inline function 'kotlin.collections.groupBy' call
|
|
898
|
+
// Inline function 'kotlin.collections.groupByTo' call
|
|
899
|
+
var destination_1 = LinkedHashMap_init_$Create$_0();
|
|
900
|
+
var _iterator__ex2g4s_1 = destination_0.t();
|
|
901
|
+
while (_iterator__ex2g4s_1.u()) {
|
|
902
|
+
var element_1 = _iterator__ex2g4s_1.v();
|
|
903
|
+
var key = namespace(element_1);
|
|
892
904
|
// Inline function 'kotlin.collections.getOrPut' call
|
|
893
|
-
var value =
|
|
905
|
+
var value = destination_1.q2(key);
|
|
894
906
|
var tmp_0;
|
|
895
907
|
if (value == null) {
|
|
896
908
|
var answer = ArrayList_init_$Create$();
|
|
897
|
-
|
|
909
|
+
destination_1.t2(key, answer);
|
|
898
910
|
tmp_0 = answer;
|
|
899
911
|
} else {
|
|
900
912
|
tmp_0 = value;
|
|
901
913
|
}
|
|
902
914
|
var list_0 = tmp_0;
|
|
903
|
-
list_0.x(
|
|
915
|
+
list_0.x(element_1);
|
|
904
916
|
}
|
|
905
917
|
// Inline function 'kotlin.collections.map' call
|
|
906
918
|
// Inline function 'kotlin.collections.mapTo' call
|
|
907
|
-
var
|
|
919
|
+
var destination_2 = ArrayList_init_$Create$_0(destination_1.b1());
|
|
908
920
|
// Inline function 'kotlin.collections.iterator' call
|
|
909
|
-
var
|
|
910
|
-
while (
|
|
911
|
-
var item =
|
|
921
|
+
var _iterator__ex2g4s_2 = destination_1.k1().t();
|
|
922
|
+
while (_iterator__ex2g4s_2.u()) {
|
|
923
|
+
var item = _iterator__ex2g4s_2.v();
|
|
912
924
|
// Inline function 'kotlin.collections.component1' call
|
|
913
925
|
var ns = item.l1();
|
|
914
926
|
// Inline function 'kotlin.collections.component2' call
|
|
915
927
|
var defs = item.m1();
|
|
916
|
-
var tmp_1 = ns + '/index.' + this.
|
|
917
|
-
var tmp$ret$
|
|
918
|
-
|
|
928
|
+
var tmp_1 = ns + '/index.' + this.op().nr_1;
|
|
929
|
+
var tmp$ret$15 = new Emitted(tmp_1, joinToString(defs, '\n', VOID, VOID, VOID, VOID, TypeScriptEmitter$emit$lambda));
|
|
930
|
+
destination_2.x(tmp$ret$15);
|
|
919
931
|
}
|
|
920
|
-
return NonEmptyList__plus_impl_xqmb9(tmp,
|
|
932
|
+
return NonEmptyList__plus_impl_xqmb9(tmp, destination_2);
|
|
921
933
|
};
|
|
922
|
-
protoOf(
|
|
934
|
+
protoOf(TypeScriptEmitter).sr = function (definition, module_0, logger) {
|
|
923
935
|
var file = emit_0.call(this, definition, module_0, logger);
|
|
924
|
-
var subPackageName = plus_1(Companion_instance.
|
|
925
|
-
return new File(Companion_getInstance().
|
|
936
|
+
var subPackageName = plus_1(Companion_instance.qs(''), definition);
|
|
937
|
+
return new File(Companion_getInstance().mt(subPackageName.ts() + sanitizeSymbol(this, file.xu_1.pt())), plus(listOf_0(import_0('../Wirespec', 'Wirespec')), file.yu_1));
|
|
926
938
|
};
|
|
927
|
-
protoOf(
|
|
939
|
+
protoOf(TypeScriptEmitter).a1a = function (definition, module_0) {
|
|
928
940
|
var tmp;
|
|
929
941
|
if (definition instanceof Type) {
|
|
930
942
|
tmp = convertToGenerator_2(definition, module_0);
|
|
931
943
|
} else {
|
|
932
944
|
if (definition instanceof Enum_0) {
|
|
933
|
-
// Inline function 'community.flock.wirespec.
|
|
945
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
934
946
|
var this_0 = convertToGenerator_1(definition);
|
|
935
947
|
var scope = new TransformScope(this_0);
|
|
936
|
-
scope.
|
|
937
|
-
var tmp_0 = scope.
|
|
948
|
+
scope.b18(TypeScriptEmitter$emitGenerator$lambda(definition));
|
|
949
|
+
var tmp_0 = scope.k17_1;
|
|
938
950
|
tmp = isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
939
951
|
} else {
|
|
940
952
|
if (definition instanceof Refined) {
|
|
941
|
-
// Inline function 'community.flock.wirespec.
|
|
953
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
942
954
|
var this_1 = convertToGenerator_0(definition);
|
|
943
955
|
var scope_0 = new TransformScope(this_1);
|
|
944
|
-
scope_0.
|
|
945
|
-
var tmp_1 = scope_0.
|
|
956
|
+
scope_0.b18(TypeScriptEmitter$emitGenerator$lambda_0(definition));
|
|
957
|
+
var tmp_1 = scope_0.k17_1;
|
|
946
958
|
tmp = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
947
959
|
} else {
|
|
948
960
|
if (definition instanceof Union) {
|
|
@@ -953,23 +965,23 @@ protoOf(TypeScriptIrEmitter).w1w = function (definition, module_0) {
|
|
|
953
965
|
}
|
|
954
966
|
}
|
|
955
967
|
}
|
|
956
|
-
// Inline function 'community.flock.wirespec.
|
|
968
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
957
969
|
var this_2 = sanitizeNames(tmp, _get_sanitizationConfig__sns434(this));
|
|
958
970
|
var scope_1 = new TransformScope(this_2);
|
|
959
|
-
scope_1.
|
|
960
|
-
var tmp_2 = scope_1.
|
|
971
|
+
scope_1.b18(TypeScriptEmitter$emitGenerator$lambda_1);
|
|
972
|
+
var tmp_2 = scope_1.k17_1;
|
|
961
973
|
var generatorFile = isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
|
|
962
|
-
var generatorOwnName = definition.
|
|
974
|
+
var generatorOwnName = definition.tr().m1() + 'Generator';
|
|
963
975
|
var tmp_3 = asSequence(collectCustomTypeNames(generatorFile));
|
|
964
|
-
var tmp_4 = filterNot(tmp_3,
|
|
965
|
-
var tmp_5 = filterNot(tmp_4,
|
|
966
|
-
var customNames = toList(distinct(map(tmp_5,
|
|
976
|
+
var tmp_4 = filterNot(tmp_3, TypeScriptEmitter$emitGenerator$lambda_2);
|
|
977
|
+
var tmp_5 = filterNot(tmp_4, TypeScriptEmitter$emitGenerator$lambda_3(generatorOwnName));
|
|
978
|
+
var customNames = toList(distinct(map(tmp_5, TypeScriptEmitter$emitGenerator$lambda_4)));
|
|
967
979
|
// Inline function 'kotlin.collections.mutableSetOf' call
|
|
968
980
|
var generatorRefs = LinkedHashSet_init_$Create$();
|
|
969
|
-
// Inline function 'community.flock.wirespec.
|
|
981
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
970
982
|
var scope_2 = new TransformScope(generatorFile);
|
|
971
|
-
scope_2.
|
|
972
|
-
var tmp_6 = scope_2.
|
|
983
|
+
scope_2.b18(TypeScriptEmitter$emitGenerator$lambda_5(generatorOwnName, generatorRefs));
|
|
984
|
+
var tmp_6 = scope_2.k17_1;
|
|
973
985
|
isInterface(tmp_6, Element) || THROW_CCE();
|
|
974
986
|
// Inline function 'kotlin.collections.filter' call
|
|
975
987
|
// Inline function 'kotlin.collections.filterTo' call
|
|
@@ -988,8 +1000,8 @@ protoOf(TypeScriptIrEmitter).w1w = function (definition, module_0) {
|
|
|
988
1000
|
var _iterator__ex2g4s_0 = this_3.t();
|
|
989
1001
|
while (_iterator__ex2g4s_0.u()) {
|
|
990
1002
|
var item = _iterator__ex2g4s_0.v();
|
|
991
|
-
var tmp$ret$
|
|
992
|
-
destination_0.x(tmp$ret$
|
|
1003
|
+
var tmp$ret$14 = import_0('./' + item, item);
|
|
1004
|
+
destination_0.x(tmp$ret$14);
|
|
993
1005
|
}
|
|
994
1006
|
var generatorImports = destination_0;
|
|
995
1007
|
// Inline function 'kotlin.collections.filterNot' call
|
|
@@ -1008,14 +1020,14 @@ protoOf(TypeScriptIrEmitter).w1w = function (definition, module_0) {
|
|
|
1008
1020
|
var _iterator__ex2g4s_2 = destination_1.t();
|
|
1009
1021
|
while (_iterator__ex2g4s_2.u()) {
|
|
1010
1022
|
var item_0 = _iterator__ex2g4s_2.v();
|
|
1011
|
-
var tmp$ret$
|
|
1012
|
-
destination_2.x(tmp$ret$
|
|
1023
|
+
var tmp$ret$20 = import_0('../model/' + item_0, item_0);
|
|
1024
|
+
destination_2.x(tmp$ret$20);
|
|
1013
1025
|
}
|
|
1014
1026
|
var modelImports = destination_2;
|
|
1015
|
-
var subPackageName = plus_2(Companion_instance.
|
|
1016
|
-
return new File(Companion_getInstance().
|
|
1027
|
+
var subPackageName = plus_2(Companion_instance.qs(''), 'generator');
|
|
1028
|
+
return new File(Companion_getInstance().mt(subPackageName.ts() + sanitizeSymbol(this, generatorFile.xu_1.pt())), plus(plus(plus(listOf_0(import_0('../Wirespec', 'Wirespec')), modelImports), generatorImports), generatorFile.yu_1));
|
|
1017
1029
|
};
|
|
1018
|
-
protoOf(
|
|
1030
|
+
protoOf(TypeScriptEmitter).ks = function (type, module_0) {
|
|
1019
1031
|
var fieldValidations = classifyValidatableFields(type, module_0);
|
|
1020
1032
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
1021
1033
|
var this_0 = importReferences(type);
|
|
@@ -1024,7 +1036,7 @@ protoOf(TypeScriptIrEmitter).cs = function (type, module_0) {
|
|
|
1024
1036
|
var _iterator__ex2g4s = this_0.t();
|
|
1025
1037
|
while (_iterator__ex2g4s.u()) {
|
|
1026
1038
|
var e = _iterator__ex2g4s.v();
|
|
1027
|
-
var key = e.
|
|
1039
|
+
var key = e.h18_1;
|
|
1028
1040
|
if (set.x(key)) {
|
|
1029
1041
|
list.x(e);
|
|
1030
1042
|
}
|
|
@@ -1035,8 +1047,8 @@ protoOf(TypeScriptIrEmitter).cs = function (type, module_0) {
|
|
|
1035
1047
|
var _iterator__ex2g4s_0 = list.t();
|
|
1036
1048
|
while (_iterator__ex2g4s_0.u()) {
|
|
1037
1049
|
var item = _iterator__ex2g4s_0.v();
|
|
1038
|
-
var tmp$ret$
|
|
1039
|
-
destination.x(tmp$ret$
|
|
1050
|
+
var tmp$ret$4 = import_0('./' + item.h18_1, item.h18_1);
|
|
1051
|
+
destination.x(tmp$ret$4);
|
|
1040
1052
|
}
|
|
1041
1053
|
var typeImports = destination;
|
|
1042
1054
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -1045,8 +1057,8 @@ protoOf(TypeScriptIrEmitter).cs = function (type, module_0) {
|
|
|
1045
1057
|
var _iterator__ex2g4s_1 = fieldValidations.t();
|
|
1046
1058
|
while (_iterator__ex2g4s_1.u()) {
|
|
1047
1059
|
var item_0 = _iterator__ex2g4s_1.v();
|
|
1048
|
-
var tmp$ret$
|
|
1049
|
-
destination_0.x(tmp$ret$
|
|
1060
|
+
var tmp$ret$7 = item_0.h19_1;
|
|
1061
|
+
destination_0.x(tmp$ret$7);
|
|
1050
1062
|
}
|
|
1051
1063
|
// Inline function 'kotlin.collections.filter' call
|
|
1052
1064
|
var tmp0 = distinct_0(destination_0);
|
|
@@ -1055,7 +1067,7 @@ protoOf(TypeScriptIrEmitter).cs = function (type, module_0) {
|
|
|
1055
1067
|
var _iterator__ex2g4s_2 = tmp0.t();
|
|
1056
1068
|
while (_iterator__ex2g4s_2.u()) {
|
|
1057
1069
|
var element = _iterator__ex2g4s_2.v();
|
|
1058
|
-
if (!(element === type.
|
|
1070
|
+
if (!(element === type.cp_1.m1())) {
|
|
1059
1071
|
destination_1.x(element);
|
|
1060
1072
|
}
|
|
1061
1073
|
}
|
|
@@ -1065,36 +1077,36 @@ protoOf(TypeScriptIrEmitter).cs = function (type, module_0) {
|
|
|
1065
1077
|
var _iterator__ex2g4s_3 = destination_1.t();
|
|
1066
1078
|
while (_iterator__ex2g4s_3.u()) {
|
|
1067
1079
|
var item_1 = _iterator__ex2g4s_3.v();
|
|
1068
|
-
var tmp$ret$
|
|
1069
|
-
destination_2.x(tmp$ret$
|
|
1080
|
+
var tmp$ret$13 = import_0('./' + item_1, 'validate' + item_1);
|
|
1081
|
+
destination_2.x(tmp$ret$13);
|
|
1070
1082
|
}
|
|
1071
1083
|
var validateImports = destination_2;
|
|
1072
1084
|
var allImports = plus(typeImports, validateImports);
|
|
1073
1085
|
// Inline function 'kotlin.collections.map' call
|
|
1074
|
-
var this_1 = type.
|
|
1086
|
+
var this_1 = get_fields_0(type.dp_1);
|
|
1075
1087
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1076
1088
|
var destination_3 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
|
|
1077
1089
|
var _iterator__ex2g4s_4 = this_1.t();
|
|
1078
1090
|
while (_iterator__ex2g4s_4.u()) {
|
|
1079
1091
|
var item_2 = _iterator__ex2g4s_4.v();
|
|
1080
|
-
var tmp$ret$
|
|
1081
|
-
destination_3.x(tmp$ret$
|
|
1092
|
+
var tmp$ret$16 = item_2.gp_1.m1();
|
|
1093
|
+
destination_3.x(tmp$ret$16);
|
|
1082
1094
|
}
|
|
1083
1095
|
var fieldNames = toSet(destination_3);
|
|
1084
|
-
var file = renameValidateAndBindObjReceiver(sanitizeNames(convertWithValidation(type, module_0), _get_modelSanitizationConfig__vgg831(this)), type.
|
|
1096
|
+
var file = renameValidateAndBindObjReceiver(sanitizeNames(convertWithValidation(type, module_0), _get_modelSanitizationConfig__vgg831(this)), type.cp_1.m1(), fieldNames);
|
|
1085
1097
|
var tmp;
|
|
1086
1098
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1087
1099
|
if (!allImports.r()) {
|
|
1088
|
-
tmp = file.
|
|
1100
|
+
tmp = file.bv(VOID, plus(allImports, file.yu_1));
|
|
1089
1101
|
} else {
|
|
1090
1102
|
tmp = file;
|
|
1091
1103
|
}
|
|
1092
1104
|
return tmp;
|
|
1093
1105
|
};
|
|
1094
|
-
protoOf(
|
|
1106
|
+
protoOf(TypeScriptEmitter).is = function (enum_0, module_0) {
|
|
1095
1107
|
return sanitizeNames(convert_0(enum_0), _get_sanitizationConfig__sns434(this));
|
|
1096
1108
|
};
|
|
1097
|
-
protoOf(
|
|
1109
|
+
protoOf(TypeScriptEmitter).yr = function (union) {
|
|
1098
1110
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
1099
1111
|
var this_0 = importReferences(union);
|
|
1100
1112
|
var set = HashSet_init_$Create$();
|
|
@@ -1102,7 +1114,7 @@ protoOf(TypeScriptIrEmitter).qr = function (union) {
|
|
|
1102
1114
|
var _iterator__ex2g4s = this_0.t();
|
|
1103
1115
|
while (_iterator__ex2g4s.u()) {
|
|
1104
1116
|
var e = _iterator__ex2g4s.v();
|
|
1105
|
-
var key = e.
|
|
1117
|
+
var key = e.h18_1;
|
|
1106
1118
|
if (set.x(key)) {
|
|
1107
1119
|
list.x(e);
|
|
1108
1120
|
}
|
|
@@ -1113,27 +1125,27 @@ protoOf(TypeScriptIrEmitter).qr = function (union) {
|
|
|
1113
1125
|
var _iterator__ex2g4s_0 = list.t();
|
|
1114
1126
|
while (_iterator__ex2g4s_0.u()) {
|
|
1115
1127
|
var item = _iterator__ex2g4s_0.v();
|
|
1116
|
-
var tmp$ret$
|
|
1117
|
-
destination.x(tmp$ret$
|
|
1128
|
+
var tmp$ret$4 = import_0('../model', item.h18_1, true);
|
|
1129
|
+
destination.x(tmp$ret$4);
|
|
1118
1130
|
}
|
|
1119
1131
|
var imports = destination;
|
|
1120
1132
|
var file = sanitizeNames(convert_1(union), _get_sanitizationConfig__sns434(this));
|
|
1121
1133
|
var tmp;
|
|
1122
1134
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1123
1135
|
if (!imports.r()) {
|
|
1124
|
-
tmp = file.
|
|
1136
|
+
tmp = file.bv(VOID, plus(imports, file.yu_1));
|
|
1125
1137
|
} else {
|
|
1126
1138
|
tmp = file;
|
|
1127
1139
|
}
|
|
1128
1140
|
return tmp;
|
|
1129
1141
|
};
|
|
1130
|
-
protoOf(
|
|
1142
|
+
protoOf(TypeScriptEmitter).ds = function (refined) {
|
|
1131
1143
|
var converted = convert_2(refined);
|
|
1132
|
-
var constraintExpr = convertConstraint(refined.
|
|
1133
|
-
var validatorStr = TypeScriptGenerator_getInstance().
|
|
1134
|
-
return new File(converted.
|
|
1144
|
+
var constraintExpr = convertConstraint(refined.cs_1, new VariableReference(Companion_getInstance().mt('value')));
|
|
1145
|
+
var validatorStr = TypeScriptGenerator_getInstance().o1a(constraintExpr);
|
|
1146
|
+
return new File(converted.xu_1, listOf([new RawElement('export type ' + converted.xu_1.pt() + ' = ' + emitTypeScriptReference(this, refined.cs_1) + ';'), new RawElement('export const validate' + refined.bs_1.m1() + ' = (value: ' + emitTypeScriptReference(this, refined.cs_1) + ') =>\n ' + validatorStr + ';')]));
|
|
1135
1147
|
};
|
|
1136
|
-
protoOf(
|
|
1148
|
+
protoOf(TypeScriptEmitter).js = function (endpoint) {
|
|
1137
1149
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
1138
1150
|
var this_0 = importReferences(endpoint);
|
|
1139
1151
|
var set = HashSet_init_$Create$();
|
|
@@ -1141,7 +1153,7 @@ protoOf(TypeScriptIrEmitter).bs = function (endpoint) {
|
|
|
1141
1153
|
var _iterator__ex2g4s = this_0.t();
|
|
1142
1154
|
while (_iterator__ex2g4s.u()) {
|
|
1143
1155
|
var e = _iterator__ex2g4s.v();
|
|
1144
|
-
var key = e.
|
|
1156
|
+
var key = e.h18_1;
|
|
1145
1157
|
if (set.x(key)) {
|
|
1146
1158
|
list.x(e);
|
|
1147
1159
|
}
|
|
@@ -1152,33 +1164,33 @@ protoOf(TypeScriptIrEmitter).bs = function (endpoint) {
|
|
|
1152
1164
|
var _iterator__ex2g4s_0 = list.t();
|
|
1153
1165
|
while (_iterator__ex2g4s_0.u()) {
|
|
1154
1166
|
var item = _iterator__ex2g4s_0.v();
|
|
1155
|
-
var tmp$ret$
|
|
1156
|
-
destination.x(tmp$ret$
|
|
1167
|
+
var tmp$ret$4 = import_0('../model', item.h18_1, true);
|
|
1168
|
+
destination.x(tmp$ret$4);
|
|
1157
1169
|
}
|
|
1158
1170
|
var imports = destination;
|
|
1159
1171
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1160
1172
|
var hasRequestParams = !requestParameters(endpoint).r();
|
|
1161
|
-
// Inline function 'community.flock.wirespec.
|
|
1173
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
1162
1174
|
var this_1 = stripTrailingSpaceFromErrorMessage(convert_3(endpoint));
|
|
1163
1175
|
var scope = new TransformScope(this_1);
|
|
1164
|
-
scope.
|
|
1165
|
-
var tmp = scope.
|
|
1166
|
-
var tmp$ret$
|
|
1176
|
+
scope.p17(transformPatternSwitchToValueSwitch());
|
|
1177
|
+
var tmp = scope.k17_1;
|
|
1178
|
+
var tmp$ret$6 = isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
1167
1179
|
// Inline function 'kotlin.let' call
|
|
1168
|
-
var it = sanitizeNames(emit$injectApiConst(emit$applyCallParamsIfNeeded(tmp$ret$
|
|
1180
|
+
var it = sanitizeNames(emit$injectApiConst(emit$applyCallParamsIfNeeded(tmp$ret$6, hasRequestParams), endpoint).bv(Companion_getInstance().mt(sanitize(this, endpoint.vq_1))), _get_sanitizationConfig__sns434(this));
|
|
1169
1181
|
var tmp_0;
|
|
1170
1182
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1171
1183
|
if (!imports.r()) {
|
|
1172
|
-
tmp_0 = it.
|
|
1184
|
+
tmp_0 = it.bv(VOID, plus(imports, it.yu_1));
|
|
1173
1185
|
} else {
|
|
1174
1186
|
tmp_0 = it;
|
|
1175
1187
|
}
|
|
1176
1188
|
return tmp_0;
|
|
1177
1189
|
};
|
|
1178
|
-
protoOf(
|
|
1190
|
+
protoOf(TypeScriptEmitter).xr = function (channel) {
|
|
1179
1191
|
return sanitizeNames(convert_4(channel), _get_sanitizationConfig__sns434(this));
|
|
1180
1192
|
};
|
|
1181
|
-
protoOf(
|
|
1193
|
+
protoOf(TypeScriptEmitter).wr = function (rpc) {
|
|
1182
1194
|
// Inline function 'kotlin.let' call
|
|
1183
1195
|
var file = sanitizeNames(convert_5(rpc), _get_sanitizationConfig__sns434(this));
|
|
1184
1196
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
@@ -1188,7 +1200,7 @@ protoOf(TypeScriptIrEmitter).or = function (rpc) {
|
|
|
1188
1200
|
var _iterator__ex2g4s = this_0.t();
|
|
1189
1201
|
while (_iterator__ex2g4s.u()) {
|
|
1190
1202
|
var e = _iterator__ex2g4s.v();
|
|
1191
|
-
var key = e.
|
|
1203
|
+
var key = e.h18_1;
|
|
1192
1204
|
if (set.x(key)) {
|
|
1193
1205
|
list.x(e);
|
|
1194
1206
|
}
|
|
@@ -1199,8 +1211,8 @@ protoOf(TypeScriptIrEmitter).or = function (rpc) {
|
|
|
1199
1211
|
var _iterator__ex2g4s_0 = list.t();
|
|
1200
1212
|
while (_iterator__ex2g4s_0.u()) {
|
|
1201
1213
|
var item = _iterator__ex2g4s_0.v();
|
|
1202
|
-
var tmp$ret$
|
|
1203
|
-
destination.x(tmp$ret$
|
|
1214
|
+
var tmp$ret$6 = import_0('../model', item.h18_1, true);
|
|
1215
|
+
destination.x(tmp$ret$6);
|
|
1204
1216
|
}
|
|
1205
1217
|
// Inline function 'kotlin.takeIf' call
|
|
1206
1218
|
var tmp;
|
|
@@ -1216,13 +1228,13 @@ protoOf(TypeScriptIrEmitter).or = function (rpc) {
|
|
|
1216
1228
|
tmp_0 = null;
|
|
1217
1229
|
} else {
|
|
1218
1230
|
// Inline function 'kotlin.let' call
|
|
1219
|
-
tmp_0 = file.
|
|
1231
|
+
tmp_0 = file.bv(VOID, plus(tmp0_safe_receiver, file.yu_1));
|
|
1220
1232
|
}
|
|
1221
1233
|
var tmp1_elvis_lhs = tmp_0;
|
|
1222
1234
|
return tmp1_elvis_lhs == null ? file : tmp1_elvis_lhs;
|
|
1223
1235
|
};
|
|
1224
|
-
protoOf(
|
|
1225
|
-
var endpointName = endpoint.
|
|
1236
|
+
protoOf(TypeScriptEmitter).z19 = function (endpoint) {
|
|
1237
|
+
var endpointName = endpoint.vq_1.m1();
|
|
1226
1238
|
var methodName = firstToLower(this, endpointName);
|
|
1227
1239
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
1228
1240
|
var this_0 = importReferences(endpoint);
|
|
@@ -1231,7 +1243,7 @@ protoOf(TypeScriptIrEmitter).v1w = function (endpoint) {
|
|
|
1231
1243
|
var _iterator__ex2g4s = this_0.t();
|
|
1232
1244
|
while (_iterator__ex2g4s.u()) {
|
|
1233
1245
|
var e = _iterator__ex2g4s.v();
|
|
1234
|
-
var key = e.
|
|
1246
|
+
var key = e.h18_1;
|
|
1235
1247
|
if (set.x(key)) {
|
|
1236
1248
|
list.x(e);
|
|
1237
1249
|
}
|
|
@@ -1242,8 +1254,8 @@ protoOf(TypeScriptIrEmitter).v1w = function (endpoint) {
|
|
|
1242
1254
|
var _iterator__ex2g4s_0 = list.t();
|
|
1243
1255
|
while (_iterator__ex2g4s_0.u()) {
|
|
1244
1256
|
var item = _iterator__ex2g4s_0.v();
|
|
1245
|
-
var tmp$ret$
|
|
1246
|
-
destination.x(tmp$ret$
|
|
1257
|
+
var tmp$ret$4 = import_0('../model', item.h18_1, true);
|
|
1258
|
+
destination.x(tmp$ret$4);
|
|
1247
1259
|
}
|
|
1248
1260
|
var imports = destination;
|
|
1249
1261
|
var params = buildEndpointParams(this, endpoint);
|
|
@@ -1264,7 +1276,7 @@ protoOf(TypeScriptIrEmitter).v1w = function (endpoint) {
|
|
|
1264
1276
|
}
|
|
1265
1277
|
var requestArgs = tmp_0;
|
|
1266
1278
|
var code = trimMargin('\n |export const ' + methodName + 'Client = (serialization: Wirespec.Serialization, transportation: Wirespec.Transportation) => ({\n | ' + methodName + ': async (' + paramList + '): Promise<' + endpointName + '.Response<unknown>> => {\n | const request: ' + endpointName + '.Request = ' + requestArgs + ';\n | const rawRequest = ' + endpointName + '.toRawRequest(serialization, request);\n | const rawResponse = await transportation.transport(rawRequest);\n | return ' + endpointName + '.fromRawResponse(serialization, rawResponse);\n | }\n |})\n ');
|
|
1267
|
-
var tmp_1 = Companion_getInstance().
|
|
1279
|
+
var tmp_1 = Companion_getInstance().mt('client/' + endpointName + 'Client');
|
|
1268
1280
|
// Inline function 'kotlin.collections.buildList' call
|
|
1269
1281
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
1270
1282
|
// Inline function 'kotlin.apply' call
|
|
@@ -1273,25 +1285,25 @@ protoOf(TypeScriptIrEmitter).v1w = function (endpoint) {
|
|
|
1273
1285
|
this_1.x(import_0('../endpoint/' + endpointName, endpointName));
|
|
1274
1286
|
this_1.g1(imports);
|
|
1275
1287
|
this_1.x(new RawElement(code));
|
|
1276
|
-
var tmp$ret$
|
|
1277
|
-
return new File(tmp_1, tmp$ret$
|
|
1288
|
+
var tmp$ret$7 = this_1.p5();
|
|
1289
|
+
return new File(tmp_1, tmp$ret$7);
|
|
1278
1290
|
};
|
|
1279
|
-
protoOf(
|
|
1280
|
-
logger.
|
|
1291
|
+
protoOf(TypeScriptEmitter).t19 = function (endpoints, logger) {
|
|
1292
|
+
logger.qr('Emitting main Client for ' + endpoints.b1() + ' endpoints');
|
|
1281
1293
|
// Inline function 'kotlin.collections.map' call
|
|
1282
1294
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1283
1295
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(endpoints, 10));
|
|
1284
1296
|
var _iterator__ex2g4s = endpoints.t();
|
|
1285
1297
|
while (_iterator__ex2g4s.u()) {
|
|
1286
1298
|
var item = _iterator__ex2g4s.v();
|
|
1287
|
-
var methodName = firstToLower(this, item.
|
|
1288
|
-
var tmp$ret$
|
|
1289
|
-
destination.x(tmp$ret$
|
|
1299
|
+
var methodName = firstToLower(this, item.vq_1.m1());
|
|
1300
|
+
var tmp$ret$2 = import_0('./client/' + item.vq_1.m1() + 'Client', methodName + 'Client');
|
|
1301
|
+
destination.x(tmp$ret$2);
|
|
1290
1302
|
}
|
|
1291
1303
|
var clientImports = destination;
|
|
1292
|
-
var spreadEntries = joinToString(endpoints, '\n', VOID, VOID, VOID, VOID,
|
|
1304
|
+
var spreadEntries = joinToString(endpoints, '\n', VOID, VOID, VOID, VOID, TypeScriptEmitter$emitClient$lambda(this));
|
|
1293
1305
|
var code = trimMargin('\n |export const client = (serialization: Wirespec.Serialization, transportation: Wirespec.Transportation) => ({\n |' + spreadEntries + '\n |})\n ');
|
|
1294
|
-
var tmp = Companion_getInstance().
|
|
1306
|
+
var tmp = Companion_getInstance().mt('Client');
|
|
1295
1307
|
// Inline function 'kotlin.collections.buildList' call
|
|
1296
1308
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
1297
1309
|
// Inline function 'kotlin.apply' call
|
|
@@ -1299,35 +1311,35 @@ protoOf(TypeScriptIrEmitter).s1w = function (endpoints, logger) {
|
|
|
1299
1311
|
this_0.x(import_0('./Wirespec', 'Wirespec'));
|
|
1300
1312
|
this_0.g1(clientImports);
|
|
1301
1313
|
this_0.x(new RawElement(code));
|
|
1302
|
-
var tmp$ret$
|
|
1303
|
-
return new File(tmp, tmp$ret$
|
|
1314
|
+
var tmp$ret$3 = this_0.p5();
|
|
1315
|
+
return new File(tmp, tmp$ret$3);
|
|
1304
1316
|
};
|
|
1305
1317
|
function transformPatternSwitchToValueSwitch() {
|
|
1306
|
-
// Inline function 'community.flock.wirespec.
|
|
1318
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1307
1319
|
// Inline function 'kotlin.apply' call
|
|
1308
1320
|
var this_0 = new TransformerBuilder();
|
|
1309
|
-
this_0.
|
|
1310
|
-
return this_0.
|
|
1321
|
+
this_0.a18(transformPatternSwitchToValueSwitch$lambda);
|
|
1322
|
+
return this_0.z17();
|
|
1311
1323
|
}
|
|
1312
1324
|
function renameValidateAndBindObjReceiver(_this__u8e3s4, typeName, fieldNames) {
|
|
1313
|
-
// Inline function 'community.flock.wirespec.
|
|
1325
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
1314
1326
|
var scope = new TransformScope(_this__u8e3s4);
|
|
1315
|
-
// Inline function 'community.flock.wirespec.
|
|
1327
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
1316
1328
|
var tmp = scope;
|
|
1317
|
-
// Inline function 'community.flock.wirespec.
|
|
1318
|
-
var this_0 = scope.
|
|
1319
|
-
// Inline function 'community.flock.wirespec.
|
|
1329
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
1330
|
+
var this_0 = scope.k17_1;
|
|
1331
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1320
1332
|
// Inline function 'kotlin.apply' call
|
|
1321
1333
|
var this_1 = new TransformerBuilder();
|
|
1322
|
-
this_1.
|
|
1323
|
-
var tmp$ret$
|
|
1324
|
-
tmp.
|
|
1325
|
-
var tmp_0 = scope.
|
|
1334
|
+
this_1.e18(renameValidateAndBindObjReceiver$lambda(typeName, fieldNames));
|
|
1335
|
+
var tmp$ret$4 = this_1.z17();
|
|
1336
|
+
tmp.k17_1 = transform(this_0, tmp$ret$4);
|
|
1337
|
+
var tmp_0 = scope.k17_1;
|
|
1326
1338
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1327
1339
|
}
|
|
1328
1340
|
function buildApiConst(endpoint) {
|
|
1329
1341
|
// Inline function 'kotlin.text.replaceFirstChar' call
|
|
1330
|
-
var this_0 = endpoint.
|
|
1342
|
+
var this_0 = endpoint.vq_1.m1();
|
|
1331
1343
|
var tmp;
|
|
1332
1344
|
// Inline function 'kotlin.text.isNotEmpty' call
|
|
1333
1345
|
if (charSequenceLength(this_0) > 0) {
|
|
@@ -1335,37 +1347,37 @@ function buildApiConst(endpoint) {
|
|
|
1335
1347
|
var this_1 = charCodeAt(this_0, 0);
|
|
1336
1348
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1337
1349
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1338
|
-
var tmp$ret$
|
|
1339
|
-
tmp = toString_0(tmp$ret$
|
|
1350
|
+
var tmp$ret$2 = toString(this_1).toLowerCase();
|
|
1351
|
+
tmp = toString_0(tmp$ret$2) + substring(this_0, 1);
|
|
1340
1352
|
} else {
|
|
1341
1353
|
tmp = this_0;
|
|
1342
1354
|
}
|
|
1343
1355
|
var apiName = tmp;
|
|
1344
|
-
var method = endpoint.
|
|
1345
|
-
var pathString = joinToString(endpoint.
|
|
1356
|
+
var method = endpoint.wq_1.b3_1;
|
|
1357
|
+
var pathString = joinToString(endpoint.xq_1, '/', VOID, VOID, VOID, VOID, buildApiConst$lambda);
|
|
1346
1358
|
return raw(trimMargin('\n |export const client:Wirespec.Client<Request, Response> = (serialization: Wirespec.Serialization) => ({\n | from: (it) => fromRawResponse(serialization, it),\n | to: (it) => toRawRequest(serialization, it)\n |})\n |export const server:Wirespec.Server<Request, Response> = (serialization: Wirespec.Serialization) => ({\n | from: (it) => fromRawRequest(serialization, it),\n | to: (it) => toRawResponse(serialization, it)\n |})\n |export const api = {\n | name: "' + apiName + '",\n | method: "' + method + '",\n | path: "' + pathString + '",\n | server,\n | client\n |} as const\n '));
|
|
1347
1359
|
}
|
|
1348
1360
|
function bindCallToRequestParams(_this__u8e3s4) {
|
|
1349
|
-
// Inline function 'community.flock.wirespec.
|
|
1361
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
1350
1362
|
var scope = new TransformScope(_this__u8e3s4);
|
|
1351
|
-
// Inline function 'community.flock.wirespec.
|
|
1363
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.TransformScope.matchingElements' call
|
|
1352
1364
|
var tmp = scope;
|
|
1353
|
-
// Inline function 'community.flock.wirespec.
|
|
1354
|
-
var this_0 = scope.
|
|
1355
|
-
// Inline function 'community.flock.wirespec.
|
|
1365
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformMatchingElements' call
|
|
1366
|
+
var this_0 = scope.k17_1;
|
|
1367
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transformer' call
|
|
1356
1368
|
// Inline function 'kotlin.apply' call
|
|
1357
1369
|
var this_1 = new TransformerBuilder();
|
|
1358
|
-
this_1.
|
|
1359
|
-
var tmp$ret$
|
|
1360
|
-
tmp.
|
|
1361
|
-
var tmp_0 = scope.
|
|
1370
|
+
this_1.e18(bindCallToRequestParams$lambda);
|
|
1371
|
+
var tmp$ret$4 = this_1.z17();
|
|
1372
|
+
tmp.k17_1 = transform(this_0, tmp$ret$4);
|
|
1373
|
+
var tmp_0 = scope.k17_1;
|
|
1362
1374
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1363
1375
|
}
|
|
1364
1376
|
function stripTrailingSpaceFromErrorMessage(_this__u8e3s4) {
|
|
1365
|
-
// Inline function 'community.flock.wirespec.
|
|
1377
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
1366
1378
|
var scope = new TransformScope(_this__u8e3s4);
|
|
1367
|
-
scope.
|
|
1368
|
-
var tmp = scope.
|
|
1379
|
+
scope.a18(stripTrailingSpaceFromErrorMessage$lambda);
|
|
1380
|
+
var tmp = scope.k17_1;
|
|
1369
1381
|
return isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
1370
1382
|
}
|
|
1371
1383
|
function transformPatternSwitchToValueSwitch$lambda(stmt, tr) {
|
|
@@ -1373,7 +1385,7 @@ function transformPatternSwitchToValueSwitch$lambda(stmt, tr) {
|
|
|
1373
1385
|
if (!(stmt instanceof Switch)) {
|
|
1374
1386
|
tmp = true;
|
|
1375
1387
|
} else {
|
|
1376
|
-
var tmp0 = stmt.
|
|
1388
|
+
var tmp0 = stmt.ly_1;
|
|
1377
1389
|
var tmp$ret$0;
|
|
1378
1390
|
$l$block_0: {
|
|
1379
1391
|
// Inline function 'kotlin.collections.none' call
|
|
@@ -1390,7 +1402,7 @@ function transformPatternSwitchToValueSwitch$lambda(stmt, tr) {
|
|
|
1390
1402
|
var _iterator__ex2g4s = tmp0.t();
|
|
1391
1403
|
while (_iterator__ex2g4s.u()) {
|
|
1392
1404
|
var element = _iterator__ex2g4s.v();
|
|
1393
|
-
if (!(element.
|
|
1405
|
+
if (!(element.sy_1 == null)) {
|
|
1394
1406
|
tmp$ret$0 = false;
|
|
1395
1407
|
break $l$block_0;
|
|
1396
1408
|
}
|
|
@@ -1401,60 +1413,60 @@ function transformPatternSwitchToValueSwitch$lambda(stmt, tr) {
|
|
|
1401
1413
|
}
|
|
1402
1414
|
if (tmp)
|
|
1403
1415
|
return transformChildren(stmt, tr);
|
|
1404
|
-
var tmp0_safe_receiver = stmt.
|
|
1405
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1416
|
+
var tmp0_safe_receiver = stmt.ny_1;
|
|
1417
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ot();
|
|
1406
1418
|
var varName = tmp1_elvis_lhs == null ? 'r' : tmp1_elvis_lhs;
|
|
1407
1419
|
// Inline function 'kotlin.collections.map' call
|
|
1408
|
-
var this_0 = stmt.
|
|
1420
|
+
var this_0 = stmt.ly_1;
|
|
1409
1421
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1410
1422
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
1411
1423
|
var _iterator__ex2g4s_0 = this_0.t();
|
|
1412
1424
|
while (_iterator__ex2g4s_0.u()) {
|
|
1413
1425
|
var item = _iterator__ex2g4s_0.v();
|
|
1414
|
-
var tmp$ret$
|
|
1426
|
+
var tmp$ret$4;
|
|
1415
1427
|
$l$block_1: {
|
|
1416
|
-
var tmp_1 = item.
|
|
1417
|
-
var tmp0_safe_receiver_0 = tmp_1 instanceof
|
|
1418
|
-
var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.
|
|
1419
|
-
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
1428
|
+
var tmp_1 = item.sy_1;
|
|
1429
|
+
var tmp0_safe_receiver_0 = tmp_1 instanceof Custom_0 ? tmp_1 : null;
|
|
1430
|
+
var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.gu_1;
|
|
1431
|
+
var typeName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.pt();
|
|
1420
1432
|
var tmp3_safe_receiver = typeName == null ? null : substringAfterLast(typeName, '.');
|
|
1421
1433
|
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : removePrefix(tmp3_safe_receiver, 'Response');
|
|
1422
1434
|
var statusNum = tmp4_safe_receiver == null ? null : toIntOrNull(tmp4_safe_receiver);
|
|
1423
1435
|
if (statusNum == null) {
|
|
1424
1436
|
// Inline function 'kotlin.collections.map' call
|
|
1425
|
-
var this_1 = item.
|
|
1437
|
+
var this_1 = item.ry_1;
|
|
1426
1438
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1427
1439
|
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
|
|
1428
1440
|
var _iterator__ex2g4s_1 = this_1.t();
|
|
1429
1441
|
while (_iterator__ex2g4s_1.u()) {
|
|
1430
1442
|
var item_0 = _iterator__ex2g4s_1.v();
|
|
1431
|
-
var tmp$ret$
|
|
1432
|
-
destination_0.x(tmp$ret$
|
|
1443
|
+
var tmp$ret$7 = tr.e17(item_0);
|
|
1444
|
+
destination_0.x(tmp$ret$7);
|
|
1433
1445
|
}
|
|
1434
|
-
tmp$ret$
|
|
1446
|
+
tmp$ret$4 = item.uy(VOID, destination_0);
|
|
1435
1447
|
break $l$block_1;
|
|
1436
1448
|
}
|
|
1437
|
-
var exprCode = TypeScriptGenerator_getInstance().
|
|
1438
|
-
var castAssignment = new Assignment(Companion_getInstance().
|
|
1439
|
-
var tmp_2 = new Literal(statusNum, new
|
|
1449
|
+
var exprCode = TypeScriptGenerator_getInstance().o1a(tr.f17(stmt.ky_1));
|
|
1450
|
+
var castAssignment = new Assignment(Companion_getInstance().mt(varName), new RawExpression(exprCode + ' as ' + typeName), false);
|
|
1451
|
+
var tmp_2 = new Literal(statusNum, new Integer_0());
|
|
1440
1452
|
var tmp_3 = listOf_0(castAssignment);
|
|
1441
1453
|
// Inline function 'kotlin.collections.map' call
|
|
1442
|
-
var this_2 = item.
|
|
1454
|
+
var this_2 = item.ry_1;
|
|
1443
1455
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1444
1456
|
var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
|
|
1445
1457
|
var _iterator__ex2g4s_2 = this_2.t();
|
|
1446
1458
|
while (_iterator__ex2g4s_2.u()) {
|
|
1447
1459
|
var item_1 = _iterator__ex2g4s_2.v();
|
|
1448
|
-
var tmp$ret$
|
|
1449
|
-
destination_1.x(tmp$ret$
|
|
1460
|
+
var tmp$ret$10 = tr.e17(item_1);
|
|
1461
|
+
destination_1.x(tmp$ret$10);
|
|
1450
1462
|
}
|
|
1451
|
-
tmp$ret$
|
|
1463
|
+
tmp$ret$4 = new Case(tmp_2, plus(tmp_3, destination_1), null);
|
|
1452
1464
|
}
|
|
1453
|
-
destination.x(tmp$ret$
|
|
1465
|
+
destination.x(tmp$ret$4);
|
|
1454
1466
|
}
|
|
1455
1467
|
var transformedCases = destination;
|
|
1456
|
-
var tmp_4 = new FieldCall(tr.
|
|
1457
|
-
var tmp2_safe_receiver = stmt.
|
|
1468
|
+
var tmp_4 = new FieldCall(tr.f17(stmt.ky_1), Companion_getInstance().mt('status'));
|
|
1469
|
+
var tmp2_safe_receiver = stmt.my_1;
|
|
1458
1470
|
var tmp_5;
|
|
1459
1471
|
if (tmp2_safe_receiver == null) {
|
|
1460
1472
|
tmp_5 = null;
|
|
@@ -1465,8 +1477,8 @@ function transformPatternSwitchToValueSwitch$lambda(stmt, tr) {
|
|
|
1465
1477
|
var _iterator__ex2g4s_3 = tmp2_safe_receiver.t();
|
|
1466
1478
|
while (_iterator__ex2g4s_3.u()) {
|
|
1467
1479
|
var item_2 = _iterator__ex2g4s_3.v();
|
|
1468
|
-
var tmp$ret$
|
|
1469
|
-
destination_2.x(tmp$ret$
|
|
1480
|
+
var tmp$ret$13 = tr.e17(item_2);
|
|
1481
|
+
destination_2.x(tmp$ret$13);
|
|
1470
1482
|
}
|
|
1471
1483
|
tmp_5 = destination_2;
|
|
1472
1484
|
}
|
|
@@ -1478,9 +1490,9 @@ function renameValidateAndBindObjReceiver$lambda$lambda($fieldNames) {
|
|
|
1478
1490
|
var tmp_0;
|
|
1479
1491
|
if (s instanceof FunctionCall) {
|
|
1480
1492
|
var tmp_1;
|
|
1481
|
-
if (s.
|
|
1493
|
+
if (s.ut_1.equals(Companion_getInstance().mt('validate')) && !(s.st_1 == null)) {
|
|
1482
1494
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1483
|
-
tmp_1 = !s.
|
|
1495
|
+
tmp_1 = !s.tt_1.r();
|
|
1484
1496
|
} else {
|
|
1485
1497
|
tmp_1 = false;
|
|
1486
1498
|
}
|
|
@@ -1489,21 +1501,21 @@ function renameValidateAndBindObjReceiver$lambda$lambda($fieldNames) {
|
|
|
1489
1501
|
tmp_0 = false;
|
|
1490
1502
|
}
|
|
1491
1503
|
if (tmp_0) {
|
|
1492
|
-
var tmp_2 = first(s.
|
|
1493
|
-
var tmp1_safe_receiver = tmp_2 instanceof
|
|
1494
|
-
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
1495
|
-
var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.
|
|
1504
|
+
var tmp_2 = first(s.tt_1);
|
|
1505
|
+
var tmp1_safe_receiver = tmp_2 instanceof Custom_0 ? tmp_2 : null;
|
|
1506
|
+
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.gu_1;
|
|
1507
|
+
var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.pt();
|
|
1496
1508
|
var tn = tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs;
|
|
1497
|
-
tmp = new FunctionCall(VOID, VOID, Companion_getInstance().
|
|
1509
|
+
tmp = new FunctionCall(VOID, VOID, Companion_getInstance().mt('validate' + tn), mapOf(to(Companion_getInstance().mt('obj'), t.f17(ensureNotNull(s.st_1)))));
|
|
1498
1510
|
} else {
|
|
1499
1511
|
var tmp_3;
|
|
1500
1512
|
if (s instanceof FieldCall) {
|
|
1501
|
-
tmp_3 = (s.
|
|
1513
|
+
tmp_3 = (s.vy_1 == null && $fieldNames.v1(s.wy_1.ot()));
|
|
1502
1514
|
} else {
|
|
1503
1515
|
tmp_3 = false;
|
|
1504
1516
|
}
|
|
1505
1517
|
if (tmp_3) {
|
|
1506
|
-
tmp = new FieldCall(new VariableReference(Companion_getInstance().
|
|
1518
|
+
tmp = new FieldCall(new VariableReference(Companion_getInstance().mt('obj')), s.wy_1);
|
|
1507
1519
|
} else {
|
|
1508
1520
|
tmp = transformChildren(s, t);
|
|
1509
1521
|
}
|
|
@@ -1517,15 +1529,15 @@ function renameValidateAndBindObjReceiver$lambda($typeName, $fieldNames) {
|
|
|
1517
1529
|
if (element instanceof Function) {
|
|
1518
1530
|
var tmp$ret$0;
|
|
1519
1531
|
$l$block: {
|
|
1520
|
-
if (!element.
|
|
1532
|
+
if (!element.jx_1.equals(Companion_getInstance().mt('validate'))) {
|
|
1521
1533
|
tmp$ret$0 = element;
|
|
1522
1534
|
break $l$block;
|
|
1523
1535
|
}
|
|
1524
|
-
// Inline function 'community.flock.wirespec.
|
|
1525
|
-
var this_0 = element.
|
|
1536
|
+
// Inline function 'community.flock.wirespec.compiler.core.ir.transform' call
|
|
1537
|
+
var this_0 = element.vx(Companion_getInstance().mt('validate' + $typeName), VOID, listOf_0(new Parameter(Companion_getInstance().mt('obj'), Custom_init_$Create$($typeName))));
|
|
1526
1538
|
var scope = new TransformScope(this_0);
|
|
1527
|
-
scope.
|
|
1528
|
-
var tmp_0 = scope.
|
|
1539
|
+
scope.c18(renameValidateAndBindObjReceiver$lambda$lambda($fieldNames));
|
|
1540
|
+
var tmp_0 = scope.k17_1;
|
|
1529
1541
|
tmp$ret$0 = isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1530
1542
|
}
|
|
1531
1543
|
tmp = tmp$ret$0;
|
|
@@ -1539,10 +1551,10 @@ function renameValidateAndBindObjReceiver$lambda($typeName, $fieldNames) {
|
|
|
1539
1551
|
function buildApiConst$lambda(it) {
|
|
1540
1552
|
var tmp;
|
|
1541
1553
|
if (it instanceof Literal_0) {
|
|
1542
|
-
tmp = it.
|
|
1554
|
+
tmp = it.q19_1;
|
|
1543
1555
|
} else {
|
|
1544
1556
|
if (it instanceof Param) {
|
|
1545
|
-
tmp = '{' + it.
|
|
1557
|
+
tmp = '{' + it.cr_1.m1() + '}';
|
|
1546
1558
|
} else {
|
|
1547
1559
|
noWhenBranchMatchedException();
|
|
1548
1560
|
}
|
|
@@ -1554,23 +1566,23 @@ function bindCallToRequestParams$lambda(element, transformer) {
|
|
|
1554
1566
|
if (element instanceof Interface) {
|
|
1555
1567
|
var tmp$ret$0;
|
|
1556
1568
|
$l$block: {
|
|
1557
|
-
if (!element.
|
|
1569
|
+
if (!element.jv_1.equals(Companion_getInstance().mt('Call'))) {
|
|
1558
1570
|
tmp$ret$0 = element;
|
|
1559
1571
|
break $l$block;
|
|
1560
1572
|
}
|
|
1561
1573
|
// Inline function 'kotlin.collections.map' call
|
|
1562
|
-
var this_0 = element.
|
|
1574
|
+
var this_0 = element.kv_1;
|
|
1563
1575
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1564
1576
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
1565
1577
|
var _iterator__ex2g4s = this_0.t();
|
|
1566
1578
|
while (_iterator__ex2g4s.u()) {
|
|
1567
1579
|
var item = _iterator__ex2g4s.v();
|
|
1568
1580
|
var tmp0_safe_receiver = item instanceof Function ? item : null;
|
|
1569
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1570
|
-
var tmp$ret$
|
|
1571
|
-
destination.x(tmp$ret$
|
|
1581
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vx(VOID, VOID, listOf_0(new Parameter(Companion_getInstance().mt('params'), Custom_init_$Create$('RequestParams'))));
|
|
1582
|
+
var tmp$ret$3 = tmp1_elvis_lhs == null ? item : tmp1_elvis_lhs;
|
|
1583
|
+
destination.x(tmp$ret$3);
|
|
1572
1584
|
}
|
|
1573
|
-
tmp$ret$0 = element.
|
|
1585
|
+
tmp$ret$0 = element.rv(VOID, destination);
|
|
1574
1586
|
}
|
|
1575
1587
|
tmp = tmp$ret$0;
|
|
1576
1588
|
} else {
|
|
@@ -1582,7 +1594,7 @@ function bindCallToRequestParams$lambda(element, transformer) {
|
|
|
1582
1594
|
function stripTrailingSpaceFromErrorMessage$lambda(stmt, transformer) {
|
|
1583
1595
|
var tmp;
|
|
1584
1596
|
if (stmt instanceof Switch) {
|
|
1585
|
-
var tmp1_safe_receiver = stmt.
|
|
1597
|
+
var tmp1_safe_receiver = stmt.my_1;
|
|
1586
1598
|
var tmp_0;
|
|
1587
1599
|
if (tmp1_safe_receiver == null) {
|
|
1588
1600
|
tmp_0 = null;
|
|
@@ -1593,57 +1605,58 @@ function stripTrailingSpaceFromErrorMessage$lambda(stmt, transformer) {
|
|
|
1593
1605
|
var _iterator__ex2g4s = tmp1_safe_receiver.t();
|
|
1594
1606
|
while (_iterator__ex2g4s.u()) {
|
|
1595
1607
|
var item = _iterator__ex2g4s.v();
|
|
1596
|
-
var tmp$ret$
|
|
1608
|
+
var tmp$ret$2;
|
|
1597
1609
|
$l$block_1: {
|
|
1598
1610
|
var tmp0_elvis_lhs = item instanceof ErrorStatement ? item : null;
|
|
1599
1611
|
var tmp_1;
|
|
1600
1612
|
if (tmp0_elvis_lhs == null) {
|
|
1601
|
-
tmp$ret$
|
|
1613
|
+
tmp$ret$2 = item;
|
|
1602
1614
|
break $l$block_1;
|
|
1603
1615
|
} else {
|
|
1604
1616
|
tmp_1 = tmp0_elvis_lhs;
|
|
1605
1617
|
}
|
|
1606
1618
|
var errorStmt = tmp_1;
|
|
1607
|
-
var tmp_2 = errorStmt.
|
|
1619
|
+
var tmp_2 = errorStmt.ez_1;
|
|
1608
1620
|
var tmp1_elvis_lhs = tmp_2 instanceof BinaryOp ? tmp_2 : null;
|
|
1609
1621
|
var tmp_3;
|
|
1610
1622
|
if (tmp1_elvis_lhs == null) {
|
|
1611
|
-
tmp$ret$
|
|
1623
|
+
tmp$ret$2 = item;
|
|
1612
1624
|
break $l$block_1;
|
|
1613
1625
|
} else {
|
|
1614
1626
|
tmp_3 = tmp1_elvis_lhs;
|
|
1615
1627
|
}
|
|
1616
1628
|
var binary = tmp_3;
|
|
1617
|
-
var tmp_4 = binary.
|
|
1629
|
+
var tmp_4 = binary.fz_1;
|
|
1618
1630
|
var tmp2_elvis_lhs = tmp_4 instanceof Literal ? tmp_4 : null;
|
|
1619
1631
|
var tmp_5;
|
|
1620
1632
|
if (tmp2_elvis_lhs == null) {
|
|
1621
|
-
tmp$ret$
|
|
1633
|
+
tmp$ret$2 = item;
|
|
1622
1634
|
break $l$block_1;
|
|
1623
1635
|
} else {
|
|
1624
1636
|
tmp_5 = tmp2_elvis_lhs;
|
|
1625
1637
|
}
|
|
1626
1638
|
var literal = tmp_5;
|
|
1627
|
-
tmp$ret$
|
|
1639
|
+
tmp$ret$2 = new ErrorStatement(new Literal(trimEnd(toString_0(literal.gy_1), charArrayOf([_Char___init__impl__6a9atx(32)])), literal.hy_1));
|
|
1628
1640
|
}
|
|
1629
|
-
destination.x(tmp$ret$
|
|
1641
|
+
destination.x(tmp$ret$2);
|
|
1630
1642
|
}
|
|
1631
1643
|
tmp_0 = destination;
|
|
1632
1644
|
}
|
|
1633
|
-
tmp = transformChildren(stmt.
|
|
1645
|
+
tmp = transformChildren(stmt.py(VOID, VOID, tmp_0), transformer);
|
|
1634
1646
|
} else {
|
|
1635
1647
|
tmp = transformChildren(stmt, transformer);
|
|
1636
1648
|
}
|
|
1637
1649
|
return tmp;
|
|
1638
1650
|
}
|
|
1639
1651
|
//region block: post-declaration
|
|
1640
|
-
protoOf(
|
|
1641
|
-
protoOf(
|
|
1642
|
-
protoOf(
|
|
1652
|
+
protoOf(TypeScriptEmitter).u19 = get_extensions;
|
|
1653
|
+
protoOf(TypeScriptEmitter).r19 = emit_1;
|
|
1654
|
+
protoOf(TypeScriptEmitter).w19 = beforeGenerate;
|
|
1655
|
+
protoOf(TypeScriptEmitter).np = get_supportsDefaults;
|
|
1643
1656
|
//endregion
|
|
1644
1657
|
//region block: exports
|
|
1645
1658
|
export {
|
|
1646
|
-
|
|
1659
|
+
TypeScriptEmitter as TypeScriptEmitter1b8xo1btx35xi,
|
|
1647
1660
|
};
|
|
1648
1661
|
//endregion
|
|
1649
1662
|
|