@milaboratories/pl-middle-layer 1.37.26 → 1.37.28
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/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +164 -161
- package/dist/index.mjs.map +1 -1
- package/dist/pool/driver.d.ts +8 -0
- package/dist/pool/driver.d.ts.map +1 -1
- package/package.json +11 -11
- package/src/pool/driver.ts +12 -0
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
1
|
+
var ro = Object.defineProperty;
|
|
2
2
|
var ir = (s, e) => (e = Symbol[s]) ? e : Symbol.for("Symbol." + s), ar = (s) => {
|
|
3
3
|
throw TypeError(s);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var S = (s, e, t) =>
|
|
5
|
+
var so = (s, e, t) => e in s ? ro(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
6
|
+
var S = (s, e, t) => so(s, typeof e != "symbol" ? e + "" : e, t);
|
|
7
7
|
var cr = (s, e, t) => {
|
|
8
8
|
if (e != null) {
|
|
9
9
|
typeof e != "object" && typeof e != "function" && ar("Object expected");
|
|
@@ -26,42 +26,42 @@ var cr = (s, e, t) => {
|
|
|
26
26
|
};
|
|
27
27
|
return n();
|
|
28
28
|
};
|
|
29
|
-
import { extractConfig as Se, mapValueInVOE as rs, executePSpecPredicate as
|
|
29
|
+
import { extractConfig as Se, mapValueInVOE as rs, executePSpecPredicate as oo, mapPObjectData as fe, mapPTableDef as Ft, isDataInfo as ss, mapDataInfo as os, JsRenderInternal as no, isConfigLambda as ns, DefaultNavigationState as io, extractAllColumns as ao } from "@platforma-sdk/model";
|
|
30
30
|
export * from "@platforma-sdk/model";
|
|
31
|
-
import { AnyChannel as De, StableChannel as Ne, InitialBlockSettings as ur, blockPackIdToString as
|
|
31
|
+
import { AnyChannel as De, StableChannel as Ne, InitialBlockSettings as ur, blockPackIdToString as co } from "@milaboratories/pl-model-middle-layer";
|
|
32
32
|
export * from "@milaboratories/pl-model-middle-layer";
|
|
33
33
|
export * from "@milaboratories/pl-deployments";
|
|
34
|
-
import { request as Ut, RetryAgent as
|
|
35
|
-
import { RegistryV1 as he, tryLoadPackDescription as It, BlockPackMetaEmbedAbsoluteBytes as
|
|
34
|
+
import { request as Ut, RetryAgent as lo } from "undici";
|
|
35
|
+
import { RegistryV1 as he, tryLoadPackDescription as It, BlockPackMetaEmbedAbsoluteBytes as uo, RegistryV2Reader as po, folderReaderByUrl as fo, loadPackDescription as dr } from "@platforma-sdk/block-tools";
|
|
36
36
|
import Q from "node:fs";
|
|
37
|
-
import * as
|
|
37
|
+
import * as ho from "node:path";
|
|
38
38
|
import U from "node:path";
|
|
39
|
-
import
|
|
40
|
-
import { assertNever as H, notEmpty as I, cachedDeserialize as ct, deepFreeze as pr, ConsoleLoggerAdapter as is, ConcurrencyLimitingExecutor as
|
|
39
|
+
import go from "yaml";
|
|
40
|
+
import { assertNever as H, notEmpty as I, cachedDeserialize as ct, deepFreeze as pr, ConsoleLoggerAdapter as is, ConcurrencyLimitingExecutor as mo, emptyDir as vo, HmacSha256Signer as Jt } from "@milaboratories/ts-helpers";
|
|
41
41
|
import * as as from "node:fs/promises";
|
|
42
42
|
import lt from "node:fs/promises";
|
|
43
|
-
import { tryResolve as
|
|
44
|
-
import { resourceTypesEqual as le, field as x, Pl as F, PlClient as cs, isResourceId as fr, isNullResourceId as Ue, isResource as
|
|
43
|
+
import { tryResolve as yo } from "@milaboratories/resolve-helper";
|
|
44
|
+
import { resourceTypesEqual as le, field as x, Pl as F, PlClient as cs, isResourceId as fr, isNullResourceId as Ue, isResource as wo, isResourceRef as So, isNotNullResourceId as Tt, ensureResourceIdNotNull as ut, resourceType as He, resourceTypeToString as bo, stringifyWithResourceId as ze, resourceIdToString as ke, isNotFoundError as ko, isTimeoutOrCancelError as Ro, toGlobalResourceId as Co, UnauthenticatedPlClient as ls, toGlobalFieldId as Eo, poll as Po, ContinuePolling as $o, plAddressToConfig as Oo } from "@milaboratories/pl-client";
|
|
45
45
|
export * from "@milaboratories/pl-client";
|
|
46
|
-
import { SynchronizedTreeState as us, treeDumpStats as
|
|
47
|
-
import { Computable as M, ChangeSource as hr, PollComputablePool as
|
|
48
|
-
import { randomUUID as Re, createHash as Ee, randomBytes as
|
|
49
|
-
import { PlTemplateV1 as K, PlTemplateOverrideV1 as be, PlTemplateLibV1 as de, PlTemplateSoftwareV1 as ae, parseTemplate as
|
|
46
|
+
import { SynchronizedTreeState as us, treeDumpStats as Fo, isPlTreeNodeAccessor as Io } from "@milaboratories/pl-tree";
|
|
47
|
+
import { Computable as M, ChangeSource as hr, PollComputablePool as To, WatchableValue as Ao } from "@milaboratories/computable";
|
|
48
|
+
import { randomUUID as Re, createHash as Ee, randomBytes as Lo } from "node:crypto";
|
|
49
|
+
import { PlTemplateV1 as K, PlTemplateOverrideV1 as be, PlTemplateLibV1 as de, PlTemplateSoftwareV1 as ae, parseTemplate as Do } from "@milaboratories/pl-model-backend";
|
|
50
50
|
import { LRUCache as Gt } from "lru-cache";
|
|
51
|
-
import { Worker as
|
|
51
|
+
import { Worker as No } from "node:worker_threads";
|
|
52
52
|
import ds from "denque";
|
|
53
53
|
import { Templates as me } from "@platforma-sdk/workflow-tengo";
|
|
54
54
|
import B from "canonicalize";
|
|
55
|
-
import
|
|
56
|
-
import { Scope as Je, errors as
|
|
57
|
-
import { PlQuickJSError as
|
|
55
|
+
import Bo from "node:assert";
|
|
56
|
+
import { Scope as Je, errors as jo, getQuickJS as xo } from "quickjs-emscripten";
|
|
57
|
+
import { PlQuickJSError as Vo } from "@milaboratories/pl-errors";
|
|
58
58
|
import * as gr from "remeda";
|
|
59
59
|
import { setTimeout as ps } from "node:timers/promises";
|
|
60
|
-
import { createDownloadClient as fs, createLogsClient as
|
|
61
|
-
import { PFrame as
|
|
60
|
+
import { createDownloadClient as fs, createLogsClient as Uo, createUploadBlobClient as hs, createUploadProgressClient as Jo, DownloadDriver as Go, DownloadBlobToURLDriver as Mo, UploadDriver as _o, LogsStreamDriver as Ko, LogsDriver as Ho, LsDriver as gs, DownloadUrlDriver as Wo, isUpload as qo, ImportFileHandleUploadData as ms, isSignMatch as zo, uploadBlob as vs } from "@milaboratories/pl-drivers";
|
|
61
|
+
import { PFrame as ys } from "@milaboratories/pframes-rs-node";
|
|
62
62
|
import { channel as Xo } from "node:diagnostics_channel";
|
|
63
63
|
import { text as Yo } from "node:stream/consumers";
|
|
64
|
-
import
|
|
64
|
+
import ws from "node:os";
|
|
65
65
|
async function mr(s) {
|
|
66
66
|
try {
|
|
67
67
|
return await as.stat(s, { bigint: !0 });
|
|
@@ -71,18 +71,18 @@ async function mr(s) {
|
|
|
71
71
|
throw e;
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
const Qo = [he.PlPackageYamlConfigFile], Zo = [he.PlPackageJsonConfigFile], Mt = ["backend", "dist", "tengo", "tpl", "main.plj.gz"], _t = ["config", "dist", "config.json"],
|
|
74
|
+
const Qo = [he.PlPackageYamlConfigFile], Zo = [he.PlPackageJsonConfigFile], Mt = ["backend", "dist", "tengo", "tpl", "main.plj.gz"], _t = ["config", "dist", "config.json"], Ss = ["frontend", "dist"], vr = "block-model/dist/config.json", en = "block-ui/package.json", tn = [
|
|
75
75
|
Mt,
|
|
76
76
|
_t,
|
|
77
77
|
Qo,
|
|
78
78
|
Zo,
|
|
79
|
-
|
|
79
|
+
Ss
|
|
80
80
|
];
|
|
81
81
|
async function rn(s) {
|
|
82
82
|
return await mr(U.join(s, ..._t)) !== void 0 || await mr(U.join(s, ...Mt)) !== void 0;
|
|
83
83
|
}
|
|
84
84
|
function St(s, e) {
|
|
85
|
-
const t =
|
|
85
|
+
const t = yo(s, e);
|
|
86
86
|
if (t === void 0) throw new Error(`Can't resolve ${e} against ${s}`);
|
|
87
87
|
return t;
|
|
88
88
|
}
|
|
@@ -91,7 +91,7 @@ async function yr(s, e) {
|
|
|
91
91
|
return {
|
|
92
92
|
workflow: U.join(s, ...Mt),
|
|
93
93
|
config: U.join(s, ..._t),
|
|
94
|
-
ui: U.join(s, ...
|
|
94
|
+
ui: U.join(s, ...Ss)
|
|
95
95
|
};
|
|
96
96
|
{
|
|
97
97
|
const t = St(s, vr), r = St(s, vr), o = St(s, en);
|
|
@@ -116,7 +116,7 @@ async function on(s) {
|
|
|
116
116
|
throw e;
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
async function
|
|
119
|
+
async function bs(s) {
|
|
120
120
|
let e = 0n;
|
|
121
121
|
for (const t of tn) {
|
|
122
122
|
const r = U.join(s, ...t), o = await on(r);
|
|
@@ -184,7 +184,7 @@ class ud {
|
|
|
184
184
|
U.join(n, he.PlPackageYamlConfigFile)
|
|
185
185
|
);
|
|
186
186
|
if (i !== void 0) {
|
|
187
|
-
const l = he.PlPackageConfigData.parse(
|
|
187
|
+
const l = he.PlPackageConfigData.parse(go.parse(i)), a = await bs(n), c = {
|
|
188
188
|
organization: l.organization,
|
|
189
189
|
name: l.package,
|
|
190
190
|
version: "DEV"
|
|
@@ -222,7 +222,7 @@ class ud {
|
|
|
222
222
|
if (a !== void 0) {
|
|
223
223
|
const c = await Kt(a), u = {
|
|
224
224
|
id: a.id,
|
|
225
|
-
meta: await
|
|
225
|
+
meta: await uo.parseAsync(a.meta),
|
|
226
226
|
spec: {
|
|
227
227
|
type: "dev-v2",
|
|
228
228
|
folder: l,
|
|
@@ -271,7 +271,7 @@ class nn {
|
|
|
271
271
|
getRegistry(e) {
|
|
272
272
|
const t = this.registries.get(e);
|
|
273
273
|
if (t) return t;
|
|
274
|
-
const r = new
|
|
274
|
+
const r = new po(fo(e, this.http));
|
|
275
275
|
return this.registries.set(e, r), r;
|
|
276
276
|
}
|
|
277
277
|
}
|
|
@@ -291,7 +291,7 @@ const dd = {
|
|
|
291
291
|
blocksInLimbo: []
|
|
292
292
|
}, ln = {
|
|
293
293
|
label: "New Project"
|
|
294
|
-
}, un = { name: "UserProject", version: "2" },
|
|
294
|
+
}, un = { name: "UserProject", version: "2" }, ks = "SchemaVersion", Rs = "1", Ht = "ProjectCreated", Ge = "ProjectLastModified", Me = "ProjectMeta", ge = "ProjectStructure", dt = "BlockRenderingState", dn = "BlockFrontendState/", pn = /^BlockFrontendState\/(?<blockid>.*)$/;
|
|
295
295
|
function At(s) {
|
|
296
296
|
return `${dn}${s}`;
|
|
297
297
|
}
|
|
@@ -319,7 +319,7 @@ function vn(s) {
|
|
|
319
319
|
const { blockId: t, fieldName: r } = e.groups;
|
|
320
320
|
return { blockId: t, fieldName: r };
|
|
321
321
|
}
|
|
322
|
-
const yn = "projects",
|
|
322
|
+
const yn = "projects", Cs = { name: "Projects", version: "1" }, wn = (s) => le(s.type, Cs) ? s.fields : [];
|
|
323
323
|
async function Sn(s, e, t, r) {
|
|
324
324
|
const o = await us.init(
|
|
325
325
|
s,
|
|
@@ -379,7 +379,7 @@ function Sr(s, e) {
|
|
|
379
379
|
s.createField(x(t, `${Pn}${r}`), "Input", e[r]);
|
|
380
380
|
return s.lock(t), t;
|
|
381
381
|
}
|
|
382
|
-
function
|
|
382
|
+
function Es(s, e) {
|
|
383
383
|
const t = /* @__PURE__ */ new Map(), r = (o, n, i) => {
|
|
384
384
|
const l = Ee("sha256");
|
|
385
385
|
n.updateCacheKey(o, l, i);
|
|
@@ -390,7 +390,7 @@ function Cs(s, e) {
|
|
|
390
390
|
}
|
|
391
391
|
return t.get(a);
|
|
392
392
|
};
|
|
393
|
-
return r(e.template,
|
|
393
|
+
return r(e.template, Ps, e.hashToSource);
|
|
394
394
|
}
|
|
395
395
|
const br = {
|
|
396
396
|
updateCacheKey(s, e, t) {
|
|
@@ -410,7 +410,7 @@ const br = {
|
|
|
410
410
|
const o = ae.fromV3Data(s, Ce(s.name, r, s.sourceHash)), n = e.createStruct(ae.type, o.data);
|
|
411
411
|
return e.setKValue(n, ae.metaNameKey, JSON.stringify(o.name)), e.lock(n), n;
|
|
412
412
|
}
|
|
413
|
-
},
|
|
413
|
+
}, Ps = {
|
|
414
414
|
updateCacheKey(s, e, t) {
|
|
415
415
|
e.update(K.type.name).update(K.type.version).update(s.hashOverride ?? "no-override").update(s.name).update(s.version).update(Ce(s.name, t, s.sourceHash));
|
|
416
416
|
const r = (o) => (o.sort((n, i) => n[0] === i[0] ? 0 : n[0] < i[0] ? -1 : 1), o);
|
|
@@ -442,7 +442,7 @@ const br = {
|
|
|
442
442
|
}
|
|
443
443
|
for (const [l, a] of Object.entries(s.templates ?? {})) {
|
|
444
444
|
const c = K.tplField(o, l);
|
|
445
|
-
e.createField(c, "Input"), e.setField(c, t(a,
|
|
445
|
+
e.createField(c, "Input"), e.setField(c, t(a, Ps, r));
|
|
446
446
|
}
|
|
447
447
|
if (e.lock(o), !s.hashOverride) return o;
|
|
448
448
|
const n = e.createStruct(
|
|
@@ -459,12 +459,12 @@ function Ce(s, e, t) {
|
|
|
459
459
|
);
|
|
460
460
|
}
|
|
461
461
|
function Fn(s, e) {
|
|
462
|
-
const t =
|
|
462
|
+
const t = Do(e.content), r = t.type;
|
|
463
463
|
switch (r) {
|
|
464
464
|
case "pl.tengo-template.v2":
|
|
465
|
-
return
|
|
465
|
+
return Os(s, t);
|
|
466
466
|
case "pl.tengo-template.v3":
|
|
467
|
-
return
|
|
467
|
+
return Es(s, t);
|
|
468
468
|
default:
|
|
469
469
|
H(r);
|
|
470
470
|
}
|
|
@@ -473,9 +473,9 @@ function In(s, e) {
|
|
|
473
473
|
const t = e.data, r = t.type;
|
|
474
474
|
switch (r) {
|
|
475
475
|
case "pl.tengo-template.v2":
|
|
476
|
-
return
|
|
476
|
+
return Os(s, t);
|
|
477
477
|
case "pl.tengo-template.v3":
|
|
478
|
-
return
|
|
478
|
+
return Es(s, t);
|
|
479
479
|
default:
|
|
480
480
|
H(r);
|
|
481
481
|
}
|
|
@@ -498,7 +498,7 @@ const kr = {
|
|
|
498
498
|
const r = ae.fromV2Data(s), o = e.createStruct(ae.type, r.data);
|
|
499
499
|
return e.setKValue(o, ae.metaNameKey, JSON.stringify(r.name)), e.lock(o), o;
|
|
500
500
|
}
|
|
501
|
-
},
|
|
501
|
+
}, $s = {
|
|
502
502
|
hash(s, e) {
|
|
503
503
|
e.update(K.type.name).update(K.type.version).update(s.hashOverride ?? "no-override").update(s.name).update(s.version).update(s.src);
|
|
504
504
|
const t = (r) => (r.sort((o, n) => o[0] === n[0] ? 0 : o[0] < n[0] ? -1 : 1), r);
|
|
@@ -530,7 +530,7 @@ const kr = {
|
|
|
530
530
|
}
|
|
531
531
|
for (const [i, l] of Object.entries(s.templates ?? {})) {
|
|
532
532
|
const a = K.tplField(r, i);
|
|
533
|
-
e.createField(a, "Input"), e.setField(a, t(l,
|
|
533
|
+
e.createField(a, "Input"), e.setField(a, t(l, $s));
|
|
534
534
|
}
|
|
535
535
|
if (e.lock(r), !s.hashOverride) return r;
|
|
536
536
|
const o = e.createStruct(
|
|
@@ -540,7 +540,7 @@ const kr = {
|
|
|
540
540
|
return e.createField(n, "Service"), e.setField(n, r), e.lock(o), o;
|
|
541
541
|
}
|
|
542
542
|
};
|
|
543
|
-
function
|
|
543
|
+
function Os(s, e) {
|
|
544
544
|
const t = /* @__PURE__ */ new Map(), r = (o, n) => {
|
|
545
545
|
const i = Ee("sha256");
|
|
546
546
|
n.hash(o, i);
|
|
@@ -551,13 +551,13 @@ function $s(s, e) {
|
|
|
551
551
|
}
|
|
552
552
|
return t.get(l);
|
|
553
553
|
};
|
|
554
|
-
return r(e,
|
|
554
|
+
return r(e, $s);
|
|
555
555
|
}
|
|
556
556
|
const Tn = { name: "TengoTemplateGet", version: "1" }, An = "registry", Ln = "templateURI", Dn = "template", hd = { name: "TengoTemplatePack", version: "1" }, gd = {
|
|
557
557
|
name: "TengoTemplatePackConvert",
|
|
558
558
|
version: "1"
|
|
559
559
|
}, md = "templatePack", vd = "template";
|
|
560
|
-
async function
|
|
560
|
+
async function Fs(s) {
|
|
561
561
|
switch (s.type) {
|
|
562
562
|
case "from-file":
|
|
563
563
|
return {
|
|
@@ -589,7 +589,7 @@ function ft(s, e) {
|
|
|
589
589
|
return H(e);
|
|
590
590
|
}
|
|
591
591
|
}
|
|
592
|
-
const
|
|
592
|
+
const Is = { name: "Frontend/FromUrl", version: "1" }, Ts = {
|
|
593
593
|
name: "Frontend/FromFolder",
|
|
594
594
|
version: "1"
|
|
595
595
|
};
|
|
@@ -597,12 +597,12 @@ function Bn(s, e) {
|
|
|
597
597
|
switch (e.type) {
|
|
598
598
|
case "url":
|
|
599
599
|
return s.createValue(
|
|
600
|
-
|
|
600
|
+
Is,
|
|
601
601
|
JSON.stringify({ url: e.url })
|
|
602
602
|
);
|
|
603
603
|
case "local":
|
|
604
604
|
return s.createValue(
|
|
605
|
-
|
|
605
|
+
Ts,
|
|
606
606
|
JSON.stringify({
|
|
607
607
|
path: e.path,
|
|
608
608
|
signature: e.signature
|
|
@@ -617,7 +617,7 @@ class jn {
|
|
|
617
617
|
S(this, "nextMessageId", 0);
|
|
618
618
|
S(this, "worker");
|
|
619
619
|
S(this, "pendingRequests", /* @__PURE__ */ new Map());
|
|
620
|
-
const e = typeof global < "u" && "__WORKER_PATH__" in global ? global.__WORKER_PATH__ : U.resolve(import.meta.dirname, "worker.js"), t = this.worker = new
|
|
620
|
+
const e = typeof global < "u" && "__WORKER_PATH__" in global ? global.__WORKER_PATH__ : U.resolve(import.meta.dirname, "worker.js"), t = this.worker = new No(
|
|
621
621
|
e,
|
|
622
622
|
{
|
|
623
623
|
workerData: {}
|
|
@@ -648,7 +648,7 @@ class jn {
|
|
|
648
648
|
return this.terminate();
|
|
649
649
|
}
|
|
650
650
|
}
|
|
651
|
-
const xn = { name: "BlockPackCustom", version: "1" },
|
|
651
|
+
const xn = { name: "BlockPackCustom", version: "1" }, As = "template", Ls = "frontend";
|
|
652
652
|
function Rr(s) {
|
|
653
653
|
return s.endsWith("/") ? s : `${s}/`;
|
|
654
654
|
}
|
|
@@ -806,7 +806,7 @@ class Un {
|
|
|
806
806
|
}
|
|
807
807
|
function Jn(s, e) {
|
|
808
808
|
const t = { config: e.config, source: e.source }, r = s.createStruct(xn, JSON.stringify(t));
|
|
809
|
-
return s.createField(x(r,
|
|
809
|
+
return s.createField(x(r, As), "Input", ft(s, e.template)), s.createField(x(r, Ls), "Input", Bn(s, e.frontend)), s.lock(r), r;
|
|
810
810
|
}
|
|
811
811
|
function Cr(s, e) {
|
|
812
812
|
switch (e.type) {
|
|
@@ -858,7 +858,7 @@ function se(s) {
|
|
|
858
858
|
}
|
|
859
859
|
};
|
|
860
860
|
}
|
|
861
|
-
class
|
|
861
|
+
class Ds {
|
|
862
862
|
constructor(e) {
|
|
863
863
|
/** Nodes are stored in the map in topological order */
|
|
864
864
|
S(this, "nodes");
|
|
@@ -898,10 +898,10 @@ function jt(s) {
|
|
|
898
898
|
};
|
|
899
899
|
e.set(r, o), t === void 0 ? (o.directUpstream = o.upstream = /* @__PURE__ */ new Set(), o.enrichments = o.enrichmentTargets = /* @__PURE__ */ new Set()) : (o.directUpstream = o.upstream = /* @__PURE__ */ new Set([t.id]), t.directDownstream = t.downstream = /* @__PURE__ */ new Set([o.id]), t.enrichments = t.enrichmentTargets = /* @__PURE__ */ new Set()), t = o;
|
|
900
900
|
}
|
|
901
|
-
return t !== void 0 && (t.directDownstream = t.downstream = /* @__PURE__ */ new Set()), new
|
|
901
|
+
return t !== void 0 && (t.directDownstream = t.downstream = /* @__PURE__ */ new Set()), new Ds(e);
|
|
902
902
|
}
|
|
903
903
|
function at(s, e) {
|
|
904
|
-
const t = /* @__PURE__ */ new Map(), r = new
|
|
904
|
+
const t = /* @__PURE__ */ new Map(), r = new Ds(t), o = /* @__PURE__ */ new Set();
|
|
905
905
|
for (const { id: n } of se(s)) {
|
|
906
906
|
const i = e(n);
|
|
907
907
|
if (i === void 0) continue;
|
|
@@ -957,9 +957,9 @@ function Er(s, e) {
|
|
|
957
957
|
}), { onlyInA: t, onlyInB: r, different: o };
|
|
958
958
|
}
|
|
959
959
|
let bt;
|
|
960
|
-
async function
|
|
960
|
+
async function Ns() {
|
|
961
961
|
if (bt === void 0) {
|
|
962
|
-
const s = await
|
|
962
|
+
const s = await Fs(me["pframes.export-pframe-for-ui"]);
|
|
963
963
|
if (s.type !== "explicit") throw new Error("Unexpected prepared template type.");
|
|
964
964
|
const e = Ee("sha256").update(s.content).digest("hex");
|
|
965
965
|
bt = { spec: s, hash: e };
|
|
@@ -1042,7 +1042,7 @@ class Pr {
|
|
|
1042
1042
|
getTemplate(e) {
|
|
1043
1043
|
return e.getFutureFieldValue(
|
|
1044
1044
|
F.unwrapHolder(e, this.fields.blockPack.ref),
|
|
1045
|
-
|
|
1045
|
+
As,
|
|
1046
1046
|
"Input"
|
|
1047
1047
|
);
|
|
1048
1048
|
}
|
|
@@ -1469,7 +1469,7 @@ class pt {
|
|
|
1469
1469
|
}
|
|
1470
1470
|
}
|
|
1471
1471
|
static async load(e, t, r, o) {
|
|
1472
|
-
const n = t.getResourceData(r, !0), i = t.getKValueJson(r,
|
|
1472
|
+
const n = t.getResourceData(r, !0), i = t.getKValueJson(r, ks), l = t.getKValueJson(r, Ge), a = t.getKValueJson(r, Me), c = t.getKValueJson(r, ge), u = t.getKValueJson(r, dt), d = t.listKeyValuesString(r), p = await n, f = /* @__PURE__ */ new Map();
|
|
1473
1473
|
for (const h of p.fields) {
|
|
1474
1474
|
const w = vn(h.name);
|
|
1475
1475
|
if (w === void 0) continue;
|
|
@@ -1484,7 +1484,7 @@ class pt {
|
|
|
1484
1484
|
const w = h.fields;
|
|
1485
1485
|
for (const [v, b] of Object.entries(w)) {
|
|
1486
1486
|
if (b.ref === void 0) continue;
|
|
1487
|
-
if (!
|
|
1487
|
+
if (!wo(b.ref) || So(b.ref))
|
|
1488
1488
|
throw new Error("unexpected behaviour");
|
|
1489
1489
|
const E = v;
|
|
1490
1490
|
k.push([
|
|
@@ -1510,7 +1510,7 @@ class pt {
|
|
|
1510
1510
|
u,
|
|
1511
1511
|
d
|
|
1512
1512
|
]);
|
|
1513
|
-
if (m !==
|
|
1513
|
+
if (m !== Rs)
|
|
1514
1514
|
throw new Error(
|
|
1515
1515
|
`Can't act on this project resource because it has a wrong schema version: ${m}`
|
|
1516
1516
|
);
|
|
@@ -1528,7 +1528,7 @@ class pt {
|
|
|
1528
1528
|
const v = await w, b = ct(I(v.data));
|
|
1529
1529
|
h.blockConfig = Se(b.config), h.blockPack = b.source;
|
|
1530
1530
|
}
|
|
1531
|
-
const X = await
|
|
1531
|
+
const X = await Ns(), Z = Nt(X.hash), _ = p.fields.find(
|
|
1532
1532
|
(h) => h.name === Z
|
|
1533
1533
|
);
|
|
1534
1534
|
let ee;
|
|
@@ -1580,8 +1580,8 @@ async function Wn(s, e = ln) {
|
|
|
1580
1580
|
const t = s.createEphemeral(un);
|
|
1581
1581
|
s.lock(t);
|
|
1582
1582
|
const r = String(Date.now());
|
|
1583
|
-
s.setKValue(t,
|
|
1584
|
-
const o = await
|
|
1583
|
+
s.setKValue(t, ks, JSON.stringify(Rs)), s.setKValue(t, Ht, r), s.setKValue(t, Ge, r), s.setKValue(t, Me, JSON.stringify(e)), s.setKValue(t, ge, JSON.stringify(an)), s.setKValue(t, dt, JSON.stringify(cn));
|
|
1584
|
+
const o = await Ns();
|
|
1585
1585
|
return s.createField(
|
|
1586
1586
|
x(t, Nt(o.hash)),
|
|
1587
1587
|
"Dynamic",
|
|
@@ -1741,7 +1741,7 @@ function ti(s) {
|
|
|
1741
1741
|
parts: r
|
|
1742
1742
|
};
|
|
1743
1743
|
}
|
|
1744
|
-
throw new Error(`unsupported resource type: ${
|
|
1744
|
+
throw new Error(`unsupported resource type: ${bo(s.resourceType)}`);
|
|
1745
1745
|
}
|
|
1746
1746
|
function ri(s, e) {
|
|
1747
1747
|
const t = s.axesSpec.length, r = {};
|
|
@@ -1766,7 +1766,7 @@ function Or(s, e) {
|
|
|
1766
1766
|
function oi(s, e) {
|
|
1767
1767
|
return B({ resolvePath: s, name: e });
|
|
1768
1768
|
}
|
|
1769
|
-
function
|
|
1769
|
+
function Bs(s, e = !0, t = !1, r = "") {
|
|
1770
1770
|
var l, a, c;
|
|
1771
1771
|
const o = /^(?<name>.*)\.(?<type>spec|data)$/, n = /* @__PURE__ */ new Map();
|
|
1772
1772
|
for (const u of s.listInputFields()) {
|
|
@@ -1806,8 +1806,8 @@ function Ns(s, e = !0, t = !1, r = "") {
|
|
|
1806
1806
|
}
|
|
1807
1807
|
function ni(s, e = !0, t = "", r) {
|
|
1808
1808
|
if (!s.getIsReadyOrError()) throw new Error("resource is not ready");
|
|
1809
|
-
const o =
|
|
1810
|
-
|
|
1809
|
+
const o = Bs(s, e, !1, t);
|
|
1810
|
+
Bo(o.locked);
|
|
1811
1811
|
const n = {};
|
|
1812
1812
|
for (const [i, l] of o.results) {
|
|
1813
1813
|
if (l.spec === void 0) throw new Error(`no spec for key ${i}`);
|
|
@@ -1952,7 +1952,7 @@ class qt {
|
|
|
1952
1952
|
for (const r of this.blocks.values()) {
|
|
1953
1953
|
const o = /* @__PURE__ */ new Set(), n = (i) => {
|
|
1954
1954
|
for (const [l, a] of i.results)
|
|
1955
|
-
o.has(l) || a.spec === void 0 || (o.add(l),
|
|
1955
|
+
o.has(l) || a.spec === void 0 || (o.add(l), oo(e, a.spec) && t.push({
|
|
1956
1956
|
label: r.info.label + " / " + l,
|
|
1957
1957
|
ref: Ze(r.info.id, l),
|
|
1958
1958
|
spec: a.spec
|
|
@@ -1995,7 +1995,7 @@ class qt {
|
|
|
1995
1995
|
function Fr(s, e) {
|
|
1996
1996
|
if (e === void 0)
|
|
1997
1997
|
return s ? { locked: !1, results: /* @__PURE__ */ new Map() } : void 0;
|
|
1998
|
-
if (e.ok) return
|
|
1998
|
+
if (e.ok) return Bs(e.value, !1, !0);
|
|
1999
1999
|
}
|
|
2000
2000
|
function zt(s, e) {
|
|
2001
2001
|
return {
|
|
@@ -2021,7 +2021,7 @@ function zt(s, e) {
|
|
|
2021
2021
|
}
|
|
2022
2022
|
};
|
|
2023
2023
|
}
|
|
2024
|
-
function
|
|
2024
|
+
function js(s, e) {
|
|
2025
2025
|
return {
|
|
2026
2026
|
...zt(s, e),
|
|
2027
2027
|
prod: (t) => {
|
|
@@ -2142,7 +2142,7 @@ const li = (s) => {
|
|
|
2142
2142
|
return ht((o = r.accessor(e).node().traverse(t)) == null ? void 0 : o.persist());
|
|
2143
2143
|
};
|
|
2144
2144
|
};
|
|
2145
|
-
function
|
|
2145
|
+
function xs(s, e) {
|
|
2146
2146
|
const t = {}, r = s.length;
|
|
2147
2147
|
for (let o = 0; o < r; o++) t[String(o)] = e(s[o]);
|
|
2148
2148
|
return t;
|
|
@@ -2152,12 +2152,12 @@ function pi(s, e) {
|
|
|
2152
2152
|
const r = t.source;
|
|
2153
2153
|
return r === void 0 ? $(void 0) : () => ({
|
|
2154
2154
|
type: "ScheduleSubroutine",
|
|
2155
|
-
subroutine:
|
|
2156
|
-
args:
|
|
2155
|
+
subroutine: Vs(r.length),
|
|
2156
|
+
args: xs(r, (o) => O({ ...s, [e.itVar]: o }, e.mapping))
|
|
2157
2157
|
});
|
|
2158
2158
|
};
|
|
2159
2159
|
}
|
|
2160
|
-
function
|
|
2160
|
+
function Vs(s) {
|
|
2161
2161
|
return (e) => {
|
|
2162
2162
|
const t = [];
|
|
2163
2163
|
for (let r = 0; r < s; r++) t.push(e[String(r)]);
|
|
@@ -2322,7 +2322,7 @@ function O(s, e) {
|
|
|
2322
2322
|
case "Isolate":
|
|
2323
2323
|
return ({ drivers: t }) => ({
|
|
2324
2324
|
type: "ScheduleComputable",
|
|
2325
|
-
computable:
|
|
2325
|
+
computable: Gs(t, s, e.cfg)
|
|
2326
2326
|
});
|
|
2327
2327
|
case "Immediate":
|
|
2328
2328
|
return $(e.value);
|
|
@@ -2360,8 +2360,8 @@ function O(s, e) {
|
|
|
2360
2360
|
case "MakeArray":
|
|
2361
2361
|
return () => ({
|
|
2362
2362
|
type: "ScheduleSubroutine",
|
|
2363
|
-
subroutine:
|
|
2364
|
-
args:
|
|
2363
|
+
subroutine: Vs(e.template.length),
|
|
2364
|
+
args: xs(e.template, (t) => O(s, t))
|
|
2365
2365
|
});
|
|
2366
2366
|
case "Flatten":
|
|
2367
2367
|
return () => ({
|
|
@@ -2535,9 +2535,9 @@ function Ni(s) {
|
|
|
2535
2535
|
$staging: s.staging
|
|
2536
2536
|
};
|
|
2537
2537
|
}
|
|
2538
|
-
const
|
|
2538
|
+
const Us = Symbol(), Js = "return", Bi = { op: Us, arg: Js };
|
|
2539
2539
|
function ji(s) {
|
|
2540
|
-
return s.op ==
|
|
2540
|
+
return s.op == Us && s.arg == Js;
|
|
2541
2541
|
}
|
|
2542
2542
|
function xi() {
|
|
2543
2543
|
return { pendingSubroutines: /* @__PURE__ */ new Map() };
|
|
@@ -2597,9 +2597,9 @@ function Ir(s, e, t, r) {
|
|
|
2597
2597
|
return i;
|
|
2598
2598
|
}
|
|
2599
2599
|
function Vi(s, e, t, r = {}) {
|
|
2600
|
-
return
|
|
2600
|
+
return Gs(s, Ni(e), t, r);
|
|
2601
2601
|
}
|
|
2602
|
-
function
|
|
2602
|
+
function Gs(s, e, t, r = {}) {
|
|
2603
2603
|
const o = `${e.blockId}#` + B({
|
|
2604
2604
|
ctx: Object.fromEntries(
|
|
2605
2605
|
Object.entries(e).filter(([n]) => Di.indexOf(n) === -1)
|
|
@@ -3177,7 +3177,7 @@ class _e {
|
|
|
3177
3177
|
this.vm.setProp(t, "callbackRegistry", this.callbackRegistry), this.vm.setProp(
|
|
3178
3178
|
t,
|
|
3179
3179
|
"featureFlags",
|
|
3180
|
-
this.exportObjectUniversal(
|
|
3180
|
+
this.exportObjectUniversal(no.GlobalCfgRenderCtxFeatureFlags, e)
|
|
3181
3181
|
), this.computableHelper !== void 0 && this.computableHelper.injectCtx(t), this.vm.setProp(this.vm.global, "cfgRenderCtx", t);
|
|
3182
3182
|
});
|
|
3183
3183
|
}
|
|
@@ -3199,7 +3199,7 @@ class Gi {
|
|
|
3199
3199
|
}
|
|
3200
3200
|
/** Returns the original error that was stored by parsing uuid of mimicrated error. */
|
|
3201
3201
|
getOriginal(e) {
|
|
3202
|
-
if (!(e instanceof
|
|
3202
|
+
if (!(e instanceof jo.QuickJSUnwrapError))
|
|
3203
3203
|
return console.warn("ErrorRepo: quickJSError is not a QuickJSUnwrapError", ze(e)), e;
|
|
3204
3204
|
if (!("name" in e.cause))
|
|
3205
3205
|
return console.warn("ErrorRepo: quickJSError.cause is not an Error", ze(e)), e;
|
|
@@ -3209,7 +3209,7 @@ class Gi {
|
|
|
3209
3209
|
const o = this.errorIdToError.get(r);
|
|
3210
3210
|
if (o === void 0)
|
|
3211
3211
|
throw new Error(`ErrorRepo: errorId not found: ${r}, ${ze(e)}`);
|
|
3212
|
-
return new
|
|
3212
|
+
return new Vo(e, o);
|
|
3213
3213
|
}
|
|
3214
3214
|
}
|
|
3215
3215
|
function Ke(s, e) {
|
|
@@ -3368,7 +3368,7 @@ function Wi(s, e, t) {
|
|
|
3368
3368
|
D.code,
|
|
3369
3369
|
V
|
|
3370
3370
|
).wrap({
|
|
3371
|
-
recover: (
|
|
3371
|
+
recover: (to) => (t.logger.error("Error in block model title"), t.logger.error(to), "Invalid title")
|
|
3372
3372
|
})
|
|
3373
3373
|
),
|
|
3374
3374
|
inputsValid: je(
|
|
@@ -3446,11 +3446,11 @@ function Wi(s, e, t) {
|
|
|
3446
3446
|
}
|
|
3447
3447
|
function qi(s, e) {
|
|
3448
3448
|
const t = s.node();
|
|
3449
|
-
if (le(t.resourceType,
|
|
3449
|
+
if (le(t.resourceType, Is)) {
|
|
3450
3450
|
const r = t.getDataAsJson();
|
|
3451
3451
|
if (r === void 0) throw new Error("No resource data.");
|
|
3452
3452
|
return e.frontendDownloadDriver.getPath(new URL(r.url)).withStableType();
|
|
3453
|
-
} else if (le(t.resourceType,
|
|
3453
|
+
} else if (le(t.resourceType, Ts)) {
|
|
3454
3454
|
const r = t.getDataAsJson();
|
|
3455
3455
|
if (r === void 0) throw new Error("No resource data.");
|
|
3456
3456
|
return e.signer.verify(
|
|
@@ -3486,7 +3486,7 @@ function Xi(s, e, t) {
|
|
|
3486
3486
|
assertFieldType: "Dynamic"
|
|
3487
3487
|
},
|
|
3488
3488
|
{ field: F.HolderRefField, assertFieldType: "Input", errorIfFieldNotFound: !0 },
|
|
3489
|
-
{ field:
|
|
3489
|
+
{ field: Ls, assertFieldType: "Input" }
|
|
3490
3490
|
)) == null ? void 0 : l.persist();
|
|
3491
3491
|
return {
|
|
3492
3492
|
path: zi(i, t),
|
|
@@ -3496,9 +3496,9 @@ function Xi(s, e, t) {
|
|
|
3496
3496
|
{ mode: "StableOnlyLive" }
|
|
3497
3497
|
);
|
|
3498
3498
|
}
|
|
3499
|
-
function
|
|
3499
|
+
function Ms(s, e, t) {
|
|
3500
3500
|
if (t === void 0)
|
|
3501
|
-
return M.make((i) =>
|
|
3501
|
+
return M.make((i) => Ms(s, e, i), {
|
|
3502
3502
|
key: `inputs#${ke(s.rid)}#${e}`
|
|
3503
3503
|
});
|
|
3504
3504
|
const r = t.accessor(s).node(), o = zt(s, e), n = o.uiState(t);
|
|
@@ -3513,7 +3513,7 @@ function Gs(s, e, t) {
|
|
|
3513
3513
|
function Yi(s, e, t) {
|
|
3514
3514
|
return M.make(
|
|
3515
3515
|
(r) => {
|
|
3516
|
-
const o = r.accessor(s).node(), n =
|
|
3516
|
+
const o = r.accessor(s).node(), n = js(s, e);
|
|
3517
3517
|
return Be(Ke(o, e), ({ cfg: i, bpId: l }) => {
|
|
3518
3518
|
const a = {};
|
|
3519
3519
|
for (const [c, u] of Object.entries(i.outputs)) {
|
|
@@ -3534,7 +3534,7 @@ function Qi(s, e) {
|
|
|
3534
3534
|
if (l === void 0) continue;
|
|
3535
3535
|
const a = Object.entries(l.cfg.outputs).map(([, u]) => u).filter((u) => Ki(u)).map((u) => u);
|
|
3536
3536
|
if (a.length === 0) continue;
|
|
3537
|
-
const c =
|
|
3537
|
+
const c = js(r.persist(), i);
|
|
3538
3538
|
for (const u of a)
|
|
3539
3539
|
n.push(
|
|
3540
3540
|
M.wrapError(je(e, c, u, l.cfg.code, l.bpId))
|
|
@@ -3557,7 +3557,7 @@ class Zi {
|
|
|
3557
3557
|
}
|
|
3558
3558
|
readState(e, t) {
|
|
3559
3559
|
let r = this.states.get(t);
|
|
3560
|
-
return r === void 0 && (r = { state: { ...
|
|
3560
|
+
return r === void 0 && (r = { state: { ...io }, change: new hr() }, this.states.set(t, r)), r.change.attachWatcher(e.watcher), r.state;
|
|
3561
3561
|
}
|
|
3562
3562
|
getState(e) {
|
|
3563
3563
|
return M.make(
|
|
@@ -3599,12 +3599,12 @@ class Xt {
|
|
|
3599
3599
|
e.doRefresh(this.env.ops.stagingRenderingRate);
|
|
3600
3600
|
}), await this.activeConfigs.getValue(), await ps(this.env.ops.projectRefreshInterval, this.abortController.signal);
|
|
3601
3601
|
} catch (e) {
|
|
3602
|
-
if (
|
|
3602
|
+
if (ko(e)) {
|
|
3603
3603
|
console.warn(
|
|
3604
3604
|
"project refresh routine terminated, because project was externally deleted"
|
|
3605
3605
|
);
|
|
3606
3606
|
break;
|
|
3607
|
-
} else if (!
|
|
3607
|
+
} else if (!Ro(e))
|
|
3608
3608
|
throw new Error("Unexpected exception", { cause: e });
|
|
3609
3609
|
}
|
|
3610
3610
|
}
|
|
@@ -3790,7 +3790,7 @@ class Xt {
|
|
|
3790
3790
|
const r = Yi(this.projectTree.entry(), e, this.env), n = {
|
|
3791
3791
|
fullState: M.make(
|
|
3792
3792
|
(i) => ({
|
|
3793
|
-
argsAndUiState:
|
|
3793
|
+
argsAndUiState: Ms(this.projectTree.entry(), e, i),
|
|
3794
3794
|
outputs: r,
|
|
3795
3795
|
navigationState: this.navigationStates.getState(e),
|
|
3796
3796
|
overview: this.overview
|
|
@@ -3863,7 +3863,7 @@ class Xt {
|
|
|
3863
3863
|
var a, c;
|
|
3864
3864
|
return (((a = l.data) == null ? void 0 : a.byteLength) ?? 0) - (((c = i.data) == null ? void 0 : c.byteLength) ?? 0);
|
|
3865
3865
|
});
|
|
3866
|
-
const n =
|
|
3866
|
+
const n = Fo(o);
|
|
3867
3867
|
await lt.writeFile(`${ke(t)}.json`, Ar(o)), await lt.writeFile(`${ke(t)}.stats.json`, Ar(n));
|
|
3868
3868
|
}
|
|
3869
3869
|
return new Xt(e, t, r);
|
|
@@ -3903,7 +3903,7 @@ function sa(s) {
|
|
|
3903
3903
|
}
|
|
3904
3904
|
return e;
|
|
3905
3905
|
}
|
|
3906
|
-
const
|
|
3906
|
+
const _s = {
|
|
3907
3907
|
logger: new is(),
|
|
3908
3908
|
blobDriverOps: {
|
|
3909
3909
|
cacheSoftSizeBytes: 8 * 1024 * 1024 * 1024,
|
|
@@ -3927,7 +3927,7 @@ const Ms = {
|
|
|
3927
3927
|
stopPollingDelay: 1e3
|
|
3928
3928
|
}
|
|
3929
3929
|
};
|
|
3930
|
-
function
|
|
3930
|
+
function Ks(s) {
|
|
3931
3931
|
return {
|
|
3932
3932
|
blobDownloadPath: U.join(s, "download"),
|
|
3933
3933
|
downloadBlobToURLPath: U.join(s, "downloadToURL"),
|
|
@@ -3935,7 +3935,7 @@ function _s(s) {
|
|
|
3935
3935
|
};
|
|
3936
3936
|
}
|
|
3937
3937
|
const oa = {
|
|
3938
|
-
...
|
|
3938
|
+
..._s,
|
|
3939
3939
|
defaultTreeOptions: {
|
|
3940
3940
|
pollingInterval: 350,
|
|
3941
3941
|
stopPollingDelay: 2500,
|
|
@@ -3951,7 +3951,7 @@ const oa = {
|
|
|
3951
3951
|
};
|
|
3952
3952
|
function na(s) {
|
|
3953
3953
|
return {
|
|
3954
|
-
...
|
|
3954
|
+
...Ks(s),
|
|
3955
3955
|
frontendDownloadPath: U.join(s, "frontend")
|
|
3956
3956
|
};
|
|
3957
3957
|
}
|
|
@@ -3959,8 +3959,8 @@ function ia(s) {
|
|
|
3959
3959
|
return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
|
|
3960
3960
|
}
|
|
3961
3961
|
var Vt = { exports: {} };
|
|
3962
|
-
const aa = "2.0.0",
|
|
3963
|
-
9007199254740991, la = 16, ua =
|
|
3962
|
+
const aa = "2.0.0", Hs = 256, ca = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
|
|
3963
|
+
9007199254740991, la = 16, ua = Hs - 6, da = [
|
|
3964
3964
|
"major",
|
|
3965
3965
|
"premajor",
|
|
3966
3966
|
"minor",
|
|
@@ -3970,7 +3970,7 @@ const aa = "2.0.0", Ks = 256, ca = Number.MAX_SAFE_INTEGER || /* istanbul ignore
|
|
|
3970
3970
|
"prerelease"
|
|
3971
3971
|
];
|
|
3972
3972
|
var gt = {
|
|
3973
|
-
MAX_LENGTH:
|
|
3973
|
+
MAX_LENGTH: Hs,
|
|
3974
3974
|
MAX_SAFE_COMPONENT_LENGTH: la,
|
|
3975
3975
|
MAX_SAFE_BUILD_LENGTH: ua,
|
|
3976
3976
|
MAX_SAFE_INTEGER: ca,
|
|
@@ -4008,15 +4008,15 @@ var mt = pa;
|
|
|
4008
4008
|
var We = Vt.exports;
|
|
4009
4009
|
const fa = Object.freeze({ loose: !0 }), ha = Object.freeze({}), ga = (s) => s ? typeof s != "object" ? fa : s : ha;
|
|
4010
4010
|
var Yt = ga;
|
|
4011
|
-
const Lr = /^[0-9]+$/,
|
|
4011
|
+
const Lr = /^[0-9]+$/, Ws = (s, e) => {
|
|
4012
4012
|
const t = Lr.test(s), r = Lr.test(e);
|
|
4013
4013
|
return t && r && (s = +s, e = +e), s === e ? 0 : t && !r ? -1 : r && !t ? 1 : s < e ? -1 : 1;
|
|
4014
|
-
}, ma = (s, e) =>
|
|
4015
|
-
var
|
|
4016
|
-
compareIdentifiers:
|
|
4014
|
+
}, ma = (s, e) => Ws(e, s);
|
|
4015
|
+
var qs = {
|
|
4016
|
+
compareIdentifiers: Ws,
|
|
4017
4017
|
rcompareIdentifiers: ma
|
|
4018
4018
|
};
|
|
4019
|
-
const rt = mt, { MAX_LENGTH: Dr, MAX_SAFE_INTEGER: st } = gt, { safeRe: Nr, safeSrc: Br, t: ot } = We, va = Yt, { compareIdentifiers: ye } =
|
|
4019
|
+
const rt = mt, { MAX_LENGTH: Dr, MAX_SAFE_INTEGER: st } = gt, { safeRe: Nr, safeSrc: Br, t: ot } = We, va = Yt, { compareIdentifiers: ye } = qs;
|
|
4020
4020
|
let ya = class ie {
|
|
4021
4021
|
constructor(e, t) {
|
|
4022
4022
|
if (t = va(t), e instanceof ie) {
|
|
@@ -4248,14 +4248,14 @@ var vt = sc;
|
|
|
4248
4248
|
const oc = oe, nc = (s, e, t) => oc(s, e, t) < 0;
|
|
4249
4249
|
var Zt = nc;
|
|
4250
4250
|
const ic = oe, ac = (s, e, t) => ic(s, e, t) === 0;
|
|
4251
|
-
var
|
|
4251
|
+
var zs = ac;
|
|
4252
4252
|
const cc = oe, lc = (s, e, t) => cc(s, e, t) !== 0;
|
|
4253
|
-
var
|
|
4253
|
+
var Xs = lc;
|
|
4254
4254
|
const uc = oe, dc = (s, e, t) => uc(s, e, t) >= 0;
|
|
4255
4255
|
var er = dc;
|
|
4256
4256
|
const pc = oe, fc = (s, e, t) => pc(s, e, t) <= 0;
|
|
4257
4257
|
var tr = fc;
|
|
4258
|
-
const hc =
|
|
4258
|
+
const hc = zs, gc = Xs, mc = vt, vc = er, yc = Zt, wc = tr, Sc = (s, e, t, r) => {
|
|
4259
4259
|
switch (e) {
|
|
4260
4260
|
case "===":
|
|
4261
4261
|
return typeof s == "object" && (s = s.version), typeof t == "object" && (t = t.version), s === t;
|
|
@@ -4279,7 +4279,7 @@ const hc = qs, gc = zs, mc = vt, vc = er, yc = Zt, wc = tr, Sc = (s, e, t, r) =>
|
|
|
4279
4279
|
throw new TypeError(`Invalid operator: ${e}`);
|
|
4280
4280
|
}
|
|
4281
4281
|
};
|
|
4282
|
-
var
|
|
4282
|
+
var Ys = Sc;
|
|
4283
4283
|
const bc = z, kc = Pe, { safeRe: nt, t: it } = We, Rc = (s, e) => {
|
|
4284
4284
|
if (s instanceof bc)
|
|
4285
4285
|
return s;
|
|
@@ -4507,7 +4507,7 @@ function yt() {
|
|
|
4507
4507
|
}
|
|
4508
4508
|
}
|
|
4509
4509
|
Ct = e;
|
|
4510
|
-
const t = Yt, { safeRe: r, t: o } = We, n =
|
|
4510
|
+
const t = Yt, { safeRe: r, t: o } = We, n = Ys, i = mt, l = z, a = ne();
|
|
4511
4511
|
return Ct;
|
|
4512
4512
|
}
|
|
4513
4513
|
const $c = ne(), Oc = (s, e, t) => {
|
|
@@ -4582,7 +4582,7 @@ const Mc = ne(), _c = (s, e) => {
|
|
|
4582
4582
|
}
|
|
4583
4583
|
};
|
|
4584
4584
|
var Kc = _c;
|
|
4585
|
-
const Hc = z,
|
|
4585
|
+
const Hc = z, Qs = yt(), { ANY: Wc } = Qs, qc = ne(), zc = wt, Kr = vt, Hr = Zt, Xc = tr, Yc = er, Qc = (s, e, t, r) => {
|
|
4586
4586
|
s = new Hc(s, r), e = new qc(e, r);
|
|
4587
4587
|
let o, n, i, l, a;
|
|
4588
4588
|
switch (t) {
|
|
@@ -4601,7 +4601,7 @@ const Hc = z, Ys = yt(), { ANY: Wc } = Ys, qc = ne(), zc = wt, Kr = vt, Hr = Zt,
|
|
|
4601
4601
|
const u = e.set[c];
|
|
4602
4602
|
let d = null, p = null;
|
|
4603
4603
|
if (u.forEach((f) => {
|
|
4604
|
-
f.semver === Wc && (f = new
|
|
4604
|
+
f.semver === Wc && (f = new Qs(">=0.0.0")), d = d || f, p = p || f, o(f.semver, d.semver, r) ? d = f : i(f.semver, p.semver, r) && (p = f);
|
|
4605
4605
|
}), d.operator === l || d.operator === a || (!p.operator || p.operator === l) && n(s, p.semver))
|
|
4606
4606
|
return !1;
|
|
4607
4607
|
if (p.operator === a && i(s, p.semver))
|
|
@@ -4712,7 +4712,7 @@ const qr = ne(), sr = yt(), { ANY: Pt } = sr, Te = wt, or = oe, ul = (s, e, t =
|
|
|
4712
4712
|
return r < 0 ? s : r > 0 || e.operator === "<" && s.operator === "<=" ? e : s;
|
|
4713
4713
|
};
|
|
4714
4714
|
var fl = ul;
|
|
4715
|
-
const $t = We, Qr = gt, hl = z, Zr =
|
|
4715
|
+
const $t = We, Qr = gt, hl = z, Zr = qs, gl = Pe, ml = ka, vl = Ea, yl = $a, wl = Fa, Sl = Aa, bl = Na, kl = xa, Rl = Ja, Cl = oe, El = Ka, Pl = qa, $l = Qt, Ol = Qa, Fl = tc, Il = vt, Tl = Zt, Al = zs, Ll = Xs, Dl = er, Nl = tr, Bl = Ys, jl = Cc, xl = yt(), Vl = ne(), Ul = wt, Jl = Tc, Gl = Nc, Ml = Vc, _l = Gc, Kl = Kc, Hl = rr, Wl = tl, ql = ol, zl = il, Xl = ll, Yl = fl;
|
|
4716
4716
|
var Ql = {
|
|
4717
4717
|
parse: gl,
|
|
4718
4718
|
valid: ml,
|
|
@@ -4763,7 +4763,7 @@ var Ql = {
|
|
|
4763
4763
|
const Zl = /* @__PURE__ */ ia(Ql), eu = {
|
|
4764
4764
|
minDelay: 1500
|
|
4765
4765
|
}, tu = "__no_updates__";
|
|
4766
|
-
class ru extends
|
|
4766
|
+
class ru extends To {
|
|
4767
4767
|
constructor(t, r, o = {}) {
|
|
4768
4768
|
super({ ...o, ...eu }, r);
|
|
4769
4769
|
S(this, "http");
|
|
@@ -4789,7 +4789,7 @@ class ru extends Io {
|
|
|
4789
4789
|
switch (n.type) {
|
|
4790
4790
|
case "dev-v1":
|
|
4791
4791
|
try {
|
|
4792
|
-
const i = await
|
|
4792
|
+
const i = await bs(n.folder);
|
|
4793
4793
|
return i === n.mtime ? { suggestions: [] } : { mainSuggestion: { ...n, mtime: i }, suggestions: [] };
|
|
4794
4794
|
} catch (i) {
|
|
4795
4795
|
return this.logger.warn(i), { suggestions: [] };
|
|
@@ -4815,7 +4815,7 @@ class ru extends Io {
|
|
|
4815
4815
|
else {
|
|
4816
4816
|
if (await a.getLatestOverview(n.id, De) === void 0)
|
|
4817
4817
|
return this.logger.error(
|
|
4818
|
-
`No "any" channel record for ${
|
|
4818
|
+
`No "any" channel record for ${co(n.id)}`
|
|
4819
4819
|
), { suggestions: [] };
|
|
4820
4820
|
c = De;
|
|
4821
4821
|
}
|
|
@@ -4961,7 +4961,7 @@ class ou {
|
|
|
4961
4961
|
)).values()
|
|
4962
4962
|
];
|
|
4963
4963
|
try {
|
|
4964
|
-
const a = new
|
|
4964
|
+
const a = new ys(this.spillPath, ue().logPFrameRequests ? i : void 0);
|
|
4965
4965
|
a.setDataSource(this);
|
|
4966
4966
|
for (const c of l)
|
|
4967
4967
|
a.addColumnSpec(c.id, c.spec), a.setColumnData(c.id, c.data);
|
|
@@ -5003,7 +5003,7 @@ class nr {
|
|
|
5003
5003
|
// 1Gb
|
|
5004
5004
|
fetchMethod: async (i) => await as.readFile(i),
|
|
5005
5005
|
sizeCalculation: (i) => i.length
|
|
5006
|
-
}), n = new
|
|
5006
|
+
}), n = new mo(4);
|
|
5007
5007
|
this.concurrencyLimiter = n, this.pFrames = new class extends es {
|
|
5008
5008
|
constructor(i, l, a) {
|
|
5009
5009
|
super(), this.blobDriver = i, this.logger = l, this.spillPath = a;
|
|
@@ -5046,9 +5046,12 @@ class nr {
|
|
|
5046
5046
|
}
|
|
5047
5047
|
}(this.pFrames);
|
|
5048
5048
|
}
|
|
5049
|
+
async pprofDump() {
|
|
5050
|
+
return await ys.pprofDump();
|
|
5051
|
+
}
|
|
5049
5052
|
static async init(e, t, r) {
|
|
5050
|
-
const o =
|
|
5051
|
-
return await
|
|
5053
|
+
const o = ho.resolve(r);
|
|
5054
|
+
return await vo(o), new nr(e, t, o);
|
|
5052
5055
|
}
|
|
5053
5056
|
//
|
|
5054
5057
|
// Internal / Config API Methods
|
|
@@ -5057,13 +5060,13 @@ class nr {
|
|
|
5057
5060
|
const r = e.filter((n) => su.find((i) => i === n.spec.valueType)).map(
|
|
5058
5061
|
(n) => fe(
|
|
5059
5062
|
n,
|
|
5060
|
-
(i) =>
|
|
5063
|
+
(i) => Io(i) ? ti(i) : ss(i) ? os(i, (l) => l.resourceInfo) : ri(n.spec, i)
|
|
5061
5064
|
)
|
|
5062
5065
|
), o = this.pFrames.acquire(r);
|
|
5063
5066
|
return t.addOnDestroy(o.unref), o.key;
|
|
5064
5067
|
}
|
|
5065
5068
|
createPTable(e, t, r) {
|
|
5066
|
-
const o = this.createPFrame(
|
|
5069
|
+
const o = this.createPFrame(ao(e.src), t), n = Ft(e, (l) => l.id), i = this.pTables.acquire({ def: n, pFrameHandle: o, signal: r });
|
|
5067
5070
|
return ue().logPFrameRequests && this.logger.info(
|
|
5068
5071
|
`Create PTable call (pFrameHandle = ${o}; pTableHandle = ${JSON.stringify(i)}): ${JSON.stringify(
|
|
5069
5072
|
Ft(e, (l) => l.spec),
|
|
@@ -5240,29 +5243,29 @@ function au(s) {
|
|
|
5240
5243
|
}
|
|
5241
5244
|
async function cu(s, e, t) {
|
|
5242
5245
|
const r = {
|
|
5243
|
-
...
|
|
5244
|
-
...
|
|
5246
|
+
..._s,
|
|
5247
|
+
...Ks(e),
|
|
5245
5248
|
...t
|
|
5246
|
-
}, o = new Jt(r.localSecret), n = fs(r.logger, s, r.localProjections), i =
|
|
5249
|
+
}, o = new Jt(r.localSecret), n = fs(r.logger, s, r.localProjections), i = Uo(s, r.logger), l = hs(s, r.logger), a = Jo(s, r.logger), c = new Go(
|
|
5247
5250
|
r.logger,
|
|
5248
5251
|
n,
|
|
5249
5252
|
i,
|
|
5250
5253
|
r.blobDownloadPath,
|
|
5251
5254
|
o,
|
|
5252
5255
|
r.blobDriverOps
|
|
5253
|
-
), u = new
|
|
5256
|
+
), u = new Mo(
|
|
5254
5257
|
r.logger,
|
|
5255
5258
|
o,
|
|
5256
5259
|
n,
|
|
5257
5260
|
r.downloadBlobToURLPath,
|
|
5258
5261
|
r.downloadBlobToURLDriverOps
|
|
5259
|
-
), d = new
|
|
5262
|
+
), d = new _o(
|
|
5260
5263
|
r.logger,
|
|
5261
5264
|
o,
|
|
5262
5265
|
l,
|
|
5263
5266
|
a,
|
|
5264
5267
|
r.uploadDriverOps
|
|
5265
|
-
), p = new
|
|
5268
|
+
), p = new Ko(r.logger, i, r.logStreamDriverOps), f = new Ho(r.logger, p, c), k = await gs.init(
|
|
5266
5269
|
r.logger,
|
|
5267
5270
|
s,
|
|
5268
5271
|
o,
|
|
@@ -5306,7 +5309,7 @@ class lu {
|
|
|
5306
5309
|
return this.enrichmentTargetsCache.memo(n, { context: o }).value;
|
|
5307
5310
|
}
|
|
5308
5311
|
}
|
|
5309
|
-
class
|
|
5312
|
+
class Zs {
|
|
5310
5313
|
constructor(e, t, r, o, n, i, l, a) {
|
|
5311
5314
|
S(this, "pl");
|
|
5312
5315
|
/** Contains a reactive list of projects along with their meta information. */
|
|
@@ -5328,7 +5331,7 @@ class Qs {
|
|
|
5328
5331
|
async createProject(e, t = Re()) {
|
|
5329
5332
|
const r = await this.pl.withWriteTx("MLCreateProject", async (o) => {
|
|
5330
5333
|
const n = await Wn(o, e);
|
|
5331
|
-
return o.createField(x(this.projectListResourceId, t), "Dynamic", n), await o.commit(), await
|
|
5334
|
+
return o.createField(x(this.projectListResourceId, t), "Dynamic", n), await o.commit(), await Co(n);
|
|
5332
5335
|
});
|
|
5333
5336
|
return await this.projectListTree.refreshState(), r;
|
|
5334
5337
|
}
|
|
@@ -5402,22 +5405,22 @@ class Qs {
|
|
|
5402
5405
|
P.createField(A, "Dynamic");
|
|
5403
5406
|
const j = await P.getField(A);
|
|
5404
5407
|
if (Ue(j.value)) {
|
|
5405
|
-
const T = P.createEphemeral(
|
|
5408
|
+
const T = P.createEphemeral(Cs);
|
|
5406
5409
|
return P.lock(T), P.setField(A, T), await P.commit(), await T.globalId;
|
|
5407
5410
|
} else
|
|
5408
5411
|
return j.value;
|
|
5409
|
-
}), i = o.logger, l = await cu(e, t, o), a = new
|
|
5412
|
+
}), i = o.logger, l = await cu(e, t, o), a = new lo(e.httpDispatcher, {
|
|
5410
5413
|
minTimeout: 250,
|
|
5411
5414
|
maxRetries: 4
|
|
5412
5415
|
}), c = new nn(a), u = new Un(
|
|
5413
5416
|
c,
|
|
5414
5417
|
l.signer,
|
|
5415
5418
|
a
|
|
5416
|
-
), d = new
|
|
5419
|
+
), d = new Wo(
|
|
5417
5420
|
i,
|
|
5418
5421
|
e.httpDispatcher,
|
|
5419
5422
|
o.frontendDownloadPath
|
|
5420
|
-
), p = await
|
|
5423
|
+
), p = await xo(), f = {
|
|
5421
5424
|
pl: e,
|
|
5422
5425
|
signer: l.signer,
|
|
5423
5426
|
logger: i,
|
|
@@ -5434,8 +5437,8 @@ class Qs {
|
|
|
5434
5437
|
}),
|
|
5435
5438
|
quickJs: p,
|
|
5436
5439
|
projectHelper: new lu(p)
|
|
5437
|
-
}, k = new
|
|
5438
|
-
return new
|
|
5440
|
+
}, k = new Ao([]), m = await Sn(e, n, k, f);
|
|
5441
|
+
return new Zs(
|
|
5439
5442
|
f,
|
|
5440
5443
|
l,
|
|
5441
5444
|
l.signer,
|
|
@@ -5590,9 +5593,9 @@ async function Su(s, e, t, r, o, n) {
|
|
|
5590
5593
|
);
|
|
5591
5594
|
try {
|
|
5592
5595
|
const c = await pe(o, l.progress);
|
|
5593
|
-
if (
|
|
5596
|
+
if (qo(c)) {
|
|
5594
5597
|
const u = ms.parse(JSON.parse(I((a = c.data) == null ? void 0 : a.toString())));
|
|
5595
|
-
|
|
5598
|
+
zo(e, u.localPath, u.pathSignature) && await vs(
|
|
5596
5599
|
s,
|
|
5597
5600
|
r,
|
|
5598
5601
|
c,
|
|
@@ -5737,7 +5740,7 @@ async function $u(s, e, t, r) {
|
|
|
5737
5740
|
}
|
|
5738
5741
|
}
|
|
5739
5742
|
async function Ou(s, e, t, r, o, n) {
|
|
5740
|
-
const i =
|
|
5743
|
+
const i = eo(s, e, "", 0);
|
|
5741
5744
|
let l, a = 0, c = 0;
|
|
5742
5745
|
for await (const { file: u, nLsRequests: d } of i) {
|
|
5743
5746
|
if (c = Math.max(c, d), a >= t && c > n)
|
|
@@ -5748,7 +5751,7 @@ async function Ou(s, e, t, r, o, n) {
|
|
|
5748
5751
|
}
|
|
5749
5752
|
return { file: l, nLsRequests: c, nCheckedFiles: a };
|
|
5750
5753
|
}
|
|
5751
|
-
async function*
|
|
5754
|
+
async function* eo(s, e, t, r) {
|
|
5752
5755
|
r++;
|
|
5753
5756
|
const o = await s.listRemoteFilesWithAdditionalInfo(e.handle, t);
|
|
5754
5757
|
for (const n of o.entries)
|
|
@@ -5758,20 +5761,20 @@ async function* Zs(s, e, t, r) {
|
|
|
5758
5761
|
nLsRequests: r
|
|
5759
5762
|
};
|
|
5760
5763
|
else if (n.type === "dir")
|
|
5761
|
-
for await (const i of
|
|
5764
|
+
for await (const i of eo(s, e, n.fullPath, r))
|
|
5762
5765
|
r = Math.max(i.nLsRequests, r), yield i;
|
|
5763
5766
|
}
|
|
5764
5767
|
async function Fu() {
|
|
5765
|
-
const s = U.join(
|
|
5768
|
+
const s = U.join(ws.tmpdir(), `check-network-big-temp-${Date.now()}.bin`), e = 20 * 1024 * 1024, t = Lo(e);
|
|
5766
5769
|
return await lt.appendFile(s, t), { filePath: s };
|
|
5767
5770
|
}
|
|
5768
5771
|
async function Iu() {
|
|
5769
|
-
const s = U.join(
|
|
5772
|
+
const s = U.join(ws.tmpdir(), `check-network-temp-${Date.now()}.txt`), e = "Hello, world! " + (/* @__PURE__ */ new Date()).toISOString();
|
|
5770
5773
|
return await lt.writeFile(s, e), { filePath: s, fileContent: e };
|
|
5771
5774
|
}
|
|
5772
5775
|
async function Oe(s, e, t, r, o) {
|
|
5773
5776
|
return await s.withWriteTx("TemplateRender", async (n) => {
|
|
5774
|
-
const i = await
|
|
5777
|
+
const i = await Fs(e), l = ft(n, i), a = Wt(
|
|
5775
5778
|
n,
|
|
5776
5779
|
l,
|
|
5777
5780
|
t,
|
|
@@ -5780,20 +5783,20 @@ async function Oe(s, e, t, r, o) {
|
|
|
5780
5783
|
), c = {};
|
|
5781
5784
|
for (const u of o) {
|
|
5782
5785
|
const d = x(s.clientRoot, u);
|
|
5783
|
-
n.createField(d, "Dynamic", a[u]), c[u] = await
|
|
5786
|
+
n.createField(d, "Dynamic", a[u]), c[u] = await Eo(d);
|
|
5784
5787
|
}
|
|
5785
5788
|
return await n.commit(), c;
|
|
5786
5789
|
});
|
|
5787
5790
|
}
|
|
5788
5791
|
async function pe(s, e) {
|
|
5789
|
-
return await
|
|
5792
|
+
return await Po(s, async (t) => {
|
|
5790
5793
|
const r = await t.tx.getField(e);
|
|
5791
5794
|
if (Tt(r.error)) {
|
|
5792
5795
|
const o = await t.tx.getResourceData(r.error, !0);
|
|
5793
5796
|
throw new Error(`getFieldValue of "${e.fieldName}" field failed: ${o.data}`);
|
|
5794
5797
|
}
|
|
5795
5798
|
if (Ue(r.value))
|
|
5796
|
-
throw new
|
|
5799
|
+
throw new $o();
|
|
5797
5800
|
return await t.tx.getResourceData(r.value, !0);
|
|
5798
5801
|
});
|
|
5799
5802
|
}
|
|
@@ -5883,7 +5886,7 @@ async function Tu(s, e, t, r = {}) {
|
|
|
5883
5886
|
everyStorageNFilesToCheck: 300,
|
|
5884
5887
|
everyStorageMinLsRequests: 50,
|
|
5885
5888
|
...r
|
|
5886
|
-
}, n =
|
|
5889
|
+
}, n = Oo(s, {
|
|
5887
5890
|
defaultRequestTimeout: o.pingTimeoutMs
|
|
5888
5891
|
});
|
|
5889
5892
|
n.alternativeRoot = `check_network_${Date.now()}`;
|
|
@@ -6026,13 +6029,13 @@ const Lu = [
|
|
|
6026
6029
|
export {
|
|
6027
6030
|
ud as BlockPackRegistry,
|
|
6028
6031
|
dd as CentralBlockRegistry,
|
|
6029
|
-
|
|
6030
|
-
|
|
6032
|
+
Ks as DefaultDriverKitOpsPaths,
|
|
6033
|
+
_s as DefaultDriverKitOpsSettings,
|
|
6031
6034
|
na as DefaultMiddleLayerOpsPaths,
|
|
6032
6035
|
oa as DefaultMiddleLayerOpsSettings,
|
|
6033
|
-
|
|
6034
|
-
|
|
6035
|
-
|
|
6036
|
+
Ts as FrontendFromFolderResourceType,
|
|
6037
|
+
Is as FrontendFromUrlResourceType,
|
|
6038
|
+
Zs as MiddleLayer,
|
|
6036
6039
|
Xt as Project,
|
|
6037
6040
|
Tn as TengoTemplateGet,
|
|
6038
6041
|
An as TengoTemplateGetRegistry,
|
|
@@ -6047,11 +6050,11 @@ export {
|
|
|
6047
6050
|
nn as V2RegistryProvider,
|
|
6048
6051
|
yd as checkNetwork,
|
|
6049
6052
|
Wt as createRenderTemplate,
|
|
6050
|
-
|
|
6053
|
+
bs as getDevV1PacketMtime,
|
|
6051
6054
|
Kt as getDevV2PacketMtime,
|
|
6052
6055
|
cu as initDriverKit,
|
|
6053
6056
|
Tu as initNetworkCheck,
|
|
6054
6057
|
ft as loadTemplate,
|
|
6055
|
-
|
|
6058
|
+
Fs as prepareTemplateSpec
|
|
6056
6059
|
};
|
|
6057
6060
|
//# sourceMappingURL=index.mjs.map
|