@flock/wirespec 0.10.24 → 0.10.25
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 +1162 -1162
- package/colormath-root-colormath.js +425 -425
- package/kotlin-kotlin-stdlib.js +13 -13
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlin-rgxgen.js +1767 -1767
- package/markdown.js +1874 -1874
- package/mordant-mordant.js +1641 -1641
- package/package.json +1 -1
- package/wirespec-src-compiler-core.js +1823 -1662
- package/wirespec-src-compiler-core.js.map +1 -1
- package/wirespec-src-compiler-lib.js +280 -280
- package/wirespec-src-converter-openapi.js +313 -313
- package/wirespec-src-plugin-arguments.js +78 -78
- package/wirespec-src-plugin-cli.js +113 -113
- package/wirespec-src-plugin-npm.js +4 -4
- package/wirespec-src-tools-generator.js +13 -13
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
//endregion
|
|
169
169
|
function WirespecCli$main$ref($boundThis) {
|
|
170
170
|
var l = function (p0) {
|
|
171
|
-
$boundThis.
|
|
171
|
+
$boundThis.a3r(p0);
|
|
172
172
|
return Unit_instance;
|
|
173
173
|
};
|
|
174
174
|
l.callableName = 'main';
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
}
|
|
177
177
|
function Companion() {
|
|
178
178
|
}
|
|
179
|
-
protoOf(Companion).
|
|
179
|
+
protoOf(Companion).f43 = function (compile, convert, write) {
|
|
180
180
|
return WirespecCli$main$ref(subcommands(new WirespecCli(), [new Compile_0(compile, write), new Convert_0(convert, write)]));
|
|
181
181
|
};
|
|
182
182
|
var Companion_instance_4;
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
NoOpCliktCommand.call(this, VOID, VOID, 'wirespec');
|
|
188
188
|
}
|
|
189
189
|
function _get_languages__ojonze($this) {
|
|
190
|
-
return $this.
|
|
190
|
+
return $this.g44_1.m40($this, languages$factory_0());
|
|
191
191
|
}
|
|
192
192
|
function Compile$run$lambda(e) {
|
|
193
193
|
var tmp0_elvis_lhs = e.message;
|
|
@@ -195,16 +195,16 @@
|
|
|
195
195
|
}
|
|
196
196
|
function Compile_0(block, write) {
|
|
197
197
|
CommonOptions.call(this);
|
|
198
|
-
this.
|
|
199
|
-
this.
|
|
200
|
-
this.
|
|
198
|
+
this.e44_1 = block;
|
|
199
|
+
this.f44_1 = write;
|
|
200
|
+
this.g44_1 = multiple(choice(option(this, Options_Language_getInstance().j44_1.slice(), 'Language'), Companion_instance.n2c()), VOID, true).x40(this, languages$factory());
|
|
201
201
|
}
|
|
202
|
-
protoOf(Compile_0).
|
|
202
|
+
protoOf(Compile_0).b3r = function () {
|
|
203
203
|
// Inline function 'kotlin.collections.forEach' call
|
|
204
204
|
// Inline function 'kotlin.let' call
|
|
205
|
-
var this_0 = new CompilerArguments(Compile_instance, this.
|
|
205
|
+
var this_0 = new CompilerArguments(Compile_instance, this.j45(this.i45()), Companion_instance_0.o2c(this.k45()), toSet(_get_languages__ojonze(this)), _PackageName___init__impl__s13tbs(this.l45()), this.n45(this.m45()), this.o45(), this.p45());
|
|
206
206
|
// Inline function 'kotlin.contracts.contract' call
|
|
207
|
-
var tmp0_iterator = this.
|
|
207
|
+
var tmp0_iterator = this.e44_1(this_0).g();
|
|
208
208
|
while (tmp0_iterator.h()) {
|
|
209
209
|
var element = tmp0_iterator.i();
|
|
210
210
|
// Inline function 'community.flock.wirespec.plugin.cli.Compile.run.<anonymous>' call
|
|
@@ -214,7 +214,7 @@
|
|
|
214
214
|
var destruct = element.ak_1;
|
|
215
215
|
var result = destruct.qd();
|
|
216
216
|
var file = destruct.rd();
|
|
217
|
-
this.
|
|
217
|
+
this.f44_1(result, file);
|
|
218
218
|
} else {
|
|
219
219
|
if (element instanceof Left) {
|
|
220
220
|
throw new CliktError(joinToString(element.uj_1, VOID, VOID, VOID, VOID, VOID, Compile$run$lambda));
|
|
@@ -225,15 +225,15 @@
|
|
|
225
225
|
}
|
|
226
226
|
};
|
|
227
227
|
function _get_format__qlarck($this) {
|
|
228
|
-
return $this.
|
|
228
|
+
return $this.q46_1.m40($this, format$factory_0());
|
|
229
229
|
}
|
|
230
230
|
function _get_languages__ojonze_0($this) {
|
|
231
|
-
return $this.
|
|
231
|
+
return $this.r46_1.m40($this, languages$factory_2());
|
|
232
232
|
}
|
|
233
233
|
function Convert_0(block, write) {
|
|
234
234
|
CommonOptions.call(this);
|
|
235
|
-
this.
|
|
236
|
-
this.
|
|
235
|
+
this.o46_1 = block;
|
|
236
|
+
this.p46_1 = write;
|
|
237
237
|
var tmp = this;
|
|
238
238
|
// Inline function 'com.github.ajalt.clikt.parameters.types.enum' call
|
|
239
239
|
var this_0 = argument(this, VOID, 'Input format');
|
|
@@ -253,22 +253,22 @@
|
|
|
253
253
|
var tmp$ret$2 = element.p2_1;
|
|
254
254
|
destination.m2(tmp$ret$2, element);
|
|
255
255
|
}
|
|
256
|
-
tmp.
|
|
257
|
-
this.
|
|
256
|
+
tmp.q46_1 = choice_0(this_0, destination, true).s3z(this, format$factory());
|
|
257
|
+
this.r46_1 = multiple(choice(option(this, Options_Language_getInstance().j44_1.slice(), 'Language'), Companion_instance.n2c(), VOID, true), listOf(Language_Wirespec_getInstance())).x40(this, languages$factory_1());
|
|
258
258
|
}
|
|
259
|
-
protoOf(Convert_0).
|
|
260
|
-
if (this.
|
|
259
|
+
protoOf(Convert_0).b3r = function () {
|
|
260
|
+
if (this.i45() == null)
|
|
261
261
|
null;
|
|
262
262
|
else {
|
|
263
263
|
// Inline function 'kotlin.let' call
|
|
264
264
|
// Inline function 'kotlin.contracts.contract' call
|
|
265
|
-
this.
|
|
265
|
+
this.u3q('To convert, please specify a file', VOID, true);
|
|
266
266
|
}
|
|
267
267
|
// Inline function 'kotlin.collections.forEach' call
|
|
268
268
|
// Inline function 'kotlin.let' call
|
|
269
269
|
var tmp = new Convert(_get_format__qlarck(this));
|
|
270
|
-
var tmp_0 = this.
|
|
271
|
-
var tmp_1 = Companion_instance_0.
|
|
270
|
+
var tmp_0 = this.j45(null);
|
|
271
|
+
var tmp_1 = Companion_instance_0.o2c(this.k45());
|
|
272
272
|
// Inline function 'kotlin.collections.ifEmpty' call
|
|
273
273
|
var this_0 = toSet(_get_languages__ojonze_0(this));
|
|
274
274
|
// Inline function 'kotlin.contracts.contract' call
|
|
@@ -280,9 +280,9 @@
|
|
|
280
280
|
tmp_2 = this_0;
|
|
281
281
|
}
|
|
282
282
|
var tmp$ret$2 = tmp_2;
|
|
283
|
-
var this_1 = new CompilerArguments(tmp, tmp_0, tmp_1, tmp$ret$2, _PackageName___init__impl__s13tbs(this.
|
|
283
|
+
var this_1 = new CompilerArguments(tmp, tmp_0, tmp_1, tmp$ret$2, _PackageName___init__impl__s13tbs(this.l45()), this.n45(this.m45()), this.o45(), this.p45());
|
|
284
284
|
// Inline function 'kotlin.contracts.contract' call
|
|
285
|
-
var tmp0_iterator = this.
|
|
285
|
+
var tmp0_iterator = this.o46_1(this_1).g();
|
|
286
286
|
while (tmp0_iterator.h()) {
|
|
287
287
|
var element = tmp0_iterator.i();
|
|
288
288
|
// Inline function 'community.flock.wirespec.plugin.cli.Convert.run.<anonymous>' call
|
|
@@ -292,10 +292,10 @@
|
|
|
292
292
|
var destruct = element.ak_1;
|
|
293
293
|
var result = destruct.qd();
|
|
294
294
|
var file = destruct.rd();
|
|
295
|
-
this.
|
|
295
|
+
this.p46_1(result, file);
|
|
296
296
|
} else {
|
|
297
297
|
if (element instanceof Left) {
|
|
298
|
-
this.
|
|
298
|
+
this.u3q(element.uj_1, VOID, true);
|
|
299
299
|
} else {
|
|
300
300
|
noWhenBranchMatchedException();
|
|
301
301
|
}
|
|
@@ -303,37 +303,37 @@
|
|
|
303
303
|
}
|
|
304
304
|
};
|
|
305
305
|
function _get_inputFile__x1bqj($this) {
|
|
306
|
-
return $this.
|
|
306
|
+
return $this.b45_1.m40($this, inputFile$factory_0());
|
|
307
307
|
}
|
|
308
308
|
function CommonOptions() {
|
|
309
309
|
CliktCommand.call(this);
|
|
310
|
-
this.
|
|
311
|
-
this.
|
|
312
|
-
this.
|
|
313
|
-
this.
|
|
314
|
-
this.
|
|
315
|
-
this.
|
|
316
|
-
this.
|
|
317
|
-
}
|
|
318
|
-
protoOf(CommonOptions).
|
|
319
|
-
return this.
|
|
310
|
+
this.b45_1 = option(this, Options_InputFile_getInstance().j44_1.slice(), 'Input file').x40(this, inputFile$factory());
|
|
311
|
+
this.c45_1 = option(this, Options_InputDir_getInstance().j44_1.slice(), 'Input directory').x40(this, inputDir$factory());
|
|
312
|
+
this.d45_1 = option(this, Options_OutputDir_getInstance().j44_1.slice(), 'Output directory').x40(this, outputDir$factory());
|
|
313
|
+
this.e45_1 = default_0(option(this, Options_PackageName_getInstance().j44_1.slice(), 'Package name'), 'community.flock.wirespec.generated').x40(this, packageName$factory());
|
|
314
|
+
this.f45_1 = default_0(option(this, Options_LogLevel_getInstance().j44_1.slice(), 'Log level: ' + Companion_instance_1.toString()), Level_ERROR_getInstance().toString()).x40(this, logLevel$factory());
|
|
315
|
+
this.g45_1 = flag(option(this, Options_Shared_getInstance().j44_1.slice(), 'Generate shared wirespec code'), [], false).x40(this, shared$factory());
|
|
316
|
+
this.h45_1 = flag(option(this, Options_Strict_getInstance().j44_1.slice(), 'Strict mode'), []).x40(this, strict$factory());
|
|
317
|
+
}
|
|
318
|
+
protoOf(CommonOptions).i45 = function () {
|
|
319
|
+
return this.c45_1.m40(this, inputDir$factory_0());
|
|
320
320
|
};
|
|
321
|
-
protoOf(CommonOptions).
|
|
322
|
-
return this.
|
|
321
|
+
protoOf(CommonOptions).k45 = function () {
|
|
322
|
+
return this.d45_1.m40(this, outputDir$factory_0());
|
|
323
323
|
};
|
|
324
|
-
protoOf(CommonOptions).
|
|
325
|
-
return this.
|
|
324
|
+
protoOf(CommonOptions).l45 = function () {
|
|
325
|
+
return this.e45_1.m40(this, packageName$factory_0());
|
|
326
326
|
};
|
|
327
|
-
protoOf(CommonOptions).
|
|
328
|
-
return this.
|
|
327
|
+
protoOf(CommonOptions).m45 = function () {
|
|
328
|
+
return this.f45_1.m40(this, logLevel$factory_0());
|
|
329
329
|
};
|
|
330
|
-
protoOf(CommonOptions).
|
|
331
|
-
return this.
|
|
330
|
+
protoOf(CommonOptions).o45 = function () {
|
|
331
|
+
return this.g45_1.m40(this, shared$factory_0());
|
|
332
332
|
};
|
|
333
|
-
protoOf(CommonOptions).
|
|
334
|
-
return this.
|
|
333
|
+
protoOf(CommonOptions).p45 = function () {
|
|
334
|
+
return this.h45_1.m40(this, strict$factory_0());
|
|
335
335
|
};
|
|
336
|
-
protoOf(CommonOptions).
|
|
336
|
+
protoOf(CommonOptions).j45 = function (inputDir) {
|
|
337
337
|
var tmp;
|
|
338
338
|
if (!(inputDir == null) && !(_get_inputFile__x1bqj(this) == null)) {
|
|
339
339
|
throw new CliktError('Choose either a file or a directory. Not Both.');
|
|
@@ -345,7 +345,7 @@
|
|
|
345
345
|
} else {
|
|
346
346
|
// Inline function 'kotlin.let' call
|
|
347
347
|
// Inline function 'kotlin.contracts.contract' call
|
|
348
|
-
tmp_0 = Companion_instance_2.
|
|
348
|
+
tmp_0 = Companion_instance_2.c2c(tmp0_safe_receiver);
|
|
349
349
|
}
|
|
350
350
|
var tmp1_elvis_lhs = tmp_0;
|
|
351
351
|
var tmp_1;
|
|
@@ -367,7 +367,7 @@
|
|
|
367
367
|
}
|
|
368
368
|
return tmp;
|
|
369
369
|
};
|
|
370
|
-
protoOf(CommonOptions).
|
|
370
|
+
protoOf(CommonOptions).n45 = function (_this__u8e3s4) {
|
|
371
371
|
// Inline function 'kotlin.text.uppercase' call
|
|
372
372
|
// Inline function 'kotlin.text.trim' call
|
|
373
373
|
// Inline function 'kotlin.js.asDynamic' call
|
|
@@ -414,7 +414,7 @@
|
|
|
414
414
|
}
|
|
415
415
|
function Options(name, ordinal, flags) {
|
|
416
416
|
Enum.call(this, name, ordinal);
|
|
417
|
-
this.
|
|
417
|
+
this.j44_1 = flags;
|
|
418
418
|
}
|
|
419
419
|
function Options_InputDir_getInstance() {
|
|
420
420
|
Options_initEntries();
|
|
@@ -485,32 +485,32 @@
|
|
|
485
485
|
}
|
|
486
486
|
function inputDir$factory() {
|
|
487
487
|
return getPropertyCallableRef('inputDir', 1, KProperty1, function (receiver) {
|
|
488
|
-
return receiver.
|
|
488
|
+
return receiver.i45();
|
|
489
489
|
}, null);
|
|
490
490
|
}
|
|
491
491
|
function outputDir$factory() {
|
|
492
492
|
return getPropertyCallableRef('outputDir', 1, KProperty1, function (receiver) {
|
|
493
|
-
return receiver.
|
|
493
|
+
return receiver.k45();
|
|
494
494
|
}, null);
|
|
495
495
|
}
|
|
496
496
|
function packageName$factory() {
|
|
497
497
|
return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) {
|
|
498
|
-
return receiver.
|
|
498
|
+
return receiver.l45();
|
|
499
499
|
}, null);
|
|
500
500
|
}
|
|
501
501
|
function logLevel$factory() {
|
|
502
502
|
return getPropertyCallableRef('logLevel', 1, KProperty1, function (receiver) {
|
|
503
|
-
return receiver.
|
|
503
|
+
return receiver.m45();
|
|
504
504
|
}, null);
|
|
505
505
|
}
|
|
506
506
|
function shared$factory() {
|
|
507
507
|
return getPropertyCallableRef('shared', 1, KProperty1, function (receiver) {
|
|
508
|
-
return receiver.
|
|
508
|
+
return receiver.o45();
|
|
509
509
|
}, null);
|
|
510
510
|
}
|
|
511
511
|
function strict$factory() {
|
|
512
512
|
return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) {
|
|
513
|
-
return receiver.
|
|
513
|
+
return receiver.p45();
|
|
514
514
|
}, null);
|
|
515
515
|
}
|
|
516
516
|
function inputFile$factory_0() {
|
|
@@ -520,32 +520,32 @@
|
|
|
520
520
|
}
|
|
521
521
|
function inputDir$factory_0() {
|
|
522
522
|
return getPropertyCallableRef('inputDir', 1, KProperty1, function (receiver) {
|
|
523
|
-
return receiver.
|
|
523
|
+
return receiver.i45();
|
|
524
524
|
}, null);
|
|
525
525
|
}
|
|
526
526
|
function outputDir$factory_0() {
|
|
527
527
|
return getPropertyCallableRef('outputDir', 1, KProperty1, function (receiver) {
|
|
528
|
-
return receiver.
|
|
528
|
+
return receiver.k45();
|
|
529
529
|
}, null);
|
|
530
530
|
}
|
|
531
531
|
function packageName$factory_0() {
|
|
532
532
|
return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) {
|
|
533
|
-
return receiver.
|
|
533
|
+
return receiver.l45();
|
|
534
534
|
}, null);
|
|
535
535
|
}
|
|
536
536
|
function logLevel$factory_0() {
|
|
537
537
|
return getPropertyCallableRef('logLevel', 1, KProperty1, function (receiver) {
|
|
538
|
-
return receiver.
|
|
538
|
+
return receiver.m45();
|
|
539
539
|
}, null);
|
|
540
540
|
}
|
|
541
541
|
function shared$factory_0() {
|
|
542
542
|
return getPropertyCallableRef('shared', 1, KProperty1, function (receiver) {
|
|
543
|
-
return receiver.
|
|
543
|
+
return receiver.o45();
|
|
544
544
|
}, null);
|
|
545
545
|
}
|
|
546
546
|
function strict$factory_0() {
|
|
547
547
|
return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) {
|
|
548
|
-
return receiver.
|
|
548
|
+
return receiver.p45();
|
|
549
549
|
}, null);
|
|
550
550
|
}
|
|
551
551
|
function main(args) {
|
|
@@ -579,28 +579,28 @@
|
|
|
579
579
|
var tmp_0 = compile$ref();
|
|
580
580
|
var tmp_1 = convert$ref();
|
|
581
581
|
// Inline function 'kotlin.contracts.contract' call
|
|
582
|
-
tmp.
|
|
582
|
+
tmp.f43(tmp_0, tmp_1, write$ref())(this_1);
|
|
583
583
|
}
|
|
584
584
|
function compile_0(arguments_0) {
|
|
585
|
-
var input = arguments_0.
|
|
586
|
-
var output = arguments_0.
|
|
587
|
-
var languages = arguments_0.
|
|
588
|
-
var packageName = arguments_0.
|
|
589
|
-
var logger = new Logger(arguments_0.
|
|
590
|
-
var operation = arguments_0.
|
|
585
|
+
var input = arguments_0.t2b_1;
|
|
586
|
+
var output = arguments_0.u2b_1;
|
|
587
|
+
var languages = arguments_0.v2b_1;
|
|
588
|
+
var packageName = arguments_0.w2b_1;
|
|
589
|
+
var logger = new Logger(arguments_0.x2b_1);
|
|
590
|
+
var operation = arguments_0.s2b_1;
|
|
591
591
|
var tmp;
|
|
592
592
|
if (operation instanceof Convert) {
|
|
593
593
|
var fullPath = input instanceof FullFilePath ? input : THROW_CCE();
|
|
594
594
|
var file = new JsonFile(fullPath);
|
|
595
|
-
var strict = arguments_0.
|
|
596
|
-
var format = operation.
|
|
595
|
+
var strict = arguments_0.z2b_1;
|
|
596
|
+
var format = operation.b2c_1;
|
|
597
597
|
var tmp_0;
|
|
598
598
|
switch (format.q2_1) {
|
|
599
599
|
case 0:
|
|
600
|
-
tmp_0 = OpenApiV2Parser_instance.
|
|
600
|
+
tmp_0 = OpenApiV2Parser_instance.x2a(file.z1a(), !strict);
|
|
601
601
|
break;
|
|
602
602
|
case 1:
|
|
603
|
-
tmp_0 = OpenApiV3Parser_instance.
|
|
603
|
+
tmp_0 = OpenApiV3Parser_instance.x2a(file.z1a(), !strict);
|
|
604
604
|
break;
|
|
605
605
|
default:
|
|
606
606
|
noWhenBranchMatchedException();
|
|
@@ -623,7 +623,7 @@
|
|
|
623
623
|
var tmp_1;
|
|
624
624
|
if (!emitter.o22_1) {
|
|
625
625
|
// Inline function 'kotlin.text.replaceFirstChar' call
|
|
626
|
-
var this_1 = _FileName___get_value__impl__3u4cz6(fullPath.
|
|
626
|
+
var this_1 = _FileName___get_value__impl__3u4cz6(fullPath.h2c_1);
|
|
627
627
|
var tmp_2;
|
|
628
628
|
// Inline function 'kotlin.text.isNotEmpty' call
|
|
629
629
|
if (charSequenceLength(this_1) > 0) {
|
|
@@ -641,7 +641,7 @@
|
|
|
641
641
|
tmp_2 = this_1;
|
|
642
642
|
}
|
|
643
643
|
var tmp$ret$7 = tmp_2;
|
|
644
|
-
tmp_1 = to(listOf(new Emitted(tmp$ret$7, first(results).
|
|
644
|
+
tmp_1 = to(listOf(new Emitted(tmp$ret$7, first(results).t25_1)), file_0);
|
|
645
645
|
} else {
|
|
646
646
|
tmp_1 = to(results, file_0);
|
|
647
647
|
}
|
|
@@ -667,25 +667,25 @@
|
|
|
667
667
|
if (input instanceof FullDirPath) {
|
|
668
668
|
// Inline function 'kotlin.collections.flatMap' call
|
|
669
669
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
670
|
-
var this_3 = (new Directory(input.
|
|
670
|
+
var this_3 = (new Directory(input.m2c_1)).u46();
|
|
671
671
|
var destination_1 = ArrayList_init_$Create$();
|
|
672
672
|
var tmp0_iterator_1 = this_3.g();
|
|
673
673
|
while (tmp0_iterator_1.h()) {
|
|
674
674
|
var element = tmp0_iterator_1.i();
|
|
675
675
|
// Inline function 'community.flock.wirespec.plugin.cli.compile.<anonymous>' call
|
|
676
|
-
var list = wirespec(element, languages, packageName, out(element.
|
|
676
|
+
var list = wirespec(element, languages, packageName, out(element.s46_1, packageName, output), logger);
|
|
677
677
|
addAll(destination_1, list);
|
|
678
678
|
}
|
|
679
679
|
tmp_4 = destination_1;
|
|
680
680
|
} else {
|
|
681
681
|
if (input instanceof FullFilePath) {
|
|
682
682
|
var tmp_5;
|
|
683
|
-
if (input.
|
|
683
|
+
if (input.i2c_1.equals(FileExtension_Wirespec_getInstance())) {
|
|
684
684
|
// Inline function 'kotlin.let' call
|
|
685
685
|
// Inline function 'kotlin.contracts.contract' call
|
|
686
686
|
// Inline function 'community.flock.wirespec.plugin.cli.compile.<anonymous>' call
|
|
687
687
|
var it = new WirespecFile(input);
|
|
688
|
-
tmp_5 = wirespec(it, languages, packageName, out(it.
|
|
688
|
+
tmp_5 = wirespec(it, languages, packageName, out(it.s46_1, packageName, output), logger);
|
|
689
689
|
} else {
|
|
690
690
|
// Inline function 'arrow.core.nel' call
|
|
691
691
|
// Inline function 'arrow.core.nel' call
|
|
@@ -718,7 +718,7 @@
|
|
|
718
718
|
// Inline function 'community.flock.wirespec.plugin.cli.write.<anonymous>' call
|
|
719
719
|
var name = element.qd();
|
|
720
720
|
var result = element.rd();
|
|
721
|
-
var tmp1_safe_receiver = file == null ? null : file.
|
|
721
|
+
var tmp1_safe_receiver = file == null ? null : file.v46(_FileName___init__impl__nzn12e(name));
|
|
722
722
|
var tmp;
|
|
723
723
|
if (tmp1_safe_receiver == null) {
|
|
724
724
|
tmp = null;
|
|
@@ -884,7 +884,7 @@
|
|
|
884
884
|
// Inline function 'arrow.core.Either.map.<anonymous>' call
|
|
885
885
|
// Inline function 'community.flock.wirespec.plugin.cli.wirespec.<anonymous>.<anonymous>.<anonymous>' call
|
|
886
886
|
var it = results.ak_1;
|
|
887
|
-
var tmp$ret$2 = listOf(new Emitted(Companion_getInstance().
|
|
887
|
+
var tmp$ret$2 = listOf(new Emitted(Companion_getInstance().q24(_FileName___get_value__impl__3u4cz6(path(FileExtension_Wirespec_getInstance()).h2c_1)), first(it).t25_1));
|
|
888
888
|
tmp_0 = new Right(tmp$ret$2);
|
|
889
889
|
} else {
|
|
890
890
|
if (results instanceof Left) {
|
|
@@ -957,7 +957,7 @@
|
|
|
957
957
|
function compile$lambda($output) {
|
|
958
958
|
return function (it) {
|
|
959
959
|
var tmp = $output;
|
|
960
|
-
return new FullFilePath(_Output___get_value__impl__a8kw1g(ensureNotNull(tmp == null ? null : new Output(tmp)).
|
|
960
|
+
return new FullFilePath(_Output___get_value__impl__a8kw1g(ensureNotNull(tmp == null ? null : new Output(tmp)).p2c_1), _FileName___init__impl__nzn12e('console'), it);
|
|
961
961
|
};
|
|
962
962
|
}
|
|
963
963
|
function out$lambda($output, $this_out, $packageName) {
|
|
@@ -969,49 +969,49 @@
|
|
|
969
969
|
// Inline function 'kotlin.text.lowercase' call
|
|
970
970
|
// Inline function 'kotlin.js.asDynamic' call
|
|
971
971
|
var tmp$ret$1 = extension.p2_1.toLowerCase();
|
|
972
|
-
tmp = $this_out.
|
|
972
|
+
tmp = $this_out.g2c_1 + '/out/' + tmp$ret$1;
|
|
973
973
|
} else {
|
|
974
974
|
tmp = new Output(tmp0_elvis_lhs);
|
|
975
975
|
}
|
|
976
976
|
var dir = tmp;
|
|
977
|
-
return $this_out.
|
|
977
|
+
return $this_out.k2c(toString(dir) + '/' + joinToString(split(_PackageName___get_value__impl__2zr98c($packageName), charArrayOf([_Char___init__impl__6a9atx(46)])), '/'), VOID, extension);
|
|
978
978
|
};
|
|
979
979
|
}
|
|
980
980
|
function JavaFile(path) {
|
|
981
|
-
File.call(this, path.
|
|
981
|
+
File.call(this, path.k2c(VOID, VOID, FileExtension_Java_getInstance()));
|
|
982
982
|
}
|
|
983
|
-
protoOf(JavaFile).
|
|
984
|
-
return new JavaFile(this.
|
|
983
|
+
protoOf(JavaFile).v46 = function (fileName) {
|
|
984
|
+
return new JavaFile(this.s46_1.k2c(VOID, fileName));
|
|
985
985
|
};
|
|
986
986
|
function JsonFile(path) {
|
|
987
|
-
File.call(this, path.
|
|
987
|
+
File.call(this, path.k2c(VOID, VOID, FileExtension_Json_getInstance()));
|
|
988
988
|
}
|
|
989
|
-
protoOf(JsonFile).
|
|
990
|
-
return new JsonFile(this.
|
|
989
|
+
protoOf(JsonFile).v46 = function (fileName) {
|
|
990
|
+
return new JsonFile(this.s46_1.k2c(VOID, fileName));
|
|
991
991
|
};
|
|
992
992
|
function KotlinFile(path) {
|
|
993
|
-
File.call(this, path.
|
|
993
|
+
File.call(this, path.k2c(VOID, VOID, FileExtension_Kotlin_getInstance()));
|
|
994
994
|
}
|
|
995
|
-
protoOf(KotlinFile).
|
|
996
|
-
return new KotlinFile(this.
|
|
995
|
+
protoOf(KotlinFile).v46 = function (fileName) {
|
|
996
|
+
return new KotlinFile(this.s46_1.k2c(VOID, fileName));
|
|
997
997
|
};
|
|
998
998
|
function ScalaFile(path) {
|
|
999
|
-
File.call(this, path.
|
|
999
|
+
File.call(this, path.k2c(VOID, VOID, FileExtension_Scala_getInstance()));
|
|
1000
1000
|
}
|
|
1001
|
-
protoOf(ScalaFile).
|
|
1002
|
-
return new ScalaFile(this.
|
|
1001
|
+
protoOf(ScalaFile).v46 = function (fileName) {
|
|
1002
|
+
return new ScalaFile(this.s46_1.k2c(VOID, fileName));
|
|
1003
1003
|
};
|
|
1004
1004
|
function TypeScriptFile(path) {
|
|
1005
|
-
File.call(this, path.
|
|
1005
|
+
File.call(this, path.k2c(VOID, VOID, FileExtension_TypeScript_getInstance()));
|
|
1006
1006
|
}
|
|
1007
|
-
protoOf(TypeScriptFile).
|
|
1008
|
-
return new TypeScriptFile(this.
|
|
1007
|
+
protoOf(TypeScriptFile).v46 = function (fileName) {
|
|
1008
|
+
return new TypeScriptFile(this.s46_1.k2c(VOID, fileName));
|
|
1009
1009
|
};
|
|
1010
1010
|
function WirespecFile(path) {
|
|
1011
|
-
File.call(this, path.
|
|
1011
|
+
File.call(this, path.k2c(VOID, VOID, FileExtension_Wirespec_getInstance()));
|
|
1012
1012
|
}
|
|
1013
|
-
protoOf(WirespecFile).
|
|
1014
|
-
return new WirespecFile(this.
|
|
1013
|
+
protoOf(WirespecFile).v46 = function (fileName) {
|
|
1014
|
+
return new WirespecFile(this.s46_1.k2c(VOID, fileName));
|
|
1015
1015
|
};
|
|
1016
1016
|
function cli(args) {
|
|
1017
1017
|
main(args);
|
|
@@ -1074,14 +1074,14 @@
|
|
|
1074
1074
|
return it;
|
|
1075
1075
|
}
|
|
1076
1076
|
function Directory$wirespecFiles$lambda_0(it) {
|
|
1077
|
-
return endsWith(it, FileExtension_Wirespec_getInstance().
|
|
1077
|
+
return endsWith(it, FileExtension_Wirespec_getInstance().f2c_1);
|
|
1078
1078
|
}
|
|
1079
1079
|
function Directory$wirespecFiles$lambda_1(it) {
|
|
1080
|
-
return dropLast(it, FileExtension_Wirespec_getInstance().
|
|
1080
|
+
return dropLast(it, FileExtension_Wirespec_getInstance().f2c_1.length + 1 | 0);
|
|
1081
1081
|
}
|
|
1082
1082
|
function Directory$wirespecFiles$lambda_2(this$0) {
|
|
1083
1083
|
return function (it) {
|
|
1084
|
-
return new FullFilePath(this$0.
|
|
1084
|
+
return new FullFilePath(this$0.t46_1, _FileName___init__impl__nzn12e(it));
|
|
1085
1085
|
};
|
|
1086
1086
|
}
|
|
1087
1087
|
function WirespecFile$_init_$ref_cj1n5j() {
|
|
@@ -1092,10 +1092,10 @@
|
|
|
1092
1092
|
return l;
|
|
1093
1093
|
}
|
|
1094
1094
|
function Directory(path) {
|
|
1095
|
-
this.
|
|
1095
|
+
this.t46_1 = path;
|
|
1096
1096
|
}
|
|
1097
|
-
protoOf(Directory).
|
|
1098
|
-
var tmp = asSequence(iterator(get_fs().readdirSync(this.
|
|
1097
|
+
protoOf(Directory).u46 = function () {
|
|
1098
|
+
var tmp = asSequence(iterator(get_fs().readdirSync(this.t46_1, 'utf-8')));
|
|
1099
1099
|
var tmp_0 = map(tmp, Directory$wirespecFiles$lambda);
|
|
1100
1100
|
var tmp_1 = filter(tmp_0, Directory$wirespecFiles$lambda_0);
|
|
1101
1101
|
var tmp_2 = map(tmp_1, Directory$wirespecFiles$lambda_1);
|
|
@@ -1103,20 +1103,20 @@
|
|
|
1103
1103
|
return toSet_0(map(tmp_3, WirespecFile$_init_$ref_cj1n5j()));
|
|
1104
1104
|
};
|
|
1105
1105
|
function File(path) {
|
|
1106
|
-
this.
|
|
1106
|
+
this.s46_1 = path;
|
|
1107
1107
|
}
|
|
1108
1108
|
protoOf(File).z1a = function () {
|
|
1109
1109
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1110
|
-
return get_fs().readFileSync(this.
|
|
1110
|
+
return get_fs().readFileSync(this.s46_1.toString(), 'utf-8');
|
|
1111
1111
|
};
|
|
1112
1112
|
protoOf(File).t18 = function (string) {
|
|
1113
1113
|
// Inline function 'kotlin.run' call
|
|
1114
1114
|
// Inline function 'kotlin.contracts.contract' call
|
|
1115
1115
|
// Inline function 'community.flock.wirespec.plugin.cli.io.File.write.<anonymous>' call
|
|
1116
|
-
var $this$run = this.
|
|
1116
|
+
var $this$run = this.s46_1.k2c(joinToString(split_0(this.s46_1.g2c_1, ['out']), 'out/node'));
|
|
1117
1117
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1118
|
-
if (!get_fs().existsSync($this$run.
|
|
1119
|
-
get_fs().mkdirSync($this$run.
|
|
1118
|
+
if (!get_fs().existsSync($this$run.g2c_1)) {
|
|
1119
|
+
get_fs().mkdirSync($this$run.g2c_1, {recursive: true});
|
|
1120
1120
|
}
|
|
1121
1121
|
get_fs().writeFileSync($this$run.toString(), string);
|
|
1122
1122
|
};
|
|
@@ -194,10 +194,10 @@
|
|
|
194
194
|
var tmp;
|
|
195
195
|
switch (converters.q2_1) {
|
|
196
196
|
case 0:
|
|
197
|
-
tmp = produce_1(OpenApiV2Parser_instance.
|
|
197
|
+
tmp = produce_1(OpenApiV2Parser_instance.z2a(source));
|
|
198
198
|
break;
|
|
199
199
|
case 1:
|
|
200
|
-
tmp = produce_1(OpenApiV3Parser_instance.
|
|
200
|
+
tmp = produce_1(OpenApiV3Parser_instance.r2b(source));
|
|
201
201
|
break;
|
|
202
202
|
default:
|
|
203
203
|
noWhenBranchMatchedException();
|
|
@@ -281,7 +281,7 @@
|
|
|
281
281
|
var tmp0_iterator = this_0.g();
|
|
282
282
|
while (tmp0_iterator.h()) {
|
|
283
283
|
var item_0 = tmp0_iterator.i();
|
|
284
|
-
var tmp$ret$3 = tmp1_map_$receiver.
|
|
284
|
+
var tmp$ret$3 = tmp1_map_$receiver.k2a(item_0);
|
|
285
285
|
destination_0.e(tmp$ret$3);
|
|
286
286
|
}
|
|
287
287
|
|
|
@@ -323,7 +323,7 @@
|
|
|
323
323
|
while (tmp0_iterator_2.h()) {
|
|
324
324
|
var item_3 = tmp0_iterator_2.i();
|
|
325
325
|
// Inline function 'community.flock.wirespec.plugin.npm.emit.<anonymous>.<anonymous>' call
|
|
326
|
-
var tmp$ret$11 = OpenApiV3Emitter_getInstance().
|
|
326
|
+
var tmp$ret$11 = OpenApiV3Emitter_getInstance().d2b(item_3, null);
|
|
327
327
|
destination_3.e(tmp$ret$11);
|
|
328
328
|
}
|
|
329
329
|
|