@milaboratories/pl-middle-layer 1.37.39 → 1.37.40
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 +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +803 -799
- package/dist/index.mjs.map +1 -1
- package/dist/js_render/computable_context.d.ts.map +1 -1
- package/dist/js_render/context.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/js_render/computable_context.ts +2 -14
- package/src/js_render/context.ts +11 -0
- package/src/pool/driver.ts +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
1
|
+
var so = Object.defineProperty;
|
|
2
2
|
var nr = (s, e) => (e = Symbol[s]) ? e : Symbol.for("Symbol." + s), ir = (s) => {
|
|
3
3
|
throw TypeError(s);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var S = (s, e, t) =>
|
|
5
|
+
var oo = (s, e, t) => e in s ? so(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
6
|
+
var S = (s, e, t) => oo(s, typeof e != "symbol" ? e + "" : e, t);
|
|
7
7
|
var ar = (s, e, t) => {
|
|
8
8
|
if (e != null) {
|
|
9
9
|
typeof e != "object" && typeof e != "function" && ir("Object expected");
|
|
@@ -26,79 +26,79 @@ var ar = (s, e, t) => {
|
|
|
26
26
|
};
|
|
27
27
|
return n();
|
|
28
28
|
};
|
|
29
|
-
import { extractConfig as Se, mapValueInVOE as
|
|
29
|
+
import { extractConfig as Se, mapValueInVOE as rs, executePSpecPredicate as no, mapPObjectData as pe, mapPTableDef as Ft, isDataInfo as ss, mapDataInfo as os, JsRenderInternal as io, isConfigLambda as ns, DefaultNavigationState as ao, extractAllColumns as co } from "@platforma-sdk/model";
|
|
30
30
|
export * from "@platforma-sdk/model";
|
|
31
|
-
import { AnyChannel as De, StableChannel as Ne, InitialBlockSettings as
|
|
31
|
+
import { AnyChannel as De, StableChannel as Ne, InitialBlockSettings as lr, blockPackIdToString as lo } from "@milaboratories/pl-model-middle-layer";
|
|
32
32
|
export * from "@milaboratories/pl-model-middle-layer";
|
|
33
33
|
export * from "@milaboratories/pl-deployments";
|
|
34
|
-
import { request as Ut, RetryAgent as
|
|
35
|
-
import { RegistryV1 as ge, tryLoadPackDescription as It, BlockPackMetaEmbedAbsoluteBytes as
|
|
34
|
+
import { request as Ut, RetryAgent as uo } from "undici";
|
|
35
|
+
import { RegistryV1 as ge, tryLoadPackDescription as It, BlockPackMetaEmbedAbsoluteBytes as po, RegistryV2Reader as fo, folderReaderByUrl as go, loadPackDescription as ur } from "@platforma-sdk/block-tools";
|
|
36
36
|
import Q from "node:fs";
|
|
37
|
-
import * as
|
|
37
|
+
import * as ho from "node:path";
|
|
38
38
|
import U from "node:path";
|
|
39
|
-
import
|
|
40
|
-
import { assertNever as H, notEmpty as I, cachedDeserialize as ct, deepFreeze as
|
|
41
|
-
import * as
|
|
39
|
+
import mo from "yaml";
|
|
40
|
+
import { assertNever as H, notEmpty as I, cachedDeserialize as ct, deepFreeze as dr, ConsoleLoggerAdapter as is, ConcurrencyLimitingExecutor as pr, emptyDir as vo, HmacSha256Signer as Jt } from "@milaboratories/ts-helpers";
|
|
41
|
+
import * as as from "node:fs/promises";
|
|
42
42
|
import lt from "node:fs/promises";
|
|
43
|
-
import { tryResolve as
|
|
44
|
-
import { resourceTypesEqual as le, field as x, Pl as F, PlClient as
|
|
43
|
+
import { tryResolve as yo } from "@milaboratories/resolve-helper";
|
|
44
|
+
import { resourceTypesEqual as le, field as x, Pl as F, PlClient as cs, isResourceId as fr, isNullResourceId as Ue, isResource as wo, isResourceRef as So, isNotNullResourceId as Tt, ensureResourceIdNotNull as ut, resourceType as He, resourceTypeToString as bo, stringifyWithResourceId as ze, resourceIdToString as ke, isNotFoundError as ko, isTimeoutOrCancelError as Ro, toGlobalResourceId as Co, UnauthenticatedPlClient as ls, toGlobalFieldId as Eo, poll as Po, ContinuePolling as $o, plAddressToConfig as Oo } from "@milaboratories/pl-client";
|
|
45
45
|
export * from "@milaboratories/pl-client";
|
|
46
|
-
import { SynchronizedTreeState as
|
|
47
|
-
import { Computable as M, ChangeSource as
|
|
48
|
-
import { randomUUID as Re, createHash as Ee, randomBytes as
|
|
49
|
-
import { PlTemplateV1 as K, PlTemplateOverrideV1 as be, PlTemplateLibV1 as ue, PlTemplateSoftwareV1 as ae, parseTemplate as
|
|
50
|
-
import { LRUCache as
|
|
51
|
-
import { Worker as
|
|
52
|
-
import
|
|
46
|
+
import { SynchronizedTreeState as us, treeDumpStats as Fo, isPlTreeNodeAccessor as Io } from "@milaboratories/pl-tree";
|
|
47
|
+
import { Computable as M, ChangeSource as gr, PollComputablePool as To, WatchableValue as Ao } from "@milaboratories/computable";
|
|
48
|
+
import { randomUUID as Re, createHash as Ee, randomBytes as Lo } from "node:crypto";
|
|
49
|
+
import { PlTemplateV1 as K, PlTemplateOverrideV1 as be, PlTemplateLibV1 as ue, PlTemplateSoftwareV1 as ae, parseTemplate as Do } from "@milaboratories/pl-model-backend";
|
|
50
|
+
import { LRUCache as ds } from "lru-cache";
|
|
51
|
+
import { Worker as No } from "node:worker_threads";
|
|
52
|
+
import ps from "denque";
|
|
53
53
|
import { Templates as me } from "@platforma-sdk/workflow-tengo";
|
|
54
54
|
import B from "canonicalize";
|
|
55
|
-
import
|
|
56
|
-
import { Scope as Je, errors as
|
|
57
|
-
import { PlQuickJSError as
|
|
58
|
-
import * as
|
|
59
|
-
import { setTimeout as
|
|
60
|
-
import { createDownloadClient as
|
|
61
|
-
import { PFrame as
|
|
62
|
-
import { channel as
|
|
63
|
-
import { text as
|
|
64
|
-
import
|
|
65
|
-
async function
|
|
55
|
+
import Bo from "node:assert";
|
|
56
|
+
import { Scope as Je, errors as jo, getQuickJS as xo } from "quickjs-emscripten";
|
|
57
|
+
import { PlQuickJSError as Vo } from "@milaboratories/pl-errors";
|
|
58
|
+
import * as hr from "remeda";
|
|
59
|
+
import { setTimeout as fs } from "node:timers/promises";
|
|
60
|
+
import { createDownloadClient as gs, createLogsClient as Uo, createUploadBlobClient as hs, createUploadProgressClient as Jo, DownloadDriver as Go, DownloadBlobToURLDriver as Mo, UploadDriver as _o, LogsStreamDriver as Ko, LogsDriver as Ho, LsDriver as ms, DownloadUrlDriver as Wo, isUpload as qo, ImportFileHandleUploadData as vs, isSignMatch as zo, uploadBlob as ys } from "@milaboratories/pl-drivers";
|
|
61
|
+
import { PFrame as ws } from "@milaboratories/pframes-rs-node";
|
|
62
|
+
import { channel as Xo } from "node:diagnostics_channel";
|
|
63
|
+
import { text as Yo } from "node:stream/consumers";
|
|
64
|
+
import Ss from "node:os";
|
|
65
|
+
async function mr(s) {
|
|
66
66
|
try {
|
|
67
|
-
return await
|
|
67
|
+
return await as.stat(s, { bigint: !0 });
|
|
68
68
|
} catch (e) {
|
|
69
69
|
if (e.code === "ENOENT")
|
|
70
70
|
return;
|
|
71
71
|
throw e;
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
const
|
|
74
|
+
const Qo = [ge.PlPackageYamlConfigFile], Zo = [ge.PlPackageJsonConfigFile], Gt = ["backend", "dist", "tengo", "tpl", "main.plj.gz"], Mt = ["config", "dist", "config.json"], bs = ["frontend", "dist"], vr = "block-model/dist/config.json", en = "block-ui/package.json", tn = [
|
|
75
75
|
Gt,
|
|
76
76
|
Mt,
|
|
77
|
+
Qo,
|
|
77
78
|
Zo,
|
|
78
|
-
|
|
79
|
-
ks
|
|
79
|
+
bs
|
|
80
80
|
];
|
|
81
|
-
async function
|
|
82
|
-
return await
|
|
81
|
+
async function rn(s) {
|
|
82
|
+
return await mr(U.join(s, ...Mt)) !== void 0 || await mr(U.join(s, ...Gt)) !== void 0;
|
|
83
83
|
}
|
|
84
84
|
function St(s, e) {
|
|
85
|
-
const t =
|
|
85
|
+
const t = yo(s, e);
|
|
86
86
|
if (t === void 0) throw new Error(`Can't resolve ${e} against ${s}`);
|
|
87
87
|
return t;
|
|
88
88
|
}
|
|
89
|
-
async function
|
|
90
|
-
if (U.isAbsolute(s) || (s = U.resolve(s)), await
|
|
89
|
+
async function yr(s, e) {
|
|
90
|
+
if (U.isAbsolute(s) || (s = U.resolve(s)), await rn(s))
|
|
91
91
|
return {
|
|
92
92
|
workflow: U.join(s, ...Gt),
|
|
93
93
|
config: U.join(s, ...Mt),
|
|
94
|
-
ui: U.join(s, ...
|
|
94
|
+
ui: U.join(s, ...bs)
|
|
95
95
|
};
|
|
96
96
|
{
|
|
97
|
-
const t = St(s,
|
|
97
|
+
const t = St(s, vr), r = St(s, vr), o = St(s, en);
|
|
98
98
|
return { workflow: t, config: r, ui: U.resolve(o, "..", "dist") };
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
async function
|
|
101
|
+
async function sn(s) {
|
|
102
102
|
try {
|
|
103
103
|
return await Q.promises.readFile(s, "utf8");
|
|
104
104
|
} catch (e) {
|
|
@@ -107,7 +107,7 @@ async function on(s) {
|
|
|
107
107
|
throw e;
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
async function
|
|
110
|
+
async function on(s) {
|
|
111
111
|
try {
|
|
112
112
|
return await Q.promises.stat(s, { bigint: !0 });
|
|
113
113
|
} catch (e) {
|
|
@@ -116,10 +116,10 @@ async function nn(s) {
|
|
|
116
116
|
throw e;
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
async function
|
|
119
|
+
async function ks(s) {
|
|
120
120
|
let e = 0n;
|
|
121
|
-
for (const t of
|
|
122
|
-
const r = U.join(s, ...t), o = await
|
|
121
|
+
for (const t of tn) {
|
|
122
|
+
const r = U.join(s, ...t), o = await on(r);
|
|
123
123
|
o !== void 0 && e < o.mtimeNs && (e = o.mtimeNs);
|
|
124
124
|
}
|
|
125
125
|
return e.toString();
|
|
@@ -130,7 +130,7 @@ async function _t(s) {
|
|
|
130
130
|
}), t = await Q.promises.stat(s.components.model.file, { bigint: !0 });
|
|
131
131
|
return (e.mtimeNs > t.mtimeNs ? e.mtimeNs : t.mtimeNs).toString();
|
|
132
132
|
}
|
|
133
|
-
class
|
|
133
|
+
class ud {
|
|
134
134
|
constructor(e, t, r) {
|
|
135
135
|
this.v2Provider = e, this.registries = t, this.http = r;
|
|
136
136
|
}
|
|
@@ -170,7 +170,7 @@ class dd {
|
|
|
170
170
|
[De]: f,
|
|
171
171
|
[Ne]: f
|
|
172
172
|
},
|
|
173
|
-
allVersions: c.allVersions.map((
|
|
173
|
+
allVersions: c.allVersions.map((k) => ({ version: k, channels: [] }))
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
176
|
return t;
|
|
@@ -180,11 +180,11 @@ class dd {
|
|
|
180
180
|
case "local-dev":
|
|
181
181
|
for (const o of await Q.promises.readdir(r.path, { withFileTypes: !0 })) {
|
|
182
182
|
if (!o.isDirectory()) continue;
|
|
183
|
-
const n = U.join(r.path, o.name), i = await
|
|
183
|
+
const n = U.join(r.path, o.name), i = await sn(
|
|
184
184
|
U.join(n, ge.PlPackageYamlConfigFile)
|
|
185
185
|
);
|
|
186
186
|
if (i !== void 0) {
|
|
187
|
-
const c = ge.PlPackageConfigData.parse(
|
|
187
|
+
const c = ge.PlPackageConfigData.parse(mo.parse(i)), a = await ks(n), l = {
|
|
188
188
|
organization: c.organization,
|
|
189
189
|
name: c.package,
|
|
190
190
|
version: "DEV"
|
|
@@ -222,7 +222,7 @@ class dd {
|
|
|
222
222
|
if (a !== void 0) {
|
|
223
223
|
const l = await _t(a), u = {
|
|
224
224
|
id: a.id,
|
|
225
|
-
meta: await
|
|
225
|
+
meta: await po.parseAsync(a.meta),
|
|
226
226
|
spec: {
|
|
227
227
|
type: "dev-v2",
|
|
228
228
|
folder: c,
|
|
@@ -263,7 +263,7 @@ class dd {
|
|
|
263
263
|
return await this.v2Provider.getRegistry(o.url).getSpecificOverview(t, r);
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
|
-
class
|
|
266
|
+
class nn {
|
|
267
267
|
constructor(e) {
|
|
268
268
|
S(this, "registries", /* @__PURE__ */ new Map());
|
|
269
269
|
this.http = e;
|
|
@@ -271,62 +271,62 @@ class an {
|
|
|
271
271
|
getRegistry(e) {
|
|
272
272
|
const t = this.registries.get(e);
|
|
273
273
|
if (t) return t;
|
|
274
|
-
const r = new go(
|
|
274
|
+
const r = new fo(go(e, this.http));
|
|
275
275
|
return this.registries.set(e, r), r;
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
|
-
const
|
|
278
|
+
const dd = {
|
|
279
279
|
type: "remote-v2",
|
|
280
280
|
url: "https://blocks.pl-open.science/"
|
|
281
|
-
},
|
|
281
|
+
}, pd = {
|
|
282
282
|
type: "remote-v1",
|
|
283
283
|
url: "https://block.registry.platforma.bio/releases"
|
|
284
|
-
},
|
|
284
|
+
}, fd = {
|
|
285
285
|
type: "remote-v1",
|
|
286
286
|
url: "https://block.registry.platforma.bio/dev"
|
|
287
|
-
},
|
|
287
|
+
}, an = {
|
|
288
288
|
groups: [{ id: "default", label: "Default", blocks: [] }]
|
|
289
|
-
},
|
|
289
|
+
}, cn = {
|
|
290
290
|
stagingRefreshTimestamp: 0,
|
|
291
291
|
blocksInLimbo: []
|
|
292
|
-
},
|
|
292
|
+
}, ln = {
|
|
293
293
|
label: "New Project"
|
|
294
|
-
},
|
|
294
|
+
}, un = { name: "UserProject", version: "2" }, Rs = "SchemaVersion", Cs = "1", Kt = "ProjectCreated", Ge = "ProjectLastModified", Me = "ProjectMeta", he = "ProjectStructure", dt = "BlockRenderingState", dn = "BlockFrontendState/", pn = /^BlockFrontendState\/(?<blockid>.*)$/;
|
|
295
295
|
function At(s) {
|
|
296
|
-
return `${
|
|
296
|
+
return `${dn}${s}`;
|
|
297
297
|
}
|
|
298
|
-
const
|
|
298
|
+
const fn = "BlockArgsAuthor/";
|
|
299
299
|
function Lt(s) {
|
|
300
|
-
return `${
|
|
300
|
+
return `${fn}${s}`;
|
|
301
301
|
}
|
|
302
302
|
const Dt = "ProjectStructureAuthor";
|
|
303
|
-
function
|
|
304
|
-
const e = s.match(
|
|
303
|
+
function gn(s) {
|
|
304
|
+
const e = s.match(pn);
|
|
305
305
|
if (e !== null)
|
|
306
306
|
return e.groups.blockid;
|
|
307
307
|
}
|
|
308
|
-
const
|
|
308
|
+
const hn = "__serviceTemplate_";
|
|
309
309
|
function Nt(s) {
|
|
310
|
-
return `${
|
|
310
|
+
return `${hn}${s}`;
|
|
311
311
|
}
|
|
312
312
|
function G(s, e) {
|
|
313
313
|
return `${s}-${e}`;
|
|
314
314
|
}
|
|
315
|
-
const
|
|
316
|
-
function
|
|
317
|
-
const e = s.match(
|
|
315
|
+
const mn = /^(?<blockId>.*)-(?<fieldName>blockPack|blockSettings|prodArgs|currentArgs|prodCtx|prodUiCtx|prodOutput|prodCtxPrevious|prodUiCtxPrevious|prodOutputPrevious|stagingCtx|stagingUiCtx|stagingOutput|stagingCtxPrevious|stagingUiCtxPrevious|stagingOutputPrevious)$/;
|
|
316
|
+
function vn(s) {
|
|
317
|
+
const e = s.match(mn);
|
|
318
318
|
if (e === null) return;
|
|
319
319
|
const { blockId: t, fieldName: r } = e.groups;
|
|
320
320
|
return { blockId: t, fieldName: r };
|
|
321
321
|
}
|
|
322
|
-
const
|
|
323
|
-
async function
|
|
324
|
-
const o = await
|
|
322
|
+
const yn = "projects", Es = { name: "Projects", version: "1" }, wn = (s) => le(s.type, Es) ? s.fields : [];
|
|
323
|
+
async function Sn(s, e, t, r) {
|
|
324
|
+
const o = await us.init(
|
|
325
325
|
s,
|
|
326
326
|
e,
|
|
327
327
|
{
|
|
328
328
|
...r.ops.defaultTreeOptions,
|
|
329
|
-
pruning:
|
|
329
|
+
pruning: wn
|
|
330
330
|
},
|
|
331
331
|
r.logger
|
|
332
332
|
);
|
|
@@ -337,12 +337,12 @@ async function bn(s, e, t, r) {
|
|
|
337
337
|
for (const u of c.listDynamicFields()) {
|
|
338
338
|
const d = c.traverse(u);
|
|
339
339
|
if (d === void 0) continue;
|
|
340
|
-
const p = I(d.getKeyValueAsJson(Me)), f = I(d.getKeyValueAsJson(Kt)),
|
|
340
|
+
const p = I(d.getKeyValueAsJson(Me)), f = I(d.getKeyValueAsJson(Kt)), k = I(d.getKeyValueAsJson(Ge));
|
|
341
341
|
l.push({
|
|
342
342
|
id: u,
|
|
343
343
|
rid: d.id,
|
|
344
344
|
created: new Date(f),
|
|
345
|
-
lastModified: new Date(
|
|
345
|
+
lastModified: new Date(k),
|
|
346
346
|
opened: a.indexOf(d.id) >= 0,
|
|
347
347
|
meta: p
|
|
348
348
|
});
|
|
@@ -350,36 +350,36 @@ async function bn(s, e, t, r) {
|
|
|
350
350
|
return l.sort((u) => -u.lastModified.valueOf()), l;
|
|
351
351
|
}).withStableType(), tree: o };
|
|
352
352
|
}
|
|
353
|
-
const
|
|
353
|
+
const bn = {
|
|
354
354
|
name: "EphRenderTemplate",
|
|
355
355
|
version: "1"
|
|
356
|
-
},
|
|
356
|
+
}, kn = {
|
|
357
357
|
name: "RenderTemplate",
|
|
358
358
|
version: "1"
|
|
359
359
|
};
|
|
360
360
|
function Ht(s, e, t, r, o) {
|
|
361
361
|
if (o.length === 0) throw new Error("Zero output names provided");
|
|
362
|
-
const n = t ? s.createEphemeral(
|
|
362
|
+
const n = t ? s.createEphemeral(bn) : s.createStruct(kn), i = x(n, "template"), c = x(n, "inputs");
|
|
363
363
|
return s.createField(i, "Input", e), s.createField(c, "Input", F.createPlMap(s, r, t)), s.lockInputs(n), F.futureRecord(s, n, o, "Output", "outputs/");
|
|
364
364
|
}
|
|
365
|
-
const
|
|
366
|
-
function
|
|
367
|
-
return Ht(s, e, !0, t,
|
|
365
|
+
const Rn = { name: "BContextEnd", version: "1" }, Cn = { name: "BContext", version: "1" }, En = "id", Pn = "parent/", $n = ["context", "result"];
|
|
366
|
+
function wr(s, e, t) {
|
|
367
|
+
return Ht(s, e, !0, t, $n);
|
|
368
368
|
}
|
|
369
|
-
function
|
|
370
|
-
const e = s.createEphemeral(
|
|
369
|
+
function On(s) {
|
|
370
|
+
const e = s.createEphemeral(Rn);
|
|
371
371
|
return s.lock(e), e;
|
|
372
372
|
}
|
|
373
|
-
function
|
|
374
|
-
if (e.length === 0) return
|
|
373
|
+
function Sr(s, e) {
|
|
374
|
+
if (e.length === 0) return On(s);
|
|
375
375
|
if (e.length === 1) return e[0];
|
|
376
|
-
const t = s.createEphemeral(
|
|
377
|
-
s.createField(x(t,
|
|
376
|
+
const t = s.createEphemeral(Cn);
|
|
377
|
+
s.createField(x(t, En), "Input", F.createPlString(s, Re()));
|
|
378
378
|
for (let r = 0; r < e.length; r++)
|
|
379
|
-
s.createField(x(t, `${
|
|
379
|
+
s.createField(x(t, `${Pn}${r}`), "Input", e[r]);
|
|
380
380
|
return s.lock(t), t;
|
|
381
381
|
}
|
|
382
|
-
function
|
|
382
|
+
function Ps(s, e) {
|
|
383
383
|
const t = /* @__PURE__ */ new Map(), r = (o, n, i) => {
|
|
384
384
|
const c = Ee("sha256");
|
|
385
385
|
n.updateCacheKey(o, c, i);
|
|
@@ -390,9 +390,9 @@ function $s(s, e) {
|
|
|
390
390
|
}
|
|
391
391
|
return t.get(a);
|
|
392
392
|
};
|
|
393
|
-
return r(e.template,
|
|
393
|
+
return r(e.template, $s, e.hashToSource);
|
|
394
394
|
}
|
|
395
|
-
const
|
|
395
|
+
const br = {
|
|
396
396
|
updateCacheKey(s, e, t) {
|
|
397
397
|
e.update(ue.type.name).update(ue.type.version).update(s.name).update(s.version).update(Ce(s.name, t, s.sourceHash));
|
|
398
398
|
},
|
|
@@ -410,12 +410,12 @@ const kr = {
|
|
|
410
410
|
const o = ae.fromV3Data(s, Ce(s.name, r, s.sourceHash)), n = e.createStruct(ae.type, o.data);
|
|
411
411
|
return e.setKValue(n, ae.metaNameKey, JSON.stringify(o.name)), e.lock(n), n;
|
|
412
412
|
}
|
|
413
|
-
},
|
|
413
|
+
}, $s = {
|
|
414
414
|
updateCacheKey(s, e, t) {
|
|
415
415
|
e.update(K.type.name).update(K.type.version).update(s.hashOverride ?? "no-override").update(s.name).update(s.version).update(Ce(s.name, t, s.sourceHash));
|
|
416
416
|
const r = (o) => (o.sort((n, i) => n[0] === i[0] ? 0 : n[0] < i[0] ? -1 : 1), o);
|
|
417
417
|
for (const [o, n] of r(Object.entries(s.libs ?? {})))
|
|
418
|
-
e.update("lib:" + o),
|
|
418
|
+
e.update("lib:" + o), br.updateCacheKey(n, e, t);
|
|
419
419
|
for (const [o, n] of r(Object.entries(s.software ?? {})))
|
|
420
420
|
e.update("soft:" + o), Xe.updateCacheKey(n, e, t);
|
|
421
421
|
for (const [o, n] of r(Object.entries(s.assets ?? {})))
|
|
@@ -430,7 +430,7 @@ const kr = {
|
|
|
430
430
|
);
|
|
431
431
|
for (const [c, a] of Object.entries(s.libs ?? {})) {
|
|
432
432
|
const l = K.libField(o, c);
|
|
433
|
-
e.createField(l, "Input"), e.setField(l, t(a,
|
|
433
|
+
e.createField(l, "Input"), e.setField(l, t(a, br, r));
|
|
434
434
|
}
|
|
435
435
|
for (const [c, a] of Object.entries(s.software ?? {})) {
|
|
436
436
|
const l = K.swField(o, c);
|
|
@@ -442,7 +442,7 @@ const kr = {
|
|
|
442
442
|
}
|
|
443
443
|
for (const [c, a] of Object.entries(s.templates ?? {})) {
|
|
444
444
|
const l = K.tplField(o, c);
|
|
445
|
-
e.createField(l, "Input"), e.setField(l, t(a,
|
|
445
|
+
e.createField(l, "Input"), e.setField(l, t(a, $s, r));
|
|
446
446
|
}
|
|
447
447
|
if (e.lock(o), !s.hashOverride) return o;
|
|
448
448
|
const n = e.createStruct(
|
|
@@ -458,29 +458,29 @@ function Ce(s, e, t) {
|
|
|
458
458
|
`trying to get "${s}" source: sources map doesn't contain source hash ${t}`
|
|
459
459
|
);
|
|
460
460
|
}
|
|
461
|
-
function
|
|
462
|
-
const t =
|
|
461
|
+
function Fn(s, e) {
|
|
462
|
+
const t = Do(e.content), r = t.type;
|
|
463
463
|
switch (r) {
|
|
464
464
|
case "pl.tengo-template.v2":
|
|
465
|
-
return
|
|
465
|
+
return Fs(s, t);
|
|
466
466
|
case "pl.tengo-template.v3":
|
|
467
|
-
return
|
|
467
|
+
return Ps(s, t);
|
|
468
468
|
default:
|
|
469
469
|
H(r);
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
|
-
function
|
|
472
|
+
function In(s, e) {
|
|
473
473
|
const t = e.data, r = t.type;
|
|
474
474
|
switch (r) {
|
|
475
475
|
case "pl.tengo-template.v2":
|
|
476
|
-
return
|
|
476
|
+
return Fs(s, t);
|
|
477
477
|
case "pl.tengo-template.v3":
|
|
478
|
-
return
|
|
478
|
+
return Ps(s, t);
|
|
479
479
|
default:
|
|
480
480
|
H(r);
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
|
-
const
|
|
483
|
+
const kr = {
|
|
484
484
|
hash(s, e) {
|
|
485
485
|
e.update(ue.type.name).update(ue.type.version).update(s.name).update(s.version).update(s.src);
|
|
486
486
|
},
|
|
@@ -498,12 +498,12 @@ const Rr = {
|
|
|
498
498
|
const r = ae.fromV2Data(s), o = e.createStruct(ae.type, r.data);
|
|
499
499
|
return e.setKValue(o, ae.metaNameKey, JSON.stringify(r.name)), e.lock(o), o;
|
|
500
500
|
}
|
|
501
|
-
},
|
|
501
|
+
}, Os = {
|
|
502
502
|
hash(s, e) {
|
|
503
503
|
e.update(K.type.name).update(K.type.version).update(s.hashOverride ?? "no-override").update(s.name).update(s.version).update(s.src);
|
|
504
504
|
const t = (r) => (r.sort((o, n) => o[0] === n[0] ? 0 : o[0] < n[0] ? -1 : 1), r);
|
|
505
505
|
for (const [r, o] of t(Object.entries(s.libs ?? {})))
|
|
506
|
-
e.update("lib:" + r),
|
|
506
|
+
e.update("lib:" + r), kr.hash(o, e);
|
|
507
507
|
for (const [r, o] of t(Object.entries(s.software ?? {})))
|
|
508
508
|
e.update("soft:" + r), Ye.hash(o, e);
|
|
509
509
|
for (const [r, o] of t(Object.entries(s.assets ?? {})))
|
|
@@ -518,7 +518,7 @@ const Rr = {
|
|
|
518
518
|
);
|
|
519
519
|
for (const [i, c] of Object.entries(s.libs ?? {})) {
|
|
520
520
|
const a = K.libField(r, i);
|
|
521
|
-
e.createField(a, "Input"), e.setField(a, t(c,
|
|
521
|
+
e.createField(a, "Input"), e.setField(a, t(c, kr));
|
|
522
522
|
}
|
|
523
523
|
for (const [i, c] of Object.entries(s.software ?? {})) {
|
|
524
524
|
const a = K.swField(r, i);
|
|
@@ -530,7 +530,7 @@ const Rr = {
|
|
|
530
530
|
}
|
|
531
531
|
for (const [i, c] of Object.entries(s.templates ?? {})) {
|
|
532
532
|
const a = K.tplField(r, i);
|
|
533
|
-
e.createField(a, "Input"), e.setField(a, t(c,
|
|
533
|
+
e.createField(a, "Input"), e.setField(a, t(c, Os));
|
|
534
534
|
}
|
|
535
535
|
if (e.lock(r), !s.hashOverride) return r;
|
|
536
536
|
const o = e.createStruct(
|
|
@@ -540,7 +540,7 @@ const Rr = {
|
|
|
540
540
|
return e.createField(n, "Service"), e.setField(n, r), e.lock(o), o;
|
|
541
541
|
}
|
|
542
542
|
};
|
|
543
|
-
function
|
|
543
|
+
function Fs(s, e) {
|
|
544
544
|
const t = /* @__PURE__ */ new Map(), r = (o, n) => {
|
|
545
545
|
const i = Ee("sha256");
|
|
546
546
|
n.hash(o, i);
|
|
@@ -551,13 +551,13 @@ function Is(s, e) {
|
|
|
551
551
|
}
|
|
552
552
|
return t.get(c);
|
|
553
553
|
};
|
|
554
|
-
return r(e,
|
|
554
|
+
return r(e, Os);
|
|
555
555
|
}
|
|
556
|
-
const
|
|
556
|
+
const Tn = { name: "TengoTemplateGet", version: "1" }, An = "registry", Ln = "templateURI", Dn = "template", gd = { name: "TengoTemplatePack", version: "1" }, hd = {
|
|
557
557
|
name: "TengoTemplatePackConvert",
|
|
558
558
|
version: "1"
|
|
559
|
-
},
|
|
560
|
-
async function
|
|
559
|
+
}, md = "templatePack", vd = "template";
|
|
560
|
+
async function Is(s) {
|
|
561
561
|
switch (s.type) {
|
|
562
562
|
case "from-file":
|
|
563
563
|
return {
|
|
@@ -573,36 +573,36 @@ async function Ts(s) {
|
|
|
573
573
|
return H(s);
|
|
574
574
|
}
|
|
575
575
|
}
|
|
576
|
-
function
|
|
577
|
-
const t = s.createStruct(
|
|
576
|
+
function Nn(s, e) {
|
|
577
|
+
const t = s.createStruct(Tn), r = x(t, An), o = x(t, Ln), n = x(t, Dn);
|
|
578
578
|
return s.setField(r, s.createValue(F.JsonString, Buffer.from(JSON.stringify(e.registry)))), s.setField(o, s.createValue(F.JsonString, Buffer.from(JSON.stringify(e.path)))), n;
|
|
579
579
|
}
|
|
580
580
|
function ft(s, e) {
|
|
581
581
|
switch (e.type) {
|
|
582
582
|
case "from-registry":
|
|
583
|
-
return
|
|
583
|
+
return Nn(s, e);
|
|
584
584
|
case "explicit":
|
|
585
|
-
return
|
|
585
|
+
return Fn(s, e);
|
|
586
586
|
case "prepared":
|
|
587
|
-
return
|
|
587
|
+
return In(s, e);
|
|
588
588
|
default:
|
|
589
589
|
return H(e);
|
|
590
590
|
}
|
|
591
591
|
}
|
|
592
|
-
const
|
|
592
|
+
const Ts = { name: "Frontend/FromUrl", version: "1" }, As = {
|
|
593
593
|
name: "Frontend/FromFolder",
|
|
594
594
|
version: "1"
|
|
595
595
|
};
|
|
596
|
-
function
|
|
596
|
+
function Bn(s, e) {
|
|
597
597
|
switch (e.type) {
|
|
598
598
|
case "url":
|
|
599
599
|
return s.createValue(
|
|
600
|
-
|
|
600
|
+
Ts,
|
|
601
601
|
JSON.stringify({ url: e.url })
|
|
602
602
|
);
|
|
603
603
|
case "local":
|
|
604
604
|
return s.createValue(
|
|
605
|
-
|
|
605
|
+
As,
|
|
606
606
|
JSON.stringify({
|
|
607
607
|
path: e.path,
|
|
608
608
|
signature: e.signature
|
|
@@ -612,12 +612,12 @@ function jn(s, e) {
|
|
|
612
612
|
return H(e);
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
|
-
class
|
|
615
|
+
class jn {
|
|
616
616
|
constructor() {
|
|
617
617
|
S(this, "nextMessageId", 0);
|
|
618
618
|
S(this, "worker");
|
|
619
619
|
S(this, "pendingRequests", /* @__PURE__ */ new Map());
|
|
620
|
-
const e = typeof global < "u" && "__WORKER_PATH__" in global ? global.__WORKER_PATH__ : U.resolve(import.meta.dirname, "worker.js"), t = this.worker = new
|
|
620
|
+
const e = typeof global < "u" && "__WORKER_PATH__" in global ? global.__WORKER_PATH__ : U.resolve(import.meta.dirname, "worker.js"), t = this.worker = new No(
|
|
621
621
|
e,
|
|
622
622
|
{
|
|
623
623
|
workerData: {}
|
|
@@ -648,19 +648,19 @@ class xn {
|
|
|
648
648
|
return this.terminate();
|
|
649
649
|
}
|
|
650
650
|
}
|
|
651
|
-
const
|
|
652
|
-
function
|
|
651
|
+
const xn = { name: "BlockPackCustom", version: "1" }, Ls = "template", Ds = "frontend";
|
|
652
|
+
function Rr(s) {
|
|
653
653
|
return s.endsWith("/") ? s : `${s}/`;
|
|
654
654
|
}
|
|
655
|
-
function
|
|
655
|
+
function Vn(s) {
|
|
656
656
|
return Buffer.from(s).toString("utf8");
|
|
657
657
|
}
|
|
658
658
|
function Qe(s) {
|
|
659
|
-
return JSON.parse(
|
|
659
|
+
return JSON.parse(Vn(s));
|
|
660
660
|
}
|
|
661
|
-
class
|
|
661
|
+
class Un {
|
|
662
662
|
constructor(e, t, r) {
|
|
663
|
-
S(this, "remoteContentCache", new
|
|
663
|
+
S(this, "remoteContentCache", new ds({
|
|
664
664
|
max: 500,
|
|
665
665
|
maxSize: 128 * 1024 * 1024,
|
|
666
666
|
fetchMethod: async (e) => {
|
|
@@ -678,17 +678,17 @@ class Jn {
|
|
|
678
678
|
case "prepared":
|
|
679
679
|
return e.config;
|
|
680
680
|
case "dev-v1": {
|
|
681
|
-
const t = await
|
|
681
|
+
const t = await yr(e.folder), r = await Q.promises.readFile(t.config, { encoding: "utf-8" });
|
|
682
682
|
return JSON.parse(r);
|
|
683
683
|
}
|
|
684
684
|
case "dev-v2": {
|
|
685
|
-
const t = await
|
|
685
|
+
const t = await ur(e.folder), r = await Q.promises.readFile(t.components.model.file, {
|
|
686
686
|
encoding: "utf-8"
|
|
687
687
|
});
|
|
688
688
|
return JSON.parse(r);
|
|
689
689
|
}
|
|
690
690
|
case "from-registry-v1": {
|
|
691
|
-
const t = `${
|
|
691
|
+
const t = `${Rr(e.registryUrl)}${ge.packageContentPrefix({ organization: e.id.organization, package: e.id.name, version: e.id.version })}`, r = await this.remoteContentCache.forceFetch(`${t}/config.json`);
|
|
692
692
|
return Qe(r);
|
|
693
693
|
}
|
|
694
694
|
case "from-registry-v2": {
|
|
@@ -705,7 +705,7 @@ class Jn {
|
|
|
705
705
|
if (e.type === "prepared")
|
|
706
706
|
return e;
|
|
707
707
|
const t = await this.prepareWithoutUnpacking(e);
|
|
708
|
-
const r = ar(o, new
|
|
708
|
+
const r = ar(o, new jn(), !0);
|
|
709
709
|
return {
|
|
710
710
|
...t,
|
|
711
711
|
type: "prepared",
|
|
@@ -726,7 +726,7 @@ class Jn {
|
|
|
726
726
|
case "explicit":
|
|
727
727
|
return e;
|
|
728
728
|
case "dev-v1": {
|
|
729
|
-
const t = await
|
|
729
|
+
const t = await yr(e.folder), r = await Q.promises.readFile(t.workflow), o = JSON.parse(
|
|
730
730
|
await Q.promises.readFile(t.config, "utf-8")
|
|
731
731
|
), n = t.ui;
|
|
732
732
|
return {
|
|
@@ -745,7 +745,7 @@ class Jn {
|
|
|
745
745
|
};
|
|
746
746
|
}
|
|
747
747
|
case "dev-v2": {
|
|
748
|
-
const t = await
|
|
748
|
+
const t = await ur(e.folder), r = JSON.parse(
|
|
749
749
|
await Q.promises.readFile(t.components.model.file, {
|
|
750
750
|
encoding: "utf-8"
|
|
751
751
|
})
|
|
@@ -768,7 +768,7 @@ class Jn {
|
|
|
768
768
|
};
|
|
769
769
|
}
|
|
770
770
|
case "from-registry-v1": {
|
|
771
|
-
const t = `${
|
|
771
|
+
const t = `${Rr(e.registryUrl)}${ge.packageContentPrefix({ organization: e.id.organization, package: e.id.name, version: e.id.version })}`, r = `${t}/template.plj.gz`, o = await this.remoteContentCache.forceFetch(r), n = new Uint8Array(o), i = await this.remoteContentCache.forceFetch(`${t}/config.json`), c = Qe(i);
|
|
772
772
|
return {
|
|
773
773
|
type: "explicit",
|
|
774
774
|
template: {
|
|
@@ -804,14 +804,14 @@ class Jn {
|
|
|
804
804
|
}
|
|
805
805
|
}
|
|
806
806
|
}
|
|
807
|
-
function
|
|
808
|
-
const t = { config: e.config, source: e.source }, r = s.createStruct(
|
|
809
|
-
return s.createField(x(r,
|
|
807
|
+
function Jn(s, e) {
|
|
808
|
+
const t = { config: e.config, source: e.source }, r = s.createStruct(xn, JSON.stringify(t));
|
|
809
|
+
return s.createField(x(r, Ls), "Input", ft(s, e.template)), s.createField(x(r, Ds), "Input", Bn(s, e.frontend)), s.lock(r), r;
|
|
810
810
|
}
|
|
811
|
-
function
|
|
811
|
+
function Cr(s, e) {
|
|
812
812
|
switch (e.type) {
|
|
813
813
|
case "prepared":
|
|
814
|
-
return
|
|
814
|
+
return Jn(s, e);
|
|
815
815
|
default:
|
|
816
816
|
return H(e.type);
|
|
817
817
|
}
|
|
@@ -819,7 +819,7 @@ function Er(s, e) {
|
|
|
819
819
|
function Ze(s, e, t) {
|
|
820
820
|
return { __isRef: !0, blockId: s, name: e };
|
|
821
821
|
}
|
|
822
|
-
function
|
|
822
|
+
function Gn(s) {
|
|
823
823
|
return typeof s == "object" && s !== null && "__isRef" in s && s.__isRef === !0 && "blockId" in s && "name" in s;
|
|
824
824
|
}
|
|
825
825
|
function Bt(s, e, t) {
|
|
@@ -835,7 +835,7 @@ function Bt(s, e, t) {
|
|
|
835
835
|
return;
|
|
836
836
|
case "object":
|
|
837
837
|
if (e === null) return;
|
|
838
|
-
if (
|
|
838
|
+
if (Gn(e))
|
|
839
839
|
t === void 0 || t.has(e.blockId) ? (s.upstreams.add(e.blockId), e.requireEnrichments && s.upstreamsRequiringEnrichments.add(e.blockId)) : s.missingReferences = !0;
|
|
840
840
|
else if (Array.isArray(e))
|
|
841
841
|
for (const o of e) Bt(s, o, t);
|
|
@@ -847,7 +847,7 @@ function Bt(s, e, t) {
|
|
|
847
847
|
H(r);
|
|
848
848
|
}
|
|
849
849
|
}
|
|
850
|
-
function
|
|
850
|
+
function Mn(s, e) {
|
|
851
851
|
const t = { upstreams: /* @__PURE__ */ new Set(), upstreamsRequiringEnrichments: /* @__PURE__ */ new Set(), missingReferences: !1 };
|
|
852
852
|
return Bt(t, s, e), t;
|
|
853
853
|
}
|
|
@@ -858,7 +858,7 @@ function se(s) {
|
|
|
858
858
|
}
|
|
859
859
|
};
|
|
860
860
|
}
|
|
861
|
-
class
|
|
861
|
+
class Ns {
|
|
862
862
|
constructor(e) {
|
|
863
863
|
/** Nodes are stored in the map in topological order */
|
|
864
864
|
S(this, "nodes");
|
|
@@ -898,14 +898,14 @@ function jt(s) {
|
|
|
898
898
|
};
|
|
899
899
|
e.set(r, o), t === void 0 ? (o.directUpstream = o.upstream = /* @__PURE__ */ new Set(), o.enrichments = o.enrichmentTargets = /* @__PURE__ */ new Set()) : (o.directUpstream = o.upstream = /* @__PURE__ */ new Set([t.id]), t.directDownstream = t.downstream = /* @__PURE__ */ new Set([o.id]), t.enrichments = t.enrichmentTargets = /* @__PURE__ */ new Set()), t = o;
|
|
900
900
|
}
|
|
901
|
-
return t !== void 0 && (t.directDownstream = t.downstream = /* @__PURE__ */ new Set()), new
|
|
901
|
+
return t !== void 0 && (t.directDownstream = t.downstream = /* @__PURE__ */ new Set()), new Ns(e);
|
|
902
902
|
}
|
|
903
903
|
function at(s, e) {
|
|
904
|
-
const t = /* @__PURE__ */ new Map(), r = new
|
|
904
|
+
const t = /* @__PURE__ */ new Map(), r = new Ns(t), o = /* @__PURE__ */ new Set();
|
|
905
905
|
for (const { id: n } of se(s)) {
|
|
906
906
|
const i = e(n);
|
|
907
907
|
if (i === void 0) continue;
|
|
908
|
-
const c =
|
|
908
|
+
const c = Mn(i.args, o), a = /* @__PURE__ */ new Set([
|
|
909
909
|
...c.upstreams,
|
|
910
910
|
...r.traverseIds("enrichments", ...c.upstreamsRequiringEnrichments)
|
|
911
911
|
]), l = /* @__PURE__ */ new Set();
|
|
@@ -937,7 +937,7 @@ function at(s, e) {
|
|
|
937
937
|
}
|
|
938
938
|
return r;
|
|
939
939
|
}
|
|
940
|
-
function
|
|
940
|
+
function _n(s, e) {
|
|
941
941
|
if (s.size !== e.size) return !1;
|
|
942
942
|
for (const t of s) if (!e.has(t)) return !1;
|
|
943
943
|
return !0;
|
|
@@ -947,26 +947,26 @@ function xt(s, e) {
|
|
|
947
947
|
for (const t of s) if (e.has(t)) return !0;
|
|
948
948
|
return !1;
|
|
949
949
|
}
|
|
950
|
-
function
|
|
950
|
+
function Er(s, e) {
|
|
951
951
|
const t = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
|
|
952
952
|
return s.nodes.forEach((n) => {
|
|
953
953
|
const i = e.nodes.get(n.id);
|
|
954
|
-
i === void 0 ? t.add(n.id) : (!
|
|
954
|
+
i === void 0 ? t.add(n.id) : (!_n(n.upstream, i.upstream) || xt(n.upstream, o)) && o.add(n.id);
|
|
955
955
|
}), e.nodes.forEach((n) => {
|
|
956
956
|
s.nodes.has(n.id) ? xt(n.upstream, o) && o.add(n.id) : r.add(n.id);
|
|
957
957
|
}), { onlyInA: t, onlyInB: r, different: o };
|
|
958
958
|
}
|
|
959
959
|
let bt;
|
|
960
|
-
async function
|
|
960
|
+
async function Bs() {
|
|
961
961
|
if (bt === void 0) {
|
|
962
|
-
const s = await
|
|
962
|
+
const s = await Is(me["pframes.export-pframe-for-ui"]);
|
|
963
963
|
if (s.type !== "explicit") throw new Error("Unexpected prepared template type.");
|
|
964
964
|
const e = Ee("sha256").update(s.content).digest("hex");
|
|
965
965
|
bt = { spec: s, hash: e };
|
|
966
966
|
}
|
|
967
967
|
return bt;
|
|
968
968
|
}
|
|
969
|
-
function
|
|
969
|
+
function Kn(s, e, t) {
|
|
970
970
|
return Ht(s, e, !0, { pf: t }, ["result"]).result;
|
|
971
971
|
}
|
|
972
972
|
function kt(s, e) {
|
|
@@ -978,7 +978,7 @@ function kt(s, e) {
|
|
|
978
978
|
return r !== n && (r = n, o = e()), e();
|
|
979
979
|
};
|
|
980
980
|
}
|
|
981
|
-
class
|
|
981
|
+
class Pr {
|
|
982
982
|
constructor(e, t, r, o) {
|
|
983
983
|
S(this, "currentArgsC", kt(
|
|
984
984
|
() => this.fields.currentArgs.modCount,
|
|
@@ -1042,12 +1042,12 @@ class $r {
|
|
|
1042
1042
|
getTemplate(e) {
|
|
1043
1043
|
return e.getFutureFieldValue(
|
|
1044
1044
|
F.unwrapHolder(e, this.fields.blockPack.ref),
|
|
1045
|
-
|
|
1045
|
+
Ls,
|
|
1046
1046
|
"Input"
|
|
1047
1047
|
);
|
|
1048
1048
|
}
|
|
1049
1049
|
}
|
|
1050
|
-
const
|
|
1050
|
+
const Hn = (s) => {
|
|
1051
1051
|
throw new Error(`No new block info for ${s}`);
|
|
1052
1052
|
};
|
|
1053
1053
|
class pt {
|
|
@@ -1078,7 +1078,7 @@ class pt {
|
|
|
1078
1078
|
});
|
|
1079
1079
|
let e;
|
|
1080
1080
|
this.blockInfos.forEach((t) => {
|
|
1081
|
-
t.fields.blockSettings === void 0 && (e === void 0 && (e = this.createJsonFieldValue(
|
|
1081
|
+
t.fields.blockSettings === void 0 && (e === void 0 && (e = this.createJsonFieldValue(lr)), this.setBlockFieldObj(t.id, "blockSettings", e));
|
|
1082
1082
|
});
|
|
1083
1083
|
}
|
|
1084
1084
|
get wasModified() {
|
|
@@ -1099,7 +1099,7 @@ class pt {
|
|
|
1099
1099
|
} else
|
|
1100
1100
|
o = I(r.fields.currentArgs), n = r.currentArgs;
|
|
1101
1101
|
const i = I(r.fields.blockPack);
|
|
1102
|
-
return
|
|
1102
|
+
return fr(o.ref) && fr(i.ref) ? {
|
|
1103
1103
|
args: n,
|
|
1104
1104
|
enrichmentTargets: this.projectHelper.getEnrichmentTargets(
|
|
1105
1105
|
() => r.config,
|
|
@@ -1216,7 +1216,7 @@ class pt {
|
|
|
1216
1216
|
if (((n = o.fields.prodCtx) == null ? void 0 : n.ref) === void 0)
|
|
1217
1217
|
throw new Error("One of the upstreams staging is not rendered.");
|
|
1218
1218
|
t.push(F.unwrapHolder(this.tx, o.fields.prodCtx.ref));
|
|
1219
|
-
}),
|
|
1219
|
+
}), Sr(this.tx, t);
|
|
1220
1220
|
}
|
|
1221
1221
|
createStagingCtx(e) {
|
|
1222
1222
|
const t = [];
|
|
@@ -1226,16 +1226,16 @@ class pt {
|
|
|
1226
1226
|
if (((n = o.fields.stagingCtx) == null ? void 0 : n.ref) === void 0)
|
|
1227
1227
|
throw new Error("One of the upstreams staging is not rendered.");
|
|
1228
1228
|
t.push(F.unwrapHolder(this.tx, o.fields.stagingCtx.ref)), ((i = o.fields.prodCtx) == null ? void 0 : i.ref) !== void 0 && t.push(F.unwrapHolder(this.tx, o.fields.prodCtx.ref));
|
|
1229
|
-
}),
|
|
1229
|
+
}), Sr(this.tx, t);
|
|
1230
1230
|
}
|
|
1231
1231
|
exportCtx(e) {
|
|
1232
|
-
return
|
|
1232
|
+
return Kn(this.tx, F.unwrapHolder(this.tx, this.ctxExportTplHolder), e);
|
|
1233
1233
|
}
|
|
1234
1234
|
renderStagingFor(e) {
|
|
1235
1235
|
this.resetStaging(e);
|
|
1236
1236
|
const t = this.getBlockInfo(e), r = this.createStagingCtx(this.getStagingGraph().nodes.get(e).upstream);
|
|
1237
1237
|
if (this.getBlock(e).renderingMode !== "Heavy") throw new Error("not supported yet");
|
|
1238
|
-
const o = t.getTemplate(this.tx), n =
|
|
1238
|
+
const o = t.getTemplate(this.tx), n = wr(this.tx, o, {
|
|
1239
1239
|
args: t.fields.currentArgs.ref,
|
|
1240
1240
|
blockId: this.tx.createValue(F.JsonString, JSON.stringify(e)),
|
|
1241
1241
|
isProduction: this.tx.createValue(F.JsonBool, JSON.stringify(!1)),
|
|
@@ -1253,7 +1253,7 @@ class pt {
|
|
|
1253
1253
|
const t = this.getBlockInfo(e), r = this.createProdCtx(this.getPendingProductionGraph().nodes.get(e).upstream);
|
|
1254
1254
|
if (this.getBlock(e).renderingMode === "Light")
|
|
1255
1255
|
throw new Error("Can't render production for light block.");
|
|
1256
|
-
const o = t.getTemplate(this.tx), n =
|
|
1256
|
+
const o = t.getTemplate(this.tx), n = wr(this.tx, o, {
|
|
1257
1257
|
args: t.fields.currentArgs.ref,
|
|
1258
1258
|
blockId: this.tx.createValue(F.JsonString, JSON.stringify(e)),
|
|
1259
1259
|
isProduction: this.tx.createValue(F.JsonBool, JSON.stringify(!0)),
|
|
@@ -1270,27 +1270,27 @@ class pt {
|
|
|
1270
1270
|
// Structure changes
|
|
1271
1271
|
//
|
|
1272
1272
|
/** Very generic method, better check for more specialized case-specific methods first. */
|
|
1273
|
-
updateStructure(e, t =
|
|
1274
|
-
const r = this.getStagingGraph(), o = this.getActualProductionGraph(), n = jt(e), i =
|
|
1273
|
+
updateStructure(e, t = Hn) {
|
|
1274
|
+
const r = this.getStagingGraph(), o = this.getActualProductionGraph(), n = jt(e), i = Er(r, n);
|
|
1275
1275
|
for (const l of i.onlyInA) {
|
|
1276
1276
|
const { fields: u } = this.getBlockInfo(l);
|
|
1277
1277
|
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);
|
|
1278
1278
|
}
|
|
1279
1279
|
for (const l of i.onlyInB) {
|
|
1280
|
-
const u = t(l), d = new
|
|
1280
|
+
const u = t(l), d = new Pr(l, {}, Se(u.blockPack.config), u.blockPack.source);
|
|
1281
1281
|
this.blockInfos.set(l, d);
|
|
1282
|
-
const p =
|
|
1282
|
+
const p = Cr(this.tx, u.blockPack);
|
|
1283
1283
|
this.setBlockField(l, "blockPack", F.wrapInHolder(this.tx, p), "NotReady"), this.setBlockFieldObj(
|
|
1284
1284
|
l,
|
|
1285
1285
|
"blockSettings",
|
|
1286
|
-
this.createJsonFieldValue(
|
|
1286
|
+
this.createJsonFieldValue(lr)
|
|
1287
1287
|
), this.setBlockFieldObj(l, "currentArgs", this.createJsonFieldValueByContent(u.args)), u.uiState && (this.blockFrontendStates.set(l, u.uiState), this.changedBlockFrontendStates.add(l)), d.check();
|
|
1288
1288
|
}
|
|
1289
1289
|
for (const l of i.different) this.resetStaging(l);
|
|
1290
1290
|
const c = at(
|
|
1291
1291
|
e,
|
|
1292
1292
|
(l) => this.getProductionGraphBlockInfo(l, !0)
|
|
1293
|
-
), a =
|
|
1293
|
+
), a = Er(o, c);
|
|
1294
1294
|
o.traverse("downstream", [...a.different], (l) => {
|
|
1295
1295
|
this.resetOrLimboProduction(l.id);
|
|
1296
1296
|
}), (i.onlyInB.size > 0 || i.onlyInA.size > 0 || i.different.size > 0) && this.resetStagingRefreshTimestamp(), this.struct = e, this.structureChanged = !0, this.stagingGraph = void 0, this.pendingProductionGraph = void 0, this.actualProductionGraph = void 0, this.updateLastModified();
|
|
@@ -1339,7 +1339,7 @@ class pt {
|
|
|
1339
1339
|
this.setBlockField(
|
|
1340
1340
|
e,
|
|
1341
1341
|
"blockPack",
|
|
1342
|
-
F.wrapInHolder(this.tx,
|
|
1342
|
+
F.wrapInHolder(this.tx, Cr(this.tx, t)),
|
|
1343
1343
|
"NotReady"
|
|
1344
1344
|
), r !== void 0 ? (this.setArgs([{ blockId: e, args: r.args }]), this.setUiState(e, r.uiState)) : this.getStagingGraph().traverse("downstream", [e], ({ id: n }) => this.resetStaging(n)), o.productionRendered && this.getActualProductionGraph().traverse(
|
|
1345
1345
|
"downstream",
|
|
@@ -1388,7 +1388,7 @@ class pt {
|
|
|
1388
1388
|
* accordingly */
|
|
1389
1389
|
stopProduction(...e) {
|
|
1390
1390
|
var i, c;
|
|
1391
|
-
const t = this.getActualProductionGraph(), r = new
|
|
1391
|
+
const t = this.getActualProductionGraph(), r = new ps(e), o = new Set(e), n = [];
|
|
1392
1392
|
for (; !r.isEmpty(); ) {
|
|
1393
1393
|
const a = r.shift(), l = this.getBlockInfo(a).fields;
|
|
1394
1394
|
if (!(((i = l.prodOutput) == null ? void 0 : i.status) === "Ready" && ((c = l.prodCtx) == null ? void 0 : c.status) === "Ready") && this.deleteBlockFields(a, "prodOutput", "prodCtx", "prodUiCtx", "prodArgs")) {
|
|
@@ -1469,9 +1469,9 @@ class pt {
|
|
|
1469
1469
|
}
|
|
1470
1470
|
}
|
|
1471
1471
|
static async load(e, t, r, o) {
|
|
1472
|
-
const n = t.getResourceData(r, !0), i = t.getKValueJson(r,
|
|
1472
|
+
const n = t.getResourceData(r, !0), i = t.getKValueJson(r, Rs), c = t.getKValueJson(r, Ge), a = t.getKValueJson(r, Me), l = t.getKValueJson(r, he), u = t.getKValueJson(r, dt), d = t.listKeyValuesString(r), p = await n, f = /* @__PURE__ */ new Map();
|
|
1473
1473
|
for (const g of p.fields) {
|
|
1474
|
-
const w =
|
|
1474
|
+
const w = vn(g.name);
|
|
1475
1475
|
if (w === void 0) continue;
|
|
1476
1476
|
let v = f.get(w.blockId);
|
|
1477
1477
|
v === void 0 && (v = {
|
|
@@ -1479,19 +1479,19 @@ class pt {
|
|
|
1479
1479
|
fields: {}
|
|
1480
1480
|
}, f.set(w.blockId, v)), v.fields[w.fieldName] = Ue(g.value) ? { modCount: 0 } : { modCount: 0, ref: g.value };
|
|
1481
1481
|
}
|
|
1482
|
-
const
|
|
1482
|
+
const k = [];
|
|
1483
1483
|
f.forEach((g) => {
|
|
1484
1484
|
const w = g.fields;
|
|
1485
|
-
for (const [v,
|
|
1486
|
-
if (
|
|
1487
|
-
if (!
|
|
1485
|
+
for (const [v, b] of Object.entries(w)) {
|
|
1486
|
+
if (b.ref === void 0) continue;
|
|
1487
|
+
if (!wo(b.ref) || So(b.ref))
|
|
1488
1488
|
throw new Error("unexpected behaviour");
|
|
1489
1489
|
const E = v;
|
|
1490
|
-
|
|
1490
|
+
k.push([
|
|
1491
1491
|
g,
|
|
1492
1492
|
E,
|
|
1493
|
-
|
|
1494
|
-
t.getResourceData(
|
|
1493
|
+
b,
|
|
1494
|
+
t.getResourceData(b.ref, E == "blockPack")
|
|
1495
1495
|
]);
|
|
1496
1496
|
}
|
|
1497
1497
|
});
|
|
@@ -1510,13 +1510,13 @@ class pt {
|
|
|
1510
1510
|
u,
|
|
1511
1511
|
d
|
|
1512
1512
|
]);
|
|
1513
|
-
if (m !==
|
|
1513
|
+
if (m !== Cs)
|
|
1514
1514
|
throw new Error(
|
|
1515
1515
|
`Can't act on this project resource because it has a wrong schema version: ${m}`
|
|
1516
1516
|
);
|
|
1517
1517
|
const N = [];
|
|
1518
|
-
for (const [g, w, v,
|
|
1519
|
-
const E = await
|
|
1518
|
+
for (const [g, w, v, b] of k) {
|
|
1519
|
+
const E = await b;
|
|
1520
1520
|
if (v.value = E.data, Tt(E.error) ? v.status = "Error" : E.resourceReady || Tt(E.originalResourceId) ? v.status = "Ready" : v.status = "NotReady", w === "blockPack") {
|
|
1521
1521
|
const C = E.fields.find((L) => L.name === F.HolderRefField);
|
|
1522
1522
|
if (C === void 0)
|
|
@@ -1525,10 +1525,10 @@ class pt {
|
|
|
1525
1525
|
}
|
|
1526
1526
|
}
|
|
1527
1527
|
for (const [g, w] of N) {
|
|
1528
|
-
const v = await w,
|
|
1529
|
-
g.blockConfig = Se(
|
|
1528
|
+
const v = await w, b = ct(I(v.data));
|
|
1529
|
+
g.blockConfig = Se(b.config), g.blockPack = b.source;
|
|
1530
1530
|
}
|
|
1531
|
-
const X = await
|
|
1531
|
+
const X = await Bs(), Z = Nt(X.hash), _ = p.fields.find(
|
|
1532
1532
|
(g) => g.name === Z
|
|
1533
1533
|
);
|
|
1534
1534
|
let ee;
|
|
@@ -1539,13 +1539,13 @@ class pt {
|
|
|
1539
1539
|
));
|
|
1540
1540
|
const te = { stagingRefreshTimestamp: T }, J = new Set(W), q = /* @__PURE__ */ new Map();
|
|
1541
1541
|
for (const g of ve) {
|
|
1542
|
-
const w =
|
|
1542
|
+
const w = gn(g.key);
|
|
1543
1543
|
w !== void 0 && q.set(w, g.value);
|
|
1544
1544
|
}
|
|
1545
1545
|
const y = /* @__PURE__ */ new Map();
|
|
1546
|
-
f.forEach(({ id: g, fields: w, blockConfig: v, blockPack:
|
|
1546
|
+
f.forEach(({ id: g, fields: w, blockConfig: v, blockPack: b }) => y.set(
|
|
1547
1547
|
g,
|
|
1548
|
-
new
|
|
1548
|
+
new Pr(g, w, I(v), I(b))
|
|
1549
1549
|
));
|
|
1550
1550
|
const h = /* @__PURE__ */ new Set();
|
|
1551
1551
|
for (const g of se(j)) {
|
|
@@ -1576,12 +1576,12 @@ class pt {
|
|
|
1576
1576
|
return R.fixProblemsAndMigrate(), R;
|
|
1577
1577
|
}
|
|
1578
1578
|
}
|
|
1579
|
-
async function
|
|
1580
|
-
const t = s.createEphemeral(
|
|
1579
|
+
async function Wn(s, e = ln) {
|
|
1580
|
+
const t = s.createEphemeral(un);
|
|
1581
1581
|
s.lock(t);
|
|
1582
1582
|
const r = String(Date.now());
|
|
1583
|
-
s.setKValue(t,
|
|
1584
|
-
const o = await
|
|
1583
|
+
s.setKValue(t, Rs, JSON.stringify(Cs)), s.setKValue(t, Kt, r), s.setKValue(t, Ge, r), s.setKValue(t, Me, JSON.stringify(e)), s.setKValue(t, he, JSON.stringify(an)), s.setKValue(t, dt, JSON.stringify(cn));
|
|
1584
|
+
const o = await Bs();
|
|
1585
1585
|
return s.createField(
|
|
1586
1586
|
x(t, Nt(o.hash)),
|
|
1587
1587
|
"Dynamic",
|
|
@@ -1592,7 +1592,7 @@ async function et(s, e, t, r) {
|
|
|
1592
1592
|
return re(s, e, t, void 0, r);
|
|
1593
1593
|
}
|
|
1594
1594
|
async function re(s, e, t, r, o) {
|
|
1595
|
-
if (e instanceof
|
|
1595
|
+
if (e instanceof cs)
|
|
1596
1596
|
return await e.withWriteTx("ProjectAction", async (n) => {
|
|
1597
1597
|
const i = await pt.load(s, n, t, r), c = await o(i);
|
|
1598
1598
|
return i.wasModified && (i.save(), await n.commit()), c;
|
|
@@ -1602,7 +1602,7 @@ async function re(s, e, t, r, o) {
|
|
|
1602
1602
|
return n.save(), i;
|
|
1603
1603
|
}
|
|
1604
1604
|
}
|
|
1605
|
-
function*
|
|
1605
|
+
function* qn(s) {
|
|
1606
1606
|
switch (s.type) {
|
|
1607
1607
|
case "Json":
|
|
1608
1608
|
return;
|
|
@@ -1617,21 +1617,21 @@ function* zn(s) {
|
|
|
1617
1617
|
H(s);
|
|
1618
1618
|
}
|
|
1619
1619
|
}
|
|
1620
|
-
function
|
|
1620
|
+
function $r(s, e) {
|
|
1621
1621
|
return Object.fromEntries(
|
|
1622
1622
|
Object.entries(s).map(([t, r]) => [t, e(r, t)])
|
|
1623
1623
|
);
|
|
1624
1624
|
}
|
|
1625
|
-
function
|
|
1625
|
+
function zn(s, e) {
|
|
1626
1626
|
switch (s.type) {
|
|
1627
1627
|
case "Json":
|
|
1628
1628
|
return { ...s };
|
|
1629
1629
|
case "JsonPartitioned":
|
|
1630
|
-
return { ...s, parts:
|
|
1630
|
+
return { ...s, parts: $r(s.parts, e) };
|
|
1631
1631
|
case "BinaryPartitioned":
|
|
1632
1632
|
return {
|
|
1633
1633
|
...s,
|
|
1634
|
-
parts:
|
|
1634
|
+
parts: $r(s.parts, (t) => ({
|
|
1635
1635
|
index: e(t.index),
|
|
1636
1636
|
values: e(t.values)
|
|
1637
1637
|
}))
|
|
@@ -1640,26 +1640,26 @@ function Xn(s, e) {
|
|
|
1640
1640
|
H(s);
|
|
1641
1641
|
}
|
|
1642
1642
|
}
|
|
1643
|
-
const
|
|
1643
|
+
const Xn = He("PColumnData/JsonPartitioned", "1"), Yn = He(
|
|
1644
1644
|
"PColumnData/Partitioned/JsonPartitioned",
|
|
1645
1645
|
"1"
|
|
1646
|
-
),
|
|
1646
|
+
), Qn = He("PColumnData/BinaryPartitioned", "1"), Zn = He(
|
|
1647
1647
|
"PColumnData/Partitioned/BinaryPartitioned",
|
|
1648
1648
|
"1"
|
|
1649
|
-
),
|
|
1650
|
-
function
|
|
1649
|
+
), ei = He("PColumnData/Json", "1");
|
|
1650
|
+
function ti(s) {
|
|
1651
1651
|
if (!s.getIsReadyOrError()) throw new Error("Data not ready.");
|
|
1652
1652
|
const e = s.getDataAsJson();
|
|
1653
1653
|
if (e === void 0)
|
|
1654
1654
|
throw new Error("unexpected data info structure, no resource data");
|
|
1655
|
-
if (le(s.resourceType,
|
|
1655
|
+
if (le(s.resourceType, ei)) {
|
|
1656
1656
|
const t = e;
|
|
1657
1657
|
return {
|
|
1658
1658
|
type: "Json",
|
|
1659
1659
|
keyLength: t.keyLength,
|
|
1660
1660
|
data: t.data
|
|
1661
1661
|
};
|
|
1662
|
-
} else if (le(s.resourceType,
|
|
1662
|
+
} else if (le(s.resourceType, Xn)) {
|
|
1663
1663
|
const t = e, r = Object.fromEntries(
|
|
1664
1664
|
s.listInputFields().map((o) => [o, s.traverse({ field: o, errorIfFieldNotSet: !0 }).resourceInfo])
|
|
1665
1665
|
);
|
|
@@ -1668,7 +1668,7 @@ function ri(s) {
|
|
|
1668
1668
|
partitionKeyLength: t.partitionKeyLength,
|
|
1669
1669
|
parts: r
|
|
1670
1670
|
};
|
|
1671
|
-
} else if (le(s.resourceType,
|
|
1671
|
+
} else if (le(s.resourceType, Yn)) {
|
|
1672
1672
|
const t = e, r = {};
|
|
1673
1673
|
for (const o of s.listInputFields()) {
|
|
1674
1674
|
const n = s.traverse({ field: o, errorIfFieldNotSet: !0 }), i = n.listInputFields();
|
|
@@ -1686,7 +1686,7 @@ function ri(s) {
|
|
|
1686
1686
|
partitionKeyLength: t.superPartitionKeyLength + t.partitionKeyLength,
|
|
1687
1687
|
parts: r
|
|
1688
1688
|
};
|
|
1689
|
-
} else if (le(s.resourceType,
|
|
1689
|
+
} else if (le(s.resourceType, Qn)) {
|
|
1690
1690
|
const t = e, r = {};
|
|
1691
1691
|
for (const o of s.listInputFields())
|
|
1692
1692
|
if (o.endsWith(".index")) {
|
|
@@ -1707,7 +1707,7 @@ function ri(s) {
|
|
|
1707
1707
|
partitionKeyLength: t.partitionKeyLength,
|
|
1708
1708
|
parts: r
|
|
1709
1709
|
};
|
|
1710
|
-
} else if (le(s.resourceType,
|
|
1710
|
+
} else if (le(s.resourceType, Zn)) {
|
|
1711
1711
|
const t = e, r = {};
|
|
1712
1712
|
for (const o of s.listInputFields()) {
|
|
1713
1713
|
const n = s.traverse({ field: o, errorIfFieldNotSet: !0 }), i = n.listInputFields();
|
|
@@ -1741,9 +1741,9 @@ function ri(s) {
|
|
|
1741
1741
|
parts: r
|
|
1742
1742
|
};
|
|
1743
1743
|
}
|
|
1744
|
-
throw new Error(`unsupported resource type: ${
|
|
1744
|
+
throw new Error(`unsupported resource type: ${bo(s.resourceType)}`);
|
|
1745
1745
|
}
|
|
1746
|
-
function
|
|
1746
|
+
function ri(s, e) {
|
|
1747
1747
|
const t = s.axesSpec.length, r = {};
|
|
1748
1748
|
for (const { key: o, val: n } of e) {
|
|
1749
1749
|
if (o.length !== t)
|
|
@@ -1756,17 +1756,17 @@ function si(s, e) {
|
|
|
1756
1756
|
data: r
|
|
1757
1757
|
};
|
|
1758
1758
|
}
|
|
1759
|
-
function
|
|
1759
|
+
function si(s, e) {
|
|
1760
1760
|
const t = Ee("sha256");
|
|
1761
1761
|
return t.update(B(s)), t.update(String(Ue(e.originalId) ? e.id : e.originalId)), t.digest().toString("hex");
|
|
1762
1762
|
}
|
|
1763
|
-
function
|
|
1763
|
+
function Or(s, e) {
|
|
1764
1764
|
return B({ __isRef: !0, blockId: s, name: e });
|
|
1765
1765
|
}
|
|
1766
|
-
function
|
|
1766
|
+
function oi(s, e) {
|
|
1767
1767
|
return B({ resolvePath: s, name: e });
|
|
1768
1768
|
}
|
|
1769
|
-
function
|
|
1769
|
+
function js(s, e = !0, t = !1, r = "") {
|
|
1770
1770
|
var c, a, l;
|
|
1771
1771
|
const o = /^(?<name>.*)\.(?<type>spec|data)$/, n = /* @__PURE__ */ new Map();
|
|
1772
1772
|
for (const u of s.listInputFields()) {
|
|
@@ -1782,17 +1782,17 @@ function xs(s, e = !0, t = !1, r = "") {
|
|
|
1782
1782
|
}
|
|
1783
1783
|
p = p.slice(r.length);
|
|
1784
1784
|
const f = I((a = d.groups) == null ? void 0 : a.type);
|
|
1785
|
-
let
|
|
1786
|
-
switch (
|
|
1785
|
+
let k = n.get(p);
|
|
1786
|
+
switch (k === void 0 && (k = {}, n.set(p, k)), f) {
|
|
1787
1787
|
case "spec":
|
|
1788
|
-
|
|
1788
|
+
k.spec = (l = s.traverse({
|
|
1789
1789
|
field: u,
|
|
1790
1790
|
ignoreError: t,
|
|
1791
1791
|
pureFieldErrorToUndefined: t
|
|
1792
1792
|
})) == null ? void 0 : l.getDataAsJson();
|
|
1793
1793
|
break;
|
|
1794
1794
|
case "data":
|
|
1795
|
-
|
|
1795
|
+
k.hasData = !0, k.data = () => s.traverseOrError({
|
|
1796
1796
|
field: u,
|
|
1797
1797
|
ignoreError: t
|
|
1798
1798
|
});
|
|
@@ -1804,10 +1804,10 @@ function xs(s, e = !0, t = !1, r = "") {
|
|
|
1804
1804
|
for (const [, u] of n) u.data === void 0 && (u.hasData = !1);
|
|
1805
1805
|
return { locked: i, results: n };
|
|
1806
1806
|
}
|
|
1807
|
-
function
|
|
1807
|
+
function ni(s, e = !0, t = "", r) {
|
|
1808
1808
|
if (!s.getIsReadyOrError()) throw new Error("resource is not ready");
|
|
1809
|
-
const o =
|
|
1810
|
-
|
|
1809
|
+
const o = js(s, e, !1, t);
|
|
1810
|
+
Bo(o.locked);
|
|
1811
1811
|
const n = {};
|
|
1812
1812
|
for (const [i, c] of o.results) {
|
|
1813
1813
|
if (c.spec === void 0) throw new Error(`no spec for key ${i}`);
|
|
@@ -1817,7 +1817,7 @@ function ii(s, e = !0, t = "", r) {
|
|
|
1817
1817
|
if (a === void 0) throw new Error(`no data for key ${i}`);
|
|
1818
1818
|
if (!a.ok) throw a.error;
|
|
1819
1819
|
n[i] = {
|
|
1820
|
-
id: r.length === 0 ?
|
|
1820
|
+
id: r.length === 0 ? si(c.spec, a.value) : oi(r, i),
|
|
1821
1821
|
spec: c.spec,
|
|
1822
1822
|
data: a.value
|
|
1823
1823
|
};
|
|
@@ -1858,8 +1858,8 @@ class Wt {
|
|
|
1858
1858
|
if (r === void 0) return;
|
|
1859
1859
|
const o = (c = (i = r.prod) == null ? void 0 : i.results) == null ? void 0 : c.get(t), n = (a = o == null ? void 0 : o.data) == null ? void 0 : a.call(o);
|
|
1860
1860
|
if (o !== void 0 && o.spec !== void 0 && n !== void 0)
|
|
1861
|
-
return
|
|
1862
|
-
id:
|
|
1861
|
+
return rs(n, (l) => ({
|
|
1862
|
+
id: Or(e, t),
|
|
1863
1863
|
spec: o.spec,
|
|
1864
1864
|
data: l
|
|
1865
1865
|
}));
|
|
@@ -1898,7 +1898,7 @@ class Wt {
|
|
|
1898
1898
|
l !== void 0 ? e.push({
|
|
1899
1899
|
ref: Ze(i, c),
|
|
1900
1900
|
obj: {
|
|
1901
|
-
id: l.ok ?
|
|
1901
|
+
id: l.ok ? Or(i, c) : void 0,
|
|
1902
1902
|
spec: a.spec,
|
|
1903
1903
|
data: l
|
|
1904
1904
|
}
|
|
@@ -1952,7 +1952,7 @@ class Wt {
|
|
|
1952
1952
|
for (const r of this.blocks.values()) {
|
|
1953
1953
|
const o = /* @__PURE__ */ new Set(), n = (i) => {
|
|
1954
1954
|
for (const [c, a] of i.results)
|
|
1955
|
-
o.has(c) || a.spec === void 0 || (o.add(c),
|
|
1955
|
+
o.has(c) || a.spec === void 0 || (o.add(c), no(e, a.spec) && t.push({
|
|
1956
1956
|
label: r.info.label + " / " + c,
|
|
1957
1957
|
ref: Ze(r.info.id, c),
|
|
1958
1958
|
spec: a.spec
|
|
@@ -1966,7 +1966,7 @@ class Wt {
|
|
|
1966
1966
|
const o = e.accessor(t).node(), n = I(o.getKeyValueAsJson(he)), c = jt(n).traverseIds("upstream", r), a = /* @__PURE__ */ new Map();
|
|
1967
1967
|
for (const l of se(n)) {
|
|
1968
1968
|
if (!c.has(l.id)) continue;
|
|
1969
|
-
const u =
|
|
1969
|
+
const u = Fr(
|
|
1970
1970
|
o.traverse({
|
|
1971
1971
|
field: G(l.id, "prodCtx"),
|
|
1972
1972
|
ignoreError: !0,
|
|
@@ -1977,7 +1977,7 @@ class Wt {
|
|
|
1977
1977
|
field: G(l.id, "prodUiCtx"),
|
|
1978
1978
|
stableIfNotFound: !0
|
|
1979
1979
|
})
|
|
1980
|
-
), d =
|
|
1980
|
+
), d = Fr(
|
|
1981
1981
|
o.traverse({
|
|
1982
1982
|
field: G(l.id, "stagingCtx"),
|
|
1983
1983
|
ignoreError: !0,
|
|
@@ -1992,10 +1992,10 @@ class Wt {
|
|
|
1992
1992
|
return new Wt(e, a);
|
|
1993
1993
|
}
|
|
1994
1994
|
}
|
|
1995
|
-
function
|
|
1995
|
+
function Fr(s, e) {
|
|
1996
1996
|
if (e === void 0)
|
|
1997
1997
|
return s ? { locked: !1, results: /* @__PURE__ */ new Map() } : void 0;
|
|
1998
|
-
if (e.ok) return
|
|
1998
|
+
if (e.ok) return js(e.value, !1, !0);
|
|
1999
1999
|
}
|
|
2000
2000
|
function qt(s, e) {
|
|
2001
2001
|
return {
|
|
@@ -2021,7 +2021,7 @@ function qt(s, e) {
|
|
|
2021
2021
|
}
|
|
2022
2022
|
};
|
|
2023
2023
|
}
|
|
2024
|
-
function
|
|
2024
|
+
function xs(s, e) {
|
|
2025
2025
|
return {
|
|
2026
2026
|
...qt(s, e),
|
|
2027
2027
|
prod: (t) => {
|
|
@@ -2095,7 +2095,7 @@ function* Y(s, e) {
|
|
|
2095
2095
|
H(s);
|
|
2096
2096
|
}
|
|
2097
2097
|
}
|
|
2098
|
-
function
|
|
2098
|
+
function ii(s, e) {
|
|
2099
2099
|
const t = {};
|
|
2100
2100
|
for (const [r, o] of Object.entries(s)) t[r] = e(o);
|
|
2101
2101
|
return t;
|
|
@@ -2103,7 +2103,7 @@ function ai(s, e) {
|
|
|
2103
2103
|
function Be(s, e) {
|
|
2104
2104
|
return s === void 0 ? void 0 : e(s);
|
|
2105
2105
|
}
|
|
2106
|
-
function
|
|
2106
|
+
function ai(s) {
|
|
2107
2107
|
switch (s.type) {
|
|
2108
2108
|
case "GetImportProgress":
|
|
2109
2109
|
return !0;
|
|
@@ -2111,8 +2111,8 @@ function ci(s) {
|
|
|
2111
2111
|
return !1;
|
|
2112
2112
|
}
|
|
2113
2113
|
}
|
|
2114
|
-
function
|
|
2115
|
-
for (const e of Y(s)) if (
|
|
2114
|
+
function ci(s) {
|
|
2115
|
+
for (const e of Y(s)) if (ai(e)) return !0;
|
|
2116
2116
|
return !1;
|
|
2117
2117
|
}
|
|
2118
2118
|
function gt(s) {
|
|
@@ -2124,47 +2124,47 @@ function gt(s) {
|
|
|
2124
2124
|
function $(s) {
|
|
2125
2125
|
return () => gt(s);
|
|
2126
2126
|
}
|
|
2127
|
-
const
|
|
2127
|
+
const li = (s) => {
|
|
2128
2128
|
const e = {};
|
|
2129
2129
|
for (const [t, r] of Object.entries(s)) e[t] = r;
|
|
2130
2130
|
return $(e);
|
|
2131
|
-
},
|
|
2131
|
+
}, ui = (s) => {
|
|
2132
2132
|
const e = s.source;
|
|
2133
2133
|
if (e === void 0) return $(void 0);
|
|
2134
2134
|
const t = [];
|
|
2135
2135
|
for (const r of e)
|
|
2136
2136
|
r instanceof Array ? t.push(...r) : t.push(r);
|
|
2137
2137
|
return $(t);
|
|
2138
|
-
},
|
|
2138
|
+
}, di = (s) => {
|
|
2139
2139
|
const e = s.source, t = s.field;
|
|
2140
2140
|
return e === void 0 || t === void 0 ? $(void 0) : ({ cCtx: r }) => {
|
|
2141
2141
|
var o;
|
|
2142
2142
|
return gt((o = r.accessor(e).node().traverse(t)) == null ? void 0 : o.persist());
|
|
2143
2143
|
};
|
|
2144
2144
|
};
|
|
2145
|
-
function
|
|
2145
|
+
function Vs(s, e) {
|
|
2146
2146
|
const t = {}, r = s.length;
|
|
2147
2147
|
for (let o = 0; o < r; o++) t[String(o)] = e(s[o]);
|
|
2148
2148
|
return t;
|
|
2149
2149
|
}
|
|
2150
|
-
function
|
|
2150
|
+
function pi(s, e) {
|
|
2151
2151
|
return (t) => {
|
|
2152
2152
|
const r = t.source;
|
|
2153
2153
|
return r === void 0 ? $(void 0) : () => ({
|
|
2154
2154
|
type: "ScheduleSubroutine",
|
|
2155
|
-
subroutine:
|
|
2156
|
-
args:
|
|
2155
|
+
subroutine: Us(r.length),
|
|
2156
|
+
args: Vs(r, (o) => O({ ...s, [e.itVar]: o }, e.mapping))
|
|
2157
2157
|
});
|
|
2158
2158
|
};
|
|
2159
2159
|
}
|
|
2160
|
-
function
|
|
2160
|
+
function Us(s) {
|
|
2161
2161
|
return (e) => {
|
|
2162
2162
|
const t = [];
|
|
2163
2163
|
for (let r = 0; r < s; r++) t.push(e[String(r)]);
|
|
2164
2164
|
return $(t);
|
|
2165
2165
|
};
|
|
2166
2166
|
}
|
|
2167
|
-
function
|
|
2167
|
+
function fi(s, e) {
|
|
2168
2168
|
return (t) => {
|
|
2169
2169
|
const r = t.source;
|
|
2170
2170
|
if (r === void 0) return $(void 0);
|
|
@@ -2175,34 +2175,34 @@ function gi(s, e) {
|
|
|
2175
2175
|
}
|
|
2176
2176
|
return () => ({
|
|
2177
2177
|
type: "ScheduleSubroutine",
|
|
2178
|
-
subroutine:
|
|
2178
|
+
subroutine: gi,
|
|
2179
2179
|
args: o
|
|
2180
2180
|
});
|
|
2181
2181
|
};
|
|
2182
2182
|
}
|
|
2183
|
-
const
|
|
2183
|
+
const gi = (s) => $(s), hi = (s) => {
|
|
2184
2184
|
const e = s.arg;
|
|
2185
2185
|
return $(e === void 0 ? void 0 : e.length === 0);
|
|
2186
|
-
},
|
|
2186
|
+
}, mi = (s) => {
|
|
2187
2187
|
const e = s.operand;
|
|
2188
2188
|
return $(e === void 0 ? void 0 : !e);
|
|
2189
|
-
},
|
|
2189
|
+
}, vi = (s) => {
|
|
2190
2190
|
const e = s.operand1, t = s.operand2;
|
|
2191
2191
|
return $(e === void 0 || t === void 0 ? void 0 : e && t);
|
|
2192
|
-
},
|
|
2192
|
+
}, yi = (s) => {
|
|
2193
2193
|
const e = s.operand1, t = s.operand2;
|
|
2194
2194
|
return $(e === void 0 || t === void 0 ? void 0 : e || t);
|
|
2195
|
-
},
|
|
2195
|
+
}, wi = (s) => {
|
|
2196
2196
|
const e = s.source;
|
|
2197
2197
|
return e === void 0 ? $(void 0) : ({ cCtx: t }) => {
|
|
2198
2198
|
var r;
|
|
2199
2199
|
return gt((r = t.accessor(e).node()) == null ? void 0 : r.getDataAsJson());
|
|
2200
2200
|
};
|
|
2201
|
-
},
|
|
2201
|
+
}, Si = (s) => {
|
|
2202
2202
|
const e = s.source, t = s.field;
|
|
2203
2203
|
return $(e === void 0 || t === void 0 ? void 0 : e[t]);
|
|
2204
2204
|
};
|
|
2205
|
-
function
|
|
2205
|
+
function bi(s, e) {
|
|
2206
2206
|
return (t) => {
|
|
2207
2207
|
const r = t.source;
|
|
2208
2208
|
return r === void 0 ? $(void 0) : ({ cCtx: o }) => {
|
|
@@ -2217,13 +2217,13 @@ function ki(s, e) {
|
|
|
2217
2217
|
}
|
|
2218
2218
|
return {
|
|
2219
2219
|
type: "ScheduleSubroutine",
|
|
2220
|
-
subroutine:
|
|
2220
|
+
subroutine: ki,
|
|
2221
2221
|
args: i
|
|
2222
2222
|
};
|
|
2223
2223
|
};
|
|
2224
2224
|
};
|
|
2225
2225
|
}
|
|
2226
|
-
const
|
|
2226
|
+
const ki = (s) => $(s), Ri = (s) => (e) => {
|
|
2227
2227
|
const t = e.source;
|
|
2228
2228
|
return t === void 0 ? $(void 0) : ({ drivers: r }) => ({
|
|
2229
2229
|
type: "ScheduleComputable",
|
|
@@ -2237,7 +2237,7 @@ const Ri = (s) => $(s), Ci = (s) => (e) => {
|
|
|
2237
2237
|
}
|
|
2238
2238
|
)
|
|
2239
2239
|
});
|
|
2240
|
-
},
|
|
2240
|
+
}, Ci = (s) => (e) => {
|
|
2241
2241
|
const t = e.source;
|
|
2242
2242
|
return t === void 0 ? $(void 0) : ({ cCtx: r, drivers: o }) => {
|
|
2243
2243
|
const n = r.accessor(t).node().resourceInfo;
|
|
@@ -2248,7 +2248,7 @@ const Ri = (s) => $(s), Ci = (s) => (e) => {
|
|
|
2248
2248
|
})
|
|
2249
2249
|
};
|
|
2250
2250
|
};
|
|
2251
|
-
},
|
|
2251
|
+
}, Ei = (s) => (e) => {
|
|
2252
2252
|
const t = e.source;
|
|
2253
2253
|
return t === void 0 ? $(void 0) : ({ drivers: r }) => ({
|
|
2254
2254
|
type: "ScheduleComputable",
|
|
@@ -2264,49 +2264,49 @@ const Ri = (s) => $(s), Ci = (s) => (e) => {
|
|
|
2264
2264
|
}
|
|
2265
2265
|
)
|
|
2266
2266
|
});
|
|
2267
|
-
},
|
|
2267
|
+
}, Pi = (s) => {
|
|
2268
2268
|
const e = s.source;
|
|
2269
2269
|
return e === void 0 ? $(void 0) : (t) => ({
|
|
2270
2270
|
type: "ScheduleComputable",
|
|
2271
2271
|
computable: t.drivers.blobDriver.getDownloadedBlob(e)
|
|
2272
2272
|
});
|
|
2273
|
-
},
|
|
2273
|
+
}, $i = (s) => {
|
|
2274
2274
|
const e = s.source;
|
|
2275
2275
|
return e === void 0 ? $(void 0) : ({ drivers: t }) => ({
|
|
2276
2276
|
type: "ScheduleComputable",
|
|
2277
2277
|
computable: t.blobDriver.getOnDemandBlob(e)
|
|
2278
2278
|
});
|
|
2279
|
-
},
|
|
2279
|
+
}, Oi = (s) => (e) => {
|
|
2280
2280
|
const t = e.source;
|
|
2281
2281
|
return t === void 0 ? $(void 0) : ({ drivers: r }) => ({
|
|
2282
2282
|
type: "ScheduleComputable",
|
|
2283
2283
|
computable: r.blobToURLDriver.extractArchiveAndGetURL(t, s)
|
|
2284
2284
|
});
|
|
2285
|
-
},
|
|
2285
|
+
}, Fi = (s) => {
|
|
2286
2286
|
const e = s.source;
|
|
2287
2287
|
return e === void 0 ? $(void 0) : ({ drivers: t }) => ({
|
|
2288
2288
|
type: "ScheduleComputable",
|
|
2289
2289
|
computable: t.uploadDriver.getProgressId(e)
|
|
2290
2290
|
});
|
|
2291
|
-
},
|
|
2291
|
+
}, Ii = (s) => (e) => {
|
|
2292
2292
|
const t = e.source;
|
|
2293
2293
|
return t === void 0 ? $(void 0) : ({ drivers: r }) => ({
|
|
2294
2294
|
type: "ScheduleComputable",
|
|
2295
2295
|
computable: r.logDriver.getLastLogs(t, s)
|
|
2296
2296
|
});
|
|
2297
|
-
},
|
|
2297
|
+
}, Ti = (s) => (e) => {
|
|
2298
2298
|
const t = e.source;
|
|
2299
2299
|
return t === void 0 ? $(void 0) : ({ drivers: r }) => ({
|
|
2300
2300
|
type: "ScheduleComputable",
|
|
2301
2301
|
computable: r.logDriver.getProgressLog(t, s)
|
|
2302
2302
|
});
|
|
2303
|
-
},
|
|
2303
|
+
}, Ai = (s) => (e) => {
|
|
2304
2304
|
const t = e.source;
|
|
2305
2305
|
return t === void 0 ? $(void 0) : ({ drivers: r }) => ({
|
|
2306
2306
|
type: "ScheduleComputable",
|
|
2307
2307
|
computable: r.logDriver.getProgressLogWithInfo(t, s)
|
|
2308
2308
|
});
|
|
2309
|
-
},
|
|
2309
|
+
}, Li = (s) => {
|
|
2310
2310
|
const e = s.source;
|
|
2311
2311
|
return e === void 0 ? $(void 0) : ({ drivers: t }) => ({
|
|
2312
2312
|
type: "ScheduleComputable",
|
|
@@ -2322,14 +2322,14 @@ function O(s, e) {
|
|
|
2322
2322
|
case "Isolate":
|
|
2323
2323
|
return ({ drivers: t }) => ({
|
|
2324
2324
|
type: "ScheduleComputable",
|
|
2325
|
-
computable:
|
|
2325
|
+
computable: Ms(t, s, e.cfg)
|
|
2326
2326
|
});
|
|
2327
2327
|
case "Immediate":
|
|
2328
2328
|
return $(e.value);
|
|
2329
2329
|
case "GetJsonField":
|
|
2330
2330
|
return () => ({
|
|
2331
2331
|
type: "ScheduleSubroutine",
|
|
2332
|
-
subroutine:
|
|
2332
|
+
subroutine: Si,
|
|
2333
2333
|
args: {
|
|
2334
2334
|
source: O(s, e.source),
|
|
2335
2335
|
field: O(s, e.field)
|
|
@@ -2338,7 +2338,7 @@ function O(s, e) {
|
|
|
2338
2338
|
case "MapArrayValues":
|
|
2339
2339
|
return () => ({
|
|
2340
2340
|
type: "ScheduleSubroutine",
|
|
2341
|
-
subroutine:
|
|
2341
|
+
subroutine: pi(s, e),
|
|
2342
2342
|
args: {
|
|
2343
2343
|
source: O(s, e.source)
|
|
2344
2344
|
}
|
|
@@ -2346,7 +2346,7 @@ function O(s, e) {
|
|
|
2346
2346
|
case "MapRecordValues":
|
|
2347
2347
|
return () => ({
|
|
2348
2348
|
type: "ScheduleSubroutine",
|
|
2349
|
-
subroutine:
|
|
2349
|
+
subroutine: fi(s, e),
|
|
2350
2350
|
args: {
|
|
2351
2351
|
source: O(s, e.source)
|
|
2352
2352
|
}
|
|
@@ -2354,19 +2354,19 @@ function O(s, e) {
|
|
|
2354
2354
|
case "MakeObject":
|
|
2355
2355
|
return () => ({
|
|
2356
2356
|
type: "ScheduleSubroutine",
|
|
2357
|
-
subroutine:
|
|
2358
|
-
args:
|
|
2357
|
+
subroutine: li,
|
|
2358
|
+
args: ii(e.template, (t) => O(s, t))
|
|
2359
2359
|
});
|
|
2360
2360
|
case "MakeArray":
|
|
2361
2361
|
return () => ({
|
|
2362
2362
|
type: "ScheduleSubroutine",
|
|
2363
|
-
subroutine:
|
|
2364
|
-
args:
|
|
2363
|
+
subroutine: Us(e.template.length),
|
|
2364
|
+
args: Vs(e.template, (t) => O(s, t))
|
|
2365
2365
|
});
|
|
2366
2366
|
case "Flatten":
|
|
2367
2367
|
return () => ({
|
|
2368
2368
|
type: "ScheduleSubroutine",
|
|
2369
|
-
subroutine:
|
|
2369
|
+
subroutine: ui,
|
|
2370
2370
|
args: {
|
|
2371
2371
|
source: O(s, e.source)
|
|
2372
2372
|
}
|
|
@@ -2374,7 +2374,7 @@ function O(s, e) {
|
|
|
2374
2374
|
case "IsEmpty":
|
|
2375
2375
|
return () => ({
|
|
2376
2376
|
type: "ScheduleSubroutine",
|
|
2377
|
-
subroutine:
|
|
2377
|
+
subroutine: hi,
|
|
2378
2378
|
args: {
|
|
2379
2379
|
arg: O(s, e.arg)
|
|
2380
2380
|
}
|
|
@@ -2382,7 +2382,7 @@ function O(s, e) {
|
|
|
2382
2382
|
case "Not":
|
|
2383
2383
|
return () => ({
|
|
2384
2384
|
type: "ScheduleSubroutine",
|
|
2385
|
-
subroutine:
|
|
2385
|
+
subroutine: mi,
|
|
2386
2386
|
args: {
|
|
2387
2387
|
operand: O(s, e.operand)
|
|
2388
2388
|
}
|
|
@@ -2390,7 +2390,7 @@ function O(s, e) {
|
|
|
2390
2390
|
case "And":
|
|
2391
2391
|
return () => ({
|
|
2392
2392
|
type: "ScheduleSubroutine",
|
|
2393
|
-
subroutine:
|
|
2393
|
+
subroutine: vi,
|
|
2394
2394
|
args: {
|
|
2395
2395
|
operand1: O(s, e.operand1),
|
|
2396
2396
|
operand2: O(s, e.operand2)
|
|
@@ -2399,7 +2399,7 @@ function O(s, e) {
|
|
|
2399
2399
|
case "Or":
|
|
2400
2400
|
return () => ({
|
|
2401
2401
|
type: "ScheduleSubroutine",
|
|
2402
|
-
subroutine:
|
|
2402
|
+
subroutine: yi,
|
|
2403
2403
|
args: {
|
|
2404
2404
|
operand1: O(s, e.operand1),
|
|
2405
2405
|
operand2: O(s, e.operand2)
|
|
@@ -2408,7 +2408,7 @@ function O(s, e) {
|
|
|
2408
2408
|
case "MapResourceFields":
|
|
2409
2409
|
return () => ({
|
|
2410
2410
|
type: "ScheduleSubroutine",
|
|
2411
|
-
subroutine:
|
|
2411
|
+
subroutine: bi(s, e),
|
|
2412
2412
|
args: {
|
|
2413
2413
|
source: O(s, e.source)
|
|
2414
2414
|
}
|
|
@@ -2416,7 +2416,7 @@ function O(s, e) {
|
|
|
2416
2416
|
case "GetResourceField":
|
|
2417
2417
|
return () => ({
|
|
2418
2418
|
type: "ScheduleSubroutine",
|
|
2419
|
-
subroutine:
|
|
2419
|
+
subroutine: di,
|
|
2420
2420
|
args: {
|
|
2421
2421
|
source: O(s, e.source),
|
|
2422
2422
|
field: O(s, e.field)
|
|
@@ -2425,7 +2425,7 @@ function O(s, e) {
|
|
|
2425
2425
|
case "GetResourceValueAsJson":
|
|
2426
2426
|
return () => ({
|
|
2427
2427
|
type: "ScheduleSubroutine",
|
|
2428
|
-
subroutine:
|
|
2428
|
+
subroutine: wi,
|
|
2429
2429
|
args: {
|
|
2430
2430
|
source: O(s, e.source)
|
|
2431
2431
|
}
|
|
@@ -2433,7 +2433,7 @@ function O(s, e) {
|
|
|
2433
2433
|
case "GetBlobContent":
|
|
2434
2434
|
return () => ({
|
|
2435
2435
|
type: "ScheduleSubroutine",
|
|
2436
|
-
subroutine:
|
|
2436
|
+
subroutine: Ri(e.range),
|
|
2437
2437
|
args: {
|
|
2438
2438
|
source: O(s, e.source)
|
|
2439
2439
|
}
|
|
@@ -2441,7 +2441,7 @@ function O(s, e) {
|
|
|
2441
2441
|
case "GetBlobContentAsString":
|
|
2442
2442
|
return () => ({
|
|
2443
2443
|
type: "ScheduleSubroutine",
|
|
2444
|
-
subroutine:
|
|
2444
|
+
subroutine: Ci(e.range),
|
|
2445
2445
|
args: {
|
|
2446
2446
|
source: O(s, e.source)
|
|
2447
2447
|
}
|
|
@@ -2449,7 +2449,7 @@ function O(s, e) {
|
|
|
2449
2449
|
case "GetBlobContentAsJson":
|
|
2450
2450
|
return () => ({
|
|
2451
2451
|
type: "ScheduleSubroutine",
|
|
2452
|
-
subroutine:
|
|
2452
|
+
subroutine: Ei(e.range),
|
|
2453
2453
|
args: {
|
|
2454
2454
|
source: O(s, e.source)
|
|
2455
2455
|
}
|
|
@@ -2457,7 +2457,7 @@ function O(s, e) {
|
|
|
2457
2457
|
case "GetDownloadedBlobContent":
|
|
2458
2458
|
return () => ({
|
|
2459
2459
|
type: "ScheduleSubroutine",
|
|
2460
|
-
subroutine:
|
|
2460
|
+
subroutine: Pi,
|
|
2461
2461
|
args: {
|
|
2462
2462
|
source: O(s, e.source)
|
|
2463
2463
|
}
|
|
@@ -2465,7 +2465,7 @@ function O(s, e) {
|
|
|
2465
2465
|
case "GetOnDemandBlobContent":
|
|
2466
2466
|
return () => ({
|
|
2467
2467
|
type: "ScheduleSubroutine",
|
|
2468
|
-
subroutine:
|
|
2468
|
+
subroutine: $i,
|
|
2469
2469
|
args: {
|
|
2470
2470
|
source: O(s, e.source)
|
|
2471
2471
|
}
|
|
@@ -2473,7 +2473,7 @@ function O(s, e) {
|
|
|
2473
2473
|
case "ExtractArchiveAndGetURL":
|
|
2474
2474
|
return () => ({
|
|
2475
2475
|
type: "ScheduleSubroutine",
|
|
2476
|
-
subroutine:
|
|
2476
|
+
subroutine: Oi(e.format),
|
|
2477
2477
|
args: {
|
|
2478
2478
|
source: O(s, e.source)
|
|
2479
2479
|
}
|
|
@@ -2481,7 +2481,7 @@ function O(s, e) {
|
|
|
2481
2481
|
case "GetImportProgress":
|
|
2482
2482
|
return () => ({
|
|
2483
2483
|
type: "ScheduleSubroutine",
|
|
2484
|
-
subroutine:
|
|
2484
|
+
subroutine: Fi,
|
|
2485
2485
|
args: {
|
|
2486
2486
|
source: O(s, e.source)
|
|
2487
2487
|
}
|
|
@@ -2489,7 +2489,7 @@ function O(s, e) {
|
|
|
2489
2489
|
case "GetLastLogs":
|
|
2490
2490
|
return () => ({
|
|
2491
2491
|
type: "ScheduleSubroutine",
|
|
2492
|
-
subroutine:
|
|
2492
|
+
subroutine: Ii(e.lines),
|
|
2493
2493
|
args: {
|
|
2494
2494
|
source: O(s, e.source)
|
|
2495
2495
|
}
|
|
@@ -2497,7 +2497,7 @@ function O(s, e) {
|
|
|
2497
2497
|
case "GetProgressLog":
|
|
2498
2498
|
return () => ({
|
|
2499
2499
|
type: "ScheduleSubroutine",
|
|
2500
|
-
subroutine:
|
|
2500
|
+
subroutine: Ti(e.patternToSearch),
|
|
2501
2501
|
args: {
|
|
2502
2502
|
source: O(s, e.source)
|
|
2503
2503
|
}
|
|
@@ -2505,7 +2505,7 @@ function O(s, e) {
|
|
|
2505
2505
|
case "GetProgressLogWithInfo":
|
|
2506
2506
|
return () => ({
|
|
2507
2507
|
type: "ScheduleSubroutine",
|
|
2508
|
-
subroutine:
|
|
2508
|
+
subroutine: Ai(e.patternToSearch),
|
|
2509
2509
|
args: {
|
|
2510
2510
|
source: O(s, e.source)
|
|
2511
2511
|
}
|
|
@@ -2513,7 +2513,7 @@ function O(s, e) {
|
|
|
2513
2513
|
case "GetLogHandle":
|
|
2514
2514
|
return () => ({
|
|
2515
2515
|
type: "ScheduleSubroutine",
|
|
2516
|
-
subroutine:
|
|
2516
|
+
subroutine: Li,
|
|
2517
2517
|
args: {
|
|
2518
2518
|
source: O(s, e.source)
|
|
2519
2519
|
}
|
|
@@ -2522,8 +2522,8 @@ function O(s, e) {
|
|
|
2522
2522
|
return H(e);
|
|
2523
2523
|
}
|
|
2524
2524
|
}
|
|
2525
|
-
const
|
|
2526
|
-
function
|
|
2525
|
+
const Di = ["$prod", "$staging"];
|
|
2526
|
+
function Ni(s) {
|
|
2527
2527
|
return {
|
|
2528
2528
|
$blockId: s.blockId,
|
|
2529
2529
|
$args: (e) => JSON.parse(s.args(e)),
|
|
@@ -2535,16 +2535,16 @@ function Bi(s) {
|
|
|
2535
2535
|
$staging: s.staging
|
|
2536
2536
|
};
|
|
2537
2537
|
}
|
|
2538
|
-
const
|
|
2539
|
-
function
|
|
2540
|
-
return s.op ==
|
|
2538
|
+
const Js = Symbol(), Gs = "return", Bi = { op: Js, arg: Gs };
|
|
2539
|
+
function ji(s) {
|
|
2540
|
+
return s.op == Js && s.arg == Gs;
|
|
2541
2541
|
}
|
|
2542
|
-
function
|
|
2542
|
+
function xi() {
|
|
2543
2543
|
return { pendingSubroutines: /* @__PURE__ */ new Map() };
|
|
2544
2544
|
}
|
|
2545
|
-
function
|
|
2546
|
-
const o = new
|
|
2547
|
-
if (
|
|
2545
|
+
function Ir(s, e, t, r) {
|
|
2546
|
+
const o = new ps(t), n = (c, a) => {
|
|
2547
|
+
if (ji(c))
|
|
2548
2548
|
return e.result = a, !1;
|
|
2549
2549
|
const l = I(e.pendingSubroutines.get(c.op));
|
|
2550
2550
|
if (c.arg in l.args) throw new Error("argument already set");
|
|
@@ -2596,26 +2596,26 @@ function Tr(s, e, t, r) {
|
|
|
2596
2596
|
}
|
|
2597
2597
|
return i;
|
|
2598
2598
|
}
|
|
2599
|
-
function
|
|
2600
|
-
return
|
|
2599
|
+
function Vi(s, e, t, r = {}) {
|
|
2600
|
+
return Ms(s, Ni(e), t, r);
|
|
2601
2601
|
}
|
|
2602
|
-
function
|
|
2602
|
+
function Ms(s, e, t, r = {}) {
|
|
2603
2603
|
const o = `${e.blockId}#` + B({
|
|
2604
2604
|
ctx: Object.fromEntries(
|
|
2605
|
-
Object.entries(e).filter(([n]) =>
|
|
2605
|
+
Object.entries(e).filter(([n]) => Di.indexOf(n) === -1)
|
|
2606
2606
|
),
|
|
2607
2607
|
cfg: t
|
|
2608
2608
|
});
|
|
2609
2609
|
return M.makeRaw(
|
|
2610
2610
|
(n) => {
|
|
2611
|
-
const i = { drivers: s, cCtx: n }, c =
|
|
2611
|
+
const i = { drivers: s, cCtx: n }, c = xi();
|
|
2612
2612
|
return {
|
|
2613
|
-
ir:
|
|
2613
|
+
ir: Ir(
|
|
2614
2614
|
i,
|
|
2615
2615
|
c,
|
|
2616
2616
|
[
|
|
2617
2617
|
{
|
|
2618
|
-
destination:
|
|
2618
|
+
destination: Bi,
|
|
2619
2619
|
operation: O(e, t)
|
|
2620
2620
|
}
|
|
2621
2621
|
],
|
|
@@ -2623,21 +2623,21 @@ function _s(s, e, t, r = {}) {
|
|
|
2623
2623
|
),
|
|
2624
2624
|
postprocessValue(l) {
|
|
2625
2625
|
const u = [];
|
|
2626
|
-
for (const
|
|
2627
|
-
u.push({ destination:
|
|
2626
|
+
for (const k of l)
|
|
2627
|
+
u.push({ destination: k.destination, operation: $(k.computable) });
|
|
2628
2628
|
const d = {
|
|
2629
2629
|
drivers: s,
|
|
2630
2630
|
get cCtx() {
|
|
2631
2631
|
throw new Error("asynchronous operations are forbidden in this context");
|
|
2632
2632
|
}
|
|
2633
2633
|
}, p = /* @__PURE__ */ new Map();
|
|
2634
|
-
for (const [
|
|
2635
|
-
p.set(
|
|
2634
|
+
for (const [k, m] of c.pendingSubroutines)
|
|
2635
|
+
p.set(k, { ...m, args: { ...m.args } });
|
|
2636
2636
|
const f = {
|
|
2637
2637
|
result: c.result,
|
|
2638
2638
|
pendingSubroutines: p
|
|
2639
2639
|
};
|
|
2640
|
-
if (
|
|
2640
|
+
if (Ir(d, f, u, !1), !("result" in f))
|
|
2641
2641
|
throw new Error("illegal cfg rendering stack state, no result");
|
|
2642
2642
|
return f.result;
|
|
2643
2643
|
}
|
|
@@ -2646,10 +2646,10 @@ function _s(s, e, t, r = {}) {
|
|
|
2646
2646
|
{ ...r, key: o }
|
|
2647
2647
|
);
|
|
2648
2648
|
}
|
|
2649
|
-
function
|
|
2649
|
+
function Tr(s) {
|
|
2650
2650
|
return s !== void 0 ? Buffer.from(s).toString("base64") : void 0;
|
|
2651
2651
|
}
|
|
2652
|
-
class
|
|
2652
|
+
class Ui {
|
|
2653
2653
|
constructor(e, t, r, o) {
|
|
2654
2654
|
S(this, "computablesToResolve", {});
|
|
2655
2655
|
S(this, "computableCtx");
|
|
@@ -2716,13 +2716,13 @@ class Ji {
|
|
|
2716
2716
|
return this.getAccessor(e).listDynamicFields();
|
|
2717
2717
|
}
|
|
2718
2718
|
getKeyValueBase64(e, t) {
|
|
2719
|
-
return
|
|
2719
|
+
return Tr(this.getAccessor(e).getKeyValue(t));
|
|
2720
2720
|
}
|
|
2721
2721
|
getKeyValueAsString(e, t) {
|
|
2722
2722
|
return this.getAccessor(e).getKeyValueAsString(t);
|
|
2723
2723
|
}
|
|
2724
2724
|
getDataBase64(e) {
|
|
2725
|
-
return
|
|
2725
|
+
return Tr(this.getAccessor(e).getData());
|
|
2726
2726
|
}
|
|
2727
2727
|
getDataAsString(e) {
|
|
2728
2728
|
return this.getAccessor(e).getDataAsString();
|
|
@@ -2733,7 +2733,7 @@ class Ji {
|
|
|
2733
2733
|
parsePObjectCollection(e, t, r, ...o) {
|
|
2734
2734
|
const n = this.getAccessor(e);
|
|
2735
2735
|
if (!n.getIsReadyOrError()) return;
|
|
2736
|
-
const i =
|
|
2736
|
+
const i = ni(n, t, r, o), c = {};
|
|
2737
2737
|
for (const [a, l] of Object.entries(i))
|
|
2738
2738
|
c[a] = pe(l, (u) => this.wrapAccessor(u));
|
|
2739
2739
|
return c;
|
|
@@ -2881,7 +2881,7 @@ class Ji {
|
|
|
2881
2881
|
obj: {
|
|
2882
2882
|
id: t.obj.id,
|
|
2883
2883
|
spec: t.obj.spec,
|
|
2884
|
-
data:
|
|
2884
|
+
data: rs(t.obj.data, (r) => this.wrapAccessor(r))
|
|
2885
2885
|
}
|
|
2886
2886
|
}))
|
|
2887
2887
|
};
|
|
@@ -2932,7 +2932,7 @@ class Ji {
|
|
|
2932
2932
|
* - Passes through other values
|
|
2933
2933
|
*/
|
|
2934
2934
|
transformInputPData(e) {
|
|
2935
|
-
return typeof e == "string" ? this.getAccessor(e) :
|
|
2935
|
+
return typeof e == "string" ? this.getAccessor(e) : ss(e) ? os(e, (t) => this.getAccessor(t)) : e;
|
|
2936
2936
|
}
|
|
2937
2937
|
//
|
|
2938
2938
|
// Computable
|
|
@@ -2965,8 +2965,8 @@ class Ji {
|
|
|
2965
2965
|
try {
|
|
2966
2966
|
return u(...p);
|
|
2967
2967
|
} catch (f) {
|
|
2968
|
-
const
|
|
2969
|
-
throw r.newError(
|
|
2968
|
+
const k = t.errorRepo.setAndRecreateForQuickJS(f);
|
|
2969
|
+
throw r.newError(k);
|
|
2970
2970
|
}
|
|
2971
2971
|
};
|
|
2972
2972
|
r.newFunction(l, d).consume((p) => r.setProp(e, l, p)), r.newFunction(l, u).consume((p) => r.setProp(e, l + "__internal__", p));
|
|
@@ -3000,19 +3000,13 @@ class Ji {
|
|
|
3000
3000
|
),
|
|
3001
3001
|
void 0
|
|
3002
3002
|
)
|
|
3003
|
-
), a("getBlobContentAsBase64", (l, u) =>
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
const d = r.getNumber(r.getProp(u, "from")), p = isNaN(d) ? void 0 : d, f = r.getNumber(r.getProp(u, "to")), b = isNaN(f) ? void 0 : f;
|
|
3011
|
-
return t.exportSingleValue(
|
|
3012
|
-
this.getBlobContentAsString(r.getString(l), lr(p, b)),
|
|
3013
|
-
void 0
|
|
3014
|
-
);
|
|
3015
|
-
}), a("getDownloadedBlobContentHandle", (l) => t.exportSingleValue(
|
|
3003
|
+
), a("getBlobContentAsBase64", (l, u) => t.exportSingleValue(
|
|
3004
|
+
this.getBlobContentAsBase64(r.getString(l), t.importObjectUniversal(u)),
|
|
3005
|
+
void 0
|
|
3006
|
+
)), a("getBlobContentAsString", (l, u) => t.exportSingleValue(
|
|
3007
|
+
this.getBlobContentAsString(r.getString(l), t.importObjectUniversal(u)),
|
|
3008
|
+
void 0
|
|
3009
|
+
)), a("getDownloadedBlobContentHandle", (l) => t.exportSingleValue(
|
|
3016
3010
|
this.getDownloadedBlobContentHandle(r.getString(l)),
|
|
3017
3011
|
void 0
|
|
3018
3012
|
)), a("getOnDemandBlobContentHandle", (l) => t.exportSingleValue(
|
|
@@ -3057,7 +3051,7 @@ class Ji {
|
|
|
3057
3051
|
});
|
|
3058
3052
|
}
|
|
3059
3053
|
}
|
|
3060
|
-
function
|
|
3054
|
+
function Ji(s) {
|
|
3061
3055
|
return s instanceof ArrayBuffer || ArrayBuffer.isView(s);
|
|
3062
3056
|
}
|
|
3063
3057
|
class _e {
|
|
@@ -3065,7 +3059,7 @@ class _e {
|
|
|
3065
3059
|
S(this, "callbackRegistry");
|
|
3066
3060
|
S(this, "fnJSONStringify");
|
|
3067
3061
|
S(this, "fnJSONParse");
|
|
3068
|
-
S(this, "errorRepo", new
|
|
3062
|
+
S(this, "errorRepo", new Gi());
|
|
3069
3063
|
S(this, "computableHelper");
|
|
3070
3064
|
if (this.scope = e, this.vm = t, this.deadlineSetter = r, this.callbackRegistry = this.scope.manage(this.vm.newObject()), this.fnJSONStringify = e.manage(
|
|
3071
3065
|
t.getProp(t.global, "JSON").consume((n) => t.getProp(n, "stringify"))
|
|
@@ -3074,7 +3068,7 @@ class _e {
|
|
|
3074
3068
|
if (this.fnJSONParse = e.manage(
|
|
3075
3069
|
t.getProp(t.global, "JSON").consume((n) => t.getProp(n, "parse"))
|
|
3076
3070
|
), t.typeof(this.fnJSONParse) !== "function") throw new Error("JSON.parse() not found.");
|
|
3077
|
-
o !== void 0 && (this.computableHelper = new
|
|
3071
|
+
o !== void 0 && (this.computableHelper = new Ui(this, o.blockCtx, o.mlEnv, o.computableCtx)), this.injectCtx();
|
|
3078
3072
|
}
|
|
3079
3073
|
resetComputableCtx() {
|
|
3080
3074
|
I(this.computableHelper, "Computable context helper is not initialized").resetComputableCtx();
|
|
@@ -3082,6 +3076,15 @@ class _e {
|
|
|
3082
3076
|
static cleanErrorContext(e) {
|
|
3083
3077
|
typeof e == "object" && e !== null && "context" in e && delete e.context;
|
|
3084
3078
|
}
|
|
3079
|
+
// private static cleanError(error: unknown): unknown {
|
|
3080
|
+
// if (error instanceof errors.QuickJSUnwrapError) {
|
|
3081
|
+
// const { cause, context: _, name, message, stack, ...rest } = error;
|
|
3082
|
+
// const clean = new errors.QuickJSUnwrapError(cause);
|
|
3083
|
+
// Object.assign(clean, { ...rest, name, message, stack });
|
|
3084
|
+
// return clean;
|
|
3085
|
+
// }
|
|
3086
|
+
// return error;
|
|
3087
|
+
// }
|
|
3085
3088
|
evaluateBundle(e) {
|
|
3086
3089
|
try {
|
|
3087
3090
|
this.deadlineSetter({ currentExecutionTarget: "evaluateBundle", deadline: Date.now() + 1e4 }), this.vm.unwrapResult(this.vm.evalCode(e, "bundle.js", { type: "global" })).dispose();
|
|
@@ -3142,7 +3145,7 @@ class _e {
|
|
|
3142
3145
|
r = this.vm.null;
|
|
3143
3146
|
break;
|
|
3144
3147
|
}
|
|
3145
|
-
if (
|
|
3148
|
+
if (Ji(e)) {
|
|
3146
3149
|
r = this.vm.newArrayBuffer(e), o = !0;
|
|
3147
3150
|
break;
|
|
3148
3151
|
}
|
|
@@ -3161,16 +3164,17 @@ class _e {
|
|
|
3161
3164
|
return t !== void 0 ? t.manage(r) : r;
|
|
3162
3165
|
}
|
|
3163
3166
|
importObjectUniversal(e) {
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3167
|
+
if (e !== void 0)
|
|
3168
|
+
switch (this.vm.typeof(e)) {
|
|
3169
|
+
case "undefined":
|
|
3170
|
+
return;
|
|
3171
|
+
case "boolean":
|
|
3172
|
+
case "number":
|
|
3173
|
+
case "string":
|
|
3174
|
+
return this.vm.dump(e);
|
|
3175
|
+
default:
|
|
3176
|
+
return this.importObjectViaJson(e);
|
|
3177
|
+
}
|
|
3174
3178
|
}
|
|
3175
3179
|
importObjectViaJson(e) {
|
|
3176
3180
|
const t = this.vm.unwrapResult(this.vm.callFunction(this.fnJSONStringify, this.vm.undefined, e)).consume((r) => this.vm.getString(r));
|
|
@@ -3183,12 +3187,12 @@ class _e {
|
|
|
3183
3187
|
this.vm.setProp(t, "callbackRegistry", this.callbackRegistry), this.vm.setProp(
|
|
3184
3188
|
t,
|
|
3185
3189
|
"featureFlags",
|
|
3186
|
-
this.exportObjectUniversal(
|
|
3190
|
+
this.exportObjectUniversal(io.GlobalCfgRenderCtxFeatureFlags, e)
|
|
3187
3191
|
), this.computableHelper !== void 0 && this.computableHelper.injectCtx(t), this.vm.setProp(this.vm.global, "cfgRenderCtx", t);
|
|
3188
3192
|
});
|
|
3189
3193
|
}
|
|
3190
3194
|
}
|
|
3191
|
-
class
|
|
3195
|
+
class Gi {
|
|
3192
3196
|
constructor() {
|
|
3193
3197
|
S(this, "errorIdToError", /* @__PURE__ */ new Map());
|
|
3194
3198
|
}
|
|
@@ -3205,7 +3209,7 @@ class Mi {
|
|
|
3205
3209
|
}
|
|
3206
3210
|
/** Returns the original error that was stored by parsing uuid of mimicrated error. */
|
|
3207
3211
|
getOriginal(e) {
|
|
3208
|
-
if (!(e instanceof
|
|
3212
|
+
if (!(e instanceof jo.QuickJSUnwrapError))
|
|
3209
3213
|
return console.warn("ErrorRepo: quickJSError is not a QuickJSUnwrapError", ze(e)), e;
|
|
3210
3214
|
if (!("name" in e.cause))
|
|
3211
3215
|
return console.warn("ErrorRepo: quickJSError.cause is not an Error", ze(e)), e;
|
|
@@ -3215,7 +3219,7 @@ class Mi {
|
|
|
3215
3219
|
const o = this.errorIdToError.get(r);
|
|
3216
3220
|
if (o === void 0)
|
|
3217
3221
|
throw new Error(`ErrorRepo: errorId not found: ${r}, ${ze(e)}`);
|
|
3218
|
-
return new
|
|
3222
|
+
return new Vo(e, o);
|
|
3219
3223
|
}
|
|
3220
3224
|
}
|
|
3221
3225
|
function Ke(s, e) {
|
|
@@ -3235,7 +3239,7 @@ function Ke(s, e) {
|
|
|
3235
3239
|
);
|
|
3236
3240
|
}
|
|
3237
3241
|
const tt = process.env.MI_LOG_OUTPUT_STATUS;
|
|
3238
|
-
function
|
|
3242
|
+
function Mi(s, e, t, r, o, n = {}) {
|
|
3239
3243
|
const i = `${e.blockId}#lambda#${o}#${t.handle}`;
|
|
3240
3244
|
return n = { ...n, key: i }, n.mode === void 0 && t.retentive === !0 && (n.mode = "StableOnlyRetentive"), M.makeRaw((c) => {
|
|
3241
3245
|
const a = new Je();
|
|
@@ -3255,20 +3259,20 @@ function _i(s, e, t, r, o, n = {}) {
|
|
|
3255
3259
|
p.evaluateBundle(r.content);
|
|
3256
3260
|
const f = p.runCallback(t.handle);
|
|
3257
3261
|
p.resetComputableCtx();
|
|
3258
|
-
let
|
|
3262
|
+
let k = 0;
|
|
3259
3263
|
return tt && tt !== "unstable-only" && console.log(`Output ${t.handle} scaffold calculated.`), {
|
|
3260
3264
|
ir: p.computableHelper.computablesToResolve,
|
|
3261
3265
|
postprocessValue: (m, { unstableMarker: P, stable: A }) => {
|
|
3262
3266
|
for (const [T, W] of Object.entries(m)) p.runCallback(T, W);
|
|
3263
3267
|
const j = p.importObjectUniversal(f);
|
|
3264
|
-
return
|
|
3265
|
-
A ? `Stable output ${t.handle} calculated ${j !== void 0 ? "defined" : "undefined"}; (#${
|
|
3268
|
+
return k++, tt && (tt !== "unstable-only" || !A) && console.log(
|
|
3269
|
+
A ? `Stable output ${t.handle} calculated ${j !== void 0 ? "defined" : "undefined"}; (#${k})` : `Unstable output ${t.handle}; marker = ${P}; ${j !== void 0 ? "defined" : "undefined"} (#${k})`
|
|
3266
3270
|
), j;
|
|
3267
3271
|
}
|
|
3268
3272
|
};
|
|
3269
3273
|
}, n);
|
|
3270
3274
|
}
|
|
3271
|
-
function
|
|
3275
|
+
function _i(s, e, t, ...r) {
|
|
3272
3276
|
const o = new Je();
|
|
3273
3277
|
try {
|
|
3274
3278
|
const n = o.manage(s.newRuntime());
|
|
@@ -3287,25 +3291,25 @@ function Ki(s, e, t, ...r) {
|
|
|
3287
3291
|
o.dispose();
|
|
3288
3292
|
}
|
|
3289
3293
|
}
|
|
3290
|
-
function
|
|
3291
|
-
return
|
|
3294
|
+
function Ki(s) {
|
|
3295
|
+
return ns(s) ? s.isActive === !0 : ci(s);
|
|
3292
3296
|
}
|
|
3293
3297
|
function je(s, e, t, r, o, n = {}) {
|
|
3294
|
-
if (
|
|
3298
|
+
if (ns(t)) {
|
|
3295
3299
|
if (r === void 0) throw new Error("No code bundle.");
|
|
3296
|
-
return
|
|
3297
|
-
} else return
|
|
3300
|
+
return Mi(s, e, t, r, o, n);
|
|
3301
|
+
} else return Vi(s.driverKit, e, t, n);
|
|
3298
3302
|
}
|
|
3299
|
-
function
|
|
3303
|
+
function Hi(s, e) {
|
|
3300
3304
|
if (s === e) return !0;
|
|
3301
3305
|
if (s === void 0 || e === void 0) return !1;
|
|
3302
|
-
const t =
|
|
3303
|
-
return
|
|
3306
|
+
const t = hr.omitBy((r, o) => o.startsWith("__"));
|
|
3307
|
+
return hr.isDeepEqual(t(s), t(e));
|
|
3304
3308
|
}
|
|
3305
|
-
function
|
|
3309
|
+
function Wi(s, e, t) {
|
|
3306
3310
|
return M.make(
|
|
3307
3311
|
(r) => {
|
|
3308
|
-
var
|
|
3312
|
+
var k, m, P, A, j, T, W, ve;
|
|
3309
3313
|
const o = r.accessor(s).node(), n = I(o.getKeyValueAsJson(Kt)), i = I(o.getKeyValueAsJson(Ge)), c = I(o.getKeyValueAsJson(Me)), a = I(o.getKeyValueAsJson(he)), l = I(
|
|
3310
3314
|
o.getKeyValueAsJson(dt)
|
|
3311
3315
|
), u = /* @__PURE__ */ new Map();
|
|
@@ -3333,8 +3337,8 @@ function qi(s, e, t) {
|
|
|
3333
3337
|
});
|
|
3334
3338
|
_ = {
|
|
3335
3339
|
arguments: te,
|
|
3336
|
-
stale: !
|
|
3337
|
-
outputError: J.error !== void 0 || q.error !== void 0 || ((
|
|
3340
|
+
stale: !Hi(Z, te),
|
|
3341
|
+
outputError: J.error !== void 0 || q.error !== void 0 || ((k = J.value) == null ? void 0 : k.getError()) !== void 0 || ((m = q.value) == null ? void 0 : m.getError()) !== void 0,
|
|
3338
3342
|
outputsError: ((P = J.error) == null ? void 0 : P.getDataAsString()) ?? ((j = (A = J.value) == null ? void 0 : A.getError()) == null ? void 0 : j.getDataAsString()),
|
|
3339
3343
|
exportsError: ((T = q.error) == null ? void 0 : T.getDataAsString()) ?? ((ve = (W = q.value) == null ? void 0 : W.getError()) == null ? void 0 : ve.getDataAsString()),
|
|
3340
3344
|
finished: (J.value !== void 0 && J.value.getIsReadyOrError() || J.error !== void 0 && J.error.getIsReadyOrError()) && (q.value !== void 0 && q.value.getIsReadyOrError() || q.error !== void 0 && q.error.getIsReadyOrError())
|
|
@@ -3349,7 +3353,7 @@ function qi(s, e, t) {
|
|
|
3349
3353
|
enrichmentTargets: t.projectHelper.getEnrichmentTargets(() => X.cfg, () => _, { argsRid: Z.argsRid, blockPackRid: X.bpResourceId })
|
|
3350
3354
|
};
|
|
3351
3355
|
}), p = new Set(l.blocksInLimbo), f = [...se(a)].map(({ id: N, label: X, renderingMode: Z }) => {
|
|
3352
|
-
var v,
|
|
3356
|
+
var v, b, E, C, L;
|
|
3353
3357
|
const _ = I(u.get(N)), ee = I(d.nodes.get(N));
|
|
3354
3358
|
let te = "NotCalculated";
|
|
3355
3359
|
_.prod !== void 0 && (p.has(N) ? te = "Limbo" : te = _.prod.finished ? "Done" : "Running");
|
|
@@ -3374,7 +3378,7 @@ function qi(s, e, t) {
|
|
|
3374
3378
|
D.code,
|
|
3375
3379
|
V
|
|
3376
3380
|
).wrap({
|
|
3377
|
-
recover: (
|
|
3381
|
+
recover: (ro) => (t.logger.error("Error in block model title"), t.logger.error(ro), "Invalid title")
|
|
3378
3382
|
})
|
|
3379
3383
|
),
|
|
3380
3384
|
inputsValid: je(
|
|
@@ -3407,7 +3411,7 @@ function qi(s, e, t) {
|
|
|
3407
3411
|
upstreams: [...d.traverseIdsExcludingRoots("upstream", N)],
|
|
3408
3412
|
downstreams: [...d.traverseIdsExcludingRoots("downstream", N)],
|
|
3409
3413
|
calculationStatus: te,
|
|
3410
|
-
outputErrors: ((
|
|
3414
|
+
outputErrors: ((b = _.prod) == null ? void 0 : b.outputError) === !0,
|
|
3411
3415
|
outputsError: (E = _.prod) == null ? void 0 : E.outputsError,
|
|
3412
3416
|
exportsError: (C = _.prod) == null ? void 0 : C.exportsError,
|
|
3413
3417
|
settings: g,
|
|
@@ -3450,13 +3454,13 @@ function qi(s, e, t) {
|
|
|
3450
3454
|
}
|
|
3451
3455
|
).withStableType();
|
|
3452
3456
|
}
|
|
3453
|
-
function
|
|
3457
|
+
function qi(s, e) {
|
|
3454
3458
|
const t = s.node();
|
|
3455
|
-
if (le(t.resourceType,
|
|
3459
|
+
if (le(t.resourceType, Ts)) {
|
|
3456
3460
|
const r = t.getDataAsJson();
|
|
3457
3461
|
if (r === void 0) throw new Error("No resource data.");
|
|
3458
3462
|
return e.frontendDownloadDriver.getPath(new URL(r.url)).withStableType();
|
|
3459
|
-
} else if (le(t.resourceType,
|
|
3463
|
+
} else if (le(t.resourceType, As)) {
|
|
3460
3464
|
const r = t.getDataAsJson();
|
|
3461
3465
|
if (r === void 0) throw new Error("No resource data.");
|
|
3462
3466
|
return e.signer.verify(
|
|
@@ -3467,10 +3471,10 @@ function zi(s, e) {
|
|
|
3467
3471
|
} else
|
|
3468
3472
|
throw new Error(`Unsupported resource type: ${JSON.stringify(t.resourceType)}`);
|
|
3469
3473
|
}
|
|
3470
|
-
function
|
|
3474
|
+
function zi(s, e) {
|
|
3471
3475
|
if (s !== void 0)
|
|
3472
3476
|
return M.make(
|
|
3473
|
-
(t) =>
|
|
3477
|
+
(t) => qi(t.accessor(s), e),
|
|
3474
3478
|
{
|
|
3475
3479
|
postprocessValue: (t) => {
|
|
3476
3480
|
if (t !== void 0) {
|
|
@@ -3482,7 +3486,7 @@ function Xi(s, e) {
|
|
|
3482
3486
|
}
|
|
3483
3487
|
).withStableType();
|
|
3484
3488
|
}
|
|
3485
|
-
function
|
|
3489
|
+
function Xi(s, e, t) {
|
|
3486
3490
|
return M.make(
|
|
3487
3491
|
(r) => {
|
|
3488
3492
|
var c;
|
|
@@ -3492,34 +3496,34 @@ function Yi(s, e, t) {
|
|
|
3492
3496
|
assertFieldType: "Dynamic"
|
|
3493
3497
|
},
|
|
3494
3498
|
{ field: F.HolderRefField, assertFieldType: "Input", errorIfFieldNotFound: !0 },
|
|
3495
|
-
{ field:
|
|
3499
|
+
{ field: Ds, assertFieldType: "Input" }
|
|
3496
3500
|
)) == null ? void 0 : c.persist();
|
|
3497
3501
|
return {
|
|
3498
|
-
path:
|
|
3502
|
+
path: zi(i, t),
|
|
3499
3503
|
sdkVersion: n == null ? void 0 : n.cfg.sdkVersion
|
|
3500
3504
|
};
|
|
3501
3505
|
},
|
|
3502
3506
|
{ mode: "StableOnlyLive" }
|
|
3503
3507
|
);
|
|
3504
3508
|
}
|
|
3505
|
-
function
|
|
3509
|
+
function _s(s, e, t) {
|
|
3506
3510
|
if (t === void 0)
|
|
3507
|
-
return M.make((i) =>
|
|
3511
|
+
return M.make((i) => _s(s, e, i), {
|
|
3508
3512
|
key: `inputs#${ke(s.rid)}#${e}`
|
|
3509
3513
|
});
|
|
3510
3514
|
const r = t.accessor(s).node(), o = qt(s, e), n = o.uiState(t);
|
|
3511
3515
|
return {
|
|
3512
3516
|
author: r.getKeyValueAsJson(Lt(e)),
|
|
3513
3517
|
// @TODO add deserialization caching
|
|
3514
|
-
args:
|
|
3518
|
+
args: dr(JSON.parse(o.args(t))),
|
|
3515
3519
|
// @TODO add deserialization caching
|
|
3516
|
-
ui: n !== void 0 ?
|
|
3520
|
+
ui: n !== void 0 ? dr(JSON.parse(n)) : void 0
|
|
3517
3521
|
};
|
|
3518
3522
|
}
|
|
3519
|
-
function
|
|
3523
|
+
function Yi(s, e, t) {
|
|
3520
3524
|
return M.make(
|
|
3521
3525
|
(r) => {
|
|
3522
|
-
const o = r.accessor(s).node(), n =
|
|
3526
|
+
const o = r.accessor(s).node(), n = xs(s, e);
|
|
3523
3527
|
return Be(Ke(o, e), ({ cfg: i, bpId: c }) => {
|
|
3524
3528
|
const a = {};
|
|
3525
3529
|
for (const [l, u] of Object.entries(i.outputs)) {
|
|
@@ -3532,15 +3536,15 @@ function Qi(s, e, t) {
|
|
|
3532
3536
|
{ key: "outputs#" + ke(s.rid) + "#" + e }
|
|
3533
3537
|
).withStableType();
|
|
3534
3538
|
}
|
|
3535
|
-
function
|
|
3539
|
+
function Qi(s, e) {
|
|
3536
3540
|
return M.make((t) => {
|
|
3537
3541
|
const r = t.accessor(s).node(), o = I(r.getKeyValueAsJson(he)), n = [];
|
|
3538
3542
|
for (const { id: i } of se(o)) {
|
|
3539
3543
|
const c = Ke(r, i);
|
|
3540
3544
|
if (c === void 0) continue;
|
|
3541
|
-
const a = Object.entries(c.cfg.outputs).map(([, u]) => u).filter((u) =>
|
|
3545
|
+
const a = Object.entries(c.cfg.outputs).map(([, u]) => u).filter((u) => Ki(u)).map((u) => u);
|
|
3542
3546
|
if (a.length === 0) continue;
|
|
3543
|
-
const l =
|
|
3547
|
+
const l = xs(r.persist(), i);
|
|
3544
3548
|
for (const u of a)
|
|
3545
3549
|
n.push(
|
|
3546
3550
|
M.wrapError(je(e, l, u, c.cfg.code, c.bpId))
|
|
@@ -3549,21 +3553,21 @@ function Zi(s, e) {
|
|
|
3549
3553
|
return n;
|
|
3550
3554
|
});
|
|
3551
3555
|
}
|
|
3552
|
-
class
|
|
3556
|
+
class Zi {
|
|
3553
3557
|
constructor() {
|
|
3554
3558
|
S(this, "states", /* @__PURE__ */ new Map());
|
|
3555
3559
|
}
|
|
3556
3560
|
setState(e, t) {
|
|
3557
3561
|
const r = this.states.get(e);
|
|
3558
3562
|
if (r === void 0) {
|
|
3559
|
-
this.states.set(e, { state: t, change: new
|
|
3563
|
+
this.states.set(e, { state: t, change: new gr() });
|
|
3560
3564
|
return;
|
|
3561
3565
|
}
|
|
3562
3566
|
r.state = { ...t }, r.change.markChanged();
|
|
3563
3567
|
}
|
|
3564
3568
|
readState(e, t) {
|
|
3565
3569
|
let r = this.states.get(t);
|
|
3566
|
-
return r === void 0 && (r = { state: { ...
|
|
3570
|
+
return r === void 0 && (r = { state: { ...ao }, change: new gr() }, this.states.set(t, r)), r.change.attachWatcher(e.watcher), r.state;
|
|
3567
3571
|
}
|
|
3568
3572
|
getState(e) {
|
|
3569
3573
|
return M.make(
|
|
@@ -3576,7 +3580,7 @@ class ea {
|
|
|
3576
3580
|
t !== void 0 && (this.states.delete(e), t.change.markChanged());
|
|
3577
3581
|
}
|
|
3578
3582
|
}
|
|
3579
|
-
function
|
|
3583
|
+
function Ar(s) {
|
|
3580
3584
|
return JSON.stringify(s, (e, t) => typeof t == "bigint" ? ke(t) : ArrayBuffer.isView(t) || t instanceof Int8Array || t instanceof Uint8Array || t instanceof Uint8ClampedArray || t instanceof Int16Array || t instanceof Uint16Array || t instanceof Int32Array || t instanceof Uint32Array || t instanceof Float32Array || t instanceof Float64Array || t instanceof BigInt64Array || t instanceof BigUint64Array ? Buffer.from(t.buffer, t.byteOffset, t.byteLength).toString("base64") : Buffer.isBuffer(t) ? t.toString("base64") : t);
|
|
3581
3585
|
}
|
|
3582
3586
|
class zt {
|
|
@@ -3585,32 +3589,32 @@ class zt {
|
|
|
3585
3589
|
S(this, "rid");
|
|
3586
3590
|
/** Data for the left panel, contain basic information about block status. */
|
|
3587
3591
|
S(this, "overview");
|
|
3588
|
-
S(this, "navigationStates", new
|
|
3592
|
+
S(this, "navigationStates", new Zi());
|
|
3589
3593
|
S(this, "blockComputables", /* @__PURE__ */ new Map());
|
|
3590
3594
|
S(this, "blockFrontends", /* @__PURE__ */ new Map());
|
|
3591
3595
|
S(this, "activeConfigs");
|
|
3592
3596
|
S(this, "refreshLoopResult");
|
|
3593
3597
|
S(this, "abortController", new AbortController());
|
|
3594
3598
|
S(this, "destroyed", !1);
|
|
3595
|
-
this.env = e, this.projectTree = r, this.overview =
|
|
3599
|
+
this.env = e, this.projectTree = r, this.overview = Wi(
|
|
3596
3600
|
r.entry(),
|
|
3597
3601
|
this.navigationStates,
|
|
3598
3602
|
e
|
|
3599
|
-
).withPreCalculatedValueTree(), this.rid = t, this.refreshLoopResult = this.refreshLoop(), this.activeConfigs =
|
|
3603
|
+
).withPreCalculatedValueTree(), this.rid = t, this.refreshLoopResult = this.refreshLoop(), this.activeConfigs = Qi(r.entry(), e);
|
|
3600
3604
|
}
|
|
3601
3605
|
async refreshLoop() {
|
|
3602
3606
|
for (; !this.destroyed; )
|
|
3603
3607
|
try {
|
|
3604
3608
|
await et(this.env.projectHelper, this.env.pl, this.rid, (e) => {
|
|
3605
3609
|
e.doRefresh(this.env.ops.stagingRenderingRate);
|
|
3606
|
-
}), await this.activeConfigs.getValue(), await
|
|
3610
|
+
}), await this.activeConfigs.getValue(), await fs(this.env.ops.projectRefreshInterval, this.abortController.signal);
|
|
3607
3611
|
} catch (e) {
|
|
3608
|
-
if (
|
|
3612
|
+
if (ko(e)) {
|
|
3609
3613
|
console.warn(
|
|
3610
3614
|
"project refresh routine terminated, because project was externally deleted"
|
|
3611
3615
|
);
|
|
3612
3616
|
break;
|
|
3613
|
-
} else if (!
|
|
3617
|
+
} else if (!Ro(e))
|
|
3614
3618
|
throw new Error("Unexpected exception", { cause: e });
|
|
3615
3619
|
}
|
|
3616
3620
|
}
|
|
@@ -3793,10 +3797,10 @@ class zt {
|
|
|
3793
3797
|
getBlockComputables(e) {
|
|
3794
3798
|
const t = this.blockComputables.get(e);
|
|
3795
3799
|
if (t === void 0) {
|
|
3796
|
-
const r =
|
|
3800
|
+
const r = Yi(this.projectTree.entry(), e, this.env), n = {
|
|
3797
3801
|
fullState: M.make(
|
|
3798
3802
|
(i) => ({
|
|
3799
|
-
argsAndUiState:
|
|
3803
|
+
argsAndUiState: _s(this.projectTree.entry(), e, i),
|
|
3800
3804
|
outputs: r,
|
|
3801
3805
|
navigationState: this.navigationStates.getState(e),
|
|
3802
3806
|
overview: this.overview
|
|
@@ -3804,7 +3808,7 @@ class zt {
|
|
|
3804
3808
|
{
|
|
3805
3809
|
postprocessValue: (i) => {
|
|
3806
3810
|
var u, d, p;
|
|
3807
|
-
const c = (p = (d = (u = i.overview) == null ? void 0 : u.blocks) == null ? void 0 : d.find((f) => f.id == e)) == null ? void 0 : p.sdkVersion, l = c &&
|
|
3811
|
+
const c = (p = (d = (u = i.overview) == null ? void 0 : u.blocks) == null ? void 0 : d.find((f) => f.id == e)) == null ? void 0 : p.sdkVersion, l = c && ta(c) && i.outputs !== void 0 ? sa(i.outputs) : i.outputs;
|
|
3808
3812
|
return {
|
|
3809
3813
|
...i.argsAndUiState,
|
|
3810
3814
|
outputs: l,
|
|
@@ -3832,7 +3836,7 @@ class zt {
|
|
|
3832
3836
|
getBlockFrontend(e) {
|
|
3833
3837
|
const t = this.blockFrontends.get(e);
|
|
3834
3838
|
if (t === void 0) {
|
|
3835
|
-
const r =
|
|
3839
|
+
const r = Xi(
|
|
3836
3840
|
this.projectTree.entry(),
|
|
3837
3841
|
e,
|
|
3838
3842
|
this.env
|
|
@@ -3854,12 +3858,12 @@ class zt {
|
|
|
3854
3858
|
static async init(e, t) {
|
|
3855
3859
|
await et(e.projectHelper, e.pl, t, (o) => {
|
|
3856
3860
|
});
|
|
3857
|
-
const r = await
|
|
3861
|
+
const r = await us.init(
|
|
3858
3862
|
e.pl,
|
|
3859
3863
|
t,
|
|
3860
3864
|
{
|
|
3861
3865
|
...e.ops.defaultTreeOptions,
|
|
3862
|
-
pruning:
|
|
3866
|
+
pruning: ea
|
|
3863
3867
|
},
|
|
3864
3868
|
e.logger
|
|
3865
3869
|
);
|
|
@@ -3869,13 +3873,13 @@ class zt {
|
|
|
3869
3873
|
var a, l;
|
|
3870
3874
|
return (((a = c.data) == null ? void 0 : a.byteLength) ?? 0) - (((l = i.data) == null ? void 0 : l.byteLength) ?? 0);
|
|
3871
3875
|
});
|
|
3872
|
-
const n =
|
|
3873
|
-
await lt.writeFile(`${ke(t)}.json`,
|
|
3876
|
+
const n = Fo(o);
|
|
3877
|
+
await lt.writeFile(`${ke(t)}.json`, Ar(o)), await lt.writeFile(`${ke(t)}.stats.json`, Ar(n));
|
|
3874
3878
|
}
|
|
3875
3879
|
return new zt(e, t, r);
|
|
3876
3880
|
}
|
|
3877
3881
|
}
|
|
3878
|
-
function
|
|
3882
|
+
function ea(s) {
|
|
3879
3883
|
switch (s.type.name) {
|
|
3880
3884
|
case "BlockPackCustom":
|
|
3881
3885
|
return s.fields.filter((e) => e.name !== "template");
|
|
@@ -3887,14 +3891,14 @@ function ta(s) {
|
|
|
3887
3891
|
return s.fields;
|
|
3888
3892
|
}
|
|
3889
3893
|
}
|
|
3890
|
-
function
|
|
3891
|
-
return !
|
|
3894
|
+
function ta(s) {
|
|
3895
|
+
return !ra(s, "1.26.0");
|
|
3892
3896
|
}
|
|
3893
|
-
function
|
|
3897
|
+
function ra(s, e) {
|
|
3894
3898
|
const t = s.split(".").map(Number), r = e.split(".").map(Number);
|
|
3895
3899
|
return t[0] > r[0] || t[0] === r[0] && t[1] > r[1] || t[0] === r[0] && t[1] === r[1] && t[2] > r[2];
|
|
3896
3900
|
}
|
|
3897
|
-
function
|
|
3901
|
+
function sa(s) {
|
|
3898
3902
|
const e = {};
|
|
3899
3903
|
for (const [t, r] of Object.entries(s)) {
|
|
3900
3904
|
if (r.ok) {
|
|
@@ -3909,8 +3913,8 @@ function oa(s) {
|
|
|
3909
3913
|
}
|
|
3910
3914
|
return e;
|
|
3911
3915
|
}
|
|
3912
|
-
const
|
|
3913
|
-
logger: new
|
|
3916
|
+
const Ks = {
|
|
3917
|
+
logger: new is(),
|
|
3914
3918
|
blobDriverOps: {
|
|
3915
3919
|
cacheSoftSizeBytes: 8 * 1024 * 1024 * 1024,
|
|
3916
3920
|
// 8 GB
|
|
@@ -3933,15 +3937,15 @@ const Hs = {
|
|
|
3933
3937
|
stopPollingDelay: 1e3
|
|
3934
3938
|
}
|
|
3935
3939
|
};
|
|
3936
|
-
function
|
|
3940
|
+
function Hs(s) {
|
|
3937
3941
|
return {
|
|
3938
3942
|
blobDownloadPath: U.join(s, "download"),
|
|
3939
3943
|
downloadBlobToURLPath: U.join(s, "downloadToURL"),
|
|
3940
3944
|
pframesSpillPath: U.join(s, "pframes")
|
|
3941
3945
|
};
|
|
3942
3946
|
}
|
|
3943
|
-
const
|
|
3944
|
-
...
|
|
3947
|
+
const oa = {
|
|
3948
|
+
...Ks,
|
|
3945
3949
|
defaultTreeOptions: {
|
|
3946
3950
|
pollingInterval: 350,
|
|
3947
3951
|
stopPollingDelay: 2500,
|
|
@@ -3955,18 +3959,18 @@ const na = {
|
|
|
3955
3959
|
projectRefreshInterval: 700,
|
|
3956
3960
|
stagingRenderingRate: 5
|
|
3957
3961
|
};
|
|
3958
|
-
function
|
|
3962
|
+
function na(s) {
|
|
3959
3963
|
return {
|
|
3960
|
-
...
|
|
3964
|
+
...Hs(s),
|
|
3961
3965
|
frontendDownloadPath: U.join(s, "frontend")
|
|
3962
3966
|
};
|
|
3963
3967
|
}
|
|
3964
|
-
function
|
|
3968
|
+
function ia(s) {
|
|
3965
3969
|
return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
|
|
3966
3970
|
}
|
|
3967
3971
|
var Vt = { exports: {} };
|
|
3968
|
-
const
|
|
3969
|
-
9007199254740991,
|
|
3972
|
+
const aa = "2.0.0", Ws = 256, ca = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
|
|
3973
|
+
9007199254740991, la = 16, ua = Ws - 6, da = [
|
|
3970
3974
|
"major",
|
|
3971
3975
|
"premajor",
|
|
3972
3976
|
"minor",
|
|
@@ -3976,18 +3980,18 @@ const ca = "2.0.0", qs = 256, la = Number.MAX_SAFE_INTEGER || /* istanbul ignore
|
|
|
3976
3980
|
"prerelease"
|
|
3977
3981
|
];
|
|
3978
3982
|
var ht = {
|
|
3979
|
-
MAX_LENGTH:
|
|
3980
|
-
MAX_SAFE_COMPONENT_LENGTH:
|
|
3981
|
-
MAX_SAFE_BUILD_LENGTH:
|
|
3982
|
-
MAX_SAFE_INTEGER:
|
|
3983
|
-
RELEASE_TYPES:
|
|
3984
|
-
SEMVER_SPEC_VERSION:
|
|
3983
|
+
MAX_LENGTH: Ws,
|
|
3984
|
+
MAX_SAFE_COMPONENT_LENGTH: la,
|
|
3985
|
+
MAX_SAFE_BUILD_LENGTH: ua,
|
|
3986
|
+
MAX_SAFE_INTEGER: ca,
|
|
3987
|
+
RELEASE_TYPES: da,
|
|
3988
|
+
SEMVER_SPEC_VERSION: aa,
|
|
3985
3989
|
FLAG_INCLUDE_PRERELEASE: 1,
|
|
3986
3990
|
FLAG_LOOSE: 2
|
|
3987
3991
|
};
|
|
3988
|
-
const
|
|
3992
|
+
const pa = typeof process == "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...s) => console.error("SEMVER", ...s) : () => {
|
|
3989
3993
|
};
|
|
3990
|
-
var mt =
|
|
3994
|
+
var mt = pa;
|
|
3991
3995
|
(function(s, e) {
|
|
3992
3996
|
const {
|
|
3993
3997
|
MAX_SAFE_COMPONENT_LENGTH: t,
|
|
@@ -4001,42 +4005,42 @@ var mt = fa;
|
|
|
4001
4005
|
["\\s", 1],
|
|
4002
4006
|
["\\d", o],
|
|
4003
4007
|
[p, r]
|
|
4004
|
-
],
|
|
4008
|
+
], k = (P) => {
|
|
4005
4009
|
for (const [A, j] of f)
|
|
4006
4010
|
P = P.split(`${A}*`).join(`${A}{0,${j}}`).split(`${A}+`).join(`${A}{1,${j}}`);
|
|
4007
4011
|
return P;
|
|
4008
4012
|
}, m = (P, A, j) => {
|
|
4009
|
-
const T =
|
|
4013
|
+
const T = k(A), W = d++;
|
|
4010
4014
|
n(P, W, A), u[P] = W, a[W] = A, l[W] = T, i[W] = new RegExp(A, j ? "g" : void 0), c[W] = new RegExp(T, j ? "g" : void 0);
|
|
4011
4015
|
};
|
|
4012
4016
|
m("NUMERICIDENTIFIER", "0|[1-9]\\d*"), m("NUMERICIDENTIFIERLOOSE", "\\d+"), m("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${p}*`), m("MAINVERSION", `(${a[u.NUMERICIDENTIFIER]})\\.(${a[u.NUMERICIDENTIFIER]})\\.(${a[u.NUMERICIDENTIFIER]})`), m("MAINVERSIONLOOSE", `(${a[u.NUMERICIDENTIFIERLOOSE]})\\.(${a[u.NUMERICIDENTIFIERLOOSE]})\\.(${a[u.NUMERICIDENTIFIERLOOSE]})`), m("PRERELEASEIDENTIFIER", `(?:${a[u.NUMERICIDENTIFIER]}|${a[u.NONNUMERICIDENTIFIER]})`), m("PRERELEASEIDENTIFIERLOOSE", `(?:${a[u.NUMERICIDENTIFIERLOOSE]}|${a[u.NONNUMERICIDENTIFIER]})`), m("PRERELEASE", `(?:-(${a[u.PRERELEASEIDENTIFIER]}(?:\\.${a[u.PRERELEASEIDENTIFIER]})*))`), m("PRERELEASELOOSE", `(?:-?(${a[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[u.PRERELEASEIDENTIFIERLOOSE]})*))`), m("BUILDIDENTIFIER", `${p}+`), m("BUILD", `(?:\\+(${a[u.BUILDIDENTIFIER]}(?:\\.${a[u.BUILDIDENTIFIER]})*))`), m("FULLPLAIN", `v?${a[u.MAINVERSION]}${a[u.PRERELEASE]}?${a[u.BUILD]}?`), m("FULL", `^${a[u.FULLPLAIN]}$`), m("LOOSEPLAIN", `[v=\\s]*${a[u.MAINVERSIONLOOSE]}${a[u.PRERELEASELOOSE]}?${a[u.BUILD]}?`), m("LOOSE", `^${a[u.LOOSEPLAIN]}$`), m("GTLT", "((?:<|>)?=?)"), m("XRANGEIDENTIFIERLOOSE", `${a[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), m("XRANGEIDENTIFIER", `${a[u.NUMERICIDENTIFIER]}|x|X|\\*`), m("XRANGEPLAIN", `[v=\\s]*(${a[u.XRANGEIDENTIFIER]})(?:\\.(${a[u.XRANGEIDENTIFIER]})(?:\\.(${a[u.XRANGEIDENTIFIER]})(?:${a[u.PRERELEASE]})?${a[u.BUILD]}?)?)?`), m("XRANGEPLAINLOOSE", `[v=\\s]*(${a[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[u.XRANGEIDENTIFIERLOOSE]})(?:${a[u.PRERELEASELOOSE]})?${a[u.BUILD]}?)?)?`), m("XRANGE", `^${a[u.GTLT]}\\s*${a[u.XRANGEPLAIN]}$`), m("XRANGELOOSE", `^${a[u.GTLT]}\\s*${a[u.XRANGEPLAINLOOSE]}$`), m("COERCEPLAIN", `(^|[^\\d])(\\d{1,${t}})(?:\\.(\\d{1,${t}}))?(?:\\.(\\d{1,${t}}))?`), m("COERCE", `${a[u.COERCEPLAIN]}(?:$|[^\\d])`), m("COERCEFULL", a[u.COERCEPLAIN] + `(?:${a[u.PRERELEASE]})?(?:${a[u.BUILD]})?(?:$|[^\\d])`), m("COERCERTL", a[u.COERCE], !0), m("COERCERTLFULL", a[u.COERCEFULL], !0), m("LONETILDE", "(?:~>?)"), m("TILDETRIM", `(\\s*)${a[u.LONETILDE]}\\s+`, !0), e.tildeTrimReplace = "$1~", m("TILDE", `^${a[u.LONETILDE]}${a[u.XRANGEPLAIN]}$`), m("TILDELOOSE", `^${a[u.LONETILDE]}${a[u.XRANGEPLAINLOOSE]}$`), m("LONECARET", "(?:\\^)"), m("CARETTRIM", `(\\s*)${a[u.LONECARET]}\\s+`, !0), e.caretTrimReplace = "$1^", m("CARET", `^${a[u.LONECARET]}${a[u.XRANGEPLAIN]}$`), m("CARETLOOSE", `^${a[u.LONECARET]}${a[u.XRANGEPLAINLOOSE]}$`), m("COMPARATORLOOSE", `^${a[u.GTLT]}\\s*(${a[u.LOOSEPLAIN]})$|^$`), m("COMPARATOR", `^${a[u.GTLT]}\\s*(${a[u.FULLPLAIN]})$|^$`), m("COMPARATORTRIM", `(\\s*)${a[u.GTLT]}\\s*(${a[u.LOOSEPLAIN]}|${a[u.XRANGEPLAIN]})`, !0), e.comparatorTrimReplace = "$1$2$3", m("HYPHENRANGE", `^\\s*(${a[u.XRANGEPLAIN]})\\s+-\\s+(${a[u.XRANGEPLAIN]})\\s*$`), m("HYPHENRANGELOOSE", `^\\s*(${a[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[u.XRANGEPLAINLOOSE]})\\s*$`), m("STAR", "(<|>)?=?\\s*\\*"), m("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), m("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
4013
4017
|
})(Vt, Vt.exports);
|
|
4014
4018
|
var We = Vt.exports;
|
|
4015
|
-
const
|
|
4016
|
-
var Xt =
|
|
4017
|
-
const
|
|
4018
|
-
const t =
|
|
4019
|
+
const fa = Object.freeze({ loose: !0 }), ga = Object.freeze({}), ha = (s) => s ? typeof s != "object" ? fa : s : ga;
|
|
4020
|
+
var Xt = ha;
|
|
4021
|
+
const Lr = /^[0-9]+$/, qs = (s, e) => {
|
|
4022
|
+
const t = Lr.test(s), r = Lr.test(e);
|
|
4019
4023
|
return t && r && (s = +s, e = +e), s === e ? 0 : t && !r ? -1 : r && !t ? 1 : s < e ? -1 : 1;
|
|
4020
|
-
},
|
|
4021
|
-
var
|
|
4022
|
-
compareIdentifiers:
|
|
4023
|
-
rcompareIdentifiers:
|
|
4024
|
+
}, ma = (s, e) => qs(e, s);
|
|
4025
|
+
var zs = {
|
|
4026
|
+
compareIdentifiers: qs,
|
|
4027
|
+
rcompareIdentifiers: ma
|
|
4024
4028
|
};
|
|
4025
|
-
const rt = mt, { MAX_LENGTH:
|
|
4026
|
-
let
|
|
4029
|
+
const rt = mt, { MAX_LENGTH: Dr, MAX_SAFE_INTEGER: st } = ht, { safeRe: Nr, safeSrc: Br, t: ot } = We, va = Xt, { compareIdentifiers: ye } = zs;
|
|
4030
|
+
let ya = class ie {
|
|
4027
4031
|
constructor(e, t) {
|
|
4028
|
-
if (t =
|
|
4032
|
+
if (t = va(t), e instanceof ie) {
|
|
4029
4033
|
if (e.loose === !!t.loose && e.includePrerelease === !!t.includePrerelease)
|
|
4030
4034
|
return e;
|
|
4031
4035
|
e = e.version;
|
|
4032
4036
|
} else if (typeof e != "string")
|
|
4033
4037
|
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);
|
|
4034
|
-
if (e.length >
|
|
4038
|
+
if (e.length > Dr)
|
|
4035
4039
|
throw new TypeError(
|
|
4036
|
-
`version is longer than ${
|
|
4040
|
+
`version is longer than ${Dr} characters`
|
|
4037
4041
|
);
|
|
4038
4042
|
rt("SemVer", e, t), this.options = t, this.loose = !!t.loose, this.includePrerelease = !!t.includePrerelease;
|
|
4039
|
-
const r = e.trim().match(t.loose ?
|
|
4043
|
+
const r = e.trim().match(t.loose ? Nr[ot.LOOSE] : Nr[ot.FULL]);
|
|
4040
4044
|
if (!r)
|
|
4041
4045
|
throw new TypeError(`Invalid Version: ${e}`);
|
|
4042
4046
|
if (this.raw = e, this.major = +r[1], this.minor = +r[2], this.patch = +r[3], this.major > st || this.major < 0)
|
|
@@ -4115,7 +4119,7 @@ let wa = class ie {
|
|
|
4115
4119
|
if (!t && r === !1)
|
|
4116
4120
|
throw new Error("invalid increment argument: identifier is empty");
|
|
4117
4121
|
if (t) {
|
|
4118
|
-
const o = new RegExp(`^${this.options.loose ?
|
|
4122
|
+
const o = new RegExp(`^${this.options.loose ? Br[ot.PRERELEASELOOSE] : Br[ot.PRERELEASE]}$`), n = `-${t}`.match(o);
|
|
4119
4123
|
if (!n || n[1] !== t)
|
|
4120
4124
|
throw new Error(`invalid identifier: ${t}`);
|
|
4121
4125
|
}
|
|
@@ -4173,43 +4177,43 @@ let wa = class ie {
|
|
|
4173
4177
|
return this.raw = this.format(), this.build.length && (this.raw += `+${this.build.join(".")}`), this;
|
|
4174
4178
|
}
|
|
4175
4179
|
};
|
|
4176
|
-
var z =
|
|
4177
|
-
const
|
|
4178
|
-
if (s instanceof
|
|
4180
|
+
var z = ya;
|
|
4181
|
+
const jr = z, wa = (s, e, t = !1) => {
|
|
4182
|
+
if (s instanceof jr)
|
|
4179
4183
|
return s;
|
|
4180
4184
|
try {
|
|
4181
|
-
return new
|
|
4185
|
+
return new jr(s, e);
|
|
4182
4186
|
} catch (r) {
|
|
4183
4187
|
if (!t)
|
|
4184
4188
|
return null;
|
|
4185
4189
|
throw r;
|
|
4186
4190
|
}
|
|
4187
4191
|
};
|
|
4188
|
-
var Pe =
|
|
4189
|
-
const
|
|
4190
|
-
const t =
|
|
4192
|
+
var Pe = wa;
|
|
4193
|
+
const Sa = Pe, ba = (s, e) => {
|
|
4194
|
+
const t = Sa(s, e);
|
|
4191
4195
|
return t ? t.version : null;
|
|
4192
4196
|
};
|
|
4193
|
-
var
|
|
4194
|
-
const
|
|
4195
|
-
const t =
|
|
4197
|
+
var ka = ba;
|
|
4198
|
+
const Ra = Pe, Ca = (s, e) => {
|
|
4199
|
+
const t = Ra(s.trim().replace(/^[=v]+/, ""), e);
|
|
4196
4200
|
return t ? t.version : null;
|
|
4197
4201
|
};
|
|
4198
|
-
var
|
|
4199
|
-
const
|
|
4202
|
+
var Ea = Ca;
|
|
4203
|
+
const xr = z, Pa = (s, e, t, r, o) => {
|
|
4200
4204
|
typeof t == "string" && (o = r, r = t, t = void 0);
|
|
4201
4205
|
try {
|
|
4202
|
-
return new
|
|
4203
|
-
s instanceof
|
|
4206
|
+
return new xr(
|
|
4207
|
+
s instanceof xr ? s.version : s,
|
|
4204
4208
|
t
|
|
4205
4209
|
).inc(e, r, o).version;
|
|
4206
4210
|
} catch {
|
|
4207
4211
|
return null;
|
|
4208
4212
|
}
|
|
4209
4213
|
};
|
|
4210
|
-
var
|
|
4211
|
-
const
|
|
4212
|
-
const t =
|
|
4214
|
+
var $a = Pa;
|
|
4215
|
+
const Vr = Pe, Oa = (s, e) => {
|
|
4216
|
+
const t = Vr(s, null, !0), r = Vr(e, null, !0), o = t.compare(r);
|
|
4213
4217
|
if (o === 0)
|
|
4214
4218
|
return null;
|
|
4215
4219
|
const n = o > 0, i = n ? t : r, c = n ? r : t, a = !!i.prerelease.length;
|
|
@@ -4222,46 +4226,46 @@ const Ur = Pe, Fa = (s, e) => {
|
|
|
4222
4226
|
const u = a ? "pre" : "";
|
|
4223
4227
|
return t.major !== r.major ? u + "major" : t.minor !== r.minor ? u + "minor" : t.patch !== r.patch ? u + "patch" : "prerelease";
|
|
4224
4228
|
};
|
|
4225
|
-
var
|
|
4226
|
-
const
|
|
4227
|
-
var
|
|
4228
|
-
const
|
|
4229
|
-
var
|
|
4230
|
-
const
|
|
4231
|
-
var
|
|
4232
|
-
const
|
|
4233
|
-
const t =
|
|
4229
|
+
var Fa = Oa;
|
|
4230
|
+
const Ia = z, Ta = (s, e) => new Ia(s, e).major;
|
|
4231
|
+
var Aa = Ta;
|
|
4232
|
+
const La = z, Da = (s, e) => new La(s, e).minor;
|
|
4233
|
+
var Na = Da;
|
|
4234
|
+
const Ba = z, ja = (s, e) => new Ba(s, e).patch;
|
|
4235
|
+
var xa = ja;
|
|
4236
|
+
const Va = Pe, Ua = (s, e) => {
|
|
4237
|
+
const t = Va(s, e);
|
|
4234
4238
|
return t && t.prerelease.length ? t.prerelease : null;
|
|
4235
4239
|
};
|
|
4236
|
-
var
|
|
4237
|
-
const
|
|
4238
|
-
var oe =
|
|
4239
|
-
const
|
|
4240
|
-
var
|
|
4241
|
-
const
|
|
4242
|
-
var
|
|
4243
|
-
const
|
|
4244
|
-
const r = new
|
|
4240
|
+
var Ja = Ua;
|
|
4241
|
+
const Ur = z, Ga = (s, e, t) => new Ur(s, t).compare(new Ur(e, t));
|
|
4242
|
+
var oe = Ga;
|
|
4243
|
+
const Ma = oe, _a = (s, e, t) => Ma(e, s, t);
|
|
4244
|
+
var Ka = _a;
|
|
4245
|
+
const Ha = oe, Wa = (s, e) => Ha(s, e, !0);
|
|
4246
|
+
var qa = Wa;
|
|
4247
|
+
const Jr = z, za = (s, e, t) => {
|
|
4248
|
+
const r = new Jr(s, t), o = new Jr(e, t);
|
|
4245
4249
|
return r.compare(o) || r.compareBuild(o);
|
|
4246
4250
|
};
|
|
4247
|
-
var Yt =
|
|
4248
|
-
const
|
|
4249
|
-
var
|
|
4250
|
-
const
|
|
4251
|
-
var
|
|
4252
|
-
const
|
|
4253
|
-
var vt =
|
|
4254
|
-
const
|
|
4255
|
-
var Qt =
|
|
4256
|
-
const
|
|
4257
|
-
var
|
|
4258
|
-
const
|
|
4259
|
-
var
|
|
4260
|
-
const
|
|
4261
|
-
var Zt =
|
|
4262
|
-
const
|
|
4263
|
-
var er =
|
|
4264
|
-
const
|
|
4251
|
+
var Yt = za;
|
|
4252
|
+
const Xa = Yt, Ya = (s, e) => s.sort((t, r) => Xa(t, r, e));
|
|
4253
|
+
var Qa = Ya;
|
|
4254
|
+
const Za = Yt, ec = (s, e) => s.sort((t, r) => Za(r, t, e));
|
|
4255
|
+
var tc = ec;
|
|
4256
|
+
const rc = oe, sc = (s, e, t) => rc(s, e, t) > 0;
|
|
4257
|
+
var vt = sc;
|
|
4258
|
+
const oc = oe, nc = (s, e, t) => oc(s, e, t) < 0;
|
|
4259
|
+
var Qt = nc;
|
|
4260
|
+
const ic = oe, ac = (s, e, t) => ic(s, e, t) === 0;
|
|
4261
|
+
var Xs = ac;
|
|
4262
|
+
const cc = oe, lc = (s, e, t) => cc(s, e, t) !== 0;
|
|
4263
|
+
var Ys = lc;
|
|
4264
|
+
const uc = oe, dc = (s, e, t) => uc(s, e, t) >= 0;
|
|
4265
|
+
var Zt = dc;
|
|
4266
|
+
const pc = oe, fc = (s, e, t) => pc(s, e, t) <= 0;
|
|
4267
|
+
var er = fc;
|
|
4268
|
+
const gc = Xs, hc = Ys, mc = vt, vc = Zt, yc = Qt, wc = er, Sc = (s, e, t, r) => {
|
|
4265
4269
|
switch (e) {
|
|
4266
4270
|
case "===":
|
|
4267
4271
|
return typeof s == "object" && (s = s.version), typeof t == "object" && (t = t.version), s === t;
|
|
@@ -4270,24 +4274,24 @@ const hc = Ys, mc = Qs, vc = vt, yc = Zt, wc = Qt, Sc = er, bc = (s, e, t, r) =>
|
|
|
4270
4274
|
case "":
|
|
4271
4275
|
case "=":
|
|
4272
4276
|
case "==":
|
|
4273
|
-
return
|
|
4277
|
+
return gc(s, t, r);
|
|
4274
4278
|
case "!=":
|
|
4275
|
-
return
|
|
4279
|
+
return hc(s, t, r);
|
|
4276
4280
|
case ">":
|
|
4277
|
-
return
|
|
4281
|
+
return mc(s, t, r);
|
|
4278
4282
|
case ">=":
|
|
4279
|
-
return
|
|
4283
|
+
return vc(s, t, r);
|
|
4280
4284
|
case "<":
|
|
4281
|
-
return
|
|
4285
|
+
return yc(s, t, r);
|
|
4282
4286
|
case "<=":
|
|
4283
|
-
return
|
|
4287
|
+
return wc(s, t, r);
|
|
4284
4288
|
default:
|
|
4285
4289
|
throw new TypeError(`Invalid operator: ${e}`);
|
|
4286
4290
|
}
|
|
4287
4291
|
};
|
|
4288
|
-
var
|
|
4289
|
-
const
|
|
4290
|
-
if (s instanceof
|
|
4292
|
+
var Qs = Sc;
|
|
4293
|
+
const bc = z, kc = Pe, { safeRe: nt, t: it } = We, Rc = (s, e) => {
|
|
4294
|
+
if (s instanceof bc)
|
|
4291
4295
|
return s;
|
|
4292
4296
|
if (typeof s == "number" && (s = String(s)), typeof s != "string")
|
|
4293
4297
|
return null;
|
|
@@ -4305,10 +4309,10 @@ const kc = z, Rc = Pe, { safeRe: nt, t: it } = We, Cc = (s, e) => {
|
|
|
4305
4309
|
if (t === null)
|
|
4306
4310
|
return null;
|
|
4307
4311
|
const r = t[2], o = t[3] || "0", n = t[4] || "0", i = e.includePrerelease && t[5] ? `-${t[5]}` : "", c = e.includePrerelease && t[6] ? `+${t[6]}` : "";
|
|
4308
|
-
return
|
|
4312
|
+
return kc(`${r}.${o}.${n}${i}${c}`, e);
|
|
4309
4313
|
};
|
|
4310
|
-
var
|
|
4311
|
-
class
|
|
4314
|
+
var Cc = Rc;
|
|
4315
|
+
class Ec {
|
|
4312
4316
|
constructor() {
|
|
4313
4317
|
this.max = 1e3, this.map = /* @__PURE__ */ new Map();
|
|
4314
4318
|
}
|
|
@@ -4331,10 +4335,10 @@ class Pc {
|
|
|
4331
4335
|
return this;
|
|
4332
4336
|
}
|
|
4333
4337
|
}
|
|
4334
|
-
var
|
|
4338
|
+
var Pc = Ec, Rt, Gr;
|
|
4335
4339
|
function ne() {
|
|
4336
|
-
if (
|
|
4337
|
-
|
|
4340
|
+
if (Gr) return Rt;
|
|
4341
|
+
Gr = 1;
|
|
4338
4342
|
const s = /\s+/g;
|
|
4339
4343
|
class e {
|
|
4340
4344
|
constructor(h, R) {
|
|
@@ -4377,11 +4381,11 @@ function ne() {
|
|
|
4377
4381
|
return this.range;
|
|
4378
4382
|
}
|
|
4379
4383
|
parseRange(h) {
|
|
4380
|
-
const g = ((this.options.includePrerelease && f) | (this.options.loose &&
|
|
4384
|
+
const g = ((this.options.includePrerelease && f) | (this.options.loose && k)) + ":" + h, w = r.get(g);
|
|
4381
4385
|
if (w)
|
|
4382
4386
|
return w;
|
|
4383
|
-
const v = this.options.loose,
|
|
4384
|
-
h = h.replace(
|
|
4387
|
+
const v = this.options.loose, b = v ? a[l.HYPHENRANGELOOSE] : a[l.HYPHENRANGE];
|
|
4388
|
+
h = h.replace(b, J(this.options.includePrerelease)), i("hyphen replace", h), h = h.replace(a[l.COMPARATORTRIM], u), i("comparator trim", h), h = h.replace(a[l.TILDETRIM], d), i("tilde trim", h), h = h.replace(a[l.CARETTRIM], p), i("caret trim", h);
|
|
4385
4389
|
let E = h.split(" ").map((D) => j(D, this.options)).join(" ").split(/\s+/).map((D) => te(D, this.options));
|
|
4386
4390
|
v && (E = E.filter((D) => (i("loose invalid filter", D, this.options), !!D.match(a[l.COMPARATORLOOSE])))), i("range list", E);
|
|
4387
4391
|
const C = /* @__PURE__ */ new Map(), L = E.map((D) => new n(D, this.options));
|
|
@@ -4397,7 +4401,7 @@ function ne() {
|
|
|
4397
4401
|
intersects(h, R) {
|
|
4398
4402
|
if (!(h instanceof e))
|
|
4399
4403
|
throw new TypeError("a Range is required");
|
|
4400
|
-
return this.set.some((g) => A(g, R) && h.set.some((w) => A(w, R) && g.every((v) => w.every((
|
|
4404
|
+
return this.set.some((g) => A(g, R) && h.set.some((w) => A(w, R) && g.every((v) => w.every((b) => v.intersects(b, R)))));
|
|
4401
4405
|
}
|
|
4402
4406
|
// if ANY of the sets match ALL of its comparators, then pass
|
|
4403
4407
|
test(h) {
|
|
@@ -4416,13 +4420,13 @@ function ne() {
|
|
|
4416
4420
|
}
|
|
4417
4421
|
}
|
|
4418
4422
|
Rt = e;
|
|
4419
|
-
const t =
|
|
4423
|
+
const t = Pc, r = new t(), o = Xt, n = yt(), i = mt, c = z, {
|
|
4420
4424
|
safeRe: a,
|
|
4421
4425
|
t: l,
|
|
4422
4426
|
comparatorTrimReplace: u,
|
|
4423
4427
|
tildeTrimReplace: d,
|
|
4424
4428
|
caretTrimReplace: p
|
|
4425
|
-
} = We, { FLAG_INCLUDE_PRERELEASE: f, FLAG_LOOSE:
|
|
4429
|
+
} = We, { FLAG_INCLUDE_PRERELEASE: f, FLAG_LOOSE: k } = ht, m = (y) => y.value === "<0.0.0-0", P = (y) => y.value === "", A = (y, h) => {
|
|
4426
4430
|
let R = !0;
|
|
4427
4431
|
const g = y.slice();
|
|
4428
4432
|
let w = g.pop();
|
|
@@ -4431,28 +4435,28 @@ function ne() {
|
|
|
4431
4435
|
return R;
|
|
4432
4436
|
}, j = (y, h) => (i("comp", y, h), y = N(y, h), i("caret", y), y = W(y, h), i("tildes", y), y = Z(y, h), i("xrange", y), y = ee(y, h), i("stars", y), y), T = (y) => !y || y.toLowerCase() === "x" || y === "*", W = (y, h) => y.trim().split(/\s+/).map((R) => ve(R, h)).join(" "), ve = (y, h) => {
|
|
4433
4437
|
const R = h.loose ? a[l.TILDELOOSE] : a[l.TILDE];
|
|
4434
|
-
return y.replace(R, (g, w, v,
|
|
4435
|
-
i("tilde", y, g, w, v,
|
|
4438
|
+
return y.replace(R, (g, w, v, b, E) => {
|
|
4439
|
+
i("tilde", y, g, w, v, b, E);
|
|
4436
4440
|
let C;
|
|
4437
|
-
return T(w) ? C = "" : T(v) ? C = `>=${w}.0.0 <${+w + 1}.0.0-0` : T(
|
|
4441
|
+
return T(w) ? C = "" : T(v) ? C = `>=${w}.0.0 <${+w + 1}.0.0-0` : T(b) ? C = `>=${w}.${v}.0 <${w}.${+v + 1}.0-0` : E ? (i("replaceTilde pr", E), C = `>=${w}.${v}.${b}-${E} <${w}.${+v + 1}.0-0`) : C = `>=${w}.${v}.${b} <${w}.${+v + 1}.0-0`, i("tilde return", C), C;
|
|
4438
4442
|
});
|
|
4439
4443
|
}, N = (y, h) => y.trim().split(/\s+/).map((R) => X(R, h)).join(" "), X = (y, h) => {
|
|
4440
4444
|
i("caret", y, h);
|
|
4441
4445
|
const R = h.loose ? a[l.CARETLOOSE] : a[l.CARET], g = h.includePrerelease ? "-0" : "";
|
|
4442
|
-
return y.replace(R, (w, v,
|
|
4443
|
-
i("caret", y, w, v,
|
|
4446
|
+
return y.replace(R, (w, v, b, E, C) => {
|
|
4447
|
+
i("caret", y, w, v, b, E, C);
|
|
4444
4448
|
let L;
|
|
4445
|
-
return T(v) ? L = "" : T(
|
|
4449
|
+
return T(v) ? L = "" : T(b) ? L = `>=${v}.0.0${g} <${+v + 1}.0.0-0` : T(E) ? v === "0" ? L = `>=${v}.${b}.0${g} <${v}.${+b + 1}.0-0` : L = `>=${v}.${b}.0${g} <${+v + 1}.0.0-0` : C ? (i("replaceCaret pr", C), v === "0" ? b === "0" ? L = `>=${v}.${b}.${E}-${C} <${v}.${b}.${+E + 1}-0` : L = `>=${v}.${b}.${E}-${C} <${v}.${+b + 1}.0-0` : L = `>=${v}.${b}.${E}-${C} <${+v + 1}.0.0-0`) : (i("no pr"), v === "0" ? b === "0" ? L = `>=${v}.${b}.${E}${g} <${v}.${b}.${+E + 1}-0` : L = `>=${v}.${b}.${E}${g} <${v}.${+b + 1}.0-0` : L = `>=${v}.${b}.${E} <${+v + 1}.0.0-0`), i("caret return", L), L;
|
|
4446
4450
|
});
|
|
4447
4451
|
}, Z = (y, h) => (i("replaceXRanges", y, h), y.split(/\s+/).map((R) => _(R, h)).join(" ")), _ = (y, h) => {
|
|
4448
4452
|
y = y.trim();
|
|
4449
4453
|
const R = h.loose ? a[l.XRANGELOOSE] : a[l.XRANGE];
|
|
4450
|
-
return y.replace(R, (g, w, v,
|
|
4451
|
-
i("xRange", y, g, w, v,
|
|
4452
|
-
const L = T(v), V = L || T(
|
|
4453
|
-
return w === "=" && ce && (w = ""), C = h.includePrerelease ? "-0" : "", L ? w === ">" || w === "<" ? g = "<0.0.0-0" : g = "*" : w && ce ? (V && (
|
|
4454
|
+
return y.replace(R, (g, w, v, b, E, C) => {
|
|
4455
|
+
i("xRange", y, g, w, v, b, E, C);
|
|
4456
|
+
const L = T(v), V = L || T(b), D = V || T(E), ce = D;
|
|
4457
|
+
return w === "=" && ce && (w = ""), C = h.includePrerelease ? "-0" : "", L ? w === ">" || w === "<" ? g = "<0.0.0-0" : g = "*" : w && ce ? (V && (b = 0), E = 0, w === ">" ? (w = ">=", V ? (v = +v + 1, b = 0, E = 0) : (b = +b + 1, E = 0)) : w === "<=" && (w = "<", V ? v = +v + 1 : b = +b + 1), w === "<" && (C = "-0"), g = `${w + v}.${b}.${E}${C}`) : V ? g = `>=${v}.0.0${C} <${+v + 1}.0.0-0` : D && (g = `>=${v}.${b}.0${C} <${v}.${+b + 1}.0-0`), i("xRange return", g), g;
|
|
4454
4458
|
});
|
|
4455
|
-
}, ee = (y, h) => (i("replaceStars", y, h), y.trim().replace(a[l.STAR], "")), te = (y, h) => (i("replaceGTE0", y, h), y.trim().replace(a[h.includePrerelease ? l.GTE0PRE : l.GTE0], "")), J = (y) => (h, R, g, w, v,
|
|
4459
|
+
}, ee = (y, h) => (i("replaceStars", y, h), y.trim().replace(a[l.STAR], "")), te = (y, h) => (i("replaceGTE0", y, h), y.trim().replace(a[h.includePrerelease ? l.GTE0PRE : l.GTE0], "")), J = (y) => (h, R, g, w, v, b, E, C, L, V, D, ce) => (T(g) ? R = "" : T(w) ? R = `>=${g}.0.0${y ? "-0" : ""}` : T(v) ? R = `>=${g}.${w}.0${y ? "-0" : ""}` : b ? R = `>=${R}` : R = `>=${R}${y ? "-0" : ""}`, T(L) ? C = "" : T(V) ? C = `<${+L + 1}.0.0-0` : T(D) ? C = `<${L}.${+V + 1}.0-0` : ce ? C = `<=${L}.${V}.${D}-${ce}` : y ? C = `<${L}.${V}.${+D + 1}-0` : C = `<=${C}`, `${R} ${C}`.trim()), q = (y, h, R) => {
|
|
4456
4460
|
for (let g = 0; g < y.length; g++)
|
|
4457
4461
|
if (!y[g].test(h))
|
|
4458
4462
|
return !1;
|
|
@@ -4469,10 +4473,10 @@ function ne() {
|
|
|
4469
4473
|
};
|
|
4470
4474
|
return Rt;
|
|
4471
4475
|
}
|
|
4472
|
-
var Ct,
|
|
4476
|
+
var Ct, Mr;
|
|
4473
4477
|
function yt() {
|
|
4474
|
-
if (
|
|
4475
|
-
|
|
4478
|
+
if (Mr) return Ct;
|
|
4479
|
+
Mr = 1;
|
|
4476
4480
|
const s = Symbol("SemVer ANY");
|
|
4477
4481
|
class e {
|
|
4478
4482
|
static get ANY() {
|
|
@@ -4513,46 +4517,46 @@ function yt() {
|
|
|
4513
4517
|
}
|
|
4514
4518
|
}
|
|
4515
4519
|
Ct = e;
|
|
4516
|
-
const t = Xt, { safeRe: r, t: o } = We, n =
|
|
4520
|
+
const t = Xt, { safeRe: r, t: o } = We, n = Qs, i = mt, c = z, a = ne();
|
|
4517
4521
|
return Ct;
|
|
4518
4522
|
}
|
|
4519
|
-
const
|
|
4523
|
+
const $c = ne(), Oc = (s, e, t) => {
|
|
4520
4524
|
try {
|
|
4521
|
-
e = new
|
|
4525
|
+
e = new $c(e, t);
|
|
4522
4526
|
} catch {
|
|
4523
4527
|
return !1;
|
|
4524
4528
|
}
|
|
4525
4529
|
return e.test(s);
|
|
4526
4530
|
};
|
|
4527
|
-
var wt =
|
|
4528
|
-
const
|
|
4529
|
-
var
|
|
4530
|
-
const
|
|
4531
|
+
var wt = Oc;
|
|
4532
|
+
const Fc = ne(), Ic = (s, e) => new Fc(s, e).set.map((t) => t.map((r) => r.value).join(" ").trim().split(" "));
|
|
4533
|
+
var Tc = Ic;
|
|
4534
|
+
const Ac = z, Lc = ne(), Dc = (s, e, t) => {
|
|
4531
4535
|
let r = null, o = null, n = null;
|
|
4532
4536
|
try {
|
|
4533
|
-
n = new
|
|
4537
|
+
n = new Lc(e, t);
|
|
4534
4538
|
} catch {
|
|
4535
4539
|
return null;
|
|
4536
4540
|
}
|
|
4537
4541
|
return s.forEach((i) => {
|
|
4538
|
-
n.test(i) && (!r || o.compare(i) === -1) && (r = i, o = new
|
|
4542
|
+
n.test(i) && (!r || o.compare(i) === -1) && (r = i, o = new Ac(r, t));
|
|
4539
4543
|
}), r;
|
|
4540
4544
|
};
|
|
4541
|
-
var
|
|
4542
|
-
const
|
|
4545
|
+
var Nc = Dc;
|
|
4546
|
+
const Bc = z, jc = ne(), xc = (s, e, t) => {
|
|
4543
4547
|
let r = null, o = null, n = null;
|
|
4544
4548
|
try {
|
|
4545
|
-
n = new
|
|
4549
|
+
n = new jc(e, t);
|
|
4546
4550
|
} catch {
|
|
4547
4551
|
return null;
|
|
4548
4552
|
}
|
|
4549
4553
|
return s.forEach((i) => {
|
|
4550
|
-
n.test(i) && (!r || o.compare(i) === 1) && (r = i, o = new
|
|
4554
|
+
n.test(i) && (!r || o.compare(i) === 1) && (r = i, o = new Bc(r, t));
|
|
4551
4555
|
}), r;
|
|
4552
4556
|
};
|
|
4553
|
-
var
|
|
4554
|
-
const Et = z,
|
|
4555
|
-
s = new
|
|
4557
|
+
var Vc = xc;
|
|
4558
|
+
const Et = z, Uc = ne(), _r = vt, Jc = (s, e) => {
|
|
4559
|
+
s = new Uc(s, e);
|
|
4556
4560
|
let t = new Et("0.0.0");
|
|
4557
4561
|
if (s.test(t) || (t = new Et("0.0.0-0"), s.test(t)))
|
|
4558
4562
|
return t;
|
|
@@ -4567,7 +4571,7 @@ const Et = z, Jc = ne(), Kr = vt, Gc = (s, e) => {
|
|
|
4567
4571
|
c.prerelease.length === 0 ? c.patch++ : c.prerelease.push(0), c.raw = c.format();
|
|
4568
4572
|
case "":
|
|
4569
4573
|
case ">=":
|
|
4570
|
-
(!n ||
|
|
4574
|
+
(!n || _r(c, n)) && (n = c);
|
|
4571
4575
|
break;
|
|
4572
4576
|
case "<":
|
|
4573
4577
|
case "<=":
|
|
@@ -4575,39 +4579,39 @@ const Et = z, Jc = ne(), Kr = vt, Gc = (s, e) => {
|
|
|
4575
4579
|
default:
|
|
4576
4580
|
throw new Error(`Unexpected operation: ${i.operator}`);
|
|
4577
4581
|
}
|
|
4578
|
-
}), n && (!t ||
|
|
4582
|
+
}), n && (!t || _r(t, n)) && (t = n);
|
|
4579
4583
|
}
|
|
4580
4584
|
return t && s.test(t) ? t : null;
|
|
4581
4585
|
};
|
|
4582
|
-
var
|
|
4583
|
-
const
|
|
4586
|
+
var Gc = Jc;
|
|
4587
|
+
const Mc = ne(), _c = (s, e) => {
|
|
4584
4588
|
try {
|
|
4585
|
-
return new
|
|
4589
|
+
return new Mc(s, e).range || "*";
|
|
4586
4590
|
} catch {
|
|
4587
4591
|
return null;
|
|
4588
4592
|
}
|
|
4589
4593
|
};
|
|
4590
|
-
var
|
|
4591
|
-
const
|
|
4592
|
-
s = new
|
|
4594
|
+
var Kc = _c;
|
|
4595
|
+
const Hc = z, Zs = yt(), { ANY: Wc } = Zs, qc = ne(), zc = wt, Kr = vt, Hr = Qt, Xc = er, Yc = Zt, Qc = (s, e, t, r) => {
|
|
4596
|
+
s = new Hc(s, r), e = new qc(e, r);
|
|
4593
4597
|
let o, n, i, c, a;
|
|
4594
4598
|
switch (t) {
|
|
4595
4599
|
case ">":
|
|
4596
|
-
o =
|
|
4600
|
+
o = Kr, n = Xc, i = Hr, c = ">", a = ">=";
|
|
4597
4601
|
break;
|
|
4598
4602
|
case "<":
|
|
4599
|
-
o =
|
|
4603
|
+
o = Hr, n = Yc, i = Kr, c = "<", a = "<=";
|
|
4600
4604
|
break;
|
|
4601
4605
|
default:
|
|
4602
4606
|
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
|
4603
4607
|
}
|
|
4604
|
-
if (
|
|
4608
|
+
if (zc(s, e, r))
|
|
4605
4609
|
return !1;
|
|
4606
4610
|
for (let l = 0; l < e.set.length; ++l) {
|
|
4607
4611
|
const u = e.set[l];
|
|
4608
4612
|
let d = null, p = null;
|
|
4609
4613
|
if (u.forEach((f) => {
|
|
4610
|
-
f.semver ===
|
|
4614
|
+
f.semver === Wc && (f = new Zs(">=0.0.0")), d = d || f, p = p || f, o(f.semver, d.semver, r) ? d = f : i(f.semver, p.semver, r) && (p = f);
|
|
4611
4615
|
}), d.operator === c || d.operator === a || (!p.operator || p.operator === c) && n(s, p.semver))
|
|
4612
4616
|
return !1;
|
|
4613
4617
|
if (p.operator === a && i(s, p.semver))
|
|
@@ -4615,20 +4619,20 @@ const Wc = z, eo = yt(), { ANY: qc } = eo, zc = ne(), Xc = wt, Hr = vt, Wr = Qt,
|
|
|
4615
4619
|
}
|
|
4616
4620
|
return !0;
|
|
4617
4621
|
};
|
|
4618
|
-
var tr =
|
|
4619
|
-
const
|
|
4620
|
-
var
|
|
4621
|
-
const
|
|
4622
|
-
var
|
|
4623
|
-
const
|
|
4624
|
-
var
|
|
4625
|
-
const
|
|
4626
|
-
var
|
|
4622
|
+
var tr = Qc;
|
|
4623
|
+
const Zc = tr, el = (s, e, t) => Zc(s, e, ">", t);
|
|
4624
|
+
var tl = el;
|
|
4625
|
+
const rl = tr, sl = (s, e, t) => rl(s, e, "<", t);
|
|
4626
|
+
var ol = sl;
|
|
4627
|
+
const Wr = ne(), nl = (s, e, t) => (s = new Wr(s, t), e = new Wr(e, t), s.intersects(e, t));
|
|
4628
|
+
var il = nl;
|
|
4629
|
+
const al = wt, cl = oe;
|
|
4630
|
+
var ll = (s, e, t) => {
|
|
4627
4631
|
const r = [];
|
|
4628
4632
|
let o = null, n = null;
|
|
4629
|
-
const i = s.sort((u, d) =>
|
|
4633
|
+
const i = s.sort((u, d) => cl(u, d, t));
|
|
4630
4634
|
for (const u of i)
|
|
4631
|
-
|
|
4635
|
+
al(u, e, t) ? (n = u, o || (o = u)) : (n && r.push([o, n]), n = null, o = null);
|
|
4632
4636
|
o && r.push([o, null]);
|
|
4633
4637
|
const c = [];
|
|
4634
4638
|
for (const [u, d] of r)
|
|
@@ -4636,14 +4640,14 @@ var ul = (s, e, t) => {
|
|
|
4636
4640
|
const a = c.join(" || "), l = typeof e.raw == "string" ? e.raw : String(e);
|
|
4637
4641
|
return a.length < l.length ? a : e;
|
|
4638
4642
|
};
|
|
4639
|
-
const
|
|
4643
|
+
const qr = ne(), rr = yt(), { ANY: Pt } = rr, Te = wt, sr = oe, ul = (s, e, t = {}) => {
|
|
4640
4644
|
if (s === e)
|
|
4641
4645
|
return !0;
|
|
4642
|
-
s = new
|
|
4646
|
+
s = new qr(s, t), e = new qr(e, t);
|
|
4643
4647
|
let r = !1;
|
|
4644
4648
|
e: for (const o of s.set) {
|
|
4645
4649
|
for (const n of e.set) {
|
|
4646
|
-
const i =
|
|
4650
|
+
const i = pl(o, n, t);
|
|
4647
4651
|
if (r = r || i !== null, i)
|
|
4648
4652
|
continue e;
|
|
4649
4653
|
}
|
|
@@ -4651,23 +4655,23 @@ const zr = ne(), rr = yt(), { ANY: Pt } = rr, Te = wt, sr = oe, dl = (s, e, t =
|
|
|
4651
4655
|
return !1;
|
|
4652
4656
|
}
|
|
4653
4657
|
return !0;
|
|
4654
|
-
},
|
|
4658
|
+
}, dl = [new rr(">=0.0.0-0")], zr = [new rr(">=0.0.0")], pl = (s, e, t) => {
|
|
4655
4659
|
if (s === e)
|
|
4656
4660
|
return !0;
|
|
4657
4661
|
if (s.length === 1 && s[0].semver === Pt) {
|
|
4658
4662
|
if (e.length === 1 && e[0].semver === Pt)
|
|
4659
4663
|
return !0;
|
|
4660
|
-
t.includePrerelease ? s =
|
|
4664
|
+
t.includePrerelease ? s = dl : s = zr;
|
|
4661
4665
|
}
|
|
4662
4666
|
if (e.length === 1 && e[0].semver === Pt) {
|
|
4663
4667
|
if (t.includePrerelease)
|
|
4664
4668
|
return !0;
|
|
4665
|
-
e =
|
|
4669
|
+
e = zr;
|
|
4666
4670
|
}
|
|
4667
4671
|
const r = /* @__PURE__ */ new Set();
|
|
4668
4672
|
let o, n;
|
|
4669
4673
|
for (const f of s)
|
|
4670
|
-
f.operator === ">" || f.operator === ">=" ? o =
|
|
4674
|
+
f.operator === ">" || f.operator === ">=" ? o = Xr(o, f, t) : f.operator === "<" || f.operator === "<=" ? n = Yr(n, f, t) : r.add(f.semver);
|
|
4671
4675
|
if (r.size > 1)
|
|
4672
4676
|
return null;
|
|
4673
4677
|
let i;
|
|
@@ -4680,8 +4684,8 @@ const zr = ne(), rr = yt(), { ANY: Pt } = rr, Te = wt, sr = oe, dl = (s, e, t =
|
|
|
4680
4684
|
for (const f of r) {
|
|
4681
4685
|
if (o && !Te(f, String(o), t) || n && !Te(f, String(n), t))
|
|
4682
4686
|
return null;
|
|
4683
|
-
for (const
|
|
4684
|
-
if (!Te(f, String(
|
|
4687
|
+
for (const k of e)
|
|
4688
|
+
if (!Te(f, String(k), t))
|
|
4685
4689
|
return !1;
|
|
4686
4690
|
return !0;
|
|
4687
4691
|
}
|
|
@@ -4690,14 +4694,14 @@ const zr = ne(), rr = yt(), { ANY: Pt } = rr, Te = wt, sr = oe, dl = (s, e, t =
|
|
|
4690
4694
|
for (const f of e) {
|
|
4691
4695
|
if (u = u || f.operator === ">" || f.operator === ">=", l = l || f.operator === "<" || f.operator === "<=", o) {
|
|
4692
4696
|
if (p && f.semver.prerelease && f.semver.prerelease.length && f.semver.major === p.major && f.semver.minor === p.minor && f.semver.patch === p.patch && (p = !1), f.operator === ">" || f.operator === ">=") {
|
|
4693
|
-
if (c =
|
|
4697
|
+
if (c = Xr(o, f, t), c === f && c !== o)
|
|
4694
4698
|
return !1;
|
|
4695
4699
|
} else if (o.operator === ">=" && !Te(o.semver, String(f), t))
|
|
4696
4700
|
return !1;
|
|
4697
4701
|
}
|
|
4698
4702
|
if (n) {
|
|
4699
4703
|
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 === "<=") {
|
|
4700
|
-
if (a =
|
|
4704
|
+
if (a = Yr(n, f, t), a === f && a !== n)
|
|
4701
4705
|
return !1;
|
|
4702
4706
|
} else if (n.operator === "<=" && !Te(n.semver, String(f), t))
|
|
4703
4707
|
return !1;
|
|
@@ -4706,72 +4710,72 @@ const zr = ne(), rr = yt(), { ANY: Pt } = rr, Te = wt, sr = oe, dl = (s, e, t =
|
|
|
4706
4710
|
return !1;
|
|
4707
4711
|
}
|
|
4708
4712
|
return !(o && l && !n && i !== 0 || n && u && !o && i !== 0 || p || d);
|
|
4709
|
-
},
|
|
4713
|
+
}, Xr = (s, e, t) => {
|
|
4710
4714
|
if (!s)
|
|
4711
4715
|
return e;
|
|
4712
4716
|
const r = sr(s.semver, e.semver, t);
|
|
4713
4717
|
return r > 0 ? s : r < 0 || e.operator === ">" && s.operator === ">=" ? e : s;
|
|
4714
|
-
},
|
|
4718
|
+
}, Yr = (s, e, t) => {
|
|
4715
4719
|
if (!s)
|
|
4716
4720
|
return e;
|
|
4717
4721
|
const r = sr(s.semver, e.semver, t);
|
|
4718
4722
|
return r < 0 ? s : r > 0 || e.operator === "<" && s.operator === "<=" ? e : s;
|
|
4719
4723
|
};
|
|
4720
|
-
var
|
|
4721
|
-
const $t = We,
|
|
4722
|
-
var
|
|
4723
|
-
parse:
|
|
4724
|
-
valid:
|
|
4725
|
-
clean:
|
|
4726
|
-
inc:
|
|
4727
|
-
diff:
|
|
4728
|
-
major:
|
|
4729
|
-
minor:
|
|
4730
|
-
patch:
|
|
4731
|
-
prerelease:
|
|
4732
|
-
compare:
|
|
4733
|
-
rcompare:
|
|
4734
|
-
compareLoose:
|
|
4735
|
-
compareBuild:
|
|
4736
|
-
sort:
|
|
4737
|
-
rsort:
|
|
4738
|
-
gt:
|
|
4739
|
-
lt:
|
|
4740
|
-
eq:
|
|
4741
|
-
neq:
|
|
4742
|
-
gte:
|
|
4743
|
-
lte:
|
|
4744
|
-
cmp:
|
|
4745
|
-
coerce:
|
|
4746
|
-
Comparator:
|
|
4747
|
-
Range:
|
|
4748
|
-
satisfies:
|
|
4749
|
-
toComparators:
|
|
4750
|
-
maxSatisfying:
|
|
4751
|
-
minSatisfying:
|
|
4752
|
-
minVersion:
|
|
4753
|
-
validRange:
|
|
4754
|
-
outside:
|
|
4755
|
-
gtr:
|
|
4756
|
-
ltr:
|
|
4757
|
-
intersects:
|
|
4758
|
-
simplifyRange:
|
|
4759
|
-
subset:
|
|
4760
|
-
SemVer:
|
|
4724
|
+
var fl = ul;
|
|
4725
|
+
const $t = We, Qr = ht, gl = z, Zr = zs, hl = Pe, ml = ka, vl = Ea, yl = $a, wl = Fa, Sl = Aa, bl = Na, kl = xa, Rl = Ja, Cl = oe, El = Ka, Pl = qa, $l = Yt, Ol = Qa, Fl = tc, Il = vt, Tl = Qt, Al = Xs, Ll = Ys, Dl = Zt, Nl = er, Bl = Qs, jl = Cc, xl = yt(), Vl = ne(), Ul = wt, Jl = Tc, Gl = Nc, Ml = Vc, _l = Gc, Kl = Kc, Hl = tr, Wl = tl, ql = ol, zl = il, Xl = ll, Yl = fl;
|
|
4726
|
+
var Ql = {
|
|
4727
|
+
parse: hl,
|
|
4728
|
+
valid: ml,
|
|
4729
|
+
clean: vl,
|
|
4730
|
+
inc: yl,
|
|
4731
|
+
diff: wl,
|
|
4732
|
+
major: Sl,
|
|
4733
|
+
minor: bl,
|
|
4734
|
+
patch: kl,
|
|
4735
|
+
prerelease: Rl,
|
|
4736
|
+
compare: Cl,
|
|
4737
|
+
rcompare: El,
|
|
4738
|
+
compareLoose: Pl,
|
|
4739
|
+
compareBuild: $l,
|
|
4740
|
+
sort: Ol,
|
|
4741
|
+
rsort: Fl,
|
|
4742
|
+
gt: Il,
|
|
4743
|
+
lt: Tl,
|
|
4744
|
+
eq: Al,
|
|
4745
|
+
neq: Ll,
|
|
4746
|
+
gte: Dl,
|
|
4747
|
+
lte: Nl,
|
|
4748
|
+
cmp: Bl,
|
|
4749
|
+
coerce: jl,
|
|
4750
|
+
Comparator: xl,
|
|
4751
|
+
Range: Vl,
|
|
4752
|
+
satisfies: Ul,
|
|
4753
|
+
toComparators: Jl,
|
|
4754
|
+
maxSatisfying: Gl,
|
|
4755
|
+
minSatisfying: Ml,
|
|
4756
|
+
minVersion: _l,
|
|
4757
|
+
validRange: Kl,
|
|
4758
|
+
outside: Hl,
|
|
4759
|
+
gtr: Wl,
|
|
4760
|
+
ltr: ql,
|
|
4761
|
+
intersects: zl,
|
|
4762
|
+
simplifyRange: Xl,
|
|
4763
|
+
subset: Yl,
|
|
4764
|
+
SemVer: gl,
|
|
4761
4765
|
re: $t.re,
|
|
4762
4766
|
src: $t.src,
|
|
4763
4767
|
tokens: $t.t,
|
|
4764
|
-
SEMVER_SPEC_VERSION:
|
|
4765
|
-
RELEASE_TYPES:
|
|
4766
|
-
compareIdentifiers:
|
|
4767
|
-
rcompareIdentifiers:
|
|
4768
|
+
SEMVER_SPEC_VERSION: Qr.SEMVER_SPEC_VERSION,
|
|
4769
|
+
RELEASE_TYPES: Qr.RELEASE_TYPES,
|
|
4770
|
+
compareIdentifiers: Zr.compareIdentifiers,
|
|
4771
|
+
rcompareIdentifiers: Zr.rcompareIdentifiers
|
|
4768
4772
|
};
|
|
4769
|
-
const
|
|
4773
|
+
const Zl = /* @__PURE__ */ ia(Ql), eu = {
|
|
4770
4774
|
minDelay: 1500
|
|
4771
|
-
},
|
|
4772
|
-
class
|
|
4775
|
+
}, tu = "__no_updates__";
|
|
4776
|
+
class ru extends To {
|
|
4773
4777
|
constructor(t, r, o = {}) {
|
|
4774
|
-
super({ ...o, ...
|
|
4778
|
+
super({ ...o, ...eu }, r);
|
|
4775
4779
|
S(this, "http");
|
|
4776
4780
|
S(this, "preferredUpdateChannel");
|
|
4777
4781
|
this.registryProvider = t, this.http = o.http, this.preferredUpdateChannel = o.preferredUpdateChannel;
|
|
@@ -4785,7 +4789,7 @@ class su extends Ao {
|
|
|
4785
4789
|
case "from-registry-v2":
|
|
4786
4790
|
return `from_registry_v2_${B(t)}`;
|
|
4787
4791
|
default:
|
|
4788
|
-
return
|
|
4792
|
+
return tu;
|
|
4789
4793
|
}
|
|
4790
4794
|
}
|
|
4791
4795
|
async readValue(t) {
|
|
@@ -4795,7 +4799,7 @@ class su extends Ao {
|
|
|
4795
4799
|
switch (n.type) {
|
|
4796
4800
|
case "dev-v1":
|
|
4797
4801
|
try {
|
|
4798
|
-
const i = await
|
|
4802
|
+
const i = await ks(n.folder);
|
|
4799
4803
|
return i === n.mtime ? { suggestions: [] } : { mainSuggestion: { ...n, mtime: i }, suggestions: [] };
|
|
4800
4804
|
} catch (i) {
|
|
4801
4805
|
return this.logger.warn(i), { suggestions: [] };
|
|
@@ -4821,7 +4825,7 @@ class su extends Ao {
|
|
|
4821
4825
|
else {
|
|
4822
4826
|
if (await a.getLatestOverview(n.id, De) === void 0)
|
|
4823
4827
|
return this.logger.error(
|
|
4824
|
-
`No "any" channel record for ${
|
|
4828
|
+
`No "any" channel record for ${lo(n.id)}`
|
|
4825
4829
|
), { suggestions: [] };
|
|
4826
4830
|
l = De;
|
|
4827
4831
|
}
|
|
@@ -4835,18 +4839,18 @@ class su extends Ao {
|
|
|
4835
4839
|
d = u[0].update;
|
|
4836
4840
|
break;
|
|
4837
4841
|
case "major":
|
|
4838
|
-
d = (r = u.find((
|
|
4842
|
+
d = (r = u.find((k) => k.type !== "major")) == null ? void 0 : r.update;
|
|
4839
4843
|
break;
|
|
4840
4844
|
case "minor":
|
|
4841
|
-
d = (o = u.find((
|
|
4845
|
+
d = (o = u.find((k) => k.type === "patch")) == null ? void 0 : o.update;
|
|
4842
4846
|
break;
|
|
4843
4847
|
}
|
|
4844
|
-
const p = u.map(({ type:
|
|
4845
|
-
type:
|
|
4848
|
+
const p = u.map(({ type: k, update: m }) => ({
|
|
4849
|
+
type: k,
|
|
4846
4850
|
update: { ...n, id: { ...n.id, version: m } }
|
|
4847
4851
|
}));
|
|
4848
4852
|
if (d === void 0) return { suggestions: p };
|
|
4849
|
-
if (c !== void 0 &&
|
|
4853
|
+
if (c !== void 0 && Zl.lte(d, c))
|
|
4850
4854
|
return { suggestions: p };
|
|
4851
4855
|
const f = {
|
|
4852
4856
|
...n,
|
|
@@ -4855,8 +4859,8 @@ class su extends Ao {
|
|
|
4855
4859
|
return (async () => {
|
|
4856
4860
|
try {
|
|
4857
4861
|
await a.getComponents(f.id);
|
|
4858
|
-
} catch (
|
|
4859
|
-
this.logger.warn(
|
|
4862
|
+
} catch (k) {
|
|
4863
|
+
this.logger.warn(k);
|
|
4860
4864
|
}
|
|
4861
4865
|
})(), { suggestions: p, mainSuggestion: f };
|
|
4862
4866
|
} catch (i) {
|
|
@@ -4873,7 +4877,7 @@ class su extends Ao {
|
|
|
4873
4877
|
return B(t) === B(r);
|
|
4874
4878
|
}
|
|
4875
4879
|
}
|
|
4876
|
-
class
|
|
4880
|
+
class es {
|
|
4877
4881
|
constructor() {
|
|
4878
4882
|
S(this, "resources", /* @__PURE__ */ new Map());
|
|
4879
4883
|
}
|
|
@@ -4914,7 +4918,7 @@ function fe() {
|
|
|
4914
4918
|
function xe(s) {
|
|
4915
4919
|
return String(s.id);
|
|
4916
4920
|
}
|
|
4917
|
-
const
|
|
4921
|
+
const su = ["Int", "Long", "Float", "Double", "String", "Bytes"];
|
|
4918
4922
|
function Ot(s) {
|
|
4919
4923
|
const e = [], t = [];
|
|
4920
4924
|
for (const r of s)
|
|
@@ -4931,7 +4935,7 @@ function Ot(s) {
|
|
|
4931
4935
|
return t;
|
|
4932
4936
|
}
|
|
4933
4937
|
const Le = (s, e) => typeof e == "bigint" ? e.toString() : e;
|
|
4934
|
-
class
|
|
4938
|
+
class ou {
|
|
4935
4939
|
constructor(e, t, r, o) {
|
|
4936
4940
|
S(this, "pFrame");
|
|
4937
4941
|
S(this, "abortController", new AbortController());
|
|
@@ -4948,7 +4952,7 @@ class nu {
|
|
|
4948
4952
|
S(this, "resolveBlobContent", async (e) => {
|
|
4949
4953
|
try {
|
|
4950
4954
|
const t = this.getOrCreateComputableForBlob(e), r = this.blobDriver.getLocalPath((await t.awaitStableValue()).handle);
|
|
4951
|
-
return await
|
|
4955
|
+
return await as.readFile(r);
|
|
4952
4956
|
} catch (t) {
|
|
4953
4957
|
const r = JSON.stringify(t);
|
|
4954
4958
|
throw console.log(`resolveBlobContent catched error: ${r}`), t;
|
|
@@ -4957,18 +4961,18 @@ class nu {
|
|
|
4957
4961
|
this.blobDriver = e, this.logger = t, this.spillPath = r;
|
|
4958
4962
|
const n = (c, a) => this.logger[c](a);
|
|
4959
4963
|
for (const c of o)
|
|
4960
|
-
for (const a of
|
|
4964
|
+
for (const a of qn(c.data))
|
|
4961
4965
|
this.blobIdToResource.set(xe(a), a);
|
|
4962
4966
|
const i = [
|
|
4963
4967
|
...new Map(o.map((c) => ({
|
|
4964
4968
|
...c,
|
|
4965
|
-
data:
|
|
4969
|
+
data: zn(c.data, xe)
|
|
4966
4970
|
})).map(
|
|
4967
4971
|
(c) => [B(c), c]
|
|
4968
4972
|
)).values()
|
|
4969
4973
|
];
|
|
4970
4974
|
try {
|
|
4971
|
-
const c = new
|
|
4975
|
+
const c = new ws(this.spillPath, n);
|
|
4972
4976
|
c.setDataSource(this);
|
|
4973
4977
|
for (const a of i)
|
|
4974
4978
|
c.addColumnSpec(a.id, a.spec), c.setColumnData(a.id, a.data);
|
|
@@ -4995,7 +4999,7 @@ class nu {
|
|
|
4995
4999
|
this.pFrame.dispose();
|
|
4996
5000
|
}
|
|
4997
5001
|
}
|
|
4998
|
-
class
|
|
5002
|
+
class nu {
|
|
4999
5003
|
constructor(e, t) {
|
|
5000
5004
|
this.table = e, this.abortController = t;
|
|
5001
5005
|
}
|
|
@@ -5013,20 +5017,20 @@ class or {
|
|
|
5013
5017
|
S(this, "concurrencyLimiter");
|
|
5014
5018
|
S(this, "getDataLimiter");
|
|
5015
5019
|
this.blobDriver = e, this.logger = t, this.spillPath = r;
|
|
5016
|
-
const o = new
|
|
5017
|
-
this.concurrencyLimiter = o, this.getDataLimiter = new
|
|
5020
|
+
const o = new pr(4);
|
|
5021
|
+
this.concurrencyLimiter = o, this.getDataLimiter = new pr(4), this.pFrames = new class extends es {
|
|
5018
5022
|
constructor(n, i, c) {
|
|
5019
5023
|
super(), this.blobDriver = n, this.logger = i, this.spillPath = c;
|
|
5020
5024
|
}
|
|
5021
5025
|
createNewResource(n) {
|
|
5022
5026
|
return fe().logPFrameRequests && t.info(
|
|
5023
5027
|
`PFrame creation (pFrameHandle = ${this.calculateParamsKey(n)}): ${JSON.stringify(n, Le)}`
|
|
5024
|
-
), new
|
|
5028
|
+
), new ou(this.blobDriver, this.logger, this.spillPath, n);
|
|
5025
5029
|
}
|
|
5026
5030
|
calculateParamsKey(n) {
|
|
5027
|
-
return
|
|
5031
|
+
return au(n);
|
|
5028
5032
|
}
|
|
5029
|
-
}(this.blobDriver, this.logger, this.spillPath), this.pTables = new class extends
|
|
5033
|
+
}(this.blobDriver, this.logger, this.spillPath), this.pTables = new class extends es {
|
|
5030
5034
|
constructor(n) {
|
|
5031
5035
|
super(), this.pFrames = n;
|
|
5032
5036
|
}
|
|
@@ -5051,34 +5055,34 @@ class or {
|
|
|
5051
5055
|
}
|
|
5052
5056
|
return p;
|
|
5053
5057
|
});
|
|
5054
|
-
return new
|
|
5058
|
+
return new nu(u, a);
|
|
5055
5059
|
}
|
|
5056
5060
|
calculateParamsKey(n) {
|
|
5057
|
-
return
|
|
5061
|
+
return iu(n);
|
|
5058
5062
|
}
|
|
5059
5063
|
}(this.pFrames);
|
|
5060
5064
|
}
|
|
5061
5065
|
async pprofDump() {
|
|
5062
|
-
return await
|
|
5066
|
+
return await ws.pprofDump();
|
|
5063
5067
|
}
|
|
5064
5068
|
static async init(e, t, r) {
|
|
5065
|
-
const o =
|
|
5066
|
-
return await
|
|
5069
|
+
const o = ho.resolve(r);
|
|
5070
|
+
return await vo(o), new or(e, t, o);
|
|
5067
5071
|
}
|
|
5068
5072
|
//
|
|
5069
5073
|
// Internal / Config API Methods
|
|
5070
5074
|
//
|
|
5071
5075
|
createPFrame(e, t) {
|
|
5072
|
-
const r = e.filter((n) =>
|
|
5076
|
+
const r = e.filter((n) => su.find((i) => i === n.spec.valueType)).map(
|
|
5073
5077
|
(n) => pe(
|
|
5074
5078
|
n,
|
|
5075
|
-
(i) =>
|
|
5079
|
+
(i) => Io(i) ? ti(i) : ss(i) ? os(i, (c) => c.resourceInfo) : ri(n.spec, i)
|
|
5076
5080
|
)
|
|
5077
5081
|
), o = this.pFrames.acquire(r);
|
|
5078
5082
|
return t.addOnDestroy(o.unref), o.key;
|
|
5079
5083
|
}
|
|
5080
5084
|
createPTable(e, t, r) {
|
|
5081
|
-
const o = this.createPFrame(
|
|
5085
|
+
const o = this.createPFrame(co(e.src), t), n = Ft(e, (c) => c.id), i = this.pTables.acquire({ def: n, pFrameHandle: o, signal: r });
|
|
5082
5086
|
return fe().logPFrameRequests && this.logger.info(
|
|
5083
5087
|
`Create PTable call (pFrameHandle = ${o}; pTableHandle = ${JSON.stringify(i)}): ${JSON.stringify(
|
|
5084
5088
|
Ft(e, (c) => c.spec),
|
|
@@ -5208,11 +5212,11 @@ function Ve(s) {
|
|
|
5208
5212
|
H(s);
|
|
5209
5213
|
}
|
|
5210
5214
|
}
|
|
5211
|
-
function
|
|
5215
|
+
function iu(s) {
|
|
5212
5216
|
const e = Ee("sha256");
|
|
5213
5217
|
return e.update(B(s)), e.digest().toString("hex");
|
|
5214
5218
|
}
|
|
5215
|
-
function
|
|
5219
|
+
function au(s) {
|
|
5216
5220
|
const e = [...s].map(
|
|
5217
5221
|
(r) => pe(r, (o) => {
|
|
5218
5222
|
let n;
|
|
@@ -5258,31 +5262,31 @@ function cu(s) {
|
|
|
5258
5262
|
const t = Ee("sha256");
|
|
5259
5263
|
return t.update(B(e)), t.digest().toString("hex");
|
|
5260
5264
|
}
|
|
5261
|
-
async function
|
|
5265
|
+
async function cu(s, e, t) {
|
|
5262
5266
|
const r = {
|
|
5263
|
-
...
|
|
5264
|
-
...
|
|
5267
|
+
...Ks,
|
|
5268
|
+
...Hs(e),
|
|
5265
5269
|
...t
|
|
5266
|
-
}, o = new Jt(r.localSecret), n =
|
|
5270
|
+
}, o = new Jt(r.localSecret), n = gs(r.logger, s, r.localProjections), i = Uo(s, r.logger), c = hs(s, r.logger), a = Jo(s, r.logger), l = await Go.init(
|
|
5267
5271
|
r.logger,
|
|
5268
5272
|
n,
|
|
5269
5273
|
i,
|
|
5270
5274
|
r.blobDownloadPath,
|
|
5271
5275
|
o,
|
|
5272
5276
|
r.blobDriverOps
|
|
5273
|
-
), u = new
|
|
5277
|
+
), u = new Mo(
|
|
5274
5278
|
r.logger,
|
|
5275
5279
|
o,
|
|
5276
5280
|
n,
|
|
5277
5281
|
r.downloadBlobToURLPath,
|
|
5278
5282
|
r.downloadBlobToURLDriverOps
|
|
5279
|
-
), d = new
|
|
5283
|
+
), d = new _o(
|
|
5280
5284
|
r.logger,
|
|
5281
5285
|
o,
|
|
5282
5286
|
c,
|
|
5283
5287
|
a,
|
|
5284
5288
|
r.uploadDriverOps
|
|
5285
|
-
), p = new
|
|
5289
|
+
), p = new Ko(r.logger, i, r.logStreamDriverOps), f = new Ho(r.logger, p, l), k = await ms.init(
|
|
5286
5290
|
r.logger,
|
|
5287
5291
|
s,
|
|
5288
5292
|
o,
|
|
@@ -5298,15 +5302,15 @@ async function lu(s, e, t) {
|
|
|
5298
5302
|
blobDriver: l,
|
|
5299
5303
|
blobToURLDriver: u,
|
|
5300
5304
|
logDriver: f,
|
|
5301
|
-
lsDriver:
|
|
5305
|
+
lsDriver: k,
|
|
5302
5306
|
signer: o,
|
|
5303
5307
|
uploadDriver: d,
|
|
5304
5308
|
pFrameDriver: m
|
|
5305
5309
|
};
|
|
5306
5310
|
}
|
|
5307
|
-
class
|
|
5311
|
+
class lu {
|
|
5308
5312
|
constructor(e) {
|
|
5309
|
-
S(this, "enrichmentTargetsCache", new
|
|
5313
|
+
S(this, "enrichmentTargetsCache", new ds({
|
|
5310
5314
|
max: 256,
|
|
5311
5315
|
memoMethod: (e, t, { context: r }) => ({ value: this.calculateEnrichmentTargets(r) })
|
|
5312
5316
|
}));
|
|
@@ -5316,7 +5320,7 @@ class uu {
|
|
|
5316
5320
|
const t = e.blockConfig();
|
|
5317
5321
|
if (t.enrichmentTargets === void 0) return;
|
|
5318
5322
|
const r = e.args();
|
|
5319
|
-
return
|
|
5323
|
+
return _i(this.quickJs, t.enrichmentTargets, t.code, r);
|
|
5320
5324
|
}
|
|
5321
5325
|
getEnrichmentTargets(e, t, r) {
|
|
5322
5326
|
const o = { blockConfig: e, args: t };
|
|
@@ -5326,7 +5330,7 @@ class uu {
|
|
|
5326
5330
|
return this.enrichmentTargetsCache.memo(n, { context: o }).value;
|
|
5327
5331
|
}
|
|
5328
5332
|
}
|
|
5329
|
-
class
|
|
5333
|
+
class eo {
|
|
5330
5334
|
constructor(e, t, r, o, n, i, c, a) {
|
|
5331
5335
|
S(this, "pl");
|
|
5332
5336
|
/** Contains a reactive list of projects along with their meta information. */
|
|
@@ -5347,8 +5351,8 @@ class to {
|
|
|
5347
5351
|
/** Creates a project with initial state and adds it to project list. */
|
|
5348
5352
|
async createProject(e, t = Re()) {
|
|
5349
5353
|
const r = await this.pl.withWriteTx("MLCreateProject", async (o) => {
|
|
5350
|
-
const n = await
|
|
5351
|
-
return o.createField(x(this.projectListResourceId, t), "Dynamic", n), await o.commit(), await
|
|
5354
|
+
const n = await Wn(o, e);
|
|
5355
|
+
return o.createField(x(this.projectListResourceId, t), "Dynamic", n), await o.commit(), await Co(n);
|
|
5352
5356
|
});
|
|
5353
5357
|
return await this.projectListTree.refreshState(), r;
|
|
5354
5358
|
}
|
|
@@ -5412,32 +5416,32 @@ class to {
|
|
|
5412
5416
|
/** Initialize middle layer */
|
|
5413
5417
|
static async init(e, t, r) {
|
|
5414
5418
|
const o = {
|
|
5415
|
-
...
|
|
5416
|
-
...
|
|
5419
|
+
...oa,
|
|
5420
|
+
...na(t),
|
|
5417
5421
|
...r
|
|
5418
5422
|
};
|
|
5419
5423
|
o.defaultTreeOptions.logStat = fe().logTreeStats, o.debugOps.dumpInitialTreeState = fe().dumpInitialTreeState;
|
|
5420
5424
|
const n = await e.withWriteTx("MLInitialization", async (P) => {
|
|
5421
|
-
const A = x(P.clientRoot,
|
|
5425
|
+
const A = x(P.clientRoot, yn);
|
|
5422
5426
|
P.createField(A, "Dynamic");
|
|
5423
5427
|
const j = await P.getField(A);
|
|
5424
5428
|
if (Ue(j.value)) {
|
|
5425
|
-
const T = P.createEphemeral(
|
|
5429
|
+
const T = P.createEphemeral(Es);
|
|
5426
5430
|
return P.lock(T), P.setField(A, T), await P.commit(), await T.globalId;
|
|
5427
5431
|
} else
|
|
5428
5432
|
return j.value;
|
|
5429
|
-
}), i = o.logger, c = await
|
|
5433
|
+
}), i = o.logger, c = await cu(e, t, o), a = new uo(e.httpDispatcher, {
|
|
5430
5434
|
minTimeout: 250,
|
|
5431
5435
|
maxRetries: 4
|
|
5432
|
-
}), l = new
|
|
5436
|
+
}), l = new nn(a), u = new Un(
|
|
5433
5437
|
l,
|
|
5434
5438
|
c.signer,
|
|
5435
5439
|
a
|
|
5436
|
-
), d = new
|
|
5440
|
+
), d = new Wo(
|
|
5437
5441
|
i,
|
|
5438
5442
|
e.httpDispatcher,
|
|
5439
5443
|
o.frontendDownloadPath
|
|
5440
|
-
), p = await
|
|
5444
|
+
), p = await xo(), f = {
|
|
5441
5445
|
pl: e,
|
|
5442
5446
|
signer: c.signer,
|
|
5443
5447
|
logger: i,
|
|
@@ -5447,61 +5451,61 @@ class to {
|
|
|
5447
5451
|
bpPreparer: u,
|
|
5448
5452
|
frontendDownloadDriver: d,
|
|
5449
5453
|
driverKit: c,
|
|
5450
|
-
blockUpdateWatcher: new
|
|
5454
|
+
blockUpdateWatcher: new ru(l, i, {
|
|
5451
5455
|
minDelay: o.devBlockUpdateRecheckInterval,
|
|
5452
5456
|
http: a,
|
|
5453
5457
|
preferredUpdateChannel: o.preferredUpdateChannel
|
|
5454
5458
|
}),
|
|
5455
5459
|
quickJs: p,
|
|
5456
|
-
projectHelper: new
|
|
5457
|
-
},
|
|
5458
|
-
return new
|
|
5460
|
+
projectHelper: new lu(p)
|
|
5461
|
+
}, k = new Ao([]), m = await Sn(e, n, k, f);
|
|
5462
|
+
return new eo(
|
|
5459
5463
|
f,
|
|
5460
5464
|
c,
|
|
5461
5465
|
c.signer,
|
|
5462
5466
|
n,
|
|
5463
|
-
|
|
5467
|
+
k,
|
|
5464
5468
|
m.tree,
|
|
5465
5469
|
l,
|
|
5466
5470
|
m.computable
|
|
5467
5471
|
);
|
|
5468
5472
|
}
|
|
5469
5473
|
}
|
|
5470
|
-
async function
|
|
5474
|
+
async function uu(s, e) {
|
|
5471
5475
|
return await $e(s.pingCheckDurationMs, s.maxPingsPerSecond, async () => {
|
|
5472
|
-
const r = await new
|
|
5476
|
+
const r = await new ls(e).ping();
|
|
5473
5477
|
return JSON.stringify(r).slice(0, s.bodyLimit) + "...";
|
|
5474
5478
|
});
|
|
5475
5479
|
}
|
|
5476
|
-
async function
|
|
5480
|
+
async function du(s, e) {
|
|
5477
5481
|
return await $e(
|
|
5478
5482
|
s.blockRegistryDurationMs,
|
|
5479
5483
|
s.maxRegistryChecksPerSecond,
|
|
5480
5484
|
async () => await qe(new URL(s.blockOverviewPath, s.blockRegistryUrl), s, e)
|
|
5481
5485
|
);
|
|
5482
5486
|
}
|
|
5483
|
-
async function
|
|
5487
|
+
async function pu(s, e) {
|
|
5484
5488
|
return await $e(
|
|
5485
5489
|
s.blockRegistryDurationMs,
|
|
5486
5490
|
s.maxRegistryChecksPerSecond,
|
|
5487
5491
|
async () => await qe(new URL(s.blockOverviewPath, s.blockGARegistryUrl), s, e)
|
|
5488
5492
|
);
|
|
5489
5493
|
}
|
|
5490
|
-
async function
|
|
5494
|
+
async function fu(s, e) {
|
|
5491
5495
|
return await $e(
|
|
5492
5496
|
s.blockRegistryDurationMs,
|
|
5493
5497
|
s.maxRegistryChecksPerSecond,
|
|
5494
5498
|
async () => await qe(new URL(s.blockUiPath, s.blockRegistryUrl), s, e)
|
|
5495
5499
|
);
|
|
5496
5500
|
}
|
|
5497
|
-
async function
|
|
5501
|
+
async function gu(s, e) {
|
|
5498
5502
|
return await $e(
|
|
5499
5503
|
s.blockRegistryDurationMs,
|
|
5500
5504
|
s.maxRegistryChecksPerSecond,
|
|
5501
5505
|
async () => await qe(new URL(s.blockUiPath, s.blockGARegistryUrl), s, e)
|
|
5502
5506
|
);
|
|
5503
5507
|
}
|
|
5504
|
-
async function
|
|
5508
|
+
async function hu(s, e) {
|
|
5505
5509
|
return await $e(
|
|
5506
5510
|
s.autoUpdateCdnDurationMs,
|
|
5507
5511
|
s.maxAutoUpdateCdnChecksPerSecond,
|
|
@@ -5510,7 +5514,7 @@ async function mu(s, e) {
|
|
|
5510
5514
|
}
|
|
5511
5515
|
async function $e(s, e, t) {
|
|
5512
5516
|
const r = Date.now(), o = [];
|
|
5513
|
-
for (;
|
|
5517
|
+
for (; ts(r) < s; ) {
|
|
5514
5518
|
const n = Date.now();
|
|
5515
5519
|
let i;
|
|
5516
5520
|
try {
|
|
@@ -5518,13 +5522,13 @@ async function $e(s, e, t) {
|
|
|
5518
5522
|
} catch (l) {
|
|
5519
5523
|
i = { ok: !1, error: l };
|
|
5520
5524
|
}
|
|
5521
|
-
const c =
|
|
5525
|
+
const c = ts(n);
|
|
5522
5526
|
o.push({
|
|
5523
5527
|
elapsedMs: c,
|
|
5524
5528
|
response: i
|
|
5525
5529
|
});
|
|
5526
5530
|
const a = 1e3 / e - c;
|
|
5527
|
-
a > 0 && await
|
|
5531
|
+
a > 0 && await fs(a);
|
|
5528
5532
|
}
|
|
5529
5533
|
return o;
|
|
5530
5534
|
}
|
|
@@ -5539,11 +5543,11 @@ async function qe(s, e, t) {
|
|
|
5539
5543
|
beginningOfBody: n.slice(0, e.bodyLimit) + "..."
|
|
5540
5544
|
};
|
|
5541
5545
|
}
|
|
5542
|
-
function
|
|
5546
|
+
function ts(s) {
|
|
5543
5547
|
return Date.now() - s;
|
|
5544
5548
|
}
|
|
5545
5549
|
function we(s) {
|
|
5546
|
-
const e = s.filter((i) => i.response.ok), t = s.length - e.length, { mean: r, median: o } =
|
|
5550
|
+
const e = s.filter((i) => i.response.ok), t = s.length - e.length, { mean: r, median: o } = mu(s), n = `
|
|
5547
5551
|
total: ${s.length};
|
|
5548
5552
|
successes: ${e.length};
|
|
5549
5553
|
errors: ${t};
|
|
@@ -5555,7 +5559,7 @@ function we(s) {
|
|
|
5555
5559
|
details: n
|
|
5556
5560
|
};
|
|
5557
5561
|
}
|
|
5558
|
-
function
|
|
5562
|
+
function mu(s) {
|
|
5559
5563
|
const e = s.map((o) => o.elapsedMs).sort(), t = e.reduce((o, n) => o + n) / e.length;
|
|
5560
5564
|
let r;
|
|
5561
5565
|
if (e.length > 0) {
|
|
@@ -5564,15 +5568,15 @@ function vu(s) {
|
|
|
5564
5568
|
}
|
|
5565
5569
|
return { mean: t, median: r };
|
|
5566
5570
|
}
|
|
5567
|
-
async function
|
|
5571
|
+
async function vu(s, e, t) {
|
|
5568
5572
|
try {
|
|
5569
|
-
const r = await
|
|
5573
|
+
const r = await yu(s, e, t);
|
|
5570
5574
|
return r !== `Hello, ${t}` ? { status: "failed", message: `Template uploading failed: expected: ${t}, got: ${r}` } : { status: "ok", message: `Template uploading succeeded: ${r}` };
|
|
5571
5575
|
} catch (r) {
|
|
5572
5576
|
return { status: "failed", message: `Template uploading failed: error occurred: ${r}` };
|
|
5573
5577
|
}
|
|
5574
5578
|
}
|
|
5575
|
-
async function
|
|
5579
|
+
async function yu(s, e, t) {
|
|
5576
5580
|
var o;
|
|
5577
5581
|
const r = await Oe(
|
|
5578
5582
|
e,
|
|
@@ -5589,15 +5593,15 @@ async function wu(s, e, t) {
|
|
|
5589
5593
|
r != null && await Fe(e, Object.values(r));
|
|
5590
5594
|
}
|
|
5591
5595
|
}
|
|
5592
|
-
async function
|
|
5596
|
+
async function wu(s, e, t, r, o, n) {
|
|
5593
5597
|
try {
|
|
5594
|
-
const i = await
|
|
5598
|
+
const i = await Su(s, e, t, r, o, n);
|
|
5595
5599
|
return i.type.name !== "Blob" ? { status: "failed", message: `File uploading failed: ${i.type.name}` } : { status: "ok", message: `File uploading succeeded: ${i.type.name}` };
|
|
5596
5600
|
} catch (i) {
|
|
5597
5601
|
return { status: "failed", message: `File uploading failed: error occurred: ${i}` };
|
|
5598
5602
|
}
|
|
5599
5603
|
}
|
|
5600
|
-
async function
|
|
5604
|
+
async function Su(s, e, t, r, o, n) {
|
|
5601
5605
|
var a;
|
|
5602
5606
|
const i = await t.getLocalFileHandle(n), c = await Oe(
|
|
5603
5607
|
o,
|
|
@@ -5610,9 +5614,9 @@ async function bu(s, e, t, r, o, n) {
|
|
|
5610
5614
|
);
|
|
5611
5615
|
try {
|
|
5612
5616
|
const l = await de(o, c.progress);
|
|
5613
|
-
if (
|
|
5614
|
-
const u =
|
|
5615
|
-
|
|
5617
|
+
if (qo(l)) {
|
|
5618
|
+
const u = vs.parse(JSON.parse(I((a = l.data) == null ? void 0 : a.toString())));
|
|
5619
|
+
zo(e, u.localPath, u.pathSignature) && await ys(
|
|
5616
5620
|
s,
|
|
5617
5621
|
r,
|
|
5618
5622
|
l,
|
|
@@ -5631,15 +5635,15 @@ async function bu(s, e, t, r, o, n) {
|
|
|
5631
5635
|
await Fe(o, Object.values(c));
|
|
5632
5636
|
}
|
|
5633
5637
|
}
|
|
5634
|
-
async function
|
|
5638
|
+
async function bu(s, e, t, r, o, n, i) {
|
|
5635
5639
|
try {
|
|
5636
|
-
const c = await
|
|
5640
|
+
const c = await ku(s, e, t, r, o, n);
|
|
5637
5641
|
return c !== i ? { status: "failed", message: `File downloading failed: expected: ${i}, got: ${c}` } : { status: "ok", message: `File downloading succeeded: ${c}` };
|
|
5638
5642
|
} catch (c) {
|
|
5639
5643
|
return { status: "failed", message: `File downloading failed: error occurred: ${c}` };
|
|
5640
5644
|
}
|
|
5641
5645
|
}
|
|
5642
|
-
async function
|
|
5646
|
+
async function ku(s, e, t, r, o, n) {
|
|
5643
5647
|
var a;
|
|
5644
5648
|
const i = await t.getLocalFileHandle(n), c = await Oe(
|
|
5645
5649
|
e,
|
|
@@ -5650,11 +5654,11 @@ async function Ru(s, e, t, r, o, n) {
|
|
|
5650
5654
|
);
|
|
5651
5655
|
try {
|
|
5652
5656
|
const l = await de(e, c.progress);
|
|
5653
|
-
await
|
|
5657
|
+
await ys(
|
|
5654
5658
|
s,
|
|
5655
5659
|
r,
|
|
5656
5660
|
l,
|
|
5657
|
-
|
|
5661
|
+
vs.parse(JSON.parse(I((a = l.data) == null ? void 0 : a.toString()))),
|
|
5658
5662
|
() => !1,
|
|
5659
5663
|
{
|
|
5660
5664
|
nPartsWithThisUploadSpeed: 1,
|
|
@@ -5664,21 +5668,21 @@ async function Ru(s, e, t, r, o, n) {
|
|
|
5664
5668
|
}
|
|
5665
5669
|
);
|
|
5666
5670
|
const u = await de(e, c.file), { content: d } = await o.downloadBlob(u);
|
|
5667
|
-
return await
|
|
5671
|
+
return await Yo(d);
|
|
5668
5672
|
} finally {
|
|
5669
5673
|
await Fe(e, Object.values(c));
|
|
5670
5674
|
}
|
|
5671
5675
|
}
|
|
5672
|
-
async function
|
|
5676
|
+
async function Ru(s) {
|
|
5673
5677
|
try {
|
|
5674
|
-
const e = await
|
|
5678
|
+
const e = await Cu(s);
|
|
5675
5679
|
return e !== `Hello from go binary
|
|
5676
5680
|
` ? { status: "failed", message: `Software check failed: got: ${e}` } : { status: "ok", message: `Software check succeeded: ${e}` };
|
|
5677
5681
|
} catch (e) {
|
|
5678
5682
|
return { status: "failed", message: `Software check failed: error occurred: ${e}` };
|
|
5679
5683
|
}
|
|
5680
5684
|
}
|
|
5681
|
-
async function
|
|
5685
|
+
async function Cu(s) {
|
|
5682
5686
|
var t;
|
|
5683
5687
|
const e = await Oe(
|
|
5684
5688
|
s,
|
|
@@ -5693,16 +5697,16 @@ async function Eu(s) {
|
|
|
5693
5697
|
await Fe(s, Object.values(e));
|
|
5694
5698
|
}
|
|
5695
5699
|
}
|
|
5696
|
-
async function
|
|
5700
|
+
async function Eu(s, e) {
|
|
5697
5701
|
try {
|
|
5698
|
-
const t = await
|
|
5702
|
+
const t = await Pu(s, e);
|
|
5699
5703
|
return t !== `Hello, ${e}!
|
|
5700
5704
|
` ? { status: "failed", message: `Python software check failed: got: ${t}` } : { status: "ok", message: `Python software check succeeded: ${t}` };
|
|
5701
5705
|
} catch (t) {
|
|
5702
5706
|
return { status: "failed", message: `Python software check failed: error occurred: ${t}` };
|
|
5703
5707
|
}
|
|
5704
5708
|
}
|
|
5705
|
-
async function
|
|
5709
|
+
async function Pu(s, e) {
|
|
5706
5710
|
var r;
|
|
5707
5711
|
const t = await Oe(
|
|
5708
5712
|
s,
|
|
@@ -5717,12 +5721,12 @@ async function $u(s, e) {
|
|
|
5717
5721
|
await Fe(s, Object.values(t));
|
|
5718
5722
|
}
|
|
5719
5723
|
}
|
|
5720
|
-
async function
|
|
5724
|
+
async function $u(s, e, t, r) {
|
|
5721
5725
|
var o, n;
|
|
5722
5726
|
try {
|
|
5723
5727
|
const i = await t.getStorageList(), c = {};
|
|
5724
5728
|
for (const a of i) {
|
|
5725
|
-
const l = await
|
|
5729
|
+
const l = await Ou(t, a, r.nFilesToCheck, r.minFileSize, r.maxFileSize, r.minLsRequests);
|
|
5726
5730
|
if (l.file === void 0) {
|
|
5727
5731
|
c[a.name] = {
|
|
5728
5732
|
status: "warn",
|
|
@@ -5756,8 +5760,8 @@ async function Ou(s, e, t, r) {
|
|
|
5756
5760
|
return { unknown: { status: "failed", message: `Download from every storage failed: error occurred: ${i}` } };
|
|
5757
5761
|
}
|
|
5758
5762
|
}
|
|
5759
|
-
async function
|
|
5760
|
-
const i =
|
|
5763
|
+
async function Ou(s, e, t, r, o, n) {
|
|
5764
|
+
const i = to(s, e, "", 0);
|
|
5761
5765
|
let c, a = 0, l = 0;
|
|
5762
5766
|
for await (const { file: u, nLsRequests: d } of i) {
|
|
5763
5767
|
if (l = Math.max(l, d), a >= t && l > n)
|
|
@@ -5768,7 +5772,7 @@ async function Fu(s, e, t, r, o, n) {
|
|
|
5768
5772
|
}
|
|
5769
5773
|
return { file: c, nLsRequests: l, nCheckedFiles: a };
|
|
5770
5774
|
}
|
|
5771
|
-
async function*
|
|
5775
|
+
async function* to(s, e, t, r) {
|
|
5772
5776
|
r++;
|
|
5773
5777
|
const o = await s.listRemoteFilesWithAdditionalInfo(e.handle, t);
|
|
5774
5778
|
for (const n of o.entries)
|
|
@@ -5778,20 +5782,20 @@ async function* ro(s, e, t, r) {
|
|
|
5778
5782
|
nLsRequests: r
|
|
5779
5783
|
};
|
|
5780
5784
|
else if (n.type === "dir")
|
|
5781
|
-
for await (const i of
|
|
5785
|
+
for await (const i of to(s, e, n.fullPath, r))
|
|
5782
5786
|
r = Math.max(i.nLsRequests, r), yield i;
|
|
5783
5787
|
}
|
|
5784
|
-
async function
|
|
5785
|
-
const s = U.join(
|
|
5788
|
+
async function Fu() {
|
|
5789
|
+
const s = U.join(Ss.tmpdir(), `check-network-big-temp-${Date.now()}.bin`), e = 20 * 1024 * 1024, t = Lo(e);
|
|
5786
5790
|
return await lt.appendFile(s, t), { filePath: s };
|
|
5787
5791
|
}
|
|
5788
|
-
async function
|
|
5789
|
-
const s = U.join(
|
|
5792
|
+
async function Iu() {
|
|
5793
|
+
const s = U.join(Ss.tmpdir(), `check-network-temp-${Date.now()}.txt`), e = "Hello, world! " + (/* @__PURE__ */ new Date()).toISOString();
|
|
5790
5794
|
return await lt.writeFile(s, e), { filePath: s, fileContent: e };
|
|
5791
5795
|
}
|
|
5792
5796
|
async function Oe(s, e, t, r, o) {
|
|
5793
5797
|
return await s.withWriteTx("TemplateRender", async (n) => {
|
|
5794
|
-
const i = await
|
|
5798
|
+
const i = await Is(e), c = ft(n, i), a = Ht(
|
|
5795
5799
|
n,
|
|
5796
5800
|
c,
|
|
5797
5801
|
t,
|
|
@@ -5800,20 +5804,20 @@ async function Oe(s, e, t, r, o) {
|
|
|
5800
5804
|
), l = {};
|
|
5801
5805
|
for (const u of o) {
|
|
5802
5806
|
const d = x(s.clientRoot, u);
|
|
5803
|
-
n.createField(d, "Dynamic", a[u]), l[u] = await
|
|
5807
|
+
n.createField(d, "Dynamic", a[u]), l[u] = await Eo(d);
|
|
5804
5808
|
}
|
|
5805
5809
|
return await n.commit(), l;
|
|
5806
5810
|
});
|
|
5807
5811
|
}
|
|
5808
5812
|
async function de(s, e) {
|
|
5809
|
-
return await
|
|
5813
|
+
return await Po(s, async (t) => {
|
|
5810
5814
|
const r = await t.tx.getField(e);
|
|
5811
5815
|
if (Tt(r.error)) {
|
|
5812
5816
|
const o = await t.tx.getResourceData(r.error, !0);
|
|
5813
5817
|
throw new Error(`getFieldValue of "${e.fieldName}" field failed: ${o.data}`);
|
|
5814
5818
|
}
|
|
5815
5819
|
if (Ue(r.value))
|
|
5816
|
-
throw new
|
|
5820
|
+
throw new $o();
|
|
5817
5821
|
return await t.tx.getResourceData(r.value, !0);
|
|
5818
5822
|
});
|
|
5819
5823
|
}
|
|
@@ -5824,10 +5828,10 @@ async function Fe(s, e) {
|
|
|
5824
5828
|
await t.commit();
|
|
5825
5829
|
});
|
|
5826
5830
|
}
|
|
5827
|
-
async function
|
|
5831
|
+
async function yd(s, e, t, r = {}) {
|
|
5828
5832
|
const o = [];
|
|
5829
|
-
|
|
5830
|
-
|
|
5833
|
+
Lu.forEach((n) => {
|
|
5834
|
+
Xo(n).subscribe((c) => {
|
|
5831
5835
|
var u, d;
|
|
5832
5836
|
const a = (/* @__PURE__ */ new Date()).toISOString(), l = { ...c };
|
|
5833
5837
|
(u = l == null ? void 0 : l.response) != null && u.headers && (l.response = { ...l.response }, l.response.headers = l.response.headers.slice(), l.response.headers = l.response.headers.map((p) => p.toString())), (d = l == null ? void 0 : l.request) != null && d.body && (l.request = { ...l.request }, l.request.body = "too big"), o.push(
|
|
@@ -5850,19 +5854,19 @@ async function wd(s, e, t, r = {}) {
|
|
|
5850
5854
|
lsDriver: d,
|
|
5851
5855
|
httpClient: p,
|
|
5852
5856
|
ops: f
|
|
5853
|
-
} = await
|
|
5854
|
-
plPings: await
|
|
5855
|
-
blockRegistryOverviewChecks: await
|
|
5856
|
-
blockGARegistryOverviewChecks: await
|
|
5857
|
-
blockRegistryUiChecks: await
|
|
5858
|
-
blockGARegistryUiChecks: await
|
|
5859
|
-
autoUpdateCdnChecks: await
|
|
5860
|
-
uploadTemplateCheck: await
|
|
5861
|
-
uploadFileCheck: await
|
|
5862
|
-
downloadFileCheck: await
|
|
5863
|
-
softwareCheck: await
|
|
5864
|
-
pythonSoftwareCheck: await
|
|
5865
|
-
storageToDownloadReport: await
|
|
5857
|
+
} = await Tu(s, e, t, r), { filePath: k, fileContent: m } = await Iu(), { filePath: P } = await Fu(), A = {
|
|
5858
|
+
plPings: await uu(f, i),
|
|
5859
|
+
blockRegistryOverviewChecks: await du(f, p),
|
|
5860
|
+
blockGARegistryOverviewChecks: await pu(f, p),
|
|
5861
|
+
blockRegistryUiChecks: await fu(f, p),
|
|
5862
|
+
blockGARegistryUiChecks: await gu(f, p),
|
|
5863
|
+
autoUpdateCdnChecks: await hu(f, p),
|
|
5864
|
+
uploadTemplateCheck: await vu(n, c, "Jack"),
|
|
5865
|
+
uploadFileCheck: await wu(n, a, d, u, c, P),
|
|
5866
|
+
downloadFileCheck: await bu(n, c, d, u, l, k, m),
|
|
5867
|
+
softwareCheck: await Ru(c),
|
|
5868
|
+
pythonSoftwareCheck: await Eu(c, "Jack"),
|
|
5869
|
+
storageToDownloadReport: await $u(
|
|
5866
5870
|
n,
|
|
5867
5871
|
c,
|
|
5868
5872
|
d,
|
|
@@ -5875,12 +5879,12 @@ async function wd(s, e, t, r = {}) {
|
|
|
5875
5879
|
}
|
|
5876
5880
|
)
|
|
5877
5881
|
};
|
|
5878
|
-
return
|
|
5882
|
+
return Au(A, s, f, o);
|
|
5879
5883
|
} catch (n) {
|
|
5880
5884
|
return `Unhandled error while checking the network: ${n}`;
|
|
5881
5885
|
}
|
|
5882
5886
|
}
|
|
5883
|
-
async function
|
|
5887
|
+
async function Tu(s, e, t, r = {}) {
|
|
5884
5888
|
const o = {
|
|
5885
5889
|
pingCheckDurationMs: 1e4,
|
|
5886
5890
|
pingTimeoutMs: 3e3,
|
|
@@ -5903,14 +5907,14 @@ async function Au(s, e, t, r = {}) {
|
|
|
5903
5907
|
everyStorageNFilesToCheck: 300,
|
|
5904
5908
|
everyStorageMinLsRequests: 50,
|
|
5905
5909
|
...r
|
|
5906
|
-
}, n =
|
|
5910
|
+
}, n = Oo(s, {
|
|
5907
5911
|
defaultRequestTimeout: o.pingTimeoutMs
|
|
5908
5912
|
});
|
|
5909
5913
|
n.alternativeRoot = `check_network_${Date.now()}`;
|
|
5910
|
-
const i = new
|
|
5914
|
+
const i = new ls(n);
|
|
5911
5915
|
let c = {};
|
|
5912
5916
|
e && t && (c = await i.login(e, t));
|
|
5913
|
-
const a = await
|
|
5917
|
+
const a = await cs.init(s, { authInformation: c }), l = i.ll.httpDispatcher, u = new is(), d = new Jt("localSecret"), p = gs(u, a, []), f = hs(a, u), k = await ms.init(
|
|
5914
5918
|
u,
|
|
5915
5919
|
a,
|
|
5916
5920
|
d,
|
|
@@ -5925,7 +5929,7 @@ async function Au(s, e, t, r = {}) {
|
|
|
5925
5929
|
signer: d,
|
|
5926
5930
|
downloadClient: p,
|
|
5927
5931
|
uploadBlobClient: f,
|
|
5928
|
-
lsDriver:
|
|
5932
|
+
lsDriver: k,
|
|
5929
5933
|
httpClient: l,
|
|
5930
5934
|
ops: o,
|
|
5931
5935
|
terminate: async () => {
|
|
@@ -5933,10 +5937,10 @@ async function Au(s, e, t, r = {}) {
|
|
|
5933
5937
|
}
|
|
5934
5938
|
};
|
|
5935
5939
|
}
|
|
5936
|
-
function
|
|
5940
|
+
function Au(s, e, t, r) {
|
|
5937
5941
|
const o = s.plPings.filter((P) => P.response.ok), n = s.plPings.filter((P) => !P.response.ok), i = [
|
|
5938
5942
|
...new Set(o.map((P) => JSON.stringify(P.response.value)))
|
|
5939
|
-
], c = (P) => P ? "OK" : "FAILED", a = (P) => P.status === "ok" ? "OK" : P.status === "warn" ? "WARN" : "FAILED", l = we(s.plPings), u = we(s.blockRegistryOverviewChecks), d = we(s.blockGARegistryOverviewChecks), p = we(s.blockRegistryUiChecks), f = we(s.blockGARegistryUiChecks),
|
|
5943
|
+
], c = (P) => P ? "OK" : "FAILED", a = (P) => P.status === "ok" ? "OK" : P.status === "warn" ? "WARN" : "FAILED", l = we(s.plPings), u = we(s.blockRegistryOverviewChecks), d = we(s.blockGARegistryOverviewChecks), p = we(s.blockRegistryUiChecks), f = we(s.blockGARegistryUiChecks), k = we(s.autoUpdateCdnChecks), m = Object.entries(s.storageToDownloadReport).map(([P, A]) => `${a(A)} ${P} storage check`).join(`
|
|
5940
5944
|
`);
|
|
5941
5945
|
return `
|
|
5942
5946
|
${c(l.ok)} pings to Platforma Backend
|
|
@@ -5944,7 +5948,7 @@ ${c(u.ok)} block registry overview
|
|
|
5944
5948
|
${c(d.ok)} block ga registry overview
|
|
5945
5949
|
${c(p.ok)} block registry ui
|
|
5946
5950
|
${c(f.ok)} block ga registry ui
|
|
5947
|
-
${c(
|
|
5951
|
+
${c(k.ok)} auto-update CDN
|
|
5948
5952
|
${a(s.uploadTemplateCheck)} upload template
|
|
5949
5953
|
${a(s.uploadFileCheck)} upload file
|
|
5950
5954
|
${a(s.downloadFileCheck)} download file
|
|
@@ -5976,7 +5980,7 @@ Block registry ui responses: ${p.details}
|
|
|
5976
5980
|
|
|
5977
5981
|
Block ga registry ui responses: ${f.details}
|
|
5978
5982
|
|
|
5979
|
-
Auto-update CDN responses: ${
|
|
5983
|
+
Auto-update CDN responses: ${k.details}
|
|
5980
5984
|
|
|
5981
5985
|
dumps:
|
|
5982
5986
|
Block registry overview dumps:
|
|
@@ -6005,7 +6009,7 @@ ${r.join(`
|
|
|
6005
6009
|
`)}
|
|
6006
6010
|
`;
|
|
6007
6011
|
}
|
|
6008
|
-
const
|
|
6012
|
+
const Lu = [
|
|
6009
6013
|
"undici:request:create",
|
|
6010
6014
|
// When a new request is created
|
|
6011
6015
|
"undici:request:bodySent",
|
|
@@ -6044,34 +6048,34 @@ const Du = [
|
|
|
6044
6048
|
// When a dispatcher retries a request
|
|
6045
6049
|
];
|
|
6046
6050
|
export {
|
|
6047
|
-
|
|
6048
|
-
|
|
6049
|
-
|
|
6050
|
-
|
|
6051
|
-
|
|
6052
|
-
|
|
6053
|
-
|
|
6054
|
-
|
|
6055
|
-
|
|
6051
|
+
ud as BlockPackRegistry,
|
|
6052
|
+
dd as CentralBlockRegistry,
|
|
6053
|
+
Hs as DefaultDriverKitOpsPaths,
|
|
6054
|
+
Ks as DefaultDriverKitOpsSettings,
|
|
6055
|
+
na as DefaultMiddleLayerOpsPaths,
|
|
6056
|
+
oa as DefaultMiddleLayerOpsSettings,
|
|
6057
|
+
As as FrontendFromFolderResourceType,
|
|
6058
|
+
Ts as FrontendFromUrlResourceType,
|
|
6059
|
+
eo as MiddleLayer,
|
|
6056
6060
|
zt as Project,
|
|
6057
|
-
|
|
6058
|
-
|
|
6059
|
-
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
|
|
6063
|
-
|
|
6064
|
-
|
|
6065
|
-
|
|
6066
|
-
|
|
6067
|
-
|
|
6068
|
-
|
|
6061
|
+
Tn as TengoTemplateGet,
|
|
6062
|
+
An as TengoTemplateGetRegistry,
|
|
6063
|
+
Dn as TengoTemplateGetTemplate,
|
|
6064
|
+
Ln as TengoTemplateGetTemplateURI,
|
|
6065
|
+
gd as TengoTemplatePack,
|
|
6066
|
+
hd as TengoTemplatePackConvert,
|
|
6067
|
+
vd as TengoTemplatePackConvertTemplate,
|
|
6068
|
+
md as TengoTemplatePackConvertTemplatePack,
|
|
6069
|
+
fd as V1CentralDevSnapshotRegistry,
|
|
6070
|
+
pd as V1CentralRegistry,
|
|
6071
|
+
nn as V2RegistryProvider,
|
|
6072
|
+
yd as checkNetwork,
|
|
6069
6073
|
Ht as createRenderTemplate,
|
|
6070
|
-
|
|
6074
|
+
ks as getDevV1PacketMtime,
|
|
6071
6075
|
_t as getDevV2PacketMtime,
|
|
6072
|
-
|
|
6073
|
-
|
|
6076
|
+
cu as initDriverKit,
|
|
6077
|
+
Tu as initNetworkCheck,
|
|
6074
6078
|
ft as loadTemplate,
|
|
6075
|
-
|
|
6079
|
+
Is as prepareTemplateSpec
|
|
6076
6080
|
};
|
|
6077
6081
|
//# sourceMappingURL=index.mjs.map
|