@flock/wirespec 0.10.25 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/arrow-arrow-atomic.js +2 -2
- package/arrow-arrow-continuations.js +1 -1
- package/arrow-arrow-core.js +17 -17
- package/clikt-clikt.js +1258 -1258
- package/colormath-root-colormath.js +452 -452
- package/kotlin-kotlin-stdlib.js +262 -240
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlin-openapi-bindings.js +25 -25
- package/kotlin-rgxgen.js +1823 -1823
- package/kotlinx-serialization-kotlinx-serialization-core.js +73 -73
- package/kotlinx-serialization-kotlinx-serialization-json.js +78 -78
- package/kotlinx-serialization-kotlinx-serialization-json.js.map +1 -1
- package/markdown.js +1926 -1926
- package/mordant-mordant.js +1713 -1713
- package/package.json +1 -1
- package/wirespec-src-compiler-core.js +1546 -1547
- package/wirespec-src-compiler-core.js.map +1 -1
- package/wirespec-src-compiler-lib.js +296 -296
- package/wirespec-src-converter-avro.js +1372 -0
- package/wirespec-src-converter-avro.js.map +1 -0
- package/wirespec-src-converter-openapi.js +379 -370
- package/wirespec-src-converter-openapi.js.map +1 -1
- package/wirespec-src-plugin-arguments.js +104 -98
- package/wirespec-src-plugin-arguments.js.map +1 -1
- package/wirespec-src-plugin-cli.js +157 -150
- package/wirespec-src-plugin-cli.js.map +1 -1
- package/wirespec-src-plugin-npm.js +11 -11
- package/wirespec-src-tools-generator.js +26 -26
|
@@ -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', './arrow-arrow-core.js', './wirespec-src-compiler-core.js', './wirespec-src-converter-openapi.js', './wirespec-src-compiler-lib.js'], factory);
|
|
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-converter-avro.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('./arrow-arrow-core.js'), require('./wirespec-src-compiler-core.js'), require('./wirespec-src-converter-openapi.js'), require('./wirespec-src-compiler-lib.js'));
|
|
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-converter-avro.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'.");
|
|
@@ -22,31 +22,34 @@
|
|
|
22
22
|
if (typeof globalThis['wirespec-src-converter-openapi'] === 'undefined') {
|
|
23
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'.");
|
|
24
24
|
}
|
|
25
|
+
if (typeof globalThis['wirespec-src-converter-avro'] === 'undefined') {
|
|
26
|
+
throw new Error("Error loading module 'wirespec-src-plugin-cli'. Its dependency 'wirespec-src-converter-avro' was not found. Please, check whether 'wirespec-src-converter-avro' is loaded prior to 'wirespec-src-plugin-cli'.");
|
|
27
|
+
}
|
|
25
28
|
if (typeof globalThis['wirespec-src-compiler-lib'] === 'undefined') {
|
|
26
29
|
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
30
|
}
|
|
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']);
|
|
31
|
+
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-converter-avro'], globalThis['wirespec-src-compiler-lib']);
|
|
29
32
|
}
|
|
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) {
|
|
33
|
+
}(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_converter_avro, kotlin_community_flock_wirespec_compiler_lib) {
|
|
31
34
|
'use strict';
|
|
32
35
|
//region block: imports
|
|
33
36
|
var Unit_instance = kotlin_kotlin.$_$.g4;
|
|
34
37
|
var subcommands = kotlin_clikt_clikt.$_$.d;
|
|
35
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
36
|
-
var initMetadataForCompanion = kotlin_kotlin.$_$.
|
|
38
|
+
var protoOf = kotlin_kotlin.$_$.ya;
|
|
39
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.z9;
|
|
37
40
|
var NoOpCliktCommand = kotlin_clikt_clikt.$_$.c;
|
|
38
41
|
var VOID = kotlin_kotlin.$_$.g;
|
|
39
|
-
var initMetadataForClass = kotlin_kotlin.$_$.
|
|
42
|
+
var initMetadataForClass = kotlin_kotlin.$_$.y9;
|
|
40
43
|
var option = kotlin_clikt_clikt.$_$.i;
|
|
41
44
|
var Companion_instance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.x;
|
|
42
45
|
var choice = kotlin_clikt_clikt.$_$.k;
|
|
43
46
|
var multiple = kotlin_clikt_clikt.$_$.h;
|
|
44
47
|
var Compile_instance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.y;
|
|
45
48
|
var Companion_instance_0 = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.z;
|
|
46
|
-
var toSet = kotlin_kotlin.$_$.
|
|
49
|
+
var toSet = kotlin_kotlin.$_$.q8;
|
|
47
50
|
var _PackageName___init__impl__s13tbs = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.t;
|
|
48
51
|
var CompilerArguments = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.a;
|
|
49
|
-
var noWhenBranchMatchedException = kotlin_kotlin.$_$.
|
|
52
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.fg;
|
|
50
53
|
var joinToString = kotlin_kotlin.$_$.s6;
|
|
51
54
|
var CliktError = kotlin_clikt_clikt.$_$.b;
|
|
52
55
|
var Left = kotlin_io_arrow_kt_arrow_core.$_$.d;
|
|
@@ -54,13 +57,13 @@
|
|
|
54
57
|
var argument = kotlin_clikt_clikt.$_$.e;
|
|
55
58
|
var values = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.c;
|
|
56
59
|
var mapCapacity = kotlin_kotlin.$_$.i7;
|
|
57
|
-
var coerceAtLeast = kotlin_kotlin.$_$.
|
|
60
|
+
var coerceAtLeast = kotlin_kotlin.$_$.jb;
|
|
58
61
|
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.t;
|
|
59
62
|
var choice_0 = kotlin_clikt_clikt.$_$.j;
|
|
60
63
|
var Language_Wirespec_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.p;
|
|
61
64
|
var listOf = kotlin_kotlin.$_$.g7;
|
|
62
65
|
var Convert = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.g;
|
|
63
|
-
var setOf = kotlin_kotlin.$_$.
|
|
66
|
+
var setOf = kotlin_kotlin.$_$.v7;
|
|
64
67
|
var CliktCommand = kotlin_clikt_clikt.$_$.a;
|
|
65
68
|
var default_0 = kotlin_clikt_clikt.$_$.f;
|
|
66
69
|
var Companion_instance_1 = kotlin_community_flock_wirespec_compiler_core.$_$.n2;
|
|
@@ -69,17 +72,17 @@
|
|
|
69
72
|
var Companion_instance_2 = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.w;
|
|
70
73
|
var FullDirPath = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.d;
|
|
71
74
|
var Console_instance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.v;
|
|
72
|
-
var THROW_CCE = kotlin_kotlin.$_$.
|
|
73
|
-
var isCharSequence = kotlin_kotlin.$_$.
|
|
74
|
-
var trim = kotlin_kotlin.$_$.
|
|
75
|
-
var toString = kotlin_kotlin.$_$.
|
|
75
|
+
var THROW_CCE = kotlin_kotlin.$_$.jf;
|
|
76
|
+
var isCharSequence = kotlin_kotlin.$_$.ia;
|
|
77
|
+
var trim = kotlin_kotlin.$_$.qe;
|
|
78
|
+
var toString = kotlin_kotlin.$_$.cb;
|
|
76
79
|
var Level_DEBUG_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.c2;
|
|
77
80
|
var Level_INFO_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.e2;
|
|
78
81
|
var Level_WARN_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.f2;
|
|
79
|
-
var Enum = kotlin_kotlin.$_$.
|
|
80
|
-
var KProperty1 = kotlin_kotlin.$_$.
|
|
81
|
-
var getPropertyCallableRef = kotlin_kotlin.$_$.
|
|
82
|
-
var numberRangeToNumber = kotlin_kotlin.$_$.
|
|
82
|
+
var Enum = kotlin_kotlin.$_$.ze;
|
|
83
|
+
var KProperty1 = kotlin_kotlin.$_$.tb;
|
|
84
|
+
var getPropertyCallableRef = kotlin_kotlin.$_$.v9;
|
|
85
|
+
var numberRangeToNumber = kotlin_kotlin.$_$.sa;
|
|
83
86
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.l;
|
|
84
87
|
var copyToArray = kotlin_kotlin.$_$.x5;
|
|
85
88
|
var Logger = kotlin_community_flock_wirespec_compiler_core.$_$.q1;
|
|
@@ -93,18 +96,19 @@
|
|
|
93
96
|
var Compile = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.f;
|
|
94
97
|
var OpenApiV2Parser_instance = kotlin_community_flock_wirespec_converter_openapi.$_$.b;
|
|
95
98
|
var OpenApiV3Parser_instance = kotlin_community_flock_wirespec_converter_openapi.$_$.d;
|
|
99
|
+
var AvroParser_instance = kotlin_community_flock_wirespec_converter_avro.$_$.a;
|
|
96
100
|
var collectionSizeOrDefault = kotlin_kotlin.$_$.i5;
|
|
97
101
|
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.k;
|
|
98
|
-
var to = kotlin_kotlin.$_$.
|
|
102
|
+
var to = kotlin_kotlin.$_$.ig;
|
|
99
103
|
var _FileName___get_value__impl__3u4cz6 = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.r;
|
|
100
|
-
var charSequenceLength = kotlin_kotlin.$_$.
|
|
101
|
-
var charSequenceGet = kotlin_kotlin.$_$.
|
|
104
|
+
var charSequenceLength = kotlin_kotlin.$_$.n9;
|
|
105
|
+
var charSequenceGet = kotlin_kotlin.$_$.m9;
|
|
102
106
|
var toString_0 = kotlin_kotlin.$_$.z1;
|
|
103
107
|
var first = kotlin_kotlin.$_$.h6;
|
|
104
108
|
var Emitted = kotlin_community_flock_wirespec_compiler_core.$_$.a;
|
|
105
109
|
var right = kotlin_io_arrow_kt_arrow_core.$_$.k;
|
|
106
110
|
var _FileName___init__impl__nzn12e = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.q;
|
|
107
|
-
var print = kotlin_kotlin.$_$.
|
|
111
|
+
var print = kotlin_kotlin.$_$.e9;
|
|
108
112
|
var PackageName = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.i;
|
|
109
113
|
var component1 = kotlin_community_flock_wirespec_compiler_core.$_$.o1;
|
|
110
114
|
var JavaEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.c;
|
|
@@ -123,32 +127,32 @@
|
|
|
123
127
|
var compile = kotlin_community_flock_wirespec_compiler_core.$_$.n1;
|
|
124
128
|
var Companion_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.h2;
|
|
125
129
|
var Output = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.h;
|
|
126
|
-
var ensureNotNull = kotlin_kotlin.$_$.
|
|
130
|
+
var ensureNotNull = kotlin_kotlin.$_$.zf;
|
|
127
131
|
var _Output___get_value__impl__a8kw1g = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.s;
|
|
128
132
|
var _PackageName___get_value__impl__2zr98c = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.u;
|
|
129
133
|
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.v1;
|
|
130
|
-
var charArrayOf = kotlin_kotlin.$_$.
|
|
131
|
-
var split = kotlin_kotlin.$_$.
|
|
134
|
+
var charArrayOf = kotlin_kotlin.$_$.k9;
|
|
135
|
+
var split = kotlin_kotlin.$_$.od;
|
|
132
136
|
var parse = kotlin_community_flock_wirespec_compiler_core.$_$.p1;
|
|
133
137
|
var get_noLogger = kotlin_community_flock_wirespec_compiler_core.$_$.r1;
|
|
134
138
|
var Definition = kotlin_community_flock_wirespec_compiler_core.$_$.l;
|
|
135
|
-
var isInterface = kotlin_kotlin.$_$.
|
|
139
|
+
var isInterface = kotlin_kotlin.$_$.ma;
|
|
136
140
|
var produce = kotlin_community_flock_wirespec_compiler_lib.$_$.e;
|
|
137
141
|
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.l1;
|
|
138
|
-
var endsWith = kotlin_kotlin.$_$.
|
|
139
|
-
var dropLast = kotlin_kotlin.$_$.
|
|
140
|
-
var iterator = kotlin_kotlin.$_$.
|
|
141
|
-
var asSequence = kotlin_kotlin.$_$.
|
|
142
|
-
var map = kotlin_kotlin.$_$.
|
|
143
|
-
var filter = kotlin_kotlin.$_$.
|
|
144
|
-
var toSet_0 = kotlin_kotlin.$_$.
|
|
145
|
-
var split_0 = kotlin_kotlin.$_$.
|
|
142
|
+
var endsWith = kotlin_kotlin.$_$.oc;
|
|
143
|
+
var dropLast = kotlin_kotlin.$_$.lc;
|
|
144
|
+
var iterator = kotlin_kotlin.$_$.pa;
|
|
145
|
+
var asSequence = kotlin_kotlin.$_$.vb;
|
|
146
|
+
var map = kotlin_kotlin.$_$.ac;
|
|
147
|
+
var filter = kotlin_kotlin.$_$.wb;
|
|
148
|
+
var toSet_0 = kotlin_kotlin.$_$.cc;
|
|
149
|
+
var split_0 = kotlin_kotlin.$_$.pd;
|
|
146
150
|
var Companion_instance_3 = kotlin_kotlin.$_$.b4;
|
|
147
151
|
var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.a2;
|
|
148
|
-
var createFailure = kotlin_kotlin.$_$.
|
|
152
|
+
var createFailure = kotlin_kotlin.$_$.yf;
|
|
149
153
|
var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.d2;
|
|
150
154
|
var _Result___get_isFailure__impl__jpiriv = kotlin_kotlin.$_$.b2;
|
|
151
|
-
var isArray = kotlin_kotlin.$_$.
|
|
155
|
+
var isArray = kotlin_kotlin.$_$.ea;
|
|
152
156
|
//endregion
|
|
153
157
|
//region block: pre-declaration
|
|
154
158
|
initMetadataForCompanion(Companion);
|
|
@@ -168,7 +172,7 @@
|
|
|
168
172
|
//endregion
|
|
169
173
|
function WirespecCli$main$ref($boundThis) {
|
|
170
174
|
var l = function (p0) {
|
|
171
|
-
$boundThis.
|
|
175
|
+
$boundThis.y3s(p0);
|
|
172
176
|
return Unit_instance;
|
|
173
177
|
};
|
|
174
178
|
l.callableName = 'main';
|
|
@@ -176,7 +180,7 @@
|
|
|
176
180
|
}
|
|
177
181
|
function Companion() {
|
|
178
182
|
}
|
|
179
|
-
protoOf(Companion).
|
|
183
|
+
protoOf(Companion).d45 = function (compile, convert, write) {
|
|
180
184
|
return WirespecCli$main$ref(subcommands(new WirespecCli(), [new Compile_0(compile, write), new Convert_0(convert, write)]));
|
|
181
185
|
};
|
|
182
186
|
var Companion_instance_4;
|
|
@@ -187,7 +191,7 @@
|
|
|
187
191
|
NoOpCliktCommand.call(this, VOID, VOID, 'wirespec');
|
|
188
192
|
}
|
|
189
193
|
function _get_languages__ojonze($this) {
|
|
190
|
-
return $this.
|
|
194
|
+
return $this.e46_1.k42($this, languages$factory_0());
|
|
191
195
|
}
|
|
192
196
|
function Compile$run$lambda(e) {
|
|
193
197
|
var tmp0_elvis_lhs = e.message;
|
|
@@ -195,16 +199,16 @@
|
|
|
195
199
|
}
|
|
196
200
|
function Compile_0(block, write) {
|
|
197
201
|
CommonOptions.call(this);
|
|
198
|
-
this.
|
|
199
|
-
this.
|
|
200
|
-
this.
|
|
202
|
+
this.c46_1 = block;
|
|
203
|
+
this.d46_1 = write;
|
|
204
|
+
this.e46_1 = multiple(choice(option(this, Options_Language_getInstance().h46_1.slice(), 'Language'), Companion_instance.u2c()), VOID, true).v42(this, languages$factory());
|
|
201
205
|
}
|
|
202
|
-
protoOf(Compile_0).
|
|
206
|
+
protoOf(Compile_0).z3s = function () {
|
|
203
207
|
// Inline function 'kotlin.collections.forEach' call
|
|
204
208
|
// Inline function 'kotlin.let' call
|
|
205
|
-
var this_0 = new CompilerArguments(Compile_instance, this.
|
|
209
|
+
var this_0 = new CompilerArguments(Compile_instance, this.h47(this.g47()), Companion_instance_0.v2c(this.i47()), toSet(_get_languages__ojonze(this)), _PackageName___init__impl__s13tbs(this.j47()), this.l47(this.k47()), this.m47(), this.n47());
|
|
206
210
|
// Inline function 'kotlin.contracts.contract' call
|
|
207
|
-
var tmp0_iterator = this.
|
|
211
|
+
var tmp0_iterator = this.c46_1(this_0).g();
|
|
208
212
|
while (tmp0_iterator.h()) {
|
|
209
213
|
var element = tmp0_iterator.i();
|
|
210
214
|
// Inline function 'community.flock.wirespec.plugin.cli.Compile.run.<anonymous>' call
|
|
@@ -214,7 +218,7 @@
|
|
|
214
218
|
var destruct = element.ak_1;
|
|
215
219
|
var result = destruct.qd();
|
|
216
220
|
var file = destruct.rd();
|
|
217
|
-
this.
|
|
221
|
+
this.d46_1(result, file);
|
|
218
222
|
} else {
|
|
219
223
|
if (element instanceof Left) {
|
|
220
224
|
throw new CliktError(joinToString(element.uj_1, VOID, VOID, VOID, VOID, VOID, Compile$run$lambda));
|
|
@@ -225,15 +229,15 @@
|
|
|
225
229
|
}
|
|
226
230
|
};
|
|
227
231
|
function _get_format__qlarck($this) {
|
|
228
|
-
return $this.
|
|
232
|
+
return $this.o48_1.k42($this, format$factory_0());
|
|
229
233
|
}
|
|
230
234
|
function _get_languages__ojonze_0($this) {
|
|
231
|
-
return $this.
|
|
235
|
+
return $this.p48_1.k42($this, languages$factory_2());
|
|
232
236
|
}
|
|
233
237
|
function Convert_0(block, write) {
|
|
234
238
|
CommonOptions.call(this);
|
|
235
|
-
this.
|
|
236
|
-
this.
|
|
239
|
+
this.m48_1 = block;
|
|
240
|
+
this.n48_1 = write;
|
|
237
241
|
var tmp = this;
|
|
238
242
|
// Inline function 'com.github.ajalt.clikt.parameters.types.enum' call
|
|
239
243
|
var this_0 = argument(this, VOID, 'Input format');
|
|
@@ -253,22 +257,22 @@
|
|
|
253
257
|
var tmp$ret$2 = element.p2_1;
|
|
254
258
|
destination.m2(tmp$ret$2, element);
|
|
255
259
|
}
|
|
256
|
-
tmp.
|
|
257
|
-
this.
|
|
260
|
+
tmp.o48_1 = choice_0(this_0, destination, true).q41(this, format$factory());
|
|
261
|
+
this.p48_1 = multiple(choice(option(this, Options_Language_getInstance().h46_1.slice(), 'Language'), Companion_instance.u2c(), VOID, true), listOf(Language_Wirespec_getInstance())).v42(this, languages$factory_1());
|
|
258
262
|
}
|
|
259
|
-
protoOf(Convert_0).
|
|
260
|
-
if (this.
|
|
263
|
+
protoOf(Convert_0).z3s = function () {
|
|
264
|
+
if (this.g47() == null)
|
|
261
265
|
null;
|
|
262
266
|
else {
|
|
263
267
|
// Inline function 'kotlin.let' call
|
|
264
268
|
// Inline function 'kotlin.contracts.contract' call
|
|
265
|
-
this.
|
|
269
|
+
this.s3s('To convert, please specify a file', VOID, true);
|
|
266
270
|
}
|
|
267
271
|
// Inline function 'kotlin.collections.forEach' call
|
|
268
272
|
// Inline function 'kotlin.let' call
|
|
269
273
|
var tmp = new Convert(_get_format__qlarck(this));
|
|
270
|
-
var tmp_0 = this.
|
|
271
|
-
var tmp_1 = Companion_instance_0.
|
|
274
|
+
var tmp_0 = this.h47(null);
|
|
275
|
+
var tmp_1 = Companion_instance_0.v2c(this.i47());
|
|
272
276
|
// Inline function 'kotlin.collections.ifEmpty' call
|
|
273
277
|
var this_0 = toSet(_get_languages__ojonze_0(this));
|
|
274
278
|
// Inline function 'kotlin.contracts.contract' call
|
|
@@ -280,9 +284,9 @@
|
|
|
280
284
|
tmp_2 = this_0;
|
|
281
285
|
}
|
|
282
286
|
var tmp$ret$2 = tmp_2;
|
|
283
|
-
var this_1 = new CompilerArguments(tmp, tmp_0, tmp_1, tmp$ret$2, _PackageName___init__impl__s13tbs(this.
|
|
287
|
+
var this_1 = new CompilerArguments(tmp, tmp_0, tmp_1, tmp$ret$2, _PackageName___init__impl__s13tbs(this.j47()), this.l47(this.k47()), this.m47(), this.n47());
|
|
284
288
|
// Inline function 'kotlin.contracts.contract' call
|
|
285
|
-
var tmp0_iterator = this.
|
|
289
|
+
var tmp0_iterator = this.m48_1(this_1).g();
|
|
286
290
|
while (tmp0_iterator.h()) {
|
|
287
291
|
var element = tmp0_iterator.i();
|
|
288
292
|
// Inline function 'community.flock.wirespec.plugin.cli.Convert.run.<anonymous>' call
|
|
@@ -292,10 +296,10 @@
|
|
|
292
296
|
var destruct = element.ak_1;
|
|
293
297
|
var result = destruct.qd();
|
|
294
298
|
var file = destruct.rd();
|
|
295
|
-
this.
|
|
299
|
+
this.n48_1(result, file);
|
|
296
300
|
} else {
|
|
297
301
|
if (element instanceof Left) {
|
|
298
|
-
this.
|
|
302
|
+
this.s3s(element.uj_1, VOID, true);
|
|
299
303
|
} else {
|
|
300
304
|
noWhenBranchMatchedException();
|
|
301
305
|
}
|
|
@@ -303,37 +307,37 @@
|
|
|
303
307
|
}
|
|
304
308
|
};
|
|
305
309
|
function _get_inputFile__x1bqj($this) {
|
|
306
|
-
return $this.
|
|
310
|
+
return $this.z46_1.k42($this, inputFile$factory_0());
|
|
307
311
|
}
|
|
308
312
|
function CommonOptions() {
|
|
309
313
|
CliktCommand.call(this);
|
|
310
|
-
this.
|
|
311
|
-
this.
|
|
312
|
-
this.
|
|
313
|
-
this.
|
|
314
|
-
this.
|
|
315
|
-
this.
|
|
316
|
-
this.
|
|
317
|
-
}
|
|
318
|
-
protoOf(CommonOptions).
|
|
319
|
-
return this.
|
|
314
|
+
this.z46_1 = option(this, Options_InputFile_getInstance().h46_1.slice(), 'Input file').v42(this, inputFile$factory());
|
|
315
|
+
this.a47_1 = option(this, Options_InputDir_getInstance().h46_1.slice(), 'Input directory').v42(this, inputDir$factory());
|
|
316
|
+
this.b47_1 = option(this, Options_OutputDir_getInstance().h46_1.slice(), 'Output directory').v42(this, outputDir$factory());
|
|
317
|
+
this.c47_1 = default_0(option(this, Options_PackageName_getInstance().h46_1.slice(), 'Package name'), 'community.flock.wirespec.generated').v42(this, packageName$factory());
|
|
318
|
+
this.d47_1 = default_0(option(this, Options_LogLevel_getInstance().h46_1.slice(), 'Log level: ' + Companion_instance_1.toString()), Level_ERROR_getInstance().toString()).v42(this, logLevel$factory());
|
|
319
|
+
this.e47_1 = flag(option(this, Options_Shared_getInstance().h46_1.slice(), 'Generate shared wirespec code'), [], false).v42(this, shared$factory());
|
|
320
|
+
this.f47_1 = flag(option(this, Options_Strict_getInstance().h46_1.slice(), 'Strict mode'), []).v42(this, strict$factory());
|
|
321
|
+
}
|
|
322
|
+
protoOf(CommonOptions).g47 = function () {
|
|
323
|
+
return this.a47_1.k42(this, inputDir$factory_0());
|
|
320
324
|
};
|
|
321
|
-
protoOf(CommonOptions).
|
|
322
|
-
return this.
|
|
325
|
+
protoOf(CommonOptions).i47 = function () {
|
|
326
|
+
return this.b47_1.k42(this, outputDir$factory_0());
|
|
323
327
|
};
|
|
324
|
-
protoOf(CommonOptions).
|
|
325
|
-
return this.
|
|
328
|
+
protoOf(CommonOptions).j47 = function () {
|
|
329
|
+
return this.c47_1.k42(this, packageName$factory_0());
|
|
326
330
|
};
|
|
327
|
-
protoOf(CommonOptions).
|
|
328
|
-
return this.
|
|
331
|
+
protoOf(CommonOptions).k47 = function () {
|
|
332
|
+
return this.d47_1.k42(this, logLevel$factory_0());
|
|
329
333
|
};
|
|
330
|
-
protoOf(CommonOptions).
|
|
331
|
-
return this.
|
|
334
|
+
protoOf(CommonOptions).m47 = function () {
|
|
335
|
+
return this.e47_1.k42(this, shared$factory_0());
|
|
332
336
|
};
|
|
333
|
-
protoOf(CommonOptions).
|
|
334
|
-
return this.
|
|
337
|
+
protoOf(CommonOptions).n47 = function () {
|
|
338
|
+
return this.f47_1.k42(this, strict$factory_0());
|
|
335
339
|
};
|
|
336
|
-
protoOf(CommonOptions).
|
|
340
|
+
protoOf(CommonOptions).h47 = function (inputDir) {
|
|
337
341
|
var tmp;
|
|
338
342
|
if (!(inputDir == null) && !(_get_inputFile__x1bqj(this) == null)) {
|
|
339
343
|
throw new CliktError('Choose either a file or a directory. Not Both.');
|
|
@@ -345,7 +349,7 @@
|
|
|
345
349
|
} else {
|
|
346
350
|
// Inline function 'kotlin.let' call
|
|
347
351
|
// Inline function 'kotlin.contracts.contract' call
|
|
348
|
-
tmp_0 = Companion_instance_2.
|
|
352
|
+
tmp_0 = Companion_instance_2.j2c(tmp0_safe_receiver);
|
|
349
353
|
}
|
|
350
354
|
var tmp1_elvis_lhs = tmp_0;
|
|
351
355
|
var tmp_1;
|
|
@@ -367,7 +371,7 @@
|
|
|
367
371
|
}
|
|
368
372
|
return tmp;
|
|
369
373
|
};
|
|
370
|
-
protoOf(CommonOptions).
|
|
374
|
+
protoOf(CommonOptions).l47 = function (_this__u8e3s4) {
|
|
371
375
|
// Inline function 'kotlin.text.uppercase' call
|
|
372
376
|
// Inline function 'kotlin.text.trim' call
|
|
373
377
|
// Inline function 'kotlin.js.asDynamic' call
|
|
@@ -414,7 +418,7 @@
|
|
|
414
418
|
}
|
|
415
419
|
function Options(name, ordinal, flags) {
|
|
416
420
|
Enum.call(this, name, ordinal);
|
|
417
|
-
this.
|
|
421
|
+
this.h46_1 = flags;
|
|
418
422
|
}
|
|
419
423
|
function Options_InputDir_getInstance() {
|
|
420
424
|
Options_initEntries();
|
|
@@ -485,32 +489,32 @@
|
|
|
485
489
|
}
|
|
486
490
|
function inputDir$factory() {
|
|
487
491
|
return getPropertyCallableRef('inputDir', 1, KProperty1, function (receiver) {
|
|
488
|
-
return receiver.
|
|
492
|
+
return receiver.g47();
|
|
489
493
|
}, null);
|
|
490
494
|
}
|
|
491
495
|
function outputDir$factory() {
|
|
492
496
|
return getPropertyCallableRef('outputDir', 1, KProperty1, function (receiver) {
|
|
493
|
-
return receiver.
|
|
497
|
+
return receiver.i47();
|
|
494
498
|
}, null);
|
|
495
499
|
}
|
|
496
500
|
function packageName$factory() {
|
|
497
501
|
return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) {
|
|
498
|
-
return receiver.
|
|
502
|
+
return receiver.j47();
|
|
499
503
|
}, null);
|
|
500
504
|
}
|
|
501
505
|
function logLevel$factory() {
|
|
502
506
|
return getPropertyCallableRef('logLevel', 1, KProperty1, function (receiver) {
|
|
503
|
-
return receiver.
|
|
507
|
+
return receiver.k47();
|
|
504
508
|
}, null);
|
|
505
509
|
}
|
|
506
510
|
function shared$factory() {
|
|
507
511
|
return getPropertyCallableRef('shared', 1, KProperty1, function (receiver) {
|
|
508
|
-
return receiver.
|
|
512
|
+
return receiver.m47();
|
|
509
513
|
}, null);
|
|
510
514
|
}
|
|
511
515
|
function strict$factory() {
|
|
512
516
|
return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) {
|
|
513
|
-
return receiver.
|
|
517
|
+
return receiver.n47();
|
|
514
518
|
}, null);
|
|
515
519
|
}
|
|
516
520
|
function inputFile$factory_0() {
|
|
@@ -520,32 +524,32 @@
|
|
|
520
524
|
}
|
|
521
525
|
function inputDir$factory_0() {
|
|
522
526
|
return getPropertyCallableRef('inputDir', 1, KProperty1, function (receiver) {
|
|
523
|
-
return receiver.
|
|
527
|
+
return receiver.g47();
|
|
524
528
|
}, null);
|
|
525
529
|
}
|
|
526
530
|
function outputDir$factory_0() {
|
|
527
531
|
return getPropertyCallableRef('outputDir', 1, KProperty1, function (receiver) {
|
|
528
|
-
return receiver.
|
|
532
|
+
return receiver.i47();
|
|
529
533
|
}, null);
|
|
530
534
|
}
|
|
531
535
|
function packageName$factory_0() {
|
|
532
536
|
return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) {
|
|
533
|
-
return receiver.
|
|
537
|
+
return receiver.j47();
|
|
534
538
|
}, null);
|
|
535
539
|
}
|
|
536
540
|
function logLevel$factory_0() {
|
|
537
541
|
return getPropertyCallableRef('logLevel', 1, KProperty1, function (receiver) {
|
|
538
|
-
return receiver.
|
|
542
|
+
return receiver.k47();
|
|
539
543
|
}, null);
|
|
540
544
|
}
|
|
541
545
|
function shared$factory_0() {
|
|
542
546
|
return getPropertyCallableRef('shared', 1, KProperty1, function (receiver) {
|
|
543
|
-
return receiver.
|
|
547
|
+
return receiver.m47();
|
|
544
548
|
}, null);
|
|
545
549
|
}
|
|
546
550
|
function strict$factory_0() {
|
|
547
551
|
return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) {
|
|
548
|
-
return receiver.
|
|
552
|
+
return receiver.n47();
|
|
549
553
|
}, null);
|
|
550
554
|
}
|
|
551
555
|
function main(args) {
|
|
@@ -579,28 +583,31 @@
|
|
|
579
583
|
var tmp_0 = compile$ref();
|
|
580
584
|
var tmp_1 = convert$ref();
|
|
581
585
|
// Inline function 'kotlin.contracts.contract' call
|
|
582
|
-
tmp.
|
|
586
|
+
tmp.d45(tmp_0, tmp_1, write$ref())(this_1);
|
|
583
587
|
}
|
|
584
588
|
function compile_0(arguments_0) {
|
|
585
|
-
var input = arguments_0.
|
|
586
|
-
var output = arguments_0.
|
|
587
|
-
var languages = arguments_0.
|
|
588
|
-
var packageName = arguments_0.
|
|
589
|
-
var logger = new Logger(arguments_0.
|
|
590
|
-
var operation = arguments_0.
|
|
589
|
+
var input = arguments_0.a2c_1;
|
|
590
|
+
var output = arguments_0.b2c_1;
|
|
591
|
+
var languages = arguments_0.c2c_1;
|
|
592
|
+
var packageName = arguments_0.d2c_1;
|
|
593
|
+
var logger = new Logger(arguments_0.e2c_1);
|
|
594
|
+
var operation = arguments_0.z2b_1;
|
|
591
595
|
var tmp;
|
|
592
596
|
if (operation instanceof Convert) {
|
|
593
597
|
var fullPath = input instanceof FullFilePath ? input : THROW_CCE();
|
|
594
598
|
var file = new JsonFile(fullPath);
|
|
595
|
-
var strict = arguments_0.
|
|
596
|
-
var format = operation.
|
|
599
|
+
var strict = arguments_0.g2c_1;
|
|
600
|
+
var format = operation.i2c_1;
|
|
597
601
|
var tmp_0;
|
|
598
602
|
switch (format.q2_1) {
|
|
599
603
|
case 0:
|
|
600
|
-
tmp_0 = OpenApiV2Parser_instance.
|
|
604
|
+
tmp_0 = OpenApiV2Parser_instance.e2b(file.z1a(), !strict);
|
|
601
605
|
break;
|
|
602
606
|
case 1:
|
|
603
|
-
tmp_0 = OpenApiV3Parser_instance.
|
|
607
|
+
tmp_0 = OpenApiV3Parser_instance.e2b(file.z1a(), !strict);
|
|
608
|
+
break;
|
|
609
|
+
case 2:
|
|
610
|
+
tmp_0 = AvroParser_instance.n2e(file.z1a());
|
|
604
611
|
break;
|
|
605
612
|
default:
|
|
606
613
|
noWhenBranchMatchedException();
|
|
@@ -623,7 +630,7 @@
|
|
|
623
630
|
var tmp_1;
|
|
624
631
|
if (!emitter.o22_1) {
|
|
625
632
|
// Inline function 'kotlin.text.replaceFirstChar' call
|
|
626
|
-
var this_1 = _FileName___get_value__impl__3u4cz6(fullPath.
|
|
633
|
+
var this_1 = _FileName___get_value__impl__3u4cz6(fullPath.o2c_1);
|
|
627
634
|
var tmp_2;
|
|
628
635
|
// Inline function 'kotlin.text.isNotEmpty' call
|
|
629
636
|
if (charSequenceLength(this_1) > 0) {
|
|
@@ -641,7 +648,7 @@
|
|
|
641
648
|
tmp_2 = this_1;
|
|
642
649
|
}
|
|
643
650
|
var tmp$ret$7 = tmp_2;
|
|
644
|
-
tmp_1 = to(listOf(new Emitted(tmp$ret$7, first(results).
|
|
651
|
+
tmp_1 = to(listOf(new Emitted(tmp$ret$7, first(results).w25_1)), file_0);
|
|
645
652
|
} else {
|
|
646
653
|
tmp_1 = to(results, file_0);
|
|
647
654
|
}
|
|
@@ -667,25 +674,25 @@
|
|
|
667
674
|
if (input instanceof FullDirPath) {
|
|
668
675
|
// Inline function 'kotlin.collections.flatMap' call
|
|
669
676
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
670
|
-
var this_3 = (new Directory(input.
|
|
677
|
+
var this_3 = (new Directory(input.t2c_1)).s48();
|
|
671
678
|
var destination_1 = ArrayList_init_$Create$();
|
|
672
679
|
var tmp0_iterator_1 = this_3.g();
|
|
673
680
|
while (tmp0_iterator_1.h()) {
|
|
674
681
|
var element = tmp0_iterator_1.i();
|
|
675
682
|
// Inline function 'community.flock.wirespec.plugin.cli.compile.<anonymous>' call
|
|
676
|
-
var list = wirespec(element, languages, packageName, out(element.
|
|
683
|
+
var list = wirespec(element, languages, packageName, out(element.q48_1, packageName, output), logger);
|
|
677
684
|
addAll(destination_1, list);
|
|
678
685
|
}
|
|
679
686
|
tmp_4 = destination_1;
|
|
680
687
|
} else {
|
|
681
688
|
if (input instanceof FullFilePath) {
|
|
682
689
|
var tmp_5;
|
|
683
|
-
if (input.
|
|
690
|
+
if (input.p2c_1.equals(FileExtension_Wirespec_getInstance())) {
|
|
684
691
|
// Inline function 'kotlin.let' call
|
|
685
692
|
// Inline function 'kotlin.contracts.contract' call
|
|
686
693
|
// Inline function 'community.flock.wirespec.plugin.cli.compile.<anonymous>' call
|
|
687
694
|
var it = new WirespecFile(input);
|
|
688
|
-
tmp_5 = wirespec(it, languages, packageName, out(it.
|
|
695
|
+
tmp_5 = wirespec(it, languages, packageName, out(it.q48_1, packageName, output), logger);
|
|
689
696
|
} else {
|
|
690
697
|
// Inline function 'arrow.core.nel' call
|
|
691
698
|
// Inline function 'arrow.core.nel' call
|
|
@@ -718,7 +725,7 @@
|
|
|
718
725
|
// Inline function 'community.flock.wirespec.plugin.cli.write.<anonymous>' call
|
|
719
726
|
var name = element.qd();
|
|
720
727
|
var result = element.rd();
|
|
721
|
-
var tmp1_safe_receiver = file == null ? null : file.
|
|
728
|
+
var tmp1_safe_receiver = file == null ? null : file.t48(_FileName___init__impl__nzn12e(name));
|
|
722
729
|
var tmp;
|
|
723
730
|
if (tmp1_safe_receiver == null) {
|
|
724
731
|
tmp = null;
|
|
@@ -884,7 +891,7 @@
|
|
|
884
891
|
// Inline function 'arrow.core.Either.map.<anonymous>' call
|
|
885
892
|
// Inline function 'community.flock.wirespec.plugin.cli.wirespec.<anonymous>.<anonymous>.<anonymous>' call
|
|
886
893
|
var it = results.ak_1;
|
|
887
|
-
var tmp$ret$2 = listOf(new Emitted(Companion_getInstance().
|
|
894
|
+
var tmp$ret$2 = listOf(new Emitted(Companion_getInstance().i24(_FileName___get_value__impl__3u4cz6(path(FileExtension_Wirespec_getInstance()).o2c_1)), first(it).w25_1));
|
|
888
895
|
tmp_0 = new Right(tmp$ret$2);
|
|
889
896
|
} else {
|
|
890
897
|
if (results instanceof Left) {
|
|
@@ -957,7 +964,7 @@
|
|
|
957
964
|
function compile$lambda($output) {
|
|
958
965
|
return function (it) {
|
|
959
966
|
var tmp = $output;
|
|
960
|
-
return new FullFilePath(_Output___get_value__impl__a8kw1g(ensureNotNull(tmp == null ? null : new Output(tmp)).
|
|
967
|
+
return new FullFilePath(_Output___get_value__impl__a8kw1g(ensureNotNull(tmp == null ? null : new Output(tmp)).w2c_1), _FileName___init__impl__nzn12e('console'), it);
|
|
961
968
|
};
|
|
962
969
|
}
|
|
963
970
|
function out$lambda($output, $this_out, $packageName) {
|
|
@@ -969,49 +976,49 @@
|
|
|
969
976
|
// Inline function 'kotlin.text.lowercase' call
|
|
970
977
|
// Inline function 'kotlin.js.asDynamic' call
|
|
971
978
|
var tmp$ret$1 = extension.p2_1.toLowerCase();
|
|
972
|
-
tmp = $this_out.
|
|
979
|
+
tmp = $this_out.n2c_1 + '/out/' + tmp$ret$1;
|
|
973
980
|
} else {
|
|
974
981
|
tmp = new Output(tmp0_elvis_lhs);
|
|
975
982
|
}
|
|
976
983
|
var dir = tmp;
|
|
977
|
-
return $this_out.
|
|
984
|
+
return $this_out.r2c(toString(dir) + '/' + joinToString(split(_PackageName___get_value__impl__2zr98c($packageName), charArrayOf([_Char___init__impl__6a9atx(46)])), '/'), VOID, extension);
|
|
978
985
|
};
|
|
979
986
|
}
|
|
980
987
|
function JavaFile(path) {
|
|
981
|
-
File.call(this, path.
|
|
988
|
+
File.call(this, path.r2c(VOID, VOID, FileExtension_Java_getInstance()));
|
|
982
989
|
}
|
|
983
|
-
protoOf(JavaFile).
|
|
984
|
-
return new JavaFile(this.
|
|
990
|
+
protoOf(JavaFile).t48 = function (fileName) {
|
|
991
|
+
return new JavaFile(this.q48_1.r2c(VOID, fileName));
|
|
985
992
|
};
|
|
986
993
|
function JsonFile(path) {
|
|
987
|
-
File.call(this, path.
|
|
994
|
+
File.call(this, path.r2c(VOID, VOID, FileExtension_Json_getInstance()));
|
|
988
995
|
}
|
|
989
|
-
protoOf(JsonFile).
|
|
990
|
-
return new JsonFile(this.
|
|
996
|
+
protoOf(JsonFile).t48 = function (fileName) {
|
|
997
|
+
return new JsonFile(this.q48_1.r2c(VOID, fileName));
|
|
991
998
|
};
|
|
992
999
|
function KotlinFile(path) {
|
|
993
|
-
File.call(this, path.
|
|
1000
|
+
File.call(this, path.r2c(VOID, VOID, FileExtension_Kotlin_getInstance()));
|
|
994
1001
|
}
|
|
995
|
-
protoOf(KotlinFile).
|
|
996
|
-
return new KotlinFile(this.
|
|
1002
|
+
protoOf(KotlinFile).t48 = function (fileName) {
|
|
1003
|
+
return new KotlinFile(this.q48_1.r2c(VOID, fileName));
|
|
997
1004
|
};
|
|
998
1005
|
function ScalaFile(path) {
|
|
999
|
-
File.call(this, path.
|
|
1006
|
+
File.call(this, path.r2c(VOID, VOID, FileExtension_Scala_getInstance()));
|
|
1000
1007
|
}
|
|
1001
|
-
protoOf(ScalaFile).
|
|
1002
|
-
return new ScalaFile(this.
|
|
1008
|
+
protoOf(ScalaFile).t48 = function (fileName) {
|
|
1009
|
+
return new ScalaFile(this.q48_1.r2c(VOID, fileName));
|
|
1003
1010
|
};
|
|
1004
1011
|
function TypeScriptFile(path) {
|
|
1005
|
-
File.call(this, path.
|
|
1012
|
+
File.call(this, path.r2c(VOID, VOID, FileExtension_TypeScript_getInstance()));
|
|
1006
1013
|
}
|
|
1007
|
-
protoOf(TypeScriptFile).
|
|
1008
|
-
return new TypeScriptFile(this.
|
|
1014
|
+
protoOf(TypeScriptFile).t48 = function (fileName) {
|
|
1015
|
+
return new TypeScriptFile(this.q48_1.r2c(VOID, fileName));
|
|
1009
1016
|
};
|
|
1010
1017
|
function WirespecFile(path) {
|
|
1011
|
-
File.call(this, path.
|
|
1018
|
+
File.call(this, path.r2c(VOID, VOID, FileExtension_Wirespec_getInstance()));
|
|
1012
1019
|
}
|
|
1013
|
-
protoOf(WirespecFile).
|
|
1014
|
-
return new WirespecFile(this.
|
|
1020
|
+
protoOf(WirespecFile).t48 = function (fileName) {
|
|
1021
|
+
return new WirespecFile(this.q48_1.r2c(VOID, fileName));
|
|
1015
1022
|
};
|
|
1016
1023
|
function cli(args) {
|
|
1017
1024
|
main(args);
|
|
@@ -1074,14 +1081,14 @@
|
|
|
1074
1081
|
return it;
|
|
1075
1082
|
}
|
|
1076
1083
|
function Directory$wirespecFiles$lambda_0(it) {
|
|
1077
|
-
return endsWith(it, FileExtension_Wirespec_getInstance().
|
|
1084
|
+
return endsWith(it, FileExtension_Wirespec_getInstance().m2c_1);
|
|
1078
1085
|
}
|
|
1079
1086
|
function Directory$wirespecFiles$lambda_1(it) {
|
|
1080
|
-
return dropLast(it, FileExtension_Wirespec_getInstance().
|
|
1087
|
+
return dropLast(it, FileExtension_Wirespec_getInstance().m2c_1.length + 1 | 0);
|
|
1081
1088
|
}
|
|
1082
1089
|
function Directory$wirespecFiles$lambda_2(this$0) {
|
|
1083
1090
|
return function (it) {
|
|
1084
|
-
return new FullFilePath(this$0.
|
|
1091
|
+
return new FullFilePath(this$0.r48_1, _FileName___init__impl__nzn12e(it));
|
|
1085
1092
|
};
|
|
1086
1093
|
}
|
|
1087
1094
|
function WirespecFile$_init_$ref_cj1n5j() {
|
|
@@ -1092,10 +1099,10 @@
|
|
|
1092
1099
|
return l;
|
|
1093
1100
|
}
|
|
1094
1101
|
function Directory(path) {
|
|
1095
|
-
this.
|
|
1102
|
+
this.r48_1 = path;
|
|
1096
1103
|
}
|
|
1097
|
-
protoOf(Directory).
|
|
1098
|
-
var tmp = asSequence(iterator(get_fs().readdirSync(this.
|
|
1104
|
+
protoOf(Directory).s48 = function () {
|
|
1105
|
+
var tmp = asSequence(iterator(get_fs().readdirSync(this.r48_1, 'utf-8')));
|
|
1099
1106
|
var tmp_0 = map(tmp, Directory$wirespecFiles$lambda);
|
|
1100
1107
|
var tmp_1 = filter(tmp_0, Directory$wirespecFiles$lambda_0);
|
|
1101
1108
|
var tmp_2 = map(tmp_1, Directory$wirespecFiles$lambda_1);
|
|
@@ -1103,20 +1110,20 @@
|
|
|
1103
1110
|
return toSet_0(map(tmp_3, WirespecFile$_init_$ref_cj1n5j()));
|
|
1104
1111
|
};
|
|
1105
1112
|
function File(path) {
|
|
1106
|
-
this.
|
|
1113
|
+
this.q48_1 = path;
|
|
1107
1114
|
}
|
|
1108
1115
|
protoOf(File).z1a = function () {
|
|
1109
1116
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1110
|
-
return get_fs().readFileSync(this.
|
|
1117
|
+
return get_fs().readFileSync(this.q48_1.toString(), 'utf-8');
|
|
1111
1118
|
};
|
|
1112
1119
|
protoOf(File).t18 = function (string) {
|
|
1113
1120
|
// Inline function 'kotlin.run' call
|
|
1114
1121
|
// Inline function 'kotlin.contracts.contract' call
|
|
1115
1122
|
// Inline function 'community.flock.wirespec.plugin.cli.io.File.write.<anonymous>' call
|
|
1116
|
-
var $this$run = this.
|
|
1123
|
+
var $this$run = this.q48_1.r2c(joinToString(split_0(this.q48_1.n2c_1, ['out']), 'out/node'));
|
|
1117
1124
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1118
|
-
if (!get_fs().existsSync($this$run.
|
|
1119
|
-
get_fs().mkdirSync($this$run.
|
|
1125
|
+
if (!get_fs().existsSync($this$run.n2c_1)) {
|
|
1126
|
+
get_fs().mkdirSync($this$run.n2c_1, {recursive: true});
|
|
1120
1127
|
}
|
|
1121
1128
|
get_fs().writeFileSync($this$run.toString(), string);
|
|
1122
1129
|
};
|