@milaboratories/pl-middle-layer 1.33.3 → 1.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +241 -226
- package/dist/index.mjs.map +1 -1
- package/dist/js_render/context.d.ts +11 -1
- package/dist/js_render/context.d.ts.map +1 -1
- package/dist/js_render/index.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/js_render/context.ts +18 -0
- package/src/js_render/index.ts +10 -1
package/dist/index.mjs
CHANGED
|
@@ -34,13 +34,13 @@ export * from "@milaboratories/pl-deployments";
|
|
|
34
34
|
import { request as At, RetryAgent as Vs } from "undici";
|
|
35
35
|
import { RegistryV1 as ue, tryLoadPackDescription as wt, BlockPackMetaEmbedAbsoluteBytes as Us, RegistryV2Reader as Gs, folderReaderByUrl as Js, loadPackDescription as Zt } from "@platforma-sdk/block-tools";
|
|
36
36
|
import Q from "node:fs";
|
|
37
|
-
import
|
|
37
|
+
import _ from "node:path";
|
|
38
38
|
import Ms from "yaml";
|
|
39
|
-
import { assertNever as
|
|
39
|
+
import { assertNever as K, notEmpty as j, ConsoleLoggerAdapter as _s, HmacSha256Signer as Wr } from "@milaboratories/ts-helpers";
|
|
40
40
|
import * as qr from "node:fs/promises";
|
|
41
41
|
import er from "node:fs/promises";
|
|
42
42
|
import { tryResolve as Ks } from "@milaboratories/resolve-helper";
|
|
43
|
-
import { resourceTypesEqual as ae, field as
|
|
43
|
+
import { resourceTypesEqual as ae, field as V, Pl as A, PlClient as Hs, isNullResourceId as Ye, ensureResourceIdNotNull as St, isResource as Ws, isResourceRef as qs, isNotNullResourceId as tr, resourceType as De, resourceTypeToString as zs, stringifyWithResourceId as xe, resourceIdToString as ve, isNotFoundError as Xs, isTimeoutOrCancelError as Ys, toGlobalResourceId as Qs, plAddressToConfig as Zs, UnauthenticatedPlClient as rr } from "@milaboratories/pl-client";
|
|
44
44
|
export * from "@milaboratories/pl-client";
|
|
45
45
|
import { SynchronizedTreeState as zr, treeDumpStats as eo, isPlTreeNodeAccessor as to } from "@milaboratories/pl-tree";
|
|
46
46
|
import { Computable as J, ChangeSource as sr, PollComputablePool as ro, WatchableValue as so } from "@milaboratories/computable";
|
|
@@ -75,7 +75,7 @@ const ko = [ue.PlPackageYamlConfigFile], Po = [ue.PlPackageJsonConfigFile], Tt =
|
|
|
75
75
|
Zr
|
|
76
76
|
];
|
|
77
77
|
async function Io(s) {
|
|
78
|
-
return await or(
|
|
78
|
+
return await or(_.join(s, ...Lt)) !== void 0 || await or(_.join(s, ...Tt)) !== void 0;
|
|
79
79
|
}
|
|
80
80
|
function lt(s, e) {
|
|
81
81
|
const t = Ks(s, e);
|
|
@@ -83,15 +83,15 @@ function lt(s, e) {
|
|
|
83
83
|
return t;
|
|
84
84
|
}
|
|
85
85
|
async function ir(s, e) {
|
|
86
|
-
if (
|
|
86
|
+
if (_.isAbsolute(s) || (s = _.resolve(s)), await Io(s))
|
|
87
87
|
return {
|
|
88
|
-
workflow:
|
|
89
|
-
config:
|
|
90
|
-
ui:
|
|
88
|
+
workflow: _.join(s, ...Tt),
|
|
89
|
+
config: _.join(s, ...Lt),
|
|
90
|
+
ui: _.join(s, ...Zr)
|
|
91
91
|
};
|
|
92
92
|
{
|
|
93
93
|
const t = lt(s, nr), r = lt(s, nr), o = lt(s, Oo);
|
|
94
|
-
return { workflow: t, config: r, ui:
|
|
94
|
+
return { workflow: t, config: r, ui: _.resolve(o, "..", "dist") };
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
async function Fo(s) {
|
|
@@ -115,7 +115,7 @@ async function Ao(s) {
|
|
|
115
115
|
async function es(s) {
|
|
116
116
|
let e = 0n;
|
|
117
117
|
for (const t of $o) {
|
|
118
|
-
const r =
|
|
118
|
+
const r = _.join(s, ...t), o = await Ao(r);
|
|
119
119
|
o !== void 0 && e < o.mtimeNs && (e = o.mtimeNs);
|
|
120
120
|
}
|
|
121
121
|
return e.toString();
|
|
@@ -139,12 +139,12 @@ class pu {
|
|
|
139
139
|
o
|
|
140
140
|
)).body.json();
|
|
141
141
|
for (const a of i) {
|
|
142
|
-
const { organization: c, package: u, latestMeta: l, latestVersion: d } = a,
|
|
142
|
+
const { organization: c, package: u, latestMeta: l, latestVersion: d } = a, h = {
|
|
143
143
|
organization: c,
|
|
144
144
|
name: u,
|
|
145
145
|
version: d
|
|
146
|
-
},
|
|
147
|
-
id:
|
|
146
|
+
}, f = {
|
|
147
|
+
id: h,
|
|
148
148
|
meta: {
|
|
149
149
|
title: l.title ?? "No title",
|
|
150
150
|
description: l.description ?? "No Description",
|
|
@@ -155,18 +155,18 @@ class pu {
|
|
|
155
155
|
},
|
|
156
156
|
spec: {
|
|
157
157
|
type: "from-registry-v1",
|
|
158
|
-
id:
|
|
158
|
+
id: h,
|
|
159
159
|
registryUrl: r.url
|
|
160
160
|
}
|
|
161
161
|
};
|
|
162
162
|
t.push({
|
|
163
163
|
registryId: e.id,
|
|
164
|
-
id:
|
|
164
|
+
id: h,
|
|
165
165
|
latestByChannel: {
|
|
166
|
-
[Pe]:
|
|
167
|
-
[Oe]:
|
|
166
|
+
[Pe]: f,
|
|
167
|
+
[Oe]: f
|
|
168
168
|
},
|
|
169
|
-
allVersions: a.allVersions.map((
|
|
169
|
+
allVersions: a.allVersions.map((R) => ({ version: R, channels: [] }))
|
|
170
170
|
});
|
|
171
171
|
}
|
|
172
172
|
return t;
|
|
@@ -176,8 +176,8 @@ class pu {
|
|
|
176
176
|
case "local-dev":
|
|
177
177
|
for (const o of await Q.promises.readdir(r.path, { withFileTypes: !0 })) {
|
|
178
178
|
if (!o.isDirectory()) continue;
|
|
179
|
-
const n =
|
|
180
|
-
|
|
179
|
+
const n = _.join(r.path, o.name), i = await Fo(
|
|
180
|
+
_.join(n, ue.PlPackageYamlConfigFile)
|
|
181
181
|
);
|
|
182
182
|
if (i !== void 0) {
|
|
183
183
|
const a = ue.PlPackageConfigData.parse(Ms.parse(i)), c = await es(n), u = {
|
|
@@ -213,7 +213,7 @@ class pu {
|
|
|
213
213
|
let a = n, c = await wt(a);
|
|
214
214
|
if (c === void 0) {
|
|
215
215
|
for (const u of ["block", "meta"])
|
|
216
|
-
if (a =
|
|
216
|
+
if (a = _.join(n, u), c = await wt(a), c !== void 0) break;
|
|
217
217
|
}
|
|
218
218
|
if (c !== void 0) {
|
|
219
219
|
const u = await Dt(c), l = {
|
|
@@ -239,7 +239,7 @@ class pu {
|
|
|
239
239
|
}
|
|
240
240
|
return t;
|
|
241
241
|
default:
|
|
242
|
-
return
|
|
242
|
+
return K(r);
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
245
|
async listBlockPacks() {
|
|
@@ -333,14 +333,14 @@ async function Ho(s, e, t, r) {
|
|
|
333
333
|
for (const l of a.listDynamicFields()) {
|
|
334
334
|
const d = a.traverse(l);
|
|
335
335
|
if (d === void 0) continue;
|
|
336
|
-
const
|
|
336
|
+
const h = j(d.getKeyValueAsJson(Le)), f = j(d.getKeyValueAsJson(Nt)), R = j(d.getKeyValueAsJson(Te));
|
|
337
337
|
u.push({
|
|
338
338
|
id: l,
|
|
339
339
|
rid: d.id,
|
|
340
|
-
created: new Date(
|
|
341
|
-
lastModified: new Date(
|
|
340
|
+
created: new Date(f),
|
|
341
|
+
lastModified: new Date(R),
|
|
342
342
|
opened: c.indexOf(d.id) >= 0,
|
|
343
|
-
meta:
|
|
343
|
+
meta: h
|
|
344
344
|
});
|
|
345
345
|
}
|
|
346
346
|
return u.sort((l) => -l.lastModified.valueOf()), u;
|
|
@@ -355,7 +355,7 @@ const Wo = {
|
|
|
355
355
|
};
|
|
356
356
|
function os(s, e, t, r, o) {
|
|
357
357
|
if (o.length === 0) throw new Error("Zero output names provided");
|
|
358
|
-
const n = t ? s.createEphemeral(Wo) : s.createStruct(qo), i =
|
|
358
|
+
const n = t ? s.createEphemeral(Wo) : s.createStruct(qo), i = V(n, "template"), a = V(n, "inputs");
|
|
359
359
|
return s.createField(i, "Input", e), s.createField(a, "Input", A.createPlMap(s, r, t)), s.lockInputs(n), A.futureRecord(s, n, o, "Output", "outputs/");
|
|
360
360
|
}
|
|
361
361
|
const zo = { name: "BContextEnd", version: "1" }, Xo = { name: "BContext", version: "1" }, Yo = "id", Qo = "parent/", Zo = ["context", "result"];
|
|
@@ -370,9 +370,9 @@ function cr(s, e) {
|
|
|
370
370
|
if (e.length === 0) return en(s);
|
|
371
371
|
if (e.length === 1) return e[0];
|
|
372
372
|
const t = s.createEphemeral(Xo);
|
|
373
|
-
s.createField(
|
|
373
|
+
s.createField(V(t, Yo), "Input", A.createPlString(s, ye()));
|
|
374
374
|
for (let r = 0; r < e.length; r++)
|
|
375
|
-
s.createField(
|
|
375
|
+
s.createField(V(t, `${Qo}${r}`), "Input", e[r]);
|
|
376
376
|
return s.lock(t), t;
|
|
377
377
|
}
|
|
378
378
|
function tn(s, e) {
|
|
@@ -381,7 +381,7 @@ function tn(s, e) {
|
|
|
381
381
|
case "pl.tengo-template.v2":
|
|
382
382
|
return is(s, t);
|
|
383
383
|
default:
|
|
384
|
-
|
|
384
|
+
K(r);
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
387
|
function rn(s, e) {
|
|
@@ -390,7 +390,7 @@ function rn(s, e) {
|
|
|
390
390
|
case "pl.tengo-template.v2":
|
|
391
391
|
return is(s, t);
|
|
392
392
|
default:
|
|
393
|
-
|
|
393
|
+
K(r);
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
396
|
const lr = {
|
|
@@ -483,11 +483,11 @@ async function cn(s) {
|
|
|
483
483
|
case "prepared":
|
|
484
484
|
return s;
|
|
485
485
|
default:
|
|
486
|
-
return
|
|
486
|
+
return K(s);
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
489
|
function ln(s, e) {
|
|
490
|
-
const t = s.createStruct(sn), r =
|
|
490
|
+
const t = s.createStruct(sn), r = V(t, on), o = V(t, nn), n = V(t, an);
|
|
491
491
|
return s.setField(r, s.createValue(A.JsonString, Buffer.from(JSON.stringify(e.registry)))), s.setField(o, s.createValue(A.JsonString, Buffer.from(JSON.stringify(e.path)))), n;
|
|
492
492
|
}
|
|
493
493
|
function Bt(s, e) {
|
|
@@ -499,7 +499,7 @@ function Bt(s, e) {
|
|
|
499
499
|
case "prepared":
|
|
500
500
|
return rn(s, e);
|
|
501
501
|
default:
|
|
502
|
-
return
|
|
502
|
+
return K(e);
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
505
|
const as = { name: "Frontend/FromUrl", version: "1" }, cs = {
|
|
@@ -522,7 +522,7 @@ function un(s, e) {
|
|
|
522
522
|
})
|
|
523
523
|
);
|
|
524
524
|
default:
|
|
525
|
-
return
|
|
525
|
+
return K(e);
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
528
|
class dn {
|
|
@@ -530,7 +530,7 @@ class dn {
|
|
|
530
530
|
w(this, "nextMessageId", 0);
|
|
531
531
|
w(this, "worker");
|
|
532
532
|
w(this, "pendingRequests", /* @__PURE__ */ new Map());
|
|
533
|
-
const e = typeof global < "u" && "__WORKER_PATH__" in global ? global.__WORKER_PATH__ :
|
|
533
|
+
const e = typeof global < "u" && "__WORKER_PATH__" in global ? global.__WORKER_PATH__ : _.resolve(import.meta.dirname, "worker.js"), t = this.worker = new no(
|
|
534
534
|
e,
|
|
535
535
|
{
|
|
536
536
|
workerData: {}
|
|
@@ -609,7 +609,7 @@ class fn {
|
|
|
609
609
|
return Ue(o);
|
|
610
610
|
}
|
|
611
611
|
default:
|
|
612
|
-
return
|
|
612
|
+
return K(e);
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
615
|
async prepare(e) {
|
|
@@ -713,20 +713,20 @@ class fn {
|
|
|
713
713
|
};
|
|
714
714
|
}
|
|
715
715
|
default:
|
|
716
|
-
return
|
|
716
|
+
return K(e);
|
|
717
717
|
}
|
|
718
718
|
}
|
|
719
719
|
}
|
|
720
720
|
function gn(s, e) {
|
|
721
721
|
const t = { config: e.config, source: e.source }, r = s.createStruct(pn, JSON.stringify(t));
|
|
722
|
-
return s.createField(
|
|
722
|
+
return s.createField(V(r, ls), "Input", Bt(s, e.template)), s.createField(V(r, us), "Input", un(s, e.frontend)), s.lock(r), r;
|
|
723
723
|
}
|
|
724
724
|
function dr(s, e) {
|
|
725
725
|
switch (e.type) {
|
|
726
726
|
case "prepared":
|
|
727
727
|
return gn(s, e);
|
|
728
728
|
default:
|
|
729
|
-
return
|
|
729
|
+
return K(e.type);
|
|
730
730
|
}
|
|
731
731
|
}
|
|
732
732
|
function Ge(s, e) {
|
|
@@ -757,7 +757,7 @@ function Pt(s, e, t) {
|
|
|
757
757
|
Pt(s, o, t);
|
|
758
758
|
return;
|
|
759
759
|
default:
|
|
760
|
-
|
|
760
|
+
K(r);
|
|
761
761
|
}
|
|
762
762
|
}
|
|
763
763
|
function vn(s, e) {
|
|
@@ -943,7 +943,7 @@ const Sn = (s) => {
|
|
|
943
943
|
throw new Error(`No new block info for ${s}`);
|
|
944
944
|
};
|
|
945
945
|
class Ze {
|
|
946
|
-
constructor(e, t, r, o, n, i, a, c, u, l, d,
|
|
946
|
+
constructor(e, t, r, o, n, i, a, c, u, l, d, h) {
|
|
947
947
|
w(this, "globalModCount", 0);
|
|
948
948
|
w(this, "fieldsChanged", !1);
|
|
949
949
|
//
|
|
@@ -962,7 +962,7 @@ class Ze {
|
|
|
962
962
|
w(this, "stagingGraph");
|
|
963
963
|
w(this, "pendingProductionGraph");
|
|
964
964
|
w(this, "actualProductionGraph");
|
|
965
|
-
this.rid = e, this.tx = t, this.author = r, this.schema = o, this.lastModified = n, this.meta = i, this.struct = a, this.renderingState = c, this.blocksInLimbo = u, this.blockInfos = l, this.blockFrontendStates = d, this.ctxExportTplHolder =
|
|
965
|
+
this.rid = e, this.tx = t, this.author = r, this.schema = o, this.lastModified = n, this.meta = i, this.struct = a, this.renderingState = c, this.blocksInLimbo = u, this.blockInfos = l, this.blockFrontendStates = d, this.ctxExportTplHolder = h;
|
|
966
966
|
}
|
|
967
967
|
fixProblemsAndMigrate() {
|
|
968
968
|
this.blockInfos.forEach((t) => {
|
|
@@ -1014,7 +1014,7 @@ class Ze {
|
|
|
1014
1014
|
throw new Error("block not found");
|
|
1015
1015
|
}
|
|
1016
1016
|
setBlockFieldObj(e, t, r) {
|
|
1017
|
-
const o =
|
|
1017
|
+
const o = V(this.rid, G(e, t));
|
|
1018
1018
|
if (r.ref === void 0) throw new Error("Can't set value with empty ref");
|
|
1019
1019
|
this.getBlockInfo(e).fields[t] === void 0 ? this.tx.createField(o, "Dynamic", r.ref) : this.tx.setField(o, r.ref), this.getBlockInfo(e).fields[t] = {
|
|
1020
1020
|
modCount: this.globalModCount++,
|
|
@@ -1029,7 +1029,7 @@ class Ze {
|
|
|
1029
1029
|
const o = this.getBlockInfo(e);
|
|
1030
1030
|
for (const n of t) {
|
|
1031
1031
|
const i = o.fields;
|
|
1032
|
-
n in i && (this.tx.removeField(
|
|
1032
|
+
n in i && (this.tx.removeField(V(this.rid, G(e, n))), delete i[n], this.fieldsChanged = !0, r = !0);
|
|
1033
1033
|
}
|
|
1034
1034
|
return r;
|
|
1035
1035
|
}
|
|
@@ -1156,8 +1156,8 @@ class Ze {
|
|
|
1156
1156
|
for (const u of a.onlyInB) {
|
|
1157
1157
|
const l = new hr(u, {});
|
|
1158
1158
|
this.blockInfos.set(u, l);
|
|
1159
|
-
const d = t(u),
|
|
1160
|
-
this.setBlockField(u, "blockPack", A.wrapInHolder(this.tx,
|
|
1159
|
+
const d = t(u), h = dr(this.tx, d.blockPack);
|
|
1160
|
+
this.setBlockField(u, "blockPack", A.wrapInHolder(this.tx, h), "NotReady"), this.setBlockFieldObj(
|
|
1161
1161
|
u,
|
|
1162
1162
|
"blockSettings",
|
|
1163
1163
|
this.createJsonFieldValue(Qt)
|
|
@@ -1344,12 +1344,12 @@ class Ze {
|
|
|
1344
1344
|
static async load(e, t, r) {
|
|
1345
1345
|
const o = e.getResourceData(t, !0), n = e.getKValueJson(t, ts), i = e.getKValueJson(t, Te), a = e.getKValueJson(t, Le), c = e.getKValueJson(t, de), u = e.getKValueJson(t, Qe), l = e.listKeyValuesString(t), [
|
|
1346
1346
|
d,
|
|
1347
|
-
f,
|
|
1348
1347
|
h,
|
|
1349
|
-
|
|
1348
|
+
f,
|
|
1349
|
+
R,
|
|
1350
1350
|
g,
|
|
1351
|
-
{ stagingRefreshTimestamp:
|
|
1352
|
-
|
|
1351
|
+
{ stagingRefreshTimestamp: B, blocksInLimbo: T },
|
|
1352
|
+
N
|
|
1353
1353
|
] = await Promise.all([
|
|
1354
1354
|
o,
|
|
1355
1355
|
n,
|
|
@@ -1359,9 +1359,9 @@ class Ze {
|
|
|
1359
1359
|
u,
|
|
1360
1360
|
l
|
|
1361
1361
|
]);
|
|
1362
|
-
if (
|
|
1362
|
+
if (h !== rs)
|
|
1363
1363
|
throw new Error(
|
|
1364
|
-
`Can't act on this project resource because it has a wrong schema version: ${
|
|
1364
|
+
`Can't act on this project resource because it has a wrong schema version: ${h}`
|
|
1365
1365
|
);
|
|
1366
1366
|
const $ = /* @__PURE__ */ new Map();
|
|
1367
1367
|
for (const p of d.fields) {
|
|
@@ -1373,17 +1373,17 @@ class Ze {
|
|
|
1373
1373
|
fields: {}
|
|
1374
1374
|
}, $.set(m.blockId, y)), y.fields[m.fieldName] = Ye(p.value) ? { modCount: 0 } : { modCount: 0, ref: p.value };
|
|
1375
1375
|
}
|
|
1376
|
-
const
|
|
1376
|
+
const M = await ps(), pe = kt(M.hash), L = d.fields.find(
|
|
1377
1377
|
(p) => p.name === pe
|
|
1378
1378
|
);
|
|
1379
1379
|
let X;
|
|
1380
|
-
L !== void 0 ? X = St(L.value) : (X = A.wrapInHolder(e, Bt(e,
|
|
1381
|
-
|
|
1380
|
+
L !== void 0 ? X = St(L.value) : (X = A.wrapInHolder(e, Bt(e, M.spec)), e.createField(
|
|
1381
|
+
V(t, kt(M.hash)),
|
|
1382
1382
|
"Dynamic",
|
|
1383
1383
|
X
|
|
1384
1384
|
));
|
|
1385
|
-
const ne = { stagingRefreshTimestamp:
|
|
1386
|
-
for (const p of
|
|
1385
|
+
const ne = { stagingRefreshTimestamp: B }, q = new Set(T), H = /* @__PURE__ */ new Map();
|
|
1386
|
+
for (const p of N) {
|
|
1387
1387
|
const m = Uo(p.key);
|
|
1388
1388
|
m !== void 0 && H.set(m, p.value);
|
|
1389
1389
|
}
|
|
@@ -1417,9 +1417,9 @@ class Ze {
|
|
|
1417
1417
|
t,
|
|
1418
1418
|
e,
|
|
1419
1419
|
r,
|
|
1420
|
-
f,
|
|
1421
1420
|
h,
|
|
1422
|
-
|
|
1421
|
+
f,
|
|
1422
|
+
R,
|
|
1423
1423
|
g,
|
|
1424
1424
|
ne,
|
|
1425
1425
|
q,
|
|
@@ -1437,7 +1437,7 @@ async function bn(s, e = No) {
|
|
|
1437
1437
|
s.setKValue(t, ts, JSON.stringify(rs)), s.setKValue(t, Nt, r), s.setKValue(t, Te, r), s.setKValue(t, Le, JSON.stringify(e)), s.setKValue(t, de, JSON.stringify(Lo)), s.setKValue(t, Qe, JSON.stringify(Do));
|
|
1438
1438
|
const o = await ps();
|
|
1439
1439
|
return s.createField(
|
|
1440
|
-
|
|
1440
|
+
V(t, kt(o.hash)),
|
|
1441
1441
|
"Dynamic",
|
|
1442
1442
|
A.wrapInHolder(s, Bt(s, o.spec))
|
|
1443
1443
|
), t;
|
|
@@ -1468,7 +1468,7 @@ function* Rn(s) {
|
|
|
1468
1468
|
yield e, yield t;
|
|
1469
1469
|
return;
|
|
1470
1470
|
default:
|
|
1471
|
-
|
|
1471
|
+
K(s);
|
|
1472
1472
|
}
|
|
1473
1473
|
}
|
|
1474
1474
|
function fr(s, e) {
|
|
@@ -1491,7 +1491,7 @@ function En(s, e) {
|
|
|
1491
1491
|
}))
|
|
1492
1492
|
};
|
|
1493
1493
|
default:
|
|
1494
|
-
|
|
1494
|
+
K(s);
|
|
1495
1495
|
}
|
|
1496
1496
|
}
|
|
1497
1497
|
const Cn = De("PColumnData/JsonPartitioned", "1"), kn = De(
|
|
@@ -1629,24 +1629,24 @@ function hs(s, e = !0, t = !1, r = "") {
|
|
|
1629
1629
|
if (e) throw new Error(`unexpected field name ${l}`);
|
|
1630
1630
|
continue;
|
|
1631
1631
|
}
|
|
1632
|
-
let
|
|
1633
|
-
if (!
|
|
1632
|
+
let h = j((a = d.groups) == null ? void 0 : a.name);
|
|
1633
|
+
if (!h.startsWith(r)) {
|
|
1634
1634
|
if (e) throw new Error(`unexpected field name ${l}`);
|
|
1635
1635
|
continue;
|
|
1636
1636
|
}
|
|
1637
|
-
|
|
1638
|
-
const
|
|
1639
|
-
let
|
|
1640
|
-
switch (
|
|
1637
|
+
h = h.slice(r.length);
|
|
1638
|
+
const f = j((c = d.groups) == null ? void 0 : c.type);
|
|
1639
|
+
let R = n.get(h);
|
|
1640
|
+
switch (R === void 0 && (R = {}, n.set(h, R)), f) {
|
|
1641
1641
|
case "spec":
|
|
1642
|
-
|
|
1642
|
+
R.spec = (u = s.traverse({
|
|
1643
1643
|
field: l,
|
|
1644
1644
|
ignoreError: t,
|
|
1645
1645
|
pureFieldErrorToUndefined: t
|
|
1646
1646
|
})) == null ? void 0 : u.getDataAsJson();
|
|
1647
1647
|
break;
|
|
1648
1648
|
case "data":
|
|
1649
|
-
|
|
1649
|
+
R.hasData = !0, R.data = () => s.traverseOrError({
|
|
1650
1650
|
field: l,
|
|
1651
1651
|
ignoreError: t
|
|
1652
1652
|
});
|
|
@@ -1817,7 +1817,7 @@ class xt {
|
|
|
1817
1817
|
return t;
|
|
1818
1818
|
}
|
|
1819
1819
|
static create(e, t, r) {
|
|
1820
|
-
const o = e.accessor(t).node(), n =
|
|
1820
|
+
const o = e.accessor(t).node(), n = j(o.getKeyValueAsJson(de)), a = Ot(n).traverseIds("upstream", r), c = /* @__PURE__ */ new Map();
|
|
1821
1821
|
for (const u of se(n)) {
|
|
1822
1822
|
if (!a.has(u.id)) continue;
|
|
1823
1823
|
const l = mr(
|
|
@@ -1854,7 +1854,7 @@ function mr(s, e) {
|
|
|
1854
1854
|
function jt(s, e) {
|
|
1855
1855
|
return {
|
|
1856
1856
|
blockId: e,
|
|
1857
|
-
args: (n) =>
|
|
1857
|
+
args: (n) => j(
|
|
1858
1858
|
n.accessor(s).node().traverse({
|
|
1859
1859
|
field: G(e, "currentArgs"),
|
|
1860
1860
|
errorIfFieldNotSet: !0
|
|
@@ -1869,7 +1869,7 @@ function jt(s, e) {
|
|
|
1869
1869
|
},
|
|
1870
1870
|
uiState: (n) => n.accessor(s).node().getKeyValueAsString(Rt(e)),
|
|
1871
1871
|
blockMeta: (n) => {
|
|
1872
|
-
const i = n.accessor(s).node(), a =
|
|
1872
|
+
const i = n.accessor(s).node(), a = j(i.getKeyValueAsJson(de)), c = /* @__PURE__ */ new Map();
|
|
1873
1873
|
for (const u of se(a)) c.set(u.id, u);
|
|
1874
1874
|
return c;
|
|
1875
1875
|
}
|
|
@@ -1946,7 +1946,7 @@ function* z(s, e) {
|
|
|
1946
1946
|
yield* z(s.operand1), yield* z(s.operand2);
|
|
1947
1947
|
return;
|
|
1948
1948
|
default:
|
|
1949
|
-
|
|
1949
|
+
K(s);
|
|
1950
1950
|
}
|
|
1951
1951
|
}
|
|
1952
1952
|
function Dn(s, e) {
|
|
@@ -2373,7 +2373,7 @@ function P(s, e) {
|
|
|
2373
2373
|
}
|
|
2374
2374
|
});
|
|
2375
2375
|
default:
|
|
2376
|
-
return
|
|
2376
|
+
return K(e);
|
|
2377
2377
|
}
|
|
2378
2378
|
}
|
|
2379
2379
|
const ci = ["$prod", "$staging"];
|
|
@@ -2400,7 +2400,7 @@ function vr(s, e, t, r) {
|
|
|
2400
2400
|
const o = new Yr(t), n = (a, c) => {
|
|
2401
2401
|
if (di(a))
|
|
2402
2402
|
return e.result = c, !1;
|
|
2403
|
-
const u =
|
|
2403
|
+
const u = j(e.pendingSubroutines.get(a.op));
|
|
2404
2404
|
if (a.arg in u.args) throw new Error("argument already set");
|
|
2405
2405
|
return u.args[a.arg] = c, u.argCounter--, u.argCounter === 0 && (e.pendingSubroutines.delete(a.op), o.push({
|
|
2406
2406
|
destination: u.destination,
|
|
@@ -2422,10 +2422,10 @@ function vr(s, e, t, r) {
|
|
|
2422
2422
|
operation: c.subroutine({})
|
|
2423
2423
|
});
|
|
2424
2424
|
else {
|
|
2425
|
-
for (const [
|
|
2425
|
+
for (const [h, f] of l)
|
|
2426
2426
|
o.push({
|
|
2427
|
-
destination: { op: u, arg:
|
|
2428
|
-
operation:
|
|
2427
|
+
destination: { op: u, arg: h },
|
|
2428
|
+
operation: f
|
|
2429
2429
|
});
|
|
2430
2430
|
e.pendingSubroutines.set(u, {
|
|
2431
2431
|
argCounter: d,
|
|
@@ -2445,7 +2445,7 @@ function vr(s, e, t, r) {
|
|
|
2445
2445
|
});
|
|
2446
2446
|
break;
|
|
2447
2447
|
default:
|
|
2448
|
-
|
|
2448
|
+
K(c);
|
|
2449
2449
|
}
|
|
2450
2450
|
}
|
|
2451
2451
|
return i;
|
|
@@ -2477,23 +2477,23 @@ function ws(s, e, t, r = {}) {
|
|
|
2477
2477
|
),
|
|
2478
2478
|
postprocessValue(u) {
|
|
2479
2479
|
const l = [];
|
|
2480
|
-
for (const
|
|
2481
|
-
l.push({ destination:
|
|
2480
|
+
for (const R of u)
|
|
2481
|
+
l.push({ destination: R.destination, operation: k(R.computable) });
|
|
2482
2482
|
const d = {
|
|
2483
2483
|
drivers: s,
|
|
2484
2484
|
get cCtx() {
|
|
2485
2485
|
throw new Error("asynchronous operations are forbidden in this context");
|
|
2486
2486
|
}
|
|
2487
|
-
},
|
|
2488
|
-
for (const [
|
|
2489
|
-
|
|
2490
|
-
const
|
|
2487
|
+
}, h = /* @__PURE__ */ new Map();
|
|
2488
|
+
for (const [R, g] of a.pendingSubroutines)
|
|
2489
|
+
h.set(R, { ...g, args: { ...g.args } });
|
|
2490
|
+
const f = {
|
|
2491
2491
|
result: a.result,
|
|
2492
|
-
pendingSubroutines:
|
|
2492
|
+
pendingSubroutines: h
|
|
2493
2493
|
};
|
|
2494
|
-
if (vr(d,
|
|
2494
|
+
if (vr(d, f, l, !1), !("result" in f))
|
|
2495
2495
|
throw new Error("illegal cfg rendering stack state, no result");
|
|
2496
|
-
return
|
|
2496
|
+
return f.result;
|
|
2497
2497
|
}
|
|
2498
2498
|
};
|
|
2499
2499
|
},
|
|
@@ -2507,7 +2507,7 @@ function yr(s) {
|
|
|
2507
2507
|
return s !== void 0 ? Buffer.from(s).toString("base64") : void 0;
|
|
2508
2508
|
}
|
|
2509
2509
|
class et {
|
|
2510
|
-
constructor(e, t, r, o, n) {
|
|
2510
|
+
constructor(e, t, r, o, n, i) {
|
|
2511
2511
|
w(this, "callbackRegistry");
|
|
2512
2512
|
w(this, "fnJSONStringify");
|
|
2513
2513
|
w(this, "fnJSONParse");
|
|
@@ -2520,14 +2520,14 @@ class et {
|
|
|
2520
2520
|
// Result Pool
|
|
2521
2521
|
//
|
|
2522
2522
|
w(this, "_resultPool");
|
|
2523
|
-
if (this.scope = e, this.vm = t, this.blockCtx = r, this.env = o, this.
|
|
2524
|
-
t.getProp(t.global, "JSON").consume((
|
|
2523
|
+
if (this.scope = e, this.vm = t, this.blockCtx = r, this.env = o, this.deadlineSetter = n, this.computableCtx = i, this.callbackRegistry = this.scope.manage(this.vm.newObject()), this.fnJSONStringify = e.manage(
|
|
2524
|
+
t.getProp(t.global, "JSON").consume((a) => t.getProp(a, "stringify"))
|
|
2525
2525
|
), t.typeof(this.fnJSONStringify) !== "function")
|
|
2526
2526
|
throw new Error("JSON.stringify() not found.");
|
|
2527
2527
|
if (this.fnJSONParse = e.manage(
|
|
2528
|
-
t.getProp(t.global, "JSON").consume((
|
|
2528
|
+
t.getProp(t.global, "JSON").consume((a) => t.getProp(a, "parse"))
|
|
2529
2529
|
), t.typeof(this.fnJSONParse) !== "function") throw new Error("JSON.parse() not found.");
|
|
2530
|
-
this.meta = r.blockMeta(
|
|
2530
|
+
this.meta = r.blockMeta(i), this.injectCtx();
|
|
2531
2531
|
}
|
|
2532
2532
|
resetComputableCtx() {
|
|
2533
2533
|
this.computableCtx = void 0, this.accessors.clear();
|
|
@@ -2537,14 +2537,16 @@ class et {
|
|
|
2537
2537
|
}
|
|
2538
2538
|
evaluateBundle(e) {
|
|
2539
2539
|
try {
|
|
2540
|
-
this.vm.unwrapResult(this.vm.evalCode(e, "bundle.js", { type: "global" })).dispose();
|
|
2540
|
+
this.deadlineSetter({ currentExecutionTarget: "evaluateBundle", deadline: Date.now() + 1e4 }), this.vm.unwrapResult(this.vm.evalCode(e, "bundle.js", { type: "global" })).dispose();
|
|
2541
2541
|
} catch (t) {
|
|
2542
2542
|
throw et.cleanErrorContext(t), t;
|
|
2543
|
+
} finally {
|
|
2544
|
+
this.deadlineSetter(void 0);
|
|
2543
2545
|
}
|
|
2544
2546
|
}
|
|
2545
2547
|
runCallback(e, ...t) {
|
|
2546
2548
|
try {
|
|
2547
|
-
return bt.withScope((r) => {
|
|
2549
|
+
return this.deadlineSetter({ currentExecutionTarget: e, deadline: Date.now() + 1e4 }), bt.withScope((r) => {
|
|
2548
2550
|
const o = r.manage(this.vm.getProp(this.callbackRegistry, e));
|
|
2549
2551
|
if (this.vm.typeof(o) !== "function")
|
|
2550
2552
|
throw new Error(`No such callback: ${e}`);
|
|
@@ -2560,6 +2562,8 @@ class et {
|
|
|
2560
2562
|
});
|
|
2561
2563
|
} catch (r) {
|
|
2562
2564
|
throw et.cleanErrorContext(r), this.errorRepo.getOriginal(r);
|
|
2565
|
+
} finally {
|
|
2566
|
+
this.deadlineSetter(void 0);
|
|
2563
2567
|
}
|
|
2564
2568
|
}
|
|
2565
2569
|
//
|
|
@@ -2750,7 +2754,7 @@ class et {
|
|
|
2750
2754
|
throw new Error(
|
|
2751
2755
|
"can't use result pool in this context (most porbably called from the future mapper)"
|
|
2752
2756
|
);
|
|
2753
|
-
this._resultPool =
|
|
2757
|
+
this._resultPool = j(
|
|
2754
2758
|
this.blockCtx.getResultsPool,
|
|
2755
2759
|
"getResultsPool"
|
|
2756
2760
|
)(this.computableCtx);
|
|
@@ -2930,8 +2934,8 @@ class et {
|
|
|
2930
2934
|
try {
|
|
2931
2935
|
return c(...l);
|
|
2932
2936
|
} catch (d) {
|
|
2933
|
-
const
|
|
2934
|
-
throw this.vm.newError(
|
|
2937
|
+
const h = this.errorRepo.setAndRecreateForQuickJS(d);
|
|
2938
|
+
throw this.vm.newError(h);
|
|
2935
2939
|
}
|
|
2936
2940
|
};
|
|
2937
2941
|
this.vm.newFunction(a, u).consume((l) => this.vm.setProp(t, a, l)), this.vm.newFunction(a, c).consume((l) => this.vm.setProp(t, a + "__internal__", l));
|
|
@@ -3070,19 +3074,30 @@ function mi(s, e, t, r, o, n = {}) {
|
|
|
3070
3074
|
a.addOnDestroy(() => c.dispose());
|
|
3071
3075
|
const u = c.manage(s.quickJs.newRuntime());
|
|
3072
3076
|
u.setMemoryLimit(1024 * 1024 * 8), u.setMaxStackSize(1024 * 320);
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
const
|
|
3076
|
-
|
|
3077
|
-
|
|
3077
|
+
let l;
|
|
3078
|
+
u.setInterruptHandler(() => l === void 0 ? !1 : Date.now() > l.deadline);
|
|
3079
|
+
const d = c.manage(u.newContext()), h = new et(
|
|
3080
|
+
c,
|
|
3081
|
+
d,
|
|
3082
|
+
e,
|
|
3083
|
+
s,
|
|
3084
|
+
(g) => {
|
|
3085
|
+
l = g;
|
|
3086
|
+
},
|
|
3087
|
+
a
|
|
3088
|
+
);
|
|
3089
|
+
h.evaluateBundle(r.content);
|
|
3090
|
+
const f = h.runCallback(t.handle);
|
|
3091
|
+
h.resetComputableCtx();
|
|
3092
|
+
let R = 0;
|
|
3078
3093
|
return Me && Me !== "unstable-only" && console.log(`Output ${t.handle} scaffold calculated.`), {
|
|
3079
|
-
ir:
|
|
3080
|
-
postprocessValue: (
|
|
3081
|
-
for (const [
|
|
3082
|
-
const
|
|
3083
|
-
return
|
|
3084
|
-
|
|
3085
|
-
),
|
|
3094
|
+
ir: h.computablesToResolve,
|
|
3095
|
+
postprocessValue: (g, { unstableMarker: B, stable: T }) => {
|
|
3096
|
+
for (const [$, M] of Object.entries(g)) h.runCallback($, M);
|
|
3097
|
+
const N = h.importObjectUniversal(f);
|
|
3098
|
+
return R++, Me && (Me !== "unstable-only" || !T) && console.log(
|
|
3099
|
+
T ? `Stable output ${t.handle} calculated ${N !== void 0 ? "defined" : "undefined"}; (#${R})` : `Unstable output ${t.handle}; marker = ${B}; ${N !== void 0 ? "defined" : "undefined"} (#${R})`
|
|
3100
|
+
), N;
|
|
3086
3101
|
}
|
|
3087
3102
|
};
|
|
3088
3103
|
}, n);
|
|
@@ -3099,8 +3114,8 @@ function Ie(s, e, t, r, o, n = {}) {
|
|
|
3099
3114
|
function yi(s, e, t) {
|
|
3100
3115
|
return J.make(
|
|
3101
3116
|
(r) => {
|
|
3102
|
-
var
|
|
3103
|
-
const o = r.accessor(s).node(), n =
|
|
3117
|
+
var R, g, B, T, N, $, M, pe;
|
|
3118
|
+
const o = r.accessor(s).node(), n = j(o.getKeyValueAsJson(Nt)), i = j(o.getKeyValueAsJson(Te)), a = j(o.getKeyValueAsJson(Le)), c = j(o.getKeyValueAsJson(de)), u = j(
|
|
3104
3119
|
o.getKeyValueAsJson(Qe)
|
|
3105
3120
|
), l = /* @__PURE__ */ new Map();
|
|
3106
3121
|
for (const { id: L } of se(c)) {
|
|
@@ -3128,20 +3143,20 @@ function yi(s, e, t) {
|
|
|
3128
3143
|
ne = {
|
|
3129
3144
|
arguments: q.getDataAsJson(),
|
|
3130
3145
|
stale: X.id !== q.id,
|
|
3131
|
-
outputError: H.error !== void 0 || U.error !== void 0 || ((
|
|
3132
|
-
outputsError: ((
|
|
3133
|
-
exportsError: (($ = U.error) == null ? void 0 : $.getDataAsString()) ?? ((pe = (
|
|
3146
|
+
outputError: H.error !== void 0 || U.error !== void 0 || ((R = H.value) == null ? void 0 : R.getError()) !== void 0 || ((g = U.value) == null ? void 0 : g.getError()) !== void 0,
|
|
3147
|
+
outputsError: ((B = H.error) == null ? void 0 : B.getDataAsString()) ?? ((N = (T = H.value) == null ? void 0 : T.getError()) == null ? void 0 : N.getDataAsString()),
|
|
3148
|
+
exportsError: (($ = U.error) == null ? void 0 : $.getDataAsString()) ?? ((pe = (M = U.value) == null ? void 0 : M.getError()) == null ? void 0 : pe.getDataAsString()),
|
|
3134
3149
|
finished: (H.value !== void 0 && H.value.getIsReadyOrError() || H.error !== void 0 && H.error.getIsReadyOrError()) && (U.value !== void 0 && U.value.getIsReadyOrError() || U.error !== void 0 && U.error.getIsReadyOrError())
|
|
3135
3150
|
};
|
|
3136
3151
|
}
|
|
3137
3152
|
l.set(L, { currentArguments: X.getDataAsJson(), prod: ne });
|
|
3138
3153
|
}
|
|
3139
|
-
const d = Xe(c, (L) => l.get(L).currentArguments),
|
|
3140
|
-
var S,
|
|
3141
|
-
const q =
|
|
3154
|
+
const d = Xe(c, (L) => l.get(L).currentArguments), h = new Set(u.blocksInLimbo), f = [...se(c)].map(({ id: L, label: X, renderingMode: ne }) => {
|
|
3155
|
+
var S, E, O, C, F;
|
|
3156
|
+
const q = j(l.get(L)), H = j(d.nodes.get(L));
|
|
3142
3157
|
let U = "NotCalculated";
|
|
3143
|
-
q.prod !== void 0 && (
|
|
3144
|
-
const Y = rt(o, L), { sections: he, title: v, inputsValid: p, sdkVersion: m } = $e(Y, ({ bpId:
|
|
3158
|
+
q.prod !== void 0 && (h.has(L) ? U = "Limbo" : U = q.prod.finished ? "Done" : "Running");
|
|
3159
|
+
const Y = rt(o, L), { sections: he, title: v, inputsValid: p, sdkVersion: m } = $e(Y, ({ bpId: x, cfg: I }) => {
|
|
3145
3160
|
const oe = jt(s, L);
|
|
3146
3161
|
return {
|
|
3147
3162
|
sections: Ie(
|
|
@@ -3149,7 +3164,7 @@ function yi(s, e, t) {
|
|
|
3149
3164
|
oe,
|
|
3150
3165
|
I.sections,
|
|
3151
3166
|
I.code,
|
|
3152
|
-
|
|
3167
|
+
x
|
|
3153
3168
|
).wrap({
|
|
3154
3169
|
recover: (Se) => (t.logger.error("Error in block model sections"), t.logger.error(Se), [])
|
|
3155
3170
|
}),
|
|
@@ -3160,7 +3175,7 @@ function yi(s, e, t) {
|
|
|
3160
3175
|
oe,
|
|
3161
3176
|
Se,
|
|
3162
3177
|
I.code,
|
|
3163
|
-
|
|
3178
|
+
x
|
|
3164
3179
|
).wrap({
|
|
3165
3180
|
recover: (As) => (t.logger.error("Error in block model title"), t.logger.error(As), "Invalid title")
|
|
3166
3181
|
})
|
|
@@ -3170,7 +3185,7 @@ function yi(s, e, t) {
|
|
|
3170
3185
|
oe,
|
|
3171
3186
|
I.inputsValid,
|
|
3172
3187
|
I.code,
|
|
3173
|
-
|
|
3188
|
+
x
|
|
3174
3189
|
).wrap({
|
|
3175
3190
|
recover: (Se) => (t.logger.error("Error in block model argsValid"), t.logger.error(Se), !1)
|
|
3176
3191
|
}),
|
|
@@ -3182,7 +3197,7 @@ function yi(s, e, t) {
|
|
|
3182
3197
|
errorIfFieldNotSet: !0
|
|
3183
3198
|
}).getDataAsJson(), b = $e(
|
|
3184
3199
|
Y,
|
|
3185
|
-
({ info:
|
|
3200
|
+
({ info: x }) => t.blockUpdateWatcher.get({ currentSpec: x.source, settings: y })
|
|
3186
3201
|
);
|
|
3187
3202
|
return {
|
|
3188
3203
|
projectResourceId: ve(s.rid),
|
|
@@ -3195,7 +3210,7 @@ function yi(s, e, t) {
|
|
|
3195
3210
|
upstreams: [...d.traverseIdsExcludingRoots("upstream", L)],
|
|
3196
3211
|
downstreams: [...d.traverseIdsExcludingRoots("downstream", L)],
|
|
3197
3212
|
calculationStatus: U,
|
|
3198
|
-
outputErrors: ((
|
|
3213
|
+
outputErrors: ((E = q.prod) == null ? void 0 : E.outputError) === !0,
|
|
3199
3214
|
outputsError: (O = q.prod) == null ? void 0 : O.outputsError,
|
|
3200
3215
|
exportsError: (C = q.prod) == null ? void 0 : C.exportsError,
|
|
3201
3216
|
settings: y,
|
|
@@ -3213,7 +3228,7 @@ function yi(s, e, t) {
|
|
|
3213
3228
|
created: new Date(n),
|
|
3214
3229
|
lastModified: new Date(i),
|
|
3215
3230
|
authorMarker: o.getKeyValueAsJson(Ct),
|
|
3216
|
-
blocks:
|
|
3231
|
+
blocks: f
|
|
3217
3232
|
};
|
|
3218
3233
|
},
|
|
3219
3234
|
{
|
|
@@ -3224,7 +3239,7 @@ function yi(s, e, t) {
|
|
|
3224
3239
|
blocks: r.blocks.map((i) => {
|
|
3225
3240
|
var l, d;
|
|
3226
3241
|
i.inputsValid || o.add(i.id), i.stale && n.add(i.id);
|
|
3227
|
-
const a = i.stale || i.upstreams.findIndex((
|
|
3242
|
+
const a = i.stale || i.upstreams.findIndex((h) => n.has(h)) !== -1, c = (a || i.outputErrors) && !!i.inputsValid && !i.missingReference && i.upstreams.findIndex((h) => o.has(h)) === -1, u = {
|
|
3228
3243
|
...i,
|
|
3229
3244
|
canRun: c,
|
|
3230
3245
|
stale: a,
|
|
@@ -3320,7 +3335,7 @@ function Ri(s, e, t) {
|
|
|
3320
3335
|
}
|
|
3321
3336
|
function Ei(s, e) {
|
|
3322
3337
|
return J.make((t) => {
|
|
3323
|
-
const r = t.accessor(s).node(), o =
|
|
3338
|
+
const r = t.accessor(s).node(), o = j(r.getKeyValueAsJson(de)), n = [];
|
|
3324
3339
|
for (const { id: i } of se(o)) {
|
|
3325
3340
|
const a = rt(r, i);
|
|
3326
3341
|
if (a === void 0) continue;
|
|
@@ -3563,11 +3578,11 @@ class Vt {
|
|
|
3563
3578
|
async resetBlockArgsAndUiState(e, t) {
|
|
3564
3579
|
await this.env.pl.withWriteTx("BlockInputsReset", async (r) => {
|
|
3565
3580
|
const o = St(
|
|
3566
|
-
(await r.getField(
|
|
3581
|
+
(await r.getField(V(this.rid, G(e, "blockPack")))).value
|
|
3567
3582
|
), n = St(
|
|
3568
|
-
(await r.getField(
|
|
3583
|
+
(await r.getField(V(o, A.HolderRefField))).value
|
|
3569
3584
|
), i = await r.getResourceData(n, !1), a = ze(JSON.parse(
|
|
3570
|
-
Buffer.from(
|
|
3585
|
+
Buffer.from(j(i.data)).toString("utf-8")
|
|
3571
3586
|
).config);
|
|
3572
3587
|
await Z(r, this.rid, t, (c) => {
|
|
3573
3588
|
c.setArgs([{ blockId: e, args: D(a.initialArgs) }]), c.setUiState(e, D(a.initialUiState));
|
|
@@ -3587,8 +3602,8 @@ class Vt {
|
|
|
3587
3602
|
}),
|
|
3588
3603
|
{
|
|
3589
3604
|
postprocessValue: (i) => {
|
|
3590
|
-
var l, d,
|
|
3591
|
-
const a = (
|
|
3605
|
+
var l, d, h;
|
|
3606
|
+
const a = (h = (d = (l = i.overview) == null ? void 0 : l.blocks) == null ? void 0 : d.find((f) => f.id == e)) == null ? void 0 : h.sdkVersion, u = a && Pi(a) && i.outputs !== void 0 ? $i(i.outputs) : i.outputs;
|
|
3592
3607
|
return {
|
|
3593
3608
|
...i.argsAndUiState,
|
|
3594
3609
|
outputs: u,
|
|
@@ -3719,8 +3734,8 @@ const bs = {
|
|
|
3719
3734
|
};
|
|
3720
3735
|
function Rs(s) {
|
|
3721
3736
|
return {
|
|
3722
|
-
blobDownloadPath:
|
|
3723
|
-
downloadBlobToURLPath:
|
|
3737
|
+
blobDownloadPath: _.join(s, "download"),
|
|
3738
|
+
downloadBlobToURLPath: _.join(s, "downloadToURL")
|
|
3724
3739
|
};
|
|
3725
3740
|
}
|
|
3726
3741
|
const Ii = {
|
|
@@ -3741,7 +3756,7 @@ const Ii = {
|
|
|
3741
3756
|
function Fi(s) {
|
|
3742
3757
|
return {
|
|
3743
3758
|
...Rs(s),
|
|
3744
|
-
frontendDownloadPath:
|
|
3759
|
+
frontendDownloadPath: _.join(s, "frontend")
|
|
3745
3760
|
};
|
|
3746
3761
|
}
|
|
3747
3762
|
function Ai(s) {
|
|
@@ -3780,19 +3795,19 @@ var ot = xi;
|
|
|
3780
3795
|
e = s.exports = {};
|
|
3781
3796
|
const i = e.re = [], a = e.safeRe = [], c = e.src = [], u = e.safeSrc = [], l = e.t = {};
|
|
3782
3797
|
let d = 0;
|
|
3783
|
-
const
|
|
3798
|
+
const h = "[a-zA-Z0-9-]", f = [
|
|
3784
3799
|
["\\s", 1],
|
|
3785
3800
|
["\\d", o],
|
|
3786
|
-
[
|
|
3787
|
-
],
|
|
3788
|
-
for (const [T,
|
|
3789
|
-
|
|
3790
|
-
return
|
|
3791
|
-
}, g = (
|
|
3792
|
-
const $ =
|
|
3793
|
-
n(
|
|
3801
|
+
[h, r]
|
|
3802
|
+
], R = (B) => {
|
|
3803
|
+
for (const [T, N] of f)
|
|
3804
|
+
B = B.split(`${T}*`).join(`${T}{0,${N}}`).split(`${T}+`).join(`${T}{1,${N}}`);
|
|
3805
|
+
return B;
|
|
3806
|
+
}, g = (B, T, N) => {
|
|
3807
|
+
const $ = R(T), M = d++;
|
|
3808
|
+
n(B, M, T), l[B] = M, c[M] = T, u[M] = $, i[M] = new RegExp(T, N ? "g" : void 0), a[M] = new RegExp($, N ? "g" : void 0);
|
|
3794
3809
|
};
|
|
3795
|
-
g("NUMERICIDENTIFIER", "0|[1-9]\\d*"), g("NUMERICIDENTIFIERLOOSE", "\\d+"), g("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${
|
|
3810
|
+
g("NUMERICIDENTIFIER", "0|[1-9]\\d*"), g("NUMERICIDENTIFIERLOOSE", "\\d+"), g("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${h}*`), g("MAINVERSION", `(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`), g("MAINVERSIONLOOSE", `(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`), g("PRERELEASEIDENTIFIER", `(?:${c[l.NUMERICIDENTIFIER]}|${c[l.NONNUMERICIDENTIFIER]})`), g("PRERELEASEIDENTIFIERLOOSE", `(?:${c[l.NUMERICIDENTIFIERLOOSE]}|${c[l.NONNUMERICIDENTIFIER]})`), g("PRERELEASE", `(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`), g("PRERELEASELOOSE", `(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`), g("BUILDIDENTIFIER", `${h}+`), g("BUILD", `(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`), g("FULLPLAIN", `v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`), g("FULL", `^${c[l.FULLPLAIN]}$`), g("LOOSEPLAIN", `[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`), g("LOOSE", `^${c[l.LOOSEPLAIN]}$`), g("GTLT", "((?:<|>)?=?)"), g("XRANGEIDENTIFIERLOOSE", `${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), g("XRANGEIDENTIFIER", `${c[l.NUMERICIDENTIFIER]}|x|X|\\*`), g("XRANGEPLAIN", `[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`), g("XRANGEPLAINLOOSE", `[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`), g("XRANGE", `^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`), g("XRANGELOOSE", `^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`), g("COERCEPLAIN", `(^|[^\\d])(\\d{1,${t}})(?:\\.(\\d{1,${t}}))?(?:\\.(\\d{1,${t}}))?`), g("COERCE", `${c[l.COERCEPLAIN]}(?:$|[^\\d])`), g("COERCEFULL", c[l.COERCEPLAIN] + `(?:${c[l.PRERELEASE]})?(?:${c[l.BUILD]})?(?:$|[^\\d])`), g("COERCERTL", c[l.COERCE], !0), g("COERCERTLFULL", c[l.COERCEFULL], !0), g("LONETILDE", "(?:~>?)"), g("TILDETRIM", `(\\s*)${c[l.LONETILDE]}\\s+`, !0), e.tildeTrimReplace = "$1~", g("TILDE", `^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`), g("TILDELOOSE", `^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`), g("LONECARET", "(?:\\^)"), g("CARETTRIM", `(\\s*)${c[l.LONECARET]}\\s+`, !0), e.caretTrimReplace = "$1^", g("CARET", `^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`), g("CARETLOOSE", `^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`), g("COMPARATORLOOSE", `^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`), g("COMPARATOR", `^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`), g("COMPARATORTRIM", `(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`, !0), e.comparatorTrimReplace = "$1$2$3", g("HYPHENRANGE", `^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`), g("HYPHENRANGELOOSE", `^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`), g("STAR", "(<|>)?=?\\s*\\*"), g("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), g("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
3796
3811
|
})(It, It.exports);
|
|
3797
3812
|
var Be = It.exports;
|
|
3798
3813
|
const ji = Object.freeze({ loose: !0 }), Vi = Object.freeze({}), Ui = (s) => s ? typeof s != "object" ? ji : s : Vi;
|
|
@@ -4133,7 +4148,7 @@ function te() {
|
|
|
4133
4148
|
this.set = [y];
|
|
4134
4149
|
else if (this.set.length > 1) {
|
|
4135
4150
|
for (const b of this.set)
|
|
4136
|
-
if (b.length === 1 &&
|
|
4151
|
+
if (b.length === 1 && B(b[0])) {
|
|
4137
4152
|
this.set = [b];
|
|
4138
4153
|
break;
|
|
4139
4154
|
}
|
|
@@ -4160,12 +4175,12 @@ function te() {
|
|
|
4160
4175
|
return this.range;
|
|
4161
4176
|
}
|
|
4162
4177
|
parseRange(p) {
|
|
4163
|
-
const y = ((this.options.includePrerelease &&
|
|
4178
|
+
const y = ((this.options.includePrerelease && f) | (this.options.loose && R)) + ":" + p, b = r.get(y);
|
|
4164
4179
|
if (b)
|
|
4165
4180
|
return b;
|
|
4166
|
-
const S = this.options.loose,
|
|
4167
|
-
p = p.replace(
|
|
4168
|
-
let O = p.split(" ").map((I) =>
|
|
4181
|
+
const S = this.options.loose, E = S ? c[u.HYPHENRANGELOOSE] : c[u.HYPHENRANGE];
|
|
4182
|
+
p = p.replace(E, Y(this.options.includePrerelease)), i("hyphen replace", p), p = p.replace(c[u.COMPARATORTRIM], l), i("comparator trim", p), p = p.replace(c[u.TILDETRIM], d), i("tilde trim", p), p = p.replace(c[u.CARETTRIM], h), i("caret trim", p);
|
|
4183
|
+
let O = p.split(" ").map((I) => N(I, this.options)).join(" ").split(/\s+/).map((I) => U(I, this.options));
|
|
4169
4184
|
S && (O = O.filter((I) => (i("loose invalid filter", I, this.options), !!I.match(c[u.COMPARATORLOOSE])))), i("range list", O);
|
|
4170
4185
|
const C = /* @__PURE__ */ new Map(), F = O.map((I) => new n(I, this.options));
|
|
4171
4186
|
for (const I of F) {
|
|
@@ -4174,13 +4189,13 @@ function te() {
|
|
|
4174
4189
|
C.set(I.value, I);
|
|
4175
4190
|
}
|
|
4176
4191
|
C.size > 1 && C.has("") && C.delete("");
|
|
4177
|
-
const
|
|
4178
|
-
return r.set(y,
|
|
4192
|
+
const x = [...C.values()];
|
|
4193
|
+
return r.set(y, x), x;
|
|
4179
4194
|
}
|
|
4180
4195
|
intersects(p, m) {
|
|
4181
4196
|
if (!(p instanceof e))
|
|
4182
4197
|
throw new TypeError("a Range is required");
|
|
4183
|
-
return this.set.some((y) => T(y, m) && p.set.some((b) => T(b, m) && y.every((S) => b.every((
|
|
4198
|
+
return this.set.some((y) => T(y, m) && p.set.some((b) => T(b, m) && y.every((S) => b.every((E) => S.intersects(E, m)))));
|
|
4184
4199
|
}
|
|
4185
4200
|
// if ANY of the sets match ALL of its comparators, then pass
|
|
4186
4201
|
test(p) {
|
|
@@ -4204,38 +4219,38 @@ function te() {
|
|
|
4204
4219
|
t: u,
|
|
4205
4220
|
comparatorTrimReplace: l,
|
|
4206
4221
|
tildeTrimReplace: d,
|
|
4207
|
-
caretTrimReplace:
|
|
4208
|
-
} = Be, { FLAG_INCLUDE_PRERELEASE:
|
|
4222
|
+
caretTrimReplace: h
|
|
4223
|
+
} = Be, { FLAG_INCLUDE_PRERELEASE: f, FLAG_LOOSE: R } = st, g = (v) => v.value === "<0.0.0-0", B = (v) => v.value === "", T = (v, p) => {
|
|
4209
4224
|
let m = !0;
|
|
4210
4225
|
const y = v.slice();
|
|
4211
4226
|
let b = y.pop();
|
|
4212
4227
|
for (; m && y.length; )
|
|
4213
4228
|
m = y.every((S) => b.intersects(S, p)), b = y.pop();
|
|
4214
4229
|
return m;
|
|
4215
|
-
},
|
|
4230
|
+
}, N = (v, p) => (i("comp", v, p), v = L(v, p), i("caret", v), v = M(v, p), i("tildes", v), v = ne(v, p), i("xrange", v), v = H(v, p), i("stars", v), v), $ = (v) => !v || v.toLowerCase() === "x" || v === "*", M = (v, p) => v.trim().split(/\s+/).map((m) => pe(m, p)).join(" "), pe = (v, p) => {
|
|
4216
4231
|
const m = p.loose ? c[u.TILDELOOSE] : c[u.TILDE];
|
|
4217
|
-
return v.replace(m, (y, b, S,
|
|
4218
|
-
i("tilde", v, y, b, S,
|
|
4232
|
+
return v.replace(m, (y, b, S, E, O) => {
|
|
4233
|
+
i("tilde", v, y, b, S, E, O);
|
|
4219
4234
|
let C;
|
|
4220
|
-
return $(b) ? C = "" : $(S) ? C = `>=${b}.0.0 <${+b + 1}.0.0-0` : $(
|
|
4235
|
+
return $(b) ? C = "" : $(S) ? C = `>=${b}.0.0 <${+b + 1}.0.0-0` : $(E) ? C = `>=${b}.${S}.0 <${b}.${+S + 1}.0-0` : O ? (i("replaceTilde pr", O), C = `>=${b}.${S}.${E}-${O} <${b}.${+S + 1}.0-0`) : C = `>=${b}.${S}.${E} <${b}.${+S + 1}.0-0`, i("tilde return", C), C;
|
|
4221
4236
|
});
|
|
4222
4237
|
}, L = (v, p) => v.trim().split(/\s+/).map((m) => X(m, p)).join(" "), X = (v, p) => {
|
|
4223
4238
|
i("caret", v, p);
|
|
4224
4239
|
const m = p.loose ? c[u.CARETLOOSE] : c[u.CARET], y = p.includePrerelease ? "-0" : "";
|
|
4225
|
-
return v.replace(m, (b, S,
|
|
4226
|
-
i("caret", v, b, S,
|
|
4240
|
+
return v.replace(m, (b, S, E, O, C) => {
|
|
4241
|
+
i("caret", v, b, S, E, O, C);
|
|
4227
4242
|
let F;
|
|
4228
|
-
return $(S) ? F = "" : $(
|
|
4243
|
+
return $(S) ? F = "" : $(E) ? F = `>=${S}.0.0${y} <${+S + 1}.0.0-0` : $(O) ? S === "0" ? F = `>=${S}.${E}.0${y} <${S}.${+E + 1}.0-0` : F = `>=${S}.${E}.0${y} <${+S + 1}.0.0-0` : C ? (i("replaceCaret pr", C), S === "0" ? E === "0" ? F = `>=${S}.${E}.${O}-${C} <${S}.${E}.${+O + 1}-0` : F = `>=${S}.${E}.${O}-${C} <${S}.${+E + 1}.0-0` : F = `>=${S}.${E}.${O}-${C} <${+S + 1}.0.0-0`) : (i("no pr"), S === "0" ? E === "0" ? F = `>=${S}.${E}.${O}${y} <${S}.${E}.${+O + 1}-0` : F = `>=${S}.${E}.${O}${y} <${S}.${+E + 1}.0-0` : F = `>=${S}.${E}.${O} <${+S + 1}.0.0-0`), i("caret return", F), F;
|
|
4229
4244
|
});
|
|
4230
4245
|
}, ne = (v, p) => (i("replaceXRanges", v, p), v.split(/\s+/).map((m) => q(m, p)).join(" ")), q = (v, p) => {
|
|
4231
4246
|
v = v.trim();
|
|
4232
4247
|
const m = p.loose ? c[u.XRANGELOOSE] : c[u.XRANGE];
|
|
4233
|
-
return v.replace(m, (y, b, S,
|
|
4234
|
-
i("xRange", v, y, b, S,
|
|
4235
|
-
const F = $(S),
|
|
4236
|
-
return b === "=" && oe && (b = ""), C = p.includePrerelease ? "-0" : "", F ? b === ">" || b === "<" ? y = "<0.0.0-0" : y = "*" : b && oe ? (
|
|
4248
|
+
return v.replace(m, (y, b, S, E, O, C) => {
|
|
4249
|
+
i("xRange", v, y, b, S, E, O, C);
|
|
4250
|
+
const F = $(S), x = F || $(E), I = x || $(O), oe = I;
|
|
4251
|
+
return b === "=" && oe && (b = ""), C = p.includePrerelease ? "-0" : "", F ? b === ">" || b === "<" ? y = "<0.0.0-0" : y = "*" : b && oe ? (x && (E = 0), O = 0, b === ">" ? (b = ">=", x ? (S = +S + 1, E = 0, O = 0) : (E = +E + 1, O = 0)) : b === "<=" && (b = "<", x ? S = +S + 1 : E = +E + 1), b === "<" && (C = "-0"), y = `${b + S}.${E}.${O}${C}`) : x ? y = `>=${S}.0.0${C} <${+S + 1}.0.0-0` : I && (y = `>=${S}.${E}.0${C} <${S}.${+E + 1}.0-0`), i("xRange return", y), y;
|
|
4237
4252
|
});
|
|
4238
|
-
}, H = (v, p) => (i("replaceStars", v, p), v.trim().replace(c[u.STAR], "")), U = (v, p) => (i("replaceGTE0", v, p), v.trim().replace(c[p.includePrerelease ? u.GTE0PRE : u.GTE0], "")), Y = (v) => (p, m, y, b, S,
|
|
4253
|
+
}, H = (v, p) => (i("replaceStars", v, p), v.trim().replace(c[u.STAR], "")), U = (v, p) => (i("replaceGTE0", v, p), v.trim().replace(c[p.includePrerelease ? u.GTE0PRE : u.GTE0], "")), Y = (v) => (p, m, y, b, S, E, O, C, F, x, I, oe) => ($(y) ? m = "" : $(b) ? m = `>=${y}.0.0${v ? "-0" : ""}` : $(S) ? m = `>=${y}.${b}.0${v ? "-0" : ""}` : E ? m = `>=${m}` : m = `>=${m}${v ? "-0" : ""}`, $(F) ? C = "" : $(x) ? C = `<${+F + 1}.0.0-0` : $(I) ? C = `<${F}.${+x + 1}.0-0` : oe ? C = `<=${F}.${x}.${I}-${oe}` : v ? C = `<${F}.${x}.${+I + 1}-0` : C = `<=${C}`, `${m} ${C}`.trim()), he = (v, p, m) => {
|
|
4239
4254
|
for (let y = 0; y < v.length; y++)
|
|
4240
4255
|
if (!v[y].test(p))
|
|
4241
4256
|
return !1;
|
|
@@ -4270,10 +4285,10 @@ function it() {
|
|
|
4270
4285
|
l = l.trim().split(/\s+/).join(" "), i("comparator", l, d), this.options = d, this.loose = !!d.loose, this.parse(l), this.semver === s ? this.value = "" : this.value = this.operator + this.semver.version, i("comp", this);
|
|
4271
4286
|
}
|
|
4272
4287
|
parse(l) {
|
|
4273
|
-
const d = this.options.loose ? r[o.COMPARATORLOOSE] : r[o.COMPARATOR],
|
|
4274
|
-
if (!
|
|
4288
|
+
const d = this.options.loose ? r[o.COMPARATORLOOSE] : r[o.COMPARATOR], h = l.match(d);
|
|
4289
|
+
if (!h)
|
|
4275
4290
|
throw new TypeError(`Invalid comparator: ${l}`);
|
|
4276
|
-
this.operator =
|
|
4291
|
+
this.operator = h[1] !== void 0 ? h[1] : "", this.operator === "=" && (this.operator = ""), h[2] ? this.semver = new a(h[2], this.options.loose) : this.semver = s;
|
|
4277
4292
|
}
|
|
4278
4293
|
toString() {
|
|
4279
4294
|
return this.value;
|
|
@@ -4388,12 +4403,12 @@ const vc = W, Is = it(), { ANY: yc } = Is, wc = te(), Sc = at, Tr = nt, Lr = Jt,
|
|
|
4388
4403
|
return !1;
|
|
4389
4404
|
for (let u = 0; u < e.set.length; ++u) {
|
|
4390
4405
|
const l = e.set[u];
|
|
4391
|
-
let d = null,
|
|
4392
|
-
if (l.forEach((
|
|
4393
|
-
|
|
4394
|
-
}), d.operator === a || d.operator === c || (!
|
|
4406
|
+
let d = null, h = null;
|
|
4407
|
+
if (l.forEach((f) => {
|
|
4408
|
+
f.semver === yc && (f = new Is(">=0.0.0")), d = d || f, h = h || f, o(f.semver, d.semver, r) ? d = f : i(f.semver, h.semver, r) && (h = f);
|
|
4409
|
+
}), d.operator === a || d.operator === c || (!h.operator || h.operator === a) && n(s, h.semver))
|
|
4395
4410
|
return !1;
|
|
4396
|
-
if (
|
|
4411
|
+
if (h.operator === c && i(s, h.semver))
|
|
4397
4412
|
return !1;
|
|
4398
4413
|
}
|
|
4399
4414
|
return !0;
|
|
@@ -4449,8 +4464,8 @@ const Nr = te(), Ht = it(), { ANY: gt } = Ht, Re = at, Wt = ee, Nc = (s, e, t =
|
|
|
4449
4464
|
}
|
|
4450
4465
|
const r = /* @__PURE__ */ new Set();
|
|
4451
4466
|
let o, n;
|
|
4452
|
-
for (const
|
|
4453
|
-
|
|
4467
|
+
for (const f of s)
|
|
4468
|
+
f.operator === ">" || f.operator === ">=" ? o = xr(o, f, t) : f.operator === "<" || f.operator === "<=" ? n = jr(n, f, t) : r.add(f.semver);
|
|
4454
4469
|
if (r.size > 1)
|
|
4455
4470
|
return null;
|
|
4456
4471
|
let i;
|
|
@@ -4460,35 +4475,35 @@ const Nr = te(), Ht = it(), { ANY: gt } = Ht, Re = at, Wt = ee, Nc = (s, e, t =
|
|
|
4460
4475
|
if (i === 0 && (o.operator !== ">=" || n.operator !== "<="))
|
|
4461
4476
|
return null;
|
|
4462
4477
|
}
|
|
4463
|
-
for (const
|
|
4464
|
-
if (o && !Re(
|
|
4478
|
+
for (const f of r) {
|
|
4479
|
+
if (o && !Re(f, String(o), t) || n && !Re(f, String(n), t))
|
|
4465
4480
|
return null;
|
|
4466
|
-
for (const
|
|
4467
|
-
if (!Re(
|
|
4481
|
+
for (const R of e)
|
|
4482
|
+
if (!Re(f, String(R), t))
|
|
4468
4483
|
return !1;
|
|
4469
4484
|
return !0;
|
|
4470
4485
|
}
|
|
4471
|
-
let a, c, u, l, d = n && !t.includePrerelease && n.semver.prerelease.length ? n.semver : !1,
|
|
4486
|
+
let a, c, u, l, d = n && !t.includePrerelease && n.semver.prerelease.length ? n.semver : !1, h = o && !t.includePrerelease && o.semver.prerelease.length ? o.semver : !1;
|
|
4472
4487
|
d && d.prerelease.length === 1 && n.operator === "<" && d.prerelease[0] === 0 && (d = !1);
|
|
4473
|
-
for (const
|
|
4474
|
-
if (l = l ||
|
|
4475
|
-
if (
|
|
4476
|
-
if (a = xr(o,
|
|
4488
|
+
for (const f of e) {
|
|
4489
|
+
if (l = l || f.operator === ">" || f.operator === ">=", u = u || f.operator === "<" || f.operator === "<=", o) {
|
|
4490
|
+
if (h && f.semver.prerelease && f.semver.prerelease.length && f.semver.major === h.major && f.semver.minor === h.minor && f.semver.patch === h.patch && (h = !1), f.operator === ">" || f.operator === ">=") {
|
|
4491
|
+
if (a = xr(o, f, t), a === f && a !== o)
|
|
4477
4492
|
return !1;
|
|
4478
|
-
} else if (o.operator === ">=" && !Re(o.semver, String(
|
|
4493
|
+
} else if (o.operator === ">=" && !Re(o.semver, String(f), t))
|
|
4479
4494
|
return !1;
|
|
4480
4495
|
}
|
|
4481
4496
|
if (n) {
|
|
4482
|
-
if (d &&
|
|
4483
|
-
if (c = jr(n,
|
|
4497
|
+
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 === "<=") {
|
|
4498
|
+
if (c = jr(n, f, t), c === f && c !== n)
|
|
4484
4499
|
return !1;
|
|
4485
|
-
} else if (n.operator === "<=" && !Re(n.semver, String(
|
|
4500
|
+
} else if (n.operator === "<=" && !Re(n.semver, String(f), t))
|
|
4486
4501
|
return !1;
|
|
4487
4502
|
}
|
|
4488
|
-
if (!
|
|
4503
|
+
if (!f.operator && (n || o) && i !== 0)
|
|
4489
4504
|
return !1;
|
|
4490
4505
|
}
|
|
4491
|
-
return !(o && u && !n && i !== 0 || n && l && !o && i !== 0 ||
|
|
4506
|
+
return !(o && u && !n && i !== 0 || n && l && !o && i !== 0 || h || d);
|
|
4492
4507
|
}, xr = (s, e, t) => {
|
|
4493
4508
|
if (!s)
|
|
4494
4509
|
return e;
|
|
@@ -4618,30 +4633,30 @@ class Ol extends ro {
|
|
|
4618
4633
|
d = l[0].update;
|
|
4619
4634
|
break;
|
|
4620
4635
|
case "major":
|
|
4621
|
-
d = (r = l.find((
|
|
4636
|
+
d = (r = l.find((R) => R.type !== "major")) == null ? void 0 : r.update;
|
|
4622
4637
|
break;
|
|
4623
4638
|
case "minor":
|
|
4624
|
-
d = (o = l.find((
|
|
4639
|
+
d = (o = l.find((R) => R.type === "patch")) == null ? void 0 : o.update;
|
|
4625
4640
|
break;
|
|
4626
4641
|
}
|
|
4627
|
-
const
|
|
4628
|
-
type:
|
|
4642
|
+
const h = l.map(({ type: R, update: g }) => ({
|
|
4643
|
+
type: R,
|
|
4629
4644
|
update: { ...n, id: { ...n.id, version: g } }
|
|
4630
4645
|
}));
|
|
4631
|
-
if (d === void 0) return { suggestions:
|
|
4646
|
+
if (d === void 0) return { suggestions: h };
|
|
4632
4647
|
if (a !== void 0 && Cl.lte(d, a))
|
|
4633
|
-
return { suggestions:
|
|
4634
|
-
const
|
|
4648
|
+
return { suggestions: h };
|
|
4649
|
+
const f = {
|
|
4635
4650
|
...n,
|
|
4636
4651
|
id: { ...n.id, version: d }
|
|
4637
4652
|
};
|
|
4638
4653
|
return (async () => {
|
|
4639
4654
|
try {
|
|
4640
|
-
await c.getComponents(
|
|
4641
|
-
} catch (
|
|
4642
|
-
this.logger.warn(
|
|
4655
|
+
await c.getComponents(f.id);
|
|
4656
|
+
} catch (R) {
|
|
4657
|
+
this.logger.warn(R);
|
|
4643
4658
|
}
|
|
4644
|
-
})(), { suggestions:
|
|
4659
|
+
})(), { suggestions: h, mainSuggestion: f };
|
|
4645
4660
|
} catch (i) {
|
|
4646
4661
|
return this.logger.warn(i), { suggestions: [] };
|
|
4647
4662
|
}
|
|
@@ -4964,7 +4979,7 @@ function Ae(s) {
|
|
|
4964
4979
|
secondary: s.secondary.map((e) => Ae(e))
|
|
4965
4980
|
};
|
|
4966
4981
|
default:
|
|
4967
|
-
|
|
4982
|
+
K(s);
|
|
4968
4983
|
}
|
|
4969
4984
|
}
|
|
4970
4985
|
function Tl(s) {
|
|
@@ -5041,7 +5056,7 @@ async function Dl(s, e, t) {
|
|
|
5041
5056
|
a,
|
|
5042
5057
|
c,
|
|
5043
5058
|
r.uploadDriverOps
|
|
5044
|
-
),
|
|
5059
|
+
), h = new wo(r.logger, i, r.logStreamDriverOps), f = new So(r.logger, h, u), R = await bo.init(
|
|
5045
5060
|
r.logger,
|
|
5046
5061
|
s,
|
|
5047
5062
|
o,
|
|
@@ -5052,8 +5067,8 @@ async function Dl(s, e, t) {
|
|
|
5052
5067
|
return {
|
|
5053
5068
|
blobDriver: u,
|
|
5054
5069
|
blobToURLDriver: l,
|
|
5055
|
-
logDriver:
|
|
5056
|
-
lsDriver:
|
|
5070
|
+
logDriver: f,
|
|
5071
|
+
lsDriver: R,
|
|
5057
5072
|
signer: o,
|
|
5058
5073
|
uploadDriver: d,
|
|
5059
5074
|
pFrameDriver: g
|
|
@@ -5081,7 +5096,7 @@ class Fs {
|
|
|
5081
5096
|
async createProject(e, t = ye()) {
|
|
5082
5097
|
const r = await this.pl.withWriteTx("MLCreateProject", async (o) => {
|
|
5083
5098
|
const n = await bn(o, e);
|
|
5084
|
-
return o.createField(
|
|
5099
|
+
return o.createField(V(this.projectListResourceId, t), "Dynamic", n), await o.commit(), await Qs(n);
|
|
5085
5100
|
});
|
|
5086
5101
|
return await this.projectListTree.refreshState(), r;
|
|
5087
5102
|
}
|
|
@@ -5095,12 +5110,12 @@ class Fs {
|
|
|
5095
5110
|
* destruction of all attached objects, like files, analysis results etc. */
|
|
5096
5111
|
async deleteProject(e) {
|
|
5097
5112
|
await this.pl.withWriteTx("MLRemoveProject", async (t) => {
|
|
5098
|
-
t.removeField(
|
|
5113
|
+
t.removeField(V(this.projectListResourceId, e)), await t.commit();
|
|
5099
5114
|
}), await this.projectListTree.refreshState();
|
|
5100
5115
|
}
|
|
5101
5116
|
async projectIdToResourceId(e) {
|
|
5102
5117
|
return await this.pl.withReadTx("Project id to resource id", async (t) => {
|
|
5103
|
-
const r = (await t.getField(
|
|
5118
|
+
const r = (await t.getField(V(this.projectListResourceId, e))).value;
|
|
5104
5119
|
if (Ye(r)) throw new Error("Unexpected project list structure.");
|
|
5105
5120
|
return r;
|
|
5106
5121
|
});
|
|
@@ -5151,12 +5166,12 @@ class Fs {
|
|
|
5151
5166
|
};
|
|
5152
5167
|
o.defaultTreeOptions.logStat = ce().logTreeStats, o.debugOps.dumpInitialTreeState = ce().dumpInitialTreeState;
|
|
5153
5168
|
const n = await e.withWriteTx("MLInitialization", async (g) => {
|
|
5154
|
-
const
|
|
5155
|
-
g.createField(
|
|
5156
|
-
const T = await g.getField(
|
|
5169
|
+
const B = V(g.clientRoot, _o);
|
|
5170
|
+
g.createField(B, "Dynamic");
|
|
5171
|
+
const T = await g.getField(B);
|
|
5157
5172
|
if (Ye(T.value)) {
|
|
5158
|
-
const
|
|
5159
|
-
return g.lock(
|
|
5173
|
+
const N = g.createEphemeral(ss);
|
|
5174
|
+
return g.lock(N), g.setField(B, N), await g.commit(), await N.globalId;
|
|
5160
5175
|
} else
|
|
5161
5176
|
return T.value;
|
|
5162
5177
|
}), i = o.logger, a = await Dl(e, t, o), c = new Vs(e.httpDispatcher, {
|
|
@@ -5170,7 +5185,7 @@ class Fs {
|
|
|
5170
5185
|
i,
|
|
5171
5186
|
e.httpDispatcher,
|
|
5172
5187
|
o.frontendDownloadPath
|
|
5173
|
-
),
|
|
5188
|
+
), h = {
|
|
5174
5189
|
pl: e,
|
|
5175
5190
|
signer: a.signer,
|
|
5176
5191
|
logger: i,
|
|
@@ -5186,16 +5201,16 @@ class Fs {
|
|
|
5186
5201
|
preferredUpdateChannel: o.preferredUpdateChannel
|
|
5187
5202
|
}),
|
|
5188
5203
|
quickJs: await lo()
|
|
5189
|
-
},
|
|
5204
|
+
}, f = new so([]), R = await Ho(e, n, f, h);
|
|
5190
5205
|
return new Fs(
|
|
5191
|
-
|
|
5206
|
+
h,
|
|
5192
5207
|
a,
|
|
5193
5208
|
a.signer,
|
|
5194
5209
|
n,
|
|
5195
|
-
|
|
5196
|
-
|
|
5210
|
+
f,
|
|
5211
|
+
R.tree,
|
|
5197
5212
|
u,
|
|
5198
|
-
|
|
5213
|
+
R.computable
|
|
5199
5214
|
);
|
|
5200
5215
|
}
|
|
5201
5216
|
}
|
|
@@ -5257,9 +5272,9 @@ async function Su(s, e = {}) {
|
|
|
5257
5272
|
}, r = [];
|
|
5258
5273
|
Nl.forEach((c) => {
|
|
5259
5274
|
Co(c).subscribe((l) => {
|
|
5260
|
-
var
|
|
5275
|
+
var h;
|
|
5261
5276
|
const d = (/* @__PURE__ */ new Date()).toISOString();
|
|
5262
|
-
(
|
|
5277
|
+
(h = l == null ? void 0 : l.response) != null && h.headers && (l.response.headers = l.response.headers.map((f) => f.toString())), r.push(
|
|
5263
5278
|
JSON.stringify({
|
|
5264
5279
|
timestamp: d,
|
|
5265
5280
|
event: c,
|