@flock/wirespec 0.8.56 → 0.9.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 +21 -21
- package/arrow-arrow-atomic.js.map +1 -1
- package/arrow-arrow-continuations.js +8 -8
- package/arrow-arrow-core.js +100 -100
- package/arrow-arrow-core.js.map +1 -1
- package/clikt-clikt.js +1985 -1985
- package/clikt-clikt.js.map +1 -1
- package/colormath-root-colormath.js +421 -421
- package/colormath-root-colormath.js.map +1 -1
- package/{kotlin-kotlin-stdlib-js-ir.js → kotlin-kotlin-stdlib.js} +11346 -10686
- package/kotlin-kotlin-stdlib.js.map +1 -0
- package/kotlin-openapi-bindings.js +3637 -3637
- package/kotlin-openapi-bindings.js.map +1 -1
- package/kotlin-rgxgen.js +4328 -0
- package/kotlin-rgxgen.js.map +1 -0
- package/kotlinx-serialization-kotlinx-serialization-core-js-ir.js +1640 -1640
- package/kotlinx-serialization-kotlinx-serialization-core-js-ir.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json-js-ir.js +1328 -1320
- package/kotlinx-serialization-kotlinx-serialization-json-js-ir.js.map +1 -1
- package/markdown.js +2128 -2131
- package/markdown.js.map +1 -1
- package/mordant-mordant.js +2279 -2287
- package/mordant-mordant.js.map +1 -1
- package/package.json +1 -1
- package/wirespec-src-compiler-core.js +2091 -2015
- package/wirespec-src-compiler-core.js.map +1 -1
- package/wirespec-src-compiler-lib.js +480 -431
- package/wirespec-src-compiler-lib.js.map +1 -1
- package/wirespec-src-converter-openapi.js +855 -855
- package/wirespec-src-converter-openapi.js.map +1 -1
- package/wirespec-src-generator.js +311 -0
- package/wirespec-src-generator.js.map +1 -0
- package/wirespec-src-plugin-arguments.js +123 -119
- package/wirespec-src-plugin-arguments.js.map +1 -1
- package/wirespec-src-plugin-cli.js +252 -232
- package/wirespec-src-plugin-cli.js.map +1 -1
- package/wirespec-src-plugin-npm.d.ts +6 -0
- package/wirespec-src-plugin-npm.js +52 -7
- package/wirespec-src-plugin-npm.js.map +1 -1
- package/kotlin-kotlin-stdlib-js-ir.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
(function (root, factory) {
|
|
2
2
|
if (typeof define === 'function' && define.amd)
|
|
3
|
-
define(['exports', './kotlin-kotlin-stdlib
|
|
3
|
+
define(['exports', './kotlin-kotlin-stdlib.js', './clikt-clikt.js', './wirespec-src-plugin-arguments.js', './wirespec-src-compiler-core.js', './wirespec-src-converter-openapi.js', './arrow-arrow-core.js', './wirespec-src-compiler-lib.js'], factory);
|
|
4
4
|
else if (typeof exports === 'object')
|
|
5
|
-
factory(module.exports, require('./kotlin-kotlin-stdlib
|
|
5
|
+
factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./clikt-clikt.js'), require('./wirespec-src-plugin-arguments.js'), require('./wirespec-src-compiler-core.js'), require('./wirespec-src-converter-openapi.js'), require('./arrow-arrow-core.js'), require('./wirespec-src-compiler-lib.js'));
|
|
6
6
|
else {
|
|
7
|
-
if (typeof this['kotlin-kotlin-stdlib
|
|
8
|
-
throw new Error("Error loading module 'wirespec-src-plugin-cli'. Its dependency 'kotlin-kotlin-stdlib
|
|
7
|
+
if (typeof this['kotlin-kotlin-stdlib'] === 'undefined') {
|
|
8
|
+
throw new Error("Error loading module 'wirespec-src-plugin-cli'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'wirespec-src-plugin-cli'.");
|
|
9
9
|
}
|
|
10
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'.");
|
|
@@ -25,38 +25,38 @@
|
|
|
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
|
|
28
|
+
root['wirespec-src-plugin-cli'] = factory(typeof this['wirespec-src-plugin-cli'] === 'undefined' ? {} : this['wirespec-src-plugin-cli'], this['kotlin-kotlin-stdlib'], this['clikt-clikt'], this['wirespec-src-plugin-arguments'], this['wirespec-src-compiler-core'], this['wirespec-src-converter-openapi'], this['arrow-arrow-core'], this['wirespec-src-compiler-lib']);
|
|
29
29
|
}
|
|
30
30
|
}(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
|
-
var Unit_getInstance = kotlin_kotlin.$_$.
|
|
33
|
+
var Unit_getInstance = kotlin_kotlin.$_$.x3;
|
|
34
34
|
var subcommands = kotlin_clikt_clikt.$_$.c;
|
|
35
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
36
|
-
var objectMeta = kotlin_kotlin.$_$.
|
|
37
|
-
var VOID = kotlin_kotlin.$_$.
|
|
38
|
-
var setMetadataFor = kotlin_kotlin.$_$.
|
|
35
|
+
var protoOf = kotlin_kotlin.$_$.ca;
|
|
36
|
+
var objectMeta = kotlin_kotlin.$_$.ba;
|
|
37
|
+
var VOID = kotlin_kotlin.$_$.gf;
|
|
38
|
+
var setMetadataFor = kotlin_kotlin.$_$.da;
|
|
39
39
|
var NoOpCliktCommand = kotlin_clikt_clikt.$_$.b;
|
|
40
|
-
var classMeta = kotlin_kotlin.$_$.
|
|
40
|
+
var classMeta = kotlin_kotlin.$_$.x8;
|
|
41
41
|
var option = kotlin_clikt_clikt.$_$.h;
|
|
42
42
|
var Companion_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.x;
|
|
43
43
|
var choice = kotlin_clikt_clikt.$_$.j;
|
|
44
44
|
var multiple = kotlin_clikt_clikt.$_$.g;
|
|
45
45
|
var Compile_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.y;
|
|
46
46
|
var Companion_getInstance_0 = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.z;
|
|
47
|
-
var toSet = kotlin_kotlin.$_$.
|
|
47
|
+
var toSet = kotlin_kotlin.$_$.a8;
|
|
48
48
|
var _PackageName___init__impl__s13tbs = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.t;
|
|
49
49
|
var CompilerArguments = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.a;
|
|
50
50
|
var argument = kotlin_clikt_clikt.$_$.d;
|
|
51
51
|
var values = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.c;
|
|
52
|
-
var mapCapacity = kotlin_kotlin.$_$.
|
|
53
|
-
var coerceAtLeast = kotlin_kotlin.$_$.
|
|
54
|
-
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.
|
|
52
|
+
var mapCapacity = kotlin_kotlin.$_$.u6;
|
|
53
|
+
var coerceAtLeast = kotlin_kotlin.$_$.na;
|
|
54
|
+
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.s;
|
|
55
55
|
var choice_0 = kotlin_clikt_clikt.$_$.i;
|
|
56
56
|
var Language_Wirespec_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.p;
|
|
57
|
-
var listOf = kotlin_kotlin.$_$.
|
|
57
|
+
var listOf = kotlin_kotlin.$_$.s6;
|
|
58
58
|
var Convert = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.g;
|
|
59
|
-
var setOf = kotlin_kotlin.$_$.
|
|
59
|
+
var setOf = kotlin_kotlin.$_$.f7;
|
|
60
60
|
var CliktCommand = kotlin_clikt_clikt.$_$.a;
|
|
61
61
|
var get_DEFAULT_PACKAGE_STRING = kotlin_community_flock_wirespec_compiler_core.$_$.a;
|
|
62
62
|
var default_0 = kotlin_clikt_clikt.$_$.e;
|
|
@@ -64,36 +64,36 @@
|
|
|
64
64
|
var Companion_getInstance_1 = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.w;
|
|
65
65
|
var FullDirPath = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.d;
|
|
66
66
|
var Console_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.v;
|
|
67
|
-
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.
|
|
68
|
-
var Enum = kotlin_kotlin.$_$.
|
|
69
|
-
var KProperty1 = kotlin_kotlin.$_$.
|
|
70
|
-
var getPropertyCallableRef = kotlin_kotlin.$_$.
|
|
71
|
-
var numberRangeToNumber = kotlin_kotlin.$_$.
|
|
72
|
-
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.
|
|
73
|
-
var copyToArray = kotlin_kotlin.$_$.
|
|
74
|
-
var Logger = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
75
|
-
var toString = kotlin_kotlin.$_$.
|
|
67
|
+
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.l1;
|
|
68
|
+
var Enum = kotlin_kotlin.$_$.xd;
|
|
69
|
+
var KProperty1 = kotlin_kotlin.$_$.wa;
|
|
70
|
+
var getPropertyCallableRef = kotlin_kotlin.$_$.d9;
|
|
71
|
+
var numberRangeToNumber = kotlin_kotlin.$_$.w9;
|
|
72
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.k;
|
|
73
|
+
var copyToArray = kotlin_kotlin.$_$.k5;
|
|
74
|
+
var Logger = kotlin_community_flock_wirespec_compiler_core.$_$.e1;
|
|
75
|
+
var toString = kotlin_kotlin.$_$.ha;
|
|
76
76
|
var FileExtension_Wirespec_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.o;
|
|
77
77
|
var FullFilePath = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.e;
|
|
78
78
|
var Console = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.b;
|
|
79
79
|
var Compile = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.f;
|
|
80
|
-
var THROW_CCE = kotlin_kotlin.$_$.
|
|
80
|
+
var THROW_CCE = kotlin_kotlin.$_$.he;
|
|
81
81
|
var Companion_getInstance_2 = kotlin_community_flock_wirespec_converter_openapi.$_$.a;
|
|
82
82
|
var Companion_getInstance_3 = kotlin_community_flock_wirespec_converter_openapi.$_$.b;
|
|
83
|
-
var noWhenBranchMatchedException = kotlin_kotlin.$_$.
|
|
84
|
-
var collectionSizeOrDefault = kotlin_kotlin.$_$.
|
|
85
|
-
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.
|
|
86
|
-
var to = kotlin_kotlin.$_$.
|
|
83
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.cf;
|
|
84
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.w4;
|
|
85
|
+
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.j;
|
|
86
|
+
var to = kotlin_kotlin.$_$.ff;
|
|
87
87
|
var _FileName___get_value__impl__3u4cz6 = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.r;
|
|
88
|
-
var charSequenceLength = kotlin_kotlin.$_$.
|
|
89
|
-
var charSequenceGet = kotlin_kotlin.$_$.
|
|
90
|
-
var toString_0 = kotlin_kotlin.$_$.
|
|
91
|
-
var first = kotlin_kotlin.$_$.
|
|
88
|
+
var charSequenceLength = kotlin_kotlin.$_$.v8;
|
|
89
|
+
var charSequenceGet = kotlin_kotlin.$_$.u8;
|
|
90
|
+
var toString_0 = kotlin_kotlin.$_$.x1;
|
|
91
|
+
var first = kotlin_kotlin.$_$.v5;
|
|
92
92
|
var Emitted = kotlin_community_flock_wirespec_compiler_core.$_$.b;
|
|
93
93
|
var _FileName___init__impl__nzn12e = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.q;
|
|
94
|
-
var print = kotlin_kotlin.$_$.
|
|
94
|
+
var print = kotlin_kotlin.$_$.n8;
|
|
95
95
|
var PackageName = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.i;
|
|
96
|
-
var component1 = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
96
|
+
var component1 = kotlin_community_flock_wirespec_compiler_core.$_$.c1;
|
|
97
97
|
var JavaEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.c;
|
|
98
98
|
var FileExtension_Java_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.j;
|
|
99
99
|
var KotlinEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.d;
|
|
@@ -104,40 +104,40 @@
|
|
|
104
104
|
var FileExtension_TypeScript_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.n;
|
|
105
105
|
var WirespecEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.g;
|
|
106
106
|
var WirespecSpec_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.m1;
|
|
107
|
-
var compile = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
107
|
+
var compile = kotlin_community_flock_wirespec_compiler_core.$_$.b1;
|
|
108
108
|
var Left = kotlin_io_arrow_kt_arrow_core.$_$.c;
|
|
109
|
-
var Companion_getInstance_4 = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
109
|
+
var Companion_getInstance_4 = kotlin_community_flock_wirespec_compiler_core.$_$.k1;
|
|
110
110
|
var Right = kotlin_io_arrow_kt_arrow_core.$_$.d;
|
|
111
|
-
var println = kotlin_kotlin.$_$.
|
|
111
|
+
var println = kotlin_kotlin.$_$.l8;
|
|
112
112
|
var Output = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.h;
|
|
113
|
-
var ensureNotNull = kotlin_kotlin.$_$.
|
|
113
|
+
var ensureNotNull = kotlin_kotlin.$_$.we;
|
|
114
114
|
var _Output___get_value__impl__a8kw1g = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.s;
|
|
115
115
|
var _PackageName___get_value__impl__2zr98c = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.u;
|
|
116
|
-
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.
|
|
117
|
-
var charArrayOf = kotlin_kotlin.$_$.
|
|
118
|
-
var split = kotlin_kotlin.$_$.
|
|
119
|
-
var joinToString = kotlin_kotlin.$_$.
|
|
116
|
+
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.t1;
|
|
117
|
+
var charArrayOf = kotlin_kotlin.$_$.s8;
|
|
118
|
+
var split = kotlin_kotlin.$_$.rc;
|
|
119
|
+
var joinToString = kotlin_kotlin.$_$.f6;
|
|
120
120
|
var FileExtension_Json_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.k;
|
|
121
|
-
var parse = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
122
|
-
var get_noLogger = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
121
|
+
var parse = kotlin_community_flock_wirespec_compiler_core.$_$.d1;
|
|
122
|
+
var get_noLogger = kotlin_community_flock_wirespec_compiler_core.$_$.f1;
|
|
123
123
|
var Definition = kotlin_community_flock_wirespec_compiler_core.$_$.h;
|
|
124
|
-
var isInterface = kotlin_kotlin.$_$.
|
|
125
|
-
var produce = kotlin_community_flock_wirespec_compiler_lib.$_$.
|
|
126
|
-
var endsWith = kotlin_kotlin.$_$.
|
|
127
|
-
var dropLast = kotlin_kotlin.$_$.
|
|
128
|
-
var iterator = kotlin_kotlin.$_$.
|
|
129
|
-
var asSequence = kotlin_kotlin.$_$.
|
|
130
|
-
var map = kotlin_kotlin.$_$.
|
|
131
|
-
var filter = kotlin_kotlin.$_$.
|
|
132
|
-
var toSet_0 = kotlin_kotlin.$_$.
|
|
133
|
-
var split_0 = kotlin_kotlin.$_$.
|
|
134
|
-
var Companion_getInstance_5 = kotlin_kotlin.$_$.
|
|
135
|
-
var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.
|
|
136
|
-
var createFailure = kotlin_kotlin.$_$.
|
|
137
|
-
var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.
|
|
138
|
-
var isObject = kotlin_kotlin.$_$.
|
|
139
|
-
var _Result___get_isFailure__impl__jpiriv = kotlin_kotlin.$_$.
|
|
140
|
-
var isArray = kotlin_kotlin.$_$.
|
|
124
|
+
var isInterface = kotlin_kotlin.$_$.p9;
|
|
125
|
+
var produce = kotlin_community_flock_wirespec_compiler_lib.$_$.c;
|
|
126
|
+
var endsWith = kotlin_kotlin.$_$.rb;
|
|
127
|
+
var dropLast = kotlin_kotlin.$_$.ob;
|
|
128
|
+
var iterator = kotlin_kotlin.$_$.t9;
|
|
129
|
+
var asSequence = kotlin_kotlin.$_$.ya;
|
|
130
|
+
var map = kotlin_kotlin.$_$.db;
|
|
131
|
+
var filter = kotlin_kotlin.$_$.za;
|
|
132
|
+
var toSet_0 = kotlin_kotlin.$_$.fb;
|
|
133
|
+
var split_0 = kotlin_kotlin.$_$.sc;
|
|
134
|
+
var Companion_getInstance_5 = kotlin_kotlin.$_$.s3;
|
|
135
|
+
var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.y1;
|
|
136
|
+
var createFailure = kotlin_kotlin.$_$.ve;
|
|
137
|
+
var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.c2;
|
|
138
|
+
var isObject = kotlin_kotlin.$_$.r9;
|
|
139
|
+
var _Result___get_isFailure__impl__jpiriv = kotlin_kotlin.$_$.a2;
|
|
140
|
+
var isArray = kotlin_kotlin.$_$.h9;
|
|
141
141
|
//endregion
|
|
142
142
|
//region block: pre-declaration
|
|
143
143
|
setMetadataFor(Companion, 'Companion', objectMeta);
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
//endregion
|
|
158
158
|
function WirespecCli$main$ref($boundThis) {
|
|
159
159
|
var l = function (p0) {
|
|
160
|
-
$boundThis.
|
|
160
|
+
$boundThis.a3h(p0);
|
|
161
161
|
return Unit_getInstance();
|
|
162
162
|
};
|
|
163
163
|
l.callableName = 'main';
|
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
function Companion() {
|
|
167
167
|
Companion_instance = this;
|
|
168
168
|
}
|
|
169
|
-
protoOf(Companion).
|
|
169
|
+
protoOf(Companion).a3t = function (compile, convert) {
|
|
170
170
|
return WirespecCli$main$ref(subcommands(new WirespecCli(), [new Compile_0(compile), new Convert_0(convert)]));
|
|
171
171
|
};
|
|
172
172
|
var Companion_instance;
|
|
@@ -180,28 +180,28 @@
|
|
|
180
180
|
NoOpCliktCommand.call(this, VOID, VOID, 'wirespec');
|
|
181
181
|
}
|
|
182
182
|
function _get_languages__ojonze($this) {
|
|
183
|
-
return $this.
|
|
183
|
+
return $this.a3u_1.c3q($this, languages$factory_0());
|
|
184
184
|
}
|
|
185
185
|
function Compile_0(block) {
|
|
186
186
|
CommonOptions.call(this);
|
|
187
|
-
this.
|
|
188
|
-
this.
|
|
187
|
+
this.z3t_1 = block;
|
|
188
|
+
this.a3u_1 = multiple(choice(option(this, Options_Language_getInstance().d3u_1.slice(), 'Language'), Companion_getInstance().l22()), VOID, true).e3r(this, languages$factory());
|
|
189
189
|
}
|
|
190
|
-
protoOf(Compile_0).
|
|
190
|
+
protoOf(Compile_0).b3h = function () {
|
|
191
191
|
// Inline function 'kotlin.let' call
|
|
192
|
-
var tmp0_let = new CompilerArguments(Compile_getInstance(), this.
|
|
192
|
+
var tmp0_let = new CompilerArguments(Compile_getInstance(), this.d3v(this.c3v()), Companion_getInstance_0().m22(this.e3v()), toSet(_get_languages__ojonze(this)), _PackageName___init__impl__s13tbs(this.f3v()), this.g3v(), this.h3v(), this.i3v());
|
|
193
193
|
// Inline function 'kotlin.contracts.contract' call
|
|
194
|
-
this.
|
|
194
|
+
this.z3t_1(tmp0_let);
|
|
195
195
|
};
|
|
196
196
|
function _get_format__qlarck($this) {
|
|
197
|
-
return $this.
|
|
197
|
+
return $this.i3w_1.c3q($this, format$factory_0());
|
|
198
198
|
}
|
|
199
199
|
function _get_languages__ojonze_0($this) {
|
|
200
|
-
return $this.
|
|
200
|
+
return $this.j3w_1.c3q($this, languages$factory_2());
|
|
201
201
|
}
|
|
202
202
|
function Convert_0(block) {
|
|
203
203
|
CommonOptions.call(this);
|
|
204
|
-
this.
|
|
204
|
+
this.h3w_1 = block;
|
|
205
205
|
var tmp = this;
|
|
206
206
|
// Inline function 'com.github.ajalt.clikt.parameters.types.enum' call
|
|
207
207
|
var tmp0_enum = argument(this, VOID, 'Input format');
|
|
@@ -219,67 +219,71 @@
|
|
|
219
219
|
var tmp$ret$2;
|
|
220
220
|
// Inline function 'com.github.ajalt.clikt.parameters.types.enum.<anonymous>' call
|
|
221
221
|
// Inline function 'com.github.ajalt.clikt.parameters.types.enum.<anonymous>' call
|
|
222
|
-
tmp$ret$2 = element.
|
|
223
|
-
tmp0_associateByTo.
|
|
222
|
+
tmp$ret$2 = element.b9_1;
|
|
223
|
+
tmp0_associateByTo.l2(tmp$ret$2, element);
|
|
224
224
|
}
|
|
225
|
-
tmp.
|
|
226
|
-
this.
|
|
225
|
+
tmp.i3w_1 = choice_0(tmp0_enum, tmp0_associateByTo, true).i3p(this, format$factory());
|
|
226
|
+
this.j3w_1 = multiple(choice(option(this, Options_Language_getInstance().d3u_1.slice(), 'Language'), Companion_getInstance().l22(), VOID, true), listOf(Language_Wirespec_getInstance())).e3r(this, languages$factory_1());
|
|
227
227
|
}
|
|
228
|
-
protoOf(Convert_0).
|
|
229
|
-
if (this.
|
|
228
|
+
protoOf(Convert_0).b3h = function () {
|
|
229
|
+
if (this.c3v() == null)
|
|
230
230
|
null;
|
|
231
231
|
else {
|
|
232
232
|
// Inline function 'kotlin.let' call
|
|
233
233
|
// Inline function 'kotlin.contracts.contract' call
|
|
234
|
-
this.
|
|
234
|
+
this.u3g('To convert, please specify a file', VOID, true);
|
|
235
235
|
}
|
|
236
236
|
// Inline function 'kotlin.let' call
|
|
237
237
|
var tmp = new Convert(_get_format__qlarck(this));
|
|
238
|
-
var tmp_0 = this.
|
|
239
|
-
var tmp_1 = Companion_getInstance_0().
|
|
238
|
+
var tmp_0 = this.d3v(null);
|
|
239
|
+
var tmp_1 = Companion_getInstance_0().m22(this.e3v());
|
|
240
240
|
var tmp$ret$2;
|
|
241
241
|
// Inline function 'kotlin.collections.ifEmpty' call
|
|
242
242
|
var tmp0_ifEmpty = toSet(_get_languages__ojonze_0(this));
|
|
243
243
|
var tmp_2;
|
|
244
|
-
if (tmp0_ifEmpty.
|
|
244
|
+
if (tmp0_ifEmpty.c1()) {
|
|
245
245
|
// Inline function 'community.flock.wirespec.plugin.cli.Convert.run.<anonymous>' call
|
|
246
246
|
tmp_2 = setOf(Language_Wirespec_getInstance());
|
|
247
247
|
} else {
|
|
248
248
|
tmp_2 = tmp0_ifEmpty;
|
|
249
249
|
}
|
|
250
250
|
tmp$ret$2 = tmp_2;
|
|
251
|
-
var tmp1_let = new CompilerArguments(tmp, tmp_0, tmp_1, tmp$ret$2, _PackageName___init__impl__s13tbs(this.
|
|
251
|
+
var tmp1_let = new CompilerArguments(tmp, tmp_0, tmp_1, tmp$ret$2, _PackageName___init__impl__s13tbs(this.f3v()), this.g3v(), this.h3v(), this.i3v());
|
|
252
252
|
// Inline function 'kotlin.contracts.contract' call
|
|
253
|
-
this.
|
|
253
|
+
this.h3w_1(tmp1_let);
|
|
254
254
|
};
|
|
255
255
|
function _get_inputFile__x1bqj($this) {
|
|
256
|
-
return $this.
|
|
256
|
+
return $this.v3u_1.c3q($this, inputFile$factory_0());
|
|
257
257
|
}
|
|
258
258
|
function CommonOptions() {
|
|
259
259
|
CliktCommand.call(this);
|
|
260
|
-
this.
|
|
261
|
-
this.
|
|
262
|
-
this.
|
|
263
|
-
this.
|
|
264
|
-
this.
|
|
265
|
-
this.
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
260
|
+
this.v3u_1 = option(this, Options_InputFile_getInstance().d3u_1.slice(), 'Input file').e3r(this, inputFile$factory());
|
|
261
|
+
this.w3u_1 = option(this, Options_InputDir_getInstance().d3u_1.slice(), 'Input directory').e3r(this, inputDir$factory());
|
|
262
|
+
this.x3u_1 = option(this, Options_OutputDir_getInstance().d3u_1.slice(), 'Output directory').e3r(this, outputDir$factory());
|
|
263
|
+
this.y3u_1 = default_0(option(this, Options_PackageName_getInstance().d3u_1.slice(), 'Package name'), get_DEFAULT_PACKAGE_STRING()).e3r(this, packageName$factory());
|
|
264
|
+
this.z3u_1 = flag(option(this, Options_Shared_getInstance().d3u_1.slice(), 'Generate shared wirespec code'), [], false).e3r(this, shared$factory());
|
|
265
|
+
this.a3v_1 = flag(option(this, Options_Strict_getInstance().d3u_1.slice(), 'Strict mode'), []).e3r(this, strict$factory());
|
|
266
|
+
this.b3v_1 = flag(option(this, Options_Debug_getInstance().d3u_1.slice(), 'Debug mode'), []).e3r(this, debug$factory());
|
|
267
|
+
}
|
|
268
|
+
protoOf(CommonOptions).c3v = function () {
|
|
269
|
+
return this.w3u_1.c3q(this, inputDir$factory_0());
|
|
269
270
|
};
|
|
270
|
-
protoOf(CommonOptions).
|
|
271
|
-
return this.
|
|
271
|
+
protoOf(CommonOptions).e3v = function () {
|
|
272
|
+
return this.x3u_1.c3q(this, outputDir$factory_0());
|
|
272
273
|
};
|
|
273
|
-
protoOf(CommonOptions).
|
|
274
|
-
return this.
|
|
274
|
+
protoOf(CommonOptions).f3v = function () {
|
|
275
|
+
return this.y3u_1.c3q(this, packageName$factory_0());
|
|
275
276
|
};
|
|
276
|
-
protoOf(CommonOptions).
|
|
277
|
-
return this.
|
|
277
|
+
protoOf(CommonOptions).g3v = function () {
|
|
278
|
+
return this.z3u_1.c3q(this, shared$factory_0());
|
|
278
279
|
};
|
|
279
|
-
protoOf(CommonOptions).
|
|
280
|
-
return this.
|
|
280
|
+
protoOf(CommonOptions).h3v = function () {
|
|
281
|
+
return this.a3v_1.c3q(this, strict$factory_0());
|
|
281
282
|
};
|
|
282
|
-
protoOf(CommonOptions).
|
|
283
|
+
protoOf(CommonOptions).i3v = function () {
|
|
284
|
+
return this.b3v_1.c3q(this, debug$factory_0());
|
|
285
|
+
};
|
|
286
|
+
protoOf(CommonOptions).d3v = function (inputDir) {
|
|
283
287
|
var tmp;
|
|
284
288
|
if (!(inputDir == null) ? !(_get_inputFile__x1bqj(this) == null) : false) {
|
|
285
289
|
throw IllegalStateException_init_$Create$('Choose either a file or a directory. Not Both.');
|
|
@@ -291,7 +295,7 @@
|
|
|
291
295
|
} else {
|
|
292
296
|
// Inline function 'kotlin.let' call
|
|
293
297
|
// Inline function 'kotlin.contracts.contract' call
|
|
294
|
-
tmp_0 = Companion_getInstance_1().
|
|
298
|
+
tmp_0 = Companion_getInstance_1().a22(tmp0_safe_receiver);
|
|
295
299
|
}
|
|
296
300
|
var tmp2_elvis_lhs = tmp_0;
|
|
297
301
|
var tmp_1;
|
|
@@ -318,6 +322,7 @@
|
|
|
318
322
|
var Options_OutputDir_instance;
|
|
319
323
|
var Options_Language_instance;
|
|
320
324
|
var Options_PackageName_instance;
|
|
325
|
+
var Options_Shared_instance;
|
|
321
326
|
var Options_Strict_instance;
|
|
322
327
|
var Options_Debug_instance;
|
|
323
328
|
var Options_entriesInitialized;
|
|
@@ -330,12 +335,13 @@
|
|
|
330
335
|
Options_OutputDir_instance = new Options('OutputDir', 2, ['-o', '--output-dir']);
|
|
331
336
|
Options_Language_instance = new Options('Language', 3, ['-l', '--language']);
|
|
332
337
|
Options_PackageName_instance = new Options('PackageName', 4, ['-p', '--package']);
|
|
333
|
-
|
|
334
|
-
|
|
338
|
+
Options_Shared_instance = new Options('Shared', 5, ['--shared']);
|
|
339
|
+
Options_Strict_instance = new Options('Strict', 6, ['--strict']);
|
|
340
|
+
Options_Debug_instance = new Options('Debug', 7, ['--debug']);
|
|
335
341
|
}
|
|
336
342
|
function Options(name, ordinal, flags) {
|
|
337
343
|
Enum.call(this, name, ordinal);
|
|
338
|
-
this.
|
|
344
|
+
this.d3u_1 = flags;
|
|
339
345
|
}
|
|
340
346
|
function Options_InputDir_getInstance() {
|
|
341
347
|
Options_initEntries();
|
|
@@ -357,6 +363,10 @@
|
|
|
357
363
|
Options_initEntries();
|
|
358
364
|
return Options_PackageName_instance;
|
|
359
365
|
}
|
|
366
|
+
function Options_Shared_getInstance() {
|
|
367
|
+
Options_initEntries();
|
|
368
|
+
return Options_Shared_instance;
|
|
369
|
+
}
|
|
360
370
|
function Options_Strict_getInstance() {
|
|
361
371
|
Options_initEntries();
|
|
362
372
|
return Options_Strict_instance;
|
|
@@ -402,27 +412,32 @@
|
|
|
402
412
|
}
|
|
403
413
|
function inputDir$factory() {
|
|
404
414
|
return getPropertyCallableRef('inputDir', 1, KProperty1, function (receiver) {
|
|
405
|
-
return receiver.
|
|
415
|
+
return receiver.c3v();
|
|
406
416
|
}, null);
|
|
407
417
|
}
|
|
408
418
|
function outputDir$factory() {
|
|
409
419
|
return getPropertyCallableRef('outputDir', 1, KProperty1, function (receiver) {
|
|
410
|
-
return receiver.
|
|
420
|
+
return receiver.e3v();
|
|
411
421
|
}, null);
|
|
412
422
|
}
|
|
413
423
|
function packageName$factory() {
|
|
414
424
|
return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) {
|
|
415
|
-
return receiver.
|
|
425
|
+
return receiver.f3v();
|
|
426
|
+
}, null);
|
|
427
|
+
}
|
|
428
|
+
function shared$factory() {
|
|
429
|
+
return getPropertyCallableRef('shared', 1, KProperty1, function (receiver) {
|
|
430
|
+
return receiver.g3v();
|
|
416
431
|
}, null);
|
|
417
432
|
}
|
|
418
433
|
function strict$factory() {
|
|
419
434
|
return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) {
|
|
420
|
-
return receiver.
|
|
435
|
+
return receiver.h3v();
|
|
421
436
|
}, null);
|
|
422
437
|
}
|
|
423
438
|
function debug$factory() {
|
|
424
439
|
return getPropertyCallableRef('debug', 1, KProperty1, function (receiver) {
|
|
425
|
-
return receiver.
|
|
440
|
+
return receiver.i3v();
|
|
426
441
|
}, null);
|
|
427
442
|
}
|
|
428
443
|
function inputFile$factory_0() {
|
|
@@ -432,27 +447,32 @@
|
|
|
432
447
|
}
|
|
433
448
|
function inputDir$factory_0() {
|
|
434
449
|
return getPropertyCallableRef('inputDir', 1, KProperty1, function (receiver) {
|
|
435
|
-
return receiver.
|
|
450
|
+
return receiver.c3v();
|
|
436
451
|
}, null);
|
|
437
452
|
}
|
|
438
453
|
function outputDir$factory_0() {
|
|
439
454
|
return getPropertyCallableRef('outputDir', 1, KProperty1, function (receiver) {
|
|
440
|
-
return receiver.
|
|
455
|
+
return receiver.e3v();
|
|
441
456
|
}, null);
|
|
442
457
|
}
|
|
443
458
|
function packageName$factory_0() {
|
|
444
459
|
return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) {
|
|
445
|
-
return receiver.
|
|
460
|
+
return receiver.f3v();
|
|
461
|
+
}, null);
|
|
462
|
+
}
|
|
463
|
+
function shared$factory_0() {
|
|
464
|
+
return getPropertyCallableRef('shared', 1, KProperty1, function (receiver) {
|
|
465
|
+
return receiver.g3v();
|
|
446
466
|
}, null);
|
|
447
467
|
}
|
|
448
468
|
function strict$factory_0() {
|
|
449
469
|
return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) {
|
|
450
|
-
return receiver.
|
|
470
|
+
return receiver.h3v();
|
|
451
471
|
}, null);
|
|
452
472
|
}
|
|
453
473
|
function debug$factory_0() {
|
|
454
474
|
return getPropertyCallableRef('debug', 1, KProperty1, function (receiver) {
|
|
455
|
-
return receiver.
|
|
475
|
+
return receiver.i3v();
|
|
456
476
|
}, null);
|
|
457
477
|
}
|
|
458
478
|
function main(args) {
|
|
@@ -463,8 +483,8 @@
|
|
|
463
483
|
// Inline function 'kotlin.collections.mapNotNullTo' call
|
|
464
484
|
var tmp0_mapNotNullTo = ArrayList_init_$Create$();
|
|
465
485
|
// Inline function 'kotlin.collections.forEach' call
|
|
466
|
-
var inductionVariable = tmp0_mapNotNull.
|
|
467
|
-
var last = tmp0_mapNotNull.
|
|
486
|
+
var inductionVariable = tmp0_mapNotNull.u9_1;
|
|
487
|
+
var last = tmp0_mapNotNull.v9_1;
|
|
468
488
|
if (inductionVariable <= last)
|
|
469
489
|
do {
|
|
470
490
|
var element = inductionVariable;
|
|
@@ -476,7 +496,7 @@
|
|
|
476
496
|
else {
|
|
477
497
|
// Inline function 'kotlin.let' call
|
|
478
498
|
// Inline function 'kotlin.contracts.contract' call
|
|
479
|
-
tmp0_mapNotNullTo.
|
|
499
|
+
tmp0_mapNotNullTo.s(tmp0_safe_receiver);
|
|
480
500
|
}
|
|
481
501
|
}
|
|
482
502
|
while (!(element === last));
|
|
@@ -484,27 +504,27 @@
|
|
|
484
504
|
var tmp = Companion_getInstance_6();
|
|
485
505
|
var tmp_0 = compile$ref();
|
|
486
506
|
// Inline function 'kotlin.contracts.contract' call
|
|
487
|
-
tmp.
|
|
507
|
+
tmp.a3t(tmp_0, convert$ref())(tmp2_let);
|
|
488
508
|
}
|
|
489
509
|
function compile_0(arguments_0) {
|
|
490
|
-
var input = arguments_0.
|
|
491
|
-
var output = arguments_0.
|
|
492
|
-
var languages = arguments_0.
|
|
493
|
-
var packageName = arguments_0.
|
|
494
|
-
var logger = new Logger(arguments_0.
|
|
495
|
-
var operation = arguments_0.
|
|
510
|
+
var input = arguments_0.r21_1;
|
|
511
|
+
var output = arguments_0.s21_1;
|
|
512
|
+
var languages = arguments_0.t21_1;
|
|
513
|
+
var packageName = arguments_0.u21_1;
|
|
514
|
+
var logger = new Logger(arguments_0.x21_1);
|
|
515
|
+
var operation = arguments_0.q21_1;
|
|
496
516
|
if (operation instanceof Convert) {
|
|
497
517
|
var fullPath = input instanceof FullFilePath ? input : THROW_CCE();
|
|
498
518
|
var file = new JsonFile(fullPath);
|
|
499
|
-
var strict = arguments_0.
|
|
500
|
-
var format = operation.
|
|
519
|
+
var strict = arguments_0.w21_1;
|
|
520
|
+
var format = operation.z21_1;
|
|
501
521
|
var tmp;
|
|
502
|
-
switch (format.
|
|
522
|
+
switch (format.c9_1) {
|
|
503
523
|
case 0:
|
|
504
|
-
tmp = Companion_getInstance_2().
|
|
524
|
+
tmp = Companion_getInstance_2().p22(file.i12(), !strict);
|
|
505
525
|
break;
|
|
506
526
|
case 1:
|
|
507
|
-
tmp = Companion_getInstance_3().
|
|
527
|
+
tmp = Companion_getInstance_3().p22(file.i12(), !strict);
|
|
508
528
|
break;
|
|
509
529
|
default:
|
|
510
530
|
noWhenBranchMatchedException();
|
|
@@ -517,19 +537,19 @@
|
|
|
517
537
|
var tmp0_map = emitters(languages, packageName, path, logger);
|
|
518
538
|
// Inline function 'kotlin.collections.mapTo' call
|
|
519
539
|
var tmp0_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp0_map, 10));
|
|
520
|
-
var tmp0_iterator = tmp0_map.
|
|
521
|
-
while (tmp0_iterator.
|
|
522
|
-
var item = tmp0_iterator.
|
|
540
|
+
var tmp0_iterator = tmp0_map.v();
|
|
541
|
+
while (tmp0_iterator.w()) {
|
|
542
|
+
var item = tmp0_iterator.y();
|
|
523
543
|
var tmp$ret$7;
|
|
524
544
|
// Inline function 'community.flock.wirespec.plugin.cli.compile.<anonymous>' call
|
|
525
|
-
var emitter = item.
|
|
526
|
-
var file_0 = item.
|
|
527
|
-
var results = emitter.
|
|
545
|
+
var emitter = item.fd();
|
|
546
|
+
var file_0 = item.gd();
|
|
547
|
+
var results = emitter.q1r(ast);
|
|
528
548
|
var tmp_0;
|
|
529
|
-
if (!emitter.
|
|
549
|
+
if (!emitter.p1r_1) {
|
|
530
550
|
var tmp$ret$6;
|
|
531
551
|
// Inline function 'kotlin.text.replaceFirstChar' call
|
|
532
|
-
var tmp0_replaceFirstChar = _FileName___get_value__impl__3u4cz6(fullPath.
|
|
552
|
+
var tmp0_replaceFirstChar = _FileName___get_value__impl__3u4cz6(fullPath.f22_1);
|
|
533
553
|
var tmp_1;
|
|
534
554
|
// Inline function 'kotlin.text.isNotEmpty' call
|
|
535
555
|
if (charSequenceLength(tmp0_replaceFirstChar) > 0) {
|
|
@@ -547,22 +567,22 @@
|
|
|
547
567
|
tmp_1 = tmp0_replaceFirstChar;
|
|
548
568
|
}
|
|
549
569
|
tmp$ret$6 = tmp_1;
|
|
550
|
-
tmp_0 = to(listOf(new Emitted(tmp$ret$6, first(results).
|
|
570
|
+
tmp_0 = to(listOf(new Emitted(tmp$ret$6, first(results).b1t_1)), file_0);
|
|
551
571
|
} else {
|
|
552
572
|
tmp_0 = to(results, file_0);
|
|
553
573
|
}
|
|
554
574
|
tmp$ret$7 = tmp_0;
|
|
555
|
-
tmp0_mapTo.
|
|
575
|
+
tmp0_mapTo.s(tmp$ret$7);
|
|
556
576
|
}
|
|
557
577
|
// Inline function 'kotlin.collections.mapTo' call
|
|
558
578
|
var tmp0_mapTo_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp0_mapTo, 10));
|
|
559
|
-
var tmp0_iterator_0 = tmp0_mapTo.
|
|
560
|
-
while (tmp0_iterator_0.
|
|
561
|
-
var item_0 = tmp0_iterator_0.
|
|
562
|
-
var results_0 = item_0.
|
|
563
|
-
var file_1 = item_0.
|
|
579
|
+
var tmp0_iterator_0 = tmp0_mapTo.v();
|
|
580
|
+
while (tmp0_iterator_0.w()) {
|
|
581
|
+
var item_0 = tmp0_iterator_0.y();
|
|
582
|
+
var results_0 = item_0.fd();
|
|
583
|
+
var file_1 = item_0.gd();
|
|
564
584
|
write(results_0, file_1);
|
|
565
|
-
tmp0_mapTo_0.
|
|
585
|
+
tmp0_mapTo_0.s(Unit_getInstance());
|
|
566
586
|
}
|
|
567
587
|
} else {
|
|
568
588
|
if (operation instanceof Compile) {
|
|
@@ -571,19 +591,19 @@
|
|
|
571
591
|
} else {
|
|
572
592
|
if (input instanceof FullDirPath) {
|
|
573
593
|
// Inline function 'kotlin.collections.forEach' call
|
|
574
|
-
var tmp0_iterator_1 = (new Directory(input.
|
|
575
|
-
while (tmp0_iterator_1.
|
|
576
|
-
var element = tmp0_iterator_1.
|
|
594
|
+
var tmp0_iterator_1 = (new Directory(input.k22_1)).m3w().v();
|
|
595
|
+
while (tmp0_iterator_1.w()) {
|
|
596
|
+
var element = tmp0_iterator_1.y();
|
|
577
597
|
// Inline function 'community.flock.wirespec.plugin.cli.compile.<anonymous>' call
|
|
578
|
-
wirespec(element, languages, packageName, out(element.
|
|
598
|
+
wirespec(element, languages, packageName, out(element.k3w_1, packageName, output), logger);
|
|
579
599
|
}
|
|
580
600
|
} else {
|
|
581
601
|
if (input instanceof FullFilePath)
|
|
582
|
-
if (input.
|
|
602
|
+
if (input.g22_1.equals(FileExtension_Wirespec_getInstance())) {
|
|
583
603
|
// Inline function 'kotlin.let' call
|
|
584
604
|
var tmp3_let = new WirespecFile(input);
|
|
585
605
|
// Inline function 'kotlin.contracts.contract' call
|
|
586
|
-
wirespec(tmp3_let, languages, packageName, out(tmp3_let.
|
|
606
|
+
wirespec(tmp3_let, languages, packageName, out(tmp3_let.k3w_1, packageName, output), logger);
|
|
587
607
|
} else {
|
|
588
608
|
// Inline function 'kotlin.error' call
|
|
589
609
|
var tmp4_error = 'Path ' + input + ' is not a Wirespec file';
|
|
@@ -602,18 +622,18 @@
|
|
|
602
622
|
}
|
|
603
623
|
function write(output, file) {
|
|
604
624
|
// Inline function 'kotlin.collections.forEach' call
|
|
605
|
-
var tmp0_iterator = output.
|
|
606
|
-
while (tmp0_iterator.
|
|
607
|
-
var element = tmp0_iterator.
|
|
625
|
+
var tmp0_iterator = output.v();
|
|
626
|
+
while (tmp0_iterator.w()) {
|
|
627
|
+
var element = tmp0_iterator.y();
|
|
608
628
|
// Inline function 'community.flock.wirespec.plugin.cli.write.<anonymous>' call
|
|
609
|
-
var name = element.
|
|
610
|
-
var result = element.
|
|
611
|
-
var tmp1_safe_receiver = file == null ? null : file.
|
|
629
|
+
var name = element.fd();
|
|
630
|
+
var result = element.gd();
|
|
631
|
+
var tmp1_safe_receiver = file == null ? null : file.n3w(_FileName___init__impl__nzn12e(name));
|
|
612
632
|
var tmp;
|
|
613
633
|
if (tmp1_safe_receiver == null) {
|
|
614
634
|
tmp = null;
|
|
615
635
|
} else {
|
|
616
|
-
tmp1_safe_receiver.
|
|
636
|
+
tmp1_safe_receiver.o3w(result);
|
|
617
637
|
tmp = Unit_getInstance();
|
|
618
638
|
}
|
|
619
639
|
if (tmp == null) {
|
|
@@ -625,14 +645,14 @@
|
|
|
625
645
|
// Inline function 'kotlin.collections.map' call
|
|
626
646
|
// Inline function 'kotlin.collections.mapTo' call
|
|
627
647
|
var tmp0_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(_this__u8e3s4, 10));
|
|
628
|
-
var tmp0_iterator = _this__u8e3s4.
|
|
629
|
-
while (tmp0_iterator.
|
|
630
|
-
var item = tmp0_iterator.
|
|
648
|
+
var tmp0_iterator = _this__u8e3s4.v();
|
|
649
|
+
while (tmp0_iterator.w()) {
|
|
650
|
+
var item = tmp0_iterator.y();
|
|
631
651
|
var tmp$ret$10;
|
|
632
652
|
// Inline function 'community.flock.wirespec.plugin.cli.emitters.<anonymous>' call
|
|
633
653
|
var packageString = component1(new PackageName(packageName));
|
|
634
654
|
var tmp;
|
|
635
|
-
switch (item.
|
|
655
|
+
switch (item.c9_1) {
|
|
636
656
|
case 0:
|
|
637
657
|
var tmp_0 = new JavaEmitter(packageString, logger);
|
|
638
658
|
var tmp_1;
|
|
@@ -708,7 +728,7 @@
|
|
|
708
728
|
break;
|
|
709
729
|
}
|
|
710
730
|
tmp$ret$10 = tmp;
|
|
711
|
-
tmp0_mapTo.
|
|
731
|
+
tmp0_mapTo.s(tmp$ret$10);
|
|
712
732
|
}
|
|
713
733
|
return tmp0_mapTo;
|
|
714
734
|
}
|
|
@@ -716,7 +736,7 @@
|
|
|
716
736
|
// Inline function 'kotlin.collections.map' call
|
|
717
737
|
// Inline function 'kotlin.let' call
|
|
718
738
|
// Inline function 'kotlin.let' call
|
|
719
|
-
var tmp0_let = _this__u8e3s4.
|
|
739
|
+
var tmp0_let = _this__u8e3s4.i12();
|
|
720
740
|
var tmp1_let_this = WirespecSpec_getInstance();
|
|
721
741
|
// Inline function 'kotlin.contracts.contract' call
|
|
722
742
|
var tmp2_let = compile(tmp1_let_this, tmp0_let)(logger);
|
|
@@ -726,16 +746,16 @@
|
|
|
726
746
|
var tmp0_map = emitters(languages, packageName, path, logger);
|
|
727
747
|
// Inline function 'kotlin.collections.mapTo' call
|
|
728
748
|
var tmp0_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp0_map, 10));
|
|
729
|
-
var tmp0_iterator = tmp0_map.
|
|
730
|
-
while (tmp0_iterator.
|
|
731
|
-
var item = tmp0_iterator.
|
|
749
|
+
var tmp0_iterator = tmp0_map.v();
|
|
750
|
+
while (tmp0_iterator.w()) {
|
|
751
|
+
var item = tmp0_iterator.y();
|
|
732
752
|
var tmp$ret$6;
|
|
733
753
|
// Inline function 'community.flock.wirespec.plugin.cli.wirespec.<anonymous>.<anonymous>' call
|
|
734
|
-
var emitter = item.
|
|
735
|
-
var file = item.
|
|
754
|
+
var emitter = item.fd();
|
|
755
|
+
var file = item.gd();
|
|
736
756
|
var results = tmp2_let(emitter);
|
|
737
757
|
var tmp;
|
|
738
|
-
if (!emitter.
|
|
758
|
+
if (!emitter.p1r_1) {
|
|
739
759
|
var tmp$ret$5;
|
|
740
760
|
// Inline function 'arrow.core.Either.map' call
|
|
741
761
|
// Inline function 'kotlin.contracts.contract' call
|
|
@@ -744,10 +764,10 @@
|
|
|
744
764
|
var tmp_0;
|
|
745
765
|
if (results instanceof Right) {
|
|
746
766
|
// Inline function 'arrow.core.Either.map.<anonymous>' call
|
|
747
|
-
var tmp0_anonymous = results.
|
|
767
|
+
var tmp0_anonymous = results.p1q_1;
|
|
748
768
|
var tmp$ret$2;
|
|
749
769
|
// Inline function 'community.flock.wirespec.plugin.cli.wirespec.<anonymous>.<anonymous>.<anonymous>' call
|
|
750
|
-
tmp$ret$2 = listOf(new Emitted(Companion_getInstance_4().
|
|
770
|
+
tmp$ret$2 = listOf(new Emitted(Companion_getInstance_4().n1s(_FileName___get_value__impl__3u4cz6(path(FileExtension_Wirespec_getInstance()).f22_1)), first(tmp0_anonymous).b1t_1));
|
|
751
771
|
tmp_0 = new Right(tmp$ret$2);
|
|
752
772
|
} else {
|
|
753
773
|
if (results instanceof Left) {
|
|
@@ -762,24 +782,24 @@
|
|
|
762
782
|
tmp = to(results, file);
|
|
763
783
|
}
|
|
764
784
|
tmp$ret$6 = tmp;
|
|
765
|
-
tmp0_mapTo.
|
|
785
|
+
tmp0_mapTo.s(tmp$ret$6);
|
|
766
786
|
}
|
|
767
787
|
// Inline function 'kotlin.collections.mapTo' call
|
|
768
788
|
var tmp0_mapTo_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp0_mapTo, 10));
|
|
769
|
-
var tmp0_iterator_0 = tmp0_mapTo.
|
|
770
|
-
while (tmp0_iterator_0.
|
|
771
|
-
var item_0 = tmp0_iterator_0.
|
|
789
|
+
var tmp0_iterator_0 = tmp0_mapTo.v();
|
|
790
|
+
while (tmp0_iterator_0.w()) {
|
|
791
|
+
var item_0 = tmp0_iterator_0.y();
|
|
772
792
|
// Inline function 'community.flock.wirespec.plugin.cli.wirespec.<anonymous>' call
|
|
773
|
-
var results_0 = item_0.
|
|
774
|
-
var file_0 = item_0.
|
|
793
|
+
var results_0 = item_0.fd();
|
|
794
|
+
var file_0 = item_0.gd();
|
|
775
795
|
if (results_0 instanceof Right) {
|
|
776
|
-
write(results_0.
|
|
796
|
+
write(results_0.p1q_1, file_0);
|
|
777
797
|
} else {
|
|
778
798
|
if (results_0 instanceof Left) {
|
|
779
|
-
println(results_0.
|
|
799
|
+
println(results_0.j1q_1);
|
|
780
800
|
}
|
|
781
801
|
}
|
|
782
|
-
tmp0_mapTo_0.
|
|
802
|
+
tmp0_mapTo_0.s(Unit_getInstance());
|
|
783
803
|
}
|
|
784
804
|
}
|
|
785
805
|
function compile$ref() {
|
|
@@ -801,7 +821,7 @@
|
|
|
801
821
|
function compile$lambda($output) {
|
|
802
822
|
return function (it) {
|
|
803
823
|
var tmp = $output;
|
|
804
|
-
return new FullFilePath(_Output___get_value__impl__a8kw1g(ensureNotNull(tmp == null ? null : new Output(tmp)).
|
|
824
|
+
return new FullFilePath(_Output___get_value__impl__a8kw1g(ensureNotNull(tmp == null ? null : new Output(tmp)).n22_1), _FileName___init__impl__nzn12e('console'), it);
|
|
805
825
|
};
|
|
806
826
|
}
|
|
807
827
|
function out$lambda($output, $this_out, $packageName) {
|
|
@@ -812,60 +832,60 @@
|
|
|
812
832
|
if ((tmp_0 == null ? null : new Output(tmp_0)) == null) {
|
|
813
833
|
var tmp$ret$1;
|
|
814
834
|
// Inline function 'kotlin.text.lowercase' call
|
|
815
|
-
var tmp0_lowercase = extension.
|
|
835
|
+
var tmp0_lowercase = extension.b9_1;
|
|
816
836
|
var tmp$ret$0;
|
|
817
837
|
// Inline function 'kotlin.js.asDynamic' call
|
|
818
838
|
tmp$ret$0 = tmp0_lowercase;
|
|
819
839
|
tmp$ret$1 = tmp$ret$0.toLowerCase();
|
|
820
|
-
tmp = $this_out.
|
|
840
|
+
tmp = $this_out.e22_1 + '/out/' + tmp$ret$1;
|
|
821
841
|
} else {
|
|
822
842
|
tmp = new Output(tmp0_elvis_lhs);
|
|
823
843
|
}
|
|
824
844
|
var dir = tmp;
|
|
825
|
-
return $this_out.
|
|
845
|
+
return $this_out.i22(toString(dir) + '/' + joinToString(split(_PackageName___get_value__impl__2zr98c($packageName), charArrayOf([_Char___init__impl__6a9atx(46)])), '/'), VOID, extension);
|
|
826
846
|
};
|
|
827
847
|
}
|
|
828
848
|
function JavaFile(path) {
|
|
829
|
-
File.call(this, path.
|
|
849
|
+
File.call(this, path.i22(VOID, VOID, FileExtension_Java_getInstance()));
|
|
830
850
|
}
|
|
831
|
-
protoOf(JavaFile).
|
|
832
|
-
return new JavaFile(this.
|
|
851
|
+
protoOf(JavaFile).n3w = function (fileName) {
|
|
852
|
+
return new JavaFile(this.k3w_1.i22(VOID, fileName));
|
|
833
853
|
};
|
|
834
854
|
function JsonFile(path) {
|
|
835
|
-
File.call(this, path.
|
|
855
|
+
File.call(this, path.i22(VOID, VOID, FileExtension_Json_getInstance()));
|
|
836
856
|
}
|
|
837
|
-
protoOf(JsonFile).
|
|
838
|
-
return new JsonFile(this.
|
|
857
|
+
protoOf(JsonFile).n3w = function (fileName) {
|
|
858
|
+
return new JsonFile(this.k3w_1.i22(VOID, fileName));
|
|
839
859
|
};
|
|
840
860
|
function KotlinFile(path) {
|
|
841
|
-
File.call(this, path.
|
|
861
|
+
File.call(this, path.i22(VOID, VOID, FileExtension_Kotlin_getInstance()));
|
|
842
862
|
}
|
|
843
|
-
protoOf(KotlinFile).
|
|
844
|
-
return new KotlinFile(this.
|
|
863
|
+
protoOf(KotlinFile).n3w = function (fileName) {
|
|
864
|
+
return new KotlinFile(this.k3w_1.i22(VOID, fileName));
|
|
845
865
|
};
|
|
846
866
|
function ScalaFile(path) {
|
|
847
|
-
File.call(this, path.
|
|
867
|
+
File.call(this, path.i22(VOID, VOID, FileExtension_Scala_getInstance()));
|
|
848
868
|
}
|
|
849
|
-
protoOf(ScalaFile).
|
|
850
|
-
return new ScalaFile(this.
|
|
869
|
+
protoOf(ScalaFile).n3w = function (fileName) {
|
|
870
|
+
return new ScalaFile(this.k3w_1.i22(VOID, fileName));
|
|
851
871
|
};
|
|
852
872
|
function TypeScriptFile(path) {
|
|
853
|
-
File.call(this, path.
|
|
873
|
+
File.call(this, path.i22(VOID, VOID, FileExtension_TypeScript_getInstance()));
|
|
854
874
|
}
|
|
855
|
-
protoOf(TypeScriptFile).
|
|
856
|
-
return new TypeScriptFile(this.
|
|
875
|
+
protoOf(TypeScriptFile).n3w = function (fileName) {
|
|
876
|
+
return new TypeScriptFile(this.k3w_1.i22(VOID, fileName));
|
|
857
877
|
};
|
|
858
878
|
function WirespecFile(path) {
|
|
859
|
-
File.call(this, path.
|
|
879
|
+
File.call(this, path.i22(VOID, VOID, FileExtension_Wirespec_getInstance()));
|
|
860
880
|
}
|
|
861
|
-
protoOf(WirespecFile).
|
|
862
|
-
return new WirespecFile(this.
|
|
881
|
+
protoOf(WirespecFile).n3w = function (fileName) {
|
|
882
|
+
return new WirespecFile(this.k3w_1.i22(VOID, fileName));
|
|
863
883
|
};
|
|
864
884
|
function cli(args) {
|
|
865
885
|
main(args);
|
|
866
886
|
}
|
|
867
887
|
function parser(source) {
|
|
868
|
-
var tmp0_safe_receiver = parse(WirespecSpec_getInstance(), source)(get_noLogger()).
|
|
888
|
+
var tmp0_safe_receiver = parse(WirespecSpec_getInstance(), source)(get_noLogger()).o1q();
|
|
869
889
|
var tmp;
|
|
870
890
|
if (tmp0_safe_receiver == null) {
|
|
871
891
|
tmp = null;
|
|
@@ -873,11 +893,11 @@
|
|
|
873
893
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
874
894
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
875
895
|
var tmp0_filterIsInstanceTo = ArrayList_init_$Create$();
|
|
876
|
-
var tmp0_iterator = tmp0_safe_receiver.
|
|
877
|
-
while (tmp0_iterator.
|
|
878
|
-
var element = tmp0_iterator.
|
|
896
|
+
var tmp0_iterator = tmp0_safe_receiver.v();
|
|
897
|
+
while (tmp0_iterator.w()) {
|
|
898
|
+
var element = tmp0_iterator.y();
|
|
879
899
|
if (!(element == null) ? isInterface(element, Definition) : false) {
|
|
880
|
-
tmp0_filterIsInstanceTo.
|
|
900
|
+
tmp0_filterIsInstanceTo.s(element);
|
|
881
901
|
}
|
|
882
902
|
}
|
|
883
903
|
tmp = tmp0_filterIsInstanceTo;
|
|
@@ -890,13 +910,13 @@
|
|
|
890
910
|
// Inline function 'kotlin.collections.map' call
|
|
891
911
|
// Inline function 'kotlin.collections.mapTo' call
|
|
892
912
|
var tmp0_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp1_safe_receiver, 10));
|
|
893
|
-
var tmp0_iterator_0 = tmp1_safe_receiver.
|
|
894
|
-
while (tmp0_iterator_0.
|
|
895
|
-
var item = tmp0_iterator_0.
|
|
913
|
+
var tmp0_iterator_0 = tmp1_safe_receiver.v();
|
|
914
|
+
while (tmp0_iterator_0.w()) {
|
|
915
|
+
var item = tmp0_iterator_0.y();
|
|
896
916
|
var tmp$ret$2;
|
|
897
917
|
// Inline function 'community.flock.wirespec.plugin.cli.parser.<anonymous>' call
|
|
898
918
|
tmp$ret$2 = produce(item);
|
|
899
|
-
tmp0_mapTo.
|
|
919
|
+
tmp0_mapTo.s(tmp$ret$2);
|
|
900
920
|
}
|
|
901
921
|
tmp_0 = tmp0_mapTo;
|
|
902
922
|
}
|
|
@@ -922,14 +942,14 @@
|
|
|
922
942
|
return it;
|
|
923
943
|
}
|
|
924
944
|
function Directory$wirespecFiles$lambda_0(it) {
|
|
925
|
-
return endsWith(it, FileExtension_Wirespec_getInstance().
|
|
945
|
+
return endsWith(it, FileExtension_Wirespec_getInstance().d22_1);
|
|
926
946
|
}
|
|
927
947
|
function Directory$wirespecFiles$lambda_1(it) {
|
|
928
|
-
return dropLast(it, FileExtension_Wirespec_getInstance().
|
|
948
|
+
return dropLast(it, FileExtension_Wirespec_getInstance().d22_1.length + 1 | 0);
|
|
929
949
|
}
|
|
930
950
|
function Directory$wirespecFiles$lambda_2(this$0) {
|
|
931
951
|
return function (it) {
|
|
932
|
-
return new FullFilePath(this$0.
|
|
952
|
+
return new FullFilePath(this$0.l3w_1, _FileName___init__impl__nzn12e(it));
|
|
933
953
|
};
|
|
934
954
|
}
|
|
935
955
|
function WirespecFile$_init_$ref_cj1n5j() {
|
|
@@ -940,10 +960,10 @@
|
|
|
940
960
|
return l;
|
|
941
961
|
}
|
|
942
962
|
function Directory(path) {
|
|
943
|
-
this.
|
|
963
|
+
this.l3w_1 = path;
|
|
944
964
|
}
|
|
945
|
-
protoOf(Directory).
|
|
946
|
-
var tmp = asSequence(iterator(get_fs().readdirSync(this.
|
|
965
|
+
protoOf(Directory).m3w = function () {
|
|
966
|
+
var tmp = asSequence(iterator(get_fs().readdirSync(this.l3w_1, 'utf-8')));
|
|
947
967
|
var tmp_0 = map(tmp, Directory$wirespecFiles$lambda);
|
|
948
968
|
var tmp_1 = filter(tmp_0, Directory$wirespecFiles$lambda_0);
|
|
949
969
|
var tmp_2 = map(tmp_1, Directory$wirespecFiles$lambda_1);
|
|
@@ -951,20 +971,20 @@
|
|
|
951
971
|
return toSet_0(map(tmp_3, WirespecFile$_init_$ref_cj1n5j()));
|
|
952
972
|
};
|
|
953
973
|
function File(path) {
|
|
954
|
-
this.
|
|
974
|
+
this.k3w_1 = path;
|
|
955
975
|
}
|
|
956
|
-
protoOf(File).
|
|
976
|
+
protoOf(File).i12 = function () {
|
|
957
977
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
958
|
-
return get_fs().readFileSync(this.
|
|
978
|
+
return get_fs().readFileSync(this.k3w_1.toString(), 'utf-8');
|
|
959
979
|
};
|
|
960
|
-
protoOf(File).
|
|
980
|
+
protoOf(File).o3w = function (text) {
|
|
961
981
|
// Inline function 'kotlin.run' call
|
|
962
|
-
var tmp0_run = this.
|
|
982
|
+
var tmp0_run = this.k3w_1.i22(joinToString(split_0(this.k3w_1.e22_1, ['out']), 'out/node'));
|
|
963
983
|
// Inline function 'kotlin.contracts.contract' call
|
|
964
984
|
// Inline function 'community.flock.wirespec.plugin.cli.io.File.write.<anonymous>' call
|
|
965
985
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
966
|
-
if (!get_fs().existsSync(tmp0_run.
|
|
967
|
-
get_fs().mkdirSync(tmp0_run.
|
|
986
|
+
if (!get_fs().existsSync(tmp0_run.e22_1)) {
|
|
987
|
+
get_fs().mkdirSync(tmp0_run.e22_1, {recursive: true});
|
|
968
988
|
}
|
|
969
989
|
get_fs().writeFileSync(tmp0_run.toString(), text);
|
|
970
990
|
};
|
|
@@ -977,7 +997,7 @@
|
|
|
977
997
|
function _init_properties_JavaScriptBindings_kt__clolet() {
|
|
978
998
|
if (!properties_initialized_JavaScriptBindings_kt_6og6hv) {
|
|
979
999
|
properties_initialized_JavaScriptBindings_kt_6og6hv = true;
|
|
980
|
-
fs = require('fs');
|
|
1000
|
+
fs = require('node:fs');
|
|
981
1001
|
}
|
|
982
1002
|
}
|
|
983
1003
|
function get_nodeArgs() {
|