@flock/wirespec 0.15.3 → 0.15.4
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 +12 -12
- package/arrow-arrow-atomic.mjs.map +1 -1
- package/arrow-arrow-core.mjs +107 -107
- package/arrow-arrow-core.mjs.map +1 -1
- package/clikt-clikt.mjs +3314 -3654
- package/clikt-clikt.mjs.map +1 -1
- package/colormath-root-colormath.mjs +578 -489
- package/colormath-root-colormath.mjs.map +1 -1
- package/kotlin-kotlin-stdlib.mjs +2925 -2897
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +5055 -5051
- package/kotlin-openapi-bindings.mjs.map +1 -1
- package/kotlin-rgxgen.mjs +1934 -1929
- package/kotlin-rgxgen.mjs.map +1 -1
- package/kotlinx-io-kotlinx-io-core.mjs +578 -628
- package/kotlinx-io-kotlinx-io-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +1897 -1875
- package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1575 -1574
- package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/markdown.mjs +6756 -0
- package/markdown.mjs.map +1 -0
- package/mordant-mordant.mjs +3762 -2059
- package/mordant-mordant.mjs.map +1 -1
- package/package.json +4 -2
- package/wirespec-src-compiler-core.mjs +2464 -2346
- package/wirespec-src-compiler-core.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +488 -482
- package/wirespec-src-compiler-lib.mjs.map +1 -1
- package/wirespec-src-converter-avro.mjs +556 -555
- package/wirespec-src-converter-avro.mjs.map +1 -1
- package/wirespec-src-converter-openapi.mjs +1382 -1314
- package/wirespec-src-converter-openapi.mjs.map +1 -1
- package/wirespec-src-plugin-arguments.mjs +235 -233
- package/wirespec-src-plugin-arguments.mjs.map +1 -1
- package/wirespec-src-plugin-cli.mjs +150 -150
- package/wirespec-src-plugin-cli.mjs.map +1 -1
- package/wirespec-src-plugin-npm.mjs +115 -119
- package/wirespec-src-plugin-npm.mjs.map +1 -1
- package/wirespec-src-tools-generator.mjs +57 -52
- package/wirespec-src-tools-generator.mjs.map +1 -1
- package/clikt-clikt-mordant.mjs +0 -314
- package/clikt-clikt-mordant.mjs.map +0 -1
- package/mordant-mordant-omnibus.mjs +0 -4
- package/mordant-mordant-omnibus.mjs.map +0 -1
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CliktError136b5l5psfi1n as CliktError,
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
subcommands3iz66ruo6cdc as subcommands,
|
|
4
|
+
NoOpCliktCommand2adtfdm68nv09 as NoOpCliktCommand,
|
|
5
|
+
argument2zdhc640dnlyc as argument,
|
|
5
6
|
optional2v0ee42t2688o as optional,
|
|
6
7
|
option2wnxma00ykjjp as option,
|
|
7
8
|
choice1qx2pgx161pnc as choice,
|
|
8
9
|
multiple1ilt3bwdbyd8l as multiple,
|
|
9
10
|
choiceie3147xkuo29 as choice_0,
|
|
11
|
+
CliktCommand1a5aj7xujka26 as CliktCommand,
|
|
10
12
|
default2v6m45aspyoyr as default_0,
|
|
11
13
|
flag3dod1qr8no54f as flag,
|
|
12
|
-
main23hc8f9rb75p1 as main,
|
|
13
14
|
} from './clikt-clikt.mjs';
|
|
14
15
|
import {
|
|
15
16
|
captureStack1fzi4aczwc4hg as captureStack,
|
|
@@ -17,7 +18,7 @@ import {
|
|
|
17
18
|
initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
|
|
18
19
|
VOID7hggqo3abtya as VOID,
|
|
19
20
|
initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
|
|
20
|
-
|
|
21
|
+
Unit_instanceat14thlj150z as Unit_instance,
|
|
21
22
|
listOfvhqybd2zx248 as listOf,
|
|
22
23
|
noWhenBranchMatchedException2a6r7ubxgky5j as noWhenBranchMatchedException,
|
|
23
24
|
mapCapacity1h45rc3eh9p2l as mapCapacity,
|
|
@@ -41,16 +42,16 @@ import {
|
|
|
41
42
|
isArray1hxjqtqy632bc as isArray,
|
|
42
43
|
} from './kotlin-kotlin-stdlib.mjs';
|
|
43
44
|
import {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
FileExtension_Wirespec_getInstance260g74sz3zqjq as FileExtension_Wirespec_getInstance,
|
|
46
|
+
FileExtension_JSON_getInstance24fo4nmpc6x68 as FileExtension_JSON_getInstance,
|
|
47
|
+
Companion_instance23sx7f8mbt1q7 as Companion_instance,
|
|
48
|
+
Companion_instance3sb1qxxpgc8bo as Companion_instance_0,
|
|
48
49
|
EmitShared28lad9gpofiy4 as EmitShared,
|
|
49
50
|
Logger1cwdyrq5itr5l as Logger,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
Level_ERROR_getInstance19uouzczl49bf as Level_ERROR_getInstance,
|
|
52
|
+
Level_DEBUG_getInstance120gr1dodanmw as Level_DEBUG_getInstance,
|
|
53
|
+
Level_INFO_getInstancevr8f23fhidva as Level_INFO_getInstance,
|
|
54
|
+
Level_WARN_getInstance10k8p0ght4zmu as Level_WARN_getInstance,
|
|
54
55
|
JavaEmitter1iajkiqm8e1w2 as JavaEmitter,
|
|
55
56
|
KotlinEmitter3u2bd89c6zjpn as KotlinEmitter,
|
|
56
57
|
PythonEmitter2ympv43525ly9 as PythonEmitter,
|
|
@@ -64,12 +65,8 @@ import {
|
|
|
64
65
|
NoLoggero51bdi3we1s0 as NoLogger,
|
|
65
66
|
} from './wirespec-src-compiler-core.mjs';
|
|
66
67
|
import {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
} from './clikt-clikt-mordant.mjs';
|
|
70
|
-
import {
|
|
71
|
-
Companion_instance16jo4jh8p2erh as Companion_instance_1,
|
|
72
|
-
Language_Kotlin_getInstance19m6s1fti7fuz as Language_Kotlin_getInstance,
|
|
68
|
+
Companion_instancewgxql7b970h7 as Companion_instance_1,
|
|
69
|
+
Language_Kotlin_getInstancesf3hf9q9fn0g as Language_Kotlin_getInstance,
|
|
73
70
|
getFullPath4g3ciksg8rpm as getFullPath,
|
|
74
71
|
read1bpb5m43oodfb as read,
|
|
75
72
|
Source2leyaqfqfs5k3 as Source,
|
|
@@ -84,7 +81,7 @@ import {
|
|
|
84
81
|
CompilerArguments27p1etc1665zg as CompilerArguments,
|
|
85
82
|
values39f22etrsivck as values,
|
|
86
83
|
ConverterArgumentsa8xc45eyvf51 as ConverterArguments,
|
|
87
|
-
|
|
84
|
+
Companion_instance19lljpggtes6o as Companion_instance_2,
|
|
88
85
|
_DirectoryPath___get_value__impl__hdy2e33exlp2vb3n338 as _DirectoryPath___get_value__impl__hdy2e3,
|
|
89
86
|
write1u316o1mmac8j as write,
|
|
90
87
|
compile3ocumkpx3p9ko as compile,
|
|
@@ -97,14 +94,14 @@ import {
|
|
|
97
94
|
NonEmptySet1rtvr2guloo52 as NonEmptySet,
|
|
98
95
|
toNonEmptySetOrNull1tjnd9jrkd4bs as toNonEmptySetOrNull,
|
|
99
96
|
nonEmptyListOf17xawqyzwrlrt as nonEmptyListOf,
|
|
100
|
-
|
|
97
|
+
Companion_instance1agi799z0n1y4 as Companion_instance_3,
|
|
101
98
|
right2w60qw9uivnyr as right,
|
|
102
99
|
nonFatalOrThrow35agffkx4bbtz as nonFatalOrThrow,
|
|
103
100
|
left3pixsqou14wpr as left,
|
|
104
101
|
} from './arrow-arrow-core.mjs';
|
|
105
102
|
import {
|
|
106
|
-
|
|
107
|
-
|
|
103
|
+
OpenAPIV2Emitter_getInstance2h4ew4hncs9qx as OpenAPIV2Emitter_getInstance,
|
|
104
|
+
OpenAPIV3Emitter_getInstance26cg8x9h7k2p7 as OpenAPIV3Emitter_getInstance,
|
|
108
105
|
} from './wirespec-src-converter-openapi.mjs';
|
|
109
106
|
import { produce1z6drlwotu836 as produce } from './wirespec-src-compiler-lib.mjs';
|
|
110
107
|
//region block: imports
|
|
@@ -123,7 +120,7 @@ initMetadataForClass(CommonOptions, 'CommonOptions', VOID, CliktCommand);
|
|
|
123
120
|
initMetadataForClass(Compile, 'Compile', VOID, CommonOptions);
|
|
124
121
|
initMetadataForClass(Convert, 'Convert', VOID, CommonOptions);
|
|
125
122
|
initMetadataForClass(Options, 'Options', VOID, Enum);
|
|
126
|
-
initMetadataForClass(parser$1, VOID, VOID, VOID, [HasLanguageSpec, NoLogger]);
|
|
123
|
+
initMetadataForClass(parser$this$this$this$this$1, VOID, VOID, VOID, [HasLanguageSpec, NoLogger]);
|
|
127
124
|
//endregion
|
|
128
125
|
function NoInputReceived() {
|
|
129
126
|
CliktError.call(this, 'No input file, directory, or stdin received.');
|
|
@@ -150,12 +147,12 @@ function ChooseALogLevel() {
|
|
|
150
147
|
captureStack(this, ChooseALogLevel);
|
|
151
148
|
}
|
|
152
149
|
function SpecificFile(extension) {
|
|
153
|
-
CliktError.call(this, 'No ' + extension.
|
|
150
|
+
CliktError.call(this, 'No ' + extension.q2_1 + ' file found');
|
|
154
151
|
captureStack(this, SpecificFile);
|
|
155
152
|
}
|
|
156
153
|
function Companion() {
|
|
157
154
|
}
|
|
158
|
-
protoOf(Companion).
|
|
155
|
+
protoOf(Companion).p4a = function (compile, convert) {
|
|
159
156
|
return subcommands(new WirespecCli(), [new Compile(compile), new Convert(convert)]);
|
|
160
157
|
};
|
|
161
158
|
var Companion_instance_4;
|
|
@@ -163,13 +160,13 @@ function Companion_getInstance() {
|
|
|
163
160
|
return Companion_instance_4;
|
|
164
161
|
}
|
|
165
162
|
function WirespecCli() {
|
|
166
|
-
NoOpCliktCommand.call(this, 'wirespec');
|
|
163
|
+
NoOpCliktCommand.call(this, VOID, VOID, 'wirespec');
|
|
167
164
|
}
|
|
168
165
|
function _get_stdin__b8xnlj($this) {
|
|
169
|
-
return $this.
|
|
166
|
+
return $this.o4b_1.x47($this, stdin$factory_0());
|
|
170
167
|
}
|
|
171
168
|
function _get_languages__ojonze($this) {
|
|
172
|
-
return $this.
|
|
169
|
+
return $this.p4b_1.x47($this, languages$factory_0());
|
|
173
170
|
}
|
|
174
171
|
function run$handleError(p0) {
|
|
175
172
|
handleError(p0);
|
|
@@ -196,25 +193,25 @@ function Compile$run$handleError$ref() {
|
|
|
196
193
|
}
|
|
197
194
|
function Compile(compiler) {
|
|
198
195
|
CommonOptions.call(this);
|
|
199
|
-
this.
|
|
200
|
-
this.
|
|
201
|
-
this.
|
|
196
|
+
this.n4b_1 = compiler;
|
|
197
|
+
this.o4b_1 = optional(argument(this, VOID, 'stdin')).d47(this, stdin$factory());
|
|
198
|
+
this.p4b_1 = multiple(choice(option(this, Options_Language_getInstance().s4b_1.slice(), 'Language'), Companion_instance_1.q2i(), VOID, true), listOf(Language_Kotlin_getInstance())).h48(this, languages$factory());
|
|
202
199
|
}
|
|
203
|
-
protoOf(Compile).
|
|
200
|
+
protoOf(Compile).l3y = function () {
|
|
204
201
|
// Inline function 'arrow.core.getOrElse' call
|
|
205
202
|
// Inline function 'kotlin.contracts.contract' call
|
|
206
203
|
// Inline function 'arrow.core.Either.fold' call
|
|
207
|
-
var this_0 = getFullPath(this.
|
|
204
|
+
var this_0 = getFullPath(this.q4c());
|
|
208
205
|
// Inline function 'kotlin.contracts.contract' call
|
|
209
206
|
var tmp;
|
|
210
207
|
if (this_0 instanceof Right) {
|
|
211
|
-
// Inline function 'arrow.core.getOrElse.stub_for_inlining' call
|
|
212
208
|
// Inline function 'arrow.core.identity' call
|
|
213
|
-
|
|
209
|
+
// Inline function 'arrow.core.identity' call
|
|
210
|
+
tmp = this_0.dk_1;
|
|
214
211
|
} else {
|
|
215
212
|
if (this_0 instanceof Left) {
|
|
216
|
-
var it = this_0.
|
|
217
|
-
throw new CliktError(it.
|
|
213
|
+
var it = this_0.xj_1;
|
|
214
|
+
throw new CliktError(it.t2j_1);
|
|
218
215
|
} else {
|
|
219
216
|
noWhenBranchMatchedException();
|
|
220
217
|
}
|
|
@@ -228,6 +225,7 @@ protoOf(Compile).b2t = function () {
|
|
|
228
225
|
tmp_1 = null;
|
|
229
226
|
} else {
|
|
230
227
|
// Inline function 'kotlin.let' call
|
|
228
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
231
229
|
// Inline function 'community.flock.wirespec.plugin.cli.Compile.run.<anonymous>' call
|
|
232
230
|
tmp_1 = nonEmptySetOf(new Source(_Name___init__impl__o4q07e('stdin'), tmp1_safe_receiver), []);
|
|
233
231
|
}
|
|
@@ -245,13 +243,13 @@ protoOf(Compile).b2t = function () {
|
|
|
245
243
|
throw new NoClasspathPossible();
|
|
246
244
|
} else {
|
|
247
245
|
if (inputPath instanceof DirectoryPath) {
|
|
248
|
-
var tmp_4 = wirespecSources(new Directory(inputPath.
|
|
249
|
-
tmp_0 = or(tmp_4, handleError$ref()).
|
|
246
|
+
var tmp_4 = wirespecSources(new Directory(inputPath.n2j_1));
|
|
247
|
+
tmp_0 = or(tmp_4, handleError$ref()).qk_1;
|
|
250
248
|
} else {
|
|
251
249
|
if (inputPath instanceof FilePath) {
|
|
252
250
|
var tmp_5;
|
|
253
|
-
if (inputPath.
|
|
254
|
-
tmp_5 = nonEmptySetOf(new Source(inputPath.
|
|
251
|
+
if (inputPath.s2j_1.r2_1 === 4) {
|
|
252
|
+
tmp_5 = nonEmptySetOf(new Source(inputPath.r2j_1, read(inputPath)), []);
|
|
255
253
|
} else {
|
|
256
254
|
throw new WirespecFileError();
|
|
257
255
|
}
|
|
@@ -263,30 +261,32 @@ protoOf(Compile).b2t = function () {
|
|
|
263
261
|
}
|
|
264
262
|
}
|
|
265
263
|
var sources = tmp_0;
|
|
266
|
-
var emitters = toEmitters(_get_languages__ojonze(this), Companion_instance_0.
|
|
264
|
+
var emitters = toEmitters(_get_languages__ojonze(this), Companion_instance_0.w25(this.r4c()), new EmitShared(this.z25()));
|
|
267
265
|
var tmp_6;
|
|
268
266
|
if (inputPath == null) {
|
|
269
267
|
tmp_6 = null;
|
|
270
268
|
} else {
|
|
271
269
|
// Inline function 'kotlin.let' call
|
|
270
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
272
271
|
// Inline function 'community.flock.wirespec.plugin.cli.Compile.run.<anonymous>' call
|
|
273
|
-
var tmp_7 = getOutPutPath(inputPath, this.
|
|
274
|
-
tmp_6 = new Directory(or(tmp_7, handleError$ref_0()).
|
|
272
|
+
var tmp_7 = getOutPutPath(inputPath, this.s4c());
|
|
273
|
+
tmp_6 = new Directory(or(tmp_7, handleError$ref_0()).n2j_1);
|
|
275
274
|
}
|
|
276
275
|
var outputDir = tmp_6;
|
|
277
|
-
var tmp_8 = this.b3s(outputDir);
|
|
278
|
-
var tmp6 = new CompilerArguments(sources, emitters, tmp_8, Compile$run$handleError$ref(), Companion_instance_0.n27(this.z3r()), new Logger(this.d3s(this.c3s())), this.q27(), this.e3s());
|
|
279
276
|
// Inline function 'kotlin.let' call
|
|
280
|
-
this.
|
|
277
|
+
var tmp_8 = this.t4c(outputDir);
|
|
278
|
+
var this_1 = new CompilerArguments(sources, emitters, tmp_8, Compile$run$handleError$ref(), Companion_instance_0.w25(this.r4c()), new Logger(this.v4c(this.u4c())), this.z25(), this.w4c());
|
|
279
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
280
|
+
this.n4b_1(this_1);
|
|
281
281
|
};
|
|
282
282
|
function _get_format__qlarck($this) {
|
|
283
|
-
return $this.
|
|
283
|
+
return $this.v4d_1.x47($this, format$factory_0());
|
|
284
284
|
}
|
|
285
285
|
function _get_stdin__b8xnlj_0($this) {
|
|
286
|
-
return $this.
|
|
286
|
+
return $this.w4d_1.x47($this, stdin$factory_2());
|
|
287
287
|
}
|
|
288
288
|
function _get_languages__ojonze_0($this) {
|
|
289
|
-
return $this.
|
|
289
|
+
return $this.x4d_1.x47($this, languages$factory_2());
|
|
290
290
|
}
|
|
291
291
|
function run$handleError_0(p0) {
|
|
292
292
|
handleError(p0);
|
|
@@ -313,12 +313,12 @@ function Convert$run$handleError$ref() {
|
|
|
313
313
|
}
|
|
314
314
|
function Convert(converter) {
|
|
315
315
|
CommonOptions.call(this);
|
|
316
|
-
this.
|
|
316
|
+
this.u4d_1 = converter;
|
|
317
317
|
var tmp = this;
|
|
318
318
|
// Inline function 'com.github.ajalt.clikt.parameters.types.enum' call
|
|
319
319
|
var this_0 = argument(this, VOID, 'Input format');
|
|
320
|
-
// Inline function 'kotlin.enumValues' call
|
|
321
320
|
// Inline function 'kotlin.collections.associateBy' call
|
|
321
|
+
// Inline function 'kotlin.enumValues' call
|
|
322
322
|
var this_1 = values();
|
|
323
323
|
var capacity = coerceAtLeast(mapCapacity(this_1.length), 16);
|
|
324
324
|
// Inline function 'kotlin.collections.associateByTo' call
|
|
@@ -330,15 +330,15 @@ function Convert(converter) {
|
|
|
330
330
|
inductionVariable = inductionVariable + 1 | 0;
|
|
331
331
|
// Inline function 'com.github.ajalt.clikt.parameters.types.enum.<anonymous>' call
|
|
332
332
|
// Inline function 'com.github.ajalt.clikt.parameters.types.enum.<anonymous>' call
|
|
333
|
-
var tmp$ret$2 = element.
|
|
334
|
-
destination.
|
|
333
|
+
var tmp$ret$2 = element.q2_1;
|
|
334
|
+
destination.n2(tmp$ret$2, element);
|
|
335
335
|
}
|
|
336
|
-
tmp.
|
|
337
|
-
this.
|
|
338
|
-
this.
|
|
336
|
+
tmp.v4d_1 = choice_0(this_0, destination, true).d47(this, format$factory());
|
|
337
|
+
this.w4d_1 = optional(argument(this, VOID, 'stdin')).d47(this, stdin$factory_1());
|
|
338
|
+
this.x4d_1 = multiple(choice(option(this, Options_Language_getInstance().s4b_1.slice(), 'Language'), Companion_instance_1.q2i(), VOID, true)).h48(this, languages$factory_1());
|
|
339
339
|
}
|
|
340
|
-
protoOf(Convert).
|
|
341
|
-
var tmp = getFullPath(this.
|
|
340
|
+
protoOf(Convert).l3y = function () {
|
|
341
|
+
var tmp = getFullPath(this.q4c());
|
|
342
342
|
var inputPath = or(tmp, handleError$ref_1());
|
|
343
343
|
var tmp_0;
|
|
344
344
|
if (inputPath == null) {
|
|
@@ -348,6 +348,7 @@ protoOf(Convert).b2t = function () {
|
|
|
348
348
|
tmp_1 = null;
|
|
349
349
|
} else {
|
|
350
350
|
// Inline function 'kotlin.let' call
|
|
351
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
351
352
|
// Inline function 'community.flock.wirespec.plugin.cli.Convert.run.<anonymous>' call
|
|
352
353
|
tmp_1 = new Source(_Name___init__impl__o4q07e('stdin'), tmp1_safe_receiver);
|
|
353
354
|
}
|
|
@@ -368,8 +369,8 @@ protoOf(Convert).b2t = function () {
|
|
|
368
369
|
} else {
|
|
369
370
|
if (inputPath instanceof FilePath) {
|
|
370
371
|
var tmp_3;
|
|
371
|
-
if (inputPath.
|
|
372
|
-
tmp_3 = new Source(inputPath.
|
|
372
|
+
if (inputPath.s2j_1.r2_1 === 5) {
|
|
373
|
+
tmp_3 = new Source(inputPath.r2j_1, read(inputPath));
|
|
373
374
|
} else {
|
|
374
375
|
throw new JSONFileError();
|
|
375
376
|
}
|
|
@@ -381,29 +382,31 @@ protoOf(Convert).b2t = function () {
|
|
|
381
382
|
}
|
|
382
383
|
}
|
|
383
384
|
var source = tmp_0;
|
|
384
|
-
var emitters = toEmitters(_get_languages__ojonze_0(this), Companion_instance_0.
|
|
385
|
+
var emitters = toEmitters(_get_languages__ojonze_0(this), Companion_instance_0.w25(this.r4c()), new EmitShared(this.z25()));
|
|
385
386
|
var tmp_4;
|
|
386
387
|
if (inputPath == null) {
|
|
387
388
|
tmp_4 = null;
|
|
388
389
|
} else {
|
|
389
390
|
// Inline function 'kotlin.let' call
|
|
391
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
390
392
|
// Inline function 'community.flock.wirespec.plugin.cli.Convert.run.<anonymous>' call
|
|
391
|
-
var tmp_5 = getOutPutPath(inputPath, this.
|
|
392
|
-
tmp_4 = new Directory(or(tmp_5, handleError$ref_2()).
|
|
393
|
+
var tmp_5 = getOutPutPath(inputPath, this.s4c());
|
|
394
|
+
tmp_4 = new Directory(or(tmp_5, handleError$ref_2()).n2j_1);
|
|
393
395
|
}
|
|
394
396
|
var directory = tmp_4;
|
|
397
|
+
// Inline function 'kotlin.let' call
|
|
395
398
|
var tmp_6 = _get_format__qlarck(this);
|
|
396
399
|
var tmp_7 = nonEmptySetOf(source, []);
|
|
397
|
-
var tmp_8 = this.
|
|
398
|
-
var
|
|
399
|
-
// Inline function 'kotlin.
|
|
400
|
-
this.
|
|
400
|
+
var tmp_8 = this.t4c(directory);
|
|
401
|
+
var this_0 = new ConverterArguments(tmp_6, tmp_7, emitters, tmp_8, Convert$run$handleError$ref(), Companion_instance_0.w25(this.r4c()), new Logger(this.v4c(this.u4c())), this.z25(), this.w4c());
|
|
402
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
403
|
+
this.u4d_1(this_0);
|
|
401
404
|
};
|
|
402
405
|
function CommonOptions$writer$lambda($directory, this$0) {
|
|
403
406
|
return function (emittedList) {
|
|
404
|
-
var
|
|
405
|
-
while (
|
|
406
|
-
var element =
|
|
407
|
+
var tmp0_iterator = emittedList.g();
|
|
408
|
+
while (tmp0_iterator.h()) {
|
|
409
|
+
var element = tmp0_iterator.i();
|
|
407
410
|
// Inline function 'community.flock.wirespec.plugin.cli.CommonOptions.writer.<anonymous>.<anonymous>' call
|
|
408
411
|
var tmp0_safe_receiver = $directory;
|
|
409
412
|
var tmp;
|
|
@@ -411,12 +414,12 @@ function CommonOptions$writer$lambda($directory, this$0) {
|
|
|
411
414
|
tmp = null;
|
|
412
415
|
} else {
|
|
413
416
|
// Inline function 'kotlin.let' call
|
|
414
|
-
// Inline function '
|
|
415
|
-
write(Companion_instance_2.
|
|
417
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
418
|
+
write(Companion_instance_2.p2j(_DirectoryPath___get_value__impl__hdy2e3(tmp0_safe_receiver.o2j_1) + '/' + element.h26_1), element.i26_1);
|
|
416
419
|
tmp = Unit_instance;
|
|
417
420
|
}
|
|
418
421
|
if (tmp == null) {
|
|
419
|
-
this$0.
|
|
422
|
+
this$0.f3y(element.i26_1);
|
|
420
423
|
}
|
|
421
424
|
}
|
|
422
425
|
return Unit_instance;
|
|
@@ -424,34 +427,34 @@ function CommonOptions$writer$lambda($directory, this$0) {
|
|
|
424
427
|
}
|
|
425
428
|
function CommonOptions() {
|
|
426
429
|
CliktCommand.call(this);
|
|
427
|
-
this.
|
|
428
|
-
this.
|
|
429
|
-
this.
|
|
430
|
-
this.
|
|
431
|
-
this.
|
|
432
|
-
this.
|
|
433
|
-
}
|
|
434
|
-
protoOf(CommonOptions).
|
|
435
|
-
return this.
|
|
430
|
+
this.k4c_1 = option(this, Options_Input_getInstance().s4b_1.slice(), 'Input').h48(this, input$factory());
|
|
431
|
+
this.l4c_1 = option(this, Options_Output_getInstance().s4b_1.slice(), 'Output').h48(this, output$factory());
|
|
432
|
+
this.m4c_1 = default_0(option(this, Options_PackageName_getInstance().s4b_1.slice(), 'Package name'), 'community.flock.wirespec.generated').h48(this, packageName$factory());
|
|
433
|
+
this.n4c_1 = default_0(option(this, Options_LogLevel_getInstance().s4b_1.slice(), 'Log level: ' + Companion_instance.toString()), Level_ERROR_getInstance().toString()).h48(this, logLevel$factory());
|
|
434
|
+
this.o4c_1 = flag(option(this, Options_Shared_getInstance().s4b_1.slice(), 'Generate shared wirespec code'), [], false).h48(this, shared$factory());
|
|
435
|
+
this.p4c_1 = flag(option(this, Options_Strict_getInstance().s4b_1.slice(), 'Strict mode'), []).h48(this, strict$factory());
|
|
436
|
+
}
|
|
437
|
+
protoOf(CommonOptions).q4c = function () {
|
|
438
|
+
return this.k4c_1.x47(this, input$factory_0());
|
|
436
439
|
};
|
|
437
|
-
protoOf(CommonOptions).
|
|
438
|
-
return this.
|
|
440
|
+
protoOf(CommonOptions).s4c = function () {
|
|
441
|
+
return this.l4c_1.x47(this, output$factory_0());
|
|
439
442
|
};
|
|
440
|
-
protoOf(CommonOptions).
|
|
441
|
-
return this.
|
|
443
|
+
protoOf(CommonOptions).r4c = function () {
|
|
444
|
+
return this.m4c_1.x47(this, packageName$factory_0());
|
|
442
445
|
};
|
|
443
|
-
protoOf(CommonOptions).
|
|
444
|
-
return this.
|
|
446
|
+
protoOf(CommonOptions).u4c = function () {
|
|
447
|
+
return this.n4c_1.x47(this, logLevel$factory_0());
|
|
445
448
|
};
|
|
446
|
-
protoOf(CommonOptions).
|
|
447
|
-
return this.
|
|
449
|
+
protoOf(CommonOptions).z25 = function () {
|
|
450
|
+
return this.o4c_1.x47(this, shared$factory_0());
|
|
448
451
|
};
|
|
449
|
-
protoOf(CommonOptions).
|
|
450
|
-
return this.
|
|
452
|
+
protoOf(CommonOptions).w4c = function () {
|
|
453
|
+
return this.p4c_1.x47(this, strict$factory_0());
|
|
451
454
|
};
|
|
452
|
-
protoOf(CommonOptions).
|
|
453
|
-
// Inline function 'kotlin.text.trim' call
|
|
455
|
+
protoOf(CommonOptions).v4c = function (_this__u8e3s4) {
|
|
454
456
|
// Inline function 'kotlin.text.uppercase' call
|
|
457
|
+
// Inline function 'kotlin.text.trim' call
|
|
455
458
|
// Inline function 'kotlin.js.asDynamic' call
|
|
456
459
|
var tmp;
|
|
457
460
|
switch (toString(trim(isCharSequence(_this__u8e3s4) ? _this__u8e3s4 : THROW_CCE())).toUpperCase()) {
|
|
@@ -472,7 +475,7 @@ protoOf(CommonOptions).d3s = function (_this__u8e3s4) {
|
|
|
472
475
|
}
|
|
473
476
|
return tmp;
|
|
474
477
|
};
|
|
475
|
-
protoOf(CommonOptions).
|
|
478
|
+
protoOf(CommonOptions).t4c = function (directory) {
|
|
476
479
|
return CommonOptions$writer$lambda(directory, this);
|
|
477
480
|
};
|
|
478
481
|
var Options_Input_instance;
|
|
@@ -497,7 +500,7 @@ function Options_initEntries() {
|
|
|
497
500
|
}
|
|
498
501
|
function Options(name, ordinal, flags) {
|
|
499
502
|
Enum.call(this, name, ordinal);
|
|
500
|
-
this.
|
|
503
|
+
this.s4b_1 = flags;
|
|
501
504
|
}
|
|
502
505
|
function handleError(string) {
|
|
503
506
|
throw new CliktError(string);
|
|
@@ -506,12 +509,12 @@ function toEmitters(_this__u8e3s4, packageName, emitShared) {
|
|
|
506
509
|
// Inline function 'kotlin.collections.map' call
|
|
507
510
|
// Inline function 'kotlin.collections.mapTo' call
|
|
508
511
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(_this__u8e3s4, 10));
|
|
509
|
-
var
|
|
510
|
-
while (
|
|
511
|
-
var item =
|
|
512
|
+
var tmp0_iterator = _this__u8e3s4.g();
|
|
513
|
+
while (tmp0_iterator.h()) {
|
|
514
|
+
var item = tmp0_iterator.i();
|
|
512
515
|
// Inline function 'community.flock.wirespec.plugin.cli.toEmitters.<anonymous>' call
|
|
513
516
|
var tmp;
|
|
514
|
-
switch (item.
|
|
517
|
+
switch (item.r2_1) {
|
|
515
518
|
case 0:
|
|
516
519
|
tmp = new JavaEmitter(packageName, emitShared);
|
|
517
520
|
break;
|
|
@@ -630,94 +633,93 @@ function languages$factory_2() {
|
|
|
630
633
|
}
|
|
631
634
|
function input$factory() {
|
|
632
635
|
return getPropertyCallableRef('input', 1, KProperty1, function (receiver) {
|
|
633
|
-
return receiver.
|
|
636
|
+
return receiver.q4c();
|
|
634
637
|
}, null);
|
|
635
638
|
}
|
|
636
639
|
function output$factory() {
|
|
637
640
|
return getPropertyCallableRef('output', 1, KProperty1, function (receiver) {
|
|
638
|
-
return receiver.
|
|
641
|
+
return receiver.s4c();
|
|
639
642
|
}, null);
|
|
640
643
|
}
|
|
641
644
|
function packageName$factory() {
|
|
642
645
|
return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) {
|
|
643
|
-
return receiver.
|
|
646
|
+
return receiver.r4c();
|
|
644
647
|
}, null);
|
|
645
648
|
}
|
|
646
649
|
function logLevel$factory() {
|
|
647
650
|
return getPropertyCallableRef('logLevel', 1, KProperty1, function (receiver) {
|
|
648
|
-
return receiver.
|
|
651
|
+
return receiver.u4c();
|
|
649
652
|
}, null);
|
|
650
653
|
}
|
|
651
654
|
function shared$factory() {
|
|
652
655
|
return getPropertyCallableRef('shared', 1, KProperty1, function (receiver) {
|
|
653
|
-
return receiver.
|
|
656
|
+
return receiver.z25();
|
|
654
657
|
}, null);
|
|
655
658
|
}
|
|
656
659
|
function strict$factory() {
|
|
657
660
|
return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) {
|
|
658
|
-
return receiver.
|
|
661
|
+
return receiver.w4c();
|
|
659
662
|
}, null);
|
|
660
663
|
}
|
|
661
664
|
function input$factory_0() {
|
|
662
665
|
return getPropertyCallableRef('input', 1, KProperty1, function (receiver) {
|
|
663
|
-
return receiver.
|
|
666
|
+
return receiver.q4c();
|
|
664
667
|
}, null);
|
|
665
668
|
}
|
|
666
669
|
function output$factory_0() {
|
|
667
670
|
return getPropertyCallableRef('output', 1, KProperty1, function (receiver) {
|
|
668
|
-
return receiver.
|
|
671
|
+
return receiver.s4c();
|
|
669
672
|
}, null);
|
|
670
673
|
}
|
|
671
674
|
function packageName$factory_0() {
|
|
672
675
|
return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) {
|
|
673
|
-
return receiver.
|
|
676
|
+
return receiver.r4c();
|
|
674
677
|
}, null);
|
|
675
678
|
}
|
|
676
679
|
function logLevel$factory_0() {
|
|
677
680
|
return getPropertyCallableRef('logLevel', 1, KProperty1, function (receiver) {
|
|
678
|
-
return receiver.
|
|
681
|
+
return receiver.u4c();
|
|
679
682
|
}, null);
|
|
680
683
|
}
|
|
681
684
|
function shared$factory_0() {
|
|
682
685
|
return getPropertyCallableRef('shared', 1, KProperty1, function (receiver) {
|
|
683
|
-
return receiver.
|
|
686
|
+
return receiver.z25();
|
|
684
687
|
}, null);
|
|
685
688
|
}
|
|
686
689
|
function strict$factory_0() {
|
|
687
690
|
return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) {
|
|
688
|
-
return receiver.
|
|
691
|
+
return receiver.w4c();
|
|
689
692
|
}, null);
|
|
690
693
|
}
|
|
691
|
-
function
|
|
694
|
+
function main(args) {
|
|
695
|
+
// Inline function 'kotlin.let' call
|
|
692
696
|
// Inline function 'kotlin.collections.mapNotNull' call
|
|
693
|
-
var tmp0 = until(0, 20);
|
|
694
697
|
// Inline function 'kotlin.collections.mapNotNullTo' call
|
|
698
|
+
var this_0 = until(0, 20);
|
|
695
699
|
var destination = ArrayList_init_$Create$_0();
|
|
696
700
|
// Inline function 'kotlin.collections.forEach' call
|
|
697
|
-
var inductionVariable =
|
|
698
|
-
var last =
|
|
701
|
+
var inductionVariable = this_0.d1_1;
|
|
702
|
+
var last = this_0.e1_1;
|
|
699
703
|
if (inductionVariable <= last)
|
|
700
704
|
do {
|
|
701
705
|
var element = inductionVariable;
|
|
702
706
|
inductionVariable = inductionVariable + 1 | 0;
|
|
703
707
|
// Inline function 'kotlin.collections.mapNotNullTo.<anonymous>' call
|
|
704
|
-
// Inline function 'community.flock.wirespec.plugin.cli.main.stub_for_inlining' call
|
|
705
708
|
var p0 = element;
|
|
706
709
|
var tmp0_safe_receiver = orNull(args, p0);
|
|
707
710
|
if (tmp0_safe_receiver == null)
|
|
708
711
|
null;
|
|
709
712
|
else {
|
|
710
713
|
// Inline function 'kotlin.let' call
|
|
711
|
-
// Inline function 'kotlin.
|
|
714
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
712
715
|
destination.e(tmp0_safe_receiver);
|
|
713
716
|
}
|
|
714
717
|
}
|
|
715
718
|
while (!(element === last));
|
|
716
|
-
// Inline function 'kotlin.
|
|
717
|
-
// Inline function 'community.flock.wirespec.plugin.cli.main.<anonymous>' call
|
|
719
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
718
720
|
var tmp = Companion_instance_4;
|
|
719
721
|
var tmp_0 = compile$ref();
|
|
720
|
-
|
|
722
|
+
tmp.p4a(tmp_0, convert$ref()).k3y(destination);
|
|
721
723
|
}
|
|
722
724
|
function compile$ref() {
|
|
723
725
|
var l = function (p0) {
|
|
@@ -736,61 +738,59 @@ function convert$ref() {
|
|
|
736
738
|
return l;
|
|
737
739
|
}
|
|
738
740
|
function cli(args) {
|
|
739
|
-
|
|
741
|
+
main(args);
|
|
740
742
|
}
|
|
741
743
|
function parser(source) {
|
|
744
|
+
// Inline function 'kotlin.collections.toTypedArray' call
|
|
745
|
+
// Inline function 'kotlin.collections.map' call
|
|
746
|
+
// Inline function 'arrow.core.NonEmptyList.flatMap' call
|
|
742
747
|
// Inline function 'arrow.core.getOrElse' call
|
|
743
748
|
// Inline function 'kotlin.contracts.contract' call
|
|
744
749
|
// Inline function 'arrow.core.Either.fold' call
|
|
745
|
-
var this_0 = parse(new parser$1(), nonEmptyListOf(new ModuleContent('', source), []));
|
|
750
|
+
var this_0 = parse(new parser$this$this$this$this$1(), nonEmptyListOf(new ModuleContent('', source), []));
|
|
746
751
|
// Inline function 'kotlin.contracts.contract' call
|
|
747
752
|
var tmp;
|
|
748
753
|
if (this_0 instanceof Right) {
|
|
749
|
-
// Inline function 'arrow.core.getOrElse.stub_for_inlining' call
|
|
750
754
|
// Inline function 'arrow.core.identity' call
|
|
751
|
-
|
|
755
|
+
// Inline function 'arrow.core.identity' call
|
|
756
|
+
tmp = this_0.dk_1;
|
|
752
757
|
} else {
|
|
753
758
|
if (this_0 instanceof Left) {
|
|
754
|
-
var it = this_0.
|
|
759
|
+
var it = this_0.xj_1;
|
|
755
760
|
var message = 'Cannot parse source: ' + joinToString(it, VOID, VOID, VOID, VOID, VOID, parser$lambda);
|
|
756
761
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
757
762
|
} else {
|
|
758
763
|
noWhenBranchMatchedException();
|
|
759
764
|
}
|
|
760
765
|
}
|
|
761
|
-
|
|
762
|
-
var
|
|
763
|
-
// Inline function 'community.flock.wirespec.plugin.cli.parser.stub_for_inlining' call
|
|
764
|
-
var tmp_0 = this_1.zl_1.j28_1.xl();
|
|
766
|
+
var this_1 = tmp.e29_1;
|
|
767
|
+
var tmp_0 = this_1.ik_1.s26_1.gk();
|
|
765
768
|
// Inline function 'kotlin.collections.flatMap' call
|
|
766
|
-
var tmp0 = this_1.am_1;
|
|
767
769
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
770
|
+
var this_2 = this_1.jk_1;
|
|
768
771
|
var destination = ArrayList_init_$Create$_0();
|
|
769
|
-
var
|
|
770
|
-
while (
|
|
771
|
-
var element =
|
|
772
|
-
|
|
773
|
-
var list = element.j28_1;
|
|
772
|
+
var tmp0_iterator = this_2.g();
|
|
773
|
+
while (tmp0_iterator.h()) {
|
|
774
|
+
var element = tmp0_iterator.i();
|
|
775
|
+
var list = element.s26_1;
|
|
774
776
|
addAll(destination, list);
|
|
775
777
|
}
|
|
776
|
-
|
|
777
|
-
var this_2 = tmp_0.em(destination).dm();
|
|
778
|
+
var this_3 = tmp_0.nk(destination).mk();
|
|
778
779
|
// Inline function 'kotlin.collections.mapTo' call
|
|
779
|
-
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(
|
|
780
|
-
var
|
|
781
|
-
while (
|
|
782
|
-
var item =
|
|
780
|
+
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_3, 10));
|
|
781
|
+
var tmp0_iterator_0 = this_3.g();
|
|
782
|
+
while (tmp0_iterator_0.h()) {
|
|
783
|
+
var item = tmp0_iterator_0.i();
|
|
783
784
|
// Inline function 'community.flock.wirespec.plugin.cli.parser.<anonymous>' call
|
|
784
785
|
var tmp$ret$9 = produce(item);
|
|
785
786
|
destination_0.e(tmp$ret$9);
|
|
786
787
|
}
|
|
787
|
-
// Inline function 'kotlin.collections.toTypedArray' call
|
|
788
788
|
return copyToArray(destination_0);
|
|
789
789
|
}
|
|
790
|
-
function parser$1() {
|
|
790
|
+
function parser$this$this$this$this$1() {
|
|
791
791
|
}
|
|
792
792
|
function parser$lambda(e) {
|
|
793
|
-
return e.
|
|
793
|
+
return e.r1();
|
|
794
794
|
}
|
|
795
795
|
function get_nodeArgs() {
|
|
796
796
|
_init_properties_CommandLineArguments_kt__b5v7hl();
|
|
@@ -819,7 +819,7 @@ function orNull(_this__u8e3s4, idx) {
|
|
|
819
819
|
}
|
|
820
820
|
tmp = tmp_0;
|
|
821
821
|
}
|
|
822
|
-
return tmp.
|
|
822
|
+
return tmp.ck();
|
|
823
823
|
}
|
|
824
824
|
var properties_initialized_CommandLineArguments_kt_ekn5uh;
|
|
825
825
|
function _init_properties_CommandLineArguments_kt__b5v7hl() {
|
|
@@ -830,8 +830,8 @@ function _init_properties_CommandLineArguments_kt__b5v7hl() {
|
|
|
830
830
|
}
|
|
831
831
|
}
|
|
832
832
|
//region block: post-declaration
|
|
833
|
-
protoOf(parser$1).
|
|
834
|
-
protoOf(parser$1).
|
|
833
|
+
protoOf(parser$this$this$this$this$1).z22 = get_spec;
|
|
834
|
+
protoOf(parser$this$this$this$this$1).o22 = get_logger;
|
|
835
835
|
//endregion
|
|
836
836
|
//region block: init
|
|
837
837
|
Companion_instance_4 = new Companion();
|
|
@@ -842,7 +842,7 @@ export {
|
|
|
842
842
|
parser as parser,
|
|
843
843
|
};
|
|
844
844
|
export {
|
|
845
|
-
|
|
845
|
+
main as main18ozy59zvnjcv,
|
|
846
846
|
};
|
|
847
847
|
//endregion
|
|
848
848
|
|