@flock/wirespec 0.8.50 → 0.8.51
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 +1158 -1158
- package/colormath-root-colormath.js +366 -366
- package/kotlin-kotlin-stdlib-js-ir.js +5 -5
- package/kotlin-kotlin-stdlib-js-ir.js.map +1 -1
- package/markdown.js +1845 -1845
- package/mordant-mordant.js +1606 -1606
- package/package.json +1 -1
- package/wirespec-src-compiler-core.js +1474 -1317
- package/wirespec-src-compiler-core.js.map +1 -1
- package/wirespec-src-compiler-lib.js +205 -205
- package/wirespec-src-converter-openapi.js +187 -187
- package/wirespec-src-plugin-arguments.js +50 -50
- package/wirespec-src-plugin-cli.js +105 -105
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
//endregion
|
|
154
154
|
function WirespecCli$main$ref($boundThis) {
|
|
155
155
|
var l = function (p0) {
|
|
156
|
-
$boundThis.
|
|
156
|
+
$boundThis.a3h(p0);
|
|
157
157
|
return Unit_getInstance();
|
|
158
158
|
};
|
|
159
159
|
l.callableName = 'main';
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
function Companion() {
|
|
163
163
|
Companion_instance = this;
|
|
164
164
|
}
|
|
165
|
-
protoOf(Companion).
|
|
165
|
+
protoOf(Companion).a3t = function (compile, convert) {
|
|
166
166
|
return WirespecCli$main$ref(subcommands(new WirespecCli(), [new Compile_0(compile), new Convert_0(convert)]));
|
|
167
167
|
};
|
|
168
168
|
var Companion_instance;
|
|
@@ -176,28 +176,28 @@
|
|
|
176
176
|
NoOpCliktCommand.call(this, VOID, VOID, 'wirespec');
|
|
177
177
|
}
|
|
178
178
|
function _get_languages__ojonze($this) {
|
|
179
|
-
return $this.
|
|
179
|
+
return $this.z3t_1.c3q($this, languages$factory_0());
|
|
180
180
|
}
|
|
181
181
|
function Compile_0(block) {
|
|
182
182
|
CommonOptions.call(this);
|
|
183
|
-
this.
|
|
184
|
-
this.
|
|
183
|
+
this.y3t_1 = block;
|
|
184
|
+
this.z3t_1 = multiple(choice(option(this, Options_Language_getInstance().c3u_1.slice(), 'Language'), Companion_getInstance().r22()), VOID, true).e3r(this, languages$factory());
|
|
185
185
|
}
|
|
186
|
-
protoOf(Compile_0).
|
|
186
|
+
protoOf(Compile_0).b3h = function () {
|
|
187
187
|
// Inline function 'kotlin.let' call
|
|
188
|
-
var tmp0_let = new CompilerArguments(Compile_getInstance(), this.
|
|
188
|
+
var tmp0_let = new CompilerArguments(Compile_getInstance(), this.b3v(this.a3v()), this.c3v(), toSet(_get_languages__ojonze(this)), this.d3v(), this.e3v(), this.f3v());
|
|
189
189
|
// Inline function 'kotlin.contracts.contract' call
|
|
190
|
-
this.
|
|
190
|
+
this.y3t_1(tmp0_let);
|
|
191
191
|
};
|
|
192
192
|
function _get_format__qlarck($this) {
|
|
193
|
-
return $this.
|
|
193
|
+
return $this.e3w_1.c3q($this, format$factory_0());
|
|
194
194
|
}
|
|
195
195
|
function _get_languages__ojonze_0($this) {
|
|
196
|
-
return $this.
|
|
196
|
+
return $this.f3w_1.c3q($this, languages$factory_2());
|
|
197
197
|
}
|
|
198
198
|
function Convert_0(block) {
|
|
199
199
|
CommonOptions.call(this);
|
|
200
|
-
this.
|
|
200
|
+
this.d3w_1 = block;
|
|
201
201
|
var tmp = this;
|
|
202
202
|
// Inline function 'com.github.ajalt.clikt.parameters.types.enum' call
|
|
203
203
|
var tmp0_enum = argument(this, VOID, 'Input format');
|
|
@@ -218,21 +218,21 @@
|
|
|
218
218
|
tmp$ret$2 = element.o5_1;
|
|
219
219
|
tmp0_associateByTo.n3(tmp$ret$2, element);
|
|
220
220
|
}
|
|
221
|
-
tmp.
|
|
222
|
-
this.
|
|
221
|
+
tmp.e3w_1 = choice_0(tmp0_enum, tmp0_associateByTo, true).i3p(this, format$factory());
|
|
222
|
+
this.f3w_1 = multiple(choice(option(this, Options_Language_getInstance().c3u_1.slice(), 'Language'), Companion_getInstance().r22(), VOID, true), listOf(Spec_Wirespec_getInstance())).e3r(this, languages$factory_1());
|
|
223
223
|
}
|
|
224
|
-
protoOf(Convert_0).
|
|
225
|
-
if (this.
|
|
224
|
+
protoOf(Convert_0).b3h = function () {
|
|
225
|
+
if (this.a3v() == null)
|
|
226
226
|
null;
|
|
227
227
|
else {
|
|
228
228
|
// Inline function 'kotlin.let' call
|
|
229
229
|
// Inline function 'kotlin.contracts.contract' call
|
|
230
|
-
this.
|
|
230
|
+
this.u3g('To convert, please specify a file', VOID, true);
|
|
231
231
|
}
|
|
232
232
|
// Inline function 'kotlin.let' call
|
|
233
233
|
var tmp = new Convert(_get_format__qlarck(this));
|
|
234
|
-
var tmp_0 = this.
|
|
235
|
-
var tmp_1 = this.
|
|
234
|
+
var tmp_0 = this.b3v(null);
|
|
235
|
+
var tmp_1 = this.c3v();
|
|
236
236
|
var tmp$ret$2;
|
|
237
237
|
// Inline function 'kotlin.collections.ifEmpty' call
|
|
238
238
|
var tmp0_ifEmpty = toSet(_get_languages__ojonze_0(this));
|
|
@@ -244,38 +244,38 @@
|
|
|
244
244
|
tmp_2 = tmp0_ifEmpty;
|
|
245
245
|
}
|
|
246
246
|
tmp$ret$2 = tmp_2;
|
|
247
|
-
var tmp1_let = new CompilerArguments(tmp, tmp_0, tmp_1, tmp$ret$2, this.
|
|
247
|
+
var tmp1_let = new CompilerArguments(tmp, tmp_0, tmp_1, tmp$ret$2, this.d3v(), this.e3v(), this.f3v());
|
|
248
248
|
// Inline function 'kotlin.contracts.contract' call
|
|
249
|
-
this.
|
|
249
|
+
this.d3w_1(tmp1_let);
|
|
250
250
|
};
|
|
251
251
|
function _get_inputFile__x1bqj($this) {
|
|
252
|
-
return $this.
|
|
252
|
+
return $this.u3u_1.c3q($this, inputFile$factory_0());
|
|
253
253
|
}
|
|
254
254
|
function CommonOptions() {
|
|
255
255
|
CliktCommand.call(this);
|
|
256
|
-
this.
|
|
257
|
-
this.
|
|
258
|
-
this.
|
|
259
|
-
this.
|
|
260
|
-
this.
|
|
261
|
-
this.
|
|
262
|
-
}
|
|
263
|
-
protoOf(CommonOptions).
|
|
264
|
-
return this.
|
|
256
|
+
this.u3u_1 = option(this, Options_InputFile_getInstance().c3u_1.slice(), 'Input file').e3r(this, inputFile$factory());
|
|
257
|
+
this.v3u_1 = option(this, Options_InputDir_getInstance().c3u_1.slice(), 'Input directory').e3r(this, inputDir$factory());
|
|
258
|
+
this.w3u_1 = option(this, Options_OutputDir_getInstance().c3u_1.slice(), 'Output directory').e3r(this, outputDir$factory());
|
|
259
|
+
this.x3u_1 = default_0(option(this, Options_PackageName_getInstance().c3u_1.slice(), 'Package name'), get_DEFAULT_PACKAGE_NAME()).e3r(this, packageName$factory());
|
|
260
|
+
this.y3u_1 = flag(option(this, Options_Strict_getInstance().c3u_1.slice(), 'Strict mode'), []).e3r(this, strict$factory());
|
|
261
|
+
this.z3u_1 = flag(option(this, Options_Debug_getInstance().c3u_1.slice(), 'Debug mode'), []).e3r(this, debug$factory());
|
|
262
|
+
}
|
|
263
|
+
protoOf(CommonOptions).a3v = function () {
|
|
264
|
+
return this.v3u_1.c3q(this, inputDir$factory_0());
|
|
265
265
|
};
|
|
266
|
-
protoOf(CommonOptions).
|
|
267
|
-
return this.
|
|
266
|
+
protoOf(CommonOptions).c3v = function () {
|
|
267
|
+
return this.w3u_1.c3q(this, outputDir$factory_0());
|
|
268
268
|
};
|
|
269
|
-
protoOf(CommonOptions).
|
|
270
|
-
return this.
|
|
269
|
+
protoOf(CommonOptions).d3v = function () {
|
|
270
|
+
return this.x3u_1.c3q(this, packageName$factory_0());
|
|
271
271
|
};
|
|
272
|
-
protoOf(CommonOptions).
|
|
273
|
-
return this.
|
|
272
|
+
protoOf(CommonOptions).e3v = function () {
|
|
273
|
+
return this.y3u_1.c3q(this, strict$factory_0());
|
|
274
274
|
};
|
|
275
|
-
protoOf(CommonOptions).
|
|
276
|
-
return this.
|
|
275
|
+
protoOf(CommonOptions).f3v = function () {
|
|
276
|
+
return this.z3u_1.c3q(this, debug$factory_0());
|
|
277
277
|
};
|
|
278
|
-
protoOf(CommonOptions).
|
|
278
|
+
protoOf(CommonOptions).b3v = function (inputDir) {
|
|
279
279
|
var tmp;
|
|
280
280
|
if (!(inputDir == null) ? !(_get_inputFile__x1bqj(this) == null) : false) {
|
|
281
281
|
throw IllegalStateException_init_$Create$('Choose either a file or a directory. Not Both.');
|
|
@@ -287,7 +287,7 @@
|
|
|
287
287
|
} else {
|
|
288
288
|
// Inline function 'kotlin.let' call
|
|
289
289
|
// Inline function 'kotlin.contracts.contract' call
|
|
290
|
-
tmp_0 = Companion_getInstance_0().
|
|
290
|
+
tmp_0 = Companion_getInstance_0().h22(tmp0_safe_receiver);
|
|
291
291
|
}
|
|
292
292
|
var tmp2_elvis_lhs = tmp_0;
|
|
293
293
|
var tmp_1;
|
|
@@ -331,7 +331,7 @@
|
|
|
331
331
|
}
|
|
332
332
|
function Options(name, ordinal, flags) {
|
|
333
333
|
Enum.call(this, name, ordinal);
|
|
334
|
-
this.
|
|
334
|
+
this.c3u_1 = flags;
|
|
335
335
|
}
|
|
336
336
|
function Options_InputDir_getInstance() {
|
|
337
337
|
Options_initEntries();
|
|
@@ -398,27 +398,27 @@
|
|
|
398
398
|
}
|
|
399
399
|
function inputDir$factory() {
|
|
400
400
|
return getPropertyCallableRef('inputDir', 1, KProperty1, function (receiver) {
|
|
401
|
-
return receiver.
|
|
401
|
+
return receiver.a3v();
|
|
402
402
|
}, null);
|
|
403
403
|
}
|
|
404
404
|
function outputDir$factory() {
|
|
405
405
|
return getPropertyCallableRef('outputDir', 1, KProperty1, function (receiver) {
|
|
406
|
-
return receiver.
|
|
406
|
+
return receiver.c3v();
|
|
407
407
|
}, null);
|
|
408
408
|
}
|
|
409
409
|
function packageName$factory() {
|
|
410
410
|
return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) {
|
|
411
|
-
return receiver.
|
|
411
|
+
return receiver.d3v();
|
|
412
412
|
}, null);
|
|
413
413
|
}
|
|
414
414
|
function strict$factory() {
|
|
415
415
|
return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) {
|
|
416
|
-
return receiver.
|
|
416
|
+
return receiver.e3v();
|
|
417
417
|
}, null);
|
|
418
418
|
}
|
|
419
419
|
function debug$factory() {
|
|
420
420
|
return getPropertyCallableRef('debug', 1, KProperty1, function (receiver) {
|
|
421
|
-
return receiver.
|
|
421
|
+
return receiver.f3v();
|
|
422
422
|
}, null);
|
|
423
423
|
}
|
|
424
424
|
function inputFile$factory_0() {
|
|
@@ -428,27 +428,27 @@
|
|
|
428
428
|
}
|
|
429
429
|
function inputDir$factory_0() {
|
|
430
430
|
return getPropertyCallableRef('inputDir', 1, KProperty1, function (receiver) {
|
|
431
|
-
return receiver.
|
|
431
|
+
return receiver.a3v();
|
|
432
432
|
}, null);
|
|
433
433
|
}
|
|
434
434
|
function outputDir$factory_0() {
|
|
435
435
|
return getPropertyCallableRef('outputDir', 1, KProperty1, function (receiver) {
|
|
436
|
-
return receiver.
|
|
436
|
+
return receiver.c3v();
|
|
437
437
|
}, null);
|
|
438
438
|
}
|
|
439
439
|
function packageName$factory_0() {
|
|
440
440
|
return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) {
|
|
441
|
-
return receiver.
|
|
441
|
+
return receiver.d3v();
|
|
442
442
|
}, null);
|
|
443
443
|
}
|
|
444
444
|
function strict$factory_0() {
|
|
445
445
|
return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) {
|
|
446
|
-
return receiver.
|
|
446
|
+
return receiver.e3v();
|
|
447
447
|
}, null);
|
|
448
448
|
}
|
|
449
449
|
function debug$factory_0() {
|
|
450
450
|
return getPropertyCallableRef('debug', 1, KProperty1, function (receiver) {
|
|
451
|
-
return receiver.
|
|
451
|
+
return receiver.f3v();
|
|
452
452
|
}, null);
|
|
453
453
|
}
|
|
454
454
|
function main(args) {
|
|
@@ -480,27 +480,27 @@
|
|
|
480
480
|
var tmp = Companion_getInstance_5();
|
|
481
481
|
var tmp_0 = compile$ref();
|
|
482
482
|
// Inline function 'kotlin.contracts.contract' call
|
|
483
|
-
tmp.
|
|
483
|
+
tmp.a3t(tmp_0, convert$ref())(tmp2_let);
|
|
484
484
|
}
|
|
485
485
|
function compile_0(arguments_0) {
|
|
486
|
-
var input = arguments_0.
|
|
487
|
-
var output = arguments_0.
|
|
488
|
-
var languages = arguments_0.
|
|
489
|
-
var packageName = arguments_0.
|
|
490
|
-
var logger = new Logger(arguments_0.
|
|
491
|
-
var operation = arguments_0.
|
|
486
|
+
var input = arguments_0.a22_1;
|
|
487
|
+
var output = arguments_0.b22_1;
|
|
488
|
+
var languages = arguments_0.c22_1;
|
|
489
|
+
var packageName = arguments_0.d22_1;
|
|
490
|
+
var logger = new Logger(arguments_0.f22_1);
|
|
491
|
+
var operation = arguments_0.z21_1;
|
|
492
492
|
if (operation instanceof Convert) {
|
|
493
493
|
var fullPath = input instanceof FullFilePath ? input : THROW_CCE();
|
|
494
494
|
var file = new JsonFile(fullPath);
|
|
495
|
-
var strict = arguments_0.
|
|
496
|
-
var format = operation.
|
|
495
|
+
var strict = arguments_0.e22_1;
|
|
496
|
+
var format = operation.g22_1;
|
|
497
497
|
var tmp;
|
|
498
498
|
switch (format.p5_1) {
|
|
499
499
|
case 0:
|
|
500
|
-
tmp = Companion_getInstance_1().
|
|
500
|
+
tmp = Companion_getInstance_1().t22(file.q11(), !strict);
|
|
501
501
|
break;
|
|
502
502
|
case 1:
|
|
503
|
-
tmp = Companion_getInstance_2().
|
|
503
|
+
tmp = Companion_getInstance_2().t22(file.q11(), !strict);
|
|
504
504
|
break;
|
|
505
505
|
default:
|
|
506
506
|
noWhenBranchMatchedException();
|
|
@@ -522,10 +522,10 @@
|
|
|
522
522
|
var file_0 = item.f3();
|
|
523
523
|
var results = emitter.y1q(ast);
|
|
524
524
|
var tmp_0;
|
|
525
|
-
if (!emitter.
|
|
525
|
+
if (!emitter.q1w()) {
|
|
526
526
|
var tmp$ret$6;
|
|
527
527
|
// Inline function 'kotlin.text.replaceFirstChar' call
|
|
528
|
-
var tmp0_replaceFirstChar = fullPath.
|
|
528
|
+
var tmp0_replaceFirstChar = fullPath.m22_1;
|
|
529
529
|
var tmp_1;
|
|
530
530
|
// Inline function 'kotlin.text.isNotEmpty' call
|
|
531
531
|
if (charSequenceLength(tmp0_replaceFirstChar) > 0) {
|
|
@@ -543,7 +543,7 @@
|
|
|
543
543
|
tmp_1 = tmp0_replaceFirstChar;
|
|
544
544
|
}
|
|
545
545
|
tmp$ret$6 = tmp_1;
|
|
546
|
-
tmp_0 = to(listOf(new Emitted(tmp$ret$6, first(results).
|
|
546
|
+
tmp_0 = to(listOf(new Emitted(tmp$ret$6, first(results).q1s_1)), file_0);
|
|
547
547
|
} else {
|
|
548
548
|
tmp_0 = to(results, file_0);
|
|
549
549
|
}
|
|
@@ -567,19 +567,19 @@
|
|
|
567
567
|
} else {
|
|
568
568
|
if (input instanceof FullDirPath) {
|
|
569
569
|
// Inline function 'kotlin.collections.forEach' call
|
|
570
|
-
var tmp0_iterator_1 = (new Directory(input.
|
|
570
|
+
var tmp0_iterator_1 = (new Directory(input.q22_1)).i3w().c();
|
|
571
571
|
while (tmp0_iterator_1.d()) {
|
|
572
572
|
var element = tmp0_iterator_1.e();
|
|
573
573
|
// Inline function 'community.flock.wirespec.plugin.cli.compile.<anonymous>' call
|
|
574
|
-
wirespec(element, languages, packageName, out(element.
|
|
574
|
+
wirespec(element, languages, packageName, out(element.g3w_1, packageName, output), logger);
|
|
575
575
|
}
|
|
576
576
|
} else {
|
|
577
577
|
if (input instanceof FullFilePath)
|
|
578
|
-
if (input.
|
|
578
|
+
if (input.n22_1.equals(FileExtension_Wirespec_getInstance())) {
|
|
579
579
|
// Inline function 'kotlin.let' call
|
|
580
580
|
var tmp3_let = new WirespecFile(input);
|
|
581
581
|
// Inline function 'kotlin.contracts.contract' call
|
|
582
|
-
wirespec(tmp3_let, languages, packageName, out(tmp3_let.
|
|
582
|
+
wirespec(tmp3_let, languages, packageName, out(tmp3_let.g3w_1, packageName, output), logger);
|
|
583
583
|
} else {
|
|
584
584
|
// Inline function 'kotlin.error' call
|
|
585
585
|
var tmp4_error = 'Path ' + input + ' is not a Wirespec file';
|
|
@@ -604,12 +604,12 @@
|
|
|
604
604
|
// Inline function 'community.flock.wirespec.plugin.cli.write.<anonymous>' call
|
|
605
605
|
var name = element.e3();
|
|
606
606
|
var result = element.f3();
|
|
607
|
-
var tmp1_safe_receiver = file == null ? null : file.
|
|
607
|
+
var tmp1_safe_receiver = file == null ? null : file.u24(name);
|
|
608
608
|
var tmp;
|
|
609
609
|
if (tmp1_safe_receiver == null) {
|
|
610
610
|
tmp = null;
|
|
611
611
|
} else {
|
|
612
|
-
tmp1_safe_receiver.
|
|
612
|
+
tmp1_safe_receiver.j3w(result);
|
|
613
613
|
tmp = Unit_getInstance();
|
|
614
614
|
}
|
|
615
615
|
if (tmp == null) {
|
|
@@ -718,7 +718,7 @@
|
|
|
718
718
|
var file = item.f3();
|
|
719
719
|
var results = tmp2_let(emitter);
|
|
720
720
|
var tmp;
|
|
721
|
-
if (!emitter.
|
|
721
|
+
if (!emitter.q1w()) {
|
|
722
722
|
var tmp$ret$5;
|
|
723
723
|
// Inline function 'arrow.core.Either.map' call
|
|
724
724
|
// Inline function 'kotlin.contracts.contract' call
|
|
@@ -730,7 +730,7 @@
|
|
|
730
730
|
var tmp0_anonymous = results.x1p_1;
|
|
731
731
|
var tmp$ret$2;
|
|
732
732
|
// Inline function 'community.flock.wirespec.plugin.cli.wirespec.<anonymous>.<anonymous>.<anonymous>' call
|
|
733
|
-
tmp$ret$2 = listOf(new Emitted(Companion_getInstance_3().z1r(path(FileExtension_Wirespec_getInstance()).
|
|
733
|
+
tmp$ret$2 = listOf(new Emitted(Companion_getInstance_3().z1r(path(FileExtension_Wirespec_getInstance()).m22_1), first(tmp0_anonymous).q1s_1));
|
|
734
734
|
tmp_0 = new Right(tmp$ret$2);
|
|
735
735
|
} else {
|
|
736
736
|
if (results instanceof Left) {
|
|
@@ -798,49 +798,49 @@
|
|
|
798
798
|
// Inline function 'kotlin.js.asDynamic' call
|
|
799
799
|
tmp$ret$0 = tmp0_lowercase;
|
|
800
800
|
tmp$ret$1 = tmp$ret$0.toLowerCase();
|
|
801
|
-
tmp = $this_out.
|
|
801
|
+
tmp = $this_out.l22_1 + '/out/' + tmp$ret$1;
|
|
802
802
|
} else {
|
|
803
803
|
tmp = tmp0_elvis_lhs;
|
|
804
804
|
}
|
|
805
805
|
var dir = tmp;
|
|
806
|
-
return $this_out.
|
|
806
|
+
return $this_out.p22(dir + '/' + joinToString(split($packageName, charArrayOf([_Char___init__impl__6a9atx(46)])), '/'), VOID, extension);
|
|
807
807
|
};
|
|
808
808
|
}
|
|
809
809
|
function JavaFile(path) {
|
|
810
|
-
File.call(this, path.
|
|
810
|
+
File.call(this, path.p22(VOID, VOID, FileExtension_Java_getInstance()));
|
|
811
811
|
}
|
|
812
|
-
protoOf(JavaFile).
|
|
813
|
-
return new JavaFile(this.
|
|
812
|
+
protoOf(JavaFile).u24 = function (fileName) {
|
|
813
|
+
return new JavaFile(this.g3w_1.p22(VOID, fileName));
|
|
814
814
|
};
|
|
815
815
|
function JsonFile(path) {
|
|
816
|
-
File.call(this, path.
|
|
816
|
+
File.call(this, path.p22(VOID, VOID, FileExtension_Json_getInstance()));
|
|
817
817
|
}
|
|
818
|
-
protoOf(JsonFile).
|
|
819
|
-
return new JsonFile(this.
|
|
818
|
+
protoOf(JsonFile).u24 = function (fileName) {
|
|
819
|
+
return new JsonFile(this.g3w_1.p22(VOID, fileName));
|
|
820
820
|
};
|
|
821
821
|
function KotlinFile(path) {
|
|
822
|
-
File.call(this, path.
|
|
822
|
+
File.call(this, path.p22(VOID, VOID, FileExtension_Kotlin_getInstance()));
|
|
823
823
|
}
|
|
824
|
-
protoOf(KotlinFile).
|
|
825
|
-
return new KotlinFile(this.
|
|
824
|
+
protoOf(KotlinFile).u24 = function (fileName) {
|
|
825
|
+
return new KotlinFile(this.g3w_1.p22(VOID, fileName));
|
|
826
826
|
};
|
|
827
827
|
function ScalaFile(path) {
|
|
828
|
-
File.call(this, path.
|
|
828
|
+
File.call(this, path.p22(VOID, VOID, FileExtension_Scala_getInstance()));
|
|
829
829
|
}
|
|
830
|
-
protoOf(ScalaFile).
|
|
831
|
-
return new ScalaFile(this.
|
|
830
|
+
protoOf(ScalaFile).u24 = function (fileName) {
|
|
831
|
+
return new ScalaFile(this.g3w_1.p22(VOID, fileName));
|
|
832
832
|
};
|
|
833
833
|
function TypeScriptFile(path) {
|
|
834
|
-
File.call(this, path.
|
|
834
|
+
File.call(this, path.p22(VOID, VOID, FileExtension_TypeScript_getInstance()));
|
|
835
835
|
}
|
|
836
|
-
protoOf(TypeScriptFile).
|
|
837
|
-
return new TypeScriptFile(this.
|
|
836
|
+
protoOf(TypeScriptFile).u24 = function (fileName) {
|
|
837
|
+
return new TypeScriptFile(this.g3w_1.p22(VOID, fileName));
|
|
838
838
|
};
|
|
839
839
|
function WirespecFile(path) {
|
|
840
|
-
File.call(this, path.
|
|
840
|
+
File.call(this, path.p22(VOID, VOID, FileExtension_Wirespec_getInstance()));
|
|
841
841
|
}
|
|
842
|
-
protoOf(WirespecFile).
|
|
843
|
-
return new WirespecFile(this.
|
|
842
|
+
protoOf(WirespecFile).u24 = function (fileName) {
|
|
843
|
+
return new WirespecFile(this.g3w_1.p22(VOID, fileName));
|
|
844
844
|
};
|
|
845
845
|
function cli(args) {
|
|
846
846
|
main(args);
|
|
@@ -903,14 +903,14 @@
|
|
|
903
903
|
return it;
|
|
904
904
|
}
|
|
905
905
|
function Directory$wirespecFiles$lambda_0(it) {
|
|
906
|
-
return endsWith(it, FileExtension_Wirespec_getInstance().
|
|
906
|
+
return endsWith(it, FileExtension_Wirespec_getInstance().k22_1);
|
|
907
907
|
}
|
|
908
908
|
function Directory$wirespecFiles$lambda_1(it) {
|
|
909
|
-
return dropLast(it, FileExtension_Wirespec_getInstance().
|
|
909
|
+
return dropLast(it, FileExtension_Wirespec_getInstance().k22_1.length + 1 | 0);
|
|
910
910
|
}
|
|
911
911
|
function Directory$wirespecFiles$lambda_2(this$0) {
|
|
912
912
|
return function (it) {
|
|
913
|
-
return new FullFilePath(this$0.
|
|
913
|
+
return new FullFilePath(this$0.h3w_1, it);
|
|
914
914
|
};
|
|
915
915
|
}
|
|
916
916
|
function WirespecFile$_init_$ref_cj1n5j() {
|
|
@@ -921,10 +921,10 @@
|
|
|
921
921
|
return l;
|
|
922
922
|
}
|
|
923
923
|
function Directory(path) {
|
|
924
|
-
this.
|
|
924
|
+
this.h3w_1 = path;
|
|
925
925
|
}
|
|
926
|
-
protoOf(Directory).
|
|
927
|
-
var tmp = asSequence(iterator(get_fs().readdirSync(this.
|
|
926
|
+
protoOf(Directory).i3w = function () {
|
|
927
|
+
var tmp = asSequence(iterator(get_fs().readdirSync(this.h3w_1, 'utf-8')));
|
|
928
928
|
var tmp_0 = map(tmp, Directory$wirespecFiles$lambda);
|
|
929
929
|
var tmp_1 = filter(tmp_0, Directory$wirespecFiles$lambda_0);
|
|
930
930
|
var tmp_2 = map(tmp_1, Directory$wirespecFiles$lambda_1);
|
|
@@ -932,20 +932,20 @@
|
|
|
932
932
|
return toSet_0(map(tmp_3, WirespecFile$_init_$ref_cj1n5j()));
|
|
933
933
|
};
|
|
934
934
|
function File(path) {
|
|
935
|
-
this.
|
|
935
|
+
this.g3w_1 = path;
|
|
936
936
|
}
|
|
937
937
|
protoOf(File).q11 = function () {
|
|
938
938
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
939
|
-
return get_fs().readFileSync(this.
|
|
939
|
+
return get_fs().readFileSync(this.g3w_1.toString(), 'utf-8');
|
|
940
940
|
};
|
|
941
|
-
protoOf(File).
|
|
941
|
+
protoOf(File).j3w = function (text) {
|
|
942
942
|
// Inline function 'kotlin.run' call
|
|
943
|
-
var tmp0_run = this.
|
|
943
|
+
var tmp0_run = this.g3w_1.p22(joinToString(split_0(this.g3w_1.l22_1, ['out']), 'out/node'));
|
|
944
944
|
// Inline function 'kotlin.contracts.contract' call
|
|
945
945
|
// Inline function 'community.flock.wirespec.plugin.cli.io.File.write.<anonymous>' call
|
|
946
946
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
947
|
-
if (!get_fs().existsSync(tmp0_run.
|
|
948
|
-
get_fs().mkdirSync(tmp0_run.
|
|
947
|
+
if (!get_fs().existsSync(tmp0_run.l22_1)) {
|
|
948
|
+
get_fs().mkdirSync(tmp0_run.l22_1, {recursive: true});
|
|
949
949
|
}
|
|
950
950
|
get_fs().writeFileSync(tmp0_run.toString(), text);
|
|
951
951
|
};
|