@flock/wirespec 0.10.9 → 0.10.11
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 +3 -3
- package/arrow-arrow-atomic.js +15 -15
- package/arrow-arrow-continuations.js +4 -4
- package/arrow-arrow-core.js +74 -73
- package/arrow-arrow-core.js.map +1 -1
- package/clikt-clikt.js +1444 -1355
- package/clikt-clikt.js.map +1 -1
- package/colormath-root-colormath.js +442 -466
- package/colormath-root-colormath.js.map +1 -1
- package/kotlin-kotlin-stdlib.js +1380 -1352
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlin-kotlin-test.js +3 -3
- package/kotlin-openapi-bindings.js +4678 -4678
- package/kotlin-rgxgen.js +1867 -1822
- package/kotlin-rgxgen.js.map +1 -1
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +3 -3
- package/kotlinx-serialization-kotlinx-serialization-core.js +1670 -1670
- package/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.js +1404 -1400
- package/kotlinx-serialization-kotlinx-serialization-json.js.map +1 -1
- package/markdown.js +1954 -1944
- package/markdown.js.map +1 -1
- package/mordant-mordant.js +1853 -1793
- package/mordant-mordant.js.map +1 -1
- package/package.json +2 -2
- package/resources-library.js +3 -3
- package/wirespec-src-compiler-core.js +2871 -5219
- package/wirespec-src-compiler-core.js.map +1 -1
- package/wirespec-src-compiler-lib.js +435 -435
- package/wirespec-src-compiler-lib.js.map +1 -1
- package/wirespec-src-converter-openapi.js +846 -842
- package/wirespec-src-converter-openapi.js.map +1 -1
- package/wirespec-src-plugin-arguments.js +93 -105
- package/wirespec-src-plugin-arguments.js.map +1 -1
- package/wirespec-src-plugin-cli.js +206 -230
- package/wirespec-src-plugin-cli.js.map +1 -1
- package/wirespec-src-plugin-npm.js +46 -47
- package/wirespec-src-plugin-npm.js.map +1 -1
- package/wirespec-src-tools-generator.js +57 -53
- package/wirespec-src-tools-generator.js.map +1 -1
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
(function (
|
|
1
|
+
(function (factory) {
|
|
2
2
|
if (typeof define === 'function' && define.amd)
|
|
3
3
|
define(['exports', './kotlin-kotlin-stdlib.js', './clikt-clikt.js', './wirespec-src-plugin-arguments.js', './wirespec-src-compiler-core.js', './wirespec-src-converter-openapi.js', './arrow-arrow-core.js', './wirespec-src-compiler-lib.js'], factory);
|
|
4
4
|
else if (typeof exports === 'object')
|
|
5
5
|
factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./clikt-clikt.js'), require('./wirespec-src-plugin-arguments.js'), require('./wirespec-src-compiler-core.js'), require('./wirespec-src-converter-openapi.js'), require('./arrow-arrow-core.js'), require('./wirespec-src-compiler-lib.js'));
|
|
6
6
|
else {
|
|
7
|
-
if (typeof
|
|
7
|
+
if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') {
|
|
8
8
|
throw new Error("Error loading module 'wirespec-src-plugin-cli'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'wirespec-src-plugin-cli'.");
|
|
9
9
|
}
|
|
10
|
-
if (typeof
|
|
10
|
+
if (typeof globalThis['clikt-clikt'] === 'undefined') {
|
|
11
11
|
throw new Error("Error loading module 'wirespec-src-plugin-cli'. Its dependency 'clikt-clikt' was not found. Please, check whether 'clikt-clikt' is loaded prior to 'wirespec-src-plugin-cli'.");
|
|
12
12
|
}
|
|
13
|
-
if (typeof
|
|
13
|
+
if (typeof globalThis['wirespec-src-plugin-arguments'] === 'undefined') {
|
|
14
14
|
throw new Error("Error loading module 'wirespec-src-plugin-cli'. Its dependency 'wirespec-src-plugin-arguments' was not found. Please, check whether 'wirespec-src-plugin-arguments' is loaded prior to 'wirespec-src-plugin-cli'.");
|
|
15
15
|
}
|
|
16
|
-
if (typeof
|
|
16
|
+
if (typeof globalThis['wirespec-src-compiler-core'] === 'undefined') {
|
|
17
17
|
throw new Error("Error loading module 'wirespec-src-plugin-cli'. Its dependency 'wirespec-src-compiler-core' was not found. Please, check whether 'wirespec-src-compiler-core' is loaded prior to 'wirespec-src-plugin-cli'.");
|
|
18
18
|
}
|
|
19
|
-
if (typeof
|
|
19
|
+
if (typeof globalThis['wirespec-src-converter-openapi'] === 'undefined') {
|
|
20
20
|
throw new Error("Error loading module 'wirespec-src-plugin-cli'. Its dependency 'wirespec-src-converter-openapi' was not found. Please, check whether 'wirespec-src-converter-openapi' is loaded prior to 'wirespec-src-plugin-cli'.");
|
|
21
21
|
}
|
|
22
|
-
if (typeof
|
|
22
|
+
if (typeof globalThis['arrow-arrow-core'] === 'undefined') {
|
|
23
23
|
throw new Error("Error loading module 'wirespec-src-plugin-cli'. Its dependency 'arrow-arrow-core' was not found. Please, check whether 'arrow-arrow-core' is loaded prior to 'wirespec-src-plugin-cli'.");
|
|
24
24
|
}
|
|
25
|
-
if (typeof
|
|
25
|
+
if (typeof globalThis['wirespec-src-compiler-lib'] === 'undefined') {
|
|
26
26
|
throw new Error("Error loading module 'wirespec-src-plugin-cli'. Its dependency 'wirespec-src-compiler-lib' was not found. Please, check whether 'wirespec-src-compiler-lib' is loaded prior to 'wirespec-src-plugin-cli'.");
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
globalThis['wirespec-src-plugin-cli'] = factory(typeof globalThis['wirespec-src-plugin-cli'] === 'undefined' ? {} : globalThis['wirespec-src-plugin-cli'], globalThis['kotlin-kotlin-stdlib'], globalThis['clikt-clikt'], globalThis['wirespec-src-plugin-arguments'], globalThis['wirespec-src-compiler-core'], globalThis['wirespec-src-converter-openapi'], globalThis['arrow-arrow-core'], globalThis['wirespec-src-compiler-lib']);
|
|
29
29
|
}
|
|
30
|
-
}(
|
|
30
|
+
}(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.$_$.g4;
|
|
@@ -43,23 +43,23 @@
|
|
|
43
43
|
var multiple = kotlin_clikt_clikt.$_$.g;
|
|
44
44
|
var Compile_instance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.y;
|
|
45
45
|
var Companion_instance_0 = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.z;
|
|
46
|
-
var toSet = kotlin_kotlin.$_$.
|
|
46
|
+
var toSet = kotlin_kotlin.$_$.p8;
|
|
47
47
|
var _PackageName___init__impl__s13tbs = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.t;
|
|
48
48
|
var CompilerArguments = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.a;
|
|
49
49
|
var argument = kotlin_clikt_clikt.$_$.d;
|
|
50
50
|
var values = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.c;
|
|
51
|
-
var mapCapacity = kotlin_kotlin.$_$.
|
|
51
|
+
var mapCapacity = kotlin_kotlin.$_$.i7;
|
|
52
52
|
var coerceAtLeast = kotlin_kotlin.$_$.ib;
|
|
53
53
|
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.t;
|
|
54
54
|
var choice_0 = kotlin_clikt_clikt.$_$.i;
|
|
55
55
|
var Language_Wirespec_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.p;
|
|
56
|
-
var listOf = kotlin_kotlin.$_$.
|
|
56
|
+
var listOf = kotlin_kotlin.$_$.g7;
|
|
57
57
|
var Convert = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.g;
|
|
58
|
-
var setOf = kotlin_kotlin.$_$.
|
|
58
|
+
var setOf = kotlin_kotlin.$_$.u7;
|
|
59
59
|
var CliktCommand = kotlin_clikt_clikt.$_$.a;
|
|
60
60
|
var default_0 = kotlin_clikt_clikt.$_$.e;
|
|
61
|
-
var Companion_instance_1 = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
62
|
-
var Level_ERROR_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
61
|
+
var Companion_instance_1 = kotlin_community_flock_wirespec_compiler_core.$_$.e2;
|
|
62
|
+
var Level_ERROR_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.w1;
|
|
63
63
|
var flag = kotlin_clikt_clikt.$_$.f;
|
|
64
64
|
var Companion_instance_2 = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.w;
|
|
65
65
|
var FullDirPath = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.d;
|
|
@@ -69,16 +69,16 @@
|
|
|
69
69
|
var THROW_CCE = kotlin_kotlin.$_$.if;
|
|
70
70
|
var isCharSequence = kotlin_kotlin.$_$.ha;
|
|
71
71
|
var trim = kotlin_kotlin.$_$.pe;
|
|
72
|
-
var Level_DEBUG_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
73
|
-
var Level_INFO_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
74
|
-
var Level_WARN_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
72
|
+
var Level_DEBUG_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.v1;
|
|
73
|
+
var Level_INFO_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.x1;
|
|
74
|
+
var Level_WARN_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.y1;
|
|
75
75
|
var Enum = kotlin_kotlin.$_$.ye;
|
|
76
76
|
var KProperty1 = kotlin_kotlin.$_$.sb;
|
|
77
77
|
var getPropertyCallableRef = kotlin_kotlin.$_$.u9;
|
|
78
78
|
var numberRangeToNumber = kotlin_kotlin.$_$.ra;
|
|
79
79
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.l;
|
|
80
80
|
var copyToArray = kotlin_kotlin.$_$.x5;
|
|
81
|
-
var Logger = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
81
|
+
var Logger = kotlin_community_flock_wirespec_compiler_core.$_$.h1;
|
|
82
82
|
var noWhenBranchMatchedException = kotlin_kotlin.$_$.eg;
|
|
83
83
|
var FileExtension_Wirespec_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.o;
|
|
84
84
|
var FullFilePath = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.e;
|
|
@@ -96,26 +96,24 @@
|
|
|
96
96
|
var first = kotlin_kotlin.$_$.h6;
|
|
97
97
|
var Emitted = kotlin_community_flock_wirespec_compiler_core.$_$.a;
|
|
98
98
|
var _FileName___init__impl__nzn12e = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.q;
|
|
99
|
-
var print = kotlin_kotlin.$_$.
|
|
99
|
+
var print = kotlin_kotlin.$_$.d9;
|
|
100
100
|
var PackageName = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.i;
|
|
101
|
-
var component1 = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
101
|
+
var component1 = kotlin_community_flock_wirespec_compiler_core.$_$.f1;
|
|
102
102
|
var JavaEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.b;
|
|
103
103
|
var FileExtension_Java_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.j;
|
|
104
|
-
var
|
|
105
|
-
var KotlinEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.d;
|
|
104
|
+
var KotlinEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.c;
|
|
106
105
|
var FileExtension_Kotlin_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.l;
|
|
107
|
-
var
|
|
108
|
-
var ScalaEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.f;
|
|
106
|
+
var ScalaEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.d;
|
|
109
107
|
var FileExtension_Scala_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.m;
|
|
110
|
-
var TypeScriptEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
108
|
+
var TypeScriptEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.e;
|
|
111
109
|
var FileExtension_TypeScript_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.n;
|
|
112
|
-
var WirespecEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
113
|
-
var WirespecSpec_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
114
|
-
var compile = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
110
|
+
var WirespecEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.f;
|
|
111
|
+
var WirespecSpec_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.d2;
|
|
112
|
+
var compile = kotlin_community_flock_wirespec_compiler_core.$_$.e1;
|
|
115
113
|
var Left = kotlin_io_arrow_kt_arrow_core.$_$.d;
|
|
116
|
-
var Companion_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
114
|
+
var Companion_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.b2;
|
|
117
115
|
var Right = kotlin_io_arrow_kt_arrow_core.$_$.e;
|
|
118
|
-
var println = kotlin_kotlin.$_$.
|
|
116
|
+
var println = kotlin_kotlin.$_$.b9;
|
|
119
117
|
var Output = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.h;
|
|
120
118
|
var ensureNotNull = kotlin_kotlin.$_$.yf;
|
|
121
119
|
var _Output___get_value__impl__a8kw1g = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.s;
|
|
@@ -125,9 +123,9 @@
|
|
|
125
123
|
var split = kotlin_kotlin.$_$.nd;
|
|
126
124
|
var joinToString = kotlin_kotlin.$_$.s6;
|
|
127
125
|
var FileExtension_Json_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.k;
|
|
128
|
-
var parse = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
129
|
-
var get_noLogger = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
130
|
-
var Definition = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
126
|
+
var parse = kotlin_community_flock_wirespec_compiler_core.$_$.g1;
|
|
127
|
+
var get_noLogger = kotlin_community_flock_wirespec_compiler_core.$_$.i1;
|
|
128
|
+
var Definition = kotlin_community_flock_wirespec_compiler_core.$_$.i;
|
|
131
129
|
var isInterface = kotlin_kotlin.$_$.la;
|
|
132
130
|
var produce = kotlin_community_flock_wirespec_compiler_lib.$_$.e;
|
|
133
131
|
var endsWith = kotlin_kotlin.$_$.nc;
|
|
@@ -163,7 +161,7 @@
|
|
|
163
161
|
//endregion
|
|
164
162
|
function WirespecCli$main$ref($boundThis) {
|
|
165
163
|
var l = function (p0) {
|
|
166
|
-
$boundThis.
|
|
164
|
+
$boundThis.s3p(p0);
|
|
167
165
|
return Unit_instance;
|
|
168
166
|
};
|
|
169
167
|
l.callableName = 'main';
|
|
@@ -171,7 +169,7 @@
|
|
|
171
169
|
}
|
|
172
170
|
function Companion() {
|
|
173
171
|
}
|
|
174
|
-
protoOf(Companion).
|
|
172
|
+
protoOf(Companion).x41 = function (compile, convert) {
|
|
175
173
|
return WirespecCli$main$ref(subcommands(new WirespecCli(), [new Compile_0(compile), new Convert_0(convert)]));
|
|
176
174
|
};
|
|
177
175
|
var Companion_instance_4;
|
|
@@ -182,28 +180,28 @@
|
|
|
182
180
|
NoOpCliktCommand.call(this, VOID, VOID, 'wirespec');
|
|
183
181
|
}
|
|
184
182
|
function _get_languages__ojonze($this) {
|
|
185
|
-
return $this.
|
|
183
|
+
return $this.x42_1.e3z($this, languages$factory_0());
|
|
186
184
|
}
|
|
187
185
|
function Compile_0(block) {
|
|
188
186
|
CommonOptions.call(this);
|
|
189
|
-
this.
|
|
190
|
-
this.
|
|
187
|
+
this.w42_1 = block;
|
|
188
|
+
this.x42_1 = multiple(choice(option(this, Options_Language_getInstance().a43_1.slice(), 'Language'), Companion_instance.y29()), VOID, true).p3z(this, languages$factory());
|
|
191
189
|
}
|
|
192
|
-
protoOf(Compile_0).
|
|
190
|
+
protoOf(Compile_0).t3p = function () {
|
|
193
191
|
// Inline function 'kotlin.let' call
|
|
194
|
-
var this_0 = new CompilerArguments(Compile_instance, this.
|
|
192
|
+
var this_0 = new CompilerArguments(Compile_instance, this.a44(this.z43()), Companion_instance_0.z29(this.b44()), toSet(_get_languages__ojonze(this)), _PackageName___init__impl__s13tbs(this.c44()), this.e44(this.d44()), this.f44(), this.g44());
|
|
195
193
|
// Inline function 'kotlin.contracts.contract' call
|
|
196
|
-
this.
|
|
194
|
+
this.w42_1(this_0);
|
|
197
195
|
};
|
|
198
196
|
function _get_format__qlarck($this) {
|
|
199
|
-
return $this.
|
|
197
|
+
return $this.g45_1.e3z($this, format$factory_0());
|
|
200
198
|
}
|
|
201
199
|
function _get_languages__ojonze_0($this) {
|
|
202
|
-
return $this.
|
|
200
|
+
return $this.h45_1.e3z($this, languages$factory_2());
|
|
203
201
|
}
|
|
204
202
|
function Convert_0(block) {
|
|
205
203
|
CommonOptions.call(this);
|
|
206
|
-
this.
|
|
204
|
+
this.f45_1 = block;
|
|
207
205
|
var tmp = this;
|
|
208
206
|
// Inline function 'com.github.ajalt.clikt.parameters.types.enum' call
|
|
209
207
|
var this_0 = argument(this, VOID, 'Input format');
|
|
@@ -223,21 +221,21 @@
|
|
|
223
221
|
var tmp$ret$2 = element.p2_1;
|
|
224
222
|
destination.m2(tmp$ret$2, element);
|
|
225
223
|
}
|
|
226
|
-
tmp.
|
|
227
|
-
this.
|
|
224
|
+
tmp.g45_1 = choice_0(this_0, destination, true).k3y(this, format$factory());
|
|
225
|
+
this.h45_1 = multiple(choice(option(this, Options_Language_getInstance().a43_1.slice(), 'Language'), Companion_instance.y29(), VOID, true), listOf(Language_Wirespec_getInstance())).p3z(this, languages$factory_1());
|
|
228
226
|
}
|
|
229
|
-
protoOf(Convert_0).
|
|
230
|
-
if (this.
|
|
227
|
+
protoOf(Convert_0).t3p = function () {
|
|
228
|
+
if (this.z43() == null)
|
|
231
229
|
null;
|
|
232
230
|
else {
|
|
233
231
|
// Inline function 'kotlin.let' call
|
|
234
232
|
// Inline function 'kotlin.contracts.contract' call
|
|
235
|
-
this.
|
|
233
|
+
this.m3p('To convert, please specify a file', VOID, true);
|
|
236
234
|
}
|
|
237
235
|
// Inline function 'kotlin.let' call
|
|
238
236
|
var tmp = new Convert(_get_format__qlarck(this));
|
|
239
|
-
var tmp_0 = this.
|
|
240
|
-
var tmp_1 = Companion_instance_0.
|
|
237
|
+
var tmp_0 = this.a44(null);
|
|
238
|
+
var tmp_1 = Companion_instance_0.z29(this.b44());
|
|
241
239
|
// Inline function 'kotlin.collections.ifEmpty' call
|
|
242
240
|
var this_0 = toSet(_get_languages__ojonze_0(this));
|
|
243
241
|
// Inline function 'kotlin.contracts.contract' call
|
|
@@ -249,42 +247,42 @@
|
|
|
249
247
|
tmp_2 = this_0;
|
|
250
248
|
}
|
|
251
249
|
var tmp$ret$2 = tmp_2;
|
|
252
|
-
var this_1 = new CompilerArguments(tmp, tmp_0, tmp_1, tmp$ret$2, _PackageName___init__impl__s13tbs(this.
|
|
250
|
+
var this_1 = new CompilerArguments(tmp, tmp_0, tmp_1, tmp$ret$2, _PackageName___init__impl__s13tbs(this.c44()), this.e44(this.d44()), this.f44(), this.g44());
|
|
253
251
|
// Inline function 'kotlin.contracts.contract' call
|
|
254
|
-
this.
|
|
252
|
+
this.f45_1(this_1);
|
|
255
253
|
};
|
|
256
254
|
function _get_inputFile__x1bqj($this) {
|
|
257
|
-
return $this.
|
|
255
|
+
return $this.s43_1.e3z($this, inputFile$factory_0());
|
|
258
256
|
}
|
|
259
257
|
function CommonOptions() {
|
|
260
258
|
CliktCommand.call(this);
|
|
261
|
-
this.
|
|
262
|
-
this.
|
|
263
|
-
this.
|
|
264
|
-
this.
|
|
265
|
-
this.
|
|
266
|
-
this.
|
|
267
|
-
this.
|
|
268
|
-
}
|
|
269
|
-
protoOf(CommonOptions).
|
|
270
|
-
return this.
|
|
259
|
+
this.s43_1 = option(this, Options_InputFile_getInstance().a43_1.slice(), 'Input file').p3z(this, inputFile$factory());
|
|
260
|
+
this.t43_1 = option(this, Options_InputDir_getInstance().a43_1.slice(), 'Input directory').p3z(this, inputDir$factory());
|
|
261
|
+
this.u43_1 = option(this, Options_OutputDir_getInstance().a43_1.slice(), 'Output directory').p3z(this, outputDir$factory());
|
|
262
|
+
this.v43_1 = default_0(option(this, Options_PackageName_getInstance().a43_1.slice(), 'Package name'), 'community.flock.wirespec.generated').p3z(this, packageName$factory());
|
|
263
|
+
this.w43_1 = default_0(option(this, Options_LogLevel_getInstance().a43_1.slice(), 'Log level: ' + Companion_instance_1.toString()), Level_ERROR_getInstance().toString()).p3z(this, logLevel$factory());
|
|
264
|
+
this.x43_1 = flag(option(this, Options_Shared_getInstance().a43_1.slice(), 'Generate shared wirespec code'), [], false).p3z(this, shared$factory());
|
|
265
|
+
this.y43_1 = flag(option(this, Options_Strict_getInstance().a43_1.slice(), 'Strict mode'), []).p3z(this, strict$factory());
|
|
266
|
+
}
|
|
267
|
+
protoOf(CommonOptions).z43 = function () {
|
|
268
|
+
return this.t43_1.e3z(this, inputDir$factory_0());
|
|
271
269
|
};
|
|
272
|
-
protoOf(CommonOptions).
|
|
273
|
-
return this.
|
|
270
|
+
protoOf(CommonOptions).b44 = function () {
|
|
271
|
+
return this.u43_1.e3z(this, outputDir$factory_0());
|
|
274
272
|
};
|
|
275
|
-
protoOf(CommonOptions).
|
|
276
|
-
return this.
|
|
273
|
+
protoOf(CommonOptions).c44 = function () {
|
|
274
|
+
return this.v43_1.e3z(this, packageName$factory_0());
|
|
277
275
|
};
|
|
278
|
-
protoOf(CommonOptions).
|
|
279
|
-
return this.
|
|
276
|
+
protoOf(CommonOptions).d44 = function () {
|
|
277
|
+
return this.w43_1.e3z(this, logLevel$factory_0());
|
|
280
278
|
};
|
|
281
|
-
protoOf(CommonOptions).
|
|
282
|
-
return this.
|
|
279
|
+
protoOf(CommonOptions).f44 = function () {
|
|
280
|
+
return this.x43_1.e3z(this, shared$factory_0());
|
|
283
281
|
};
|
|
284
|
-
protoOf(CommonOptions).
|
|
285
|
-
return this.
|
|
282
|
+
protoOf(CommonOptions).g44 = function () {
|
|
283
|
+
return this.y43_1.e3z(this, strict$factory_0());
|
|
286
284
|
};
|
|
287
|
-
protoOf(CommonOptions).
|
|
285
|
+
protoOf(CommonOptions).a44 = function (inputDir) {
|
|
288
286
|
var tmp;
|
|
289
287
|
if (!(inputDir == null) && !(_get_inputFile__x1bqj(this) == null)) {
|
|
290
288
|
var message = 'Choose either a file or a directory. Not Both.';
|
|
@@ -297,11 +295,11 @@
|
|
|
297
295
|
} else {
|
|
298
296
|
// Inline function 'kotlin.let' call
|
|
299
297
|
// Inline function 'kotlin.contracts.contract' call
|
|
300
|
-
tmp_0 = Companion_instance_2.
|
|
298
|
+
tmp_0 = Companion_instance_2.n29(tmp0_safe_receiver);
|
|
301
299
|
}
|
|
302
|
-
var
|
|
300
|
+
var tmp1_elvis_lhs = tmp_0;
|
|
303
301
|
var tmp_1;
|
|
304
|
-
if (
|
|
302
|
+
if (tmp1_elvis_lhs == null) {
|
|
305
303
|
var tmp_2;
|
|
306
304
|
if (inputDir == null) {
|
|
307
305
|
tmp_2 = null;
|
|
@@ -312,14 +310,14 @@
|
|
|
312
310
|
}
|
|
313
311
|
tmp_1 = tmp_2;
|
|
314
312
|
} else {
|
|
315
|
-
tmp_1 =
|
|
313
|
+
tmp_1 = tmp1_elvis_lhs;
|
|
316
314
|
}
|
|
317
|
-
var
|
|
318
|
-
tmp =
|
|
315
|
+
var tmp3_elvis_lhs = tmp_1;
|
|
316
|
+
tmp = tmp3_elvis_lhs == null ? Console_instance : tmp3_elvis_lhs;
|
|
319
317
|
}
|
|
320
318
|
return tmp;
|
|
321
319
|
};
|
|
322
|
-
protoOf(CommonOptions).
|
|
320
|
+
protoOf(CommonOptions).e44 = function (_this__u8e3s4) {
|
|
323
321
|
// Inline function 'kotlin.text.uppercase' call
|
|
324
322
|
// Inline function 'kotlin.text.trim' call
|
|
325
323
|
// Inline function 'kotlin.js.asDynamic' call
|
|
@@ -367,7 +365,7 @@
|
|
|
367
365
|
}
|
|
368
366
|
function Options(name, ordinal, flags) {
|
|
369
367
|
Enum.call(this, name, ordinal);
|
|
370
|
-
this.
|
|
368
|
+
this.a43_1 = flags;
|
|
371
369
|
}
|
|
372
370
|
function Options_InputDir_getInstance() {
|
|
373
371
|
Options_initEntries();
|
|
@@ -438,32 +436,32 @@
|
|
|
438
436
|
}
|
|
439
437
|
function inputDir$factory() {
|
|
440
438
|
return getPropertyCallableRef('inputDir', 1, KProperty1, function (receiver) {
|
|
441
|
-
return receiver.
|
|
439
|
+
return receiver.z43();
|
|
442
440
|
}, null);
|
|
443
441
|
}
|
|
444
442
|
function outputDir$factory() {
|
|
445
443
|
return getPropertyCallableRef('outputDir', 1, KProperty1, function (receiver) {
|
|
446
|
-
return receiver.
|
|
444
|
+
return receiver.b44();
|
|
447
445
|
}, null);
|
|
448
446
|
}
|
|
449
447
|
function packageName$factory() {
|
|
450
448
|
return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) {
|
|
451
|
-
return receiver.
|
|
449
|
+
return receiver.c44();
|
|
452
450
|
}, null);
|
|
453
451
|
}
|
|
454
452
|
function logLevel$factory() {
|
|
455
453
|
return getPropertyCallableRef('logLevel', 1, KProperty1, function (receiver) {
|
|
456
|
-
return receiver.
|
|
454
|
+
return receiver.d44();
|
|
457
455
|
}, null);
|
|
458
456
|
}
|
|
459
457
|
function shared$factory() {
|
|
460
458
|
return getPropertyCallableRef('shared', 1, KProperty1, function (receiver) {
|
|
461
|
-
return receiver.
|
|
459
|
+
return receiver.f44();
|
|
462
460
|
}, null);
|
|
463
461
|
}
|
|
464
462
|
function strict$factory() {
|
|
465
463
|
return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) {
|
|
466
|
-
return receiver.
|
|
464
|
+
return receiver.g44();
|
|
467
465
|
}, null);
|
|
468
466
|
}
|
|
469
467
|
function inputFile$factory_0() {
|
|
@@ -473,32 +471,32 @@
|
|
|
473
471
|
}
|
|
474
472
|
function inputDir$factory_0() {
|
|
475
473
|
return getPropertyCallableRef('inputDir', 1, KProperty1, function (receiver) {
|
|
476
|
-
return receiver.
|
|
474
|
+
return receiver.z43();
|
|
477
475
|
}, null);
|
|
478
476
|
}
|
|
479
477
|
function outputDir$factory_0() {
|
|
480
478
|
return getPropertyCallableRef('outputDir', 1, KProperty1, function (receiver) {
|
|
481
|
-
return receiver.
|
|
479
|
+
return receiver.b44();
|
|
482
480
|
}, null);
|
|
483
481
|
}
|
|
484
482
|
function packageName$factory_0() {
|
|
485
483
|
return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) {
|
|
486
|
-
return receiver.
|
|
484
|
+
return receiver.c44();
|
|
487
485
|
}, null);
|
|
488
486
|
}
|
|
489
487
|
function logLevel$factory_0() {
|
|
490
488
|
return getPropertyCallableRef('logLevel', 1, KProperty1, function (receiver) {
|
|
491
|
-
return receiver.
|
|
489
|
+
return receiver.d44();
|
|
492
490
|
}, null);
|
|
493
491
|
}
|
|
494
492
|
function shared$factory_0() {
|
|
495
493
|
return getPropertyCallableRef('shared', 1, KProperty1, function (receiver) {
|
|
496
|
-
return receiver.
|
|
494
|
+
return receiver.f44();
|
|
497
495
|
}, null);
|
|
498
496
|
}
|
|
499
497
|
function strict$factory_0() {
|
|
500
498
|
return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) {
|
|
501
|
-
return receiver.
|
|
499
|
+
return receiver.g44();
|
|
502
500
|
}, null);
|
|
503
501
|
}
|
|
504
502
|
function main(args) {
|
|
@@ -509,44 +507,49 @@
|
|
|
509
507
|
var this_0 = numberRangeToNumber(0, 20);
|
|
510
508
|
var destination = ArrayList_init_$Create$();
|
|
511
509
|
// Inline function 'kotlin.collections.forEach' call
|
|
512
|
-
var
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
510
|
+
var inductionVariable = this_0.d1_1;
|
|
511
|
+
var last = this_0.e1_1;
|
|
512
|
+
if (inductionVariable <= last)
|
|
513
|
+
do {
|
|
514
|
+
var element = inductionVariable;
|
|
515
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
516
|
+
// Inline function 'kotlin.collections.mapNotNullTo.<anonymous>' call
|
|
517
|
+
var p0 = element;
|
|
518
|
+
var tmp0_safe_receiver = orNull(args, p0);
|
|
519
|
+
if (tmp0_safe_receiver == null)
|
|
520
|
+
null;
|
|
521
|
+
else {
|
|
522
|
+
// Inline function 'kotlin.let' call
|
|
523
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
524
|
+
destination.e(tmp0_safe_receiver);
|
|
525
|
+
}
|
|
523
526
|
}
|
|
524
|
-
|
|
527
|
+
while (!(element === last));
|
|
525
528
|
var this_1 = copyToArray(destination);
|
|
526
529
|
var tmp = Companion_instance_4;
|
|
527
530
|
var tmp_0 = compile$ref();
|
|
528
531
|
// Inline function 'kotlin.contracts.contract' call
|
|
529
|
-
tmp.
|
|
532
|
+
tmp.x41(tmp_0, convert$ref())(this_1);
|
|
530
533
|
}
|
|
531
534
|
function compile_0(arguments_0) {
|
|
532
|
-
var input = arguments_0.
|
|
533
|
-
var output = arguments_0.
|
|
534
|
-
var languages = arguments_0.
|
|
535
|
-
var packageName = arguments_0.
|
|
536
|
-
var logger = new Logger(arguments_0.
|
|
537
|
-
var operation = arguments_0.
|
|
535
|
+
var input = arguments_0.e29_1;
|
|
536
|
+
var output = arguments_0.f29_1;
|
|
537
|
+
var languages = arguments_0.g29_1;
|
|
538
|
+
var packageName = arguments_0.h29_1;
|
|
539
|
+
var logger = new Logger(arguments_0.i29_1);
|
|
540
|
+
var operation = arguments_0.d29_1;
|
|
538
541
|
if (operation instanceof Convert) {
|
|
539
542
|
var fullPath = input instanceof FullFilePath ? input : THROW_CCE();
|
|
540
543
|
var file = new JsonFile(fullPath);
|
|
541
|
-
var strict = arguments_0.
|
|
542
|
-
var format = operation.
|
|
544
|
+
var strict = arguments_0.k29_1;
|
|
545
|
+
var format = operation.m29_1;
|
|
543
546
|
var tmp;
|
|
544
547
|
switch (format.q2_1) {
|
|
545
548
|
case 0:
|
|
546
|
-
tmp = OpenApiV2Parser_instance.
|
|
549
|
+
tmp = OpenApiV2Parser_instance.p2a(file.z1a(), !strict);
|
|
547
550
|
break;
|
|
548
551
|
case 1:
|
|
549
|
-
tmp = OpenApiV3Parser_instance.
|
|
552
|
+
tmp = OpenApiV3Parser_instance.p2a(file.z1a(), !strict);
|
|
550
553
|
break;
|
|
551
554
|
default:
|
|
552
555
|
noWhenBranchMatchedException();
|
|
@@ -563,43 +566,44 @@
|
|
|
563
566
|
while (tmp0_iterator.h()) {
|
|
564
567
|
var item = tmp0_iterator.i();
|
|
565
568
|
// Inline function 'community.flock.wirespec.plugin.cli.compile.<anonymous>' call
|
|
566
|
-
var emitter = item.
|
|
567
|
-
var file_0 = item.
|
|
568
|
-
var results = emitter.
|
|
569
|
+
var emitter = item.qd();
|
|
570
|
+
var file_0 = item.rd();
|
|
571
|
+
var results = emitter.p22(ast);
|
|
569
572
|
var tmp_0;
|
|
570
|
-
if (!emitter.
|
|
573
|
+
if (!emitter.o22_1) {
|
|
571
574
|
// Inline function 'kotlin.text.replaceFirstChar' call
|
|
572
|
-
var this_1 = _FileName___get_value__impl__3u4cz6(fullPath.
|
|
575
|
+
var this_1 = _FileName___get_value__impl__3u4cz6(fullPath.s29_1);
|
|
573
576
|
var tmp_1;
|
|
574
577
|
// Inline function 'kotlin.text.isNotEmpty' call
|
|
575
578
|
if (charSequenceLength(this_1) > 0) {
|
|
579
|
+
// Inline function 'kotlin.text.uppercase' call
|
|
576
580
|
// Inline function 'kotlin.text.uppercase' call
|
|
577
581
|
var this_2 = charSequenceGet(this_1, 0);
|
|
578
582
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
579
583
|
// Inline function 'kotlin.js.asDynamic' call
|
|
580
|
-
var tmp$ret$
|
|
581
|
-
var tmp_2 = toString(tmp$ret$
|
|
584
|
+
var tmp$ret$4 = toString_0(this_2).toUpperCase();
|
|
585
|
+
var tmp_2 = toString(tmp$ret$4);
|
|
582
586
|
// Inline function 'kotlin.text.substring' call
|
|
583
587
|
// Inline function 'kotlin.js.asDynamic' call
|
|
584
588
|
tmp_1 = tmp_2 + this_1.substring(1);
|
|
585
589
|
} else {
|
|
586
590
|
tmp_1 = this_1;
|
|
587
591
|
}
|
|
588
|
-
var tmp$ret$
|
|
589
|
-
tmp_0 = to(listOf(new Emitted(tmp$ret$
|
|
592
|
+
var tmp$ret$7 = tmp_1;
|
|
593
|
+
tmp_0 = to(listOf(new Emitted(tmp$ret$7, first(results).j25_1)), file_0);
|
|
590
594
|
} else {
|
|
591
595
|
tmp_0 = to(results, file_0);
|
|
592
596
|
}
|
|
593
|
-
var tmp$ret$
|
|
594
|
-
destination.e(tmp$ret$
|
|
597
|
+
var tmp$ret$8 = tmp_0;
|
|
598
|
+
destination.e(tmp$ret$8);
|
|
595
599
|
}
|
|
596
600
|
// Inline function 'kotlin.collections.mapTo' call
|
|
597
601
|
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));
|
|
598
602
|
var tmp0_iterator_0 = destination.g();
|
|
599
603
|
while (tmp0_iterator_0.h()) {
|
|
600
604
|
var item_0 = tmp0_iterator_0.i();
|
|
601
|
-
var results_0 = item_0.
|
|
602
|
-
var file_1 = item_0.
|
|
605
|
+
var results_0 = item_0.qd();
|
|
606
|
+
var file_1 = item_0.rd();
|
|
603
607
|
write(results_0, file_1);
|
|
604
608
|
destination_0.e(Unit_instance);
|
|
605
609
|
}
|
|
@@ -610,19 +614,19 @@
|
|
|
610
614
|
} else {
|
|
611
615
|
if (input instanceof FullDirPath) {
|
|
612
616
|
// Inline function 'kotlin.collections.forEach' call
|
|
613
|
-
var tmp0_iterator_1 = (new Directory(input.
|
|
617
|
+
var tmp0_iterator_1 = (new Directory(input.x29_1)).k45().g();
|
|
614
618
|
while (tmp0_iterator_1.h()) {
|
|
615
619
|
var element = tmp0_iterator_1.i();
|
|
616
620
|
// Inline function 'community.flock.wirespec.plugin.cli.compile.<anonymous>' call
|
|
617
|
-
wirespec(element, languages, packageName, out(element.
|
|
621
|
+
wirespec(element, languages, packageName, out(element.i45_1, packageName, output), logger);
|
|
618
622
|
}
|
|
619
623
|
} else {
|
|
620
624
|
if (input instanceof FullFilePath)
|
|
621
|
-
if (input.
|
|
625
|
+
if (input.t29_1.equals(FileExtension_Wirespec_getInstance())) {
|
|
622
626
|
// Inline function 'kotlin.let' call
|
|
623
627
|
// Inline function 'kotlin.contracts.contract' call
|
|
624
628
|
var it = new WirespecFile(input);
|
|
625
|
-
wirespec(it, languages, packageName, out(it.
|
|
629
|
+
wirespec(it, languages, packageName, out(it.i45_1, packageName, output), logger);
|
|
626
630
|
} else {
|
|
627
631
|
// Inline function 'kotlin.error' call
|
|
628
632
|
var message = 'Path ' + input.toString() + ' is not a Wirespec file';
|
|
@@ -650,14 +654,14 @@
|
|
|
650
654
|
while (tmp0_iterator.h()) {
|
|
651
655
|
var element = tmp0_iterator.i();
|
|
652
656
|
// Inline function 'community.flock.wirespec.plugin.cli.write.<anonymous>' call
|
|
653
|
-
var name = element.
|
|
654
|
-
var result = element.
|
|
655
|
-
var
|
|
657
|
+
var name = element.qd();
|
|
658
|
+
var result = element.rd();
|
|
659
|
+
var tmp1_safe_receiver = file == null ? null : file.l45(_FileName___init__impl__nzn12e(name));
|
|
656
660
|
var tmp;
|
|
657
|
-
if (
|
|
661
|
+
if (tmp1_safe_receiver == null) {
|
|
658
662
|
tmp = null;
|
|
659
663
|
} else {
|
|
660
|
-
|
|
664
|
+
tmp1_safe_receiver.t18(result);
|
|
661
665
|
tmp = Unit_instance;
|
|
662
666
|
}
|
|
663
667
|
if (tmp == null) {
|
|
@@ -691,7 +695,7 @@
|
|
|
691
695
|
tmp = to(tmp_0, tmp_1);
|
|
692
696
|
break;
|
|
693
697
|
case 1:
|
|
694
|
-
var tmp_2 = new
|
|
698
|
+
var tmp_2 = new KotlinEmitter(packageString, logger);
|
|
695
699
|
var tmp_3;
|
|
696
700
|
if (path == null) {
|
|
697
701
|
tmp_3 = null;
|
|
@@ -699,13 +703,13 @@
|
|
|
699
703
|
// Inline function 'kotlin.let' call
|
|
700
704
|
// Inline function 'kotlin.contracts.contract' call
|
|
701
705
|
// Inline function 'community.flock.wirespec.plugin.cli.emitters.<anonymous>.<anonymous>' call
|
|
702
|
-
tmp_3 = new
|
|
706
|
+
tmp_3 = new KotlinFile(path(FileExtension_Kotlin_getInstance()));
|
|
703
707
|
}
|
|
704
708
|
|
|
705
709
|
tmp = to(tmp_2, tmp_3);
|
|
706
710
|
break;
|
|
707
711
|
case 2:
|
|
708
|
-
var tmp_4 = new
|
|
712
|
+
var tmp_4 = new ScalaEmitter(packageString, logger);
|
|
709
713
|
var tmp_5;
|
|
710
714
|
if (path == null) {
|
|
711
715
|
tmp_5 = null;
|
|
@@ -713,13 +717,13 @@
|
|
|
713
717
|
// Inline function 'kotlin.let' call
|
|
714
718
|
// Inline function 'kotlin.contracts.contract' call
|
|
715
719
|
// Inline function 'community.flock.wirespec.plugin.cli.emitters.<anonymous>.<anonymous>' call
|
|
716
|
-
tmp_5 = new
|
|
720
|
+
tmp_5 = new ScalaFile(path(FileExtension_Scala_getInstance()));
|
|
717
721
|
}
|
|
718
722
|
|
|
719
723
|
tmp = to(tmp_4, tmp_5);
|
|
720
724
|
break;
|
|
721
725
|
case 3:
|
|
722
|
-
var tmp_6 = new
|
|
726
|
+
var tmp_6 = new TypeScriptEmitter(logger);
|
|
723
727
|
var tmp_7;
|
|
724
728
|
if (path == null) {
|
|
725
729
|
tmp_7 = null;
|
|
@@ -727,13 +731,13 @@
|
|
|
727
731
|
// Inline function 'kotlin.let' call
|
|
728
732
|
// Inline function 'kotlin.contracts.contract' call
|
|
729
733
|
// Inline function 'community.flock.wirespec.plugin.cli.emitters.<anonymous>.<anonymous>' call
|
|
730
|
-
tmp_7 = new
|
|
734
|
+
tmp_7 = new TypeScriptFile(path(FileExtension_TypeScript_getInstance()));
|
|
731
735
|
}
|
|
732
736
|
|
|
733
737
|
tmp = to(tmp_6, tmp_7);
|
|
734
738
|
break;
|
|
735
739
|
case 4:
|
|
736
|
-
var tmp_8 = new
|
|
740
|
+
var tmp_8 = new WirespecEmitter(logger);
|
|
737
741
|
var tmp_9;
|
|
738
742
|
if (path == null) {
|
|
739
743
|
tmp_9 = null;
|
|
@@ -741,45 +745,17 @@
|
|
|
741
745
|
// Inline function 'kotlin.let' call
|
|
742
746
|
// Inline function 'kotlin.contracts.contract' call
|
|
743
747
|
// Inline function 'community.flock.wirespec.plugin.cli.emitters.<anonymous>.<anonymous>' call
|
|
744
|
-
tmp_9 = new
|
|
748
|
+
tmp_9 = new WirespecFile(path(FileExtension_Wirespec_getInstance()));
|
|
745
749
|
}
|
|
746
750
|
|
|
747
751
|
tmp = to(tmp_8, tmp_9);
|
|
748
752
|
break;
|
|
749
|
-
case 5:
|
|
750
|
-
var tmp_10 = new TypeScriptEmitter(logger);
|
|
751
|
-
var tmp_11;
|
|
752
|
-
if (path == null) {
|
|
753
|
-
tmp_11 = null;
|
|
754
|
-
} else {
|
|
755
|
-
// Inline function 'kotlin.let' call
|
|
756
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
757
|
-
// Inline function 'community.flock.wirespec.plugin.cli.emitters.<anonymous>.<anonymous>' call
|
|
758
|
-
tmp_11 = new TypeScriptFile(path(FileExtension_TypeScript_getInstance()));
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
tmp = to(tmp_10, tmp_11);
|
|
762
|
-
break;
|
|
763
|
-
case 6:
|
|
764
|
-
var tmp_12 = new WirespecEmitter(logger);
|
|
765
|
-
var tmp_13;
|
|
766
|
-
if (path == null) {
|
|
767
|
-
tmp_13 = null;
|
|
768
|
-
} else {
|
|
769
|
-
// Inline function 'kotlin.let' call
|
|
770
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
771
|
-
// Inline function 'community.flock.wirespec.plugin.cli.emitters.<anonymous>.<anonymous>' call
|
|
772
|
-
tmp_13 = new WirespecFile(path(FileExtension_Wirespec_getInstance()));
|
|
773
|
-
}
|
|
774
|
-
|
|
775
|
-
tmp = to(tmp_12, tmp_13);
|
|
776
|
-
break;
|
|
777
753
|
default:
|
|
778
754
|
noWhenBranchMatchedException();
|
|
779
755
|
break;
|
|
780
756
|
}
|
|
781
|
-
var tmp$ret$
|
|
782
|
-
destination.e(tmp$ret$
|
|
757
|
+
var tmp$ret$10 = tmp;
|
|
758
|
+
destination.e(tmp$ret$10);
|
|
783
759
|
}
|
|
784
760
|
return destination;
|
|
785
761
|
}
|
|
@@ -787,10 +763,10 @@
|
|
|
787
763
|
// Inline function 'kotlin.collections.map' call
|
|
788
764
|
// Inline function 'kotlin.let' call
|
|
789
765
|
// Inline function 'kotlin.let' call
|
|
790
|
-
var this_0 = _this__u8e3s4.
|
|
791
|
-
var tmp1_let_this = WirespecSpec_getInstance();
|
|
766
|
+
var this_0 = _this__u8e3s4.z1a();
|
|
792
767
|
// Inline function 'kotlin.contracts.contract' call
|
|
793
|
-
var
|
|
768
|
+
var $receiver = WirespecSpec_getInstance();
|
|
769
|
+
var this_1 = compile($receiver, this_0)(logger);
|
|
794
770
|
// Inline function 'kotlin.contracts.contract' call
|
|
795
771
|
// Inline function 'community.flock.wirespec.plugin.cli.wirespec.<anonymous>' call
|
|
796
772
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -801,11 +777,11 @@
|
|
|
801
777
|
while (tmp0_iterator.h()) {
|
|
802
778
|
var item = tmp0_iterator.i();
|
|
803
779
|
// Inline function 'community.flock.wirespec.plugin.cli.wirespec.<anonymous>.<anonymous>' call
|
|
804
|
-
var emitter = item.
|
|
805
|
-
var file = item.
|
|
780
|
+
var emitter = item.qd();
|
|
781
|
+
var file = item.rd();
|
|
806
782
|
var results = this_1(emitter);
|
|
807
783
|
var tmp;
|
|
808
|
-
if (!emitter.
|
|
784
|
+
if (!emitter.o22_1) {
|
|
809
785
|
// Inline function 'arrow.core.Either.map' call
|
|
810
786
|
// Inline function 'kotlin.contracts.contract' call
|
|
811
787
|
// Inline function 'arrow.core.flatMap' call
|
|
@@ -814,8 +790,8 @@
|
|
|
814
790
|
if (results instanceof Right) {
|
|
815
791
|
// Inline function 'arrow.core.Either.map.<anonymous>' call
|
|
816
792
|
// Inline function 'community.flock.wirespec.plugin.cli.wirespec.<anonymous>.<anonymous>.<anonymous>' call
|
|
817
|
-
var it = results.
|
|
818
|
-
var tmp$ret$2 = listOf(new Emitted(Companion_getInstance().
|
|
793
|
+
var it = results.ak_1;
|
|
794
|
+
var tmp$ret$2 = listOf(new Emitted(Companion_getInstance().h24(_FileName___get_value__impl__3u4cz6(path(FileExtension_Wirespec_getInstance()).s29_1)), first(it).j25_1));
|
|
819
795
|
tmp_0 = new Right(tmp$ret$2);
|
|
820
796
|
} else {
|
|
821
797
|
if (results instanceof Left) {
|
|
@@ -837,13 +813,13 @@
|
|
|
837
813
|
var tmp0_iterator_0 = destination.g();
|
|
838
814
|
while (tmp0_iterator_0.h()) {
|
|
839
815
|
var item_0 = tmp0_iterator_0.i();
|
|
840
|
-
var results_0 = item_0.
|
|
841
|
-
var file_0 = item_0.
|
|
816
|
+
var results_0 = item_0.qd();
|
|
817
|
+
var file_0 = item_0.rd();
|
|
842
818
|
if (results_0 instanceof Right) {
|
|
843
|
-
write(results_0.
|
|
819
|
+
write(results_0.ak_1, file_0);
|
|
844
820
|
} else {
|
|
845
821
|
if (results_0 instanceof Left) {
|
|
846
|
-
println(results_0.
|
|
822
|
+
println(results_0.uj_1);
|
|
847
823
|
} else {
|
|
848
824
|
noWhenBranchMatchedException();
|
|
849
825
|
}
|
|
@@ -870,7 +846,7 @@
|
|
|
870
846
|
function compile$lambda($output) {
|
|
871
847
|
return function (it) {
|
|
872
848
|
var tmp = $output;
|
|
873
|
-
return new FullFilePath(_Output___get_value__impl__a8kw1g(ensureNotNull(tmp == null ? null : new Output(tmp)).
|
|
849
|
+
return new FullFilePath(_Output___get_value__impl__a8kw1g(ensureNotNull(tmp == null ? null : new Output(tmp)).a2a_1), _FileName___init__impl__nzn12e('console'), it);
|
|
874
850
|
};
|
|
875
851
|
}
|
|
876
852
|
function out$lambda($output, $this_out, $packageName) {
|
|
@@ -882,55 +858,55 @@
|
|
|
882
858
|
// Inline function 'kotlin.text.lowercase' call
|
|
883
859
|
// Inline function 'kotlin.js.asDynamic' call
|
|
884
860
|
var tmp$ret$1 = extension.p2_1.toLowerCase();
|
|
885
|
-
tmp = $this_out.
|
|
861
|
+
tmp = $this_out.r29_1 + '/out/' + tmp$ret$1;
|
|
886
862
|
} else {
|
|
887
863
|
tmp = new Output(tmp0_elvis_lhs);
|
|
888
864
|
}
|
|
889
865
|
var dir = tmp;
|
|
890
|
-
return $this_out.
|
|
866
|
+
return $this_out.v29(toString(dir) + '/' + joinToString(split(_PackageName___get_value__impl__2zr98c($packageName), charArrayOf([_Char___init__impl__6a9atx(46)])), '/'), VOID, extension);
|
|
891
867
|
};
|
|
892
868
|
}
|
|
893
869
|
function JavaFile(path) {
|
|
894
|
-
File.call(this, path.
|
|
870
|
+
File.call(this, path.v29(VOID, VOID, FileExtension_Java_getInstance()));
|
|
895
871
|
}
|
|
896
|
-
protoOf(JavaFile).
|
|
897
|
-
return new JavaFile(this.
|
|
872
|
+
protoOf(JavaFile).l45 = function (fileName) {
|
|
873
|
+
return new JavaFile(this.i45_1.v29(VOID, fileName));
|
|
898
874
|
};
|
|
899
875
|
function JsonFile(path) {
|
|
900
|
-
File.call(this, path.
|
|
876
|
+
File.call(this, path.v29(VOID, VOID, FileExtension_Json_getInstance()));
|
|
901
877
|
}
|
|
902
|
-
protoOf(JsonFile).
|
|
903
|
-
return new JsonFile(this.
|
|
878
|
+
protoOf(JsonFile).l45 = function (fileName) {
|
|
879
|
+
return new JsonFile(this.i45_1.v29(VOID, fileName));
|
|
904
880
|
};
|
|
905
881
|
function KotlinFile(path) {
|
|
906
|
-
File.call(this, path.
|
|
882
|
+
File.call(this, path.v29(VOID, VOID, FileExtension_Kotlin_getInstance()));
|
|
907
883
|
}
|
|
908
|
-
protoOf(KotlinFile).
|
|
909
|
-
return new KotlinFile(this.
|
|
884
|
+
protoOf(KotlinFile).l45 = function (fileName) {
|
|
885
|
+
return new KotlinFile(this.i45_1.v29(VOID, fileName));
|
|
910
886
|
};
|
|
911
887
|
function ScalaFile(path) {
|
|
912
|
-
File.call(this, path.
|
|
888
|
+
File.call(this, path.v29(VOID, VOID, FileExtension_Scala_getInstance()));
|
|
913
889
|
}
|
|
914
|
-
protoOf(ScalaFile).
|
|
915
|
-
return new ScalaFile(this.
|
|
890
|
+
protoOf(ScalaFile).l45 = function (fileName) {
|
|
891
|
+
return new ScalaFile(this.i45_1.v29(VOID, fileName));
|
|
916
892
|
};
|
|
917
893
|
function TypeScriptFile(path) {
|
|
918
|
-
File.call(this, path.
|
|
894
|
+
File.call(this, path.v29(VOID, VOID, FileExtension_TypeScript_getInstance()));
|
|
919
895
|
}
|
|
920
|
-
protoOf(TypeScriptFile).
|
|
921
|
-
return new TypeScriptFile(this.
|
|
896
|
+
protoOf(TypeScriptFile).l45 = function (fileName) {
|
|
897
|
+
return new TypeScriptFile(this.i45_1.v29(VOID, fileName));
|
|
922
898
|
};
|
|
923
899
|
function WirespecFile(path) {
|
|
924
|
-
File.call(this, path.
|
|
900
|
+
File.call(this, path.v29(VOID, VOID, FileExtension_Wirespec_getInstance()));
|
|
925
901
|
}
|
|
926
|
-
protoOf(WirespecFile).
|
|
927
|
-
return new WirespecFile(this.
|
|
902
|
+
protoOf(WirespecFile).l45 = function (fileName) {
|
|
903
|
+
return new WirespecFile(this.i45_1.v29(VOID, fileName));
|
|
928
904
|
};
|
|
929
905
|
function cli(args) {
|
|
930
906
|
main(args);
|
|
931
907
|
}
|
|
932
908
|
function parser(source) {
|
|
933
|
-
var tmp0_safe_receiver = parse(WirespecSpec_getInstance(), source)(get_noLogger()).
|
|
909
|
+
var tmp0_safe_receiver = parse(WirespecSpec_getInstance(), source)(get_noLogger()).zj();
|
|
934
910
|
var tmp;
|
|
935
911
|
if (tmp0_safe_receiver == null) {
|
|
936
912
|
tmp = null;
|
|
@@ -972,13 +948,13 @@
|
|
|
972
948
|
// Inline function 'kotlin.collections.toTypedArray' call
|
|
973
949
|
tmp_1 = copyToArray(tmp2_safe_receiver);
|
|
974
950
|
}
|
|
975
|
-
var
|
|
951
|
+
var tmp3_elvis_lhs = tmp_1;
|
|
976
952
|
var tmp_2;
|
|
977
|
-
if (
|
|
953
|
+
if (tmp3_elvis_lhs == null) {
|
|
978
954
|
var message = 'Cannot parse source';
|
|
979
955
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
980
956
|
} else {
|
|
981
|
-
tmp_2 =
|
|
957
|
+
tmp_2 = tmp3_elvis_lhs;
|
|
982
958
|
}
|
|
983
959
|
return tmp_2;
|
|
984
960
|
}
|
|
@@ -987,14 +963,14 @@
|
|
|
987
963
|
return it;
|
|
988
964
|
}
|
|
989
965
|
function Directory$wirespecFiles$lambda_0(it) {
|
|
990
|
-
return endsWith(it, FileExtension_Wirespec_getInstance().
|
|
966
|
+
return endsWith(it, FileExtension_Wirespec_getInstance().q29_1);
|
|
991
967
|
}
|
|
992
968
|
function Directory$wirespecFiles$lambda_1(it) {
|
|
993
|
-
return dropLast(it, FileExtension_Wirespec_getInstance().
|
|
969
|
+
return dropLast(it, FileExtension_Wirespec_getInstance().q29_1.length + 1 | 0);
|
|
994
970
|
}
|
|
995
971
|
function Directory$wirespecFiles$lambda_2(this$0) {
|
|
996
972
|
return function (it) {
|
|
997
|
-
return new FullFilePath(this$0.
|
|
973
|
+
return new FullFilePath(this$0.j45_1, _FileName___init__impl__nzn12e(it));
|
|
998
974
|
};
|
|
999
975
|
}
|
|
1000
976
|
function WirespecFile$_init_$ref_cj1n5j() {
|
|
@@ -1005,10 +981,10 @@
|
|
|
1005
981
|
return l;
|
|
1006
982
|
}
|
|
1007
983
|
function Directory(path) {
|
|
1008
|
-
this.
|
|
984
|
+
this.j45_1 = path;
|
|
1009
985
|
}
|
|
1010
|
-
protoOf(Directory).
|
|
1011
|
-
var tmp = asSequence(iterator(get_fs().readdirSync(this.
|
|
986
|
+
protoOf(Directory).k45 = function () {
|
|
987
|
+
var tmp = asSequence(iterator(get_fs().readdirSync(this.j45_1, 'utf-8')));
|
|
1012
988
|
var tmp_0 = map(tmp, Directory$wirespecFiles$lambda);
|
|
1013
989
|
var tmp_1 = filter(tmp_0, Directory$wirespecFiles$lambda_0);
|
|
1014
990
|
var tmp_2 = map(tmp_1, Directory$wirespecFiles$lambda_1);
|
|
@@ -1016,20 +992,20 @@
|
|
|
1016
992
|
return toSet_0(map(tmp_3, WirespecFile$_init_$ref_cj1n5j()));
|
|
1017
993
|
};
|
|
1018
994
|
function File(path) {
|
|
1019
|
-
this.
|
|
995
|
+
this.i45_1 = path;
|
|
1020
996
|
}
|
|
1021
|
-
protoOf(File).
|
|
997
|
+
protoOf(File).z1a = function () {
|
|
1022
998
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1023
|
-
return get_fs().readFileSync(this.
|
|
999
|
+
return get_fs().readFileSync(this.i45_1.toString(), 'utf-8');
|
|
1024
1000
|
};
|
|
1025
|
-
protoOf(File).
|
|
1001
|
+
protoOf(File).t18 = function (text) {
|
|
1026
1002
|
// Inline function 'kotlin.run' call
|
|
1027
1003
|
// Inline function 'kotlin.contracts.contract' call
|
|
1028
1004
|
// Inline function 'community.flock.wirespec.plugin.cli.io.File.write.<anonymous>' call
|
|
1029
|
-
var $this$run = this.
|
|
1005
|
+
var $this$run = this.i45_1.v29(joinToString(split_0(this.i45_1.r29_1, ['out']), 'out/node'));
|
|
1030
1006
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1031
|
-
if (!get_fs().existsSync($this$run.
|
|
1032
|
-
get_fs().mkdirSync($this$run.
|
|
1007
|
+
if (!get_fs().existsSync($this$run.r29_1)) {
|
|
1008
|
+
get_fs().mkdirSync($this$run.r29_1, {recursive: true});
|
|
1033
1009
|
}
|
|
1034
1010
|
get_fs().writeFileSync($this$run.toString(), text);
|
|
1035
1011
|
};
|