@synnaxlabs/client 0.33.0 → 0.34.0
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/.turbo/turbo-build.log +6 -6
- package/dist/auth/auth.d.ts.map +1 -1
- package/dist/channel/writer.d.ts.map +1 -1
- package/dist/client.cjs +26 -26
- package/dist/client.js +235 -190
- package/dist/control/client.d.ts.map +1 -1
- package/dist/control/state.d.ts.map +1 -1
- package/dist/errors.d.ts +3 -3
- package/dist/errors.d.ts.map +1 -1
- package/dist/framer/adapter.d.ts.map +1 -1
- package/dist/framer/client.d.ts.map +1 -1
- package/dist/framer/deleter.d.ts.map +1 -1
- package/dist/framer/frame.d.ts.map +1 -1
- package/dist/framer/writer.d.ts.map +1 -1
- package/dist/hardware/device/client.d.ts.map +1 -1
- package/dist/hardware/device/payload.d.ts.map +1 -1
- package/dist/hardware/rack/client.d.ts.map +1 -1
- package/dist/hardware/task/client.d.ts +1 -1
- package/dist/hardware/task/client.d.ts.map +1 -1
- package/dist/hardware/task/ni/types.d.ts.map +1 -1
- package/dist/hardware/task/payload.d.ts.map +1 -1
- package/dist/label/client.d.ts.map +1 -1
- package/dist/ontology/client.d.ts.map +1 -1
- package/dist/ontology/payload.d.ts.map +1 -1
- package/dist/ranger/alias.d.ts.map +1 -1
- package/dist/ranger/client.d.ts.map +1 -1
- package/dist/ranger/kv.d.ts.map +1 -1
- package/dist/ranger/payload.d.ts.map +1 -1
- package/dist/util/telem.d.ts.map +1 -1
- package/dist/workspace/lineplot/payload.d.ts.map +1 -1
- package/dist/workspace/log/payload.d.ts.map +1 -1
- package/dist/workspace/payload.d.ts.map +1 -1
- package/dist/workspace/schematic/payload.d.ts.map +1 -1
- package/eslint.config.js +1 -1
- package/package.json +11 -11
- package/src/access/policy/policy.spec.ts +2 -4
- package/src/auth/auth.spec.ts +1 -1
- package/src/auth/auth.ts +17 -18
- package/src/channel/writer.ts +2 -2
- package/src/connection/checker.ts +1 -1
- package/src/control/client.ts +1 -1
- package/src/control/state.ts +1 -1
- package/src/errors.spec.ts +1 -1
- package/src/errors.ts +14 -15
- package/src/framer/adapter.ts +5 -6
- package/src/framer/client.ts +9 -4
- package/src/framer/deleter.ts +1 -1
- package/src/framer/frame.ts +9 -11
- package/src/framer/iterator.spec.ts +2 -3
- package/src/framer/writer.ts +1 -1
- package/src/hardware/device/client.ts +3 -3
- package/src/hardware/device/payload.ts +1 -1
- package/src/hardware/rack/client.ts +3 -3
- package/src/hardware/task/client.ts +13 -11
- package/src/hardware/task/ni/types.ts +1 -1
- package/src/hardware/task/payload.ts +1 -1
- package/src/hardware/task/task.spec.ts +1 -1
- package/src/label/client.ts +1 -1
- package/src/ontology/client.ts +1 -3
- package/src/ontology/group/payload.ts +2 -2
- package/src/ontology/payload.ts +1 -1
- package/src/ranger/alias.ts +2 -3
- package/src/ranger/client.ts +7 -9
- package/src/ranger/kv.ts +2 -2
- package/src/ranger/payload.ts +2 -2
- package/src/ranger/ranger.spec.ts +2 -2
- package/src/user/user.spec.ts +1 -2
- package/src/util/telem.ts +1 -3
- package/src/workspace/lineplot/payload.ts +1 -1
- package/src/workspace/log/payload.ts +1 -1
- package/src/workspace/payload.ts +1 -1
- package/src/workspace/schematic/payload.ts +1 -1
package/dist/client.js
CHANGED
|
@@ -3,7 +3,7 @@ var La = (r, e, t) => e in r ? Za(r, e, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var c = (r, e, t) => La(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import { z as s } from "zod";
|
|
5
5
|
const b = (r) => Array.isArray(r) ? r : [r];
|
|
6
|
-
var _a = Object.defineProperty, Ya = (r, e, t) => e in r ? _a(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t,
|
|
6
|
+
var _a = Object.defineProperty, Ya = (r, e, t) => e in r ? _a(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, $ = (r, e, t) => Ya(r, typeof e != "symbol" ? e + "" : e, t);
|
|
7
7
|
const qa = (r) => {
|
|
8
8
|
const e = r.replace(/_[a-z]/g, (t) => t[1].toUpperCase());
|
|
9
9
|
return e.length > 1 && e[0] === e[0].toUpperCase() && e[1] === e[1].toUpperCase() || e.length === 0 ? e : e[0].toLowerCase() + e.slice(1);
|
|
@@ -24,11 +24,15 @@ const qa = (r) => {
|
|
|
24
24
|
}), i;
|
|
25
25
|
};
|
|
26
26
|
return e;
|
|
27
|
-
}, Cs = xs(qa), za = (r) =>
|
|
27
|
+
}, Cs = xs(qa), za = (r) => (
|
|
28
|
+
// Don't convert the first character and don't convert a character that is after a
|
|
29
|
+
// non-alphanumeric character
|
|
30
|
+
r.replace(/([a-z0-9])([A-Z])/g, (e, t, n) => `${t}_${n.toLowerCase()}`)
|
|
31
|
+
), Wa = xs(za), rn = {
|
|
28
32
|
recursive: !0,
|
|
29
33
|
recursiveInArray: !0,
|
|
30
34
|
keepTypesOnRecursion: [Number, String, Uint8Array]
|
|
31
|
-
}, Ga = (r = rn) => (r.recursive == null ? r = rn : r.recursiveInArray
|
|
35
|
+
}, Ga = (r = rn) => (r.recursive == null ? r = rn : r.recursiveInArray ?? (r.recursiveInArray = !1), r), Dn = (r) => r != null && Array.isArray(r), Mr = (r) => r != null && typeof r == "object" && !Array.isArray(r), jn = (r, e) => (e || []).some((t) => r instanceof t), Ps = (r) => r != null && typeof r == "object" && !Array.isArray(r);
|
|
32
36
|
var Va = Object.defineProperty, Fa = (r, e, t) => e in r ? Va(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Nt = (r, e, t) => Fa(r, typeof e != "symbol" ? e + "" : e, t);
|
|
33
37
|
let Ja = class {
|
|
34
38
|
constructor() {
|
|
@@ -230,19 +234,41 @@ const vo = (r) => (e, t, n, i) => t === "dimension" ? [e, n] : [
|
|
|
230
234
|
constructor() {
|
|
231
235
|
fe(this, "ops", []), fe(this, "currBounds", null), fe(this, "currType", null), fe(this, "reversed", !1), this.ops = [];
|
|
232
236
|
}
|
|
237
|
+
/**
|
|
238
|
+
* @returns a new scale with a translation as its first operation. Any number provided
|
|
239
|
+
* to the {@link pos} operation on the scale will be translated by the specified value.
|
|
240
|
+
* @param value - The amount to translate by.
|
|
241
|
+
*/
|
|
233
242
|
static translate(e) {
|
|
234
243
|
return new yt().translate(e);
|
|
235
244
|
}
|
|
245
|
+
/**
|
|
246
|
+
* @returns a new scale with a magnification as its first operation. Any number provided
|
|
247
|
+
* to the {@link pos} or {@link dim} operation will be multiplied by the specified value.
|
|
248
|
+
* @param value - The amount to translate by.
|
|
249
|
+
*/
|
|
236
250
|
static magnify(e) {
|
|
237
251
|
return new yt().magnify(e);
|
|
238
252
|
}
|
|
239
253
|
static scale(e, t) {
|
|
240
254
|
return new yt().scale(e, t);
|
|
241
255
|
}
|
|
256
|
+
/**
|
|
257
|
+
* @returns a copy of the scale with a translation as its next operation. Any
|
|
258
|
+
* number provided to the {@link pos} method on the scale will be translated by the
|
|
259
|
+
* specified value.
|
|
260
|
+
* @param value - The amount to translate by.
|
|
261
|
+
*/
|
|
242
262
|
translate(e) {
|
|
243
263
|
const t = this.new(), n = vo(e);
|
|
244
264
|
return n.type = "translate", t.ops.push(n), t;
|
|
245
265
|
}
|
|
266
|
+
/**
|
|
267
|
+
* @returns a copy of the scale with a translation as its next operation. Any number
|
|
268
|
+
* provided to the {@link pos} or {@link dim} method on the scale will be multiplied
|
|
269
|
+
* by the specified value.
|
|
270
|
+
* @param value - The amount to magnify by.
|
|
271
|
+
*/
|
|
246
272
|
magnify(e) {
|
|
247
273
|
const t = this.new(), n = To(e);
|
|
248
274
|
return n.type = "magnify", t.ops.push(n), t;
|
|
@@ -402,9 +428,9 @@ const Io = (r) => r != null && typeof r == "object" && "toString" in r, ko = (r,
|
|
|
402
428
|
default:
|
|
403
429
|
return console.warn(`sortFunc: unknown type ${t}`), () => -1;
|
|
404
430
|
}
|
|
405
|
-
return e ?
|
|
406
|
-
},
|
|
407
|
-
s.union([Ds,
|
|
431
|
+
return e ? $o(n) : n;
|
|
432
|
+
}, $o = (r) => (e, t) => r(t, e), Ao = s.object({ signedWidth: s.number(), signedHeight: s.number() });
|
|
433
|
+
s.union([Ds, Ao, ur, wr]);
|
|
408
434
|
const Ro = s.bigint().or(s.string().transform(BigInt));
|
|
409
435
|
var xo = Object.defineProperty, Co = (r, e, t) => e in r ? xo(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, m = (r, e, t) => Co(r, typeof e != "symbol" ? e + "" : e, t);
|
|
410
436
|
let Po = (r, e = 21) => (t = e) => {
|
|
@@ -429,7 +455,7 @@ const Do = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", jo
|
|
|
429
455
|
);
|
|
430
456
|
const n = r.valueOf() % t.valueOf();
|
|
431
457
|
return r instanceof M ? new M(n) : new _(n);
|
|
432
|
-
},
|
|
458
|
+
}, A = class T {
|
|
433
459
|
constructor(e, t = "UTC") {
|
|
434
460
|
if (m(this, "value"), m(this, "encodeValue", !0), e == null) this.value = T.now().valueOf();
|
|
435
461
|
else if (e instanceof Date)
|
|
@@ -456,7 +482,7 @@ const Do = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", jo
|
|
|
456
482
|
const [n, i, a] = e.split(":");
|
|
457
483
|
let o = "00", l = "00";
|
|
458
484
|
a != null && ([o, l] = a.split("."));
|
|
459
|
-
let u = T.hours(parseInt(n ?? "00"
|
|
485
|
+
let u = T.hours(parseInt(n ?? "00")).add(T.minutes(parseInt(i ?? "00"))).add(T.seconds(parseInt(o ?? "00"))).add(T.milliseconds(parseInt(l ?? "00")));
|
|
460
486
|
return t === "local" && (u = u.add(T.utcOffset)), u.valueOf();
|
|
461
487
|
}
|
|
462
488
|
static parseDateTimeString(e, t = "UTC") {
|
|
@@ -707,24 +733,24 @@ const Do = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", jo
|
|
|
707
733
|
return T.hours(e * 24);
|
|
708
734
|
}
|
|
709
735
|
};
|
|
710
|
-
m(
|
|
711
|
-
m(
|
|
712
|
-
m(
|
|
713
|
-
m(
|
|
714
|
-
m(
|
|
715
|
-
m(
|
|
716
|
-
m(
|
|
717
|
-
m(
|
|
718
|
-
m(
|
|
719
|
-
m(
|
|
720
|
-
m(
|
|
721
|
-
s.object({ value: s.bigint() }).transform((r) => new
|
|
722
|
-
s.string().transform((r) => new
|
|
723
|
-
s.instanceof(Number).transform((r) => new
|
|
724
|
-
s.number().transform((r) => new
|
|
725
|
-
s.instanceof(
|
|
736
|
+
m(A, "NANOSECOND", A.nanoseconds(1)), /** One microsecond after the unix epoch */
|
|
737
|
+
m(A, "MICROSECOND", A.microseconds(1)), /** One millisecond after the unix epoch */
|
|
738
|
+
m(A, "MILLISECOND", A.milliseconds(1)), /** One second after the unix epoch */
|
|
739
|
+
m(A, "SECOND", A.seconds(1)), /** One minute after the unix epoch */
|
|
740
|
+
m(A, "MINUTE", A.minutes(1)), /** One hour after the unix epoch */
|
|
741
|
+
m(A, "HOUR", A.hours(1)), /** One day after the unix epoch */
|
|
742
|
+
m(A, "DAY", A.days(1)), /** The maximum possible value for a timestamp */
|
|
743
|
+
m(A, "MAX", new A((1n << 63n) - 1n)), /** The minimum possible value for a timestamp */
|
|
744
|
+
m(A, "MIN", new A(0)), /** The unix epoch */
|
|
745
|
+
m(A, "ZERO", new A(0)), /** A zod schema for validating timestamps */
|
|
746
|
+
m(A, "z", s.union([
|
|
747
|
+
s.object({ value: s.bigint() }).transform((r) => new A(r.value)),
|
|
748
|
+
s.string().transform((r) => new A(BigInt(r))),
|
|
749
|
+
s.instanceof(Number).transform((r) => new A(r)),
|
|
750
|
+
s.number().transform((r) => new A(r)),
|
|
751
|
+
s.instanceof(A)
|
|
726
752
|
]));
|
|
727
|
-
let M =
|
|
753
|
+
let M = A;
|
|
728
754
|
const R = class E {
|
|
729
755
|
constructor(e) {
|
|
730
756
|
m(this, "value"), m(this, "encodeValue", !0), typeof e == "number" && (e = Math.trunc(e.valueOf())), this.value = BigInt(e.valueOf());
|
|
@@ -1127,12 +1153,11 @@ const g = class ae extends String {
|
|
|
1127
1153
|
if (e instanceof ae || typeof e == "string" || typeof e.valueOf() == "string") {
|
|
1128
1154
|
super(e.valueOf());
|
|
1129
1155
|
return;
|
|
1130
|
-
}
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
}
|
|
1156
|
+
}
|
|
1157
|
+
const t = ae.ARRAY_CONSTRUCTOR_DATA_TYPES.get(e.constructor.name);
|
|
1158
|
+
if (t != null) {
|
|
1159
|
+
super(t.valueOf());
|
|
1160
|
+
return;
|
|
1136
1161
|
}
|
|
1137
1162
|
throw super(ae.UNKNOWN.valueOf()), new Error(`unable to find data type for ${e.toString()}`);
|
|
1138
1163
|
}
|
|
@@ -1452,11 +1477,11 @@ const Ys = (r) => {
|
|
|
1452
1477
|
else {
|
|
1453
1478
|
let d = h ? [u] : u;
|
|
1454
1479
|
const D = d[0];
|
|
1455
|
-
(D instanceof M || D instanceof Date || D instanceof _) && (d = d.map((j) => new M(j).valueOf())), this.dataType.equals(x.STRING) ? (this._cachedLength = d.length, this._data = new TextEncoder().encode(d.join(`
|
|
1456
|
-
`)
|
|
1480
|
+
(D instanceof M || D instanceof Date || D instanceof _) && (d = d.map((j) => new M(j).valueOf())), this.dataType.equals(x.STRING) ? (this._cachedLength = d.length, this._data = new TextEncoder().encode(`${d.join(`
|
|
1481
|
+
`)}
|
|
1457
1482
|
`)) : this.dataType.equals(x.JSON) ? (this._cachedLength = d.length, this._data = new TextEncoder().encode(
|
|
1458
|
-
d.map((j) => Xt.encodeString(j)).join(`
|
|
1459
|
-
`)
|
|
1483
|
+
`${d.map((j) => Xt.encodeString(j)).join(`
|
|
1484
|
+
`)}
|
|
1460
1485
|
`
|
|
1461
1486
|
)) : this._data = new this.dataType.Array(d).buffer;
|
|
1462
1487
|
}
|
|
@@ -1487,15 +1512,15 @@ const Ys = (r) => {
|
|
|
1487
1512
|
return this._refCount;
|
|
1488
1513
|
}
|
|
1489
1514
|
static fromStrings(e, t) {
|
|
1490
|
-
const n = new TextEncoder().encode(e.join(`
|
|
1491
|
-
`)
|
|
1515
|
+
const n = new TextEncoder().encode(`${e.join(`
|
|
1516
|
+
`)}
|
|
1492
1517
|
`);
|
|
1493
1518
|
return new oe({ data: n, dataType: x.STRING, timeRange: t });
|
|
1494
1519
|
}
|
|
1495
1520
|
static fromJSON(e, t) {
|
|
1496
1521
|
const n = new TextEncoder().encode(
|
|
1497
|
-
e.map((i) => Xt.encodeString(i)).join(`
|
|
1498
|
-
`)
|
|
1522
|
+
`${e.map((i) => Xt.encodeString(i)).join(`
|
|
1523
|
+
`)}
|
|
1499
1524
|
`
|
|
1500
1525
|
);
|
|
1501
1526
|
return new oe({ data: n, dataType: x.JSON, timeRange: t });
|
|
@@ -1641,12 +1666,11 @@ const Ys = (r) => {
|
|
|
1641
1666
|
get max() {
|
|
1642
1667
|
if (this.dataType.isVariable)
|
|
1643
1668
|
throw new Error("cannot calculate maximum on a variable length data type");
|
|
1644
|
-
return this.writePos === 0 ? -1 / 0 : (this._cachedMax
|
|
1669
|
+
return this.writePos === 0 ? -1 / 0 : (this._cachedMax ?? (this._cachedMax = this.calcRawMax()), pt(this._cachedMax, this.sampleOffset));
|
|
1645
1670
|
}
|
|
1646
1671
|
calcRawMin() {
|
|
1647
1672
|
if (this.length === 0) return 1 / 0;
|
|
1648
|
-
if (this.dataType.equals(x.TIMESTAMP))
|
|
1649
|
-
this._cachedMin = this.data[0];
|
|
1673
|
+
if (this.dataType.equals(x.TIMESTAMP)) this._cachedMin = this.data[0];
|
|
1650
1674
|
else if (this.dataType.usesBigInt) {
|
|
1651
1675
|
const e = this.data;
|
|
1652
1676
|
this._cachedMin = e.reduce((t, n) => t < n ? t : n);
|
|
@@ -1660,7 +1684,7 @@ const Ys = (r) => {
|
|
|
1660
1684
|
get min() {
|
|
1661
1685
|
if (this.dataType.isVariable)
|
|
1662
1686
|
throw new Error("cannot calculate minimum on a variable length data type");
|
|
1663
|
-
return this.writePos === 0 ? 1 / 0 : (this._cachedMin
|
|
1687
|
+
return this.writePos === 0 ? 1 / 0 : (this._cachedMin ?? (this._cachedMin = this.calcRawMin()), pt(this._cachedMin, this.sampleOffset));
|
|
1664
1688
|
}
|
|
1665
1689
|
/** @returns the bounds of this array. */
|
|
1666
1690
|
get bounds() {
|
|
@@ -1966,7 +1990,7 @@ const Vo = () => {
|
|
|
1966
1990
|
osZ: Go
|
|
1967
1991
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1968
1992
|
var Jo = Object.defineProperty, Ko = (r, e, t) => e in r ? Jo(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, mt = (r, e, t) => Ko(r, typeof e != "symbol" ? e + "" : e, t);
|
|
1969
|
-
const Ho = (...r) => r.map(Gs).join(""), Gs = (r) => (r.endsWith("/") || (r += "/"), r.startsWith("/") && (r = r.slice(1)), r), Xo = (r) => r.endsWith("/") ? r.slice(0, -1) : r, Qo = (r, e = "") => r === null ? "" :
|
|
1993
|
+
const Ho = (...r) => r.map(Gs).join(""), Gs = (r) => (r.endsWith("/") || (r += "/"), r.startsWith("/") && (r = r.slice(1)), r), Xo = (r) => r.endsWith("/") ? r.slice(0, -1) : r, Qo = (r, e = "") => r === null ? "" : `?${Object.entries(r).filter(([, t]) => t == null ? !1 : Array.isArray(t) ? t.length > 0 : !0).map(([t, n]) => `${e}${t}=${n}`).join("&")}`, on = class cn {
|
|
1970
1994
|
/**
|
|
1971
1995
|
* @param host - The hostname or IP address of the server.
|
|
1972
1996
|
* @param port - The port number of the server.
|
|
@@ -2036,8 +2060,8 @@ new nc();
|
|
|
2036
2060
|
s.string().regex(/^\d+\.\d+\.\d+$/);
|
|
2037
2061
|
const X = (r) => (e) => e != null && typeof e == "object" && "type" in e && typeof e.type == "string" ? e.type.includes(r) : e instanceof Error ? e.message.includes(r) : typeof e != "string" ? !1 : e.includes(r);
|
|
2038
2062
|
class se extends Error {
|
|
2039
|
-
constructor(
|
|
2040
|
-
super(
|
|
2063
|
+
constructor() {
|
|
2064
|
+
super(...arguments), $(this, "discriminator", "FreighterError"), $(this, "type", "");
|
|
2041
2065
|
}
|
|
2042
2066
|
}
|
|
2043
2067
|
const sc = (r) => {
|
|
@@ -2052,7 +2076,7 @@ const sc = (r) => {
|
|
|
2052
2076
|
}, Jn = "unknown", Kn = "nil", ic = "freighter", jt = s.object({ type: s.string(), data: s.string() });
|
|
2053
2077
|
class ac {
|
|
2054
2078
|
constructor() {
|
|
2055
|
-
|
|
2079
|
+
$(this, "providers", []);
|
|
2056
2080
|
}
|
|
2057
2081
|
register(e) {
|
|
2058
2082
|
this.providers.push(e);
|
|
@@ -2081,31 +2105,31 @@ const Fs = new ac(), Js = ({
|
|
|
2081
2105
|
decode: e
|
|
2082
2106
|
}) => Fs.register({ encode: r, decode: e }), Tn = (r) => Fs.decode(r);
|
|
2083
2107
|
class Hn extends se {
|
|
2084
|
-
constructor(
|
|
2085
|
-
super(
|
|
2108
|
+
constructor() {
|
|
2109
|
+
super(...arguments), $(this, "type", "unknown");
|
|
2086
2110
|
}
|
|
2087
2111
|
}
|
|
2088
2112
|
const br = "freighter.", rr = class Ks extends se {
|
|
2089
2113
|
constructor() {
|
|
2090
|
-
super("EOF"),
|
|
2114
|
+
super("EOF"), $(this, "type", Ks.TYPE);
|
|
2091
2115
|
}
|
|
2092
2116
|
};
|
|
2093
|
-
|
|
2117
|
+
$(rr, "TYPE", `${br}eof`), $(rr, "matches", X(rr.TYPE));
|
|
2094
2118
|
let Oe = rr;
|
|
2095
2119
|
const nr = class Hs extends se {
|
|
2096
2120
|
constructor() {
|
|
2097
|
-
super("StreamClosed"),
|
|
2121
|
+
super("StreamClosed"), $(this, "type", Hs.TYPE);
|
|
2098
2122
|
}
|
|
2099
2123
|
};
|
|
2100
|
-
|
|
2124
|
+
$(nr, "TYPE", `${br}stream_closed`), $(nr, "matches", X(nr.TYPE));
|
|
2101
2125
|
let rt = nr;
|
|
2102
2126
|
const sr = class Xs extends se {
|
|
2103
2127
|
constructor(e = {}) {
|
|
2104
2128
|
const { message: t = "Unreachable", url: n = ec.UNKNOWN } = e;
|
|
2105
|
-
super(t),
|
|
2129
|
+
super(t), $(this, "type", Xs.TYPE), $(this, "url"), this.url = n;
|
|
2106
2130
|
}
|
|
2107
2131
|
};
|
|
2108
|
-
|
|
2132
|
+
$(sr, "TYPE", `${br}unreachable`), $(sr, "matches", X(sr.TYPE));
|
|
2109
2133
|
let Pe = sr;
|
|
2110
2134
|
const oc = (r) => {
|
|
2111
2135
|
if (!r.type.startsWith(ic)) return null;
|
|
@@ -2134,7 +2158,7 @@ Js({
|
|
|
2134
2158
|
});
|
|
2135
2159
|
let Qs = class {
|
|
2136
2160
|
constructor() {
|
|
2137
|
-
|
|
2161
|
+
$(this, "middleware", []);
|
|
2138
2162
|
}
|
|
2139
2163
|
/** Implements the Transport interface */
|
|
2140
2164
|
use(...e) {
|
|
@@ -2168,7 +2192,7 @@ const ei = "Content-Type", Xn = (r) => {
|
|
|
2168
2192
|
};
|
|
2169
2193
|
class lc extends Qs {
|
|
2170
2194
|
constructor(e, t, n = !1) {
|
|
2171
|
-
return super(),
|
|
2195
|
+
return super(), $(this, "endpoint"), $(this, "encoder"), $(this, "fetch"), this.endpoint = e.replace({ protocol: n ? "https" : "http" }), this.encoder = t, this.fetch = Xn(this.endpoint.protocol), new Proxy(this, {
|
|
2172
2196
|
get: (i, a, o) => a === "endpoint" ? this.endpoint : Reflect.get(i, a, o)
|
|
2173
2197
|
});
|
|
2174
2198
|
}
|
|
@@ -2233,7 +2257,7 @@ const w = async (r, e, t, n, i) => {
|
|
|
2233
2257
|
});
|
|
2234
2258
|
class dc {
|
|
2235
2259
|
constructor(e, t, n, i) {
|
|
2236
|
-
|
|
2260
|
+
$(this, "encoder"), $(this, "reqSchema"), $(this, "resSchema"), $(this, "ws"), $(this, "serverClosed"), $(this, "sendClosed"), $(this, "receiveDataQueue", []), $(this, "receiveCallbacksQueue", []), this.encoder = t, this.reqSchema = n, this.resSchema = i, this.ws = e, this.sendClosed = !1, this.serverClosed = null, this.listenForMessages();
|
|
2237
2261
|
}
|
|
2238
2262
|
/** Implements the Stream protocol */
|
|
2239
2263
|
send(e) {
|
|
@@ -2288,7 +2312,7 @@ const yc = "freighterctx", fc = 1e3, gc = 1001, pc = [fc, gc], mc = (r) => pc.in
|
|
|
2288
2312
|
* @param baseEndpoint - A base url to use as a prefix for all requests.
|
|
2289
2313
|
*/
|
|
2290
2314
|
constructor(e, t, n = !1) {
|
|
2291
|
-
super(),
|
|
2315
|
+
super(), $(this, "baseUrl"), $(this, "encoder"), this.baseUrl = e.replace({ protocol: n ? "wss" : "ws" }), this.encoder = t;
|
|
2292
2316
|
}
|
|
2293
2317
|
/** Implements the StreamClient interface. */
|
|
2294
2318
|
async stream(e, t, n) {
|
|
@@ -2327,7 +2351,7 @@ const yc = "freighterctx", fc = 1e3, gc = 1001, pc = [fc, gc], mc = (r) => pc.in
|
|
|
2327
2351
|
});
|
|
2328
2352
|
}
|
|
2329
2353
|
};
|
|
2330
|
-
|
|
2354
|
+
$(ti, "MESSAGE_TYPE", "arraybuffer");
|
|
2331
2355
|
let wc = ti;
|
|
2332
2356
|
const hr = s.union([
|
|
2333
2357
|
s.literal("all"),
|
|
@@ -2355,12 +2379,16 @@ const hr = s.union([
|
|
|
2355
2379
|
}), i;
|
|
2356
2380
|
};
|
|
2357
2381
|
return e;
|
|
2358
|
-
}, si = ni(Sc), Nc = (r) =>
|
|
2382
|
+
}, si = ni(Sc), Nc = (r) => (
|
|
2383
|
+
// Don't convert the first character and don't convert a character that is after a
|
|
2384
|
+
// non-alphanumeric character
|
|
2385
|
+
r.replace(/([a-z0-9])([A-Z])/g, (e, t, n) => `${t}_${n.toLowerCase()}`)
|
|
2386
|
+
), Ic = ni(Nc), ln = {
|
|
2359
2387
|
recursive: !0,
|
|
2360
2388
|
recursiveInArray: !0,
|
|
2361
2389
|
keepTypesOnRecursion: [Number, String, Uint8Array]
|
|
2362
|
-
}, kc = (r = ln) => (r.recursive == null ? r = ln : r.recursiveInArray
|
|
2363
|
-
var
|
|
2390
|
+
}, kc = (r = ln) => (r.recursive == null ? r = ln : r.recursiveInArray ?? (r.recursiveInArray = !1), r), Qn = (r) => r != null && Array.isArray(r), Lr = (r) => r != null && typeof r == "object" && !Array.isArray(r), es = (r, e) => (e || []).some((t) => r instanceof t), On = (r) => r != null && typeof r == "object" && !Array.isArray(r);
|
|
2391
|
+
var $c = Object.defineProperty, Ac = (r, e, t) => e in r ? $c(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, It = (r, e, t) => Ac(r, typeof e != "symbol" ? e + "" : e, t);
|
|
2364
2392
|
let ii = class {
|
|
2365
2393
|
constructor() {
|
|
2366
2394
|
It(this, "contentType", "application/json"), It(this, "decoder"), It(this, "encoder"), this.decoder = new TextDecoder(), this.encoder = new TextEncoder();
|
|
@@ -2616,19 +2644,41 @@ const sl = (r) => (e, t, n, i) => t === "dimension" ? [e, n] : [
|
|
|
2616
2644
|
constructor() {
|
|
2617
2645
|
ge(this, "ops", []), ge(this, "currBounds", null), ge(this, "currType", null), ge(this, "reversed", !1), this.ops = [];
|
|
2618
2646
|
}
|
|
2647
|
+
/**
|
|
2648
|
+
* @returns a new scale with a translation as its first operation. Any number provided
|
|
2649
|
+
* to the {@link pos} operation on the scale will be translated by the specified value.
|
|
2650
|
+
* @param value - The amount to translate by.
|
|
2651
|
+
*/
|
|
2619
2652
|
static translate(e) {
|
|
2620
2653
|
return new bt().translate(e);
|
|
2621
2654
|
}
|
|
2655
|
+
/**
|
|
2656
|
+
* @returns a new scale with a magnification as its first operation. Any number provided
|
|
2657
|
+
* to the {@link pos} or {@link dim} operation will be multiplied by the specified value.
|
|
2658
|
+
* @param value - The amount to translate by.
|
|
2659
|
+
*/
|
|
2622
2660
|
static magnify(e) {
|
|
2623
2661
|
return new bt().magnify(e);
|
|
2624
2662
|
}
|
|
2625
2663
|
static scale(e, t) {
|
|
2626
2664
|
return new bt().scale(e, t);
|
|
2627
2665
|
}
|
|
2666
|
+
/**
|
|
2667
|
+
* @returns a copy of the scale with a translation as its next operation. Any
|
|
2668
|
+
* number provided to the {@link pos} method on the scale will be translated by the
|
|
2669
|
+
* specified value.
|
|
2670
|
+
* @param value - The amount to translate by.
|
|
2671
|
+
*/
|
|
2628
2672
|
translate(e) {
|
|
2629
2673
|
const t = this.new(), n = sl(e);
|
|
2630
2674
|
return n.type = "translate", t.ops.push(n), t;
|
|
2631
2675
|
}
|
|
2676
|
+
/**
|
|
2677
|
+
* @returns a copy of the scale with a translation as its next operation. Any number
|
|
2678
|
+
* provided to the {@link pos} or {@link dim} method on the scale will be multiplied
|
|
2679
|
+
* by the specified value.
|
|
2680
|
+
* @param value - The amount to magnify by.
|
|
2681
|
+
*/
|
|
2632
2682
|
magnify(e) {
|
|
2633
2683
|
const t = this.new(), n = il(e);
|
|
2634
2684
|
return n.type = "magnify", t.ops.push(n), t;
|
|
@@ -2850,7 +2900,7 @@ const Ol = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", gi
|
|
|
2850
2900
|
const [n, i, a] = e.split(":");
|
|
2851
2901
|
let o = "00", l = "00";
|
|
2852
2902
|
a != null && ([o, l] = a.split("."));
|
|
2853
|
-
let u = O.hours(parseInt(n ?? "00"
|
|
2903
|
+
let u = O.hours(parseInt(n ?? "00")).add(O.minutes(parseInt(i ?? "00"))).add(O.seconds(parseInt(o ?? "00"))).add(O.milliseconds(parseInt(l ?? "00")));
|
|
2854
2904
|
return t === "local" && (u = u.add(O.utcOffset)), u.valueOf();
|
|
2855
2905
|
}
|
|
2856
2906
|
static parseDateTimeString(e, t = "UTC") {
|
|
@@ -3124,10 +3174,10 @@ const P = class S {
|
|
|
3124
3174
|
f(this, "value"), f(this, "encodeValue", !0), typeof e == "number" && (e = Math.trunc(e.valueOf())), this.value = BigInt(e.valueOf());
|
|
3125
3175
|
}
|
|
3126
3176
|
static fromSeconds(e) {
|
|
3127
|
-
return e instanceof S ? e : e instanceof
|
|
3177
|
+
return e instanceof S ? e : e instanceof At ? e.period : e instanceof I ? new S(e) : ["number", "bigint"].includes(typeof e) ? S.seconds(e) : new S(e);
|
|
3128
3178
|
}
|
|
3129
3179
|
static fromMilliseconds(e) {
|
|
3130
|
-
return e instanceof S ? e : e instanceof
|
|
3180
|
+
return e instanceof S ? e : e instanceof At ? e.period : e instanceof I ? new S(e) : ["number", "bigint"].includes(typeof e) ? S.milliseconds(e) : new S(e);
|
|
3131
3181
|
}
|
|
3132
3182
|
encode() {
|
|
3133
3183
|
return this.value.toString();
|
|
@@ -3382,7 +3432,7 @@ f(vt, "z", s.union([
|
|
|
3382
3432
|
s.instanceof(Number).transform((r) => new vt(r)),
|
|
3383
3433
|
s.instanceof(vt)
|
|
3384
3434
|
]));
|
|
3385
|
-
let
|
|
3435
|
+
let At = vt;
|
|
3386
3436
|
const z = class extends Number {
|
|
3387
3437
|
/**
|
|
3388
3438
|
* Creates a Density representing the given number of bytes per value.
|
|
@@ -3521,12 +3571,11 @@ const p = class le extends String {
|
|
|
3521
3571
|
if (e instanceof le || typeof e == "string" || typeof e.valueOf() == "string") {
|
|
3522
3572
|
super(e.valueOf());
|
|
3523
3573
|
return;
|
|
3524
|
-
}
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
}
|
|
3574
|
+
}
|
|
3575
|
+
const t = le.ARRAY_CONSTRUCTOR_DATA_TYPES.get(e.constructor.name);
|
|
3576
|
+
if (t != null) {
|
|
3577
|
+
super(t.valueOf());
|
|
3578
|
+
return;
|
|
3530
3579
|
}
|
|
3531
3580
|
throw super(le.UNKNOWN.valueOf()), new Error(`unable to find data type for ${e.toString()}`);
|
|
3532
3581
|
}
|
|
@@ -3793,14 +3842,14 @@ s.union([
|
|
|
3793
3842
|
const mi = (r) => {
|
|
3794
3843
|
const e = typeof r;
|
|
3795
3844
|
return e === "string" || e === "number" || e === "boolean" || e === "bigint" || r instanceof I || r instanceof k || r instanceof Date;
|
|
3796
|
-
}, Nl = (r, e, t, n = 0) => r.usesBigInt && !e.usesBigInt ? Number(t) - Number(n) : !r.usesBigInt && e.usesBigInt ? BigInt(t.valueOf()) - BigInt(n.valueOf()) : Ot(t, -n).valueOf(), Il = (r) => r == null ? !1 : Array.isArray(r) || r instanceof ArrayBuffer || ArrayBuffer.isView(r) && !(r instanceof DataView) || r instanceof
|
|
3845
|
+
}, Nl = (r, e, t, n = 0) => r.usesBigInt && !e.usesBigInt ? Number(t) - Number(n) : !r.usesBigInt && e.usesBigInt ? BigInt(t.valueOf()) - BigInt(n.valueOf()) : Ot(t, -n).valueOf(), Il = (r) => r == null ? !1 : Array.isArray(r) || r instanceof ArrayBuffer || ArrayBuffer.isView(r) && !(r instanceof DataView) || r instanceof $e ? !0 : mi(r), be = -1, hn = {
|
|
3797
3846
|
[Symbol.iterator]: () => hn,
|
|
3798
3847
|
next: () => ({ done: !0, value: void 0 })
|
|
3799
3848
|
}, kl = s.string().transform(
|
|
3800
3849
|
(r) => new Uint8Array(
|
|
3801
3850
|
atob(r).split("").map((e) => e.charCodeAt(0))
|
|
3802
3851
|
).buffer
|
|
3803
|
-
),
|
|
3852
|
+
), $l = s.union([s.null(), s.undefined()]).transform(() => new Uint8Array().buffer), dn = 10, Tt = class ue {
|
|
3804
3853
|
constructor(e) {
|
|
3805
3854
|
f(this, "key", ""), f(this, "isSynnaxSeries", !0), f(this, "dataType"), f(this, "sampleOffset"), f(this, "gl"), f(this, "_data"), f(this, "_timeRange"), f(this, "alignment", 0n), f(this, "_cachedMin"), f(this, "_cachedMax"), f(this, "writePos", be), f(this, "_refCount", 0), f(this, "_cachedLength"), f(this, "_cachedIndexes"), Il(e) && (e = { data: e });
|
|
3806
3855
|
const {
|
|
@@ -3849,11 +3898,11 @@ const mi = (r) => {
|
|
|
3849
3898
|
else {
|
|
3850
3899
|
let d = h ? [u] : u;
|
|
3851
3900
|
const D = d[0];
|
|
3852
|
-
(D instanceof I || D instanceof Date || D instanceof k) && (d = d.map((j) => new I(j).valueOf())), this.dataType.equals(N.STRING) ? (this._cachedLength = d.length, this._data = new TextEncoder().encode(d.join(`
|
|
3853
|
-
`)
|
|
3901
|
+
(D instanceof I || D instanceof Date || D instanceof k) && (d = d.map((j) => new I(j).valueOf())), this.dataType.equals(N.STRING) ? (this._cachedLength = d.length, this._data = new TextEncoder().encode(`${d.join(`
|
|
3902
|
+
`)}
|
|
3854
3903
|
`)) : this.dataType.equals(N.JSON) ? (this._cachedLength = d.length, this._data = new TextEncoder().encode(
|
|
3855
|
-
d.map((j) => tt.encodeString(j)).join(`
|
|
3856
|
-
`)
|
|
3904
|
+
`${d.map((j) => tt.encodeString(j)).join(`
|
|
3905
|
+
`)}
|
|
3857
3906
|
`
|
|
3858
3907
|
)) : this._data = new this.dataType.Array(d).buffer;
|
|
3859
3908
|
}
|
|
@@ -3884,15 +3933,15 @@ const mi = (r) => {
|
|
|
3884
3933
|
return this._refCount;
|
|
3885
3934
|
}
|
|
3886
3935
|
static fromStrings(e, t) {
|
|
3887
|
-
const n = new TextEncoder().encode(e.join(`
|
|
3888
|
-
`)
|
|
3936
|
+
const n = new TextEncoder().encode(`${e.join(`
|
|
3937
|
+
`)}
|
|
3889
3938
|
`);
|
|
3890
3939
|
return new ue({ data: n, dataType: N.STRING, timeRange: t });
|
|
3891
3940
|
}
|
|
3892
3941
|
static fromJSON(e, t) {
|
|
3893
3942
|
const n = new TextEncoder().encode(
|
|
3894
|
-
e.map((i) => tt.encodeString(i)).join(`
|
|
3895
|
-
`)
|
|
3943
|
+
`${e.map((i) => tt.encodeString(i)).join(`
|
|
3944
|
+
`)}
|
|
3896
3945
|
`
|
|
3897
3946
|
);
|
|
3898
3947
|
return new ue({ data: n, dataType: N.JSON, timeRange: t });
|
|
@@ -4038,12 +4087,11 @@ const mi = (r) => {
|
|
|
4038
4087
|
get max() {
|
|
4039
4088
|
if (this.dataType.isVariable)
|
|
4040
4089
|
throw new Error("cannot calculate maximum on a variable length data type");
|
|
4041
|
-
return this.writePos === 0 ? -1 / 0 : (this._cachedMax
|
|
4090
|
+
return this.writePos === 0 ? -1 / 0 : (this._cachedMax ?? (this._cachedMax = this.calcRawMax()), Ot(this._cachedMax, this.sampleOffset));
|
|
4042
4091
|
}
|
|
4043
4092
|
calcRawMin() {
|
|
4044
4093
|
if (this.length === 0) return 1 / 0;
|
|
4045
|
-
if (this.dataType.equals(N.TIMESTAMP))
|
|
4046
|
-
this._cachedMin = this.data[0];
|
|
4094
|
+
if (this.dataType.equals(N.TIMESTAMP)) this._cachedMin = this.data[0];
|
|
4047
4095
|
else if (this.dataType.usesBigInt) {
|
|
4048
4096
|
const e = this.data;
|
|
4049
4097
|
this._cachedMin = e.reduce((t, n) => t < n ? t : n);
|
|
@@ -4057,7 +4105,7 @@ const mi = (r) => {
|
|
|
4057
4105
|
get min() {
|
|
4058
4106
|
if (this.dataType.isVariable)
|
|
4059
4107
|
throw new Error("cannot calculate minimum on a variable length data type");
|
|
4060
|
-
return this.writePos === 0 ? 1 / 0 : (this._cachedMin
|
|
4108
|
+
return this.writePos === 0 ? 1 / 0 : (this._cachedMin ?? (this._cachedMin = this.calcRawMin()), Ot(this._cachedMin, this.sampleOffset));
|
|
4061
4109
|
}
|
|
4062
4110
|
/** @returns the bounds of this array. */
|
|
4063
4111
|
get bounds() {
|
|
@@ -4208,7 +4256,7 @@ const mi = (r) => {
|
|
|
4208
4256
|
}
|
|
4209
4257
|
[Symbol.iterator]() {
|
|
4210
4258
|
if (this.dataType.isVariable) {
|
|
4211
|
-
const e = new
|
|
4259
|
+
const e = new Al(this);
|
|
4212
4260
|
return this.dataType.equals(N.JSON) ? new Rl(e) : e;
|
|
4213
4261
|
}
|
|
4214
4262
|
return new xl(this);
|
|
@@ -4268,10 +4316,10 @@ f(Tt, "crudeZ", s.object({
|
|
|
4268
4316
|
timeRange: V.z.optional(),
|
|
4269
4317
|
dataType: N.z,
|
|
4270
4318
|
alignment: wl.optional(),
|
|
4271
|
-
data: s.union([kl,
|
|
4319
|
+
data: s.union([kl, $l, s.instanceof(ArrayBuffer)]),
|
|
4272
4320
|
glBufferUsage: Sl.optional().default("static").optional()
|
|
4273
4321
|
})), f(Tt, "z", Tt.crudeZ.transform((r) => new Tt(r)));
|
|
4274
|
-
let
|
|
4322
|
+
let $e = Tt, us = class {
|
|
4275
4323
|
constructor(e, t, n) {
|
|
4276
4324
|
f(this, "series"), f(this, "end"), f(this, "index"), this.series = e;
|
|
4277
4325
|
const i = K(0, e.length);
|
|
@@ -4284,7 +4332,7 @@ let Ae = Tt, us = class {
|
|
|
4284
4332
|
return this;
|
|
4285
4333
|
}
|
|
4286
4334
|
};
|
|
4287
|
-
class
|
|
4335
|
+
class Al {
|
|
4288
4336
|
constructor(e) {
|
|
4289
4337
|
if (f(this, "series"), f(this, "index"), f(this, "decoder"), !e.dataType.isVariable)
|
|
4290
4338
|
throw new Error(
|
|
@@ -4654,9 +4702,9 @@ const gn = s.string().regex(/^\d+\.\d+\.\d+$/), Mt = (r, e, t = {}) => {
|
|
|
4654
4702
|
const a = Object.keys(e).sort(Mt).pop();
|
|
4655
4703
|
if (a == null)
|
|
4656
4704
|
return (h) => {
|
|
4657
|
-
if (h.version
|
|
4705
|
+
if (h.version ?? (h.version = n), h.version !== i.version)
|
|
4658
4706
|
return console.log(
|
|
4659
|
-
`${r} version ${h.version} is newer than latest version of ${i.version}.
|
|
4707
|
+
`${r} version ${h.version} is newer than latest version of ${i.version}.
|
|
4660
4708
|
Returning default instead.
|
|
4661
4709
|
`
|
|
4662
4710
|
), i;
|
|
@@ -4711,18 +4759,18 @@ const gn = s.string().regex(/^\d+\.\d+\.\d+$/), Mt = (r, e, t = {}) => {
|
|
|
4711
4759
|
c(this, "type", _e.TYPE);
|
|
4712
4760
|
}
|
|
4713
4761
|
};
|
|
4714
|
-
c(_e, "TYPE", Ne
|
|
4762
|
+
c(_e, "TYPE", `${Ne}validation`), c(_e, "matches", X(_e.TYPE));
|
|
4715
4763
|
let B = _e;
|
|
4716
4764
|
const Ye = class Ye extends B {
|
|
4717
4765
|
constructor(t, n) {
|
|
4718
|
-
super(t
|
|
4766
|
+
super(`${t}: ${n}`);
|
|
4719
4767
|
c(this, "type", Ye.TYPE);
|
|
4720
4768
|
c(this, "field");
|
|
4721
4769
|
c(this, "message");
|
|
4722
4770
|
this.field = t, this.message = n;
|
|
4723
4771
|
}
|
|
4724
4772
|
};
|
|
4725
|
-
c(Ye, "TYPE", B.TYPE
|
|
4773
|
+
c(Ye, "TYPE", `${B.TYPE}.field`), c(Ye, "matches", X(Ye.TYPE));
|
|
4726
4774
|
let yr = Ye;
|
|
4727
4775
|
const qe = class qe extends se {
|
|
4728
4776
|
constructor() {
|
|
@@ -4730,7 +4778,7 @@ const qe = class qe extends se {
|
|
|
4730
4778
|
c(this, "type", qe.TYPE);
|
|
4731
4779
|
}
|
|
4732
4780
|
};
|
|
4733
|
-
c(qe, "TYPE", Ne
|
|
4781
|
+
c(qe, "TYPE", `${Ne}auth`), c(qe, "matches", X(qe.TYPE));
|
|
4734
4782
|
let it = qe;
|
|
4735
4783
|
const ze = class ze extends it {
|
|
4736
4784
|
constructor() {
|
|
@@ -4738,7 +4786,7 @@ const ze = class ze extends it {
|
|
|
4738
4786
|
c(this, "type", ze.TYPE);
|
|
4739
4787
|
}
|
|
4740
4788
|
};
|
|
4741
|
-
c(ze, "TYPE", it.TYPE
|
|
4789
|
+
c(ze, "TYPE", `${it.TYPE}.invalid-token`), c(ze, "matches", X(ze.TYPE));
|
|
4742
4790
|
let Rt = ze;
|
|
4743
4791
|
const We = class We extends se {
|
|
4744
4792
|
constructor(t) {
|
|
@@ -4752,7 +4800,7 @@ const We = class We extends se {
|
|
|
4752
4800
|
c(this, "type", We.TYPE);
|
|
4753
4801
|
}
|
|
4754
4802
|
};
|
|
4755
|
-
c(We, "TYPE", Ne
|
|
4803
|
+
c(We, "TYPE", `${Ne}unexpected`), c(We, "matches", X(We.TYPE));
|
|
4756
4804
|
let Ce = We;
|
|
4757
4805
|
const Ge = class Ge extends se {
|
|
4758
4806
|
constructor() {
|
|
@@ -4760,7 +4808,7 @@ const Ge = class Ge extends se {
|
|
|
4760
4808
|
c(this, "type", Ge.TYPE);
|
|
4761
4809
|
}
|
|
4762
4810
|
};
|
|
4763
|
-
c(Ge, "TYPE", Ne
|
|
4811
|
+
c(Ge, "TYPE", `${Ne}query`), c(Ge, "matches", X(Ge.TYPE));
|
|
4764
4812
|
let re = Ge;
|
|
4765
4813
|
const Ve = class Ve extends re {
|
|
4766
4814
|
constructor() {
|
|
@@ -4768,7 +4816,7 @@ const Ve = class Ve extends re {
|
|
|
4768
4816
|
c(this, "type", Ve.TYPE);
|
|
4769
4817
|
}
|
|
4770
4818
|
};
|
|
4771
|
-
c(Ve, "TYPE", re.TYPE
|
|
4819
|
+
c(Ve, "TYPE", `${re.TYPE}.not_found`), c(Ve, "matches", X(Ve.TYPE));
|
|
4772
4820
|
let Ee = Ve;
|
|
4773
4821
|
const Fe = class Fe extends re {
|
|
4774
4822
|
constructor() {
|
|
@@ -4776,7 +4824,7 @@ const Fe = class Fe extends re {
|
|
|
4776
4824
|
c(this, "type", Fe.TYPE);
|
|
4777
4825
|
}
|
|
4778
4826
|
};
|
|
4779
|
-
c(Fe, "TYPE", re.TYPE
|
|
4827
|
+
c(Fe, "TYPE", `${re.TYPE}.multiple_results`), c(Fe, "matches", X(Fe.TYPE));
|
|
4780
4828
|
let Se = Fe;
|
|
4781
4829
|
const Je = class Je extends se {
|
|
4782
4830
|
constructor(t, n) {
|
|
@@ -4786,7 +4834,7 @@ const Je = class Je extends se {
|
|
|
4786
4834
|
this.path = n;
|
|
4787
4835
|
}
|
|
4788
4836
|
};
|
|
4789
|
-
c(Je, "TYPE", Ne
|
|
4837
|
+
c(Je, "TYPE", `${Ne}route`), c(Je, "matches", X(Je.TYPE));
|
|
4790
4838
|
let fr = Je;
|
|
4791
4839
|
const Ke = class Ke extends se {
|
|
4792
4840
|
constructor() {
|
|
@@ -4794,7 +4842,7 @@ const Ke = class Ke extends se {
|
|
|
4794
4842
|
c(this, "type", Ke.TYPE);
|
|
4795
4843
|
}
|
|
4796
4844
|
};
|
|
4797
|
-
c(Ke, "TYPE", Ne
|
|
4845
|
+
c(Ke, "TYPE", `${Ne}control`), c(Ke, "matches", X(Ke.TYPE));
|
|
4798
4846
|
let at = Ke;
|
|
4799
4847
|
const He = class He extends at {
|
|
4800
4848
|
constructor() {
|
|
@@ -4802,7 +4850,7 @@ const He = class He extends at {
|
|
|
4802
4850
|
c(this, "type", He.TYPE);
|
|
4803
4851
|
}
|
|
4804
4852
|
};
|
|
4805
|
-
c(He, "TYPE", at.TYPE
|
|
4853
|
+
c(He, "TYPE", `${at.TYPE}.unauthorized`), c(He, "matches", X(He.TYPE));
|
|
4806
4854
|
let gr = He;
|
|
4807
4855
|
const Xe = class Xe extends se {
|
|
4808
4856
|
constructor() {
|
|
@@ -4810,7 +4858,7 @@ const Xe = class Xe extends se {
|
|
|
4810
4858
|
c(this, "type", Xe.TYPE);
|
|
4811
4859
|
}
|
|
4812
4860
|
};
|
|
4813
|
-
c(Xe, "TYPE", Ne
|
|
4861
|
+
c(Xe, "TYPE", `${Ne}contiguity`), c(Xe, "matches", X(Xe.TYPE));
|
|
4814
4862
|
let ws = Xe;
|
|
4815
4863
|
const eu = (r) => {
|
|
4816
4864
|
if (!r.type.startsWith(Ne)) return null;
|
|
@@ -4908,7 +4956,7 @@ let v = Qe;
|
|
|
4908
4956
|
const ou = new v({ type: "builtin", key: "root" }), Ii = s.object({ type: s.number() }), ki = s.object({
|
|
4909
4957
|
type: Bt,
|
|
4910
4958
|
fields: s.record(Ii)
|
|
4911
|
-
}),
|
|
4959
|
+
}), $i = s.object({
|
|
4912
4960
|
id: v.z,
|
|
4913
4961
|
name: s.string(),
|
|
4914
4962
|
schema: ki.optional().nullable(),
|
|
@@ -5040,9 +5088,9 @@ const mu = "/ontology/retrieve", wu = s.object({
|
|
|
5040
5088
|
offset: s.number().optional(),
|
|
5041
5089
|
types: Bt.array().optional()
|
|
5042
5090
|
}), bu = s.object({
|
|
5043
|
-
resources:
|
|
5091
|
+
resources: $i.array()
|
|
5044
5092
|
}), lr = (r) => b(r).map((e) => new v(e).payload);
|
|
5045
|
-
let
|
|
5093
|
+
let Ai = class {
|
|
5046
5094
|
constructor(e, t) {
|
|
5047
5095
|
c(this, "type", "ontology");
|
|
5048
5096
|
c(this, "groups");
|
|
@@ -5190,8 +5238,7 @@ class Ut {
|
|
|
5190
5238
|
this.streamer.close(), await this.closePromise;
|
|
5191
5239
|
}
|
|
5192
5240
|
async start() {
|
|
5193
|
-
for await (const e of this.streamer)
|
|
5194
|
-
await this.update(e);
|
|
5241
|
+
for await (const e of this.streamer) await this.update(e);
|
|
5195
5242
|
}
|
|
5196
5243
|
async update(e) {
|
|
5197
5244
|
const t = await this.parseResourceSets(e), n = this.parseResourceDeletes(e);
|
|
@@ -5301,7 +5348,7 @@ const ng = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
5301
5348
|
BUILTIN_TYPE: su,
|
|
5302
5349
|
CLUSTER_TYPE: iu,
|
|
5303
5350
|
ChangeTracker: Ut,
|
|
5304
|
-
Client:
|
|
5351
|
+
Client: Ai,
|
|
5305
5352
|
DependentTracker: Er,
|
|
5306
5353
|
ID: v,
|
|
5307
5354
|
NODE_TYPE: au,
|
|
@@ -5311,7 +5358,7 @@ const ng = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
5311
5358
|
parseIDs: lr,
|
|
5312
5359
|
parseRelationship: pn,
|
|
5313
5360
|
relationshipSchemaZ: cu,
|
|
5314
|
-
resourceSchemaZ:
|
|
5361
|
+
resourceSchemaZ: $i,
|
|
5315
5362
|
resourceTypeZ: Bt,
|
|
5316
5363
|
schemaFieldZ: Ii,
|
|
5317
5364
|
schemaZ: ki,
|
|
@@ -5348,7 +5395,7 @@ let Nu = class {
|
|
|
5348
5395
|
)).policies;
|
|
5349
5396
|
}
|
|
5350
5397
|
};
|
|
5351
|
-
const Iu = s.object({ policies: Sr.partial({ key: !0 }).array() }), ku = s.object({ policies: Sr.array() }),
|
|
5398
|
+
const Iu = s.object({ policies: Sr.partial({ key: !0 }).array() }), ku = s.object({ policies: Sr.array() }), $u = s.object({ keys: Zt.array() }), Au = s.object({}), Ru = "/access/policy/create", xu = "/access/policy/delete";
|
|
5352
5399
|
let Cu = class {
|
|
5353
5400
|
constructor(e) {
|
|
5354
5401
|
c(this, "client");
|
|
@@ -5373,8 +5420,8 @@ let Cu = class {
|
|
|
5373
5420
|
this.client,
|
|
5374
5421
|
xu,
|
|
5375
5422
|
{ keys: b(e) },
|
|
5376
|
-
|
|
5377
|
-
|
|
5423
|
+
$u,
|
|
5424
|
+
Au
|
|
5378
5425
|
);
|
|
5379
5426
|
}
|
|
5380
5427
|
}, Pi = class {
|
|
@@ -5428,7 +5475,7 @@ const lg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
5428
5475
|
}, Symbol.toStringTag, { value: "Module" })), Ie = s.number(), Lt = s.object({
|
|
5429
5476
|
name: s.string(),
|
|
5430
5477
|
key: s.number(),
|
|
5431
|
-
rate:
|
|
5478
|
+
rate: At.z,
|
|
5432
5479
|
dataType: N.z,
|
|
5433
5480
|
leaseholder: s.number(),
|
|
5434
5481
|
index: s.number(),
|
|
@@ -5440,7 +5487,7 @@ const lg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
5440
5487
|
key: s.number().optional(),
|
|
5441
5488
|
leaseholder: s.number().optional(),
|
|
5442
5489
|
index: s.number().optional(),
|
|
5443
|
-
rate:
|
|
5490
|
+
rate: At.z.optional().default(0),
|
|
5444
5491
|
isIndex: s.boolean().optional(),
|
|
5445
5492
|
internal: s.boolean().optional().default(!1),
|
|
5446
5493
|
virtual: s.boolean().optional().default(!1)
|
|
@@ -5863,7 +5910,7 @@ class Li {
|
|
|
5863
5910
|
* database, but can still be used for streaming purposes.
|
|
5864
5911
|
*/
|
|
5865
5912
|
c(this, "virtual");
|
|
5866
|
-
this.key = a, this.name = n, this.rate = new
|
|
5913
|
+
this.key = a, this.name = n, this.rate = new At(t ?? 0), this.dataType = new N(e), this.leaseholder = i, this.index = l, this.isIndex = o, this.internal = u, this.alias = d, this.virtual = h, this._frameClient = y ?? null;
|
|
5867
5914
|
}
|
|
5868
5915
|
get framer() {
|
|
5869
5916
|
if (this._frameClient == null)
|
|
@@ -6199,7 +6246,7 @@ let Sh = class {
|
|
|
6199
6246
|
middleware() {
|
|
6200
6247
|
const e = async (t, n) => {
|
|
6201
6248
|
if (!this.authenticated && !t.target.endsWith(Ns)) {
|
|
6202
|
-
this.authenticating
|
|
6249
|
+
this.authenticating ?? (this.authenticating = new Promise((l, u) => {
|
|
6203
6250
|
this.client.send(
|
|
6204
6251
|
Ns,
|
|
6205
6252
|
this.credentials,
|
|
@@ -6237,10 +6284,10 @@ const Nh = ["disconnected", "connecting", "connected", "failed"], Gi = s.enum(Nh
|
|
|
6237
6284
|
error: void 0,
|
|
6238
6285
|
message: "Disconnected",
|
|
6239
6286
|
clientServerCompatible: !1,
|
|
6240
|
-
clientVersion: "0.
|
|
6287
|
+
clientVersion: "0.34.0"
|
|
6241
6288
|
}, ks = (r, e, t) => {
|
|
6242
6289
|
const n = t ? "cluster" : "client";
|
|
6243
|
-
return `Synnax cluster node version ${r != null ? r
|
|
6290
|
+
return `Synnax cluster node version ${r != null ? `${r} ` : ""}is too ${t ? "old" : "new"} for client version ${e}.
|
|
6244
6291
|
This may cause compatibility issues. We recommend updating the ${n}. For more information, see
|
|
6245
6292
|
https://docs.synnaxlabs.com/reference/typescript-client/troubleshooting#old-${n}-version`;
|
|
6246
6293
|
}, et = class et {
|
|
@@ -6321,7 +6368,7 @@ const wg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
6321
6368
|
keys: Ie.array().optional(),
|
|
6322
6369
|
bounds: V.z,
|
|
6323
6370
|
names: s.string().array().optional()
|
|
6324
|
-
}),
|
|
6371
|
+
}), $h = s.object({}), Ah = "/frame/delete";
|
|
6325
6372
|
class Rh {
|
|
6326
6373
|
constructor(e) {
|
|
6327
6374
|
/*
|
|
@@ -6333,21 +6380,21 @@ class Rh {
|
|
|
6333
6380
|
async delete(e) {
|
|
6334
6381
|
await w(
|
|
6335
6382
|
this.client,
|
|
6336
|
-
|
|
6383
|
+
Ah,
|
|
6337
6384
|
e,
|
|
6338
6385
|
kh,
|
|
6339
|
-
|
|
6386
|
+
$h
|
|
6340
6387
|
);
|
|
6341
6388
|
}
|
|
6342
6389
|
}
|
|
6343
|
-
const
|
|
6390
|
+
const $s = (r) => {
|
|
6344
6391
|
const e = b(r);
|
|
6345
6392
|
return e.length === 0 ? null : typeof e[0] == "number" || !isNaN(parseInt(e[0])) ? "key" : "name";
|
|
6346
|
-
},
|
|
6393
|
+
}, As = (r, e) => {
|
|
6347
6394
|
const t = b(r);
|
|
6348
6395
|
if (t.length === e.length) return;
|
|
6349
|
-
const n =
|
|
6350
|
-
throw
|
|
6396
|
+
const n = $s(r);
|
|
6397
|
+
throw $s === null ? new B(
|
|
6351
6398
|
"[Frame] - channel keys or names must be provided when constructing a frame."
|
|
6352
6399
|
) : new B(
|
|
6353
6400
|
`[Frame] - ${n}s and series must be the same length.
|
|
@@ -6371,18 +6418,18 @@ class Y {
|
|
|
6371
6418
|
const i = e;
|
|
6372
6419
|
i.series ?? (i.series = []), i.keys ?? (i.keys = []);
|
|
6373
6420
|
const a = i.series.map((o) => Fi(o));
|
|
6374
|
-
|
|
6421
|
+
As(i.keys, a), i.keys.forEach((o, l) => this.push(o, a[l]));
|
|
6375
6422
|
} else
|
|
6376
6423
|
Object.entries(e).forEach(([i, a]) => {
|
|
6377
6424
|
const o = parseInt(i);
|
|
6378
|
-
if (isNaN(o)) this.push(
|
|
6379
|
-
|
|
6425
|
+
if (!isNaN(o)) return this.push(o, ...b(a));
|
|
6426
|
+
this.push(i, ...b(a));
|
|
6380
6427
|
});
|
|
6381
6428
|
return;
|
|
6382
6429
|
}
|
|
6383
6430
|
if (Array.isArray(e) || ["string", "number"].includes(typeof e)) {
|
|
6384
6431
|
const i = b(t), a = b(e);
|
|
6385
|
-
|
|
6432
|
+
As(a, i), i.forEach((o, l) => this.push(a[l], o));
|
|
6386
6433
|
return;
|
|
6387
6434
|
}
|
|
6388
6435
|
throw new B(
|
|
@@ -6579,18 +6626,18 @@ const kr = s.object({
|
|
|
6579
6626
|
]),
|
|
6580
6627
|
series: s.union([
|
|
6581
6628
|
s.null().transform(() => []),
|
|
6582
|
-
|
|
6629
|
+
$e.crudeZ.array().optional().default([])
|
|
6583
6630
|
])
|
|
6584
6631
|
}), Fi = (r) => {
|
|
6585
6632
|
const { dataType: e, data: t, timeRange: n, alignment: i } = r;
|
|
6586
|
-
return new
|
|
6633
|
+
return new $e({ data: t, dataType: e, timeRange: n, glBufferUsage: "static", alignment: i });
|
|
6587
6634
|
}, Ji = (r) => ({
|
|
6588
6635
|
timeRange: r._timeRange,
|
|
6589
6636
|
dataType: r.dataType,
|
|
6590
6637
|
data: new Uint8Array(r.data.buffer),
|
|
6591
6638
|
alignment: r.alignment
|
|
6592
6639
|
});
|
|
6593
|
-
class
|
|
6640
|
+
class $r {
|
|
6594
6641
|
constructor(e) {
|
|
6595
6642
|
c(this, "adapter");
|
|
6596
6643
|
c(this, "retriever");
|
|
@@ -6598,7 +6645,7 @@ class Ar {
|
|
|
6598
6645
|
this.retriever = e, this.adapter = null, this.keys = [];
|
|
6599
6646
|
}
|
|
6600
6647
|
static async open(e, t) {
|
|
6601
|
-
const n = new
|
|
6648
|
+
const n = new $r(e);
|
|
6602
6649
|
return await n.update(t), n;
|
|
6603
6650
|
}
|
|
6604
6651
|
async update(e) {
|
|
@@ -6662,13 +6709,13 @@ class Nn {
|
|
|
6662
6709
|
Received a single channel name or key but no series.
|
|
6663
6710
|
`);
|
|
6664
6711
|
if (Array.isArray(t)) {
|
|
6665
|
-
if (t.some((u) => u instanceof
|
|
6712
|
+
if (t.some((u) => u instanceof $e || Array.isArray(u)))
|
|
6666
6713
|
throw new B(`
|
|
6667
6714
|
Received a single channel name or key but multiple series.
|
|
6668
6715
|
`);
|
|
6669
6716
|
t = t;
|
|
6670
6717
|
}
|
|
6671
|
-
const o = await this.fetchChannel(e), l = new
|
|
6718
|
+
const o = await this.fetchChannel(e), l = new $e({ data: t, dataType: o.dataType });
|
|
6672
6719
|
return new Y(o.key, l);
|
|
6673
6720
|
}
|
|
6674
6721
|
if (Array.isArray(e)) {
|
|
@@ -6687,7 +6734,7 @@ class Nn {
|
|
|
6687
6734
|
throw new B(`
|
|
6688
6735
|
Received an array of channel names or keys but not enough series.
|
|
6689
6736
|
`);
|
|
6690
|
-
const y = new
|
|
6737
|
+
const y = new $e({
|
|
6691
6738
|
data: t[u],
|
|
6692
6739
|
dataType: h.dataType
|
|
6693
6740
|
});
|
|
@@ -6698,8 +6745,7 @@ class Nn {
|
|
|
6698
6745
|
if (e instanceof Y || e instanceof Map) {
|
|
6699
6746
|
const o = new Y(e);
|
|
6700
6747
|
if (this.adapter == null) return o;
|
|
6701
|
-
|
|
6702
|
-
return l = o.columns.map((u) => {
|
|
6748
|
+
const l = o.columns.map((u) => {
|
|
6703
6749
|
var y;
|
|
6704
6750
|
const h = typeof u == "string" ? (y = this.adapter) == null ? void 0 : y.get(u) : u;
|
|
6705
6751
|
if (h == null)
|
|
@@ -6707,11 +6753,12 @@ class Nn {
|
|
|
6707
6753
|
Channel ${u} was not provided in the list of channels when opening the writer
|
|
6708
6754
|
`);
|
|
6709
6755
|
return h;
|
|
6710
|
-
})
|
|
6756
|
+
});
|
|
6757
|
+
return new Y(l, o.series);
|
|
6711
6758
|
}
|
|
6712
6759
|
const n = [], i = [], a = Object.entries(e);
|
|
6713
6760
|
for (let o = 0; o < a.length; o++) {
|
|
6714
|
-
const [l, u] = a[o], h = await this.fetchChannel(l), y = new
|
|
6761
|
+
const [l, u] = a[o], h = await this.fetchChannel(l), y = new $e({ data: u, dataType: h.dataType });
|
|
6715
6762
|
n.push(h.key), i.push(y);
|
|
6716
6763
|
}
|
|
6717
6764
|
return new Y(n, i);
|
|
@@ -6766,7 +6813,7 @@ const xh = s.object({
|
|
|
6766
6813
|
command: s.nativeEnum(kn),
|
|
6767
6814
|
error: jt.optional().nullable(),
|
|
6768
6815
|
frame: kr.optional()
|
|
6769
|
-
}),
|
|
6816
|
+
}), $t = class $t {
|
|
6770
6817
|
constructor(e, t) {
|
|
6771
6818
|
c(this, "stream");
|
|
6772
6819
|
c(this, "adapter");
|
|
@@ -6785,7 +6832,7 @@ const xh = s.object({
|
|
|
6785
6832
|
* @param opts - See {@link IteratorConfig}.
|
|
6786
6833
|
*/
|
|
6787
6834
|
static async _open(e, t, n, i, a = {}) {
|
|
6788
|
-
const o = await
|
|
6835
|
+
const o = await $r.open(n, t), l = await i.stream($t.ENDPOINT, xh, Ch), u = new $t(l, o);
|
|
6789
6836
|
return await u.execute({
|
|
6790
6837
|
command: 0,
|
|
6791
6838
|
keys: o.keys,
|
|
@@ -6900,8 +6947,8 @@ const xh = s.object({
|
|
|
6900
6947
|
}
|
|
6901
6948
|
}
|
|
6902
6949
|
};
|
|
6903
|
-
c(
|
|
6904
|
-
let pr =
|
|
6950
|
+
c($t, "ENDPOINT", "/frame/iterate");
|
|
6951
|
+
let pr = $t;
|
|
6905
6952
|
class Ph {
|
|
6906
6953
|
constructor(e) {
|
|
6907
6954
|
c(this, "iter");
|
|
@@ -6921,7 +6968,7 @@ const Dh = s.object({ keys: s.number().array(), downsampleFactor: s.number() }),
|
|
|
6921
6968
|
frame: kr,
|
|
6922
6969
|
error: jt.optional().nullable()
|
|
6923
6970
|
}), Mh = "/frame/stream";
|
|
6924
|
-
class
|
|
6971
|
+
class Ar {
|
|
6925
6972
|
constructor(e, t) {
|
|
6926
6973
|
c(this, "stream");
|
|
6927
6974
|
c(this, "adapter");
|
|
@@ -6932,7 +6979,7 @@ class $r {
|
|
|
6932
6979
|
return this.adapter.keys;
|
|
6933
6980
|
}
|
|
6934
6981
|
static async _open(e, t, { channels: n, downsampleFactor: i }) {
|
|
6935
|
-
const a = await
|
|
6982
|
+
const a = await $r.open(e, n), o = await t.stream(Mh, Dh, jh), l = new Ar(o, a);
|
|
6936
6983
|
o.send({ keys: a.keys, downsampleFactor: i ?? 1 });
|
|
6937
6984
|
const [, u] = await o.receive();
|
|
6938
6985
|
if (u != null) throw u;
|
|
@@ -6973,7 +7020,7 @@ class Yt extends De.Observer {
|
|
|
6973
7020
|
for await (const t of this.streamer) this.notify(t);
|
|
6974
7021
|
}
|
|
6975
7022
|
}
|
|
6976
|
-
var
|
|
7023
|
+
var $n = /* @__PURE__ */ ((r) => (r[r.Open = 0] = "Open", r[r.Write = 1] = "Write", r[r.Commit = 2] = "Commit", r[r.Error = 3] = "Error", r[r.SetAuthority = 4] = "SetAuthority", r))($n || {}), ot = /* @__PURE__ */ ((r) => (r[r.PersistStream = 1] = "PersistStream", r[r.Persist = 2] = "Persist", r[r.Stream = 3] = "Stream", r))(ot || {});
|
|
6977
7024
|
const Bh = (r) => {
|
|
6978
7025
|
switch (r) {
|
|
6979
7026
|
case "persist":
|
|
@@ -6996,12 +7043,12 @@ const Bh = (r) => {
|
|
|
6996
7043
|
enableAutoCommit: s.boolean().optional(),
|
|
6997
7044
|
autoIndexPersistInterval: k.z.optional()
|
|
6998
7045
|
}), Lh = s.object({
|
|
6999
|
-
command: s.nativeEnum(
|
|
7046
|
+
command: s.nativeEnum($n),
|
|
7000
7047
|
config: Zh.optional(),
|
|
7001
7048
|
frame: kr.optional()
|
|
7002
7049
|
}), _h = s.object({
|
|
7003
7050
|
ack: s.boolean(),
|
|
7004
|
-
command: s.nativeEnum(
|
|
7051
|
+
command: s.nativeEnum($n),
|
|
7005
7052
|
error: jt.optional().nullable()
|
|
7006
7053
|
});
|
|
7007
7054
|
var Te;
|
|
@@ -7055,7 +7102,7 @@ let Hi = (Te = class {
|
|
|
7055
7102
|
return this.stream.send({ command: 1, frame: n.toPayload() }), !0;
|
|
7056
7103
|
}
|
|
7057
7104
|
async setAuthority(e, t) {
|
|
7058
|
-
let n
|
|
7105
|
+
let n;
|
|
7059
7106
|
if (typeof e == "number" && t == null)
|
|
7060
7107
|
n = { keys: [], authorities: [e] };
|
|
7061
7108
|
else {
|
|
@@ -7146,7 +7193,7 @@ let Qi = class {
|
|
|
7146
7193
|
return (Array.isArray(e) || typeof e != "object") && (e = { channels: e }), await Hi._open(this.retriever, this.streamClient, e);
|
|
7147
7194
|
}
|
|
7148
7195
|
async openStreamer(e) {
|
|
7149
|
-
return (Array.isArray(e) || typeof e != "object") && (e = { channels: e, downsampleFactor: 1 }), await
|
|
7196
|
+
return (Array.isArray(e) || typeof e != "object") && (e = { channels: e, downsampleFactor: 1 }), await Ar._open(this.retriever, this.streamClient, e);
|
|
7150
7197
|
}
|
|
7151
7198
|
/**
|
|
7152
7199
|
* Writes telemetry to the given channel starting at the given timestamp.
|
|
@@ -7218,7 +7265,7 @@ const vg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7218
7265
|
Iterator: pr,
|
|
7219
7266
|
ONTOLOGY_TYPE: Xi,
|
|
7220
7267
|
ObservableStreamer: Yt,
|
|
7221
|
-
Streamer:
|
|
7268
|
+
Streamer: Ar,
|
|
7222
7269
|
Writer: Hi,
|
|
7223
7270
|
WriterMode: ot,
|
|
7224
7271
|
frameZ: kr,
|
|
@@ -7492,7 +7539,7 @@ class la {
|
|
|
7492
7539
|
await this.tasks.delete([e]);
|
|
7493
7540
|
}
|
|
7494
7541
|
}
|
|
7495
|
-
const
|
|
7542
|
+
const Ag = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
7496
7543
|
__proto__: null,
|
|
7497
7544
|
Client: ca,
|
|
7498
7545
|
ONTOLOGY_TYPE: sa,
|
|
@@ -7578,8 +7625,7 @@ class da {
|
|
|
7578
7625
|
const h = Pt.safeParse(u.at(-1).sy_task_state);
|
|
7579
7626
|
if (h.success) {
|
|
7580
7627
|
if (o = h.data, o.key === a) break;
|
|
7581
|
-
} else
|
|
7582
|
-
console.error(h.error);
|
|
7628
|
+
} else console.error(h.error);
|
|
7583
7629
|
}
|
|
7584
7630
|
return i.close(), o;
|
|
7585
7631
|
}
|
|
@@ -7752,8 +7798,8 @@ const xg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7752
7798
|
}), Id = s.object({
|
|
7753
7799
|
labels: te(Wt)
|
|
7754
7800
|
});
|
|
7755
|
-
var
|
|
7756
|
-
let ga = (
|
|
7801
|
+
var Ae;
|
|
7802
|
+
let ga = (Ae = class {
|
|
7757
7803
|
constructor(e) {
|
|
7758
7804
|
c(this, "client");
|
|
7759
7805
|
this.client = e;
|
|
@@ -7773,7 +7819,7 @@ let ga = ($e = class {
|
|
|
7773
7819
|
}
|
|
7774
7820
|
async execute(e) {
|
|
7775
7821
|
const [t, n] = await this.client.send(
|
|
7776
|
-
|
|
7822
|
+
Ae.ENDPOINT,
|
|
7777
7823
|
e,
|
|
7778
7824
|
Nd,
|
|
7779
7825
|
Id
|
|
@@ -7781,12 +7827,12 @@ let ga = ($e = class {
|
|
|
7781
7827
|
if (n != null) throw n;
|
|
7782
7828
|
return t.labels;
|
|
7783
7829
|
}
|
|
7784
|
-
}, c(
|
|
7830
|
+
}, c(Ae, "ENDPOINT", "/label/retrieve"), Ae);
|
|
7785
7831
|
const pa = Wt.extend({ key: dt.optional() }), kd = s.object({
|
|
7786
7832
|
labels: pa.array()
|
|
7787
|
-
}), Ad = s.object({
|
|
7788
|
-
labels: Wt.array()
|
|
7789
7833
|
}), $d = s.object({
|
|
7834
|
+
labels: Wt.array()
|
|
7835
|
+
}), Ad = s.object({
|
|
7790
7836
|
keys: dt.array()
|
|
7791
7837
|
}), ma = s.object({
|
|
7792
7838
|
id: H,
|
|
@@ -7804,7 +7850,7 @@ let wa = class {
|
|
|
7804
7850
|
xd,
|
|
7805
7851
|
{ labels: b(e) },
|
|
7806
7852
|
kd,
|
|
7807
|
-
|
|
7853
|
+
$d
|
|
7808
7854
|
)).labels;
|
|
7809
7855
|
}
|
|
7810
7856
|
async delete(e) {
|
|
@@ -7812,7 +7858,7 @@ let wa = class {
|
|
|
7812
7858
|
this.client,
|
|
7813
7859
|
Cd,
|
|
7814
7860
|
{ keys: b(e) },
|
|
7815
|
-
|
|
7861
|
+
Ad,
|
|
7816
7862
|
en
|
|
7817
7863
|
);
|
|
7818
7864
|
}
|
|
@@ -8026,15 +8072,15 @@ const Kd = s.object({
|
|
|
8026
8072
|
})), Qd = s.object({
|
|
8027
8073
|
range: Q,
|
|
8028
8074
|
keys: s.string().array()
|
|
8029
|
-
}),
|
|
8075
|
+
}), An = s.object({
|
|
8030
8076
|
range: Q,
|
|
8031
8077
|
key: s.string(),
|
|
8032
8078
|
value: s.string()
|
|
8033
8079
|
}), ey = s.object({
|
|
8034
|
-
pairs: te(
|
|
8080
|
+
pairs: te(An)
|
|
8035
8081
|
}), ty = s.object({
|
|
8036
8082
|
range: Q,
|
|
8037
|
-
pairs:
|
|
8083
|
+
pairs: An.array()
|
|
8038
8084
|
}), ry = s.object({
|
|
8039
8085
|
range: Q,
|
|
8040
8086
|
keys: s.string().array()
|
|
@@ -8089,7 +8135,7 @@ const Kd = s.object({
|
|
|
8089
8135
|
(e, t) => e === "delete" ? t.toStrings().map((n) => {
|
|
8090
8136
|
const [i, a] = n.split("<--->", 2);
|
|
8091
8137
|
return { variant: e, key: n, value: { range: i, key: a, value: "" } };
|
|
8092
|
-
}) : t.parseJSON(
|
|
8138
|
+
}) : t.parseJSON(An).map((n) => ({
|
|
8093
8139
|
variant: e,
|
|
8094
8140
|
key: `${n.range}${n.key}`,
|
|
8095
8141
|
value: n
|
|
@@ -8128,8 +8174,7 @@ class Sa {
|
|
|
8128
8174
|
}
|
|
8129
8175
|
async setAlias(e, t) {
|
|
8130
8176
|
const n = await this.channels.retrieve(e);
|
|
8131
|
-
if (n.length === 0)
|
|
8132
|
-
throw new re(`Channel ${e} does not exist`);
|
|
8177
|
+
if (n.length === 0) throw new re(`Channel ${e} does not exist`);
|
|
8133
8178
|
await this.aliaser.set({ [n[0].key]: t });
|
|
8134
8179
|
}
|
|
8135
8180
|
async deleteAlias(...e) {
|
|
@@ -8395,13 +8440,13 @@ let vy = class {
|
|
|
8395
8440
|
return (await w(this.client, this.ENDPOINT, { keys: t }, wy, by)).linePlots;
|
|
8396
8441
|
}
|
|
8397
8442
|
};
|
|
8398
|
-
const me = s.string().uuid(),
|
|
8443
|
+
const me = s.string().uuid(), $a = (r) => JSON.parse(r), Rn = s.object({
|
|
8399
8444
|
name: s.string(),
|
|
8400
8445
|
key: me,
|
|
8401
|
-
layout: Or.or(s.string().transform((r) =>
|
|
8446
|
+
layout: Or.or(s.string().transform((r) => $a(r)))
|
|
8402
8447
|
}), xn = Rn.omit({ layout: !0 }).extend({
|
|
8403
|
-
layout: s.string().transform((r) =>
|
|
8404
|
-
}),
|
|
8448
|
+
layout: s.string().transform((r) => $a(r))
|
|
8449
|
+
}), Aa = "workspace", Ty = (r) => new v({ type: Aa, key: r }), Oy = Pr.partial({ key: !0 }).transform((r) => ({
|
|
8405
8450
|
...r,
|
|
8406
8451
|
data: JSON.stringify(r.data)
|
|
8407
8452
|
})), Ey = s.object({
|
|
@@ -8414,7 +8459,7 @@ const me = s.string().uuid(), Aa = (r) => JSON.parse(r), Rn = s.object({
|
|
|
8414
8459
|
}), Iy = s.object({}), ky = s.object({
|
|
8415
8460
|
key: Cr,
|
|
8416
8461
|
name: s.string()
|
|
8417
|
-
}),
|
|
8462
|
+
}), $y = s.object({}), Ay = s.object({
|
|
8418
8463
|
key: Cr,
|
|
8419
8464
|
data: s.string()
|
|
8420
8465
|
}), Ry = s.object({}), xy = "/workspace/lineplot/create", Cy = "/workspace/lineplot/delete", Py = "/workspace/lineplot/rename", Dy = "/workspace/lineplot/set-data";
|
|
@@ -8449,7 +8494,7 @@ let jy = class {
|
|
|
8449
8494
|
Py,
|
|
8450
8495
|
{ key: e, name: t },
|
|
8451
8496
|
ky,
|
|
8452
|
-
|
|
8497
|
+
$y
|
|
8453
8498
|
);
|
|
8454
8499
|
}
|
|
8455
8500
|
async setData(e, t) {
|
|
@@ -8457,7 +8502,7 @@ let jy = class {
|
|
|
8457
8502
|
this.client,
|
|
8458
8503
|
Dy,
|
|
8459
8504
|
{ key: e, data: JSON.stringify(t) },
|
|
8460
|
-
|
|
8505
|
+
Ay,
|
|
8461
8506
|
Ry
|
|
8462
8507
|
);
|
|
8463
8508
|
}
|
|
@@ -8786,9 +8831,9 @@ const Fg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8786
8831
|
workspaces: Nf.array()
|
|
8787
8832
|
}), kf = s.object({
|
|
8788
8833
|
workspaces: xn.array()
|
|
8789
|
-
}),
|
|
8834
|
+
}), $f = s.object({
|
|
8790
8835
|
keys: me.array()
|
|
8791
|
-
}),
|
|
8836
|
+
}), Af = s.object({}), Rf = s.object({
|
|
8792
8837
|
key: me,
|
|
8793
8838
|
name: s.string()
|
|
8794
8839
|
}), xf = s.object({}), Cf = s.object({
|
|
@@ -8814,8 +8859,8 @@ class Uf {
|
|
|
8814
8859
|
this.client,
|
|
8815
8860
|
jf,
|
|
8816
8861
|
{ keys: b(e) },
|
|
8817
|
-
|
|
8818
|
-
|
|
8862
|
+
$f,
|
|
8863
|
+
Af
|
|
8819
8864
|
);
|
|
8820
8865
|
}
|
|
8821
8866
|
async rename(e, t) {
|
|
@@ -8877,7 +8922,7 @@ class Ba {
|
|
|
8877
8922
|
const Jg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
8878
8923
|
__proto__: null,
|
|
8879
8924
|
Client: Ba,
|
|
8880
|
-
ONTOLOGY_TYPE:
|
|
8925
|
+
ONTOLOGY_TYPE: Aa,
|
|
8881
8926
|
keyZ: me,
|
|
8882
8927
|
ontologyID: Ty,
|
|
8883
8928
|
workspaceRemoteZ: xn,
|
|
@@ -8941,13 +8986,13 @@ class Lf extends Qi {
|
|
|
8941
8986
|
/**
|
|
8942
8987
|
* The version of the client.
|
|
8943
8988
|
*/
|
|
8944
|
-
c(this, "clientVersion", "0.
|
|
8989
|
+
c(this, "clientVersion", "0.34.0");
|
|
8945
8990
|
this.createdAt = I.now(), this.props = n, this.auth = d, this.transport = y, this.channels = new _i(this, D, y.unary, j), this.connectivity = new Ct(
|
|
8946
8991
|
y.unary,
|
|
8947
8992
|
u,
|
|
8948
8993
|
this.clientVersion,
|
|
8949
8994
|
n.name
|
|
8950
|
-
), this.control = new ta(this), this.ontology = new
|
|
8995
|
+
), this.control = new ta(this), this.ontology = new Ai(y.unary, this);
|
|
8951
8996
|
const ee = new Ia(this.transport.unary);
|
|
8952
8997
|
this.labels = new ba(this.transport.unary, this, this.ontology), this.ranges = new Na(
|
|
8953
8998
|
this,
|
|
@@ -8986,9 +9031,9 @@ export {
|
|
|
8986
9031
|
Se as MultipleFoundError,
|
|
8987
9032
|
Ee as NotFoundError,
|
|
8988
9033
|
re as QueryError,
|
|
8989
|
-
|
|
9034
|
+
At as Rate,
|
|
8990
9035
|
fr as RouteError,
|
|
8991
|
-
|
|
9036
|
+
$e as Series,
|
|
8992
9037
|
Lf as Synnax,
|
|
8993
9038
|
V as TimeRange,
|
|
8994
9039
|
k as TimeSpan,
|
|
@@ -9007,7 +9052,7 @@ export {
|
|
|
9007
9052
|
Wg as log,
|
|
9008
9053
|
ng as ontology,
|
|
9009
9054
|
og as policy,
|
|
9010
|
-
|
|
9055
|
+
Ag as rack,
|
|
9011
9056
|
Bg as ranger,
|
|
9012
9057
|
Fg as schematic,
|
|
9013
9058
|
Ng as signals,
|