@flock/wirespec 0.17.19 → 0.18.0-RC.1

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.
Files changed (87) hide show
  1. package/arrow-arrow-annotations.mjs.map +1 -1
  2. package/arrow-arrow-atomic.mjs +13 -13
  3. package/arrow-arrow-atomic.mjs.map +1 -1
  4. package/arrow-arrow-core.mjs +594 -431
  5. package/arrow-arrow-core.mjs.map +1 -1
  6. package/arrow-arrow-exception-utils.mjs +30 -0
  7. package/arrow-arrow-exception-utils.mjs.map +1 -0
  8. package/clikt-clikt-mordant.mjs +318 -0
  9. package/clikt-clikt-mordant.mjs.map +1 -0
  10. package/clikt-clikt.mjs +3834 -3696
  11. package/clikt-clikt.mjs.map +1 -1
  12. package/colormath-root-colormath.mjs +619 -682
  13. package/colormath-root-colormath.mjs.map +1 -1
  14. package/kotlin-js-core.mjs +4 -0
  15. package/kotlin-js-core.mjs.map +1 -0
  16. package/kotlin-js.mjs +4 -0
  17. package/kotlin-js.mjs.map +1 -0
  18. package/kotlin-kotlin-stdlib.mjs +6339 -5816
  19. package/kotlin-kotlin-stdlib.mjs.map +1 -1
  20. package/kotlin-openapi-bindings.mjs +8163 -8198
  21. package/kotlin-openapi-bindings.mjs.map +1 -1
  22. package/kotlin-plugins-js-plain-objects-runtime.mjs +4 -0
  23. package/kotlin-plugins-js-plain-objects-runtime.mjs.map +1 -0
  24. package/kotlin-rgxgen.mjs +2007 -2062
  25. package/kotlin-rgxgen.mjs.map +1 -1
  26. package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs.map +1 -1
  27. package/kotlinx-atomicfu.mjs +4 -0
  28. package/kotlinx-atomicfu.mjs.map +1 -0
  29. package/kotlinx-coroutines-core.mjs +4 -0
  30. package/kotlinx-coroutines-core.mjs.map +1 -0
  31. package/kotlinx-io-kotlinx-io-bytestring.mjs.map +1 -1
  32. package/kotlinx-io-kotlinx-io-core.mjs +803 -839
  33. package/kotlinx-io-kotlinx-io-core.mjs.map +1 -1
  34. package/kotlinx-serialization-kotlinx-serialization-core.mjs +2483 -2553
  35. package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -1
  36. package/kotlinx-serialization-kotlinx-serialization-json.mjs +1869 -1928
  37. package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
  38. package/mordant-mordant-omnibus.mjs +4 -0
  39. package/mordant-mordant-omnibus.mjs.map +1 -0
  40. package/mordant-mordant.mjs +2532 -4425
  41. package/mordant-mordant.mjs.map +1 -1
  42. package/package.json +4 -7
  43. package/seskar-core.mjs +4 -0
  44. package/seskar-core.mjs.map +1 -0
  45. package/wirespec-bin.mjs +13 -1
  46. package/wirespec-fetch.d.ts +4 -1
  47. package/wirespec-fetch.mjs +34 -0
  48. package/wirespec-serialization.d.ts +13 -2
  49. package/wirespec-serialization.mjs +22 -1
  50. package/wirespec-src-compiler-core.mjs +2856 -3908
  51. package/wirespec-src-compiler-core.mjs.map +1 -1
  52. package/wirespec-src-compiler-emitters-java.mjs +1358 -427
  53. package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
  54. package/wirespec-src-compiler-emitters-kotlin.mjs +1010 -337
  55. package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
  56. package/wirespec-src-compiler-emitters-python.mjs +1462 -385
  57. package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
  58. package/wirespec-src-compiler-emitters-rust.mjs +2247 -0
  59. package/wirespec-src-compiler-emitters-rust.mjs.map +1 -0
  60. package/wirespec-src-compiler-emitters-scala.mjs +1018 -0
  61. package/wirespec-src-compiler-emitters-scala.mjs.map +1 -0
  62. package/wirespec-src-compiler-emitters-typescript.mjs +1540 -426
  63. package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
  64. package/wirespec-src-compiler-emitters-wirespec.mjs +119 -141
  65. package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
  66. package/wirespec-src-compiler-ir.mjs +17339 -0
  67. package/wirespec-src-compiler-ir.mjs.map +1 -0
  68. package/wirespec-src-compiler-lib.mjs +662 -728
  69. package/wirespec-src-compiler-lib.mjs.map +1 -1
  70. package/wirespec-src-converter-avro.mjs +630 -656
  71. package/wirespec-src-converter-avro.mjs.map +1 -1
  72. package/wirespec-src-converter-common.mjs.map +1 -1
  73. package/wirespec-src-converter-openapi.mjs +1705 -2024
  74. package/wirespec-src-converter-openapi.mjs.map +1 -1
  75. package/wirespec-src-plugin-arguments.mjs +418 -459
  76. package/wirespec-src-plugin-arguments.mjs.map +1 -1
  77. package/wirespec-src-plugin-cli.mjs +367 -331
  78. package/wirespec-src-plugin-cli.mjs.map +1 -1
  79. package/{wirespec-src-plugin-npm.d.ts → wirespec-src-plugin-npm.d.mts} +247 -0
  80. package/wirespec-src-plugin-npm.mjs +166 -359
  81. package/wirespec-src-plugin-npm.mjs.map +1 -1
  82. package/wirespec-src-tools-generator.mjs +79 -106
  83. package/wirespec-src-tools-generator.mjs.map +1 -1
  84. package/arrow-arrow-continuations.mjs +0 -18
  85. package/arrow-arrow-continuations.mjs.map +0 -1
  86. package/markdown.mjs +0 -6756
  87. package/markdown.mjs.map +0 -1
@@ -1,57 +1,56 @@
1
1
  import {
2
2
  CliktError136b5l5psfi1n as CliktError,
3
- subcommands3iz66ruo6cdc as subcommands,
4
- NoOpCliktCommand2adtfdm68nv09 as NoOpCliktCommand,
5
- argument2zdhc640dnlyc as argument,
3
+ subcommands1t5srr48gscgb as subcommands,
4
+ argument20xwh6nm8yp91 as argument,
6
5
  optional2v0ee42t2688o as optional,
7
6
  option2wnxma00ykjjp as option,
8
7
  choice1qx2pgx161pnc as choice,
9
8
  multiple1ilt3bwdbyd8l as multiple,
10
9
  choiceie3147xkuo29 as choice_0,
11
- CliktCommand1a5aj7xujka26 as CliktCommand,
12
10
  default2v6m45aspyoyr as default_0,
13
11
  flag3dod1qr8no54f as flag,
12
+ main23hc8f9rb75p1 as main,
14
13
  } from './clikt-clikt.mjs';
