@flock/wirespec 0.8.49 → 0.8.50
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/clikt-clikt.js +1150 -1150
- package/clikt-clikt.js.map +1 -1
- package/colormath-root-colormath.js +362 -362
- package/colormath-root-colormath.js.map +1 -1
- package/kotlin-kotlin-stdlib-js-ir.js +10 -10
- package/kotlin-kotlin-stdlib-js-ir.js.map +1 -1
- package/kotlin-openapi-bindings.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core-js-ir.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json-js-ir.js.map +1 -1
- package/markdown.js +1838 -1838
- package/markdown.js.map +1 -1
- package/mordant-mordant.js +1586 -1586
- package/mordant-mordant.js.map +1 -1
- package/package.json +3 -3
- package/wirespec-src-compiler-core.js +31 -31
- package/wirespec-src-compiler-core.js.map +1 -1
- package/wirespec-src-compiler-lib.js +336 -260
- package/wirespec-src-compiler-lib.js.map +1 -1
- package/wirespec-src-converter-openapi.js.map +1 -1
- package/wirespec-src-plugin-arguments.js +20 -20
- package/wirespec-src-plugin-arguments.js.map +1 -1
- package/wirespec-src-plugin-cli.js +284 -283
- package/wirespec-src-plugin-cli.js.map +1 -1
- package/wirespec-src-plugin-npm.d.ts +380 -0
- package/wirespec-src-plugin-npm.js +57 -0
- package/wirespec-src-plugin-npm.js.map +1 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (root, factory) {
|
|
2
2
|
if (typeof define === 'function' && define.amd)
|
|
3
|
-
define(['exports', './kotlin-kotlin-stdlib-js-ir.js', './clikt-clikt.js', './wirespec-src-
|
|
3
|
+
define(['exports', './kotlin-kotlin-stdlib-js-ir.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
|
-
factory(module.exports, require('./kotlin-kotlin-stdlib-js-ir.js'), require('./clikt-clikt.js'), require('./wirespec-src-
|
|
5
|
+
factory(module.exports, require('./kotlin-kotlin-stdlib-js-ir.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
7
|
if (typeof this['kotlin-kotlin-stdlib-js-ir'] === 'undefined') {
|
|
8
8
|
throw new Error("Error loading module 'wirespec-src-plugin-cli'. Its dependency 'kotlin-kotlin-stdlib-js-ir' was not found. Please, check whether 'kotlin-kotlin-stdlib-js-ir' is loaded prior to 'wirespec-src-plugin-cli'.");
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
if (typeof this['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 this['wirespec-src-compiler-core'] === 'undefined') {
|
|
14
|
-
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'.");
|
|
15
|
-
}
|
|
16
13
|
if (typeof this['wirespec-src-plugin-arguments'] === 'undefined') {
|
|
17
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'.");
|
|
18
15
|
}
|
|
16
|
+
if (typeof this['wirespec-src-compiler-core'] === 'undefined') {
|
|
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
|
+
}
|
|
19
19
|
if (typeof this['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
|
}
|
|
@@ -25,30 +25,21 @@
|
|
|
25
25
|
if (typeof this['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
|
-
root['wirespec-src-plugin-cli'] = factory(typeof this['wirespec-src-plugin-cli'] === 'undefined' ? {} : this['wirespec-src-plugin-cli'], this['kotlin-kotlin-stdlib-js-ir'], this['clikt-clikt'], this['wirespec-src-
|
|
28
|
+
root['wirespec-src-plugin-cli'] = factory(typeof this['wirespec-src-plugin-cli'] === 'undefined' ? {} : this['wirespec-src-plugin-cli'], this['kotlin-kotlin-stdlib-js-ir'], this['clikt-clikt'], this['wirespec-src-plugin-arguments'], this['wirespec-src-compiler-core'], this['wirespec-src-converter-openapi'], this['arrow-arrow-core'], this['wirespec-src-compiler-lib']);
|
|
29
29
|
}
|
|
30
|
-
}(this, function (_, kotlin_kotlin, kotlin_clikt_clikt,
|
|
30
|
+
}(this, 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_getInstance = kotlin_kotlin.$_$.t3;
|
|
34
|
-
var
|
|
34
|
+
var subcommands = kotlin_clikt_clikt.$_$.c;
|
|
35
35
|
var protoOf = kotlin_kotlin.$_$.q9;
|
|
36
|
-
var
|
|
36
|
+
var objectMeta = kotlin_kotlin.$_$.p9;
|
|
37
37
|
var VOID = kotlin_kotlin.$_$.ke;
|
|
38
38
|
var setMetadataFor = kotlin_kotlin.$_$.r9;
|
|
39
|
-
var subcommands = kotlin_clikt_clikt.$_$.c;
|
|
40
|
-
var objectMeta = kotlin_kotlin.$_$.p9;
|
|
41
39
|
var NoOpCliktCommand = kotlin_clikt_clikt.$_$.b;
|
|
42
|
-
var
|
|
40
|
+
var classMeta = kotlin_kotlin.$_$.l8;
|
|
43
41
|
var option = kotlin_clikt_clikt.$_$.h;
|
|
44
|
-
var
|
|
45
|
-
var default_0 = kotlin_clikt_clikt.$_$.e;
|
|
46
|
-
var flag = kotlin_clikt_clikt.$_$.f;
|
|
47
|
-
var Companion_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.t;
|
|
48
|
-
var FullDirPath = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.d;
|
|
49
|
-
var Console_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.s;
|
|
50
|
-
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.j1;
|
|
51
|
-
var Companion_getInstance_0 = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.u;
|
|
42
|
+
var Companion_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.u;
|
|
52
43
|
var choice = kotlin_clikt_clikt.$_$.j;
|
|
53
44
|
var multiple = kotlin_clikt_clikt.$_$.g;
|
|
54
45
|
var Compile_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.v;
|
|
@@ -64,6 +55,15 @@
|
|
|
64
55
|
var listOf = kotlin_kotlin.$_$.k6;
|
|
65
56
|
var Convert = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.g;
|
|
66
57
|
var setOf = kotlin_kotlin.$_$.x6;
|
|
58
|
+
var CliktCommand = kotlin_clikt_clikt.$_$.a;
|
|
59
|
+
var get_DEFAULT_PACKAGE_NAME = kotlin_community_flock_wirespec_compiler_core.$_$.a;
|
|
60
|
+
var default_0 = kotlin_clikt_clikt.$_$.e;
|
|
61
|
+
var flag = kotlin_clikt_clikt.$_$.f;
|
|
62
|
+
var Companion_getInstance_0 = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.t;
|
|
63
|
+
var FullDirPath = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.d;
|
|
64
|
+
var Console_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.s;
|
|
65
|
+
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.j1;
|
|
66
|
+
var Enum = kotlin_kotlin.$_$.cd;
|
|
67
67
|
var KProperty1 = kotlin_kotlin.$_$.ja;
|
|
68
68
|
var getPropertyCallableRef = kotlin_kotlin.$_$.r8;
|
|
69
69
|
var numberRangeToNumber = kotlin_kotlin.$_$.k9;
|
|
@@ -87,12 +87,7 @@
|
|
|
87
87
|
var toString_0 = kotlin_kotlin.$_$.v1;
|
|
88
88
|
var first = kotlin_kotlin.$_$.n5;
|
|
89
89
|
var Emitted = kotlin_community_flock_wirespec_compiler_core.$_$.b;
|
|
90
|
-
var
|
|
91
|
-
var compile = kotlin_community_flock_wirespec_compiler_core.$_$.b1;
|
|
92
|
-
var Left = kotlin_io_arrow_kt_arrow_core.$_$.c;
|
|
93
|
-
var Companion_getInstance_3 = kotlin_community_flock_wirespec_compiler_core.$_$.j1;
|
|
94
|
-
var Right = kotlin_io_arrow_kt_arrow_core.$_$.d;
|
|
95
|
-
var println = kotlin_kotlin.$_$.z7;
|
|
90
|
+
var print = kotlin_kotlin.$_$.b8;
|
|
96
91
|
var WirespecEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.g;
|
|
97
92
|
var equals = kotlin_kotlin.$_$.o8;
|
|
98
93
|
var TypeScriptEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.f;
|
|
@@ -107,7 +102,12 @@
|
|
|
107
102
|
var JavaEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.c;
|
|
108
103
|
var FileExtension_Java_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.h;
|
|
109
104
|
var Jvm_Java_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.n;
|
|
110
|
-
var
|
|
105
|
+
var Wirespec_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.k1;
|
|
106
|
+
var compile = kotlin_community_flock_wirespec_compiler_core.$_$.b1;
|
|
107
|
+
var Left = kotlin_io_arrow_kt_arrow_core.$_$.c;
|
|
108
|
+
var Companion_getInstance_3 = kotlin_community_flock_wirespec_compiler_core.$_$.j1;
|
|
109
|
+
var Right = kotlin_io_arrow_kt_arrow_core.$_$.d;
|
|
110
|
+
var println = kotlin_kotlin.$_$.z7;
|
|
111
111
|
var ensureNotNull = kotlin_kotlin.$_$.ae;
|
|
112
112
|
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.r1;
|
|
113
113
|
var charArrayOf = kotlin_kotlin.$_$.g8;
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
var get_noLogger = kotlin_community_flock_wirespec_compiler_core.$_$.e1;
|
|
119
119
|
var Definition = kotlin_community_flock_wirespec_compiler_core.$_$.h;
|
|
120
120
|
var isInterface = kotlin_kotlin.$_$.d9;
|
|
121
|
-
var produce = kotlin_community_flock_wirespec_compiler_lib.$_$.
|
|
121
|
+
var produce = kotlin_community_flock_wirespec_compiler_lib.$_$.b;
|
|
122
122
|
var endsWith = kotlin_kotlin.$_$.bb;
|
|
123
123
|
var dropLast = kotlin_kotlin.$_$.za;
|
|
124
124
|
var iterator = kotlin_kotlin.$_$.h9;
|
|
@@ -136,12 +136,12 @@
|
|
|
136
136
|
var isArray = kotlin_kotlin.$_$.v8;
|
|
137
137
|
//endregion
|
|
138
138
|
//region block: pre-declaration
|
|
139
|
-
setMetadataFor(Options, 'Options', classMeta, Enum);
|
|
140
139
|
setMetadataFor(Companion, 'Companion', objectMeta);
|
|
141
140
|
setMetadataFor(WirespecCli, 'WirespecCli', classMeta, NoOpCliktCommand);
|
|
142
141
|
setMetadataFor(CommonOptions, 'CommonOptions', classMeta, CliktCommand);
|
|
143
142
|
setMetadataFor(Compile_0, 'Compile', classMeta, CommonOptions);
|
|
144
143
|
setMetadataFor(Convert_0, 'Convert', classMeta, CommonOptions);
|
|
144
|
+
setMetadataFor(Options, 'Options', classMeta, Enum);
|
|
145
145
|
setMetadataFor(File, 'File', classMeta);
|
|
146
146
|
setMetadataFor(JavaFile, 'JavaFile', classMeta, File);
|
|
147
147
|
setMetadataFor(JsonFile, 'JsonFile', classMeta, File);
|
|
@@ -151,33 +151,9 @@
|
|
|
151
151
|
setMetadataFor(WirespecFile, 'WirespecFile', classMeta, File);
|
|
152
152
|
setMetadataFor(Directory, 'Directory', classMeta);
|
|
153
153
|
//endregion
|
|
154
|
-
var Options_InputDir_instance;
|
|
155
|
-
var Options_InputFile_instance;
|
|
156
|
-
var Options_OutputDir_instance;
|
|
157
|
-
var Options_Language_instance;
|
|
158
|
-
var Options_PackageName_instance;
|
|
159
|
-
var Options_Strict_instance;
|
|
160
|
-
var Options_Debug_instance;
|
|
161
|
-
var Options_entriesInitialized;
|
|
162
|
-
function Options_initEntries() {
|
|
163
|
-
if (Options_entriesInitialized)
|
|
164
|
-
return Unit_getInstance();
|
|
165
|
-
Options_entriesInitialized = true;
|
|
166
|
-
Options_InputDir_instance = new Options('InputDir', 0, ['-d', '--input-dir']);
|
|
167
|
-
Options_InputFile_instance = new Options('InputFile', 1, ['-f', '--input-file']);
|
|
168
|
-
Options_OutputDir_instance = new Options('OutputDir', 2, ['-o', '--output-dir']);
|
|
169
|
-
Options_Language_instance = new Options('Language', 3, ['-l', '--language']);
|
|
170
|
-
Options_PackageName_instance = new Options('PackageName', 4, ['-p', '--package']);
|
|
171
|
-
Options_Strict_instance = new Options('Strict', 5, ['--strict']);
|
|
172
|
-
Options_Debug_instance = new Options('Debug', 6, ['--debug']);
|
|
173
|
-
}
|
|
174
|
-
function Options(name, ordinal, flags) {
|
|
175
|
-
Enum.call(this, name, ordinal);
|
|
176
|
-
this.r3s_1 = flags;
|
|
177
|
-
}
|
|
178
154
|
function WirespecCli$main$ref($boundThis) {
|
|
179
155
|
var l = function (p0) {
|
|
180
|
-
$boundThis.
|
|
156
|
+
$boundThis.t3g(p0);
|
|
181
157
|
return Unit_getInstance();
|
|
182
158
|
};
|
|
183
159
|
l.callableName = 'main';
|
|
@@ -186,7 +162,7 @@
|
|
|
186
162
|
function Companion() {
|
|
187
163
|
Companion_instance = this;
|
|
188
164
|
}
|
|
189
|
-
protoOf(Companion).
|
|
165
|
+
protoOf(Companion).t3s = function (compile, convert) {
|
|
190
166
|
return WirespecCli$main$ref(subcommands(new WirespecCli(), [new Compile_0(compile), new Convert_0(convert)]));
|
|
191
167
|
};
|
|
192
168
|
var Companion_instance;
|
|
@@ -199,90 +175,29 @@
|
|
|
199
175
|
Companion_getInstance_5();
|
|
200
176
|
NoOpCliktCommand.call(this, VOID, VOID, 'wirespec');
|
|
201
177
|
}
|
|
202
|
-
function _get_inputFile__x1bqj($this) {
|
|
203
|
-
return $this.k3t_1.r3p($this, inputFile$factory_0());
|
|
204
|
-
}
|
|
205
|
-
function CommonOptions() {
|
|
206
|
-
CliktCommand.call(this);
|
|
207
|
-
this.k3t_1 = option(this, Options_InputFile_getInstance().r3s_1.slice(), 'Input file').t3q(this, inputFile$factory());
|
|
208
|
-
this.l3t_1 = option(this, Options_InputDir_getInstance().r3s_1.slice(), 'Input directory').t3q(this, inputDir$factory());
|
|
209
|
-
this.m3t_1 = option(this, Options_OutputDir_getInstance().r3s_1.slice(), 'Output directory').t3q(this, outputDir$factory());
|
|
210
|
-
this.n3t_1 = default_0(option(this, Options_PackageName_getInstance().r3s_1.slice(), 'Package name'), get_DEFAULT_PACKAGE_NAME()).t3q(this, packageName$factory());
|
|
211
|
-
this.o3t_1 = flag(option(this, Options_Strict_getInstance().r3s_1.slice(), 'Strict mode'), []).t3q(this, strict$factory());
|
|
212
|
-
this.p3t_1 = flag(option(this, Options_Debug_getInstance().r3s_1.slice(), 'Debug mode'), []).t3q(this, debug$factory());
|
|
213
|
-
}
|
|
214
|
-
protoOf(CommonOptions).q3t = function () {
|
|
215
|
-
return this.l3t_1.r3p(this, inputDir$factory_0());
|
|
216
|
-
};
|
|
217
|
-
protoOf(CommonOptions).r3t = function () {
|
|
218
|
-
return this.m3t_1.r3p(this, outputDir$factory_0());
|
|
219
|
-
};
|
|
220
|
-
protoOf(CommonOptions).s3t = function () {
|
|
221
|
-
return this.n3t_1.r3p(this, packageName$factory_0());
|
|
222
|
-
};
|
|
223
|
-
protoOf(CommonOptions).t3t = function () {
|
|
224
|
-
return this.o3t_1.r3p(this, strict$factory_0());
|
|
225
|
-
};
|
|
226
|
-
protoOf(CommonOptions).u3t = function () {
|
|
227
|
-
return this.p3t_1.r3p(this, debug$factory_0());
|
|
228
|
-
};
|
|
229
|
-
protoOf(CommonOptions).v3t = function (inputDir) {
|
|
230
|
-
var tmp;
|
|
231
|
-
if (!(inputDir == null) ? !(_get_inputFile__x1bqj(this) == null) : false) {
|
|
232
|
-
throw IllegalStateException_init_$Create$('Choose either a file or a directory. Not Both.');
|
|
233
|
-
} else {
|
|
234
|
-
var tmp0_safe_receiver = _get_inputFile__x1bqj(this);
|
|
235
|
-
var tmp_0;
|
|
236
|
-
if (tmp0_safe_receiver == null) {
|
|
237
|
-
tmp_0 = null;
|
|
238
|
-
} else {
|
|
239
|
-
// Inline function 'kotlin.let' call
|
|
240
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
241
|
-
tmp_0 = Companion_getInstance().a22(tmp0_safe_receiver);
|
|
242
|
-
}
|
|
243
|
-
var tmp2_elvis_lhs = tmp_0;
|
|
244
|
-
var tmp_1;
|
|
245
|
-
if (tmp2_elvis_lhs == null) {
|
|
246
|
-
var tmp_2;
|
|
247
|
-
if (inputDir == null) {
|
|
248
|
-
tmp_2 = null;
|
|
249
|
-
} else {
|
|
250
|
-
// Inline function 'kotlin.let' call
|
|
251
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
252
|
-
tmp_2 = new FullDirPath(inputDir);
|
|
253
|
-
}
|
|
254
|
-
tmp_1 = tmp_2;
|
|
255
|
-
} else {
|
|
256
|
-
tmp_1 = tmp2_elvis_lhs;
|
|
257
|
-
}
|
|
258
|
-
var tmp3_elvis_lhs = tmp_1;
|
|
259
|
-
tmp = tmp3_elvis_lhs == null ? Console_getInstance() : tmp3_elvis_lhs;
|
|
260
|
-
}
|
|
261
|
-
return tmp;
|
|
262
|
-
};
|
|
263
178
|
function _get_languages__ojonze($this) {
|
|
264
|
-
return $this.
|
|
179
|
+
return $this.s3t_1.v3p($this, languages$factory_0());
|
|
265
180
|
}
|
|
266
181
|
function Compile_0(block) {
|
|
267
182
|
CommonOptions.call(this);
|
|
268
|
-
this.
|
|
269
|
-
this.
|
|
183
|
+
this.r3t_1 = block;
|
|
184
|
+
this.s3t_1 = multiple(choice(option(this, Options_Language_getInstance().v3t_1.slice(), 'Language'), Companion_getInstance().k22()), VOID, true).x3q(this, languages$factory());
|
|
270
185
|
}
|
|
271
|
-
protoOf(Compile_0).
|
|
186
|
+
protoOf(Compile_0).u3g = function () {
|
|
272
187
|
// Inline function 'kotlin.let' call
|
|
273
|
-
var tmp0_let = new CompilerArguments(Compile_getInstance(), this.
|
|
188
|
+
var tmp0_let = new CompilerArguments(Compile_getInstance(), this.u3u(this.t3u()), this.v3u(), toSet(_get_languages__ojonze(this)), this.w3u(), this.x3u(), this.y3u());
|
|
274
189
|
// Inline function 'kotlin.contracts.contract' call
|
|
275
|
-
this.
|
|
190
|
+
this.r3t_1(tmp0_let);
|
|
276
191
|
};
|
|
277
192
|
function _get_format__qlarck($this) {
|
|
278
|
-
return $this.
|
|
193
|
+
return $this.x3v_1.v3p($this, format$factory_0());
|
|
279
194
|
}
|
|
280
195
|
function _get_languages__ojonze_0($this) {
|
|
281
|
-
return $this.
|
|
196
|
+
return $this.y3v_1.v3p($this, languages$factory_2());
|
|
282
197
|
}
|
|
283
198
|
function Convert_0(block) {
|
|
284
199
|
CommonOptions.call(this);
|
|
285
|
-
this.
|
|
200
|
+
this.w3v_1 = block;
|
|
286
201
|
var tmp = this;
|
|
287
202
|
// Inline function 'com.github.ajalt.clikt.parameters.types.enum' call
|
|
288
203
|
var tmp0_enum = argument(this, VOID, 'Input format');
|
|
@@ -303,21 +218,21 @@
|
|
|
303
218
|
tmp$ret$2 = element.o5_1;
|
|
304
219
|
tmp0_associateByTo.n3(tmp$ret$2, element);
|
|
305
220
|
}
|
|
306
|
-
tmp.
|
|
307
|
-
this.
|
|
221
|
+
tmp.x3v_1 = choice_0(tmp0_enum, tmp0_associateByTo, true).b3p(this, format$factory());
|
|
222
|
+
this.y3v_1 = multiple(choice(option(this, Options_Language_getInstance().v3t_1.slice(), 'Language'), Companion_getInstance().k22(), VOID, true), listOf(Spec_Wirespec_getInstance())).x3q(this, languages$factory_1());
|
|
308
223
|
}
|
|
309
|
-
protoOf(Convert_0).
|
|
310
|
-
if (this.
|
|
224
|
+
protoOf(Convert_0).u3g = function () {
|
|
225
|
+
if (this.t3u() == null)
|
|
311
226
|
null;
|
|
312
227
|
else {
|
|
313
228
|
// Inline function 'kotlin.let' call
|
|
314
229
|
// Inline function 'kotlin.contracts.contract' call
|
|
315
|
-
this.
|
|
230
|
+
this.n3g('To convert, please specify a file', VOID, true);
|
|
316
231
|
}
|
|
317
232
|
// Inline function 'kotlin.let' call
|
|
318
233
|
var tmp = new Convert(_get_format__qlarck(this));
|
|
319
|
-
var tmp_0 = this.
|
|
320
|
-
var tmp_1 = this.
|
|
234
|
+
var tmp_0 = this.u3u(null);
|
|
235
|
+
var tmp_1 = this.v3u();
|
|
321
236
|
var tmp$ret$2;
|
|
322
237
|
// Inline function 'kotlin.collections.ifEmpty' call
|
|
323
238
|
var tmp0_ifEmpty = toSet(_get_languages__ojonze_0(this));
|
|
@@ -329,10 +244,95 @@
|
|
|
329
244
|
tmp_2 = tmp0_ifEmpty;
|
|
330
245
|
}
|
|
331
246
|
tmp$ret$2 = tmp_2;
|
|
332
|
-
var tmp1_let = new CompilerArguments(tmp, tmp_0, tmp_1, tmp$ret$2, this.
|
|
247
|
+
var tmp1_let = new CompilerArguments(tmp, tmp_0, tmp_1, tmp$ret$2, this.w3u(), this.x3u(), this.y3u());
|
|
333
248
|
// Inline function 'kotlin.contracts.contract' call
|
|
334
|
-
this.
|
|
249
|
+
this.w3v_1(tmp1_let);
|
|
250
|
+
};
|
|
251
|
+
function _get_inputFile__x1bqj($this) {
|
|
252
|
+
return $this.n3u_1.v3p($this, inputFile$factory_0());
|
|
253
|
+
}
|
|
254
|
+
function CommonOptions() {
|
|
255
|
+
CliktCommand.call(this);
|
|
256
|
+
this.n3u_1 = option(this, Options_InputFile_getInstance().v3t_1.slice(), 'Input file').x3q(this, inputFile$factory());
|
|
257
|
+
this.o3u_1 = option(this, Options_InputDir_getInstance().v3t_1.slice(), 'Input directory').x3q(this, inputDir$factory());
|
|
258
|
+
this.p3u_1 = option(this, Options_OutputDir_getInstance().v3t_1.slice(), 'Output directory').x3q(this, outputDir$factory());
|
|
259
|
+
this.q3u_1 = default_0(option(this, Options_PackageName_getInstance().v3t_1.slice(), 'Package name'), get_DEFAULT_PACKAGE_NAME()).x3q(this, packageName$factory());
|
|
260
|
+
this.r3u_1 = flag(option(this, Options_Strict_getInstance().v3t_1.slice(), 'Strict mode'), []).x3q(this, strict$factory());
|
|
261
|
+
this.s3u_1 = flag(option(this, Options_Debug_getInstance().v3t_1.slice(), 'Debug mode'), []).x3q(this, debug$factory());
|
|
262
|
+
}
|
|
263
|
+
protoOf(CommonOptions).t3u = function () {
|
|
264
|
+
return this.o3u_1.v3p(this, inputDir$factory_0());
|
|
265
|
+
};
|
|
266
|
+
protoOf(CommonOptions).v3u = function () {
|
|
267
|
+
return this.p3u_1.v3p(this, outputDir$factory_0());
|
|
268
|
+
};
|
|
269
|
+
protoOf(CommonOptions).w3u = function () {
|
|
270
|
+
return this.q3u_1.v3p(this, packageName$factory_0());
|
|
271
|
+
};
|
|
272
|
+
protoOf(CommonOptions).x3u = function () {
|
|
273
|
+
return this.r3u_1.v3p(this, strict$factory_0());
|
|
274
|
+
};
|
|
275
|
+
protoOf(CommonOptions).y3u = function () {
|
|
276
|
+
return this.s3u_1.v3p(this, debug$factory_0());
|
|
277
|
+
};
|
|
278
|
+
protoOf(CommonOptions).u3u = function (inputDir) {
|
|
279
|
+
var tmp;
|
|
280
|
+
if (!(inputDir == null) ? !(_get_inputFile__x1bqj(this) == null) : false) {
|
|
281
|
+
throw IllegalStateException_init_$Create$('Choose either a file or a directory. Not Both.');
|
|
282
|
+
} else {
|
|
283
|
+
var tmp0_safe_receiver = _get_inputFile__x1bqj(this);
|
|
284
|
+
var tmp_0;
|
|
285
|
+
if (tmp0_safe_receiver == null) {
|
|
286
|
+
tmp_0 = null;
|
|
287
|
+
} else {
|
|
288
|
+
// Inline function 'kotlin.let' call
|
|
289
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
290
|
+
tmp_0 = Companion_getInstance_0().a22(tmp0_safe_receiver);
|
|
291
|
+
}
|
|
292
|
+
var tmp2_elvis_lhs = tmp_0;
|
|
293
|
+
var tmp_1;
|
|
294
|
+
if (tmp2_elvis_lhs == null) {
|
|
295
|
+
var tmp_2;
|
|
296
|
+
if (inputDir == null) {
|
|
297
|
+
tmp_2 = null;
|
|
298
|
+
} else {
|
|
299
|
+
// Inline function 'kotlin.let' call
|
|
300
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
301
|
+
tmp_2 = new FullDirPath(inputDir);
|
|
302
|
+
}
|
|
303
|
+
tmp_1 = tmp_2;
|
|
304
|
+
} else {
|
|
305
|
+
tmp_1 = tmp2_elvis_lhs;
|
|
306
|
+
}
|
|
307
|
+
var tmp3_elvis_lhs = tmp_1;
|
|
308
|
+
tmp = tmp3_elvis_lhs == null ? Console_getInstance() : tmp3_elvis_lhs;
|
|
309
|
+
}
|
|
310
|
+
return tmp;
|
|
335
311
|
};
|
|
312
|
+
var Options_InputDir_instance;
|
|
313
|
+
var Options_InputFile_instance;
|
|
314
|
+
var Options_OutputDir_instance;
|
|
315
|
+
var Options_Language_instance;
|
|
316
|
+
var Options_PackageName_instance;
|
|
317
|
+
var Options_Strict_instance;
|
|
318
|
+
var Options_Debug_instance;
|
|
319
|
+
var Options_entriesInitialized;
|
|
320
|
+
function Options_initEntries() {
|
|
321
|
+
if (Options_entriesInitialized)
|
|
322
|
+
return Unit_getInstance();
|
|
323
|
+
Options_entriesInitialized = true;
|
|
324
|
+
Options_InputDir_instance = new Options('InputDir', 0, ['-d', '--input-dir']);
|
|
325
|
+
Options_InputFile_instance = new Options('InputFile', 1, ['-f', '--input-file']);
|
|
326
|
+
Options_OutputDir_instance = new Options('OutputDir', 2, ['-o', '--output-dir']);
|
|
327
|
+
Options_Language_instance = new Options('Language', 3, ['-l', '--language']);
|
|
328
|
+
Options_PackageName_instance = new Options('PackageName', 4, ['-p', '--package']);
|
|
329
|
+
Options_Strict_instance = new Options('Strict', 5, ['--strict']);
|
|
330
|
+
Options_Debug_instance = new Options('Debug', 6, ['--debug']);
|
|
331
|
+
}
|
|
332
|
+
function Options(name, ordinal, flags) {
|
|
333
|
+
Enum.call(this, name, ordinal);
|
|
334
|
+
this.v3t_1 = flags;
|
|
335
|
+
}
|
|
336
336
|
function Options_InputDir_getInstance() {
|
|
337
337
|
Options_initEntries();
|
|
338
338
|
return Options_InputDir_instance;
|
|
@@ -361,6 +361,36 @@
|
|
|
361
361
|
Options_initEntries();
|
|
362
362
|
return Options_Debug_instance;
|
|
363
363
|
}
|
|
364
|
+
function languages$factory() {
|
|
365
|
+
return getPropertyCallableRef('languages', 1, KProperty1, function (receiver) {
|
|
366
|
+
return _get_languages__ojonze(receiver);
|
|
367
|
+
}, null);
|
|
368
|
+
}
|
|
369
|
+
function languages$factory_0() {
|
|
370
|
+
return getPropertyCallableRef('languages', 1, KProperty1, function (receiver) {
|
|
371
|
+
return _get_languages__ojonze(receiver);
|
|
372
|
+
}, null);
|
|
373
|
+
}
|
|
374
|
+
function format$factory() {
|
|
375
|
+
return getPropertyCallableRef('format', 1, KProperty1, function (receiver) {
|
|
376
|
+
return _get_format__qlarck(receiver);
|
|
377
|
+
}, null);
|
|
378
|
+
}
|
|
379
|
+
function languages$factory_1() {
|
|
380
|
+
return getPropertyCallableRef('languages', 1, KProperty1, function (receiver) {
|
|
381
|
+
return _get_languages__ojonze_0(receiver);
|
|
382
|
+
}, null);
|
|
383
|
+
}
|
|
384
|
+
function format$factory_0() {
|
|
385
|
+
return getPropertyCallableRef('format', 1, KProperty1, function (receiver) {
|
|
386
|
+
return _get_format__qlarck(receiver);
|
|
387
|
+
}, null);
|
|
388
|
+
}
|
|
389
|
+
function languages$factory_2() {
|
|
390
|
+
return getPropertyCallableRef('languages', 1, KProperty1, function (receiver) {
|
|
391
|
+
return _get_languages__ojonze_0(receiver);
|
|
392
|
+
}, null);
|
|
393
|
+
}
|
|
364
394
|
function inputFile$factory() {
|
|
365
395
|
return getPropertyCallableRef('inputFile', 1, KProperty1, function (receiver) {
|
|
366
396
|
return _get_inputFile__x1bqj(receiver);
|
|
@@ -368,27 +398,27 @@
|
|
|
368
398
|
}
|
|
369
399
|
function inputDir$factory() {
|
|
370
400
|
return getPropertyCallableRef('inputDir', 1, KProperty1, function (receiver) {
|
|
371
|
-
return receiver.
|
|
401
|
+
return receiver.t3u();
|
|
372
402
|
}, null);
|
|
373
403
|
}
|
|
374
404
|
function outputDir$factory() {
|
|
375
405
|
return getPropertyCallableRef('outputDir', 1, KProperty1, function (receiver) {
|
|
376
|
-
return receiver.
|
|
406
|
+
return receiver.v3u();
|
|
377
407
|
}, null);
|
|
378
408
|
}
|
|
379
409
|
function packageName$factory() {
|
|
380
410
|
return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) {
|
|
381
|
-
return receiver.
|
|
411
|
+
return receiver.w3u();
|
|
382
412
|
}, null);
|
|
383
413
|
}
|
|
384
414
|
function strict$factory() {
|
|
385
415
|
return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) {
|
|
386
|
-
return receiver.
|
|
416
|
+
return receiver.x3u();
|
|
387
417
|
}, null);
|
|
388
418
|
}
|
|
389
419
|
function debug$factory() {
|
|
390
420
|
return getPropertyCallableRef('debug', 1, KProperty1, function (receiver) {
|
|
391
|
-
return receiver.
|
|
421
|
+
return receiver.y3u();
|
|
392
422
|
}, null);
|
|
393
423
|
}
|
|
394
424
|
function inputFile$factory_0() {
|
|
@@ -398,57 +428,27 @@
|
|
|
398
428
|
}
|
|
399
429
|
function inputDir$factory_0() {
|
|
400
430
|
return getPropertyCallableRef('inputDir', 1, KProperty1, function (receiver) {
|
|
401
|
-
return receiver.
|
|
431
|
+
return receiver.t3u();
|
|
402
432
|
}, null);
|
|
403
433
|
}
|
|
404
434
|
function outputDir$factory_0() {
|
|
405
435
|
return getPropertyCallableRef('outputDir', 1, KProperty1, function (receiver) {
|
|
406
|
-
return receiver.
|
|
436
|
+
return receiver.v3u();
|
|
407
437
|
}, null);
|
|
408
438
|
}
|
|
409
439
|
function packageName$factory_0() {
|
|
410
440
|
return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) {
|
|
411
|
-
return receiver.
|
|
441
|
+
return receiver.w3u();
|
|
412
442
|
}, null);
|
|
413
443
|
}
|
|
414
444
|
function strict$factory_0() {
|
|
415
445
|
return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) {
|
|
416
|
-
return receiver.
|
|
446
|
+
return receiver.x3u();
|
|
417
447
|
}, null);
|
|
418
448
|
}
|
|
419
449
|
function debug$factory_0() {
|
|
420
450
|
return getPropertyCallableRef('debug', 1, KProperty1, function (receiver) {
|
|
421
|
-
return receiver.
|
|
422
|
-
}, null);
|
|
423
|
-
}
|
|
424
|
-
function languages$factory() {
|
|
425
|
-
return getPropertyCallableRef('languages', 1, KProperty1, function (receiver) {
|
|
426
|
-
return _get_languages__ojonze(receiver);
|
|
427
|
-
}, null);
|
|
428
|
-
}
|
|
429
|
-
function languages$factory_0() {
|
|
430
|
-
return getPropertyCallableRef('languages', 1, KProperty1, function (receiver) {
|
|
431
|
-
return _get_languages__ojonze(receiver);
|
|
432
|
-
}, null);
|
|
433
|
-
}
|
|
434
|
-
function format$factory() {
|
|
435
|
-
return getPropertyCallableRef('format', 1, KProperty1, function (receiver) {
|
|
436
|
-
return _get_format__qlarck(receiver);
|
|
437
|
-
}, null);
|
|
438
|
-
}
|
|
439
|
-
function languages$factory_1() {
|
|
440
|
-
return getPropertyCallableRef('languages', 1, KProperty1, function (receiver) {
|
|
441
|
-
return _get_languages__ojonze_0(receiver);
|
|
442
|
-
}, null);
|
|
443
|
-
}
|
|
444
|
-
function format$factory_0() {
|
|
445
|
-
return getPropertyCallableRef('format', 1, KProperty1, function (receiver) {
|
|
446
|
-
return _get_format__qlarck(receiver);
|
|
447
|
-
}, null);
|
|
448
|
-
}
|
|
449
|
-
function languages$factory_2() {
|
|
450
|
-
return getPropertyCallableRef('languages', 1, KProperty1, function (receiver) {
|
|
451
|
-
return _get_languages__ojonze_0(receiver);
|
|
451
|
+
return receiver.y3u();
|
|
452
452
|
}, null);
|
|
453
453
|
}
|
|
454
454
|
function main(args) {
|
|
@@ -480,10 +480,7 @@
|
|
|
480
480
|
var tmp = Companion_getInstance_5();
|
|
481
481
|
var tmp_0 = compile$ref();
|
|
482
482
|
// Inline function 'kotlin.contracts.contract' call
|
|
483
|
-
tmp.
|
|
484
|
-
}
|
|
485
|
-
function convert(arguments_0) {
|
|
486
|
-
return compile_0(arguments_0);
|
|
483
|
+
tmp.t3s(tmp_0, convert$ref())(tmp2_let);
|
|
487
484
|
}
|
|
488
485
|
function compile_0(arguments_0) {
|
|
489
486
|
var input = arguments_0.t21_1;
|
|
@@ -570,11 +567,11 @@
|
|
|
570
567
|
} else {
|
|
571
568
|
if (input instanceof FullDirPath) {
|
|
572
569
|
// Inline function 'kotlin.collections.forEach' call
|
|
573
|
-
var tmp0_iterator_1 = (new Directory(input.j22_1)).
|
|
570
|
+
var tmp0_iterator_1 = (new Directory(input.j22_1)).b3w().c();
|
|
574
571
|
while (tmp0_iterator_1.d()) {
|
|
575
572
|
var element = tmp0_iterator_1.e();
|
|
576
573
|
// Inline function 'community.flock.wirespec.plugin.cli.compile.<anonymous>' call
|
|
577
|
-
wirespec(element, languages, packageName, out(element.
|
|
574
|
+
wirespec(element, languages, packageName, out(element.z3v_1, packageName, output), logger);
|
|
578
575
|
}
|
|
579
576
|
} else {
|
|
580
577
|
if (input instanceof FullFilePath)
|
|
@@ -582,7 +579,7 @@
|
|
|
582
579
|
// Inline function 'kotlin.let' call
|
|
583
580
|
var tmp3_let = new WirespecFile(input);
|
|
584
581
|
// Inline function 'kotlin.contracts.contract' call
|
|
585
|
-
wirespec(tmp3_let, languages, packageName, out(tmp3_let.
|
|
582
|
+
wirespec(tmp3_let, languages, packageName, out(tmp3_let.z3v_1, packageName, output), logger);
|
|
586
583
|
} else {
|
|
587
584
|
// Inline function 'kotlin.error' call
|
|
588
585
|
var tmp4_error = 'Path ' + input + ' is not a Wirespec file';
|
|
@@ -593,74 +590,31 @@
|
|
|
593
590
|
}
|
|
594
591
|
}
|
|
595
592
|
}
|
|
596
|
-
function
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
// Inline function 'community.flock.wirespec.plugin.cli.wirespec.<anonymous>' call
|
|
606
|
-
// Inline function 'kotlin.collections.map' call
|
|
607
|
-
var tmp0_map = emitters(languages, packageName, path, logger);
|
|
608
|
-
// Inline function 'kotlin.collections.mapTo' call
|
|
609
|
-
var tmp0_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp0_map, 10));
|
|
610
|
-
var tmp0_iterator = tmp0_map.c();
|
|
593
|
+
function convert(arguments_0) {
|
|
594
|
+
return compile_0(arguments_0);
|
|
595
|
+
}
|
|
596
|
+
function out(_this__u8e3s4, packageName, output) {
|
|
597
|
+
return out$lambda(output, _this__u8e3s4, packageName);
|
|
598
|
+
}
|
|
599
|
+
function write(output, file) {
|
|
600
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
601
|
+
var tmp0_iterator = output.c();
|
|
611
602
|
while (tmp0_iterator.d()) {
|
|
612
|
-
var
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
var
|
|
616
|
-
var
|
|
617
|
-
var results = tmp2_let(emitter);
|
|
603
|
+
var element = tmp0_iterator.e();
|
|
604
|
+
// Inline function 'community.flock.wirespec.plugin.cli.write.<anonymous>' call
|
|
605
|
+
var name = element.e3();
|
|
606
|
+
var result = element.f3();
|
|
607
|
+
var tmp1_safe_receiver = file == null ? null : file.n24(name);
|
|
618
608
|
var tmp;
|
|
619
|
-
if (
|
|
620
|
-
|
|
621
|
-
// Inline function 'arrow.core.Either.map' call
|
|
622
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
623
|
-
// Inline function 'arrow.core.flatMap' call
|
|
624
|
-
// Inline function 'kotlin.contracts.contract' call
|
|
625
|
-
var tmp_0;
|
|
626
|
-
if (results instanceof Right) {
|
|
627
|
-
// Inline function 'arrow.core.Either.map.<anonymous>' call
|
|
628
|
-
var tmp0_anonymous = results.x1p_1;
|
|
629
|
-
var tmp$ret$2;
|
|
630
|
-
// Inline function 'community.flock.wirespec.plugin.cli.wirespec.<anonymous>.<anonymous>.<anonymous>' call
|
|
631
|
-
tmp$ret$2 = listOf(new Emitted(Companion_getInstance_3().z1r(path(FileExtension_Wirespec_getInstance()).f22_1), first(tmp0_anonymous).p1s_1));
|
|
632
|
-
tmp_0 = new Right(tmp$ret$2);
|
|
633
|
-
} else {
|
|
634
|
-
if (results instanceof Left) {
|
|
635
|
-
tmp_0 = results;
|
|
636
|
-
} else {
|
|
637
|
-
noWhenBranchMatchedException();
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
tmp$ret$5 = tmp_0;
|
|
641
|
-
tmp = to(tmp$ret$5, file);
|
|
609
|
+
if (tmp1_safe_receiver == null) {
|
|
610
|
+
tmp = null;
|
|
642
611
|
} else {
|
|
643
|
-
|
|
612
|
+
tmp1_safe_receiver.c3w(result);
|
|
613
|
+
tmp = Unit_getInstance();
|
|
644
614
|
}
|
|
645
|
-
tmp
|
|
646
|
-
|
|
647
|
-
}
|
|
648
|
-
// Inline function 'kotlin.collections.mapTo' call
|
|
649
|
-
var tmp0_mapTo_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp0_mapTo, 10));
|
|
650
|
-
var tmp0_iterator_0 = tmp0_mapTo.c();
|
|
651
|
-
while (tmp0_iterator_0.d()) {
|
|
652
|
-
var item_0 = tmp0_iterator_0.e();
|
|
653
|
-
// Inline function 'community.flock.wirespec.plugin.cli.wirespec.<anonymous>' call
|
|
654
|
-
var results_0 = item_0.e3();
|
|
655
|
-
var file_0 = item_0.f3();
|
|
656
|
-
if (results_0 instanceof Right) {
|
|
657
|
-
write(results_0.x1p_1, file_0);
|
|
658
|
-
} else {
|
|
659
|
-
if (results_0 instanceof Left) {
|
|
660
|
-
println(results_0.r1p_1);
|
|
661
|
-
}
|
|
615
|
+
if (tmp == null) {
|
|
616
|
+
print(result);
|
|
662
617
|
}
|
|
663
|
-
tmp0_mapTo_0.a(Unit_getInstance());
|
|
664
618
|
}
|
|
665
619
|
}
|
|
666
620
|
function emitters(_this__u8e3s4, packageName, path, logger) {
|
|
@@ -741,30 +695,76 @@
|
|
|
741
695
|
}
|
|
742
696
|
return tmp0_mapTo;
|
|
743
697
|
}
|
|
744
|
-
function
|
|
745
|
-
// Inline function 'kotlin.collections.
|
|
746
|
-
|
|
698
|
+
function wirespec(_this__u8e3s4, languages, packageName, path, logger) {
|
|
699
|
+
// Inline function 'kotlin.collections.map' call
|
|
700
|
+
// Inline function 'kotlin.let' call
|
|
701
|
+
// Inline function 'kotlin.let' call
|
|
702
|
+
var tmp0_let = _this__u8e3s4.q11();
|
|
703
|
+
var tmp1_let_this = Wirespec_getInstance();
|
|
704
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
705
|
+
var tmp2_let = compile(tmp1_let_this, tmp0_let)(logger);
|
|
706
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
707
|
+
// Inline function 'community.flock.wirespec.plugin.cli.wirespec.<anonymous>' call
|
|
708
|
+
// Inline function 'kotlin.collections.map' call
|
|
709
|
+
var tmp0_map = emitters(languages, packageName, path, logger);
|
|
710
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
711
|
+
var tmp0_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp0_map, 10));
|
|
712
|
+
var tmp0_iterator = tmp0_map.c();
|
|
747
713
|
while (tmp0_iterator.d()) {
|
|
748
|
-
var
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
var
|
|
752
|
-
var
|
|
714
|
+
var item = tmp0_iterator.e();
|
|
715
|
+
var tmp$ret$6;
|
|
716
|
+
// Inline function 'community.flock.wirespec.plugin.cli.wirespec.<anonymous>.<anonymous>' call
|
|
717
|
+
var emitter = item.e3();
|
|
718
|
+
var file = item.f3();
|
|
719
|
+
var results = tmp2_let(emitter);
|
|
753
720
|
var tmp;
|
|
754
|
-
if (
|
|
755
|
-
tmp
|
|
721
|
+
if (!emitter.i1w()) {
|
|
722
|
+
var tmp$ret$5;
|
|
723
|
+
// Inline function 'arrow.core.Either.map' call
|
|
724
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
725
|
+
// Inline function 'arrow.core.flatMap' call
|
|
726
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
727
|
+
var tmp_0;
|
|
728
|
+
if (results instanceof Right) {
|
|
729
|
+
// Inline function 'arrow.core.Either.map.<anonymous>' call
|
|
730
|
+
var tmp0_anonymous = results.x1p_1;
|
|
731
|
+
var tmp$ret$2;
|
|
732
|
+
// Inline function 'community.flock.wirespec.plugin.cli.wirespec.<anonymous>.<anonymous>.<anonymous>' call
|
|
733
|
+
tmp$ret$2 = listOf(new Emitted(Companion_getInstance_3().z1r(path(FileExtension_Wirespec_getInstance()).f22_1), first(tmp0_anonymous).p1s_1));
|
|
734
|
+
tmp_0 = new Right(tmp$ret$2);
|
|
735
|
+
} else {
|
|
736
|
+
if (results instanceof Left) {
|
|
737
|
+
tmp_0 = results;
|
|
738
|
+
} else {
|
|
739
|
+
noWhenBranchMatchedException();
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
tmp$ret$5 = tmp_0;
|
|
743
|
+
tmp = to(tmp$ret$5, file);
|
|
756
744
|
} else {
|
|
757
|
-
|
|
758
|
-
tmp = Unit_getInstance();
|
|
745
|
+
tmp = to(results, file);
|
|
759
746
|
}
|
|
760
|
-
|
|
761
|
-
|
|
747
|
+
tmp$ret$6 = tmp;
|
|
748
|
+
tmp0_mapTo.a(tmp$ret$6);
|
|
749
|
+
}
|
|
750
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
751
|
+
var tmp0_mapTo_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp0_mapTo, 10));
|
|
752
|
+
var tmp0_iterator_0 = tmp0_mapTo.c();
|
|
753
|
+
while (tmp0_iterator_0.d()) {
|
|
754
|
+
var item_0 = tmp0_iterator_0.e();
|
|
755
|
+
// Inline function 'community.flock.wirespec.plugin.cli.wirespec.<anonymous>' call
|
|
756
|
+
var results_0 = item_0.e3();
|
|
757
|
+
var file_0 = item_0.f3();
|
|
758
|
+
if (results_0 instanceof Right) {
|
|
759
|
+
write(results_0.x1p_1, file_0);
|
|
760
|
+
} else {
|
|
761
|
+
if (results_0 instanceof Left) {
|
|
762
|
+
println(results_0.r1p_1);
|
|
763
|
+
}
|
|
762
764
|
}
|
|
765
|
+
tmp0_mapTo_0.a(Unit_getInstance());
|
|
763
766
|
}
|
|
764
767
|
}
|
|
765
|
-
function out(_this__u8e3s4, packageName, output) {
|
|
766
|
-
return out$lambda(output, _this__u8e3s4, packageName);
|
|
767
|
-
}
|
|
768
768
|
function compile$ref() {
|
|
769
769
|
var l = function (p0) {
|
|
770
770
|
compile_0(p0);
|
|
@@ -809,38 +809,38 @@
|
|
|
809
809
|
function JavaFile(path) {
|
|
810
810
|
File.call(this, path.i22(VOID, VOID, FileExtension_Java_getInstance()));
|
|
811
811
|
}
|
|
812
|
-
protoOf(JavaFile).
|
|
813
|
-
return new JavaFile(this.
|
|
812
|
+
protoOf(JavaFile).n24 = function (fileName) {
|
|
813
|
+
return new JavaFile(this.z3v_1.i22(VOID, fileName));
|
|
814
814
|
};
|
|
815
815
|
function JsonFile(path) {
|
|
816
816
|
File.call(this, path.i22(VOID, VOID, FileExtension_Json_getInstance()));
|
|
817
817
|
}
|
|
818
|
-
protoOf(JsonFile).
|
|
819
|
-
return new JsonFile(this.
|
|
818
|
+
protoOf(JsonFile).n24 = function (fileName) {
|
|
819
|
+
return new JsonFile(this.z3v_1.i22(VOID, fileName));
|
|
820
820
|
};
|
|
821
821
|
function KotlinFile(path) {
|
|
822
822
|
File.call(this, path.i22(VOID, VOID, FileExtension_Kotlin_getInstance()));
|
|
823
823
|
}
|
|
824
|
-
protoOf(KotlinFile).
|
|
825
|
-
return new KotlinFile(this.
|
|
824
|
+
protoOf(KotlinFile).n24 = function (fileName) {
|
|
825
|
+
return new KotlinFile(this.z3v_1.i22(VOID, fileName));
|
|
826
826
|
};
|
|
827
827
|
function ScalaFile(path) {
|
|
828
828
|
File.call(this, path.i22(VOID, VOID, FileExtension_Scala_getInstance()));
|
|
829
829
|
}
|
|
830
|
-
protoOf(ScalaFile).
|
|
831
|
-
return new ScalaFile(this.
|
|
830
|
+
protoOf(ScalaFile).n24 = function (fileName) {
|
|
831
|
+
return new ScalaFile(this.z3v_1.i22(VOID, fileName));
|
|
832
832
|
};
|
|
833
833
|
function TypeScriptFile(path) {
|
|
834
834
|
File.call(this, path.i22(VOID, VOID, FileExtension_TypeScript_getInstance()));
|
|
835
835
|
}
|
|
836
|
-
protoOf(TypeScriptFile).
|
|
837
|
-
return new TypeScriptFile(this.
|
|
836
|
+
protoOf(TypeScriptFile).n24 = function (fileName) {
|
|
837
|
+
return new TypeScriptFile(this.z3v_1.i22(VOID, fileName));
|
|
838
838
|
};
|
|
839
839
|
function WirespecFile(path) {
|
|
840
840
|
File.call(this, path.i22(VOID, VOID, FileExtension_Wirespec_getInstance()));
|
|
841
841
|
}
|
|
842
|
-
protoOf(WirespecFile).
|
|
843
|
-
return new WirespecFile(this.
|
|
842
|
+
protoOf(WirespecFile).n24 = function (fileName) {
|
|
843
|
+
return new WirespecFile(this.z3v_1.i22(VOID, fileName));
|
|
844
844
|
};
|
|
845
845
|
function cli(args) {
|
|
846
846
|
main(args);
|
|
@@ -910,7 +910,7 @@
|
|
|
910
910
|
}
|
|
911
911
|
function Directory$wirespecFiles$lambda_2(this$0) {
|
|
912
912
|
return function (it) {
|
|
913
|
-
return new FullFilePath(this$0.
|
|
913
|
+
return new FullFilePath(this$0.a3w_1, it);
|
|
914
914
|
};
|
|
915
915
|
}
|
|
916
916
|
function WirespecFile$_init_$ref_cj1n5j() {
|
|
@@ -921,10 +921,10 @@
|
|
|
921
921
|
return l;
|
|
922
922
|
}
|
|
923
923
|
function Directory(path) {
|
|
924
|
-
this.
|
|
924
|
+
this.a3w_1 = path;
|
|
925
925
|
}
|
|
926
|
-
protoOf(Directory).
|
|
927
|
-
var tmp = asSequence(iterator(get_fs().readdirSync(this.
|
|
926
|
+
protoOf(Directory).b3w = function () {
|
|
927
|
+
var tmp = asSequence(iterator(get_fs().readdirSync(this.a3w_1, 'utf-8')));
|
|
928
928
|
var tmp_0 = map(tmp, Directory$wirespecFiles$lambda);
|
|
929
929
|
var tmp_1 = filter(tmp_0, Directory$wirespecFiles$lambda_0);
|
|
930
930
|
var tmp_2 = map(tmp_1, Directory$wirespecFiles$lambda_1);
|
|
@@ -932,15 +932,15 @@
|
|
|
932
932
|
return toSet_0(map(tmp_3, WirespecFile$_init_$ref_cj1n5j()));
|
|
933
933
|
};
|
|
934
934
|
function File(path) {
|
|
935
|
-
this.
|
|
935
|
+
this.z3v_1 = path;
|
|
936
936
|
}
|
|
937
937
|
protoOf(File).q11 = function () {
|
|
938
938
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
939
|
-
return get_fs().readFileSync(this.
|
|
939
|
+
return get_fs().readFileSync(this.z3v_1.toString(), 'utf-8');
|
|
940
940
|
};
|
|
941
|
-
protoOf(File).
|
|
941
|
+
protoOf(File).c3w = function (text) {
|
|
942
942
|
// Inline function 'kotlin.run' call
|
|
943
|
-
var tmp0_run = this.
|
|
943
|
+
var tmp0_run = this.z3v_1.i22(joinToString(split_0(this.z3v_1.e22_1, ['out']), 'out/node'));
|
|
944
944
|
// Inline function 'kotlin.contracts.contract' call
|
|
945
945
|
// Inline function 'community.flock.wirespec.plugin.cli.io.File.write.<anonymous>' call
|
|
946
946
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
@@ -1018,9 +1018,10 @@
|
|
|
1018
1018
|
$community$flock$wirespec$plugin$cli.parser = parser;
|
|
1019
1019
|
}
|
|
1020
1020
|
$jsExportAll$(_);
|
|
1021
|
-
|
|
1021
|
+
_.$jsExportAll$ = $jsExportAll$;
|
|
1022
|
+
_.$_$ = _.$_$ || {};
|
|
1023
|
+
_.$_$.a = main;
|
|
1022
1024
|
//endregion
|
|
1023
|
-
main([]);
|
|
1024
1025
|
return _;
|
|
1025
1026
|
}));
|
|
1026
1027
|
|