@milaboratories/pl-middle-layer 1.27.27 → 1.28.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/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +413 -402
- package/dist/index.mjs.map +1 -1
- package/dist/mutator/project.d.ts +2 -1
- package/dist/mutator/project.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/mutator/project.ts +27 -9
package/dist/index.mjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Cs = Object.defineProperty;
|
|
2
2
|
var Kt = (s, e) => (e = Symbol[s]) ? e : Symbol.for("Symbol." + s), Ht = (s) => {
|
|
3
3
|
throw TypeError(s);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var S = (s, e, t) =>
|
|
7
|
-
var
|
|
5
|
+
var Ps = (s, e, t) => e in s ? Cs(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
6
|
+
var S = (s, e, t) => Ps(s, typeof e != "symbol" ? e + "" : e, t);
|
|
7
|
+
var xe = (s, e, t) => {
|
|
8
8
|
if (e != null) {
|
|
9
9
|
typeof e != "object" && typeof e != "function" && Ht("Object expected");
|
|
10
10
|
var r;
|
|
11
11
|
t && (r = e[Kt("asyncDispose")]), r === void 0 && (r = e[Kt("dispose")]), typeof r != "function" && Ht("Object not disposable"), s.push([t, r, e]);
|
|
12
12
|
} else t && s.push([t]);
|
|
13
13
|
return e;
|
|
14
|
-
},
|
|
14
|
+
}, je = (s, e, t) => {
|
|
15
15
|
var r = typeof SuppressedError == "function" ? SuppressedError : function(i, a, c, l) {
|
|
16
16
|
return l = Error(c), l.name = "SuppressedError", l.error = i, l.suppressed = a, l;
|
|
17
17
|
}, o = (i) => e = t ? new r(i, e, "An error was suppressed during disposal") : (t = !0, i), n = (i) => {
|
|
@@ -26,73 +26,73 @@ var je = (s, e, t) => {
|
|
|
26
26
|
};
|
|
27
27
|
return n();
|
|
28
28
|
};
|
|
29
|
-
import { mapValueInVOE as
|
|
29
|
+
import { mapValueInVOE as Br, executePSpecPredicate as Es, mapPObjectData as de, mapPTableDef as mt, JsRenderInternal as ks, extractConfig as xr, isConfigLambda as jr, DefaultNavigationState as Os, extractAllColumns as $s } from "@platforma-sdk/model";
|
|
30
30
|
export * from "@platforma-sdk/model";
|
|
31
|
-
import { AnyChannel as we, StableChannel as ce, InitialBlockSettings as Wt, blockPackIdToString as
|
|
31
|
+
import { AnyChannel as we, StableChannel as ce, InitialBlockSettings as Wt, blockPackIdToString as Fs } 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 le, RetryAgent as
|
|
35
|
-
import { RegistryV1 as pe, tryLoadPackDescription as vt, BlockPackMetaEmbedAbsoluteBytes as
|
|
34
|
+
import { request as le, RetryAgent as Is } from "undici";
|
|
35
|
+
import { RegistryV1 as pe, tryLoadPackDescription as vt, BlockPackMetaEmbedAbsoluteBytes as As, RegistryV2Reader as Ts, folderReaderByUrl as Ls, loadPackDescription as qt } from "@platforma-sdk/block-tools";
|
|
36
36
|
import Y from "node:fs";
|
|
37
37
|
import G from "node:path";
|
|
38
|
-
import
|
|
39
|
-
import { assertNever as M, notEmpty as B, ConsoleLoggerAdapter as
|
|
40
|
-
import * as
|
|
41
|
-
import { tryResolve as
|
|
42
|
-
import { resourceTypesEqual as ue, field as
|
|
38
|
+
import Ns from "yaml";
|
|
39
|
+
import { assertNever as M, notEmpty as B, ConsoleLoggerAdapter as Ds, ConcurrencyLimitingExecutor as Bs, HmacSha256Signer as Vr } from "@milaboratories/ts-helpers";
|
|
40
|
+
import * as Ur from "node:fs/promises";
|
|
41
|
+
import { tryResolve as xs } from "@milaboratories/resolve-helper";
|
|
42
|
+
import { resourceTypesEqual as ue, field as x, Pl as A, PlClient as js, isNullResourceId as Xe, ensureResourceIdNotNull as yt, isResource as Vs, isResourceRef as Us, isNotNullResourceId as zt, resourceType as Ne, resourceTypeToString as Js, resourceIdToString as Jr, isNotFoundError as Gs, isTimeoutOrCancelError as Ms, toGlobalResourceId as _s, plAddressToConfig as Ks, UnauthenticatedPlClient as Xt } from "@milaboratories/pl-client";
|
|
43
43
|
export * from "@milaboratories/pl-client";
|
|
44
|
-
import { SynchronizedTreeState as
|
|
45
|
-
import { Computable as U, ChangeSource as Yt, PollComputablePool as
|
|
44
|
+
import { SynchronizedTreeState as Gr, PlError as Hs, isPlTreeNodeAccessor as Ws } from "@milaboratories/pl-tree";
|
|
45
|
+
import { Computable as U, ChangeSource as Yt, PollComputablePool as qs, WatchableValue as zs } from "@milaboratories/computable";
|
|
46
46
|
import { randomUUID as Ae, createHash as De } from "node:crypto";
|
|
47
|
-
import { parseTemplate as
|
|
48
|
-
import
|
|
49
|
-
import { Templates as
|
|
47
|
+
import { parseTemplate as Xs, PlTemplateV1 as ae, PlTemplateOverrideV1 as ke, PlTemplateLibV1 as Ve, PlTemplateSoftwareV1 as be } from "@milaboratories/pl-model-backend";
|
|
48
|
+
import Mr from "denque";
|
|
49
|
+
import { Templates as Ys } from "@platforma-sdk/workflow-tengo";
|
|
50
50
|
import Z from "canonicalize";
|
|
51
|
-
import
|
|
52
|
-
import { Scope as wt, getQuickJS as
|
|
53
|
-
import { setTimeout as
|
|
54
|
-
import { createDownloadClient as
|
|
51
|
+
import Qs from "node:assert";
|
|
52
|
+
import { Scope as wt, getQuickJS as Zs } from "quickjs-emscripten";
|
|
53
|
+
import { setTimeout as _r } from "node:timers/promises";
|
|
54
|
+
import { createDownloadClient as eo, createLogsClient as to, createUploadBlobClient as ro, createUploadProgressClient as so, DownloadDriver as oo, DownloadBlobToURLDriver as no, UploadDriver as io, LogsStreamDriver as ao, LogsDriver as co, LsDriver as lo, DownloadUrlDriver as uo } from "@milaboratories/pl-drivers";
|
|
55
55
|
import { PFrame as Ue } from "@milaboratories/pframes-node";
|
|
56
|
-
import { PFrame as
|
|
57
|
-
import { LRUCache as
|
|
58
|
-
import { channel as
|
|
56
|
+
import { PFrame as po } from "@milaboratories/pframes-rs-node";
|
|
57
|
+
import { LRUCache as ho } from "lru-cache";
|
|
58
|
+
import { channel as fo } from "node:diagnostics_channel";
|
|
59
59
|
async function Qt(s) {
|
|
60
60
|
try {
|
|
61
|
-
return await
|
|
61
|
+
return await Ur.stat(s, { bigint: !0 });
|
|
62
62
|
} catch (e) {
|
|
63
63
|
if (e.code === "ENOENT")
|
|
64
64
|
return;
|
|
65
65
|
throw e;
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
const
|
|
68
|
+
const go = [pe.PlPackageYamlConfigFile], mo = [pe.PlPackageJsonConfigFile], Ft = ["backend", "dist", "tengo", "tpl", "main.plj.gz"], It = ["config", "dist", "config.json"], Kr = ["frontend", "dist"], Zt = "block-model/dist/config.json", vo = "block-ui/package.json", yo = [
|
|
69
69
|
Ft,
|
|
70
70
|
It,
|
|
71
|
-
fo,
|
|
72
71
|
go,
|
|
73
|
-
|
|
72
|
+
mo,
|
|
73
|
+
Kr
|
|
74
74
|
];
|
|
75
|
-
async function
|
|
75
|
+
async function wo(s) {
|
|
76
76
|
return await Qt(G.join(s, ...It)) !== void 0 || await Qt(G.join(s, ...Ft)) !== void 0;
|
|
77
77
|
}
|
|
78
78
|
function at(s, e) {
|
|
79
|
-
const t =
|
|
79
|
+
const t = xs(s, e);
|
|
80
80
|
if (t === void 0) throw new Error(`Can't resolve ${e} against ${s}`);
|
|
81
81
|
return t;
|
|
82
82
|
}
|
|
83
83
|
async function er(s, e) {
|
|
84
|
-
if (G.isAbsolute(s) || (s = G.resolve(s)), await
|
|
84
|
+
if (G.isAbsolute(s) || (s = G.resolve(s)), await wo(s))
|
|
85
85
|
return {
|
|
86
86
|
workflow: G.join(s, ...Ft),
|
|
87
87
|
config: G.join(s, ...It),
|
|
88
|
-
ui: G.join(s, ...
|
|
88
|
+
ui: G.join(s, ...Kr)
|
|
89
89
|
};
|
|
90
90
|
{
|
|
91
|
-
const t = at(s, Zt), r = at(s, Zt), o = at(s,
|
|
91
|
+
const t = at(s, Zt), r = at(s, Zt), o = at(s, vo);
|
|
92
92
|
return { workflow: t, config: r, ui: G.resolve(o, "..", "dist") };
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
async function
|
|
95
|
+
async function So(s) {
|
|
96
96
|
try {
|
|
97
97
|
return await Y.promises.readFile(s, "utf8");
|
|
98
98
|
} catch (e) {
|
|
@@ -101,7 +101,7 @@ async function wo(s) {
|
|
|
101
101
|
throw e;
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
async function
|
|
104
|
+
async function bo(s) {
|
|
105
105
|
try {
|
|
106
106
|
return await Y.promises.stat(s, { bigint: !0 });
|
|
107
107
|
} catch (e) {
|
|
@@ -110,10 +110,10 @@ async function So(s) {
|
|
|
110
110
|
throw e;
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
async function
|
|
113
|
+
async function Hr(s) {
|
|
114
114
|
let e = 0n;
|
|
115
|
-
for (const t of
|
|
116
|
-
const r = G.join(s, ...t), o = await
|
|
115
|
+
for (const t of yo) {
|
|
116
|
+
const r = G.join(s, ...t), o = await bo(r);
|
|
117
117
|
o !== void 0 && e < o.mtimeNs && (e = o.mtimeNs);
|
|
118
118
|
}
|
|
119
119
|
return e.toString();
|
|
@@ -186,11 +186,11 @@ class zl {
|
|
|
186
186
|
case "local-dev":
|
|
187
187
|
for (const o of await Y.promises.readdir(r.path, { withFileTypes: !0 })) {
|
|
188
188
|
if (!o.isDirectory()) continue;
|
|
189
|
-
const n = G.join(r.path, o.name), i = await
|
|
189
|
+
const n = G.join(r.path, o.name), i = await So(
|
|
190
190
|
G.join(n, pe.PlPackageYamlConfigFile)
|
|
191
191
|
);
|
|
192
192
|
if (i !== void 0) {
|
|
193
|
-
const a = pe.PlPackageConfigData.parse(
|
|
193
|
+
const a = pe.PlPackageConfigData.parse(Ns.parse(i)), c = await Hr(n), l = {
|
|
194
194
|
organization: a.organization,
|
|
195
195
|
name: a.package,
|
|
196
196
|
version: "DEV"
|
|
@@ -228,7 +228,7 @@ class zl {
|
|
|
228
228
|
if (c !== void 0) {
|
|
229
229
|
const l = await At(c), u = {
|
|
230
230
|
id: c.id,
|
|
231
|
-
meta: await
|
|
231
|
+
meta: await As.parseAsync(c.meta),
|
|
232
232
|
spec: {
|
|
233
233
|
type: "dev-v2",
|
|
234
234
|
folder: a,
|
|
@@ -269,7 +269,7 @@ class zl {
|
|
|
269
269
|
return await this.v2Provider.getRegistry(o.url).getSpecificOverview(t, r);
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
|
-
class
|
|
272
|
+
class Ro {
|
|
273
273
|
constructor(e) {
|
|
274
274
|
S(this, "registries", /* @__PURE__ */ new Map());
|
|
275
275
|
this.http = e;
|
|
@@ -277,7 +277,7 @@ class bo {
|
|
|
277
277
|
getRegistry(e) {
|
|
278
278
|
const t = this.registries.get(e);
|
|
279
279
|
if (t) return t;
|
|
280
|
-
const r = new
|
|
280
|
+
const r = new Ts(Ls(e, this.http));
|
|
281
281
|
return this.registries.set(e, r), r;
|
|
282
282
|
}
|
|
283
283
|
}
|
|
@@ -290,49 +290,49 @@ const Xl = {
|
|
|
290
290
|
}, Ql = {
|
|
291
291
|
type: "remote-v1",
|
|
292
292
|
url: "https://block.registry.platforma.bio/dev"
|
|
293
|
-
}, Ro = {
|
|
294
|
-
groups: [{ id: "default", label: "Default", blocks: [] }]
|
|
295
293
|
}, Co = {
|
|
294
|
+
groups: [{ id: "default", label: "Default", blocks: [] }]
|
|
295
|
+
}, Po = {
|
|
296
296
|
stagingRefreshTimestamp: 0,
|
|
297
297
|
blocksInLimbo: []
|
|
298
|
-
},
|
|
298
|
+
}, Eo = {
|
|
299
299
|
label: "New Project"
|
|
300
|
-
},
|
|
300
|
+
}, ko = { name: "UserProject", version: "2" }, Wr = "SchemaVersion", qr = "1", Tt = "ProjectCreated", Te = "ProjectLastModified", Le = "ProjectMeta", he = "ProjectStructure", Ye = "BlockRenderingState", Oo = "BlockFrontendState/", $o = /^BlockFrontendState\/(?<blockid>.*)$/;
|
|
301
301
|
function St(s) {
|
|
302
|
-
return `${
|
|
302
|
+
return `${Oo}${s}`;
|
|
303
303
|
}
|
|
304
|
-
const
|
|
304
|
+
const Fo = "BlockArgsAuthor/";
|
|
305
305
|
function bt(s) {
|
|
306
|
-
return `${
|
|
306
|
+
return `${Fo}${s}`;
|
|
307
307
|
}
|
|
308
308
|
const Rt = "ProjectStructureAuthor";
|
|
309
|
-
function
|
|
310
|
-
const e = s.match(
|
|
309
|
+
function Io(s) {
|
|
310
|
+
const e = s.match($o);
|
|
311
311
|
if (e !== null)
|
|
312
312
|
return e.groups.blockid;
|
|
313
313
|
}
|
|
314
|
-
const
|
|
314
|
+
const Ao = "__serviceTemplate_";
|
|
315
315
|
function Ct(s) {
|
|
316
|
-
return `${
|
|
316
|
+
return `${Ao}${s}`;
|
|
317
317
|
}
|
|
318
318
|
function V(s, e) {
|
|
319
319
|
return `${s}-${e}`;
|
|
320
320
|
}
|
|
321
|
-
const
|
|
322
|
-
function
|
|
323
|
-
const e = s.match(
|
|
321
|
+
const To = /^(?<blockId>.*)-(?<fieldName>blockPack|blockSettings|prodArgs|currentArgs|prodCtx|prodUiCtx|prodOutput|prodCtxPrevious|prodUiCtxPrevious|prodOutputPrevious|stagingCtx|stagingUiCtx|stagingOutput|stagingCtxPrevious|stagingUiCtxPrevious|stagingOutputPrevious)$/;
|
|
322
|
+
function Lo(s) {
|
|
323
|
+
const e = s.match(To);
|
|
324
324
|
if (e === null) return;
|
|
325
325
|
const { blockId: t, fieldName: r } = e.groups;
|
|
326
326
|
return { blockId: t, fieldName: r };
|
|
327
327
|
}
|
|
328
|
-
const
|
|
329
|
-
async function
|
|
330
|
-
const o = await
|
|
328
|
+
const No = "projects", zr = { name: "Projects", version: "1" }, Do = (s) => ue(s.type, zr) ? s.fields : [];
|
|
329
|
+
async function Bo(s, e, t, r) {
|
|
330
|
+
const o = await Gr.init(
|
|
331
331
|
s,
|
|
332
332
|
e,
|
|
333
333
|
{
|
|
334
334
|
...r.ops.defaultTreeOptions,
|
|
335
|
-
pruning:
|
|
335
|
+
pruning: Do
|
|
336
336
|
},
|
|
337
337
|
r.logger
|
|
338
338
|
);
|
|
@@ -356,37 +356,37 @@ async function Do(s, e, t, r) {
|
|
|
356
356
|
return l.sort((u) => -u.lastModified.valueOf()), l;
|
|
357
357
|
}).withStableType(), tree: o };
|
|
358
358
|
}
|
|
359
|
-
const
|
|
359
|
+
const xo = {
|
|
360
360
|
name: "EphRenderTemplate",
|
|
361
361
|
version: "1"
|
|
362
362
|
}, jo = {
|
|
363
363
|
name: "RenderTemplate",
|
|
364
364
|
version: "1"
|
|
365
365
|
};
|
|
366
|
-
function
|
|
366
|
+
function Xr(s, e, t, r, o) {
|
|
367
367
|
if (o.length === 0) throw new Error("Zero output names provided");
|
|
368
|
-
const n = t ? s.createEphemeral(
|
|
369
|
-
return s.createField(i, "Input", e), s.createField(a, "Input",
|
|
368
|
+
const n = t ? s.createEphemeral(xo) : s.createStruct(jo), i = x(n, "template"), a = x(n, "inputs");
|
|
369
|
+
return s.createField(i, "Input", e), s.createField(a, "Input", A.createPlMap(s, r, t)), s.lockInputs(n), A.futureRecord(s, n, o, "Output", "outputs/");
|
|
370
370
|
}
|
|
371
|
-
const
|
|
371
|
+
const Vo = { name: "BContextEnd", version: "1" }, Uo = { name: "BContext", version: "1" }, Jo = "id", Go = "parent/", Mo = ["context", "result"];
|
|
372
372
|
function tr(s, e, t) {
|
|
373
|
-
return
|
|
373
|
+
return Xr(s, e, !0, t, Mo);
|
|
374
374
|
}
|
|
375
|
-
function
|
|
376
|
-
const e = s.createEphemeral(
|
|
375
|
+
function _o(s) {
|
|
376
|
+
const e = s.createEphemeral(Vo);
|
|
377
377
|
return s.lock(e), e;
|
|
378
378
|
}
|
|
379
|
-
function
|
|
380
|
-
if (e.length === 0) return
|
|
379
|
+
function rr(s, e) {
|
|
380
|
+
if (e.length === 0) return _o(s);
|
|
381
381
|
if (e.length === 1) return e[0];
|
|
382
|
-
const t = s.createEphemeral(
|
|
383
|
-
s.createField(
|
|
382
|
+
const t = s.createEphemeral(Uo);
|
|
383
|
+
s.createField(x(t, Jo), "Input", A.createPlString(s, Ae()));
|
|
384
384
|
for (let r = 0; r < e.length; r++)
|
|
385
|
-
s.createField(
|
|
385
|
+
s.createField(x(t, `${Go}${r}`), "Input", e[r]);
|
|
386
386
|
return s.lock(t), t;
|
|
387
387
|
}
|
|
388
388
|
function Ko(s, e) {
|
|
389
|
-
const t =
|
|
389
|
+
const t = Xs(e.content), r = t.type;
|
|
390
390
|
switch (r) {
|
|
391
391
|
case "pl.tengo-template.v2":
|
|
392
392
|
return Wo(s, t);
|
|
@@ -394,7 +394,7 @@ function Ko(s, e) {
|
|
|
394
394
|
M(r);
|
|
395
395
|
}
|
|
396
396
|
}
|
|
397
|
-
const
|
|
397
|
+
const sr = {
|
|
398
398
|
hash(s, e) {
|
|
399
399
|
e.update(Ve.type.name).update(Ve.type.version).update(s.name).update(s.version).update(s.src);
|
|
400
400
|
},
|
|
@@ -422,12 +422,12 @@ const rr = {
|
|
|
422
422
|
JSON.stringify(ke.fromV2Data(s))
|
|
423
423
|
);
|
|
424
424
|
}
|
|
425
|
-
},
|
|
425
|
+
}, Yr = {
|
|
426
426
|
hash(s, e) {
|
|
427
427
|
e.update(ae.type.name).update(ae.type.version).update(s.hashOverride ?? "").update(s.name).update(s.version).update(s.src);
|
|
428
428
|
const t = (r) => (r.sort((o, n) => o[0] === n[0] ? 0 : o[0] < n[0] ? -1 : 1), r);
|
|
429
429
|
for (const [r, o] of t(Object.entries(s.libs ?? {})))
|
|
430
|
-
e.update("lib:" + r),
|
|
430
|
+
e.update("lib:" + r), sr.hash(o, e);
|
|
431
431
|
for (const [r, o] of t(Object.entries(s.software ?? {})))
|
|
432
432
|
e.update("soft:" + r), Je.hash(o, e);
|
|
433
433
|
for (const [r, o] of t(Object.entries(s.assets ?? {})))
|
|
@@ -442,7 +442,7 @@ const rr = {
|
|
|
442
442
|
);
|
|
443
443
|
for (const [i, a] of Object.entries(s.libs ?? {})) {
|
|
444
444
|
const c = ae.libField(r, i);
|
|
445
|
-
e.createField(c, "Input"), e.setField(c, t(a,
|
|
445
|
+
e.createField(c, "Input"), e.setField(c, t(a, sr));
|
|
446
446
|
}
|
|
447
447
|
for (const [i, a] of Object.entries(s.software ?? {})) {
|
|
448
448
|
const c = ae.swField(r, i);
|
|
@@ -454,7 +454,7 @@ const rr = {
|
|
|
454
454
|
}
|
|
455
455
|
for (const [i, a] of Object.entries(s.templates ?? {})) {
|
|
456
456
|
const c = ae.tplField(r, i);
|
|
457
|
-
e.createField(c, "Input"), e.setField(c, t(a,
|
|
457
|
+
e.createField(c, "Input"), e.setField(c, t(a, Yr));
|
|
458
458
|
}
|
|
459
459
|
if (e.lock(r), !s.hashOverride) return r;
|
|
460
460
|
const o = t(s, Ho), n = ke.tplField(o);
|
|
@@ -472,7 +472,7 @@ function Wo(s, e) {
|
|
|
472
472
|
}
|
|
473
473
|
return t.get(a);
|
|
474
474
|
};
|
|
475
|
-
return r(e,
|
|
475
|
+
return r(e, Yr);
|
|
476
476
|
}
|
|
477
477
|
const qo = { name: "TengoTemplateGet", version: "1" }, zo = "registry", Xo = "templateURI", Yo = "template", Zl = { name: "TengoTemplatePack", version: "1" }, eu = {
|
|
478
478
|
name: "TengoTemplatePackConvert",
|
|
@@ -493,8 +493,8 @@ async function Qo(s) {
|
|
|
493
493
|
}
|
|
494
494
|
}
|
|
495
495
|
function Zo(s, e) {
|
|
496
|
-
const t = s.createStruct(qo), r =
|
|
497
|
-
return s.setField(r, s.createValue(
|
|
496
|
+
const t = s.createStruct(qo), r = x(t, zo), o = x(t, Xo), n = x(t, Yo);
|
|
497
|
+
return s.setField(r, s.createValue(A.JsonString, Buffer.from(JSON.stringify(e.registry)))), s.setField(o, s.createValue(A.JsonString, Buffer.from(JSON.stringify(e.path)))), n;
|
|
498
498
|
}
|
|
499
499
|
function Lt(s, e) {
|
|
500
500
|
switch (e.type) {
|
|
@@ -506,7 +506,7 @@ function Lt(s, e) {
|
|
|
506
506
|
return M(e);
|
|
507
507
|
}
|
|
508
508
|
}
|
|
509
|
-
const
|
|
509
|
+
const Qr = { name: "Frontend/FromUrl", version: "1" }, Zr = {
|
|
510
510
|
name: "Frontend/FromFolder",
|
|
511
511
|
version: "1"
|
|
512
512
|
};
|
|
@@ -514,12 +514,12 @@ function en(s, e) {
|
|
|
514
514
|
switch (e.type) {
|
|
515
515
|
case "url":
|
|
516
516
|
return s.createValue(
|
|
517
|
-
|
|
517
|
+
Qr,
|
|
518
518
|
JSON.stringify({ url: e.url })
|
|
519
519
|
);
|
|
520
520
|
case "local":
|
|
521
521
|
return s.createValue(
|
|
522
|
-
|
|
522
|
+
Zr,
|
|
523
523
|
JSON.stringify({
|
|
524
524
|
path: e.path,
|
|
525
525
|
signature: e.signature
|
|
@@ -529,8 +529,8 @@ function en(s, e) {
|
|
|
529
529
|
return M(e);
|
|
530
530
|
}
|
|
531
531
|
}
|
|
532
|
-
const tn = { name: "BlockPackCustom", version: "1" },
|
|
533
|
-
function
|
|
532
|
+
const tn = { name: "BlockPackCustom", version: "1" }, es = "template", ts = "frontend";
|
|
533
|
+
function or(s) {
|
|
534
534
|
return s.endsWith("/") ? s : `${s}/`;
|
|
535
535
|
}
|
|
536
536
|
class rn {
|
|
@@ -552,7 +552,7 @@ class rn {
|
|
|
552
552
|
return JSON.parse(r);
|
|
553
553
|
}
|
|
554
554
|
case "from-registry-v1": {
|
|
555
|
-
const t = this.http !== void 0 ? { dispatcher: this.http } : {}, r = `${
|
|
555
|
+
const t = this.http !== void 0 ? { dispatcher: this.http } : {}, r = `${or(e.registryUrl)}${pe.packageContentPrefix({ organization: e.id.organization, package: e.id.name, version: e.id.version })}`;
|
|
556
556
|
return await (await le(`${r}/config.json`, t)).body.json();
|
|
557
557
|
}
|
|
558
558
|
case "from-registry-v2": {
|
|
@@ -610,7 +610,7 @@ class rn {
|
|
|
610
610
|
};
|
|
611
611
|
}
|
|
612
612
|
case "from-registry-v1": {
|
|
613
|
-
const t = this.http !== void 0 ? { dispatcher: this.http } : {}, r = `${
|
|
613
|
+
const t = this.http !== void 0 ? { dispatcher: this.http } : {}, r = `${or(e.registryUrl)}${pe.packageContentPrefix({ organization: e.id.organization, package: e.id.name, version: e.id.version })}`, o = `${r}/template.plj.gz`, n = await le(o, t);
|
|
614
614
|
if (n.statusCode !== 200)
|
|
615
615
|
throw new Error(
|
|
616
616
|
`Block not found in registry (url = ${o} ; code = ${n.statusCode}): ` + JSON.stringify(e)
|
|
@@ -653,9 +653,9 @@ class rn {
|
|
|
653
653
|
}
|
|
654
654
|
function sn(s, e) {
|
|
655
655
|
const t = { config: e.config, source: e.source }, r = s.createStruct(tn, JSON.stringify(t));
|
|
656
|
-
return s.createField(
|
|
656
|
+
return s.createField(x(r, es), "Input", Lt(s, e.template)), s.createField(x(r, ts), "Input", en(s, e.frontend)), s.lock(r), r;
|
|
657
657
|
}
|
|
658
|
-
function
|
|
658
|
+
function nr(s, e) {
|
|
659
659
|
switch (e.type) {
|
|
660
660
|
case "explicit":
|
|
661
661
|
return sn(s, e);
|
|
@@ -705,7 +705,7 @@ function se(s) {
|
|
|
705
705
|
}
|
|
706
706
|
};
|
|
707
707
|
}
|
|
708
|
-
class
|
|
708
|
+
class rs {
|
|
709
709
|
constructor(e) {
|
|
710
710
|
/** Nodes are stored in the map in topological order */
|
|
711
711
|
S(this, "nodes");
|
|
@@ -745,7 +745,7 @@ function Et(s) {
|
|
|
745
745
|
};
|
|
746
746
|
e.set(r, o), t === void 0 ? o.upstream = /* @__PURE__ */ new Set() : (o.upstream = /* @__PURE__ */ new Set([t.id]), t.downstream = /* @__PURE__ */ new Set([o.id])), t = o;
|
|
747
747
|
}
|
|
748
|
-
return t !== void 0 && (t.downstream = /* @__PURE__ */ new Set()), new
|
|
748
|
+
return t !== void 0 && (t.downstream = /* @__PURE__ */ new Set()), new rs(e);
|
|
749
749
|
}
|
|
750
750
|
function ze(s, e) {
|
|
751
751
|
const t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set();
|
|
@@ -761,7 +761,7 @@ function ze(s, e) {
|
|
|
761
761
|
};
|
|
762
762
|
t.set(o, a), i.upstreams.forEach((c) => t.get(c).downstream.add(o)), r.add(o);
|
|
763
763
|
}
|
|
764
|
-
return new
|
|
764
|
+
return new rs(t);
|
|
765
765
|
}
|
|
766
766
|
function an(s, e) {
|
|
767
767
|
if (s.size !== e.size) return !1;
|
|
@@ -773,7 +773,7 @@ function kt(s, e) {
|
|
|
773
773
|
for (const t of s) if (e.has(t)) return !0;
|
|
774
774
|
return !1;
|
|
775
775
|
}
|
|
776
|
-
function
|
|
776
|
+
function ir(s, e) {
|
|
777
777
|
const t = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
|
|
778
778
|
return s.nodes.forEach((n) => {
|
|
779
779
|
const i = e.nodes.get(n.id);
|
|
@@ -783,9 +783,9 @@ function nr(s, e) {
|
|
|
783
783
|
}), { onlyInA: t, onlyInB: r, different: o };
|
|
784
784
|
}
|
|
785
785
|
let ct;
|
|
786
|
-
async function
|
|
786
|
+
async function ss() {
|
|
787
787
|
if (ct === void 0) {
|
|
788
|
-
const s = await Qo(
|
|
788
|
+
const s = await Qo(Ys["pframes.export-pframe"]);
|
|
789
789
|
if (s.type !== "explicit") throw new Error("Unexpected prepared template type.");
|
|
790
790
|
const e = De("sha256").update(s.content).digest("hex");
|
|
791
791
|
ct = { spec: s, hash: e };
|
|
@@ -793,7 +793,7 @@ async function rs() {
|
|
|
793
793
|
return ct;
|
|
794
794
|
}
|
|
795
795
|
function cn(s, e, t) {
|
|
796
|
-
return
|
|
796
|
+
return Xr(s, e, !0, { pf: t }, ["result"]).result;
|
|
797
797
|
}
|
|
798
798
|
function lt(s, e) {
|
|
799
799
|
let t = !1, r, o;
|
|
@@ -804,7 +804,7 @@ function lt(s, e) {
|
|
|
804
804
|
return r !== n && (r = n, o = e()), e();
|
|
805
805
|
};
|
|
806
806
|
}
|
|
807
|
-
class
|
|
807
|
+
class ar {
|
|
808
808
|
constructor(e, t) {
|
|
809
809
|
S(this, "currentInputsC", lt(
|
|
810
810
|
() => this.fields.currentArgs.modCount,
|
|
@@ -867,8 +867,8 @@ class ir {
|
|
|
867
867
|
}
|
|
868
868
|
getTemplate(e) {
|
|
869
869
|
return e.getFutureFieldValue(
|
|
870
|
-
|
|
871
|
-
|
|
870
|
+
A.unwrapHolder(e, this.fields.blockPack.ref),
|
|
871
|
+
es,
|
|
872
872
|
"Input"
|
|
873
873
|
);
|
|
874
874
|
}
|
|
@@ -938,7 +938,7 @@ class Qe {
|
|
|
938
938
|
}
|
|
939
939
|
createJsonFieldValueByContent(e) {
|
|
940
940
|
const t = Buffer.from(e);
|
|
941
|
-
return { ref: this.tx.createValue(
|
|
941
|
+
return { ref: this.tx.createValue(A.JsonObject, t), value: t, status: "Ready" };
|
|
942
942
|
}
|
|
943
943
|
createJsonFieldValue(e) {
|
|
944
944
|
return this.createJsonFieldValueByContent(JSON.stringify(e));
|
|
@@ -948,7 +948,7 @@ class Qe {
|
|
|
948
948
|
throw new Error("block not found");
|
|
949
949
|
}
|
|
950
950
|
setBlockFieldObj(e, t, r) {
|
|
951
|
-
const o =
|
|
951
|
+
const o = x(this.rid, V(e, t));
|
|
952
952
|
if (r.ref === void 0) throw new Error("Can't set value with empty ref");
|
|
953
953
|
this.getBlockInfo(e).fields[t] === void 0 ? this.tx.createField(o, "Dynamic", r.ref) : this.tx.setField(o, r.ref), this.getBlockInfo(e).fields[t] = {
|
|
954
954
|
modCount: this.globalModCount++,
|
|
@@ -963,7 +963,7 @@ class Qe {
|
|
|
963
963
|
const o = this.getBlockInfo(e);
|
|
964
964
|
for (const n of t) {
|
|
965
965
|
const i = o.fields;
|
|
966
|
-
n in i && (this.tx.removeField(
|
|
966
|
+
n in i && (this.tx.removeField(x(this.rid, V(e, n))), delete i[n], this.fieldsChanged = !0, r = !0);
|
|
967
967
|
}
|
|
968
968
|
return r;
|
|
969
969
|
}
|
|
@@ -1001,7 +1001,7 @@ class Qe {
|
|
|
1001
1001
|
JSON.parse(o);
|
|
1002
1002
|
const i = Buffer.from(o);
|
|
1003
1003
|
if (Buffer.compare(n.fields.currentArgs.value, i) === 0) continue;
|
|
1004
|
-
const a = this.tx.createValue(
|
|
1004
|
+
const a = this.tx.createValue(A.JsonObject, i);
|
|
1005
1005
|
this.setBlockField(r, "currentArgs", a, "Ready", i), this.blocksWithChangedInputs.add(r), t.push(r);
|
|
1006
1006
|
}
|
|
1007
1007
|
this.getStagingGraph().traverse("downstream", t, ({ id: r }) => this.resetStaging(r)), t.length > 0 && this.updateLastModified();
|
|
@@ -1027,53 +1027,61 @@ class Qe {
|
|
|
1027
1027
|
// this.updateStructure(newStructure);
|
|
1028
1028
|
// this.updateLastModified();
|
|
1029
1029
|
// }
|
|
1030
|
-
|
|
1031
|
-
const
|
|
1032
|
-
return e.forEach((
|
|
1033
|
-
|
|
1034
|
-
|
|
1030
|
+
createProdCtx(e) {
|
|
1031
|
+
const t = [];
|
|
1032
|
+
return e.forEach((r) => {
|
|
1033
|
+
var n;
|
|
1034
|
+
const o = this.getBlockInfo(r);
|
|
1035
|
+
if (((n = o.fields.prodCtx) == null ? void 0 : n.ref) === void 0)
|
|
1035
1036
|
throw new Error("One of the upstreams staging is not rendered.");
|
|
1036
|
-
|
|
1037
|
-
}),
|
|
1037
|
+
t.push(A.unwrapHolder(this.tx, o.fields.prodCtx.ref));
|
|
1038
|
+
}), rr(this.tx, t);
|
|
1039
|
+
}
|
|
1040
|
+
createStagingCtx(e) {
|
|
1041
|
+
const t = [];
|
|
1042
|
+
return e.forEach((r) => {
|
|
1043
|
+
var n, i;
|
|
1044
|
+
const o = this.getBlockInfo(r);
|
|
1045
|
+
if (((n = o.fields.stagingCtx) == null ? void 0 : n.ref) === void 0)
|
|
1046
|
+
throw new Error("One of the upstreams staging is not rendered.");
|
|
1047
|
+
t.push(A.unwrapHolder(this.tx, o.fields.stagingCtx.ref)), ((i = o.fields.prodCtx) == null ? void 0 : i.ref) !== void 0 && t.push(A.unwrapHolder(this.tx, o.fields.prodCtx.ref));
|
|
1048
|
+
}), rr(this.tx, t);
|
|
1038
1049
|
}
|
|
1039
1050
|
exportCtx(e) {
|
|
1040
|
-
return cn(this.tx,
|
|
1051
|
+
return cn(this.tx, A.unwrapHolder(this.tx, this.ctxExportTplHolder), e);
|
|
1041
1052
|
}
|
|
1042
1053
|
renderStagingFor(e) {
|
|
1043
1054
|
this.resetStaging(e);
|
|
1044
|
-
const t = this.getBlockInfo(e), r = this.
|
|
1055
|
+
const t = this.getBlockInfo(e), r = this.createStagingCtx(this.getStagingGraph().nodes.get(e).upstream);
|
|
1045
1056
|
if (this.getBlock(e).renderingMode !== "Heavy") throw new Error("not supported yet");
|
|
1046
1057
|
const o = t.getTemplate(this.tx), n = tr(this.tx, o, {
|
|
1047
1058
|
args: t.fields.currentArgs.ref,
|
|
1048
|
-
blockId: this.tx.createValue(
|
|
1049
|
-
isProduction: this.tx.createValue(
|
|
1059
|
+
blockId: this.tx.createValue(A.JsonString, JSON.stringify(e)),
|
|
1060
|
+
isProduction: this.tx.createValue(A.JsonBool, JSON.stringify(!1)),
|
|
1050
1061
|
context: r
|
|
1051
1062
|
});
|
|
1052
1063
|
this.setBlockField(
|
|
1053
1064
|
e,
|
|
1054
1065
|
"stagingCtx",
|
|
1055
|
-
|
|
1066
|
+
A.wrapInEphHolder(this.tx, n.context),
|
|
1056
1067
|
"NotReady"
|
|
1057
1068
|
), this.setBlockField(e, "stagingUiCtx", this.exportCtx(n.context), "NotReady"), this.setBlockField(e, "stagingOutput", n.result, "NotReady");
|
|
1058
1069
|
}
|
|
1059
1070
|
renderProductionFor(e) {
|
|
1060
1071
|
this.resetProduction(e);
|
|
1061
|
-
const t = this.getBlockInfo(e), r = this.
|
|
1062
|
-
this.getPendingProductionGraph().nodes.get(e).upstream,
|
|
1063
|
-
"prodCtx"
|
|
1064
|
-
);
|
|
1072
|
+
const t = this.getBlockInfo(e), r = this.createProdCtx(this.getPendingProductionGraph().nodes.get(e).upstream);
|
|
1065
1073
|
if (this.getBlock(e).renderingMode === "Light")
|
|
1066
1074
|
throw new Error("Can't render production for light block.");
|
|
1067
1075
|
const o = t.getTemplate(this.tx), n = tr(this.tx, o, {
|
|
1068
1076
|
args: t.fields.currentArgs.ref,
|
|
1069
|
-
blockId: this.tx.createValue(
|
|
1070
|
-
isProduction: this.tx.createValue(
|
|
1077
|
+
blockId: this.tx.createValue(A.JsonString, JSON.stringify(e)),
|
|
1078
|
+
isProduction: this.tx.createValue(A.JsonBool, JSON.stringify(!0)),
|
|
1071
1079
|
context: r
|
|
1072
1080
|
});
|
|
1073
1081
|
this.setBlockField(
|
|
1074
1082
|
e,
|
|
1075
1083
|
"prodCtx",
|
|
1076
|
-
|
|
1084
|
+
A.wrapInEphHolder(this.tx, n.context),
|
|
1077
1085
|
"NotReady"
|
|
1078
1086
|
), this.setBlockField(e, "prodUiCtx", this.exportCtx(n.context), "NotReady"), this.setBlockField(e, "prodOutput", n.result, "NotReady"), this.setBlockFieldObj(e, "prodArgs", t.fields.currentArgs), this.blocksInLimbo.delete(e) && (this.renderingStateChanged = !0);
|
|
1079
1087
|
}
|
|
@@ -1088,16 +1096,16 @@ class Qe {
|
|
|
1088
1096
|
var u;
|
|
1089
1097
|
return (u = this.blockInfos.get(l)) == null ? void 0 : u.actualProductionInputs;
|
|
1090
1098
|
}
|
|
1091
|
-
), a =
|
|
1099
|
+
), a = ir(r, n), c = ir(o, i);
|
|
1092
1100
|
for (const l of a.onlyInA) {
|
|
1093
1101
|
const { fields: u } = this.getBlockInfo(l);
|
|
1094
1102
|
this.deleteBlockFields(l, ...Object.keys(u)), this.blockInfos.delete(l), this.blocksInLimbo.delete(l) && (this.renderingStateChanged = !0), this.blockFrontendStates.delete(l) && this.changedBlockFrontendStates.add(l);
|
|
1095
1103
|
}
|
|
1096
1104
|
for (const l of a.onlyInB) {
|
|
1097
|
-
const u = new
|
|
1105
|
+
const u = new ar(l, {});
|
|
1098
1106
|
this.blockInfos.set(l, u);
|
|
1099
|
-
const d = t(l), g =
|
|
1100
|
-
this.setBlockField(l, "blockPack",
|
|
1107
|
+
const d = t(l), g = nr(this.tx, d.blockPack);
|
|
1108
|
+
this.setBlockField(l, "blockPack", A.wrapInHolder(this.tx, g), "NotReady"), this.setBlockFieldObj(
|
|
1101
1109
|
l,
|
|
1102
1110
|
"blockSettings",
|
|
1103
1111
|
this.createJsonFieldValue(Wt)
|
|
@@ -1152,7 +1160,7 @@ class Qe {
|
|
|
1152
1160
|
this.setBlockField(
|
|
1153
1161
|
e,
|
|
1154
1162
|
"blockPack",
|
|
1155
|
-
|
|
1163
|
+
A.wrapInHolder(this.tx, nr(this.tx, t)),
|
|
1156
1164
|
"NotReady"
|
|
1157
1165
|
), r !== void 0 ? (this.setArgs([{ blockId: e, args: r }]), this.setUiState(e, void 0)) : this.getStagingGraph().traverse("downstream", [e], ({ id: n }) => this.resetStaging(n)), o.productionRendered && this.getActualProductionGraph().traverse(
|
|
1158
1166
|
"downstream",
|
|
@@ -1166,39 +1174,42 @@ class Qe {
|
|
|
1166
1174
|
renderProduction(e, t = !1) {
|
|
1167
1175
|
const r = new Set(e), o = this.getPendingProductionGraph();
|
|
1168
1176
|
if (t)
|
|
1169
|
-
o.traverse("upstream", e, (
|
|
1170
|
-
r.add(
|
|
1177
|
+
o.traverse("upstream", e, (a) => {
|
|
1178
|
+
r.add(a.id);
|
|
1171
1179
|
});
|
|
1172
1180
|
else
|
|
1173
|
-
for (const
|
|
1174
|
-
const
|
|
1175
|
-
if (
|
|
1176
|
-
for (const
|
|
1177
|
-
if (!r.has(
|
|
1181
|
+
for (const a of r) {
|
|
1182
|
+
const c = o.nodes.get(a);
|
|
1183
|
+
if (c === void 0) throw new Error(`Can't find block with id: ${a}`);
|
|
1184
|
+
for (const l of c.upstream)
|
|
1185
|
+
if (!r.has(l))
|
|
1178
1186
|
throw new Error("Can't render blocks not including all upstreams.");
|
|
1179
1187
|
}
|
|
1180
1188
|
const n = /* @__PURE__ */ new Set();
|
|
1181
|
-
for (const
|
|
1182
|
-
if (!r.has(
|
|
1183
|
-
let
|
|
1184
|
-
if (!
|
|
1185
|
-
for (const
|
|
1186
|
-
if (n.has(
|
|
1187
|
-
|
|
1189
|
+
for (const a of se(this.structure)) {
|
|
1190
|
+
if (!r.has(a.id)) continue;
|
|
1191
|
+
let c = this.getBlockInfo(a.id).requireProductionRendering || this.blocksInLimbo.has(a.id);
|
|
1192
|
+
if (!c) {
|
|
1193
|
+
for (const l of o.nodes.get(a.id).upstream)
|
|
1194
|
+
if (n.has(l)) {
|
|
1195
|
+
c = !0;
|
|
1188
1196
|
break;
|
|
1189
1197
|
}
|
|
1190
1198
|
}
|
|
1191
|
-
|
|
1199
|
+
c && (this.renderProductionFor(a.id), n.add(a.id));
|
|
1192
1200
|
}
|
|
1193
|
-
|
|
1194
|
-
|
|
1201
|
+
const i = [...n];
|
|
1202
|
+
return o.traverse("downstream", i, (a) => {
|
|
1203
|
+
n.has(a.id) || this.resetOrLimboProduction(a.id);
|
|
1204
|
+
}), this.getStagingGraph().traverse("downstream", i, ({ id: a }) => {
|
|
1205
|
+
i[0] !== a && this.resetStaging(a);
|
|
1195
1206
|
}), n.size > 0 && this.updateLastModified(), n;
|
|
1196
1207
|
}
|
|
1197
1208
|
/** Stops running blocks from the list and modify states of other blocks
|
|
1198
1209
|
* accordingly */
|
|
1199
1210
|
stopProduction(...e) {
|
|
1200
1211
|
var i, a;
|
|
1201
|
-
const t = this.getActualProductionGraph(), r = new
|
|
1212
|
+
const t = this.getActualProductionGraph(), r = new Mr(e), o = new Set(e), n = [];
|
|
1202
1213
|
for (; !r.isEmpty(); ) {
|
|
1203
1214
|
const c = r.shift(), l = this.getBlockInfo(c).fields;
|
|
1204
1215
|
if (!(((i = l.prodOutput) == null ? void 0 : i.status) === "Ready" && ((a = l.prodCtx) == null ? void 0 : a.status) === "Ready") && this.deleteBlockFields(c, "prodOutput", "prodCtx", "prodUiCtx", "prodArgs")) {
|
|
@@ -1279,13 +1290,13 @@ class Qe {
|
|
|
1279
1290
|
}
|
|
1280
1291
|
}
|
|
1281
1292
|
static async load(e, t, r) {
|
|
1282
|
-
const o = e.getResourceData(t, !0), n = e.getKValueJson(t,
|
|
1293
|
+
const o = e.getResourceData(t, !0), n = e.getKValueJson(t, Wr), i = e.getKValueJson(t, Te), a = e.getKValueJson(t, Le), c = e.getKValueJson(t, he), l = e.getKValueJson(t, Ye), u = e.listKeyValuesString(t), [
|
|
1283
1294
|
d,
|
|
1284
1295
|
g,
|
|
1285
1296
|
f,
|
|
1286
1297
|
h,
|
|
1287
1298
|
E,
|
|
1288
|
-
{ stagingRefreshTimestamp:
|
|
1299
|
+
{ stagingRefreshTimestamp: T, blocksInLimbo: N },
|
|
1289
1300
|
K
|
|
1290
1301
|
] = await Promise.all([
|
|
1291
1302
|
o,
|
|
@@ -1296,13 +1307,13 @@ class Qe {
|
|
|
1296
1307
|
l,
|
|
1297
1308
|
u
|
|
1298
1309
|
]);
|
|
1299
|
-
if (g !==
|
|
1310
|
+
if (g !== qr)
|
|
1300
1311
|
throw new Error(
|
|
1301
1312
|
`Can't act on this project resource because it has a wrong schema version: ${g}`
|
|
1302
1313
|
);
|
|
1303
1314
|
const O = /* @__PURE__ */ new Map();
|
|
1304
1315
|
for (const p of d.fields) {
|
|
1305
|
-
const m =
|
|
1316
|
+
const m = Lo(p.name);
|
|
1306
1317
|
if (m === void 0) continue;
|
|
1307
1318
|
let y = O.get(m.blockId);
|
|
1308
1319
|
y === void 0 && (y = {
|
|
@@ -1310,35 +1321,35 @@ class Qe {
|
|
|
1310
1321
|
fields: {}
|
|
1311
1322
|
}, O.set(m.blockId, y)), y.fields[m.fieldName] = Xe(p.value) ? { modCount: 0 } : { modCount: 0, ref: p.value };
|
|
1312
1323
|
}
|
|
1313
|
-
const ne = await
|
|
1324
|
+
const ne = await ss(), fe = Ct(ne.hash), L = d.fields.find(
|
|
1314
1325
|
(p) => p.name === fe
|
|
1315
1326
|
);
|
|
1316
1327
|
let q;
|
|
1317
|
-
|
|
1318
|
-
|
|
1328
|
+
L !== void 0 ? q = yt(L.value) : (q = A.wrapInHolder(e, Lt(e, ne.spec)), e.createField(
|
|
1329
|
+
x(t, Ct(ne.hash)),
|
|
1319
1330
|
"Dynamic",
|
|
1320
1331
|
q
|
|
1321
1332
|
));
|
|
1322
|
-
const ie = { stagingRefreshTimestamp:
|
|
1333
|
+
const ie = { stagingRefreshTimestamp: T }, H = new Set(N), J = /* @__PURE__ */ new Map();
|
|
1323
1334
|
for (const p of K) {
|
|
1324
|
-
const m =
|
|
1335
|
+
const m = Io(p.key);
|
|
1325
1336
|
m !== void 0 && J.set(m, p.value);
|
|
1326
1337
|
}
|
|
1327
|
-
const
|
|
1338
|
+
const j = [];
|
|
1328
1339
|
O.forEach(({ fields: p }) => {
|
|
1329
1340
|
for (const [, m] of Object.entries(p))
|
|
1330
1341
|
if (m.ref !== void 0) {
|
|
1331
|
-
if (!
|
|
1342
|
+
if (!Vs(m.ref) || Us(m.ref))
|
|
1332
1343
|
throw new Error("unexpected behaviour");
|
|
1333
|
-
|
|
1344
|
+
j.push([m, e.getResourceData(m.ref, !1)]);
|
|
1334
1345
|
}
|
|
1335
1346
|
});
|
|
1336
|
-
for (const [p, m] of
|
|
1347
|
+
for (const [p, m] of j) {
|
|
1337
1348
|
const y = await m;
|
|
1338
1349
|
p.value = y.data, zt(y.error) ? p.status = "Error" : y.resourceReady || zt(y.originalResourceId) ? p.status = "Ready" : p.status = "NotReady";
|
|
1339
1350
|
}
|
|
1340
1351
|
const z = /* @__PURE__ */ new Map();
|
|
1341
|
-
O.forEach(({ id: p, fields: m }) => z.set(p, new
|
|
1352
|
+
O.forEach(({ id: p, fields: m }) => z.set(p, new ar(p, m)));
|
|
1342
1353
|
const ge = /* @__PURE__ */ new Set();
|
|
1343
1354
|
for (const p of se(E)) {
|
|
1344
1355
|
if (!z.has(p.id))
|
|
@@ -1367,16 +1378,16 @@ class Qe {
|
|
|
1367
1378
|
return v.fixProblemsAndMigrate(), v;
|
|
1368
1379
|
}
|
|
1369
1380
|
}
|
|
1370
|
-
async function un(s, e =
|
|
1371
|
-
const t = s.createEphemeral(
|
|
1381
|
+
async function un(s, e = Eo) {
|
|
1382
|
+
const t = s.createEphemeral(ko);
|
|
1372
1383
|
s.lock(t);
|
|
1373
1384
|
const r = String(Date.now());
|
|
1374
|
-
s.setKValue(t,
|
|
1375
|
-
const o = await
|
|
1385
|
+
s.setKValue(t, Wr, JSON.stringify(qr)), s.setKValue(t, Tt, r), s.setKValue(t, Te, r), s.setKValue(t, Le, JSON.stringify(e)), s.setKValue(t, he, JSON.stringify(Co)), s.setKValue(t, Ye, JSON.stringify(Po));
|
|
1386
|
+
const o = await ss();
|
|
1376
1387
|
return s.createField(
|
|
1377
|
-
|
|
1388
|
+
x(t, Ct(o.hash)),
|
|
1378
1389
|
"Dynamic",
|
|
1379
|
-
|
|
1390
|
+
A.wrapInHolder(s, Lt(s, o.spec))
|
|
1380
1391
|
), t;
|
|
1381
1392
|
}
|
|
1382
1393
|
async function Me(s, e, t) {
|
|
@@ -1408,7 +1419,7 @@ function* dn(s) {
|
|
|
1408
1419
|
M(s);
|
|
1409
1420
|
}
|
|
1410
1421
|
}
|
|
1411
|
-
function
|
|
1422
|
+
function cr(s, e) {
|
|
1412
1423
|
return Object.fromEntries(
|
|
1413
1424
|
Object.entries(s).map(([t, r]) => [t, e(r, t)])
|
|
1414
1425
|
);
|
|
@@ -1418,11 +1429,11 @@ function pn(s, e) {
|
|
|
1418
1429
|
case "Json":
|
|
1419
1430
|
return { ...s };
|
|
1420
1431
|
case "JsonPartitioned":
|
|
1421
|
-
return { ...s, parts:
|
|
1432
|
+
return { ...s, parts: cr(s.parts, e) };
|
|
1422
1433
|
case "BinaryPartitioned":
|
|
1423
1434
|
return {
|
|
1424
1435
|
...s,
|
|
1425
|
-
parts:
|
|
1436
|
+
parts: cr(s.parts, (t) => ({
|
|
1426
1437
|
index: e(t.index),
|
|
1427
1438
|
values: e(t.values)
|
|
1428
1439
|
}))
|
|
@@ -1532,7 +1543,7 @@ function yn(s) {
|
|
|
1532
1543
|
parts: r
|
|
1533
1544
|
};
|
|
1534
1545
|
}
|
|
1535
|
-
throw new Error(`unsupported resource type: ${
|
|
1546
|
+
throw new Error(`unsupported resource type: ${Js(s.resourceType)}`);
|
|
1536
1547
|
}
|
|
1537
1548
|
function wn(s, e) {
|
|
1538
1549
|
const t = s.axesSpec.length, r = {};
|
|
@@ -1551,13 +1562,13 @@ function Sn(s, e) {
|
|
|
1551
1562
|
const t = De("sha256");
|
|
1552
1563
|
return t.update(Z(s)), t.update(String(Xe(e.originalId) ? e.id : e.originalId)), t.digest().toString("hex");
|
|
1553
1564
|
}
|
|
1554
|
-
function
|
|
1565
|
+
function lr(s, e) {
|
|
1555
1566
|
return Z({ __isRef: !0, blockId: s, name: e });
|
|
1556
1567
|
}
|
|
1557
1568
|
function bn(s, e) {
|
|
1558
1569
|
return Z({ resolvePath: s, name: e });
|
|
1559
1570
|
}
|
|
1560
|
-
function
|
|
1571
|
+
function os(s, e = !0, t = !1, r = "") {
|
|
1561
1572
|
var a, c, l;
|
|
1562
1573
|
const o = /^(?<name>.*)\.(?<type>spec|data)$/, n = /* @__PURE__ */ new Map();
|
|
1563
1574
|
for (const u of s.listInputFields()) {
|
|
@@ -1597,8 +1608,8 @@ function ss(s, e = !0, t = !1, r = "") {
|
|
|
1597
1608
|
}
|
|
1598
1609
|
function Rn(s, e = !0, t = "", r) {
|
|
1599
1610
|
if (!s.getIsReadyOrError()) throw new Error("resource is not ready");
|
|
1600
|
-
const o =
|
|
1601
|
-
|
|
1611
|
+
const o = os(s, e, !1, t);
|
|
1612
|
+
Qs(o.locked);
|
|
1602
1613
|
const n = {};
|
|
1603
1614
|
for (const [i, a] of o.results) {
|
|
1604
1615
|
if (a.spec === void 0) throw new Error(`no spec for key ${i}`);
|
|
@@ -1606,7 +1617,7 @@ function Rn(s, e = !0, t = "", r) {
|
|
|
1606
1617
|
throw new Error(`no data for key ${i}`);
|
|
1607
1618
|
const c = a.data();
|
|
1608
1619
|
if (c === void 0) throw new Error(`no data for key ${i}`);
|
|
1609
|
-
if (!c.ok) throw new
|
|
1620
|
+
if (!c.ok) throw new Hs(c.error);
|
|
1610
1621
|
n[i] = {
|
|
1611
1622
|
id: r.length === 0 ? Sn(a.spec, c.value) : bn(r, i),
|
|
1612
1623
|
spec: a.spec,
|
|
@@ -1649,8 +1660,8 @@ class Nt {
|
|
|
1649
1660
|
if (r === void 0) return;
|
|
1650
1661
|
const o = (a = (i = r.prod) == null ? void 0 : i.results) == null ? void 0 : a.get(t), n = (c = o == null ? void 0 : o.data) == null ? void 0 : c.call(o);
|
|
1651
1662
|
if (o !== void 0 && o.spec !== void 0 && n !== void 0)
|
|
1652
|
-
return
|
|
1653
|
-
id:
|
|
1663
|
+
return Br(n, (l) => ({
|
|
1664
|
+
id: lr(e, t),
|
|
1654
1665
|
spec: o.spec,
|
|
1655
1666
|
data: l
|
|
1656
1667
|
}));
|
|
@@ -1689,7 +1700,7 @@ class Nt {
|
|
|
1689
1700
|
l !== void 0 ? e.push({
|
|
1690
1701
|
ref: Ge(i, a),
|
|
1691
1702
|
obj: {
|
|
1692
|
-
id: l.ok ?
|
|
1703
|
+
id: l.ok ? lr(i, a) : void 0,
|
|
1693
1704
|
spec: c.spec,
|
|
1694
1705
|
data: l
|
|
1695
1706
|
}
|
|
@@ -1743,7 +1754,7 @@ class Nt {
|
|
|
1743
1754
|
for (const r of this.blocks.values()) {
|
|
1744
1755
|
const o = /* @__PURE__ */ new Set(), n = (i) => {
|
|
1745
1756
|
for (const [a, c] of i.results)
|
|
1746
|
-
o.has(a) || c.spec === void 0 || (o.add(a),
|
|
1757
|
+
o.has(a) || c.spec === void 0 || (o.add(a), Es(e, c.spec) && t.push({
|
|
1747
1758
|
label: r.info.label + " / " + a,
|
|
1748
1759
|
ref: Ge(r.info.id, a),
|
|
1749
1760
|
spec: c.spec
|
|
@@ -1757,7 +1768,7 @@ class Nt {
|
|
|
1757
1768
|
const o = e.accessor(t).node(), n = B(o.getKeyValueAsJson(he)), a = Et(n).traverseIds("upstream", r), c = /* @__PURE__ */ new Map();
|
|
1758
1769
|
for (const l of se(n)) {
|
|
1759
1770
|
if (!a.has(l.id)) continue;
|
|
1760
|
-
const u =
|
|
1771
|
+
const u = ur(
|
|
1761
1772
|
o.traverse({
|
|
1762
1773
|
field: V(l.id, "prodCtx"),
|
|
1763
1774
|
ignoreError: !0,
|
|
@@ -1768,7 +1779,7 @@ class Nt {
|
|
|
1768
1779
|
field: V(l.id, "prodUiCtx"),
|
|
1769
1780
|
stableIfNotFound: !0
|
|
1770
1781
|
})
|
|
1771
|
-
), d =
|
|
1782
|
+
), d = ur(
|
|
1772
1783
|
o.traverse({
|
|
1773
1784
|
field: V(l.id, "stagingCtx"),
|
|
1774
1785
|
ignoreError: !0,
|
|
@@ -1783,10 +1794,10 @@ class Nt {
|
|
|
1783
1794
|
return new Nt(e, c);
|
|
1784
1795
|
}
|
|
1785
1796
|
}
|
|
1786
|
-
function
|
|
1797
|
+
function ur(s, e) {
|
|
1787
1798
|
if (e === void 0)
|
|
1788
1799
|
return s ? { locked: !1, results: /* @__PURE__ */ new Map() } : void 0;
|
|
1789
|
-
if (e.ok) return
|
|
1800
|
+
if (e.ok) return os(e.value, !1, !0);
|
|
1790
1801
|
}
|
|
1791
1802
|
function Dt(s, e) {
|
|
1792
1803
|
return {
|
|
@@ -1812,7 +1823,7 @@ function Dt(s, e) {
|
|
|
1812
1823
|
}
|
|
1813
1824
|
};
|
|
1814
1825
|
}
|
|
1815
|
-
function
|
|
1826
|
+
function ns(s, e) {
|
|
1816
1827
|
return {
|
|
1817
1828
|
...Dt(s, e),
|
|
1818
1829
|
prod: (t) => {
|
|
@@ -1933,7 +1944,7 @@ const kn = (s) => {
|
|
|
1933
1944
|
return et((o = r.accessor(e).node().traverse(t)) == null ? void 0 : o.persist());
|
|
1934
1945
|
};
|
|
1935
1946
|
};
|
|
1936
|
-
function
|
|
1947
|
+
function is(s, e) {
|
|
1937
1948
|
const t = {}, r = s.length;
|
|
1938
1949
|
for (let o = 0; o < r; o++) t[String(o)] = e(s[o]);
|
|
1939
1950
|
return t;
|
|
@@ -1943,12 +1954,12 @@ function Fn(s, e) {
|
|
|
1943
1954
|
const r = t.source;
|
|
1944
1955
|
return r === void 0 ? P(void 0) : () => ({
|
|
1945
1956
|
type: "ScheduleSubroutine",
|
|
1946
|
-
subroutine:
|
|
1947
|
-
args:
|
|
1957
|
+
subroutine: as(r.length),
|
|
1958
|
+
args: is(r, (o) => k({ ...s, [e.itVar]: o }, e.mapping))
|
|
1948
1959
|
});
|
|
1949
1960
|
};
|
|
1950
1961
|
}
|
|
1951
|
-
function
|
|
1962
|
+
function as(s) {
|
|
1952
1963
|
return (e) => {
|
|
1953
1964
|
const t = [];
|
|
1954
1965
|
for (let r = 0; r < s; r++) t.push(e[String(r)]);
|
|
@@ -1989,11 +2000,11 @@ const An = (s) => P(s), Tn = (s) => {
|
|
|
1989
2000
|
var r;
|
|
1990
2001
|
return et((r = t.accessor(e).node()) == null ? void 0 : r.getDataAsJson());
|
|
1991
2002
|
};
|
|
1992
|
-
},
|
|
2003
|
+
}, xn = (s) => {
|
|
1993
2004
|
const e = s.source, t = s.field;
|
|
1994
2005
|
return P(e === void 0 || t === void 0 ? void 0 : e[t]);
|
|
1995
2006
|
};
|
|
1996
|
-
function
|
|
2007
|
+
function jn(s, e) {
|
|
1997
2008
|
return (t) => {
|
|
1998
2009
|
const r = t.source;
|
|
1999
2010
|
return r === void 0 ? P(void 0) : ({ cCtx: o }) => {
|
|
@@ -2113,14 +2124,14 @@ function k(s, e) {
|
|
|
2113
2124
|
case "Isolate":
|
|
2114
2125
|
return ({ drivers: t }) => ({
|
|
2115
2126
|
type: "ScheduleComputable",
|
|
2116
|
-
computable:
|
|
2127
|
+
computable: us(t, s, e.cfg)
|
|
2117
2128
|
});
|
|
2118
2129
|
case "Immediate":
|
|
2119
2130
|
return P(e.value);
|
|
2120
2131
|
case "GetJsonField":
|
|
2121
2132
|
return () => ({
|
|
2122
2133
|
type: "ScheduleSubroutine",
|
|
2123
|
-
subroutine:
|
|
2134
|
+
subroutine: xn,
|
|
2124
2135
|
args: {
|
|
2125
2136
|
source: k(s, e.source),
|
|
2126
2137
|
field: k(s, e.field)
|
|
@@ -2151,8 +2162,8 @@ function k(s, e) {
|
|
|
2151
2162
|
case "MakeArray":
|
|
2152
2163
|
return () => ({
|
|
2153
2164
|
type: "ScheduleSubroutine",
|
|
2154
|
-
subroutine:
|
|
2155
|
-
args:
|
|
2165
|
+
subroutine: as(e.template.length),
|
|
2166
|
+
args: is(e.template, (t) => k(s, t))
|
|
2156
2167
|
});
|
|
2157
2168
|
case "Flatten":
|
|
2158
2169
|
return () => ({
|
|
@@ -2199,7 +2210,7 @@ function k(s, e) {
|
|
|
2199
2210
|
case "MapResourceFields":
|
|
2200
2211
|
return () => ({
|
|
2201
2212
|
type: "ScheduleSubroutine",
|
|
2202
|
-
subroutine:
|
|
2213
|
+
subroutine: jn(s, e),
|
|
2203
2214
|
args: {
|
|
2204
2215
|
source: k(s, e.source)
|
|
2205
2216
|
}
|
|
@@ -2326,15 +2337,15 @@ function Qn(s) {
|
|
|
2326
2337
|
$staging: s.staging
|
|
2327
2338
|
};
|
|
2328
2339
|
}
|
|
2329
|
-
const
|
|
2340
|
+
const cs = Symbol(), ls = "return", Zn = { op: cs, arg: ls };
|
|
2330
2341
|
function ei(s) {
|
|
2331
|
-
return s.op ==
|
|
2342
|
+
return s.op == cs && s.arg == ls;
|
|
2332
2343
|
}
|
|
2333
2344
|
function ti() {
|
|
2334
2345
|
return { pendingSubroutines: /* @__PURE__ */ new Map() };
|
|
2335
2346
|
}
|
|
2336
|
-
function
|
|
2337
|
-
const o = new
|
|
2347
|
+
function dr(s, e, t, r) {
|
|
2348
|
+
const o = new Mr(t), n = (a, c) => {
|
|
2338
2349
|
if (ei(a))
|
|
2339
2350
|
return e.result = c, !1;
|
|
2340
2351
|
const l = B(e.pendingSubroutines.get(a.op));
|
|
@@ -2388,9 +2399,9 @@ function ur(s, e, t, r) {
|
|
|
2388
2399
|
return i;
|
|
2389
2400
|
}
|
|
2390
2401
|
function ri(s, e, t, r = {}) {
|
|
2391
|
-
return
|
|
2402
|
+
return us(s, Qn(e), t, r);
|
|
2392
2403
|
}
|
|
2393
|
-
function
|
|
2404
|
+
function us(s, e, t, r = {}) {
|
|
2394
2405
|
const o = `${e.blockId}#` + Z({
|
|
2395
2406
|
ctx: Object.fromEntries(
|
|
2396
2407
|
Object.entries(e).filter(([n]) => Yn.indexOf(n) === -1)
|
|
@@ -2401,7 +2412,7 @@ function ls(s, e, t, r = {}) {
|
|
|
2401
2412
|
(n) => {
|
|
2402
2413
|
const i = { drivers: s, cCtx: n }, a = ti();
|
|
2403
2414
|
return {
|
|
2404
|
-
ir:
|
|
2415
|
+
ir: dr(
|
|
2405
2416
|
i,
|
|
2406
2417
|
a,
|
|
2407
2418
|
[
|
|
@@ -2428,7 +2439,7 @@ function ls(s, e, t, r = {}) {
|
|
|
2428
2439
|
result: a.result,
|
|
2429
2440
|
pendingSubroutines: g
|
|
2430
2441
|
};
|
|
2431
|
-
if (
|
|
2442
|
+
if (dr(d, f, u, !1), !("result" in f))
|
|
2432
2443
|
throw new Error("illegal cfg rendering stack state, no result");
|
|
2433
2444
|
return f.result;
|
|
2434
2445
|
}
|
|
@@ -2440,7 +2451,7 @@ function ls(s, e, t, r = {}) {
|
|
|
2440
2451
|
function si(s) {
|
|
2441
2452
|
return s instanceof ArrayBuffer || ArrayBuffer.isView(s);
|
|
2442
2453
|
}
|
|
2443
|
-
function
|
|
2454
|
+
function pr(s) {
|
|
2444
2455
|
return s !== void 0 ? Buffer.from(s).toString("base64") : void 0;
|
|
2445
2456
|
}
|
|
2446
2457
|
class Ze {
|
|
@@ -2550,13 +2561,13 @@ class Ze {
|
|
|
2550
2561
|
return this.getAccessor(e).listDynamicFields();
|
|
2551
2562
|
}
|
|
2552
2563
|
getKeyValueBase64(e, t) {
|
|
2553
|
-
return
|
|
2564
|
+
return pr(this.getAccessor(e).getKeyValue(t));
|
|
2554
2565
|
}
|
|
2555
2566
|
getKeyValueAsString(e, t) {
|
|
2556
2567
|
return this.getAccessor(e).getKeyValueAsString(t);
|
|
2557
2568
|
}
|
|
2558
2569
|
getDataBase64(e) {
|
|
2559
|
-
return
|
|
2570
|
+
return pr(this.getAccessor(e).getData());
|
|
2560
2571
|
}
|
|
2561
2572
|
getDataAsString(e) {
|
|
2562
2573
|
return this.getAccessor(e).getDataAsString();
|
|
@@ -2715,7 +2726,7 @@ class Ze {
|
|
|
2715
2726
|
obj: {
|
|
2716
2727
|
id: t.obj.id,
|
|
2717
2728
|
spec: t.obj.spec,
|
|
2718
|
-
data:
|
|
2729
|
+
data: Br(t.obj.data, (r) => this.wrapAccessor(r))
|
|
2719
2730
|
}
|
|
2720
2731
|
}))
|
|
2721
2732
|
};
|
|
@@ -2850,7 +2861,7 @@ class Ze {
|
|
|
2850
2861
|
this.vm.setProp(t, "args", e.manage(this.vm.newString(r))), n !== void 0 && this.vm.setProp(t, "uiState", e.manage(this.vm.newString(n))), o !== void 0 && this.vm.setProp(t, "activeArgs", e.manage(this.vm.newString(o))), this.vm.setProp(t, "callbackRegistry", this.callbackRegistry), this.vm.setProp(
|
|
2851
2862
|
t,
|
|
2852
2863
|
"featureFlags",
|
|
2853
|
-
this.exportObjectUniversal(
|
|
2864
|
+
this.exportObjectUniversal(ks.GlobalCfgRenderCtxFeatureFlags, e)
|
|
2854
2865
|
);
|
|
2855
2866
|
const i = (a, c) => {
|
|
2856
2867
|
this.vm.newFunction(a, c).consume((l) => this.vm.setProp(t, a, l));
|
|
@@ -2943,10 +2954,10 @@ function tt(s, e) {
|
|
|
2943
2954
|
assertFieldType: "Dynamic",
|
|
2944
2955
|
errorIfFieldNotSet: !0
|
|
2945
2956
|
},
|
|
2946
|
-
{ field:
|
|
2957
|
+
{ field: A.HolderRefField, assertFieldType: "Input", errorIfFieldNotFound: !0 }
|
|
2947
2958
|
),
|
|
2948
2959
|
(t) => {
|
|
2949
|
-
const r = t.getDataAsJson(), o =
|
|
2960
|
+
const r = t.getDataAsJson(), o = xr(r.config);
|
|
2950
2961
|
return { bpId: t.resourceInfo.id.toString(), info: r, cfg: o };
|
|
2951
2962
|
}
|
|
2952
2963
|
);
|
|
@@ -2966,11 +2977,11 @@ function oi(s, e, t, r, o, n = {}) {
|
|
|
2966
2977
|
let f = 0;
|
|
2967
2978
|
return _e && _e !== "unstable-only" && console.log(`Output ${t.handle} scaffold calculated.`), {
|
|
2968
2979
|
ir: d.computablesToResolve,
|
|
2969
|
-
postprocessValue: (h, { unstableMarker: E, stable:
|
|
2980
|
+
postprocessValue: (h, { unstableMarker: E, stable: T }) => {
|
|
2970
2981
|
for (const [K, O] of Object.entries(h)) d.runCallback(K, O);
|
|
2971
2982
|
const N = d.importObjectUniversal(g);
|
|
2972
|
-
return f++, _e && (_e !== "unstable-only" || !
|
|
2973
|
-
|
|
2983
|
+
return f++, _e && (_e !== "unstable-only" || !T) && console.log(
|
|
2984
|
+
T ? `Stable output ${t.handle} calculated ${N !== void 0 ? "defined" : "undefined"}; (#${f})` : `Unstable output ${t.handle}; marker = ${E}; ${N !== void 0 ? "defined" : "undefined"} (#${f})`
|
|
2974
2985
|
), N;
|
|
2975
2986
|
}
|
|
2976
2987
|
};
|
|
@@ -2988,50 +2999,50 @@ function $e(s, e, t, r, o, n = {}) {
|
|
|
2988
2999
|
function ii(s, e, t) {
|
|
2989
3000
|
return U.make(
|
|
2990
3001
|
(r) => {
|
|
2991
|
-
var h, E,
|
|
3002
|
+
var h, E, T, N, K, O, ne, fe;
|
|
2992
3003
|
const o = r.accessor(s).node(), n = B(o.getKeyValueAsJson(Tt)), i = B(o.getKeyValueAsJson(Te)), a = B(o.getKeyValueAsJson(Le)), c = B(o.getKeyValueAsJson(he)), l = B(
|
|
2993
3004
|
o.getKeyValueAsJson(Ye)
|
|
2994
3005
|
), u = /* @__PURE__ */ new Map();
|
|
2995
|
-
for (const { id:
|
|
3006
|
+
for (const { id: L } of se(c)) {
|
|
2996
3007
|
const q = o.traverse({
|
|
2997
|
-
field: V(
|
|
3008
|
+
field: V(L, "currentArgs"),
|
|
2998
3009
|
assertFieldType: "Dynamic",
|
|
2999
3010
|
errorIfFieldNotSet: !0
|
|
3000
3011
|
});
|
|
3001
3012
|
let ie;
|
|
3002
3013
|
const H = o.traverse({
|
|
3003
|
-
field: V(
|
|
3014
|
+
field: V(L, "prodArgs"),
|
|
3004
3015
|
assertFieldType: "Dynamic",
|
|
3005
3016
|
stableIfNotFound: !0
|
|
3006
3017
|
});
|
|
3007
3018
|
if (H !== void 0) {
|
|
3008
3019
|
const J = o.getField({
|
|
3009
|
-
field: V(
|
|
3020
|
+
field: V(L, "prodOutput"),
|
|
3010
3021
|
assertFieldType: "Dynamic",
|
|
3011
3022
|
errorIfFieldNotFound: !0
|
|
3012
|
-
}),
|
|
3013
|
-
field: V(
|
|
3023
|
+
}), j = o.getField({
|
|
3024
|
+
field: V(L, "prodUiCtx"),
|
|
3014
3025
|
assertFieldType: "Dynamic",
|
|
3015
3026
|
errorIfFieldNotFound: !0
|
|
3016
3027
|
});
|
|
3017
3028
|
ie = {
|
|
3018
3029
|
arguments: H.getDataAsJson(),
|
|
3019
3030
|
stale: q.id !== H.id,
|
|
3020
|
-
outputError: J.error !== void 0 ||
|
|
3021
|
-
outputsError: ((
|
|
3022
|
-
exportsError: ((O =
|
|
3023
|
-
finished: (J.value !== void 0 && J.value.getIsReadyOrError() || J.error !== void 0 && J.error.getIsReadyOrError()) && (
|
|
3031
|
+
outputError: J.error !== void 0 || j.error !== void 0 || ((h = J.value) == null ? void 0 : h.getError()) !== void 0 || ((E = j.value) == null ? void 0 : E.getError()) !== void 0,
|
|
3032
|
+
outputsError: ((T = J.error) == null ? void 0 : T.getDataAsString()) ?? ((K = (N = J.value) == null ? void 0 : N.getError()) == null ? void 0 : K.getDataAsString()),
|
|
3033
|
+
exportsError: ((O = j.error) == null ? void 0 : O.getDataAsString()) ?? ((fe = (ne = j.value) == null ? void 0 : ne.getError()) == null ? void 0 : fe.getDataAsString()),
|
|
3034
|
+
finished: (J.value !== void 0 && J.value.getIsReadyOrError() || J.error !== void 0 && J.error.getIsReadyOrError()) && (j.value !== void 0 && j.value.getIsReadyOrError() || j.error !== void 0 && j.error.getIsReadyOrError())
|
|
3024
3035
|
};
|
|
3025
3036
|
}
|
|
3026
|
-
u.set(
|
|
3037
|
+
u.set(L, { currentArguments: q.getDataAsJson(), prod: ie });
|
|
3027
3038
|
}
|
|
3028
|
-
const d = ze(c, (
|
|
3039
|
+
const d = ze(c, (L) => u.get(L).currentArguments), g = new Set(l.blocksInLimbo), f = [...se(c)].map(({ id: L, label: q, renderingMode: ie }) => {
|
|
3029
3040
|
var w, R, $, C, I;
|
|
3030
|
-
const H = B(u.get(
|
|
3031
|
-
let
|
|
3032
|
-
H.prod !== void 0 && (g.has(
|
|
3033
|
-
const z = tt(o,
|
|
3034
|
-
const oe = Dt(s,
|
|
3041
|
+
const H = B(u.get(L)), J = B(d.nodes.get(L));
|
|
3042
|
+
let j = "NotCalculated";
|
|
3043
|
+
H.prod !== void 0 && (g.has(L) ? j = "Limbo" : j = H.prod.finished ? "Done" : "Running");
|
|
3044
|
+
const z = tt(o, L), { sections: ge, title: v, inputsValid: p, sdkVersion: m } = Oe(z, ({ bpId: D, cfg: F }) => {
|
|
3045
|
+
const oe = Dt(s, L);
|
|
3035
3046
|
return {
|
|
3036
3047
|
sections: $e(
|
|
3037
3048
|
t,
|
|
@@ -3042,10 +3053,10 @@ function ii(s, e, t) {
|
|
|
3042
3053
|
),
|
|
3043
3054
|
title: Oe(
|
|
3044
3055
|
F.title,
|
|
3045
|
-
(
|
|
3056
|
+
(Rs) => $e(
|
|
3046
3057
|
t,
|
|
3047
3058
|
oe,
|
|
3048
|
-
|
|
3059
|
+
Rs,
|
|
3049
3060
|
F.code,
|
|
3050
3061
|
D
|
|
3051
3062
|
)
|
|
@@ -3060,7 +3071,7 @@ function ii(s, e, t) {
|
|
|
3060
3071
|
sdkVersion: F.sdkVersion
|
|
3061
3072
|
};
|
|
3062
3073
|
}) || {}, y = o.traverse({
|
|
3063
|
-
field: V(
|
|
3074
|
+
field: V(L, "blockSettings"),
|
|
3064
3075
|
assertFieldType: "Dynamic",
|
|
3065
3076
|
errorIfFieldNotSet: !0
|
|
3066
3077
|
}).getDataAsJson(), b = Oe(
|
|
@@ -3068,15 +3079,15 @@ function ii(s, e, t) {
|
|
|
3068
3079
|
({ info: D }) => t.blockUpdateWatcher.get({ currentSpec: D.source, settings: y })
|
|
3069
3080
|
);
|
|
3070
3081
|
return {
|
|
3071
|
-
id:
|
|
3082
|
+
id: L,
|
|
3072
3083
|
label: v ?? q,
|
|
3073
3084
|
title: v ?? q,
|
|
3074
3085
|
renderingMode: ie,
|
|
3075
|
-
stale: ((w = H.prod) == null ? void 0 : w.stale) !== !1 ||
|
|
3086
|
+
stale: ((w = H.prod) == null ? void 0 : w.stale) !== !1 || j === "Limbo",
|
|
3076
3087
|
missingReference: J.missingReferences,
|
|
3077
|
-
upstreams: [...d.traverseIdsExcludingRoots("upstream",
|
|
3078
|
-
downstreams: [...d.traverseIdsExcludingRoots("downstream",
|
|
3079
|
-
calculationStatus:
|
|
3088
|
+
upstreams: [...d.traverseIdsExcludingRoots("upstream", L)],
|
|
3089
|
+
downstreams: [...d.traverseIdsExcludingRoots("downstream", L)],
|
|
3090
|
+
calculationStatus: j,
|
|
3080
3091
|
outputErrors: ((R = H.prod) == null ? void 0 : R.outputError) === !0,
|
|
3081
3092
|
outputsError: ($ = H.prod) == null ? void 0 : $.outputsError,
|
|
3082
3093
|
exportsError: (C = H.prod) == null ? void 0 : C.exportsError,
|
|
@@ -3087,7 +3098,7 @@ function ii(s, e, t) {
|
|
|
3087
3098
|
currentBlockPack: (I = z == null ? void 0 : z.info) == null ? void 0 : I.source,
|
|
3088
3099
|
updates: b,
|
|
3089
3100
|
sdkVersion: m,
|
|
3090
|
-
navigationState: e.getState(
|
|
3101
|
+
navigationState: e.getState(L)
|
|
3091
3102
|
};
|
|
3092
3103
|
});
|
|
3093
3104
|
return {
|
|
@@ -3122,11 +3133,11 @@ function ii(s, e, t) {
|
|
|
3122
3133
|
}
|
|
3123
3134
|
function ai(s, e) {
|
|
3124
3135
|
const t = s.node();
|
|
3125
|
-
if (ue(t.resourceType,
|
|
3136
|
+
if (ue(t.resourceType, Qr)) {
|
|
3126
3137
|
const r = t.getDataAsJson();
|
|
3127
3138
|
if (r === void 0) throw new Error("No resource data.");
|
|
3128
3139
|
return e.frontendDownloadDriver.getPath(new URL(r.url)).withStableType();
|
|
3129
|
-
} else if (ue(t.resourceType,
|
|
3140
|
+
} else if (ue(t.resourceType, Zr)) {
|
|
3130
3141
|
const r = t.getDataAsJson();
|
|
3131
3142
|
if (r === void 0) throw new Error("No resource data.");
|
|
3132
3143
|
return e.signer.verify(
|
|
@@ -3161,8 +3172,8 @@ function li(s, e, t) {
|
|
|
3161
3172
|
field: V(e, "blockPack"),
|
|
3162
3173
|
assertFieldType: "Dynamic"
|
|
3163
3174
|
},
|
|
3164
|
-
{ field:
|
|
3165
|
-
{ field:
|
|
3175
|
+
{ field: A.HolderRefField, assertFieldType: "Input", errorIfFieldNotFound: !0 },
|
|
3176
|
+
{ field: ts, assertFieldType: "Input" }
|
|
3166
3177
|
)) == null ? void 0 : a.persist();
|
|
3167
3178
|
return {
|
|
3168
3179
|
path: ci(i, t),
|
|
@@ -3172,10 +3183,10 @@ function li(s, e, t) {
|
|
|
3172
3183
|
{ mode: "StableOnlyLive" }
|
|
3173
3184
|
);
|
|
3174
3185
|
}
|
|
3175
|
-
function
|
|
3186
|
+
function ds(s, e, t) {
|
|
3176
3187
|
if (t === void 0)
|
|
3177
|
-
return U.make((i) =>
|
|
3178
|
-
key: `inputs#${
|
|
3188
|
+
return U.make((i) => ds(s, e, i), {
|
|
3189
|
+
key: `inputs#${Jr(s.rid)}#${e}`
|
|
3179
3190
|
});
|
|
3180
3191
|
const r = t.accessor(s).node(), o = Dt(s, e), n = o.uiState(t);
|
|
3181
3192
|
return {
|
|
@@ -3187,7 +3198,7 @@ function us(s, e, t) {
|
|
|
3187
3198
|
function ui(s, e, t) {
|
|
3188
3199
|
return U.make(
|
|
3189
3200
|
(r) => {
|
|
3190
|
-
const o = r.accessor(s).node(), n =
|
|
3201
|
+
const o = r.accessor(s).node(), n = ns(s, e);
|
|
3191
3202
|
return Oe(tt(o, e), ({ cfg: i, bpId: a }) => {
|
|
3192
3203
|
const c = {};
|
|
3193
3204
|
for (const [l, u] of Object.entries(i.outputs)) {
|
|
@@ -3197,7 +3208,7 @@ function ui(s, e, t) {
|
|
|
3197
3208
|
return c;
|
|
3198
3209
|
});
|
|
3199
3210
|
},
|
|
3200
|
-
{ key: "outputs#" +
|
|
3211
|
+
{ key: "outputs#" + Jr(s.rid) + "#" + e }
|
|
3201
3212
|
).withStableType();
|
|
3202
3213
|
}
|
|
3203
3214
|
function di(s, e) {
|
|
@@ -3208,7 +3219,7 @@ function di(s, e) {
|
|
|
3208
3219
|
if (a === void 0) continue;
|
|
3209
3220
|
const c = Object.entries(a.cfg.outputs).map(([, u]) => u).filter((u) => ni(u)).map((u) => u);
|
|
3210
3221
|
if (c.length === 0) continue;
|
|
3211
|
-
const l =
|
|
3222
|
+
const l = ns(r.persist(), i);
|
|
3212
3223
|
for (const u of c)
|
|
3213
3224
|
n.push(
|
|
3214
3225
|
U.wrapError($e(e, l, u, a.cfg.code, a.bpId))
|
|
@@ -3231,7 +3242,7 @@ class pi {
|
|
|
3231
3242
|
}
|
|
3232
3243
|
readState(e, t) {
|
|
3233
3244
|
let r = this.states.get(t);
|
|
3234
|
-
return r === void 0 && (r = { state: { ...
|
|
3245
|
+
return r === void 0 && (r = { state: { ...Os }, change: new Yt() }, this.states.set(t, r)), r.change.attachWatcher(e.watcher), r.state;
|
|
3235
3246
|
}
|
|
3236
3247
|
getState(e) {
|
|
3237
3248
|
return U.make(
|
|
@@ -3268,14 +3279,14 @@ class Bt {
|
|
|
3268
3279
|
try {
|
|
3269
3280
|
await Me(this.env.pl, this.rid, (e) => {
|
|
3270
3281
|
e.doRefresh(this.env.ops.stagingRenderingRate);
|
|
3271
|
-
}), await this.activeConfigs.getValue(), await
|
|
3282
|
+
}), await this.activeConfigs.getValue(), await _r(this.env.ops.projectRefreshInterval, this.abortController.signal);
|
|
3272
3283
|
} catch (e) {
|
|
3273
|
-
if (
|
|
3284
|
+
if (Gs(e)) {
|
|
3274
3285
|
console.warn(
|
|
3275
3286
|
"project refresh routine terminated, because project was externally deleted"
|
|
3276
3287
|
);
|
|
3277
3288
|
break;
|
|
3278
|
-
} else if (!
|
|
3289
|
+
} else if (!Ms(e))
|
|
3279
3290
|
throw new Error("Unexpected exception", { cause: e });
|
|
3280
3291
|
}
|
|
3281
3292
|
}
|
|
@@ -3291,7 +3302,7 @@ class Bt {
|
|
|
3291
3302
|
* @return returns newly created block id
|
|
3292
3303
|
* */
|
|
3293
3304
|
async addBlock(e, t, r, o = void 0, n = Ae()) {
|
|
3294
|
-
const i = await this.env.bpPreparer.prepare(t), a = await this.env.bpPreparer.getBlockConfigContainer(t), c =
|
|
3305
|
+
const i = await this.env.bpPreparer.prepare(t), a = await this.env.bpPreparer.getBlockConfigContainer(t), c = xr(a);
|
|
3295
3306
|
return await Q(
|
|
3296
3307
|
this.env.pl,
|
|
3297
3308
|
this.rid,
|
|
@@ -3441,9 +3452,9 @@ class Bt {
|
|
|
3441
3452
|
async resetBlockArgsAndUiState(e, t) {
|
|
3442
3453
|
await this.env.pl.withWriteTx("BlockInputsReset", async (r) => {
|
|
3443
3454
|
const o = yt(
|
|
3444
|
-
(await r.getField(
|
|
3455
|
+
(await r.getField(x(this.rid, V(e, "blockPack")))).value
|
|
3445
3456
|
), n = yt(
|
|
3446
|
-
(await r.getField(
|
|
3457
|
+
(await r.getField(x(o, A.HolderRefField))).value
|
|
3447
3458
|
), i = await r.getResourceData(n, !1), a = JSON.parse(
|
|
3448
3459
|
Buffer.from(B(i.data)).toString("utf-8")
|
|
3449
3460
|
);
|
|
@@ -3458,7 +3469,7 @@ class Bt {
|
|
|
3458
3469
|
const r = ui(this.projectTree.entry(), e, this.env), n = {
|
|
3459
3470
|
fullState: U.make(
|
|
3460
3471
|
(i) => ({
|
|
3461
|
-
argsAndUiState:
|
|
3472
|
+
argsAndUiState: ds(this.projectTree.entry(), e, i),
|
|
3462
3473
|
outputs: r,
|
|
3463
3474
|
navigationState: this.navigationStates.getState(e)
|
|
3464
3475
|
}),
|
|
@@ -3511,7 +3522,7 @@ class Bt {
|
|
|
3511
3522
|
static async init(e, t) {
|
|
3512
3523
|
await Me(e.pl, t, (o) => {
|
|
3513
3524
|
});
|
|
3514
|
-
const r = await
|
|
3525
|
+
const r = await Gr.init(
|
|
3515
3526
|
e.pl,
|
|
3516
3527
|
t,
|
|
3517
3528
|
{
|
|
@@ -3535,8 +3546,8 @@ function hi(s) {
|
|
|
3535
3546
|
return s.fields;
|
|
3536
3547
|
}
|
|
3537
3548
|
}
|
|
3538
|
-
const
|
|
3539
|
-
logger: new
|
|
3549
|
+
const ps = {
|
|
3550
|
+
logger: new Ds(),
|
|
3540
3551
|
blobDriverOps: {
|
|
3541
3552
|
cacheSoftSizeBytes: 100 * 1024 * 1024,
|
|
3542
3553
|
// 100MB
|
|
@@ -3559,14 +3570,14 @@ const ds = {
|
|
|
3559
3570
|
stopPollingDelay: 1e3
|
|
3560
3571
|
}
|
|
3561
3572
|
};
|
|
3562
|
-
function
|
|
3573
|
+
function hs(s) {
|
|
3563
3574
|
return {
|
|
3564
3575
|
blobDownloadPath: G.join(s, "download"),
|
|
3565
3576
|
downloadBlobToURLPath: G.join(s, "downloadToURL")
|
|
3566
3577
|
};
|
|
3567
3578
|
}
|
|
3568
3579
|
const fi = {
|
|
3569
|
-
...
|
|
3580
|
+
...ps,
|
|
3570
3581
|
defaultTreeOptions: {
|
|
3571
3582
|
pollingInterval: 350,
|
|
3572
3583
|
stopPollingDelay: 2500
|
|
@@ -3577,7 +3588,7 @@ const fi = {
|
|
|
3577
3588
|
};
|
|
3578
3589
|
function gi(s) {
|
|
3579
3590
|
return {
|
|
3580
|
-
...
|
|
3591
|
+
...hs(s),
|
|
3581
3592
|
frontendDownloadPath: G.join(s, "frontend")
|
|
3582
3593
|
};
|
|
3583
3594
|
}
|
|
@@ -3585,8 +3596,8 @@ function mi(s) {
|
|
|
3585
3596
|
return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
|
|
3586
3597
|
}
|
|
3587
3598
|
var Ot = { exports: {} };
|
|
3588
|
-
const vi = "2.0.0",
|
|
3589
|
-
9007199254740991, wi = 16, Si =
|
|
3599
|
+
const vi = "2.0.0", fs = 256, yi = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
|
|
3600
|
+
9007199254740991, wi = 16, Si = fs - 6, bi = [
|
|
3590
3601
|
"major",
|
|
3591
3602
|
"premajor",
|
|
3592
3603
|
"minor",
|
|
@@ -3596,7 +3607,7 @@ const vi = "2.0.0", hs = 256, yi = Number.MAX_SAFE_INTEGER || /* istanbul ignore
|
|
|
3596
3607
|
"prerelease"
|
|
3597
3608
|
];
|
|
3598
3609
|
var rt = {
|
|
3599
|
-
MAX_LENGTH:
|
|
3610
|
+
MAX_LENGTH: fs,
|
|
3600
3611
|
MAX_SAFE_COMPONENT_LENGTH: wi,
|
|
3601
3612
|
MAX_SAFE_BUILD_LENGTH: Si,
|
|
3602
3613
|
MAX_SAFE_INTEGER: yi,
|
|
@@ -3622,27 +3633,27 @@ var st = Ri;
|
|
|
3622
3633
|
["\\d", o],
|
|
3623
3634
|
[d, r]
|
|
3624
3635
|
], f = (E) => {
|
|
3625
|
-
for (const [
|
|
3626
|
-
E = E.split(`${
|
|
3636
|
+
for (const [T, N] of g)
|
|
3637
|
+
E = E.split(`${T}*`).join(`${T}{0,${N}}`).split(`${T}+`).join(`${T}{1,${N}}`);
|
|
3627
3638
|
return E;
|
|
3628
|
-
}, h = (E,
|
|
3629
|
-
const K = f(
|
|
3630
|
-
n(E, O,
|
|
3639
|
+
}, h = (E, T, N) => {
|
|
3640
|
+
const K = f(T), O = u++;
|
|
3641
|
+
n(E, O, T), l[E] = O, c[O] = T, i[O] = new RegExp(T, N ? "g" : void 0), a[O] = new RegExp(K, N ? "g" : void 0);
|
|
3631
3642
|
};
|
|
3632
3643
|
h("NUMERICIDENTIFIER", "0|[1-9]\\d*"), h("NUMERICIDENTIFIERLOOSE", "\\d+"), h("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${d}*`), h("MAINVERSION", `(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`), h("MAINVERSIONLOOSE", `(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`), h("PRERELEASEIDENTIFIER", `(?:${c[l.NUMERICIDENTIFIER]}|${c[l.NONNUMERICIDENTIFIER]})`), h("PRERELEASEIDENTIFIERLOOSE", `(?:${c[l.NUMERICIDENTIFIERLOOSE]}|${c[l.NONNUMERICIDENTIFIER]})`), h("PRERELEASE", `(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`), h("PRERELEASELOOSE", `(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`), h("BUILDIDENTIFIER", `${d}+`), h("BUILD", `(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`), h("FULLPLAIN", `v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`), h("FULL", `^${c[l.FULLPLAIN]}$`), h("LOOSEPLAIN", `[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`), h("LOOSE", `^${c[l.LOOSEPLAIN]}$`), h("GTLT", "((?:<|>)?=?)"), h("XRANGEIDENTIFIERLOOSE", `${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), h("XRANGEIDENTIFIER", `${c[l.NUMERICIDENTIFIER]}|x|X|\\*`), h("XRANGEPLAIN", `[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`), h("XRANGEPLAINLOOSE", `[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`), h("XRANGE", `^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`), h("XRANGELOOSE", `^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`), h("COERCEPLAIN", `(^|[^\\d])(\\d{1,${t}})(?:\\.(\\d{1,${t}}))?(?:\\.(\\d{1,${t}}))?`), h("COERCE", `${c[l.COERCEPLAIN]}(?:$|[^\\d])`), h("COERCEFULL", c[l.COERCEPLAIN] + `(?:${c[l.PRERELEASE]})?(?:${c[l.BUILD]})?(?:$|[^\\d])`), h("COERCERTL", c[l.COERCE], !0), h("COERCERTLFULL", c[l.COERCEFULL], !0), h("LONETILDE", "(?:~>?)"), h("TILDETRIM", `(\\s*)${c[l.LONETILDE]}\\s+`, !0), e.tildeTrimReplace = "$1~", h("TILDE", `^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`), h("TILDELOOSE", `^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`), h("LONECARET", "(?:\\^)"), h("CARETTRIM", `(\\s*)${c[l.LONECARET]}\\s+`, !0), e.caretTrimReplace = "$1^", h("CARET", `^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`), h("CARETLOOSE", `^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`), h("COMPARATORLOOSE", `^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`), h("COMPARATOR", `^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`), h("COMPARATORTRIM", `(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`, !0), e.comparatorTrimReplace = "$1$2$3", h("HYPHENRANGE", `^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`), h("HYPHENRANGELOOSE", `^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`), h("STAR", "(<|>)?=?\\s*\\*"), h("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), h("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
3633
3644
|
})(Ot, Ot.exports);
|
|
3634
3645
|
var Be = Ot.exports;
|
|
3635
3646
|
const Ci = Object.freeze({ loose: !0 }), Pi = Object.freeze({}), Ei = (s) => s ? typeof s != "object" ? Ci : s : Pi;
|
|
3636
|
-
var
|
|
3637
|
-
const
|
|
3638
|
-
const t =
|
|
3647
|
+
var xt = Ei;
|
|
3648
|
+
const hr = /^[0-9]+$/, gs = (s, e) => {
|
|
3649
|
+
const t = hr.test(s), r = hr.test(e);
|
|
3639
3650
|
return t && r && (s = +s, e = +e), s === e ? 0 : t && !r ? -1 : r && !t ? 1 : s < e ? -1 : 1;
|
|
3640
|
-
}, ki = (s, e) =>
|
|
3641
|
-
var
|
|
3642
|
-
compareIdentifiers:
|
|
3651
|
+
}, ki = (s, e) => gs(e, s);
|
|
3652
|
+
var ms = {
|
|
3653
|
+
compareIdentifiers: gs,
|
|
3643
3654
|
rcompareIdentifiers: ki
|
|
3644
3655
|
};
|
|
3645
|
-
const Ke = st, { MAX_LENGTH:
|
|
3656
|
+
const Ke = st, { MAX_LENGTH: fr, MAX_SAFE_INTEGER: He } = rt, { safeRe: gr, t: mr } = Be, Oi = xt, { compareIdentifiers: me } = ms;
|
|
3646
3657
|
let $i = class re {
|
|
3647
3658
|
constructor(e, t) {
|
|
3648
3659
|
if (t = Oi(t), e instanceof re) {
|
|
@@ -3651,12 +3662,12 @@ let $i = class re {
|
|
|
3651
3662
|
e = e.version;
|
|
3652
3663
|
} else if (typeof e != "string")
|
|
3653
3664
|
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);
|
|
3654
|
-
if (e.length >
|
|
3665
|
+
if (e.length > fr)
|
|
3655
3666
|
throw new TypeError(
|
|
3656
|
-
`version is longer than ${
|
|
3667
|
+
`version is longer than ${fr} characters`
|
|
3657
3668
|
);
|
|
3658
3669
|
Ke("SemVer", e, t), this.options = t, this.loose = !!t.loose, this.includePrerelease = !!t.includePrerelease;
|
|
3659
|
-
const r = e.trim().match(t.loose ?
|
|
3670
|
+
const r = e.trim().match(t.loose ? gr[mr.LOOSE] : gr[mr.FULL]);
|
|
3660
3671
|
if (!r)
|
|
3661
3672
|
throw new TypeError(`Invalid Version: ${e}`);
|
|
3662
3673
|
if (this.raw = e, this.major = +r[1], this.minor = +r[2], this.patch = +r[3], this.major > He || this.major < 0)
|
|
@@ -3782,11 +3793,11 @@ let $i = class re {
|
|
|
3782
3793
|
}
|
|
3783
3794
|
};
|
|
3784
3795
|
var _ = $i;
|
|
3785
|
-
const
|
|
3786
|
-
if (s instanceof
|
|
3796
|
+
const vr = _, Fi = (s, e, t = !1) => {
|
|
3797
|
+
if (s instanceof vr)
|
|
3787
3798
|
return s;
|
|
3788
3799
|
try {
|
|
3789
|
-
return new
|
|
3800
|
+
return new vr(s, e);
|
|
3790
3801
|
} catch (r) {
|
|
3791
3802
|
if (!t)
|
|
3792
3803
|
return null;
|
|
@@ -3804,20 +3815,20 @@ const Li = Se, Ni = (s, e) => {
|
|
|
3804
3815
|
return t ? t.version : null;
|
|
3805
3816
|
};
|
|
3806
3817
|
var Di = Ni;
|
|
3807
|
-
const
|
|
3818
|
+
const yr = _, Bi = (s, e, t, r, o) => {
|
|
3808
3819
|
typeof t == "string" && (o = r, r = t, t = void 0);
|
|
3809
3820
|
try {
|
|
3810
|
-
return new
|
|
3811
|
-
s instanceof
|
|
3821
|
+
return new yr(
|
|
3822
|
+
s instanceof yr ? s.version : s,
|
|
3812
3823
|
t
|
|
3813
3824
|
).inc(e, r, o).version;
|
|
3814
3825
|
} catch {
|
|
3815
3826
|
return null;
|
|
3816
3827
|
}
|
|
3817
3828
|
};
|
|
3818
|
-
var
|
|
3819
|
-
const
|
|
3820
|
-
const t =
|
|
3829
|
+
var xi = Bi;
|
|
3830
|
+
const wr = Se, ji = (s, e) => {
|
|
3831
|
+
const t = wr(s, null, !0), r = wr(e, null, !0), o = t.compare(r);
|
|
3821
3832
|
if (o === 0)
|
|
3822
3833
|
return null;
|
|
3823
3834
|
const n = o > 0, i = n ? t : r, a = n ? r : t, c = !!i.prerelease.length;
|
|
@@ -3826,7 +3837,7 @@ const yr = Se, xi = (s, e) => {
|
|
|
3826
3837
|
const u = c ? "pre" : "";
|
|
3827
3838
|
return t.major !== r.major ? u + "major" : t.minor !== r.minor ? u + "minor" : t.patch !== r.patch ? u + "patch" : "prerelease";
|
|
3828
3839
|
};
|
|
3829
|
-
var Vi =
|
|
3840
|
+
var Vi = ji;
|
|
3830
3841
|
const Ui = _, Ji = (s, e) => new Ui(s, e).major;
|
|
3831
3842
|
var Gi = Ji;
|
|
3832
3843
|
const Mi = _, _i = (s, e) => new Mi(s, e).minor;
|
|
@@ -3838,34 +3849,34 @@ const zi = Se, Xi = (s, e) => {
|
|
|
3838
3849
|
return t && t.prerelease.length ? t.prerelease : null;
|
|
3839
3850
|
};
|
|
3840
3851
|
var Yi = Xi;
|
|
3841
|
-
const
|
|
3852
|
+
const Sr = _, Qi = (s, e, t) => new Sr(s, t).compare(new Sr(e, t));
|
|
3842
3853
|
var ee = Qi;
|
|
3843
3854
|
const Zi = ee, ea = (s, e, t) => Zi(e, s, t);
|
|
3844
3855
|
var ta = ea;
|
|
3845
3856
|
const ra = ee, sa = (s, e) => ra(s, e, !0);
|
|
3846
3857
|
var oa = sa;
|
|
3847
|
-
const
|
|
3848
|
-
const r = new
|
|
3858
|
+
const br = _, na = (s, e, t) => {
|
|
3859
|
+
const r = new br(s, t), o = new br(e, t);
|
|
3849
3860
|
return r.compare(o) || r.compareBuild(o);
|
|
3850
3861
|
};
|
|
3851
|
-
var
|
|
3852
|
-
const ia =
|
|
3862
|
+
var jt = na;
|
|
3863
|
+
const ia = jt, aa = (s, e) => s.sort((t, r) => ia(t, r, e));
|
|
3853
3864
|
var ca = aa;
|
|
3854
|
-
const la =
|
|
3865
|
+
const la = jt, ua = (s, e) => s.sort((t, r) => la(r, t, e));
|
|
3855
3866
|
var da = ua;
|
|
3856
3867
|
const pa = ee, ha = (s, e, t) => pa(s, e, t) > 0;
|
|
3857
3868
|
var ot = ha;
|
|
3858
3869
|
const fa = ee, ga = (s, e, t) => fa(s, e, t) < 0;
|
|
3859
3870
|
var Vt = ga;
|
|
3860
3871
|
const ma = ee, va = (s, e, t) => ma(s, e, t) === 0;
|
|
3861
|
-
var
|
|
3872
|
+
var vs = va;
|
|
3862
3873
|
const ya = ee, wa = (s, e, t) => ya(s, e, t) !== 0;
|
|
3863
|
-
var
|
|
3874
|
+
var ys = wa;
|
|
3864
3875
|
const Sa = ee, ba = (s, e, t) => Sa(s, e, t) >= 0;
|
|
3865
3876
|
var Ut = ba;
|
|
3866
3877
|
const Ra = ee, Ca = (s, e, t) => Ra(s, e, t) <= 0;
|
|
3867
3878
|
var Jt = Ca;
|
|
3868
|
-
const Pa =
|
|
3879
|
+
const Pa = vs, Ea = ys, ka = ot, Oa = Ut, $a = Vt, Fa = Jt, Ia = (s, e, t, r) => {
|
|
3869
3880
|
switch (e) {
|
|
3870
3881
|
case "===":
|
|
3871
3882
|
return typeof s == "object" && (s = s.version), typeof t == "object" && (t = t.version), s === t;
|
|
@@ -3889,7 +3900,7 @@ const Pa = ms, Ea = vs, ka = ot, Oa = Ut, $a = Vt, Fa = Jt, Ia = (s, e, t, r) =>
|
|
|
3889
3900
|
throw new TypeError(`Invalid operator: ${e}`);
|
|
3890
3901
|
}
|
|
3891
3902
|
};
|
|
3892
|
-
var
|
|
3903
|
+
var ws = Ia;
|
|
3893
3904
|
const Aa = _, Ta = Se, { safeRe: We, t: qe } = Be, La = (s, e) => {
|
|
3894
3905
|
if (s instanceof Aa)
|
|
3895
3906
|
return s;
|
|
@@ -3935,10 +3946,10 @@ class Da {
|
|
|
3935
3946
|
return this;
|
|
3936
3947
|
}
|
|
3937
3948
|
}
|
|
3938
|
-
var Ba = Da, ut,
|
|
3949
|
+
var Ba = Da, ut, Rr;
|
|
3939
3950
|
function te() {
|
|
3940
|
-
if (
|
|
3941
|
-
|
|
3951
|
+
if (Rr) return ut;
|
|
3952
|
+
Rr = 1;
|
|
3942
3953
|
const s = /\s+/g;
|
|
3943
3954
|
class e {
|
|
3944
3955
|
constructor(p, m) {
|
|
@@ -3954,7 +3965,7 @@ function te() {
|
|
|
3954
3965
|
this.set = [y];
|
|
3955
3966
|
else if (this.set.length > 1) {
|
|
3956
3967
|
for (const b of this.set)
|
|
3957
|
-
if (b.length === 1 &&
|
|
3968
|
+
if (b.length === 1 && T(b[0])) {
|
|
3958
3969
|
this.set = [b];
|
|
3959
3970
|
break;
|
|
3960
3971
|
}
|
|
@@ -3986,7 +3997,7 @@ function te() {
|
|
|
3986
3997
|
return b;
|
|
3987
3998
|
const w = this.options.loose, R = w ? c[l.HYPHENRANGELOOSE] : c[l.HYPHENRANGE];
|
|
3988
3999
|
p = p.replace(R, z(this.options.includePrerelease)), i("hyphen replace", p), p = p.replace(c[l.COMPARATORTRIM], u), i("comparator trim", p), p = p.replace(c[l.TILDETRIM], d), i("tilde trim", p), p = p.replace(c[l.CARETTRIM], g), i("caret trim", p);
|
|
3989
|
-
let $ = p.split(" ").map((F) => K(F, this.options)).join(" ").split(/\s+/).map((F) =>
|
|
4000
|
+
let $ = p.split(" ").map((F) => K(F, this.options)).join(" ").split(/\s+/).map((F) => j(F, this.options));
|
|
3990
4001
|
w && ($ = $.filter((F) => (i("loose invalid filter", F, this.options), !!F.match(c[l.COMPARATORLOOSE])))), i("range list", $);
|
|
3991
4002
|
const C = /* @__PURE__ */ new Map(), I = $.map((F) => new n(F, this.options));
|
|
3992
4003
|
for (const F of I) {
|
|
@@ -4020,27 +4031,27 @@ function te() {
|
|
|
4020
4031
|
}
|
|
4021
4032
|
}
|
|
4022
4033
|
ut = e;
|
|
4023
|
-
const t = Ba, r = new t(), o =
|
|
4034
|
+
const t = Ba, r = new t(), o = xt, n = nt(), i = st, a = _, {
|
|
4024
4035
|
safeRe: c,
|
|
4025
4036
|
t: l,
|
|
4026
4037
|
comparatorTrimReplace: u,
|
|
4027
4038
|
tildeTrimReplace: d,
|
|
4028
4039
|
caretTrimReplace: g
|
|
4029
|
-
} = Be, { FLAG_INCLUDE_PRERELEASE: f, FLAG_LOOSE: h } = rt, E = (v) => v.value === "<0.0.0-0",
|
|
4040
|
+
} = Be, { FLAG_INCLUDE_PRERELEASE: f, FLAG_LOOSE: h } = rt, E = (v) => v.value === "<0.0.0-0", T = (v) => v.value === "", N = (v, p) => {
|
|
4030
4041
|
let m = !0;
|
|
4031
4042
|
const y = v.slice();
|
|
4032
4043
|
let b = y.pop();
|
|
4033
4044
|
for (; m && y.length; )
|
|
4034
4045
|
m = y.every((w) => b.intersects(w, p)), b = y.pop();
|
|
4035
4046
|
return m;
|
|
4036
|
-
}, K = (v, p) => (i("comp", v, p), v =
|
|
4047
|
+
}, K = (v, p) => (i("comp", v, p), v = L(v, p), i("caret", v), v = ne(v, p), i("tildes", v), v = ie(v, p), i("xrange", v), v = J(v, p), i("stars", v), v), O = (v) => !v || v.toLowerCase() === "x" || v === "*", ne = (v, p) => v.trim().split(/\s+/).map((m) => fe(m, p)).join(" "), fe = (v, p) => {
|
|
4037
4048
|
const m = p.loose ? c[l.TILDELOOSE] : c[l.TILDE];
|
|
4038
4049
|
return v.replace(m, (y, b, w, R, $) => {
|
|
4039
4050
|
i("tilde", v, y, b, w, R, $);
|
|
4040
4051
|
let C;
|
|
4041
4052
|
return O(b) ? C = "" : O(w) ? C = `>=${b}.0.0 <${+b + 1}.0.0-0` : O(R) ? C = `>=${b}.${w}.0 <${b}.${+w + 1}.0-0` : $ ? (i("replaceTilde pr", $), C = `>=${b}.${w}.${R}-${$} <${b}.${+w + 1}.0-0`) : C = `>=${b}.${w}.${R} <${b}.${+w + 1}.0-0`, i("tilde return", C), C;
|
|
4042
4053
|
});
|
|
4043
|
-
},
|
|
4054
|
+
}, L = (v, p) => v.trim().split(/\s+/).map((m) => q(m, p)).join(" "), q = (v, p) => {
|
|
4044
4055
|
i("caret", v, p);
|
|
4045
4056
|
const m = p.loose ? c[l.CARETLOOSE] : c[l.CARET], y = p.includePrerelease ? "-0" : "";
|
|
4046
4057
|
return v.replace(m, (b, w, R, $, C) => {
|
|
@@ -4056,7 +4067,7 @@ function te() {
|
|
|
4056
4067
|
const I = O(w), D = I || O(R), F = D || O($), oe = F;
|
|
4057
4068
|
return b === "=" && oe && (b = ""), C = p.includePrerelease ? "-0" : "", I ? b === ">" || b === "<" ? y = "<0.0.0-0" : y = "*" : b && oe ? (D && (R = 0), $ = 0, b === ">" ? (b = ">=", D ? (w = +w + 1, R = 0, $ = 0) : (R = +R + 1, $ = 0)) : b === "<=" && (b = "<", D ? w = +w + 1 : R = +R + 1), b === "<" && (C = "-0"), y = `${b + w}.${R}.${$}${C}`) : D ? y = `>=${w}.0.0${C} <${+w + 1}.0.0-0` : F && (y = `>=${w}.${R}.0${C} <${w}.${+R + 1}.0-0`), i("xRange return", y), y;
|
|
4058
4069
|
});
|
|
4059
|
-
}, J = (v, p) => (i("replaceStars", v, p), v.trim().replace(c[l.STAR], "")),
|
|
4070
|
+
}, J = (v, p) => (i("replaceStars", v, p), v.trim().replace(c[l.STAR], "")), j = (v, p) => (i("replaceGTE0", v, p), v.trim().replace(c[p.includePrerelease ? l.GTE0PRE : l.GTE0], "")), z = (v) => (p, m, y, b, w, R, $, C, I, D, F, oe) => (O(y) ? m = "" : O(b) ? m = `>=${y}.0.0${v ? "-0" : ""}` : O(w) ? m = `>=${y}.${b}.0${v ? "-0" : ""}` : R ? m = `>=${m}` : m = `>=${m}${v ? "-0" : ""}`, O(I) ? C = "" : O(D) ? C = `<${+I + 1}.0.0-0` : O(F) ? C = `<${I}.${+D + 1}.0-0` : oe ? C = `<=${I}.${D}.${F}-${oe}` : v ? C = `<${I}.${D}.${+F + 1}-0` : C = `<=${C}`, `${m} ${C}`.trim()), ge = (v, p, m) => {
|
|
4060
4071
|
for (let y = 0; y < v.length; y++)
|
|
4061
4072
|
if (!v[y].test(p))
|
|
4062
4073
|
return !1;
|
|
@@ -4073,10 +4084,10 @@ function te() {
|
|
|
4073
4084
|
};
|
|
4074
4085
|
return ut;
|
|
4075
4086
|
}
|
|
4076
|
-
var dt,
|
|
4087
|
+
var dt, Cr;
|
|
4077
4088
|
function nt() {
|
|
4078
|
-
if (
|
|
4079
|
-
|
|
4089
|
+
if (Cr) return dt;
|
|
4090
|
+
Cr = 1;
|
|
4080
4091
|
const s = Symbol("SemVer ANY");
|
|
4081
4092
|
class e {
|
|
4082
4093
|
static get ANY() {
|
|
@@ -4117,18 +4128,18 @@ function nt() {
|
|
|
4117
4128
|
}
|
|
4118
4129
|
}
|
|
4119
4130
|
dt = e;
|
|
4120
|
-
const t =
|
|
4131
|
+
const t = xt, { safeRe: r, t: o } = Be, n = ws, i = st, a = _, c = te();
|
|
4121
4132
|
return dt;
|
|
4122
4133
|
}
|
|
4123
|
-
const
|
|
4134
|
+
const xa = te(), ja = (s, e, t) => {
|
|
4124
4135
|
try {
|
|
4125
|
-
e = new
|
|
4136
|
+
e = new xa(e, t);
|
|
4126
4137
|
} catch {
|
|
4127
4138
|
return !1;
|
|
4128
4139
|
}
|
|
4129
4140
|
return e.test(s);
|
|
4130
4141
|
};
|
|
4131
|
-
var it =
|
|
4142
|
+
var it = ja;
|
|
4132
4143
|
const Va = te(), Ua = (s, e) => new Va(s, e).set.map((t) => t.map((r) => r.value).join(" ").trim().split(" "));
|
|
4133
4144
|
var Ja = Ua;
|
|
4134
4145
|
const Ga = _, Ma = te(), _a = (s, e, t) => {
|
|
@@ -4155,7 +4166,7 @@ const Ha = _, Wa = te(), qa = (s, e, t) => {
|
|
|
4155
4166
|
}), r;
|
|
4156
4167
|
};
|
|
4157
4168
|
var za = qa;
|
|
4158
|
-
const pt = _, Xa = te(),
|
|
4169
|
+
const pt = _, Xa = te(), Pr = ot, Ya = (s, e) => {
|
|
4159
4170
|
s = new Xa(s, e);
|
|
4160
4171
|
let t = new pt("0.0.0");
|
|
4161
4172
|
if (s.test(t) || (t = new pt("0.0.0-0"), s.test(t)))
|
|
@@ -4171,7 +4182,7 @@ const pt = _, Xa = te(), Cr = ot, Ya = (s, e) => {
|
|
|
4171
4182
|
a.prerelease.length === 0 ? a.patch++ : a.prerelease.push(0), a.raw = a.format();
|
|
4172
4183
|
case "":
|
|
4173
4184
|
case ">=":
|
|
4174
|
-
(!n ||
|
|
4185
|
+
(!n || Pr(a, n)) && (n = a);
|
|
4175
4186
|
break;
|
|
4176
4187
|
case "<":
|
|
4177
4188
|
case "<=":
|
|
@@ -4179,7 +4190,7 @@ const pt = _, Xa = te(), Cr = ot, Ya = (s, e) => {
|
|
|
4179
4190
|
default:
|
|
4180
4191
|
throw new Error(`Unexpected operation: ${i.operator}`);
|
|
4181
4192
|
}
|
|
4182
|
-
}), n && (!t ||
|
|
4193
|
+
}), n && (!t || Pr(t, n)) && (t = n);
|
|
4183
4194
|
}
|
|
4184
4195
|
return t && s.test(t) ? t : null;
|
|
4185
4196
|
};
|
|
@@ -4192,15 +4203,15 @@ const Za = te(), ec = (s, e) => {
|
|
|
4192
4203
|
}
|
|
4193
4204
|
};
|
|
4194
4205
|
var tc = ec;
|
|
4195
|
-
const rc = _,
|
|
4206
|
+
const rc = _, Ss = nt(), { ANY: sc } = Ss, oc = te(), nc = it, Er = ot, kr = Vt, ic = Jt, ac = Ut, cc = (s, e, t, r) => {
|
|
4196
4207
|
s = new rc(s, r), e = new oc(e, r);
|
|
4197
4208
|
let o, n, i, a, c;
|
|
4198
4209
|
switch (t) {
|
|
4199
4210
|
case ">":
|
|
4200
|
-
o =
|
|
4211
|
+
o = Er, n = ic, i = kr, a = ">", c = ">=";
|
|
4201
4212
|
break;
|
|
4202
4213
|
case "<":
|
|
4203
|
-
o =
|
|
4214
|
+
o = kr, n = ac, i = Er, a = "<", c = "<=";
|
|
4204
4215
|
break;
|
|
4205
4216
|
default:
|
|
4206
4217
|
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
|
@@ -4211,7 +4222,7 @@ const rc = _, ws = nt(), { ANY: sc } = ws, oc = te(), nc = it, Pr = ot, Er = Vt,
|
|
|
4211
4222
|
const u = e.set[l];
|
|
4212
4223
|
let d = null, g = null;
|
|
4213
4224
|
if (u.forEach((f) => {
|
|
4214
|
-
f.semver === sc && (f = new
|
|
4225
|
+
f.semver === sc && (f = new Ss(">=0.0.0")), d = d || f, g = g || f, o(f.semver, d.semver, r) ? d = f : i(f.semver, g.semver, r) && (g = f);
|
|
4215
4226
|
}), d.operator === a || d.operator === c || (!g.operator || g.operator === a) && n(s, g.semver))
|
|
4216
4227
|
return !1;
|
|
4217
4228
|
if (g.operator === c && i(s, g.semver))
|
|
@@ -4224,7 +4235,7 @@ const lc = Gt, uc = (s, e, t) => lc(s, e, ">", t);
|
|
|
4224
4235
|
var dc = uc;
|
|
4225
4236
|
const pc = Gt, hc = (s, e, t) => pc(s, e, "<", t);
|
|
4226
4237
|
var fc = hc;
|
|
4227
|
-
const
|
|
4238
|
+
const Or = te(), gc = (s, e, t) => (s = new Or(s, t), e = new Or(e, t), s.intersects(e, t));
|
|
4228
4239
|
var mc = gc;
|
|
4229
4240
|
const vc = it, yc = ee;
|
|
4230
4241
|
var wc = (s, e, t) => {
|
|
@@ -4240,10 +4251,10 @@ var wc = (s, e, t) => {
|
|
|
4240
4251
|
const c = a.join(" || "), l = typeof e.raw == "string" ? e.raw : String(e);
|
|
4241
4252
|
return c.length < l.length ? c : e;
|
|
4242
4253
|
};
|
|
4243
|
-
const
|
|
4254
|
+
const $r = te(), Mt = nt(), { ANY: ht } = Mt, Re = it, _t = ee, Sc = (s, e, t = {}) => {
|
|
4244
4255
|
if (s === e)
|
|
4245
4256
|
return !0;
|
|
4246
|
-
s = new
|
|
4257
|
+
s = new $r(s, t), e = new $r(e, t);
|
|
4247
4258
|
let r = !1;
|
|
4248
4259
|
e: for (const o of s.set) {
|
|
4249
4260
|
for (const n of e.set) {
|
|
@@ -4255,23 +4266,23 @@ const Or = te(), Mt = nt(), { ANY: ht } = Mt, Re = it, _t = ee, Sc = (s, e, t =
|
|
|
4255
4266
|
return !1;
|
|
4256
4267
|
}
|
|
4257
4268
|
return !0;
|
|
4258
|
-
}, bc = [new Mt(">=0.0.0-0")],
|
|
4269
|
+
}, bc = [new Mt(">=0.0.0-0")], Fr = [new Mt(">=0.0.0")], Rc = (s, e, t) => {
|
|
4259
4270
|
if (s === e)
|
|
4260
4271
|
return !0;
|
|
4261
4272
|
if (s.length === 1 && s[0].semver === ht) {
|
|
4262
4273
|
if (e.length === 1 && e[0].semver === ht)
|
|
4263
4274
|
return !0;
|
|
4264
|
-
t.includePrerelease ? s = bc : s =
|
|
4275
|
+
t.includePrerelease ? s = bc : s = Fr;
|
|
4265
4276
|
}
|
|
4266
4277
|
if (e.length === 1 && e[0].semver === ht) {
|
|
4267
4278
|
if (t.includePrerelease)
|
|
4268
4279
|
return !0;
|
|
4269
|
-
e =
|
|
4280
|
+
e = Fr;
|
|
4270
4281
|
}
|
|
4271
4282
|
const r = /* @__PURE__ */ new Set();
|
|
4272
4283
|
let o, n;
|
|
4273
4284
|
for (const f of s)
|
|
4274
|
-
f.operator === ">" || f.operator === ">=" ? o =
|
|
4285
|
+
f.operator === ">" || f.operator === ">=" ? o = Ir(o, f, t) : f.operator === "<" || f.operator === "<=" ? n = Ar(n, f, t) : r.add(f.semver);
|
|
4275
4286
|
if (r.size > 1)
|
|
4276
4287
|
return null;
|
|
4277
4288
|
let i;
|
|
@@ -4294,14 +4305,14 @@ const Or = te(), Mt = nt(), { ANY: ht } = Mt, Re = it, _t = ee, Sc = (s, e, t =
|
|
|
4294
4305
|
for (const f of e) {
|
|
4295
4306
|
if (u = u || f.operator === ">" || f.operator === ">=", l = l || f.operator === "<" || f.operator === "<=", o) {
|
|
4296
4307
|
if (g && f.semver.prerelease && f.semver.prerelease.length && f.semver.major === g.major && f.semver.minor === g.minor && f.semver.patch === g.patch && (g = !1), f.operator === ">" || f.operator === ">=") {
|
|
4297
|
-
if (a =
|
|
4308
|
+
if (a = Ir(o, f, t), a === f && a !== o)
|
|
4298
4309
|
return !1;
|
|
4299
4310
|
} else if (o.operator === ">=" && !Re(o.semver, String(f), t))
|
|
4300
4311
|
return !1;
|
|
4301
4312
|
}
|
|
4302
4313
|
if (n) {
|
|
4303
4314
|
if (d && f.semver.prerelease && f.semver.prerelease.length && f.semver.major === d.major && f.semver.minor === d.minor && f.semver.patch === d.patch && (d = !1), f.operator === "<" || f.operator === "<=") {
|
|
4304
|
-
if (c =
|
|
4315
|
+
if (c = Ar(n, f, t), c === f && c !== n)
|
|
4305
4316
|
return !1;
|
|
4306
4317
|
} else if (n.operator === "<=" && !Re(n.semver, String(f), t))
|
|
4307
4318
|
return !1;
|
|
@@ -4310,19 +4321,19 @@ const Or = te(), Mt = nt(), { ANY: ht } = Mt, Re = it, _t = ee, Sc = (s, e, t =
|
|
|
4310
4321
|
return !1;
|
|
4311
4322
|
}
|
|
4312
4323
|
return !(o && l && !n && i !== 0 || n && u && !o && i !== 0 || g || d);
|
|
4313
|
-
},
|
|
4324
|
+
}, Ir = (s, e, t) => {
|
|
4314
4325
|
if (!s)
|
|
4315
4326
|
return e;
|
|
4316
4327
|
const r = _t(s.semver, e.semver, t);
|
|
4317
4328
|
return r > 0 ? s : r < 0 || e.operator === ">" && s.operator === ">=" ? e : s;
|
|
4318
|
-
},
|
|
4329
|
+
}, Ar = (s, e, t) => {
|
|
4319
4330
|
if (!s)
|
|
4320
4331
|
return e;
|
|
4321
4332
|
const r = _t(s.semver, e.semver, t);
|
|
4322
4333
|
return r < 0 ? s : r > 0 || e.operator === "<" && s.operator === "<=" ? e : s;
|
|
4323
4334
|
};
|
|
4324
4335
|
var Cc = Sc;
|
|
4325
|
-
const ft = Be,
|
|
4336
|
+
const ft = Be, Tr = rt, Pc = _, Lr = ms, Ec = Se, kc = Ti, Oc = Di, $c = xi, Fc = Vi, Ic = Gi, Ac = Ki, Tc = qi, Lc = Yi, Nc = ee, Dc = ta, Bc = oa, xc = jt, jc = ca, Vc = da, Uc = ot, Jc = Vt, Gc = vs, Mc = ys, _c = Ut, Kc = Jt, Hc = ws, Wc = Na, qc = nt(), zc = te(), Xc = it, Yc = Ja, Qc = Ka, Zc = za, el = Qa, tl = tc, rl = Gt, sl = dc, ol = fc, nl = mc, il = wc, al = Cc;
|
|
4326
4337
|
var cl = {
|
|
4327
4338
|
parse: Ec,
|
|
4328
4339
|
valid: kc,
|
|
@@ -4336,8 +4347,8 @@ var cl = {
|
|
|
4336
4347
|
compare: Nc,
|
|
4337
4348
|
rcompare: Dc,
|
|
4338
4349
|
compareLoose: Bc,
|
|
4339
|
-
compareBuild:
|
|
4340
|
-
sort:
|
|
4350
|
+
compareBuild: xc,
|
|
4351
|
+
sort: jc,
|
|
4341
4352
|
rsort: Vc,
|
|
4342
4353
|
gt: Uc,
|
|
4343
4354
|
lt: Jc,
|
|
@@ -4365,15 +4376,15 @@ var cl = {
|
|
|
4365
4376
|
re: ft.re,
|
|
4366
4377
|
src: ft.src,
|
|
4367
4378
|
tokens: ft.t,
|
|
4368
|
-
SEMVER_SPEC_VERSION:
|
|
4369
|
-
RELEASE_TYPES:
|
|
4370
|
-
compareIdentifiers:
|
|
4371
|
-
rcompareIdentifiers:
|
|
4379
|
+
SEMVER_SPEC_VERSION: Tr.SEMVER_SPEC_VERSION,
|
|
4380
|
+
RELEASE_TYPES: Tr.RELEASE_TYPES,
|
|
4381
|
+
compareIdentifiers: Lr.compareIdentifiers,
|
|
4382
|
+
rcompareIdentifiers: Lr.rcompareIdentifiers
|
|
4372
4383
|
};
|
|
4373
4384
|
const ll = /* @__PURE__ */ mi(cl), ul = {
|
|
4374
4385
|
minDelay: 1500
|
|
4375
4386
|
}, dl = "__no_updates__";
|
|
4376
|
-
class pl extends
|
|
4387
|
+
class pl extends qs {
|
|
4377
4388
|
constructor(t, r, o = {}) {
|
|
4378
4389
|
super({ ...o, ...ul }, r);
|
|
4379
4390
|
S(this, "http");
|
|
@@ -4399,7 +4410,7 @@ class pl extends Ws {
|
|
|
4399
4410
|
switch (n.type) {
|
|
4400
4411
|
case "dev-v1":
|
|
4401
4412
|
try {
|
|
4402
|
-
const i = await
|
|
4413
|
+
const i = await Hr(n.folder);
|
|
4403
4414
|
return i === n.mtime ? { suggestions: [] } : { mainSuggestion: { ...n, mtime: i }, suggestions: [] };
|
|
4404
4415
|
} catch (i) {
|
|
4405
4416
|
return this.logger.warn(i), { suggestions: [] };
|
|
@@ -4425,7 +4436,7 @@ class pl extends Ws {
|
|
|
4425
4436
|
else {
|
|
4426
4437
|
if (await c.getLatestOverview(n.id, we) === void 0)
|
|
4427
4438
|
return this.logger.error(
|
|
4428
|
-
`No "any" channel record for ${
|
|
4439
|
+
`No "any" channel record for ${Fs(n.id)}`
|
|
4429
4440
|
), { suggestions: [] };
|
|
4430
4441
|
l = we;
|
|
4431
4442
|
}
|
|
@@ -4477,7 +4488,7 @@ class pl extends Ws {
|
|
|
4477
4488
|
return Z(t) === Z(r);
|
|
4478
4489
|
}
|
|
4479
4490
|
}
|
|
4480
|
-
class
|
|
4491
|
+
class Nr {
|
|
4481
4492
|
constructor() {
|
|
4482
4493
|
S(this, "resources", /* @__PURE__ */ new Map());
|
|
4483
4494
|
}
|
|
@@ -4584,7 +4595,7 @@ class fl {
|
|
|
4584
4595
|
];
|
|
4585
4596
|
this.rustPFrame = (() => {
|
|
4586
4597
|
try {
|
|
4587
|
-
const a = new
|
|
4598
|
+
const a = new po(X().logPFrameRequests ? n : void 0);
|
|
4588
4599
|
a.setDataSource(this);
|
|
4589
4600
|
for (const c of i)
|
|
4590
4601
|
a.addColumnSpec(c.id, c.spec), a.setColumnData(c.id, c.data);
|
|
@@ -4668,15 +4679,15 @@ class ml {
|
|
|
4668
4679
|
/** Limits concurrent requests to PFrame API to prevent deadlock with Node's IO threads */
|
|
4669
4680
|
S(this, "concurrencyLimiter");
|
|
4670
4681
|
this.blobDriver = e, this.logger = t;
|
|
4671
|
-
const r = new
|
|
4682
|
+
const r = new ho({
|
|
4672
4683
|
maxSize: 1e9,
|
|
4673
4684
|
// 1Gb
|
|
4674
|
-
fetchMethod: async (n) => await
|
|
4685
|
+
fetchMethod: async (n) => await Ur.readFile(n),
|
|
4675
4686
|
sizeCalculation: (n) => n.length
|
|
4676
4687
|
});
|
|
4677
4688
|
this.blobContentCache = r;
|
|
4678
|
-
const o = new
|
|
4679
|
-
this.concurrencyLimiter = o, this.pFrames = new class extends
|
|
4689
|
+
const o = new Bs(1);
|
|
4690
|
+
this.concurrencyLimiter = o, this.pFrames = new class extends Nr {
|
|
4680
4691
|
constructor(n, i) {
|
|
4681
4692
|
super(), this.blobDriver = n, this.logger = i;
|
|
4682
4693
|
}
|
|
@@ -4688,7 +4699,7 @@ class ml {
|
|
|
4688
4699
|
calculateParamsKey(n) {
|
|
4689
4700
|
return yl(n);
|
|
4690
4701
|
}
|
|
4691
|
-
}(this.blobDriver, this.logger), this.pTables = new class extends
|
|
4702
|
+
}(this.blobDriver, this.logger), this.pTables = new class extends Nr {
|
|
4692
4703
|
constructor(n) {
|
|
4693
4704
|
super(), this.pFrames = n;
|
|
4694
4705
|
}
|
|
@@ -4699,7 +4710,7 @@ class ml {
|
|
|
4699
4710
|
X().logPFrameRequests && t.info(
|
|
4700
4711
|
`PTable creation (pTableHandle = ${this.calculateParamsKey(n)}): ${JSON.stringify(n, Pe)}`
|
|
4701
4712
|
);
|
|
4702
|
-
const c =
|
|
4713
|
+
const c = xe(l, this.pFrames.getByKey(i).disposableDataPFrame);
|
|
4703
4714
|
return await c.dataPFrame.createTable({
|
|
4704
4715
|
src: Ie(n.def.src),
|
|
4705
4716
|
filters: gt(n.def.filters)
|
|
@@ -4707,7 +4718,7 @@ class ml {
|
|
|
4707
4718
|
} catch (u) {
|
|
4708
4719
|
var d = u, g = !0;
|
|
4709
4720
|
} finally {
|
|
4710
|
-
|
|
4721
|
+
je(l, d, g);
|
|
4711
4722
|
}
|
|
4712
4723
|
}).then(
|
|
4713
4724
|
async (c) => n.def.sorting.length !== 0 ? await c.sort(n.def.sorting, n.signal) : c
|
|
@@ -4726,13 +4737,13 @@ class ml {
|
|
|
4726
4737
|
const r = e.filter((n) => hl.find((i) => i === n.spec.valueType)).map(
|
|
4727
4738
|
(n) => de(
|
|
4728
4739
|
n,
|
|
4729
|
-
(i) =>
|
|
4740
|
+
(i) => Ws(i) ? yn(i) : wn(n.spec, i)
|
|
4730
4741
|
)
|
|
4731
4742
|
), o = this.pFrames.acquire(r);
|
|
4732
4743
|
return t.addOnDestroy(o.unref), o.key;
|
|
4733
4744
|
}
|
|
4734
4745
|
createPTable(e, t, r) {
|
|
4735
|
-
const o = this.createPFrame(
|
|
4746
|
+
const o = this.createPFrame($s(e.src), t), n = mt(e, (a) => a.id), i = this.pTables.acquire({ def: n, pFrameHandle: o, signal: r });
|
|
4736
4747
|
return X().logPFrameRequests && this.logger.info(
|
|
4737
4748
|
`Create PTable call (pFrameHandle = ${o}; pTableHandle = ${JSON.stringify(i)}): ${JSON.stringify(
|
|
4738
4749
|
mt(e, (a) => a.spec),
|
|
@@ -4781,7 +4792,7 @@ class ml {
|
|
|
4781
4792
|
X().logPFrameRequests && this.logger.info(
|
|
4782
4793
|
`Call calculateTableData, handle = ${e}, request = ${JSON.stringify(t, Pe)}`
|
|
4783
4794
|
);
|
|
4784
|
-
const a =
|
|
4795
|
+
const a = xe(c, this.pFrames.getByKey(e).disposableDataPFrame);
|
|
4785
4796
|
return await a.dataPFrame.createTable({
|
|
4786
4797
|
src: Ie(t.src),
|
|
4787
4798
|
filters: gt(t.filters)
|
|
@@ -4789,7 +4800,7 @@ class ml {
|
|
|
4789
4800
|
} catch (l) {
|
|
4790
4801
|
var u = l, d = !0;
|
|
4791
4802
|
} finally {
|
|
4792
|
-
|
|
4803
|
+
je(c, u, d);
|
|
4793
4804
|
}
|
|
4794
4805
|
});
|
|
4795
4806
|
if (t.sorting.length > 0) {
|
|
@@ -4813,7 +4824,7 @@ class ml {
|
|
|
4813
4824
|
X().logPFrameRequests && this.logger.info(
|
|
4814
4825
|
`Call getUniqueValues, handle = ${e}, request = ${JSON.stringify(t, Pe)}`
|
|
4815
4826
|
);
|
|
4816
|
-
const o =
|
|
4827
|
+
const o = xe(n, this.pFrames.getByKey(e).disposableDataPFrame);
|
|
4817
4828
|
return await o.dataPFrame.getUniqueValues({
|
|
4818
4829
|
...t,
|
|
4819
4830
|
filters: gt(t.filters)
|
|
@@ -4821,7 +4832,7 @@ class ml {
|
|
|
4821
4832
|
} catch (i) {
|
|
4822
4833
|
var a = i, c = !0;
|
|
4823
4834
|
} finally {
|
|
4824
|
-
|
|
4835
|
+
je(n, a, c);
|
|
4825
4836
|
}
|
|
4826
4837
|
});
|
|
4827
4838
|
}
|
|
@@ -4917,29 +4928,29 @@ function yl(s) {
|
|
|
4917
4928
|
}
|
|
4918
4929
|
async function wl(s, e, t) {
|
|
4919
4930
|
const r = {
|
|
4920
|
-
...
|
|
4921
|
-
...
|
|
4931
|
+
...ps,
|
|
4932
|
+
...hs(e),
|
|
4922
4933
|
...t
|
|
4923
|
-
}, o = new
|
|
4934
|
+
}, o = new Vr(r.localSecret), n = eo(r.logger, s, r.localProjections), i = to(s, r.logger), a = ro(s, r.logger), c = so(s, r.logger), l = new oo(
|
|
4924
4935
|
r.logger,
|
|
4925
4936
|
n,
|
|
4926
4937
|
i,
|
|
4927
4938
|
r.blobDownloadPath,
|
|
4928
4939
|
o,
|
|
4929
4940
|
r.blobDriverOps
|
|
4930
|
-
), u = new
|
|
4941
|
+
), u = new no(
|
|
4931
4942
|
r.logger,
|
|
4932
4943
|
o,
|
|
4933
4944
|
n,
|
|
4934
4945
|
r.downloadBlobToURLPath,
|
|
4935
4946
|
r.downloadBlobToURLDriverOps
|
|
4936
|
-
), d = new
|
|
4947
|
+
), d = new io(
|
|
4937
4948
|
r.logger,
|
|
4938
4949
|
o,
|
|
4939
4950
|
a,
|
|
4940
4951
|
c,
|
|
4941
4952
|
r.uploadDriverOps
|
|
4942
|
-
), g = new
|
|
4953
|
+
), g = new ao(r.logger, i, r.logStreamDriverOps), f = new co(r.logger, g, l), h = await lo.init(
|
|
4943
4954
|
r.logger,
|
|
4944
4955
|
s,
|
|
4945
4956
|
o,
|
|
@@ -4957,7 +4968,7 @@ async function wl(s, e, t) {
|
|
|
4957
4968
|
pFrameDriver: E
|
|
4958
4969
|
};
|
|
4959
4970
|
}
|
|
4960
|
-
class
|
|
4971
|
+
class bs {
|
|
4961
4972
|
constructor(e, t, r, o, n, i, a, c) {
|
|
4962
4973
|
S(this, "pl");
|
|
4963
4974
|
/** Contains a reactive list of projects along with their meta information. */
|
|
@@ -4979,7 +4990,7 @@ class Ss {
|
|
|
4979
4990
|
async createProject(e, t = Ae()) {
|
|
4980
4991
|
const r = await this.pl.withWriteTx("MLCreateProject", async (o) => {
|
|
4981
4992
|
const n = await un(o, e);
|
|
4982
|
-
return o.createField(
|
|
4993
|
+
return o.createField(x(this.projectListResourceId, t), "Dynamic", n), await o.commit(), await _s(n);
|
|
4983
4994
|
});
|
|
4984
4995
|
return await this.projectListTree.refreshState(), r;
|
|
4985
4996
|
}
|
|
@@ -4993,12 +5004,12 @@ class Ss {
|
|
|
4993
5004
|
* destruction of all attached objects, like files, analysis results etc. */
|
|
4994
5005
|
async deleteProject(e) {
|
|
4995
5006
|
await this.pl.withWriteTx("MLRemoveProject", async (t) => {
|
|
4996
|
-
t.removeField(
|
|
5007
|
+
t.removeField(x(this.projectListResourceId, e)), await t.commit();
|
|
4997
5008
|
}), await this.projectListTree.refreshState();
|
|
4998
5009
|
}
|
|
4999
5010
|
async projectIdToResourceId(e) {
|
|
5000
5011
|
return await this.pl.withReadTx("Project id to resource id", async (t) => {
|
|
5001
|
-
const r = (await t.getField(
|
|
5012
|
+
const r = (await t.getField(x(this.projectListResourceId, e))).value;
|
|
5002
5013
|
if (Xe(r)) throw new Error("Unexpected project list structure.");
|
|
5003
5014
|
return r;
|
|
5004
5015
|
});
|
|
@@ -5038,7 +5049,7 @@ class Ss {
|
|
|
5038
5049
|
/** Generates sufficiently random string to be used as local secret for the
|
|
5039
5050
|
* middle layer */
|
|
5040
5051
|
static generateLocalSecret() {
|
|
5041
|
-
return
|
|
5052
|
+
return Vr.generateSecret();
|
|
5042
5053
|
}
|
|
5043
5054
|
/** Initialize middle layer */
|
|
5044
5055
|
static async init(e, t, r) {
|
|
@@ -5049,22 +5060,22 @@ class Ss {
|
|
|
5049
5060
|
};
|
|
5050
5061
|
o.defaultTreeOptions.logStat = X().logTreeStats;
|
|
5051
5062
|
const n = await e.withWriteTx("MLInitialization", async (E) => {
|
|
5052
|
-
const
|
|
5053
|
-
E.createField(
|
|
5054
|
-
const N = await E.getField(
|
|
5063
|
+
const T = x(E.clientRoot, No);
|
|
5064
|
+
E.createField(T, "Dynamic");
|
|
5065
|
+
const N = await E.getField(T);
|
|
5055
5066
|
if (Xe(N.value)) {
|
|
5056
|
-
const K = E.createEphemeral(
|
|
5057
|
-
return E.lock(K), E.setField(
|
|
5067
|
+
const K = E.createEphemeral(zr);
|
|
5068
|
+
return E.lock(K), E.setField(T, K), await E.commit(), await K.globalId;
|
|
5058
5069
|
} else
|
|
5059
5070
|
return N.value;
|
|
5060
|
-
}), i = o.logger, a = await wl(e, t, o), c = new
|
|
5071
|
+
}), i = o.logger, a = await wl(e, t, o), c = new Is(e.httpDispatcher, {
|
|
5061
5072
|
minTimeout: 250,
|
|
5062
5073
|
maxRetries: 4
|
|
5063
|
-
}), l = new
|
|
5074
|
+
}), l = new Ro(c), u = new rn(
|
|
5064
5075
|
l,
|
|
5065
5076
|
a.signer,
|
|
5066
5077
|
c
|
|
5067
|
-
), d = new
|
|
5078
|
+
), d = new uo(
|
|
5068
5079
|
i,
|
|
5069
5080
|
e.httpDispatcher,
|
|
5070
5081
|
o.frontendDownloadPath
|
|
@@ -5083,9 +5094,9 @@ class Ss {
|
|
|
5083
5094
|
http: c,
|
|
5084
5095
|
preferredUpdateChannel: o.preferredUpdateChannel
|
|
5085
5096
|
}),
|
|
5086
|
-
quickJs: await
|
|
5087
|
-
}, f = new
|
|
5088
|
-
return new
|
|
5097
|
+
quickJs: await Zs()
|
|
5098
|
+
}, f = new zs([]), h = await Bo(e, n, f, g);
|
|
5099
|
+
return new bs(
|
|
5089
5100
|
g,
|
|
5090
5101
|
a,
|
|
5091
5102
|
a.signer,
|
|
@@ -5154,7 +5165,7 @@ async function su(s, e = {}) {
|
|
|
5154
5165
|
...e
|
|
5155
5166
|
}, r = [];
|
|
5156
5167
|
Sl.forEach((c) => {
|
|
5157
|
-
|
|
5168
|
+
fo(c).subscribe((u) => {
|
|
5158
5169
|
var g;
|
|
5159
5170
|
const d = (/* @__PURE__ */ new Date()).toISOString();
|
|
5160
5171
|
(g = u == null ? void 0 : u.response) != null && g.headers && (u.response.headers = u.response.headers.map((f) => f.toString())), r.push(
|
|
@@ -5173,7 +5184,7 @@ async function su(s, e = {}) {
|
|
|
5173
5184
|
blockRegistryUiChecks: [],
|
|
5174
5185
|
blockGARegistryUiChecks: [],
|
|
5175
5186
|
autoUpdateCdnChecks: []
|
|
5176
|
-
}, n =
|
|
5187
|
+
}, n = Ks(s, { defaultRequestTimeout: t.pingTimeoutMs });
|
|
5177
5188
|
o.plPings = await ve(t.pingCheckDurationMs, t.maxPingsPerSecond, async () => {
|
|
5178
5189
|
const l = await new Xt(n).ping();
|
|
5179
5190
|
return JSON.stringify(l).slice(0, t.bodyLimit) + "...";
|
|
@@ -5203,7 +5214,7 @@ async function su(s, e = {}) {
|
|
|
5203
5214
|
}
|
|
5204
5215
|
async function ve(s, e, t) {
|
|
5205
5216
|
const r = $t(), o = [];
|
|
5206
|
-
for (;
|
|
5217
|
+
for (; Dr(r) < s; ) {
|
|
5207
5218
|
const n = $t();
|
|
5208
5219
|
let i;
|
|
5209
5220
|
try {
|
|
@@ -5211,13 +5222,13 @@ async function ve(s, e, t) {
|
|
|
5211
5222
|
} catch (l) {
|
|
5212
5223
|
i = { ok: !1, error: l };
|
|
5213
5224
|
}
|
|
5214
|
-
const a =
|
|
5225
|
+
const a = Dr(n);
|
|
5215
5226
|
o.push({
|
|
5216
5227
|
elapsedMs: a,
|
|
5217
5228
|
response: i
|
|
5218
5229
|
});
|
|
5219
5230
|
const c = 1e3 / e - a;
|
|
5220
|
-
c > 0 && await
|
|
5231
|
+
c > 0 && await _r(c);
|
|
5221
5232
|
}
|
|
5222
5233
|
return o;
|
|
5223
5234
|
}
|
|
@@ -5301,19 +5312,19 @@ function Rl(s) {
|
|
|
5301
5312
|
function $t() {
|
|
5302
5313
|
return Date.now();
|
|
5303
5314
|
}
|
|
5304
|
-
function
|
|
5315
|
+
function Dr(s) {
|
|
5305
5316
|
return $t() - s;
|
|
5306
5317
|
}
|
|
5307
5318
|
export {
|
|
5308
5319
|
zl as BlockPackRegistry,
|
|
5309
5320
|
Xl as CentralBlockRegistry,
|
|
5310
|
-
|
|
5311
|
-
|
|
5321
|
+
hs as DefaultDriverKitOpsPaths,
|
|
5322
|
+
ps as DefaultDriverKitOpsSettings,
|
|
5312
5323
|
gi as DefaultMiddleLayerOpsPaths,
|
|
5313
5324
|
fi as DefaultMiddleLayerOpsSettings,
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
|
|
5325
|
+
Zr as FrontendFromFolderResourceType,
|
|
5326
|
+
Qr as FrontendFromUrlResourceType,
|
|
5327
|
+
bs as MiddleLayer,
|
|
5317
5328
|
Bt as Project,
|
|
5318
5329
|
qo as TengoTemplateGet,
|
|
5319
5330
|
zo as TengoTemplateGetRegistry,
|
|
@@ -5325,10 +5336,10 @@ export {
|
|
|
5325
5336
|
tu as TengoTemplatePackConvertTemplatePack,
|
|
5326
5337
|
Ql as V1CentralDevSnapshotRegistry,
|
|
5327
5338
|
Yl as V1CentralRegistry,
|
|
5328
|
-
|
|
5339
|
+
Ro as V2RegistryProvider,
|
|
5329
5340
|
su as checkNetwork,
|
|
5330
|
-
|
|
5331
|
-
|
|
5341
|
+
Xr as createRenderTemplate,
|
|
5342
|
+
Hr as getDevV1PacketMtime,
|
|
5332
5343
|
At as getDevV2PacketMtime,
|
|
5333
5344
|
wl as initDriverKit,
|
|
5334
5345
|
Lt as loadTemplate,
|