@flock/wirespec 0.8.43 → 0.8.44

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.
@@ -1,14 +1,14 @@
1
1
  (function (root, factory) {
2
2
  if (typeof define === 'function' && define.amd)
3
- define(['exports', './kotlin-kotlin-stdlib-js-ir.js', './Kotlinx-Cli-Library-kotlinx-cli.js', './wirespec-src-compiler-core.js', './wirespec-src-openapi.js', './arrow-arrow-core.js'], factory);
3
+ define(['exports', './kotlin-kotlin-stdlib-js-ir.js', './clikt-clikt.js', './wirespec-src-compiler-core.js', './wirespec-src-openapi.js', './arrow-arrow-core.js'], factory);
4
4
  else if (typeof exports === 'object')
5
- factory(module.exports, require('./kotlin-kotlin-stdlib-js-ir.js'), require('./Kotlinx-Cli-Library-kotlinx-cli.js'), require('./wirespec-src-compiler-core.js'), require('./wirespec-src-openapi.js'), require('./arrow-arrow-core.js'));
5
+ factory(module.exports, require('./kotlin-kotlin-stdlib-js-ir.js'), require('./clikt-clikt.js'), require('./wirespec-src-compiler-core.js'), require('./wirespec-src-openapi.js'), require('./arrow-arrow-core.js'));
6
6
  else {
7
7
  if (typeof this['kotlin-kotlin-stdlib-js-ir'] === 'undefined') {
8
8
  throw new Error("Error loading module 'wirespec-src-compiler-cli'. Its dependency 'kotlin-kotlin-stdlib-js-ir' was not found. Please, check whether 'kotlin-kotlin-stdlib-js-ir' is loaded prior to 'wirespec-src-compiler-cli'.");
9
9
  }
10
- if (typeof this['Kotlinx-Cli-Library-kotlinx-cli'] === 'undefined') {
11
- throw new Error("Error loading module 'wirespec-src-compiler-cli'. Its dependency 'Kotlinx-Cli-Library-kotlinx-cli' was not found. Please, check whether 'Kotlinx-Cli-Library-kotlinx-cli' is loaded prior to 'wirespec-src-compiler-cli'.");
10
+ if (typeof this['clikt-clikt'] === 'undefined') {
11
+ throw new Error("Error loading module 'wirespec-src-compiler-cli'. Its dependency 'clikt-clikt' was not found. Please, check whether 'clikt-clikt' is loaded prior to 'wirespec-src-compiler-cli'.");
12
12
  }
13
13
  if (typeof this['wirespec-src-compiler-core'] === 'undefined') {
14
14
  throw new Error("Error loading module 'wirespec-src-compiler-cli'. Its dependency 'wirespec-src-compiler-core' was not found. Please, check whether 'wirespec-src-compiler-core' is loaded prior to 'wirespec-src-compiler-cli'.");
@@ -19,108 +19,123 @@
19
19
  if (typeof this['arrow-arrow-core'] === 'undefined') {
20
20
  throw new Error("Error loading module 'wirespec-src-compiler-cli'. Its dependency 'arrow-arrow-core' was not found. Please, check whether 'arrow-arrow-core' is loaded prior to 'wirespec-src-compiler-cli'.");
21
21
  }
22
- root['wirespec-src-compiler-cli'] = factory(typeof this['wirespec-src-compiler-cli'] === 'undefined' ? {} : this['wirespec-src-compiler-cli'], this['kotlin-kotlin-stdlib-js-ir'], this['Kotlinx-Cli-Library-kotlinx-cli'], this['wirespec-src-compiler-core'], this['wirespec-src-openapi'], this['arrow-arrow-core']);
22
+ root['wirespec-src-compiler-cli'] = factory(typeof this['wirespec-src-compiler-cli'] === 'undefined' ? {} : this['wirespec-src-compiler-cli'], this['kotlin-kotlin-stdlib-js-ir'], this['clikt-clikt'], this['wirespec-src-compiler-core'], this['wirespec-src-openapi'], this['arrow-arrow-core']);
23
23
  }
24
- }(this, function (_, kotlin_kotlin, kotlin_org_jetbrains_kotlinx_kotlinx_cli, kotlin_community_flock_wirespec_compiler_core, kotlin_community_flock_wirespec_openapi, kotlin_io_arrow_kt_arrow_core) {
24
+ }(this, function (_, kotlin_kotlin, kotlin_clikt_clikt, kotlin_community_flock_wirespec_compiler_core, kotlin_community_flock_wirespec_openapi, kotlin_io_arrow_kt_arrow_core) {
25
25
  'use strict';
26
26
  //region block: imports
27
27
  var imul = Math.imul;
28
- var protoOf = kotlin_kotlin.$_$.v7;
29
- var hashCode = kotlin_kotlin.$_$.a7;
30
- var getStringHashCode = kotlin_kotlin.$_$.z6;
31
- var THROW_CCE = kotlin_kotlin.$_$.ia;
32
- var equals = kotlin_kotlin.$_$.v6;
33
- var classMeta = kotlin_kotlin.$_$.t6;
34
- var VOID = kotlin_kotlin.$_$.ib;
35
- var setMetadataFor = kotlin_kotlin.$_$.w7;
36
- var equals_0 = kotlin_kotlin.$_$.s8;
37
- var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.b1;
38
- var Subcommand = kotlin_org_jetbrains_kotlinx_kotlinx_cli.$_$.f;
39
- var String_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_cli.$_$.c;
40
- var Companion_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_cli.$_$.b;
41
- var toList = kotlin_kotlin.$_$.b6;
42
- var Choice = kotlin_org_jetbrains_kotlinx_kotlinx_cli.$_$.e;
43
- var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.e1;
44
- var ArgParser = kotlin_org_jetbrains_kotlinx_kotlinx_cli.$_$.d;
45
- var Boolean_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_cli.$_$.a;
46
- var default_0 = kotlin_org_jetbrains_kotlinx_kotlinx_cli.$_$.g;
47
- var collectionSizeOrDefault = kotlin_kotlin.$_$.b4;
48
- var ArrayList_init_$Create$ = kotlin_kotlin.$_$.f;
49
- var multiple = kotlin_org_jetbrains_kotlinx_kotlinx_cli.$_$.h;
28
+ var Unit_getInstance = kotlin_kotlin.$_$.t3;
29
+ var subcommands = kotlin_clikt_clikt.$_$.c;
30
+ var protoOf = kotlin_kotlin.$_$.q9;
31
+ var objectMeta = kotlin_kotlin.$_$.p9;
32
+ var VOID = kotlin_kotlin.$_$.ke;
33
+ var setMetadataFor = kotlin_kotlin.$_$.r9;
34
+ var NoOpCliktCommand = kotlin_clikt_clikt.$_$.b;
35
+ var classMeta = kotlin_kotlin.$_$.l8;
36
+ var hashCode = kotlin_kotlin.$_$.t8;
37
+ var getStringHashCode = kotlin_kotlin.$_$.s8;
38
+ var THROW_CCE = kotlin_kotlin.$_$.ld;
39
+ var equals = kotlin_kotlin.$_$.o8;
40
+ var option = kotlin_clikt_clikt.$_$.h;
41
+ var choice = kotlin_clikt_clikt.$_$.j;
42
+ var multiple = kotlin_clikt_clikt.$_$.g;
43
+ var toSet = kotlin_kotlin.$_$.o7;
44
+ var argument = kotlin_clikt_clikt.$_$.d;
45
+ var mapCapacity = kotlin_kotlin.$_$.m6;
46
+ var coerceAtLeast = kotlin_kotlin.$_$.aa;
47
+ var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.r;
48
+ var choice_0 = kotlin_clikt_clikt.$_$.i;
49
+ var listOf = kotlin_kotlin.$_$.k6;
50
+ var setOf = kotlin_kotlin.$_$.x6;
51
+ var CliktCommand = kotlin_clikt_clikt.$_$.a;
50
52
  var get_DEFAULT_PACKAGE_NAME = kotlin_community_flock_wirespec_compiler_core.$_$.a;
51
- var toSet = kotlin_kotlin.$_$.d6;
52
- var KProperty1 = kotlin_kotlin.$_$.g8;
53
- var getPropertyCallableRef = kotlin_kotlin.$_$.y6;
54
- var numberRangeToNumber = kotlin_kotlin.$_$.r7;
55
- var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.g;
56
- var Unit_getInstance = kotlin_kotlin.$_$.h3;
57
- var copyToArray = kotlin_kotlin.$_$.n4;
58
- var Logger = kotlin_community_flock_wirespec_compiler_core.$_$.a1;
59
- var endsWith = kotlin_kotlin.$_$.r8;
60
- var Companion_getInstance_0 = kotlin_community_flock_wirespec_openapi.$_$.a;
61
- var Companion_getInstance_1 = kotlin_community_flock_wirespec_openapi.$_$.b;
62
- var noWhenBranchMatchedException = kotlin_kotlin.$_$.db;
63
- var to = kotlin_kotlin.$_$.hb;
64
- var charSequenceLength = kotlin_kotlin.$_$.r6;
65
- var charSequenceGet = kotlin_kotlin.$_$.q6;
66
- var toString = kotlin_kotlin.$_$.k1;
67
- var toString_0 = kotlin_kotlin.$_$.a8;
68
- var first = kotlin_kotlin.$_$.x4;
69
- var listOf = kotlin_kotlin.$_$.k5;
70
- var enumEntries = kotlin_kotlin.$_$.j6;
71
- var Enum = kotlin_kotlin.$_$.z9;
72
- var plus = kotlin_kotlin.$_$.r5;
73
- var isInterface = kotlin_kotlin.$_$.k7;
74
- var joinToString = kotlin_kotlin.$_$.d5;
75
- var objectMeta = kotlin_kotlin.$_$.u7;
76
- var interfaceMeta = kotlin_kotlin.$_$.b7;
77
- var WirespecEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.f;
78
- var TypeScriptEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.e;
79
- var ScalaEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.d;
80
- var KotlinEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.c;
81
- var JavaEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.b;
82
- var Wirespec_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.g1;
83
- var compile = kotlin_community_flock_wirespec_compiler_core.$_$.z;
53
+ var default_0 = kotlin_clikt_clikt.$_$.e;
54
+ var flag = kotlin_clikt_clikt.$_$.f;
55
+ var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.j1;
56
+ var Enum = kotlin_kotlin.$_$.cd;
57
+ var KProperty1 = kotlin_kotlin.$_$.ja;
58
+ var getPropertyCallableRef = kotlin_kotlin.$_$.r8;
59
+ var split = kotlin_kotlin.$_$.bc;
60
+ var dropLast = kotlin_kotlin.$_$.f5;
61
+ var last = kotlin_kotlin.$_$.h6;
62
+ var plus = kotlin_kotlin.$_$.u6;
63
+ var joinToString = kotlin_kotlin.$_$.x5;
64
+ var readlnOrNull = kotlin_kotlin.$_$.c8;
65
+ var generateSequence = kotlin_kotlin.$_$.oa;
66
+ var joinToString_0 = kotlin_kotlin.$_$.pa;
67
+ var numberRangeToNumber = kotlin_kotlin.$_$.k9;
68
+ var ArrayList_init_$Create$ = kotlin_kotlin.$_$.j;
69
+ var copyToArray = kotlin_kotlin.$_$.d5;
70
+ var Logger = kotlin_community_flock_wirespec_compiler_core.$_$.b1;
71
+ var toString = kotlin_kotlin.$_$.v9;
72
+ var Companion_getInstance = kotlin_community_flock_wirespec_openapi.$_$.a;
73
+ var Companion_getInstance_0 = kotlin_community_flock_wirespec_openapi.$_$.b;
74
+ var noWhenBranchMatchedException = kotlin_kotlin.$_$.ge;
75
+ var collectionSizeOrDefault = kotlin_kotlin.$_$.q4;
76
+ var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.i;
77
+ var to = kotlin_kotlin.$_$.je;
78
+ var charSequenceLength = kotlin_kotlin.$_$.j8;
79
+ var charSequenceGet = kotlin_kotlin.$_$.i8;
80
+ var toString_0 = kotlin_kotlin.$_$.v1;
81
+ var first = kotlin_kotlin.$_$.n5;
82
+ var Emitted = kotlin_community_flock_wirespec_compiler_core.$_$.b;
83
+ var enumEntries = kotlin_kotlin.$_$.y7;
84
+ var isInterface = kotlin_kotlin.$_$.d9;
85
+ var interfaceMeta = kotlin_kotlin.$_$.u8;
86
+ var print = kotlin_kotlin.$_$.b8;
87
+ var WirespecEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.g;
88
+ var TypeScriptEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.f;
89
+ var ScalaEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.e;
90
+ var KotlinEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.d;
91
+ var JavaEmitter = kotlin_community_flock_wirespec_compiler_core.$_$.c;
92
+ var Wirespec_getInstance = kotlin_community_flock_wirespec_compiler_core.$_$.h1;
93
+ var compile = kotlin_community_flock_wirespec_compiler_core.$_$.a1;
84
94
  var Left = kotlin_io_arrow_kt_arrow_core.$_$.c;
95
+ var Companion_getInstance_1 = kotlin_community_flock_wirespec_compiler_core.$_$.g1;
85
96
  var Right = kotlin_io_arrow_kt_arrow_core.$_$.d;
86
- var println = kotlin_kotlin.$_$.k6;
87
- var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.h1;
88
- var charArrayOf = kotlin_kotlin.$_$.o6;
89
- var split = kotlin_kotlin.$_$.e9;
90
- var split_0 = kotlin_kotlin.$_$.f9;
91
- var dropLast = kotlin_kotlin.$_$.p4;
92
- var last = kotlin_kotlin.$_$.h5;
93
- var dropLast_0 = kotlin_kotlin.$_$.p8;
94
- var iterator = kotlin_kotlin.$_$.o7;
95
- var asSequence = kotlin_kotlin.$_$.i8;
96
- var map = kotlin_kotlin.$_$.l8;
97
- var filter = kotlin_kotlin.$_$.j8;
98
- var toSet_0 = kotlin_kotlin.$_$.m8;
99
- var Companion_getInstance_2 = kotlin_kotlin.$_$.c3;
100
- var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.l1;
101
- var createFailure = kotlin_kotlin.$_$.wa;
102
- var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.o1;
103
- var isObject = kotlin_kotlin.$_$.m7;
104
- var _Result___get_isFailure__impl__jpiriv = kotlin_kotlin.$_$.n1;
105
- var isArray = kotlin_kotlin.$_$.c7;
97
+ var println = kotlin_kotlin.$_$.z7;
98
+ var ensureNotNull = kotlin_kotlin.$_$.ae;
99
+ var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.r1;
100
+ var charArrayOf = kotlin_kotlin.$_$.g8;
101
+ var split_0 = kotlin_kotlin.$_$.ac;
102
+ var endsWith = kotlin_kotlin.$_$.bb;
103
+ var dropLast_0 = kotlin_kotlin.$_$.za;
104
+ var iterator = kotlin_kotlin.$_$.h9;
105
+ var asSequence = kotlin_kotlin.$_$.la;
106
+ var map = kotlin_kotlin.$_$.qa;
107
+ var filter = kotlin_kotlin.$_$.ma;
108
+ var toSet_0 = kotlin_kotlin.$_$.sa;
109
+ var Companion_getInstance_2 = kotlin_kotlin.$_$.o3;
110
+ var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.w1;
111
+ var createFailure = kotlin_kotlin.$_$.zd;
112
+ var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.a2;
113
+ var isObject = kotlin_kotlin.$_$.f9;
114
+ var _Result___get_isFailure__impl__jpiriv = kotlin_kotlin.$_$.y1;
115
+ var isArray = kotlin_kotlin.$_$.v8;
106
116
  //endregion
107
117
  //region block: pre-declaration
118
+ setMetadataFor(Companion, 'Companion', objectMeta);
119
+ setMetadataFor(WirespecCli, 'WirespecCli', classMeta, NoOpCliktCommand);
108
120
  setMetadataFor(Arguments, 'Arguments', classMeta);
109
- setMetadataFor(CompileCommand, 'CompileCommand', classMeta, Subcommand);
110
- setMetadataFor(ConvertCommand, 'ConvertCommand', classMeta, Subcommand);
111
- setMetadataFor(CommandLineEntitiesParser, 'CommandLineEntitiesParser', classMeta, ArgParser);
121
+ setMetadataFor(Compile, 'Compile', objectMeta);
112
122
  setMetadataFor(Convert, 'Convert', classMeta);
113
- setMetadataFor(Compile, 'Compile', classMeta);
123
+ setMetadataFor(CommonOptions, 'CommonOptions', classMeta, CliktCommand);
124
+ setMetadataFor(Compile_0, 'Compile', classMeta, CommonOptions);
125
+ setMetadataFor(Convert_0, 'Convert', classMeta, CommonOptions);
126
+ setMetadataFor(Options, 'Options', classMeta, Enum);
127
+ setMetadataFor(Companion_0, 'Companion', objectMeta);
128
+ setMetadataFor(FullFilePath, 'FullFilePath', classMeta);
129
+ setMetadataFor(Console, 'Console', objectMeta);
130
+ setMetadataFor(FullDirPath, 'FullDirPath', classMeta);
114
131
  setMetadataFor(Language, 'Language', interfaceMeta);
115
132
  setMetadataFor(Jvm, 'Jvm', classMeta, Enum, [Enum, Language]);
116
133
  setMetadataFor(Script, 'Script', classMeta, Enum, [Enum, Language]);
117
134
  setMetadataFor(Spec, 'Spec', classMeta, Enum, [Enum, Language]);
118
- setMetadataFor(Companion, 'Companion', objectMeta);
119
- setMetadataFor(Companion_0, 'Companion', objectMeta);
135
+ setMetadataFor(Companion_1, 'Companion', objectMeta);
136
+ setMetadataFor(Companion_2, 'Companion', objectMeta);
120
137
  setMetadataFor(Format, 'Format', classMeta, Enum);
121
138
  setMetadataFor(Extension, 'Extension', classMeta, Enum);
122
- setMetadataFor(Companion_1, 'Companion', objectMeta);
123
- setMetadataFor(FullFilePath, 'FullFilePath', classMeta);
124
139
  setMetadataFor(File, 'File', classMeta);
125
140
  setMetadataFor(JavaFile, 'JavaFile', classMeta, File);
126
141
  setMetadataFor(JsonFile, 'JsonFile', classMeta, File);
@@ -130,24 +145,50 @@
130
145
  setMetadataFor(WirespecFile, 'WirespecFile', classMeta, File);
131
146
  setMetadataFor(Directory, 'Directory', classMeta);
132
147
  //endregion
133
- function Arguments(operation, output, languages, packageName, strict, debug) {
134
- this.u21_1 = operation;
135
- this.v21_1 = output;
136
- this.w21_1 = languages;
137
- this.x21_1 = packageName;
138
- this.y21_1 = strict;
139
- this.z21_1 = debug;
148
+ function WirespecCli$main$ref($boundThis) {
149
+ var l = function (p0) {
150
+ $boundThis.a39(p0);
151
+ return Unit_getInstance();
152
+ };
153
+ l.callableName = 'main';
154
+ return l;
155
+ }
156
+ function Companion() {
157
+ Companion_instance = this;
158
+ }
159
+ protoOf(Companion).a3l = function (compile, convert) {
160
+ return WirespecCli$main$ref(subcommands(new WirespecCli(), [new Compile_0(compile), new Convert_0(convert)]));
161
+ };
162
+ var Companion_instance;
163
+ function Companion_getInstance_3() {
164
+ if (Companion_instance == null)
165
+ new Companion();
166
+ return Companion_instance;
167
+ }
168
+ function WirespecCli() {
169
+ Companion_getInstance_3();
170
+ NoOpCliktCommand.call(this, VOID, VOID, 'wirespec');
171
+ }
172
+ function Arguments(operation, input, output, languages, packageName, strict, debug) {
173
+ this.b3l_1 = operation;
174
+ this.c3l_1 = input;
175
+ this.d3l_1 = output;
176
+ this.e3l_1 = languages;
177
+ this.f3l_1 = packageName;
178
+ this.g3l_1 = strict;
179
+ this.h3l_1 = debug;
140
180
  }
141
181
  protoOf(Arguments).toString = function () {
142
- return 'Arguments(operation=' + this.u21_1 + ', output=' + this.v21_1 + ', languages=' + this.w21_1 + ', packageName=' + this.x21_1 + ', strict=' + this.y21_1 + ', debug=' + this.z21_1 + ')';
182
+ return 'Arguments(operation=' + this.b3l_1 + ', input=' + this.c3l_1 + ', output=' + this.d3l_1 + ', languages=' + this.e3l_1 + ', packageName=' + this.f3l_1 + ', strict=' + this.g3l_1 + ', debug=' + this.h3l_1 + ')';
143
183
  };
144
184
  protoOf(Arguments).hashCode = function () {
145
- var result = hashCode(this.u21_1);
146
- result = imul(result, 31) + (this.v21_1 == null ? 0 : getStringHashCode(this.v21_1)) | 0;
147
- result = imul(result, 31) + hashCode(this.w21_1) | 0;
148
- result = imul(result, 31) + getStringHashCode(this.x21_1) | 0;
149
- result = imul(result, 31) + (this.y21_1 | 0) | 0;
150
- result = imul(result, 31) + (this.z21_1 | 0) | 0;
185
+ var result = hashCode(this.b3l_1);
186
+ result = imul(result, 31) + hashCode(this.c3l_1) | 0;
187
+ result = imul(result, 31) + (this.d3l_1 == null ? 0 : getStringHashCode(this.d3l_1)) | 0;
188
+ result = imul(result, 31) + hashCode(this.e3l_1) | 0;
189
+ result = imul(result, 31) + getStringHashCode(this.f3l_1) | 0;
190
+ result = imul(result, 31) + (this.g3l_1 | 0) | 0;
191
+ result = imul(result, 31) + (this.h3l_1 | 0) | 0;
151
192
  return result;
152
193
  };
153
194
  protoOf(Arguments).equals = function (other) {
@@ -156,219 +197,53 @@
156
197
  if (!(other instanceof Arguments))
157
198
  return false;
158
199
  var tmp0_other_with_cast = other instanceof Arguments ? other : THROW_CCE();
159
- if (!equals(this.u21_1, tmp0_other_with_cast.u21_1))
200
+ if (!equals(this.b3l_1, tmp0_other_with_cast.b3l_1))
160
201
  return false;
161
- if (!(this.v21_1 == tmp0_other_with_cast.v21_1))
202
+ if (!equals(this.c3l_1, tmp0_other_with_cast.c3l_1))
162
203
  return false;
163
- if (!equals(this.w21_1, tmp0_other_with_cast.w21_1))
204
+ if (!(this.d3l_1 == tmp0_other_with_cast.d3l_1))
164
205
  return false;
165
- if (!(this.x21_1 === tmp0_other_with_cast.x21_1))
206
+ if (!equals(this.e3l_1, tmp0_other_with_cast.e3l_1))
166
207
  return false;
167
- if (!(this.y21_1 === tmp0_other_with_cast.y21_1))
208
+ if (!(this.f3l_1 === tmp0_other_with_cast.f3l_1))
168
209
  return false;
169
- if (!(this.z21_1 === tmp0_other_with_cast.z21_1))
210
+ if (!(this.g3l_1 === tmp0_other_with_cast.g3l_1))
211
+ return false;
212
+ if (!(this.h3l_1 === tmp0_other_with_cast.h3l_1))
170
213
  return false;
171
214
  return true;
172
215
  };
173
- function _get_input__g2gq7t($this) {
174
- return $this.w22_1.b20($this, input$factory_0());
175
- }
176
- function _get_input__g2gq7t_0($this) {
177
- return $this.u23_1.b20($this, input$factory_2());
216
+ function Compile() {
217
+ Compile_instance = this;
178
218
  }
179
- function _get_format__qlarck($this) {
180
- return $this.v23_1.b20($this, format$factory_0());
181
- }
182
- function CommandLineEntitiesParser$ConvertCommand$format$delegate$lambda(it) {
183
- // Inline function 'kotlin.text.lowercase' call
184
- // Inline function 'kotlin.js.asDynamic' call
185
- return it.toString().toLowerCase();
186
- }
187
- function CommandLineEntitiesParser$ConvertCommand$format$delegate$lambda_0($tmp1_Choice) {
188
- return function (it) {
189
- var tmp$ret$3;
190
- // Inline function 'kotlin.collections.find' call
191
- var tmp$ret$0;
192
- // Inline function 'kotlin.enumValues' call
193
- tmp$ret$0 = values_2();
194
- var tmp0_find = tmp$ret$0;
195
- var tmp$ret$2;
196
- $l$block: {
197
- // Inline function 'kotlin.collections.firstOrNull' call
198
- var indexedObject = tmp0_find;
199
- var inductionVariable = 0;
200
- var last = indexedObject.length;
201
- while (inductionVariable < last) {
202
- var element = indexedObject[inductionVariable];
203
- inductionVariable = inductionVariable + 1 | 0;
204
- var tmp$ret$1;
205
- // Inline function 'kotlinx.cli.Companion.Choice.<anonymous>.<anonymous>' call
206
- tmp$ret$1 = equals_0($tmp1_Choice(element), it, true);
207
- if (tmp$ret$1) {
208
- tmp$ret$2 = element;
209
- break $l$block;
210
- }
211
- }
212
- tmp$ret$2 = null;
213
- }
214
- tmp$ret$3 = tmp$ret$2;
215
- var tmp0_elvis_lhs = tmp$ret$3;
216
- var tmp;
217
- if (tmp0_elvis_lhs == null) {
218
- throw IllegalArgumentException_init_$Create$('No enum constant ' + it);
219
- } else {
220
- tmp = tmp0_elvis_lhs;
221
- }
222
- return tmp;
223
- };
224
- }
225
- function _get_output__ji2uqy($this) {
226
- return $this.s24_1.b20($this, output$factory_0());
227
- }
228
- function _get_debug__ikvxnm($this) {
229
- return $this.t24_1.b20($this, debug$factory_0());
230
- }
231
- function _get_languages__ojonze($this) {
232
- return $this.u24_1.b20($this, languages$factory_0());
233
- }
234
- function _get_packageName__3ybzuo($this) {
235
- return $this.v24_1.b20($this, packageName$factory_0());
236
- }
237
- function _get_strict__6o9vtu($this) {
238
- return $this.w24_1.b20($this, strict$factory_0());
239
- }
240
- function CompileCommand() {
241
- Subcommand.call(this, 'compile', 'Compile Wirespec');
242
- this.w22_1 = this.m1y(String_getInstance(), VOID, 'Input file').o21(this, input$factory());
243
- this.x22_1 = null;
244
- }
245
- protoOf(CompileCommand).z1z = function () {
246
- this.x22_1 = new Compile(_get_input__g2gq7t(this));
219
+ protoOf(Compile).toString = function () {
220
+ return 'Compile';
247
221
  };
248
- function ConvertCommand() {
249
- Subcommand.call(this, 'convert', 'Convert from OpenAPI');
250
- this.u23_1 = this.m1y(String_getInstance(), VOID, 'Input file').o21(this, input$factory_1());
251
- var tmp = this;
252
- var tmp$ret$1;
253
- // Inline function 'kotlinx.cli.Companion.Choice' call
254
- Companion_getInstance();
255
- var tmp1_Choice = CommandLineEntitiesParser$ConvertCommand$format$delegate$lambda;
256
- var tmp$ret$0;
257
- // Inline function 'kotlin.enumValues' call
258
- tmp$ret$0 = values_2();
259
- var tmp_0 = toList(tmp$ret$0);
260
- var tmp_1;
261
- if (null == null) {
262
- tmp_1 = CommandLineEntitiesParser$ConvertCommand$format$delegate$lambda_0(tmp1_Choice);
263
- } else {
264
- tmp_1 = null;
265
- }
266
- tmp$ret$1 = new Choice(tmp_0, tmp_1, tmp1_Choice);
267
- tmp.v23_1 = this.m1y(tmp$ret$1, VOID, 'Input format').o21(this, format$factory());
268
- this.w23_1 = null;
269
- }
270
- protoOf(ConvertCommand).z1z = function () {
271
- this.w23_1 = new Convert(_get_format__qlarck(this), _get_input__g2gq7t_0(this));
222
+ protoOf(Compile).hashCode = function () {
223
+ return -1309483685;
272
224
  };
273
- function CommandLineEntitiesParser$languages$delegate$lambda(it) {
274
- var tmp0_elvis_lhs = Companion_getInstance_3().x24(it);
275
- var tmp;
276
- if (tmp0_elvis_lhs == null) {
277
- throw IllegalStateException_init_$Create$('Language not found');
278
- } else {
279
- tmp = tmp0_elvis_lhs;
280
- }
281
- return tmp;
282
- }
283
- function CommandLineEntitiesParser(args) {
284
- ArgParser.call(this, 'wirespec');
285
- this.r24_1 = args;
286
- this.s24_1 = this.k1y(String_getInstance(), VOID, 'o', 'Output directory').o21(this, output$factory());
287
- this.t24_1 = default_0(this.k1y(Boolean_getInstance(), VOID, 'd', 'Debug mode'), false).o21(this, debug$factory());
288
- var tmp = this;
289
- // Inline function 'kotlin.collections.map' call
290
- // Inline function 'kotlin.collections.map' call
291
- var tmp0_map = Companion_getInstance_3().y24();
292
- // Inline function 'kotlin.collections.mapTo' call
293
- var tmp0_mapTo = ArrayList_init_$Create$(collectionSizeOrDefault(tmp0_map, 10));
294
- var tmp0_iterator = tmp0_map.c();
295
- while (tmp0_iterator.d()) {
296
- var item = tmp0_iterator.e();
297
- var tmp$ret$0;
298
- // Inline function 'community.flock.wirespec.compiler.cli.CommandLineEntitiesParser.languages$delegate.<anonymous>' call
299
- tmp$ret$0 = item.t4_1;
300
- tmp0_mapTo.a(tmp$ret$0);
301
- }
302
- // Inline function 'kotlin.collections.mapTo' call
303
- var tmp0_mapTo_0 = ArrayList_init_$Create$(collectionSizeOrDefault(tmp0_mapTo, 10));
304
- var tmp0_iterator_0 = tmp0_mapTo.c();
305
- while (tmp0_iterator_0.d()) {
306
- var item_0 = tmp0_iterator_0.e();
307
- var tmp$ret$3;
308
- // Inline function 'community.flock.wirespec.compiler.cli.CommandLineEntitiesParser.languages$delegate.<anonymous>' call
309
- var tmp0_elvis_lhs = Companion_getInstance_3().x24(item_0);
310
- var tmp_0;
311
- if (tmp0_elvis_lhs == null) {
312
- throw IllegalStateException_init_$Create$('Language not found');
313
- } else {
314
- tmp_0 = tmp0_elvis_lhs;
315
- }
316
- tmp$ret$3 = tmp_0;
317
- tmp0_mapTo_0.a(tmp$ret$3);
318
- }
319
- var tmp_1 = tmp0_mapTo_0;
320
- tmp.u24_1 = multiple(this.k1y(new Choice(tmp_1, CommandLineEntitiesParser$languages$delegate$lambda), VOID, 'l', 'Language type')).o21(this, languages$factory());
321
- this.v24_1 = default_0(this.k1y(String_getInstance(), VOID, 'p', 'Package name'), get_DEFAULT_PACKAGE_NAME()).o21(this, packageName$factory());
322
- this.w24_1 = default_0(this.k1y(Boolean_getInstance(), VOID, 's', 'Strict mode'), false).o21(this, strict$factory());
323
- }
324
- protoOf(CommandLineEntitiesParser).s1v = function () {
325
- // Inline function 'kotlin.run' call
326
- // Inline function 'kotlin.contracts.contract' call
327
- // Inline function 'community.flock.wirespec.compiler.cli.CommandLineEntitiesParser.parse.<anonymous>' call
328
- var compileCommand = new CompileCommand();
329
- var convertCommand = new ConvertCommand();
330
- this.n1y([compileCommand, convertCommand]);
331
- var tmp;
332
- // Inline function 'kotlin.collections.isNotEmpty' call
333
- // Inline function 'kotlin.collections.isEmpty' call
334
- if (!(this.r24_1.length === 0)) {
335
- tmp = this.r24_1;
336
- } else {
337
- // Inline function 'kotlin.arrayOf' call
338
- // Inline function 'kotlin.js.unsafeCast' call
339
- // Inline function 'kotlin.js.asDynamic' call
340
- tmp = ['-h'];
341
- }
342
- this.l1z(tmp);
343
- var tmp_0 = this.c1x_1.o2('compile');
344
- var tmp0_safe_receiver = tmp_0 instanceof CompileCommand ? tmp_0 : null;
345
- var compile = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.x22_1;
346
- var tmp_1 = this.c1x_1.o2('convert');
347
- var tmp1_safe_receiver = tmp_1 instanceof ConvertCommand ? tmp_1 : null;
348
- var convert = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.w23_1;
349
- var tmp3_elvis_lhs = compile == null ? convert : compile;
350
- var tmp_2;
351
- if (tmp3_elvis_lhs == null) {
352
- throw IllegalStateException_init_$Create$('provide an operation');
353
- } else {
354
- tmp_2 = tmp3_elvis_lhs;
355
- }
356
- return new Arguments(tmp_2, _get_output__ji2uqy(this), toSet(_get_languages__ojonze(this)), _get_packageName__3ybzuo(this), _get_strict__6o9vtu(this), _get_debug__ikvxnm(this));
225
+ protoOf(Compile).equals = function (other) {
226
+ if (this === other)
227
+ return true;
228
+ if (!(other instanceof Compile))
229
+ return false;
230
+ other instanceof Compile || THROW_CCE();
231
+ return true;
357
232
  };
358
- function Convert(format, input) {
359
- this.z24_1 = format;
360
- this.a25_1 = input;
233
+ var Compile_instance;
234
+ function Compile_getInstance() {
235
+ if (Compile_instance == null)
236
+ new Compile();
237
+ return Compile_instance;
238
+ }
239
+ function Convert(format) {
240
+ this.i3l_1 = format;
361
241
  }
362
- protoOf(Convert).b25 = function () {
363
- return this.a25_1;
364
- };
365
242
  protoOf(Convert).toString = function () {
366
- return 'Convert(format=' + this.z24_1 + ', input=' + this.a25_1 + ')';
243
+ return 'Convert(format=' + this.i3l_1 + ')';
367
244
  };
368
245
  protoOf(Convert).hashCode = function () {
369
- var result = this.z24_1.hashCode();
370
- result = imul(result, 31) + getStringHashCode(this.a25_1) | 0;
371
- return result;
246
+ return this.i3l_1.hashCode();
372
247
  };
373
248
  protoOf(Convert).equals = function (other) {
374
249
  if (this === other)
@@ -376,125 +251,432 @@
376
251
  if (!(other instanceof Convert))
377
252
  return false;
378
253
  var tmp0_other_with_cast = other instanceof Convert ? other : THROW_CCE();
379
- if (!this.z24_1.equals(tmp0_other_with_cast.z24_1))
380
- return false;
381
- if (!(this.a25_1 === tmp0_other_with_cast.a25_1))
254
+ if (!this.i3l_1.equals(tmp0_other_with_cast.i3l_1))
382
255
  return false;
383
256
  return true;
384
257
  };
385
- function Compile(input) {
386
- this.c25_1 = input;
258
+ function _get_languages__ojonze($this) {
259
+ return $this.h3m_1.c3i($this, languages$factory_0());
260
+ }
261
+ function Compile_0(block) {
262
+ CommonOptions.call(this);
263
+ this.g3m_1 = block;
264
+ this.h3m_1 = multiple(choice(option(this, Options_Language_getInstance().k3m_1.slice(), 'Language'), Companion_getInstance_5().l3m()), VOID, true).e3j(this, languages$factory());
387
265
  }
388
- protoOf(Compile).b25 = function () {
389
- return this.c25_1;
266
+ protoOf(Compile_0).b39 = function () {
267
+ // Inline function 'kotlin.let' call
268
+ var tmp0_let = new Arguments(Compile_getInstance(), this.k3n(this.j3n()), this.l3n(), toSet(_get_languages__ojonze(this)), this.m3n(), this.n3n(), this.o3n());
269
+ // Inline function 'kotlin.contracts.contract' call
270
+ this.g3m_1(tmp0_let);
390
271
  };
391
- protoOf(Compile).toString = function () {
392
- return 'Compile(input=' + this.c25_1 + ')';
272
+ function _get_format__qlarck($this) {
273
+ return $this.n3o_1.c3i($this, format$factory_0());
274
+ }
275
+ function _get_languages__ojonze_0($this) {
276
+ return $this.o3o_1.c3i($this, languages$factory_2());
277
+ }
278
+ function Convert_0(block) {
279
+ CommonOptions.call(this);
280
+ this.m3o_1 = block;
281
+ var tmp = this;
282
+ // Inline function 'com.github.ajalt.clikt.parameters.types.enum' call
283
+ var tmp0_enum = argument(this, VOID, 'Input format');
284
+ // Inline function 'kotlin.collections.associateBy' call
285
+ // Inline function 'kotlin.enumValues' call
286
+ var tmp0_associateBy = values_3();
287
+ var capacity = coerceAtLeast(mapCapacity(tmp0_associateBy.length), 16);
288
+ // Inline function 'kotlin.collections.associateByTo' call
289
+ var tmp0_associateByTo = LinkedHashMap_init_$Create$(capacity);
290
+ var inductionVariable = 0;
291
+ var last = tmp0_associateBy.length;
292
+ while (inductionVariable < last) {
293
+ var element = tmp0_associateBy[inductionVariable];
294
+ inductionVariable = inductionVariable + 1 | 0;
295
+ var tmp$ret$2;
296
+ // Inline function 'com.github.ajalt.clikt.parameters.types.enum.<anonymous>' call
297
+ // Inline function 'com.github.ajalt.clikt.parameters.types.enum.<anonymous>' call
298
+ tmp$ret$2 = element.o5_1;
299
+ tmp0_associateByTo.n3(tmp$ret$2, element);
300
+ }
301
+ tmp.n3o_1 = choice_0(tmp0_enum, tmp0_associateByTo, true).i3h(this, format$factory());
302
+ this.o3o_1 = multiple(choice(option(this, Options_Language_getInstance().k3m_1.slice(), 'Language'), Companion_getInstance_5().l3m(), VOID, true), listOf(Spec_Wirespec_getInstance())).e3j(this, languages$factory_1());
303
+ }
304
+ protoOf(Convert_0).b39 = function () {
305
+ if (this.j3n() == null)
306
+ null;
307
+ else {
308
+ // Inline function 'kotlin.let' call
309
+ // Inline function 'kotlin.contracts.contract' call
310
+ this.u38('To convert, please specify a file', VOID, true);
311
+ }
312
+ // Inline function 'kotlin.let' call
313
+ var tmp = new Convert(_get_format__qlarck(this));
314
+ var tmp_0 = this.k3n(null);
315
+ var tmp_1 = this.l3n();
316
+ var tmp$ret$2;
317
+ // Inline function 'kotlin.collections.ifEmpty' call
318
+ var tmp0_ifEmpty = toSet(_get_languages__ojonze_0(this));
319
+ var tmp_2;
320
+ if (tmp0_ifEmpty.l()) {
321
+ // Inline function 'community.flock.wirespec.compiler.cli.Convert.run.<anonymous>' call
322
+ tmp_2 = setOf(Spec_Wirespec_getInstance());
323
+ } else {
324
+ tmp_2 = tmp0_ifEmpty;
325
+ }
326
+ tmp$ret$2 = tmp_2;
327
+ var tmp1_let = new Arguments(tmp, tmp_0, tmp_1, tmp$ret$2, this.m3n(), this.n3n(), this.o3n());
328
+ // Inline function 'kotlin.contracts.contract' call
329
+ this.m3o_1(tmp1_let);
393
330
  };
394
- protoOf(Compile).hashCode = function () {
395
- return getStringHashCode(this.c25_1);
331
+ function _get_inputFile__x1bqj($this) {
332
+ return $this.d3n_1.c3i($this, inputFile$factory_0());
333
+ }
334
+ function CommonOptions() {
335
+ CliktCommand.call(this);
336
+ this.d3n_1 = option(this, Options_InputFile_getInstance().k3m_1.slice(), 'Input file').e3j(this, inputFile$factory());
337
+ this.e3n_1 = option(this, Options_InputDir_getInstance().k3m_1.slice(), 'Input directory').e3j(this, inputDir$factory());
338
+ this.f3n_1 = option(this, Options_OutputDir_getInstance().k3m_1.slice(), 'Output directory').e3j(this, outputDir$factory());
339
+ this.g3n_1 = default_0(option(this, Options_PackageName_getInstance().k3m_1.slice(), 'Package name'), get_DEFAULT_PACKAGE_NAME()).e3j(this, packageName$factory());
340
+ this.h3n_1 = flag(option(this, Options_Strict_getInstance().k3m_1.slice(), 'Strict mode'), []).e3j(this, strict$factory());
341
+ this.i3n_1 = flag(option(this, Options_Debug_getInstance().k3m_1.slice(), 'Debug mode'), []).e3j(this, debug$factory());
342
+ }
343
+ protoOf(CommonOptions).j3n = function () {
344
+ return this.e3n_1.c3i(this, inputDir$factory_0());
396
345
  };
397
- protoOf(Compile).equals = function (other) {
398
- if (this === other)
399
- return true;
400
- if (!(other instanceof Compile))
401
- return false;
402
- var tmp0_other_with_cast = other instanceof Compile ? other : THROW_CCE();
403
- if (!(this.c25_1 === tmp0_other_with_cast.c25_1))
404
- return false;
405
- return true;
346
+ protoOf(CommonOptions).l3n = function () {
347
+ return this.f3n_1.c3i(this, outputDir$factory_0());
406
348
  };
407
- function output$factory() {
408
- return getPropertyCallableRef('output', 1, KProperty1, function (receiver) {
409
- return _get_output__ji2uqy(receiver);
410
- }, null);
349
+ protoOf(CommonOptions).m3n = function () {
350
+ return this.g3n_1.c3i(this, packageName$factory_0());
351
+ };
352
+ protoOf(CommonOptions).n3n = function () {
353
+ return this.h3n_1.c3i(this, strict$factory_0());
354
+ };
355
+ protoOf(CommonOptions).o3n = function () {
356
+ return this.i3n_1.c3i(this, debug$factory_0());
357
+ };
358
+ protoOf(CommonOptions).k3n = function (inputDir) {
359
+ var tmp;
360
+ if (!(inputDir == null) ? !(_get_inputFile__x1bqj(this) == null) : false) {
361
+ throw IllegalStateException_init_$Create$('Choose either a file or a directory. Not Both.');
362
+ } else {
363
+ var tmp0_safe_receiver = _get_inputFile__x1bqj(this);
364
+ var tmp_0;
365
+ if (tmp0_safe_receiver == null) {
366
+ tmp_0 = null;
367
+ } else {
368
+ // Inline function 'kotlin.let' call
369
+ // Inline function 'kotlin.contracts.contract' call
370
+ tmp_0 = Companion_getInstance_4().p3o(tmp0_safe_receiver);
371
+ }
372
+ var tmp2_elvis_lhs = tmp_0;
373
+ var tmp_1;
374
+ if (tmp2_elvis_lhs == null) {
375
+ var tmp_2;
376
+ if (inputDir == null) {
377
+ tmp_2 = null;
378
+ } else {
379
+ // Inline function 'kotlin.let' call
380
+ // Inline function 'kotlin.contracts.contract' call
381
+ tmp_2 = new FullDirPath(inputDir);
382
+ }
383
+ tmp_1 = tmp_2;
384
+ } else {
385
+ tmp_1 = tmp2_elvis_lhs;
386
+ }
387
+ var tmp3_elvis_lhs = tmp_1;
388
+ tmp = tmp3_elvis_lhs == null ? Console_getInstance() : tmp3_elvis_lhs;
389
+ }
390
+ return tmp;
391
+ };
392
+ var Options_InputDir_instance;
393
+ var Options_InputFile_instance;
394
+ var Options_OutputDir_instance;
395
+ var Options_Language_instance;
396
+ var Options_PackageName_instance;
397
+ var Options_Strict_instance;
398
+ var Options_Debug_instance;
399
+ var Options_entriesInitialized;
400
+ function Options_initEntries() {
401
+ if (Options_entriesInitialized)
402
+ return Unit_getInstance();
403
+ Options_entriesInitialized = true;
404
+ Options_InputDir_instance = new Options('InputDir', 0, ['-d', '--input-dir']);
405
+ Options_InputFile_instance = new Options('InputFile', 1, ['-f', '--input-file']);
406
+ Options_OutputDir_instance = new Options('OutputDir', 2, ['-o', '--output-dir']);
407
+ Options_Language_instance = new Options('Language', 3, ['-l', '--language']);
408
+ Options_PackageName_instance = new Options('PackageName', 4, ['-p', '--package']);
409
+ Options_Strict_instance = new Options('Strict', 5, ['--strict']);
410
+ Options_Debug_instance = new Options('Debug', 6, ['--debug']);
411
+ }
412
+ function Options(name, ordinal, flags) {
413
+ Enum.call(this, name, ordinal);
414
+ this.k3m_1 = flags;
411
415
  }
412
- function debug$factory() {
413
- return getPropertyCallableRef('debug', 1, KProperty1, function (receiver) {
414
- return _get_debug__ikvxnm(receiver);
415
- }, null);
416
+ function Options_InputDir_getInstance() {
417
+ Options_initEntries();
418
+ return Options_InputDir_instance;
419
+ }
420
+ function Options_InputFile_getInstance() {
421
+ Options_initEntries();
422
+ return Options_InputFile_instance;
423
+ }
424
+ function Options_OutputDir_getInstance() {
425
+ Options_initEntries();
426
+ return Options_OutputDir_instance;
427
+ }
428
+ function Options_Language_getInstance() {
429
+ Options_initEntries();
430
+ return Options_Language_instance;
431
+ }
432
+ function Options_PackageName_getInstance() {
433
+ Options_initEntries();
434
+ return Options_PackageName_instance;
435
+ }
436
+ function Options_Strict_getInstance() {
437
+ Options_initEntries();
438
+ return Options_Strict_instance;
439
+ }
440
+ function Options_Debug_getInstance() {
441
+ Options_initEntries();
442
+ return Options_Debug_instance;
416
443
  }
417
444
  function languages$factory() {
418
445
  return getPropertyCallableRef('languages', 1, KProperty1, function (receiver) {
419
446
  return _get_languages__ojonze(receiver);
420
447
  }, null);
421
448
  }
422
- function packageName$factory() {
423
- return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) {
424
- return _get_packageName__3ybzuo(receiver);
449
+ function languages$factory_0() {
450
+ return getPropertyCallableRef('languages', 1, KProperty1, function (receiver) {
451
+ return _get_languages__ojonze(receiver);
425
452
  }, null);
426
453
  }
427
- function strict$factory() {
428
- return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) {
429
- return _get_strict__6o9vtu(receiver);
454
+ function format$factory() {
455
+ return getPropertyCallableRef('format', 1, KProperty1, function (receiver) {
456
+ return _get_format__qlarck(receiver);
430
457
  }, null);
431
458
  }
432
- function output$factory_0() {
433
- return getPropertyCallableRef('output', 1, KProperty1, function (receiver) {
434
- return _get_output__ji2uqy(receiver);
459
+ function languages$factory_1() {
460
+ return getPropertyCallableRef('languages', 1, KProperty1, function (receiver) {
461
+ return _get_languages__ojonze_0(receiver);
435
462
  }, null);
436
463
  }
437
- function debug$factory_0() {
438
- return getPropertyCallableRef('debug', 1, KProperty1, function (receiver) {
439
- return _get_debug__ikvxnm(receiver);
464
+ function format$factory_0() {
465
+ return getPropertyCallableRef('format', 1, KProperty1, function (receiver) {
466
+ return _get_format__qlarck(receiver);
440
467
  }, null);
441
468
  }
442
- function languages$factory_0() {
469
+ function languages$factory_2() {
443
470
  return getPropertyCallableRef('languages', 1, KProperty1, function (receiver) {
444
- return _get_languages__ojonze(receiver);
471
+ return _get_languages__ojonze_0(receiver);
445
472
  }, null);
446
473
  }
447
- function packageName$factory_0() {
474
+ function inputFile$factory() {
475
+ return getPropertyCallableRef('inputFile', 1, KProperty1, function (receiver) {
476
+ return _get_inputFile__x1bqj(receiver);
477
+ }, null);
478
+ }
479
+ function inputDir$factory() {
480
+ return getPropertyCallableRef('inputDir', 1, KProperty1, function (receiver) {
481
+ return receiver.j3n();
482
+ }, null);
483
+ }
484
+ function outputDir$factory() {
485
+ return getPropertyCallableRef('outputDir', 1, KProperty1, function (receiver) {
486
+ return receiver.l3n();
487
+ }, null);
488
+ }
489
+ function packageName$factory() {
448
490
  return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) {
449
- return _get_packageName__3ybzuo(receiver);
491
+ return receiver.m3n();
450
492
  }, null);
451
493
  }
452
- function strict$factory_0() {
494
+ function strict$factory() {
453
495
  return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) {
454
- return _get_strict__6o9vtu(receiver);
496
+ return receiver.n3n();
455
497
  }, null);
456
498
  }
457
- function input$factory() {
458
- return getPropertyCallableRef('input', 1, KProperty1, function (receiver) {
459
- return _get_input__g2gq7t(receiver);
499
+ function debug$factory() {
500
+ return getPropertyCallableRef('debug', 1, KProperty1, function (receiver) {
501
+ return receiver.o3n();
460
502
  }, null);
461
503
  }
462
- function input$factory_0() {
463
- return getPropertyCallableRef('input', 1, KProperty1, function (receiver) {
464
- return _get_input__g2gq7t(receiver);
504
+ function inputFile$factory_0() {
505
+ return getPropertyCallableRef('inputFile', 1, KProperty1, function (receiver) {
506
+ return _get_inputFile__x1bqj(receiver);
465
507
  }, null);
466
508
  }
467
- function input$factory_1() {
468
- return getPropertyCallableRef('input', 1, KProperty1, function (receiver) {
469
- return _get_input__g2gq7t_0(receiver);
509
+ function inputDir$factory_0() {
510
+ return getPropertyCallableRef('inputDir', 1, KProperty1, function (receiver) {
511
+ return receiver.j3n();
470
512
  }, null);
471
513
  }
472
- function format$factory() {
473
- return getPropertyCallableRef('format', 1, KProperty1, function (receiver) {
474
- return _get_format__qlarck(receiver);
514
+ function outputDir$factory_0() {
515
+ return getPropertyCallableRef('outputDir', 1, KProperty1, function (receiver) {
516
+ return receiver.l3n();
475
517
  }, null);
476
518
  }
477
- function input$factory_2() {
478
- return getPropertyCallableRef('input', 1, KProperty1, function (receiver) {
479
- return _get_input__g2gq7t_0(receiver);
519
+ function packageName$factory_0() {
520
+ return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) {
521
+ return receiver.m3n();
480
522
  }, null);
481
523
  }
482
- function format$factory_0() {
483
- return getPropertyCallableRef('format', 1, KProperty1, function (receiver) {
484
- return _get_format__qlarck(receiver);
524
+ function strict$factory_0() {
525
+ return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) {
526
+ return receiver.n3n();
485
527
  }, null);
486
528
  }
487
- function main(args) {
529
+ function debug$factory_0() {
530
+ return getPropertyCallableRef('debug', 1, KProperty1, function (receiver) {
531
+ return receiver.o3n();
532
+ }, null);
533
+ }
534
+ function Companion_0() {
535
+ Companion_instance_0 = this;
536
+ }
537
+ protoOf(Companion_0).p3o = function (input) {
488
538
  // Inline function 'kotlin.let' call
539
+ var tmp0_let = split(input, ['/']);
540
+ // Inline function 'kotlin.contracts.contract' call
541
+ // Inline function 'community.flock.wirespec.compiler.cli.Companion.parse.<anonymous>' call
542
+ var list = plus(dropLast(tmp0_let, 1), split(last(tmp0_let), ['.']));
543
+ // Inline function 'kotlin.let' call
544
+ // Inline function 'kotlin.text.lowercase' call
545
+ // Inline function 'kotlin.js.asDynamic' call
546
+ var tmp2_let = last(list).toLowerCase();
547
+ // Inline function 'kotlin.contracts.contract' call
548
+ // Inline function 'community.flock.wirespec.compiler.cli.Companion.parse.<anonymous>' call
549
+ // Inline function 'kotlin.collections.find' call
550
+ var tmp0_find = get_entries_3();
551
+ var tmp$ret$5;
552
+ $l$block: {
553
+ // Inline function 'kotlin.collections.firstOrNull' call
554
+ var tmp0_iterator = tmp0_find.c();
555
+ while (tmp0_iterator.d()) {
556
+ var element = tmp0_iterator.e();
557
+ // Inline function 'community.flock.wirespec.compiler.cli.Companion.parse.<anonymous>.<anonymous>' call
558
+ if (element.s3o_1 === tmp2_let) {
559
+ tmp$ret$5 = element;
560
+ break $l$block;
561
+ }
562
+ }
563
+ tmp$ret$5 = null;
564
+ }
565
+ var tmp0_elvis_lhs = tmp$ret$5;
566
+ var tmp;
567
+ if (tmp0_elvis_lhs == null) {
568
+ throw IllegalStateException_init_$Create$('Invalid file extension');
569
+ } else {
570
+ tmp = tmp0_elvis_lhs;
571
+ }
572
+ var extension = tmp;
573
+ var filename = list.k(list.f() - 2 | 0);
574
+ var path = joinToString(list.s(0, list.f() - 2 | 0), '/');
575
+ return new FullFilePath(path, filename, extension);
576
+ };
577
+ var Companion_instance_0;
578
+ function Companion_getInstance_4() {
579
+ if (Companion_instance_0 == null)
580
+ new Companion_0();
581
+ return Companion_instance_0;
582
+ }
583
+ function FullFilePath(directory, fileName, extension) {
584
+ Companion_getInstance_4();
585
+ extension = extension === VOID ? Extension_Wirespec_getInstance() : extension;
586
+ this.t3o_1 = directory;
587
+ this.u3o_1 = fileName;
588
+ this.v3o_1 = extension;
589
+ }
590
+ protoOf(FullFilePath).toString = function () {
591
+ return this.t3o_1 + '/' + this.u3o_1 + '.' + this.v3o_1.s3o_1;
592
+ };
593
+ protoOf(FullFilePath).w3o = function (directory, fileName, extension) {
594
+ return new FullFilePath(directory, fileName, extension);
595
+ };
596
+ protoOf(FullFilePath).x3o = function (directory, fileName, extension, $super) {
597
+ directory = directory === VOID ? this.t3o_1 : directory;
598
+ fileName = fileName === VOID ? this.u3o_1 : fileName;
599
+ extension = extension === VOID ? this.v3o_1 : extension;
600
+ return $super === VOID ? this.w3o(directory, fileName, extension) : $super.w3o.call(this, directory, fileName, extension);
601
+ };
602
+ protoOf(FullFilePath).hashCode = function () {
603
+ var result = getStringHashCode(this.t3o_1);
604
+ result = imul(result, 31) + getStringHashCode(this.u3o_1) | 0;
605
+ result = imul(result, 31) + this.v3o_1.hashCode() | 0;
606
+ return result;
607
+ };
608
+ protoOf(FullFilePath).equals = function (other) {
609
+ if (this === other)
610
+ return true;
611
+ if (!(other instanceof FullFilePath))
612
+ return false;
613
+ var tmp0_other_with_cast = other instanceof FullFilePath ? other : THROW_CCE();
614
+ if (!(this.t3o_1 === tmp0_other_with_cast.t3o_1))
615
+ return false;
616
+ if (!(this.u3o_1 === tmp0_other_with_cast.u3o_1))
617
+ return false;
618
+ if (!this.v3o_1.equals(tmp0_other_with_cast.v3o_1))
619
+ return false;
620
+ return true;
621
+ };
622
+ function Console$read$lambda() {
623
+ return readlnOrNull();
624
+ }
625
+ function Console() {
626
+ Console_instance = this;
627
+ }
628
+ protoOf(Console).p11 = function () {
629
+ return joinToString_0(generateSequence(Console$read$lambda), '/n');
630
+ };
631
+ protoOf(Console).toString = function () {
632
+ return 'Console';
633
+ };
634
+ protoOf(Console).hashCode = function () {
635
+ return 1615669478;
636
+ };
637
+ protoOf(Console).equals = function (other) {
638
+ if (this === other)
639
+ return true;
640
+ if (!(other instanceof Console))
641
+ return false;
642
+ other instanceof Console || THROW_CCE();
643
+ return true;
644
+ };
645
+ var Console_instance;
646
+ function Console_getInstance() {
647
+ if (Console_instance == null)
648
+ new Console();
649
+ return Console_instance;
650
+ }
651
+ function FullDirPath(path) {
652
+ this.y3o_1 = path;
653
+ }
654
+ protoOf(FullDirPath).toString = function () {
655
+ return 'FullDirPath(path=' + this.y3o_1 + ')';
656
+ };
657
+ protoOf(FullDirPath).hashCode = function () {
658
+ return getStringHashCode(this.y3o_1);
659
+ };
660
+ protoOf(FullDirPath).equals = function (other) {
661
+ if (this === other)
662
+ return true;
663
+ if (!(other instanceof FullDirPath))
664
+ return false;
665
+ var tmp0_other_with_cast = other instanceof FullDirPath ? other : THROW_CCE();
666
+ if (!(this.y3o_1 === tmp0_other_with_cast.y3o_1))
667
+ return false;
668
+ return true;
669
+ };
670
+ function main(args) {
489
671
  // Inline function 'kotlin.let' call
490
672
  // Inline function 'kotlin.collections.toTypedArray' call
491
673
  // Inline function 'kotlin.collections.mapNotNull' call
492
674
  var tmp0_mapNotNull = numberRangeToNumber(0, 20);
493
675
  // Inline function 'kotlin.collections.mapNotNullTo' call
494
- var tmp0_mapNotNullTo = ArrayList_init_$Create$_0();
676
+ var tmp0_mapNotNullTo = ArrayList_init_$Create$();
495
677
  // Inline function 'kotlin.collections.forEach' call
496
- var inductionVariable = tmp0_mapNotNull.y_1;
497
- var last = tmp0_mapNotNull.z_1;
678
+ var inductionVariable = tmp0_mapNotNull.a1_1;
679
+ var last = tmp0_mapNotNull.b1_1;
498
680
  if (inductionVariable <= last)
499
681
  do {
500
682
  var element = inductionVariable;
@@ -511,29 +693,29 @@
511
693
  }
512
694
  while (!(element === last));
513
695
  var tmp2_let = copyToArray(tmp0_mapNotNullTo);
696
+ var tmp = Companion_getInstance_3();
697
+ var tmp_0 = compile$ref();
514
698
  // Inline function 'kotlin.contracts.contract' call
515
- var tmp3_let = (new CommandLineEntitiesParser(tmp2_let)).s1v();
516
- // Inline function 'kotlin.contracts.contract' call
517
- compile_0(tmp3_let);
699
+ tmp.a3l(tmp_0, convert$ref())(tmp2_let);
518
700
  }
519
701
  function compile_0(arguments_0) {
520
- var input = arguments_0.u21_1.b25();
521
- var output = arguments_0.v21_1;
522
- var languages = arguments_0.w21_1;
523
- var packageName = arguments_0.x21_1;
524
- var logger = new Logger(arguments_0.z21_1);
525
- var tmp0_subject = arguments_0.u21_1;
702
+ var input = arguments_0.c3l_1;
703
+ var output = arguments_0.d3l_1;
704
+ var languages = arguments_0.e3l_1;
705
+ var packageName = arguments_0.f3l_1;
706
+ var logger = new Logger(arguments_0.h3l_1);
707
+ var tmp0_subject = arguments_0.b3l_1;
526
708
  if (tmp0_subject instanceof Convert) {
527
- var fullPath = Companion_getInstance_5().f25(input);
709
+ var fullPath = input instanceof FullFilePath ? input : THROW_CCE();
528
710
  var file = new JsonFile(fullPath);
529
- var strict = arguments_0.y21_1;
711
+ var strict = arguments_0.g3l_1;
530
712
  var tmp;
531
- switch (arguments_0.u21_1.z24_1.u4_1) {
713
+ switch (arguments_0.b3l_1.i3l_1.p5_1) {
532
714
  case 0:
533
- tmp = Companion_getInstance_0().q1v(file.d10(), !strict);
715
+ tmp = Companion_getInstance().e1x(file.p11(), !strict);
534
716
  break;
535
717
  case 1:
536
- tmp = Companion_getInstance_1().q1v(file.d10(), !strict);
718
+ tmp = Companion_getInstance_0().e1x(file.p11(), !strict);
537
719
  break;
538
720
  default:
539
721
  noWhenBranchMatchedException();
@@ -543,22 +725,22 @@
543
725
  var path = out(fullPath, packageName, output);
544
726
  // Inline function 'kotlin.collections.map' call
545
727
  // Inline function 'kotlin.collections.map' call
546
- var tmp0_map = emit(languages, packageName, path, logger);
728
+ var tmp0_map = emitters(languages, packageName, path, logger);
547
729
  // Inline function 'kotlin.collections.mapTo' call
548
- var tmp0_mapTo = ArrayList_init_$Create$(collectionSizeOrDefault(tmp0_map, 10));
730
+ var tmp0_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp0_map, 10));
549
731
  var tmp0_iterator = tmp0_map.c();
550
732
  while (tmp0_iterator.d()) {
551
733
  var item = tmp0_iterator.e();
552
734
  var tmp$ret$7;
553
735
  // Inline function 'community.flock.wirespec.compiler.cli.compile.<anonymous>' call
554
- var emitter = item.k3();
555
- var file_0 = item.l3();
556
- var result = emitter.k1p(ast);
736
+ var emitter = item.e3();
737
+ var file_0 = item.f3();
738
+ var results = emitter.w1q(ast);
557
739
  var tmp_0;
558
- if (!emitter.s1s()) {
740
+ if (!emitter.g1u()) {
559
741
  var tmp$ret$6;
560
742
  // Inline function 'kotlin.text.replaceFirstChar' call
561
- var tmp0_replaceFirstChar = fullPath.l25_1;
743
+ var tmp0_replaceFirstChar = fullPath.u3o_1;
562
744
  var tmp_1;
563
745
  // Inline function 'kotlin.text.isNotEmpty' call
564
746
  if (charSequenceLength(tmp0_replaceFirstChar) > 0) {
@@ -567,8 +749,8 @@
567
749
  var tmp1_uppercase = charSequenceGet(tmp0_replaceFirstChar, 0);
568
750
  // Inline function 'kotlin.js.unsafeCast' call
569
751
  // Inline function 'kotlin.js.asDynamic' call
570
- tmp$ret$3 = toString(tmp1_uppercase).toUpperCase();
571
- var tmp_2 = toString_0(tmp$ret$3);
752
+ tmp$ret$3 = toString_0(tmp1_uppercase).toUpperCase();
753
+ var tmp_2 = toString(tmp$ret$3);
572
754
  // Inline function 'kotlin.text.substring' call
573
755
  // Inline function 'kotlin.js.asDynamic' call
574
756
  tmp_1 = tmp_2 + tmp0_replaceFirstChar.substring(1);
@@ -576,38 +758,56 @@
576
758
  tmp_1 = tmp0_replaceFirstChar;
577
759
  }
578
760
  tmp$ret$6 = tmp_1;
579
- tmp_0 = to(listOf(to(tmp$ret$6, first(result).j3_1)), file_0);
761
+ tmp_0 = to(listOf(new Emitted(tmp$ret$6, first(results).t1t_1)), file_0);
580
762
  } else {
581
- tmp_0 = to(result, file_0);
763
+ tmp_0 = to(results, file_0);
582
764
  }
583
765
  tmp$ret$7 = tmp_0;
584
766
  tmp0_mapTo.a(tmp$ret$7);
585
767
  }
586
768
  // Inline function 'kotlin.collections.mapTo' call
587
- var tmp0_mapTo_0 = ArrayList_init_$Create$(collectionSizeOrDefault(tmp0_mapTo, 10));
769
+ var tmp0_mapTo_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp0_mapTo, 10));
588
770
  var tmp0_iterator_0 = tmp0_mapTo.c();
589
771
  while (tmp0_iterator_0.d()) {
590
772
  var item_0 = tmp0_iterator_0.e();
591
- var results = item_0.k3();
592
- var file_1 = item_0.l3();
593
- write(results, file_1);
773
+ var results_0 = item_0.e3();
774
+ var file_1 = item_0.f3();
775
+ write(results_0, file_1);
594
776
  tmp0_mapTo_0.a(Unit_getInstance());
595
777
  }
596
778
  } else {
597
- if (tmp0_subject instanceof Compile)
598
- if (endsWith(input, '.' + Extension_Wirespec_getInstance().i25_1)) {
599
- wirespec(new WirespecFile(Companion_getInstance_5().f25(input)), languages, packageName, output, logger);
779
+ if (tmp0_subject instanceof Compile) {
780
+ if (input instanceof Console) {
781
+ wirespec(input, languages, packageName, compile$lambda(output), logger);
600
782
  } else {
601
- // Inline function 'kotlin.collections.forEach' call
602
- var tmp0_iterator_1 = (new Directory(input)).e25().c();
603
- while (tmp0_iterator_1.d()) {
604
- var element = tmp0_iterator_1.e();
605
- // Inline function 'community.flock.wirespec.compiler.cli.compile.<anonymous>' call
606
- wirespec(element, languages, packageName, output, logger);
783
+ if (input instanceof FullDirPath) {
784
+ // Inline function 'kotlin.collections.forEach' call
785
+ var tmp0_iterator_1 = (new Directory(input.y3o_1)).b3p().c();
786
+ while (tmp0_iterator_1.d()) {
787
+ var element = tmp0_iterator_1.e();
788
+ // Inline function 'community.flock.wirespec.compiler.cli.compile.<anonymous>' call
789
+ wirespec(element, languages, packageName, out(element.z3o_1, packageName, output), logger);
790
+ }
791
+ } else {
792
+ if (input instanceof FullFilePath)
793
+ if (input.v3o_1.equals(Extension_Wirespec_getInstance())) {
794
+ // Inline function 'kotlin.let' call
795
+ var tmp3_let = new WirespecFile(input);
796
+ // Inline function 'kotlin.contracts.contract' call
797
+ wirespec(tmp3_let, languages, packageName, out(tmp3_let.z3o_1, packageName, output), logger);
798
+ } else {
799
+ // Inline function 'kotlin.error' call
800
+ var tmp4_error = 'Path ' + input + ' is not a Wirespec file';
801
+ throw IllegalStateException_init_$Create$(toString(tmp4_error));
802
+ }
607
803
  }
608
804
  }
805
+ }
609
806
  }
610
807
  }
808
+ function convert(arguments_0) {
809
+ return compile_0(arguments_0);
810
+ }
611
811
  var Jvm_Java_instance;
612
812
  var Jvm_Kotlin_instance;
613
813
  var Jvm_Scala_instance;
@@ -663,6 +863,9 @@
663
863
  Spec_Wirespec_instance = new Spec('Wirespec', 0);
664
864
  }
665
865
  var $ENTRIES_1;
866
+ function values_2($this) {
867
+ return plus(plus(get_entries(), get_entries_0()), get_entries_1());
868
+ }
666
869
  function Jvm(name, ordinal) {
667
870
  Enum.call(this, name, ordinal);
668
871
  }
@@ -672,40 +875,49 @@
672
875
  function Spec(name, ordinal) {
673
876
  Enum.call(this, name, ordinal);
674
877
  }
675
- function Companion() {
676
- Companion_instance = this;
878
+ function Companion_1() {
879
+ Companion_instance_1 = this;
677
880
  }
678
- protoOf(Companion).y24 = function () {
679
- return plus(plus(get_entries(), get_entries_0()), get_entries_1());
680
- };
681
- protoOf(Companion).x24 = function (s) {
682
- // Inline function 'kotlin.collections.find' call
683
- var tmp0_find = this.y24();
684
- var tmp$ret$1;
685
- $l$block: {
686
- // Inline function 'kotlin.collections.firstOrNull' call
687
- var tmp0_iterator = tmp0_find.c();
688
- while (tmp0_iterator.d()) {
689
- var element = tmp0_iterator.e();
690
- // Inline function 'community.flock.wirespec.compiler.cli.Companion.valueOf.<anonymous>' call
691
- if (element.t4_1 === s) {
692
- tmp$ret$1 = element;
693
- break $l$block;
694
- }
695
- }
696
- tmp$ret$1 = null;
881
+ protoOf(Companion_1).l3m = function () {
882
+ // Inline function 'kotlin.collections.mapValues' call
883
+ // Inline function 'kotlin.collections.associateBy' call
884
+ var tmp0_associateBy = values_2(this);
885
+ var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(tmp0_associateBy, 10)), 16);
886
+ // Inline function 'kotlin.collections.associateByTo' call
887
+ var tmp0_associateByTo = LinkedHashMap_init_$Create$(capacity);
888
+ var tmp0_iterator = tmp0_associateBy.c();
889
+ while (tmp0_iterator.d()) {
890
+ var element = tmp0_iterator.e();
891
+ var tmp$ret$0;
892
+ // Inline function 'community.flock.wirespec.compiler.cli.Companion.toMap.<anonymous>' call
893
+ tmp$ret$0 = element.o5_1;
894
+ tmp0_associateByTo.n3(tmp$ret$0, element);
697
895
  }
698
- var tmp = tmp$ret$1;
699
- return (tmp == null ? true : isInterface(tmp, Language)) ? tmp : THROW_CCE();
896
+ // Inline function 'kotlin.collections.mapValuesTo' call
897
+ var tmp0_mapValuesTo = LinkedHashMap_init_$Create$(mapCapacity(tmp0_associateByTo.f()));
898
+ // Inline function 'kotlin.collections.associateByTo' call
899
+ var tmp0_iterator_0 = tmp0_associateByTo.w().c();
900
+ while (tmp0_iterator_0.d()) {
901
+ var element_0 = tmp0_iterator_0.e();
902
+ // Inline function 'kotlin.collections.mapValuesTo.<anonymous>' call
903
+ var tmp = element_0.x();
904
+ var tmp$ret$5;
905
+ // Inline function 'community.flock.wirespec.compiler.cli.Companion.toMap.<anonymous>' call
906
+ // Inline function 'kotlin.collections.component2' call
907
+ var v = element_0.y();
908
+ tmp$ret$5 = isInterface(v, Language) ? v : THROW_CCE();
909
+ tmp0_mapValuesTo.n3(tmp, tmp$ret$5);
910
+ }
911
+ return tmp0_mapValuesTo;
700
912
  };
701
- protoOf(Companion).toString = function () {
702
- return joinToString(this.y24());
913
+ protoOf(Companion_1).toString = function () {
914
+ return joinToString(values_2(this));
703
915
  };
704
- var Companion_instance;
705
- function Companion_getInstance_3() {
706
- if (Companion_instance == null)
707
- new Companion();
708
- return Companion_instance;
916
+ var Companion_instance_1;
917
+ function Companion_getInstance_5() {
918
+ if (Companion_instance_1 == null)
919
+ new Companion_1();
920
+ return Companion_instance_1;
709
921
  }
710
922
  function Jvm_Java_getInstance() {
711
923
  Jvm_initEntries();
@@ -729,27 +941,27 @@
729
941
  }
730
942
  function Language() {
731
943
  }
732
- var Format_OPEN_API_V2_instance;
733
- var Format_OPEN_API_V3_instance;
734
- function Companion_0() {
735
- Companion_instance_0 = this;
944
+ var Format_OpenApiV2_instance;
945
+ var Format_OpenApiV3_instance;
946
+ function Companion_2() {
947
+ Companion_instance_2 = this;
736
948
  }
737
- protoOf(Companion_0).toString = function () {
949
+ protoOf(Companion_2).toString = function () {
738
950
  return joinToString(get_entries_2());
739
951
  };
740
- var Companion_instance_0;
741
- function Companion_getInstance_4() {
952
+ var Companion_instance_2;
953
+ function Companion_getInstance_6() {
742
954
  Format_initEntries();
743
- if (Companion_instance_0 == null)
744
- new Companion_0();
745
- return Companion_instance_0;
955
+ if (Companion_instance_2 == null)
956
+ new Companion_2();
957
+ return Companion_instance_2;
746
958
  }
747
- function values_2() {
748
- return [Format_OPEN_API_V2_getInstance(), Format_OPEN_API_V3_getInstance()];
959
+ function values_3() {
960
+ return [Format_OpenApiV2_getInstance(), Format_OpenApiV3_getInstance()];
749
961
  }
750
962
  function get_entries_2() {
751
963
  if ($ENTRIES_2 == null)
752
- $ENTRIES_2 = enumEntries(values_2());
964
+ $ENTRIES_2 = enumEntries(values_3());
753
965
  return $ENTRIES_2;
754
966
  }
755
967
  var Format_entriesInitialized;
@@ -757,9 +969,9 @@
757
969
  if (Format_entriesInitialized)
758
970
  return Unit_getInstance();
759
971
  Format_entriesInitialized = true;
760
- Format_OPEN_API_V2_instance = new Format('OPEN_API_V2', 0);
761
- Format_OPEN_API_V3_instance = new Format('OPEN_API_V3', 1);
762
- Companion_getInstance_4();
972
+ Format_OpenApiV2_instance = new Format('OpenApiV2', 0);
973
+ Format_OpenApiV3_instance = new Format('OpenApiV3', 1);
974
+ Companion_getInstance_6();
763
975
  }
764
976
  var $ENTRIES_2;
765
977
  function Format(name, ordinal) {
@@ -774,130 +986,190 @@
774
986
  while (tmp0_iterator.d()) {
775
987
  var element = tmp0_iterator.e();
776
988
  // Inline function 'community.flock.wirespec.compiler.cli.write.<anonymous>' call
777
- var name = element.k3();
778
- var result = element.l3();
779
- file.n25(name).o25(result);
989
+ var name = element.e3();
990
+ var result = element.f3();
991
+ var tmp1_safe_receiver = file == null ? null : file.c3p(name);
992
+ var tmp;
993
+ if (tmp1_safe_receiver == null) {
994
+ tmp = null;
995
+ } else {
996
+ tmp1_safe_receiver.d3p(result);
997
+ tmp = Unit_getInstance();
998
+ }
999
+ if (tmp == null) {
1000
+ print(result);
1001
+ }
780
1002
  }
781
1003
  }
782
- function emit(languages, packageName, path, logger) {
1004
+ function emitters(_this__u8e3s4, packageName, path, logger) {
783
1005
  // Inline function 'kotlin.collections.map' call
784
1006
  // Inline function 'kotlin.collections.mapTo' call
785
- var tmp0_mapTo = ArrayList_init_$Create$(collectionSizeOrDefault(languages, 10));
786
- var tmp0_iterator = languages.c();
1007
+ var tmp0_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(_this__u8e3s4, 10));
1008
+ var tmp0_iterator = _this__u8e3s4.c();
787
1009
  while (tmp0_iterator.d()) {
788
1010
  var item = tmp0_iterator.e();
789
- var tmp$ret$0;
790
- // Inline function 'community.flock.wirespec.compiler.cli.emit.<anonymous>' call
1011
+ var tmp$ret$10;
1012
+ // Inline function 'community.flock.wirespec.compiler.cli.emitters.<anonymous>' call
791
1013
  var tmp;
792
1014
  if (equals(item, Jvm_Java_getInstance())) {
793
- tmp = to(new JavaEmitter(packageName, logger), new JavaFile(path(Extension_Java_getInstance())));
1015
+ var tmp_0 = new JavaEmitter(packageName, logger);
1016
+ var tmp_1;
1017
+ if (path == null) {
1018
+ tmp_1 = null;
1019
+ } else {
1020
+ // Inline function 'kotlin.let' call
1021
+ // Inline function 'kotlin.contracts.contract' call
1022
+ // Inline function 'community.flock.wirespec.compiler.cli.emitters.<anonymous>.<anonymous>' call
1023
+ tmp_1 = new JavaFile(path(Extension_Java_getInstance()));
1024
+ }
1025
+ tmp = to(tmp_0, tmp_1);
794
1026
  } else if (equals(item, Jvm_Kotlin_getInstance())) {
795
- tmp = to(new KotlinEmitter(packageName, logger), new KotlinFile(path(Extension_Kotlin_getInstance())));
1027
+ var tmp_2 = new KotlinEmitter(packageName, logger);
1028
+ var tmp_3;
1029
+ if (path == null) {
1030
+ tmp_3 = null;
1031
+ } else {
1032
+ // Inline function 'kotlin.let' call
1033
+ // Inline function 'kotlin.contracts.contract' call
1034
+ // Inline function 'community.flock.wirespec.compiler.cli.emitters.<anonymous>.<anonymous>' call
1035
+ tmp_3 = new KotlinFile(path(Extension_Kotlin_getInstance()));
1036
+ }
1037
+ tmp = to(tmp_2, tmp_3);
796
1038
  } else if (equals(item, Jvm_Scala_getInstance())) {
797
- tmp = to(new ScalaEmitter(packageName, logger), new ScalaFile(path(Extension_Scala_getInstance())));
1039
+ var tmp_4 = new ScalaEmitter(packageName, logger);
1040
+ var tmp_5;
1041
+ if (path == null) {
1042
+ tmp_5 = null;
1043
+ } else {
1044
+ // Inline function 'kotlin.let' call
1045
+ // Inline function 'kotlin.contracts.contract' call
1046
+ // Inline function 'community.flock.wirespec.compiler.cli.emitters.<anonymous>.<anonymous>' call
1047
+ tmp_5 = new ScalaFile(path(Extension_Scala_getInstance()));
1048
+ }
1049
+ tmp = to(tmp_4, tmp_5);
798
1050
  } else if (equals(item, Script_TypeScript_getInstance())) {
799
- tmp = to(new TypeScriptEmitter(logger), new TypeScriptFile(path(Extension_TypeScript_getInstance())));
1051
+ var tmp_6 = new TypeScriptEmitter(logger);
1052
+ var tmp_7;
1053
+ if (path == null) {
1054
+ tmp_7 = null;
1055
+ } else {
1056
+ // Inline function 'kotlin.let' call
1057
+ // Inline function 'kotlin.contracts.contract' call
1058
+ // Inline function 'community.flock.wirespec.compiler.cli.emitters.<anonymous>.<anonymous>' call
1059
+ tmp_7 = new TypeScriptFile(path(Extension_TypeScript_getInstance()));
1060
+ }
1061
+ tmp = to(tmp_6, tmp_7);
800
1062
  } else if (equals(item, Spec_Wirespec_getInstance())) {
801
- tmp = to(new WirespecEmitter(logger), new WirespecFile(path(Extension_Wirespec_getInstance())));
1063
+ var tmp_8 = new WirespecEmitter(logger);
1064
+ var tmp_9;
1065
+ if (path == null) {
1066
+ tmp_9 = null;
1067
+ } else {
1068
+ // Inline function 'kotlin.let' call
1069
+ // Inline function 'kotlin.contracts.contract' call
1070
+ // Inline function 'community.flock.wirespec.compiler.cli.emitters.<anonymous>.<anonymous>' call
1071
+ tmp_9 = new WirespecFile(path(Extension_Wirespec_getInstance()));
1072
+ }
1073
+ tmp = to(tmp_8, tmp_9);
802
1074
  } else {
803
1075
  noWhenBranchMatchedException();
804
1076
  }
805
- tmp$ret$0 = tmp;
806
- tmp0_mapTo.a(tmp$ret$0);
1077
+ tmp$ret$10 = tmp;
1078
+ tmp0_mapTo.a(tmp$ret$10);
807
1079
  }
808
1080
  return tmp0_mapTo;
809
1081
  }
810
- function wirespec(_this__u8e3s4, languages, packageName, output, logger) {
811
- var path = out(_this__u8e3s4.j25_1, packageName, output);
1082
+ function wirespec(_this__u8e3s4, languages, packageName, path, logger) {
812
1083
  // Inline function 'kotlin.collections.map' call
813
1084
  // Inline function 'kotlin.let' call
814
1085
  // Inline function 'kotlin.let' call
815
- var tmp0_let = _this__u8e3s4.d10();
1086
+ var tmp0_let = _this__u8e3s4.p11();
816
1087
  var tmp1_let_this = Wirespec_getInstance();
817
1088
  // Inline function 'kotlin.contracts.contract' call
818
1089
  var tmp2_let = compile(tmp1_let_this, tmp0_let)(logger);
819
1090
  // Inline function 'kotlin.contracts.contract' call
820
1091
  // Inline function 'community.flock.wirespec.compiler.cli.wirespec.<anonymous>' call
821
1092
  // Inline function 'kotlin.collections.map' call
822
- var tmp0_map = emit(languages, packageName, path, logger);
1093
+ var tmp0_map = emitters(languages, packageName, path, logger);
823
1094
  // Inline function 'kotlin.collections.mapTo' call
824
- var tmp0_mapTo = ArrayList_init_$Create$(collectionSizeOrDefault(tmp0_map, 10));
1095
+ var tmp0_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp0_map, 10));
825
1096
  var tmp0_iterator = tmp0_map.c();
826
1097
  while (tmp0_iterator.d()) {
827
1098
  var item = tmp0_iterator.e();
828
- var tmp$ret$13;
1099
+ var tmp$ret$6;
829
1100
  // Inline function 'community.flock.wirespec.compiler.cli.wirespec.<anonymous>.<anonymous>' call
830
- var emitter = item.k3();
831
- var file = item.l3();
832
- var result = tmp2_let(emitter);
1101
+ var emitter = item.e3();
1102
+ var file = item.f3();
1103
+ var results = tmp2_let(emitter);
833
1104
  var tmp;
834
- if (!emitter.s1s()) {
835
- var tmp$ret$12;
1105
+ if (!emitter.g1u()) {
1106
+ var tmp$ret$5;
836
1107
  // Inline function 'arrow.core.Either.map' call
837
1108
  // Inline function 'kotlin.contracts.contract' call
838
1109
  // Inline function 'arrow.core.flatMap' call
839
1110
  // Inline function 'kotlin.contracts.contract' call
840
1111
  var tmp_0;
841
- if (result instanceof Right) {
1112
+ if (results instanceof Right) {
842
1113
  // Inline function 'arrow.core.Either.map.<anonymous>' call
843
- var tmp0_anonymous = result.j1o_1;
844
- var tmp$ret$9;
1114
+ var tmp0_anonymous = results.v1p_1;
1115
+ var tmp$ret$2;
845
1116
  // Inline function 'community.flock.wirespec.compiler.cli.wirespec.<anonymous>.<anonymous>.<anonymous>' call
846
- var tmp$ret$8;
847
- // Inline function 'kotlin.text.replaceFirstChar' call
848
- var tmp0_replaceFirstChar = _this__u8e3s4.j25_1.l25_1;
849
- var tmp_1;
850
- // Inline function 'kotlin.text.isNotEmpty' call
851
- if (charSequenceLength(tmp0_replaceFirstChar) > 0) {
852
- var tmp$ret$5;
853
- // Inline function 'kotlin.text.uppercase' call
854
- var tmp1_uppercase = charSequenceGet(tmp0_replaceFirstChar, 0);
855
- // Inline function 'kotlin.js.unsafeCast' call
856
- // Inline function 'kotlin.js.asDynamic' call
857
- tmp$ret$5 = toString(tmp1_uppercase).toUpperCase();
858
- var tmp_2 = toString_0(tmp$ret$5);
859
- // Inline function 'kotlin.text.substring' call
860
- // Inline function 'kotlin.js.asDynamic' call
861
- tmp_1 = tmp_2 + tmp0_replaceFirstChar.substring(1);
862
- } else {
863
- tmp_1 = tmp0_replaceFirstChar;
864
- }
865
- tmp$ret$8 = tmp_1;
866
- tmp$ret$9 = listOf(to(tmp$ret$8, first(tmp0_anonymous).j3_1));
867
- tmp_0 = new Right(tmp$ret$9);
1117
+ tmp$ret$2 = listOf(new Emitted(Companion_getInstance_1().k1s(path(Extension_Wirespec_getInstance()).u3o_1), first(tmp0_anonymous).t1t_1));
1118
+ tmp_0 = new Right(tmp$ret$2);
868
1119
  } else {
869
- if (result instanceof Left) {
870
- tmp_0 = result;
1120
+ if (results instanceof Left) {
1121
+ tmp_0 = results;
871
1122
  } else {
872
1123
  noWhenBranchMatchedException();
873
1124
  }
874
1125
  }
875
- tmp$ret$12 = tmp_0;
876
- tmp = to(tmp$ret$12, file);
1126
+ tmp$ret$5 = tmp_0;
1127
+ tmp = to(tmp$ret$5, file);
877
1128
  } else {
878
- tmp = to(result, file);
1129
+ tmp = to(results, file);
879
1130
  }
880
- tmp$ret$13 = tmp;
881
- tmp0_mapTo.a(tmp$ret$13);
1131
+ tmp$ret$6 = tmp;
1132
+ tmp0_mapTo.a(tmp$ret$6);
882
1133
  }
883
1134
  // Inline function 'kotlin.collections.mapTo' call
884
- var tmp0_mapTo_0 = ArrayList_init_$Create$(collectionSizeOrDefault(tmp0_mapTo, 10));
1135
+ var tmp0_mapTo_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp0_mapTo, 10));
885
1136
  var tmp0_iterator_0 = tmp0_mapTo.c();
886
1137
  while (tmp0_iterator_0.d()) {
887
1138
  var item_0 = tmp0_iterator_0.e();
888
1139
  // Inline function 'community.flock.wirespec.compiler.cli.wirespec.<anonymous>' call
889
- var results = item_0.k3();
890
- var file_0 = item_0.l3();
891
- if (results instanceof Right) {
892
- write(results.j1o_1, file_0);
1140
+ var results_0 = item_0.e3();
1141
+ var file_0 = item_0.f3();
1142
+ if (results_0 instanceof Right) {
1143
+ write(results_0.v1p_1, file_0);
893
1144
  } else {
894
- if (results instanceof Left) {
895
- println(results.e1o_1);
1145
+ if (results_0 instanceof Left) {
1146
+ println(results_0.q1p_1);
896
1147
  }
897
1148
  }
898
1149
  tmp0_mapTo_0.a(Unit_getInstance());
899
1150
  }
900
1151
  }
1152
+ function compile$ref() {
1153
+ var l = function (p0) {
1154
+ compile_0(p0);
1155
+ return Unit_getInstance();
1156
+ };
1157
+ l.callableName = 'compile';
1158
+ return l;
1159
+ }
1160
+ function convert$ref() {
1161
+ var l = function (p0) {
1162
+ convert(p0);
1163
+ return Unit_getInstance();
1164
+ };
1165
+ l.callableName = 'convert';
1166
+ return l;
1167
+ }
1168
+ function compile$lambda($output) {
1169
+ return function (it) {
1170
+ return new FullFilePath(ensureNotNull($output), 'console', it);
1171
+ };
1172
+ }
901
1173
  function out$lambda($output, $this_out, $packageName) {
902
1174
  return function (extension) {
903
1175
  var tmp0_elvis_lhs = $output;
@@ -905,26 +1177,26 @@
905
1177
  if (tmp0_elvis_lhs == null) {
906
1178
  var tmp$ret$1;
907
1179
  // Inline function 'kotlin.text.lowercase' call
908
- var tmp0_lowercase = extension.t4_1;
1180
+ var tmp0_lowercase = extension.o5_1;
909
1181
  var tmp$ret$0;
910
1182
  // Inline function 'kotlin.js.asDynamic' call
911
1183
  tmp$ret$0 = tmp0_lowercase;
912
1184
  tmp$ret$1 = tmp$ret$0.toLowerCase();
913
- tmp = $this_out.k25_1 + '/out/' + tmp$ret$1;
1185
+ tmp = $this_out.t3o_1 + '/out/' + tmp$ret$1;
914
1186
  } else {
915
1187
  tmp = tmp0_elvis_lhs;
916
1188
  }
917
1189
  var dir = tmp;
918
- return $this_out.p25(dir + '/' + joinToString(split($packageName, charArrayOf([_Char___init__impl__6a9atx(46)])), '/'), VOID, extension);
1190
+ return $this_out.x3o(dir + '/' + joinToString(split_0($packageName, charArrayOf([_Char___init__impl__6a9atx(46)])), '/'), VOID, extension);
919
1191
  };
920
1192
  }
921
- function Format_OPEN_API_V2_getInstance() {
1193
+ function Format_OpenApiV2_getInstance() {
922
1194
  Format_initEntries();
923
- return Format_OPEN_API_V2_instance;
1195
+ return Format_OpenApiV2_instance;
924
1196
  }
925
- function Format_OPEN_API_V3_getInstance() {
1197
+ function Format_OpenApiV3_getInstance() {
926
1198
  Format_initEntries();
927
- return Format_OPEN_API_V3_instance;
1199
+ return Format_OpenApiV3_instance;
928
1200
  }
929
1201
  var Extension_Java_instance;
930
1202
  var Extension_Kotlin_instance;
@@ -932,12 +1204,12 @@
932
1204
  var Extension_TypeScript_instance;
933
1205
  var Extension_Wirespec_instance;
934
1206
  var Extension_Json_instance;
935
- function values_3() {
1207
+ function values_4() {
936
1208
  return [Extension_Java_getInstance(), Extension_Kotlin_getInstance(), Extension_Scala_getInstance(), Extension_TypeScript_getInstance(), Extension_Wirespec_getInstance(), Extension_Json_getInstance()];
937
1209
  }
938
1210
  function get_entries_3() {
939
1211
  if ($ENTRIES_3 == null)
940
- $ENTRIES_3 = enumEntries(values_3());
1212
+ $ENTRIES_3 = enumEntries(values_4());
941
1213
  return $ENTRIES_3;
942
1214
  }
943
1215
  var Extension_entriesInitialized;
@@ -955,7 +1227,7 @@
955
1227
  var $ENTRIES_3;
956
1228
  function Extension(name, ordinal, ext) {
957
1229
  Enum.call(this, name, ordinal);
958
- this.i25_1 = ext;
1230
+ this.s3o_1 = ext;
959
1231
  }
960
1232
  function Extension_Java_getInstance() {
961
1233
  Extension_initEntries();
@@ -981,143 +1253,55 @@
981
1253
  Extension_initEntries();
982
1254
  return Extension_Json_instance;
983
1255
  }
984
- function Companion_1() {
985
- Companion_instance_1 = this;
986
- }
987
- protoOf(Companion_1).f25 = function (input) {
988
- // Inline function 'kotlin.let' call
989
- var tmp0_let = split_0(input, ['/']);
990
- // Inline function 'kotlin.contracts.contract' call
991
- // Inline function 'community.flock.wirespec.compiler.cli.io.Companion.parse.<anonymous>' call
992
- var list = plus(dropLast(tmp0_let, 1), split_0(last(tmp0_let), ['.']));
993
- // Inline function 'kotlin.let' call
994
- // Inline function 'kotlin.text.lowercase' call
995
- // Inline function 'kotlin.js.asDynamic' call
996
- var tmp2_let = last(list).toLowerCase();
997
- // Inline function 'kotlin.contracts.contract' call
998
- // Inline function 'community.flock.wirespec.compiler.cli.io.Companion.parse.<anonymous>' call
999
- // Inline function 'kotlin.collections.find' call
1000
- var tmp0_find = get_entries_3();
1001
- var tmp$ret$5;
1002
- $l$block: {
1003
- // Inline function 'kotlin.collections.firstOrNull' call
1004
- var tmp0_iterator = tmp0_find.c();
1005
- while (tmp0_iterator.d()) {
1006
- var element = tmp0_iterator.e();
1007
- // Inline function 'community.flock.wirespec.compiler.cli.io.Companion.parse.<anonymous>.<anonymous>' call
1008
- if (element.i25_1 === tmp2_let) {
1009
- tmp$ret$5 = element;
1010
- break $l$block;
1011
- }
1012
- }
1013
- tmp$ret$5 = null;
1014
- }
1015
- var tmp0_elvis_lhs = tmp$ret$5;
1016
- var tmp;
1017
- if (tmp0_elvis_lhs == null) {
1018
- throw IllegalStateException_init_$Create$('Invalid file extension');
1019
- } else {
1020
- tmp = tmp0_elvis_lhs;
1021
- }
1022
- var extension = tmp;
1023
- var filename = list.h(list.f() - 2 | 0);
1024
- var path = joinToString(list.s(0, list.f() - 2 | 0), '/');
1025
- return new FullFilePath(path, filename, extension);
1026
- };
1027
- var Companion_instance_1;
1028
- function Companion_getInstance_5() {
1029
- if (Companion_instance_1 == null)
1030
- new Companion_1();
1031
- return Companion_instance_1;
1032
- }
1033
- function FullFilePath(directory, fileName, extension) {
1034
- Companion_getInstance_5();
1035
- extension = extension === VOID ? Extension_Wirespec_getInstance() : extension;
1036
- this.k25_1 = directory;
1037
- this.l25_1 = fileName;
1038
- this.m25_1 = extension;
1039
- }
1040
- protoOf(FullFilePath).toString = function () {
1041
- return this.k25_1 + '/' + this.l25_1 + '.' + this.m25_1.i25_1;
1042
- };
1043
- protoOf(FullFilePath).q25 = function (directory, fileName, extension) {
1044
- return new FullFilePath(directory, fileName, extension);
1045
- };
1046
- protoOf(FullFilePath).p25 = function (directory, fileName, extension, $super) {
1047
- directory = directory === VOID ? this.k25_1 : directory;
1048
- fileName = fileName === VOID ? this.l25_1 : fileName;
1049
- extension = extension === VOID ? this.m25_1 : extension;
1050
- return $super === VOID ? this.q25(directory, fileName, extension) : $super.q25.call(this, directory, fileName, extension);
1051
- };
1052
- protoOf(FullFilePath).hashCode = function () {
1053
- var result = getStringHashCode(this.k25_1);
1054
- result = imul(result, 31) + getStringHashCode(this.l25_1) | 0;
1055
- result = imul(result, 31) + this.m25_1.hashCode() | 0;
1056
- return result;
1057
- };
1058
- protoOf(FullFilePath).equals = function (other) {
1059
- if (this === other)
1060
- return true;
1061
- if (!(other instanceof FullFilePath))
1062
- return false;
1063
- var tmp0_other_with_cast = other instanceof FullFilePath ? other : THROW_CCE();
1064
- if (!(this.k25_1 === tmp0_other_with_cast.k25_1))
1065
- return false;
1066
- if (!(this.l25_1 === tmp0_other_with_cast.l25_1))
1067
- return false;
1068
- if (!this.m25_1.equals(tmp0_other_with_cast.m25_1))
1069
- return false;
1070
- return true;
1071
- };
1072
1256
  function JavaFile(path) {
1073
- File.call(this, path.p25(VOID, VOID, Extension_Java_getInstance()));
1257
+ File.call(this, path.x3o(VOID, VOID, Extension_Java_getInstance()));
1074
1258
  }
1075
- protoOf(JavaFile).n25 = function (fileName) {
1076
- return new JavaFile(this.j25_1.p25(VOID, fileName));
1259
+ protoOf(JavaFile).c3p = function (fileName) {
1260
+ return new JavaFile(this.z3o_1.x3o(VOID, fileName));
1077
1261
  };
1078
1262
  function JsonFile(path) {
1079
- File.call(this, path.p25(VOID, VOID, Extension_Json_getInstance()));
1263
+ File.call(this, path.x3o(VOID, VOID, Extension_Json_getInstance()));
1080
1264
  }
1081
- protoOf(JsonFile).n25 = function (fileName) {
1082
- return new JsonFile(this.j25_1.p25(VOID, fileName));
1265
+ protoOf(JsonFile).c3p = function (fileName) {
1266
+ return new JsonFile(this.z3o_1.x3o(VOID, fileName));
1083
1267
  };
1084
1268
  function KotlinFile(path) {
1085
- File.call(this, path.p25(VOID, VOID, Extension_Kotlin_getInstance()));
1269
+ File.call(this, path.x3o(VOID, VOID, Extension_Kotlin_getInstance()));
1086
1270
  }
1087
- protoOf(KotlinFile).n25 = function (fileName) {
1088
- return new KotlinFile(this.j25_1.p25(VOID, fileName));
1271
+ protoOf(KotlinFile).c3p = function (fileName) {
1272
+ return new KotlinFile(this.z3o_1.x3o(VOID, fileName));
1089
1273
  };
1090
1274
  function ScalaFile(path) {
1091
- File.call(this, path.p25(VOID, VOID, Extension_Scala_getInstance()));
1275
+ File.call(this, path.x3o(VOID, VOID, Extension_Scala_getInstance()));
1092
1276
  }
1093
- protoOf(ScalaFile).n25 = function (fileName) {
1094
- return new ScalaFile(this.j25_1.p25(VOID, fileName));
1277
+ protoOf(ScalaFile).c3p = function (fileName) {
1278
+ return new ScalaFile(this.z3o_1.x3o(VOID, fileName));
1095
1279
  };
1096
1280
  function TypeScriptFile(path) {
1097
- File.call(this, path.p25(VOID, VOID, Extension_TypeScript_getInstance()));
1281
+ File.call(this, path.x3o(VOID, VOID, Extension_TypeScript_getInstance()));
1098
1282
  }
1099
- protoOf(TypeScriptFile).n25 = function (fileName) {
1100
- return new TypeScriptFile(this.j25_1.p25(VOID, fileName));
1283
+ protoOf(TypeScriptFile).c3p = function (fileName) {
1284
+ return new TypeScriptFile(this.z3o_1.x3o(VOID, fileName));
1101
1285
  };
1102
1286
  function WirespecFile(path) {
1103
- File.call(this, path.p25(VOID, VOID, Extension_Wirespec_getInstance()));
1287
+ File.call(this, path.x3o(VOID, VOID, Extension_Wirespec_getInstance()));
1104
1288
  }
1105
- protoOf(WirespecFile).n25 = function (fileName) {
1106
- return new WirespecFile(this.j25_1.p25(VOID, fileName));
1289
+ protoOf(WirespecFile).c3p = function (fileName) {
1290
+ return new WirespecFile(this.z3o_1.x3o(VOID, fileName));
1107
1291
  };
1108
1292
  function Directory$wirespecFiles$lambda(it) {
1109
1293
  // Inline function 'kotlin.js.unsafeCast' call
1110
1294
  return it;
1111
1295
  }
1112
1296
  function Directory$wirespecFiles$lambda_0(it) {
1113
- return endsWith(it, Extension_Wirespec_getInstance().i25_1);
1297
+ return endsWith(it, Extension_Wirespec_getInstance().s3o_1);
1114
1298
  }
1115
1299
  function Directory$wirespecFiles$lambda_1(it) {
1116
- return dropLast_0(it, Extension_Wirespec_getInstance().i25_1.length + 1 | 0);
1300
+ return dropLast_0(it, Extension_Wirespec_getInstance().s3o_1.length + 1 | 0);
1117
1301
  }
1118
1302
  function Directory$wirespecFiles$lambda_2(this$0) {
1119
1303
  return function (it) {
1120
- return new FullFilePath(this$0.d25_1, it);
1304
+ return new FullFilePath(this$0.a3p_1, it);
1121
1305
  };
1122
1306
  }
1123
1307
  function WirespecFile$_init_$ref_cj1n5j() {
@@ -1128,10 +1312,10 @@
1128
1312
  return l;
1129
1313
  }
1130
1314
  function Directory(path) {
1131
- this.d25_1 = path;
1315
+ this.a3p_1 = path;
1132
1316
  }
1133
- protoOf(Directory).e25 = function () {
1134
- var tmp = asSequence(iterator(get_fs().readdirSync(this.d25_1, 'utf-8')));
1317
+ protoOf(Directory).b3p = function () {
1318
+ var tmp = asSequence(iterator(get_fs().readdirSync(this.a3p_1, 'utf-8')));
1135
1319
  var tmp_0 = map(tmp, Directory$wirespecFiles$lambda);
1136
1320
  var tmp_1 = filter(tmp_0, Directory$wirespecFiles$lambda_0);
1137
1321
  var tmp_2 = map(tmp_1, Directory$wirespecFiles$lambda_1);
@@ -1139,20 +1323,20 @@
1139
1323
  return toSet_0(map(tmp_3, WirespecFile$_init_$ref_cj1n5j()));
1140
1324
  };
1141
1325
  function File(path) {
1142
- this.j25_1 = path;
1326
+ this.z3o_1 = path;
1143
1327
  }
1144
- protoOf(File).d10 = function () {
1328
+ protoOf(File).p11 = function () {
1145
1329
  // Inline function 'kotlin.js.unsafeCast' call
1146
- return get_fs().readFileSync(this.j25_1.toString(), 'utf-8');
1330
+ return get_fs().readFileSync(this.z3o_1.toString(), 'utf-8');
1147
1331
  };
1148
- protoOf(File).o25 = function (text) {
1332
+ protoOf(File).d3p = function (text) {
1149
1333
  // Inline function 'kotlin.run' call
1150
- var tmp0_run = this.j25_1.p25(joinToString(split_0(this.j25_1.k25_1, ['out']), 'out/node'));
1334
+ var tmp0_run = this.z3o_1.x3o(joinToString(split(this.z3o_1.t3o_1, ['out']), 'out/node'));
1151
1335
  // Inline function 'kotlin.contracts.contract' call
1152
1336
  // Inline function 'community.flock.wirespec.compiler.cli.io.File.write.<anonymous>' call
1153
1337
  // Inline function 'kotlin.js.unsafeCast' call
1154
- if (!get_fs().existsSync(tmp0_run.k25_1)) {
1155
- get_fs().mkdirSync(tmp0_run.k25_1, {recursive: true});
1338
+ if (!get_fs().existsSync(tmp0_run.t3o_1)) {
1339
+ get_fs().mkdirSync(tmp0_run.t3o_1, {recursive: true});
1156
1340
  }
1157
1341
  get_fs().writeFileSync(tmp0_run.toString(), text);
1158
1342
  };