@flock/wirespec 0.18.13 → 0.18.15

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 (34) hide show
  1. package/clikt-clikt-mordant.mjs +39 -39
  2. package/colormath-root-colormath.mjs +432 -432
  3. package/kotlin-kotlin-stdlib.mjs +25 -15
  4. package/kotlin-kotlin-stdlib.mjs.map +1 -1
  5. package/kotlin-openapi-bindings.mjs +9842 -9842
  6. package/kotlin-rgxgen.mjs +1758 -1758
  7. package/kotlinx-io-kotlinx-io-core.mjs +404 -404
  8. package/kotlinx-serialization-kotlinx-serialization-core.mjs +1775 -1775
  9. package/kotlinx-serialization-kotlinx-serialization-json.mjs +1466 -1466
  10. package/mordant-mordant.mjs +1190 -1190
  11. package/package.json +13 -2
  12. package/wirespec-msw.d.ts +53 -0
  13. package/wirespec-msw.mjs +83 -0
  14. package/wirespec-src-compiler-emitters-java.mjs +79 -79
  15. package/wirespec-src-compiler-emitters-kotlin.mjs +192 -128
  16. package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
  17. package/wirespec-src-compiler-emitters-python.mjs +129 -129
  18. package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
  19. package/wirespec-src-compiler-emitters-rust.mjs +68 -54
  20. package/wirespec-src-compiler-emitters-rust.mjs.map +1 -1
  21. package/wirespec-src-compiler-emitters-scala.mjs +29 -29
  22. package/wirespec-src-compiler-emitters-typescript.mjs +125 -98
  23. package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
  24. package/wirespec-src-compiler-emitters-wirespec.mjs +31 -31
  25. package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
  26. package/wirespec-src-compiler-ir.mjs +144 -134
  27. package/wirespec-src-compiler-ir.mjs.map +1 -1
  28. package/wirespec-src-converter-avro.mjs +479 -479
  29. package/wirespec-src-converter-openapi.mjs +320 -320
  30. package/wirespec-src-ide-lsp.mjs +1348 -1348
  31. package/wirespec-src-plugin-arguments.mjs +136 -136
  32. package/wirespec-src-plugin-cli.mjs +84 -84
  33. package/wirespec-src-plugin-npm.mjs +10 -10
  34. package/wirespec-src-tools-generator.mjs +2 -2
