@milaboratories/pl-middle-layer 1.23.0 → 1.23.2
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/debug/index.d.ts +6 -0
- package/dist/debug/index.d.ts.map +1 -0
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +844 -831
- package/dist/index.mjs.map +1 -1
- package/dist/middle_layer/middle_layer.d.ts.map +1 -1
- package/dist/pool/driver.d.ts +3 -1
- package/dist/pool/driver.d.ts.map +1 -1
- package/package.json +12 -12
- package/src/debug/index.ts +16 -0
- package/src/middle_layer/driver_kit.ts +1 -1
- package/src/middle_layer/middle_layer.ts +2 -3
- package/src/pool/driver.ts +56 -31
package/dist/index.mjs
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var S = (s, e, t) =>
|
|
4
|
-
import { mapValueInVOE as
|
|
1
|
+
var ys = Object.defineProperty;
|
|
2
|
+
var ws = (s, e, t) => e in s ? ys(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
3
|
+
var S = (s, e, t) => ws(s, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { mapValueInVOE as Ir, executePSpecPredicate as Ss, mapPObjectData as le, mapPTableDef as Fr, JsRenderInternal as bs, extractConfig as Tr, isConfigLambda as Ar, DefaultNavigationState as Rs, extractAllColumns as Es } from "@platforma-sdk/model";
|
|
5
5
|
export * from "@platforma-sdk/model";
|
|
6
|
-
import { AnyChannel as
|
|
6
|
+
import { AnyChannel as Ee, StableChannel as ne, blockPackIdToString as Ut, blockPackIdEquals as Gt } from "@milaboratories/pl-model-middle-layer";
|
|
7
7
|
export * from "@milaboratories/pl-model-middle-layer";
|
|
8
|
-
import { request as ie, RetryAgent as
|
|
9
|
-
import { RegistryV1 as ue, tryLoadPackDescription as
|
|
8
|
+
import { request as ie, RetryAgent as Cs } from "undici";
|
|
9
|
+
import { RegistryV1 as ue, tryLoadPackDescription as pt, BlockPackMetaEmbedAbsoluteBytes as ks, RegistryV2Reader as Ps, folderReaderByUrl as Os, loadPackDescription as Jt } from "@platforma-sdk/block-tools";
|
|
10
10
|
import q from "node:fs";
|
|
11
11
|
import H from "node:path";
|
|
12
|
-
import
|
|
13
|
-
import { assertNever as G, notEmpty as B, ConsoleLoggerAdapter as
|
|
14
|
-
import * as
|
|
15
|
-
import { tryResolve as
|
|
16
|
-
import { resourceTypesEqual as ae, field as j, Pl as T, PlClient as
|
|
12
|
+
import $s from "yaml";
|
|
13
|
+
import { assertNever as G, notEmpty as B, ConsoleLoggerAdapter as Is, ConcurrencyLimitingExecutor as Fs, HmacSha256Signer as Lr } from "@milaboratories/ts-helpers";
|
|
14
|
+
import * as Nr from "node:fs/promises";
|
|
15
|
+
import { tryResolve as Ts } from "@milaboratories/resolve-helper";
|
|
16
|
+
import { resourceTypesEqual as ae, field as j, Pl as T, PlClient as As, isNullResourceId as _e, ensureResourceIdNotNull as ht, isResource as Ls, isResourceRef as Ns, isNotNullResourceId as Mt, resourceType as Ae, resourceTypeToString as Ds, resourceIdToString as Dr, isNotFoundError as Bs, isTimeoutOrCancelError as js, toGlobalResourceId as xs, plAddressToConfig as Vs, UnauthenticatedPlClient as _t } from "@milaboratories/pl-client";
|
|
17
17
|
export * from "@milaboratories/pl-client";
|
|
18
|
-
import { SynchronizedTreeState as
|
|
19
|
-
import { Computable as V, ChangeSource as
|
|
20
|
-
import { randomUUID as
|
|
21
|
-
import { parseTemplate as
|
|
22
|
-
import
|
|
23
|
-
import { Templates as
|
|
18
|
+
import { SynchronizedTreeState as Br, PlError as Us, isPlTreeNodeAccessor as Gs } from "@milaboratories/pl-tree";
|
|
19
|
+
import { Computable as V, ChangeSource as Kt, PollComputablePool as Js, WatchableValue as Ms } from "@milaboratories/computable";
|
|
20
|
+
import { randomUUID as Ie, createHash as Le } from "node:crypto";
|
|
21
|
+
import { parseTemplate as _s, PlTemplateV1 as ce, PlTemplateOverrideV1 as Ce, PlTemplateLibV1 as De, PlTemplateSoftwareV1 as we } from "@milaboratories/pl-model-backend";
|
|
22
|
+
import jr from "denque";
|
|
23
|
+
import { Templates as Ks } from "@platforma-sdk/workflow-tengo";
|
|
24
24
|
import ve from "canonicalize";
|
|
25
|
-
import
|
|
26
|
-
import { Scope as
|
|
27
|
-
import { setTimeout as
|
|
28
|
-
import { createDownloadClient as
|
|
29
|
-
import { PFrame as
|
|
30
|
-
import { LRUCache as
|
|
31
|
-
import { channel as
|
|
32
|
-
async function
|
|
25
|
+
import Hs from "node:assert";
|
|
26
|
+
import { Scope as ft, getQuickJS as Ws } from "quickjs-emscripten";
|
|
27
|
+
import { setTimeout as xr } from "node:timers/promises";
|
|
28
|
+
import { createDownloadClient as zs, createLogsClient as Xs, createUploadBlobClient as qs, createUploadProgressClient as Ys, DownloadDriver as Zs, UploadDriver as Qs, LogsStreamDriver as eo, LogsDriver as to, LsDriver as ro, DownloadUrlDriver as so } from "@milaboratories/pl-drivers";
|
|
29
|
+
import { PFrame as oo } from "@milaboratories/pframes-node";
|
|
30
|
+
import { LRUCache as no } from "lru-cache";
|
|
31
|
+
import { channel as io } from "node:diagnostics_channel";
|
|
32
|
+
async function Ht(s) {
|
|
33
33
|
try {
|
|
34
|
-
return await
|
|
34
|
+
return await Nr.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
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
const ao = [ue.PlPackageYamlConfigFile], co = [ue.PlPackageJsonConfigFile], Ct = ["backend", "dist", "tengo", "tpl", "main.plj.gz"], kt = ["config", "dist", "config.json"], Vr = ["frontend", "dist"], Wt = "block-model/dist/config.json", lo = "block-ui/package.json", uo = [
|
|
42
|
+
Ct,
|
|
43
|
+
kt,
|
|
44
|
+
ao,
|
|
45
|
+
co,
|
|
46
|
+
Vr
|
|
47
47
|
];
|
|
48
|
-
async function
|
|
49
|
-
return await
|
|
48
|
+
async function po(s) {
|
|
49
|
+
return await Ht(H.join(s, ...kt)) !== void 0 || await Ht(H.join(s, ...Ct)) !== void 0;
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
const t =
|
|
51
|
+
function rt(s, e) {
|
|
52
|
+
const t = Ts(s, e);
|
|
53
53
|
if (t === void 0) throw new Error(`Can't resolve ${e} against ${s}`);
|
|
54
54
|
return t;
|
|
55
55
|
}
|
|
56
|
-
async function
|
|
57
|
-
if (H.isAbsolute(s) || (s = H.resolve(s)), await
|
|
56
|
+
async function zt(s, e) {
|
|
57
|
+
if (H.isAbsolute(s) || (s = H.resolve(s)), await po(s))
|
|
58
58
|
return {
|
|
59
|
-
workflow: H.join(s, ...
|
|
60
|
-
config: H.join(s, ...
|
|
61
|
-
ui: H.join(s, ...
|
|
59
|
+
workflow: H.join(s, ...Ct),
|
|
60
|
+
config: H.join(s, ...kt),
|
|
61
|
+
ui: H.join(s, ...Vr)
|
|
62
62
|
};
|
|
63
63
|
{
|
|
64
|
-
const t =
|
|
64
|
+
const t = rt(s, Wt), r = rt(s, Wt), o = rt(s, lo);
|
|
65
65
|
return { workflow: t, config: r, ui: H.resolve(o, "..", "dist") };
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
async function
|
|
68
|
+
async function ho(s) {
|
|
69
69
|
try {
|
|
70
70
|
return await q.promises.readFile(s, "utf8");
|
|
71
71
|
} catch (e) {
|
|
@@ -74,7 +74,7 @@ async function lo(s) {
|
|
|
74
74
|
throw e;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
async function
|
|
77
|
+
async function fo(s) {
|
|
78
78
|
try {
|
|
79
79
|
return await q.promises.stat(s, { bigint: !0 });
|
|
80
80
|
} catch (e) {
|
|
@@ -83,21 +83,21 @@ async function uo(s) {
|
|
|
83
83
|
throw e;
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
-
async function
|
|
86
|
+
async function Ur(s) {
|
|
87
87
|
let e = 0n;
|
|
88
|
-
for (const t of
|
|
89
|
-
const r = H.join(s, ...t), o = await
|
|
88
|
+
for (const t of uo) {
|
|
89
|
+
const r = H.join(s, ...t), o = await fo(r);
|
|
90
90
|
o !== void 0 && e < o.mtimeNs && (e = o.mtimeNs);
|
|
91
91
|
}
|
|
92
92
|
return e.toString();
|
|
93
93
|
}
|
|
94
|
-
async function
|
|
94
|
+
async function Pt(s) {
|
|
95
95
|
const e = await q.promises.stat(s.components.workflow.main.file, {
|
|
96
96
|
bigint: !0
|
|
97
97
|
}), t = await q.promises.stat(s.components.model.file, { bigint: !0 });
|
|
98
98
|
return (e.mtimeNs > t.mtimeNs ? e.mtimeNs : t.mtimeNs).toString();
|
|
99
99
|
}
|
|
100
|
-
class
|
|
100
|
+
class Vl {
|
|
101
101
|
constructor(e, t, r) {
|
|
102
102
|
this.v2Provider = e, this.registries = t, this.http = r;
|
|
103
103
|
}
|
|
@@ -134,7 +134,7 @@ class Bl {
|
|
|
134
134
|
registryId: e.id,
|
|
135
135
|
id: m,
|
|
136
136
|
latestByChannel: {
|
|
137
|
-
[
|
|
137
|
+
[Ee]: h,
|
|
138
138
|
[ne]: h
|
|
139
139
|
},
|
|
140
140
|
allVersions: c.allVersions.map((f) => ({ version: f, channels: [] }))
|
|
@@ -150,7 +150,7 @@ class Bl {
|
|
|
150
150
|
...c,
|
|
151
151
|
latestByChannel: {
|
|
152
152
|
...c.latestByChannel,
|
|
153
|
-
[ne]: ((a) => a.spec.type === "from-registry-v2" ? { ...a, spec: { ...a.spec, channel: ne } } : a)(c.latestByChannel[
|
|
153
|
+
[ne]: ((a) => a.spec.type === "from-registry-v2" ? { ...a, spec: { ...a.spec, channel: ne } } : a)(c.latestByChannel[Ee])
|
|
154
154
|
},
|
|
155
155
|
registryId: e.id
|
|
156
156
|
}
|
|
@@ -158,11 +158,11 @@ class Bl {
|
|
|
158
158
|
case "local-dev":
|
|
159
159
|
for (const c of await q.promises.readdir(r.path, { withFileTypes: !0 })) {
|
|
160
160
|
if (!c.isDirectory()) continue;
|
|
161
|
-
const a = H.join(r.path, c.name), l = await
|
|
161
|
+
const a = H.join(r.path, c.name), l = await ho(
|
|
162
162
|
H.join(a, ue.PlPackageYamlConfigFile)
|
|
163
163
|
);
|
|
164
164
|
if (l !== void 0) {
|
|
165
|
-
const u = ue.PlPackageConfigData.parse(
|
|
165
|
+
const u = ue.PlPackageConfigData.parse($s.parse(l)), d = await Ur(a), m = {
|
|
166
166
|
organization: u.organization,
|
|
167
167
|
name: u.package,
|
|
168
168
|
version: "DEV"
|
|
@@ -186,21 +186,21 @@ class Bl {
|
|
|
186
186
|
registryId: e.id,
|
|
187
187
|
id: m,
|
|
188
188
|
latestByChannel: {
|
|
189
|
-
[
|
|
189
|
+
[Ee]: h,
|
|
190
190
|
[ne]: h
|
|
191
191
|
},
|
|
192
192
|
allVersions: []
|
|
193
193
|
});
|
|
194
194
|
} else {
|
|
195
|
-
let u = a, d = await
|
|
195
|
+
let u = a, d = await pt(u);
|
|
196
196
|
if (d === void 0) {
|
|
197
197
|
for (const m of ["block", "meta"])
|
|
198
|
-
if (u = H.join(a, m), d = await
|
|
198
|
+
if (u = H.join(a, m), d = await pt(u), d !== void 0) break;
|
|
199
199
|
}
|
|
200
200
|
if (d !== void 0) {
|
|
201
|
-
const m = await
|
|
201
|
+
const m = await Pt(d), h = {
|
|
202
202
|
id: d.id,
|
|
203
|
-
meta: await
|
|
203
|
+
meta: await ks.parseAsync(d.meta),
|
|
204
204
|
spec: {
|
|
205
205
|
type: "dev-v2",
|
|
206
206
|
folder: u,
|
|
@@ -211,7 +211,7 @@ class Bl {
|
|
|
211
211
|
registryId: e.id,
|
|
212
212
|
id: d.id,
|
|
213
213
|
latestByChannel: {
|
|
214
|
-
[
|
|
214
|
+
[Ee]: h,
|
|
215
215
|
[ne]: h
|
|
216
216
|
},
|
|
217
217
|
allVersions: []
|
|
@@ -241,7 +241,7 @@ class Bl {
|
|
|
241
241
|
return await this.v2Provider.getRegistry(o.url).getSpecificOverview(t, r);
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
|
-
class
|
|
244
|
+
class go {
|
|
245
245
|
constructor(e) {
|
|
246
246
|
S(this, "registries", /* @__PURE__ */ new Map());
|
|
247
247
|
this.http = e;
|
|
@@ -249,62 +249,62 @@ class po {
|
|
|
249
249
|
getRegistry(e) {
|
|
250
250
|
const t = this.registries.get(e);
|
|
251
251
|
if (t) return t;
|
|
252
|
-
const r = new
|
|
252
|
+
const r = new Ps(Os(e, this.http));
|
|
253
253
|
return this.registries.set(e, r), r;
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
|
-
const
|
|
256
|
+
const Ul = {
|
|
257
257
|
type: "remote-v2",
|
|
258
258
|
url: "https://blocks.pl-open.science/"
|
|
259
|
-
},
|
|
259
|
+
}, Gl = {
|
|
260
260
|
type: "remote-v1",
|
|
261
261
|
url: "https://block.registry.platforma.bio/releases"
|
|
262
|
-
},
|
|
262
|
+
}, Jl = {
|
|
263
263
|
type: "remote-v1",
|
|
264
264
|
url: "https://block.registry.platforma.bio/dev"
|
|
265
|
-
},
|
|
265
|
+
}, mo = {
|
|
266
266
|
groups: [{ id: "default", label: "Default", blocks: [] }]
|
|
267
|
-
},
|
|
267
|
+
}, vo = {
|
|
268
268
|
stagingRefreshTimestamp: 0,
|
|
269
269
|
blocksInLimbo: []
|
|
270
|
-
},
|
|
270
|
+
}, yo = {
|
|
271
271
|
label: "New Project"
|
|
272
|
-
},
|
|
273
|
-
function
|
|
274
|
-
return `${
|
|
272
|
+
}, wo = { name: "UserProject", version: "2" }, Gr = "SchemaVersion", Jr = "1", Ot = "ProjectCreated", Fe = "ProjectLastModified", Te = "ProjectMeta", de = "ProjectStructure", Ke = "BlockRenderingState", So = "BlockFrontendState/", bo = /^BlockFrontendState\/(?<blockid>.*)$/;
|
|
273
|
+
function gt(s) {
|
|
274
|
+
return `${So}${s}`;
|
|
275
275
|
}
|
|
276
|
-
const
|
|
277
|
-
function
|
|
278
|
-
return `${
|
|
276
|
+
const Ro = "BlockArgsAuthor/";
|
|
277
|
+
function mt(s) {
|
|
278
|
+
return `${Ro}${s}`;
|
|
279
279
|
}
|
|
280
|
-
const
|
|
281
|
-
function
|
|
282
|
-
const e = s.match(
|
|
280
|
+
const vt = "ProjectStructureAuthor";
|
|
281
|
+
function Eo(s) {
|
|
282
|
+
const e = s.match(bo);
|
|
283
283
|
if (e !== null)
|
|
284
284
|
return e.groups.blockid;
|
|
285
285
|
}
|
|
286
|
-
const
|
|
287
|
-
function
|
|
288
|
-
return `${
|
|
286
|
+
const Co = "__serviceTemplate_";
|
|
287
|
+
function yt(s) {
|
|
288
|
+
return `${Co}${s}`;
|
|
289
289
|
}
|
|
290
290
|
function U(s, e) {
|
|
291
291
|
return `${s}-${e}`;
|
|
292
292
|
}
|
|
293
|
-
const
|
|
294
|
-
function
|
|
295
|
-
const e = s.match(
|
|
293
|
+
const ko = /^(?<blockId>.*)-(?<fieldName>blockPack|prodArgs|currentArgs|prodCtx|prodUiCtx|prodOutput|prodCtxPrevious|prodUiCtxPrevious|prodOutputPrevious|stagingCtx|stagingUiCtx|stagingOutput|stagingCtxPrevious|stagingUiCtxPrevious|stagingOutputPrevious)$/;
|
|
294
|
+
function Po(s) {
|
|
295
|
+
const e = s.match(ko);
|
|
296
296
|
if (e === null) return;
|
|
297
297
|
const { blockId: t, fieldName: r } = e.groups;
|
|
298
298
|
return { blockId: t, fieldName: r };
|
|
299
299
|
}
|
|
300
|
-
const
|
|
301
|
-
async function
|
|
302
|
-
const o = await
|
|
300
|
+
const Oo = "projects", Mr = { name: "Projects", version: "1" }, $o = (s) => ae(s.type, Mr) ? s.fields : [];
|
|
301
|
+
async function Io(s, e, t, r) {
|
|
302
|
+
const o = await Br.init(
|
|
303
303
|
s,
|
|
304
304
|
e,
|
|
305
305
|
{
|
|
306
306
|
...r.ops.defaultTreeOptions,
|
|
307
|
-
pruning:
|
|
307
|
+
pruning: $o
|
|
308
308
|
},
|
|
309
309
|
r.logger
|
|
310
310
|
);
|
|
@@ -315,7 +315,7 @@ async function Po(s, e, t, r) {
|
|
|
315
315
|
for (const u of c.listDynamicFields()) {
|
|
316
316
|
const d = c.traverse(u);
|
|
317
317
|
if (d === void 0) continue;
|
|
318
|
-
const m = B(d.getKeyValueAsJson(
|
|
318
|
+
const m = B(d.getKeyValueAsJson(Te)), h = B(d.getKeyValueAsJson(Ot)), f = B(d.getKeyValueAsJson(Fe));
|
|
319
319
|
l.push({
|
|
320
320
|
id: u,
|
|
321
321
|
rid: d.id,
|
|
@@ -328,55 +328,55 @@ async function Po(s, e, t, r) {
|
|
|
328
328
|
return l.sort((u) => -u.lastModified.valueOf()), l;
|
|
329
329
|
}).withStableType(), tree: o };
|
|
330
330
|
}
|
|
331
|
-
const
|
|
331
|
+
const Fo = {
|
|
332
332
|
name: "EphRenderTemplate",
|
|
333
333
|
version: "1"
|
|
334
|
-
},
|
|
334
|
+
}, To = {
|
|
335
335
|
name: "RenderTemplate",
|
|
336
336
|
version: "1"
|
|
337
337
|
};
|
|
338
|
-
function
|
|
338
|
+
function _r(s, e, t, r, o) {
|
|
339
339
|
if (o.length === 0) throw new Error("Zero output names provided");
|
|
340
|
-
const n = t ? s.createEphemeral(
|
|
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
|
-
const
|
|
344
|
-
function
|
|
345
|
-
return
|
|
343
|
+
const Ao = { name: "BContextEnd", version: "1" }, Lo = { name: "BContext", version: "1" }, No = "id", Do = "parent/", Bo = ["context", "result"];
|
|
344
|
+
function Xt(s, e, t) {
|
|
345
|
+
return _r(s, e, !0, t, Bo);
|
|
346
346
|
}
|
|
347
|
-
function
|
|
348
|
-
const e = s.createEphemeral(
|
|
347
|
+
function jo(s) {
|
|
348
|
+
const e = s.createEphemeral(Ao);
|
|
349
349
|
return s.lock(e), e;
|
|
350
350
|
}
|
|
351
|
-
function
|
|
352
|
-
if (e.length === 0) return
|
|
351
|
+
function xo(s, e) {
|
|
352
|
+
if (e.length === 0) return jo(s);
|
|
353
353
|
if (e.length === 1) return e[0];
|
|
354
|
-
const t = s.createEphemeral(
|
|
355
|
-
s.createField(j(t,
|
|
354
|
+
const t = s.createEphemeral(Lo);
|
|
355
|
+
s.createField(j(t, No), "Input", T.createPlString(s, Ie()));
|
|
356
356
|
for (let r = 0; r < e.length; r++)
|
|
357
|
-
s.createField(j(t, `${
|
|
357
|
+
s.createField(j(t, `${Do}${r}`), "Input", e[r]);
|
|
358
358
|
return s.lock(t), t;
|
|
359
359
|
}
|
|
360
|
-
function
|
|
361
|
-
const t =
|
|
360
|
+
function Vo(s, e) {
|
|
361
|
+
const t = _s(e.content), r = t.type;
|
|
362
362
|
switch (r) {
|
|
363
363
|
case "pl.tengo-template.v2":
|
|
364
|
-
return
|
|
364
|
+
return Hr(s, t);
|
|
365
365
|
default:
|
|
366
366
|
G(r);
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
|
-
const
|
|
369
|
+
const Kr = {
|
|
370
370
|
hash(s, e) {
|
|
371
|
-
e.update(
|
|
371
|
+
e.update(De.type.name).update(De.type.version).update(s.name).update(s.version).update(s.src);
|
|
372
372
|
},
|
|
373
373
|
render(s, e, t) {
|
|
374
374
|
return e.createValue(
|
|
375
|
-
|
|
376
|
-
JSON.stringify(
|
|
375
|
+
De.type,
|
|
376
|
+
JSON.stringify(De.fromV2Data(s).data)
|
|
377
377
|
);
|
|
378
378
|
}
|
|
379
|
-
},
|
|
379
|
+
}, He = {
|
|
380
380
|
hash(s, e) {
|
|
381
381
|
e.update(we.type.name).update(we.type.version).update(s.name).update(s.version).update(s.src);
|
|
382
382
|
},
|
|
@@ -384,16 +384,16 @@ const Jr = {
|
|
|
384
384
|
const r = we.fromV2Data(s), o = e.createStruct(we.type, r.data);
|
|
385
385
|
return e.setKValue(o, we.metaNameKey, JSON.stringify(r.name)), e.lock(o), o;
|
|
386
386
|
}
|
|
387
|
-
},
|
|
387
|
+
}, Uo = {
|
|
388
388
|
hash(s, e) {
|
|
389
389
|
e.update(ce.type.name).update(ce.type.version).update(s.hashOverride ?? "").update(s.name).update(s.version).update(s.src);
|
|
390
390
|
const t = (r) => (r.sort((o, n) => o[0] === n[0] ? 0 : o[0] < n[0] ? -1 : 1), r);
|
|
391
391
|
for (const [r, o] of t(Object.entries(s.libs ?? {})))
|
|
392
|
-
e.update("lib:" + r),
|
|
392
|
+
e.update("lib:" + r), Kr.hash(o, e);
|
|
393
393
|
for (const [r, o] of t(Object.entries(s.software ?? {})))
|
|
394
|
-
e.update("soft:" + r),
|
|
394
|
+
e.update("soft:" + r), He.hash(o, e);
|
|
395
395
|
for (const [r, o] of t(Object.entries(s.assets ?? {})))
|
|
396
|
-
e.update("asset:" + r),
|
|
396
|
+
e.update("asset:" + r), He.hash(o, e);
|
|
397
397
|
for (const [r, o] of t(Object.entries(s.templates ?? {})))
|
|
398
398
|
e.update("tpl:" + r), this.hash(o, e);
|
|
399
399
|
},
|
|
@@ -403,21 +403,21 @@ const Jr = {
|
|
|
403
403
|
JSON.stringify(ce.fromV2Data(s).data)
|
|
404
404
|
);
|
|
405
405
|
}
|
|
406
|
-
},
|
|
406
|
+
}, Go = {
|
|
407
407
|
hash(s, e) {
|
|
408
|
-
e.update(
|
|
408
|
+
e.update(Ce.type.name).update(Ce.type.version).update(s.hashOverride ?? "");
|
|
409
409
|
},
|
|
410
410
|
render(s, e, t) {
|
|
411
411
|
return e.createStruct(
|
|
412
|
-
|
|
413
|
-
JSON.stringify(
|
|
412
|
+
Ce.type,
|
|
413
|
+
JSON.stringify(Ce.fromV2Data(s))
|
|
414
414
|
);
|
|
415
415
|
}
|
|
416
416
|
};
|
|
417
|
-
function
|
|
417
|
+
function Hr(s, e, t) {
|
|
418
418
|
t || (t = /* @__PURE__ */ new Map());
|
|
419
419
|
const r = (c, a) => {
|
|
420
|
-
const l =
|
|
420
|
+
const l = Le("sha256");
|
|
421
421
|
a.hash(c, l);
|
|
422
422
|
const u = l.digest("hex");
|
|
423
423
|
if (!t.has(u)) {
|
|
@@ -425,33 +425,33 @@ function Mr(s, e, t) {
|
|
|
425
425
|
t.set(u, d);
|
|
426
426
|
}
|
|
427
427
|
return t.get(u);
|
|
428
|
-
}, o = r(e,
|
|
428
|
+
}, o = r(e, Uo);
|
|
429
429
|
for (const [c, a] of Object.entries(e.libs ?? {})) {
|
|
430
430
|
const l = ce.libField(o, c);
|
|
431
|
-
s.createField(l, "Input"), s.setField(l, r(a,
|
|
431
|
+
s.createField(l, "Input"), s.setField(l, r(a, Kr));
|
|
432
432
|
}
|
|
433
433
|
for (const [c, a] of Object.entries(e.software ?? {})) {
|
|
434
434
|
const l = ce.swField(o, c);
|
|
435
|
-
s.createField(l, "Input"), s.setField(l, r(a,
|
|
435
|
+
s.createField(l, "Input"), s.setField(l, r(a, He));
|
|
436
436
|
}
|
|
437
437
|
for (const [c, a] of Object.entries(e.assets ?? {})) {
|
|
438
438
|
const l = ce.swField(o, c);
|
|
439
|
-
s.createField(l, "Input"), s.setField(l, r(a,
|
|
439
|
+
s.createField(l, "Input"), s.setField(l, r(a, He));
|
|
440
440
|
}
|
|
441
441
|
for (const [c, a] of Object.entries(e.templates ?? {})) {
|
|
442
442
|
const l = ce.tplField(o, c);
|
|
443
|
-
s.createField(l, "Input"), s.setField(l,
|
|
443
|
+
s.createField(l, "Input"), s.setField(l, Hr(s, a, t));
|
|
444
444
|
}
|
|
445
445
|
if (s.lock(o), !e.hashOverride)
|
|
446
446
|
return o;
|
|
447
|
-
const n = r(e,
|
|
447
|
+
const n = r(e, Go), i = Ce.tplField(n);
|
|
448
448
|
return s.createField(i, "Service"), s.setField(i, o), s.lock(o), n;
|
|
449
449
|
}
|
|
450
|
-
const
|
|
450
|
+
const Jo = { name: "TengoTemplateGet", version: "1" }, Mo = "registry", _o = "templateURI", Ko = "template", Ml = { name: "TengoTemplatePack", version: "1" }, _l = {
|
|
451
451
|
name: "TengoTemplatePackConvert",
|
|
452
452
|
version: "1"
|
|
453
|
-
},
|
|
454
|
-
async function
|
|
453
|
+
}, Kl = "templatePack", Hl = "template";
|
|
454
|
+
async function Ho(s) {
|
|
455
455
|
switch (s.type) {
|
|
456
456
|
case "from-file":
|
|
457
457
|
return {
|
|
@@ -465,34 +465,34 @@ async function Mo(s) {
|
|
|
465
465
|
return G(s);
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
|
-
function
|
|
469
|
-
const t = s.createStruct(
|
|
468
|
+
function Wo(s, e) {
|
|
469
|
+
const t = s.createStruct(Jo), r = j(t, Mo), o = j(t, _o), n = j(t, Ko);
|
|
470
470
|
return s.setField(r, s.createValue(T.JsonString, Buffer.from(JSON.stringify(e.registry)))), s.setField(o, s.createValue(T.JsonString, Buffer.from(JSON.stringify(e.path)))), n;
|
|
471
471
|
}
|
|
472
|
-
function
|
|
472
|
+
function $t(s, e) {
|
|
473
473
|
switch (e.type) {
|
|
474
474
|
case "from-registry":
|
|
475
|
-
return
|
|
475
|
+
return Wo(s, e);
|
|
476
476
|
case "explicit":
|
|
477
|
-
return
|
|
477
|
+
return Vo(s, e);
|
|
478
478
|
default:
|
|
479
479
|
return G(e);
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
|
-
const
|
|
482
|
+
const Wr = { name: "Frontend/FromUrl", version: "1" }, zr = {
|
|
483
483
|
name: "Frontend/FromFolder",
|
|
484
484
|
version: "1"
|
|
485
485
|
};
|
|
486
|
-
function
|
|
486
|
+
function zo(s, e) {
|
|
487
487
|
switch (e.type) {
|
|
488
488
|
case "url":
|
|
489
489
|
return s.createValue(
|
|
490
|
-
|
|
490
|
+
Wr,
|
|
491
491
|
JSON.stringify({ url: e.url })
|
|
492
492
|
);
|
|
493
493
|
case "local":
|
|
494
494
|
return s.createValue(
|
|
495
|
-
|
|
495
|
+
zr,
|
|
496
496
|
JSON.stringify({
|
|
497
497
|
path: e.path,
|
|
498
498
|
signature: e.signature
|
|
@@ -502,11 +502,11 @@ function Ko(s, e) {
|
|
|
502
502
|
return G(e);
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
|
-
const
|
|
506
|
-
function
|
|
505
|
+
const Xo = { name: "BlockPackCustom", version: "1" }, Xr = "template", qr = "frontend";
|
|
506
|
+
function qt(s) {
|
|
507
507
|
return s.endsWith("/") ? s : `${s}/`;
|
|
508
508
|
}
|
|
509
|
-
class
|
|
509
|
+
class qo {
|
|
510
510
|
constructor(e, t, r) {
|
|
511
511
|
this.v2RegistryProvider = e, this.signer = t, this.http = r;
|
|
512
512
|
}
|
|
@@ -515,17 +515,17 @@ class Wo {
|
|
|
515
515
|
case "explicit":
|
|
516
516
|
return e.config;
|
|
517
517
|
case "dev-v1": {
|
|
518
|
-
const t = await
|
|
518
|
+
const t = await zt(e.folder), r = await q.promises.readFile(t.config, { encoding: "utf-8" });
|
|
519
519
|
return JSON.parse(r);
|
|
520
520
|
}
|
|
521
521
|
case "dev-v2": {
|
|
522
|
-
const t = await
|
|
522
|
+
const t = await Jt(e.folder), r = await q.promises.readFile(t.components.model.file, {
|
|
523
523
|
encoding: "utf-8"
|
|
524
524
|
});
|
|
525
525
|
return JSON.parse(r);
|
|
526
526
|
}
|
|
527
527
|
case "from-registry-v1": {
|
|
528
|
-
const t = this.http !== void 0 ? { dispatcher: this.http } : {}, r = `${
|
|
528
|
+
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 })}`;
|
|
529
529
|
return await (await ie(`${r}/config.json`, t)).body.json();
|
|
530
530
|
}
|
|
531
531
|
case "from-registry-v2": {
|
|
@@ -541,7 +541,7 @@ class Wo {
|
|
|
541
541
|
case "explicit":
|
|
542
542
|
return e;
|
|
543
543
|
case "dev-v1": {
|
|
544
|
-
const t = await
|
|
544
|
+
const t = await zt(e.folder), r = await q.promises.readFile(t.workflow), o = JSON.parse(
|
|
545
545
|
await q.promises.readFile(t.config, "utf-8")
|
|
546
546
|
), n = t.ui;
|
|
547
547
|
return {
|
|
@@ -560,14 +560,14 @@ class Wo {
|
|
|
560
560
|
};
|
|
561
561
|
}
|
|
562
562
|
case "dev-v2": {
|
|
563
|
-
const t = await
|
|
563
|
+
const t = await Jt(e.folder), r = JSON.parse(
|
|
564
564
|
await q.promises.readFile(t.components.model.file, {
|
|
565
565
|
encoding: "utf-8"
|
|
566
566
|
})
|
|
567
567
|
), o = await q.promises.readFile(
|
|
568
568
|
t.components.workflow.main.file
|
|
569
569
|
), n = t.components.ui.folder, i = { ...e };
|
|
570
|
-
return e.mtime === void 0 && (i.mtime = await
|
|
570
|
+
return e.mtime === void 0 && (i.mtime = await Pt(t)), {
|
|
571
571
|
type: "explicit",
|
|
572
572
|
template: {
|
|
573
573
|
type: "explicit",
|
|
@@ -583,7 +583,7 @@ class Wo {
|
|
|
583
583
|
};
|
|
584
584
|
}
|
|
585
585
|
case "from-registry-v1": {
|
|
586
|
-
const t = this.http !== void 0 ? { dispatcher: this.http } : {}, r = `${
|
|
586
|
+
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 ie(o, t);
|
|
587
587
|
if (n.statusCode !== 200)
|
|
588
588
|
throw new Error(
|
|
589
589
|
`Block not found in registry (url = ${o} ; code = ${n.statusCode}): ` + JSON.stringify(e)
|
|
@@ -624,25 +624,25 @@ class Wo {
|
|
|
624
624
|
}
|
|
625
625
|
}
|
|
626
626
|
}
|
|
627
|
-
function
|
|
628
|
-
const t = { config: e.config, source: e.source }, r = s.createStruct(
|
|
629
|
-
return s.createField(j(r,
|
|
627
|
+
function Yo(s, e) {
|
|
628
|
+
const t = { config: e.config, source: e.source }, r = s.createStruct(Xo, JSON.stringify(t));
|
|
629
|
+
return s.createField(j(r, Xr), "Input", $t(s, e.template)), s.createField(j(r, qr), "Input", zo(s, e.frontend)), s.lock(r), r;
|
|
630
630
|
}
|
|
631
|
-
function
|
|
631
|
+
function Yt(s, e) {
|
|
632
632
|
switch (e.type) {
|
|
633
633
|
case "explicit":
|
|
634
|
-
return
|
|
634
|
+
return Yo(s, e);
|
|
635
635
|
default:
|
|
636
636
|
return G(e.type);
|
|
637
637
|
}
|
|
638
638
|
}
|
|
639
|
-
function
|
|
639
|
+
function Be(s, e) {
|
|
640
640
|
return { __isRef: !0, blockId: s, name: e };
|
|
641
641
|
}
|
|
642
|
-
function
|
|
642
|
+
function Zo(s) {
|
|
643
643
|
return typeof s == "object" && s !== null && s.__isRef === !0 && "blockId" in s && "name" in s;
|
|
644
644
|
}
|
|
645
|
-
function
|
|
645
|
+
function wt(s, e, t) {
|
|
646
646
|
const r = typeof e;
|
|
647
647
|
switch (r) {
|
|
648
648
|
case "function":
|
|
@@ -655,21 +655,21 @@ function mt(s, e, t) {
|
|
|
655
655
|
return;
|
|
656
656
|
case "object":
|
|
657
657
|
if (e === null) return;
|
|
658
|
-
if (
|
|
658
|
+
if (Zo(e))
|
|
659
659
|
t === void 0 || t.has(e.blockId) ? s.upstreams.add(e.blockId) : s.missingReferences = !0;
|
|
660
660
|
else if (Array.isArray(e))
|
|
661
|
-
for (const o of e)
|
|
661
|
+
for (const o of e) wt(s, o, t);
|
|
662
662
|
else
|
|
663
663
|
for (const [, o] of Object.entries(e))
|
|
664
|
-
|
|
664
|
+
wt(s, o, t);
|
|
665
665
|
return;
|
|
666
666
|
default:
|
|
667
667
|
G(r);
|
|
668
668
|
}
|
|
669
669
|
}
|
|
670
|
-
function
|
|
670
|
+
function Qo(s, e) {
|
|
671
671
|
const t = { upstreams: /* @__PURE__ */ new Set(), missingReferences: !1 };
|
|
672
|
-
return
|
|
672
|
+
return wt(t, s, e), t;
|
|
673
673
|
}
|
|
674
674
|
function te(s) {
|
|
675
675
|
return {
|
|
@@ -678,7 +678,7 @@ function te(s) {
|
|
|
678
678
|
}
|
|
679
679
|
};
|
|
680
680
|
}
|
|
681
|
-
class
|
|
681
|
+
class Yr {
|
|
682
682
|
constructor(e) {
|
|
683
683
|
/** Nodes are stored in the map in topological order */
|
|
684
684
|
S(this, "nodes");
|
|
@@ -708,7 +708,7 @@ class zr {
|
|
|
708
708
|
}
|
|
709
709
|
}
|
|
710
710
|
}
|
|
711
|
-
function
|
|
711
|
+
function St(s) {
|
|
712
712
|
const e = /* @__PURE__ */ new Map();
|
|
713
713
|
let t;
|
|
714
714
|
for (const { id: r } of te(s)) {
|
|
@@ -718,14 +718,14 @@ function vt(s) {
|
|
|
718
718
|
};
|
|
719
719
|
e.set(r, o), t === void 0 ? o.upstream = /* @__PURE__ */ new Set() : (o.upstream = /* @__PURE__ */ new Set([t.id]), t.downstream = /* @__PURE__ */ new Set([o.id])), t = o;
|
|
720
720
|
}
|
|
721
|
-
return t !== void 0 && (t.downstream = /* @__PURE__ */ new Set()), new
|
|
721
|
+
return t !== void 0 && (t.downstream = /* @__PURE__ */ new Set()), new Yr(e);
|
|
722
722
|
}
|
|
723
|
-
function
|
|
723
|
+
function Me(s, e) {
|
|
724
724
|
const t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set();
|
|
725
725
|
for (const { id: o } of te(s)) {
|
|
726
726
|
const n = e(o);
|
|
727
727
|
if (n === void 0) continue;
|
|
728
|
-
const i =
|
|
728
|
+
const i = Qo(n, r), c = {
|
|
729
729
|
id: o,
|
|
730
730
|
missingReferences: i.missingReferences,
|
|
731
731
|
upstream: i.upstreams,
|
|
@@ -734,41 +734,41 @@ function Ue(s, e) {
|
|
|
734
734
|
};
|
|
735
735
|
t.set(o, c), i.upstreams.forEach((a) => t.get(a).downstream.add(o)), r.add(o);
|
|
736
736
|
}
|
|
737
|
-
return new
|
|
737
|
+
return new Yr(t);
|
|
738
738
|
}
|
|
739
|
-
function
|
|
739
|
+
function en(s, e) {
|
|
740
740
|
if (s.size !== e.size) return !1;
|
|
741
741
|
for (const t of s) if (!e.has(t)) return !1;
|
|
742
742
|
return !0;
|
|
743
743
|
}
|
|
744
|
-
function
|
|
745
|
-
if (s.size > e.size) return
|
|
744
|
+
function bt(s, e) {
|
|
745
|
+
if (s.size > e.size) return bt(e, s);
|
|
746
746
|
for (const t of s) if (e.has(t)) return !0;
|
|
747
747
|
return !1;
|
|
748
748
|
}
|
|
749
|
-
function
|
|
749
|
+
function Zt(s, e) {
|
|
750
750
|
const t = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
|
|
751
751
|
return s.nodes.forEach((n) => {
|
|
752
752
|
const i = e.nodes.get(n.id);
|
|
753
|
-
i === void 0 ? t.add(n.id) : (!
|
|
753
|
+
i === void 0 ? t.add(n.id) : (!en(n.upstream, i.upstream) || bt(n.upstream, o)) && o.add(n.id);
|
|
754
754
|
}), e.nodes.forEach((n) => {
|
|
755
|
-
s.nodes.has(n.id) ?
|
|
755
|
+
s.nodes.has(n.id) ? bt(n.upstream, o) && o.add(n.id) : r.add(n.id);
|
|
756
756
|
}), { onlyInA: t, onlyInB: r, different: o };
|
|
757
757
|
}
|
|
758
|
-
let
|
|
759
|
-
async function
|
|
760
|
-
if (
|
|
761
|
-
const s = await
|
|
758
|
+
let st;
|
|
759
|
+
async function Zr() {
|
|
760
|
+
if (st === void 0) {
|
|
761
|
+
const s = await Ho(Ks["pframes.export-pframe"]);
|
|
762
762
|
if (s.type !== "explicit") throw new Error("Unexpected prepared template type.");
|
|
763
|
-
const e =
|
|
764
|
-
|
|
763
|
+
const e = Le("sha256").update(s.content).digest("hex");
|
|
764
|
+
st = { spec: s, hash: e };
|
|
765
765
|
}
|
|
766
|
-
return
|
|
766
|
+
return st;
|
|
767
767
|
}
|
|
768
|
-
function
|
|
769
|
-
return
|
|
768
|
+
function tn(s, e, t) {
|
|
769
|
+
return _r(s, e, !0, { pf: t }, ["result"]).result;
|
|
770
770
|
}
|
|
771
|
-
function
|
|
771
|
+
function ot(s, e) {
|
|
772
772
|
let t = !1, r, o;
|
|
773
773
|
return () => {
|
|
774
774
|
if (!t)
|
|
@@ -777,13 +777,13 @@ function tt(s, e) {
|
|
|
777
777
|
return r !== n && (r = n, o = e()), e();
|
|
778
778
|
};
|
|
779
779
|
}
|
|
780
|
-
class
|
|
780
|
+
class Qt {
|
|
781
781
|
constructor(e, t) {
|
|
782
|
-
S(this, "currentInputsC",
|
|
782
|
+
S(this, "currentInputsC", ot(
|
|
783
783
|
() => this.fields.currentArgs.modCount,
|
|
784
784
|
() => JSON.parse(Buffer.from(this.fields.currentArgs.value).toString())
|
|
785
785
|
));
|
|
786
|
-
S(this, "actualProductionInputsC",
|
|
786
|
+
S(this, "actualProductionInputsC", ot(
|
|
787
787
|
() => {
|
|
788
788
|
var e;
|
|
789
789
|
return (e = this.fields.prodArgs) == null ? void 0 : e.modCount;
|
|
@@ -795,7 +795,7 @@ class qt {
|
|
|
795
795
|
return JSON.parse(Buffer.from(e).toString());
|
|
796
796
|
}
|
|
797
797
|
));
|
|
798
|
-
S(this, "productionStaleC",
|
|
798
|
+
S(this, "productionStaleC", ot(
|
|
799
799
|
() => {
|
|
800
800
|
var e;
|
|
801
801
|
return `${this.fields.currentArgs.modCount}_${(e = this.fields.prodArgs) == null ? void 0 : e.modCount}`;
|
|
@@ -837,15 +837,15 @@ class qt {
|
|
|
837
837
|
getTemplate(e) {
|
|
838
838
|
return e.getFutureFieldValue(
|
|
839
839
|
T.unwrapHolder(e, this.fields.blockPack.ref),
|
|
840
|
-
|
|
840
|
+
Xr,
|
|
841
841
|
"Input"
|
|
842
842
|
);
|
|
843
843
|
}
|
|
844
844
|
}
|
|
845
|
-
const
|
|
845
|
+
const rn = (s) => {
|
|
846
846
|
throw new Error(`No new block info for ${s}`);
|
|
847
847
|
};
|
|
848
|
-
class
|
|
848
|
+
class We {
|
|
849
849
|
constructor(e, t, r, o, n, i, c, a, l, u, d, m) {
|
|
850
850
|
S(this, "globalModCount", 0);
|
|
851
851
|
S(this, "fieldsChanged", !1);
|
|
@@ -879,16 +879,16 @@ class _e {
|
|
|
879
879
|
return JSON.parse(JSON.stringify(this.struct));
|
|
880
880
|
}
|
|
881
881
|
getStagingGraph() {
|
|
882
|
-
return this.stagingGraph === void 0 && (this.stagingGraph =
|
|
882
|
+
return this.stagingGraph === void 0 && (this.stagingGraph = St(this.struct)), this.stagingGraph;
|
|
883
883
|
}
|
|
884
884
|
getPendingProductionGraph() {
|
|
885
|
-
return this.pendingProductionGraph === void 0 && (this.pendingProductionGraph =
|
|
885
|
+
return this.pendingProductionGraph === void 0 && (this.pendingProductionGraph = Me(
|
|
886
886
|
this.struct,
|
|
887
887
|
(e) => this.getBlockInfo(e).currentInputs
|
|
888
888
|
)), this.pendingProductionGraph;
|
|
889
889
|
}
|
|
890
890
|
getActualProductionGraph() {
|
|
891
|
-
return this.actualProductionGraph === void 0 && (this.actualProductionGraph =
|
|
891
|
+
return this.actualProductionGraph === void 0 && (this.actualProductionGraph = Me(
|
|
892
892
|
this.struct,
|
|
893
893
|
(e) => this.getBlockInfo(e).actualProductionInputs
|
|
894
894
|
)), this.actualProductionGraph;
|
|
@@ -987,16 +987,16 @@ class _e {
|
|
|
987
987
|
if (n.fields[t] === void 0 || n.fields[t].ref === void 0)
|
|
988
988
|
throw new Error("One of the upstreams staging is not rendered.");
|
|
989
989
|
r.push(T.unwrapHolder(this.tx, n.fields[t].ref));
|
|
990
|
-
}),
|
|
990
|
+
}), xo(this.tx, r);
|
|
991
991
|
}
|
|
992
992
|
exportCtx(e) {
|
|
993
|
-
return
|
|
993
|
+
return tn(this.tx, T.unwrapHolder(this.tx, this.ctxExportTplHolder), e);
|
|
994
994
|
}
|
|
995
995
|
renderStagingFor(e) {
|
|
996
996
|
this.resetStaging(e);
|
|
997
997
|
const t = this.getBlockInfo(e), r = this.createCtx(this.getStagingGraph().nodes.get(e).upstream, "stagingCtx");
|
|
998
998
|
if (this.getBlock(e).renderingMode !== "Heavy") throw new Error("not supported yet");
|
|
999
|
-
const o = t.getTemplate(this.tx), n =
|
|
999
|
+
const o = t.getTemplate(this.tx), n = Xt(this.tx, o, {
|
|
1000
1000
|
args: t.fields.currentArgs.ref,
|
|
1001
1001
|
blockId: this.tx.createValue(T.JsonString, JSON.stringify(e)),
|
|
1002
1002
|
isProduction: this.tx.createValue(T.JsonBool, JSON.stringify(!1)),
|
|
@@ -1017,7 +1017,7 @@ class _e {
|
|
|
1017
1017
|
);
|
|
1018
1018
|
if (this.getBlock(e).renderingMode === "Light")
|
|
1019
1019
|
throw new Error("Can't render production for light block.");
|
|
1020
|
-
const o = t.getTemplate(this.tx), n =
|
|
1020
|
+
const o = t.getTemplate(this.tx), n = Xt(this.tx, o, {
|
|
1021
1021
|
args: t.fields.currentArgs.ref,
|
|
1022
1022
|
blockId: this.tx.createValue(T.JsonString, JSON.stringify(e)),
|
|
1023
1023
|
isProduction: this.tx.createValue(T.JsonBool, JSON.stringify(!0)),
|
|
@@ -1034,22 +1034,22 @@ class _e {
|
|
|
1034
1034
|
// Structure changes
|
|
1035
1035
|
//
|
|
1036
1036
|
/** Very generic method, better check for more specialized case-specific methods first. */
|
|
1037
|
-
updateStructure(e, t =
|
|
1038
|
-
const r = this.getStagingGraph(), o = this.getActualProductionGraph(), n =
|
|
1037
|
+
updateStructure(e, t = rn) {
|
|
1038
|
+
const r = this.getStagingGraph(), o = this.getActualProductionGraph(), n = St(e), i = Me(
|
|
1039
1039
|
e,
|
|
1040
1040
|
(l) => {
|
|
1041
1041
|
var u;
|
|
1042
1042
|
return (u = this.blockInfos.get(l)) == null ? void 0 : u.actualProductionInputs;
|
|
1043
1043
|
}
|
|
1044
|
-
), c =
|
|
1044
|
+
), c = Zt(r, n), a = Zt(o, i);
|
|
1045
1045
|
for (const l of c.onlyInA) {
|
|
1046
1046
|
const { fields: u } = this.getBlockInfo(l);
|
|
1047
1047
|
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);
|
|
1048
1048
|
}
|
|
1049
1049
|
for (const l of c.onlyInB) {
|
|
1050
|
-
const u = new
|
|
1050
|
+
const u = new Qt(l, {});
|
|
1051
1051
|
this.blockInfos.set(l, u);
|
|
1052
|
-
const d = t(l), m =
|
|
1052
|
+
const d = t(l), m = Yt(this.tx, d.blockPack);
|
|
1053
1053
|
this.setBlockField(l, "blockPack", T.wrapInHolder(this.tx, m), "NotReady");
|
|
1054
1054
|
const h = Buffer.from(d.args), f = this.tx.createValue(T.JsonObject, h);
|
|
1055
1055
|
this.setBlockField(l, "currentArgs", f, "Ready", h), d.uiState && (this.blockFrontendStates.set(l, d.uiState), this.changedBlockFrontendStates.add(l)), u.check();
|
|
@@ -1103,7 +1103,7 @@ class _e {
|
|
|
1103
1103
|
this.setBlockField(
|
|
1104
1104
|
e,
|
|
1105
1105
|
"blockPack",
|
|
1106
|
-
T.wrapInHolder(this.tx,
|
|
1106
|
+
T.wrapInHolder(this.tx, Yt(this.tx, t)),
|
|
1107
1107
|
"NotReady"
|
|
1108
1108
|
), 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(
|
|
1109
1109
|
"downstream",
|
|
@@ -1149,7 +1149,7 @@ class _e {
|
|
|
1149
1149
|
* accordingly */
|
|
1150
1150
|
stopProduction(...e) {
|
|
1151
1151
|
var i, c;
|
|
1152
|
-
const t = this.getActualProductionGraph(), r = new
|
|
1152
|
+
const t = this.getActualProductionGraph(), r = new jr(e), o = new Set(e), n = [];
|
|
1153
1153
|
for (; !r.isEmpty(); ) {
|
|
1154
1154
|
const a = r.shift(), l = this.getBlockInfo(a).fields;
|
|
1155
1155
|
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")) {
|
|
@@ -1209,28 +1209,28 @@ class _e {
|
|
|
1209
1209
|
assignAuthorMarkers() {
|
|
1210
1210
|
const e = this.author ? JSON.stringify(this.author) : void 0;
|
|
1211
1211
|
for (const t of this.blocksWithChangedInputs)
|
|
1212
|
-
e === void 0 ? this.tx.deleteKValue(this.rid,
|
|
1213
|
-
(this.metaChanged || this.structureChanged) && (e === void 0 ? this.tx.deleteKValue(this.rid,
|
|
1212
|
+
e === void 0 ? this.tx.deleteKValue(this.rid, mt(t)) : this.tx.setKValue(this.rid, mt(t), e);
|
|
1213
|
+
(this.metaChanged || this.structureChanged) && (e === void 0 ? this.tx.deleteKValue(this.rid, vt) : this.tx.setKValue(this.rid, vt, e));
|
|
1214
1214
|
}
|
|
1215
1215
|
save() {
|
|
1216
1216
|
if (this.wasModified) {
|
|
1217
|
-
this.lastModifiedChanged && this.tx.setKValue(this.rid,
|
|
1217
|
+
this.lastModifiedChanged && this.tx.setKValue(this.rid, Fe, JSON.stringify(this.lastModified)), this.structureChanged && this.tx.setKValue(this.rid, de, JSON.stringify(this.struct)), this.renderingStateChanged && this.tx.setKValue(
|
|
1218
1218
|
this.rid,
|
|
1219
|
-
|
|
1219
|
+
Ke,
|
|
1220
1220
|
JSON.stringify({
|
|
1221
1221
|
...this.renderingState,
|
|
1222
1222
|
blocksInLimbo: [...this.blocksInLimbo]
|
|
1223
1223
|
})
|
|
1224
|
-
), this.metaChanged && this.tx.setKValue(this.rid,
|
|
1224
|
+
), this.metaChanged && this.tx.setKValue(this.rid, Te, JSON.stringify(this.meta));
|
|
1225
1225
|
for (const e of this.changedBlockFrontendStates) {
|
|
1226
1226
|
const t = this.blockFrontendStates.get(e);
|
|
1227
|
-
t === void 0 ? this.tx.deleteKValue(this.rid,
|
|
1227
|
+
t === void 0 ? this.tx.deleteKValue(this.rid, gt(e)) : this.tx.setKValue(this.rid, gt(e), t);
|
|
1228
1228
|
}
|
|
1229
1229
|
this.assignAuthorMarkers();
|
|
1230
1230
|
}
|
|
1231
1231
|
}
|
|
1232
1232
|
static async load(e, t, r) {
|
|
1233
|
-
const o = e.getResourceData(t, !0), n = e.getKValueJson(t,
|
|
1233
|
+
const o = e.getResourceData(t, !0), n = e.getKValueJson(t, Gr), i = e.getKValueJson(t, Fe), c = e.getKValueJson(t, Te), a = e.getKValueJson(t, de), l = e.getKValueJson(t, Ke), u = e.listKeyValuesString(t), [
|
|
1234
1234
|
d,
|
|
1235
1235
|
m,
|
|
1236
1236
|
h,
|
|
@@ -1247,49 +1247,49 @@ class _e {
|
|
|
1247
1247
|
l,
|
|
1248
1248
|
u
|
|
1249
1249
|
]);
|
|
1250
|
-
if (m !==
|
|
1250
|
+
if (m !== Jr)
|
|
1251
1251
|
throw new Error(
|
|
1252
1252
|
`Can't act on this project resource because it has a wrong schema version: ${m}`
|
|
1253
1253
|
);
|
|
1254
1254
|
const k = /* @__PURE__ */ new Map();
|
|
1255
1255
|
for (const p of d.fields) {
|
|
1256
|
-
const y =
|
|
1256
|
+
const y = Po(p.name);
|
|
1257
1257
|
if (y === void 0) continue;
|
|
1258
1258
|
let g = k.get(y.blockId);
|
|
1259
1259
|
g === void 0 && (g = {
|
|
1260
1260
|
id: y.blockId,
|
|
1261
1261
|
fields: {}
|
|
1262
|
-
}, k.set(y.blockId, g)), g.fields[y.fieldName] =
|
|
1262
|
+
}, k.set(y.blockId, g)), g.fields[y.fieldName] = _e(p.value) ? { modCount: 0 } : { modCount: 0, ref: p.value };
|
|
1263
1263
|
}
|
|
1264
|
-
const se = await
|
|
1264
|
+
const se = await Zr(), pe = yt(se.hash), A = d.fields.find(
|
|
1265
1265
|
(p) => p.name === pe
|
|
1266
1266
|
);
|
|
1267
1267
|
let z;
|
|
1268
|
-
A !== void 0 ? z =
|
|
1269
|
-
j(t,
|
|
1268
|
+
A !== void 0 ? z = ht(A.value) : (z = T.wrapInHolder(e, $t(e, se.spec)), e.createField(
|
|
1269
|
+
j(t, yt(se.hash)),
|
|
1270
1270
|
"Dynamic",
|
|
1271
1271
|
z
|
|
1272
1272
|
));
|
|
1273
1273
|
const oe = { stagingRefreshTimestamp: F }, K = new Set(D), J = /* @__PURE__ */ new Map();
|
|
1274
1274
|
for (const p of _) {
|
|
1275
|
-
const y =
|
|
1275
|
+
const y = Eo(p.key);
|
|
1276
1276
|
y !== void 0 && J.set(y, p.value);
|
|
1277
1277
|
}
|
|
1278
1278
|
const x = [];
|
|
1279
1279
|
k.forEach(({ id: p, fields: y }) => {
|
|
1280
1280
|
for (const [, g] of Object.entries(y))
|
|
1281
1281
|
if (g.ref !== void 0) {
|
|
1282
|
-
if (!
|
|
1282
|
+
if (!Ls(g.ref) || Ns(g.ref))
|
|
1283
1283
|
throw new Error("unexpected behaviour");
|
|
1284
1284
|
x.push([g, e.getResourceData(g.ref, !1)]);
|
|
1285
1285
|
}
|
|
1286
1286
|
});
|
|
1287
1287
|
for (const [p, y] of x) {
|
|
1288
1288
|
const g = await y;
|
|
1289
|
-
p.value = g.data,
|
|
1289
|
+
p.value = g.data, Mt(g.error) ? p.status = "Error" : g.resourceReady || Mt(g.originalResourceId) ? p.status = "Ready" : p.status = "NotReady";
|
|
1290
1290
|
}
|
|
1291
1291
|
const X = /* @__PURE__ */ new Map();
|
|
1292
|
-
k.forEach(({ id: p, fields: y }) => X.set(p, new
|
|
1292
|
+
k.forEach(({ id: p, fields: y }) => X.set(p, new Qt(p, y)));
|
|
1293
1293
|
const he = /* @__PURE__ */ new Set();
|
|
1294
1294
|
for (const p of te(I)) {
|
|
1295
1295
|
if (!X.has(p.id))
|
|
@@ -1301,7 +1301,7 @@ class _e {
|
|
|
1301
1301
|
throw new Error(`Inconsistent project structure: no structure entry for ${p.id}`);
|
|
1302
1302
|
p.check();
|
|
1303
1303
|
});
|
|
1304
|
-
const v = new
|
|
1304
|
+
const v = new We(
|
|
1305
1305
|
t,
|
|
1306
1306
|
e,
|
|
1307
1307
|
r,
|
|
@@ -1318,33 +1318,33 @@ class _e {
|
|
|
1318
1318
|
return v.fixProblems(), v;
|
|
1319
1319
|
}
|
|
1320
1320
|
}
|
|
1321
|
-
async function
|
|
1322
|
-
const t = s.createEphemeral(
|
|
1321
|
+
async function sn(s, e = yo) {
|
|
1322
|
+
const t = s.createEphemeral(wo);
|
|
1323
1323
|
s.lock(t);
|
|
1324
1324
|
const r = String(Date.now());
|
|
1325
|
-
s.setKValue(t,
|
|
1326
|
-
const o = await
|
|
1325
|
+
s.setKValue(t, Gr, JSON.stringify(Jr)), s.setKValue(t, Ot, r), s.setKValue(t, Fe, r), s.setKValue(t, Te, JSON.stringify(e)), s.setKValue(t, de, JSON.stringify(mo)), s.setKValue(t, Ke, JSON.stringify(vo));
|
|
1326
|
+
const o = await Zr();
|
|
1327
1327
|
return s.createField(
|
|
1328
|
-
j(t,
|
|
1328
|
+
j(t, yt(o.hash)),
|
|
1329
1329
|
"Dynamic",
|
|
1330
|
-
T.wrapInHolder(s,
|
|
1330
|
+
T.wrapInHolder(s, $t(s, o.spec))
|
|
1331
1331
|
), t;
|
|
1332
1332
|
}
|
|
1333
|
-
async function
|
|
1333
|
+
async function nt(s, e, t) {
|
|
1334
1334
|
return ee(s, e, void 0, t);
|
|
1335
1335
|
}
|
|
1336
1336
|
async function ee(s, e, t, r) {
|
|
1337
|
-
if (s instanceof
|
|
1337
|
+
if (s instanceof As)
|
|
1338
1338
|
return await s.withWriteTx("ProjectAction", async (o) => {
|
|
1339
|
-
const n = await
|
|
1339
|
+
const n = await We.load(o, e, t), i = await r(n);
|
|
1340
1340
|
return n.wasModified && (n.save(), await o.commit()), i;
|
|
1341
1341
|
});
|
|
1342
1342
|
{
|
|
1343
|
-
const o = await
|
|
1343
|
+
const o = await We.load(s, e, t), n = await r(o);
|
|
1344
1344
|
return o.save(), n;
|
|
1345
1345
|
}
|
|
1346
1346
|
}
|
|
1347
|
-
function*
|
|
1347
|
+
function* on(s) {
|
|
1348
1348
|
switch (s.type) {
|
|
1349
1349
|
case "Json":
|
|
1350
1350
|
return;
|
|
@@ -1359,21 +1359,21 @@ function* tn(s) {
|
|
|
1359
1359
|
G(s);
|
|
1360
1360
|
}
|
|
1361
1361
|
}
|
|
1362
|
-
function
|
|
1362
|
+
function er(s, e) {
|
|
1363
1363
|
return Object.fromEntries(
|
|
1364
1364
|
Object.entries(s).map(([t, r]) => [t, e(r, t)])
|
|
1365
1365
|
);
|
|
1366
1366
|
}
|
|
1367
|
-
function
|
|
1367
|
+
function nn(s, e) {
|
|
1368
1368
|
switch (s.type) {
|
|
1369
1369
|
case "Json":
|
|
1370
1370
|
return { ...s };
|
|
1371
1371
|
case "JsonPartitioned":
|
|
1372
|
-
return { ...s, parts:
|
|
1372
|
+
return { ...s, parts: er(s.parts, e) };
|
|
1373
1373
|
case "BinaryPartitioned":
|
|
1374
1374
|
return {
|
|
1375
1375
|
...s,
|
|
1376
|
-
parts:
|
|
1376
|
+
parts: er(s.parts, (t) => ({
|
|
1377
1377
|
index: e(t.index),
|
|
1378
1378
|
values: e(t.values)
|
|
1379
1379
|
}))
|
|
@@ -1382,26 +1382,26 @@ function rn(s, e) {
|
|
|
1382
1382
|
G(s);
|
|
1383
1383
|
}
|
|
1384
1384
|
}
|
|
1385
|
-
const
|
|
1385
|
+
const an = Ae("PColumnData/JsonPartitioned", "1"), cn = Ae(
|
|
1386
1386
|
"PColumnData/Partitioned/JsonPartitioned",
|
|
1387
1387
|
"1"
|
|
1388
|
-
),
|
|
1388
|
+
), ln = Ae("PColumnData/BinaryPartitioned", "1"), un = Ae(
|
|
1389
1389
|
"PColumnData/Partitioned/BinaryPartitioned",
|
|
1390
1390
|
"1"
|
|
1391
|
-
),
|
|
1392
|
-
function
|
|
1391
|
+
), dn = Ae("PColumnData/Json", "1");
|
|
1392
|
+
function pn(s) {
|
|
1393
1393
|
if (!s.getIsReadyOrError()) throw new Error("Data not ready.");
|
|
1394
1394
|
const e = s.getDataAsJson();
|
|
1395
1395
|
if (e === void 0)
|
|
1396
1396
|
throw new Error("unexpected data info structure, no resource data");
|
|
1397
|
-
if (ae(s.resourceType,
|
|
1397
|
+
if (ae(s.resourceType, dn)) {
|
|
1398
1398
|
const t = e;
|
|
1399
1399
|
return {
|
|
1400
1400
|
type: "Json",
|
|
1401
1401
|
keyLength: t.keyLength,
|
|
1402
1402
|
data: t.data
|
|
1403
1403
|
};
|
|
1404
|
-
} else if (ae(s.resourceType,
|
|
1404
|
+
} else if (ae(s.resourceType, an)) {
|
|
1405
1405
|
const t = e, r = Object.fromEntries(
|
|
1406
1406
|
s.listInputFields().map((o) => [o, s.traverse({ field: o, errorIfFieldNotSet: !0 }).resourceInfo])
|
|
1407
1407
|
);
|
|
@@ -1410,7 +1410,7 @@ function ln(s) {
|
|
|
1410
1410
|
partitionKeyLength: t.partitionKeyLength,
|
|
1411
1411
|
parts: r
|
|
1412
1412
|
};
|
|
1413
|
-
} else if (ae(s.resourceType,
|
|
1413
|
+
} else if (ae(s.resourceType, cn)) {
|
|
1414
1414
|
const t = e, r = {};
|
|
1415
1415
|
for (const o of s.listInputFields()) {
|
|
1416
1416
|
const n = s.traverse({ field: o, errorIfFieldNotSet: !0 }), i = n.listInputFields();
|
|
@@ -1425,7 +1425,7 @@ function ln(s) {
|
|
|
1425
1425
|
partitionKeyLength: t.superPartitionKeyLength + t.partitionKeyLength,
|
|
1426
1426
|
parts: r
|
|
1427
1427
|
};
|
|
1428
|
-
} else if (ae(s.resourceType,
|
|
1428
|
+
} else if (ae(s.resourceType, ln)) {
|
|
1429
1429
|
const t = e, r = {};
|
|
1430
1430
|
for (const o of s.listInputFields())
|
|
1431
1431
|
if (o.endsWith(".index")) {
|
|
@@ -1446,7 +1446,7 @@ function ln(s) {
|
|
|
1446
1446
|
partitionKeyLength: t.partitionKeyLength,
|
|
1447
1447
|
parts: r
|
|
1448
1448
|
};
|
|
1449
|
-
} else if (ae(s.resourceType,
|
|
1449
|
+
} else if (ae(s.resourceType, un)) {
|
|
1450
1450
|
const t = e, r = {};
|
|
1451
1451
|
for (const o of s.listInputFields()) {
|
|
1452
1452
|
const n = s.traverse({ field: o, errorIfFieldNotSet: !0 }), i = n.listInputFields();
|
|
@@ -1474,9 +1474,9 @@ function ln(s) {
|
|
|
1474
1474
|
parts: r
|
|
1475
1475
|
};
|
|
1476
1476
|
}
|
|
1477
|
-
throw new Error(`unsupported resource type: ${
|
|
1477
|
+
throw new Error(`unsupported resource type: ${Ds(s.resourceType)}`);
|
|
1478
1478
|
}
|
|
1479
|
-
function
|
|
1479
|
+
function hn(s, e) {
|
|
1480
1480
|
const t = s.axesSpec.length, r = {};
|
|
1481
1481
|
for (const { key: o, val: n } of e) {
|
|
1482
1482
|
if (o.length !== t)
|
|
@@ -1489,17 +1489,17 @@ function un(s, e) {
|
|
|
1489
1489
|
data: r
|
|
1490
1490
|
};
|
|
1491
1491
|
}
|
|
1492
|
-
function
|
|
1493
|
-
const t =
|
|
1494
|
-
return t.update(ve(s)), t.update(String(
|
|
1492
|
+
function fn(s, e) {
|
|
1493
|
+
const t = Le("sha256");
|
|
1494
|
+
return t.update(ve(s)), t.update(String(_e(e.originalId) ? e.id : e.originalId)), t.digest().toString("hex");
|
|
1495
1495
|
}
|
|
1496
|
-
function
|
|
1496
|
+
function tr(s, e) {
|
|
1497
1497
|
return ve({ __isRef: !0, blockId: s, name: e });
|
|
1498
1498
|
}
|
|
1499
|
-
function
|
|
1499
|
+
function gn(s, e) {
|
|
1500
1500
|
return ve({ resolvePath: s, name: e });
|
|
1501
1501
|
}
|
|
1502
|
-
function
|
|
1502
|
+
function Qr(s, e = !0, t = !1, r = "") {
|
|
1503
1503
|
var c, a, l;
|
|
1504
1504
|
const o = /^(?<name>.*)\.(?<type>spec|data)$/, n = /* @__PURE__ */ new Map();
|
|
1505
1505
|
for (const u of s.listInputFields()) {
|
|
@@ -1538,10 +1538,10 @@ function qr(s, e = !0, t = !1, r = "") {
|
|
|
1538
1538
|
for (const [, u] of n) u.data === void 0 && (u.hasData = !1);
|
|
1539
1539
|
return { locked: i, results: n };
|
|
1540
1540
|
}
|
|
1541
|
-
function
|
|
1541
|
+
function mn(s, e = !0, t = "", r) {
|
|
1542
1542
|
if (!s.getIsReadyOrError()) throw new Error("resource is not ready");
|
|
1543
|
-
const o =
|
|
1544
|
-
|
|
1543
|
+
const o = Qr(s, e, !1, t);
|
|
1544
|
+
Hs(o.locked);
|
|
1545
1545
|
const n = {};
|
|
1546
1546
|
for (const [i, c] of o.results) {
|
|
1547
1547
|
if (c.spec === void 0) throw new Error(`no spec for key ${i}`);
|
|
@@ -1549,16 +1549,16 @@ function hn(s, e = !0, t = "", r) {
|
|
|
1549
1549
|
throw new Error(`no data for key ${i}`);
|
|
1550
1550
|
const a = c.data();
|
|
1551
1551
|
if (a === void 0) throw new Error(`no data for key ${i}`);
|
|
1552
|
-
if (!a.ok) throw new
|
|
1552
|
+
if (!a.ok) throw new Us(a.error);
|
|
1553
1553
|
n[i] = {
|
|
1554
|
-
id: r.length === 0 ?
|
|
1554
|
+
id: r.length === 0 ? fn(c.spec, a.value) : gn(r, i),
|
|
1555
1555
|
spec: c.spec,
|
|
1556
1556
|
data: a.value
|
|
1557
1557
|
};
|
|
1558
1558
|
}
|
|
1559
1559
|
return n;
|
|
1560
1560
|
}
|
|
1561
|
-
class
|
|
1561
|
+
class It {
|
|
1562
1562
|
constructor(e, t) {
|
|
1563
1563
|
S(this, "allSpecsAvailable");
|
|
1564
1564
|
this.ctx = e, this.blocks = t;
|
|
@@ -1592,8 +1592,8 @@ class Pt {
|
|
|
1592
1592
|
if (r === void 0) return;
|
|
1593
1593
|
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);
|
|
1594
1594
|
if (o !== void 0 && o.spec !== void 0 && n !== void 0)
|
|
1595
|
-
return
|
|
1596
|
-
id:
|
|
1595
|
+
return Ir(n, (l) => ({
|
|
1596
|
+
id: tr(e, t),
|
|
1597
1597
|
spec: o.spec,
|
|
1598
1598
|
data: l
|
|
1599
1599
|
}));
|
|
@@ -1630,9 +1630,9 @@ class Pt {
|
|
|
1630
1630
|
if (a.spec !== void 0 && a.hasData === !0 && a.data !== void 0) {
|
|
1631
1631
|
const l = a.data();
|
|
1632
1632
|
l !== void 0 ? e.push({
|
|
1633
|
-
ref:
|
|
1633
|
+
ref: Be(i, c),
|
|
1634
1634
|
obj: {
|
|
1635
|
-
id: l.ok ?
|
|
1635
|
+
id: l.ok ? tr(i, c) : void 0,
|
|
1636
1636
|
spec: a.spec,
|
|
1637
1637
|
data: l
|
|
1638
1638
|
}
|
|
@@ -1666,7 +1666,7 @@ class Pt {
|
|
|
1666
1666
|
i.staging.locked || o(`staging_not_locked:${n}`);
|
|
1667
1667
|
for (const [a, l] of i.staging.results)
|
|
1668
1668
|
l.spec !== void 0 && (e.push({
|
|
1669
|
-
ref:
|
|
1669
|
+
ref: Be(n, a),
|
|
1670
1670
|
obj: l.spec
|
|
1671
1671
|
}), c.add(a));
|
|
1672
1672
|
} else o(`staging_not_rendered:${n}`);
|
|
@@ -1674,7 +1674,7 @@ class Pt {
|
|
|
1674
1674
|
i.prod.locked || o(`prod_not_locked:${n}`);
|
|
1675
1675
|
for (const [a, l] of i.prod.results)
|
|
1676
1676
|
c.has(a) || l.spec !== void 0 && e.push({
|
|
1677
|
-
ref:
|
|
1677
|
+
ref: Be(n, a),
|
|
1678
1678
|
obj: l.spec
|
|
1679
1679
|
});
|
|
1680
1680
|
}
|
|
@@ -1686,9 +1686,9 @@ class Pt {
|
|
|
1686
1686
|
for (const r of this.blocks.values()) {
|
|
1687
1687
|
const o = /* @__PURE__ */ new Set(), n = (i) => {
|
|
1688
1688
|
for (const [c, a] of i.results)
|
|
1689
|
-
o.has(c) || a.spec === void 0 || (o.add(c),
|
|
1689
|
+
o.has(c) || a.spec === void 0 || (o.add(c), Ss(e, a.spec) && t.push({
|
|
1690
1690
|
label: r.info.label + " / " + c,
|
|
1691
|
-
ref:
|
|
1691
|
+
ref: Be(r.info.id, c),
|
|
1692
1692
|
spec: a.spec
|
|
1693
1693
|
}));
|
|
1694
1694
|
};
|
|
@@ -1697,10 +1697,10 @@ class Pt {
|
|
|
1697
1697
|
return t;
|
|
1698
1698
|
}
|
|
1699
1699
|
static create(e, t, r) {
|
|
1700
|
-
const o = e.accessor(t).node(), n = B(o.getKeyValueAsJson(de)), c =
|
|
1700
|
+
const o = e.accessor(t).node(), n = B(o.getKeyValueAsJson(de)), c = St(n).traverseIds("upstream", r), a = /* @__PURE__ */ new Map();
|
|
1701
1701
|
for (const l of te(n)) {
|
|
1702
1702
|
if (!c.has(l.id)) continue;
|
|
1703
|
-
const u =
|
|
1703
|
+
const u = rr(
|
|
1704
1704
|
o.traverse({
|
|
1705
1705
|
field: U(l.id, "prodCtx"),
|
|
1706
1706
|
ignoreError: !0,
|
|
@@ -1711,7 +1711,7 @@ class Pt {
|
|
|
1711
1711
|
field: U(l.id, "prodUiCtx"),
|
|
1712
1712
|
stableIfNotFound: !0
|
|
1713
1713
|
})
|
|
1714
|
-
), d =
|
|
1714
|
+
), d = rr(
|
|
1715
1715
|
o.traverse({
|
|
1716
1716
|
field: U(l.id, "stagingCtx"),
|
|
1717
1717
|
ignoreError: !0,
|
|
@@ -1723,15 +1723,15 @@ class Pt {
|
|
|
1723
1723
|
);
|
|
1724
1724
|
a.set(l.id, { info: l, prod: u, staging: d });
|
|
1725
1725
|
}
|
|
1726
|
-
return new
|
|
1726
|
+
return new It(e, a);
|
|
1727
1727
|
}
|
|
1728
1728
|
}
|
|
1729
|
-
function
|
|
1729
|
+
function rr(s, e) {
|
|
1730
1730
|
if (e === void 0)
|
|
1731
1731
|
return s ? { locked: !1, results: /* @__PURE__ */ new Map() } : void 0;
|
|
1732
|
-
if (e.ok) return
|
|
1732
|
+
if (e.ok) return Qr(e.value, !1, !0);
|
|
1733
1733
|
}
|
|
1734
|
-
function
|
|
1734
|
+
function Ft(s, e) {
|
|
1735
1735
|
return {
|
|
1736
1736
|
blockId: e,
|
|
1737
1737
|
args: (o) => B(
|
|
@@ -1740,7 +1740,7 @@ function Ot(s, e) {
|
|
|
1740
1740
|
errorIfFieldNotSet: !0
|
|
1741
1741
|
}).getDataAsString()
|
|
1742
1742
|
),
|
|
1743
|
-
uiState: (o) => o.accessor(s).node().getKeyValueAsString(
|
|
1743
|
+
uiState: (o) => o.accessor(s).node().getKeyValueAsString(gt(e)),
|
|
1744
1744
|
blockMeta: (o) => {
|
|
1745
1745
|
const n = o.accessor(s).node(), i = B(n.getKeyValueAsJson(de)), c = /* @__PURE__ */ new Map();
|
|
1746
1746
|
for (const a of te(i)) c.set(a.id, a);
|
|
@@ -1748,9 +1748,9 @@ function Ot(s, e) {
|
|
|
1748
1748
|
}
|
|
1749
1749
|
};
|
|
1750
1750
|
}
|
|
1751
|
-
function
|
|
1751
|
+
function es(s, e) {
|
|
1752
1752
|
return {
|
|
1753
|
-
...
|
|
1753
|
+
...Ft(s, e),
|
|
1754
1754
|
prod: (t) => {
|
|
1755
1755
|
var r;
|
|
1756
1756
|
return (r = t.accessor(s).node({ ignoreError: !0 }).traverse({
|
|
@@ -1767,7 +1767,7 @@ function Yr(s, e) {
|
|
|
1767
1767
|
})) == null ? void 0 : o.persist();
|
|
1768
1768
|
return r === void 0 && t.markUnstable("staging_not_rendered"), r;
|
|
1769
1769
|
},
|
|
1770
|
-
getResultsPool: (t) =>
|
|
1770
|
+
getResultsPool: (t) => It.create(t, s, e)
|
|
1771
1771
|
};
|
|
1772
1772
|
}
|
|
1773
1773
|
function* W(s, e) {
|
|
@@ -1820,15 +1820,15 @@ function* W(s, e) {
|
|
|
1820
1820
|
G(s);
|
|
1821
1821
|
}
|
|
1822
1822
|
}
|
|
1823
|
-
function
|
|
1823
|
+
function vn(s, e) {
|
|
1824
1824
|
const t = {};
|
|
1825
1825
|
for (const [r, o] of Object.entries(s)) t[r] = e(o);
|
|
1826
1826
|
return t;
|
|
1827
1827
|
}
|
|
1828
|
-
function
|
|
1828
|
+
function Pe(s, e) {
|
|
1829
1829
|
return s === void 0 ? void 0 : e(s);
|
|
1830
1830
|
}
|
|
1831
|
-
function
|
|
1831
|
+
function yn(s) {
|
|
1832
1832
|
switch (s.type) {
|
|
1833
1833
|
case "GetImportProgress":
|
|
1834
1834
|
return !0;
|
|
@@ -1836,60 +1836,60 @@ function gn(s) {
|
|
|
1836
1836
|
return !1;
|
|
1837
1837
|
}
|
|
1838
1838
|
}
|
|
1839
|
-
function
|
|
1840
|
-
for (const e of W(s)) if (
|
|
1839
|
+
function wn(s) {
|
|
1840
|
+
for (const e of W(s)) if (yn(e)) return !0;
|
|
1841
1841
|
return !1;
|
|
1842
1842
|
}
|
|
1843
|
-
function
|
|
1843
|
+
function Xe(s) {
|
|
1844
1844
|
return {
|
|
1845
1845
|
type: "ReturnResult",
|
|
1846
1846
|
result: s
|
|
1847
1847
|
};
|
|
1848
1848
|
}
|
|
1849
1849
|
function C(s) {
|
|
1850
|
-
return () =>
|
|
1850
|
+
return () => Xe(s);
|
|
1851
1851
|
}
|
|
1852
|
-
const
|
|
1852
|
+
const Sn = (s) => {
|
|
1853
1853
|
const e = {};
|
|
1854
1854
|
for (const [t, r] of Object.entries(s)) e[t] = r;
|
|
1855
1855
|
return C(e);
|
|
1856
|
-
},
|
|
1856
|
+
}, bn = (s) => {
|
|
1857
1857
|
const e = s.source;
|
|
1858
1858
|
if (e === void 0) return C(void 0);
|
|
1859
1859
|
const t = [];
|
|
1860
1860
|
for (const r of e)
|
|
1861
1861
|
r instanceof Array ? t.push(...r) : t.push(r);
|
|
1862
1862
|
return C(t);
|
|
1863
|
-
},
|
|
1863
|
+
}, Rn = (s) => {
|
|
1864
1864
|
const e = s.source, t = s.field;
|
|
1865
1865
|
return e === void 0 || t === void 0 ? C(void 0) : ({ cCtx: r }) => {
|
|
1866
1866
|
var o;
|
|
1867
|
-
return
|
|
1867
|
+
return Xe((o = r.accessor(e).node().traverse(t)) == null ? void 0 : o.persist());
|
|
1868
1868
|
};
|
|
1869
1869
|
};
|
|
1870
|
-
function
|
|
1870
|
+
function ts(s, e) {
|
|
1871
1871
|
const t = {}, r = s.length;
|
|
1872
1872
|
for (let o = 0; o < r; o++) t[String(o)] = e(s[o]);
|
|
1873
1873
|
return t;
|
|
1874
1874
|
}
|
|
1875
|
-
function
|
|
1875
|
+
function En(s, e) {
|
|
1876
1876
|
return (t) => {
|
|
1877
1877
|
const r = t.source;
|
|
1878
1878
|
return r === void 0 ? C(void 0) : () => ({
|
|
1879
1879
|
type: "ScheduleSubroutine",
|
|
1880
|
-
subroutine:
|
|
1881
|
-
args:
|
|
1880
|
+
subroutine: rs(r.length),
|
|
1881
|
+
args: ts(r, (o) => O({ ...s, [e.itVar]: o }, e.mapping))
|
|
1882
1882
|
});
|
|
1883
1883
|
};
|
|
1884
1884
|
}
|
|
1885
|
-
function
|
|
1885
|
+
function rs(s) {
|
|
1886
1886
|
return (e) => {
|
|
1887
1887
|
const t = [];
|
|
1888
1888
|
for (let r = 0; r < s; r++) t.push(e[String(r)]);
|
|
1889
1889
|
return C(t);
|
|
1890
1890
|
};
|
|
1891
1891
|
}
|
|
1892
|
-
function
|
|
1892
|
+
function Cn(s, e) {
|
|
1893
1893
|
return (t) => {
|
|
1894
1894
|
const r = t.source;
|
|
1895
1895
|
if (r === void 0) return C(void 0);
|
|
@@ -1900,34 +1900,34 @@ function bn(s, e) {
|
|
|
1900
1900
|
}
|
|
1901
1901
|
return () => ({
|
|
1902
1902
|
type: "ScheduleSubroutine",
|
|
1903
|
-
subroutine:
|
|
1903
|
+
subroutine: kn,
|
|
1904
1904
|
args: o
|
|
1905
1905
|
});
|
|
1906
1906
|
};
|
|
1907
1907
|
}
|
|
1908
|
-
const
|
|
1908
|
+
const kn = (s) => C(s), Pn = (s) => {
|
|
1909
1909
|
const e = s.arg;
|
|
1910
1910
|
return C(e === void 0 ? void 0 : e.length === 0);
|
|
1911
|
-
},
|
|
1911
|
+
}, On = (s) => {
|
|
1912
1912
|
const e = s.operand;
|
|
1913
1913
|
return C(e === void 0 ? void 0 : !e);
|
|
1914
|
-
},
|
|
1914
|
+
}, $n = (s) => {
|
|
1915
1915
|
const e = s.operand1, t = s.operand2;
|
|
1916
1916
|
return C(e === void 0 || t === void 0 ? void 0 : e && t);
|
|
1917
|
-
},
|
|
1917
|
+
}, In = (s) => {
|
|
1918
1918
|
const e = s.operand1, t = s.operand2;
|
|
1919
1919
|
return C(e === void 0 || t === void 0 ? void 0 : e || t);
|
|
1920
|
-
},
|
|
1920
|
+
}, Fn = (s) => {
|
|
1921
1921
|
const e = s.source;
|
|
1922
1922
|
return e === void 0 ? C(void 0) : ({ cCtx: t }) => {
|
|
1923
1923
|
var r;
|
|
1924
|
-
return
|
|
1924
|
+
return Xe((r = t.accessor(e).node()) == null ? void 0 : r.getDataAsJson());
|
|
1925
1925
|
};
|
|
1926
|
-
},
|
|
1926
|
+
}, Tn = (s) => {
|
|
1927
1927
|
const e = s.source, t = s.field;
|
|
1928
1928
|
return C(e === void 0 || t === void 0 ? void 0 : e[t]);
|
|
1929
1929
|
};
|
|
1930
|
-
function
|
|
1930
|
+
function An(s, e) {
|
|
1931
1931
|
return (t) => {
|
|
1932
1932
|
const r = t.source;
|
|
1933
1933
|
return r === void 0 ? C(void 0) : ({ cCtx: o }) => {
|
|
@@ -1942,13 +1942,13 @@ function In(s, e) {
|
|
|
1942
1942
|
}
|
|
1943
1943
|
return {
|
|
1944
1944
|
type: "ScheduleSubroutine",
|
|
1945
|
-
subroutine:
|
|
1945
|
+
subroutine: Ln,
|
|
1946
1946
|
args: i
|
|
1947
1947
|
};
|
|
1948
1948
|
};
|
|
1949
1949
|
};
|
|
1950
1950
|
}
|
|
1951
|
-
const
|
|
1951
|
+
const Ln = (s) => C(s), Nn = (s) => {
|
|
1952
1952
|
const e = s.source;
|
|
1953
1953
|
return e === void 0 ? C(void 0) : ({ drivers: t }) => ({
|
|
1954
1954
|
type: "ScheduleComputable",
|
|
@@ -1962,7 +1962,7 @@ const Fn = (s) => C(s), Tn = (s) => {
|
|
|
1962
1962
|
}
|
|
1963
1963
|
)
|
|
1964
1964
|
});
|
|
1965
|
-
},
|
|
1965
|
+
}, Dn = (s) => {
|
|
1966
1966
|
const e = s.source;
|
|
1967
1967
|
return e === void 0 ? C(void 0) : ({ cCtx: t, drivers: r }) => {
|
|
1968
1968
|
const o = t.accessor(e).node().resourceInfo;
|
|
@@ -1973,7 +1973,7 @@ const Fn = (s) => C(s), Tn = (s) => {
|
|
|
1973
1973
|
})
|
|
1974
1974
|
};
|
|
1975
1975
|
};
|
|
1976
|
-
},
|
|
1976
|
+
}, Bn = (s) => {
|
|
1977
1977
|
const e = s.source;
|
|
1978
1978
|
return e === void 0 ? C(void 0) : ({ drivers: t }) => ({
|
|
1979
1979
|
type: "ScheduleComputable",
|
|
@@ -1989,37 +1989,37 @@ const Fn = (s) => C(s), Tn = (s) => {
|
|
|
1989
1989
|
}
|
|
1990
1990
|
)
|
|
1991
1991
|
});
|
|
1992
|
-
},
|
|
1992
|
+
}, jn = (s) => {
|
|
1993
1993
|
const e = s.source;
|
|
1994
1994
|
return e === void 0 ? C(void 0) : ({ drivers: t }) => ({
|
|
1995
1995
|
type: "ScheduleComputable",
|
|
1996
1996
|
computable: t.blobDriver.getDownloadedBlob(e)
|
|
1997
1997
|
});
|
|
1998
|
-
},
|
|
1998
|
+
}, xn = (s) => {
|
|
1999
1999
|
const e = s.source;
|
|
2000
2000
|
return e === void 0 ? C(void 0) : ({ drivers: t }) => ({
|
|
2001
2001
|
type: "ScheduleComputable",
|
|
2002
2002
|
computable: t.blobDriver.getOnDemandBlob(e)
|
|
2003
2003
|
});
|
|
2004
|
-
},
|
|
2004
|
+
}, Vn = (s) => {
|
|
2005
2005
|
const e = s.source;
|
|
2006
2006
|
return e === void 0 ? C(void 0) : ({ drivers: t }) => ({
|
|
2007
2007
|
type: "ScheduleComputable",
|
|
2008
2008
|
computable: t.uploadDriver.getProgressId(e)
|
|
2009
2009
|
});
|
|
2010
|
-
},
|
|
2010
|
+
}, Un = (s) => (e) => {
|
|
2011
2011
|
const t = e.source;
|
|
2012
2012
|
return t === void 0 ? C(void 0) : ({ drivers: r }) => ({
|
|
2013
2013
|
type: "ScheduleComputable",
|
|
2014
2014
|
computable: r.logDriver.getLastLogs(t, s)
|
|
2015
2015
|
});
|
|
2016
|
-
},
|
|
2016
|
+
}, Gn = (s) => (e) => {
|
|
2017
2017
|
const t = e.source;
|
|
2018
2018
|
return t === void 0 ? C(void 0) : ({ drivers: r }) => ({
|
|
2019
2019
|
type: "ScheduleComputable",
|
|
2020
2020
|
computable: r.logDriver.getProgressLog(t, s)
|
|
2021
2021
|
});
|
|
2022
|
-
},
|
|
2022
|
+
}, Jn = (s) => {
|
|
2023
2023
|
const e = s.source;
|
|
2024
2024
|
return e === void 0 ? C(void 0) : ({ drivers: t }) => ({
|
|
2025
2025
|
type: "ScheduleComputable",
|
|
@@ -2030,18 +2030,18 @@ function O(s, e) {
|
|
|
2030
2030
|
switch (e.type) {
|
|
2031
2031
|
case "GetFromCtx":
|
|
2032
2032
|
const t = s[e.variable];
|
|
2033
|
-
return typeof t == "function" ? (r) =>
|
|
2033
|
+
return typeof t == "function" ? (r) => Xe(t(r.cCtx)) : C(t);
|
|
2034
2034
|
case "Isolate":
|
|
2035
2035
|
return ({ drivers: r }) => ({
|
|
2036
2036
|
type: "ScheduleComputable",
|
|
2037
|
-
computable:
|
|
2037
|
+
computable: ns(r, s, e.cfg)
|
|
2038
2038
|
});
|
|
2039
2039
|
case "Immediate":
|
|
2040
2040
|
return C(e.value);
|
|
2041
2041
|
case "GetJsonField":
|
|
2042
2042
|
return () => ({
|
|
2043
2043
|
type: "ScheduleSubroutine",
|
|
2044
|
-
subroutine:
|
|
2044
|
+
subroutine: Tn,
|
|
2045
2045
|
args: {
|
|
2046
2046
|
source: O(s, e.source),
|
|
2047
2047
|
field: O(s, e.field)
|
|
@@ -2050,7 +2050,7 @@ function O(s, e) {
|
|
|
2050
2050
|
case "MapArrayValues":
|
|
2051
2051
|
return () => ({
|
|
2052
2052
|
type: "ScheduleSubroutine",
|
|
2053
|
-
subroutine:
|
|
2053
|
+
subroutine: En(s, e),
|
|
2054
2054
|
args: {
|
|
2055
2055
|
source: O(s, e.source)
|
|
2056
2056
|
}
|
|
@@ -2058,7 +2058,7 @@ function O(s, e) {
|
|
|
2058
2058
|
case "MapRecordValues":
|
|
2059
2059
|
return () => ({
|
|
2060
2060
|
type: "ScheduleSubroutine",
|
|
2061
|
-
subroutine:
|
|
2061
|
+
subroutine: Cn(s, e),
|
|
2062
2062
|
args: {
|
|
2063
2063
|
source: O(s, e.source)
|
|
2064
2064
|
}
|
|
@@ -2066,19 +2066,19 @@ function O(s, e) {
|
|
|
2066
2066
|
case "MakeObject":
|
|
2067
2067
|
return () => ({
|
|
2068
2068
|
type: "ScheduleSubroutine",
|
|
2069
|
-
subroutine:
|
|
2070
|
-
args:
|
|
2069
|
+
subroutine: Sn,
|
|
2070
|
+
args: vn(e.template, (r) => O(s, r))
|
|
2071
2071
|
});
|
|
2072
2072
|
case "MakeArray":
|
|
2073
2073
|
return () => ({
|
|
2074
2074
|
type: "ScheduleSubroutine",
|
|
2075
|
-
subroutine:
|
|
2076
|
-
args:
|
|
2075
|
+
subroutine: rs(e.template.length),
|
|
2076
|
+
args: ts(e.template, (r) => O(s, r))
|
|
2077
2077
|
});
|
|
2078
2078
|
case "Flatten":
|
|
2079
2079
|
return () => ({
|
|
2080
2080
|
type: "ScheduleSubroutine",
|
|
2081
|
-
subroutine:
|
|
2081
|
+
subroutine: bn,
|
|
2082
2082
|
args: {
|
|
2083
2083
|
source: O(s, e.source)
|
|
2084
2084
|
}
|
|
@@ -2086,7 +2086,7 @@ function O(s, e) {
|
|
|
2086
2086
|
case "IsEmpty":
|
|
2087
2087
|
return () => ({
|
|
2088
2088
|
type: "ScheduleSubroutine",
|
|
2089
|
-
subroutine:
|
|
2089
|
+
subroutine: Pn,
|
|
2090
2090
|
args: {
|
|
2091
2091
|
arg: O(s, e.arg)
|
|
2092
2092
|
}
|
|
@@ -2094,7 +2094,7 @@ function O(s, e) {
|
|
|
2094
2094
|
case "Not":
|
|
2095
2095
|
return () => ({
|
|
2096
2096
|
type: "ScheduleSubroutine",
|
|
2097
|
-
subroutine:
|
|
2097
|
+
subroutine: On,
|
|
2098
2098
|
args: {
|
|
2099
2099
|
operand: O(s, e.operand)
|
|
2100
2100
|
}
|
|
@@ -2102,7 +2102,7 @@ function O(s, e) {
|
|
|
2102
2102
|
case "And":
|
|
2103
2103
|
return () => ({
|
|
2104
2104
|
type: "ScheduleSubroutine",
|
|
2105
|
-
subroutine:
|
|
2105
|
+
subroutine: $n,
|
|
2106
2106
|
args: {
|
|
2107
2107
|
operand1: O(s, e.operand1),
|
|
2108
2108
|
operand2: O(s, e.operand2)
|
|
@@ -2111,7 +2111,7 @@ function O(s, e) {
|
|
|
2111
2111
|
case "Or":
|
|
2112
2112
|
return () => ({
|
|
2113
2113
|
type: "ScheduleSubroutine",
|
|
2114
|
-
subroutine:
|
|
2114
|
+
subroutine: In,
|
|
2115
2115
|
args: {
|
|
2116
2116
|
operand1: O(s, e.operand1),
|
|
2117
2117
|
operand2: O(s, e.operand2)
|
|
@@ -2120,7 +2120,7 @@ function O(s, e) {
|
|
|
2120
2120
|
case "MapResourceFields":
|
|
2121
2121
|
return () => ({
|
|
2122
2122
|
type: "ScheduleSubroutine",
|
|
2123
|
-
subroutine:
|
|
2123
|
+
subroutine: An(s, e),
|
|
2124
2124
|
args: {
|
|
2125
2125
|
source: O(s, e.source)
|
|
2126
2126
|
}
|
|
@@ -2128,7 +2128,7 @@ function O(s, e) {
|
|
|
2128
2128
|
case "GetResourceField":
|
|
2129
2129
|
return () => ({
|
|
2130
2130
|
type: "ScheduleSubroutine",
|
|
2131
|
-
subroutine:
|
|
2131
|
+
subroutine: Rn,
|
|
2132
2132
|
args: {
|
|
2133
2133
|
source: O(s, e.source),
|
|
2134
2134
|
field: O(s, e.field)
|
|
@@ -2137,7 +2137,7 @@ function O(s, e) {
|
|
|
2137
2137
|
case "GetResourceValueAsJson":
|
|
2138
2138
|
return () => ({
|
|
2139
2139
|
type: "ScheduleSubroutine",
|
|
2140
|
-
subroutine:
|
|
2140
|
+
subroutine: Fn,
|
|
2141
2141
|
args: {
|
|
2142
2142
|
source: O(s, e.source)
|
|
2143
2143
|
}
|
|
@@ -2145,7 +2145,7 @@ function O(s, e) {
|
|
|
2145
2145
|
case "GetBlobContent":
|
|
2146
2146
|
return () => ({
|
|
2147
2147
|
type: "ScheduleSubroutine",
|
|
2148
|
-
subroutine:
|
|
2148
|
+
subroutine: Nn,
|
|
2149
2149
|
args: {
|
|
2150
2150
|
source: O(s, e.source)
|
|
2151
2151
|
}
|
|
@@ -2153,7 +2153,7 @@ function O(s, e) {
|
|
|
2153
2153
|
case "GetBlobContentAsString":
|
|
2154
2154
|
return () => ({
|
|
2155
2155
|
type: "ScheduleSubroutine",
|
|
2156
|
-
subroutine:
|
|
2156
|
+
subroutine: Dn,
|
|
2157
2157
|
args: {
|
|
2158
2158
|
source: O(s, e.source)
|
|
2159
2159
|
}
|
|
@@ -2161,7 +2161,7 @@ function O(s, e) {
|
|
|
2161
2161
|
case "GetBlobContentAsJson":
|
|
2162
2162
|
return () => ({
|
|
2163
2163
|
type: "ScheduleSubroutine",
|
|
2164
|
-
subroutine:
|
|
2164
|
+
subroutine: Bn,
|
|
2165
2165
|
args: {
|
|
2166
2166
|
source: O(s, e.source)
|
|
2167
2167
|
}
|
|
@@ -2169,7 +2169,7 @@ function O(s, e) {
|
|
|
2169
2169
|
case "GetDownloadedBlobContent":
|
|
2170
2170
|
return () => ({
|
|
2171
2171
|
type: "ScheduleSubroutine",
|
|
2172
|
-
subroutine:
|
|
2172
|
+
subroutine: jn,
|
|
2173
2173
|
args: {
|
|
2174
2174
|
source: O(s, e.source)
|
|
2175
2175
|
}
|
|
@@ -2177,7 +2177,7 @@ function O(s, e) {
|
|
|
2177
2177
|
case "GetOnDemandBlobContent":
|
|
2178
2178
|
return () => ({
|
|
2179
2179
|
type: "ScheduleSubroutine",
|
|
2180
|
-
subroutine:
|
|
2180
|
+
subroutine: xn,
|
|
2181
2181
|
args: {
|
|
2182
2182
|
source: O(s, e.source)
|
|
2183
2183
|
}
|
|
@@ -2185,7 +2185,7 @@ function O(s, e) {
|
|
|
2185
2185
|
case "GetImportProgress":
|
|
2186
2186
|
return () => ({
|
|
2187
2187
|
type: "ScheduleSubroutine",
|
|
2188
|
-
subroutine:
|
|
2188
|
+
subroutine: Vn,
|
|
2189
2189
|
args: {
|
|
2190
2190
|
source: O(s, e.source)
|
|
2191
2191
|
}
|
|
@@ -2193,7 +2193,7 @@ function O(s, e) {
|
|
|
2193
2193
|
case "GetLastLogs":
|
|
2194
2194
|
return () => ({
|
|
2195
2195
|
type: "ScheduleSubroutine",
|
|
2196
|
-
subroutine:
|
|
2196
|
+
subroutine: Un(e.lines),
|
|
2197
2197
|
args: {
|
|
2198
2198
|
source: O(s, e.source)
|
|
2199
2199
|
}
|
|
@@ -2201,7 +2201,7 @@ function O(s, e) {
|
|
|
2201
2201
|
case "GetProgressLog":
|
|
2202
2202
|
return () => ({
|
|
2203
2203
|
type: "ScheduleSubroutine",
|
|
2204
|
-
subroutine:
|
|
2204
|
+
subroutine: Gn(e.patternToSearch),
|
|
2205
2205
|
args: {
|
|
2206
2206
|
source: O(s, e.source)
|
|
2207
2207
|
}
|
|
@@ -2209,7 +2209,7 @@ function O(s, e) {
|
|
|
2209
2209
|
case "GetLogHandle":
|
|
2210
2210
|
return () => ({
|
|
2211
2211
|
type: "ScheduleSubroutine",
|
|
2212
|
-
subroutine:
|
|
2212
|
+
subroutine: Jn,
|
|
2213
2213
|
args: {
|
|
2214
2214
|
source: O(s, e.source)
|
|
2215
2215
|
}
|
|
@@ -2218,8 +2218,8 @@ function O(s, e) {
|
|
|
2218
2218
|
return G(e);
|
|
2219
2219
|
}
|
|
2220
2220
|
}
|
|
2221
|
-
const
|
|
2222
|
-
function
|
|
2221
|
+
const Mn = ["$prod", "$staging"];
|
|
2222
|
+
function _n(s) {
|
|
2223
2223
|
return {
|
|
2224
2224
|
$blockId: s.blockId,
|
|
2225
2225
|
$args: (e) => JSON.parse(s.args(e)),
|
|
@@ -2231,16 +2231,16 @@ function Gn(s) {
|
|
|
2231
2231
|
$staging: s.staging
|
|
2232
2232
|
};
|
|
2233
2233
|
}
|
|
2234
|
-
const
|
|
2235
|
-
function
|
|
2236
|
-
return s.op ==
|
|
2234
|
+
const ss = Symbol(), os = "return", Kn = { op: ss, arg: os };
|
|
2235
|
+
function Hn(s) {
|
|
2236
|
+
return s.op == ss && s.arg == os;
|
|
2237
2237
|
}
|
|
2238
|
-
function
|
|
2238
|
+
function Wn() {
|
|
2239
2239
|
return { pendingSubroutines: /* @__PURE__ */ new Map() };
|
|
2240
2240
|
}
|
|
2241
|
-
function
|
|
2242
|
-
const o = new
|
|
2243
|
-
if (
|
|
2241
|
+
function sr(s, e, t, r) {
|
|
2242
|
+
const o = new jr(t), n = (c, a) => {
|
|
2243
|
+
if (Hn(c))
|
|
2244
2244
|
return e.result = a, !1;
|
|
2245
2245
|
const l = B(e.pendingSubroutines.get(c.op));
|
|
2246
2246
|
if (c.arg in l.args) throw new Error("argument already set");
|
|
@@ -2290,26 +2290,26 @@ function er(s, e, t, r) {
|
|
|
2290
2290
|
}
|
|
2291
2291
|
return i;
|
|
2292
2292
|
}
|
|
2293
|
-
function
|
|
2294
|
-
return
|
|
2293
|
+
function zn(s, e, t, r = {}) {
|
|
2294
|
+
return ns(s, _n(e), t, r);
|
|
2295
2295
|
}
|
|
2296
|
-
function
|
|
2296
|
+
function ns(s, e, t, r = {}) {
|
|
2297
2297
|
const o = `${e.blockId}#` + ve({
|
|
2298
2298
|
ctx: Object.fromEntries(
|
|
2299
|
-
Object.entries(e).filter(([n]) =>
|
|
2299
|
+
Object.entries(e).filter(([n]) => Mn.indexOf(n) === -1)
|
|
2300
2300
|
),
|
|
2301
2301
|
cfg: t
|
|
2302
2302
|
});
|
|
2303
2303
|
return V.makeRaw(
|
|
2304
2304
|
(n) => {
|
|
2305
|
-
const i = { drivers: s, cCtx: n }, c =
|
|
2305
|
+
const i = { drivers: s, cCtx: n }, c = Wn();
|
|
2306
2306
|
return {
|
|
2307
|
-
ir:
|
|
2307
|
+
ir: sr(
|
|
2308
2308
|
i,
|
|
2309
2309
|
c,
|
|
2310
2310
|
[
|
|
2311
2311
|
{
|
|
2312
|
-
destination:
|
|
2312
|
+
destination: Kn,
|
|
2313
2313
|
operation: O(e, t)
|
|
2314
2314
|
}
|
|
2315
2315
|
],
|
|
@@ -2331,7 +2331,7 @@ function rs(s, e, t, r = {}) {
|
|
|
2331
2331
|
result: c.result,
|
|
2332
2332
|
pendingSubroutines: m
|
|
2333
2333
|
};
|
|
2334
|
-
if (
|
|
2334
|
+
if (sr(d, h, u, !1), !("result" in h))
|
|
2335
2335
|
throw new Error("illegal cfg rendering stack state, no result");
|
|
2336
2336
|
return h.result;
|
|
2337
2337
|
}
|
|
@@ -2340,13 +2340,13 @@ function rs(s, e, t, r = {}) {
|
|
|
2340
2340
|
{ ...r, key: o }
|
|
2341
2341
|
);
|
|
2342
2342
|
}
|
|
2343
|
-
function
|
|
2343
|
+
function Xn(s) {
|
|
2344
2344
|
return s instanceof ArrayBuffer || ArrayBuffer.isView(s);
|
|
2345
2345
|
}
|
|
2346
|
-
function
|
|
2346
|
+
function or(s) {
|
|
2347
2347
|
return s !== void 0 ? Buffer.from(s).toString("base64") : void 0;
|
|
2348
2348
|
}
|
|
2349
|
-
class
|
|
2349
|
+
class ze {
|
|
2350
2350
|
constructor(e, t, r, o, n) {
|
|
2351
2351
|
S(this, "callbackRegistry");
|
|
2352
2352
|
S(this, "fnJSONStringify");
|
|
@@ -2378,12 +2378,12 @@ class Ke {
|
|
|
2378
2378
|
try {
|
|
2379
2379
|
this.vm.unwrapResult(this.vm.evalCode(e, "bundle.js", { type: "global" })).dispose();
|
|
2380
2380
|
} catch (t) {
|
|
2381
|
-
throw
|
|
2381
|
+
throw ze.cleanErrorContext(t), t;
|
|
2382
2382
|
}
|
|
2383
2383
|
}
|
|
2384
2384
|
runCallback(e, ...t) {
|
|
2385
2385
|
try {
|
|
2386
|
-
return
|
|
2386
|
+
return ft.withScope((r) => {
|
|
2387
2387
|
const o = r.manage(this.vm.getProp(this.callbackRegistry, e));
|
|
2388
2388
|
if (this.vm.typeof(o) !== "function")
|
|
2389
2389
|
throw new Error(`No such callback: ${e}`);
|
|
@@ -2398,7 +2398,7 @@ class Ke {
|
|
|
2398
2398
|
);
|
|
2399
2399
|
});
|
|
2400
2400
|
} catch (r) {
|
|
2401
|
-
throw
|
|
2401
|
+
throw ze.cleanErrorContext(r), r;
|
|
2402
2402
|
}
|
|
2403
2403
|
}
|
|
2404
2404
|
//
|
|
@@ -2453,13 +2453,13 @@ class Ke {
|
|
|
2453
2453
|
return this.getAccessor(e).listDynamicFields();
|
|
2454
2454
|
}
|
|
2455
2455
|
getKeyValueBase64(e, t) {
|
|
2456
|
-
return
|
|
2456
|
+
return or(this.getAccessor(e).getKeyValue(t));
|
|
2457
2457
|
}
|
|
2458
2458
|
getKeyValueAsString(e, t) {
|
|
2459
2459
|
return this.getAccessor(e).getKeyValueAsString(t);
|
|
2460
2460
|
}
|
|
2461
2461
|
getDataBase64(e) {
|
|
2462
|
-
return
|
|
2462
|
+
return or(this.getAccessor(e).getData());
|
|
2463
2463
|
}
|
|
2464
2464
|
getDataAsString(e) {
|
|
2465
2465
|
return this.getAccessor(e).getDataAsString();
|
|
@@ -2470,7 +2470,7 @@ class Ke {
|
|
|
2470
2470
|
parsePObjectCollection(e, t, r, ...o) {
|
|
2471
2471
|
const n = this.getAccessor(e);
|
|
2472
2472
|
if (!n.getIsReadyOrError()) return;
|
|
2473
|
-
const i =
|
|
2473
|
+
const i = mn(n, t, r, o), c = {};
|
|
2474
2474
|
for (const [a, l] of Object.entries(i))
|
|
2475
2475
|
c[a] = le(l, (u) => this.wrapAccessor(u));
|
|
2476
2476
|
return c;
|
|
@@ -2479,7 +2479,7 @@ class Ke {
|
|
|
2479
2479
|
// Blobs
|
|
2480
2480
|
//
|
|
2481
2481
|
registerComputable(e, t) {
|
|
2482
|
-
const r = `${e}_${
|
|
2482
|
+
const r = `${e}_${Ie()}`;
|
|
2483
2483
|
return this.computablesToResolve[r] = t, r;
|
|
2484
2484
|
}
|
|
2485
2485
|
getBlobContentAsString(e) {
|
|
@@ -2601,7 +2601,7 @@ class Ke {
|
|
|
2601
2601
|
obj: {
|
|
2602
2602
|
id: t.obj.id,
|
|
2603
2603
|
spec: t.obj.spec,
|
|
2604
|
-
data:
|
|
2604
|
+
data: Ir(t.obj.data, (r) => this.wrapAccessor(r))
|
|
2605
2605
|
}
|
|
2606
2606
|
}))
|
|
2607
2607
|
};
|
|
@@ -2641,7 +2641,7 @@ class Ke {
|
|
|
2641
2641
|
"can't instantiate PTable from this context (most porbably called from the future mapper)"
|
|
2642
2642
|
);
|
|
2643
2643
|
return this.env.driverKit.pFrameDriver.createPTable(
|
|
2644
|
-
|
|
2644
|
+
Fr(e, (t) => le(
|
|
2645
2645
|
t,
|
|
2646
2646
|
(r) => typeof r == "string" ? this.getAccessor(r) : r
|
|
2647
2647
|
)),
|
|
@@ -2665,7 +2665,7 @@ class Ke {
|
|
|
2665
2665
|
}
|
|
2666
2666
|
wrapAccessor(e) {
|
|
2667
2667
|
if (e !== void 0) {
|
|
2668
|
-
const t =
|
|
2668
|
+
const t = Ie();
|
|
2669
2669
|
return this.accessors.set(t, e), t;
|
|
2670
2670
|
}
|
|
2671
2671
|
}
|
|
@@ -2697,7 +2697,7 @@ class Ke {
|
|
|
2697
2697
|
r = this.vm.null;
|
|
2698
2698
|
break;
|
|
2699
2699
|
}
|
|
2700
|
-
if (
|
|
2700
|
+
if (Xn(e)) {
|
|
2701
2701
|
r = this.vm.newArrayBuffer(e), o = !0;
|
|
2702
2702
|
break;
|
|
2703
2703
|
}
|
|
@@ -2733,12 +2733,12 @@ class Ke {
|
|
|
2733
2733
|
return JSON.parse(t);
|
|
2734
2734
|
}
|
|
2735
2735
|
injectCtx() {
|
|
2736
|
-
|
|
2736
|
+
ft.withScope((e) => {
|
|
2737
2737
|
const t = e.manage(this.vm.newObject()), r = this.blockCtx.args(this.computableCtx), o = this.blockCtx.uiState(this.computableCtx);
|
|
2738
2738
|
this.vm.setProp(t, "args", e.manage(this.vm.newString(r))), o !== void 0 && this.vm.setProp(t, "uiState", e.manage(this.vm.newString(o))), this.vm.setProp(t, "callbackRegistry", this.callbackRegistry), this.vm.setProp(
|
|
2739
2739
|
t,
|
|
2740
2740
|
"featureFlags",
|
|
2741
|
-
this.exportObjectUniversal(
|
|
2741
|
+
this.exportObjectUniversal(bs.GlobalCfgRenderCtxFeatureFlags, e)
|
|
2742
2742
|
);
|
|
2743
2743
|
const n = (i, c) => {
|
|
2744
2744
|
this.vm.newFunction(i, c).consume((a) => this.vm.setProp(t, i, a));
|
|
@@ -2816,8 +2816,8 @@ class Ke {
|
|
|
2816
2816
|
});
|
|
2817
2817
|
}
|
|
2818
2818
|
}
|
|
2819
|
-
function
|
|
2820
|
-
return
|
|
2819
|
+
function qe(s, e) {
|
|
2820
|
+
return Pe(
|
|
2821
2821
|
s.traverse(
|
|
2822
2822
|
{
|
|
2823
2823
|
field: U(e, "blockPack"),
|
|
@@ -2827,51 +2827,51 @@ function We(s, e) {
|
|
|
2827
2827
|
{ field: T.HolderRefField, assertFieldType: "Input", errorIfFieldNotFound: !0 }
|
|
2828
2828
|
),
|
|
2829
2829
|
(t) => {
|
|
2830
|
-
const r = t.getDataAsJson(), o =
|
|
2830
|
+
const r = t.getDataAsJson(), o = Tr(r.config);
|
|
2831
2831
|
return { bpId: t.resourceInfo.id.toString(), info: r, cfg: o };
|
|
2832
2832
|
}
|
|
2833
2833
|
);
|
|
2834
2834
|
}
|
|
2835
|
-
const
|
|
2836
|
-
function
|
|
2835
|
+
const je = process.env.MI_LOG_OUTPUT_STATUS;
|
|
2836
|
+
function qn(s, e, t, r, o, n = {}) {
|
|
2837
2837
|
const i = `${e.blockId}#lambda#${o}#${t.handle}`;
|
|
2838
2838
|
return n = { ...n, key: i }, n.mode === void 0 && t.retentive === !0 && (n.mode = "StableOnlyRetentive"), V.makeRaw((c) => {
|
|
2839
|
-
const a = new
|
|
2839
|
+
const a = new ft();
|
|
2840
2840
|
c.addOnDestroy(() => a.dispose());
|
|
2841
2841
|
const l = a.manage(s.quickJs.newRuntime());
|
|
2842
2842
|
l.setMemoryLimit(1024 * 640), l.setMaxStackSize(1024 * 320);
|
|
2843
|
-
const u = a.manage(l.newContext()), d = new
|
|
2843
|
+
const u = a.manage(l.newContext()), d = new ze(a, u, e, s, c);
|
|
2844
2844
|
d.evaluateBundle(r.content);
|
|
2845
2845
|
const m = d.runCallback(t.handle);
|
|
2846
2846
|
d.resetComputableCtx();
|
|
2847
2847
|
let h = 0;
|
|
2848
|
-
return
|
|
2848
|
+
return je && je !== "unstable-only" && console.log(`Output ${t.handle} scaffold calculated.`), {
|
|
2849
2849
|
ir: d.computablesToResolve,
|
|
2850
2850
|
postprocessValue: async (f, { unstableMarker: I, stable: F }) => {
|
|
2851
2851
|
for (const [_, k] of Object.entries(f)) d.runCallback(_, k);
|
|
2852
2852
|
const D = d.importObjectUniversal(m);
|
|
2853
|
-
return h++,
|
|
2853
|
+
return h++, je && (je !== "unstable-only" || !F) && console.log(
|
|
2854
2854
|
F ? `Stable output ${t.handle} calculated ${D !== void 0 ? "defined" : "undefined"}; (#${h})` : `Unstable output ${t.handle}; marker = ${I}; ${D !== void 0 ? "defined" : "undefined"} (#${h})`
|
|
2855
2855
|
), D;
|
|
2856
2856
|
}
|
|
2857
2857
|
};
|
|
2858
2858
|
}, n);
|
|
2859
2859
|
}
|
|
2860
|
-
function
|
|
2861
|
-
return
|
|
2860
|
+
function Yn(s) {
|
|
2861
|
+
return Ar(s) ? s.isActive === !0 : wn(s);
|
|
2862
2862
|
}
|
|
2863
|
-
function
|
|
2864
|
-
if (
|
|
2863
|
+
function Oe(s, e, t, r, o, n = {}) {
|
|
2864
|
+
if (Ar(t)) {
|
|
2865
2865
|
if (r === void 0) throw new Error("No code bundle.");
|
|
2866
|
-
return
|
|
2867
|
-
} else return
|
|
2866
|
+
return qn(s, e, t, r, o, n);
|
|
2867
|
+
} else return zn(s.driverKit, e, t, n);
|
|
2868
2868
|
}
|
|
2869
|
-
function
|
|
2869
|
+
function Zn(s, e, t) {
|
|
2870
2870
|
return V.make(
|
|
2871
2871
|
(r) => {
|
|
2872
2872
|
var f, I, F, D, _, k, se, pe;
|
|
2873
|
-
const o = r.accessor(s).node(), n = B(o.getKeyValueAsJson(
|
|
2874
|
-
o.getKeyValueAsJson(
|
|
2873
|
+
const o = r.accessor(s).node(), n = B(o.getKeyValueAsJson(Ot)), i = B(o.getKeyValueAsJson(Fe)), c = B(o.getKeyValueAsJson(Te)), a = B(o.getKeyValueAsJson(de)), l = B(
|
|
2874
|
+
o.getKeyValueAsJson(Ke)
|
|
2875
2875
|
), u = /* @__PURE__ */ new Map();
|
|
2876
2876
|
for (const { id: A } of te(a)) {
|
|
2877
2877
|
const z = o.traverse({
|
|
@@ -2906,32 +2906,32 @@ function Xn(s, e, t) {
|
|
|
2906
2906
|
}
|
|
2907
2907
|
u.set(A, { currentArguments: z.getDataAsJson(), prod: oe });
|
|
2908
2908
|
}
|
|
2909
|
-
const d =
|
|
2909
|
+
const d = Me(a, (A) => u.get(A).currentArguments), m = new Set(l.blocksInLimbo), h = [...te(a)].map(({ id: A, label: z, renderingMode: oe }) => {
|
|
2910
2910
|
var b, w, R, P, E;
|
|
2911
2911
|
const K = B(u.get(A)), J = B(d.nodes.get(A));
|
|
2912
2912
|
let x = "NotCalculated";
|
|
2913
2913
|
K.prod !== void 0 && (m.has(A) ? x = "Limbo" : x = K.prod.finished ? "Done" : "Running");
|
|
2914
|
-
const X =
|
|
2915
|
-
const re =
|
|
2914
|
+
const X = qe(o, A), { sections: he, title: v, inputsValid: p, sdkVersion: y } = Pe(X, ({ bpId: $, cfg: L, info: N }) => {
|
|
2915
|
+
const re = Ft(s, A);
|
|
2916
2916
|
return {
|
|
2917
|
-
sections:
|
|
2917
|
+
sections: Oe(
|
|
2918
2918
|
t,
|
|
2919
2919
|
re,
|
|
2920
2920
|
L.sections,
|
|
2921
2921
|
L.code,
|
|
2922
2922
|
$
|
|
2923
2923
|
),
|
|
2924
|
-
title:
|
|
2924
|
+
title: Pe(
|
|
2925
2925
|
L.title,
|
|
2926
|
-
(
|
|
2926
|
+
(vs) => Oe(
|
|
2927
2927
|
t,
|
|
2928
2928
|
re,
|
|
2929
|
-
|
|
2929
|
+
vs,
|
|
2930
2930
|
L.code,
|
|
2931
2931
|
$
|
|
2932
2932
|
)
|
|
2933
2933
|
),
|
|
2934
|
-
inputsValid:
|
|
2934
|
+
inputsValid: Oe(
|
|
2935
2935
|
t,
|
|
2936
2936
|
re,
|
|
2937
2937
|
L.inputsValid,
|
|
@@ -2940,7 +2940,7 @@ function Xn(s, e, t) {
|
|
|
2940
2940
|
),
|
|
2941
2941
|
sdkVersion: L.sdkVersion
|
|
2942
2942
|
};
|
|
2943
|
-
}) || {}, g =
|
|
2943
|
+
}) || {}, g = Pe(
|
|
2944
2944
|
X,
|
|
2945
2945
|
({ info: $ }) => t.blockUpdateWatcher.get($.source)
|
|
2946
2946
|
);
|
|
@@ -2969,7 +2969,7 @@ function Xn(s, e, t) {
|
|
|
2969
2969
|
meta: c,
|
|
2970
2970
|
created: new Date(n),
|
|
2971
2971
|
lastModified: new Date(i),
|
|
2972
|
-
authorMarker: o.getKeyValueAsJson(
|
|
2972
|
+
authorMarker: o.getKeyValueAsJson(vt),
|
|
2973
2973
|
blocks: h
|
|
2974
2974
|
};
|
|
2975
2975
|
},
|
|
@@ -2988,13 +2988,13 @@ function Xn(s, e, t) {
|
|
|
2988
2988
|
}
|
|
2989
2989
|
).withStableType();
|
|
2990
2990
|
}
|
|
2991
|
-
function
|
|
2991
|
+
function Qn(s, e) {
|
|
2992
2992
|
const t = s.node();
|
|
2993
|
-
if (ae(t.resourceType,
|
|
2993
|
+
if (ae(t.resourceType, Wr)) {
|
|
2994
2994
|
const r = t.getDataAsJson();
|
|
2995
2995
|
if (r === void 0) throw new Error("No resource data.");
|
|
2996
2996
|
return e.frontendDownloadDriver.getPath(new URL(r.url)).withStableType();
|
|
2997
|
-
} else if (ae(t.resourceType,
|
|
2997
|
+
} else if (ae(t.resourceType, zr)) {
|
|
2998
2998
|
const r = t.getDataAsJson();
|
|
2999
2999
|
if (r === void 0) throw new Error("No resource data.");
|
|
3000
3000
|
return e.signer.verify(
|
|
@@ -3005,10 +3005,10 @@ function qn(s, e) {
|
|
|
3005
3005
|
} else
|
|
3006
3006
|
throw new Error(`Unsupported resource type: ${JSON.stringify(t.resourceType)}`);
|
|
3007
3007
|
}
|
|
3008
|
-
function
|
|
3008
|
+
function ei(s, e) {
|
|
3009
3009
|
if (s !== void 0)
|
|
3010
3010
|
return V.make(
|
|
3011
|
-
(t) =>
|
|
3011
|
+
(t) => Qn(t.accessor(s), e),
|
|
3012
3012
|
{
|
|
3013
3013
|
postprocessValue: (t) => {
|
|
3014
3014
|
if (t !== void 0) {
|
|
@@ -3020,86 +3020,86 @@ function Yn(s, e) {
|
|
|
3020
3020
|
}
|
|
3021
3021
|
).withStableType();
|
|
3022
3022
|
}
|
|
3023
|
-
function
|
|
3023
|
+
function ti(s, e, t) {
|
|
3024
3024
|
return V.make(
|
|
3025
3025
|
(r) => {
|
|
3026
3026
|
var c;
|
|
3027
|
-
const o = r.accessor(s).node(), n =
|
|
3027
|
+
const o = r.accessor(s).node(), n = qe(o, e), i = (c = o.traverse(
|
|
3028
3028
|
{
|
|
3029
3029
|
field: U(e, "blockPack"),
|
|
3030
3030
|
assertFieldType: "Dynamic"
|
|
3031
3031
|
},
|
|
3032
3032
|
{ field: T.HolderRefField, assertFieldType: "Input", errorIfFieldNotFound: !0 },
|
|
3033
|
-
{ field:
|
|
3033
|
+
{ field: qr, assertFieldType: "Input" }
|
|
3034
3034
|
)) == null ? void 0 : c.persist();
|
|
3035
3035
|
return {
|
|
3036
|
-
path:
|
|
3036
|
+
path: ei(i, t),
|
|
3037
3037
|
sdkVersion: n == null ? void 0 : n.cfg.sdkVersion
|
|
3038
3038
|
};
|
|
3039
3039
|
},
|
|
3040
3040
|
{ mode: "StableOnlyLive" }
|
|
3041
3041
|
);
|
|
3042
3042
|
}
|
|
3043
|
-
function
|
|
3043
|
+
function is(s, e, t) {
|
|
3044
3044
|
if (t === void 0)
|
|
3045
|
-
return V.make((i) =>
|
|
3046
|
-
key: `inputs#${
|
|
3045
|
+
return V.make((i) => is(s, e, i), {
|
|
3046
|
+
key: `inputs#${Dr(s.rid)}#${e}`
|
|
3047
3047
|
});
|
|
3048
|
-
const r = t.accessor(s).node(), o =
|
|
3048
|
+
const r = t.accessor(s).node(), o = Ft(s, e), n = o.uiState(t);
|
|
3049
3049
|
return {
|
|
3050
|
-
author: r.getKeyValueAsJson(
|
|
3050
|
+
author: r.getKeyValueAsJson(mt(e)),
|
|
3051
3051
|
args: JSON.parse(o.args(t)),
|
|
3052
3052
|
ui: n !== void 0 ? JSON.parse(n) : void 0
|
|
3053
3053
|
};
|
|
3054
3054
|
}
|
|
3055
|
-
function
|
|
3055
|
+
function ri(s, e, t) {
|
|
3056
3056
|
return V.make(
|
|
3057
3057
|
(r) => {
|
|
3058
|
-
const o = r.accessor(s).node(), n =
|
|
3059
|
-
return
|
|
3058
|
+
const o = r.accessor(s).node(), n = es(s, e);
|
|
3059
|
+
return Pe(qe(o, e), ({ cfg: i, bpId: c }) => {
|
|
3060
3060
|
const a = {};
|
|
3061
3061
|
for (const [l, u] of Object.entries(i.outputs)) {
|
|
3062
|
-
const d =
|
|
3062
|
+
const d = Oe(t, n, u, i.code, c);
|
|
3063
3063
|
a[l] = V.wrapError(d);
|
|
3064
3064
|
}
|
|
3065
3065
|
return a;
|
|
3066
3066
|
});
|
|
3067
3067
|
},
|
|
3068
|
-
{ key: "outputs#" +
|
|
3068
|
+
{ key: "outputs#" + Dr(s.rid) + "#" + e }
|
|
3069
3069
|
).withStableType();
|
|
3070
3070
|
}
|
|
3071
|
-
function
|
|
3071
|
+
function si(s, e) {
|
|
3072
3072
|
return V.make((t) => {
|
|
3073
3073
|
const r = t.accessor(s).node(), o = B(r.getKeyValueAsJson(de)), n = [];
|
|
3074
3074
|
for (const { id: i, renderingMode: c } of te(o)) {
|
|
3075
|
-
const a =
|
|
3075
|
+
const a = qe(r, i);
|
|
3076
3076
|
if (a === void 0) continue;
|
|
3077
|
-
const l = Object.entries(a.cfg.outputs).map(([, d]) => d).filter((d) =>
|
|
3077
|
+
const l = Object.entries(a.cfg.outputs).map(([, d]) => d).filter((d) => Yn(d)).map((d) => d);
|
|
3078
3078
|
if (l.length === 0) continue;
|
|
3079
|
-
const u =
|
|
3079
|
+
const u = es(r.persist(), i);
|
|
3080
3080
|
for (const d of l)
|
|
3081
3081
|
n.push(
|
|
3082
|
-
V.wrapError(
|
|
3082
|
+
V.wrapError(Oe(e, u, d, a.cfg.code, a.bpId))
|
|
3083
3083
|
);
|
|
3084
3084
|
}
|
|
3085
3085
|
return n;
|
|
3086
3086
|
});
|
|
3087
3087
|
}
|
|
3088
|
-
class
|
|
3088
|
+
class oi {
|
|
3089
3089
|
constructor() {
|
|
3090
3090
|
S(this, "states", /* @__PURE__ */ new Map());
|
|
3091
3091
|
}
|
|
3092
3092
|
setState(e, t) {
|
|
3093
3093
|
const r = this.states.get(e);
|
|
3094
3094
|
if (r === void 0) {
|
|
3095
|
-
this.states.set(e, { state: t, change: new
|
|
3095
|
+
this.states.set(e, { state: t, change: new Kt() });
|
|
3096
3096
|
return;
|
|
3097
3097
|
}
|
|
3098
3098
|
r.state = { ...t }, r.change.markChanged();
|
|
3099
3099
|
}
|
|
3100
3100
|
readState(e, t) {
|
|
3101
3101
|
let r = this.states.get(t);
|
|
3102
|
-
return r === void 0 && (r = { state: { ...
|
|
3102
|
+
return r === void 0 && (r = { state: { ...Rs }, change: new Kt() }, this.states.set(t, r)), r.change.attachWatcher(e.watcher), r.state;
|
|
3103
3103
|
}
|
|
3104
3104
|
getState(e) {
|
|
3105
3105
|
return V.make(
|
|
@@ -3112,38 +3112,38 @@ class ti {
|
|
|
3112
3112
|
t !== void 0 && (this.states.delete(e), t.change.markChanged());
|
|
3113
3113
|
}
|
|
3114
3114
|
}
|
|
3115
|
-
class
|
|
3115
|
+
class Tt {
|
|
3116
3116
|
constructor(e, t, r) {
|
|
3117
3117
|
/** Underlying pl resource id */
|
|
3118
3118
|
S(this, "rid");
|
|
3119
3119
|
/** Data for the left panel, contain basic information about block status. */
|
|
3120
3120
|
S(this, "overview");
|
|
3121
|
-
S(this, "navigationStates", new
|
|
3121
|
+
S(this, "navigationStates", new oi());
|
|
3122
3122
|
S(this, "blockComputables", /* @__PURE__ */ new Map());
|
|
3123
3123
|
S(this, "blockFrontends", /* @__PURE__ */ new Map());
|
|
3124
3124
|
S(this, "activeConfigs");
|
|
3125
3125
|
S(this, "refreshLoopResult");
|
|
3126
3126
|
S(this, "abortController", new AbortController());
|
|
3127
3127
|
S(this, "destroyed", !1);
|
|
3128
|
-
this.env = e, this.projectTree = r, this.overview =
|
|
3128
|
+
this.env = e, this.projectTree = r, this.overview = Zn(
|
|
3129
3129
|
r.entry(),
|
|
3130
3130
|
this.navigationStates,
|
|
3131
3131
|
e
|
|
3132
|
-
).withPreCalculatedValueTree(), this.rid = t, this.refreshLoopResult = this.refreshLoop(), this.activeConfigs =
|
|
3132
|
+
).withPreCalculatedValueTree(), this.rid = t, this.refreshLoopResult = this.refreshLoop(), this.activeConfigs = si(r.entry(), e);
|
|
3133
3133
|
}
|
|
3134
3134
|
async refreshLoop() {
|
|
3135
3135
|
for (; !this.destroyed; )
|
|
3136
3136
|
try {
|
|
3137
|
-
await
|
|
3137
|
+
await nt(this.env.pl, this.rid, (e) => {
|
|
3138
3138
|
e.doRefresh(this.env.ops.stagingRenderingRate);
|
|
3139
|
-
}), await this.activeConfigs.getValue(), await
|
|
3139
|
+
}), await this.activeConfigs.getValue(), await xr(this.env.ops.projectRefreshInterval, this.abortController.signal);
|
|
3140
3140
|
} catch (e) {
|
|
3141
|
-
if (
|
|
3141
|
+
if (Bs(e)) {
|
|
3142
3142
|
console.warn(
|
|
3143
3143
|
"project refresh routine terminated, because project was externally deleted"
|
|
3144
3144
|
);
|
|
3145
3145
|
break;
|
|
3146
|
-
} else if (!
|
|
3146
|
+
} else if (!js(e))
|
|
3147
3147
|
throw new Error("Unexpected exception", { cause: e });
|
|
3148
3148
|
}
|
|
3149
3149
|
}
|
|
@@ -3158,8 +3158,8 @@ class $t {
|
|
|
3158
3158
|
*
|
|
3159
3159
|
* @return returns newly created block id
|
|
3160
3160
|
* */
|
|
3161
|
-
async addBlock(e, t, r, o = void 0, n =
|
|
3162
|
-
const i = await this.env.bpPreparer.prepare(t), c = await this.env.bpPreparer.getBlockConfigContainer(t), a =
|
|
3161
|
+
async addBlock(e, t, r, o = void 0, n = Ie()) {
|
|
3162
|
+
const i = await this.env.bpPreparer.prepare(t), c = await this.env.bpPreparer.getBlockConfigContainer(t), a = Tr(c);
|
|
3163
3163
|
return await ee(
|
|
3164
3164
|
this.env.pl,
|
|
3165
3165
|
this.rid,
|
|
@@ -3237,7 +3237,7 @@ class $t {
|
|
|
3237
3237
|
* stale state.
|
|
3238
3238
|
* */
|
|
3239
3239
|
async runBlock(e) {
|
|
3240
|
-
await
|
|
3240
|
+
await nt(this.env.pl, this.rid, (t) => t.renderProduction([e], !0)), await this.projectTree.refreshState();
|
|
3241
3241
|
}
|
|
3242
3242
|
/**
|
|
3243
3243
|
* Stops the block if it is running by destroying its production state. All
|
|
@@ -3245,7 +3245,7 @@ class $t {
|
|
|
3245
3245
|
* calculated.
|
|
3246
3246
|
* */
|
|
3247
3247
|
async stopBlock(e) {
|
|
3248
|
-
await
|
|
3248
|
+
await nt(this.env.pl, this.rid, (t) => t.stopProduction(e)), await this.projectTree.refreshState();
|
|
3249
3249
|
}
|
|
3250
3250
|
// /** Update block label. */
|
|
3251
3251
|
// public async setBlockLabel(blockId: string, label: string, author?: AuthorMarker) {
|
|
@@ -3302,9 +3302,9 @@ class $t {
|
|
|
3302
3302
|
/** Resets arguments and ui state of the block to initial state */
|
|
3303
3303
|
async resetBlockArgsAndUiState(e, t) {
|
|
3304
3304
|
await this.env.pl.withWriteTx("BlockInputsReset", async (r) => {
|
|
3305
|
-
const o =
|
|
3305
|
+
const o = ht(
|
|
3306
3306
|
(await r.getField(j(this.rid, U(e, "blockPack")))).value
|
|
3307
|
-
), n =
|
|
3307
|
+
), n = ht(
|
|
3308
3308
|
(await r.getField(j(o, T.HolderRefField))).value
|
|
3309
3309
|
), i = await r.getResourceData(n, !1), c = JSON.parse(
|
|
3310
3310
|
Buffer.from(B(i.data)).toString("utf-8")
|
|
@@ -3317,10 +3317,10 @@ class $t {
|
|
|
3317
3317
|
getBlockComputables(e) {
|
|
3318
3318
|
const t = this.blockComputables.get(e);
|
|
3319
3319
|
if (t === void 0) {
|
|
3320
|
-
const r =
|
|
3320
|
+
const r = ri(this.projectTree.entry(), e, this.env), n = {
|
|
3321
3321
|
fullState: V.make(
|
|
3322
3322
|
(i) => ({
|
|
3323
|
-
argsAndUiState:
|
|
3323
|
+
argsAndUiState: is(this.projectTree.entry(), e, i),
|
|
3324
3324
|
outputs: r,
|
|
3325
3325
|
navigationState: this.navigationStates.getState(e)
|
|
3326
3326
|
}),
|
|
@@ -3351,7 +3351,7 @@ class $t {
|
|
|
3351
3351
|
getBlockFrontend(e) {
|
|
3352
3352
|
const t = this.blockFrontends.get(e);
|
|
3353
3353
|
if (t === void 0) {
|
|
3354
|
-
const r =
|
|
3354
|
+
const r = ti(
|
|
3355
3355
|
this.projectTree.entry(),
|
|
3356
3356
|
e,
|
|
3357
3357
|
this.env
|
|
@@ -3371,19 +3371,19 @@ class $t {
|
|
|
3371
3371
|
await this.destroy();
|
|
3372
3372
|
}
|
|
3373
3373
|
static async init(e, t) {
|
|
3374
|
-
const r = await
|
|
3374
|
+
const r = await Br.init(
|
|
3375
3375
|
e.pl,
|
|
3376
3376
|
t,
|
|
3377
3377
|
{
|
|
3378
3378
|
...e.ops.defaultTreeOptions,
|
|
3379
|
-
pruning:
|
|
3379
|
+
pruning: ni
|
|
3380
3380
|
},
|
|
3381
3381
|
e.logger
|
|
3382
3382
|
);
|
|
3383
|
-
return new
|
|
3383
|
+
return new Tt(e, t, r);
|
|
3384
3384
|
}
|
|
3385
3385
|
}
|
|
3386
|
-
function
|
|
3386
|
+
function ni(s) {
|
|
3387
3387
|
switch (s.type.name) {
|
|
3388
3388
|
case "BlockPackCustom":
|
|
3389
3389
|
return s.fields.filter((e) => e.name !== "template");
|
|
@@ -3395,8 +3395,8 @@ function ri(s) {
|
|
|
3395
3395
|
return s.fields;
|
|
3396
3396
|
}
|
|
3397
3397
|
}
|
|
3398
|
-
const
|
|
3399
|
-
logger: new
|
|
3398
|
+
const as = {
|
|
3399
|
+
logger: new Is(),
|
|
3400
3400
|
blobDriverOps: {
|
|
3401
3401
|
cacheSoftSizeBytes: 100 * 1024 * 1024,
|
|
3402
3402
|
// 100MB
|
|
@@ -3414,13 +3414,13 @@ const os = {
|
|
|
3414
3414
|
stopPollingDelay: 1e3
|
|
3415
3415
|
}
|
|
3416
3416
|
};
|
|
3417
|
-
function
|
|
3417
|
+
function cs(s) {
|
|
3418
3418
|
return {
|
|
3419
3419
|
blobDownloadPath: H.join(s, "download")
|
|
3420
3420
|
};
|
|
3421
3421
|
}
|
|
3422
|
-
const
|
|
3423
|
-
...
|
|
3422
|
+
const ii = {
|
|
3423
|
+
...as,
|
|
3424
3424
|
defaultTreeOptions: {
|
|
3425
3425
|
pollingInterval: 350,
|
|
3426
3426
|
stopPollingDelay: 2500
|
|
@@ -3429,18 +3429,18 @@ const si = {
|
|
|
3429
3429
|
projectRefreshInterval: 700,
|
|
3430
3430
|
stagingRenderingRate: 5
|
|
3431
3431
|
};
|
|
3432
|
-
function
|
|
3432
|
+
function ai(s) {
|
|
3433
3433
|
return {
|
|
3434
|
-
...
|
|
3434
|
+
...cs(s),
|
|
3435
3435
|
frontendDownloadPath: H.join(s, "frontend")
|
|
3436
3436
|
};
|
|
3437
3437
|
}
|
|
3438
|
-
function
|
|
3438
|
+
function ci(s) {
|
|
3439
3439
|
return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
|
|
3440
3440
|
}
|
|
3441
|
-
var
|
|
3442
|
-
const
|
|
3443
|
-
9007199254740991,
|
|
3441
|
+
var Rt = { exports: {} };
|
|
3442
|
+
const li = "2.0.0", ls = 256, ui = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
|
|
3443
|
+
9007199254740991, di = 16, pi = ls - 6, hi = [
|
|
3444
3444
|
"major",
|
|
3445
3445
|
"premajor",
|
|
3446
3446
|
"minor",
|
|
@@ -3449,25 +3449,25 @@ const ii = "2.0.0", is = 256, ai = Number.MAX_SAFE_INTEGER || /* istanbul ignore
|
|
|
3449
3449
|
"prepatch",
|
|
3450
3450
|
"prerelease"
|
|
3451
3451
|
];
|
|
3452
|
-
var
|
|
3453
|
-
MAX_LENGTH:
|
|
3454
|
-
MAX_SAFE_COMPONENT_LENGTH:
|
|
3455
|
-
MAX_SAFE_BUILD_LENGTH:
|
|
3456
|
-
MAX_SAFE_INTEGER:
|
|
3457
|
-
RELEASE_TYPES:
|
|
3458
|
-
SEMVER_SPEC_VERSION:
|
|
3452
|
+
var Ye = {
|
|
3453
|
+
MAX_LENGTH: ls,
|
|
3454
|
+
MAX_SAFE_COMPONENT_LENGTH: di,
|
|
3455
|
+
MAX_SAFE_BUILD_LENGTH: pi,
|
|
3456
|
+
MAX_SAFE_INTEGER: ui,
|
|
3457
|
+
RELEASE_TYPES: hi,
|
|
3458
|
+
SEMVER_SPEC_VERSION: li,
|
|
3459
3459
|
FLAG_INCLUDE_PRERELEASE: 1,
|
|
3460
3460
|
FLAG_LOOSE: 2
|
|
3461
3461
|
};
|
|
3462
|
-
const
|
|
3462
|
+
const fi = typeof process == "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...s) => console.error("SEMVER", ...s) : () => {
|
|
3463
3463
|
};
|
|
3464
|
-
var
|
|
3464
|
+
var Ze = fi;
|
|
3465
3465
|
(function(s, e) {
|
|
3466
3466
|
const {
|
|
3467
3467
|
MAX_SAFE_COMPONENT_LENGTH: t,
|
|
3468
3468
|
MAX_SAFE_BUILD_LENGTH: r,
|
|
3469
3469
|
MAX_LENGTH: o
|
|
3470
|
-
} =
|
|
3470
|
+
} = Ye, n = Ze;
|
|
3471
3471
|
e = s.exports = {};
|
|
3472
3472
|
const i = e.re = [], c = e.safeRe = [], a = e.src = [], l = e.t = {};
|
|
3473
3473
|
let u = 0;
|
|
@@ -3484,45 +3484,45 @@ var Xe = di;
|
|
|
3484
3484
|
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);
|
|
3485
3485
|
};
|
|
3486
3486
|
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*$");
|
|
3487
|
-
})(
|
|
3488
|
-
var
|
|
3489
|
-
const
|
|
3490
|
-
var
|
|
3491
|
-
const
|
|
3492
|
-
const t =
|
|
3487
|
+
})(Rt, Rt.exports);
|
|
3488
|
+
var Ne = Rt.exports;
|
|
3489
|
+
const gi = Object.freeze({ loose: !0 }), mi = Object.freeze({}), vi = (s) => s ? typeof s != "object" ? gi : s : mi;
|
|
3490
|
+
var At = vi;
|
|
3491
|
+
const nr = /^[0-9]+$/, us = (s, e) => {
|
|
3492
|
+
const t = nr.test(s), r = nr.test(e);
|
|
3493
3493
|
return t && r && (s = +s, e = +e), s === e ? 0 : t && !r ? -1 : r && !t ? 1 : s < e ? -1 : 1;
|
|
3494
|
-
},
|
|
3495
|
-
var
|
|
3496
|
-
compareIdentifiers:
|
|
3497
|
-
rcompareIdentifiers:
|
|
3494
|
+
}, yi = (s, e) => us(e, s);
|
|
3495
|
+
var ds = {
|
|
3496
|
+
compareIdentifiers: us,
|
|
3497
|
+
rcompareIdentifiers: yi
|
|
3498
3498
|
};
|
|
3499
|
-
const
|
|
3500
|
-
let
|
|
3499
|
+
const xe = Ze, { MAX_LENGTH: ir, MAX_SAFE_INTEGER: Ve } = Ye, { safeRe: ar, t: cr } = Ne, wi = At, { compareIdentifiers: fe } = ds;
|
|
3500
|
+
let Si = class Q {
|
|
3501
3501
|
constructor(e, t) {
|
|
3502
|
-
if (t =
|
|
3502
|
+
if (t = wi(t), e instanceof Q) {
|
|
3503
3503
|
if (e.loose === !!t.loose && e.includePrerelease === !!t.includePrerelease)
|
|
3504
3504
|
return e;
|
|
3505
3505
|
e = e.version;
|
|
3506
3506
|
} else if (typeof e != "string")
|
|
3507
3507
|
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);
|
|
3508
|
-
if (e.length >
|
|
3508
|
+
if (e.length > ir)
|
|
3509
3509
|
throw new TypeError(
|
|
3510
|
-
`version is longer than ${
|
|
3510
|
+
`version is longer than ${ir} characters`
|
|
3511
3511
|
);
|
|
3512
|
-
|
|
3513
|
-
const r = e.trim().match(t.loose ?
|
|
3512
|
+
xe("SemVer", e, t), this.options = t, this.loose = !!t.loose, this.includePrerelease = !!t.includePrerelease;
|
|
3513
|
+
const r = e.trim().match(t.loose ? ar[cr.LOOSE] : ar[cr.FULL]);
|
|
3514
3514
|
if (!r)
|
|
3515
3515
|
throw new TypeError(`Invalid Version: ${e}`);
|
|
3516
|
-
if (this.raw = e, this.major = +r[1], this.minor = +r[2], this.patch = +r[3], this.major >
|
|
3516
|
+
if (this.raw = e, this.major = +r[1], this.minor = +r[2], this.patch = +r[3], this.major > Ve || this.major < 0)
|
|
3517
3517
|
throw new TypeError("Invalid major version");
|
|
3518
|
-
if (this.minor >
|
|
3518
|
+
if (this.minor > Ve || this.minor < 0)
|
|
3519
3519
|
throw new TypeError("Invalid minor version");
|
|
3520
|
-
if (this.patch >
|
|
3520
|
+
if (this.patch > Ve || this.patch < 0)
|
|
3521
3521
|
throw new TypeError("Invalid patch version");
|
|
3522
3522
|
r[4] ? this.prerelease = r[4].split(".").map((o) => {
|
|
3523
3523
|
if (/^[0-9]+$/.test(o)) {
|
|
3524
3524
|
const n = +o;
|
|
3525
|
-
if (n >= 0 && n <
|
|
3525
|
+
if (n >= 0 && n < Ve)
|
|
3526
3526
|
return n;
|
|
3527
3527
|
}
|
|
3528
3528
|
return o;
|
|
@@ -3535,7 +3535,7 @@ let vi = class Q {
|
|
|
3535
3535
|
return this.version;
|
|
3536
3536
|
}
|
|
3537
3537
|
compare(e) {
|
|
3538
|
-
if (
|
|
3538
|
+
if (xe("SemVer.compare", this.version, this.options, e), !(e instanceof Q)) {
|
|
3539
3539
|
if (typeof e == "string" && e === this.version)
|
|
3540
3540
|
return 0;
|
|
3541
3541
|
e = new Q(e, this.options);
|
|
@@ -3555,7 +3555,7 @@ let vi = class Q {
|
|
|
3555
3555
|
let t = 0;
|
|
3556
3556
|
do {
|
|
3557
3557
|
const r = this.prerelease[t], o = e.prerelease[t];
|
|
3558
|
-
if (
|
|
3558
|
+
if (xe("prerelease compare", t, r, o), r === void 0 && o === void 0)
|
|
3559
3559
|
return 0;
|
|
3560
3560
|
if (o === void 0)
|
|
3561
3561
|
return 1;
|
|
@@ -3571,7 +3571,7 @@ let vi = class Q {
|
|
|
3571
3571
|
let t = 0;
|
|
3572
3572
|
do {
|
|
3573
3573
|
const r = this.build[t], o = e.build[t];
|
|
3574
|
-
if (
|
|
3574
|
+
if (xe("build compare", t, r, o), r === void 0 && o === void 0)
|
|
3575
3575
|
return 0;
|
|
3576
3576
|
if (o === void 0)
|
|
3577
3577
|
return 1;
|
|
@@ -3635,43 +3635,43 @@ let vi = class Q {
|
|
|
3635
3635
|
return this.raw = this.format(), this.build.length && (this.raw += `+${this.build.join(".")}`), this;
|
|
3636
3636
|
}
|
|
3637
3637
|
};
|
|
3638
|
-
var M =
|
|
3639
|
-
const
|
|
3640
|
-
if (s instanceof
|
|
3638
|
+
var M = Si;
|
|
3639
|
+
const lr = M, bi = (s, e, t = !1) => {
|
|
3640
|
+
if (s instanceof lr)
|
|
3641
3641
|
return s;
|
|
3642
3642
|
try {
|
|
3643
|
-
return new
|
|
3643
|
+
return new lr(s, e);
|
|
3644
3644
|
} catch (r) {
|
|
3645
3645
|
if (!t)
|
|
3646
3646
|
return null;
|
|
3647
3647
|
throw r;
|
|
3648
3648
|
}
|
|
3649
3649
|
};
|
|
3650
|
-
var ye =
|
|
3651
|
-
const wi = ye, Si = (s, e) => {
|
|
3652
|
-
const t = wi(s, e);
|
|
3653
|
-
return t ? t.version : null;
|
|
3654
|
-
};
|
|
3655
|
-
var bi = Si;
|
|
3650
|
+
var ye = bi;
|
|
3656
3651
|
const Ri = ye, Ei = (s, e) => {
|
|
3657
|
-
const t = Ri(s
|
|
3652
|
+
const t = Ri(s, e);
|
|
3658
3653
|
return t ? t.version : null;
|
|
3659
3654
|
};
|
|
3660
3655
|
var Ci = Ei;
|
|
3661
|
-
const
|
|
3656
|
+
const ki = ye, Pi = (s, e) => {
|
|
3657
|
+
const t = ki(s.trim().replace(/^[=v]+/, ""), e);
|
|
3658
|
+
return t ? t.version : null;
|
|
3659
|
+
};
|
|
3660
|
+
var Oi = Pi;
|
|
3661
|
+
const ur = M, $i = (s, e, t, r, o) => {
|
|
3662
3662
|
typeof t == "string" && (o = r, r = t, t = void 0);
|
|
3663
3663
|
try {
|
|
3664
|
-
return new
|
|
3665
|
-
s instanceof
|
|
3664
|
+
return new ur(
|
|
3665
|
+
s instanceof ur ? s.version : s,
|
|
3666
3666
|
t
|
|
3667
3667
|
).inc(e, r, o).version;
|
|
3668
3668
|
} catch {
|
|
3669
3669
|
return null;
|
|
3670
3670
|
}
|
|
3671
3671
|
};
|
|
3672
|
-
var
|
|
3673
|
-
const
|
|
3674
|
-
const t =
|
|
3672
|
+
var Ii = $i;
|
|
3673
|
+
const dr = ye, Fi = (s, e) => {
|
|
3674
|
+
const t = dr(s, null, !0), r = dr(e, null, !0), o = t.compare(r);
|
|
3675
3675
|
if (o === 0)
|
|
3676
3676
|
return null;
|
|
3677
3677
|
const n = o > 0, i = n ? t : r, c = n ? r : t, a = !!i.prerelease.length;
|
|
@@ -3680,46 +3680,46 @@ const cr = ye, Oi = (s, e) => {
|
|
|
3680
3680
|
const u = a ? "pre" : "";
|
|
3681
3681
|
return t.major !== r.major ? u + "major" : t.minor !== r.minor ? u + "minor" : t.patch !== r.patch ? u + "patch" : "prerelease";
|
|
3682
3682
|
};
|
|
3683
|
-
var $i = Oi;
|
|
3684
|
-
const Ii = M, Fi = (s, e) => new Ii(s, e).major;
|
|
3685
3683
|
var Ti = Fi;
|
|
3686
|
-
const Ai = M, Li = (s, e) => new Ai(s, e).
|
|
3684
|
+
const Ai = M, Li = (s, e) => new Ai(s, e).major;
|
|
3687
3685
|
var Ni = Li;
|
|
3688
|
-
const Di = M, Bi = (s, e) => new Di(s, e).
|
|
3686
|
+
const Di = M, Bi = (s, e) => new Di(s, e).minor;
|
|
3689
3687
|
var ji = Bi;
|
|
3690
|
-
const xi =
|
|
3691
|
-
|
|
3688
|
+
const xi = M, Vi = (s, e) => new xi(s, e).patch;
|
|
3689
|
+
var Ui = Vi;
|
|
3690
|
+
const Gi = ye, Ji = (s, e) => {
|
|
3691
|
+
const t = Gi(s, e);
|
|
3692
3692
|
return t && t.prerelease.length ? t.prerelease : null;
|
|
3693
3693
|
};
|
|
3694
|
-
var
|
|
3695
|
-
const
|
|
3696
|
-
var Y =
|
|
3697
|
-
const
|
|
3698
|
-
var _i = Mi;
|
|
3699
|
-
const Ki = Y, Hi = (s, e) => Ki(s, e, !0);
|
|
3694
|
+
var Mi = Ji;
|
|
3695
|
+
const pr = M, _i = (s, e, t) => new pr(s, t).compare(new pr(e, t));
|
|
3696
|
+
var Y = _i;
|
|
3697
|
+
const Ki = Y, Hi = (s, e, t) => Ki(e, s, t);
|
|
3700
3698
|
var Wi = Hi;
|
|
3701
|
-
const
|
|
3702
|
-
|
|
3699
|
+
const zi = Y, Xi = (s, e) => zi(s, e, !0);
|
|
3700
|
+
var qi = Xi;
|
|
3701
|
+
const hr = M, Yi = (s, e, t) => {
|
|
3702
|
+
const r = new hr(s, t), o = new hr(e, t);
|
|
3703
3703
|
return r.compare(o) || r.compareBuild(o);
|
|
3704
3704
|
};
|
|
3705
|
-
var
|
|
3706
|
-
const
|
|
3707
|
-
var Yi = qi;
|
|
3708
|
-
const Zi = Ft, Qi = (s, e) => s.sort((t, r) => Zi(r, t, e));
|
|
3705
|
+
var Lt = Yi;
|
|
3706
|
+
const Zi = Lt, Qi = (s, e) => s.sort((t, r) => Zi(t, r, e));
|
|
3709
3707
|
var ea = Qi;
|
|
3710
|
-
const ta =
|
|
3711
|
-
var
|
|
3712
|
-
const
|
|
3713
|
-
var
|
|
3714
|
-
const
|
|
3715
|
-
var
|
|
3716
|
-
const
|
|
3717
|
-
var
|
|
3718
|
-
const
|
|
3719
|
-
var
|
|
3720
|
-
const
|
|
3721
|
-
var
|
|
3722
|
-
const
|
|
3708
|
+
const ta = Lt, ra = (s, e) => s.sort((t, r) => ta(r, t, e));
|
|
3709
|
+
var sa = ra;
|
|
3710
|
+
const oa = Y, na = (s, e, t) => oa(s, e, t) > 0;
|
|
3711
|
+
var Qe = na;
|
|
3712
|
+
const ia = Y, aa = (s, e, t) => ia(s, e, t) < 0;
|
|
3713
|
+
var Nt = aa;
|
|
3714
|
+
const ca = Y, la = (s, e, t) => ca(s, e, t) === 0;
|
|
3715
|
+
var ps = la;
|
|
3716
|
+
const ua = Y, da = (s, e, t) => ua(s, e, t) !== 0;
|
|
3717
|
+
var hs = da;
|
|
3718
|
+
const pa = Y, ha = (s, e, t) => pa(s, e, t) >= 0;
|
|
3719
|
+
var Dt = ha;
|
|
3720
|
+
const fa = Y, ga = (s, e, t) => fa(s, e, t) <= 0;
|
|
3721
|
+
var Bt = ga;
|
|
3722
|
+
const ma = ps, va = hs, ya = Qe, wa = Dt, Sa = Nt, ba = Bt, Ra = (s, e, t, r) => {
|
|
3723
3723
|
switch (e) {
|
|
3724
3724
|
case "===":
|
|
3725
3725
|
return typeof s == "object" && (s = s.version), typeof t == "object" && (t = t.version), s === t;
|
|
@@ -3728,33 +3728,33 @@ const ha = ls, fa = us, ga = qe, ma = At, va = Tt, ya = Lt, wa = (s, e, t, r) =>
|
|
|
3728
3728
|
case "":
|
|
3729
3729
|
case "=":
|
|
3730
3730
|
case "==":
|
|
3731
|
-
return
|
|
3731
|
+
return ma(s, t, r);
|
|
3732
3732
|
case "!=":
|
|
3733
|
-
return
|
|
3733
|
+
return va(s, t, r);
|
|
3734
3734
|
case ">":
|
|
3735
|
-
return
|
|
3735
|
+
return ya(s, t, r);
|
|
3736
3736
|
case ">=":
|
|
3737
|
-
return
|
|
3737
|
+
return wa(s, t, r);
|
|
3738
3738
|
case "<":
|
|
3739
|
-
return
|
|
3739
|
+
return Sa(s, t, r);
|
|
3740
3740
|
case "<=":
|
|
3741
|
-
return
|
|
3741
|
+
return ba(s, t, r);
|
|
3742
3742
|
default:
|
|
3743
3743
|
throw new TypeError(`Invalid operator: ${e}`);
|
|
3744
3744
|
}
|
|
3745
3745
|
};
|
|
3746
|
-
var
|
|
3747
|
-
const
|
|
3748
|
-
if (s instanceof
|
|
3746
|
+
var fs = Ra;
|
|
3747
|
+
const Ea = M, Ca = ye, { safeRe: Ue, t: Ge } = Ne, ka = (s, e) => {
|
|
3748
|
+
if (s instanceof Ea)
|
|
3749
3749
|
return s;
|
|
3750
3750
|
if (typeof s == "number" && (s = String(s)), typeof s != "string")
|
|
3751
3751
|
return null;
|
|
3752
3752
|
e = e || {};
|
|
3753
3753
|
let t = null;
|
|
3754
3754
|
if (!e.rtl)
|
|
3755
|
-
t = s.match(e.includePrerelease ?
|
|
3755
|
+
t = s.match(e.includePrerelease ? Ue[Ge.COERCEFULL] : Ue[Ge.COERCE]);
|
|
3756
3756
|
else {
|
|
3757
|
-
const a = e.includePrerelease ?
|
|
3757
|
+
const a = e.includePrerelease ? Ue[Ge.COERCERTLFULL] : Ue[Ge.COERCERTL];
|
|
3758
3758
|
let l;
|
|
3759
3759
|
for (; (l = a.exec(s)) && (!t || t.index + t[0].length !== s.length); )
|
|
3760
3760
|
(!t || l.index + l[0].length !== t.index + t[0].length) && (t = l), a.lastIndex = l.index + l[1].length + l[2].length;
|
|
@@ -3763,10 +3763,10 @@ const Sa = M, ba = ye, { safeRe: xe, t: Ve } = Ae, Ra = (s, e) => {
|
|
|
3763
3763
|
if (t === null)
|
|
3764
3764
|
return null;
|
|
3765
3765
|
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]}` : "";
|
|
3766
|
-
return
|
|
3766
|
+
return Ca(`${r}.${o}.${n}${i}${c}`, e);
|
|
3767
3767
|
};
|
|
3768
|
-
var
|
|
3769
|
-
class
|
|
3768
|
+
var Pa = ka;
|
|
3769
|
+
class Oa {
|
|
3770
3770
|
constructor() {
|
|
3771
3771
|
this.max = 1e3, this.map = /* @__PURE__ */ new Map();
|
|
3772
3772
|
}
|
|
@@ -3789,10 +3789,10 @@ class Ca {
|
|
|
3789
3789
|
return this;
|
|
3790
3790
|
}
|
|
3791
3791
|
}
|
|
3792
|
-
var
|
|
3792
|
+
var $a = Oa, it, fr;
|
|
3793
3793
|
function Z() {
|
|
3794
|
-
if (
|
|
3795
|
-
|
|
3794
|
+
if (fr) return it;
|
|
3795
|
+
fr = 1;
|
|
3796
3796
|
const s = /\s+/g;
|
|
3797
3797
|
class e {
|
|
3798
3798
|
constructor(p, y) {
|
|
@@ -3873,14 +3873,14 @@ function Z() {
|
|
|
3873
3873
|
return !1;
|
|
3874
3874
|
}
|
|
3875
3875
|
}
|
|
3876
|
-
|
|
3877
|
-
const t =
|
|
3876
|
+
it = e;
|
|
3877
|
+
const t = $a, r = new t(), o = At, n = et(), i = Ze, c = M, {
|
|
3878
3878
|
safeRe: a,
|
|
3879
3879
|
t: l,
|
|
3880
3880
|
comparatorTrimReplace: u,
|
|
3881
3881
|
tildeTrimReplace: d,
|
|
3882
3882
|
caretTrimReplace: m
|
|
3883
|
-
} =
|
|
3883
|
+
} = Ne, { FLAG_INCLUDE_PRERELEASE: h, FLAG_LOOSE: f } = Ye, I = (v) => v.value === "<0.0.0-0", F = (v) => v.value === "", D = (v, p) => {
|
|
3884
3884
|
let y = !0;
|
|
3885
3885
|
const g = v.slice();
|
|
3886
3886
|
let b = g.pop();
|
|
@@ -3925,12 +3925,12 @@ function Z() {
|
|
|
3925
3925
|
}
|
|
3926
3926
|
return !0;
|
|
3927
3927
|
};
|
|
3928
|
-
return
|
|
3928
|
+
return it;
|
|
3929
3929
|
}
|
|
3930
|
-
var
|
|
3931
|
-
function
|
|
3932
|
-
if (
|
|
3933
|
-
|
|
3930
|
+
var at, gr;
|
|
3931
|
+
function et() {
|
|
3932
|
+
if (gr) return at;
|
|
3933
|
+
gr = 1;
|
|
3934
3934
|
const s = Symbol("SemVer ANY");
|
|
3935
3935
|
class e {
|
|
3936
3936
|
static get ANY() {
|
|
@@ -3970,62 +3970,62 @@ function Ye() {
|
|
|
3970
3970
|
return this.operator === "" ? this.value === "" ? !0 : new a(u.value, d).test(this.value) : u.operator === "" ? u.value === "" ? !0 : new a(this.value, d).test(u.semver) : (d = t(d), d.includePrerelease && (this.value === "<0.0.0-0" || u.value === "<0.0.0-0") || !d.includePrerelease && (this.value.startsWith("<0.0.0") || u.value.startsWith("<0.0.0")) ? !1 : !!(this.operator.startsWith(">") && u.operator.startsWith(">") || this.operator.startsWith("<") && u.operator.startsWith("<") || this.semver.version === u.semver.version && this.operator.includes("=") && u.operator.includes("=") || n(this.semver, "<", u.semver, d) && this.operator.startsWith(">") && u.operator.startsWith("<") || n(this.semver, ">", u.semver, d) && this.operator.startsWith("<") && u.operator.startsWith(">")));
|
|
3971
3971
|
}
|
|
3972
3972
|
}
|
|
3973
|
-
|
|
3974
|
-
const t =
|
|
3975
|
-
return
|
|
3973
|
+
at = e;
|
|
3974
|
+
const t = At, { safeRe: r, t: o } = Ne, n = fs, i = Ze, c = M, a = Z();
|
|
3975
|
+
return at;
|
|
3976
3976
|
}
|
|
3977
|
-
const
|
|
3977
|
+
const Ia = Z(), Fa = (s, e, t) => {
|
|
3978
3978
|
try {
|
|
3979
|
-
e = new
|
|
3979
|
+
e = new Ia(e, t);
|
|
3980
3980
|
} catch {
|
|
3981
3981
|
return !1;
|
|
3982
3982
|
}
|
|
3983
3983
|
return e.test(s);
|
|
3984
3984
|
};
|
|
3985
|
-
var
|
|
3986
|
-
const
|
|
3987
|
-
var
|
|
3988
|
-
const
|
|
3985
|
+
var tt = Fa;
|
|
3986
|
+
const Ta = Z(), Aa = (s, e) => new Ta(s, e).set.map((t) => t.map((r) => r.value).join(" ").trim().split(" "));
|
|
3987
|
+
var La = Aa;
|
|
3988
|
+
const Na = M, Da = Z(), Ba = (s, e, t) => {
|
|
3989
3989
|
let r = null, o = null, n = null;
|
|
3990
3990
|
try {
|
|
3991
|
-
n = new
|
|
3991
|
+
n = new Da(e, t);
|
|
3992
3992
|
} catch {
|
|
3993
3993
|
return null;
|
|
3994
3994
|
}
|
|
3995
3995
|
return s.forEach((i) => {
|
|
3996
|
-
n.test(i) && (!r || o.compare(i) === -1) && (r = i, o = new
|
|
3996
|
+
n.test(i) && (!r || o.compare(i) === -1) && (r = i, o = new Na(r, t));
|
|
3997
3997
|
}), r;
|
|
3998
3998
|
};
|
|
3999
|
-
var
|
|
4000
|
-
const
|
|
3999
|
+
var ja = Ba;
|
|
4000
|
+
const xa = M, Va = Z(), Ua = (s, e, t) => {
|
|
4001
4001
|
let r = null, o = null, n = null;
|
|
4002
4002
|
try {
|
|
4003
|
-
n = new
|
|
4003
|
+
n = new Va(e, t);
|
|
4004
4004
|
} catch {
|
|
4005
4005
|
return null;
|
|
4006
4006
|
}
|
|
4007
4007
|
return s.forEach((i) => {
|
|
4008
|
-
n.test(i) && (!r || o.compare(i) === 1) && (r = i, o = new
|
|
4008
|
+
n.test(i) && (!r || o.compare(i) === 1) && (r = i, o = new xa(r, t));
|
|
4009
4009
|
}), r;
|
|
4010
4010
|
};
|
|
4011
|
-
var
|
|
4012
|
-
const
|
|
4013
|
-
s = new
|
|
4014
|
-
let t = new
|
|
4015
|
-
if (s.test(t) || (t = new
|
|
4011
|
+
var Ga = Ua;
|
|
4012
|
+
const ct = M, Ja = Z(), mr = Qe, Ma = (s, e) => {
|
|
4013
|
+
s = new Ja(s, e);
|
|
4014
|
+
let t = new ct("0.0.0");
|
|
4015
|
+
if (s.test(t) || (t = new ct("0.0.0-0"), s.test(t)))
|
|
4016
4016
|
return t;
|
|
4017
4017
|
t = null;
|
|
4018
4018
|
for (let r = 0; r < s.set.length; ++r) {
|
|
4019
4019
|
const o = s.set[r];
|
|
4020
4020
|
let n = null;
|
|
4021
4021
|
o.forEach((i) => {
|
|
4022
|
-
const c = new
|
|
4022
|
+
const c = new ct(i.semver.version);
|
|
4023
4023
|
switch (i.operator) {
|
|
4024
4024
|
case ">":
|
|
4025
4025
|
c.prerelease.length === 0 ? c.patch++ : c.prerelease.push(0), c.raw = c.format();
|
|
4026
4026
|
case "":
|
|
4027
4027
|
case ">=":
|
|
4028
|
-
(!n ||
|
|
4028
|
+
(!n || mr(c, n)) && (n = c);
|
|
4029
4029
|
break;
|
|
4030
4030
|
case "<":
|
|
4031
4031
|
case "<=":
|
|
@@ -4033,39 +4033,39 @@ const nt = M, Va = Z(), hr = qe, Ua = (s, e) => {
|
|
|
4033
4033
|
default:
|
|
4034
4034
|
throw new Error(`Unexpected operation: ${i.operator}`);
|
|
4035
4035
|
}
|
|
4036
|
-
}), n && (!t ||
|
|
4036
|
+
}), n && (!t || mr(t, n)) && (t = n);
|
|
4037
4037
|
}
|
|
4038
4038
|
return t && s.test(t) ? t : null;
|
|
4039
4039
|
};
|
|
4040
|
-
var
|
|
4041
|
-
const
|
|
4040
|
+
var _a = Ma;
|
|
4041
|
+
const Ka = Z(), Ha = (s, e) => {
|
|
4042
4042
|
try {
|
|
4043
|
-
return new
|
|
4043
|
+
return new Ka(s, e).range || "*";
|
|
4044
4044
|
} catch {
|
|
4045
4045
|
return null;
|
|
4046
4046
|
}
|
|
4047
4047
|
};
|
|
4048
|
-
var
|
|
4049
|
-
const
|
|
4050
|
-
s = new
|
|
4048
|
+
var Wa = Ha;
|
|
4049
|
+
const za = M, gs = et(), { ANY: Xa } = gs, qa = Z(), Ya = tt, vr = Qe, yr = Nt, Za = Bt, Qa = Dt, ec = (s, e, t, r) => {
|
|
4050
|
+
s = new za(s, r), e = new qa(e, r);
|
|
4051
4051
|
let o, n, i, c, a;
|
|
4052
4052
|
switch (t) {
|
|
4053
4053
|
case ">":
|
|
4054
|
-
o =
|
|
4054
|
+
o = vr, n = Za, i = yr, c = ">", a = ">=";
|
|
4055
4055
|
break;
|
|
4056
4056
|
case "<":
|
|
4057
|
-
o =
|
|
4057
|
+
o = yr, n = Qa, i = vr, c = "<", a = "<=";
|
|
4058
4058
|
break;
|
|
4059
4059
|
default:
|
|
4060
4060
|
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
|
4061
4061
|
}
|
|
4062
|
-
if (
|
|
4062
|
+
if (Ya(s, e, r))
|
|
4063
4063
|
return !1;
|
|
4064
4064
|
for (let l = 0; l < e.set.length; ++l) {
|
|
4065
4065
|
const u = e.set[l];
|
|
4066
4066
|
let d = null, m = null;
|
|
4067
4067
|
if (u.forEach((h) => {
|
|
4068
|
-
h.semver ===
|
|
4068
|
+
h.semver === Xa && (h = new gs(">=0.0.0")), d = d || h, m = m || h, o(h.semver, d.semver, r) ? d = h : i(h.semver, m.semver, r) && (m = h);
|
|
4069
4069
|
}), d.operator === c || d.operator === a || (!m.operator || m.operator === c) && n(s, m.semver))
|
|
4070
4070
|
return !1;
|
|
4071
4071
|
if (m.operator === a && i(s, m.semver))
|
|
@@ -4073,20 +4073,20 @@ const Ka = M, ps = Ye(), { ANY: Ha } = ps, Wa = Z(), za = Ze, fr = qe, gr = Tt,
|
|
|
4073
4073
|
}
|
|
4074
4074
|
return !0;
|
|
4075
4075
|
};
|
|
4076
|
-
var
|
|
4077
|
-
const
|
|
4078
|
-
var ec = Qa;
|
|
4079
|
-
const tc = Nt, rc = (s, e, t) => tc(s, e, "<", t);
|
|
4076
|
+
var jt = ec;
|
|
4077
|
+
const tc = jt, rc = (s, e, t) => tc(s, e, ">", t);
|
|
4080
4078
|
var sc = rc;
|
|
4081
|
-
const
|
|
4082
|
-
var
|
|
4083
|
-
const
|
|
4084
|
-
var cc =
|
|
4079
|
+
const oc = jt, nc = (s, e, t) => oc(s, e, "<", t);
|
|
4080
|
+
var ic = nc;
|
|
4081
|
+
const wr = Z(), ac = (s, e, t) => (s = new wr(s, t), e = new wr(e, t), s.intersects(e, t));
|
|
4082
|
+
var cc = ac;
|
|
4083
|
+
const lc = tt, uc = Y;
|
|
4084
|
+
var dc = (s, e, t) => {
|
|
4085
4085
|
const r = [];
|
|
4086
4086
|
let o = null, n = null;
|
|
4087
|
-
const i = s.sort((u, d) =>
|
|
4087
|
+
const i = s.sort((u, d) => uc(u, d, t));
|
|
4088
4088
|
for (const u of i)
|
|
4089
|
-
|
|
4089
|
+
lc(u, e, t) ? (n = u, o || (o = u)) : (n && r.push([o, n]), n = null, o = null);
|
|
4090
4090
|
o && r.push([o, null]);
|
|
4091
4091
|
const c = [];
|
|
4092
4092
|
for (const [u, d] of r)
|
|
@@ -4094,14 +4094,14 @@ var cc = (s, e, t) => {
|
|
|
4094
4094
|
const a = c.join(" || "), l = typeof e.raw == "string" ? e.raw : String(e);
|
|
4095
4095
|
return a.length < l.length ? a : e;
|
|
4096
4096
|
};
|
|
4097
|
-
const
|
|
4097
|
+
const Sr = Z(), xt = et(), { ANY: lt } = xt, Se = tt, Vt = Y, pc = (s, e, t = {}) => {
|
|
4098
4098
|
if (s === e)
|
|
4099
4099
|
return !0;
|
|
4100
|
-
s = new
|
|
4100
|
+
s = new Sr(s, t), e = new Sr(e, t);
|
|
4101
4101
|
let r = !1;
|
|
4102
4102
|
e: for (const o of s.set) {
|
|
4103
4103
|
for (const n of e.set) {
|
|
4104
|
-
const i =
|
|
4104
|
+
const i = fc(o, n, t);
|
|
4105
4105
|
if (r = r || i !== null, i)
|
|
4106
4106
|
continue e;
|
|
4107
4107
|
}
|
|
@@ -4109,28 +4109,28 @@ const vr = Z(), Dt = Ye(), { ANY: it } = Dt, Se = Ze, Bt = Y, lc = (s, e, t = {}
|
|
|
4109
4109
|
return !1;
|
|
4110
4110
|
}
|
|
4111
4111
|
return !0;
|
|
4112
|
-
},
|
|
4112
|
+
}, hc = [new xt(">=0.0.0-0")], br = [new xt(">=0.0.0")], fc = (s, e, t) => {
|
|
4113
4113
|
if (s === e)
|
|
4114
4114
|
return !0;
|
|
4115
|
-
if (s.length === 1 && s[0].semver ===
|
|
4116
|
-
if (e.length === 1 && e[0].semver ===
|
|
4115
|
+
if (s.length === 1 && s[0].semver === lt) {
|
|
4116
|
+
if (e.length === 1 && e[0].semver === lt)
|
|
4117
4117
|
return !0;
|
|
4118
|
-
t.includePrerelease ? s =
|
|
4118
|
+
t.includePrerelease ? s = hc : s = br;
|
|
4119
4119
|
}
|
|
4120
|
-
if (e.length === 1 && e[0].semver ===
|
|
4120
|
+
if (e.length === 1 && e[0].semver === lt) {
|
|
4121
4121
|
if (t.includePrerelease)
|
|
4122
4122
|
return !0;
|
|
4123
|
-
e =
|
|
4123
|
+
e = br;
|
|
4124
4124
|
}
|
|
4125
4125
|
const r = /* @__PURE__ */ new Set();
|
|
4126
4126
|
let o, n;
|
|
4127
4127
|
for (const h of s)
|
|
4128
|
-
h.operator === ">" || h.operator === ">=" ? o =
|
|
4128
|
+
h.operator === ">" || h.operator === ">=" ? o = Rr(o, h, t) : h.operator === "<" || h.operator === "<=" ? n = Er(n, h, t) : r.add(h.semver);
|
|
4129
4129
|
if (r.size > 1)
|
|
4130
4130
|
return null;
|
|
4131
4131
|
let i;
|
|
4132
4132
|
if (o && n) {
|
|
4133
|
-
if (i =
|
|
4133
|
+
if (i = Vt(o.semver, n.semver, t), i > 0)
|
|
4134
4134
|
return null;
|
|
4135
4135
|
if (i === 0 && (o.operator !== ">=" || n.operator !== "<="))
|
|
4136
4136
|
return null;
|
|
@@ -4148,14 +4148,14 @@ const vr = Z(), Dt = Ye(), { ANY: it } = Dt, Se = Ze, Bt = Y, lc = (s, e, t = {}
|
|
|
4148
4148
|
for (const h of e) {
|
|
4149
4149
|
if (u = u || h.operator === ">" || h.operator === ">=", l = l || h.operator === "<" || h.operator === "<=", o) {
|
|
4150
4150
|
if (m && h.semver.prerelease && h.semver.prerelease.length && h.semver.major === m.major && h.semver.minor === m.minor && h.semver.patch === m.patch && (m = !1), h.operator === ">" || h.operator === ">=") {
|
|
4151
|
-
if (c =
|
|
4151
|
+
if (c = Rr(o, h, t), c === h && c !== o)
|
|
4152
4152
|
return !1;
|
|
4153
4153
|
} else if (o.operator === ">=" && !Se(o.semver, String(h), t))
|
|
4154
4154
|
return !1;
|
|
4155
4155
|
}
|
|
4156
4156
|
if (n) {
|
|
4157
4157
|
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 === "<=") {
|
|
4158
|
-
if (a =
|
|
4158
|
+
if (a = Er(n, h, t), a === h && a !== n)
|
|
4159
4159
|
return !1;
|
|
4160
4160
|
} else if (n.operator === "<=" && !Se(n.semver, String(h), t))
|
|
4161
4161
|
return !1;
|
|
@@ -4164,72 +4164,72 @@ const vr = Z(), Dt = Ye(), { ANY: it } = Dt, Se = Ze, Bt = Y, lc = (s, e, t = {}
|
|
|
4164
4164
|
return !1;
|
|
4165
4165
|
}
|
|
4166
4166
|
return !(o && l && !n && i !== 0 || n && u && !o && i !== 0 || m || d);
|
|
4167
|
-
},
|
|
4167
|
+
}, Rr = (s, e, t) => {
|
|
4168
4168
|
if (!s)
|
|
4169
4169
|
return e;
|
|
4170
|
-
const r =
|
|
4170
|
+
const r = Vt(s.semver, e.semver, t);
|
|
4171
4171
|
return r > 0 ? s : r < 0 || e.operator === ">" && s.operator === ">=" ? e : s;
|
|
4172
|
-
},
|
|
4172
|
+
}, Er = (s, e, t) => {
|
|
4173
4173
|
if (!s)
|
|
4174
4174
|
return e;
|
|
4175
|
-
const r =
|
|
4175
|
+
const r = Vt(s.semver, e.semver, t);
|
|
4176
4176
|
return r < 0 ? s : r > 0 || e.operator === "<" && s.operator === "<=" ? e : s;
|
|
4177
4177
|
};
|
|
4178
|
-
var
|
|
4179
|
-
const
|
|
4180
|
-
var
|
|
4181
|
-
parse:
|
|
4182
|
-
valid:
|
|
4183
|
-
clean:
|
|
4184
|
-
inc:
|
|
4185
|
-
diff:
|
|
4186
|
-
major:
|
|
4187
|
-
minor:
|
|
4188
|
-
patch:
|
|
4189
|
-
prerelease:
|
|
4190
|
-
compare:
|
|
4191
|
-
rcompare:
|
|
4192
|
-
compareLoose:
|
|
4193
|
-
compareBuild:
|
|
4194
|
-
sort:
|
|
4195
|
-
rsort:
|
|
4196
|
-
gt:
|
|
4197
|
-
lt:
|
|
4198
|
-
eq:
|
|
4199
|
-
neq:
|
|
4200
|
-
gte:
|
|
4201
|
-
lte:
|
|
4202
|
-
cmp:
|
|
4203
|
-
coerce:
|
|
4204
|
-
Comparator:
|
|
4205
|
-
Range:
|
|
4206
|
-
satisfies:
|
|
4207
|
-
toComparators:
|
|
4208
|
-
maxSatisfying:
|
|
4209
|
-
minSatisfying:
|
|
4210
|
-
minVersion:
|
|
4211
|
-
validRange:
|
|
4212
|
-
outside:
|
|
4213
|
-
gtr:
|
|
4214
|
-
ltr:
|
|
4215
|
-
intersects:
|
|
4216
|
-
simplifyRange:
|
|
4217
|
-
subset:
|
|
4218
|
-
SemVer:
|
|
4219
|
-
re:
|
|
4220
|
-
src:
|
|
4221
|
-
tokens:
|
|
4222
|
-
SEMVER_SPEC_VERSION:
|
|
4223
|
-
RELEASE_TYPES:
|
|
4224
|
-
compareIdentifiers:
|
|
4225
|
-
rcompareIdentifiers:
|
|
4178
|
+
var gc = pc;
|
|
4179
|
+
const ut = Ne, Cr = Ye, mc = M, kr = ds, vc = ye, yc = Ci, wc = Oi, Sc = Ii, bc = Ti, Rc = Ni, Ec = ji, Cc = Ui, kc = Mi, Pc = Y, Oc = Wi, $c = qi, Ic = Lt, Fc = ea, Tc = sa, Ac = Qe, Lc = Nt, Nc = ps, Dc = hs, Bc = Dt, jc = Bt, xc = fs, Vc = Pa, Uc = et(), Gc = Z(), Jc = tt, Mc = La, _c = ja, Kc = Ga, Hc = _a, Wc = Wa, zc = jt, Xc = sc, qc = ic, Yc = cc, Zc = dc, Qc = gc;
|
|
4180
|
+
var el = {
|
|
4181
|
+
parse: vc,
|
|
4182
|
+
valid: yc,
|
|
4183
|
+
clean: wc,
|
|
4184
|
+
inc: Sc,
|
|
4185
|
+
diff: bc,
|
|
4186
|
+
major: Rc,
|
|
4187
|
+
minor: Ec,
|
|
4188
|
+
patch: Cc,
|
|
4189
|
+
prerelease: kc,
|
|
4190
|
+
compare: Pc,
|
|
4191
|
+
rcompare: Oc,
|
|
4192
|
+
compareLoose: $c,
|
|
4193
|
+
compareBuild: Ic,
|
|
4194
|
+
sort: Fc,
|
|
4195
|
+
rsort: Tc,
|
|
4196
|
+
gt: Ac,
|
|
4197
|
+
lt: Lc,
|
|
4198
|
+
eq: Nc,
|
|
4199
|
+
neq: Dc,
|
|
4200
|
+
gte: Bc,
|
|
4201
|
+
lte: jc,
|
|
4202
|
+
cmp: xc,
|
|
4203
|
+
coerce: Vc,
|
|
4204
|
+
Comparator: Uc,
|
|
4205
|
+
Range: Gc,
|
|
4206
|
+
satisfies: Jc,
|
|
4207
|
+
toComparators: Mc,
|
|
4208
|
+
maxSatisfying: _c,
|
|
4209
|
+
minSatisfying: Kc,
|
|
4210
|
+
minVersion: Hc,
|
|
4211
|
+
validRange: Wc,
|
|
4212
|
+
outside: zc,
|
|
4213
|
+
gtr: Xc,
|
|
4214
|
+
ltr: qc,
|
|
4215
|
+
intersects: Yc,
|
|
4216
|
+
simplifyRange: Zc,
|
|
4217
|
+
subset: Qc,
|
|
4218
|
+
SemVer: mc,
|
|
4219
|
+
re: ut.re,
|
|
4220
|
+
src: ut.src,
|
|
4221
|
+
tokens: ut.t,
|
|
4222
|
+
SEMVER_SPEC_VERSION: Cr.SEMVER_SPEC_VERSION,
|
|
4223
|
+
RELEASE_TYPES: Cr.RELEASE_TYPES,
|
|
4224
|
+
compareIdentifiers: kr.compareIdentifiers,
|
|
4225
|
+
rcompareIdentifiers: kr.rcompareIdentifiers
|
|
4226
4226
|
};
|
|
4227
|
-
const
|
|
4227
|
+
const tl = /* @__PURE__ */ ci(el), rl = {
|
|
4228
4228
|
minDelay: 1500
|
|
4229
|
-
},
|
|
4230
|
-
class
|
|
4229
|
+
}, sl = "__no_updates__";
|
|
4230
|
+
class ol extends Js {
|
|
4231
4231
|
constructor(t, r, o = {}) {
|
|
4232
|
-
super({ ...o, ...
|
|
4232
|
+
super({ ...o, ...rl }, r);
|
|
4233
4233
|
S(this, "http");
|
|
4234
4234
|
S(this, "preferredUpdateChannel");
|
|
4235
4235
|
this.registryProvider = t, this.http = o.http, this.preferredUpdateChannel = o.preferredUpdateChannel;
|
|
@@ -4243,7 +4243,7 @@ class tl extends Vs {
|
|
|
4243
4243
|
case "from-registry-v2":
|
|
4244
4244
|
return `from_registry_v2_${t.registryUrl}_${t.id.organization}_${t.id.name}_${t.id.version}`;
|
|
4245
4245
|
default:
|
|
4246
|
-
return
|
|
4246
|
+
return sl;
|
|
4247
4247
|
}
|
|
4248
4248
|
}
|
|
4249
4249
|
async readValue(t) {
|
|
@@ -4251,7 +4251,7 @@ class tl extends Vs {
|
|
|
4251
4251
|
switch (t.type) {
|
|
4252
4252
|
case "dev-v1":
|
|
4253
4253
|
try {
|
|
4254
|
-
const r = await
|
|
4254
|
+
const r = await Ur(t.folder);
|
|
4255
4255
|
return r === t.mtime ? void 0 : { ...t, mtime: r };
|
|
4256
4256
|
} catch (r) {
|
|
4257
4257
|
this.logger.warn(r);
|
|
@@ -4259,9 +4259,9 @@ class tl extends Vs {
|
|
|
4259
4259
|
}
|
|
4260
4260
|
case "dev-v2":
|
|
4261
4261
|
try {
|
|
4262
|
-
const r = await
|
|
4262
|
+
const r = await pt(t.folder, this.logger);
|
|
4263
4263
|
if (r === void 0) return;
|
|
4264
|
-
const o = await
|
|
4264
|
+
const o = await Pt(r);
|
|
4265
4265
|
return o === t.mtime ? void 0 : { ...t, mtime: o };
|
|
4266
4266
|
} catch (r) {
|
|
4267
4267
|
this.logger.warn(r);
|
|
@@ -4275,9 +4275,9 @@ class tl extends Vs {
|
|
|
4275
4275
|
const n = await r.getLatestOverview(t.id, ne);
|
|
4276
4276
|
if (n) o = n.spec;
|
|
4277
4277
|
else {
|
|
4278
|
-
const i = await r.getLatestOverview(t.id,
|
|
4278
|
+
const i = await r.getLatestOverview(t.id, Ee);
|
|
4279
4279
|
if (i === void 0) {
|
|
4280
|
-
this.logger.error(`No "any" channel record for ${
|
|
4280
|
+
this.logger.error(`No "any" channel record for ${Ut(t.id)}`);
|
|
4281
4281
|
return;
|
|
4282
4282
|
}
|
|
4283
4283
|
o = { ...i.spec, channel: ne };
|
|
@@ -4287,13 +4287,13 @@ class tl extends Vs {
|
|
|
4287
4287
|
if (i) o = i.spec;
|
|
4288
4288
|
else {
|
|
4289
4289
|
this.logger.error(
|
|
4290
|
-
`Can't find update for ${
|
|
4290
|
+
`Can't find update for ${Ut(t.id)} in channel "${n}"`
|
|
4291
4291
|
);
|
|
4292
4292
|
return;
|
|
4293
4293
|
}
|
|
4294
4294
|
}
|
|
4295
4295
|
if (o.type !== "from-registry-v2") throw new Error(`Unexpected spec type ${o}.`);
|
|
4296
|
-
return
|
|
4296
|
+
return tl.compare(o.id.version, t.id.version) <= 0 ? void 0 : ((async () => {
|
|
4297
4297
|
try {
|
|
4298
4298
|
await r.getComponents(o.id);
|
|
4299
4299
|
} catch (n) {
|
|
@@ -4317,9 +4317,9 @@ class tl extends Vs {
|
|
|
4317
4317
|
if (t === void 0 || r === void 0 || t.type !== r.type) return !1;
|
|
4318
4318
|
switch (t.type) {
|
|
4319
4319
|
case "from-registry-v1":
|
|
4320
|
-
return r.type !== "from-registry-v1" ? !1 : t.registryUrl === r.registryUrl &&
|
|
4320
|
+
return r.type !== "from-registry-v1" ? !1 : t.registryUrl === r.registryUrl && Gt(t.id, r.id);
|
|
4321
4321
|
case "from-registry-v2":
|
|
4322
|
-
return r.type !== "from-registry-v2" ? !1 : t.registryUrl === r.registryUrl &&
|
|
4322
|
+
return r.type !== "from-registry-v2" ? !1 : t.registryUrl === r.registryUrl && Gt(t.id, r.id);
|
|
4323
4323
|
case "dev-v1":
|
|
4324
4324
|
return r.type !== "dev-v1" ? !1 : t.folder === r.folder && t.mtime === r.mtime;
|
|
4325
4325
|
case "dev-v2":
|
|
@@ -4329,7 +4329,7 @@ class tl extends Vs {
|
|
|
4329
4329
|
}
|
|
4330
4330
|
}
|
|
4331
4331
|
}
|
|
4332
|
-
class
|
|
4332
|
+
class Pr {
|
|
4333
4333
|
constructor() {
|
|
4334
4334
|
S(this, "resources", /* @__PURE__ */ new Map());
|
|
4335
4335
|
}
|
|
@@ -4364,11 +4364,17 @@ class Er {
|
|
|
4364
4364
|
return (t = this.resources.get(e)) == null ? void 0 : t.resource;
|
|
4365
4365
|
}
|
|
4366
4366
|
}
|
|
4367
|
-
|
|
4367
|
+
let be;
|
|
4368
|
+
function ke() {
|
|
4369
|
+
return be || (be = {
|
|
4370
|
+
logPFrameRequests: process.env.MI_LOG_PFRAMES !== void 0
|
|
4371
|
+
}, process.env.MI_LOG_TREE_STAT && (be.logTreeStats = process.env.MI_LOG_TREE_STAT === "cumulative" ? "cumulative" : "per-request"), be);
|
|
4372
|
+
}
|
|
4373
|
+
function Or(s) {
|
|
4368
4374
|
return String(s.id);
|
|
4369
4375
|
}
|
|
4370
|
-
const
|
|
4371
|
-
function
|
|
4376
|
+
const nl = ["Int", "Long", "Float", "Double", "String", "Bytes"];
|
|
4377
|
+
function dt(s) {
|
|
4372
4378
|
const e = [], t = [];
|
|
4373
4379
|
for (const r of s)
|
|
4374
4380
|
r.type === "bySingleColumn" ? (e.push(r), t.push({
|
|
@@ -4377,13 +4383,16 @@ function ct(s) {
|
|
|
4377
4383
|
})) : t.push(r);
|
|
4378
4384
|
if (e.length > 0) {
|
|
4379
4385
|
const r = JSON.stringify(e);
|
|
4380
|
-
console.warn(
|
|
4386
|
+
console.warn(
|
|
4387
|
+
`type overriten from 'bySingleColumn' to 'bySingleColumnV2' for filters: ${r}`
|
|
4388
|
+
);
|
|
4381
4389
|
}
|
|
4382
4390
|
return s;
|
|
4383
4391
|
}
|
|
4384
|
-
|
|
4392
|
+
const Je = (s, e) => typeof e == "bigint" ? e.toString() : e;
|
|
4393
|
+
class il {
|
|
4385
4394
|
constructor(e, t, r) {
|
|
4386
|
-
S(this, "pFrame", new
|
|
4395
|
+
S(this, "pFrame", new oo());
|
|
4387
4396
|
S(this, "blobIdToResource", /* @__PURE__ */ new Map());
|
|
4388
4397
|
S(this, "blobHandleComputables", /* @__PURE__ */ new Map());
|
|
4389
4398
|
S(this, "preloadBlob", async (e) => {
|
|
@@ -4405,8 +4414,8 @@ class sl {
|
|
|
4405
4414
|
});
|
|
4406
4415
|
this.blobDriver = e, this.blobContentCache = t, this.columns = r, this.pFrame.setDataSource(this);
|
|
4407
4416
|
for (const o of r) {
|
|
4408
|
-
for (const i of
|
|
4409
|
-
const n =
|
|
4417
|
+
for (const i of on(o.data)) this.blobIdToResource.set(Or(i), i);
|
|
4418
|
+
const n = nn(o.data, Or);
|
|
4410
4419
|
try {
|
|
4411
4420
|
this.pFrame.addColumnSpec(o.id, o.spec), this.pFrame.setColumnData(o.id, n);
|
|
4412
4421
|
} catch (i) {
|
|
@@ -4428,45 +4437,47 @@ class sl {
|
|
|
4428
4437
|
this.pFrame.dispose();
|
|
4429
4438
|
}
|
|
4430
4439
|
}
|
|
4431
|
-
class
|
|
4432
|
-
constructor(e) {
|
|
4440
|
+
class al {
|
|
4441
|
+
constructor(e, t) {
|
|
4433
4442
|
S(this, "pFrames");
|
|
4434
4443
|
S(this, "pTables");
|
|
4435
4444
|
S(this, "blobContentCache");
|
|
4436
4445
|
/** Limits concurrent requests to PFrame API to prevent deadlock with Node's IO threads */
|
|
4437
4446
|
S(this, "concurrencyLimiter");
|
|
4438
|
-
this.blobDriver = e;
|
|
4439
|
-
const
|
|
4447
|
+
this.blobDriver = e, this.logger = t;
|
|
4448
|
+
const r = new no({
|
|
4440
4449
|
maxSize: 1e9,
|
|
4441
4450
|
// 1Gb
|
|
4442
|
-
fetchMethod: async (
|
|
4443
|
-
sizeCalculation: (
|
|
4444
|
-
}),
|
|
4445
|
-
this.blobContentCache =
|
|
4446
|
-
constructor(
|
|
4447
|
-
super(), this.blobDriver =
|
|
4451
|
+
fetchMethod: async (n) => await Nr.readFile(n),
|
|
4452
|
+
sizeCalculation: (n) => n.length
|
|
4453
|
+
}), o = new Fs(1);
|
|
4454
|
+
this.blobContentCache = r, this.concurrencyLimiter = o, this.pFrames = new class extends Pr {
|
|
4455
|
+
constructor(n) {
|
|
4456
|
+
super(), this.blobDriver = n;
|
|
4448
4457
|
}
|
|
4449
|
-
createNewResource(
|
|
4450
|
-
return
|
|
4458
|
+
createNewResource(n) {
|
|
4459
|
+
return ke().logPFrameRequests && t.info(
|
|
4460
|
+
`Create PFrame (${this.calculateParamsKey(n)}): ${JSON.stringify(n, Je)}`
|
|
4461
|
+
), new il(this.blobDriver, r, n);
|
|
4451
4462
|
}
|
|
4452
|
-
calculateParamsKey(
|
|
4453
|
-
return
|
|
4463
|
+
calculateParamsKey(n) {
|
|
4464
|
+
return ll(n);
|
|
4454
4465
|
}
|
|
4455
|
-
}(this.blobDriver), this.pTables = new class extends
|
|
4456
|
-
constructor(
|
|
4457
|
-
super(), this.pFrames =
|
|
4466
|
+
}(this.blobDriver), this.pTables = new class extends Pr {
|
|
4467
|
+
constructor(n) {
|
|
4468
|
+
super(), this.pFrames = n;
|
|
4458
4469
|
}
|
|
4459
|
-
async createNewResource(
|
|
4460
|
-
const
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
);
|
|
4466
|
-
return
|
|
4470
|
+
async createNewResource(n) {
|
|
4471
|
+
const i = this.pFrames.getByKey(n.pFrameHandle), c = await o.run(async () => (ke().logPFrameRequests && t.info(
|
|
4472
|
+
`Create PTable (${this.calculateParamsKey(n)}): ${JSON.stringify(n, Je)}`
|
|
4473
|
+
), await i.pFrame.createTable({
|
|
4474
|
+
src: $e(n.def.src),
|
|
4475
|
+
filters: dt(n.def.filters)
|
|
4476
|
+
})));
|
|
4477
|
+
return n.def.sorting.length !== 0 ? c.sort(n.def.sorting) : c;
|
|
4467
4478
|
}
|
|
4468
|
-
calculateParamsKey(
|
|
4469
|
-
return
|
|
4479
|
+
calculateParamsKey(n) {
|
|
4480
|
+
return cl(n);
|
|
4470
4481
|
}
|
|
4471
4482
|
}(this.pFrames);
|
|
4472
4483
|
}
|
|
@@ -4474,14 +4485,16 @@ class ol {
|
|
|
4474
4485
|
// Internal / Config API Methods
|
|
4475
4486
|
//
|
|
4476
4487
|
createPFrame(e, t) {
|
|
4477
|
-
const r = e.filter((n) =>
|
|
4478
|
-
n
|
|
4479
|
-
|
|
4480
|
-
|
|
4488
|
+
const r = e.filter((n) => nl.find((i) => i === n.spec.valueType)).map(
|
|
4489
|
+
(n) => le(
|
|
4490
|
+
n,
|
|
4491
|
+
(i) => Gs(i) ? pn(i) : hn(n.spec, i)
|
|
4492
|
+
)
|
|
4493
|
+
), o = this.pFrames.acquire(r);
|
|
4481
4494
|
return t.addOnDestroy(o.unref), o.key;
|
|
4482
4495
|
}
|
|
4483
4496
|
createPTable(e, t) {
|
|
4484
|
-
const r = this.createPFrame(
|
|
4497
|
+
const r = this.createPFrame(Es(e.src), t), o = Fr(e, (i) => i.id), n = this.pTables.acquire({ def: o, pFrameHandle: r });
|
|
4485
4498
|
return t.addOnDestroy(n.unref), n.key;
|
|
4486
4499
|
}
|
|
4487
4500
|
//
|
|
@@ -4509,12 +4522,12 @@ class ol {
|
|
|
4509
4522
|
);
|
|
4510
4523
|
}
|
|
4511
4524
|
async calculateTableData(e, t) {
|
|
4512
|
-
let r = await this.concurrencyLimiter.run(
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
);
|
|
4525
|
+
let r = await this.concurrencyLimiter.run(async () => (ke().logPFrameRequests && this.logger.info(
|
|
4526
|
+
`calculateTableData, handle = ${e}, request = ${JSON.stringify(t, Je)}`
|
|
4527
|
+
), await this.pFrames.getByKey(e).pFrame.createTable({
|
|
4528
|
+
src: $e(t.src),
|
|
4529
|
+
filters: dt(t.filters)
|
|
4530
|
+
})));
|
|
4518
4531
|
if (t.sorting.length > 0) {
|
|
4519
4532
|
const i = await this.concurrencyLimiter.run(
|
|
4520
4533
|
async () => await r.sort(t.sorting)
|
|
@@ -4530,12 +4543,12 @@ class ol {
|
|
|
4530
4543
|
}));
|
|
4531
4544
|
}
|
|
4532
4545
|
async getUniqueValues(e, t) {
|
|
4533
|
-
return await this.concurrencyLimiter.run(
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
|
|
4538
|
-
);
|
|
4546
|
+
return await this.concurrencyLimiter.run(async () => (ke().logPFrameRequests && this.logger.info(
|
|
4547
|
+
`getUniqueValues, handle = ${e}, request = ${JSON.stringify(t, Je)}`
|
|
4548
|
+
), await this.pFrames.getByKey(e).pFrame.getUniqueValues({
|
|
4549
|
+
...t,
|
|
4550
|
+
filters: dt(t.filters)
|
|
4551
|
+
})));
|
|
4539
4552
|
}
|
|
4540
4553
|
//
|
|
4541
4554
|
// PTable istance methods
|
|
@@ -4553,7 +4566,7 @@ class ol {
|
|
|
4553
4566
|
);
|
|
4554
4567
|
}
|
|
4555
4568
|
}
|
|
4556
|
-
function
|
|
4569
|
+
function $e(s) {
|
|
4557
4570
|
switch (s.type) {
|
|
4558
4571
|
case "column":
|
|
4559
4572
|
return {
|
|
@@ -4565,23 +4578,23 @@ function Pe(s) {
|
|
|
4565
4578
|
case "full":
|
|
4566
4579
|
return {
|
|
4567
4580
|
type: s.type,
|
|
4568
|
-
entries: s.entries.map((e) =>
|
|
4581
|
+
entries: s.entries.map((e) => $e(e))
|
|
4569
4582
|
};
|
|
4570
4583
|
case "outer":
|
|
4571
4584
|
return {
|
|
4572
4585
|
type: "outer",
|
|
4573
|
-
primary:
|
|
4574
|
-
secondary: s.secondary.map((e) =>
|
|
4586
|
+
primary: $e(s.primary),
|
|
4587
|
+
secondary: s.secondary.map((e) => $e(e))
|
|
4575
4588
|
};
|
|
4576
4589
|
default:
|
|
4577
4590
|
G(s);
|
|
4578
4591
|
}
|
|
4579
4592
|
}
|
|
4580
|
-
function
|
|
4581
|
-
const e =
|
|
4593
|
+
function cl(s) {
|
|
4594
|
+
const e = Le("sha256");
|
|
4582
4595
|
return e.update(ve(s.def)), e.digest().toString("hex");
|
|
4583
4596
|
}
|
|
4584
|
-
function
|
|
4597
|
+
function ll(s) {
|
|
4585
4598
|
const e = [...s].map((r) => le(r, (o) => {
|
|
4586
4599
|
let n;
|
|
4587
4600
|
const i = o.type;
|
|
@@ -4622,35 +4635,35 @@ function il(s) {
|
|
|
4622
4635
|
return n.payload.sort((c, a) => c.key.localeCompare(a.key)), n;
|
|
4623
4636
|
}));
|
|
4624
4637
|
e.sort((r, o) => r.id.localeCompare(o.id));
|
|
4625
|
-
const t =
|
|
4638
|
+
const t = Le("sha256");
|
|
4626
4639
|
return t.update(ve(e)), t.digest().toString("hex");
|
|
4627
4640
|
}
|
|
4628
|
-
async function
|
|
4641
|
+
async function ul(s, e, t) {
|
|
4629
4642
|
const r = {
|
|
4630
|
-
...
|
|
4631
|
-
...
|
|
4643
|
+
...as,
|
|
4644
|
+
...cs(e),
|
|
4632
4645
|
...t
|
|
4633
|
-
}, o = new
|
|
4646
|
+
}, o = new Lr(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 Zs(
|
|
4634
4647
|
r.logger,
|
|
4635
4648
|
n,
|
|
4636
4649
|
i,
|
|
4637
4650
|
r.blobDownloadPath,
|
|
4638
4651
|
o,
|
|
4639
4652
|
r.blobDriverOps
|
|
4640
|
-
), u = new
|
|
4653
|
+
), u = new Qs(
|
|
4641
4654
|
r.logger,
|
|
4642
4655
|
o,
|
|
4643
4656
|
c,
|
|
4644
4657
|
a,
|
|
4645
4658
|
r.uploadDriverOps
|
|
4646
|
-
), d = new
|
|
4659
|
+
), d = new eo(r.logger, i, r.logStreamDriverOps), m = new to(r.logger, d, l), h = await ro.init(
|
|
4647
4660
|
r.logger,
|
|
4648
4661
|
s,
|
|
4649
4662
|
o,
|
|
4650
4663
|
r.localProjections,
|
|
4651
4664
|
r.openFileDialogCallback,
|
|
4652
4665
|
r.virtualLocalStoragesOverride
|
|
4653
|
-
), f = new
|
|
4666
|
+
), f = new al(l, r.logger);
|
|
4654
4667
|
return {
|
|
4655
4668
|
blobDriver: l,
|
|
4656
4669
|
logDriver: m,
|
|
@@ -4660,7 +4673,7 @@ async function al(s, e, t) {
|
|
|
4660
4673
|
pFrameDriver: f
|
|
4661
4674
|
};
|
|
4662
4675
|
}
|
|
4663
|
-
class
|
|
4676
|
+
class ms {
|
|
4664
4677
|
constructor(e, t, r, o, n, i, c, a) {
|
|
4665
4678
|
S(this, "pl");
|
|
4666
4679
|
/** Contains a reactive list of projects along with their meta information. */
|
|
@@ -4679,10 +4692,10 @@ class hs {
|
|
|
4679
4692
|
// Project List Manipulation
|
|
4680
4693
|
//
|
|
4681
4694
|
/** Creates a project with initial state and adds it to project list. */
|
|
4682
|
-
async createProject(e, t =
|
|
4695
|
+
async createProject(e, t = Ie()) {
|
|
4683
4696
|
const r = await this.pl.withWriteTx("MLCreateProject", async (o) => {
|
|
4684
|
-
const n = await
|
|
4685
|
-
return o.createField(j(this.projectListResourceId, t), "Dynamic", n), await o.commit(), await
|
|
4697
|
+
const n = await sn(o, e);
|
|
4698
|
+
return o.createField(j(this.projectListResourceId, t), "Dynamic", n), await o.commit(), await xs(n);
|
|
4686
4699
|
});
|
|
4687
4700
|
return await this.projectListTree.refreshState(), r;
|
|
4688
4701
|
}
|
|
@@ -4702,7 +4715,7 @@ class hs {
|
|
|
4702
4715
|
async projectIdToResourceId(e) {
|
|
4703
4716
|
return await this.pl.withReadTx("Project id to resource id", async (t) => {
|
|
4704
4717
|
const r = (await t.getField(j(this.projectListResourceId, e))).value;
|
|
4705
|
-
if (
|
|
4718
|
+
if (_e(r)) throw new Error("Unexpected project list structure.");
|
|
4706
4719
|
return r;
|
|
4707
4720
|
});
|
|
4708
4721
|
}
|
|
@@ -4713,7 +4726,7 @@ class hs {
|
|
|
4713
4726
|
async openProject(e) {
|
|
4714
4727
|
const t = await this.ensureProjectRid(e);
|
|
4715
4728
|
if (this.openedProjectsByRid.has(t)) throw new Error(`Project ${t} already opened`);
|
|
4716
|
-
this.openedProjectsByRid.set(t, await
|
|
4729
|
+
this.openedProjectsByRid.set(t, await Tt.init(this.env, t)), this.openedProjectsList.setValue([...this.openedProjectsByRid.keys()]);
|
|
4717
4730
|
}
|
|
4718
4731
|
/** Closes the project, and deallocate all corresponding resources. */
|
|
4719
4732
|
async closeProject(e) {
|
|
@@ -4741,33 +4754,33 @@ class hs {
|
|
|
4741
4754
|
/** Generates sufficiently random string to be used as local secret for the
|
|
4742
4755
|
* middle layer */
|
|
4743
4756
|
static generateLocalSecret() {
|
|
4744
|
-
return
|
|
4757
|
+
return Lr.generateSecret();
|
|
4745
4758
|
}
|
|
4746
4759
|
/** Initialize middle layer */
|
|
4747
4760
|
static async init(e, t, r) {
|
|
4748
4761
|
const o = {
|
|
4749
|
-
...
|
|
4750
|
-
...
|
|
4762
|
+
...ii,
|
|
4763
|
+
...ai(t),
|
|
4751
4764
|
...r
|
|
4752
4765
|
};
|
|
4753
|
-
|
|
4766
|
+
o.defaultTreeOptions.logStat = ke().logTreeStats;
|
|
4754
4767
|
const n = await e.withWriteTx("MLInitialization", async (I) => {
|
|
4755
|
-
const F = j(I.clientRoot,
|
|
4768
|
+
const F = j(I.clientRoot, Oo);
|
|
4756
4769
|
I.createField(F, "Dynamic");
|
|
4757
4770
|
const D = await I.getField(F);
|
|
4758
|
-
if (
|
|
4759
|
-
const _ = I.createEphemeral(
|
|
4771
|
+
if (_e(D.value)) {
|
|
4772
|
+
const _ = I.createEphemeral(Mr);
|
|
4760
4773
|
return I.lock(_), I.setField(F, _), await I.commit(), await _.globalId;
|
|
4761
4774
|
} else
|
|
4762
4775
|
return D.value;
|
|
4763
|
-
}), i = o.logger, c = await
|
|
4776
|
+
}), i = o.logger, c = await ul(e, t, o), a = new Cs(e.httpDispatcher, {
|
|
4764
4777
|
minTimeout: 250,
|
|
4765
4778
|
maxRetries: 4
|
|
4766
|
-
}), l = new
|
|
4779
|
+
}), l = new go(a), u = new qo(
|
|
4767
4780
|
l,
|
|
4768
4781
|
c.signer,
|
|
4769
4782
|
a
|
|
4770
|
-
), d = new
|
|
4783
|
+
), d = new so(
|
|
4771
4784
|
i,
|
|
4772
4785
|
e.httpDispatcher,
|
|
4773
4786
|
o.frontendDownloadPath
|
|
@@ -4781,14 +4794,14 @@ class hs {
|
|
|
4781
4794
|
bpPreparer: u,
|
|
4782
4795
|
frontendDownloadDriver: d,
|
|
4783
4796
|
driverKit: c,
|
|
4784
|
-
blockUpdateWatcher: new
|
|
4797
|
+
blockUpdateWatcher: new ol(l, i, {
|
|
4785
4798
|
minDelay: o.devBlockUpdateRecheckInterval,
|
|
4786
4799
|
http: a,
|
|
4787
4800
|
preferredUpdateChannel: o.preferredUpdateChannel
|
|
4788
4801
|
}),
|
|
4789
|
-
quickJs: await
|
|
4790
|
-
}, h = new
|
|
4791
|
-
return new
|
|
4802
|
+
quickJs: await Ws()
|
|
4803
|
+
}, h = new Ms([]), f = await Io(e, n, h, m);
|
|
4804
|
+
return new ms(
|
|
4792
4805
|
m,
|
|
4793
4806
|
c,
|
|
4794
4807
|
c.signer,
|
|
@@ -4800,7 +4813,7 @@ class hs {
|
|
|
4800
4813
|
);
|
|
4801
4814
|
}
|
|
4802
4815
|
}
|
|
4803
|
-
const
|
|
4816
|
+
const dl = [
|
|
4804
4817
|
"undici:request:create",
|
|
4805
4818
|
// When a new request is created
|
|
4806
4819
|
"undici:request:bodySent",
|
|
@@ -4838,7 +4851,7 @@ const cl = [
|
|
|
4838
4851
|
"undici:dispatcher:retry"
|
|
4839
4852
|
// When a dispatcher retries a request
|
|
4840
4853
|
];
|
|
4841
|
-
async function
|
|
4854
|
+
async function Wl(s, e = {}) {
|
|
4842
4855
|
const t = {
|
|
4843
4856
|
pingCheckDurationMs: 1e4,
|
|
4844
4857
|
pingTimeoutMs: 3e3,
|
|
@@ -4856,8 +4869,8 @@ async function _l(s, e = {}) {
|
|
|
4856
4869
|
bodyLimit: 300,
|
|
4857
4870
|
...e
|
|
4858
4871
|
}, r = [];
|
|
4859
|
-
|
|
4860
|
-
|
|
4872
|
+
dl.forEach((a) => {
|
|
4873
|
+
io(a).subscribe((u) => {
|
|
4861
4874
|
var m;
|
|
4862
4875
|
const d = (/* @__PURE__ */ new Date()).toISOString();
|
|
4863
4876
|
(m = u == null ? void 0 : u.response) != null && m.headers && (u.response.headers = u.response.headers.map((h) => h.toString())), r.push(
|
|
@@ -4876,55 +4889,55 @@ async function _l(s, e = {}) {
|
|
|
4876
4889
|
blockRegistryUiChecks: [],
|
|
4877
4890
|
blockGARegistryUiChecks: [],
|
|
4878
4891
|
autoUpdateCdnChecks: []
|
|
4879
|
-
}, n =
|
|
4892
|
+
}, n = Vs(s, { defaultRequestTimeout: t.pingTimeoutMs });
|
|
4880
4893
|
o.plPings = await ge(t.pingCheckDurationMs, t.maxPingsPerSecond, async () => {
|
|
4881
|
-
const l = await new
|
|
4894
|
+
const l = await new _t(n).ping();
|
|
4882
4895
|
return JSON.stringify(l).slice(0, t.bodyLimit) + "...";
|
|
4883
4896
|
});
|
|
4884
|
-
const c = new
|
|
4897
|
+
const c = new _t(n).ll.httpDispatcher;
|
|
4885
4898
|
return o.blockRegistryOverviewChecks = await ge(
|
|
4886
4899
|
t.blockRegistryDurationMs,
|
|
4887
4900
|
t.maxRegistryChecksPerSecond,
|
|
4888
|
-
async () => await
|
|
4901
|
+
async () => await Re(new URL(t.blockOverviewPath, t.blockRegistryUrl), t, c)
|
|
4889
4902
|
), o.blockGARegistryOverviewChecks = await ge(
|
|
4890
4903
|
t.blockRegistryDurationMs,
|
|
4891
4904
|
t.maxRegistryChecksPerSecond,
|
|
4892
|
-
async () => await
|
|
4905
|
+
async () => await Re(new URL(t.blockOverviewPath, t.blockGARegistryUrl), t, c)
|
|
4893
4906
|
), o.blockRegistryUiChecks = await ge(
|
|
4894
4907
|
t.blockRegistryDurationMs,
|
|
4895
4908
|
t.maxRegistryChecksPerSecond,
|
|
4896
|
-
async () => await
|
|
4909
|
+
async () => await Re(new URL(t.blockUiPath, t.blockRegistryUrl), t, c)
|
|
4897
4910
|
), o.blockGARegistryUiChecks = await ge(
|
|
4898
4911
|
t.blockRegistryDurationMs,
|
|
4899
4912
|
t.maxRegistryChecksPerSecond,
|
|
4900
|
-
async () => await
|
|
4913
|
+
async () => await Re(new URL(t.blockUiPath, t.blockGARegistryUrl), t, c)
|
|
4901
4914
|
), o.autoUpdateCdnChecks = await ge(
|
|
4902
4915
|
t.autoUpdateCdnDurationMs,
|
|
4903
4916
|
t.maxAutoUpdateCdnChecksPerSecond,
|
|
4904
|
-
async () => await
|
|
4905
|
-
),
|
|
4917
|
+
async () => await Re(t.autoUpdateCdnUrl, t, c)
|
|
4918
|
+
), pl(o, s, t, r);
|
|
4906
4919
|
}
|
|
4907
4920
|
async function ge(s, e, t) {
|
|
4908
|
-
const r =
|
|
4909
|
-
for (;
|
|
4910
|
-
const n =
|
|
4921
|
+
const r = Et(), o = [];
|
|
4922
|
+
for (; $r(r) < s; ) {
|
|
4923
|
+
const n = Et();
|
|
4911
4924
|
let i;
|
|
4912
4925
|
try {
|
|
4913
4926
|
i = { ok: !0, value: await t() };
|
|
4914
4927
|
} catch (l) {
|
|
4915
4928
|
i = { ok: !1, error: l };
|
|
4916
4929
|
}
|
|
4917
|
-
const c =
|
|
4930
|
+
const c = $r(n);
|
|
4918
4931
|
o.push({
|
|
4919
4932
|
elapsedMs: c,
|
|
4920
4933
|
response: i
|
|
4921
4934
|
});
|
|
4922
4935
|
const a = 1e3 / e - c;
|
|
4923
|
-
a > 0 && await
|
|
4936
|
+
a > 0 && await xr(a);
|
|
4924
4937
|
}
|
|
4925
4938
|
return o;
|
|
4926
4939
|
}
|
|
4927
|
-
async function
|
|
4940
|
+
async function Re(s, e, t) {
|
|
4928
4941
|
const { body: r, statusCode: o } = await ie(s, {
|
|
4929
4942
|
dispatcher: t,
|
|
4930
4943
|
headersTimeout: e.httpTimeoutMs,
|
|
@@ -4935,7 +4948,7 @@ async function be(s, e, t) {
|
|
|
4935
4948
|
beginningOfBody: n.slice(0, e.bodyLimit) + "..."
|
|
4936
4949
|
};
|
|
4937
4950
|
}
|
|
4938
|
-
function
|
|
4951
|
+
function pl(s, e, t, r) {
|
|
4939
4952
|
const o = s.plPings.filter((c) => c.response.ok), n = s.plPings.filter((c) => !c.response.ok), i = [
|
|
4940
4953
|
...new Set(o.map((c) => JSON.stringify(c.response.value)))
|
|
4941
4954
|
];
|
|
@@ -4983,7 +4996,7 @@ ${r.join(`
|
|
|
4983
4996
|
`;
|
|
4984
4997
|
}
|
|
4985
4998
|
function me(s) {
|
|
4986
|
-
const e = s.filter((o) => o.response.ok), { mean: t, median: r } =
|
|
4999
|
+
const e = s.filter((o) => o.response.ok), { mean: t, median: r } = hl(s);
|
|
4987
5000
|
return `
|
|
4988
5001
|
total: ${s.length};
|
|
4989
5002
|
successes: ${e.length};
|
|
@@ -4992,7 +5005,7 @@ mean in ms: ${t};
|
|
|
4992
5005
|
median in ms: ${r};
|
|
4993
5006
|
`;
|
|
4994
5007
|
}
|
|
4995
|
-
function
|
|
5008
|
+
function hl(s) {
|
|
4996
5009
|
const e = s.map((o) => o.elapsedMs), t = e.reduce((o, n) => o + n) / e.length;
|
|
4997
5010
|
let r;
|
|
4998
5011
|
if (e.length > 0) {
|
|
@@ -5001,40 +5014,40 @@ function ul(s) {
|
|
|
5001
5014
|
}
|
|
5002
5015
|
return { mean: t, median: r };
|
|
5003
5016
|
}
|
|
5004
|
-
function
|
|
5017
|
+
function Et() {
|
|
5005
5018
|
return Date.now();
|
|
5006
5019
|
}
|
|
5007
|
-
function
|
|
5008
|
-
return
|
|
5020
|
+
function $r(s) {
|
|
5021
|
+
return Et() - s;
|
|
5009
5022
|
}
|
|
5010
5023
|
export {
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5024
|
+
Vl as BlockPackRegistry,
|
|
5025
|
+
Ul as CentralBlockRegistry,
|
|
5026
|
+
cs as DefaultDriverKitOpsPaths,
|
|
5027
|
+
as as DefaultDriverKitOpsSettings,
|
|
5028
|
+
ai as DefaultMiddleLayerOpsPaths,
|
|
5029
|
+
ii as DefaultMiddleLayerOpsSettings,
|
|
5030
|
+
zr as FrontendFromFolderResourceType,
|
|
5031
|
+
Wr as FrontendFromUrlResourceType,
|
|
5032
|
+
ms as MiddleLayer,
|
|
5033
|
+
Tt as Project,
|
|
5034
|
+
Jo as TengoTemplateGet,
|
|
5035
|
+
Mo as TengoTemplateGetRegistry,
|
|
5036
|
+
Ko as TengoTemplateGetTemplate,
|
|
5037
|
+
_o as TengoTemplateGetTemplateURI,
|
|
5038
|
+
Ml as TengoTemplatePack,
|
|
5039
|
+
_l as TengoTemplatePackConvert,
|
|
5040
|
+
Hl as TengoTemplatePackConvertTemplate,
|
|
5041
|
+
Kl as TengoTemplatePackConvertTemplatePack,
|
|
5042
|
+
Jl as V1CentralDevSnapshotRegistry,
|
|
5043
|
+
Gl as V1CentralRegistry,
|
|
5044
|
+
go as V2RegistryProvider,
|
|
5045
|
+
Wl as checkNetwork,
|
|
5046
|
+
_r as createRenderTemplate,
|
|
5047
|
+
Ur as getDevV1PacketMtime,
|
|
5048
|
+
Pt as getDevV2PacketMtime,
|
|
5049
|
+
ul as initDriverKit,
|
|
5050
|
+
$t as loadTemplate,
|
|
5051
|
+
Ho as prepareTemplateSpec
|
|
5039
5052
|
};
|
|
5040
5053
|
//# sourceMappingURL=index.mjs.map
|