@flock/wirespec 0.8.13 → 0.8.14
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/Kotlinx-Cli-Library-kotlinx-cli-js-ir.js +292 -292
- package/kotlin-openapi-bindings.js +3235 -3234
- package/kotlin-openapi-bindings.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core-js-ir.js +1217 -1217
- package/kotlinx-serialization-kotlinx-serialization-core-js-ir.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json-js-ir.js +969 -969
- package/package.json +1 -1
- package/wirespec-src-compiler-cli.js +80 -80
- package/wirespec-src-compiler-core.js +1082 -1055
- package/wirespec-src-compiler-core.js.map +1 -1
- package/wirespec-src-compiler-lib.js +38 -38
- package/wirespec-src-openapi.js +364 -364
- package/wirespec-src-openapi.js.map +1 -1
package/package.json
CHANGED
|
@@ -152,18 +152,18 @@
|
|
|
152
152
|
}
|
|
153
153
|
function cli(args) {
|
|
154
154
|
var parser = new ArgParser('wirespec');
|
|
155
|
-
var debug$delegate = default_0(parser.
|
|
155
|
+
var debug$delegate = default_0(parser.b1x(Boolean_getInstance(), VOID, 'd', 'Debug mode'), false).e20(null, getLocalDelegateReference('debug', KProperty0, false, function () {
|
|
156
156
|
return THROW_ISE();
|
|
157
157
|
}));
|
|
158
|
-
var input$delegate = parser.
|
|
158
|
+
var input$delegate = parser.d1x(String_getInstance(), VOID, 'Input file').e20(null, getLocalDelegateReference('input', KProperty0, false, function () {
|
|
159
159
|
return THROW_ISE();
|
|
160
160
|
}));
|
|
161
|
-
var output$delegate = parser.
|
|
161
|
+
var output$delegate = parser.b1x(String_getInstance(), VOID, 'o', 'Output directory').e20(null, getLocalDelegateReference('output', KProperty0, false, function () {
|
|
162
162
|
return THROW_ISE();
|
|
163
163
|
}));
|
|
164
164
|
// Inline function 'kotlin.collections.map' call
|
|
165
165
|
// Inline function 'kotlin.collections.map' call
|
|
166
|
-
var tmp0_map = Companion_getInstance_3().
|
|
166
|
+
var tmp0_map = Companion_getInstance_3().k20();
|
|
167
167
|
// Inline function 'kotlin.collections.mapTo' call
|
|
168
168
|
var tmp0_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp0_map, 10));
|
|
169
169
|
var tmp0_iterator = tmp0_map.c();
|
|
@@ -181,7 +181,7 @@
|
|
|
181
181
|
var item_0 = tmp0_iterator_0.e();
|
|
182
182
|
var tmp$ret$3;
|
|
183
183
|
// Inline function 'community.flock.wirespec.compiler.cli.cli.<anonymous>' call
|
|
184
|
-
var tmp0_elvis_lhs = Companion_getInstance_3().
|
|
184
|
+
var tmp0_elvis_lhs = Companion_getInstance_3().l20(item_0);
|
|
185
185
|
var tmp;
|
|
186
186
|
if (tmp0_elvis_lhs == null) {
|
|
187
187
|
throw IllegalStateException_init_$Create$('Language not found');
|
|
@@ -192,7 +192,7 @@
|
|
|
192
192
|
tmp0_mapTo_0.a(tmp$ret$3);
|
|
193
193
|
}
|
|
194
194
|
var tmp_0 = tmp0_mapTo_0;
|
|
195
|
-
var language$delegate = multiple(default_0(parser.
|
|
195
|
+
var language$delegate = multiple(default_0(parser.b1x(new Choice(tmp_0, cli$lambda_5), VOID, 'l', 'Language type'), Jvm_Kotlin_getInstance())).e20(null, getLocalDelegateReference('language', KProperty0, false, function () {
|
|
196
196
|
return THROW_ISE();
|
|
197
197
|
}));
|
|
198
198
|
var tmp$ret$7;
|
|
@@ -210,13 +210,13 @@
|
|
|
210
210
|
tmp_2 = null;
|
|
211
211
|
}
|
|
212
212
|
tmp$ret$7 = new Choice(tmp_1, tmp_2, tmp3_Choice);
|
|
213
|
-
var openapi$delegate = parser.
|
|
213
|
+
var openapi$delegate = parser.b1x(tmp$ret$7, VOID, 'a', 'Use openapi as input').e20(null, getLocalDelegateReference('openapi', KProperty0, false, function () {
|
|
214
214
|
return THROW_ISE();
|
|
215
215
|
}));
|
|
216
|
-
var packageName$delegate = default_0(parser.
|
|
216
|
+
var packageName$delegate = default_0(parser.b1x(String_getInstance(), VOID, 'p', 'Package name'), get_DEFAULT_PACKAGE_NAME()).e20(null, getLocalDelegateReference('packageName', KProperty0, false, function () {
|
|
217
217
|
return THROW_ISE();
|
|
218
218
|
}));
|
|
219
|
-
parser.
|
|
219
|
+
parser.f1x(args);
|
|
220
220
|
var logger = new cli$logger$1(debug$delegate);
|
|
221
221
|
compile_0(toSet(cli$lambda_2(language$delegate)), cli$lambda_0(input$delegate), cli$lambda_1(output$delegate), cli$lambda_4(packageName$delegate), cli$lambda_3(openapi$delegate), logger);
|
|
222
222
|
}
|
|
@@ -269,12 +269,12 @@
|
|
|
269
269
|
function Companion() {
|
|
270
270
|
Companion_instance = this;
|
|
271
271
|
}
|
|
272
|
-
protoOf(Companion).
|
|
272
|
+
protoOf(Companion).k20 = function () {
|
|
273
273
|
return plus(get_entries(), get_entries_0());
|
|
274
274
|
};
|
|
275
|
-
protoOf(Companion).
|
|
275
|
+
protoOf(Companion).l20 = function (s) {
|
|
276
276
|
// Inline function 'kotlin.collections.find' call
|
|
277
|
-
var tmp0_find = this.
|
|
277
|
+
var tmp0_find = this.k20();
|
|
278
278
|
var tmp$ret$1;
|
|
279
279
|
$l$block: {
|
|
280
280
|
// Inline function 'kotlin.collections.firstOrNull' call
|
|
@@ -338,15 +338,15 @@
|
|
|
338
338
|
}
|
|
339
339
|
function compile_0(languages, input, output, packageName, openapi, logger) {
|
|
340
340
|
if (!(openapi == null)) {
|
|
341
|
-
var fullPath = Companion_getInstance_4().
|
|
341
|
+
var fullPath = Companion_getInstance_4().j1u(input);
|
|
342
342
|
var file = new JsonFile(fullPath);
|
|
343
343
|
var tmp;
|
|
344
344
|
switch (openapi.r4_1) {
|
|
345
345
|
case 0:
|
|
346
|
-
tmp = Companion_getInstance_0().
|
|
346
|
+
tmp = Companion_getInstance_0().j1u(file.o16());
|
|
347
347
|
break;
|
|
348
348
|
case 1:
|
|
349
|
-
tmp = Companion_getInstance_1().
|
|
349
|
+
tmp = Companion_getInstance_1().j1u(file.o16());
|
|
350
350
|
break;
|
|
351
351
|
default:
|
|
352
352
|
noWhenBranchMatchedException();
|
|
@@ -371,7 +371,7 @@
|
|
|
371
371
|
if (!emitter.bi_1) {
|
|
372
372
|
var tmp$ret$6;
|
|
373
373
|
// Inline function 'kotlin.text.replaceFirstChar' call
|
|
374
|
-
var tmp0_replaceFirstChar = fullPath.
|
|
374
|
+
var tmp0_replaceFirstChar = fullPath.q20_1;
|
|
375
375
|
var tmp_1;
|
|
376
376
|
// Inline function 'kotlin.text.isNotEmpty' call
|
|
377
377
|
if (charSequenceLength(tmp0_replaceFirstChar) > 0) {
|
|
@@ -408,15 +408,15 @@
|
|
|
408
408
|
}
|
|
409
409
|
} else {
|
|
410
410
|
// Inline function 'kotlin.collections.forEach' call
|
|
411
|
-
var tmp0_iterator_1 = (new Directory(input)).
|
|
411
|
+
var tmp0_iterator_1 = (new Directory(input)).n20().c();
|
|
412
412
|
while (tmp0_iterator_1.d()) {
|
|
413
413
|
var element = tmp0_iterator_1.e();
|
|
414
414
|
// Inline function 'community.flock.wirespec.compiler.cli.compile.<anonymous>' call
|
|
415
|
-
var path_0 = out(element.
|
|
415
|
+
var path_0 = out(element.o20_1, packageName, output);
|
|
416
416
|
// Inline function 'kotlin.collections.map' call
|
|
417
417
|
// Inline function 'kotlin.let' call
|
|
418
418
|
// Inline function 'kotlin.let' call
|
|
419
|
-
var tmp0_let = element.
|
|
419
|
+
var tmp0_let = element.o16();
|
|
420
420
|
var tmp1_let_this = Wirespec_getInstance();
|
|
421
421
|
// Inline function 'kotlin.contracts.contract' call
|
|
422
422
|
var tmp2_let = compile(tmp1_let_this, tmp0_let)(logger);
|
|
@@ -449,7 +449,7 @@
|
|
|
449
449
|
// Inline function 'community.flock.wirespec.compiler.cli.compile.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
|
|
450
450
|
var tmp$ret$20;
|
|
451
451
|
// Inline function 'kotlin.text.replaceFirstChar' call
|
|
452
|
-
var tmp0_replaceFirstChar_0 = element.
|
|
452
|
+
var tmp0_replaceFirstChar_0 = element.o20_1.q20_1;
|
|
453
453
|
var tmp_5;
|
|
454
454
|
// Inline function 'kotlin.text.isNotEmpty' call
|
|
455
455
|
if (charSequenceLength(tmp0_replaceFirstChar_0) > 0) {
|
|
@@ -515,7 +515,7 @@
|
|
|
515
515
|
// Inline function 'community.flock.wirespec.compiler.cli.write.<anonymous>' call
|
|
516
516
|
var name = element.j3();
|
|
517
517
|
var result = element.k3();
|
|
518
|
-
file.
|
|
518
|
+
file.s20(name).t20(result);
|
|
519
519
|
}
|
|
520
520
|
}
|
|
521
521
|
function emit(languages, packageName, path, logger) {
|
|
@@ -547,37 +547,37 @@
|
|
|
547
547
|
return tmp0_mapTo;
|
|
548
548
|
}
|
|
549
549
|
function cli$lambda($debug$delegate) {
|
|
550
|
-
return $debug$delegate.
|
|
550
|
+
return $debug$delegate.r1y(null, getLocalDelegateReference('debug', KProperty0, false, function () {
|
|
551
551
|
return THROW_ISE();
|
|
552
552
|
}));
|
|
553
553
|
}
|
|
554
554
|
function cli$lambda_0($input$delegate) {
|
|
555
|
-
return $input$delegate.
|
|
555
|
+
return $input$delegate.r1y(null, getLocalDelegateReference('input', KProperty0, false, function () {
|
|
556
556
|
return THROW_ISE();
|
|
557
557
|
}));
|
|
558
558
|
}
|
|
559
559
|
function cli$lambda_1($output$delegate) {
|
|
560
|
-
return $output$delegate.
|
|
560
|
+
return $output$delegate.r1y(null, getLocalDelegateReference('output', KProperty0, false, function () {
|
|
561
561
|
return THROW_ISE();
|
|
562
562
|
}));
|
|
563
563
|
}
|
|
564
564
|
function cli$lambda_2($language$delegate) {
|
|
565
|
-
return $language$delegate.
|
|
565
|
+
return $language$delegate.r1y(null, getLocalDelegateReference('language', KProperty0, false, function () {
|
|
566
566
|
return THROW_ISE();
|
|
567
567
|
}));
|
|
568
568
|
}
|
|
569
569
|
function cli$lambda_3($openapi$delegate) {
|
|
570
|
-
return $openapi$delegate.
|
|
570
|
+
return $openapi$delegate.r1y(null, getLocalDelegateReference('openapi', KProperty0, false, function () {
|
|
571
571
|
return THROW_ISE();
|
|
572
572
|
}));
|
|
573
573
|
}
|
|
574
574
|
function cli$lambda_4($packageName$delegate) {
|
|
575
|
-
return $packageName$delegate.
|
|
575
|
+
return $packageName$delegate.r1y(null, getLocalDelegateReference('packageName', KProperty0, false, function () {
|
|
576
576
|
return THROW_ISE();
|
|
577
577
|
}));
|
|
578
578
|
}
|
|
579
579
|
function cli$lambda_5(it) {
|
|
580
|
-
var tmp0_elvis_lhs = Companion_getInstance_3().
|
|
580
|
+
var tmp0_elvis_lhs = Companion_getInstance_3().l20(it);
|
|
581
581
|
var tmp;
|
|
582
582
|
if (tmp0_elvis_lhs == null) {
|
|
583
583
|
throw IllegalStateException_init_$Create$('Language not found');
|
|
@@ -644,12 +644,12 @@
|
|
|
644
644
|
// Inline function 'kotlin.js.asDynamic' call
|
|
645
645
|
tmp$ret$0 = tmp0_lowercase;
|
|
646
646
|
tmp$ret$1 = tmp$ret$0.toLowerCase();
|
|
647
|
-
tmp = $this_out.
|
|
647
|
+
tmp = $this_out.p20_1 + '/out/' + tmp$ret$1;
|
|
648
648
|
} else {
|
|
649
649
|
tmp = tmp0_elvis_lhs;
|
|
650
650
|
}
|
|
651
651
|
var dir = tmp;
|
|
652
|
-
return $this_out.
|
|
652
|
+
return $this_out.u20(dir + '/' + joinToString(split($packageName, charArrayOf([_Char___init__impl__6a9atx(46)])), '/'), VOID, extension);
|
|
653
653
|
};
|
|
654
654
|
}
|
|
655
655
|
function OpenapiVersion_V2_getInstance() {
|
|
@@ -689,7 +689,7 @@
|
|
|
689
689
|
var $ENTRIES_1;
|
|
690
690
|
function Extension(name, ordinal, ext) {
|
|
691
691
|
Enum.call(this, name, ordinal);
|
|
692
|
-
this.
|
|
692
|
+
this.x20_1 = ext;
|
|
693
693
|
}
|
|
694
694
|
function Extension_Java_getInstance() {
|
|
695
695
|
Extension_initEntries();
|
|
@@ -718,7 +718,7 @@
|
|
|
718
718
|
function Companion_0() {
|
|
719
719
|
Companion_instance_0 = this;
|
|
720
720
|
}
|
|
721
|
-
protoOf(Companion_0).
|
|
721
|
+
protoOf(Companion_0).j1u = function (input) {
|
|
722
722
|
var list = split_0(input, ['/', '.']);
|
|
723
723
|
// Inline function 'kotlin.let' call
|
|
724
724
|
// Inline function 'kotlin.text.lowercase' call
|
|
@@ -735,7 +735,7 @@
|
|
|
735
735
|
while (tmp0_iterator.d()) {
|
|
736
736
|
var element = tmp0_iterator.e();
|
|
737
737
|
// Inline function 'community.flock.wirespec.compiler.cli.io.Companion.parse.<anonymous>.<anonymous>' call
|
|
738
|
-
if (element.
|
|
738
|
+
if (element.x20_1 === tmp1_let) {
|
|
739
739
|
tmp$ret$3 = element;
|
|
740
740
|
break $l$block;
|
|
741
741
|
}
|
|
@@ -763,26 +763,26 @@
|
|
|
763
763
|
function FullFilePath(directory, fileName, extension) {
|
|
764
764
|
Companion_getInstance_4();
|
|
765
765
|
extension = extension === VOID ? Extension_Wirespec_getInstance() : extension;
|
|
766
|
-
this.
|
|
767
|
-
this.
|
|
768
|
-
this.
|
|
766
|
+
this.p20_1 = directory;
|
|
767
|
+
this.q20_1 = fileName;
|
|
768
|
+
this.r20_1 = extension;
|
|
769
769
|
}
|
|
770
770
|
protoOf(FullFilePath).toString = function () {
|
|
771
|
-
return this.
|
|
771
|
+
return this.p20_1 + '/' + this.q20_1 + '.' + this.r20_1.x20_1;
|
|
772
772
|
};
|
|
773
|
-
protoOf(FullFilePath).
|
|
773
|
+
protoOf(FullFilePath).y20 = function (directory, fileName, extension) {
|
|
774
774
|
return new FullFilePath(directory, fileName, extension);
|
|
775
775
|
};
|
|
776
|
-
protoOf(FullFilePath).
|
|
777
|
-
directory = directory === VOID ? this.
|
|
778
|
-
fileName = fileName === VOID ? this.
|
|
779
|
-
extension = extension === VOID ? this.
|
|
780
|
-
return $super === VOID ? this.
|
|
776
|
+
protoOf(FullFilePath).u20 = function (directory, fileName, extension, $super) {
|
|
777
|
+
directory = directory === VOID ? this.p20_1 : directory;
|
|
778
|
+
fileName = fileName === VOID ? this.q20_1 : fileName;
|
|
779
|
+
extension = extension === VOID ? this.r20_1 : extension;
|
|
780
|
+
return $super === VOID ? this.y20(directory, fileName, extension) : $super.y20.call(this, directory, fileName, extension);
|
|
781
781
|
};
|
|
782
782
|
protoOf(FullFilePath).hashCode = function () {
|
|
783
|
-
var result = getStringHashCode(this.
|
|
784
|
-
result = imul(result, 31) + getStringHashCode(this.
|
|
785
|
-
result = imul(result, 31) + this.
|
|
783
|
+
var result = getStringHashCode(this.p20_1);
|
|
784
|
+
result = imul(result, 31) + getStringHashCode(this.q20_1) | 0;
|
|
785
|
+
result = imul(result, 31) + this.r20_1.hashCode() | 0;
|
|
786
786
|
return result;
|
|
787
787
|
};
|
|
788
788
|
protoOf(FullFilePath).equals = function (other) {
|
|
@@ -791,63 +791,63 @@
|
|
|
791
791
|
if (!(other instanceof FullFilePath))
|
|
792
792
|
return false;
|
|
793
793
|
var tmp0_other_with_cast = other instanceof FullFilePath ? other : THROW_CCE();
|
|
794
|
-
if (!(this.o20_1 === tmp0_other_with_cast.o20_1))
|
|
795
|
-
return false;
|
|
796
794
|
if (!(this.p20_1 === tmp0_other_with_cast.p20_1))
|
|
797
795
|
return false;
|
|
798
|
-
if (!this.q20_1
|
|
796
|
+
if (!(this.q20_1 === tmp0_other_with_cast.q20_1))
|
|
797
|
+
return false;
|
|
798
|
+
if (!this.r20_1.equals(tmp0_other_with_cast.r20_1))
|
|
799
799
|
return false;
|
|
800
800
|
return true;
|
|
801
801
|
};
|
|
802
802
|
function JavaFile(path) {
|
|
803
|
-
File.call(this, path.
|
|
803
|
+
File.call(this, path.u20(VOID, VOID, Extension_Java_getInstance()));
|
|
804
804
|
}
|
|
805
|
-
protoOf(JavaFile).
|
|
806
|
-
return new JavaFile(this.
|
|
805
|
+
protoOf(JavaFile).s20 = function (fileName) {
|
|
806
|
+
return new JavaFile(this.o20_1.u20(VOID, fileName));
|
|
807
807
|
};
|
|
808
808
|
function JsonFile(path) {
|
|
809
|
-
File.call(this, path.
|
|
809
|
+
File.call(this, path.u20(VOID, VOID, Extension_Json_getInstance()));
|
|
810
810
|
}
|
|
811
|
-
protoOf(JsonFile).
|
|
812
|
-
return new JsonFile(this.
|
|
811
|
+
protoOf(JsonFile).s20 = function (fileName) {
|
|
812
|
+
return new JsonFile(this.o20_1.u20(VOID, fileName));
|
|
813
813
|
};
|
|
814
814
|
function KotlinFile(path) {
|
|
815
|
-
File.call(this, path.
|
|
815
|
+
File.call(this, path.u20(VOID, VOID, Extension_Kotlin_getInstance()));
|
|
816
816
|
}
|
|
817
|
-
protoOf(KotlinFile).
|
|
818
|
-
return new KotlinFile(this.
|
|
817
|
+
protoOf(KotlinFile).s20 = function (fileName) {
|
|
818
|
+
return new KotlinFile(this.o20_1.u20(VOID, fileName));
|
|
819
819
|
};
|
|
820
820
|
function ScalaFile(path) {
|
|
821
|
-
File.call(this, path.
|
|
821
|
+
File.call(this, path.u20(VOID, VOID, Extension_Scala_getInstance()));
|
|
822
822
|
}
|
|
823
|
-
protoOf(ScalaFile).
|
|
824
|
-
return new ScalaFile(this.
|
|
823
|
+
protoOf(ScalaFile).s20 = function (fileName) {
|
|
824
|
+
return new ScalaFile(this.o20_1.u20(VOID, fileName));
|
|
825
825
|
};
|
|
826
826
|
function TypeScriptFile(path) {
|
|
827
|
-
File.call(this, path.
|
|
827
|
+
File.call(this, path.u20(VOID, VOID, Extension_TypeScript_getInstance()));
|
|
828
828
|
}
|
|
829
|
-
protoOf(TypeScriptFile).
|
|
830
|
-
return new TypeScriptFile(this.
|
|
829
|
+
protoOf(TypeScriptFile).s20 = function (fileName) {
|
|
830
|
+
return new TypeScriptFile(this.o20_1.u20(VOID, fileName));
|
|
831
831
|
};
|
|
832
832
|
function WirespecFile(path) {
|
|
833
|
-
File.call(this, path.
|
|
833
|
+
File.call(this, path.u20(VOID, VOID, Extension_Wirespec_getInstance()));
|
|
834
834
|
}
|
|
835
|
-
protoOf(WirespecFile).
|
|
836
|
-
return new WirespecFile(this.
|
|
835
|
+
protoOf(WirespecFile).s20 = function (fileName) {
|
|
836
|
+
return new WirespecFile(this.o20_1.u20(VOID, fileName));
|
|
837
837
|
};
|
|
838
838
|
function Directory$wirespecFiles$lambda(it) {
|
|
839
839
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
840
840
|
return it;
|
|
841
841
|
}
|
|
842
842
|
function Directory$wirespecFiles$lambda_0(it) {
|
|
843
|
-
return endsWith(it, Extension_Wirespec_getInstance().
|
|
843
|
+
return endsWith(it, Extension_Wirespec_getInstance().x20_1);
|
|
844
844
|
}
|
|
845
845
|
function Directory$wirespecFiles$lambda_1(it) {
|
|
846
|
-
return dropLast(it, Extension_Wirespec_getInstance().
|
|
846
|
+
return dropLast(it, Extension_Wirespec_getInstance().x20_1.length + 1 | 0);
|
|
847
847
|
}
|
|
848
848
|
function Directory$wirespecFiles$lambda_2(this$0) {
|
|
849
849
|
return function (it) {
|
|
850
|
-
return new FullFilePath(this$0.
|
|
850
|
+
return new FullFilePath(this$0.m20_1, it);
|
|
851
851
|
};
|
|
852
852
|
}
|
|
853
853
|
function WirespecFile$_init_$ref_cj1n5j() {
|
|
@@ -858,10 +858,10 @@
|
|
|
858
858
|
return l;
|
|
859
859
|
}
|
|
860
860
|
function Directory(path) {
|
|
861
|
-
this.
|
|
861
|
+
this.m20_1 = path;
|
|
862
862
|
}
|
|
863
|
-
protoOf(Directory).
|
|
864
|
-
var tmp = asSequence(iterator(get_fs().readdirSync(this.
|
|
863
|
+
protoOf(Directory).n20 = function () {
|
|
864
|
+
var tmp = asSequence(iterator(get_fs().readdirSync(this.m20_1, 'utf-8')));
|
|
865
865
|
var tmp_0 = map(tmp, Directory$wirespecFiles$lambda);
|
|
866
866
|
var tmp_1 = filter(tmp_0, Directory$wirespecFiles$lambda_0);
|
|
867
867
|
var tmp_2 = map(tmp_1, Directory$wirespecFiles$lambda_1);
|
|
@@ -869,20 +869,20 @@
|
|
|
869
869
|
return toSet_0(map(tmp_3, WirespecFile$_init_$ref_cj1n5j()));
|
|
870
870
|
};
|
|
871
871
|
function File(path) {
|
|
872
|
-
this.
|
|
872
|
+
this.o20_1 = path;
|
|
873
873
|
}
|
|
874
|
-
protoOf(File).
|
|
874
|
+
protoOf(File).o16 = function () {
|
|
875
875
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
876
|
-
return get_fs().readFileSync(this.
|
|
876
|
+
return get_fs().readFileSync(this.o20_1.toString(), 'utf-8');
|
|
877
877
|
};
|
|
878
|
-
protoOf(File).
|
|
878
|
+
protoOf(File).t20 = function (text) {
|
|
879
879
|
// Inline function 'kotlin.run' call
|
|
880
|
-
var tmp0_run = this.
|
|
880
|
+
var tmp0_run = this.o20_1.u20(joinToString(split_0(this.o20_1.p20_1, ['out']), 'out/node'));
|
|
881
881
|
// Inline function 'kotlin.contracts.contract' call
|
|
882
882
|
// Inline function 'community.flock.wirespec.compiler.cli.io.File.write.<anonymous>' call
|
|
883
883
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
884
|
-
if (!get_fs().existsSync(tmp0_run.
|
|
885
|
-
get_fs().mkdirSync(tmp0_run.
|
|
884
|
+
if (!get_fs().existsSync(tmp0_run.p20_1)) {
|
|
885
|
+
get_fs().mkdirSync(tmp0_run.p20_1, {recursive: true});
|
|
886
886
|
}
|
|
887
887
|
get_fs().writeFileSync(tmp0_run.toString(), text);
|
|
888
888
|
};
|