@flock/wirespec 0.12.4 → 0.13.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.map +1 -1
- package/arrow-arrow-core.mjs +4 -4
- package/arrow-arrow-core.mjs.map +1 -1
- package/clikt-clikt.mjs +1308 -1308
- package/clikt-clikt.mjs.map +1 -1
- package/colormath-root-colormath.mjs +430 -430
- package/colormath-root-colormath.mjs.map +1 -1
- package/kotlin-kotlin-stdlib.mjs +975 -942
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +4 -4
- package/kotlin-openapi-bindings.mjs.map +1 -1
- package/kotlin-rgxgen.mjs +1803 -1803
- package/kotlin-rgxgen.mjs.map +1 -1
- package/kotlinx-io-kotlinx-io-core.mjs +399 -399
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +30 -30
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +94 -94
- package/markdown.mjs +1895 -1895
- package/mordant-mordant.mjs +1690 -1690
- package/mordant-mordant.mjs.map +1 -1
- package/package.json +1 -1
- package/wirespec-src-compiler-core.mjs +2925 -1608
- package/wirespec-src-compiler-core.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +594 -475
- package/wirespec-src-compiler-lib.mjs.map +1 -1
- package/wirespec-src-converter-avro.mjs +358 -322
- package/wirespec-src-converter-avro.mjs.map +1 -1
- package/wirespec-src-converter-openapi.mjs +473 -405
- package/wirespec-src-converter-openapi.mjs.map +1 -1
- package/wirespec-src-plugin-arguments.mjs +1334 -377
- package/wirespec-src-plugin-arguments.mjs.map +1 -1
- package/wirespec-src-plugin-cli.mjs +339 -1030
- package/wirespec-src-plugin-cli.mjs.map +1 -1
- package/wirespec-src-plugin-npm.d.ts +50 -22
- package/wirespec-src-plugin-npm.mjs +195 -184
- package/wirespec-src-plugin-npm.mjs.map +1 -1
- package/wirespec-src-tools-generator.mjs +35 -30
- package/wirespec-src-tools-generator.mjs.map +1 -1
|
@@ -19,7 +19,8 @@ import {
|
|
|
19
19
|
initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
|
|
20
20
|
Unit_instance14hm69wy3kr8u as Unit_instance,
|
|
21
21
|
noWhenBranchMatchedException2a6r7ubxgky5j as noWhenBranchMatchedException,
|
|
22
|
-
|
|
22
|
+
collectionSizeOrDefault36dulx8yinfqm as collectionSizeOrDefault,
|
|
23
|
+
ArrayList_init_$Create$3m1kyiqequwm5 as ArrayList_init_$Create$,
|
|
23
24
|
mapCapacity1h45rc3eh9p2l as mapCapacity,
|
|
24
25
|
coerceAtLeast2bkz8m9ik7hep as coerceAtLeast,
|
|
25
26
|
LinkedHashMap_init_$Create$snys8oz8txtu as LinkedHashMap_init_$Create$,
|
|
@@ -28,136 +29,83 @@ import {
|
|
|
28
29
|
trim11nh7r46at6sx as trim,
|
|
29
30
|
toString1pkumu07cwy4m as toString,
|
|
30
31
|
Enum3alwj03lh1n41 as Enum,
|
|
31
|
-
asSequence2phdjljfh9jhx as asSequence,
|
|
32
|
-
filter184huxd00uyfg as filter,
|
|
33
|
-
mapsbvh18eqox7a as map,
|
|
34
|
-
toListx6x8nvfmvvht as toList,
|
|
35
|
-
_Char___init__impl__6a9atx367vrx0avsvbg as _Char___init__impl__6a9atx,
|
|
36
|
-
substringAfterLast3r0t0my8cpqhk as substringAfterLast,
|
|
37
|
-
objectCreate1ve4bgxiu4x98 as objectCreate,
|
|
38
|
-
hashCodeq5arwsb9dgti as hashCode,
|
|
39
|
-
equals2au1ep9vhcato as equals,
|
|
40
|
-
dropLastlqc2oyv04br0 as dropLast,
|
|
41
32
|
KProperty1ca4yb4wlo496 as KProperty1,
|
|
42
33
|
getPropertyCallableRef1ajb9in178r5r as getPropertyCallableRef,
|
|
43
|
-
ArrayList_init_$Create$2rimpp4x9tjd3 as ArrayList_init_$Create$,
|
|
44
|
-
addAll1k27qatfgp3k5 as addAll,
|
|
45
|
-
ensureNotNull1e947j3ixpazm as ensureNotNull,
|
|
46
|
-
joinToString1cxrrlmo0chqs as joinToString,
|
|
47
|
-
to2cs3ny02qtbcb as to,
|
|
48
|
-
collectionSizeOrDefault36dulx8yinfqm as collectionSizeOrDefault,
|
|
49
|
-
ArrayList_init_$Create$3m1kyiqequwm5 as ArrayList_init_$Create$_0,
|
|
50
|
-
first58ocm7j58k3q as first_0,
|
|
51
|
-
charSequenceLength3278n89t01tmv as charSequenceLength,
|
|
52
|
-
charSequenceGet1vxk1y5n17t1z as charSequenceGet,
|
|
53
|
-
toString14fd7g605f91p as toString_0,
|
|
54
34
|
numberRangeToNumber25vse2rgp6rs8 as numberRangeToNumber,
|
|
35
|
+
ArrayList_init_$Create$2rimpp4x9tjd3 as ArrayList_init_$Create$_0,
|
|
55
36
|
copyToArray2j022khrow2yi as copyToArray,
|
|
56
|
-
|
|
57
|
-
split3d3yeauc4rm2n as split,
|
|
58
|
-
emptyList1g2z5xcrvp2zy as emptyList,
|
|
59
|
-
isInterface3d6p8outrmvmk as isInterface,
|
|
37
|
+
joinToString1cxrrlmo0chqs as joinToString,
|
|
60
38
|
IllegalStateException_init_$Create$1nm9y6jd3c9iy as IllegalStateException_init_$Create$,
|
|
39
|
+
addAll1k27qatfgp3k5 as addAll,
|
|
61
40
|
isArray1hxjqtqy632bc as isArray,
|
|
62
41
|
} from './kotlin-kotlin-stdlib.mjs';
|
|
63
42
|
import {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
FilePath19g13s23dhifl as FilePath,
|
|
69
|
-
Directory2pzela5ei9b8y as Directory,
|
|
70
|
-
DirectoryPath2csdb6gzs7bpq as DirectoryPath,
|
|
71
|
-
plus1pp1y4l1xu22u as plus,
|
|
72
|
-
CompilerArguments27p1etc1665zg as CompilerArguments,
|
|
73
|
-
values39f22etrsivck as values,
|
|
74
|
-
JsonFiley161rolw5619 as JsonFile,
|
|
75
|
-
Language_Wirespec_getInstance1zl47mdevd656 as Language_Wirespec_getInstance,
|
|
76
|
-
ConverterArgumentsa8xc45eyvf51 as ConverterArguments,
|
|
77
|
-
Companion_instance29usj1v156zfd as Companion_instance_0,
|
|
78
|
-
_DirectoryPath___init__impl__5bzkjd1ktpd1ghksag0 as _DirectoryPath___init__impl__5bzkjd,
|
|
79
|
-
_DirectoryPath___get_value__impl__hdy2e31yc2tub9sv1l0 as _DirectoryPath___get_value__impl__hdy2e3,
|
|
80
|
-
_FileName___init__impl__nzn12e2ttezdy3facli as _FileName___init__impl__nzn12e,
|
|
81
|
-
_FileName___get_value__impl__3u4cz62y98r2mblb9vx as _FileName___get_value__impl__3u4cz6,
|
|
82
|
-
FileExtension_Java_getInstance2y5b2sxkahmzv as FileExtension_Java_getInstance,
|
|
83
|
-
JavaFile2mgokrcrqy4af as JavaFile,
|
|
84
|
-
FileExtension_Kotlin_getInstance33a993g70gip4 as FileExtension_Kotlin_getInstance,
|
|
85
|
-
KotlinFile128o120wpkhp9 as KotlinFile,
|
|
86
|
-
FileExtension_Scala_getInstanceheb2yniip135 as FileExtension_Scala_getInstance,
|
|
87
|
-
ScalaFile3m6vfgr0c9tmw as ScalaFile,
|
|
88
|
-
FileExtension_TypeScript_getInstance327v4uq0judmp as FileExtension_TypeScript_getInstance,
|
|
89
|
-
TypeScriptFile32l40p54f6anx as TypeScriptFile,
|
|
90
|
-
plus27fzpr8q3yphw as plus_0,
|
|
91
|
-
} from './wirespec-src-plugin-arguments.mjs';
|
|
92
|
-
import {
|
|
93
|
-
Companion_instance38d4g4yp9m5as as Companion_instance_1,
|
|
94
|
-
PackageName35p0zgv8tekor as PackageName,
|
|
95
|
-
Level_ERROR_getInstance2j4e9tt9l6uqw as Level_ERROR_getInstance,
|
|
96
|
-
Level_DEBUG_getInstance1db63unvt37e0 as Level_DEBUG_getInstance,
|
|
97
|
-
Level_INFO_getInstance2xs4l97ty5roh as Level_INFO_getInstance,
|
|
98
|
-
Level_WARN_getInstanceocut4pt1mmfe as Level_WARN_getInstance,
|
|
99
|
-
compile23ox110m1aeoz as compile,
|
|
100
|
-
Companion_getInstance3exl5179osn9k as Companion_getInstance,
|
|
101
|
-
Emitted3cm6ez40hij29 as Emitted,
|
|
102
|
-
Logger1cwdyrq5itr5l as Logger,
|
|
103
|
-
get_spec3cnzsbb1ufwje as get_spec,
|
|
104
|
-
HasLanguageSpec1fo5x3q6dcifj as HasLanguageSpec,
|
|
43
|
+
FileExtension_Wirespec_getInstancevnsx8bhpyyi1 as FileExtension_Wirespec_getInstance,
|
|
44
|
+
FileExtension_JSON_getInstance3s3hcc6ynarq8 as FileExtension_JSON_getInstance,
|
|
45
|
+
Companion_instance38d4g4yp9m5as as Companion_instance,
|
|
46
|
+
Companion_instance102bxzj2ej5fu as Companion_instance_0,
|
|
105
47
|
JavaEmitter1iajkiqm8e1w2 as JavaEmitter,
|
|
106
48
|
KotlinEmitter3u2bd89c6zjpn as KotlinEmitter,
|
|
107
49
|
ScalaEmittergcrbho15xuc5 as ScalaEmitter,
|
|
108
50
|
TypeScriptEmitter15xnhgx1fp785 as TypeScriptEmitter,
|
|
51
|
+
PythonEmitter2ympv43525ly9 as PythonEmitter,
|
|
109
52
|
WirespecEmitterzy8hsjgf4ddx as WirespecEmitter,
|
|
110
|
-
|
|
111
|
-
|
|
53
|
+
Logger1cwdyrq5itr5l as Logger,
|
|
54
|
+
Level_ERROR_getInstance2j4e9tt9l6uqw as Level_ERROR_getInstance,
|
|
55
|
+
Level_DEBUG_getInstance1db63unvt37e0 as Level_DEBUG_getInstance,
|
|
56
|
+
Level_INFO_getInstance2xs4l97ty5roh as Level_INFO_getInstance,
|
|
57
|
+
Level_WARN_getInstanceocut4pt1mmfe as Level_WARN_getInstance,
|
|
58
|
+
parsem5pum03bymz2 as parse,
|
|
59
|
+
get_spec3cnzsbb1ufwje as get_spec,
|
|
112
60
|
get_logger18kl6wyy7pz6k as get_logger,
|
|
61
|
+
HasLanguageSpec1fo5x3q6dcifj as HasLanguageSpec,
|
|
113
62
|
NoLoggero51bdi3we1s0 as NoLogger,
|
|
114
63
|
} from './wirespec-src-compiler-core.mjs';
|
|
115
64
|
import {
|
|
65
|
+
write1u316o1mmac8j as write,
|
|
66
|
+
Companion_instance16jo4jh8p2erh as Companion_instance_1,
|
|
67
|
+
getFullPath4g3ciksg8rpm as getFullPath,
|
|
68
|
+
read1bpb5m43oodfb as read,
|
|
69
|
+
Source2leyaqfqfs5k3 as Source,
|
|
70
|
+
FilePath16n0cgvs38g6y as FilePath,
|
|
71
|
+
Directory1msbu5hqetml1 as Directory,
|
|
72
|
+
wirespecSources3k3ry4x3ljoa3 as wirespecSources,
|
|
73
|
+
or33xhl4wx85q9x as or,
|
|
74
|
+
DirectoryPath39bbfr0ixndbr as DirectoryPath,
|
|
75
|
+
SourcePath3m57qddtnytut as SourcePath,
|
|
76
|
+
getOutPutPathqmn3xkxu6se6 as getOutPutPath,
|
|
77
|
+
CompilerArguments27p1etc1665zg as CompilerArguments,
|
|
78
|
+
values39f22etrsivck as values,
|
|
79
|
+
ConverterArgumentsa8xc45eyvf51 as ConverterArguments,
|
|
80
|
+
compile3ocumkpx3p9ko as compile,
|
|
81
|
+
convert3g5kyi4d6y9kc as convert,
|
|
82
|
+
} from './wirespec-src-plugin-arguments.mjs';
|
|
83
|
+
import {
|
|
84
|
+
Left2oemzq1tpcg4i as Left,
|
|
85
|
+
Right351sh2v8odavg as Right,
|
|
116
86
|
nonEmptySetOf3p7fhmt51pz4b as nonEmptySetOf,
|
|
117
|
-
NonEmptySet1rtvr2guloo52 as NonEmptySet,
|
|
118
87
|
toNonEmptySetOrNull1tjnd9jrkd4bs as toNonEmptySetOrNull,
|
|
119
|
-
|
|
120
|
-
toNonEmptyListOrNull2ovnnazjb3msz as toNonEmptyListOrNull,
|
|
121
|
-
DefaultRaisevd10gc79qxh8 as DefaultRaise,
|
|
122
|
-
Right351sh2v8odavg as Right,
|
|
123
|
-
nonFatalOrThrow35agffkx4bbtz as nonFatalOrThrow,
|
|
124
|
-
raisedOrRethrow397oyvsdde7oq as raisedOrRethrow,
|
|
125
|
-
Left2oemzq1tpcg4i as Left,
|
|
126
|
-
RaiseCancellationException3n5raogfhbd1l as RaiseCancellationException,
|
|
127
|
-
NonEmptyList3ak25ihy2gcvs as NonEmptyList,
|
|
88
|
+
NonEmptySet1rtvr2guloo52 as NonEmptySet,
|
|
128
89
|
nonEmptyListOf17xawqyzwrlrt as nonEmptyListOf,
|
|
129
90
|
Companion_instancel37dvvdi0gn2 as Companion_instance_2,
|
|
130
91
|
right2w60qw9uivnyr as right,
|
|
92
|
+
nonFatalOrThrow35agffkx4bbtz as nonFatalOrThrow,
|
|
131
93
|
left3pixsqou14wpr as left,
|
|
132
94
|
} from './arrow-arrow-core.mjs';
|
|
133
95
|
import {
|
|
134
|
-
Path21qufdfgaayly as Path,
|
|
135
|
-
get_SystemFileSystemcqw7gp4jhbc7 as get_SystemFileSystem,
|
|
136
|
-
buffered3kq86cdmguv3h as buffered,
|
|
137
|
-
readString2nvggcfaijfhd as readString,
|
|
138
|
-
buffered1hqdy4i9j28ez as buffered_0,
|
|
139
|
-
writeString33ca4btrgctw7 as writeString,
|
|
140
|
-
} from './kotlinx-io-kotlinx-io-core.mjs';
|
|
141
|
-
import {
|
|
142
|
-
OpenAPIV2Parser_instance1xcejlvmy4a3a as OpenAPIV2Parser_instance,
|
|
143
|
-
OpenAPIV3Parser_instance292ngistbqurv as OpenAPIV3Parser_instance,
|
|
144
96
|
OpenAPIV2Emitter_getInstance339m3dn2m5b6v as OpenAPIV2Emitter_getInstance,
|
|
145
97
|
OpenAPIV3Emitter_getInstanceja53nca07ivb as OpenAPIV3Emitter_getInstance,
|
|
146
98
|
} from './wirespec-src-converter-openapi.mjs';
|
|
147
|
-
import {
|
|
148
|
-
import { produce3go8okyj7e8u0 as produce } from './wirespec-src-compiler-lib.mjs';
|
|
99
|
+
import { produce1z6drlwotu836 as produce } from './wirespec-src-compiler-lib.mjs';
|
|
149
100
|
//region block: imports
|
|
150
|
-
var imul = Math.imul;
|
|
151
101
|
//endregion
|
|
152
102
|
//region block: pre-declaration
|
|
153
103
|
initMetadataForClass(IsNotAFileOrDirectory, 'IsNotAFileOrDirectory', VOID, CliktError);
|
|
104
|
+
initMetadataForClass(NoClasspathPossible, 'NoClasspathPossible', NoClasspathPossible, CliktError);
|
|
154
105
|
initMetadataForClass(SpecificFile, 'SpecificFile', VOID, CliktError);
|
|
155
106
|
initMetadataForClass(WirespecFileError, 'WirespecFileError', WirespecFileError, SpecificFile);
|
|
156
|
-
initMetadataForClass(OutputShouldBeADirectory, 'OutputShouldBeADirectory', OutputShouldBeADirectory, CliktError);
|
|
157
|
-
initMetadataForClass(ThisShouldNeverHappen, 'ThisShouldNeverHappen', ThisShouldNeverHappen, CliktError);
|
|
158
107
|
initMetadataForClass(ConvertNeedsAFile, 'ConvertNeedsAFile', ConvertNeedsAFile, CliktError);
|
|
159
108
|
initMetadataForClass(JSONFileError, 'JSONFileError', JSONFileError, SpecificFile);
|
|
160
|
-
initMetadataForClass(CannotAccessFileOrDirectory, 'CannotAccessFileOrDirectory', VOID, CliktError);
|
|
161
109
|
initMetadataForClass(ChooseALogLevel, 'ChooseALogLevel', ChooseALogLevel, CliktError);
|
|
162
110
|
initMetadataForCompanion(Companion);
|
|
163
111
|
initMetadataForClass(WirespecCli, 'WirespecCli', WirespecCli, NoOpCliktCommand);
|
|
@@ -165,27 +113,20 @@ initMetadataForClass(CommonOptions, 'CommonOptions', VOID, CliktCommand);
|
|
|
165
113
|
initMetadataForClass(Compile, 'Compile', VOID, CommonOptions);
|
|
166
114
|
initMetadataForClass(Convert, 'Convert', VOID, CommonOptions);
|
|
167
115
|
initMetadataForClass(Options, 'Options', VOID, Enum);
|
|
168
|
-
initMetadataForClass(WirespecResult, 'WirespecResult');
|
|
169
|
-
initMetadataForClass(compile$context$1$1);
|
|
170
|
-
initMetadataForClass(wirespec$1, VOID, VOID, VOID, [HasLanguageSpec]);
|
|
171
116
|
initMetadataForClass(parser$1, VOID, VOID, VOID, [HasLanguageSpec, NoLogger]);
|
|
172
117
|
//endregion
|
|
173
118
|
function IsNotAFileOrDirectory(input) {
|
|
174
119
|
CliktError.call(this, 'Input is not a file or directory: ' + input + '.');
|
|
175
120
|
captureStack(this, IsNotAFileOrDirectory);
|
|
176
121
|
}
|
|
122
|
+
function NoClasspathPossible() {
|
|
123
|
+
CliktError.call(this, 'No classpath input possible in cli.');
|
|
124
|
+
captureStack(this, NoClasspathPossible);
|
|
125
|
+
}
|
|
177
126
|
function WirespecFileError() {
|
|
178
127
|
SpecificFile.call(this, FileExtension_Wirespec_getInstance());
|
|
179
128
|
captureStack(this, WirespecFileError);
|
|
180
129
|
}
|
|
181
|
-
function OutputShouldBeADirectory() {
|
|
182
|
-
CliktError.call(this, 'Output should be a directory.');
|
|
183
|
-
captureStack(this, OutputShouldBeADirectory);
|
|
184
|
-
}
|
|
185
|
-
function ThisShouldNeverHappen() {
|
|
186
|
-
CliktError.call(this, 'This should never happen.');
|
|
187
|
-
captureStack(this, ThisShouldNeverHappen);
|
|
188
|
-
}
|
|
189
130
|
function ConvertNeedsAFile() {
|
|
190
131
|
CliktError.call(this, 'To convert, please specify a file.');
|
|
191
132
|
captureStack(this, ConvertNeedsAFile);
|
|
@@ -194,41 +135,48 @@ function JSONFileError() {
|
|
|
194
135
|
SpecificFile.call(this, FileExtension_JSON_getInstance());
|
|
195
136
|
captureStack(this, JSONFileError);
|
|
196
137
|
}
|
|
197
|
-
function CannotAccessFileOrDirectory(input) {
|
|
198
|
-
CliktError.call(this, 'Cannot access file or directory: ' + input + '.');
|
|
199
|
-
captureStack(this, CannotAccessFileOrDirectory);
|
|
200
|
-
}
|
|
201
138
|
function ChooseALogLevel() {
|
|
202
|
-
CliktError.call(this, 'Choose one of these log levels: ' +
|
|
139
|
+
CliktError.call(this, 'Choose one of these log levels: ' + Companion_instance.toString() + '.');
|
|
203
140
|
captureStack(this, ChooseALogLevel);
|
|
204
141
|
}
|
|
205
142
|
function SpecificFile(extension) {
|
|
206
|
-
CliktError.call(this, 'No ' + extension.
|
|
143
|
+
CliktError.call(this, 'No ' + extension.q2_1 + ' file found');
|
|
207
144
|
captureStack(this, SpecificFile);
|
|
208
145
|
}
|
|
209
146
|
function Companion() {
|
|
210
147
|
}
|
|
211
|
-
protoOf(Companion).
|
|
148
|
+
protoOf(Companion).u4b = function (compile, convert) {
|
|
212
149
|
return subcommands(new WirespecCli(), [new Compile(compile), new Convert(convert)]);
|
|
213
150
|
};
|
|
214
151
|
var Companion_instance_3;
|
|
215
|
-
function
|
|
152
|
+
function Companion_getInstance() {
|
|
216
153
|
return Companion_instance_3;
|
|
217
154
|
}
|
|
218
155
|
function WirespecCli() {
|
|
219
156
|
NoOpCliktCommand.call(this, VOID, VOID, 'wirespec');
|
|
220
157
|
}
|
|
221
158
|
function _get_languages__ojonze($this) {
|
|
222
|
-
return $this.
|
|
159
|
+
return $this.t4c_1.b49($this, languages$factory_0());
|
|
223
160
|
}
|
|
224
161
|
function run$handleError(p0) {
|
|
225
162
|
handleError(p0);
|
|
226
163
|
}
|
|
227
|
-
function
|
|
228
|
-
|
|
164
|
+
function handleError$ref() {
|
|
165
|
+
var l = function (p0) {
|
|
166
|
+
handleError(p0);
|
|
167
|
+
};
|
|
168
|
+
l.callableName = 'handleError';
|
|
169
|
+
return l;
|
|
229
170
|
}
|
|
230
|
-
function
|
|
231
|
-
|
|
171
|
+
function handleError$ref_0() {
|
|
172
|
+
var l = function (p0) {
|
|
173
|
+
handleError(p0);
|
|
174
|
+
};
|
|
175
|
+
l.callableName = 'handleError';
|
|
176
|
+
return l;
|
|
177
|
+
}
|
|
178
|
+
function Compile$run$lambda(filePath, string) {
|
|
179
|
+
write(filePath, string);
|
|
232
180
|
return Unit_instance;
|
|
233
181
|
}
|
|
234
182
|
function Compile$run$handleError$ref() {
|
|
@@ -239,77 +187,137 @@ function Compile$run$handleError$ref() {
|
|
|
239
187
|
}
|
|
240
188
|
function Compile(compiler) {
|
|
241
189
|
CommonOptions.call(this);
|
|
242
|
-
this.
|
|
243
|
-
this.
|
|
190
|
+
this.s4c_1 = compiler;
|
|
191
|
+
this.t4c_1 = multiple(choice(option(this, Options_Language_getInstance().w4c_1.slice(), 'Language'), Companion_instance_1.i2j(), VOID, true), VOID, true).m49(this, languages$factory());
|
|
244
192
|
}
|
|
245
|
-
protoOf(Compile).
|
|
246
|
-
|
|
193
|
+
protoOf(Compile).q3z = function () {
|
|
194
|
+
// Inline function 'arrow.core.getOrElse' call
|
|
195
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
196
|
+
// Inline function 'arrow.core.Either.fold' call
|
|
197
|
+
var this_0 = getFullPath(this.u4d());
|
|
198
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
247
199
|
var tmp;
|
|
248
|
-
if (
|
|
200
|
+
if (this_0 instanceof Right) {
|
|
201
|
+
// Inline function 'arrow.core.getOrElse.stub_for_inlining' call
|
|
202
|
+
// Inline function 'arrow.core.identity' call
|
|
203
|
+
tmp = this_0.pk_1;
|
|
204
|
+
} else {
|
|
205
|
+
if (this_0 instanceof Left) {
|
|
206
|
+
var it = this_0.jk_1;
|
|
207
|
+
throw new CliktError(it.w2k_1);
|
|
208
|
+
} else {
|
|
209
|
+
noWhenBranchMatchedException();
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
var inputPath = tmp;
|
|
213
|
+
var tmp_0;
|
|
214
|
+
if (inputPath == null) {
|
|
249
215
|
throw new IsNotAFileOrDirectory(null);
|
|
250
216
|
} else {
|
|
251
|
-
if (
|
|
252
|
-
|
|
217
|
+
if (inputPath instanceof SourcePath) {
|
|
218
|
+
throw new NoClasspathPossible();
|
|
253
219
|
} else {
|
|
254
|
-
if (
|
|
255
|
-
var
|
|
256
|
-
|
|
257
|
-
|
|
220
|
+
if (inputPath instanceof DirectoryPath) {
|
|
221
|
+
var tmp_1 = wirespecSources(new Directory(inputPath.s2k_1));
|
|
222
|
+
tmp_0 = or(tmp_1, handleError$ref()).cl_1;
|
|
223
|
+
} else {
|
|
224
|
+
if (inputPath instanceof FilePath) {
|
|
225
|
+
var tmp_2;
|
|
226
|
+
if (inputPath.w2j_1.r2_1 === 5) {
|
|
227
|
+
tmp_2 = nonEmptySetOf(new Source(inputPath.v2j_1, read(inputPath)), []);
|
|
228
|
+
} else {
|
|
229
|
+
throw new WirespecFileError();
|
|
230
|
+
}
|
|
231
|
+
tmp_0 = tmp_2;
|
|
258
232
|
} else {
|
|
259
|
-
|
|
233
|
+
noWhenBranchMatchedException();
|
|
260
234
|
}
|
|
261
|
-
tmp = tmp_0;
|
|
262
|
-
} else {
|
|
263
|
-
noWhenBranchMatchedException();
|
|
264
235
|
}
|
|
265
236
|
}
|
|
266
237
|
}
|
|
267
|
-
var
|
|
268
|
-
|
|
269
|
-
var
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
238
|
+
var sources = tmp_0;
|
|
239
|
+
// Inline function 'kotlin.collections.map' call
|
|
240
|
+
var this_1 = _get_languages__ojonze(this);
|
|
241
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
242
|
+
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
|
|
243
|
+
var _iterator__ex2g4s = this_1.g();
|
|
244
|
+
while (_iterator__ex2g4s.h()) {
|
|
245
|
+
var item = _iterator__ex2g4s.i();
|
|
246
|
+
// Inline function 'community.flock.wirespec.plugin.cli.Compile.run.<anonymous>' call
|
|
247
|
+
var tmp_3;
|
|
248
|
+
switch (item.r2_1) {
|
|
249
|
+
case 0:
|
|
250
|
+
tmp_3 = new JavaEmitter(Companion_instance_0.c26(this.v4d()));
|
|
251
|
+
break;
|
|
252
|
+
case 1:
|
|
253
|
+
tmp_3 = new KotlinEmitter(Companion_instance_0.c26(this.v4d()));
|
|
254
|
+
break;
|
|
255
|
+
case 2:
|
|
256
|
+
tmp_3 = new ScalaEmitter(Companion_instance_0.c26(this.v4d()));
|
|
257
|
+
break;
|
|
258
|
+
case 3:
|
|
259
|
+
tmp_3 = new TypeScriptEmitter();
|
|
260
|
+
break;
|
|
261
|
+
case 4:
|
|
262
|
+
tmp_3 = new PythonEmitter();
|
|
263
|
+
break;
|
|
264
|
+
case 5:
|
|
265
|
+
tmp_3 = new WirespecEmitter();
|
|
266
|
+
break;
|
|
267
|
+
case 6:
|
|
268
|
+
tmp_3 = OpenAPIV2Emitter_getInstance();
|
|
269
|
+
break;
|
|
270
|
+
case 7:
|
|
271
|
+
tmp_3 = OpenAPIV3Emitter_getInstance();
|
|
272
|
+
break;
|
|
273
|
+
default:
|
|
279
274
|
noWhenBranchMatchedException();
|
|
280
|
-
|
|
275
|
+
break;
|
|
281
276
|
}
|
|
277
|
+
var tmp$ret$4 = tmp_3;
|
|
278
|
+
destination.e(tmp$ret$4);
|
|
282
279
|
}
|
|
283
|
-
var
|
|
284
|
-
var
|
|
285
|
-
var
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
var tmp_5;
|
|
289
|
-
var tmp_6 = tmp1_elvis_lhs;
|
|
290
|
-
if ((tmp_6 == null ? null : new NonEmptySet(tmp_6)) == null) {
|
|
291
|
-
throw new ThisShouldNeverHappen();
|
|
280
|
+
var tmp2_elvis_lhs = toNonEmptySetOrNull(destination);
|
|
281
|
+
var tmp_4;
|
|
282
|
+
var tmp_5 = tmp2_elvis_lhs;
|
|
283
|
+
if ((tmp_5 == null ? null : new NonEmptySet(tmp_5)) == null) {
|
|
284
|
+
tmp_4 = nonEmptySetOf(new WirespecEmitter(), []);
|
|
292
285
|
} else {
|
|
293
|
-
|
|
286
|
+
tmp_4 = tmp2_elvis_lhs;
|
|
294
287
|
}
|
|
295
|
-
var
|
|
288
|
+
var emitters = tmp_4;
|
|
289
|
+
var tmp_6 = getOutPutPath(inputPath, this.n2k());
|
|
290
|
+
var tmp_7 = new Directory(or(tmp_6, handleError$ref_0()).s2k_1);
|
|
291
|
+
var tmp_8 = Compile$run$lambda;
|
|
292
|
+
var tmp4 = new CompilerArguments(sources, tmp_7, emitters, tmp_8, Compile$run$handleError$ref(), Companion_instance_0.c26(this.v4d()), new Logger(this.x4d(this.w4d())), this.e26(), this.y4d());
|
|
296
293
|
// Inline function 'kotlin.let' call
|
|
297
|
-
this.
|
|
294
|
+
this.s4c_1(tmp4);
|
|
298
295
|
};
|
|
299
296
|
function _get_format__qlarck($this) {
|
|
300
|
-
return $this.
|
|
297
|
+
return $this.x4e_1.b49($this, format$factory_0());
|
|
301
298
|
}
|
|
302
299
|
function _get_languages__ojonze_0($this) {
|
|
303
|
-
return $this.
|
|
300
|
+
return $this.y4e_1.b49($this, languages$factory_2());
|
|
304
301
|
}
|
|
305
302
|
function run$handleError_0(p0) {
|
|
306
303
|
handleError(p0);
|
|
307
304
|
}
|
|
308
|
-
function
|
|
309
|
-
|
|
305
|
+
function handleError$ref_1() {
|
|
306
|
+
var l = function (p0) {
|
|
307
|
+
handleError(p0);
|
|
308
|
+
};
|
|
309
|
+
l.callableName = 'handleError';
|
|
310
|
+
return l;
|
|
310
311
|
}
|
|
311
|
-
function
|
|
312
|
-
|
|
312
|
+
function handleError$ref_2() {
|
|
313
|
+
var l = function (p0) {
|
|
314
|
+
handleError(p0);
|
|
315
|
+
};
|
|
316
|
+
l.callableName = 'handleError';
|
|
317
|
+
return l;
|
|
318
|
+
}
|
|
319
|
+
function Convert$run$lambda(filePath, string) {
|
|
320
|
+
write(filePath, string);
|
|
313
321
|
return Unit_instance;
|
|
314
322
|
}
|
|
315
323
|
function Convert$run$handleError$ref() {
|
|
@@ -320,7 +328,7 @@ function Convert$run$handleError$ref() {
|
|
|
320
328
|
}
|
|
321
329
|
function Convert(converter) {
|
|
322
330
|
CommonOptions.call(this);
|
|
323
|
-
this.
|
|
331
|
+
this.w4e_1 = converter;
|
|
324
332
|
var tmp = this;
|
|
325
333
|
// Inline function 'com.github.ajalt.clikt.parameters.types.enum' call
|
|
326
334
|
var this_0 = argument(this, VOID, 'Input format');
|
|
@@ -337,127 +345,127 @@ function Convert(converter) {
|
|
|
337
345
|
inductionVariable = inductionVariable + 1 | 0;
|
|
338
346
|
// Inline function 'com.github.ajalt.clikt.parameters.types.enum.<anonymous>' call
|
|
339
347
|
// Inline function 'com.github.ajalt.clikt.parameters.types.enum.<anonymous>' call
|
|
340
|
-
var tmp$ret$2 = element.
|
|
341
|
-
destination.
|
|
348
|
+
var tmp$ret$2 = element.q2_1;
|
|
349
|
+
destination.n2(tmp$ret$2, element);
|
|
342
350
|
}
|
|
343
|
-
tmp.
|
|
344
|
-
this.
|
|
351
|
+
tmp.x4e_1 = choice_0(this_0, destination, true).h48(this, format$factory());
|
|
352
|
+
this.y4e_1 = multiple(choice(option(this, Options_Language_getInstance().w4c_1.slice(), 'Language'), Companion_instance_1.i2j(), VOID, true)).m49(this, languages$factory_1());
|
|
345
353
|
}
|
|
346
|
-
protoOf(Convert).
|
|
347
|
-
var
|
|
348
|
-
var tmp;
|
|
349
|
-
|
|
354
|
+
protoOf(Convert).q3z = function () {
|
|
355
|
+
var tmp = getFullPath(this.u4d());
|
|
356
|
+
var inputPath = or(tmp, handleError$ref_1());
|
|
357
|
+
var tmp_0;
|
|
358
|
+
if (inputPath == null) {
|
|
350
359
|
throw new IsNotAFileOrDirectory(null);
|
|
351
360
|
} else {
|
|
352
|
-
if (
|
|
353
|
-
throw new
|
|
361
|
+
if (inputPath instanceof SourcePath) {
|
|
362
|
+
throw new NoClasspathPossible();
|
|
354
363
|
} else {
|
|
355
|
-
if (
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
364
|
+
if (inputPath instanceof DirectoryPath) {
|
|
365
|
+
throw new ConvertNeedsAFile();
|
|
366
|
+
} else {
|
|
367
|
+
if (inputPath instanceof FilePath) {
|
|
368
|
+
var tmp_1;
|
|
369
|
+
if (inputPath.w2j_1.r2_1 === 6) {
|
|
370
|
+
tmp_1 = new Source(inputPath.v2j_1, read(inputPath));
|
|
371
|
+
} else {
|
|
372
|
+
throw new JSONFileError();
|
|
373
|
+
}
|
|
374
|
+
tmp_0 = tmp_1;
|
|
359
375
|
} else {
|
|
360
|
-
|
|
376
|
+
noWhenBranchMatchedException();
|
|
361
377
|
}
|
|
362
|
-
tmp = tmp_0;
|
|
363
|
-
} else {
|
|
364
|
-
noWhenBranchMatchedException();
|
|
365
378
|
}
|
|
366
379
|
}
|
|
367
380
|
}
|
|
368
|
-
var
|
|
369
|
-
|
|
370
|
-
var
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
381
|
+
var source = tmp_0;
|
|
382
|
+
// Inline function 'kotlin.collections.map' call
|
|
383
|
+
var this_0 = _get_languages__ojonze_0(this);
|
|
384
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
385
|
+
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
386
|
+
var _iterator__ex2g4s = this_0.g();
|
|
387
|
+
while (_iterator__ex2g4s.h()) {
|
|
388
|
+
var item = _iterator__ex2g4s.i();
|
|
389
|
+
// Inline function 'community.flock.wirespec.plugin.cli.Convert.run.<anonymous>' call
|
|
390
|
+
var tmp_2;
|
|
391
|
+
switch (item.r2_1) {
|
|
392
|
+
case 0:
|
|
393
|
+
tmp_2 = new JavaEmitter(Companion_instance_0.c26(this.v4d()));
|
|
394
|
+
break;
|
|
395
|
+
case 1:
|
|
396
|
+
tmp_2 = new KotlinEmitter(Companion_instance_0.c26(this.v4d()));
|
|
397
|
+
break;
|
|
398
|
+
case 2:
|
|
399
|
+
tmp_2 = new ScalaEmitter(Companion_instance_0.c26(this.v4d()));
|
|
400
|
+
break;
|
|
401
|
+
case 3:
|
|
402
|
+
tmp_2 = new TypeScriptEmitter();
|
|
403
|
+
break;
|
|
404
|
+
case 4:
|
|
405
|
+
tmp_2 = new PythonEmitter();
|
|
406
|
+
break;
|
|
407
|
+
case 5:
|
|
408
|
+
tmp_2 = new WirespecEmitter();
|
|
409
|
+
break;
|
|
410
|
+
case 6:
|
|
411
|
+
tmp_2 = OpenAPIV2Emitter_getInstance();
|
|
412
|
+
break;
|
|
413
|
+
case 7:
|
|
414
|
+
tmp_2 = OpenAPIV3Emitter_getInstance();
|
|
415
|
+
break;
|
|
416
|
+
default:
|
|
380
417
|
noWhenBranchMatchedException();
|
|
381
|
-
|
|
418
|
+
break;
|
|
382
419
|
}
|
|
420
|
+
var tmp$ret$0 = tmp_2;
|
|
421
|
+
destination.e(tmp$ret$0);
|
|
383
422
|
}
|
|
384
|
-
var
|
|
385
|
-
var
|
|
386
|
-
var
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
var tmp1_elvis_lhs = toNonEmptySetOrNull(_get_languages__ojonze_0(this));
|
|
390
|
-
var tmp_6;
|
|
391
|
-
var tmp_7 = tmp1_elvis_lhs;
|
|
392
|
-
if ((tmp_7 == null ? null : new NonEmptySet(tmp_7)) == null) {
|
|
393
|
-
tmp_6 = nonEmptySetOf(Language_Wirespec_getInstance(), []);
|
|
423
|
+
var tmp2_elvis_lhs = toNonEmptySetOrNull(destination);
|
|
424
|
+
var tmp_3;
|
|
425
|
+
var tmp_4 = tmp2_elvis_lhs;
|
|
426
|
+
if ((tmp_4 == null ? null : new NonEmptySet(tmp_4)) == null) {
|
|
427
|
+
tmp_3 = nonEmptySetOf(new WirespecEmitter(), []);
|
|
394
428
|
} else {
|
|
395
|
-
|
|
429
|
+
tmp_3 = tmp2_elvis_lhs;
|
|
396
430
|
}
|
|
397
|
-
var
|
|
431
|
+
var emitters = tmp_3;
|
|
432
|
+
var tmp_5 = _get_format__qlarck(this);
|
|
433
|
+
var tmp_6 = nonEmptySetOf(source, []);
|
|
434
|
+
var tmp_7 = getOutPutPath(inputPath, this.n2k());
|
|
435
|
+
var tmp_8 = new Directory(or(tmp_7, handleError$ref_2()).s2k_1);
|
|
436
|
+
var tmp_9 = Convert$run$lambda;
|
|
437
|
+
var tmp2 = new ConverterArguments(tmp_5, tmp_6, tmp_8, emitters, tmp_9, Convert$run$handleError$ref(), Companion_instance_0.c26(this.v4d()), new Logger(this.x4d(this.w4d())), this.e26(), this.y4d());
|
|
398
438
|
// Inline function 'kotlin.let' call
|
|
399
|
-
this.
|
|
439
|
+
this.w4e_1(tmp2);
|
|
400
440
|
};
|
|
401
441
|
function CommonOptions() {
|
|
402
442
|
CliktCommand.call(this);
|
|
403
|
-
this.
|
|
404
|
-
this.
|
|
405
|
-
this.
|
|
406
|
-
this.
|
|
407
|
-
this.
|
|
408
|
-
this.
|
|
409
|
-
}
|
|
410
|
-
protoOf(CommonOptions).
|
|
411
|
-
return this.
|
|
412
|
-
};
|
|
413
|
-
protoOf(CommonOptions).w4b = function () {
|
|
414
|
-
return this.p4b_1.z43(this, outputPath$factory_0());
|
|
443
|
+
this.o4d_1 = option(this, Options_Input_getInstance().w4c_1.slice(), 'Input').m49(this, input$factory());
|
|
444
|
+
this.p4d_1 = option(this, Options_Output_getInstance().w4c_1.slice(), 'Output').m49(this, output$factory());
|
|
445
|
+
this.q4d_1 = default_0(option(this, Options_PackageName_getInstance().w4c_1.slice(), 'Package name'), 'community.flock.wirespec.generated').m49(this, packageName$factory());
|
|
446
|
+
this.r4d_1 = default_0(option(this, Options_LogLevel_getInstance().w4c_1.slice(), 'Log level: ' + Companion_instance.toString()), Level_ERROR_getInstance().toString()).m49(this, logLevel$factory());
|
|
447
|
+
this.s4d_1 = flag(option(this, Options_Shared_getInstance().w4c_1.slice(), 'Generate shared wirespec code'), [], false).m49(this, shared$factory());
|
|
448
|
+
this.t4d_1 = flag(option(this, Options_Strict_getInstance().w4c_1.slice(), 'Strict mode'), []).m49(this, strict$factory());
|
|
449
|
+
}
|
|
450
|
+
protoOf(CommonOptions).u4d = function () {
|
|
451
|
+
return this.o4d_1.b49(this, input$factory_0());
|
|
415
452
|
};
|
|
416
|
-
protoOf(CommonOptions).
|
|
417
|
-
return this.
|
|
453
|
+
protoOf(CommonOptions).n2k = function () {
|
|
454
|
+
return this.p4d_1.b49(this, output$factory_0());
|
|
418
455
|
};
|
|
419
|
-
protoOf(CommonOptions).
|
|
420
|
-
return this.
|
|
456
|
+
protoOf(CommonOptions).v4d = function () {
|
|
457
|
+
return this.q4d_1.b49(this, packageName$factory_0());
|
|
421
458
|
};
|
|
422
|
-
protoOf(CommonOptions).
|
|
423
|
-
return this.
|
|
459
|
+
protoOf(CommonOptions).w4d = function () {
|
|
460
|
+
return this.r4d_1.b49(this, logLevel$factory_0());
|
|
424
461
|
};
|
|
425
|
-
protoOf(CommonOptions).
|
|
426
|
-
return this.
|
|
427
|
-
};
|
|
428
|
-
protoOf(CommonOptions).x4b = function (input, createIfNotExists_0) {
|
|
429
|
-
var tmp;
|
|
430
|
-
if (input == null) {
|
|
431
|
-
tmp = null;
|
|
432
|
-
} else {
|
|
433
|
-
// Inline function 'kotlin.let' call
|
|
434
|
-
// Inline function 'community.flock.wirespec.plugin.cli.CommonOptions.getFullPath.<anonymous>' call
|
|
435
|
-
var path = createIfNotExists(Path(input), createIfNotExists_0);
|
|
436
|
-
var tmp0_elvis_lhs = get_SystemFileSystem().g49(path);
|
|
437
|
-
var tmp_0;
|
|
438
|
-
if (tmp0_elvis_lhs == null) {
|
|
439
|
-
throw new CannotAccessFileOrDirectory(input);
|
|
440
|
-
} else {
|
|
441
|
-
tmp_0 = tmp0_elvis_lhs;
|
|
442
|
-
}
|
|
443
|
-
var meta = tmp_0;
|
|
444
|
-
var tmp_1;
|
|
445
|
-
if (meta.j49_1) {
|
|
446
|
-
tmp_1 = new DirectoryPath(_DirectoryPath___init__impl__5bzkjd(input));
|
|
447
|
-
} else if (meta.i49_1) {
|
|
448
|
-
tmp_1 = Companion_instance_0.f2d(input);
|
|
449
|
-
} else {
|
|
450
|
-
throw new IsNotAFileOrDirectory(input);
|
|
451
|
-
}
|
|
452
|
-
tmp = tmp_1;
|
|
453
|
-
}
|
|
454
|
-
return tmp;
|
|
462
|
+
protoOf(CommonOptions).e26 = function () {
|
|
463
|
+
return this.s4d_1.b49(this, shared$factory_0());
|
|
455
464
|
};
|
|
456
|
-
protoOf(CommonOptions).
|
|
457
|
-
|
|
458
|
-
return $super === VOID ? this.x4b(input, createIfNotExists) : $super.x4b.call(this, input, createIfNotExists);
|
|
465
|
+
protoOf(CommonOptions).y4d = function () {
|
|
466
|
+
return this.t4d_1.b49(this, strict$factory_0());
|
|
459
467
|
};
|
|
460
|
-
protoOf(CommonOptions).
|
|
468
|
+
protoOf(CommonOptions).x4d = function (_this__u8e3s4) {
|
|
461
469
|
// Inline function 'kotlin.text.trim' call
|
|
462
470
|
// Inline function 'kotlin.text.uppercase' call
|
|
463
471
|
// Inline function 'kotlin.js.asDynamic' call
|
|
@@ -502,144 +510,11 @@ function Options_initEntries() {
|
|
|
502
510
|
}
|
|
503
511
|
function Options(name, ordinal, flags) {
|
|
504
512
|
Enum.call(this, name, ordinal);
|
|
505
|
-
this.
|
|
506
|
-
}
|
|
507
|
-
function wirespecFiles(_this__u8e3s4) {
|
|
508
|
-
var tmp0 = Path(_DirectoryPath___get_value__impl__hdy2e3(_this__u8e3s4.e2d_1));
|
|
509
|
-
// Inline function 'kotlin.let' call
|
|
510
|
-
// Inline function 'community.flock.wirespec.plugin.cli.wirespecFiles.stub_for_inlining' call
|
|
511
|
-
var tmp$ret$1 = get_SystemFileSystem().h49(tmp0);
|
|
512
|
-
var tmp = asSequence(tmp$ret$1);
|
|
513
|
-
var tmp_0 = filter(tmp, isRegularFile$ref());
|
|
514
|
-
var tmp_1 = filter(tmp_0, isWirespecFile$ref());
|
|
515
|
-
var tmp_2 = map(tmp_1, wirespecFiles$lambda);
|
|
516
|
-
var tmp_3 = map(tmp_2, wirespecFiles$lambda_0);
|
|
517
|
-
var tmp_4 = map(tmp_3, wirespecFiles$lambda_1(_this__u8e3s4));
|
|
518
|
-
var tmp0_elvis_lhs = toNonEmptySetOrNull(toList(map(tmp_4, WirespecFile$_init_$ref_cj1n5j())));
|
|
519
|
-
var tmp_5;
|
|
520
|
-
var tmp_6 = tmp0_elvis_lhs;
|
|
521
|
-
if ((tmp_6 == null ? null : new NonEmptySet(tmp_6)) == null) {
|
|
522
|
-
throw new WirespecFileError();
|
|
523
|
-
} else {
|
|
524
|
-
tmp_5 = tmp0_elvis_lhs;
|
|
525
|
-
}
|
|
526
|
-
return tmp_5;
|
|
527
|
-
}
|
|
528
|
-
function read(_this__u8e3s4) {
|
|
529
|
-
// Inline function 'kotlin.let' call
|
|
530
|
-
// Inline function 'community.flock.wirespec.plugin.cli.read.<anonymous>' call
|
|
531
|
-
var it = Path(_this__u8e3s4.o2d_1.toString());
|
|
532
|
-
return readString(buffered(get_SystemFileSystem().d49(it)));
|
|
533
|
-
}
|
|
534
|
-
function write(_this__u8e3s4, string) {
|
|
535
|
-
// Inline function 'kotlin.also' call
|
|
536
|
-
var this_0 = Path(_this__u8e3s4.o2d_1.toString());
|
|
537
|
-
// Inline function 'community.flock.wirespec.plugin.cli.write.<anonymous>' call
|
|
538
|
-
var tmp0_safe_receiver = this_0.m49();
|
|
539
|
-
if (tmp0_safe_receiver == null)
|
|
540
|
-
null;
|
|
541
|
-
else
|
|
542
|
-
createIfNotExists(tmp0_safe_receiver);
|
|
543
|
-
// Inline function 'kotlin.let' call
|
|
544
|
-
// Inline function 'community.flock.wirespec.plugin.cli.write.<anonymous>' call
|
|
545
|
-
// Inline function 'kotlin.apply' call
|
|
546
|
-
var this_1 = buffered_0(get_SystemFileSystem().f49(this_0));
|
|
547
|
-
// Inline function 'community.flock.wirespec.plugin.cli.write.<anonymous>.<anonymous>' call
|
|
548
|
-
writeString(this_1, string);
|
|
549
|
-
this_1.p8();
|
|
550
|
-
return Unit_instance;
|
|
513
|
+
this.w4c_1 = flags;
|
|
551
514
|
}
|
|
552
515
|
function handleError(string) {
|
|
553
516
|
throw new CliktError(string);
|
|
554
517
|
}
|
|
555
|
-
function createIfNotExists(_this__u8e3s4, create) {
|
|
556
|
-
create = create === VOID ? true : create;
|
|
557
|
-
// Inline function 'kotlin.also' call
|
|
558
|
-
// Inline function 'community.flock.wirespec.plugin.cli.createIfNotExists.<anonymous>' call
|
|
559
|
-
if (create && !get_SystemFileSystem().b49(_this__u8e3s4)) {
|
|
560
|
-
get_SystemFileSystem().c49(_this__u8e3s4, true);
|
|
561
|
-
}
|
|
562
|
-
return _this__u8e3s4;
|
|
563
|
-
}
|
|
564
|
-
function isWirespecFile(path) {
|
|
565
|
-
return get_extension(path) === FileExtension_Wirespec_getInstance().i2d_1;
|
|
566
|
-
}
|
|
567
|
-
function isRegularFile(path) {
|
|
568
|
-
var tmp0_safe_receiver = get_SystemFileSystem().g49(path);
|
|
569
|
-
return (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.i49_1) === true;
|
|
570
|
-
}
|
|
571
|
-
function get_extension(_this__u8e3s4) {
|
|
572
|
-
return substringAfterLast(_this__u8e3s4.q2(), _Char___init__impl__6a9atx(46), '');
|
|
573
|
-
}
|
|
574
|
-
function WirespecResult_init_$Init$(pair, $this) {
|
|
575
|
-
WirespecResult.call($this, pair.ke_1, pair.le_1);
|
|
576
|
-
return $this;
|
|
577
|
-
}
|
|
578
|
-
function WirespecResult_init_$Create$(pair) {
|
|
579
|
-
return WirespecResult_init_$Init$(pair, objectCreate(protoOf(WirespecResult)));
|
|
580
|
-
}
|
|
581
|
-
function WirespecResult(file, emitted) {
|
|
582
|
-
this.c4d_1 = file;
|
|
583
|
-
this.d4d_1 = emitted;
|
|
584
|
-
}
|
|
585
|
-
protoOf(WirespecResult).yd = function () {
|
|
586
|
-
return this.c4d_1;
|
|
587
|
-
};
|
|
588
|
-
protoOf(WirespecResult).zd = function () {
|
|
589
|
-
return this.d4d_1;
|
|
590
|
-
};
|
|
591
|
-
protoOf(WirespecResult).toString = function () {
|
|
592
|
-
return 'WirespecResult(file=' + toString(this.c4d_1) + ', emitted=' + this.d4d_1.toString() + ')';
|
|
593
|
-
};
|
|
594
|
-
protoOf(WirespecResult).hashCode = function () {
|
|
595
|
-
var result = hashCode(this.c4d_1);
|
|
596
|
-
result = imul(result, 31) + this.d4d_1.hashCode() | 0;
|
|
597
|
-
return result;
|
|
598
|
-
};
|
|
599
|
-
protoOf(WirespecResult).equals = function (other) {
|
|
600
|
-
if (this === other)
|
|
601
|
-
return true;
|
|
602
|
-
if (!(other instanceof WirespecResult))
|
|
603
|
-
return false;
|
|
604
|
-
var tmp0_other_with_cast = other instanceof WirespecResult ? other : THROW_CCE();
|
|
605
|
-
if (!equals(this.c4d_1, tmp0_other_with_cast.c4d_1))
|
|
606
|
-
return false;
|
|
607
|
-
if (!this.d4d_1.equals(tmp0_other_with_cast.d4d_1))
|
|
608
|
-
return false;
|
|
609
|
-
return true;
|
|
610
|
-
};
|
|
611
|
-
function isRegularFile$ref() {
|
|
612
|
-
var l = function (p0) {
|
|
613
|
-
return isRegularFile(p0);
|
|
614
|
-
};
|
|
615
|
-
l.callableName = 'isRegularFile';
|
|
616
|
-
return l;
|
|
617
|
-
}
|
|
618
|
-
function isWirespecFile$ref() {
|
|
619
|
-
var l = function (p0) {
|
|
620
|
-
return isWirespecFile(p0);
|
|
621
|
-
};
|
|
622
|
-
l.callableName = 'isWirespecFile';
|
|
623
|
-
return l;
|
|
624
|
-
}
|
|
625
|
-
function wirespecFiles$lambda(it) {
|
|
626
|
-
return it.q2();
|
|
627
|
-
}
|
|
628
|
-
function wirespecFiles$lambda_0(it) {
|
|
629
|
-
return dropLast(it, FileExtension_Wirespec_getInstance().i2d_1.length + 1 | 0);
|
|
630
|
-
}
|
|
631
|
-
function wirespecFiles$lambda_1($this_wirespecFiles) {
|
|
632
|
-
return function (it) {
|
|
633
|
-
return new FilePath($this_wirespecFiles.e2d_1, _FileName___init__impl__nzn12e(it));
|
|
634
|
-
};
|
|
635
|
-
}
|
|
636
|
-
function WirespecFile$_init_$ref_cj1n5j() {
|
|
637
|
-
var l = function (p0) {
|
|
638
|
-
return new WirespecFile(p0);
|
|
639
|
-
};
|
|
640
|
-
l.callableName = '<init>';
|
|
641
|
-
return l;
|
|
642
|
-
}
|
|
643
518
|
function Options_Input_getInstance() {
|
|
644
519
|
Options_initEntries();
|
|
645
520
|
return Options_Input_instance;
|
|
@@ -698,579 +573,71 @@ function languages$factory_2() {
|
|
|
698
573
|
return _get_languages__ojonze_0(receiver);
|
|
699
574
|
}, null);
|
|
700
575
|
}
|
|
701
|
-
function
|
|
702
|
-
return getPropertyCallableRef('
|
|
703
|
-
return receiver.
|
|
576
|
+
function input$factory() {
|
|
577
|
+
return getPropertyCallableRef('input', 1, KProperty1, function (receiver) {
|
|
578
|
+
return receiver.u4d();
|
|
704
579
|
}, null);
|
|
705
580
|
}
|
|
706
|
-
function
|
|
707
|
-
return getPropertyCallableRef('
|
|
708
|
-
return receiver.
|
|
581
|
+
function output$factory() {
|
|
582
|
+
return getPropertyCallableRef('output', 1, KProperty1, function (receiver) {
|
|
583
|
+
return receiver.n2k();
|
|
709
584
|
}, null);
|
|
710
585
|
}
|
|
711
586
|
function packageName$factory() {
|
|
712
587
|
return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) {
|
|
713
|
-
return receiver.
|
|
588
|
+
return receiver.v4d();
|
|
714
589
|
}, null);
|
|
715
590
|
}
|
|
716
591
|
function logLevel$factory() {
|
|
717
592
|
return getPropertyCallableRef('logLevel', 1, KProperty1, function (receiver) {
|
|
718
|
-
return receiver.
|
|
593
|
+
return receiver.w4d();
|
|
719
594
|
}, null);
|
|
720
595
|
}
|
|
721
596
|
function shared$factory() {
|
|
722
597
|
return getPropertyCallableRef('shared', 1, KProperty1, function (receiver) {
|
|
723
|
-
return receiver.
|
|
598
|
+
return receiver.e26();
|
|
724
599
|
}, null);
|
|
725
600
|
}
|
|
726
601
|
function strict$factory() {
|
|
727
602
|
return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) {
|
|
728
|
-
return receiver.
|
|
603
|
+
return receiver.y4d();
|
|
729
604
|
}, null);
|
|
730
605
|
}
|
|
731
|
-
function
|
|
732
|
-
return getPropertyCallableRef('
|
|
733
|
-
return receiver.
|
|
606
|
+
function input$factory_0() {
|
|
607
|
+
return getPropertyCallableRef('input', 1, KProperty1, function (receiver) {
|
|
608
|
+
return receiver.u4d();
|
|
734
609
|
}, null);
|
|
735
610
|
}
|
|
736
|
-
function
|
|
737
|
-
return getPropertyCallableRef('
|
|
738
|
-
return receiver.
|
|
611
|
+
function output$factory_0() {
|
|
612
|
+
return getPropertyCallableRef('output', 1, KProperty1, function (receiver) {
|
|
613
|
+
return receiver.n2k();
|
|
739
614
|
}, null);
|
|
740
615
|
}
|
|
741
616
|
function packageName$factory_0() {
|
|
742
617
|
return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) {
|
|
743
|
-
return receiver.
|
|
618
|
+
return receiver.v4d();
|
|
744
619
|
}, null);
|
|
745
620
|
}
|
|
746
621
|
function logLevel$factory_0() {
|
|
747
622
|
return getPropertyCallableRef('logLevel', 1, KProperty1, function (receiver) {
|
|
748
|
-
return receiver.
|
|
623
|
+
return receiver.w4d();
|
|
749
624
|
}, null);
|
|
750
625
|
}
|
|
751
626
|
function shared$factory_0() {
|
|
752
627
|
return getPropertyCallableRef('shared', 1, KProperty1, function (receiver) {
|
|
753
|
-
return receiver.
|
|
628
|
+
return receiver.e26();
|
|
754
629
|
}, null);
|
|
755
630
|
}
|
|
756
631
|
function strict$factory_0() {
|
|
757
632
|
return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) {
|
|
758
|
-
return receiver.
|
|
633
|
+
return receiver.y4d();
|
|
759
634
|
}, null);
|
|
760
635
|
}
|
|
761
|
-
function compile_0(arguments_0) {
|
|
762
|
-
var context = compile$lambda(arguments_0);
|
|
763
|
-
// Inline function 'arrow.core.NonEmptySet.flatMap' call
|
|
764
|
-
var this_0 = arguments_0.i2c_1;
|
|
765
|
-
// Inline function 'kotlin.collections.flatMap' call
|
|
766
|
-
var tmp0 = _NonEmptySet___get_elements__impl__g09gj9(this_0);
|
|
767
|
-
// Inline function 'kotlin.collections.flatMapTo' call
|
|
768
|
-
var destination = ArrayList_init_$Create$();
|
|
769
|
-
var _iterator__ex2g4s = tmp0.g();
|
|
770
|
-
while (_iterator__ex2g4s.h()) {
|
|
771
|
-
var element = _iterator__ex2g4s.i();
|
|
772
|
-
// Inline function 'community.flock.wirespec.plugin.cli.compile.<anonymous>' call
|
|
773
|
-
var list = wirespec(context(element, arguments_0.j2c_1));
|
|
774
|
-
addAll(destination, list);
|
|
775
|
-
}
|
|
776
|
-
// Inline function 'kotlin.let' call
|
|
777
|
-
// Inline function 'community.flock.wirespec.plugin.cli.compile.<anonymous>' call
|
|
778
|
-
var it = ensureNotNull(toNonEmptyListOrNull(destination));
|
|
779
|
-
// Inline function 'arrow.core.raise.either' call
|
|
780
|
-
// Inline function 'arrow.core.raise.fold' call
|
|
781
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
782
|
-
// Inline function 'arrow.core.raise.fold' call
|
|
783
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
784
|
-
var raise = new DefaultRaise(false);
|
|
785
|
-
var tmp;
|
|
786
|
-
try {
|
|
787
|
-
// Inline function 'arrow.core.raise.either.<anonymous>' call
|
|
788
|
-
// Inline function 'community.flock.wirespec.plugin.cli.compile.<anonymous>.<anonymous>' call
|
|
789
|
-
var res = raise.ml(it);
|
|
790
|
-
raise.il();
|
|
791
|
-
// Inline function 'arrow.core.raise.either.<anonymous>' call
|
|
792
|
-
tmp = new Right(res);
|
|
793
|
-
} catch ($p) {
|
|
794
|
-
var tmp_0;
|
|
795
|
-
if ($p instanceof RaiseCancellationException) {
|
|
796
|
-
var e = $p;
|
|
797
|
-
raise.il();
|
|
798
|
-
// Inline function 'arrow.core.raise.either.<anonymous>' call
|
|
799
|
-
var it_0 = raisedOrRethrow(e, raise);
|
|
800
|
-
tmp_0 = new Left(it_0);
|
|
801
|
-
} else {
|
|
802
|
-
if ($p instanceof Error) {
|
|
803
|
-
var e_0 = $p;
|
|
804
|
-
raise.il();
|
|
805
|
-
throw nonFatalOrThrow(e_0);
|
|
806
|
-
} else {
|
|
807
|
-
throw $p;
|
|
808
|
-
}
|
|
809
|
-
}
|
|
810
|
-
tmp = tmp_0;
|
|
811
|
-
}
|
|
812
|
-
// Inline function 'kotlin.let' call
|
|
813
|
-
// Inline function 'community.flock.wirespec.plugin.cli.compile.<anonymous>' call
|
|
814
|
-
var either = tmp;
|
|
815
|
-
if (either instanceof Right) {
|
|
816
|
-
// Inline function 'arrow.core.NonEmptyList.flatMap' call
|
|
817
|
-
var this_1 = either.pk_1;
|
|
818
|
-
// Inline function 'community.flock.wirespec.plugin.cli.compile.<anonymous>.<anonymous>' call
|
|
819
|
-
var destruct = this_1.uk_1;
|
|
820
|
-
var file = destruct.yd();
|
|
821
|
-
var results = destruct.zd();
|
|
822
|
-
// Inline function 'arrow.core.NonEmptyList.map' call
|
|
823
|
-
// Inline function 'community.flock.wirespec.plugin.cli.compile.<anonymous>.<anonymous>.<anonymous>' call
|
|
824
|
-
var destruct_0 = results.uk_1;
|
|
825
|
-
var name = destruct_0.yd();
|
|
826
|
-
var result = destruct_0.zd();
|
|
827
|
-
var tmp_1 = to(file.p2d(_FileName___init__impl__nzn12e(name)), result);
|
|
828
|
-
// Inline function 'kotlin.collections.map' call
|
|
829
|
-
var this_2 = results.vk_1;
|
|
830
|
-
// Inline function 'kotlin.collections.mapTo' call
|
|
831
|
-
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
|
|
832
|
-
var _iterator__ex2g4s_0 = this_2.g();
|
|
833
|
-
while (_iterator__ex2g4s_0.h()) {
|
|
834
|
-
var item = _iterator__ex2g4s_0.i();
|
|
835
|
-
// Inline function 'community.flock.wirespec.plugin.cli.compile.<anonymous>.<anonymous>.<anonymous>' call
|
|
836
|
-
var name_0 = item.yd();
|
|
837
|
-
var result_0 = item.zd();
|
|
838
|
-
var tmp$ret$14 = to(file.p2d(_FileName___init__impl__nzn12e(name_0)), result_0);
|
|
839
|
-
destination_0.e(tmp$ret$14);
|
|
840
|
-
}
|
|
841
|
-
var tmp_2 = (new NonEmptyList(tmp_1, destination_0)).sk();
|
|
842
|
-
// Inline function 'kotlin.collections.flatMap' call
|
|
843
|
-
var tmp0_0 = this_1.vk_1;
|
|
844
|
-
// Inline function 'kotlin.collections.flatMapTo' call
|
|
845
|
-
var destination_1 = ArrayList_init_$Create$();
|
|
846
|
-
var _iterator__ex2g4s_1 = tmp0_0.g();
|
|
847
|
-
while (_iterator__ex2g4s_1.h()) {
|
|
848
|
-
var element_0 = _iterator__ex2g4s_1.i();
|
|
849
|
-
// Inline function 'community.flock.wirespec.plugin.cli.compile.<anonymous>.<anonymous>' call
|
|
850
|
-
var file_0 = element_0.yd();
|
|
851
|
-
var results_0 = element_0.zd();
|
|
852
|
-
// Inline function 'arrow.core.NonEmptyList.map' call
|
|
853
|
-
// Inline function 'community.flock.wirespec.plugin.cli.compile.<anonymous>.<anonymous>.<anonymous>' call
|
|
854
|
-
var destruct_1 = results_0.uk_1;
|
|
855
|
-
var name_1 = destruct_1.yd();
|
|
856
|
-
var result_1 = destruct_1.zd();
|
|
857
|
-
var tmp_3 = to(file_0.p2d(_FileName___init__impl__nzn12e(name_1)), result_1);
|
|
858
|
-
// Inline function 'kotlin.collections.map' call
|
|
859
|
-
var this_3 = results_0.vk_1;
|
|
860
|
-
// Inline function 'kotlin.collections.mapTo' call
|
|
861
|
-
var destination_2 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_3, 10));
|
|
862
|
-
var _iterator__ex2g4s_2 = this_3.g();
|
|
863
|
-
while (_iterator__ex2g4s_2.h()) {
|
|
864
|
-
var item_0 = _iterator__ex2g4s_2.i();
|
|
865
|
-
// Inline function 'community.flock.wirespec.plugin.cli.compile.<anonymous>.<anonymous>.<anonymous>' call
|
|
866
|
-
var name_2 = item_0.yd();
|
|
867
|
-
var result_2 = item_0.zd();
|
|
868
|
-
var tmp$ret$20 = to(file_0.p2d(_FileName___init__impl__nzn12e(name_2)), result_2);
|
|
869
|
-
destination_2.e(tmp$ret$20);
|
|
870
|
-
}
|
|
871
|
-
var list_0 = new NonEmptyList(tmp_3, destination_2);
|
|
872
|
-
addAll(destination_1, list_0);
|
|
873
|
-
}
|
|
874
|
-
// Inline function 'kotlin.collections.forEach' call
|
|
875
|
-
var _iterator__ex2g4s_3 = tmp_2.zk(destination_1).g();
|
|
876
|
-
while (_iterator__ex2g4s_3.h()) {
|
|
877
|
-
var element_1 = _iterator__ex2g4s_3.i();
|
|
878
|
-
// Inline function 'community.flock.wirespec.plugin.cli.compile.<anonymous>.<anonymous>' call
|
|
879
|
-
var file_1 = element_1.yd();
|
|
880
|
-
var result_3 = element_1.zd();
|
|
881
|
-
arguments_0.l2c_1(file_1, result_3);
|
|
882
|
-
}
|
|
883
|
-
} else {
|
|
884
|
-
if (either instanceof Left) {
|
|
885
|
-
arguments_0.m2c_1(joinToString(either.jk_1, VOID, VOID, VOID, VOID, VOID, compile$lambda_0));
|
|
886
|
-
} else {
|
|
887
|
-
noWhenBranchMatchedException();
|
|
888
|
-
}
|
|
889
|
-
}
|
|
890
|
-
return Unit_instance;
|
|
891
|
-
}
|
|
892
|
-
function wirespec(_this__u8e3s4) {
|
|
893
|
-
// Inline function 'arrow.core.NonEmptyList.map' call
|
|
894
|
-
var this_0 = emitters(_this__u8e3s4.e4d(), _this__u8e3s4.y4b(), _this__u8e3s4.l2g());
|
|
895
|
-
// Inline function 'community.flock.wirespec.plugin.cli.wirespec.<anonymous>' call
|
|
896
|
-
var destruct = this_0.uk_1;
|
|
897
|
-
var emitter = destruct.yd();
|
|
898
|
-
var file = destruct.zd();
|
|
899
|
-
var errorOrResults = compile(new wirespec$1(_this__u8e3s4, emitter), _this__u8e3s4.s1b());
|
|
900
|
-
var tmp;
|
|
901
|
-
if (emitter.j23_1) {
|
|
902
|
-
// Inline function 'arrow.core.Either.map' call
|
|
903
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
904
|
-
// Inline function 'arrow.core.flatMap' call
|
|
905
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
906
|
-
var tmp_0;
|
|
907
|
-
if (errorOrResults instanceof Right) {
|
|
908
|
-
// Inline function 'arrow.core.Either.map.<anonymous>' call
|
|
909
|
-
// Inline function 'community.flock.wirespec.plugin.cli.wirespec.<anonymous>.<anonymous>' call
|
|
910
|
-
var it = errorOrResults.pk_1;
|
|
911
|
-
var tmp$ret$0 = to(file, it);
|
|
912
|
-
tmp_0 = new Right(tmp$ret$0);
|
|
913
|
-
} else {
|
|
914
|
-
if (errorOrResults instanceof Left) {
|
|
915
|
-
tmp_0 = errorOrResults;
|
|
916
|
-
} else {
|
|
917
|
-
noWhenBranchMatchedException();
|
|
918
|
-
}
|
|
919
|
-
}
|
|
920
|
-
tmp = tmp_0;
|
|
921
|
-
} else {
|
|
922
|
-
// Inline function 'arrow.core.Either.map' call
|
|
923
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
924
|
-
// Inline function 'arrow.core.flatMap' call
|
|
925
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
926
|
-
var tmp_1;
|
|
927
|
-
if (errorOrResults instanceof Right) {
|
|
928
|
-
// Inline function 'arrow.core.Either.map.<anonymous>' call
|
|
929
|
-
// Inline function 'community.flock.wirespec.plugin.cli.wirespec.<anonymous>.<anonymous>' call
|
|
930
|
-
var it_0 = errorOrResults.pk_1;
|
|
931
|
-
var tmp$ret$4 = to(file, nonEmptyListOf(new Emitted(Companion_getInstance().c25(_FileName___get_value__impl__3u4cz6(_this__u8e3s4.l2g()(FileExtension_Wirespec_getInstance()).k2d_1)), first_0(it_0).n26_1), []));
|
|
932
|
-
tmp_1 = new Right(tmp$ret$4);
|
|
933
|
-
} else {
|
|
934
|
-
if (errorOrResults instanceof Left) {
|
|
935
|
-
tmp_1 = errorOrResults;
|
|
936
|
-
} else {
|
|
937
|
-
noWhenBranchMatchedException();
|
|
938
|
-
}
|
|
939
|
-
}
|
|
940
|
-
tmp = tmp_1;
|
|
941
|
-
}
|
|
942
|
-
// Inline function 'arrow.core.Either.map' call
|
|
943
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
944
|
-
// Inline function 'arrow.core.flatMap' call
|
|
945
|
-
var this_1 = tmp;
|
|
946
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
947
|
-
var tmp_2;
|
|
948
|
-
if (this_1 instanceof Right) {
|
|
949
|
-
// Inline function 'arrow.core.Either.map.<anonymous>' call
|
|
950
|
-
// Inline function 'community.flock.wirespec.plugin.cli.wirespec.<anonymous>.stub_for_inlining' call
|
|
951
|
-
var p0 = this_1.pk_1;
|
|
952
|
-
var tmp$ret$8 = WirespecResult_init_$Create$(p0);
|
|
953
|
-
tmp_2 = new Right(tmp$ret$8);
|
|
954
|
-
} else {
|
|
955
|
-
if (this_1 instanceof Left) {
|
|
956
|
-
tmp_2 = this_1;
|
|
957
|
-
} else {
|
|
958
|
-
noWhenBranchMatchedException();
|
|
959
|
-
}
|
|
960
|
-
}
|
|
961
|
-
var tmp_3 = tmp_2;
|
|
962
|
-
// Inline function 'kotlin.collections.map' call
|
|
963
|
-
var this_2 = this_0.vk_1;
|
|
964
|
-
// Inline function 'kotlin.collections.mapTo' call
|
|
965
|
-
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
|
|
966
|
-
var _iterator__ex2g4s = this_2.g();
|
|
967
|
-
while (_iterator__ex2g4s.h()) {
|
|
968
|
-
var item = _iterator__ex2g4s.i();
|
|
969
|
-
// Inline function 'community.flock.wirespec.plugin.cli.wirespec.<anonymous>' call
|
|
970
|
-
var emitter_0 = item.yd();
|
|
971
|
-
var file_0 = item.zd();
|
|
972
|
-
var errorOrResults_0 = compile(new wirespec$1(_this__u8e3s4, emitter_0), _this__u8e3s4.s1b());
|
|
973
|
-
var tmp_4;
|
|
974
|
-
if (emitter_0.j23_1) {
|
|
975
|
-
// Inline function 'arrow.core.Either.map' call
|
|
976
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
977
|
-
// Inline function 'arrow.core.flatMap' call
|
|
978
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
979
|
-
var tmp_5;
|
|
980
|
-
if (errorOrResults_0 instanceof Right) {
|
|
981
|
-
// Inline function 'arrow.core.Either.map.<anonymous>' call
|
|
982
|
-
// Inline function 'community.flock.wirespec.plugin.cli.wirespec.<anonymous>.<anonymous>' call
|
|
983
|
-
var it_1 = errorOrResults_0.pk_1;
|
|
984
|
-
var tmp$ret$13 = to(file_0, it_1);
|
|
985
|
-
tmp_5 = new Right(tmp$ret$13);
|
|
986
|
-
} else {
|
|
987
|
-
if (errorOrResults_0 instanceof Left) {
|
|
988
|
-
tmp_5 = errorOrResults_0;
|
|
989
|
-
} else {
|
|
990
|
-
noWhenBranchMatchedException();
|
|
991
|
-
}
|
|
992
|
-
}
|
|
993
|
-
tmp_4 = tmp_5;
|
|
994
|
-
} else {
|
|
995
|
-
// Inline function 'arrow.core.Either.map' call
|
|
996
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
997
|
-
// Inline function 'arrow.core.flatMap' call
|
|
998
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
999
|
-
var tmp_6;
|
|
1000
|
-
if (errorOrResults_0 instanceof Right) {
|
|
1001
|
-
// Inline function 'arrow.core.Either.map.<anonymous>' call
|
|
1002
|
-
// Inline function 'community.flock.wirespec.plugin.cli.wirespec.<anonymous>.<anonymous>' call
|
|
1003
|
-
var it_2 = errorOrResults_0.pk_1;
|
|
1004
|
-
var tmp$ret$17 = to(file_0, nonEmptyListOf(new Emitted(Companion_getInstance().c25(_FileName___get_value__impl__3u4cz6(_this__u8e3s4.l2g()(FileExtension_Wirespec_getInstance()).k2d_1)), first_0(it_2).n26_1), []));
|
|
1005
|
-
tmp_6 = new Right(tmp$ret$17);
|
|
1006
|
-
} else {
|
|
1007
|
-
if (errorOrResults_0 instanceof Left) {
|
|
1008
|
-
tmp_6 = errorOrResults_0;
|
|
1009
|
-
} else {
|
|
1010
|
-
noWhenBranchMatchedException();
|
|
1011
|
-
}
|
|
1012
|
-
}
|
|
1013
|
-
tmp_4 = tmp_6;
|
|
1014
|
-
}
|
|
1015
|
-
// Inline function 'arrow.core.Either.map' call
|
|
1016
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
1017
|
-
// Inline function 'arrow.core.flatMap' call
|
|
1018
|
-
var this_3 = tmp_4;
|
|
1019
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
1020
|
-
var tmp_7;
|
|
1021
|
-
if (this_3 instanceof Right) {
|
|
1022
|
-
// Inline function 'arrow.core.Either.map.<anonymous>' call
|
|
1023
|
-
// Inline function 'community.flock.wirespec.plugin.cli.wirespec.<anonymous>.stub_for_inlining' call
|
|
1024
|
-
var p0_0 = this_3.pk_1;
|
|
1025
|
-
var tmp$ret$21 = WirespecResult_init_$Create$(p0_0);
|
|
1026
|
-
tmp_7 = new Right(tmp$ret$21);
|
|
1027
|
-
} else {
|
|
1028
|
-
if (this_3 instanceof Left) {
|
|
1029
|
-
tmp_7 = this_3;
|
|
1030
|
-
} else {
|
|
1031
|
-
noWhenBranchMatchedException();
|
|
1032
|
-
}
|
|
1033
|
-
}
|
|
1034
|
-
var tmp$ret$25 = tmp_7;
|
|
1035
|
-
destination.e(tmp$ret$25);
|
|
1036
|
-
}
|
|
1037
|
-
return new NonEmptyList(tmp_3, destination);
|
|
1038
|
-
}
|
|
1039
|
-
function compile$context$1$1($arguments, $file, $output) {
|
|
1040
|
-
this.j4d_1 = $arguments;
|
|
1041
|
-
this.k4d_1 = $file;
|
|
1042
|
-
this.f4d_1 = $arguments.n2c_1;
|
|
1043
|
-
var tmp = this;
|
|
1044
|
-
var tmp0_elvis_lhs = $arguments.o2c_1;
|
|
1045
|
-
tmp.g4d_1 = tmp0_elvis_lhs == null ? new PackageName('community.flock.wirespec.generated') : tmp0_elvis_lhs;
|
|
1046
|
-
this.h4d_1 = out($file, $arguments.o2c_1, $output);
|
|
1047
|
-
this.i4d_1 = new Logger($arguments.p2c_1);
|
|
1048
|
-
}
|
|
1049
|
-
protoOf(compile$context$1$1).e4d = function () {
|
|
1050
|
-
return this.f4d_1;
|
|
1051
|
-
};
|
|
1052
|
-
protoOf(compile$context$1$1).y4b = function () {
|
|
1053
|
-
return this.g4d_1;
|
|
1054
|
-
};
|
|
1055
|
-
protoOf(compile$context$1$1).l2g = function () {
|
|
1056
|
-
return this.h4d_1;
|
|
1057
|
-
};
|
|
1058
|
-
protoOf(compile$context$1$1).y22 = function () {
|
|
1059
|
-
return this.i4d_1;
|
|
1060
|
-
};
|
|
1061
|
-
protoOf(compile$context$1$1).s1b = function () {
|
|
1062
|
-
return this.j4d_1.k2c_1(this.k4d_1);
|
|
1063
|
-
};
|
|
1064
|
-
function compile$lambda($arguments) {
|
|
1065
|
-
return function (file, output) {
|
|
1066
|
-
return new compile$context$1$1($arguments, file, output);
|
|
1067
|
-
};
|
|
1068
|
-
}
|
|
1069
|
-
function compile$lambda_0(it) {
|
|
1070
|
-
return it.g9();
|
|
1071
|
-
}
|
|
1072
|
-
function wirespec$1($this_wirespec, $emitter) {
|
|
1073
|
-
this.l4d_1 = $this_wirespec.y22();
|
|
1074
|
-
this.m4d_1 = $emitter;
|
|
1075
|
-
}
|
|
1076
|
-
protoOf(wirespec$1).y22 = function () {
|
|
1077
|
-
return this.l4d_1;
|
|
1078
|
-
};
|
|
1079
|
-
protoOf(wirespec$1).i23 = function () {
|
|
1080
|
-
return this.m4d_1;
|
|
1081
|
-
};
|
|
1082
|
-
function convert(arguments_0) {
|
|
1083
|
-
var packageName = arguments_0.z2c_1;
|
|
1084
|
-
var jsonFile = arguments_0.t2c_1;
|
|
1085
|
-
var tmp;
|
|
1086
|
-
switch (arguments_0.s2c_1.p2_1) {
|
|
1087
|
-
case 0:
|
|
1088
|
-
tmp = OpenAPIV2Parser$parse$ref(OpenAPIV2Parser_instance);
|
|
1089
|
-
break;
|
|
1090
|
-
case 1:
|
|
1091
|
-
tmp = OpenAPIV3Parser$parse$ref(OpenAPIV3Parser_instance);
|
|
1092
|
-
break;
|
|
1093
|
-
case 2:
|
|
1094
|
-
tmp = AvroParser$parse$ref(AvroParser_instance);
|
|
1095
|
-
break;
|
|
1096
|
-
default:
|
|
1097
|
-
noWhenBranchMatchedException();
|
|
1098
|
-
break;
|
|
1099
|
-
}
|
|
1100
|
-
var ast = tmp(arguments_0.v2c_1(jsonFile), arguments_0.c2d_1);
|
|
1101
|
-
var path = out(jsonFile, packageName, arguments_0.u2c_1);
|
|
1102
|
-
// Inline function 'arrow.core.NonEmptyList.map' call
|
|
1103
|
-
var this_0 = emitters(arguments_0.y2c_1, packageName == null ? new PackageName('community.flock.wirespec.generated') : packageName, path);
|
|
1104
|
-
// Inline function 'community.flock.wirespec.plugin.cli.convert.<anonymous>' call
|
|
1105
|
-
var destruct = this_0.uk_1;
|
|
1106
|
-
var emitter = destruct.yd();
|
|
1107
|
-
var file = destruct.zd();
|
|
1108
|
-
var results = emitter.k23(ast, new Logger(arguments_0.a2d_1));
|
|
1109
|
-
var tmp_0;
|
|
1110
|
-
if (emitter.j23_1) {
|
|
1111
|
-
tmp_0 = to(file, results);
|
|
1112
|
-
} else {
|
|
1113
|
-
// Inline function 'kotlin.text.replaceFirstChar' call
|
|
1114
|
-
var this_1 = _FileName___get_value__impl__3u4cz6(jsonFile.o2d_1.k2d_1);
|
|
1115
|
-
var tmp_1;
|
|
1116
|
-
// Inline function 'kotlin.text.isNotEmpty' call
|
|
1117
|
-
if (charSequenceLength(this_1) > 0) {
|
|
1118
|
-
// Inline function 'community.flock.wirespec.plugin.cli.convert.<anonymous>.stub_for_inlining' call
|
|
1119
|
-
// Inline function 'kotlin.text.uppercase' call
|
|
1120
|
-
var this_2 = charSequenceGet(this_1, 0);
|
|
1121
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
1122
|
-
// Inline function 'kotlin.js.unsafeCast' call
|
|
1123
|
-
var tmp$ret$4 = toString_0(this_2).toUpperCase();
|
|
1124
|
-
var tmp_2 = toString(tmp$ret$4);
|
|
1125
|
-
// Inline function 'kotlin.text.substring' call
|
|
1126
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
1127
|
-
tmp_1 = tmp_2 + this_1.substring(1);
|
|
1128
|
-
} else {
|
|
1129
|
-
tmp_1 = this_1;
|
|
1130
|
-
}
|
|
1131
|
-
var tmp$ret$7 = tmp_1;
|
|
1132
|
-
tmp_0 = to(file, nonEmptyListOf(new Emitted(tmp$ret$7, first_0(results).n26_1), []));
|
|
1133
|
-
}
|
|
1134
|
-
// Inline function 'kotlin.let' call
|
|
1135
|
-
// Inline function 'community.flock.wirespec.plugin.cli.convert.<anonymous>.stub_for_inlining' call
|
|
1136
|
-
var p0 = tmp_0;
|
|
1137
|
-
var tmp_3 = WirespecResult_init_$Create$(p0);
|
|
1138
|
-
// Inline function 'kotlin.collections.map' call
|
|
1139
|
-
var this_3 = this_0.vk_1;
|
|
1140
|
-
// Inline function 'kotlin.collections.mapTo' call
|
|
1141
|
-
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_3, 10));
|
|
1142
|
-
var _iterator__ex2g4s = this_3.g();
|
|
1143
|
-
while (_iterator__ex2g4s.h()) {
|
|
1144
|
-
var item = _iterator__ex2g4s.i();
|
|
1145
|
-
// Inline function 'community.flock.wirespec.plugin.cli.convert.<anonymous>' call
|
|
1146
|
-
var emitter_0 = item.yd();
|
|
1147
|
-
var file_0 = item.zd();
|
|
1148
|
-
var results_0 = emitter_0.k23(ast, new Logger(arguments_0.a2d_1));
|
|
1149
|
-
var tmp_4;
|
|
1150
|
-
if (emitter_0.j23_1) {
|
|
1151
|
-
tmp_4 = to(file_0, results_0);
|
|
1152
|
-
} else {
|
|
1153
|
-
// Inline function 'kotlin.text.replaceFirstChar' call
|
|
1154
|
-
var this_4 = _FileName___get_value__impl__3u4cz6(jsonFile.o2d_1.k2d_1);
|
|
1155
|
-
var tmp_5;
|
|
1156
|
-
// Inline function 'kotlin.text.isNotEmpty' call
|
|
1157
|
-
if (charSequenceLength(this_4) > 0) {
|
|
1158
|
-
// Inline function 'community.flock.wirespec.plugin.cli.convert.<anonymous>.stub_for_inlining' call
|
|
1159
|
-
// Inline function 'kotlin.text.uppercase' call
|
|
1160
|
-
var this_5 = charSequenceGet(this_4, 0);
|
|
1161
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
1162
|
-
// Inline function 'kotlin.js.unsafeCast' call
|
|
1163
|
-
var tmp$ret$15 = toString_0(this_5).toUpperCase();
|
|
1164
|
-
var tmp_6 = toString(tmp$ret$15);
|
|
1165
|
-
// Inline function 'kotlin.text.substring' call
|
|
1166
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
1167
|
-
tmp_5 = tmp_6 + this_4.substring(1);
|
|
1168
|
-
} else {
|
|
1169
|
-
tmp_5 = this_4;
|
|
1170
|
-
}
|
|
1171
|
-
var tmp$ret$18 = tmp_5;
|
|
1172
|
-
tmp_4 = to(file_0, nonEmptyListOf(new Emitted(tmp$ret$18, first_0(results_0).n26_1), []));
|
|
1173
|
-
}
|
|
1174
|
-
// Inline function 'kotlin.let' call
|
|
1175
|
-
// Inline function 'community.flock.wirespec.plugin.cli.convert.<anonymous>.stub_for_inlining' call
|
|
1176
|
-
var p0_0 = tmp_4;
|
|
1177
|
-
var tmp$ret$21 = WirespecResult_init_$Create$(p0_0);
|
|
1178
|
-
destination.e(tmp$ret$21);
|
|
1179
|
-
}
|
|
1180
|
-
// Inline function 'arrow.core.NonEmptyList.flatMap' call
|
|
1181
|
-
var this_6 = new NonEmptyList(tmp_3, destination);
|
|
1182
|
-
// Inline function 'community.flock.wirespec.plugin.cli.convert.<anonymous>' call
|
|
1183
|
-
var destruct_0 = this_6.uk_1;
|
|
1184
|
-
var file_1 = destruct_0.yd();
|
|
1185
|
-
var results_1 = destruct_0.zd();
|
|
1186
|
-
// Inline function 'arrow.core.NonEmptyList.map' call
|
|
1187
|
-
// Inline function 'community.flock.wirespec.plugin.cli.convert.<anonymous>.<anonymous>' call
|
|
1188
|
-
var destruct_1 = results_1.uk_1;
|
|
1189
|
-
var name = destruct_1.yd();
|
|
1190
|
-
var result = destruct_1.zd();
|
|
1191
|
-
var tmp_7 = to(file_1.p2d(_FileName___init__impl__nzn12e(name)), result);
|
|
1192
|
-
// Inline function 'kotlin.collections.map' call
|
|
1193
|
-
var this_7 = results_1.vk_1;
|
|
1194
|
-
// Inline function 'kotlin.collections.mapTo' call
|
|
1195
|
-
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_7, 10));
|
|
1196
|
-
var _iterator__ex2g4s_0 = this_7.g();
|
|
1197
|
-
while (_iterator__ex2g4s_0.h()) {
|
|
1198
|
-
var item_0 = _iterator__ex2g4s_0.i();
|
|
1199
|
-
// Inline function 'community.flock.wirespec.plugin.cli.convert.<anonymous>.<anonymous>' call
|
|
1200
|
-
var name_0 = item_0.yd();
|
|
1201
|
-
var result_0 = item_0.zd();
|
|
1202
|
-
var tmp$ret$26 = to(file_1.p2d(_FileName___init__impl__nzn12e(name_0)), result_0);
|
|
1203
|
-
destination_0.e(tmp$ret$26);
|
|
1204
|
-
}
|
|
1205
|
-
var tmp_8 = (new NonEmptyList(tmp_7, destination_0)).sk();
|
|
1206
|
-
// Inline function 'kotlin.collections.flatMap' call
|
|
1207
|
-
var tmp0 = this_6.vk_1;
|
|
1208
|
-
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1209
|
-
var destination_1 = ArrayList_init_$Create$();
|
|
1210
|
-
var _iterator__ex2g4s_1 = tmp0.g();
|
|
1211
|
-
while (_iterator__ex2g4s_1.h()) {
|
|
1212
|
-
var element = _iterator__ex2g4s_1.i();
|
|
1213
|
-
// Inline function 'community.flock.wirespec.plugin.cli.convert.<anonymous>' call
|
|
1214
|
-
var file_2 = element.yd();
|
|
1215
|
-
var results_2 = element.zd();
|
|
1216
|
-
// Inline function 'arrow.core.NonEmptyList.map' call
|
|
1217
|
-
// Inline function 'community.flock.wirespec.plugin.cli.convert.<anonymous>.<anonymous>' call
|
|
1218
|
-
var destruct_2 = results_2.uk_1;
|
|
1219
|
-
var name_1 = destruct_2.yd();
|
|
1220
|
-
var result_1 = destruct_2.zd();
|
|
1221
|
-
var tmp_9 = to(file_2.p2d(_FileName___init__impl__nzn12e(name_1)), result_1);
|
|
1222
|
-
// Inline function 'kotlin.collections.map' call
|
|
1223
|
-
var this_8 = results_2.vk_1;
|
|
1224
|
-
// Inline function 'kotlin.collections.mapTo' call
|
|
1225
|
-
var destination_2 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_8, 10));
|
|
1226
|
-
var _iterator__ex2g4s_2 = this_8.g();
|
|
1227
|
-
while (_iterator__ex2g4s_2.h()) {
|
|
1228
|
-
var item_1 = _iterator__ex2g4s_2.i();
|
|
1229
|
-
// Inline function 'community.flock.wirespec.plugin.cli.convert.<anonymous>.<anonymous>' call
|
|
1230
|
-
var name_2 = item_1.yd();
|
|
1231
|
-
var result_2 = item_1.zd();
|
|
1232
|
-
var tmp$ret$32 = to(file_2.p2d(_FileName___init__impl__nzn12e(name_2)), result_2);
|
|
1233
|
-
destination_2.e(tmp$ret$32);
|
|
1234
|
-
}
|
|
1235
|
-
var list = new NonEmptyList(tmp_9, destination_2);
|
|
1236
|
-
addAll(destination_1, list);
|
|
1237
|
-
}
|
|
1238
|
-
var _iterator__ex2g4s_3 = tmp_8.zk(destination_1).g();
|
|
1239
|
-
while (_iterator__ex2g4s_3.h()) {
|
|
1240
|
-
var element_0 = _iterator__ex2g4s_3.i();
|
|
1241
|
-
// Inline function 'community.flock.wirespec.plugin.cli.convert.<anonymous>' call
|
|
1242
|
-
var file_3 = element_0.yd();
|
|
1243
|
-
var result_3 = element_0.zd();
|
|
1244
|
-
arguments_0.w2c_1(file_3, result_3);
|
|
1245
|
-
}
|
|
1246
|
-
return Unit_instance;
|
|
1247
|
-
}
|
|
1248
|
-
function OpenAPIV2Parser$parse$ref($boundThis) {
|
|
1249
|
-
var l = function (p0, p1) {
|
|
1250
|
-
return $boundThis.o2b(p0, p1);
|
|
1251
|
-
};
|
|
1252
|
-
l.callableName = 'parse';
|
|
1253
|
-
return l;
|
|
1254
|
-
}
|
|
1255
|
-
function OpenAPIV3Parser$parse$ref($boundThis) {
|
|
1256
|
-
var l = function (p0, p1) {
|
|
1257
|
-
return $boundThis.o2b(p0, p1);
|
|
1258
|
-
};
|
|
1259
|
-
l.callableName = 'parse';
|
|
1260
|
-
return l;
|
|
1261
|
-
}
|
|
1262
|
-
function AvroParser$parse$ref($boundThis) {
|
|
1263
|
-
var l = function (p0, p1) {
|
|
1264
|
-
return $boundThis.o2b(p0, p1);
|
|
1265
|
-
};
|
|
1266
|
-
l.callableName = 'parse';
|
|
1267
|
-
return l;
|
|
1268
|
-
}
|
|
1269
636
|
function main(args) {
|
|
1270
637
|
// Inline function 'kotlin.collections.mapNotNull' call
|
|
1271
638
|
var tmp0 = numberRangeToNumber(0, 20);
|
|
1272
639
|
// Inline function 'kotlin.collections.mapNotNullTo' call
|
|
1273
|
-
var destination = ArrayList_init_$Create$();
|
|
640
|
+
var destination = ArrayList_init_$Create$_0();
|
|
1274
641
|
// Inline function 'kotlin.collections.forEach' call
|
|
1275
642
|
var inductionVariable = tmp0.d1_1;
|
|
1276
643
|
var last = tmp0.e1_1;
|
|
@@ -1297,56 +664,11 @@ function main(args) {
|
|
|
1297
664
|
var tmp_0 = compile$ref();
|
|
1298
665
|
// Inline function 'kotlin.let' call
|
|
1299
666
|
// Inline function 'community.flock.wirespec.plugin.cli.main.stub_for_inlining' call
|
|
1300
|
-
tmp.
|
|
1301
|
-
}
|
|
1302
|
-
function out(_this__u8e3s4, packageName, output) {
|
|
1303
|
-
return out$lambda(output, packageName, _this__u8e3s4);
|
|
1304
|
-
}
|
|
1305
|
-
function emitters(_this__u8e3s4, packageName, path) {
|
|
1306
|
-
// Inline function 'arrow.core.NonEmptySet.map' call
|
|
1307
|
-
// Inline function 'kotlin.collections.map' call
|
|
1308
|
-
var this_0 = _NonEmptySet___get_elements__impl__g09gj9(_this__u8e3s4);
|
|
1309
|
-
// Inline function 'kotlin.collections.mapTo' call
|
|
1310
|
-
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
1311
|
-
var _iterator__ex2g4s = this_0.g();
|
|
1312
|
-
while (_iterator__ex2g4s.h()) {
|
|
1313
|
-
var item = _iterator__ex2g4s.i();
|
|
1314
|
-
// Inline function 'community.flock.wirespec.plugin.cli.emitters.<anonymous>' call
|
|
1315
|
-
var tmp;
|
|
1316
|
-
switch (item.p2_1) {
|
|
1317
|
-
case 0:
|
|
1318
|
-
tmp = to(new JavaEmitter(packageName), new JavaFile(path(FileExtension_Java_getInstance())));
|
|
1319
|
-
break;
|
|
1320
|
-
case 1:
|
|
1321
|
-
tmp = to(new KotlinEmitter(packageName), new KotlinFile(path(FileExtension_Kotlin_getInstance())));
|
|
1322
|
-
break;
|
|
1323
|
-
case 2:
|
|
1324
|
-
tmp = to(new ScalaEmitter(packageName), new ScalaFile(path(FileExtension_Scala_getInstance())));
|
|
1325
|
-
break;
|
|
1326
|
-
case 3:
|
|
1327
|
-
tmp = to(new TypeScriptEmitter(), new TypeScriptFile(path(FileExtension_TypeScript_getInstance())));
|
|
1328
|
-
break;
|
|
1329
|
-
case 4:
|
|
1330
|
-
tmp = to(new WirespecEmitter(), new WirespecFile(path(FileExtension_Wirespec_getInstance())));
|
|
1331
|
-
break;
|
|
1332
|
-
case 5:
|
|
1333
|
-
tmp = to(OpenAPIV2Emitter_getInstance(), new JsonFile(path(FileExtension_JSON_getInstance())));
|
|
1334
|
-
break;
|
|
1335
|
-
case 6:
|
|
1336
|
-
tmp = to(OpenAPIV3Emitter_getInstance(), new JsonFile(path(FileExtension_JSON_getInstance())));
|
|
1337
|
-
break;
|
|
1338
|
-
default:
|
|
1339
|
-
noWhenBranchMatchedException();
|
|
1340
|
-
break;
|
|
1341
|
-
}
|
|
1342
|
-
var tmp$ret$0 = tmp;
|
|
1343
|
-
destination.e(tmp$ret$0);
|
|
1344
|
-
}
|
|
1345
|
-
return ensureNotNull(toNonEmptyListOrNull(destination));
|
|
667
|
+
tmp.u4b(tmp_0, convert$ref()).p3z(tmp4);
|
|
1346
668
|
}
|
|
1347
669
|
function compile$ref() {
|
|
1348
670
|
var l = function (p0) {
|
|
1349
|
-
|
|
671
|
+
compile(p0);
|
|
1350
672
|
return Unit_instance;
|
|
1351
673
|
};
|
|
1352
674
|
l.callableName = 'compile';
|
|
@@ -1360,75 +682,63 @@ function convert$ref() {
|
|
|
1360
682
|
l.callableName = 'convert';
|
|
1361
683
|
return l;
|
|
1362
684
|
}
|
|
1363
|
-
function out$lambda($output, $packageName, $this_out) {
|
|
1364
|
-
return function (extension) {
|
|
1365
|
-
var tmp0_safe_receiver = $packageName;
|
|
1366
|
-
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.m28_1;
|
|
1367
|
-
// Inline function 'kotlin.collections.orEmpty' call
|
|
1368
|
-
var tmp0_elvis_lhs = tmp1_safe_receiver == null ? null : split(tmp1_safe_receiver, charArrayOf([_Char___init__impl__6a9atx(46)]));
|
|
1369
|
-
var tmp$ret$0 = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
|
|
1370
|
-
var dir = plus_0($output.e2d_1, '/' + joinToString(tmp$ret$0, '/'));
|
|
1371
|
-
return $this_out.o2d_1.n2d(dir, VOID, extension);
|
|
1372
|
-
};
|
|
1373
|
-
}
|
|
1374
685
|
function cli(args) {
|
|
1375
686
|
main(args);
|
|
1376
687
|
}
|
|
1377
688
|
function parser(source) {
|
|
1378
|
-
|
|
689
|
+
// Inline function 'arrow.core.getOrElse' call
|
|
690
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
691
|
+
// Inline function 'arrow.core.Either.fold' call
|
|
692
|
+
var this_0 = parse(new parser$1(), nonEmptyListOf(source, []));
|
|
693
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1379
694
|
var tmp;
|
|
1380
|
-
if (
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
1385
|
-
var destination = ArrayList_init_$Create$();
|
|
1386
|
-
var _iterator__ex2g4s = tmp0_safe_receiver.g();
|
|
1387
|
-
while (_iterator__ex2g4s.h()) {
|
|
1388
|
-
var element = _iterator__ex2g4s.i();
|
|
1389
|
-
if (!(element == null) ? isInterface(element, Definition) : false) {
|
|
1390
|
-
destination.e(element);
|
|
1391
|
-
}
|
|
1392
|
-
}
|
|
1393
|
-
tmp = destination;
|
|
1394
|
-
}
|
|
1395
|
-
var tmp1_safe_receiver = tmp;
|
|
1396
|
-
var tmp_0;
|
|
1397
|
-
if (tmp1_safe_receiver == null) {
|
|
1398
|
-
tmp_0 = null;
|
|
695
|
+
if (this_0 instanceof Right) {
|
|
696
|
+
// Inline function 'arrow.core.getOrElse.stub_for_inlining' call
|
|
697
|
+
// Inline function 'arrow.core.identity' call
|
|
698
|
+
tmp = this_0.pk_1;
|
|
1399
699
|
} else {
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
// Inline function 'community.flock.wirespec.plugin.cli.parser.<anonymous>' call
|
|
1407
|
-
var tmp$ret$2 = produce(item);
|
|
1408
|
-
destination_0.e(tmp$ret$2);
|
|
700
|
+
if (this_0 instanceof Left) {
|
|
701
|
+
var it = this_0.jk_1;
|
|
702
|
+
var message = 'Cannot parse source: ' + joinToString(it, VOID, VOID, VOID, VOID, VOID, parser$lambda);
|
|
703
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
704
|
+
} else {
|
|
705
|
+
noWhenBranchMatchedException();
|
|
1409
706
|
}
|
|
1410
|
-
tmp_0 = destination_0;
|
|
1411
707
|
}
|
|
1412
|
-
|
|
1413
|
-
var
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
708
|
+
// Inline function 'arrow.core.NonEmptyList.flatMap' call
|
|
709
|
+
var this_1 = tmp.n29_1;
|
|
710
|
+
// Inline function 'community.flock.wirespec.plugin.cli.parser.stub_for_inlining' call
|
|
711
|
+
var tmp_0 = this_1.uk_1.f27_1.sk();
|
|
712
|
+
// Inline function 'kotlin.collections.flatMap' call
|
|
713
|
+
var tmp0 = this_1.vk_1;
|
|
714
|
+
// Inline function 'kotlin.collections.flatMapTo' call
|
|
715
|
+
var destination = ArrayList_init_$Create$_0();
|
|
716
|
+
var _iterator__ex2g4s = tmp0.g();
|
|
717
|
+
while (_iterator__ex2g4s.h()) {
|
|
718
|
+
var element = _iterator__ex2g4s.i();
|
|
719
|
+
// Inline function 'community.flock.wirespec.plugin.cli.parser.stub_for_inlining' call
|
|
720
|
+
var list = element.f27_1;
|
|
721
|
+
addAll(destination, list);
|
|
1419
722
|
}
|
|
1420
|
-
|
|
1421
|
-
var
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
723
|
+
// Inline function 'kotlin.collections.map' call
|
|
724
|
+
var this_2 = tmp_0.zk(destination).yk();
|
|
725
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
726
|
+
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_2, 10));
|
|
727
|
+
var _iterator__ex2g4s_0 = this_2.g();
|
|
728
|
+
while (_iterator__ex2g4s_0.h()) {
|
|
729
|
+
var item = _iterator__ex2g4s_0.i();
|
|
730
|
+
// Inline function 'community.flock.wirespec.plugin.cli.parser.<anonymous>' call
|
|
731
|
+
var tmp$ret$9 = produce(item);
|
|
732
|
+
destination_0.e(tmp$ret$9);
|
|
1427
733
|
}
|
|
1428
|
-
|
|
734
|
+
// Inline function 'kotlin.collections.toTypedArray' call
|
|
735
|
+
return copyToArray(destination_0);
|
|
1429
736
|
}
|
|
1430
737
|
function parser$1() {
|
|
1431
738
|
}
|
|
739
|
+
function parser$lambda(e) {
|
|
740
|
+
return e.r1();
|
|
741
|
+
}
|
|
1432
742
|
function get_nodeArgs() {
|
|
1433
743
|
_init_properties_CommandLineArguments_kt__b5v7hl();
|
|
1434
744
|
return nodeArgs;
|
|
@@ -1441,7 +751,7 @@ function orNull(_this__u8e3s4, idx) {
|
|
|
1441
751
|
var tmp;
|
|
1442
752
|
try {
|
|
1443
753
|
// Inline function 'arrow.core.Companion.catch.<anonymous>' call
|
|
1444
|
-
// Inline function 'community.flock.wirespec.plugin.
|
|
754
|
+
// Inline function 'community.flock.wirespec.plugin.cli.orNull.<anonymous>' call
|
|
1445
755
|
var tmp$ret$0 = get_nodeArgs()[idx];
|
|
1446
756
|
tmp = right(tmp$ret$0);
|
|
1447
757
|
} catch ($p) {
|
|
@@ -1467,7 +777,6 @@ function _init_properties_CommandLineArguments_kt__b5v7hl() {
|
|
|
1467
777
|
}
|
|
1468
778
|
}
|
|
1469
779
|
//region block: post-declaration
|
|
1470
|
-
protoOf(wirespec$1).h23 = get_spec;
|
|
1471
780
|
protoOf(parser$1).h23 = get_spec;
|
|
1472
781
|
protoOf(parser$1).y22 = get_logger;
|
|
1473
782
|
//endregion
|