15
14
  import {
16
15
  captureStack1fzi4aczwc4hg as captureStack,
17
16
  protoOf180f3jzyo7rfj as protoOf,
18
17
  initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
19
- VOID7hggqo3abtya as VOID,
18
+ VOID3gxj6tk5isa35 as VOID,
20
19
  initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
21
- Unit_instanceat14thlj150z as Unit_instance,
20
+ KProperty1ca4yb4wlo496 as KProperty1,
21
+ getPropertyCallableRef3hckxc0xueiaj as getPropertyCallableRef,
22
22
  listOfvhqybd2zx248 as listOf,
23
23
  noWhenBranchMatchedException2a6r7ubxgky5j as noWhenBranchMatchedException,
24
+ Unit_instance28fytmsmm6r23 as Unit_instance,
24
25
  mapCapacity1h45rc3eh9p2l as mapCapacity,
25
26
  coerceAtLeast2bkz8m9ik7hep as coerceAtLeast,
26
- LinkedHashMap_init_$Create$snys8oz8txtu as LinkedHashMap_init_$Create$,
27
+ LinkedHashMap_init_$Create$1s75e1k23v4xj as LinkedHashMap_init_$Create$,
27
28
  THROW_CCE2g6jy02ryeudk as THROW_CCE,
28
29
  isCharSequence1ju9jr1w86plq as isCharSequence,
29
30
  trim11nh7r46at6sx as trim,
30
31
  toString1pkumu07cwy4m as toString,
31
32
  Enum3alwj03lh1n41 as Enum,
32
33
  collectionSizeOrDefault36dulx8yinfqm as collectionSizeOrDefault,
33
- ArrayList_init_$Create$3m1kyiqequwm5 as ArrayList_init_$Create$,
34
- KProperty1ca4yb4wlo496 as KProperty1,
35
- getPropertyCallableRef1ajb9in178r5r as getPropertyCallableRef,
34
+ ArrayList_init_$Create$3ivpeip4ouddx as ArrayList_init_$Create$,
36
35
  until1jbpn0z3f8lbg as until,
37
- ArrayList_init_$Create$2rimpp4x9tjd3 as ArrayList_init_$Create$_0,
36
+ ArrayList_init_$Create$1jemgvhi5v0js as ArrayList_init_$Create$_0,
38
37
  joinToString1cxrrlmo0chqs as joinToString,
39
- IllegalStateException_init_$Create$1nm9y6jd3c9iy as IllegalStateException_init_$Create$,
38
+ IllegalStateException_init_$Create$2429fvs1h56dm as IllegalStateException_init_$Create$,
40
39
  addAll1k27qatfgp3k5 as addAll,
41
40
  copyToArray2j022khrow2yi as copyToArray,
42
41
  isArray1hxjqtqy632bc as isArray,
43
42
  } from './kotlin-kotlin-stdlib.mjs';
