@milaboratories/pl-middle-layer 1.24.0 → 1.25.1
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/block_registry/watcher.d.ts +13 -5
- package/dist/block_registry/watcher.d.ts.map +1 -1
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1009 -973
- package/dist/index.mjs.map +1 -1
- package/dist/middle_layer/project.d.ts +3 -1
- package/dist/middle_layer/project.d.ts.map +1 -1
- package/dist/middle_layer/project_overview.d.ts.map +1 -1
- package/dist/model/project_model.d.ts +1 -1
- package/dist/model/project_model.d.ts.map +1 -1
- package/dist/mutator/project.d.ts +5 -2
- package/dist/mutator/project.d.ts.map +1 -1
- package/package.json +7 -7
- package/src/block_registry/watcher.ts +101 -69
- package/src/middle_layer/project.ts +10 -1
- package/src/middle_layer/project_overview.ts +24 -4
- package/src/model/project_model.ts +3 -2
- package/src/mutator/project.ts +47 -8
package/dist/index.mjs
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
var ys = Object.defineProperty;
|
|
2
2
|
var ws = (s, e, t) => e in s ? ys(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
3
3
|
var S = (s, e, t) => ws(s, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { mapValueInVOE as Tr, executePSpecPredicate as Ss, mapPObjectData as le, mapPTableDef as
|
|
4
|
+
import { mapValueInVOE as Tr, executePSpecPredicate as Ss, mapPObjectData as le, mapPTableDef as ht, JsRenderInternal as bs, extractConfig as Ar, isConfigLambda as Lr, DefaultNavigationState as Cs, extractAllColumns as Rs } from "@platforma-sdk/model";
|
|
5
5
|
export * from "@platforma-sdk/model";
|
|
6
|
-
import { AnyChannel as
|
|
6
|
+
import { AnyChannel as we, StableChannel as ie, InitialBlockSettings as Gt, blockPackIdToString as Es } from "@milaboratories/pl-model-middle-layer";
|
|
7
7
|
export * from "@milaboratories/pl-model-middle-layer";
|
|
8
|
-
import { request as ae, RetryAgent as
|
|
9
|
-
import { RegistryV1 as ue, tryLoadPackDescription as
|
|
10
|
-
import
|
|
8
|
+
import { request as ae, RetryAgent as ks } from "undici";
|
|
9
|
+
import { RegistryV1 as ue, tryLoadPackDescription as ft, BlockPackMetaEmbedAbsoluteBytes as Ps, RegistryV2Reader as Os, folderReaderByUrl as $s, loadPackDescription as Mt } from "@platforma-sdk/block-tools";
|
|
10
|
+
import z from "node:fs";
|
|
11
11
|
import H from "node:path";
|
|
12
|
-
import
|
|
13
|
-
import { assertNever as
|
|
12
|
+
import Is from "yaml";
|
|
13
|
+
import { assertNever as G, notEmpty as B, ConsoleLoggerAdapter as Fs, ConcurrencyLimitingExecutor as Ts, HmacSha256Signer as Nr } from "@milaboratories/ts-helpers";
|
|
14
14
|
import * as Dr from "node:fs/promises";
|
|
15
|
-
import { tryResolve as
|
|
16
|
-
import { resourceTypesEqual as ce, field as j, Pl as
|
|
15
|
+
import { tryResolve as As } from "@milaboratories/resolve-helper";
|
|
16
|
+
import { resourceTypesEqual as ce, field as j, Pl as L, PlClient as Ls, isNullResourceId as Ke, ensureResourceIdNotNull as gt, isResource as Ns, isResourceRef as Ds, isNotNullResourceId as _t, resourceType as Le, resourceTypeToString as Bs, resourceIdToString as Br, isNotFoundError as js, isTimeoutOrCancelError as xs, toGlobalResourceId as Vs, plAddressToConfig as Us, UnauthenticatedPlClient as Kt } from "@milaboratories/pl-client";
|
|
17
17
|
export * from "@milaboratories/pl-client";
|
|
18
|
-
import { SynchronizedTreeState as jr, PlError as
|
|
19
|
-
import { Computable as V, ChangeSource as Ht, PollComputablePool as
|
|
18
|
+
import { SynchronizedTreeState as jr, PlError as Js, isPlTreeNodeAccessor as Gs } from "@milaboratories/pl-tree";
|
|
19
|
+
import { Computable as V, ChangeSource as Ht, PollComputablePool as Ms, WatchableValue as _s } from "@milaboratories/computable";
|
|
20
20
|
import { randomUUID as Fe, createHash as Ne } from "node:crypto";
|
|
21
|
-
import { parseTemplate as
|
|
21
|
+
import { parseTemplate as Ks, PlTemplateV1 as ne, PlTemplateOverrideV1 as Pe, PlTemplateLibV1 as Be, PlTemplateSoftwareV1 as be } from "@milaboratories/pl-model-backend";
|
|
22
22
|
import xr from "denque";
|
|
23
|
-
import { Templates as
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import { Scope as
|
|
23
|
+
import { Templates as Hs } from "@platforma-sdk/workflow-tengo";
|
|
24
|
+
import re from "canonicalize";
|
|
25
|
+
import Ws from "node:assert";
|
|
26
|
+
import { Scope as mt, getQuickJS as qs } from "quickjs-emscripten";
|
|
27
27
|
import { setTimeout as Vr } from "node:timers/promises";
|
|
28
|
-
import { createDownloadClient as
|
|
29
|
-
import { PFrame as
|
|
30
|
-
import { LRUCache as
|
|
31
|
-
import { channel as
|
|
28
|
+
import { createDownloadClient as Xs, createLogsClient as zs, createUploadBlobClient as Ys, createUploadProgressClient as Qs, DownloadDriver as Zs, UploadDriver as eo, LogsStreamDriver as to, LogsDriver as ro, LsDriver as so, DownloadUrlDriver as oo } from "@milaboratories/pl-drivers";
|
|
29
|
+
import { PFrame as no } from "@milaboratories/pframes-node";
|
|
30
|
+
import { LRUCache as io } from "lru-cache";
|
|
31
|
+
import { channel as ao } from "node:diagnostics_channel";
|
|
32
32
|
async function Wt(s) {
|
|
33
33
|
try {
|
|
34
34
|
return await Dr.stat(s, { bigint: !0 });
|
|
@@ -38,45 +38,45 @@ async function Wt(s) {
|
|
|
38
38
|
throw e;
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
const
|
|
42
|
-
kt,
|
|
41
|
+
const co = [ue.PlPackageYamlConfigFile], lo = [ue.PlPackageJsonConfigFile], Pt = ["backend", "dist", "tengo", "tpl", "main.plj.gz"], Ot = ["config", "dist", "config.json"], Ur = ["frontend", "dist"], qt = "block-model/dist/config.json", uo = "block-ui/package.json", po = [
|
|
43
42
|
Pt,
|
|
44
|
-
|
|
43
|
+
Ot,
|
|
45
44
|
co,
|
|
45
|
+
lo,
|
|
46
46
|
Ur
|
|
47
47
|
];
|
|
48
|
-
async function
|
|
49
|
-
return await Wt(H.join(s, ...
|
|
48
|
+
async function ho(s) {
|
|
49
|
+
return await Wt(H.join(s, ...Ot)) !== void 0 || await Wt(H.join(s, ...Pt)) !== void 0;
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
const t =
|
|
51
|
+
function st(s, e) {
|
|
52
|
+
const t = As(s, e);
|
|
53
53
|
if (t === void 0) throw new Error(`Can't resolve ${e} against ${s}`);
|
|
54
54
|
return t;
|
|
55
55
|
}
|
|
56
56
|
async function Xt(s, e) {
|
|
57
|
-
if (H.isAbsolute(s) || (s = H.resolve(s)), await
|
|
57
|
+
if (H.isAbsolute(s) || (s = H.resolve(s)), await ho(s))
|
|
58
58
|
return {
|
|
59
|
-
workflow: H.join(s, ...
|
|
60
|
-
config: H.join(s, ...
|
|
59
|
+
workflow: H.join(s, ...Pt),
|
|
60
|
+
config: H.join(s, ...Ot),
|
|
61
61
|
ui: H.join(s, ...Ur)
|
|
62
62
|
};
|
|
63
63
|
{
|
|
64
|
-
const t =
|
|
64
|
+
const t = st(s, qt), r = st(s, qt), o = st(s, uo);
|
|
65
65
|
return { workflow: t, config: r, ui: H.resolve(o, "..", "dist") };
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
async function
|
|
68
|
+
async function fo(s) {
|
|
69
69
|
try {
|
|
70
|
-
return await
|
|
70
|
+
return await z.promises.readFile(s, "utf8");
|
|
71
71
|
} catch (e) {
|
|
72
72
|
if (e.code === "ENOENT")
|
|
73
73
|
return;
|
|
74
74
|
throw e;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
async function
|
|
77
|
+
async function go(s) {
|
|
78
78
|
try {
|
|
79
|
-
return await
|
|
79
|
+
return await z.promises.stat(s, { bigint: !0 });
|
|
80
80
|
} catch (e) {
|
|
81
81
|
if (e.code === "ENOENT")
|
|
82
82
|
return;
|
|
@@ -85,19 +85,19 @@ async function fo(s) {
|
|
|
85
85
|
}
|
|
86
86
|
async function Jr(s) {
|
|
87
87
|
let e = 0n;
|
|
88
|
-
for (const t of
|
|
89
|
-
const r = H.join(s, ...t), o = await
|
|
88
|
+
for (const t of po) {
|
|
89
|
+
const r = H.join(s, ...t), o = await go(r);
|
|
90
90
|
o !== void 0 && e < o.mtimeNs && (e = o.mtimeNs);
|
|
91
91
|
}
|
|
92
92
|
return e.toString();
|
|
93
93
|
}
|
|
94
|
-
async function
|
|
95
|
-
const e = await
|
|
94
|
+
async function $t(s) {
|
|
95
|
+
const e = await z.promises.stat(s.components.workflow.main.file, {
|
|
96
96
|
bigint: !0
|
|
97
|
-
}), t = await
|
|
97
|
+
}), t = await z.promises.stat(s.components.model.file, { bigint: !0 });
|
|
98
98
|
return (e.mtimeNs > t.mtimeNs ? e.mtimeNs : t.mtimeNs).toString();
|
|
99
99
|
}
|
|
100
|
-
class
|
|
100
|
+
class Ul {
|
|
101
101
|
constructor(e, t, r) {
|
|
102
102
|
this.v2Provider = e, this.registries = t, this.http = r;
|
|
103
103
|
}
|
|
@@ -110,12 +110,12 @@ class Vl {
|
|
|
110
110
|
o
|
|
111
111
|
)).body.json();
|
|
112
112
|
for (const c of i) {
|
|
113
|
-
const { organization: a, package: l, latestMeta: u, latestVersion: d } = c,
|
|
113
|
+
const { organization: a, package: l, latestMeta: u, latestVersion: d } = c, f = {
|
|
114
114
|
organization: a,
|
|
115
115
|
name: l,
|
|
116
116
|
version: d
|
|
117
117
|
}, h = {
|
|
118
|
-
id:
|
|
118
|
+
id: f,
|
|
119
119
|
meta: {
|
|
120
120
|
title: u.title ?? "No title",
|
|
121
121
|
description: u.description ?? "No Description",
|
|
@@ -126,18 +126,18 @@ class Vl {
|
|
|
126
126
|
},
|
|
127
127
|
spec: {
|
|
128
128
|
type: "from-registry-v1",
|
|
129
|
-
id:
|
|
129
|
+
id: f,
|
|
130
130
|
registryUrl: r.url
|
|
131
131
|
}
|
|
132
132
|
};
|
|
133
133
|
t.push({
|
|
134
134
|
registryId: e.id,
|
|
135
|
-
id:
|
|
135
|
+
id: f,
|
|
136
136
|
latestByChannel: {
|
|
137
|
-
[
|
|
137
|
+
[we]: h,
|
|
138
138
|
[ie]: h
|
|
139
139
|
},
|
|
140
|
-
allVersions: c.allVersions.map((
|
|
140
|
+
allVersions: c.allVersions.map((g) => ({ version: g, channels: [] }))
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
143
|
return t;
|
|
@@ -150,24 +150,24 @@ class Vl {
|
|
|
150
150
|
...c,
|
|
151
151
|
latestByChannel: {
|
|
152
152
|
...c.latestByChannel,
|
|
153
|
-
[ie]: ((a) => a.spec.type === "from-registry-v2" ? { ...a, spec: { ...a.spec, channel: ie } } : a)(c.latestByChannel[
|
|
153
|
+
[ie]: ((a) => a.spec.type === "from-registry-v2" ? { ...a, spec: { ...a.spec, channel: ie } } : a)(c.latestByChannel[we])
|
|
154
154
|
},
|
|
155
155
|
registryId: e.id
|
|
156
156
|
}
|
|
157
157
|
);
|
|
158
158
|
case "local-dev":
|
|
159
|
-
for (const c of await
|
|
159
|
+
for (const c of await z.promises.readdir(r.path, { withFileTypes: !0 })) {
|
|
160
160
|
if (!c.isDirectory()) continue;
|
|
161
|
-
const a = H.join(r.path, c.name), l = await
|
|
161
|
+
const a = H.join(r.path, c.name), l = await fo(
|
|
162
162
|
H.join(a, ue.PlPackageYamlConfigFile)
|
|
163
163
|
);
|
|
164
164
|
if (l !== void 0) {
|
|
165
|
-
const u = ue.PlPackageConfigData.parse(
|
|
165
|
+
const u = ue.PlPackageConfigData.parse(Is.parse(l)), d = await Jr(a), f = {
|
|
166
166
|
organization: u.organization,
|
|
167
167
|
name: u.package,
|
|
168
168
|
version: "DEV"
|
|
169
169
|
}, h = {
|
|
170
|
-
id:
|
|
170
|
+
id: f,
|
|
171
171
|
meta: {
|
|
172
172
|
title: u.meta.title ?? "No title",
|
|
173
173
|
description: u.meta.description ?? "No Description",
|
|
@@ -184,34 +184,34 @@ class Vl {
|
|
|
184
184
|
};
|
|
185
185
|
t.push({
|
|
186
186
|
registryId: e.id,
|
|
187
|
-
id:
|
|
187
|
+
id: f,
|
|
188
188
|
latestByChannel: {
|
|
189
|
-
[
|
|
189
|
+
[we]: h,
|
|
190
190
|
[ie]: h
|
|
191
191
|
},
|
|
192
192
|
allVersions: []
|
|
193
193
|
});
|
|
194
194
|
} else {
|
|
195
|
-
let u = a, d = await
|
|
195
|
+
let u = a, d = await ft(u);
|
|
196
196
|
if (d === void 0) {
|
|
197
|
-
for (const
|
|
198
|
-
if (u = H.join(a,
|
|
197
|
+
for (const f of ["block", "meta"])
|
|
198
|
+
if (u = H.join(a, f), d = await ft(u), d !== void 0) break;
|
|
199
199
|
}
|
|
200
200
|
if (d !== void 0) {
|
|
201
|
-
const
|
|
201
|
+
const f = await $t(d), h = {
|
|
202
202
|
id: d.id,
|
|
203
|
-
meta: await
|
|
203
|
+
meta: await Ps.parseAsync(d.meta),
|
|
204
204
|
spec: {
|
|
205
205
|
type: "dev-v2",
|
|
206
206
|
folder: u,
|
|
207
|
-
mtime:
|
|
207
|
+
mtime: f
|
|
208
208
|
}
|
|
209
209
|
};
|
|
210
210
|
t.push({
|
|
211
211
|
registryId: e.id,
|
|
212
212
|
id: d.id,
|
|
213
213
|
latestByChannel: {
|
|
214
|
-
[
|
|
214
|
+
[we]: h,
|
|
215
215
|
[ie]: h
|
|
216
216
|
},
|
|
217
217
|
allVersions: []
|
|
@@ -221,7 +221,7 @@ class Vl {
|
|
|
221
221
|
}
|
|
222
222
|
return t;
|
|
223
223
|
default:
|
|
224
|
-
return
|
|
224
|
+
return G(r);
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
async listBlockPacks() {
|
|
@@ -241,7 +241,7 @@ class Vl {
|
|
|
241
241
|
return await this.v2Provider.getRegistry(o.url).getSpecificOverview(t, r);
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
|
-
class
|
|
244
|
+
class mo {
|
|
245
245
|
constructor(e) {
|
|
246
246
|
S(this, "registries", /* @__PURE__ */ new Map());
|
|
247
247
|
this.http = e;
|
|
@@ -249,62 +249,62 @@ class go {
|
|
|
249
249
|
getRegistry(e) {
|
|
250
250
|
const t = this.registries.get(e);
|
|
251
251
|
if (t) return t;
|
|
252
|
-
const r = new
|
|
252
|
+
const r = new Os($s(e, this.http));
|
|
253
253
|
return this.registries.set(e, r), r;
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
|
-
const
|
|
256
|
+
const Jl = {
|
|
257
257
|
type: "remote-v2",
|
|
258
258
|
url: "https://blocks.pl-open.science/"
|
|
259
|
-
},
|
|
259
|
+
}, Gl = {
|
|
260
260
|
type: "remote-v1",
|
|
261
261
|
url: "https://block.registry.platforma.bio/releases"
|
|
262
|
-
},
|
|
262
|
+
}, Ml = {
|
|
263
263
|
type: "remote-v1",
|
|
264
264
|
url: "https://block.registry.platforma.bio/dev"
|
|
265
|
-
}, mo = {
|
|
266
|
-
groups: [{ id: "default", label: "Default", blocks: [] }]
|
|
267
265
|
}, vo = {
|
|
266
|
+
groups: [{ id: "default", label: "Default", blocks: [] }]
|
|
267
|
+
}, yo = {
|
|
268
268
|
stagingRefreshTimestamp: 0,
|
|
269
269
|
blocksInLimbo: []
|
|
270
|
-
},
|
|
270
|
+
}, wo = {
|
|
271
271
|
label: "New Project"
|
|
272
|
-
},
|
|
273
|
-
function
|
|
274
|
-
return `${
|
|
272
|
+
}, So = { name: "UserProject", version: "2" }, Gr = "SchemaVersion", Mr = "1", It = "ProjectCreated", Te = "ProjectLastModified", Ae = "ProjectMeta", de = "ProjectStructure", He = "BlockRenderingState", bo = "BlockFrontendState/", Co = /^BlockFrontendState\/(?<blockid>.*)$/;
|
|
273
|
+
function vt(s) {
|
|
274
|
+
return `${bo}${s}`;
|
|
275
275
|
}
|
|
276
276
|
const Ro = "BlockArgsAuthor/";
|
|
277
|
-
function
|
|
277
|
+
function yt(s) {
|
|
278
278
|
return `${Ro}${s}`;
|
|
279
279
|
}
|
|
280
|
-
const
|
|
281
|
-
function
|
|
282
|
-
const e = s.match(
|
|
280
|
+
const wt = "ProjectStructureAuthor";
|
|
281
|
+
function Eo(s) {
|
|
282
|
+
const e = s.match(Co);
|
|
283
283
|
if (e !== null)
|
|
284
284
|
return e.groups.blockid;
|
|
285
285
|
}
|
|
286
|
-
const
|
|
287
|
-
function
|
|
288
|
-
return `${
|
|
286
|
+
const ko = "__serviceTemplate_";
|
|
287
|
+
function St(s) {
|
|
288
|
+
return `${ko}${s}`;
|
|
289
289
|
}
|
|
290
290
|
function U(s, e) {
|
|
291
291
|
return `${s}-${e}`;
|
|
292
292
|
}
|
|
293
|
-
const
|
|
294
|
-
function
|
|
295
|
-
const e = s.match(
|
|
293
|
+
const Po = /^(?<blockId>.*)-(?<fieldName>blockPack|blockSettings|prodArgs|currentArgs|prodCtx|prodUiCtx|prodOutput|prodCtxPrevious|prodUiCtxPrevious|prodOutputPrevious|stagingCtx|stagingUiCtx|stagingOutput|stagingCtxPrevious|stagingUiCtxPrevious|stagingOutputPrevious)$/;
|
|
294
|
+
function Oo(s) {
|
|
295
|
+
const e = s.match(Po);
|
|
296
296
|
if (e === null) return;
|
|
297
297
|
const { blockId: t, fieldName: r } = e.groups;
|
|
298
298
|
return { blockId: t, fieldName: r };
|
|
299
299
|
}
|
|
300
|
-
const
|
|
301
|
-
async function
|
|
300
|
+
const $o = "projects", _r = { name: "Projects", version: "1" }, Io = (s) => ce(s.type, _r) ? s.fields : [];
|
|
301
|
+
async function Fo(s, e, t, r) {
|
|
302
302
|
const o = await jr.init(
|
|
303
303
|
s,
|
|
304
304
|
e,
|
|
305
305
|
{
|
|
306
306
|
...r.ops.defaultTreeOptions,
|
|
307
|
-
pruning:
|
|
307
|
+
pruning: Io
|
|
308
308
|
},
|
|
309
309
|
r.logger
|
|
310
310
|
);
|
|
@@ -315,55 +315,55 @@ async function Io(s, e, t, r) {
|
|
|
315
315
|
for (const u of c.listDynamicFields()) {
|
|
316
316
|
const d = c.traverse(u);
|
|
317
317
|
if (d === void 0) continue;
|
|
318
|
-
const
|
|
318
|
+
const f = B(d.getKeyValueAsJson(Ae)), h = B(d.getKeyValueAsJson(It)), g = B(d.getKeyValueAsJson(Te));
|
|
319
319
|
l.push({
|
|
320
320
|
id: u,
|
|
321
321
|
rid: d.id,
|
|
322
322
|
created: new Date(h),
|
|
323
|
-
lastModified: new Date(
|
|
323
|
+
lastModified: new Date(g),
|
|
324
324
|
opened: a.indexOf(d.id) >= 0,
|
|
325
|
-
meta:
|
|
325
|
+
meta: f
|
|
326
326
|
});
|
|
327
327
|
}
|
|
328
328
|
return l.sort((u) => -u.lastModified.valueOf()), l;
|
|
329
329
|
}).withStableType(), tree: o };
|
|
330
330
|
}
|
|
331
|
-
const
|
|
331
|
+
const To = {
|
|
332
332
|
name: "EphRenderTemplate",
|
|
333
333
|
version: "1"
|
|
334
|
-
},
|
|
334
|
+
}, Ao = {
|
|
335
335
|
name: "RenderTemplate",
|
|
336
336
|
version: "1"
|
|
337
337
|
};
|
|
338
338
|
function Kr(s, e, t, r, o) {
|
|
339
339
|
if (o.length === 0) throw new Error("Zero output names provided");
|
|
340
|
-
const n = t ? s.createEphemeral(
|
|
341
|
-
return s.createField(i, "Input", e), s.createField(c, "Input",
|
|
340
|
+
const n = t ? s.createEphemeral(To) : s.createStruct(Ao), i = j(n, "template"), c = j(n, "inputs");
|
|
341
|
+
return s.createField(i, "Input", e), s.createField(c, "Input", L.createPlMap(s, r, t)), s.lockInputs(n), L.futureRecord(s, n, o, "Output", "outputs/");
|
|
342
342
|
}
|
|
343
|
-
const
|
|
344
|
-
function
|
|
345
|
-
return Kr(s, e, !0, t,
|
|
343
|
+
const Lo = { name: "BContextEnd", version: "1" }, No = { name: "BContext", version: "1" }, Do = "id", Bo = "parent/", jo = ["context", "result"];
|
|
344
|
+
function zt(s, e, t) {
|
|
345
|
+
return Kr(s, e, !0, t, jo);
|
|
346
346
|
}
|
|
347
|
-
function
|
|
348
|
-
const e = s.createEphemeral(
|
|
347
|
+
function xo(s) {
|
|
348
|
+
const e = s.createEphemeral(Lo);
|
|
349
349
|
return s.lock(e), e;
|
|
350
350
|
}
|
|
351
|
-
function
|
|
352
|
-
if (e.length === 0) return
|
|
351
|
+
function Vo(s, e) {
|
|
352
|
+
if (e.length === 0) return xo(s);
|
|
353
353
|
if (e.length === 1) return e[0];
|
|
354
|
-
const t = s.createEphemeral(
|
|
355
|
-
s.createField(j(t,
|
|
354
|
+
const t = s.createEphemeral(No);
|
|
355
|
+
s.createField(j(t, Do), "Input", L.createPlString(s, Fe()));
|
|
356
356
|
for (let r = 0; r < e.length; r++)
|
|
357
|
-
s.createField(j(t, `${
|
|
357
|
+
s.createField(j(t, `${Bo}${r}`), "Input", e[r]);
|
|
358
358
|
return s.lock(t), t;
|
|
359
359
|
}
|
|
360
|
-
function
|
|
361
|
-
const t =
|
|
360
|
+
function Uo(s, e) {
|
|
361
|
+
const t = Ks(e.content), r = t.type;
|
|
362
362
|
switch (r) {
|
|
363
363
|
case "pl.tengo-template.v2":
|
|
364
|
-
return
|
|
364
|
+
return Go(s, t);
|
|
365
365
|
default:
|
|
366
|
-
|
|
366
|
+
G(r);
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
369
|
const Yt = {
|
|
@@ -378,13 +378,13 @@ const Yt = {
|
|
|
378
378
|
}
|
|
379
379
|
}, je = {
|
|
380
380
|
hash(s, e) {
|
|
381
|
-
e.update(
|
|
381
|
+
e.update(be.type.name).update(be.type.version).update(s.name).update(s.version).update(s.src);
|
|
382
382
|
},
|
|
383
383
|
render(s, e, t) {
|
|
384
|
-
const r =
|
|
385
|
-
return e.setKValue(o,
|
|
384
|
+
const r = be.fromV2Data(s), o = e.createStruct(be.type, r.data);
|
|
385
|
+
return e.setKValue(o, be.metaNameKey, JSON.stringify(r.name)), e.lock(o), o;
|
|
386
386
|
}
|
|
387
|
-
},
|
|
387
|
+
}, Jo = {
|
|
388
388
|
hash(s, e) {
|
|
389
389
|
e.update(Pe.type.name).update(Pe.type.version).update(s.hashOverride ?? "");
|
|
390
390
|
},
|
|
@@ -429,11 +429,11 @@ const Yt = {
|
|
|
429
429
|
e.createField(a, "Input"), e.setField(a, t(c, Hr));
|
|
430
430
|
}
|
|
431
431
|
if (e.lock(r), !s.hashOverride) return r;
|
|
432
|
-
const o = t(s,
|
|
432
|
+
const o = t(s, Jo), n = Pe.tplField(o);
|
|
433
433
|
return e.createField(n, "Service"), e.setField(n, r), e.lock(r), o;
|
|
434
434
|
}
|
|
435
435
|
};
|
|
436
|
-
function
|
|
436
|
+
function Go(s, e) {
|
|
437
437
|
const t = /* @__PURE__ */ new Map(), r = (o, n) => {
|
|
438
438
|
const i = Ne("sha256");
|
|
439
439
|
n.hash(o, i);
|
|
@@ -446,43 +446,43 @@ function Jo(s, e) {
|
|
|
446
446
|
};
|
|
447
447
|
return r(e, Hr);
|
|
448
448
|
}
|
|
449
|
-
const
|
|
449
|
+
const Mo = { name: "TengoTemplateGet", version: "1" }, _o = "registry", Ko = "templateURI", Ho = "template", _l = { name: "TengoTemplatePack", version: "1" }, Kl = {
|
|
450
450
|
name: "TengoTemplatePackConvert",
|
|
451
451
|
version: "1"
|
|
452
|
-
},
|
|
453
|
-
async function
|
|
452
|
+
}, Hl = "templatePack", Wl = "template";
|
|
453
|
+
async function Wo(s) {
|
|
454
454
|
switch (s.type) {
|
|
455
455
|
case "from-file":
|
|
456
456
|
return {
|
|
457
457
|
type: "explicit",
|
|
458
|
-
content: await
|
|
458
|
+
content: await z.promises.readFile(s.path)
|
|
459
459
|
};
|
|
460
460
|
case "from-registry":
|
|
461
461
|
case "explicit":
|
|
462
462
|
return s;
|
|
463
463
|
default:
|
|
464
|
-
return
|
|
464
|
+
return G(s);
|
|
465
465
|
}
|
|
466
466
|
}
|
|
467
|
-
function
|
|
468
|
-
const t = s.createStruct(
|
|
469
|
-
return s.setField(r, s.createValue(
|
|
467
|
+
function qo(s, e) {
|
|
468
|
+
const t = s.createStruct(Mo), r = j(t, _o), o = j(t, Ko), n = j(t, Ho);
|
|
469
|
+
return s.setField(r, s.createValue(L.JsonString, Buffer.from(JSON.stringify(e.registry)))), s.setField(o, s.createValue(L.JsonString, Buffer.from(JSON.stringify(e.path)))), n;
|
|
470
470
|
}
|
|
471
|
-
function
|
|
471
|
+
function Ft(s, e) {
|
|
472
472
|
switch (e.type) {
|
|
473
473
|
case "from-registry":
|
|
474
|
-
return
|
|
474
|
+
return qo(s, e);
|
|
475
475
|
case "explicit":
|
|
476
|
-
return
|
|
476
|
+
return Uo(s, e);
|
|
477
477
|
default:
|
|
478
|
-
return
|
|
478
|
+
return G(e);
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
|
-
const Wr = { name: "Frontend/FromUrl", version: "1" },
|
|
481
|
+
const Wr = { name: "Frontend/FromUrl", version: "1" }, qr = {
|
|
482
482
|
name: "Frontend/FromFolder",
|
|
483
483
|
version: "1"
|
|
484
484
|
};
|
|
485
|
-
function
|
|
485
|
+
function Xo(s, e) {
|
|
486
486
|
switch (e.type) {
|
|
487
487
|
case "url":
|
|
488
488
|
return s.createValue(
|
|
@@ -491,21 +491,21 @@ function zo(s, e) {
|
|
|
491
491
|
);
|
|
492
492
|
case "local":
|
|
493
493
|
return s.createValue(
|
|
494
|
-
|
|
494
|
+
qr,
|
|
495
495
|
JSON.stringify({
|
|
496
496
|
path: e.path,
|
|
497
497
|
signature: e.signature
|
|
498
498
|
})
|
|
499
499
|
);
|
|
500
500
|
default:
|
|
501
|
-
return
|
|
501
|
+
return G(e);
|
|
502
502
|
}
|
|
503
503
|
}
|
|
504
|
-
const
|
|
504
|
+
const zo = { name: "BlockPackCustom", version: "1" }, Xr = "template", zr = "frontend";
|
|
505
505
|
function Qt(s) {
|
|
506
506
|
return s.endsWith("/") ? s : `${s}/`;
|
|
507
507
|
}
|
|
508
|
-
class
|
|
508
|
+
class Yo {
|
|
509
509
|
constructor(e, t, r) {
|
|
510
510
|
this.v2RegistryProvider = e, this.signer = t, this.http = r;
|
|
511
511
|
}
|
|
@@ -514,11 +514,11 @@ class qo {
|
|
|
514
514
|
case "explicit":
|
|
515
515
|
return e.config;
|
|
516
516
|
case "dev-v1": {
|
|
517
|
-
const t = await Xt(e.folder), r = await
|
|
517
|
+
const t = await Xt(e.folder), r = await z.promises.readFile(t.config, { encoding: "utf-8" });
|
|
518
518
|
return JSON.parse(r);
|
|
519
519
|
}
|
|
520
520
|
case "dev-v2": {
|
|
521
|
-
const t = await Mt(e.folder), r = await
|
|
521
|
+
const t = await Mt(e.folder), r = await z.promises.readFile(t.components.model.file, {
|
|
522
522
|
encoding: "utf-8"
|
|
523
523
|
});
|
|
524
524
|
return JSON.parse(r);
|
|
@@ -532,7 +532,7 @@ class qo {
|
|
|
532
532
|
return await (await ae(o.model.url, t)).body.json();
|
|
533
533
|
}
|
|
534
534
|
default:
|
|
535
|
-
return
|
|
535
|
+
return G(e);
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
538
|
async prepare(e) {
|
|
@@ -540,8 +540,8 @@ class qo {
|
|
|
540
540
|
case "explicit":
|
|
541
541
|
return e;
|
|
542
542
|
case "dev-v1": {
|
|
543
|
-
const t = await Xt(e.folder), r = await
|
|
544
|
-
await
|
|
543
|
+
const t = await Xt(e.folder), r = await z.promises.readFile(t.workflow), o = JSON.parse(
|
|
544
|
+
await z.promises.readFile(t.config, "utf-8")
|
|
545
545
|
), n = t.ui;
|
|
546
546
|
return {
|
|
547
547
|
type: "explicit",
|
|
@@ -560,13 +560,13 @@ class qo {
|
|
|
560
560
|
}
|
|
561
561
|
case "dev-v2": {
|
|
562
562
|
const t = await Mt(e.folder), r = JSON.parse(
|
|
563
|
-
await
|
|
563
|
+
await z.promises.readFile(t.components.model.file, {
|
|
564
564
|
encoding: "utf-8"
|
|
565
565
|
})
|
|
566
|
-
), o = await
|
|
566
|
+
), o = await z.promises.readFile(
|
|
567
567
|
t.components.workflow.main.file
|
|
568
568
|
), n = t.components.ui.folder, i = { ...e };
|
|
569
|
-
return e.mtime === void 0 && (i.mtime = await
|
|
569
|
+
return e.mtime === void 0 && (i.mtime = await $t(t)), {
|
|
570
570
|
type: "explicit",
|
|
571
571
|
template: {
|
|
572
572
|
type: "explicit",
|
|
@@ -619,29 +619,29 @@ class qo {
|
|
|
619
619
|
};
|
|
620
620
|
}
|
|
621
621
|
default:
|
|
622
|
-
return
|
|
622
|
+
return G(e);
|
|
623
623
|
}
|
|
624
624
|
}
|
|
625
625
|
}
|
|
626
|
-
function
|
|
627
|
-
const t = { config: e.config, source: e.source }, r = s.createStruct(
|
|
628
|
-
return s.createField(j(r, Xr), "Input",
|
|
626
|
+
function Qo(s, e) {
|
|
627
|
+
const t = { config: e.config, source: e.source }, r = s.createStruct(zo, JSON.stringify(t));
|
|
628
|
+
return s.createField(j(r, Xr), "Input", Ft(s, e.template)), s.createField(j(r, zr), "Input", Xo(s, e.frontend)), s.lock(r), r;
|
|
629
629
|
}
|
|
630
630
|
function Zt(s, e) {
|
|
631
631
|
switch (e.type) {
|
|
632
632
|
case "explicit":
|
|
633
|
-
return
|
|
633
|
+
return Qo(s, e);
|
|
634
634
|
default:
|
|
635
|
-
return
|
|
635
|
+
return G(e.type);
|
|
636
636
|
}
|
|
637
637
|
}
|
|
638
638
|
function xe(s, e) {
|
|
639
639
|
return { __isRef: !0, blockId: s, name: e };
|
|
640
640
|
}
|
|
641
|
-
function
|
|
641
|
+
function Zo(s) {
|
|
642
642
|
return typeof s == "object" && s !== null && s.__isRef === !0 && "blockId" in s && "name" in s;
|
|
643
643
|
}
|
|
644
|
-
function
|
|
644
|
+
function bt(s, e, t) {
|
|
645
645
|
const r = typeof e;
|
|
646
646
|
switch (r) {
|
|
647
647
|
case "function":
|
|
@@ -654,21 +654,21 @@ function St(s, e, t) {
|
|
|
654
654
|
return;
|
|
655
655
|
case "object":
|
|
656
656
|
if (e === null) return;
|
|
657
|
-
if (
|
|
657
|
+
if (Zo(e))
|
|
658
658
|
t === void 0 || t.has(e.blockId) ? s.upstreams.add(e.blockId) : s.missingReferences = !0;
|
|
659
659
|
else if (Array.isArray(e))
|
|
660
|
-
for (const o of e)
|
|
660
|
+
for (const o of e) bt(s, o, t);
|
|
661
661
|
else
|
|
662
662
|
for (const [, o] of Object.entries(e))
|
|
663
|
-
|
|
663
|
+
bt(s, o, t);
|
|
664
664
|
return;
|
|
665
665
|
default:
|
|
666
|
-
|
|
666
|
+
G(r);
|
|
667
667
|
}
|
|
668
668
|
}
|
|
669
|
-
function
|
|
669
|
+
function en(s, e) {
|
|
670
670
|
const t = { upstreams: /* @__PURE__ */ new Set(), missingReferences: !1 };
|
|
671
|
-
return
|
|
671
|
+
return bt(t, s, e), t;
|
|
672
672
|
}
|
|
673
673
|
function te(s) {
|
|
674
674
|
return {
|
|
@@ -707,7 +707,7 @@ class Yr {
|
|
|
707
707
|
}
|
|
708
708
|
}
|
|
709
709
|
}
|
|
710
|
-
function
|
|
710
|
+
function Ct(s) {
|
|
711
711
|
const e = /* @__PURE__ */ new Map();
|
|
712
712
|
let t;
|
|
713
713
|
for (const { id: r } of te(s)) {
|
|
@@ -724,7 +724,7 @@ function _e(s, e) {
|
|
|
724
724
|
for (const { id: o } of te(s)) {
|
|
725
725
|
const n = e(o);
|
|
726
726
|
if (n === void 0) continue;
|
|
727
|
-
const i =
|
|
727
|
+
const i = en(n, r), c = {
|
|
728
728
|
id: o,
|
|
729
729
|
missingReferences: i.missingReferences,
|
|
730
730
|
upstream: i.upstreams,
|
|
@@ -735,7 +735,7 @@ function _e(s, e) {
|
|
|
735
735
|
}
|
|
736
736
|
return new Yr(t);
|
|
737
737
|
}
|
|
738
|
-
function
|
|
738
|
+
function tn(s, e) {
|
|
739
739
|
if (s.size !== e.size) return !1;
|
|
740
740
|
for (const t of s) if (!e.has(t)) return !1;
|
|
741
741
|
return !0;
|
|
@@ -749,25 +749,25 @@ function er(s, e) {
|
|
|
749
749
|
const t = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
|
|
750
750
|
return s.nodes.forEach((n) => {
|
|
751
751
|
const i = e.nodes.get(n.id);
|
|
752
|
-
i === void 0 ? t.add(n.id) : (!
|
|
752
|
+
i === void 0 ? t.add(n.id) : (!tn(n.upstream, i.upstream) || Rt(n.upstream, o)) && o.add(n.id);
|
|
753
753
|
}), e.nodes.forEach((n) => {
|
|
754
754
|
s.nodes.has(n.id) ? Rt(n.upstream, o) && o.add(n.id) : r.add(n.id);
|
|
755
755
|
}), { onlyInA: t, onlyInB: r, different: o };
|
|
756
756
|
}
|
|
757
|
-
let
|
|
757
|
+
let ot;
|
|
758
758
|
async function Qr() {
|
|
759
|
-
if (
|
|
760
|
-
const s = await
|
|
759
|
+
if (ot === void 0) {
|
|
760
|
+
const s = await Wo(Hs["pframes.export-pframe"]);
|
|
761
761
|
if (s.type !== "explicit") throw new Error("Unexpected prepared template type.");
|
|
762
762
|
const e = Ne("sha256").update(s.content).digest("hex");
|
|
763
|
-
|
|
763
|
+
ot = { spec: s, hash: e };
|
|
764
764
|
}
|
|
765
|
-
return
|
|
765
|
+
return ot;
|
|
766
766
|
}
|
|
767
|
-
function
|
|
767
|
+
function rn(s, e, t) {
|
|
768
768
|
return Kr(s, e, !0, { pf: t }, ["result"]).result;
|
|
769
769
|
}
|
|
770
|
-
function
|
|
770
|
+
function nt(s, e) {
|
|
771
771
|
let t = !1, r, o;
|
|
772
772
|
return () => {
|
|
773
773
|
if (!t)
|
|
@@ -778,11 +778,11 @@ function ot(s, e) {
|
|
|
778
778
|
}
|
|
779
779
|
class tr {
|
|
780
780
|
constructor(e, t) {
|
|
781
|
-
S(this, "currentInputsC",
|
|
781
|
+
S(this, "currentInputsC", nt(
|
|
782
782
|
() => this.fields.currentArgs.modCount,
|
|
783
783
|
() => JSON.parse(Buffer.from(this.fields.currentArgs.value).toString())
|
|
784
784
|
));
|
|
785
|
-
S(this, "actualProductionInputsC",
|
|
785
|
+
S(this, "actualProductionInputsC", nt(
|
|
786
786
|
() => {
|
|
787
787
|
var e;
|
|
788
788
|
return (e = this.fields.prodArgs) == null ? void 0 : e.modCount;
|
|
@@ -794,7 +794,7 @@ class tr {
|
|
|
794
794
|
return JSON.parse(Buffer.from(e).toString());
|
|
795
795
|
}
|
|
796
796
|
));
|
|
797
|
-
S(this, "productionStaleC",
|
|
797
|
+
S(this, "productionStaleC", nt(
|
|
798
798
|
() => {
|
|
799
799
|
var e;
|
|
800
800
|
return `${this.fields.currentArgs.modCount}_${(e = this.fields.prodArgs) == null ? void 0 : e.modCount}`;
|
|
@@ -839,17 +839,17 @@ class tr {
|
|
|
839
839
|
}
|
|
840
840
|
getTemplate(e) {
|
|
841
841
|
return e.getFutureFieldValue(
|
|
842
|
-
|
|
842
|
+
L.unwrapHolder(e, this.fields.blockPack.ref),
|
|
843
843
|
Xr,
|
|
844
844
|
"Input"
|
|
845
845
|
);
|
|
846
846
|
}
|
|
847
847
|
}
|
|
848
|
-
const
|
|
848
|
+
const sn = (s) => {
|
|
849
849
|
throw new Error(`No new block info for ${s}`);
|
|
850
850
|
};
|
|
851
851
|
class We {
|
|
852
|
-
constructor(e, t, r, o, n, i, c, a, l, u, d,
|
|
852
|
+
constructor(e, t, r, o, n, i, c, a, l, u, d, f) {
|
|
853
853
|
S(this, "globalModCount", 0);
|
|
854
854
|
S(this, "fieldsChanged", !1);
|
|
855
855
|
//
|
|
@@ -868,11 +868,15 @@ class We {
|
|
|
868
868
|
S(this, "stagingGraph");
|
|
869
869
|
S(this, "pendingProductionGraph");
|
|
870
870
|
S(this, "actualProductionGraph");
|
|
871
|
-
this.rid = e, this.tx = t, this.author = r, this.schema = o, this.lastModified = n, this.meta = i, this.struct = c, this.renderingState = a, this.blocksInLimbo = l, this.blockInfos = u, this.blockFrontendStates = d, this.ctxExportTplHolder =
|
|
871
|
+
this.rid = e, this.tx = t, this.author = r, this.schema = o, this.lastModified = n, this.meta = i, this.struct = c, this.renderingState = a, this.blocksInLimbo = l, this.blockInfos = u, this.blockFrontendStates = d, this.ctxExportTplHolder = f;
|
|
872
872
|
}
|
|
873
|
-
|
|
874
|
-
this.blockInfos.forEach((
|
|
875
|
-
(
|
|
873
|
+
fixProblemsAndMigrate() {
|
|
874
|
+
this.blockInfos.forEach((t) => {
|
|
875
|
+
(t.fields.prodArgs === void 0 || t.fields.prodOutput === void 0 || t.fields.prodCtx === void 0) && this.deleteBlockFields(t.id, "prodArgs", "prodOutput", "prodCtx");
|
|
876
|
+
});
|
|
877
|
+
let e;
|
|
878
|
+
this.blockInfos.forEach((t) => {
|
|
879
|
+
t.fields.blockSettings === void 0 && (e === void 0 && (e = this.createJsonFieldValue(Gt)), this.setBlockFieldObj(t.id, "blockSettings", e));
|
|
876
880
|
});
|
|
877
881
|
}
|
|
878
882
|
get wasModified() {
|
|
@@ -882,7 +886,7 @@ class We {
|
|
|
882
886
|
return JSON.parse(JSON.stringify(this.struct));
|
|
883
887
|
}
|
|
884
888
|
getStagingGraph() {
|
|
885
|
-
return this.stagingGraph === void 0 && (this.stagingGraph =
|
|
889
|
+
return this.stagingGraph === void 0 && (this.stagingGraph = Ct(this.struct)), this.stagingGraph;
|
|
886
890
|
}
|
|
887
891
|
getPendingProductionGraph() {
|
|
888
892
|
return this.pendingProductionGraph === void 0 && (this.pendingProductionGraph = _e(
|
|
@@ -900,7 +904,16 @@ class We {
|
|
|
900
904
|
// Generic helpers to interact with project state
|
|
901
905
|
//
|
|
902
906
|
getBlockInfo(e) {
|
|
903
|
-
|
|
907
|
+
const t = this.blockInfos.get(e);
|
|
908
|
+
if (t === void 0) throw new Error(`No such block: ${e}`);
|
|
909
|
+
return t;
|
|
910
|
+
}
|
|
911
|
+
createJsonFieldValueByContent(e) {
|
|
912
|
+
const t = Buffer.from(e);
|
|
913
|
+
return { ref: this.tx.createValue(L.JsonObject, t), value: t, status: "Ready" };
|
|
914
|
+
}
|
|
915
|
+
createJsonFieldValue(e) {
|
|
916
|
+
return this.createJsonFieldValueByContent(JSON.stringify(e));
|
|
904
917
|
}
|
|
905
918
|
getBlock(e) {
|
|
906
919
|
for (const t of te(this.struct)) if (t.id === e) return t;
|
|
@@ -960,7 +973,7 @@ class We {
|
|
|
960
973
|
JSON.parse(o);
|
|
961
974
|
const i = Buffer.from(o);
|
|
962
975
|
if (Buffer.compare(n.fields.currentArgs.value, i) === 0) continue;
|
|
963
|
-
const c = this.tx.createValue(
|
|
976
|
+
const c = this.tx.createValue(L.JsonObject, i);
|
|
964
977
|
this.setBlockField(r, "currentArgs", c, "Ready", i), this.blocksWithChangedInputs.add(r), t.push(r);
|
|
965
978
|
}
|
|
966
979
|
this.getStagingGraph().traverse("downstream", t, ({ id: r }) => this.resetStaging(r)), t.length > 0 && this.updateLastModified();
|
|
@@ -969,6 +982,9 @@ class We {
|
|
|
969
982
|
if (this.blockInfos.get(e) === void 0) throw new Error("no such block");
|
|
970
983
|
this.blockFrontendStates.get(e) !== t && (t === void 0 ? this.blockFrontendStates.delete(e) : this.blockFrontendStates.set(e, t), this.changedBlockFrontendStates.add(e), this.blocksWithChangedInputs.add(e), this.updateLastModified());
|
|
971
984
|
}
|
|
985
|
+
setBlockSettings(e, t) {
|
|
986
|
+
this.setBlockFieldObj(e, "blockSettings", this.createJsonFieldValue(t)), this.updateLastModified();
|
|
987
|
+
}
|
|
972
988
|
/** Update block label */
|
|
973
989
|
// public setBlockLabel(blockId: string, label: string): void {
|
|
974
990
|
// const newStructure = this.structure;
|
|
@@ -989,26 +1005,26 @@ class We {
|
|
|
989
1005
|
const n = this.getBlockInfo(o);
|
|
990
1006
|
if (n.fields[t] === void 0 || n.fields[t].ref === void 0)
|
|
991
1007
|
throw new Error("One of the upstreams staging is not rendered.");
|
|
992
|
-
r.push(
|
|
993
|
-
}),
|
|
1008
|
+
r.push(L.unwrapHolder(this.tx, n.fields[t].ref));
|
|
1009
|
+
}), Vo(this.tx, r);
|
|
994
1010
|
}
|
|
995
1011
|
exportCtx(e) {
|
|
996
|
-
return
|
|
1012
|
+
return rn(this.tx, L.unwrapHolder(this.tx, this.ctxExportTplHolder), e);
|
|
997
1013
|
}
|
|
998
1014
|
renderStagingFor(e) {
|
|
999
1015
|
this.resetStaging(e);
|
|
1000
1016
|
const t = this.getBlockInfo(e), r = this.createCtx(this.getStagingGraph().nodes.get(e).upstream, "stagingCtx");
|
|
1001
1017
|
if (this.getBlock(e).renderingMode !== "Heavy") throw new Error("not supported yet");
|
|
1002
|
-
const o = t.getTemplate(this.tx), n =
|
|
1018
|
+
const o = t.getTemplate(this.tx), n = zt(this.tx, o, {
|
|
1003
1019
|
args: t.fields.currentArgs.ref,
|
|
1004
|
-
blockId: this.tx.createValue(
|
|
1005
|
-
isProduction: this.tx.createValue(
|
|
1020
|
+
blockId: this.tx.createValue(L.JsonString, JSON.stringify(e)),
|
|
1021
|
+
isProduction: this.tx.createValue(L.JsonBool, JSON.stringify(!1)),
|
|
1006
1022
|
context: r
|
|
1007
1023
|
});
|
|
1008
1024
|
this.setBlockField(
|
|
1009
1025
|
e,
|
|
1010
1026
|
"stagingCtx",
|
|
1011
|
-
|
|
1027
|
+
L.wrapInEphHolder(this.tx, n.context),
|
|
1012
1028
|
"NotReady"
|
|
1013
1029
|
), this.setBlockField(e, "stagingUiCtx", this.exportCtx(n.context), "NotReady"), this.setBlockField(e, "stagingOutput", n.result, "NotReady");
|
|
1014
1030
|
}
|
|
@@ -1020,16 +1036,16 @@ class We {
|
|
|
1020
1036
|
);
|
|
1021
1037
|
if (this.getBlock(e).renderingMode === "Light")
|
|
1022
1038
|
throw new Error("Can't render production for light block.");
|
|
1023
|
-
const o = t.getTemplate(this.tx), n =
|
|
1039
|
+
const o = t.getTemplate(this.tx), n = zt(this.tx, o, {
|
|
1024
1040
|
args: t.fields.currentArgs.ref,
|
|
1025
|
-
blockId: this.tx.createValue(
|
|
1026
|
-
isProduction: this.tx.createValue(
|
|
1041
|
+
blockId: this.tx.createValue(L.JsonString, JSON.stringify(e)),
|
|
1042
|
+
isProduction: this.tx.createValue(L.JsonBool, JSON.stringify(!0)),
|
|
1027
1043
|
context: r
|
|
1028
1044
|
});
|
|
1029
1045
|
this.setBlockField(
|
|
1030
1046
|
e,
|
|
1031
1047
|
"prodCtx",
|
|
1032
|
-
|
|
1048
|
+
L.wrapInEphHolder(this.tx, n.context),
|
|
1033
1049
|
"NotReady"
|
|
1034
1050
|
), this.setBlockField(e, "prodUiCtx", this.exportCtx(n.context), "NotReady"), this.setBlockField(e, "prodOutput", n.result, "NotReady"), this.setBlockFieldObj(e, "prodArgs", t.fields.currentArgs), this.blocksInLimbo.delete(e) && (this.renderingStateChanged = !0);
|
|
1035
1051
|
}
|
|
@@ -1037,8 +1053,8 @@ class We {
|
|
|
1037
1053
|
// Structure changes
|
|
1038
1054
|
//
|
|
1039
1055
|
/** Very generic method, better check for more specialized case-specific methods first. */
|
|
1040
|
-
updateStructure(e, t =
|
|
1041
|
-
const r = this.getStagingGraph(), o = this.getActualProductionGraph(), n =
|
|
1056
|
+
updateStructure(e, t = sn) {
|
|
1057
|
+
const r = this.getStagingGraph(), o = this.getActualProductionGraph(), n = Ct(e), i = _e(
|
|
1042
1058
|
e,
|
|
1043
1059
|
(l) => {
|
|
1044
1060
|
var u;
|
|
@@ -1052,10 +1068,12 @@ class We {
|
|
|
1052
1068
|
for (const l of c.onlyInB) {
|
|
1053
1069
|
const u = new tr(l, {});
|
|
1054
1070
|
this.blockInfos.set(l, u);
|
|
1055
|
-
const d = t(l),
|
|
1056
|
-
this.setBlockField(l, "blockPack",
|
|
1057
|
-
|
|
1058
|
-
|
|
1071
|
+
const d = t(l), f = Zt(this.tx, d.blockPack);
|
|
1072
|
+
this.setBlockField(l, "blockPack", L.wrapInHolder(this.tx, f), "NotReady"), this.setBlockFieldObj(
|
|
1073
|
+
l,
|
|
1074
|
+
"blockSettings",
|
|
1075
|
+
this.createJsonFieldValue(Gt)
|
|
1076
|
+
), this.setBlockFieldObj(l, "currentArgs", this.createJsonFieldValueByContent(d.args)), d.uiState && (this.blockFrontendStates.set(l, d.uiState), this.changedBlockFrontendStates.add(l)), u.check();
|
|
1059
1077
|
}
|
|
1060
1078
|
for (const l of c.different) this.resetStaging(l);
|
|
1061
1079
|
o.traverse("downstream", [...a.different], (l) => {
|
|
@@ -1106,7 +1124,7 @@ class We {
|
|
|
1106
1124
|
this.setBlockField(
|
|
1107
1125
|
e,
|
|
1108
1126
|
"blockPack",
|
|
1109
|
-
|
|
1127
|
+
L.wrapInHolder(this.tx, Zt(this.tx, t)),
|
|
1110
1128
|
"NotReady"
|
|
1111
1129
|
), r !== void 0 ? (this.setArgs([{ blockId: e, args: r }]), this.setUiState(e, void 0)) : this.getStagingGraph().traverse("downstream", [e], ({ id: n }) => this.resetStaging(n)), o.productionRendered && this.getActualProductionGraph().traverse(
|
|
1112
1130
|
"downstream",
|
|
@@ -1212,8 +1230,8 @@ class We {
|
|
|
1212
1230
|
assignAuthorMarkers() {
|
|
1213
1231
|
const e = this.author ? JSON.stringify(this.author) : void 0;
|
|
1214
1232
|
for (const t of this.blocksWithChangedInputs)
|
|
1215
|
-
e === void 0 ? this.tx.deleteKValue(this.rid,
|
|
1216
|
-
(this.metaChanged || this.structureChanged) && (e === void 0 ? this.tx.deleteKValue(this.rid,
|
|
1233
|
+
e === void 0 ? this.tx.deleteKValue(this.rid, yt(t)) : this.tx.setKValue(this.rid, yt(t), e);
|
|
1234
|
+
(this.metaChanged || this.structureChanged) && (e === void 0 ? this.tx.deleteKValue(this.rid, wt) : this.tx.setKValue(this.rid, wt, e));
|
|
1217
1235
|
}
|
|
1218
1236
|
save() {
|
|
1219
1237
|
if (this.wasModified) {
|
|
@@ -1227,7 +1245,7 @@ class We {
|
|
|
1227
1245
|
), this.metaChanged && this.tx.setKValue(this.rid, Ae, JSON.stringify(this.meta));
|
|
1228
1246
|
for (const e of this.changedBlockFrontendStates) {
|
|
1229
1247
|
const t = this.blockFrontendStates.get(e);
|
|
1230
|
-
t === void 0 ? this.tx.deleteKValue(this.rid,
|
|
1248
|
+
t === void 0 ? this.tx.deleteKValue(this.rid, vt(e)) : this.tx.setKValue(this.rid, vt(e), t);
|
|
1231
1249
|
}
|
|
1232
1250
|
this.assignAuthorMarkers();
|
|
1233
1251
|
}
|
|
@@ -1235,11 +1253,11 @@ class We {
|
|
|
1235
1253
|
static async load(e, t, r) {
|
|
1236
1254
|
const o = e.getResourceData(t, !0), n = e.getKValueJson(t, Gr), i = e.getKValueJson(t, Te), c = e.getKValueJson(t, Ae), a = e.getKValueJson(t, de), l = e.getKValueJson(t, He), u = e.listKeyValuesString(t), [
|
|
1237
1255
|
d,
|
|
1238
|
-
m,
|
|
1239
|
-
h,
|
|
1240
1256
|
f,
|
|
1241
|
-
|
|
1242
|
-
|
|
1257
|
+
h,
|
|
1258
|
+
g,
|
|
1259
|
+
E,
|
|
1260
|
+
{ stagingRefreshTimestamp: F, blocksInLimbo: N },
|
|
1243
1261
|
_
|
|
1244
1262
|
] = await Promise.all([
|
|
1245
1263
|
o,
|
|
@@ -1250,51 +1268,51 @@ class We {
|
|
|
1250
1268
|
l,
|
|
1251
1269
|
u
|
|
1252
1270
|
]);
|
|
1253
|
-
if (
|
|
1271
|
+
if (f !== Mr)
|
|
1254
1272
|
throw new Error(
|
|
1255
|
-
`Can't act on this project resource because it has a wrong schema version: ${
|
|
1273
|
+
`Can't act on this project resource because it has a wrong schema version: ${f}`
|
|
1256
1274
|
);
|
|
1257
|
-
const
|
|
1275
|
+
const P = /* @__PURE__ */ new Map();
|
|
1258
1276
|
for (const p of d.fields) {
|
|
1259
|
-
const y =
|
|
1277
|
+
const y = Oo(p.name);
|
|
1260
1278
|
if (y === void 0) continue;
|
|
1261
|
-
let
|
|
1262
|
-
|
|
1279
|
+
let m = P.get(y.blockId);
|
|
1280
|
+
m === void 0 && (m = {
|
|
1263
1281
|
id: y.blockId,
|
|
1264
1282
|
fields: {}
|
|
1265
|
-
},
|
|
1283
|
+
}, P.set(y.blockId, m)), m.fields[y.fieldName] = Ke(p.value) ? { modCount: 0 } : { modCount: 0, ref: p.value };
|
|
1266
1284
|
}
|
|
1267
|
-
const se = await Qr(), pe =
|
|
1285
|
+
const se = await Qr(), pe = St(se.hash), A = d.fields.find(
|
|
1268
1286
|
(p) => p.name === pe
|
|
1269
1287
|
);
|
|
1270
|
-
let
|
|
1271
|
-
A !== void 0 ?
|
|
1272
|
-
j(t,
|
|
1288
|
+
let q;
|
|
1289
|
+
A !== void 0 ? q = gt(A.value) : (q = L.wrapInHolder(e, Ft(e, se.spec)), e.createField(
|
|
1290
|
+
j(t, St(se.hash)),
|
|
1273
1291
|
"Dynamic",
|
|
1274
|
-
|
|
1292
|
+
q
|
|
1275
1293
|
));
|
|
1276
|
-
const oe = { stagingRefreshTimestamp: F }, K = new Set(
|
|
1294
|
+
const oe = { stagingRefreshTimestamp: F }, K = new Set(N), J = /* @__PURE__ */ new Map();
|
|
1277
1295
|
for (const p of _) {
|
|
1278
|
-
const y =
|
|
1279
|
-
y !== void 0 &&
|
|
1296
|
+
const y = Eo(p.key);
|
|
1297
|
+
y !== void 0 && J.set(y, p.value);
|
|
1280
1298
|
}
|
|
1281
1299
|
const x = [];
|
|
1282
|
-
|
|
1283
|
-
for (const [,
|
|
1284
|
-
if (
|
|
1285
|
-
if (!
|
|
1300
|
+
P.forEach(({ id: p, fields: y }) => {
|
|
1301
|
+
for (const [, m] of Object.entries(y))
|
|
1302
|
+
if (m.ref !== void 0) {
|
|
1303
|
+
if (!Ns(m.ref) || Ds(m.ref))
|
|
1286
1304
|
throw new Error("unexpected behaviour");
|
|
1287
|
-
x.push([
|
|
1305
|
+
x.push([m, e.getResourceData(m.ref, !1)]);
|
|
1288
1306
|
}
|
|
1289
1307
|
});
|
|
1290
1308
|
for (const [p, y] of x) {
|
|
1291
|
-
const
|
|
1292
|
-
p.value =
|
|
1309
|
+
const m = await y;
|
|
1310
|
+
p.value = m.data, _t(m.error) ? p.status = "Error" : m.resourceReady || _t(m.originalResourceId) ? p.status = "Ready" : p.status = "NotReady";
|
|
1293
1311
|
}
|
|
1294
1312
|
const X = /* @__PURE__ */ new Map();
|
|
1295
|
-
|
|
1313
|
+
P.forEach(({ id: p, fields: y }) => X.set(p, new tr(p, y)));
|
|
1296
1314
|
const he = /* @__PURE__ */ new Set();
|
|
1297
|
-
for (const p of te(
|
|
1315
|
+
for (const p of te(E)) {
|
|
1298
1316
|
if (!X.has(p.id))
|
|
1299
1317
|
throw new Error(`Inconsistent project structure: no inputs for ${p.id}`);
|
|
1300
1318
|
he.add(p.id);
|
|
@@ -1308,36 +1326,36 @@ class We {
|
|
|
1308
1326
|
t,
|
|
1309
1327
|
e,
|
|
1310
1328
|
r,
|
|
1311
|
-
m,
|
|
1312
|
-
h,
|
|
1313
1329
|
f,
|
|
1314
|
-
|
|
1330
|
+
h,
|
|
1331
|
+
g,
|
|
1332
|
+
E,
|
|
1315
1333
|
oe,
|
|
1316
1334
|
K,
|
|
1317
1335
|
X,
|
|
1318
|
-
|
|
1319
|
-
|
|
1336
|
+
J,
|
|
1337
|
+
q
|
|
1320
1338
|
);
|
|
1321
|
-
return v.
|
|
1339
|
+
return v.fixProblemsAndMigrate(), v;
|
|
1322
1340
|
}
|
|
1323
1341
|
}
|
|
1324
|
-
async function
|
|
1325
|
-
const t = s.createEphemeral(
|
|
1342
|
+
async function on(s, e = wo) {
|
|
1343
|
+
const t = s.createEphemeral(So);
|
|
1326
1344
|
s.lock(t);
|
|
1327
1345
|
const r = String(Date.now());
|
|
1328
|
-
s.setKValue(t, Gr, JSON.stringify(Mr)), s.setKValue(t,
|
|
1346
|
+
s.setKValue(t, Gr, JSON.stringify(Mr)), s.setKValue(t, It, r), s.setKValue(t, Te, r), s.setKValue(t, Ae, JSON.stringify(e)), s.setKValue(t, de, JSON.stringify(vo)), s.setKValue(t, He, JSON.stringify(yo));
|
|
1329
1347
|
const o = await Qr();
|
|
1330
1348
|
return s.createField(
|
|
1331
|
-
j(t,
|
|
1349
|
+
j(t, St(o.hash)),
|
|
1332
1350
|
"Dynamic",
|
|
1333
|
-
|
|
1351
|
+
L.wrapInHolder(s, Ft(s, o.spec))
|
|
1334
1352
|
), t;
|
|
1335
1353
|
}
|
|
1336
|
-
async function
|
|
1337
|
-
return
|
|
1354
|
+
async function it(s, e, t) {
|
|
1355
|
+
return Y(s, e, void 0, t);
|
|
1338
1356
|
}
|
|
1339
|
-
async function
|
|
1340
|
-
if (s instanceof
|
|
1357
|
+
async function Y(s, e, t, r) {
|
|
1358
|
+
if (s instanceof Ls)
|
|
1341
1359
|
return await s.withWriteTx("ProjectAction", async (o) => {
|
|
1342
1360
|
const n = await We.load(o, e, t), i = await r(n);
|
|
1343
1361
|
return n.wasModified && (n.save(), await o.commit()), i;
|
|
@@ -1347,7 +1365,7 @@ async function ee(s, e, t, r) {
|
|
|
1347
1365
|
return o.save(), n;
|
|
1348
1366
|
}
|
|
1349
1367
|
}
|
|
1350
|
-
function*
|
|
1368
|
+
function* nn(s) {
|
|
1351
1369
|
switch (s.type) {
|
|
1352
1370
|
case "Json":
|
|
1353
1371
|
return;
|
|
@@ -1359,7 +1377,7 @@ function* on(s) {
|
|
|
1359
1377
|
yield e, yield t;
|
|
1360
1378
|
return;
|
|
1361
1379
|
default:
|
|
1362
|
-
|
|
1380
|
+
G(s);
|
|
1363
1381
|
}
|
|
1364
1382
|
}
|
|
1365
1383
|
function rr(s, e) {
|
|
@@ -1367,7 +1385,7 @@ function rr(s, e) {
|
|
|
1367
1385
|
Object.entries(s).map(([t, r]) => [t, e(r, t)])
|
|
1368
1386
|
);
|
|
1369
1387
|
}
|
|
1370
|
-
function
|
|
1388
|
+
function an(s, e) {
|
|
1371
1389
|
switch (s.type) {
|
|
1372
1390
|
case "Json":
|
|
1373
1391
|
return { ...s };
|
|
@@ -1382,29 +1400,29 @@ function nn(s, e) {
|
|
|
1382
1400
|
}))
|
|
1383
1401
|
};
|
|
1384
1402
|
default:
|
|
1385
|
-
|
|
1403
|
+
G(s);
|
|
1386
1404
|
}
|
|
1387
1405
|
}
|
|
1388
|
-
const
|
|
1406
|
+
const cn = Le("PColumnData/JsonPartitioned", "1"), ln = Le(
|
|
1389
1407
|
"PColumnData/Partitioned/JsonPartitioned",
|
|
1390
1408
|
"1"
|
|
1391
|
-
),
|
|
1409
|
+
), un = Le("PColumnData/BinaryPartitioned", "1"), dn = Le(
|
|
1392
1410
|
"PColumnData/Partitioned/BinaryPartitioned",
|
|
1393
1411
|
"1"
|
|
1394
|
-
),
|
|
1395
|
-
function
|
|
1412
|
+
), pn = Le("PColumnData/Json", "1");
|
|
1413
|
+
function hn(s) {
|
|
1396
1414
|
if (!s.getIsReadyOrError()) throw new Error("Data not ready.");
|
|
1397
1415
|
const e = s.getDataAsJson();
|
|
1398
1416
|
if (e === void 0)
|
|
1399
1417
|
throw new Error("unexpected data info structure, no resource data");
|
|
1400
|
-
if (ce(s.resourceType,
|
|
1418
|
+
if (ce(s.resourceType, pn)) {
|
|
1401
1419
|
const t = e;
|
|
1402
1420
|
return {
|
|
1403
1421
|
type: "Json",
|
|
1404
1422
|
keyLength: t.keyLength,
|
|
1405
1423
|
data: t.data
|
|
1406
1424
|
};
|
|
1407
|
-
} else if (ce(s.resourceType,
|
|
1425
|
+
} else if (ce(s.resourceType, cn)) {
|
|
1408
1426
|
const t = e, r = Object.fromEntries(
|
|
1409
1427
|
s.listInputFields().map((o) => [o, s.traverse({ field: o, errorIfFieldNotSet: !0 }).resourceInfo])
|
|
1410
1428
|
);
|
|
@@ -1413,7 +1431,7 @@ function pn(s) {
|
|
|
1413
1431
|
partitionKeyLength: t.partitionKeyLength,
|
|
1414
1432
|
parts: r
|
|
1415
1433
|
};
|
|
1416
|
-
} else if (ce(s.resourceType,
|
|
1434
|
+
} else if (ce(s.resourceType, ln)) {
|
|
1417
1435
|
const t = e, r = {};
|
|
1418
1436
|
for (const o of s.listInputFields()) {
|
|
1419
1437
|
const n = s.traverse({ field: o, errorIfFieldNotSet: !0 }), i = n.listInputFields();
|
|
@@ -1428,7 +1446,7 @@ function pn(s) {
|
|
|
1428
1446
|
partitionKeyLength: t.superPartitionKeyLength + t.partitionKeyLength,
|
|
1429
1447
|
parts: r
|
|
1430
1448
|
};
|
|
1431
|
-
} else if (ce(s.resourceType,
|
|
1449
|
+
} else if (ce(s.resourceType, un)) {
|
|
1432
1450
|
const t = e, r = {};
|
|
1433
1451
|
for (const o of s.listInputFields())
|
|
1434
1452
|
if (o.endsWith(".index")) {
|
|
@@ -1449,7 +1467,7 @@ function pn(s) {
|
|
|
1449
1467
|
partitionKeyLength: t.partitionKeyLength,
|
|
1450
1468
|
parts: r
|
|
1451
1469
|
};
|
|
1452
|
-
} else if (ce(s.resourceType,
|
|
1470
|
+
} else if (ce(s.resourceType, dn)) {
|
|
1453
1471
|
const t = e, r = {};
|
|
1454
1472
|
for (const o of s.listInputFields()) {
|
|
1455
1473
|
const n = s.traverse({ field: o, errorIfFieldNotSet: !0 }), i = n.listInputFields();
|
|
@@ -1477,9 +1495,9 @@ function pn(s) {
|
|
|
1477
1495
|
parts: r
|
|
1478
1496
|
};
|
|
1479
1497
|
}
|
|
1480
|
-
throw new Error(`unsupported resource type: ${
|
|
1498
|
+
throw new Error(`unsupported resource type: ${Bs(s.resourceType)}`);
|
|
1481
1499
|
}
|
|
1482
|
-
function
|
|
1500
|
+
function fn(s, e) {
|
|
1483
1501
|
const t = s.axesSpec.length, r = {};
|
|
1484
1502
|
for (const { key: o, val: n } of e) {
|
|
1485
1503
|
if (o.length !== t)
|
|
@@ -1492,15 +1510,15 @@ function hn(s, e) {
|
|
|
1492
1510
|
data: r
|
|
1493
1511
|
};
|
|
1494
1512
|
}
|
|
1495
|
-
function
|
|
1513
|
+
function gn(s, e) {
|
|
1496
1514
|
const t = Ne("sha256");
|
|
1497
|
-
return t.update(
|
|
1515
|
+
return t.update(re(s)), t.update(String(Ke(e.originalId) ? e.id : e.originalId)), t.digest().toString("hex");
|
|
1498
1516
|
}
|
|
1499
1517
|
function sr(s, e) {
|
|
1500
|
-
return
|
|
1518
|
+
return re({ __isRef: !0, blockId: s, name: e });
|
|
1501
1519
|
}
|
|
1502
|
-
function
|
|
1503
|
-
return
|
|
1520
|
+
function mn(s, e) {
|
|
1521
|
+
return re({ resolvePath: s, name: e });
|
|
1504
1522
|
}
|
|
1505
1523
|
function Zr(s, e = !0, t = !1, r = "") {
|
|
1506
1524
|
var c, a, l;
|
|
@@ -1511,24 +1529,24 @@ function Zr(s, e = !0, t = !1, r = "") {
|
|
|
1511
1529
|
if (e) throw new Error(`unexpected field name ${u}`);
|
|
1512
1530
|
continue;
|
|
1513
1531
|
}
|
|
1514
|
-
let
|
|
1515
|
-
if (!
|
|
1532
|
+
let f = B((c = d.groups) == null ? void 0 : c.name);
|
|
1533
|
+
if (!f.startsWith(r)) {
|
|
1516
1534
|
if (e) throw new Error(`unexpected field name ${u}`);
|
|
1517
1535
|
continue;
|
|
1518
1536
|
}
|
|
1519
|
-
|
|
1537
|
+
f = f.slice(r.length);
|
|
1520
1538
|
const h = B((a = d.groups) == null ? void 0 : a.type);
|
|
1521
|
-
let
|
|
1522
|
-
switch (
|
|
1539
|
+
let g = n.get(f);
|
|
1540
|
+
switch (g === void 0 && (g = {}, n.set(f, g)), h) {
|
|
1523
1541
|
case "spec":
|
|
1524
|
-
|
|
1542
|
+
g.spec = (l = s.traverse({
|
|
1525
1543
|
field: u,
|
|
1526
1544
|
ignoreError: t,
|
|
1527
1545
|
pureFieldErrorToUndefined: t
|
|
1528
1546
|
})) == null ? void 0 : l.getDataAsJson();
|
|
1529
1547
|
break;
|
|
1530
1548
|
case "data":
|
|
1531
|
-
|
|
1549
|
+
g.hasData = !0, g.data = () => s.traverseOrError({
|
|
1532
1550
|
field: u,
|
|
1533
1551
|
ignoreError: t
|
|
1534
1552
|
});
|
|
@@ -1541,10 +1559,10 @@ function Zr(s, e = !0, t = !1, r = "") {
|
|
|
1541
1559
|
for (const [, u] of n) u.data === void 0 && (u.hasData = !1);
|
|
1542
1560
|
return { locked: i, results: n };
|
|
1543
1561
|
}
|
|
1544
|
-
function
|
|
1562
|
+
function vn(s, e = !0, t = "", r) {
|
|
1545
1563
|
if (!s.getIsReadyOrError()) throw new Error("resource is not ready");
|
|
1546
1564
|
const o = Zr(s, e, !1, t);
|
|
1547
|
-
|
|
1565
|
+
Ws(o.locked);
|
|
1548
1566
|
const n = {};
|
|
1549
1567
|
for (const [i, c] of o.results) {
|
|
1550
1568
|
if (c.spec === void 0) throw new Error(`no spec for key ${i}`);
|
|
@@ -1552,16 +1570,16 @@ function mn(s, e = !0, t = "", r) {
|
|
|
1552
1570
|
throw new Error(`no data for key ${i}`);
|
|
1553
1571
|
const a = c.data();
|
|
1554
1572
|
if (a === void 0) throw new Error(`no data for key ${i}`);
|
|
1555
|
-
if (!a.ok) throw new
|
|
1573
|
+
if (!a.ok) throw new Js(a.error);
|
|
1556
1574
|
n[i] = {
|
|
1557
|
-
id: r.length === 0 ?
|
|
1575
|
+
id: r.length === 0 ? gn(c.spec, a.value) : mn(r, i),
|
|
1558
1576
|
spec: c.spec,
|
|
1559
1577
|
data: a.value
|
|
1560
1578
|
};
|
|
1561
1579
|
}
|
|
1562
1580
|
return n;
|
|
1563
1581
|
}
|
|
1564
|
-
class
|
|
1582
|
+
class Tt {
|
|
1565
1583
|
constructor(e, t) {
|
|
1566
1584
|
S(this, "allSpecsAvailable");
|
|
1567
1585
|
this.ctx = e, this.blocks = t;
|
|
@@ -1700,7 +1718,7 @@ class Ft {
|
|
|
1700
1718
|
return t;
|
|
1701
1719
|
}
|
|
1702
1720
|
static create(e, t, r) {
|
|
1703
|
-
const o = e.accessor(t).node(), n = B(o.getKeyValueAsJson(de)), c =
|
|
1721
|
+
const o = e.accessor(t).node(), n = B(o.getKeyValueAsJson(de)), c = Ct(n).traverseIds("upstream", r), a = /* @__PURE__ */ new Map();
|
|
1704
1722
|
for (const l of te(n)) {
|
|
1705
1723
|
if (!c.has(l.id)) continue;
|
|
1706
1724
|
const u = or(
|
|
@@ -1726,7 +1744,7 @@ class Ft {
|
|
|
1726
1744
|
);
|
|
1727
1745
|
a.set(l.id, { info: l, prod: u, staging: d });
|
|
1728
1746
|
}
|
|
1729
|
-
return new
|
|
1747
|
+
return new Tt(e, a);
|
|
1730
1748
|
}
|
|
1731
1749
|
}
|
|
1732
1750
|
function or(s, e) {
|
|
@@ -1734,7 +1752,7 @@ function or(s, e) {
|
|
|
1734
1752
|
return s ? { locked: !1, results: /* @__PURE__ */ new Map() } : void 0;
|
|
1735
1753
|
if (e.ok) return Zr(e.value, !1, !0);
|
|
1736
1754
|
}
|
|
1737
|
-
function
|
|
1755
|
+
function At(s, e) {
|
|
1738
1756
|
return {
|
|
1739
1757
|
blockId: e,
|
|
1740
1758
|
args: (o) => B(
|
|
@@ -1743,7 +1761,7 @@ function Tt(s, e) {
|
|
|
1743
1761
|
errorIfFieldNotSet: !0
|
|
1744
1762
|
}).getDataAsString()
|
|
1745
1763
|
),
|
|
1746
|
-
uiState: (o) => o.accessor(s).node().getKeyValueAsString(
|
|
1764
|
+
uiState: (o) => o.accessor(s).node().getKeyValueAsString(vt(e)),
|
|
1747
1765
|
blockMeta: (o) => {
|
|
1748
1766
|
const n = o.accessor(s).node(), i = B(n.getKeyValueAsJson(de)), c = /* @__PURE__ */ new Map();
|
|
1749
1767
|
for (const a of te(i)) c.set(a.id, a);
|
|
@@ -1753,7 +1771,7 @@ function Tt(s, e) {
|
|
|
1753
1771
|
}
|
|
1754
1772
|
function es(s, e) {
|
|
1755
1773
|
return {
|
|
1756
|
-
...
|
|
1774
|
+
...At(s, e),
|
|
1757
1775
|
prod: (t) => {
|
|
1758
1776
|
var r;
|
|
1759
1777
|
return (r = t.accessor(s).node({ ignoreError: !0 }).traverse({
|
|
@@ -1770,7 +1788,7 @@ function es(s, e) {
|
|
|
1770
1788
|
})) == null ? void 0 : o.persist();
|
|
1771
1789
|
return r === void 0 && t.markUnstable("staging_not_rendered"), r;
|
|
1772
1790
|
},
|
|
1773
|
-
getResultsPool: (t) =>
|
|
1791
|
+
getResultsPool: (t) => Tt.create(t, s, e)
|
|
1774
1792
|
};
|
|
1775
1793
|
}
|
|
1776
1794
|
function* W(s, e) {
|
|
@@ -1820,10 +1838,10 @@ function* W(s, e) {
|
|
|
1820
1838
|
yield* W(s.operand1), yield* W(s.operand2);
|
|
1821
1839
|
return;
|
|
1822
1840
|
default:
|
|
1823
|
-
|
|
1841
|
+
G(s);
|
|
1824
1842
|
}
|
|
1825
1843
|
}
|
|
1826
|
-
function
|
|
1844
|
+
function yn(s, e) {
|
|
1827
1845
|
const t = {};
|
|
1828
1846
|
for (const [r, o] of Object.entries(s)) t[r] = e(o);
|
|
1829
1847
|
return t;
|
|
@@ -1831,7 +1849,7 @@ function vn(s, e) {
|
|
|
1831
1849
|
function Oe(s, e) {
|
|
1832
1850
|
return s === void 0 ? void 0 : e(s);
|
|
1833
1851
|
}
|
|
1834
|
-
function
|
|
1852
|
+
function wn(s) {
|
|
1835
1853
|
switch (s.type) {
|
|
1836
1854
|
case "GetImportProgress":
|
|
1837
1855
|
return !0;
|
|
@@ -1839,8 +1857,8 @@ function yn(s) {
|
|
|
1839
1857
|
return !1;
|
|
1840
1858
|
}
|
|
1841
1859
|
}
|
|
1842
|
-
function
|
|
1843
|
-
for (const e of W(s)) if (
|
|
1860
|
+
function Sn(s) {
|
|
1861
|
+
for (const e of W(s)) if (wn(e)) return !0;
|
|
1844
1862
|
return !1;
|
|
1845
1863
|
}
|
|
1846
1864
|
function Xe(s) {
|
|
@@ -1849,23 +1867,23 @@ function Xe(s) {
|
|
|
1849
1867
|
result: s
|
|
1850
1868
|
};
|
|
1851
1869
|
}
|
|
1852
|
-
function
|
|
1870
|
+
function k(s) {
|
|
1853
1871
|
return () => Xe(s);
|
|
1854
1872
|
}
|
|
1855
|
-
const
|
|
1873
|
+
const bn = (s) => {
|
|
1856
1874
|
const e = {};
|
|
1857
1875
|
for (const [t, r] of Object.entries(s)) e[t] = r;
|
|
1858
|
-
return
|
|
1859
|
-
},
|
|
1876
|
+
return k(e);
|
|
1877
|
+
}, Cn = (s) => {
|
|
1860
1878
|
const e = s.source;
|
|
1861
|
-
if (e === void 0) return
|
|
1879
|
+
if (e === void 0) return k(void 0);
|
|
1862
1880
|
const t = [];
|
|
1863
1881
|
for (const r of e)
|
|
1864
1882
|
r instanceof Array ? t.push(...r) : t.push(r);
|
|
1865
|
-
return
|
|
1883
|
+
return k(t);
|
|
1866
1884
|
}, Rn = (s) => {
|
|
1867
1885
|
const e = s.source, t = s.field;
|
|
1868
|
-
return e === void 0 || t === void 0 ?
|
|
1886
|
+
return e === void 0 || t === void 0 ? k(void 0) : ({ cCtx: r }) => {
|
|
1869
1887
|
var o;
|
|
1870
1888
|
return Xe((o = r.accessor(e).node().traverse(t)) == null ? void 0 : o.persist());
|
|
1871
1889
|
};
|
|
@@ -1875,13 +1893,13 @@ function ts(s, e) {
|
|
|
1875
1893
|
for (let o = 0; o < r; o++) t[String(o)] = e(s[o]);
|
|
1876
1894
|
return t;
|
|
1877
1895
|
}
|
|
1878
|
-
function
|
|
1896
|
+
function En(s, e) {
|
|
1879
1897
|
return (t) => {
|
|
1880
1898
|
const r = t.source;
|
|
1881
|
-
return r === void 0 ?
|
|
1899
|
+
return r === void 0 ? k(void 0) : () => ({
|
|
1882
1900
|
type: "ScheduleSubroutine",
|
|
1883
1901
|
subroutine: rs(r.length),
|
|
1884
|
-
args: ts(r, (o) =>
|
|
1902
|
+
args: ts(r, (o) => $({ ...s, [e.itVar]: o }, e.mapping))
|
|
1885
1903
|
});
|
|
1886
1904
|
};
|
|
1887
1905
|
}
|
|
@@ -1889,71 +1907,71 @@ function rs(s) {
|
|
|
1889
1907
|
return (e) => {
|
|
1890
1908
|
const t = [];
|
|
1891
1909
|
for (let r = 0; r < s; r++) t.push(e[String(r)]);
|
|
1892
|
-
return
|
|
1910
|
+
return k(t);
|
|
1893
1911
|
};
|
|
1894
1912
|
}
|
|
1895
|
-
function
|
|
1913
|
+
function kn(s, e) {
|
|
1896
1914
|
return (t) => {
|
|
1897
1915
|
const r = t.source;
|
|
1898
|
-
if (r === void 0) return
|
|
1916
|
+
if (r === void 0) return k(void 0);
|
|
1899
1917
|
const o = {};
|
|
1900
1918
|
for (const [n, i] of Object.entries(r)) {
|
|
1901
1919
|
const c = { ...s, [e.itVar]: i };
|
|
1902
|
-
o[n] =
|
|
1920
|
+
o[n] = $(c, e.mapping);
|
|
1903
1921
|
}
|
|
1904
1922
|
return () => ({
|
|
1905
1923
|
type: "ScheduleSubroutine",
|
|
1906
|
-
subroutine:
|
|
1924
|
+
subroutine: Pn,
|
|
1907
1925
|
args: o
|
|
1908
1926
|
});
|
|
1909
1927
|
};
|
|
1910
1928
|
}
|
|
1911
|
-
const
|
|
1929
|
+
const Pn = (s) => k(s), On = (s) => {
|
|
1912
1930
|
const e = s.arg;
|
|
1913
|
-
return
|
|
1914
|
-
}, On = (s) => {
|
|
1915
|
-
const e = s.operand;
|
|
1916
|
-
return E(e === void 0 ? void 0 : !e);
|
|
1931
|
+
return k(e === void 0 ? void 0 : e.length === 0);
|
|
1917
1932
|
}, $n = (s) => {
|
|
1918
|
-
const e = s.
|
|
1919
|
-
return
|
|
1933
|
+
const e = s.operand;
|
|
1934
|
+
return k(e === void 0 ? void 0 : !e);
|
|
1920
1935
|
}, In = (s) => {
|
|
1921
1936
|
const e = s.operand1, t = s.operand2;
|
|
1922
|
-
return
|
|
1937
|
+
return k(e === void 0 || t === void 0 ? void 0 : e && t);
|
|
1923
1938
|
}, Fn = (s) => {
|
|
1939
|
+
const e = s.operand1, t = s.operand2;
|
|
1940
|
+
return k(e === void 0 || t === void 0 ? void 0 : e || t);
|
|
1941
|
+
}, Tn = (s) => {
|
|
1924
1942
|
const e = s.source;
|
|
1925
|
-
return e === void 0 ?
|
|
1943
|
+
return e === void 0 ? k(void 0) : ({ cCtx: t }) => {
|
|
1926
1944
|
var r;
|
|
1927
1945
|
return Xe((r = t.accessor(e).node()) == null ? void 0 : r.getDataAsJson());
|
|
1928
1946
|
};
|
|
1929
|
-
},
|
|
1947
|
+
}, An = (s) => {
|
|
1930
1948
|
const e = s.source, t = s.field;
|
|
1931
|
-
return
|
|
1949
|
+
return k(e === void 0 || t === void 0 ? void 0 : e[t]);
|
|
1932
1950
|
};
|
|
1933
|
-
function
|
|
1951
|
+
function Ln(s, e) {
|
|
1934
1952
|
return (t) => {
|
|
1935
1953
|
const r = t.source;
|
|
1936
|
-
return r === void 0 ?
|
|
1954
|
+
return r === void 0 ? k(void 0) : ({ cCtx: o }) => {
|
|
1937
1955
|
const n = o.accessor(r).node(), i = {};
|
|
1938
1956
|
for (const c of n.listInputFields()) {
|
|
1939
1957
|
const a = n.traverse(c);
|
|
1940
|
-
if (a === void 0) i[c] =
|
|
1958
|
+
if (a === void 0) i[c] = k(void 0);
|
|
1941
1959
|
else {
|
|
1942
1960
|
const l = { ...s, [e.itVar]: a.persist() };
|
|
1943
|
-
i[c] =
|
|
1961
|
+
i[c] = $(l, e.mapping);
|
|
1944
1962
|
}
|
|
1945
1963
|
}
|
|
1946
1964
|
return {
|
|
1947
1965
|
type: "ScheduleSubroutine",
|
|
1948
|
-
subroutine:
|
|
1966
|
+
subroutine: Nn,
|
|
1949
1967
|
args: i
|
|
1950
1968
|
};
|
|
1951
1969
|
};
|
|
1952
1970
|
};
|
|
1953
1971
|
}
|
|
1954
|
-
const
|
|
1972
|
+
const Nn = (s) => k(s), Dn = (s) => {
|
|
1955
1973
|
const e = s.source;
|
|
1956
|
-
return e === void 0 ?
|
|
1974
|
+
return e === void 0 ? k(void 0) : ({ drivers: t }) => ({
|
|
1957
1975
|
type: "ScheduleComputable",
|
|
1958
1976
|
computable: V.make(
|
|
1959
1977
|
(r) => t.blobDriver.getDownloadedBlob(r.accessor(e).node().resourceInfo),
|
|
@@ -1965,9 +1983,9 @@ const Ln = (s) => E(s), Nn = (s) => {
|
|
|
1965
1983
|
}
|
|
1966
1984
|
)
|
|
1967
1985
|
});
|
|
1968
|
-
},
|
|
1986
|
+
}, Bn = (s) => {
|
|
1969
1987
|
const e = s.source;
|
|
1970
|
-
return e === void 0 ?
|
|
1988
|
+
return e === void 0 ? k(void 0) : ({ cCtx: t, drivers: r }) => {
|
|
1971
1989
|
const o = t.accessor(e).node().resourceInfo;
|
|
1972
1990
|
return {
|
|
1973
1991
|
type: "ScheduleComputable",
|
|
@@ -1976,9 +1994,9 @@ const Ln = (s) => E(s), Nn = (s) => {
|
|
|
1976
1994
|
})
|
|
1977
1995
|
};
|
|
1978
1996
|
};
|
|
1979
|
-
},
|
|
1997
|
+
}, jn = (s) => {
|
|
1980
1998
|
const e = s.source;
|
|
1981
|
-
return e === void 0 ?
|
|
1999
|
+
return e === void 0 ? k(void 0) : ({ drivers: t }) => ({
|
|
1982
2000
|
type: "ScheduleComputable",
|
|
1983
2001
|
computable: V.make(
|
|
1984
2002
|
(r) => t.blobDriver.getDownloadedBlob(r.accessor(e).node().resourceInfo),
|
|
@@ -1992,140 +2010,140 @@ const Ln = (s) => E(s), Nn = (s) => {
|
|
|
1992
2010
|
}
|
|
1993
2011
|
)
|
|
1994
2012
|
});
|
|
1995
|
-
},
|
|
2013
|
+
}, xn = (s) => {
|
|
1996
2014
|
const e = s.source;
|
|
1997
|
-
return e === void 0 ?
|
|
2015
|
+
return e === void 0 ? k(void 0) : ({ drivers: t }) => ({
|
|
1998
2016
|
type: "ScheduleComputable",
|
|
1999
2017
|
computable: t.blobDriver.getDownloadedBlob(e)
|
|
2000
2018
|
});
|
|
2001
|
-
},
|
|
2019
|
+
}, Vn = (s) => {
|
|
2002
2020
|
const e = s.source;
|
|
2003
|
-
return e === void 0 ?
|
|
2021
|
+
return e === void 0 ? k(void 0) : ({ drivers: t }) => ({
|
|
2004
2022
|
type: "ScheduleComputable",
|
|
2005
2023
|
computable: t.blobDriver.getOnDemandBlob(e)
|
|
2006
2024
|
});
|
|
2007
|
-
},
|
|
2025
|
+
}, Un = (s) => {
|
|
2008
2026
|
const e = s.source;
|
|
2009
|
-
return e === void 0 ?
|
|
2027
|
+
return e === void 0 ? k(void 0) : ({ drivers: t }) => ({
|
|
2010
2028
|
type: "ScheduleComputable",
|
|
2011
2029
|
computable: t.uploadDriver.getProgressId(e)
|
|
2012
2030
|
});
|
|
2013
|
-
},
|
|
2031
|
+
}, Jn = (s) => (e) => {
|
|
2014
2032
|
const t = e.source;
|
|
2015
|
-
return t === void 0 ?
|
|
2033
|
+
return t === void 0 ? k(void 0) : ({ drivers: r }) => ({
|
|
2016
2034
|
type: "ScheduleComputable",
|
|
2017
2035
|
computable: r.logDriver.getLastLogs(t, s)
|
|
2018
2036
|
});
|
|
2019
|
-
},
|
|
2037
|
+
}, Gn = (s) => (e) => {
|
|
2020
2038
|
const t = e.source;
|
|
2021
|
-
return t === void 0 ?
|
|
2039
|
+
return t === void 0 ? k(void 0) : ({ drivers: r }) => ({
|
|
2022
2040
|
type: "ScheduleComputable",
|
|
2023
2041
|
computable: r.logDriver.getProgressLog(t, s)
|
|
2024
2042
|
});
|
|
2025
|
-
},
|
|
2043
|
+
}, Mn = (s) => {
|
|
2026
2044
|
const e = s.source;
|
|
2027
|
-
return e === void 0 ?
|
|
2045
|
+
return e === void 0 ? k(void 0) : ({ drivers: t }) => ({
|
|
2028
2046
|
type: "ScheduleComputable",
|
|
2029
2047
|
computable: t.logDriver.getLogHandle(e)
|
|
2030
2048
|
});
|
|
2031
2049
|
};
|
|
2032
|
-
function
|
|
2050
|
+
function $(s, e) {
|
|
2033
2051
|
switch (e.type) {
|
|
2034
2052
|
case "GetFromCtx":
|
|
2035
2053
|
const t = s[e.variable];
|
|
2036
|
-
return typeof t == "function" ? (r) => Xe(t(r.cCtx)) :
|
|
2054
|
+
return typeof t == "function" ? (r) => Xe(t(r.cCtx)) : k(t);
|
|
2037
2055
|
case "Isolate":
|
|
2038
2056
|
return ({ drivers: r }) => ({
|
|
2039
2057
|
type: "ScheduleComputable",
|
|
2040
2058
|
computable: ns(r, s, e.cfg)
|
|
2041
2059
|
});
|
|
2042
2060
|
case "Immediate":
|
|
2043
|
-
return
|
|
2061
|
+
return k(e.value);
|
|
2044
2062
|
case "GetJsonField":
|
|
2045
2063
|
return () => ({
|
|
2046
2064
|
type: "ScheduleSubroutine",
|
|
2047
|
-
subroutine:
|
|
2065
|
+
subroutine: An,
|
|
2048
2066
|
args: {
|
|
2049
|
-
source:
|
|
2050
|
-
field:
|
|
2067
|
+
source: $(s, e.source),
|
|
2068
|
+
field: $(s, e.field)
|
|
2051
2069
|
}
|
|
2052
2070
|
});
|
|
2053
2071
|
case "MapArrayValues":
|
|
2054
2072
|
return () => ({
|
|
2055
2073
|
type: "ScheduleSubroutine",
|
|
2056
|
-
subroutine:
|
|
2074
|
+
subroutine: En(s, e),
|
|
2057
2075
|
args: {
|
|
2058
|
-
source:
|
|
2076
|
+
source: $(s, e.source)
|
|
2059
2077
|
}
|
|
2060
2078
|
});
|
|
2061
2079
|
case "MapRecordValues":
|
|
2062
2080
|
return () => ({
|
|
2063
2081
|
type: "ScheduleSubroutine",
|
|
2064
|
-
subroutine:
|
|
2082
|
+
subroutine: kn(s, e),
|
|
2065
2083
|
args: {
|
|
2066
|
-
source:
|
|
2084
|
+
source: $(s, e.source)
|
|
2067
2085
|
}
|
|
2068
2086
|
});
|
|
2069
2087
|
case "MakeObject":
|
|
2070
2088
|
return () => ({
|
|
2071
2089
|
type: "ScheduleSubroutine",
|
|
2072
|
-
subroutine:
|
|
2073
|
-
args:
|
|
2090
|
+
subroutine: bn,
|
|
2091
|
+
args: yn(e.template, (r) => $(s, r))
|
|
2074
2092
|
});
|
|
2075
2093
|
case "MakeArray":
|
|
2076
2094
|
return () => ({
|
|
2077
2095
|
type: "ScheduleSubroutine",
|
|
2078
2096
|
subroutine: rs(e.template.length),
|
|
2079
|
-
args: ts(e.template, (r) =>
|
|
2097
|
+
args: ts(e.template, (r) => $(s, r))
|
|
2080
2098
|
});
|
|
2081
2099
|
case "Flatten":
|
|
2082
2100
|
return () => ({
|
|
2083
2101
|
type: "ScheduleSubroutine",
|
|
2084
|
-
subroutine:
|
|
2102
|
+
subroutine: Cn,
|
|
2085
2103
|
args: {
|
|
2086
|
-
source:
|
|
2104
|
+
source: $(s, e.source)
|
|
2087
2105
|
}
|
|
2088
2106
|
});
|
|
2089
2107
|
case "IsEmpty":
|
|
2090
2108
|
return () => ({
|
|
2091
2109
|
type: "ScheduleSubroutine",
|
|
2092
|
-
subroutine:
|
|
2110
|
+
subroutine: On,
|
|
2093
2111
|
args: {
|
|
2094
|
-
arg:
|
|
2112
|
+
arg: $(s, e.arg)
|
|
2095
2113
|
}
|
|
2096
2114
|
});
|
|
2097
2115
|
case "Not":
|
|
2098
2116
|
return () => ({
|
|
2099
2117
|
type: "ScheduleSubroutine",
|
|
2100
|
-
subroutine:
|
|
2118
|
+
subroutine: $n,
|
|
2101
2119
|
args: {
|
|
2102
|
-
operand:
|
|
2120
|
+
operand: $(s, e.operand)
|
|
2103
2121
|
}
|
|
2104
2122
|
});
|
|
2105
2123
|
case "And":
|
|
2106
2124
|
return () => ({
|
|
2107
2125
|
type: "ScheduleSubroutine",
|
|
2108
|
-
subroutine:
|
|
2126
|
+
subroutine: In,
|
|
2109
2127
|
args: {
|
|
2110
|
-
operand1:
|
|
2111
|
-
operand2:
|
|
2128
|
+
operand1: $(s, e.operand1),
|
|
2129
|
+
operand2: $(s, e.operand2)
|
|
2112
2130
|
}
|
|
2113
2131
|
});
|
|
2114
2132
|
case "Or":
|
|
2115
2133
|
return () => ({
|
|
2116
2134
|
type: "ScheduleSubroutine",
|
|
2117
|
-
subroutine:
|
|
2135
|
+
subroutine: Fn,
|
|
2118
2136
|
args: {
|
|
2119
|
-
operand1:
|
|
2120
|
-
operand2:
|
|
2137
|
+
operand1: $(s, e.operand1),
|
|
2138
|
+
operand2: $(s, e.operand2)
|
|
2121
2139
|
}
|
|
2122
2140
|
});
|
|
2123
2141
|
case "MapResourceFields":
|
|
2124
2142
|
return () => ({
|
|
2125
2143
|
type: "ScheduleSubroutine",
|
|
2126
|
-
subroutine:
|
|
2144
|
+
subroutine: Ln(s, e),
|
|
2127
2145
|
args: {
|
|
2128
|
-
source:
|
|
2146
|
+
source: $(s, e.source)
|
|
2129
2147
|
}
|
|
2130
2148
|
});
|
|
2131
2149
|
case "GetResourceField":
|
|
@@ -2133,96 +2151,96 @@ function O(s, e) {
|
|
|
2133
2151
|
type: "ScheduleSubroutine",
|
|
2134
2152
|
subroutine: Rn,
|
|
2135
2153
|
args: {
|
|
2136
|
-
source:
|
|
2137
|
-
field:
|
|
2154
|
+
source: $(s, e.source),
|
|
2155
|
+
field: $(s, e.field)
|
|
2138
2156
|
}
|
|
2139
2157
|
});
|
|
2140
2158
|
case "GetResourceValueAsJson":
|
|
2141
2159
|
return () => ({
|
|
2142
2160
|
type: "ScheduleSubroutine",
|
|
2143
|
-
subroutine:
|
|
2161
|
+
subroutine: Tn,
|
|
2144
2162
|
args: {
|
|
2145
|
-
source:
|
|
2163
|
+
source: $(s, e.source)
|
|
2146
2164
|
}
|
|
2147
2165
|
});
|
|
2148
2166
|
case "GetBlobContent":
|
|
2149
2167
|
return () => ({
|
|
2150
2168
|
type: "ScheduleSubroutine",
|
|
2151
|
-
subroutine:
|
|
2169
|
+
subroutine: Dn,
|
|
2152
2170
|
args: {
|
|
2153
|
-
source:
|
|
2171
|
+
source: $(s, e.source)
|
|
2154
2172
|
}
|
|
2155
2173
|
});
|
|
2156
2174
|
case "GetBlobContentAsString":
|
|
2157
2175
|
return () => ({
|
|
2158
2176
|
type: "ScheduleSubroutine",
|
|
2159
|
-
subroutine:
|
|
2177
|
+
subroutine: Bn,
|
|
2160
2178
|
args: {
|
|
2161
|
-
source:
|
|
2179
|
+
source: $(s, e.source)
|
|
2162
2180
|
}
|
|
2163
2181
|
});
|
|
2164
2182
|
case "GetBlobContentAsJson":
|
|
2165
2183
|
return () => ({
|
|
2166
2184
|
type: "ScheduleSubroutine",
|
|
2167
|
-
subroutine:
|
|
2185
|
+
subroutine: jn,
|
|
2168
2186
|
args: {
|
|
2169
|
-
source:
|
|
2187
|
+
source: $(s, e.source)
|
|
2170
2188
|
}
|
|
2171
2189
|
});
|
|
2172
2190
|
case "GetDownloadedBlobContent":
|
|
2173
2191
|
return () => ({
|
|
2174
2192
|
type: "ScheduleSubroutine",
|
|
2175
|
-
subroutine:
|
|
2193
|
+
subroutine: xn,
|
|
2176
2194
|
args: {
|
|
2177
|
-
source:
|
|
2195
|
+
source: $(s, e.source)
|
|
2178
2196
|
}
|
|
2179
2197
|
});
|
|
2180
2198
|
case "GetOnDemandBlobContent":
|
|
2181
2199
|
return () => ({
|
|
2182
2200
|
type: "ScheduleSubroutine",
|
|
2183
|
-
subroutine:
|
|
2201
|
+
subroutine: Vn,
|
|
2184
2202
|
args: {
|
|
2185
|
-
source:
|
|
2203
|
+
source: $(s, e.source)
|
|
2186
2204
|
}
|
|
2187
2205
|
});
|
|
2188
2206
|
case "GetImportProgress":
|
|
2189
2207
|
return () => ({
|
|
2190
2208
|
type: "ScheduleSubroutine",
|
|
2191
|
-
subroutine:
|
|
2209
|
+
subroutine: Un,
|
|
2192
2210
|
args: {
|
|
2193
|
-
source:
|
|
2211
|
+
source: $(s, e.source)
|
|
2194
2212
|
}
|
|
2195
2213
|
});
|
|
2196
2214
|
case "GetLastLogs":
|
|
2197
2215
|
return () => ({
|
|
2198
2216
|
type: "ScheduleSubroutine",
|
|
2199
|
-
subroutine:
|
|
2217
|
+
subroutine: Jn(e.lines),
|
|
2200
2218
|
args: {
|
|
2201
|
-
source:
|
|
2219
|
+
source: $(s, e.source)
|
|
2202
2220
|
}
|
|
2203
2221
|
});
|
|
2204
2222
|
case "GetProgressLog":
|
|
2205
2223
|
return () => ({
|
|
2206
2224
|
type: "ScheduleSubroutine",
|
|
2207
|
-
subroutine:
|
|
2225
|
+
subroutine: Gn(e.patternToSearch),
|
|
2208
2226
|
args: {
|
|
2209
|
-
source:
|
|
2227
|
+
source: $(s, e.source)
|
|
2210
2228
|
}
|
|
2211
2229
|
});
|
|
2212
2230
|
case "GetLogHandle":
|
|
2213
2231
|
return () => ({
|
|
2214
2232
|
type: "ScheduleSubroutine",
|
|
2215
|
-
subroutine:
|
|
2233
|
+
subroutine: Mn,
|
|
2216
2234
|
args: {
|
|
2217
|
-
source:
|
|
2235
|
+
source: $(s, e.source)
|
|
2218
2236
|
}
|
|
2219
2237
|
});
|
|
2220
2238
|
default:
|
|
2221
|
-
return
|
|
2239
|
+
return G(e);
|
|
2222
2240
|
}
|
|
2223
2241
|
}
|
|
2224
|
-
const
|
|
2225
|
-
function
|
|
2242
|
+
const _n = ["$prod", "$staging"];
|
|
2243
|
+
function Kn(s) {
|
|
2226
2244
|
return {
|
|
2227
2245
|
$blockId: s.blockId,
|
|
2228
2246
|
$args: (e) => JSON.parse(s.args(e)),
|
|
@@ -2234,16 +2252,16 @@ function _n(s) {
|
|
|
2234
2252
|
$staging: s.staging
|
|
2235
2253
|
};
|
|
2236
2254
|
}
|
|
2237
|
-
const ss = Symbol(), os = "return",
|
|
2238
|
-
function
|
|
2255
|
+
const ss = Symbol(), os = "return", Hn = { op: ss, arg: os };
|
|
2256
|
+
function Wn(s) {
|
|
2239
2257
|
return s.op == ss && s.arg == os;
|
|
2240
2258
|
}
|
|
2241
|
-
function
|
|
2259
|
+
function qn() {
|
|
2242
2260
|
return { pendingSubroutines: /* @__PURE__ */ new Map() };
|
|
2243
2261
|
}
|
|
2244
2262
|
function nr(s, e, t, r) {
|
|
2245
2263
|
const o = new xr(t), n = (c, a) => {
|
|
2246
|
-
if (
|
|
2264
|
+
if (Wn(c))
|
|
2247
2265
|
return e.result = a, !1;
|
|
2248
2266
|
const l = B(e.pendingSubroutines.get(c.op));
|
|
2249
2267
|
if (c.arg in l.args) throw new Error("argument already set");
|
|
@@ -2266,9 +2284,9 @@ function nr(s, e, t, r) {
|
|
|
2266
2284
|
operation: a.subroutine({})
|
|
2267
2285
|
});
|
|
2268
2286
|
else {
|
|
2269
|
-
for (const [
|
|
2287
|
+
for (const [f, h] of u)
|
|
2270
2288
|
o.push({
|
|
2271
|
-
destination: { op: l, arg:
|
|
2289
|
+
destination: { op: l, arg: f },
|
|
2272
2290
|
operation: h
|
|
2273
2291
|
});
|
|
2274
2292
|
e.pendingSubroutines.set(l, {
|
|
@@ -2288,51 +2306,51 @@ function nr(s, e, t, r) {
|
|
|
2288
2306
|
});
|
|
2289
2307
|
break;
|
|
2290
2308
|
default:
|
|
2291
|
-
|
|
2309
|
+
G(a);
|
|
2292
2310
|
}
|
|
2293
2311
|
}
|
|
2294
2312
|
return i;
|
|
2295
2313
|
}
|
|
2296
|
-
function
|
|
2297
|
-
return ns(s,
|
|
2314
|
+
function Xn(s, e, t, r = {}) {
|
|
2315
|
+
return ns(s, Kn(e), t, r);
|
|
2298
2316
|
}
|
|
2299
2317
|
function ns(s, e, t, r = {}) {
|
|
2300
|
-
const o = `${e.blockId}#` +
|
|
2318
|
+
const o = `${e.blockId}#` + re({
|
|
2301
2319
|
ctx: Object.fromEntries(
|
|
2302
|
-
Object.entries(e).filter(([n]) =>
|
|
2320
|
+
Object.entries(e).filter(([n]) => _n.indexOf(n) === -1)
|
|
2303
2321
|
),
|
|
2304
2322
|
cfg: t
|
|
2305
2323
|
});
|
|
2306
2324
|
return V.makeRaw(
|
|
2307
2325
|
(n) => {
|
|
2308
|
-
const i = { drivers: s, cCtx: n }, c =
|
|
2326
|
+
const i = { drivers: s, cCtx: n }, c = qn();
|
|
2309
2327
|
return {
|
|
2310
2328
|
ir: nr(
|
|
2311
2329
|
i,
|
|
2312
2330
|
c,
|
|
2313
2331
|
[
|
|
2314
2332
|
{
|
|
2315
|
-
destination:
|
|
2316
|
-
operation:
|
|
2333
|
+
destination: Hn,
|
|
2334
|
+
operation: $(e, t)
|
|
2317
2335
|
}
|
|
2318
2336
|
],
|
|
2319
2337
|
!0
|
|
2320
2338
|
),
|
|
2321
2339
|
async postprocessValue(l) {
|
|
2322
2340
|
const u = [];
|
|
2323
|
-
for (const
|
|
2324
|
-
u.push({ destination:
|
|
2341
|
+
for (const g of l)
|
|
2342
|
+
u.push({ destination: g.destination, operation: k(g.computable) });
|
|
2325
2343
|
const d = {
|
|
2326
2344
|
drivers: s,
|
|
2327
2345
|
get cCtx() {
|
|
2328
2346
|
throw new Error("asynchronous operations are forbidden in this context");
|
|
2329
2347
|
}
|
|
2330
|
-
},
|
|
2331
|
-
for (const [
|
|
2332
|
-
|
|
2348
|
+
}, f = /* @__PURE__ */ new Map();
|
|
2349
|
+
for (const [g, E] of c.pendingSubroutines)
|
|
2350
|
+
f.set(g, { ...E, args: { ...E.args } });
|
|
2333
2351
|
const h = {
|
|
2334
2352
|
result: c.result,
|
|
2335
|
-
pendingSubroutines:
|
|
2353
|
+
pendingSubroutines: f
|
|
2336
2354
|
};
|
|
2337
2355
|
if (nr(d, h, u, !1), !("result" in h))
|
|
2338
2356
|
throw new Error("illegal cfg rendering stack state, no result");
|
|
@@ -2343,13 +2361,13 @@ function ns(s, e, t, r = {}) {
|
|
|
2343
2361
|
{ ...r, key: o }
|
|
2344
2362
|
);
|
|
2345
2363
|
}
|
|
2346
|
-
function
|
|
2364
|
+
function zn(s) {
|
|
2347
2365
|
return s instanceof ArrayBuffer || ArrayBuffer.isView(s);
|
|
2348
2366
|
}
|
|
2349
2367
|
function ir(s) {
|
|
2350
2368
|
return s !== void 0 ? Buffer.from(s).toString("base64") : void 0;
|
|
2351
2369
|
}
|
|
2352
|
-
class
|
|
2370
|
+
class qe {
|
|
2353
2371
|
constructor(e, t, r, o, n) {
|
|
2354
2372
|
S(this, "callbackRegistry");
|
|
2355
2373
|
S(this, "fnJSONStringify");
|
|
@@ -2381,12 +2399,12 @@ class ze {
|
|
|
2381
2399
|
try {
|
|
2382
2400
|
this.vm.unwrapResult(this.vm.evalCode(e, "bundle.js", { type: "global" })).dispose();
|
|
2383
2401
|
} catch (t) {
|
|
2384
|
-
throw
|
|
2402
|
+
throw qe.cleanErrorContext(t), t;
|
|
2385
2403
|
}
|
|
2386
2404
|
}
|
|
2387
2405
|
runCallback(e, ...t) {
|
|
2388
2406
|
try {
|
|
2389
|
-
return
|
|
2407
|
+
return mt.withScope((r) => {
|
|
2390
2408
|
const o = r.manage(this.vm.getProp(this.callbackRegistry, e));
|
|
2391
2409
|
if (this.vm.typeof(o) !== "function")
|
|
2392
2410
|
throw new Error(`No such callback: ${e}`);
|
|
@@ -2401,7 +2419,7 @@ class ze {
|
|
|
2401
2419
|
);
|
|
2402
2420
|
});
|
|
2403
2421
|
} catch (r) {
|
|
2404
|
-
throw
|
|
2422
|
+
throw qe.cleanErrorContext(r), r;
|
|
2405
2423
|
}
|
|
2406
2424
|
}
|
|
2407
2425
|
//
|
|
@@ -2473,7 +2491,7 @@ class ze {
|
|
|
2473
2491
|
parsePObjectCollection(e, t, r, ...o) {
|
|
2474
2492
|
const n = this.getAccessor(e);
|
|
2475
2493
|
if (!n.getIsReadyOrError()) return;
|
|
2476
|
-
const i =
|
|
2494
|
+
const i = vn(n, t, r, o), c = {};
|
|
2477
2495
|
for (const [a, l] of Object.entries(i))
|
|
2478
2496
|
c[a] = le(l, (u) => this.wrapAccessor(u));
|
|
2479
2497
|
return c;
|
|
@@ -2644,7 +2662,7 @@ class ze {
|
|
|
2644
2662
|
"can't instantiate PTable from this context (most porbably called from the future mapper)"
|
|
2645
2663
|
);
|
|
2646
2664
|
return this.env.driverKit.pFrameDriver.createPTable(
|
|
2647
|
-
|
|
2665
|
+
ht(e, (t) => le(
|
|
2648
2666
|
t,
|
|
2649
2667
|
(r) => typeof r == "string" ? this.getAccessor(r) : r
|
|
2650
2668
|
)),
|
|
@@ -2700,7 +2718,7 @@ class ze {
|
|
|
2700
2718
|
r = this.vm.null;
|
|
2701
2719
|
break;
|
|
2702
2720
|
}
|
|
2703
|
-
if (
|
|
2721
|
+
if (zn(e)) {
|
|
2704
2722
|
r = this.vm.newArrayBuffer(e), o = !0;
|
|
2705
2723
|
break;
|
|
2706
2724
|
}
|
|
@@ -2736,7 +2754,7 @@ class ze {
|
|
|
2736
2754
|
return JSON.parse(t);
|
|
2737
2755
|
}
|
|
2738
2756
|
injectCtx() {
|
|
2739
|
-
|
|
2757
|
+
mt.withScope((e) => {
|
|
2740
2758
|
const t = e.manage(this.vm.newObject()), r = this.blockCtx.args(this.computableCtx), o = this.blockCtx.uiState(this.computableCtx);
|
|
2741
2759
|
this.vm.setProp(t, "args", e.manage(this.vm.newString(r))), o !== void 0 && this.vm.setProp(t, "uiState", e.manage(this.vm.newString(o))), this.vm.setProp(t, "callbackRegistry", this.callbackRegistry), this.vm.setProp(
|
|
2742
2760
|
t,
|
|
@@ -2819,7 +2837,7 @@ class ze {
|
|
|
2819
2837
|
});
|
|
2820
2838
|
}
|
|
2821
2839
|
}
|
|
2822
|
-
function
|
|
2840
|
+
function ze(s, e) {
|
|
2823
2841
|
return Oe(
|
|
2824
2842
|
s.traverse(
|
|
2825
2843
|
{
|
|
@@ -2827,7 +2845,7 @@ function qe(s, e) {
|
|
|
2827
2845
|
assertFieldType: "Dynamic",
|
|
2828
2846
|
errorIfFieldNotSet: !0
|
|
2829
2847
|
},
|
|
2830
|
-
{ field:
|
|
2848
|
+
{ field: L.HolderRefField, assertFieldType: "Input", errorIfFieldNotFound: !0 }
|
|
2831
2849
|
),
|
|
2832
2850
|
(t) => {
|
|
2833
2851
|
const r = t.getDataAsJson(), o = Ar(r.config);
|
|
@@ -2836,48 +2854,48 @@ function qe(s, e) {
|
|
|
2836
2854
|
);
|
|
2837
2855
|
}
|
|
2838
2856
|
const Ve = process.env.MI_LOG_OUTPUT_STATUS;
|
|
2839
|
-
function
|
|
2857
|
+
function Yn(s, e, t, r, o, n = {}) {
|
|
2840
2858
|
const i = `${e.blockId}#lambda#${o}#${t.handle}`;
|
|
2841
2859
|
return n = { ...n, key: i }, n.mode === void 0 && t.retentive === !0 && (n.mode = "StableOnlyRetentive"), V.makeRaw((c) => {
|
|
2842
|
-
const a = new
|
|
2860
|
+
const a = new mt();
|
|
2843
2861
|
c.addOnDestroy(() => a.dispose());
|
|
2844
2862
|
const l = a.manage(s.quickJs.newRuntime());
|
|
2845
2863
|
l.setMemoryLimit(1024 * 640), l.setMaxStackSize(1024 * 320);
|
|
2846
|
-
const u = a.manage(l.newContext()), d = new
|
|
2864
|
+
const u = a.manage(l.newContext()), d = new qe(a, u, e, s, c);
|
|
2847
2865
|
d.evaluateBundle(r.content);
|
|
2848
|
-
const
|
|
2866
|
+
const f = d.runCallback(t.handle);
|
|
2849
2867
|
d.resetComputableCtx();
|
|
2850
2868
|
let h = 0;
|
|
2851
2869
|
return Ve && Ve !== "unstable-only" && console.log(`Output ${t.handle} scaffold calculated.`), {
|
|
2852
2870
|
ir: d.computablesToResolve,
|
|
2853
|
-
postprocessValue: async (
|
|
2854
|
-
for (const [_,
|
|
2855
|
-
const
|
|
2871
|
+
postprocessValue: async (g, { unstableMarker: E, stable: F }) => {
|
|
2872
|
+
for (const [_, P] of Object.entries(g)) d.runCallback(_, P);
|
|
2873
|
+
const N = d.importObjectUniversal(f);
|
|
2856
2874
|
return h++, Ve && (Ve !== "unstable-only" || !F) && console.log(
|
|
2857
|
-
F ? `Stable output ${t.handle} calculated ${
|
|
2858
|
-
),
|
|
2875
|
+
F ? `Stable output ${t.handle} calculated ${N !== void 0 ? "defined" : "undefined"}; (#${h})` : `Unstable output ${t.handle}; marker = ${E}; ${N !== void 0 ? "defined" : "undefined"} (#${h})`
|
|
2876
|
+
), N;
|
|
2859
2877
|
}
|
|
2860
2878
|
};
|
|
2861
2879
|
}, n);
|
|
2862
2880
|
}
|
|
2863
|
-
function
|
|
2864
|
-
return Lr(s) ? s.isActive === !0 :
|
|
2881
|
+
function Qn(s) {
|
|
2882
|
+
return Lr(s) ? s.isActive === !0 : Sn(s);
|
|
2865
2883
|
}
|
|
2866
2884
|
function $e(s, e, t, r, o, n = {}) {
|
|
2867
2885
|
if (Lr(t)) {
|
|
2868
2886
|
if (r === void 0) throw new Error("No code bundle.");
|
|
2869
|
-
return
|
|
2870
|
-
} else return
|
|
2887
|
+
return Yn(s, e, t, r, o, n);
|
|
2888
|
+
} else return Xn(s.driverKit, e, t, n);
|
|
2871
2889
|
}
|
|
2872
|
-
function
|
|
2890
|
+
function Zn(s, e, t) {
|
|
2873
2891
|
return V.make(
|
|
2874
2892
|
(r) => {
|
|
2875
|
-
var
|
|
2876
|
-
const o = r.accessor(s).node(), n = B(o.getKeyValueAsJson(
|
|
2893
|
+
var g, E, F, N, _, P, se, pe;
|
|
2894
|
+
const o = r.accessor(s).node(), n = B(o.getKeyValueAsJson(It)), i = B(o.getKeyValueAsJson(Te)), c = B(o.getKeyValueAsJson(Ae)), a = B(o.getKeyValueAsJson(de)), l = B(
|
|
2877
2895
|
o.getKeyValueAsJson(He)
|
|
2878
2896
|
), u = /* @__PURE__ */ new Map();
|
|
2879
2897
|
for (const { id: A } of te(a)) {
|
|
2880
|
-
const
|
|
2898
|
+
const q = o.traverse({
|
|
2881
2899
|
field: U(A, "currentArgs"),
|
|
2882
2900
|
assertFieldType: "Dynamic",
|
|
2883
2901
|
errorIfFieldNotSet: !0
|
|
@@ -2889,7 +2907,7 @@ function Qn(s, e, t) {
|
|
|
2889
2907
|
stableIfNotFound: !0
|
|
2890
2908
|
});
|
|
2891
2909
|
if (K !== void 0) {
|
|
2892
|
-
const
|
|
2910
|
+
const J = o.getField({
|
|
2893
2911
|
field: U(A, "prodOutput"),
|
|
2894
2912
|
assertFieldType: "Dynamic",
|
|
2895
2913
|
errorIfFieldNotFound: !0
|
|
@@ -2900,70 +2918,76 @@ function Qn(s, e, t) {
|
|
|
2900
2918
|
});
|
|
2901
2919
|
oe = {
|
|
2902
2920
|
arguments: K.getDataAsJson(),
|
|
2903
|
-
stale:
|
|
2904
|
-
outputError:
|
|
2905
|
-
outputsError: ((F =
|
|
2906
|
-
exportsError: ((
|
|
2907
|
-
finished: (
|
|
2921
|
+
stale: q.id !== K.id,
|
|
2922
|
+
outputError: J.error !== void 0 || x.error !== void 0 || ((g = J.value) == null ? void 0 : g.getError()) !== void 0 || ((E = x.value) == null ? void 0 : E.getError()) !== void 0,
|
|
2923
|
+
outputsError: ((F = J.error) == null ? void 0 : F.getDataAsString()) ?? ((_ = (N = J.value) == null ? void 0 : N.getError()) == null ? void 0 : _.getDataAsString()),
|
|
2924
|
+
exportsError: ((P = x.error) == null ? void 0 : P.getDataAsString()) ?? ((pe = (se = x.value) == null ? void 0 : se.getError()) == null ? void 0 : pe.getDataAsString()),
|
|
2925
|
+
finished: (J.value !== void 0 && J.value.getIsReadyOrError() || J.error !== void 0 && J.error.getIsReadyOrError()) && (x.value !== void 0 && x.value.getIsReadyOrError() || x.error !== void 0 && x.error.getIsReadyOrError())
|
|
2908
2926
|
};
|
|
2909
2927
|
}
|
|
2910
|
-
u.set(A, { currentArguments:
|
|
2928
|
+
u.set(A, { currentArguments: q.getDataAsJson(), prod: oe });
|
|
2911
2929
|
}
|
|
2912
|
-
const d = _e(a, (A) => u.get(A).currentArguments),
|
|
2913
|
-
var
|
|
2914
|
-
const K = B(u.get(A)),
|
|
2930
|
+
const d = _e(a, (A) => u.get(A).currentArguments), f = new Set(l.blocksInLimbo), h = [...te(a)].map(({ id: A, label: q, renderingMode: oe }) => {
|
|
2931
|
+
var w, C, O, R, T;
|
|
2932
|
+
const K = B(u.get(A)), J = B(d.nodes.get(A));
|
|
2915
2933
|
let x = "NotCalculated";
|
|
2916
|
-
K.prod !== void 0 && (
|
|
2917
|
-
const X =
|
|
2918
|
-
const
|
|
2934
|
+
K.prod !== void 0 && (f.has(A) ? x = "Limbo" : x = K.prod.finished ? "Done" : "Running");
|
|
2935
|
+
const X = ze(o, A), { sections: he, title: v, inputsValid: p, sdkVersion: y } = Oe(X, ({ bpId: D, cfg: I, info: fe }) => {
|
|
2936
|
+
const rt = At(s, A);
|
|
2919
2937
|
return {
|
|
2920
2938
|
sections: $e(
|
|
2921
2939
|
t,
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2940
|
+
rt,
|
|
2941
|
+
I.sections,
|
|
2942
|
+
I.code,
|
|
2943
|
+
D
|
|
2926
2944
|
),
|
|
2927
2945
|
title: Oe(
|
|
2928
|
-
|
|
2946
|
+
I.title,
|
|
2929
2947
|
(vs) => $e(
|
|
2930
2948
|
t,
|
|
2931
|
-
|
|
2949
|
+
rt,
|
|
2932
2950
|
vs,
|
|
2933
|
-
|
|
2934
|
-
|
|
2951
|
+
I.code,
|
|
2952
|
+
D
|
|
2935
2953
|
)
|
|
2936
2954
|
),
|
|
2937
2955
|
inputsValid: $e(
|
|
2938
2956
|
t,
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2957
|
+
rt,
|
|
2958
|
+
I.inputsValid,
|
|
2959
|
+
I.code,
|
|
2960
|
+
D
|
|
2943
2961
|
),
|
|
2944
|
-
sdkVersion:
|
|
2962
|
+
sdkVersion: I.sdkVersion
|
|
2945
2963
|
};
|
|
2946
|
-
}) || {},
|
|
2964
|
+
}) || {}, m = o.traverse({
|
|
2965
|
+
field: U(A, "blockSettings"),
|
|
2966
|
+
assertFieldType: "Dynamic",
|
|
2967
|
+
errorIfFieldNotSet: !0
|
|
2968
|
+
}).getDataAsJson(), b = Oe(
|
|
2947
2969
|
X,
|
|
2948
|
-
({ info:
|
|
2970
|
+
({ info: D }) => t.blockUpdateWatcher.get({ currentSpec: D.source, settings: m })
|
|
2949
2971
|
);
|
|
2950
2972
|
return {
|
|
2951
2973
|
id: A,
|
|
2952
|
-
label: v ??
|
|
2953
|
-
title: v ??
|
|
2974
|
+
label: v ?? q,
|
|
2975
|
+
title: v ?? q,
|
|
2954
2976
|
renderingMode: oe,
|
|
2955
|
-
stale: ((
|
|
2956
|
-
missingReference:
|
|
2977
|
+
stale: ((w = K.prod) == null ? void 0 : w.stale) !== !1 || x === "Limbo",
|
|
2978
|
+
missingReference: J.missingReferences,
|
|
2957
2979
|
upstreams: [...d.traverseIdsExcludingRoots("upstream", A)],
|
|
2958
2980
|
downstreams: [...d.traverseIdsExcludingRoots("downstream", A)],
|
|
2959
2981
|
calculationStatus: x,
|
|
2960
|
-
outputErrors: ((
|
|
2961
|
-
outputsError: (
|
|
2962
|
-
exportsError: (
|
|
2982
|
+
outputErrors: ((C = K.prod) == null ? void 0 : C.outputError) === !0,
|
|
2983
|
+
outputsError: (O = K.prod) == null ? void 0 : O.outputsError,
|
|
2984
|
+
exportsError: (R = K.prod) == null ? void 0 : R.exportsError,
|
|
2985
|
+
settings: m,
|
|
2963
2986
|
sections: he,
|
|
2964
2987
|
inputsValid: p,
|
|
2965
|
-
|
|
2966
|
-
|
|
2988
|
+
updateInfo: {},
|
|
2989
|
+
currentBlockPack: (T = X == null ? void 0 : X.info) == null ? void 0 : T.source,
|
|
2990
|
+
updates: b,
|
|
2967
2991
|
sdkVersion: y,
|
|
2968
2992
|
navigationState: e.getState(A)
|
|
2969
2993
|
};
|
|
@@ -2972,7 +2996,7 @@ function Qn(s, e, t) {
|
|
|
2972
2996
|
meta: c,
|
|
2973
2997
|
created: new Date(n),
|
|
2974
2998
|
lastModified: new Date(i),
|
|
2975
|
-
authorMarker: o.getKeyValueAsJson(
|
|
2999
|
+
authorMarker: o.getKeyValueAsJson(wt),
|
|
2976
3000
|
blocks: h
|
|
2977
3001
|
};
|
|
2978
3002
|
},
|
|
@@ -2982,22 +3006,29 @@ function Qn(s, e, t) {
|
|
|
2982
3006
|
return {
|
|
2983
3007
|
...r,
|
|
2984
3008
|
blocks: r.blocks.map((i) => {
|
|
3009
|
+
var u, d;
|
|
2985
3010
|
i.inputsValid || o.add(i.id), i.stale && n.add(i.id);
|
|
2986
|
-
const c = i.stale || i.upstreams.findIndex((
|
|
2987
|
-
|
|
3011
|
+
const c = i.stale || i.upstreams.findIndex((f) => n.has(f)) !== -1, a = (c || i.outputErrors) && !!i.inputsValid && !i.missingReference && i.upstreams.findIndex((f) => o.has(f)) === -1, l = {
|
|
3012
|
+
...i,
|
|
3013
|
+
canRun: a,
|
|
3014
|
+
stale: c,
|
|
3015
|
+
updateSuggestions: ((u = i.updates) == null ? void 0 : u.suggestions) ?? [],
|
|
3016
|
+
updatedBlockPack: (d = i.updates) == null ? void 0 : d.mainSuggestion
|
|
3017
|
+
};
|
|
3018
|
+
return delete l.updates, l;
|
|
2988
3019
|
})
|
|
2989
3020
|
};
|
|
2990
3021
|
}
|
|
2991
3022
|
}
|
|
2992
3023
|
).withStableType();
|
|
2993
3024
|
}
|
|
2994
|
-
function
|
|
3025
|
+
function ei(s, e) {
|
|
2995
3026
|
const t = s.node();
|
|
2996
3027
|
if (ce(t.resourceType, Wr)) {
|
|
2997
3028
|
const r = t.getDataAsJson();
|
|
2998
3029
|
if (r === void 0) throw new Error("No resource data.");
|
|
2999
3030
|
return e.frontendDownloadDriver.getPath(new URL(r.url)).withStableType();
|
|
3000
|
-
} else if (ce(t.resourceType,
|
|
3031
|
+
} else if (ce(t.resourceType, qr)) {
|
|
3001
3032
|
const r = t.getDataAsJson();
|
|
3002
3033
|
if (r === void 0) throw new Error("No resource data.");
|
|
3003
3034
|
return e.signer.verify(
|
|
@@ -3008,10 +3039,10 @@ function Zn(s, e) {
|
|
|
3008
3039
|
} else
|
|
3009
3040
|
throw new Error(`Unsupported resource type: ${JSON.stringify(t.resourceType)}`);
|
|
3010
3041
|
}
|
|
3011
|
-
function
|
|
3042
|
+
function ti(s, e) {
|
|
3012
3043
|
if (s !== void 0)
|
|
3013
3044
|
return V.make(
|
|
3014
|
-
(t) =>
|
|
3045
|
+
(t) => ei(t.accessor(s), e),
|
|
3015
3046
|
{
|
|
3016
3047
|
postprocessValue: (t) => {
|
|
3017
3048
|
if (t !== void 0) {
|
|
@@ -3023,20 +3054,20 @@ function ei(s, e) {
|
|
|
3023
3054
|
}
|
|
3024
3055
|
).withStableType();
|
|
3025
3056
|
}
|
|
3026
|
-
function
|
|
3057
|
+
function ri(s, e, t) {
|
|
3027
3058
|
return V.make(
|
|
3028
3059
|
(r) => {
|
|
3029
3060
|
var c;
|
|
3030
|
-
const o = r.accessor(s).node(), n =
|
|
3061
|
+
const o = r.accessor(s).node(), n = ze(o, e), i = (c = o.traverse(
|
|
3031
3062
|
{
|
|
3032
3063
|
field: U(e, "blockPack"),
|
|
3033
3064
|
assertFieldType: "Dynamic"
|
|
3034
3065
|
},
|
|
3035
|
-
{ field:
|
|
3036
|
-
{ field:
|
|
3066
|
+
{ field: L.HolderRefField, assertFieldType: "Input", errorIfFieldNotFound: !0 },
|
|
3067
|
+
{ field: zr, assertFieldType: "Input" }
|
|
3037
3068
|
)) == null ? void 0 : c.persist();
|
|
3038
3069
|
return {
|
|
3039
|
-
path:
|
|
3070
|
+
path: ti(i, t),
|
|
3040
3071
|
sdkVersion: n == null ? void 0 : n.cfg.sdkVersion
|
|
3041
3072
|
};
|
|
3042
3073
|
},
|
|
@@ -3048,18 +3079,18 @@ function is(s, e, t) {
|
|
|
3048
3079
|
return V.make((i) => is(s, e, i), {
|
|
3049
3080
|
key: `inputs#${Br(s.rid)}#${e}`
|
|
3050
3081
|
});
|
|
3051
|
-
const r = t.accessor(s).node(), o =
|
|
3082
|
+
const r = t.accessor(s).node(), o = At(s, e), n = o.uiState(t);
|
|
3052
3083
|
return {
|
|
3053
|
-
author: r.getKeyValueAsJson(
|
|
3084
|
+
author: r.getKeyValueAsJson(yt(e)),
|
|
3054
3085
|
args: JSON.parse(o.args(t)),
|
|
3055
3086
|
ui: n !== void 0 ? JSON.parse(n) : void 0
|
|
3056
3087
|
};
|
|
3057
3088
|
}
|
|
3058
|
-
function
|
|
3089
|
+
function si(s, e, t) {
|
|
3059
3090
|
return V.make(
|
|
3060
3091
|
(r) => {
|
|
3061
3092
|
const o = r.accessor(s).node(), n = es(s, e);
|
|
3062
|
-
return Oe(
|
|
3093
|
+
return Oe(ze(o, e), ({ cfg: i, bpId: c }) => {
|
|
3063
3094
|
const a = {};
|
|
3064
3095
|
for (const [l, u] of Object.entries(i.outputs)) {
|
|
3065
3096
|
const d = $e(t, n, u, i.code, c);
|
|
@@ -3071,13 +3102,13 @@ function ri(s, e, t) {
|
|
|
3071
3102
|
{ key: "outputs#" + Br(s.rid) + "#" + e }
|
|
3072
3103
|
).withStableType();
|
|
3073
3104
|
}
|
|
3074
|
-
function
|
|
3105
|
+
function oi(s, e) {
|
|
3075
3106
|
return V.make((t) => {
|
|
3076
3107
|
const r = t.accessor(s).node(), o = B(r.getKeyValueAsJson(de)), n = [];
|
|
3077
3108
|
for (const { id: i, renderingMode: c } of te(o)) {
|
|
3078
|
-
const a =
|
|
3109
|
+
const a = ze(r, i);
|
|
3079
3110
|
if (a === void 0) continue;
|
|
3080
|
-
const l = Object.entries(a.cfg.outputs).map(([, d]) => d).filter((d) =>
|
|
3111
|
+
const l = Object.entries(a.cfg.outputs).map(([, d]) => d).filter((d) => Qn(d)).map((d) => d);
|
|
3081
3112
|
if (l.length === 0) continue;
|
|
3082
3113
|
const u = es(r.persist(), i);
|
|
3083
3114
|
for (const d of l)
|
|
@@ -3088,7 +3119,7 @@ function si(s, e) {
|
|
|
3088
3119
|
return n;
|
|
3089
3120
|
});
|
|
3090
3121
|
}
|
|
3091
|
-
class
|
|
3122
|
+
class ni {
|
|
3092
3123
|
constructor() {
|
|
3093
3124
|
S(this, "states", /* @__PURE__ */ new Map());
|
|
3094
3125
|
}
|
|
@@ -3102,7 +3133,7 @@ class oi {
|
|
|
3102
3133
|
}
|
|
3103
3134
|
readState(e, t) {
|
|
3104
3135
|
let r = this.states.get(t);
|
|
3105
|
-
return r === void 0 && (r = { state: { ...
|
|
3136
|
+
return r === void 0 && (r = { state: { ...Cs }, change: new Ht() }, this.states.set(t, r)), r.change.attachWatcher(e.watcher), r.state;
|
|
3106
3137
|
}
|
|
3107
3138
|
getState(e) {
|
|
3108
3139
|
return V.make(
|
|
@@ -3115,38 +3146,38 @@ class oi {
|
|
|
3115
3146
|
t !== void 0 && (this.states.delete(e), t.change.markChanged());
|
|
3116
3147
|
}
|
|
3117
3148
|
}
|
|
3118
|
-
class
|
|
3149
|
+
class Lt {
|
|
3119
3150
|
constructor(e, t, r) {
|
|
3120
3151
|
/** Underlying pl resource id */
|
|
3121
3152
|
S(this, "rid");
|
|
3122
3153
|
/** Data for the left panel, contain basic information about block status. */
|
|
3123
3154
|
S(this, "overview");
|
|
3124
|
-
S(this, "navigationStates", new
|
|
3155
|
+
S(this, "navigationStates", new ni());
|
|
3125
3156
|
S(this, "blockComputables", /* @__PURE__ */ new Map());
|
|
3126
3157
|
S(this, "blockFrontends", /* @__PURE__ */ new Map());
|
|
3127
3158
|
S(this, "activeConfigs");
|
|
3128
3159
|
S(this, "refreshLoopResult");
|
|
3129
3160
|
S(this, "abortController", new AbortController());
|
|
3130
3161
|
S(this, "destroyed", !1);
|
|
3131
|
-
this.env = e, this.projectTree = r, this.overview =
|
|
3162
|
+
this.env = e, this.projectTree = r, this.overview = Zn(
|
|
3132
3163
|
r.entry(),
|
|
3133
3164
|
this.navigationStates,
|
|
3134
3165
|
e
|
|
3135
|
-
).withPreCalculatedValueTree(), this.rid = t, this.refreshLoopResult = this.refreshLoop(), this.activeConfigs =
|
|
3166
|
+
).withPreCalculatedValueTree(), this.rid = t, this.refreshLoopResult = this.refreshLoop(), this.activeConfigs = oi(r.entry(), e);
|
|
3136
3167
|
}
|
|
3137
3168
|
async refreshLoop() {
|
|
3138
3169
|
for (; !this.destroyed; )
|
|
3139
3170
|
try {
|
|
3140
|
-
await
|
|
3171
|
+
await it(this.env.pl, this.rid, (e) => {
|
|
3141
3172
|
e.doRefresh(this.env.ops.stagingRenderingRate);
|
|
3142
3173
|
}), await this.activeConfigs.getValue(), await Vr(this.env.ops.projectRefreshInterval, this.abortController.signal);
|
|
3143
3174
|
} catch (e) {
|
|
3144
|
-
if (
|
|
3175
|
+
if (js(e)) {
|
|
3145
3176
|
console.warn(
|
|
3146
3177
|
"project refresh routine terminated, because project was externally deleted"
|
|
3147
3178
|
);
|
|
3148
3179
|
break;
|
|
3149
|
-
} else if (!
|
|
3180
|
+
} else if (!xs(e))
|
|
3150
3181
|
throw new Error("Unexpected exception", { cause: e });
|
|
3151
3182
|
}
|
|
3152
3183
|
}
|
|
@@ -3163,7 +3194,7 @@ class At {
|
|
|
3163
3194
|
* */
|
|
3164
3195
|
async addBlock(e, t, r, o = void 0, n = Fe()) {
|
|
3165
3196
|
const i = await this.env.bpPreparer.prepare(t), c = await this.env.bpPreparer.getBlockConfigContainer(t), a = Ar(c);
|
|
3166
|
-
return await
|
|
3197
|
+
return await Y(
|
|
3167
3198
|
this.env.pl,
|
|
3168
3199
|
this.rid,
|
|
3169
3200
|
o,
|
|
@@ -3188,7 +3219,7 @@ class At {
|
|
|
3188
3219
|
* */
|
|
3189
3220
|
async updateBlockPack(e, t, r = !1, o) {
|
|
3190
3221
|
const n = await this.env.bpPreparer.prepare(t), i = await this.env.bpPreparer.getBlockConfigContainer(t);
|
|
3191
|
-
await
|
|
3222
|
+
await Y(
|
|
3192
3223
|
this.env.pl,
|
|
3193
3224
|
this.rid,
|
|
3194
3225
|
o,
|
|
@@ -3201,7 +3232,7 @@ class At {
|
|
|
3201
3232
|
}
|
|
3202
3233
|
/** Deletes a block with all associated data. */
|
|
3203
3234
|
async deleteBlock(e, t) {
|
|
3204
|
-
await
|
|
3235
|
+
await Y(this.env.pl, this.rid, t, (r) => r.deleteBlock(e)), this.navigationStates.deleteBlock(e), await this.projectTree.refreshState();
|
|
3205
3236
|
}
|
|
3206
3237
|
/**
|
|
3207
3238
|
* Updates block order according to the given array of block ids.
|
|
@@ -3210,7 +3241,7 @@ class At {
|
|
|
3210
3241
|
* an error will be thrown instead.
|
|
3211
3242
|
*/
|
|
3212
3243
|
async reorderBlocks(e, t) {
|
|
3213
|
-
await
|
|
3244
|
+
await Y(this.env.pl, this.rid, t, (r) => {
|
|
3214
3245
|
const o = r.structure;
|
|
3215
3246
|
if (o.groups.length !== 1)
|
|
3216
3247
|
throw new Error("Unexpected project structure, non-sinular block group");
|
|
@@ -3240,7 +3271,7 @@ class At {
|
|
|
3240
3271
|
* stale state.
|
|
3241
3272
|
* */
|
|
3242
3273
|
async runBlock(e) {
|
|
3243
|
-
await
|
|
3274
|
+
await it(this.env.pl, this.rid, (t) => t.renderProduction([e], !0)), await this.projectTree.refreshState();
|
|
3244
3275
|
}
|
|
3245
3276
|
/**
|
|
3246
3277
|
* Stops the block if it is running by destroying its production state. All
|
|
@@ -3248,7 +3279,7 @@ class At {
|
|
|
3248
3279
|
* calculated.
|
|
3249
3280
|
* */
|
|
3250
3281
|
async stopBlock(e) {
|
|
3251
|
-
await
|
|
3282
|
+
await it(this.env.pl, this.rid, (t) => t.stopProduction(e)), await this.projectTree.refreshState();
|
|
3252
3283
|
}
|
|
3253
3284
|
// /** Update block label. */
|
|
3254
3285
|
// public async setBlockLabel(blockId: string, label: string, author?: AuthorMarker) {
|
|
@@ -3264,7 +3295,7 @@ class At {
|
|
|
3264
3295
|
* in collaborative editing scenario.
|
|
3265
3296
|
* */
|
|
3266
3297
|
async setBlockArgs(e, t, r) {
|
|
3267
|
-
await
|
|
3298
|
+
await Y(
|
|
3268
3299
|
this.env.pl,
|
|
3269
3300
|
this.rid,
|
|
3270
3301
|
r,
|
|
@@ -3278,7 +3309,7 @@ class At {
|
|
|
3278
3309
|
* in collaborative editing scenario.
|
|
3279
3310
|
* */
|
|
3280
3311
|
async setUiState(e, t, r) {
|
|
3281
|
-
await
|
|
3312
|
+
await Y(
|
|
3282
3313
|
this.env.pl,
|
|
3283
3314
|
this.rid,
|
|
3284
3315
|
r,
|
|
@@ -3298,21 +3329,27 @@ class At {
|
|
|
3298
3329
|
* in collaborative editing scenario.
|
|
3299
3330
|
* */
|
|
3300
3331
|
async setBlockArgsAndUiState(e, t, r, o) {
|
|
3301
|
-
await
|
|
3332
|
+
await Y(this.env.pl, this.rid, o, (n) => {
|
|
3302
3333
|
n.setArgs([{ blockId: e, args: JSON.stringify(t) }]), n.setUiState(e, JSON.stringify(r));
|
|
3303
3334
|
}), await this.projectTree.refreshState();
|
|
3304
3335
|
}
|
|
3336
|
+
/** Update block settings */
|
|
3337
|
+
async setBlockSettings(e, t) {
|
|
3338
|
+
await Y(this.env.pl, this.rid, void 0, (r) => {
|
|
3339
|
+
r.setBlockSettings(e, t);
|
|
3340
|
+
}), await this.projectTree.refreshState();
|
|
3341
|
+
}
|
|
3305
3342
|
/** Resets arguments and ui state of the block to initial state */
|
|
3306
3343
|
async resetBlockArgsAndUiState(e, t) {
|
|
3307
3344
|
await this.env.pl.withWriteTx("BlockInputsReset", async (r) => {
|
|
3308
|
-
const o =
|
|
3345
|
+
const o = gt(
|
|
3309
3346
|
(await r.getField(j(this.rid, U(e, "blockPack")))).value
|
|
3310
|
-
), n =
|
|
3311
|
-
(await r.getField(j(o,
|
|
3347
|
+
), n = gt(
|
|
3348
|
+
(await r.getField(j(o, L.HolderRefField))).value
|
|
3312
3349
|
), i = await r.getResourceData(n, !1), c = JSON.parse(
|
|
3313
3350
|
Buffer.from(B(i.data)).toString("utf-8")
|
|
3314
3351
|
);
|
|
3315
|
-
await
|
|
3352
|
+
await Y(r, this.rid, t, (a) => {
|
|
3316
3353
|
a.setArgs([{ blockId: e, args: JSON.stringify(c.config.initialArgs) }]), a.setUiState(e, void 0);
|
|
3317
3354
|
}), await r.commit();
|
|
3318
3355
|
}), await this.projectTree.refreshState();
|
|
@@ -3320,7 +3357,7 @@ class At {
|
|
|
3320
3357
|
getBlockComputables(e) {
|
|
3321
3358
|
const t = this.blockComputables.get(e);
|
|
3322
3359
|
if (t === void 0) {
|
|
3323
|
-
const r =
|
|
3360
|
+
const r = si(this.projectTree.entry(), e, this.env), n = {
|
|
3324
3361
|
fullState: V.make(
|
|
3325
3362
|
(i) => ({
|
|
3326
3363
|
argsAndUiState: is(this.projectTree.entry(), e, i),
|
|
@@ -3354,7 +3391,7 @@ class At {
|
|
|
3354
3391
|
getBlockFrontend(e) {
|
|
3355
3392
|
const t = this.blockFrontends.get(e);
|
|
3356
3393
|
if (t === void 0) {
|
|
3357
|
-
const r =
|
|
3394
|
+
const r = ri(
|
|
3358
3395
|
this.projectTree.entry(),
|
|
3359
3396
|
e,
|
|
3360
3397
|
this.env
|
|
@@ -3379,14 +3416,14 @@ class At {
|
|
|
3379
3416
|
t,
|
|
3380
3417
|
{
|
|
3381
3418
|
...e.ops.defaultTreeOptions,
|
|
3382
|
-
pruning:
|
|
3419
|
+
pruning: ii
|
|
3383
3420
|
},
|
|
3384
3421
|
e.logger
|
|
3385
3422
|
);
|
|
3386
|
-
return new
|
|
3423
|
+
return new Lt(e, t, r);
|
|
3387
3424
|
}
|
|
3388
3425
|
}
|
|
3389
|
-
function
|
|
3426
|
+
function ii(s) {
|
|
3390
3427
|
switch (s.type.name) {
|
|
3391
3428
|
case "BlockPackCustom":
|
|
3392
3429
|
return s.fields.filter((e) => e.name !== "template");
|
|
@@ -3399,7 +3436,7 @@ function ni(s) {
|
|
|
3399
3436
|
}
|
|
3400
3437
|
}
|
|
3401
3438
|
const as = {
|
|
3402
|
-
logger: new
|
|
3439
|
+
logger: new Fs(),
|
|
3403
3440
|
blobDriverOps: {
|
|
3404
3441
|
cacheSoftSizeBytes: 100 * 1024 * 1024,
|
|
3405
3442
|
// 100MB
|
|
@@ -3422,7 +3459,7 @@ function cs(s) {
|
|
|
3422
3459
|
blobDownloadPath: H.join(s, "download")
|
|
3423
3460
|
};
|
|
3424
3461
|
}
|
|
3425
|
-
const
|
|
3462
|
+
const ai = {
|
|
3426
3463
|
...as,
|
|
3427
3464
|
defaultTreeOptions: {
|
|
3428
3465
|
pollingInterval: 350,
|
|
@@ -3432,18 +3469,18 @@ const ii = {
|
|
|
3432
3469
|
projectRefreshInterval: 700,
|
|
3433
3470
|
stagingRenderingRate: 5
|
|
3434
3471
|
};
|
|
3435
|
-
function
|
|
3472
|
+
function ci(s) {
|
|
3436
3473
|
return {
|
|
3437
3474
|
...cs(s),
|
|
3438
3475
|
frontendDownloadPath: H.join(s, "frontend")
|
|
3439
3476
|
};
|
|
3440
3477
|
}
|
|
3441
|
-
function
|
|
3478
|
+
function li(s) {
|
|
3442
3479
|
return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
|
|
3443
3480
|
}
|
|
3444
|
-
var
|
|
3445
|
-
const
|
|
3446
|
-
9007199254740991,
|
|
3481
|
+
var Et = { exports: {} };
|
|
3482
|
+
const ui = "2.0.0", ls = 256, di = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
|
|
3483
|
+
9007199254740991, pi = 16, hi = ls - 6, fi = [
|
|
3447
3484
|
"major",
|
|
3448
3485
|
"premajor",
|
|
3449
3486
|
"minor",
|
|
@@ -3454,17 +3491,17 @@ const li = "2.0.0", ls = 256, ui = Number.MAX_SAFE_INTEGER || /* istanbul ignore
|
|
|
3454
3491
|
];
|
|
3455
3492
|
var Ye = {
|
|
3456
3493
|
MAX_LENGTH: ls,
|
|
3457
|
-
MAX_SAFE_COMPONENT_LENGTH:
|
|
3458
|
-
MAX_SAFE_BUILD_LENGTH:
|
|
3459
|
-
MAX_SAFE_INTEGER:
|
|
3460
|
-
RELEASE_TYPES:
|
|
3461
|
-
SEMVER_SPEC_VERSION:
|
|
3494
|
+
MAX_SAFE_COMPONENT_LENGTH: pi,
|
|
3495
|
+
MAX_SAFE_BUILD_LENGTH: hi,
|
|
3496
|
+
MAX_SAFE_INTEGER: di,
|
|
3497
|
+
RELEASE_TYPES: fi,
|
|
3498
|
+
SEMVER_SPEC_VERSION: ui,
|
|
3462
3499
|
FLAG_INCLUDE_PRERELEASE: 1,
|
|
3463
3500
|
FLAG_LOOSE: 2
|
|
3464
3501
|
};
|
|
3465
|
-
const
|
|
3502
|
+
const gi = typeof process == "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...s) => console.error("SEMVER", ...s) : () => {
|
|
3466
3503
|
};
|
|
3467
|
-
var Qe =
|
|
3504
|
+
var Qe = gi;
|
|
3468
3505
|
(function(s, e) {
|
|
3469
3506
|
const {
|
|
3470
3507
|
MAX_SAFE_COMPONENT_LENGTH: t,
|
|
@@ -3474,35 +3511,35 @@ var Qe = fi;
|
|
|
3474
3511
|
e = s.exports = {};
|
|
3475
3512
|
const i = e.re = [], c = e.safeRe = [], a = e.src = [], l = e.t = {};
|
|
3476
3513
|
let u = 0;
|
|
3477
|
-
const d = "[a-zA-Z0-9-]",
|
|
3514
|
+
const d = "[a-zA-Z0-9-]", f = [
|
|
3478
3515
|
["\\s", 1],
|
|
3479
3516
|
["\\d", o],
|
|
3480
3517
|
[d, r]
|
|
3481
|
-
], h = (
|
|
3482
|
-
for (const [F,
|
|
3483
|
-
|
|
3484
|
-
return
|
|
3485
|
-
},
|
|
3486
|
-
const _ = h(F),
|
|
3487
|
-
n(
|
|
3518
|
+
], h = (E) => {
|
|
3519
|
+
for (const [F, N] of f)
|
|
3520
|
+
E = E.split(`${F}*`).join(`${F}{0,${N}}`).split(`${F}+`).join(`${F}{1,${N}}`);
|
|
3521
|
+
return E;
|
|
3522
|
+
}, g = (E, F, N) => {
|
|
3523
|
+
const _ = h(F), P = u++;
|
|
3524
|
+
n(E, P, F), l[E] = P, a[P] = F, i[P] = new RegExp(F, N ? "g" : void 0), c[P] = new RegExp(_, N ? "g" : void 0);
|
|
3488
3525
|
};
|
|
3489
|
-
|
|
3490
|
-
})(
|
|
3491
|
-
var De =
|
|
3492
|
-
const
|
|
3493
|
-
var
|
|
3526
|
+
g("NUMERICIDENTIFIER", "0|[1-9]\\d*"), g("NUMERICIDENTIFIERLOOSE", "\\d+"), g("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${d}*`), g("MAINVERSION", `(${a[l.NUMERICIDENTIFIER]})\\.(${a[l.NUMERICIDENTIFIER]})\\.(${a[l.NUMERICIDENTIFIER]})`), g("MAINVERSIONLOOSE", `(${a[l.NUMERICIDENTIFIERLOOSE]})\\.(${a[l.NUMERICIDENTIFIERLOOSE]})\\.(${a[l.NUMERICIDENTIFIERLOOSE]})`), g("PRERELEASEIDENTIFIER", `(?:${a[l.NUMERICIDENTIFIER]}|${a[l.NONNUMERICIDENTIFIER]})`), g("PRERELEASEIDENTIFIERLOOSE", `(?:${a[l.NUMERICIDENTIFIERLOOSE]}|${a[l.NONNUMERICIDENTIFIER]})`), g("PRERELEASE", `(?:-(${a[l.PRERELEASEIDENTIFIER]}(?:\\.${a[l.PRERELEASEIDENTIFIER]})*))`), g("PRERELEASELOOSE", `(?:-?(${a[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[l.PRERELEASEIDENTIFIERLOOSE]})*))`), g("BUILDIDENTIFIER", `${d}+`), g("BUILD", `(?:\\+(${a[l.BUILDIDENTIFIER]}(?:\\.${a[l.BUILDIDENTIFIER]})*))`), g("FULLPLAIN", `v?${a[l.MAINVERSION]}${a[l.PRERELEASE]}?${a[l.BUILD]}?`), g("FULL", `^${a[l.FULLPLAIN]}$`), g("LOOSEPLAIN", `[v=\\s]*${a[l.MAINVERSIONLOOSE]}${a[l.PRERELEASELOOSE]}?${a[l.BUILD]}?`), g("LOOSE", `^${a[l.LOOSEPLAIN]}$`), g("GTLT", "((?:<|>)?=?)"), g("XRANGEIDENTIFIERLOOSE", `${a[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), g("XRANGEIDENTIFIER", `${a[l.NUMERICIDENTIFIER]}|x|X|\\*`), g("XRANGEPLAIN", `[v=\\s]*(${a[l.XRANGEIDENTIFIER]})(?:\\.(${a[l.XRANGEIDENTIFIER]})(?:\\.(${a[l.XRANGEIDENTIFIER]})(?:${a[l.PRERELEASE]})?${a[l.BUILD]}?)?)?`), g("XRANGEPLAINLOOSE", `[v=\\s]*(${a[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[l.XRANGEIDENTIFIERLOOSE]})(?:${a[l.PRERELEASELOOSE]})?${a[l.BUILD]}?)?)?`), g("XRANGE", `^${a[l.GTLT]}\\s*${a[l.XRANGEPLAIN]}$`), g("XRANGELOOSE", `^${a[l.GTLT]}\\s*${a[l.XRANGEPLAINLOOSE]}$`), g("COERCEPLAIN", `(^|[^\\d])(\\d{1,${t}})(?:\\.(\\d{1,${t}}))?(?:\\.(\\d{1,${t}}))?`), g("COERCE", `${a[l.COERCEPLAIN]}(?:$|[^\\d])`), g("COERCEFULL", a[l.COERCEPLAIN] + `(?:${a[l.PRERELEASE]})?(?:${a[l.BUILD]})?(?:$|[^\\d])`), g("COERCERTL", a[l.COERCE], !0), g("COERCERTLFULL", a[l.COERCEFULL], !0), g("LONETILDE", "(?:~>?)"), g("TILDETRIM", `(\\s*)${a[l.LONETILDE]}\\s+`, !0), e.tildeTrimReplace = "$1~", g("TILDE", `^${a[l.LONETILDE]}${a[l.XRANGEPLAIN]}$`), g("TILDELOOSE", `^${a[l.LONETILDE]}${a[l.XRANGEPLAINLOOSE]}$`), g("LONECARET", "(?:\\^)"), g("CARETTRIM", `(\\s*)${a[l.LONECARET]}\\s+`, !0), e.caretTrimReplace = "$1^", g("CARET", `^${a[l.LONECARET]}${a[l.XRANGEPLAIN]}$`), g("CARETLOOSE", `^${a[l.LONECARET]}${a[l.XRANGEPLAINLOOSE]}$`), g("COMPARATORLOOSE", `^${a[l.GTLT]}\\s*(${a[l.LOOSEPLAIN]})$|^$`), g("COMPARATOR", `^${a[l.GTLT]}\\s*(${a[l.FULLPLAIN]})$|^$`), g("COMPARATORTRIM", `(\\s*)${a[l.GTLT]}\\s*(${a[l.LOOSEPLAIN]}|${a[l.XRANGEPLAIN]})`, !0), e.comparatorTrimReplace = "$1$2$3", g("HYPHENRANGE", `^\\s*(${a[l.XRANGEPLAIN]})\\s+-\\s+(${a[l.XRANGEPLAIN]})\\s*$`), g("HYPHENRANGELOOSE", `^\\s*(${a[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[l.XRANGEPLAINLOOSE]})\\s*$`), g("STAR", "(<|>)?=?\\s*\\*"), g("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), g("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
3527
|
+
})(Et, Et.exports);
|
|
3528
|
+
var De = Et.exports;
|
|
3529
|
+
const mi = Object.freeze({ loose: !0 }), vi = Object.freeze({}), yi = (s) => s ? typeof s != "object" ? mi : s : vi;
|
|
3530
|
+
var Nt = yi;
|
|
3494
3531
|
const ar = /^[0-9]+$/, us = (s, e) => {
|
|
3495
3532
|
const t = ar.test(s), r = ar.test(e);
|
|
3496
3533
|
return t && r && (s = +s, e = +e), s === e ? 0 : t && !r ? -1 : r && !t ? 1 : s < e ? -1 : 1;
|
|
3497
|
-
},
|
|
3534
|
+
}, wi = (s, e) => us(e, s);
|
|
3498
3535
|
var ds = {
|
|
3499
3536
|
compareIdentifiers: us,
|
|
3500
|
-
rcompareIdentifiers:
|
|
3537
|
+
rcompareIdentifiers: wi
|
|
3501
3538
|
};
|
|
3502
|
-
const Ue = Qe, { MAX_LENGTH: cr, MAX_SAFE_INTEGER: Je } = Ye, { safeRe: lr, t: ur } = De,
|
|
3503
|
-
let
|
|
3539
|
+
const Ue = Qe, { MAX_LENGTH: cr, MAX_SAFE_INTEGER: Je } = Ye, { safeRe: lr, t: ur } = De, Si = Nt, { compareIdentifiers: ge } = ds;
|
|
3540
|
+
let bi = class ee {
|
|
3504
3541
|
constructor(e, t) {
|
|
3505
|
-
if (t =
|
|
3542
|
+
if (t = Si(t), e instanceof ee) {
|
|
3506
3543
|
if (e.loose === !!t.loose && e.includePrerelease === !!t.includePrerelease)
|
|
3507
3544
|
return e;
|
|
3508
3545
|
e = e.version;
|
|
@@ -3538,18 +3575,18 @@ let Si = class Z {
|
|
|
3538
3575
|
return this.version;
|
|
3539
3576
|
}
|
|
3540
3577
|
compare(e) {
|
|
3541
|
-
if (Ue("SemVer.compare", this.version, this.options, e), !(e instanceof
|
|
3578
|
+
if (Ue("SemVer.compare", this.version, this.options, e), !(e instanceof ee)) {
|
|
3542
3579
|
if (typeof e == "string" && e === this.version)
|
|
3543
3580
|
return 0;
|
|
3544
|
-
e = new
|
|
3581
|
+
e = new ee(e, this.options);
|
|
3545
3582
|
}
|
|
3546
3583
|
return e.version === this.version ? 0 : this.compareMain(e) || this.comparePre(e);
|
|
3547
3584
|
}
|
|
3548
3585
|
compareMain(e) {
|
|
3549
|
-
return e instanceof
|
|
3586
|
+
return e instanceof ee || (e = new ee(e, this.options)), ge(this.major, e.major) || ge(this.minor, e.minor) || ge(this.patch, e.patch);
|
|
3550
3587
|
}
|
|
3551
3588
|
comparePre(e) {
|
|
3552
|
-
if (e instanceof
|
|
3589
|
+
if (e instanceof ee || (e = new ee(e, this.options)), this.prerelease.length && !e.prerelease.length)
|
|
3553
3590
|
return -1;
|
|
3554
3591
|
if (!this.prerelease.length && e.prerelease.length)
|
|
3555
3592
|
return 1;
|
|
@@ -3566,11 +3603,11 @@ let Si = class Z {
|
|
|
3566
3603
|
return -1;
|
|
3567
3604
|
if (r === o)
|
|
3568
3605
|
continue;
|
|
3569
|
-
return
|
|
3606
|
+
return ge(r, o);
|
|
3570
3607
|
} while (++t);
|
|
3571
3608
|
}
|
|
3572
3609
|
compareBuild(e) {
|
|
3573
|
-
e instanceof
|
|
3610
|
+
e instanceof ee || (e = new ee(e, this.options));
|
|
3574
3611
|
let t = 0;
|
|
3575
3612
|
do {
|
|
3576
3613
|
const r = this.build[t], o = e.build[t];
|
|
@@ -3582,7 +3619,7 @@ let Si = class Z {
|
|
|
3582
3619
|
return -1;
|
|
3583
3620
|
if (r === o)
|
|
3584
3621
|
continue;
|
|
3585
|
-
return
|
|
3622
|
+
return ge(r, o);
|
|
3586
3623
|
} while (++t);
|
|
3587
3624
|
}
|
|
3588
3625
|
// preminor will bump the version up to the next minor release, and immediately
|
|
@@ -3628,7 +3665,7 @@ let Si = class Z {
|
|
|
3628
3665
|
}
|
|
3629
3666
|
if (t) {
|
|
3630
3667
|
let n = [t, o];
|
|
3631
|
-
r === !1 && (n = [t]),
|
|
3668
|
+
r === !1 && (n = [t]), ge(this.prerelease[0], t) === 0 ? isNaN(this.prerelease[1]) && (this.prerelease = n) : this.prerelease = n;
|
|
3632
3669
|
}
|
|
3633
3670
|
break;
|
|
3634
3671
|
}
|
|
@@ -3638,8 +3675,8 @@ let Si = class Z {
|
|
|
3638
3675
|
return this.raw = this.format(), this.build.length && (this.raw += `+${this.build.join(".")}`), this;
|
|
3639
3676
|
}
|
|
3640
3677
|
};
|
|
3641
|
-
var M =
|
|
3642
|
-
const dr = M,
|
|
3678
|
+
var M = bi;
|
|
3679
|
+
const dr = M, Ci = (s, e, t = !1) => {
|
|
3643
3680
|
if (s instanceof dr)
|
|
3644
3681
|
return s;
|
|
3645
3682
|
try {
|
|
@@ -3650,18 +3687,18 @@ const dr = M, bi = (s, e, t = !1) => {
|
|
|
3650
3687
|
throw r;
|
|
3651
3688
|
}
|
|
3652
3689
|
};
|
|
3653
|
-
var
|
|
3654
|
-
const Ri =
|
|
3690
|
+
var Se = Ci;
|
|
3691
|
+
const Ri = Se, Ei = (s, e) => {
|
|
3655
3692
|
const t = Ri(s, e);
|
|
3656
3693
|
return t ? t.version : null;
|
|
3657
3694
|
};
|
|
3658
|
-
var
|
|
3659
|
-
const
|
|
3660
|
-
const t =
|
|
3695
|
+
var ki = Ei;
|
|
3696
|
+
const Pi = Se, Oi = (s, e) => {
|
|
3697
|
+
const t = Pi(s.trim().replace(/^[=v]+/, ""), e);
|
|
3661
3698
|
return t ? t.version : null;
|
|
3662
3699
|
};
|
|
3663
|
-
var
|
|
3664
|
-
const pr = M,
|
|
3700
|
+
var $i = Oi;
|
|
3701
|
+
const pr = M, Ii = (s, e, t, r, o) => {
|
|
3665
3702
|
typeof t == "string" && (o = r, r = t, t = void 0);
|
|
3666
3703
|
try {
|
|
3667
3704
|
return new pr(
|
|
@@ -3672,8 +3709,8 @@ const pr = M, $i = (s, e, t, r, o) => {
|
|
|
3672
3709
|
return null;
|
|
3673
3710
|
}
|
|
3674
3711
|
};
|
|
3675
|
-
var
|
|
3676
|
-
const hr =
|
|
3712
|
+
var Fi = Ii;
|
|
3713
|
+
const hr = Se, Ti = (s, e) => {
|
|
3677
3714
|
const t = hr(s, null, !0), r = hr(e, null, !0), o = t.compare(r);
|
|
3678
3715
|
if (o === 0)
|
|
3679
3716
|
return null;
|
|
@@ -3683,46 +3720,46 @@ const hr = we, Fi = (s, e) => {
|
|
|
3683
3720
|
const u = a ? "pre" : "";
|
|
3684
3721
|
return t.major !== r.major ? u + "major" : t.minor !== r.minor ? u + "minor" : t.patch !== r.patch ? u + "patch" : "prerelease";
|
|
3685
3722
|
};
|
|
3686
|
-
var
|
|
3687
|
-
const
|
|
3688
|
-
var
|
|
3689
|
-
const
|
|
3690
|
-
var
|
|
3691
|
-
const
|
|
3692
|
-
var
|
|
3693
|
-
const
|
|
3694
|
-
const t =
|
|
3723
|
+
var Ai = Ti;
|
|
3724
|
+
const Li = M, Ni = (s, e) => new Li(s, e).major;
|
|
3725
|
+
var Di = Ni;
|
|
3726
|
+
const Bi = M, ji = (s, e) => new Bi(s, e).minor;
|
|
3727
|
+
var xi = ji;
|
|
3728
|
+
const Vi = M, Ui = (s, e) => new Vi(s, e).patch;
|
|
3729
|
+
var Ji = Ui;
|
|
3730
|
+
const Gi = Se, Mi = (s, e) => {
|
|
3731
|
+
const t = Gi(s, e);
|
|
3695
3732
|
return t && t.prerelease.length ? t.prerelease : null;
|
|
3696
3733
|
};
|
|
3697
|
-
var
|
|
3698
|
-
const fr = M,
|
|
3699
|
-
var
|
|
3700
|
-
const
|
|
3701
|
-
var
|
|
3702
|
-
const
|
|
3703
|
-
var
|
|
3704
|
-
const gr = M,
|
|
3734
|
+
var _i = Mi;
|
|
3735
|
+
const fr = M, Ki = (s, e, t) => new fr(s, t).compare(new fr(e, t));
|
|
3736
|
+
var Q = Ki;
|
|
3737
|
+
const Hi = Q, Wi = (s, e, t) => Hi(e, s, t);
|
|
3738
|
+
var qi = Wi;
|
|
3739
|
+
const Xi = Q, zi = (s, e) => Xi(s, e, !0);
|
|
3740
|
+
var Yi = zi;
|
|
3741
|
+
const gr = M, Qi = (s, e, t) => {
|
|
3705
3742
|
const r = new gr(s, t), o = new gr(e, t);
|
|
3706
3743
|
return r.compare(o) || r.compareBuild(o);
|
|
3707
3744
|
};
|
|
3708
|
-
var
|
|
3709
|
-
const
|
|
3710
|
-
var
|
|
3711
|
-
const
|
|
3712
|
-
var
|
|
3713
|
-
const
|
|
3714
|
-
var Ze =
|
|
3715
|
-
const
|
|
3716
|
-
var
|
|
3717
|
-
const
|
|
3718
|
-
var ps =
|
|
3719
|
-
const
|
|
3720
|
-
var hs =
|
|
3721
|
-
const
|
|
3722
|
-
var
|
|
3723
|
-
const
|
|
3724
|
-
var
|
|
3725
|
-
const
|
|
3745
|
+
var Dt = Qi;
|
|
3746
|
+
const Zi = Dt, ea = (s, e) => s.sort((t, r) => Zi(t, r, e));
|
|
3747
|
+
var ta = ea;
|
|
3748
|
+
const ra = Dt, sa = (s, e) => s.sort((t, r) => ra(r, t, e));
|
|
3749
|
+
var oa = sa;
|
|
3750
|
+
const na = Q, ia = (s, e, t) => na(s, e, t) > 0;
|
|
3751
|
+
var Ze = ia;
|
|
3752
|
+
const aa = Q, ca = (s, e, t) => aa(s, e, t) < 0;
|
|
3753
|
+
var Bt = ca;
|
|
3754
|
+
const la = Q, ua = (s, e, t) => la(s, e, t) === 0;
|
|
3755
|
+
var ps = ua;
|
|
3756
|
+
const da = Q, pa = (s, e, t) => da(s, e, t) !== 0;
|
|
3757
|
+
var hs = pa;
|
|
3758
|
+
const ha = Q, fa = (s, e, t) => ha(s, e, t) >= 0;
|
|
3759
|
+
var jt = fa;
|
|
3760
|
+
const ga = Q, ma = (s, e, t) => ga(s, e, t) <= 0;
|
|
3761
|
+
var xt = ma;
|
|
3762
|
+
const va = ps, ya = hs, wa = Ze, Sa = jt, ba = Bt, Ca = xt, Ra = (s, e, t, r) => {
|
|
3726
3763
|
switch (e) {
|
|
3727
3764
|
case "===":
|
|
3728
3765
|
return typeof s == "object" && (s = s.version), typeof t == "object" && (t = t.version), s === t;
|
|
@@ -3731,24 +3768,24 @@ const ma = ps, va = hs, ya = Ze, wa = Bt, Sa = Dt, ba = jt, Ra = (s, e, t, r) =>
|
|
|
3731
3768
|
case "":
|
|
3732
3769
|
case "=":
|
|
3733
3770
|
case "==":
|
|
3734
|
-
return ma(s, t, r);
|
|
3735
|
-
case "!=":
|
|
3736
3771
|
return va(s, t, r);
|
|
3737
|
-
case "
|
|
3772
|
+
case "!=":
|
|
3738
3773
|
return ya(s, t, r);
|
|
3739
|
-
case "
|
|
3774
|
+
case ">":
|
|
3740
3775
|
return wa(s, t, r);
|
|
3741
|
-
case "
|
|
3776
|
+
case ">=":
|
|
3742
3777
|
return Sa(s, t, r);
|
|
3743
|
-
case "
|
|
3778
|
+
case "<":
|
|
3744
3779
|
return ba(s, t, r);
|
|
3780
|
+
case "<=":
|
|
3781
|
+
return Ca(s, t, r);
|
|
3745
3782
|
default:
|
|
3746
3783
|
throw new TypeError(`Invalid operator: ${e}`);
|
|
3747
3784
|
}
|
|
3748
3785
|
};
|
|
3749
3786
|
var fs = Ra;
|
|
3750
|
-
const
|
|
3751
|
-
if (s instanceof
|
|
3787
|
+
const Ea = M, ka = Se, { safeRe: Ge, t: Me } = De, Pa = (s, e) => {
|
|
3788
|
+
if (s instanceof Ea)
|
|
3752
3789
|
return s;
|
|
3753
3790
|
if (typeof s == "number" && (s = String(s)), typeof s != "string")
|
|
3754
3791
|
return null;
|
|
@@ -3766,10 +3803,10 @@ const Ca = M, Ea = we, { safeRe: Ge, t: Me } = De, ka = (s, e) => {
|
|
|
3766
3803
|
if (t === null)
|
|
3767
3804
|
return null;
|
|
3768
3805
|
const r = t[2], o = t[3] || "0", n = t[4] || "0", i = e.includePrerelease && t[5] ? `-${t[5]}` : "", c = e.includePrerelease && t[6] ? `+${t[6]}` : "";
|
|
3769
|
-
return
|
|
3806
|
+
return ka(`${r}.${o}.${n}${i}${c}`, e);
|
|
3770
3807
|
};
|
|
3771
|
-
var
|
|
3772
|
-
class
|
|
3808
|
+
var Oa = Pa;
|
|
3809
|
+
class $a {
|
|
3773
3810
|
constructor() {
|
|
3774
3811
|
this.max = 1e3, this.map = /* @__PURE__ */ new Map();
|
|
3775
3812
|
}
|
|
@@ -3792,9 +3829,9 @@ class Oa {
|
|
|
3792
3829
|
return this;
|
|
3793
3830
|
}
|
|
3794
3831
|
}
|
|
3795
|
-
var
|
|
3796
|
-
function
|
|
3797
|
-
if (mr) return
|
|
3832
|
+
var Ia = $a, at, mr;
|
|
3833
|
+
function Z() {
|
|
3834
|
+
if (mr) return at;
|
|
3798
3835
|
mr = 1;
|
|
3799
3836
|
const s = /\s+/g;
|
|
3800
3837
|
class e {
|
|
@@ -3803,12 +3840,12 @@ function Q() {
|
|
|
3803
3840
|
return p.loose === !!y.loose && p.includePrerelease === !!y.includePrerelease ? p : new e(p.raw, y);
|
|
3804
3841
|
if (p instanceof n)
|
|
3805
3842
|
return this.raw = p.value, this.set = [[p]], this.formatted = void 0, this;
|
|
3806
|
-
if (this.options = y, this.loose = !!y.loose, this.includePrerelease = !!y.includePrerelease, this.raw = p.trim().replace(s, " "), this.set = this.raw.split("||").map((
|
|
3843
|
+
if (this.options = y, this.loose = !!y.loose, this.includePrerelease = !!y.includePrerelease, this.raw = p.trim().replace(s, " "), this.set = this.raw.split("||").map((m) => this.parseRange(m.trim())).filter((m) => m.length), !this.set.length)
|
|
3807
3844
|
throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
|
|
3808
3845
|
if (this.set.length > 1) {
|
|
3809
|
-
const
|
|
3810
|
-
if (this.set = this.set.filter((b) => !
|
|
3811
|
-
this.set = [
|
|
3846
|
+
const m = this.set[0];
|
|
3847
|
+
if (this.set = this.set.filter((b) => !E(b[0])), this.set.length === 0)
|
|
3848
|
+
this.set = [m];
|
|
3812
3849
|
else if (this.set.length > 1) {
|
|
3813
3850
|
for (const b of this.set)
|
|
3814
3851
|
if (b.length === 1 && F(b[0])) {
|
|
@@ -3825,8 +3862,8 @@ function Q() {
|
|
|
3825
3862
|
for (let p = 0; p < this.set.length; p++) {
|
|
3826
3863
|
p > 0 && (this.formatted += "||");
|
|
3827
3864
|
const y = this.set[p];
|
|
3828
|
-
for (let
|
|
3829
|
-
|
|
3865
|
+
for (let m = 0; m < y.length; m++)
|
|
3866
|
+
m > 0 && (this.formatted += " "), this.formatted += y[m].toString().trim();
|
|
3830
3867
|
}
|
|
3831
3868
|
}
|
|
3832
3869
|
return this.formatted;
|
|
@@ -3838,27 +3875,27 @@ function Q() {
|
|
|
3838
3875
|
return this.range;
|
|
3839
3876
|
}
|
|
3840
3877
|
parseRange(p) {
|
|
3841
|
-
const
|
|
3878
|
+
const m = ((this.options.includePrerelease && h) | (this.options.loose && g)) + ":" + p, b = r.get(m);
|
|
3842
3879
|
if (b)
|
|
3843
3880
|
return b;
|
|
3844
|
-
const w = this.options.loose,
|
|
3845
|
-
p = p.replace(
|
|
3846
|
-
let
|
|
3847
|
-
w && (
|
|
3848
|
-
const
|
|
3849
|
-
for (const
|
|
3850
|
-
if (I
|
|
3851
|
-
return [
|
|
3852
|
-
|
|
3881
|
+
const w = this.options.loose, C = w ? a[l.HYPHENRANGELOOSE] : a[l.HYPHENRANGE];
|
|
3882
|
+
p = p.replace(C, X(this.options.includePrerelease)), i("hyphen replace", p), p = p.replace(a[l.COMPARATORTRIM], u), i("comparator trim", p), p = p.replace(a[l.TILDETRIM], d), i("tilde trim", p), p = p.replace(a[l.CARETTRIM], f), i("caret trim", p);
|
|
3883
|
+
let O = p.split(" ").map((I) => _(I, this.options)).join(" ").split(/\s+/).map((I) => x(I, this.options));
|
|
3884
|
+
w && (O = O.filter((I) => (i("loose invalid filter", I, this.options), !!I.match(a[l.COMPARATORLOOSE])))), i("range list", O);
|
|
3885
|
+
const R = /* @__PURE__ */ new Map(), T = O.map((I) => new n(I, this.options));
|
|
3886
|
+
for (const I of T) {
|
|
3887
|
+
if (E(I))
|
|
3888
|
+
return [I];
|
|
3889
|
+
R.set(I.value, I);
|
|
3853
3890
|
}
|
|
3854
|
-
|
|
3855
|
-
const
|
|
3856
|
-
return r.set(
|
|
3891
|
+
R.size > 1 && R.has("") && R.delete("");
|
|
3892
|
+
const D = [...R.values()];
|
|
3893
|
+
return r.set(m, D), D;
|
|
3857
3894
|
}
|
|
3858
3895
|
intersects(p, y) {
|
|
3859
3896
|
if (!(p instanceof e))
|
|
3860
3897
|
throw new TypeError("a Range is required");
|
|
3861
|
-
return this.set.some((
|
|
3898
|
+
return this.set.some((m) => N(m, y) && p.set.some((b) => N(b, y) && m.every((w) => b.every((C) => w.intersects(C, y)))));
|
|
3862
3899
|
}
|
|
3863
3900
|
// if ANY of the sets match ALL of its comparators, then pass
|
|
3864
3901
|
test(p) {
|
|
@@ -3876,51 +3913,51 @@ function Q() {
|
|
|
3876
3913
|
return !1;
|
|
3877
3914
|
}
|
|
3878
3915
|
}
|
|
3879
|
-
|
|
3880
|
-
const t =
|
|
3916
|
+
at = e;
|
|
3917
|
+
const t = Ia, r = new t(), o = Nt, n = et(), i = Qe, c = M, {
|
|
3881
3918
|
safeRe: a,
|
|
3882
3919
|
t: l,
|
|
3883
3920
|
comparatorTrimReplace: u,
|
|
3884
3921
|
tildeTrimReplace: d,
|
|
3885
|
-
caretTrimReplace:
|
|
3886
|
-
} = De, { FLAG_INCLUDE_PRERELEASE: h, FLAG_LOOSE:
|
|
3922
|
+
caretTrimReplace: f
|
|
3923
|
+
} = De, { FLAG_INCLUDE_PRERELEASE: h, FLAG_LOOSE: g } = Ye, E = (v) => v.value === "<0.0.0-0", F = (v) => v.value === "", N = (v, p) => {
|
|
3887
3924
|
let y = !0;
|
|
3888
|
-
const
|
|
3889
|
-
let b =
|
|
3890
|
-
for (; y &&
|
|
3891
|
-
y =
|
|
3925
|
+
const m = v.slice();
|
|
3926
|
+
let b = m.pop();
|
|
3927
|
+
for (; y && m.length; )
|
|
3928
|
+
y = m.every((w) => b.intersects(w, p)), b = m.pop();
|
|
3892
3929
|
return y;
|
|
3893
|
-
}, _ = (v, p) => (i("comp", v, p), v = A(v, p), i("caret", v), v = se(v, p), i("tildes", v), v = oe(v, p), i("xrange", v), v =
|
|
3930
|
+
}, _ = (v, p) => (i("comp", v, p), v = A(v, p), i("caret", v), v = se(v, p), i("tildes", v), v = oe(v, p), i("xrange", v), v = J(v, p), i("stars", v), v), P = (v) => !v || v.toLowerCase() === "x" || v === "*", se = (v, p) => v.trim().split(/\s+/).map((y) => pe(y, p)).join(" "), pe = (v, p) => {
|
|
3894
3931
|
const y = p.loose ? a[l.TILDELOOSE] : a[l.TILDE];
|
|
3895
|
-
return v.replace(y, (
|
|
3896
|
-
i("tilde", v,
|
|
3897
|
-
let
|
|
3898
|
-
return
|
|
3932
|
+
return v.replace(y, (m, b, w, C, O) => {
|
|
3933
|
+
i("tilde", v, m, b, w, C, O);
|
|
3934
|
+
let R;
|
|
3935
|
+
return P(b) ? R = "" : P(w) ? R = `>=${b}.0.0 <${+b + 1}.0.0-0` : P(C) ? R = `>=${b}.${w}.0 <${b}.${+w + 1}.0-0` : O ? (i("replaceTilde pr", O), R = `>=${b}.${w}.${C}-${O} <${b}.${+w + 1}.0-0`) : R = `>=${b}.${w}.${C} <${b}.${+w + 1}.0-0`, i("tilde return", R), R;
|
|
3899
3936
|
});
|
|
3900
|
-
}, A = (v, p) => v.trim().split(/\s+/).map((y) =>
|
|
3937
|
+
}, A = (v, p) => v.trim().split(/\s+/).map((y) => q(y, p)).join(" "), q = (v, p) => {
|
|
3901
3938
|
i("caret", v, p);
|
|
3902
|
-
const y = p.loose ? a[l.CARETLOOSE] : a[l.CARET],
|
|
3903
|
-
return v.replace(y, (b, w,
|
|
3904
|
-
i("caret", v, b, w,
|
|
3905
|
-
let
|
|
3906
|
-
return
|
|
3939
|
+
const y = p.loose ? a[l.CARETLOOSE] : a[l.CARET], m = p.includePrerelease ? "-0" : "";
|
|
3940
|
+
return v.replace(y, (b, w, C, O, R) => {
|
|
3941
|
+
i("caret", v, b, w, C, O, R);
|
|
3942
|
+
let T;
|
|
3943
|
+
return P(w) ? T = "" : P(C) ? T = `>=${w}.0.0${m} <${+w + 1}.0.0-0` : P(O) ? w === "0" ? T = `>=${w}.${C}.0${m} <${w}.${+C + 1}.0-0` : T = `>=${w}.${C}.0${m} <${+w + 1}.0.0-0` : R ? (i("replaceCaret pr", R), w === "0" ? C === "0" ? T = `>=${w}.${C}.${O}-${R} <${w}.${C}.${+O + 1}-0` : T = `>=${w}.${C}.${O}-${R} <${w}.${+C + 1}.0-0` : T = `>=${w}.${C}.${O}-${R} <${+w + 1}.0.0-0`) : (i("no pr"), w === "0" ? C === "0" ? T = `>=${w}.${C}.${O}${m} <${w}.${C}.${+O + 1}-0` : T = `>=${w}.${C}.${O}${m} <${w}.${+C + 1}.0-0` : T = `>=${w}.${C}.${O} <${+w + 1}.0.0-0`), i("caret return", T), T;
|
|
3907
3944
|
});
|
|
3908
3945
|
}, oe = (v, p) => (i("replaceXRanges", v, p), v.split(/\s+/).map((y) => K(y, p)).join(" ")), K = (v, p) => {
|
|
3909
3946
|
v = v.trim();
|
|
3910
3947
|
const y = p.loose ? a[l.XRANGELOOSE] : a[l.XRANGE];
|
|
3911
|
-
return v.replace(y, (
|
|
3912
|
-
i("xRange", v,
|
|
3913
|
-
const
|
|
3914
|
-
return b === "=" &&
|
|
3948
|
+
return v.replace(y, (m, b, w, C, O, R) => {
|
|
3949
|
+
i("xRange", v, m, b, w, C, O, R);
|
|
3950
|
+
const T = P(w), D = T || P(C), I = D || P(O), fe = I;
|
|
3951
|
+
return b === "=" && fe && (b = ""), R = p.includePrerelease ? "-0" : "", T ? b === ">" || b === "<" ? m = "<0.0.0-0" : m = "*" : b && fe ? (D && (C = 0), O = 0, b === ">" ? (b = ">=", D ? (w = +w + 1, C = 0, O = 0) : (C = +C + 1, O = 0)) : b === "<=" && (b = "<", D ? w = +w + 1 : C = +C + 1), b === "<" && (R = "-0"), m = `${b + w}.${C}.${O}${R}`) : D ? m = `>=${w}.0.0${R} <${+w + 1}.0.0-0` : I && (m = `>=${w}.${C}.0${R} <${w}.${+C + 1}.0-0`), i("xRange return", m), m;
|
|
3915
3952
|
});
|
|
3916
|
-
},
|
|
3917
|
-
for (let
|
|
3918
|
-
if (!v[
|
|
3953
|
+
}, J = (v, p) => (i("replaceStars", v, p), v.trim().replace(a[l.STAR], "")), x = (v, p) => (i("replaceGTE0", v, p), v.trim().replace(a[p.includePrerelease ? l.GTE0PRE : l.GTE0], "")), X = (v) => (p, y, m, b, w, C, O, R, T, D, I, fe) => (P(m) ? y = "" : P(b) ? y = `>=${m}.0.0${v ? "-0" : ""}` : P(w) ? y = `>=${m}.${b}.0${v ? "-0" : ""}` : C ? y = `>=${y}` : y = `>=${y}${v ? "-0" : ""}`, P(T) ? R = "" : P(D) ? R = `<${+T + 1}.0.0-0` : P(I) ? R = `<${T}.${+D + 1}.0-0` : fe ? R = `<=${T}.${D}.${I}-${fe}` : v ? R = `<${T}.${D}.${+I + 1}-0` : R = `<=${R}`, `${y} ${R}`.trim()), he = (v, p, y) => {
|
|
3954
|
+
for (let m = 0; m < v.length; m++)
|
|
3955
|
+
if (!v[m].test(p))
|
|
3919
3956
|
return !1;
|
|
3920
3957
|
if (p.prerelease.length && !y.includePrerelease) {
|
|
3921
|
-
for (let
|
|
3922
|
-
if (i(v[
|
|
3923
|
-
const b = v[
|
|
3958
|
+
for (let m = 0; m < v.length; m++)
|
|
3959
|
+
if (i(v[m].semver), v[m].semver !== n.ANY && v[m].semver.prerelease.length > 0) {
|
|
3960
|
+
const b = v[m].semver;
|
|
3924
3961
|
if (b.major === p.major && b.minor === p.minor && b.patch === p.patch)
|
|
3925
3962
|
return !0;
|
|
3926
3963
|
}
|
|
@@ -3928,11 +3965,11 @@ function Q() {
|
|
|
3928
3965
|
}
|
|
3929
3966
|
return !0;
|
|
3930
3967
|
};
|
|
3931
|
-
return
|
|
3968
|
+
return at;
|
|
3932
3969
|
}
|
|
3933
|
-
var
|
|
3970
|
+
var ct, vr;
|
|
3934
3971
|
function et() {
|
|
3935
|
-
if (vr) return
|
|
3972
|
+
if (vr) return ct;
|
|
3936
3973
|
vr = 1;
|
|
3937
3974
|
const s = Symbol("SemVer ANY");
|
|
3938
3975
|
class e {
|
|
@@ -3948,10 +3985,10 @@ function et() {
|
|
|
3948
3985
|
u = u.trim().split(/\s+/).join(" "), i("comparator", u, d), this.options = d, this.loose = !!d.loose, this.parse(u), this.semver === s ? this.value = "" : this.value = this.operator + this.semver.version, i("comp", this);
|
|
3949
3986
|
}
|
|
3950
3987
|
parse(u) {
|
|
3951
|
-
const d = this.options.loose ? r[o.COMPARATORLOOSE] : r[o.COMPARATOR],
|
|
3952
|
-
if (!
|
|
3988
|
+
const d = this.options.loose ? r[o.COMPARATORLOOSE] : r[o.COMPARATOR], f = u.match(d);
|
|
3989
|
+
if (!f)
|
|
3953
3990
|
throw new TypeError(`Invalid comparator: ${u}`);
|
|
3954
|
-
this.operator =
|
|
3991
|
+
this.operator = f[1] !== void 0 ? f[1] : "", this.operator === "=" && (this.operator = ""), f[2] ? this.semver = new c(f[2], this.options.loose) : this.semver = s;
|
|
3955
3992
|
}
|
|
3956
3993
|
toString() {
|
|
3957
3994
|
return this.value;
|
|
@@ -3973,56 +4010,56 @@ function et() {
|
|
|
3973
4010
|
return this.operator === "" ? this.value === "" ? !0 : new a(u.value, d).test(this.value) : u.operator === "" ? u.value === "" ? !0 : new a(this.value, d).test(u.semver) : (d = t(d), d.includePrerelease && (this.value === "<0.0.0-0" || u.value === "<0.0.0-0") || !d.includePrerelease && (this.value.startsWith("<0.0.0") || u.value.startsWith("<0.0.0")) ? !1 : !!(this.operator.startsWith(">") && u.operator.startsWith(">") || this.operator.startsWith("<") && u.operator.startsWith("<") || this.semver.version === u.semver.version && this.operator.includes("=") && u.operator.includes("=") || n(this.semver, "<", u.semver, d) && this.operator.startsWith(">") && u.operator.startsWith("<") || n(this.semver, ">", u.semver, d) && this.operator.startsWith("<") && u.operator.startsWith(">")));
|
|
3974
4011
|
}
|
|
3975
4012
|
}
|
|
3976
|
-
|
|
3977
|
-
const t =
|
|
3978
|
-
return
|
|
4013
|
+
ct = e;
|
|
4014
|
+
const t = Nt, { safeRe: r, t: o } = De, n = fs, i = Qe, c = M, a = Z();
|
|
4015
|
+
return ct;
|
|
3979
4016
|
}
|
|
3980
|
-
const
|
|
4017
|
+
const Fa = Z(), Ta = (s, e, t) => {
|
|
3981
4018
|
try {
|
|
3982
|
-
e = new
|
|
4019
|
+
e = new Fa(e, t);
|
|
3983
4020
|
} catch {
|
|
3984
4021
|
return !1;
|
|
3985
4022
|
}
|
|
3986
4023
|
return e.test(s);
|
|
3987
4024
|
};
|
|
3988
|
-
var tt =
|
|
3989
|
-
const
|
|
3990
|
-
var
|
|
3991
|
-
const
|
|
4025
|
+
var tt = Ta;
|
|
4026
|
+
const Aa = Z(), La = (s, e) => new Aa(s, e).set.map((t) => t.map((r) => r.value).join(" ").trim().split(" "));
|
|
4027
|
+
var Na = La;
|
|
4028
|
+
const Da = M, Ba = Z(), ja = (s, e, t) => {
|
|
3992
4029
|
let r = null, o = null, n = null;
|
|
3993
4030
|
try {
|
|
3994
|
-
n = new
|
|
4031
|
+
n = new Ba(e, t);
|
|
3995
4032
|
} catch {
|
|
3996
4033
|
return null;
|
|
3997
4034
|
}
|
|
3998
4035
|
return s.forEach((i) => {
|
|
3999
|
-
n.test(i) && (!r || o.compare(i) === -1) && (r = i, o = new
|
|
4036
|
+
n.test(i) && (!r || o.compare(i) === -1) && (r = i, o = new Da(r, t));
|
|
4000
4037
|
}), r;
|
|
4001
4038
|
};
|
|
4002
|
-
var
|
|
4003
|
-
const
|
|
4039
|
+
var xa = ja;
|
|
4040
|
+
const Va = M, Ua = Z(), Ja = (s, e, t) => {
|
|
4004
4041
|
let r = null, o = null, n = null;
|
|
4005
4042
|
try {
|
|
4006
|
-
n = new
|
|
4043
|
+
n = new Ua(e, t);
|
|
4007
4044
|
} catch {
|
|
4008
4045
|
return null;
|
|
4009
4046
|
}
|
|
4010
4047
|
return s.forEach((i) => {
|
|
4011
|
-
n.test(i) && (!r || o.compare(i) === 1) && (r = i, o = new
|
|
4048
|
+
n.test(i) && (!r || o.compare(i) === 1) && (r = i, o = new Va(r, t));
|
|
4012
4049
|
}), r;
|
|
4013
4050
|
};
|
|
4014
|
-
var
|
|
4015
|
-
const
|
|
4016
|
-
s = new
|
|
4017
|
-
let t = new
|
|
4018
|
-
if (s.test(t) || (t = new
|
|
4051
|
+
var Ga = Ja;
|
|
4052
|
+
const lt = M, Ma = Z(), yr = Ze, _a = (s, e) => {
|
|
4053
|
+
s = new Ma(s, e);
|
|
4054
|
+
let t = new lt("0.0.0");
|
|
4055
|
+
if (s.test(t) || (t = new lt("0.0.0-0"), s.test(t)))
|
|
4019
4056
|
return t;
|
|
4020
4057
|
t = null;
|
|
4021
4058
|
for (let r = 0; r < s.set.length; ++r) {
|
|
4022
4059
|
const o = s.set[r];
|
|
4023
4060
|
let n = null;
|
|
4024
4061
|
o.forEach((i) => {
|
|
4025
|
-
const c = new
|
|
4062
|
+
const c = new lt(i.semver.version);
|
|
4026
4063
|
switch (i.operator) {
|
|
4027
4064
|
case ">":
|
|
4028
4065
|
c.prerelease.length === 0 ? c.patch++ : c.prerelease.push(0), c.raw = c.format();
|
|
@@ -4040,56 +4077,56 @@ const ct = M, Ga = Q(), yr = Ze, Ma = (s, e) => {
|
|
|
4040
4077
|
}
|
|
4041
4078
|
return t && s.test(t) ? t : null;
|
|
4042
4079
|
};
|
|
4043
|
-
var
|
|
4044
|
-
const
|
|
4080
|
+
var Ka = _a;
|
|
4081
|
+
const Ha = Z(), Wa = (s, e) => {
|
|
4045
4082
|
try {
|
|
4046
|
-
return new
|
|
4083
|
+
return new Ha(s, e).range || "*";
|
|
4047
4084
|
} catch {
|
|
4048
4085
|
return null;
|
|
4049
4086
|
}
|
|
4050
4087
|
};
|
|
4051
|
-
var
|
|
4052
|
-
const
|
|
4053
|
-
s = new
|
|
4088
|
+
var qa = Wa;
|
|
4089
|
+
const Xa = M, gs = et(), { ANY: za } = gs, Ya = Z(), Qa = tt, wr = Ze, Sr = Bt, Za = xt, ec = jt, tc = (s, e, t, r) => {
|
|
4090
|
+
s = new Xa(s, r), e = new Ya(e, r);
|
|
4054
4091
|
let o, n, i, c, a;
|
|
4055
4092
|
switch (t) {
|
|
4056
4093
|
case ">":
|
|
4057
|
-
o = wr, n =
|
|
4094
|
+
o = wr, n = Za, i = Sr, c = ">", a = ">=";
|
|
4058
4095
|
break;
|
|
4059
4096
|
case "<":
|
|
4060
|
-
o = Sr, n =
|
|
4097
|
+
o = Sr, n = ec, i = wr, c = "<", a = "<=";
|
|
4061
4098
|
break;
|
|
4062
4099
|
default:
|
|
4063
4100
|
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
|
4064
4101
|
}
|
|
4065
|
-
if (
|
|
4102
|
+
if (Qa(s, e, r))
|
|
4066
4103
|
return !1;
|
|
4067
4104
|
for (let l = 0; l < e.set.length; ++l) {
|
|
4068
4105
|
const u = e.set[l];
|
|
4069
|
-
let d = null,
|
|
4106
|
+
let d = null, f = null;
|
|
4070
4107
|
if (u.forEach((h) => {
|
|
4071
|
-
h.semver ===
|
|
4072
|
-
}), d.operator === c || d.operator === a || (!
|
|
4108
|
+
h.semver === za && (h = new gs(">=0.0.0")), d = d || h, f = f || h, o(h.semver, d.semver, r) ? d = h : i(h.semver, f.semver, r) && (f = h);
|
|
4109
|
+
}), d.operator === c || d.operator === a || (!f.operator || f.operator === c) && n(s, f.semver))
|
|
4073
4110
|
return !1;
|
|
4074
|
-
if (
|
|
4111
|
+
if (f.operator === a && i(s, f.semver))
|
|
4075
4112
|
return !1;
|
|
4076
4113
|
}
|
|
4077
4114
|
return !0;
|
|
4078
4115
|
};
|
|
4079
|
-
var
|
|
4080
|
-
const
|
|
4081
|
-
var
|
|
4082
|
-
const
|
|
4083
|
-
var
|
|
4084
|
-
const br =
|
|
4085
|
-
var
|
|
4086
|
-
const
|
|
4087
|
-
var
|
|
4116
|
+
var Vt = tc;
|
|
4117
|
+
const rc = Vt, sc = (s, e, t) => rc(s, e, ">", t);
|
|
4118
|
+
var oc = sc;
|
|
4119
|
+
const nc = Vt, ic = (s, e, t) => nc(s, e, "<", t);
|
|
4120
|
+
var ac = ic;
|
|
4121
|
+
const br = Z(), cc = (s, e, t) => (s = new br(s, t), e = new br(e, t), s.intersects(e, t));
|
|
4122
|
+
var lc = cc;
|
|
4123
|
+
const uc = tt, dc = Q;
|
|
4124
|
+
var pc = (s, e, t) => {
|
|
4088
4125
|
const r = [];
|
|
4089
4126
|
let o = null, n = null;
|
|
4090
|
-
const i = s.sort((u, d) =>
|
|
4127
|
+
const i = s.sort((u, d) => dc(u, d, t));
|
|
4091
4128
|
for (const u of i)
|
|
4092
|
-
|
|
4129
|
+
uc(u, e, t) ? (n = u, o || (o = u)) : (n && r.push([o, n]), n = null, o = null);
|
|
4093
4130
|
o && r.push([o, null]);
|
|
4094
4131
|
const c = [];
|
|
4095
4132
|
for (const [u, d] of r)
|
|
@@ -4097,14 +4134,14 @@ var dc = (s, e, t) => {
|
|
|
4097
4134
|
const a = c.join(" || "), l = typeof e.raw == "string" ? e.raw : String(e);
|
|
4098
4135
|
return a.length < l.length ? a : e;
|
|
4099
4136
|
};
|
|
4100
|
-
const
|
|
4137
|
+
const Cr = Z(), Ut = et(), { ANY: ut } = Ut, Ce = tt, Jt = Q, hc = (s, e, t = {}) => {
|
|
4101
4138
|
if (s === e)
|
|
4102
4139
|
return !0;
|
|
4103
|
-
s = new
|
|
4140
|
+
s = new Cr(s, t), e = new Cr(e, t);
|
|
4104
4141
|
let r = !1;
|
|
4105
4142
|
e: for (const o of s.set) {
|
|
4106
4143
|
for (const n of e.set) {
|
|
4107
|
-
const i =
|
|
4144
|
+
const i = gc(o, n, t);
|
|
4108
4145
|
if (r = r || i !== null, i)
|
|
4109
4146
|
continue e;
|
|
4110
4147
|
}
|
|
@@ -4112,18 +4149,18 @@ const Rr = Q(), Vt = et(), { ANY: lt } = Vt, be = tt, Ut = Y, pc = (s, e, t = {}
|
|
|
4112
4149
|
return !1;
|
|
4113
4150
|
}
|
|
4114
4151
|
return !0;
|
|
4115
|
-
},
|
|
4152
|
+
}, fc = [new Ut(">=0.0.0-0")], Rr = [new Ut(">=0.0.0")], gc = (s, e, t) => {
|
|
4116
4153
|
if (s === e)
|
|
4117
4154
|
return !0;
|
|
4118
|
-
if (s.length === 1 && s[0].semver ===
|
|
4119
|
-
if (e.length === 1 && e[0].semver ===
|
|
4155
|
+
if (s.length === 1 && s[0].semver === ut) {
|
|
4156
|
+
if (e.length === 1 && e[0].semver === ut)
|
|
4120
4157
|
return !0;
|
|
4121
|
-
t.includePrerelease ? s =
|
|
4158
|
+
t.includePrerelease ? s = fc : s = Rr;
|
|
4122
4159
|
}
|
|
4123
|
-
if (e.length === 1 && e[0].semver ===
|
|
4160
|
+
if (e.length === 1 && e[0].semver === ut) {
|
|
4124
4161
|
if (t.includePrerelease)
|
|
4125
4162
|
return !0;
|
|
4126
|
-
e =
|
|
4163
|
+
e = Rr;
|
|
4127
4164
|
}
|
|
4128
4165
|
const r = /* @__PURE__ */ new Set();
|
|
4129
4166
|
let o, n;
|
|
@@ -4133,203 +4170,202 @@ const Rr = Q(), Vt = et(), { ANY: lt } = Vt, be = tt, Ut = Y, pc = (s, e, t = {}
|
|
|
4133
4170
|
return null;
|
|
4134
4171
|
let i;
|
|
4135
4172
|
if (o && n) {
|
|
4136
|
-
if (i =
|
|
4173
|
+
if (i = Jt(o.semver, n.semver, t), i > 0)
|
|
4137
4174
|
return null;
|
|
4138
4175
|
if (i === 0 && (o.operator !== ">=" || n.operator !== "<="))
|
|
4139
4176
|
return null;
|
|
4140
4177
|
}
|
|
4141
4178
|
for (const h of r) {
|
|
4142
|
-
if (o && !
|
|
4179
|
+
if (o && !Ce(h, String(o), t) || n && !Ce(h, String(n), t))
|
|
4143
4180
|
return null;
|
|
4144
|
-
for (const
|
|
4145
|
-
if (!
|
|
4181
|
+
for (const g of e)
|
|
4182
|
+
if (!Ce(h, String(g), t))
|
|
4146
4183
|
return !1;
|
|
4147
4184
|
return !0;
|
|
4148
4185
|
}
|
|
4149
|
-
let c, a, l, u, d = n && !t.includePrerelease && n.semver.prerelease.length ? n.semver : !1,
|
|
4186
|
+
let c, a, l, u, d = n && !t.includePrerelease && n.semver.prerelease.length ? n.semver : !1, f = o && !t.includePrerelease && o.semver.prerelease.length ? o.semver : !1;
|
|
4150
4187
|
d && d.prerelease.length === 1 && n.operator === "<" && d.prerelease[0] === 0 && (d = !1);
|
|
4151
4188
|
for (const h of e) {
|
|
4152
4189
|
if (u = u || h.operator === ">" || h.operator === ">=", l = l || h.operator === "<" || h.operator === "<=", o) {
|
|
4153
|
-
if (
|
|
4190
|
+
if (f && h.semver.prerelease && h.semver.prerelease.length && h.semver.major === f.major && h.semver.minor === f.minor && h.semver.patch === f.patch && (f = !1), h.operator === ">" || h.operator === ">=") {
|
|
4154
4191
|
if (c = Er(o, h, t), c === h && c !== o)
|
|
4155
4192
|
return !1;
|
|
4156
|
-
} else if (o.operator === ">=" && !
|
|
4193
|
+
} else if (o.operator === ">=" && !Ce(o.semver, String(h), t))
|
|
4157
4194
|
return !1;
|
|
4158
4195
|
}
|
|
4159
4196
|
if (n) {
|
|
4160
4197
|
if (d && h.semver.prerelease && h.semver.prerelease.length && h.semver.major === d.major && h.semver.minor === d.minor && h.semver.patch === d.patch && (d = !1), h.operator === "<" || h.operator === "<=") {
|
|
4161
4198
|
if (a = kr(n, h, t), a === h && a !== n)
|
|
4162
4199
|
return !1;
|
|
4163
|
-
} else if (n.operator === "<=" && !
|
|
4200
|
+
} else if (n.operator === "<=" && !Ce(n.semver, String(h), t))
|
|
4164
4201
|
return !1;
|
|
4165
4202
|
}
|
|
4166
4203
|
if (!h.operator && (n || o) && i !== 0)
|
|
4167
4204
|
return !1;
|
|
4168
4205
|
}
|
|
4169
|
-
return !(o && l && !n && i !== 0 || n && u && !o && i !== 0 ||
|
|
4206
|
+
return !(o && l && !n && i !== 0 || n && u && !o && i !== 0 || f || d);
|
|
4170
4207
|
}, Er = (s, e, t) => {
|
|
4171
4208
|
if (!s)
|
|
4172
4209
|
return e;
|
|
4173
|
-
const r =
|
|
4210
|
+
const r = Jt(s.semver, e.semver, t);
|
|
4174
4211
|
return r > 0 ? s : r < 0 || e.operator === ">" && s.operator === ">=" ? e : s;
|
|
4175
4212
|
}, kr = (s, e, t) => {
|
|
4176
4213
|
if (!s)
|
|
4177
4214
|
return e;
|
|
4178
|
-
const r =
|
|
4215
|
+
const r = Jt(s.semver, e.semver, t);
|
|
4179
4216
|
return r < 0 ? s : r > 0 || e.operator === "<" && s.operator === "<=" ? e : s;
|
|
4180
4217
|
};
|
|
4181
|
-
var
|
|
4182
|
-
const
|
|
4183
|
-
var
|
|
4184
|
-
parse:
|
|
4185
|
-
valid:
|
|
4186
|
-
clean:
|
|
4187
|
-
inc:
|
|
4188
|
-
diff:
|
|
4218
|
+
var mc = hc;
|
|
4219
|
+
const dt = De, Pr = Ye, vc = M, Or = ds, yc = Se, wc = ki, Sc = $i, bc = Fi, Cc = Ai, Rc = Di, Ec = xi, kc = Ji, Pc = _i, Oc = Q, $c = qi, Ic = Yi, Fc = Dt, Tc = ta, Ac = oa, Lc = Ze, Nc = Bt, Dc = ps, Bc = hs, jc = jt, xc = xt, Vc = fs, Uc = Oa, Jc = et(), Gc = Z(), Mc = tt, _c = Na, Kc = xa, Hc = Ga, Wc = Ka, qc = qa, Xc = Vt, zc = oc, Yc = ac, Qc = lc, Zc = pc, el = mc;
|
|
4220
|
+
var tl = {
|
|
4221
|
+
parse: yc,
|
|
4222
|
+
valid: wc,
|
|
4223
|
+
clean: Sc,
|
|
4224
|
+
inc: bc,
|
|
4225
|
+
diff: Cc,
|
|
4189
4226
|
major: Rc,
|
|
4190
|
-
minor:
|
|
4191
|
-
patch:
|
|
4192
|
-
prerelease:
|
|
4193
|
-
compare:
|
|
4194
|
-
rcompare:
|
|
4195
|
-
compareLoose:
|
|
4196
|
-
compareBuild:
|
|
4197
|
-
sort:
|
|
4198
|
-
rsort:
|
|
4199
|
-
gt:
|
|
4200
|
-
lt:
|
|
4201
|
-
eq:
|
|
4202
|
-
neq:
|
|
4203
|
-
gte:
|
|
4204
|
-
lte:
|
|
4205
|
-
cmp:
|
|
4206
|
-
coerce:
|
|
4207
|
-
Comparator:
|
|
4208
|
-
Range:
|
|
4209
|
-
satisfies:
|
|
4210
|
-
toComparators:
|
|
4211
|
-
maxSatisfying:
|
|
4212
|
-
minSatisfying:
|
|
4213
|
-
minVersion:
|
|
4214
|
-
validRange:
|
|
4215
|
-
outside:
|
|
4216
|
-
gtr:
|
|
4217
|
-
ltr:
|
|
4218
|
-
intersects:
|
|
4219
|
-
simplifyRange:
|
|
4220
|
-
subset:
|
|
4221
|
-
SemVer:
|
|
4222
|
-
re:
|
|
4223
|
-
src:
|
|
4224
|
-
tokens:
|
|
4227
|
+
minor: Ec,
|
|
4228
|
+
patch: kc,
|
|
4229
|
+
prerelease: Pc,
|
|
4230
|
+
compare: Oc,
|
|
4231
|
+
rcompare: $c,
|
|
4232
|
+
compareLoose: Ic,
|
|
4233
|
+
compareBuild: Fc,
|
|
4234
|
+
sort: Tc,
|
|
4235
|
+
rsort: Ac,
|
|
4236
|
+
gt: Lc,
|
|
4237
|
+
lt: Nc,
|
|
4238
|
+
eq: Dc,
|
|
4239
|
+
neq: Bc,
|
|
4240
|
+
gte: jc,
|
|
4241
|
+
lte: xc,
|
|
4242
|
+
cmp: Vc,
|
|
4243
|
+
coerce: Uc,
|
|
4244
|
+
Comparator: Jc,
|
|
4245
|
+
Range: Gc,
|
|
4246
|
+
satisfies: Mc,
|
|
4247
|
+
toComparators: _c,
|
|
4248
|
+
maxSatisfying: Kc,
|
|
4249
|
+
minSatisfying: Hc,
|
|
4250
|
+
minVersion: Wc,
|
|
4251
|
+
validRange: qc,
|
|
4252
|
+
outside: Xc,
|
|
4253
|
+
gtr: zc,
|
|
4254
|
+
ltr: Yc,
|
|
4255
|
+
intersects: Qc,
|
|
4256
|
+
simplifyRange: Zc,
|
|
4257
|
+
subset: el,
|
|
4258
|
+
SemVer: vc,
|
|
4259
|
+
re: dt.re,
|
|
4260
|
+
src: dt.src,
|
|
4261
|
+
tokens: dt.t,
|
|
4225
4262
|
SEMVER_SPEC_VERSION: Pr.SEMVER_SPEC_VERSION,
|
|
4226
4263
|
RELEASE_TYPES: Pr.RELEASE_TYPES,
|
|
4227
4264
|
compareIdentifiers: Or.compareIdentifiers,
|
|
4228
4265
|
rcompareIdentifiers: Or.rcompareIdentifiers
|
|
4229
4266
|
};
|
|
4230
|
-
const
|
|
4267
|
+
const rl = /* @__PURE__ */ li(tl), sl = {
|
|
4231
4268
|
minDelay: 1500
|
|
4232
|
-
},
|
|
4233
|
-
class
|
|
4269
|
+
}, ol = "__no_updates__";
|
|
4270
|
+
class nl extends Ms {
|
|
4234
4271
|
constructor(t, r, o = {}) {
|
|
4235
|
-
super({ ...o, ...
|
|
4272
|
+
super({ ...o, ...sl }, r);
|
|
4236
4273
|
S(this, "http");
|
|
4237
4274
|
S(this, "preferredUpdateChannel");
|
|
4238
4275
|
this.registryProvider = t, this.http = o.http, this.preferredUpdateChannel = o.preferredUpdateChannel;
|
|
4239
4276
|
}
|
|
4240
4277
|
getKey(t) {
|
|
4241
|
-
switch (t.type) {
|
|
4278
|
+
switch (t.currentSpec.type) {
|
|
4242
4279
|
case "dev-v1":
|
|
4243
|
-
return `dev_1_${t.folder}_${t.mtime}`;
|
|
4280
|
+
return `dev_1_${t.currentSpec.folder}_${t.currentSpec.mtime}`;
|
|
4244
4281
|
case "dev-v2":
|
|
4245
|
-
return `dev_2_${t.folder}_${t.mtime}`;
|
|
4282
|
+
return `dev_2_${t.currentSpec.folder}_${t.currentSpec.mtime}`;
|
|
4246
4283
|
case "from-registry-v2":
|
|
4247
|
-
return `from_registry_v2_${t
|
|
4284
|
+
return `from_registry_v2_${re(t)}`;
|
|
4248
4285
|
default:
|
|
4249
|
-
return
|
|
4286
|
+
return ol;
|
|
4250
4287
|
}
|
|
4251
4288
|
}
|
|
4252
4289
|
async readValue(t) {
|
|
4290
|
+
var r, o;
|
|
4253
4291
|
try {
|
|
4254
|
-
|
|
4292
|
+
const n = t.currentSpec;
|
|
4293
|
+
switch (n.type) {
|
|
4255
4294
|
case "dev-v1":
|
|
4256
4295
|
try {
|
|
4257
|
-
const
|
|
4258
|
-
return
|
|
4259
|
-
} catch (
|
|
4260
|
-
this.logger.warn(
|
|
4261
|
-
return;
|
|
4296
|
+
const i = await Jr(n.folder);
|
|
4297
|
+
return i === n.mtime ? { suggestions: [] } : { mainSuggestion: { ...n, mtime: i }, suggestions: [] };
|
|
4298
|
+
} catch (i) {
|
|
4299
|
+
return this.logger.warn(i), { suggestions: [] };
|
|
4262
4300
|
}
|
|
4263
4301
|
case "dev-v2":
|
|
4264
4302
|
try {
|
|
4265
|
-
const
|
|
4266
|
-
if (
|
|
4267
|
-
const
|
|
4268
|
-
return
|
|
4269
|
-
} catch (
|
|
4270
|
-
this.logger.warn(
|
|
4271
|
-
return;
|
|
4303
|
+
const i = await ft(n.folder, this.logger);
|
|
4304
|
+
if (i === void 0) return { suggestions: [] };
|
|
4305
|
+
const c = await $t(i);
|
|
4306
|
+
return c === n.mtime ? { suggestions: [] } : { mainSuggestion: { ...n, mtime: c }, suggestions: [] };
|
|
4307
|
+
} catch (i) {
|
|
4308
|
+
return this.logger.warn(i), { suggestions: [] };
|
|
4272
4309
|
}
|
|
4273
4310
|
case "from-registry-v2":
|
|
4274
4311
|
try {
|
|
4275
|
-
const
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
const i = await r.getLatestOverview(t.id, ke);
|
|
4282
|
-
if (i === void 0) {
|
|
4283
|
-
this.logger.error(`No "any" channel record for ${Jt(t.id)}`);
|
|
4284
|
-
return;
|
|
4285
|
-
}
|
|
4286
|
-
o = { ...i.spec, channel: ie };
|
|
4287
|
-
}
|
|
4288
|
-
} else {
|
|
4289
|
-
const n = this.preferredUpdateChannel ?? t.channel, i = await r.getLatestOverview(t.id, n);
|
|
4290
|
-
if (i) o = i.spec;
|
|
4312
|
+
const { versionLock: i, skipVersion: c } = t.settings;
|
|
4313
|
+
if (i === "patch") return { suggestions: [] };
|
|
4314
|
+
const a = this.registryProvider.getRegistry(n.registryUrl);
|
|
4315
|
+
let l, u;
|
|
4316
|
+
if (n.channel === void 0)
|
|
4317
|
+
if (await a.getLatestOverview(n.id, ie)) u = ie;
|
|
4291
4318
|
else {
|
|
4292
|
-
|
|
4293
|
-
`
|
|
4294
|
-
|
|
4295
|
-
return;
|
|
4319
|
+
if (await a.getLatestOverview(n.id, we) === void 0)
|
|
4320
|
+
return this.logger.error(`No "any" channel record for ${Es(n.id)}`), { suggestions: [] };
|
|
4321
|
+
u = we;
|
|
4296
4322
|
}
|
|
4323
|
+
else u = n.channel;
|
|
4324
|
+
const d = await a.getUpdateSuggestions(n.id, u);
|
|
4325
|
+
if (d === void 0 || d.length === 0) return { suggestions: [] };
|
|
4326
|
+
d.reverse();
|
|
4327
|
+
let f;
|
|
4328
|
+
switch (i) {
|
|
4329
|
+
case void 0:
|
|
4330
|
+
f = d[0].update;
|
|
4331
|
+
break;
|
|
4332
|
+
case "major":
|
|
4333
|
+
f = (r = d.find((E) => E.type !== "major")) == null ? void 0 : r.update;
|
|
4334
|
+
break;
|
|
4335
|
+
case "minor":
|
|
4336
|
+
f = (o = d.find((E) => E.type === "patch")) == null ? void 0 : o.update;
|
|
4337
|
+
break;
|
|
4297
4338
|
}
|
|
4298
|
-
|
|
4299
|
-
|
|
4339
|
+
const h = d.map(({ type: E, update: F }) => ({
|
|
4340
|
+
type: E,
|
|
4341
|
+
update: { ...n, id: { ...n.id, version: F } }
|
|
4342
|
+
}));
|
|
4343
|
+
if (f === void 0) return { suggestions: h };
|
|
4344
|
+
if (c !== void 0 && rl.lte(f, c))
|
|
4345
|
+
return { suggestions: h };
|
|
4346
|
+
const g = {
|
|
4347
|
+
...n,
|
|
4348
|
+
id: { ...n.id, version: f }
|
|
4349
|
+
};
|
|
4350
|
+
return (async () => {
|
|
4300
4351
|
try {
|
|
4301
|
-
await
|
|
4302
|
-
} catch (
|
|
4303
|
-
this.logger.warn(
|
|
4352
|
+
await a.getComponents(g.id);
|
|
4353
|
+
} catch (E) {
|
|
4354
|
+
this.logger.warn(E);
|
|
4304
4355
|
}
|
|
4305
|
-
})(),
|
|
4306
|
-
} catch (
|
|
4307
|
-
this.logger.warn(
|
|
4308
|
-
return;
|
|
4356
|
+
})(), { suggestions: h, mainSuggestion: g };
|
|
4357
|
+
} catch (i) {
|
|
4358
|
+
return this.logger.warn(i), { suggestions: [] };
|
|
4309
4359
|
}
|
|
4310
4360
|
default:
|
|
4311
|
-
return;
|
|
4361
|
+
return { suggestions: [] };
|
|
4312
4362
|
}
|
|
4313
|
-
} catch (
|
|
4314
|
-
this.logger.warn(
|
|
4315
|
-
return;
|
|
4363
|
+
} catch (n) {
|
|
4364
|
+
return this.logger.warn(n), { suggestions: [] };
|
|
4316
4365
|
}
|
|
4317
4366
|
}
|
|
4318
4367
|
resultsEqual(t, r) {
|
|
4319
|
-
|
|
4320
|
-
if (t === void 0 || r === void 0 || t.type !== r.type) return !1;
|
|
4321
|
-
switch (t.type) {
|
|
4322
|
-
case "from-registry-v1":
|
|
4323
|
-
return r.type !== "from-registry-v1" ? !1 : t.registryUrl === r.registryUrl && Gt(t.id, r.id);
|
|
4324
|
-
case "from-registry-v2":
|
|
4325
|
-
return r.type !== "from-registry-v2" ? !1 : t.registryUrl === r.registryUrl && Gt(t.id, r.id);
|
|
4326
|
-
case "dev-v1":
|
|
4327
|
-
return r.type !== "dev-v1" ? !1 : t.folder === r.folder && t.mtime === r.mtime;
|
|
4328
|
-
case "dev-v2":
|
|
4329
|
-
return r.type !== "dev-v2" ? !1 : t.folder === r.folder && t.mtime === r.mtime;
|
|
4330
|
-
default:
|
|
4331
|
-
J(t);
|
|
4332
|
-
}
|
|
4368
|
+
return re(t) === re(r);
|
|
4333
4369
|
}
|
|
4334
4370
|
}
|
|
4335
4371
|
class $r {
|
|
@@ -4368,7 +4404,7 @@ class $r {
|
|
|
4368
4404
|
}
|
|
4369
4405
|
}
|
|
4370
4406
|
let Re;
|
|
4371
|
-
function
|
|
4407
|
+
function ye() {
|
|
4372
4408
|
return Re || (Re = {
|
|
4373
4409
|
logPFrameRequests: process.env.MI_LOG_PFRAMES !== void 0
|
|
4374
4410
|
}, process.env.MI_LOG_TREE_STAT && (Re.logTreeStats = process.env.MI_LOG_TREE_STAT === "cumulative" ? "cumulative" : "per-request"), Re);
|
|
@@ -4376,8 +4412,8 @@ function ve() {
|
|
|
4376
4412
|
function Ir(s) {
|
|
4377
4413
|
return String(s.id);
|
|
4378
4414
|
}
|
|
4379
|
-
const
|
|
4380
|
-
function
|
|
4415
|
+
const il = ["Int", "Long", "Float", "Double", "String", "Bytes"];
|
|
4416
|
+
function pt(s) {
|
|
4381
4417
|
const e = [], t = [];
|
|
4382
4418
|
for (const r of s)
|
|
4383
4419
|
r.type === "bySingleColumn" ? (e.push(r), t.push({
|
|
@@ -4392,8 +4428,8 @@ function dt(s) {
|
|
|
4392
4428
|
}
|
|
4393
4429
|
return s;
|
|
4394
4430
|
}
|
|
4395
|
-
const
|
|
4396
|
-
class
|
|
4431
|
+
const Ee = (s, e) => typeof e == "bigint" ? e.toString() : e;
|
|
4432
|
+
class al {
|
|
4397
4433
|
constructor(e, t, r, o) {
|
|
4398
4434
|
S(this, "pFrame");
|
|
4399
4435
|
S(this, "blobIdToResource", /* @__PURE__ */ new Map());
|
|
@@ -4415,7 +4451,7 @@ class il {
|
|
|
4415
4451
|
throw console.log(`resolveBlobContent catched error: ${r}`), t;
|
|
4416
4452
|
}
|
|
4417
4453
|
});
|
|
4418
|
-
this.blobDriver = e, this.logger = t, this.blobContentCache = r, this.columns = o, this.pFrame = new
|
|
4454
|
+
this.blobDriver = e, this.logger = t, this.blobContentCache = r, this.columns = o, this.pFrame = new no(
|
|
4419
4455
|
(n, i) => {
|
|
4420
4456
|
switch (n) {
|
|
4421
4457
|
default:
|
|
@@ -4429,8 +4465,8 @@ class il {
|
|
|
4429
4465
|
}
|
|
4430
4466
|
), this.pFrame.setDataSource(this);
|
|
4431
4467
|
for (const n of o) {
|
|
4432
|
-
for (const c of
|
|
4433
|
-
const i =
|
|
4468
|
+
for (const c of nn(n.data)) this.blobIdToResource.set(Ir(c), c);
|
|
4469
|
+
const i = an(n.data, Ir);
|
|
4434
4470
|
try {
|
|
4435
4471
|
this.pFrame.addColumnSpec(n.id, n.spec), this.pFrame.setColumnData(n.id, i);
|
|
4436
4472
|
} catch (c) {
|
|
@@ -4452,7 +4488,7 @@ class il {
|
|
|
4452
4488
|
this.pFrame.dispose();
|
|
4453
4489
|
}
|
|
4454
4490
|
}
|
|
4455
|
-
class
|
|
4491
|
+
class cl {
|
|
4456
4492
|
constructor(e, t) {
|
|
4457
4493
|
S(this, "pFrames");
|
|
4458
4494
|
S(this, "pTables");
|
|
@@ -4460,39 +4496,39 @@ class al {
|
|
|
4460
4496
|
/** Limits concurrent requests to PFrame API to prevent deadlock with Node's IO threads */
|
|
4461
4497
|
S(this, "concurrencyLimiter");
|
|
4462
4498
|
this.blobDriver = e, this.logger = t;
|
|
4463
|
-
const r = new
|
|
4499
|
+
const r = new io({
|
|
4464
4500
|
maxSize: 1e9,
|
|
4465
4501
|
// 1Gb
|
|
4466
4502
|
fetchMethod: async (n) => await Dr.readFile(n),
|
|
4467
4503
|
sizeCalculation: (n) => n.length
|
|
4468
|
-
}), o = new
|
|
4504
|
+
}), o = new Ts(1);
|
|
4469
4505
|
this.blobContentCache = r, this.concurrencyLimiter = o, this.pFrames = new class extends $r {
|
|
4470
4506
|
constructor(n, i) {
|
|
4471
4507
|
super(), this.blobDriver = n, this.logger = i;
|
|
4472
4508
|
}
|
|
4473
4509
|
createNewResource(n) {
|
|
4474
|
-
return
|
|
4475
|
-
`PFrame creation (pFrameHandle = ${this.calculateParamsKey(n)}): ${JSON.stringify(n,
|
|
4476
|
-
), new
|
|
4510
|
+
return ye().logPFrameRequests && t.info(
|
|
4511
|
+
`PFrame creation (pFrameHandle = ${this.calculateParamsKey(n)}): ${JSON.stringify(n, Ee)}`
|
|
4512
|
+
), new al(this.blobDriver, this.logger, r, n);
|
|
4477
4513
|
}
|
|
4478
4514
|
calculateParamsKey(n) {
|
|
4479
|
-
return
|
|
4515
|
+
return ul(n);
|
|
4480
4516
|
}
|
|
4481
4517
|
}(this.blobDriver, this.logger), this.pTables = new class extends $r {
|
|
4482
4518
|
constructor(n) {
|
|
4483
4519
|
super(), this.pFrames = n;
|
|
4484
4520
|
}
|
|
4485
4521
|
async createNewResource(n) {
|
|
4486
|
-
const i = this.pFrames.getByKey(n.pFrameHandle), c = await o.run(async () => (
|
|
4487
|
-
`PTable creation (pTableHandle = ${this.calculateParamsKey(n)}): ${JSON.stringify(n,
|
|
4522
|
+
const i = this.pFrames.getByKey(n.pFrameHandle), c = await o.run(async () => (ye().logPFrameRequests && t.info(
|
|
4523
|
+
`PTable creation (pTableHandle = ${this.calculateParamsKey(n)}): ${JSON.stringify(n, Ee)}`
|
|
4488
4524
|
), await i.pFrame.createTable({
|
|
4489
4525
|
src: Ie(n.def.src),
|
|
4490
|
-
filters:
|
|
4526
|
+
filters: pt(n.def.filters)
|
|
4491
4527
|
})));
|
|
4492
4528
|
return n.def.sorting.length !== 0 ? c.sort(n.def.sorting) : c;
|
|
4493
4529
|
}
|
|
4494
4530
|
calculateParamsKey(n) {
|
|
4495
|
-
return
|
|
4531
|
+
return ll(n);
|
|
4496
4532
|
}
|
|
4497
4533
|
}(this.pFrames);
|
|
4498
4534
|
}
|
|
@@ -4500,20 +4536,20 @@ class al {
|
|
|
4500
4536
|
// Internal / Config API Methods
|
|
4501
4537
|
//
|
|
4502
4538
|
createPFrame(e, t) {
|
|
4503
|
-
const r = e.filter((n) =>
|
|
4539
|
+
const r = e.filter((n) => il.find((i) => i === n.spec.valueType)).map(
|
|
4504
4540
|
(n) => le(
|
|
4505
4541
|
n,
|
|
4506
|
-
(i) =>
|
|
4542
|
+
(i) => Gs(i) ? hn(i) : fn(n.spec, i)
|
|
4507
4543
|
)
|
|
4508
4544
|
), o = this.pFrames.acquire(r);
|
|
4509
4545
|
return t.addOnDestroy(o.unref), o.key;
|
|
4510
4546
|
}
|
|
4511
4547
|
createPTable(e, t) {
|
|
4512
|
-
const r = this.createPFrame(
|
|
4513
|
-
return
|
|
4548
|
+
const r = this.createPFrame(Rs(e.src), t), o = ht(e, (i) => i.id), n = this.pTables.acquire({ def: o, pFrameHandle: r });
|
|
4549
|
+
return ye().logPFrameRequests && this.logger.info(
|
|
4514
4550
|
`Create PTable call (pFrameHandle = ${r}; pTableHandle = ${JSON.stringify(n)}): ${JSON.stringify(
|
|
4515
|
-
|
|
4516
|
-
|
|
4551
|
+
ht(e, (i) => i.spec),
|
|
4552
|
+
Ee
|
|
4517
4553
|
)}`
|
|
4518
4554
|
), t.addOnDestroy(n.unref), n.key;
|
|
4519
4555
|
}
|
|
@@ -4545,11 +4581,11 @@ class al {
|
|
|
4545
4581
|
);
|
|
4546
4582
|
}
|
|
4547
4583
|
async calculateTableData(e, t) {
|
|
4548
|
-
let r = await this.concurrencyLimiter.run(async () => (
|
|
4549
|
-
`Call calculateTableData, handle = ${e}, request = ${JSON.stringify(t,
|
|
4584
|
+
let r = await this.concurrencyLimiter.run(async () => (ye().logPFrameRequests && this.logger.info(
|
|
4585
|
+
`Call calculateTableData, handle = ${e}, request = ${JSON.stringify(t, Ee)}`
|
|
4550
4586
|
), await this.pFrames.getByKey(e).pFrame.createTable({
|
|
4551
4587
|
src: Ie(t.src),
|
|
4552
|
-
filters:
|
|
4588
|
+
filters: pt(t.filters)
|
|
4553
4589
|
})));
|
|
4554
4590
|
if (t.sorting.length > 0) {
|
|
4555
4591
|
const i = await this.concurrencyLimiter.run(
|
|
@@ -4566,11 +4602,11 @@ class al {
|
|
|
4566
4602
|
}));
|
|
4567
4603
|
}
|
|
4568
4604
|
async getUniqueValues(e, t) {
|
|
4569
|
-
return await this.concurrencyLimiter.run(async () => (
|
|
4570
|
-
`Call getUniqueValues, handle = ${e}, request = ${JSON.stringify(t,
|
|
4605
|
+
return await this.concurrencyLimiter.run(async () => (ye().logPFrameRequests && this.logger.info(
|
|
4606
|
+
`Call getUniqueValues, handle = ${e}, request = ${JSON.stringify(t, Ee)}`
|
|
4571
4607
|
), await this.pFrames.getByKey(e).pFrame.getUniqueValues({
|
|
4572
4608
|
...t,
|
|
4573
|
-
filters:
|
|
4609
|
+
filters: pt(t.filters)
|
|
4574
4610
|
})));
|
|
4575
4611
|
}
|
|
4576
4612
|
//
|
|
@@ -4610,14 +4646,14 @@ function Ie(s) {
|
|
|
4610
4646
|
secondary: s.secondary.map((e) => Ie(e))
|
|
4611
4647
|
};
|
|
4612
4648
|
default:
|
|
4613
|
-
|
|
4649
|
+
G(s);
|
|
4614
4650
|
}
|
|
4615
4651
|
}
|
|
4616
|
-
function
|
|
4652
|
+
function ll(s) {
|
|
4617
4653
|
const e = Ne("sha256");
|
|
4618
|
-
return e.update(
|
|
4654
|
+
return e.update(re(s)), e.digest().toString("hex");
|
|
4619
4655
|
}
|
|
4620
|
-
function
|
|
4656
|
+
function ul(s) {
|
|
4621
4657
|
const e = [...s].map(
|
|
4622
4658
|
(r) => le(r, (o) => {
|
|
4623
4659
|
let n;
|
|
@@ -4661,41 +4697,41 @@ function ll(s) {
|
|
|
4661
4697
|
);
|
|
4662
4698
|
e.sort((r, o) => r.id.localeCompare(o.id));
|
|
4663
4699
|
const t = Ne("sha256");
|
|
4664
|
-
return t.update(
|
|
4700
|
+
return t.update(re(e)), t.digest().toString("hex");
|
|
4665
4701
|
}
|
|
4666
|
-
async function
|
|
4702
|
+
async function dl(s, e, t) {
|
|
4667
4703
|
const r = {
|
|
4668
4704
|
...as,
|
|
4669
4705
|
...cs(e),
|
|
4670
4706
|
...t
|
|
4671
|
-
}, o = new Nr(r.localSecret), n =
|
|
4707
|
+
}, o = new Nr(r.localSecret), n = Xs(r.logger, s, r.localProjections), i = zs(s, r.logger), c = Ys(s, r.logger), a = Qs(s, r.logger), l = new Zs(
|
|
4672
4708
|
r.logger,
|
|
4673
4709
|
n,
|
|
4674
4710
|
i,
|
|
4675
4711
|
r.blobDownloadPath,
|
|
4676
4712
|
o,
|
|
4677
4713
|
r.blobDriverOps
|
|
4678
|
-
), u = new
|
|
4714
|
+
), u = new eo(
|
|
4679
4715
|
r.logger,
|
|
4680
4716
|
o,
|
|
4681
4717
|
c,
|
|
4682
4718
|
a,
|
|
4683
4719
|
r.uploadDriverOps
|
|
4684
|
-
), d = new
|
|
4720
|
+
), d = new to(r.logger, i, r.logStreamDriverOps), f = new ro(r.logger, d, l), h = await so.init(
|
|
4685
4721
|
r.logger,
|
|
4686
4722
|
s,
|
|
4687
4723
|
o,
|
|
4688
4724
|
r.localProjections,
|
|
4689
4725
|
r.openFileDialogCallback,
|
|
4690
4726
|
r.virtualLocalStoragesOverride
|
|
4691
|
-
),
|
|
4727
|
+
), g = new cl(l, r.logger);
|
|
4692
4728
|
return {
|
|
4693
4729
|
blobDriver: l,
|
|
4694
|
-
logDriver:
|
|
4730
|
+
logDriver: f,
|
|
4695
4731
|
lsDriver: h,
|
|
4696
4732
|
signer: o,
|
|
4697
4733
|
uploadDriver: u,
|
|
4698
|
-
pFrameDriver:
|
|
4734
|
+
pFrameDriver: g
|
|
4699
4735
|
};
|
|
4700
4736
|
}
|
|
4701
4737
|
class ms {
|
|
@@ -4719,14 +4755,14 @@ class ms {
|
|
|
4719
4755
|
/** Creates a project with initial state and adds it to project list. */
|
|
4720
4756
|
async createProject(e, t = Fe()) {
|
|
4721
4757
|
const r = await this.pl.withWriteTx("MLCreateProject", async (o) => {
|
|
4722
|
-
const n = await
|
|
4723
|
-
return o.createField(j(this.projectListResourceId, t), "Dynamic", n), await o.commit(), await
|
|
4758
|
+
const n = await on(o, e);
|
|
4759
|
+
return o.createField(j(this.projectListResourceId, t), "Dynamic", n), await o.commit(), await Vs(n);
|
|
4724
4760
|
});
|
|
4725
4761
|
return await this.projectListTree.refreshState(), r;
|
|
4726
4762
|
}
|
|
4727
4763
|
/** Updates project metadata */
|
|
4728
4764
|
async setProjectMeta(e, t, r) {
|
|
4729
|
-
await
|
|
4765
|
+
await Y(this.pl, e, r, async (o) => {
|
|
4730
4766
|
o.setMeta(t);
|
|
4731
4767
|
}), await this.projectListTree.refreshState();
|
|
4732
4768
|
}
|
|
@@ -4751,7 +4787,7 @@ class ms {
|
|
|
4751
4787
|
async openProject(e) {
|
|
4752
4788
|
const t = await this.ensureProjectRid(e);
|
|
4753
4789
|
if (this.openedProjectsByRid.has(t)) throw new Error(`Project ${t} already opened`);
|
|
4754
|
-
this.openedProjectsByRid.set(t, await
|
|
4790
|
+
this.openedProjectsByRid.set(t, await Lt.init(this.env, t)), this.openedProjectsList.setValue([...this.openedProjectsByRid.keys()]);
|
|
4755
4791
|
}
|
|
4756
4792
|
/** Closes the project, and deallocate all corresponding resources. */
|
|
4757
4793
|
async closeProject(e) {
|
|
@@ -4784,32 +4820,32 @@ class ms {
|
|
|
4784
4820
|
/** Initialize middle layer */
|
|
4785
4821
|
static async init(e, t, r) {
|
|
4786
4822
|
const o = {
|
|
4787
|
-
...
|
|
4788
|
-
...
|
|
4823
|
+
...ai,
|
|
4824
|
+
...ci(t),
|
|
4789
4825
|
...r
|
|
4790
4826
|
};
|
|
4791
|
-
o.defaultTreeOptions.logStat =
|
|
4792
|
-
const n = await e.withWriteTx("MLInitialization", async (
|
|
4793
|
-
const F = j(
|
|
4794
|
-
|
|
4795
|
-
const
|
|
4796
|
-
if (Ke(
|
|
4797
|
-
const _ =
|
|
4798
|
-
return
|
|
4827
|
+
o.defaultTreeOptions.logStat = ye().logTreeStats;
|
|
4828
|
+
const n = await e.withWriteTx("MLInitialization", async (E) => {
|
|
4829
|
+
const F = j(E.clientRoot, $o);
|
|
4830
|
+
E.createField(F, "Dynamic");
|
|
4831
|
+
const N = await E.getField(F);
|
|
4832
|
+
if (Ke(N.value)) {
|
|
4833
|
+
const _ = E.createEphemeral(_r);
|
|
4834
|
+
return E.lock(_), E.setField(F, _), await E.commit(), await _.globalId;
|
|
4799
4835
|
} else
|
|
4800
|
-
return
|
|
4801
|
-
}), i = o.logger, c = await
|
|
4836
|
+
return N.value;
|
|
4837
|
+
}), i = o.logger, c = await dl(e, t, o), a = new ks(e.httpDispatcher, {
|
|
4802
4838
|
minTimeout: 250,
|
|
4803
4839
|
maxRetries: 4
|
|
4804
|
-
}), l = new
|
|
4840
|
+
}), l = new mo(a), u = new Yo(
|
|
4805
4841
|
l,
|
|
4806
4842
|
c.signer,
|
|
4807
4843
|
a
|
|
4808
|
-
), d = new
|
|
4844
|
+
), d = new oo(
|
|
4809
4845
|
i,
|
|
4810
4846
|
e.httpDispatcher,
|
|
4811
4847
|
o.frontendDownloadPath
|
|
4812
|
-
),
|
|
4848
|
+
), f = {
|
|
4813
4849
|
pl: e,
|
|
4814
4850
|
signer: c.signer,
|
|
4815
4851
|
logger: i,
|
|
@@ -4819,26 +4855,26 @@ class ms {
|
|
|
4819
4855
|
bpPreparer: u,
|
|
4820
4856
|
frontendDownloadDriver: d,
|
|
4821
4857
|
driverKit: c,
|
|
4822
|
-
blockUpdateWatcher: new
|
|
4858
|
+
blockUpdateWatcher: new nl(l, i, {
|
|
4823
4859
|
minDelay: o.devBlockUpdateRecheckInterval,
|
|
4824
4860
|
http: a,
|
|
4825
4861
|
preferredUpdateChannel: o.preferredUpdateChannel
|
|
4826
4862
|
}),
|
|
4827
|
-
quickJs: await
|
|
4828
|
-
}, h = new
|
|
4863
|
+
quickJs: await qs()
|
|
4864
|
+
}, h = new _s([]), g = await Fo(e, n, h, f);
|
|
4829
4865
|
return new ms(
|
|
4830
|
-
|
|
4866
|
+
f,
|
|
4831
4867
|
c,
|
|
4832
4868
|
c.signer,
|
|
4833
4869
|
n,
|
|
4834
4870
|
h,
|
|
4835
|
-
|
|
4871
|
+
g.tree,
|
|
4836
4872
|
l,
|
|
4837
|
-
|
|
4873
|
+
g.computable
|
|
4838
4874
|
);
|
|
4839
4875
|
}
|
|
4840
4876
|
}
|
|
4841
|
-
const
|
|
4877
|
+
const pl = [
|
|
4842
4878
|
"undici:request:create",
|
|
4843
4879
|
// When a new request is created
|
|
4844
4880
|
"undici:request:bodySent",
|
|
@@ -4876,7 +4912,7 @@ const dl = [
|
|
|
4876
4912
|
"undici:dispatcher:retry"
|
|
4877
4913
|
// When a dispatcher retries a request
|
|
4878
4914
|
];
|
|
4879
|
-
async function
|
|
4915
|
+
async function ql(s, e = {}) {
|
|
4880
4916
|
const t = {
|
|
4881
4917
|
pingCheckDurationMs: 1e4,
|
|
4882
4918
|
pingTimeoutMs: 3e3,
|
|
@@ -4894,11 +4930,11 @@ async function Wl(s, e = {}) {
|
|
|
4894
4930
|
bodyLimit: 300,
|
|
4895
4931
|
...e
|
|
4896
4932
|
}, r = [];
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
var
|
|
4933
|
+
pl.forEach((a) => {
|
|
4934
|
+
ao(a).subscribe((u) => {
|
|
4935
|
+
var f;
|
|
4900
4936
|
const d = (/* @__PURE__ */ new Date()).toISOString();
|
|
4901
|
-
(
|
|
4937
|
+
(f = u == null ? void 0 : u.response) != null && f.headers && (u.response.headers = u.response.headers.map((h) => h.toString())), r.push(
|
|
4902
4938
|
JSON.stringify({
|
|
4903
4939
|
timestamp: d,
|
|
4904
4940
|
event: a,
|
|
@@ -4914,38 +4950,38 @@ async function Wl(s, e = {}) {
|
|
|
4914
4950
|
blockRegistryUiChecks: [],
|
|
4915
4951
|
blockGARegistryUiChecks: [],
|
|
4916
4952
|
autoUpdateCdnChecks: []
|
|
4917
|
-
}, n =
|
|
4918
|
-
o.plPings = await
|
|
4953
|
+
}, n = Us(s, { defaultRequestTimeout: t.pingTimeoutMs });
|
|
4954
|
+
o.plPings = await me(t.pingCheckDurationMs, t.maxPingsPerSecond, async () => {
|
|
4919
4955
|
const l = await new Kt(n).ping();
|
|
4920
4956
|
return JSON.stringify(l).slice(0, t.bodyLimit) + "...";
|
|
4921
4957
|
});
|
|
4922
4958
|
const c = new Kt(n).ll.httpDispatcher;
|
|
4923
|
-
return o.blockRegistryOverviewChecks = await
|
|
4959
|
+
return o.blockRegistryOverviewChecks = await me(
|
|
4924
4960
|
t.blockRegistryDurationMs,
|
|
4925
4961
|
t.maxRegistryChecksPerSecond,
|
|
4926
|
-
async () => await
|
|
4927
|
-
), o.blockGARegistryOverviewChecks = await
|
|
4962
|
+
async () => await ke(new URL(t.blockOverviewPath, t.blockRegistryUrl), t, c)
|
|
4963
|
+
), o.blockGARegistryOverviewChecks = await me(
|
|
4928
4964
|
t.blockRegistryDurationMs,
|
|
4929
4965
|
t.maxRegistryChecksPerSecond,
|
|
4930
|
-
async () => await
|
|
4931
|
-
), o.blockRegistryUiChecks = await
|
|
4966
|
+
async () => await ke(new URL(t.blockOverviewPath, t.blockGARegistryUrl), t, c)
|
|
4967
|
+
), o.blockRegistryUiChecks = await me(
|
|
4932
4968
|
t.blockRegistryDurationMs,
|
|
4933
4969
|
t.maxRegistryChecksPerSecond,
|
|
4934
|
-
async () => await
|
|
4935
|
-
), o.blockGARegistryUiChecks = await
|
|
4970
|
+
async () => await ke(new URL(t.blockUiPath, t.blockRegistryUrl), t, c)
|
|
4971
|
+
), o.blockGARegistryUiChecks = await me(
|
|
4936
4972
|
t.blockRegistryDurationMs,
|
|
4937
4973
|
t.maxRegistryChecksPerSecond,
|
|
4938
|
-
async () => await
|
|
4939
|
-
), o.autoUpdateCdnChecks = await
|
|
4974
|
+
async () => await ke(new URL(t.blockUiPath, t.blockGARegistryUrl), t, c)
|
|
4975
|
+
), o.autoUpdateCdnChecks = await me(
|
|
4940
4976
|
t.autoUpdateCdnDurationMs,
|
|
4941
4977
|
t.maxAutoUpdateCdnChecksPerSecond,
|
|
4942
|
-
async () => await
|
|
4943
|
-
),
|
|
4978
|
+
async () => await ke(t.autoUpdateCdnUrl, t, c)
|
|
4979
|
+
), hl(o, s, t, r);
|
|
4944
4980
|
}
|
|
4945
|
-
async function
|
|
4946
|
-
const r =
|
|
4981
|
+
async function me(s, e, t) {
|
|
4982
|
+
const r = kt(), o = [];
|
|
4947
4983
|
for (; Fr(r) < s; ) {
|
|
4948
|
-
const n =
|
|
4984
|
+
const n = kt();
|
|
4949
4985
|
let i;
|
|
4950
4986
|
try {
|
|
4951
4987
|
i = { ok: !0, value: await t() };
|
|
@@ -4962,7 +4998,7 @@ async function ge(s, e, t) {
|
|
|
4962
4998
|
}
|
|
4963
4999
|
return o;
|
|
4964
5000
|
}
|
|
4965
|
-
async function
|
|
5001
|
+
async function ke(s, e, t) {
|
|
4966
5002
|
const { body: r, statusCode: o } = await ae(s, {
|
|
4967
5003
|
dispatcher: t,
|
|
4968
5004
|
headersTimeout: e.httpTimeoutMs,
|
|
@@ -4973,7 +5009,7 @@ async function Ee(s, e, t) {
|
|
|
4973
5009
|
beginningOfBody: n.slice(0, e.bodyLimit) + "..."
|
|
4974
5010
|
};
|
|
4975
5011
|
}
|
|
4976
|
-
function
|
|
5012
|
+
function hl(s, e, t, r) {
|
|
4977
5013
|
const o = s.plPings.filter((c) => c.response.ok), n = s.plPings.filter((c) => !c.response.ok), i = [
|
|
4978
5014
|
...new Set(o.map((c) => JSON.stringify(c.response.value)))
|
|
4979
5015
|
];
|
|
@@ -4982,17 +5018,17 @@ Network report:
|
|
|
4982
5018
|
pl endpoint: ${e};
|
|
4983
5019
|
options: ${JSON.stringify(t, null, 2)}.
|
|
4984
5020
|
|
|
4985
|
-
Platforma pings: ${
|
|
5021
|
+
Platforma pings: ${ve(s.plPings)}
|
|
4986
5022
|
|
|
4987
|
-
Block registry overview responses: ${
|
|
5023
|
+
Block registry overview responses: ${ve(s.blockRegistryOverviewChecks)}
|
|
4988
5024
|
|
|
4989
|
-
Block ga registry overview responses: ${
|
|
5025
|
+
Block ga registry overview responses: ${ve(s.blockGARegistryOverviewChecks)}
|
|
4990
5026
|
|
|
4991
|
-
Block registry ui responses: ${
|
|
5027
|
+
Block registry ui responses: ${ve(s.blockRegistryUiChecks)}
|
|
4992
5028
|
|
|
4993
|
-
Block ga registry ui responses: ${
|
|
5029
|
+
Block ga registry ui responses: ${ve(s.blockGARegistryUiChecks)}
|
|
4994
5030
|
|
|
4995
|
-
Auto-update CDN responses: ${
|
|
5031
|
+
Auto-update CDN responses: ${ve(s.autoUpdateCdnChecks)}
|
|
4996
5032
|
|
|
4997
5033
|
Block registry overview dumps:
|
|
4998
5034
|
${JSON.stringify(s.blockRegistryOverviewChecks, null, 2)}
|
|
@@ -5020,8 +5056,8 @@ ${r.join(`
|
|
|
5020
5056
|
`)}
|
|
5021
5057
|
`;
|
|
5022
5058
|
}
|
|
5023
|
-
function
|
|
5024
|
-
const e = s.filter((o) => o.response.ok), { mean: t, median: r } =
|
|
5059
|
+
function ve(s) {
|
|
5060
|
+
const e = s.filter((o) => o.response.ok), { mean: t, median: r } = fl(s);
|
|
5025
5061
|
return `
|
|
5026
5062
|
total: ${s.length};
|
|
5027
5063
|
successes: ${e.length};
|
|
@@ -5030,7 +5066,7 @@ mean in ms: ${t};
|
|
|
5030
5066
|
median in ms: ${r};
|
|
5031
5067
|
`;
|
|
5032
5068
|
}
|
|
5033
|
-
function
|
|
5069
|
+
function fl(s) {
|
|
5034
5070
|
const e = s.map((o) => o.elapsedMs), t = e.reduce((o, n) => o + n) / e.length;
|
|
5035
5071
|
let r;
|
|
5036
5072
|
if (e.length > 0) {
|
|
@@ -5039,40 +5075,40 @@ function hl(s) {
|
|
|
5039
5075
|
}
|
|
5040
5076
|
return { mean: t, median: r };
|
|
5041
5077
|
}
|
|
5042
|
-
function
|
|
5078
|
+
function kt() {
|
|
5043
5079
|
return Date.now();
|
|
5044
5080
|
}
|
|
5045
5081
|
function Fr(s) {
|
|
5046
|
-
return
|
|
5082
|
+
return kt() - s;
|
|
5047
5083
|
}
|
|
5048
5084
|
export {
|
|
5049
|
-
|
|
5050
|
-
|
|
5085
|
+
Ul as BlockPackRegistry,
|
|
5086
|
+
Jl as CentralBlockRegistry,
|
|
5051
5087
|
cs as DefaultDriverKitOpsPaths,
|
|
5052
5088
|
as as DefaultDriverKitOpsSettings,
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5089
|
+
ci as DefaultMiddleLayerOpsPaths,
|
|
5090
|
+
ai as DefaultMiddleLayerOpsSettings,
|
|
5091
|
+
qr as FrontendFromFolderResourceType,
|
|
5056
5092
|
Wr as FrontendFromUrlResourceType,
|
|
5057
5093
|
ms as MiddleLayer,
|
|
5058
|
-
|
|
5059
|
-
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5094
|
+
Lt as Project,
|
|
5095
|
+
Mo as TengoTemplateGet,
|
|
5096
|
+
_o as TengoTemplateGetRegistry,
|
|
5097
|
+
Ho as TengoTemplateGetTemplate,
|
|
5098
|
+
Ko as TengoTemplateGetTemplateURI,
|
|
5099
|
+
_l as TengoTemplatePack,
|
|
5100
|
+
Kl as TengoTemplatePackConvert,
|
|
5101
|
+
Wl as TengoTemplatePackConvertTemplate,
|
|
5102
|
+
Hl as TengoTemplatePackConvertTemplatePack,
|
|
5103
|
+
Ml as V1CentralDevSnapshotRegistry,
|
|
5104
|
+
Gl as V1CentralRegistry,
|
|
5105
|
+
mo as V2RegistryProvider,
|
|
5106
|
+
ql as checkNetwork,
|
|
5071
5107
|
Kr as createRenderTemplate,
|
|
5072
5108
|
Jr as getDevV1PacketMtime,
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5109
|
+
$t as getDevV2PacketMtime,
|
|
5110
|
+
dl as initDriverKit,
|
|
5111
|
+
Ft as loadTemplate,
|
|
5112
|
+
Wo as prepareTemplateSpec
|
|
5077
5113
|
};
|
|
5078
5114
|
//# sourceMappingURL=index.mjs.map
|