@flock/wirespec 0.18.13 → 0.18.15
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/clikt-clikt-mordant.mjs +39 -39
- package/colormath-root-colormath.mjs +432 -432
- package/kotlin-kotlin-stdlib.mjs +25 -15
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +9842 -9842
- package/kotlin-rgxgen.mjs +1758 -1758
- package/kotlinx-io-kotlinx-io-core.mjs +404 -404
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +1775 -1775
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1466 -1466
- package/mordant-mordant.mjs +1190 -1190
- package/package.json +13 -2
- package/wirespec-msw.d.ts +53 -0
- package/wirespec-msw.mjs +83 -0
- package/wirespec-src-compiler-emitters-java.mjs +79 -79
- package/wirespec-src-compiler-emitters-kotlin.mjs +192 -128
- package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-python.mjs +129 -129
- package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-rust.mjs +68 -54
- package/wirespec-src-compiler-emitters-rust.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-scala.mjs +29 -29
- package/wirespec-src-compiler-emitters-typescript.mjs +125 -98
- package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-wirespec.mjs +31 -31
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-ir.mjs +144 -134
- package/wirespec-src-compiler-ir.mjs.map +1 -1
- package/wirespec-src-converter-avro.mjs +479 -479
- package/wirespec-src-converter-openapi.mjs +320 -320
- package/wirespec-src-ide-lsp.mjs +1348 -1348
- package/wirespec-src-plugin-arguments.mjs +136 -136
- package/wirespec-src-plugin-cli.mjs +84 -84
- package/wirespec-src-plugin-npm.mjs +10 -10
- package/wirespec-src-tools-generator.mjs +2 -2
|
@@ -19,6 +19,8 @@ import {
|
|
|
19
19
|
charSequenceGet1vxk1y5n17t1z as charSequenceGet,
|
|
20
20
|
isLetterOrDigit2kuxd9e198haf as isLetterOrDigit,
|
|
21
21
|
Regex_init_$Create$9xrx4twz2i6q as Regex_init_$Create$,
|
|
22
|
+
mapsbvh18eqox7a as map,
|
|
23
|
+
toListx6x8nvfmvvht as toList,
|
|
22
24
|
listOfvhqybd2zx248 as listOf_0,
|
|
23
25
|
mapOf1xd03cq9cnmy8 as mapOf,
|
|
24
26
|
Enum3alwj03lh1n41 as Enum,
|
|
@@ -42,11 +44,9 @@ import {
|
|
|
42
44
|
LinkedHashMap_init_$Create$3t495nfs82xn as LinkedHashMap_init_$Create$_0,
|
|
43
45
|
first3kg261hmihapu as first_0,
|
|
44
46
|
Char19o2r8palgjof as Char,
|
|
45
|
-
toList383f556t1dixk as
|
|
47
|
+
toList383f556t1dixk as toList_0,
|
|
46
48
|
mapOf2zpbbmyqk8xpf as mapOf_0,
|
|
47
49
|
objectCreate1ve4bgxiu4x98 as objectCreate,
|
|
48
|
-
mapsbvh18eqox7a as map,
|
|
49
|
-
toListx6x8nvfmvvht as toList_0,
|
|
50
50
|
initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
|
|
51
51
|
toString1pkumu07cwy4m as toString_0,
|
|
52
52
|
firstOrNull1982767dljvdy as firstOrNull,
|
|
@@ -90,6 +90,7 @@ import {
|
|
|
90
90
|
removeSurroundingtenczfhnh0cp as removeSurrounding,
|
|
91
91
|
LinkedHashSet_init_$Create$2lru2gvxodydo as LinkedHashSet_init_$Create$,
|
|
92
92
|
emptySetcxexqki71qfa as emptySet,
|
|
93
|
+
isLettere1qnx5bysxbd as isLetter,
|
|
93
94
|
} from './kotlin-kotlin-stdlib.mjs';
|
|
94
95
|
import {
|
|
95
96
|
Paramvfwnys2w6aj1 as Param,
|
|
@@ -239,7 +240,7 @@ function dict(keyType, valueType) {
|
|
|
239
240
|
return new Dict_0(keyType, valueType);
|
|
240
241
|
}
|
|
241
242
|
function type(name, generics) {
|
|
242
|
-
return Custom_init_$Create$(name,
|
|
243
|
+
return Custom_init_$Create$(name, toList_0(generics));
|
|
243
244
|
}
|
|
244
245
|
function nullable(_this__u8e3s4) {
|
|
245
246
|
return new Nullable(_this__u8e3s4);
|
|
@@ -1072,50 +1073,37 @@ function buildValidateBody(validations) {
|
|
|
1072
1073
|
function toName(_this__u8e3s4) {
|
|
1073
1074
|
var tmp;
|
|
1074
1075
|
if (_this__u8e3s4 instanceof FieldIdentifier) {
|
|
1075
|
-
var
|
|
1076
|
-
|
|
1077
|
-
// Inline function 'kotlin.collections.filter' call
|
|
1078
|
-
var tmp0_0 = Regex_init_$Create$('[.\\s-]+').zc(tmp0, 0);
|
|
1079
|
-
// Inline function 'kotlin.collections.filterTo' call
|
|
1080
|
-
var destination = ArrayList_init_$Create$();
|
|
1081
|
-
var _iterator__ex2g4s = tmp0_0.t();
|
|
1082
|
-
while (_iterator__ex2g4s.u()) {
|
|
1083
|
-
var element = _iterator__ex2g4s.v();
|
|
1084
|
-
// Inline function 'kotlin.text.isNotEmpty' call
|
|
1085
|
-
if (charSequenceLength(element) > 0) {
|
|
1086
|
-
destination.x(element);
|
|
1087
|
-
}
|
|
1088
|
-
}
|
|
1089
|
-
var parts = destination;
|
|
1076
|
+
var tmp_0 = Regex_init_$Create$('[.\\s-]+|[^.\\s-]+').sc(_this__u8e3s4.l1());
|
|
1077
|
+
var parts = toList(map(tmp_0, toName$lambda));
|
|
1090
1078
|
tmp = new Name(parts);
|
|
1091
1079
|
} else {
|
|
1092
1080
|
if (_this__u8e3s4 instanceof DefinitionIdentifier) {
|
|
1093
1081
|
// Inline function 'kotlin.collections.filter' call
|
|
1094
|
-
var
|
|
1082
|
+
var tmp0 = Companion_getInstance().k1h(_this__u8e3s4.l1()).l1h_1;
|
|
1095
1083
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1096
|
-
var
|
|
1097
|
-
var
|
|
1098
|
-
while (
|
|
1099
|
-
var
|
|
1100
|
-
var tmp$ret$
|
|
1084
|
+
var destination = ArrayList_init_$Create$();
|
|
1085
|
+
var _iterator__ex2g4s = tmp0.t();
|
|
1086
|
+
while (_iterator__ex2g4s.u()) {
|
|
1087
|
+
var element = _iterator__ex2g4s.v();
|
|
1088
|
+
var tmp$ret$1;
|
|
1101
1089
|
$l$block: {
|
|
1102
1090
|
// Inline function 'kotlin.text.any' call
|
|
1103
1091
|
var inductionVariable = 0;
|
|
1104
|
-
while (inductionVariable < charSequenceLength(
|
|
1105
|
-
var
|
|
1092
|
+
while (inductionVariable < charSequenceLength(element)) {
|
|
1093
|
+
var element_0 = charSequenceGet(element, inductionVariable);
|
|
1106
1094
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1107
|
-
if (isLetterOrDigit(
|
|
1108
|
-
tmp$ret$
|
|
1095
|
+
if (isLetterOrDigit(element_0)) {
|
|
1096
|
+
tmp$ret$1 = true;
|
|
1109
1097
|
break $l$block;
|
|
1110
1098
|
}
|
|
1111
1099
|
}
|
|
1112
|
-
tmp$ret$
|
|
1100
|
+
tmp$ret$1 = false;
|
|
1113
1101
|
}
|
|
1114
|
-
if (tmp$ret$
|
|
1115
|
-
|
|
1102
|
+
if (tmp$ret$1) {
|
|
1103
|
+
destination.x(element);
|
|
1116
1104
|
}
|
|
1117
1105
|
}
|
|
1118
|
-
tmp = new Name(
|
|
1106
|
+
tmp = new Name(destination);
|
|
1119
1107
|
} else {
|
|
1120
1108
|
noWhenBranchMatchedException();
|
|
1121
1109
|
}
|
|
@@ -2544,8 +2532,11 @@ function convert$lambda_5($this_convert) {
|
|
|
2544
2532
|
return Unit_instance;
|
|
2545
2533
|
};
|
|
2546
2534
|
}
|
|
2535
|
+
function toName$lambda(it) {
|
|
2536
|
+
return it.l1();
|
|
2537
|
+
}
|
|
2547
2538
|
function toExpression$stringTemplate(parts) {
|
|
2548
|
-
return new StringTemplate(
|
|
2539
|
+
return new StringTemplate(toList_0(parts));
|
|
2549
2540
|
}
|
|
2550
2541
|
function toExpression$text(value) {
|
|
2551
2542
|
return new Text(value);
|
|
@@ -2719,7 +2710,7 @@ function Name$Companion$of$lambda(it) {
|
|
|
2719
2710
|
return it.l1();
|
|
2720
2711
|
}
|
|
2721
2712
|
function Name_init_$Init$(parts, $this) {
|
|
2722
|
-
Name.call($this,
|
|
2713
|
+
Name.call($this, toList_0(parts));
|
|
2723
2714
|
return $this;
|
|
2724
2715
|
}
|
|
2725
2716
|
function Name_init_$Create$(parts) {
|
|
@@ -2766,7 +2757,7 @@ function Companion() {
|
|
|
2766
2757
|
}
|
|
2767
2758
|
protoOf(Companion).k1h = function (value) {
|
|
2768
2759
|
var tmp = this.j1h_1.sc(value);
|
|
2769
|
-
return new Name(
|
|
2760
|
+
return new Name(toList(map(tmp, Name$Companion$of$lambda)));
|
|
2770
2761
|
};
|
|
2771
2762
|
var Companion_instance;
|
|
2772
2763
|
function Companion_getInstance() {
|
|
@@ -4849,7 +4840,7 @@ function FunctionBuilder(name, isAsync, isStatic, isOverride) {
|
|
|
4849
4840
|
this.o1i_1 = null;
|
|
4850
4841
|
}
|
|
4851
4842
|
protoOf(FunctionBuilder).f1i = function (type, extends_0) {
|
|
4852
|
-
this.l1i_1.x(new TypeParameter(type,
|
|
4843
|
+
this.l1i_1.x(new TypeParameter(type, toList_0(extends_0)));
|
|
4853
4844
|
};
|
|
4854
4845
|
protoOf(FunctionBuilder).p1i = function (type) {
|
|
4855
4846
|
this.o1i_1 = type;
|
|
@@ -5033,7 +5024,7 @@ protoOf(InterfaceBuilder).z1m = function () {
|
|
|
5033
5024
|
return this.b1i_1;
|
|
5034
5025
|
};
|
|
5035
5026
|
protoOf(InterfaceBuilder).f1i = function (type, extends_0) {
|
|
5036
|
-
this.c1i_1.x(new TypeParameter(type,
|
|
5027
|
+
this.c1i_1.x(new TypeParameter(type, toList_0(extends_0)));
|
|
5037
5028
|
};
|
|
5038
5029
|
protoOf(InterfaceBuilder).j1j = function (type) {
|
|
5039
5030
|
this.d1i_1.x(type);
|
|
@@ -5173,7 +5164,7 @@ protoOf(EnumBuilder).z1m = function () {
|
|
|
5173
5164
|
return this.d1j_1;
|
|
5174
5165
|
};
|
|
5175
5166
|
protoOf(EnumBuilder).e1j = function (name, values) {
|
|
5176
|
-
this.a1j_1.x(new Entry(Companion_getInstance().k1h(name),
|
|
5167
|
+
this.a1j_1.x(new Entry(Companion_getInstance().k1h(name), toList_0(values)));
|
|
5177
5168
|
};
|
|
5178
5169
|
protoOf(EnumBuilder).e1t = function () {
|
|
5179
5170
|
return new Enum_1(this.y1i_1, this.z1i_1, this.a1j_1, this.b1j_1, this.c1j_1, this.d1j_1);
|
|
@@ -5209,7 +5200,7 @@ protoOf(UnionBuilder).m1k = function (name) {
|
|
|
5209
5200
|
this.k1k_1.x(new Custom_0(name));
|
|
5210
5201
|
};
|
|
5211
5202
|
protoOf(UnionBuilder).f1i = function (type, extends_0) {
|
|
5212
|
-
this.l1k_1.x(new TypeParameter(type,
|
|
5203
|
+
this.l1k_1.x(new TypeParameter(type, toList_0(extends_0)));
|
|
5213
5204
|
};
|
|
5214
5205
|
protoOf(UnionBuilder).e1t = function () {
|
|
5215
5206
|
return new Union_0(this.i1k_1, this.j1k_1, this.k1k_1, this.l1k_1);
|
|
@@ -14476,6 +14467,39 @@ function emit_98($this, _this__u8e3s4, indent, inlineStructs) {
|
|
|
14476
14467
|
var typeStr = emitWithInlineStructs($this, _this__u8e3s4.f1q_1, inlineStructs);
|
|
14477
14468
|
return indentCode_4($this, '"' + _this__u8e3s4.e1q_1.x1h() + '": ' + typeStr + ',\n', indent);
|
|
14478
14469
|
}
|
|
14470
|
+
function tsFieldAccess($this, receiverStr, field) {
|
|
14471
|
+
return receiverStr == null ? field : isBareTsIdentifier($this, field) ? receiverStr + '.' + field : receiverStr + '["' + field + '"]';
|
|
14472
|
+
}
|
|
14473
|
+
function isBareTsIdentifier($this, _this__u8e3s4) {
|
|
14474
|
+
var tmp;
|
|
14475
|
+
var tmp_0;
|
|
14476
|
+
// Inline function 'kotlin.text.isNotEmpty' call
|
|
14477
|
+
if (charSequenceLength(_this__u8e3s4) > 0) {
|
|
14478
|
+
tmp_0 = isLetter(first_0(_this__u8e3s4)) || first_0(_this__u8e3s4) === _Char___init__impl__6a9atx(95) || first_0(_this__u8e3s4) === _Char___init__impl__6a9atx(36);
|
|
14479
|
+
} else {
|
|
14480
|
+
tmp_0 = false;
|
|
14481
|
+
}
|
|
14482
|
+
if (tmp_0) {
|
|
14483
|
+
var tmp$ret$2;
|
|
14484
|
+
$l$block: {
|
|
14485
|
+
// Inline function 'kotlin.text.all' call
|
|
14486
|
+
var inductionVariable = 0;
|
|
14487
|
+
while (inductionVariable < charSequenceLength(_this__u8e3s4)) {
|
|
14488
|
+
var element = charSequenceGet(_this__u8e3s4, inductionVariable);
|
|
14489
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
14490
|
+
if (!(isLetterOrDigit(element) || element === _Char___init__impl__6a9atx(95) || element === _Char___init__impl__6a9atx(36))) {
|
|
14491
|
+
tmp$ret$2 = false;
|
|
14492
|
+
break $l$block;
|
|
14493
|
+
}
|
|
14494
|
+
}
|
|
14495
|
+
tmp$ret$2 = true;
|
|
14496
|
+
}
|
|
14497
|
+
tmp = tmp$ret$2;
|
|
14498
|
+
} else {
|
|
14499
|
+
tmp = false;
|
|
14500
|
+
}
|
|
14501
|
+
return tmp;
|
|
14502
|
+
}
|
|
14479
14503
|
function emitWithInlineStructs($this, _this__u8e3s4, inlineStructs) {
|
|
14480
14504
|
var tmp;
|
|
14481
14505
|
if (_this__u8e3s4 instanceof Custom_0) {
|
|
@@ -15295,41 +15319,32 @@ function emit_101($this, _this__u8e3s4, indent) {
|
|
|
15295
15319
|
} else {
|
|
15296
15320
|
if (_this__u8e3s4 instanceof FieldCall) {
|
|
15297
15321
|
var tmp3_safe_receiver = _this__u8e3s4.o1p_1;
|
|
15298
|
-
|
|
15299
|
-
if (tmp3_safe_receiver == null) {
|
|
15300
|
-
tmp_5 = null;
|
|
15301
|
-
} else {
|
|
15302
|
-
// Inline function 'kotlin.let' call
|
|
15303
|
-
tmp_5 = emit_102(TypeScriptGenerator_getInstance(), tmp3_safe_receiver) + '.';
|
|
15304
|
-
}
|
|
15305
|
-
var tmp4_elvis_lhs = tmp_5;
|
|
15306
|
-
var receiverStr = tmp4_elvis_lhs == null ? '' : tmp4_elvis_lhs;
|
|
15307
|
-
tmp = indentCode_4($this, receiverStr + _this__u8e3s4.p1p_1.x1h() + ';\n', indent);
|
|
15322
|
+
tmp = indentCode_4($this, tsFieldAccess($this, tmp3_safe_receiver == null ? null : emit_102($this, tmp3_safe_receiver), _this__u8e3s4.p1p_1.x1h()) + ';\n', indent);
|
|
15308
15323
|
} else {
|
|
15309
15324
|
if (_this__u8e3s4 instanceof FunctionCall) {
|
|
15310
15325
|
var awaitPrefix = _this__u8e3s4.i1m_1 ? 'await ' : '';
|
|
15311
15326
|
var recv = _this__u8e3s4.e1m_1;
|
|
15312
|
-
var
|
|
15327
|
+
var tmp_5;
|
|
15313
15328
|
if (!(recv == null)) {
|
|
15314
|
-
var
|
|
15315
|
-
var
|
|
15316
|
-
var
|
|
15317
|
-
|
|
15329
|
+
var tmp_6 = emit_102($this, recv);
|
|
15330
|
+
var tmp_7 = _this__u8e3s4.g1m_1.x1h();
|
|
15331
|
+
var tmp_8 = _this__u8e3s4.h1m_1.r2();
|
|
15332
|
+
tmp_5 = indentCode_4($this, awaitPrefix + tmp_6 + '.' + tmp_7 + '(' + joinToString(tmp_8, ', ', VOID, VOID, VOID, VOID, TypeScriptGenerator$emit$lambda_19) + ');\n', indent);
|
|
15318
15333
|
} else {
|
|
15319
|
-
var
|
|
15320
|
-
var
|
|
15321
|
-
|
|
15334
|
+
var tmp_9 = _this__u8e3s4.g1m_1.x1h();
|
|
15335
|
+
var tmp_10 = _this__u8e3s4.h1m_1.r2();
|
|
15336
|
+
tmp_5 = indentCode_4($this, awaitPrefix + tmp_9 + '(' + joinToString(tmp_10, ', ', VOID, VOID, VOID, VOID, TypeScriptGenerator$emit$lambda_20) + ');\n', indent);
|
|
15322
15337
|
}
|
|
15323
|
-
tmp =
|
|
15338
|
+
tmp = tmp_5;
|
|
15324
15339
|
} else {
|
|
15325
15340
|
if (_this__u8e3s4 instanceof ArrayIndexCall) {
|
|
15326
|
-
var
|
|
15341
|
+
var tmp_11;
|
|
15327
15342
|
if (_this__u8e3s4.n1q_1) {
|
|
15328
|
-
|
|
15343
|
+
tmp_11 = indentCode_4($this, emit_102($this, _this__u8e3s4.l1q_1) + '[' + emit_102($this, _this__u8e3s4.m1q_1) + '];\n', indent);
|
|
15329
15344
|
} else {
|
|
15330
|
-
|
|
15345
|
+
tmp_11 = indentCode_4($this, 'Object.entries(' + emit_102($this, _this__u8e3s4.l1q_1) + ').find(([k]) => k.toLowerCase() === ' + emit_102($this, _this__u8e3s4.m1q_1) + '.toLowerCase())?.[1] ?? null;\n', indent);
|
|
15331
15346
|
}
|
|
15332
|
-
tmp =
|
|
15347
|
+
tmp = tmp_11;
|
|
15333
15348
|
} else {
|
|
15334
15349
|
if (_this__u8e3s4 instanceof EnumReference) {
|
|
15335
15350
|
tmp = indentCode_4($this, emit_100($this, _this__u8e3s4.t1q_1) + '.' + _this__u8e3s4.u1q_1.m1h() + ';\n', indent);
|
|
@@ -15461,41 +15476,32 @@ function emit_102($this, _this__u8e3s4) {
|
|
|
15461
15476
|
} else {
|
|
15462
15477
|
if (_this__u8e3s4 instanceof FieldCall) {
|
|
15463
15478
|
var tmp1_safe_receiver = _this__u8e3s4.o1p_1;
|
|
15464
|
-
|
|
15465
|
-
if (tmp1_safe_receiver == null) {
|
|
15466
|
-
tmp_0 = null;
|
|
15467
|
-
} else {
|
|
15468
|
-
// Inline function 'kotlin.let' call
|
|
15469
|
-
tmp_0 = emit_102(TypeScriptGenerator_getInstance(), tmp1_safe_receiver) + '.';
|
|
15470
|
-
}
|
|
15471
|
-
var tmp2_elvis_lhs = tmp_0;
|
|
15472
|
-
var receiverStr = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
|
|
15473
|
-
tmp = receiverStr + _this__u8e3s4.p1p_1.x1h();
|
|
15479
|
+
tmp = tsFieldAccess($this, tmp1_safe_receiver == null ? null : emit_102($this, tmp1_safe_receiver), _this__u8e3s4.p1p_1.x1h());
|
|
15474
15480
|
} else {
|
|
15475
15481
|
if (_this__u8e3s4 instanceof FunctionCall) {
|
|
15476
15482
|
var awaitPrefix = _this__u8e3s4.i1m_1 ? 'await ' : '';
|
|
15477
15483
|
var recv = _this__u8e3s4.e1m_1;
|
|
15478
|
-
var
|
|
15484
|
+
var tmp_0;
|
|
15479
15485
|
if (!(recv == null)) {
|
|
15480
|
-
var
|
|
15481
|
-
var
|
|
15482
|
-
var
|
|
15483
|
-
|
|
15486
|
+
var tmp_1 = emit_102($this, recv);
|
|
15487
|
+
var tmp_2 = _this__u8e3s4.g1m_1.x1h();
|
|
15488
|
+
var tmp_3 = _this__u8e3s4.h1m_1.r2();
|
|
15489
|
+
tmp_0 = awaitPrefix + tmp_1 + '.' + tmp_2 + '(' + joinToString(tmp_3, ', ', VOID, VOID, VOID, VOID, TypeScriptGenerator$emit$lambda_21) + ')';
|
|
15484
15490
|
} else {
|
|
15485
|
-
var
|
|
15486
|
-
var
|
|
15487
|
-
|
|
15491
|
+
var tmp_4 = _this__u8e3s4.g1m_1.x1h();
|
|
15492
|
+
var tmp_5 = _this__u8e3s4.h1m_1.r2();
|
|
15493
|
+
tmp_0 = awaitPrefix + tmp_4 + '(' + joinToString(tmp_5, ', ', VOID, VOID, VOID, VOID, TypeScriptGenerator$emit$lambda_22) + ')';
|
|
15488
15494
|
}
|
|
15489
|
-
tmp =
|
|
15495
|
+
tmp = tmp_0;
|
|
15490
15496
|
} else {
|
|
15491
15497
|
if (_this__u8e3s4 instanceof ArrayIndexCall) {
|
|
15492
|
-
var
|
|
15498
|
+
var tmp_6;
|
|
15493
15499
|
if (_this__u8e3s4.n1q_1) {
|
|
15494
|
-
|
|
15500
|
+
tmp_6 = emit_102($this, _this__u8e3s4.l1q_1) + '[' + emit_102($this, _this__u8e3s4.m1q_1) + ']';
|
|
15495
15501
|
} else {
|
|
15496
|
-
|
|
15502
|
+
tmp_6 = 'Object.entries(' + emit_102($this, _this__u8e3s4.l1q_1) + ').find(([k]) => k.toLowerCase() === ' + emit_102($this, _this__u8e3s4.m1q_1) + '.toLowerCase())?.[1]';
|
|
15497
15503
|
}
|
|
15498
|
-
tmp =
|
|
15504
|
+
tmp = tmp_6;
|
|
15499
15505
|
} else {
|
|
15500
15506
|
if (_this__u8e3s4 instanceof EnumReference) {
|
|
15501
15507
|
tmp = emit_100($this, _this__u8e3s4.t1q_1) + '.' + _this__u8e3s4.u1q_1.m1h();
|
|
@@ -15511,25 +15517,25 @@ function emit_102($this, _this__u8e3s4) {
|
|
|
15511
15517
|
} else {
|
|
15512
15518
|
if (_this__u8e3s4 instanceof NullCheck) {
|
|
15513
15519
|
var exprStr = emit_102($this, _this__u8e3s4.w1r_1);
|
|
15520
|
+
var tmp_7;
|
|
15514
15521
|
var tmp_8;
|
|
15515
|
-
var tmp_9;
|
|
15516
|
-
|
|
15517
|
-
|
|
15518
|
-
|
|
15519
|
-
tmp_9 = !(tmp_11 instanceof ArrayIndexCall ? tmp_11 : THROW_CCE()).n1q_1;
|
|
15522
|
+
var tmp_9 = _this__u8e3s4.w1r_1;
|
|
15523
|
+
if (tmp_9 instanceof ArrayIndexCall) {
|
|
15524
|
+
var tmp_10 = _this__u8e3s4.w1r_1;
|
|
15525
|
+
tmp_8 = !(tmp_10 instanceof ArrayIndexCall ? tmp_10 : THROW_CCE()).n1q_1;
|
|
15520
15526
|
} else {
|
|
15521
|
-
|
|
15527
|
+
tmp_8 = false;
|
|
15522
15528
|
}
|
|
15523
|
-
if (
|
|
15524
|
-
|
|
15529
|
+
if (tmp_8) {
|
|
15530
|
+
tmp_7 = exprStr + '!';
|
|
15525
15531
|
} else {
|
|
15526
|
-
|
|
15532
|
+
tmp_7 = exprStr;
|
|
15527
15533
|
}
|
|
15528
|
-
var bodyReplacement =
|
|
15534
|
+
var bodyReplacement = tmp_7;
|
|
15529
15535
|
var bodyStr = emitWithInlinedIt_0($this, _this__u8e3s4.x1r_1, bodyReplacement);
|
|
15530
|
-
var
|
|
15531
|
-
var
|
|
15532
|
-
var altStr =
|
|
15536
|
+
var tmp2_safe_receiver = _this__u8e3s4.y1r_1;
|
|
15537
|
+
var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : emit_102($this, tmp2_safe_receiver);
|
|
15538
|
+
var altStr = tmp3_elvis_lhs == null ? 'undefined' : tmp3_elvis_lhs;
|
|
15533
15539
|
tmp = exprStr + ' != null ? ' + bodyStr + ' : ' + altStr;
|
|
15534
15540
|
} else {
|
|
15535
15541
|
if (_this__u8e3s4 instanceof NullableMap) {
|
|
@@ -15548,33 +15554,33 @@ function emit_102($this, _this__u8e3s4) {
|
|
|
15548
15554
|
tmp = _this__u8e3s4.l1r_1 + '.test(' + emit_102($this, _this__u8e3s4.m1r_1) + ')';
|
|
15549
15555
|
} else {
|
|
15550
15556
|
if (_this__u8e3s4 instanceof BoundCheck) {
|
|
15551
|
-
var
|
|
15552
|
-
var
|
|
15553
|
-
if (
|
|
15554
|
-
|
|
15557
|
+
var tmp4_safe_receiver = _this__u8e3s4.p1r_1;
|
|
15558
|
+
var tmp_11;
|
|
15559
|
+
if (tmp4_safe_receiver == null) {
|
|
15560
|
+
tmp_11 = null;
|
|
15555
15561
|
} else {
|
|
15556
15562
|
// Inline function 'kotlin.let' call
|
|
15557
|
-
|
|
15563
|
+
tmp_11 = tmp4_safe_receiver + ' <= ' + emit_102(TypeScriptGenerator_getInstance(), _this__u8e3s4.r1r_1);
|
|
15558
15564
|
}
|
|
15559
|
-
var
|
|
15560
|
-
var
|
|
15561
|
-
var
|
|
15562
|
-
if (
|
|
15563
|
-
|
|
15565
|
+
var tmp_12 = tmp_11;
|
|
15566
|
+
var tmp5_safe_receiver = _this__u8e3s4.q1r_1;
|
|
15567
|
+
var tmp_13;
|
|
15568
|
+
if (tmp5_safe_receiver == null) {
|
|
15569
|
+
tmp_13 = null;
|
|
15564
15570
|
} else {
|
|
15565
15571
|
// Inline function 'kotlin.let' call
|
|
15566
|
-
|
|
15572
|
+
tmp_13 = emit_102(TypeScriptGenerator_getInstance(), _this__u8e3s4.r1r_1) + ' <= ' + tmp5_safe_receiver;
|
|
15567
15573
|
}
|
|
15568
15574
|
// Inline function 'kotlin.text.ifEmpty' call
|
|
15569
|
-
var this_0 = joinToString(listOfNotNull([
|
|
15570
|
-
var
|
|
15575
|
+
var this_0 = joinToString(listOfNotNull([tmp_12, tmp_13]), ' && ');
|
|
15576
|
+
var tmp_14;
|
|
15571
15577
|
// Inline function 'kotlin.text.isEmpty' call
|
|
15572
15578
|
if (charSequenceLength(this_0) === 0) {
|
|
15573
|
-
|
|
15579
|
+
tmp_14 = 'true';
|
|
15574
15580
|
} else {
|
|
15575
|
-
|
|
15581
|
+
tmp_14 = this_0;
|
|
15576
15582
|
}
|
|
15577
|
-
var checks =
|
|
15583
|
+
var checks = tmp_14;
|
|
15578
15584
|
tmp = checks;
|
|
15579
15585
|
} else {
|
|
15580
15586
|
if (_this__u8e3s4 instanceof ErrorStatement) {
|
|
@@ -15608,15 +15614,15 @@ function emit_102($this, _this__u8e3s4) {
|
|
|
15608
15614
|
tmp = emit_102($this, _this__u8e3s4.n1s_1) + '.flatMap((' + _this__u8e3s4.p1s_1.x1l() + ', ' + _this__u8e3s4.o1s_1.x1l() + ') => ' + emit_102($this, _this__u8e3s4.q1s_1) + ')';
|
|
15609
15615
|
} else {
|
|
15610
15616
|
if (_this__u8e3s4 instanceof ListConcat) {
|
|
15611
|
-
var
|
|
15617
|
+
var tmp_15;
|
|
15612
15618
|
if (_this__u8e3s4.u1r_1.r()) {
|
|
15613
|
-
|
|
15619
|
+
tmp_15 = '[] as string[]';
|
|
15614
15620
|
} else if (_this__u8e3s4.u1r_1.a1() === 1) {
|
|
15615
|
-
|
|
15621
|
+
tmp_15 = emit_102($this, single(_this__u8e3s4.u1r_1));
|
|
15616
15622
|
} else {
|
|
15617
|
-
|
|
15623
|
+
tmp_15 = '[' + joinToString(_this__u8e3s4.u1r_1, ', ', VOID, VOID, VOID, VOID, TypeScriptGenerator$emit$lambda_23) + ']';
|
|
15618
15624
|
}
|
|
15619
|
-
tmp =
|
|
15625
|
+
tmp = tmp_15;
|
|
15620
15626
|
} else {
|
|
15621
15627
|
if (_this__u8e3s4 instanceof StringTemplate) {
|
|
15622
15628
|
tmp = '`' + joinToString(_this__u8e3s4.c1s_1, '', VOID, VOID, VOID, VOID, TypeScriptGenerator$emit$lambda_24) + '`';
|
|
@@ -15687,25 +15693,16 @@ function emitWithInlinedIt_0($this, _this__u8e3s4, replacement) {
|
|
|
15687
15693
|
} else {
|
|
15688
15694
|
if (_this__u8e3s4 instanceof FieldCall) {
|
|
15689
15695
|
var tmp1_safe_receiver = _this__u8e3s4.o1p_1;
|
|
15690
|
-
|
|
15691
|
-
if (tmp1_safe_receiver == null) {
|
|
15692
|
-
tmp_2 = null;
|
|
15693
|
-
} else {
|
|
15694
|
-
// Inline function 'kotlin.let' call
|
|
15695
|
-
tmp_2 = emitWithInlinedIt_0(TypeScriptGenerator_getInstance(), tmp1_safe_receiver, replacement) + '.';
|
|
15696
|
-
}
|
|
15697
|
-
var tmp2_elvis_lhs = tmp_2;
|
|
15698
|
-
var receiverStr = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
|
|
15699
|
-
tmp = receiverStr + _this__u8e3s4.p1p_1.x1h();
|
|
15696
|
+
tmp = tsFieldAccess($this, tmp1_safe_receiver == null ? null : emitWithInlinedIt_0($this, tmp1_safe_receiver, replacement), _this__u8e3s4.p1p_1.x1h());
|
|
15700
15697
|
} else {
|
|
15701
15698
|
if (_this__u8e3s4 instanceof ArrayIndexCall) {
|
|
15702
|
-
var
|
|
15699
|
+
var tmp_2;
|
|
15703
15700
|
if (_this__u8e3s4.n1q_1) {
|
|
15704
|
-
|
|
15701
|
+
tmp_2 = emitWithInlinedIt_0($this, _this__u8e3s4.l1q_1, replacement) + '[' + emitWithInlinedIt_0($this, _this__u8e3s4.m1q_1, replacement) + ']';
|
|
15705
15702
|
} else {
|
|
15706
|
-
|
|
15703
|
+
tmp_2 = 'Object.entries(' + emitWithInlinedIt_0($this, _this__u8e3s4.l1q_1, replacement) + ').find(([k]) => k.toLowerCase() === ' + emitWithInlinedIt_0($this, _this__u8e3s4.m1q_1, replacement) + '.toLowerCase())?.[1]';
|
|
15707
15704
|
}
|
|
15708
|
-
tmp =
|
|
15705
|
+
tmp = tmp_2;
|
|
15709
15706
|
} else {
|
|
15710
15707
|
if (_this__u8e3s4 instanceof EnumValueCall) {
|
|
15711
15708
|
tmp = emitWithInlinedIt_0($this, _this__u8e3s4.x1q_1, replacement);
|
|
@@ -16114,6 +16111,19 @@ function SanitizationConfig(reservedKeywords, escapeKeyword, fieldNameCase, para
|
|
|
16114
16111
|
this.g1v_1 = extraStatementTransforms;
|
|
16115
16112
|
this.h1v_1 = escapeFieldKeywords;
|
|
16116
16113
|
}
|
|
16114
|
+
protoOf(SanitizationConfig).i1v = function (reservedKeywords, escapeKeyword, fieldNameCase, parameterNameCase, sanitizeSymbol, extraStatementTransforms, escapeFieldKeywords) {
|
|
16115
|
+
return new SanitizationConfig(reservedKeywords, escapeKeyword, fieldNameCase, parameterNameCase, sanitizeSymbol, extraStatementTransforms, escapeFieldKeywords);
|
|
16116
|
+
};
|
|
16117
|
+
protoOf(SanitizationConfig).j1v = function (reservedKeywords, escapeKeyword, fieldNameCase, parameterNameCase, sanitizeSymbol, extraStatementTransforms, escapeFieldKeywords, $super) {
|
|
16118
|
+
reservedKeywords = reservedKeywords === VOID ? this.b1v_1 : reservedKeywords;
|
|
16119
|
+
escapeKeyword = escapeKeyword === VOID ? this.c1v_1 : escapeKeyword;
|
|
16120
|
+
fieldNameCase = fieldNameCase === VOID ? this.d1v_1 : fieldNameCase;
|
|
16121
|
+
parameterNameCase = parameterNameCase === VOID ? this.e1v_1 : parameterNameCase;
|
|
16122
|
+
sanitizeSymbol = sanitizeSymbol === VOID ? this.f1v_1 : sanitizeSymbol;
|
|
16123
|
+
extraStatementTransforms = extraStatementTransforms === VOID ? this.g1v_1 : extraStatementTransforms;
|
|
16124
|
+
escapeFieldKeywords = escapeFieldKeywords === VOID ? this.h1v_1 : escapeFieldKeywords;
|
|
16125
|
+
return $super === VOID ? this.i1v(reservedKeywords, escapeKeyword, fieldNameCase, parameterNameCase, sanitizeSymbol, extraStatementTransforms, escapeFieldKeywords) : $super.i1v.call(this, reservedKeywords, escapeKeyword, fieldNameCase, parameterNameCase, sanitizeSymbol, extraStatementTransforms, escapeFieldKeywords);
|
|
16126
|
+
};
|
|
16117
16127
|
protoOf(SanitizationConfig).toString = function () {
|
|
16118
16128
|
return 'SanitizationConfig(reservedKeywords=' + toString_0(this.b1v_1) + ', escapeKeyword=' + toString_0(this.c1v_1) + ', fieldNameCase=' + toString_0(this.d1v_1) + ', parameterNameCase=' + toString_0(this.e1v_1) + ', sanitizeSymbol=' + toString_0(this.f1v_1) + ', extraStatementTransforms=' + toString_1(this.g1v_1) + ', escapeFieldKeywords=' + this.h1v_1 + ')';
|
|
16119
16129
|
};
|