@stryke/capnp 0.11.8 → 0.11.12

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.
package/bin/capnpc.js CHANGED
@@ -14,10 +14,141 @@ function existsSync(filePath) {
14
14
  }
15
15
  __name(existsSync, "existsSync");
16
16
 
17
+ // ../type-checks/src/get-object-tag.ts
18
+ var getObjectTag = /* @__PURE__ */ __name((value) => {
19
+ if (value == null) {
20
+ return value === void 0 ? "[object Undefined]" : "[object Null]";
21
+ }
22
+ return Object.prototype.toString.call(value);
23
+ }, "getObjectTag");
24
+
25
+ // ../type-checks/src/is-plain-object.ts
26
+ var isObjectLike = /* @__PURE__ */ __name((obj) => {
27
+ return typeof obj === "object" && obj !== null;
28
+ }, "isObjectLike");
29
+ var isPlainObject = /* @__PURE__ */ __name((obj) => {
30
+ if (!isObjectLike(obj) || getObjectTag(obj) !== "[object Object]") {
31
+ return false;
32
+ }
33
+ if (Object.getPrototypeOf(obj) === null) {
34
+ return true;
35
+ }
36
+ let proto = obj;
37
+ while (Object.getPrototypeOf(proto) !== null) {
38
+ proto = Object.getPrototypeOf(proto);
39
+ }
40
+ return Object.getPrototypeOf(obj) === proto;
41
+ }, "isPlainObject");
42
+
43
+ // ../type-checks/src/is-null.ts
44
+ var isNull = /* @__PURE__ */ __name((value) => {
45
+ try {
46
+ return value === null;
47
+ } catch {
48
+ return false;
49
+ }
50
+ }, "isNull");
51
+
52
+ // ../type-checks/src/is-number.ts
53
+ var isNumber = /* @__PURE__ */ __name((value) => {
54
+ try {
55
+ return value instanceof Number || typeof value === "number" || Number(value) === value;
56
+ } catch {
57
+ return false;
58
+ }
59
+ }, "isNumber");
60
+
61
+ // ../type-checks/src/is-undefined.ts
62
+ var isUndefined = /* @__PURE__ */ __name((value) => {
63
+ return value === void 0;
64
+ }, "isUndefined");
65
+
66
+ // ../type-checks/src/is-empty.ts
67
+ var isEmpty = /* @__PURE__ */ __name((value) => {
68
+ try {
69
+ return isUndefined(value) || isNull(value);
70
+ } catch {
71
+ return false;
72
+ }
73
+ }, "isEmpty");
74
+
75
+ // ../type-checks/src/is-object.ts
76
+ var isObject = /* @__PURE__ */ __name((value) => {
77
+ try {
78
+ return typeof value === "object" || Boolean(value) && value?.constructor === Object || isPlainObject(value);
79
+ } catch {
80
+ return false;
81
+ }
82
+ }, "isObject");
83
+
84
+ // ../type-checks/src/is-buffer.ts
85
+ var isBufferExists = typeof Buffer !== "undefined";
86
+ var isBuffer = isBufferExists ? Buffer.isBuffer.bind(Buffer) : (
87
+ /**
88
+ * Check if the provided value's type is `Buffer`
89
+
90
+ * @param value - The value to type check
91
+ * @returns An indicator specifying if the value provided is of type `Buffer`
92
+ */
93
+ /* @__PURE__ */ __name(function isBuffer2(value) {
94
+ return false;
95
+ }, "isBuffer")
96
+ );
97
+
98
+ // ../type-checks/src/type-detect.ts
99
+ var globalObject = ((Obj) => {
100
+ if (typeof globalThis === "object") {
101
+ return globalThis;
102
+ }
103
+ Object.defineProperty(Obj, "typeDetectGlobalObject", {
104
+ get() {
105
+ return this;
106
+ },
107
+ configurable: true
108
+ });
109
+ return globalThis;
110
+ })(Object.prototype);
111
+
17
112
  // ../types/src/base.ts
18
113
  var EMPTY_STRING = "";
19
114
  var $NestedValue = Symbol("NestedValue");
20
115
 
