@flock/wirespec 0.9.28 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/arrow-arrow-atomic.js +2 -2
- package/arrow-arrow-continuations.js +1 -1
- package/arrow-arrow-core.js +18 -18
- package/clikt-clikt.js +1253 -1253
- package/colormath-root-colormath.js +458 -458
- package/kotlin-kotlin-stdlib.js +269 -250
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlin-openapi-bindings.js +26 -26
- package/kotlin-rgxgen.js +1818 -1818
- package/kotlinx-serialization-kotlinx-serialization-core.js +74 -74
- package/kotlinx-serialization-kotlinx-serialization-json.js +78 -78
- package/markdown.js +1941 -1941
- package/mordant-mordant.js +1712 -1712
- package/package.json +1 -1
- package/wirespec-src-compiler-core.js +2893 -1996
- package/wirespec-src-compiler-core.js.map +1 -1
- package/wirespec-src-compiler-lib.js +352 -350
- package/wirespec-src-compiler-lib.js.map +1 -1
- package/wirespec-src-converter-openapi.js +340 -340
- package/wirespec-src-converter-openapi.js.map +1 -1
- package/wirespec-src-plugin-arguments.js +109 -103
- package/wirespec-src-plugin-arguments.js.map +1 -1
- package/wirespec-src-plugin-cli.js +233 -187
- package/wirespec-src-plugin-cli.js.map +1 -1
- package/wirespec-src-plugin-npm.js +26 -26
- package/wirespec-src-tools-generator.js +36 -36
- package/wirespec-src-tools-generator.js.map +1 -1
|
@@ -32,109 +32,117 @@
|
|
|
32
32
|
//region block: imports
|
|
33
33
|
var Unit_instance = kotlin_kotlin.$_$.g4;
|
|
34
34
|
var subcommands = kotlin_clikt_clikt.$_$.c;
|
|
35
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
36
|
-
var initMetadataForCompanion = kotlin_kotlin.$_$.
|
|
35
|
+
var protoOf = kotlin_kotlin.$_$.va;
|
|
36
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.w9;
|
|
37
37
|
var NoOpCliktCommand = kotlin_clikt_clikt.$_$.b;
|
|
38
38
|
var VOID = kotlin_kotlin.$_$.g;
|
|
39
|
-
var initMetadataForClass = kotlin_kotlin.$_$.
|
|
39
|
+
var initMetadataForClass = kotlin_kotlin.$_$.v9;
|
|
40
40
|
var option = kotlin_clikt_clikt.$_$.h;
|
|
41
41
|
var Companion_instance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.x;
|
|
42
42
|
var choice = kotlin_clikt_clikt.$_$.j;
|
|
43
43
|
var multiple = kotlin_clikt_clikt.$_$.g;
|
|
44
44
|
var Compile_instance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.y;
|
|
45
45
|
var Companion_instance_0 = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.z;
|
|
46
|
-
var toSet = kotlin_kotlin.$_$.
|
|
46
|
+
var toSet = kotlin_kotlin.$_$.o8;
|
|
47
47
|
var _PackageName___init__impl__s13tbs = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.t;
|
|
48
48
|
var CompilerArguments = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.a;
|
|
49
49
|
var argument = kotlin_clikt_clikt.$_$.d;
|
|
50
50
|
var values = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.c;
|
|
51
|
-
var mapCapacity = kotlin_kotlin.$_$.
|
|
52
|
-
var coerceAtLeast = kotlin_kotlin.$_$.
|
|
51
|
+
var mapCapacity = kotlin_kotlin.$_$.h7;
|
|
52
|
+
var coerceAtLeast = kotlin_kotlin.$_$.gb;
|
|
53
53
|
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.t;
|
|
54
54
|
var choice_0 = kotlin_clikt_clikt.$_$.i;
|
|
55
55
|
var Language_Wirespec_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.p;
|
|
56
|
-
var listOf = kotlin_kotlin.$_$.
|
|
56
|
+
var listOf = kotlin_kotlin.$_$.f7;
|
|
57
57
|
var Convert = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.g;
|
|
58
|
-
var setOf = kotlin_kotlin.$_$.
|
|
58
|
+
var setOf = kotlin_kotlin.$_$.t7;
|
|
59
59
|
var CliktCommand = kotlin_clikt_clikt.$_$.a;
|
|
60
60
|
var default_0 = kotlin_clikt_clikt.$_$.e;
|
|
61
|
+
var Companion_instance_1 = kotlin_community_flock_wirespec_compiler_core.$_$.e2;
|
|
62
|
+
var Level_ERROR_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.w1;
|
|
61
63
|
var flag = kotlin_clikt_clikt.$_$.f;
|
|
62
|
-
var
|
|
64
|
+
var Companion_instance_2 = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.w;
|
|
63
65
|
var FullDirPath = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.d;
|
|
64
66
|
var Console_instance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.v;
|
|
65
|
-
var toString = kotlin_kotlin.$_$.
|
|
67
|
+
var toString = kotlin_kotlin.$_$.za;
|
|
66
68
|
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.l1;
|
|
67
|
-
var
|
|
68
|
-
var
|
|
69
|
-
var
|
|
70
|
-
var
|
|
69
|
+
var THROW_CCE = kotlin_kotlin.$_$.gf;
|
|
70
|
+
var isCharSequence = kotlin_kotlin.$_$.fa;
|
|
71
|
+
var trim = kotlin_kotlin.$_$.ne;
|
|
72
|
+
var Level_DEBUG_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.v1;
|
|
73
|
+
var Level_INFO_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.x1;
|
|
74
|
+
var Level_WARN_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.y1;
|
|
75
|
+
var Enum = kotlin_kotlin.$_$.we;
|
|
76
|
+
var KProperty1 = kotlin_kotlin.$_$.qb;
|
|
77
|
+
var getPropertyCallableRef = kotlin_kotlin.$_$.s9;
|
|
78
|
+
var numberRangeToNumber = kotlin_kotlin.$_$.pa;
|
|
71
79
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.l;
|
|
72
80
|
var copyToArray = kotlin_kotlin.$_$.w5;
|
|
73
|
-
var Logger = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
74
|
-
var noWhenBranchMatchedException = kotlin_kotlin.$_$.
|
|
81
|
+
var Logger = kotlin_community_flock_wirespec_compiler_core.$_$.h1;
|
|
82
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.cg;
|
|
75
83
|
var FileExtension_Wirespec_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.o;
|
|
76
84
|
var FullFilePath = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.e;
|
|
77
85
|
var Console = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.b;
|
|
78
86
|
var Compile = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.f;
|
|
79
|
-
var THROW_CCE = kotlin_kotlin.$_$.ff;
|
|
80
87
|
var OpenApiV2Parser_instance = kotlin_community_flock_wirespec_converter_openapi.$_$.b;
|
|
81
88
|
var OpenApiV3Parser_instance = kotlin_community_flock_wirespec_converter_openapi.$_$.d;
|
|
82
89
|
var collectionSizeOrDefault = kotlin_kotlin.$_$.h5;
|
|
83
90
|
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.k;
|
|
84
|
-
var to = kotlin_kotlin.$_$.
|
|
91
|
+
var to = kotlin_kotlin.$_$.fg;
|
|
85
92
|
var _FileName___get_value__impl__3u4cz6 = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.r;
|
|
86
|
-
var charSequenceLength = kotlin_kotlin.$_$.
|
|
87
|
-
var charSequenceGet = kotlin_kotlin.$_$.
|
|
93
|
+
var charSequenceLength = kotlin_kotlin.$_$.k9;
|
|
94
|
+
var charSequenceGet = kotlin_kotlin.$_$.j9;
|
|
88
95
|
var toString_0 = kotlin_kotlin.$_$.z1;
|
|
89
96
|
var first = kotlin_kotlin.$_$.g6;
|
|
90
97
|
var Emitted = kotlin_community_flock_wirespec_compiler_core.$_$.a;
|
|
91
98
|
var _FileName___init__impl__nzn12e = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.q;
|
|
92
|
-
var print = kotlin_kotlin.$_$.
|
|
99
|
+
var print = kotlin_kotlin.$_$.c9;
|
|
93
100
|
var PackageName = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.i;
|
|
94
|
-
var component1 = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
101
|
+
var component1 = kotlin_community_flock_wirespec_compiler_core.$_$.f1;
|
|
95
102
|
var JavaEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.b;
|
|
96
103
|
var FileExtension_Java_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.j;
|
|
97
104
|
var KotlinEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.c;
|
|
98
105
|
var FileExtension_Kotlin_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.l;
|
|
99
|
-
var
|
|
106
|
+
var KotlinLegacyEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.d;
|
|
107
|
+
var ScalaEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.e;
|
|
100
108
|
var FileExtension_Scala_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.m;
|
|
101
|
-
var TypeScriptEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
109
|
+
var TypeScriptEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.f;
|
|
102
110
|
var FileExtension_TypeScript_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.n;
|
|
103
|
-
var WirespecEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
104
|
-
var WirespecSpec_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
105
|
-
var compile = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
111
|
+
var WirespecEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.g;
|
|
112
|
+
var WirespecSpec_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.d2;
|
|
113
|
+
var compile = kotlin_community_flock_wirespec_compiler_core.$_$.e1;
|
|
106
114
|
var Left = kotlin_io_arrow_kt_arrow_core.$_$.d;
|
|
107
|
-
var Companion_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
115
|
+
var Companion_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.b2;
|
|
108
116
|
var Right = kotlin_io_arrow_kt_arrow_core.$_$.e;
|
|
109
|
-
var println = kotlin_kotlin.$_$.
|
|
117
|
+
var println = kotlin_kotlin.$_$.a9;
|
|
110
118
|
var Output = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.h;
|
|
111
|
-
var ensureNotNull = kotlin_kotlin.$_$.
|
|
119
|
+
var ensureNotNull = kotlin_kotlin.$_$.wf;
|
|
112
120
|
var _Output___get_value__impl__a8kw1g = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.s;
|
|
113
121
|
var _PackageName___get_value__impl__2zr98c = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.u;
|
|
114
122
|
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.v1;
|
|
115
|
-
var charArrayOf = kotlin_kotlin.$_$.
|
|
116
|
-
var split = kotlin_kotlin.$_$.
|
|
123
|
+
var charArrayOf = kotlin_kotlin.$_$.h9;
|
|
124
|
+
var split = kotlin_kotlin.$_$.ld;
|
|
117
125
|
var joinToString = kotlin_kotlin.$_$.r6;
|
|
118
126
|
var FileExtension_Json_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.k;
|
|
119
|
-
var parse = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
120
|
-
var get_noLogger = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
121
|
-
var Definition = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
122
|
-
var isInterface = kotlin_kotlin.$_$.
|
|
127
|
+
var parse = kotlin_community_flock_wirespec_compiler_core.$_$.g1;
|
|
128
|
+
var get_noLogger = kotlin_community_flock_wirespec_compiler_core.$_$.i1;
|
|
129
|
+
var Definition = kotlin_community_flock_wirespec_compiler_core.$_$.j;
|
|
130
|
+
var isInterface = kotlin_kotlin.$_$.ja;
|
|
123
131
|
var produce = kotlin_community_flock_wirespec_compiler_lib.$_$.e;
|
|
124
|
-
var endsWith = kotlin_kotlin.$_$.
|
|
125
|
-
var dropLast = kotlin_kotlin.$_$.
|
|
126
|
-
var iterator = kotlin_kotlin.$_$.
|
|
127
|
-
var asSequence = kotlin_kotlin.$_$.
|
|
128
|
-
var map = kotlin_kotlin.$_$.
|
|
129
|
-
var filter = kotlin_kotlin.$_$.
|
|
130
|
-
var toSet_0 = kotlin_kotlin.$_$.
|
|
131
|
-
var split_0 = kotlin_kotlin.$_$.
|
|
132
|
-
var
|
|
132
|
+
var endsWith = kotlin_kotlin.$_$.lc;
|
|
133
|
+
var dropLast = kotlin_kotlin.$_$.ic;
|
|
134
|
+
var iterator = kotlin_kotlin.$_$.ma;
|
|
135
|
+
var asSequence = kotlin_kotlin.$_$.sb;
|
|
136
|
+
var map = kotlin_kotlin.$_$.xb;
|
|
137
|
+
var filter = kotlin_kotlin.$_$.tb;
|
|
138
|
+
var toSet_0 = kotlin_kotlin.$_$.zb;
|
|
139
|
+
var split_0 = kotlin_kotlin.$_$.md;
|
|
140
|
+
var Companion_instance_3 = kotlin_kotlin.$_$.b4;
|
|
133
141
|
var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.a2;
|
|
134
|
-
var createFailure = kotlin_kotlin.$_$.
|
|
142
|
+
var createFailure = kotlin_kotlin.$_$.vf;
|
|
135
143
|
var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.d2;
|
|
136
144
|
var _Result___get_isFailure__impl__jpiriv = kotlin_kotlin.$_$.b2;
|
|
137
|
-
var isArray = kotlin_kotlin.$_$.
|
|
145
|
+
var isArray = kotlin_kotlin.$_$.ba;
|
|
138
146
|
//endregion
|
|
139
147
|
//region block: pre-declaration
|
|
140
148
|
initMetadataForCompanion(Companion);
|
|
@@ -154,7 +162,7 @@
|
|
|
154
162
|
//endregion
|
|
155
163
|
function WirespecCli$main$ref($boundThis) {
|
|
156
164
|
var l = function (p0) {
|
|
157
|
-
$boundThis.
|
|
165
|
+
$boundThis.s3u(p0);
|
|
158
166
|
return Unit_instance;
|
|
159
167
|
};
|
|
160
168
|
l.callableName = 'main';
|
|
@@ -162,39 +170,39 @@
|
|
|
162
170
|
}
|
|
163
171
|
function Companion() {
|
|
164
172
|
}
|
|
165
|
-
protoOf(Companion).
|
|
173
|
+
protoOf(Companion).x46 = function (compile, convert) {
|
|
166
174
|
return WirespecCli$main$ref(subcommands(new WirespecCli(), [new Compile_0(compile), new Convert_0(convert)]));
|
|
167
175
|
};
|
|
168
|
-
var
|
|
176
|
+
var Companion_instance_4;
|
|
169
177
|
function Companion_getInstance_0() {
|
|
170
|
-
return
|
|
178
|
+
return Companion_instance_4;
|
|
171
179
|
}
|
|
172
180
|
function WirespecCli() {
|
|
173
181
|
NoOpCliktCommand.call(this, VOID, VOID, 'wirespec');
|
|
174
182
|
}
|
|
175
183
|
function _get_languages__ojonze($this) {
|
|
176
|
-
return $this.
|
|
184
|
+
return $this.x47_1.e44($this, languages$factory_0());
|
|
177
185
|
}
|
|
178
186
|
function Compile_0(block) {
|
|
179
187
|
CommonOptions.call(this);
|
|
180
|
-
this.
|
|
181
|
-
this.
|
|
188
|
+
this.w47_1 = block;
|
|
189
|
+
this.x47_1 = multiple(choice(option(this, Options_Language_getInstance().a48_1.slice(), 'Language'), Companion_instance.x2e()), VOID, true).p44(this, languages$factory());
|
|
182
190
|
}
|
|
183
|
-
protoOf(Compile_0).
|
|
191
|
+
protoOf(Compile_0).t3u = function () {
|
|
184
192
|
// Inline function 'kotlin.let' call
|
|
185
|
-
var this_0 = new CompilerArguments(Compile_instance, this.
|
|
193
|
+
var this_0 = new CompilerArguments(Compile_instance, this.a49(this.z48()), Companion_instance_0.y2e(this.b49()), toSet(_get_languages__ojonze(this)), _PackageName___init__impl__s13tbs(this.c49()), this.e49(this.d49()), this.f49(), this.g49());
|
|
186
194
|
// Inline function 'kotlin.contracts.contract' call
|
|
187
|
-
this.
|
|
195
|
+
this.w47_1(this_0);
|
|
188
196
|
};
|
|
189
197
|
function _get_format__qlarck($this) {
|
|
190
|
-
return $this.
|
|
198
|
+
return $this.g4a_1.e44($this, format$factory_0());
|
|
191
199
|
}
|
|
192
200
|
function _get_languages__ojonze_0($this) {
|
|
193
|
-
return $this.
|
|
201
|
+
return $this.h4a_1.e44($this, languages$factory_2());
|
|
194
202
|
}
|
|
195
203
|
function Convert_0(block) {
|
|
196
204
|
CommonOptions.call(this);
|
|
197
|
-
this.
|
|
205
|
+
this.f4a_1 = block;
|
|
198
206
|
var tmp = this;
|
|
199
207
|
// Inline function 'com.github.ajalt.clikt.parameters.types.enum' call
|
|
200
208
|
var this_0 = argument(this, VOID, 'Input format');
|
|
@@ -214,21 +222,21 @@
|
|
|
214
222
|
var tmp$ret$2 = element.p2_1;
|
|
215
223
|
destination.m2(tmp$ret$2, element);
|
|
216
224
|
}
|
|
217
|
-
tmp.
|
|
218
|
-
this.
|
|
225
|
+
tmp.g4a_1 = choice_0(this_0, destination, true).k43(this, format$factory());
|
|
226
|
+
this.h4a_1 = multiple(choice(option(this, Options_Language_getInstance().a48_1.slice(), 'Language'), Companion_instance.x2e(), VOID, true), listOf(Language_Wirespec_getInstance())).p44(this, languages$factory_1());
|
|
219
227
|
}
|
|
220
|
-
protoOf(Convert_0).
|
|
221
|
-
if (this.
|
|
228
|
+
protoOf(Convert_0).t3u = function () {
|
|
229
|
+
if (this.z48() == null)
|
|
222
230
|
null;
|
|
223
231
|
else {
|
|
224
232
|
// Inline function 'kotlin.let' call
|
|
225
233
|
// Inline function 'kotlin.contracts.contract' call
|
|
226
|
-
this.
|
|
234
|
+
this.m3u('To convert, please specify a file', VOID, true);
|
|
227
235
|
}
|
|
228
236
|
// Inline function 'kotlin.let' call
|
|
229
237
|
var tmp = new Convert(_get_format__qlarck(this));
|
|
230
|
-
var tmp_0 = this.
|
|
231
|
-
var tmp_1 = Companion_instance_0.
|
|
238
|
+
var tmp_0 = this.a49(null);
|
|
239
|
+
var tmp_1 = Companion_instance_0.y2e(this.b49());
|
|
232
240
|
// Inline function 'kotlin.collections.ifEmpty' call
|
|
233
241
|
var this_0 = toSet(_get_languages__ojonze_0(this));
|
|
234
242
|
// Inline function 'kotlin.contracts.contract' call
|
|
@@ -240,42 +248,42 @@
|
|
|
240
248
|
tmp_2 = this_0;
|
|
241
249
|
}
|
|
242
250
|
var tmp$ret$2 = tmp_2;
|
|
243
|
-
var this_1 = new CompilerArguments(tmp, tmp_0, tmp_1, tmp$ret$2, _PackageName___init__impl__s13tbs(this.
|
|
251
|
+
var this_1 = new CompilerArguments(tmp, tmp_0, tmp_1, tmp$ret$2, _PackageName___init__impl__s13tbs(this.c49()), this.e49(this.d49()), this.f49(), this.g49());
|
|
244
252
|
// Inline function 'kotlin.contracts.contract' call
|
|
245
|
-
this.
|
|
253
|
+
this.f4a_1(this_1);
|
|
246
254
|
};
|
|
247
255
|
function _get_inputFile__x1bqj($this) {
|
|
248
|
-
return $this.
|
|
256
|
+
return $this.s48_1.e44($this, inputFile$factory_0());
|
|
249
257
|
}
|
|
250
258
|
function CommonOptions() {
|
|
251
259
|
CliktCommand.call(this);
|
|
252
|
-
this.
|
|
253
|
-
this.
|
|
254
|
-
this.
|
|
255
|
-
this.
|
|
256
|
-
this.
|
|
257
|
-
this.
|
|
258
|
-
this.
|
|
259
|
-
}
|
|
260
|
-
protoOf(CommonOptions).
|
|
261
|
-
return this.
|
|
260
|
+
this.s48_1 = option(this, Options_InputFile_getInstance().a48_1.slice(), 'Input file').p44(this, inputFile$factory());
|
|
261
|
+
this.t48_1 = option(this, Options_InputDir_getInstance().a48_1.slice(), 'Input directory').p44(this, inputDir$factory());
|
|
262
|
+
this.u48_1 = option(this, Options_OutputDir_getInstance().a48_1.slice(), 'Output directory').p44(this, outputDir$factory());
|
|
263
|
+
this.v48_1 = default_0(option(this, Options_PackageName_getInstance().a48_1.slice(), 'Package name'), 'community.flock.wirespec.generated').p44(this, packageName$factory());
|
|
264
|
+
this.w48_1 = default_0(option(this, Options_LogLevel_getInstance().a48_1.slice(), 'Log level: ' + Companion_instance_1.toString()), Level_ERROR_getInstance().toString()).p44(this, logLevel$factory());
|
|
265
|
+
this.x48_1 = flag(option(this, Options_Shared_getInstance().a48_1.slice(), 'Generate shared wirespec code'), [], false).p44(this, shared$factory());
|
|
266
|
+
this.y48_1 = flag(option(this, Options_Strict_getInstance().a48_1.slice(), 'Strict mode'), []).p44(this, strict$factory());
|
|
267
|
+
}
|
|
268
|
+
protoOf(CommonOptions).z48 = function () {
|
|
269
|
+
return this.t48_1.e44(this, inputDir$factory_0());
|
|
262
270
|
};
|
|
263
|
-
protoOf(CommonOptions).
|
|
264
|
-
return this.
|
|
271
|
+
protoOf(CommonOptions).b49 = function () {
|
|
272
|
+
return this.u48_1.e44(this, outputDir$factory_0());
|
|
265
273
|
};
|
|
266
|
-
protoOf(CommonOptions).
|
|
267
|
-
return this.
|
|
274
|
+
protoOf(CommonOptions).c49 = function () {
|
|
275
|
+
return this.v48_1.e44(this, packageName$factory_0());
|
|
268
276
|
};
|
|
269
|
-
protoOf(CommonOptions).
|
|
270
|
-
return this.
|
|
277
|
+
protoOf(CommonOptions).d49 = function () {
|
|
278
|
+
return this.w48_1.e44(this, logLevel$factory_0());
|
|
271
279
|
};
|
|
272
|
-
protoOf(CommonOptions).
|
|
273
|
-
return this.
|
|
280
|
+
protoOf(CommonOptions).f49 = function () {
|
|
281
|
+
return this.x48_1.e44(this, shared$factory_0());
|
|
274
282
|
};
|
|
275
|
-
protoOf(CommonOptions).
|
|
276
|
-
return this.
|
|
283
|
+
protoOf(CommonOptions).g49 = function () {
|
|
284
|
+
return this.y48_1.e44(this, strict$factory_0());
|
|
277
285
|
};
|
|
278
|
-
protoOf(CommonOptions).
|
|
286
|
+
protoOf(CommonOptions).a49 = function (inputDir) {
|
|
279
287
|
var tmp;
|
|
280
288
|
if (!(inputDir == null) && !(_get_inputFile__x1bqj(this) == null)) {
|
|
281
289
|
var message = 'Choose either a file or a directory. Not Both.';
|
|
@@ -288,7 +296,7 @@
|
|
|
288
296
|
} else {
|
|
289
297
|
// Inline function 'kotlin.let' call
|
|
290
298
|
// Inline function 'kotlin.contracts.contract' call
|
|
291
|
-
tmp_0 =
|
|
299
|
+
tmp_0 = Companion_instance_2.m2e(tmp0_safe_receiver);
|
|
292
300
|
}
|
|
293
301
|
var tmp0_elvis_lhs = tmp_0;
|
|
294
302
|
var tmp_1;
|
|
@@ -310,14 +318,38 @@
|
|
|
310
318
|
}
|
|
311
319
|
return tmp;
|
|
312
320
|
};
|
|
321
|
+
protoOf(CommonOptions).e49 = function (_this__u8e3s4) {
|
|
322
|
+
// Inline function 'kotlin.text.uppercase' call
|
|
323
|
+
// Inline function 'kotlin.text.trim' call
|
|
324
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
325
|
+
var tmp;
|
|
326
|
+
switch (toString(trim(isCharSequence(_this__u8e3s4) ? _this__u8e3s4 : THROW_CCE())).toUpperCase()) {
|
|
327
|
+
case 'DEBUG':
|
|
328
|
+
tmp = Level_DEBUG_getInstance();
|
|
329
|
+
break;
|
|
330
|
+
case 'INFO':
|
|
331
|
+
tmp = Level_INFO_getInstance();
|
|
332
|
+
break;
|
|
333
|
+
case 'WARN':
|
|
334
|
+
tmp = Level_WARN_getInstance();
|
|
335
|
+
break;
|
|
336
|
+
case 'ERROR':
|
|
337
|
+
tmp = Level_ERROR_getInstance();
|
|
338
|
+
break;
|
|
339
|
+
default:
|
|
340
|
+
var message = 'Choose one of these log levels: ' + Companion_instance_1.toString();
|
|
341
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
342
|
+
}
|
|
343
|
+
return tmp;
|
|
344
|
+
};
|
|
313
345
|
var Options_InputDir_instance;
|
|
314
346
|
var Options_InputFile_instance;
|
|
315
347
|
var Options_OutputDir_instance;
|
|
316
348
|
var Options_Language_instance;
|
|
317
349
|
var Options_PackageName_instance;
|
|
350
|
+
var Options_LogLevel_instance;
|
|
318
351
|
var Options_Shared_instance;
|
|
319
352
|
var Options_Strict_instance;
|
|
320
|
-
var Options_Debug_instance;
|
|
321
353
|
var Options_entriesInitialized;
|
|
322
354
|
function Options_initEntries() {
|
|
323
355
|
if (Options_entriesInitialized)
|
|
@@ -328,13 +360,13 @@
|
|
|
328
360
|
Options_OutputDir_instance = new Options('OutputDir', 2, ['-o', '--output-dir']);
|
|
329
361
|
Options_Language_instance = new Options('Language', 3, ['-l', '--language']);
|
|
330
362
|
Options_PackageName_instance = new Options('PackageName', 4, ['-p', '--package']);
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
363
|
+
Options_LogLevel_instance = new Options('LogLevel', 5, ['--log-level']);
|
|
364
|
+
Options_Shared_instance = new Options('Shared', 6, ['--shared']);
|
|
365
|
+
Options_Strict_instance = new Options('Strict', 7, ['--strict']);
|
|
334
366
|
}
|
|
335
367
|
function Options(name, ordinal, flags) {
|
|
336
368
|
Enum.call(this, name, ordinal);
|
|
337
|
-
this.
|
|
369
|
+
this.a48_1 = flags;
|
|
338
370
|
}
|
|
339
371
|
function Options_InputDir_getInstance() {
|
|
340
372
|
Options_initEntries();
|
|
@@ -356,6 +388,10 @@
|
|
|
356
388
|
Options_initEntries();
|
|
357
389
|
return Options_PackageName_instance;
|
|
358
390
|
}
|
|
391
|
+
function Options_LogLevel_getInstance() {
|
|
392
|
+
Options_initEntries();
|
|
393
|
+
return Options_LogLevel_instance;
|
|
394
|
+
}
|
|
359
395
|
function Options_Shared_getInstance() {
|
|
360
396
|
Options_initEntries();
|
|
361
397
|
return Options_Shared_instance;
|
|
@@ -364,10 +400,6 @@
|
|
|
364
400
|
Options_initEntries();
|
|
365
401
|
return Options_Strict_instance;
|
|
366
402
|
}
|
|
367
|
-
function Options_Debug_getInstance() {
|
|
368
|
-
Options_initEntries();
|
|
369
|
-
return Options_Debug_instance;
|
|
370
|
-
}
|
|
371
403
|
function languages$factory() {
|
|
372
404
|
return getPropertyCallableRef('languages', 1, KProperty1, function (receiver) {
|
|
373
405
|
return _get_languages__ojonze(receiver);
|
|
@@ -405,32 +437,32 @@
|
|
|
405
437
|
}
|
|
406
438
|
function inputDir$factory() {
|
|
407
439
|
return getPropertyCallableRef('inputDir', 1, KProperty1, function (receiver) {
|
|
408
|
-
return receiver.
|
|
440
|
+
return receiver.z48();
|
|
409
441
|
}, null);
|
|
410
442
|
}
|
|
411
443
|
function outputDir$factory() {
|
|
412
444
|
return getPropertyCallableRef('outputDir', 1, KProperty1, function (receiver) {
|
|
413
|
-
return receiver.
|
|
445
|
+
return receiver.b49();
|
|
414
446
|
}, null);
|
|
415
447
|
}
|
|
416
448
|
function packageName$factory() {
|
|
417
449
|
return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) {
|
|
418
|
-
return receiver.
|
|
450
|
+
return receiver.c49();
|
|
451
|
+
}, null);
|
|
452
|
+
}
|
|
453
|
+
function logLevel$factory() {
|
|
454
|
+
return getPropertyCallableRef('logLevel', 1, KProperty1, function (receiver) {
|
|
455
|
+
return receiver.d49();
|
|
419
456
|
}, null);
|
|
420
457
|
}
|
|
421
458
|
function shared$factory() {
|
|
422
459
|
return getPropertyCallableRef('shared', 1, KProperty1, function (receiver) {
|
|
423
|
-
return receiver.
|
|
460
|
+
return receiver.f49();
|
|
424
461
|
}, null);
|
|
425
462
|
}
|
|
426
463
|
function strict$factory() {
|
|
427
464
|
return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) {
|
|
428
|
-
return receiver.
|
|
429
|
-
}, null);
|
|
430
|
-
}
|
|
431
|
-
function debug$factory() {
|
|
432
|
-
return getPropertyCallableRef('debug', 1, KProperty1, function (receiver) {
|
|
433
|
-
return receiver.l48();
|
|
465
|
+
return receiver.g49();
|
|
434
466
|
}, null);
|
|
435
467
|
}
|
|
436
468
|
function inputFile$factory_0() {
|
|
@@ -440,32 +472,32 @@
|
|
|
440
472
|
}
|
|
441
473
|
function inputDir$factory_0() {
|
|
442
474
|
return getPropertyCallableRef('inputDir', 1, KProperty1, function (receiver) {
|
|
443
|
-
return receiver.
|
|
475
|
+
return receiver.z48();
|
|
444
476
|
}, null);
|
|
445
477
|
}
|
|
446
478
|
function outputDir$factory_0() {
|
|
447
479
|
return getPropertyCallableRef('outputDir', 1, KProperty1, function (receiver) {
|
|
448
|
-
return receiver.
|
|
480
|
+
return receiver.b49();
|
|
449
481
|
}, null);
|
|
450
482
|
}
|
|
451
483
|
function packageName$factory_0() {
|
|
452
484
|
return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) {
|
|
453
|
-
return receiver.
|
|
485
|
+
return receiver.c49();
|
|
486
|
+
}, null);
|
|
487
|
+
}
|
|
488
|
+
function logLevel$factory_0() {
|
|
489
|
+
return getPropertyCallableRef('logLevel', 1, KProperty1, function (receiver) {
|
|
490
|
+
return receiver.d49();
|
|
454
491
|
}, null);
|
|
455
492
|
}
|
|
456
493
|
function shared$factory_0() {
|
|
457
494
|
return getPropertyCallableRef('shared', 1, KProperty1, function (receiver) {
|
|
458
|
-
return receiver.
|
|
495
|
+
return receiver.f49();
|
|
459
496
|
}, null);
|
|
460
497
|
}
|
|
461
498
|
function strict$factory_0() {
|
|
462
499
|
return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) {
|
|
463
|
-
return receiver.
|
|
464
|
-
}, null);
|
|
465
|
-
}
|
|
466
|
-
function debug$factory_0() {
|
|
467
|
-
return getPropertyCallableRef('debug', 1, KProperty1, function (receiver) {
|
|
468
|
-
return receiver.l48();
|
|
500
|
+
return receiver.g49();
|
|
469
501
|
}, null);
|
|
470
502
|
}
|
|
471
503
|
function main(args) {
|
|
@@ -490,30 +522,30 @@
|
|
|
490
522
|
}
|
|
491
523
|
}
|
|
492
524
|
var this_1 = copyToArray(destination);
|
|
493
|
-
var tmp =
|
|
525
|
+
var tmp = Companion_instance_4;
|
|
494
526
|
var tmp_0 = compile$ref();
|
|
495
527
|
// Inline function 'kotlin.contracts.contract' call
|
|
496
|
-
tmp.
|
|
528
|
+
tmp.x46(tmp_0, convert$ref())(this_1);
|
|
497
529
|
}
|
|
498
530
|
function compile_0(arguments_0) {
|
|
499
|
-
var input = arguments_0.
|
|
500
|
-
var output = arguments_0.
|
|
501
|
-
var languages = arguments_0.
|
|
502
|
-
var packageName = arguments_0.
|
|
503
|
-
var logger = new Logger(arguments_0.
|
|
504
|
-
var operation = arguments_0.
|
|
531
|
+
var input = arguments_0.d2e_1;
|
|
532
|
+
var output = arguments_0.e2e_1;
|
|
533
|
+
var languages = arguments_0.f2e_1;
|
|
534
|
+
var packageName = arguments_0.g2e_1;
|
|
535
|
+
var logger = new Logger(arguments_0.h2e_1);
|
|
536
|
+
var operation = arguments_0.c2e_1;
|
|
505
537
|
if (operation instanceof Convert) {
|
|
506
538
|
var fullPath = input instanceof FullFilePath ? input : THROW_CCE();
|
|
507
539
|
var file = new JsonFile(fullPath);
|
|
508
|
-
var strict = arguments_0.
|
|
509
|
-
var format = operation.
|
|
540
|
+
var strict = arguments_0.j2e_1;
|
|
541
|
+
var format = operation.l2e_1;
|
|
510
542
|
var tmp;
|
|
511
543
|
switch (format.q2_1) {
|
|
512
544
|
case 0:
|
|
513
|
-
tmp = OpenApiV2Parser_instance.
|
|
545
|
+
tmp = OpenApiV2Parser_instance.o2f(file.y1a(), !strict);
|
|
514
546
|
break;
|
|
515
547
|
case 1:
|
|
516
|
-
tmp = OpenApiV3Parser_instance.
|
|
548
|
+
tmp = OpenApiV3Parser_instance.o2f(file.y1a(), !strict);
|
|
517
549
|
break;
|
|
518
550
|
default:
|
|
519
551
|
noWhenBranchMatchedException();
|
|
@@ -532,11 +564,11 @@
|
|
|
532
564
|
// Inline function 'community.flock.wirespec.plugin.cli.compile.<anonymous>' call
|
|
533
565
|
var emitter = item.od();
|
|
534
566
|
var file_0 = item.pd();
|
|
535
|
-
var results = emitter.
|
|
567
|
+
var results = emitter.o22(ast);
|
|
536
568
|
var tmp_0;
|
|
537
|
-
if (!emitter.
|
|
569
|
+
if (!emitter.n22_1) {
|
|
538
570
|
// Inline function 'kotlin.text.replaceFirstChar' call
|
|
539
|
-
var this_1 = _FileName___get_value__impl__3u4cz6(fullPath.
|
|
571
|
+
var this_1 = _FileName___get_value__impl__3u4cz6(fullPath.r2e_1);
|
|
540
572
|
var tmp_1;
|
|
541
573
|
// Inline function 'kotlin.text.isNotEmpty' call
|
|
542
574
|
if (charSequenceLength(this_1) > 0) {
|
|
@@ -553,7 +585,7 @@
|
|
|
553
585
|
tmp_1 = this_1;
|
|
554
586
|
}
|
|
555
587
|
var tmp$ret$6 = tmp_1;
|
|
556
|
-
tmp_0 = to(listOf(new Emitted(tmp$ret$6, first(results).
|
|
588
|
+
tmp_0 = to(listOf(new Emitted(tmp$ret$6, first(results).w24_1)), file_0);
|
|
557
589
|
} else {
|
|
558
590
|
tmp_0 = to(results, file_0);
|
|
559
591
|
}
|
|
@@ -577,19 +609,19 @@
|
|
|
577
609
|
} else {
|
|
578
610
|
if (input instanceof FullDirPath) {
|
|
579
611
|
// Inline function 'kotlin.collections.forEach' call
|
|
580
|
-
var tmp0_iterator_1 = (new Directory(input.
|
|
612
|
+
var tmp0_iterator_1 = (new Directory(input.w2e_1)).k4a().g();
|
|
581
613
|
while (tmp0_iterator_1.h()) {
|
|
582
614
|
var element = tmp0_iterator_1.i();
|
|
583
615
|
// Inline function 'community.flock.wirespec.plugin.cli.compile.<anonymous>' call
|
|
584
|
-
wirespec(element, languages, packageName, out(element.
|
|
616
|
+
wirespec(element, languages, packageName, out(element.i4a_1, packageName, output), logger);
|
|
585
617
|
}
|
|
586
618
|
} else {
|
|
587
619
|
if (input instanceof FullFilePath)
|
|
588
|
-
if (input.
|
|
620
|
+
if (input.s2e_1.equals(FileExtension_Wirespec_getInstance())) {
|
|
589
621
|
// Inline function 'kotlin.let' call
|
|
590
622
|
// Inline function 'kotlin.contracts.contract' call
|
|
591
623
|
var it = new WirespecFile(input);
|
|
592
|
-
wirespec(it, languages, packageName, out(it.
|
|
624
|
+
wirespec(it, languages, packageName, out(it.i4a_1, packageName, output), logger);
|
|
593
625
|
} else {
|
|
594
626
|
// Inline function 'kotlin.error' call
|
|
595
627
|
var message = 'Path ' + input.toString() + ' is not a Wirespec file';
|
|
@@ -619,12 +651,12 @@
|
|
|
619
651
|
// Inline function 'community.flock.wirespec.plugin.cli.write.<anonymous>' call
|
|
620
652
|
var name = element.od();
|
|
621
653
|
var result = element.pd();
|
|
622
|
-
var
|
|
654
|
+
var tmp15_safe_receiver = file == null ? null : file.l4a(_FileName___init__impl__nzn12e(name));
|
|
623
655
|
var tmp;
|
|
624
|
-
if (
|
|
656
|
+
if (tmp15_safe_receiver == null) {
|
|
625
657
|
tmp = null;
|
|
626
658
|
} else {
|
|
627
|
-
|
|
659
|
+
tmp15_safe_receiver.s18(result);
|
|
628
660
|
tmp = Unit_instance;
|
|
629
661
|
}
|
|
630
662
|
if (tmp == null) {
|
|
@@ -672,7 +704,7 @@
|
|
|
672
704
|
tmp = to(tmp_2, tmp_3);
|
|
673
705
|
break;
|
|
674
706
|
case 2:
|
|
675
|
-
var tmp_4 = new
|
|
707
|
+
var tmp_4 = new KotlinLegacyEmitter(packageString, logger);
|
|
676
708
|
var tmp_5;
|
|
677
709
|
if (path == null) {
|
|
678
710
|
tmp_5 = null;
|
|
@@ -680,13 +712,13 @@
|
|
|
680
712
|
// Inline function 'kotlin.let' call
|
|
681
713
|
// Inline function 'kotlin.contracts.contract' call
|
|
682
714
|
// Inline function 'community.flock.wirespec.plugin.cli.emitters.<anonymous>.<anonymous>' call
|
|
683
|
-
tmp_5 = new
|
|
715
|
+
tmp_5 = new KotlinFile(path(FileExtension_Kotlin_getInstance()));
|
|
684
716
|
}
|
|
685
717
|
|
|
686
718
|
tmp = to(tmp_4, tmp_5);
|
|
687
719
|
break;
|
|
688
720
|
case 3:
|
|
689
|
-
var tmp_6 = new
|
|
721
|
+
var tmp_6 = new ScalaEmitter(packageString, logger);
|
|
690
722
|
var tmp_7;
|
|
691
723
|
if (path == null) {
|
|
692
724
|
tmp_7 = null;
|
|
@@ -694,13 +726,13 @@
|
|
|
694
726
|
// Inline function 'kotlin.let' call
|
|
695
727
|
// Inline function 'kotlin.contracts.contract' call
|
|
696
728
|
// Inline function 'community.flock.wirespec.plugin.cli.emitters.<anonymous>.<anonymous>' call
|
|
697
|
-
tmp_7 = new
|
|
729
|
+
tmp_7 = new ScalaFile(path(FileExtension_Scala_getInstance()));
|
|
698
730
|
}
|
|
699
731
|
|
|
700
732
|
tmp = to(tmp_6, tmp_7);
|
|
701
733
|
break;
|
|
702
734
|
case 4:
|
|
703
|
-
var tmp_8 = new
|
|
735
|
+
var tmp_8 = new TypeScriptEmitter(logger);
|
|
704
736
|
var tmp_9;
|
|
705
737
|
if (path == null) {
|
|
706
738
|
tmp_9 = null;
|
|
@@ -708,17 +740,31 @@
|
|
|
708
740
|
// Inline function 'kotlin.let' call
|
|
709
741
|
// Inline function 'kotlin.contracts.contract' call
|
|
710
742
|
// Inline function 'community.flock.wirespec.plugin.cli.emitters.<anonymous>.<anonymous>' call
|
|
711
|
-
tmp_9 = new
|
|
743
|
+
tmp_9 = new TypeScriptFile(path(FileExtension_TypeScript_getInstance()));
|
|
712
744
|
}
|
|
713
745
|
|
|
714
746
|
tmp = to(tmp_8, tmp_9);
|
|
715
747
|
break;
|
|
748
|
+
case 5:
|
|
749
|
+
var tmp_10 = new WirespecEmitter(logger);
|
|
750
|
+
var tmp_11;
|
|
751
|
+
if (path == null) {
|
|
752
|
+
tmp_11 = null;
|
|
753
|
+
} else {
|
|
754
|
+
// Inline function 'kotlin.let' call
|
|
755
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
756
|
+
// Inline function 'community.flock.wirespec.plugin.cli.emitters.<anonymous>.<anonymous>' call
|
|
757
|
+
tmp_11 = new WirespecFile(path(FileExtension_Wirespec_getInstance()));
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
tmp = to(tmp_10, tmp_11);
|
|
761
|
+
break;
|
|
716
762
|
default:
|
|
717
763
|
noWhenBranchMatchedException();
|
|
718
764
|
break;
|
|
719
765
|
}
|
|
720
|
-
var tmp$ret$
|
|
721
|
-
destination.e(tmp$ret$
|
|
766
|
+
var tmp$ret$12 = tmp;
|
|
767
|
+
destination.e(tmp$ret$12);
|
|
722
768
|
}
|
|
723
769
|
return destination;
|
|
724
770
|
}
|
|
@@ -744,7 +790,7 @@
|
|
|
744
790
|
var file = item.pd();
|
|
745
791
|
var results = this_1(emitter);
|
|
746
792
|
var tmp;
|
|
747
|
-
if (!emitter.
|
|
793
|
+
if (!emitter.n22_1) {
|
|
748
794
|
// Inline function 'arrow.core.Either.map' call
|
|
749
795
|
// Inline function 'kotlin.contracts.contract' call
|
|
750
796
|
// Inline function 'arrow.core.flatMap' call
|
|
@@ -754,7 +800,7 @@
|
|
|
754
800
|
// Inline function 'arrow.core.Either.map.<anonymous>' call
|
|
755
801
|
// Inline function 'community.flock.wirespec.plugin.cli.wirespec.<anonymous>.<anonymous>.<anonymous>' call
|
|
756
802
|
var it = results.zj_1;
|
|
757
|
-
var tmp$ret$2 = listOf(new Emitted(Companion_getInstance().
|
|
803
|
+
var tmp$ret$2 = listOf(new Emitted(Companion_getInstance().h23(_FileName___get_value__impl__3u4cz6(path(FileExtension_Wirespec_getInstance()).r2e_1)), first(it).w24_1));
|
|
758
804
|
tmp_0 = new Right(tmp$ret$2);
|
|
759
805
|
} else {
|
|
760
806
|
if (results instanceof Left) {
|
|
@@ -809,7 +855,7 @@
|
|
|
809
855
|
function compile$lambda($output) {
|
|
810
856
|
return function (it) {
|
|
811
857
|
var tmp = $output;
|
|
812
|
-
return new FullFilePath(_Output___get_value__impl__a8kw1g(ensureNotNull(tmp == null ? null : new Output(tmp)).
|
|
858
|
+
return new FullFilePath(_Output___get_value__impl__a8kw1g(ensureNotNull(tmp == null ? null : new Output(tmp)).z2e_1), _FileName___init__impl__nzn12e('console'), it);
|
|
813
859
|
};
|
|
814
860
|
}
|
|
815
861
|
function out$lambda($output, $this_out, $packageName) {
|
|
@@ -821,49 +867,49 @@
|
|
|
821
867
|
// Inline function 'kotlin.text.lowercase' call
|
|
822
868
|
// Inline function 'kotlin.js.asDynamic' call
|
|
823
869
|
var tmp$ret$1 = extension.p2_1.toLowerCase();
|
|
824
|
-
tmp = $this_out.
|
|
870
|
+
tmp = $this_out.q2e_1 + '/out/' + tmp$ret$1;
|
|
825
871
|
} else {
|
|
826
872
|
tmp = new Output(tmp0_elvis_lhs);
|
|
827
873
|
}
|
|
828
874
|
var dir = tmp;
|
|
829
|
-
return $this_out.
|
|
875
|
+
return $this_out.u2e(toString(dir) + '/' + joinToString(split(_PackageName___get_value__impl__2zr98c($packageName), charArrayOf([_Char___init__impl__6a9atx(46)])), '/'), VOID, extension);
|
|
830
876
|
};
|
|
831
877
|
}
|
|
832
878
|
function JavaFile(path) {
|
|
833
|
-
File.call(this, path.
|
|
879
|
+
File.call(this, path.u2e(VOID, VOID, FileExtension_Java_getInstance()));
|
|
834
880
|
}
|
|
835
|
-
protoOf(JavaFile).
|
|
836
|
-
return new JavaFile(this.
|
|
881
|
+
protoOf(JavaFile).l4a = function (fileName) {
|
|
882
|
+
return new JavaFile(this.i4a_1.u2e(VOID, fileName));
|
|
837
883
|
};
|
|
838
884
|
function JsonFile(path) {
|
|
839
|
-
File.call(this, path.
|
|
885
|
+
File.call(this, path.u2e(VOID, VOID, FileExtension_Json_getInstance()));
|
|
840
886
|
}
|
|
841
|
-
protoOf(JsonFile).
|
|
842
|
-
return new JsonFile(this.
|
|
887
|
+
protoOf(JsonFile).l4a = function (fileName) {
|
|
888
|
+
return new JsonFile(this.i4a_1.u2e(VOID, fileName));
|
|
843
889
|
};
|
|
844
890
|
function KotlinFile(path) {
|
|
845
|
-
File.call(this, path.
|
|
891
|
+
File.call(this, path.u2e(VOID, VOID, FileExtension_Kotlin_getInstance()));
|
|
846
892
|
}
|
|
847
|
-
protoOf(KotlinFile).
|
|
848
|
-
return new KotlinFile(this.
|
|
893
|
+
protoOf(KotlinFile).l4a = function (fileName) {
|
|
894
|
+
return new KotlinFile(this.i4a_1.u2e(VOID, fileName));
|
|
849
895
|
};
|
|
850
896
|
function ScalaFile(path) {
|
|
851
|
-
File.call(this, path.
|
|
897
|
+
File.call(this, path.u2e(VOID, VOID, FileExtension_Scala_getInstance()));
|
|
852
898
|
}
|
|
853
|
-
protoOf(ScalaFile).
|
|
854
|
-
return new ScalaFile(this.
|
|
899
|
+
protoOf(ScalaFile).l4a = function (fileName) {
|
|
900
|
+
return new ScalaFile(this.i4a_1.u2e(VOID, fileName));
|
|
855
901
|
};
|
|
856
902
|
function TypeScriptFile(path) {
|
|
857
|
-
File.call(this, path.
|
|
903
|
+
File.call(this, path.u2e(VOID, VOID, FileExtension_TypeScript_getInstance()));
|
|
858
904
|
}
|
|
859
|
-
protoOf(TypeScriptFile).
|
|
860
|
-
return new TypeScriptFile(this.
|
|
905
|
+
protoOf(TypeScriptFile).l4a = function (fileName) {
|
|
906
|
+
return new TypeScriptFile(this.i4a_1.u2e(VOID, fileName));
|
|
861
907
|
};
|
|
862
908
|
function WirespecFile(path) {
|
|
863
|
-
File.call(this, path.
|
|
909
|
+
File.call(this, path.u2e(VOID, VOID, FileExtension_Wirespec_getInstance()));
|
|
864
910
|
}
|
|
865
|
-
protoOf(WirespecFile).
|
|
866
|
-
return new WirespecFile(this.
|
|
911
|
+
protoOf(WirespecFile).l4a = function (fileName) {
|
|
912
|
+
return new WirespecFile(this.i4a_1.u2e(VOID, fileName));
|
|
867
913
|
};
|
|
868
914
|
function cli(args) {
|
|
869
915
|
main(args);
|
|
@@ -926,14 +972,14 @@
|
|
|
926
972
|
return it;
|
|
927
973
|
}
|
|
928
974
|
function Directory$wirespecFiles$lambda_0(it) {
|
|
929
|
-
return endsWith(it, FileExtension_Wirespec_getInstance().
|
|
975
|
+
return endsWith(it, FileExtension_Wirespec_getInstance().p2e_1);
|
|
930
976
|
}
|
|
931
977
|
function Directory$wirespecFiles$lambda_1(it) {
|
|
932
|
-
return dropLast(it, FileExtension_Wirespec_getInstance().
|
|
978
|
+
return dropLast(it, FileExtension_Wirespec_getInstance().p2e_1.length + 1 | 0);
|
|
933
979
|
}
|
|
934
980
|
function Directory$wirespecFiles$lambda_2(this$0) {
|
|
935
981
|
return function (it) {
|
|
936
|
-
return new FullFilePath(this$0.
|
|
982
|
+
return new FullFilePath(this$0.j4a_1, _FileName___init__impl__nzn12e(it));
|
|
937
983
|
};
|
|
938
984
|
}
|
|
939
985
|
function WirespecFile$_init_$ref_cj1n5j() {
|
|
@@ -944,10 +990,10 @@
|
|
|
944
990
|
return l;
|
|
945
991
|
}
|
|
946
992
|
function Directory(path) {
|
|
947
|
-
this.
|
|
993
|
+
this.j4a_1 = path;
|
|
948
994
|
}
|
|
949
|
-
protoOf(Directory).
|
|
950
|
-
var tmp = asSequence(iterator(get_fs().readdirSync(this.
|
|
995
|
+
protoOf(Directory).k4a = function () {
|
|
996
|
+
var tmp = asSequence(iterator(get_fs().readdirSync(this.j4a_1, 'utf-8')));
|
|
951
997
|
var tmp_0 = map(tmp, Directory$wirespecFiles$lambda);
|
|
952
998
|
var tmp_1 = filter(tmp_0, Directory$wirespecFiles$lambda_0);
|
|
953
999
|
var tmp_2 = map(tmp_1, Directory$wirespecFiles$lambda_1);
|
|
@@ -955,20 +1001,20 @@
|
|
|
955
1001
|
return toSet_0(map(tmp_3, WirespecFile$_init_$ref_cj1n5j()));
|
|
956
1002
|
};
|
|
957
1003
|
function File(path) {
|
|
958
|
-
this.
|
|
1004
|
+
this.i4a_1 = path;
|
|
959
1005
|
}
|
|
960
1006
|
protoOf(File).y1a = function () {
|
|
961
1007
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
962
|
-
return get_fs().readFileSync(this.
|
|
1008
|
+
return get_fs().readFileSync(this.i4a_1.toString(), 'utf-8');
|
|
963
1009
|
};
|
|
964
1010
|
protoOf(File).s18 = function (text) {
|
|
965
1011
|
// Inline function 'kotlin.run' call
|
|
966
1012
|
// Inline function 'kotlin.contracts.contract' call
|
|
967
1013
|
// Inline function 'community.flock.wirespec.plugin.cli.io.File.write.<anonymous>' call
|
|
968
|
-
var $this$run = this.
|
|
1014
|
+
var $this$run = this.i4a_1.u2e(joinToString(split_0(this.i4a_1.q2e_1, ['out']), 'out/node'));
|
|
969
1015
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
970
|
-
if (!get_fs().existsSync($this$run.
|
|
971
|
-
get_fs().mkdirSync($this$run.
|
|
1016
|
+
if (!get_fs().existsSync($this$run.q2e_1)) {
|
|
1017
|
+
get_fs().mkdirSync($this$run.q2e_1, {recursive: true});
|
|
972
1018
|
}
|
|
973
1019
|
get_fs().writeFileSync($this$run.toString(), text);
|
|
974
1020
|
};
|
|
@@ -1029,7 +1075,7 @@
|
|
|
1029
1075
|
}
|
|
1030
1076
|
}
|
|
1031
1077
|
//region block: init
|
|
1032
|
-
|
|
1078
|
+
Companion_instance_4 = new Companion();
|
|
1033
1079
|
//endregion
|
|
1034
1080
|
//region block: exports
|
|
1035
1081
|
function $jsExportAll$(_) {
|