@milaboratories/pl-middle-layer 1.40.10 → 1.40.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +593 -578
- package/dist/index.mjs.map +1 -1
- package/dist/js_render/context.d.ts.map +1 -1
- package/dist/pool/driver.d.ts.map +1 -1
- package/dist/pool/ref_count_pool.d.ts +1 -0
- package/dist/pool/ref_count_pool.d.ts.map +1 -1
- package/package.json +14 -14
- package/src/js_render/context.ts +4 -3
- package/src/pool/driver.ts +53 -33
- package/src/pool/ref_count_pool.ts +8 -8
package/dist/index.mjs
CHANGED
|
@@ -32,41 +32,41 @@ var Hr = (s, e, t) => {
|
|
|
32
32
|
};
|
|
33
33
|
return i();
|
|
34
34
|
};
|
|
35
|
-
import { extractConfig as Ce, UiError as zr, mapValueInVOE as gn, executePSpecPredicate as fo, mapPObjectData as
|
|
35
|
+
import { extractConfig as Ce, UiError as zr, mapValueInVOE as gn, executePSpecPredicate as fo, mapPObjectData as ve, mapPTableDef as wr, isDataInfo as mn, mapDataInfo as vn, checkBlockFlag as ho, JsRenderInternal as go, isConfigLambda as yn, extractCodeWithInfo as ft, DefaultNavigationState as mo, PFrameDriverError as fe, isPFrameDriverError as vo, ensureError as it, extractAllColumns as yo, isAbortError as wo, RuntimeCapabilities as So } from "@platforma-sdk/model";
|
|
36
36
|
export * from "@platforma-sdk/model";
|
|
37
37
|
import { StableChannel as Ne, AnyChannel as Be, InitialBlockSettings as Xr, blockPackIdToString as bo } from "@milaboratories/pl-model-middle-layer";
|
|
38
38
|
export * from "@milaboratories/pl-model-middle-layer";
|
|
39
39
|
export * from "@milaboratories/pl-deployments";
|
|
40
40
|
import { request as Fr, RetryAgent as ko } from "undici";
|
|
41
|
-
import { RegistryV1 as ye, tryLoadPackDescription as Sr, BlockPackMetaEmbedAbsoluteBytes as Ro, RegistryV2Reader as Co, folderReaderByUrl as
|
|
41
|
+
import { RegistryV1 as ye, tryLoadPackDescription as Sr, BlockPackMetaEmbedAbsoluteBytes as Ro, RegistryV2Reader as Co, folderReaderByUrl as Po, loadPackDescription as Yr } from "@platforma-sdk/block-tools";
|
|
42
42
|
import ne from "node:fs";
|
|
43
|
-
import * as
|
|
43
|
+
import * as Eo from "node:path";
|
|
44
44
|
import _ from "node:path";
|
|
45
45
|
import Oo from "yaml";
|
|
46
|
-
import { assertNever as Y, notEmpty as N, canonicalJsonBytes as Fo, canonicalJsonGzBytes as To, cachedDeserialize as Ue, cachedDecode as kt, deepFreeze as Qr, ConsoleLoggerAdapter as wn, ConcurrencyLimitingExecutor as Zr, emptyDir as
|
|
46
|
+
import { assertNever as Y, notEmpty as N, canonicalJsonBytes as Fo, canonicalJsonGzBytes as To, cachedDeserialize as Ue, cachedDecode as kt, deepFreeze as Qr, ConsoleLoggerAdapter as wn, isDisposable as Io, isAsyncDisposable as $o, ConcurrencyLimitingExecutor as Zr, emptyDir as Ao, HmacSha256Signer as Tr, BlockEventDispatcher as Lo } from "@milaboratories/ts-helpers";
|
|
47
47
|
import * as Sn from "node:fs/promises";
|
|
48
48
|
import at from "node:fs/promises";
|
|
49
|
-
import { tryResolve as
|
|
50
|
-
import { resourceTypesEqual as pe, field as J, Pl as D, PlClient as bn, isResourceId as es, isNullResourceId as Me, isResource as
|
|
49
|
+
import { tryResolve as Do } from "@milaboratories/resolve-helper";
|
|
50
|
+
import { resourceTypesEqual as pe, field as J, Pl as D, PlClient as bn, isResourceId as es, isNullResourceId as Me, isResource as No, isResourceRef as Bo, isNotNullResourceId as br, ensureResourceIdNotNull as ct, resourceType as We, resourceTypeToString as jo, stringifyWithResourceId as Ye, resourceIdToString as Ee, isNotFoundError as xo, isTimeoutOrCancelError as Vo, toGlobalResourceId as Uo, UnauthenticatedPlClient as kn, toGlobalFieldId as Mo, poll as Jo, ContinuePolling as Go, plAddressToConfig as _o } from "@milaboratories/pl-client";
|
|
51
51
|
export * from "@milaboratories/pl-client";
|
|
52
|
-
import { SynchronizedTreeState as Rn, treeDumpStats as
|
|
53
|
-
import { Computable as K, ChangeSource as ts, PollComputablePool as
|
|
54
|
-
import { randomUUID as
|
|
55
|
-
import { PlTemplateV1 as X, PlTemplateOverrideV1 as
|
|
52
|
+
import { SynchronizedTreeState as Rn, treeDumpStats as qo, isPlTreeNodeAccessor as Ko } from "@milaboratories/pl-tree";
|
|
53
|
+
import { Computable as K, ChangeSource as ts, PollComputablePool as Ho, WatchableValue as Wo } from "@milaboratories/computable";
|
|
54
|
+
import { randomUUID as ge, createHash as Fe, randomBytes as zo } from "node:crypto";
|
|
55
|
+
import { PlTemplateV1 as X, PlTemplateOverrideV1 as Pe, PlTemplateLibV1 as he, PlTemplateSoftwareV1 as le, parseTemplate as Xo } from "@milaboratories/pl-model-backend";
|
|
56
56
|
import { LRUCache as lt } from "lru-cache";
|
|
57
|
-
import { Worker as
|
|
57
|
+
import { Worker as Yo } from "node:worker_threads";
|
|
58
58
|
import Cn from "denque";
|
|
59
59
|
import { Templates as we } from "@platforma-sdk/workflow-tengo";
|
|
60
60
|
import te from "canonicalize";
|
|
61
|
-
import
|
|
62
|
-
import { Scope as Je, errors as
|
|
63
|
-
import { PlQuickJSError as
|
|
61
|
+
import Qo from "node:assert";
|
|
62
|
+
import { Scope as Je, errors as Zo, getQuickJS as ei } from "quickjs-emscripten";
|
|
63
|
+
import { PlQuickJSError as ti } from "@milaboratories/pl-errors";
|
|
64
64
|
import * as rs from "remeda";
|
|
65
|
-
import { setTimeout as
|
|
66
|
-
import { createDownloadClient as
|
|
65
|
+
import { setTimeout as Pn } from "node:timers/promises";
|
|
66
|
+
import { createDownloadClient as En, createLogsClient as ri, createUploadBlobClient as On, createUploadProgressClient as si, DownloadDriver as ni, DownloadBlobToURLDriver as oi, UploadDriver as ii, LogsStreamDriver as ai, LogsDriver as ci, LsDriver as Fn, DownloadUrlDriver as li, uploadBlob as Tn, ImportFileHandleUploadData as In, isUpload as ui, isSignMatch as di } from "@milaboratories/pl-drivers";
|
|
67
67
|
import { PFrame as $n } from "@milaboratories/pframes-rs-node";
|
|
68
|
-
import { channel as
|
|
69
|
-
import { text as
|
|
68
|
+
import { channel as pi } from "node:diagnostics_channel";
|
|
69
|
+
import { text as fi } from "node:stream/consumers";
|
|
70
70
|
import An from "node:os";
|
|
71
71
|
async function ss(s) {
|
|
72
72
|
try {
|
|
@@ -77,34 +77,34 @@ async function ss(s) {
|
|
|
77
77
|
throw e;
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
const
|
|
80
|
+
const hi = [ye.PlPackageYamlConfigFile], gi = [ye.PlPackageJsonConfigFile], Ir = ["backend", "dist", "tengo", "tpl", "main.plj.gz"], $r = ["config", "dist", "config.json"], Ln = ["frontend", "dist"], ns = "block-model/dist/config.json", mi = "block-ui/package.json", vi = [
|
|
81
81
|
Ir,
|
|
82
82
|
$r,
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
hi,
|
|
84
|
+
gi,
|
|
85
85
|
Ln
|
|
86
86
|
];
|
|
87
|
-
async function
|
|
87
|
+
async function yi(s) {
|
|
88
88
|
return await ss(_.join(s, ...$r)) !== void 0 || await ss(_.join(s, ...Ir)) !== void 0;
|
|
89
89
|
}
|
|
90
90
|
function Rt(s, e) {
|
|
91
|
-
const t =
|
|
91
|
+
const t = Do(s, e);
|
|
92
92
|
if (t === void 0) throw new Error(`Can't resolve ${e} against ${s}`);
|
|
93
93
|
return t;
|
|
94
94
|
}
|
|
95
95
|
async function os(s, e) {
|
|
96
|
-
if (_.isAbsolute(s) || (s = _.resolve(s)), await
|
|
96
|
+
if (_.isAbsolute(s) || (s = _.resolve(s)), await yi(s))
|
|
97
97
|
return {
|
|
98
98
|
workflow: _.join(s, ...Ir),
|
|
99
99
|
config: _.join(s, ...$r),
|
|
100
100
|
ui: _.join(s, ...Ln)
|
|
101
101
|
};
|
|
102
102
|
{
|
|
103
|
-
const t = Rt(s, ns), r = Rt(s, ns), n = Rt(s,
|
|
103
|
+
const t = Rt(s, ns), r = Rt(s, ns), n = Rt(s, mi);
|
|
104
104
|
return { workflow: t, config: r, ui: _.resolve(n, "..", "dist") };
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
async function
|
|
107
|
+
async function wi(s) {
|
|
108
108
|
try {
|
|
109
109
|
return await ne.promises.readFile(s, "utf8");
|
|
110
110
|
} catch (e) {
|
|
@@ -113,7 +113,7 @@ async function vi(s) {
|
|
|
113
113
|
throw e;
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
async function
|
|
116
|
+
async function Si(s) {
|
|
117
117
|
try {
|
|
118
118
|
return await ne.promises.stat(s, { bigint: !0 });
|
|
119
119
|
} catch (e) {
|
|
@@ -124,8 +124,8 @@ async function yi(s) {
|
|
|
124
124
|
}
|
|
125
125
|
async function Dn(s) {
|
|
126
126
|
let e = 0n;
|
|
127
|
-
for (const t of
|
|
128
|
-
const r = _.join(s, ...t), n = await
|
|
127
|
+
for (const t of vi) {
|
|
128
|
+
const r = _.join(s, ...t), n = await Si(r);
|
|
129
129
|
n !== void 0 && e < n.mtimeNs && (e = n.mtimeNs);
|
|
130
130
|
}
|
|
131
131
|
return e.toString();
|
|
@@ -136,7 +136,7 @@ async function Ar(s) {
|
|
|
136
136
|
}), t = await ne.promises.stat(s.components.model.file, { bigint: !0 });
|
|
137
137
|
return (e.mtimeNs > t.mtimeNs ? e.mtimeNs : t.mtimeNs).toString();
|
|
138
138
|
}
|
|
139
|
-
class
|
|
139
|
+
class au {
|
|
140
140
|
constructor(e, t, r) {
|
|
141
141
|
this.v2Provider = e, this.registries = t, this.http = r;
|
|
142
142
|
}
|
|
@@ -204,7 +204,7 @@ class ou {
|
|
|
204
204
|
case "local-dev":
|
|
205
205
|
for (const n of await ne.promises.readdir(r.path, { withFileTypes: !0 })) {
|
|
206
206
|
if (!n.isDirectory()) continue;
|
|
207
|
-
const i = _.join(r.path, n.name), o = await
|
|
207
|
+
const i = _.join(r.path, n.name), o = await wi(
|
|
208
208
|
_.join(i, ye.PlPackageYamlConfigFile)
|
|
209
209
|
);
|
|
210
210
|
if (o !== void 0) {
|
|
@@ -288,7 +288,7 @@ class ou {
|
|
|
288
288
|
return await this.v2Provider.getRegistry(n.url).getSpecificOverview(t, r);
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
|
-
class
|
|
291
|
+
class bi {
|
|
292
292
|
constructor(e) {
|
|
293
293
|
S(this, "registries", /* @__PURE__ */ new Map());
|
|
294
294
|
this.http = e;
|
|
@@ -296,33 +296,33 @@ class wi {
|
|
|
296
296
|
getRegistry(e) {
|
|
297
297
|
const t = this.registries.get(e);
|
|
298
298
|
if (t) return t;
|
|
299
|
-
const r = new Co(
|
|
299
|
+
const r = new Co(Po(e, this.http));
|
|
300
300
|
return this.registries.set(e, r), r;
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
|
-
const
|
|
303
|
+
const cu = {
|
|
304
304
|
type: "remote-v2",
|
|
305
305
|
url: "https://blocks.pl-open.science/"
|
|
306
|
-
},
|
|
306
|
+
}, lu = {
|
|
307
307
|
type: "remote-v1",
|
|
308
308
|
url: "https://block.registry.platforma.bio/releases"
|
|
309
|
-
},
|
|
309
|
+
}, uu = {
|
|
310
310
|
type: "remote-v1",
|
|
311
311
|
url: "https://block.registry.platforma.bio/dev"
|
|
312
|
-
},
|
|
312
|
+
}, ki = {
|
|
313
313
|
groups: [{ id: "default", label: "Default", blocks: [] }]
|
|
314
|
-
},
|
|
314
|
+
}, Ri = {
|
|
315
315
|
stagingRefreshTimestamp: 0,
|
|
316
316
|
blocksInLimbo: []
|
|
317
|
-
},
|
|
317
|
+
}, Ci = {
|
|
318
318
|
label: "New Project"
|
|
319
|
-
},
|
|
319
|
+
}, Pi = { name: "UserProject", version: "2" }, ut = "SchemaVersion", Ge = "2", Lr = "ProjectCreated", _e = "ProjectLastModified", qe = "ProjectMeta", de = "ProjectStructure", dt = "BlockRenderingState", Ei = "BlockArgsAuthor/";
|
|
320
320
|
function kr(s) {
|
|
321
|
-
return `${
|
|
321
|
+
return `${Ei}${s}`;
|
|
322
322
|
}
|
|
323
|
-
const Rr = "ProjectStructureAuthor",
|
|
323
|
+
const Rr = "ProjectStructureAuthor", Oi = "__serviceTemplate_";
|
|
324
324
|
function Cr(s) {
|
|
325
|
-
return `${
|
|
325
|
+
return `${Oi}${s}`;
|
|
326
326
|
}
|
|
327
327
|
const Ct = /* @__PURE__ */ new Set([
|
|
328
328
|
"blockPack",
|
|
@@ -337,21 +337,21 @@ const Ct = /* @__PURE__ */ new Set([
|
|
|
337
337
|
function q(s, e) {
|
|
338
338
|
return `${s}-${e}`;
|
|
339
339
|
}
|
|
340
|
-
const
|
|
341
|
-
function
|
|
342
|
-
const e = s.match(
|
|
340
|
+
const Fi = /^(?<blockId>.*)-(?<fieldName>blockPack|blockSettings|uiState|prodArgs|currentArgs|prodCtx|prodUiCtx|prodOutput|prodCtxPrevious|prodUiCtxPrevious|prodOutputPrevious|stagingCtx|stagingUiCtx|stagingOutput|stagingCtxPrevious|stagingUiCtxPrevious|stagingOutputPrevious)$/;
|
|
341
|
+
function Ti(s) {
|
|
342
|
+
const e = s.match(Fi);
|
|
343
343
|
if (e === null) return;
|
|
344
344
|
const { blockId: t, fieldName: r } = e.groups;
|
|
345
345
|
return { blockId: t, fieldName: r };
|
|
346
346
|
}
|
|
347
|
-
const
|
|
348
|
-
async function
|
|
347
|
+
const Ii = "projects", Nn = { name: "Projects", version: "1" }, $i = (s) => pe(s.type, Nn) ? s.fields : [];
|
|
348
|
+
async function Ai(s, e, t, r) {
|
|
349
349
|
const n = await Rn.init(
|
|
350
350
|
s,
|
|
351
351
|
e,
|
|
352
352
|
{
|
|
353
353
|
...r.ops.defaultTreeOptions,
|
|
354
|
-
pruning:
|
|
354
|
+
pruning: $i
|
|
355
355
|
},
|
|
356
356
|
r.logger
|
|
357
357
|
);
|
|
@@ -375,33 +375,33 @@ async function Ii(s, e, t, r) {
|
|
|
375
375
|
return l.sort((u) => -u.lastModified.valueOf()), l;
|
|
376
376
|
}).withStableType(), tree: n };
|
|
377
377
|
}
|
|
378
|
-
const
|
|
378
|
+
const Li = {
|
|
379
379
|
name: "EphRenderTemplate",
|
|
380
380
|
version: "1"
|
|
381
|
-
},
|
|
381
|
+
}, Di = {
|
|
382
382
|
name: "RenderTemplate",
|
|
383
383
|
version: "1"
|
|
384
384
|
};
|
|
385
385
|
function Dr(s, e, t, r, n) {
|
|
386
386
|
if (n.length === 0) throw new Error("Zero output names provided");
|
|
387
|
-
const i = t ? s.createEphemeral(
|
|
387
|
+
const i = t ? s.createEphemeral(Li) : s.createStruct(Di), o = J(i, "template"), a = J(i, "inputs");
|
|
388
388
|
return s.createField(o, "Input", e), s.createField(a, "Input", D.createPlMap(s, r, t)), s.lockInputs(i), D.futureRecord(s, i, n, "Output", "outputs/");
|
|
389
389
|
}
|
|
390
|
-
const
|
|
390
|
+
const Ni = { name: "BContextEnd", version: "1" }, Bi = { name: "BContext", version: "1" }, ji = "id", xi = "parent/", Vi = ["context", "result"];
|
|
391
391
|
function is(s, e, t) {
|
|
392
|
-
return Dr(s, e, !0, t,
|
|
392
|
+
return Dr(s, e, !0, t, Vi);
|
|
393
393
|
}
|
|
394
|
-
function
|
|
395
|
-
const e = s.createEphemeral(
|
|
394
|
+
function Ui(s) {
|
|
395
|
+
const e = s.createEphemeral(Ni);
|
|
396
396
|
return s.lock(e), e;
|
|
397
397
|
}
|
|
398
398
|
function as(s, e) {
|
|
399
|
-
if (e.length === 0) return
|
|
399
|
+
if (e.length === 0) return Ui(s);
|
|
400
400
|
if (e.length === 1) return e[0];
|
|
401
|
-
const t = s.createEphemeral(
|
|
402
|
-
s.createField(J(t,
|
|
401
|
+
const t = s.createEphemeral(Bi);
|
|
402
|
+
s.createField(J(t, ji), "Input", D.createPlString(s, ge()));
|
|
403
403
|
for (let r = 0; r < e.length; r++)
|
|
404
|
-
s.createField(J(t, `${
|
|
404
|
+
s.createField(J(t, `${xi}${r}`), "Input", e[r]);
|
|
405
405
|
return s.lock(t), t;
|
|
406
406
|
}
|
|
407
407
|
function Bn(s, e) {
|
|
@@ -419,12 +419,12 @@ function Bn(s, e) {
|
|
|
419
419
|
}
|
|
420
420
|
const cs = {
|
|
421
421
|
updateCacheKey(s, e, t) {
|
|
422
|
-
e.update(
|
|
422
|
+
e.update(he.type.name).update(he.type.version).update(s.name).update(s.version).update(Oe(s.name, t, s.sourceHash));
|
|
423
423
|
},
|
|
424
424
|
render(s, e, t, r) {
|
|
425
425
|
return e.createValue(
|
|
426
|
-
|
|
427
|
-
JSON.stringify(
|
|
426
|
+
he.type,
|
|
427
|
+
JSON.stringify(he.fromV3Data(s, Oe(s.name, r, s.sourceHash)).data)
|
|
428
428
|
);
|
|
429
429
|
}
|
|
430
430
|
}, Qe = {
|
|
@@ -471,9 +471,9 @@ const cs = {
|
|
|
471
471
|
}
|
|
472
472
|
if (e.lock(n), !s.hashOverride) return n;
|
|
473
473
|
const i = e.createStruct(
|
|
474
|
-
|
|
475
|
-
JSON.stringify(
|
|
476
|
-
), o =
|
|
474
|
+
Pe.type,
|
|
475
|
+
JSON.stringify(Pe.fromV3Data(s))
|
|
476
|
+
), o = Pe.tplField(i);
|
|
477
477
|
return e.createField(o, "Service"), e.setField(o, n), e.lock(i), i;
|
|
478
478
|
}
|
|
479
479
|
};
|
|
@@ -483,8 +483,8 @@ function Oe(s, e, t) {
|
|
|
483
483
|
`trying to get "${s}" source: sources map doesn't contain source hash ${t}`
|
|
484
484
|
);
|
|
485
485
|
}
|
|
486
|
-
function
|
|
487
|
-
const t =
|
|
486
|
+
function Mi(s, e) {
|
|
487
|
+
const t = Xo(e.content), r = t.type;
|
|
488
488
|
switch (r) {
|
|
489
489
|
case "pl.tengo-template.v2":
|
|
490
490
|
return Vn(s, t);
|
|
@@ -494,7 +494,7 @@ function Vi(s, e) {
|
|
|
494
494
|
Y(r);
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
|
-
function
|
|
497
|
+
function Ji(s, e) {
|
|
498
498
|
const t = e.data, r = t.type;
|
|
499
499
|
switch (r) {
|
|
500
500
|
case "pl.tengo-template.v2":
|
|
@@ -507,12 +507,12 @@ function Ui(s, e) {
|
|
|
507
507
|
}
|
|
508
508
|
const ls = {
|
|
509
509
|
hash(s, e) {
|
|
510
|
-
e.update(
|
|
510
|
+
e.update(he.type.name).update(he.type.version).update(s.name).update(s.version).update(s.src);
|
|
511
511
|
},
|
|
512
512
|
render(s, e, t) {
|
|
513
513
|
return e.createValue(
|
|
514
|
-
|
|
515
|
-
JSON.stringify(
|
|
514
|
+
he.type,
|
|
515
|
+
JSON.stringify(he.fromV2Data(s).data)
|
|
516
516
|
);
|
|
517
517
|
}
|
|
518
518
|
}, Ze = {
|
|
@@ -559,9 +559,9 @@ const ls = {
|
|
|
559
559
|
}
|
|
560
560
|
if (e.lock(r), !s.hashOverride) return r;
|
|
561
561
|
const n = e.createStruct(
|
|
562
|
-
|
|
563
|
-
JSON.stringify(
|
|
564
|
-
), i =
|
|
562
|
+
Pe.type,
|
|
563
|
+
JSON.stringify(Pe.fromV2Data(s))
|
|
564
|
+
), i = Pe.tplField(n);
|
|
565
565
|
return e.createField(i, "Service"), e.setField(i, r), e.lock(n), n;
|
|
566
566
|
}
|
|
567
567
|
};
|
|
@@ -578,10 +578,10 @@ function Vn(s, e) {
|
|
|
578
578
|
};
|
|
579
579
|
return r(e, xn);
|
|
580
580
|
}
|
|
581
|
-
const
|
|
581
|
+
const Gi = { name: "TengoTemplateGet", version: "1" }, _i = "registry", qi = "templateURI", Ki = "template", du = { name: "TengoTemplatePack", version: "1" }, pu = {
|
|
582
582
|
name: "TengoTemplatePackConvert",
|
|
583
583
|
version: "1"
|
|
584
|
-
},
|
|
584
|
+
}, fu = "templatePack", hu = "template";
|
|
585
585
|
async function Un(s) {
|
|
586
586
|
switch (s.type) {
|
|
587
587
|
case "from-file":
|
|
@@ -598,18 +598,18 @@ async function Un(s) {
|
|
|
598
598
|
return Y(s);
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
|
-
function
|
|
602
|
-
const t = s.createStruct(
|
|
601
|
+
function Hi(s, e) {
|
|
602
|
+
const t = s.createStruct(Gi), r = J(t, _i), n = J(t, qi), i = J(t, Ki);
|
|
603
603
|
return s.setField(r, s.createValue(D.JsonString, Buffer.from(JSON.stringify(e.registry)))), s.setField(n, s.createValue(D.JsonString, Buffer.from(JSON.stringify(e.path)))), i;
|
|
604
604
|
}
|
|
605
605
|
function ht(s, e) {
|
|
606
606
|
switch (e.type) {
|
|
607
607
|
case "from-registry":
|
|
608
|
-
return
|
|
608
|
+
return Hi(s, e);
|
|
609
609
|
case "explicit":
|
|
610
|
-
return
|
|
610
|
+
return Mi(s, e);
|
|
611
611
|
case "prepared":
|
|
612
|
-
return
|
|
612
|
+
return Ji(s, e);
|
|
613
613
|
default:
|
|
614
614
|
return Y(e);
|
|
615
615
|
}
|
|
@@ -618,7 +618,7 @@ const Mn = { name: "Frontend/FromUrl", version: "1" }, Jn = {
|
|
|
618
618
|
name: "Frontend/FromFolder",
|
|
619
619
|
version: "1"
|
|
620
620
|
};
|
|
621
|
-
function
|
|
621
|
+
function Wi(s, e) {
|
|
622
622
|
switch (e.type) {
|
|
623
623
|
case "url":
|
|
624
624
|
return s.createValue(
|
|
@@ -637,12 +637,12 @@ function Ki(s, e) {
|
|
|
637
637
|
return Y(e);
|
|
638
638
|
}
|
|
639
639
|
}
|
|
640
|
-
class
|
|
640
|
+
class zi {
|
|
641
641
|
constructor() {
|
|
642
642
|
S(this, "nextMessageId", 0);
|
|
643
643
|
S(this, "worker");
|
|
644
644
|
S(this, "pendingRequests", /* @__PURE__ */ new Map());
|
|
645
|
-
const e = typeof global < "u" && "__WORKER_PATH__" in global ? global.__WORKER_PATH__ : _.resolve(import.meta.dirname, "worker.js"), t = this.worker = new
|
|
645
|
+
const e = typeof global < "u" && "__WORKER_PATH__" in global ? global.__WORKER_PATH__ : _.resolve(import.meta.dirname, "worker.js"), t = this.worker = new Yo(
|
|
646
646
|
e,
|
|
647
647
|
{
|
|
648
648
|
workerData: {}
|
|
@@ -673,17 +673,17 @@ class Hi {
|
|
|
673
673
|
return this.terminate();
|
|
674
674
|
}
|
|
675
675
|
}
|
|
676
|
-
const
|
|
676
|
+
const Xi = { name: "BlockPackCustom", version: "1" }, Gn = "template", _n = "frontend";
|
|
677
677
|
function us(s) {
|
|
678
678
|
return s.endsWith("/") ? s : `${s}/`;
|
|
679
679
|
}
|
|
680
|
-
function
|
|
680
|
+
function Yi(s) {
|
|
681
681
|
return Buffer.from(s).toString("utf8");
|
|
682
682
|
}
|
|
683
683
|
function et(s) {
|
|
684
|
-
return JSON.parse(
|
|
684
|
+
return JSON.parse(Yi(s));
|
|
685
685
|
}
|
|
686
|
-
class
|
|
686
|
+
class Qi {
|
|
687
687
|
constructor(e, t, r) {
|
|
688
688
|
S(this, "remoteContentCache", new lt({
|
|
689
689
|
max: 500,
|
|
@@ -730,7 +730,7 @@ class Xi {
|
|
|
730
730
|
if (e.type === "prepared")
|
|
731
731
|
return e;
|
|
732
732
|
const t = await this.prepareWithoutUnpacking(e);
|
|
733
|
-
const r = Hr(n, new
|
|
733
|
+
const r = Hr(n, new zi(), !0);
|
|
734
734
|
return {
|
|
735
735
|
...t,
|
|
736
736
|
type: "prepared",
|
|
@@ -829,14 +829,14 @@ class Xi {
|
|
|
829
829
|
}
|
|
830
830
|
}
|
|
831
831
|
}
|
|
832
|
-
function
|
|
833
|
-
const t = { config: e.config, source: e.source }, r = s.createStruct(
|
|
834
|
-
return s.createField(J(r, Gn), "Input", ht(s, e.template)), s.createField(J(r, _n), "Input",
|
|
832
|
+
function Zi(s, e) {
|
|
833
|
+
const t = { config: e.config, source: e.source }, r = s.createStruct(Xi, JSON.stringify(t));
|
|
834
|
+
return s.createField(J(r, Gn), "Input", ht(s, e.template)), s.createField(J(r, _n), "Input", Wi(s, e.frontend)), s.lock(r), r;
|
|
835
835
|
}
|
|
836
836
|
function ds(s, e) {
|
|
837
837
|
switch (e.type) {
|
|
838
838
|
case "prepared":
|
|
839
|
-
return
|
|
839
|
+
return Zi(s, e);
|
|
840
840
|
default:
|
|
841
841
|
return Y(e.type);
|
|
842
842
|
}
|
|
@@ -844,10 +844,10 @@ function ds(s, e) {
|
|
|
844
844
|
function tt(s, e, t) {
|
|
845
845
|
return { __isRef: !0, blockId: s, name: e };
|
|
846
846
|
}
|
|
847
|
-
function
|
|
847
|
+
function ea(s) {
|
|
848
848
|
return typeof s == "object" && s !== null && "__isRef" in s && s.__isRef === !0 && "blockId" in s && "name" in s;
|
|
849
849
|
}
|
|
850
|
-
function
|
|
850
|
+
function Pr(s, e, t) {
|
|
851
851
|
const r = typeof e;
|
|
852
852
|
switch (r) {
|
|
853
853
|
case "function":
|
|
@@ -860,21 +860,21 @@ function Er(s, e, t) {
|
|
|
860
860
|
return;
|
|
861
861
|
case "object":
|
|
862
862
|
if (e === null) return;
|
|
863
|
-
if (
|
|
863
|
+
if (ea(e))
|
|
864
864
|
t === void 0 || t.has(e.blockId) ? (s.upstreams.add(e.blockId), e.requireEnrichments && s.upstreamsRequiringEnrichments.add(e.blockId)) : s.missingReferences = !0;
|
|
865
865
|
else if (Array.isArray(e))
|
|
866
|
-
for (const n of e)
|
|
866
|
+
for (const n of e) Pr(s, n, t);
|
|
867
867
|
else
|
|
868
868
|
for (const [, n] of Object.entries(e))
|
|
869
|
-
|
|
869
|
+
Pr(s, n, t);
|
|
870
870
|
return;
|
|
871
871
|
default:
|
|
872
872
|
Y(r);
|
|
873
873
|
}
|
|
874
874
|
}
|
|
875
|
-
function
|
|
875
|
+
function ta(s, e) {
|
|
876
876
|
const t = { upstreams: /* @__PURE__ */ new Set(), upstreamsRequiringEnrichments: /* @__PURE__ */ new Set(), missingReferences: !1 };
|
|
877
|
-
return
|
|
877
|
+
return Pr(t, s, e), t;
|
|
878
878
|
}
|
|
879
879
|
function re(s) {
|
|
880
880
|
return {
|
|
@@ -913,7 +913,7 @@ class qn {
|
|
|
913
913
|
}
|
|
914
914
|
}
|
|
915
915
|
}
|
|
916
|
-
function
|
|
916
|
+
function Er(s) {
|
|
917
917
|
const e = /* @__PURE__ */ new Map();
|
|
918
918
|
let t;
|
|
919
919
|
for (const { id: r } of re(s)) {
|
|
@@ -925,12 +925,12 @@ function Pr(s) {
|
|
|
925
925
|
}
|
|
926
926
|
return t !== void 0 && (t.directDownstream = t.downstream = /* @__PURE__ */ new Set()), new qn(e);
|
|
927
927
|
}
|
|
928
|
-
function
|
|
928
|
+
function nt(s, e) {
|
|
929
929
|
const t = /* @__PURE__ */ new Map(), r = new qn(t), n = /* @__PURE__ */ new Set();
|
|
930
930
|
for (const { id: i } of re(s)) {
|
|
931
931
|
const o = e(i);
|
|
932
932
|
if (o === void 0) continue;
|
|
933
|
-
const a =
|
|
933
|
+
const a = ta(o.args, n), c = /* @__PURE__ */ new Set([
|
|
934
934
|
...a.upstreams,
|
|
935
935
|
...r.traverseIds("enrichments", ...a.upstreamsRequiringEnrichments)
|
|
936
936
|
]), l = /* @__PURE__ */ new Set();
|
|
@@ -962,7 +962,7 @@ function ot(s, e) {
|
|
|
962
962
|
}
|
|
963
963
|
return r;
|
|
964
964
|
}
|
|
965
|
-
function
|
|
965
|
+
function ra(s, e) {
|
|
966
966
|
if (s.size !== e.size) return !1;
|
|
967
967
|
for (const t of s) if (!e.has(t)) return !1;
|
|
968
968
|
return !0;
|
|
@@ -976,22 +976,22 @@ function ps(s, e) {
|
|
|
976
976
|
const t = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
|
|
977
977
|
return s.nodes.forEach((i) => {
|
|
978
978
|
const o = e.nodes.get(i.id);
|
|
979
|
-
o === void 0 ? t.add(i.id) : (!
|
|
979
|
+
o === void 0 ? t.add(i.id) : (!ra(i.upstream, o.upstream) || Or(i.upstream, n)) && n.add(i.id);
|
|
980
980
|
}), e.nodes.forEach((i) => {
|
|
981
981
|
s.nodes.has(i.id) ? Or(i.upstream, n) && n.add(i.id) : r.add(i.id);
|
|
982
982
|
}), { onlyInA: t, onlyInB: r, different: n };
|
|
983
983
|
}
|
|
984
|
-
let
|
|
984
|
+
let Pt;
|
|
985
985
|
async function Kn() {
|
|
986
|
-
if (
|
|
986
|
+
if (Pt === void 0) {
|
|
987
987
|
const s = await Un(we["pframes.export-pframe-for-ui"]);
|
|
988
988
|
if (s.type !== "explicit") throw new Error("Unexpected prepared template type.");
|
|
989
989
|
const e = Fe("sha256").update(s.content).digest("hex");
|
|
990
|
-
|
|
990
|
+
Pt = { spec: s, hash: e };
|
|
991
991
|
}
|
|
992
|
-
return
|
|
992
|
+
return Pt;
|
|
993
993
|
}
|
|
994
|
-
function
|
|
994
|
+
function sa(s, e, t) {
|
|
995
995
|
return Dr(s, e, !0, { pf: t }, ["result"]).result;
|
|
996
996
|
}
|
|
997
997
|
let be;
|
|
@@ -1003,7 +1003,7 @@ function Q() {
|
|
|
1003
1003
|
logOutputRecalculations: process.env.MI_LOG_OUTPUT_RECALCULATIONS !== void 0
|
|
1004
1004
|
}, process.env.MI_LOG_OUTPUT_STATUS && (be.logOutputStatus = process.env.MI_LOG_OUTPUT_STATUS === "unstable-only" ? "unstable-only" : "any"), process.env.MI_LOG_TREE_STAT && (be.logTreeStats = process.env.MI_LOG_TREE_STAT === "cumulative" ? "cumulative" : "per-request"), be);
|
|
1005
1005
|
}
|
|
1006
|
-
function
|
|
1006
|
+
function Et(s, e) {
|
|
1007
1007
|
let t = !1, r, n;
|
|
1008
1008
|
return () => {
|
|
1009
1009
|
if (!t)
|
|
@@ -1014,11 +1014,11 @@ function Pt(s, e) {
|
|
|
1014
1014
|
}
|
|
1015
1015
|
class Ot {
|
|
1016
1016
|
constructor(e, t, r, n) {
|
|
1017
|
-
S(this, "currentArgsC",
|
|
1017
|
+
S(this, "currentArgsC", Et(
|
|
1018
1018
|
() => this.fields.currentArgs.modCount,
|
|
1019
1019
|
() => Ue(this.fields.currentArgs.value)
|
|
1020
1020
|
));
|
|
1021
|
-
S(this, "prodArgsC",
|
|
1021
|
+
S(this, "prodArgsC", Et(
|
|
1022
1022
|
() => {
|
|
1023
1023
|
var e;
|
|
1024
1024
|
return (e = this.fields.prodArgs) == null ? void 0 : e.modCount;
|
|
@@ -1030,7 +1030,7 @@ class Ot {
|
|
|
1030
1030
|
return Ue(e);
|
|
1031
1031
|
}
|
|
1032
1032
|
));
|
|
1033
|
-
S(this, "productionStaleC",
|
|
1033
|
+
S(this, "productionStaleC", Et(
|
|
1034
1034
|
() => {
|
|
1035
1035
|
var e;
|
|
1036
1036
|
return `${this.fields.currentArgs.modCount}_${(e = this.fields.prodArgs) == null ? void 0 : e.modCount}`;
|
|
@@ -1081,7 +1081,7 @@ class Ot {
|
|
|
1081
1081
|
);
|
|
1082
1082
|
}
|
|
1083
1083
|
}
|
|
1084
|
-
const
|
|
1084
|
+
const na = (s) => {
|
|
1085
1085
|
throw new Error(`No new block info for ${s}`);
|
|
1086
1086
|
};
|
|
1087
1087
|
class pt {
|
|
@@ -1121,7 +1121,7 @@ class pt {
|
|
|
1121
1121
|
return JSON.parse(JSON.stringify(this.struct));
|
|
1122
1122
|
}
|
|
1123
1123
|
getStagingGraph() {
|
|
1124
|
-
return this.stagingGraph === void 0 && (this.stagingGraph =
|
|
1124
|
+
return this.stagingGraph === void 0 && (this.stagingGraph = Er(this.struct)), this.stagingGraph;
|
|
1125
1125
|
}
|
|
1126
1126
|
getProductionGraphBlockInfo(e, t) {
|
|
1127
1127
|
const r = this.getBlockInfo(e);
|
|
@@ -1145,13 +1145,13 @@ class pt {
|
|
|
1145
1145
|
};
|
|
1146
1146
|
}
|
|
1147
1147
|
getPendingProductionGraph() {
|
|
1148
|
-
return this.pendingProductionGraph === void 0 && (this.pendingProductionGraph =
|
|
1148
|
+
return this.pendingProductionGraph === void 0 && (this.pendingProductionGraph = nt(
|
|
1149
1149
|
this.struct,
|
|
1150
1150
|
(e) => this.getProductionGraphBlockInfo(e, !1)
|
|
1151
1151
|
)), this.pendingProductionGraph;
|
|
1152
1152
|
}
|
|
1153
1153
|
getActualProductionGraph() {
|
|
1154
|
-
return this.actualProductionGraph === void 0 && (this.actualProductionGraph =
|
|
1154
|
+
return this.actualProductionGraph === void 0 && (this.actualProductionGraph = nt(
|
|
1155
1155
|
this.struct,
|
|
1156
1156
|
(e) => this.getProductionGraphBlockInfo(e, !0)
|
|
1157
1157
|
)), this.actualProductionGraph;
|
|
@@ -1286,7 +1286,7 @@ class pt {
|
|
|
1286
1286
|
}), as(this.tx, t);
|
|
1287
1287
|
}
|
|
1288
1288
|
exportCtx(e) {
|
|
1289
|
-
return
|
|
1289
|
+
return sa(this.tx, D.unwrapHolder(this.tx, this.ctxExportTplHolder), e);
|
|
1290
1290
|
}
|
|
1291
1291
|
renderStagingFor(e) {
|
|
1292
1292
|
this.resetStaging(e);
|
|
@@ -1371,8 +1371,8 @@ class pt {
|
|
|
1371
1371
|
this.resetOrLimboProduction(e), r.check();
|
|
1372
1372
|
}
|
|
1373
1373
|
/** Very generic method, better check for more specialized case-specific methods first. */
|
|
1374
|
-
updateStructure(e, t =
|
|
1375
|
-
const r = this.getStagingGraph(), n = this.getActualProductionGraph(), i =
|
|
1374
|
+
updateStructure(e, t = na) {
|
|
1375
|
+
const r = this.getStagingGraph(), n = this.getActualProductionGraph(), i = Er(e), o = ps(r, i);
|
|
1376
1376
|
for (const l of o.onlyInA) {
|
|
1377
1377
|
const { fields: u } = this.getBlockInfo(l);
|
|
1378
1378
|
this.deleteBlockFields(l, ...Object.keys(u)), this.blockInfos.delete(l), this.blocksInLimbo.delete(l) && (this.renderingStateChanged = !0);
|
|
@@ -1380,7 +1380,7 @@ class pt {
|
|
|
1380
1380
|
for (const l of o.onlyInB)
|
|
1381
1381
|
t(l);
|
|
1382
1382
|
for (const l of o.different) this.resetStaging(l);
|
|
1383
|
-
const a =
|
|
1383
|
+
const a = nt(
|
|
1384
1384
|
e,
|
|
1385
1385
|
(l) => this.getProductionGraphBlockInfo(l, !0)
|
|
1386
1386
|
), c = ps(n, a);
|
|
@@ -1589,7 +1589,7 @@ class pt {
|
|
|
1589
1589
|
static async load(e, t, r, n) {
|
|
1590
1590
|
const i = t.getResourceData(r, !0), o = t.getKValueJson(r, ut), a = t.getKValueJson(r, _e), c = t.getKValueJson(r, qe), l = t.getKValueJson(r, de), u = t.getKValueJson(r, dt), d = await i, p = /* @__PURE__ */ new Map();
|
|
1591
1591
|
for (const g of d.fields) {
|
|
1592
|
-
const m =
|
|
1592
|
+
const m = Ti(g.name);
|
|
1593
1593
|
if (m === void 0) continue;
|
|
1594
1594
|
let w = p.get(m.blockId);
|
|
1595
1595
|
w === void 0 && (w = {
|
|
@@ -1602,7 +1602,7 @@ class pt {
|
|
|
1602
1602
|
const m = g.fields;
|
|
1603
1603
|
for (const [w, y] of Object.entries(m)) {
|
|
1604
1604
|
if (y.ref === void 0) continue;
|
|
1605
|
-
if (!
|
|
1605
|
+
if (!No(y.ref) || Bo(y.ref))
|
|
1606
1606
|
throw new Error("unexpected behaviour");
|
|
1607
1607
|
const R = w;
|
|
1608
1608
|
f.push([
|
|
@@ -1617,7 +1617,7 @@ class pt {
|
|
|
1617
1617
|
v,
|
|
1618
1618
|
h,
|
|
1619
1619
|
b,
|
|
1620
|
-
|
|
1620
|
+
P,
|
|
1621
1621
|
{ stagingRefreshTimestamp: B, blocksInLimbo: F }
|
|
1622
1622
|
] = await Promise.all([
|
|
1623
1623
|
o,
|
|
@@ -1642,8 +1642,8 @@ class pt {
|
|
|
1642
1642
|
const w = await m, y = Ue(N(w.data));
|
|
1643
1643
|
g.blockConfig = Ce(y.config), g.blockPack = y.source;
|
|
1644
1644
|
}
|
|
1645
|
-
const V = await Kn(),
|
|
1646
|
-
(g) => g.name ===
|
|
1645
|
+
const V = await Kn(), E = Cr(V.hash), $ = d.fields.find(
|
|
1646
|
+
(g) => g.name === E
|
|
1647
1647
|
);
|
|
1648
1648
|
let C;
|
|
1649
1649
|
$ !== void 0 ? C = ct($.value) : (C = D.wrapInHolder(t, ht(t, V.spec)), t.createField(
|
|
@@ -1657,7 +1657,7 @@ class pt {
|
|
|
1657
1657
|
new Ot(g, m, N(w), N(y))
|
|
1658
1658
|
));
|
|
1659
1659
|
const M = /* @__PURE__ */ new Set();
|
|
1660
|
-
for (const g of re(
|
|
1660
|
+
for (const g of re(P)) {
|
|
1661
1661
|
if (!z.has(g.id))
|
|
1662
1662
|
throw new Error(`Inconsistent project structure: no inputs for ${g.id}`);
|
|
1663
1663
|
M.add(g.id);
|
|
@@ -1674,7 +1674,7 @@ class pt {
|
|
|
1674
1674
|
v,
|
|
1675
1675
|
h,
|
|
1676
1676
|
b,
|
|
1677
|
-
|
|
1677
|
+
P,
|
|
1678
1678
|
G,
|
|
1679
1679
|
ce,
|
|
1680
1680
|
z,
|
|
@@ -1684,11 +1684,11 @@ class pt {
|
|
|
1684
1684
|
return W.fixProblemsAndMigrate(), W;
|
|
1685
1685
|
}
|
|
1686
1686
|
}
|
|
1687
|
-
async function
|
|
1688
|
-
const t = s.createEphemeral(
|
|
1687
|
+
async function oa(s, e = Ci) {
|
|
1688
|
+
const t = s.createEphemeral(Pi);
|
|
1689
1689
|
s.lock(t);
|
|
1690
1690
|
const r = String(Date.now());
|
|
1691
|
-
s.setKValue(t, ut, JSON.stringify(Ge)), s.setKValue(t, Lr, r), s.setKValue(t, _e, r), s.setKValue(t, qe, JSON.stringify(e)), s.setKValue(t, de, JSON.stringify(
|
|
1691
|
+
s.setKValue(t, ut, JSON.stringify(Ge)), s.setKValue(t, Lr, r), s.setKValue(t, _e, r), s.setKValue(t, qe, JSON.stringify(e)), s.setKValue(t, de, JSON.stringify(ki)), s.setKValue(t, dt, JSON.stringify(Ri));
|
|
1692
1692
|
const n = await Kn();
|
|
1693
1693
|
return s.createField(
|
|
1694
1694
|
J(t, Cr(n.hash)),
|
|
@@ -1710,7 +1710,7 @@ async function se(s, e, t, r, n) {
|
|
|
1710
1710
|
return i.save(), o;
|
|
1711
1711
|
}
|
|
1712
1712
|
}
|
|
1713
|
-
function*
|
|
1713
|
+
function* ia(s) {
|
|
1714
1714
|
switch (s.type) {
|
|
1715
1715
|
case "Json":
|
|
1716
1716
|
return;
|
|
@@ -1730,7 +1730,7 @@ function fs(s, e) {
|
|
|
1730
1730
|
Object.entries(s).map(([t, r]) => [t, e(r, t)])
|
|
1731
1731
|
);
|
|
1732
1732
|
}
|
|
1733
|
-
function
|
|
1733
|
+
function aa(s, e) {
|
|
1734
1734
|
switch (s.type) {
|
|
1735
1735
|
case "Json":
|
|
1736
1736
|
return { ...s };
|
|
@@ -1748,26 +1748,26 @@ function oa(s, e) {
|
|
|
1748
1748
|
Y(s);
|
|
1749
1749
|
}
|
|
1750
1750
|
}
|
|
1751
|
-
const
|
|
1751
|
+
const ca = We("PColumnData/JsonPartitioned", "1"), la = We(
|
|
1752
1752
|
"PColumnData/Partitioned/JsonPartitioned",
|
|
1753
1753
|
"1"
|
|
1754
|
-
),
|
|
1754
|
+
), ua = We("PColumnData/BinaryPartitioned", "1"), da = We(
|
|
1755
1755
|
"PColumnData/Partitioned/BinaryPartitioned",
|
|
1756
1756
|
"1"
|
|
1757
|
-
),
|
|
1758
|
-
function
|
|
1757
|
+
), pa = We("PColumnData/Json", "1");
|
|
1758
|
+
function fa(s) {
|
|
1759
1759
|
if (!s.getIsReadyOrError()) throw new Error("Data not ready.");
|
|
1760
1760
|
const e = s.getDataAsJson();
|
|
1761
1761
|
if (e === void 0)
|
|
1762
1762
|
throw new Error("unexpected data info structure, no resource data");
|
|
1763
|
-
if (pe(s.resourceType,
|
|
1763
|
+
if (pe(s.resourceType, pa)) {
|
|
1764
1764
|
const t = e;
|
|
1765
1765
|
return {
|
|
1766
1766
|
type: "Json",
|
|
1767
1767
|
keyLength: t.keyLength,
|
|
1768
1768
|
data: t.data
|
|
1769
1769
|
};
|
|
1770
|
-
} else if (pe(s.resourceType,
|
|
1770
|
+
} else if (pe(s.resourceType, ca)) {
|
|
1771
1771
|
const t = e, r = Object.fromEntries(
|
|
1772
1772
|
s.listInputFields().map((n) => [n, s.traverse({ field: n, errorIfFieldNotSet: !0 }).resourceInfo])
|
|
1773
1773
|
);
|
|
@@ -1776,7 +1776,7 @@ function da(s) {
|
|
|
1776
1776
|
partitionKeyLength: t.partitionKeyLength,
|
|
1777
1777
|
parts: r
|
|
1778
1778
|
};
|
|
1779
|
-
} else if (pe(s.resourceType,
|
|
1779
|
+
} else if (pe(s.resourceType, la)) {
|
|
1780
1780
|
const t = e, r = {};
|
|
1781
1781
|
for (const n of s.listInputFields()) {
|
|
1782
1782
|
const i = s.traverse({ field: n, errorIfFieldNotSet: !0 }), o = i.listInputFields();
|
|
@@ -1794,7 +1794,7 @@ function da(s) {
|
|
|
1794
1794
|
partitionKeyLength: t.superPartitionKeyLength + t.partitionKeyLength,
|
|
1795
1795
|
parts: r
|
|
1796
1796
|
};
|
|
1797
|
-
} else if (pe(s.resourceType,
|
|
1797
|
+
} else if (pe(s.resourceType, ua)) {
|
|
1798
1798
|
const t = e, r = {};
|
|
1799
1799
|
for (const n of s.listInputFields())
|
|
1800
1800
|
if (n.endsWith(".index")) {
|
|
@@ -1815,7 +1815,7 @@ function da(s) {
|
|
|
1815
1815
|
partitionKeyLength: t.partitionKeyLength,
|
|
1816
1816
|
parts: r
|
|
1817
1817
|
};
|
|
1818
|
-
} else if (pe(s.resourceType,
|
|
1818
|
+
} else if (pe(s.resourceType, da)) {
|
|
1819
1819
|
const t = e, r = {};
|
|
1820
1820
|
for (const n of s.listInputFields()) {
|
|
1821
1821
|
const i = s.traverse({ field: n, errorIfFieldNotSet: !0 }), o = i.listInputFields();
|
|
@@ -1849,9 +1849,9 @@ function da(s) {
|
|
|
1849
1849
|
parts: r
|
|
1850
1850
|
};
|
|
1851
1851
|
}
|
|
1852
|
-
throw new Error(`unsupported resource type: ${
|
|
1852
|
+
throw new Error(`unsupported resource type: ${jo(s.resourceType)}`);
|
|
1853
1853
|
}
|
|
1854
|
-
function
|
|
1854
|
+
function ha(s, e) {
|
|
1855
1855
|
const t = s.axesSpec.length, r = {};
|
|
1856
1856
|
for (const { key: n, val: i } of e) {
|
|
1857
1857
|
if (n.length !== t)
|
|
@@ -1864,14 +1864,14 @@ function pa(s, e) {
|
|
|
1864
1864
|
data: r
|
|
1865
1865
|
};
|
|
1866
1866
|
}
|
|
1867
|
-
function
|
|
1867
|
+
function ga(s, e) {
|
|
1868
1868
|
const t = Fe("sha256");
|
|
1869
1869
|
return t.update(te(s)), t.update(String(Me(e.originalId) ? e.id : e.originalId)), t.digest().toString("hex");
|
|
1870
1870
|
}
|
|
1871
1871
|
function hs(s, e) {
|
|
1872
1872
|
return te({ __isRef: !0, blockId: s, name: e });
|
|
1873
1873
|
}
|
|
1874
|
-
function
|
|
1874
|
+
function ma(s, e) {
|
|
1875
1875
|
return te({ resolvePath: s, name: e });
|
|
1876
1876
|
}
|
|
1877
1877
|
function Hn(s, e = !0, t = !1, r = "") {
|
|
@@ -1912,10 +1912,10 @@ function Hn(s, e = !0, t = !1, r = "") {
|
|
|
1912
1912
|
for (const [, u] of i) u.data === void 0 && (u.hasData = !1);
|
|
1913
1913
|
return { locked: o, results: i };
|
|
1914
1914
|
}
|
|
1915
|
-
function
|
|
1915
|
+
function va(s, e = !0, t = "", r) {
|
|
1916
1916
|
if (!s.getIsReadyOrError()) throw new Error("resource is not ready");
|
|
1917
1917
|
const n = Hn(s, e, !1, t);
|
|
1918
|
-
|
|
1918
|
+
Qo(n.locked);
|
|
1919
1919
|
const i = {};
|
|
1920
1920
|
for (const [o, a] of n.results) {
|
|
1921
1921
|
if (a.spec === void 0) throw new Error(`no spec for key ${o}`);
|
|
@@ -1925,7 +1925,7 @@ function ga(s, e = !0, t = "", r) {
|
|
|
1925
1925
|
if (c === void 0) throw new Error(`no data for key ${o}`);
|
|
1926
1926
|
if (!c.ok) throw c.error;
|
|
1927
1927
|
i[o] = {
|
|
1928
|
-
id: r.length === 0 ?
|
|
1928
|
+
id: r.length === 0 ? ga(a.spec, c.value) : ma(r, o),
|
|
1929
1929
|
spec: a.spec,
|
|
1930
1930
|
data: c.value
|
|
1931
1931
|
};
|
|
@@ -2071,7 +2071,7 @@ class Nr {
|
|
|
2071
2071
|
return t;
|
|
2072
2072
|
}
|
|
2073
2073
|
static create(e, t, r) {
|
|
2074
|
-
const n = e.accessor(t).node(), i = N(n.getKeyValueAsJson(de)), a =
|
|
2074
|
+
const n = e.accessor(t).node(), i = N(n.getKeyValueAsJson(de)), a = Er(i).traverseIds("upstream", r), c = /* @__PURE__ */ new Map();
|
|
2075
2075
|
for (const l of re(i)) {
|
|
2076
2076
|
if (!a.has(l.id)) continue;
|
|
2077
2077
|
const u = gs(
|
|
@@ -2211,7 +2211,7 @@ function* ee(s, e) {
|
|
|
2211
2211
|
Y(s);
|
|
2212
2212
|
}
|
|
2213
2213
|
}
|
|
2214
|
-
function
|
|
2214
|
+
function ya(s, e) {
|
|
2215
2215
|
const t = {};
|
|
2216
2216
|
for (const [r, n] of Object.entries(s)) t[r] = e(n);
|
|
2217
2217
|
return t;
|
|
@@ -2219,7 +2219,7 @@ function ma(s, e) {
|
|
|
2219
2219
|
function je(s, e) {
|
|
2220
2220
|
return s === void 0 ? void 0 : e(s);
|
|
2221
2221
|
}
|
|
2222
|
-
function
|
|
2222
|
+
function wa(s) {
|
|
2223
2223
|
switch (s.type) {
|
|
2224
2224
|
case "GetImportProgress":
|
|
2225
2225
|
return !0;
|
|
@@ -2227,8 +2227,8 @@ function va(s) {
|
|
|
2227
2227
|
return !1;
|
|
2228
2228
|
}
|
|
2229
2229
|
}
|
|
2230
|
-
function
|
|
2231
|
-
for (const e of ee(s)) if (
|
|
2230
|
+
function Sa(s) {
|
|
2231
|
+
for (const e of ee(s)) if (wa(e)) return !0;
|
|
2232
2232
|
return !1;
|
|
2233
2233
|
}
|
|
2234
2234
|
function gt(s) {
|
|
@@ -2240,18 +2240,18 @@ function gt(s) {
|
|
|
2240
2240
|
function I(s) {
|
|
2241
2241
|
return () => gt(s);
|
|
2242
2242
|
}
|
|
2243
|
-
const
|
|
2243
|
+
const ba = (s) => {
|
|
2244
2244
|
const e = {};
|
|
2245
2245
|
for (const [t, r] of Object.entries(s)) e[t] = r;
|
|
2246
2246
|
return I(e);
|
|
2247
|
-
},
|
|
2247
|
+
}, ka = (s) => {
|
|
2248
2248
|
const e = s.source;
|
|
2249
2249
|
if (e === void 0) return I(void 0);
|
|
2250
2250
|
const t = [];
|
|
2251
2251
|
for (const r of e)
|
|
2252
2252
|
r instanceof Array ? t.push(...r) : t.push(r);
|
|
2253
2253
|
return I(t);
|
|
2254
|
-
},
|
|
2254
|
+
}, Ra = (s) => {
|
|
2255
2255
|
const e = s.source, t = s.field;
|
|
2256
2256
|
return e === void 0 || t === void 0 ? I(void 0) : ({ cCtx: r }) => {
|
|
2257
2257
|
var n;
|
|
@@ -2263,7 +2263,7 @@ function zn(s, e) {
|
|
|
2263
2263
|
for (let n = 0; n < r; n++) t[String(n)] = e(s[n]);
|
|
2264
2264
|
return t;
|
|
2265
2265
|
}
|
|
2266
|
-
function
|
|
2266
|
+
function Ca(s, e) {
|
|
2267
2267
|
return (t) => {
|
|
2268
2268
|
const r = t.source;
|
|
2269
2269
|
return r === void 0 ? I(void 0) : () => ({
|
|
@@ -2280,7 +2280,7 @@ function Xn(s) {
|
|
|
2280
2280
|
return I(t);
|
|
2281
2281
|
};
|
|
2282
2282
|
}
|
|
2283
|
-
function
|
|
2283
|
+
function Pa(s, e) {
|
|
2284
2284
|
return (t) => {
|
|
2285
2285
|
const r = t.source;
|
|
2286
2286
|
if (r === void 0) return I(void 0);
|
|
@@ -2291,34 +2291,34 @@ function Ra(s, e) {
|
|
|
2291
2291
|
}
|
|
2292
2292
|
return () => ({
|
|
2293
2293
|
type: "ScheduleSubroutine",
|
|
2294
|
-
subroutine:
|
|
2294
|
+
subroutine: Ea,
|
|
2295
2295
|
args: n
|
|
2296
2296
|
});
|
|
2297
2297
|
};
|
|
2298
2298
|
}
|
|
2299
|
-
const
|
|
2299
|
+
const Ea = (s) => I(s), Oa = (s) => {
|
|
2300
2300
|
const e = s.arg;
|
|
2301
2301
|
return I(e === void 0 ? void 0 : e.length === 0);
|
|
2302
|
-
},
|
|
2302
|
+
}, Fa = (s) => {
|
|
2303
2303
|
const e = s.operand;
|
|
2304
2304
|
return I(e === void 0 ? void 0 : !e);
|
|
2305
|
-
},
|
|
2305
|
+
}, Ta = (s) => {
|
|
2306
2306
|
const e = s.operand1, t = s.operand2;
|
|
2307
2307
|
return I(e === void 0 || t === void 0 ? void 0 : e && t);
|
|
2308
|
-
},
|
|
2308
|
+
}, Ia = (s) => {
|
|
2309
2309
|
const e = s.operand1, t = s.operand2;
|
|
2310
2310
|
return I(e === void 0 || t === void 0 ? void 0 : e || t);
|
|
2311
|
-
},
|
|
2311
|
+
}, $a = (s) => {
|
|
2312
2312
|
const e = s.source;
|
|
2313
2313
|
return e === void 0 ? I(void 0) : ({ cCtx: t }) => {
|
|
2314
2314
|
var r;
|
|
2315
2315
|
return gt((r = t.accessor(e).node()) == null ? void 0 : r.getDataAsJson());
|
|
2316
2316
|
};
|
|
2317
|
-
},
|
|
2317
|
+
}, Aa = (s) => {
|
|
2318
2318
|
const e = s.source, t = s.field;
|
|
2319
2319
|
return I(e === void 0 || t === void 0 ? void 0 : e[t]);
|
|
2320
2320
|
};
|
|
2321
|
-
function
|
|
2321
|
+
function La(s, e) {
|
|
2322
2322
|
return (t) => {
|
|
2323
2323
|
const r = t.source;
|
|
2324
2324
|
return r === void 0 ? I(void 0) : ({ cCtx: n }) => {
|
|
@@ -2333,13 +2333,13 @@ function $a(s, e) {
|
|
|
2333
2333
|
}
|
|
2334
2334
|
return {
|
|
2335
2335
|
type: "ScheduleSubroutine",
|
|
2336
|
-
subroutine:
|
|
2336
|
+
subroutine: Da,
|
|
2337
2337
|
args: o
|
|
2338
2338
|
};
|
|
2339
2339
|
};
|
|
2340
2340
|
};
|
|
2341
2341
|
}
|
|
2342
|
-
const
|
|
2342
|
+
const Da = (s) => I(s), Na = (s) => (e) => {
|
|
2343
2343
|
const t = e.source;
|
|
2344
2344
|
return t === void 0 ? I(void 0) : ({ drivers: r }) => ({
|
|
2345
2345
|
type: "ScheduleComputable",
|
|
@@ -2353,7 +2353,7 @@ const Aa = (s) => I(s), La = (s) => (e) => {
|
|
|
2353
2353
|
}
|
|
2354
2354
|
)
|
|
2355
2355
|
});
|
|
2356
|
-
},
|
|
2356
|
+
}, Ba = (s) => (e) => {
|
|
2357
2357
|
const t = e.source;
|
|
2358
2358
|
return t === void 0 ? I(void 0) : ({ cCtx: r, drivers: n }) => {
|
|
2359
2359
|
const i = r.accessor(t).node().resourceInfo;
|
|
@@ -2364,7 +2364,7 @@ const Aa = (s) => I(s), La = (s) => (e) => {
|
|
|
2364
2364
|
})
|
|
2365
2365
|
};
|
|
2366
2366
|
};
|
|
2367
|
-
},
|
|
2367
|
+
}, ja = (s) => (e) => {
|
|
2368
2368
|
const t = e.source;
|
|
2369
2369
|
return t === void 0 ? I(void 0) : ({ drivers: r }) => ({
|
|
2370
2370
|
type: "ScheduleComputable",
|
|
@@ -2380,49 +2380,49 @@ const Aa = (s) => I(s), La = (s) => (e) => {
|
|
|
2380
2380
|
}
|
|
2381
2381
|
)
|
|
2382
2382
|
});
|
|
2383
|
-
},
|
|
2383
|
+
}, xa = (s) => {
|
|
2384
2384
|
const e = s.source;
|
|
2385
2385
|
return e === void 0 ? I(void 0) : (t) => ({
|
|
2386
2386
|
type: "ScheduleComputable",
|
|
2387
2387
|
computable: t.drivers.blobDriver.getDownloadedBlob(e)
|
|
2388
2388
|
});
|
|
2389
|
-
},
|
|
2389
|
+
}, Va = (s) => {
|
|
2390
2390
|
const e = s.source;
|
|
2391
2391
|
return e === void 0 ? I(void 0) : ({ drivers: t }) => ({
|
|
2392
2392
|
type: "ScheduleComputable",
|
|
2393
2393
|
computable: t.blobDriver.getOnDemandBlob(e)
|
|
2394
2394
|
});
|
|
2395
|
-
},
|
|
2395
|
+
}, Ua = (s) => (e) => {
|
|
2396
2396
|
const t = e.source;
|
|
2397
2397
|
return t === void 0 ? I(void 0) : ({ drivers: r }) => ({
|
|
2398
2398
|
type: "ScheduleComputable",
|
|
2399
2399
|
computable: r.blobToURLDriver.extractArchiveAndGetURL(t, s)
|
|
2400
2400
|
});
|
|
2401
|
-
},
|
|
2401
|
+
}, Ma = (s) => {
|
|
2402
2402
|
const e = s.source;
|
|
2403
2403
|
return e === void 0 ? I(void 0) : ({ drivers: t }) => ({
|
|
2404
2404
|
type: "ScheduleComputable",
|
|
2405
2405
|
computable: t.uploadDriver.getProgressId(e)
|
|
2406
2406
|
});
|
|
2407
|
-
},
|
|
2407
|
+
}, Ja = (s) => (e) => {
|
|
2408
2408
|
const t = e.source;
|
|
2409
2409
|
return t === void 0 ? I(void 0) : ({ drivers: r }) => ({
|
|
2410
2410
|
type: "ScheduleComputable",
|
|
2411
2411
|
computable: r.logDriver.getLastLogs(t, s)
|
|
2412
2412
|
});
|
|
2413
|
-
},
|
|
2413
|
+
}, Ga = (s) => (e) => {
|
|
2414
2414
|
const t = e.source;
|
|
2415
2415
|
return t === void 0 ? I(void 0) : ({ drivers: r }) => ({
|
|
2416
2416
|
type: "ScheduleComputable",
|
|
2417
2417
|
computable: r.logDriver.getProgressLog(t, s)
|
|
2418
2418
|
});
|
|
2419
|
-
},
|
|
2419
|
+
}, _a = (s) => (e) => {
|
|
2420
2420
|
const t = e.source;
|
|
2421
2421
|
return t === void 0 ? I(void 0) : ({ drivers: r }) => ({
|
|
2422
2422
|
type: "ScheduleComputable",
|
|
2423
2423
|
computable: r.logDriver.getProgressLogWithInfo(t, s)
|
|
2424
2424
|
});
|
|
2425
|
-
},
|
|
2425
|
+
}, qa = (s) => {
|
|
2426
2426
|
const e = s.source;
|
|
2427
2427
|
return e === void 0 ? I(void 0) : ({ drivers: t }) => ({
|
|
2428
2428
|
type: "ScheduleComputable",
|
|
@@ -2445,7 +2445,7 @@ function L(s, e) {
|
|
|
2445
2445
|
case "GetJsonField":
|
|
2446
2446
|
return () => ({
|
|
2447
2447
|
type: "ScheduleSubroutine",
|
|
2448
|
-
subroutine:
|
|
2448
|
+
subroutine: Aa,
|
|
2449
2449
|
args: {
|
|
2450
2450
|
source: L(s, e.source),
|
|
2451
2451
|
field: L(s, e.field)
|
|
@@ -2454,7 +2454,7 @@ function L(s, e) {
|
|
|
2454
2454
|
case "MapArrayValues":
|
|
2455
2455
|
return () => ({
|
|
2456
2456
|
type: "ScheduleSubroutine",
|
|
2457
|
-
subroutine:
|
|
2457
|
+
subroutine: Ca(s, e),
|
|
2458
2458
|
args: {
|
|
2459
2459
|
source: L(s, e.source)
|
|
2460
2460
|
}
|
|
@@ -2462,7 +2462,7 @@ function L(s, e) {
|
|
|
2462
2462
|
case "MapRecordValues":
|
|
2463
2463
|
return () => ({
|
|
2464
2464
|
type: "ScheduleSubroutine",
|
|
2465
|
-
subroutine:
|
|
2465
|
+
subroutine: Pa(s, e),
|
|
2466
2466
|
args: {
|
|
2467
2467
|
source: L(s, e.source)
|
|
2468
2468
|
}
|
|
@@ -2470,8 +2470,8 @@ function L(s, e) {
|
|
|
2470
2470
|
case "MakeObject":
|
|
2471
2471
|
return () => ({
|
|
2472
2472
|
type: "ScheduleSubroutine",
|
|
2473
|
-
subroutine:
|
|
2474
|
-
args:
|
|
2473
|
+
subroutine: ba,
|
|
2474
|
+
args: ya(e.template, (t) => L(s, t))
|
|
2475
2475
|
});
|
|
2476
2476
|
case "MakeArray":
|
|
2477
2477
|
return () => ({
|
|
@@ -2482,7 +2482,7 @@ function L(s, e) {
|
|
|
2482
2482
|
case "Flatten":
|
|
2483
2483
|
return () => ({
|
|
2484
2484
|
type: "ScheduleSubroutine",
|
|
2485
|
-
subroutine:
|
|
2485
|
+
subroutine: ka,
|
|
2486
2486
|
args: {
|
|
2487
2487
|
source: L(s, e.source)
|
|
2488
2488
|
}
|
|
@@ -2490,7 +2490,7 @@ function L(s, e) {
|
|
|
2490
2490
|
case "IsEmpty":
|
|
2491
2491
|
return () => ({
|
|
2492
2492
|
type: "ScheduleSubroutine",
|
|
2493
|
-
subroutine:
|
|
2493
|
+
subroutine: Oa,
|
|
2494
2494
|
args: {
|
|
2495
2495
|
arg: L(s, e.arg)
|
|
2496
2496
|
}
|
|
@@ -2498,7 +2498,7 @@ function L(s, e) {
|
|
|
2498
2498
|
case "Not":
|
|
2499
2499
|
return () => ({
|
|
2500
2500
|
type: "ScheduleSubroutine",
|
|
2501
|
-
subroutine:
|
|
2501
|
+
subroutine: Fa,
|
|
2502
2502
|
args: {
|
|
2503
2503
|
operand: L(s, e.operand)
|
|
2504
2504
|
}
|
|
@@ -2506,7 +2506,7 @@ function L(s, e) {
|
|
|
2506
2506
|
case "And":
|
|
2507
2507
|
return () => ({
|
|
2508
2508
|
type: "ScheduleSubroutine",
|
|
2509
|
-
subroutine:
|
|
2509
|
+
subroutine: Ta,
|
|
2510
2510
|
args: {
|
|
2511
2511
|
operand1: L(s, e.operand1),
|
|
2512
2512
|
operand2: L(s, e.operand2)
|
|
@@ -2515,7 +2515,7 @@ function L(s, e) {
|
|
|
2515
2515
|
case "Or":
|
|
2516
2516
|
return () => ({
|
|
2517
2517
|
type: "ScheduleSubroutine",
|
|
2518
|
-
subroutine:
|
|
2518
|
+
subroutine: Ia,
|
|
2519
2519
|
args: {
|
|
2520
2520
|
operand1: L(s, e.operand1),
|
|
2521
2521
|
operand2: L(s, e.operand2)
|
|
@@ -2524,7 +2524,7 @@ function L(s, e) {
|
|
|
2524
2524
|
case "MapResourceFields":
|
|
2525
2525
|
return () => ({
|
|
2526
2526
|
type: "ScheduleSubroutine",
|
|
2527
|
-
subroutine:
|
|
2527
|
+
subroutine: La(s, e),
|
|
2528
2528
|
args: {
|
|
2529
2529
|
source: L(s, e.source)
|
|
2530
2530
|
}
|
|
@@ -2532,7 +2532,7 @@ function L(s, e) {
|
|
|
2532
2532
|
case "GetResourceField":
|
|
2533
2533
|
return () => ({
|
|
2534
2534
|
type: "ScheduleSubroutine",
|
|
2535
|
-
subroutine:
|
|
2535
|
+
subroutine: Ra,
|
|
2536
2536
|
args: {
|
|
2537
2537
|
source: L(s, e.source),
|
|
2538
2538
|
field: L(s, e.field)
|
|
@@ -2541,7 +2541,7 @@ function L(s, e) {
|
|
|
2541
2541
|
case "GetResourceValueAsJson":
|
|
2542
2542
|
return () => ({
|
|
2543
2543
|
type: "ScheduleSubroutine",
|
|
2544
|
-
subroutine:
|
|
2544
|
+
subroutine: $a,
|
|
2545
2545
|
args: {
|
|
2546
2546
|
source: L(s, e.source)
|
|
2547
2547
|
}
|
|
@@ -2549,7 +2549,7 @@ function L(s, e) {
|
|
|
2549
2549
|
case "GetBlobContent":
|
|
2550
2550
|
return () => ({
|
|
2551
2551
|
type: "ScheduleSubroutine",
|
|
2552
|
-
subroutine:
|
|
2552
|
+
subroutine: Na(e.range),
|
|
2553
2553
|
args: {
|
|
2554
2554
|
source: L(s, e.source)
|
|
2555
2555
|
}
|
|
@@ -2557,7 +2557,7 @@ function L(s, e) {
|
|
|
2557
2557
|
case "GetBlobContentAsString":
|
|
2558
2558
|
return () => ({
|
|
2559
2559
|
type: "ScheduleSubroutine",
|
|
2560
|
-
subroutine:
|
|
2560
|
+
subroutine: Ba(e.range),
|
|
2561
2561
|
args: {
|
|
2562
2562
|
source: L(s, e.source)
|
|
2563
2563
|
}
|
|
@@ -2565,7 +2565,7 @@ function L(s, e) {
|
|
|
2565
2565
|
case "GetBlobContentAsJson":
|
|
2566
2566
|
return () => ({
|
|
2567
2567
|
type: "ScheduleSubroutine",
|
|
2568
|
-
subroutine:
|
|
2568
|
+
subroutine: ja(e.range),
|
|
2569
2569
|
args: {
|
|
2570
2570
|
source: L(s, e.source)
|
|
2571
2571
|
}
|
|
@@ -2573,7 +2573,7 @@ function L(s, e) {
|
|
|
2573
2573
|
case "GetDownloadedBlobContent":
|
|
2574
2574
|
return () => ({
|
|
2575
2575
|
type: "ScheduleSubroutine",
|
|
2576
|
-
subroutine:
|
|
2576
|
+
subroutine: xa,
|
|
2577
2577
|
args: {
|
|
2578
2578
|
source: L(s, e.source)
|
|
2579
2579
|
}
|
|
@@ -2581,7 +2581,7 @@ function L(s, e) {
|
|
|
2581
2581
|
case "GetOnDemandBlobContent":
|
|
2582
2582
|
return () => ({
|
|
2583
2583
|
type: "ScheduleSubroutine",
|
|
2584
|
-
subroutine:
|
|
2584
|
+
subroutine: Va,
|
|
2585
2585
|
args: {
|
|
2586
2586
|
source: L(s, e.source)
|
|
2587
2587
|
}
|
|
@@ -2589,7 +2589,7 @@ function L(s, e) {
|
|
|
2589
2589
|
case "ExtractArchiveAndGetURL":
|
|
2590
2590
|
return () => ({
|
|
2591
2591
|
type: "ScheduleSubroutine",
|
|
2592
|
-
subroutine:
|
|
2592
|
+
subroutine: Ua(e.format),
|
|
2593
2593
|
args: {
|
|
2594
2594
|
source: L(s, e.source)
|
|
2595
2595
|
}
|
|
@@ -2597,7 +2597,7 @@ function L(s, e) {
|
|
|
2597
2597
|
case "GetImportProgress":
|
|
2598
2598
|
return () => ({
|
|
2599
2599
|
type: "ScheduleSubroutine",
|
|
2600
|
-
subroutine:
|
|
2600
|
+
subroutine: Ma,
|
|
2601
2601
|
args: {
|
|
2602
2602
|
source: L(s, e.source)
|
|
2603
2603
|
}
|
|
@@ -2605,7 +2605,7 @@ function L(s, e) {
|
|
|
2605
2605
|
case "GetLastLogs":
|
|
2606
2606
|
return () => ({
|
|
2607
2607
|
type: "ScheduleSubroutine",
|
|
2608
|
-
subroutine:
|
|
2608
|
+
subroutine: Ja(e.lines),
|
|
2609
2609
|
args: {
|
|
2610
2610
|
source: L(s, e.source)
|
|
2611
2611
|
}
|
|
@@ -2613,7 +2613,7 @@ function L(s, e) {
|
|
|
2613
2613
|
case "GetProgressLog":
|
|
2614
2614
|
return () => ({
|
|
2615
2615
|
type: "ScheduleSubroutine",
|
|
2616
|
-
subroutine:
|
|
2616
|
+
subroutine: Ga(e.patternToSearch),
|
|
2617
2617
|
args: {
|
|
2618
2618
|
source: L(s, e.source)
|
|
2619
2619
|
}
|
|
@@ -2621,7 +2621,7 @@ function L(s, e) {
|
|
|
2621
2621
|
case "GetProgressLogWithInfo":
|
|
2622
2622
|
return () => ({
|
|
2623
2623
|
type: "ScheduleSubroutine",
|
|
2624
|
-
subroutine:
|
|
2624
|
+
subroutine: _a(e.patternToSearch),
|
|
2625
2625
|
args: {
|
|
2626
2626
|
source: L(s, e.source)
|
|
2627
2627
|
}
|
|
@@ -2629,7 +2629,7 @@ function L(s, e) {
|
|
|
2629
2629
|
case "GetLogHandle":
|
|
2630
2630
|
return () => ({
|
|
2631
2631
|
type: "ScheduleSubroutine",
|
|
2632
|
-
subroutine:
|
|
2632
|
+
subroutine: qa,
|
|
2633
2633
|
args: {
|
|
2634
2634
|
source: L(s, e.source)
|
|
2635
2635
|
}
|
|
@@ -2638,8 +2638,8 @@ function L(s, e) {
|
|
|
2638
2638
|
return Y(e);
|
|
2639
2639
|
}
|
|
2640
2640
|
}
|
|
2641
|
-
const
|
|
2642
|
-
function
|
|
2641
|
+
const Ka = ["$prod", "$staging"];
|
|
2642
|
+
function Ha(s) {
|
|
2643
2643
|
return {
|
|
2644
2644
|
$blockId: s.blockId,
|
|
2645
2645
|
$args: (e) => JSON.parse(s.args(e)),
|
|
@@ -2651,16 +2651,16 @@ function qa(s) {
|
|
|
2651
2651
|
$staging: s.staging
|
|
2652
2652
|
};
|
|
2653
2653
|
}
|
|
2654
|
-
const Yn = Symbol(), Qn = "return",
|
|
2655
|
-
function
|
|
2654
|
+
const Yn = Symbol(), Qn = "return", Wa = { op: Yn, arg: Qn };
|
|
2655
|
+
function za(s) {
|
|
2656
2656
|
return s.op == Yn && s.arg == Qn;
|
|
2657
2657
|
}
|
|
2658
|
-
function
|
|
2658
|
+
function Xa() {
|
|
2659
2659
|
return { pendingSubroutines: /* @__PURE__ */ new Map() };
|
|
2660
2660
|
}
|
|
2661
2661
|
function ms(s, e, t, r) {
|
|
2662
2662
|
const n = new Cn(t), i = (a, c) => {
|
|
2663
|
-
if (
|
|
2663
|
+
if (za(a))
|
|
2664
2664
|
return e.result = c, !1;
|
|
2665
2665
|
const l = N(e.pendingSubroutines.get(a.op));
|
|
2666
2666
|
if (a.arg in l.args) throw new Error("argument already set");
|
|
@@ -2713,26 +2713,26 @@ function ms(s, e, t, r) {
|
|
|
2713
2713
|
}
|
|
2714
2714
|
return o;
|
|
2715
2715
|
}
|
|
2716
|
-
function
|
|
2717
|
-
return Zn(s,
|
|
2716
|
+
function Ya(s, e, t, r = {}) {
|
|
2717
|
+
return Zn(s, Ha(e), t, r);
|
|
2718
2718
|
}
|
|
2719
2719
|
function Zn(s, e, t, r = {}) {
|
|
2720
2720
|
const n = `${e.blockId}#` + te({
|
|
2721
2721
|
ctx: Object.fromEntries(
|
|
2722
|
-
Object.entries(e).filter(([i]) =>
|
|
2722
|
+
Object.entries(e).filter(([i]) => Ka.indexOf(i) === -1)
|
|
2723
2723
|
),
|
|
2724
2724
|
cfg: t
|
|
2725
2725
|
});
|
|
2726
2726
|
return K.makeRaw(
|
|
2727
2727
|
(i) => {
|
|
2728
|
-
const o = { drivers: s, cCtx: i }, a =
|
|
2728
|
+
const o = { drivers: s, cCtx: i }, a = Xa();
|
|
2729
2729
|
return {
|
|
2730
2730
|
ir: ms(
|
|
2731
2731
|
o,
|
|
2732
2732
|
a,
|
|
2733
2733
|
[
|
|
2734
2734
|
{
|
|
2735
|
-
destination:
|
|
2735
|
+
destination: Wa,
|
|
2736
2736
|
operation: L(e, t)
|
|
2737
2737
|
}
|
|
2738
2738
|
],
|
|
@@ -2766,7 +2766,7 @@ function Zn(s, e, t, r = {}) {
|
|
|
2766
2766
|
function vs(s) {
|
|
2767
2767
|
return s !== void 0 ? Buffer.from(s).toString("base64") : void 0;
|
|
2768
2768
|
}
|
|
2769
|
-
class
|
|
2769
|
+
class Qa {
|
|
2770
2770
|
constructor(e, t, r, n, i) {
|
|
2771
2771
|
S(this, "computablesToResolve", {});
|
|
2772
2772
|
S(this, "computableCtx");
|
|
@@ -2850,16 +2850,16 @@ class Xa {
|
|
|
2850
2850
|
parsePObjectCollection(e, t, r, ...n) {
|
|
2851
2851
|
const i = this.getAccessor(e);
|
|
2852
2852
|
if (!i.getIsReadyOrError()) return;
|
|
2853
|
-
const o =
|
|
2853
|
+
const o = va(i, t, r, n), a = {};
|
|
2854
2854
|
for (const [c, l] of Object.entries(o))
|
|
2855
|
-
a[c] =
|
|
2855
|
+
a[c] = ve(l, (u) => this.wrapAccessor(u));
|
|
2856
2856
|
return a;
|
|
2857
2857
|
}
|
|
2858
2858
|
//
|
|
2859
2859
|
// Blobs
|
|
2860
2860
|
//
|
|
2861
2861
|
registerComputable(e, t) {
|
|
2862
|
-
const r = `${e}_${
|
|
2862
|
+
const r = `${e}_${ge()}`;
|
|
2863
2863
|
return this.computablesToResolve[r] = t, r;
|
|
2864
2864
|
}
|
|
2865
2865
|
getBlobContentAsString(e, t) {
|
|
@@ -2985,7 +2985,7 @@ class Xa {
|
|
|
2985
2985
|
isComplete: e.isComplete,
|
|
2986
2986
|
entries: e.entries.map((t) => ({
|
|
2987
2987
|
ref: t.ref,
|
|
2988
|
-
obj:
|
|
2988
|
+
obj: ve(t.obj, (r) => this.wrapAccessor(r))
|
|
2989
2989
|
}))
|
|
2990
2990
|
};
|
|
2991
2991
|
}
|
|
@@ -3011,7 +3011,7 @@ class Xa {
|
|
|
3011
3011
|
return this.resultPool.getSpecByRef(e, t);
|
|
3012
3012
|
}
|
|
3013
3013
|
getDataFromResultPoolByRef(e, t) {
|
|
3014
|
-
return
|
|
3014
|
+
return ve(
|
|
3015
3015
|
this.resultPool.getDataByRef(e, t),
|
|
3016
3016
|
(r) => this.wrapAccessor(r)
|
|
3017
3017
|
);
|
|
@@ -3025,7 +3025,7 @@ class Xa {
|
|
|
3025
3025
|
"can't instantiate PFrames from this context (most porbably called from the future mapper)"
|
|
3026
3026
|
);
|
|
3027
3027
|
return this.env.driverKit.pFrameDriver.createPFrame(
|
|
3028
|
-
e.map((t) =>
|
|
3028
|
+
e.map((t) => ve(t, (r) => this.transformInputPData(r))),
|
|
3029
3029
|
this.computableCtx
|
|
3030
3030
|
);
|
|
3031
3031
|
}
|
|
@@ -3037,7 +3037,7 @@ class Xa {
|
|
|
3037
3037
|
return this.env.driverKit.pFrameDriver.createPTable(
|
|
3038
3038
|
wr(
|
|
3039
3039
|
e,
|
|
3040
|
-
(t) =>
|
|
3040
|
+
(t) => ve(t, (r) => this.transformInputPData(r))
|
|
3041
3041
|
),
|
|
3042
3042
|
this.computableCtx
|
|
3043
3043
|
);
|
|
@@ -3080,7 +3080,7 @@ class Xa {
|
|
|
3080
3080
|
}
|
|
3081
3081
|
wrapAccessor(e) {
|
|
3082
3082
|
if (e !== void 0) {
|
|
3083
|
-
const t =
|
|
3083
|
+
const t = ge();
|
|
3084
3084
|
return this.accessors.set(t, e), t;
|
|
3085
3085
|
}
|
|
3086
3086
|
}
|
|
@@ -3203,7 +3203,7 @@ class Xa {
|
|
|
3203
3203
|
});
|
|
3204
3204
|
}
|
|
3205
3205
|
}
|
|
3206
|
-
function
|
|
3206
|
+
function Za(s) {
|
|
3207
3207
|
return s instanceof ArrayBuffer || ArrayBuffer.isView(s);
|
|
3208
3208
|
}
|
|
3209
3209
|
class Ke {
|
|
@@ -3211,7 +3211,7 @@ class Ke {
|
|
|
3211
3211
|
S(this, "callbackRegistry");
|
|
3212
3212
|
S(this, "fnJSONStringify");
|
|
3213
3213
|
S(this, "fnJSONParse");
|
|
3214
|
-
S(this, "errorRepo", new
|
|
3214
|
+
S(this, "errorRepo", new ec());
|
|
3215
3215
|
S(this, "computableHelper");
|
|
3216
3216
|
if (this.scope = e, this.vm = t, this.deadlineSetter = r, this.callbackRegistry = this.scope.manage(this.vm.newObject()), this.fnJSONStringify = e.manage(
|
|
3217
3217
|
t.getProp(t.global, "JSON").consume((o) => t.getProp(o, "stringify"))
|
|
@@ -3220,7 +3220,7 @@ class Ke {
|
|
|
3220
3220
|
if (this.fnJSONParse = e.manage(
|
|
3221
3221
|
t.getProp(t.global, "JSON").consume((o) => t.getProp(o, "parse"))
|
|
3222
3222
|
), t.typeof(this.fnJSONParse) !== "function") throw new Error("JSON.parse() not found.");
|
|
3223
|
-
i !== void 0 && (this.computableHelper = new
|
|
3223
|
+
i !== void 0 && (this.computableHelper = new Qa(this, i.blockCtx, i.mlEnv, n, i.computableCtx)), this.injectCtx();
|
|
3224
3224
|
}
|
|
3225
3225
|
resetComputableCtx() {
|
|
3226
3226
|
N(this.computableHelper, "Computable context helper is not initialized").resetComputableCtx();
|
|
@@ -3297,7 +3297,7 @@ class Ke {
|
|
|
3297
3297
|
r = this.vm.null;
|
|
3298
3298
|
break;
|
|
3299
3299
|
}
|
|
3300
|
-
if (
|
|
3300
|
+
if (Za(e)) {
|
|
3301
3301
|
r = this.vm.newArrayBuffer(e), n = !0;
|
|
3302
3302
|
break;
|
|
3303
3303
|
}
|
|
@@ -3344,13 +3344,13 @@ class Ke {
|
|
|
3344
3344
|
});
|
|
3345
3345
|
}
|
|
3346
3346
|
}
|
|
3347
|
-
class
|
|
3347
|
+
class ec {
|
|
3348
3348
|
constructor() {
|
|
3349
3349
|
S(this, "errorIdToError", /* @__PURE__ */ new Map());
|
|
3350
3350
|
}
|
|
3351
3351
|
/** Sets the error to the repository and returns a mimicrated error that also has uuid key of the original error. */
|
|
3352
3352
|
setAndRecreateForQuickJS(e) {
|
|
3353
|
-
const t =
|
|
3353
|
+
const t = ge();
|
|
3354
3354
|
return this.errorIdToError.set(t, e), e instanceof Error ? {
|
|
3355
3355
|
name: `${e.name}/uuid:${t}`,
|
|
3356
3356
|
message: e.message
|
|
@@ -3361,23 +3361,24 @@ class Qa {
|
|
|
3361
3361
|
}
|
|
3362
3362
|
/** Returns the original error that was stored by parsing uuid of mimicrated error. */
|
|
3363
3363
|
getOriginal(e) {
|
|
3364
|
-
if (!(e instanceof
|
|
3364
|
+
if (!(e instanceof Zo.QuickJSUnwrapError))
|
|
3365
3365
|
return console.warn("ErrorRepo: quickJSError is not a QuickJSUnwrapError", Ye(e)), e;
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3366
|
+
const t = e.cause;
|
|
3367
|
+
if (!(typeof t == "object" && t !== null && "name" in t && typeof t.name == "string"))
|
|
3368
|
+
return console.warn("ErrorRepo: quickJSError.cause is not an Error (can be stack limit exceeded)", Ye(e)), e;
|
|
3369
|
+
const r = t.name, n = r.slice(r.indexOf("/uuid:") + 6);
|
|
3370
|
+
if (!n)
|
|
3371
|
+
throw new Error(`ErrorRepo: quickJSError.cause.name does not contain errorId: ${r}, ${Ye(e)}`);
|
|
3372
|
+
const i = this.errorIdToError.get(n);
|
|
3373
|
+
if (i === void 0)
|
|
3374
|
+
throw new Error(`ErrorRepo: errorId not found: ${n}, ${Ye(e)}`);
|
|
3375
|
+
return new ti(e, i);
|
|
3375
3376
|
}
|
|
3376
3377
|
}
|
|
3377
3378
|
function ys(s, e, t, r, n) {
|
|
3378
3379
|
Q().logOutputStatus && (Q().logOutputStatus === "any" || !t) && console.log(t ? `Stable output ${s} calculated ${e !== void 0 ? "defined" : "undefined"}; (#${r})` : `Unstable output ${s}; marker = ${n}; ${e !== void 0 ? "defined" : "undefined"} (#${r})`);
|
|
3379
3380
|
}
|
|
3380
|
-
function
|
|
3381
|
+
function tc(s, e, t, r, n, i = {}) {
|
|
3381
3382
|
const { code: o, featureFlags: a } = r, c = `${e.blockId}#lambda#${n}#${t.handle}`;
|
|
3382
3383
|
return i = { ...i, key: c }, i.mode === void 0 && t.retentive === !0 && (i.mode = "StableOnlyRetentive"), K.makeRaw((l) => {
|
|
3383
3384
|
Q().logOutputRecalculations && console.log(`Block lambda recalculation : ${c} (${l.changeSourceMarker}; ${l.bodyInvocations} invocations)`);
|
|
@@ -3403,18 +3404,18 @@ function Za(s, e, t, r, n, i = {}) {
|
|
|
3403
3404
|
h.evaluateBundle(o.content);
|
|
3404
3405
|
const b = h.runCallback(t.handle);
|
|
3405
3406
|
h.resetComputableCtx();
|
|
3406
|
-
const
|
|
3407
|
-
if (Object.keys(
|
|
3407
|
+
const P = h.computableHelper.computablesToResolve;
|
|
3408
|
+
if (Object.keys(P).length === 0) {
|
|
3408
3409
|
const F = h.importObjectUniversal(b);
|
|
3409
3410
|
return ys(t.handle, F, l.unstableMarker === void 0, -1, l.unstableMarker), { ir: F };
|
|
3410
3411
|
}
|
|
3411
3412
|
let B = 0;
|
|
3412
3413
|
return Q().logOutputStatus && console.log(`Output ${t.handle} scaffold calculated (not all computables resolved yet).`), d = !0, {
|
|
3413
|
-
ir:
|
|
3414
|
+
ir: P,
|
|
3414
3415
|
postprocessValue: (F, { unstableMarker: j, stable: V }) => {
|
|
3415
3416
|
for (const [$, C] of Object.entries(F)) h.runCallback($, C);
|
|
3416
|
-
const
|
|
3417
|
-
return B++, ys(t.handle,
|
|
3417
|
+
const E = h.importObjectUniversal(b);
|
|
3418
|
+
return B++, ys(t.handle, E, V, B, j), E;
|
|
3418
3419
|
}
|
|
3419
3420
|
};
|
|
3420
3421
|
} catch (p) {
|
|
@@ -3424,7 +3425,7 @@ function Za(s, e, t, r, n, i = {}) {
|
|
|
3424
3425
|
}
|
|
3425
3426
|
}, i);
|
|
3426
3427
|
}
|
|
3427
|
-
function
|
|
3428
|
+
function rc(s, e, t, ...r) {
|
|
3428
3429
|
const { code: n, featureFlags: i } = t, o = new Je();
|
|
3429
3430
|
try {
|
|
3430
3431
|
const a = o.manage(s.newRuntime());
|
|
@@ -3444,14 +3445,14 @@ function ec(s, e, t, ...r) {
|
|
|
3444
3445
|
o.dispose();
|
|
3445
3446
|
}
|
|
3446
3447
|
}
|
|
3447
|
-
function
|
|
3448
|
-
return yn(s) ? s.isActive === !0 :
|
|
3448
|
+
function sc(s) {
|
|
3449
|
+
return yn(s) ? s.isActive === !0 : Sa(s);
|
|
3449
3450
|
}
|
|
3450
3451
|
function xe(s, e, t, r, n, i = {}) {
|
|
3451
3452
|
if (yn(t)) {
|
|
3452
3453
|
if (r === void 0) throw new Error("No code bundle.");
|
|
3453
|
-
return
|
|
3454
|
-
} else return
|
|
3454
|
+
return tc(s, e, t, r, n, i);
|
|
3455
|
+
} else return Ya(s.driverKit, e, t, i);
|
|
3455
3456
|
}
|
|
3456
3457
|
function He(s, e) {
|
|
3457
3458
|
return je(
|
|
@@ -3469,70 +3470,70 @@ function He(s, e) {
|
|
|
3469
3470
|
}
|
|
3470
3471
|
);
|
|
3471
3472
|
}
|
|
3472
|
-
function
|
|
3473
|
+
function nc(s, e) {
|
|
3473
3474
|
if (s === e) return !0;
|
|
3474
3475
|
if (s === void 0 || e === void 0) return !1;
|
|
3475
3476
|
const t = rs.omitBy((r, n) => n.startsWith("__"));
|
|
3476
3477
|
return rs.isDeepEqual(t(s), t(e));
|
|
3477
3478
|
}
|
|
3478
|
-
function
|
|
3479
|
+
function oc(s, e, t) {
|
|
3479
3480
|
return K.make(
|
|
3480
3481
|
(r) => {
|
|
3481
|
-
var v, h, b,
|
|
3482
|
+
var v, h, b, P, B, F, j, V;
|
|
3482
3483
|
const n = r.accessor(s).node(), i = N(n.getKeyValueAsJson(Lr)), o = N(n.getKeyValueAsJson(_e)), a = N(n.getKeyValueAsJson(qe)), c = N(n.getKeyValueAsJson(de)), l = N(
|
|
3483
3484
|
n.getKeyValueAsJson(dt)
|
|
3484
3485
|
), u = /* @__PURE__ */ new Map();
|
|
3485
|
-
for (const { id:
|
|
3486
|
+
for (const { id: E } of re(c)) {
|
|
3486
3487
|
const $ = n.traverse({
|
|
3487
|
-
field: q(
|
|
3488
|
+
field: q(E, "currentArgs"),
|
|
3488
3489
|
assertFieldType: "Dynamic",
|
|
3489
3490
|
errorIfFieldNotSet: !0
|
|
3490
3491
|
}), C = $.getDataAsJson();
|
|
3491
3492
|
let G;
|
|
3492
3493
|
const ce = n.traverse({
|
|
3493
|
-
field: q(
|
|
3494
|
+
field: q(E, "prodArgs"),
|
|
3494
3495
|
assertFieldType: "Dynamic",
|
|
3495
3496
|
stableIfNotFound: !0
|
|
3496
3497
|
});
|
|
3497
3498
|
if (ce !== void 0) {
|
|
3498
3499
|
const z = ce.getDataAsJson(), M = n.getField({
|
|
3499
|
-
field: q(
|
|
3500
|
+
field: q(E, "prodOutput"),
|
|
3500
3501
|
assertFieldType: "Dynamic",
|
|
3501
3502
|
errorIfFieldNotFound: !0
|
|
3502
3503
|
}), W = n.getField({
|
|
3503
|
-
field: q(
|
|
3504
|
+
field: q(E, "prodUiCtx"),
|
|
3504
3505
|
assertFieldType: "Dynamic",
|
|
3505
3506
|
errorIfFieldNotFound: !0
|
|
3506
3507
|
});
|
|
3507
3508
|
G = {
|
|
3508
3509
|
arguments: z,
|
|
3509
|
-
stale: !
|
|
3510
|
+
stale: !nc(C, z),
|
|
3510
3511
|
outputError: M.error !== void 0 || W.error !== void 0 || ((v = M.value) == null ? void 0 : v.getError()) !== void 0 || ((h = W.value) == null ? void 0 : h.getError()) !== void 0,
|
|
3511
|
-
outputsError: ((b = M.error) == null ? void 0 : b.getDataAsString()) ?? ((B = (
|
|
3512
|
+
outputsError: ((b = M.error) == null ? void 0 : b.getDataAsString()) ?? ((B = (P = M.value) == null ? void 0 : P.getError()) == null ? void 0 : B.getDataAsString()),
|
|
3512
3513
|
exportsError: ((F = W.error) == null ? void 0 : F.getDataAsString()) ?? ((V = (j = W.value) == null ? void 0 : j.getError()) == null ? void 0 : V.getDataAsString()),
|
|
3513
3514
|
finished: (M.value !== void 0 && M.value.getIsReadyOrError() || M.error !== void 0 && M.error.getIsReadyOrError()) && (W.value !== void 0 && W.value.getIsReadyOrError() || W.error !== void 0 && W.error.getIsReadyOrError())
|
|
3514
3515
|
};
|
|
3515
3516
|
}
|
|
3516
|
-
u.set(
|
|
3517
|
+
u.set(E, { currentArguments: C, prod: G, argsRid: $.resourceInfo.id });
|
|
3517
3518
|
}
|
|
3518
|
-
const d =
|
|
3519
|
-
const $ = He(n,
|
|
3519
|
+
const d = nt(c, (E) => {
|
|
3520
|
+
const $ = He(n, E), C = u.get(E), G = C.currentArguments;
|
|
3520
3521
|
return {
|
|
3521
3522
|
args: G,
|
|
3522
3523
|
enrichmentTargets: t.projectHelper.getEnrichmentTargets(() => $.cfg, () => G, { argsRid: C.argsRid, blockPackRid: $.bpResourceId })
|
|
3523
3524
|
};
|
|
3524
|
-
}), p = new Set(l.blocksInLimbo), f = [...re(c)].map(({ id:
|
|
3525
|
+
}), p = new Set(l.blocksInLimbo), f = [...re(c)].map(({ id: E, label: $, renderingMode: C }) => {
|
|
3525
3526
|
var A, T, x, H, U;
|
|
3526
|
-
const G = N(u.get(
|
|
3527
|
+
const G = N(u.get(E)), ce = N(d.nodes.get(E));
|
|
3527
3528
|
let z = "NotCalculated";
|
|
3528
|
-
G.prod !== void 0 && (p.has(
|
|
3529
|
-
const M = He(n,
|
|
3529
|
+
G.prod !== void 0 && (p.has(E) ? z = "Limbo" : z = G.prod.finished ? "Done" : "Running");
|
|
3530
|
+
const M = He(n, E), { sections: W, title: g, inputsValid: m, sdkVersion: w, featureFlags: y, isIncompatibleWithRuntime: R } = je(M, ({ bpId: oe, cfg: Se }) => {
|
|
3530
3531
|
if (!t.runtimeCapabilities.checkCompatibility(Se.featureFlags))
|
|
3531
3532
|
return {
|
|
3532
3533
|
isIncompatibleWithRuntime: !0,
|
|
3533
3534
|
featureFlags: Se.featureFlags
|
|
3534
3535
|
};
|
|
3535
|
-
const bt = Br(s,
|
|
3536
|
+
const bt = Br(s, E), ue = ft(Se);
|
|
3536
3537
|
return {
|
|
3537
3538
|
sections: xe(
|
|
3538
3539
|
t,
|
|
@@ -3569,7 +3570,7 @@ function sc(s, e, t) {
|
|
|
3569
3570
|
isIncompatibleWithRuntime: !1
|
|
3570
3571
|
};
|
|
3571
3572
|
}) || {}, k = n.traverse({
|
|
3572
|
-
field: q(
|
|
3573
|
+
field: q(E, "blockSettings"),
|
|
3573
3574
|
assertFieldType: "Dynamic",
|
|
3574
3575
|
errorIfFieldNotSet: !0
|
|
3575
3576
|
}).getDataAsJson(), O = je(
|
|
@@ -3577,15 +3578,15 @@ function sc(s, e, t) {
|
|
|
3577
3578
|
({ info: oe }) => t.blockUpdateWatcher.get({ currentSpec: oe.source, settings: k })
|
|
3578
3579
|
);
|
|
3579
3580
|
return {
|
|
3580
|
-
projectResourceId:
|
|
3581
|
-
id:
|
|
3581
|
+
projectResourceId: Ee(s.rid),
|
|
3582
|
+
id: E,
|
|
3582
3583
|
label: g ?? $,
|
|
3583
3584
|
title: g ?? $,
|
|
3584
3585
|
renderingMode: C,
|
|
3585
3586
|
stale: ((A = G.prod) == null ? void 0 : A.stale) !== !1 || z === "Limbo",
|
|
3586
3587
|
missingReference: ce.missingReferences,
|
|
3587
|
-
upstreams: [...d.traverseIdsExcludingRoots("upstream",
|
|
3588
|
-
downstreams: [...d.traverseIdsExcludingRoots("downstream",
|
|
3588
|
+
upstreams: [...d.traverseIdsExcludingRoots("upstream", E)],
|
|
3589
|
+
downstreams: [...d.traverseIdsExcludingRoots("downstream", E)],
|
|
3589
3590
|
calculationStatus: z,
|
|
3590
3591
|
outputErrors: ((T = G.prod) == null ? void 0 : T.outputError) === !0,
|
|
3591
3592
|
outputsError: (x = G.prod) == null ? void 0 : x.outputsError,
|
|
@@ -3599,7 +3600,7 @@ function sc(s, e, t) {
|
|
|
3599
3600
|
sdkVersion: w,
|
|
3600
3601
|
featureFlags: y,
|
|
3601
3602
|
isIncompatibleWithRuntime: R,
|
|
3602
|
-
navigationState: e.getState(
|
|
3603
|
+
navigationState: e.getState(E)
|
|
3603
3604
|
};
|
|
3604
3605
|
});
|
|
3605
3606
|
return {
|
|
@@ -3632,7 +3633,7 @@ function sc(s, e, t) {
|
|
|
3632
3633
|
}
|
|
3633
3634
|
).withStableType();
|
|
3634
3635
|
}
|
|
3635
|
-
function
|
|
3636
|
+
function ic(s, e) {
|
|
3636
3637
|
const t = s.node();
|
|
3637
3638
|
if (pe(t.resourceType, Mn)) {
|
|
3638
3639
|
const r = t.getDataAsJson();
|
|
@@ -3649,10 +3650,10 @@ function nc(s, e) {
|
|
|
3649
3650
|
} else
|
|
3650
3651
|
throw new Error(`Unsupported resource type: ${JSON.stringify(t.resourceType)}`);
|
|
3651
3652
|
}
|
|
3652
|
-
function
|
|
3653
|
+
function ac(s, e) {
|
|
3653
3654
|
if (s !== void 0)
|
|
3654
3655
|
return K.make(
|
|
3655
|
-
(t) =>
|
|
3656
|
+
(t) => ic(t.accessor(s), e),
|
|
3656
3657
|
{
|
|
3657
3658
|
postprocessValue: (t) => {
|
|
3658
3659
|
if (t !== void 0) {
|
|
@@ -3664,7 +3665,7 @@ function oc(s, e) {
|
|
|
3664
3665
|
}
|
|
3665
3666
|
).withStableType();
|
|
3666
3667
|
}
|
|
3667
|
-
function
|
|
3668
|
+
function cc(s, e, t) {
|
|
3668
3669
|
return K.make(
|
|
3669
3670
|
(r) => {
|
|
3670
3671
|
var a;
|
|
@@ -3677,7 +3678,7 @@ function ic(s, e, t) {
|
|
|
3677
3678
|
{ field: _n, assertFieldType: "Input" }
|
|
3678
3679
|
)) == null ? void 0 : a.persist();
|
|
3679
3680
|
return {
|
|
3680
|
-
path:
|
|
3681
|
+
path: ac(o, t),
|
|
3681
3682
|
sdkVersion: i == null ? void 0 : i.cfg.sdkVersion
|
|
3682
3683
|
};
|
|
3683
3684
|
},
|
|
@@ -3687,7 +3688,7 @@ function ic(s, e, t) {
|
|
|
3687
3688
|
function eo(s, e, t) {
|
|
3688
3689
|
if (t === void 0)
|
|
3689
3690
|
return K.make((o) => eo(s, e, o), {
|
|
3690
|
-
key: `inputs#${
|
|
3691
|
+
key: `inputs#${Ee(s.rid)}#${e}`
|
|
3691
3692
|
});
|
|
3692
3693
|
const r = t.accessor(s).node(), n = Br(s, e), i = n.uiState(t);
|
|
3693
3694
|
return {
|
|
@@ -3698,8 +3699,8 @@ function eo(s, e, t) {
|
|
|
3698
3699
|
ui: i !== void 0 ? Qr(JSON.parse(i)) : void 0
|
|
3699
3700
|
};
|
|
3700
3701
|
}
|
|
3701
|
-
function
|
|
3702
|
-
const r = "outputs#" +
|
|
3702
|
+
function lc(s, e, t) {
|
|
3703
|
+
const r = "outputs#" + Ee(s.rid) + "#" + e;
|
|
3703
3704
|
return K.make(
|
|
3704
3705
|
(n) => {
|
|
3705
3706
|
Q().logOutputRecalculations && console.log(`blockOutput recalculation : ${r} (${n.changeSourceMarker}; ${n.bodyInvocations} invocations)`);
|
|
@@ -3716,13 +3717,13 @@ function ac(s, e, t) {
|
|
|
3716
3717
|
{ key: r }
|
|
3717
3718
|
).withStableType();
|
|
3718
3719
|
}
|
|
3719
|
-
function
|
|
3720
|
+
function uc(s, e) {
|
|
3720
3721
|
return K.make((t) => {
|
|
3721
3722
|
const r = t.accessor(s).node(), n = N(r.getKeyValueAsJson(de)), i = [];
|
|
3722
3723
|
for (const { id: o } of re(n)) {
|
|
3723
3724
|
const a = He(r, o);
|
|
3724
3725
|
if (a === void 0) continue;
|
|
3725
|
-
const c = Object.entries(a.cfg.outputs).map(([, u]) => u).filter((u) =>
|
|
3726
|
+
const c = Object.entries(a.cfg.outputs).map(([, u]) => u).filter((u) => sc(u)).map((u) => u);
|
|
3726
3727
|
if (c.length === 0) continue;
|
|
3727
3728
|
const l = Wn(r.persist(), o);
|
|
3728
3729
|
for (const u of c)
|
|
@@ -3733,7 +3734,7 @@ function cc(s, e) {
|
|
|
3733
3734
|
return i;
|
|
3734
3735
|
});
|
|
3735
3736
|
}
|
|
3736
|
-
class
|
|
3737
|
+
class dc {
|
|
3737
3738
|
constructor() {
|
|
3738
3739
|
S(this, "states", /* @__PURE__ */ new Map());
|
|
3739
3740
|
}
|
|
@@ -3760,7 +3761,7 @@ class lc {
|
|
|
3760
3761
|
t !== void 0 && (this.states.delete(e), t.change.markChanged("block deleted"));
|
|
3761
3762
|
}
|
|
3762
3763
|
}
|
|
3763
|
-
function
|
|
3764
|
+
function pc(s) {
|
|
3764
3765
|
return K.make((e) => {
|
|
3765
3766
|
const t = e.accessor(s).node(), r = N(t.getKeyValueAsJson(de));
|
|
3766
3767
|
return {
|
|
@@ -3768,31 +3769,31 @@ function uc(s) {
|
|
|
3768
3769
|
};
|
|
3769
3770
|
});
|
|
3770
3771
|
}
|
|
3771
|
-
const
|
|
3772
|
-
async function
|
|
3772
|
+
const fc = "1", hc = "BlockFrontendState/";
|
|
3773
|
+
async function gc(s, e) {
|
|
3773
3774
|
await s.withWriteTx("ProjectMigration", async (t) => {
|
|
3774
3775
|
const r = await t.getKValueJson(e, ut);
|
|
3775
3776
|
if (r !== Ge) {
|
|
3776
|
-
if (r ===
|
|
3777
|
-
await
|
|
3777
|
+
if (r === fc)
|
|
3778
|
+
await mc(t, e);
|
|
3778
3779
|
else
|
|
3779
3780
|
throw new Error(`Unknown project schema version: ${r}`);
|
|
3780
3781
|
t.setKValue(e, ut, JSON.stringify(Ge)), await t.commit();
|
|
3781
3782
|
}
|
|
3782
3783
|
});
|
|
3783
3784
|
}
|
|
3784
|
-
async function
|
|
3785
|
+
async function mc(s, e) {
|
|
3785
3786
|
const [t, r] = await Promise.all([
|
|
3786
3787
|
s.getKValueJson(e, de),
|
|
3787
3788
|
s.listKeyValues(e)
|
|
3788
3789
|
]), n = new Map(r.map((i) => [i.key, i.value]));
|
|
3789
3790
|
for (const i of re(t)) {
|
|
3790
|
-
const o =
|
|
3791
|
+
const o = hc + i.id, a = n.get(o), c = a ? Ue(a) : {}, l = s.createJsonGzValue(c), u = J(e, q(i.id, "uiState"));
|
|
3791
3792
|
s.createField(u, "Dynamic", l), s.deleteKValue(e, o);
|
|
3792
3793
|
}
|
|
3793
3794
|
}
|
|
3794
3795
|
function ws(s) {
|
|
3795
|
-
return JSON.stringify(s, (e, t) => typeof t == "bigint" ?
|
|
3796
|
+
return JSON.stringify(s, (e, t) => typeof t == "bigint" ? Ee(t) : ArrayBuffer.isView(t) || t instanceof Int8Array || t instanceof Uint8Array || t instanceof Uint8ClampedArray || t instanceof Int16Array || t instanceof Uint16Array || t instanceof Int32Array || t instanceof Uint32Array || t instanceof Float32Array || t instanceof Float64Array || t instanceof BigInt64Array || t instanceof BigUint64Array ? Buffer.from(t.buffer, t.byteOffset, t.byteLength).toString("base64") : Buffer.isBuffer(t) ? t.toString("base64") : t);
|
|
3796
3797
|
}
|
|
3797
3798
|
class jr {
|
|
3798
3799
|
constructor(e, t, r) {
|
|
@@ -3801,7 +3802,7 @@ class jr {
|
|
|
3801
3802
|
/** Data for the left panel, contain basic information about block status. */
|
|
3802
3803
|
S(this, "overview");
|
|
3803
3804
|
S(this, "overviewLight");
|
|
3804
|
-
S(this, "navigationStates", new
|
|
3805
|
+
S(this, "navigationStates", new dc());
|
|
3805
3806
|
// null is set for deleted blocks
|
|
3806
3807
|
S(this, "blockComputables", /* @__PURE__ */ new Map());
|
|
3807
3808
|
S(this, "blockFrontends", /* @__PURE__ */ new Map());
|
|
@@ -3809,18 +3810,18 @@ class jr {
|
|
|
3809
3810
|
S(this, "refreshLoopResult");
|
|
3810
3811
|
S(this, "abortController", new AbortController());
|
|
3811
3812
|
S(this, "destroyed", !1);
|
|
3812
|
-
this.env = e, this.projectTree = r, this.overview =
|
|
3813
|
+
this.env = e, this.projectTree = r, this.overview = oc(
|
|
3813
3814
|
r.entry(),
|
|
3814
3815
|
this.navigationStates,
|
|
3815
3816
|
e
|
|
3816
|
-
).withPreCalculatedValueTree(), this.overviewLight =
|
|
3817
|
+
).withPreCalculatedValueTree(), this.overviewLight = pc(r.entry()).withPreCalculatedValueTree(), this.rid = t, this.refreshLoopResult = this.refreshLoop(), this.activeConfigs = uc(r.entry(), e);
|
|
3817
3818
|
}
|
|
3818
3819
|
async refreshLoop() {
|
|
3819
3820
|
for (; !this.destroyed; )
|
|
3820
3821
|
try {
|
|
3821
3822
|
await rt(this.env.projectHelper, this.env.pl, this.rid, (r) => {
|
|
3822
3823
|
r.doRefresh(this.env.ops.stagingRenderingRate);
|
|
3823
|
-
}), await this.activeConfigs.getValue(), await
|
|
3824
|
+
}), await this.activeConfigs.getValue(), await Pn(this.env.ops.projectRefreshInterval, this.abortController.signal);
|
|
3824
3825
|
const e = await this.overviewLight.getValue(), t = new Set(e.listOfBlocks);
|
|
3825
3826
|
for (const r of this.blockComputables.keys())
|
|
3826
3827
|
if (!t.has(r)) {
|
|
@@ -3828,12 +3829,12 @@ class jr {
|
|
|
3828
3829
|
n != null && n.fullState.resetState(), this.blockComputables.set(r, null);
|
|
3829
3830
|
}
|
|
3830
3831
|
} catch (e) {
|
|
3831
|
-
if (
|
|
3832
|
+
if (xo(e)) {
|
|
3832
3833
|
console.warn(
|
|
3833
3834
|
"project refresh routine terminated, because project was externally deleted"
|
|
3834
3835
|
);
|
|
3835
3836
|
break;
|
|
3836
|
-
} else if (!
|
|
3837
|
+
} else if (!Vo(e))
|
|
3837
3838
|
throw new Error("Unexpected exception", { cause: e });
|
|
3838
3839
|
}
|
|
3839
3840
|
}
|
|
@@ -3848,7 +3849,7 @@ class jr {
|
|
|
3848
3849
|
*
|
|
3849
3850
|
* @return returns newly created block id
|
|
3850
3851
|
* */
|
|
3851
|
-
async addBlock(e, t, r, n = void 0, i =
|
|
3852
|
+
async addBlock(e, t, r, n = void 0, i = ge()) {
|
|
3852
3853
|
const o = await this.env.bpPreparer.prepare(t), a = await this.env.bpPreparer.getBlockConfigContainer(t), c = Ce(a);
|
|
3853
3854
|
return await se(
|
|
3854
3855
|
this.env.projectHelper,
|
|
@@ -3882,7 +3883,7 @@ class jr {
|
|
|
3882
3883
|
*
|
|
3883
3884
|
* @return returns newly created block id
|
|
3884
3885
|
* */
|
|
3885
|
-
async duplicateBlock(e, t, r = void 0, n =
|
|
3886
|
+
async duplicateBlock(e, t, r = void 0, n = ge()) {
|
|
3886
3887
|
return await se(
|
|
3887
3888
|
this.env.projectHelper,
|
|
3888
3889
|
this.env.pl,
|
|
@@ -4038,7 +4039,7 @@ class jr {
|
|
|
4038
4039
|
const t = this.blockComputables.get(e);
|
|
4039
4040
|
if (t === null) throw new Error(`Block ${e} is deleted`);
|
|
4040
4041
|
if (t === void 0) {
|
|
4041
|
-
const r =
|
|
4042
|
+
const r = lc(this.projectTree.entry(), e, this.env), i = {
|
|
4042
4043
|
fullState: K.make(
|
|
4043
4044
|
(o) => ({
|
|
4044
4045
|
argsAndUiState: eo(this.projectTree.entry(), e, o),
|
|
@@ -4049,7 +4050,7 @@ class jr {
|
|
|
4049
4050
|
{
|
|
4050
4051
|
postprocessValue: (o) => {
|
|
4051
4052
|
var u, d, p;
|
|
4052
|
-
const a = (p = (d = (u = o.overview) == null ? void 0 : u.blocks) == null ? void 0 : d.find((f) => f.id == e)) == null ? void 0 : p.sdkVersion, l = a &&
|
|
4053
|
+
const a = (p = (d = (u = o.overview) == null ? void 0 : u.blocks) == null ? void 0 : d.find((f) => f.id == e)) == null ? void 0 : p.sdkVersion, l = a && yc(a) && o.outputs !== void 0 ? Sc(o.outputs) : o.outputs;
|
|
4053
4054
|
return {
|
|
4054
4055
|
...o.argsAndUiState,
|
|
4055
4056
|
outputs: l,
|
|
@@ -4077,7 +4078,7 @@ class jr {
|
|
|
4077
4078
|
getBlockFrontend(e) {
|
|
4078
4079
|
const t = this.blockFrontends.get(e);
|
|
4079
4080
|
if (t === void 0) {
|
|
4080
|
-
const r =
|
|
4081
|
+
const r = cc(
|
|
4081
4082
|
this.projectTree.entry(),
|
|
4082
4083
|
e,
|
|
4083
4084
|
this.env
|
|
@@ -4097,14 +4098,14 @@ class jr {
|
|
|
4097
4098
|
await this.destroy();
|
|
4098
4099
|
}
|
|
4099
4100
|
static async init(e, t) {
|
|
4100
|
-
await
|
|
4101
|
+
await gc(e.pl, t), await rt(e.projectHelper, e.pl, t, (n) => {
|
|
4101
4102
|
});
|
|
4102
4103
|
const r = await Rn.init(
|
|
4103
4104
|
e.pl,
|
|
4104
4105
|
t,
|
|
4105
4106
|
{
|
|
4106
4107
|
...e.ops.defaultTreeOptions,
|
|
4107
|
-
pruning:
|
|
4108
|
+
pruning: vc
|
|
4108
4109
|
},
|
|
4109
4110
|
e.logger
|
|
4110
4111
|
);
|
|
@@ -4114,13 +4115,13 @@ class jr {
|
|
|
4114
4115
|
var c, l;
|
|
4115
4116
|
return (((c = a.data) == null ? void 0 : c.byteLength) ?? 0) - (((l = o.data) == null ? void 0 : l.byteLength) ?? 0);
|
|
4116
4117
|
});
|
|
4117
|
-
const i =
|
|
4118
|
-
await at.writeFile(`${
|
|
4118
|
+
const i = qo(n);
|
|
4119
|
+
await at.writeFile(`${Ee(t)}.json`, ws(n)), await at.writeFile(`${Ee(t)}.stats.json`, ws(i));
|
|
4119
4120
|
}
|
|
4120
4121
|
return new jr(e, t, r);
|
|
4121
4122
|
}
|
|
4122
4123
|
}
|
|
4123
|
-
function
|
|
4124
|
+
function vc(s) {
|
|
4124
4125
|
if (s.type.name.startsWith("StreamWorkdir/"))
|
|
4125
4126
|
return [];
|
|
4126
4127
|
switch (s.type.name) {
|
|
@@ -4134,14 +4135,14 @@ function gc(s) {
|
|
|
4134
4135
|
return s.fields;
|
|
4135
4136
|
}
|
|
4136
4137
|
}
|
|
4137
|
-
function
|
|
4138
|
-
return !
|
|
4138
|
+
function yc(s) {
|
|
4139
|
+
return !wc(s, "1.26.0");
|
|
4139
4140
|
}
|
|
4140
|
-
function
|
|
4141
|
+
function wc(s, e) {
|
|
4141
4142
|
const t = s.split(".").map(Number), r = e.split(".").map(Number);
|
|
4142
4143
|
return t[0] > r[0] || t[0] === r[0] && t[1] > r[1] || t[0] === r[0] && t[1] === r[1] && t[2] > r[2];
|
|
4143
4144
|
}
|
|
4144
|
-
function
|
|
4145
|
+
function Sc(s) {
|
|
4145
4146
|
const e = {};
|
|
4146
4147
|
for (const [t, r] of Object.entries(s)) {
|
|
4147
4148
|
if (r.ok) {
|
|
@@ -4198,7 +4199,7 @@ function ro(s) {
|
|
|
4198
4199
|
pframesSpillPath: _.join(s, "pframes")
|
|
4199
4200
|
};
|
|
4200
4201
|
}
|
|
4201
|
-
const
|
|
4202
|
+
const bc = {
|
|
4202
4203
|
...to,
|
|
4203
4204
|
defaultTreeOptions: {
|
|
4204
4205
|
pollingInterval: 350,
|
|
@@ -4213,13 +4214,13 @@ const wc = {
|
|
|
4213
4214
|
projectRefreshInterval: 700,
|
|
4214
4215
|
stagingRenderingRate: 5
|
|
4215
4216
|
};
|
|
4216
|
-
function
|
|
4217
|
+
function kc(s) {
|
|
4217
4218
|
return {
|
|
4218
4219
|
...ro(s),
|
|
4219
4220
|
frontendDownloadPath: _.join(s, "frontend")
|
|
4220
4221
|
};
|
|
4221
4222
|
}
|
|
4222
|
-
function
|
|
4223
|
+
function Rc(s) {
|
|
4223
4224
|
return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
|
|
4224
4225
|
}
|
|
4225
4226
|
var st = { exports: {} }, Ft, Ss;
|
|
@@ -4268,12 +4269,12 @@ function ze() {
|
|
|
4268
4269
|
["\\d", n],
|
|
4269
4270
|
[p, r]
|
|
4270
4271
|
], v = (b) => {
|
|
4271
|
-
for (const [
|
|
4272
|
-
b = b.split(`${
|
|
4272
|
+
for (const [P, B] of f)
|
|
4273
|
+
b = b.split(`${P}*`).join(`${P}{0,${B}}`).split(`${P}+`).join(`${P}{1,${B}}`);
|
|
4273
4274
|
return b;
|
|
4274
|
-
}, h = (b,
|
|
4275
|
-
const F = v(
|
|
4276
|
-
i(b, j,
|
|
4275
|
+
}, h = (b, P, B) => {
|
|
4276
|
+
const F = v(P), j = d++;
|
|
4277
|
+
i(b, j, P), u[b] = j, c[j] = P, l[j] = F, o[j] = new RegExp(P, B ? "g" : void 0), a[j] = new RegExp(F, B ? "g" : void 0);
|
|
4277
4278
|
};
|
|
4278
4279
|
h("NUMERICIDENTIFIER", "0|[1-9]\\d*"), h("NUMERICIDENTIFIERLOOSE", "\\d+"), h("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${p}*`), h("MAINVERSION", `(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`), h("MAINVERSIONLOOSE", `(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`), h("PRERELEASEIDENTIFIER", `(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIER]})`), h("PRERELEASEIDENTIFIERLOOSE", `(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIERLOOSE]})`), h("PRERELEASE", `(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`), h("PRERELEASELOOSE", `(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`), h("BUILDIDENTIFIER", `${p}+`), h("BUILD", `(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`), h("FULLPLAIN", `v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`), h("FULL", `^${c[u.FULLPLAIN]}$`), h("LOOSEPLAIN", `[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`), h("LOOSE", `^${c[u.LOOSEPLAIN]}$`), h("GTLT", "((?:<|>)?=?)"), h("XRANGEIDENTIFIERLOOSE", `${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), h("XRANGEIDENTIFIER", `${c[u.NUMERICIDENTIFIER]}|x|X|\\*`), h("XRANGEPLAIN", `[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`), h("XRANGEPLAINLOOSE", `[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`), h("XRANGE", `^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`), h("XRANGELOOSE", `^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`), h("COERCEPLAIN", `(^|[^\\d])(\\d{1,${t}})(?:\\.(\\d{1,${t}}))?(?:\\.(\\d{1,${t}}))?`), h("COERCE", `${c[u.COERCEPLAIN]}(?:$|[^\\d])`), h("COERCEFULL", c[u.COERCEPLAIN] + `(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`), h("COERCERTL", c[u.COERCE], !0), h("COERCERTLFULL", c[u.COERCEFULL], !0), h("LONETILDE", "(?:~>?)"), h("TILDETRIM", `(\\s*)${c[u.LONETILDE]}\\s+`, !0), e.tildeTrimReplace = "$1~", h("TILDE", `^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`), h("TILDELOOSE", `^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`), h("LONECARET", "(?:\\^)"), h("CARETTRIM", `(\\s*)${c[u.LONECARET]}\\s+`, !0), e.caretTrimReplace = "$1^", h("CARET", `^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`), h("CARETLOOSE", `^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`), h("COMPARATORLOOSE", `^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`), h("COMPARATOR", `^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`), h("COMPARATORTRIM", `(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`, !0), e.comparatorTrimReplace = "$1$2$3", h("HYPHENRANGE", `^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`), h("HYPHENRANGELOOSE", `^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`), h("STAR", "(<|>)?=?\\s*\\*"), h("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), h("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
4279
4280
|
}(st, st.exports)), st.exports;
|
|
@@ -4298,10 +4299,10 @@ function so() {
|
|
|
4298
4299
|
rcompareIdentifiers: (r, n) => e(n, r)
|
|
4299
4300
|
}, $t;
|
|
4300
4301
|
}
|
|
4301
|
-
var At,
|
|
4302
|
+
var At, Ps;
|
|
4302
4303
|
function Z() {
|
|
4303
|
-
if (
|
|
4304
|
-
|
|
4304
|
+
if (Ps) return At;
|
|
4305
|
+
Ps = 1;
|
|
4305
4306
|
const s = vt(), { MAX_LENGTH: e, MAX_SAFE_INTEGER: t } = mt(), { safeRe: r, t: n } = ze(), i = xr(), { compareIdentifiers: o } = so();
|
|
4306
4307
|
class a {
|
|
4307
4308
|
constructor(l, u) {
|
|
@@ -4459,10 +4460,10 @@ function Z() {
|
|
|
4459
4460
|
}
|
|
4460
4461
|
return At = a, At;
|
|
4461
4462
|
}
|
|
4462
|
-
var Lt,
|
|
4463
|
+
var Lt, Es;
|
|
4463
4464
|
function Te() {
|
|
4464
|
-
if (
|
|
4465
|
-
|
|
4465
|
+
if (Es) return Lt;
|
|
4466
|
+
Es = 1;
|
|
4466
4467
|
const s = Z();
|
|
4467
4468
|
return Lt = (t, r, n = !1) => {
|
|
4468
4469
|
if (t instanceof s)
|
|
@@ -4477,7 +4478,7 @@ function Te() {
|
|
|
4477
4478
|
}, Lt;
|
|
4478
4479
|
}
|
|
4479
4480
|
var Dt, Os;
|
|
4480
|
-
function
|
|
4481
|
+
function Cc() {
|
|
4481
4482
|
if (Os) return Dt;
|
|
4482
4483
|
Os = 1;
|
|
4483
4484
|
const s = Te();
|
|
@@ -4487,7 +4488,7 @@ function kc() {
|
|
|
4487
4488
|
}, Dt;
|
|
4488
4489
|
}
|
|
4489
4490
|
var Nt, Fs;
|
|
4490
|
-
function
|
|
4491
|
+
function Pc() {
|
|
4491
4492
|
if (Fs) return Nt;
|
|
4492
4493
|
Fs = 1;
|
|
4493
4494
|
const s = Te();
|
|
@@ -4497,7 +4498,7 @@ function Rc() {
|
|
|
4497
4498
|
}, Nt;
|
|
4498
4499
|
}
|
|
4499
4500
|
var Bt, Ts;
|
|
4500
|
-
function
|
|
4501
|
+
function Ec() {
|
|
4501
4502
|
if (Ts) return Bt;
|
|
4502
4503
|
Ts = 1;
|
|
4503
4504
|
const s = Z();
|
|
@@ -4514,7 +4515,7 @@ function Cc() {
|
|
|
4514
4515
|
}, Bt;
|
|
4515
4516
|
}
|
|
4516
4517
|
var jt, Is;
|
|
4517
|
-
function
|
|
4518
|
+
function Oc() {
|
|
4518
4519
|
if (Is) return jt;
|
|
4519
4520
|
Is = 1;
|
|
4520
4521
|
const s = Te();
|
|
@@ -4534,28 +4535,28 @@ function Ec() {
|
|
|
4534
4535
|
}, jt;
|
|
4535
4536
|
}
|
|
4536
4537
|
var xt, $s;
|
|
4537
|
-
function
|
|
4538
|
+
function Fc() {
|
|
4538
4539
|
if ($s) return xt;
|
|
4539
4540
|
$s = 1;
|
|
4540
4541
|
const s = Z();
|
|
4541
4542
|
return xt = (t, r) => new s(t, r).major, xt;
|
|
4542
4543
|
}
|
|
4543
4544
|
var Vt, As;
|
|
4544
|
-
function
|
|
4545
|
+
function Tc() {
|
|
4545
4546
|
if (As) return Vt;
|
|
4546
4547
|
As = 1;
|
|
4547
4548
|
const s = Z();
|
|
4548
4549
|
return Vt = (t, r) => new s(t, r).minor, Vt;
|
|
4549
4550
|
}
|
|
4550
4551
|
var Ut, Ls;
|
|
4551
|
-
function
|
|
4552
|
+
function Ic() {
|
|
4552
4553
|
if (Ls) return Ut;
|
|
4553
4554
|
Ls = 1;
|
|
4554
4555
|
const s = Z();
|
|
4555
4556
|
return Ut = (t, r) => new s(t, r).patch, Ut;
|
|
4556
4557
|
}
|
|
4557
4558
|
var Mt, Ds;
|
|
4558
|
-
function
|
|
4559
|
+
function $c() {
|
|
4559
4560
|
if (Ds) return Mt;
|
|
4560
4561
|
Ds = 1;
|
|
4561
4562
|
const s = Te();
|
|
@@ -4572,14 +4573,14 @@ function ie() {
|
|
|
4572
4573
|
return Jt = (t, r, n) => new s(t, n).compare(new s(r, n)), Jt;
|
|
4573
4574
|
}
|
|
4574
4575
|
var Gt, Bs;
|
|
4575
|
-
function
|
|
4576
|
+
function Ac() {
|
|
4576
4577
|
if (Bs) return Gt;
|
|
4577
4578
|
Bs = 1;
|
|
4578
4579
|
const s = ie();
|
|
4579
4580
|
return Gt = (t, r, n) => s(r, t, n), Gt;
|
|
4580
4581
|
}
|
|
4581
4582
|
var _t, js;
|
|
4582
|
-
function
|
|
4583
|
+
function Lc() {
|
|
4583
4584
|
if (js) return _t;
|
|
4584
4585
|
js = 1;
|
|
4585
4586
|
const s = ie();
|
|
@@ -4596,14 +4597,14 @@ function Vr() {
|
|
|
4596
4597
|
}, qt;
|
|
4597
4598
|
}
|
|
4598
4599
|
var Kt, Vs;
|
|
4599
|
-
function
|
|
4600
|
+
function Dc() {
|
|
4600
4601
|
if (Vs) return Kt;
|
|
4601
4602
|
Vs = 1;
|
|
4602
4603
|
const s = Vr();
|
|
4603
4604
|
return Kt = (t, r) => t.sort((n, i) => s(n, i, r)), Kt;
|
|
4604
4605
|
}
|
|
4605
4606
|
var Ht, Us;
|
|
4606
|
-
function
|
|
4607
|
+
function Nc() {
|
|
4607
4608
|
if (Us) return Ht;
|
|
4608
4609
|
Us = 1;
|
|
4609
4610
|
const s = Vr();
|
|
@@ -4682,7 +4683,7 @@ function io() {
|
|
|
4682
4683
|
}, er;
|
|
4683
4684
|
}
|
|
4684
4685
|
var tr, Ws;
|
|
4685
|
-
function
|
|
4686
|
+
function Bc() {
|
|
4686
4687
|
if (Ws) return tr;
|
|
4687
4688
|
Ws = 1;
|
|
4688
4689
|
const s = Z(), e = Te(), { safeRe: t, t: r } = ze();
|
|
@@ -4709,7 +4710,7 @@ function Dc() {
|
|
|
4709
4710
|
}, tr;
|
|
4710
4711
|
}
|
|
4711
4712
|
var rr, zs;
|
|
4712
|
-
function
|
|
4713
|
+
function jc() {
|
|
4713
4714
|
if (zs) return rr;
|
|
4714
4715
|
zs = 1;
|
|
4715
4716
|
class s {
|
|
@@ -4803,7 +4804,7 @@ function ae() {
|
|
|
4803
4804
|
intersects(m, w) {
|
|
4804
4805
|
if (!(m instanceof e))
|
|
4805
4806
|
throw new TypeError("a Range is required");
|
|
4806
|
-
return this.set.some((y) =>
|
|
4807
|
+
return this.set.some((y) => P(y, w) && m.set.some((R) => P(R, w) && y.every((k) => R.every((O) => k.intersects(O, w)))));
|
|
4807
4808
|
}
|
|
4808
4809
|
// if ANY of the sets match ALL of its comparators, then pass
|
|
4809
4810
|
test(m) {
|
|
@@ -4822,27 +4823,27 @@ function ae() {
|
|
|
4822
4823
|
}
|
|
4823
4824
|
}
|
|
4824
4825
|
sr = e;
|
|
4825
|
-
const t =
|
|
4826
|
+
const t = jc(), r = new t(), n = xr(), i = wt(), o = vt(), a = Z(), {
|
|
4826
4827
|
safeRe: c,
|
|
4827
4828
|
t: l,
|
|
4828
4829
|
comparatorTrimReplace: u,
|
|
4829
4830
|
tildeTrimReplace: d,
|
|
4830
4831
|
caretTrimReplace: p
|
|
4831
|
-
} = ze(), { FLAG_INCLUDE_PRERELEASE: f, FLAG_LOOSE: v } = mt(), h = (g) => g.value === "<0.0.0-0", b = (g) => g.value === "",
|
|
4832
|
+
} = ze(), { FLAG_INCLUDE_PRERELEASE: f, FLAG_LOOSE: v } = mt(), h = (g) => g.value === "<0.0.0-0", b = (g) => g.value === "", P = (g, m) => {
|
|
4832
4833
|
let w = !0;
|
|
4833
4834
|
const y = g.slice();
|
|
4834
4835
|
let R = y.pop();
|
|
4835
4836
|
for (; w && y.length; )
|
|
4836
4837
|
w = y.every((k) => R.intersects(k, m)), R = y.pop();
|
|
4837
4838
|
return w;
|
|
4838
|
-
}, B = (g, m) => (o("comp", g, m), g =
|
|
4839
|
+
}, B = (g, m) => (o("comp", g, m), g = E(g, m), o("caret", g), g = j(g, m), o("tildes", g), g = C(g, m), o("xrange", g), g = ce(g, m), o("stars", g), g), F = (g) => !g || g.toLowerCase() === "x" || g === "*", j = (g, m) => g.trim().split(/\s+/).map((w) => V(w, m)).join(" "), V = (g, m) => {
|
|
4839
4840
|
const w = m.loose ? c[l.TILDELOOSE] : c[l.TILDE];
|
|
4840
4841
|
return g.replace(w, (y, R, k, O, A) => {
|
|
4841
4842
|
o("tilde", g, y, R, k, O, A);
|
|
4842
4843
|
let T;
|
|
4843
4844
|
return F(R) ? T = "" : F(k) ? T = `>=${R}.0.0 <${+R + 1}.0.0-0` : F(O) ? T = `>=${R}.${k}.0 <${R}.${+k + 1}.0-0` : A ? (o("replaceTilde pr", A), T = `>=${R}.${k}.${O}-${A} <${R}.${+k + 1}.0-0`) : T = `>=${R}.${k}.${O} <${R}.${+k + 1}.0-0`, o("tilde return", T), T;
|
|
4844
4845
|
});
|
|
4845
|
-
},
|
|
4846
|
+
}, E = (g, m) => g.trim().split(/\s+/).map((w) => $(w, m)).join(" "), $ = (g, m) => {
|
|
4846
4847
|
o("caret", g, m);
|
|
4847
4848
|
const w = m.loose ? c[l.CARETLOOSE] : c[l.CARET], y = m.includePrerelease ? "-0" : "";
|
|
4848
4849
|
return g.replace(w, (R, k, O, A, T) => {
|
|
@@ -4937,14 +4938,14 @@ function St() {
|
|
|
4937
4938
|
}, or;
|
|
4938
4939
|
}
|
|
4939
4940
|
var ir, Zs;
|
|
4940
|
-
function
|
|
4941
|
+
function xc() {
|
|
4941
4942
|
if (Zs) return ir;
|
|
4942
4943
|
Zs = 1;
|
|
4943
4944
|
const s = ae();
|
|
4944
4945
|
return ir = (t, r) => new s(t, r).set.map((n) => n.map((i) => i.value).join(" ").trim().split(" ")), ir;
|
|
4945
4946
|
}
|
|
4946
4947
|
var ar, en;
|
|
4947
|
-
function
|
|
4948
|
+
function Vc() {
|
|
4948
4949
|
if (en) return ar;
|
|
4949
4950
|
en = 1;
|
|
4950
4951
|
const s = Z(), e = ae();
|
|
@@ -4961,7 +4962,7 @@ function jc() {
|
|
|
4961
4962
|
}, ar;
|
|
4962
4963
|
}
|
|
4963
4964
|
var cr, tn;
|
|
4964
|
-
function
|
|
4965
|
+
function Uc() {
|
|
4965
4966
|
if (tn) return cr;
|
|
4966
4967
|
tn = 1;
|
|
4967
4968
|
const s = Z(), e = ae();
|
|
@@ -4978,7 +4979,7 @@ function xc() {
|
|
|
4978
4979
|
}, cr;
|
|
4979
4980
|
}
|
|
4980
4981
|
var lr, rn;
|
|
4981
|
-
function
|
|
4982
|
+
function Mc() {
|
|
4982
4983
|
if (rn) return lr;
|
|
4983
4984
|
rn = 1;
|
|
4984
4985
|
const s = Z(), e = ae(), t = yt();
|
|
@@ -5014,7 +5015,7 @@ function Vc() {
|
|
|
5014
5015
|
}, lr;
|
|
5015
5016
|
}
|
|
5016
5017
|
var ur, sn;
|
|
5017
|
-
function
|
|
5018
|
+
function Jc() {
|
|
5018
5019
|
if (sn) return ur;
|
|
5019
5020
|
sn = 1;
|
|
5020
5021
|
const s = ae();
|
|
@@ -5033,13 +5034,13 @@ function Gr() {
|
|
|
5033
5034
|
const s = Z(), e = wt(), { ANY: t } = e, r = ae(), n = St(), i = yt(), o = Ur(), a = Jr(), c = Mr();
|
|
5034
5035
|
return dr = (u, d, p, f) => {
|
|
5035
5036
|
u = new s(u, f), d = new r(d, f);
|
|
5036
|
-
let v, h, b,
|
|
5037
|
+
let v, h, b, P, B;
|
|
5037
5038
|
switch (p) {
|
|
5038
5039
|
case ">":
|
|
5039
|
-
v = i, h = a, b = o,
|
|
5040
|
+
v = i, h = a, b = o, P = ">", B = ">=";
|
|
5040
5041
|
break;
|
|
5041
5042
|
case "<":
|
|
5042
|
-
v = o, h = c, b = i,
|
|
5043
|
+
v = o, h = c, b = i, P = "<", B = "<=";
|
|
5043
5044
|
break;
|
|
5044
5045
|
default:
|
|
5045
5046
|
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
|
@@ -5048,40 +5049,40 @@ function Gr() {
|
|
|
5048
5049
|
return !1;
|
|
5049
5050
|
for (let F = 0; F < d.set.length; ++F) {
|
|
5050
5051
|
const j = d.set[F];
|
|
5051
|
-
let V = null,
|
|
5052
|
+
let V = null, E = null;
|
|
5052
5053
|
if (j.forEach(($) => {
|
|
5053
|
-
$.semver === t && ($ = new e(">=0.0.0")), V = V || $,
|
|
5054
|
-
}), V.operator ===
|
|
5054
|
+
$.semver === t && ($ = new e(">=0.0.0")), V = V || $, E = E || $, v($.semver, V.semver, f) ? V = $ : b($.semver, E.semver, f) && (E = $);
|
|
5055
|
+
}), V.operator === P || V.operator === B || (!E.operator || E.operator === P) && h(u, E.semver))
|
|
5055
5056
|
return !1;
|
|
5056
|
-
if (
|
|
5057
|
+
if (E.operator === B && b(u, E.semver))
|
|
5057
5058
|
return !1;
|
|
5058
5059
|
}
|
|
5059
5060
|
return !0;
|
|
5060
5061
|
}, dr;
|
|
5061
5062
|
}
|
|
5062
5063
|
var pr, on;
|
|
5063
|
-
function
|
|
5064
|
+
function Gc() {
|
|
5064
5065
|
if (on) return pr;
|
|
5065
5066
|
on = 1;
|
|
5066
5067
|
const s = Gr();
|
|
5067
5068
|
return pr = (t, r, n) => s(t, r, ">", n), pr;
|
|
5068
5069
|
}
|
|
5069
5070
|
var fr, an;
|
|
5070
|
-
function
|
|
5071
|
+
function _c() {
|
|
5071
5072
|
if (an) return fr;
|
|
5072
5073
|
an = 1;
|
|
5073
5074
|
const s = Gr();
|
|
5074
5075
|
return fr = (t, r, n) => s(t, r, "<", n), fr;
|
|
5075
5076
|
}
|
|
5076
5077
|
var hr, cn;
|
|
5077
|
-
function
|
|
5078
|
+
function qc() {
|
|
5078
5079
|
if (cn) return hr;
|
|
5079
5080
|
cn = 1;
|
|
5080
5081
|
const s = ae();
|
|
5081
5082
|
return hr = (t, r, n) => (t = new s(t, n), r = new s(r, n), t.intersects(r, n)), hr;
|
|
5082
5083
|
}
|
|
5083
5084
|
var gr, ln;
|
|
5084
|
-
function
|
|
5085
|
+
function Kc() {
|
|
5085
5086
|
if (ln) return gr;
|
|
5086
5087
|
ln = 1;
|
|
5087
5088
|
const s = St(), e = ie();
|
|
@@ -5100,7 +5101,7 @@ function _c() {
|
|
|
5100
5101
|
}, gr;
|
|
5101
5102
|
}
|
|
5102
5103
|
var mr, un;
|
|
5103
|
-
function
|
|
5104
|
+
function Hc() {
|
|
5104
5105
|
if (un) return mr;
|
|
5105
5106
|
un = 1;
|
|
5106
5107
|
const s = ae(), e = wt(), { ANY: t } = e, r = St(), n = ie(), i = (d, p, f = {}) => {
|
|
@@ -5110,8 +5111,8 @@ function qc() {
|
|
|
5110
5111
|
let v = !1;
|
|
5111
5112
|
e: for (const h of d.set) {
|
|
5112
5113
|
for (const b of p.set) {
|
|
5113
|
-
const
|
|
5114
|
-
if (v = v ||
|
|
5114
|
+
const P = c(h, b, f);
|
|
5115
|
+
if (v = v || P !== null, P)
|
|
5115
5116
|
continue e;
|
|
5116
5117
|
}
|
|
5117
5118
|
if (v)
|
|
@@ -5137,11 +5138,11 @@ function qc() {
|
|
|
5137
5138
|
C.operator === ">" || C.operator === ">=" ? h = l(h, C, f) : C.operator === "<" || C.operator === "<=" ? b = u(b, C, f) : v.add(C.semver);
|
|
5138
5139
|
if (v.size > 1)
|
|
5139
5140
|
return null;
|
|
5140
|
-
let
|
|
5141
|
+
let P;
|
|
5141
5142
|
if (h && b) {
|
|
5142
|
-
if (
|
|
5143
|
+
if (P = n(h.semver, b.semver, f), P > 0)
|
|
5143
5144
|
return null;
|
|
5144
|
-
if (
|
|
5145
|
+
if (P === 0 && (h.operator !== ">=" || b.operator !== "<="))
|
|
5145
5146
|
return null;
|
|
5146
5147
|
}
|
|
5147
5148
|
for (const C of v) {
|
|
@@ -5152,8 +5153,8 @@ function qc() {
|
|
|
5152
5153
|
return !1;
|
|
5153
5154
|
return !0;
|
|
5154
5155
|
}
|
|
5155
|
-
let B, F, j, V,
|
|
5156
|
-
|
|
5156
|
+
let B, F, j, V, E = b && !f.includePrerelease && b.semver.prerelease.length ? b.semver : !1, $ = h && !f.includePrerelease && h.semver.prerelease.length ? h.semver : !1;
|
|
5157
|
+
E && E.prerelease.length === 1 && b.operator === "<" && E.prerelease[0] === 0 && (E = !1);
|
|
5157
5158
|
for (const C of p) {
|
|
5158
5159
|
if (V = V || C.operator === ">" || C.operator === ">=", j = j || C.operator === "<" || C.operator === "<=", h) {
|
|
5159
5160
|
if ($ && C.semver.prerelease && C.semver.prerelease.length && C.semver.major === $.major && C.semver.minor === $.minor && C.semver.patch === $.patch && ($ = !1), C.operator === ">" || C.operator === ">=") {
|
|
@@ -5163,16 +5164,16 @@ function qc() {
|
|
|
5163
5164
|
return !1;
|
|
5164
5165
|
}
|
|
5165
5166
|
if (b) {
|
|
5166
|
-
if (
|
|
5167
|
+
if (E && C.semver.prerelease && C.semver.prerelease.length && C.semver.major === E.major && C.semver.minor === E.minor && C.semver.patch === E.patch && (E = !1), C.operator === "<" || C.operator === "<=") {
|
|
5167
5168
|
if (F = u(b, C, f), F === C && F !== b)
|
|
5168
5169
|
return !1;
|
|
5169
5170
|
} else if (b.operator === "<=" && !r(b.semver, String(C), f))
|
|
5170
5171
|
return !1;
|
|
5171
5172
|
}
|
|
5172
|
-
if (!C.operator && (b || h) &&
|
|
5173
|
+
if (!C.operator && (b || h) && P !== 0)
|
|
5173
5174
|
return !1;
|
|
5174
5175
|
}
|
|
5175
|
-
return !(h && j && !b &&
|
|
5176
|
+
return !(h && j && !b && P !== 0 || b && V && !h && P !== 0 || $ || E);
|
|
5176
5177
|
}, l = (d, p, f) => {
|
|
5177
5178
|
if (!d)
|
|
5178
5179
|
return p;
|
|
@@ -5187,10 +5188,10 @@ function qc() {
|
|
|
5187
5188
|
return mr = i, mr;
|
|
5188
5189
|
}
|
|
5189
5190
|
var vr, dn;
|
|
5190
|
-
function
|
|
5191
|
+
function Wc() {
|
|
5191
5192
|
if (dn) return vr;
|
|
5192
5193
|
dn = 1;
|
|
5193
|
-
const s = ze(), e = mt(), t = Z(), r = so(), n = Te(), i =
|
|
5194
|
+
const s = ze(), e = mt(), t = Z(), r = so(), n = Te(), i = Cc(), o = Pc(), a = Ec(), c = Oc(), l = Fc(), u = Tc(), d = Ic(), p = $c(), f = ie(), v = Ac(), h = Lc(), b = Vr(), P = Dc(), B = Nc(), F = yt(), j = Ur(), V = no(), E = oo(), $ = Mr(), C = Jr(), G = io(), ce = Bc(), z = wt(), M = ae(), W = St(), g = xc(), m = Vc(), w = Uc(), y = Mc(), R = Jc(), k = Gr(), O = Gc(), A = _c(), T = qc(), x = Kc(), H = Hc();
|
|
5194
5195
|
return vr = {
|
|
5195
5196
|
parse: n,
|
|
5196
5197
|
valid: i,
|
|
@@ -5205,12 +5206,12 @@ function Kc() {
|
|
|
5205
5206
|
rcompare: v,
|
|
5206
5207
|
compareLoose: h,
|
|
5207
5208
|
compareBuild: b,
|
|
5208
|
-
sort:
|
|
5209
|
+
sort: P,
|
|
5209
5210
|
rsort: B,
|
|
5210
5211
|
gt: F,
|
|
5211
5212
|
lt: j,
|
|
5212
5213
|
eq: V,
|
|
5213
|
-
neq:
|
|
5214
|
+
neq: E,
|
|
5214
5215
|
gte: $,
|
|
5215
5216
|
lte: C,
|
|
5216
5217
|
cmp: G,
|
|
@@ -5239,13 +5240,13 @@ function Kc() {
|
|
|
5239
5240
|
rcompareIdentifiers: r.rcompareIdentifiers
|
|
5240
5241
|
}, vr;
|
|
5241
5242
|
}
|
|
5242
|
-
var
|
|
5243
|
-
const
|
|
5243
|
+
var zc = Wc();
|
|
5244
|
+
const Xc = /* @__PURE__ */ Rc(zc), Yc = {
|
|
5244
5245
|
minDelay: 1500
|
|
5245
|
-
},
|
|
5246
|
-
class
|
|
5246
|
+
}, Qc = "__no_updates__";
|
|
5247
|
+
class Zc extends Ho {
|
|
5247
5248
|
constructor(t, r, n = {}) {
|
|
5248
|
-
super({ ...n, ...
|
|
5249
|
+
super({ ...n, ...Yc }, r);
|
|
5249
5250
|
S(this, "http");
|
|
5250
5251
|
S(this, "preferredUpdateChannel");
|
|
5251
5252
|
this.registryProvider = t, this.http = n.http, this.preferredUpdateChannel = n.preferredUpdateChannel;
|
|
@@ -5259,7 +5260,7 @@ class Yc extends qo {
|
|
|
5259
5260
|
case "from-registry-v2":
|
|
5260
5261
|
return `from_registry_v2_${te(t)}`;
|
|
5261
5262
|
default:
|
|
5262
|
-
return
|
|
5263
|
+
return Qc;
|
|
5263
5264
|
}
|
|
5264
5265
|
}
|
|
5265
5266
|
async readValue(t) {
|
|
@@ -5320,7 +5321,7 @@ class Yc extends qo {
|
|
|
5320
5321
|
update: { ...i, id: { ...i.id, version: h } }
|
|
5321
5322
|
}));
|
|
5322
5323
|
if (d === void 0) return { suggestions: p };
|
|
5323
|
-
if (a !== void 0 &&
|
|
5324
|
+
if (a !== void 0 && Xc.lte(d, a))
|
|
5324
5325
|
return { suggestions: p };
|
|
5325
5326
|
const f = {
|
|
5326
5327
|
...i,
|
|
@@ -5350,11 +5351,16 @@ class Yc extends qo {
|
|
|
5350
5351
|
class pn {
|
|
5351
5352
|
constructor() {
|
|
5352
5353
|
S(this, "resources", /* @__PURE__ */ new Map());
|
|
5354
|
+
S(this, "disposeQueue", Promise.resolve());
|
|
5353
5355
|
}
|
|
5354
5356
|
check(e) {
|
|
5355
5357
|
const t = this.resources.get(e);
|
|
5356
5358
|
if (t === void 0) throw new Error("Unexpected state.");
|
|
5357
|
-
t.refCount === 0
|
|
5359
|
+
if (t.refCount === 0) {
|
|
5360
|
+
this.resources.delete(e);
|
|
5361
|
+
const r = t.resource;
|
|
5362
|
+
Io(r) ? this.disposeQueue.then(() => r[Symbol.dispose]()) : $o(r) && this.disposeQueue.then(() => r[Symbol.asyncDispose]());
|
|
5363
|
+
}
|
|
5358
5364
|
}
|
|
5359
5365
|
acquire(e) {
|
|
5360
5366
|
const t = this.calculateParamsKey(e);
|
|
@@ -5382,7 +5388,7 @@ class pn {
|
|
|
5382
5388
|
function Ve(s) {
|
|
5383
5389
|
return String(s.id);
|
|
5384
5390
|
}
|
|
5385
|
-
const
|
|
5391
|
+
const el = ["Int", "Long", "Float", "Double", "String", "Bytes"];
|
|
5386
5392
|
function De(s) {
|
|
5387
5393
|
const e = [], t = [];
|
|
5388
5394
|
for (const r of s)
|
|
@@ -5410,7 +5416,7 @@ function fn(s) {
|
|
|
5410
5416
|
};
|
|
5411
5417
|
}
|
|
5412
5418
|
const ke = (s, e) => typeof e == "bigint" ? e.toString() : e;
|
|
5413
|
-
class
|
|
5419
|
+
class tl {
|
|
5414
5420
|
constructor(e, t) {
|
|
5415
5421
|
S(this, "perFrame", /* @__PURE__ */ new Map());
|
|
5416
5422
|
S(this, "global");
|
|
@@ -5442,9 +5448,9 @@ class Zc {
|
|
|
5442
5448
|
this.disposeListeners.set(r, i), e.resource.disposeSignal.addEventListener("abort", i);
|
|
5443
5449
|
}
|
|
5444
5450
|
}
|
|
5445
|
-
class
|
|
5451
|
+
class rl {
|
|
5446
5452
|
constructor(e, t, r, n) {
|
|
5447
|
-
S(this, "
|
|
5453
|
+
S(this, "pFramePromise");
|
|
5448
5454
|
S(this, "abortController", new AbortController());
|
|
5449
5455
|
S(this, "blobIdToResource", /* @__PURE__ */ new Map());
|
|
5450
5456
|
S(this, "blobHandleComputables", /* @__PURE__ */ new Map());
|
|
@@ -5466,12 +5472,12 @@ class el {
|
|
|
5466
5472
|
this.blobDriver = e, this.logger = t, this.spillPath = r;
|
|
5467
5473
|
const i = (a, c) => this.logger[a](c);
|
|
5468
5474
|
for (const a of n)
|
|
5469
|
-
for (const c of
|
|
5475
|
+
for (const c of ia(a.data))
|
|
5470
5476
|
this.blobIdToResource.set(Ve(c), c);
|
|
5471
5477
|
const o = [
|
|
5472
5478
|
...new Map(n.map((a) => ({
|
|
5473
5479
|
...a,
|
|
5474
|
-
data:
|
|
5480
|
+
data: aa(a.data, Ve)
|
|
5475
5481
|
})).map(
|
|
5476
5482
|
(a) => [te(a), a]
|
|
5477
5483
|
)).values()
|
|
@@ -5479,12 +5485,21 @@ class el {
|
|
|
5479
5485
|
try {
|
|
5480
5486
|
const a = new $n(this.spillPath, i);
|
|
5481
5487
|
a.setDataSource(this);
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5488
|
+
const c = [];
|
|
5489
|
+
for (const l of o)
|
|
5490
|
+
a.addColumnSpec(l.id, l.spec), c.push(Promise.resolve(a.setColumnData(
|
|
5491
|
+
l.id,
|
|
5492
|
+
l.data
|
|
5493
|
+
/* , this.disposeSignal */
|
|
5494
|
+
)));
|
|
5495
|
+
this.pFramePromise = Promise.all(c).then(() => a).catch((l) => {
|
|
5496
|
+
throw this.dispose(), a.dispose(), new fe(
|
|
5497
|
+
`PFrame creation failed asynchronously, columns: ${JSON.stringify(o)}, error: ${it(l)}`
|
|
5498
|
+
);
|
|
5499
|
+
});
|
|
5485
5500
|
} catch (a) {
|
|
5486
|
-
throw new
|
|
5487
|
-
`PFrame creation failed, columns: ${JSON.stringify(o)}, error: ${
|
|
5501
|
+
throw new fe(
|
|
5502
|
+
`PFrame creation failed synchronously, columns: ${JSON.stringify(o)}, error: ${it(a)}`
|
|
5488
5503
|
);
|
|
5489
5504
|
}
|
|
5490
5505
|
}
|
|
@@ -5492,30 +5507,34 @@ class el {
|
|
|
5492
5507
|
let t = this.blobHandleComputables.get(e);
|
|
5493
5508
|
if (t !== void 0) return t;
|
|
5494
5509
|
const r = this.blobIdToResource.get(e);
|
|
5495
|
-
if (r === void 0) throw new
|
|
5510
|
+
if (r === void 0) throw new fe(`Blob with id ${e} not found.`);
|
|
5496
5511
|
return t = this.blobDriver.getDownloadedBlob(r).withPreCalculatedValueTree(), this.blobHandleComputables.set(e, t), t;
|
|
5497
5512
|
}
|
|
5498
5513
|
get disposeSignal() {
|
|
5499
5514
|
return this.abortController.signal;
|
|
5500
5515
|
}
|
|
5501
|
-
|
|
5516
|
+
dispose() {
|
|
5502
5517
|
this.abortController.abort();
|
|
5503
5518
|
for (const e of this.blobHandleComputables.values()) e.resetState();
|
|
5504
|
-
|
|
5519
|
+
}
|
|
5520
|
+
async [Symbol.asyncDispose]() {
|
|
5521
|
+
this.dispose(), await this.pFramePromise.then((e) => e.dispose()).catch(() => {
|
|
5522
|
+
});
|
|
5505
5523
|
}
|
|
5506
5524
|
}
|
|
5507
5525
|
class yr {
|
|
5508
5526
|
constructor(e, t, r, n) {
|
|
5509
5527
|
S(this, "abortController", new AbortController());
|
|
5510
5528
|
S(this, "combinedDisposeSignal");
|
|
5511
|
-
this.pFrame = e, this.
|
|
5529
|
+
this.pFrame = e, this.pTablePromise = r, this.predecessor = n, this.combinedDisposeSignal = AbortSignal.any([t, this.abortController.signal]);
|
|
5512
5530
|
}
|
|
5513
5531
|
get disposeSignal() {
|
|
5514
5532
|
return this.combinedDisposeSignal;
|
|
5515
5533
|
}
|
|
5516
|
-
[Symbol.
|
|
5534
|
+
async [Symbol.asyncDispose]() {
|
|
5517
5535
|
var e;
|
|
5518
|
-
this.abortController.abort(), this.
|
|
5536
|
+
this.abortController.abort(), await this.pTablePromise.then((t) => t.dispose()).catch(() => {
|
|
5537
|
+
}), (e = this.predecessor) == null || e.unref();
|
|
5519
5538
|
}
|
|
5520
5539
|
}
|
|
5521
5540
|
class _r {
|
|
@@ -5527,7 +5546,7 @@ class _r {
|
|
|
5527
5546
|
S(this, "tableConcurrencyLimiter");
|
|
5528
5547
|
this.blobDriver = e, this.logger = t, this.spillPath = r;
|
|
5529
5548
|
const i = new Zr(n.pFrameConcurrency);
|
|
5530
|
-
this.frameConcurrencyLimiter = i, this.tableConcurrencyLimiter = new Zr(n.pTableConcurrency), this.pTableCache = new
|
|
5549
|
+
this.frameConcurrencyLimiter = i, this.tableConcurrencyLimiter = new Zr(n.pTableConcurrency), this.pTableCache = new tl(this.logger, n), this.pFrames = new class extends pn {
|
|
5531
5550
|
constructor(o, a, c) {
|
|
5532
5551
|
super(), this.blobDriver = o, this.logger = a, this.spillPath = c;
|
|
5533
5552
|
}
|
|
@@ -5536,19 +5555,19 @@ class _r {
|
|
|
5536
5555
|
}
|
|
5537
5556
|
getByKey(o) {
|
|
5538
5557
|
const a = super.tryGetByKey(o);
|
|
5539
|
-
if (!a) throw new
|
|
5558
|
+
if (!a) throw new fe(`PFrame not found, handle = ${o}`);
|
|
5540
5559
|
return a;
|
|
5541
5560
|
}
|
|
5542
5561
|
createNewResource(o) {
|
|
5543
5562
|
return Q().logPFrameRequests && t.info(
|
|
5544
5563
|
`PFrame creation (pFrameHandle = ${this.calculateParamsKey(o)}): ${JSON.stringify(o, ke)}`
|
|
5545
|
-
), new
|
|
5564
|
+
), new rl(this.blobDriver, this.logger, this.spillPath, o);
|
|
5546
5565
|
}
|
|
5547
5566
|
calculateParamsKey(o) {
|
|
5548
5567
|
try {
|
|
5549
|
-
return
|
|
5568
|
+
return nl(o);
|
|
5550
5569
|
} catch (a) {
|
|
5551
|
-
throw vo(a) ? a : new
|
|
5570
|
+
throw vo(a) ? a : new fe(`PFrame handle calculation failed, request: ${JSON.stringify(o, ke)}, error: ${it(a)}`);
|
|
5552
5571
|
}
|
|
5553
5572
|
}
|
|
5554
5573
|
}(this.blobDriver, this.logger, this.spillPath), this.pTables = new class extends pn {
|
|
@@ -5557,14 +5576,14 @@ class _r {
|
|
|
5557
5576
|
}
|
|
5558
5577
|
getByKey(o) {
|
|
5559
5578
|
const a = super.tryGetByKey(o);
|
|
5560
|
-
if (!a) throw new
|
|
5579
|
+
if (!a) throw new fe(`PTable not found, handle = ${o}`);
|
|
5561
5580
|
return a;
|
|
5562
5581
|
}
|
|
5563
5582
|
createNewResource(o) {
|
|
5564
5583
|
Q().logPFrameRequests && t.info(
|
|
5565
5584
|
`PTable creation (pTableHandle = ${this.calculateParamsKey(o)}): ${JSON.stringify(o, ke)}`
|
|
5566
5585
|
);
|
|
5567
|
-
const a = o.pFrameHandle, {
|
|
5586
|
+
const a = o.pFrameHandle, { pFramePromise: c, disposeSignal: l } = this.pFrames.getByKey(a);
|
|
5568
5587
|
if (o.def.sorting.length > 0) {
|
|
5569
5588
|
const d = this.acquire({
|
|
5570
5589
|
...o,
|
|
@@ -5572,7 +5591,7 @@ class _r {
|
|
|
5572
5591
|
...o.def,
|
|
5573
5592
|
sorting: []
|
|
5574
5593
|
}
|
|
5575
|
-
}), { resource: {
|
|
5594
|
+
}), { resource: { pTablePromise: p } } = d, f = p.then((v) => v.sort(o.def.sorting));
|
|
5576
5595
|
return new yr(a, l, f, d);
|
|
5577
5596
|
}
|
|
5578
5597
|
if (o.def.filters.length > 0) {
|
|
@@ -5582,20 +5601,20 @@ class _r {
|
|
|
5582
5601
|
...o.def,
|
|
5583
5602
|
filters: []
|
|
5584
5603
|
}
|
|
5585
|
-
}), { resource: {
|
|
5604
|
+
}), { resource: { pTablePromise: p } } = d, f = p.then((v) => v.filter(o.def.filters));
|
|
5586
5605
|
return new yr(a, l, f, d);
|
|
5587
5606
|
}
|
|
5588
|
-
const u = c.createTable({
|
|
5589
|
-
src:
|
|
5607
|
+
const u = c.then((d) => d.createTable({
|
|
5608
|
+
src: ot(o.def.src),
|
|
5590
5609
|
filters: o.def.partitionFilters
|
|
5591
|
-
});
|
|
5610
|
+
}));
|
|
5592
5611
|
return new yr(a, l, u);
|
|
5593
5612
|
}
|
|
5594
5613
|
calculateParamsKey(o) {
|
|
5595
5614
|
try {
|
|
5596
|
-
return
|
|
5615
|
+
return sl(o);
|
|
5597
5616
|
} catch (a) {
|
|
5598
|
-
throw new
|
|
5617
|
+
throw new fe(`PTable handle calculation failed, request: ${JSON.stringify(o)}, error: ${it(a)}`);
|
|
5599
5618
|
}
|
|
5600
5619
|
}
|
|
5601
5620
|
}(this.pFrames);
|
|
@@ -5604,17 +5623,17 @@ class _r {
|
|
|
5604
5623
|
return await $n.pprofDump();
|
|
5605
5624
|
}
|
|
5606
5625
|
static async init(e, t, r, n) {
|
|
5607
|
-
const i =
|
|
5608
|
-
return await
|
|
5626
|
+
const i = Eo.resolve(r);
|
|
5627
|
+
return await Ao(i), new _r(e, t, i, n);
|
|
5609
5628
|
}
|
|
5610
5629
|
//
|
|
5611
5630
|
// Internal / Config API Methods
|
|
5612
5631
|
//
|
|
5613
5632
|
createPFrame(e, t) {
|
|
5614
|
-
const r = e.filter((i) =>
|
|
5615
|
-
(i) =>
|
|
5633
|
+
const r = e.filter((i) => el.find((o) => o === i.spec.valueType)).map(
|
|
5634
|
+
(i) => ve(
|
|
5616
5635
|
i,
|
|
5617
|
-
(o) =>
|
|
5636
|
+
(o) => Ko(o) ? fa(o) : mn(o) ? vn(o, (a) => a.resourceInfo) : ha(i.spec, o)
|
|
5618
5637
|
)
|
|
5619
5638
|
), n = this.pFrames.acquire(r);
|
|
5620
5639
|
return t.addOnDestroy(n.unref), n.key;
|
|
@@ -5637,26 +5656,26 @@ class _r {
|
|
|
5637
5656
|
compatibleWith: t.compatibleWith.length !== 0 ? [{
|
|
5638
5657
|
axesSpec: [
|
|
5639
5658
|
...new Map(t.compatibleWith.map(
|
|
5640
|
-
(
|
|
5659
|
+
(a) => [te(a), a]
|
|
5641
5660
|
)).values()
|
|
5642
5661
|
],
|
|
5643
5662
|
qualifications: []
|
|
5644
5663
|
}] : []
|
|
5645
|
-
}, {
|
|
5664
|
+
}, { pFramePromise: n } = this.pFrames.getByKey(e);
|
|
5646
5665
|
return {
|
|
5647
|
-
hits: (await n.findColumns(r)).hits.filter((
|
|
5666
|
+
hits: (await (await n).findColumns(r)).hits.filter((a) => (
|
|
5648
5667
|
// only exactly matching columns
|
|
5649
|
-
|
|
5650
|
-
)).map((
|
|
5668
|
+
a.mappingVariants.length === 0 || a.mappingVariants.some((c) => c.qualifications.forHit.length === 0 && c.qualifications.forQueries.every((l) => l.length === 0))
|
|
5669
|
+
)).map((a) => a.hit)
|
|
5651
5670
|
};
|
|
5652
5671
|
}
|
|
5653
5672
|
async getColumnSpec(e, t) {
|
|
5654
|
-
const {
|
|
5655
|
-
return await r.getColumnSpec(t);
|
|
5673
|
+
const { pFramePromise: r } = this.pFrames.getByKey(e);
|
|
5674
|
+
return await (await r).getColumnSpec(t);
|
|
5656
5675
|
}
|
|
5657
5676
|
async listColumns(e) {
|
|
5658
|
-
const {
|
|
5659
|
-
return await t.listColumns();
|
|
5677
|
+
const { pFramePromise: t } = this.pFrames.getByKey(e);
|
|
5678
|
+
return await (await t).listColumns();
|
|
5660
5679
|
}
|
|
5661
5680
|
async calculateTableData(e, t, r, n) {
|
|
5662
5681
|
Q().logPFrameRequests && this.logger.info(
|
|
@@ -5665,22 +5684,22 @@ class _r {
|
|
|
5665
5684
|
const i = this.pTables.acquire({
|
|
5666
5685
|
pFrameHandle: e,
|
|
5667
5686
|
def: fn(t)
|
|
5668
|
-
}), { resource: {
|
|
5687
|
+
}), { resource: { pTablePromise: o, disposeSignal: a } } = i, c = await o, l = AbortSignal.any([n, a].filter((u) => !!u));
|
|
5669
5688
|
return await this.frameConcurrencyLimiter.run(async () => {
|
|
5670
5689
|
try {
|
|
5671
|
-
const
|
|
5690
|
+
const u = c.getSpec(), d = await c.getData([...u.keys()], {
|
|
5672
5691
|
range: r,
|
|
5673
|
-
signal:
|
|
5674
|
-
}),
|
|
5692
|
+
signal: l
|
|
5693
|
+
}), p = await c.getFootprint({
|
|
5675
5694
|
withPredecessors: !0,
|
|
5676
|
-
signal:
|
|
5695
|
+
signal: l
|
|
5677
5696
|
});
|
|
5678
|
-
return this.pTableCache.cache(i,
|
|
5679
|
-
spec:
|
|
5680
|
-
data:
|
|
5697
|
+
return this.pTableCache.cache(i, p), u.map((f, v) => ({
|
|
5698
|
+
spec: f,
|
|
5699
|
+
data: d[v]
|
|
5681
5700
|
}));
|
|
5682
|
-
} catch (
|
|
5683
|
-
throw i.unref(),
|
|
5701
|
+
} catch (u) {
|
|
5702
|
+
throw i.unref(), u;
|
|
5684
5703
|
}
|
|
5685
5704
|
});
|
|
5686
5705
|
}
|
|
@@ -5688,40 +5707,36 @@ class _r {
|
|
|
5688
5707
|
Q().logPFrameRequests && this.logger.info(
|
|
5689
5708
|
`Call getUniqueValues, handle = ${e}, request = ${JSON.stringify(t, ke)}`
|
|
5690
5709
|
);
|
|
5691
|
-
const {
|
|
5692
|
-
return await this.frameConcurrencyLimiter.run(async () => await
|
|
5710
|
+
const { pFramePromise: n, disposeSignal: i } = this.pFrames.getByKey(e), o = await n, a = AbortSignal.any([r, i].filter((c) => !!c));
|
|
5711
|
+
return await this.frameConcurrencyLimiter.run(async () => await o.getUniqueValues({
|
|
5693
5712
|
...t,
|
|
5694
5713
|
filters: De(t.filters)
|
|
5695
5714
|
}, {
|
|
5696
|
-
signal:
|
|
5715
|
+
signal: a
|
|
5697
5716
|
}));
|
|
5698
5717
|
}
|
|
5699
5718
|
//
|
|
5700
5719
|
// PTable istance methods
|
|
5701
5720
|
//
|
|
5702
|
-
getSpec(e) {
|
|
5703
|
-
const {
|
|
5704
|
-
|
|
5705
|
-
return Promise.resolve(t.getSpec());
|
|
5706
|
-
} catch (r) {
|
|
5707
|
-
return Promise.reject(nt(r));
|
|
5708
|
-
}
|
|
5721
|
+
async getSpec(e) {
|
|
5722
|
+
const { pTablePromise: t } = this.pTables.getByKey(e);
|
|
5723
|
+
return (await t).getSpec();
|
|
5709
5724
|
}
|
|
5710
5725
|
async getShape(e, t) {
|
|
5711
|
-
const {
|
|
5712
|
-
return await this.tableConcurrencyLimiter.run(async () => await
|
|
5713
|
-
signal:
|
|
5726
|
+
const { pTablePromise: r, disposeSignal: n } = this.pTables.getByKey(e), i = await r, o = AbortSignal.any([t, n].filter((a) => !!a));
|
|
5727
|
+
return await this.tableConcurrencyLimiter.run(async () => await i.getShape({
|
|
5728
|
+
signal: o
|
|
5714
5729
|
}));
|
|
5715
5730
|
}
|
|
5716
5731
|
async getData(e, t, r, n) {
|
|
5717
|
-
const {
|
|
5718
|
-
return await this.tableConcurrencyLimiter.run(async () => await
|
|
5732
|
+
const { pTablePromise: i, disposeSignal: o } = this.pTables.getByKey(e), a = await i, c = AbortSignal.any([n, o].filter((l) => !!l));
|
|
5733
|
+
return await this.tableConcurrencyLimiter.run(async () => await a.getData(t, {
|
|
5719
5734
|
range: r,
|
|
5720
|
-
signal:
|
|
5735
|
+
signal: c
|
|
5721
5736
|
}));
|
|
5722
5737
|
}
|
|
5723
5738
|
}
|
|
5724
|
-
function
|
|
5739
|
+
function ot(s) {
|
|
5725
5740
|
switch (s.type) {
|
|
5726
5741
|
case "column":
|
|
5727
5742
|
return {
|
|
@@ -5750,25 +5765,25 @@ function it(s) {
|
|
|
5750
5765
|
case "full":
|
|
5751
5766
|
return {
|
|
5752
5767
|
type: s.type,
|
|
5753
|
-
entries: s.entries.map((e) =>
|
|
5768
|
+
entries: s.entries.map((e) => ot(e))
|
|
5754
5769
|
};
|
|
5755
5770
|
case "outer":
|
|
5756
5771
|
return {
|
|
5757
5772
|
type: "outer",
|
|
5758
|
-
primary:
|
|
5759
|
-
secondary: s.secondary.map((e) =>
|
|
5773
|
+
primary: ot(s.primary),
|
|
5774
|
+
secondary: s.secondary.map((e) => ot(e))
|
|
5760
5775
|
};
|
|
5761
5776
|
default:
|
|
5762
5777
|
Y(s);
|
|
5763
5778
|
}
|
|
5764
5779
|
}
|
|
5765
|
-
function
|
|
5780
|
+
function sl(s) {
|
|
5766
5781
|
const e = Fe("sha256");
|
|
5767
5782
|
return e.update(te(s)), e.digest().toString("hex");
|
|
5768
5783
|
}
|
|
5769
|
-
function
|
|
5784
|
+
function nl(s) {
|
|
5770
5785
|
const e = [...s].map(
|
|
5771
|
-
(r) =>
|
|
5786
|
+
(r) => ve(r, (n) => {
|
|
5772
5787
|
let i;
|
|
5773
5788
|
const o = n.type;
|
|
5774
5789
|
switch (o) {
|
|
@@ -5803,7 +5818,7 @@ function rl(s) {
|
|
|
5803
5818
|
};
|
|
5804
5819
|
break;
|
|
5805
5820
|
default:
|
|
5806
|
-
throw new
|
|
5821
|
+
throw new fe(`unsupported resource type: ${JSON.stringify(o)}`);
|
|
5807
5822
|
}
|
|
5808
5823
|
return i.payload.sort((a, c) => a.key.localeCompare(c.key)), i;
|
|
5809
5824
|
})
|
|
@@ -5812,12 +5827,12 @@ function rl(s) {
|
|
|
5812
5827
|
const t = Fe("sha256");
|
|
5813
5828
|
return t.update(te(e)), t.digest().toString("hex");
|
|
5814
5829
|
}
|
|
5815
|
-
async function
|
|
5830
|
+
async function ol(s, e, t) {
|
|
5816
5831
|
const r = {
|
|
5817
5832
|
...to,
|
|
5818
5833
|
...ro(e),
|
|
5819
5834
|
...t
|
|
5820
|
-
}, n = new Tr(r.localSecret), i =
|
|
5835
|
+
}, n = new Tr(r.localSecret), i = En(r.logger, s, r.localProjections), o = ri(s, r.logger), a = On(s, r.logger), c = si(s, r.logger), l = await ni.init(
|
|
5821
5836
|
r.logger,
|
|
5822
5837
|
i,
|
|
5823
5838
|
o,
|
|
@@ -5825,19 +5840,19 @@ async function sl(s, e, t) {
|
|
|
5825
5840
|
r.blobDownloadRangesCachePath,
|
|
5826
5841
|
n,
|
|
5827
5842
|
r.blobDriverOps
|
|
5828
|
-
), u = new
|
|
5843
|
+
), u = new oi(
|
|
5829
5844
|
r.logger,
|
|
5830
5845
|
n,
|
|
5831
5846
|
i,
|
|
5832
5847
|
r.downloadBlobToURLPath,
|
|
5833
5848
|
r.downloadBlobToURLDriverOps
|
|
5834
|
-
), d = new
|
|
5849
|
+
), d = new ii(
|
|
5835
5850
|
r.logger,
|
|
5836
5851
|
n,
|
|
5837
5852
|
a,
|
|
5838
5853
|
c,
|
|
5839
5854
|
r.uploadDriverOps
|
|
5840
|
-
), p = new
|
|
5855
|
+
), p = new ai(r.logger, o, r.logStreamDriverOps), f = new ci(r.logger, p, l), v = await Fn.init(
|
|
5841
5856
|
r.logger,
|
|
5842
5857
|
s,
|
|
5843
5858
|
n,
|
|
@@ -5860,7 +5875,7 @@ async function sl(s, e, t) {
|
|
|
5860
5875
|
pFrameDriver: h
|
|
5861
5876
|
};
|
|
5862
5877
|
}
|
|
5863
|
-
class
|
|
5878
|
+
class il {
|
|
5864
5879
|
constructor(e) {
|
|
5865
5880
|
S(this, "enrichmentTargetsCache", new lt({
|
|
5866
5881
|
max: 256,
|
|
@@ -5872,7 +5887,7 @@ class nl {
|
|
|
5872
5887
|
const t = e.blockConfig();
|
|
5873
5888
|
if (t.enrichmentTargets === void 0) return;
|
|
5874
5889
|
const r = e.args();
|
|
5875
|
-
return
|
|
5890
|
+
return rc(this.quickJs, t.enrichmentTargets, ft(t), r);
|
|
5876
5891
|
}
|
|
5877
5892
|
getEnrichmentTargets(e, t, r) {
|
|
5878
5893
|
const n = { blockConfig: e, args: t };
|
|
@@ -5905,10 +5920,10 @@ class ao {
|
|
|
5905
5920
|
// Project List Manipulation
|
|
5906
5921
|
//
|
|
5907
5922
|
/** Creates a project with initial state and adds it to project list. */
|
|
5908
|
-
async createProject(e, t =
|
|
5923
|
+
async createProject(e, t = ge()) {
|
|
5909
5924
|
const r = await this.pl.withWriteTx("MLCreateProject", async (n) => {
|
|
5910
|
-
const i = await
|
|
5911
|
-
return n.createField(J(this.projectListResourceId, t), "Dynamic", i), await n.commit(), await
|
|
5925
|
+
const i = await oa(n, e);
|
|
5926
|
+
return n.createField(J(this.projectListResourceId, t), "Dynamic", i), await n.commit(), await Uo(i);
|
|
5912
5927
|
});
|
|
5913
5928
|
return await this.projectListTree.refreshState(), r;
|
|
5914
5929
|
}
|
|
@@ -5976,33 +5991,33 @@ class ao {
|
|
|
5976
5991
|
/** Initialize middle layer */
|
|
5977
5992
|
static async init(e, t, r) {
|
|
5978
5993
|
const n = {
|
|
5979
|
-
...
|
|
5980
|
-
...
|
|
5994
|
+
...bc,
|
|
5995
|
+
...kc(t),
|
|
5981
5996
|
...r
|
|
5982
5997
|
};
|
|
5983
5998
|
n.defaultTreeOptions.logStat = Q().logTreeStats, n.debugOps.dumpInitialTreeState = Q().dumpInitialTreeState;
|
|
5984
|
-
const i = await e.withWriteTx("MLInitialization", async (
|
|
5985
|
-
const B = J(
|
|
5986
|
-
|
|
5987
|
-
const F = await
|
|
5999
|
+
const i = await e.withWriteTx("MLInitialization", async (P) => {
|
|
6000
|
+
const B = J(P.clientRoot, Ii);
|
|
6001
|
+
P.createField(B, "Dynamic");
|
|
6002
|
+
const F = await P.getField(B);
|
|
5988
6003
|
if (Me(F.value)) {
|
|
5989
|
-
const j =
|
|
5990
|
-
return
|
|
6004
|
+
const j = P.createEphemeral(Nn);
|
|
6005
|
+
return P.lock(j), P.setField(B, j), await P.commit(), await j.globalId;
|
|
5991
6006
|
} else
|
|
5992
6007
|
return F.value;
|
|
5993
|
-
}), o = n.logger, a = await
|
|
6008
|
+
}), o = n.logger, a = await ol(e, t, n), c = new ko(e.httpDispatcher), l = new bi(c), u = new Qi(
|
|
5994
6009
|
l,
|
|
5995
6010
|
a.signer,
|
|
5996
6011
|
c
|
|
5997
|
-
), d = new
|
|
6012
|
+
), d = new li(
|
|
5998
6013
|
o,
|
|
5999
6014
|
e.httpDispatcher,
|
|
6000
6015
|
n.frontendDownloadPath
|
|
6001
|
-
), p = await
|
|
6016
|
+
), p = await ei(), f = new So();
|
|
6002
6017
|
f.addSupportedRequirement("requiresModelAPIVersion", 1);
|
|
6003
6018
|
const v = {
|
|
6004
6019
|
pl: e,
|
|
6005
|
-
blockEventDispatcher: new
|
|
6020
|
+
blockEventDispatcher: new Lo(),
|
|
6006
6021
|
signer: a.signer,
|
|
6007
6022
|
logger: o,
|
|
6008
6023
|
httpDispatcher: e.httpDispatcher,
|
|
@@ -6011,15 +6026,15 @@ class ao {
|
|
|
6011
6026
|
bpPreparer: u,
|
|
6012
6027
|
frontendDownloadDriver: d,
|
|
6013
6028
|
driverKit: a,
|
|
6014
|
-
blockUpdateWatcher: new
|
|
6029
|
+
blockUpdateWatcher: new Zc(l, o, {
|
|
6015
6030
|
minDelay: n.devBlockUpdateRecheckInterval,
|
|
6016
6031
|
http: c,
|
|
6017
6032
|
preferredUpdateChannel: n.preferredUpdateChannel
|
|
6018
6033
|
}),
|
|
6019
6034
|
runtimeCapabilities: f,
|
|
6020
6035
|
quickJs: p,
|
|
6021
|
-
projectHelper: new
|
|
6022
|
-
}, h = new
|
|
6036
|
+
projectHelper: new il(p)
|
|
6037
|
+
}, h = new Wo([]), b = await Ai(e, i, h, v);
|
|
6023
6038
|
return new ao(
|
|
6024
6039
|
v,
|
|
6025
6040
|
a,
|
|
@@ -6032,41 +6047,41 @@ class ao {
|
|
|
6032
6047
|
);
|
|
6033
6048
|
}
|
|
6034
6049
|
}
|
|
6035
|
-
async function
|
|
6050
|
+
async function al(s, e) {
|
|
6036
6051
|
return await Ie(s.pingCheckDurationMs, s.maxPingsPerSecond, async () => {
|
|
6037
6052
|
const r = await new kn(e).ping();
|
|
6038
6053
|
return JSON.stringify(r).slice(0, s.bodyLimit) + "...";
|
|
6039
6054
|
});
|
|
6040
6055
|
}
|
|
6041
|
-
async function
|
|
6056
|
+
async function cl(s, e) {
|
|
6042
6057
|
return await Ie(
|
|
6043
6058
|
s.blockRegistryDurationMs,
|
|
6044
6059
|
s.maxRegistryChecksPerSecond,
|
|
6045
6060
|
async () => await Xe(new URL(s.blockOverviewPath, s.blockRegistryUrl), s, e)
|
|
6046
6061
|
);
|
|
6047
6062
|
}
|
|
6048
|
-
async function
|
|
6063
|
+
async function ll(s, e) {
|
|
6049
6064
|
return await Ie(
|
|
6050
6065
|
s.blockRegistryDurationMs,
|
|
6051
6066
|
s.maxRegistryChecksPerSecond,
|
|
6052
6067
|
async () => await Xe(new URL(s.blockOverviewPath, s.blockGARegistryUrl), s, e)
|
|
6053
6068
|
);
|
|
6054
6069
|
}
|
|
6055
|
-
async function
|
|
6070
|
+
async function ul(s, e) {
|
|
6056
6071
|
return await Ie(
|
|
6057
6072
|
s.blockRegistryDurationMs,
|
|
6058
6073
|
s.maxRegistryChecksPerSecond,
|
|
6059
6074
|
async () => await Xe(new URL(s.blockUiPath, s.blockRegistryUrl), s, e)
|
|
6060
6075
|
);
|
|
6061
6076
|
}
|
|
6062
|
-
async function
|
|
6077
|
+
async function dl(s, e) {
|
|
6063
6078
|
return await Ie(
|
|
6064
6079
|
s.blockRegistryDurationMs,
|
|
6065
6080
|
s.maxRegistryChecksPerSecond,
|
|
6066
6081
|
async () => await Xe(new URL(s.blockUiPath, s.blockGARegistryUrl), s, e)
|
|
6067
6082
|
);
|
|
6068
6083
|
}
|
|
6069
|
-
async function
|
|
6084
|
+
async function pl(s, e) {
|
|
6070
6085
|
return await Ie(
|
|
6071
6086
|
s.autoUpdateCdnDurationMs,
|
|
6072
6087
|
s.maxAutoUpdateCdnChecksPerSecond,
|
|
@@ -6089,7 +6104,7 @@ async function Ie(s, e, t) {
|
|
|
6089
6104
|
response: o
|
|
6090
6105
|
});
|
|
6091
6106
|
const c = 1e3 / e - a;
|
|
6092
|
-
c > 0 && await
|
|
6107
|
+
c > 0 && await Pn(c);
|
|
6093
6108
|
}
|
|
6094
6109
|
return n;
|
|
6095
6110
|
}
|
|
@@ -6108,7 +6123,7 @@ function hn(s) {
|
|
|
6108
6123
|
return Date.now() - s;
|
|
6109
6124
|
}
|
|
6110
6125
|
function Re(s) {
|
|
6111
|
-
const e = s.filter((o) => o.response.ok), t = s.length - e.length, { mean: r, median: n } =
|
|
6126
|
+
const e = s.filter((o) => o.response.ok), t = s.length - e.length, { mean: r, median: n } = fl(s), i = `
|
|
6112
6127
|
total: ${s.length};
|
|
6113
6128
|
successes: ${e.length};
|
|
6114
6129
|
errors: ${t};
|
|
@@ -6120,7 +6135,7 @@ function Re(s) {
|
|
|
6120
6135
|
details: i
|
|
6121
6136
|
};
|
|
6122
6137
|
}
|
|
6123
|
-
function
|
|
6138
|
+
function fl(s) {
|
|
6124
6139
|
const e = s.map((n) => n.elapsedMs).sort(), t = e.reduce((n, i) => n + i) / e.length;
|
|
6125
6140
|
let r;
|
|
6126
6141
|
if (e.length > 0) {
|
|
@@ -6129,15 +6144,15 @@ function dl(s) {
|
|
|
6129
6144
|
}
|
|
6130
6145
|
return { mean: t, median: r };
|
|
6131
6146
|
}
|
|
6132
|
-
async function
|
|
6147
|
+
async function hl(s, e, t) {
|
|
6133
6148
|
try {
|
|
6134
|
-
const r = await
|
|
6149
|
+
const r = await gl(s, e, t);
|
|
6135
6150
|
return r !== `Hello, ${t}` ? { status: "failed", message: `Template uploading failed: expected: ${t}, got: ${r}` } : { status: "ok", message: `Template uploading succeeded: ${r}` };
|
|
6136
6151
|
} catch (r) {
|
|
6137
6152
|
return { status: "failed", message: `Template uploading failed: error occurred: ${r}` };
|
|
6138
6153
|
}
|
|
6139
6154
|
}
|
|
6140
|
-
async function
|
|
6155
|
+
async function gl(s, e, t) {
|
|
6141
6156
|
var n;
|
|
6142
6157
|
const r = await $e(
|
|
6143
6158
|
e,
|
|
@@ -6149,20 +6164,20 @@ async function fl(s, e, t) {
|
|
|
6149
6164
|
["greeting"]
|
|
6150
6165
|
);
|
|
6151
6166
|
try {
|
|
6152
|
-
return JSON.parse(N((n = (await
|
|
6167
|
+
return JSON.parse(N((n = (await me(e, r.greeting)).data) == null ? void 0 : n.toString()));
|
|
6153
6168
|
} finally {
|
|
6154
6169
|
r != null && await Ae(e, Object.values(r));
|
|
6155
6170
|
}
|
|
6156
6171
|
}
|
|
6157
|
-
async function
|
|
6172
|
+
async function ml(s, e, t, r, n, i) {
|
|
6158
6173
|
try {
|
|
6159
|
-
const o = await
|
|
6174
|
+
const o = await vl(s, e, t, r, n, i);
|
|
6160
6175
|
return o.type.name !== "Blob" ? { status: "failed", message: `File uploading failed: ${o.type.name}` } : { status: "ok", message: `File uploading succeeded: ${o.type.name}` };
|
|
6161
6176
|
} catch (o) {
|
|
6162
6177
|
return { status: "failed", message: `File uploading failed: error occurred: ${o}` };
|
|
6163
6178
|
}
|
|
6164
6179
|
}
|
|
6165
|
-
async function
|
|
6180
|
+
async function vl(s, e, t, r, n, i) {
|
|
6166
6181
|
var c;
|
|
6167
6182
|
const o = await t.getLocalFileHandle(i), a = await $e(
|
|
6168
6183
|
n,
|
|
@@ -6174,10 +6189,10 @@ async function gl(s, e, t, r, n, i) {
|
|
|
6174
6189
|
["progress", "file"]
|
|
6175
6190
|
);
|
|
6176
6191
|
try {
|
|
6177
|
-
const l = await
|
|
6178
|
-
if (
|
|
6192
|
+
const l = await me(n, a.progress);
|
|
6193
|
+
if (ui(l)) {
|
|
6179
6194
|
const u = In.parse(JSON.parse(N((c = l.data) == null ? void 0 : c.toString())));
|
|
6180
|
-
|
|
6195
|
+
di(e, u.localPath, u.pathSignature) && await Tn(
|
|
6181
6196
|
s,
|
|
6182
6197
|
r,
|
|
6183
6198
|
l,
|
|
@@ -6191,20 +6206,20 @@ async function gl(s, e, t, r, n, i) {
|
|
|
6191
6206
|
}
|
|
6192
6207
|
);
|
|
6193
6208
|
}
|
|
6194
|
-
return await
|
|
6209
|
+
return await me(n, a.file);
|
|
6195
6210
|
} finally {
|
|
6196
6211
|
await Ae(n, Object.values(a));
|
|
6197
6212
|
}
|
|
6198
6213
|
}
|
|
6199
|
-
async function
|
|
6214
|
+
async function yl(s, e, t, r, n, i, o) {
|
|
6200
6215
|
try {
|
|
6201
|
-
const a = await
|
|
6216
|
+
const a = await wl(s, e, t, r, n, i);
|
|
6202
6217
|
return a !== o ? { status: "failed", message: `File downloading failed: expected: ${o}, got: ${a}` } : { status: "ok", message: `File downloading succeeded: ${a}` };
|
|
6203
6218
|
} catch (a) {
|
|
6204
6219
|
return { status: "failed", message: `File downloading failed: error occurred: ${a}` };
|
|
6205
6220
|
}
|
|
6206
6221
|
}
|
|
6207
|
-
async function
|
|
6222
|
+
async function wl(s, e, t, r, n, i) {
|
|
6208
6223
|
var c;
|
|
6209
6224
|
const o = await t.getLocalFileHandle(i), a = await $e(
|
|
6210
6225
|
e,
|
|
@@ -6214,7 +6229,7 @@ async function vl(s, e, t, r, n, i) {
|
|
|
6214
6229
|
["progress", "file"]
|
|
6215
6230
|
);
|
|
6216
6231
|
try {
|
|
6217
|
-
const l = await
|
|
6232
|
+
const l = await me(e, a.progress);
|
|
6218
6233
|
await Tn(
|
|
6219
6234
|
s,
|
|
6220
6235
|
r,
|
|
@@ -6228,22 +6243,22 @@ async function vl(s, e, t, r, n, i) {
|
|
|
6228
6243
|
maxSpeed: 1
|
|
6229
6244
|
}
|
|
6230
6245
|
);
|
|
6231
|
-
const u = await
|
|
6232
|
-
return await
|
|
6246
|
+
const u = await me(e, a.file), { content: d } = await n.downloadBlob(u);
|
|
6247
|
+
return await fi(d);
|
|
6233
6248
|
} finally {
|
|
6234
6249
|
await Ae(e, Object.values(a));
|
|
6235
6250
|
}
|
|
6236
6251
|
}
|
|
6237
|
-
async function
|
|
6252
|
+
async function Sl(s) {
|
|
6238
6253
|
try {
|
|
6239
|
-
const e = await
|
|
6254
|
+
const e = await bl(s);
|
|
6240
6255
|
return e !== `Hello from go binary
|
|
6241
6256
|
` ? { status: "failed", message: `Software check failed: got: ${e}` } : { status: "ok", message: `Software check succeeded: ${e}` };
|
|
6242
6257
|
} catch (e) {
|
|
6243
6258
|
return { status: "failed", message: `Software check failed: error occurred: ${e}` };
|
|
6244
6259
|
}
|
|
6245
6260
|
}
|
|
6246
|
-
async function
|
|
6261
|
+
async function bl(s) {
|
|
6247
6262
|
var t;
|
|
6248
6263
|
const e = await $e(
|
|
6249
6264
|
s,
|
|
@@ -6253,21 +6268,21 @@ async function wl(s) {
|
|
|
6253
6268
|
["greeting"]
|
|
6254
6269
|
);
|
|
6255
6270
|
try {
|
|
6256
|
-
return N((t = (await
|
|
6271
|
+
return N((t = (await me(s, e.greeting)).data) == null ? void 0 : t.toString());
|
|
6257
6272
|
} finally {
|
|
6258
6273
|
await Ae(s, Object.values(e));
|
|
6259
6274
|
}
|
|
6260
6275
|
}
|
|
6261
|
-
async function
|
|
6276
|
+
async function kl(s, e) {
|
|
6262
6277
|
try {
|
|
6263
|
-
const t = await
|
|
6278
|
+
const t = await Rl(s, e);
|
|
6264
6279
|
return t !== `Hello, ${e}!
|
|
6265
6280
|
` ? { status: "failed", message: `Python software check failed: got: ${t}` } : { status: "ok", message: `Python software check succeeded: ${t}` };
|
|
6266
6281
|
} catch (t) {
|
|
6267
6282
|
return { status: "failed", message: `Python software check failed: error occurred: ${t}` };
|
|
6268
6283
|
}
|
|
6269
6284
|
}
|
|
6270
|
-
async function
|
|
6285
|
+
async function Rl(s, e) {
|
|
6271
6286
|
var r;
|
|
6272
6287
|
const t = await $e(
|
|
6273
6288
|
s,
|
|
@@ -6277,17 +6292,17 @@ async function bl(s, e) {
|
|
|
6277
6292
|
["greeting"]
|
|
6278
6293
|
);
|
|
6279
6294
|
try {
|
|
6280
|
-
return N((r = (await
|
|
6295
|
+
return N((r = (await me(s, t.greeting)).data) == null ? void 0 : r.toString());
|
|
6281
6296
|
} finally {
|
|
6282
6297
|
await Ae(s, Object.values(t));
|
|
6283
6298
|
}
|
|
6284
6299
|
}
|
|
6285
|
-
async function
|
|
6300
|
+
async function Cl(s, e, t, r) {
|
|
6286
6301
|
var n, i;
|
|
6287
6302
|
try {
|
|
6288
6303
|
const o = await t.getStorageList(), a = {};
|
|
6289
6304
|
for (const c of o) {
|
|
6290
|
-
const l = await
|
|
6305
|
+
const l = await Pl(t, c, r.nFilesToCheck, r.minFileSize, r.maxFileSize, r.minLsRequests);
|
|
6291
6306
|
if (l.file === void 0) {
|
|
6292
6307
|
a[c.name] = {
|
|
6293
6308
|
status: "warn",
|
|
@@ -6304,7 +6319,7 @@ async function kl(s, e, t, r) {
|
|
|
6304
6319
|
["workdirTypeName"]
|
|
6305
6320
|
);
|
|
6306
6321
|
try {
|
|
6307
|
-
const d = JSON.parse(Buffer.from((await
|
|
6322
|
+
const d = JSON.parse(Buffer.from((await me(e, u.workdirTypeName)).data).toString());
|
|
6308
6323
|
d != null && d.startsWith("WorkingDirectory") ? a[c.name] = {
|
|
6309
6324
|
status: "ok",
|
|
6310
6325
|
message: `Workdir creation succeeded, size of file: ${(n = l.file) == null ? void 0 : n.size}, checked ${l.nCheckedFiles} files, did ${l.nLsRequests} ls requests`
|
|
@@ -6321,7 +6336,7 @@ async function kl(s, e, t, r) {
|
|
|
6321
6336
|
return { unknown: { status: "failed", message: `Download from every storage failed: error occurred: ${o}` } };
|
|
6322
6337
|
}
|
|
6323
6338
|
}
|
|
6324
|
-
async function
|
|
6339
|
+
async function Pl(s, e, t, r, n, i) {
|
|
6325
6340
|
const o = co(s, e, "", 0);
|
|
6326
6341
|
let a, c = 0, l = 0;
|
|
6327
6342
|
for await (const { file: u, nLsRequests: d } of o) {
|
|
@@ -6346,11 +6361,11 @@ async function* co(s, e, t, r) {
|
|
|
6346
6361
|
for await (const o of co(s, e, i.fullPath, r))
|
|
6347
6362
|
r = Math.max(o.nLsRequests, r), yield o;
|
|
6348
6363
|
}
|
|
6349
|
-
async function
|
|
6350
|
-
const s = _.join(An.tmpdir(), `check-network-big-temp-${Date.now()}.bin`), e = 20 * 1024 * 1024, t =
|
|
6364
|
+
async function El() {
|
|
6365
|
+
const s = _.join(An.tmpdir(), `check-network-big-temp-${Date.now()}.bin`), e = 20 * 1024 * 1024, t = zo(e);
|
|
6351
6366
|
return await at.appendFile(s, t), { filePath: s };
|
|
6352
6367
|
}
|
|
6353
|
-
async function
|
|
6368
|
+
async function Ol() {
|
|
6354
6369
|
const s = _.join(An.tmpdir(), `check-network-temp-${Date.now()}.txt`), e = "Hello, world! " + (/* @__PURE__ */ new Date()).toISOString();
|
|
6355
6370
|
return await at.writeFile(s, e), { filePath: s, fileContent: e };
|
|
6356
6371
|
}
|
|
@@ -6365,20 +6380,20 @@ async function $e(s, e, t, r, n) {
|
|
|
6365
6380
|
), l = {};
|
|
6366
6381
|
for (const u of n) {
|
|
6367
6382
|
const d = J(s.clientRoot, u);
|
|
6368
|
-
i.createField(d, "Dynamic", c[u]), l[u] = await
|
|
6383
|
+
i.createField(d, "Dynamic", c[u]), l[u] = await Mo(d);
|
|
6369
6384
|
}
|
|
6370
6385
|
return await i.commit(), l;
|
|
6371
6386
|
});
|
|
6372
6387
|
}
|
|
6373
|
-
async function
|
|
6374
|
-
return await
|
|
6388
|
+
async function me(s, e) {
|
|
6389
|
+
return await Jo(s, async (t) => {
|
|
6375
6390
|
const r = await t.tx.getField(e);
|
|
6376
6391
|
if (br(r.error)) {
|
|
6377
6392
|
const n = await t.tx.getResourceData(r.error, !0);
|
|
6378
6393
|
throw new Error(`getFieldValue of "${e.fieldName}" field failed: ${n.data}`);
|
|
6379
6394
|
}
|
|
6380
6395
|
if (Me(r.value))
|
|
6381
|
-
throw new
|
|
6396
|
+
throw new Go();
|
|
6382
6397
|
return await t.tx.getResourceData(r.value, !0);
|
|
6383
6398
|
});
|
|
6384
6399
|
}
|
|
@@ -6389,10 +6404,10 @@ async function Ae(s, e) {
|
|
|
6389
6404
|
await t.commit();
|
|
6390
6405
|
});
|
|
6391
6406
|
}
|
|
6392
|
-
async function
|
|
6407
|
+
async function gu(s, e, t, r = {}) {
|
|
6393
6408
|
const n = [];
|
|
6394
|
-
|
|
6395
|
-
|
|
6409
|
+
Il.forEach((i) => {
|
|
6410
|
+
pi(i).subscribe((a) => {
|
|
6396
6411
|
var u, d;
|
|
6397
6412
|
const c = (/* @__PURE__ */ new Date()).toISOString(), l = { ...a };
|
|
6398
6413
|
(u = l == null ? void 0 : l.response) != null && u.headers && (l.response = { ...l.response }, l.response.headers = l.response.headers.slice(), l.response.headers = l.response.headers.map((p) => p.toString())), (d = l == null ? void 0 : l.request) != null && d.body && (l.request = { ...l.request }, l.request.body = "too big"), n.push(
|
|
@@ -6415,19 +6430,19 @@ async function fu(s, e, t, r = {}) {
|
|
|
6415
6430
|
lsDriver: d,
|
|
6416
6431
|
httpClient: p,
|
|
6417
6432
|
ops: f
|
|
6418
|
-
} = await
|
|
6419
|
-
plPings: await
|
|
6420
|
-
blockRegistryOverviewChecks: await
|
|
6421
|
-
blockGARegistryOverviewChecks: await
|
|
6422
|
-
blockRegistryUiChecks: await
|
|
6423
|
-
blockGARegistryUiChecks: await
|
|
6424
|
-
autoUpdateCdnChecks: await
|
|
6425
|
-
uploadTemplateCheck: await
|
|
6426
|
-
uploadFileCheck: await
|
|
6427
|
-
downloadFileCheck: await
|
|
6428
|
-
softwareCheck: await
|
|
6429
|
-
pythonSoftwareCheck: await
|
|
6430
|
-
storageToDownloadReport: await
|
|
6433
|
+
} = await Fl(s, e, t, r), { filePath: v, fileContent: h } = await Ol(), { filePath: b } = await El(), P = {
|
|
6434
|
+
plPings: await al(f, o),
|
|
6435
|
+
blockRegistryOverviewChecks: await cl(f, p),
|
|
6436
|
+
blockGARegistryOverviewChecks: await ll(f, p),
|
|
6437
|
+
blockRegistryUiChecks: await ul(f, p),
|
|
6438
|
+
blockGARegistryUiChecks: await dl(f, p),
|
|
6439
|
+
autoUpdateCdnChecks: await pl(f, p),
|
|
6440
|
+
uploadTemplateCheck: await hl(i, a, "Jack"),
|
|
6441
|
+
uploadFileCheck: await ml(i, c, d, u, a, b),
|
|
6442
|
+
downloadFileCheck: await yl(i, a, d, u, l, v, h),
|
|
6443
|
+
softwareCheck: await Sl(a),
|
|
6444
|
+
pythonSoftwareCheck: await kl(a, "Jack"),
|
|
6445
|
+
storageToDownloadReport: await Cl(
|
|
6431
6446
|
i,
|
|
6432
6447
|
a,
|
|
6433
6448
|
d,
|
|
@@ -6440,12 +6455,12 @@ async function fu(s, e, t, r = {}) {
|
|
|
6440
6455
|
}
|
|
6441
6456
|
)
|
|
6442
6457
|
};
|
|
6443
|
-
return
|
|
6458
|
+
return Tl(P, s, f, n);
|
|
6444
6459
|
} catch (i) {
|
|
6445
6460
|
return `Unhandled error while checking the network: ${i}`;
|
|
6446
6461
|
}
|
|
6447
6462
|
}
|
|
6448
|
-
async function
|
|
6463
|
+
async function Fl(s, e, t, r = {}) {
|
|
6449
6464
|
const n = {
|
|
6450
6465
|
pingCheckDurationMs: 1e4,
|
|
6451
6466
|
pingTimeoutMs: 3e3,
|
|
@@ -6468,14 +6483,14 @@ async function Pl(s, e, t, r = {}) {
|
|
|
6468
6483
|
everyStorageNFilesToCheck: 300,
|
|
6469
6484
|
everyStorageMinLsRequests: 50,
|
|
6470
6485
|
...r
|
|
6471
|
-
}, i =
|
|
6486
|
+
}, i = _o(s, {
|
|
6472
6487
|
defaultRequestTimeout: n.pingTimeoutMs
|
|
6473
6488
|
});
|
|
6474
|
-
i.alternativeRoot = `check_network_${
|
|
6489
|
+
i.alternativeRoot = `check_network_${ge()}`;
|
|
6475
6490
|
const o = new kn(i);
|
|
6476
6491
|
let a = {};
|
|
6477
6492
|
e && t && (a = await o.login(e, t));
|
|
6478
|
-
const c = await bn.init(s, { authInformation: a }), l = o.ll.httpDispatcher, u = new wn(), d = new Tr("localSecret"), p =
|
|
6493
|
+
const c = await bn.init(s, { authInformation: a }), l = o.ll.httpDispatcher, u = new wn(), d = new Tr("localSecret"), p = En(u, c, []), f = On(c, u), v = await Fn.init(
|
|
6479
6494
|
u,
|
|
6480
6495
|
c,
|
|
6481
6496
|
d,
|
|
@@ -6498,10 +6513,10 @@ async function Pl(s, e, t, r = {}) {
|
|
|
6498
6513
|
}
|
|
6499
6514
|
};
|
|
6500
6515
|
}
|
|
6501
|
-
function
|
|
6516
|
+
function Tl(s, e, t, r) {
|
|
6502
6517
|
const n = s.plPings.filter((b) => b.response.ok), i = s.plPings.filter((b) => !b.response.ok), o = [
|
|
6503
6518
|
...new Set(n.map((b) => JSON.stringify(b.response.value)))
|
|
6504
|
-
], a = (b) => b ? "OK" : "FAILED", c = (b) => b.status === "ok" ? "OK" : b.status === "warn" ? "WARN" : "FAILED", l = Re(s.plPings), u = Re(s.blockRegistryOverviewChecks), d = Re(s.blockGARegistryOverviewChecks), p = Re(s.blockRegistryUiChecks), f = Re(s.blockGARegistryUiChecks), v = Re(s.autoUpdateCdnChecks), h = Object.entries(s.storageToDownloadReport).map(([b,
|
|
6519
|
+
], a = (b) => b ? "OK" : "FAILED", c = (b) => b.status === "ok" ? "OK" : b.status === "warn" ? "WARN" : "FAILED", l = Re(s.plPings), u = Re(s.blockRegistryOverviewChecks), d = Re(s.blockGARegistryOverviewChecks), p = Re(s.blockRegistryUiChecks), f = Re(s.blockGARegistryUiChecks), v = Re(s.autoUpdateCdnChecks), h = Object.entries(s.storageToDownloadReport).map(([b, P]) => `${c(P)} ${b} storage check`).join(`
|
|
6505
6520
|
`);
|
|
6506
6521
|
return `
|
|
6507
6522
|
${a(l.ok)} pings to Platforma Backend
|
|
@@ -6570,7 +6585,7 @@ ${r.join(`
|
|
|
6570
6585
|
`)}
|
|
6571
6586
|
`;
|
|
6572
6587
|
}
|
|
6573
|
-
const
|
|
6588
|
+
const Il = [
|
|
6574
6589
|
"undici:request:create",
|
|
6575
6590
|
// When a new request is created
|
|
6576
6591
|
"undici:request:bodySent",
|
|
@@ -6609,33 +6624,33 @@ const Fl = [
|
|
|
6609
6624
|
// When a dispatcher retries a request
|
|
6610
6625
|
];
|
|
6611
6626
|
export {
|
|
6612
|
-
|
|
6613
|
-
|
|
6627
|
+
au as BlockPackRegistry,
|
|
6628
|
+
cu as CentralBlockRegistry,
|
|
6614
6629
|
ro as DefaultDriverKitOpsPaths,
|
|
6615
6630
|
to as DefaultDriverKitOpsSettings,
|
|
6616
|
-
|
|
6617
|
-
|
|
6631
|
+
kc as DefaultMiddleLayerOpsPaths,
|
|
6632
|
+
bc as DefaultMiddleLayerOpsSettings,
|
|
6618
6633
|
Jn as FrontendFromFolderResourceType,
|
|
6619
6634
|
Mn as FrontendFromUrlResourceType,
|
|
6620
6635
|
ao as MiddleLayer,
|
|
6621
6636
|
jr as Project,
|
|
6622
|
-
|
|
6623
|
-
|
|
6624
|
-
|
|
6625
|
-
|
|
6626
|
-
|
|
6627
|
-
|
|
6628
|
-
|
|
6629
|
-
|
|
6630
|
-
|
|
6631
|
-
|
|
6632
|
-
|
|
6633
|
-
|
|
6637
|
+
Gi as TengoTemplateGet,
|
|
6638
|
+
_i as TengoTemplateGetRegistry,
|
|
6639
|
+
Ki as TengoTemplateGetTemplate,
|
|
6640
|
+
qi as TengoTemplateGetTemplateURI,
|
|
6641
|
+
du as TengoTemplatePack,
|
|
6642
|
+
pu as TengoTemplatePackConvert,
|
|
6643
|
+
hu as TengoTemplatePackConvertTemplate,
|
|
6644
|
+
fu as TengoTemplatePackConvertTemplatePack,
|
|
6645
|
+
uu as V1CentralDevSnapshotRegistry,
|
|
6646
|
+
lu as V1CentralRegistry,
|
|
6647
|
+
bi as V2RegistryProvider,
|
|
6648
|
+
gu as checkNetwork,
|
|
6634
6649
|
Dr as createRenderTemplate,
|
|
6635
6650
|
Dn as getDevV1PacketMtime,
|
|
6636
6651
|
Ar as getDevV2PacketMtime,
|
|
6637
|
-
|
|
6638
|
-
|
|
6652
|
+
ol as initDriverKit,
|
|
6653
|
+
Fl as initNetworkCheck,
|
|
6639
6654
|
ht as loadTemplate,
|
|
6640
6655
|
Un as prepareTemplateSpec
|
|
6641
6656
|
};
|