@flock/wirespec 0.22.5 → 0.22.6
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-core.mjs +8 -8
- package/clikt-clikt-mordant.mjs +79 -79
- package/clikt-clikt.mjs +1364 -1363
- package/clikt-clikt.mjs.map +1 -1
- package/colormath-root-colormath.mjs +436 -436
- package/kotlin-kotlin-stdlib.mjs +192 -191
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +10204 -10204
- package/kotlin-rgxgen.mjs +1771 -1771
- package/kotlinx-io-kotlinx-io-core.mjs +425 -425
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +1824 -1824
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1509 -1509
- package/mordant-mordant.mjs +1246 -1246
- package/package.json +1 -1
- package/wirespec-src-compiler-core.mjs +5661 -5333
- package/wirespec-src-compiler-core.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-java.mjs +171 -187
- package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-kotlin.mjs +138 -149
- package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-python.mjs +147 -160
- package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-rust.mjs +356 -370
- package/wirespec-src-compiler-emitters-rust.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-scala.mjs +165 -175
- package/wirespec-src-compiler-emitters-scala.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-typescript.mjs +187 -313
- package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-wirespec.mjs +79 -79
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +194 -194
- package/wirespec-src-converter-asyncapi.mjs +545 -545
- package/wirespec-src-converter-avro.mjs +544 -544
- package/wirespec-src-converter-common.mjs +11 -11
- package/wirespec-src-converter-graphql.mjs +942 -942
- package/wirespec-src-converter-openapi.mjs +453 -453
- package/wirespec-src-ide-lsp.mjs +1359 -1359
- package/wirespec-src-plugin-arguments.mjs +153 -157
- package/wirespec-src-plugin-arguments.mjs.map +1 -1
- package/wirespec-src-plugin-cli.mjs +139 -142
- package/wirespec-src-plugin-cli.mjs.map +1 -1
- package/wirespec-src-plugin-extensions.mjs +1631 -1114
- package/wirespec-src-plugin-extensions.mjs.map +1 -1
- package/wirespec-src-plugin-npm.mjs +27 -27
- package/wirespec-src-tools-generator.mjs +17 -17
|
@@ -5,10 +5,11 @@ import {
|
|
|
5
5
|
optional2v0ee42t2688o as optional,
|
|
6
6
|
option2wnxma00ykjjp as option,
|
|
7
7
|
choice1qx2pgx161pnc as choice,
|
|
8
|
-
multiple1ilt3bwdbyd8l as multiple,
|
|
9
8
|
choiceie3147xkuo29 as choice_0,
|
|
10
9
|
default2v6m45aspyoyr as default_0,
|
|
11
10
|
flag3dod1qr8no54f as flag,
|
|
11
|
+
multiple1ilt3bwdbyd8l as multiple,
|
|
12
|
+
transformAll3vofua9ygklz8 as transformAll,
|
|
12
13
|
main23hc8f9rb75p1 as main,
|
|
13
14
|
} from './clikt-clikt.mjs';
|
|
14
15
|
import {
|
|
@@ -19,7 +20,6 @@ import {
|
|
|
19
20
|
initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
|
|
20
21
|
KProperty1ca4yb4wlo496 as KProperty1,
|
|
21
22
|
getPropertyCallableRef3hckxc0xueiaj as getPropertyCallableRef,
|
|
22
|
-
listOfvhqybd2zx248 as listOf,
|
|
23
23
|
noWhenBranchMatchedException2a6r7ubxgky5j as noWhenBranchMatchedException,
|
|
24
24
|
Unit_instancev9v8hjid95df as Unit_instance,
|
|
25
25
|
mapCapacity1h45rc3eh9p2l as mapCapacity,
|
|
@@ -30,13 +30,14 @@ import {
|
|
|
30
30
|
trim11nh7r46at6sx as trim,
|
|
31
31
|
toString1pkumu07cwy4m as toString,
|
|
32
32
|
Enum3alwj03lh1n41 as Enum,
|
|
33
|
-
|
|
34
|
-
ArrayList_init_$Create$2byt5m5yn22yy as ArrayList_init_$Create$,
|
|
35
|
-
until1jbpn0z3f8lbg as until,
|
|
36
|
-
ArrayList_init_$Create$37gc04va6yfo2 as ArrayList_init_$Create$_0,
|
|
33
|
+
first58ocm7j58k3q as first,
|
|
37
34
|
joinToString1cxrrlmo0chqs as joinToString,
|
|
35
|
+
until1jbpn0z3f8lbg as until,
|
|
36
|
+
ArrayList_init_$Create$37gc04va6yfo2 as ArrayList_init_$Create$,
|
|
38
37
|
IllegalStateException_init_$Create$1h4bcfod21ri0 as IllegalStateException_init_$Create$,
|
|
39
38
|
addAll1k27qatfgp3k5 as addAll,
|
|
39
|
+
collectionSizeOrDefault36dulx8yinfqm as collectionSizeOrDefault,
|
|
40
|
+
ArrayList_init_$Create$2byt5m5yn22yy as ArrayList_init_$Create$_0,
|
|
40
41
|
copyToArray2j022khrow2yi as copyToArray,
|
|
41
42
|
isArray1hxjqtqy632bc as isArray,
|
|
42
43
|
} from './kotlin-kotlin-stdlib.mjs';
|
|
@@ -79,6 +80,7 @@ import {
|
|
|
79
80
|
getOutPutPathqmn3xkxu6se6 as getOutPutPath,
|
|
80
81
|
CompilerArguments27p1etc1665zg as CompilerArguments,
|
|
81
82
|
values39f22etrsivck as values,
|
|
83
|
+
Language_Wirespec_getInstancez8ixv3cb7hat as Language_Wirespec_getInstance,
|
|
82
84
|
ConverterArgumentsa8xc45eyvf51 as ConverterArguments,
|
|
83
85
|
Companion_instance3u189ncjgxp6 as Companion_instance_2,
|
|
84
86
|
_DirectoryPath___get_value__impl__hdy2e31of6jj3zjtzs5 as _DirectoryPath___get_value__impl__hdy2e3,
|
|
@@ -95,7 +97,6 @@ import {
|
|
|
95
97
|
Left2oemzq1tpcg4i as Left,
|
|
96
98
|
nonEmptySetOf3p7fhmt51pz4b as nonEmptySetOf,
|
|
97
99
|
NonEmptySet1rtvr2guloo52 as NonEmptySet,
|
|
98
|
-
toNonEmptySetOrNull1tjnd9jrkd4bs as toNonEmptySetOrNull,
|
|
99
100
|
nonEmptyListOf17xawqyzwrlrt as nonEmptyListOf,
|
|
100
101
|
NonEmptyList3ak25ihy2gcvs as NonEmptyList,
|
|
101
102
|
_NonEmptyList___get_all__impl__pmf5092xnz0i2teaa6d as _NonEmptyList___get_all__impl__pmf509,
|
|
@@ -103,7 +104,6 @@ import {
|
|
|
103
104
|
NonEmptyList__toList_impl_t5xcy266xhxpenbpfx as NonEmptyList__toList_impl_t5xcy2,
|
|
104
105
|
Companion_instancexcyhq1gimo3o as Companion_instance_4,
|
|
105
106
|
} from './arrow-arrow-core.mjs';
|
|
106
|
-
import { WirespecEmitter2ad9je4ecrvjk as WirespecEmitter } from './wirespec-src-compiler-emitters-wirespec.mjs';
|
|
107
107
|
import { produce6pbudlitvnns as produce } from './wirespec-src-compiler-lib.mjs';
|
|
108
108
|
import { nonFatalOrThrow35agffkx4bbtz as nonFatalOrThrow } from './arrow-arrow-exception-utils.mjs';
|
|
109
109
|
//region block: imports
|
|
@@ -154,7 +154,7 @@ function SpecificFile(extension) {
|
|
|
154
154
|
}
|
|
155
155
|
function Companion() {
|
|
156
156
|
}
|
|
157
|
-
protoOf(Companion).
|
|
157
|
+
protoOf(Companion).w5h = function (compile, convert) {
|
|
158
158
|
return subcommands(new WirespecCli(), [new Compile(compile), new Convert(convert)]);
|
|
159
159
|
};
|
|
160
160
|
var Companion_instance_5;
|
|
@@ -166,11 +166,11 @@ function WirespecCli() {
|
|
|
166
166
|
}
|
|
167
167
|
function _get_stdin__b8xnlj($this) {
|
|
168
168
|
var tmp = KProperty1;
|
|
169
|
-
return $this.
|
|
169
|
+
return $this.v5i_1.u1w($this, getPropertyCallableRef('stdin', 1, tmp, Compile$_get_stdin_$ref_5ywd7d_0(), null));
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function _get_language__lew619($this) {
|
|
172
172
|
var tmp = KProperty1;
|
|
173
|
-
return $this.
|
|
173
|
+
return $this.w5i_1.u1w($this, getPropertyCallableRef('language', 1, tmp, Compile$_get_language_$ref_dos4k3_0(), null));
|
|
174
174
|
}
|
|
175
175
|
function Compile$_get_stdin_$ref_5ywd7d() {
|
|
176
176
|
return function (p0) {
|
|
@@ -182,14 +182,14 @@ function Compile$_get_stdin_$ref_5ywd7d_0() {
|
|
|
182
182
|
return _get_stdin__b8xnlj(p0);
|
|
183
183
|
};
|
|
184
184
|
}
|
|
185
|
-
function Compile$
|
|
185
|
+
function Compile$_get_language_$ref_dos4k3() {
|
|
186
186
|
return function (p0) {
|
|
187
|
-
return
|
|
187
|
+
return _get_language__lew619(p0);
|
|
188
188
|
};
|
|
189
189
|
}
|
|
190
|
-
function Compile$
|
|
190
|
+
function Compile$_get_language_$ref_dos4k3_0() {
|
|
191
191
|
return function (p0) {
|
|
192
|
-
return
|
|
192
|
+
return _get_language__lew619(p0);
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
195
|
function handleError$ref() {
|
|
@@ -213,24 +213,24 @@ function handleError$ref_1() {
|
|
|
213
213
|
}
|
|
214
214
|
function Compile(compiler) {
|
|
215
215
|
CommonOptions.call(this);
|
|
216
|
-
this.
|
|
216
|
+
this.u5i_1 = compiler;
|
|
217
217
|
var tmp = this;
|
|
218
218
|
var tmp_0 = optional(argument(this, VOID, 'stdin'));
|
|
219
219
|
var tmp_1 = KProperty1;
|
|
220
|
-
tmp.
|
|
220
|
+
tmp.v5i_1 = tmp_0.a1w(this, getPropertyCallableRef('stdin', 1, tmp_1, Compile$_get_stdin_$ref_5ywd7d(), null));
|
|
221
221
|
var tmp_2 = this;
|
|
222
|
-
var tmp_3 =
|
|
222
|
+
var tmp_3 = single(choice(option(this, Options_Language_getInstance().z5i_1.slice(), 'Language'), Companion_instance_1.i4x(), VOID, true), Language_Kotlin_getInstance());
|
|
223
223
|
var tmp_4 = KProperty1;
|
|
224
|
-
tmp_2.
|
|
224
|
+
tmp_2.w5i_1 = tmp_3.e1x(this, getPropertyCallableRef('language', 1, tmp_4, Compile$_get_language_$ref_dos4k3(), null));
|
|
225
225
|
}
|
|
226
|
-
protoOf(Compile).
|
|
227
|
-
var logger = new Logger(this.
|
|
226
|
+
protoOf(Compile).t1n = function () {
|
|
227
|
+
var logger = new Logger(this.y5j(this.x5j()));
|
|
228
228
|
// Inline function 'arrow.core.getOrElse' call
|
|
229
|
-
var this_0 = getFullPath(this.
|
|
229
|
+
var this_0 = getFullPath(this.z5j());
|
|
230
230
|
var tmp;
|
|
231
231
|
if (this_0 instanceof Left) {
|
|
232
232
|
var it = this_0.sm_1;
|
|
233
|
-
throw new CliktError(it.
|
|
233
|
+
throw new CliktError(it.t4y_1);
|
|
234
234
|
} else {
|
|
235
235
|
if (this_0 instanceof Right) {
|
|
236
236
|
tmp = this_0.um_1;
|
|
@@ -263,14 +263,14 @@ protoOf(Compile).u1m = function () {
|
|
|
263
263
|
throw new NoClasspathPossible();
|
|
264
264
|
} else {
|
|
265
265
|
if (inputPath instanceof DirectoryPath) {
|
|
266
|
-
var tmp_4 = wirespecSources(new Directory(inputPath.
|
|
266
|
+
var tmp_4 = wirespecSources(new Directory(inputPath.n4y_1), logger);
|
|
267
267
|
tmp_0 = or(tmp_4, handleError$ref()).in_1;
|
|
268
268
|
} else {
|
|
269
269
|
if (inputPath instanceof FilePath) {
|
|
270
270
|
var tmp_5;
|
|
271
|
-
if (inputPath.
|
|
271
|
+
if (inputPath.s4y_1.e3_1 === 6) {
|
|
272
272
|
// Inline function 'kotlin.also' call
|
|
273
|
-
var this_1 = new NonEmptySet(nonEmptySetOf(new Source(inputPath.
|
|
273
|
+
var this_1 = new NonEmptySet(nonEmptySetOf(new Source(inputPath.r4y_1, read(inputPath)), []));
|
|
274
274
|
this_1.in_1;
|
|
275
275
|
logger.as('Found 1 wirespec file to process: ' + inputPath.toString());
|
|
276
276
|
tmp_5 = this_1.in_1;
|
|
@@ -285,32 +285,32 @@ protoOf(Compile).u1m = function () {
|
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
287
|
var sources = tmp_0;
|
|
288
|
-
var
|
|
288
|
+
var emitter = toEmitter_0(_get_language__lew619(this), Companion_instance_0.at(this.p37()), new EmitShared(this.a4w()), this.e1b());
|
|
289
289
|
var tmp_6;
|
|
290
290
|
if (inputPath == null) {
|
|
291
291
|
tmp_6 = null;
|
|
292
292
|
} else {
|
|
293
293
|
// Inline function 'kotlin.let' call
|
|
294
|
-
var tmp_7 = getOutPutPath(inputPath, this.
|
|
295
|
-
tmp_6 = new Directory(or(tmp_7, handleError$ref_0()).
|
|
294
|
+
var tmp_7 = getOutPutPath(inputPath, this.a5k());
|
|
295
|
+
tmp_6 = new Directory(or(tmp_7, handleError$ref_0()).n4y_1);
|
|
296
296
|
}
|
|
297
297
|
var outputDir = tmp_6;
|
|
298
|
-
var tmp_8 = this.
|
|
299
|
-
var tmp0 = new CompilerArguments(sources,
|
|
298
|
+
var tmp_8 = this.b5k(outputDir);
|
|
299
|
+
var tmp0 = new CompilerArguments(sources, emitter, tmp_8, handleError$ref_1(), Companion_instance_0.at(this.p37()), logger, this.a4w(), this.c5k(), this.d5k());
|
|
300
300
|
// Inline function 'kotlin.let' call
|
|
301
|
-
this.
|
|
301
|
+
this.u5i_1(tmp0);
|
|
302
302
|
};
|
|
303
303
|
function _get_format__qlarck($this) {
|
|
304
304
|
var tmp = KProperty1;
|
|
305
|
-
return $this.
|
|
305
|
+
return $this.c5l_1.u1w($this, getPropertyCallableRef('format', 1, tmp, Convert$_get_format_$ref_ve190_0(), null));
|
|
306
306
|
}
|
|
307
307
|
function _get_stdin__b8xnlj_0($this) {
|
|
308
308
|
var tmp = KProperty1;
|
|
309
|
-
return $this.
|
|
309
|
+
return $this.d5l_1.u1w($this, getPropertyCallableRef('stdin', 1, tmp, Convert$_get_stdin_$ref_yiqct5_0(), null));
|
|
310
310
|
}
|
|
311
|
-
function
|
|
311
|
+
function _get_language__lew619_0($this) {
|
|
312
312
|
var tmp = KProperty1;
|
|
313
|
-
return $this.
|
|
313
|
+
return $this.e5l_1.u1w($this, getPropertyCallableRef('language', 1, tmp, Convert$_get_language_$ref_mm9xt9_0(), null));
|
|
314
314
|
}
|
|
315
315
|
function Convert$_get_format_$ref_ve190() {
|
|
316
316
|
return function (p0) {
|
|
@@ -332,14 +332,14 @@ function Convert$_get_stdin_$ref_yiqct5_0() {
|
|
|
332
332
|
return _get_stdin__b8xnlj_0(p0);
|
|
333
333
|
};
|
|
334
334
|
}
|
|
335
|
-
function Convert$
|
|
335
|
+
function Convert$_get_language_$ref_mm9xt9() {
|
|
336
336
|
return function (p0) {
|
|
337
|
-
return
|
|
337
|
+
return _get_language__lew619_0(p0);
|
|
338
338
|
};
|
|
339
339
|
}
|
|
340
|
-
function Convert$
|
|
340
|
+
function Convert$_get_language_$ref_mm9xt9_0() {
|
|
341
341
|
return function (p0) {
|
|
342
|
-
return
|
|
342
|
+
return _get_language__lew619_0(p0);
|
|
343
343
|
};
|
|
344
344
|
}
|
|
345
345
|
function handleError$ref_2() {
|
|
@@ -363,7 +363,7 @@ function handleError$ref_4() {
|
|
|
363
363
|
}
|
|
364
364
|
function Convert(converter) {
|
|
365
365
|
CommonOptions.call(this);
|
|
366
|
-
this.
|
|
366
|
+
this.b5l_1 = converter;
|
|
367
367
|
var tmp = this;
|
|
368
368
|
// Inline function 'com.github.ajalt.clikt.parameters.types.enum' call
|
|
369
369
|
var this_0 = argument(this, VOID, 'Input format');
|
|
@@ -383,19 +383,19 @@ function Convert(converter) {
|
|
|
383
383
|
}
|
|
384
384
|
var tmp_0 = choice_0(this_0, destination, true);
|
|
385
385
|
var tmp_1 = KProperty1;
|
|
386
|
-
tmp.
|
|
386
|
+
tmp.c5l_1 = tmp_0.a1w(this, getPropertyCallableRef('format', 1, tmp_1, Convert$_get_format_$ref_ve190(), null));
|
|
387
387
|
var tmp_2 = this;
|
|
388
388
|
var tmp_3 = optional(argument(this, VOID, 'stdin'));
|
|
389
389
|
var tmp_4 = KProperty1;
|
|
390
|
-
tmp_2.
|
|
390
|
+
tmp_2.d5l_1 = tmp_3.a1w(this, getPropertyCallableRef('stdin', 1, tmp_4, Convert$_get_stdin_$ref_yiqct5(), null));
|
|
391
391
|
var tmp_5 = this;
|
|
392
|
-
var tmp_6 =
|
|
392
|
+
var tmp_6 = single(choice(option(this, Options_Language_getInstance().z5i_1.slice(), 'Language'), Companion_instance_1.i4x(), VOID, true), Language_Wirespec_getInstance());
|
|
393
393
|
var tmp_7 = KProperty1;
|
|
394
|
-
tmp_5.
|
|
394
|
+
tmp_5.e5l_1 = tmp_6.e1x(this, getPropertyCallableRef('language', 1, tmp_7, Convert$_get_language_$ref_mm9xt9(), null));
|
|
395
395
|
}
|
|
396
|
-
protoOf(Convert).
|
|
397
|
-
var logger = new Logger(this.
|
|
398
|
-
var tmp = getFullPath(this.
|
|
396
|
+
protoOf(Convert).t1n = function () {
|
|
397
|
+
var logger = new Logger(this.y5j(this.x5j()));
|
|
398
|
+
var tmp = getFullPath(this.z5j());
|
|
399
399
|
var inputPath = or(tmp, handleError$ref_2());
|
|
400
400
|
var tmp_0;
|
|
401
401
|
if (inputPath == null) {
|
|
@@ -424,10 +424,10 @@ protoOf(Convert).u1m = function () {
|
|
|
424
424
|
} else {
|
|
425
425
|
if (inputPath instanceof FilePath) {
|
|
426
426
|
var tmp_3;
|
|
427
|
-
switch (inputPath.
|
|
427
|
+
switch (inputPath.s4y_1.e3_1) {
|
|
428
428
|
case 7:
|
|
429
429
|
case 11:
|
|
430
|
-
tmp_3 = new Source(inputPath.
|
|
430
|
+
tmp_3 = new Source(inputPath.r4y_1, read(inputPath));
|
|
431
431
|
break;
|
|
432
432
|
default:
|
|
433
433
|
throw new JSONFileError();
|
|
@@ -443,101 +443,101 @@ protoOf(Convert).u1m = function () {
|
|
|
443
443
|
}
|
|
444
444
|
}
|
|
445
445
|
var source = tmp_0;
|
|
446
|
-
var
|
|
446
|
+
var emitter = toEmitter_0(_get_language__lew619_0(this), Companion_instance_0.at(this.p37()), new EmitShared(this.a4w()), this.e1b());
|
|
447
447
|
var tmp_4;
|
|
448
448
|
if (inputPath == null) {
|
|
449
449
|
tmp_4 = null;
|
|
450
450
|
} else {
|
|
451
451
|
// Inline function 'kotlin.let' call
|
|
452
|
-
var tmp_5 = getOutPutPath(inputPath, this.
|
|
453
|
-
tmp_4 = new Directory(or(tmp_5, handleError$ref_3()).
|
|
452
|
+
var tmp_5 = getOutPutPath(inputPath, this.a5k());
|
|
453
|
+
tmp_4 = new Directory(or(tmp_5, handleError$ref_3()).n4y_1);
|
|
454
454
|
}
|
|
455
455
|
var directory = tmp_4;
|
|
456
456
|
var tmp_6 = _get_format__qlarck(this);
|
|
457
457
|
var tmp_7 = nonEmptySetOf(source, []);
|
|
458
|
-
var tmp_8 = this.
|
|
459
|
-
var tmp0 = new ConverterArguments(tmp_6, tmp_7,
|
|
458
|
+
var tmp_8 = this.b5k(directory);
|
|
459
|
+
var tmp0 = new ConverterArguments(tmp_6, tmp_7, emitter, tmp_8, handleError$ref_4(), Companion_instance_0.at(this.p37()), logger, this.a4w(), this.c5k(), this.d5k());
|
|
460
460
|
// Inline function 'kotlin.let' call
|
|
461
|
-
this.
|
|
461
|
+
this.b5l_1(tmp0);
|
|
462
462
|
};
|
|
463
463
|
function CommonOptions$_get_input_$ref_6c1nvp() {
|
|
464
464
|
return function (p0) {
|
|
465
|
-
return p0.
|
|
465
|
+
return p0.z5j();
|
|
466
466
|
};
|
|
467
467
|
}
|
|
468
468
|
function CommonOptions$_get_input_$ref_6c1nvp_0() {
|
|
469
469
|
return function (p0) {
|
|
470
|
-
return p0.
|
|
470
|
+
return p0.z5j();
|
|
471
471
|
};
|
|
472
472
|
}
|
|
473
473
|
function CommonOptions$_get_output_$ref_eo6xdi() {
|
|
474
474
|
return function (p0) {
|
|
475
|
-
return p0.
|
|
475
|
+
return p0.a5k();
|
|
476
476
|
};
|
|
477
477
|
}
|
|
478
478
|
function CommonOptions$_get_output_$ref_eo6xdi_0() {
|
|
479
479
|
return function (p0) {
|
|
480
|
-
return p0.
|
|
480
|
+
return p0.a5k();
|
|
481
481
|
};
|
|
482
482
|
}
|
|
483
483
|
function CommonOptions$_get_packageName_$ref_k5vxsu() {
|
|
484
484
|
return function (p0) {
|
|
485
|
-
return p0.
|
|
485
|
+
return p0.p37();
|
|
486
486
|
};
|
|
487
487
|
}
|
|
488
488
|
function CommonOptions$_get_packageName_$ref_k5vxsu_0() {
|
|
489
489
|
return function (p0) {
|
|
490
|
-
return p0.
|
|
490
|
+
return p0.p37();
|
|
491
491
|
};
|
|
492
492
|
}
|
|
493
493
|
function CommonOptions$_get_logLevel_$ref_mp4bhx() {
|
|
494
494
|
return function (p0) {
|
|
495
|
-
return p0.
|
|
495
|
+
return p0.x5j();
|
|
496
496
|
};
|
|
497
497
|
}
|
|
498
498
|
function CommonOptions$_get_logLevel_$ref_mp4bhx_0() {
|
|
499
499
|
return function (p0) {
|
|
500
|
-
return p0.
|
|
500
|
+
return p0.x5j();
|
|
501
501
|
};
|
|
502
502
|
}
|
|
503
503
|
function CommonOptions$_get_shared_$ref_7r7o2u() {
|
|
504
504
|
return function (p0) {
|
|
505
|
-
return p0.
|
|
505
|
+
return p0.a4w();
|
|
506
506
|
};
|
|
507
507
|
}
|
|
508
508
|
function CommonOptions$_get_shared_$ref_7r7o2u_0() {
|
|
509
509
|
return function (p0) {
|
|
510
|
-
return p0.
|
|
510
|
+
return p0.a4w();
|
|
511
511
|
};
|
|
512
512
|
}
|
|
513
513
|
function CommonOptions$_get_strict_$ref_vrzh6q() {
|
|
514
514
|
return function (p0) {
|
|
515
|
-
return p0.
|
|
515
|
+
return p0.c5k();
|
|
516
516
|
};
|
|
517
517
|
}
|
|
518
518
|
function CommonOptions$_get_strict_$ref_vrzh6q_0() {
|
|
519
519
|
return function (p0) {
|
|
520
|
-
return p0.
|
|
520
|
+
return p0.c5k();
|
|
521
521
|
};
|
|
522
522
|
}
|
|
523
523
|
function CommonOptions$_get_ignoreDefaults_$ref_doa1uh() {
|
|
524
524
|
return function (p0) {
|
|
525
|
-
return p0.
|
|
525
|
+
return p0.d5k();
|
|
526
526
|
};
|
|
527
527
|
}
|
|
528
528
|
function CommonOptions$_get_ignoreDefaults_$ref_doa1uh_0() {
|
|
529
529
|
return function (p0) {
|
|
530
|
-
return p0.
|
|
530
|
+
return p0.d5k();
|
|
531
531
|
};
|
|
532
532
|
}
|
|
533
533
|
function CommonOptions$_get_extensions_$ref_scybvt() {
|
|
534
534
|
return function (p0) {
|
|
535
|
-
return p0.
|
|
535
|
+
return p0.e1b();
|
|
536
536
|
};
|
|
537
537
|
}
|
|
538
538
|
function CommonOptions$_get_extensions_$ref_scybvt_0() {
|
|
539
539
|
return function (p0) {
|
|
540
|
-
return p0.
|
|
540
|
+
return p0.e1b();
|
|
541
541
|
};
|
|
542
542
|
}
|
|
543
543
|
function CommonOptions$writer$lambda($directory, this$0) {
|
|
@@ -552,11 +552,11 @@ function CommonOptions$writer$lambda($directory, this$0) {
|
|
|
552
552
|
tmp = null;
|
|
553
553
|
} else {
|
|
554
554
|
// Inline function 'kotlin.let' call
|
|
555
|
-
write(Companion_instance_2.
|
|
555
|
+
write(Companion_instance_2.p4y(_DirectoryPath___get_value__impl__hdy2e3(tmp0_safe_receiver.o4y_1) + '/' + element.hq_1), element.iq_1);
|
|
556
556
|
tmp = Unit_instance;
|
|
557
557
|
}
|
|
558
558
|
if (tmp == null) {
|
|
559
|
-
this$0.
|
|
559
|
+
this$0.i1m(element.iq_1);
|
|
560
560
|
}
|
|
561
561
|
}
|
|
562
562
|
return Unit_instance;
|
|
@@ -565,71 +565,71 @@ function CommonOptions$writer$lambda($directory, this$0) {
|
|
|
565
565
|
function CommonOptions() {
|
|
566
566
|
CliktCommand.call(this);
|
|
567
567
|
var tmp = this;
|
|
568
|
-
var tmp_0 = option(this, Options_Input_getInstance().
|
|
568
|
+
var tmp_0 = option(this, Options_Input_getInstance().z5i_1.slice(), 'Input');
|
|
569
569
|
var tmp_1 = KProperty1;
|
|
570
|
-
tmp.
|
|
570
|
+
tmp.p5j_1 = tmp_0.e1x(this, getPropertyCallableRef('input', 1, tmp_1, CommonOptions$_get_input_$ref_6c1nvp(), null));
|
|
571
571
|
var tmp_2 = this;
|
|
572
|
-
var tmp_3 = option(this, Options_Output_getInstance().
|
|
572
|
+
var tmp_3 = option(this, Options_Output_getInstance().z5i_1.slice(), 'Output');
|
|
573
573
|
var tmp_4 = KProperty1;
|
|
574
|
-
tmp_2.
|
|
574
|
+
tmp_2.q5j_1 = tmp_3.e1x(this, getPropertyCallableRef('output', 1, tmp_4, CommonOptions$_get_output_$ref_eo6xdi(), null));
|
|
575
575
|
var tmp_5 = this;
|
|
576
|
-
var tmp_6 = default_0(option(this, Options_PackageName_getInstance().
|
|
576
|
+
var tmp_6 = default_0(option(this, Options_PackageName_getInstance().z5i_1.slice(), 'Package name'), 'community.flock.wirespec.generated');
|
|
577
577
|
var tmp_7 = KProperty1;
|
|
578
|
-
tmp_5.
|
|
578
|
+
tmp_5.r5j_1 = tmp_6.e1x(this, getPropertyCallableRef('packageName', 1, tmp_7, CommonOptions$_get_packageName_$ref_k5vxsu(), null));
|
|
579
579
|
var tmp_8 = this;
|
|
580
|
-
var tmp_9 = default_0(option(this, Options_LogLevel_getInstance().
|
|
580
|
+
var tmp_9 = default_0(option(this, Options_LogLevel_getInstance().z5i_1.slice(), 'Log level: ' + Companion_instance.toString()), Level_INFO_getInstance().toString());
|
|
581
581
|
var tmp_10 = KProperty1;
|
|
582
|
-
tmp_8.
|
|
582
|
+
tmp_8.s5j_1 = tmp_9.e1x(this, getPropertyCallableRef('logLevel', 1, tmp_10, CommonOptions$_get_logLevel_$ref_mp4bhx(), null));
|
|
583
583
|
var tmp_11 = this;
|
|
584
|
-
var tmp_12 = flag(option(this, Options_Shared_getInstance().
|
|
584
|
+
var tmp_12 = flag(option(this, Options_Shared_getInstance().z5i_1.slice(), 'Generate shared wirespec code'), [], false);
|
|
585
585
|
var tmp_13 = KProperty1;
|
|
586
|
-
tmp_11.
|
|
586
|
+
tmp_11.t5j_1 = tmp_12.e1x(this, getPropertyCallableRef('shared', 1, tmp_13, CommonOptions$_get_shared_$ref_7r7o2u(), null));
|
|
587
587
|
var tmp_14 = this;
|
|
588
|
-
var tmp_15 = flag(option(this, Options_Strict_getInstance().
|
|
588
|
+
var tmp_15 = flag(option(this, Options_Strict_getInstance().z5i_1.slice(), 'Strict mode'), []);
|
|
589
589
|
var tmp_16 = KProperty1;
|
|
590
|
-
tmp_14.
|
|
590
|
+
tmp_14.u5j_1 = tmp_15.e1x(this, getPropertyCallableRef('strict', 1, tmp_16, CommonOptions$_get_strict_$ref_vrzh6q(), null));
|
|
591
591
|
var tmp_17 = this;
|
|
592
|
-
var tmp_18 = flag(option(this, Options_IgnoreDefaults_getInstance().
|
|
592
|
+
var tmp_18 = flag(option(this, Options_IgnoreDefaults_getInstance().z5i_1.slice(), 'Leave field default values out of the emitted code'), []);
|
|
593
593
|
var tmp_19 = KProperty1;
|
|
594
|
-
tmp_17.
|
|
594
|
+
tmp_17.v5j_1 = tmp_18.e1x(this, getPropertyCallableRef('ignoreDefaults', 1, tmp_19, CommonOptions$_get_ignoreDefaults_$ref_doa1uh(), null));
|
|
595
595
|
var tmp_20 = this;
|
|
596
|
-
var tmp_21 = multiple(choice(option(this, Options_Extension_getInstance().
|
|
596
|
+
var tmp_21 = multiple(choice(option(this, Options_Extension_getInstance().z5i_1.slice(), 'Extension, applied to the languages it supports'), Companion_instance_3.i4x(), VOID, true));
|
|
597
597
|
var tmp_22 = KProperty1;
|
|
598
|
-
tmp_20.
|
|
598
|
+
tmp_20.w5j_1 = tmp_21.e1x(this, getPropertyCallableRef('extensions', 1, tmp_22, CommonOptions$_get_extensions_$ref_scybvt(), null));
|
|
599
599
|
}
|
|
600
|
-
protoOf(CommonOptions).
|
|
600
|
+
protoOf(CommonOptions).z5j = function () {
|
|
601
601
|
var tmp = KProperty1;
|
|
602
|
-
return this.
|
|
602
|
+
return this.p5j_1.u1w(this, getPropertyCallableRef('input', 1, tmp, CommonOptions$_get_input_$ref_6c1nvp_0(), null));
|
|
603
603
|
};
|
|
604
|
-
protoOf(CommonOptions).
|
|
604
|
+
protoOf(CommonOptions).a5k = function () {
|
|
605
605
|
var tmp = KProperty1;
|
|
606
|
-
return this.
|
|
606
|
+
return this.q5j_1.u1w(this, getPropertyCallableRef('output', 1, tmp, CommonOptions$_get_output_$ref_eo6xdi_0(), null));
|
|
607
607
|
};
|
|
608
|
-
protoOf(CommonOptions).
|
|
608
|
+
protoOf(CommonOptions).p37 = function () {
|
|
609
609
|
var tmp = KProperty1;
|
|
610
|
-
return this.
|
|
610
|
+
return this.r5j_1.u1w(this, getPropertyCallableRef('packageName', 1, tmp, CommonOptions$_get_packageName_$ref_k5vxsu_0(), null));
|
|
611
611
|
};
|
|
612
|
-
protoOf(CommonOptions).
|
|
612
|
+
protoOf(CommonOptions).x5j = function () {
|
|
613
613
|
var tmp = KProperty1;
|
|
614
|
-
return this.
|
|
614
|
+
return this.s5j_1.u1w(this, getPropertyCallableRef('logLevel', 1, tmp, CommonOptions$_get_logLevel_$ref_mp4bhx_0(), null));
|
|
615
615
|
};
|
|
616
|
-
protoOf(CommonOptions).
|
|
616
|
+
protoOf(CommonOptions).a4w = function () {
|
|
617
617
|
var tmp = KProperty1;
|
|
618
|
-
return this.
|
|
618
|
+
return this.t5j_1.u1w(this, getPropertyCallableRef('shared', 1, tmp, CommonOptions$_get_shared_$ref_7r7o2u_0(), null));
|
|
619
619
|
};
|
|
620
|
-
protoOf(CommonOptions).
|
|
620
|
+
protoOf(CommonOptions).c5k = function () {
|
|
621
621
|
var tmp = KProperty1;
|
|
622
|
-
return this.
|
|
622
|
+
return this.u5j_1.u1w(this, getPropertyCallableRef('strict', 1, tmp, CommonOptions$_get_strict_$ref_vrzh6q_0(), null));
|
|
623
623
|
};
|
|
624
|
-
protoOf(CommonOptions).
|
|
624
|
+
protoOf(CommonOptions).d5k = function () {
|
|
625
625
|
var tmp = KProperty1;
|
|
626
|
-
return this.
|
|
626
|
+
return this.v5j_1.u1w(this, getPropertyCallableRef('ignoreDefaults', 1, tmp, CommonOptions$_get_ignoreDefaults_$ref_doa1uh_0(), null));
|
|
627
627
|
};
|
|
628
|
-
protoOf(CommonOptions).
|
|
628
|
+
protoOf(CommonOptions).e1b = function () {
|
|
629
629
|
var tmp = KProperty1;
|
|
630
|
-
return this.
|
|
630
|
+
return this.w5j_1.u1w(this, getPropertyCallableRef('extensions', 1, tmp, CommonOptions$_get_extensions_$ref_scybvt_0(), null));
|
|
631
631
|
};
|
|
632
|
-
protoOf(CommonOptions).
|
|
632
|
+
protoOf(CommonOptions).y5j = function (_this__u8e3s4) {
|
|
633
633
|
// Inline function 'kotlin.text.trim' call
|
|
634
634
|
// Inline function 'kotlin.text.uppercase' call
|
|
635
635
|
// Inline function 'kotlin.js.asDynamic' call
|
|
@@ -652,9 +652,13 @@ protoOf(CommonOptions).p5h = function (_this__u8e3s4) {
|
|
|
652
652
|
}
|
|
653
653
|
return tmp;
|
|
654
654
|
};
|
|
655
|
-
protoOf(CommonOptions).
|
|
655
|
+
protoOf(CommonOptions).b5k = function (directory) {
|
|
656
656
|
return CommonOptions$writer$lambda(directory, this);
|
|
657
657
|
};
|
|
658
|
+
function single(_this__u8e3s4, default_0) {
|
|
659
|
+
var tmp = default_0.toString();
|
|
660
|
+
return transformAll(_this__u8e3s4, tmp, VOID, single$lambda(default_0));
|
|
661
|
+
}
|
|
658
662
|
var Options_Input_instance;
|
|
659
663
|
var Options_Output_instance;
|
|
660
664
|
var Options_Language_instance;
|
|
@@ -681,39 +685,32 @@ function Options_initEntries() {
|
|
|
681
685
|
}
|
|
682
686
|
function Options(name, ordinal, flags) {
|
|
683
687
|
Enum.call(this, name, ordinal);
|
|
684
|
-
this.
|
|
688
|
+
this.z5i_1 = flags;
|
|
685
689
|
}
|
|
686
690
|
function handleError(string) {
|
|
687
691
|
throw new CliktError(string);
|
|
688
692
|
}
|
|
689
|
-
function
|
|
690
|
-
// Inline function 'kotlin.
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
var tmp
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
var tmp_0 = tmp0_elvis_lhs;
|
|
711
|
-
if ((tmp_0 == null ? null : new NonEmptySet(tmp_0)) == null) {
|
|
712
|
-
tmp = nonEmptySetOf(new WirespecEmitter(), []);
|
|
713
|
-
} else {
|
|
714
|
-
tmp = tmp0_elvis_lhs;
|
|
715
|
-
}
|
|
716
|
-
return tmp;
|
|
693
|
+
function toEmitter_0(_this__u8e3s4, packageName, emitShared, extensions) {
|
|
694
|
+
// Inline function 'kotlin.let' call
|
|
695
|
+
var it = toEmitter(_this__u8e3s4, packageName, emitShared);
|
|
696
|
+
return withExtensions(it, toIrExtensions(extensions, packageName, it.wp()));
|
|
697
|
+
}
|
|
698
|
+
function single$lambda($default) {
|
|
699
|
+
return function ($this$transformAll, languages) {
|
|
700
|
+
var tmp;
|
|
701
|
+
switch (languages.c1()) {
|
|
702
|
+
case 0:
|
|
703
|
+
tmp = $default;
|
|
704
|
+
break;
|
|
705
|
+
case 1:
|
|
706
|
+
tmp = first(languages);
|
|
707
|
+
break;
|
|
708
|
+
default:
|
|
709
|
+
$this$transformAll.d1w('Pick one language per run, not ' + joinToString(languages) + '.');
|
|
710
|
+
break;
|
|
711
|
+
}
|
|
712
|
+
return tmp;
|
|
713
|
+
};
|
|
717
714
|
}
|
|
718
715
|
function Options_Input_getInstance() {
|
|
719
716
|
Options_initEntries();
|
|
@@ -755,7 +752,7 @@ function main_0(args) {
|
|
|
755
752
|
// Inline function 'kotlin.collections.mapNotNull' call
|
|
756
753
|
var tmp0 = until(0, 20);
|
|
757
754
|
// Inline function 'kotlin.collections.mapNotNullTo' call
|
|
758
|
-
var destination = ArrayList_init_$Create$
|
|
755
|
+
var destination = ArrayList_init_$Create$();
|
|
759
756
|
// Inline function 'kotlin.collections.forEach' call
|
|
760
757
|
var inductionVariable = tmp0.q1_1;
|
|
761
758
|
var last = tmp0.r1_1;
|
|
@@ -776,7 +773,7 @@ function main_0(args) {
|
|
|
776
773
|
// Inline function 'kotlin.let' call
|
|
777
774
|
var tmp = Companion_instance_5;
|
|
778
775
|
var tmp_0 = compile$ref();
|
|
779
|
-
main(tmp.
|
|
776
|
+
main(tmp.w5h(tmp_0, convert$ref()), destination);
|
|
780
777
|
}
|
|
781
778
|
function compile$ref() {
|
|
782
779
|
var l = function (p0) {
|
|
@@ -818,7 +815,7 @@ function parser(source) {
|
|
|
818
815
|
// Inline function 'kotlin.collections.flatMap' call
|
|
819
816
|
var tmp0 = _NonEmptyList___get_all__impl__pmf509(this_1);
|
|
820
817
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
821
|
-
var destination = ArrayList_init_$Create$
|
|
818
|
+
var destination = ArrayList_init_$Create$();
|
|
822
819
|
var _iterator__ex2g4s = tmp0.t();
|
|
823
820
|
while (_iterator__ex2g4s.u()) {
|
|
824
821
|
var element = _iterator__ex2g4s.v();
|
|
@@ -829,7 +826,7 @@ function parser(source) {
|
|
|
829
826
|
// Inline function 'kotlin.collections.map' call
|
|
830
827
|
var this_2 = NonEmptyList__toList_impl_t5xcy2(tmp$ret$3);
|
|
831
828
|
// Inline function 'kotlin.collections.mapTo' call
|
|
832
|
-
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_2, 10));
|
|
829
|
+
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
|
|
833
830
|
var _iterator__ex2g4s_0 = this_2.t();
|
|
834
831
|
while (_iterator__ex2g4s_0.u()) {
|
|
835
832
|
var item = _iterator__ex2g4s_0.v();
|