@flock/wirespec 0.9.2 → 0.9.3
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 +1126 -1126
- package/colormath-root-colormath.js +335 -335
- package/kotlin-kotlin-stdlib.js +8 -8
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlin-rgxgen.js +1760 -1760
- package/markdown.js +1792 -1792
- package/mordant-mordant.js +1498 -1498
- package/package.json +1 -1
- package/wirespec-src-compiler-core.js +1125 -1107
- package/wirespec-src-compiler-core.js.map +1 -1
- package/wirespec-src-compiler-lib.js +231 -231
- package/wirespec-src-converter-openapi.js +223 -231
- package/wirespec-src-converter-openapi.js.map +1 -1
- package/wirespec-src-generator.js +18 -18
- package/wirespec-src-plugin-arguments.js +72 -72
- package/wirespec-src-plugin-cli.js +105 -105
- package/wirespec-src-plugin-npm.js +1 -1
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
//endregion
|
|
158
158
|
function WirespecCli$main$ref($boundThis) {
|
|
159
159
|
var l = function (p0) {
|
|
160
|
-
$boundThis.
|
|
160
|
+
$boundThis.f3h(p0);
|
|
161
161
|
return Unit_getInstance();
|
|
162
162
|
};
|
|
163
163
|
l.callableName = 'main';
|
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
function Companion() {
|
|
167
167
|
Companion_instance = this;
|
|
168
168
|
}
|
|
169
|
-
protoOf(Companion).
|
|
169
|
+
protoOf(Companion).f3t = function (compile, convert) {
|
|
170
170
|
return WirespecCli$main$ref(subcommands(new WirespecCli(), [new Compile_0(compile), new Convert_0(convert)]));
|
|
171
171
|
};
|
|
172
172
|
var Companion_instance;
|
|
@@ -180,28 +180,28 @@
|
|
|
180
180
|
NoOpCliktCommand.call(this, VOID, VOID, 'wirespec');
|
|
181
181
|
}
|
|
182
182
|
function _get_languages__ojonze($this) {
|
|
183
|
-
return $this.
|
|
183
|
+
return $this.f3u_1.h3q($this, languages$factory_0());
|
|
184
184
|
}
|
|
185
185
|
function Compile_0(block) {
|
|
186
186
|
CommonOptions.call(this);
|
|
187
|
-
this.
|
|
188
|
-
this.
|
|
187
|
+
this.e3u_1 = block;
|
|
188
|
+
this.f3u_1 = multiple(choice(option(this, Options_Language_getInstance().i3u_1.slice(), 'Language'), Companion_getInstance().o22()), VOID, true).j3r(this, languages$factory());
|
|
189
189
|
}
|
|
190
|
-
protoOf(Compile_0).
|
|
190
|
+
protoOf(Compile_0).g3h = function () {
|
|
191
191
|
// Inline function 'kotlin.let' call
|
|
192
|
-
var tmp0_let = new CompilerArguments(Compile_getInstance(), this.
|
|
192
|
+
var tmp0_let = new CompilerArguments(Compile_getInstance(), this.i3v(this.h3v()), Companion_getInstance_0().p22(this.j3v()), toSet(_get_languages__ojonze(this)), _PackageName___init__impl__s13tbs(this.k3v()), this.l3v(), this.m3v(), this.n3v());
|
|
193
193
|
// Inline function 'kotlin.contracts.contract' call
|
|
194
|
-
this.
|
|
194
|
+
this.e3u_1(tmp0_let);
|
|
195
195
|
};
|
|
196
196
|
function _get_format__qlarck($this) {
|
|
197
|
-
return $this.
|
|
197
|
+
return $this.n3w_1.h3q($this, format$factory_0());
|
|
198
198
|
}
|
|
199
199
|
function _get_languages__ojonze_0($this) {
|
|
200
|
-
return $this.
|
|
200
|
+
return $this.o3w_1.h3q($this, languages$factory_2());
|
|
201
201
|
}
|
|
202
202
|
function Convert_0(block) {
|
|
203
203
|
CommonOptions.call(this);
|
|
204
|
-
this.
|
|
204
|
+
this.m3w_1 = block;
|
|
205
205
|
var tmp = this;
|
|
206
206
|
// Inline function 'com.github.ajalt.clikt.parameters.types.enum' call
|
|
207
207
|
var tmp0_enum = argument(this, VOID, 'Input format');
|
|
@@ -222,21 +222,21 @@
|
|
|
222
222
|
tmp$ret$2 = element.b9_1;
|
|
223
223
|
tmp0_associateByTo.l2(tmp$ret$2, element);
|
|
224
224
|
}
|
|
225
|
-
tmp.
|
|
226
|
-
this.
|
|
225
|
+
tmp.n3w_1 = choice_0(tmp0_enum, tmp0_associateByTo, true).n3p(this, format$factory());
|
|
226
|
+
this.o3w_1 = multiple(choice(option(this, Options_Language_getInstance().i3u_1.slice(), 'Language'), Companion_getInstance().o22(), VOID, true), listOf(Language_Wirespec_getInstance())).j3r(this, languages$factory_1());
|
|
227
227
|
}
|
|
228
|
-
protoOf(Convert_0).
|
|
229
|
-
if (this.
|
|
228
|
+
protoOf(Convert_0).g3h = function () {
|
|
229
|
+
if (this.h3v() == null)
|
|
230
230
|
null;
|
|
231
231
|
else {
|
|
232
232
|
// Inline function 'kotlin.let' call
|
|
233
233
|
// Inline function 'kotlin.contracts.contract' call
|
|
234
|
-
this.
|
|
234
|
+
this.z3g('To convert, please specify a file', VOID, true);
|
|
235
235
|
}
|
|
236
236
|
// Inline function 'kotlin.let' call
|
|
237
237
|
var tmp = new Convert(_get_format__qlarck(this));
|
|
238
|
-
var tmp_0 = this.
|
|
239
|
-
var tmp_1 = Companion_getInstance_0().
|
|
238
|
+
var tmp_0 = this.i3v(null);
|
|
239
|
+
var tmp_1 = Companion_getInstance_0().p22(this.j3v());
|
|
240
240
|
var tmp$ret$2;
|
|
241
241
|
// Inline function 'kotlin.collections.ifEmpty' call
|
|
242
242
|
var tmp0_ifEmpty = toSet(_get_languages__ojonze_0(this));
|
|
@@ -248,42 +248,42 @@
|
|
|
248
248
|
tmp_2 = tmp0_ifEmpty;
|
|
249
249
|
}
|
|
250
250
|
tmp$ret$2 = tmp_2;
|
|
251
|
-
var tmp1_let = new CompilerArguments(tmp, tmp_0, tmp_1, tmp$ret$2, _PackageName___init__impl__s13tbs(this.
|
|
251
|
+
var tmp1_let = new CompilerArguments(tmp, tmp_0, tmp_1, tmp$ret$2, _PackageName___init__impl__s13tbs(this.k3v()), this.l3v(), this.m3v(), this.n3v());
|
|
252
252
|
// Inline function 'kotlin.contracts.contract' call
|
|
253
|
-
this.
|
|
253
|
+
this.m3w_1(tmp1_let);
|
|
254
254
|
};
|
|
255
255
|
function _get_inputFile__x1bqj($this) {
|
|
256
|
-
return $this.
|
|
256
|
+
return $this.a3v_1.h3q($this, inputFile$factory_0());
|
|
257
257
|
}
|
|
258
258
|
function CommonOptions() {
|
|
259
259
|
CliktCommand.call(this);
|
|
260
|
-
this.
|
|
261
|
-
this.
|
|
262
|
-
this.
|
|
263
|
-
this.
|
|
264
|
-
this.
|
|
265
|
-
this.
|
|
266
|
-
this.
|
|
267
|
-
}
|
|
268
|
-
protoOf(CommonOptions).
|
|
269
|
-
return this.
|
|
270
|
-
};
|
|
271
|
-
protoOf(CommonOptions).i3v = function () {
|
|
272
|
-
return this.b3v_1.g3q(this, outputDir$factory_0());
|
|
260
|
+
this.a3v_1 = option(this, Options_InputFile_getInstance().i3u_1.slice(), 'Input file').j3r(this, inputFile$factory());
|
|
261
|
+
this.b3v_1 = option(this, Options_InputDir_getInstance().i3u_1.slice(), 'Input directory').j3r(this, inputDir$factory());
|
|
262
|
+
this.c3v_1 = option(this, Options_OutputDir_getInstance().i3u_1.slice(), 'Output directory').j3r(this, outputDir$factory());
|
|
263
|
+
this.d3v_1 = default_0(option(this, Options_PackageName_getInstance().i3u_1.slice(), 'Package name'), get_DEFAULT_PACKAGE_STRING()).j3r(this, packageName$factory());
|
|
264
|
+
this.e3v_1 = flag(option(this, Options_Shared_getInstance().i3u_1.slice(), 'Generate shared wirespec code'), [], false).j3r(this, shared$factory());
|
|
265
|
+
this.f3v_1 = flag(option(this, Options_Strict_getInstance().i3u_1.slice(), 'Strict mode'), []).j3r(this, strict$factory());
|
|
266
|
+
this.g3v_1 = flag(option(this, Options_Debug_getInstance().i3u_1.slice(), 'Debug mode'), []).j3r(this, debug$factory());
|
|
267
|
+
}
|
|
268
|
+
protoOf(CommonOptions).h3v = function () {
|
|
269
|
+
return this.b3v_1.h3q(this, inputDir$factory_0());
|
|
273
270
|
};
|
|
274
271
|
protoOf(CommonOptions).j3v = function () {
|
|
275
|
-
return this.c3v_1.
|
|
272
|
+
return this.c3v_1.h3q(this, outputDir$factory_0());
|
|
276
273
|
};
|
|
277
274
|
protoOf(CommonOptions).k3v = function () {
|
|
278
|
-
return this.d3v_1.
|
|
275
|
+
return this.d3v_1.h3q(this, packageName$factory_0());
|
|
279
276
|
};
|
|
280
277
|
protoOf(CommonOptions).l3v = function () {
|
|
281
|
-
return this.e3v_1.
|
|
278
|
+
return this.e3v_1.h3q(this, shared$factory_0());
|
|
282
279
|
};
|
|
283
280
|
protoOf(CommonOptions).m3v = function () {
|
|
284
|
-
return this.f3v_1.
|
|
281
|
+
return this.f3v_1.h3q(this, strict$factory_0());
|
|
282
|
+
};
|
|
283
|
+
protoOf(CommonOptions).n3v = function () {
|
|
284
|
+
return this.g3v_1.h3q(this, debug$factory_0());
|
|
285
285
|
};
|
|
286
|
-
protoOf(CommonOptions).
|
|
286
|
+
protoOf(CommonOptions).i3v = function (inputDir) {
|
|
287
287
|
var tmp;
|
|
288
288
|
if (!(inputDir == null) ? !(_get_inputFile__x1bqj(this) == null) : false) {
|
|
289
289
|
throw IllegalStateException_init_$Create$('Choose either a file or a directory. Not Both.');
|
|
@@ -295,7 +295,7 @@
|
|
|
295
295
|
} else {
|
|
296
296
|
// Inline function 'kotlin.let' call
|
|
297
297
|
// Inline function 'kotlin.contracts.contract' call
|
|
298
|
-
tmp_0 = Companion_getInstance_1().
|
|
298
|
+
tmp_0 = Companion_getInstance_1().d22(tmp0_safe_receiver);
|
|
299
299
|
}
|
|
300
300
|
var tmp2_elvis_lhs = tmp_0;
|
|
301
301
|
var tmp_1;
|
|
@@ -341,7 +341,7 @@
|
|
|
341
341
|
}
|
|
342
342
|
function Options(name, ordinal, flags) {
|
|
343
343
|
Enum.call(this, name, ordinal);
|
|
344
|
-
this.
|
|
344
|
+
this.i3u_1 = flags;
|
|
345
345
|
}
|
|
346
346
|
function Options_InputDir_getInstance() {
|
|
347
347
|
Options_initEntries();
|
|
@@ -412,32 +412,32 @@
|
|
|
412
412
|
}
|
|
413
413
|
function inputDir$factory() {
|
|
414
414
|
return getPropertyCallableRef('inputDir', 1, KProperty1, function (receiver) {
|
|
415
|
-
return receiver.
|
|
415
|
+
return receiver.h3v();
|
|
416
416
|
}, null);
|
|
417
417
|
}
|
|
418
418
|
function outputDir$factory() {
|
|
419
419
|
return getPropertyCallableRef('outputDir', 1, KProperty1, function (receiver) {
|
|
420
|
-
return receiver.
|
|
420
|
+
return receiver.j3v();
|
|
421
421
|
}, null);
|
|
422
422
|
}
|
|
423
423
|
function packageName$factory() {
|
|
424
424
|
return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) {
|
|
425
|
-
return receiver.
|
|
425
|
+
return receiver.k3v();
|
|
426
426
|
}, null);
|
|
427
427
|
}
|
|
428
428
|
function shared$factory() {
|
|
429
429
|
return getPropertyCallableRef('shared', 1, KProperty1, function (receiver) {
|
|
430
|
-
return receiver.
|
|
430
|
+
return receiver.l3v();
|
|
431
431
|
}, null);
|
|
432
432
|
}
|
|
433
433
|
function strict$factory() {
|
|
434
434
|
return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) {
|
|
435
|
-
return receiver.
|
|
435
|
+
return receiver.m3v();
|
|
436
436
|
}, null);
|
|
437
437
|
}
|
|
438
438
|
function debug$factory() {
|
|
439
439
|
return getPropertyCallableRef('debug', 1, KProperty1, function (receiver) {
|
|
440
|
-
return receiver.
|
|
440
|
+
return receiver.n3v();
|
|
441
441
|
}, null);
|
|
442
442
|
}
|
|
443
443
|
function inputFile$factory_0() {
|
|
@@ -447,32 +447,32 @@
|
|
|
447
447
|
}
|
|
448
448
|
function inputDir$factory_0() {
|
|
449
449
|
return getPropertyCallableRef('inputDir', 1, KProperty1, function (receiver) {
|
|
450
|
-
return receiver.
|
|
450
|
+
return receiver.h3v();
|
|
451
451
|
}, null);
|
|
452
452
|
}
|
|
453
453
|
function outputDir$factory_0() {
|
|
454
454
|
return getPropertyCallableRef('outputDir', 1, KProperty1, function (receiver) {
|
|
455
|
-
return receiver.
|
|
455
|
+
return receiver.j3v();
|
|
456
456
|
}, null);
|
|
457
457
|
}
|
|
458
458
|
function packageName$factory_0() {
|
|
459
459
|
return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) {
|
|
460
|
-
return receiver.
|
|
460
|
+
return receiver.k3v();
|
|
461
461
|
}, null);
|
|
462
462
|
}
|
|
463
463
|
function shared$factory_0() {
|
|
464
464
|
return getPropertyCallableRef('shared', 1, KProperty1, function (receiver) {
|
|
465
|
-
return receiver.
|
|
465
|
+
return receiver.l3v();
|
|
466
466
|
}, null);
|
|
467
467
|
}
|
|
468
468
|
function strict$factory_0() {
|
|
469
469
|
return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) {
|
|
470
|
-
return receiver.
|
|
470
|
+
return receiver.m3v();
|
|
471
471
|
}, null);
|
|
472
472
|
}
|
|
473
473
|
function debug$factory_0() {
|
|
474
474
|
return getPropertyCallableRef('debug', 1, KProperty1, function (receiver) {
|
|
475
|
-
return receiver.
|
|
475
|
+
return receiver.n3v();
|
|
476
476
|
}, null);
|
|
477
477
|
}
|
|
478
478
|
function main(args) {
|
|
@@ -504,27 +504,27 @@
|
|
|
504
504
|
var tmp = Companion_getInstance_6();
|
|
505
505
|
var tmp_0 = compile$ref();
|
|
506
506
|
// Inline function 'kotlin.contracts.contract' call
|
|
507
|
-
tmp.
|
|
507
|
+
tmp.f3t(tmp_0, convert$ref())(tmp2_let);
|
|
508
508
|
}
|
|
509
509
|
function compile_0(arguments_0) {
|
|
510
|
-
var input = arguments_0.
|
|
511
|
-
var output = arguments_0.
|
|
512
|
-
var languages = arguments_0.
|
|
513
|
-
var packageName = arguments_0.
|
|
514
|
-
var logger = new Logger(arguments_0.
|
|
515
|
-
var operation = arguments_0.
|
|
510
|
+
var input = arguments_0.u21_1;
|
|
511
|
+
var output = arguments_0.v21_1;
|
|
512
|
+
var languages = arguments_0.w21_1;
|
|
513
|
+
var packageName = arguments_0.x21_1;
|
|
514
|
+
var logger = new Logger(arguments_0.a22_1);
|
|
515
|
+
var operation = arguments_0.t21_1;
|
|
516
516
|
if (operation instanceof Convert) {
|
|
517
517
|
var fullPath = input instanceof FullFilePath ? input : THROW_CCE();
|
|
518
518
|
var file = new JsonFile(fullPath);
|
|
519
|
-
var strict = arguments_0.
|
|
520
|
-
var format = operation.
|
|
519
|
+
var strict = arguments_0.z21_1;
|
|
520
|
+
var format = operation.c22_1;
|
|
521
521
|
var tmp;
|
|
522
522
|
switch (format.c9_1) {
|
|
523
523
|
case 0:
|
|
524
|
-
tmp = Companion_getInstance_2().
|
|
524
|
+
tmp = Companion_getInstance_2().s22(file.i12(), !strict);
|
|
525
525
|
break;
|
|
526
526
|
case 1:
|
|
527
|
-
tmp = Companion_getInstance_3().
|
|
527
|
+
tmp = Companion_getInstance_3().s22(file.i12(), !strict);
|
|
528
528
|
break;
|
|
529
529
|
default:
|
|
530
530
|
noWhenBranchMatchedException();
|
|
@@ -549,7 +549,7 @@
|
|
|
549
549
|
if (!emitter.p1r_1) {
|
|
550
550
|
var tmp$ret$6;
|
|
551
551
|
// Inline function 'kotlin.text.replaceFirstChar' call
|
|
552
|
-
var tmp0_replaceFirstChar = _FileName___get_value__impl__3u4cz6(fullPath.
|
|
552
|
+
var tmp0_replaceFirstChar = _FileName___get_value__impl__3u4cz6(fullPath.i22_1);
|
|
553
553
|
var tmp_1;
|
|
554
554
|
// Inline function 'kotlin.text.isNotEmpty' call
|
|
555
555
|
if (charSequenceLength(tmp0_replaceFirstChar) > 0) {
|
|
@@ -591,19 +591,19 @@
|
|
|
591
591
|
} else {
|
|
592
592
|
if (input instanceof FullDirPath) {
|
|
593
593
|
// Inline function 'kotlin.collections.forEach' call
|
|
594
|
-
var tmp0_iterator_1 = (new Directory(input.
|
|
594
|
+
var tmp0_iterator_1 = (new Directory(input.n22_1)).r3w().v();
|
|
595
595
|
while (tmp0_iterator_1.w()) {
|
|
596
596
|
var element = tmp0_iterator_1.y();
|
|
597
597
|
// Inline function 'community.flock.wirespec.plugin.cli.compile.<anonymous>' call
|
|
598
|
-
wirespec(element, languages, packageName, out(element.
|
|
598
|
+
wirespec(element, languages, packageName, out(element.p3w_1, packageName, output), logger);
|
|
599
599
|
}
|
|
600
600
|
} else {
|
|
601
601
|
if (input instanceof FullFilePath)
|
|
602
|
-
if (input.
|
|
602
|
+
if (input.j22_1.equals(FileExtension_Wirespec_getInstance())) {
|
|
603
603
|
// Inline function 'kotlin.let' call
|
|
604
604
|
var tmp3_let = new WirespecFile(input);
|
|
605
605
|
// Inline function 'kotlin.contracts.contract' call
|
|
606
|
-
wirespec(tmp3_let, languages, packageName, out(tmp3_let.
|
|
606
|
+
wirespec(tmp3_let, languages, packageName, out(tmp3_let.p3w_1, packageName, output), logger);
|
|
607
607
|
} else {
|
|
608
608
|
// Inline function 'kotlin.error' call
|
|
609
609
|
var tmp4_error = 'Path ' + input + ' is not a Wirespec file';
|
|
@@ -628,12 +628,12 @@
|
|
|
628
628
|
// Inline function 'community.flock.wirespec.plugin.cli.write.<anonymous>' call
|
|
629
629
|
var name = element.fd();
|
|
630
630
|
var result = element.gd();
|
|
631
|
-
var tmp1_safe_receiver = file == null ? null : file.
|
|
631
|
+
var tmp1_safe_receiver = file == null ? null : file.s3w(_FileName___init__impl__nzn12e(name));
|
|
632
632
|
var tmp;
|
|
633
633
|
if (tmp1_safe_receiver == null) {
|
|
634
634
|
tmp = null;
|
|
635
635
|
} else {
|
|
636
|
-
tmp1_safe_receiver.
|
|
636
|
+
tmp1_safe_receiver.t3w(result);
|
|
637
637
|
tmp = Unit_getInstance();
|
|
638
638
|
}
|
|
639
639
|
if (tmp == null) {
|
|
@@ -767,7 +767,7 @@
|
|
|
767
767
|
var tmp0_anonymous = results.p1q_1;
|
|
768
768
|
var tmp$ret$2;
|
|
769
769
|
// Inline function 'community.flock.wirespec.plugin.cli.wirespec.<anonymous>.<anonymous>.<anonymous>' call
|
|
770
|
-
tmp$ret$2 = listOf(new Emitted(Companion_getInstance_4().n1s(_FileName___get_value__impl__3u4cz6(path(FileExtension_Wirespec_getInstance()).
|
|
770
|
+
tmp$ret$2 = listOf(new Emitted(Companion_getInstance_4().n1s(_FileName___get_value__impl__3u4cz6(path(FileExtension_Wirespec_getInstance()).i22_1)), first(tmp0_anonymous).b1t_1));
|
|
771
771
|
tmp_0 = new Right(tmp$ret$2);
|
|
772
772
|
} else {
|
|
773
773
|
if (results instanceof Left) {
|
|
@@ -821,7 +821,7 @@
|
|
|
821
821
|
function compile$lambda($output) {
|
|
822
822
|
return function (it) {
|
|
823
823
|
var tmp = $output;
|
|
824
|
-
return new FullFilePath(_Output___get_value__impl__a8kw1g(ensureNotNull(tmp == null ? null : new Output(tmp)).
|
|
824
|
+
return new FullFilePath(_Output___get_value__impl__a8kw1g(ensureNotNull(tmp == null ? null : new Output(tmp)).q22_1), _FileName___init__impl__nzn12e('console'), it);
|
|
825
825
|
};
|
|
826
826
|
}
|
|
827
827
|
function out$lambda($output, $this_out, $packageName) {
|
|
@@ -837,49 +837,49 @@
|
|
|
837
837
|
// Inline function 'kotlin.js.asDynamic' call
|
|
838
838
|
tmp$ret$0 = tmp0_lowercase;
|
|
839
839
|
tmp$ret$1 = tmp$ret$0.toLowerCase();
|
|
840
|
-
tmp = $this_out.
|
|
840
|
+
tmp = $this_out.h22_1 + '/out/' + tmp$ret$1;
|
|
841
841
|
} else {
|
|
842
842
|
tmp = new Output(tmp0_elvis_lhs);
|
|
843
843
|
}
|
|
844
844
|
var dir = tmp;
|
|
845
|
-
return $this_out.
|
|
845
|
+
return $this_out.l22(toString(dir) + '/' + joinToString(split(_PackageName___get_value__impl__2zr98c($packageName), charArrayOf([_Char___init__impl__6a9atx(46)])), '/'), VOID, extension);
|
|
846
846
|
};
|
|
847
847
|
}
|
|
848
848
|
function JavaFile(path) {
|
|
849
|
-
File.call(this, path.
|
|
849
|
+
File.call(this, path.l22(VOID, VOID, FileExtension_Java_getInstance()));
|
|
850
850
|
}
|
|
851
|
-
protoOf(JavaFile).
|
|
852
|
-
return new JavaFile(this.
|
|
851
|
+
protoOf(JavaFile).s3w = function (fileName) {
|
|
852
|
+
return new JavaFile(this.p3w_1.l22(VOID, fileName));
|
|
853
853
|
};
|
|
854
854
|
function JsonFile(path) {
|
|
855
|
-
File.call(this, path.
|
|
855
|
+
File.call(this, path.l22(VOID, VOID, FileExtension_Json_getInstance()));
|
|
856
856
|
}
|
|
857
|
-
protoOf(JsonFile).
|
|
858
|
-
return new JsonFile(this.
|
|
857
|
+
protoOf(JsonFile).s3w = function (fileName) {
|
|
858
|
+
return new JsonFile(this.p3w_1.l22(VOID, fileName));
|
|
859
859
|
};
|
|
860
860
|
function KotlinFile(path) {
|
|
861
|
-
File.call(this, path.
|
|
861
|
+
File.call(this, path.l22(VOID, VOID, FileExtension_Kotlin_getInstance()));
|
|
862
862
|
}
|
|
863
|
-
protoOf(KotlinFile).
|
|
864
|
-
return new KotlinFile(this.
|
|
863
|
+
protoOf(KotlinFile).s3w = function (fileName) {
|
|
864
|
+
return new KotlinFile(this.p3w_1.l22(VOID, fileName));
|
|
865
865
|
};
|
|
866
866
|
function ScalaFile(path) {
|
|
867
|
-
File.call(this, path.
|
|
867
|
+
File.call(this, path.l22(VOID, VOID, FileExtension_Scala_getInstance()));
|
|
868
868
|
}
|
|
869
|
-
protoOf(ScalaFile).
|
|
870
|
-
return new ScalaFile(this.
|
|
869
|
+
protoOf(ScalaFile).s3w = function (fileName) {
|
|
870
|
+
return new ScalaFile(this.p3w_1.l22(VOID, fileName));
|
|
871
871
|
};
|
|
872
872
|
function TypeScriptFile(path) {
|
|
873
|
-
File.call(this, path.
|
|
873
|
+
File.call(this, path.l22(VOID, VOID, FileExtension_TypeScript_getInstance()));
|
|
874
874
|
}
|
|
875
|
-
protoOf(TypeScriptFile).
|
|
876
|
-
return new TypeScriptFile(this.
|
|
875
|
+
protoOf(TypeScriptFile).s3w = function (fileName) {
|
|
876
|
+
return new TypeScriptFile(this.p3w_1.l22(VOID, fileName));
|
|
877
877
|
};
|
|
878
878
|
function WirespecFile(path) {
|
|
879
|
-
File.call(this, path.
|
|
879
|
+
File.call(this, path.l22(VOID, VOID, FileExtension_Wirespec_getInstance()));
|
|
880
880
|
}
|
|
881
|
-
protoOf(WirespecFile).
|
|
882
|
-
return new WirespecFile(this.
|
|
881
|
+
protoOf(WirespecFile).s3w = function (fileName) {
|
|
882
|
+
return new WirespecFile(this.p3w_1.l22(VOID, fileName));
|
|
883
883
|
};
|
|
884
884
|
function cli(args) {
|
|
885
885
|
main(args);
|
|
@@ -942,14 +942,14 @@
|
|
|
942
942
|
return it;
|
|
943
943
|
}
|
|
944
944
|
function Directory$wirespecFiles$lambda_0(it) {
|
|
945
|
-
return endsWith(it, FileExtension_Wirespec_getInstance().
|
|
945
|
+
return endsWith(it, FileExtension_Wirespec_getInstance().g22_1);
|
|
946
946
|
}
|
|
947
947
|
function Directory$wirespecFiles$lambda_1(it) {
|
|
948
|
-
return dropLast(it, FileExtension_Wirespec_getInstance().
|
|
948
|
+
return dropLast(it, FileExtension_Wirespec_getInstance().g22_1.length + 1 | 0);
|
|
949
949
|
}
|
|
950
950
|
function Directory$wirespecFiles$lambda_2(this$0) {
|
|
951
951
|
return function (it) {
|
|
952
|
-
return new FullFilePath(this$0.
|
|
952
|
+
return new FullFilePath(this$0.q3w_1, _FileName___init__impl__nzn12e(it));
|
|
953
953
|
};
|
|
954
954
|
}
|
|
955
955
|
function WirespecFile$_init_$ref_cj1n5j() {
|
|
@@ -960,10 +960,10 @@
|
|
|
960
960
|
return l;
|
|
961
961
|
}
|
|
962
962
|
function Directory(path) {
|
|
963
|
-
this.
|
|
963
|
+
this.q3w_1 = path;
|
|
964
964
|
}
|
|
965
|
-
protoOf(Directory).
|
|
966
|
-
var tmp = asSequence(iterator(get_fs().readdirSync(this.
|
|
965
|
+
protoOf(Directory).r3w = function () {
|
|
966
|
+
var tmp = asSequence(iterator(get_fs().readdirSync(this.q3w_1, 'utf-8')));
|
|
967
967
|
var tmp_0 = map(tmp, Directory$wirespecFiles$lambda);
|
|
968
968
|
var tmp_1 = filter(tmp_0, Directory$wirespecFiles$lambda_0);
|
|
969
969
|
var tmp_2 = map(tmp_1, Directory$wirespecFiles$lambda_1);
|
|
@@ -971,20 +971,20 @@
|
|
|
971
971
|
return toSet_0(map(tmp_3, WirespecFile$_init_$ref_cj1n5j()));
|
|
972
972
|
};
|
|
973
973
|
function File(path) {
|
|
974
|
-
this.
|
|
974
|
+
this.p3w_1 = path;
|
|
975
975
|
}
|
|
976
976
|
protoOf(File).i12 = function () {
|
|
977
977
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
978
|
-
return get_fs().readFileSync(this.
|
|
978
|
+
return get_fs().readFileSync(this.p3w_1.toString(), 'utf-8');
|
|
979
979
|
};
|
|
980
|
-
protoOf(File).
|
|
980
|
+
protoOf(File).t3w = function (text) {
|
|
981
981
|
// Inline function 'kotlin.run' call
|
|
982
|
-
var tmp0_run = this.
|
|
982
|
+
var tmp0_run = this.p3w_1.l22(joinToString(split_0(this.p3w_1.h22_1, ['out']), 'out/node'));
|
|
983
983
|
// Inline function 'kotlin.contracts.contract' call
|
|
984
984
|
// Inline function 'community.flock.wirespec.plugin.cli.io.File.write.<anonymous>' call
|
|
985
985
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
986
|
-
if (!get_fs().existsSync(tmp0_run.
|
|
987
|
-
get_fs().mkdirSync(tmp0_run.
|
|
986
|
+
if (!get_fs().existsSync(tmp0_run.h22_1)) {
|
|
987
|
+
get_fs().mkdirSync(tmp0_run.h22_1, {recursive: true});
|
|
988
988
|
}
|
|
989
989
|
get_fs().writeFileSync(tmp0_run.toString(), text);
|
|
990
990
|
};
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
var tmp0_anonymous = tmp1_map.p1q_1;
|
|
70
70
|
var tmp$ret$2;
|
|
71
71
|
// Inline function 'community.flock.wirespec.plugin.npm.generate.<anonymous>' call
|
|
72
|
-
tmp$ret$2 = toString(Generator_getInstance().
|
|
72
|
+
tmp$ret$2 = toString(Generator_getInstance().e59(tmp0_anonymous, type));
|
|
73
73
|
tmp = new Right(tmp$ret$2);
|
|
74
74
|
} else {
|
|
75
75
|
if (tmp1_map instanceof Left) {
|