@milaboratories/pl-middle-layer 1.41.10 → 1.41.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 +7 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +960 -970
- package/dist/index.mjs.map +1 -1
- package/dist/pool/data.d.ts +6 -4
- package/dist/pool/data.d.ts.map +1 -1
- package/dist/pool/driver.d.ts.map +1 -1
- package/package.json +15 -15
- package/src/pool/data.ts +32 -37
- package/src/pool/driver.ts +19 -23
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var po = Object.defineProperty;
|
|
2
|
+
var Wr = (s, e) => (e = Symbol[s]) ? e : Symbol.for("Symbol." + s), zr = (s) => {
|
|
3
3
|
throw TypeError(s);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var b = (s, e, t) =>
|
|
7
|
-
var
|
|
5
|
+
var fo = (s, e, t) => e in s ? po(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
6
|
+
var b = (s, e, t) => fo(s, typeof e != "symbol" ? e + "" : e, t);
|
|
7
|
+
var Xr = (s, e, t) => {
|
|
8
8
|
if (e != null) {
|
|
9
|
-
typeof e != "object" && typeof e != "function" &&
|
|
9
|
+
typeof e != "object" && typeof e != "function" && zr("Object expected");
|
|
10
10
|
var r, n;
|
|
11
|
-
t && (r = e[
|
|
11
|
+
t && (r = e[Wr("asyncDispose")]), r === void 0 && (r = e[Wr("dispose")], t && (n = r)), typeof r != "function" && zr("Object not disposable"), n && (r = function() {
|
|
12
12
|
try {
|
|
13
13
|
n.call(this);
|
|
14
14
|
} catch (i) {
|
|
@@ -17,7 +17,7 @@ var Wr = (s, e, t) => {
|
|
|
17
17
|
}), s.push([t, r, e]);
|
|
18
18
|
} else t && s.push([t]);
|
|
19
19
|
return e;
|
|
20
|
-
},
|
|
20
|
+
}, Yr = (s, e, t) => {
|
|
21
21
|
var r = typeof SuppressedError == "function" ? SuppressedError : function(o, a, c, l) {
|
|
22
22
|
return l = Error(c), l.name = "SuppressedError", l.error = o, l.suppressed = a, l;
|
|
23
23
|
}, n = (o) => e = t ? new r(o, e, "An error was suppressed during disposal") : (t = !0, o), i = (o) => {
|
|
@@ -32,79 +32,79 @@ var Wr = (s, e, t) => {
|
|
|
32
32
|
};
|
|
33
33
|
return i();
|
|
34
34
|
};
|
|
35
|
-
import { extractConfig as
|
|
35
|
+
import { extractConfig as Ee, UiError as Qr, PFrameDriverError as K, mapValueInVOE as vn, executePSpecPredicate as ho, mapPObjectData as ve, mapPTableDef as Sr, isDataInfo as yn, mapDataInfo as br, checkBlockFlag as go, JsRenderInternal as mo, isConfigLambda as wn, extractCodeWithInfo as ft, DefaultNavigationState as vo, isPFrameDriverError as yo, ensureError as it, extractAllColumns as wo, isAbortError as So, RuntimeCapabilities as bo } from "@platforma-sdk/model";
|
|
36
36
|
export * from "@platforma-sdk/model";
|
|
37
|
-
import { StableChannel as
|
|
37
|
+
import { StableChannel as je, AnyChannel as xe, InitialBlockSettings as Zr, blockPackIdToString as ko } from "@milaboratories/pl-model-middle-layer";
|
|
38
38
|
export * from "@milaboratories/pl-model-middle-layer";
|
|
39
39
|
export * from "@milaboratories/pl-deployments";
|
|
40
|
-
import { request as
|
|
41
|
-
import { RegistryV1 as ye, tryLoadPackDescription as
|
|
40
|
+
import { request as $r, RetryAgent as Co } from "undici";
|
|
41
|
+
import { RegistryV1 as ye, tryLoadPackDescription as kr, BlockPackMetaEmbedAbsoluteBytes as Ro, RegistryV2Reader as Po, folderReaderByUrl as Eo, loadPackDescription as es } from "@platforma-sdk/block-tools";
|
|
42
42
|
import oe from "node:fs";
|
|
43
|
-
import * as
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import { assertNever as Q, notEmpty as N, canonicalJsonBytes as
|
|
47
|
-
import * as
|
|
43
|
+
import * as Oo from "node:path";
|
|
44
|
+
import q from "node:path";
|
|
45
|
+
import Fo from "yaml";
|
|
46
|
+
import { assertNever as Q, notEmpty as N, canonicalJsonBytes as To, canonicalJsonGzBytes as Io, cachedDeserialize as Je, cachedDecode as kt, deepFreeze as ts, ConsoleLoggerAdapter as Sn, isDisposable as $o, isAsyncDisposable as Ao, ConcurrencyLimitingExecutor as rs, emptyDir as Lo, HmacSha256Signer as Ar, BlockEventDispatcher as Do } from "@milaboratories/ts-helpers";
|
|
47
|
+
import * as bn from "node:fs/promises";
|
|
48
48
|
import at from "node:fs/promises";
|
|
49
|
-
import { tryResolve as
|
|
50
|
-
import { resourceTypesEqual as ue, field as
|
|
49
|
+
import { tryResolve as No } from "@milaboratories/resolve-helper";
|
|
50
|
+
import { resourceTypesEqual as ue, field as M, Pl as D, PlClient as kn, isResourceId as ss, isNullResourceId as Me, isResource as Bo, isResourceRef as jo, isNotNullResourceId as Cr, ensureResourceIdNotNull as ct, resourceType as we, resourceTypeToString as xo, stringifyWithResourceId as Ye, resourceIdToString as Fe, isNotFoundError as Uo, isTimeoutOrCancelError as Vo, toGlobalResourceId as Jo, UnauthenticatedPlClient as Cn, toGlobalFieldId as Mo, poll as Go, ContinuePolling as qo, plAddressToConfig as _o } from "@milaboratories/pl-client";
|
|
51
51
|
export * from "@milaboratories/pl-client";
|
|
52
|
-
import { SynchronizedTreeState as
|
|
53
|
-
import { Computable as H, ChangeSource as
|
|
54
|
-
import { randomUUID as ge, createHash as
|
|
55
|
-
import { PlTemplateV1 as Y, PlTemplateOverrideV1 as
|
|
52
|
+
import { SynchronizedTreeState as Rn, treeDumpStats as Ko, isPlTreeNodeAccessor as Ho } from "@milaboratories/pl-tree";
|
|
53
|
+
import { Computable as H, ChangeSource as ns, PollComputablePool as Wo, WatchableValue as zo } from "@milaboratories/computable";
|
|
54
|
+
import { randomUUID as ge, createHash as Ie, randomBytes as Xo } from "node:crypto";
|
|
55
|
+
import { PlTemplateV1 as Y, PlTemplateOverrideV1 as Oe, PlTemplateLibV1 as he, PlTemplateSoftwareV1 as de, parseTemplate as Yo } from "@milaboratories/pl-model-backend";
|
|
56
56
|
import { LRUCache as lt } from "lru-cache";
|
|
57
|
-
import { Worker as
|
|
58
|
-
import
|
|
57
|
+
import { Worker as Qo } from "node:worker_threads";
|
|
58
|
+
import Pn from "denque";
|
|
59
59
|
import { Templates as Se } from "@platforma-sdk/workflow-tengo";
|
|
60
60
|
import re from "canonicalize";
|
|
61
|
-
import
|
|
62
|
-
import { Scope as Ge, errors as
|
|
63
|
-
import { PlQuickJSError as
|
|
64
|
-
import * as
|
|
65
|
-
import { setTimeout as
|
|
66
|
-
import { createDownloadClient as
|
|
67
|
-
import { PFrame as
|
|
68
|
-
import { channel as
|
|
69
|
-
import { text as
|
|
70
|
-
import
|
|
71
|
-
async function
|
|
61
|
+
import Zo from "node:assert";
|
|
62
|
+
import { Scope as Ge, errors as ei, getQuickJS as ti } from "quickjs-emscripten";
|
|
63
|
+
import { PlQuickJSError as ri } from "@milaboratories/pl-errors";
|
|
64
|
+
import * as os from "remeda";
|
|
65
|
+
import { setTimeout as En } from "node:timers/promises";
|
|
66
|
+
import { createDownloadClient as On, createLogsClient as si, createUploadBlobClient as Fn, createUploadProgressClient as ni, DownloadDriver as oi, DownloadBlobToURLDriver as ii, UploadDriver as ai, LogsStreamDriver as ci, LogsDriver as li, LsDriver as Tn, DownloadUrlDriver as ui, uploadBlob as In, ImportFileHandleUploadData as $n, isUpload as di, isSignMatch as pi } from "@milaboratories/pl-drivers";
|
|
67
|
+
import { PFrame as An } from "@milaboratories/pframes-rs-node";
|
|
68
|
+
import { channel as fi } from "node:diagnostics_channel";
|
|
69
|
+
import { text as hi } from "node:stream/consumers";
|
|
70
|
+
import Ln from "node:os";
|
|
71
|
+
async function is(s) {
|
|
72
72
|
try {
|
|
73
|
-
return await
|
|
73
|
+
return await bn.stat(s, { bigint: !0 });
|
|
74
74
|
} catch (e) {
|
|
75
75
|
if (e.code === "ENOENT")
|
|
76
76
|
return;
|
|
77
77
|
throw e;
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
hi,
|
|
80
|
+
const gi = [ye.PlPackageYamlConfigFile], mi = [ye.PlPackageJsonConfigFile], Lr = ["backend", "dist", "tengo", "tpl", "main.plj.gz"], Dr = ["config", "dist", "config.json"], Dn = ["frontend", "dist"], as = "block-model/dist/config.json", vi = "block-ui/package.json", yi = [
|
|
81
|
+
Lr,
|
|
82
|
+
Dr,
|
|
84
83
|
gi,
|
|
85
|
-
|
|
84
|
+
mi,
|
|
85
|
+
Dn
|
|
86
86
|
];
|
|
87
|
-
async function
|
|
88
|
-
return await
|
|
87
|
+
async function wi(s) {
|
|
88
|
+
return await is(q.join(s, ...Dr)) !== void 0 || await is(q.join(s, ...Lr)) !== void 0;
|
|
89
89
|
}
|
|
90
90
|
function Ct(s, e) {
|
|
91
|
-
const t =
|
|
91
|
+
const t = No(s, e);
|
|
92
92
|
if (t === void 0) throw new Error(`Can't resolve ${e} against ${s}`);
|
|
93
93
|
return t;
|
|
94
94
|
}
|
|
95
|
-
async function
|
|
96
|
-
if (
|
|
95
|
+
async function cs(s, e) {
|
|
96
|
+
if (q.isAbsolute(s) || (s = q.resolve(s)), await wi(s))
|
|
97
97
|
return {
|
|
98
|
-
workflow:
|
|
99
|
-
config:
|
|
100
|
-
ui:
|
|
98
|
+
workflow: q.join(s, ...Lr),
|
|
99
|
+
config: q.join(s, ...Dr),
|
|
100
|
+
ui: q.join(s, ...Dn)
|
|
101
101
|
};
|
|
102
102
|
{
|
|
103
|
-
const t = Ct(s,
|
|
104
|
-
return { workflow: t, config: r, ui:
|
|
103
|
+
const t = Ct(s, as), r = Ct(s, as), n = Ct(s, vi);
|
|
104
|
+
return { workflow: t, config: r, ui: q.resolve(n, "..", "dist") };
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
async function
|
|
107
|
+
async function Si(s) {
|
|
108
108
|
try {
|
|
109
109
|
return await oe.promises.readFile(s, "utf8");
|
|
110
110
|
} catch (e) {
|
|
@@ -113,7 +113,7 @@ async function wi(s) {
|
|
|
113
113
|
throw e;
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
async function
|
|
116
|
+
async function bi(s) {
|
|
117
117
|
try {
|
|
118
118
|
return await oe.promises.stat(s, { bigint: !0 });
|
|
119
119
|
} catch (e) {
|
|
@@ -122,21 +122,21 @@ async function Si(s) {
|
|
|
122
122
|
throw e;
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
async function
|
|
125
|
+
async function Nn(s) {
|
|
126
126
|
let e = 0n;
|
|
127
|
-
for (const t of
|
|
128
|
-
const r =
|
|
127
|
+
for (const t of yi) {
|
|
128
|
+
const r = q.join(s, ...t), n = await bi(r);
|
|
129
129
|
n !== void 0 && e < n.mtimeNs && (e = n.mtimeNs);
|
|
130
130
|
}
|
|
131
131
|
return e.toString();
|
|
132
132
|
}
|
|
133
|
-
async function
|
|
133
|
+
async function Nr(s) {
|
|
134
134
|
const e = await oe.promises.stat(s.components.workflow.main.file, {
|
|
135
135
|
bigint: !0
|
|
136
136
|
}), t = await oe.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 uu {
|
|
140
140
|
constructor(e, t, r) {
|
|
141
141
|
this.v2Provider = e, this.registries = t, this.http = r;
|
|
142
142
|
}
|
|
@@ -144,7 +144,7 @@ class lu {
|
|
|
144
144
|
const t = [], r = e.spec;
|
|
145
145
|
switch (r.type) {
|
|
146
146
|
case "remote-v1": {
|
|
147
|
-
const n = this.http !== void 0 ? { dispatcher: this.http } : {}, o = await (await
|
|
147
|
+
const n = this.http !== void 0 ? { dispatcher: this.http } : {}, o = await (await $r(
|
|
148
148
|
`${r.url}/${ye.GlobalOverviewPath}`,
|
|
149
149
|
n
|
|
150
150
|
)).body.json();
|
|
@@ -173,8 +173,8 @@ class lu {
|
|
|
173
173
|
registryId: e.id,
|
|
174
174
|
id: p,
|
|
175
175
|
latestByChannel: {
|
|
176
|
-
[
|
|
177
|
-
[
|
|
176
|
+
[xe]: f,
|
|
177
|
+
[je]: f
|
|
178
178
|
},
|
|
179
179
|
allVersions: a.allVersions.map((v) => ({ version: v, channels: [] }))
|
|
180
180
|
});
|
|
@@ -204,11 +204,11 @@ class lu {
|
|
|
204
204
|
case "local-dev":
|
|
205
205
|
for (const n of await oe.promises.readdir(r.path, { withFileTypes: !0 })) {
|
|
206
206
|
if (!n.isDirectory()) continue;
|
|
207
|
-
const i =
|
|
208
|
-
|
|
207
|
+
const i = q.join(r.path, n.name), o = await Si(
|
|
208
|
+
q.join(i, ye.PlPackageYamlConfigFile)
|
|
209
209
|
);
|
|
210
210
|
if (o !== void 0) {
|
|
211
|
-
const a = ye.PlPackageConfigData.parse(
|
|
211
|
+
const a = ye.PlPackageConfigData.parse(Fo.parse(o)), c = await Nn(i), l = {
|
|
212
212
|
organization: a.organization,
|
|
213
213
|
name: a.package,
|
|
214
214
|
version: "DEV"
|
|
@@ -232,21 +232,21 @@ class lu {
|
|
|
232
232
|
registryId: e.id,
|
|
233
233
|
id: l,
|
|
234
234
|
latestByChannel: {
|
|
235
|
-
[
|
|
236
|
-
[
|
|
235
|
+
[xe]: u,
|
|
236
|
+
[je]: u
|
|
237
237
|
},
|
|
238
238
|
allVersions: []
|
|
239
239
|
});
|
|
240
240
|
} else {
|
|
241
|
-
let a = i, c = await
|
|
241
|
+
let a = i, c = await kr(a);
|
|
242
242
|
if (c === void 0) {
|
|
243
243
|
for (const l of ["block", "meta"])
|
|
244
|
-
if (a =
|
|
244
|
+
if (a = q.join(i, l), c = await kr(a), c !== void 0) break;
|
|
245
245
|
}
|
|
246
246
|
if (c !== void 0) {
|
|
247
|
-
const l = await
|
|
247
|
+
const l = await Nr(c), u = {
|
|
248
248
|
id: c.id,
|
|
249
|
-
meta: await
|
|
249
|
+
meta: await Ro.parseAsync(c.meta),
|
|
250
250
|
featureFlags: c.featureFlags,
|
|
251
251
|
spec: {
|
|
252
252
|
type: "dev-v2",
|
|
@@ -258,8 +258,8 @@ class lu {
|
|
|
258
258
|
registryId: e.id,
|
|
259
259
|
id: c.id,
|
|
260
260
|
latestByChannel: {
|
|
261
|
-
[
|
|
262
|
-
[
|
|
261
|
+
[xe]: u,
|
|
262
|
+
[je]: u
|
|
263
263
|
},
|
|
264
264
|
allVersions: []
|
|
265
265
|
});
|
|
@@ -288,7 +288,7 @@ class lu {
|
|
|
288
288
|
return await this.v2Provider.getRegistry(n.url).getSpecificOverview(t, r);
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
|
-
class
|
|
291
|
+
class ki {
|
|
292
292
|
constructor(e) {
|
|
293
293
|
b(this, "registries", /* @__PURE__ */ new Map());
|
|
294
294
|
this.http = e;
|
|
@@ -296,34 +296,34 @@ class bi {
|
|
|
296
296
|
getRegistry(e) {
|
|
297
297
|
const t = this.registries.get(e);
|
|
298
298
|
if (t) return t;
|
|
299
|
-
const r = new
|
|
299
|
+
const r = new Po(Eo(e, this.http));
|
|
300
300
|
return this.registries.set(e, r), r;
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
|
-
const
|
|
303
|
+
const du = {
|
|
304
304
|
type: "remote-v2",
|
|
305
305
|
url: "https://blocks.pl-open.science/"
|
|
306
|
-
},
|
|
306
|
+
}, pu = {
|
|
307
307
|
type: "remote-v1",
|
|
308
308
|
url: "https://block.registry.platforma.bio/releases"
|
|
309
|
-
},
|
|
309
|
+
}, fu = {
|
|
310
310
|
type: "remote-v1",
|
|
311
311
|
url: "https://block.registry.platforma.bio/dev"
|
|
312
|
-
}, ki = {
|
|
313
|
-
groups: [{ id: "default", label: "Default", blocks: [] }]
|
|
314
312
|
}, Ci = {
|
|
313
|
+
groups: [{ id: "default", label: "Default", blocks: [] }]
|
|
314
|
+
}, Ri = {
|
|
315
315
|
stagingRefreshTimestamp: 0,
|
|
316
316
|
blocksInLimbo: []
|
|
317
|
-
},
|
|
317
|
+
}, Pi = {
|
|
318
318
|
label: "New Project"
|
|
319
|
-
},
|
|
320
|
-
function
|
|
321
|
-
return `${Ei}${s}`;
|
|
322
|
-
}
|
|
323
|
-
const Rr = "ProjectStructureAuthor", Oi = "__serviceTemplate_";
|
|
324
|
-
function Pr(s) {
|
|
319
|
+
}, Ei = { name: "UserProject", version: "2" }, ut = "SchemaVersion", qe = "2", Br = "ProjectCreated", _e = "ProjectLastModified", Ke = "ProjectMeta", fe = "ProjectStructure", dt = "BlockRenderingState", Oi = "BlockArgsAuthor/";
|
|
320
|
+
function Rr(s) {
|
|
325
321
|
return `${Oi}${s}`;
|
|
326
322
|
}
|
|
323
|
+
const Pr = "ProjectStructureAuthor", Fi = "__serviceTemplate_";
|
|
324
|
+
function Er(s) {
|
|
325
|
+
return `${Fi}${s}`;
|
|
326
|
+
}
|
|
327
327
|
const Rt = /* @__PURE__ */ new Set([
|
|
328
328
|
"blockPack",
|
|
329
329
|
"blockSettings",
|
|
@@ -334,24 +334,24 @@ const Rt = /* @__PURE__ */ new Set([
|
|
|
334
334
|
"prodUiCtx",
|
|
335
335
|
"prodOutput"
|
|
336
336
|
]);
|
|
337
|
-
function
|
|
337
|
+
function _(s, e) {
|
|
338
338
|
return `${s}-${e}`;
|
|
339
339
|
}
|
|
340
|
-
const
|
|
341
|
-
function
|
|
342
|
-
const e = s.match(
|
|
340
|
+
const Ti = /^(?<blockId>.*)-(?<fieldName>blockPack|blockSettings|uiState|prodArgs|currentArgs|prodCtx|prodUiCtx|prodOutput|prodCtxPrevious|prodUiCtxPrevious|prodOutputPrevious|stagingCtx|stagingUiCtx|stagingOutput|stagingCtxPrevious|stagingUiCtxPrevious|stagingOutputPrevious)$/;
|
|
341
|
+
function Ii(s) {
|
|
342
|
+
const e = s.match(Ti);
|
|
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
|
|
349
|
-
const n = await
|
|
347
|
+
const $i = "projects", Bn = { name: "Projects", version: "1" }, Ai = (s) => ue(s.type, Bn) ? s.fields : [];
|
|
348
|
+
async function Li(s, e, t, r) {
|
|
349
|
+
const n = await Rn.init(
|
|
350
350
|
s,
|
|
351
351
|
e,
|
|
352
352
|
{
|
|
353
353
|
...r.ops.defaultTreeOptions,
|
|
354
|
-
pruning:
|
|
354
|
+
pruning: Ai
|
|
355
355
|
},
|
|
356
356
|
r.logger
|
|
357
357
|
);
|
|
@@ -362,7 +362,7 @@ async function Ai(s, e, t, r) {
|
|
|
362
362
|
for (const u of a.listDynamicFields()) {
|
|
363
363
|
const d = a.traverse(u);
|
|
364
364
|
if (d === void 0) continue;
|
|
365
|
-
const p = N(d.getKeyValueAsJson(Ke)), f = N(d.getKeyValueAsJson(
|
|
365
|
+
const p = N(d.getKeyValueAsJson(Ke)), f = N(d.getKeyValueAsJson(Br)), v = N(d.getKeyValueAsJson(_e));
|
|
366
366
|
l.push({
|
|
367
367
|
id: u,
|
|
368
368
|
rid: d.id,
|
|
@@ -375,38 +375,38 @@ async function Ai(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 Di = {
|
|
379
379
|
name: "EphRenderTemplate",
|
|
380
380
|
version: "1"
|
|
381
|
-
},
|
|
381
|
+
}, Ni = {
|
|
382
382
|
name: "RenderTemplate",
|
|
383
383
|
version: "1"
|
|
384
384
|
};
|
|
385
|
-
function
|
|
385
|
+
function jr(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(Di) : s.createStruct(Ni), o = M(i, "template"), a = M(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
|
|
391
|
-
function
|
|
392
|
-
return
|
|
390
|
+
const Bi = { name: "BContextEnd", version: "1" }, ji = { name: "BContext", version: "1" }, xi = "id", Ui = "parent/", Vi = ["context", "result"];
|
|
391
|
+
function ls(s, e, t) {
|
|
392
|
+
return jr(s, e, !0, t, Vi);
|
|
393
393
|
}
|
|
394
|
-
function
|
|
395
|
-
const e = s.createEphemeral(
|
|
394
|
+
function Ji(s) {
|
|
395
|
+
const e = s.createEphemeral(Bi);
|
|
396
396
|
return s.lock(e), e;
|
|
397
397
|
}
|
|
398
|
-
function
|
|
399
|
-
if (e.length === 0) return
|
|
398
|
+
function us(s, e) {
|
|
399
|
+
if (e.length === 0) return Ji(s);
|
|
400
400
|
if (e.length === 1) return e[0];
|
|
401
|
-
const t = s.createEphemeral(
|
|
402
|
-
s.createField(
|
|
401
|
+
const t = s.createEphemeral(ji);
|
|
402
|
+
s.createField(M(t, xi), "Input", D.createPlString(s, ge()));
|
|
403
403
|
for (let r = 0; r < e.length; r++)
|
|
404
|
-
s.createField(
|
|
404
|
+
s.createField(M(t, `${Ui}${r}`), "Input", e[r]);
|
|
405
405
|
return s.lock(t), t;
|
|
406
406
|
}
|
|
407
|
-
function
|
|
407
|
+
function jn(s, e) {
|
|
408
408
|
const t = /* @__PURE__ */ new Map(), r = (n, i, o) => {
|
|
409
|
-
const a =
|
|
409
|
+
const a = Ie("sha256");
|
|
410
410
|
i.updateCacheKey(n, a, o);
|
|
411
411
|
const c = a.digest("hex");
|
|
412
412
|
if (!t.has(c)) {
|
|
@@ -415,32 +415,32 @@ function Bn(s, e) {
|
|
|
415
415
|
}
|
|
416
416
|
return t.get(c);
|
|
417
417
|
};
|
|
418
|
-
return r(e.template,
|
|
418
|
+
return r(e.template, xn, e.hashToSource);
|
|
419
419
|
}
|
|
420
|
-
const
|
|
420
|
+
const ds = {
|
|
421
421
|
updateCacheKey(s, e, t) {
|
|
422
|
-
e.update(he.type.name).update(he.type.version).update(s.name).update(s.version).update(
|
|
422
|
+
e.update(he.type.name).update(he.type.version).update(s.name).update(s.version).update(Te(s.name, t, s.sourceHash));
|
|
423
423
|
},
|
|
424
424
|
render(s, e, t, r) {
|
|
425
425
|
return e.createValue(
|
|
426
426
|
he.type,
|
|
427
|
-
JSON.stringify(he.fromV3Data(s,
|
|
427
|
+
JSON.stringify(he.fromV3Data(s, Te(s.name, r, s.sourceHash)).data)
|
|
428
428
|
);
|
|
429
429
|
}
|
|
430
430
|
}, Qe = {
|
|
431
431
|
updateCacheKey(s, e, t) {
|
|
432
|
-
e.update(de.type.name).update(de.type.version).update(s.name).update(s.version).update(
|
|
432
|
+
e.update(de.type.name).update(de.type.version).update(s.name).update(s.version).update(Te(s.name, t, s.sourceHash));
|
|
433
433
|
},
|
|
434
434
|
render(s, e, t, r) {
|
|
435
|
-
const n = de.fromV3Data(s,
|
|
435
|
+
const n = de.fromV3Data(s, Te(s.name, r, s.sourceHash)), i = e.createStruct(de.type, n.data);
|
|
436
436
|
return e.setKValue(i, de.metaNameKey, JSON.stringify(n.name)), e.lock(i), i;
|
|
437
437
|
}
|
|
438
|
-
},
|
|
438
|
+
}, xn = {
|
|
439
439
|
updateCacheKey(s, e, t) {
|
|
440
|
-
e.update(Y.type.name).update(Y.type.version).update(s.hashOverride ?? "no-override").update(s.name).update(s.version).update(
|
|
440
|
+
e.update(Y.type.name).update(Y.type.version).update(s.hashOverride ?? "no-override").update(s.name).update(s.version).update(Te(s.name, t, s.sourceHash));
|
|
441
441
|
const r = (n) => (n.sort((i, o) => i[0] === o[0] ? 0 : i[0] < o[0] ? -1 : 1), n);
|
|
442
442
|
for (const [n, i] of r(Object.entries(s.libs ?? {})))
|
|
443
|
-
e.update("lib:" + n),
|
|
443
|
+
e.update("lib:" + n), ds.updateCacheKey(i, e, t);
|
|
444
444
|
for (const [n, i] of r(Object.entries(s.software ?? {})))
|
|
445
445
|
e.update("soft:" + n), Qe.updateCacheKey(i, e, t);
|
|
446
446
|
for (const [n, i] of r(Object.entries(s.assets ?? {})))
|
|
@@ -451,11 +451,11 @@ const ls = {
|
|
|
451
451
|
render(s, e, t, r) {
|
|
452
452
|
const n = e.createStruct(
|
|
453
453
|
Y.type,
|
|
454
|
-
JSON.stringify(Y.fromV3Data(s,
|
|
454
|
+
JSON.stringify(Y.fromV3Data(s, Te(s.name, r, s.sourceHash)).data)
|
|
455
455
|
);
|
|
456
456
|
for (const [a, c] of Object.entries(s.libs ?? {})) {
|
|
457
457
|
const l = Y.libField(n, a);
|
|
458
|
-
e.createField(l, "Input"), e.setField(l, t(c,
|
|
458
|
+
e.createField(l, "Input"), e.setField(l, t(c, ds, r));
|
|
459
459
|
}
|
|
460
460
|
for (const [a, c] of Object.entries(s.software ?? {})) {
|
|
461
461
|
const l = Y.swField(n, a);
|
|
@@ -467,45 +467,45 @@ const ls = {
|
|
|
467
467
|
}
|
|
468
468
|
for (const [a, c] of Object.entries(s.templates ?? {})) {
|
|
469
469
|
const l = Y.tplField(n, a);
|
|
470
|
-
e.createField(l, "Input"), e.setField(l, t(c,
|
|
470
|
+
e.createField(l, "Input"), e.setField(l, t(c, xn, r));
|
|
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
|
+
Oe.type,
|
|
475
|
+
JSON.stringify(Oe.fromV3Data(s))
|
|
476
|
+
), o = Oe.tplField(i);
|
|
477
477
|
return e.createField(o, "Service"), e.setField(o, n), e.lock(i), i;
|
|
478
478
|
}
|
|
479
479
|
};
|
|
480
|
-
function
|
|
480
|
+
function Te(s, e, t) {
|
|
481
481
|
return N(
|
|
482
482
|
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 = Yo(e.content), r = t.type;
|
|
488
488
|
switch (r) {
|
|
489
489
|
case "pl.tengo-template.v2":
|
|
490
|
-
return
|
|
490
|
+
return Vn(s, t);
|
|
491
491
|
case "pl.tengo-template.v3":
|
|
492
|
-
return
|
|
492
|
+
return jn(s, t);
|
|
493
493
|
default:
|
|
494
494
|
Q(r);
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
|
-
function
|
|
497
|
+
function Gi(s, e) {
|
|
498
498
|
const t = e.data, r = t.type;
|
|
499
499
|
switch (r) {
|
|
500
500
|
case "pl.tengo-template.v2":
|
|
501
|
-
return
|
|
501
|
+
return Vn(s, t);
|
|
502
502
|
case "pl.tengo-template.v3":
|
|
503
|
-
return
|
|
503
|
+
return jn(s, t);
|
|
504
504
|
default:
|
|
505
505
|
Q(r);
|
|
506
506
|
}
|
|
507
507
|
}
|
|
508
|
-
const
|
|
508
|
+
const ps = {
|
|
509
509
|
hash(s, e) {
|
|
510
510
|
e.update(he.type.name).update(he.type.version).update(s.name).update(s.version).update(s.src);
|
|
511
511
|
},
|
|
@@ -523,12 +523,12 @@ const us = {
|
|
|
523
523
|
const r = de.fromV2Data(s), n = e.createStruct(de.type, r.data);
|
|
524
524
|
return e.setKValue(n, de.metaNameKey, JSON.stringify(r.name)), e.lock(n), n;
|
|
525
525
|
}
|
|
526
|
-
},
|
|
526
|
+
}, Un = {
|
|
527
527
|
hash(s, e) {
|
|
528
528
|
e.update(Y.type.name).update(Y.type.version).update(s.hashOverride ?? "no-override").update(s.name).update(s.version).update(s.src);
|
|
529
529
|
const t = (r) => (r.sort((n, i) => n[0] === i[0] ? 0 : n[0] < i[0] ? -1 : 1), r);
|
|
530
530
|
for (const [r, n] of t(Object.entries(s.libs ?? {})))
|
|
531
|
-
e.update("lib:" + r),
|
|
531
|
+
e.update("lib:" + r), ps.hash(n, e);
|
|
532
532
|
for (const [r, n] of t(Object.entries(s.software ?? {})))
|
|
533
533
|
e.update("soft:" + r), Ze.hash(n, e);
|
|
534
534
|
for (const [r, n] of t(Object.entries(s.assets ?? {})))
|
|
@@ -543,7 +543,7 @@ const us = {
|
|
|
543
543
|
);
|
|
544
544
|
for (const [o, a] of Object.entries(s.libs ?? {})) {
|
|
545
545
|
const c = Y.libField(r, o);
|
|
546
|
-
e.createField(c, "Input"), e.setField(c, t(a,
|
|
546
|
+
e.createField(c, "Input"), e.setField(c, t(a, ps));
|
|
547
547
|
}
|
|
548
548
|
for (const [o, a] of Object.entries(s.software ?? {})) {
|
|
549
549
|
const c = Y.swField(r, o);
|
|
@@ -555,19 +555,19 @@ const us = {
|
|
|
555
555
|
}
|
|
556
556
|
for (const [o, a] of Object.entries(s.templates ?? {})) {
|
|
557
557
|
const c = Y.tplField(r, o);
|
|
558
|
-
e.createField(c, "Input"), e.setField(c, t(a,
|
|
558
|
+
e.createField(c, "Input"), e.setField(c, t(a, Un));
|
|
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
|
+
Oe.type,
|
|
563
|
+
JSON.stringify(Oe.fromV2Data(s))
|
|
564
|
+
), i = Oe.tplField(n);
|
|
565
565
|
return e.createField(i, "Service"), e.setField(i, r), e.lock(n), n;
|
|
566
566
|
}
|
|
567
567
|
};
|
|
568
|
-
function
|
|
568
|
+
function Vn(s, e) {
|
|
569
569
|
const t = /* @__PURE__ */ new Map(), r = (n, i) => {
|
|
570
|
-
const o =
|
|
570
|
+
const o = Ie("sha256");
|
|
571
571
|
i.hash(n, o);
|
|
572
572
|
const a = o.digest("hex");
|
|
573
573
|
if (!t.has(a)) {
|
|
@@ -576,13 +576,13 @@ function Un(s, e) {
|
|
|
576
576
|
}
|
|
577
577
|
return t.get(a);
|
|
578
578
|
};
|
|
579
|
-
return r(e,
|
|
579
|
+
return r(e, Un);
|
|
580
580
|
}
|
|
581
|
-
const
|
|
581
|
+
const qi = { name: "TengoTemplateGet", version: "1" }, _i = "registry", Ki = "templateURI", Hi = "template", hu = { name: "TengoTemplatePack", version: "1" }, gu = {
|
|
582
582
|
name: "TengoTemplatePackConvert",
|
|
583
583
|
version: "1"
|
|
584
|
-
},
|
|
585
|
-
async function
|
|
584
|
+
}, mu = "templatePack", vu = "template";
|
|
585
|
+
async function Jn(s) {
|
|
586
586
|
switch (s.type) {
|
|
587
587
|
case "from-file":
|
|
588
588
|
return {
|
|
@@ -598,36 +598,36 @@ async function Vn(s) {
|
|
|
598
598
|
return Q(s);
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
|
-
function
|
|
602
|
-
const t = s.createStruct(
|
|
601
|
+
function Wi(s, e) {
|
|
602
|
+
const t = s.createStruct(qi), r = M(t, _i), n = M(t, Ki), i = M(t, Hi);
|
|
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 Wi(s, e);
|
|
609
609
|
case "explicit":
|
|
610
|
-
return Ji(s, e);
|
|
611
|
-
case "prepared":
|
|
612
610
|
return Mi(s, e);
|
|
611
|
+
case "prepared":
|
|
612
|
+
return Gi(s, e);
|
|
613
613
|
default:
|
|
614
614
|
return Q(e);
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
|
-
const
|
|
617
|
+
const Mn = { name: "Frontend/FromUrl", version: "1" }, Gn = {
|
|
618
618
|
name: "Frontend/FromFolder",
|
|
619
619
|
version: "1"
|
|
620
620
|
};
|
|
621
|
-
function
|
|
621
|
+
function zi(s, e) {
|
|
622
622
|
switch (e.type) {
|
|
623
623
|
case "url":
|
|
624
624
|
return s.createValue(
|
|
625
|
-
|
|
625
|
+
Mn,
|
|
626
626
|
JSON.stringify({ url: e.url })
|
|
627
627
|
);
|
|
628
628
|
case "local":
|
|
629
629
|
return s.createValue(
|
|
630
|
-
|
|
630
|
+
Gn,
|
|
631
631
|
JSON.stringify({
|
|
632
632
|
path: e.path,
|
|
633
633
|
signature: e.signature
|
|
@@ -637,12 +637,12 @@ function Wi(s, e) {
|
|
|
637
637
|
return Q(e);
|
|
638
638
|
}
|
|
639
639
|
}
|
|
640
|
-
class
|
|
640
|
+
class Xi {
|
|
641
641
|
constructor() {
|
|
642
642
|
b(this, "nextMessageId", 0);
|
|
643
643
|
b(this, "worker");
|
|
644
644
|
b(this, "pendingRequests", /* @__PURE__ */ new Map());
|
|
645
|
-
const e = typeof global < "u" && "__WORKER_PATH__" in global ? global.__WORKER_PATH__ :
|
|
645
|
+
const e = typeof global < "u" && "__WORKER_PATH__" in global ? global.__WORKER_PATH__ : q.resolve(import.meta.dirname, "worker.js"), t = this.worker = new Qo(
|
|
646
646
|
e,
|
|
647
647
|
{
|
|
648
648
|
workerData: {}
|
|
@@ -673,24 +673,24 @@ class zi {
|
|
|
673
673
|
return this.terminate();
|
|
674
674
|
}
|
|
675
675
|
}
|
|
676
|
-
const
|
|
677
|
-
function
|
|
676
|
+
const Yi = { name: "BlockPackCustom", version: "1" }, qn = "template", _n = "frontend";
|
|
677
|
+
function fs(s) {
|
|
678
678
|
return s.endsWith("/") ? s : `${s}/`;
|
|
679
679
|
}
|
|
680
|
-
function
|
|
680
|
+
function Qi(s) {
|
|
681
681
|
return Buffer.from(s).toString("utf8");
|
|
682
682
|
}
|
|
683
683
|
function et(s) {
|
|
684
|
-
return JSON.parse(
|
|
684
|
+
return JSON.parse(Qi(s));
|
|
685
685
|
}
|
|
686
|
-
class
|
|
686
|
+
class Zi {
|
|
687
687
|
constructor(e, t, r) {
|
|
688
688
|
b(this, "remoteContentCache", new lt({
|
|
689
689
|
max: 500,
|
|
690
690
|
maxSize: 128 * 1024 * 1024,
|
|
691
691
|
fetchMethod: async (e) => {
|
|
692
692
|
const t = this.http !== void 0 ? { dispatcher: this.http } : {};
|
|
693
|
-
return await (await
|
|
693
|
+
return await (await $r(e, t)).body.arrayBuffer();
|
|
694
694
|
},
|
|
695
695
|
sizeCalculation: (e) => e.byteLength
|
|
696
696
|
}));
|
|
@@ -703,17 +703,17 @@ class Qi {
|
|
|
703
703
|
case "prepared":
|
|
704
704
|
return e.config;
|
|
705
705
|
case "dev-v1": {
|
|
706
|
-
const t = await
|
|
706
|
+
const t = await cs(e.folder), r = await oe.promises.readFile(t.config, { encoding: "utf-8" });
|
|
707
707
|
return JSON.parse(r);
|
|
708
708
|
}
|
|
709
709
|
case "dev-v2": {
|
|
710
|
-
const t = await
|
|
710
|
+
const t = await es(e.folder), r = await oe.promises.readFile(t.components.model.file, {
|
|
711
711
|
encoding: "utf-8"
|
|
712
712
|
});
|
|
713
713
|
return JSON.parse(r);
|
|
714
714
|
}
|
|
715
715
|
case "from-registry-v1": {
|
|
716
|
-
const t = `${
|
|
716
|
+
const t = `${fs(e.registryUrl)}${ye.packageContentPrefix({ organization: e.id.organization, package: e.id.name, version: e.id.version })}`, r = await this.remoteContentCache.forceFetch(`${t}/config.json`);
|
|
717
717
|
return et(r);
|
|
718
718
|
}
|
|
719
719
|
case "from-registry-v2": {
|
|
@@ -730,7 +730,7 @@ class Qi {
|
|
|
730
730
|
if (e.type === "prepared")
|
|
731
731
|
return e;
|
|
732
732
|
const t = await this.prepareWithoutUnpacking(e);
|
|
733
|
-
const r =
|
|
733
|
+
const r = Xr(n, new Xi(), !0);
|
|
734
734
|
return {
|
|
735
735
|
...t,
|
|
736
736
|
type: "prepared",
|
|
@@ -742,7 +742,7 @@ class Qi {
|
|
|
742
742
|
} catch (i) {
|
|
743
743
|
var o = i, a = !0;
|
|
744
744
|
} finally {
|
|
745
|
-
var c =
|
|
745
|
+
var c = Yr(n, o, a);
|
|
746
746
|
c && await c;
|
|
747
747
|
}
|
|
748
748
|
}
|
|
@@ -751,7 +751,7 @@ class Qi {
|
|
|
751
751
|
case "explicit":
|
|
752
752
|
return e;
|
|
753
753
|
case "dev-v1": {
|
|
754
|
-
const t = await
|
|
754
|
+
const t = await cs(e.folder), r = await oe.promises.readFile(t.workflow), n = JSON.parse(
|
|
755
755
|
await oe.promises.readFile(t.config, "utf-8")
|
|
756
756
|
), i = t.ui;
|
|
757
757
|
return {
|
|
@@ -770,14 +770,14 @@ class Qi {
|
|
|
770
770
|
};
|
|
771
771
|
}
|
|
772
772
|
case "dev-v2": {
|
|
773
|
-
const t = await
|
|
773
|
+
const t = await es(e.folder), r = JSON.parse(
|
|
774
774
|
await oe.promises.readFile(t.components.model.file, {
|
|
775
775
|
encoding: "utf-8"
|
|
776
776
|
})
|
|
777
777
|
), n = await oe.promises.readFile(
|
|
778
778
|
t.components.workflow.main.file
|
|
779
779
|
), i = t.components.ui.folder, o = { ...e };
|
|
780
|
-
return e.mtime === void 0 && (o.mtime = await
|
|
780
|
+
return e.mtime === void 0 && (o.mtime = await Nr(t)), {
|
|
781
781
|
type: "explicit",
|
|
782
782
|
template: {
|
|
783
783
|
type: "explicit",
|
|
@@ -793,7 +793,7 @@ class Qi {
|
|
|
793
793
|
};
|
|
794
794
|
}
|
|
795
795
|
case "from-registry-v1": {
|
|
796
|
-
const t = `${
|
|
796
|
+
const t = `${fs(e.registryUrl)}${ye.packageContentPrefix({ organization: e.id.organization, package: e.id.name, version: e.id.version })}`, r = `${t}/template.plj.gz`, n = await this.remoteContentCache.forceFetch(r), i = new Uint8Array(n), o = await this.remoteContentCache.forceFetch(`${t}/config.json`), a = et(o);
|
|
797
797
|
return {
|
|
798
798
|
type: "explicit",
|
|
799
799
|
template: {
|
|
@@ -829,14 +829,14 @@ class Qi {
|
|
|
829
829
|
}
|
|
830
830
|
}
|
|
831
831
|
}
|
|
832
|
-
function
|
|
833
|
-
const t = { config: e.config, source: e.source }, r = s.createStruct(
|
|
834
|
-
return s.createField(
|
|
832
|
+
function ea(s, e) {
|
|
833
|
+
const t = { config: e.config, source: e.source }, r = s.createStruct(Yi, JSON.stringify(t));
|
|
834
|
+
return s.createField(M(r, qn), "Input", ht(s, e.template)), s.createField(M(r, _n), "Input", zi(s, e.frontend)), s.lock(r), r;
|
|
835
835
|
}
|
|
836
|
-
function
|
|
836
|
+
function hs(s, e) {
|
|
837
837
|
switch (e.type) {
|
|
838
838
|
case "prepared":
|
|
839
|
-
return
|
|
839
|
+
return ea(s, e);
|
|
840
840
|
default:
|
|
841
841
|
return Q(e.type);
|
|
842
842
|
}
|
|
@@ -844,10 +844,10 @@ function ps(s, e) {
|
|
|
844
844
|
function tt(s, e, t) {
|
|
845
845
|
return { __isRef: !0, blockId: s, name: e };
|
|
846
846
|
}
|
|
847
|
-
function
|
|
847
|
+
function ta(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 Or(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 (ta(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) Or(s, n, t);
|
|
867
867
|
else
|
|
868
868
|
for (const [, n] of Object.entries(e))
|
|
869
|
-
|
|
869
|
+
Or(s, n, t);
|
|
870
870
|
return;
|
|
871
871
|
default:
|
|
872
872
|
Q(r);
|
|
873
873
|
}
|
|
874
874
|
}
|
|
875
|
-
function
|
|
875
|
+
function ra(s, e) {
|
|
876
876
|
const t = { upstreams: /* @__PURE__ */ new Set(), upstreamsRequiringEnrichments: /* @__PURE__ */ new Set(), missingReferences: !1 };
|
|
877
|
-
return
|
|
877
|
+
return Or(t, s, e), t;
|
|
878
878
|
}
|
|
879
879
|
function se(s) {
|
|
880
880
|
return {
|
|
@@ -883,7 +883,7 @@ function se(s) {
|
|
|
883
883
|
}
|
|
884
884
|
};
|
|
885
885
|
}
|
|
886
|
-
class
|
|
886
|
+
class Kn {
|
|
887
887
|
constructor(e) {
|
|
888
888
|
/** Nodes are stored in the map in topological order */
|
|
889
889
|
b(this, "nodes");
|
|
@@ -913,7 +913,7 @@ class _n {
|
|
|
913
913
|
}
|
|
914
914
|
}
|
|
915
915
|
}
|
|
916
|
-
function
|
|
916
|
+
function Fr(s) {
|
|
917
917
|
const e = /* @__PURE__ */ new Map();
|
|
918
918
|
let t;
|
|
919
919
|
for (const { id: r } of se(s)) {
|
|
@@ -923,14 +923,14 @@ function Or(s) {
|
|
|
923
923
|
};
|
|
924
924
|
e.set(r, n), t === void 0 ? (n.directUpstream = n.upstream = /* @__PURE__ */ new Set(), n.enrichments = n.enrichmentTargets = /* @__PURE__ */ new Set()) : (n.directUpstream = n.upstream = /* @__PURE__ */ new Set([t.id]), t.directDownstream = t.downstream = /* @__PURE__ */ new Set([n.id]), t.enrichments = t.enrichmentTargets = /* @__PURE__ */ new Set()), t = n;
|
|
925
925
|
}
|
|
926
|
-
return t !== void 0 && (t.directDownstream = t.downstream = /* @__PURE__ */ new Set()), new
|
|
926
|
+
return t !== void 0 && (t.directDownstream = t.downstream = /* @__PURE__ */ new Set()), new Kn(e);
|
|
927
927
|
}
|
|
928
928
|
function nt(s, e) {
|
|
929
|
-
const t = /* @__PURE__ */ new Map(), r = new
|
|
929
|
+
const t = /* @__PURE__ */ new Map(), r = new Kn(t), n = /* @__PURE__ */ new Set();
|
|
930
930
|
for (const { id: i } of se(s)) {
|
|
931
931
|
const o = e(i);
|
|
932
932
|
if (o === void 0) continue;
|
|
933
|
-
const a =
|
|
933
|
+
const a = ra(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,37 +962,37 @@ function nt(s, e) {
|
|
|
962
962
|
}
|
|
963
963
|
return r;
|
|
964
964
|
}
|
|
965
|
-
function
|
|
965
|
+
function sa(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;
|
|
969
969
|
}
|
|
970
|
-
function
|
|
971
|
-
if (s.size > e.size) return
|
|
970
|
+
function Tr(s, e) {
|
|
971
|
+
if (s.size > e.size) return Tr(e, s);
|
|
972
972
|
for (const t of s) if (e.has(t)) return !0;
|
|
973
973
|
return !1;
|
|
974
974
|
}
|
|
975
|
-
function
|
|
975
|
+
function gs(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) : (!sa(i.upstream, o.upstream) || Tr(i.upstream, n)) && n.add(i.id);
|
|
980
980
|
}), e.nodes.forEach((i) => {
|
|
981
|
-
s.nodes.has(i.id) ?
|
|
981
|
+
s.nodes.has(i.id) ? Tr(i.upstream, n) && n.add(i.id) : r.add(i.id);
|
|
982
982
|
}), { onlyInA: t, onlyInB: r, different: n };
|
|
983
983
|
}
|
|
984
984
|
let Pt;
|
|
985
|
-
async function
|
|
985
|
+
async function Hn() {
|
|
986
986
|
if (Pt === void 0) {
|
|
987
|
-
const s = await
|
|
987
|
+
const s = await Jn(Se["pframes.export-pframe-for-ui"]);
|
|
988
988
|
if (s.type !== "explicit") throw new Error("Unexpected prepared template type.");
|
|
989
|
-
const e =
|
|
989
|
+
const e = Ie("sha256").update(s.content).digest("hex");
|
|
990
990
|
Pt = { spec: s, hash: e };
|
|
991
991
|
}
|
|
992
992
|
return Pt;
|
|
993
993
|
}
|
|
994
|
-
function
|
|
995
|
-
return
|
|
994
|
+
function na(s, e, t) {
|
|
995
|
+
return jr(s, e, !0, { pf: t }, ["result"]).result;
|
|
996
996
|
}
|
|
997
997
|
let ke;
|
|
998
998
|
function Z() {
|
|
@@ -1076,12 +1076,12 @@ class Ot {
|
|
|
1076
1076
|
getTemplate(e) {
|
|
1077
1077
|
return e.getFutureFieldValue(
|
|
1078
1078
|
D.unwrapHolder(e, this.fields.blockPack.ref),
|
|
1079
|
-
|
|
1079
|
+
qn,
|
|
1080
1080
|
"Input"
|
|
1081
1081
|
);
|
|
1082
1082
|
}
|
|
1083
1083
|
}
|
|
1084
|
-
const
|
|
1084
|
+
const oa = (s) => {
|
|
1085
1085
|
throw new Error(`No new block info for ${s}`);
|
|
1086
1086
|
};
|
|
1087
1087
|
class pt {
|
|
@@ -1111,7 +1111,7 @@ class pt {
|
|
|
1111
1111
|
});
|
|
1112
1112
|
let e;
|
|
1113
1113
|
this.blockInfos.forEach((t) => {
|
|
1114
|
-
t.fields.blockSettings === void 0 && (e === void 0 && (e = this.createJsonFieldValue(
|
|
1114
|
+
t.fields.blockSettings === void 0 && (e === void 0 && (e = this.createJsonFieldValue(Zr)), this.setBlockFieldObj(t.id, "blockSettings", e));
|
|
1115
1115
|
});
|
|
1116
1116
|
}
|
|
1117
1117
|
get wasModified() {
|
|
@@ -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 = Fr(this.struct)), this.stagingGraph;
|
|
1125
1125
|
}
|
|
1126
1126
|
getProductionGraphBlockInfo(e, t) {
|
|
1127
1127
|
const r = this.getBlockInfo(e);
|
|
@@ -1132,7 +1132,7 @@ class pt {
|
|
|
1132
1132
|
} else
|
|
1133
1133
|
n = N(r.fields.currentArgs), i = r.currentArgs;
|
|
1134
1134
|
const o = N(r.fields.blockPack);
|
|
1135
|
-
return
|
|
1135
|
+
return ss(n.ref) && ss(o.ref) ? {
|
|
1136
1136
|
args: i,
|
|
1137
1137
|
enrichmentTargets: this.projectHelper.getEnrichmentTargets(
|
|
1138
1138
|
() => r.config,
|
|
@@ -1176,7 +1176,7 @@ class pt {
|
|
|
1176
1176
|
throw new Error("block not found");
|
|
1177
1177
|
}
|
|
1178
1178
|
setBlockFieldObj(e, t, r) {
|
|
1179
|
-
const n =
|
|
1179
|
+
const n = M(this.rid, _(e, t));
|
|
1180
1180
|
if (r.ref === void 0) throw new Error("Can't set value with empty ref");
|
|
1181
1181
|
this.getBlockInfo(e).fields[t] === void 0 ? this.tx.createField(n, "Dynamic", r.ref) : this.tx.setField(n, r.ref), this.getBlockInfo(e).fields[t] = {
|
|
1182
1182
|
modCount: this.globalModCount++,
|
|
@@ -1191,7 +1191,7 @@ class pt {
|
|
|
1191
1191
|
const n = this.getBlockInfo(e);
|
|
1192
1192
|
for (const i of t) {
|
|
1193
1193
|
const o = n.fields;
|
|
1194
|
-
i in o && (this.tx.removeField(
|
|
1194
|
+
i in o && (this.tx.removeField(M(this.rid, _(e, i))), delete o[i], this.fieldsChanged = !0, r = !0);
|
|
1195
1195
|
}
|
|
1196
1196
|
return r;
|
|
1197
1197
|
}
|
|
@@ -1248,9 +1248,9 @@ class pt {
|
|
|
1248
1248
|
const l = a === "args" ? "currentArgs" : "uiState";
|
|
1249
1249
|
let u, d = !1;
|
|
1250
1250
|
if (a === "args")
|
|
1251
|
-
u =
|
|
1251
|
+
u = To(c);
|
|
1252
1252
|
else {
|
|
1253
|
-
const { data: f, isGzipped: v } =
|
|
1253
|
+
const { data: f, isGzipped: v } = Io(c);
|
|
1254
1254
|
u = f, d = v;
|
|
1255
1255
|
}
|
|
1256
1256
|
if (Buffer.compare(i.fields[l].value, u) === 0) continue;
|
|
@@ -1273,7 +1273,7 @@ class pt {
|
|
|
1273
1273
|
if (((i = n.fields.prodCtx) == null ? void 0 : i.ref) === void 0)
|
|
1274
1274
|
throw new Error("One of the upstreams staging is not rendered.");
|
|
1275
1275
|
t.push(D.unwrapHolder(this.tx, n.fields.prodCtx.ref));
|
|
1276
|
-
}),
|
|
1276
|
+
}), us(this.tx, t);
|
|
1277
1277
|
}
|
|
1278
1278
|
createStagingCtx(e) {
|
|
1279
1279
|
const t = [];
|
|
@@ -1283,16 +1283,16 @@ class pt {
|
|
|
1283
1283
|
if (((i = n.fields.stagingCtx) == null ? void 0 : i.ref) === void 0)
|
|
1284
1284
|
throw new Error("One of the upstreams staging is not rendered.");
|
|
1285
1285
|
t.push(D.unwrapHolder(this.tx, n.fields.stagingCtx.ref)), ((o = n.fields.prodCtx) == null ? void 0 : o.ref) !== void 0 && t.push(D.unwrapHolder(this.tx, n.fields.prodCtx.ref));
|
|
1286
|
-
}),
|
|
1286
|
+
}), us(this.tx, t);
|
|
1287
1287
|
}
|
|
1288
1288
|
exportCtx(e) {
|
|
1289
|
-
return
|
|
1289
|
+
return na(this.tx, D.unwrapHolder(this.tx, this.ctxExportTplHolder), e);
|
|
1290
1290
|
}
|
|
1291
1291
|
renderStagingFor(e) {
|
|
1292
1292
|
this.resetStaging(e);
|
|
1293
1293
|
const t = this.getBlockInfo(e), r = this.createStagingCtx(this.getStagingGraph().nodes.get(e).upstream);
|
|
1294
1294
|
if (this.getBlock(e).renderingMode !== "Heavy") throw new Error("not supported yet");
|
|
1295
|
-
const n = t.getTemplate(this.tx), i =
|
|
1295
|
+
const n = t.getTemplate(this.tx), i = ls(this.tx, n, {
|
|
1296
1296
|
args: t.fields.currentArgs.ref,
|
|
1297
1297
|
blockId: this.tx.createValue(D.JsonString, JSON.stringify(e)),
|
|
1298
1298
|
isProduction: this.tx.createValue(D.JsonBool, JSON.stringify(!1)),
|
|
@@ -1310,7 +1310,7 @@ class pt {
|
|
|
1310
1310
|
const t = this.getBlockInfo(e), r = this.createProdCtx(this.getPendingProductionGraph().nodes.get(e).upstream);
|
|
1311
1311
|
if (this.getBlock(e).renderingMode === "Light")
|
|
1312
1312
|
throw new Error("Can't render production for light block.");
|
|
1313
|
-
const n = t.getTemplate(this.tx), i =
|
|
1313
|
+
const n = t.getTemplate(this.tx), i = ls(this.tx, n, {
|
|
1314
1314
|
args: t.fields.currentArgs.ref,
|
|
1315
1315
|
blockId: this.tx.createValue(D.JsonString, JSON.stringify(e)),
|
|
1316
1316
|
isProduction: this.tx.createValue(D.JsonBool, JSON.stringify(!0)),
|
|
@@ -1327,13 +1327,13 @@ class pt {
|
|
|
1327
1327
|
// Structure changes
|
|
1328
1328
|
//
|
|
1329
1329
|
initializeNewBlock(e, t) {
|
|
1330
|
-
const r = new Ot(e, {},
|
|
1330
|
+
const r = new Ot(e, {}, Ee(t.blockPack.config), t.blockPack.source);
|
|
1331
1331
|
this.blockInfos.set(e, r);
|
|
1332
|
-
const n =
|
|
1332
|
+
const n = hs(this.tx, t.blockPack);
|
|
1333
1333
|
this.setBlockField(e, "blockPack", D.wrapInHolder(this.tx, n), "NotReady"), this.setBlockFieldObj(
|
|
1334
1334
|
e,
|
|
1335
1335
|
"blockSettings",
|
|
1336
|
-
this.createJsonFieldValue(
|
|
1336
|
+
this.createJsonFieldValue(Zr)
|
|
1337
1337
|
), this.setBlockFieldObj(e, "currentArgs", this.createJsonFieldValueByContent(t.args)), this.setBlockFieldObj(e, "uiState", this.createJsonFieldValueByContent(t.uiState ?? "{}")), r.check();
|
|
1338
1338
|
}
|
|
1339
1339
|
getFieldNamesToDuplicate(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 = oa) {
|
|
1375
|
+
const r = this.getStagingGraph(), n = this.getActualProductionGraph(), i = Fr(e), o = gs(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);
|
|
@@ -1383,7 +1383,7 @@ class pt {
|
|
|
1383
1383
|
const a = nt(
|
|
1384
1384
|
e,
|
|
1385
1385
|
(l) => this.getProductionGraphBlockInfo(l, !0)
|
|
1386
|
-
), c =
|
|
1386
|
+
), c = gs(n, a);
|
|
1387
1387
|
n.traverse("downstream", [...c.different], (l) => {
|
|
1388
1388
|
this.resetOrLimboProduction(l.id);
|
|
1389
1389
|
}), (o.onlyInB.size > 0 || o.onlyInA.size > 0 || o.different.size > 0) && this.resetStagingRefreshTimestamp(), this.struct = e, this.structureChanged = !0, this.stagingGraph = void 0, this.pendingProductionGraph = void 0, this.actualProductionGraph = void 0, this.updateLastModified();
|
|
@@ -1464,7 +1464,7 @@ class pt {
|
|
|
1464
1464
|
this.setBlockField(
|
|
1465
1465
|
e,
|
|
1466
1466
|
"blockPack",
|
|
1467
|
-
D.wrapInHolder(this.tx,
|
|
1467
|
+
D.wrapInHolder(this.tx, hs(this.tx, t)),
|
|
1468
1468
|
"NotReady"
|
|
1469
1469
|
), r !== void 0 ? this.setStates([{ blockId: e, args: r.args, uiState: r.uiState }]) : this.getStagingGraph().traverse("downstream", [e], ({ id: i }) => this.resetStaging(i)), n.productionRendered && this.getActualProductionGraph().traverse(
|
|
1470
1470
|
"downstream",
|
|
@@ -1513,7 +1513,7 @@ class pt {
|
|
|
1513
1513
|
* accordingly */
|
|
1514
1514
|
stopProduction(...e) {
|
|
1515
1515
|
var o, a;
|
|
1516
|
-
const t = this.getActualProductionGraph(), r = new
|
|
1516
|
+
const t = this.getActualProductionGraph(), r = new Pn(e), n = new Set(e), i = [];
|
|
1517
1517
|
for (; !r.isEmpty(); ) {
|
|
1518
1518
|
const c = r.shift(), l = this.getBlockInfo(c).fields;
|
|
1519
1519
|
if (!(((o = l.prodOutput) == null ? void 0 : o.status) === "Ready" && ((a = l.prodCtx) == null ? void 0 : a.status) === "Ready") && this.deleteBlockFields(c, "prodOutput", "prodCtx", "prodUiCtx", "prodArgs")) {
|
|
@@ -1573,8 +1573,8 @@ class pt {
|
|
|
1573
1573
|
assignAuthorMarkers() {
|
|
1574
1574
|
const e = this.author ? JSON.stringify(this.author) : void 0;
|
|
1575
1575
|
for (const t of this.blocksWithChangedInputs)
|
|
1576
|
-
e === void 0 ? this.tx.deleteKValue(this.rid,
|
|
1577
|
-
(this.metaChanged || this.structureChanged) && (e === void 0 ? this.tx.deleteKValue(this.rid,
|
|
1576
|
+
e === void 0 ? this.tx.deleteKValue(this.rid, Rr(t)) : this.tx.setKValue(this.rid, Rr(t), e);
|
|
1577
|
+
(this.metaChanged || this.structureChanged) && (e === void 0 ? this.tx.deleteKValue(this.rid, Pr) : this.tx.setKValue(this.rid, Pr, e));
|
|
1578
1578
|
}
|
|
1579
1579
|
save() {
|
|
1580
1580
|
this.wasModified && (this.lastModifiedChanged && this.tx.setKValue(this.rid, _e, JSON.stringify(this.lastModified)), this.structureChanged && this.tx.setKValue(this.rid, fe, JSON.stringify(this.struct)), this.renderingStateChanged && this.tx.setKValue(
|
|
@@ -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, Ke), l = t.getKValueJson(r, fe), 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 = Ii(g.name);
|
|
1593
1593
|
if (m === void 0) continue;
|
|
1594
1594
|
let S = p.get(m.blockId);
|
|
1595
1595
|
S === void 0 && (S = {
|
|
@@ -1602,7 +1602,7 @@ class pt {
|
|
|
1602
1602
|
const m = g.fields;
|
|
1603
1603
|
for (const [S, w] of Object.entries(m)) {
|
|
1604
1604
|
if (w.ref === void 0) continue;
|
|
1605
|
-
if (!
|
|
1605
|
+
if (!Bo(w.ref) || jo(w.ref))
|
|
1606
1606
|
throw new Error("unexpected behaviour");
|
|
1607
1607
|
const C = S;
|
|
1608
1608
|
f.push([
|
|
@@ -1627,11 +1627,11 @@ class pt {
|
|
|
1627
1627
|
u
|
|
1628
1628
|
]);
|
|
1629
1629
|
if (v !== qe)
|
|
1630
|
-
throw Number(v) < Number(qe) ? new
|
|
1630
|
+
throw Number(v) < Number(qe) ? new Qr("Can't perform this action on this project because it has older schema. Try (re)loading the project to update it.") : new Qr("Can't perform this action on this project because it has newer schema. Upgrade your desktop app to the latest version.");
|
|
1631
1631
|
const x = [];
|
|
1632
1632
|
for (const [g, m, S, w] of f) {
|
|
1633
1633
|
const C = await w;
|
|
1634
|
-
if (S.value = C.data,
|
|
1634
|
+
if (S.value = C.data, Cr(C.error) ? S.status = "Error" : C.resourceReady || Cr(C.originalResourceId) ? S.status = "Ready" : S.status = "NotReady", m === "blockPack") {
|
|
1635
1635
|
const k = C.fields.find((O) => O.name === D.HolderRefField);
|
|
1636
1636
|
if (k === void 0)
|
|
1637
1637
|
throw new Error("Block pack ref field is missing");
|
|
@@ -1640,18 +1640,18 @@ class pt {
|
|
|
1640
1640
|
}
|
|
1641
1641
|
for (const [g, m] of x) {
|
|
1642
1642
|
const S = await m, w = Je(N(S.data));
|
|
1643
|
-
g.blockConfig =
|
|
1643
|
+
g.blockConfig = Ee(w.config), g.blockPack = w.source;
|
|
1644
1644
|
}
|
|
1645
|
-
const U = await
|
|
1645
|
+
const U = await Hn(), P = Er(U.hash), $ = d.fields.find(
|
|
1646
1646
|
(g) => g.name === P
|
|
1647
1647
|
);
|
|
1648
1648
|
let R;
|
|
1649
1649
|
$ !== void 0 ? R = ct($.value) : (R = D.wrapInHolder(t, ht(t, U.spec)), t.createField(
|
|
1650
|
-
|
|
1650
|
+
M(r, Er(U.hash)),
|
|
1651
1651
|
"Dynamic",
|
|
1652
1652
|
R
|
|
1653
1653
|
));
|
|
1654
|
-
const
|
|
1654
|
+
const G = { stagingRefreshTimestamp: B }, le = new Set(F), X = /* @__PURE__ */ new Map();
|
|
1655
1655
|
p.forEach(({ id: g, fields: m, blockConfig: S, blockPack: w }) => X.set(
|
|
1656
1656
|
g,
|
|
1657
1657
|
new Ot(g, m, N(S), N(w))
|
|
@@ -1675,7 +1675,7 @@ class pt {
|
|
|
1675
1675
|
h,
|
|
1676
1676
|
y,
|
|
1677
1677
|
E,
|
|
1678
|
-
|
|
1678
|
+
G,
|
|
1679
1679
|
le,
|
|
1680
1680
|
X,
|
|
1681
1681
|
R,
|
|
@@ -1684,14 +1684,14 @@ class pt {
|
|
|
1684
1684
|
return z.fixProblemsAndMigrate(), z;
|
|
1685
1685
|
}
|
|
1686
1686
|
}
|
|
1687
|
-
async function
|
|
1688
|
-
const t = s.createEphemeral(
|
|
1687
|
+
async function ia(s, e = Pi) {
|
|
1688
|
+
const t = s.createEphemeral(Ei);
|
|
1689
1689
|
s.lock(t);
|
|
1690
1690
|
const r = String(Date.now());
|
|
1691
|
-
s.setKValue(t, ut, JSON.stringify(qe)), s.setKValue(t,
|
|
1692
|
-
const n = await
|
|
1691
|
+
s.setKValue(t, ut, JSON.stringify(qe)), s.setKValue(t, Br, r), s.setKValue(t, _e, r), s.setKValue(t, Ke, JSON.stringify(e)), s.setKValue(t, fe, JSON.stringify(Ci)), s.setKValue(t, dt, JSON.stringify(Ri));
|
|
1692
|
+
const n = await Hn();
|
|
1693
1693
|
return s.createField(
|
|
1694
|
-
|
|
1694
|
+
M(t, Er(n.hash)),
|
|
1695
1695
|
"Dynamic",
|
|
1696
1696
|
D.wrapInHolder(s, ht(s, n.spec))
|
|
1697
1697
|
), t;
|
|
@@ -1700,7 +1700,7 @@ async function rt(s, e, t, r) {
|
|
|
1700
1700
|
return ne(s, e, t, void 0, r);
|
|
1701
1701
|
}
|
|
1702
1702
|
async function ne(s, e, t, r, n) {
|
|
1703
|
-
if (e instanceof
|
|
1703
|
+
if (e instanceof kn)
|
|
1704
1704
|
return await e.withWriteTx("ProjectAction", async (i) => {
|
|
1705
1705
|
const o = await pt.load(s, i, t, r), a = await n(o);
|
|
1706
1706
|
return o.wasModified && (o.save(), await i.commit(), Z().logProjectMutationStat && console.log(JSON.stringify(i.stat))), a;
|
|
@@ -1710,19 +1710,19 @@ async function ne(s, e, t, r, n) {
|
|
|
1710
1710
|
return i.save(), o;
|
|
1711
1711
|
}
|
|
1712
1712
|
}
|
|
1713
|
-
function*
|
|
1713
|
+
function* aa(s) {
|
|
1714
1714
|
switch (s.type) {
|
|
1715
1715
|
case "Json":
|
|
1716
1716
|
return;
|
|
1717
1717
|
case "JsonPartitioned":
|
|
1718
|
-
for (const
|
|
1718
|
+
for (const e of Object.values(s.parts)) yield e;
|
|
1719
1719
|
return;
|
|
1720
1720
|
case "BinaryPartitioned":
|
|
1721
|
-
for (const
|
|
1721
|
+
for (const { index: e, values: t } of Object.values(s.parts))
|
|
1722
1722
|
yield e, yield t;
|
|
1723
1723
|
return;
|
|
1724
1724
|
case "ParquetPartitioned":
|
|
1725
|
-
for (const
|
|
1725
|
+
for (const { data: e } of Object.values(s.parts)) yield e;
|
|
1726
1726
|
return;
|
|
1727
1727
|
default:
|
|
1728
1728
|
Q(s);
|
|
@@ -1733,7 +1733,7 @@ function Ft(s, e) {
|
|
|
1733
1733
|
Object.entries(s).map(([t, r]) => [t, e(r, t)])
|
|
1734
1734
|
);
|
|
1735
1735
|
}
|
|
1736
|
-
function
|
|
1736
|
+
function ca(s, e) {
|
|
1737
1737
|
switch (s.type) {
|
|
1738
1738
|
case "Json":
|
|
1739
1739
|
return { ...s };
|
|
@@ -1753,35 +1753,38 @@ function aa(s, e) {
|
|
|
1753
1753
|
case "ParquetPartitioned":
|
|
1754
1754
|
return {
|
|
1755
1755
|
...s,
|
|
1756
|
-
parts: Ft(s.parts,
|
|
1756
|
+
parts: Ft(s.parts, (t) => ({
|
|
1757
|
+
...t,
|
|
1758
|
+
data: e(t.data)
|
|
1759
|
+
}))
|
|
1757
1760
|
};
|
|
1758
1761
|
default:
|
|
1759
1762
|
Q(s);
|
|
1760
1763
|
}
|
|
1761
1764
|
}
|
|
1762
|
-
const
|
|
1765
|
+
const la = we("PColumnData/JsonPartitioned", "1"), ua = we(
|
|
1763
1766
|
"PColumnData/Partitioned/JsonPartitioned",
|
|
1764
1767
|
"1"
|
|
1765
|
-
),
|
|
1768
|
+
), da = we("PColumnData/BinaryPartitioned", "1"), pa = we(
|
|
1766
1769
|
"PColumnData/Partitioned/BinaryPartitioned",
|
|
1767
1770
|
"1"
|
|
1768
|
-
),
|
|
1771
|
+
), fa = we("PColumnData/ParquetPartitioned", "1"), ha = we(
|
|
1769
1772
|
"PColumnData/Partitioned/ParquetPartitioned",
|
|
1770
1773
|
"1"
|
|
1771
|
-
),
|
|
1772
|
-
function
|
|
1773
|
-
if (!s.getIsReadyOrError()) throw new
|
|
1774
|
+
), ga = we("PColumnData/Json", "1");
|
|
1775
|
+
function ma(s) {
|
|
1776
|
+
if (!s.getIsReadyOrError()) throw new K("Data not ready.");
|
|
1774
1777
|
const e = s.getDataAsJson();
|
|
1775
1778
|
if (e === void 0)
|
|
1776
|
-
throw new
|
|
1777
|
-
if (ue(s.resourceType,
|
|
1779
|
+
throw new K("unexpected data info structure, no resource data");
|
|
1780
|
+
if (ue(s.resourceType, ga)) {
|
|
1778
1781
|
const t = e;
|
|
1779
1782
|
return {
|
|
1780
1783
|
type: "Json",
|
|
1781
1784
|
keyLength: t.keyLength,
|
|
1782
1785
|
data: t.data
|
|
1783
1786
|
};
|
|
1784
|
-
} else if (ue(s.resourceType,
|
|
1787
|
+
} else if (ue(s.resourceType, la)) {
|
|
1785
1788
|
const t = e, r = Object.fromEntries(
|
|
1786
1789
|
s.listInputFields().map((n) => [n, s.traverse({ field: n, errorIfFieldNotSet: !0 }).resourceInfo])
|
|
1787
1790
|
);
|
|
@@ -1790,11 +1793,11 @@ function ga(s) {
|
|
|
1790
1793
|
partitionKeyLength: t.partitionKeyLength,
|
|
1791
1794
|
parts: r
|
|
1792
1795
|
};
|
|
1793
|
-
} else if (ue(s.resourceType,
|
|
1796
|
+
} else if (ue(s.resourceType, ua)) {
|
|
1794
1797
|
const t = e, r = {};
|
|
1795
1798
|
for (const n of s.listInputFields()) {
|
|
1796
1799
|
const i = s.traverse({ field: n, errorIfFieldNotSet: !0 }), o = i.listInputFields();
|
|
1797
|
-
if (o === void 0) throw new
|
|
1800
|
+
if (o === void 0) throw new K(`no partition keys for super key ${n}`);
|
|
1798
1801
|
for (const a of o) {
|
|
1799
1802
|
const c = JSON.stringify([
|
|
1800
1803
|
...JSON.parse(n),
|
|
@@ -1808,7 +1811,7 @@ function ga(s) {
|
|
|
1808
1811
|
partitionKeyLength: t.superPartitionKeyLength + t.partitionKeyLength,
|
|
1809
1812
|
parts: r
|
|
1810
1813
|
};
|
|
1811
|
-
} else if (ue(s.resourceType,
|
|
1814
|
+
} else if (ue(s.resourceType, da)) {
|
|
1812
1815
|
const t = e, r = {};
|
|
1813
1816
|
for (const n of s.listInputFields())
|
|
1814
1817
|
if (n.endsWith(".index")) {
|
|
@@ -1819,21 +1822,21 @@ function ga(s) {
|
|
|
1819
1822
|
const i = n.slice(0, n.length - 7);
|
|
1820
1823
|
let o = r[i];
|
|
1821
1824
|
o === void 0 && (o = {}, r[i] = o), o.values = s.traverse({ field: n, errorIfFieldNotSet: !0 }).resourceInfo;
|
|
1822
|
-
} else throw new
|
|
1825
|
+
} else throw new K(`unrecognized part field name: ${n}`);
|
|
1823
1826
|
for (const [n, i] of Object.entries(r)) {
|
|
1824
|
-
if (i.index === void 0) throw new
|
|
1825
|
-
if (i.values === void 0) throw new
|
|
1827
|
+
if (i.index === void 0) throw new K(`no index for part ${n}`);
|
|
1828
|
+
if (i.values === void 0) throw new K(`no values for part ${n}`);
|
|
1826
1829
|
}
|
|
1827
1830
|
return {
|
|
1828
1831
|
type: "BinaryPartitioned",
|
|
1829
1832
|
partitionKeyLength: t.partitionKeyLength,
|
|
1830
1833
|
parts: r
|
|
1831
1834
|
};
|
|
1832
|
-
} else if (ue(s.resourceType,
|
|
1835
|
+
} else if (ue(s.resourceType, pa)) {
|
|
1833
1836
|
const t = e, r = {};
|
|
1834
1837
|
for (const n of s.listInputFields()) {
|
|
1835
1838
|
const i = s.traverse({ field: n, errorIfFieldNotSet: !0 }), o = i.listInputFields();
|
|
1836
|
-
if (o === void 0) throw new
|
|
1839
|
+
if (o === void 0) throw new K(`no partition keys for super key ${n}`);
|
|
1837
1840
|
for (const a of o)
|
|
1838
1841
|
if (a.endsWith(".index")) {
|
|
1839
1842
|
const c = a.slice(0, a.length - 6), l = JSON.stringify([
|
|
@@ -1855,68 +1858,62 @@ function ga(s) {
|
|
|
1855
1858
|
field: a,
|
|
1856
1859
|
errorIfFieldNotSet: !0
|
|
1857
1860
|
}).resourceInfo;
|
|
1858
|
-
} else throw new
|
|
1861
|
+
} else throw new K(`unrecognized part field name: ${a}`);
|
|
1859
1862
|
}
|
|
1860
1863
|
return {
|
|
1861
1864
|
type: "BinaryPartitioned",
|
|
1862
1865
|
partitionKeyLength: t.superPartitionKeyLength + t.partitionKeyLength,
|
|
1863
1866
|
parts: r
|
|
1864
1867
|
};
|
|
1865
|
-
} else if (ue(s.resourceType,
|
|
1868
|
+
} else if (ue(s.resourceType, fa)) {
|
|
1866
1869
|
const t = e, r = {};
|
|
1867
1870
|
for (const n of s.listInputFields()) {
|
|
1868
|
-
const i = s.traverse({ field: n, assertFieldType: "Input", errorIfFieldNotSet: !0 })
|
|
1869
|
-
|
|
1870
|
-
).resourceInfo, a = i.getDataAsJson(), c = i.traverse(
|
|
1871
|
-
{ field: "mapping", assertFieldType: "Service", errorIfFieldNotSet: !0 }
|
|
1872
|
-
).getDataAsJson();
|
|
1873
|
-
r[n] = {
|
|
1874
|
-
data: o,
|
|
1875
|
-
...a,
|
|
1876
|
-
...c
|
|
1877
|
-
};
|
|
1871
|
+
const i = s.traverse({ field: n, assertFieldType: "Input", errorIfFieldNotSet: !0 });
|
|
1872
|
+
r[n] = Ir(i);
|
|
1878
1873
|
}
|
|
1879
1874
|
return {
|
|
1880
1875
|
type: "ParquetPartitioned",
|
|
1881
1876
|
partitionKeyLength: t.partitionKeyLength,
|
|
1882
1877
|
parts: r
|
|
1883
|
-
// TODO: remove cast
|
|
1884
1878
|
};
|
|
1885
|
-
} else if (ue(s.resourceType,
|
|
1879
|
+
} else if (ue(s.resourceType, ha)) {
|
|
1886
1880
|
const t = e, r = {};
|
|
1887
1881
|
for (const n of s.listInputFields()) {
|
|
1888
1882
|
const o = s.traverse({ field: n, errorIfFieldNotSet: !0 }).listInputFields();
|
|
1889
|
-
if (o === void 0) throw new
|
|
1883
|
+
if (o === void 0) throw new K(`no partition keys for super key ${n}`);
|
|
1890
1884
|
for (const a of o) {
|
|
1891
|
-
const c = s.traverse({ field: a, errorIfFieldNotSet: !0 }), l =
|
|
1892
|
-
{ field: "blob", assertFieldType: "Service", errorIfFieldNotSet: !0 }
|
|
1893
|
-
).resourceInfo, u = c.getDataAsJson(), d = c.traverse(
|
|
1894
|
-
{ field: "mapping", assertFieldType: "Service", errorIfFieldNotSet: !0 }
|
|
1895
|
-
).getDataAsJson(), p = JSON.stringify([
|
|
1885
|
+
const c = s.traverse({ field: a, errorIfFieldNotSet: !0 }), l = JSON.stringify([
|
|
1896
1886
|
...JSON.parse(n),
|
|
1897
1887
|
...JSON.parse(a)
|
|
1898
1888
|
]);
|
|
1899
|
-
r[
|
|
1900
|
-
data: l,
|
|
1901
|
-
...u,
|
|
1902
|
-
...d
|
|
1903
|
-
};
|
|
1889
|
+
r[l] = Ir(c);
|
|
1904
1890
|
}
|
|
1905
1891
|
}
|
|
1906
1892
|
return {
|
|
1907
1893
|
type: "ParquetPartitioned",
|
|
1908
1894
|
partitionKeyLength: t.superPartitionKeyLength + t.partitionKeyLength,
|
|
1909
1895
|
parts: r
|
|
1910
|
-
// TODO: remove cast
|
|
1911
1896
|
};
|
|
1912
1897
|
}
|
|
1913
|
-
throw new
|
|
1898
|
+
throw new K(`unsupported resource type: ${xo(s.resourceType)}`);
|
|
1899
|
+
}
|
|
1900
|
+
function Ir(s) {
|
|
1901
|
+
const e = s.traverse(
|
|
1902
|
+
{ field: "blob", assertFieldType: "Service", errorIfFieldNotSet: !0 }
|
|
1903
|
+
).resourceInfo, t = s.getDataAsJson(), r = s.traverse(
|
|
1904
|
+
{ field: "mapping", assertFieldType: "Service", errorIfFieldNotSet: !0 }
|
|
1905
|
+
).getDataAsJson();
|
|
1906
|
+
return {
|
|
1907
|
+
data: e,
|
|
1908
|
+
...t,
|
|
1909
|
+
...r
|
|
1910
|
+
};
|
|
1914
1911
|
}
|
|
1915
|
-
function
|
|
1912
|
+
function va(s, e) {
|
|
1916
1913
|
const t = s.axesSpec.length, r = {};
|
|
1917
1914
|
for (const { key: n, val: i } of e) {
|
|
1918
1915
|
if (n.length !== t)
|
|
1919
|
-
throw new
|
|
1916
|
+
throw new K(`inline column key length ${n.length} differs from axes count ${t}`);
|
|
1920
1917
|
r[JSON.stringify(n)] = i;
|
|
1921
1918
|
}
|
|
1922
1919
|
return {
|
|
@@ -1925,17 +1922,17 @@ function ma(s, e) {
|
|
|
1925
1922
|
data: r
|
|
1926
1923
|
};
|
|
1927
1924
|
}
|
|
1928
|
-
function
|
|
1929
|
-
const t =
|
|
1925
|
+
function ya(s, e) {
|
|
1926
|
+
const t = Ie("sha256");
|
|
1930
1927
|
return t.update(re(s)), t.update(String(Me(e.originalId) ? e.id : e.originalId)), t.digest().toString("hex");
|
|
1931
1928
|
}
|
|
1932
|
-
function
|
|
1929
|
+
function ms(s, e) {
|
|
1933
1930
|
return re({ __isRef: !0, blockId: s, name: e });
|
|
1934
1931
|
}
|
|
1935
|
-
function
|
|
1932
|
+
function wa(s, e) {
|
|
1936
1933
|
return re({ resolvePath: s, name: e });
|
|
1937
1934
|
}
|
|
1938
|
-
function
|
|
1935
|
+
function Wn(s, e = !0, t = !1, r = "") {
|
|
1939
1936
|
var a, c, l;
|
|
1940
1937
|
const n = /^(?<name>.*)\.(?<type>spec|data)$/, i = /* @__PURE__ */ new Map();
|
|
1941
1938
|
for (const u of s.listInputFields()) {
|
|
@@ -1973,10 +1970,10 @@ function Hn(s, e = !0, t = !1, r = "") {
|
|
|
1973
1970
|
for (const [, u] of i) u.data === void 0 && (u.hasData = !1);
|
|
1974
1971
|
return { locked: o, results: i };
|
|
1975
1972
|
}
|
|
1976
|
-
function
|
|
1973
|
+
function Sa(s, e = !0, t = "", r) {
|
|
1977
1974
|
if (!s.getIsReadyOrError()) throw new Error("resource is not ready");
|
|
1978
|
-
const n =
|
|
1979
|
-
|
|
1975
|
+
const n = Wn(s, e, !1, t);
|
|
1976
|
+
Zo(n.locked);
|
|
1980
1977
|
const i = {};
|
|
1981
1978
|
for (const [o, a] of n.results) {
|
|
1982
1979
|
if (a.spec === void 0) throw new Error(`no spec for key ${o}`);
|
|
@@ -1986,14 +1983,14 @@ function wa(s, e = !0, t = "", r) {
|
|
|
1986
1983
|
if (c === void 0) throw new Error(`no data for key ${o}`);
|
|
1987
1984
|
if (!c.ok) throw c.error;
|
|
1988
1985
|
i[o] = {
|
|
1989
|
-
id: r.length === 0 ?
|
|
1986
|
+
id: r.length === 0 ? ya(a.spec, c.value) : wa(r, o),
|
|
1990
1987
|
spec: a.spec,
|
|
1991
1988
|
data: c.value
|
|
1992
1989
|
};
|
|
1993
1990
|
}
|
|
1994
1991
|
return i;
|
|
1995
1992
|
}
|
|
1996
|
-
class
|
|
1993
|
+
class xr {
|
|
1997
1994
|
constructor(e, t) {
|
|
1998
1995
|
b(this, "allSpecsAvailable");
|
|
1999
1996
|
this.ctx = e, this.blocks = t;
|
|
@@ -2027,8 +2024,8 @@ class Br {
|
|
|
2027
2024
|
if (r === void 0) return;
|
|
2028
2025
|
const n = (a = (o = r.prod) == null ? void 0 : o.results) == null ? void 0 : a.get(t), i = (c = n == null ? void 0 : n.data) == null ? void 0 : c.call(n);
|
|
2029
2026
|
if (n !== void 0 && n.spec !== void 0 && i !== void 0)
|
|
2030
|
-
return
|
|
2031
|
-
id:
|
|
2027
|
+
return vn(i, (l) => ({
|
|
2028
|
+
id: ms(e, t),
|
|
2032
2029
|
spec: n.spec,
|
|
2033
2030
|
data: l
|
|
2034
2031
|
}));
|
|
@@ -2067,7 +2064,7 @@ class Br {
|
|
|
2067
2064
|
l !== void 0 ? e.push({
|
|
2068
2065
|
ref: tt(o, a),
|
|
2069
2066
|
obj: {
|
|
2070
|
-
id: l.ok ?
|
|
2067
|
+
id: l.ok ? ms(o, a) : void 0,
|
|
2071
2068
|
spec: c.spec,
|
|
2072
2069
|
data: l
|
|
2073
2070
|
}
|
|
@@ -2121,7 +2118,7 @@ class Br {
|
|
|
2121
2118
|
for (const r of this.blocks.values()) {
|
|
2122
2119
|
const n = /* @__PURE__ */ new Set(), i = (o) => {
|
|
2123
2120
|
for (const [a, c] of o.results)
|
|
2124
|
-
n.has(a) || c.spec === void 0 || (n.add(a),
|
|
2121
|
+
n.has(a) || c.spec === void 0 || (n.add(a), ho(e, c.spec) && t.push({
|
|
2125
2122
|
label: r.info.label + " / " + a,
|
|
2126
2123
|
ref: tt(r.info.id, a),
|
|
2127
2124
|
spec: c.spec
|
|
@@ -2132,53 +2129,53 @@ class Br {
|
|
|
2132
2129
|
return t;
|
|
2133
2130
|
}
|
|
2134
2131
|
static create(e, t, r) {
|
|
2135
|
-
const n = e.accessor(t).node(), i = N(n.getKeyValueAsJson(fe)), a =
|
|
2132
|
+
const n = e.accessor(t).node(), i = N(n.getKeyValueAsJson(fe)), a = Fr(i).traverseIds("upstream", r), c = /* @__PURE__ */ new Map();
|
|
2136
2133
|
for (const l of se(i)) {
|
|
2137
2134
|
if (!a.has(l.id)) continue;
|
|
2138
|
-
const u =
|
|
2135
|
+
const u = vs(
|
|
2139
2136
|
n.traverse({
|
|
2140
|
-
field:
|
|
2137
|
+
field: _(l.id, "prodCtx"),
|
|
2141
2138
|
ignoreError: !0,
|
|
2142
2139
|
pureFieldErrorToUndefined: !0,
|
|
2143
2140
|
stableIfNotFound: !0
|
|
2144
2141
|
}) !== void 0,
|
|
2145
2142
|
n.traverseOrError({
|
|
2146
|
-
field:
|
|
2143
|
+
field: _(l.id, "prodUiCtx"),
|
|
2147
2144
|
stableIfNotFound: !0
|
|
2148
2145
|
})
|
|
2149
|
-
), d =
|
|
2146
|
+
), d = vs(
|
|
2150
2147
|
n.traverse({
|
|
2151
|
-
field:
|
|
2148
|
+
field: _(l.id, "stagingCtx"),
|
|
2152
2149
|
ignoreError: !0,
|
|
2153
2150
|
pureFieldErrorToUndefined: !0
|
|
2154
2151
|
}) !== void 0,
|
|
2155
2152
|
n.traverseOrError({
|
|
2156
|
-
field:
|
|
2153
|
+
field: _(l.id, "stagingUiCtx")
|
|
2157
2154
|
})
|
|
2158
2155
|
);
|
|
2159
2156
|
c.set(l.id, { info: l, prod: u, staging: d });
|
|
2160
2157
|
}
|
|
2161
|
-
return new
|
|
2158
|
+
return new xr(e, c);
|
|
2162
2159
|
}
|
|
2163
2160
|
}
|
|
2164
|
-
function
|
|
2161
|
+
function vs(s, e) {
|
|
2165
2162
|
if (e === void 0)
|
|
2166
2163
|
return s ? { locked: !1, results: /* @__PURE__ */ new Map() } : void 0;
|
|
2167
|
-
if (e.ok) return
|
|
2164
|
+
if (e.ok) return Wn(e.value, !1, !0);
|
|
2168
2165
|
}
|
|
2169
|
-
function
|
|
2166
|
+
function Ur(s, e) {
|
|
2170
2167
|
return {
|
|
2171
2168
|
blockId: e,
|
|
2172
2169
|
args: (i) => kt(N(
|
|
2173
2170
|
i.accessor(s).node().traverse({
|
|
2174
|
-
field:
|
|
2171
|
+
field: _(e, "currentArgs"),
|
|
2175
2172
|
errorIfFieldNotSet: !0
|
|
2176
2173
|
}).getData()
|
|
2177
2174
|
)),
|
|
2178
2175
|
activeArgs: (i) => {
|
|
2179
2176
|
var a;
|
|
2180
2177
|
const o = (a = i.accessor(s).node().traverse({
|
|
2181
|
-
field:
|
|
2178
|
+
field: _(e, "prodArgs"),
|
|
2182
2179
|
stableIfNotFound: !0
|
|
2183
2180
|
})) == null ? void 0 : a.getData();
|
|
2184
2181
|
return o ? kt(o) : void 0;
|
|
@@ -2186,7 +2183,7 @@ function jr(s, e) {
|
|
|
2186
2183
|
uiState: (i) => {
|
|
2187
2184
|
var a;
|
|
2188
2185
|
const o = (a = i.accessor(s).node().traverse({
|
|
2189
|
-
field:
|
|
2186
|
+
field: _(e, "uiState"),
|
|
2190
2187
|
stableIfNotFound: !0
|
|
2191
2188
|
})) == null ? void 0 : a.getData();
|
|
2192
2189
|
return o ? kt(o) : void 0;
|
|
@@ -2198,13 +2195,13 @@ function jr(s, e) {
|
|
|
2198
2195
|
}
|
|
2199
2196
|
};
|
|
2200
2197
|
}
|
|
2201
|
-
function
|
|
2198
|
+
function zn(s, e) {
|
|
2202
2199
|
return {
|
|
2203
|
-
...
|
|
2200
|
+
...Ur(s, e),
|
|
2204
2201
|
prod: (t) => {
|
|
2205
2202
|
var r;
|
|
2206
2203
|
return (r = t.accessor(s).node({ ignoreError: !0 }).traverse({
|
|
2207
|
-
field:
|
|
2204
|
+
field: _(e, "prodOutput"),
|
|
2208
2205
|
stableIfNotFound: !0,
|
|
2209
2206
|
ignoreError: !0
|
|
2210
2207
|
})) == null ? void 0 : r.persist();
|
|
@@ -2212,12 +2209,12 @@ function Wn(s, e) {
|
|
|
2212
2209
|
staging: (t) => {
|
|
2213
2210
|
var n;
|
|
2214
2211
|
const r = (n = t.accessor(s).node({ ignoreError: !0 }).traverse({
|
|
2215
|
-
field:
|
|
2212
|
+
field: _(e, "stagingOutput"),
|
|
2216
2213
|
ignoreError: !0
|
|
2217
2214
|
})) == null ? void 0 : n.persist();
|
|
2218
2215
|
return r === void 0 && t.markUnstable("staging_not_rendered"), r;
|
|
2219
2216
|
},
|
|
2220
|
-
getResultsPool: (t) =>
|
|
2217
|
+
getResultsPool: (t) => xr.create(t, s, e)
|
|
2221
2218
|
};
|
|
2222
2219
|
}
|
|
2223
2220
|
function* te(s, e) {
|
|
@@ -2272,15 +2269,15 @@ function* te(s, e) {
|
|
|
2272
2269
|
Q(s);
|
|
2273
2270
|
}
|
|
2274
2271
|
}
|
|
2275
|
-
function
|
|
2272
|
+
function ba(s, e) {
|
|
2276
2273
|
const t = {};
|
|
2277
2274
|
for (const [r, n] of Object.entries(s)) t[r] = e(n);
|
|
2278
2275
|
return t;
|
|
2279
2276
|
}
|
|
2280
|
-
function
|
|
2277
|
+
function Ue(s, e) {
|
|
2281
2278
|
return s === void 0 ? void 0 : e(s);
|
|
2282
2279
|
}
|
|
2283
|
-
function
|
|
2280
|
+
function ka(s) {
|
|
2284
2281
|
switch (s.type) {
|
|
2285
2282
|
case "GetImportProgress":
|
|
2286
2283
|
return !0;
|
|
@@ -2288,8 +2285,8 @@ function ba(s) {
|
|
|
2288
2285
|
return !1;
|
|
2289
2286
|
}
|
|
2290
2287
|
}
|
|
2291
|
-
function
|
|
2292
|
-
for (const e of te(s)) if (
|
|
2288
|
+
function Ca(s) {
|
|
2289
|
+
for (const e of te(s)) if (ka(e)) return !0;
|
|
2293
2290
|
return !1;
|
|
2294
2291
|
}
|
|
2295
2292
|
function gt(s) {
|
|
@@ -2301,47 +2298,47 @@ function gt(s) {
|
|
|
2301
2298
|
function I(s) {
|
|
2302
2299
|
return () => gt(s);
|
|
2303
2300
|
}
|
|
2304
|
-
const
|
|
2301
|
+
const Ra = (s) => {
|
|
2305
2302
|
const e = {};
|
|
2306
2303
|
for (const [t, r] of Object.entries(s)) e[t] = r;
|
|
2307
2304
|
return I(e);
|
|
2308
|
-
},
|
|
2305
|
+
}, Pa = (s) => {
|
|
2309
2306
|
const e = s.source;
|
|
2310
2307
|
if (e === void 0) return I(void 0);
|
|
2311
2308
|
const t = [];
|
|
2312
2309
|
for (const r of e)
|
|
2313
2310
|
r instanceof Array ? t.push(...r) : t.push(r);
|
|
2314
2311
|
return I(t);
|
|
2315
|
-
},
|
|
2312
|
+
}, Ea = (s) => {
|
|
2316
2313
|
const e = s.source, t = s.field;
|
|
2317
2314
|
return e === void 0 || t === void 0 ? I(void 0) : ({ cCtx: r }) => {
|
|
2318
2315
|
var n;
|
|
2319
2316
|
return gt((n = r.accessor(e).node().traverse(t)) == null ? void 0 : n.persist());
|
|
2320
2317
|
};
|
|
2321
2318
|
};
|
|
2322
|
-
function
|
|
2319
|
+
function Xn(s, e) {
|
|
2323
2320
|
const t = {}, r = s.length;
|
|
2324
2321
|
for (let n = 0; n < r; n++) t[String(n)] = e(s[n]);
|
|
2325
2322
|
return t;
|
|
2326
2323
|
}
|
|
2327
|
-
function
|
|
2324
|
+
function Oa(s, e) {
|
|
2328
2325
|
return (t) => {
|
|
2329
2326
|
const r = t.source;
|
|
2330
2327
|
return r === void 0 ? I(void 0) : () => ({
|
|
2331
2328
|
type: "ScheduleSubroutine",
|
|
2332
|
-
subroutine:
|
|
2333
|
-
args:
|
|
2329
|
+
subroutine: Yn(r.length),
|
|
2330
|
+
args: Xn(r, (n) => L({ ...s, [e.itVar]: n }, e.mapping))
|
|
2334
2331
|
});
|
|
2335
2332
|
};
|
|
2336
2333
|
}
|
|
2337
|
-
function
|
|
2334
|
+
function Yn(s) {
|
|
2338
2335
|
return (e) => {
|
|
2339
2336
|
const t = [];
|
|
2340
2337
|
for (let r = 0; r < s; r++) t.push(e[String(r)]);
|
|
2341
2338
|
return I(t);
|
|
2342
2339
|
};
|
|
2343
2340
|
}
|
|
2344
|
-
function
|
|
2341
|
+
function Fa(s, e) {
|
|
2345
2342
|
return (t) => {
|
|
2346
2343
|
const r = t.source;
|
|
2347
2344
|
if (r === void 0) return I(void 0);
|
|
@@ -2352,34 +2349,34 @@ function Oa(s, e) {
|
|
|
2352
2349
|
}
|
|
2353
2350
|
return () => ({
|
|
2354
2351
|
type: "ScheduleSubroutine",
|
|
2355
|
-
subroutine:
|
|
2352
|
+
subroutine: Ta,
|
|
2356
2353
|
args: n
|
|
2357
2354
|
});
|
|
2358
2355
|
};
|
|
2359
2356
|
}
|
|
2360
|
-
const
|
|
2357
|
+
const Ta = (s) => I(s), Ia = (s) => {
|
|
2361
2358
|
const e = s.arg;
|
|
2362
2359
|
return I(e === void 0 ? void 0 : e.length === 0);
|
|
2363
|
-
},
|
|
2360
|
+
}, $a = (s) => {
|
|
2364
2361
|
const e = s.operand;
|
|
2365
2362
|
return I(e === void 0 ? void 0 : !e);
|
|
2366
|
-
},
|
|
2363
|
+
}, Aa = (s) => {
|
|
2367
2364
|
const e = s.operand1, t = s.operand2;
|
|
2368
2365
|
return I(e === void 0 || t === void 0 ? void 0 : e && t);
|
|
2369
|
-
},
|
|
2366
|
+
}, La = (s) => {
|
|
2370
2367
|
const e = s.operand1, t = s.operand2;
|
|
2371
2368
|
return I(e === void 0 || t === void 0 ? void 0 : e || t);
|
|
2372
|
-
},
|
|
2369
|
+
}, Da = (s) => {
|
|
2373
2370
|
const e = s.source;
|
|
2374
2371
|
return e === void 0 ? I(void 0) : ({ cCtx: t }) => {
|
|
2375
2372
|
var r;
|
|
2376
2373
|
return gt((r = t.accessor(e).node()) == null ? void 0 : r.getDataAsJson());
|
|
2377
2374
|
};
|
|
2378
|
-
},
|
|
2375
|
+
}, Na = (s) => {
|
|
2379
2376
|
const e = s.source, t = s.field;
|
|
2380
2377
|
return I(e === void 0 || t === void 0 ? void 0 : e[t]);
|
|
2381
2378
|
};
|
|
2382
|
-
function
|
|
2379
|
+
function Ba(s, e) {
|
|
2383
2380
|
return (t) => {
|
|
2384
2381
|
const r = t.source;
|
|
2385
2382
|
return r === void 0 ? I(void 0) : ({ cCtx: n }) => {
|
|
@@ -2394,13 +2391,13 @@ function Na(s, e) {
|
|
|
2394
2391
|
}
|
|
2395
2392
|
return {
|
|
2396
2393
|
type: "ScheduleSubroutine",
|
|
2397
|
-
subroutine:
|
|
2394
|
+
subroutine: ja,
|
|
2398
2395
|
args: o
|
|
2399
2396
|
};
|
|
2400
2397
|
};
|
|
2401
2398
|
};
|
|
2402
2399
|
}
|
|
2403
|
-
const
|
|
2400
|
+
const ja = (s) => I(s), xa = (s) => (e) => {
|
|
2404
2401
|
const t = e.source;
|
|
2405
2402
|
return t === void 0 ? I(void 0) : ({ drivers: r }) => ({
|
|
2406
2403
|
type: "ScheduleComputable",
|
|
@@ -2414,7 +2411,7 @@ const Ba = (s) => I(s), ja = (s) => (e) => {
|
|
|
2414
2411
|
}
|
|
2415
2412
|
)
|
|
2416
2413
|
});
|
|
2417
|
-
},
|
|
2414
|
+
}, Ua = (s) => (e) => {
|
|
2418
2415
|
const t = e.source;
|
|
2419
2416
|
return t === void 0 ? I(void 0) : ({ cCtx: r, drivers: n }) => {
|
|
2420
2417
|
const i = r.accessor(t).node().resourceInfo;
|
|
@@ -2425,7 +2422,7 @@ const Ba = (s) => I(s), ja = (s) => (e) => {
|
|
|
2425
2422
|
})
|
|
2426
2423
|
};
|
|
2427
2424
|
};
|
|
2428
|
-
},
|
|
2425
|
+
}, Va = (s) => (e) => {
|
|
2429
2426
|
const t = e.source;
|
|
2430
2427
|
return t === void 0 ? I(void 0) : ({ drivers: r }) => ({
|
|
2431
2428
|
type: "ScheduleComputable",
|
|
@@ -2441,49 +2438,49 @@ const Ba = (s) => I(s), ja = (s) => (e) => {
|
|
|
2441
2438
|
}
|
|
2442
2439
|
)
|
|
2443
2440
|
});
|
|
2444
|
-
},
|
|
2441
|
+
}, Ja = (s) => {
|
|
2445
2442
|
const e = s.source;
|
|
2446
2443
|
return e === void 0 ? I(void 0) : (t) => ({
|
|
2447
2444
|
type: "ScheduleComputable",
|
|
2448
2445
|
computable: t.drivers.blobDriver.getDownloadedBlob(e)
|
|
2449
2446
|
});
|
|
2450
|
-
},
|
|
2447
|
+
}, Ma = (s) => {
|
|
2451
2448
|
const e = s.source;
|
|
2452
2449
|
return e === void 0 ? I(void 0) : ({ drivers: t }) => ({
|
|
2453
2450
|
type: "ScheduleComputable",
|
|
2454
2451
|
computable: t.blobDriver.getOnDemandBlob(e)
|
|
2455
2452
|
});
|
|
2456
|
-
},
|
|
2453
|
+
}, Ga = (s) => (e) => {
|
|
2457
2454
|
const t = e.source;
|
|
2458
2455
|
return t === void 0 ? I(void 0) : ({ drivers: r }) => ({
|
|
2459
2456
|
type: "ScheduleComputable",
|
|
2460
2457
|
computable: r.blobToURLDriver.extractArchiveAndGetURL(t, s)
|
|
2461
2458
|
});
|
|
2462
|
-
},
|
|
2459
|
+
}, qa = (s) => {
|
|
2463
2460
|
const e = s.source;
|
|
2464
2461
|
return e === void 0 ? I(void 0) : ({ drivers: t }) => ({
|
|
2465
2462
|
type: "ScheduleComputable",
|
|
2466
2463
|
computable: t.uploadDriver.getProgressId(e)
|
|
2467
2464
|
});
|
|
2468
|
-
},
|
|
2465
|
+
}, _a = (s) => (e) => {
|
|
2469
2466
|
const t = e.source;
|
|
2470
2467
|
return t === void 0 ? I(void 0) : ({ drivers: r }) => ({
|
|
2471
2468
|
type: "ScheduleComputable",
|
|
2472
2469
|
computable: r.logDriver.getLastLogs(t, s)
|
|
2473
2470
|
});
|
|
2474
|
-
},
|
|
2471
|
+
}, Ka = (s) => (e) => {
|
|
2475
2472
|
const t = e.source;
|
|
2476
2473
|
return t === void 0 ? I(void 0) : ({ drivers: r }) => ({
|
|
2477
2474
|
type: "ScheduleComputable",
|
|
2478
2475
|
computable: r.logDriver.getProgressLog(t, s)
|
|
2479
2476
|
});
|
|
2480
|
-
},
|
|
2477
|
+
}, Ha = (s) => (e) => {
|
|
2481
2478
|
const t = e.source;
|
|
2482
2479
|
return t === void 0 ? I(void 0) : ({ drivers: r }) => ({
|
|
2483
2480
|
type: "ScheduleComputable",
|
|
2484
2481
|
computable: r.logDriver.getProgressLogWithInfo(t, s)
|
|
2485
2482
|
});
|
|
2486
|
-
},
|
|
2483
|
+
}, Wa = (s) => {
|
|
2487
2484
|
const e = s.source;
|
|
2488
2485
|
return e === void 0 ? I(void 0) : ({ drivers: t }) => ({
|
|
2489
2486
|
type: "ScheduleComputable",
|
|
@@ -2499,14 +2496,14 @@ function L(s, e) {
|
|
|
2499
2496
|
case "Isolate":
|
|
2500
2497
|
return ({ drivers: t }) => ({
|
|
2501
2498
|
type: "ScheduleComputable",
|
|
2502
|
-
computable:
|
|
2499
|
+
computable: eo(t, s, e.cfg)
|
|
2503
2500
|
});
|
|
2504
2501
|
case "Immediate":
|
|
2505
2502
|
return I(e.value);
|
|
2506
2503
|
case "GetJsonField":
|
|
2507
2504
|
return () => ({
|
|
2508
2505
|
type: "ScheduleSubroutine",
|
|
2509
|
-
subroutine:
|
|
2506
|
+
subroutine: Na,
|
|
2510
2507
|
args: {
|
|
2511
2508
|
source: L(s, e.source),
|
|
2512
2509
|
field: L(s, e.field)
|
|
@@ -2515,7 +2512,7 @@ function L(s, e) {
|
|
|
2515
2512
|
case "MapArrayValues":
|
|
2516
2513
|
return () => ({
|
|
2517
2514
|
type: "ScheduleSubroutine",
|
|
2518
|
-
subroutine:
|
|
2515
|
+
subroutine: Oa(s, e),
|
|
2519
2516
|
args: {
|
|
2520
2517
|
source: L(s, e.source)
|
|
2521
2518
|
}
|
|
@@ -2523,7 +2520,7 @@ function L(s, e) {
|
|
|
2523
2520
|
case "MapRecordValues":
|
|
2524
2521
|
return () => ({
|
|
2525
2522
|
type: "ScheduleSubroutine",
|
|
2526
|
-
subroutine:
|
|
2523
|
+
subroutine: Fa(s, e),
|
|
2527
2524
|
args: {
|
|
2528
2525
|
source: L(s, e.source)
|
|
2529
2526
|
}
|
|
@@ -2531,19 +2528,19 @@ function L(s, e) {
|
|
|
2531
2528
|
case "MakeObject":
|
|
2532
2529
|
return () => ({
|
|
2533
2530
|
type: "ScheduleSubroutine",
|
|
2534
|
-
subroutine:
|
|
2535
|
-
args:
|
|
2531
|
+
subroutine: Ra,
|
|
2532
|
+
args: ba(e.template, (t) => L(s, t))
|
|
2536
2533
|
});
|
|
2537
2534
|
case "MakeArray":
|
|
2538
2535
|
return () => ({
|
|
2539
2536
|
type: "ScheduleSubroutine",
|
|
2540
|
-
subroutine:
|
|
2541
|
-
args:
|
|
2537
|
+
subroutine: Yn(e.template.length),
|
|
2538
|
+
args: Xn(e.template, (t) => L(s, t))
|
|
2542
2539
|
});
|
|
2543
2540
|
case "Flatten":
|
|
2544
2541
|
return () => ({
|
|
2545
2542
|
type: "ScheduleSubroutine",
|
|
2546
|
-
subroutine:
|
|
2543
|
+
subroutine: Pa,
|
|
2547
2544
|
args: {
|
|
2548
2545
|
source: L(s, e.source)
|
|
2549
2546
|
}
|
|
@@ -2551,7 +2548,7 @@ function L(s, e) {
|
|
|
2551
2548
|
case "IsEmpty":
|
|
2552
2549
|
return () => ({
|
|
2553
2550
|
type: "ScheduleSubroutine",
|
|
2554
|
-
subroutine:
|
|
2551
|
+
subroutine: Ia,
|
|
2555
2552
|
args: {
|
|
2556
2553
|
arg: L(s, e.arg)
|
|
2557
2554
|
}
|
|
@@ -2559,7 +2556,7 @@ function L(s, e) {
|
|
|
2559
2556
|
case "Not":
|
|
2560
2557
|
return () => ({
|
|
2561
2558
|
type: "ScheduleSubroutine",
|
|
2562
|
-
subroutine:
|
|
2559
|
+
subroutine: $a,
|
|
2563
2560
|
args: {
|
|
2564
2561
|
operand: L(s, e.operand)
|
|
2565
2562
|
}
|
|
@@ -2567,7 +2564,7 @@ function L(s, e) {
|
|
|
2567
2564
|
case "And":
|
|
2568
2565
|
return () => ({
|
|
2569
2566
|
type: "ScheduleSubroutine",
|
|
2570
|
-
subroutine:
|
|
2567
|
+
subroutine: Aa,
|
|
2571
2568
|
args: {
|
|
2572
2569
|
operand1: L(s, e.operand1),
|
|
2573
2570
|
operand2: L(s, e.operand2)
|
|
@@ -2576,7 +2573,7 @@ function L(s, e) {
|
|
|
2576
2573
|
case "Or":
|
|
2577
2574
|
return () => ({
|
|
2578
2575
|
type: "ScheduleSubroutine",
|
|
2579
|
-
subroutine:
|
|
2576
|
+
subroutine: La,
|
|
2580
2577
|
args: {
|
|
2581
2578
|
operand1: L(s, e.operand1),
|
|
2582
2579
|
operand2: L(s, e.operand2)
|
|
@@ -2585,7 +2582,7 @@ function L(s, e) {
|
|
|
2585
2582
|
case "MapResourceFields":
|
|
2586
2583
|
return () => ({
|
|
2587
2584
|
type: "ScheduleSubroutine",
|
|
2588
|
-
subroutine:
|
|
2585
|
+
subroutine: Ba(s, e),
|
|
2589
2586
|
args: {
|
|
2590
2587
|
source: L(s, e.source)
|
|
2591
2588
|
}
|
|
@@ -2593,7 +2590,7 @@ function L(s, e) {
|
|
|
2593
2590
|
case "GetResourceField":
|
|
2594
2591
|
return () => ({
|
|
2595
2592
|
type: "ScheduleSubroutine",
|
|
2596
|
-
subroutine:
|
|
2593
|
+
subroutine: Ea,
|
|
2597
2594
|
args: {
|
|
2598
2595
|
source: L(s, e.source),
|
|
2599
2596
|
field: L(s, e.field)
|
|
@@ -2602,7 +2599,7 @@ function L(s, e) {
|
|
|
2602
2599
|
case "GetResourceValueAsJson":
|
|
2603
2600
|
return () => ({
|
|
2604
2601
|
type: "ScheduleSubroutine",
|
|
2605
|
-
subroutine:
|
|
2602
|
+
subroutine: Da,
|
|
2606
2603
|
args: {
|
|
2607
2604
|
source: L(s, e.source)
|
|
2608
2605
|
}
|
|
@@ -2610,7 +2607,7 @@ function L(s, e) {
|
|
|
2610
2607
|
case "GetBlobContent":
|
|
2611
2608
|
return () => ({
|
|
2612
2609
|
type: "ScheduleSubroutine",
|
|
2613
|
-
subroutine:
|
|
2610
|
+
subroutine: xa(e.range),
|
|
2614
2611
|
args: {
|
|
2615
2612
|
source: L(s, e.source)
|
|
2616
2613
|
}
|
|
@@ -2618,7 +2615,7 @@ function L(s, e) {
|
|
|
2618
2615
|
case "GetBlobContentAsString":
|
|
2619
2616
|
return () => ({
|
|
2620
2617
|
type: "ScheduleSubroutine",
|
|
2621
|
-
subroutine:
|
|
2618
|
+
subroutine: Ua(e.range),
|
|
2622
2619
|
args: {
|
|
2623
2620
|
source: L(s, e.source)
|
|
2624
2621
|
}
|
|
@@ -2626,7 +2623,7 @@ function L(s, e) {
|
|
|
2626
2623
|
case "GetBlobContentAsJson":
|
|
2627
2624
|
return () => ({
|
|
2628
2625
|
type: "ScheduleSubroutine",
|
|
2629
|
-
subroutine:
|
|
2626
|
+
subroutine: Va(e.range),
|
|
2630
2627
|
args: {
|
|
2631
2628
|
source: L(s, e.source)
|
|
2632
2629
|
}
|
|
@@ -2634,7 +2631,7 @@ function L(s, e) {
|
|
|
2634
2631
|
case "GetDownloadedBlobContent":
|
|
2635
2632
|
return () => ({
|
|
2636
2633
|
type: "ScheduleSubroutine",
|
|
2637
|
-
subroutine:
|
|
2634
|
+
subroutine: Ja,
|
|
2638
2635
|
args: {
|
|
2639
2636
|
source: L(s, e.source)
|
|
2640
2637
|
}
|
|
@@ -2642,7 +2639,7 @@ function L(s, e) {
|
|
|
2642
2639
|
case "GetOnDemandBlobContent":
|
|
2643
2640
|
return () => ({
|
|
2644
2641
|
type: "ScheduleSubroutine",
|
|
2645
|
-
subroutine:
|
|
2642
|
+
subroutine: Ma,
|
|
2646
2643
|
args: {
|
|
2647
2644
|
source: L(s, e.source)
|
|
2648
2645
|
}
|
|
@@ -2650,7 +2647,7 @@ function L(s, e) {
|
|
|
2650
2647
|
case "ExtractArchiveAndGetURL":
|
|
2651
2648
|
return () => ({
|
|
2652
2649
|
type: "ScheduleSubroutine",
|
|
2653
|
-
subroutine:
|
|
2650
|
+
subroutine: Ga(e.format),
|
|
2654
2651
|
args: {
|
|
2655
2652
|
source: L(s, e.source)
|
|
2656
2653
|
}
|
|
@@ -2658,7 +2655,7 @@ function L(s, e) {
|
|
|
2658
2655
|
case "GetImportProgress":
|
|
2659
2656
|
return () => ({
|
|
2660
2657
|
type: "ScheduleSubroutine",
|
|
2661
|
-
subroutine:
|
|
2658
|
+
subroutine: qa,
|
|
2662
2659
|
args: {
|
|
2663
2660
|
source: L(s, e.source)
|
|
2664
2661
|
}
|
|
@@ -2666,7 +2663,7 @@ function L(s, e) {
|
|
|
2666
2663
|
case "GetLastLogs":
|
|
2667
2664
|
return () => ({
|
|
2668
2665
|
type: "ScheduleSubroutine",
|
|
2669
|
-
subroutine:
|
|
2666
|
+
subroutine: _a(e.lines),
|
|
2670
2667
|
args: {
|
|
2671
2668
|
source: L(s, e.source)
|
|
2672
2669
|
}
|
|
@@ -2674,7 +2671,7 @@ function L(s, e) {
|
|
|
2674
2671
|
case "GetProgressLog":
|
|
2675
2672
|
return () => ({
|
|
2676
2673
|
type: "ScheduleSubroutine",
|
|
2677
|
-
subroutine:
|
|
2674
|
+
subroutine: Ka(e.patternToSearch),
|
|
2678
2675
|
args: {
|
|
2679
2676
|
source: L(s, e.source)
|
|
2680
2677
|
}
|
|
@@ -2682,7 +2679,7 @@ function L(s, e) {
|
|
|
2682
2679
|
case "GetProgressLogWithInfo":
|
|
2683
2680
|
return () => ({
|
|
2684
2681
|
type: "ScheduleSubroutine",
|
|
2685
|
-
subroutine:
|
|
2682
|
+
subroutine: Ha(e.patternToSearch),
|
|
2686
2683
|
args: {
|
|
2687
2684
|
source: L(s, e.source)
|
|
2688
2685
|
}
|
|
@@ -2690,7 +2687,7 @@ function L(s, e) {
|
|
|
2690
2687
|
case "GetLogHandle":
|
|
2691
2688
|
return () => ({
|
|
2692
2689
|
type: "ScheduleSubroutine",
|
|
2693
|
-
subroutine:
|
|
2690
|
+
subroutine: Wa,
|
|
2694
2691
|
args: {
|
|
2695
2692
|
source: L(s, e.source)
|
|
2696
2693
|
}
|
|
@@ -2699,8 +2696,8 @@ function L(s, e) {
|
|
|
2699
2696
|
return Q(e);
|
|
2700
2697
|
}
|
|
2701
2698
|
}
|
|
2702
|
-
const
|
|
2703
|
-
function
|
|
2699
|
+
const za = ["$prod", "$staging"];
|
|
2700
|
+
function Xa(s) {
|
|
2704
2701
|
return {
|
|
2705
2702
|
$blockId: s.blockId,
|
|
2706
2703
|
$args: (e) => JSON.parse(s.args(e)),
|
|
@@ -2712,16 +2709,16 @@ function za(s) {
|
|
|
2712
2709
|
$staging: s.staging
|
|
2713
2710
|
};
|
|
2714
2711
|
}
|
|
2715
|
-
const
|
|
2716
|
-
function
|
|
2717
|
-
return s.op ==
|
|
2712
|
+
const Qn = Symbol(), Zn = "return", Ya = { op: Qn, arg: Zn };
|
|
2713
|
+
function Qa(s) {
|
|
2714
|
+
return s.op == Qn && s.arg == Zn;
|
|
2718
2715
|
}
|
|
2719
|
-
function
|
|
2716
|
+
function Za() {
|
|
2720
2717
|
return { pendingSubroutines: /* @__PURE__ */ new Map() };
|
|
2721
2718
|
}
|
|
2722
|
-
function
|
|
2723
|
-
const n = new
|
|
2724
|
-
if (
|
|
2719
|
+
function ys(s, e, t, r) {
|
|
2720
|
+
const n = new Pn(t), i = (a, c) => {
|
|
2721
|
+
if (Qa(a))
|
|
2725
2722
|
return e.result = c, !1;
|
|
2726
2723
|
const l = N(e.pendingSubroutines.get(a.op));
|
|
2727
2724
|
if (a.arg in l.args) throw new Error("argument already set");
|
|
@@ -2774,26 +2771,26 @@ function ms(s, e, t, r) {
|
|
|
2774
2771
|
}
|
|
2775
2772
|
return o;
|
|
2776
2773
|
}
|
|
2777
|
-
function
|
|
2778
|
-
return
|
|
2774
|
+
function ec(s, e, t, r = {}) {
|
|
2775
|
+
return eo(s, Xa(e), t, r);
|
|
2779
2776
|
}
|
|
2780
|
-
function
|
|
2777
|
+
function eo(s, e, t, r = {}) {
|
|
2781
2778
|
const n = `${e.blockId}#` + re({
|
|
2782
2779
|
ctx: Object.fromEntries(
|
|
2783
|
-
Object.entries(e).filter(([i]) =>
|
|
2780
|
+
Object.entries(e).filter(([i]) => za.indexOf(i) === -1)
|
|
2784
2781
|
),
|
|
2785
2782
|
cfg: t
|
|
2786
2783
|
});
|
|
2787
2784
|
return H.makeRaw(
|
|
2788
2785
|
(i) => {
|
|
2789
|
-
const o = { drivers: s, cCtx: i }, a =
|
|
2786
|
+
const o = { drivers: s, cCtx: i }, a = Za();
|
|
2790
2787
|
return {
|
|
2791
|
-
ir:
|
|
2788
|
+
ir: ys(
|
|
2792
2789
|
o,
|
|
2793
2790
|
a,
|
|
2794
2791
|
[
|
|
2795
2792
|
{
|
|
2796
|
-
destination:
|
|
2793
|
+
destination: Ya,
|
|
2797
2794
|
operation: L(e, t)
|
|
2798
2795
|
}
|
|
2799
2796
|
],
|
|
@@ -2815,7 +2812,7 @@ function Zn(s, e, t, r = {}) {
|
|
|
2815
2812
|
result: a.result,
|
|
2816
2813
|
pendingSubroutines: p
|
|
2817
2814
|
};
|
|
2818
|
-
if (
|
|
2815
|
+
if (ys(d, f, u, !1), !("result" in f))
|
|
2819
2816
|
throw new Error("illegal cfg rendering stack state, no result");
|
|
2820
2817
|
return f.result;
|
|
2821
2818
|
}
|
|
@@ -2824,10 +2821,10 @@ function Zn(s, e, t, r = {}) {
|
|
|
2824
2821
|
{ ...r, key: n }
|
|
2825
2822
|
);
|
|
2826
2823
|
}
|
|
2827
|
-
function
|
|
2824
|
+
function ws(s) {
|
|
2828
2825
|
return s !== void 0 ? Buffer.from(s).toString("base64") : void 0;
|
|
2829
2826
|
}
|
|
2830
|
-
class
|
|
2827
|
+
class tc {
|
|
2831
2828
|
constructor(e, t, r, n, i) {
|
|
2832
2829
|
b(this, "computablesToResolve", {});
|
|
2833
2830
|
b(this, "computableCtx");
|
|
@@ -2894,13 +2891,13 @@ class ec {
|
|
|
2894
2891
|
return this.getAccessor(e).listDynamicFields();
|
|
2895
2892
|
}
|
|
2896
2893
|
getKeyValueBase64(e, t) {
|
|
2897
|
-
return
|
|
2894
|
+
return ws(this.getAccessor(e).getKeyValue(t));
|
|
2898
2895
|
}
|
|
2899
2896
|
getKeyValueAsString(e, t) {
|
|
2900
2897
|
return this.getAccessor(e).getKeyValueAsString(t);
|
|
2901
2898
|
}
|
|
2902
2899
|
getDataBase64(e) {
|
|
2903
|
-
return
|
|
2900
|
+
return ws(this.getAccessor(e).getData());
|
|
2904
2901
|
}
|
|
2905
2902
|
getDataAsString(e) {
|
|
2906
2903
|
return this.getAccessor(e).getDataAsString();
|
|
@@ -2911,7 +2908,7 @@ class ec {
|
|
|
2911
2908
|
parsePObjectCollection(e, t, r, ...n) {
|
|
2912
2909
|
const i = this.getAccessor(e);
|
|
2913
2910
|
if (!i.getIsReadyOrError()) return;
|
|
2914
|
-
const o =
|
|
2911
|
+
const o = Sa(i, t, r, n), a = {};
|
|
2915
2912
|
for (const [c, l] of Object.entries(o))
|
|
2916
2913
|
a[c] = ve(l, (u) => this.wrapAccessor(u));
|
|
2917
2914
|
return a;
|
|
@@ -3059,7 +3056,7 @@ class ec {
|
|
|
3059
3056
|
obj: {
|
|
3060
3057
|
id: t.obj.id,
|
|
3061
3058
|
spec: t.obj.spec,
|
|
3062
|
-
data:
|
|
3059
|
+
data: vn(t.obj.data, (r) => this.wrapAccessor(r))
|
|
3063
3060
|
}
|
|
3064
3061
|
}))
|
|
3065
3062
|
};
|
|
@@ -3110,7 +3107,7 @@ class ec {
|
|
|
3110
3107
|
* - Passes through other values
|
|
3111
3108
|
*/
|
|
3112
3109
|
transformInputPData(e) {
|
|
3113
|
-
return typeof e == "string" ? this.getAccessor(e) :
|
|
3110
|
+
return typeof e == "string" ? this.getAccessor(e) : yn(e) ? br(e, (t) => this.getAccessor(t)) : e;
|
|
3114
3111
|
}
|
|
3115
3112
|
//
|
|
3116
3113
|
// Computable
|
|
@@ -3159,7 +3156,7 @@ class ec {
|
|
|
3159
3156
|
};
|
|
3160
3157
|
r.newFunction(o, c).consume((l) => r.setProp(e, o, l)), r.newFunction(o, a).consume((l) => r.setProp(e, o + "__internal__", l));
|
|
3161
3158
|
};
|
|
3162
|
-
if (
|
|
3159
|
+
if (go(this.featureFlags, "supportsLazyState"))
|
|
3163
3160
|
i("args", () => {
|
|
3164
3161
|
if (this.computableCtx === void 0)
|
|
3165
3162
|
throw new Error("Add dummy call to ctx.args outside the future lambda. Can't be directly used in this context.");
|
|
@@ -3264,7 +3261,7 @@ class ec {
|
|
|
3264
3261
|
});
|
|
3265
3262
|
}
|
|
3266
3263
|
}
|
|
3267
|
-
function
|
|
3264
|
+
function rc(s) {
|
|
3268
3265
|
return s instanceof ArrayBuffer || ArrayBuffer.isView(s);
|
|
3269
3266
|
}
|
|
3270
3267
|
class He {
|
|
@@ -3272,7 +3269,7 @@ class He {
|
|
|
3272
3269
|
b(this, "callbackRegistry");
|
|
3273
3270
|
b(this, "fnJSONStringify");
|
|
3274
3271
|
b(this, "fnJSONParse");
|
|
3275
|
-
b(this, "errorRepo", new
|
|
3272
|
+
b(this, "errorRepo", new sc());
|
|
3276
3273
|
b(this, "computableHelper");
|
|
3277
3274
|
if (this.scope = e, this.vm = t, this.deadlineSetter = r, this.callbackRegistry = this.scope.manage(this.vm.newObject()), this.fnJSONStringify = e.manage(
|
|
3278
3275
|
t.getProp(t.global, "JSON").consume((o) => t.getProp(o, "stringify"))
|
|
@@ -3281,7 +3278,7 @@ class He {
|
|
|
3281
3278
|
if (this.fnJSONParse = e.manage(
|
|
3282
3279
|
t.getProp(t.global, "JSON").consume((o) => t.getProp(o, "parse"))
|
|
3283
3280
|
), t.typeof(this.fnJSONParse) !== "function") throw new Error("JSON.parse() not found.");
|
|
3284
|
-
i !== void 0 && (this.computableHelper = new
|
|
3281
|
+
i !== void 0 && (this.computableHelper = new tc(this, i.blockCtx, i.mlEnv, n, i.computableCtx)), this.injectCtx();
|
|
3285
3282
|
}
|
|
3286
3283
|
resetComputableCtx() {
|
|
3287
3284
|
N(this.computableHelper, "Computable context helper is not initialized").resetComputableCtx();
|
|
@@ -3358,7 +3355,7 @@ class He {
|
|
|
3358
3355
|
r = this.vm.null;
|
|
3359
3356
|
break;
|
|
3360
3357
|
}
|
|
3361
|
-
if (
|
|
3358
|
+
if (rc(e)) {
|
|
3362
3359
|
r = this.vm.newArrayBuffer(e), n = !0;
|
|
3363
3360
|
break;
|
|
3364
3361
|
}
|
|
@@ -3400,12 +3397,12 @@ class He {
|
|
|
3400
3397
|
this.vm.setProp(t, "callbackRegistry", this.callbackRegistry), this.vm.setProp(
|
|
3401
3398
|
t,
|
|
3402
3399
|
"featureFlags",
|
|
3403
|
-
this.exportObjectUniversal(
|
|
3400
|
+
this.exportObjectUniversal(mo.GlobalCfgRenderCtxFeatureFlags, e)
|
|
3404
3401
|
), this.computableHelper !== void 0 && this.computableHelper.injectCtx(t), this.vm.setProp(this.vm.global, "cfgRenderCtx", t);
|
|
3405
3402
|
});
|
|
3406
3403
|
}
|
|
3407
3404
|
}
|
|
3408
|
-
class
|
|
3405
|
+
class sc {
|
|
3409
3406
|
constructor() {
|
|
3410
3407
|
b(this, "errorIdToError", /* @__PURE__ */ new Map());
|
|
3411
3408
|
}
|
|
@@ -3422,7 +3419,7 @@ class rc {
|
|
|
3422
3419
|
}
|
|
3423
3420
|
/** Returns the original error that was stored by parsing uuid of mimicrated error. */
|
|
3424
3421
|
getOriginal(e) {
|
|
3425
|
-
if (!(e instanceof
|
|
3422
|
+
if (!(e instanceof ei.QuickJSUnwrapError))
|
|
3426
3423
|
return console.warn("ErrorRepo: quickJSError is not a QuickJSUnwrapError", Ye(e)), e;
|
|
3427
3424
|
const t = e.cause;
|
|
3428
3425
|
if (!(typeof t == "object" && t !== null && "name" in t && typeof t.name == "string"))
|
|
@@ -3433,13 +3430,13 @@ class rc {
|
|
|
3433
3430
|
const i = this.errorIdToError.get(n);
|
|
3434
3431
|
if (i === void 0)
|
|
3435
3432
|
throw new Error(`ErrorRepo: errorId not found: ${n}, ${Ye(e)}`);
|
|
3436
|
-
return new
|
|
3433
|
+
return new ri(e, i);
|
|
3437
3434
|
}
|
|
3438
3435
|
}
|
|
3439
|
-
function
|
|
3436
|
+
function Ss(s, e, t, r, n) {
|
|
3440
3437
|
Z().logOutputStatus && (Z().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})`);
|
|
3441
3438
|
}
|
|
3442
|
-
function
|
|
3439
|
+
function nc(s, e, t, r, n, i = {}) {
|
|
3443
3440
|
const { code: o, featureFlags: a } = r, c = `${e.blockId}#lambda#${n}#${t.handle}`;
|
|
3444
3441
|
return i = { ...i, key: c }, i.mode === void 0 && t.retentive === !0 && (i.mode = "StableOnlyRetentive"), H.makeRaw((l) => {
|
|
3445
3442
|
Z().logOutputRecalculations && console.log(`Block lambda recalculation : ${c} (${l.changeSourceMarker}; ${l.bodyInvocations} invocations)`);
|
|
@@ -3468,7 +3465,7 @@ function sc(s, e, t, r, n, i = {}) {
|
|
|
3468
3465
|
const E = h.computableHelper.computablesToResolve;
|
|
3469
3466
|
if (Object.keys(E).length === 0) {
|
|
3470
3467
|
const F = h.importObjectUniversal(y);
|
|
3471
|
-
return
|
|
3468
|
+
return Ss(t.handle, F, l.unstableMarker === void 0, -1, l.unstableMarker), { ir: F };
|
|
3472
3469
|
}
|
|
3473
3470
|
let B = 0;
|
|
3474
3471
|
return Z().logOutputStatus && console.log(`Output ${t.handle} scaffold calculated (not all computables resolved yet).`), d = !0, {
|
|
@@ -3476,7 +3473,7 @@ function sc(s, e, t, r, n, i = {}) {
|
|
|
3476
3473
|
postprocessValue: (F, { unstableMarker: x, stable: U }) => {
|
|
3477
3474
|
for (const [$, R] of Object.entries(F)) h.runCallback($, R);
|
|
3478
3475
|
const P = h.importObjectUniversal(y);
|
|
3479
|
-
return B++,
|
|
3476
|
+
return B++, Ss(t.handle, P, U, B, x), P;
|
|
3480
3477
|
}
|
|
3481
3478
|
};
|
|
3482
3479
|
} catch (p) {
|
|
@@ -3486,7 +3483,7 @@ function sc(s, e, t, r, n, i = {}) {
|
|
|
3486
3483
|
}
|
|
3487
3484
|
}, i);
|
|
3488
3485
|
}
|
|
3489
|
-
function
|
|
3486
|
+
function oc(s, e, t, ...r) {
|
|
3490
3487
|
const { code: n, featureFlags: i } = t, o = new Ge();
|
|
3491
3488
|
try {
|
|
3492
3489
|
const a = o.manage(s.newRuntime());
|
|
@@ -3506,152 +3503,152 @@ function nc(s, e, t, ...r) {
|
|
|
3506
3503
|
o.dispose();
|
|
3507
3504
|
}
|
|
3508
3505
|
}
|
|
3509
|
-
function
|
|
3510
|
-
return
|
|
3506
|
+
function ic(s) {
|
|
3507
|
+
return wn(s) ? s.isActive === !0 : Ca(s);
|
|
3511
3508
|
}
|
|
3512
|
-
function
|
|
3513
|
-
if (
|
|
3509
|
+
function Ve(s, e, t, r, n, i = {}) {
|
|
3510
|
+
if (wn(t)) {
|
|
3514
3511
|
if (r === void 0) throw new Error("No code bundle.");
|
|
3515
|
-
return
|
|
3516
|
-
} else return
|
|
3512
|
+
return nc(s, e, t, r, n, i);
|
|
3513
|
+
} else return ec(s.driverKit, e, t, i);
|
|
3517
3514
|
}
|
|
3518
3515
|
function We(s, e) {
|
|
3519
|
-
return
|
|
3516
|
+
return Ue(
|
|
3520
3517
|
s.traverse(
|
|
3521
3518
|
{
|
|
3522
|
-
field:
|
|
3519
|
+
field: _(e, "blockPack"),
|
|
3523
3520
|
assertFieldType: "Dynamic",
|
|
3524
3521
|
errorIfFieldNotSet: !0
|
|
3525
3522
|
},
|
|
3526
3523
|
{ field: D.HolderRefField, assertFieldType: "Input", errorIfFieldNotFound: !0 }
|
|
3527
3524
|
),
|
|
3528
3525
|
(t) => {
|
|
3529
|
-
const r = t.getDataAsJson(), n =
|
|
3526
|
+
const r = t.getDataAsJson(), n = Ee(r.config);
|
|
3530
3527
|
return { bpResourceId: t.resourceInfo.id, bpId: t.resourceInfo.id.toString(), info: r, cfg: n };
|
|
3531
3528
|
}
|
|
3532
3529
|
);
|
|
3533
3530
|
}
|
|
3534
|
-
function
|
|
3531
|
+
function ac(s, e) {
|
|
3535
3532
|
if (s === e) return !0;
|
|
3536
3533
|
if (s === void 0 || e === void 0) return !1;
|
|
3537
|
-
const t =
|
|
3538
|
-
return
|
|
3534
|
+
const t = os.omitBy((r, n) => n.startsWith("__"));
|
|
3535
|
+
return os.isDeepEqual(t(s), t(e));
|
|
3539
3536
|
}
|
|
3540
|
-
function
|
|
3537
|
+
function cc(s, e, t) {
|
|
3541
3538
|
return H.make(
|
|
3542
3539
|
(r) => {
|
|
3543
3540
|
var v, h, y, E, B, F, x, U;
|
|
3544
|
-
const n = r.accessor(s).node(), i = N(n.getKeyValueAsJson(
|
|
3541
|
+
const n = r.accessor(s).node(), i = N(n.getKeyValueAsJson(Br)), o = N(n.getKeyValueAsJson(_e)), a = N(n.getKeyValueAsJson(Ke)), c = N(n.getKeyValueAsJson(fe)), l = N(
|
|
3545
3542
|
n.getKeyValueAsJson(dt)
|
|
3546
3543
|
), u = /* @__PURE__ */ new Map();
|
|
3547
3544
|
for (const { id: P } of se(c)) {
|
|
3548
3545
|
const $ = n.traverse({
|
|
3549
|
-
field:
|
|
3546
|
+
field: _(P, "currentArgs"),
|
|
3550
3547
|
assertFieldType: "Dynamic",
|
|
3551
3548
|
errorIfFieldNotSet: !0
|
|
3552
3549
|
}), R = $.getDataAsJson();
|
|
3553
|
-
let
|
|
3550
|
+
let G;
|
|
3554
3551
|
const le = n.traverse({
|
|
3555
|
-
field:
|
|
3552
|
+
field: _(P, "prodArgs"),
|
|
3556
3553
|
assertFieldType: "Dynamic",
|
|
3557
3554
|
stableIfNotFound: !0
|
|
3558
3555
|
});
|
|
3559
3556
|
if (le !== void 0) {
|
|
3560
3557
|
const X = le.getDataAsJson(), J = n.getField({
|
|
3561
|
-
field:
|
|
3558
|
+
field: _(P, "prodOutput"),
|
|
3562
3559
|
assertFieldType: "Dynamic",
|
|
3563
3560
|
errorIfFieldNotFound: !0
|
|
3564
3561
|
}), z = n.getField({
|
|
3565
|
-
field:
|
|
3562
|
+
field: _(P, "prodUiCtx"),
|
|
3566
3563
|
assertFieldType: "Dynamic",
|
|
3567
3564
|
errorIfFieldNotFound: !0
|
|
3568
3565
|
});
|
|
3569
|
-
|
|
3566
|
+
G = {
|
|
3570
3567
|
arguments: X,
|
|
3571
|
-
stale: !
|
|
3568
|
+
stale: !ac(R, X),
|
|
3572
3569
|
outputError: J.error !== void 0 || z.error !== void 0 || ((v = J.value) == null ? void 0 : v.getError()) !== void 0 || ((h = z.value) == null ? void 0 : h.getError()) !== void 0,
|
|
3573
3570
|
outputsError: ((y = J.error) == null ? void 0 : y.getDataAsString()) ?? ((B = (E = J.value) == null ? void 0 : E.getError()) == null ? void 0 : B.getDataAsString()),
|
|
3574
3571
|
exportsError: ((F = z.error) == null ? void 0 : F.getDataAsString()) ?? ((U = (x = z.value) == null ? void 0 : x.getError()) == null ? void 0 : U.getDataAsString()),
|
|
3575
3572
|
finished: (J.value !== void 0 && J.value.getIsReadyOrError() || J.error !== void 0 && J.error.getIsReadyOrError()) && (z.value !== void 0 && z.value.getIsReadyOrError() || z.error !== void 0 && z.error.getIsReadyOrError())
|
|
3576
3573
|
};
|
|
3577
3574
|
}
|
|
3578
|
-
u.set(P, { currentArguments: R, prod:
|
|
3575
|
+
u.set(P, { currentArguments: R, prod: G, argsRid: $.resourceInfo.id });
|
|
3579
3576
|
}
|
|
3580
3577
|
const d = nt(c, (P) => {
|
|
3581
|
-
const $ = We(n, P), R = u.get(P),
|
|
3578
|
+
const $ = We(n, P), R = u.get(P), G = R.currentArguments;
|
|
3582
3579
|
return {
|
|
3583
|
-
args:
|
|
3584
|
-
enrichmentTargets: t.projectHelper.getEnrichmentTargets(() => $.cfg, () =>
|
|
3580
|
+
args: G,
|
|
3581
|
+
enrichmentTargets: t.projectHelper.getEnrichmentTargets(() => $.cfg, () => G, { argsRid: R.argsRid, blockPackRid: $.bpResourceId })
|
|
3585
3582
|
};
|
|
3586
3583
|
}), p = new Set(l.blocksInLimbo), f = [...se(c)].map(({ id: P, label: $, renderingMode: R }) => {
|
|
3587
3584
|
var A, T, j, W, V;
|
|
3588
|
-
const
|
|
3585
|
+
const G = N(u.get(P)), le = N(d.nodes.get(P));
|
|
3589
3586
|
let X = "NotCalculated";
|
|
3590
|
-
|
|
3591
|
-
const J = We(n, P), { sections: z, title: g, inputsValid: m, sdkVersion: S, featureFlags: w, isIncompatibleWithRuntime: C } =
|
|
3587
|
+
G.prod !== void 0 && (p.has(P) ? X = "Limbo" : X = G.prod.finished ? "Done" : "Running");
|
|
3588
|
+
const J = We(n, P), { sections: z, title: g, inputsValid: m, sdkVersion: S, featureFlags: w, isIncompatibleWithRuntime: C } = Ue(J, ({ bpId: ie, cfg: be }) => {
|
|
3592
3589
|
if (!t.runtimeCapabilities.checkCompatibility(be.featureFlags))
|
|
3593
3590
|
return {
|
|
3594
3591
|
isIncompatibleWithRuntime: !0,
|
|
3595
3592
|
featureFlags: be.featureFlags
|
|
3596
3593
|
};
|
|
3597
|
-
const bt =
|
|
3594
|
+
const bt = Ur(s, P), pe = ft(be);
|
|
3598
3595
|
return {
|
|
3599
|
-
sections:
|
|
3596
|
+
sections: Ve(
|
|
3600
3597
|
t,
|
|
3601
3598
|
bt,
|
|
3602
3599
|
be.sections,
|
|
3603
3600
|
pe,
|
|
3604
3601
|
ie
|
|
3605
3602
|
).wrap({
|
|
3606
|
-
recover: (
|
|
3603
|
+
recover: (Ne) => (t.logger.error("Error in block model sections"), t.logger.error(Ne), [])
|
|
3607
3604
|
}),
|
|
3608
|
-
title:
|
|
3605
|
+
title: Ue(
|
|
3609
3606
|
be.title,
|
|
3610
|
-
(
|
|
3607
|
+
(Ne) => Ve(
|
|
3611
3608
|
t,
|
|
3612
3609
|
bt,
|
|
3613
|
-
|
|
3610
|
+
Ne,
|
|
3614
3611
|
pe,
|
|
3615
3612
|
ie
|
|
3616
3613
|
).wrap({
|
|
3617
|
-
recover: (
|
|
3614
|
+
recover: (uo) => (t.logger.error("Error in block model title"), t.logger.error(uo), "Invalid title")
|
|
3618
3615
|
})
|
|
3619
3616
|
),
|
|
3620
|
-
inputsValid:
|
|
3617
|
+
inputsValid: Ve(
|
|
3621
3618
|
t,
|
|
3622
3619
|
bt,
|
|
3623
3620
|
be.inputsValid,
|
|
3624
3621
|
pe,
|
|
3625
3622
|
ie
|
|
3626
3623
|
).wrap({
|
|
3627
|
-
recover: (
|
|
3624
|
+
recover: (Ne) => (t.logger.error("Error in block model argsValid"), t.logger.error(Ne), !1)
|
|
3628
3625
|
}),
|
|
3629
3626
|
sdkVersion: pe == null ? void 0 : pe.sdkVersion,
|
|
3630
3627
|
featureFlags: (pe == null ? void 0 : pe.featureFlags) ?? {},
|
|
3631
3628
|
isIncompatibleWithRuntime: !1
|
|
3632
3629
|
};
|
|
3633
3630
|
}) || {}, k = n.traverse({
|
|
3634
|
-
field:
|
|
3631
|
+
field: _(P, "blockSettings"),
|
|
3635
3632
|
assertFieldType: "Dynamic",
|
|
3636
3633
|
errorIfFieldNotSet: !0
|
|
3637
|
-
}).getDataAsJson(), O =
|
|
3634
|
+
}).getDataAsJson(), O = Ue(
|
|
3638
3635
|
J,
|
|
3639
3636
|
({ info: ie }) => t.blockUpdateWatcher.get({ currentSpec: ie.source, settings: k })
|
|
3640
3637
|
);
|
|
3641
3638
|
return {
|
|
3642
|
-
projectResourceId:
|
|
3639
|
+
projectResourceId: Fe(s.rid),
|
|
3643
3640
|
id: P,
|
|
3644
3641
|
label: g ?? $,
|
|
3645
3642
|
title: g ?? $,
|
|
3646
3643
|
renderingMode: R,
|
|
3647
|
-
stale: ((A =
|
|
3644
|
+
stale: ((A = G.prod) == null ? void 0 : A.stale) !== !1 || X === "Limbo",
|
|
3648
3645
|
missingReference: le.missingReferences,
|
|
3649
3646
|
upstreams: [...d.traverseIdsExcludingRoots("upstream", P)],
|
|
3650
3647
|
downstreams: [...d.traverseIdsExcludingRoots("downstream", P)],
|
|
3651
3648
|
calculationStatus: X,
|
|
3652
|
-
outputErrors: ((T =
|
|
3653
|
-
outputsError: (j =
|
|
3654
|
-
exportsError: (W =
|
|
3649
|
+
outputErrors: ((T = G.prod) == null ? void 0 : T.outputError) === !0,
|
|
3650
|
+
outputsError: (j = G.prod) == null ? void 0 : j.outputsError,
|
|
3651
|
+
exportsError: (W = G.prod) == null ? void 0 : W.exportsError,
|
|
3655
3652
|
settings: k,
|
|
3656
3653
|
sections: z,
|
|
3657
3654
|
inputsValid: m,
|
|
@@ -3668,7 +3665,7 @@ function ac(s, e, t) {
|
|
|
3668
3665
|
meta: a,
|
|
3669
3666
|
created: new Date(i),
|
|
3670
3667
|
lastModified: new Date(o),
|
|
3671
|
-
authorMarker: n.getKeyValueAsJson(
|
|
3668
|
+
authorMarker: n.getKeyValueAsJson(Pr),
|
|
3672
3669
|
blocks: f
|
|
3673
3670
|
};
|
|
3674
3671
|
},
|
|
@@ -3694,13 +3691,13 @@ function ac(s, e, t) {
|
|
|
3694
3691
|
}
|
|
3695
3692
|
).withStableType();
|
|
3696
3693
|
}
|
|
3697
|
-
function
|
|
3694
|
+
function lc(s, e) {
|
|
3698
3695
|
const t = s.node();
|
|
3699
|
-
if (ue(t.resourceType,
|
|
3696
|
+
if (ue(t.resourceType, Mn)) {
|
|
3700
3697
|
const r = t.getDataAsJson();
|
|
3701
3698
|
if (r === void 0) throw new Error("No resource data.");
|
|
3702
3699
|
return e.frontendDownloadDriver.getUrl(new URL(r.url)).withStableType();
|
|
3703
|
-
} else if (ue(t.resourceType,
|
|
3700
|
+
} else if (ue(t.resourceType, Gn)) {
|
|
3704
3701
|
const r = t.getDataAsJson();
|
|
3705
3702
|
if (r === void 0) throw new Error("No resource data.");
|
|
3706
3703
|
return e.signer.verify(
|
|
@@ -3711,10 +3708,10 @@ function cc(s, e) {
|
|
|
3711
3708
|
} else
|
|
3712
3709
|
throw new Error(`Unsupported resource type: ${JSON.stringify(t.resourceType)}`);
|
|
3713
3710
|
}
|
|
3714
|
-
function
|
|
3711
|
+
function uc(s, e) {
|
|
3715
3712
|
if (s !== void 0)
|
|
3716
3713
|
return H.make(
|
|
3717
|
-
(t) =>
|
|
3714
|
+
(t) => lc(t.accessor(s), e),
|
|
3718
3715
|
{
|
|
3719
3716
|
postprocessValue: (t) => {
|
|
3720
3717
|
if (t !== void 0) {
|
|
@@ -3726,50 +3723,50 @@ function lc(s, e) {
|
|
|
3726
3723
|
}
|
|
3727
3724
|
).withStableType();
|
|
3728
3725
|
}
|
|
3729
|
-
function
|
|
3726
|
+
function dc(s, e, t) {
|
|
3730
3727
|
return H.make(
|
|
3731
3728
|
(r) => {
|
|
3732
3729
|
var a;
|
|
3733
3730
|
const n = r.accessor(s).node(), i = We(n, e), o = (a = n.traverse(
|
|
3734
3731
|
{
|
|
3735
|
-
field:
|
|
3732
|
+
field: _(e, "blockPack"),
|
|
3736
3733
|
assertFieldType: "Dynamic"
|
|
3737
3734
|
},
|
|
3738
3735
|
{ field: D.HolderRefField, assertFieldType: "Input", errorIfFieldNotFound: !0 },
|
|
3739
|
-
{ field:
|
|
3736
|
+
{ field: _n, assertFieldType: "Input" }
|
|
3740
3737
|
)) == null ? void 0 : a.persist();
|
|
3741
3738
|
return {
|
|
3742
|
-
url:
|
|
3739
|
+
url: uc(o, t),
|
|
3743
3740
|
sdkVersion: i == null ? void 0 : i.cfg.sdkVersion
|
|
3744
3741
|
};
|
|
3745
3742
|
},
|
|
3746
3743
|
{ mode: "StableOnlyLive" }
|
|
3747
3744
|
);
|
|
3748
3745
|
}
|
|
3749
|
-
function
|
|
3746
|
+
function to(s, e, t) {
|
|
3750
3747
|
if (t === void 0)
|
|
3751
|
-
return H.make((o) =>
|
|
3752
|
-
key: `inputs#${
|
|
3748
|
+
return H.make((o) => to(s, e, o), {
|
|
3749
|
+
key: `inputs#${Fe(s.rid)}#${e}`
|
|
3753
3750
|
});
|
|
3754
|
-
const r = t.accessor(s).node(), n =
|
|
3751
|
+
const r = t.accessor(s).node(), n = Ur(s, e), i = n.uiState(t);
|
|
3755
3752
|
return {
|
|
3756
|
-
author: r.getKeyValueAsJson(
|
|
3753
|
+
author: r.getKeyValueAsJson(Rr(e)),
|
|
3757
3754
|
// @TODO add deserialization caching
|
|
3758
|
-
args:
|
|
3755
|
+
args: ts(JSON.parse(n.args(t))),
|
|
3759
3756
|
// @TODO add deserialization caching
|
|
3760
|
-
ui: i !== void 0 ?
|
|
3757
|
+
ui: i !== void 0 ? ts(JSON.parse(i)) : void 0
|
|
3761
3758
|
};
|
|
3762
3759
|
}
|
|
3763
|
-
function
|
|
3764
|
-
const r = "outputs#" +
|
|
3760
|
+
function pc(s, e, t) {
|
|
3761
|
+
const r = "outputs#" + Fe(s.rid) + "#" + e;
|
|
3765
3762
|
return H.make(
|
|
3766
3763
|
(n) => {
|
|
3767
3764
|
Z().logOutputRecalculations && console.log(`blockOutput recalculation : ${r} (${n.changeSourceMarker}; ${n.bodyInvocations} invocations)`);
|
|
3768
|
-
const i = n.accessor(s).node(), o =
|
|
3769
|
-
return
|
|
3765
|
+
const i = n.accessor(s).node(), o = zn(s, e);
|
|
3766
|
+
return Ue(We(i, e), ({ cfg: a, bpId: c }) => {
|
|
3770
3767
|
const l = {};
|
|
3771
3768
|
for (const [u, d] of Object.entries(a.outputs)) {
|
|
3772
|
-
const p =
|
|
3769
|
+
const p = Ve(t, o, d, ft(a), c);
|
|
3773
3770
|
l[u] = H.wrapError(p, 1);
|
|
3774
3771
|
}
|
|
3775
3772
|
return l;
|
|
@@ -3778,38 +3775,38 @@ function dc(s, e, t) {
|
|
|
3778
3775
|
{ key: r }
|
|
3779
3776
|
).withStableType();
|
|
3780
3777
|
}
|
|
3781
|
-
function
|
|
3778
|
+
function fc(s, e) {
|
|
3782
3779
|
return H.make((t) => {
|
|
3783
3780
|
const r = t.accessor(s).node(), n = N(r.getKeyValueAsJson(fe)), i = [];
|
|
3784
3781
|
for (const { id: o } of se(n)) {
|
|
3785
3782
|
const a = We(r, o);
|
|
3786
3783
|
if (a === void 0) continue;
|
|
3787
|
-
const c = Object.entries(a.cfg.outputs).map(([, u]) => u).filter((u) =>
|
|
3784
|
+
const c = Object.entries(a.cfg.outputs).map(([, u]) => u).filter((u) => ic(u)).map((u) => u);
|
|
3788
3785
|
if (c.length === 0) continue;
|
|
3789
|
-
const l =
|
|
3786
|
+
const l = zn(r.persist(), o);
|
|
3790
3787
|
for (const u of c)
|
|
3791
3788
|
i.push(
|
|
3792
|
-
H.wrapError(
|
|
3789
|
+
H.wrapError(Ve(e, l, u, ft(a.cfg), a.bpId))
|
|
3793
3790
|
);
|
|
3794
3791
|
}
|
|
3795
3792
|
return i;
|
|
3796
3793
|
});
|
|
3797
3794
|
}
|
|
3798
|
-
class
|
|
3795
|
+
class hc {
|
|
3799
3796
|
constructor() {
|
|
3800
3797
|
b(this, "states", /* @__PURE__ */ new Map());
|
|
3801
3798
|
}
|
|
3802
3799
|
setState(e, t) {
|
|
3803
3800
|
const r = this.states.get(e);
|
|
3804
3801
|
if (r === void 0) {
|
|
3805
|
-
this.states.set(e, { state: t, change: new
|
|
3802
|
+
this.states.set(e, { state: t, change: new ns() });
|
|
3806
3803
|
return;
|
|
3807
3804
|
}
|
|
3808
3805
|
r.state = { ...t }, r.change.markChanged("navigation state changed");
|
|
3809
3806
|
}
|
|
3810
3807
|
readState(e, t) {
|
|
3811
3808
|
let r = this.states.get(t);
|
|
3812
|
-
return r === void 0 && (r = { state: { ...
|
|
3809
|
+
return r === void 0 && (r = { state: { ...vo }, change: new ns() }, this.states.set(t, r)), r.change.attachWatcher(e.watcher), r.state;
|
|
3813
3810
|
}
|
|
3814
3811
|
getState(e) {
|
|
3815
3812
|
return H.make(
|
|
@@ -3822,7 +3819,7 @@ class fc {
|
|
|
3822
3819
|
t !== void 0 && (this.states.delete(e), t.change.markChanged("block deleted"));
|
|
3823
3820
|
}
|
|
3824
3821
|
}
|
|
3825
|
-
function
|
|
3822
|
+
function gc(s) {
|
|
3826
3823
|
return H.make((e) => {
|
|
3827
3824
|
const t = e.accessor(s).node(), r = N(t.getKeyValueAsJson(fe));
|
|
3828
3825
|
return {
|
|
@@ -3830,40 +3827,40 @@ function hc(s) {
|
|
|
3830
3827
|
};
|
|
3831
3828
|
});
|
|
3832
3829
|
}
|
|
3833
|
-
const
|
|
3834
|
-
async function
|
|
3830
|
+
const mc = "1", vc = "BlockFrontendState/";
|
|
3831
|
+
async function yc(s, e) {
|
|
3835
3832
|
await s.withWriteTx("ProjectMigration", async (t) => {
|
|
3836
3833
|
const r = await t.getKValueJson(e, ut);
|
|
3837
3834
|
if (r !== qe) {
|
|
3838
|
-
if (r ===
|
|
3839
|
-
await
|
|
3835
|
+
if (r === mc)
|
|
3836
|
+
await wc(t, e);
|
|
3840
3837
|
else
|
|
3841
3838
|
throw new Error(`Unknown project schema version: ${r}`);
|
|
3842
3839
|
t.setKValue(e, ut, JSON.stringify(qe)), await t.commit();
|
|
3843
3840
|
}
|
|
3844
3841
|
});
|
|
3845
3842
|
}
|
|
3846
|
-
async function
|
|
3843
|
+
async function wc(s, e) {
|
|
3847
3844
|
const [t, r] = await Promise.all([
|
|
3848
3845
|
s.getKValueJson(e, fe),
|
|
3849
3846
|
s.listKeyValues(e)
|
|
3850
3847
|
]), n = new Map(r.map((i) => [i.key, i.value]));
|
|
3851
3848
|
for (const i of se(t)) {
|
|
3852
|
-
const o =
|
|
3849
|
+
const o = vc + i.id, a = n.get(o), c = a ? Je(a) : {}, l = s.createJsonGzValue(c), u = M(e, _(i.id, "uiState"));
|
|
3853
3850
|
s.createField(u, "Dynamic", l), s.deleteKValue(e, o);
|
|
3854
3851
|
}
|
|
3855
3852
|
}
|
|
3856
|
-
function
|
|
3857
|
-
return JSON.stringify(s, (e, t) => typeof t == "bigint" ?
|
|
3853
|
+
function bs(s) {
|
|
3854
|
+
return JSON.stringify(s, (e, t) => typeof t == "bigint" ? Fe(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);
|
|
3858
3855
|
}
|
|
3859
|
-
class
|
|
3856
|
+
class Vr {
|
|
3860
3857
|
constructor(e, t, r) {
|
|
3861
3858
|
/** Underlying pl resource id */
|
|
3862
3859
|
b(this, "rid");
|
|
3863
3860
|
/** Data for the left panel, contain basic information about block status. */
|
|
3864
3861
|
b(this, "overview");
|
|
3865
3862
|
b(this, "overviewLight");
|
|
3866
|
-
b(this, "navigationStates", new
|
|
3863
|
+
b(this, "navigationStates", new hc());
|
|
3867
3864
|
// null is set for deleted blocks
|
|
3868
3865
|
b(this, "blockComputables", /* @__PURE__ */ new Map());
|
|
3869
3866
|
b(this, "blockFrontends", /* @__PURE__ */ new Map());
|
|
@@ -3871,18 +3868,18 @@ class xr {
|
|
|
3871
3868
|
b(this, "refreshLoopResult");
|
|
3872
3869
|
b(this, "abortController", new AbortController());
|
|
3873
3870
|
b(this, "destroyed", !1);
|
|
3874
|
-
this.env = e, this.projectTree = r, this.overview =
|
|
3871
|
+
this.env = e, this.projectTree = r, this.overview = cc(
|
|
3875
3872
|
r.entry(),
|
|
3876
3873
|
this.navigationStates,
|
|
3877
3874
|
e
|
|
3878
|
-
).withPreCalculatedValueTree(), this.overviewLight =
|
|
3875
|
+
).withPreCalculatedValueTree(), this.overviewLight = gc(r.entry()).withPreCalculatedValueTree(), this.rid = t, this.refreshLoopResult = this.refreshLoop(), this.activeConfigs = fc(r.entry(), e);
|
|
3879
3876
|
}
|
|
3880
3877
|
async refreshLoop() {
|
|
3881
3878
|
for (; !this.destroyed; )
|
|
3882
3879
|
try {
|
|
3883
3880
|
await rt(this.env.projectHelper, this.env.pl, this.rid, (r) => {
|
|
3884
3881
|
r.doRefresh(this.env.ops.stagingRenderingRate);
|
|
3885
|
-
}), await this.activeConfigs.getValue(), await
|
|
3882
|
+
}), await this.activeConfigs.getValue(), await En(this.env.ops.projectRefreshInterval, this.abortController.signal);
|
|
3886
3883
|
const e = await this.overviewLight.getValue(), t = new Set(e.listOfBlocks);
|
|
3887
3884
|
for (const r of this.blockComputables.keys())
|
|
3888
3885
|
if (!t.has(r)) {
|
|
@@ -3890,12 +3887,12 @@ class xr {
|
|
|
3890
3887
|
n != null && n.fullState.resetState(), this.blockComputables.set(r, null);
|
|
3891
3888
|
}
|
|
3892
3889
|
} catch (e) {
|
|
3893
|
-
if (
|
|
3890
|
+
if (Uo(e)) {
|
|
3894
3891
|
console.warn(
|
|
3895
3892
|
"project refresh routine terminated, because project was externally deleted"
|
|
3896
3893
|
);
|
|
3897
3894
|
break;
|
|
3898
|
-
} else if (!
|
|
3895
|
+
} else if (!Vo(e))
|
|
3899
3896
|
throw new Error("Unexpected exception", { cause: e });
|
|
3900
3897
|
}
|
|
3901
3898
|
}
|
|
@@ -3911,7 +3908,7 @@ class xr {
|
|
|
3911
3908
|
* @return returns newly created block id
|
|
3912
3909
|
* */
|
|
3913
3910
|
async addBlock(e, t, r, n = void 0, i = ge()) {
|
|
3914
|
-
const o = await this.env.bpPreparer.prepare(t), a = await this.env.bpPreparer.getBlockConfigContainer(t), c =
|
|
3911
|
+
const o = await this.env.bpPreparer.prepare(t), a = await this.env.bpPreparer.getBlockConfigContainer(t), c = Ee(a);
|
|
3915
3912
|
return await ne(
|
|
3916
3913
|
this.env.projectHelper,
|
|
3917
3914
|
this.env.pl,
|
|
@@ -3958,7 +3955,7 @@ class xr {
|
|
|
3958
3955
|
* initial values
|
|
3959
3956
|
* */
|
|
3960
3957
|
async updateBlockPack(e, t, r = !1, n) {
|
|
3961
|
-
const i = await this.env.bpPreparer.prepare(t), o =
|
|
3958
|
+
const i = await this.env.bpPreparer.prepare(t), o = Ee(await this.env.bpPreparer.getBlockConfigContainer(t));
|
|
3962
3959
|
await ne(
|
|
3963
3960
|
this.env.projectHelper,
|
|
3964
3961
|
this.env.pl,
|
|
@@ -4087,10 +4084,10 @@ class xr {
|
|
|
4087
4084
|
async resetBlockArgsAndUiState(e, t) {
|
|
4088
4085
|
await this.env.pl.withWriteTx("BlockInputsReset", async (r) => {
|
|
4089
4086
|
const n = ct(
|
|
4090
|
-
(await r.getField(
|
|
4087
|
+
(await r.getField(M(this.rid, _(e, "blockPack")))).value
|
|
4091
4088
|
), i = ct(
|
|
4092
|
-
(await r.getField(
|
|
4093
|
-
), o = await r.getResourceData(i, !1), a =
|
|
4089
|
+
(await r.getField(M(n, D.HolderRefField))).value
|
|
4090
|
+
), o = await r.getResourceData(i, !1), a = Ee(Je(N(o.data)).config);
|
|
4094
4091
|
await ne(this.env.projectHelper, r, this.rid, t, (c) => {
|
|
4095
4092
|
c.setStates([{ blockId: e, args: a.initialArgs, uiState: a.initialUiState }]);
|
|
4096
4093
|
}), await r.commit();
|
|
@@ -4100,10 +4097,10 @@ class xr {
|
|
|
4100
4097
|
const t = this.blockComputables.get(e);
|
|
4101
4098
|
if (t === null) throw new Error(`Block ${e} is deleted`);
|
|
4102
4099
|
if (t === void 0) {
|
|
4103
|
-
const r =
|
|
4100
|
+
const r = pc(this.projectTree.entry(), e, this.env), i = {
|
|
4104
4101
|
fullState: H.make(
|
|
4105
4102
|
(o) => ({
|
|
4106
|
-
argsAndUiState:
|
|
4103
|
+
argsAndUiState: to(this.projectTree.entry(), e, o),
|
|
4107
4104
|
outputs: r,
|
|
4108
4105
|
navigationState: this.navigationStates.getState(e),
|
|
4109
4106
|
overview: this.overview
|
|
@@ -4111,7 +4108,7 @@ class xr {
|
|
|
4111
4108
|
{
|
|
4112
4109
|
postprocessValue: (o) => {
|
|
4113
4110
|
var u, d, p;
|
|
4114
|
-
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 &&
|
|
4111
|
+
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 && bc(a) && o.outputs !== void 0 ? Cc(o.outputs) : o.outputs;
|
|
4115
4112
|
return {
|
|
4116
4113
|
...o.argsAndUiState,
|
|
4117
4114
|
outputs: l,
|
|
@@ -4139,7 +4136,7 @@ class xr {
|
|
|
4139
4136
|
getBlockFrontend(e) {
|
|
4140
4137
|
const t = this.blockFrontends.get(e);
|
|
4141
4138
|
if (t === void 0) {
|
|
4142
|
-
const r =
|
|
4139
|
+
const r = dc(
|
|
4143
4140
|
this.projectTree.entry(),
|
|
4144
4141
|
e,
|
|
4145
4142
|
this.env
|
|
@@ -4159,14 +4156,14 @@ class xr {
|
|
|
4159
4156
|
await this.destroy();
|
|
4160
4157
|
}
|
|
4161
4158
|
static async init(e, t) {
|
|
4162
|
-
await
|
|
4159
|
+
await yc(e.pl, t), await rt(e.projectHelper, e.pl, t, (n) => {
|
|
4163
4160
|
});
|
|
4164
|
-
const r = await
|
|
4161
|
+
const r = await Rn.init(
|
|
4165
4162
|
e.pl,
|
|
4166
4163
|
t,
|
|
4167
4164
|
{
|
|
4168
4165
|
...e.ops.defaultTreeOptions,
|
|
4169
|
-
pruning:
|
|
4166
|
+
pruning: Sc
|
|
4170
4167
|
},
|
|
4171
4168
|
e.logger
|
|
4172
4169
|
);
|
|
@@ -4176,13 +4173,13 @@ class xr {
|
|
|
4176
4173
|
var c, l;
|
|
4177
4174
|
return (((c = a.data) == null ? void 0 : c.byteLength) ?? 0) - (((l = o.data) == null ? void 0 : l.byteLength) ?? 0);
|
|
4178
4175
|
});
|
|
4179
|
-
const i =
|
|
4180
|
-
await at.writeFile(`${
|
|
4176
|
+
const i = Ko(n);
|
|
4177
|
+
await at.writeFile(`${Fe(t)}.json`, bs(n)), await at.writeFile(`${Fe(t)}.stats.json`, bs(i));
|
|
4181
4178
|
}
|
|
4182
|
-
return new
|
|
4179
|
+
return new Vr(e, t, r);
|
|
4183
4180
|
}
|
|
4184
4181
|
}
|
|
4185
|
-
function
|
|
4182
|
+
function Sc(s) {
|
|
4186
4183
|
if (s.type.name.startsWith("StreamWorkdir/"))
|
|
4187
4184
|
return [];
|
|
4188
4185
|
switch (s.type.name) {
|
|
@@ -4196,14 +4193,14 @@ function wc(s) {
|
|
|
4196
4193
|
return s.fields;
|
|
4197
4194
|
}
|
|
4198
4195
|
}
|
|
4199
|
-
function
|
|
4200
|
-
return !
|
|
4196
|
+
function bc(s) {
|
|
4197
|
+
return !kc(s, "1.26.0");
|
|
4201
4198
|
}
|
|
4202
|
-
function
|
|
4199
|
+
function kc(s, e) {
|
|
4203
4200
|
const t = s.split(".").map(Number), r = e.split(".").map(Number);
|
|
4204
4201
|
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];
|
|
4205
4202
|
}
|
|
4206
|
-
function
|
|
4203
|
+
function Cc(s) {
|
|
4207
4204
|
const e = {};
|
|
4208
4205
|
for (const [t, r] of Object.entries(s)) {
|
|
4209
4206
|
if (r.ok) {
|
|
@@ -4218,8 +4215,8 @@ function kc(s) {
|
|
|
4218
4215
|
}
|
|
4219
4216
|
return e;
|
|
4220
4217
|
}
|
|
4221
|
-
const
|
|
4222
|
-
logger: new
|
|
4218
|
+
const ro = {
|
|
4219
|
+
logger: new Sn(),
|
|
4223
4220
|
blobDriverOps: {
|
|
4224
4221
|
cacheSoftSizeBytes: 8 * 1024 * 1024 * 1024,
|
|
4225
4222
|
// 8 GB
|
|
@@ -4258,16 +4255,16 @@ const to = {
|
|
|
4258
4255
|
// 8 GB
|
|
4259
4256
|
}
|
|
4260
4257
|
};
|
|
4261
|
-
function
|
|
4258
|
+
function so(s) {
|
|
4262
4259
|
return {
|
|
4263
|
-
blobDownloadPath:
|
|
4264
|
-
blobDownloadRangesCachePath:
|
|
4265
|
-
downloadBlobToURLPath:
|
|
4266
|
-
pframesSpillPath:
|
|
4260
|
+
blobDownloadPath: q.join(s, "download"),
|
|
4261
|
+
blobDownloadRangesCachePath: q.join(s, "downloadRangesCache"),
|
|
4262
|
+
downloadBlobToURLPath: q.join(s, "downloadToURL"),
|
|
4263
|
+
pframesSpillPath: q.join(s, "pframes")
|
|
4267
4264
|
};
|
|
4268
4265
|
}
|
|
4269
|
-
const
|
|
4270
|
-
...
|
|
4266
|
+
const Rc = {
|
|
4267
|
+
...ro,
|
|
4271
4268
|
defaultTreeOptions: {
|
|
4272
4269
|
pollingInterval: 350,
|
|
4273
4270
|
stopPollingDelay: 2500,
|
|
@@ -4281,19 +4278,19 @@ const Cc = {
|
|
|
4281
4278
|
projectRefreshInterval: 700,
|
|
4282
4279
|
stagingRenderingRate: 5
|
|
4283
4280
|
};
|
|
4284
|
-
function
|
|
4281
|
+
function Pc(s) {
|
|
4285
4282
|
return {
|
|
4286
|
-
...
|
|
4287
|
-
frontendDownloadPath:
|
|
4283
|
+
...so(s),
|
|
4284
|
+
frontendDownloadPath: q.join(s, "frontend")
|
|
4288
4285
|
};
|
|
4289
4286
|
}
|
|
4290
|
-
function
|
|
4287
|
+
function Ec(s) {
|
|
4291
4288
|
return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
|
|
4292
4289
|
}
|
|
4293
|
-
var st = { exports: {} }, Tt,
|
|
4290
|
+
var st = { exports: {} }, Tt, ks;
|
|
4294
4291
|
function mt() {
|
|
4295
|
-
if (
|
|
4296
|
-
|
|
4292
|
+
if (ks) return Tt;
|
|
4293
|
+
ks = 1;
|
|
4297
4294
|
const s = "2.0.0", e = 256, t = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
|
|
4298
4295
|
9007199254740991, r = 16, n = e - 6;
|
|
4299
4296
|
return Tt = {
|
|
@@ -4315,14 +4312,14 @@ function mt() {
|
|
|
4315
4312
|
FLAG_LOOSE: 2
|
|
4316
4313
|
}, Tt;
|
|
4317
4314
|
}
|
|
4318
|
-
var It,
|
|
4315
|
+
var It, Cs;
|
|
4319
4316
|
function vt() {
|
|
4320
|
-
return
|
|
4317
|
+
return Cs || (Cs = 1, It = typeof process == "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...e) => console.error("SEMVER", ...e) : () => {
|
|
4321
4318
|
}), It;
|
|
4322
4319
|
}
|
|
4323
|
-
var
|
|
4320
|
+
var Rs;
|
|
4324
4321
|
function ze() {
|
|
4325
|
-
return
|
|
4322
|
+
return Rs || (Rs = 1, function(s, e) {
|
|
4326
4323
|
const {
|
|
4327
4324
|
MAX_SAFE_COMPONENT_LENGTH: t,
|
|
4328
4325
|
MAX_SAFE_BUILD_LENGTH: r,
|
|
@@ -4346,17 +4343,17 @@ function ze() {
|
|
|
4346
4343
|
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*$");
|
|
4347
4344
|
}(st, st.exports)), st.exports;
|
|
4348
4345
|
}
|
|
4349
|
-
var $t,
|
|
4350
|
-
function
|
|
4351
|
-
if (
|
|
4352
|
-
|
|
4346
|
+
var $t, Ps;
|
|
4347
|
+
function Jr() {
|
|
4348
|
+
if (Ps) return $t;
|
|
4349
|
+
Ps = 1;
|
|
4353
4350
|
const s = Object.freeze({ loose: !0 }), e = Object.freeze({});
|
|
4354
4351
|
return $t = (r) => r ? typeof r != "object" ? s : r : e, $t;
|
|
4355
4352
|
}
|
|
4356
|
-
var At,
|
|
4357
|
-
function
|
|
4358
|
-
if (
|
|
4359
|
-
|
|
4353
|
+
var At, Es;
|
|
4354
|
+
function no() {
|
|
4355
|
+
if (Es) return At;
|
|
4356
|
+
Es = 1;
|
|
4360
4357
|
const s = /^[0-9]+$/, e = (r, n) => {
|
|
4361
4358
|
const i = s.test(r), o = s.test(n);
|
|
4362
4359
|
return i && o && (r = +r, n = +n), r === n ? 0 : i && !o ? -1 : o && !i ? 1 : r < n ? -1 : 1;
|
|
@@ -4366,11 +4363,11 @@ function so() {
|
|
|
4366
4363
|
rcompareIdentifiers: (r, n) => e(n, r)
|
|
4367
4364
|
}, At;
|
|
4368
4365
|
}
|
|
4369
|
-
var Lt,
|
|
4366
|
+
var Lt, Os;
|
|
4370
4367
|
function ee() {
|
|
4371
|
-
if (
|
|
4372
|
-
|
|
4373
|
-
const s = vt(), { MAX_LENGTH: e, MAX_SAFE_INTEGER: t } = mt(), { safeRe: r, t: n } = ze(), i =
|
|
4368
|
+
if (Os) return Lt;
|
|
4369
|
+
Os = 1;
|
|
4370
|
+
const s = vt(), { MAX_LENGTH: e, MAX_SAFE_INTEGER: t } = mt(), { safeRe: r, t: n } = ze(), i = Jr(), { compareIdentifiers: o } = no();
|
|
4374
4371
|
class a {
|
|
4375
4372
|
constructor(l, u) {
|
|
4376
4373
|
if (u = i(u), l instanceof a) {
|
|
@@ -4527,10 +4524,10 @@ function ee() {
|
|
|
4527
4524
|
}
|
|
4528
4525
|
return Lt = a, Lt;
|
|
4529
4526
|
}
|
|
4530
|
-
var Dt,
|
|
4531
|
-
function
|
|
4532
|
-
if (
|
|
4533
|
-
|
|
4527
|
+
var Dt, Fs;
|
|
4528
|
+
function $e() {
|
|
4529
|
+
if (Fs) return Dt;
|
|
4530
|
+
Fs = 1;
|
|
4534
4531
|
const s = ee();
|
|
4535
4532
|
return Dt = (t, r, n = !1) => {
|
|
4536
4533
|
if (t instanceof s)
|
|
@@ -4544,30 +4541,30 @@ function Ie() {
|
|
|
4544
4541
|
}
|
|
4545
4542
|
}, Dt;
|
|
4546
4543
|
}
|
|
4547
|
-
var Nt,
|
|
4548
|
-
function
|
|
4549
|
-
if (
|
|
4550
|
-
|
|
4551
|
-
const s =
|
|
4544
|
+
var Nt, Ts;
|
|
4545
|
+
function Oc() {
|
|
4546
|
+
if (Ts) return Nt;
|
|
4547
|
+
Ts = 1;
|
|
4548
|
+
const s = $e();
|
|
4552
4549
|
return Nt = (t, r) => {
|
|
4553
4550
|
const n = s(t, r);
|
|
4554
4551
|
return n ? n.version : null;
|
|
4555
4552
|
}, Nt;
|
|
4556
4553
|
}
|
|
4557
|
-
var Bt,
|
|
4558
|
-
function
|
|
4559
|
-
if (
|
|
4560
|
-
|
|
4561
|
-
const s =
|
|
4554
|
+
var Bt, Is;
|
|
4555
|
+
function Fc() {
|
|
4556
|
+
if (Is) return Bt;
|
|
4557
|
+
Is = 1;
|
|
4558
|
+
const s = $e();
|
|
4562
4559
|
return Bt = (t, r) => {
|
|
4563
4560
|
const n = s(t.trim().replace(/^[=v]+/, ""), r);
|
|
4564
4561
|
return n ? n.version : null;
|
|
4565
4562
|
}, Bt;
|
|
4566
4563
|
}
|
|
4567
|
-
var jt,
|
|
4568
|
-
function
|
|
4569
|
-
if (
|
|
4570
|
-
|
|
4564
|
+
var jt, $s;
|
|
4565
|
+
function Tc() {
|
|
4566
|
+
if ($s) return jt;
|
|
4567
|
+
$s = 1;
|
|
4571
4568
|
const s = ee();
|
|
4572
4569
|
return jt = (t, r, n, i, o) => {
|
|
4573
4570
|
typeof n == "string" && (o = i, i = n, n = void 0);
|
|
@@ -4581,11 +4578,11 @@ function Fc() {
|
|
|
4581
4578
|
}
|
|
4582
4579
|
}, jt;
|
|
4583
4580
|
}
|
|
4584
|
-
var xt,
|
|
4585
|
-
function
|
|
4586
|
-
if (
|
|
4587
|
-
|
|
4588
|
-
const s =
|
|
4581
|
+
var xt, As;
|
|
4582
|
+
function Ic() {
|
|
4583
|
+
if (As) return xt;
|
|
4584
|
+
As = 1;
|
|
4585
|
+
const s = $e();
|
|
4589
4586
|
return xt = (t, r) => {
|
|
4590
4587
|
const n = s(t, null, !0), i = s(r, null, !0), o = n.compare(i);
|
|
4591
4588
|
if (o === 0)
|
|
@@ -4601,129 +4598,129 @@ function Tc() {
|
|
|
4601
4598
|
return n.major !== i.major ? p + "major" : n.minor !== i.minor ? p + "minor" : n.patch !== i.patch ? p + "patch" : "prerelease";
|
|
4602
4599
|
}, xt;
|
|
4603
4600
|
}
|
|
4604
|
-
var Ut,
|
|
4605
|
-
function
|
|
4606
|
-
if (
|
|
4607
|
-
|
|
4601
|
+
var Ut, Ls;
|
|
4602
|
+
function $c() {
|
|
4603
|
+
if (Ls) return Ut;
|
|
4604
|
+
Ls = 1;
|
|
4608
4605
|
const s = ee();
|
|
4609
4606
|
return Ut = (t, r) => new s(t, r).major, Ut;
|
|
4610
4607
|
}
|
|
4611
|
-
var Vt,
|
|
4612
|
-
function
|
|
4613
|
-
if (
|
|
4614
|
-
|
|
4608
|
+
var Vt, Ds;
|
|
4609
|
+
function Ac() {
|
|
4610
|
+
if (Ds) return Vt;
|
|
4611
|
+
Ds = 1;
|
|
4615
4612
|
const s = ee();
|
|
4616
4613
|
return Vt = (t, r) => new s(t, r).minor, Vt;
|
|
4617
4614
|
}
|
|
4618
|
-
var Jt,
|
|
4619
|
-
function
|
|
4620
|
-
if (
|
|
4621
|
-
|
|
4615
|
+
var Jt, Ns;
|
|
4616
|
+
function Lc() {
|
|
4617
|
+
if (Ns) return Jt;
|
|
4618
|
+
Ns = 1;
|
|
4622
4619
|
const s = ee();
|
|
4623
4620
|
return Jt = (t, r) => new s(t, r).patch, Jt;
|
|
4624
4621
|
}
|
|
4625
|
-
var Mt,
|
|
4626
|
-
function
|
|
4627
|
-
if (
|
|
4628
|
-
|
|
4629
|
-
const s =
|
|
4622
|
+
var Mt, Bs;
|
|
4623
|
+
function Dc() {
|
|
4624
|
+
if (Bs) return Mt;
|
|
4625
|
+
Bs = 1;
|
|
4626
|
+
const s = $e();
|
|
4630
4627
|
return Mt = (t, r) => {
|
|
4631
4628
|
const n = s(t, r);
|
|
4632
4629
|
return n && n.prerelease.length ? n.prerelease : null;
|
|
4633
4630
|
}, Mt;
|
|
4634
4631
|
}
|
|
4635
|
-
var Gt,
|
|
4632
|
+
var Gt, js;
|
|
4636
4633
|
function ae() {
|
|
4637
|
-
if (
|
|
4638
|
-
|
|
4634
|
+
if (js) return Gt;
|
|
4635
|
+
js = 1;
|
|
4639
4636
|
const s = ee();
|
|
4640
4637
|
return Gt = (t, r, n) => new s(t, n).compare(new s(r, n)), Gt;
|
|
4641
4638
|
}
|
|
4642
|
-
var qt,
|
|
4643
|
-
function
|
|
4644
|
-
if (
|
|
4645
|
-
|
|
4639
|
+
var qt, xs;
|
|
4640
|
+
function Nc() {
|
|
4641
|
+
if (xs) return qt;
|
|
4642
|
+
xs = 1;
|
|
4646
4643
|
const s = ae();
|
|
4647
4644
|
return qt = (t, r, n) => s(r, t, n), qt;
|
|
4648
4645
|
}
|
|
4649
|
-
var _t,
|
|
4650
|
-
function
|
|
4651
|
-
if (
|
|
4652
|
-
|
|
4646
|
+
var _t, Us;
|
|
4647
|
+
function Bc() {
|
|
4648
|
+
if (Us) return _t;
|
|
4649
|
+
Us = 1;
|
|
4653
4650
|
const s = ae();
|
|
4654
4651
|
return _t = (t, r) => s(t, r, !0), _t;
|
|
4655
4652
|
}
|
|
4656
|
-
var Kt,
|
|
4657
|
-
function
|
|
4658
|
-
if (
|
|
4659
|
-
|
|
4653
|
+
var Kt, Vs;
|
|
4654
|
+
function Mr() {
|
|
4655
|
+
if (Vs) return Kt;
|
|
4656
|
+
Vs = 1;
|
|
4660
4657
|
const s = ee();
|
|
4661
4658
|
return Kt = (t, r, n) => {
|
|
4662
4659
|
const i = new s(t, n), o = new s(r, n);
|
|
4663
4660
|
return i.compare(o) || i.compareBuild(o);
|
|
4664
4661
|
}, Kt;
|
|
4665
4662
|
}
|
|
4666
|
-
var Ht,
|
|
4667
|
-
function
|
|
4668
|
-
if (
|
|
4669
|
-
|
|
4670
|
-
const s =
|
|
4663
|
+
var Ht, Js;
|
|
4664
|
+
function jc() {
|
|
4665
|
+
if (Js) return Ht;
|
|
4666
|
+
Js = 1;
|
|
4667
|
+
const s = Mr();
|
|
4671
4668
|
return Ht = (t, r) => t.sort((n, i) => s(n, i, r)), Ht;
|
|
4672
4669
|
}
|
|
4673
|
-
var Wt,
|
|
4674
|
-
function
|
|
4675
|
-
if (
|
|
4676
|
-
|
|
4677
|
-
const s =
|
|
4670
|
+
var Wt, Ms;
|
|
4671
|
+
function xc() {
|
|
4672
|
+
if (Ms) return Wt;
|
|
4673
|
+
Ms = 1;
|
|
4674
|
+
const s = Mr();
|
|
4678
4675
|
return Wt = (t, r) => t.sort((n, i) => s(i, n, r)), Wt;
|
|
4679
4676
|
}
|
|
4680
|
-
var zt,
|
|
4677
|
+
var zt, Gs;
|
|
4681
4678
|
function yt() {
|
|
4682
|
-
if (
|
|
4683
|
-
|
|
4679
|
+
if (Gs) return zt;
|
|
4680
|
+
Gs = 1;
|
|
4684
4681
|
const s = ae();
|
|
4685
4682
|
return zt = (t, r, n) => s(t, r, n) > 0, zt;
|
|
4686
4683
|
}
|
|
4687
|
-
var Xt,
|
|
4688
|
-
function
|
|
4689
|
-
if (
|
|
4690
|
-
|
|
4684
|
+
var Xt, qs;
|
|
4685
|
+
function Gr() {
|
|
4686
|
+
if (qs) return Xt;
|
|
4687
|
+
qs = 1;
|
|
4691
4688
|
const s = ae();
|
|
4692
4689
|
return Xt = (t, r, n) => s(t, r, n) < 0, Xt;
|
|
4693
4690
|
}
|
|
4694
|
-
var Yt,
|
|
4695
|
-
function
|
|
4696
|
-
if (
|
|
4697
|
-
|
|
4691
|
+
var Yt, _s;
|
|
4692
|
+
function oo() {
|
|
4693
|
+
if (_s) return Yt;
|
|
4694
|
+
_s = 1;
|
|
4698
4695
|
const s = ae();
|
|
4699
4696
|
return Yt = (t, r, n) => s(t, r, n) === 0, Yt;
|
|
4700
4697
|
}
|
|
4701
|
-
var Qt,
|
|
4702
|
-
function
|
|
4703
|
-
if (
|
|
4704
|
-
|
|
4698
|
+
var Qt, Ks;
|
|
4699
|
+
function io() {
|
|
4700
|
+
if (Ks) return Qt;
|
|
4701
|
+
Ks = 1;
|
|
4705
4702
|
const s = ae();
|
|
4706
4703
|
return Qt = (t, r, n) => s(t, r, n) !== 0, Qt;
|
|
4707
4704
|
}
|
|
4708
|
-
var Zt,
|
|
4709
|
-
function
|
|
4710
|
-
if (
|
|
4711
|
-
|
|
4705
|
+
var Zt, Hs;
|
|
4706
|
+
function qr() {
|
|
4707
|
+
if (Hs) return Zt;
|
|
4708
|
+
Hs = 1;
|
|
4712
4709
|
const s = ae();
|
|
4713
4710
|
return Zt = (t, r, n) => s(t, r, n) >= 0, Zt;
|
|
4714
4711
|
}
|
|
4715
|
-
var er,
|
|
4716
|
-
function
|
|
4717
|
-
if (
|
|
4718
|
-
|
|
4712
|
+
var er, Ws;
|
|
4713
|
+
function _r() {
|
|
4714
|
+
if (Ws) return er;
|
|
4715
|
+
Ws = 1;
|
|
4719
4716
|
const s = ae();
|
|
4720
4717
|
return er = (t, r, n) => s(t, r, n) <= 0, er;
|
|
4721
4718
|
}
|
|
4722
|
-
var tr,
|
|
4723
|
-
function
|
|
4724
|
-
if (
|
|
4725
|
-
|
|
4726
|
-
const s =
|
|
4719
|
+
var tr, zs;
|
|
4720
|
+
function ao() {
|
|
4721
|
+
if (zs) return tr;
|
|
4722
|
+
zs = 1;
|
|
4723
|
+
const s = oo(), e = io(), t = yt(), r = qr(), n = Gr(), i = _r();
|
|
4727
4724
|
return tr = (a, c, l, u) => {
|
|
4728
4725
|
switch (c) {
|
|
4729
4726
|
case "===":
|
|
@@ -4749,11 +4746,11 @@ function io() {
|
|
|
4749
4746
|
}
|
|
4750
4747
|
}, tr;
|
|
4751
4748
|
}
|
|
4752
|
-
var rr,
|
|
4753
|
-
function
|
|
4754
|
-
if (
|
|
4755
|
-
|
|
4756
|
-
const s = ee(), e =
|
|
4749
|
+
var rr, Xs;
|
|
4750
|
+
function Uc() {
|
|
4751
|
+
if (Xs) return rr;
|
|
4752
|
+
Xs = 1;
|
|
4753
|
+
const s = ee(), e = $e(), { safeRe: t, t: r } = ze();
|
|
4757
4754
|
return rr = (i, o) => {
|
|
4758
4755
|
if (i instanceof s)
|
|
4759
4756
|
return i;
|
|
@@ -4776,10 +4773,10 @@ function xc() {
|
|
|
4776
4773
|
return e(`${c}.${l}.${u}${d}${p}`, o);
|
|
4777
4774
|
}, rr;
|
|
4778
4775
|
}
|
|
4779
|
-
var sr,
|
|
4780
|
-
function
|
|
4781
|
-
if (
|
|
4782
|
-
|
|
4776
|
+
var sr, Ys;
|
|
4777
|
+
function Vc() {
|
|
4778
|
+
if (Ys) return sr;
|
|
4779
|
+
Ys = 1;
|
|
4783
4780
|
class s {
|
|
4784
4781
|
constructor() {
|
|
4785
4782
|
this.max = 1e3, this.map = /* @__PURE__ */ new Map();
|
|
@@ -4805,10 +4802,10 @@ function Uc() {
|
|
|
4805
4802
|
}
|
|
4806
4803
|
return sr = s, sr;
|
|
4807
4804
|
}
|
|
4808
|
-
var nr,
|
|
4805
|
+
var nr, Qs;
|
|
4809
4806
|
function ce() {
|
|
4810
|
-
if (
|
|
4811
|
-
|
|
4807
|
+
if (Qs) return nr;
|
|
4808
|
+
Qs = 1;
|
|
4812
4809
|
const s = /\s+/g;
|
|
4813
4810
|
class e {
|
|
4814
4811
|
constructor(m, S) {
|
|
@@ -4890,7 +4887,7 @@ function ce() {
|
|
|
4890
4887
|
}
|
|
4891
4888
|
}
|
|
4892
4889
|
nr = e;
|
|
4893
|
-
const t =
|
|
4890
|
+
const t = Vc(), r = new t(), n = Jr(), i = wt(), o = vt(), a = ee(), {
|
|
4894
4891
|
safeRe: c,
|
|
4895
4892
|
t: l,
|
|
4896
4893
|
comparatorTrimReplace: u,
|
|
@@ -4918,7 +4915,7 @@ function ce() {
|
|
|
4918
4915
|
let j;
|
|
4919
4916
|
return F(k) ? j = "" : F(O) ? j = `>=${k}.0.0${w} <${+k + 1}.0.0-0` : F(A) ? k === "0" ? j = `>=${k}.${O}.0${w} <${k}.${+O + 1}.0-0` : j = `>=${k}.${O}.0${w} <${+k + 1}.0.0-0` : T ? (o("replaceCaret pr", T), k === "0" ? O === "0" ? j = `>=${k}.${O}.${A}-${T} <${k}.${O}.${+A + 1}-0` : j = `>=${k}.${O}.${A}-${T} <${k}.${+O + 1}.0-0` : j = `>=${k}.${O}.${A}-${T} <${+k + 1}.0.0-0`) : (o("no pr"), k === "0" ? O === "0" ? j = `>=${k}.${O}.${A}${w} <${k}.${O}.${+A + 1}-0` : j = `>=${k}.${O}.${A}${w} <${k}.${+O + 1}.0-0` : j = `>=${k}.${O}.${A} <${+k + 1}.0.0-0`), o("caret return", j), j;
|
|
4920
4917
|
});
|
|
4921
|
-
}, R = (g, m) => (o("replaceXRanges", g, m), g.split(/\s+/).map((S) =>
|
|
4918
|
+
}, R = (g, m) => (o("replaceXRanges", g, m), g.split(/\s+/).map((S) => G(S, m)).join(" ")), G = (g, m) => {
|
|
4922
4919
|
g = g.trim();
|
|
4923
4920
|
const S = m.loose ? c[l.XRANGELOOSE] : c[l.XRANGE];
|
|
4924
4921
|
return g.replace(S, (w, C, k, O, A, T) => {
|
|
@@ -4943,10 +4940,10 @@ function ce() {
|
|
|
4943
4940
|
};
|
|
4944
4941
|
return nr;
|
|
4945
4942
|
}
|
|
4946
|
-
var or,
|
|
4943
|
+
var or, Zs;
|
|
4947
4944
|
function wt() {
|
|
4948
|
-
if (
|
|
4949
|
-
|
|
4945
|
+
if (Zs) return or;
|
|
4946
|
+
Zs = 1;
|
|
4950
4947
|
const s = Symbol("SemVer ANY");
|
|
4951
4948
|
class e {
|
|
4952
4949
|
static get ANY() {
|
|
@@ -4987,13 +4984,13 @@ function wt() {
|
|
|
4987
4984
|
}
|
|
4988
4985
|
}
|
|
4989
4986
|
or = e;
|
|
4990
|
-
const t =
|
|
4987
|
+
const t = Jr(), { safeRe: r, t: n } = ze(), i = ao(), o = vt(), a = ee(), c = ce();
|
|
4991
4988
|
return or;
|
|
4992
4989
|
}
|
|
4993
|
-
var ir,
|
|
4990
|
+
var ir, en;
|
|
4994
4991
|
function St() {
|
|
4995
|
-
if (
|
|
4996
|
-
|
|
4992
|
+
if (en) return ir;
|
|
4993
|
+
en = 1;
|
|
4997
4994
|
const s = ce();
|
|
4998
4995
|
return ir = (t, r, n) => {
|
|
4999
4996
|
try {
|
|
@@ -5004,17 +5001,17 @@ function St() {
|
|
|
5004
5001
|
return r.test(t);
|
|
5005
5002
|
}, ir;
|
|
5006
5003
|
}
|
|
5007
|
-
var ar,
|
|
5008
|
-
function
|
|
5009
|
-
if (
|
|
5010
|
-
|
|
5004
|
+
var ar, tn;
|
|
5005
|
+
function Jc() {
|
|
5006
|
+
if (tn) return ar;
|
|
5007
|
+
tn = 1;
|
|
5011
5008
|
const s = ce();
|
|
5012
5009
|
return ar = (t, r) => new s(t, r).set.map((n) => n.map((i) => i.value).join(" ").trim().split(" ")), ar;
|
|
5013
5010
|
}
|
|
5014
|
-
var cr,
|
|
5015
|
-
function
|
|
5016
|
-
if (
|
|
5017
|
-
|
|
5011
|
+
var cr, rn;
|
|
5012
|
+
function Mc() {
|
|
5013
|
+
if (rn) return cr;
|
|
5014
|
+
rn = 1;
|
|
5018
5015
|
const s = ee(), e = ce();
|
|
5019
5016
|
return cr = (r, n, i) => {
|
|
5020
5017
|
let o = null, a = null, c = null;
|
|
@@ -5028,10 +5025,10 @@ function Jc() {
|
|
|
5028
5025
|
}), o;
|
|
5029
5026
|
}, cr;
|
|
5030
5027
|
}
|
|
5031
|
-
var lr,
|
|
5032
|
-
function
|
|
5033
|
-
if (
|
|
5034
|
-
|
|
5028
|
+
var lr, sn;
|
|
5029
|
+
function Gc() {
|
|
5030
|
+
if (sn) return lr;
|
|
5031
|
+
sn = 1;
|
|
5035
5032
|
const s = ee(), e = ce();
|
|
5036
5033
|
return lr = (r, n, i) => {
|
|
5037
5034
|
let o = null, a = null, c = null;
|
|
@@ -5045,10 +5042,10 @@ function Mc() {
|
|
|
5045
5042
|
}), o;
|
|
5046
5043
|
}, lr;
|
|
5047
5044
|
}
|
|
5048
|
-
var ur,
|
|
5049
|
-
function
|
|
5050
|
-
if (
|
|
5051
|
-
|
|
5045
|
+
var ur, nn;
|
|
5046
|
+
function qc() {
|
|
5047
|
+
if (nn) return ur;
|
|
5048
|
+
nn = 1;
|
|
5052
5049
|
const s = ee(), e = ce(), t = yt();
|
|
5053
5050
|
return ur = (n, i) => {
|
|
5054
5051
|
n = new e(n, i);
|
|
@@ -5081,10 +5078,10 @@ function Gc() {
|
|
|
5081
5078
|
return o && n.test(o) ? o : null;
|
|
5082
5079
|
}, ur;
|
|
5083
5080
|
}
|
|
5084
|
-
var dr,
|
|
5085
|
-
function
|
|
5086
|
-
if (
|
|
5087
|
-
|
|
5081
|
+
var dr, on;
|
|
5082
|
+
function _c() {
|
|
5083
|
+
if (on) return dr;
|
|
5084
|
+
on = 1;
|
|
5088
5085
|
const s = ce();
|
|
5089
5086
|
return dr = (t, r) => {
|
|
5090
5087
|
try {
|
|
@@ -5094,11 +5091,11 @@ function qc() {
|
|
|
5094
5091
|
}
|
|
5095
5092
|
}, dr;
|
|
5096
5093
|
}
|
|
5097
|
-
var pr,
|
|
5098
|
-
function
|
|
5099
|
-
if (
|
|
5100
|
-
|
|
5101
|
-
const s = ee(), e = wt(), { ANY: t } = e, r = ce(), n = St(), i = yt(), o =
|
|
5094
|
+
var pr, an;
|
|
5095
|
+
function Kr() {
|
|
5096
|
+
if (an) return pr;
|
|
5097
|
+
an = 1;
|
|
5098
|
+
const s = ee(), e = wt(), { ANY: t } = e, r = ce(), n = St(), i = yt(), o = Gr(), a = _r(), c = qr();
|
|
5102
5099
|
return pr = (u, d, p, f) => {
|
|
5103
5100
|
u = new s(u, f), d = new r(d, f);
|
|
5104
5101
|
let v, h, y, E, B;
|
|
@@ -5127,31 +5124,31 @@ function qr() {
|
|
|
5127
5124
|
return !0;
|
|
5128
5125
|
}, pr;
|
|
5129
5126
|
}
|
|
5130
|
-
var fr,
|
|
5131
|
-
function
|
|
5132
|
-
if (
|
|
5133
|
-
|
|
5134
|
-
const s =
|
|
5127
|
+
var fr, cn;
|
|
5128
|
+
function Kc() {
|
|
5129
|
+
if (cn) return fr;
|
|
5130
|
+
cn = 1;
|
|
5131
|
+
const s = Kr();
|
|
5135
5132
|
return fr = (t, r, n) => s(t, r, ">", n), fr;
|
|
5136
5133
|
}
|
|
5137
|
-
var hr,
|
|
5138
|
-
function
|
|
5139
|
-
if (
|
|
5140
|
-
|
|
5141
|
-
const s =
|
|
5134
|
+
var hr, ln;
|
|
5135
|
+
function Hc() {
|
|
5136
|
+
if (ln) return hr;
|
|
5137
|
+
ln = 1;
|
|
5138
|
+
const s = Kr();
|
|
5142
5139
|
return hr = (t, r, n) => s(t, r, "<", n), hr;
|
|
5143
5140
|
}
|
|
5144
|
-
var gr,
|
|
5145
|
-
function
|
|
5146
|
-
if (
|
|
5147
|
-
|
|
5141
|
+
var gr, un;
|
|
5142
|
+
function Wc() {
|
|
5143
|
+
if (un) return gr;
|
|
5144
|
+
un = 1;
|
|
5148
5145
|
const s = ce();
|
|
5149
5146
|
return gr = (t, r, n) => (t = new s(t, n), r = new s(r, n), t.intersects(r, n)), gr;
|
|
5150
5147
|
}
|
|
5151
|
-
var mr,
|
|
5152
|
-
function
|
|
5153
|
-
if (
|
|
5154
|
-
|
|
5148
|
+
var mr, dn;
|
|
5149
|
+
function zc() {
|
|
5150
|
+
if (dn) return mr;
|
|
5151
|
+
dn = 1;
|
|
5155
5152
|
const s = St(), e = ae();
|
|
5156
5153
|
return mr = (t, r, n) => {
|
|
5157
5154
|
const i = [];
|
|
@@ -5167,10 +5164,10 @@ function Wc() {
|
|
|
5167
5164
|
return u.length < d.length ? u : r;
|
|
5168
5165
|
}, mr;
|
|
5169
5166
|
}
|
|
5170
|
-
var vr,
|
|
5171
|
-
function
|
|
5172
|
-
if (
|
|
5173
|
-
|
|
5167
|
+
var vr, pn;
|
|
5168
|
+
function Xc() {
|
|
5169
|
+
if (pn) return vr;
|
|
5170
|
+
pn = 1;
|
|
5174
5171
|
const s = ce(), e = wt(), { ANY: t } = e, r = St(), n = ae(), i = (d, p, f = {}) => {
|
|
5175
5172
|
if (d === p)
|
|
5176
5173
|
return !0;
|
|
@@ -5215,8 +5212,8 @@ function zc() {
|
|
|
5215
5212
|
for (const R of v) {
|
|
5216
5213
|
if (h && !r(R, String(h), f) || y && !r(R, String(y), f))
|
|
5217
5214
|
return null;
|
|
5218
|
-
for (const
|
|
5219
|
-
if (!r(R, String(
|
|
5215
|
+
for (const G of p)
|
|
5216
|
+
if (!r(R, String(G), f))
|
|
5220
5217
|
return !1;
|
|
5221
5218
|
return !0;
|
|
5222
5219
|
}
|
|
@@ -5254,11 +5251,11 @@ function zc() {
|
|
|
5254
5251
|
};
|
|
5255
5252
|
return vr = i, vr;
|
|
5256
5253
|
}
|
|
5257
|
-
var yr,
|
|
5258
|
-
function
|
|
5259
|
-
if (
|
|
5260
|
-
|
|
5261
|
-
const s = ze(), e = mt(), t = ee(), r =
|
|
5254
|
+
var yr, fn;
|
|
5255
|
+
function Yc() {
|
|
5256
|
+
if (fn) return yr;
|
|
5257
|
+
fn = 1;
|
|
5258
|
+
const s = ze(), e = mt(), t = ee(), r = no(), n = $e(), i = Oc(), o = Fc(), a = Tc(), c = Ic(), l = $c(), u = Ac(), d = Lc(), p = Dc(), f = ae(), v = Nc(), h = Bc(), y = Mr(), E = jc(), B = xc(), F = yt(), x = Gr(), U = oo(), P = io(), $ = qr(), R = _r(), G = ao(), le = Uc(), X = wt(), J = ce(), z = St(), g = Jc(), m = Mc(), S = Gc(), w = qc(), C = _c(), k = Kr(), O = Kc(), A = Hc(), T = Wc(), j = zc(), W = Xc();
|
|
5262
5259
|
return yr = {
|
|
5263
5260
|
parse: n,
|
|
5264
5261
|
valid: i,
|
|
@@ -5281,7 +5278,7 @@ function Xc() {
|
|
|
5281
5278
|
neq: P,
|
|
5282
5279
|
gte: $,
|
|
5283
5280
|
lte: R,
|
|
5284
|
-
cmp:
|
|
5281
|
+
cmp: G,
|
|
5285
5282
|
coerce: le,
|
|
5286
5283
|
Comparator: X,
|
|
5287
5284
|
Range: J,
|
|
@@ -5307,13 +5304,13 @@ function Xc() {
|
|
|
5307
5304
|
rcompareIdentifiers: r.rcompareIdentifiers
|
|
5308
5305
|
}, yr;
|
|
5309
5306
|
}
|
|
5310
|
-
var
|
|
5311
|
-
const
|
|
5307
|
+
var Qc = Yc();
|
|
5308
|
+
const Zc = /* @__PURE__ */ Ec(Qc), el = {
|
|
5312
5309
|
minDelay: 1500
|
|
5313
|
-
},
|
|
5314
|
-
class
|
|
5310
|
+
}, tl = "__no_updates__";
|
|
5311
|
+
class rl extends Wo {
|
|
5315
5312
|
constructor(t, r, n = {}) {
|
|
5316
|
-
super({ ...n, ...
|
|
5313
|
+
super({ ...n, ...el }, r);
|
|
5317
5314
|
b(this, "http");
|
|
5318
5315
|
b(this, "preferredUpdateChannel");
|
|
5319
5316
|
this.registryProvider = t, this.http = n.http, this.preferredUpdateChannel = n.preferredUpdateChannel;
|
|
@@ -5327,7 +5324,7 @@ class tl extends Ho {
|
|
|
5327
5324
|
case "from-registry-v2":
|
|
5328
5325
|
return `from_registry_v2_${re(t)}`;
|
|
5329
5326
|
default:
|
|
5330
|
-
return
|
|
5327
|
+
return tl;
|
|
5331
5328
|
}
|
|
5332
5329
|
}
|
|
5333
5330
|
async readValue(t) {
|
|
@@ -5337,16 +5334,16 @@ class tl extends Ho {
|
|
|
5337
5334
|
switch (i.type) {
|
|
5338
5335
|
case "dev-v1":
|
|
5339
5336
|
try {
|
|
5340
|
-
const o = await
|
|
5337
|
+
const o = await Nn(i.folder);
|
|
5341
5338
|
return o === i.mtime ? { suggestions: [] } : { mainSuggestion: { ...i, mtime: o }, suggestions: [] };
|
|
5342
5339
|
} catch (o) {
|
|
5343
5340
|
return this.logger.warn(o), { suggestions: [] };
|
|
5344
5341
|
}
|
|
5345
5342
|
case "dev-v2":
|
|
5346
5343
|
try {
|
|
5347
|
-
const o = await
|
|
5344
|
+
const o = await kr(i.folder, this.logger);
|
|
5348
5345
|
if (o === void 0) return { suggestions: [] };
|
|
5349
|
-
const a = await
|
|
5346
|
+
const a = await Nr(o);
|
|
5350
5347
|
return a === i.mtime ? { suggestions: [] } : { mainSuggestion: { ...i, mtime: a }, suggestions: [] };
|
|
5351
5348
|
} catch (o) {
|
|
5352
5349
|
return this.logger.warn(o), { suggestions: [] };
|
|
@@ -5359,13 +5356,13 @@ class tl extends Ho {
|
|
|
5359
5356
|
let l = this.preferredUpdateChannel;
|
|
5360
5357
|
if (l === void 0)
|
|
5361
5358
|
if (i.channel === void 0)
|
|
5362
|
-
if (await c.getLatestOverview(i.id,
|
|
5359
|
+
if (await c.getLatestOverview(i.id, je)) l = je;
|
|
5363
5360
|
else {
|
|
5364
|
-
if (await c.getLatestOverview(i.id,
|
|
5361
|
+
if (await c.getLatestOverview(i.id, xe) === void 0)
|
|
5365
5362
|
return this.logger.error(
|
|
5366
|
-
`No "any" channel record for ${
|
|
5363
|
+
`No "any" channel record for ${ko(i.id)}`
|
|
5367
5364
|
), { suggestions: [] };
|
|
5368
|
-
l =
|
|
5365
|
+
l = xe;
|
|
5369
5366
|
}
|
|
5370
5367
|
else l = i.channel;
|
|
5371
5368
|
const u = await c.getUpdateSuggestions(i.id, l);
|
|
@@ -5388,7 +5385,7 @@ class tl extends Ho {
|
|
|
5388
5385
|
update: { ...i, id: { ...i.id, version: h } }
|
|
5389
5386
|
}));
|
|
5390
5387
|
if (d === void 0) return { suggestions: p };
|
|
5391
|
-
if (a !== void 0 &&
|
|
5388
|
+
if (a !== void 0 && Zc.lte(d, a))
|
|
5392
5389
|
return { suggestions: p };
|
|
5393
5390
|
const f = {
|
|
5394
5391
|
...i,
|
|
@@ -5415,7 +5412,7 @@ class tl extends Ho {
|
|
|
5415
5412
|
return re(t) === re(r);
|
|
5416
5413
|
}
|
|
5417
5414
|
}
|
|
5418
|
-
class
|
|
5415
|
+
class hn {
|
|
5419
5416
|
constructor() {
|
|
5420
5417
|
b(this, "resources", /* @__PURE__ */ new Map());
|
|
5421
5418
|
b(this, "disposeQueue", Promise.resolve());
|
|
@@ -5426,7 +5423,7 @@ class pn {
|
|
|
5426
5423
|
if (t.refCount === 0) {
|
|
5427
5424
|
this.resources.delete(e);
|
|
5428
5425
|
const r = t.resource;
|
|
5429
|
-
|
|
5426
|
+
$o(r) ? this.disposeQueue.then(() => r[Symbol.dispose]()) : Ao(r) && this.disposeQueue.then(() => r[Symbol.asyncDispose]());
|
|
5430
5427
|
}
|
|
5431
5428
|
}
|
|
5432
5429
|
acquire(e) {
|
|
@@ -5452,11 +5449,11 @@ class pn {
|
|
|
5452
5449
|
return (t = this.resources.get(e)) == null ? void 0 : t.resource;
|
|
5453
5450
|
}
|
|
5454
5451
|
}
|
|
5455
|
-
function
|
|
5452
|
+
function Pe(s) {
|
|
5456
5453
|
return String(s.id);
|
|
5457
5454
|
}
|
|
5458
|
-
const
|
|
5459
|
-
function
|
|
5455
|
+
const sl = ["Int", "Long", "Float", "Double", "String", "Bytes"];
|
|
5456
|
+
function Be(s) {
|
|
5460
5457
|
const e = [], t = [];
|
|
5461
5458
|
for (const r of s)
|
|
5462
5459
|
r.type === "bySingleColumn" ? (e.push(r), t.push({
|
|
@@ -5471,19 +5468,19 @@ function Ne(s) {
|
|
|
5471
5468
|
}
|
|
5472
5469
|
return t;
|
|
5473
5470
|
}
|
|
5474
|
-
function
|
|
5471
|
+
function gn(s) {
|
|
5475
5472
|
return "partitionFilters" in s ? {
|
|
5476
5473
|
...s,
|
|
5477
|
-
partitionFilters:
|
|
5478
|
-
filters:
|
|
5474
|
+
partitionFilters: Be(s.partitionFilters),
|
|
5475
|
+
filters: Be(s.filters)
|
|
5479
5476
|
} : {
|
|
5480
5477
|
...s,
|
|
5481
|
-
partitionFilters:
|
|
5482
|
-
filters:
|
|
5478
|
+
partitionFilters: Be(s.filters.filter((e) => e.column.type === "axis")),
|
|
5479
|
+
filters: Be(s.filters.filter((e) => e.column.type === "column"))
|
|
5483
5480
|
};
|
|
5484
5481
|
}
|
|
5485
5482
|
const Ce = (s, e) => typeof e == "bigint" ? e.toString() : e;
|
|
5486
|
-
class
|
|
5483
|
+
class nl {
|
|
5487
5484
|
constructor(e, t) {
|
|
5488
5485
|
b(this, "perFrame", /* @__PURE__ */ new Map());
|
|
5489
5486
|
b(this, "global");
|
|
@@ -5515,7 +5512,7 @@ class sl {
|
|
|
5515
5512
|
this.disposeListeners.set(r, i), e.resource.disposeSignal.addEventListener("abort", i);
|
|
5516
5513
|
}
|
|
5517
5514
|
}
|
|
5518
|
-
class
|
|
5515
|
+
class ol {
|
|
5519
5516
|
constructor(e, t, r, n) {
|
|
5520
5517
|
b(this, "pFramePromise");
|
|
5521
5518
|
b(this, "abortController", new AbortController());
|
|
@@ -5527,46 +5524,41 @@ class nl {
|
|
|
5527
5524
|
try {
|
|
5528
5525
|
await r.awaitStableFullValue(this.disposeSignal);
|
|
5529
5526
|
} catch (n) {
|
|
5530
|
-
if (
|
|
5527
|
+
if (So(n))
|
|
5531
5528
|
break;
|
|
5532
5529
|
throw n;
|
|
5533
5530
|
}
|
|
5534
5531
|
});
|
|
5535
5532
|
b(this, "resolveBlobContent", async (e) => {
|
|
5536
5533
|
const t = this.getOrCreateComputableForBlob(e), r = this.blobDriver.getLocalPath((await t.awaitStableValue(this.disposeSignal)).handle);
|
|
5537
|
-
return await
|
|
5534
|
+
return await bn.readFile(r);
|
|
5538
5535
|
});
|
|
5539
5536
|
this.blobDriver = e, this.logger = t, this.spillPath = r;
|
|
5540
5537
|
const i = (a, c) => this.logger[a](c);
|
|
5541
5538
|
for (const a of n)
|
|
5542
|
-
for (const c of
|
|
5543
|
-
this.blobIdToResource.set(
|
|
5539
|
+
for (const c of aa(a.data))
|
|
5540
|
+
this.blobIdToResource.set(Pe(c), c);
|
|
5544
5541
|
const o = [
|
|
5545
5542
|
...new Map(n.map((a) => ({
|
|
5546
5543
|
...a,
|
|
5547
|
-
data:
|
|
5544
|
+
data: ca(a.data, Pe)
|
|
5548
5545
|
})).map(
|
|
5549
5546
|
(a) => [re(a), a]
|
|
5550
5547
|
)).values()
|
|
5551
5548
|
];
|
|
5552
5549
|
try {
|
|
5553
|
-
const a = new
|
|
5550
|
+
const a = new An(this.spillPath, i);
|
|
5554
5551
|
a.setDataSource(this);
|
|
5555
5552
|
const c = [];
|
|
5556
|
-
for (const l of o)
|
|
5557
|
-
|
|
5558
|
-
throw new M(
|
|
5559
|
-
`ParquetPartitioned data is not supported yet, column: ${JSON.stringify(l)}, data: ${JSON.stringify(l.data)}`
|
|
5560
|
-
);
|
|
5561
|
-
c.push(a.setColumnData(l.id, l.data, { signal: this.disposeSignal }));
|
|
5562
|
-
}
|
|
5553
|
+
for (const l of o)
|
|
5554
|
+
a.addColumnSpec(l.id, l.spec), c.push(a.setColumnData(l.id, l.data, { signal: this.disposeSignal }));
|
|
5563
5555
|
this.pFramePromise = Promise.all(c).then(() => a).catch((l) => {
|
|
5564
|
-
throw this.dispose(), a.dispose(), new
|
|
5556
|
+
throw this.dispose(), a.dispose(), new K(
|
|
5565
5557
|
`PFrame creation failed asynchronously, columns: ${JSON.stringify(o)}, error: ${it(l)}`
|
|
5566
5558
|
);
|
|
5567
5559
|
});
|
|
5568
5560
|
} catch (a) {
|
|
5569
|
-
throw new
|
|
5561
|
+
throw new K(
|
|
5570
5562
|
`PFrame creation failed synchronously, columns: ${JSON.stringify(o)}, error: ${it(a)}`
|
|
5571
5563
|
);
|
|
5572
5564
|
}
|
|
@@ -5575,7 +5567,7 @@ class nl {
|
|
|
5575
5567
|
let t = this.blobHandleComputables.get(e);
|
|
5576
5568
|
if (t !== void 0) return t;
|
|
5577
5569
|
const r = this.blobIdToResource.get(e);
|
|
5578
|
-
if (r === void 0) throw new
|
|
5570
|
+
if (r === void 0) throw new K(`Blob with id ${e} not found.`);
|
|
5579
5571
|
return t = this.blobDriver.getDownloadedBlob(r).withPreCalculatedValueTree(), this.blobHandleComputables.set(e, t), t;
|
|
5580
5572
|
}
|
|
5581
5573
|
get disposeSignal() {
|
|
@@ -5605,7 +5597,7 @@ class wr {
|
|
|
5605
5597
|
}), (e = this.predecessor) == null || e.unref();
|
|
5606
5598
|
}
|
|
5607
5599
|
}
|
|
5608
|
-
class
|
|
5600
|
+
class Hr {
|
|
5609
5601
|
constructor(e, t, r, n) {
|
|
5610
5602
|
b(this, "pFrames");
|
|
5611
5603
|
b(this, "pTables");
|
|
@@ -5613,8 +5605,8 @@ class _r {
|
|
|
5613
5605
|
b(this, "frameConcurrencyLimiter");
|
|
5614
5606
|
b(this, "tableConcurrencyLimiter");
|
|
5615
5607
|
this.blobDriver = e, this.logger = t, this.spillPath = r;
|
|
5616
|
-
const i = new
|
|
5617
|
-
this.frameConcurrencyLimiter = i, this.tableConcurrencyLimiter = new
|
|
5608
|
+
const i = new rs(n.pFrameConcurrency);
|
|
5609
|
+
this.frameConcurrencyLimiter = i, this.tableConcurrencyLimiter = new rs(n.pTableConcurrency), this.pTableCache = new nl(this.logger, n), this.pFrames = new class extends hn {
|
|
5618
5610
|
constructor(o, a, c) {
|
|
5619
5611
|
super(), this.blobDriver = o, this.logger = a, this.spillPath = c;
|
|
5620
5612
|
}
|
|
@@ -5623,28 +5615,28 @@ class _r {
|
|
|
5623
5615
|
}
|
|
5624
5616
|
getByKey(o) {
|
|
5625
5617
|
const a = super.tryGetByKey(o);
|
|
5626
|
-
if (!a) throw new
|
|
5618
|
+
if (!a) throw new K(`PFrame not found, handle = ${o}`);
|
|
5627
5619
|
return a;
|
|
5628
5620
|
}
|
|
5629
5621
|
createNewResource(o) {
|
|
5630
5622
|
return Z().logPFrameRequests && t.info(
|
|
5631
5623
|
`PFrame creation (pFrameHandle = ${this.calculateParamsKey(o)}): ${JSON.stringify(o, Ce)}`
|
|
5632
|
-
), new
|
|
5624
|
+
), new ol(this.blobDriver, this.logger, this.spillPath, o);
|
|
5633
5625
|
}
|
|
5634
5626
|
calculateParamsKey(o) {
|
|
5635
5627
|
try {
|
|
5636
|
-
return
|
|
5628
|
+
return al(o);
|
|
5637
5629
|
} catch (a) {
|
|
5638
|
-
throw
|
|
5630
|
+
throw yo(a) ? a : new K(`PFrame handle calculation failed, request: ${JSON.stringify(o, Ce)}, error: ${it(a)}`);
|
|
5639
5631
|
}
|
|
5640
5632
|
}
|
|
5641
|
-
}(this.blobDriver, this.logger, this.spillPath), this.pTables = new class extends
|
|
5633
|
+
}(this.blobDriver, this.logger, this.spillPath), this.pTables = new class extends hn {
|
|
5642
5634
|
constructor(o) {
|
|
5643
5635
|
super(), this.pFrames = o;
|
|
5644
5636
|
}
|
|
5645
5637
|
getByKey(o) {
|
|
5646
5638
|
const a = super.tryGetByKey(o);
|
|
5647
|
-
if (!a) throw new
|
|
5639
|
+
if (!a) throw new K(`PTable not found, handle = ${o}`);
|
|
5648
5640
|
return a;
|
|
5649
5641
|
}
|
|
5650
5642
|
createNewResource(o) {
|
|
@@ -5680,34 +5672,34 @@ class _r {
|
|
|
5680
5672
|
}
|
|
5681
5673
|
calculateParamsKey(o) {
|
|
5682
5674
|
try {
|
|
5683
|
-
return
|
|
5675
|
+
return il(o);
|
|
5684
5676
|
} catch (a) {
|
|
5685
|
-
throw new
|
|
5677
|
+
throw new K(`PTable handle calculation failed, request: ${JSON.stringify(o)}, error: ${it(a)}`);
|
|
5686
5678
|
}
|
|
5687
5679
|
}
|
|
5688
5680
|
}(this.pFrames);
|
|
5689
5681
|
}
|
|
5690
5682
|
async pprofDump() {
|
|
5691
|
-
return await
|
|
5683
|
+
return await An.pprofDump();
|
|
5692
5684
|
}
|
|
5693
5685
|
static async init(e, t, r, n) {
|
|
5694
|
-
const i =
|
|
5695
|
-
return await
|
|
5686
|
+
const i = Oo.resolve(r);
|
|
5687
|
+
return await Lo(i), new Hr(e, t, i, n);
|
|
5696
5688
|
}
|
|
5697
5689
|
//
|
|
5698
5690
|
// Internal / Config API Methods
|
|
5699
5691
|
//
|
|
5700
5692
|
createPFrame(e, t) {
|
|
5701
|
-
const r = e.filter((i) =>
|
|
5693
|
+
const r = e.filter((i) => sl.find((o) => o === i.spec.valueType)).map(
|
|
5702
5694
|
(i) => ve(
|
|
5703
5695
|
i,
|
|
5704
|
-
(o) =>
|
|
5696
|
+
(o) => Ho(o) ? ma(o) : yn(o) ? o.type === "ParquetPartitioned" ? br(o, (a) => Ir(a)) : br(o, (a) => a.resourceInfo) : va(i.spec, o)
|
|
5705
5697
|
)
|
|
5706
5698
|
), n = this.pFrames.acquire(r);
|
|
5707
5699
|
return t.addOnDestroy(n.unref), n.key;
|
|
5708
5700
|
}
|
|
5709
5701
|
createPTable(e, t) {
|
|
5710
|
-
const r =
|
|
5702
|
+
const r = gn(e), n = this.createPFrame(wo(r.src), t), i = Sr(r, (a) => a.id), o = this.pTables.acquire({ def: i, pFrameHandle: n });
|
|
5711
5703
|
return Z().logPFrameRequests && this.logger.info(
|
|
5712
5704
|
`Create PTable call (pFrameHandle = ${n}; pTableHandle = ${JSON.stringify(o)}): ${JSON.stringify(
|
|
5713
5705
|
Sr(r, (a) => a.spec),
|
|
@@ -5751,7 +5743,7 @@ class _r {
|
|
|
5751
5743
|
);
|
|
5752
5744
|
const i = this.pTables.acquire({
|
|
5753
5745
|
pFrameHandle: e,
|
|
5754
|
-
def:
|
|
5746
|
+
def: gn(t)
|
|
5755
5747
|
}), { resource: { pTablePromise: o, disposeSignal: a } } = i, c = await o, l = AbortSignal.any([n, a].filter((u) => !!u));
|
|
5756
5748
|
return await this.frameConcurrencyLimiter.run(async () => {
|
|
5757
5749
|
try {
|
|
@@ -5778,7 +5770,7 @@ class _r {
|
|
|
5778
5770
|
const { pFramePromise: n, disposeSignal: i } = this.pFrames.getByKey(e), o = await n, a = AbortSignal.any([r, i].filter((c) => !!c));
|
|
5779
5771
|
return await this.frameConcurrencyLimiter.run(async () => await o.getUniqueValues({
|
|
5780
5772
|
...t,
|
|
5781
|
-
filters:
|
|
5773
|
+
filters: Be(t.filters)
|
|
5782
5774
|
}, {
|
|
5783
5775
|
signal: a
|
|
5784
5776
|
}));
|
|
@@ -5845,11 +5837,11 @@ function ot(s) {
|
|
|
5845
5837
|
Q(s);
|
|
5846
5838
|
}
|
|
5847
5839
|
}
|
|
5848
|
-
function
|
|
5849
|
-
const e =
|
|
5840
|
+
function il(s) {
|
|
5841
|
+
const e = Ie("sha256");
|
|
5850
5842
|
return e.update(re(s)), e.digest().toString("hex");
|
|
5851
5843
|
}
|
|
5852
|
-
function
|
|
5844
|
+
function al(s) {
|
|
5853
5845
|
const e = [...s].map(
|
|
5854
5846
|
(r) => ve(r, (n) => {
|
|
5855
5847
|
let i;
|
|
@@ -5871,7 +5863,7 @@ function il(s) {
|
|
|
5871
5863
|
keyLength: n.partitionKeyLength,
|
|
5872
5864
|
payload: Object.entries(n.parts).map(([a, c]) => ({
|
|
5873
5865
|
key: a,
|
|
5874
|
-
value:
|
|
5866
|
+
value: Pe(c)
|
|
5875
5867
|
}))
|
|
5876
5868
|
};
|
|
5877
5869
|
break;
|
|
@@ -5881,41 +5873,39 @@ function il(s) {
|
|
|
5881
5873
|
keyLength: n.partitionKeyLength,
|
|
5882
5874
|
payload: Object.entries(n.parts).map(([a, c]) => ({
|
|
5883
5875
|
key: a,
|
|
5884
|
-
value: [
|
|
5876
|
+
value: [Pe(c.index), Pe(c.values)]
|
|
5885
5877
|
}))
|
|
5886
5878
|
};
|
|
5887
5879
|
break;
|
|
5888
5880
|
case "ParquetPartitioned":
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
|
|
5896
|
-
|
|
5897
|
-
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
|
|
5901
|
-
// };
|
|
5902
|
-
// break;
|
|
5881
|
+
i = {
|
|
5882
|
+
type: n.type,
|
|
5883
|
+
keyLength: n.partitionKeyLength,
|
|
5884
|
+
payload: Object.entries(n.parts).map(([a, c]) => ({
|
|
5885
|
+
key: a,
|
|
5886
|
+
value: c.dataDigest || [
|
|
5887
|
+
Pe(c.data),
|
|
5888
|
+
JSON.stringify({ axes: c.axes, column: c.column })
|
|
5889
|
+
]
|
|
5890
|
+
}))
|
|
5891
|
+
};
|
|
5892
|
+
break;
|
|
5903
5893
|
default:
|
|
5904
|
-
throw new
|
|
5894
|
+
throw new K(`unsupported resource type: ${JSON.stringify(o)}`);
|
|
5905
5895
|
}
|
|
5906
5896
|
return i.payload.sort((a, c) => a.key.localeCompare(c.key)), i;
|
|
5907
5897
|
})
|
|
5908
5898
|
);
|
|
5909
5899
|
e.sort((r, n) => r.id.localeCompare(n.id));
|
|
5910
|
-
const t =
|
|
5900
|
+
const t = Ie("sha256");
|
|
5911
5901
|
return t.update(re(e)), t.digest().toString("hex");
|
|
5912
5902
|
}
|
|
5913
|
-
async function
|
|
5903
|
+
async function cl(s, e, t, r) {
|
|
5914
5904
|
const n = {
|
|
5915
|
-
...
|
|
5916
|
-
...
|
|
5905
|
+
...ro,
|
|
5906
|
+
...so(e),
|
|
5917
5907
|
...r
|
|
5918
|
-
}, i = new
|
|
5908
|
+
}, i = new Ar(n.localSecret), o = On(n.logger, s, n.localProjections), a = si(s, n.logger), c = Fn(s, n.logger), l = ni(s, n.logger), u = await oi.init(
|
|
5919
5909
|
n.logger,
|
|
5920
5910
|
o,
|
|
5921
5911
|
a,
|
|
@@ -5923,31 +5913,31 @@ async function al(s, e, t, r) {
|
|
|
5923
5913
|
n.blobDownloadRangesCachePath,
|
|
5924
5914
|
i,
|
|
5925
5915
|
n.blobDriverOps
|
|
5926
|
-
), d = new
|
|
5916
|
+
), d = new ii(
|
|
5927
5917
|
n.logger,
|
|
5928
5918
|
i,
|
|
5929
5919
|
o,
|
|
5930
5920
|
n.downloadBlobToURLPath,
|
|
5931
5921
|
n.downloadBlobToURLDriverOps
|
|
5932
|
-
), p = new
|
|
5922
|
+
), p = new ai(
|
|
5933
5923
|
n.logger,
|
|
5934
5924
|
i,
|
|
5935
5925
|
c,
|
|
5936
5926
|
l,
|
|
5937
5927
|
n.uploadDriverOps
|
|
5938
|
-
), f = new
|
|
5928
|
+
), f = new ci(n.logger, a, n.logStreamDriverOps), v = new li(n.logger, f, u), h = await Tn.init(
|
|
5939
5929
|
n.logger,
|
|
5940
5930
|
s,
|
|
5941
5931
|
i,
|
|
5942
5932
|
n.localProjections,
|
|
5943
5933
|
n.openFileDialogCallback,
|
|
5944
5934
|
n.virtualLocalStoragesOverride
|
|
5945
|
-
), y = await
|
|
5935
|
+
), y = await Hr.init(
|
|
5946
5936
|
u,
|
|
5947
5937
|
n.logger,
|
|
5948
5938
|
n.pframesSpillPath,
|
|
5949
5939
|
n.pFrameDriverOps
|
|
5950
|
-
), E = new
|
|
5940
|
+
), E = new ui(
|
|
5951
5941
|
n.logger,
|
|
5952
5942
|
s.httpDispatcher,
|
|
5953
5943
|
t,
|
|
@@ -5965,7 +5955,7 @@ async function al(s, e, t, r) {
|
|
|
5965
5955
|
frontendDriver: E
|
|
5966
5956
|
};
|
|
5967
5957
|
}
|
|
5968
|
-
class
|
|
5958
|
+
class ll {
|
|
5969
5959
|
constructor(e) {
|
|
5970
5960
|
b(this, "enrichmentTargetsCache", new lt({
|
|
5971
5961
|
max: 256,
|
|
@@ -5977,7 +5967,7 @@ class cl {
|
|
|
5977
5967
|
const t = e.blockConfig();
|
|
5978
5968
|
if (t.enrichmentTargets === void 0) return;
|
|
5979
5969
|
const r = e.args();
|
|
5980
|
-
return
|
|
5970
|
+
return oc(this.quickJs, t.enrichmentTargets, ft(t), r);
|
|
5981
5971
|
}
|
|
5982
5972
|
getEnrichmentTargets(e, t, r) {
|
|
5983
5973
|
const n = { blockConfig: e, args: t };
|
|
@@ -5987,7 +5977,7 @@ class cl {
|
|
|
5987
5977
|
return this.enrichmentTargetsCache.memo(i, { context: n }).value;
|
|
5988
5978
|
}
|
|
5989
5979
|
}
|
|
5990
|
-
class
|
|
5980
|
+
class co {
|
|
5991
5981
|
constructor(e, t, r, n, i, o, a, c) {
|
|
5992
5982
|
b(this, "pl");
|
|
5993
5983
|
/** Contains a reactive list of projects along with their meta information. */
|
|
@@ -6012,8 +6002,8 @@ class ao {
|
|
|
6012
6002
|
/** Creates a project with initial state and adds it to project list. */
|
|
6013
6003
|
async createProject(e, t = ge()) {
|
|
6014
6004
|
const r = await this.pl.withWriteTx("MLCreateProject", async (n) => {
|
|
6015
|
-
const i = await
|
|
6016
|
-
return n.createField(
|
|
6005
|
+
const i = await ia(n, e);
|
|
6006
|
+
return n.createField(M(this.projectListResourceId, t), "Dynamic", i), await n.commit(), await Jo(i);
|
|
6017
6007
|
});
|
|
6018
6008
|
return await this.projectListTree.refreshState(), r;
|
|
6019
6009
|
}
|
|
@@ -6027,12 +6017,12 @@ class ao {
|
|
|
6027
6017
|
* destruction of all attached objects, like files, analysis results etc. */
|
|
6028
6018
|
async deleteProject(e) {
|
|
6029
6019
|
await this.pl.withWriteTx("MLRemoveProject", async (t) => {
|
|
6030
|
-
t.removeField(
|
|
6020
|
+
t.removeField(M(this.projectListResourceId, e)), await t.commit();
|
|
6031
6021
|
}), await this.projectListTree.refreshState();
|
|
6032
6022
|
}
|
|
6033
6023
|
async projectIdToResourceId(e) {
|
|
6034
6024
|
return await this.pl.withReadTx("Project id to resource id", async (t) => {
|
|
6035
|
-
const r = (await t.getField(
|
|
6025
|
+
const r = (await t.getField(M(this.projectListResourceId, e))).value;
|
|
6036
6026
|
if (Me(r)) throw new Error("Unexpected project list structure.");
|
|
6037
6027
|
return r;
|
|
6038
6028
|
});
|
|
@@ -6044,7 +6034,7 @@ class ao {
|
|
|
6044
6034
|
async openProject(e) {
|
|
6045
6035
|
const t = await this.ensureProjectRid(e);
|
|
6046
6036
|
if (this.openedProjectsByRid.has(t)) throw new Error(`Project ${t} already opened`);
|
|
6047
|
-
this.openedProjectsByRid.set(t, await
|
|
6037
|
+
this.openedProjectsByRid.set(t, await Vr.init(this.env, t)), this.openedProjectsList.setValue([...this.openedProjectsByRid.keys()]);
|
|
6048
6038
|
}
|
|
6049
6039
|
/** Closes the project, and deallocate all corresponding resources. */
|
|
6050
6040
|
async closeProject(e) {
|
|
@@ -6072,7 +6062,7 @@ class ao {
|
|
|
6072
6062
|
/** Generates sufficiently random string to be used as local secret for the
|
|
6073
6063
|
* middle layer */
|
|
6074
6064
|
static generateLocalSecret() {
|
|
6075
|
-
return
|
|
6065
|
+
return Ar.generateSecret();
|
|
6076
6066
|
}
|
|
6077
6067
|
/** Returns a block event dispatcher, which can be used to listen to block events. */
|
|
6078
6068
|
get blockEventDispatcher() {
|
|
@@ -6081,29 +6071,29 @@ class ao {
|
|
|
6081
6071
|
/** Initialize middle layer */
|
|
6082
6072
|
static async init(e, t, r) {
|
|
6083
6073
|
const n = {
|
|
6084
|
-
...
|
|
6085
|
-
...
|
|
6074
|
+
...Rc,
|
|
6075
|
+
...Pc(t),
|
|
6086
6076
|
...r
|
|
6087
6077
|
};
|
|
6088
6078
|
n.defaultTreeOptions.logStat = Z().logTreeStats, n.debugOps.dumpInitialTreeState = Z().dumpInitialTreeState;
|
|
6089
6079
|
const i = await e.withWriteTx("MLInitialization", async (y) => {
|
|
6090
|
-
const E =
|
|
6080
|
+
const E = M(y.clientRoot, $i);
|
|
6091
6081
|
y.createField(E, "Dynamic");
|
|
6092
6082
|
const B = await y.getField(E);
|
|
6093
6083
|
if (Me(B.value)) {
|
|
6094
|
-
const F = y.createEphemeral(
|
|
6084
|
+
const F = y.createEphemeral(Bn);
|
|
6095
6085
|
return y.lock(F), y.setField(E, F), await y.commit(), await F.globalId;
|
|
6096
6086
|
} else
|
|
6097
6087
|
return B.value;
|
|
6098
|
-
}), o = n.logger, a = await
|
|
6088
|
+
}), o = n.logger, a = await cl(e, t, n.frontendDownloadPath, n), c = new Co(e.httpDispatcher), l = new ki(c), u = new Zi(
|
|
6099
6089
|
l,
|
|
6100
6090
|
a.signer,
|
|
6101
6091
|
c
|
|
6102
|
-
), d = await
|
|
6092
|
+
), d = await ti(), p = new bo();
|
|
6103
6093
|
p.addSupportedRequirement("requiresModelAPIVersion", 1);
|
|
6104
6094
|
const f = {
|
|
6105
6095
|
pl: e,
|
|
6106
|
-
blockEventDispatcher: new
|
|
6096
|
+
blockEventDispatcher: new Do(),
|
|
6107
6097
|
signer: a.signer,
|
|
6108
6098
|
logger: o,
|
|
6109
6099
|
httpDispatcher: e.httpDispatcher,
|
|
@@ -6112,16 +6102,16 @@ class ao {
|
|
|
6112
6102
|
bpPreparer: u,
|
|
6113
6103
|
frontendDownloadDriver: a.frontendDriver,
|
|
6114
6104
|
driverKit: a,
|
|
6115
|
-
blockUpdateWatcher: new
|
|
6105
|
+
blockUpdateWatcher: new rl(l, o, {
|
|
6116
6106
|
minDelay: n.devBlockUpdateRecheckInterval,
|
|
6117
6107
|
http: c,
|
|
6118
6108
|
preferredUpdateChannel: n.preferredUpdateChannel
|
|
6119
6109
|
}),
|
|
6120
6110
|
runtimeCapabilities: p,
|
|
6121
6111
|
quickJs: d,
|
|
6122
|
-
projectHelper: new
|
|
6123
|
-
}, v = new
|
|
6124
|
-
return new
|
|
6112
|
+
projectHelper: new ll(d)
|
|
6113
|
+
}, v = new zo([]), h = await Li(e, i, v, f);
|
|
6114
|
+
return new co(
|
|
6125
6115
|
f,
|
|
6126
6116
|
a,
|
|
6127
6117
|
a.signer,
|
|
@@ -6133,50 +6123,50 @@ class ao {
|
|
|
6133
6123
|
);
|
|
6134
6124
|
}
|
|
6135
6125
|
}
|
|
6136
|
-
async function
|
|
6137
|
-
return await
|
|
6138
|
-
const r = await new
|
|
6126
|
+
async function ul(s, e) {
|
|
6127
|
+
return await Ae(s.pingCheckDurationMs, s.maxPingsPerSecond, async () => {
|
|
6128
|
+
const r = await new Cn(e).ping();
|
|
6139
6129
|
return JSON.stringify(r).slice(0, s.bodyLimit) + "...";
|
|
6140
6130
|
});
|
|
6141
6131
|
}
|
|
6142
|
-
async function
|
|
6143
|
-
return await
|
|
6132
|
+
async function dl(s, e) {
|
|
6133
|
+
return await Ae(
|
|
6144
6134
|
s.blockRegistryDurationMs,
|
|
6145
6135
|
s.maxRegistryChecksPerSecond,
|
|
6146
6136
|
async () => await Xe(new URL(s.blockOverviewPath, s.blockRegistryUrl), s, e)
|
|
6147
6137
|
);
|
|
6148
6138
|
}
|
|
6149
|
-
async function
|
|
6150
|
-
return await
|
|
6139
|
+
async function pl(s, e) {
|
|
6140
|
+
return await Ae(
|
|
6151
6141
|
s.blockRegistryDurationMs,
|
|
6152
6142
|
s.maxRegistryChecksPerSecond,
|
|
6153
6143
|
async () => await Xe(new URL(s.blockOverviewPath, s.blockGARegistryUrl), s, e)
|
|
6154
6144
|
);
|
|
6155
6145
|
}
|
|
6156
|
-
async function
|
|
6157
|
-
return await
|
|
6146
|
+
async function fl(s, e) {
|
|
6147
|
+
return await Ae(
|
|
6158
6148
|
s.blockRegistryDurationMs,
|
|
6159
6149
|
s.maxRegistryChecksPerSecond,
|
|
6160
6150
|
async () => await Xe(new URL(s.blockUiPath, s.blockRegistryUrl), s, e)
|
|
6161
6151
|
);
|
|
6162
6152
|
}
|
|
6163
|
-
async function
|
|
6164
|
-
return await
|
|
6153
|
+
async function hl(s, e) {
|
|
6154
|
+
return await Ae(
|
|
6165
6155
|
s.blockRegistryDurationMs,
|
|
6166
6156
|
s.maxRegistryChecksPerSecond,
|
|
6167
6157
|
async () => await Xe(new URL(s.blockUiPath, s.blockGARegistryUrl), s, e)
|
|
6168
6158
|
);
|
|
6169
6159
|
}
|
|
6170
|
-
async function
|
|
6171
|
-
return await
|
|
6160
|
+
async function gl(s, e) {
|
|
6161
|
+
return await Ae(
|
|
6172
6162
|
s.autoUpdateCdnDurationMs,
|
|
6173
6163
|
s.maxAutoUpdateCdnChecksPerSecond,
|
|
6174
6164
|
async () => await Xe(s.autoUpdateCdnUrl, s, e)
|
|
6175
6165
|
);
|
|
6176
6166
|
}
|
|
6177
|
-
async function
|
|
6167
|
+
async function Ae(s, e, t) {
|
|
6178
6168
|
const r = Date.now(), n = [];
|
|
6179
|
-
for (;
|
|
6169
|
+
for (; mn(r) < s; ) {
|
|
6180
6170
|
const i = Date.now();
|
|
6181
6171
|
let o;
|
|
6182
6172
|
try {
|
|
@@ -6184,18 +6174,18 @@ async function $e(s, e, t) {
|
|
|
6184
6174
|
} catch (l) {
|
|
6185
6175
|
o = { ok: !1, error: l };
|
|
6186
6176
|
}
|
|
6187
|
-
const a =
|
|
6177
|
+
const a = mn(i);
|
|
6188
6178
|
n.push({
|
|
6189
6179
|
elapsedMs: a,
|
|
6190
6180
|
response: o
|
|
6191
6181
|
});
|
|
6192
6182
|
const c = 1e3 / e - a;
|
|
6193
|
-
c > 0 && await
|
|
6183
|
+
c > 0 && await En(c);
|
|
6194
6184
|
}
|
|
6195
6185
|
return n;
|
|
6196
6186
|
}
|
|
6197
6187
|
async function Xe(s, e, t) {
|
|
6198
|
-
const { body: r, statusCode: n } = await
|
|
6188
|
+
const { body: r, statusCode: n } = await $r(s, {
|
|
6199
6189
|
dispatcher: t,
|
|
6200
6190
|
headersTimeout: e.httpTimeoutMs,
|
|
6201
6191
|
bodyTimeout: e.httpTimeoutMs
|
|
@@ -6205,11 +6195,11 @@ async function Xe(s, e, t) {
|
|
|
6205
6195
|
beginningOfBody: i.slice(0, e.bodyLimit) + "..."
|
|
6206
6196
|
};
|
|
6207
6197
|
}
|
|
6208
|
-
function
|
|
6198
|
+
function mn(s) {
|
|
6209
6199
|
return Date.now() - s;
|
|
6210
6200
|
}
|
|
6211
6201
|
function Re(s) {
|
|
6212
|
-
const e = s.filter((o) => o.response.ok), t = s.length - e.length, { mean: r, median: n } =
|
|
6202
|
+
const e = s.filter((o) => o.response.ok), t = s.length - e.length, { mean: r, median: n } = ml(s), i = `
|
|
6213
6203
|
total: ${s.length};
|
|
6214
6204
|
successes: ${e.length};
|
|
6215
6205
|
errors: ${t};
|
|
@@ -6221,7 +6211,7 @@ function Re(s) {
|
|
|
6221
6211
|
details: i
|
|
6222
6212
|
};
|
|
6223
6213
|
}
|
|
6224
|
-
function
|
|
6214
|
+
function ml(s) {
|
|
6225
6215
|
const e = s.map((n) => n.elapsedMs).sort(), t = e.reduce((n, i) => n + i) / e.length;
|
|
6226
6216
|
let r;
|
|
6227
6217
|
if (e.length > 0) {
|
|
@@ -6230,17 +6220,17 @@ function gl(s) {
|
|
|
6230
6220
|
}
|
|
6231
6221
|
return { mean: t, median: r };
|
|
6232
6222
|
}
|
|
6233
|
-
async function
|
|
6223
|
+
async function vl(s, e, t) {
|
|
6234
6224
|
try {
|
|
6235
|
-
const r = await
|
|
6225
|
+
const r = await yl(s, e, t);
|
|
6236
6226
|
return r !== `Hello, ${t}` ? { status: "failed", message: `Template uploading failed: expected: ${t}, got: ${r}` } : { status: "ok", message: `Template uploading succeeded: ${r}` };
|
|
6237
6227
|
} catch (r) {
|
|
6238
6228
|
return { status: "failed", message: `Template uploading failed: error occurred: ${r}` };
|
|
6239
6229
|
}
|
|
6240
6230
|
}
|
|
6241
|
-
async function
|
|
6231
|
+
async function yl(s, e, t) {
|
|
6242
6232
|
var n;
|
|
6243
|
-
const r = await
|
|
6233
|
+
const r = await Le(
|
|
6244
6234
|
e,
|
|
6245
6235
|
Se["check_network.upload_template"],
|
|
6246
6236
|
!0,
|
|
@@ -6252,20 +6242,20 @@ async function vl(s, e, t) {
|
|
|
6252
6242
|
try {
|
|
6253
6243
|
return JSON.parse(N((n = (await me(e, r.greeting)).data) == null ? void 0 : n.toString()));
|
|
6254
6244
|
} finally {
|
|
6255
|
-
r != null && await
|
|
6245
|
+
r != null && await De(e, Object.values(r));
|
|
6256
6246
|
}
|
|
6257
6247
|
}
|
|
6258
|
-
async function
|
|
6248
|
+
async function wl(s, e, t, r, n, i) {
|
|
6259
6249
|
try {
|
|
6260
|
-
const o = await
|
|
6250
|
+
const o = await Sl(s, e, t, r, n, i);
|
|
6261
6251
|
return o.type.name !== "Blob" ? { status: "failed", message: `File uploading failed: ${o.type.name}` } : { status: "ok", message: `File uploading succeeded: ${o.type.name}` };
|
|
6262
6252
|
} catch (o) {
|
|
6263
6253
|
return { status: "failed", message: `File uploading failed: error occurred: ${o}` };
|
|
6264
6254
|
}
|
|
6265
6255
|
}
|
|
6266
|
-
async function
|
|
6256
|
+
async function Sl(s, e, t, r, n, i) {
|
|
6267
6257
|
var c;
|
|
6268
|
-
const o = await t.getLocalFileHandle(i), a = await
|
|
6258
|
+
const o = await t.getLocalFileHandle(i), a = await Le(
|
|
6269
6259
|
n,
|
|
6270
6260
|
Se["check_network.upload_blob"],
|
|
6271
6261
|
!0,
|
|
@@ -6276,9 +6266,9 @@ async function wl(s, e, t, r, n, i) {
|
|
|
6276
6266
|
);
|
|
6277
6267
|
try {
|
|
6278
6268
|
const l = await me(n, a.progress);
|
|
6279
|
-
if (
|
|
6280
|
-
const u =
|
|
6281
|
-
|
|
6269
|
+
if (di(l)) {
|
|
6270
|
+
const u = $n.parse(JSON.parse(N((c = l.data) == null ? void 0 : c.toString())));
|
|
6271
|
+
pi(e, u.localPath, u.pathSignature) && await In(
|
|
6282
6272
|
s,
|
|
6283
6273
|
r,
|
|
6284
6274
|
l,
|
|
@@ -6294,20 +6284,20 @@ async function wl(s, e, t, r, n, i) {
|
|
|
6294
6284
|
}
|
|
6295
6285
|
return await me(n, a.file);
|
|
6296
6286
|
} finally {
|
|
6297
|
-
await
|
|
6287
|
+
await De(n, Object.values(a));
|
|
6298
6288
|
}
|
|
6299
6289
|
}
|
|
6300
|
-
async function
|
|
6290
|
+
async function bl(s, e, t, r, n, i, o) {
|
|
6301
6291
|
try {
|
|
6302
|
-
const a = await
|
|
6292
|
+
const a = await kl(s, e, t, r, n, i);
|
|
6303
6293
|
return a !== o ? { status: "failed", message: `File downloading failed: expected: ${o}, got: ${a}` } : { status: "ok", message: `File downloading succeeded: ${a}` };
|
|
6304
6294
|
} catch (a) {
|
|
6305
6295
|
return { status: "failed", message: `File downloading failed: error occurred: ${a}` };
|
|
6306
6296
|
}
|
|
6307
6297
|
}
|
|
6308
|
-
async function
|
|
6298
|
+
async function kl(s, e, t, r, n, i) {
|
|
6309
6299
|
var c;
|
|
6310
|
-
const o = await t.getLocalFileHandle(i), a = await
|
|
6300
|
+
const o = await t.getLocalFileHandle(i), a = await Le(
|
|
6311
6301
|
e,
|
|
6312
6302
|
Se["check_network.download_blob"],
|
|
6313
6303
|
!0,
|
|
@@ -6316,11 +6306,11 @@ async function bl(s, e, t, r, n, i) {
|
|
|
6316
6306
|
);
|
|
6317
6307
|
try {
|
|
6318
6308
|
const l = await me(e, a.progress);
|
|
6319
|
-
await
|
|
6309
|
+
await In(
|
|
6320
6310
|
s,
|
|
6321
6311
|
r,
|
|
6322
6312
|
l,
|
|
6323
|
-
|
|
6313
|
+
$n.parse(JSON.parse(N((c = l.data) == null ? void 0 : c.toString()))),
|
|
6324
6314
|
() => !1,
|
|
6325
6315
|
{
|
|
6326
6316
|
nPartsWithThisUploadSpeed: 1,
|
|
@@ -6334,24 +6324,24 @@ async function bl(s, e, t, r, n, i) {
|
|
|
6334
6324
|
u,
|
|
6335
6325
|
{},
|
|
6336
6326
|
{},
|
|
6337
|
-
async (d) => await
|
|
6327
|
+
async (d) => await hi(d)
|
|
6338
6328
|
);
|
|
6339
6329
|
} finally {
|
|
6340
|
-
await
|
|
6330
|
+
await De(e, Object.values(a));
|
|
6341
6331
|
}
|
|
6342
6332
|
}
|
|
6343
|
-
async function
|
|
6333
|
+
async function Cl(s) {
|
|
6344
6334
|
try {
|
|
6345
|
-
const e = await
|
|
6335
|
+
const e = await Rl(s);
|
|
6346
6336
|
return e !== `Hello from go binary
|
|
6347
6337
|
` ? { status: "failed", message: `Software check failed: got: ${e}` } : { status: "ok", message: `Software check succeeded: ${e}` };
|
|
6348
6338
|
} catch (e) {
|
|
6349
6339
|
return { status: "failed", message: `Software check failed: error occurred: ${e}` };
|
|
6350
6340
|
}
|
|
6351
6341
|
}
|
|
6352
|
-
async function
|
|
6342
|
+
async function Rl(s) {
|
|
6353
6343
|
var t;
|
|
6354
|
-
const e = await
|
|
6344
|
+
const e = await Le(
|
|
6355
6345
|
s,
|
|
6356
6346
|
Se["check_network.run_hello_world"],
|
|
6357
6347
|
!0,
|
|
@@ -6361,21 +6351,21 @@ async function Cl(s) {
|
|
|
6361
6351
|
try {
|
|
6362
6352
|
return N((t = (await me(s, e.greeting)).data) == null ? void 0 : t.toString());
|
|
6363
6353
|
} finally {
|
|
6364
|
-
await
|
|
6354
|
+
await De(s, Object.values(e));
|
|
6365
6355
|
}
|
|
6366
6356
|
}
|
|
6367
|
-
async function
|
|
6357
|
+
async function Pl(s, e) {
|
|
6368
6358
|
try {
|
|
6369
|
-
const t = await
|
|
6359
|
+
const t = await El(s, e);
|
|
6370
6360
|
return t !== `Hello, ${e}!
|
|
6371
6361
|
` ? { status: "failed", message: `Python software check failed: got: ${t}` } : { status: "ok", message: `Python software check succeeded: ${t}` };
|
|
6372
6362
|
} catch (t) {
|
|
6373
6363
|
return { status: "failed", message: `Python software check failed: error occurred: ${t}` };
|
|
6374
6364
|
}
|
|
6375
6365
|
}
|
|
6376
|
-
async function
|
|
6366
|
+
async function El(s, e) {
|
|
6377
6367
|
var r;
|
|
6378
|
-
const t = await
|
|
6368
|
+
const t = await Le(
|
|
6379
6369
|
s,
|
|
6380
6370
|
Se["check_network.run_hello_world_py"],
|
|
6381
6371
|
!0,
|
|
@@ -6385,15 +6375,15 @@ async function Pl(s, e) {
|
|
|
6385
6375
|
try {
|
|
6386
6376
|
return N((r = (await me(s, t.greeting)).data) == null ? void 0 : r.toString());
|
|
6387
6377
|
} finally {
|
|
6388
|
-
await
|
|
6378
|
+
await De(s, Object.values(t));
|
|
6389
6379
|
}
|
|
6390
6380
|
}
|
|
6391
|
-
async function
|
|
6381
|
+
async function Ol(s, e, t, r) {
|
|
6392
6382
|
var n, i;
|
|
6393
6383
|
try {
|
|
6394
6384
|
const o = await t.getStorageList(), a = {};
|
|
6395
6385
|
for (const c of o) {
|
|
6396
|
-
const l = await
|
|
6386
|
+
const l = await Fl(t, c, r.nFilesToCheck, r.minFileSize, r.maxFileSize, r.minLsRequests);
|
|
6397
6387
|
if (l.file === void 0) {
|
|
6398
6388
|
a[c.name] = {
|
|
6399
6389
|
status: "warn",
|
|
@@ -6402,7 +6392,7 @@ async function El(s, e, t, r) {
|
|
|
6402
6392
|
continue;
|
|
6403
6393
|
}
|
|
6404
6394
|
s.info(`Downloading file ${JSON.stringify(l)} from storage ${c.name}`);
|
|
6405
|
-
const u = await
|
|
6395
|
+
const u = await Le(
|
|
6406
6396
|
e,
|
|
6407
6397
|
Se["check_network.create_workdir_from_storage"],
|
|
6408
6398
|
!0,
|
|
@@ -6419,7 +6409,7 @@ async function El(s, e, t, r) {
|
|
|
6419
6409
|
message: `Workdir creation failed: ${d}, size of file: ${(i = l.file) == null ? void 0 : i.size}, checked ${l.nCheckedFiles} files, did ${l.nLsRequests} ls requests`
|
|
6420
6410
|
};
|
|
6421
6411
|
} finally {
|
|
6422
|
-
await
|
|
6412
|
+
await De(e, Object.values(u));
|
|
6423
6413
|
}
|
|
6424
6414
|
}
|
|
6425
6415
|
return a;
|
|
@@ -6427,8 +6417,8 @@ async function El(s, e, t, r) {
|
|
|
6427
6417
|
return { unknown: { status: "failed", message: `Download from every storage failed: error occurred: ${o}` } };
|
|
6428
6418
|
}
|
|
6429
6419
|
}
|
|
6430
|
-
async function
|
|
6431
|
-
const o =
|
|
6420
|
+
async function Fl(s, e, t, r, n, i) {
|
|
6421
|
+
const o = lo(s, e, "", 0);
|
|
6432
6422
|
let a, c = 0, l = 0;
|
|
6433
6423
|
for await (const { file: u, nLsRequests: d } of o) {
|
|
6434
6424
|
if (l = Math.max(l, d), c >= t && l > i)
|
|
@@ -6439,7 +6429,7 @@ async function Ol(s, e, t, r, n, i) {
|
|
|
6439
6429
|
}
|
|
6440
6430
|
return { file: a, nLsRequests: l, nCheckedFiles: c };
|
|
6441
6431
|
}
|
|
6442
|
-
async function*
|
|
6432
|
+
async function* lo(s, e, t, r) {
|
|
6443
6433
|
r++;
|
|
6444
6434
|
const n = await s.listRemoteFilesWithAdditionalInfo(e.handle, t);
|
|
6445
6435
|
for (const i of n.entries)
|
|
@@ -6449,20 +6439,20 @@ async function* co(s, e, t, r) {
|
|
|
6449
6439
|
nLsRequests: r
|
|
6450
6440
|
};
|
|
6451
6441
|
else if (i.type === "dir")
|
|
6452
|
-
for await (const o of
|
|
6442
|
+
for await (const o of lo(s, e, i.fullPath, r))
|
|
6453
6443
|
r = Math.max(o.nLsRequests, r), yield o;
|
|
6454
6444
|
}
|
|
6455
|
-
async function
|
|
6456
|
-
const s =
|
|
6445
|
+
async function Tl() {
|
|
6446
|
+
const s = q.join(Ln.tmpdir(), `check-network-big-temp-${Date.now()}.bin`), e = 20 * 1024 * 1024, t = Xo(e);
|
|
6457
6447
|
return await at.appendFile(s, t), { filePath: s };
|
|
6458
6448
|
}
|
|
6459
|
-
async function
|
|
6460
|
-
const s =
|
|
6449
|
+
async function Il() {
|
|
6450
|
+
const s = q.join(Ln.tmpdir(), `check-network-temp-${Date.now()}.txt`), e = "Hello, world! " + (/* @__PURE__ */ new Date()).toISOString();
|
|
6461
6451
|
return await at.writeFile(s, e), { filePath: s, fileContent: e };
|
|
6462
6452
|
}
|
|
6463
|
-
async function
|
|
6453
|
+
async function Le(s, e, t, r, n) {
|
|
6464
6454
|
return await s.withWriteTx("TemplateRender", async (i) => {
|
|
6465
|
-
const o = await
|
|
6455
|
+
const o = await Jn(e), a = ht(i, o), c = jr(
|
|
6466
6456
|
i,
|
|
6467
6457
|
a,
|
|
6468
6458
|
t,
|
|
@@ -6470,35 +6460,35 @@ async function Ae(s, e, t, r, n) {
|
|
|
6470
6460
|
n
|
|
6471
6461
|
), l = {};
|
|
6472
6462
|
for (const u of n) {
|
|
6473
|
-
const d =
|
|
6474
|
-
i.createField(d, "Dynamic", c[u]), l[u] = await
|
|
6463
|
+
const d = M(s.clientRoot, u);
|
|
6464
|
+
i.createField(d, "Dynamic", c[u]), l[u] = await Mo(d);
|
|
6475
6465
|
}
|
|
6476
6466
|
return await i.commit(), l;
|
|
6477
6467
|
});
|
|
6478
6468
|
}
|
|
6479
6469
|
async function me(s, e) {
|
|
6480
|
-
return await
|
|
6470
|
+
return await Go(s, async (t) => {
|
|
6481
6471
|
const r = await t.tx.getField(e);
|
|
6482
|
-
if (
|
|
6472
|
+
if (Cr(r.error)) {
|
|
6483
6473
|
const n = await t.tx.getResourceData(r.error, !0);
|
|
6484
6474
|
throw new Error(`getFieldValue of "${e.fieldName}" field failed: ${n.data}`);
|
|
6485
6475
|
}
|
|
6486
6476
|
if (Me(r.value))
|
|
6487
|
-
throw new
|
|
6477
|
+
throw new qo();
|
|
6488
6478
|
return await t.tx.getResourceData(r.value, !0);
|
|
6489
6479
|
});
|
|
6490
6480
|
}
|
|
6491
|
-
async function
|
|
6481
|
+
async function De(s, e) {
|
|
6492
6482
|
await s.withWriteTx("DeleteFields", async (t) => {
|
|
6493
6483
|
for (const r of e)
|
|
6494
6484
|
t.resetField(r);
|
|
6495
6485
|
await t.commit();
|
|
6496
6486
|
});
|
|
6497
6487
|
}
|
|
6498
|
-
async function
|
|
6488
|
+
async function yu(s, e, t, r = {}) {
|
|
6499
6489
|
const n = [];
|
|
6500
|
-
|
|
6501
|
-
|
|
6490
|
+
Ll.forEach((i) => {
|
|
6491
|
+
fi(i).subscribe((a) => {
|
|
6502
6492
|
var u, d;
|
|
6503
6493
|
const c = (/* @__PURE__ */ new Date()).toISOString(), l = { ...a };
|
|
6504
6494
|
(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(
|
|
@@ -6521,19 +6511,19 @@ async function vu(s, e, t, r = {}) {
|
|
|
6521
6511
|
lsDriver: d,
|
|
6522
6512
|
httpClient: p,
|
|
6523
6513
|
ops: f
|
|
6524
|
-
} = await
|
|
6525
|
-
plPings: await
|
|
6526
|
-
blockRegistryOverviewChecks: await
|
|
6527
|
-
blockGARegistryOverviewChecks: await
|
|
6528
|
-
blockRegistryUiChecks: await
|
|
6529
|
-
blockGARegistryUiChecks: await
|
|
6530
|
-
autoUpdateCdnChecks: await
|
|
6531
|
-
uploadTemplateCheck: await
|
|
6532
|
-
uploadFileCheck: await
|
|
6533
|
-
downloadFileCheck: await
|
|
6534
|
-
softwareCheck: await
|
|
6535
|
-
pythonSoftwareCheck: await
|
|
6536
|
-
storageToDownloadReport: await
|
|
6514
|
+
} = await $l(s, e, t, r), { filePath: v, fileContent: h } = await Il(), { filePath: y } = await Tl(), E = {
|
|
6515
|
+
plPings: await ul(f, o),
|
|
6516
|
+
blockRegistryOverviewChecks: await dl(f, p),
|
|
6517
|
+
blockGARegistryOverviewChecks: await pl(f, p),
|
|
6518
|
+
blockRegistryUiChecks: await fl(f, p),
|
|
6519
|
+
blockGARegistryUiChecks: await hl(f, p),
|
|
6520
|
+
autoUpdateCdnChecks: await gl(f, p),
|
|
6521
|
+
uploadTemplateCheck: await vl(i, a, "Jack"),
|
|
6522
|
+
uploadFileCheck: await wl(i, c, d, u, a, y),
|
|
6523
|
+
downloadFileCheck: await bl(i, a, d, u, l, v, h),
|
|
6524
|
+
softwareCheck: await Cl(a),
|
|
6525
|
+
pythonSoftwareCheck: await Pl(a, "Jack"),
|
|
6526
|
+
storageToDownloadReport: await Ol(
|
|
6537
6527
|
i,
|
|
6538
6528
|
a,
|
|
6539
6529
|
d,
|
|
@@ -6546,12 +6536,12 @@ async function vu(s, e, t, r = {}) {
|
|
|
6546
6536
|
}
|
|
6547
6537
|
)
|
|
6548
6538
|
};
|
|
6549
|
-
return
|
|
6539
|
+
return Al(E, s, f, n);
|
|
6550
6540
|
} catch (i) {
|
|
6551
6541
|
return `Unhandled error while checking the network: ${i}`;
|
|
6552
6542
|
}
|
|
6553
6543
|
}
|
|
6554
|
-
async function
|
|
6544
|
+
async function $l(s, e, t, r = {}) {
|
|
6555
6545
|
const n = {
|
|
6556
6546
|
pingCheckDurationMs: 1e4,
|
|
6557
6547
|
pingTimeoutMs: 3e3,
|
|
@@ -6574,14 +6564,14 @@ async function Il(s, e, t, r = {}) {
|
|
|
6574
6564
|
everyStorageNFilesToCheck: 300,
|
|
6575
6565
|
everyStorageMinLsRequests: 50,
|
|
6576
6566
|
...r
|
|
6577
|
-
}, i =
|
|
6567
|
+
}, i = _o(s, {
|
|
6578
6568
|
defaultRequestTimeout: n.pingTimeoutMs
|
|
6579
6569
|
});
|
|
6580
6570
|
i.alternativeRoot = `check_network_${ge()}`;
|
|
6581
|
-
const o = new
|
|
6571
|
+
const o = new Cn(i);
|
|
6582
6572
|
let a = {};
|
|
6583
6573
|
e && t && (a = await o.login(e, t));
|
|
6584
|
-
const c = await
|
|
6574
|
+
const c = await kn.init(s, { authInformation: a }), l = o.ll.httpDispatcher, u = new Sn(), d = new Ar("localSecret"), p = On(u, c, []), f = Fn(c, u), v = await Tn.init(
|
|
6585
6575
|
u,
|
|
6586
6576
|
c,
|
|
6587
6577
|
d,
|
|
@@ -6604,7 +6594,7 @@ async function Il(s, e, t, r = {}) {
|
|
|
6604
6594
|
}
|
|
6605
6595
|
};
|
|
6606
6596
|
}
|
|
6607
|
-
function
|
|
6597
|
+
function Al(s, e, t, r) {
|
|
6608
6598
|
const n = s.plPings.filter((y) => y.response.ok), i = s.plPings.filter((y) => !y.response.ok), o = [
|
|
6609
6599
|
...new Set(n.map((y) => JSON.stringify(y.response.value)))
|
|
6610
6600
|
], a = (y) => y ? "OK" : "FAILED", c = (y) => y.status === "ok" ? "OK" : y.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(([y, E]) => `${c(E)} ${y} storage check`).join(`
|
|
@@ -6676,7 +6666,7 @@ ${r.join(`
|
|
|
6676
6666
|
`)}
|
|
6677
6667
|
`;
|
|
6678
6668
|
}
|
|
6679
|
-
const
|
|
6669
|
+
const Ll = [
|
|
6680
6670
|
"undici:request:create",
|
|
6681
6671
|
// When a new request is created
|
|
6682
6672
|
"undici:request:bodySent",
|
|
@@ -6715,34 +6705,34 @@ const Al = [
|
|
|
6715
6705
|
// When a dispatcher retries a request
|
|
6716
6706
|
];
|
|
6717
6707
|
export {
|
|
6718
|
-
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
|
|
6722
|
-
|
|
6723
|
-
|
|
6724
|
-
|
|
6725
|
-
|
|
6726
|
-
|
|
6727
|
-
|
|
6728
|
-
|
|
6729
|
-
|
|
6730
|
-
|
|
6731
|
-
|
|
6732
|
-
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
|
|
6736
|
-
|
|
6737
|
-
|
|
6738
|
-
|
|
6739
|
-
|
|
6740
|
-
|
|
6741
|
-
|
|
6742
|
-
|
|
6743
|
-
|
|
6744
|
-
|
|
6708
|
+
uu as BlockPackRegistry,
|
|
6709
|
+
du as CentralBlockRegistry,
|
|
6710
|
+
so as DefaultDriverKitOpsPaths,
|
|
6711
|
+
ro as DefaultDriverKitOpsSettings,
|
|
6712
|
+
Pc as DefaultMiddleLayerOpsPaths,
|
|
6713
|
+
Rc as DefaultMiddleLayerOpsSettings,
|
|
6714
|
+
Gn as FrontendFromFolderResourceType,
|
|
6715
|
+
Mn as FrontendFromUrlResourceType,
|
|
6716
|
+
co as MiddleLayer,
|
|
6717
|
+
Vr as Project,
|
|
6718
|
+
qi as TengoTemplateGet,
|
|
6719
|
+
_i as TengoTemplateGetRegistry,
|
|
6720
|
+
Hi as TengoTemplateGetTemplate,
|
|
6721
|
+
Ki as TengoTemplateGetTemplateURI,
|
|
6722
|
+
hu as TengoTemplatePack,
|
|
6723
|
+
gu as TengoTemplatePackConvert,
|
|
6724
|
+
vu as TengoTemplatePackConvertTemplate,
|
|
6725
|
+
mu as TengoTemplatePackConvertTemplatePack,
|
|
6726
|
+
fu as V1CentralDevSnapshotRegistry,
|
|
6727
|
+
pu as V1CentralRegistry,
|
|
6728
|
+
ki as V2RegistryProvider,
|
|
6729
|
+
yu as checkNetwork,
|
|
6730
|
+
jr as createRenderTemplate,
|
|
6731
|
+
Nn as getDevV1PacketMtime,
|
|
6732
|
+
Nr as getDevV2PacketMtime,
|
|
6733
|
+
cl as initDriverKit,
|
|
6734
|
+
$l as initNetworkCheck,
|
|
6745
6735
|
ht as loadTemplate,
|
|
6746
|
-
|
|
6736
|
+
Jn as prepareTemplateSpec
|
|
6747
6737
|
};
|
|
6748
6738
|
//# sourceMappingURL=index.mjs.map
|