116
+ // ../type-checks/src/is-string.ts
117
+ var isString = /* @__PURE__ */ __name((value) => {
118
+ try {
119
+ return typeof value === "string";
120
+ } catch {
121
+ return false;
122
+ }
123
+ }, "isString");
124
+
125
+ // ../type-checks/src/is-error.ts
126
+ var isError = /* @__PURE__ */ __name((obj) => {
127
+ if (!isObject(obj)) {
128
+ return false;
129
+ }
130
+ const tag = getObjectTag(obj);
131
+ return tag === "[object Error]" || tag === "[object DOMException]" || typeof obj?.message === "string" && typeof obj?.name === "string" && !isPlainObject(obj);
132
+ }, "isError");
133
+
134
+ // ../type-checks/src/is-set.ts
135
+ var isSet = /* @__PURE__ */ __name((value) => {
136
+ try {
137
+ return !isEmpty(value);
138
+ } catch {
139
+ return false;
140
+ }
141
+ }, "isSet");
142
+
143
+ // ../type-checks/src/is-set-string.ts
144
+ var isSetString = /* @__PURE__ */ __name((value) => {
145
+ try {
146
+ return isSet(value) && isString(value) && value.length > 0;
147
+ } catch {
148
+ return false;
149
+ }
150
+ }, "isSetString");
151
+
21
152
  // ../path/src/cwd.ts
