@peerbit/indexer-interface 2.0.14 → 2.1.1-000e3f1
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/dist/src/id.d.ts +1 -1
- package/dist/src/id.d.ts.map +1 -1
- package/dist/src/id.js +313 -157
- package/dist/src/id.js.map +1 -1
- package/dist/src/query.d.ts.map +1 -1
- package/dist/src/query.js +468 -261
- package/dist/src/query.js.map +1 -1
- package/dist/src/utils.d.ts +1 -1
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/src/utils.js +37 -4
- package/dist/src/utils.js.map +1 -1
- package/package.json +4 -4
- package/src/id.ts +23 -10
- package/src/query.ts +0 -1
- package/src/utils.ts +62 -4
package/dist/src/id.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ export declare class LargeIntegerKey extends IdKey {
|
|
|
45
45
|
constructor(key: bigint);
|
|
46
46
|
get primitive(): bigint;
|
|
47
47
|
}
|
|
48
|
-
export type Ideable = string | number | bigint | Uint8Array;
|
|
48
|
+
export type Ideable = string | number | bigint | Uint8Array | ArrayBufferView;
|
|
49
49
|
export declare const toId: (obj: Ideable) => IdKey;
|
|
50
50
|
export declare const toIdeable: (key: IdKey | Ideable) => string | number | bigint | Uint8Array;
|
|
51
51
|
export declare const checkId: (obj: Ideable) => void;
|
package/dist/src/id.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../../src/id.ts"],"names":[],"mappings":"AAQA,8BAAsB,cAAc;CAAG;AAEvC,qBACa,WAAY,SAAQ,cAAc;IAE9C,MAAM,EAAE,MAAM,CAAC;gBAEH,MAAM,EAAE,MAAM;CAI1B;AAED,8BACsB,WAAY,SAAQ,cAAc;IACvD,QAAQ,KAAK,KAAK,IAAI,MAAM,GAAG,MAAM,CAAC;CACtC;AAED,8BACsB,YAAa,SAAQ,WAAW;CAAG;AAEzD,qBACa,oBAAqB,SAAQ,YAAY;IA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AAC;AAEF,eAAO,MAAM,SAAS,GACrB,KAAK,KAAK,GAAG,OAAO,KAClB,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,UAS7B,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,KAAK,OAAO,SAyBnC,CAAC"}
|
package/dist/src/id.js
CHANGED
|
@@ -1,129 +1,249 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
2
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
3
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
4
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
5
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
6
|
+
var _, done = false;
|
|
7
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
8
|
+
var context = {};
|
|
9
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
10
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
11
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
12
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
13
|
+
if (kind === "accessor") {
|
|
14
|
+
if (result === void 0) continue;
|
|
15
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
16
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
17
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
18
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
19
|
+
}
|
|
20
|
+
else if (_ = accept(result)) {
|
|
21
|
+
if (kind === "field") initializers.unshift(_);
|
|
22
|
+
else descriptor[key] = _;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
26
|
+
done = true;
|
|
6
27
|
};
|
|
7
|
-
var
|
|
8
|
-
|
|
28
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
29
|
+
var useValue = arguments.length > 2;
|
|
30
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
31
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
32
|
+
}
|
|
33
|
+
return useValue ? value : void 0;
|
|
9
34
|
};
|
|
10
35
|
import { field, variant } from "@dao-xyz/borsh";
|
|
11
36
|
import { toBase64 } from "@peerbit/crypto";
|
|
12
37
|
import { decodeUint8Array, encodeUint8Array, encodingLength, } from "uint8-varint";
|
|
13
38
|
export class PrimitiveValue {
|
|
14
39
|
}
|
|
15
|
-
let StringValue =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
40
|
+
let StringValue = (() => {
|
|
41
|
+
let _classDecorators = [variant(0)];
|
|
42
|
+
let _classDescriptor;
|
|
43
|
+
let _classExtraInitializers = [];
|
|
44
|
+
let _classThis;
|
|
45
|
+
let _classSuper = PrimitiveValue;
|
|
46
|
+
let _string_decorators;
|
|
47
|
+
let _string_initializers = [];
|
|
48
|
+
let _string_extraInitializers = [];
|
|
49
|
+
var StringValue = class extends _classSuper {
|
|
50
|
+
static { _classThis = this; }
|
|
51
|
+
static {
|
|
52
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
53
|
+
_string_decorators = [field({ type: "string" })];
|
|
54
|
+
__esDecorate(null, null, _string_decorators, { kind: "field", name: "string", static: false, private: false, access: { has: obj => "string" in obj, get: obj => obj.string, set: (obj, value) => { obj.string = value; } }, metadata: _metadata }, _string_initializers, _string_extraInitializers);
|
|
55
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
56
|
+
StringValue = _classThis = _classDescriptor.value;
|
|
57
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
58
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
59
|
+
}
|
|
60
|
+
string = __runInitializers(this, _string_initializers, void 0);
|
|
61
|
+
constructor(string) {
|
|
62
|
+
super();
|
|
63
|
+
__runInitializers(this, _string_extraInitializers);
|
|
64
|
+
this.string = string;
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
return StringValue = _classThis;
|
|
68
|
+
})();
|
|
30
69
|
export { StringValue };
|
|
31
|
-
let NumberValue =
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
70
|
+
let NumberValue = (() => {
|
|
71
|
+
let _classDecorators = [variant(1)];
|
|
72
|
+
let _classDescriptor;
|
|
73
|
+
let _classExtraInitializers = [];
|
|
74
|
+
let _classThis;
|
|
75
|
+
let _classSuper = PrimitiveValue;
|
|
76
|
+
var NumberValue = class extends _classSuper {
|
|
77
|
+
static { _classThis = this; }
|
|
78
|
+
static {
|
|
79
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
80
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
81
|
+
NumberValue = _classThis = _classDescriptor.value;
|
|
82
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
83
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
return NumberValue = _classThis;
|
|
87
|
+
})();
|
|
36
88
|
export { NumberValue };
|
|
37
|
-
let IntegerValue =
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
89
|
+
let IntegerValue = (() => {
|
|
90
|
+
let _classDecorators = [variant(0)];
|
|
91
|
+
let _classDescriptor;
|
|
92
|
+
let _classExtraInitializers = [];
|
|
93
|
+
let _classThis;
|
|
94
|
+
let _classSuper = NumberValue;
|
|
95
|
+
var IntegerValue = class extends _classSuper {
|
|
96
|
+
static { _classThis = this; }
|
|
97
|
+
static {
|
|
98
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
99
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
100
|
+
IntegerValue = _classThis = _classDescriptor.value;
|
|
101
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
102
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
return IntegerValue = _classThis;
|
|
106
|
+
})();
|
|
42
107
|
export { IntegerValue };
|
|
43
|
-
let UnsignedIntegerValue =
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
108
|
+
let UnsignedIntegerValue = (() => {
|
|
109
|
+
let _classDecorators = [variant(0)];
|
|
110
|
+
let _classDescriptor;
|
|
111
|
+
let _classExtraInitializers = [];
|
|
112
|
+
let _classThis;
|
|
113
|
+
let _classSuper = IntegerValue;
|
|
114
|
+
let _number_decorators;
|
|
115
|
+
let _number_initializers = [];
|
|
116
|
+
let _number_extraInitializers = [];
|
|
117
|
+
var UnsignedIntegerValue = class extends _classSuper {
|
|
118
|
+
static { _classThis = this; }
|
|
119
|
+
static {
|
|
120
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
121
|
+
_number_decorators = [field({ type: "u32" })];
|
|
122
|
+
__esDecorate(null, null, _number_decorators, { kind: "field", name: "number", static: false, private: false, access: { has: obj => "number" in obj, get: obj => obj.number, set: (obj, value) => { obj.number = value; } }, metadata: _metadata }, _number_initializers, _number_extraInitializers);
|
|
123
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
124
|
+
UnsignedIntegerValue = _classThis = _classDescriptor.value;
|
|
125
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
126
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
127
|
+
}
|
|
128
|
+
number = __runInitializers(this, _number_initializers, void 0);
|
|
129
|
+
constructor(number) {
|
|
130
|
+
super();
|
|
131
|
+
__runInitializers(this, _number_extraInitializers);
|
|
132
|
+
if (!Number.isInteger(number) || number > 4294967295 || number < 0) {
|
|
133
|
+
throw new Error("Number is not u32: " + number);
|
|
134
|
+
}
|
|
135
|
+
this.number = number;
|
|
136
|
+
}
|
|
137
|
+
get value() {
|
|
138
|
+
return this.number;
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
return UnsignedIntegerValue = _classThis;
|
|
142
|
+
})();
|
|
64
143
|
export { UnsignedIntegerValue };
|
|
65
|
-
let BigUnsignedIntegerValue =
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
144
|
+
let BigUnsignedIntegerValue = (() => {
|
|
145
|
+
let _classDecorators = [variant(1)];
|
|
146
|
+
let _classDescriptor;
|
|
147
|
+
let _classExtraInitializers = [];
|
|
148
|
+
let _classThis;
|
|
149
|
+
let _classSuper = IntegerValue;
|
|
150
|
+
let _number_decorators;
|
|
151
|
+
let _number_initializers = [];
|
|
152
|
+
let _number_extraInitializers = [];
|
|
153
|
+
var BigUnsignedIntegerValue = class extends _classSuper {
|
|
154
|
+
static { _classThis = this; }
|
|
155
|
+
static {
|
|
156
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
157
|
+
_number_decorators = [field({ type: "u64" })];
|
|
158
|
+
__esDecorate(null, null, _number_decorators, { kind: "field", name: "number", static: false, private: false, access: { has: obj => "number" in obj, get: obj => obj.number, set: (obj, value) => { obj.number = value; } }, metadata: _metadata }, _number_initializers, _number_extraInitializers);
|
|
159
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
160
|
+
BigUnsignedIntegerValue = _classThis = _classDescriptor.value;
|
|
161
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
162
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
163
|
+
}
|
|
164
|
+
number = __runInitializers(this, _number_initializers, void 0);
|
|
165
|
+
constructor(number) {
|
|
166
|
+
super();
|
|
167
|
+
__runInitializers(this, _number_extraInitializers);
|
|
168
|
+
if (number > 18446744073709551615n || number < 0n) {
|
|
169
|
+
throw new Error("Number is not u64");
|
|
170
|
+
}
|
|
171
|
+
this.number = number;
|
|
172
|
+
}
|
|
173
|
+
get value() {
|
|
174
|
+
return this.number;
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
return BigUnsignedIntegerValue = _classThis;
|
|
178
|
+
})();
|
|
86
179
|
export { BigUnsignedIntegerValue };
|
|
87
180
|
export class IdKey {
|
|
88
181
|
}
|
|
89
|
-
let StringKey =
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
182
|
+
let StringKey = (() => {
|
|
183
|
+
let _classDecorators = [variant(0)];
|
|
184
|
+
let _classDescriptor;
|
|
185
|
+
let _classExtraInitializers = [];
|
|
186
|
+
let _classThis;
|
|
187
|
+
let _classSuper = IdKey;
|
|
188
|
+
let _key_decorators;
|
|
189
|
+
let _key_initializers = [];
|
|
190
|
+
let _key_extraInitializers = [];
|
|
191
|
+
var StringKey = class extends _classSuper {
|
|
192
|
+
static { _classThis = this; }
|
|
193
|
+
static {
|
|
194
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
195
|
+
_key_decorators = [field({ type: "string" })];
|
|
196
|
+
__esDecorate(null, null, _key_decorators, { kind: "field", name: "key", static: false, private: false, access: { has: obj => "key" in obj, get: obj => obj.key, set: (obj, value) => { obj.key = value; } }, metadata: _metadata }, _key_initializers, _key_extraInitializers);
|
|
197
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
198
|
+
StringKey = _classThis = _classDescriptor.value;
|
|
199
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
200
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
201
|
+
}
|
|
202
|
+
key = __runInitializers(this, _key_initializers, void 0);
|
|
203
|
+
constructor(key) {
|
|
204
|
+
super();
|
|
205
|
+
__runInitializers(this, _key_extraInitializers);
|
|
206
|
+
this.key = key;
|
|
207
|
+
}
|
|
208
|
+
get primitive() {
|
|
209
|
+
return this.key;
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
return StringKey = _classThis;
|
|
213
|
+
})();
|
|
107
214
|
export { StringKey };
|
|
108
|
-
let Uint8ArrayKey =
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
215
|
+
let Uint8ArrayKey = (() => {
|
|
216
|
+
let _classDecorators = [variant(1)];
|
|
217
|
+
let _classDescriptor;
|
|
218
|
+
let _classExtraInitializers = [];
|
|
219
|
+
let _classThis;
|
|
220
|
+
let _classSuper = IdKey;
|
|
221
|
+
let _key_decorators;
|
|
222
|
+
let _key_initializers = [];
|
|
223
|
+
let _key_extraInitializers = [];
|
|
224
|
+
var Uint8ArrayKey = class extends _classSuper {
|
|
225
|
+
static { _classThis = this; }
|
|
226
|
+
static {
|
|
227
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
228
|
+
_key_decorators = [field({ type: Uint8Array })];
|
|
229
|
+
__esDecorate(null, null, _key_decorators, { kind: "field", name: "key", static: false, private: false, access: { has: obj => "key" in obj, get: obj => obj.key, set: (obj, value) => { obj.key = value; } }, metadata: _metadata }, _key_initializers, _key_extraInitializers);
|
|
230
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
231
|
+
Uint8ArrayKey = _classThis = _classDescriptor.value;
|
|
232
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
233
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
234
|
+
}
|
|
235
|
+
key = __runInitializers(this, _key_initializers, void 0);
|
|
236
|
+
constructor(key) {
|
|
237
|
+
super();
|
|
238
|
+
this.key = key;
|
|
239
|
+
}
|
|
240
|
+
_keyString = __runInitializers(this, _key_extraInitializers);
|
|
241
|
+
get primitive() {
|
|
242
|
+
return this._keyString || (this._keyString = toBase64(this.key));
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
return Uint8ArrayKey = _classThis;
|
|
246
|
+
})();
|
|
127
247
|
export { Uint8ArrayKey };
|
|
128
248
|
const varint53 = {
|
|
129
249
|
deserialize: (reader) => {
|
|
@@ -138,45 +258,71 @@ const varint53 = {
|
|
|
138
258
|
writer.totalSize += encodingLength(value);
|
|
139
259
|
},
|
|
140
260
|
};
|
|
141
|
-
let IntegerKey =
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
261
|
+
let IntegerKey = (() => {
|
|
262
|
+
let _classDecorators = [variant(2)];
|
|
263
|
+
let _classDescriptor;
|
|
264
|
+
let _classExtraInitializers = [];
|
|
265
|
+
let _classThis;
|
|
266
|
+
let _classSuper = IdKey;
|
|
267
|
+
let _key_decorators;
|
|
268
|
+
let _key_initializers = [];
|
|
269
|
+
let _key_extraInitializers = [];
|
|
270
|
+
var IntegerKey = class extends _classSuper {
|
|
271
|
+
static { _classThis = this; }
|
|
272
|
+
static {
|
|
273
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
274
|
+
_key_decorators = [field(varint53)];
|
|
275
|
+
__esDecorate(null, null, _key_decorators, { kind: "field", name: "key", static: false, private: false, access: { has: obj => "key" in obj, get: obj => obj.key, set: (obj, value) => { obj.key = value; } }, metadata: _metadata }, _key_initializers, _key_extraInitializers);
|
|
276
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
277
|
+
IntegerKey = _classThis = _classDescriptor.value;
|
|
278
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
279
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
280
|
+
}
|
|
281
|
+
key = __runInitializers(this, _key_initializers, void 0);
|
|
282
|
+
constructor(key) {
|
|
283
|
+
super();
|
|
284
|
+
__runInitializers(this, _key_extraInitializers);
|
|
285
|
+
this.key = key;
|
|
286
|
+
}
|
|
287
|
+
get primitive() {
|
|
288
|
+
return this.key;
|
|
289
|
+
}
|
|
290
|
+
};
|
|
291
|
+
return IntegerKey = _classThis;
|
|
292
|
+
})();
|
|
160
293
|
export { IntegerKey };
|
|
161
|
-
let LargeIntegerKey =
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
294
|
+
let LargeIntegerKey = (() => {
|
|
295
|
+
let _classDecorators = [variant(3)];
|
|
296
|
+
let _classDescriptor;
|
|
297
|
+
let _classExtraInitializers = [];
|
|
298
|
+
let _classThis;
|
|
299
|
+
let _classSuper = IdKey;
|
|
300
|
+
let _key_decorators;
|
|
301
|
+
let _key_initializers = [];
|
|
302
|
+
let _key_extraInitializers = [];
|
|
303
|
+
var LargeIntegerKey = class extends _classSuper {
|
|
304
|
+
static { _classThis = this; }
|
|
305
|
+
static {
|
|
306
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
307
|
+
_key_decorators = [field({ type: "u64" })];
|
|
308
|
+
__esDecorate(null, null, _key_decorators, { kind: "field", name: "key", static: false, private: false, access: { has: obj => "key" in obj, get: obj => obj.key, set: (obj, value) => { obj.key = value; } }, metadata: _metadata }, _key_initializers, _key_extraInitializers);
|
|
309
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
310
|
+
LargeIntegerKey = _classThis = _classDescriptor.value;
|
|
311
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
312
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
313
|
+
}
|
|
314
|
+
key = __runInitializers(this, _key_initializers, void 0);
|
|
315
|
+
constructor(key) {
|
|
316
|
+
super();
|
|
317
|
+
__runInitializers(this, _key_extraInitializers);
|
|
318
|
+
this.key = key;
|
|
319
|
+
}
|
|
320
|
+
get primitive() {
|
|
321
|
+
return this.key;
|
|
322
|
+
}
|
|
323
|
+
};
|
|
324
|
+
return LargeIntegerKey = _classThis;
|
|
325
|
+
})();
|
|
180
326
|
export { LargeIntegerKey };
|
|
181
327
|
const idKeyTypes = new Set(["string", "number", "bigint"]);
|
|
182
328
|
const u64Max = 18446744073709551615n;
|
|
@@ -196,22 +342,30 @@ export const toId = (obj) => {
|
|
|
196
342
|
". Provided value: " +
|
|
197
343
|
obj);
|
|
198
344
|
}
|
|
199
|
-
if (obj instanceof Uint8Array) {
|
|
200
|
-
|
|
345
|
+
if (obj instanceof Uint8Array || ArrayBuffer.isView(obj)) {
|
|
346
|
+
// Support cross-realm typed arrays (e.g. jsdom) by normalizing to a local Uint8Array.
|
|
347
|
+
const bytes = obj instanceof Uint8Array
|
|
348
|
+
? obj
|
|
349
|
+
: new Uint8Array(obj.buffer, obj.byteOffset, obj.byteLength);
|
|
350
|
+
return new Uint8ArrayKey(bytes);
|
|
201
351
|
}
|
|
202
352
|
throw new Error("Unexpected index key: " +
|
|
203
353
|
typeof obj +
|
|
204
|
-
", expected: string, number, bigint or
|
|
354
|
+
", expected: string, number, bigint, Uint8Array or ArrayBufferView");
|
|
205
355
|
};
|
|
206
356
|
export const toIdeable = (key) => {
|
|
207
|
-
|
|
208
|
-
|
|
357
|
+
const value = key instanceof IdKey ? key.key : key;
|
|
358
|
+
if (value instanceof Uint8Array) {
|
|
359
|
+
return value;
|
|
360
|
+
}
|
|
361
|
+
if (ArrayBuffer.isView(value)) {
|
|
362
|
+
return new Uint8Array(value.buffer, value.byteOffset, value.byteLength);
|
|
209
363
|
}
|
|
210
|
-
return
|
|
364
|
+
return value;
|
|
211
365
|
};
|
|
212
366
|
export const checkId = (obj) => {
|
|
213
367
|
if (obj == null) {
|
|
214
|
-
throw new Error(`The provided key value is null or undefined, expecting string, number, bigint, or
|
|
368
|
+
throw new Error(`The provided key value is null or undefined, expecting string, number, bigint, Uint8array, or ArrayBufferView`);
|
|
215
369
|
}
|
|
216
370
|
const type = typeof obj;
|
|
217
371
|
if (type === "number") {
|
|
@@ -219,7 +373,9 @@ export const checkId = (obj) => {
|
|
|
219
373
|
throw new Error(`The provided key number value is not an integer`);
|
|
220
374
|
}
|
|
221
375
|
}
|
|
222
|
-
if (idKeyTypes.has(type) ||
|
|
376
|
+
if (idKeyTypes.has(type) ||
|
|
377
|
+
obj instanceof Uint8Array ||
|
|
378
|
+
ArrayBuffer.isView(obj)) {
|
|
223
379
|
return;
|
|
224
380
|
}
|
|
225
381
|
throw new Error(`Key is not ${[...idKeyTypes]}, provided key value type: ${typeof obj}`);
|
package/dist/src/id.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"id.js","sourceRoot":"","sources":["../../src/id.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"id.js","sourceRoot":"","sources":["../../src/id.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EACN,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,GACd,MAAM,cAAc,CAAC;AAEtB,MAAM,OAAgB,cAAc;CAAG;IAG1B,WAAW;4BADvB,OAAO,CAAC,CAAC,CAAC;;;;sBACsB,cAAc;;;;2BAAtB,SAAQ,WAAc;;;;kCAC7C,KAAK,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;YAC1B,oKAAA,MAAM,6BAAN,MAAM,uFAAS;YAFhB,6KAQC;;;YARY,uDAAW;;QAEvB,MAAM,yDAAS;QAEf,YAAY,MAAc;YACzB,KAAK,EAAE,CAAC;;YACR,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;SACrB;;;;SAPW,WAAW;IAWF,WAAW;4BADhC,OAAO,CAAC,CAAC,CAAC;;;;sBAC+B,cAAc;2BAAtB,SAAQ,WAAc;;;;YAAxD,6KAEC;;;YAFqB,uDAAW;;;;;SAAX,WAAW;IAKX,YAAY;4BADjC,OAAO,CAAC,CAAC,CAAC;;;;sBACgC,WAAW;4BAAnB,SAAQ,WAAW;;;;YAAtD,6KAAyD;;;YAAnC,uDAAY;;;;;SAAZ,YAAY;IAGrB,oBAAoB;4BADhC,OAAO,CAAC,CAAC,CAAC;;;;sBAC+B,YAAY;;;;oCAApB,SAAQ,WAAY;;;;kCACpD,K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AAI,UAAU,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IACzE,CAAC;IACD,OAAO,KAAK,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,GAAY,EAAE,EAAE;IACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CACd,+GAA+G,CAC/G,CAAC;IACH,CAAC;IACD,MAAM,IAAI,GAAG,OAAO,GAAG,CAAC;IAExB,IAAI,IAAI,KAAK,QAAQ,EAAE,CAAC;QACvB,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC;YAC5B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;QACpE,CAAC;IACF,CAAC;IAED,IACC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC;QACpB,GAAG,YAAY,UAAU;QACzB,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,EACtB,CAAC;QACF,OAAO;IACR,CAAC;IAED,MAAM,IAAI,KAAK,CACd,cAAc,CAAC,GAAG,UAAU,CAAC,8BAA8B,OAAO,GAAG,EAAE,CACvE,CAAC;AACH,CAAC,CAAC"}
|
package/dist/src/query.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/query.ts"],"names":[],"mappings":"AAGA,OAAO,EAEN,YAAY,EAEZ,MAAM,SAAS,CAAC;AAEjB,oBAAY,OAAO;IAClB,KAAK,IAAI;IACT,OAAO,IAAI;IACX,cAAc,IAAI;IAClB,IAAI,IAAI;IACR,WAAW,IAAI;CACf;AACD,eAAO,MAAM,OAAO,GACnB,MAAM,MAAM,GAAG,MAAM,EACrB,SAAS,OAAO,EAChB,OAAO,MAAM,GAAG,MAAM,YAmBtB,CAAC;AAIF,8BAAsB,KAAK;IAC1B,KAAK,IACq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