@flock/wirespec 0.10.19 → 0.10.21

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