@flock/wirespec 0.10.19 → 0.10.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/clikt-clikt.js +1167 -1167
- package/colormath-root-colormath.js +425 -425
- package/kotlin-kotlin-stdlib.js +6 -6
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlin-rgxgen.js +1767 -1767
- package/markdown.js +1885 -1885
- package/mordant-mordant.js +1641 -1641
- package/package.json +1 -1
- package/wirespec-src-compiler-core.js +1232 -1184
- package/wirespec-src-compiler-core.js.map +1 -1
- package/wirespec-src-compiler-lib.js +308 -308
- package/wirespec-src-compiler-lib.js.map +1 -1
- package/wirespec-src-converter-openapi.js +561 -416
- package/wirespec-src-converter-openapi.js.map +1 -1
- package/wirespec-src-plugin-arguments.js +91 -79
- package/wirespec-src-plugin-arguments.js.map +1 -1
- package/wirespec-src-plugin-cli.js +158 -128
- package/wirespec-src-plugin-cli.js.map +1 -1
- package/wirespec-src-plugin-npm.js +22 -22
- package/wirespec-src-plugin-npm.js.map +1 -1
- package/wirespec-src-tools-generator.js +21 -21
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
var setOf = kotlin_kotlin.$_$.u7;
|
|
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.$_$.
|
|
62
|
-
var Level_ERROR_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
61
|
+
var Companion_instance_1 = kotlin_community_flock_wirespec_compiler_core.$_$.g2;
|
|
62
|
+
var Level_ERROR_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.z1;
|
|
63
63
|
var flag = kotlin_clikt_clikt.$_$.f;
|
|
64
64
|
var Companion_instance_2 = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.w;
|
|
65
65
|
var FullDirPath = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.d;
|
|
@@ -69,16 +69,16 @@
|
|
|
69
69
|
var THROW_CCE = kotlin_kotlin.$_$.if;
|
|
70
70
|
var isCharSequence = kotlin_kotlin.$_$.ha;
|
|
71
71
|
var trim = kotlin_kotlin.$_$.pe;
|
|
72
|
-
var Level_DEBUG_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
73
|
-
var Level_INFO_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
74
|
-
var Level_WARN_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
72
|
+
var Level_DEBUG_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.y1;
|
|
73
|
+
var Level_INFO_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.a2;
|
|
74
|
+
var Level_WARN_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.b2;
|
|
75
75
|
var Enum = kotlin_kotlin.$_$.ye;
|
|
76
76
|
var KProperty1 = kotlin_kotlin.$_$.sb;
|
|
77
77
|
var getPropertyCallableRef = kotlin_kotlin.$_$.u9;
|
|
78
78
|
var numberRangeToNumber = kotlin_kotlin.$_$.ra;
|
|
79
79
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.l;
|
|
80
80
|
var copyToArray = kotlin_kotlin.$_$.x5;
|
|
81
|
-
var Logger = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
81
|
+
var Logger = kotlin_community_flock_wirespec_compiler_core.$_$.k1;
|
|
82
82
|
var noWhenBranchMatchedException = kotlin_kotlin.$_$.eg;
|
|
83
83
|
var FileExtension_Wirespec_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.o;
|
|
84
84
|
var FullFilePath = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.e;
|
|
@@ -98,18 +98,21 @@
|
|
|
98
98
|
var _FileName___init__impl__nzn12e = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.q;
|
|
99
99
|
var print = kotlin_kotlin.$_$.d9;
|
|
100
100
|
var PackageName = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.i;
|
|
101
|
-
var component1 = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
102
|
-
var JavaEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
101
|
+
var component1 = kotlin_community_flock_wirespec_compiler_core.$_$.i1;
|
|
102
|
+
var JavaEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.c;
|
|
103
103
|
var FileExtension_Java_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.j;
|
|
104
|
-
var KotlinEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
104
|
+
var KotlinEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.d;
|
|
105
105
|
var FileExtension_Kotlin_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.l;
|
|
106
|
-
var ScalaEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
106
|
+
var ScalaEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.e;
|
|
107
107
|
var FileExtension_Scala_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.m;
|
|
108
|
-
var TypeScriptEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
108
|
+
var TypeScriptEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.f;
|
|
109
109
|
var FileExtension_TypeScript_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.n;
|
|
110
|
-
var WirespecEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.
|
|
111
|
-
var
|
|
112
|
-
var
|
|
110
|
+
var WirespecEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.g;
|
|
111
|
+
var OpenApiV2Emitter_getInstance = kotlin_community_flock_wirespec_converter_openapi.$_$.a;
|
|
112
|
+
var FileExtension_Json_getInstance = kotlin_community_flock_wirespec_plugin_arguments_arguments.$_$.k;
|
|
113
|
+
var OpenApiV3Emitter_getInstance = kotlin_community_flock_wirespec_converter_openapi.$_$.c;
|
|
114
|
+
var WirespecSpec_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.f2;
|
|
115
|
+
var compile = kotlin_community_flock_wirespec_compiler_core.$_$.h1;
|
|
113
116
|
var Left = kotlin_io_arrow_kt_arrow_core.$_$.d;
|
|
114
117
|
var Companion_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.d2;
|
|
115
118
|
var Right = kotlin_io_arrow_kt_arrow_core.$_$.e;
|
|
@@ -122,10 +125,9 @@
|
|
|
122
125
|
var charArrayOf = kotlin_kotlin.$_$.j9;
|
|
123
126
|
var split = kotlin_kotlin.$_$.nd;
|
|
124
127
|
var joinToString = kotlin_kotlin.$_$.s6;
|
|
125
|
-
var
|
|
126
|
-
var
|
|
127
|
-
var
|
|
128
|
-
var Definition = kotlin_community_flock_wirespec_compiler_core.$_$.j;
|
|
128
|
+
var parse = kotlin_community_flock_wirespec_compiler_core.$_$.j1;
|
|
129
|
+
var get_noLogger = kotlin_community_flock_wirespec_compiler_core.$_$.l1;
|
|
130
|
+
var Definition = kotlin_community_flock_wirespec_compiler_core.$_$.k;
|
|
129
131
|
var isInterface = kotlin_kotlin.$_$.la;
|
|
130
132
|
var produce = kotlin_community_flock_wirespec_compiler_lib.$_$.e;
|
|
131
133
|
var endsWith = kotlin_kotlin.$_$.nc;
|
|
@@ -161,7 +163,7 @@
|
|
|
161
163
|
//endregion
|
|
162
164
|
function WirespecCli$main$ref($boundThis) {
|
|
163
165
|
var l = function (p0) {
|
|
164
|
-
$boundThis.
|
|
166
|
+
$boundThis.k3q(p0);
|
|
165
167
|
return Unit_instance;
|
|
166
168
|
};
|
|
167
169
|
l.callableName = 'main';
|
|
@@ -169,7 +171,7 @@
|
|
|
169
171
|
}
|
|
170
172
|
function Companion() {
|
|
171
173
|
}
|
|
172
|
-
protoOf(Companion).
|
|
174
|
+
protoOf(Companion).p42 = function (compile, convert) {
|
|
173
175
|
return WirespecCli$main$ref(subcommands(new WirespecCli(), [new Compile_0(compile), new Convert_0(convert)]));
|
|
174
176
|
};
|
|
175
177
|
var Companion_instance_4;
|
|
@@ -180,28 +182,28 @@
|
|
|
180
182
|
NoOpCliktCommand.call(this, VOID, VOID, 'wirespec');
|
|
181
183
|
}
|
|
182
184
|
function _get_languages__ojonze($this) {
|
|
183
|
-
return $this.
|
|
185
|
+
return $this.p43_1.w3z($this, languages$factory_0());
|
|
184
186
|
}
|
|
185
187
|
function Compile_0(block) {
|
|
186
188
|
CommonOptions.call(this);
|
|
187
|
-
this.
|
|
188
|
-
this.
|
|
189
|
+
this.o43_1 = block;
|
|
190
|
+
this.p43_1 = multiple(choice(option(this, Options_Language_getInstance().s43_1.slice(), 'Language'), Companion_instance.w2b()), VOID, true).h40(this, languages$factory());
|
|
189
191
|
}
|
|
190
|
-
protoOf(Compile_0).
|
|
192
|
+
protoOf(Compile_0).l3q = function () {
|
|
191
193
|
// Inline function 'kotlin.let' call
|
|
192
|
-
var this_0 = new CompilerArguments(Compile_instance, this.
|
|
194
|
+
var this_0 = new CompilerArguments(Compile_instance, this.s44(this.r44()), Companion_instance_0.x2b(this.t44()), toSet(_get_languages__ojonze(this)), _PackageName___init__impl__s13tbs(this.u44()), this.w44(this.v44()), this.x44(), this.y44());
|
|
193
195
|
// Inline function 'kotlin.contracts.contract' call
|
|
194
|
-
this.
|
|
196
|
+
this.o43_1(this_0);
|
|
195
197
|
};
|
|
196
198
|
function _get_format__qlarck($this) {
|
|
197
|
-
return $this.
|
|
199
|
+
return $this.y45_1.w3z($this, format$factory_0());
|
|
198
200
|
}
|
|
199
201
|
function _get_languages__ojonze_0($this) {
|
|
200
|
-
return $this.
|
|
202
|
+
return $this.z45_1.w3z($this, languages$factory_2());
|
|
201
203
|
}
|
|
202
204
|
function Convert_0(block) {
|
|
203
205
|
CommonOptions.call(this);
|
|
204
|
-
this.
|
|
206
|
+
this.x45_1 = block;
|
|
205
207
|
var tmp = this;
|
|
206
208
|
// Inline function 'com.github.ajalt.clikt.parameters.types.enum' call
|
|
207
209
|
var this_0 = argument(this, VOID, 'Input format');
|
|
@@ -221,21 +223,21 @@
|
|
|
221
223
|
var tmp$ret$2 = element.p2_1;
|
|
222
224
|
destination.m2(tmp$ret$2, element);
|
|
223
225
|
}
|
|
224
|
-
tmp.
|
|
225
|
-
this.
|
|
226
|
+
tmp.y45_1 = choice_0(this_0, destination, true).c3z(this, format$factory());
|
|
227
|
+
this.z45_1 = multiple(choice(option(this, Options_Language_getInstance().s43_1.slice(), 'Language'), Companion_instance.w2b(), VOID, true), listOf(Language_Wirespec_getInstance())).h40(this, languages$factory_1());
|
|
226
228
|
}
|
|
227
|
-
protoOf(Convert_0).
|
|
228
|
-
if (this.
|
|
229
|
+
protoOf(Convert_0).l3q = function () {
|
|
230
|
+
if (this.r44() == null)
|
|
229
231
|
null;
|
|
230
232
|
else {
|
|
231
233
|
// Inline function 'kotlin.let' call
|
|
232
234
|
// Inline function 'kotlin.contracts.contract' call
|
|
233
|
-
this.
|
|
235
|
+
this.e3q('To convert, please specify a file', VOID, true);
|
|
234
236
|
}
|
|
235
237
|
// Inline function 'kotlin.let' call
|
|
236
238
|
var tmp = new Convert(_get_format__qlarck(this));
|
|
237
|
-
var tmp_0 = this.
|
|
238
|
-
var tmp_1 = Companion_instance_0.
|
|
239
|
+
var tmp_0 = this.s44(null);
|
|
240
|
+
var tmp_1 = Companion_instance_0.x2b(this.t44());
|
|
239
241
|
// Inline function 'kotlin.collections.ifEmpty' call
|
|
240
242
|
var this_0 = toSet(_get_languages__ojonze_0(this));
|
|
241
243
|
// Inline function 'kotlin.contracts.contract' call
|
|
@@ -247,42 +249,42 @@
|
|
|
247
249
|
tmp_2 = this_0;
|
|
248
250
|
}
|
|
249
251
|
var tmp$ret$2 = tmp_2;
|
|
250
|
-
var this_1 = new CompilerArguments(tmp, tmp_0, tmp_1, tmp$ret$2, _PackageName___init__impl__s13tbs(this.
|
|
252
|
+
var this_1 = new CompilerArguments(tmp, tmp_0, tmp_1, tmp$ret$2, _PackageName___init__impl__s13tbs(this.u44()), this.w44(this.v44()), this.x44(), this.y44());
|
|
251
253
|
// Inline function 'kotlin.contracts.contract' call
|
|
252
|
-
this.
|
|
254
|
+
this.x45_1(this_1);
|
|
253
255
|
};
|
|
254
256
|
function _get_inputFile__x1bqj($this) {
|
|
255
|
-
return $this.
|
|
257
|
+
return $this.k44_1.w3z($this, inputFile$factory_0());
|
|
256
258
|
}
|
|
257
259
|
function CommonOptions() {
|
|
258
260
|
CliktCommand.call(this);
|
|
259
|
-
this.
|
|
260
|
-
this.
|
|
261
|
-
this.
|
|
262
|
-
this.
|
|
263
|
-
this.
|
|
264
|
-
this.
|
|
265
|
-
this.
|
|
266
|
-
}
|
|
267
|
-
protoOf(CommonOptions).
|
|
268
|
-
return this.
|
|
261
|
+
this.k44_1 = option(this, Options_InputFile_getInstance().s43_1.slice(), 'Input file').h40(this, inputFile$factory());
|
|
262
|
+
this.l44_1 = option(this, Options_InputDir_getInstance().s43_1.slice(), 'Input directory').h40(this, inputDir$factory());
|
|
263
|
+
this.m44_1 = option(this, Options_OutputDir_getInstance().s43_1.slice(), 'Output directory').h40(this, outputDir$factory());
|
|
264
|
+
this.n44_1 = default_0(option(this, Options_PackageName_getInstance().s43_1.slice(), 'Package name'), 'community.flock.wirespec.generated').h40(this, packageName$factory());
|
|
265
|
+
this.o44_1 = default_0(option(this, Options_LogLevel_getInstance().s43_1.slice(), 'Log level: ' + Companion_instance_1.toString()), Level_ERROR_getInstance().toString()).h40(this, logLevel$factory());
|
|
266
|
+
this.p44_1 = flag(option(this, Options_Shared_getInstance().s43_1.slice(), 'Generate shared wirespec code'), [], false).h40(this, shared$factory());
|
|
267
|
+
this.q44_1 = flag(option(this, Options_Strict_getInstance().s43_1.slice(), 'Strict mode'), []).h40(this, strict$factory());
|
|
268
|
+
}
|
|
269
|
+
protoOf(CommonOptions).r44 = function () {
|
|
270
|
+
return this.l44_1.w3z(this, inputDir$factory_0());
|
|
269
271
|
};
|
|
270
|
-
protoOf(CommonOptions).
|
|
271
|
-
return this.
|
|
272
|
+
protoOf(CommonOptions).t44 = function () {
|
|
273
|
+
return this.m44_1.w3z(this, outputDir$factory_0());
|
|
272
274
|
};
|
|
273
|
-
protoOf(CommonOptions).
|
|
274
|
-
return this.
|
|
275
|
+
protoOf(CommonOptions).u44 = function () {
|
|
276
|
+
return this.n44_1.w3z(this, packageName$factory_0());
|
|
275
277
|
};
|
|
276
|
-
protoOf(CommonOptions).
|
|
277
|
-
return this.
|
|
278
|
+
protoOf(CommonOptions).v44 = function () {
|
|
279
|
+
return this.o44_1.w3z(this, logLevel$factory_0());
|
|
278
280
|
};
|
|
279
|
-
protoOf(CommonOptions).
|
|
280
|
-
return this.
|
|
281
|
+
protoOf(CommonOptions).x44 = function () {
|
|
282
|
+
return this.p44_1.w3z(this, shared$factory_0());
|
|
281
283
|
};
|
|
282
|
-
protoOf(CommonOptions).
|
|
283
|
-
return this.
|
|
284
|
+
protoOf(CommonOptions).y44 = function () {
|
|
285
|
+
return this.q44_1.w3z(this, strict$factory_0());
|
|
284
286
|
};
|
|
285
|
-
protoOf(CommonOptions).
|
|
287
|
+
protoOf(CommonOptions).s44 = function (inputDir) {
|
|
286
288
|
var tmp;
|
|
287
289
|
if (!(inputDir == null) && !(_get_inputFile__x1bqj(this) == null)) {
|
|
288
290
|
var message = 'Choose either a file or a directory. Not Both.';
|
|
@@ -295,7 +297,7 @@
|
|
|
295
297
|
} else {
|
|
296
298
|
// Inline function 'kotlin.let' call
|
|
297
299
|
// Inline function 'kotlin.contracts.contract' call
|
|
298
|
-
tmp_0 = Companion_instance_2.
|
|
300
|
+
tmp_0 = Companion_instance_2.l2b(tmp0_safe_receiver);
|
|
299
301
|
}
|
|
300
302
|
var tmp1_elvis_lhs = tmp_0;
|
|
301
303
|
var tmp_1;
|
|
@@ -317,7 +319,7 @@
|
|
|
317
319
|
}
|
|
318
320
|
return tmp;
|
|
319
321
|
};
|
|
320
|
-
protoOf(CommonOptions).
|
|
322
|
+
protoOf(CommonOptions).w44 = function (_this__u8e3s4) {
|
|
321
323
|
// Inline function 'kotlin.text.uppercase' call
|
|
322
324
|
// Inline function 'kotlin.text.trim' call
|
|
323
325
|
// Inline function 'kotlin.js.asDynamic' call
|
|
@@ -365,7 +367,7 @@
|
|
|
365
367
|
}
|
|
366
368
|
function Options(name, ordinal, flags) {
|
|
367
369
|
Enum.call(this, name, ordinal);
|
|
368
|
-
this.
|
|
370
|
+
this.s43_1 = flags;
|
|
369
371
|
}
|
|
370
372
|
function Options_InputDir_getInstance() {
|
|
371
373
|
Options_initEntries();
|
|
@@ -436,32 +438,32 @@
|
|
|
436
438
|
}
|
|
437
439
|
function inputDir$factory() {
|
|
438
440
|
return getPropertyCallableRef('inputDir', 1, KProperty1, function (receiver) {
|
|
439
|
-
return receiver.
|
|
441
|
+
return receiver.r44();
|
|
440
442
|
}, null);
|
|
441
443
|
}
|
|
442
444
|
function outputDir$factory() {
|
|
443
445
|
return getPropertyCallableRef('outputDir', 1, KProperty1, function (receiver) {
|
|
444
|
-
return receiver.
|
|
446
|
+
return receiver.t44();
|
|
445
447
|
}, null);
|
|
446
448
|
}
|
|
447
449
|
function packageName$factory() {
|
|
448
450
|
return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) {
|
|
449
|
-
return receiver.
|
|
451
|
+
return receiver.u44();
|
|
450
452
|
}, null);
|
|
451
453
|
}
|
|
452
454
|
function logLevel$factory() {
|
|
453
455
|
return getPropertyCallableRef('logLevel', 1, KProperty1, function (receiver) {
|
|
454
|
-
return receiver.
|
|
456
|
+
return receiver.v44();
|
|
455
457
|
}, null);
|
|
456
458
|
}
|
|
457
459
|
function shared$factory() {
|
|
458
460
|
return getPropertyCallableRef('shared', 1, KProperty1, function (receiver) {
|
|
459
|
-
return receiver.
|
|
461
|
+
return receiver.x44();
|
|
460
462
|
}, null);
|
|
461
463
|
}
|
|
462
464
|
function strict$factory() {
|
|
463
465
|
return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) {
|
|
464
|
-
return receiver.
|
|
466
|
+
return receiver.y44();
|
|
465
467
|
}, null);
|
|
466
468
|
}
|
|
467
469
|
function inputFile$factory_0() {
|
|
@@ -471,32 +473,32 @@
|
|
|
471
473
|
}
|
|
472
474
|
function inputDir$factory_0() {
|
|
473
475
|
return getPropertyCallableRef('inputDir', 1, KProperty1, function (receiver) {
|
|
474
|
-
return receiver.
|
|
476
|
+
return receiver.r44();
|
|
475
477
|
}, null);
|
|
476
478
|
}
|
|
477
479
|
function outputDir$factory_0() {
|
|
478
480
|
return getPropertyCallableRef('outputDir', 1, KProperty1, function (receiver) {
|
|
479
|
-
return receiver.
|
|
481
|
+
return receiver.t44();
|
|
480
482
|
}, null);
|
|
481
483
|
}
|
|
482
484
|
function packageName$factory_0() {
|
|
483
485
|
return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) {
|
|
484
|
-
return receiver.
|
|
486
|
+
return receiver.u44();
|
|
485
487
|
}, null);
|
|
486
488
|
}
|
|
487
489
|
function logLevel$factory_0() {
|
|
488
490
|
return getPropertyCallableRef('logLevel', 1, KProperty1, function (receiver) {
|
|
489
|
-
return receiver.
|
|
491
|
+
return receiver.v44();
|
|
490
492
|
}, null);
|
|
491
493
|
}
|
|
492
494
|
function shared$factory_0() {
|
|
493
495
|
return getPropertyCallableRef('shared', 1, KProperty1, function (receiver) {
|
|
494
|
-
return receiver.
|
|
496
|
+
return receiver.x44();
|
|
495
497
|
}, null);
|
|
496
498
|
}
|
|
497
499
|
function strict$factory_0() {
|
|
498
500
|
return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) {
|
|
499
|
-
return receiver.
|
|
501
|
+
return receiver.y44();
|
|
500
502
|
}, null);
|
|
501
503
|
}
|
|
502
504
|
function main(args) {
|
|
@@ -529,27 +531,27 @@
|
|
|
529
531
|
var tmp = Companion_instance_4;
|
|
530
532
|
var tmp_0 = compile$ref();
|
|
531
533
|
// Inline function 'kotlin.contracts.contract' call
|
|
532
|
-
tmp.
|
|
534
|
+
tmp.p42(tmp_0, convert$ref())(this_1);
|
|
533
535
|
}
|
|
534
536
|
function compile_0(arguments_0) {
|
|
535
|
-
var input = arguments_0.
|
|
536
|
-
var output = arguments_0.
|
|
537
|
-
var languages = arguments_0.
|
|
538
|
-
var packageName = arguments_0.
|
|
539
|
-
var logger = new Logger(arguments_0.
|
|
540
|
-
var operation = arguments_0.
|
|
537
|
+
var input = arguments_0.c2b_1;
|
|
538
|
+
var output = arguments_0.d2b_1;
|
|
539
|
+
var languages = arguments_0.e2b_1;
|
|
540
|
+
var packageName = arguments_0.f2b_1;
|
|
541
|
+
var logger = new Logger(arguments_0.g2b_1);
|
|
542
|
+
var operation = arguments_0.b2b_1;
|
|
541
543
|
if (operation instanceof Convert) {
|
|
542
544
|
var fullPath = input instanceof FullFilePath ? input : THROW_CCE();
|
|
543
545
|
var file = new JsonFile(fullPath);
|
|
544
|
-
var strict = arguments_0.
|
|
545
|
-
var format = operation.
|
|
546
|
+
var strict = arguments_0.i2b_1;
|
|
547
|
+
var format = operation.k2b_1;
|
|
546
548
|
var tmp;
|
|
547
549
|
switch (format.q2_1) {
|
|
548
550
|
case 0:
|
|
549
|
-
tmp = OpenApiV2Parser_instance.
|
|
551
|
+
tmp = OpenApiV2Parser_instance.g2a(file.z1a(), !strict);
|
|
550
552
|
break;
|
|
551
553
|
case 1:
|
|
552
|
-
tmp = OpenApiV3Parser_instance.
|
|
554
|
+
tmp = OpenApiV3Parser_instance.g2a(file.z1a(), !strict);
|
|
553
555
|
break;
|
|
554
556
|
default:
|
|
555
557
|
noWhenBranchMatchedException();
|
|
@@ -572,7 +574,7 @@
|
|
|
572
574
|
var tmp_0;
|
|
573
575
|
if (!emitter.o22_1) {
|
|
574
576
|
// Inline function 'kotlin.text.replaceFirstChar' call
|
|
575
|
-
var this_1 = _FileName___get_value__impl__3u4cz6(fullPath.
|
|
577
|
+
var this_1 = _FileName___get_value__impl__3u4cz6(fullPath.q2b_1);
|
|
576
578
|
var tmp_1;
|
|
577
579
|
// Inline function 'kotlin.text.isNotEmpty' call
|
|
578
580
|
if (charSequenceLength(this_1) > 0) {
|
|
@@ -590,7 +592,7 @@
|
|
|
590
592
|
tmp_1 = this_1;
|
|
591
593
|
}
|
|
592
594
|
var tmp$ret$7 = tmp_1;
|
|
593
|
-
tmp_0 = to(listOf(new Emitted(tmp$ret$7, first(results).
|
|
595
|
+
tmp_0 = to(listOf(new Emitted(tmp$ret$7, first(results).l25_1)), file_0);
|
|
594
596
|
} else {
|
|
595
597
|
tmp_0 = to(results, file_0);
|
|
596
598
|
}
|
|
@@ -614,19 +616,19 @@
|
|
|
614
616
|
} else {
|
|
615
617
|
if (input instanceof FullDirPath) {
|
|
616
618
|
// Inline function 'kotlin.collections.forEach' call
|
|
617
|
-
var tmp0_iterator_1 = (new Directory(input.
|
|
619
|
+
var tmp0_iterator_1 = (new Directory(input.v2b_1)).c46().g();
|
|
618
620
|
while (tmp0_iterator_1.h()) {
|
|
619
621
|
var element = tmp0_iterator_1.i();
|
|
620
622
|
// Inline function 'community.flock.wirespec.plugin.cli.compile.<anonymous>' call
|
|
621
|
-
wirespec(element, languages, packageName, out(element.
|
|
623
|
+
wirespec(element, languages, packageName, out(element.a46_1, packageName, output), logger);
|
|
622
624
|
}
|
|
623
625
|
} else {
|
|
624
626
|
if (input instanceof FullFilePath)
|
|
625
|
-
if (input.
|
|
627
|
+
if (input.r2b_1.equals(FileExtension_Wirespec_getInstance())) {
|
|
626
628
|
// Inline function 'kotlin.let' call
|
|
627
629
|
// Inline function 'kotlin.contracts.contract' call
|
|
628
630
|
var it = new WirespecFile(input);
|
|
629
|
-
wirespec(it, languages, packageName, out(it.
|
|
631
|
+
wirespec(it, languages, packageName, out(it.a46_1, packageName, output), logger);
|
|
630
632
|
} else {
|
|
631
633
|
// Inline function 'kotlin.error' call
|
|
632
634
|
var message = 'Path ' + input.toString() + ' is not a Wirespec file';
|
|
@@ -656,7 +658,7 @@
|
|
|
656
658
|
// Inline function 'community.flock.wirespec.plugin.cli.write.<anonymous>' call
|
|
657
659
|
var name = element.qd();
|
|
658
660
|
var result = element.rd();
|
|
659
|
-
var tmp1_safe_receiver = file == null ? null : file.
|
|
661
|
+
var tmp1_safe_receiver = file == null ? null : file.d46(_FileName___init__impl__nzn12e(name));
|
|
660
662
|
var tmp;
|
|
661
663
|
if (tmp1_safe_receiver == null) {
|
|
662
664
|
tmp = null;
|
|
@@ -750,12 +752,40 @@
|
|
|
750
752
|
|
|
751
753
|
tmp = to(tmp_8, tmp_9);
|
|
752
754
|
break;
|
|
755
|
+
case 5:
|
|
756
|
+
var tmp_10 = OpenApiV2Emitter_getInstance();
|
|
757
|
+
var tmp_11;
|
|
758
|
+
if (path == null) {
|
|
759
|
+
tmp_11 = null;
|
|
760
|
+
} else {
|
|
761
|
+
// Inline function 'kotlin.let' call
|
|
762
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
763
|
+
// Inline function 'community.flock.wirespec.plugin.cli.emitters.<anonymous>.<anonymous>' call
|
|
764
|
+
tmp_11 = new JsonFile(path(FileExtension_Json_getInstance()));
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
tmp = to(tmp_10, tmp_11);
|
|
768
|
+
break;
|
|
769
|
+
case 6:
|
|
770
|
+
var tmp_12 = OpenApiV3Emitter_getInstance();
|
|
771
|
+
var tmp_13;
|
|
772
|
+
if (path == null) {
|
|
773
|
+
tmp_13 = null;
|
|
774
|
+
} else {
|
|
775
|
+
// Inline function 'kotlin.let' call
|
|
776
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
777
|
+
// Inline function 'community.flock.wirespec.plugin.cli.emitters.<anonymous>.<anonymous>' call
|
|
778
|
+
tmp_13 = new JsonFile(path(FileExtension_Json_getInstance()));
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
tmp = to(tmp_12, tmp_13);
|
|
782
|
+
break;
|
|
753
783
|
default:
|
|
754
784
|
noWhenBranchMatchedException();
|
|
755
785
|
break;
|
|
756
786
|
}
|
|
757
|
-
var tmp$ret$
|
|
758
|
-
destination.e(tmp$ret$
|
|
787
|
+
var tmp$ret$14 = tmp;
|
|
788
|
+
destination.e(tmp$ret$14);
|
|
759
789
|
}
|
|
760
790
|
return destination;
|
|
761
791
|
}
|
|
@@ -791,7 +821,7 @@
|
|
|
791
821
|
// Inline function 'arrow.core.Either.map.<anonymous>' call
|
|
792
822
|
// Inline function 'community.flock.wirespec.plugin.cli.wirespec.<anonymous>.<anonymous>.<anonymous>' call
|
|
793
823
|
var it = results.ak_1;
|
|
794
|
-
var tmp$ret$2 = listOf(new Emitted(Companion_getInstance().
|
|
824
|
+
var tmp$ret$2 = listOf(new Emitted(Companion_getInstance().i24(_FileName___get_value__impl__3u4cz6(path(FileExtension_Wirespec_getInstance()).q2b_1)), first(it).l25_1));
|
|
795
825
|
tmp_0 = new Right(tmp$ret$2);
|
|
796
826
|
} else {
|
|
797
827
|
if (results instanceof Left) {
|
|
@@ -846,7 +876,7 @@
|
|
|
846
876
|
function compile$lambda($output) {
|
|
847
877
|
return function (it) {
|
|
848
878
|
var tmp = $output;
|
|
849
|
-
return new FullFilePath(_Output___get_value__impl__a8kw1g(ensureNotNull(tmp == null ? null : new Output(tmp)).
|
|
879
|
+
return new FullFilePath(_Output___get_value__impl__a8kw1g(ensureNotNull(tmp == null ? null : new Output(tmp)).y2b_1), _FileName___init__impl__nzn12e('console'), it);
|
|
850
880
|
};
|
|
851
881
|
}
|
|
852
882
|
function out$lambda($output, $this_out, $packageName) {
|
|
@@ -858,49 +888,49 @@
|
|
|
858
888
|
// Inline function 'kotlin.text.lowercase' call
|
|
859
889
|
// Inline function 'kotlin.js.asDynamic' call
|
|
860
890
|
var tmp$ret$1 = extension.p2_1.toLowerCase();
|
|
861
|
-
tmp = $this_out.
|
|
891
|
+
tmp = $this_out.p2b_1 + '/out/' + tmp$ret$1;
|
|
862
892
|
} else {
|
|
863
893
|
tmp = new Output(tmp0_elvis_lhs);
|
|
864
894
|
}
|
|
865
895
|
var dir = tmp;
|
|
866
|
-
return $this_out.
|
|
896
|
+
return $this_out.t2b(toString(dir) + '/' + joinToString(split(_PackageName___get_value__impl__2zr98c($packageName), charArrayOf([_Char___init__impl__6a9atx(46)])), '/'), VOID, extension);
|
|
867
897
|
};
|
|
868
898
|
}
|
|
869
899
|
function JavaFile(path) {
|
|
870
|
-
File.call(this, path.
|
|
900
|
+
File.call(this, path.t2b(VOID, VOID, FileExtension_Java_getInstance()));
|
|
871
901
|
}
|
|
872
|
-
protoOf(JavaFile).
|
|
873
|
-
return new JavaFile(this.
|
|
902
|
+
protoOf(JavaFile).d46 = function (fileName) {
|
|
903
|
+
return new JavaFile(this.a46_1.t2b(VOID, fileName));
|
|
874
904
|
};
|
|
875
905
|
function JsonFile(path) {
|
|
876
|
-
File.call(this, path.
|
|
906
|
+
File.call(this, path.t2b(VOID, VOID, FileExtension_Json_getInstance()));
|
|
877
907
|
}
|
|
878
|
-
protoOf(JsonFile).
|
|
879
|
-
return new JsonFile(this.
|
|
908
|
+
protoOf(JsonFile).d46 = function (fileName) {
|
|
909
|
+
return new JsonFile(this.a46_1.t2b(VOID, fileName));
|
|
880
910
|
};
|
|
881
911
|
function KotlinFile(path) {
|
|
882
|
-
File.call(this, path.
|
|
912
|
+
File.call(this, path.t2b(VOID, VOID, FileExtension_Kotlin_getInstance()));
|
|
883
913
|
}
|
|
884
|
-
protoOf(KotlinFile).
|
|
885
|
-
return new KotlinFile(this.
|
|
914
|
+
protoOf(KotlinFile).d46 = function (fileName) {
|
|
915
|
+
return new KotlinFile(this.a46_1.t2b(VOID, fileName));
|
|
886
916
|
};
|
|
887
917
|
function ScalaFile(path) {
|
|
888
|
-
File.call(this, path.
|
|
918
|
+
File.call(this, path.t2b(VOID, VOID, FileExtension_Scala_getInstance()));
|
|
889
919
|
}
|
|
890
|
-
protoOf(ScalaFile).
|
|
891
|
-
return new ScalaFile(this.
|
|
920
|
+
protoOf(ScalaFile).d46 = function (fileName) {
|
|
921
|
+
return new ScalaFile(this.a46_1.t2b(VOID, fileName));
|
|
892
922
|
};
|
|
893
923
|
function TypeScriptFile(path) {
|
|
894
|
-
File.call(this, path.
|
|
924
|
+
File.call(this, path.t2b(VOID, VOID, FileExtension_TypeScript_getInstance()));
|
|
895
925
|
}
|
|
896
|
-
protoOf(TypeScriptFile).
|
|
897
|
-
return new TypeScriptFile(this.
|
|
926
|
+
protoOf(TypeScriptFile).d46 = function (fileName) {
|
|
927
|
+
return new TypeScriptFile(this.a46_1.t2b(VOID, fileName));
|
|
898
928
|
};
|
|
899
929
|
function WirespecFile(path) {
|
|
900
|
-
File.call(this, path.
|
|
930
|
+
File.call(this, path.t2b(VOID, VOID, FileExtension_Wirespec_getInstance()));
|
|
901
931
|
}
|
|
902
|
-
protoOf(WirespecFile).
|
|
903
|
-
return new WirespecFile(this.
|
|
932
|
+
protoOf(WirespecFile).d46 = function (fileName) {
|
|
933
|
+
return new WirespecFile(this.a46_1.t2b(VOID, fileName));
|
|
904
934
|
};
|
|
905
935
|
function cli(args) {
|
|
906
936
|
main(args);
|
|
@@ -963,14 +993,14 @@
|
|
|
963
993
|
return it;
|
|
964
994
|
}
|
|
965
995
|
function Directory$wirespecFiles$lambda_0(it) {
|
|
966
|
-
return endsWith(it, FileExtension_Wirespec_getInstance().
|
|
996
|
+
return endsWith(it, FileExtension_Wirespec_getInstance().o2b_1);
|
|
967
997
|
}
|
|
968
998
|
function Directory$wirespecFiles$lambda_1(it) {
|
|
969
|
-
return dropLast(it, FileExtension_Wirespec_getInstance().
|
|
999
|
+
return dropLast(it, FileExtension_Wirespec_getInstance().o2b_1.length + 1 | 0);
|
|
970
1000
|
}
|
|
971
1001
|
function Directory$wirespecFiles$lambda_2(this$0) {
|
|
972
1002
|
return function (it) {
|
|
973
|
-
return new FullFilePath(this$0.
|
|
1003
|
+
return new FullFilePath(this$0.b46_1, _FileName___init__impl__nzn12e(it));
|
|
974
1004
|
};
|
|
975
1005
|
}
|
|
976
1006
|
function WirespecFile$_init_$ref_cj1n5j() {
|
|
@@ -981,10 +1011,10 @@
|
|
|
981
1011
|
return l;
|
|
982
1012
|
}
|
|
983
1013
|
function Directory(path) {
|
|
984
|
-
this.
|
|
1014
|
+
this.b46_1 = path;
|
|
985
1015
|
}
|
|
986
|
-
protoOf(Directory).
|
|
987
|
-
var tmp = asSequence(iterator(get_fs().readdirSync(this.
|
|
1016
|
+
protoOf(Directory).c46 = function () {
|
|
1017
|
+
var tmp = asSequence(iterator(get_fs().readdirSync(this.b46_1, 'utf-8')));
|
|
988
1018
|
var tmp_0 = map(tmp, Directory$wirespecFiles$lambda);
|
|
989
1019
|
var tmp_1 = filter(tmp_0, Directory$wirespecFiles$lambda_0);
|
|
990
1020
|
var tmp_2 = map(tmp_1, Directory$wirespecFiles$lambda_1);
|
|
@@ -992,20 +1022,20 @@
|
|
|
992
1022
|
return toSet_0(map(tmp_3, WirespecFile$_init_$ref_cj1n5j()));
|
|
993
1023
|
};
|
|
994
1024
|
function File(path) {
|
|
995
|
-
this.
|
|
1025
|
+
this.a46_1 = path;
|
|
996
1026
|
}
|
|
997
1027
|
protoOf(File).z1a = function () {
|
|
998
1028
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
999
|
-
return get_fs().readFileSync(this.
|
|
1029
|
+
return get_fs().readFileSync(this.a46_1.toString(), 'utf-8');
|
|
1000
1030
|
};
|
|
1001
1031
|
protoOf(File).t18 = function (text) {
|
|
1002
1032
|
// Inline function 'kotlin.run' call
|
|
1003
1033
|
// Inline function 'kotlin.contracts.contract' call
|
|
1004
1034
|
// Inline function 'community.flock.wirespec.plugin.cli.io.File.write.<anonymous>' call
|
|
1005
|
-
var $this$run = this.
|
|
1035
|
+
var $this$run = this.a46_1.t2b(joinToString(split_0(this.a46_1.p2b_1, ['out']), 'out/node'));
|
|
1006
1036
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1007
|
-
if (!get_fs().existsSync($this$run.
|
|
1008
|
-
get_fs().mkdirSync($this$run.
|
|
1037
|
+
if (!get_fs().existsSync($this$run.p2b_1)) {
|
|
1038
|
+
get_fs().mkdirSync($this$run.p2b_1, {recursive: true});
|
|
1009
1039
|
}
|
|
1010
1040
|
get_fs().writeFileSync($this$run.toString(), text);
|
|
1011
1041
|
};
|