@flock/wirespec 0.9.23 → 0.9.25
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-annotations.js +1 -1
- package/arrow-arrow-atomic.js +17 -18
- package/arrow-arrow-atomic.js.map +1 -1
- package/arrow-arrow-continuations.js +4 -4
- package/arrow-arrow-core.js +96 -99
- package/arrow-arrow-core.js.map +1 -1
- package/clikt-clikt.js +2045 -2060
- package/clikt-clikt.js.map +1 -1
- package/colormath-root-colormath.js +552 -444
- package/colormath-root-colormath.js.map +1 -1
- package/kotlin-kotlin-stdlib.js +7798 -7841
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/{kotlin-kotlin-test-kotlin-test-js-ir.js → kotlin-kotlin-test.js} +3 -3
- package/kotlin-openapi-bindings.js +5331 -5326
- package/kotlin-openapi-bindings.js.map +1 -1
- package/kotlin-rgxgen.js +2051 -2052
- package/kotlin-rgxgen.js.map +1 -1
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core-js-ir.js +2151 -2187
- package/kotlinx-serialization-kotlinx-serialization-core-js-ir.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json-js-ir.js +1571 -1731
- package/kotlinx-serialization-kotlinx-serialization-json-js-ir.js.map +1 -1
- package/markdown.js +2308 -2317
- package/markdown.js.map +1 -1
- package/mordant-mordant.js +2405 -2492
- package/mordant-mordant.js.map +1 -1
- package/package.json +2 -2
- package/resources-library.js +1 -1
- package/wirespec-src-compiler-core.js +2578 -2457
- package/wirespec-src-compiler-core.js.map +1 -1
- package/wirespec-src-compiler-lib.js +733 -605
- package/wirespec-src-compiler-lib.js.map +1 -1
- package/wirespec-src-converter-openapi.js +1494 -1477
- package/wirespec-src-converter-openapi.js.map +1 -1
- package/wirespec-src-plugin-arguments.js +127 -124
- package/wirespec-src-plugin-arguments.js.map +1 -1
- package/wirespec-src-plugin-cli.js +236 -231
- package/wirespec-src-plugin-cli.js.map +1 -1
- package/wirespec-src-plugin-npm.d.ts +28 -9
- package/wirespec-src-plugin-npm.js +71 -71
- package/wirespec-src-plugin-npm.js.map +1 -1
- package/wirespec-src-tools-generator.js +176 -181
- package/wirespec-src-tools-generator.js.map +1 -1
- /package/{kotlin-kotlin-test-kotlin-test-js-ir.js.map → kotlin-kotlin-test.js.map} +0 -0
|
@@ -27,17 +27,16 @@
|
|
|
27
27
|
}
|
|
28
28
|
root['wirespec-src-plugin-cli'] = factory(typeof this['wirespec-src-plugin-cli'] === 'undefined' ? {} : this['wirespec-src-plugin-cli'], this['kotlin-kotlin-stdlib'], this['clikt-clikt'], this['wirespec-src-plugin-arguments'], this['wirespec-src-compiler-core'], this['wirespec-src-converter-openapi'], this['arrow-arrow-core'], this['wirespec-src-compiler-lib']);
|
|
29
29
|
}
|
|
30
|
-
}(
|
|
30
|
+
}(globalThis, function (_, kotlin_kotlin, kotlin_clikt_clikt, kotlin_community_flock_wirespec_plugin_arguments_arguments, kotlin_community_flock_wirespec_compiler_core, kotlin_community_flock_wirespec_converter_openapi, kotlin_io_arrow_kt_arrow_core, kotlin_community_flock_wirespec_compiler_lib) {
|
|
31
31
|
'use strict';
|
|
32
32
|
//region block: imports
|
|
33
33
|
var Unit_instance = kotlin_kotlin.$_$.i4;
|
|
34
34
|
var subcommands = kotlin_clikt_clikt.$_$.c;
|
|
35
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
36
|
-
var
|
|
37
|
-
var setMetadataFor = kotlin_kotlin.$_$.ra;
|
|
35
|
+
var protoOf = kotlin_kotlin.$_$.ta;
|
|
36
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.v9;
|
|
38
37
|
var NoOpCliktCommand = kotlin_clikt_clikt.$_$.b;
|
|
39
38
|
var VOID = kotlin_kotlin.$_$.g;
|
|
40
|
-
var
|
|
39
|
+
var initMetadataForClass = kotlin_kotlin.$_$.u9;
|
|
41
40
|
var option = kotlin_clikt_clikt.$_$.h;
|
|
42
41
|
var Companion_instance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.x;
|
|
43
42
|
var choice = kotlin_clikt_clikt.$_$.j;
|
|
@@ -50,7 +49,7 @@
|
|
|
50
49
|
var argument = kotlin_clikt_clikt.$_$.d;
|
|
51
50
|
var values = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.c;
|
|
52
51
|
var mapCapacity = kotlin_kotlin.$_$.g7;
|
|
53
|
-
var coerceAtLeast = kotlin_kotlin.$_$.
|
|
52
|
+
var coerceAtLeast = kotlin_kotlin.$_$.db;
|
|
54
53
|
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.t;
|
|
55
54
|
var choice_0 = kotlin_clikt_clikt.$_$.i;
|
|
56
55
|
var Language_Wirespec_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.p;
|
|
@@ -58,51 +57,50 @@
|
|
|
58
57
|
var Convert = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.g;
|
|
59
58
|
var setOf = kotlin_kotlin.$_$.s7;
|
|
60
59
|
var CliktCommand = kotlin_clikt_clikt.$_$.a;
|
|
61
|
-
var get_DEFAULT_PACKAGE_STRING = kotlin_community_flock_wirespec_compiler_core.$_$.a;
|
|
62
60
|
var default_0 = kotlin_clikt_clikt.$_$.e;
|
|
63
61
|
var flag = kotlin_clikt_clikt.$_$.f;
|
|
64
62
|
var Companion_instance_1 = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.w;
|
|
65
63
|
var FullDirPath = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.d;
|
|
66
64
|
var Console_instance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.v;
|
|
67
|
-
var toString = kotlin_kotlin.$_$.
|
|
65
|
+
var toString = kotlin_kotlin.$_$.xa;
|
|
68
66
|
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.n1;
|
|
69
|
-
var Enum = kotlin_kotlin.$_$.
|
|
70
|
-
var KProperty1 = kotlin_kotlin.$_$.
|
|
71
|
-
var getPropertyCallableRef = kotlin_kotlin.$_$.
|
|
72
|
-
var numberRangeToNumber = kotlin_kotlin.$_$.
|
|
67
|
+
var Enum = kotlin_kotlin.$_$.qe;
|
|
68
|
+
var KProperty1 = kotlin_kotlin.$_$.mb;
|
|
69
|
+
var getPropertyCallableRef = kotlin_kotlin.$_$.r9;
|
|
70
|
+
var numberRangeToNumber = kotlin_kotlin.$_$.oa;
|
|
73
71
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.l;
|
|
74
72
|
var copyToArray = kotlin_kotlin.$_$.v5;
|
|
75
73
|
var Logger = kotlin_community_flock_wirespec_compiler_core.$_$.g1;
|
|
74
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.vf;
|
|
76
75
|
var FileExtension_Wirespec_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.o;
|
|
77
76
|
var FullFilePath = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.e;
|
|
78
77
|
var Console = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.b;
|
|
79
78
|
var Compile = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.f;
|
|
80
|
-
var THROW_CCE = kotlin_kotlin.$_$.
|
|
79
|
+
var THROW_CCE = kotlin_kotlin.$_$.af;
|
|
81
80
|
var OpenApiV2Parser_instance = kotlin_community_flock_wirespec_converter_openapi.$_$.b;
|
|
82
81
|
var OpenApiV3Parser_instance = kotlin_community_flock_wirespec_converter_openapi.$_$.d;
|
|
83
|
-
var noWhenBranchMatchedException = kotlin_kotlin.$_$.tf;
|
|
84
82
|
var collectionSizeOrDefault = kotlin_kotlin.$_$.h5;
|
|
85
83
|
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.k;
|
|
86
|
-
var to = kotlin_kotlin.$_$.
|
|
84
|
+
var to = kotlin_kotlin.$_$.yf;
|
|
87
85
|
var _FileName___get_value__impl__3u4cz6 = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.r;
|
|
88
86
|
var charSequenceLength = kotlin_kotlin.$_$.j9;
|
|
89
87
|
var charSequenceGet = kotlin_kotlin.$_$.i9;
|
|
90
88
|
var toString_0 = kotlin_kotlin.$_$.a2;
|
|
91
89
|
var first = kotlin_kotlin.$_$.g6;
|
|
92
|
-
var Emitted = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
90
|
+
var Emitted = kotlin_community_flock_wirespec_compiler_core.$_$.a;
|
|
93
91
|
var _FileName___init__impl__nzn12e = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.q;
|
|
94
92
|
var print = kotlin_kotlin.$_$.b9;
|
|
95
93
|
var PackageName = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.i;
|
|
96
94
|
var component1 = kotlin_community_flock_wirespec_compiler_core.$_$.e1;
|
|
97
|
-
var JavaEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
95
|
+
var JavaEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.b;
|
|
98
96
|
var FileExtension_Java_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.j;
|
|
99
|
-
var KotlinEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
97
|
+
var KotlinEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.c;
|
|
100
98
|
var FileExtension_Kotlin_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.l;
|
|
101
|
-
var ScalaEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
99
|
+
var ScalaEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.d;
|
|
102
100
|
var FileExtension_Scala_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.m;
|
|
103
|
-
var TypeScriptEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
101
|
+
var TypeScriptEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.e;
|
|
104
102
|
var FileExtension_TypeScript_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.n;
|
|
105
|
-
var WirespecEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
103
|
+
var WirespecEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.f;
|
|
106
104
|
var WirespecSpec_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.y1;
|
|
107
105
|
var compile = kotlin_community_flock_wirespec_compiler_core.$_$.d1;
|
|
108
106
|
var Left = kotlin_io_arrow_kt_arrow_core.$_$.c;
|
|
@@ -110,53 +108,53 @@
|
|
|
110
108
|
var Right = kotlin_io_arrow_kt_arrow_core.$_$.d;
|
|
111
109
|
var println = kotlin_kotlin.$_$.z8;
|
|
112
110
|
var Output = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.h;
|
|
113
|
-
var ensureNotNull = kotlin_kotlin.$_$.
|
|
111
|
+
var ensureNotNull = kotlin_kotlin.$_$.pf;
|
|
114
112
|
var _Output___get_value__impl__a8kw1g = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.s;
|
|
115
113
|
var _PackageName___get_value__impl__2zr98c = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.u;
|
|
116
114
|
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.w1;
|
|
117
115
|
var charArrayOf = kotlin_kotlin.$_$.g9;
|
|
118
|
-
var split = kotlin_kotlin.$_$.
|
|
116
|
+
var split = kotlin_kotlin.$_$.hd;
|
|
119
117
|
var joinToString = kotlin_kotlin.$_$.r6;
|
|
120
118
|
var FileExtension_Json_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.k;
|
|
121
119
|
var parse = kotlin_community_flock_wirespec_compiler_core.$_$.f1;
|
|
122
120
|
var get_noLogger = kotlin_community_flock_wirespec_compiler_core.$_$.h1;
|
|
123
121
|
var Definition = kotlin_community_flock_wirespec_compiler_core.$_$.i;
|
|
124
|
-
var isInterface = kotlin_kotlin.$_$.
|
|
122
|
+
var isInterface = kotlin_kotlin.$_$.ia;
|
|
125
123
|
var produce = kotlin_community_flock_wirespec_compiler_lib.$_$.d;
|
|
126
|
-
var endsWith = kotlin_kotlin.$_$.
|
|
127
|
-
var dropLast = kotlin_kotlin.$_$.
|
|
128
|
-
var iterator = kotlin_kotlin.$_$.
|
|
129
|
-
var asSequence = kotlin_kotlin.$_$.
|
|
130
|
-
var map = kotlin_kotlin.$_$.
|
|
131
|
-
var filter = kotlin_kotlin.$_$.
|
|
132
|
-
var toSet_0 = kotlin_kotlin.$_$.
|
|
133
|
-
var split_0 = kotlin_kotlin.$_$.
|
|
124
|
+
var endsWith = kotlin_kotlin.$_$.hc;
|
|
125
|
+
var dropLast = kotlin_kotlin.$_$.ec;
|
|
126
|
+
var iterator = kotlin_kotlin.$_$.la;
|
|
127
|
+
var asSequence = kotlin_kotlin.$_$.ob;
|
|
128
|
+
var map = kotlin_kotlin.$_$.tb;
|
|
129
|
+
var filter = kotlin_kotlin.$_$.pb;
|
|
130
|
+
var toSet_0 = kotlin_kotlin.$_$.vb;
|
|
131
|
+
var split_0 = kotlin_kotlin.$_$.id;
|
|
134
132
|
var Companion_instance_2 = kotlin_kotlin.$_$.d4;
|
|
135
133
|
var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.b2;
|
|
136
|
-
var createFailure = kotlin_kotlin.$_$.
|
|
134
|
+
var createFailure = kotlin_kotlin.$_$.of;
|
|
137
135
|
var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.f2;
|
|
138
136
|
var _Result___get_isFailure__impl__jpiriv = kotlin_kotlin.$_$.d2;
|
|
139
|
-
var isArray = kotlin_kotlin.$_$.
|
|
137
|
+
var isArray = kotlin_kotlin.$_$.aa;
|
|
140
138
|
//endregion
|
|
141
139
|
//region block: pre-declaration
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
140
|
+
initMetadataForCompanion(Companion);
|
|
141
|
+
initMetadataForClass(WirespecCli, 'WirespecCli', WirespecCli, NoOpCliktCommand);
|
|
142
|
+
initMetadataForClass(CommonOptions, 'CommonOptions', VOID, CliktCommand);
|
|
143
|
+
initMetadataForClass(Compile_0, 'Compile', VOID, CommonOptions);
|
|
144
|
+
initMetadataForClass(Convert_0, 'Convert', VOID, CommonOptions);
|
|
145
|
+
initMetadataForClass(Options, 'Options', VOID, Enum);
|
|
146
|
+
initMetadataForClass(File, 'File');
|
|
147
|
+
initMetadataForClass(JavaFile, 'JavaFile', VOID, File);
|
|
148
|
+
initMetadataForClass(JsonFile, 'JsonFile', VOID, File);
|
|
149
|
+
initMetadataForClass(KotlinFile, 'KotlinFile', VOID, File);
|
|
150
|
+
initMetadataForClass(ScalaFile, 'ScalaFile', VOID, File);
|
|
151
|
+
initMetadataForClass(TypeScriptFile, 'TypeScriptFile', VOID, File);
|
|
152
|
+
initMetadataForClass(WirespecFile, 'WirespecFile', VOID, File);
|
|
153
|
+
initMetadataForClass(Directory, 'Directory');
|
|
156
154
|
//endregion
|
|
157
155
|
function WirespecCli$main$ref($boundThis) {
|
|
158
156
|
var l = function (p0) {
|
|
159
|
-
$boundThis.
|
|
157
|
+
$boundThis.z3r(p0);
|
|
160
158
|
return Unit_instance;
|
|
161
159
|
};
|
|
162
160
|
l.callableName = 'main';
|
|
@@ -164,7 +162,7 @@
|
|
|
164
162
|
}
|
|
165
163
|
function Companion() {
|
|
166
164
|
}
|
|
167
|
-
protoOf(Companion).
|
|
165
|
+
protoOf(Companion).x43 = function (compile, convert) {
|
|
168
166
|
return WirespecCli$main$ref(subcommands(new WirespecCli(), [new Compile_0(compile), new Convert_0(convert)]));
|
|
169
167
|
};
|
|
170
168
|
var Companion_instance_3;
|
|
@@ -175,28 +173,28 @@
|
|
|
175
173
|
NoOpCliktCommand.call(this, VOID, VOID, 'wirespec');
|
|
176
174
|
}
|
|
177
175
|
function _get_languages__ojonze($this) {
|
|
178
|
-
return $this.
|
|
176
|
+
return $this.x44_1.d41($this, languages$factory_0());
|
|
179
177
|
}
|
|
180
178
|
function Compile_0(block) {
|
|
181
179
|
CommonOptions.call(this);
|
|
182
|
-
this.
|
|
183
|
-
this.
|
|
180
|
+
this.w44_1 = block;
|
|
181
|
+
this.x44_1 = multiple(choice(option(this, Options_Language_getInstance().a45_1.slice(), 'Language'), Companion_instance.u2c()), VOID, true).p41(this, languages$factory());
|
|
184
182
|
}
|
|
185
|
-
protoOf(Compile_0).
|
|
183
|
+
protoOf(Compile_0).a3s = function () {
|
|
186
184
|
// Inline function 'kotlin.let' call
|
|
187
|
-
var this_0 = new CompilerArguments(Compile_instance, this.
|
|
185
|
+
var this_0 = new CompilerArguments(Compile_instance, this.a46(this.z45()), Companion_instance_0.v2c(this.b46()), toSet(_get_languages__ojonze(this)), _PackageName___init__impl__s13tbs(this.c46()), this.d46(), this.e46(), this.f46());
|
|
188
186
|
// Inline function 'kotlin.contracts.contract' call
|
|
189
|
-
this.
|
|
187
|
+
this.w44_1(this_0);
|
|
190
188
|
};
|
|
191
189
|
function _get_format__qlarck($this) {
|
|
192
|
-
return $this.
|
|
190
|
+
return $this.f47_1.d41($this, format$factory_0());
|
|
193
191
|
}
|
|
194
192
|
function _get_languages__ojonze_0($this) {
|
|
195
|
-
return $this.
|
|
193
|
+
return $this.g47_1.d41($this, languages$factory_2());
|
|
196
194
|
}
|
|
197
195
|
function Convert_0(block) {
|
|
198
196
|
CommonOptions.call(this);
|
|
199
|
-
this.
|
|
197
|
+
this.e47_1 = block;
|
|
200
198
|
var tmp = this;
|
|
201
199
|
// Inline function 'com.github.ajalt.clikt.parameters.types.enum' call
|
|
202
200
|
var this_0 = argument(this, VOID, 'Input format');
|
|
@@ -213,72 +211,73 @@
|
|
|
213
211
|
inductionVariable = inductionVariable + 1 | 0;
|
|
214
212
|
// Inline function 'com.github.ajalt.clikt.parameters.types.enum.<anonymous>' call
|
|
215
213
|
// Inline function 'com.github.ajalt.clikt.parameters.types.enum.<anonymous>' call
|
|
216
|
-
var tmp$ret$2 = element.
|
|
217
|
-
destination.
|
|
214
|
+
var tmp$ret$2 = element.n2_1;
|
|
215
|
+
destination.k2(tmp$ret$2, element);
|
|
218
216
|
}
|
|
219
|
-
tmp.
|
|
220
|
-
this.
|
|
217
|
+
tmp.f47_1 = choice_0(this_0, destination, true).j40(this, format$factory());
|
|
218
|
+
this.g47_1 = multiple(choice(option(this, Options_Language_getInstance().a45_1.slice(), 'Language'), Companion_instance.u2c(), VOID, true), listOf(Language_Wirespec_getInstance())).p41(this, languages$factory_1());
|
|
221
219
|
}
|
|
222
|
-
protoOf(Convert_0).
|
|
223
|
-
if (this.
|
|
220
|
+
protoOf(Convert_0).a3s = function () {
|
|
221
|
+
if (this.z45() == null)
|
|
224
222
|
null;
|
|
225
223
|
else {
|
|
226
224
|
// Inline function 'kotlin.let' call
|
|
227
225
|
// Inline function 'kotlin.contracts.contract' call
|
|
228
|
-
this.
|
|
226
|
+
this.t3r('To convert, please specify a file', VOID, true);
|
|
229
227
|
}
|
|
230
228
|
// Inline function 'kotlin.let' call
|
|
231
229
|
var tmp = new Convert(_get_format__qlarck(this));
|
|
232
|
-
var tmp_0 = this.
|
|
233
|
-
var tmp_1 = Companion_instance_0.
|
|
230
|
+
var tmp_0 = this.a46(null);
|
|
231
|
+
var tmp_1 = Companion_instance_0.v2c(this.b46());
|
|
234
232
|
// Inline function 'kotlin.collections.ifEmpty' call
|
|
235
233
|
var this_0 = toSet(_get_languages__ojonze_0(this));
|
|
234
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
236
235
|
var tmp_2;
|
|
237
|
-
if (this_0.
|
|
236
|
+
if (this_0.p()) {
|
|
238
237
|
// Inline function 'community.flock.wirespec.plugin.cli.Convert.run.<anonymous>' call
|
|
239
238
|
tmp_2 = setOf(Language_Wirespec_getInstance());
|
|
240
239
|
} else {
|
|
241
240
|
tmp_2 = this_0;
|
|
242
241
|
}
|
|
243
242
|
var tmp$ret$2 = tmp_2;
|
|
244
|
-
var this_1 = new CompilerArguments(tmp, tmp_0, tmp_1, tmp$ret$2, _PackageName___init__impl__s13tbs(this.
|
|
243
|
+
var this_1 = new CompilerArguments(tmp, tmp_0, tmp_1, tmp$ret$2, _PackageName___init__impl__s13tbs(this.c46()), this.d46(), this.e46(), this.f46());
|
|
245
244
|
// Inline function 'kotlin.contracts.contract' call
|
|
246
|
-
this.
|
|
245
|
+
this.e47_1(this_1);
|
|
247
246
|
};
|
|
248
247
|
function _get_inputFile__x1bqj($this) {
|
|
249
|
-
return $this.
|
|
248
|
+
return $this.s45_1.d41($this, inputFile$factory_0());
|
|
250
249
|
}
|
|
251
250
|
function CommonOptions() {
|
|
252
251
|
CliktCommand.call(this);
|
|
253
|
-
this.
|
|
254
|
-
this.
|
|
255
|
-
this.
|
|
256
|
-
this.
|
|
257
|
-
this.
|
|
258
|
-
this.
|
|
259
|
-
this.
|
|
260
|
-
}
|
|
261
|
-
protoOf(CommonOptions).
|
|
262
|
-
return this.
|
|
252
|
+
this.s45_1 = option(this, Options_InputFile_getInstance().a45_1.slice(), 'Input file').p41(this, inputFile$factory());
|
|
253
|
+
this.t45_1 = option(this, Options_InputDir_getInstance().a45_1.slice(), 'Input directory').p41(this, inputDir$factory());
|
|
254
|
+
this.u45_1 = option(this, Options_OutputDir_getInstance().a45_1.slice(), 'Output directory').p41(this, outputDir$factory());
|
|
255
|
+
this.v45_1 = default_0(option(this, Options_PackageName_getInstance().a45_1.slice(), 'Package name'), 'community.flock.wirespec.generated').p41(this, packageName$factory());
|
|
256
|
+
this.w45_1 = flag(option(this, Options_Shared_getInstance().a45_1.slice(), 'Generate shared wirespec code'), [], false).p41(this, shared$factory());
|
|
257
|
+
this.x45_1 = flag(option(this, Options_Strict_getInstance().a45_1.slice(), 'Strict mode'), []).p41(this, strict$factory());
|
|
258
|
+
this.y45_1 = flag(option(this, Options_Debug_getInstance().a45_1.slice(), 'Debug mode'), []).p41(this, debug$factory());
|
|
259
|
+
}
|
|
260
|
+
protoOf(CommonOptions).z45 = function () {
|
|
261
|
+
return this.t45_1.d41(this, inputDir$factory_0());
|
|
263
262
|
};
|
|
264
|
-
protoOf(CommonOptions).
|
|
265
|
-
return this.
|
|
263
|
+
protoOf(CommonOptions).b46 = function () {
|
|
264
|
+
return this.u45_1.d41(this, outputDir$factory_0());
|
|
266
265
|
};
|
|
267
|
-
protoOf(CommonOptions).
|
|
268
|
-
return this.
|
|
266
|
+
protoOf(CommonOptions).c46 = function () {
|
|
267
|
+
return this.v45_1.d41(this, packageName$factory_0());
|
|
269
268
|
};
|
|
270
|
-
protoOf(CommonOptions).
|
|
271
|
-
return this.
|
|
269
|
+
protoOf(CommonOptions).d46 = function () {
|
|
270
|
+
return this.w45_1.d41(this, shared$factory_0());
|
|
272
271
|
};
|
|
273
|
-
protoOf(CommonOptions).
|
|
274
|
-
return this.
|
|
272
|
+
protoOf(CommonOptions).e46 = function () {
|
|
273
|
+
return this.x45_1.d41(this, strict$factory_0());
|
|
275
274
|
};
|
|
276
|
-
protoOf(CommonOptions).
|
|
277
|
-
return this.
|
|
275
|
+
protoOf(CommonOptions).f46 = function () {
|
|
276
|
+
return this.y45_1.d41(this, debug$factory_0());
|
|
278
277
|
};
|
|
279
|
-
protoOf(CommonOptions).
|
|
278
|
+
protoOf(CommonOptions).a46 = function (inputDir) {
|
|
280
279
|
var tmp;
|
|
281
|
-
if (!(inputDir == null)
|
|
280
|
+
if (!(inputDir == null) && !(_get_inputFile__x1bqj(this) == null)) {
|
|
282
281
|
var message = 'Choose either a file or a directory. Not Both.';
|
|
283
282
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
284
283
|
} else {
|
|
@@ -289,11 +288,11 @@
|
|
|
289
288
|
} else {
|
|
290
289
|
// Inline function 'kotlin.let' call
|
|
291
290
|
// Inline function 'kotlin.contracts.contract' call
|
|
292
|
-
tmp_0 = Companion_instance_1.
|
|
291
|
+
tmp_0 = Companion_instance_1.j2c(tmp0_safe_receiver);
|
|
293
292
|
}
|
|
294
|
-
var
|
|
293
|
+
var tmp0_elvis_lhs = tmp_0;
|
|
295
294
|
var tmp_1;
|
|
296
|
-
if (
|
|
295
|
+
if (tmp0_elvis_lhs == null) {
|
|
297
296
|
var tmp_2;
|
|
298
297
|
if (inputDir == null) {
|
|
299
298
|
tmp_2 = null;
|
|
@@ -304,10 +303,10 @@
|
|
|
304
303
|
}
|
|
305
304
|
tmp_1 = tmp_2;
|
|
306
305
|
} else {
|
|
307
|
-
tmp_1 =
|
|
306
|
+
tmp_1 = tmp0_elvis_lhs;
|
|
308
307
|
}
|
|
309
|
-
var
|
|
310
|
-
tmp =
|
|
308
|
+
var tmp1_elvis_lhs = tmp_1;
|
|
309
|
+
tmp = tmp1_elvis_lhs == null ? Console_instance : tmp1_elvis_lhs;
|
|
311
310
|
}
|
|
312
311
|
return tmp;
|
|
313
312
|
};
|
|
@@ -335,7 +334,7 @@
|
|
|
335
334
|
}
|
|
336
335
|
function Options(name, ordinal, flags) {
|
|
337
336
|
Enum.call(this, name, ordinal);
|
|
338
|
-
this.
|
|
337
|
+
this.a45_1 = flags;
|
|
339
338
|
}
|
|
340
339
|
function Options_InputDir_getInstance() {
|
|
341
340
|
Options_initEntries();
|
|
@@ -406,32 +405,32 @@
|
|
|
406
405
|
}
|
|
407
406
|
function inputDir$factory() {
|
|
408
407
|
return getPropertyCallableRef('inputDir', 1, KProperty1, function (receiver) {
|
|
409
|
-
return receiver.
|
|
408
|
+
return receiver.z45();
|
|
410
409
|
}, null);
|
|
411
410
|
}
|
|
412
411
|
function outputDir$factory() {
|
|
413
412
|
return getPropertyCallableRef('outputDir', 1, KProperty1, function (receiver) {
|
|
414
|
-
return receiver.
|
|
413
|
+
return receiver.b46();
|
|
415
414
|
}, null);
|
|
416
415
|
}
|
|
417
416
|
function packageName$factory() {
|
|
418
417
|
return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) {
|
|
419
|
-
return receiver.
|
|
418
|
+
return receiver.c46();
|
|
420
419
|
}, null);
|
|
421
420
|
}
|
|
422
421
|
function shared$factory() {
|
|
423
422
|
return getPropertyCallableRef('shared', 1, KProperty1, function (receiver) {
|
|
424
|
-
return receiver.
|
|
423
|
+
return receiver.d46();
|
|
425
424
|
}, null);
|
|
426
425
|
}
|
|
427
426
|
function strict$factory() {
|
|
428
427
|
return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) {
|
|
429
|
-
return receiver.
|
|
428
|
+
return receiver.e46();
|
|
430
429
|
}, null);
|
|
431
430
|
}
|
|
432
431
|
function debug$factory() {
|
|
433
432
|
return getPropertyCallableRef('debug', 1, KProperty1, function (receiver) {
|
|
434
|
-
return receiver.
|
|
433
|
+
return receiver.f46();
|
|
435
434
|
}, null);
|
|
436
435
|
}
|
|
437
436
|
function inputFile$factory_0() {
|
|
@@ -441,32 +440,32 @@
|
|
|
441
440
|
}
|
|
442
441
|
function inputDir$factory_0() {
|
|
443
442
|
return getPropertyCallableRef('inputDir', 1, KProperty1, function (receiver) {
|
|
444
|
-
return receiver.
|
|
443
|
+
return receiver.z45();
|
|
445
444
|
}, null);
|
|
446
445
|
}
|
|
447
446
|
function outputDir$factory_0() {
|
|
448
447
|
return getPropertyCallableRef('outputDir', 1, KProperty1, function (receiver) {
|
|
449
|
-
return receiver.
|
|
448
|
+
return receiver.b46();
|
|
450
449
|
}, null);
|
|
451
450
|
}
|
|
452
451
|
function packageName$factory_0() {
|
|
453
452
|
return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) {
|
|
454
|
-
return receiver.
|
|
453
|
+
return receiver.c46();
|
|
455
454
|
}, null);
|
|
456
455
|
}
|
|
457
456
|
function shared$factory_0() {
|
|
458
457
|
return getPropertyCallableRef('shared', 1, KProperty1, function (receiver) {
|
|
459
|
-
return receiver.
|
|
458
|
+
return receiver.d46();
|
|
460
459
|
}, null);
|
|
461
460
|
}
|
|
462
461
|
function strict$factory_0() {
|
|
463
462
|
return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) {
|
|
464
|
-
return receiver.
|
|
463
|
+
return receiver.e46();
|
|
465
464
|
}, null);
|
|
466
465
|
}
|
|
467
466
|
function debug$factory_0() {
|
|
468
467
|
return getPropertyCallableRef('debug', 1, KProperty1, function (receiver) {
|
|
469
|
-
return receiver.
|
|
468
|
+
return receiver.f46();
|
|
470
469
|
}, null);
|
|
471
470
|
}
|
|
472
471
|
function main(args) {
|
|
@@ -477,9 +476,9 @@
|
|
|
477
476
|
var this_0 = numberRangeToNumber(0, 20);
|
|
478
477
|
var destination = ArrayList_init_$Create$();
|
|
479
478
|
// Inline function 'kotlin.collections.forEach' call
|
|
480
|
-
var tmp0_iterator = this_0.
|
|
481
|
-
while (tmp0_iterator.
|
|
482
|
-
var element = tmp0_iterator.
|
|
479
|
+
var tmp0_iterator = this_0.g();
|
|
480
|
+
while (tmp0_iterator.h()) {
|
|
481
|
+
var element = tmp0_iterator.i();
|
|
483
482
|
// Inline function 'kotlin.collections.mapNotNullTo.<anonymous>' call
|
|
484
483
|
var tmp0_safe_receiver = orNull(args, element);
|
|
485
484
|
if (tmp0_safe_receiver == null)
|
|
@@ -487,34 +486,34 @@
|
|
|
487
486
|
else {
|
|
488
487
|
// Inline function 'kotlin.let' call
|
|
489
488
|
// Inline function 'kotlin.contracts.contract' call
|
|
490
|
-
destination.
|
|
489
|
+
destination.e(tmp0_safe_receiver);
|
|
491
490
|
}
|
|
492
491
|
}
|
|
493
492
|
var this_1 = copyToArray(destination);
|
|
494
493
|
var tmp = Companion_instance_3;
|
|
495
494
|
var tmp_0 = compile$ref();
|
|
496
495
|
// Inline function 'kotlin.contracts.contract' call
|
|
497
|
-
tmp.
|
|
496
|
+
tmp.x43(tmp_0, convert$ref())(this_1);
|
|
498
497
|
}
|
|
499
498
|
function compile_0(arguments_0) {
|
|
500
|
-
var input = arguments_0.
|
|
501
|
-
var output = arguments_0.
|
|
502
|
-
var languages = arguments_0.
|
|
503
|
-
var packageName = arguments_0.
|
|
504
|
-
var logger = new Logger(arguments_0.
|
|
505
|
-
var operation = arguments_0.
|
|
499
|
+
var input = arguments_0.a2c_1;
|
|
500
|
+
var output = arguments_0.b2c_1;
|
|
501
|
+
var languages = arguments_0.c2c_1;
|
|
502
|
+
var packageName = arguments_0.d2c_1;
|
|
503
|
+
var logger = new Logger(arguments_0.g2c_1);
|
|
504
|
+
var operation = arguments_0.z2b_1;
|
|
506
505
|
if (operation instanceof Convert) {
|
|
507
506
|
var fullPath = input instanceof FullFilePath ? input : THROW_CCE();
|
|
508
507
|
var file = new JsonFile(fullPath);
|
|
509
|
-
var strict = arguments_0.
|
|
510
|
-
var format = operation.
|
|
508
|
+
var strict = arguments_0.f2c_1;
|
|
509
|
+
var format = operation.i2c_1;
|
|
511
510
|
var tmp;
|
|
512
|
-
switch (format.
|
|
511
|
+
switch (format.o2_1) {
|
|
513
512
|
case 0:
|
|
514
|
-
tmp = OpenApiV2Parser_instance.
|
|
513
|
+
tmp = OpenApiV2Parser_instance.l2d(file.x19(), !strict);
|
|
515
514
|
break;
|
|
516
515
|
case 1:
|
|
517
|
-
tmp = OpenApiV3Parser_instance.
|
|
516
|
+
tmp = OpenApiV3Parser_instance.l2d(file.x19(), !strict);
|
|
518
517
|
break;
|
|
519
518
|
default:
|
|
520
519
|
noWhenBranchMatchedException();
|
|
@@ -527,17 +526,17 @@
|
|
|
527
526
|
var this_0 = emitters(languages, packageName, path, logger);
|
|
528
527
|
// Inline function 'kotlin.collections.mapTo' call
|
|
529
528
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
530
|
-
var tmp0_iterator = this_0.
|
|
531
|
-
while (tmp0_iterator.
|
|
532
|
-
var item = tmp0_iterator.
|
|
529
|
+
var tmp0_iterator = this_0.g();
|
|
530
|
+
while (tmp0_iterator.h()) {
|
|
531
|
+
var item = tmp0_iterator.i();
|
|
533
532
|
// Inline function 'community.flock.wirespec.plugin.cli.compile.<anonymous>' call
|
|
534
|
-
var emitter = item.
|
|
535
|
-
var file_0 = item.
|
|
536
|
-
var results = emitter.
|
|
533
|
+
var emitter = item.nd();
|
|
534
|
+
var file_0 = item.od();
|
|
535
|
+
var results = emitter.w20(ast);
|
|
537
536
|
var tmp_0;
|
|
538
|
-
if (!emitter.
|
|
537
|
+
if (!emitter.v20_1) {
|
|
539
538
|
// Inline function 'kotlin.text.replaceFirstChar' call
|
|
540
|
-
var this_1 = _FileName___get_value__impl__3u4cz6(fullPath.
|
|
539
|
+
var this_1 = _FileName___get_value__impl__3u4cz6(fullPath.o2c_1);
|
|
541
540
|
var tmp_1;
|
|
542
541
|
// Inline function 'kotlin.text.isNotEmpty' call
|
|
543
542
|
if (charSequenceLength(this_1) > 0) {
|
|
@@ -554,22 +553,22 @@
|
|
|
554
553
|
tmp_1 = this_1;
|
|
555
554
|
}
|
|
556
555
|
var tmp$ret$6 = tmp_1;
|
|
557
|
-
tmp_0 = to(listOf(new Emitted(tmp$ret$6, first(results).
|
|
556
|
+
tmp_0 = to(listOf(new Emitted(tmp$ret$6, first(results).j23_1)), file_0);
|
|
558
557
|
} else {
|
|
559
558
|
tmp_0 = to(results, file_0);
|
|
560
559
|
}
|
|
561
560
|
var tmp$ret$7 = tmp_0;
|
|
562
|
-
destination.
|
|
561
|
+
destination.e(tmp$ret$7);
|
|
563
562
|
}
|
|
564
563
|
// Inline function 'kotlin.collections.mapTo' call
|
|
565
564
|
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));
|
|
566
|
-
var tmp0_iterator_0 = destination.
|
|
567
|
-
while (tmp0_iterator_0.
|
|
568
|
-
var item_0 = tmp0_iterator_0.
|
|
569
|
-
var results_0 = item_0.
|
|
570
|
-
var file_1 = item_0.
|
|
565
|
+
var tmp0_iterator_0 = destination.g();
|
|
566
|
+
while (tmp0_iterator_0.h()) {
|
|
567
|
+
var item_0 = tmp0_iterator_0.i();
|
|
568
|
+
var results_0 = item_0.nd();
|
|
569
|
+
var file_1 = item_0.od();
|
|
571
570
|
write(results_0, file_1);
|
|
572
|
-
destination_0.
|
|
571
|
+
destination_0.e(Unit_instance);
|
|
573
572
|
}
|
|
574
573
|
} else {
|
|
575
574
|
if (operation instanceof Compile) {
|
|
@@ -578,26 +577,31 @@
|
|
|
578
577
|
} else {
|
|
579
578
|
if (input instanceof FullDirPath) {
|
|
580
579
|
// Inline function 'kotlin.collections.forEach' call
|
|
581
|
-
var tmp0_iterator_1 = (new Directory(input.
|
|
582
|
-
while (tmp0_iterator_1.
|
|
583
|
-
var element = tmp0_iterator_1.
|
|
580
|
+
var tmp0_iterator_1 = (new Directory(input.t2c_1)).j47().g();
|
|
581
|
+
while (tmp0_iterator_1.h()) {
|
|
582
|
+
var element = tmp0_iterator_1.i();
|
|
584
583
|
// Inline function 'community.flock.wirespec.plugin.cli.compile.<anonymous>' call
|
|
585
|
-
wirespec(element, languages, packageName, out(element.
|
|
584
|
+
wirespec(element, languages, packageName, out(element.h47_1, packageName, output), logger);
|
|
586
585
|
}
|
|
587
586
|
} else {
|
|
588
587
|
if (input instanceof FullFilePath)
|
|
589
|
-
if (input.
|
|
588
|
+
if (input.p2c_1.equals(FileExtension_Wirespec_getInstance())) {
|
|
590
589
|
// Inline function 'kotlin.let' call
|
|
591
590
|
// Inline function 'kotlin.contracts.contract' call
|
|
592
591
|
var it = new WirespecFile(input);
|
|
593
|
-
wirespec(it, languages, packageName, out(it.
|
|
592
|
+
wirespec(it, languages, packageName, out(it.h47_1, packageName, output), logger);
|
|
594
593
|
} else {
|
|
595
594
|
// Inline function 'kotlin.error' call
|
|
596
|
-
var message = 'Path ' + input + ' is not a Wirespec file';
|
|
595
|
+
var message = 'Path ' + input.toString() + ' is not a Wirespec file';
|
|
597
596
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
598
597
|
}
|
|
598
|
+
else {
|
|
599
|
+
noWhenBranchMatchedException();
|
|
600
|
+
}
|
|
599
601
|
}
|
|
600
602
|
}
|
|
603
|
+
} else {
|
|
604
|
+
noWhenBranchMatchedException();
|
|
601
605
|
}
|
|
602
606
|
}
|
|
603
607
|
}
|
|
@@ -609,18 +613,18 @@
|
|
|
609
613
|
}
|
|
610
614
|
function write(output, file) {
|
|
611
615
|
// Inline function 'kotlin.collections.forEach' call
|
|
612
|
-
var tmp0_iterator = output.
|
|
613
|
-
while (tmp0_iterator.
|
|
614
|
-
var element = tmp0_iterator.
|
|
616
|
+
var tmp0_iterator = output.g();
|
|
617
|
+
while (tmp0_iterator.h()) {
|
|
618
|
+
var element = tmp0_iterator.i();
|
|
615
619
|
// Inline function 'community.flock.wirespec.plugin.cli.write.<anonymous>' call
|
|
616
|
-
var name = element.
|
|
617
|
-
var result = element.
|
|
618
|
-
var
|
|
620
|
+
var name = element.nd();
|
|
621
|
+
var result = element.od();
|
|
622
|
+
var tmp13_safe_receiver = file == null ? null : file.k47(_FileName___init__impl__nzn12e(name));
|
|
619
623
|
var tmp;
|
|
620
|
-
if (
|
|
624
|
+
if (tmp13_safe_receiver == null) {
|
|
621
625
|
tmp = null;
|
|
622
626
|
} else {
|
|
623
|
-
|
|
627
|
+
tmp13_safe_receiver.u17(result);
|
|
624
628
|
tmp = Unit_instance;
|
|
625
629
|
}
|
|
626
630
|
if (tmp == null) {
|
|
@@ -632,13 +636,13 @@
|
|
|
632
636
|
// Inline function 'kotlin.collections.map' call
|
|
633
637
|
// Inline function 'kotlin.collections.mapTo' call
|
|
634
638
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(_this__u8e3s4, 10));
|
|
635
|
-
var tmp0_iterator = _this__u8e3s4.
|
|
636
|
-
while (tmp0_iterator.
|
|
637
|
-
var item = tmp0_iterator.
|
|
639
|
+
var tmp0_iterator = _this__u8e3s4.g();
|
|
640
|
+
while (tmp0_iterator.h()) {
|
|
641
|
+
var item = tmp0_iterator.i();
|
|
638
642
|
// Inline function 'community.flock.wirespec.plugin.cli.emitters.<anonymous>' call
|
|
639
643
|
var packageString = component1(new PackageName(packageName));
|
|
640
644
|
var tmp;
|
|
641
|
-
switch (item.
|
|
645
|
+
switch (item.o2_1) {
|
|
642
646
|
case 0:
|
|
643
647
|
var tmp_0 = new JavaEmitter(packageString, logger);
|
|
644
648
|
var tmp_1;
|
|
@@ -714,7 +718,7 @@
|
|
|
714
718
|
break;
|
|
715
719
|
}
|
|
716
720
|
var tmp$ret$10 = tmp;
|
|
717
|
-
destination.
|
|
721
|
+
destination.e(tmp$ret$10);
|
|
718
722
|
}
|
|
719
723
|
return destination;
|
|
720
724
|
}
|
|
@@ -722,7 +726,7 @@
|
|
|
722
726
|
// Inline function 'kotlin.collections.map' call
|
|
723
727
|
// Inline function 'kotlin.let' call
|
|
724
728
|
// Inline function 'kotlin.let' call
|
|
725
|
-
var this_0 = _this__u8e3s4.
|
|
729
|
+
var this_0 = _this__u8e3s4.x19();
|
|
726
730
|
var tmp1_let_this = WirespecSpec_getInstance();
|
|
727
731
|
// Inline function 'kotlin.contracts.contract' call
|
|
728
732
|
var this_1 = compile(tmp1_let_this, this_0)(logger);
|
|
@@ -732,15 +736,15 @@
|
|
|
732
736
|
var this_2 = emitters(languages, packageName, path, logger);
|
|
733
737
|
// Inline function 'kotlin.collections.mapTo' call
|
|
734
738
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
|
|
735
|
-
var tmp0_iterator = this_2.
|
|
736
|
-
while (tmp0_iterator.
|
|
737
|
-
var item = tmp0_iterator.
|
|
739
|
+
var tmp0_iterator = this_2.g();
|
|
740
|
+
while (tmp0_iterator.h()) {
|
|
741
|
+
var item = tmp0_iterator.i();
|
|
738
742
|
// Inline function 'community.flock.wirespec.plugin.cli.wirespec.<anonymous>.<anonymous>' call
|
|
739
|
-
var emitter = item.
|
|
740
|
-
var file = item.
|
|
743
|
+
var emitter = item.nd();
|
|
744
|
+
var file = item.od();
|
|
741
745
|
var results = this_1(emitter);
|
|
742
746
|
var tmp;
|
|
743
|
-
if (!emitter.
|
|
747
|
+
if (!emitter.v20_1) {
|
|
744
748
|
// Inline function 'arrow.core.Either.map' call
|
|
745
749
|
// Inline function 'kotlin.contracts.contract' call
|
|
746
750
|
// Inline function 'arrow.core.flatMap' call
|
|
@@ -749,8 +753,8 @@
|
|
|
749
753
|
if (results instanceof Right) {
|
|
750
754
|
// Inline function 'arrow.core.Either.map.<anonymous>' call
|
|
751
755
|
// Inline function 'community.flock.wirespec.plugin.cli.wirespec.<anonymous>.<anonymous>.<anonymous>' call
|
|
752
|
-
var it = results.
|
|
753
|
-
var tmp$ret$2 = listOf(new Emitted(Companion_getInstance().
|
|
756
|
+
var it = results.rj_1;
|
|
757
|
+
var tmp$ret$2 = listOf(new Emitted(Companion_getInstance().v21(_FileName___get_value__impl__3u4cz6(path(FileExtension_Wirespec_getInstance()).o2c_1)), first(it).j23_1));
|
|
754
758
|
tmp_0 = new Right(tmp$ret$2);
|
|
755
759
|
} else {
|
|
756
760
|
if (results instanceof Left) {
|
|
@@ -765,24 +769,25 @@
|
|
|
765
769
|
tmp = to(results, file);
|
|
766
770
|
}
|
|
767
771
|
var tmp$ret$6 = tmp;
|
|
768
|
-
destination.
|
|
772
|
+
destination.e(tmp$ret$6);
|
|
769
773
|
}
|
|
770
774
|
// Inline function 'kotlin.collections.mapTo' call
|
|
771
775
|
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));
|
|
772
|
-
var tmp0_iterator_0 = destination.
|
|
773
|
-
while (tmp0_iterator_0.
|
|
774
|
-
var item_0 = tmp0_iterator_0.
|
|
775
|
-
|
|
776
|
-
var
|
|
777
|
-
var file_0 = item_0.kd();
|
|
776
|
+
var tmp0_iterator_0 = destination.g();
|
|
777
|
+
while (tmp0_iterator_0.h()) {
|
|
778
|
+
var item_0 = tmp0_iterator_0.i();
|
|
779
|
+
var results_0 = item_0.nd();
|
|
780
|
+
var file_0 = item_0.od();
|
|
778
781
|
if (results_0 instanceof Right) {
|
|
779
|
-
write(results_0.
|
|
782
|
+
write(results_0.rj_1, file_0);
|
|
780
783
|
} else {
|
|
781
784
|
if (results_0 instanceof Left) {
|
|
782
|
-
println(results_0.
|
|
785
|
+
println(results_0.lj_1);
|
|
786
|
+
} else {
|
|
787
|
+
noWhenBranchMatchedException();
|
|
783
788
|
}
|
|
784
789
|
}
|
|
785
|
-
destination_0.
|
|
790
|
+
destination_0.e(Unit_instance);
|
|
786
791
|
}
|
|
787
792
|
}
|
|
788
793
|
function compile$ref() {
|
|
@@ -804,7 +809,7 @@
|
|
|
804
809
|
function compile$lambda($output) {
|
|
805
810
|
return function (it) {
|
|
806
811
|
var tmp = $output;
|
|
807
|
-
return new FullFilePath(_Output___get_value__impl__a8kw1g(ensureNotNull(tmp == null ? null : new Output(tmp)).
|
|
812
|
+
return new FullFilePath(_Output___get_value__impl__a8kw1g(ensureNotNull(tmp == null ? null : new Output(tmp)).w2c_1), _FileName___init__impl__nzn12e('console'), it);
|
|
808
813
|
};
|
|
809
814
|
}
|
|
810
815
|
function out$lambda($output, $this_out, $packageName) {
|
|
@@ -815,56 +820,56 @@
|
|
|
815
820
|
if ((tmp_0 == null ? null : new Output(tmp_0)) == null) {
|
|
816
821
|
// Inline function 'kotlin.text.lowercase' call
|
|
817
822
|
// Inline function 'kotlin.js.asDynamic' call
|
|
818
|
-
var tmp$ret$1 = extension.
|
|
819
|
-
tmp = $this_out.
|
|
823
|
+
var tmp$ret$1 = extension.n2_1.toLowerCase();
|
|
824
|
+
tmp = $this_out.n2c_1 + '/out/' + tmp$ret$1;
|
|
820
825
|
} else {
|
|
821
826
|
tmp = new Output(tmp0_elvis_lhs);
|
|
822
827
|
}
|
|
823
828
|
var dir = tmp;
|
|
824
|
-
return $this_out.
|
|
829
|
+
return $this_out.r2c(toString(dir) + '/' + joinToString(split(_PackageName___get_value__impl__2zr98c($packageName), charArrayOf([_Char___init__impl__6a9atx(46)])), '/'), VOID, extension);
|
|
825
830
|
};
|
|
826
831
|
}
|
|
827
832
|
function JavaFile(path) {
|
|
828
|
-
File.call(this, path.
|
|
833
|
+
File.call(this, path.r2c(VOID, VOID, FileExtension_Java_getInstance()));
|
|
829
834
|
}
|
|
830
|
-
protoOf(JavaFile).
|
|
831
|
-
return new JavaFile(this.
|
|
835
|
+
protoOf(JavaFile).k47 = function (fileName) {
|
|
836
|
+
return new JavaFile(this.h47_1.r2c(VOID, fileName));
|
|
832
837
|
};
|
|
833
838
|
function JsonFile(path) {
|
|
834
|
-
File.call(this, path.
|
|
839
|
+
File.call(this, path.r2c(VOID, VOID, FileExtension_Json_getInstance()));
|
|
835
840
|
}
|
|
836
|
-
protoOf(JsonFile).
|
|
837
|
-
return new JsonFile(this.
|
|
841
|
+
protoOf(JsonFile).k47 = function (fileName) {
|
|
842
|
+
return new JsonFile(this.h47_1.r2c(VOID, fileName));
|
|
838
843
|
};
|
|
839
844
|
function KotlinFile(path) {
|
|
840
|
-
File.call(this, path.
|
|
845
|
+
File.call(this, path.r2c(VOID, VOID, FileExtension_Kotlin_getInstance()));
|
|
841
846
|
}
|
|
842
|
-
protoOf(KotlinFile).
|
|
843
|
-
return new KotlinFile(this.
|
|
847
|
+
protoOf(KotlinFile).k47 = function (fileName) {
|
|
848
|
+
return new KotlinFile(this.h47_1.r2c(VOID, fileName));
|
|
844
849
|
};
|
|
845
850
|
function ScalaFile(path) {
|
|
846
|
-
File.call(this, path.
|
|
851
|
+
File.call(this, path.r2c(VOID, VOID, FileExtension_Scala_getInstance()));
|
|
847
852
|
}
|
|
848
|
-
protoOf(ScalaFile).
|
|
849
|
-
return new ScalaFile(this.
|
|
853
|
+
protoOf(ScalaFile).k47 = function (fileName) {
|
|
854
|
+
return new ScalaFile(this.h47_1.r2c(VOID, fileName));
|
|
850
855
|
};
|
|
851
856
|
function TypeScriptFile(path) {
|
|
852
|
-
File.call(this, path.
|
|
857
|
+
File.call(this, path.r2c(VOID, VOID, FileExtension_TypeScript_getInstance()));
|
|
853
858
|
}
|
|
854
|
-
protoOf(TypeScriptFile).
|
|
855
|
-
return new TypeScriptFile(this.
|
|
859
|
+
protoOf(TypeScriptFile).k47 = function (fileName) {
|
|
860
|
+
return new TypeScriptFile(this.h47_1.r2c(VOID, fileName));
|
|
856
861
|
};
|
|
857
862
|
function WirespecFile(path) {
|
|
858
|
-
File.call(this, path.
|
|
863
|
+
File.call(this, path.r2c(VOID, VOID, FileExtension_Wirespec_getInstance()));
|
|
859
864
|
}
|
|
860
|
-
protoOf(WirespecFile).
|
|
861
|
-
return new WirespecFile(this.
|
|
865
|
+
protoOf(WirespecFile).k47 = function (fileName) {
|
|
866
|
+
return new WirespecFile(this.h47_1.r2c(VOID, fileName));
|
|
862
867
|
};
|
|
863
868
|
function cli(args) {
|
|
864
869
|
main(args);
|
|
865
870
|
}
|
|
866
871
|
function parser(source) {
|
|
867
|
-
var tmp0_safe_receiver = parse(WirespecSpec_getInstance(), source)(get_noLogger()).
|
|
872
|
+
var tmp0_safe_receiver = parse(WirespecSpec_getInstance(), source)(get_noLogger()).qj();
|
|
868
873
|
var tmp;
|
|
869
874
|
if (tmp0_safe_receiver == null) {
|
|
870
875
|
tmp = null;
|
|
@@ -872,11 +877,11 @@
|
|
|
872
877
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
873
878
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
874
879
|
var destination = ArrayList_init_$Create$();
|
|
875
|
-
var tmp0_iterator = tmp0_safe_receiver.
|
|
876
|
-
while (tmp0_iterator.
|
|
877
|
-
var element = tmp0_iterator.
|
|
880
|
+
var tmp0_iterator = tmp0_safe_receiver.g();
|
|
881
|
+
while (tmp0_iterator.h()) {
|
|
882
|
+
var element = tmp0_iterator.i();
|
|
878
883
|
if (!(element == null) ? isInterface(element, Definition) : false) {
|
|
879
|
-
destination.
|
|
884
|
+
destination.e(element);
|
|
880
885
|
}
|
|
881
886
|
}
|
|
882
887
|
tmp = destination;
|
|
@@ -889,12 +894,12 @@
|
|
|
889
894
|
// Inline function 'kotlin.collections.map' call
|
|
890
895
|
// Inline function 'kotlin.collections.mapTo' call
|
|
891
896
|
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp1_safe_receiver, 10));
|
|
892
|
-
var tmp0_iterator_0 = tmp1_safe_receiver.
|
|
893
|
-
while (tmp0_iterator_0.
|
|
894
|
-
var item = tmp0_iterator_0.
|
|
897
|
+
var tmp0_iterator_0 = tmp1_safe_receiver.g();
|
|
898
|
+
while (tmp0_iterator_0.h()) {
|
|
899
|
+
var item = tmp0_iterator_0.i();
|
|
895
900
|
// Inline function 'community.flock.wirespec.plugin.cli.parser.<anonymous>' call
|
|
896
901
|
var tmp$ret$2 = produce(item);
|
|
897
|
-
destination_0.
|
|
902
|
+
destination_0.e(tmp$ret$2);
|
|
898
903
|
}
|
|
899
904
|
tmp_0 = destination_0;
|
|
900
905
|
}
|
|
@@ -906,13 +911,13 @@
|
|
|
906
911
|
// Inline function 'kotlin.collections.toTypedArray' call
|
|
907
912
|
tmp_1 = copyToArray(tmp2_safe_receiver);
|
|
908
913
|
}
|
|
909
|
-
var
|
|
914
|
+
var tmp0_elvis_lhs = tmp_1;
|
|
910
915
|
var tmp_2;
|
|
911
|
-
if (
|
|
916
|
+
if (tmp0_elvis_lhs == null) {
|
|
912
917
|
var message = 'Cannot parse source';
|
|
913
918
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
914
919
|
} else {
|
|
915
|
-
tmp_2 =
|
|
920
|
+
tmp_2 = tmp0_elvis_lhs;
|
|
916
921
|
}
|
|
917
922
|
return tmp_2;
|
|
918
923
|
}
|
|
@@ -921,14 +926,14 @@
|
|
|
921
926
|
return it;
|
|
922
927
|
}
|
|
923
928
|
function Directory$wirespecFiles$lambda_0(it) {
|
|
924
|
-
return endsWith(it, FileExtension_Wirespec_getInstance().
|
|
929
|
+
return endsWith(it, FileExtension_Wirespec_getInstance().m2c_1);
|
|
925
930
|
}
|
|
926
931
|
function Directory$wirespecFiles$lambda_1(it) {
|
|
927
|
-
return dropLast(it, FileExtension_Wirespec_getInstance().
|
|
932
|
+
return dropLast(it, FileExtension_Wirespec_getInstance().m2c_1.length + 1 | 0);
|
|
928
933
|
}
|
|
929
934
|
function Directory$wirespecFiles$lambda_2(this$0) {
|
|
930
935
|
return function (it) {
|
|
931
|
-
return new FullFilePath(this$0.
|
|
936
|
+
return new FullFilePath(this$0.i47_1, _FileName___init__impl__nzn12e(it));
|
|
932
937
|
};
|
|
933
938
|
}
|
|
934
939
|
function WirespecFile$_init_$ref_cj1n5j() {
|
|
@@ -939,10 +944,10 @@
|
|
|
939
944
|
return l;
|
|
940
945
|
}
|
|
941
946
|
function Directory(path) {
|
|
942
|
-
this.
|
|
947
|
+
this.i47_1 = path;
|
|
943
948
|
}
|
|
944
|
-
protoOf(Directory).
|
|
945
|
-
var tmp = asSequence(iterator(get_fs().readdirSync(this.
|
|
949
|
+
protoOf(Directory).j47 = function () {
|
|
950
|
+
var tmp = asSequence(iterator(get_fs().readdirSync(this.i47_1, 'utf-8')));
|
|
946
951
|
var tmp_0 = map(tmp, Directory$wirespecFiles$lambda);
|
|
947
952
|
var tmp_1 = filter(tmp_0, Directory$wirespecFiles$lambda_0);
|
|
948
953
|
var tmp_2 = map(tmp_1, Directory$wirespecFiles$lambda_1);
|
|
@@ -950,20 +955,20 @@
|
|
|
950
955
|
return toSet_0(map(tmp_3, WirespecFile$_init_$ref_cj1n5j()));
|
|
951
956
|
};
|
|
952
957
|
function File(path) {
|
|
953
|
-
this.
|
|
958
|
+
this.h47_1 = path;
|
|
954
959
|
}
|
|
955
|
-
protoOf(File).
|
|
960
|
+
protoOf(File).x19 = function () {
|
|
956
961
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
957
|
-
return get_fs().readFileSync(this.
|
|
962
|
+
return get_fs().readFileSync(this.h47_1.toString(), 'utf-8');
|
|
958
963
|
};
|
|
959
|
-
protoOf(File).
|
|
964
|
+
protoOf(File).u17 = function (text) {
|
|
960
965
|
// Inline function 'kotlin.run' call
|
|
961
966
|
// Inline function 'kotlin.contracts.contract' call
|
|
962
967
|
// Inline function 'community.flock.wirespec.plugin.cli.io.File.write.<anonymous>' call
|
|
963
|
-
var $this$run = this.
|
|
968
|
+
var $this$run = this.h47_1.r2c(joinToString(split_0(this.h47_1.n2c_1, ['out']), 'out/node'));
|
|
964
969
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
965
|
-
if (!get_fs().existsSync($this$run.
|
|
966
|
-
get_fs().mkdirSync($this$run.
|
|
970
|
+
if (!get_fs().existsSync($this$run.n2c_1)) {
|
|
971
|
+
get_fs().mkdirSync($this$run.n2c_1, {recursive: true});
|
|
967
972
|
}
|
|
968
973
|
get_fs().writeFileSync($this$run.toString(), text);
|
|
969
974
|
};
|