44
43
  import {
45
- FileExtension_Wirespec_getInstance2ludls5udllsg as FileExtension_Wirespec_getInstance,
46
- FileExtension_JSON_getInstance17az9ircs0qds as FileExtension_JSON_getInstance,
47
- Companion_instance23sx7f8mbt1q7 as Companion_instance,
44
+ FileExtension_Wirespec_getInstance29avtvqk6h59d as FileExtension_Wirespec_getInstance,
45
+ FileExtension_JSON_getInstance34944ido213py as FileExtension_JSON_getInstance,
46
+ Companion_instancewxnc9ytfyvo4 as Companion_instance,
48
47
  Logger1cwdyrq5itr5l as Logger,
49
- Companion_instance2ag0h5twtdral as Companion_instance_0,
48
+ Companion_instance1a2xqc448tlhh as Companion_instance_0,
50
49
  EmitSharedetokabwo9q4q as EmitShared,
51
- Level_INFO_getInstancevr8f23fhidva as Level_INFO_getInstance,
52
- Level_DEBUG_getInstance120gr1dodanmw as Level_DEBUG_getInstance,
53
- Level_WARN_getInstance10k8p0ght4zmu as Level_WARN_getInstance,
54
- Level_ERROR_getInstance19uouzczl49bf as Level_ERROR_getInstance,
50
+ Level_INFO_getInstancek4nh3v7qm1zh as Level_INFO_getInstance,
51
+ Level_DEBUG_getInstance3em7wvdn7y09d as Level_DEBUG_getInstance,
52
+ Level_WARN_getInstance20ovnux1aumbt as Level_WARN_getInstance,
53
+ Level_ERROR_getInstanceevw63gxlm1ou as Level_ERROR_getInstance,
55
54
  FileUri2xjkmf4jmvpab as FileUri,
56
55
  ModuleContent750xezzquzy9 as ModuleContent,
57
56
  parse24q0pxmbph48t as parse,
@@ -61,8 +60,12 @@ import {
61
60
  NoLoggero51bdi3we1s0 as NoLogger,
62
61
  } from './wirespec-src-compiler-core.mjs';
63
62
  import {
64
- Companion_instancewgxql7b970h7 as Companion_instance_1,
65
- Language_Kotlin_getInstancesf3hf9q9fn0g as Language_Kotlin_getInstance,
63
+ NoOpCliktCommand2adtfdm68nv09 as NoOpCliktCommand,
64
+ CliktCommand1a5aj7xujka26 as CliktCommand,
65
+ } from './clikt-clikt-mordant.mjs';
66
+ import {
67
+ Companion_instance1z5eikg0ignsi as Companion_instance_1,
68
+ Language_Kotlin_getInstance86uxb9qtensx as Language_Kotlin_getInstance,
66
69
  getFullPath4g3ciksg8rpm as getFullPath,
67
70
  read1bpb5m43oodfb as read,
68
71
  Source2leyaqfqfs5k3 as Source,
@@ -72,32 +75,35 @@ import {
72
75
  or33xhl4wx85q9x as or,
73
76
  DirectoryPath39bbfr0ixndbr as DirectoryPath,
74
77
  ClassPath7upbvx9mwagz as ClassPath,
75
- _Name___init__impl__o4q07e3fjy1youl9nku as _Name___init__impl__o4q07e,
78
+ _Name___init__impl__o4q07e2eria0k23tn4 as _Name___init__impl__o4q07e,
76
79
  getOutPutPathqmn3xkxu6se6 as getOutPutPath,
77
80
  CompilerArguments27p1etc1665zg as CompilerArguments,
78
81
  values39f22etrsivck as values,
79
82
  ConverterArgumentsa8xc45eyvf51 as ConverterArguments,
80
- Companion_instance19lljpggtes6o as Companion_instance_2,
81
- _DirectoryPath___get_value__impl__hdy2e33exlp2vb3n338 as _DirectoryPath___get_value__impl__hdy2e3,
83
+ Companion_instance2lab4vlj8rrht as Companion_instance_2,
84
+ _DirectoryPath___get_value__impl__hdy2e33f4bkvzwyu6et as _DirectoryPath___get_value__impl__hdy2e3,
82
85
  write1u316o1mmac8j as write,
83
86
  toEmitter3vk7m5bivtqhk as toEmitter,
87
+ toIrEmitter26636pwh5dqqw as toIrEmitter,
84
88
  compile3ocumkpx3p9ko as compile,
85
89
  convert3g5kyi4d6y9kc as convert,
86
90
  } from './wirespec-src-plugin-arguments.mjs';
87
91
  import {
88
- Left2oemzq1tpcg4i as Left,
89
92
  Right351sh2v8odavg as Right,
93
+ Left2oemzq1tpcg4i as Left,
90
94
  nonEmptySetOf3p7fhmt51pz4b as nonEmptySetOf,
91
95
  NonEmptySet1rtvr2guloo52 as NonEmptySet,
92
96
  toNonEmptySetOrNull1tjnd9jrkd4bs as toNonEmptySetOrNull,
93
97
  nonEmptyListOf17xawqyzwrlrt as nonEmptyListOf,
94
- Companion_instance1agi799z0n1y4 as Companion_instance_3,
95
- right2w60qw9uivnyr as right,
96
- nonFatalOrThrow35agffkx4bbtz as nonFatalOrThrow,
97
- left3pixsqou14wpr as left,
98
+ NonEmptyList3ak25ihy2gcvs as NonEmptyList,
99
+ _NonEmptyList___get_all__impl__pmf5092svcdxelgy1aa as _NonEmptyList___get_all__impl__pmf509,
100
+ _NonEmptyList___init__impl__fxd0xp3qwfhfa83yk9f as _NonEmptyList___init__impl__fxd0xp,
101
+ NonEmptyList__toList_impl_t5xcy2362qtlja6arn8 as NonEmptyList__toList_impl_t5xcy2,
102
+ Companion_instance139l85s51p6ol as Companion_instance_3,
98
103
  } from './arrow-arrow-core.mjs';
99
104
  import { WirespecEmitter2ad9je4ecrvjk as WirespecEmitter } from './wirespec-src-compiler-emitters-wirespec.mjs';
100
105
  import { produce6pbudlitvnns as produce } from './wirespec-src-compiler-lib.mjs';
106
+ import { nonFatalOrThrow35agffkx4bbtz as nonFatalOrThrow } from './arrow-arrow-exception-utils.mjs';
101
107
  //region block: imports
102
108
  //endregion
103
109
  //region block: pre-declaration
@@ -114,7 +120,7 @@ initMetadataForClass(CommonOptions, 'CommonOptions', VOID, CliktCommand);
114
120
  initMetadataForClass(Compile, 'Compile', VOID, CommonOptions);
115
121
  initMetadataForClass(Convert, 'Convert', VOID, CommonOptions);
116
122
  initMetadataForClass(Options, 'Options', VOID, Enum);
117
- initMetadataForClass(parser$this$this$this$this$1, VOID, VOID, VOID, [HasLanguageSpec, NoLogger]);
123
+ initMetadataForClass(parser$1, VOID, VOID, VOID, [HasLanguageSpec, NoLogger]);
118
124
  //endregion
119
125
  function NoInputReceived() {
120
126
  CliktError.call(this, 'No input file, directory, or stdin received.');
@@ -141,12 +147,12 @@ function ChooseALogLevel() {
141
147
  captureStack(this, ChooseALogLevel);
142
148
  }
143
149
  function SpecificFile(extension) {
144
- CliktError.call(this, 'No ' + extension.q2_1 + ' file found');
150
+ CliktError.call(this, 'No ' + extension.b3_1 + ' file found');
145
151
  captureStack(this, SpecificFile);
146
152
  }
147
153
  function Companion() {
148
154
  }
149
- protoOf(Companion).k4a = function (compile, convert) {
155
+ protoOf(Companion).w47 = function (compile, convert) {
150
156
  return subcommands(new WirespecCli(), [new Compile(compile), new Convert(convert)]);
151
157
  };
152
158
  var Companion_instance_4;
@@ -154,16 +160,35 @@ function Companion_getInstance() {
154
160
  return Companion_instance_4;
155
161
  }
156
162
  function WirespecCli() {
157
- NoOpCliktCommand.call(this, VOID, VOID, 'wirespec');
163
+ NoOpCliktCommand.call(this, 'wirespec');
158
164
  }
159
165
  function _get_stdin__b8xnlj($this) {
160
- return $this.j4b_1.s47($this, stdin$factory_0());
166
+ var tmp = KProperty1;
167
+ return $this.u48_1.z1b($this, getPropertyCallableRef('stdin', 1, tmp, Compile$_get_stdin_$ref_5ywd7d_0(), null));
161
168
  }
162
169
  function _get_languages__ojonze($this) {
163
- return $this.k4b_1.s47($this, languages$factory_0());
170
+ var tmp = KProperty1;
171
+ return $this.v48_1.z1b($this, getPropertyCallableRef('languages', 1, tmp, Compile$_get_languages_$ref_nluohg_0(), null));
164
172
  }
165
- function run$handleError(p0) {
166
- handleError(p0);
173
+ function Compile$_get_stdin_$ref_5ywd7d() {
174
+ return function (p0) {
175
+ return _get_stdin__b8xnlj(p0);
176
+ };
177
+ }
178
+ function Compile$_get_stdin_$ref_5ywd7d_0() {
179
+ return function (p0) {
180
+ return _get_stdin__b8xnlj(p0);
181
+ };
182
+ }
183
+ function Compile$_get_languages_$ref_nluohg() {
184
+ return function (p0) {
185
+ return _get_languages__ojonze(p0);
186
+ };
187
+ }
188
+ function Compile$_get_languages_$ref_nluohg_0() {
189
+ return function (p0) {
190
+ return _get_languages__ojonze(p0);
191
+ };
167
192
  }
168
193
  function handleError$ref() {
169
194
  var l = function (p0) {
@@ -179,34 +204,34 @@ function handleError$ref_0() {
179
204
  l.callableName = 'handleError';
180
205
  return l;
181
206
  }
182
- function Compile$run$handleError$ref() {
207
+ function handleError$ref_1() {
183
208
  return function (p0) {
184
- run$handleError(p0);
185
- return Unit_instance;
209
+ handleError(p0);
186
210
  };
187
211
  }
188
212
  function Compile(compiler) {
189
213
  CommonOptions.call(this);
190
- this.i4b_1 = compiler;
191
- this.j4b_1 = optional(argument(this, VOID, 'stdin')).y46(this, stdin$factory());
192
- this.k4b_1 = multiple(choice(option(this, Options_Language_getInstance().n4b_1.slice(), 'Language'), Companion_instance_1.q2i(), VOID, true), listOf(Language_Kotlin_getInstance())).c48(this, languages$factory());
193
- }
194
- protoOf(Compile).g3y = function () {
195
- var logger = new Logger(this.m4c(this.l4c()));
214
+ this.t48_1 = compiler;
215
+ var tmp = this;
216
+ var tmp_0 = optional(argument(this, VOID, 'stdin'));
217
+ var tmp_1 = KProperty1;
218
+ tmp.u48_1 = tmp_0.f1b(this, getPropertyCallableRef('stdin', 1, tmp_1, Compile$_get_stdin_$ref_5ywd7d(), null));
219
+ var tmp_2 = this;
220
+ var tmp_3 = multiple(choice(option(this, Options_Language_getInstance().y48_1.slice(), 'Language'), Companion_instance_1.n3n(), VOID, true), listOf(Language_Kotlin_getInstance()));
221
+ var tmp_4 = KProperty1;
222
+ tmp_2.v48_1 = tmp_3.j1c(this, getPropertyCallableRef('languages', 1, tmp_4, Compile$_get_languages_$ref_nluohg(), null));
223
+ }
224
+ protoOf(Compile).y12 = function () {
225
+ var logger = new Logger(this.w49(this.v49()));
196
226
  // Inline function 'arrow.core.getOrElse' call
197
- // Inline function 'kotlin.contracts.contract' call
198
- // Inline function 'arrow.core.Either.fold' call
199
- var this_0 = getFullPath(this.n4c());
200
- // Inline function 'kotlin.contracts.contract' call
227
+ var this_0 = getFullPath(this.x49());
201
228
  var tmp;
202
- if (this_0 instanceof Right) {
203
- // Inline function 'arrow.core.identity' call
204
- // Inline function 'arrow.core.identity' call
205
- tmp = this_0.ek_1;
229
+ if (this_0 instanceof Left) {
230
+ var it = this_0.pl_1;
231
+ throw new CliktError(it.t3o_1);
206
232
  } else {
207
- if (this_0 instanceof Left) {
208
- var it = this_0.yj_1;
209
- throw new CliktError(it.v2j_1);
233
+ if (this_0 instanceof Right) {
234
+ tmp = this_0.rl_1;
210
235
  } else {
211
236
  noWhenBranchMatchedException();
212
237
  }
@@ -220,8 +245,6 @@ protoOf(Compile).g3y = function () {
220
245
  tmp_1 = null;
221
246
  } else {
222
247
  // Inline function 'kotlin.let' call
223
- // Inline function 'kotlin.contracts.contract' call
224
- // Inline function 'community.flock.wirespec.plugin.cli.Compile.run.<anonymous>' call
225
248
  tmp_1 = nonEmptySetOf(new Source(_Name___init__impl__o4q07e('stdin'), tmp1_safe_receiver), []);
226
249
  }
227
250
  var tmp2_elvis_lhs = tmp_1;
@@ -238,19 +261,17 @@ protoOf(Compile).g3y = function () {
238
261
  throw new NoClasspathPossible();
239
262
  } else {
240
263
  if (inputPath instanceof DirectoryPath) {
241
- var tmp_4 = wirespecSources(new Directory(inputPath.p2j_1), logger);
242
- tmp_0 = or(tmp_4, handleError$ref()).xk_1;
264
+ var tmp_4 = wirespecSources(new Directory(inputPath.n3o_1), logger);
265
+ tmp_0 = or(tmp_4, handleError$ref()).fm_1;
243
266
  } else {
244
267
  if (inputPath instanceof FilePath) {
245
268
  var tmp_5;
246
- if (inputPath.u2j_1.r2_1 === 4) {
269
+ if (inputPath.s3o_1.c3_1 === 6) {
247
270
  // Inline function 'kotlin.also' call
248
- var this_1 = new NonEmptySet(nonEmptySetOf(new Source(inputPath.t2j_1, read(inputPath)), []));
249
- // Inline function 'kotlin.contracts.contract' call
250
- // Inline function 'community.flock.wirespec.plugin.cli.Compile.run.<anonymous>' call
251
- this_1.xk_1;
252
- logger.u25('Found 1 wirespec file to process: ' + inputPath.toString());
253
- tmp_5 = this_1.xk_1;
271
+ var this_1 = new NonEmptySet(nonEmptySetOf(new Source(inputPath.r3o_1, read(inputPath)), []));
272
+ this_1.fm_1;
273
+ logger.uq('Found 1 wirespec file to process: ' + inputPath.toString());
274
+ tmp_5 = this_1.fm_1;
254
275
  } else {
255
276
  throw new WirespecFileError();
256
277
  }
@@ -262,64 +283,90 @@ protoOf(Compile).g3y = function () {
262
283
  }
263
284
  }
264
285
  var sources = tmp_0;
265
- var emitters = toEmitters(_get_languages__ojonze(this), Companion_instance_0.n26(this.i2a()), new EmitShared(this.s2a()));
286
+ var emitters = toEmitters(_get_languages__ojonze(this), Companion_instance_0.nr(this.l1v()), new EmitShared(this.u1v()), this.y49());
266
287
  var tmp_6;
267
288
  if (inputPath == null) {
268
289
  tmp_6 = null;
269
290
  } else {
270
291
  // Inline function 'kotlin.let' call
271
- // Inline function 'kotlin.contracts.contract' call
272
- // Inline function 'community.flock.wirespec.plugin.cli.Compile.run.<anonymous>' call
273
- var tmp_7 = getOutPutPath(inputPath, this.o4c());
274
- tmp_6 = new Directory(or(tmp_7, handleError$ref_0()).p2j_1);
292
+ var tmp_7 = getOutPutPath(inputPath, this.z49());
293
+ tmp_6 = new Directory(or(tmp_7, handleError$ref_0()).n3o_1);
275
294
  }
276
295
  var outputDir = tmp_6;
296
+ var tmp_8 = this.a4a(outputDir);
297
+ var tmp0 = new CompilerArguments(sources, emitters, tmp_8, handleError$ref_1(), Companion_instance_0.nr(this.l1v()), logger, this.u1v(), this.b4a(), this.y49());
277
298
  // Inline function 'kotlin.let' call
278
- var tmp_8 = this.p4c(outputDir);
279
- var this_2 = new CompilerArguments(sources, emitters, tmp_8, Compile$run$handleError$ref(), Companion_instance_0.n26(this.i2a()), logger, this.s2a(), this.q4c());
280
- // Inline function 'kotlin.contracts.contract' call
281
- this.i4b_1(this_2);
299
+ this.t48_1(tmp0);
282
300
  };
283
301
  function _get_format__qlarck($this) {
284
- return $this.p4d_1.s47($this, format$factory_0());
302
+ var tmp = KProperty1;
303
+ return $this.z4a_1.z1b($this, getPropertyCallableRef('format', 1, tmp, Convert$_get_format_$ref_ve190_0(), null));
285
304
  }
286
305
  function _get_stdin__b8xnlj_0($this) {
287
- return $this.q4d_1.s47($this, stdin$factory_2());
306
+ var tmp = KProperty1;
307
+ return $this.a4b_1.z1b($this, getPropertyCallableRef('stdin', 1, tmp, Convert$_get_stdin_$ref_yiqct5_0(), null));
288
308
  }
289
309
  function _get_languages__ojonze_0($this) {
290
- return $this.r4d_1.s47($this, languages$factory_2());
310
+ var tmp = KProperty1;
311
+ return $this.b4b_1.z1b($this, getPropertyCallableRef('languages', 1, tmp, Convert$_get_languages_$ref_ykvilw_0(), null));
291
312
  }
292
- function run$handleError_0(p0) {
293
- handleError(p0);
313
+ function Convert$_get_format_$ref_ve190() {
314
+ return function (p0) {
315
+ return _get_format__qlarck(p0);
316
+ };
294
317
  }
295
- function handleError$ref_1() {
318
+ function Convert$_get_format_$ref_ve190_0() {
319
+ return function (p0) {
320
+ return _get_format__qlarck(p0);
321
+ };
322
+ }
323
+ function Convert$_get_stdin_$ref_yiqct5() {
324
+ return function (p0) {
325
+ return _get_stdin__b8xnlj_0(p0);
326
+ };
327
+ }
328
+ function Convert$_get_stdin_$ref_yiqct5_0() {
329
+ return function (p0) {
330
+ return _get_stdin__b8xnlj_0(p0);
331
+ };
332
+ }
333
+ function Convert$_get_languages_$ref_ykvilw() {
334
+ return function (p0) {
335
+ return _get_languages__ojonze_0(p0);
336
+ };
337
+ }
338
+ function Convert$_get_languages_$ref_ykvilw_0() {
339
+ return function (p0) {
340
+ return _get_languages__ojonze_0(p0);
341
+ };
342
+ }
343
+ function handleError$ref_2() {
296
344
  var l = function (p0) {
297
345
  handleError(p0);
298
346
  };
299
347
  l.callableName = 'handleError';
300
348
  return l;
301
349
  }
302
- function handleError$ref_2() {
350
+ function handleError$ref_3() {
303
351
  var l = function (p0) {
304
352
  handleError(p0);
305
353
  };
306
354
  l.callableName = 'handleError';
307
355
  return l;
308
356
  }
309
- function Convert$run$handleError$ref() {
357
+ function handleError$ref_4() {
310
358
  return function (p0) {
311
- run$handleError_0(p0);
312
- return Unit_instance;
359
+ handleError(p0);
313
360
  };
314
361
  }
315
362
  function Convert(converter) {
316
363
  CommonOptions.call(this);
317
- this.o4d_1 = converter;
364
+ this.y4a_1 = converter;
318
365
  var tmp = this;
319
366
  // Inline function 'com.github.ajalt.clikt.parameters.types.enum' call
320
367
  var this_0 = argument(this, VOID, 'Input format');
321
- // Inline function 'kotlin.collections.associateBy' call
322
368
  // Inline function 'kotlin.enumValues' call
369
+ // Inline function 'kotlin.collections.associateBy' call
323
370
  var this_1 = values();
324
371
  var capacity = coerceAtLeast(mapCapacity(this_1.length), 16);
325
372
  // Inline function 'kotlin.collections.associateByTo' call
@@ -329,19 +376,25 @@ function Convert(converter) {
329
376
  while (inductionVariable < last) {
330
377
  var element = this_1[inductionVariable];
331
378
  inductionVariable = inductionVariable + 1 | 0;
332
- // Inline function 'com.github.ajalt.clikt.parameters.types.enum.<anonymous>' call
333
- // Inline function 'com.github.ajalt.clikt.parameters.types.enum.<anonymous>' call
334
- var tmp$ret$2 = element.q2_1;
335
- destination.n2(tmp$ret$2, element);
379
+ var tmp$ret$2 = element.b3_1;
380
+ destination.x2(tmp$ret$2, element);
336
381
  }
337
- tmp.p4d_1 = choice_0(this_0, destination, true).y46(this, format$factory());
338
- this.q4d_1 = optional(argument(this, VOID, 'stdin')).y46(this, stdin$factory_1());
339
- this.r4d_1 = multiple(choice(option(this, Options_Language_getInstance().n4b_1.slice(), 'Language'), Companion_instance_1.q2i(), VOID, true)).c48(this, languages$factory_1());
340
- }
341
- protoOf(Convert).g3y = function () {
342
- var logger = new Logger(this.m4c(this.l4c()));
343
- var tmp = getFullPath(this.n4c());
344
- var inputPath = or(tmp, handleError$ref_1());
382
+ var tmp_0 = choice_0(this_0, destination, true);
383
+ var tmp_1 = KProperty1;
384
+ tmp.z4a_1 = tmp_0.f1b(this, getPropertyCallableRef('format', 1, tmp_1, Convert$_get_format_$ref_ve190(), null));
385
+ var tmp_2 = this;
386
+ var tmp_3 = optional(argument(this, VOID, 'stdin'));
387
+ var tmp_4 = KProperty1;
388
+ tmp_2.a4b_1 = tmp_3.f1b(this, getPropertyCallableRef('stdin', 1, tmp_4, Convert$_get_stdin_$ref_yiqct5(), null));
389
+ var tmp_5 = this;
390
+ var tmp_6 = multiple(choice(option(this, Options_Language_getInstance().y48_1.slice(), 'Language'), Companion_instance_1.n3n(), VOID, true));
391
+ var tmp_7 = KProperty1;
392
+ tmp_5.b4b_1 = tmp_6.j1c(this, getPropertyCallableRef('languages', 1, tmp_7, Convert$_get_languages_$ref_ykvilw(), null));
393
+ }
394
+ protoOf(Convert).y12 = function () {
395
+ var logger = new Logger(this.w49(this.v49()));
396
+ var tmp = getFullPath(this.x49());
397
+ var inputPath = or(tmp, handleError$ref_2());
345
398
  var tmp_0;
346
399
  if (inputPath == null) {
347
400
  var tmp1_safe_receiver = _get_stdin__b8xnlj_0(this);
@@ -350,8 +403,6 @@ protoOf(Convert).g3y = function () {
350
403
  tmp_1 = null;
351
404
  } else {
352
405
  // Inline function 'kotlin.let' call
353
- // Inline function 'kotlin.contracts.contract' call
354
- // Inline function 'community.flock.wirespec.plugin.cli.Convert.run.<anonymous>' call
355
406
  tmp_1 = new Source(_Name___init__impl__o4q07e('stdin'), tmp1_safe_receiver);
356
407
  }
357
408
  var tmp2_elvis_lhs = tmp_1;
@@ -370,17 +421,15 @@ protoOf(Convert).g3y = function () {
370
421
  throw new ConvertNeedsAFile();
371
422
  } else {
372
423
  if (inputPath instanceof FilePath) {
373
- // Inline function 'kotlin.also' call
374
424
  var tmp_3;
375
- if (inputPath.u2j_1.r2_1 === 5) {
376
- tmp_3 = new Source(inputPath.t2j_1, read(inputPath));
425
+ if (inputPath.s3o_1.c3_1 === 7) {
426
+ tmp_3 = new Source(inputPath.r3o_1, read(inputPath));
377
427
  } else {
378
428
  throw new JSONFileError();
379
429
  }
430
+ // Inline function 'kotlin.also' call
380
431
  var this_0 = tmp_3;
381
- // Inline function 'kotlin.contracts.contract' call
382
- // Inline function 'community.flock.wirespec.plugin.cli.Convert.run.<anonymous>' call
383
- logger.u25('Found 1 file to process: ' + inputPath.toString());
432
+ logger.uq('Found 1 file to process: ' + inputPath.toString());
384
433
  tmp_0 = this_0;
385
434
  } else {
386
435
  noWhenBranchMatchedException();
@@ -389,44 +438,110 @@ protoOf(Convert).g3y = function () {
389
438
  }
390
439
  }
391
440
  var source = tmp_0;
392
- var emitters = toEmitters(_get_languages__ojonze_0(this), Companion_instance_0.n26(this.i2a()), new EmitShared(this.s2a()));
441
+ var emitters = toEmitters(_get_languages__ojonze_0(this), Companion_instance_0.nr(this.l1v()), new EmitShared(this.u1v()), this.y49());
393
442
  var tmp_4;
394
443
  if (inputPath == null) {
395
444
  tmp_4 = null;
396
445
  } else {
397
446
  // Inline function 'kotlin.let' call
398
- // Inline function 'kotlin.contracts.contract' call
399
- // Inline function 'community.flock.wirespec.plugin.cli.Convert.run.<anonymous>' call
400
- var tmp_5 = getOutPutPath(inputPath, this.o4c());
401
- tmp_4 = new Directory(or(tmp_5, handleError$ref_2()).p2j_1);
447
+ var tmp_5 = getOutPutPath(inputPath, this.z49());
448
+ tmp_4 = new Directory(or(tmp_5, handleError$ref_3()).n3o_1);
402
449
  }
403
450
  var directory = tmp_4;
404
- // Inline function 'kotlin.let' call
405
451
  var tmp_6 = _get_format__qlarck(this);
406
452
  var tmp_7 = nonEmptySetOf(source, []);
407
- var tmp_8 = this.p4c(directory);
408
- var this_1 = new ConverterArguments(tmp_6, tmp_7, emitters, tmp_8, Convert$run$handleError$ref(), Companion_instance_0.n26(this.i2a()), logger, this.s2a(), this.q4c());
409
- // Inline function 'kotlin.contracts.contract' call
410
- this.o4d_1(this_1);
453
+ var tmp_8 = this.a4a(directory);
454
+ var tmp0 = new ConverterArguments(tmp_6, tmp_7, emitters, tmp_8, handleError$ref_4(), Companion_instance_0.nr(this.l1v()), logger, this.u1v(), this.b4a(), this.y49());
455
+ // Inline function 'kotlin.let' call
456
+ this.y4a_1(tmp0);
411
457
  };
458
+ function CommonOptions$_get_input_$ref_6c1nvp() {
459
+ return function (p0) {
460
+ return p0.x49();
461
+ };
462
+ }
463
+ function CommonOptions$_get_input_$ref_6c1nvp_0() {
464
+ return function (p0) {
465
+ return p0.x49();
466
+ };
467
+ }
468
+ function CommonOptions$_get_output_$ref_eo6xdi() {
469
+ return function (p0) {
470
+ return p0.z49();
471
+ };
472
+ }
473
+ function CommonOptions$_get_output_$ref_eo6xdi_0() {
474
+ return function (p0) {
475
+ return p0.z49();
476
+ };
477
+ }
478
+ function CommonOptions$_get_packageName_$ref_k5vxsu() {
479
+ return function (p0) {
480
+ return p0.l1v();
481
+ };
482
+ }
483
+ function CommonOptions$_get_packageName_$ref_k5vxsu_0() {
484
+ return function (p0) {
485
+ return p0.l1v();
486
+ };
487
+ }
488
+ function CommonOptions$_get_logLevel_$ref_mp4bhx() {
489
+ return function (p0) {
490
+ return p0.v49();
491
+ };
492
+ }
493
+ function CommonOptions$_get_logLevel_$ref_mp4bhx_0() {
494
+ return function (p0) {
495
+ return p0.v49();
496
+ };
497
+ }
498
+ function CommonOptions$_get_shared_$ref_7r7o2u() {
499
+ return function (p0) {
500
+ return p0.u1v();
501
+ };
502
+ }
503
+ function CommonOptions$_get_shared_$ref_7r7o2u_0() {
504
+ return function (p0) {
505
+ return p0.u1v();
506
+ };
507
+ }
508
+ function CommonOptions$_get_strict_$ref_vrzh6q() {
509
+ return function (p0) {
510
+ return p0.b4a();
511
+ };
512
+ }
513
+ function CommonOptions$_get_strict_$ref_vrzh6q_0() {
514
+ return function (p0) {
515
+ return p0.b4a();
516
+ };
517
+ }
518
+ function CommonOptions$_get_ir_$ref_x8twf6() {
519
+ return function (p0) {
520
+ return p0.y49();
521
+ };
522
+ }
523
+ function CommonOptions$_get_ir_$ref_x8twf6_0() {
524
+ return function (p0) {
525
+ return p0.y49();
526
+ };
527
+ }
412
528
  function CommonOptions$writer$lambda($directory, this$0) {
413
529
  return function (emittedList) {
414
- var tmp0_iterator = emittedList.g();
415
- while (tmp0_iterator.h()) {
416
- var element = tmp0_iterator.i();
417
- // Inline function 'community.flock.wirespec.plugin.cli.CommonOptions.writer.<anonymous>.<anonymous>' call
530
+ // Inline function 'kotlin.collections.forEach' call
531
+ var _iterator__ex2g4s = emittedList.t();
532
+ while (_iterator__ex2g4s.u()) {
533
+ var element = _iterator__ex2g4s.v();
418
534
  var tmp0_safe_receiver = $directory;
419
535
  var tmp;
420
536
  if (tmp0_safe_receiver == null) {
421
537
  tmp = null;
422
538
  } else {
423
539
  // Inline function 'kotlin.let' call
424
- // Inline function 'kotlin.contracts.contract' call
425
- write(Companion_instance_2.r2j(_DirectoryPath___get_value__impl__hdy2e3(tmp0_safe_receiver.q2j_1) + '/' + element.k23_1), element.l23_1);
540
+ write(Companion_instance_2.p3o(_DirectoryPath___get_value__impl__hdy2e3(tmp0_safe_receiver.o3o_1) + '/' + element.ko_1), element.lo_1);
426
541
  tmp = Unit_instance;
427
542
  }
428
543
  if (tmp == null) {
429
- this$0.a3y(element.l23_1);
544
+ this$0.n11(element.lo_1);
430
545
  }
431
546
  }
432
547
  return Unit_instance;
@@ -434,34 +549,66 @@ function CommonOptions$writer$lambda($directory, this$0) {
434
549
  }
435
550
  function CommonOptions() {
436
551
  CliktCommand.call(this);
437
- this.f4c_1 = option(this, Options_Input_getInstance().n4b_1.slice(), 'Input').c48(this, input$factory());
438
- this.g4c_1 = option(this, Options_Output_getInstance().n4b_1.slice(), 'Output').c48(this, output$factory());
439
- this.h4c_1 = default_0(option(this, Options_PackageName_getInstance().n4b_1.slice(), 'Package name'), 'community.flock.wirespec.generated').c48(this, packageName$factory());
440
- this.i4c_1 = default_0(option(this, Options_LogLevel_getInstance().n4b_1.slice(), 'Log level: ' + Companion_instance.toString()), Level_INFO_getInstance().toString()).c48(this, logLevel$factory());
441
- this.j4c_1 = flag(option(this, Options_Shared_getInstance().n4b_1.slice(), 'Generate shared wirespec code'), [], false).c48(this, shared$factory());
442
- this.k4c_1 = flag(option(this, Options_Strict_getInstance().n4b_1.slice(), 'Strict mode'), []).c48(this, strict$factory());
443
- }
444
- protoOf(CommonOptions).n4c = function () {
445
- return this.f4c_1.s47(this, input$factory_0());
552
+ var tmp = this;
553
+ var tmp_0 = option(this, Options_Input_getInstance().y48_1.slice(), 'Input');
554
+ var tmp_1 = KProperty1;
555
+ tmp.o49_1 = tmp_0.j1c(this, getPropertyCallableRef('input', 1, tmp_1, CommonOptions$_get_input_$ref_6c1nvp(), null));
556
+ var tmp_2 = this;
557
+ var tmp_3 = option(this, Options_Output_getInstance().y48_1.slice(), 'Output');
558
+ var tmp_4 = KProperty1;
559
+ tmp_2.p49_1 = tmp_3.j1c(this, getPropertyCallableRef('output', 1, tmp_4, CommonOptions$_get_output_$ref_eo6xdi(), null));
560
+ var tmp_5 = this;
561
+ var tmp_6 = default_0(option(this, Options_PackageName_getInstance().y48_1.slice(), 'Package name'), 'community.flock.wirespec.generated');
562
+ var tmp_7 = KProperty1;
563
+ tmp_5.q49_1 = tmp_6.j1c(this, getPropertyCallableRef('packageName', 1, tmp_7, CommonOptions$_get_packageName_$ref_k5vxsu(), null));
564
+ var tmp_8 = this;
565
+ var tmp_9 = default_0(option(this, Options_LogLevel_getInstance().y48_1.slice(), 'Log level: ' + Companion_instance.toString()), Level_INFO_getInstance().toString());
566
+ var tmp_10 = KProperty1;
567
+ tmp_8.r49_1 = tmp_9.j1c(this, getPropertyCallableRef('logLevel', 1, tmp_10, CommonOptions$_get_logLevel_$ref_mp4bhx(), null));
568
+ var tmp_11 = this;
569
+ var tmp_12 = flag(option(this, Options_Shared_getInstance().y48_1.slice(), 'Generate shared wirespec code'), [], false);
570
+ var tmp_13 = KProperty1;
571
+ tmp_11.s49_1 = tmp_12.j1c(this, getPropertyCallableRef('shared', 1, tmp_13, CommonOptions$_get_shared_$ref_7r7o2u(), null));
572
+ var tmp_14 = this;
573
+ var tmp_15 = flag(option(this, Options_Strict_getInstance().y48_1.slice(), 'Strict mode'), []);
574
+ var tmp_16 = KProperty1;
575
+ tmp_14.t49_1 = tmp_15.j1c(this, getPropertyCallableRef('strict', 1, tmp_16, CommonOptions$_get_strict_$ref_vrzh6q(), null));
576
+ var tmp_17 = this;
577
+ var tmp_18 = flag(option(this, Options_Ir_getInstance().y48_1.slice(), 'Output intermediate representation'), [], false);
578
+ var tmp_19 = KProperty1;
579
+ tmp_17.u49_1 = tmp_18.j1c(this, getPropertyCallableRef('ir', 1, tmp_19, CommonOptions$_get_ir_$ref_x8twf6(), null));
580
+ }
581
+ protoOf(CommonOptions).x49 = function () {
582
+ var tmp = KProperty1;
583
+ return this.o49_1.z1b(this, getPropertyCallableRef('input', 1, tmp, CommonOptions$_get_input_$ref_6c1nvp_0(), null));
446
584
  };
447
- protoOf(CommonOptions).o4c = function () {
448
- return this.g4c_1.s47(this, output$factory_0());
585
+ protoOf(CommonOptions).z49 = function () {
586
+ var tmp = KProperty1;
587
+ return this.p49_1.z1b(this, getPropertyCallableRef('output', 1, tmp, CommonOptions$_get_output_$ref_eo6xdi_0(), null));
449
588
  };
450
- protoOf(CommonOptions).i2a = function () {
451
- return this.h4c_1.s47(this, packageName$factory_0());
589
+ protoOf(CommonOptions).l1v = function () {
590
+ var tmp = KProperty1;
591
+ return this.q49_1.z1b(this, getPropertyCallableRef('packageName', 1, tmp, CommonOptions$_get_packageName_$ref_k5vxsu_0(), null));
452
592
  };
453
- protoOf(CommonOptions).l4c = function () {
454
- return this.i4c_1.s47(this, logLevel$factory_0());
593
+ protoOf(CommonOptions).v49 = function () {
594
+ var tmp = KProperty1;
595
+ return this.r49_1.z1b(this, getPropertyCallableRef('logLevel', 1, tmp, CommonOptions$_get_logLevel_$ref_mp4bhx_0(), null));
455
596
  };
456
- protoOf(CommonOptions).s2a = function () {
457
- return this.j4c_1.s47(this, shared$factory_0());
597
+ protoOf(CommonOptions).u1v = function () {
598
+ var tmp = KProperty1;
599
+ return this.s49_1.z1b(this, getPropertyCallableRef('shared', 1, tmp, CommonOptions$_get_shared_$ref_7r7o2u_0(), null));
458
600
  };
459
- protoOf(CommonOptions).q4c = function () {
460
- return this.k4c_1.s47(this, strict$factory_0());
601
+ protoOf(CommonOptions).b4a = function () {
602
+ var tmp = KProperty1;
603
+ return this.t49_1.z1b(this, getPropertyCallableRef('strict', 1, tmp, CommonOptions$_get_strict_$ref_vrzh6q_0(), null));
461
604
  };
462
- protoOf(CommonOptions).m4c = function (_this__u8e3s4) {
463
- // Inline function 'kotlin.text.uppercase' call
605
+ protoOf(CommonOptions).y49 = function () {
606
+ var tmp = KProperty1;
607
+ return this.u49_1.z1b(this, getPropertyCallableRef('ir', 1, tmp, CommonOptions$_get_ir_$ref_x8twf6_0(), null));
608
+ };
609
+ protoOf(CommonOptions).w49 = function (_this__u8e3s4) {
464
610
  // Inline function 'kotlin.text.trim' call
611
+ // Inline function 'kotlin.text.uppercase' call
465
612
  // Inline function 'kotlin.js.asDynamic' call
466
613
  var tmp;
467
614
  switch (toString(trim(isCharSequence(_this__u8e3s4) ? _this__u8e3s4 : THROW_CCE())).toUpperCase()) {
@@ -482,7 +629,7 @@ protoOf(CommonOptions).m4c = function (_this__u8e3s4) {
482
629
  }
483
630
  return tmp;
484
631
  };
485
- protoOf(CommonOptions).p4c = function (directory) {
632
+ protoOf(CommonOptions).a4a = function (directory) {
486
633
  return CommonOptions$writer$lambda(directory, this);
487
634
  };
488
635
  var Options_Input_instance;
@@ -492,6 +639,7 @@ var Options_PackageName_instance;
492
639
  var Options_LogLevel_instance;
493
640
  var Options_Shared_instance;
494
641
  var Options_Strict_instance;
642
+ var Options_Ir_instance;
495
643
  var Options_entriesInitialized;
496
644
  function Options_initEntries() {
497
645
  if (Options_entriesInitialized)
@@ -504,24 +652,25 @@ function Options_initEntries() {
504
652
  Options_LogLevel_instance = new Options('LogLevel', 4, ['--log-level']);
505
653
  Options_Shared_instance = new Options('Shared', 5, ['--shared']);
506
654
  Options_Strict_instance = new Options('Strict', 6, ['--strict']);
655
+ Options_Ir_instance = new Options('Ir', 7, ['--ir']);
507
656
  }
508
657
  function Options(name, ordinal, flags) {
509
658
  Enum.call(this, name, ordinal);
510
- this.n4b_1 = flags;
659
+ this.y48_1 = flags;
511
660
  }
512
661
  function handleError(string) {
513
662
  throw new CliktError(string);
514
663
  }
515
- function toEmitters(_this__u8e3s4, packageName, emitShared) {
664
+ function toEmitters(_this__u8e3s4, packageName, emitShared, ir) {
665
+ ir = ir === VOID ? false : ir;
516
666
  // Inline function 'kotlin.collections.map' call
517
667
  // Inline function 'kotlin.collections.mapTo' call
518
668
  var destination = ArrayList_init_$Create$(collectionSizeOrDefault(_this__u8e3s4, 10));
519
- var tmp0_iterator = _this__u8e3s4.g();
520
- while (tmp0_iterator.h()) {
521
- var item = tmp0_iterator.i();
522
- // Inline function 'community.flock.wirespec.plugin.cli.toEmitters.<anonymous>' call
523
- var tmp$ret$0 = toEmitter(item, packageName, emitShared);
524
- destination.e(tmp$ret$0);
669
+ var _iterator__ex2g4s = _this__u8e3s4.t();
670
+ while (_iterator__ex2g4s.u()) {
671
+ var item = _iterator__ex2g4s.v();
672
+ var tmp$ret$0 = ir ? toIrEmitter(item, packageName, emitShared) : toEmitter(item, packageName, emitShared);
673
+ destination.x(tmp$ret$0);
525
674
  }
526
675
  var tmp0_elvis_lhs = toNonEmptySetOrNull(destination);
527
676
  var tmp;
@@ -561,145 +710,36 @@ function Options_Strict_getInstance() {
561
710
  Options_initEntries();
562
711
  return Options_Strict_instance;
563
712
  }
564
- function stdin$factory() {
565
- return getPropertyCallableRef('stdin', 1, KProperty1, function (receiver) {
566
- return _get_stdin__b8xnlj(receiver);
567
- }, null);
568
- }
569
- function languages$factory() {
570
- return getPropertyCallableRef('languages', 1, KProperty1, function (receiver) {
571
- return _get_languages__ojonze(receiver);
572
- }, null);
573
- }
574
- function stdin$factory_0() {
575
- return getPropertyCallableRef('stdin', 1, KProperty1, function (receiver) {
576
- return _get_stdin__b8xnlj(receiver);
577
- }, null);
578
- }
579
- function languages$factory_0() {
580
- return getPropertyCallableRef('languages', 1, KProperty1, function (receiver) {
581
- return _get_languages__ojonze(receiver);
582
- }, null);
583
- }
584
- function format$factory() {
585
- return getPropertyCallableRef('format', 1, KProperty1, function (receiver) {
586
- return _get_format__qlarck(receiver);
587
- }, null);
588
- }
589
- function stdin$factory_1() {
590
- return getPropertyCallableRef('stdin', 1, KProperty1, function (receiver) {
591
- return _get_stdin__b8xnlj_0(receiver);
592
- }, null);
593
- }
594
- function languages$factory_1() {
595
- return getPropertyCallableRef('languages', 1, KProperty1, function (receiver) {
596
- return _get_languages__ojonze_0(receiver);
597
- }, null);
598
- }
599
- function format$factory_0() {
600
- return getPropertyCallableRef('format', 1, KProperty1, function (receiver) {
601
- return _get_format__qlarck(receiver);
602
- }, null);
603
- }
604
- function stdin$factory_2() {
605
- return getPropertyCallableRef('stdin', 1, KProperty1, function (receiver) {
606
- return _get_stdin__b8xnlj_0(receiver);
607
- }, null);
608
- }
609
- function languages$factory_2() {
610
- return getPropertyCallableRef('languages', 1, KProperty1, function (receiver) {
611
- return _get_languages__ojonze_0(receiver);
612
- }, null);
613
- }
614
- function input$factory() {
615
- return getPropertyCallableRef('input', 1, KProperty1, function (receiver) {
616
- return receiver.n4c();
617
- }, null);
618
- }
619
- function output$factory() {
620
- return getPropertyCallableRef('output', 1, KProperty1, function (receiver) {
621
- return receiver.o4c();
622
- }, null);
623
- }
624
- function packageName$factory() {
625
- return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) {
626
- return receiver.i2a();
627
- }, null);
628
- }
629
- function logLevel$factory() {
630
- return getPropertyCallableRef('logLevel', 1, KProperty1, function (receiver) {
631
- return receiver.l4c();
632
- }, null);
633
- }
634
- function shared$factory() {
635
- return getPropertyCallableRef('shared', 1, KProperty1, function (receiver) {
636
- return receiver.s2a();
637
- }, null);
638
- }
639
- function strict$factory() {
640
- return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) {
641
- return receiver.q4c();
642
- }, null);
643
- }
644
- function input$factory_0() {
645
- return getPropertyCallableRef('input', 1, KProperty1, function (receiver) {
646
- return receiver.n4c();
647
- }, null);
648
- }
649
- function output$factory_0() {
650
- return getPropertyCallableRef('output', 1, KProperty1, function (receiver) {
651
- return receiver.o4c();
652
- }, null);
653
- }
654
- function packageName$factory_0() {
655
- return getPropertyCallableRef('packageName', 1, KProperty1, function (receiver) {
656
- return receiver.i2a();
657
- }, null);
658
- }
659
- function logLevel$factory_0() {
660
- return getPropertyCallableRef('logLevel', 1, KProperty1, function (receiver) {
661
- return receiver.l4c();
662
- }, null);
663
- }
664
- function shared$factory_0() {
665
- return getPropertyCallableRef('shared', 1, KProperty1, function (receiver) {
666
- return receiver.s2a();
667
- }, null);
668
- }
669
- function strict$factory_0() {
670
- return getPropertyCallableRef('strict', 1, KProperty1, function (receiver) {
671
- return receiver.q4c();
672
- }, null);
673
- }
674
- function main(args) {
675
- // Inline function 'kotlin.let' call
713
+ function Options_Ir_getInstance() {
714
+ Options_initEntries();
715
+ return Options_Ir_instance;
716
+ }
717
+ function main_0(args) {
676
718
  // Inline function 'kotlin.collections.mapNotNull' call
719
+ var tmp0 = until(0, 20);
677
720
  // Inline function 'kotlin.collections.mapNotNullTo' call
678
- var this_0 = until(0, 20);
679
721
  var destination = ArrayList_init_$Create$_0();
680
722
  // Inline function 'kotlin.collections.forEach' call
681
- var inductionVariable = this_0.d1_1;
682
- var last = this_0.e1_1;
723
+ var inductionVariable = tmp0.p1_1;
724
+ var last = tmp0.q1_1;
683
725
  if (inductionVariable <= last)
684
726
  do {
685
727
  var element = inductionVariable;
686
728
  inductionVariable = inductionVariable + 1 | 0;
687
- // Inline function 'kotlin.collections.mapNotNullTo.<anonymous>' call
688
729
  var p0 = element;
689
730
  var tmp0_safe_receiver = orNull(args, p0);
690
731
  if (tmp0_safe_receiver == null)
691
732
  null;
692
733
  else {
693
734
  // Inline function 'kotlin.let' call
694
- // Inline function 'kotlin.contracts.contract' call
695
- destination.e(tmp0_safe_receiver);
735
+ destination.x(tmp0_safe_receiver);
696
736
  }
697
737
  }
698
738
  while (!(element === last));
699
- // Inline function 'kotlin.contracts.contract' call
739
+ // Inline function 'kotlin.let' call
700
740
  var tmp = Companion_instance_4;
701
741
  var tmp_0 = compile$ref();
702
- tmp.k4a(tmp_0, convert$ref()).f3y(destination);
742
+ main(tmp.w47(tmp_0, convert$ref()), destination);
703
743
  }
704
744
  function compile$ref() {
705
745
  var l = function (p0) {
@@ -718,59 +758,53 @@ function convert$ref() {
718
758
  return l;
719
759
  }
720
760
  function cli(args) {
721
- main(args);
761
+ main_0(args);
722
762
  }
723
763
  function parser(source) {
724
- // Inline function 'kotlin.collections.toTypedArray' call
725
- // Inline function 'kotlin.collections.map' call
726
- // Inline function 'arrow.core.NonEmptyList.flatMap' call
727
764
  // Inline function 'arrow.core.getOrElse' call
728
- // Inline function 'kotlin.contracts.contract' call
729
- // Inline function 'arrow.core.Either.fold' call
730
- var this_0 = parse(new parser$this$this$this$this$1(), nonEmptyListOf(new ModuleContent(new FileUri(''), source), []));
731
- // Inline function 'kotlin.contracts.contract' call
765
+ var this_0 = parse(new parser$1(), nonEmptyListOf(new ModuleContent(new FileUri(''), source), []));
732
766
  var tmp;
733
- if (this_0 instanceof Right) {
734
- // Inline function 'arrow.core.identity' call
735
- // Inline function 'arrow.core.identity' call
736
- tmp = this_0.ek_1;
767
+ if (this_0 instanceof Left) {
768
+ var it = this_0.pl_1.am_1;
769
+ var message = 'Cannot parse source: ' + joinToString(new NonEmptyList(it), VOID, VOID, VOID, VOID, VOID, parser$lambda);
770
+ throw IllegalStateException_init_$Create$(toString(message));
737
771
  } else {
738
- if (this_0 instanceof Left) {
739
- var it = this_0.yj_1;
740
- var message = 'Cannot parse source: ' + joinToString(it, VOID, VOID, VOID, VOID, VOID, parser$lambda);
741
- throw IllegalStateException_init_$Create$(toString(message));
772
+ if (this_0 instanceof Right) {
773
+ tmp = this_0.rl_1;
742
774
  } else {
743
775
  noWhenBranchMatchedException();
744
776
  }
745
777
  }
746
- var this_1 = tmp.d25_1;
747
- var tmp_0 = this_1.pk_1.f25_1.nk();
778
+ // Inline function 'arrow.core.NonEmptyList.flatMap' call
779
+ var this_1 = tmp.dq_1;
748
780
  // Inline function 'kotlin.collections.flatMap' call
781
+ var tmp0 = _NonEmptyList___get_all__impl__pmf509(this_1);
749
782
  // Inline function 'kotlin.collections.flatMapTo' call
750
- var this_2 = this_1.qk_1;
751
783
  var destination = ArrayList_init_$Create$_0();
752
- var tmp0_iterator = this_2.g();
753
- while (tmp0_iterator.h()) {
754
- var element = tmp0_iterator.i();
755
- var list = element.f25_1;
784
+ var _iterator__ex2g4s = tmp0.t();
785
+ while (_iterator__ex2g4s.u()) {
786
+ var element = _iterator__ex2g4s.v();
787
+ var list = new NonEmptyList(element.fq_1);
756
788
  addAll(destination, list);
757
789
  }
758
- var this_3 = tmp_0.uk(destination).tk();
790
+ var tmp$ret$4 = _NonEmptyList___init__impl__fxd0xp(destination);
791
+ // Inline function 'kotlin.collections.map' call
792
+ var this_2 = NonEmptyList__toList_impl_t5xcy2(tmp$ret$4);
759
793
  // Inline function 'kotlin.collections.mapTo' call
760
- var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_3, 10));
761
- var tmp0_iterator_0 = this_3.g();
762
- while (tmp0_iterator_0.h()) {
763
- var item = tmp0_iterator_0.i();
764
- // Inline function 'community.flock.wirespec.plugin.cli.parser.<anonymous>' call
765
- var tmp$ret$9 = produce(item);
766
- destination_0.e(tmp$ret$9);
794
+ var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_2, 10));
795
+ var _iterator__ex2g4s_0 = this_2.t();
796
+ while (_iterator__ex2g4s_0.u()) {
797
+ var item = _iterator__ex2g4s_0.v();
798
+ var tmp$ret$5 = produce(item);
799
+ destination_0.x(tmp$ret$5);
767
800
  }
801
+ // Inline function 'kotlin.collections.toTypedArray' call
768
802
  return copyToArray(destination_0);
769
803
  }
770
- function parser$this$this$this$this$1() {
804
+ function parser$1() {
771
805
  }
772
806
  function parser$lambda(e) {
773
- return e.r1();
807
+ return e.e();
774
808
  }
775
809
  function get_nodeArgs() {
776
810
  _init_properties_CommandLineArguments_kt__b5v7hl();
@@ -780,26 +814,28 @@ var nodeArgs;
780
814
  function orNull(_this__u8e3s4, idx) {
781
815
  _init_properties_CommandLineArguments_kt__b5v7hl();
782
816
  // Inline function 'arrow.core.Companion.catch' call
783
- // Inline function 'arrow.core.raise.catch' call
784
- var tmp;
785
- try {
786
- // Inline function 'arrow.core.Companion.catch.<anonymous>' call
787
- // Inline function 'community.flock.wirespec.plugin.cli.orNull.<anonymous>' call
788
- var tmp$ret$0 = get_nodeArgs()[idx];
789
- tmp = right(tmp$ret$0);
790
- } catch ($p) {
791
- var tmp_0;
792
- if ($p instanceof Error) {
793
- var t = $p;
794
- // Inline function 'arrow.core.Companion.catch.<anonymous>' call
795
- var it = nonFatalOrThrow(t);
796
- tmp_0 = left(it);
797
- } else {
798
- throw $p;
817
+ var tmp$ret$3;
818
+ $l$block: {
819
+ // Inline function 'arrow.core.raise.catch' call
820
+ // Inline function 'arrow.core.raise.catch' call
821
+ var tmp;
822
+ try {
823
+ tmp = get_nodeArgs()[idx];
824
+ } catch ($p) {
825
+ var tmp_0;
826
+ if ($p instanceof Error) {
827
+ var t = $p;
828
+ var p0 = nonFatalOrThrow(t);
829
+ tmp$ret$3 = new Left(p0);
830
+ break $l$block;
831
+ } else {
832
+ throw $p;
833
+ }
799
834
  }
800
- tmp = tmp_0;
835
+ var value = tmp;
836
+ tmp$ret$3 = new Right(value);
801
837
  }
802
- return tmp.dk();
838
+ return tmp$ret$3.ql();
803
839
  }
804
840
  var properties_initialized_CommandLineArguments_kt_ekn5uh;
805
841
  function _init_properties_CommandLineArguments_kt__b5v7hl() {
@@ -810,8 +846,8 @@ function _init_properties_CommandLineArguments_kt__b5v7hl() {
810
846
  }
811
847
  }
812
848
  //region block: post-declaration
813
- protoOf(parser$this$this$this$this$1).o22 = get_spec;
814
- protoOf(parser$this$this$this$this$1).d22 = get_logger;
849
+ protoOf(parser$1).in = get_spec;
850
+ protoOf(parser$1).jn = get_logger;
815
851
  //endregion
816
852
  //region block: init
817
853
  Companion_instance_4 = new Companion();
@@ -822,7 +858,7 @@ export {
822
858
  parser as parser,
823
859
  };
824
860
  export {
825
- main as main18ozy59zvnjcv,
861
+ main_0 as main18ozy59zvnjcv,
826
862
  };
827
863
  //endregion
828
864