@flock/wirespec 0.10.21 → 0.10.23
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-core.js +11 -3
- package/arrow-arrow-core.js.map +1 -1
- package/clikt-clikt.js +1168 -1167
- package/clikt-clikt.js.map +1 -1
- package/colormath-root-colormath.js +425 -425
- package/kotlin-kotlin-stdlib.js +13 -13
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlin-rgxgen.js +1767 -1767
- package/markdown.js +1871 -1871
- package/mordant-mordant.js +1642 -1642
- package/package.json +1 -1
- package/wirespec-src-compiler-core.js +1635 -1340
- package/wirespec-src-compiler-core.js.map +1 -1
- package/wirespec-src-compiler-lib.js +348 -328
- package/wirespec-src-compiler-lib.js.map +1 -1
- package/wirespec-src-converter-openapi.js +528 -405
- package/wirespec-src-converter-openapi.js.map +1 -1
- package/wirespec-src-plugin-arguments.js +78 -78
- package/wirespec-src-plugin-arguments.js.map +1 -1
- package/wirespec-src-plugin-cli.js +265 -184
- package/wirespec-src-plugin-cli.js.map +1 -1
- package/wirespec-src-plugin-npm.d.ts +6 -2
- package/wirespec-src-plugin-npm.js +8 -8
- package/wirespec-src-tools-generator.js +47 -55
- package/wirespec-src-tools-generator.js.map +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (factory) {
|
|
2
2
|
if (typeof define === 'function' && define.amd)
|
|
3
|
-
define(['exports', './kotlin-kotlin-stdlib.js', './clikt-clikt.js', './wirespec-src-plugin-arguments.js', './
|
|
3
|
+
define(['exports', './kotlin-kotlin-stdlib.js', './clikt-clikt.js', './wirespec-src-plugin-arguments.js', './arrow-arrow-core.js', './wirespec-src-compiler-core.js', './wirespec-src-converter-openapi.js', './wirespec-src-compiler-lib.js'], factory);
|
|
4
4
|
else if (typeof exports === 'object')
|
|
5
|
-
factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./clikt-clikt.js'), require('./wirespec-src-plugin-arguments.js'), require('./
|
|
5
|
+
factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./clikt-clikt.js'), require('./wirespec-src-plugin-arguments.js'), require('./arrow-arrow-core.js'), require('./wirespec-src-compiler-core.js'), require('./wirespec-src-converter-openapi.js'), require('./wirespec-src-compiler-lib.js'));
|
|
6
6
|
else {
|
|
7
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'.");
|
|
@@ -13,75 +13,82 @@
|
|
|
13
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 globalThis['arrow-arrow-core'] === 'undefined') {
|
|
17
|
+
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'.");
|
|
18
|
+
}
|
|
16
19
|
if (typeof globalThis['wirespec-src-compiler-core'] === 'undefined') {
|
|
17
20
|
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
21
|
}
|
|
19
22
|
if (typeof globalThis['wirespec-src-converter-openapi'] === 'undefined') {
|
|
20
23
|
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
24
|
}
|
|
22
|
-
if (typeof globalThis['arrow-arrow-core'] === 'undefined') {
|
|
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
|
-
}
|
|
25
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
|
-
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['
|
|
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['arrow-arrow-core'], globalThis['wirespec-src-compiler-core'], globalThis['wirespec-src-converter-openapi'], globalThis['wirespec-src-compiler-lib']);
|
|
29
29
|
}
|
|
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,
|
|
30
|
+
}(function (_, kotlin_kotlin, kotlin_clikt_clikt, kotlin_community_flock_wirespec_plugin_arguments_arguments, kotlin_io_arrow_kt_arrow_core, kotlin_community_flock_wirespec_compiler_core, kotlin_community_flock_wirespec_converter_openapi, kotlin_community_flock_wirespec_compiler_lib) {
|
|
31
31
|
'use strict';
|
|
32
32
|
//region block: imports
|
|
33
33
|
var Unit_instance = kotlin_kotlin.$_$.g4;
|
|
34
|
-
var subcommands = kotlin_clikt_clikt.$_$.
|
|
34
|
+
var subcommands = kotlin_clikt_clikt.$_$.d;
|
|
35
35
|
var protoOf = kotlin_kotlin.$_$.xa;
|
|
36
36
|
var initMetadataForCompanion = kotlin_kotlin.$_$.y9;
|
|
37
|
-
var NoOpCliktCommand = kotlin_clikt_clikt.$_$.
|
|
37
|
+
var NoOpCliktCommand = kotlin_clikt_clikt.$_$.c;
|
|
38
38
|
var VOID = kotlin_kotlin.$_$.g;
|
|
39
39
|
var initMetadataForClass = kotlin_kotlin.$_$.x9;
|
|
40
|
-
var option = kotlin_clikt_clikt.$_$.
|
|
40
|
+
var option = kotlin_clikt_clikt.$_$.i;
|
|
41
41
|
var Companion_instance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.x;
|
|
42
|
-
var choice = kotlin_clikt_clikt.$_$.
|
|
43
|
-
var multiple = kotlin_clikt_clikt.$_$.
|
|
42
|
+
var choice = kotlin_clikt_clikt.$_$.k;
|
|
43
|
+
var multiple = kotlin_clikt_clikt.$_$.h;
|
|
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
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
|
-
var
|
|
49
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.eg;
|
|
50
|
+
var joinToString = kotlin_kotlin.$_$.s6;
|
|
51
|
+
var CliktError = kotlin_clikt_clikt.$_$.b;
|
|
52
|
+
var Left = kotlin_io_arrow_kt_arrow_core.$_$.d;
|
|
53
|
+
var Right = kotlin_io_arrow_kt_arrow_core.$_$.e;
|
|
54
|
+
var argument = kotlin_clikt_clikt.$_$.e;
|
|
50
55
|
var values = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.c;
|
|
51
56
|
var mapCapacity = kotlin_kotlin.$_$.i7;
|
|
52
57
|
var coerceAtLeast = kotlin_kotlin.$_$.ib;
|
|
53
58
|
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.t;
|
|
54
|
-
var choice_0 = kotlin_clikt_clikt.$_$.
|
|
59
|
+
var choice_0 = kotlin_clikt_clikt.$_$.j;
|
|
55
60
|
var Language_Wirespec_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.p;
|
|
56
61
|
var listOf = kotlin_kotlin.$_$.g7;
|
|
57
62
|
var Convert = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.g;
|
|
58
63
|
var setOf = kotlin_kotlin.$_$.u7;
|
|
59
64
|
var CliktCommand = kotlin_clikt_clikt.$_$.a;
|
|
60
|
-
var default_0 = kotlin_clikt_clikt.$_$.
|
|
61
|
-
var Companion_instance_1 = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
62
|
-
var Level_ERROR_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
63
|
-
var flag = kotlin_clikt_clikt.$_$.
|
|
65
|
+
var default_0 = kotlin_clikt_clikt.$_$.f;
|
|
66
|
+
var Companion_instance_1 = kotlin_community_flock_wirespec_compiler_core.$_$.n2;
|
|
67
|
+
var Level_ERROR_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.d2;
|
|
68
|
+
var flag = kotlin_clikt_clikt.$_$.g;
|
|
64
69
|
var Companion_instance_2 = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.w;
|
|
65
70
|
var FullDirPath = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.d;
|
|
66
71
|
var Console_instance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.v;
|
|
67
|
-
var toString = kotlin_kotlin.$_$.bb;
|
|
68
|
-
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.l1;
|
|
69
72
|
var THROW_CCE = kotlin_kotlin.$_$.if;
|
|
70
73
|
var isCharSequence = kotlin_kotlin.$_$.ha;
|
|
71
74
|
var trim = kotlin_kotlin.$_$.pe;
|
|
72
|
-
var
|
|
73
|
-
var
|
|
74
|
-
var
|
|
75
|
+
var toString = kotlin_kotlin.$_$.bb;
|
|
76
|
+
var Level_DEBUG_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.c2;
|
|
77
|
+
var Level_INFO_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.e2;
|
|
78
|
+
var Level_WARN_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.f2;
|
|
75
79
|
var Enum = kotlin_kotlin.$_$.ye;
|
|
76
80
|
var KProperty1 = kotlin_kotlin.$_$.sb;
|
|
77
81
|
var getPropertyCallableRef = kotlin_kotlin.$_$.u9;
|
|
78
82
|
var numberRangeToNumber = kotlin_kotlin.$_$.ra;
|
|
79
83
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.l;
|
|
80
84
|
var copyToArray = kotlin_kotlin.$_$.x5;
|
|
81
|
-
var Logger = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
82
|
-
var
|
|
85
|
+
var Logger = kotlin_community_flock_wirespec_compiler_core.$_$.q1;
|
|
86
|
+
var FileReadException = kotlin_community_flock_wirespec_compiler_core.$_$.h;
|
|
87
|
+
var nonEmptyListOf = kotlin_io_arrow_kt_arrow_core.$_$.i;
|
|
88
|
+
var left = kotlin_io_arrow_kt_arrow_core.$_$.h;
|
|
83
89
|
var FileExtension_Wirespec_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.o;
|
|
84
90
|
var FullFilePath = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.e;
|
|
91
|
+
var addAll = kotlin_kotlin.$_$.y4;
|
|
85
92
|
var Console = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.b;
|
|
86
93
|
var Compile = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.f;
|
|
87
94
|
var OpenApiV2Parser_instance = kotlin_community_flock_wirespec_converter_openapi.$_$.b;
|
|
@@ -95,10 +102,11 @@
|
|
|
95
102
|
var toString_0 = kotlin_kotlin.$_$.z1;
|
|
96
103
|
var first = kotlin_kotlin.$_$.h6;
|
|
97
104
|
var Emitted = kotlin_community_flock_wirespec_compiler_core.$_$.a;
|
|
105
|
+
var right = kotlin_io_arrow_kt_arrow_core.$_$.k;
|
|
98
106
|
var _FileName___init__impl__nzn12e = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.q;
|
|
99
107
|
var print = kotlin_kotlin.$_$.d9;
|
|
100
108
|
var PackageName = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.i;
|
|
101
|
-
var component1 = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
109
|
+
var component1 = kotlin_community_flock_wirespec_compiler_core.$_$.o1;
|
|
102
110
|
var JavaEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.c;
|
|
103
111
|
var FileExtension_Java_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.j;
|
|
104
112
|
var KotlinEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.d;
|
|
@@ -111,12 +119,9 @@
|
|
|
111
119
|
var OpenApiV2Emitter_getInstance = kotlin_community_flock_wirespec_converter_openapi.$_$.a;
|
|
112
120
|
var FileExtension_Json_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.k;
|
|
113
121
|
var OpenApiV3Emitter_getInstance = kotlin_community_flock_wirespec_converter_openapi.$_$.c;
|
|
114
|
-
var WirespecSpec_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
115
|
-
var compile = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
116
|
-
var
|
|
117
|
-
var Companion_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.d2;
|
|
118
|
-
var Right = kotlin_io_arrow_kt_arrow_core.$_$.e;
|
|
119
|
-
var println = kotlin_kotlin.$_$.b9;
|
|
122
|
+
var WirespecSpec_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.m2;
|
|
123
|
+
var compile = kotlin_community_flock_wirespec_compiler_core.$_$.n1;
|
|
124
|
+
var Companion_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.h2;
|
|
120
125
|
var Output = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.h;
|
|
121
126
|
var ensureNotNull = kotlin_kotlin.$_$.yf;
|
|
122
127
|
var _Output___get_value__impl__a8kw1g = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.s;
|
|
@@ -124,12 +129,12 @@
|
|
|
124
129
|
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.v1;
|
|
125
130
|
var charArrayOf = kotlin_kotlin.$_$.j9;
|
|
126
131
|
var split = kotlin_kotlin.$_$.nd;
|
|
127
|
-
var
|
|
128
|
-
var
|
|
129
|
-
var
|
|
130
|
-
var Definition = kotlin_community_flock_wirespec_compiler_core.$_$.k;
|
|
132
|
+
var parse = kotlin_community_flock_wirespec_compiler_core.$_$.p1;
|
|
133
|
+
var get_noLogger = kotlin_community_flock_wirespec_compiler_core.$_$.r1;
|
|
134
|
+
var Definition = kotlin_community_flock_wirespec_compiler_core.$_$.l;
|
|
131
135
|
var isInterface = kotlin_kotlin.$_$.la;
|
|
132
136
|
var produce = kotlin_community_flock_wirespec_compiler_lib.$_$.e;
|
|
137
|
+
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.l1;
|
|
133
138
|
var endsWith = kotlin_kotlin.$_$.nc;
|
|
134
139
|
var dropLast = kotlin_kotlin.$_$.kc;
|
|
135
140
|
var iterator = kotlin_kotlin.$_$.oa;
|
|
@@ -163,7 +168,7 @@
|
|
|
163
168
|
//endregion
|
|
164
169
|
function WirespecCli$main$ref($boundThis) {
|
|
165
170
|
var l = function (p0) {
|
|
166
|
-
$boundThis.
|
|
171
|
+
$boundThis.r3q(p0);
|
|
167
172
|
return Unit_instance;
|
|
168
173
|
};
|
|
169
174
|
l.callableName = 'main';
|
|
@@ -171,8 +176,8 @@
|
|
|
171
176
|
}
|
|
172
177
|
function Companion() {
|
|
173
178
|
}
|
|
174
|
-
protoOf(Companion).
|
|
175
|
-
return WirespecCli$main$ref(subcommands(new WirespecCli(), [new Compile_0(compile), new Convert_0(convert)]));
|
|
179
|
+
protoOf(Companion).w42 = function (compile, convert, write) {
|
|
180
|
+
return WirespecCli$main$ref(subcommands(new WirespecCli(), [new Compile_0(compile, write), new Convert_0(convert, write)]));
|
|
176
181
|
};
|
|
177
182
|
var Companion_instance_4;
|
|
178
183
|
function Companion_getInstance_0() {
|
|
@@ -182,28 +187,53 @@
|
|
|
182
187
|
NoOpCliktCommand.call(this, VOID, VOID, 'wirespec');
|
|
183
188
|
}
|
|
184
189
|
function _get_languages__ojonze($this) {
|
|
185
|
-
return $this.
|
|
190
|
+
return $this.x43_1.d40($this, languages$factory_0());
|
|
191
|
+
}
|
|
192
|
+
function Compile$run$lambda(e) {
|
|
193
|
+
var tmp0_elvis_lhs = e.message;
|
|
194
|
+
return tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
|
|
186
195
|
}
|
|
187
|
-
function Compile_0(block) {
|
|
196
|
+
function Compile_0(block, write) {
|
|
188
197
|
CommonOptions.call(this);
|
|
189
|
-
this.
|
|
190
|
-
this.
|
|
198
|
+
this.v43_1 = block;
|
|
199
|
+
this.w43_1 = write;
|
|
200
|
+
this.x43_1 = multiple(choice(option(this, Options_Language_getInstance().a44_1.slice(), 'Language'), Companion_instance.d2c()), VOID, true).o40(this, languages$factory());
|
|
191
201
|
}
|
|
192
|
-
protoOf(Compile_0).
|
|
202
|
+
protoOf(Compile_0).s3q = function () {
|
|
203
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
193
204
|
// Inline function 'kotlin.let' call
|
|
194
|
-
var this_0 = new CompilerArguments(Compile_instance, this.
|
|
205
|
+
var this_0 = new CompilerArguments(Compile_instance, this.a45(this.z44()), Companion_instance_0.e2c(this.b45()), toSet(_get_languages__ojonze(this)), _PackageName___init__impl__s13tbs(this.c45()), this.e45(this.d45()), this.f45(), this.g45());
|
|
195
206
|
// Inline function 'kotlin.contracts.contract' call
|
|
196
|
-
this.
|
|
207
|
+
var tmp0_iterator = this.v43_1(this_0).g();
|
|
208
|
+
while (tmp0_iterator.h()) {
|
|
209
|
+
var element = tmp0_iterator.i();
|
|
210
|
+
// Inline function 'community.flock.wirespec.plugin.cli.Compile.run.<anonymous>' call
|
|
211
|
+
if (element instanceof Right) {
|
|
212
|
+
// Inline function 'kotlin.let' call
|
|
213
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
214
|
+
var destruct = element.ak_1;
|
|
215
|
+
var result = destruct.qd();
|
|
216
|
+
var file = destruct.rd();
|
|
217
|
+
this.w43_1(result, file);
|
|
218
|
+
} else {
|
|
219
|
+
if (element instanceof Left) {
|
|
220
|
+
throw new CliktError(joinToString(element.uj_1, VOID, VOID, VOID, VOID, VOID, Compile$run$lambda));
|
|
221
|
+
} else {
|
|
222
|
+
noWhenBranchMatchedException();
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
197
226
|
};
|
|
198
227
|
function _get_format__qlarck($this) {
|
|
199
|
-
return $this.
|
|
228
|
+
return $this.h46_1.d40($this, format$factory_0());
|
|
200
229
|
}
|
|
201
230
|
function _get_languages__ojonze_0($this) {
|
|
202
|
-
return $this.
|
|
231
|
+
return $this.i46_1.d40($this, languages$factory_2());
|
|
203
232
|
}
|
|
204
|
-
function Convert_0(block) {
|
|
233
|
+
function Convert_0(block, write) {
|
|
205
234
|
CommonOptions.call(this);
|
|
206
|
-
this.
|
|
235
|
+
this.f46_1 = block;
|
|
236
|
+
this.g46_1 = write;
|
|
207
237
|
var tmp = this;
|
|
208
238
|
// Inline function 'com.github.ajalt.clikt.parameters.types.enum' call
|
|
209
239
|
var this_0 = argument(this, VOID, 'Input format');
|
|
@@ -223,21 +253,22 @@
|
|
|
223
253
|
var tmp$ret$2 = element.p2_1;
|
|
224
254
|
destination.m2(tmp$ret$2, element);
|
|
225
255
|
}
|
|
226
|
-
tmp.
|
|
227
|
-
this.
|
|
256
|
+
tmp.h46_1 = choice_0(this_0, destination, true).j3z(this, format$factory());
|
|
257
|
+
this.i46_1 = multiple(choice(option(this, Options_Language_getInstance().a44_1.slice(), 'Language'), Companion_instance.d2c(), VOID, true), listOf(Language_Wirespec_getInstance())).o40(this, languages$factory_1());
|
|
228
258
|
}
|
|
229
|
-
protoOf(Convert_0).
|
|
230
|
-
if (this.
|
|
259
|
+
protoOf(Convert_0).s3q = function () {
|
|
260
|
+
if (this.z44() == null)
|
|
231
261
|
null;
|
|
232
262
|
else {
|
|
233
263
|
// Inline function 'kotlin.let' call
|
|
234
264
|
// Inline function 'kotlin.contracts.contract' call
|
|
235
|
-
this.
|
|
265
|
+
this.l3q('To convert, please specify a file', VOID, true);
|
|
236
266
|
}
|
|
267
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
237
268
|
// Inline function 'kotlin.let' call
|
|
238
269
|
var tmp = new Convert(_get_format__qlarck(this));
|
|
239
|
-
var tmp_0 = this.
|
|
240
|
-
var tmp_1 = Companion_instance_0.
|
|
270
|
+
var tmp_0 = this.a45(null);
|
|
271
|
+
var tmp_1 = Companion_instance_0.e2c(this.b45());
|
|
241
272
|
// Inline function 'kotlin.collections.ifEmpty' call
|
|
242
273
|
var this_0 = toSet(_get_languages__ojonze_0(this));
|
|
243
274
|
// Inline function 'kotlin.contracts.contract' call
|
|
@@ -249,46 +280,63 @@
|
|
|
249
280
|
tmp_2 = this_0;
|
|
250
281
|
}
|
|
251
282
|
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.
|
|
283
|
+
var this_1 = new CompilerArguments(tmp, tmp_0, tmp_1, tmp$ret$2, _PackageName___init__impl__s13tbs(this.c45()), this.e45(this.d45()), this.f45(), this.g45());
|
|
253
284
|
// Inline function 'kotlin.contracts.contract' call
|
|
254
|
-
this.
|
|
285
|
+
var tmp0_iterator = this.f46_1(this_1).g();
|
|
286
|
+
while (tmp0_iterator.h()) {
|
|
287
|
+
var element = tmp0_iterator.i();
|
|
288
|
+
// Inline function 'community.flock.wirespec.plugin.cli.Convert.run.<anonymous>' call
|
|
289
|
+
if (element instanceof Right) {
|
|
290
|
+
// Inline function 'kotlin.let' call
|
|
291
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
292
|
+
var destruct = element.ak_1;
|
|
293
|
+
var result = destruct.qd();
|
|
294
|
+
var file = destruct.rd();
|
|
295
|
+
this.g46_1(result, file);
|
|
296
|
+
} else {
|
|
297
|
+
if (element instanceof Left) {
|
|
298
|
+
this.l3q(element.uj_1, VOID, true);
|
|
299
|
+
} else {
|
|
300
|
+
noWhenBranchMatchedException();
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
255
304
|
};
|
|
256
305
|
function _get_inputFile__x1bqj($this) {
|
|
257
|
-
return $this.
|
|
306
|
+
return $this.s44_1.d40($this, inputFile$factory_0());
|
|
258
307
|
}
|
|
259
308
|
function CommonOptions() {
|
|
260
309
|
CliktCommand.call(this);
|
|
261
|
-
this.
|
|
262
|
-
this.
|
|
263
|
-
this.
|
|
264
|
-
this.
|
|
265
|
-
this.
|
|
266
|
-
this.
|
|
267
|
-
this.
|
|
268
|
-
}
|
|
269
|
-
protoOf(CommonOptions).
|
|
270
|
-
return this.
|
|
310
|
+
this.s44_1 = option(this, Options_InputFile_getInstance().a44_1.slice(), 'Input file').o40(this, inputFile$factory());
|
|
311
|
+
this.t44_1 = option(this, Options_InputDir_getInstance().a44_1.slice(), 'Input directory').o40(this, inputDir$factory());
|
|
312
|
+
this.u44_1 = option(this, Options_OutputDir_getInstance().a44_1.slice(), 'Output directory').o40(this, outputDir$factory());
|
|
313
|
+
this.v44_1 = default_0(option(this, Options_PackageName_getInstance().a44_1.slice(), 'Package name'), 'community.flock.wirespec.generated').o40(this, packageName$factory());
|
|
314
|
+
this.w44_1 = default_0(option(this, Options_LogLevel_getInstance().a44_1.slice(), 'Log level: ' + Companion_instance_1.toString()), Level_ERROR_getInstance().toString()).o40(this, logLevel$factory());
|
|
315
|
+
this.x44_1 = flag(option(this, Options_Shared_getInstance().a44_1.slice(), 'Generate shared wirespec code'), [], false).o40(this, shared$factory());
|
|
316
|
+
this.y44_1 = flag(option(this, Options_Strict_getInstance().a44_1.slice(), 'Strict mode'), []).o40(this, strict$factory());
|
|
317
|
+
}
|
|
318
|
+
protoOf(CommonOptions).z44 = function () {
|
|
319
|
+
return this.t44_1.d40(this, inputDir$factory_0());
|
|
271
320
|
};
|
|
272
|
-
protoOf(CommonOptions).
|
|
273
|
-
return this.
|
|
321
|
+
protoOf(CommonOptions).b45 = function () {
|
|
322
|
+
return this.u44_1.d40(this, outputDir$factory_0());
|
|
274
323
|
};
|
|
275
|
-
protoOf(CommonOptions).
|
|
276
|
-
return this.
|
|
324
|
+
protoOf(CommonOptions).c45 = function () {
|
|
325
|
+
return this.v44_1.d40(this, packageName$factory_0());
|
|
277
326
|
};
|
|
278
|
-
protoOf(CommonOptions).
|
|
279
|
-
return this.
|
|
327
|
+
protoOf(CommonOptions).d45 = function () {
|
|
328
|
+
return this.w44_1.d40(this, logLevel$factory_0());
|
|
280
329
|
};
|
|
281
|
-
protoOf(CommonOptions).
|
|
282
|
-
return this.
|
|
330
|
+
protoOf(CommonOptions).f45 = function () {
|
|
331
|
+
return this.x44_1.d40(this, shared$factory_0());
|
|
283
332
|
};
|
|
284
|
-
protoOf(CommonOptions).
|
|
285
|
-
return this.
|
|
333
|
+
protoOf(CommonOptions).g45 = function () {
|
|
334
|
+
return this.y44_1.d40(this, strict$factory_0());
|
|
286
335
|
};
|
|
287
|
-
protoOf(CommonOptions).
|
|
336
|
+
protoOf(CommonOptions).a45 = function (inputDir) {
|
|
288
337
|
var tmp;
|
|
289
338
|
if (!(inputDir == null) && !(_get_inputFile__x1bqj(this) == null)) {
|
|
290
|
-
|
|
291
|
-
throw IllegalStateException_init_$Create$(toString(message));
|
|
339
|
+
throw new CliktError('Choose either a file or a directory. Not Both.');
|
|
292
340
|
} else {
|
|
293
341
|
var tmp0_safe_receiver = _get_inputFile__x1bqj(this);
|
|
294
342
|
var tmp_0;
|
|
@@ -297,7 +345,7 @@
|
|
|
297
345
|
} else {
|
|
298
346
|
// Inline function 'kotlin.let' call
|
|
299
347
|
// Inline function 'kotlin.contracts.contract' call
|
|
300
|
-
tmp_0 = Companion_instance_2.
|
|
348
|
+
tmp_0 = Companion_instance_2.s2b(tmp0_safe_receiver);
|
|
301
349
|
}
|
|
302
350
|
var tmp1_elvis_lhs = tmp_0;
|
|
303
351
|
var tmp_1;
|
|
@@ -319,7 +367,7 @@
|
|
|
319
367
|
}
|
|
320
368
|
return tmp;
|
|
321
369
|
};
|
|
322
|
-
protoOf(CommonOptions).
|
|
370
|
+
protoOf(CommonOptions).e45 = function (_this__u8e3s4) {
|
|
323
371
|
// Inline function 'kotlin.text.uppercase' call
|
|
324
372
|
// Inline function 'kotlin.text.trim' call
|
|
325
373
|
// Inline function 'kotlin.js.asDynamic' call
|
|
@@ -338,8 +386,7 @@
|
|
|
338
386
|
tmp = Level_ERROR_getInstance();
|
|
339
387
|
break;
|
|
340
388
|
default:
|
|
341
|
-
|
|
342
|
-
throw IllegalStateException_init_$Create$(toString(message));
|
|
389
|
+
throw new CliktError('Choose one of these log levels: ' + Companion_instance_1.toString());
|
|
343
390
|
}
|
|
344
391
|
return tmp;
|
|
345
392
|
};
|
|
@@ -367,7 +414,7 @@
|
|
|
367
414
|
}
|
|
368
415
|
function Options(name, ordinal, flags) {
|
|
369
416
|
Enum.call(this, name, ordinal);
|
|
370
|
-
this.
|
|
417
|
+
this.a44_1 = flags;
|
|
371
418
|
}
|
|
372
419
|
function Options_InputDir_getInstance() {
|
|
373
420
|
Options_initEntries();
|
|
@@ -438,32 +485,32 @@
|
|
|
438
485
|
}
|
|
439
486
|
function inputDir$factory() {
|
|
440
487
|
return getPropertyCallableRef('inputDir', 1, KProperty1, function (receiver) {
|
|
441
|
-
return receiver.
|
|
488
|
+
return receiver.z44();
|
|
442
489
|
}, null);
|
|
443
490
|
}
|
|
444
491
|
function outputDir$factory() {
|
|
445
492
|
return getPropertyCallableRef('outputDir', 1, KProperty1, function (receiver) {
|
|
446
|
-
return receiver.
|
|
493
|
+
return receiver.b45();
|
|
447
494
|
}, null);
|
|
448
495
|
}
|
|
449
496
|
function packageName$factory() {
|
|
450
497
|
return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) {
|
|
451
|
-
return receiver.
|
|
498
|
+
return receiver.c45();
|
|
452
499
|
}, null);
|
|
453
500
|
}
|
|
454
501
|
function logLevel$factory() {
|
|
455
502
|
return getPropertyCallableRef('logLevel', 1, KProperty1, function (receiver) {
|
|
456
|
-
return receiver.
|
|
503
|
+
return receiver.d45();
|
|
457
504
|
}, null);
|
|
458
505
|
}
|
|
459
506
|
function shared$factory() {
|
|
460
507
|
return getPropertyCallableRef('shared', 1, KProperty1, function (receiver) {
|
|
461
|
-
return receiver.
|
|
508
|
+
return receiver.f45();
|
|
462
509
|
}, null);
|
|
463
510
|
}
|
|
464
511
|
function strict$factory() {
|
|
465
512
|
return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) {
|
|
466
|
-
return receiver.
|
|
513
|
+
return receiver.g45();
|
|
467
514
|
}, null);
|
|
468
515
|
}
|
|
469
516
|
function inputFile$factory_0() {
|
|
@@ -473,32 +520,32 @@
|
|
|
473
520
|
}
|
|
474
521
|
function inputDir$factory_0() {
|
|
475
522
|
return getPropertyCallableRef('inputDir', 1, KProperty1, function (receiver) {
|
|
476
|
-
return receiver.
|
|
523
|
+
return receiver.z44();
|
|
477
524
|
}, null);
|
|
478
525
|
}
|
|
479
526
|
function outputDir$factory_0() {
|
|
480
527
|
return getPropertyCallableRef('outputDir', 1, KProperty1, function (receiver) {
|
|
481
|
-
return receiver.
|
|
528
|
+
return receiver.b45();
|
|
482
529
|
}, null);
|
|
483
530
|
}
|
|
484
531
|
function packageName$factory_0() {
|
|
485
532
|
return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) {
|
|
486
|
-
return receiver.
|
|
533
|
+
return receiver.c45();
|
|
487
534
|
}, null);
|
|
488
535
|
}
|
|
489
536
|
function logLevel$factory_0() {
|
|
490
537
|
return getPropertyCallableRef('logLevel', 1, KProperty1, function (receiver) {
|
|
491
|
-
return receiver.
|
|
538
|
+
return receiver.d45();
|
|
492
539
|
}, null);
|
|
493
540
|
}
|
|
494
541
|
function shared$factory_0() {
|
|
495
542
|
return getPropertyCallableRef('shared', 1, KProperty1, function (receiver) {
|
|
496
|
-
return receiver.
|
|
543
|
+
return receiver.f45();
|
|
497
544
|
}, null);
|
|
498
545
|
}
|
|
499
546
|
function strict$factory_0() {
|
|
500
547
|
return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) {
|
|
501
|
-
return receiver.
|
|
548
|
+
return receiver.g45();
|
|
502
549
|
}, null);
|
|
503
550
|
}
|
|
504
551
|
function main(args) {
|
|
@@ -530,34 +577,36 @@
|
|
|
530
577
|
var this_1 = copyToArray(destination);
|
|
531
578
|
var tmp = Companion_instance_4;
|
|
532
579
|
var tmp_0 = compile$ref();
|
|
580
|
+
var tmp_1 = convert$ref();
|
|
533
581
|
// Inline function 'kotlin.contracts.contract' call
|
|
534
|
-
tmp.
|
|
582
|
+
tmp.w42(tmp_0, tmp_1, write$ref())(this_1);
|
|
535
583
|
}
|
|
536
584
|
function compile_0(arguments_0) {
|
|
537
|
-
var input = arguments_0.
|
|
538
|
-
var output = arguments_0.
|
|
539
|
-
var languages = arguments_0.
|
|
540
|
-
var packageName = arguments_0.
|
|
541
|
-
var logger = new Logger(arguments_0.
|
|
542
|
-
var operation = arguments_0.
|
|
585
|
+
var input = arguments_0.j2b_1;
|
|
586
|
+
var output = arguments_0.k2b_1;
|
|
587
|
+
var languages = arguments_0.l2b_1;
|
|
588
|
+
var packageName = arguments_0.m2b_1;
|
|
589
|
+
var logger = new Logger(arguments_0.n2b_1);
|
|
590
|
+
var operation = arguments_0.i2b_1;
|
|
591
|
+
var tmp;
|
|
543
592
|
if (operation instanceof Convert) {
|
|
544
593
|
var fullPath = input instanceof FullFilePath ? input : THROW_CCE();
|
|
545
594
|
var file = new JsonFile(fullPath);
|
|
546
|
-
var strict = arguments_0.
|
|
547
|
-
var format = operation.
|
|
548
|
-
var
|
|
595
|
+
var strict = arguments_0.p2b_1;
|
|
596
|
+
var format = operation.r2b_1;
|
|
597
|
+
var tmp_0;
|
|
549
598
|
switch (format.q2_1) {
|
|
550
599
|
case 0:
|
|
551
|
-
|
|
600
|
+
tmp_0 = OpenApiV2Parser_instance.n2a(file.z1a(), !strict);
|
|
552
601
|
break;
|
|
553
602
|
case 1:
|
|
554
|
-
|
|
603
|
+
tmp_0 = OpenApiV3Parser_instance.n2a(file.z1a(), !strict);
|
|
555
604
|
break;
|
|
556
605
|
default:
|
|
557
606
|
noWhenBranchMatchedException();
|
|
558
607
|
break;
|
|
559
608
|
}
|
|
560
|
-
var ast =
|
|
609
|
+
var ast = tmp_0;
|
|
561
610
|
var path = out(fullPath, packageName, output);
|
|
562
611
|
// Inline function 'kotlin.collections.map' call
|
|
563
612
|
// Inline function 'kotlin.collections.map' call
|
|
@@ -571,11 +620,11 @@
|
|
|
571
620
|
var emitter = item.qd();
|
|
572
621
|
var file_0 = item.rd();
|
|
573
622
|
var results = emitter.p22(ast);
|
|
574
|
-
var
|
|
623
|
+
var tmp_1;
|
|
575
624
|
if (!emitter.o22_1) {
|
|
576
625
|
// Inline function 'kotlin.text.replaceFirstChar' call
|
|
577
|
-
var this_1 = _FileName___get_value__impl__3u4cz6(fullPath.
|
|
578
|
-
var
|
|
626
|
+
var this_1 = _FileName___get_value__impl__3u4cz6(fullPath.x2b_1);
|
|
627
|
+
var tmp_2;
|
|
579
628
|
// Inline function 'kotlin.text.isNotEmpty' call
|
|
580
629
|
if (charSequenceLength(this_1) > 0) {
|
|
581
630
|
// Inline function 'kotlin.text.uppercase' call
|
|
@@ -584,19 +633,19 @@
|
|
|
584
633
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
585
634
|
// Inline function 'kotlin.js.asDynamic' call
|
|
586
635
|
var tmp$ret$4 = toString_0(this_2).toUpperCase();
|
|
587
|
-
var
|
|
636
|
+
var tmp_3 = toString(tmp$ret$4);
|
|
588
637
|
// Inline function 'kotlin.text.substring' call
|
|
589
638
|
// Inline function 'kotlin.js.asDynamic' call
|
|
590
|
-
|
|
639
|
+
tmp_2 = tmp_3 + this_1.substring(1);
|
|
591
640
|
} else {
|
|
592
|
-
|
|
641
|
+
tmp_2 = this_1;
|
|
593
642
|
}
|
|
594
|
-
var tmp$ret$7 =
|
|
595
|
-
|
|
643
|
+
var tmp$ret$7 = tmp_2;
|
|
644
|
+
tmp_1 = to(listOf(new Emitted(tmp$ret$7, first(results).p25_1)), file_0);
|
|
596
645
|
} else {
|
|
597
|
-
|
|
646
|
+
tmp_1 = to(results, file_0);
|
|
598
647
|
}
|
|
599
|
-
var tmp$ret$8 =
|
|
648
|
+
var tmp$ret$8 = tmp_1;
|
|
600
649
|
destination.e(tmp$ret$8);
|
|
601
650
|
}
|
|
602
651
|
// Inline function 'kotlin.collections.mapTo' call
|
|
@@ -604,52 +653,63 @@
|
|
|
604
653
|
var tmp0_iterator_0 = destination.g();
|
|
605
654
|
while (tmp0_iterator_0.h()) {
|
|
606
655
|
var item_0 = tmp0_iterator_0.i();
|
|
607
|
-
|
|
608
|
-
var
|
|
609
|
-
|
|
610
|
-
destination_0.e(Unit_instance);
|
|
656
|
+
// Inline function 'community.flock.wirespec.plugin.cli.compile.<anonymous>' call
|
|
657
|
+
var tmp$ret$11 = right(item_0);
|
|
658
|
+
destination_0.e(tmp$ret$11);
|
|
611
659
|
}
|
|
660
|
+
tmp = destination_0;
|
|
612
661
|
} else {
|
|
613
662
|
if (operation instanceof Compile) {
|
|
663
|
+
var tmp_4;
|
|
614
664
|
if (input instanceof Console) {
|
|
615
|
-
wirespec(input, languages, packageName, compile$lambda(output), logger);
|
|
665
|
+
tmp_4 = wirespec(input, languages, packageName, compile$lambda(output), logger);
|
|
616
666
|
} else {
|
|
617
667
|
if (input instanceof FullDirPath) {
|
|
618
|
-
// Inline function 'kotlin.collections.
|
|
619
|
-
|
|
668
|
+
// Inline function 'kotlin.collections.flatMap' call
|
|
669
|
+
// Inline function 'kotlin.collections.flatMapTo' call
|
|
670
|
+
var this_3 = (new Directory(input.c2c_1)).l46();
|
|
671
|
+
var destination_1 = ArrayList_init_$Create$();
|
|
672
|
+
var tmp0_iterator_1 = this_3.g();
|
|
620
673
|
while (tmp0_iterator_1.h()) {
|
|
621
674
|
var element = tmp0_iterator_1.i();
|
|
622
675
|
// Inline function 'community.flock.wirespec.plugin.cli.compile.<anonymous>' call
|
|
623
|
-
wirespec(element, languages, packageName, out(element.
|
|
676
|
+
var list = wirespec(element, languages, packageName, out(element.j46_1, packageName, output), logger);
|
|
677
|
+
addAll(destination_1, list);
|
|
624
678
|
}
|
|
679
|
+
tmp_4 = destination_1;
|
|
625
680
|
} else {
|
|
626
|
-
if (input instanceof FullFilePath)
|
|
627
|
-
|
|
681
|
+
if (input instanceof FullFilePath) {
|
|
682
|
+
var tmp_5;
|
|
683
|
+
if (input.y2b_1.equals(FileExtension_Wirespec_getInstance())) {
|
|
628
684
|
// Inline function 'kotlin.let' call
|
|
629
685
|
// Inline function 'kotlin.contracts.contract' call
|
|
686
|
+
// Inline function 'community.flock.wirespec.plugin.cli.compile.<anonymous>' call
|
|
630
687
|
var it = new WirespecFile(input);
|
|
631
|
-
wirespec(it, languages, packageName, out(it.
|
|
688
|
+
tmp_5 = wirespec(it, languages, packageName, out(it.j46_1, packageName, output), logger);
|
|
632
689
|
} else {
|
|
633
|
-
// Inline function '
|
|
634
|
-
|
|
635
|
-
|
|
690
|
+
// Inline function 'arrow.core.nel' call
|
|
691
|
+
// Inline function 'arrow.core.nel' call
|
|
692
|
+
var this_4 = new FileReadException('Path ' + input.toString() + ' is not a Wirespec file');
|
|
693
|
+
var tmp$ret$19 = nonEmptyListOf(this_4, []);
|
|
694
|
+
var this_5 = left(tmp$ret$19);
|
|
695
|
+
tmp_5 = nonEmptyListOf(this_5, []);
|
|
636
696
|
}
|
|
637
|
-
|
|
697
|
+
tmp_4 = tmp_5;
|
|
698
|
+
} else {
|
|
638
699
|
noWhenBranchMatchedException();
|
|
639
700
|
}
|
|
640
701
|
}
|
|
641
702
|
}
|
|
703
|
+
tmp = tmp_4;
|
|
642
704
|
} else {
|
|
643
705
|
noWhenBranchMatchedException();
|
|
644
706
|
}
|
|
645
707
|
}
|
|
708
|
+
return tmp;
|
|
646
709
|
}
|
|
647
710
|
function convert(arguments_0) {
|
|
648
711
|
return compile_0(arguments_0);
|
|
649
712
|
}
|
|
650
|
-
function out(_this__u8e3s4, packageName, output) {
|
|
651
|
-
return out$lambda(output, _this__u8e3s4, packageName);
|
|
652
|
-
}
|
|
653
713
|
function write(output, file) {
|
|
654
714
|
// Inline function 'kotlin.collections.forEach' call
|
|
655
715
|
var tmp0_iterator = output.g();
|
|
@@ -658,7 +718,7 @@
|
|
|
658
718
|
// Inline function 'community.flock.wirespec.plugin.cli.write.<anonymous>' call
|
|
659
719
|
var name = element.qd();
|
|
660
720
|
var result = element.rd();
|
|
661
|
-
var tmp1_safe_receiver = file == null ? null : file.
|
|
721
|
+
var tmp1_safe_receiver = file == null ? null : file.m46(_FileName___init__impl__nzn12e(name));
|
|
662
722
|
var tmp;
|
|
663
723
|
if (tmp1_safe_receiver == null) {
|
|
664
724
|
tmp = null;
|
|
@@ -671,6 +731,9 @@
|
|
|
671
731
|
}
|
|
672
732
|
}
|
|
673
733
|
}
|
|
734
|
+
function out(_this__u8e3s4, packageName, output) {
|
|
735
|
+
return out$lambda(output, _this__u8e3s4, packageName);
|
|
736
|
+
}
|
|
674
737
|
function emitters(_this__u8e3s4, packageName, path, logger) {
|
|
675
738
|
// Inline function 'kotlin.collections.map' call
|
|
676
739
|
// Inline function 'kotlin.collections.mapTo' call
|
|
@@ -821,7 +884,7 @@
|
|
|
821
884
|
// Inline function 'arrow.core.Either.map.<anonymous>' call
|
|
822
885
|
// Inline function 'community.flock.wirespec.plugin.cli.wirespec.<anonymous>.<anonymous>.<anonymous>' call
|
|
823
886
|
var it = results.ak_1;
|
|
824
|
-
var tmp$ret$2 = listOf(new Emitted(Companion_getInstance().
|
|
887
|
+
var tmp$ret$2 = listOf(new Emitted(Companion_getInstance().m24(_FileName___get_value__impl__3u4cz6(path(FileExtension_Wirespec_getInstance()).x2b_1)), first(it).p25_1));
|
|
825
888
|
tmp_0 = new Right(tmp$ret$2);
|
|
826
889
|
} else {
|
|
827
890
|
if (results instanceof Left) {
|
|
@@ -843,40 +906,58 @@
|
|
|
843
906
|
var tmp0_iterator_0 = destination.g();
|
|
844
907
|
while (tmp0_iterator_0.h()) {
|
|
845
908
|
var item_0 = tmp0_iterator_0.i();
|
|
909
|
+
// Inline function 'community.flock.wirespec.plugin.cli.wirespec.<anonymous>' call
|
|
846
910
|
var results_0 = item_0.qd();
|
|
847
911
|
var file_0 = item_0.rd();
|
|
912
|
+
// Inline function 'arrow.core.Either.map' call
|
|
913
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
914
|
+
// Inline function 'arrow.core.flatMap' call
|
|
915
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
916
|
+
var tmp_1;
|
|
848
917
|
if (results_0 instanceof Right) {
|
|
849
|
-
|
|
918
|
+
// Inline function 'arrow.core.Either.map.<anonymous>' call
|
|
919
|
+
// Inline function 'community.flock.wirespec.plugin.cli.wirespec.<anonymous>.<anonymous>' call
|
|
920
|
+
var it_0 = results_0.ak_1;
|
|
921
|
+
var tmp$ret$11 = to(it_0, file_0);
|
|
922
|
+
tmp_1 = new Right(tmp$ret$11);
|
|
850
923
|
} else {
|
|
851
924
|
if (results_0 instanceof Left) {
|
|
852
|
-
|
|
925
|
+
tmp_1 = results_0;
|
|
853
926
|
} else {
|
|
854
927
|
noWhenBranchMatchedException();
|
|
855
928
|
}
|
|
856
929
|
}
|
|
857
|
-
|
|
930
|
+
var tmp$ret$15 = tmp_1;
|
|
931
|
+
destination_0.e(tmp$ret$15);
|
|
858
932
|
}
|
|
933
|
+
return destination_0;
|
|
859
934
|
}
|
|
860
935
|
function compile$ref() {
|
|
861
936
|
var l = function (p0) {
|
|
862
|
-
compile_0(p0);
|
|
863
|
-
return Unit_instance;
|
|
937
|
+
return compile_0(p0);
|
|
864
938
|
};
|
|
865
939
|
l.callableName = 'compile';
|
|
866
940
|
return l;
|
|
867
941
|
}
|
|
868
942
|
function convert$ref() {
|
|
869
943
|
var l = function (p0) {
|
|
870
|
-
convert(p0);
|
|
871
|
-
return Unit_instance;
|
|
944
|
+
return convert(p0);
|
|
872
945
|
};
|
|
873
946
|
l.callableName = 'convert';
|
|
874
947
|
return l;
|
|
875
948
|
}
|
|
949
|
+
function write$ref() {
|
|
950
|
+
var l = function (p0, p1) {
|
|
951
|
+
write(p0, p1);
|
|
952
|
+
return Unit_instance;
|
|
953
|
+
};
|
|
954
|
+
l.callableName = 'write';
|
|
955
|
+
return l;
|
|
956
|
+
}
|
|
876
957
|
function compile$lambda($output) {
|
|
877
958
|
return function (it) {
|
|
878
959
|
var tmp = $output;
|
|
879
|
-
return new FullFilePath(_Output___get_value__impl__a8kw1g(ensureNotNull(tmp == null ? null : new Output(tmp)).
|
|
960
|
+
return new FullFilePath(_Output___get_value__impl__a8kw1g(ensureNotNull(tmp == null ? null : new Output(tmp)).f2c_1), _FileName___init__impl__nzn12e('console'), it);
|
|
880
961
|
};
|
|
881
962
|
}
|
|
882
963
|
function out$lambda($output, $this_out, $packageName) {
|
|
@@ -888,49 +969,49 @@
|
|
|
888
969
|
// Inline function 'kotlin.text.lowercase' call
|
|
889
970
|
// Inline function 'kotlin.js.asDynamic' call
|
|
890
971
|
var tmp$ret$1 = extension.p2_1.toLowerCase();
|
|
891
|
-
tmp = $this_out.
|
|
972
|
+
tmp = $this_out.w2b_1 + '/out/' + tmp$ret$1;
|
|
892
973
|
} else {
|
|
893
974
|
tmp = new Output(tmp0_elvis_lhs);
|
|
894
975
|
}
|
|
895
976
|
var dir = tmp;
|
|
896
|
-
return $this_out.
|
|
977
|
+
return $this_out.a2c(toString(dir) + '/' + joinToString(split(_PackageName___get_value__impl__2zr98c($packageName), charArrayOf([_Char___init__impl__6a9atx(46)])), '/'), VOID, extension);
|
|
897
978
|
};
|
|
898
979
|
}
|
|
899
980
|
function JavaFile(path) {
|
|
900
|
-
File.call(this, path.
|
|
981
|
+
File.call(this, path.a2c(VOID, VOID, FileExtension_Java_getInstance()));
|
|
901
982
|
}
|
|
902
|
-
protoOf(JavaFile).
|
|
903
|
-
return new JavaFile(this.
|
|
983
|
+
protoOf(JavaFile).m46 = function (fileName) {
|
|
984
|
+
return new JavaFile(this.j46_1.a2c(VOID, fileName));
|
|
904
985
|
};
|
|
905
986
|
function JsonFile(path) {
|
|
906
|
-
File.call(this, path.
|
|
987
|
+
File.call(this, path.a2c(VOID, VOID, FileExtension_Json_getInstance()));
|
|
907
988
|
}
|
|
908
|
-
protoOf(JsonFile).
|
|
909
|
-
return new JsonFile(this.
|
|
989
|
+
protoOf(JsonFile).m46 = function (fileName) {
|
|
990
|
+
return new JsonFile(this.j46_1.a2c(VOID, fileName));
|
|
910
991
|
};
|
|
911
992
|
function KotlinFile(path) {
|
|
912
|
-
File.call(this, path.
|
|
993
|
+
File.call(this, path.a2c(VOID, VOID, FileExtension_Kotlin_getInstance()));
|
|
913
994
|
}
|
|
914
|
-
protoOf(KotlinFile).
|
|
915
|
-
return new KotlinFile(this.
|
|
995
|
+
protoOf(KotlinFile).m46 = function (fileName) {
|
|
996
|
+
return new KotlinFile(this.j46_1.a2c(VOID, fileName));
|
|
916
997
|
};
|
|
917
998
|
function ScalaFile(path) {
|
|
918
|
-
File.call(this, path.
|
|
999
|
+
File.call(this, path.a2c(VOID, VOID, FileExtension_Scala_getInstance()));
|
|
919
1000
|
}
|
|
920
|
-
protoOf(ScalaFile).
|
|
921
|
-
return new ScalaFile(this.
|
|
1001
|
+
protoOf(ScalaFile).m46 = function (fileName) {
|
|
1002
|
+
return new ScalaFile(this.j46_1.a2c(VOID, fileName));
|
|
922
1003
|
};
|
|
923
1004
|
function TypeScriptFile(path) {
|
|
924
|
-
File.call(this, path.
|
|
1005
|
+
File.call(this, path.a2c(VOID, VOID, FileExtension_TypeScript_getInstance()));
|
|
925
1006
|
}
|
|
926
|
-
protoOf(TypeScriptFile).
|
|
927
|
-
return new TypeScriptFile(this.
|
|
1007
|
+
protoOf(TypeScriptFile).m46 = function (fileName) {
|
|
1008
|
+
return new TypeScriptFile(this.j46_1.a2c(VOID, fileName));
|
|
928
1009
|
};
|
|
929
1010
|
function WirespecFile(path) {
|
|
930
|
-
File.call(this, path.
|
|
1011
|
+
File.call(this, path.a2c(VOID, VOID, FileExtension_Wirespec_getInstance()));
|
|
931
1012
|
}
|
|
932
|
-
protoOf(WirespecFile).
|
|
933
|
-
return new WirespecFile(this.
|
|
1013
|
+
protoOf(WirespecFile).m46 = function (fileName) {
|
|
1014
|
+
return new WirespecFile(this.j46_1.a2c(VOID, fileName));
|
|
934
1015
|
};
|
|
935
1016
|
function cli(args) {
|
|
936
1017
|
main(args);
|
|
@@ -993,14 +1074,14 @@
|
|
|
993
1074
|
return it;
|
|
994
1075
|
}
|
|
995
1076
|
function Directory$wirespecFiles$lambda_0(it) {
|
|
996
|
-
return endsWith(it, FileExtension_Wirespec_getInstance().
|
|
1077
|
+
return endsWith(it, FileExtension_Wirespec_getInstance().v2b_1);
|
|
997
1078
|
}
|
|
998
1079
|
function Directory$wirespecFiles$lambda_1(it) {
|
|
999
|
-
return dropLast(it, FileExtension_Wirespec_getInstance().
|
|
1080
|
+
return dropLast(it, FileExtension_Wirespec_getInstance().v2b_1.length + 1 | 0);
|
|
1000
1081
|
}
|
|
1001
1082
|
function Directory$wirespecFiles$lambda_2(this$0) {
|
|
1002
1083
|
return function (it) {
|
|
1003
|
-
return new FullFilePath(this$0.
|
|
1084
|
+
return new FullFilePath(this$0.k46_1, _FileName___init__impl__nzn12e(it));
|
|
1004
1085
|
};
|
|
1005
1086
|
}
|
|
1006
1087
|
function WirespecFile$_init_$ref_cj1n5j() {
|
|
@@ -1011,10 +1092,10 @@
|
|
|
1011
1092
|
return l;
|
|
1012
1093
|
}
|
|
1013
1094
|
function Directory(path) {
|
|
1014
|
-
this.
|
|
1095
|
+
this.k46_1 = path;
|
|
1015
1096
|
}
|
|
1016
|
-
protoOf(Directory).
|
|
1017
|
-
var tmp = asSequence(iterator(get_fs().readdirSync(this.
|
|
1097
|
+
protoOf(Directory).l46 = function () {
|
|
1098
|
+
var tmp = asSequence(iterator(get_fs().readdirSync(this.k46_1, 'utf-8')));
|
|
1018
1099
|
var tmp_0 = map(tmp, Directory$wirespecFiles$lambda);
|
|
1019
1100
|
var tmp_1 = filter(tmp_0, Directory$wirespecFiles$lambda_0);
|
|
1020
1101
|
var tmp_2 = map(tmp_1, Directory$wirespecFiles$lambda_1);
|
|
@@ -1022,22 +1103,22 @@
|
|
|
1022
1103
|
return toSet_0(map(tmp_3, WirespecFile$_init_$ref_cj1n5j()));
|
|
1023
1104
|
};
|
|
1024
1105
|
function File(path) {
|
|
1025
|
-
this.
|
|
1106
|
+
this.j46_1 = path;
|
|
1026
1107
|
}
|
|
1027
1108
|
protoOf(File).z1a = function () {
|
|
1028
1109
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1029
|
-
return get_fs().readFileSync(this.
|
|
1110
|
+
return get_fs().readFileSync(this.j46_1.toString(), 'utf-8');
|
|
1030
1111
|
};
|
|
1031
|
-
protoOf(File).t18 = function (
|
|
1112
|
+
protoOf(File).t18 = function (string) {
|
|
1032
1113
|
// Inline function 'kotlin.run' call
|
|
1033
1114
|
// Inline function 'kotlin.contracts.contract' call
|
|
1034
1115
|
// Inline function 'community.flock.wirespec.plugin.cli.io.File.write.<anonymous>' call
|
|
1035
|
-
var $this$run = this.
|
|
1116
|
+
var $this$run = this.j46_1.a2c(joinToString(split_0(this.j46_1.w2b_1, ['out']), 'out/node'));
|
|
1036
1117
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1037
|
-
if (!get_fs().existsSync($this$run.
|
|
1038
|
-
get_fs().mkdirSync($this$run.
|
|
1118
|
+
if (!get_fs().existsSync($this$run.w2b_1)) {
|
|
1119
|
+
get_fs().mkdirSync($this$run.w2b_1, {recursive: true});
|
|
1039
1120
|
}
|
|
1040
|
-
get_fs().writeFileSync($this$run.toString(),
|
|
1121
|
+
get_fs().writeFileSync($this$run.toString(), string);
|
|
1041
1122
|
};
|
|
1042
1123
|
function get_fs() {
|
|
1043
1124
|
_init_properties_JavaScriptBindings_kt__clolet();
|