@flock/wirespec 0.16.3 → 0.16.5

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 (33) hide show
  1. package/fetch.ts +0 -0
  2. package/kotlin-kotlin-stdlib.mjs +37 -37
  3. package/kotlin-kotlin-stdlib.mjs.map +1 -1
  4. package/kotlinx-io-kotlinx-io-core.mjs +2 -2
  5. package/package.json +11 -1
  6. package/wirespec-fetch.d.ts +6 -0
  7. package/wirespec-fetch.mjs +33 -0
  8. package/wirespec-src-compiler-core.mjs +1052 -4723
  9. package/wirespec-src-compiler-core.mjs.map +1 -1
  10. package/wirespec-src-compiler-emitters-java.mjs +1003 -0
  11. package/wirespec-src-compiler-emitters-java.mjs.map +1 -0
  12. package/wirespec-src-compiler-emitters-kotlin.mjs +844 -0
  13. package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -0
  14. package/wirespec-src-compiler-emitters-python.mjs +1004 -0
  15. package/wirespec-src-compiler-emitters-python.mjs.map +1 -0
  16. package/wirespec-src-compiler-emitters-typescript.mjs +812 -0
  17. package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -0
  18. package/wirespec-src-compiler-emitters-wirespec.mjs +390 -0
  19. package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -0
  20. package/wirespec-src-compiler-lib.mjs +67 -67
  21. package/wirespec-src-compiler-lib.mjs.map +1 -1
  22. package/wirespec-src-converter-avro.mjs +34 -34
  23. package/wirespec-src-converter-avro.mjs.map +1 -1
  24. package/wirespec-src-converter-openapi.mjs +201 -201
  25. package/wirespec-src-converter-openapi.mjs.map +1 -1
  26. package/wirespec-src-plugin-arguments.mjs +60 -22
  27. package/wirespec-src-plugin-arguments.mjs.map +1 -1
  28. package/wirespec-src-plugin-cli.mjs +25 -59
  29. package/wirespec-src-plugin-cli.mjs.map +1 -1
  30. package/wirespec-src-plugin-npm.d.ts +6 -2
  31. package/wirespec-src-plugin-npm.mjs +40 -22
  32. package/wirespec-src-plugin-npm.mjs.map +1 -1
  33. package/wirespec-src-tools-generator.mjs +23 -23
package/fetch.ts ADDED
File without changes
@@ -37,6 +37,16 @@ if (typeof Array.prototype.fill === 'undefined') {
37
37
  Object.defineProperty(TypedArray.prototype, 'fill', {value: Array.prototype.fill});
38
38
  }
39
39
  });
40
+ if (typeof Math.log10 === 'undefined') {
41
+ Math.log10 = function (x) {
42
+ return Math.log(x) * Math.LOG10E;
43
+ };
44
+ }
45
+ if (typeof Math.log2 === 'undefined') {
46
+ Math.log2 = function (x) {
47
+ return Math.log(x) * Math.LOG2E;
48
+ };
49
+ }
40
50
  if (typeof Math.clz32 === 'undefined') {
41
51
  Math.clz32 = function (log, LN2) {
42
52
  return function (x) {
@@ -48,22 +58,6 @@ if (typeof Math.clz32 === 'undefined') {
48
58
  };
49
59
  }(Math.log, Math.LN2);
50
60
  }
51
- if (typeof Math.log2 === 'undefined') {
52
- Math.log2 = function (x) {
53
- return Math.log(x) * Math.LOG2E;
54
- };
55
- }
56
- if (typeof Math.log10 === 'undefined') {
57
- Math.log10 = function (x) {
58
- return Math.log(x) * Math.LOG10E;
59
- };
60
- }
61
- if (typeof String.prototype.startsWith === 'undefined') {
62
- Object.defineProperty(String.prototype, 'startsWith', {value: function (searchString, position) {
63
- position = position || 0;
64
- return this.lastIndexOf(searchString, position) === position;
65
- }});
66
- }
67
61
  if (typeof String.prototype.endsWith === 'undefined') {
68
62
  Object.defineProperty(String.prototype, 'endsWith', {value: function (searchString, position) {
69
63
  var subjectString = this.toString();
@@ -75,6 +69,12 @@ if (typeof String.prototype.endsWith === 'undefined') {
75
69
  return lastIndex !== -1 && lastIndex === position;
76
70
  }});
77
71
  }
72
+ if (typeof String.prototype.startsWith === 'undefined') {
73
+ Object.defineProperty(String.prototype, 'startsWith', {value: function (searchString, position) {
74
+ position = position || 0;
75
+ return this.lastIndexOf(searchString, position) === position;
76
+ }});
77
+ }
78
78
  //endregion
79
79
  //region block: imports
80
80
  var imul_0 = Math.imul;
@@ -10631,27 +10631,6 @@ function substringAfterLast(_this__u8e3s4, delimiter, missingDelimiterValue) {
10631
10631
  }
10632
10632
  return tmp;
10633
10633
  }
10634
- function trimStart_0(_this__u8e3s4) {
10635
- var tmp$ret$1;
10636
- $l$block: {
10637
- // Inline function 'kotlin.text.trimStart' call
10638
- var inductionVariable = 0;
10639
- var last = charSequenceLength(_this__u8e3s4) - 1 | 0;
10640
- if (inductionVariable <= last)
10641
- do {
10642
- var index = inductionVariable;
10643
- inductionVariable = inductionVariable + 1 | 0;
10644
- var p0 = charSequenceGet(_this__u8e3s4, index);
10645
- if (!isWhitespace(p0)) {
10646
- tmp$ret$1 = charSequenceSubSequence(_this__u8e3s4, index, charSequenceLength(_this__u8e3s4));
10647
- break $l$block;
10648
- }
10649
- }
10650
- while (inductionVariable <= last);
10651
- tmp$ret$1 = '';
10652
- }
10653
- return tmp$ret$1;
10654
- }
10655
10634
  function startsWith_2(_this__u8e3s4, prefix, ignoreCase) {
10656
10635
  ignoreCase = ignoreCase === VOID ? false : ignoreCase;
10657
10636
  var tmp;
@@ -10695,6 +10674,27 @@ function lastIndexOf_0(_this__u8e3s4, char, startIndex, ignoreCase) {
10695
10674
  }
10696
10675
  return tmp;
10697
10676
  }
10677
+ function trimStart_0(_this__u8e3s4) {
10678
+ var tmp$ret$1;
10679
+ $l$block: {
10680
+ // Inline function 'kotlin.text.trimStart' call
10681
+ var inductionVariable = 0;
10682
+ var last = charSequenceLength(_this__u8e3s4) - 1 | 0;
10683
+ if (inductionVariable <= last)
10684
+ do {
10685
+ var index = inductionVariable;
10686
+ inductionVariable = inductionVariable + 1 | 0;
10687
+ var p0 = charSequenceGet(_this__u8e3s4, index);
10688
+ if (!isWhitespace(p0)) {
10689
+ tmp$ret$1 = charSequenceSubSequence(_this__u8e3s4, index, charSequenceLength(_this__u8e3s4));
10690
+ break $l$block;
10691
+ }
10692
+ }
10693
+ while (inductionVariable <= last);
10694
+ tmp$ret$1 = '';
10695
+ }
10696
+ return tmp$ret$1;
10697
+ }
10698
10698
  function lastIndexOfAny(_this__u8e3s4, chars, startIndex, ignoreCase) {
10699
10699
  startIndex = startIndex === VOID ? get_lastIndex_4(_this__u8e3s4) : startIndex;
10700
10700
  ignoreCase = ignoreCase === VOID ? false : ignoreCase;