22
153
  function cwd() {
23
154
  if (typeof process !== "undefined" && typeof process.cwd === "function") {
@@ -33,6 +164,7 @@ var DRIVE_LETTER_REGEX = /^[A-Z]:$/i;
33
164
  var UNC_REGEX = /^[/\\]{2}/;
34
165
  var ABSOLUTE_PATH_REGEX = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^~[/\\]|^[A-Z]:[/\\]/i;
35
166
  var ROOT_FOLDER_REGEX = /^\/([A-Z]:)?$/i;
167
+ var FILE_EXTENSION_REGEX = /\.[0-9a-z]+$/i;
36
168
 
37
169
  // ../path/src/slash.ts
38
170
  function slash(path) {
@@ -253,7 +385,7 @@ function findFileName(filePath, options = {}) {
253
385
  return EMPTY_STRING;
254
386
  }
255
387
  if (withExtension === false && result.includes(".")) {
256
- return result.substring(0, result.lastIndexOf(".")) || EMPTY_STRING;
388
+ return result.replace(`.${findFileExtension(result) ?? ""}`, "") || EMPTY_STRING;
257
389
  }
258
390
  return result;
259
391
  }
@@ -266,6 +398,14 @@ function findFilePath(filePath) {
266
398
  return result === "/" ? result : result.replace(/\/$/, "");
267
399
  }
268
400
  __name(findFilePath, "findFilePath");
401
+ function findFileExtension(filePath) {
402
+ if (filePath.endsWith(".") || filePath.endsWith("/")) {
403
+ return void 0;
404
+ }
405
+ const match = FILE_EXTENSION_REGEX.exec(normalizeWindowsPath2(filePath));
406
+ return match && match.length > 0 && isSetString(match[0]) ? match[0].replace(".", "") : void 0;
407
+ }
408
+ __name(findFileExtension, "findFileExtension");
269
409
  function resolve(...paths) {
270
410
  paths = paths.map((argument) => normalizeWindowsPath2(argument));
271
411
  let resolvedPath = "";
@@ -755,7 +895,7 @@ function copyFrom(src, p) {
755
895
  return;
756
896
  }
757
897
  erase(p);
758
- if (isNull(src)) return;
898
+ if (isNull2(src)) return;
759
899
  switch (getTargetPointerType(src)) {
760
900
  case PointerType.STRUCT: {
761
901
  copyFromStruct(src, p);
@@ -779,7 +919,7 @@ function copyFrom(src, p) {
779
919
  }
780
920
  __name(copyFrom, "copyFrom");
781
921
  function erase(p) {
782
- if (isNull(p)) return;
922
+ if (isNull2(p)) return;
783
923
  let c;
784
924
  switch (getTargetPointerType(p)) {
785
925
  case PointerType.STRUCT: {
@@ -1002,10 +1142,10 @@ function isDoubleFar(p) {
1002
1142
  return getPointerType(p) === PointerType.FAR && (p.segment.getUint32(p.byteOffset) & POINTER_DOUBLE_FAR_MASK) !== 0;
1003
1143
  }
1004
1144
  __name(isDoubleFar, "isDoubleFar");
1005
- function isNull(p) {
1145
+ function isNull2(p) {
1006
1146
  return p.segment.isWordZero(p.byteOffset);
1007
1147
  }
1008
- __name(isNull, "isNull");
1148
+ __name(isNull2, "isNull");
1009
1149
  function setFarPointer(doubleFar, offsetWords, segmentId, p) {
1010
1150
  const A = PointerType.FAR;
1011
1151
  const B = doubleFar ? 1 : 0;
@@ -1050,7 +1190,7 @@ function setStructPointer(offsetWords, size, p) {
1050
1190
  }
1051
1191
  __name(setStructPointer, "setStructPointer");
1052
1192
  function validate(pointerType, p, elementSize) {
1053
- if (isNull(p)) {
1193
+ if (isNull2(p)) {
1054
1194
  return;
1055
1195
  }
1056
1196
  const t = followFars(p);
@@ -1675,7 +1815,7 @@ var Text = class extends List {
1675
1815
  * @returns The string value.
1676
1816
  */
1677
1817
  get(index = 0) {
1678
- if (isNull(this)) {
1818
+ if (isNull2(this)) {
1679
1819
  return "";
1680
1820
  }
1681
1821
  const c = getContent(this);
@@ -1707,7 +1847,7 @@ var Text = class extends List {
1707
1847
  const dstLength = src.byteLength + index;
1708
1848
  let c;
1709
1849
  let original;
1710
- if (!isNull(this)) {
1850
+ if (!isNull2(this)) {
1711
1851
  c = getContent(this);
1712
1852
  const originalLength = Math.min(this.length, index);
1713
1853
  original = new Uint8Array(
@@ -1827,7 +1967,7 @@ function resize(dstSize, s) {
1827
1967
  srcContent.segment,
1828
1968
  srcContent.byteOffset + srcSize.dataByteLength + i * 8
1829
1969
  );
1830
- if (isNull(srcPtr)) {
1970
+ if (isNull2(srcPtr)) {
1831
1971
  continue;
1832
1972
  }
1833
1973
  const srcPtrTarget = followFars(srcPtr);
@@ -1882,7 +2022,7 @@ function getData(index, s, defaultValue) {
1882
2022
  const ps = getPointerSection(s);
1883
2023
  ps.byteOffset += index * 8;
1884
2024
  const l = new Data(ps.segment, ps.byteOffset, s._capnp.depthLimit - 1);
1885
- if (isNull(l)) {
2025
+ if (isNull2(l)) {
1886
2026
  if (defaultValue) {
1887
2027
  copyFrom(defaultValue, l);
1888
2028
  } else {
@@ -1971,7 +2111,7 @@ function getList(index, ListClass, s, defaultValue) {
1971
2111
  const ps = getPointerSection(s);
1972
2112
  ps.byteOffset += index * 8;
1973
2113
  const l = new ListClass(ps.segment, ps.byteOffset, s._capnp.depthLimit - 1);
1974
- if (isNull(l)) {
2114
+ if (isNull2(l)) {
1975
2115
  if (defaultValue) {
1976
2116
  copyFrom(defaultValue, l);
1977
2117
  } else {
@@ -2073,7 +2213,7 @@ function getSize(s) {
2073
2213
  __name(getSize, "getSize");
2074
2214
  function getStruct(index, StructClass, s, defaultValue) {
2075
2215
  const t = getPointerAs(index, StructClass, s);
2076
- if (isNull(t)) {
2216
+ if (isNull2(t)) {
2077
2217
  if (defaultValue) {
2078
2218
  copyFrom(defaultValue, t);
2079
2219
  } else {
@@ -2091,7 +2231,7 @@ function getStruct(index, StructClass, s, defaultValue) {
2091
2231
  __name(getStruct, "getStruct");
2092
2232
  function getText(index, s, defaultValue) {
2093
2233
  const t = Text.fromPointer(getPointer(index, s));
2094
- if (isNull(t) && defaultValue) {
2234
+ if (isNull2(t) && defaultValue) {
2095
2235
  t.set(0, defaultValue);
2096
2236
  }
2097
2237
  return t.get(0);
@@ -2515,7 +2655,7 @@ var Node_SourceInfo = class _Node_SourceInfo extends Struct {
2515
2655
  return getList(1, _Node_SourceInfo._Members, this);
2516
2656
  }
2517
2657
  _hasMembers() {
2518
- return !isNull(getPointer(1, this));
2658
+ return !isNull2(getPointer(1, this));
2519
2659
  }
2520
2660
  _initMembers(length) {
2521
2661
  return initList(1, _Node_SourceInfo._Members, length, this);
@@ -2640,7 +2780,7 @@ var Node_Struct = class _Node_Struct extends Struct {
2640
2780
  return getList(3, _Node_Struct._Fields, this);
2641
2781
  }
2642
2782
  _hasFields() {
2643
- return !isNull(getPointer(3, this));
2783
+ return !isNull2(getPointer(3, this));
2644
2784
  }
2645
2785
  _initFields(length) {
2646
2786
  return initList(3, _Node_Struct._Fields, length, this);
@@ -2676,7 +2816,7 @@ var Node_Enum = class _Node_Enum extends Struct {
2676
2816
  return getList(3, _Node_Enum._Enumerants, this);
2677
2817
  }
2678
2818
  _hasEnumerants() {
2679
- return !isNull(getPointer(3, this));
2819
+ return !isNull2(getPointer(3, this));
2680
2820
  }
2681
2821
  _initEnumerants(length) {
2682
2822
  return initList(3, _Node_Enum._Enumerants, length, this);
@@ -2713,7 +2853,7 @@ var Node_Interface = class _Node_Interface extends Struct {
2713
2853
  return getList(3, _Node_Interface._Methods, this);
2714
2854
  }
2715
2855
  _hasMethods() {
2716
- return !isNull(getPointer(3, this));
2856
+ return !isNull2(getPointer(3, this));
2717
2857
  }
2718
2858
  _initMethods(length) {
2719
2859
  return initList(3, _Node_Interface._Methods, length, this);
@@ -2735,7 +2875,7 @@ var Node_Interface = class _Node_Interface extends Struct {
2735
2875
  return getList(4, _Node_Interface._Superclasses, this);
2736
2876
  }
2737
2877
  _hasSuperclasses() {
2738
- return !isNull(getPointer(4, this));
2878
+ return !isNull2(getPointer(4, this));
2739
2879
  }
2740
2880
  _initSuperclasses(length) {
2741
2881
  return initList(4, _Node_Interface._Superclasses, length, this);
@@ -2766,7 +2906,7 @@ var Node_Const = class extends Struct {
2766
2906
  return getStruct(3, Type, this);
2767
2907
  }
2768
2908
  _hasType() {
2769
- return !isNull(getPointer(3, this));
2909
+ return !isNull2(getPointer(3, this));
2770
2910
  }
2771
2911
  _initType() {
2772
2912
  return initStructAt(3, Type, this);
@@ -2784,7 +2924,7 @@ var Node_Const = class extends Struct {
2784
2924
  return getStruct(4, Value, this);
2785
2925
  }
2786
2926
  _hasValue() {
2787
- return !isNull(getPointer(4, this));
2927
+ return !isNull2(getPointer(4, this));
2788
2928
  }
2789
2929
  _initValue() {
2790
2930
  return initStructAt(4, Value, this);
@@ -2815,7 +2955,7 @@ var Node_Annotation = class extends Struct {
2815
2955
  return getStruct(3, Type, this);
2816
2956
  }
2817
2957
  _hasType() {
2818
- return !isNull(getPointer(3, this));
2958
+ return !isNull2(getPointer(3, this));
2819
2959
  }
2820
2960
  _initType() {
2821
2961
  return initStructAt(3, Type, this);
@@ -3014,7 +3154,7 @@ var Node = class _Node extends Struct {
3014
3154
  return getList(5, _Node._Parameters, this);
3015
3155
  }
3016
3156
  _hasParameters() {
3017
- return !isNull(getPointer(5, this));
3157
+ return !isNull2(getPointer(5, this));
3018
3158
  }
3019
3159
  _initParameters(length) {
3020
3160
  return initList(5, _Node._Parameters, length, this);
@@ -3047,7 +3187,7 @@ var Node = class _Node extends Struct {
3047
3187
  return getList(1, _Node._NestedNodes, this);
3048
3188
  }
3049
3189
  _hasNestedNodes() {
3050
- return !isNull(getPointer(1, this));
3190
+ return !isNull2(getPointer(1, this));
3051
3191
  }
3052
3192
  _initNestedNodes(length) {
3053
3193
  return initList(1, _Node._NestedNodes, length, this);
@@ -3069,7 +3209,7 @@ var Node = class _Node extends Struct {
3069
3209
  return getList(2, _Node._Annotations, this);
3070
3210
  }
3071
3211
  _hasAnnotations() {
3072
- return !isNull(getPointer(2, this));
3212
+ return !isNull2(getPointer(2, this));
3073
3213
  }
3074
3214
  _initAnnotations(length) {
3075
3215
  return initList(2, _Node._Annotations, length, this);
@@ -3191,7 +3331,7 @@ var Field_Slot = class extends Struct {
3191
3331
  return getStruct(2, Type, this);
3192
3332
  }
3193
3333
  _hasType() {
3194
- return !isNull(getPointer(2, this));
3334
+ return !isNull2(getPointer(2, this));
3195
3335
  }
3196
3336
  _initType() {
3197
3337
  return initStructAt(2, Type, this);
@@ -3209,7 +3349,7 @@ var Field_Slot = class extends Struct {
3209
3349
  return getStruct(3, Value, this);
3210
3350
  }
3211
3351
  _hasDefaultValue() {
3212
- return !isNull(getPointer(3, this));
3352
+ return !isNull2(getPointer(3, this));
3213
3353
  }
3214
3354
  _initDefaultValue() {
3215
3355
  return initStructAt(3, Value, this);
@@ -3368,7 +3508,7 @@ var Field = class _Field extends Struct {
3368
3508
  return getList(1, _Field._Annotations, this);
3369
3509
  }
3370
3510
  _hasAnnotations() {
3371
- return !isNull(getPointer(1, this));
3511
+ return !isNull2(getPointer(1, this));
3372
3512
  }
3373
3513
  _initAnnotations(length) {
3374
3514
  return initList(1, _Field._Annotations, length, this);
@@ -3473,7 +3613,7 @@ var Enumerant = class _Enumerant extends Struct {
3473
3613
  return getList(1, _Enumerant._Annotations, this);
3474
3614
  }
3475
3615
  _hasAnnotations() {
3476
- return !isNull(getPointer(1, this));
3616
+ return !isNull2(getPointer(1, this));
3477
3617
  }
3478
3618
  _initAnnotations(length) {
3479
3619
  return initList(1, _Enumerant._Annotations, length, this);
@@ -3510,7 +3650,7 @@ var Superclass = class extends Struct {
3510
3650
  return getStruct(0, Brand, this);
3511
3651
  }
3512
3652
  _hasBrand() {
3513
- return !isNull(getPointer(0, this));
3653
+ return !isNull2(getPointer(0, this));
3514
3654
  }
3515
3655
  _initBrand() {
3516
3656
  return initStructAt(0, Brand, this);
@@ -3565,7 +3705,7 @@ var Method = class _Method extends Struct {
3565
3705
  return getList(4, _Method._ImplicitParameters, this);
3566
3706
  }
3567
3707
  _hasImplicitParameters() {
3568
- return !isNull(getPointer(4, this));
3708
+ return !isNull2(getPointer(4, this));
3569
3709
  }
3570
3710
  _initImplicitParameters(length) {
3571
3711
  return initList(4, _Method._ImplicitParameters, length, this);
@@ -3603,7 +3743,7 @@ var Method = class _Method extends Struct {
3603
3743
  return getStruct(2, Brand, this);
3604
3744
  }
3605
3745
  _hasParamBrand() {
3606
- return !isNull(getPointer(2, this));
3746
+ return !isNull2(getPointer(2, this));
3607
3747
  }
3608
3748
  _initParamBrand() {
3609
3749
  return initStructAt(2, Brand, this);
@@ -3635,7 +3775,7 @@ var Method = class _Method extends Struct {
3635
3775
  return getStruct(3, Brand, this);
3636
3776
  }
3637
3777
  _hasResultBrand() {
3638
- return !isNull(getPointer(3, this));
3778
+ return !isNull2(getPointer(3, this));
3639
3779
  }
3640
3780
  _initResultBrand() {
3641
3781
  return initStructAt(3, Brand, this);
@@ -3653,7 +3793,7 @@ var Method = class _Method extends Struct {
3653
3793
  return getList(1, _Method._Annotations, this);
3654
3794
  }
3655
3795
  _hasAnnotations() {
3656
- return !isNull(getPointer(1, this));
3796
+ return !isNull2(getPointer(1, this));
3657
3797
  }
3658
3798
  _initAnnotations(length) {
3659
3799
  return initList(1, _Method._Annotations, length, this);
@@ -3684,7 +3824,7 @@ var Type_List = class extends Struct {
3684
3824
  return getStruct(0, Type, this);
3685
3825
  }
3686
3826
  _hasElementType() {
3687
- return !isNull(getPointer(0, this));
3827
+ return !isNull2(getPointer(0, this));
3688
3828
  }
3689
3829
  _initElementType() {
3690
3830
  return initStructAt(0, Type, this);
@@ -3721,7 +3861,7 @@ var Type_Enum = class extends Struct {
3721
3861
  return getStruct(0, Brand, this);
3722
3862
  }
3723
3863
  _hasBrand() {
3724
- return !isNull(getPointer(0, this));
3864
+ return !isNull2(getPointer(0, this));
3725
3865
  }
3726
3866
  _initBrand() {
3727
3867
  return initStructAt(0, Brand, this);
@@ -3758,7 +3898,7 @@ var Type_Struct = class extends Struct {
3758
3898
  return getStruct(0, Brand, this);
3759
3899
  }
3760
3900
  _hasBrand() {
3761
- return !isNull(getPointer(0, this));
3901
+ return !isNull2(getPointer(0, this));
3762
3902
  }
3763
3903
  _initBrand() {
3764
3904
  return initStructAt(0, Brand, this);
@@ -3795,7 +3935,7 @@ var Type_Interface = class extends Struct {
3795
3935
  return getStruct(0, Brand, this);
3796
3936
  }
3797
3937
  _hasBrand() {
3798
- return !isNull(getPointer(0, this));
3938
+ return !isNull2(getPointer(0, this));
3799
3939
  }
3800
3940
  _initBrand() {
3801
3941
  return initStructAt(0, Brand, this);
@@ -4286,7 +4426,7 @@ var Brand_Scope = class _Brand_Scope extends Struct {
4286
4426
  return getList(0, _Brand_Scope._Bind, this);
4287
4427
  }
4288
4428
  _hasBind() {
4289
- return !isNull(getPointer(0, this));
4429
+ return !isNull2(getPointer(0, this));
4290
4430
  }
4291
4431
  _initBind(length) {
4292
4432
  setUint16(8, 0, this);
@@ -4345,7 +4485,7 @@ var Brand_Binding = class extends Struct {
4345
4485
  return getStruct(0, Type, this);
4346
4486
  }
4347
4487
  _hasType() {
4348
- return !isNull(getPointer(0, this));
4488
+ return !isNull2(getPointer(0, this));
4349
4489
  }
4350
4490
  _initType() {
4351
4491
  setUint16(0, 1, this);
@@ -4393,7 +4533,7 @@ var Brand = class _Brand extends Struct {
4393
4533
  return getList(0, _Brand._Scopes, this);
4394
4534
  }
4395
4535
  _hasScopes() {
4396
- return !isNull(getPointer(0, this));
4536
+ return !isNull2(getPointer(0, this));
4397
4537
  }
4398
4538
  _initScopes(length) {
4399
4539
  return initList(0, _Brand._Scopes, length, this);
@@ -4609,7 +4749,7 @@ var Value = class extends Struct {
4609
4749
  return getData(0, this);
4610
4750
  }
4611
4751
  _hasData() {
4612
- return !isNull(getPointer(0, this));
4752
+ return !isNull2(getPointer(0, this));
4613
4753
  }
4614
4754
  _initData(length) {
4615
4755
  setUint16(0, 13, this);
@@ -4634,7 +4774,7 @@ var Value = class extends Struct {
4634
4774
  return getPointer(0, this);
4635
4775
  }
4636
4776
  _hasList() {
4637
- return !isNull(getPointer(0, this));
4777
+ return !isNull2(getPointer(0, this));
4638
4778
  }
4639
4779
  get _isList() {
4640
4780
  return getUint16(0, this) === 14;
@@ -4666,7 +4806,7 @@ var Value = class extends Struct {
4666
4806
  return getPointer(0, this);
4667
4807
  }
4668
4808
  _hasStruct() {
4669
- return !isNull(getPointer(0, this));
4809
+ return !isNull2(getPointer(0, this));
4670
4810
  }
4671
4811
  get _isStruct() {
4672
4812
  return getUint16(0, this) === 16;
@@ -4693,7 +4833,7 @@ var Value = class extends Struct {
4693
4833
  return getPointer(0, this);
4694
4834
  }
4695
4835
  _hasAnyPointer() {
4696
- return !isNull(getPointer(0, this));
4836
+ return !isNull2(getPointer(0, this));
4697
4837
  }
4698
4838
  get _isAnyPointer() {
4699
4839
  return getUint16(0, this) === 18;
@@ -4744,7 +4884,7 @@ var Annotation = class extends Struct {
4744
4884
  return getStruct(1, Brand, this);
4745
4885
  }
4746
4886
  _hasBrand() {
4747
- return !isNull(getPointer(1, this));
4887
+ return !isNull2(getPointer(1, this));
4748
4888
  }
4749
4889
  _initBrand() {
4750
4890
  return initStructAt(1, Brand, this);
@@ -4762,7 +4902,7 @@ var Annotation = class extends Struct {
4762
4902
  return getStruct(0, Value, this);
4763
4903
  }
4764
4904
  _hasValue() {
4765
- return !isNull(getPointer(0, this));
4905
+ return !isNull2(getPointer(0, this));
4766
4906
  }
4767
4907
  _initValue() {
4768
4908
  return initStructAt(0, Value, this);
@@ -4903,7 +5043,7 @@ var CodeGeneratorRequest_RequestedFile = class _CodeGeneratorRequest_RequestedFi
4903
5043
  return getList(1, _CodeGeneratorRequest_RequestedFile._Imports, this);
4904
5044
  }
4905
5045
  _hasImports() {
4906
- return !isNull(getPointer(1, this));
5046
+ return !isNull2(getPointer(1, this));
4907
5047
  }
4908
5048
  _initImports(length) {
4909
5049
  return initList(1, _CodeGeneratorRequest_RequestedFile._Imports, length, this);
@@ -4947,7 +5087,7 @@ var CodeGeneratorRequest = class _CodeGeneratorRequest extends Struct {
4947
5087
  return getStruct(2, CapnpVersion, this);
4948
5088
  }
4949
5089
  _hasCapnpVersion() {
4950
- return !isNull(getPointer(2, this));
5090
+ return !isNull2(getPointer(2, this));
4951
5091
  }
4952
5092
  _initCapnpVersion() {
4953
5093
  return initStructAt(2, CapnpVersion, this);
@@ -4970,7 +5110,7 @@ var CodeGeneratorRequest = class _CodeGeneratorRequest extends Struct {
4970
5110
  return getList(0, _CodeGeneratorRequest._Nodes, this);
4971
5111
  }
4972
5112
  _hasNodes() {
4973
- return !isNull(getPointer(0, this));
5113
+ return !isNull2(getPointer(0, this));
4974
5114
  }
4975
5115
  _initNodes(length) {
4976
5116
  return initList(0, _CodeGeneratorRequest._Nodes, length, this);
@@ -4993,7 +5133,7 @@ var CodeGeneratorRequest = class _CodeGeneratorRequest extends Struct {
4993
5133
  return getList(3, _CodeGeneratorRequest._SourceInfo, this);
4994
5134
  }
4995
5135
  _hasSourceInfo() {
4996
- return !isNull(getPointer(3, this));
5136
+ return !isNull2(getPointer(3, this));
4997
5137
  }
4998
5138
  _initSourceInfo(length) {
4999
5139
  return initList(3, _CodeGeneratorRequest._SourceInfo, length, this);
@@ -5015,7 +5155,7 @@ var CodeGeneratorRequest = class _CodeGeneratorRequest extends Struct {
5015
5155
  return getList(1, _CodeGeneratorRequest._RequestedFiles, this);
5016
5156
  }
5017
5157
  _hasRequestedFiles() {
5018
- return !isNull(getPointer(1, this));
5158
+ return !isNull2(getPointer(1, this));
5019
5159
  }
5020
5160
  _initRequestedFiles(length) {
5021
5161
  return initList(1, _CodeGeneratorRequest._RequestedFiles, length, this);
@@ -7370,50 +7510,6 @@ function toArray(array) {
7370
7510
  }
7371
7511
  __name(toArray, "toArray");
7372
7512
 
7373
- // ../type-checks/src/get-object-tag.ts
7374
- var getObjectTag = /* @__PURE__ */ __name((value) => {
7375
- if (value == null) {
7376
- return value === void 0 ? "[object Undefined]" : "[object Null]";
7377
- }
7378
- return Object.prototype.toString.call(value);
7379
- }, "getObjectTag");
7380
-
7381
- // ../type-checks/src/is-plain-object.ts
7382
- var isObjectLike = /* @__PURE__ */ __name((obj) => {
7383
- return typeof obj === "object" && obj !== null;
7384
- }, "isObjectLike");
7385
- var isPlainObject = /* @__PURE__ */ __name((obj) => {
7386
- if (!isObjectLike(obj) || getObjectTag(obj) !== "[object Object]") {
7387
- return false;
7388
- }
7389
- if (Object.getPrototypeOf(obj) === null) {
7390
- return true;
7391
- }
7392
- let proto = obj;
7393
- while (Object.getPrototypeOf(proto) !== null) {
7394
- proto = Object.getPrototypeOf(proto);
7395
- }
7396
- return Object.getPrototypeOf(obj) === proto;
7397
- }, "isPlainObject");
7398
-
7399
- // ../type-checks/src/is-object.ts
7400
- var isObject = /* @__PURE__ */ __name((value) => {
7401
- try {
7402
- return typeof value === "object" || Boolean(value) && value?.constructor === Object || isPlainObject(value);
7403
- } catch {
7404
- return false;
7405
- }
7406
- }, "isObject");
7407
-
7408
- // ../type-checks/src/is-string.ts
7409
- var isString = /* @__PURE__ */ __name((value) => {
7410
- try {
7411
- return typeof value === "string";
7412
- } catch {
7413
- return false;
7414
- }
7415
- }, "isString");
7416
-
7417
7513
  // ../json/src/storm-json.ts
7418
7514
  import { parse as parse2 } from "jsonc-parser";
7419
7515
  import { Buffer as Buffer2 } from "node:buffer";
@@ -7712,20 +7808,6 @@ ${codeFrameColumns(input, {
7712
7808
  }
7713
7809
  __name(formatParseError, "formatParseError");
7714
7810
 
7715
- // ../type-checks/src/is-number.ts
7716
- var isNumber = /* @__PURE__ */ __name((value) => {
7717
- try {
7718
- return value instanceof Number || typeof value === "number" || Number(value) === value;
7719
- } catch {
7720
- return false;
7721
- }
7722
- }, "isNumber");
7723
-
7724
- // ../type-checks/src/is-undefined.ts
7725
- var isUndefined = /* @__PURE__ */ __name((value) => {
7726
- return value === void 0;
7727
- }, "isUndefined");
7728
-
7729
7811
  // ../json/src/utils/stringify.ts
7730
7812
  var invalidKeyChars = [
7731
7813
  "@",
@@ -7920,15 +8002,6 @@ StormJSON.instance.registerCustom({
7920
8002
  deserialize: /* @__PURE__ */ __name((v) => Buffer2.from(v, "base64"), "deserialize")
7921
8003
  }, "Bytes");
7922
8004
 
7923
- // ../type-checks/src/is-error.ts
7924
- var isError = /* @__PURE__ */ __name((obj) => {
7925
- if (!isObject(obj)) {
7926
- return false;
7927
- }
7928
- const tag = getObjectTag(obj);
7929
- return tag === "[object Error]" || tag === "[object DOMException]" || typeof obj?.message === "string" && typeof obj?.name === "string" && !isPlainObject(obj);
7930
- }, "isError");
7931
-
7932
8005
  // ../fs/src/read-file.ts
7933
8006
  import { existsSync as existsSync2, readFileSync as readFileSyncFs } from "node:fs";
7934
8007
  import { readFile as readFileFs } from "node:fs/promises";