@@ -82,6 +82,8 @@ import {
82
82
  getPropertyCallableRef3hckxc0xueiaj as getPropertyCallableRef,
83
83
  StringBuilder_init_$Create$322n630qt3r8c as StringBuilder_init_$Create$,
84
84
  charSequenceGet1vxk1y5n17t1z as charSequenceGet,
85
+ first3kg261hmihapu as first_0,
86
+ isLettere1qnx5bysxbd as isLetter,
85
87
  to2cs3ny02qtbcb as to,
86
88
  toMap1vec9topfei08 as toMap,
87
89
  emptyList1g2z5xcrvp2zy as emptyList,
@@ -153,10 +155,10 @@ import {
153
155
  function emit_3(identifier) {
154
156
  var tmp;
155
157
  if (identifier instanceof DefinitionIdentifier) {
156
- tmp = this.i1w(identifier);
158
+ tmp = this.k1w(identifier);
157
159
  } else {
158
160
  if (identifier instanceof FieldIdentifier) {
159
- tmp = this.y1v(this.i1w(identifier));
161
+ tmp = this.a1w(this.k1w(identifier));
160
162
  } else {
161
163
  noWhenBranchMatchedException();
162
164
  }
@@ -178,7 +180,7 @@ function sanitize(_this__u8e3s4) {
178
180
  destination.x(tmp$ret$0);
179
181
  }
180
182
  var tmp = asSequence(joinToString(destination, ''));
181
- return this.x1v(joinToString_0(filter(tmp, KotlinIdentifierEmitter$sanitize$lambda), ''));
183
+ return this.z1v(joinToString_0(filter(tmp, KotlinIdentifierEmitter$sanitize$lambda), ''));
182
184
  }
183
185
  function sanitizeFirstIsDigit(_this__u8e3s4) {
184
186
  var tmp;
@@ -198,7 +200,7 @@ function sanitizeFirstIsDigit(_this__u8e3s4) {
198
200
  return tmp;
199
201
  }
200
202
  function sanitizeKeywords(_this__u8e3s4) {
201
- return Companion_getInstance_0().v1w_1.u1(_this__u8e3s4) ? addBackticks(_this__u8e3s4) : _this__u8e3s4;
203
+ return Companion_getInstance_0().x1w_1.u1(_this__u8e3s4) ? addBackticks(_this__u8e3s4) : _this__u8e3s4;
202
204
  }
203
205
  initMetadataForInterface(KotlinIdentifierEmitter, 'KotlinIdentifierEmitter');
204
206
  function emit_4(type, module_0) {
@@ -355,7 +357,56 @@ function emit_10(union) {
355
357
  return trimMargin('\n |sealed interface ' + this.br(union.uo_1) + '\n |\n ');
356
358
  }
357
359
  initMetadataForInterface(KotlinUnionDefinitionEmitter, 'KotlinUnionDefinitionEmitter', VOID, VOID, [KotlinIdentifierEmitter]);
358
- function emit_11(endpoint) {
360
+ function emit_11(enum_0, module_0) {
361
+ var tmp = this.k1w(enum_0.lr_1);
362
+ return trimMargin('\n |enum class ' + tmp + ' (override val label: String): Wirespec.Enum {\n |' + spacer(joinToString(enum_0.mr_1, ',\n', VOID, VOID, VOID, VOID, KotlinEnumDefinitionEmitter$emit$lambda(this))) + ';\n |' + Spacer_instance.toString() + 'override fun toString(): String {\n |' + Spacer_instance.vr(2) + 'return label\n |' + Spacer_instance.toString() + '}\n |}\n |\n ');
363
+ }
364
+ initMetadataForInterface(KotlinEnumDefinitionEmitter, 'KotlinEnumDefinitionEmitter', VOID, VOID, [KotlinIdentifierEmitter]);
365
+ function emit_12(refined) {
366
+ return trimMargin('\n |data class ' + this.k1w(refined.gr_1) + '(override val value: ' + this.bq(refined.hr_1) + '): Wirespec.Refined<' + this.bq(refined.hr_1) + '> {\n |' + Spacer_instance.toString() + 'override fun toString() = value.toString()\n |' + Spacer_instance.toString() + 'override fun validate() = ' + this.pr(refined) + '\n |}\n |\n ');
367
+ }
368
+ function emitValidator(_this__u8e3s4) {
369
+ var defaultReturn = 'true';
370
+ var type = _this__u8e3s4.hr_1.tu_1;
371
+ var tmp;
372
+ if (type instanceof Integer) {
373
+ var tmp0_safe_receiver = type.yt_1;
374
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.cq(tmp0_safe_receiver);
375
+ tmp = tmp1_elvis_lhs == null ? defaultReturn : tmp1_elvis_lhs;
376
+ } else {
377
+ if (type instanceof Number_0) {
378
+ var tmp2_safe_receiver = type.bu_1;
379
+ var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : this.cq(tmp2_safe_receiver);
380
+ tmp = tmp3_elvis_lhs == null ? defaultReturn : tmp3_elvis_lhs;
381
+ } else {
382
+ if (type instanceof String_0) {
383
+ var tmp4_safe_receiver = type.vt_1;
384
+ var tmp_0;
385
+ var tmp_1 = tmp4_safe_receiver;
386
+ if ((tmp_1 == null ? null : new RegExp_0(tmp_1)) == null) {
387
+ tmp_0 = null;
388
+ } else {
389
+ tmp_0 = this.cq(new RegExp_0(tmp4_safe_receiver));
390
+ }
391
+ var tmp5_elvis_lhs = tmp_0;
392
+ tmp = tmp5_elvis_lhs == null ? defaultReturn : tmp5_elvis_lhs;
393
+ } else {
394
+ if (equals(type, Boolean_instance)) {
395
+ tmp = defaultReturn;
396
+ } else {
397
+ if (equals(type, Bytes_instance)) {
398
+ tmp = defaultReturn;
399
+ } else {
400
+ noWhenBranchMatchedException();
401
+ }
402
+ }
403
+ }
404
+ }
405
+ }
406
+ return tmp;
407
+ }
408
+ initMetadataForInterface(KotlinRefinedTypeDefinitionEmitter, 'KotlinRefinedTypeDefinitionEmitter', VOID, VOID, [KotlinIdentifierEmitter, KotlinTypeDefinitionEmitter]);
409
+ function emit_13(endpoint) {
359
410
  // Inline function 'kotlin.collections.map' call
360
411
  var this_0 = importReferences(endpoint);
361
412
  // Inline function 'kotlin.collections.mapTo' call
@@ -363,7 +414,7 @@ function emit_11(endpoint) {
363
414
  var _iterator__ex2g4s = this_0.t();
364
415
  while (_iterator__ex2g4s.u()) {
365
416
  var item = _iterator__ex2g4s.v();
366
- var tmp$ret$0 = 'import ' + this.i1v().rr_1 + '.model.' + item.pu_1;
417
+ var tmp$ret$0 = 'import ' + this.k1v().rr_1 + '.model.' + item.pu_1;
367
418
  destination.x(tmp$ret$0);
368
419
  }
369
420
  var tmp = destination;
@@ -373,7 +424,7 @@ function emit_11(endpoint) {
373
424
  var tmp_3 = emitObject$default(this, tmp_2, 'Path', 'Wirespec.Path', VOID, KotlinEndpointDefinitionEmitter$emit$lambda_0(this));
374
425
  var tmp_4 = emitObject$default(this, endpoint.lp_1, 'Queries', 'Wirespec.Queries', VOID, KotlinEndpointDefinitionEmitter$emit$lambda_1(this));
375
426
  var tmp_5 = emitObject$default(this, endpoint.mp_1, 'Headers', 'Wirespec.Request.Headers', VOID, KotlinEndpointDefinitionEmitter$emit$lambda_2(this));
376
- var tmp_6 = this.v1v(first(endpoint.np_1), endpoint);
427
+ var tmp_6 = this.x1v(first(endpoint.np_1), endpoint);
377
428
  var tmp_7 = Spacer_instance.toString();
378
429
  var tmp_8 = emitStatusInterfaces(this, endpoint);
379
430
  var tmp_9 = emitResponseInterfaces(this, endpoint);
@@ -403,7 +454,7 @@ function emit_11(endpoint) {
403
454
  var tmp_22 = Spacer_instance.vr(2);
404
455
  var tmp_23 = Spacer_instance.toString();
405
456
  var tmp_24 = Spacer_instance.vr(2);
406
- var tmp_25 = this.z1v(endpoint);
457
+ var tmp_25 = this.b1w(endpoint);
407
458
  var tmp_26 = Spacer_instance.vr(2);
408
459
  var tmp_27 = Spacer_instance.vr(3);
409
460
  return trimMargin('\n |' + tmp_0 + '\n |\n |object ' + tmp_1 + ' : Wirespec.Endpoint {\n |' + tmp_3 + '\n |\n |' + tmp_4 + '\n |\n |' + tmp_5 + '\n |\n |' + tmp_6 + '\n |\n |' + tmp_7 + 'sealed interface Response<T: Any> : Wirespec.Response<T>\n |\n |' + tmp_8 + '\n |\n |' + tmp_9 + '\n |\n |' + tmp_11 + '\n |\n |' + tmp_12 + 'fun toResponse(serialization: Wirespec.Serializer, response: Response<*>): Wirespec.RawResponse =\n |' + tmp_13 + 'when(response) {\n |' + tmp_15 + '\n |' + tmp_16 + '}\n |\n |' + tmp_17 + 'fun fromResponse(serialization: Wirespec.Deserializer, response: Wirespec.RawResponse): Response<*> =\n |' + tmp_18 + 'when (response.statusCode) {\n |' + tmp_20 + '\n |' + tmp_21 + 'else -> error("Cannot match response with status: ${response.statusCode}")\n |' + tmp_22 + '}\n |\n |' + tmp_23 + 'interface Handler: Wirespec.Handler {\n |' + tmp_24 + tmp_25 + '\n |' + tmp_26 + 'companion object: Wirespec.Server<Request, Response<*>>, Wirespec.Client<Request, Response<*>> {\n |' + tmp_27 + 'override val pathTemplate = "/' + joinToString(endpoint.kp_1, '/', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_6) + '"\n |' + Spacer_instance.vr(3) + 'override val method = "' + endpoint.jp_1.toString() + '"\n |' + Spacer_instance.vr(3) + 'override fun server(serialization: Wirespec.Serialization) = object : Wirespec.ServerEdge<Request, Response<*>> {\n |' + Spacer_instance.vr(4) + 'override fun from(request: Wirespec.RawRequest) = fromRequest(serialization, request)\n |' + Spacer_instance.vr(4) + 'override fun to(response: Response<*>) = toResponse(serialization, response)\n |' + Spacer_instance.vr(3) + '}\n |' + Spacer_instance.vr(3) + 'override fun client(serialization: Wirespec.Serialization) = object : Wirespec.ClientEdge<Request, Response<*>> {\n |' + Spacer_instance.vr(4) + 'override fun to(request: Request) = toRequest(serialization, request)\n |' + Spacer_instance.vr(4) + 'override fun from(response: Wirespec.RawResponse) = fromResponse(serialization, response)\n |' + Spacer_instance.vr(3) + '}\n |' + Spacer_instance.vr(2) + '}\n |' + Spacer_instance.toString() + '}\n |}\n |\n ');
@@ -411,7 +462,7 @@ function emit_11(endpoint) {
411
462
  function emitHandleFunction(endpoint) {
412
463
  return 'suspend fun ' + Companion_instance_1.tq(this.br(endpoint.ip_1)) + '(request: Request): Response<*>';
413
464
  }
414
- function emit_12(_this__u8e3s4, endpoint) {
465
+ function emit_14(_this__u8e3s4, endpoint) {
415
466
  var tmp = Spacer_instance.toString();
416
467
  var tmp_0 = emitConstructor(this, _this__u8e3s4, endpoint);
417
468
  var tmp_1 = Spacer_instance.vr(2);
@@ -426,7 +477,7 @@ function emit_12(_this__u8e3s4, endpoint) {
426
477
  var tmp_10 = Spacer_instance.toString();
427
478
  var tmp_11 = Spacer_instance.vr(2);
428
479
  var tmp_12 = Spacer_instance.vr(3);
429
- return trimMargin('\n |' + tmp + tmp_0 + '\n |' + tmp_1 + 'override val path = Path' + tmp_3 + '\n |' + tmp_4 + 'override val method = Wirespec.Method.' + endpoint.jp_1.a3_1 + '\n |' + tmp_5 + 'override val queries = Queries' + tmp_6 + '\n |' + tmp_7 + 'override val headers = Headers' + tmp_8 + '\n |' + tmp_9 + '\n |\n |' + tmp_10 + 'fun toRequest(serialization: Wirespec.Serializer, request: Request): Wirespec.RawRequest =\n |' + tmp_11 + 'Wirespec.RawRequest(\n |' + tmp_12 + 'path = listOf(' + joinToString(endpoint.kp_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_10(this)) + '),\n |' + Spacer_instance.vr(3) + 'method = request.method.name,\n |' + Spacer_instance.vr(3) + 'queries = ' + this.s1w(endpoint) + ',\n |' + Spacer_instance.vr(3) + 'headers = ' + this.r1w(endpoint) + ',\n |' + Spacer_instance.vr(3) + 'body = ' + (!(_this__u8e3s4.rp_1 == null) ? 'serialization.serializeBody(request.body, typeOf<' + emit_16(this, _this__u8e3s4.rp_1) + '>())' : 'null') + ',\n |' + Spacer_instance.vr(2) + ')\n |\n |' + Spacer_instance.toString() + 'fun fromRequest(serialization: Wirespec.Deserializer, request: Wirespec.RawRequest): Request =\n |' + Spacer_instance.vr(2) + 'Request' + emitDeserializedParams(this, _this__u8e3s4, endpoint) + '\n ');
480
+ return trimMargin('\n |' + tmp + tmp_0 + '\n |' + tmp_1 + 'override val path = Path' + tmp_3 + '\n |' + tmp_4 + 'override val method = Wirespec.Method.' + endpoint.jp_1.a3_1 + '\n |' + tmp_5 + 'override val queries = Queries' + tmp_6 + '\n |' + tmp_7 + 'override val headers = Headers' + tmp_8 + '\n |' + tmp_9 + '\n |\n |' + tmp_10 + 'fun toRequest(serialization: Wirespec.Serializer, request: Request): Wirespec.RawRequest =\n |' + tmp_11 + 'Wirespec.RawRequest(\n |' + tmp_12 + 'path = listOf(' + joinToString(endpoint.kp_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_10(this)) + '),\n |' + Spacer_instance.vr(3) + 'method = request.method.name,\n |' + Spacer_instance.vr(3) + 'queries = ' + this.u1w(endpoint) + ',\n |' + Spacer_instance.vr(3) + 'headers = ' + this.t1w(endpoint) + ',\n |' + Spacer_instance.vr(3) + 'body = ' + (!(_this__u8e3s4.rp_1 == null) ? 'serialization.serializeBody(request.body, typeOf<' + emit_16(this, _this__u8e3s4.rp_1) + '>())' : 'null') + ',\n |' + Spacer_instance.vr(2) + ')\n |\n |' + Spacer_instance.toString() + 'fun fromRequest(serialization: Wirespec.Deserializer, request: Wirespec.RawRequest): Request =\n |' + Spacer_instance.vr(2) + 'Request' + emitDeserializedParams(this, _this__u8e3s4, endpoint) + '\n ');
430
481
  }
431
482
  function emitRequestHeaders(_this__u8e3s4) {
432
483
  var tmp;
@@ -451,7 +502,7 @@ function emitQueries(endpoint) {
451
502
  }
452
503
  return tmp;
453
504
  }
454
- function emit_13(_this__u8e3s4) {
505
+ function emit_15(_this__u8e3s4) {
455
506
  // Inline function 'kotlin.let' call
456
507
  var it = joinToString(_this__u8e3s4.vp_1, ', ', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_11(this));
457
508
  var responseHeaderFields = isBlank(it) ? '' : ', ' + it;
@@ -481,56 +532,7 @@ function emitHeaders(_this__u8e3s4) {
481
532
  return tmp;
482
533
  }
483
534
  initMetadataForInterface(KotlinEndpointDefinitionEmitter, 'KotlinEndpointDefinitionEmitter', VOID, VOID, [KotlinTypeDefinitionEmitter]);
484
- function emit_14(enum_0, module_0) {
485
- var tmp = this.i1w(enum_0.lr_1);
486
- return trimMargin('\n |enum class ' + tmp + ' (override val label: String): Wirespec.Enum {\n |' + spacer(joinToString(enum_0.mr_1, ',\n', VOID, VOID, VOID, VOID, KotlinEnumDefinitionEmitter$emit$lambda(this))) + ';\n |' + Spacer_instance.toString() + 'override fun toString(): String {\n |' + Spacer_instance.vr(2) + 'return label\n |' + Spacer_instance.toString() + '}\n |}\n |\n ');
487
- }
488
- initMetadataForInterface(KotlinEnumDefinitionEmitter, 'KotlinEnumDefinitionEmitter', VOID, VOID, [KotlinIdentifierEmitter]);
489
- function emit_15(refined) {
490
- return trimMargin('\n |data class ' + this.i1w(refined.gr_1) + '(override val value: ' + this.bq(refined.hr_1) + '): Wirespec.Refined<' + this.bq(refined.hr_1) + '> {\n |' + Spacer_instance.toString() + 'override fun toString() = value.toString()\n |' + Spacer_instance.toString() + 'override fun validate() = ' + this.pr(refined) + '\n |}\n |\n ');
491
- }
492
- function emitValidator(_this__u8e3s4) {
493
- var defaultReturn = 'true';
494
- var type = _this__u8e3s4.hr_1.tu_1;
495
- var tmp;
496
- if (type instanceof Integer) {
497
- var tmp0_safe_receiver = type.yt_1;
498
- var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.cq(tmp0_safe_receiver);
499
- tmp = tmp1_elvis_lhs == null ? defaultReturn : tmp1_elvis_lhs;
500
- } else {
501
- if (type instanceof Number_0) {
502
- var tmp2_safe_receiver = type.bu_1;
503
- var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : this.cq(tmp2_safe_receiver);
504
- tmp = tmp3_elvis_lhs == null ? defaultReturn : tmp3_elvis_lhs;
505
- } else {
506
- if (type instanceof String_0) {
507
- var tmp4_safe_receiver = type.vt_1;
508
- var tmp_0;
509
- var tmp_1 = tmp4_safe_receiver;
510
- if ((tmp_1 == null ? null : new RegExp_0(tmp_1)) == null) {
511
- tmp_0 = null;
512
- } else {
513
- tmp_0 = this.cq(new RegExp_0(tmp4_safe_receiver));
514
- }
515
- var tmp5_elvis_lhs = tmp_0;
516
- tmp = tmp5_elvis_lhs == null ? defaultReturn : tmp5_elvis_lhs;
517
- } else {
518
- if (equals(type, Boolean_instance)) {
519
- tmp = defaultReturn;
520
- } else {
521
- if (equals(type, Bytes_instance)) {
522
- tmp = defaultReturn;
523
- } else {
524
- noWhenBranchMatchedException();
525
- }
526
- }
527
- }
528
- }
529
- }
530
- return tmp;
531
- }
532
- initMetadataForInterface(KotlinRefinedTypeDefinitionEmitter, 'KotlinRefinedTypeDefinitionEmitter', VOID, VOID, [KotlinIdentifierEmitter, KotlinTypeDefinitionEmitter]);
533
- initMetadataForClass(KotlinEmitter, 'KotlinEmitter', KotlinEmitter, LanguageEmitter, [LanguageEmitter, KotlinChannelDefinitionEmitter, KotlinTypeDefinitionEmitter, KotlinUnionDefinitionEmitter, KotlinEndpointDefinitionEmitter, KotlinEnumDefinitionEmitter, KotlinRefinedTypeDefinitionEmitter, KotlinIdentifierEmitter]);
535
+ initMetadataForClass(KotlinEmitter, 'KotlinEmitter', KotlinEmitter, LanguageEmitter, [LanguageEmitter, KotlinUnionDefinitionEmitter, KotlinIdentifierEmitter, KotlinTypeDefinitionEmitter, KotlinEnumDefinitionEmitter, KotlinRefinedTypeDefinitionEmitter, KotlinEndpointDefinitionEmitter, KotlinChannelDefinitionEmitter]);
534
536
  initMetadataForCompanion(Companion);
535
537
  initMetadataForCompanion(Companion_0);
536
538
  initMetadataForClass(KotlinIrEmitter, 'KotlinIrEmitter', KotlinIrEmitter, VOID, [IrEmitter]);
@@ -544,7 +546,7 @@ function emitImports($this, _this__u8e3s4) {
544
546
  var _iterator__ex2g4s = this_0.t();
545
547
  while (_iterator__ex2g4s.u()) {
546
548
  var item = _iterator__ex2g4s.v();
547
- var tmp$ret$0 = 'import ' + $this.i1v().rr_1 + '.model.' + item.pu_1 + ';';
549
+ var tmp$ret$0 = 'import ' + $this.k1v().rr_1 + '.model.' + item.pu_1 + ';';
548
550
  destination.x(tmp$ret$0);
549
551
  }
550
552
  var tmp = destination;
@@ -560,37 +562,37 @@ function KotlinEmitter(packageName, emitShared) {
560
562
  packageName = packageName === VOID ? Companion_instance.qr('community.flock.wirespec.generated') : packageName;
561
563
  emitShared = emitShared === VOID ? Companion_instance_0.ko() : emitShared;
562
564
  LanguageEmitter.call(this);
563
- this.j1w_1 = packageName;
564
- this.k1w_1 = emitShared;
565
- this.l1w_1 = '\nimport community.flock.wirespec.kotlin.Wirespec\nimport kotlin.reflect.typeOf\n';
566
- this.m1w_1 = FileExtension_Kotlin_getInstance();
567
- this.n1w_1 = KotlinShared_getInstance();
568
- this.o1w_1 = '//';
569
- }
570
- protoOf(KotlinEmitter).i1v = function () {
571
- return this.j1w_1;
565
+ this.l1w_1 = packageName;
566
+ this.m1w_1 = emitShared;
567
+ this.n1w_1 = '\nimport community.flock.wirespec.kotlin.Wirespec\nimport kotlin.reflect.typeOf\n';
568
+ this.o1w_1 = FileExtension_Kotlin_getInstance();
569
+ this.p1w_1 = KotlinShared_getInstance();
570
+ this.q1w_1 = '//';
571
+ }
572
+ protoOf(KotlinEmitter).k1v = function () {
573
+ return this.l1w_1;
572
574
  };
573
575
  protoOf(KotlinEmitter).iq = function () {
574
- return this.m1w_1;
576
+ return this.o1w_1;
575
577
  };
576
- protoOf(KotlinEmitter).r1v = function () {
577
- return this.n1w_1;
578
+ protoOf(KotlinEmitter).t1v = function () {
579
+ return this.p1w_1;
578
580
  };
579
581
  protoOf(KotlinEmitter).jq = function () {
580
- return this.o1w_1;
582
+ return this.q1w_1;
581
583
  };
582
584
  protoOf(KotlinEmitter).yq = function (module_0, logger) {
583
585
  // Inline function 'kotlin.let' call
584
586
  var it = protoOf(LanguageEmitter).yq.call(this, module_0, logger);
585
- return this.k1w_1.lo_1 ? NonEmptyList__plus_impl_xqmb9(it, new Emitted(Companion_instance.qr('community.flock.wirespec.kotlin').tr() + 'Wirespec', this.r1v().q1w_1)) : it;
587
+ return this.m1w_1.lo_1 ? NonEmptyList__plus_impl_xqmb9(it, new Emitted(Companion_instance.qr('community.flock.wirespec.kotlin').tr() + 'Wirespec', this.t1v().s1w_1)) : it;
586
588
  };
587
589
  protoOf(KotlinEmitter).zq = function (definition, module_0, logger) {
588
590
  // Inline function 'kotlin.let' call
589
591
  var it = protoOf(LanguageEmitter).zq.call(this, definition, module_0, logger);
590
- var subPackageName = plus(this.i1v(), definition);
592
+ var subPackageName = plus(this.k1v(), definition);
591
593
  var tmp = subPackageName.tr() + it.mo_1;
592
594
  // Inline function 'kotlin.text.trimStart' call
593
- var this_0 = trimMargin('\n |package ' + subPackageName.toString() + '\n |' + (Companion_instance_1.uq(module_0) ? this.l1w_1 : '') + '\n |' + it.no_1 + '\n ');
595
+ var this_0 = trimMargin('\n |package ' + subPackageName.toString() + '\n |' + (Companion_instance_1.uq(module_0) ? this.n1w_1 : '') + '\n |' + it.no_1 + '\n ');
594
596
  var tmp$ret$0 = toString(trimStart(isCharSequence(this_0) ? this_0 : THROW_CCE()));
595
597
  return new Emitted(tmp, tmp$ret$0);
596
598
  };
@@ -657,7 +659,7 @@ function emitDeserializedParams($this, _this__u8e3s4, endpoint) {
657
659
  return isBlank(it) ? '' : '(\n' + it + '\n' + Spacer_instance.vr(2) + ')';
658
660
  }
659
661
  function emitSerialized($this, _this__u8e3s4) {
660
- return trimMargin('\n |' + Spacer_instance.vr(3) + 'is Response' + _this__u8e3s4.up_1 + ' -> Wirespec.RawResponse(\n |' + Spacer_instance.vr(4) + 'statusCode = response.status,\n |' + Spacer_instance.vr(4) + 'headers = ' + $this.u1w(_this__u8e3s4) + ',\n |' + Spacer_instance.vr(4) + 'body = ' + (!(_this__u8e3s4.wp_1 == null) ? $this.t1w($this, _this__u8e3s4.wp_1) : 'null') + ',\n |' + Spacer_instance.vr(3) + ')\n ');
662
+ return trimMargin('\n |' + Spacer_instance.vr(3) + 'is Response' + _this__u8e3s4.up_1 + ' -> Wirespec.RawResponse(\n |' + Spacer_instance.vr(4) + 'statusCode = response.status,\n |' + Spacer_instance.vr(4) + 'headers = ' + $this.w1w(_this__u8e3s4) + ',\n |' + Spacer_instance.vr(4) + 'body = ' + (!(_this__u8e3s4.wp_1 == null) ? $this.v1w($this, _this__u8e3s4.wp_1) : 'null') + ',\n |' + Spacer_instance.vr(3) + ')\n ');
661
663
  }
662
664
  function emitDeserialized($this, _this__u8e3s4) {
663
665
  var tmp = Spacer_instance.vr(3) + _this__u8e3s4.up_1 + ' -> Response' + _this__u8e3s4.up_1 + '(';
@@ -751,7 +753,7 @@ function KotlinEndpointDefinitionEmitter$emit$lambda_2(this$0) {
751
753
  }
752
754
  function KotlinEndpointDefinitionEmitter$emit$lambda_3(this$0) {
753
755
  return function (it) {
754
- return this$0.w1v(it);
756
+ return this$0.y1v(it);
755
757
  };
756
758
  }
757
759
  function KotlinEndpointDefinitionEmitter$emit$lambda_4(this$0) {
@@ -879,18 +881,18 @@ function sanitizeNegative($this, _this__u8e3s4) {
879
881
  return startsWith(_this__u8e3s4, '-') ? '__' + substring(_this__u8e3s4, 1) : _this__u8e3s4;
880
882
  }
881
883
  function sanitizeEnum($this, _this__u8e3s4) {
882
- return $this.x1v(joinToString(split(sanitizeNegative($this, _this__u8e3s4), ['-', ', ', '.', ' ', '//']), '_'));
884
+ return $this.z1v(joinToString(split(sanitizeNegative($this, _this__u8e3s4), ['-', ', ', '.', ' ', '//']), '_'));
883
885
  }
884
886
  function KotlinEnumDefinitionEmitter$emit$lambda(this$0) {
885
887
  return function (it) {
886
- return this$0.y1v(sanitizeEnum(this$0, it)) + '("' + it + '")';
888
+ return this$0.a1w(sanitizeEnum(this$0, it)) + '("' + it + '")';
887
889
  };
888
890
  }
889
891
  function KotlinEnumDefinitionEmitter() {
890
892
  }
891
893
  function Companion() {
892
894
  Companion_instance_2 = this;
893
- this.v1w_1 = setOf(['as', 'break', 'class', 'continue', 'do', 'else', 'false', 'for', 'fun', 'if', 'in', 'interface', 'internal', 'is', 'null', 'object', 'open', 'package', 'return', 'super', 'this', 'throw', 'true', 'try', 'typealias', 'typeof', 'val', 'var', 'when', 'while', 'private', 'public']);
895
+ this.x1w_1 = setOf(['as', 'break', 'class', 'continue', 'do', 'else', 'false', 'for', 'fun', 'if', 'in', 'interface', 'internal', 'is', 'null', 'object', 'open', 'package', 'return', 'super', 'this', 'throw', 'true', 'try', 'typealias', 'typeof', 'val', 'var', 'when', 'while', 'private', 'public']);
894
896
  }
895
897
  var Companion_instance_2;
896
898
  function Companion_getInstance_0() {
@@ -904,12 +906,19 @@ function KotlinIdentifierEmitter$sanitize$lambda(it) {
904
906
  function KotlinIdentifierEmitter() {
905
907
  }
906
908
  function _get_sanitizationConfig__sns434($this) {
907
- var tmp0 = $this.b1x_1;
909
+ var tmp0 = $this.d1x_1;
908
910
  var tmp = KProperty1;
909
911
  // Inline function 'kotlin.getValue' call
910
912
  getPropertyCallableRef('sanitizationConfig', 1, tmp, KotlinIrEmitter$_get_sanitizationConfig_$ref_tnafwf(), null);
911
913
  return tmp0.l1();
912
914
  }
915
+ function _get_modelSanitizationConfig__vgg831($this) {
916
+ var tmp0 = $this.e1x_1;
917
+ var tmp = KProperty1;
918
+ // Inline function 'kotlin.getValue' call
919
+ getPropertyCallableRef('modelSanitizationConfig', 1, tmp, KotlinIrEmitter$_get_modelSanitizationConfig_$ref_iulb4s(), null);
920
+ return tmp0.l1();
921
+ }
913
922
  function sanitize_0($this, _this__u8e3s4) {
914
923
  // Inline function 'kotlin.collections.mapIndexed' call
915
924
  var this_0 = split(_this__u8e3s4.l1(), ['.', ' ']);
@@ -969,7 +978,7 @@ function sanitizeFirstIsDigit_0($this, _this__u8e3s4) {
969
978
  return tmp;
970
979
  }
971
980
  function sanitizeKeywords_0($this, _this__u8e3s4) {
972
- return Companion_getInstance_1().c1x_1.u1(_this__u8e3s4) ? addBackticks(_this__u8e3s4) : _this__u8e3s4;
981
+ return Companion_getInstance_1().f1x_1.u1(_this__u8e3s4) ? addBackticks(_this__u8e3s4) : _this__u8e3s4;
973
982
  }
974
983
  function sanitizeSymbol($this, _this__u8e3s4) {
975
984
  // Inline function 'kotlin.collections.mapIndexed' call
@@ -1004,12 +1013,45 @@ function sanitizeSymbol($this, _this__u8e3s4) {
1004
1013
  var tmp$ret$5 = destination_0.toString();
1005
1014
  return sanitizeFirstIsDigit_0($this, tmp$ret$5);
1006
1015
  }
1016
+ function sanitizeFieldSymbol($this, _this__u8e3s4) {
1017
+ return isBareIdentifier($this, _this__u8e3s4) ? _this__u8e3s4 : addBackticks(_this__u8e3s4);
1018
+ }
1019
+ function isBareIdentifier($this, _this__u8e3s4) {
1020
+ var tmp;
1021
+ var tmp_0;
1022
+ // Inline function 'kotlin.text.isNotEmpty' call
1023
+ if (charSequenceLength(_this__u8e3s4) > 0) {
1024
+ tmp_0 = isLetter(first_0(_this__u8e3s4)) || first_0(_this__u8e3s4) === _Char___init__impl__6a9atx(95);
1025
+ } else {
1026
+ tmp_0 = false;
1027
+ }
1028
+ if (tmp_0) {
1029
+ var tmp$ret$2;
1030
+ $l$block: {
1031
+ // Inline function 'kotlin.text.all' call
1032
+ var inductionVariable = 0;
1033
+ while (inductionVariable < charSequenceLength(_this__u8e3s4)) {
1034
+ var element = charSequenceGet(_this__u8e3s4, inductionVariable);
1035
+ inductionVariable = inductionVariable + 1 | 0;
1036
+ if (!(isLetterOrDigit(element) || element === _Char___init__impl__6a9atx(95))) {
1037
+ tmp$ret$2 = false;
1038
+ break $l$block;
1039
+ }
1040
+ }
1041
+ tmp$ret$2 = true;
1042
+ }
1043
+ tmp = tmp$ret$2;
1044
+ } else {
1045
+ tmp = false;
1046
+ }
1047
+ return tmp;
1048
+ }
1007
1049
  function sanitizeEnum_0($this, _this__u8e3s4) {
1008
1050
  return sanitizeKeywords_0($this, sanitizeFirstIsDigit_0($this, joinToString(split(_this__u8e3s4, ['-', ', ', '.', ' ', '//']), '_')));
1009
1051
  }
1010
1052
  function Companion_0() {
1011
1053
  Companion_instance_3 = this;
1012
- this.c1x_1 = setOf(['as', 'break', 'class', 'continue', 'do', 'else', 'false', 'for', 'fun', 'if', 'in', 'interface', 'internal', 'is', 'null', 'object', 'open', 'package', 'return', 'super', 'this', 'throw', 'true', 'try', 'typealias', 'typeof', 'val', 'var', 'when', 'while', 'private', 'public']);
1054
+ this.f1x_1 = setOf(['as', 'break', 'class', 'continue', 'do', 'else', 'false', 'for', 'fun', 'if', 'in', 'interface', 'internal', 'is', 'null', 'object', 'open', 'package', 'return', 'super', 'this', 'throw', 'true', 'try', 'typealias', 'typeof', 'val', 'var', 'when', 'while', 'private', 'public']);
1013
1055
  }
1014
1056
  var Companion_instance_3;
1015
1057
  function Companion_getInstance_1() {
@@ -1075,7 +1117,7 @@ function KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
1075
1117
  }
1076
1118
  function KotlinIrEmitter$sanitizationConfig$delegate$lambda(this$0) {
1077
1119
  return function () {
1078
- var tmp = Companion_getInstance_1().c1x_1;
1120
+ var tmp = Companion_getInstance_1().f1x_1;
1079
1121
  var tmp_0 = KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda;
1080
1122
  var tmp_1 = KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0);
1081
1123
  var tmp_2 = KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0);
@@ -1088,6 +1130,26 @@ function KotlinIrEmitter$_get_sanitizationConfig_$ref_tnafwf() {
1088
1130
  return _get_sanitizationConfig__sns434(p0);
1089
1131
  };
1090
1132
  }
1133
+ function KotlinIrEmitter$modelSanitizationConfig$delegate$lambda$lambda(name) {
1134
+ return new Name(listOf(name.x1h()));
1135
+ }
1136
+ function KotlinIrEmitter$modelSanitizationConfig$delegate$lambda$lambda_0(this$0) {
1137
+ return function (it) {
1138
+ return sanitizeFieldSymbol(this$0, it);
1139
+ };
1140
+ }
1141
+ function KotlinIrEmitter$modelSanitizationConfig$delegate$lambda(this$0) {
1142
+ return function () {
1143
+ var tmp = _get_sanitizationConfig__sns434(this$0);
1144
+ var tmp_0 = KotlinIrEmitter$modelSanitizationConfig$delegate$lambda$lambda;
1145
+ return tmp.j1v(VOID, VOID, tmp_0, VOID, KotlinIrEmitter$modelSanitizationConfig$delegate$lambda$lambda_0(this$0));
1146
+ };
1147
+ }
1148
+ function KotlinIrEmitter$_get_modelSanitizationConfig_$ref_iulb4s() {
1149
+ return function (p0) {
1150
+ return _get_modelSanitizationConfig__vgg831(p0);
1151
+ };
1152
+ }
1091
1153
  function KotlinIrEmitter$emitShared$lambda(element, transformer) {
1092
1154
  var tmp;
1093
1155
  if (element instanceof File) {
@@ -1143,22 +1205,24 @@ function KotlinIrEmitter(packageName, emitShared) {
1143
1205
  Companion_getInstance_1();
1144
1206
  packageName = packageName === VOID ? Companion_instance.qr('community.flock.wirespec.generated') : packageName;
1145
1207
  emitShared = emitShared === VOID ? Companion_instance_0.ko() : emitShared;
1146
- this.w1w_1 = packageName;
1147
- this.x1w_1 = emitShared;
1148
- this.y1w_1 = KotlinGenerator_instance;
1149
- this.z1w_1 = FileExtension_Kotlin_getInstance();
1150
- this.a1x_1 = listOf_0([import_0('community.flock.wirespec.kotlin', 'Wirespec'), import_0('kotlin.reflect', 'typeOf')]);
1208
+ this.y1w_1 = packageName;
1209
+ this.z1w_1 = emitShared;
1210
+ this.a1x_1 = KotlinGenerator_instance;
1211
+ this.b1x_1 = FileExtension_Kotlin_getInstance();
1212
+ this.c1x_1 = listOf_0([import_0('community.flock.wirespec.kotlin', 'Wirespec'), import_0('kotlin.reflect', 'typeOf')]);
1151
1213
  var tmp = this;
1152
- tmp.b1x_1 = lazy(KotlinIrEmitter$sanitizationConfig$delegate$lambda(this));
1214
+ tmp.d1x_1 = lazy(KotlinIrEmitter$sanitizationConfig$delegate$lambda(this));
1215
+ var tmp_0 = this;
1216
+ tmp_0.e1x_1 = lazy(KotlinIrEmitter$modelSanitizationConfig$delegate$lambda(this));
1153
1217
  }
1154
- protoOf(KotlinIrEmitter).i1v = function () {
1155
- return this.w1w_1;
1218
+ protoOf(KotlinIrEmitter).k1v = function () {
1219
+ return this.y1w_1;
1156
1220
  };
1157
1221
  protoOf(KotlinIrEmitter).p1u = function () {
1158
- return this.y1w_1;
1222
+ return this.a1x_1;
1159
1223
  };
1160
1224
  protoOf(KotlinIrEmitter).iq = function () {
1161
- return this.z1w_1;
1225
+ return this.b1x_1;
1162
1226
  };
1163
1227
  protoOf(KotlinIrEmitter).s1u = function () {
1164
1228
  var packageName = Companion_instance.qr('community.flock.wirespec.kotlin');
@@ -1190,7 +1254,7 @@ protoOf(KotlinIrEmitter).s1u = function () {
1190
1254
  var tmp_1 = scope.c1u_1;
1191
1255
  var wirespecShared = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
1192
1256
  var tmp_2;
1193
- if (this.x1w_1.lo_1) {
1257
+ if (this.z1w_1.lo_1) {
1194
1258
  tmp_2 = wirespecShared;
1195
1259
  } else {
1196
1260
  tmp_2 = null;
@@ -1200,7 +1264,7 @@ protoOf(KotlinIrEmitter).s1u = function () {
1200
1264
  protoOf(KotlinIrEmitter).zq = function (definition, module_0, logger) {
1201
1265
  var file = emit_0.call(this, definition, module_0, logger);
1202
1266
  // Inline function 'kotlin.takeIf' call
1203
- var this_0 = this.a1x_1;
1267
+ var this_0 = this.c1x_1;
1204
1268
  var tmp;
1205
1269
  if (Companion_instance_1.vq(module_0)) {
1206
1270
  tmp = this_0;
@@ -1208,10 +1272,10 @@ protoOf(KotlinIrEmitter).zq = function (definition, module_0, logger) {
1208
1272
  tmp = null;
1209
1273
  }
1210
1274
  var tmp$ret$1 = tmp;
1211
- return placeInPackage(prependImports(file, tmp$ret$1), this.i1v(), definition);
1275
+ return placeInPackage(prependImports(file, tmp$ret$1), this.k1v(), definition);
1212
1276
  };
1213
1277
  protoOf(KotlinIrEmitter).yp = function (type, module_0) {
1214
- return ensureEmptyStructHasConstructor(sanitizeNames(convertWithValidation(type, module_0), _get_sanitizationConfig__sns434(this)));
1278
+ return ensureEmptyStructHasConstructor(sanitizeNames(convertWithValidation(type, module_0), _get_modelSanitizationConfig__vgg831(this)));
1215
1279
  };
1216
1280
  protoOf(KotlinIrEmitter).nr = function (enum_0, module_0) {
1217
1281
  var tmp = sanitizeNames(convert_0(enum_0), _get_sanitizationConfig__sns434(this));
@@ -1239,7 +1303,7 @@ protoOf(KotlinIrEmitter).ir = function (refined) {
1239
1303
  return new File(Companion_getInstance().k1h(sanitize_0(this, refined.gr_1)), listOfNotNull_0(updatedStruct));
1240
1304
  };
1241
1305
  protoOf(KotlinIrEmitter).or = function (endpoint) {
1242
- var imports = buildModelImports(endpoint, this.i1v());
1306
+ var imports = buildModelImports(endpoint, this.k1v());
1243
1307
  // Inline function 'community.flock.wirespec.ir.core.findElement' call
1244
1308
  // Inline function 'kotlin.collections.filterIsInstance' call
1245
1309
  var tmp0 = convert_3(endpoint).z1m();
@@ -1270,7 +1334,7 @@ protoOf(KotlinIrEmitter).or = function (endpoint) {
1270
1334
  protoOf(KotlinIrEmitter).cr = function (channel) {
1271
1335
  var tmp = sanitizeNames(convert_4(channel), _get_sanitizationConfig__sns434(this));
1272
1336
  // Inline function 'kotlin.takeIf' call
1273
- var this_0 = buildModelImports(channel, this.i1v());
1337
+ var this_0 = buildModelImports(channel, this.k1v());
1274
1338
  var tmp_0;
1275
1339
  // Inline function 'kotlin.collections.isNotEmpty' call
1276
1340
  if (!this_0.r()) {
@@ -1282,17 +1346,17 @@ protoOf(KotlinIrEmitter).cr = function (channel) {
1282
1346
  return prependImports(tmp, tmp$ret$2);
1283
1347
  };
1284
1348
  protoOf(KotlinIrEmitter).u1u = function (endpoint) {
1285
- var imports = buildModelImports(endpoint, this.i1v());
1286
- var endpointImport = import_0(this.i1v().rr_1 + '.endpoint', endpoint.ip_1.l1());
1349
+ var imports = buildModelImports(endpoint, this.k1v());
1350
+ var endpointImport = import_0(this.k1v().rr_1 + '.endpoint', endpoint.ip_1.l1());
1287
1351
  var file = sanitizeNames(emitEndpointClient.call(this, endpoint), _get_sanitizationConfig__sns434(this));
1288
- var subPackageName = plus_0(this.i1v(), 'client');
1352
+ var subPackageName = plus_0(this.k1v(), 'client');
1289
1353
  var tmp = Companion_getInstance().k1h(subPackageName.tr() + file.x1m_1.m1h());
1290
1354
  // Inline function 'kotlin.collections.buildList' call
1291
1355
  // Inline function 'kotlin.collections.buildListInternal' call
1292
1356
  // Inline function 'kotlin.apply' call
1293
1357
  var this_0 = ArrayList_init_$Create$_0();
1294
1358
  this_0.x(new Package(subPackageName.rr_1));
1295
- this_0.f1(this.a1x_1);
1359
+ this_0.f1(this.c1x_1);
1296
1360
  this_0.f1(imports);
1297
1361
  this_0.x(endpointImport);
1298
1362
  this_0.f1(file.y1m_1);
@@ -1326,7 +1390,7 @@ protoOf(KotlinIrEmitter).t1u = function (endpoints, logger) {
1326
1390
  var _iterator__ex2g4s_1 = list_0.t();
1327
1391
  while (_iterator__ex2g4s_1.u()) {
1328
1392
  var item = _iterator__ex2g4s_1.v();
1329
- var tmp$ret$5 = import_0(this.i1v().rr_1 + '.model', item.pu_1);
1393
+ var tmp$ret$5 = import_0(this.k1v().rr_1 + '.model', item.pu_1);
1330
1394
  destination_0.x(tmp$ret$5);
1331
1395
  }
1332
1396
  var imports = destination_0;
@@ -1336,7 +1400,7 @@ protoOf(KotlinIrEmitter).t1u = function (endpoints, logger) {
1336
1400
  var _iterator__ex2g4s_2 = endpoints.t();
1337
1401
  while (_iterator__ex2g4s_2.u()) {
1338
1402
  var item_0 = _iterator__ex2g4s_2.v();
1339
- var tmp$ret$8 = import_0(this.i1v().rr_1 + '.endpoint', item_0.ip_1.l1());
1403
+ var tmp$ret$8 = import_0(this.k1v().rr_1 + '.endpoint', item_0.ip_1.l1());
1340
1404
  destination_1.x(tmp$ret$8);
1341
1405
  }
1342
1406
  var endpointImports = destination_1;
@@ -1346,19 +1410,19 @@ protoOf(KotlinIrEmitter).t1u = function (endpoints, logger) {
1346
1410
  var _iterator__ex2g4s_3 = endpoints.t();
1347
1411
  while (_iterator__ex2g4s_3.u()) {
1348
1412
  var item_1 = _iterator__ex2g4s_3.v();
1349
- var tmp$ret$11 = import_0(this.i1v().rr_1 + '.client', item_1.ip_1.l1() + 'Client');
1413
+ var tmp$ret$11 = import_0(this.k1v().rr_1 + '.client', item_1.ip_1.l1() + 'Client');
1350
1414
  destination_2.x(tmp$ret$11);
1351
1415
  }
1352
1416
  var clientImports = destination_2;
1353
1417
  var allImports = plus_2(plus_2(imports, endpointImports), clientImports);
1354
1418
  var file = sanitizeNames(emitClient.call(this, endpoints, logger), _get_sanitizationConfig__sns434(this));
1355
- var tmp = Companion_getInstance().k1h(this.i1v().tr() + file.x1m_1.m1h());
1419
+ var tmp = Companion_getInstance().k1h(this.k1v().tr() + file.x1m_1.m1h());
1356
1420
  // Inline function 'kotlin.collections.buildList' call
1357
1421
  // Inline function 'kotlin.collections.buildListInternal' call
1358
1422
  // Inline function 'kotlin.apply' call
1359
1423
  var this_0 = ArrayList_init_$Create$_0();
1360
- this_0.x(new Package(this.i1v().rr_1));
1361
- this_0.f1(this.a1x_1);
1424
+ this_0.x(new Package(this.k1v().rr_1));
1425
+ this_0.f1(this.c1x_1);
1362
1426
  this_0.f1(allImports);
1363
1427
  this_0.f1(file.y1m_1);
1364
1428
  var tmp$ret$17 = this_0.o5();
@@ -1483,8 +1547,8 @@ function KotlinRefinedTypeDefinitionEmitter() {
1483
1547
  }
1484
1548
  function KotlinShared() {
1485
1549
  KotlinShared_instance = this;
1486
- this.p1w_1 = 'community.flock.wirespec.kotlin';
1487
- this.q1w_1 = trimMargin('\n |package ' + this.p1w_1 + '\n |\n |import kotlin.reflect.KType\n |\n |object Wirespec {\n |' + Spacer_instance.toString() + 'interface Enum { val label: String }\n |' + Spacer_instance.toString() + 'interface Endpoint\n |' + Spacer_instance.toString() + 'interface Refined<T> {\n |' + Spacer_instance.vr(2) + 'val value: T\n |' + Spacer_instance.vr(2) + 'fun validate(): Boolean\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface Path\n |' + Spacer_instance.toString() + 'interface Queries\n |' + Spacer_instance.toString() + 'interface Headers\n |' + Spacer_instance.toString() + 'interface Handler\n |' + Spacer_instance.toString() + 'interface ServerEdge<Req: Request<*>, Res: Response<*>> { \n |' + Spacer_instance.toString() + 'fun from(request: RawRequest): Req \n |' + Spacer_instance.toString() + 'fun to(response: Res): RawResponse\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface ClientEdge<Req: Request<*>, Res: Response<*>> { \n |' + Spacer_instance.vr(2) + 'fun to(request: Req): RawRequest\n |' + Spacer_instance.vr(2) + 'fun from(response: RawResponse): Res\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface Client<Req : Request<*>, Res : Response<*>> {\n |' + Spacer_instance.vr(2) + 'val pathTemplate: String\n |' + Spacer_instance.vr(2) + 'val method: String\n |' + Spacer_instance.vr(2) + 'fun client(serialization: Serialization): ClientEdge<Req, Res>\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface Server<Req : Request<*>, Res : Response<*>> {\n |' + Spacer_instance.vr(2) + 'val pathTemplate: String\n |' + Spacer_instance.vr(2) + 'val method: String\n |' + Spacer_instance.vr(2) + 'fun server(serialization: Serialization): ServerEdge<Req, Res>\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'enum class Method { GET, PUT, POST, DELETE, OPTIONS, HEAD, PATCH, TRACE }\n |' + Spacer_instance.toString() + 'interface Request<T : Any> { val path: Path; val method: Method; val queries: Queries; val headers: Headers; val body: T; interface Headers : Wirespec.Headers }\n |' + Spacer_instance.toString() + 'interface Response<T : Any> { val status: Int; val headers: Headers; val body: T; interface Headers : Wirespec.Headers }\n |' + Spacer_instance.toString() + 'interface Serialization : Serializer, Deserializer\n |' + Spacer_instance.toString() + 'interface Serializer : BodySerializer, PathSerializer, ParamSerializer\n |' + Spacer_instance.toString() + 'interface Deserializer : BodyDeserializer, PathDeserializer, ParamDeserializer\n |' + Spacer_instance.toString() + 'interface BodySerialization : BodySerializer, BodyDeserializer\n |' + Spacer_instance.toString() + 'interface BodySerializer { fun <T : Any> serializeBody(t: T, kType: KType): ByteArray }\n |' + Spacer_instance.toString() + 'interface BodyDeserializer { fun <T : Any> deserializeBody(raw: ByteArray, kType: KType): T }\n |' + Spacer_instance.toString() + 'interface PathSerialization : PathSerializer, PathDeserializer\n |' + Spacer_instance.toString() + 'interface PathSerializer { fun <T : Any> serializePath(t: T, kType: KType): String }\n |' + Spacer_instance.toString() + 'interface PathDeserializer { fun <T : Any> deserializePath(raw: String, kType: KType): T }\n |' + Spacer_instance.toString() + 'interface ParamSerialization : ParamSerializer, ParamDeserializer\n |' + Spacer_instance.toString() + 'interface ParamSerializer { fun <T : Any> serializeParam(value: T, kType: KType): List<String> }\n |' + Spacer_instance.toString() + 'interface ParamDeserializer { fun <T : Any> deserializeParam(values: List<String>, kType: KType): T }\n |' + Spacer_instance.toString() + 'data class RawRequest(val method: String, val path: List<String>, val queries: Map<String, List<String>>, val headers: Map<String, List<String>>, val body: ByteArray?) \n |' + Spacer_instance.toString() + 'data class RawResponse(val statusCode: Int, val headers: Map<String, List<String>>, val body: ByteArray?)\n |}\n ');
1550
+ this.r1w_1 = 'community.flock.wirespec.kotlin';
1551
+ this.s1w_1 = trimMargin('\n |package ' + this.r1w_1 + '\n |\n |import kotlin.reflect.KType\n |\n |object Wirespec {\n |' + Spacer_instance.toString() + 'interface Enum { val label: String }\n |' + Spacer_instance.toString() + 'interface Endpoint\n |' + Spacer_instance.toString() + 'interface Refined<T> {\n |' + Spacer_instance.vr(2) + 'val value: T\n |' + Spacer_instance.vr(2) + 'fun validate(): Boolean\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface Path\n |' + Spacer_instance.toString() + 'interface Queries\n |' + Spacer_instance.toString() + 'interface Headers\n |' + Spacer_instance.toString() + 'interface Handler\n |' + Spacer_instance.toString() + 'interface ServerEdge<Req: Request<*>, Res: Response<*>> { \n |' + Spacer_instance.toString() + 'fun from(request: RawRequest): Req \n |' + Spacer_instance.toString() + 'fun to(response: Res): RawResponse\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface ClientEdge<Req: Request<*>, Res: Response<*>> { \n |' + Spacer_instance.vr(2) + 'fun to(request: Req): RawRequest\n |' + Spacer_instance.vr(2) + 'fun from(response: RawResponse): Res\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface Client<Req : Request<*>, Res : Response<*>> {\n |' + Spacer_instance.vr(2) + 'val pathTemplate: String\n |' + Spacer_instance.vr(2) + 'val method: String\n |' + Spacer_instance.vr(2) + 'fun client(serialization: Serialization): ClientEdge<Req, Res>\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface Server<Req : Request<*>, Res : Response<*>> {\n |' + Spacer_instance.vr(2) + 'val pathTemplate: String\n |' + Spacer_instance.vr(2) + 'val method: String\n |' + Spacer_instance.vr(2) + 'fun server(serialization: Serialization): ServerEdge<Req, Res>\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'enum class Method { GET, PUT, POST, DELETE, OPTIONS, HEAD, PATCH, TRACE }\n |' + Spacer_instance.toString() + 'interface Request<T : Any> { val path: Path; val method: Method; val queries: Queries; val headers: Headers; val body: T; interface Headers : Wirespec.Headers }\n |' + Spacer_instance.toString() + 'interface Response<T : Any> { val status: Int; val headers: Headers; val body: T; interface Headers : Wirespec.Headers }\n |' + Spacer_instance.toString() + 'interface Serialization : Serializer, Deserializer\n |' + Spacer_instance.toString() + 'interface Serializer : BodySerializer, PathSerializer, ParamSerializer\n |' + Spacer_instance.toString() + 'interface Deserializer : BodyDeserializer, PathDeserializer, ParamDeserializer\n |' + Spacer_instance.toString() + 'interface BodySerialization : BodySerializer, BodyDeserializer\n |' + Spacer_instance.toString() + 'interface BodySerializer { fun <T : Any> serializeBody(t: T, kType: KType): ByteArray }\n |' + Spacer_instance.toString() + 'interface BodyDeserializer { fun <T : Any> deserializeBody(raw: ByteArray, kType: KType): T }\n |' + Spacer_instance.toString() + 'interface PathSerialization : PathSerializer, PathDeserializer\n |' + Spacer_instance.toString() + 'interface PathSerializer { fun <T : Any> serializePath(t: T, kType: KType): String }\n |' + Spacer_instance.toString() + 'interface PathDeserializer { fun <T : Any> deserializePath(raw: String, kType: KType): T }\n |' + Spacer_instance.toString() + 'interface ParamSerialization : ParamSerializer, ParamDeserializer\n |' + Spacer_instance.toString() + 'interface ParamSerializer { fun <T : Any> serializeParam(value: T, kType: KType): List<String> }\n |' + Spacer_instance.toString() + 'interface ParamDeserializer { fun <T : Any> deserializeParam(values: List<String>, kType: KType): T }\n |' + Spacer_instance.toString() + 'data class RawRequest(val method: String, val path: List<String>, val queries: Map<String, List<String>>, val headers: Map<String, List<String>>, val body: ByteArray?) \n |' + Spacer_instance.toString() + 'data class RawResponse(val statusCode: Int, val headers: Map<String, List<String>>, val body: ByteArray?)\n |}\n ');
1488
1552
  }
1489
1553
  protoOf(KotlinShared).toString = function () {
1490
1554
  return 'KotlinShared';
@@ -1525,23 +1589,23 @@ protoOf(KotlinEmitter).zp = emit_5;
1525
1589
  protoOf(KotlinEmitter).aq = emit_6;
1526
1590
  protoOf(KotlinEmitter).bq = emit_7;
1527
1591
  protoOf(KotlinEmitter).cq = emit_8;
1528
- protoOf(KotlinEmitter).nr = emit_14;
1529
- protoOf(KotlinEmitter).ir = emit_15;
1530
- protoOf(KotlinEmitter).or = emit_11;
1592
+ protoOf(KotlinEmitter).nr = emit_11;
1593
+ protoOf(KotlinEmitter).ir = emit_12;
1594
+ protoOf(KotlinEmitter).or = emit_13;
1531
1595
  protoOf(KotlinEmitter).dr = emit_10;
1532
1596
  protoOf(KotlinEmitter).br = emit_3;
1533
1597
  protoOf(KotlinEmitter).cr = emit_9;
1534
- protoOf(KotlinEmitter).v1v = emit_12;
1535
- protoOf(KotlinEmitter).w1v = emit_13;
1598
+ protoOf(KotlinEmitter).x1v = emit_14;
1599
+ protoOf(KotlinEmitter).y1v = emit_15;
1536
1600
  protoOf(KotlinEmitter).pr = emitValidator;
1537
- protoOf(KotlinEmitter).i1w = sanitize;
1538
- protoOf(KotlinEmitter).x1v = sanitizeFirstIsDigit;
1539
- protoOf(KotlinEmitter).y1v = sanitizeKeywords;
1540
- protoOf(KotlinEmitter).z1v = emitHandleFunction;
1541
- protoOf(KotlinEmitter).r1w = emitRequestHeaders;
1542
- protoOf(KotlinEmitter).s1w = emitQueries;
1543
- protoOf(KotlinEmitter).t1w = emitBody;
1544
- protoOf(KotlinEmitter).u1w = emitHeaders;
1601
+ protoOf(KotlinEmitter).k1w = sanitize;
1602
+ protoOf(KotlinEmitter).z1v = sanitizeFirstIsDigit;
1603
+ protoOf(KotlinEmitter).a1w = sanitizeKeywords;
1604
+ protoOf(KotlinEmitter).b1w = emitHandleFunction;
1605
+ protoOf(KotlinEmitter).t1w = emitRequestHeaders;
1606
+ protoOf(KotlinEmitter).u1w = emitQueries;
1607
+ protoOf(KotlinEmitter).v1w = emitBody;
1608
+ protoOf(KotlinEmitter).w1w = emitHeaders;
1545
1609
  protoOf(KotlinIrEmitter).sn = emit_1;
1546
1610
  protoOf(KotlinIrEmitter).r1u = emit_2;
1547
1611
  //endregion