@milaboratories/pl-middle-layer 1.23.19 → 1.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
var ys = Object.defineProperty;
|
|
2
2
|
var ws = (s, e, t) => e in s ? ys(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
3
3
|
var S = (s, e, t) => ws(s, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { mapValueInVOE as
|
|
4
|
+
import { mapValueInVOE as Tr, executePSpecPredicate as Ss, mapPObjectData as le, mapPTableDef as pt, JsRenderInternal as bs, extractConfig as Ar, isConfigLambda as Lr, DefaultNavigationState as Rs, extractAllColumns as Cs } from "@platforma-sdk/model";
|
|
5
5
|
export * from "@platforma-sdk/model";
|
|
6
|
-
import { AnyChannel as ke, StableChannel as
|
|
6
|
+
import { AnyChannel as ke, StableChannel as ie, blockPackIdToString as Jt, blockPackIdEquals as Gt } from "@milaboratories/pl-model-middle-layer";
|
|
7
7
|
export * from "@milaboratories/pl-model-middle-layer";
|
|
8
|
-
import { request as
|
|
8
|
+
import { request as ae, RetryAgent as Es } from "undici";
|
|
9
9
|
import { RegistryV1 as ue, tryLoadPackDescription as ht, BlockPackMetaEmbedAbsoluteBytes as ks, RegistryV2Reader as Ps, folderReaderByUrl as Os, loadPackDescription as Mt } from "@platforma-sdk/block-tools";
|
|
10
10
|
import q from "node:fs";
|
|
11
11
|
import H from "node:path";
|
|
12
12
|
import $s from "yaml";
|
|
13
|
-
import { assertNever as J, notEmpty as B, ConsoleLoggerAdapter as Is, ConcurrencyLimitingExecutor as Fs, HmacSha256Signer as
|
|
14
|
-
import * as
|
|
13
|
+
import { assertNever as J, notEmpty as B, ConsoleLoggerAdapter as Is, ConcurrencyLimitingExecutor as Fs, HmacSha256Signer as Nr } from "@milaboratories/ts-helpers";
|
|
14
|
+
import * as Dr from "node:fs/promises";
|
|
15
15
|
import { tryResolve as Ts } from "@milaboratories/resolve-helper";
|
|
16
|
-
import { resourceTypesEqual as
|
|
16
|
+
import { resourceTypesEqual as ce, field as j, Pl as T, PlClient as As, isNullResourceId as Ke, ensureResourceIdNotNull as ft, isResource as Ls, isResourceRef as Ns, isNotNullResourceId as _t, resourceType as Le, resourceTypeToString as Ds, resourceIdToString as Br, isNotFoundError as Bs, isTimeoutOrCancelError as js, toGlobalResourceId as xs, plAddressToConfig as Vs, UnauthenticatedPlClient as Kt } from "@milaboratories/pl-client";
|
|
17
17
|
export * from "@milaboratories/pl-client";
|
|
18
|
-
import { SynchronizedTreeState as
|
|
18
|
+
import { SynchronizedTreeState as jr, PlError as Us, isPlTreeNodeAccessor as Js } from "@milaboratories/pl-tree";
|
|
19
19
|
import { Computable as V, ChangeSource as Ht, PollComputablePool as Gs, WatchableValue as Ms } from "@milaboratories/computable";
|
|
20
20
|
import { randomUUID as Fe, createHash as Ne } from "node:crypto";
|
|
21
|
-
import { parseTemplate as _s, PlTemplateV1 as
|
|
22
|
-
import
|
|
21
|
+
import { parseTemplate as _s, PlTemplateV1 as ne, PlTemplateOverrideV1 as Pe, PlTemplateLibV1 as Be, PlTemplateSoftwareV1 as Se } from "@milaboratories/pl-model-backend";
|
|
22
|
+
import xr from "denque";
|
|
23
23
|
import { Templates as Ks } from "@platforma-sdk/workflow-tengo";
|
|
24
24
|
import ye from "canonicalize";
|
|
25
25
|
import Hs from "node:assert";
|
|
26
26
|
import { Scope as gt, getQuickJS as Ws } from "quickjs-emscripten";
|
|
27
|
-
import { setTimeout as
|
|
27
|
+
import { setTimeout as Vr } from "node:timers/promises";
|
|
28
28
|
import { createDownloadClient as zs, createLogsClient as Xs, createUploadBlobClient as qs, createUploadProgressClient as Ys, DownloadDriver as Qs, UploadDriver as Zs, LogsStreamDriver as eo, LogsDriver as to, LsDriver as ro, DownloadUrlDriver as so } from "@milaboratories/pl-drivers";
|
|
29
29
|
import { PFrame as oo } from "@milaboratories/pframes-node";
|
|
30
30
|
import { LRUCache as no } from "lru-cache";
|
|
31
31
|
import { channel as io } from "node:diagnostics_channel";
|
|
32
32
|
async function Wt(s) {
|
|
33
33
|
try {
|
|
34
|
-
return await
|
|
34
|
+
return await Dr.stat(s, { bigint: !0 });
|
|
35
35
|
} catch (e) {
|
|
36
36
|
if (e.code === "ENOENT")
|
|
37
37
|
return;
|
|
38
38
|
throw e;
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
const ao = [ue.PlPackageYamlConfigFile], co = [ue.PlPackageJsonConfigFile], kt = ["backend", "dist", "tengo", "tpl", "main.plj.gz"], Pt = ["config", "dist", "config.json"],
|
|
41
|
+
const ao = [ue.PlPackageYamlConfigFile], co = [ue.PlPackageJsonConfigFile], kt = ["backend", "dist", "tengo", "tpl", "main.plj.gz"], Pt = ["config", "dist", "config.json"], Ur = ["frontend", "dist"], zt = "block-model/dist/config.json", lo = "block-ui/package.json", uo = [
|
|
42
42
|
kt,
|
|
43
43
|
Pt,
|
|
44
44
|
ao,
|
|
45
45
|
co,
|
|
46
|
-
|
|
46
|
+
Ur
|
|
47
47
|
];
|
|
48
48
|
async function po(s) {
|
|
49
49
|
return await Wt(H.join(s, ...Pt)) !== void 0 || await Wt(H.join(s, ...kt)) !== void 0;
|
|
@@ -58,7 +58,7 @@ async function Xt(s, e) {
|
|
|
58
58
|
return {
|
|
59
59
|
workflow: H.join(s, ...kt),
|
|
60
60
|
config: H.join(s, ...Pt),
|
|
61
|
-
ui: H.join(s, ...
|
|
61
|
+
ui: H.join(s, ...Ur)
|
|
62
62
|
};
|
|
63
63
|
{
|
|
64
64
|
const t = rt(s, zt), r = rt(s, zt), o = rt(s, lo);
|
|
@@ -83,7 +83,7 @@ async function fo(s) {
|
|
|
83
83
|
throw e;
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
-
async function
|
|
86
|
+
async function Jr(s) {
|
|
87
87
|
let e = 0n;
|
|
88
88
|
for (const t of uo) {
|
|
89
89
|
const r = H.join(s, ...t), o = await fo(r);
|
|
@@ -105,7 +105,7 @@ class Vl {
|
|
|
105
105
|
const t = [], r = e.spec;
|
|
106
106
|
switch (r.type) {
|
|
107
107
|
case "remote-v1":
|
|
108
|
-
const o = this.http !== void 0 ? { dispatcher: this.http } : {}, i = await (await
|
|
108
|
+
const o = this.http !== void 0 ? { dispatcher: this.http } : {}, i = await (await ae(
|
|
109
109
|
`${r.url}/${ue.GlobalOverviewPath}`,
|
|
110
110
|
o
|
|
111
111
|
)).body.json();
|
|
@@ -135,7 +135,7 @@ class Vl {
|
|
|
135
135
|
id: m,
|
|
136
136
|
latestByChannel: {
|
|
137
137
|
[ke]: h,
|
|
138
|
-
[
|
|
138
|
+
[ie]: h
|
|
139
139
|
},
|
|
140
140
|
allVersions: c.allVersions.map((f) => ({ version: f, channels: [] }))
|
|
141
141
|
});
|
|
@@ -143,14 +143,14 @@ class Vl {
|
|
|
143
143
|
return t;
|
|
144
144
|
case "remote-v2":
|
|
145
145
|
return (await this.v2Provider.getRegistry(r.url).listBlockPacks()).map(
|
|
146
|
-
(c) => c.latestByChannel[
|
|
146
|
+
(c) => c.latestByChannel[ie] ? {
|
|
147
147
|
...c,
|
|
148
148
|
registryId: e.id
|
|
149
149
|
} : {
|
|
150
150
|
...c,
|
|
151
151
|
latestByChannel: {
|
|
152
152
|
...c.latestByChannel,
|
|
153
|
-
[
|
|
153
|
+
[ie]: ((a) => a.spec.type === "from-registry-v2" ? { ...a, spec: { ...a.spec, channel: ie } } : a)(c.latestByChannel[ke])
|
|
154
154
|
},
|
|
155
155
|
registryId: e.id
|
|
156
156
|
}
|
|
@@ -162,7 +162,7 @@ class Vl {
|
|
|
162
162
|
H.join(a, ue.PlPackageYamlConfigFile)
|
|
163
163
|
);
|
|
164
164
|
if (l !== void 0) {
|
|
165
|
-
const u = ue.PlPackageConfigData.parse($s.parse(l)), d = await
|
|
165
|
+
const u = ue.PlPackageConfigData.parse($s.parse(l)), d = await Jr(a), m = {
|
|
166
166
|
organization: u.organization,
|
|
167
167
|
name: u.package,
|
|
168
168
|
version: "DEV"
|
|
@@ -187,7 +187,7 @@ class Vl {
|
|
|
187
187
|
id: m,
|
|
188
188
|
latestByChannel: {
|
|
189
189
|
[ke]: h,
|
|
190
|
-
[
|
|
190
|
+
[ie]: h
|
|
191
191
|
},
|
|
192
192
|
allVersions: []
|
|
193
193
|
});
|
|
@@ -212,7 +212,7 @@ class Vl {
|
|
|
212
212
|
id: d.id,
|
|
213
213
|
latestByChannel: {
|
|
214
214
|
[ke]: h,
|
|
215
|
-
[
|
|
215
|
+
[ie]: h
|
|
216
216
|
},
|
|
217
217
|
allVersions: []
|
|
218
218
|
});
|
|
@@ -269,7 +269,7 @@ const Ul = {
|
|
|
269
269
|
blocksInLimbo: []
|
|
270
270
|
}, yo = {
|
|
271
271
|
label: "New Project"
|
|
272
|
-
}, wo = { name: "UserProject", version: "2" },
|
|
272
|
+
}, wo = { name: "UserProject", version: "2" }, Gr = "SchemaVersion", Mr = "1", $t = "ProjectCreated", Te = "ProjectLastModified", Ae = "ProjectMeta", de = "ProjectStructure", He = "BlockRenderingState", So = "BlockFrontendState/", bo = /^BlockFrontendState\/(?<blockid>.*)$/;
|
|
273
273
|
function mt(s) {
|
|
274
274
|
return `${So}${s}`;
|
|
275
275
|
}
|
|
@@ -278,14 +278,14 @@ function vt(s) {
|
|
|
278
278
|
return `${Ro}${s}`;
|
|
279
279
|
}
|
|
280
280
|
const yt = "ProjectStructureAuthor";
|
|
281
|
-
function
|
|
281
|
+
function Co(s) {
|
|
282
282
|
const e = s.match(bo);
|
|
283
283
|
if (e !== null)
|
|
284
284
|
return e.groups.blockid;
|
|
285
285
|
}
|
|
286
|
-
const
|
|
286
|
+
const Eo = "__serviceTemplate_";
|
|
287
287
|
function wt(s) {
|
|
288
|
-
return `${
|
|
288
|
+
return `${Eo}${s}`;
|
|
289
289
|
}
|
|
290
290
|
function U(s, e) {
|
|
291
291
|
return `${s}-${e}`;
|
|
@@ -297,9 +297,9 @@ function Po(s) {
|
|
|
297
297
|
const { blockId: t, fieldName: r } = e.groups;
|
|
298
298
|
return { blockId: t, fieldName: r };
|
|
299
299
|
}
|
|
300
|
-
const Oo = "projects",
|
|
300
|
+
const Oo = "projects", _r = { name: "Projects", version: "1" }, $o = (s) => ce(s.type, _r) ? s.fields : [];
|
|
301
301
|
async function Io(s, e, t, r) {
|
|
302
|
-
const o = await
|
|
302
|
+
const o = await jr.init(
|
|
303
303
|
s,
|
|
304
304
|
e,
|
|
305
305
|
{
|
|
@@ -335,14 +335,14 @@ const Fo = {
|
|
|
335
335
|
name: "RenderTemplate",
|
|
336
336
|
version: "1"
|
|
337
337
|
};
|
|
338
|
-
function
|
|
338
|
+
function Kr(s, e, t, r, o) {
|
|
339
339
|
if (o.length === 0) throw new Error("Zero output names provided");
|
|
340
340
|
const n = t ? s.createEphemeral(Fo) : s.createStruct(To), i = j(n, "template"), c = j(n, "inputs");
|
|
341
341
|
return s.createField(i, "Input", e), s.createField(c, "Input", T.createPlMap(s, r, t)), s.lockInputs(n), T.futureRecord(s, n, o, "Output", "outputs/");
|
|
342
342
|
}
|
|
343
343
|
const Ao = { name: "BContextEnd", version: "1" }, Lo = { name: "BContext", version: "1" }, No = "id", Do = "parent/", Bo = ["context", "result"];
|
|
344
344
|
function qt(s, e, t) {
|
|
345
|
-
return
|
|
345
|
+
return Kr(s, e, !0, t, Bo);
|
|
346
346
|
}
|
|
347
347
|
function jo(s) {
|
|
348
348
|
const e = s.createEphemeral(Ao);
|
|
@@ -361,12 +361,12 @@ function Vo(s, e) {
|
|
|
361
361
|
const t = _s(e.content), r = t.type;
|
|
362
362
|
switch (r) {
|
|
363
363
|
case "pl.tengo-template.v2":
|
|
364
|
-
return
|
|
364
|
+
return Jo(s, t);
|
|
365
365
|
default:
|
|
366
366
|
J(r);
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
|
-
const
|
|
369
|
+
const Yt = {
|
|
370
370
|
hash(s, e) {
|
|
371
371
|
e.update(Be.type.name).update(Be.type.version).update(s.name).update(s.version).update(s.src);
|
|
372
372
|
},
|
|
@@ -376,7 +376,7 @@ const Kr = {
|
|
|
376
376
|
JSON.stringify(Be.fromV2Data(s).data)
|
|
377
377
|
);
|
|
378
378
|
}
|
|
379
|
-
},
|
|
379
|
+
}, je = {
|
|
380
380
|
hash(s, e) {
|
|
381
381
|
e.update(Se.type.name).update(Se.type.version).update(s.name).update(s.version).update(s.src);
|
|
382
382
|
},
|
|
@@ -386,66 +386,65 @@ const Kr = {
|
|
|
386
386
|
}
|
|
387
387
|
}, Uo = {
|
|
388
388
|
hash(s, e) {
|
|
389
|
-
e.update(
|
|
390
|
-
const t = (r) => (r.sort((o, n) => o[0] === n[0] ? 0 : o[0] < n[0] ? -1 : 1), r);
|
|
391
|
-
for (const [r, o] of t(Object.entries(s.libs ?? {})))
|
|
392
|
-
e.update("lib:" + r), Kr.hash(o, e);
|
|
393
|
-
for (const [r, o] of t(Object.entries(s.software ?? {})))
|
|
394
|
-
e.update("soft:" + r), He.hash(o, e);
|
|
395
|
-
for (const [r, o] of t(Object.entries(s.assets ?? {})))
|
|
396
|
-
e.update("asset:" + r), He.hash(o, e);
|
|
397
|
-
for (const [r, o] of t(Object.entries(s.templates ?? {})))
|
|
398
|
-
e.update("tpl:" + r), this.hash(o, e);
|
|
389
|
+
e.update(Pe.type.name).update(Pe.type.version).update(s.hashOverride ?? "");
|
|
399
390
|
},
|
|
400
391
|
render(s, e, t) {
|
|
401
392
|
return e.createStruct(
|
|
402
|
-
|
|
403
|
-
JSON.stringify(
|
|
393
|
+
Pe.type,
|
|
394
|
+
JSON.stringify(Pe.fromV2Data(s))
|
|
404
395
|
);
|
|
405
396
|
}
|
|
406
|
-
},
|
|
397
|
+
}, Hr = {
|
|
407
398
|
hash(s, e) {
|
|
408
|
-
e.update(
|
|
399
|
+
e.update(ne.type.name).update(ne.type.version).update(s.hashOverride ?? "").update(s.name).update(s.version).update(s.src);
|
|
400
|
+
const t = (r) => (r.sort((o, n) => o[0] === n[0] ? 0 : o[0] < n[0] ? -1 : 1), r);
|
|
401
|
+
for (const [r, o] of t(Object.entries(s.libs ?? {})))
|
|
402
|
+
e.update("lib:" + r), Yt.hash(o, e);
|
|
403
|
+
for (const [r, o] of t(Object.entries(s.software ?? {})))
|
|
404
|
+
e.update("soft:" + r), je.hash(o, e);
|
|
405
|
+
for (const [r, o] of t(Object.entries(s.assets ?? {})))
|
|
406
|
+
e.update("asset:" + r), je.hash(o, e);
|
|
407
|
+
for (const [r, o] of t(Object.entries(s.templates ?? {})))
|
|
408
|
+
e.update("tpl:" + r), this.hash(o, e);
|
|
409
409
|
},
|
|
410
410
|
render(s, e, t) {
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
JSON.stringify(
|
|
411
|
+
const r = e.createStruct(
|
|
412
|
+
ne.type,
|
|
413
|
+
JSON.stringify(ne.fromV2Data(s).data)
|
|
414
414
|
);
|
|
415
|
+
for (const [i, c] of Object.entries(s.libs ?? {})) {
|
|
416
|
+
const a = ne.libField(r, i);
|
|
417
|
+
e.createField(a, "Input"), e.setField(a, t(c, Yt));
|
|
418
|
+
}
|
|
419
|
+
for (const [i, c] of Object.entries(s.software ?? {})) {
|
|
420
|
+
const a = ne.swField(r, i);
|
|
421
|
+
e.createField(a, "Input"), e.setField(a, t(c, je));
|
|
422
|
+
}
|
|
423
|
+
for (const [i, c] of Object.entries(s.assets ?? {})) {
|
|
424
|
+
const a = ne.swField(r, i);
|
|
425
|
+
e.createField(a, "Input"), e.setField(a, t(c, je));
|
|
426
|
+
}
|
|
427
|
+
for (const [i, c] of Object.entries(s.templates ?? {})) {
|
|
428
|
+
const a = ne.tplField(r, i);
|
|
429
|
+
e.createField(a, "Input"), e.setField(a, t(c, Hr));
|
|
430
|
+
}
|
|
431
|
+
if (e.lock(r), !s.hashOverride) return r;
|
|
432
|
+
const o = t(s, Uo), n = Pe.tplField(o);
|
|
433
|
+
return e.createField(n, "Service"), e.setField(n, r), e.lock(r), o;
|
|
415
434
|
}
|
|
416
435
|
};
|
|
417
|
-
function
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
t.set(u, d);
|
|
436
|
+
function Jo(s, e) {
|
|
437
|
+
const t = /* @__PURE__ */ new Map(), r = (o, n) => {
|
|
438
|
+
const i = Ne("sha256");
|
|
439
|
+
n.hash(o, i);
|
|
440
|
+
const c = i.digest("hex");
|
|
441
|
+
if (!t.has(c)) {
|
|
442
|
+
const a = n.render(o, s, r);
|
|
443
|
+
t.set(c, a);
|
|
426
444
|
}
|
|
427
|
-
return t.get(
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
const l = ce.libField(o, c);
|
|
431
|
-
s.createField(l, "Input"), s.setField(l, r(a, Kr));
|
|
432
|
-
}
|
|
433
|
-
for (const [c, a] of Object.entries(e.software ?? {})) {
|
|
434
|
-
const l = ce.swField(o, c);
|
|
435
|
-
s.createField(l, "Input"), s.setField(l, r(a, He));
|
|
436
|
-
}
|
|
437
|
-
for (const [c, a] of Object.entries(e.assets ?? {})) {
|
|
438
|
-
const l = ce.swField(o, c);
|
|
439
|
-
s.createField(l, "Input"), s.setField(l, r(a, He));
|
|
440
|
-
}
|
|
441
|
-
for (const [c, a] of Object.entries(e.templates ?? {})) {
|
|
442
|
-
const l = ce.tplField(o, c);
|
|
443
|
-
s.createField(l, "Input"), s.setField(l, Hr(s, a, t));
|
|
444
|
-
}
|
|
445
|
-
if (s.lock(o), !e.hashOverride)
|
|
446
|
-
return o;
|
|
447
|
-
const n = r(e, Jo), i = Pe.tplField(n);
|
|
448
|
-
return s.createField(i, "Service"), s.setField(i, o), s.lock(o), n;
|
|
445
|
+
return t.get(c);
|
|
446
|
+
};
|
|
447
|
+
return r(e, Hr);
|
|
449
448
|
}
|
|
450
449
|
const Go = { name: "TengoTemplateGet", version: "1" }, Mo = "registry", _o = "templateURI", Ko = "template", Ml = { name: "TengoTemplatePack", version: "1" }, _l = {
|
|
451
450
|
name: "TengoTemplatePackConvert",
|
|
@@ -503,7 +502,7 @@ function zo(s, e) {
|
|
|
503
502
|
}
|
|
504
503
|
}
|
|
505
504
|
const Xo = { name: "BlockPackCustom", version: "1" }, Xr = "template", qr = "frontend";
|
|
506
|
-
function
|
|
505
|
+
function Qt(s) {
|
|
507
506
|
return s.endsWith("/") ? s : `${s}/`;
|
|
508
507
|
}
|
|
509
508
|
class qo {
|
|
@@ -525,12 +524,12 @@ class qo {
|
|
|
525
524
|
return JSON.parse(r);
|
|
526
525
|
}
|
|
527
526
|
case "from-registry-v1": {
|
|
528
|
-
const t = this.http !== void 0 ? { dispatcher: this.http } : {}, r = `${
|
|
529
|
-
return await (await
|
|
527
|
+
const t = this.http !== void 0 ? { dispatcher: this.http } : {}, r = `${Qt(e.registryUrl)}${ue.packageContentPrefix({ organization: e.id.organization, package: e.id.name, version: e.id.version })}`;
|
|
528
|
+
return await (await ae(`${r}/config.json`, t)).body.json();
|
|
530
529
|
}
|
|
531
530
|
case "from-registry-v2": {
|
|
532
531
|
const t = this.http !== void 0 ? { dispatcher: this.http } : {}, o = await this.v2RegistryProvider.getRegistry(e.registryUrl).getComponents(e.id);
|
|
533
|
-
return await (await
|
|
532
|
+
return await (await ae(o.model.url, t)).body.json();
|
|
534
533
|
}
|
|
535
534
|
default:
|
|
536
535
|
return J(e);
|
|
@@ -583,12 +582,12 @@ class qo {
|
|
|
583
582
|
};
|
|
584
583
|
}
|
|
585
584
|
case "from-registry-v1": {
|
|
586
|
-
const t = this.http !== void 0 ? { dispatcher: this.http } : {}, r = `${
|
|
585
|
+
const t = this.http !== void 0 ? { dispatcher: this.http } : {}, r = `${Qt(e.registryUrl)}${ue.packageContentPrefix({ organization: e.id.organization, package: e.id.name, version: e.id.version })}`, o = `${r}/template.plj.gz`, n = await ae(o, t);
|
|
587
586
|
if (n.statusCode !== 200)
|
|
588
587
|
throw new Error(
|
|
589
588
|
`Block not found in registry (url = ${o} ; code = ${n.statusCode}): ` + JSON.stringify(e)
|
|
590
589
|
);
|
|
591
|
-
const i = new Uint8Array(await n.body.arrayBuffer()), a = await (await
|
|
590
|
+
const i = new Uint8Array(await n.body.arrayBuffer()), a = await (await ae(`${r}/config.json`, t)).body.json();
|
|
592
591
|
return {
|
|
593
592
|
type: "explicit",
|
|
594
593
|
template: {
|
|
@@ -604,7 +603,7 @@ class qo {
|
|
|
604
603
|
};
|
|
605
604
|
}
|
|
606
605
|
case "from-registry-v2": {
|
|
607
|
-
const t = this.http !== void 0 ? { dispatcher: this.http } : {}, o = await this.v2RegistryProvider.getRegistry(e.registryUrl).getComponents(e.id), n = async () => await (await
|
|
606
|
+
const t = this.http !== void 0 ? { dispatcher: this.http } : {}, o = await this.v2RegistryProvider.getRegistry(e.registryUrl).getComponents(e.id), n = async () => await (await ae(o.model.url, t)).body.json(), i = async () => await (await ae(o.workflow.main.url, t)).body.arrayBuffer(), [c, a] = await Promise.all([n(), i()]);
|
|
608
607
|
return {
|
|
609
608
|
type: "explicit",
|
|
610
609
|
template: {
|
|
@@ -628,7 +627,7 @@ function Yo(s, e) {
|
|
|
628
627
|
const t = { config: e.config, source: e.source }, r = s.createStruct(Xo, JSON.stringify(t));
|
|
629
628
|
return s.createField(j(r, Xr), "Input", It(s, e.template)), s.createField(j(r, qr), "Input", zo(s, e.frontend)), s.lock(r), r;
|
|
630
629
|
}
|
|
631
|
-
function
|
|
630
|
+
function Zt(s, e) {
|
|
632
631
|
switch (e.type) {
|
|
633
632
|
case "explicit":
|
|
634
633
|
return Yo(s, e);
|
|
@@ -636,7 +635,7 @@ function Qt(s, e) {
|
|
|
636
635
|
return J(e.type);
|
|
637
636
|
}
|
|
638
637
|
}
|
|
639
|
-
function
|
|
638
|
+
function xe(s, e) {
|
|
640
639
|
return { __isRef: !0, blockId: s, name: e };
|
|
641
640
|
}
|
|
642
641
|
function Qo(s) {
|
|
@@ -720,7 +719,7 @@ function bt(s) {
|
|
|
720
719
|
}
|
|
721
720
|
return t !== void 0 && (t.downstream = /* @__PURE__ */ new Set()), new Yr(e);
|
|
722
721
|
}
|
|
723
|
-
function
|
|
722
|
+
function _e(s, e) {
|
|
724
723
|
const t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set();
|
|
725
724
|
for (const { id: o } of te(s)) {
|
|
726
725
|
const n = e(o);
|
|
@@ -746,7 +745,7 @@ function Rt(s, e) {
|
|
|
746
745
|
for (const t of s) if (e.has(t)) return !0;
|
|
747
746
|
return !1;
|
|
748
747
|
}
|
|
749
|
-
function
|
|
748
|
+
function er(s, e) {
|
|
750
749
|
const t = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
|
|
751
750
|
return s.nodes.forEach((n) => {
|
|
752
751
|
const i = e.nodes.get(n.id);
|
|
@@ -766,7 +765,7 @@ async function Qr() {
|
|
|
766
765
|
return st;
|
|
767
766
|
}
|
|
768
767
|
function tn(s, e, t) {
|
|
769
|
-
return
|
|
768
|
+
return Kr(s, e, !0, { pf: t }, ["result"]).result;
|
|
770
769
|
}
|
|
771
770
|
function ot(s, e) {
|
|
772
771
|
let t = !1, r, o;
|
|
@@ -777,7 +776,7 @@ function ot(s, e) {
|
|
|
777
776
|
return r !== n && (r = n, o = e()), e();
|
|
778
777
|
};
|
|
779
778
|
}
|
|
780
|
-
class
|
|
779
|
+
class tr {
|
|
781
780
|
constructor(e, t) {
|
|
782
781
|
S(this, "currentInputsC", ot(
|
|
783
782
|
() => this.fields.currentArgs.modCount,
|
|
@@ -886,13 +885,13 @@ class We {
|
|
|
886
885
|
return this.stagingGraph === void 0 && (this.stagingGraph = bt(this.struct)), this.stagingGraph;
|
|
887
886
|
}
|
|
888
887
|
getPendingProductionGraph() {
|
|
889
|
-
return this.pendingProductionGraph === void 0 && (this.pendingProductionGraph =
|
|
888
|
+
return this.pendingProductionGraph === void 0 && (this.pendingProductionGraph = _e(
|
|
890
889
|
this.struct,
|
|
891
890
|
(e) => this.getBlockInfo(e).currentInputs
|
|
892
891
|
)), this.pendingProductionGraph;
|
|
893
892
|
}
|
|
894
893
|
getActualProductionGraph() {
|
|
895
|
-
return this.actualProductionGraph === void 0 && (this.actualProductionGraph =
|
|
894
|
+
return this.actualProductionGraph === void 0 && (this.actualProductionGraph = _e(
|
|
896
895
|
this.struct,
|
|
897
896
|
(e) => this.getBlockInfo(e).actualProductionInputs
|
|
898
897
|
)), this.actualProductionGraph;
|
|
@@ -1039,21 +1038,21 @@ class We {
|
|
|
1039
1038
|
//
|
|
1040
1039
|
/** Very generic method, better check for more specialized case-specific methods first. */
|
|
1041
1040
|
updateStructure(e, t = rn) {
|
|
1042
|
-
const r = this.getStagingGraph(), o = this.getActualProductionGraph(), n = bt(e), i =
|
|
1041
|
+
const r = this.getStagingGraph(), o = this.getActualProductionGraph(), n = bt(e), i = _e(
|
|
1043
1042
|
e,
|
|
1044
1043
|
(l) => {
|
|
1045
1044
|
var u;
|
|
1046
1045
|
return (u = this.blockInfos.get(l)) == null ? void 0 : u.actualProductionInputs;
|
|
1047
1046
|
}
|
|
1048
|
-
), c =
|
|
1047
|
+
), c = er(r, n), a = er(o, i);
|
|
1049
1048
|
for (const l of c.onlyInA) {
|
|
1050
1049
|
const { fields: u } = this.getBlockInfo(l);
|
|
1051
1050
|
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);
|
|
1052
1051
|
}
|
|
1053
1052
|
for (const l of c.onlyInB) {
|
|
1054
|
-
const u = new
|
|
1053
|
+
const u = new tr(l, {});
|
|
1055
1054
|
this.blockInfos.set(l, u);
|
|
1056
|
-
const d = t(l), m =
|
|
1055
|
+
const d = t(l), m = Zt(this.tx, d.blockPack);
|
|
1057
1056
|
this.setBlockField(l, "blockPack", T.wrapInHolder(this.tx, m), "NotReady");
|
|
1058
1057
|
const h = Buffer.from(d.args), f = this.tx.createValue(T.JsonObject, h);
|
|
1059
1058
|
this.setBlockField(l, "currentArgs", f, "Ready", h), d.uiState && (this.blockFrontendStates.set(l, d.uiState), this.changedBlockFrontendStates.add(l)), u.check();
|
|
@@ -1107,7 +1106,7 @@ class We {
|
|
|
1107
1106
|
this.setBlockField(
|
|
1108
1107
|
e,
|
|
1109
1108
|
"blockPack",
|
|
1110
|
-
T.wrapInHolder(this.tx,
|
|
1109
|
+
T.wrapInHolder(this.tx, Zt(this.tx, t)),
|
|
1111
1110
|
"NotReady"
|
|
1112
1111
|
), r !== void 0 ? (this.setArgs([{ blockId: e, args: r }]), this.setUiState(e, void 0)) : this.getStagingGraph().traverse("downstream", [e], ({ id: n }) => this.resetStaging(n)), o.productionRendered && this.getActualProductionGraph().traverse(
|
|
1113
1112
|
"downstream",
|
|
@@ -1153,7 +1152,7 @@ class We {
|
|
|
1153
1152
|
* accordingly */
|
|
1154
1153
|
stopProduction(...e) {
|
|
1155
1154
|
var i, c;
|
|
1156
|
-
const t = this.getActualProductionGraph(), r = new
|
|
1155
|
+
const t = this.getActualProductionGraph(), r = new xr(e), o = new Set(e), n = [];
|
|
1157
1156
|
for (; !r.isEmpty(); ) {
|
|
1158
1157
|
const a = r.shift(), l = this.getBlockInfo(a).fields;
|
|
1159
1158
|
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")) {
|
|
@@ -1220,7 +1219,7 @@ class We {
|
|
|
1220
1219
|
if (this.wasModified) {
|
|
1221
1220
|
this.lastModifiedChanged && this.tx.setKValue(this.rid, Te, JSON.stringify(this.lastModified)), this.structureChanged && this.tx.setKValue(this.rid, de, JSON.stringify(this.struct)), this.renderingStateChanged && this.tx.setKValue(
|
|
1222
1221
|
this.rid,
|
|
1223
|
-
|
|
1222
|
+
He,
|
|
1224
1223
|
JSON.stringify({
|
|
1225
1224
|
...this.renderingState,
|
|
1226
1225
|
blocksInLimbo: [...this.blocksInLimbo]
|
|
@@ -1234,7 +1233,7 @@ class We {
|
|
|
1234
1233
|
}
|
|
1235
1234
|
}
|
|
1236
1235
|
static async load(e, t, r) {
|
|
1237
|
-
const o = e.getResourceData(t, !0), n = e.getKValueJson(t,
|
|
1236
|
+
const o = e.getResourceData(t, !0), n = e.getKValueJson(t, Gr), i = e.getKValueJson(t, Te), c = e.getKValueJson(t, Ae), a = e.getKValueJson(t, de), l = e.getKValueJson(t, He), u = e.listKeyValuesString(t), [
|
|
1238
1237
|
d,
|
|
1239
1238
|
m,
|
|
1240
1239
|
h,
|
|
@@ -1251,7 +1250,7 @@ class We {
|
|
|
1251
1250
|
l,
|
|
1252
1251
|
u
|
|
1253
1252
|
]);
|
|
1254
|
-
if (m !==
|
|
1253
|
+
if (m !== Mr)
|
|
1255
1254
|
throw new Error(
|
|
1256
1255
|
`Can't act on this project resource because it has a wrong schema version: ${m}`
|
|
1257
1256
|
);
|
|
@@ -1263,7 +1262,7 @@ class We {
|
|
|
1263
1262
|
g === void 0 && (g = {
|
|
1264
1263
|
id: y.blockId,
|
|
1265
1264
|
fields: {}
|
|
1266
|
-
}, k.set(y.blockId, g)), g.fields[y.fieldName] =
|
|
1265
|
+
}, k.set(y.blockId, g)), g.fields[y.fieldName] = Ke(p.value) ? { modCount: 0 } : { modCount: 0, ref: p.value };
|
|
1267
1266
|
}
|
|
1268
1267
|
const se = await Qr(), pe = wt(se.hash), A = d.fields.find(
|
|
1269
1268
|
(p) => p.name === pe
|
|
@@ -1276,7 +1275,7 @@ class We {
|
|
|
1276
1275
|
));
|
|
1277
1276
|
const oe = { stagingRefreshTimestamp: F }, K = new Set(D), G = /* @__PURE__ */ new Map();
|
|
1278
1277
|
for (const p of _) {
|
|
1279
|
-
const y =
|
|
1278
|
+
const y = Co(p.key);
|
|
1280
1279
|
y !== void 0 && G.set(y, p.value);
|
|
1281
1280
|
}
|
|
1282
1281
|
const x = [];
|
|
@@ -1293,7 +1292,7 @@ class We {
|
|
|
1293
1292
|
p.value = g.data, _t(g.error) ? p.status = "Error" : g.resourceReady || _t(g.originalResourceId) ? p.status = "Ready" : p.status = "NotReady";
|
|
1294
1293
|
}
|
|
1295
1294
|
const X = /* @__PURE__ */ new Map();
|
|
1296
|
-
k.forEach(({ id: p, fields: y }) => X.set(p, new
|
|
1295
|
+
k.forEach(({ id: p, fields: y }) => X.set(p, new tr(p, y)));
|
|
1297
1296
|
const he = /* @__PURE__ */ new Set();
|
|
1298
1297
|
for (const p of te(I)) {
|
|
1299
1298
|
if (!X.has(p.id))
|
|
@@ -1326,7 +1325,7 @@ async function sn(s, e = yo) {
|
|
|
1326
1325
|
const t = s.createEphemeral(wo);
|
|
1327
1326
|
s.lock(t);
|
|
1328
1327
|
const r = String(Date.now());
|
|
1329
|
-
s.setKValue(t,
|
|
1328
|
+
s.setKValue(t, Gr, JSON.stringify(Mr)), s.setKValue(t, $t, r), s.setKValue(t, Te, r), s.setKValue(t, Ae, JSON.stringify(e)), s.setKValue(t, de, JSON.stringify(mo)), s.setKValue(t, He, JSON.stringify(vo));
|
|
1330
1329
|
const o = await Qr();
|
|
1331
1330
|
return s.createField(
|
|
1332
1331
|
j(t, wt(o.hash)),
|
|
@@ -1363,7 +1362,7 @@ function* on(s) {
|
|
|
1363
1362
|
J(s);
|
|
1364
1363
|
}
|
|
1365
1364
|
}
|
|
1366
|
-
function
|
|
1365
|
+
function rr(s, e) {
|
|
1367
1366
|
return Object.fromEntries(
|
|
1368
1367
|
Object.entries(s).map(([t, r]) => [t, e(r, t)])
|
|
1369
1368
|
);
|
|
@@ -1373,11 +1372,11 @@ function nn(s, e) {
|
|
|
1373
1372
|
case "Json":
|
|
1374
1373
|
return { ...s };
|
|
1375
1374
|
case "JsonPartitioned":
|
|
1376
|
-
return { ...s, parts:
|
|
1375
|
+
return { ...s, parts: rr(s.parts, e) };
|
|
1377
1376
|
case "BinaryPartitioned":
|
|
1378
1377
|
return {
|
|
1379
1378
|
...s,
|
|
1380
|
-
parts:
|
|
1379
|
+
parts: rr(s.parts, (t) => ({
|
|
1381
1380
|
index: e(t.index),
|
|
1382
1381
|
values: e(t.values)
|
|
1383
1382
|
}))
|
|
@@ -1398,14 +1397,14 @@ function pn(s) {
|
|
|
1398
1397
|
const e = s.getDataAsJson();
|
|
1399
1398
|
if (e === void 0)
|
|
1400
1399
|
throw new Error("unexpected data info structure, no resource data");
|
|
1401
|
-
if (
|
|
1400
|
+
if (ce(s.resourceType, dn)) {
|
|
1402
1401
|
const t = e;
|
|
1403
1402
|
return {
|
|
1404
1403
|
type: "Json",
|
|
1405
1404
|
keyLength: t.keyLength,
|
|
1406
1405
|
data: t.data
|
|
1407
1406
|
};
|
|
1408
|
-
} else if (
|
|
1407
|
+
} else if (ce(s.resourceType, an)) {
|
|
1409
1408
|
const t = e, r = Object.fromEntries(
|
|
1410
1409
|
s.listInputFields().map((o) => [o, s.traverse({ field: o, errorIfFieldNotSet: !0 }).resourceInfo])
|
|
1411
1410
|
);
|
|
@@ -1414,7 +1413,7 @@ function pn(s) {
|
|
|
1414
1413
|
partitionKeyLength: t.partitionKeyLength,
|
|
1415
1414
|
parts: r
|
|
1416
1415
|
};
|
|
1417
|
-
} else if (
|
|
1416
|
+
} else if (ce(s.resourceType, cn)) {
|
|
1418
1417
|
const t = e, r = {};
|
|
1419
1418
|
for (const o of s.listInputFields()) {
|
|
1420
1419
|
const n = s.traverse({ field: o, errorIfFieldNotSet: !0 }), i = n.listInputFields();
|
|
@@ -1429,7 +1428,7 @@ function pn(s) {
|
|
|
1429
1428
|
partitionKeyLength: t.superPartitionKeyLength + t.partitionKeyLength,
|
|
1430
1429
|
parts: r
|
|
1431
1430
|
};
|
|
1432
|
-
} else if (
|
|
1431
|
+
} else if (ce(s.resourceType, ln)) {
|
|
1433
1432
|
const t = e, r = {};
|
|
1434
1433
|
for (const o of s.listInputFields())
|
|
1435
1434
|
if (o.endsWith(".index")) {
|
|
@@ -1450,7 +1449,7 @@ function pn(s) {
|
|
|
1450
1449
|
partitionKeyLength: t.partitionKeyLength,
|
|
1451
1450
|
parts: r
|
|
1452
1451
|
};
|
|
1453
|
-
} else if (
|
|
1452
|
+
} else if (ce(s.resourceType, un)) {
|
|
1454
1453
|
const t = e, r = {};
|
|
1455
1454
|
for (const o of s.listInputFields()) {
|
|
1456
1455
|
const n = s.traverse({ field: o, errorIfFieldNotSet: !0 }), i = n.listInputFields();
|
|
@@ -1495,9 +1494,9 @@ function hn(s, e) {
|
|
|
1495
1494
|
}
|
|
1496
1495
|
function fn(s, e) {
|
|
1497
1496
|
const t = Ne("sha256");
|
|
1498
|
-
return t.update(ye(s)), t.update(String(
|
|
1497
|
+
return t.update(ye(s)), t.update(String(Ke(e.originalId) ? e.id : e.originalId)), t.digest().toString("hex");
|
|
1499
1498
|
}
|
|
1500
|
-
function
|
|
1499
|
+
function sr(s, e) {
|
|
1501
1500
|
return ye({ __isRef: !0, blockId: s, name: e });
|
|
1502
1501
|
}
|
|
1503
1502
|
function gn(s, e) {
|
|
@@ -1596,8 +1595,8 @@ class Ft {
|
|
|
1596
1595
|
if (r === void 0) return;
|
|
1597
1596
|
let 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);
|
|
1598
1597
|
if (o !== void 0 && o.spec !== void 0 && n !== void 0)
|
|
1599
|
-
return
|
|
1600
|
-
id:
|
|
1598
|
+
return Tr(n, (l) => ({
|
|
1599
|
+
id: sr(e, t),
|
|
1601
1600
|
spec: o.spec,
|
|
1602
1601
|
data: l
|
|
1603
1602
|
}));
|
|
@@ -1634,9 +1633,9 @@ class Ft {
|
|
|
1634
1633
|
if (a.spec !== void 0 && a.hasData === !0 && a.data !== void 0) {
|
|
1635
1634
|
const l = a.data();
|
|
1636
1635
|
l !== void 0 ? e.push({
|
|
1637
|
-
ref:
|
|
1636
|
+
ref: xe(i, c),
|
|
1638
1637
|
obj: {
|
|
1639
|
-
id: l.ok ?
|
|
1638
|
+
id: l.ok ? sr(i, c) : void 0,
|
|
1640
1639
|
spec: a.spec,
|
|
1641
1640
|
data: l
|
|
1642
1641
|
}
|
|
@@ -1670,7 +1669,7 @@ class Ft {
|
|
|
1670
1669
|
i.staging.locked || o(`staging_not_locked:${n}`);
|
|
1671
1670
|
for (const [a, l] of i.staging.results)
|
|
1672
1671
|
l.spec !== void 0 && (e.push({
|
|
1673
|
-
ref:
|
|
1672
|
+
ref: xe(n, a),
|
|
1674
1673
|
obj: l.spec
|
|
1675
1674
|
}), c.add(a));
|
|
1676
1675
|
} else o(`staging_not_rendered:${n}`);
|
|
@@ -1678,7 +1677,7 @@ class Ft {
|
|
|
1678
1677
|
i.prod.locked || o(`prod_not_locked:${n}`);
|
|
1679
1678
|
for (const [a, l] of i.prod.results)
|
|
1680
1679
|
c.has(a) || l.spec !== void 0 && e.push({
|
|
1681
|
-
ref:
|
|
1680
|
+
ref: xe(n, a),
|
|
1682
1681
|
obj: l.spec
|
|
1683
1682
|
});
|
|
1684
1683
|
}
|
|
@@ -1692,7 +1691,7 @@ class Ft {
|
|
|
1692
1691
|
for (const [c, a] of i.results)
|
|
1693
1692
|
o.has(c) || a.spec === void 0 || (o.add(c), Ss(e, a.spec) && t.push({
|
|
1694
1693
|
label: r.info.label + " / " + c,
|
|
1695
|
-
ref:
|
|
1694
|
+
ref: xe(r.info.id, c),
|
|
1696
1695
|
spec: a.spec
|
|
1697
1696
|
}));
|
|
1698
1697
|
};
|
|
@@ -1704,7 +1703,7 @@ class Ft {
|
|
|
1704
1703
|
const o = e.accessor(t).node(), n = B(o.getKeyValueAsJson(de)), c = bt(n).traverseIds("upstream", r), a = /* @__PURE__ */ new Map();
|
|
1705
1704
|
for (const l of te(n)) {
|
|
1706
1705
|
if (!c.has(l.id)) continue;
|
|
1707
|
-
const u =
|
|
1706
|
+
const u = or(
|
|
1708
1707
|
o.traverse({
|
|
1709
1708
|
field: U(l.id, "prodCtx"),
|
|
1710
1709
|
ignoreError: !0,
|
|
@@ -1715,7 +1714,7 @@ class Ft {
|
|
|
1715
1714
|
field: U(l.id, "prodUiCtx"),
|
|
1716
1715
|
stableIfNotFound: !0
|
|
1717
1716
|
})
|
|
1718
|
-
), d =
|
|
1717
|
+
), d = or(
|
|
1719
1718
|
o.traverse({
|
|
1720
1719
|
field: U(l.id, "stagingCtx"),
|
|
1721
1720
|
ignoreError: !0,
|
|
@@ -1730,7 +1729,7 @@ class Ft {
|
|
|
1730
1729
|
return new Ft(e, a);
|
|
1731
1730
|
}
|
|
1732
1731
|
}
|
|
1733
|
-
function
|
|
1732
|
+
function or(s, e) {
|
|
1734
1733
|
if (e === void 0)
|
|
1735
1734
|
return s ? { locked: !1, results: /* @__PURE__ */ new Map() } : void 0;
|
|
1736
1735
|
if (e.ok) return Zr(e.value, !1, !0);
|
|
@@ -1850,23 +1849,23 @@ function Xe(s) {
|
|
|
1850
1849
|
result: s
|
|
1851
1850
|
};
|
|
1852
1851
|
}
|
|
1853
|
-
function
|
|
1852
|
+
function E(s) {
|
|
1854
1853
|
return () => Xe(s);
|
|
1855
1854
|
}
|
|
1856
1855
|
const Sn = (s) => {
|
|
1857
1856
|
const e = {};
|
|
1858
1857
|
for (const [t, r] of Object.entries(s)) e[t] = r;
|
|
1859
|
-
return
|
|
1858
|
+
return E(e);
|
|
1860
1859
|
}, bn = (s) => {
|
|
1861
1860
|
const e = s.source;
|
|
1862
|
-
if (e === void 0) return
|
|
1861
|
+
if (e === void 0) return E(void 0);
|
|
1863
1862
|
const t = [];
|
|
1864
1863
|
for (const r of e)
|
|
1865
1864
|
r instanceof Array ? t.push(...r) : t.push(r);
|
|
1866
|
-
return
|
|
1865
|
+
return E(t);
|
|
1867
1866
|
}, Rn = (s) => {
|
|
1868
1867
|
const e = s.source, t = s.field;
|
|
1869
|
-
return e === void 0 || t === void 0 ?
|
|
1868
|
+
return e === void 0 || t === void 0 ? E(void 0) : ({ cCtx: r }) => {
|
|
1870
1869
|
var o;
|
|
1871
1870
|
return Xe((o = r.accessor(e).node().traverse(t)) == null ? void 0 : o.persist());
|
|
1872
1871
|
};
|
|
@@ -1876,10 +1875,10 @@ function ts(s, e) {
|
|
|
1876
1875
|
for (let o = 0; o < r; o++) t[String(o)] = e(s[o]);
|
|
1877
1876
|
return t;
|
|
1878
1877
|
}
|
|
1879
|
-
function
|
|
1878
|
+
function Cn(s, e) {
|
|
1880
1879
|
return (t) => {
|
|
1881
1880
|
const r = t.source;
|
|
1882
|
-
return r === void 0 ?
|
|
1881
|
+
return r === void 0 ? E(void 0) : () => ({
|
|
1883
1882
|
type: "ScheduleSubroutine",
|
|
1884
1883
|
subroutine: rs(r.length),
|
|
1885
1884
|
args: ts(r, (o) => O({ ...s, [e.itVar]: o }, e.mapping))
|
|
@@ -1890,13 +1889,13 @@ function rs(s) {
|
|
|
1890
1889
|
return (e) => {
|
|
1891
1890
|
const t = [];
|
|
1892
1891
|
for (let r = 0; r < s; r++) t.push(e[String(r)]);
|
|
1893
|
-
return
|
|
1892
|
+
return E(t);
|
|
1894
1893
|
};
|
|
1895
1894
|
}
|
|
1896
|
-
function
|
|
1895
|
+
function En(s, e) {
|
|
1897
1896
|
return (t) => {
|
|
1898
1897
|
const r = t.source;
|
|
1899
|
-
if (r === void 0) return
|
|
1898
|
+
if (r === void 0) return E(void 0);
|
|
1900
1899
|
const o = {};
|
|
1901
1900
|
for (const [n, i] of Object.entries(r)) {
|
|
1902
1901
|
const c = { ...s, [e.itVar]: i };
|
|
@@ -1909,36 +1908,36 @@ function Cn(s, e) {
|
|
|
1909
1908
|
});
|
|
1910
1909
|
};
|
|
1911
1910
|
}
|
|
1912
|
-
const kn = (s) =>
|
|
1911
|
+
const kn = (s) => E(s), Pn = (s) => {
|
|
1913
1912
|
const e = s.arg;
|
|
1914
|
-
return
|
|
1913
|
+
return E(e === void 0 ? void 0 : e.length === 0);
|
|
1915
1914
|
}, On = (s) => {
|
|
1916
1915
|
const e = s.operand;
|
|
1917
|
-
return
|
|
1916
|
+
return E(e === void 0 ? void 0 : !e);
|
|
1918
1917
|
}, $n = (s) => {
|
|
1919
1918
|
const e = s.operand1, t = s.operand2;
|
|
1920
|
-
return
|
|
1919
|
+
return E(e === void 0 || t === void 0 ? void 0 : e && t);
|
|
1921
1920
|
}, In = (s) => {
|
|
1922
1921
|
const e = s.operand1, t = s.operand2;
|
|
1923
|
-
return
|
|
1922
|
+
return E(e === void 0 || t === void 0 ? void 0 : e || t);
|
|
1924
1923
|
}, Fn = (s) => {
|
|
1925
1924
|
const e = s.source;
|
|
1926
|
-
return e === void 0 ?
|
|
1925
|
+
return e === void 0 ? E(void 0) : ({ cCtx: t }) => {
|
|
1927
1926
|
var r;
|
|
1928
1927
|
return Xe((r = t.accessor(e).node()) == null ? void 0 : r.getDataAsJson());
|
|
1929
1928
|
};
|
|
1930
1929
|
}, Tn = (s) => {
|
|
1931
1930
|
const e = s.source, t = s.field;
|
|
1932
|
-
return
|
|
1931
|
+
return E(e === void 0 || t === void 0 ? void 0 : e[t]);
|
|
1933
1932
|
};
|
|
1934
1933
|
function An(s, e) {
|
|
1935
1934
|
return (t) => {
|
|
1936
1935
|
const r = t.source;
|
|
1937
|
-
return r === void 0 ?
|
|
1936
|
+
return r === void 0 ? E(void 0) : ({ cCtx: o }) => {
|
|
1938
1937
|
const n = o.accessor(r).node(), i = {};
|
|
1939
1938
|
for (const c of n.listInputFields()) {
|
|
1940
1939
|
const a = n.traverse(c);
|
|
1941
|
-
if (a === void 0) i[c] =
|
|
1940
|
+
if (a === void 0) i[c] = E(void 0);
|
|
1942
1941
|
else {
|
|
1943
1942
|
const l = { ...s, [e.itVar]: a.persist() };
|
|
1944
1943
|
i[c] = O(l, e.mapping);
|
|
@@ -1952,9 +1951,9 @@ function An(s, e) {
|
|
|
1952
1951
|
};
|
|
1953
1952
|
};
|
|
1954
1953
|
}
|
|
1955
|
-
const Ln = (s) =>
|
|
1954
|
+
const Ln = (s) => E(s), Nn = (s) => {
|
|
1956
1955
|
const e = s.source;
|
|
1957
|
-
return e === void 0 ?
|
|
1956
|
+
return e === void 0 ? E(void 0) : ({ drivers: t }) => ({
|
|
1958
1957
|
type: "ScheduleComputable",
|
|
1959
1958
|
computable: V.make(
|
|
1960
1959
|
(r) => t.blobDriver.getDownloadedBlob(r.accessor(e).node().resourceInfo),
|
|
@@ -1968,7 +1967,7 @@ const Ln = (s) => C(s), Nn = (s) => {
|
|
|
1968
1967
|
});
|
|
1969
1968
|
}, Dn = (s) => {
|
|
1970
1969
|
const e = s.source;
|
|
1971
|
-
return e === void 0 ?
|
|
1970
|
+
return e === void 0 ? E(void 0) : ({ cCtx: t, drivers: r }) => {
|
|
1972
1971
|
const o = t.accessor(e).node().resourceInfo;
|
|
1973
1972
|
return {
|
|
1974
1973
|
type: "ScheduleComputable",
|
|
@@ -1979,7 +1978,7 @@ const Ln = (s) => C(s), Nn = (s) => {
|
|
|
1979
1978
|
};
|
|
1980
1979
|
}, Bn = (s) => {
|
|
1981
1980
|
const e = s.source;
|
|
1982
|
-
return e === void 0 ?
|
|
1981
|
+
return e === void 0 ? E(void 0) : ({ drivers: t }) => ({
|
|
1983
1982
|
type: "ScheduleComputable",
|
|
1984
1983
|
computable: V.make(
|
|
1985
1984
|
(r) => t.blobDriver.getDownloadedBlob(r.accessor(e).node().resourceInfo),
|
|
@@ -1995,37 +1994,37 @@ const Ln = (s) => C(s), Nn = (s) => {
|
|
|
1995
1994
|
});
|
|
1996
1995
|
}, jn = (s) => {
|
|
1997
1996
|
const e = s.source;
|
|
1998
|
-
return e === void 0 ?
|
|
1997
|
+
return e === void 0 ? E(void 0) : ({ drivers: t }) => ({
|
|
1999
1998
|
type: "ScheduleComputable",
|
|
2000
1999
|
computable: t.blobDriver.getDownloadedBlob(e)
|
|
2001
2000
|
});
|
|
2002
2001
|
}, xn = (s) => {
|
|
2003
2002
|
const e = s.source;
|
|
2004
|
-
return e === void 0 ?
|
|
2003
|
+
return e === void 0 ? E(void 0) : ({ drivers: t }) => ({
|
|
2005
2004
|
type: "ScheduleComputable",
|
|
2006
2005
|
computable: t.blobDriver.getOnDemandBlob(e)
|
|
2007
2006
|
});
|
|
2008
2007
|
}, Vn = (s) => {
|
|
2009
2008
|
const e = s.source;
|
|
2010
|
-
return e === void 0 ?
|
|
2009
|
+
return e === void 0 ? E(void 0) : ({ drivers: t }) => ({
|
|
2011
2010
|
type: "ScheduleComputable",
|
|
2012
2011
|
computable: t.uploadDriver.getProgressId(e)
|
|
2013
2012
|
});
|
|
2014
2013
|
}, Un = (s) => (e) => {
|
|
2015
2014
|
const t = e.source;
|
|
2016
|
-
return t === void 0 ?
|
|
2015
|
+
return t === void 0 ? E(void 0) : ({ drivers: r }) => ({
|
|
2017
2016
|
type: "ScheduleComputable",
|
|
2018
2017
|
computable: r.logDriver.getLastLogs(t, s)
|
|
2019
2018
|
});
|
|
2020
2019
|
}, Jn = (s) => (e) => {
|
|
2021
2020
|
const t = e.source;
|
|
2022
|
-
return t === void 0 ?
|
|
2021
|
+
return t === void 0 ? E(void 0) : ({ drivers: r }) => ({
|
|
2023
2022
|
type: "ScheduleComputable",
|
|
2024
2023
|
computable: r.logDriver.getProgressLog(t, s)
|
|
2025
2024
|
});
|
|
2026
2025
|
}, Gn = (s) => {
|
|
2027
2026
|
const e = s.source;
|
|
2028
|
-
return e === void 0 ?
|
|
2027
|
+
return e === void 0 ? E(void 0) : ({ drivers: t }) => ({
|
|
2029
2028
|
type: "ScheduleComputable",
|
|
2030
2029
|
computable: t.logDriver.getLogHandle(e)
|
|
2031
2030
|
});
|
|
@@ -2034,14 +2033,14 @@ function O(s, e) {
|
|
|
2034
2033
|
switch (e.type) {
|
|
2035
2034
|
case "GetFromCtx":
|
|
2036
2035
|
const t = s[e.variable];
|
|
2037
|
-
return typeof t == "function" ? (r) => Xe(t(r.cCtx)) :
|
|
2036
|
+
return typeof t == "function" ? (r) => Xe(t(r.cCtx)) : E(t);
|
|
2038
2037
|
case "Isolate":
|
|
2039
2038
|
return ({ drivers: r }) => ({
|
|
2040
2039
|
type: "ScheduleComputable",
|
|
2041
2040
|
computable: ns(r, s, e.cfg)
|
|
2042
2041
|
});
|
|
2043
2042
|
case "Immediate":
|
|
2044
|
-
return
|
|
2043
|
+
return E(e.value);
|
|
2045
2044
|
case "GetJsonField":
|
|
2046
2045
|
return () => ({
|
|
2047
2046
|
type: "ScheduleSubroutine",
|
|
@@ -2054,7 +2053,7 @@ function O(s, e) {
|
|
|
2054
2053
|
case "MapArrayValues":
|
|
2055
2054
|
return () => ({
|
|
2056
2055
|
type: "ScheduleSubroutine",
|
|
2057
|
-
subroutine:
|
|
2056
|
+
subroutine: Cn(s, e),
|
|
2058
2057
|
args: {
|
|
2059
2058
|
source: O(s, e.source)
|
|
2060
2059
|
}
|
|
@@ -2062,7 +2061,7 @@ function O(s, e) {
|
|
|
2062
2061
|
case "MapRecordValues":
|
|
2063
2062
|
return () => ({
|
|
2064
2063
|
type: "ScheduleSubroutine",
|
|
2065
|
-
subroutine:
|
|
2064
|
+
subroutine: En(s, e),
|
|
2066
2065
|
args: {
|
|
2067
2066
|
source: O(s, e.source)
|
|
2068
2067
|
}
|
|
@@ -2242,8 +2241,8 @@ function Hn(s) {
|
|
|
2242
2241
|
function Wn() {
|
|
2243
2242
|
return { pendingSubroutines: /* @__PURE__ */ new Map() };
|
|
2244
2243
|
}
|
|
2245
|
-
function
|
|
2246
|
-
const o = new
|
|
2244
|
+
function nr(s, e, t, r) {
|
|
2245
|
+
const o = new xr(t), n = (c, a) => {
|
|
2247
2246
|
if (Hn(c))
|
|
2248
2247
|
return e.result = a, !1;
|
|
2249
2248
|
const l = B(e.pendingSubroutines.get(c.op));
|
|
@@ -2308,7 +2307,7 @@ function ns(s, e, t, r = {}) {
|
|
|
2308
2307
|
(n) => {
|
|
2309
2308
|
const i = { drivers: s, cCtx: n }, c = Wn();
|
|
2310
2309
|
return {
|
|
2311
|
-
ir:
|
|
2310
|
+
ir: nr(
|
|
2312
2311
|
i,
|
|
2313
2312
|
c,
|
|
2314
2313
|
[
|
|
@@ -2322,7 +2321,7 @@ function ns(s, e, t, r = {}) {
|
|
|
2322
2321
|
async postprocessValue(l) {
|
|
2323
2322
|
const u = [];
|
|
2324
2323
|
for (const f of l)
|
|
2325
|
-
u.push({ destination: f.destination, operation:
|
|
2324
|
+
u.push({ destination: f.destination, operation: E(f.computable) });
|
|
2326
2325
|
const d = {
|
|
2327
2326
|
drivers: s,
|
|
2328
2327
|
get cCtx() {
|
|
@@ -2335,7 +2334,7 @@ function ns(s, e, t, r = {}) {
|
|
|
2335
2334
|
result: c.result,
|
|
2336
2335
|
pendingSubroutines: m
|
|
2337
2336
|
};
|
|
2338
|
-
if (
|
|
2337
|
+
if (nr(d, h, u, !1), !("result" in h))
|
|
2339
2338
|
throw new Error("illegal cfg rendering stack state, no result");
|
|
2340
2339
|
return h.result;
|
|
2341
2340
|
}
|
|
@@ -2347,7 +2346,7 @@ function ns(s, e, t, r = {}) {
|
|
|
2347
2346
|
function Xn(s) {
|
|
2348
2347
|
return s instanceof ArrayBuffer || ArrayBuffer.isView(s);
|
|
2349
2348
|
}
|
|
2350
|
-
function
|
|
2349
|
+
function ir(s) {
|
|
2351
2350
|
return s !== void 0 ? Buffer.from(s).toString("base64") : void 0;
|
|
2352
2351
|
}
|
|
2353
2352
|
class ze {
|
|
@@ -2457,13 +2456,13 @@ class ze {
|
|
|
2457
2456
|
return this.getAccessor(e).listDynamicFields();
|
|
2458
2457
|
}
|
|
2459
2458
|
getKeyValueBase64(e, t) {
|
|
2460
|
-
return
|
|
2459
|
+
return ir(this.getAccessor(e).getKeyValue(t));
|
|
2461
2460
|
}
|
|
2462
2461
|
getKeyValueAsString(e, t) {
|
|
2463
2462
|
return this.getAccessor(e).getKeyValueAsString(t);
|
|
2464
2463
|
}
|
|
2465
2464
|
getDataBase64(e) {
|
|
2466
|
-
return
|
|
2465
|
+
return ir(this.getAccessor(e).getData());
|
|
2467
2466
|
}
|
|
2468
2467
|
getDataAsString(e) {
|
|
2469
2468
|
return this.getAccessor(e).getDataAsString();
|
|
@@ -2605,7 +2604,7 @@ class ze {
|
|
|
2605
2604
|
obj: {
|
|
2606
2605
|
id: t.obj.id,
|
|
2607
2606
|
spec: t.obj.spec,
|
|
2608
|
-
data:
|
|
2607
|
+
data: Tr(t.obj.data, (r) => this.wrapAccessor(r))
|
|
2609
2608
|
}
|
|
2610
2609
|
}))
|
|
2611
2610
|
};
|
|
@@ -2831,12 +2830,12 @@ function qe(s, e) {
|
|
|
2831
2830
|
{ field: T.HolderRefField, assertFieldType: "Input", errorIfFieldNotFound: !0 }
|
|
2832
2831
|
),
|
|
2833
2832
|
(t) => {
|
|
2834
|
-
const r = t.getDataAsJson(), o =
|
|
2833
|
+
const r = t.getDataAsJson(), o = Ar(r.config);
|
|
2835
2834
|
return { bpId: t.resourceInfo.id.toString(), info: r, cfg: o };
|
|
2836
2835
|
}
|
|
2837
2836
|
);
|
|
2838
2837
|
}
|
|
2839
|
-
const
|
|
2838
|
+
const Ve = process.env.MI_LOG_OUTPUT_STATUS;
|
|
2840
2839
|
function qn(s, e, t, r, o, n = {}) {
|
|
2841
2840
|
const i = `${e.blockId}#lambda#${o}#${t.handle}`;
|
|
2842
2841
|
return n = { ...n, key: i }, n.mode === void 0 && t.retentive === !0 && (n.mode = "StableOnlyRetentive"), V.makeRaw((c) => {
|
|
@@ -2849,12 +2848,12 @@ function qn(s, e, t, r, o, n = {}) {
|
|
|
2849
2848
|
const m = d.runCallback(t.handle);
|
|
2850
2849
|
d.resetComputableCtx();
|
|
2851
2850
|
let h = 0;
|
|
2852
|
-
return
|
|
2851
|
+
return Ve && Ve !== "unstable-only" && console.log(`Output ${t.handle} scaffold calculated.`), {
|
|
2853
2852
|
ir: d.computablesToResolve,
|
|
2854
2853
|
postprocessValue: async (f, { unstableMarker: I, stable: F }) => {
|
|
2855
2854
|
for (const [_, k] of Object.entries(f)) d.runCallback(_, k);
|
|
2856
2855
|
const D = d.importObjectUniversal(m);
|
|
2857
|
-
return h++,
|
|
2856
|
+
return h++, Ve && (Ve !== "unstable-only" || !F) && console.log(
|
|
2858
2857
|
F ? `Stable output ${t.handle} calculated ${D !== void 0 ? "defined" : "undefined"}; (#${h})` : `Unstable output ${t.handle}; marker = ${I}; ${D !== void 0 ? "defined" : "undefined"} (#${h})`
|
|
2859
2858
|
), D;
|
|
2860
2859
|
}
|
|
@@ -2862,10 +2861,10 @@ function qn(s, e, t, r, o, n = {}) {
|
|
|
2862
2861
|
}, n);
|
|
2863
2862
|
}
|
|
2864
2863
|
function Yn(s) {
|
|
2865
|
-
return
|
|
2864
|
+
return Lr(s) ? s.isActive === !0 : wn(s);
|
|
2866
2865
|
}
|
|
2867
2866
|
function $e(s, e, t, r, o, n = {}) {
|
|
2868
|
-
if (
|
|
2867
|
+
if (Lr(t)) {
|
|
2869
2868
|
if (r === void 0) throw new Error("No code bundle.");
|
|
2870
2869
|
return qn(s, e, t, r, o, n);
|
|
2871
2870
|
} else return zn(s.driverKit, e, t, n);
|
|
@@ -2875,7 +2874,7 @@ function Qn(s, e, t) {
|
|
|
2875
2874
|
(r) => {
|
|
2876
2875
|
var f, I, F, D, _, k, se, pe;
|
|
2877
2876
|
const o = r.accessor(s).node(), n = B(o.getKeyValueAsJson($t)), i = B(o.getKeyValueAsJson(Te)), c = B(o.getKeyValueAsJson(Ae)), a = B(o.getKeyValueAsJson(de)), l = B(
|
|
2878
|
-
o.getKeyValueAsJson(
|
|
2877
|
+
o.getKeyValueAsJson(He)
|
|
2879
2878
|
), u = /* @__PURE__ */ new Map();
|
|
2880
2879
|
for (const { id: A } of te(a)) {
|
|
2881
2880
|
const z = o.traverse({
|
|
@@ -2910,8 +2909,8 @@ function Qn(s, e, t) {
|
|
|
2910
2909
|
}
|
|
2911
2910
|
u.set(A, { currentArguments: z.getDataAsJson(), prod: oe });
|
|
2912
2911
|
}
|
|
2913
|
-
const d =
|
|
2914
|
-
var b, w, R, P,
|
|
2912
|
+
const d = _e(a, (A) => u.get(A).currentArguments), m = new Set(l.blocksInLimbo), h = [...te(a)].map(({ id: A, label: z, renderingMode: oe }) => {
|
|
2913
|
+
var b, w, R, P, C;
|
|
2915
2914
|
const K = B(u.get(A)), G = B(d.nodes.get(A));
|
|
2916
2915
|
let x = "NotCalculated";
|
|
2917
2916
|
K.prod !== void 0 && (m.has(A) ? x = "Limbo" : x = K.prod.finished ? "Done" : "Running");
|
|
@@ -2963,7 +2962,7 @@ function Qn(s, e, t) {
|
|
|
2963
2962
|
exportsError: (P = K.prod) == null ? void 0 : P.exportsError,
|
|
2964
2963
|
sections: he,
|
|
2965
2964
|
inputsValid: p,
|
|
2966
|
-
currentBlockPack: (
|
|
2965
|
+
currentBlockPack: (C = X == null ? void 0 : X.info) == null ? void 0 : C.source,
|
|
2967
2966
|
updatedBlockPack: g,
|
|
2968
2967
|
sdkVersion: y,
|
|
2969
2968
|
navigationState: e.getState(A)
|
|
@@ -2994,11 +2993,11 @@ function Qn(s, e, t) {
|
|
|
2994
2993
|
}
|
|
2995
2994
|
function Zn(s, e) {
|
|
2996
2995
|
const t = s.node();
|
|
2997
|
-
if (
|
|
2996
|
+
if (ce(t.resourceType, Wr)) {
|
|
2998
2997
|
const r = t.getDataAsJson();
|
|
2999
2998
|
if (r === void 0) throw new Error("No resource data.");
|
|
3000
2999
|
return e.frontendDownloadDriver.getPath(new URL(r.url)).withStableType();
|
|
3001
|
-
} else if (
|
|
3000
|
+
} else if (ce(t.resourceType, zr)) {
|
|
3002
3001
|
const r = t.getDataAsJson();
|
|
3003
3002
|
if (r === void 0) throw new Error("No resource data.");
|
|
3004
3003
|
return e.signer.verify(
|
|
@@ -3047,7 +3046,7 @@ function ti(s, e, t) {
|
|
|
3047
3046
|
function is(s, e, t) {
|
|
3048
3047
|
if (t === void 0)
|
|
3049
3048
|
return V.make((i) => is(s, e, i), {
|
|
3050
|
-
key: `inputs#${
|
|
3049
|
+
key: `inputs#${Br(s.rid)}#${e}`
|
|
3051
3050
|
});
|
|
3052
3051
|
const r = t.accessor(s).node(), o = Tt(s, e), n = o.uiState(t);
|
|
3053
3052
|
return {
|
|
@@ -3069,7 +3068,7 @@ function ri(s, e, t) {
|
|
|
3069
3068
|
return a;
|
|
3070
3069
|
});
|
|
3071
3070
|
},
|
|
3072
|
-
{ key: "outputs#" +
|
|
3071
|
+
{ key: "outputs#" + Br(s.rid) + "#" + e }
|
|
3073
3072
|
).withStableType();
|
|
3074
3073
|
}
|
|
3075
3074
|
function si(s, e) {
|
|
@@ -3140,7 +3139,7 @@ class At {
|
|
|
3140
3139
|
try {
|
|
3141
3140
|
await nt(this.env.pl, this.rid, (e) => {
|
|
3142
3141
|
e.doRefresh(this.env.ops.stagingRenderingRate);
|
|
3143
|
-
}), await this.activeConfigs.getValue(), await
|
|
3142
|
+
}), await this.activeConfigs.getValue(), await Vr(this.env.ops.projectRefreshInterval, this.abortController.signal);
|
|
3144
3143
|
} catch (e) {
|
|
3145
3144
|
if (Bs(e)) {
|
|
3146
3145
|
console.warn(
|
|
@@ -3163,7 +3162,7 @@ class At {
|
|
|
3163
3162
|
* @return returns newly created block id
|
|
3164
3163
|
* */
|
|
3165
3164
|
async addBlock(e, t, r, o = void 0, n = Fe()) {
|
|
3166
|
-
const i = await this.env.bpPreparer.prepare(t), c = await this.env.bpPreparer.getBlockConfigContainer(t), a =
|
|
3165
|
+
const i = await this.env.bpPreparer.prepare(t), c = await this.env.bpPreparer.getBlockConfigContainer(t), a = Ar(c);
|
|
3167
3166
|
return await ee(
|
|
3168
3167
|
this.env.pl,
|
|
3169
3168
|
this.rid,
|
|
@@ -3375,7 +3374,7 @@ class At {
|
|
|
3375
3374
|
await this.destroy();
|
|
3376
3375
|
}
|
|
3377
3376
|
static async init(e, t) {
|
|
3378
|
-
const r = await
|
|
3377
|
+
const r = await jr.init(
|
|
3379
3378
|
e.pl,
|
|
3380
3379
|
t,
|
|
3381
3380
|
{
|
|
@@ -3442,7 +3441,7 @@ function ai(s) {
|
|
|
3442
3441
|
function ci(s) {
|
|
3443
3442
|
return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
|
|
3444
3443
|
}
|
|
3445
|
-
var
|
|
3444
|
+
var Ct = { exports: {} };
|
|
3446
3445
|
const li = "2.0.0", ls = 256, ui = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
|
|
3447
3446
|
9007199254740991, di = 16, pi = ls - 6, hi = [
|
|
3448
3447
|
"major",
|
|
@@ -3488,19 +3487,19 @@ var Qe = fi;
|
|
|
3488
3487
|
n(I, k, F), l[I] = k, a[k] = F, i[k] = new RegExp(F, D ? "g" : void 0), c[k] = new RegExp(_, D ? "g" : void 0);
|
|
3489
3488
|
};
|
|
3490
3489
|
f("NUMERICIDENTIFIER", "0|[1-9]\\d*"), f("NUMERICIDENTIFIERLOOSE", "\\d+"), f("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${d}*`), f("MAINVERSION", `(${a[l.NUMERICIDENTIFIER]})\\.(${a[l.NUMERICIDENTIFIER]})\\.(${a[l.NUMERICIDENTIFIER]})`), f("MAINVERSIONLOOSE", `(${a[l.NUMERICIDENTIFIERLOOSE]})\\.(${a[l.NUMERICIDENTIFIERLOOSE]})\\.(${a[l.NUMERICIDENTIFIERLOOSE]})`), f("PRERELEASEIDENTIFIER", `(?:${a[l.NUMERICIDENTIFIER]}|${a[l.NONNUMERICIDENTIFIER]})`), f("PRERELEASEIDENTIFIERLOOSE", `(?:${a[l.NUMERICIDENTIFIERLOOSE]}|${a[l.NONNUMERICIDENTIFIER]})`), f("PRERELEASE", `(?:-(${a[l.PRERELEASEIDENTIFIER]}(?:\\.${a[l.PRERELEASEIDENTIFIER]})*))`), f("PRERELEASELOOSE", `(?:-?(${a[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[l.PRERELEASEIDENTIFIERLOOSE]})*))`), f("BUILDIDENTIFIER", `${d}+`), f("BUILD", `(?:\\+(${a[l.BUILDIDENTIFIER]}(?:\\.${a[l.BUILDIDENTIFIER]})*))`), f("FULLPLAIN", `v?${a[l.MAINVERSION]}${a[l.PRERELEASE]}?${a[l.BUILD]}?`), f("FULL", `^${a[l.FULLPLAIN]}$`), f("LOOSEPLAIN", `[v=\\s]*${a[l.MAINVERSIONLOOSE]}${a[l.PRERELEASELOOSE]}?${a[l.BUILD]}?`), f("LOOSE", `^${a[l.LOOSEPLAIN]}$`), f("GTLT", "((?:<|>)?=?)"), f("XRANGEIDENTIFIERLOOSE", `${a[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), f("XRANGEIDENTIFIER", `${a[l.NUMERICIDENTIFIER]}|x|X|\\*`), f("XRANGEPLAIN", `[v=\\s]*(${a[l.XRANGEIDENTIFIER]})(?:\\.(${a[l.XRANGEIDENTIFIER]})(?:\\.(${a[l.XRANGEIDENTIFIER]})(?:${a[l.PRERELEASE]})?${a[l.BUILD]}?)?)?`), f("XRANGEPLAINLOOSE", `[v=\\s]*(${a[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[l.XRANGEIDENTIFIERLOOSE]})(?:${a[l.PRERELEASELOOSE]})?${a[l.BUILD]}?)?)?`), f("XRANGE", `^${a[l.GTLT]}\\s*${a[l.XRANGEPLAIN]}$`), f("XRANGELOOSE", `^${a[l.GTLT]}\\s*${a[l.XRANGEPLAINLOOSE]}$`), f("COERCEPLAIN", `(^|[^\\d])(\\d{1,${t}})(?:\\.(\\d{1,${t}}))?(?:\\.(\\d{1,${t}}))?`), f("COERCE", `${a[l.COERCEPLAIN]}(?:$|[^\\d])`), f("COERCEFULL", a[l.COERCEPLAIN] + `(?:${a[l.PRERELEASE]})?(?:${a[l.BUILD]})?(?:$|[^\\d])`), f("COERCERTL", a[l.COERCE], !0), f("COERCERTLFULL", a[l.COERCEFULL], !0), f("LONETILDE", "(?:~>?)"), f("TILDETRIM", `(\\s*)${a[l.LONETILDE]}\\s+`, !0), e.tildeTrimReplace = "$1~", f("TILDE", `^${a[l.LONETILDE]}${a[l.XRANGEPLAIN]}$`), f("TILDELOOSE", `^${a[l.LONETILDE]}${a[l.XRANGEPLAINLOOSE]}$`), f("LONECARET", "(?:\\^)"), f("CARETTRIM", `(\\s*)${a[l.LONECARET]}\\s+`, !0), e.caretTrimReplace = "$1^", f("CARET", `^${a[l.LONECARET]}${a[l.XRANGEPLAIN]}$`), f("CARETLOOSE", `^${a[l.LONECARET]}${a[l.XRANGEPLAINLOOSE]}$`), f("COMPARATORLOOSE", `^${a[l.GTLT]}\\s*(${a[l.LOOSEPLAIN]})$|^$`), f("COMPARATOR", `^${a[l.GTLT]}\\s*(${a[l.FULLPLAIN]})$|^$`), f("COMPARATORTRIM", `(\\s*)${a[l.GTLT]}\\s*(${a[l.LOOSEPLAIN]}|${a[l.XRANGEPLAIN]})`, !0), e.comparatorTrimReplace = "$1$2$3", f("HYPHENRANGE", `^\\s*(${a[l.XRANGEPLAIN]})\\s+-\\s+(${a[l.XRANGEPLAIN]})\\s*$`), f("HYPHENRANGELOOSE", `^\\s*(${a[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[l.XRANGEPLAINLOOSE]})\\s*$`), f("STAR", "(<|>)?=?\\s*\\*"), f("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), f("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
3491
|
-
})(
|
|
3492
|
-
var De =
|
|
3490
|
+
})(Ct, Ct.exports);
|
|
3491
|
+
var De = Ct.exports;
|
|
3493
3492
|
const gi = Object.freeze({ loose: !0 }), mi = Object.freeze({}), vi = (s) => s ? typeof s != "object" ? gi : s : mi;
|
|
3494
3493
|
var Lt = vi;
|
|
3495
|
-
const
|
|
3496
|
-
const t =
|
|
3494
|
+
const ar = /^[0-9]+$/, us = (s, e) => {
|
|
3495
|
+
const t = ar.test(s), r = ar.test(e);
|
|
3497
3496
|
return t && r && (s = +s, e = +e), s === e ? 0 : t && !r ? -1 : r && !t ? 1 : s < e ? -1 : 1;
|
|
3498
3497
|
}, yi = (s, e) => us(e, s);
|
|
3499
3498
|
var ds = {
|
|
3500
3499
|
compareIdentifiers: us,
|
|
3501
3500
|
rcompareIdentifiers: yi
|
|
3502
3501
|
};
|
|
3503
|
-
const
|
|
3502
|
+
const Ue = Qe, { MAX_LENGTH: cr, MAX_SAFE_INTEGER: Je } = Ye, { safeRe: lr, t: ur } = De, wi = Lt, { compareIdentifiers: fe } = ds;
|
|
3504
3503
|
let Si = class Z {
|
|
3505
3504
|
constructor(e, t) {
|
|
3506
3505
|
if (t = wi(t), e instanceof Z) {
|
|
@@ -3509,24 +3508,24 @@ let Si = class Z {
|
|
|
3509
3508
|
e = e.version;
|
|
3510
3509
|
} else if (typeof e != "string")
|
|
3511
3510
|
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);
|
|
3512
|
-
if (e.length >
|
|
3511
|
+
if (e.length > cr)
|
|
3513
3512
|
throw new TypeError(
|
|
3514
|
-
`version is longer than ${
|
|
3513
|
+
`version is longer than ${cr} characters`
|
|
3515
3514
|
);
|
|
3516
|
-
|
|
3517
|
-
const r = e.trim().match(t.loose ?
|
|
3515
|
+
Ue("SemVer", e, t), this.options = t, this.loose = !!t.loose, this.includePrerelease = !!t.includePrerelease;
|
|
3516
|
+
const r = e.trim().match(t.loose ? lr[ur.LOOSE] : lr[ur.FULL]);
|
|
3518
3517
|
if (!r)
|
|
3519
3518
|
throw new TypeError(`Invalid Version: ${e}`);
|
|
3520
|
-
if (this.raw = e, this.major = +r[1], this.minor = +r[2], this.patch = +r[3], this.major >
|
|
3519
|
+
if (this.raw = e, this.major = +r[1], this.minor = +r[2], this.patch = +r[3], this.major > Je || this.major < 0)
|
|
3521
3520
|
throw new TypeError("Invalid major version");
|
|
3522
|
-
if (this.minor >
|
|
3521
|
+
if (this.minor > Je || this.minor < 0)
|
|
3523
3522
|
throw new TypeError("Invalid minor version");
|
|
3524
|
-
if (this.patch >
|
|
3523
|
+
if (this.patch > Je || this.patch < 0)
|
|
3525
3524
|
throw new TypeError("Invalid patch version");
|
|
3526
3525
|
r[4] ? this.prerelease = r[4].split(".").map((o) => {
|
|
3527
3526
|
if (/^[0-9]+$/.test(o)) {
|
|
3528
3527
|
const n = +o;
|
|
3529
|
-
if (n >= 0 && n <
|
|
3528
|
+
if (n >= 0 && n < Je)
|
|
3530
3529
|
return n;
|
|
3531
3530
|
}
|
|
3532
3531
|
return o;
|
|
@@ -3539,7 +3538,7 @@ let Si = class Z {
|
|
|
3539
3538
|
return this.version;
|
|
3540
3539
|
}
|
|
3541
3540
|
compare(e) {
|
|
3542
|
-
if (
|
|
3541
|
+
if (Ue("SemVer.compare", this.version, this.options, e), !(e instanceof Z)) {
|
|
3543
3542
|
if (typeof e == "string" && e === this.version)
|
|
3544
3543
|
return 0;
|
|
3545
3544
|
e = new Z(e, this.options);
|
|
@@ -3559,7 +3558,7 @@ let Si = class Z {
|
|
|
3559
3558
|
let t = 0;
|
|
3560
3559
|
do {
|
|
3561
3560
|
const r = this.prerelease[t], o = e.prerelease[t];
|
|
3562
|
-
if (
|
|
3561
|
+
if (Ue("prerelease compare", t, r, o), r === void 0 && o === void 0)
|
|
3563
3562
|
return 0;
|
|
3564
3563
|
if (o === void 0)
|
|
3565
3564
|
return 1;
|
|
@@ -3575,7 +3574,7 @@ let Si = class Z {
|
|
|
3575
3574
|
let t = 0;
|
|
3576
3575
|
do {
|
|
3577
3576
|
const r = this.build[t], o = e.build[t];
|
|
3578
|
-
if (
|
|
3577
|
+
if (Ue("build compare", t, r, o), r === void 0 && o === void 0)
|
|
3579
3578
|
return 0;
|
|
3580
3579
|
if (o === void 0)
|
|
3581
3580
|
return 1;
|
|
@@ -3640,11 +3639,11 @@ let Si = class Z {
|
|
|
3640
3639
|
}
|
|
3641
3640
|
};
|
|
3642
3641
|
var M = Si;
|
|
3643
|
-
const
|
|
3644
|
-
if (s instanceof
|
|
3642
|
+
const dr = M, bi = (s, e, t = !1) => {
|
|
3643
|
+
if (s instanceof dr)
|
|
3645
3644
|
return s;
|
|
3646
3645
|
try {
|
|
3647
|
-
return new
|
|
3646
|
+
return new dr(s, e);
|
|
3648
3647
|
} catch (r) {
|
|
3649
3648
|
if (!t)
|
|
3650
3649
|
return null;
|
|
@@ -3652,21 +3651,21 @@ const ur = M, bi = (s, e, t = !1) => {
|
|
|
3652
3651
|
}
|
|
3653
3652
|
};
|
|
3654
3653
|
var we = bi;
|
|
3655
|
-
const Ri = we,
|
|
3654
|
+
const Ri = we, Ci = (s, e) => {
|
|
3656
3655
|
const t = Ri(s, e);
|
|
3657
3656
|
return t ? t.version : null;
|
|
3658
3657
|
};
|
|
3659
|
-
var
|
|
3658
|
+
var Ei = Ci;
|
|
3660
3659
|
const ki = we, Pi = (s, e) => {
|
|
3661
3660
|
const t = ki(s.trim().replace(/^[=v]+/, ""), e);
|
|
3662
3661
|
return t ? t.version : null;
|
|
3663
3662
|
};
|
|
3664
3663
|
var Oi = Pi;
|
|
3665
|
-
const
|
|
3664
|
+
const pr = M, $i = (s, e, t, r, o) => {
|
|
3666
3665
|
typeof t == "string" && (o = r, r = t, t = void 0);
|
|
3667
3666
|
try {
|
|
3668
|
-
return new
|
|
3669
|
-
s instanceof
|
|
3667
|
+
return new pr(
|
|
3668
|
+
s instanceof pr ? s.version : s,
|
|
3670
3669
|
t
|
|
3671
3670
|
).inc(e, r, o).version;
|
|
3672
3671
|
} catch {
|
|
@@ -3674,8 +3673,8 @@ const dr = M, $i = (s, e, t, r, o) => {
|
|
|
3674
3673
|
}
|
|
3675
3674
|
};
|
|
3676
3675
|
var Ii = $i;
|
|
3677
|
-
const
|
|
3678
|
-
const t =
|
|
3676
|
+
const hr = we, Fi = (s, e) => {
|
|
3677
|
+
const t = hr(s, null, !0), r = hr(e, null, !0), o = t.compare(r);
|
|
3679
3678
|
if (o === 0)
|
|
3680
3679
|
return null;
|
|
3681
3680
|
const n = o > 0, i = n ? t : r, c = n ? r : t, a = !!i.prerelease.length;
|
|
@@ -3696,14 +3695,14 @@ const Ji = we, Gi = (s, e) => {
|
|
|
3696
3695
|
return t && t.prerelease.length ? t.prerelease : null;
|
|
3697
3696
|
};
|
|
3698
3697
|
var Mi = Gi;
|
|
3699
|
-
const
|
|
3698
|
+
const fr = M, _i = (s, e, t) => new fr(s, t).compare(new fr(e, t));
|
|
3700
3699
|
var Y = _i;
|
|
3701
3700
|
const Ki = Y, Hi = (s, e, t) => Ki(e, s, t);
|
|
3702
3701
|
var Wi = Hi;
|
|
3703
3702
|
const zi = Y, Xi = (s, e) => zi(s, e, !0);
|
|
3704
3703
|
var qi = Xi;
|
|
3705
|
-
const
|
|
3706
|
-
const r = new
|
|
3704
|
+
const gr = M, Yi = (s, e, t) => {
|
|
3705
|
+
const r = new gr(s, t), o = new gr(e, t);
|
|
3707
3706
|
return r.compare(o) || r.compareBuild(o);
|
|
3708
3707
|
};
|
|
3709
3708
|
var Nt = Yi;
|
|
@@ -3748,17 +3747,17 @@ const ma = ps, va = hs, ya = Ze, wa = Bt, Sa = Dt, ba = jt, Ra = (s, e, t, r) =>
|
|
|
3748
3747
|
}
|
|
3749
3748
|
};
|
|
3750
3749
|
var fs = Ra;
|
|
3751
|
-
const
|
|
3752
|
-
if (s instanceof
|
|
3750
|
+
const Ca = M, Ea = we, { safeRe: Ge, t: Me } = De, ka = (s, e) => {
|
|
3751
|
+
if (s instanceof Ca)
|
|
3753
3752
|
return s;
|
|
3754
3753
|
if (typeof s == "number" && (s = String(s)), typeof s != "string")
|
|
3755
3754
|
return null;
|
|
3756
3755
|
e = e || {};
|
|
3757
3756
|
let t = null;
|
|
3758
3757
|
if (!e.rtl)
|
|
3759
|
-
t = s.match(e.includePrerelease ?
|
|
3758
|
+
t = s.match(e.includePrerelease ? Ge[Me.COERCEFULL] : Ge[Me.COERCE]);
|
|
3760
3759
|
else {
|
|
3761
|
-
const a = e.includePrerelease ?
|
|
3760
|
+
const a = e.includePrerelease ? Ge[Me.COERCERTLFULL] : Ge[Me.COERCERTL];
|
|
3762
3761
|
let l;
|
|
3763
3762
|
for (; (l = a.exec(s)) && (!t || t.index + t[0].length !== s.length); )
|
|
3764
3763
|
(!t || l.index + l[0].length !== t.index + t[0].length) && (t = l), a.lastIndex = l.index + l[1].length + l[2].length;
|
|
@@ -3767,7 +3766,7 @@ const Ea = M, Ca = we, { safeRe: Je, t: Ge } = De, ka = (s, e) => {
|
|
|
3767
3766
|
if (t === null)
|
|
3768
3767
|
return null;
|
|
3769
3768
|
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]}` : "";
|
|
3770
|
-
return
|
|
3769
|
+
return Ea(`${r}.${o}.${n}${i}${c}`, e);
|
|
3771
3770
|
};
|
|
3772
3771
|
var Pa = ka;
|
|
3773
3772
|
class Oa {
|
|
@@ -3793,10 +3792,10 @@ class Oa {
|
|
|
3793
3792
|
return this;
|
|
3794
3793
|
}
|
|
3795
3794
|
}
|
|
3796
|
-
var $a = Oa, it,
|
|
3795
|
+
var $a = Oa, it, mr;
|
|
3797
3796
|
function Q() {
|
|
3798
|
-
if (
|
|
3799
|
-
|
|
3797
|
+
if (mr) return it;
|
|
3798
|
+
mr = 1;
|
|
3800
3799
|
const s = /\s+/g;
|
|
3801
3800
|
class e {
|
|
3802
3801
|
constructor(p, y) {
|
|
@@ -3846,14 +3845,14 @@ function Q() {
|
|
|
3846
3845
|
p = p.replace(R, X(this.options.includePrerelease)), i("hyphen replace", p), p = p.replace(a[l.COMPARATORTRIM], u), i("comparator trim", p), p = p.replace(a[l.TILDETRIM], d), i("tilde trim", p), p = p.replace(a[l.CARETTRIM], m), i("caret trim", p);
|
|
3847
3846
|
let P = p.split(" ").map((N) => _(N, this.options)).join(" ").split(/\s+/).map((N) => x(N, this.options));
|
|
3848
3847
|
w && (P = P.filter((N) => (i("loose invalid filter", N, this.options), !!N.match(a[l.COMPARATORLOOSE])))), i("range list", P);
|
|
3849
|
-
const
|
|
3848
|
+
const C = /* @__PURE__ */ new Map(), $ = P.map((N) => new n(N, this.options));
|
|
3850
3849
|
for (const N of $) {
|
|
3851
3850
|
if (I(N))
|
|
3852
3851
|
return [N];
|
|
3853
|
-
|
|
3852
|
+
C.set(N.value, N);
|
|
3854
3853
|
}
|
|
3855
|
-
|
|
3856
|
-
const L = [...
|
|
3854
|
+
C.size > 1 && C.has("") && C.delete("");
|
|
3855
|
+
const L = [...C.values()];
|
|
3857
3856
|
return r.set(g, L), L;
|
|
3858
3857
|
}
|
|
3859
3858
|
intersects(p, y) {
|
|
@@ -3895,26 +3894,26 @@ function Q() {
|
|
|
3895
3894
|
const y = p.loose ? a[l.TILDELOOSE] : a[l.TILDE];
|
|
3896
3895
|
return v.replace(y, (g, b, w, R, P) => {
|
|
3897
3896
|
i("tilde", v, g, b, w, R, P);
|
|
3898
|
-
let
|
|
3899
|
-
return k(b) ?
|
|
3897
|
+
let C;
|
|
3898
|
+
return k(b) ? C = "" : k(w) ? C = `>=${b}.0.0 <${+b + 1}.0.0-0` : k(R) ? C = `>=${b}.${w}.0 <${b}.${+w + 1}.0-0` : P ? (i("replaceTilde pr", P), C = `>=${b}.${w}.${R}-${P} <${b}.${+w + 1}.0-0`) : C = `>=${b}.${w}.${R} <${b}.${+w + 1}.0-0`, i("tilde return", C), C;
|
|
3900
3899
|
});
|
|
3901
3900
|
}, A = (v, p) => v.trim().split(/\s+/).map((y) => z(y, p)).join(" "), z = (v, p) => {
|
|
3902
3901
|
i("caret", v, p);
|
|
3903
3902
|
const y = p.loose ? a[l.CARETLOOSE] : a[l.CARET], g = p.includePrerelease ? "-0" : "";
|
|
3904
|
-
return v.replace(y, (b, w, R, P,
|
|
3905
|
-
i("caret", v, b, w, R, P,
|
|
3903
|
+
return v.replace(y, (b, w, R, P, C) => {
|
|
3904
|
+
i("caret", v, b, w, R, P, C);
|
|
3906
3905
|
let $;
|
|
3907
|
-
return k(w) ? $ = "" : k(R) ? $ = `>=${w}.0.0${g} <${+w + 1}.0.0-0` : k(P) ? w === "0" ? $ = `>=${w}.${R}.0${g} <${w}.${+R + 1}.0-0` : $ = `>=${w}.${R}.0${g} <${+w + 1}.0.0-0` :
|
|
3906
|
+
return k(w) ? $ = "" : k(R) ? $ = `>=${w}.0.0${g} <${+w + 1}.0.0-0` : k(P) ? w === "0" ? $ = `>=${w}.${R}.0${g} <${w}.${+R + 1}.0-0` : $ = `>=${w}.${R}.0${g} <${+w + 1}.0.0-0` : C ? (i("replaceCaret pr", C), w === "0" ? R === "0" ? $ = `>=${w}.${R}.${P}-${C} <${w}.${R}.${+P + 1}-0` : $ = `>=${w}.${R}.${P}-${C} <${w}.${+R + 1}.0-0` : $ = `>=${w}.${R}.${P}-${C} <${+w + 1}.0.0-0`) : (i("no pr"), w === "0" ? R === "0" ? $ = `>=${w}.${R}.${P}${g} <${w}.${R}.${+P + 1}-0` : $ = `>=${w}.${R}.${P}${g} <${w}.${+R + 1}.0-0` : $ = `>=${w}.${R}.${P} <${+w + 1}.0.0-0`), i("caret return", $), $;
|
|
3908
3907
|
});
|
|
3909
3908
|
}, oe = (v, p) => (i("replaceXRanges", v, p), v.split(/\s+/).map((y) => K(y, p)).join(" ")), K = (v, p) => {
|
|
3910
3909
|
v = v.trim();
|
|
3911
3910
|
const y = p.loose ? a[l.XRANGELOOSE] : a[l.XRANGE];
|
|
3912
|
-
return v.replace(y, (g, b, w, R, P,
|
|
3913
|
-
i("xRange", v, g, b, w, R, P,
|
|
3911
|
+
return v.replace(y, (g, b, w, R, P, C) => {
|
|
3912
|
+
i("xRange", v, g, b, w, R, P, C);
|
|
3914
3913
|
const $ = k(w), L = $ || k(R), N = L || k(P), re = N;
|
|
3915
|
-
return b === "=" && re && (b = ""),
|
|
3914
|
+
return b === "=" && re && (b = ""), C = p.includePrerelease ? "-0" : "", $ ? b === ">" || b === "<" ? g = "<0.0.0-0" : g = "*" : b && re ? (L && (R = 0), P = 0, b === ">" ? (b = ">=", L ? (w = +w + 1, R = 0, P = 0) : (R = +R + 1, P = 0)) : b === "<=" && (b = "<", L ? w = +w + 1 : R = +R + 1), b === "<" && (C = "-0"), g = `${b + w}.${R}.${P}${C}`) : L ? g = `>=${w}.0.0${C} <${+w + 1}.0.0-0` : N && (g = `>=${w}.${R}.0${C} <${w}.${+R + 1}.0-0`), i("xRange return", g), g;
|
|
3916
3915
|
});
|
|
3917
|
-
}, G = (v, p) => (i("replaceStars", v, p), v.trim().replace(a[l.STAR], "")), x = (v, p) => (i("replaceGTE0", v, p), v.trim().replace(a[p.includePrerelease ? l.GTE0PRE : l.GTE0], "")), X = (v) => (p, y, g, b, w, R, P,
|
|
3916
|
+
}, G = (v, p) => (i("replaceStars", v, p), v.trim().replace(a[l.STAR], "")), x = (v, p) => (i("replaceGTE0", v, p), v.trim().replace(a[p.includePrerelease ? l.GTE0PRE : l.GTE0], "")), X = (v) => (p, y, g, b, w, R, P, C, $, L, N, re) => (k(g) ? y = "" : k(b) ? y = `>=${g}.0.0${v ? "-0" : ""}` : k(w) ? y = `>=${g}.${b}.0${v ? "-0" : ""}` : R ? y = `>=${y}` : y = `>=${y}${v ? "-0" : ""}`, k($) ? C = "" : k(L) ? C = `<${+$ + 1}.0.0-0` : k(N) ? C = `<${$}.${+L + 1}.0-0` : re ? C = `<=${$}.${L}.${N}-${re}` : v ? C = `<${$}.${L}.${+N + 1}-0` : C = `<=${C}`, `${y} ${C}`.trim()), he = (v, p, y) => {
|
|
3918
3917
|
for (let g = 0; g < v.length; g++)
|
|
3919
3918
|
if (!v[g].test(p))
|
|
3920
3919
|
return !1;
|
|
@@ -3931,10 +3930,10 @@ function Q() {
|
|
|
3931
3930
|
};
|
|
3932
3931
|
return it;
|
|
3933
3932
|
}
|
|
3934
|
-
var at,
|
|
3933
|
+
var at, vr;
|
|
3935
3934
|
function et() {
|
|
3936
|
-
if (
|
|
3937
|
-
|
|
3935
|
+
if (vr) return at;
|
|
3936
|
+
vr = 1;
|
|
3938
3937
|
const s = Symbol("SemVer ANY");
|
|
3939
3938
|
class e {
|
|
3940
3939
|
static get ANY() {
|
|
@@ -4013,7 +4012,7 @@ const xa = M, Va = Q(), Ua = (s, e, t) => {
|
|
|
4013
4012
|
}), r;
|
|
4014
4013
|
};
|
|
4015
4014
|
var Ja = Ua;
|
|
4016
|
-
const ct = M, Ga = Q(),
|
|
4015
|
+
const ct = M, Ga = Q(), yr = Ze, Ma = (s, e) => {
|
|
4017
4016
|
s = new Ga(s, e);
|
|
4018
4017
|
let t = new ct("0.0.0");
|
|
4019
4018
|
if (s.test(t) || (t = new ct("0.0.0-0"), s.test(t)))
|
|
@@ -4029,7 +4028,7 @@ const ct = M, Ga = Q(), vr = Ze, Ma = (s, e) => {
|
|
|
4029
4028
|
c.prerelease.length === 0 ? c.patch++ : c.prerelease.push(0), c.raw = c.format();
|
|
4030
4029
|
case "":
|
|
4031
4030
|
case ">=":
|
|
4032
|
-
(!n ||
|
|
4031
|
+
(!n || yr(c, n)) && (n = c);
|
|
4033
4032
|
break;
|
|
4034
4033
|
case "<":
|
|
4035
4034
|
case "<=":
|
|
@@ -4037,7 +4036,7 @@ const ct = M, Ga = Q(), vr = Ze, Ma = (s, e) => {
|
|
|
4037
4036
|
default:
|
|
4038
4037
|
throw new Error(`Unexpected operation: ${i.operator}`);
|
|
4039
4038
|
}
|
|
4040
|
-
}), n && (!t ||
|
|
4039
|
+
}), n && (!t || yr(t, n)) && (t = n);
|
|
4041
4040
|
}
|
|
4042
4041
|
return t && s.test(t) ? t : null;
|
|
4043
4042
|
};
|
|
@@ -4050,15 +4049,15 @@ const Ka = Q(), Ha = (s, e) => {
|
|
|
4050
4049
|
}
|
|
4051
4050
|
};
|
|
4052
4051
|
var Wa = Ha;
|
|
4053
|
-
const za = M, gs = et(), { ANY: Xa } = gs, qa = Q(), Ya = tt,
|
|
4052
|
+
const za = M, gs = et(), { ANY: Xa } = gs, qa = Q(), Ya = tt, wr = Ze, Sr = Dt, Qa = jt, Za = Bt, ec = (s, e, t, r) => {
|
|
4054
4053
|
s = new za(s, r), e = new qa(e, r);
|
|
4055
4054
|
let o, n, i, c, a;
|
|
4056
4055
|
switch (t) {
|
|
4057
4056
|
case ">":
|
|
4058
|
-
o =
|
|
4057
|
+
o = wr, n = Qa, i = Sr, c = ">", a = ">=";
|
|
4059
4058
|
break;
|
|
4060
4059
|
case "<":
|
|
4061
|
-
o =
|
|
4060
|
+
o = Sr, n = Za, i = wr, c = "<", a = "<=";
|
|
4062
4061
|
break;
|
|
4063
4062
|
default:
|
|
4064
4063
|
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
|
@@ -4082,7 +4081,7 @@ const tc = xt, rc = (s, e, t) => tc(s, e, ">", t);
|
|
|
4082
4081
|
var sc = rc;
|
|
4083
4082
|
const oc = xt, nc = (s, e, t) => oc(s, e, "<", t);
|
|
4084
4083
|
var ic = nc;
|
|
4085
|
-
const
|
|
4084
|
+
const br = Q(), ac = (s, e, t) => (s = new br(s, t), e = new br(e, t), s.intersects(e, t));
|
|
4086
4085
|
var cc = ac;
|
|
4087
4086
|
const lc = tt, uc = Y;
|
|
4088
4087
|
var dc = (s, e, t) => {
|
|
@@ -4098,10 +4097,10 @@ var dc = (s, e, t) => {
|
|
|
4098
4097
|
const a = c.join(" || "), l = typeof e.raw == "string" ? e.raw : String(e);
|
|
4099
4098
|
return a.length < l.length ? a : e;
|
|
4100
4099
|
};
|
|
4101
|
-
const
|
|
4100
|
+
const Rr = Q(), Vt = et(), { ANY: lt } = Vt, be = tt, Ut = Y, pc = (s, e, t = {}) => {
|
|
4102
4101
|
if (s === e)
|
|
4103
4102
|
return !0;
|
|
4104
|
-
s = new
|
|
4103
|
+
s = new Rr(s, t), e = new Rr(e, t);
|
|
4105
4104
|
let r = !1;
|
|
4106
4105
|
e: for (const o of s.set) {
|
|
4107
4106
|
for (const n of e.set) {
|
|
@@ -4113,23 +4112,23 @@ const br = Q(), Vt = et(), { ANY: lt } = Vt, be = tt, Ut = Y, pc = (s, e, t = {}
|
|
|
4113
4112
|
return !1;
|
|
4114
4113
|
}
|
|
4115
4114
|
return !0;
|
|
4116
|
-
}, hc = [new Vt(">=0.0.0-0")],
|
|
4115
|
+
}, hc = [new Vt(">=0.0.0-0")], Cr = [new Vt(">=0.0.0")], fc = (s, e, t) => {
|
|
4117
4116
|
if (s === e)
|
|
4118
4117
|
return !0;
|
|
4119
4118
|
if (s.length === 1 && s[0].semver === lt) {
|
|
4120
4119
|
if (e.length === 1 && e[0].semver === lt)
|
|
4121
4120
|
return !0;
|
|
4122
|
-
t.includePrerelease ? s = hc : s =
|
|
4121
|
+
t.includePrerelease ? s = hc : s = Cr;
|
|
4123
4122
|
}
|
|
4124
4123
|
if (e.length === 1 && e[0].semver === lt) {
|
|
4125
4124
|
if (t.includePrerelease)
|
|
4126
4125
|
return !0;
|
|
4127
|
-
e =
|
|
4126
|
+
e = Cr;
|
|
4128
4127
|
}
|
|
4129
4128
|
const r = /* @__PURE__ */ new Set();
|
|
4130
4129
|
let o, n;
|
|
4131
4130
|
for (const h of s)
|
|
4132
|
-
h.operator === ">" || h.operator === ">=" ? o = Er(o, h, t) : h.operator === "<" || h.operator === "<=" ? n =
|
|
4131
|
+
h.operator === ">" || h.operator === ">=" ? o = Er(o, h, t) : h.operator === "<" || h.operator === "<=" ? n = kr(n, h, t) : r.add(h.semver);
|
|
4133
4132
|
if (r.size > 1)
|
|
4134
4133
|
return null;
|
|
4135
4134
|
let i;
|
|
@@ -4159,7 +4158,7 @@ const br = Q(), Vt = et(), { ANY: lt } = Vt, be = tt, Ut = Y, pc = (s, e, t = {}
|
|
|
4159
4158
|
}
|
|
4160
4159
|
if (n) {
|
|
4161
4160
|
if (d && h.semver.prerelease && h.semver.prerelease.length && h.semver.major === d.major && h.semver.minor === d.minor && h.semver.patch === d.patch && (d = !1), h.operator === "<" || h.operator === "<=") {
|
|
4162
|
-
if (a =
|
|
4161
|
+
if (a = kr(n, h, t), a === h && a !== n)
|
|
4163
4162
|
return !1;
|
|
4164
4163
|
} else if (n.operator === "<=" && !be(n.semver, String(h), t))
|
|
4165
4164
|
return !1;
|
|
@@ -4173,14 +4172,14 @@ const br = Q(), Vt = et(), { ANY: lt } = Vt, be = tt, Ut = Y, pc = (s, e, t = {}
|
|
|
4173
4172
|
return e;
|
|
4174
4173
|
const r = Ut(s.semver, e.semver, t);
|
|
4175
4174
|
return r > 0 ? s : r < 0 || e.operator === ">" && s.operator === ">=" ? e : s;
|
|
4176
|
-
},
|
|
4175
|
+
}, kr = (s, e, t) => {
|
|
4177
4176
|
if (!s)
|
|
4178
4177
|
return e;
|
|
4179
4178
|
const r = Ut(s.semver, e.semver, t);
|
|
4180
4179
|
return r < 0 ? s : r > 0 || e.operator === "<" && s.operator === "<=" ? e : s;
|
|
4181
4180
|
};
|
|
4182
4181
|
var gc = pc;
|
|
4183
|
-
const ut = De,
|
|
4182
|
+
const ut = De, Pr = Ye, mc = M, Or = ds, vc = we, yc = Ei, wc = Oi, Sc = Ii, bc = Ti, Rc = Ni, Cc = ji, Ec = Ui, kc = Mi, Pc = Y, Oc = Wi, $c = qi, Ic = Nt, Fc = ea, Tc = sa, Ac = Ze, Lc = Dt, Nc = ps, Dc = hs, Bc = Bt, jc = jt, xc = fs, Vc = Pa, Uc = et(), Jc = Q(), Gc = tt, Mc = La, _c = ja, Kc = Ja, Hc = _a, Wc = Wa, zc = xt, Xc = sc, qc = ic, Yc = cc, Qc = dc, Zc = gc;
|
|
4184
4183
|
var el = {
|
|
4185
4184
|
parse: vc,
|
|
4186
4185
|
valid: yc,
|
|
@@ -4188,8 +4187,8 @@ var el = {
|
|
|
4188
4187
|
inc: Sc,
|
|
4189
4188
|
diff: bc,
|
|
4190
4189
|
major: Rc,
|
|
4191
|
-
minor:
|
|
4192
|
-
patch:
|
|
4190
|
+
minor: Cc,
|
|
4191
|
+
patch: Ec,
|
|
4193
4192
|
prerelease: kc,
|
|
4194
4193
|
compare: Pc,
|
|
4195
4194
|
rcompare: Oc,
|
|
@@ -4223,10 +4222,10 @@ var el = {
|
|
|
4223
4222
|
re: ut.re,
|
|
4224
4223
|
src: ut.src,
|
|
4225
4224
|
tokens: ut.t,
|
|
4226
|
-
SEMVER_SPEC_VERSION:
|
|
4227
|
-
RELEASE_TYPES:
|
|
4228
|
-
compareIdentifiers:
|
|
4229
|
-
rcompareIdentifiers:
|
|
4225
|
+
SEMVER_SPEC_VERSION: Pr.SEMVER_SPEC_VERSION,
|
|
4226
|
+
RELEASE_TYPES: Pr.RELEASE_TYPES,
|
|
4227
|
+
compareIdentifiers: Or.compareIdentifiers,
|
|
4228
|
+
rcompareIdentifiers: Or.rcompareIdentifiers
|
|
4230
4229
|
};
|
|
4231
4230
|
const tl = /* @__PURE__ */ ci(el), rl = {
|
|
4232
4231
|
minDelay: 1500
|
|
@@ -4255,7 +4254,7 @@ class ol extends Gs {
|
|
|
4255
4254
|
switch (t.type) {
|
|
4256
4255
|
case "dev-v1":
|
|
4257
4256
|
try {
|
|
4258
|
-
const r = await
|
|
4257
|
+
const r = await Jr(t.folder);
|
|
4259
4258
|
return r === t.mtime ? void 0 : { ...t, mtime: r };
|
|
4260
4259
|
} catch (r) {
|
|
4261
4260
|
this.logger.warn(r);
|
|
@@ -4276,7 +4275,7 @@ class ol extends Gs {
|
|
|
4276
4275
|
const r = this.registryProvider.getRegistry(t.registryUrl);
|
|
4277
4276
|
let o;
|
|
4278
4277
|
if (t.channel === void 0) {
|
|
4279
|
-
const n = await r.getLatestOverview(t.id,
|
|
4278
|
+
const n = await r.getLatestOverview(t.id, ie);
|
|
4280
4279
|
if (n) o = n.spec;
|
|
4281
4280
|
else {
|
|
4282
4281
|
const i = await r.getLatestOverview(t.id, ke);
|
|
@@ -4284,7 +4283,7 @@ class ol extends Gs {
|
|
|
4284
4283
|
this.logger.error(`No "any" channel record for ${Jt(t.id)}`);
|
|
4285
4284
|
return;
|
|
4286
4285
|
}
|
|
4287
|
-
o = { ...i.spec, channel:
|
|
4286
|
+
o = { ...i.spec, channel: ie };
|
|
4288
4287
|
}
|
|
4289
4288
|
} else {
|
|
4290
4289
|
const n = this.preferredUpdateChannel ?? t.channel, i = await r.getLatestOverview(t.id, n);
|
|
@@ -4333,7 +4332,7 @@ class ol extends Gs {
|
|
|
4333
4332
|
}
|
|
4334
4333
|
}
|
|
4335
4334
|
}
|
|
4336
|
-
class
|
|
4335
|
+
class $r {
|
|
4337
4336
|
constructor() {
|
|
4338
4337
|
S(this, "resources", /* @__PURE__ */ new Map());
|
|
4339
4338
|
}
|
|
@@ -4374,7 +4373,7 @@ function ve() {
|
|
|
4374
4373
|
logPFrameRequests: process.env.MI_LOG_PFRAMES !== void 0
|
|
4375
4374
|
}, process.env.MI_LOG_TREE_STAT && (Re.logTreeStats = process.env.MI_LOG_TREE_STAT === "cumulative" ? "cumulative" : "per-request"), Re);
|
|
4376
4375
|
}
|
|
4377
|
-
function
|
|
4376
|
+
function Ir(s) {
|
|
4378
4377
|
return String(s.id);
|
|
4379
4378
|
}
|
|
4380
4379
|
const nl = ["Int", "Long", "Float", "Double", "String", "Bytes"];
|
|
@@ -4393,7 +4392,7 @@ function dt(s) {
|
|
|
4393
4392
|
}
|
|
4394
4393
|
return s;
|
|
4395
4394
|
}
|
|
4396
|
-
const
|
|
4395
|
+
const Ce = (s, e) => typeof e == "bigint" ? e.toString() : e;
|
|
4397
4396
|
class il {
|
|
4398
4397
|
constructor(e, t, r, o) {
|
|
4399
4398
|
S(this, "pFrame");
|
|
@@ -4430,8 +4429,8 @@ class il {
|
|
|
4430
4429
|
}
|
|
4431
4430
|
), this.pFrame.setDataSource(this);
|
|
4432
4431
|
for (const n of o) {
|
|
4433
|
-
for (const c of on(n.data)) this.blobIdToResource.set(
|
|
4434
|
-
const i = nn(n.data,
|
|
4432
|
+
for (const c of on(n.data)) this.blobIdToResource.set(Ir(c), c);
|
|
4433
|
+
const i = nn(n.data, Ir);
|
|
4435
4434
|
try {
|
|
4436
4435
|
this.pFrame.addColumnSpec(n.id, n.spec), this.pFrame.setColumnData(n.id, i);
|
|
4437
4436
|
} catch (c) {
|
|
@@ -4464,28 +4463,28 @@ class al {
|
|
|
4464
4463
|
const r = new no({
|
|
4465
4464
|
maxSize: 1e9,
|
|
4466
4465
|
// 1Gb
|
|
4467
|
-
fetchMethod: async (n) => await
|
|
4466
|
+
fetchMethod: async (n) => await Dr.readFile(n),
|
|
4468
4467
|
sizeCalculation: (n) => n.length
|
|
4469
4468
|
}), o = new Fs(1);
|
|
4470
|
-
this.blobContentCache = r, this.concurrencyLimiter = o, this.pFrames = new class extends
|
|
4469
|
+
this.blobContentCache = r, this.concurrencyLimiter = o, this.pFrames = new class extends $r {
|
|
4471
4470
|
constructor(n, i) {
|
|
4472
4471
|
super(), this.blobDriver = n, this.logger = i;
|
|
4473
4472
|
}
|
|
4474
4473
|
createNewResource(n) {
|
|
4475
4474
|
return ve().logPFrameRequests && t.info(
|
|
4476
|
-
`PFrame creation (pFrameHandle = ${this.calculateParamsKey(n)}): ${JSON.stringify(n,
|
|
4475
|
+
`PFrame creation (pFrameHandle = ${this.calculateParamsKey(n)}): ${JSON.stringify(n, Ce)}`
|
|
4477
4476
|
), new il(this.blobDriver, this.logger, r, n);
|
|
4478
4477
|
}
|
|
4479
4478
|
calculateParamsKey(n) {
|
|
4480
4479
|
return ll(n);
|
|
4481
4480
|
}
|
|
4482
|
-
}(this.blobDriver, this.logger), this.pTables = new class extends
|
|
4481
|
+
}(this.blobDriver, this.logger), this.pTables = new class extends $r {
|
|
4483
4482
|
constructor(n) {
|
|
4484
4483
|
super(), this.pFrames = n;
|
|
4485
4484
|
}
|
|
4486
4485
|
async createNewResource(n) {
|
|
4487
4486
|
const i = this.pFrames.getByKey(n.pFrameHandle), c = await o.run(async () => (ve().logPFrameRequests && t.info(
|
|
4488
|
-
`PTable creation (pTableHandle = ${this.calculateParamsKey(n)}): ${JSON.stringify(n,
|
|
4487
|
+
`PTable creation (pTableHandle = ${this.calculateParamsKey(n)}): ${JSON.stringify(n, Ce)}`
|
|
4489
4488
|
), await i.pFrame.createTable({
|
|
4490
4489
|
src: Ie(n.def.src),
|
|
4491
4490
|
filters: dt(n.def.filters)
|
|
@@ -4510,11 +4509,11 @@ class al {
|
|
|
4510
4509
|
return t.addOnDestroy(o.unref), o.key;
|
|
4511
4510
|
}
|
|
4512
4511
|
createPTable(e, t) {
|
|
4513
|
-
const r = this.createPFrame(
|
|
4512
|
+
const r = this.createPFrame(Cs(e.src), t), o = pt(e, (i) => i.id), n = this.pTables.acquire({ def: o, pFrameHandle: r });
|
|
4514
4513
|
return ve().logPFrameRequests && this.logger.info(
|
|
4515
4514
|
`Create PTable call (pFrameHandle = ${r}; pTableHandle = ${JSON.stringify(n)}): ${JSON.stringify(
|
|
4516
4515
|
pt(e, (i) => i.spec),
|
|
4517
|
-
|
|
4516
|
+
Ce
|
|
4518
4517
|
)}`
|
|
4519
4518
|
), t.addOnDestroy(n.unref), n.key;
|
|
4520
4519
|
}
|
|
@@ -4547,7 +4546,7 @@ class al {
|
|
|
4547
4546
|
}
|
|
4548
4547
|
async calculateTableData(e, t) {
|
|
4549
4548
|
let r = await this.concurrencyLimiter.run(async () => (ve().logPFrameRequests && this.logger.info(
|
|
4550
|
-
`Call calculateTableData, handle = ${e}, request = ${JSON.stringify(t,
|
|
4549
|
+
`Call calculateTableData, handle = ${e}, request = ${JSON.stringify(t, Ce)}`
|
|
4551
4550
|
), await this.pFrames.getByKey(e).pFrame.createTable({
|
|
4552
4551
|
src: Ie(t.src),
|
|
4553
4552
|
filters: dt(t.filters)
|
|
@@ -4568,7 +4567,7 @@ class al {
|
|
|
4568
4567
|
}
|
|
4569
4568
|
async getUniqueValues(e, t) {
|
|
4570
4569
|
return await this.concurrencyLimiter.run(async () => (ve().logPFrameRequests && this.logger.info(
|
|
4571
|
-
`Call getUniqueValues, handle = ${e}, request = ${JSON.stringify(t,
|
|
4570
|
+
`Call getUniqueValues, handle = ${e}, request = ${JSON.stringify(t, Ce)}`
|
|
4572
4571
|
), await this.pFrames.getByKey(e).pFrame.getUniqueValues({
|
|
4573
4572
|
...t,
|
|
4574
4573
|
filters: dt(t.filters)
|
|
@@ -4669,7 +4668,7 @@ async function ul(s, e, t) {
|
|
|
4669
4668
|
...as,
|
|
4670
4669
|
...cs(e),
|
|
4671
4670
|
...t
|
|
4672
|
-
}, o = new
|
|
4671
|
+
}, o = new Nr(r.localSecret), n = zs(r.logger, s, r.localProjections), i = Xs(s, r.logger), c = qs(s, r.logger), a = Ys(s, r.logger), l = new Qs(
|
|
4673
4672
|
r.logger,
|
|
4674
4673
|
n,
|
|
4675
4674
|
i,
|
|
@@ -4741,7 +4740,7 @@ class ms {
|
|
|
4741
4740
|
async projectIdToResourceId(e) {
|
|
4742
4741
|
return await this.pl.withReadTx("Project id to resource id", async (t) => {
|
|
4743
4742
|
const r = (await t.getField(j(this.projectListResourceId, e))).value;
|
|
4744
|
-
if (
|
|
4743
|
+
if (Ke(r)) throw new Error("Unexpected project list structure.");
|
|
4745
4744
|
return r;
|
|
4746
4745
|
});
|
|
4747
4746
|
}
|
|
@@ -4780,7 +4779,7 @@ class ms {
|
|
|
4780
4779
|
/** Generates sufficiently random string to be used as local secret for the
|
|
4781
4780
|
* middle layer */
|
|
4782
4781
|
static generateLocalSecret() {
|
|
4783
|
-
return
|
|
4782
|
+
return Nr.generateSecret();
|
|
4784
4783
|
}
|
|
4785
4784
|
/** Initialize middle layer */
|
|
4786
4785
|
static async init(e, t, r) {
|
|
@@ -4794,12 +4793,12 @@ class ms {
|
|
|
4794
4793
|
const F = j(I.clientRoot, Oo);
|
|
4795
4794
|
I.createField(F, "Dynamic");
|
|
4796
4795
|
const D = await I.getField(F);
|
|
4797
|
-
if (
|
|
4798
|
-
const _ = I.createEphemeral(
|
|
4796
|
+
if (Ke(D.value)) {
|
|
4797
|
+
const _ = I.createEphemeral(_r);
|
|
4799
4798
|
return I.lock(_), I.setField(F, _), await I.commit(), await _.globalId;
|
|
4800
4799
|
} else
|
|
4801
4800
|
return D.value;
|
|
4802
|
-
}), i = o.logger, c = await ul(e, t, o), a = new
|
|
4801
|
+
}), i = o.logger, c = await ul(e, t, o), a = new Es(e.httpDispatcher, {
|
|
4803
4802
|
minTimeout: 250,
|
|
4804
4803
|
maxRetries: 4
|
|
4805
4804
|
}), l = new go(a), u = new qo(
|
|
@@ -4924,47 +4923,47 @@ async function Wl(s, e = {}) {
|
|
|
4924
4923
|
return o.blockRegistryOverviewChecks = await ge(
|
|
4925
4924
|
t.blockRegistryDurationMs,
|
|
4926
4925
|
t.maxRegistryChecksPerSecond,
|
|
4927
|
-
async () => await
|
|
4926
|
+
async () => await Ee(new URL(t.blockOverviewPath, t.blockRegistryUrl), t, c)
|
|
4928
4927
|
), o.blockGARegistryOverviewChecks = await ge(
|
|
4929
4928
|
t.blockRegistryDurationMs,
|
|
4930
4929
|
t.maxRegistryChecksPerSecond,
|
|
4931
|
-
async () => await
|
|
4930
|
+
async () => await Ee(new URL(t.blockOverviewPath, t.blockGARegistryUrl), t, c)
|
|
4932
4931
|
), o.blockRegistryUiChecks = await ge(
|
|
4933
4932
|
t.blockRegistryDurationMs,
|
|
4934
4933
|
t.maxRegistryChecksPerSecond,
|
|
4935
|
-
async () => await
|
|
4934
|
+
async () => await Ee(new URL(t.blockUiPath, t.blockRegistryUrl), t, c)
|
|
4936
4935
|
), o.blockGARegistryUiChecks = await ge(
|
|
4937
4936
|
t.blockRegistryDurationMs,
|
|
4938
4937
|
t.maxRegistryChecksPerSecond,
|
|
4939
|
-
async () => await
|
|
4938
|
+
async () => await Ee(new URL(t.blockUiPath, t.blockGARegistryUrl), t, c)
|
|
4940
4939
|
), o.autoUpdateCdnChecks = await ge(
|
|
4941
4940
|
t.autoUpdateCdnDurationMs,
|
|
4942
4941
|
t.maxAutoUpdateCdnChecksPerSecond,
|
|
4943
|
-
async () => await
|
|
4942
|
+
async () => await Ee(t.autoUpdateCdnUrl, t, c)
|
|
4944
4943
|
), pl(o, s, t, r);
|
|
4945
4944
|
}
|
|
4946
4945
|
async function ge(s, e, t) {
|
|
4947
|
-
const r =
|
|
4948
|
-
for (;
|
|
4949
|
-
const n =
|
|
4946
|
+
const r = Et(), o = [];
|
|
4947
|
+
for (; Fr(r) < s; ) {
|
|
4948
|
+
const n = Et();
|
|
4950
4949
|
let i;
|
|
4951
4950
|
try {
|
|
4952
4951
|
i = { ok: !0, value: await t() };
|
|
4953
4952
|
} catch (l) {
|
|
4954
4953
|
i = { ok: !1, error: l };
|
|
4955
4954
|
}
|
|
4956
|
-
const c =
|
|
4955
|
+
const c = Fr(n);
|
|
4957
4956
|
o.push({
|
|
4958
4957
|
elapsedMs: c,
|
|
4959
4958
|
response: i
|
|
4960
4959
|
});
|
|
4961
4960
|
const a = 1e3 / e - c;
|
|
4962
|
-
a > 0 && await
|
|
4961
|
+
a > 0 && await Vr(a);
|
|
4963
4962
|
}
|
|
4964
4963
|
return o;
|
|
4965
4964
|
}
|
|
4966
|
-
async function
|
|
4967
|
-
const { body: r, statusCode: o } = await
|
|
4965
|
+
async function Ee(s, e, t) {
|
|
4966
|
+
const { body: r, statusCode: o } = await ae(s, {
|
|
4968
4967
|
dispatcher: t,
|
|
4969
4968
|
headersTimeout: e.httpTimeoutMs,
|
|
4970
4969
|
bodyTimeout: e.httpTimeoutMs
|
|
@@ -5040,11 +5039,11 @@ function hl(s) {
|
|
|
5040
5039
|
}
|
|
5041
5040
|
return { mean: t, median: r };
|
|
5042
5041
|
}
|
|
5043
|
-
function
|
|
5042
|
+
function Et() {
|
|
5044
5043
|
return Date.now();
|
|
5045
5044
|
}
|
|
5046
|
-
function
|
|
5047
|
-
return
|
|
5045
|
+
function Fr(s) {
|
|
5046
|
+
return Et() - s;
|
|
5048
5047
|
}
|
|
5049
5048
|
export {
|
|
5050
5049
|
Vl as BlockPackRegistry,
|
|
@@ -5069,8 +5068,8 @@ export {
|
|
|
5069
5068
|
Jl as V1CentralRegistry,
|
|
5070
5069
|
go as V2RegistryProvider,
|
|
5071
5070
|
Wl as checkNetwork,
|
|
5072
|
-
|
|
5073
|
-
|
|
5071
|
+
Kr as createRenderTemplate,
|
|
5072
|
+
Jr as getDevV1PacketMtime,
|
|
5074
5073
|
Ot as getDevV2PacketMtime,
|
|
5075
5074
|
ul as initDriverKit,
|
|
5076
5075
|
It as loadTemplate,
|