@milaboratories/pl-model-common 1.14.1 → 1.15.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/dist/drivers/pframe/spec/index.d.ts +1 -0
- package/dist/drivers/pframe/spec/index.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/native_id.d.ts +5 -0
- package/dist/drivers/pframe/spec/native_id.d.ts.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +111 -103
- package/dist/index.mjs.map +1 -1
- package/dist/pool/spec.d.ts +4 -0
- package/dist/pool/spec.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/drivers/pframe/spec/index.ts +1 -0
- package/src/drivers/pframe/spec/native_id.ts +17 -0
- package/src/pool/spec.ts +6 -0
package/dist/index.mjs
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
var $ = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var l = (n, e, t) =>
|
|
4
|
-
import
|
|
5
|
-
import { z as
|
|
2
|
+
var D = (n, e, t) => e in n ? $(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var l = (n, e, t) => D(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import y from "canonicalize";
|
|
5
|
+
import { z as m } from "zod";
|
|
6
6
|
function dn(n) {
|
|
7
7
|
return n !== void 0 && n.startsWith("log+live://log/");
|
|
8
8
|
}
|
|
9
9
|
function w(n) {
|
|
10
10
|
throw new Error("Unexpected object: " + n);
|
|
11
11
|
}
|
|
12
|
-
const
|
|
13
|
-
function D(n) {
|
|
14
|
-
return n.startsWith(E);
|
|
15
|
-
}
|
|
12
|
+
const S = "upload://upload/", E = "index://index/";
|
|
16
13
|
function L(n) {
|
|
17
14
|
return n.startsWith(S);
|
|
18
15
|
}
|
|
19
16
|
function V(n) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
return n.startsWith(E);
|
|
18
|
+
}
|
|
19
|
+
function B(n) {
|
|
20
|
+
if (V(n)) {
|
|
24
21
|
const e = n.slice(E.length);
|
|
22
|
+
return JSON.parse(decodeURIComponent(e)).path;
|
|
23
|
+
} else if (L(n)) {
|
|
24
|
+
const e = n.slice(S.length);
|
|
25
25
|
return JSON.parse(decodeURIComponent(e)).localPath;
|
|
26
26
|
}
|
|
27
27
|
w(n);
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function j(n) {
|
|
30
30
|
return n.replace(/^.*[\\/]/, "");
|
|
31
31
|
}
|
|
32
|
-
function pn(n) {
|
|
33
|
-
return B(V(n));
|
|
34
|
-
}
|
|
35
32
|
function mn(n) {
|
|
33
|
+
return j(B(n));
|
|
34
|
+
}
|
|
35
|
+
function pn(n) {
|
|
36
36
|
if (!n || typeof n != "object")
|
|
37
37
|
return !1;
|
|
38
38
|
const e = n;
|
|
@@ -77,7 +77,7 @@ function ln(n, e) {
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function F(n) {
|
|
81
81
|
if (!n || typeof n != "object")
|
|
82
82
|
return !1;
|
|
83
83
|
const e = n;
|
|
@@ -95,7 +95,7 @@ function j(n) {
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
function yn(n) {
|
|
98
|
-
return
|
|
98
|
+
return F(n) ? n.type === "JsonPartitioned" || n.type === "BinaryPartitioned" : !1;
|
|
99
99
|
}
|
|
100
100
|
function hn(n) {
|
|
101
101
|
switch (n.type) {
|
|
@@ -189,11 +189,11 @@ function bn(n, e) {
|
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
|
-
const
|
|
192
|
+
const U = -2147483648, P = -9007199254740991n, wn = NaN, Pn = NaN, K = null, R = null;
|
|
193
193
|
function g(n, e) {
|
|
194
194
|
switch (e) {
|
|
195
195
|
case "Int":
|
|
196
|
-
return n ===
|
|
196
|
+
return n === U;
|
|
197
197
|
case "Long":
|
|
198
198
|
return n === Number(P) || n === P;
|
|
199
199
|
case "Float":
|
|
@@ -201,18 +201,18 @@ function g(n, e) {
|
|
|
201
201
|
case "Double":
|
|
202
202
|
return Number.isNaN(n);
|
|
203
203
|
case "String":
|
|
204
|
-
return n === U;
|
|
205
|
-
case "Bytes":
|
|
206
204
|
return n === K;
|
|
205
|
+
case "Bytes":
|
|
206
|
+
return n === R;
|
|
207
207
|
default:
|
|
208
208
|
throw Error(`unsupported data type: ${e}`);
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
function xn(n) {
|
|
212
|
-
if (!
|
|
212
|
+
if (!_(n)) throw new Error(`Expected not-NA PValue, got ${n}`);
|
|
213
213
|
return n;
|
|
214
214
|
}
|
|
215
|
-
function
|
|
215
|
+
function _(n, e) {
|
|
216
216
|
if (!e)
|
|
217
217
|
return typeof n == "string" || typeof n == "number" && isFinite(n) || typeof n == "bigint";
|
|
218
218
|
if (g(n, e)) return !1;
|
|
@@ -233,7 +233,7 @@ function R(n, e) {
|
|
|
233
233
|
throw Error(`unsupported data type: ${e}`);
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
|
-
function
|
|
236
|
+
function v(n, e) {
|
|
237
237
|
if (!e)
|
|
238
238
|
return n === null || typeof n == "string" || typeof n == "number" || typeof n == "bigint";
|
|
239
239
|
if (g(n, e)) return !0;
|
|
@@ -261,7 +261,7 @@ function An(n) {
|
|
|
261
261
|
}
|
|
262
262
|
function M(n, e) {
|
|
263
263
|
if (n === null || typeof n == "string" || typeof n == "number" || typeof n == "bigint") {
|
|
264
|
-
if (e && !g(n, e) && !
|
|
264
|
+
if (e && !g(n, e) && !v(n, e))
|
|
265
265
|
throw new Error(`Unexpected value type, got ${typeof n}, expected ${e}`);
|
|
266
266
|
return n;
|
|
267
267
|
}
|
|
@@ -287,19 +287,19 @@ function T(n) {
|
|
|
287
287
|
return Number(n);
|
|
288
288
|
throw new Error(`Unexpected value type: ${typeof n}`);
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function H(n, e) {
|
|
291
291
|
const t = Math.floor(e / 8), r = 1 << 7 - e % 8;
|
|
292
292
|
return (n[t] & r) > 0;
|
|
293
293
|
}
|
|
294
|
-
const
|
|
294
|
+
const q = { type: "absent" }, W = null;
|
|
295
295
|
function Nn(n) {
|
|
296
296
|
return typeof n == "object" && n !== null && n.type === "absent";
|
|
297
297
|
}
|
|
298
|
-
function
|
|
299
|
-
if (
|
|
300
|
-
return t.absent === void 0 ?
|
|
298
|
+
function Sn(n, e, t = {}) {
|
|
299
|
+
if (H(n.absent, e))
|
|
300
|
+
return t.absent === void 0 ? q : t.absent;
|
|
301
301
|
const r = n.data[e], o = n.type;
|
|
302
|
-
if (g(r, o)) return t.na === void 0 ?
|
|
302
|
+
if (g(r, o)) return t.na === void 0 ? W : t.na;
|
|
303
303
|
switch (o) {
|
|
304
304
|
case "Int":
|
|
305
305
|
return r;
|
|
@@ -317,14 +317,14 @@ function En(n, e, t = {}) {
|
|
|
317
317
|
throw Error(`unsupported data type: ${o}`);
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function En(n) {
|
|
321
321
|
return {
|
|
322
322
|
kind: n.kind,
|
|
323
323
|
valueType: n.valueType,
|
|
324
324
|
name: n.name,
|
|
325
325
|
domain: n.domain,
|
|
326
326
|
parentAxes: n.parentAxes,
|
|
327
|
-
axesId:
|
|
327
|
+
axesId: C(n.axesSpec)
|
|
328
328
|
};
|
|
329
329
|
}
|
|
330
330
|
function Cn(n) {
|
|
@@ -333,15 +333,15 @@ function Cn(n) {
|
|
|
333
333
|
spec: n.spec
|
|
334
334
|
};
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function p(n) {
|
|
337
337
|
const { type: e, name: t, domain: r } = n;
|
|
338
338
|
return { type: e, name: t, ...r && { domain: r } };
|
|
339
339
|
}
|
|
340
|
-
function
|
|
341
|
-
return n.map(
|
|
340
|
+
function C(n) {
|
|
341
|
+
return n.map(p);
|
|
342
342
|
}
|
|
343
343
|
function Jn(n) {
|
|
344
|
-
return
|
|
344
|
+
return y(p(n));
|
|
345
345
|
}
|
|
346
346
|
function z(n, e) {
|
|
347
347
|
if (n === void 0) return e === void 0;
|
|
@@ -354,9 +354,9 @@ function X(n, e) {
|
|
|
354
354
|
return n.name === e.name && z(n.domain, e.domain);
|
|
355
355
|
}
|
|
356
356
|
function On(n, e) {
|
|
357
|
-
return { ...n, src:
|
|
357
|
+
return { ...n, src: h(n.src, e) };
|
|
358
358
|
}
|
|
359
|
-
function
|
|
359
|
+
function h(n, e) {
|
|
360
360
|
switch (n.type) {
|
|
361
361
|
case "column":
|
|
362
362
|
return {
|
|
@@ -376,31 +376,31 @@ function y(n, e) {
|
|
|
376
376
|
case "full":
|
|
377
377
|
return {
|
|
378
378
|
type: n.type,
|
|
379
|
-
entries: n.entries.map((t) =>
|
|
379
|
+
entries: n.entries.map((t) => h(t, e))
|
|
380
380
|
};
|
|
381
381
|
case "outer":
|
|
382
382
|
return {
|
|
383
383
|
type: "outer",
|
|
384
|
-
primary:
|
|
385
|
-
secondary: n.secondary.map((t) =>
|
|
384
|
+
primary: h(n.primary, e),
|
|
385
|
+
secondary: n.secondary.map((t) => h(t, e))
|
|
386
386
|
};
|
|
387
387
|
default:
|
|
388
388
|
w(n);
|
|
389
389
|
}
|
|
390
390
|
}
|
|
391
391
|
function G(n) {
|
|
392
|
-
return
|
|
392
|
+
return y(n);
|
|
393
393
|
}
|
|
394
|
-
function
|
|
394
|
+
function In(n) {
|
|
395
395
|
return JSON.parse(n);
|
|
396
396
|
}
|
|
397
397
|
function x(n) {
|
|
398
|
-
return
|
|
398
|
+
return y(p(n));
|
|
399
399
|
}
|
|
400
400
|
function A(n, e) {
|
|
401
401
|
return JSON.stringify([n, e]);
|
|
402
402
|
}
|
|
403
|
-
class
|
|
403
|
+
class $n {
|
|
404
404
|
/**
|
|
405
405
|
* Creates a new anchor context from a set of anchor column specifications
|
|
406
406
|
* @param anchors Record of anchor column specifications indexed by anchor ID
|
|
@@ -469,7 +469,7 @@ class In {
|
|
|
469
469
|
}
|
|
470
470
|
if (r.axes = e.axesSpec.map((a) => {
|
|
471
471
|
const i = x(a), u = this.axes.get(i);
|
|
472
|
-
return u === void 0 ?
|
|
472
|
+
return u === void 0 ? p(a) : u;
|
|
473
473
|
}), !t || t.length === 0)
|
|
474
474
|
return r;
|
|
475
475
|
const s = [];
|
|
@@ -548,7 +548,7 @@ function Q(n, e) {
|
|
|
548
548
|
throw new Error(`Axis with name "${e.name}" not found in anchor "${t}"`);
|
|
549
549
|
return o[0];
|
|
550
550
|
} else if ("id" in e) {
|
|
551
|
-
const o = r.axesSpec.filter((s) => X(e.id,
|
|
551
|
+
const o = r.axesSpec.filter((s) => X(e.id, p(s)));
|
|
552
552
|
if (o.length > 1)
|
|
553
553
|
throw new Error(`Multiple matching axes found for matcher in anchor "${t}"`);
|
|
554
554
|
if (o.length === 0)
|
|
@@ -680,7 +680,7 @@ function N(n, e) {
|
|
|
680
680
|
return !1;
|
|
681
681
|
}
|
|
682
682
|
if (e.axes !== void 0) {
|
|
683
|
-
const t = n.axesSpec.map(
|
|
683
|
+
const t = n.axesSpec.map(p);
|
|
684
684
|
if (e.partialAxesMatch) {
|
|
685
685
|
for (const r of e.axes)
|
|
686
686
|
if (!t.some((o) => k(r, o)))
|
|
@@ -712,11 +712,18 @@ function N(n, e) {
|
|
|
712
712
|
function Kn(n) {
|
|
713
713
|
return Array.isArray(n) ? (e) => n.some((t) => f(e) && N(e, t)) : (e) => f(e) && N(e, n);
|
|
714
714
|
}
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
715
|
+
function Rn(n) {
|
|
716
|
+
const e = {
|
|
717
|
+
kind: n.kind,
|
|
718
|
+
name: n.name
|
|
719
|
+
};
|
|
720
|
+
return n.domain !== void 0 && (e.domain = n.domain), f(n) && (e.axesSpec = C(n.axesSpec)), y(e);
|
|
721
|
+
}
|
|
722
|
+
const _n = { href: "/" }, vn = m.object({
|
|
723
|
+
__isRef: m.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),
|
|
724
|
+
blockId: m.string().describe("Upstream block id"),
|
|
725
|
+
name: m.string().describe("Name of the output provided to the upstream block's output context"),
|
|
726
|
+
requireEnrichments: m.literal(!0).optional().describe("True if current block that stores this reference in its args, may need enrichments for the references value originating from the blocks in between current and referenced block")
|
|
720
727
|
}).describe(
|
|
721
728
|
"Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees."
|
|
722
729
|
).readonly();
|
|
@@ -735,7 +742,7 @@ function Tn(n, e, t = !1) {
|
|
|
735
742
|
name: e
|
|
736
743
|
};
|
|
737
744
|
}
|
|
738
|
-
function
|
|
745
|
+
function Hn(n, e = !0) {
|
|
739
746
|
if (e)
|
|
740
747
|
return {
|
|
741
748
|
...n,
|
|
@@ -746,10 +753,10 @@ function vn(n, e = !0) {
|
|
|
746
753
|
return r;
|
|
747
754
|
}
|
|
748
755
|
}
|
|
749
|
-
function
|
|
756
|
+
function qn(n, e, t = !1) {
|
|
750
757
|
return n.blockId === e.blockId && n.name === e.name && (t || n.requireEnrichments === e.requireEnrichments);
|
|
751
758
|
}
|
|
752
|
-
function
|
|
759
|
+
function Wn(n, e) {
|
|
753
760
|
return n.ok ? { ok: !0, value: e(n.value) } : n;
|
|
754
761
|
}
|
|
755
762
|
function en(n) {
|
|
@@ -761,7 +768,7 @@ function en(n) {
|
|
|
761
768
|
);
|
|
762
769
|
}
|
|
763
770
|
const tn = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567", rn = "0123456789ABCDEFGHIJKLMNOPQRSTUV", on = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
764
|
-
function
|
|
771
|
+
function J(n, e, t) {
|
|
765
772
|
t = t || {};
|
|
766
773
|
let r, o;
|
|
767
774
|
switch (e) {
|
|
@@ -788,99 +795,100 @@ function C(n, e, t) {
|
|
|
788
795
|
c += "=";
|
|
789
796
|
return c;
|
|
790
797
|
}
|
|
791
|
-
const
|
|
792
|
-
function
|
|
793
|
-
const n = new Uint8Array(
|
|
794
|
-
return crypto.getRandomValues(n),
|
|
798
|
+
const O = 15, sn = 24, I = m.string().length(sn).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
|
|
799
|
+
function zn() {
|
|
800
|
+
const n = new Uint8Array(O);
|
|
801
|
+
return crypto.getRandomValues(n), I.parse(J(n, "RFC4648"));
|
|
795
802
|
}
|
|
796
803
|
function an(n) {
|
|
797
|
-
if (n.length !==
|
|
798
|
-
return
|
|
804
|
+
if (n.length !== O) throw new Error(`Wrong number of bytes: ${n.length}`);
|
|
805
|
+
return I.parse(J(n, "RFC4648"));
|
|
799
806
|
}
|
|
800
|
-
async function
|
|
807
|
+
async function Xn(n) {
|
|
801
808
|
const e = new TextEncoder(), t = await crypto.subtle.digest("SHA-256", e.encode(n));
|
|
802
809
|
return an(new Uint8Array(t.slice(0, 15)));
|
|
803
810
|
}
|
|
804
|
-
function Xn(n) {
|
|
805
|
-
return JSON.stringify(n);
|
|
806
|
-
}
|
|
807
811
|
function Gn(n) {
|
|
808
|
-
return
|
|
812
|
+
return JSON.stringify(n);
|
|
809
813
|
}
|
|
810
814
|
function Qn(n) {
|
|
815
|
+
return y(n);
|
|
816
|
+
}
|
|
817
|
+
function Yn(n) {
|
|
811
818
|
return JSON.parse(n);
|
|
812
819
|
}
|
|
813
820
|
export {
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
821
|
+
$n as AnchoredIdDeriver,
|
|
822
|
+
_n as DefaultNavigationState,
|
|
823
|
+
q as PTableAbsent,
|
|
824
|
+
W as PTableNA,
|
|
825
|
+
R as PValueBytesNA,
|
|
819
826
|
Pn as PValueDoubleNA,
|
|
820
827
|
wn as PValueFloatNA,
|
|
821
|
-
|
|
828
|
+
U as PValueIntNA,
|
|
822
829
|
P as PValueLongNA,
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
830
|
+
K as PValueStringNA,
|
|
831
|
+
I as PlId,
|
|
832
|
+
O as PlIdBytes,
|
|
826
833
|
sn as PlIdLength,
|
|
827
|
-
|
|
834
|
+
vn as PlRef,
|
|
828
835
|
Jn as canonicalizeAxisId,
|
|
829
|
-
|
|
836
|
+
Qn as canonicalizeJson,
|
|
830
837
|
Tn as createPlRef,
|
|
831
838
|
hn as dataInfoToEntries,
|
|
832
|
-
|
|
839
|
+
Rn as deriveNativeId,
|
|
840
|
+
Xn as digestPlId,
|
|
833
841
|
xn as ensureNotNAPValue,
|
|
834
842
|
jn as ensurePColumn,
|
|
835
843
|
gn as entriesToDataInfo,
|
|
836
844
|
b as executePSpecPredicate,
|
|
837
845
|
Un as extractAllColumns,
|
|
838
|
-
|
|
839
|
-
|
|
846
|
+
C as getAxesId,
|
|
847
|
+
p as getAxisId,
|
|
840
848
|
Cn as getColumnIdAndSpec,
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
849
|
+
mn as getFileNameFromHandle,
|
|
850
|
+
B as getFilePathFromHandle,
|
|
851
|
+
En as getPColumnSpecId,
|
|
852
|
+
pn as isDataInfo,
|
|
853
|
+
F as isDataInfoEntries,
|
|
846
854
|
Ln as isFilteredPColumn,
|
|
847
|
-
|
|
848
|
-
|
|
855
|
+
V as isImportFileHandleIndex,
|
|
856
|
+
L as isImportFileHandleUpload,
|
|
849
857
|
dn as isLiveLog,
|
|
850
|
-
|
|
858
|
+
_ as isNotNAPValue,
|
|
851
859
|
Z as isPColumn,
|
|
852
860
|
Bn as isPColumnResult,
|
|
853
861
|
f as isPColumnSpec,
|
|
854
862
|
Vn as isPColumnSpecResult,
|
|
855
863
|
Nn as isPTableAbsent,
|
|
856
|
-
|
|
864
|
+
v as isPValue,
|
|
857
865
|
yn as isPartitionedDataInfoEntries,
|
|
858
866
|
Mn as isPlRef,
|
|
859
|
-
|
|
867
|
+
H as isValueAbsent,
|
|
860
868
|
g as isValueNA,
|
|
861
869
|
ln as mapDataInfo,
|
|
862
870
|
bn as mapDataInfoEntries,
|
|
863
|
-
|
|
871
|
+
h as mapJoinEntry,
|
|
864
872
|
Fn as mapPObjectData,
|
|
865
873
|
On as mapPTableDef,
|
|
866
|
-
|
|
874
|
+
Wn as mapValueInVOE,
|
|
867
875
|
k as matchAxis,
|
|
868
876
|
X as matchAxisId,
|
|
869
877
|
N as matchPColumn,
|
|
870
|
-
|
|
878
|
+
Sn as pTableValue,
|
|
871
879
|
kn as pValueToStringOrNumber,
|
|
872
880
|
T as pValueToStringOrNumberOrNull,
|
|
873
|
-
|
|
874
|
-
|
|
881
|
+
In as parseColumnId,
|
|
882
|
+
Yn as parseJson,
|
|
875
883
|
an as plId,
|
|
876
|
-
|
|
884
|
+
qn as plRefsEqual,
|
|
877
885
|
Dn as resolveAnchors,
|
|
878
886
|
M as safeConvertToPValue,
|
|
879
887
|
Kn as selectorsToPredicate,
|
|
880
888
|
G as stringifyColumnId,
|
|
881
|
-
|
|
889
|
+
Gn as stringifyJson,
|
|
882
890
|
An as toJsonSafePValue,
|
|
883
|
-
|
|
884
|
-
|
|
891
|
+
zn as uniquePlId,
|
|
892
|
+
Hn as withEnrichments
|
|
885
893
|
};
|
|
886
894
|
//# sourceMappingURL=index.mjs.map
|