@flock/wirespec 0.21.0 → 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 +1192 -1311
- 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 +211 -128
- 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
|
@@ -21,36 +21,36 @@ import {
|
|
|
21
21
|
getPropertyCallableRef3hckxc0xueiaj as getPropertyCallableRef,
|
|
22
22
|
listOfvhqybd2zx248 as listOf,
|
|
23
23
|
noWhenBranchMatchedException2a6r7ubxgky5j as noWhenBranchMatchedException,
|
|
24
|
-
|
|
24
|
+
Unit_instancev9v8hjid95df as Unit_instance,
|
|
25
25
|
mapCapacity1h45rc3eh9p2l as mapCapacity,
|
|
26
26
|
coerceAtLeast2bkz8m9ik7hep as coerceAtLeast,
|
|
27
|
-
LinkedHashMap_init_$Create$
|
|
27
|
+
LinkedHashMap_init_$Create$1gzy1x4a46gd4 as LinkedHashMap_init_$Create$,
|
|
28
28
|
THROW_CCE2g6jy02ryeudk as THROW_CCE,
|
|
29
29
|
isCharSequence1ju9jr1w86plq as isCharSequence,
|
|
30
30
|
trim11nh7r46at6sx as trim,
|
|
31
31
|
toString1pkumu07cwy4m as toString,
|
|
32
32
|
Enum3alwj03lh1n41 as Enum,
|
|
33
33
|
collectionSizeOrDefault36dulx8yinfqm as collectionSizeOrDefault,
|
|
34
|
-
ArrayList_init_$Create$
|
|
34
|
+
ArrayList_init_$Create$2byt5m5yn22yy as ArrayList_init_$Create$,
|
|
35
35
|
until1jbpn0z3f8lbg as until,
|
|
36
|
-
ArrayList_init_$Create$
|
|
36
|
+
ArrayList_init_$Create$37gc04va6yfo2 as ArrayList_init_$Create$_0,
|
|
37
37
|
joinToString1cxrrlmo0chqs as joinToString,
|
|
38
|
-
IllegalStateException_init_$Create$
|
|
38
|
+
IllegalStateException_init_$Create$1h4bcfod21ri0 as IllegalStateException_init_$Create$,
|
|
39
39
|
addAll1k27qatfgp3k5 as addAll,
|
|
40
40
|
copyToArray2j022khrow2yi as copyToArray,
|
|
41
41
|
isArray1hxjqtqy632bc as isArray,
|
|
42
42
|
} from './kotlin-kotlin-stdlib.mjs';
|
|
43
43
|
import {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
FileExtension_Wirespec_getInstance3awesett59616 as FileExtension_Wirespec_getInstance,
|
|
45
|
+
FileExtension_JSON_getInstancel2q389n0axuc as FileExtension_JSON_getInstance,
|
|
46
|
+
Companion_instance20rky2ffsqbmt as Companion_instance,
|
|
47
47
|
Logger1cwdyrq5itr5l as Logger,
|
|
48
|
-
|
|
48
|
+
Companion_instance21vwhhqsaytqt as Companion_instance_0,
|
|
49
49
|
EmitSharedetokabwo9q4q as EmitShared,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
Level_INFO_getInstance1jwffmh2os99t as Level_INFO_getInstance,
|
|
51
|
+
Level_DEBUG_getInstance3osr5ne4jmdcj as Level_DEBUG_getInstance,
|
|
52
|
+
Level_WARN_getInstanceq4euntxdpan3 as Level_WARN_getInstance,
|
|
53
|
+
Level_ERROR_getInstance23ddtl147gk4n as Level_ERROR_getInstance,
|
|
54
54
|
FileUri2xjkmf4jmvpab as FileUri,
|
|
55
55
|
ModuleContent750xezzquzy9 as ModuleContent,
|
|
56
56
|
parse24q0pxmbph48t as parse,
|
|
@@ -64,8 +64,8 @@ import {
|
|
|
64
64
|
CliktCommand1a5aj7xujka26 as CliktCommand,
|
|
65
65
|
} from './clikt-clikt-mordant.mjs';
|
|
66
66
|
import {
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
Companion_instanceostrm0i8dq1p as Companion_instance_1,
|
|
68
|
+
Language_Kotlin_getInstancel9flkgp6e3q4 as Language_Kotlin_getInstance,
|
|
69
69
|
getFullPath4g3ciksg8rpm as getFullPath,
|
|
70
70
|
read1bpb5m43oodfb as read,
|
|
71
71
|
Source2leyaqfqfs5k3 as Source,
|
|
@@ -75,13 +75,13 @@ import {
|
|
|
75
75
|
or33xhl4wx85q9x as or,
|
|
76
76
|
DirectoryPath39bbfr0ixndbr as DirectoryPath,
|
|
77
77
|
ClassPath7upbvx9mwagz as ClassPath,
|
|
78
|
-
|
|
78
|
+
_Name___init__impl__o4q07e3vb5gulc0hok1 as _Name___init__impl__o4q07e,
|
|
79
79
|
getOutPutPathqmn3xkxu6se6 as getOutPutPath,
|
|
80
80
|
CompilerArguments27p1etc1665zg as CompilerArguments,
|
|
81
81
|
values39f22etrsivck as values,
|
|
82
82
|
ConverterArgumentsa8xc45eyvf51 as ConverterArguments,
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
Companion_instance3u189ncjgxp6 as Companion_instance_2,
|
|
84
|
+
_DirectoryPath___get_value__impl__hdy2e31of6jj3zjtzs5 as _DirectoryPath___get_value__impl__hdy2e3,
|
|
85
85
|
write1u316o1mmac8j as write,
|
|
86
86
|
toEmitter3vk7m5bivtqhk as toEmitter,
|
|
87
87
|
compile3ocumkpx3p9ko as compile,
|
|
@@ -95,10 +95,10 @@ import {
|
|
|
95
95
|
toNonEmptySetOrNull1tjnd9jrkd4bs as toNonEmptySetOrNull,
|
|
96
96
|
nonEmptyListOf17xawqyzwrlrt as nonEmptyListOf,
|
|
97
97
|
NonEmptyList3ak25ihy2gcvs as NonEmptyList,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
98
|
+
_NonEmptyList___get_all__impl__pmf5092xnz0i2teaa6d as _NonEmptyList___get_all__impl__pmf509,
|
|
99
|
+
_NonEmptyList___init__impl__fxd0xprpnd63likgzm as _NonEmptyList___init__impl__fxd0xp,
|
|
100
|
+
NonEmptyList__toList_impl_t5xcy266xhxpenbpfx as NonEmptyList__toList_impl_t5xcy2,
|
|
101
|
+
Companion_instancexcyhq1gimo3o as Companion_instance_3,
|
|
102
102
|
} from './arrow-arrow-core.mjs';
|
|
103
103
|
import { WirespecEmitter2ad9je4ecrvjk as WirespecEmitter } from './wirespec-src-compiler-emitters-wirespec.mjs';
|
|
104
104
|
import { produce6pbudlitvnns as produce } from './wirespec-src-compiler-lib.mjs';
|
|
@@ -151,7 +151,7 @@ function SpecificFile(extension) {
|
|
|
151
151
|
}
|
|
152
152
|
function Companion() {
|
|
153
153
|
}
|
|
154
|
-
protoOf(Companion).
|
|
154
|
+
protoOf(Companion).s4x = function (compile, convert) {
|
|
155
155
|
return subcommands(new WirespecCli(), [new Compile(compile), new Convert(convert)]);
|
|
156
156
|
};
|
|
157
157
|
var Companion_instance_4;
|
|
@@ -163,11 +163,11 @@ function WirespecCli() {
|
|
|
163
163
|
}
|
|
164
164
|
function _get_stdin__b8xnlj($this) {
|
|
165
165
|
var tmp = KProperty1;
|
|
166
|
-
return $this.
|
|
166
|
+
return $this.q4y_1.z1t($this, getPropertyCallableRef('stdin', 1, tmp, Compile$_get_stdin_$ref_5ywd7d_0(), null));
|
|
167
167
|
}
|
|
168
168
|
function _get_languages__ojonze($this) {
|
|
169
169
|
var tmp = KProperty1;
|
|
170
|
-
return $this.
|
|
170
|
+
return $this.r4y_1.z1t($this, getPropertyCallableRef('languages', 1, tmp, Compile$_get_languages_$ref_nluohg_0(), null));
|
|
171
171
|
}
|
|
172
172
|
function Compile$_get_stdin_$ref_5ywd7d() {
|
|
173
173
|
return function (p0) {
|
|
@@ -210,27 +210,27 @@ function handleError$ref_1() {
|
|
|
210
210
|
}
|
|
211
211
|
function Compile(compiler) {
|
|
212
212
|
CommonOptions.call(this);
|
|
213
|
-
this.
|
|
213
|
+
this.p4y_1 = compiler;
|
|
214
214
|
var tmp = this;
|
|
215
215
|
var tmp_0 = optional(argument(this, VOID, 'stdin'));
|
|
216
216
|
var tmp_1 = KProperty1;
|
|
217
|
-
tmp.
|
|
217
|
+
tmp.q4y_1 = tmp_0.f1t(this, getPropertyCallableRef('stdin', 1, tmp_1, Compile$_get_stdin_$ref_5ywd7d(), null));
|
|
218
218
|
var tmp_2 = this;
|
|
219
|
-
var tmp_3 = multiple(choice(option(this, Options_Language_getInstance().
|
|
219
|
+
var tmp_3 = multiple(choice(option(this, Options_Language_getInstance().u4y_1.slice(), 'Language'), Companion_instance_1.l4d(), VOID, true), listOf(Language_Kotlin_getInstance()));
|
|
220
220
|
var tmp_4 = KProperty1;
|
|
221
|
-
tmp_2.
|
|
221
|
+
tmp_2.r4y_1 = tmp_3.j1u(this, getPropertyCallableRef('languages', 1, tmp_4, Compile$_get_languages_$ref_nluohg(), null));
|
|
222
222
|
}
|
|
223
|
-
protoOf(Compile).
|
|
224
|
-
var logger = new Logger(this.
|
|
223
|
+
protoOf(Compile).y1k = function () {
|
|
224
|
+
var logger = new Logger(this.s4z(this.r4z()));
|
|
225
225
|
// Inline function 'arrow.core.getOrElse' call
|
|
226
|
-
var this_0 = getFullPath(this.
|
|
226
|
+
var this_0 = getFullPath(this.t4z());
|
|
227
227
|
var tmp;
|
|
228
228
|
if (this_0 instanceof Left) {
|
|
229
|
-
var it = this_0.
|
|
230
|
-
throw new CliktError(it.
|
|
229
|
+
var it = this_0.lm_1;
|
|
230
|
+
throw new CliktError(it.r4e_1);
|
|
231
231
|
} else {
|
|
232
232
|
if (this_0 instanceof Right) {
|
|
233
|
-
tmp = this_0.
|
|
233
|
+
tmp = this_0.nm_1;
|
|
234
234
|
} else {
|
|
235
235
|
noWhenBranchMatchedException();
|
|
236
236
|
}
|
|
@@ -260,17 +260,17 @@ protoOf(Compile).g13 = function () {
|
|
|
260
260
|
throw new NoClasspathPossible();
|
|
261
261
|
} else {
|
|
262
262
|
if (inputPath instanceof DirectoryPath) {
|
|
263
|
-
var tmp_4 = wirespecSources(new Directory(inputPath.
|
|
264
|
-
tmp_0 = or(tmp_4, handleError$ref()).
|
|
263
|
+
var tmp_4 = wirespecSources(new Directory(inputPath.l4e_1), logger);
|
|
264
|
+
tmp_0 = or(tmp_4, handleError$ref()).bn_1;
|
|
265
265
|
} else {
|
|
266
266
|
if (inputPath instanceof FilePath) {
|
|
267
267
|
var tmp_5;
|
|
268
|
-
if (inputPath.
|
|
268
|
+
if (inputPath.q4e_1.c3_1 === 6) {
|
|
269
269
|
// Inline function 'kotlin.also' call
|
|
270
|
-
var this_1 = new NonEmptySet(nonEmptySetOf(new Source(inputPath.
|
|
271
|
-
this_1.
|
|
272
|
-
logger.
|
|
273
|
-
tmp_5 = this_1.
|
|
270
|
+
var this_1 = new NonEmptySet(nonEmptySetOf(new Source(inputPath.p4e_1, read(inputPath)), []));
|
|
271
|
+
this_1.bn_1;
|
|
272
|
+
logger.qr('Found 1 wirespec file to process: ' + inputPath.toString());
|
|
273
|
+
tmp_5 = this_1.bn_1;
|
|
274
274
|
} else {
|
|
275
275
|
throw new WirespecFileError();
|
|
276
276
|
}
|
|
@@ -282,32 +282,32 @@ protoOf(Compile).g13 = function () {
|
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
var sources = tmp_0;
|
|
285
|
-
var emitters = toEmitters(_get_languages__ojonze(this), Companion_instance_0.
|
|
285
|
+
var emitters = toEmitters(_get_languages__ojonze(this), Companion_instance_0.qs(this.f1z()), new EmitShared(this.d4c()));
|
|
286
286
|
var tmp_6;
|
|
287
287
|
if (inputPath == null) {
|
|
288
288
|
tmp_6 = null;
|
|
289
289
|
} else {
|
|
290
290
|
// Inline function 'kotlin.let' call
|
|
291
|
-
var tmp_7 = getOutPutPath(inputPath, this.
|
|
292
|
-
tmp_6 = new Directory(or(tmp_7, handleError$ref_0()).
|
|
291
|
+
var tmp_7 = getOutPutPath(inputPath, this.u4z());
|
|
292
|
+
tmp_6 = new Directory(or(tmp_7, handleError$ref_0()).l4e_1);
|
|
293
293
|
}
|
|
294
294
|
var outputDir = tmp_6;
|
|
295
|
-
var tmp_8 = this.
|
|
296
|
-
var tmp0 = new CompilerArguments(sources, emitters, tmp_8, handleError$ref_1(), Companion_instance_0.
|
|
295
|
+
var tmp_8 = this.v4z(outputDir);
|
|
296
|
+
var tmp0 = new CompilerArguments(sources, emitters, tmp_8, handleError$ref_1(), Companion_instance_0.qs(this.f1z()), logger, this.d4c(), this.w4z(), this.x4z());
|
|
297
297
|
// Inline function 'kotlin.let' call
|
|
298
|
-
this.
|
|
298
|
+
this.p4y_1(tmp0);
|
|
299
299
|
};
|
|
300
300
|
function _get_format__qlarck($this) {
|
|
301
301
|
var tmp = KProperty1;
|
|
302
|
-
return $this.
|
|
302
|
+
return $this.v50_1.z1t($this, getPropertyCallableRef('format', 1, tmp, Convert$_get_format_$ref_ve190_0(), null));
|
|
303
303
|
}
|
|
304
304
|
function _get_stdin__b8xnlj_0($this) {
|
|
305
305
|
var tmp = KProperty1;
|
|
306
|
-
return $this.
|
|
306
|
+
return $this.w50_1.z1t($this, getPropertyCallableRef('stdin', 1, tmp, Convert$_get_stdin_$ref_yiqct5_0(), null));
|
|
307
307
|
}
|
|
308
308
|
function _get_languages__ojonze_0($this) {
|
|
309
309
|
var tmp = KProperty1;
|
|
310
|
-
return $this.
|
|
310
|
+
return $this.x50_1.z1t($this, getPropertyCallableRef('languages', 1, tmp, Convert$_get_languages_$ref_ykvilw_0(), null));
|
|
311
311
|
}
|
|
312
312
|
function Convert$_get_format_$ref_ve190() {
|
|
313
313
|
return function (p0) {
|
|
@@ -360,7 +360,7 @@ function handleError$ref_4() {
|
|
|
360
360
|
}
|
|
361
361
|
function Convert(converter) {
|
|
362
362
|
CommonOptions.call(this);
|
|
363
|
-
this.
|
|
363
|
+
this.u50_1 = converter;
|
|
364
364
|
var tmp = this;
|
|
365
365
|
// Inline function 'com.github.ajalt.clikt.parameters.types.enum' call
|
|
366
366
|
var this_0 = argument(this, VOID, 'Input format');
|
|
@@ -375,24 +375,24 @@ function Convert(converter) {
|
|
|
375
375
|
while (inductionVariable < last) {
|
|
376
376
|
var element = this_1[inductionVariable];
|
|
377
377
|
inductionVariable = inductionVariable + 1 | 0;
|
|
378
|
-
var tmp$ret$
|
|
379
|
-
destination.t2(tmp$ret$
|
|
378
|
+
var tmp$ret$4 = element.b3_1;
|
|
379
|
+
destination.t2(tmp$ret$4, element);
|
|
380
380
|
}
|
|
381
381
|
var tmp_0 = choice_0(this_0, destination, true);
|
|
382
382
|
var tmp_1 = KProperty1;
|
|
383
|
-
tmp.
|
|
383
|
+
tmp.v50_1 = tmp_0.f1t(this, getPropertyCallableRef('format', 1, tmp_1, Convert$_get_format_$ref_ve190(), null));
|
|
384
384
|
var tmp_2 = this;
|
|
385
385
|
var tmp_3 = optional(argument(this, VOID, 'stdin'));
|
|
386
386
|
var tmp_4 = KProperty1;
|
|
387
|
-
tmp_2.
|
|
387
|
+
tmp_2.w50_1 = tmp_3.f1t(this, getPropertyCallableRef('stdin', 1, tmp_4, Convert$_get_stdin_$ref_yiqct5(), null));
|
|
388
388
|
var tmp_5 = this;
|
|
389
|
-
var tmp_6 = multiple(choice(option(this, Options_Language_getInstance().
|
|
389
|
+
var tmp_6 = multiple(choice(option(this, Options_Language_getInstance().u4y_1.slice(), 'Language'), Companion_instance_1.l4d(), VOID, true));
|
|
390
390
|
var tmp_7 = KProperty1;
|
|
391
|
-
tmp_5.
|
|
391
|
+
tmp_5.x50_1 = tmp_6.j1u(this, getPropertyCallableRef('languages', 1, tmp_7, Convert$_get_languages_$ref_ykvilw(), null));
|
|
392
392
|
}
|
|
393
|
-
protoOf(Convert).
|
|
394
|
-
var logger = new Logger(this.
|
|
395
|
-
var tmp = getFullPath(this.
|
|
393
|
+
protoOf(Convert).y1k = function () {
|
|
394
|
+
var logger = new Logger(this.s4z(this.r4z()));
|
|
395
|
+
var tmp = getFullPath(this.t4z());
|
|
396
396
|
var inputPath = or(tmp, handleError$ref_2());
|
|
397
397
|
var tmp_0;
|
|
398
398
|
if (inputPath == null) {
|
|
@@ -421,14 +421,14 @@ protoOf(Convert).g13 = function () {
|
|
|
421
421
|
} else {
|
|
422
422
|
if (inputPath instanceof FilePath) {
|
|
423
423
|
var tmp_3;
|
|
424
|
-
if (inputPath.
|
|
425
|
-
tmp_3 = new Source(inputPath.
|
|
424
|
+
if (inputPath.q4e_1.c3_1 === 7) {
|
|
425
|
+
tmp_3 = new Source(inputPath.p4e_1, read(inputPath));
|
|
426
426
|
} else {
|
|
427
427
|
throw new JSONFileError();
|
|
428
428
|
}
|
|
429
429
|
// Inline function 'kotlin.also' call
|
|
430
430
|
var this_0 = tmp_3;
|
|
431
|
-
logger.
|
|
431
|
+
logger.qr('Found 1 file to process: ' + inputPath.toString());
|
|
432
432
|
tmp_0 = this_0;
|
|
433
433
|
} else {
|
|
434
434
|
noWhenBranchMatchedException();
|
|
@@ -437,81 +437,91 @@ protoOf(Convert).g13 = function () {
|
|
|
437
437
|
}
|
|
438
438
|
}
|
|
439
439
|
var source = tmp_0;
|
|
440
|
-
var emitters = toEmitters(_get_languages__ojonze_0(this), Companion_instance_0.
|
|
440
|
+
var emitters = toEmitters(_get_languages__ojonze_0(this), Companion_instance_0.qs(this.f1z()), new EmitShared(this.d4c()));
|
|
441
441
|
var tmp_4;
|
|
442
442
|
if (inputPath == null) {
|
|
443
443
|
tmp_4 = null;
|
|
444
444
|
} else {
|
|
445
445
|
// Inline function 'kotlin.let' call
|
|
446
|
-
var tmp_5 = getOutPutPath(inputPath, this.
|
|
447
|
-
tmp_4 = new Directory(or(tmp_5, handleError$ref_3()).
|
|
446
|
+
var tmp_5 = getOutPutPath(inputPath, this.u4z());
|
|
447
|
+
tmp_4 = new Directory(or(tmp_5, handleError$ref_3()).l4e_1);
|
|
448
448
|
}
|
|
449
449
|
var directory = tmp_4;
|
|
450
450
|
var tmp_6 = _get_format__qlarck(this);
|
|
451
451
|
var tmp_7 = nonEmptySetOf(source, []);
|
|
452
|
-
var tmp_8 = this.
|
|
453
|
-
var tmp0 = new ConverterArguments(tmp_6, tmp_7, emitters, tmp_8, handleError$ref_4(), Companion_instance_0.
|
|
452
|
+
var tmp_8 = this.v4z(directory);
|
|
453
|
+
var tmp0 = new ConverterArguments(tmp_6, tmp_7, emitters, tmp_8, handleError$ref_4(), Companion_instance_0.qs(this.f1z()), logger, this.d4c(), this.w4z(), this.x4z());
|
|
454
454
|
// Inline function 'kotlin.let' call
|
|
455
|
-
this.
|
|
455
|
+
this.u50_1(tmp0);
|
|
456
456
|
};
|
|
457
457
|
function CommonOptions$_get_input_$ref_6c1nvp() {
|
|
458
458
|
return function (p0) {
|
|
459
|
-
return p0.
|
|
459
|
+
return p0.t4z();
|
|
460
460
|
};
|
|
461
461
|
}
|
|
462
462
|
function CommonOptions$_get_input_$ref_6c1nvp_0() {
|
|
463
463
|
return function (p0) {
|
|
464
|
-
return p0.
|
|
464
|
+
return p0.t4z();
|
|
465
465
|
};
|
|
466
466
|
}
|
|
467
467
|
function CommonOptions$_get_output_$ref_eo6xdi() {
|
|
468
468
|
return function (p0) {
|
|
469
|
-
return p0.
|
|
469
|
+
return p0.u4z();
|
|
470
470
|
};
|
|
471
471
|
}
|
|
472
472
|
function CommonOptions$_get_output_$ref_eo6xdi_0() {
|
|
473
473
|
return function (p0) {
|
|
474
|
-
return p0.
|
|
474
|
+
return p0.u4z();
|
|
475
475
|
};
|
|
476
476
|
}
|
|
477
477
|
function CommonOptions$_get_packageName_$ref_k5vxsu() {
|
|
478
478
|
return function (p0) {
|
|
479
|
-
return p0.
|
|
479
|
+
return p0.f1z();
|
|
480
480
|
};
|
|
481
481
|
}
|
|
482
482
|
function CommonOptions$_get_packageName_$ref_k5vxsu_0() {
|
|
483
483
|
return function (p0) {
|
|
484
|
-
return p0.
|
|
484
|
+
return p0.f1z();
|
|
485
485
|
};
|
|
486
486
|
}
|
|
487
487
|
function CommonOptions$_get_logLevel_$ref_mp4bhx() {
|
|
488
488
|
return function (p0) {
|
|
489
|
-
return p0.
|
|
489
|
+
return p0.r4z();
|
|
490
490
|
};
|
|
491
491
|
}
|
|
492
492
|
function CommonOptions$_get_logLevel_$ref_mp4bhx_0() {
|
|
493
493
|
return function (p0) {
|
|
494
|
-
return p0.
|
|
494
|
+
return p0.r4z();
|
|
495
495
|
};
|
|
496
496
|
}
|
|
497
497
|
function CommonOptions$_get_shared_$ref_7r7o2u() {
|
|
498
498
|
return function (p0) {
|
|
499
|
-
return p0.
|
|
499
|
+
return p0.d4c();
|
|
500
500
|
};
|
|
501
501
|
}
|
|
502
502
|
function CommonOptions$_get_shared_$ref_7r7o2u_0() {
|
|
503
503
|
return function (p0) {
|
|
504
|
-
return p0.
|
|
504
|
+
return p0.d4c();
|
|
505
505
|
};
|
|
506
506
|
}
|
|
507
507
|
function CommonOptions$_get_strict_$ref_vrzh6q() {
|
|
508
508
|
return function (p0) {
|
|
509
|
-
return p0.
|
|
509
|
+
return p0.w4z();
|
|
510
510
|
};
|
|
511
511
|
}
|
|
512
512
|
function CommonOptions$_get_strict_$ref_vrzh6q_0() {
|
|
513
513
|
return function (p0) {
|
|
514
|
-
return p0.
|
|
514
|
+
return p0.w4z();
|
|
515
|
+
};
|
|
516
|
+
}
|
|
517
|
+
function CommonOptions$_get_ignoreDefaults_$ref_doa1uh() {
|
|
518
|
+
return function (p0) {
|
|
519
|
+
return p0.x4z();
|
|
520
|
+
};
|
|
521
|
+
}
|
|
522
|
+
function CommonOptions$_get_ignoreDefaults_$ref_doa1uh_0() {
|
|
523
|
+
return function (p0) {
|
|
524
|
+
return p0.x4z();
|
|
515
525
|
};
|
|
516
526
|
}
|
|
517
527
|
function CommonOptions$writer$lambda($directory, this$0) {
|
|
@@ -526,11 +536,11 @@ function CommonOptions$writer$lambda($directory, this$0) {
|
|
|
526
536
|
tmp = null;
|
|
527
537
|
} else {
|
|
528
538
|
// Inline function 'kotlin.let' call
|
|
529
|
-
write(Companion_instance_2.
|
|
539
|
+
write(Companion_instance_2.n4e(_DirectoryPath___get_value__impl__hdy2e3(tmp0_safe_receiver.m4e_1) + '/' + element.zp_1), element.aq_1);
|
|
530
540
|
tmp = Unit_instance;
|
|
531
541
|
}
|
|
532
542
|
if (tmp == null) {
|
|
533
|
-
this$0.
|
|
543
|
+
this$0.n1j(element.aq_1);
|
|
534
544
|
}
|
|
535
545
|
}
|
|
536
546
|
return Unit_instance;
|
|
@@ -539,55 +549,63 @@ function CommonOptions$writer$lambda($directory, this$0) {
|
|
|
539
549
|
function CommonOptions() {
|
|
540
550
|
CliktCommand.call(this);
|
|
541
551
|
var tmp = this;
|
|
542
|
-
var tmp_0 = option(this, Options_Input_getInstance().
|
|
552
|
+
var tmp_0 = option(this, Options_Input_getInstance().u4y_1.slice(), 'Input');
|
|
543
553
|
var tmp_1 = KProperty1;
|
|
544
|
-
tmp.
|
|
554
|
+
tmp.k4z_1 = tmp_0.j1u(this, getPropertyCallableRef('input', 1, tmp_1, CommonOptions$_get_input_$ref_6c1nvp(), null));
|
|
545
555
|
var tmp_2 = this;
|
|
546
|
-
var tmp_3 = option(this, Options_Output_getInstance().
|
|
556
|
+
var tmp_3 = option(this, Options_Output_getInstance().u4y_1.slice(), 'Output');
|
|
547
557
|
var tmp_4 = KProperty1;
|
|
548
|
-
tmp_2.
|
|
558
|
+
tmp_2.l4z_1 = tmp_3.j1u(this, getPropertyCallableRef('output', 1, tmp_4, CommonOptions$_get_output_$ref_eo6xdi(), null));
|
|
549
559
|
var tmp_5 = this;
|
|
550
|
-
var tmp_6 = default_0(option(this, Options_PackageName_getInstance().
|
|
560
|
+
var tmp_6 = default_0(option(this, Options_PackageName_getInstance().u4y_1.slice(), 'Package name'), 'community.flock.wirespec.generated');
|
|
551
561
|
var tmp_7 = KProperty1;
|
|
552
|
-
tmp_5.
|
|
562
|
+
tmp_5.m4z_1 = tmp_6.j1u(this, getPropertyCallableRef('packageName', 1, tmp_7, CommonOptions$_get_packageName_$ref_k5vxsu(), null));
|
|
553
563
|
var tmp_8 = this;
|
|
554
|
-
var tmp_9 = default_0(option(this, Options_LogLevel_getInstance().
|
|
564
|
+
var tmp_9 = default_0(option(this, Options_LogLevel_getInstance().u4y_1.slice(), 'Log level: ' + Companion_instance.toString()), Level_INFO_getInstance().toString());
|
|
555
565
|
var tmp_10 = KProperty1;
|
|
556
|
-
tmp_8.
|
|
566
|
+
tmp_8.n4z_1 = tmp_9.j1u(this, getPropertyCallableRef('logLevel', 1, tmp_10, CommonOptions$_get_logLevel_$ref_mp4bhx(), null));
|
|
557
567
|
var tmp_11 = this;
|
|
558
|
-
var tmp_12 = flag(option(this, Options_Shared_getInstance().
|
|
568
|
+
var tmp_12 = flag(option(this, Options_Shared_getInstance().u4y_1.slice(), 'Generate shared wirespec code'), [], false);
|
|
559
569
|
var tmp_13 = KProperty1;
|
|
560
|
-
tmp_11.
|
|
570
|
+
tmp_11.o4z_1 = tmp_12.j1u(this, getPropertyCallableRef('shared', 1, tmp_13, CommonOptions$_get_shared_$ref_7r7o2u(), null));
|
|
561
571
|
var tmp_14 = this;
|
|
562
|
-
var tmp_15 = flag(option(this, Options_Strict_getInstance().
|
|
572
|
+
var tmp_15 = flag(option(this, Options_Strict_getInstance().u4y_1.slice(), 'Strict mode'), []);
|
|
563
573
|
var tmp_16 = KProperty1;
|
|
564
|
-
tmp_14.
|
|
574
|
+
tmp_14.p4z_1 = tmp_15.j1u(this, getPropertyCallableRef('strict', 1, tmp_16, CommonOptions$_get_strict_$ref_vrzh6q(), null));
|
|
575
|
+
var tmp_17 = this;
|
|
576
|
+
var tmp_18 = flag(option(this, Options_IgnoreDefaults_getInstance().u4y_1.slice(), 'Leave field default values out of the emitted code'), []);
|
|
577
|
+
var tmp_19 = KProperty1;
|
|
578
|
+
tmp_17.q4z_1 = tmp_18.j1u(this, getPropertyCallableRef('ignoreDefaults', 1, tmp_19, CommonOptions$_get_ignoreDefaults_$ref_doa1uh(), null));
|
|
565
579
|
}
|
|
566
|
-
protoOf(CommonOptions).
|
|
580
|
+
protoOf(CommonOptions).t4z = function () {
|
|
581
|
+
var tmp = KProperty1;
|
|
582
|
+
return this.k4z_1.z1t(this, getPropertyCallableRef('input', 1, tmp, CommonOptions$_get_input_$ref_6c1nvp_0(), null));
|
|
583
|
+
};
|
|
584
|
+
protoOf(CommonOptions).u4z = function () {
|
|
567
585
|
var tmp = KProperty1;
|
|
568
|
-
return this.
|
|
586
|
+
return this.l4z_1.z1t(this, getPropertyCallableRef('output', 1, tmp, CommonOptions$_get_output_$ref_eo6xdi_0(), null));
|
|
569
587
|
};
|
|
570
|
-
protoOf(CommonOptions).
|
|
588
|
+
protoOf(CommonOptions).f1z = function () {
|
|
571
589
|
var tmp = KProperty1;
|
|
572
|
-
return this.
|
|
590
|
+
return this.m4z_1.z1t(this, getPropertyCallableRef('packageName', 1, tmp, CommonOptions$_get_packageName_$ref_k5vxsu_0(), null));
|
|
573
591
|
};
|
|
574
|
-
protoOf(CommonOptions).
|
|
592
|
+
protoOf(CommonOptions).r4z = function () {
|
|
575
593
|
var tmp = KProperty1;
|
|
576
|
-
return this.
|
|
594
|
+
return this.n4z_1.z1t(this, getPropertyCallableRef('logLevel', 1, tmp, CommonOptions$_get_logLevel_$ref_mp4bhx_0(), null));
|
|
577
595
|
};
|
|
578
|
-
protoOf(CommonOptions).
|
|
596
|
+
protoOf(CommonOptions).d4c = function () {
|
|
579
597
|
var tmp = KProperty1;
|
|
580
|
-
return this.
|
|
598
|
+
return this.o4z_1.z1t(this, getPropertyCallableRef('shared', 1, tmp, CommonOptions$_get_shared_$ref_7r7o2u_0(), null));
|
|
581
599
|
};
|
|
582
|
-
protoOf(CommonOptions).
|
|
600
|
+
protoOf(CommonOptions).w4z = function () {
|
|
583
601
|
var tmp = KProperty1;
|
|
584
|
-
return this.
|
|
602
|
+
return this.p4z_1.z1t(this, getPropertyCallableRef('strict', 1, tmp, CommonOptions$_get_strict_$ref_vrzh6q_0(), null));
|
|
585
603
|
};
|
|
586
|
-
protoOf(CommonOptions).
|
|
604
|
+
protoOf(CommonOptions).x4z = function () {
|
|
587
605
|
var tmp = KProperty1;
|
|
588
|
-
return this.
|
|
606
|
+
return this.q4z_1.z1t(this, getPropertyCallableRef('ignoreDefaults', 1, tmp, CommonOptions$_get_ignoreDefaults_$ref_doa1uh_0(), null));
|
|
589
607
|
};
|
|
590
|
-
protoOf(CommonOptions).
|
|
608
|
+
protoOf(CommonOptions).s4z = function (_this__u8e3s4) {
|
|
591
609
|
// Inline function 'kotlin.text.trim' call
|
|
592
610
|
// Inline function 'kotlin.text.uppercase' call
|
|
593
611
|
// Inline function 'kotlin.js.asDynamic' call
|
|
@@ -610,7 +628,7 @@ protoOf(CommonOptions).a4y = function (_this__u8e3s4) {
|
|
|
610
628
|
}
|
|
611
629
|
return tmp;
|
|
612
630
|
};
|
|
613
|
-
protoOf(CommonOptions).
|
|
631
|
+
protoOf(CommonOptions).v4z = function (directory) {
|
|
614
632
|
return CommonOptions$writer$lambda(directory, this);
|
|
615
633
|
};
|
|
616
634
|
var Options_Input_instance;
|
|
@@ -620,6 +638,7 @@ var Options_PackageName_instance;
|
|
|
620
638
|
var Options_LogLevel_instance;
|
|
621
639
|
var Options_Shared_instance;
|
|
622
640
|
var Options_Strict_instance;
|
|
641
|
+
var Options_IgnoreDefaults_instance;
|
|
623
642
|
var Options_entriesInitialized;
|
|
624
643
|
function Options_initEntries() {
|
|
625
644
|
if (Options_entriesInitialized)
|
|
@@ -632,10 +651,11 @@ function Options_initEntries() {
|
|
|
632
651
|
Options_LogLevel_instance = new Options('LogLevel', 4, ['--log-level']);
|
|
633
652
|
Options_Shared_instance = new Options('Shared', 5, ['--shared']);
|
|
634
653
|
Options_Strict_instance = new Options('Strict', 6, ['--strict']);
|
|
654
|
+
Options_IgnoreDefaults_instance = new Options('IgnoreDefaults', 7, ['--ignore-defaults']);
|
|
635
655
|
}
|
|
636
656
|
function Options(name, ordinal, flags) {
|
|
637
657
|
Enum.call(this, name, ordinal);
|
|
638
|
-
this.
|
|
658
|
+
this.u4y_1 = flags;
|
|
639
659
|
}
|
|
640
660
|
function handleError(string) {
|
|
641
661
|
throw new CliktError(string);
|
|
@@ -647,8 +667,8 @@ function toEmitters(_this__u8e3s4, packageName, emitShared) {
|
|
|
647
667
|
var _iterator__ex2g4s = _this__u8e3s4.t();
|
|
648
668
|
while (_iterator__ex2g4s.u()) {
|
|
649
669
|
var item = _iterator__ex2g4s.v();
|
|
650
|
-
var tmp$ret$
|
|
651
|
-
destination.x(tmp$ret$
|
|
670
|
+
var tmp$ret$2 = toEmitter(item, packageName, emitShared);
|
|
671
|
+
destination.x(tmp$ret$2);
|
|
652
672
|
}
|
|
653
673
|
var tmp0_elvis_lhs = toNonEmptySetOrNull(destination);
|
|
654
674
|
var tmp;
|
|
@@ -688,6 +708,10 @@ function Options_Strict_getInstance() {
|
|
|
688
708
|
Options_initEntries();
|
|
689
709
|
return Options_Strict_instance;
|
|
690
710
|
}
|
|
711
|
+
function Options_IgnoreDefaults_getInstance() {
|
|
712
|
+
Options_initEntries();
|
|
713
|
+
return Options_IgnoreDefaults_instance;
|
|
714
|
+
}
|
|
691
715
|
function main_0(args) {
|
|
692
716
|
// Inline function 'kotlin.collections.mapNotNull' call
|
|
693
717
|
var tmp0 = until(0, 20);
|
|
@@ -713,7 +737,7 @@ function main_0(args) {
|
|
|
713
737
|
// Inline function 'kotlin.let' call
|
|
714
738
|
var tmp = Companion_instance_4;
|
|
715
739
|
var tmp_0 = compile$ref();
|
|
716
|
-
main(tmp.
|
|
740
|
+
main(tmp.s4x(tmp_0, convert$ref()), destination);
|
|
717
741
|
}
|
|
718
742
|
function compile$ref() {
|
|
719
743
|
var l = function (p0) {
|
|
@@ -739,18 +763,19 @@ function parser(source) {
|
|
|
739
763
|
var this_0 = parse(new parser$1(), nonEmptyListOf(new ModuleContent(new FileUri(''), source), []));
|
|
740
764
|
var tmp;
|
|
741
765
|
if (this_0 instanceof Left) {
|
|
742
|
-
var it = this_0.
|
|
766
|
+
var it = this_0.lm_1.wm_1;
|
|
767
|
+
// Inline function 'kotlin.error' call
|
|
743
768
|
var message = 'Cannot parse source: ' + joinToString(new NonEmptyList(it), VOID, VOID, VOID, VOID, VOID, parser$lambda);
|
|
744
769
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
745
770
|
} else {
|
|
746
771
|
if (this_0 instanceof Right) {
|
|
747
|
-
tmp = this_0.
|
|
772
|
+
tmp = this_0.nm_1;
|
|
748
773
|
} else {
|
|
749
774
|
noWhenBranchMatchedException();
|
|
750
775
|
}
|
|
751
776
|
}
|
|
752
777
|
// Inline function 'arrow.core.NonEmptyList.flatMap' call
|
|
753
|
-
var this_1 = tmp.
|
|
778
|
+
var this_1 = tmp.xo_1;
|
|
754
779
|
// Inline function 'kotlin.collections.flatMap' call
|
|
755
780
|
var tmp0 = _NonEmptyList___get_all__impl__pmf509(this_1);
|
|
756
781
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
@@ -758,19 +783,19 @@ function parser(source) {
|
|
|
758
783
|
var _iterator__ex2g4s = tmp0.t();
|
|
759
784
|
while (_iterator__ex2g4s.u()) {
|
|
760
785
|
var element = _iterator__ex2g4s.v();
|
|
761
|
-
var list = new NonEmptyList(element.
|
|
786
|
+
var list = new NonEmptyList(element.zo_1);
|
|
762
787
|
addAll(destination, list);
|
|
763
788
|
}
|
|
764
|
-
var tmp$ret$
|
|
789
|
+
var tmp$ret$3 = _NonEmptyList___init__impl__fxd0xp(destination);
|
|
765
790
|
// Inline function 'kotlin.collections.map' call
|
|
766
|
-
var this_2 = NonEmptyList__toList_impl_t5xcy2(tmp$ret$
|
|
791
|
+
var this_2 = NonEmptyList__toList_impl_t5xcy2(tmp$ret$3);
|
|
767
792
|
// Inline function 'kotlin.collections.mapTo' call
|
|
768
793
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_2, 10));
|
|
769
794
|
var _iterator__ex2g4s_0 = this_2.t();
|
|
770
795
|
while (_iterator__ex2g4s_0.u()) {
|
|
771
796
|
var item = _iterator__ex2g4s_0.v();
|
|
772
|
-
var tmp$ret$
|
|
773
|
-
destination_0.x(tmp$ret$
|
|
797
|
+
var tmp$ret$9 = produce(item);
|
|
798
|
+
destination_0.x(tmp$ret$9);
|
|
774
799
|
}
|
|
775
800
|
// Inline function 'kotlin.collections.toTypedArray' call
|
|
776
801
|
return copyToArray(destination_0);
|
|
@@ -788,7 +813,7 @@ var nodeArgs;
|
|
|
788
813
|
function orNull(_this__u8e3s4, idx) {
|
|
789
814
|
_init_properties_CommandLineArguments_kt__b5v7hl();
|
|
790
815
|
// Inline function 'arrow.core.Companion.catch' call
|
|
791
|
-
var tmp$ret$
|
|
816
|
+
var tmp$ret$1;
|
|
792
817
|
$l$block: {
|
|
793
818
|
// Inline function 'arrow.core.raise.catch' call
|
|
794
819
|
// Inline function 'arrow.core.raise.catch' call
|
|
@@ -800,16 +825,16 @@ function orNull(_this__u8e3s4, idx) {
|
|
|
800
825
|
if ($p instanceof Error) {
|
|
801
826
|
var t = $p;
|
|
802
827
|
var p0 = nonFatalOrThrow(t);
|
|
803
|
-
tmp$ret$
|
|
828
|
+
tmp$ret$1 = new Left(p0);
|
|
804
829
|
break $l$block;
|
|
805
830
|
} else {
|
|
806
831
|
throw $p;
|
|
807
832
|
}
|
|
808
833
|
}
|
|
809
834
|
var value = tmp;
|
|
810
|
-
tmp$ret$
|
|
835
|
+
tmp$ret$1 = new Right(value);
|
|
811
836
|
}
|
|
812
|
-
return tmp$ret$
|
|
837
|
+
return tmp$ret$1.mm();
|
|
813
838
|
}
|
|
814
839
|
var properties_initialized_CommandLineArguments_kt_ekn5uh;
|
|
815
840
|
function _init_properties_CommandLineArguments_kt__b5v7hl() {
|
|
@@ -820,8 +845,8 @@ function _init_properties_CommandLineArguments_kt__b5v7hl() {
|
|
|
820
845
|
}
|
|
821
846
|
}
|
|
822
847
|
//region block: post-declaration
|
|
823
|
-
protoOf(parser$1).
|
|
824
|
-
protoOf(parser$1).
|
|
848
|
+
protoOf(parser$1).eo = get_spec;
|
|
849
|
+
protoOf(parser$1).fo = get_logger;
|
|
825
850
|
//endregion
|
|
826
851
|
//region block: init
|
|
827
852
|
Companion_instance_4 = new Companion();
|