@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.cjs +191 -118
- package/bin/capnpc.js +191 -118
- package/dist/{chunk-3XQOWGLN.js → chunk-67LAYABJ.js} +77 -4
- package/dist/{chunk-D7EXNDGP.cjs → chunk-BQWET4JX.cjs} +74 -1
- package/dist/{chunk-ZTX57LW7.cjs → chunk-OJTISCBC.cjs} +4 -4
- package/dist/{chunk-CZ6QQVCB.js → chunk-SRFPHGTH.js} +1 -1
- package/dist/compile.cjs +3 -3
- package/dist/compile.js +2 -2
- package/dist/helpers.cjs +2 -2
- package/dist/helpers.js +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.js +2 -2
- package/package.json +4 -4
- package/schemas/{chunk-3OPQQYYB.cjs → chunk-4ENDHOUU.cjs} +28 -0
- package/schemas/{chunk-ZSAA3N73.js → chunk-54JBPYER.js} +32 -4
- package/schemas/persistent.cjs +20 -20
- package/schemas/persistent.js +1 -1
- package/schemas/rpc-twoparty.cjs +32 -32
- package/schemas/rpc-twoparty.js +1 -1
- package/schemas/rpc.cjs +495 -495
- package/schemas/rpc.js +1 -1
- package/schemas/schema.cjs +675 -675
- package/schemas/schema.js +1 -1
package/bin/capnpc.cjs
CHANGED
|
@@ -45,10 +45,141 @@ function existsSync(filePath) {
|
|
|
45
45
|
}
|
|
46
46
|
__name(existsSync, "existsSync");
|
|
47
47
|
|
|
48
|
+
// ../type-checks/src/get-object-tag.ts
|
|
49
|
+
var getObjectTag = /* @__PURE__ */ __name((value) => {
|
|
50
|
+
if (value == null) {
|
|
51
|
+
return value === void 0 ? "[object Undefined]" : "[object Null]";
|
|
52
|
+
}
|
|
53
|
+
return Object.prototype.toString.call(value);
|
|
54
|
+
}, "getObjectTag");
|
|
55
|
+
|
|
56
|
+
// ../type-checks/src/is-plain-object.ts
|
|
57
|
+
var isObjectLike = /* @__PURE__ */ __name((obj) => {
|
|
58
|
+
return typeof obj === "object" && obj !== null;
|
|
59
|
+
}, "isObjectLike");
|
|
60
|
+
var isPlainObject = /* @__PURE__ */ __name((obj) => {
|
|
61
|
+
if (!isObjectLike(obj) || getObjectTag(obj) !== "[object Object]") {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
if (Object.getPrototypeOf(obj) === null) {
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
let proto = obj;
|
|
68
|
+
while (Object.getPrototypeOf(proto) !== null) {
|
|
69
|
+
proto = Object.getPrototypeOf(proto);
|
|
70
|
+
}
|
|
71
|
+
return Object.getPrototypeOf(obj) === proto;
|
|
72
|
+
}, "isPlainObject");
|
|
73
|
+
|
|
74
|
+
// ../type-checks/src/is-null.ts
|
|
75
|
+
var isNull = /* @__PURE__ */ __name((value) => {
|
|
76
|
+
try {
|
|
77
|
+
return value === null;
|
|
78
|
+
} catch {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
}, "isNull");
|
|
82
|
+
|
|
83
|
+
// ../type-checks/src/is-number.ts
|
|
84
|
+
var isNumber = /* @__PURE__ */ __name((value) => {
|
|
85
|
+
try {
|
|
86
|
+
return value instanceof Number || typeof value === "number" || Number(value) === value;
|
|
87
|
+
} catch {
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
90
|
+
}, "isNumber");
|
|
91
|
+
|
|
92
|
+
// ../type-checks/src/is-undefined.ts
|
|
93
|
+
var isUndefined = /* @__PURE__ */ __name((value) => {
|
|
94
|
+
return value === void 0;
|
|
95
|
+
}, "isUndefined");
|
|
96
|
+
|
|
97
|
+
// ../type-checks/src/is-empty.ts
|
|
98
|
+
var isEmpty = /* @__PURE__ */ __name((value) => {
|
|
99
|
+
try {
|
|
100
|
+
return isUndefined(value) || isNull(value);
|
|
101
|
+
} catch {
|
|
102
|
+
return false;
|
|
103
|
+
}
|
|
104
|
+
}, "isEmpty");
|
|
105
|
+
|
|
106
|
+
// ../type-checks/src/is-object.ts
|
|
107
|
+
var isObject = /* @__PURE__ */ __name((value) => {
|
|
108
|
+
try {
|
|
109
|
+
return typeof value === "object" || Boolean(value) && value?.constructor === Object || isPlainObject(value);
|
|
110
|
+
} catch {
|
|
111
|
+
return false;
|
|
112
|
+
}
|
|
113
|
+
}, "isObject");
|
|
114
|
+
|
|
115
|
+
// ../type-checks/src/is-buffer.ts
|
|
116
|
+
var isBufferExists = typeof Buffer !== "undefined";
|
|
117
|
+
var isBuffer = isBufferExists ? Buffer.isBuffer.bind(Buffer) : (
|
|
118
|
+
/**
|
|
119
|
+
* Check if the provided value's type is `Buffer`
|
|
120
|
+
|
|
121
|
+
* @param value - The value to type check
|
|
122
|
+
* @returns An indicator specifying if the value provided is of type `Buffer`
|
|
123
|
+
*/
|
|
124
|
+
/* @__PURE__ */ __name(function isBuffer2(value) {
|
|
125
|
+
return false;
|
|
126
|
+
}, "isBuffer")
|
|
127
|
+
);
|
|
128
|
+
|
|
129
|
+
// ../type-checks/src/type-detect.ts
|
|
130
|
+
var globalObject = ((Obj) => {
|
|
131
|
+
if (typeof globalThis === "object") {
|
|
132
|
+
return globalThis;
|
|
133
|
+
}
|
|
134
|
+
Object.defineProperty(Obj, "typeDetectGlobalObject", {
|
|
135
|
+
get() {
|
|
136
|
+
return this;
|
|
137
|
+
},
|
|
138
|
+
configurable: true
|
|
139
|
+
});
|
|
140
|
+
return globalThis;
|
|
141
|
+
})(Object.prototype);
|
|
142
|
+
|
|
48
143
|
// ../types/src/base.ts
|
|
49
144
|
var EMPTY_STRING = "";
|
|
50
145
|
var $NestedValue = Symbol("NestedValue");
|
|
51
146
|
|
|
147
|
+
// ../type-checks/src/is-string.ts
|
|
148
|
+
var isString = /* @__PURE__ */ __name((value) => {
|
|
149
|
+
try {
|
|
150
|
+
return typeof value === "string";
|
|
151
|
+
} catch {
|
|
152
|
+
return false;
|
|
153
|
+
}
|
|
154
|
+
}, "isString");
|
|
155
|
+
|
|
156
|
+
// ../type-checks/src/is-error.ts
|
|
157
|
+
var isError = /* @__PURE__ */ __name((obj) => {
|
|
158
|
+
if (!isObject(obj)) {
|
|
159
|
+
return false;
|
|
160
|
+
}
|
|
161
|
+
const tag = getObjectTag(obj);
|
|
162
|
+
return tag === "[object Error]" || tag === "[object DOMException]" || typeof obj?.message === "string" && typeof obj?.name === "string" && !isPlainObject(obj);
|
|
163
|
+
}, "isError");
|
|
164
|
+
|
|
165
|
+
// ../type-checks/src/is-set.ts
|
|
166
|
+
var isSet = /* @__PURE__ */ __name((value) => {
|
|
167
|
+
try {
|
|
168
|
+
return !isEmpty(value);
|
|
169
|
+
} catch {
|
|
170
|
+
return false;
|
|
171
|
+
}
|
|
172
|
+
}, "isSet");
|
|
173
|
+
|
|
174
|
+
// ../type-checks/src/is-set-string.ts
|
|
175
|
+
var isSetString = /* @__PURE__ */ __name((value) => {
|
|
176
|
+
try {
|
|
177
|
+
return isSet(value) && isString(value) && value.length > 0;
|
|
178
|
+
} catch {
|
|
179
|
+
return false;
|
|
180
|
+
}
|
|
181
|
+
}, "isSetString");
|
|
182
|
+
|
|
52
183
|
// ../path/src/cwd.ts
|
|
53
184
|
function cwd() {
|
|
54
185
|
if (typeof process !== "undefined" && typeof process.cwd === "function") {
|
|
@@ -64,6 +195,7 @@ var DRIVE_LETTER_REGEX = /^[A-Z]:$/i;
|
|
|
64
195
|
var UNC_REGEX = /^[/\\]{2}/;
|
|
65
196
|
var ABSOLUTE_PATH_REGEX = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^~[/\\]|^[A-Z]:[/\\]/i;
|
|
66
197
|
var ROOT_FOLDER_REGEX = /^\/([A-Z]:)?$/i;
|
|
198
|
+
var FILE_EXTENSION_REGEX = /\.[0-9a-z]+$/i;
|
|
67
199
|
|
|
68
200
|
// ../path/src/slash.ts
|
|
69
201
|
function slash(path) {
|
|
@@ -284,7 +416,7 @@ function findFileName(filePath, options = {}) {
|
|
|
284
416
|
return EMPTY_STRING;
|
|
285
417
|
}
|
|
286
418
|
if (withExtension === false && result.includes(".")) {
|
|
287
|
-
return result.
|
|
419
|
+
return result.replace(`.${findFileExtension(result) ?? ""}`, "") || EMPTY_STRING;
|
|
288
420
|
}
|
|
289
421
|
return result;
|
|
290
422
|
}
|
|
@@ -297,6 +429,14 @@ function findFilePath(filePath) {
|
|
|
297
429
|
return result === "/" ? result : result.replace(/\/$/, "");
|
|
298
430
|
}
|
|
299
431
|
__name(findFilePath, "findFilePath");
|
|
432
|
+
function findFileExtension(filePath) {
|
|
433
|
+
if (filePath.endsWith(".") || filePath.endsWith("/")) {
|
|
434
|
+
return void 0;
|
|
435
|
+
}
|
|
436
|
+
const match = FILE_EXTENSION_REGEX.exec(normalizeWindowsPath2(filePath));
|
|
437
|
+
return match && match.length > 0 && isSetString(match[0]) ? match[0].replace(".", "") : void 0;
|
|
438
|
+
}
|
|
439
|
+
__name(findFileExtension, "findFileExtension");
|
|
300
440
|
function resolve(...paths) {
|
|
301
441
|
paths = paths.map((argument) => normalizeWindowsPath2(argument));
|
|
302
442
|
let resolvedPath = "";
|
|
@@ -786,7 +926,7 @@ function copyFrom(src, p) {
|
|
|
786
926
|
return;
|
|
787
927
|
}
|
|
788
928
|
erase(p);
|
|
789
|
-
if (
|
|
929
|
+
if (isNull2(src)) return;
|
|
790
930
|
switch (getTargetPointerType(src)) {
|
|
791
931
|
case PointerType.STRUCT: {
|
|
792
932
|
copyFromStruct(src, p);
|
|
@@ -810,7 +950,7 @@ function copyFrom(src, p) {
|
|
|
810
950
|
}
|
|
811
951
|
__name(copyFrom, "copyFrom");
|
|
812
952
|
function erase(p) {
|
|
813
|
-
if (
|
|
953
|
+
if (isNull2(p)) return;
|
|
814
954
|
let c;
|
|
815
955
|
switch (getTargetPointerType(p)) {
|
|
816
956
|
case PointerType.STRUCT: {
|
|
@@ -1033,10 +1173,10 @@ function isDoubleFar(p) {
|
|
|
1033
1173
|
return getPointerType(p) === PointerType.FAR && (p.segment.getUint32(p.byteOffset) & POINTER_DOUBLE_FAR_MASK) !== 0;
|
|
1034
1174
|
}
|
|
1035
1175
|
__name(isDoubleFar, "isDoubleFar");
|
|
1036
|
-
function
|
|
1176
|
+
function isNull2(p) {
|
|
1037
1177
|
return p.segment.isWordZero(p.byteOffset);
|
|
1038
1178
|
}
|
|
1039
|
-
__name(
|
|
1179
|
+
__name(isNull2, "isNull");
|
|
1040
1180
|
function setFarPointer(doubleFar, offsetWords, segmentId, p) {
|
|
1041
1181
|
const A = PointerType.FAR;
|
|
1042
1182
|
const B = doubleFar ? 1 : 0;
|
|
@@ -1081,7 +1221,7 @@ function setStructPointer(offsetWords, size, p) {
|
|
|
1081
1221
|
}
|
|
1082
1222
|
__name(setStructPointer, "setStructPointer");
|
|
1083
1223
|
function validate(pointerType, p, elementSize) {
|
|
1084
|
-
if (
|
|
1224
|
+
if (isNull2(p)) {
|
|
1085
1225
|
return;
|
|
1086
1226
|
}
|
|
1087
1227
|
const t = followFars(p);
|
|
@@ -1706,7 +1846,7 @@ var Text = class extends List {
|
|
|
1706
1846
|
* @returns The string value.
|
|
1707
1847
|
*/
|
|
1708
1848
|
get(index = 0) {
|
|
1709
|
-
if (
|
|
1849
|
+
if (isNull2(this)) {
|
|
1710
1850
|
return "";
|
|
1711
1851
|
}
|
|
1712
1852
|
const c = getContent(this);
|
|
@@ -1738,7 +1878,7 @@ var Text = class extends List {
|
|
|
1738
1878
|
const dstLength = src.byteLength + index;
|
|
1739
1879
|
let c;
|
|
1740
1880
|
let original;
|
|
1741
|
-
if (!
|
|
1881
|
+
if (!isNull2(this)) {
|
|
1742
1882
|
c = getContent(this);
|
|
1743
1883
|
const originalLength = Math.min(this.length, index);
|
|
1744
1884
|
original = new Uint8Array(
|
|
@@ -1858,7 +1998,7 @@ function resize(dstSize, s) {
|
|
|
1858
1998
|
srcContent.segment,
|
|
1859
1999
|
srcContent.byteOffset + srcSize.dataByteLength + i * 8
|
|
1860
2000
|
);
|
|
1861
|
-
if (
|
|
2001
|
+
if (isNull2(srcPtr)) {
|
|
1862
2002
|
continue;
|
|
1863
2003
|
}
|
|
1864
2004
|
const srcPtrTarget = followFars(srcPtr);
|
|
@@ -1913,7 +2053,7 @@ function getData(index, s, defaultValue) {
|
|
|
1913
2053
|
const ps = getPointerSection(s);
|
|
1914
2054
|
ps.byteOffset += index * 8;
|
|
1915
2055
|
const l = new Data(ps.segment, ps.byteOffset, s._capnp.depthLimit - 1);
|
|
1916
|
-
if (
|
|
2056
|
+
if (isNull2(l)) {
|
|
1917
2057
|
if (defaultValue) {
|
|
1918
2058
|
copyFrom(defaultValue, l);
|
|
1919
2059
|
} else {
|
|
@@ -2002,7 +2142,7 @@ function getList(index, ListClass, s, defaultValue) {
|
|
|
2002
2142
|
const ps = getPointerSection(s);
|
|
2003
2143
|
ps.byteOffset += index * 8;
|
|
2004
2144
|
const l = new ListClass(ps.segment, ps.byteOffset, s._capnp.depthLimit - 1);
|
|
2005
|
-
if (
|
|
2145
|
+
if (isNull2(l)) {
|
|
2006
2146
|
if (defaultValue) {
|
|
2007
2147
|
copyFrom(defaultValue, l);
|
|
2008
2148
|
} else {
|
|
@@ -2104,7 +2244,7 @@ function getSize(s) {
|
|
|
2104
2244
|
__name(getSize, "getSize");
|
|
2105
2245
|
function getStruct(index, StructClass, s, defaultValue) {
|
|
2106
2246
|
const t = getPointerAs(index, StructClass, s);
|
|
2107
|
-
if (
|
|
2247
|
+
if (isNull2(t)) {
|
|
2108
2248
|
if (defaultValue) {
|
|
2109
2249
|
copyFrom(defaultValue, t);
|
|
2110
2250
|
} else {
|
|
@@ -2122,7 +2262,7 @@ function getStruct(index, StructClass, s, defaultValue) {
|
|
|
2122
2262
|
__name(getStruct, "getStruct");
|
|
2123
2263
|
function getText(index, s, defaultValue) {
|
|
2124
2264
|
const t = Text.fromPointer(getPointer(index, s));
|
|
2125
|
-
if (
|
|
2265
|
+
if (isNull2(t) && defaultValue) {
|
|
2126
2266
|
t.set(0, defaultValue);
|
|
2127
2267
|
}
|
|
2128
2268
|
return t.get(0);
|
|
@@ -2546,7 +2686,7 @@ var Node_SourceInfo = class _Node_SourceInfo extends Struct {
|
|
|
2546
2686
|
return getList(1, _Node_SourceInfo._Members, this);
|
|
2547
2687
|
}
|
|
2548
2688
|
_hasMembers() {
|
|
2549
|
-
return !
|
|
2689
|
+
return !isNull2(getPointer(1, this));
|
|
2550
2690
|
}
|
|
2551
2691
|
_initMembers(length) {
|
|
2552
2692
|
return initList(1, _Node_SourceInfo._Members, length, this);
|
|
@@ -2671,7 +2811,7 @@ var Node_Struct = class _Node_Struct extends Struct {
|
|
|
2671
2811
|
return getList(3, _Node_Struct._Fields, this);
|
|
2672
2812
|
}
|
|
2673
2813
|
_hasFields() {
|
|
2674
|
-
return !
|
|
2814
|
+
return !isNull2(getPointer(3, this));
|
|
2675
2815
|
}
|
|
2676
2816
|
_initFields(length) {
|
|
2677
2817
|
return initList(3, _Node_Struct._Fields, length, this);
|
|
@@ -2707,7 +2847,7 @@ var Node_Enum = class _Node_Enum extends Struct {
|
|
|
2707
2847
|
return getList(3, _Node_Enum._Enumerants, this);
|
|
2708
2848
|
}
|
|
2709
2849
|
_hasEnumerants() {
|
|
2710
|
-
return !
|
|
2850
|
+
return !isNull2(getPointer(3, this));
|
|
2711
2851
|
}
|
|
2712
2852
|
_initEnumerants(length) {
|
|
2713
2853
|
return initList(3, _Node_Enum._Enumerants, length, this);
|
|
@@ -2744,7 +2884,7 @@ var Node_Interface = class _Node_Interface extends Struct {
|
|
|
2744
2884
|
return getList(3, _Node_Interface._Methods, this);
|
|
2745
2885
|
}
|
|
2746
2886
|
_hasMethods() {
|
|
2747
|
-
return !
|
|
2887
|
+
return !isNull2(getPointer(3, this));
|
|
2748
2888
|
}
|
|
2749
2889
|
_initMethods(length) {
|
|
2750
2890
|
return initList(3, _Node_Interface._Methods, length, this);
|
|
@@ -2766,7 +2906,7 @@ var Node_Interface = class _Node_Interface extends Struct {
|
|
|
2766
2906
|
return getList(4, _Node_Interface._Superclasses, this);
|
|
2767
2907
|
}
|
|
2768
2908
|
_hasSuperclasses() {
|
|
2769
|
-
return !
|
|
2909
|
+
return !isNull2(getPointer(4, this));
|
|
2770
2910
|
}
|
|
2771
2911
|
_initSuperclasses(length) {
|
|
2772
2912
|
return initList(4, _Node_Interface._Superclasses, length, this);
|
|
@@ -2797,7 +2937,7 @@ var Node_Const = class extends Struct {
|
|
|
2797
2937
|
return getStruct(3, Type, this);
|
|
2798
2938
|
}
|
|
2799
2939
|
_hasType() {
|
|
2800
|
-
return !
|
|
2940
|
+
return !isNull2(getPointer(3, this));
|
|
2801
2941
|
}
|
|
2802
2942
|
_initType() {
|
|
2803
2943
|
return initStructAt(3, Type, this);
|
|
@@ -2815,7 +2955,7 @@ var Node_Const = class extends Struct {
|
|
|
2815
2955
|
return getStruct(4, Value, this);
|
|
2816
2956
|
}
|
|
2817
2957
|
_hasValue() {
|
|
2818
|
-
return !
|
|
2958
|
+
return !isNull2(getPointer(4, this));
|
|
2819
2959
|
}
|
|
2820
2960
|
_initValue() {
|
|
2821
2961
|
return initStructAt(4, Value, this);
|
|
@@ -2846,7 +2986,7 @@ var Node_Annotation = class extends Struct {
|
|
|
2846
2986
|
return getStruct(3, Type, this);
|
|
2847
2987
|
}
|
|
2848
2988
|
_hasType() {
|
|
2849
|
-
return !
|
|
2989
|
+
return !isNull2(getPointer(3, this));
|
|
2850
2990
|
}
|
|
2851
2991
|
_initType() {
|
|
2852
2992
|
return initStructAt(3, Type, this);
|
|
@@ -3045,7 +3185,7 @@ var Node = class _Node extends Struct {
|
|
|
3045
3185
|
return getList(5, _Node._Parameters, this);
|
|
3046
3186
|
}
|
|
3047
3187
|
_hasParameters() {
|
|
3048
|
-
return !
|
|
3188
|
+
return !isNull2(getPointer(5, this));
|
|
3049
3189
|
}
|
|
3050
3190
|
_initParameters(length) {
|
|
3051
3191
|
return initList(5, _Node._Parameters, length, this);
|
|
@@ -3078,7 +3218,7 @@ var Node = class _Node extends Struct {
|
|
|
3078
3218
|
return getList(1, _Node._NestedNodes, this);
|
|
3079
3219
|
}
|
|
3080
3220
|
_hasNestedNodes() {
|
|
3081
|
-
return !
|
|
3221
|
+
return !isNull2(getPointer(1, this));
|
|
3082
3222
|
}
|
|
3083
3223
|
_initNestedNodes(length) {
|
|
3084
3224
|
return initList(1, _Node._NestedNodes, length, this);
|
|
@@ -3100,7 +3240,7 @@ var Node = class _Node extends Struct {
|
|
|
3100
3240
|
return getList(2, _Node._Annotations, this);
|
|
3101
3241
|
}
|
|
3102
3242
|
_hasAnnotations() {
|
|
3103
|
-
return !
|
|
3243
|
+
return !isNull2(getPointer(2, this));
|
|
3104
3244
|
}
|
|
3105
3245
|
_initAnnotations(length) {
|
|
3106
3246
|
return initList(2, _Node._Annotations, length, this);
|
|
@@ -3222,7 +3362,7 @@ var Field_Slot = class extends Struct {
|
|
|
3222
3362
|
return getStruct(2, Type, this);
|
|
3223
3363
|
}
|
|
3224
3364
|
_hasType() {
|
|
3225
|
-
return !
|
|
3365
|
+
return !isNull2(getPointer(2, this));
|
|
3226
3366
|
}
|
|
3227
3367
|
_initType() {
|
|
3228
3368
|
return initStructAt(2, Type, this);
|
|
@@ -3240,7 +3380,7 @@ var Field_Slot = class extends Struct {
|
|
|
3240
3380
|
return getStruct(3, Value, this);
|
|
3241
3381
|
}
|
|
3242
3382
|
_hasDefaultValue() {
|
|
3243
|
-
return !
|
|
3383
|
+
return !isNull2(getPointer(3, this));
|
|
3244
3384
|
}
|
|
3245
3385
|
_initDefaultValue() {
|
|
3246
3386
|
return initStructAt(3, Value, this);
|
|
@@ -3399,7 +3539,7 @@ var Field = class _Field extends Struct {
|
|
|
3399
3539
|
return getList(1, _Field._Annotations, this);
|
|
3400
3540
|
}
|
|
3401
3541
|
_hasAnnotations() {
|
|
3402
|
-
return !
|
|
3542
|
+
return !isNull2(getPointer(1, this));
|
|
3403
3543
|
}
|
|
3404
3544
|
_initAnnotations(length) {
|
|
3405
3545
|
return initList(1, _Field._Annotations, length, this);
|
|
@@ -3504,7 +3644,7 @@ var Enumerant = class _Enumerant extends Struct {
|
|
|
3504
3644
|
return getList(1, _Enumerant._Annotations, this);
|
|
3505
3645
|
}
|
|
3506
3646
|
_hasAnnotations() {
|
|
3507
|
-
return !
|
|
3647
|
+
return !isNull2(getPointer(1, this));
|
|
3508
3648
|
}
|
|
3509
3649
|
_initAnnotations(length) {
|
|
3510
3650
|
return initList(1, _Enumerant._Annotations, length, this);
|
|
@@ -3541,7 +3681,7 @@ var Superclass = class extends Struct {
|
|
|
3541
3681
|
return getStruct(0, Brand, this);
|
|
3542
3682
|
}
|
|
3543
3683
|
_hasBrand() {
|
|
3544
|
-
return !
|
|
3684
|
+
return !isNull2(getPointer(0, this));
|
|
3545
3685
|
}
|
|
3546
3686
|
_initBrand() {
|
|
3547
3687
|
return initStructAt(0, Brand, this);
|
|
@@ -3596,7 +3736,7 @@ var Method = class _Method extends Struct {
|
|
|
3596
3736
|
return getList(4, _Method._ImplicitParameters, this);
|
|
3597
3737
|
}
|
|
3598
3738
|
_hasImplicitParameters() {
|
|
3599
|
-
return !
|
|
3739
|
+
return !isNull2(getPointer(4, this));
|
|
3600
3740
|
}
|
|
3601
3741
|
_initImplicitParameters(length) {
|
|
3602
3742
|
return initList(4, _Method._ImplicitParameters, length, this);
|
|
@@ -3634,7 +3774,7 @@ var Method = class _Method extends Struct {
|
|
|
3634
3774
|
return getStruct(2, Brand, this);
|
|
3635
3775
|
}
|
|
3636
3776
|
_hasParamBrand() {
|
|
3637
|
-
return !
|
|
3777
|
+
return !isNull2(getPointer(2, this));
|
|
3638
3778
|
}
|
|
3639
3779
|
_initParamBrand() {
|
|
3640
3780
|
return initStructAt(2, Brand, this);
|
|
@@ -3666,7 +3806,7 @@ var Method = class _Method extends Struct {
|
|
|
3666
3806
|
return getStruct(3, Brand, this);
|
|
3667
3807
|
}
|
|
3668
3808
|
_hasResultBrand() {
|
|
3669
|
-
return !
|
|
3809
|
+
return !isNull2(getPointer(3, this));
|
|
3670
3810
|
}
|
|
3671
3811
|
_initResultBrand() {
|
|
3672
3812
|
return initStructAt(3, Brand, this);
|
|
@@ -3684,7 +3824,7 @@ var Method = class _Method extends Struct {
|
|
|
3684
3824
|
return getList(1, _Method._Annotations, this);
|
|
3685
3825
|
}
|
|
3686
3826
|
_hasAnnotations() {
|
|
3687
|
-
return !
|
|
3827
|
+
return !isNull2(getPointer(1, this));
|
|
3688
3828
|
}
|
|
3689
3829
|
_initAnnotations(length) {
|
|
3690
3830
|
return initList(1, _Method._Annotations, length, this);
|
|
@@ -3715,7 +3855,7 @@ var Type_List = class extends Struct {
|
|
|
3715
3855
|
return getStruct(0, Type, this);
|
|
3716
3856
|
}
|
|
3717
3857
|
_hasElementType() {
|
|
3718
|
-
return !
|
|
3858
|
+
return !isNull2(getPointer(0, this));
|
|
3719
3859
|
}
|
|
3720
3860
|
_initElementType() {
|
|
3721
3861
|
return initStructAt(0, Type, this);
|
|
@@ -3752,7 +3892,7 @@ var Type_Enum = class extends Struct {
|
|
|
3752
3892
|
return getStruct(0, Brand, this);
|
|
3753
3893
|
}
|
|
3754
3894
|
_hasBrand() {
|
|
3755
|
-
return !
|
|
3895
|
+
return !isNull2(getPointer(0, this));
|
|
3756
3896
|
}
|
|
3757
3897
|
_initBrand() {
|
|
3758
3898
|
return initStructAt(0, Brand, this);
|
|
@@ -3789,7 +3929,7 @@ var Type_Struct = class extends Struct {
|
|
|
3789
3929
|
return getStruct(0, Brand, this);
|
|
3790
3930
|
}
|
|
3791
3931
|
_hasBrand() {
|
|
3792
|
-
return !
|
|
3932
|
+
return !isNull2(getPointer(0, this));
|
|
3793
3933
|
}
|
|
3794
3934
|
_initBrand() {
|
|
3795
3935
|
return initStructAt(0, Brand, this);
|
|
@@ -3826,7 +3966,7 @@ var Type_Interface = class extends Struct {
|
|
|
3826
3966
|
return getStruct(0, Brand, this);
|
|
3827
3967
|
}
|
|
3828
3968
|
_hasBrand() {
|
|
3829
|
-
return !
|
|
3969
|
+
return !isNull2(getPointer(0, this));
|
|
3830
3970
|
}
|
|
3831
3971
|
_initBrand() {
|
|
3832
3972
|
return initStructAt(0, Brand, this);
|
|
@@ -4317,7 +4457,7 @@ var Brand_Scope = class _Brand_Scope extends Struct {
|
|
|
4317
4457
|
return getList(0, _Brand_Scope._Bind, this);
|
|
4318
4458
|
}
|
|
4319
4459
|
_hasBind() {
|
|
4320
|
-
return !
|
|
4460
|
+
return !isNull2(getPointer(0, this));
|
|
4321
4461
|
}
|
|
4322
4462
|
_initBind(length) {
|
|
4323
4463
|
setUint16(8, 0, this);
|
|
@@ -4376,7 +4516,7 @@ var Brand_Binding = class extends Struct {
|
|
|
4376
4516
|
return getStruct(0, Type, this);
|
|
4377
4517
|
}
|
|
4378
4518
|
_hasType() {
|
|
4379
|
-
return !
|
|
4519
|
+
return !isNull2(getPointer(0, this));
|
|
4380
4520
|
}
|
|
4381
4521
|
_initType() {
|
|
4382
4522
|
setUint16(0, 1, this);
|
|
@@ -4424,7 +4564,7 @@ var Brand = class _Brand extends Struct {
|
|
|
4424
4564
|
return getList(0, _Brand._Scopes, this);
|
|
4425
4565
|
}
|
|
4426
4566
|
_hasScopes() {
|
|
4427
|
-
return !
|
|
4567
|
+
return !isNull2(getPointer(0, this));
|
|
4428
4568
|
}
|
|
4429
4569
|
_initScopes(length) {
|
|
4430
4570
|
return initList(0, _Brand._Scopes, length, this);
|
|
@@ -4640,7 +4780,7 @@ var Value = class extends Struct {
|
|
|
4640
4780
|
return getData(0, this);
|
|
4641
4781
|
}
|
|
4642
4782
|
_hasData() {
|
|
4643
|
-
return !
|
|
4783
|
+
return !isNull2(getPointer(0, this));
|
|
4644
4784
|
}
|
|
4645
4785
|
_initData(length) {
|
|
4646
4786
|
setUint16(0, 13, this);
|
|
@@ -4665,7 +4805,7 @@ var Value = class extends Struct {
|
|
|
4665
4805
|
return getPointer(0, this);
|
|
4666
4806
|
}
|
|
4667
4807
|
_hasList() {
|
|
4668
|
-
return !
|
|
4808
|
+
return !isNull2(getPointer(0, this));
|
|
4669
4809
|
}
|
|
4670
4810
|
get _isList() {
|
|
4671
4811
|
return getUint16(0, this) === 14;
|
|
@@ -4697,7 +4837,7 @@ var Value = class extends Struct {
|
|
|
4697
4837
|
return getPointer(0, this);
|
|
4698
4838
|
}
|
|
4699
4839
|
_hasStruct() {
|
|
4700
|
-
return !
|
|
4840
|
+
return !isNull2(getPointer(0, this));
|
|
4701
4841
|
}
|
|
4702
4842
|
get _isStruct() {
|
|
4703
4843
|
return getUint16(0, this) === 16;
|
|
@@ -4724,7 +4864,7 @@ var Value = class extends Struct {
|
|
|
4724
4864
|
return getPointer(0, this);
|
|
4725
4865
|
}
|
|
4726
4866
|
_hasAnyPointer() {
|
|
4727
|
-
return !
|
|
4867
|
+
return !isNull2(getPointer(0, this));
|
|
4728
4868
|
}
|
|
4729
4869
|
get _isAnyPointer() {
|
|
4730
4870
|
return getUint16(0, this) === 18;
|
|
@@ -4775,7 +4915,7 @@ var Annotation = class extends Struct {
|
|
|
4775
4915
|
return getStruct(1, Brand, this);
|
|
4776
4916
|
}
|
|
4777
4917
|
_hasBrand() {
|
|
4778
|
-
return !
|
|
4918
|
+
return !isNull2(getPointer(1, this));
|
|
4779
4919
|
}
|
|
4780
4920
|
_initBrand() {
|
|
4781
4921
|
return initStructAt(1, Brand, this);
|
|
@@ -4793,7 +4933,7 @@ var Annotation = class extends Struct {
|
|
|
4793
4933
|
return getStruct(0, Value, this);
|
|
4794
4934
|
}
|
|
4795
4935
|
_hasValue() {
|
|
4796
|
-
return !
|
|
4936
|
+
return !isNull2(getPointer(0, this));
|
|
4797
4937
|
}
|
|
4798
4938
|
_initValue() {
|
|
4799
4939
|
return initStructAt(0, Value, this);
|
|
@@ -4934,7 +5074,7 @@ var CodeGeneratorRequest_RequestedFile = class _CodeGeneratorRequest_RequestedFi
|
|
|
4934
5074
|
return getList(1, _CodeGeneratorRequest_RequestedFile._Imports, this);
|
|
4935
5075
|
}
|
|
4936
5076
|
_hasImports() {
|
|
4937
|
-
return !
|
|
5077
|
+
return !isNull2(getPointer(1, this));
|
|
4938
5078
|
}
|
|
4939
5079
|
_initImports(length) {
|
|
4940
5080
|
return initList(1, _CodeGeneratorRequest_RequestedFile._Imports, length, this);
|
|
@@ -4978,7 +5118,7 @@ var CodeGeneratorRequest = class _CodeGeneratorRequest extends Struct {
|
|
|
4978
5118
|
return getStruct(2, CapnpVersion, this);
|
|
4979
5119
|
}
|
|
4980
5120
|
_hasCapnpVersion() {
|
|
4981
|
-
return !
|
|
5121
|
+
return !isNull2(getPointer(2, this));
|
|
4982
5122
|
}
|
|
4983
5123
|
_initCapnpVersion() {
|
|
4984
5124
|
return initStructAt(2, CapnpVersion, this);
|
|
@@ -5001,7 +5141,7 @@ var CodeGeneratorRequest = class _CodeGeneratorRequest extends Struct {
|
|
|
5001
5141
|
return getList(0, _CodeGeneratorRequest._Nodes, this);
|
|
5002
5142
|
}
|
|
5003
5143
|
_hasNodes() {
|
|
5004
|
-
return !
|
|
5144
|
+
return !isNull2(getPointer(0, this));
|
|
5005
5145
|
}
|
|
5006
5146
|
_initNodes(length) {
|
|
5007
5147
|
return initList(0, _CodeGeneratorRequest._Nodes, length, this);
|
|
@@ -5024,7 +5164,7 @@ var CodeGeneratorRequest = class _CodeGeneratorRequest extends Struct {
|
|
|
5024
5164
|
return getList(3, _CodeGeneratorRequest._SourceInfo, this);
|
|
5025
5165
|
}
|
|
5026
5166
|
_hasSourceInfo() {
|
|
5027
|
-
return !
|
|
5167
|
+
return !isNull2(getPointer(3, this));
|
|
5028
5168
|
}
|
|
5029
5169
|
_initSourceInfo(length) {
|
|
5030
5170
|
return initList(3, _CodeGeneratorRequest._SourceInfo, length, this);
|
|
@@ -5046,7 +5186,7 @@ var CodeGeneratorRequest = class _CodeGeneratorRequest extends Struct {
|
|
|
5046
5186
|
return getList(1, _CodeGeneratorRequest._RequestedFiles, this);
|
|
5047
5187
|
}
|
|
5048
5188
|
_hasRequestedFiles() {
|
|
5049
|
-
return !
|
|
5189
|
+
return !isNull2(getPointer(1, this));
|
|
5050
5190
|
}
|
|
5051
5191
|
_initRequestedFiles(length) {
|
|
5052
5192
|
return initList(1, _CodeGeneratorRequest._RequestedFiles, length, this);
|
|
@@ -7401,50 +7541,6 @@ function toArray(array) {
|
|
|
7401
7541
|
}
|
|
7402
7542
|
__name(toArray, "toArray");
|
|
7403
7543
|
|
|
7404
|
-
// ../type-checks/src/get-object-tag.ts
|
|
7405
|
-
var getObjectTag = /* @__PURE__ */ __name((value) => {
|
|
7406
|
-
if (value == null) {
|
|
7407
|
-
return value === void 0 ? "[object Undefined]" : "[object Null]";
|
|
7408
|
-
}
|
|
7409
|
-
return Object.prototype.toString.call(value);
|
|
7410
|
-
}, "getObjectTag");
|
|
7411
|
-
|
|
7412
|
-
// ../type-checks/src/is-plain-object.ts
|
|
7413
|
-
var isObjectLike = /* @__PURE__ */ __name((obj) => {
|
|
7414
|
-
return typeof obj === "object" && obj !== null;
|
|
7415
|
-
}, "isObjectLike");
|
|
7416
|
-
var isPlainObject = /* @__PURE__ */ __name((obj) => {
|
|
7417
|
-
if (!isObjectLike(obj) || getObjectTag(obj) !== "[object Object]") {
|
|
7418
|
-
return false;
|
|
7419
|
-
}
|
|
7420
|
-
if (Object.getPrototypeOf(obj) === null) {
|
|
7421
|
-
return true;
|
|
7422
|
-
}
|
|
7423
|
-
let proto = obj;
|
|
7424
|
-
while (Object.getPrototypeOf(proto) !== null) {
|
|
7425
|
-
proto = Object.getPrototypeOf(proto);
|
|
7426
|
-
}
|
|
7427
|
-
return Object.getPrototypeOf(obj) === proto;
|
|
7428
|
-
}, "isPlainObject");
|
|
7429
|
-
|
|
7430
|
-
// ../type-checks/src/is-object.ts
|
|
7431
|
-
var isObject = /* @__PURE__ */ __name((value) => {
|
|
7432
|
-
try {
|
|
7433
|
-
return typeof value === "object" || Boolean(value) && value?.constructor === Object || isPlainObject(value);
|
|
7434
|
-
} catch {
|
|
7435
|
-
return false;
|
|
7436
|
-
}
|
|
7437
|
-
}, "isObject");
|
|
7438
|
-
|
|
7439
|
-
// ../type-checks/src/is-string.ts
|
|
7440
|
-
var isString = /* @__PURE__ */ __name((value) => {
|
|
7441
|
-
try {
|
|
7442
|
-
return typeof value === "string";
|
|
7443
|
-
} catch {
|
|
7444
|
-
return false;
|
|
7445
|
-
}
|
|
7446
|
-
}, "isString");
|
|
7447
|
-
|
|
7448
7544
|
// ../json/src/storm-json.ts
|
|
7449
7545
|
var import_jsonc_parser2 = require("jsonc-parser");
|
|
7450
7546
|
var import_node_buffer = require("buffer");
|
|
@@ -7743,20 +7839,6 @@ ${codeFrameColumns(input, {
|
|
|
7743
7839
|
}
|
|
7744
7840
|
__name(formatParseError, "formatParseError");
|
|
7745
7841
|
|
|
7746
|
-
// ../type-checks/src/is-number.ts
|
|
7747
|
-
var isNumber = /* @__PURE__ */ __name((value) => {
|
|
7748
|
-
try {
|
|
7749
|
-
return value instanceof Number || typeof value === "number" || Number(value) === value;
|
|
7750
|
-
} catch {
|
|
7751
|
-
return false;
|
|
7752
|
-
}
|
|
7753
|
-
}, "isNumber");
|
|
7754
|
-
|
|
7755
|
-
// ../type-checks/src/is-undefined.ts
|
|
7756
|
-
var isUndefined = /* @__PURE__ */ __name((value) => {
|
|
7757
|
-
return value === void 0;
|
|
7758
|
-
}, "isUndefined");
|
|
7759
|
-
|
|
7760
7842
|
// ../json/src/utils/stringify.ts
|
|
7761
7843
|
var invalidKeyChars = [
|
|
7762
7844
|
"@",
|
|
@@ -7951,15 +8033,6 @@ StormJSON.instance.registerCustom({
|
|
|
7951
8033
|
deserialize: /* @__PURE__ */ __name((v) => import_node_buffer.Buffer.from(v, "base64"), "deserialize")
|
|
7952
8034
|
}, "Bytes");
|
|
7953
8035
|
|
|
7954
|
-
// ../type-checks/src/is-error.ts
|
|
7955
|
-
var isError = /* @__PURE__ */ __name((obj) => {
|
|
7956
|
-
if (!isObject(obj)) {
|
|
7957
|
-
return false;
|
|
7958
|
-
}
|
|
7959
|
-
const tag = getObjectTag(obj);
|
|
7960
|
-
return tag === "[object Error]" || tag === "[object DOMException]" || typeof obj?.message === "string" && typeof obj?.name === "string" && !isPlainObject(obj);
|
|
7961
|
-
}, "isError");
|
|
7962
|
-
|
|
7963
8036
|
// ../fs/src/read-file.ts
|
|
7964
8037
|
var import_node_fs2 = require("fs");
|
|
7965
8038
|
var import_promises2 = require("fs/promises");
|